From 58075c6b21b7e613514929f5fb85560acde9fff7 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Sun, 18 Jan 2009 22:24:40 +0900 Subject: [PATCH] ruby-1.9.1-rc1 --- lib/ruby-1.9.1-rc1/.cvsignore | 52 + lib/ruby-1.9.1-rc1/.document | 16 + lib/ruby-1.9.1-rc1/.gdbinit | 560 + lib/ruby-1.9.1-rc1/COPYING | 56 + lib/ruby-1.9.1-rc1/COPYING.ja | 51 + lib/ruby-1.9.1-rc1/ChangeLog | 59148 +++++++++++++++++++ lib/ruby-1.9.1-rc1/GPL | 340 + lib/ruby-1.9.1-rc1/KNOWNBUGS.rb | 4 + lib/ruby-1.9.1-rc1/LEGAL | 393 + lib/ruby-1.9.1-rc1/LGPL | 504 + lib/ruby-1.9.1-rc1/Makefile.in | 255 + lib/ruby-1.9.1-rc1/NEWS | 402 + lib/ruby-1.9.1-rc1/README | 114 + lib/ruby-1.9.1-rc1/README.EXT | 1326 + lib/ruby-1.9.1-rc1/README.EXT.ja | 1447 + lib/ruby-1.9.1-rc1/README.ja | 160 + lib/ruby-1.9.1-rc1/ToDo | 124 + lib/ruby-1.9.1-rc1/array.c | 3876 ++ lib/ruby-1.9.1-rc1/bcc32/Makefile.sub | 611 + lib/ruby-1.9.1-rc1/bcc32/README.bcc32 | 142 + lib/ruby-1.9.1-rc1/bcc32/configure.bat | 163 + lib/ruby-1.9.1-rc1/bcc32/mkexports.rb | 26 + lib/ruby-1.9.1-rc1/bcc32/setup.mak | 179 + lib/ruby-1.9.1-rc1/benchmark/bm_app_answer.rb | 15 + lib/ruby-1.9.1-rc1/benchmark/bm_app_erb.rb | 26 + lib/ruby-1.9.1-rc1/benchmark/bm_app_factorial.rb | 11 + lib/ruby-1.9.1-rc1/benchmark/bm_app_fib.rb | 10 + lib/ruby-1.9.1-rc1/benchmark/bm_app_mandelbrot.rb | 23 + lib/ruby-1.9.1-rc1/benchmark/bm_app_pentomino.rb | 259 + lib/ruby-1.9.1-rc1/benchmark/bm_app_raise.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_app_strconcat.rb | 5 + lib/ruby-1.9.1-rc1/benchmark/bm_app_tak.rb | 13 + lib/ruby-1.9.1-rc1/benchmark/bm_app_tarai.rb | 10 + lib/ruby-1.9.1-rc1/benchmark/bm_app_uri.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_io_file_create.rb | 13 + lib/ruby-1.9.1-rc1/benchmark/bm_io_file_read.rb | 15 + lib/ruby-1.9.1-rc1/benchmark/bm_io_file_write.rb | 14 + lib/ruby-1.9.1-rc1/benchmark/bm_loop_for.rb | 3 + lib/ruby-1.9.1-rc1/benchmark/bm_loop_generator.rb | 14 + lib/ruby-1.9.1-rc1/benchmark/bm_loop_times.rb | 1 + lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop.rb | 4 + lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop2.rb | 4 + lib/ruby-1.9.1-rc1/benchmark/bm_so_ackermann.rb | 19 + lib/ruby-1.9.1-rc1/benchmark/bm_so_array.rb | 23 + lib/ruby-1.9.1-rc1/benchmark/bm_so_binary_trees.rb | 57 + lib/ruby-1.9.1-rc1/benchmark/bm_so_concatenate.rb | 18 + lib/ruby-1.9.1-rc1/benchmark/bm_so_count_words.rb | 19 + lib/ruby-1.9.1-rc1/benchmark/bm_so_exception.rb | 61 + lib/ruby-1.9.1-rc1/benchmark/bm_so_fannkuch.rb | 45 + lib/ruby-1.9.1-rc1/benchmark/bm_so_fasta.rb | 81 + lib/ruby-1.9.1-rc1/benchmark/bm_so_k_nucleotide.rb | 48 + lib/ruby-1.9.1-rc1/benchmark/bm_so_lists.rb | 47 + lib/ruby-1.9.1-rc1/benchmark/bm_so_mandelbrot.rb | 57 + lib/ruby-1.9.1-rc1/benchmark/bm_so_matrix.rb | 48 + .../benchmark/bm_so_meteor_contest.rb | 564 + lib/ruby-1.9.1-rc1/benchmark/bm_so_nbody.rb | 148 + lib/ruby-1.9.1-rc1/benchmark/bm_so_nested_loop.rb | 24 + lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve.rb | 35 + lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve_bits.rb | 42 + lib/ruby-1.9.1-rc1/benchmark/bm_so_object.rb | 56 + lib/ruby-1.9.1-rc1/benchmark/bm_so_partial_sums.rb | 31 + lib/ruby-1.9.1-rc1/benchmark/bm_so_pidigits.rb | 92 + lib/ruby-1.9.1-rc1/benchmark/bm_so_random.rb | 20 + .../benchmark/bm_so_reverse_complement.rb | 30 + lib/ruby-1.9.1-rc1/benchmark/bm_so_sieve.rb | 24 + lib/ruby-1.9.1-rc1/benchmark/bm_so_spectralnorm.rb | 50 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_block.rb | 10 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_const.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ensure.rb | 11 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar_set.rb | 6 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_length.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_neq.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_not.rb | 7 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_rescue.rb | 7 + .../benchmark/bm_vm1_simplereturn.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/bm_vm1_swap.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_array.rb | 5 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_case.rb | 14 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_eval.rb | 6 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_method.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_mutex.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method.rb | 20 + .../benchmark/bm_vm2_poly_method_ov.rb | 20 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_proc.rb | 14 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_regexp.rb | 6 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_send.rb | 12 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_super.rb | 20 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_unif1.rb | 8 + lib/ruby-1.9.1-rc1/benchmark/bm_vm2_zsuper.rb | 20 + lib/ruby-1.9.1-rc1/benchmark/bm_vm3_gc.rb | 7 + .../benchmark/bm_vm3_thread_create_join.rb | 6 + .../benchmark/bm_vm3_thread_mutex.rb | 18 + lib/ruby-1.9.1-rc1/benchmark/bmx_temp.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/driver.rb | 253 + lib/ruby-1.9.1-rc1/benchmark/make_fasta_output.rb | 19 + lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.pl | 11 + lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.py | 16 + lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.rb | 12 + lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.scm | 7 + lib/ruby-1.9.1-rc1/benchmark/other-lang/eval.rb | 66 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.pl | 13 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.py | 18 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.rb | 13 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.scm | 8 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.pl | 11 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.py | 7 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.rb | 9 + lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.scm | 7 + lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.pl | 3 + lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.py | 2 + lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.rb | 4 + lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.scm | 1 + lib/ruby-1.9.1-rc1/benchmark/other-lang/loop2.rb | 1 + lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.pl | 11 + lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.py | 8 + lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.rb | 13 + lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.scm | 10 + .../benchmark/prepare_so_count_words.rb | 15 + .../benchmark/prepare_so_k_nucleotide.rb | 2 + .../benchmark/prepare_so_reverse_complement.rb | 2 + lib/ruby-1.9.1-rc1/benchmark/report.rb | 81 + lib/ruby-1.9.1-rc1/benchmark/run.rb | 127 + lib/ruby-1.9.1-rc1/benchmark/runc.rb | 29 + lib/ruby-1.9.1-rc1/benchmark/wc.input.base | 25 + lib/ruby-1.9.1-rc1/bignum.c | 2706 + lib/ruby-1.9.1-rc1/bin/erb | 155 + lib/ruby-1.9.1-rc1/bin/gem | 28 + lib/ruby-1.9.1-rc1/bin/irb | 20 + lib/ruby-1.9.1-rc1/bin/rake | 31 + lib/ruby-1.9.1-rc1/bin/rdoc | 22 + lib/ruby-1.9.1-rc1/bin/ri | 5 + lib/ruby-1.9.1-rc1/bin/testrb | 14 + lib/ruby-1.9.1-rc1/blockinlining.c | 464 + lib/ruby-1.9.1-rc1/bootstraptest/pending.rb | 39 + lib/ruby-1.9.1-rc1/bootstraptest/runner.rb | 354 + lib/ruby-1.9.1-rc1/bootstraptest/test_attr.rb | 36 + lib/ruby-1.9.1-rc1/bootstraptest/test_autoload.rb | 61 + lib/ruby-1.9.1-rc1/bootstraptest/test_block.rb | 567 + lib/ruby-1.9.1-rc1/bootstraptest/test_class.rb | 132 + lib/ruby-1.9.1-rc1/bootstraptest/test_eval.rb | 301 + lib/ruby-1.9.1-rc1/bootstraptest/test_exception.rb | 404 + lib/ruby-1.9.1-rc1/bootstraptest/test_finalizer.rb | 8 + lib/ruby-1.9.1-rc1/bootstraptest/test_flip.rb | 1 + lib/ruby-1.9.1-rc1/bootstraptest/test_flow.rb | 491 + lib/ruby-1.9.1-rc1/bootstraptest/test_fork.rb | 10 + lib/ruby-1.9.1-rc1/bootstraptest/test_io.rb | 94 + lib/ruby-1.9.1-rc1/bootstraptest/test_jump.rb | 261 + lib/ruby-1.9.1-rc1/bootstraptest/test_literal.rb | 194 + lib/ruby-1.9.1-rc1/bootstraptest/test_load.rb | 15 + lib/ruby-1.9.1-rc1/bootstraptest/test_marshal.rb | 5 + lib/ruby-1.9.1-rc1/bootstraptest/test_massign.rb | 183 + lib/ruby-1.9.1-rc1/bootstraptest/test_method.rb | 1142 + .../bootstraptest/test_objectspace.rb | 33 + lib/ruby-1.9.1-rc1/bootstraptest/test_proc.rb | 428 + lib/ruby-1.9.1-rc1/bootstraptest/test_struct.rb | 5 + lib/ruby-1.9.1-rc1/bootstraptest/test_syntax.rb | 830 + lib/ruby-1.9.1-rc1/bootstraptest/test_thread.rb | 371 + lib/ruby-1.9.1-rc1/class.c | 998 + lib/ruby-1.9.1-rc1/common.mk | 758 + lib/ruby-1.9.1-rc1/compar.c | 213 + lib/ruby-1.9.1-rc1/compile.c | 5352 ++ lib/ruby-1.9.1-rc1/complex.c | 1521 + lib/ruby-1.9.1-rc1/config.guess | 1532 + lib/ruby-1.9.1-rc1/config.sub | 1658 + lib/ruby-1.9.1-rc1/configure | 23787 ++++++++ lib/ruby-1.9.1-rc1/configure.in | 2148 + lib/ruby-1.9.1-rc1/cont.c | 1022 + lib/ruby-1.9.1-rc1/cygwin/GNUmakefile.in | 88 + lib/ruby-1.9.1-rc1/debug.c | 159 + lib/ruby-1.9.1-rc1/debug.h | 36 + lib/ruby-1.9.1-rc1/defs/keywords | 51 + lib/ruby-1.9.1-rc1/defs/known_errors.def | 122 + lib/ruby-1.9.1-rc1/defs/lex.c.src | 51 + lib/ruby-1.9.1-rc1/defs/opt_insn_unif.def | 29 + lib/ruby-1.9.1-rc1/defs/opt_operand.def | 59 + lib/ruby-1.9.1-rc1/dir.c | 1910 + lib/ruby-1.9.1-rc1/dln.c | 1686 + lib/ruby-1.9.1-rc1/dln.h | 41 + lib/ruby-1.9.1-rc1/dmydln.c | 2 + lib/ruby-1.9.1-rc1/dmyencoding.c | 2 + lib/ruby-1.9.1-rc1/dmyext.c | 4 + lib/ruby-1.9.1-rc1/doc/ChangeLog-1.8.0 | 24345 ++++++++ lib/ruby-1.9.1-rc1/doc/ChangeLog-YARV | 6917 +++ lib/ruby-1.9.1-rc1/doc/NEWS-1.8.7 | 635 + lib/ruby-1.9.1-rc1/doc/forwardable.rd | 83 + lib/ruby-1.9.1-rc1/doc/forwardable.rd.ja | 80 + lib/ruby-1.9.1-rc1/doc/irb/irb-tools.rd.ja | 184 + lib/ruby-1.9.1-rc1/doc/irb/irb.rd | 391 + lib/ruby-1.9.1-rc1/doc/irb/irb.rd.ja | 412 + lib/ruby-1.9.1-rc1/doc/shell.rd | 347 + lib/ruby-1.9.1-rc1/doc/shell.rd.ja | 335 + lib/ruby-1.9.1-rc1/enc.mk | 390 + lib/ruby-1.9.1-rc1/enc/Makefile.in | 63 + lib/ruby-1.9.1-rc1/enc/ascii.c | 93 + lib/ruby-1.9.1-rc1/enc/big5.c | 216 + lib/ruby-1.9.1-rc1/enc/cp949.c | 219 + lib/ruby-1.9.1-rc1/enc/depend | 142 + lib/ruby-1.9.1-rc1/enc/emacs_mule.c | 340 + lib/ruby-1.9.1-rc1/enc/encdb.c | 25 + lib/ruby-1.9.1-rc1/enc/euc_jp.c | 388 + lib/ruby-1.9.1-rc1/enc/euc_kr.c | 192 + lib/ruby-1.9.1-rc1/enc/euc_tw.c | 234 + lib/ruby-1.9.1-rc1/enc/gb18030.c | 596 + lib/ruby-1.9.1-rc1/enc/gb2312.c | 13 + lib/ruby-1.9.1-rc1/enc/gbk.c | 222 + lib/ruby-1.9.1-rc1/enc/iso_2022_jp.h | 6 + lib/ruby-1.9.1-rc1/enc/iso_8859_1.c | 285 + lib/ruby-1.9.1-rc1/enc/iso_8859_10.c | 244 + lib/ruby-1.9.1-rc1/enc/iso_8859_11.c | 111 + lib/ruby-1.9.1-rc1/enc/iso_8859_13.c | 243 + lib/ruby-1.9.1-rc1/enc/iso_8859_14.c | 246 + lib/ruby-1.9.1-rc1/enc/iso_8859_15.c | 240 + lib/ruby-1.9.1-rc1/enc/iso_8859_16.c | 242 + lib/ruby-1.9.1-rc1/enc/iso_8859_2.c | 250 + lib/ruby-1.9.1-rc1/enc/iso_8859_3.c | 240 + lib/ruby-1.9.1-rc1/enc/iso_8859_4.c | 242 + lib/ruby-1.9.1-rc1/enc/iso_8859_5.c | 230 + lib/ruby-1.9.1-rc1/enc/iso_8859_6.c | 107 + lib/ruby-1.9.1-rc1/enc/iso_8859_7.c | 237 + lib/ruby-1.9.1-rc1/enc/iso_8859_8.c | 107 + lib/ruby-1.9.1-rc1/enc/iso_8859_9.c | 243 + lib/ruby-1.9.1-rc1/enc/koi8_r.c | 219 + lib/ruby-1.9.1-rc1/enc/koi8_u.c | 221 + lib/ruby-1.9.1-rc1/enc/make_encdb.rb | 77 + lib/ruby-1.9.1-rc1/enc/make_encmake.rb | 50 + lib/ruby-1.9.1-rc1/enc/prelude.rb | 6 + lib/ruby-1.9.1-rc1/enc/shift_jis.c | 399 + lib/ruby-1.9.1-rc1/enc/trans/CP/CP932UDA%UCS.src | 1912 + .../enc/trans/CP/CP932VDC@IBM%UCS.src | 420 + .../enc/trans/CP/CP932VDC@NEC_IBM%UCS.src | 406 + lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932UDA.src | 1912 + .../enc/trans/CP/UCS%CP932VDC@IBM.src | 420 + .../enc/trans/CP/UCS%CP932VDC@NEC_IBM.src | 406 + .../enc/trans/JIS/JISX0201-KANA%UCS.src | 127 + .../enc/trans/JIS/JISX0208@1990%UCS.src | 6972 +++ .../enc/trans/JIS/JISX0208@MS%UCS.src | 6893 +++ .../enc/trans/JIS/JISX0208UDC%UCS.src | 954 + .../enc/trans/JIS/JISX0208VDC@NEC%UCS.src | 97 + lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212%UCS.src | 6167 ++ .../enc/trans/JIS/JISX0212@MS%UCS.src | 6081 ++ .../enc/trans/JIS/JISX0212UDC%UCS.src | 954 + .../enc/trans/JIS/JISX0212VDC@IBM%UCS.src | 120 + .../enc/trans/JIS/UCS%JISX0201-KANA.src | 127 + .../enc/trans/JIS/UCS%JISX0208@1990.src | 6974 +++ .../enc/trans/JIS/UCS%JISX0208@MS.src | 6894 +++ .../enc/trans/JIS/UCS%JISX0208UDC.src | 955 + .../enc/trans/JIS/UCS%JISX0208VDC@NEC.src | 98 + lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212.src | 6170 ++ .../enc/trans/JIS/UCS%JISX0212@MS.src | 6082 ++ .../enc/trans/JIS/UCS%JISX0212UDC.src | 955 + .../enc/trans/JIS/UCS%JISX0212VDC@IBM.src | 121 + lib/ruby-1.9.1-rc1/enc/trans/cp850-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/cp852-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/cp855-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/cp949-tbl.rb | 8831 +++ lib/ruby-1.9.1-rc1/enc/trans/escape.c | 234 + lib/ruby-1.9.1-rc1/enc/trans/escape.trans | 94 + lib/ruby-1.9.1-rc1/enc/trans/euckr-tbl.rb | 8228 +++ lib/ruby-1.9.1-rc1/enc/trans/ibm437-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm775-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm852-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm855-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm857-tbl.rb | 127 + lib/ruby-1.9.1-rc1/enc/trans/ibm860-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm861-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm862-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm863-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm865-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm866-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/ibm869-tbl.rb | 121 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-1-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-10-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-11-tbl.rb | 90 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-13-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-14-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-15-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-2-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-3-tbl.rb | 91 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-4-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-5-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-6-tbl.rb | 53 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-7-tbl.rb | 95 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-8-tbl.rb | 62 + lib/ruby-1.9.1-rc1/enc/trans/iso-8859-9-tbl.rb | 98 + lib/ruby-1.9.1-rc1/enc/trans/iso2022.c | 383 + lib/ruby-1.9.1-rc1/enc/trans/iso2022.trans | 255 + lib/ruby-1.9.1-rc1/enc/trans/japanese.c | 218 + lib/ruby-1.9.1-rc1/enc/trans/japanese.trans | 98 + lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.c | 30915 ++++++++++ lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.trans | 46 + lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.c | 17231 ++++++ lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.trans | 34 + lib/ruby-1.9.1-rc1/enc/trans/koi8-r-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/koi8-u-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/korean.c | 28664 +++++++++ lib/ruby-1.9.1-rc1/enc/trans/korean.trans | 19 + lib/ruby-1.9.1-rc1/enc/trans/maccroatian-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/maccyrillic-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/macgreek-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/maciceland-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/macroman-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/macromania-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/macturkish-tbl.rb | 128 + lib/ruby-1.9.1-rc1/enc/trans/macukraine-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/make_transdb.rb | 57 + lib/ruby-1.9.1-rc1/enc/trans/newline.c | 185 + lib/ruby-1.9.1-rc1/enc/trans/newline.trans | 131 + lib/ruby-1.9.1-rc1/enc/trans/single_byte.c | 10186 ++++ lib/ruby-1.9.1-rc1/enc/trans/single_byte.trans | 91 + lib/ruby-1.9.1-rc1/enc/trans/tis-620-tbl.rb | 89 + lib/ruby-1.9.1-rc1/enc/trans/transdb.c | 18 + lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.c | 637 + lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.trans | 369 + lib/ruby-1.9.1-rc1/enc/trans/windows-1250-tbl.rb | 125 + lib/ruby-1.9.1-rc1/enc/trans/windows-1251-tbl.rb | 129 + lib/ruby-1.9.1-rc1/enc/trans/windows-1252-tbl.rb | 125 + lib/ruby-1.9.1-rc1/enc/trans/windows-1253-tbl.rb | 113 + lib/ruby-1.9.1-rc1/enc/trans/windows-1254-tbl.rb | 123 + lib/ruby-1.9.1-rc1/enc/trans/windows-1255-tbl.rb | 141 + lib/ruby-1.9.1-rc1/enc/trans/windows-1256-tbl.rb | 130 + lib/ruby-1.9.1-rc1/enc/trans/windows-1257-tbl.rb | 118 + lib/ruby-1.9.1-rc1/enc/trans/windows-874-tbl.rb | 99 + lib/ruby-1.9.1-rc1/enc/unicode.c | 11359 ++++ lib/ruby-1.9.1-rc1/enc/us_ascii.c | 31 + lib/ruby-1.9.1-rc1/enc/utf_16be.c | 258 + lib/ruby-1.9.1-rc1/enc/utf_16le.c | 249 + lib/ruby-1.9.1-rc1/enc/utf_32be.c | 195 + lib/ruby-1.9.1-rc1/enc/utf_32le.c | 194 + lib/ruby-1.9.1-rc1/enc/utf_7.h | 5 + lib/ruby-1.9.1-rc1/enc/utf_8.c | 455 + lib/ruby-1.9.1-rc1/enc/windows_1251.c | 208 + lib/ruby-1.9.1-rc1/encdb.h | 147 + lib/ruby-1.9.1-rc1/encoding.c | 1414 + lib/ruby-1.9.1-rc1/enum.c | 1858 + lib/ruby-1.9.1-rc1/enumerator.c | 810 + lib/ruby-1.9.1-rc1/error.c | 1218 + lib/ruby-1.9.1-rc1/eval.c | 1171 + lib/ruby-1.9.1-rc1/eval_error.c | 272 + lib/ruby-1.9.1-rc1/eval_intern.h | 209 + lib/ruby-1.9.1-rc1/eval_jump.c | 151 + lib/ruby-1.9.1-rc1/ext/.cvsignore | 2 + lib/ruby-1.9.1-rc1/ext/.document | 16 + lib/ruby-1.9.1-rc1/ext/Setup | 32 + lib/ruby-1.9.1-rc1/ext/Setup.atheos | 33 + lib/ruby-1.9.1-rc1/ext/Setup.emx | 33 + lib/ruby-1.9.1-rc1/ext/Setup.nt | 33 + lib/ruby-1.9.1-rc1/ext/bigdecimal/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/bigdecimal/README | 60 + lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.c | 4803 ++ lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.def | 2 + lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.h | 220 + .../ext/bigdecimal/bigdecimal_en.html | 796 + .../ext/bigdecimal/bigdecimal_ja.html | 799 + lib/ruby-1.9.1-rc1/ext/bigdecimal/depend | 1 + lib/ruby-1.9.1-rc1/ext/bigdecimal/extconf.rb | 10 + .../ext/bigdecimal/lib/bigdecimal/jacobian.rb | 85 + .../ext/bigdecimal/lib/bigdecimal/ludcmp.rb | 84 + .../ext/bigdecimal/lib/bigdecimal/math.rb | 235 + .../ext/bigdecimal/lib/bigdecimal/newton.rb | 77 + .../ext/bigdecimal/lib/bigdecimal/util.rb | 53 + lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/linear.rb | 71 + .../ext/bigdecimal/sample/nlsolve.rb | 38 + lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/pi.rb | 20 + lib/ruby-1.9.1-rc1/ext/continuation/continuation.c | 8 + lib/ruby-1.9.1-rc1/ext/continuation/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/coverage/coverage.c | 101 + lib/ruby-1.9.1-rc1/ext/coverage/extconf.rb | 2 + lib/ruby-1.9.1-rc1/ext/curses/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/curses/curses.c | 2064 + lib/ruby-1.9.1-rc1/ext/curses/depend | 1 + lib/ruby-1.9.1-rc1/ext/curses/extconf.rb | 31 + lib/ruby-1.9.1-rc1/ext/curses/hello.rb | 30 + lib/ruby-1.9.1-rc1/ext/curses/mouse.rb | 53 + lib/ruby-1.9.1-rc1/ext/curses/rain.rb | 76 + lib/ruby-1.9.1-rc1/ext/curses/view.rb | 91 + lib/ruby-1.9.1-rc1/ext/curses/view2.rb | 115 + lib/ruby-1.9.1-rc1/ext/dbm/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/dbm/dbm.c | 745 + lib/ruby-1.9.1-rc1/ext/dbm/depend | 1 + lib/ruby-1.9.1-rc1/ext/dbm/extconf.rb | 53 + lib/ruby-1.9.1-rc1/ext/digest/.cvsignore | 4 + .../ext/digest/bubblebabble/.cvsignore | 4 + .../ext/digest/bubblebabble/bubblebabble.c | 142 + lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/depend | 3 + .../ext/digest/bubblebabble/extconf.rb | 6 + lib/ruby-1.9.1-rc1/ext/digest/defs.h | 19 + lib/ruby-1.9.1-rc1/ext/digest/depend | 2 + lib/ruby-1.9.1-rc1/ext/digest/digest.c | 642 + lib/ruby-1.9.1-rc1/ext/digest/digest.h | 32 + lib/ruby-1.9.1-rc1/ext/digest/extconf.rb | 10 + lib/ruby-1.9.1-rc1/ext/digest/lib/digest.rb | 50 + lib/ruby-1.9.1-rc1/ext/digest/lib/digest/hmac.rb | 274 + lib/ruby-1.9.1-rc1/ext/digest/md5/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/digest/md5/depend | 6 + lib/ruby-1.9.1-rc1/ext/digest/md5/extconf.rb | 29 + lib/ruby-1.9.1-rc1/ext/digest/md5/md5.c | 422 + lib/ruby-1.9.1-rc1/ext/digest/md5/md5.h | 80 + lib/ruby-1.9.1-rc1/ext/digest/md5/md5init.c | 40 + lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.c | 9 + lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.h | 13 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/depend | 6 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/extconf.rb | 28 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.c | 457 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.h | 56 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160init.c | 40 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.c | 8 + lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.h | 19 + lib/ruby-1.9.1-rc1/ext/digest/sha1/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/digest/sha1/depend | 6 + lib/ruby-1.9.1-rc1/ext/digest/sha1/extconf.rb | 28 + lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.c | 269 + lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.h | 39 + lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1init.c | 40 + lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.c | 10 + lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.h | 20 + lib/ruby-1.9.1-rc1/ext/digest/sha2/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/digest/sha2/depend | 5 + lib/ruby-1.9.1-rc1/ext/digest/sha2/extconf.rb | 24 + lib/ruby-1.9.1-rc1/ext/digest/sha2/lib/sha2.rb | 73 + lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.c | 919 + lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.h | 109 + lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2init.c | 52 + lib/ruby-1.9.1-rc1/ext/digest/test.sh | 30 + lib/ruby-1.9.1-rc1/ext/dl/.cvsignore | 10 + lib/ruby-1.9.1-rc1/ext/dl/cfunc.c | 516 + lib/ruby-1.9.1-rc1/ext/dl/cptr.c | 482 + lib/ruby-1.9.1-rc1/ext/dl/depend | 24 + lib/ruby-1.9.1-rc1/ext/dl/dl.c | 137 + lib/ruby-1.9.1-rc1/ext/dl/dl.h | 226 + lib/ruby-1.9.1-rc1/ext/dl/extconf.rb | 37 + lib/ruby-1.9.1-rc1/ext/dl/handle.c | 227 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/callback.rb | 69 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/cparser.rb | 109 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/func.rb | 141 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/import.rb | 215 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/pack.rb | 173 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/stack.rb | 146 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/struct.rb | 213 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/types.rb | 40 + lib/ruby-1.9.1-rc1/ext/dl/lib/dl/value.rb | 108 + lib/ruby-1.9.1-rc1/ext/dl/mkcallback.rb | 216 + lib/ruby-1.9.1-rc1/ext/dl/test/test_all.rb | 11 + lib/ruby-1.9.1-rc1/ext/dl/test/test_base.rb | 70 + lib/ruby-1.9.1-rc1/ext/dl/test/test_dl2.rb | 111 + lib/ruby-1.9.1-rc1/ext/dl/test/test_func.rb | 62 + lib/ruby-1.9.1-rc1/ext/dl/test/test_import.rb | 154 + lib/ruby-1.9.1-rc1/ext/dl/test/test_win32.rb | 53 + lib/ruby-1.9.1-rc1/ext/dl/win32/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/dl/win32/lib/Win32API.rb | 28 + .../ext/dl/win32/lib/win32/registry.rb | 832 + .../ext/dl/win32/lib/win32/resolv.rb | 370 + lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/sspi.rb | 330 + lib/ruby-1.9.1-rc1/ext/etc/.cvsignore | 3 + lib/ruby-1.9.1-rc1/ext/etc/depend | 1 + lib/ruby-1.9.1-rc1/ext/etc/etc.c | 551 + lib/ruby-1.9.1-rc1/ext/etc/etc.txt | 72 + lib/ruby-1.9.1-rc1/ext/etc/etc.txt.ja | 72 + lib/ruby-1.9.1-rc1/ext/etc/extconf.rb | 28 + lib/ruby-1.9.1-rc1/ext/extmk.rb | 563 + lib/ruby-1.9.1-rc1/ext/fcntl/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/fcntl/depend | 1 + lib/ruby-1.9.1-rc1/ext/fcntl/extconf.rb | 2 + lib/ruby-1.9.1-rc1/ext/fcntl/fcntl.c | 187 + lib/ruby-1.9.1-rc1/ext/fiber/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/fiber/fiber.c | 8 + lib/ruby-1.9.1-rc1/ext/gdbm/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/gdbm/README | 1 + lib/ruby-1.9.1-rc1/ext/gdbm/depend | 1 + lib/ruby-1.9.1-rc1/ext/gdbm/extconf.rb | 7 + lib/ruby-1.9.1-rc1/ext/gdbm/gdbm.c | 1255 + lib/ruby-1.9.1-rc1/ext/iconv/.cvsignore | 6 + lib/ruby-1.9.1-rc1/ext/iconv/charset_alias.rb | 103 + lib/ruby-1.9.1-rc1/ext/iconv/depend | 2 + lib/ruby-1.9.1-rc1/ext/iconv/extconf.rb | 53 + lib/ruby-1.9.1-rc1/ext/iconv/iconv.c | 1203 + lib/ruby-1.9.1-rc1/ext/iconv/mkwrapper.rb | 53 + lib/ruby-1.9.1-rc1/ext/io/wait/.cvsignore | 3 + lib/ruby-1.9.1-rc1/ext/io/wait/extconf.rb | 18 + lib/ruby-1.9.1-rc1/ext/io/wait/lib/nonblock.rb | 23 + lib/ruby-1.9.1-rc1/ext/io/wait/wait.c | 141 + .../ext/json/ext/generator/extconf.rb | 9 + .../ext/json/ext/generator/generator.c | 874 + .../ext/json/ext/generator/unicode.c | 182 + .../ext/json/ext/generator/unicode.h | 53 + lib/ruby-1.9.1-rc1/ext/json/ext/parser/extconf.rb | 9 + lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.c | 1758 + lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.rl | 636 + lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.c | 154 + lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.h | 58 + lib/ruby-1.9.1-rc1/ext/json/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/json/lib/json.rb | 235 + lib/ruby-1.9.1-rc1/ext/json/lib/json/Array.xpm | 21 + .../ext/json/lib/json/FalseClass.xpm | 21 + lib/ruby-1.9.1-rc1/ext/json/lib/json/Hash.xpm | 21 + lib/ruby-1.9.1-rc1/ext/json/lib/json/Key.xpm | 73 + lib/ruby-1.9.1-rc1/ext/json/lib/json/NilClass.xpm | 21 + lib/ruby-1.9.1-rc1/ext/json/lib/json/Numeric.xpm | 28 + lib/ruby-1.9.1-rc1/ext/json/lib/json/String.xpm | 96 + lib/ruby-1.9.1-rc1/ext/json/lib/json/TrueClass.xpm | 21 + lib/ruby-1.9.1-rc1/ext/json/lib/json/add/core.rb | 135 + lib/ruby-1.9.1-rc1/ext/json/lib/json/add/rails.rb | 58 + lib/ruby-1.9.1-rc1/ext/json/lib/json/common.rb | 354 + lib/ruby-1.9.1-rc1/ext/json/lib/json/editor.rb | 1362 + lib/ruby-1.9.1-rc1/ext/json/lib/json/ext.rb | 13 + lib/ruby-1.9.1-rc1/ext/json/lib/json/json.xpm | 1499 + lib/ruby-1.9.1-rc1/ext/json/lib/json/pure.rb | 22 + .../ext/json/lib/json/pure/generator.rb | 394 + .../ext/json/lib/json/pure/parser.rb | 269 + lib/ruby-1.9.1-rc1/ext/json/lib/json/version.rb | 9 + lib/ruby-1.9.1-rc1/ext/mathn/complex/complex.c | 7 + lib/ruby-1.9.1-rc1/ext/mathn/complex/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/mathn/rational/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/mathn/rational/rational.c | 7 + lib/ruby-1.9.1-rc1/ext/nkf/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/nkf/depend | 1 + lib/ruby-1.9.1-rc1/ext/nkf/extconf.rb | 2 + lib/ruby-1.9.1-rc1/ext/nkf/lib/kconv.rb | 282 + lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/config.h | 51 + lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.c | 6570 ++ lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.h | 192 + lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.c | 8754 +++ lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.h | 61 + lib/ruby-1.9.1-rc1/ext/nkf/nkf.c | 502 + lib/ruby-1.9.1-rc1/ext/openssl/.cvsignore | 5 + lib/ruby-1.9.1-rc1/ext/openssl/extconf.rb | 126 + lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl.rb | 24 + lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/bn.rb | 35 + .../ext/openssl/lib/openssl/buffering.rb | 242 + .../ext/openssl/lib/openssl/cipher.rb | 65 + .../ext/openssl/lib/openssl/digest.rb | 61 + lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/ssl.rb | 178 + lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/x509.rb | 155 + lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.c | 343 + lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.h | 188 + lib/ruby-1.9.1-rc1/ext/openssl/ossl.c | 496 + lib/ruby-1.9.1-rc1/ext/openssl/ossl.h | 221 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.c | 1166 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.h | 59 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.c | 86 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.h | 21 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.c | 852 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.h | 25 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.c | 544 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.h | 22 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.c | 467 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.h | 22 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.c | 258 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.h | 22 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.c | 393 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.h | 20 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.c | 270 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.h | 19 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.c | 257 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.h | 21 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.c | 773 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.h | 24 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.c | 212 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.h | 15 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.c | 98 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.h | 6 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.c | 1021 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.h | 22 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.c | 240 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.h | 141 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dh.c | 532 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dsa.c | 485 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_ec.c | 1593 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_rsa.c | 593 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.c | 202 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.h | 20 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.c | 1475 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.h | 36 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl_session.c | 296 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_version.h | 16 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.c | 104 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.h | 114 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509attr.c | 274 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509cert.c | 766 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509crl.c | 537 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509ext.c | 459 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509name.c | 375 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509req.c | 468 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509revoked.c | 229 + lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509store.c | 623 + lib/ruby-1.9.1-rc1/ext/openssl/ruby_missing.h | 41 + lib/ruby-1.9.1-rc1/ext/pty/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/pty/README | 65 + lib/ruby-1.9.1-rc1/ext/pty/README.expect | 22 + lib/ruby-1.9.1-rc1/ext/pty/README.expect.ja | 21 + lib/ruby-1.9.1-rc1/ext/pty/README.ja | 89 + lib/ruby-1.9.1-rc1/ext/pty/depend | 1 + lib/ruby-1.9.1-rc1/ext/pty/expect_sample.rb | 48 + lib/ruby-1.9.1-rc1/ext/pty/extconf.rb | 16 + lib/ruby-1.9.1-rc1/ext/pty/lib/expect.rb | 36 + lib/ruby-1.9.1-rc1/ext/pty/pty.c | 499 + lib/ruby-1.9.1-rc1/ext/pty/script.rb | 37 + lib/ruby-1.9.1-rc1/ext/pty/shl.rb | 92 + lib/ruby-1.9.1-rc1/ext/purelib.rb | 10 + lib/ruby-1.9.1-rc1/ext/racc/cparse/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/racc/cparse/README | 10 + lib/ruby-1.9.1-rc1/ext/racc/cparse/cparse.c | 824 + lib/ruby-1.9.1-rc1/ext/racc/cparse/depend | 1 + lib/ruby-1.9.1-rc1/ext/racc/cparse/extconf.rb | 5 + lib/ruby-1.9.1-rc1/ext/readline/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/readline/README | 10 + lib/ruby-1.9.1-rc1/ext/readline/README.ja | 422 + lib/ruby-1.9.1-rc1/ext/readline/depend | 1 + lib/ruby-1.9.1-rc1/ext/readline/extconf.rb | 71 + lib/ruby-1.9.1-rc1/ext/readline/readline.c | 1309 + lib/ruby-1.9.1-rc1/ext/ripper/.cvsignore | 8 + lib/ruby-1.9.1-rc1/ext/ripper/README | 30 + lib/ruby-1.9.1-rc1/ext/ripper/depend | 39 + lib/ruby-1.9.1-rc1/ext/ripper/eventids1.c | 502 + lib/ruby-1.9.1-rc1/ext/ripper/eventids2.c | 278 + lib/ruby-1.9.1-rc1/ext/ripper/eventids2table.c | 99 + lib/ruby-1.9.1-rc1/ext/ripper/extconf.rb | 22 + lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper.rb | 4 + lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/core.rb | 70 + lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/filter.rb | 70 + lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/lexer.rb | 179 + lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/sexp.rb | 99 + lib/ruby-1.9.1-rc1/ext/ripper/ripper.c | 15624 +++++ lib/ruby-1.9.1-rc1/ext/ripper/ripper.y | 10308 ++++ .../ext/ripper/tools/generate-param-macros.rb | 14 + lib/ruby-1.9.1-rc1/ext/ripper/tools/generate.rb | 152 + lib/ruby-1.9.1-rc1/ext/ripper/tools/preproc.rb | 91 + lib/ruby-1.9.1-rc1/ext/ripper/tools/strip.rb | 12 + lib/ruby-1.9.1-rc1/ext/ripper/y.output | 28045 +++++++++ lib/ruby-1.9.1-rc1/ext/sdbm/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/sdbm/_sdbm.c | 922 + lib/ruby-1.9.1-rc1/ext/sdbm/depend | 2 + lib/ruby-1.9.1-rc1/ext/sdbm/extconf.rb | 3 + lib/ruby-1.9.1-rc1/ext/sdbm/init.c | 712 + lib/ruby-1.9.1-rc1/ext/sdbm/sdbm.h | 84 + lib/ruby-1.9.1-rc1/ext/socket/.cvsignore | 5 + lib/ruby-1.9.1-rc1/ext/socket/addrinfo.h | 181 + lib/ruby-1.9.1-rc1/ext/socket/depend | 9 + lib/ruby-1.9.1-rc1/ext/socket/extconf.rb | 285 + lib/ruby-1.9.1-rc1/ext/socket/getaddrinfo.c | 675 + lib/ruby-1.9.1-rc1/ext/socket/getnameinfo.c | 257 + lib/ruby-1.9.1-rc1/ext/socket/mkconstants.rb | 305 + lib/ruby-1.9.1-rc1/ext/socket/socket.c | 3705 ++ lib/ruby-1.9.1-rc1/ext/socket/sockport.h | 75 + lib/ruby-1.9.1-rc1/ext/stringio/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/stringio/README | 18 + lib/ruby-1.9.1-rc1/ext/stringio/depend | 3 + lib/ruby-1.9.1-rc1/ext/stringio/extconf.rb | 2 + lib/ruby-1.9.1-rc1/ext/stringio/stringio.c | 1368 + lib/ruby-1.9.1-rc1/ext/strscan/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/strscan/depend | 2 + lib/ruby-1.9.1-rc1/ext/strscan/extconf.rb | 2 + lib/ruby-1.9.1-rc1/ext/strscan/strscan.c | 1330 + lib/ruby-1.9.1-rc1/ext/syck/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/syck/bytecode.c | 1165 + lib/ruby-1.9.1-rc1/ext/syck/depend | 12 + lib/ruby-1.9.1-rc1/ext/syck/emitter.c | 1247 + lib/ruby-1.9.1-rc1/ext/syck/extconf.rb | 5 + lib/ruby-1.9.1-rc1/ext/syck/gram.c | 1894 + lib/ruby-1.9.1-rc1/ext/syck/gram.h | 79 + lib/ruby-1.9.1-rc1/ext/syck/handler.c | 173 + lib/ruby-1.9.1-rc1/ext/syck/implicit.c | 2990 + lib/ruby-1.9.1-rc1/ext/syck/node.c | 407 + lib/ruby-1.9.1-rc1/ext/syck/rubyext.c | 2315 + lib/ruby-1.9.1-rc1/ext/syck/syck.c | 524 + lib/ruby-1.9.1-rc1/ext/syck/syck.h | 454 + lib/ruby-1.9.1-rc1/ext/syck/token.c | 2724 + lib/ruby-1.9.1-rc1/ext/syck/yaml2byte.c | 259 + lib/ruby-1.9.1-rc1/ext/syck/yamlbyte.h | 170 + lib/ruby-1.9.1-rc1/ext/syslog/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/syslog/depend | 2 + lib/ruby-1.9.1-rc1/ext/syslog/extconf.rb | 10 + lib/ruby-1.9.1-rc1/ext/syslog/syslog.c | 393 + lib/ruby-1.9.1-rc1/ext/syslog/syslog.txt | 124 + lib/ruby-1.9.1-rc1/ext/syslog/test.rb | 164 + lib/ruby-1.9.1-rc1/ext/tk/.cvsignore | 3 + lib/ruby-1.9.1-rc1/ext/tk/ChangeLog.tkextlib | 935 + lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eng | 469 + lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eucj | 579 + lib/ruby-1.9.1-rc1/ext/tk/README.1st | 19 + lib/ruby-1.9.1-rc1/ext/tk/README.ActiveTcl | 49 + lib/ruby-1.9.1-rc1/ext/tk/README.fork | 34 + lib/ruby-1.9.1-rc1/ext/tk/README.macosx-aqua | 67 + lib/ruby-1.9.1-rc1/ext/tk/README.tcltklib | 85 + lib/ruby-1.9.1-rc1/ext/tk/depend | 2 + lib/ruby-1.9.1-rc1/ext/tk/extconf.rb | 440 + lib/ruby-1.9.1-rc1/ext/tk/lib/README | 30 + lib/ruby-1.9.1-rc1/ext/tk/lib/multi-tk.rb | 3491 ++ lib/ruby-1.9.1-rc1/ext/tk/lib/remote-tk.rb | 530 + lib/ruby-1.9.1-rc1/ext/tk/lib/tcltk.rb | 367 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk.rb | 5569 ++ lib/ruby-1.9.1-rc1/ext/tk/lib/tk/after.rb | 6 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/autoload.rb | 414 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bgerror.rb | 29 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bindtag.rb | 138 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/button.rb | 30 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/canvas.rb | 789 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/canvastag.rb | 434 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/checkbutton.rb | 30 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/clipboard.rb | 75 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/clock.rb | 71 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/composite.rb | 458 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/console.rb | 52 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/dialog.rb | 326 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/encodedstr.rb | 187 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/entry.rb | 119 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/event.rb | 542 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/font.rb | 2344 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/frame.rb | 131 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/grid.rb | 265 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/image.rb | 275 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemconfig.rb | 1215 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemfont.rb | 327 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/kinput.rb | 71 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/label.rb | 21 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/labelframe.rb | 29 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/listbox.rb | 282 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/macpkg.rb | 78 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menu.rb | 681 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menubar.rb | 131 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menuspec.rb | 275 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/message.rb | 22 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/mngfocus.rb | 33 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/msgcat.rb | 296 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/namespace.rb | 551 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optiondb.rb | 377 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optionobj.rb | 212 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/pack.rb | 107 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/package.rb | 143 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/palette.rb | 55 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/panedwindow.rb | 258 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/place.rb | 128 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/radiobutton.rb | 71 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/root.rb | 95 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scale.rb | 111 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollable.rb | 82 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbar.rb | 177 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbox.rb | 39 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/selection.rb | 86 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/spinbox.rb | 119 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/tagfont.rb | 43 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/text.rb | 1596 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textimage.rb | 88 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textmark.rb | 204 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/texttag.rb | 318 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textwindow.rb | 154 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/timer.rb | 669 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/toplevel.rb | 262 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/ttk_selector.rb | 76 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/txtwin_abst.rb | 39 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/validation.rb | 397 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/variable.rb | 1765 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/virtevent.rb | 139 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winfo.rb | 392 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winpkg.rb | 153 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/wm.rb | 552 + lib/ruby-1.9.1-rc1/ext/tk/lib/tk/xim.rb | 122 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkafter.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkbgerror.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkcanvas.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkclass.rb | 47 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkconsole.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkdialog.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkentry.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS.rb | 13 + .../ext/tk/lib/tkextlib/ICONS/icons.rb | 129 + .../ext/tk/lib/tkextlib/ICONS/setup.rb | 8 + .../ext/tk/lib/tkextlib/SUPPORT_STATUS | 196 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt.rb | 187 + .../ext/tk/lib/tkextlib/blt/barchart.rb | 79 + .../ext/tk/lib/tkextlib/blt/bitmap.rb | 112 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/busy.rb | 82 + .../ext/tk/lib/tkextlib/blt/component.rb | 2145 + .../ext/tk/lib/tkextlib/blt/container.rb | 28 + .../ext/tk/lib/tkextlib/blt/cutbuffer.rb | 23 + .../ext/tk/lib/tkextlib/blt/dragdrop.rb | 268 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/eps.rb | 32 + .../ext/tk/lib/tkextlib/blt/graph.rb | 67 + .../ext/tk/lib/tkextlib/blt/htext.rb | 111 + .../ext/tk/lib/tkextlib/blt/setup.rb | 8 + .../ext/tk/lib/tkextlib/blt/spline.rb | 23 + .../ext/tk/lib/tkextlib/blt/stripchart.rb | 74 + .../ext/tk/lib/tkextlib/blt/table.rb | 399 + .../ext/tk/lib/tkextlib/blt/tabnotebook.rb | 110 + .../ext/tk/lib/tkextlib/blt/tabset.rb | 500 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/ted.rb | 65 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile.rb | 21 + .../ext/tk/lib/tkextlib/blt/tile/button.rb | 16 + .../ext/tk/lib/tkextlib/blt/tile/checkbutton.rb | 17 + .../ext/tk/lib/tkextlib/blt/tile/frame.rb | 16 + .../ext/tk/lib/tkextlib/blt/tile/label.rb | 16 + .../ext/tk/lib/tkextlib/blt/tile/radiobutton.rb | 17 + .../ext/tk/lib/tkextlib/blt/tile/scrollbar.rb | 16 + .../ext/tk/lib/tkextlib/blt/tile/toplevel.rb | 16 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tree.rb | 1058 + .../ext/tk/lib/tkextlib/blt/treeview.rb | 1272 + .../ext/tk/lib/tkextlib/blt/unix_dnd.rb | 135 + .../ext/tk/lib/tkextlib/blt/vector.rb | 256 + .../ext/tk/lib/tkextlib/blt/watch.rb | 175 + .../ext/tk/lib/tkextlib/blt/win_printer.rb | 61 + .../ext/tk/lib/tkextlib/blt/winop.rb | 107 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget.rb | 151 + .../ext/tk/lib/tkextlib/bwidget/arrowbutton.rb | 21 + .../ext/tk/lib/tkextlib/bwidget/bitmap.rb | 21 + .../ext/tk/lib/tkextlib/bwidget/button.rb | 31 + .../ext/tk/lib/tkextlib/bwidget/buttonbox.rb | 90 + .../ext/tk/lib/tkextlib/bwidget/combobox.rb | 51 + .../ext/tk/lib/tkextlib/bwidget/dialog.rb | 182 + .../ext/tk/lib/tkextlib/bwidget/dragsite.rb | 31 + .../ext/tk/lib/tkextlib/bwidget/dropsite.rb | 39 + .../ext/tk/lib/tkextlib/bwidget/dynamichelp.rb | 63 + .../ext/tk/lib/tkextlib/bwidget/entry.rb | 43 + .../ext/tk/lib/tkextlib/bwidget/label.rb | 41 + .../ext/tk/lib/tkextlib/bwidget/labelentry.rb | 80 + .../ext/tk/lib/tkextlib/bwidget/labelframe.rb | 52 + .../ext/tk/lib/tkextlib/bwidget/listbox.rb | 358 + .../ext/tk/lib/tkextlib/bwidget/mainframe.rb | 128 + .../ext/tk/lib/tkextlib/bwidget/messagedlg.rb | 192 + .../ext/tk/lib/tkextlib/bwidget/notebook.rb | 166 + .../ext/tk/lib/tkextlib/bwidget/pagesmanager.rb | 73 + .../ext/tk/lib/tkextlib/bwidget/panedwindow.rb | 37 + .../ext/tk/lib/tkextlib/bwidget/panelframe.rb | 57 + .../ext/tk/lib/tkextlib/bwidget/passwddlg.rb | 44 + .../ext/tk/lib/tkextlib/bwidget/progressbar.rb | 20 + .../ext/tk/lib/tkextlib/bwidget/progressdlg.rb | 58 + .../ext/tk/lib/tkextlib/bwidget/scrollableframe.rb | 40 + .../ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb | 38 + .../ext/tk/lib/tkextlib/bwidget/scrollview.rb | 25 + .../ext/tk/lib/tkextlib/bwidget/selectcolor.rb | 73 + .../ext/tk/lib/tkextlib/bwidget/selectfont.rb | 86 + .../ext/tk/lib/tkextlib/bwidget/separator.rb | 20 + .../ext/tk/lib/tkextlib/bwidget/setup.rb | 8 + .../ext/tk/lib/tkextlib/bwidget/spinbox.rb | 98 + .../ext/tk/lib/tkextlib/bwidget/statusbar.rb | 52 + .../ext/tk/lib/tkextlib/bwidget/titleframe.rb | 33 + .../ext/tk/lib/tkextlib/bwidget/tree.rb | 453 + .../ext/tk/lib/tkextlib/bwidget/widget.rb | 129 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl.rb | 13 + .../ext/tk/lib/tkextlib/itcl/incr_tcl.rb | 178 + .../ext/tk/lib/tkextlib/itcl/setup.rb | 13 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk.rb | 13 + .../ext/tk/lib/tkextlib/itk/incr_tk.rb | 446 + .../ext/tk/lib/tkextlib/itk/setup.rb | 13 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets.rb | 94 + .../ext/tk/lib/tkextlib/iwidgets/buttonbox.rb | 120 + .../ext/tk/lib/tkextlib/iwidgets/calendar.rb | 125 + .../ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb | 53 + .../tk/lib/tkextlib/iwidgets/canvasprintdialog.rb | 38 + .../ext/tk/lib/tkextlib/iwidgets/checkbox.rb | 129 + .../ext/tk/lib/tkextlib/iwidgets/combobox.rb | 104 + .../ext/tk/lib/tkextlib/iwidgets/dateentry.rb | 20 + .../ext/tk/lib/tkextlib/iwidgets/datefield.rb | 58 + .../ext/tk/lib/tkextlib/iwidgets/dialog.rb | 20 + .../ext/tk/lib/tkextlib/iwidgets/dialogshell.rb | 120 + .../tk/lib/tkextlib/iwidgets/disjointlistbox.rb | 50 + .../ext/tk/lib/tkextlib/iwidgets/entryfield.rb | 185 + .../ext/tk/lib/tkextlib/iwidgets/extbutton.rb | 40 + .../lib/tkextlib/iwidgets/extfileselectionbox.rb | 46 + .../tkextlib/iwidgets/extfileselectiondialog.rb | 33 + .../ext/tk/lib/tkextlib/iwidgets/feedback.rb | 35 + .../tk/lib/tkextlib/iwidgets/fileselectionbox.rb | 46 + .../lib/tkextlib/iwidgets/fileselectiondialog.rb | 33 + .../ext/tk/lib/tkextlib/iwidgets/finddialog.rb | 42 + .../ext/tk/lib/tkextlib/iwidgets/hierarchy.rb | 365 + .../ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb | 50 + .../ext/tk/lib/tkextlib/iwidgets/labeledframe.rb | 39 + .../ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb | 45 + .../ext/tk/lib/tkextlib/iwidgets/mainwindow.rb | 67 + .../ext/tk/lib/tkextlib/iwidgets/menubar.rb | 211 + .../ext/tk/lib/tkextlib/iwidgets/messagebox.rb | 92 + .../ext/tk/lib/tkextlib/iwidgets/messagedialog.rb | 20 + .../ext/tk/lib/tkextlib/iwidgets/notebook.rb | 174 + .../ext/tk/lib/tkextlib/iwidgets/optionmenu.rb | 92 + .../ext/tk/lib/tkextlib/iwidgets/panedwindow.rb | 133 + .../ext/tk/lib/tkextlib/iwidgets/promptdialog.rb | 131 + .../ext/tk/lib/tkextlib/iwidgets/pushbutton.rb | 35 + .../ext/tk/lib/tkextlib/iwidgets/radiobox.rb | 120 + .../ext/tk/lib/tkextlib/iwidgets/scopedobject.rb | 24 + .../ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb | 353 + .../ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb | 59 + .../ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb | 58 + .../tk/lib/tkextlib/iwidgets/scrolledlistbox.rb | 207 + .../ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb | 564 + .../ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb | 20 + .../ext/tk/lib/tkextlib/iwidgets/selectionbox.rb | 102 + .../tk/lib/tkextlib/iwidgets/selectiondialog.rb | 92 + .../ext/tk/lib/tkextlib/iwidgets/setup.rb | 8 + .../ext/tk/lib/tkextlib/iwidgets/shell.rb | 38 + .../ext/tk/lib/tkextlib/iwidgets/spindate.rb | 48 + .../ext/tk/lib/tkextlib/iwidgets/spinint.rb | 30 + .../ext/tk/lib/tkextlib/iwidgets/spinner.rb | 169 + .../ext/tk/lib/tkextlib/iwidgets/spintime.rb | 48 + .../ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb | 180 + .../ext/tk/lib/tkextlib/iwidgets/tabset.rb | 144 + .../ext/tk/lib/tkextlib/iwidgets/timeentry.rb | 25 + .../ext/tk/lib/tkextlib/iwidgets/timefield.rb | 58 + .../ext/tk/lib/tkextlib/iwidgets/toolbar.rb | 112 + .../ext/tk/lib/tkextlib/iwidgets/watch.rb | 56 + .../ext/tk/lib/tkextlib/pkg_checker.rb | 184 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/setup.rb | 8 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib.rb | 90 + .../ext/tk/lib/tkextlib/tcllib/README | 135 + .../ext/tk/lib/tkextlib/tcllib/autoscroll.rb | 158 + .../ext/tk/lib/tkextlib/tcllib/ctext.rb | 160 + .../ext/tk/lib/tkextlib/tcllib/cursor.rb | 97 + .../ext/tk/lib/tkextlib/tcllib/datefield.rb | 57 + .../ext/tk/lib/tkextlib/tcllib/dialog.rb | 84 + .../ext/tk/lib/tkextlib/tcllib/getstring.rb | 134 + .../ext/tk/lib/tkextlib/tcllib/history.rb | 73 + .../ext/tk/lib/tkextlib/tcllib/ico.rb | 116 + .../ext/tk/lib/tkextlib/tcllib/ip_entry.rb | 66 + .../ext/tk/lib/tkextlib/tcllib/panelframe.rb | 72 + .../ext/tk/lib/tkextlib/tcllib/plotchart.rb | 886 + .../ext/tk/lib/tkextlib/tcllib/ruler.rb | 65 + .../ext/tk/lib/tkextlib/tcllib/screenruler.rb | 68 + .../ext/tk/lib/tkextlib/tcllib/scrollwin.rb | 61 + .../ext/tk/lib/tkextlib/tcllib/setup.rb | 8 + .../ext/tk/lib/tkextlib/tcllib/style.rb | 61 + .../ext/tk/lib/tkextlib/tcllib/superframe.rb | 51 + .../ext/tk/lib/tkextlib/tcllib/swaplist.rb | 150 + .../ext/tk/lib/tkextlib/tcllib/tablelist.rb | 27 + .../ext/tk/lib/tkextlib/tcllib/tablelist_core.rb | 782 + .../ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb | 25 + .../ext/tk/lib/tkextlib/tcllib/tkpiechart.rb | 314 + .../ext/tk/lib/tkextlib/tcllib/tooltip.rb | 95 + .../ext/tk/lib/tkextlib/tcllib/widget.rb | 48 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx.rb | 13 + .../ext/tk/lib/tkextlib/tclx/setup.rb | 8 + .../ext/tk/lib/tkextlib/tclx/tclx.rb | 74 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile.rb | 419 + .../ext/tk/lib/tkextlib/tile/dialog.rb | 96 + .../ext/tk/lib/tkextlib/tile/setup.rb | 8 + .../ext/tk/lib/tkextlib/tile/sizegrip.rb | 29 + .../ext/tk/lib/tkextlib/tile/style.rb | 316 + .../ext/tk/lib/tkextlib/tile/tbutton.rb | 33 + .../ext/tk/lib/tkextlib/tile/tcheckbutton.rb | 36 + .../ext/tk/lib/tkextlib/tile/tcombobox.rb | 54 + .../ext/tk/lib/tkextlib/tile/tentry.rb | 48 + .../ext/tk/lib/tkextlib/tile/tframe.rb | 33 + .../ext/tk/lib/tkextlib/tile/tlabel.rb | 33 + .../ext/tk/lib/tkextlib/tile/tlabelframe.rb | 36 + .../ext/tk/lib/tkextlib/tile/tmenubutton.rb | 36 + .../ext/tk/lib/tkextlib/tile/tnotebook.rb | 139 + .../ext/tk/lib/tkextlib/tile/tpaned.rb | 231 + .../ext/tk/lib/tkextlib/tile/tprogressbar.rb | 56 + .../ext/tk/lib/tkextlib/tile/tradiobutton.rb | 36 + .../ext/tk/lib/tkextlib/tile/treeview.rb | 1239 + .../ext/tk/lib/tkextlib/tile/tscale.rb | 53 + .../ext/tk/lib/tkextlib/tile/tscrollbar.rb | 54 + .../ext/tk/lib/tkextlib/tile/tseparator.rb | 33 + .../ext/tk/lib/tkextlib/tile/tsquare.rb | 30 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND.rb | 18 + .../ext/tk/lib/tkextlib/tkDND/setup.rb | 8 + .../ext/tk/lib/tkextlib/tkDND/shape.rb | 125 + .../ext/tk/lib/tkextlib/tkDND/tkdnd.rb | 182 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML.rb | 13 + .../ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb | 453 + .../ext/tk/lib/tkextlib/tkHTML/setup.rb | 8 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg.rb | 36 + .../ext/tk/lib/tkextlib/tkimg/README | 26 + .../ext/tk/lib/tkextlib/tkimg/bmp.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/gif.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/ico.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/jpeg.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/pcx.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/pixmap.rb | 44 + .../ext/tk/lib/tkextlib/tkimg/png.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/ppm.rb | 33 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ps.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/setup.rb | 8 + .../ext/tk/lib/tkextlib/tkimg/sgi.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/sun.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/tga.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/tiff.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/window.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/xbm.rb | 33 + .../ext/tk/lib/tkextlib/tkimg/xpm.rb | 33 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktable.rb | 14 + .../ext/tk/lib/tkextlib/tktable/setup.rb | 8 + .../ext/tk/lib/tkextlib/tktable/tktable.rb | 957 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans.rb | 14 + .../ext/tk/lib/tkextlib/tktrans/setup.rb | 8 + .../ext/tk/lib/tkextlib/tktrans/tktrans.rb | 64 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl.rb | 13 + .../ext/tk/lib/tkextlib/treectrl/setup.rb | 8 + .../ext/tk/lib/tkextlib/treectrl/tktreectrl.rb | 2461 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs.rb | 13 + .../ext/tk/lib/tkextlib/trofs/setup.rb | 8 + .../ext/tk/lib/tkextlib/trofs/trofs.rb | 51 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/version.rb | 6 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu.rb | 48 + .../ext/tk/lib/tkextlib/vu/bargraph.rb | 61 + .../ext/tk/lib/tkextlib/vu/charts.rb | 53 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/dial.rb | 102 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/pie.rb | 282 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/setup.rb | 8 + .../ext/tk/lib/tkextlib/vu/spinbox.rb | 22 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico.rb | 14 + .../ext/tk/lib/tkextlib/winico/setup.rb | 8 + .../ext/tk/lib/tkextlib/winico/winico.rb | 224 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkfont.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkmacpkg.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkmenubar.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkmngfocus.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkpalette.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkscrollbox.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tktext.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkvirtevent.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/lib/tkwinpkg.rb | 4 + lib/ruby-1.9.1-rc1/ext/tk/old-README.tcltklib.eucj | 159 + lib/ruby-1.9.1-rc1/ext/tk/sample/24hr_clock.rb | 286 + lib/ruby-1.9.1-rc1/ext/tk/sample/binding_sample.rb | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/bindtag_sample.rb | 127 + lib/ruby-1.9.1-rc1/ext/tk/sample/binstr_usage.rb | 45 + lib/ruby-1.9.1-rc1/ext/tk/sample/btn_with_frame.rb | 20 + lib/ruby-1.9.1-rc1/ext/tk/sample/cd_timer.rb | 81 + lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_res_test.rb | 17 + lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_resource | 5 + .../ext/tk/sample/demos-en/ChangeLog | 64 + .../ext/tk/sample/demos-en/ChangeLog.prev | 9 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README | 138 + .../ext/tk/sample/demos-en/README.1st | 18 + .../ext/tk/sample/demos-en/README.tkencoding | 29 + .../ext/tk/sample/demos-en/anilabel.rb | 174 + .../ext/tk/sample/demos-en/aniwave.rb | 118 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/arrow.rb | 249 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bind.rb | 127 + .../ext/tk/sample/demos-en/bitmap.rb | 75 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse1 | 63 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse2 | 82 + .../ext/tk/sample/demos-en/button.rb | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check.rb | 72 + .../ext/tk/sample/demos-en/check2.rb | 109 + .../ext/tk/sample/demos-en/clrpick.rb | 87 + .../ext/tk/sample/demos-en/colors.rb | 158 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/combo.rb | 96 + .../ext/tk/sample/demos-en/cscroll.rb | 136 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ctext.rb | 207 + .../ext/tk/sample/demos-en/dialog1.rb | 38 + .../ext/tk/sample/demos-en/dialog2.rb | 41 + .../ext/tk/sample/demos-en/doc.org/README | 7 + .../ext/tk/sample/demos-en/doc.org/README.JP | 14 + .../ext/tk/sample/demos-en/doc.org/README.tk80 | 46 + .../ext/tk/sample/demos-en/doc.org/license.terms | 39 + .../tk/sample/demos-en/doc.org/license.terms.tk80 | 39 + .../ext/tk/sample/demos-en/entry1.rb | 58 + .../ext/tk/sample/demos-en/entry2.rb | 93 + .../ext/tk/sample/demos-en/entry3.rb | 220 + .../ext/tk/sample/demos-en/filebox.rb | 102 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor.rb | 1723 + .../ext/tk/sample/demos-en/floor2.rb | 1722 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/form.rb | 64 + .../ext/tk/sample/demos-en/goldberg.rb | 2006 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hello | 14 + .../ext/tk/sample/demos-en/hscale.rb | 75 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/icon.rb | 105 + .../ext/tk/sample/demos-en/image1.rb | 65 + .../ext/tk/sample/demos-en/image2.rb | 107 + .../ext/tk/sample/demos-en/image3.rb | 125 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/items.rb | 381 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset | 333 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset2 | 367 + .../ext/tk/sample/demos-en/knightstour.rb | 271 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/label.rb | 72 + .../ext/tk/sample/demos-en/labelframe.rb | 95 + .../ext/tk/sample/demos-en/mclist.rb | 117 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu.rb | 196 + .../ext/tk/sample/demos-en/menu84.rb | 215 + .../ext/tk/sample/demos-en/menubu.rb | 237 + .../ext/tk/sample/demos-en/msgbox.rb | 90 + .../ext/tk/sample/demos-en/msgbox2.rb | 91 + .../ext/tk/sample/demos-en/paned1.rb | 47 + .../ext/tk/sample/demos-en/paned2.rb | 94 + .../ext/tk/sample/demos-en/pendulum.rb | 240 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/plot.rb | 124 + .../ext/tk/sample/demos-en/puzzle.rb | 134 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio.rb | 86 + .../ext/tk/sample/demos-en/radio2.rb | 109 + .../ext/tk/sample/demos-en/radio3.rb | 117 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rmt | 268 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rolodex | 320 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ruler.rb | 205 + .../ext/tk/sample/demos-en/sayings.rb | 106 + .../ext/tk/sample/demos-en/search.rb | 187 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/spin.rb | 65 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/square | 81 + .../ext/tk/sample/demos-en/states.rb | 80 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/style.rb | 231 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tcolor | 526 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/text.rb | 128 + .../ext/tk/sample/demos-en/textpeer.rb | 76 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/timer | 136 + .../ext/tk/sample/demos-en/tkencoding.rb | 42 + .../ext/tk/sample/demos-en/toolbar.rb | 130 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tree.rb | 119 + .../ext/tk/sample/demos-en/ttkbut.rb | 139 + .../ext/tk/sample/demos-en/ttkmenu.rb | 85 + .../ext/tk/sample/demos-en/ttknote.rb | 89 + .../ext/tk/sample/demos-en/ttkpane.rb | 213 + .../ext/tk/sample/demos-en/ttkprogress.rb | 66 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind.rb | 291 + .../ext/tk/sample/demos-en/twind2.rb | 384 + .../ext/tk/sample/demos-en/unicodeout.rb | 114 + .../ext/tk/sample/demos-en/vscale.rb | 79 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/widget | 1084 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README | 54 + .../ext/tk/sample/demos-jp/README.1st | 20 + .../ext/tk/sample/demos-jp/anilabel.rb | 177 + .../ext/tk/sample/demos-jp/aniwave.rb | 120 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/arrow.rb | 247 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bind.rb | 125 + .../ext/tk/sample/demos-jp/bitmap.rb | 74 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse1 | 63 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse2 | 82 + .../ext/tk/sample/demos-jp/button.rb | 83 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check.rb | 70 + .../ext/tk/sample/demos-jp/check2.rb | 110 + .../ext/tk/sample/demos-jp/clrpick.rb | 84 + .../ext/tk/sample/demos-jp/colors.rb | 155 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/combo.rb | 98 + .../ext/tk/sample/demos-jp/cscroll.rb | 134 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ctext.rb | 204 + .../ext/tk/sample/demos-jp/dialog1.rb | 39 + .../ext/tk/sample/demos-jp/dialog2.rb | 43 + .../ext/tk/sample/demos-jp/doc.org/README | 7 + .../ext/tk/sample/demos-jp/doc.org/README.JP | 14 + .../ext/tk/sample/demos-jp/doc.org/README.tk80 | 46 + .../ext/tk/sample/demos-jp/doc.org/license.terms | 39 + .../tk/sample/demos-jp/doc.org/license.terms.tk80 | 39 + .../ext/tk/sample/demos-jp/entry1.rb | 60 + .../ext/tk/sample/demos-jp/entry2.rb | 91 + .../ext/tk/sample/demos-jp/entry3.rb | 225 + .../ext/tk/sample/demos-jp/filebox.rb | 102 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor.rb | 1721 + .../ext/tk/sample/demos-jp/floor2.rb | 1719 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/form.rb | 66 + .../ext/tk/sample/demos-jp/goldberg.rb | 2011 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hello | 10 + .../ext/tk/sample/demos-jp/hscale.rb | 78 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/icon.rb | 103 + .../ext/tk/sample/demos-jp/image1.rb | 64 + .../ext/tk/sample/demos-jp/image2.rb | 106 + .../ext/tk/sample/demos-jp/image3.rb | 127 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/items.rb | 379 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset | 333 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset2 | 369 + .../ext/tk/sample/demos-jp/knightstour.rb | 273 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/label.rb | 69 + .../ext/tk/sample/demos-jp/labelframe.rb | 102 + .../ext/tk/sample/demos-jp/mclist.rb | 121 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu.rb | 201 + .../ext/tk/sample/demos-jp/menu84.rb | 213 + .../ext/tk/sample/demos-jp/menu8x.rb | 233 + .../ext/tk/sample/demos-jp/menubu.rb | 238 + .../ext/tk/sample/demos-jp/msgbox.rb | 89 + .../ext/tk/sample/demos-jp/msgbox2.rb | 90 + .../ext/tk/sample/demos-jp/paned1.rb | 52 + .../ext/tk/sample/demos-jp/paned2.rb | 100 + .../ext/tk/sample/demos-jp/pendulum.rb | 242 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/plot.rb | 126 + .../ext/tk/sample/demos-jp/puzzle.rb | 131 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio.rb | 84 + .../ext/tk/sample/demos-jp/radio2.rb | 112 + .../ext/tk/sample/demos-jp/radio3.rb | 119 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rmt | 268 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex | 320 + .../ext/tk/sample/demos-jp/rolodex-j | 300 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ruler.rb | 203 + .../ext/tk/sample/demos-jp/sayings.rb | 103 + .../ext/tk/sample/demos-jp/search.rb | 184 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/spin.rb | 71 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/square | 81 + .../ext/tk/sample/demos-jp/states.rb | 74 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/style.rb | 270 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tcolor | 534 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/text.rb | 120 + .../ext/tk/sample/demos-jp/textpeer.rb | 82 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/timer | 136 + .../ext/tk/sample/demos-jp/toolbar.rb | 136 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tree.rb | 120 + .../ext/tk/sample/demos-jp/ttkbut.rb | 145 + .../ext/tk/sample/demos-jp/ttkmenu.rb | 91 + .../ext/tk/sample/demos-jp/ttknote.rb | 97 + .../ext/tk/sample/demos-jp/ttkpane.rb | 216 + .../ext/tk/sample/demos-jp/ttkprogress.rb | 71 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind.rb | 292 + .../ext/tk/sample/demos-jp/twind2.rb | 384 + .../ext/tk/sample/demos-jp/unicodeout.rb | 119 + .../ext/tk/sample/demos-jp/vscale.rb | 80 + lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/widget | 1118 + .../ext/tk/sample/editable_listbox.rb | 69 + lib/ruby-1.9.1-rc1/ext/tk/sample/encstr_usage.rb | 30 + lib/ruby-1.9.1-rc1/ext/tk/sample/figmemo_sample.rb | 456 + lib/ruby-1.9.1-rc1/ext/tk/sample/images/earth.gif | Bin 0 -> 51712 bytes .../ext/tk/sample/images/earthris.gif | Bin 0 -> 6343 bytes lib/ruby-1.9.1-rc1/ext/tk/sample/images/face.xbm | 173 + .../ext/tk/sample/images/flagdown.xbm | 27 + lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagup.xbm | 27 + lib/ruby-1.9.1-rc1/ext/tk/sample/images/gray25.xbm | 6 + lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.25 | 6 + lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.5 | 6 + .../ext/tk/sample/images/letters.xbm | 27 + .../ext/tk/sample/images/noletter.xbm | 27 + .../ext/tk/sample/images/pattern.xbm | 6 + .../ext/tk/sample/images/tcllogo.gif | Bin 0 -> 2341 bytes lib/ruby-1.9.1-rc1/ext/tk/sample/images/teapot.ppm | 31 + lib/ruby-1.9.1-rc1/ext/tk/sample/irbtk.rb | 30 + lib/ruby-1.9.1-rc1/ext/tk/sample/irbtkw.rbw | 156 + lib/ruby-1.9.1-rc1/ext/tk/sample/iso2022-kr.txt | 2 + lib/ruby-1.9.1-rc1/ext/tk/sample/menubar1.rb | 51 + lib/ruby-1.9.1-rc1/ext/tk/sample/menubar2.rb | 56 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/README | 3 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/cs.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/de.msg | 88 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/el.msg | 98 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en.msg | 83 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en_gb.msg | 7 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/eo.msg | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/es.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/fr.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/it.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ja.msg | 13 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/nl.msg | 123 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/pl.msg | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ru.msg | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/README | 5 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/de.msg | 88 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/ja.msg | 85 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/README | 4 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/cs.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/de.msg | 88 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/el.msg | 103 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en.msg | 83 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en_gb.msg | 7 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/eo.msg | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/es.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/fr.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/it.msg | 84 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ja.msg | 13 + .../ext/tk/sample/msgs_tk/license.terms | 39 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/nl.msg | 123 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/pl.msg | 87 + lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ru.msg | 87 + .../ext/tk/sample/multi-ip_sample.rb | 102 + .../ext/tk/sample/multi-ip_sample2.rb | 29 + lib/ruby-1.9.1-rc1/ext/tk/sample/optobj_sample.rb | 67 + lib/ruby-1.9.1-rc1/ext/tk/sample/propagate.rb | 30 + .../ext/tk/sample/remote-ip_sample.rb | 33 + .../ext/tk/sample/remote-ip_sample2.rb | 56 + lib/ruby-1.9.1-rc1/ext/tk/sample/resource.en | 13 + lib/ruby-1.9.1-rc1/ext/tk/sample/resource.ja | 13 + lib/ruby-1.9.1-rc1/ext/tk/sample/safe-tk.rb | 115 + lib/ruby-1.9.1-rc1/ext/tk/sample/scrollframe.rb | 237 + .../ext/tk/sample/tcltklib/batsu.gif | Bin 0 -> 538 bytes .../ext/tk/sample/tcltklib/lines0.tcl | 42 + .../ext/tk/sample/tcltklib/lines1.rb | 50 + .../ext/tk/sample/tcltklib/lines2.rb | 54 + .../ext/tk/sample/tcltklib/lines3.rb | 54 + .../ext/tk/sample/tcltklib/lines4.rb | 54 + lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/maru.gif | Bin 0 -> 481 bytes .../ext/tk/sample/tcltklib/safeTk.rb | 22 + .../ext/tk/sample/tcltklib/sample0.rb | 39 + .../ext/tk/sample/tcltklib/sample1.rb | 634 + .../ext/tk/sample/tcltklib/sample2.rb | 451 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkalignbox.rb | 225 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkballoonhelp.rb | 194 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkbiff.rb | 155 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkbrowse.rb | 79 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkcombobox.rb | 426 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkdialog.rb | 61 + .../ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt | 61 + .../ext/tk/sample/tkextlib/ICONS/tkIcons | 195 + .../tk/sample/tkextlib/ICONS/tkIcons-sample.kde | 658 + .../ext/tk/sample/tkextlib/ICONS/tkIcons.kde | 195 + .../ext/tk/sample/tkextlib/ICONS/viewIcons.rb | 329 + .../ext/tk/sample/tkextlib/blt/barchart5.rb | 101 + .../ext/tk/sample/tkextlib/blt/calendar.rb | 117 + .../ext/tk/sample/tkextlib/blt/graph6.rb | 2222 + .../ext/tk/sample/tkextlib/blt/graph7.rb | 40 + .../ext/tk/sample/tkextlib/blt/graph7a.rb | 63 + .../ext/tk/sample/tkextlib/blt/graph7b.rb | 41 + .../ext/tk/sample/tkextlib/blt/graph7c.rb | 45 + .../ext/tk/sample/tkextlib/blt/images/buckskin.gif | Bin 0 -> 7561 bytes .../ext/tk/sample/tkextlib/blt/images/chalk.gif | Bin 0 -> 4378 bytes .../ext/tk/sample/tkextlib/blt/images/qv100.t.gif | Bin 0 -> 2694 bytes .../ext/tk/sample/tkextlib/blt/images/rain.gif | Bin 0 -> 3785 bytes .../ext/tk/sample/tkextlib/blt/images/sample.gif | Bin 0 -> 186103 bytes .../ext/tk/sample/tkextlib/blt/pareto.rb | 90 + .../ext/tk/sample/tkextlib/blt/plot1.rb | 9 + .../ext/tk/sample/tkextlib/blt/plot1b.rb | 10 + .../ext/tk/sample/tkextlib/blt/readme.txt | 2 + .../ext/tk/sample/tkextlib/blt/scripts/stipples.rb | 156 + .../ext/tk/sample/tkextlib/blt/winop1.rb | 40 + .../ext/tk/sample/tkextlib/blt/winop2.rb | 28 + .../tk/sample/tkextlib/bwidget/Orig_LICENSE.txt | 53 + .../ext/tk/sample/tkextlib/bwidget/basic.rb | 198 + .../ext/tk/sample/tkextlib/bwidget/bwidget.xbm | 46 + .../ext/tk/sample/tkextlib/bwidget/demo.rb | 243 + .../ext/tk/sample/tkextlib/bwidget/dnd.rb | 46 + .../ext/tk/sample/tkextlib/bwidget/manager.rb | 150 + .../ext/tk/sample/tkextlib/bwidget/select.rb | 82 + .../ext/tk/sample/tkextlib/bwidget/tmpldlg.rb | 221 + .../ext/tk/sample/tkextlib/bwidget/tree.rb | 289 + .../ext/tk/sample/tkextlib/bwidget/x1.xbm | 2258 + .../iwidgets/catalog_demo/Orig_LICENSE.txt | 42 + .../tkextlib/iwidgets/catalog_demo/images/box.xbm | 14 + .../iwidgets/catalog_demo/images/clear.gif | Bin 0 -> 279 bytes .../iwidgets/catalog_demo/images/close.gif | Bin 0 -> 249 bytes .../tkextlib/iwidgets/catalog_demo/images/copy.gif | Bin 0 -> 269 bytes .../tkextlib/iwidgets/catalog_demo/images/cut.gif | Bin 0 -> 179 bytes .../tkextlib/iwidgets/catalog_demo/images/exit.gif | Bin 0 -> 396 bytes .../tkextlib/iwidgets/catalog_demo/images/find.gif | Bin 0 -> 386 bytes .../tkextlib/iwidgets/catalog_demo/images/help.gif | Bin 0 -> 591 bytes .../tkextlib/iwidgets/catalog_demo/images/line.xbm | 14 + .../tkextlib/iwidgets/catalog_demo/images/mag.gif | Bin 0 -> 183 bytes .../tkextlib/iwidgets/catalog_demo/images/new.gif | Bin 0 -> 212 bytes .../tkextlib/iwidgets/catalog_demo/images/open.gif | Bin 0 -> 258 bytes .../tkextlib/iwidgets/catalog_demo/images/oval.xbm | 14 + .../iwidgets/catalog_demo/images/paste.gif | Bin 0 -> 376 bytes .../iwidgets/catalog_demo/images/points.xbm | 14 + .../tkextlib/iwidgets/catalog_demo/images/poly.gif | Bin 0 -> 141 bytes .../iwidgets/catalog_demo/images/print.gif | Bin 0 -> 263 bytes .../iwidgets/catalog_demo/images/ruler.gif | Bin 0 -> 174 bytes .../tkextlib/iwidgets/catalog_demo/images/save.gif | Bin 0 -> 270 bytes .../iwidgets/catalog_demo/images/select.gif | Bin 0 -> 124 bytes .../tkextlib/iwidgets/catalog_demo/images/text.xbm | 14 + .../sample/tkextlib/iwidgets/sample/buttonbox.rb | 22 + .../tk/sample/tkextlib/iwidgets/sample/calendar.rb | 10 + .../tkextlib/iwidgets/sample/canvasprintbox.rb | 8 + .../tkextlib/iwidgets/sample/canvasprintdialog.rb | 8 + .../tk/sample/tkextlib/iwidgets/sample/checkbox.rb | 12 + .../tk/sample/tkextlib/iwidgets/sample/combobox.rb | 32 + .../sample/tkextlib/iwidgets/sample/dateentry.rb | 7 + .../sample/tkextlib/iwidgets/sample/datefield.rb | 8 + .../tk/sample/tkextlib/iwidgets/sample/dialog.rb | 20 + .../sample/tkextlib/iwidgets/sample/dialogshell.rb | 14 + .../tkextlib/iwidgets/sample/disjointlistbox.rb | 16 + .../tkextlib/iwidgets/sample/entryfield-1.rb | 39 + .../tkextlib/iwidgets/sample/entryfield-2.rb | 44 + .../tkextlib/iwidgets/sample/entryfield-3.rb | 40 + .../sample/tkextlib/iwidgets/sample/extbutton.rb | 20 + .../iwidgets/sample/extfileselectionbox.rb | 8 + .../iwidgets/sample/extfileselectiondialog.rb | 29 + .../tk/sample/tkextlib/iwidgets/sample/feedback.rb | 10 + .../tkextlib/iwidgets/sample/fileselectionbox.rb | 8 + .../iwidgets/sample/fileselectiondialog.rb | 28 + .../sample/tkextlib/iwidgets/sample/finddialog.rb | 15 + .../sample/tkextlib/iwidgets/sample/hierarchy.rb | 25 + .../sample/tkextlib/iwidgets/sample/hyperhelp.rb | 14 + .../tkextlib/iwidgets/sample/labeledframe.rb | 14 + .../tkextlib/iwidgets/sample/labeledwidget.rb | 13 + .../sample/tkextlib/iwidgets/sample/mainwindow.rb | 64 + .../tk/sample/tkextlib/iwidgets/sample/menubar.rb | 124 + .../tk/sample/tkextlib/iwidgets/sample/menubar2.rb | 44 + .../sample/tkextlib/iwidgets/sample/messagebox1.rb | 19 + .../sample/tkextlib/iwidgets/sample/messagebox2.rb | 19 + .../tkextlib/iwidgets/sample/messagedialog.rb | 44 + .../tk/sample/tkextlib/iwidgets/sample/notebook.rb | 30 + .../sample/tkextlib/iwidgets/sample/notebook2.rb | 30 + .../sample/tkextlib/iwidgets/sample/optionmenu.rb | 14 + .../sample/tkextlib/iwidgets/sample/panedwindow.rb | 22 + .../tkextlib/iwidgets/sample/panedwindow2.rb | 22 + .../tkextlib/iwidgets/sample/promptdialog.rb | 17 + .../sample/tkextlib/iwidgets/sample/pushbutton.rb | 9 + .../tk/sample/tkextlib/iwidgets/sample/radiobox.rb | 13 + .../tkextlib/iwidgets/sample/scrolledcanvas.rb | 13 + .../tkextlib/iwidgets/sample/scrolledframe.rb | 18 + .../tkextlib/iwidgets/sample/scrolledhtml.rb | 15 + .../tkextlib/iwidgets/sample/scrolledlistbox.rb | 22 + .../tkextlib/iwidgets/sample/scrolledtext.rb | 11 + .../tkextlib/iwidgets/sample/selectionbox.rb | 19 + .../tkextlib/iwidgets/sample/selectiondialog.rb | 12 + .../tk/sample/tkextlib/iwidgets/sample/shell.rb | 17 + .../tk/sample/tkextlib/iwidgets/sample/spindate.rb | 7 + .../tk/sample/tkextlib/iwidgets/sample/spinint.rb | 10 + .../tk/sample/tkextlib/iwidgets/sample/spinner.rb | 33 + .../tk/sample/tkextlib/iwidgets/sample/spintime.rb | 7 + .../sample/tkextlib/iwidgets/sample/tabnotebook.rb | 26 + .../tkextlib/iwidgets/sample/tabnotebook2.rb | 30 + .../tk/sample/tkextlib/iwidgets/sample/tabset.rb | 34 + .../sample/tkextlib/iwidgets/sample/timeentry.rb | 7 + .../sample/tkextlib/iwidgets/sample/timefield.rb | 8 + .../tk/sample/tkextlib/iwidgets/sample/toolbar.rb | 152 + .../tk/sample/tkextlib/iwidgets/sample/watch.rb | 18 + .../ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt | 46 + .../ext/tk/sample/tkextlib/tcllib/datefield.rb | 29 + .../ext/tk/sample/tkextlib/tcllib/plotdemos1.rb | 158 + .../ext/tk/sample/tkextlib/tcllib/plotdemos2.rb | 71 + .../ext/tk/sample/tkextlib/tcllib/plotdemos3.rb | 83 + .../ext/tk/sample/tkextlib/tcllib/xyplot.rb | 17 + .../ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt | 30 + .../ext/tk/sample/tkextlib/tile/demo.rb | 983 + .../ext/tk/sample/tkextlib/tile/iconlib.tcl | 110 + .../ext/tk/sample/tkextlib/tile/readme.txt | 2 + .../ext/tk/sample/tkextlib/tile/repeater.tcl | 117 + .../tk/sample/tkextlib/tile/themes/blue/blue.tcl | 149 + .../tkextlib/tile/themes/blue/blue/arrowdown-h.gif | Bin 0 -> 315 bytes .../tkextlib/tile/themes/blue/blue/arrowdown-p.gif | Bin 0 -> 312 bytes .../tkextlib/tile/themes/blue/blue/arrowdown.gif | Bin 0 -> 313 bytes .../tkextlib/tile/themes/blue/blue/arrowleft-h.gif | Bin 0 -> 329 bytes .../tkextlib/tile/themes/blue/blue/arrowleft-p.gif | Bin 0 -> 327 bytes .../tkextlib/tile/themes/blue/blue/arrowleft.gif | Bin 0 -> 323 bytes .../tile/themes/blue/blue/arrowright-h.gif | Bin 0 -> 330 bytes .../tile/themes/blue/blue/arrowright-p.gif | Bin 0 -> 327 bytes .../tkextlib/tile/themes/blue/blue/arrowright.gif | Bin 0 -> 324 bytes .../tkextlib/tile/themes/blue/blue/arrowup-h.gif | Bin 0 -> 309 bytes .../tkextlib/tile/themes/blue/blue/arrowup-p.gif | Bin 0 -> 313 bytes .../tkextlib/tile/themes/blue/blue/arrowup.gif | Bin 0 -> 314 bytes .../tkextlib/tile/themes/blue/blue/button-h.gif | Bin 0 -> 696 bytes .../tkextlib/tile/themes/blue/blue/button-n.gif | Bin 0 -> 770 bytes .../tkextlib/tile/themes/blue/blue/button-n.xcf | Bin 0 -> 1942 bytes .../tkextlib/tile/themes/blue/blue/button-p.gif | Bin 0 -> 769 bytes .../tkextlib/tile/themes/blue/blue/check-hc.gif | Bin 0 -> 254 bytes .../tkextlib/tile/themes/blue/blue/check-hu.gif | Bin 0 -> 234 bytes .../tkextlib/tile/themes/blue/blue/check-nc.gif | Bin 0 -> 249 bytes .../tkextlib/tile/themes/blue/blue/check-nu.gif | Bin 0 -> 229 bytes .../tkextlib/tile/themes/blue/blue/radio-hc.gif | Bin 0 -> 1098 bytes .../tkextlib/tile/themes/blue/blue/radio-hu.gif | Bin 0 -> 626 bytes .../tkextlib/tile/themes/blue/blue/radio-nc.gif | Bin 0 -> 389 bytes .../tkextlib/tile/themes/blue/blue/radio-nu.gif | Bin 0 -> 401 bytes .../tkextlib/tile/themes/blue/blue/sb-thumb-p.gif | Bin 0 -> 343 bytes .../tkextlib/tile/themes/blue/blue/sb-thumb.gif | Bin 0 -> 316 bytes .../tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif | Bin 0 -> 333 bytes .../tkextlib/tile/themes/blue/blue/sb-vthumb.gif | Bin 0 -> 308 bytes .../tkextlib/tile/themes/blue/blue/slider-p.gif | Bin 0 -> 182 bytes .../tkextlib/tile/themes/blue/blue/slider.gif | Bin 0 -> 182 bytes .../tkextlib/tile/themes/blue/blue/vslider-p.gif | Bin 0 -> 183 bytes .../tkextlib/tile/themes/blue/blue/vslider.gif | Bin 0 -> 283 bytes .../sample/tkextlib/tile/themes/blue/pkgIndex.tcl | 6 + .../tkextlib/tile/themes/keramik/keramik.tcl | 194 + .../tile/themes/keramik/keramik/arrowdown-n.gif | Bin 0 -> 273 bytes .../tile/themes/keramik/keramik/arrowdown-p.gif | Bin 0 -> 258 bytes .../tile/themes/keramik/keramik/arrowleft-n.gif | Bin 0 -> 292 bytes .../tile/themes/keramik/keramik/arrowleft-p.gif | Bin 0 -> 272 bytes .../tile/themes/keramik/keramik/arrowright-n.gif | Bin 0 -> 274 bytes .../tile/themes/keramik/keramik/arrowright-p.gif | Bin 0 -> 258 bytes .../tile/themes/keramik/keramik/arrowup-n.gif | Bin 0 -> 286 bytes .../tile/themes/keramik/keramik/arrowup-p.gif | Bin 0 -> 271 bytes .../tile/themes/keramik/keramik/button-d.gif | Bin 0 -> 1266 bytes .../tile/themes/keramik/keramik/button-h.gif | Bin 0 -> 896 bytes .../tile/themes/keramik/keramik/button-n.gif | Bin 0 -> 881 bytes .../tile/themes/keramik/keramik/button-p.gif | Bin 0 -> 625 bytes .../tile/themes/keramik/keramik/button-s.gif | Bin 0 -> 859 bytes .../tile/themes/keramik/keramik/check-c.gif | Bin 0 -> 434 bytes .../tile/themes/keramik/keramik/check-u.gif | Bin 0 -> 423 bytes .../tkextlib/tile/themes/keramik/keramik/hsb-n.gif | Bin 0 -> 401 bytes .../tkextlib/tile/themes/keramik/keramik/hsb-p.gif | Bin 0 -> 395 bytes .../tile/themes/keramik/keramik/hslider-n.gif | Bin 0 -> 592 bytes .../tile/themes/keramik/keramik/mbut-a.gif | Bin 0 -> 1116 bytes .../tile/themes/keramik/keramik/mbut-arrow-n.gif | Bin 0 -> 61 bytes .../tile/themes/keramik/keramik/mbut-d.gif | Bin 0 -> 1057 bytes .../tile/themes/keramik/keramik/mbut-n.gif | Bin 0 -> 1095 bytes .../tile/themes/keramik/keramik/radio-c.gif | Bin 0 -> 695 bytes .../tile/themes/keramik/keramik/radio-u.gif | Bin 0 -> 686 bytes .../tkextlib/tile/themes/keramik/keramik/tab-n.gif | Bin 0 -> 383 bytes .../tkextlib/tile/themes/keramik/keramik/tab-p.gif | Bin 0 -> 878 bytes .../tile/themes/keramik/keramik/tbar-a.gif | Bin 0 -> 907 bytes .../tile/themes/keramik/keramik/tbar-n.gif | Bin 0 -> 238 bytes .../tile/themes/keramik/keramik/tbar-p.gif | Bin 0 -> 927 bytes .../tkextlib/tile/themes/keramik/keramik/vsb-n.gif | Bin 0 -> 405 bytes .../tkextlib/tile/themes/keramik/keramik/vsb-p.gif | Bin 0 -> 399 bytes .../tile/themes/keramik/keramik/vslider-n.gif | Bin 0 -> 587 bytes .../tkextlib/tile/themes/keramik/pkgIndex.tcl | 15 + .../ext/tk/sample/tkextlib/tile/themes/kroc.rb | 226 + .../tk/sample/tkextlib/tile/themes/kroc/kroc.tcl | 163 + .../tkextlib/tile/themes/kroc/kroc/button-h.gif | Bin 0 -> 522 bytes .../tkextlib/tile/themes/kroc/kroc/button-n.gif | Bin 0 -> 554 bytes .../tkextlib/tile/themes/kroc/kroc/button-p.gif | Bin 0 -> 548 bytes .../tkextlib/tile/themes/kroc/kroc/check-hc.gif | Bin 0 -> 281 bytes .../tkextlib/tile/themes/kroc/kroc/check-hu.gif | Bin 0 -> 273 bytes .../tkextlib/tile/themes/kroc/kroc/check-nc.gif | Bin 0 -> 303 bytes .../tkextlib/tile/themes/kroc/kroc/check-nu.gif | Bin 0 -> 294 bytes .../tkextlib/tile/themes/kroc/kroc/radio-hc.gif | Bin 0 -> 652 bytes .../tkextlib/tile/themes/kroc/kroc/radio-hu.gif | Bin 0 -> 644 bytes .../tkextlib/tile/themes/kroc/kroc/radio-nc.gif | Bin 0 -> 632 bytes .../tkextlib/tile/themes/kroc/kroc/radio-nu.gif | Bin 0 -> 621 bytes .../sample/tkextlib/tile/themes/kroc/pkgIndex.tcl | 15 + .../tkextlib/tile/themes/plastik/pkgIndex.tcl | 16 + .../tkextlib/tile/themes/plastik/plastik.tcl | 125 + .../tile/themes/plastik/plastik/arrowdown-n.gif | Bin 0 -> 362 bytes .../tile/themes/plastik/plastik/arrowdown-p.gif | Bin 0 -> 250 bytes .../tile/themes/plastik/plastik/arrowleft-n.gif | Bin 0 -> 378 bytes .../tile/themes/plastik/plastik/arrowleft-p.gif | Bin 0 -> 267 bytes .../tile/themes/plastik/plastik/arrowright-n.gif | Bin 0 -> 379 bytes .../tile/themes/plastik/plastik/arrowright-p.gif | Bin 0 -> 266 bytes .../tile/themes/plastik/plastik/arrowup-n.gif | Bin 0 -> 363 bytes .../tile/themes/plastik/plastik/arrowup-p.gif | Bin 0 -> 251 bytes .../tile/themes/plastik/plastik/button-h.gif | Bin 0 -> 439 bytes .../tile/themes/plastik/plastik/button-n.gif | Bin 0 -> 443 bytes .../tile/themes/plastik/plastik/button-p.gif | Bin 0 -> 302 bytes .../tile/themes/plastik/plastik/check-hc.gif | Bin 0 -> 169 bytes .../tile/themes/plastik/plastik/check-hu.gif | Bin 0 -> 170 bytes .../tile/themes/plastik/plastik/check-nc.gif | Bin 0 -> 235 bytes .../tile/themes/plastik/plastik/check-nu.gif | Bin 0 -> 226 bytes .../tile/themes/plastik/plastik/check-pc.gif | Bin 0 -> 169 bytes .../tkextlib/tile/themes/plastik/plastik/hsb-n.gif | Bin 0 -> 269 bytes .../tile/themes/plastik/plastik/hslider-n.gif | Bin 0 -> 342 bytes .../tile/themes/plastik/plastik/radio-hc.gif | Bin 0 -> 178 bytes .../tile/themes/plastik/plastik/radio-hu.gif | Bin 0 -> 179 bytes .../tile/themes/plastik/plastik/radio-nc.gif | Bin 0 -> 236 bytes .../tile/themes/plastik/plastik/radio-nu.gif | Bin 0 -> 178 bytes .../tile/themes/plastik/plastik/radio-pc.gif | Bin 0 -> 178 bytes .../tkextlib/tile/themes/plastik/plastik/vsb-n.gif | Bin 0 -> 366 bytes .../tile/themes/plastik/plastik/vslider-n.gif | Bin 0 -> 336 bytes .../ext/tk/sample/tkextlib/tile/toolbutton.tcl | 152 + .../tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt | 12 + .../ext/tk/sample/tkextlib/tkHTML/README | 12 + .../ext/tk/sample/tkextlib/tkHTML/hv.rb | 313 + .../ext/tk/sample/tkextlib/tkHTML/page1/image1 | Bin 0 -> 8995 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image10 | Bin 0 -> 3095 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image11 | Bin 0 -> 1425 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image12 | Bin 0 -> 2468 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image13 | Bin 0 -> 4073 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image14 | Bin 0 -> 53 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image2 | Bin 0 -> 42 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image3 | Bin 0 -> 3473 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image4 | Bin 0 -> 1988 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image5 | Bin 0 -> 973 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image6 | Bin 0 -> 2184 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image7 | Bin 0 -> 2022 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image8 | Bin 0 -> 1186 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/image9 | Bin 0 -> 139 bytes .../ext/tk/sample/tkextlib/tkHTML/page1/index.html | 115 + .../ext/tk/sample/tkextlib/tkHTML/page2/image1 | Bin 0 -> 1966 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image10 | Bin 0 -> 255 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image11 | Bin 0 -> 590 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image12 | Bin 0 -> 254 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image13 | Bin 0 -> 493 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image14 | Bin 0 -> 195 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image15 | Bin 0 -> 68 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image16 | Bin 0 -> 157 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image17 | Bin 0 -> 81 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image18 | Bin 0 -> 545 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image19 | Bin 0 -> 53 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image2 | Bin 0 -> 49 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image20 | Bin 0 -> 533 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image21 | Bin 0 -> 564 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image22 | Bin 0 -> 81 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image23 | Bin 0 -> 539 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image24 | Bin 0 -> 151 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image25 | Bin 0 -> 453 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image26 | Bin 0 -> 520 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image27 | Bin 0 -> 565 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image28 | Bin 0 -> 416 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image29 | Bin 0 -> 121 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image3 | Bin 0 -> 10835 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image30 | Bin 0 -> 663 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image31 | Bin 0 -> 78 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image32 | Bin 0 -> 556 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image33 | Bin 0 -> 598 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image34 | Bin 0 -> 496 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image35 | Bin 0 -> 724 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image36 | Bin 0 -> 404 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image37 | Bin 0 -> 124 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image38 | Bin 0 -> 8330 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image39 | Bin 0 -> 369 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image4 | Bin 0 -> 268 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image5 | Bin 0 -> 492 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image6 | Bin 0 -> 246 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image7 | Bin 0 -> 551 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image8 | Bin 0 -> 497 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/image9 | Bin 0 -> 492 bytes .../ext/tk/sample/tkextlib/tkHTML/page2/index.html | 433 + .../ext/tk/sample/tkextlib/tkHTML/page3/image1 | Bin 0 -> 113 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image10 | Bin 0 -> 5088 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image11 | Bin 0 -> 4485 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image12 | Bin 0 -> 3579 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image13 | Bin 0 -> 5119 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image14 | Bin 0 -> 3603 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image2 | Bin 0 -> 74 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image3 | Bin 0 -> 681 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image4 | Bin 0 -> 3056 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image5 | Bin 0 -> 2297 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image6 | Bin 0 -> 79 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image7 | Bin 0 -> 1613 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image8 | Bin 0 -> 864 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/image9 | Bin 0 -> 2379 bytes .../ext/tk/sample/tkextlib/tkHTML/page3/index.html | 2787 + .../ext/tk/sample/tkextlib/tkHTML/page4/image1 | Bin 0 -> 42 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image2 | Bin 0 -> 14343 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image3 | Bin 0 -> 17750 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image4 | Bin 0 -> 61 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image5 | Bin 0 -> 201 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image6 | Bin 0 -> 214 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image7 | Bin 0 -> 149 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image8 | Bin 0 -> 203 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/image9 | Bin 0 -> 1504 bytes .../ext/tk/sample/tkextlib/tkHTML/page4/index.html | 768 + .../ext/tk/sample/tkextlib/tkHTML/ss.rb | 436 + .../ext/tk/sample/tkextlib/tkimg/demo.rb | 1478 + .../tkextlib/tkimg/license_terms_of_Img_extension | 41 + .../ext/tk/sample/tkextlib/tkimg/readme.txt | 3 + .../tk/sample/tkextlib/tktable/Orig_LICENSE.txt | 52 + .../ext/tk/sample/tkextlib/tktable/basic.rb | 60 + .../ext/tk/sample/tkextlib/tktable/buttons.rb | 76 + .../ext/tk/sample/tkextlib/tktable/command.rb | 89 + .../ext/tk/sample/tkextlib/tktable/debug.rb | 101 + .../ext/tk/sample/tkextlib/tktable/dynarows.rb | 99 + .../ext/tk/sample/tkextlib/tktable/maxsize.rb | 67 + .../ext/tk/sample/tkextlib/tktable/spreadsheet.rb | 137 + .../ext/tk/sample/tkextlib/tktable/tcllogo.gif | Bin 0 -> 2341 bytes .../ext/tk/sample/tkextlib/tktable/valid.rb | 88 + .../ext/tk/sample/tkextlib/treectrl/bitmaps.rb | 76 + .../ext/tk/sample/tkextlib/treectrl/demo.rb | 1305 + .../ext/tk/sample/tkextlib/treectrl/explorer.rb | 430 + .../ext/tk/sample/tkextlib/treectrl/help.rb | 404 + .../ext/tk/sample/tkextlib/treectrl/imovie.rb | 130 + .../ext/tk/sample/tkextlib/treectrl/layout.rb | 159 + .../ext/tk/sample/tkextlib/treectrl/mailwasher.rb | 269 + .../tk/sample/tkextlib/treectrl/outlook-folders.rb | 124 + .../sample/tkextlib/treectrl/outlook-newgroup.rb | 448 + .../tk/sample/tkextlib/treectrl/pics/big-dll.gif | Bin 0 -> 437 bytes .../tk/sample/tkextlib/treectrl/pics/big-exe.gif | Bin 0 -> 368 bytes .../tk/sample/tkextlib/treectrl/pics/big-file.gif | Bin 0 -> 466 bytes .../sample/tkextlib/treectrl/pics/big-folder.gif | Bin 0 -> 459 bytes .../tk/sample/tkextlib/treectrl/pics/big-txt.gif | Bin 0 -> 392 bytes .../tk/sample/tkextlib/treectrl/pics/checked.gif | Bin 0 -> 78 bytes .../ext/tk/sample/tkextlib/treectrl/pics/file.gif | Bin 0 -> 279 bytes .../tkextlib/treectrl/pics/folder-closed.gif | Bin 0 -> 111 bytes .../sample/tkextlib/treectrl/pics/folder-open.gif | Bin 0 -> 120 bytes .../tkextlib/treectrl/pics/help-book-closed.gif | Bin 0 -> 115 bytes .../tkextlib/treectrl/pics/help-book-open.gif | Bin 0 -> 128 bytes .../tk/sample/tkextlib/treectrl/pics/help-page.gif | Bin 0 -> 132 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-01.gif | Bin 0 -> 5406 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-02.gif | Bin 0 -> 5912 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-03.gif | Bin 0 -> 4696 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-04.gif | Bin 0 -> 5783 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-05.gif | Bin 0 -> 3238 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-06.gif | Bin 0 -> 3509 bytes .../tk/sample/tkextlib/treectrl/pics/imovie-07.gif | Bin 0 -> 2091 bytes .../tkextlib/treectrl/pics/internet-check-off.gif | Bin 0 -> 70 bytes .../tkextlib/treectrl/pics/internet-check-on.gif | Bin 0 -> 76 bytes .../tkextlib/treectrl/pics/internet-print.gif | Bin 0 -> 124 bytes .../tkextlib/treectrl/pics/internet-radio-off.gif | Bin 0 -> 68 bytes .../tkextlib/treectrl/pics/internet-radio-on.gif | Bin 0 -> 71 bytes .../tkextlib/treectrl/pics/internet-search.gif | Bin 0 -> 114 bytes .../tkextlib/treectrl/pics/internet-security.gif | Bin 0 -> 108 bytes .../sample/tkextlib/treectrl/pics/mac-collapse.gif | Bin 0 -> 275 bytes .../sample/tkextlib/treectrl/pics/mac-expand.gif | Bin 0 -> 277 bytes .../tkextlib/treectrl/pics/outlook-arrow.gif | Bin 0 -> 73 bytes .../sample/tkextlib/treectrl/pics/outlook-clip.gif | Bin 0 -> 73 bytes .../tkextlib/treectrl/pics/outlook-deleted.gif | Bin 0 -> 138 bytes .../tkextlib/treectrl/pics/outlook-draft.gif | Bin 0 -> 134 bytes .../tkextlib/treectrl/pics/outlook-folder.gif | Bin 0 -> 133 bytes .../tkextlib/treectrl/pics/outlook-group.gif | Bin 0 -> 144 bytes .../tkextlib/treectrl/pics/outlook-inbox.gif | Bin 0 -> 133 bytes .../tkextlib/treectrl/pics/outlook-local.gif | Bin 0 -> 146 bytes .../sample/tkextlib/treectrl/pics/outlook-main.gif | Bin 0 -> 174 bytes .../tkextlib/treectrl/pics/outlook-outbox.gif | Bin 0 -> 136 bytes .../tkextlib/treectrl/pics/outlook-read-2.gif | Bin 0 -> 343 bytes .../sample/tkextlib/treectrl/pics/outlook-read.gif | Bin 0 -> 304 bytes .../sample/tkextlib/treectrl/pics/outlook-sent.gif | Bin 0 -> 132 bytes .../tkextlib/treectrl/pics/outlook-server.gif | Bin 0 -> 163 bytes .../tkextlib/treectrl/pics/outlook-unread.gif | Bin 0 -> 303 bytes .../tkextlib/treectrl/pics/outlook-watch.gif | Bin 0 -> 98 bytes .../ext/tk/sample/tkextlib/treectrl/pics/sky.gif | Bin 0 -> 6454 bytes .../tk/sample/tkextlib/treectrl/pics/small-dll.gif | Bin 0 -> 311 bytes .../tk/sample/tkextlib/treectrl/pics/small-exe.gif | Bin 0 -> 115 bytes .../sample/tkextlib/treectrl/pics/small-file.gif | Bin 0 -> 338 bytes .../sample/tkextlib/treectrl/pics/small-folder.gif | Bin 0 -> 307 bytes .../tk/sample/tkextlib/treectrl/pics/small-txt.gif | Bin 0 -> 302 bytes .../tk/sample/tkextlib/treectrl/pics/unchecked.gif | Bin 0 -> 72 bytes .../ext/tk/sample/tkextlib/treectrl/random.rb | 508 + .../ext/tk/sample/tkextlib/treectrl/readme.txt | 2 + .../ext/tk/sample/tkextlib/treectrl/www-options.rb | 303 + .../ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt | 51 + .../ext/tk/sample/tkextlib/vu/README.txt | 50 + .../ext/tk/sample/tkextlib/vu/canvItems.rb | 90 + .../ext/tk/sample/tkextlib/vu/canvSticker.rb | 82 + .../ext/tk/sample/tkextlib/vu/canvSticker2.rb | 101 + .../ext/tk/sample/tkextlib/vu/dial_demo.rb | 113 + .../ext/tk/sample/tkextlib/vu/m128_000.xbm | 174 + .../ext/tk/sample/tkextlib/vu/oscilloscope.rb | 68 + .../ext/tk/sample/tkextlib/vu/pie.rb | 56 + .../ext/tk/sample/tkextlib/vu/vu_demo.rb | 67 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkfrom.rb | 132 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkhello.rb | 10 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkline.rb | 47 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkmenubutton.rb | 135 + .../ext/tk/sample/tkmsgcat-load_rb.rb | 102 + .../ext/tk/sample/tkmsgcat-load_rb2.rb | 102 + .../ext/tk/sample/tkmsgcat-load_tk.rb | 118 + .../ext/tk/sample/tkmulticolumnlist.rb | 743 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkmultilistbox.rb | 654 + .../ext/tk/sample/tkmultilistframe.rb | 940 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkoptdb-safeTk.rb | 73 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkoptdb.rb | 106 + lib/ruby-1.9.1-rc1/ext/tk/sample/tkrttimer.rb | 77 + lib/ruby-1.9.1-rc1/ext/tk/sample/tksleep_sample.rb | 29 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktextframe.rb | 162 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktextio.rb | 1060 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer.rb | 50 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer2.rb | 47 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer3.rb | 59 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktree.rb | 103 + lib/ruby-1.9.1-rc1/ext/tk/sample/tktree.tcl | 305 + lib/ruby-1.9.1-rc1/ext/tk/sample/ttk_wrapper.rb | 154 + lib/ruby-1.9.1-rc1/ext/tk/stubs.c | 531 + lib/ruby-1.9.1-rc1/ext/tk/stubs.h | 33 + lib/ruby-1.9.1-rc1/ext/tk/tcltklib.c | 10155 ++++ lib/ruby-1.9.1-rc1/ext/tk/tkutil/.cvsignore | 3 + lib/ruby-1.9.1-rc1/ext/tk/tkutil/depend | 1 + lib/ruby-1.9.1-rc1/ext/tk/tkutil/extconf.rb | 14 + lib/ruby-1.9.1-rc1/ext/tk/tkutil/tkutil.c | 1789 + lib/ruby-1.9.1-rc1/ext/win32ole/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/win32ole/depend | 1 + lib/ruby-1.9.1-rc1/ext/win32ole/extconf.rb | 44 + .../ext/win32ole/lib/win32ole/property.rb | 16 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel1.rb | 33 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel2.rb | 30 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel3.rb | 13 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/ie.rb | 11 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/ieconst.rb | 32 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/ienavi.rb | 40 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/ienavi2.rb | 40 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/oledirs.rb | 23 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/olegen.rb | 347 + lib/ruby-1.9.1-rc1/ext/win32ole/sample/xml.rb | 7306 +++ lib/ruby-1.9.1-rc1/ext/win32ole/win32ole.c | 9184 +++ lib/ruby-1.9.1-rc1/ext/zlib/.cvsignore | 4 + lib/ruby-1.9.1-rc1/ext/zlib/doc/zlib.rd | 911 + lib/ruby-1.9.1-rc1/ext/zlib/extconf.rb | 61 + lib/ruby-1.9.1-rc1/ext/zlib/zlib.c | 3656 ++ lib/ruby-1.9.1-rc1/file.c | 4808 ++ lib/ruby-1.9.1-rc1/gc.c | 2842 + lib/ruby-1.9.1-rc1/gc.h | 75 + lib/ruby-1.9.1-rc1/gem_prelude.rb | 352 + lib/ruby-1.9.1-rc1/golf_prelude.c | 125 + lib/ruby-1.9.1-rc1/golf_prelude.rb | 106 + lib/ruby-1.9.1-rc1/goruby.c | 24 + lib/ruby-1.9.1-rc1/hash.c | 2694 + lib/ruby-1.9.1-rc1/ia64.s | 42 + lib/ruby-1.9.1-rc1/id.c | 50 + lib/ruby-1.9.1-rc1/id.h | 163 + lib/ruby-1.9.1-rc1/include/ruby.h | 34 + lib/ruby-1.9.1-rc1/include/ruby/backward/rubyio.h | 6 + lib/ruby-1.9.1-rc1/include/ruby/backward/rubysig.h | 33 + lib/ruby-1.9.1-rc1/include/ruby/backward/st.h | 6 + lib/ruby-1.9.1-rc1/include/ruby/backward/util.h | 6 + lib/ruby-1.9.1-rc1/include/ruby/defines.h | 281 + lib/ruby-1.9.1-rc1/include/ruby/encoding.h | 297 + lib/ruby-1.9.1-rc1/include/ruby/intern.h | 769 + lib/ruby-1.9.1-rc1/include/ruby/io.h | 174 + lib/ruby-1.9.1-rc1/include/ruby/missing.h | 172 + lib/ruby-1.9.1-rc1/include/ruby/oniguruma.h | 784 + lib/ruby-1.9.1-rc1/include/ruby/re.h | 66 + lib/ruby-1.9.1-rc1/include/ruby/regex.h | 42 + lib/ruby-1.9.1-rc1/include/ruby/ruby.h | 1221 + lib/ruby-1.9.1-rc1/include/ruby/st.h | 117 + lib/ruby-1.9.1-rc1/include/ruby/util.h | 82 + lib/ruby-1.9.1-rc1/include/ruby/vm.h | 22 + lib/ruby-1.9.1-rc1/include/ruby/win32.h | 564 + lib/ruby-1.9.1-rc1/inits.c | 63 + lib/ruby-1.9.1-rc1/insns.def | 2035 + lib/ruby-1.9.1-rc1/insns.inc | 177 + lib/ruby-1.9.1-rc1/insns_info.inc | 688 + lib/ruby-1.9.1-rc1/install-sh | 0 lib/ruby-1.9.1-rc1/instruby.rb | 419 + lib/ruby-1.9.1-rc1/io.c | 8745 +++ lib/ruby-1.9.1-rc1/iseq.c | 1368 + lib/ruby-1.9.1-rc1/iseq.h | 104 + lib/ruby-1.9.1-rc1/known_errors.inc | 616 + lib/ruby-1.9.1-rc1/lex.c | 217 + lib/ruby-1.9.1-rc1/lex.c.blt | 217 + lib/ruby-1.9.1-rc1/lib/.document | 107 + lib/ruby-1.9.1-rc1/lib/English.rb | 155 + lib/ruby-1.9.1-rc1/lib/README | 80 + lib/ruby-1.9.1-rc1/lib/abbrev.rb | 103 + lib/ruby-1.9.1-rc1/lib/base64.rb | 91 + lib/ruby-1.9.1-rc1/lib/benchmark.rb | 572 + lib/ruby-1.9.1-rc1/lib/cgi.rb | 274 + lib/ruby-1.9.1-rc1/lib/cgi/.document | 1 + lib/ruby-1.9.1-rc1/lib/cgi/cookie.rb | 137 + lib/ruby-1.9.1-rc1/lib/cgi/core.rb | 784 + lib/ruby-1.9.1-rc1/lib/cgi/html.rb | 1021 + lib/ruby-1.9.1-rc1/lib/cgi/session.rb | 537 + lib/ruby-1.9.1-rc1/lib/cgi/session/pstore.rb | 111 + lib/ruby-1.9.1-rc1/lib/cgi/util.rb | 181 + lib/ruby-1.9.1-rc1/lib/cmath.rb | 233 + lib/ruby-1.9.1-rc1/lib/complex.rb | 24 + lib/ruby-1.9.1-rc1/lib/csv.rb | 2311 + lib/ruby-1.9.1-rc1/lib/date.rb | 1834 + lib/ruby-1.9.1-rc1/lib/date/format.rb | 1313 + lib/ruby-1.9.1-rc1/lib/debug.rb | 907 + lib/ruby-1.9.1-rc1/lib/delegate.rb | 311 + lib/ruby-1.9.1-rc1/lib/drb.rb | 2 + lib/ruby-1.9.1-rc1/lib/drb/acl.rb | 146 + lib/ruby-1.9.1-rc1/lib/drb/drb.rb | 1783 + lib/ruby-1.9.1-rc1/lib/drb/eq.rb | 16 + lib/ruby-1.9.1-rc1/lib/drb/extserv.rb | 71 + lib/ruby-1.9.1-rc1/lib/drb/extservm.rb | 89 + lib/ruby-1.9.1-rc1/lib/drb/gw.rb | 122 + lib/ruby-1.9.1-rc1/lib/drb/invokemethod.rb | 34 + lib/ruby-1.9.1-rc1/lib/drb/observer.rb | 22 + lib/ruby-1.9.1-rc1/lib/drb/ssl.rb | 190 + lib/ruby-1.9.1-rc1/lib/drb/timeridconv.rb | 91 + lib/ruby-1.9.1-rc1/lib/drb/unix.rb | 108 + lib/ruby-1.9.1-rc1/lib/e2mmap.rb | 172 + lib/ruby-1.9.1-rc1/lib/erb.rb | 867 + lib/ruby-1.9.1-rc1/lib/fileutils.rb | 1580 + lib/ruby-1.9.1-rc1/lib/find.rb | 81 + lib/ruby-1.9.1-rc1/lib/forwardable.rb | 177 + lib/ruby-1.9.1-rc1/lib/getoptlong.rb | 610 + lib/ruby-1.9.1-rc1/lib/gserver.rb | 253 + lib/ruby-1.9.1-rc1/lib/ipaddr.rb | 813 + lib/ruby-1.9.1-rc1/lib/irb.rb | 346 + lib/ruby-1.9.1-rc1/lib/irb/cmd/chws.rb | 32 + lib/ruby-1.9.1-rc1/lib/irb/cmd/fork.rb | 38 + lib/ruby-1.9.1-rc1/lib/irb/cmd/help.rb | 34 + lib/ruby-1.9.1-rc1/lib/irb/cmd/load.rb | 66 + lib/ruby-1.9.1-rc1/lib/irb/cmd/nop.rb | 38 + lib/ruby-1.9.1-rc1/lib/irb/cmd/pushws.rb | 38 + lib/ruby-1.9.1-rc1/lib/irb/cmd/subirb.rb | 42 + lib/ruby-1.9.1-rc1/lib/irb/completion.rb | 207 + lib/ruby-1.9.1-rc1/lib/irb/context.rb | 255 + lib/ruby-1.9.1-rc1/lib/irb/ext/change-ws.rb | 61 + lib/ruby-1.9.1-rc1/lib/irb/ext/history.rb | 109 + lib/ruby-1.9.1-rc1/lib/irb/ext/loader.rb | 119 + lib/ruby-1.9.1-rc1/lib/irb/ext/math-mode.rb | 36 + lib/ruby-1.9.1-rc1/lib/irb/ext/multi-irb.rb | 240 + lib/ruby-1.9.1-rc1/lib/irb/ext/save-history.rb | 86 + lib/ruby-1.9.1-rc1/lib/irb/ext/tracer.rb | 60 + lib/ruby-1.9.1-rc1/lib/irb/ext/use-loader.rb | 64 + lib/ruby-1.9.1-rc1/lib/irb/ext/workspaces.rb | 55 + lib/ruby-1.9.1-rc1/lib/irb/extend-command.rb | 268 + lib/ruby-1.9.1-rc1/lib/irb/frame.rb | 66 + lib/ruby-1.9.1-rc1/lib/irb/help.rb | 35 + lib/ruby-1.9.1-rc1/lib/irb/init.rb | 286 + lib/ruby-1.9.1-rc1/lib/irb/input-method.rb | 142 + lib/ruby-1.9.1-rc1/lib/irb/lc/error.rb | 29 + lib/ruby-1.9.1-rc1/lib/irb/lc/help-message | 38 + .../lib/irb/lc/ja/encoding_aliases.rb | 8 + lib/ruby-1.9.1-rc1/lib/irb/lc/ja/error.rb | 27 + lib/ruby-1.9.1-rc1/lib/irb/lc/ja/help-message | 39 + lib/ruby-1.9.1-rc1/lib/irb/locale.rb | 195 + lib/ruby-1.9.1-rc1/lib/irb/magic-file.rb | 36 + lib/ruby-1.9.1-rc1/lib/irb/notifier.rb | 144 + lib/ruby-1.9.1-rc1/lib/irb/output-method.rb | 69 + lib/ruby-1.9.1-rc1/lib/irb/ruby-lex.rb | 1155 + lib/ruby-1.9.1-rc1/lib/irb/ruby-token.rb | 270 + lib/ruby-1.9.1-rc1/lib/irb/slex.rb | 282 + lib/ruby-1.9.1-rc1/lib/irb/src_encoding.rb | 4 + lib/ruby-1.9.1-rc1/lib/irb/version.rb | 15 + lib/ruby-1.9.1-rc1/lib/irb/workspace.rb | 108 + lib/ruby-1.9.1-rc1/lib/irb/ws-for-case-2.rb | 14 + lib/ruby-1.9.1-rc1/lib/irb/xmp.rb | 85 + lib/ruby-1.9.1-rc1/lib/logger.rb | 732 + lib/ruby-1.9.1-rc1/lib/mathn.rb | 206 + lib/ruby-1.9.1-rc1/lib/matrix.rb | 1382 + lib/ruby-1.9.1-rc1/lib/minitest/autorun.rb | 9 + lib/ruby-1.9.1-rc1/lib/minitest/mock.rb | 37 + lib/ruby-1.9.1-rc1/lib/minitest/spec.rb | 89 + lib/ruby-1.9.1-rc1/lib/minitest/unit.rb | 497 + lib/ruby-1.9.1-rc1/lib/mkmf.rb | 1910 + lib/ruby-1.9.1-rc1/lib/monitor.rb | 265 + lib/ruby-1.9.1-rc1/lib/mutex_m.rb | 91 + lib/ruby-1.9.1-rc1/lib/net/.document | 8 + lib/ruby-1.9.1-rc1/lib/net/ftp.rb | 981 + lib/ruby-1.9.1-rc1/lib/net/http.rb | 2398 + lib/ruby-1.9.1-rc1/lib/net/https.rb | 136 + lib/ruby-1.9.1-rc1/lib/net/imap.rb | 3449 ++ lib/ruby-1.9.1-rc1/lib/net/pop.rb | 1000 + lib/ruby-1.9.1-rc1/lib/net/protocol.rb | 382 + lib/ruby-1.9.1-rc1/lib/net/smtp.rb | 1014 + lib/ruby-1.9.1-rc1/lib/net/telnet.rb | 759 + lib/ruby-1.9.1-rc1/lib/observer.rb | 193 + lib/ruby-1.9.1-rc1/lib/open-uri.rb | 830 + lib/ruby-1.9.1-rc1/lib/open3.rb | 98 + lib/ruby-1.9.1-rc1/lib/optparse.rb | 1810 + lib/ruby-1.9.1-rc1/lib/optparse/date.rb | 17 + lib/ruby-1.9.1-rc1/lib/optparse/shellwords.rb | 6 + lib/ruby-1.9.1-rc1/lib/optparse/time.rb | 10 + lib/ruby-1.9.1-rc1/lib/optparse/uri.rb | 6 + lib/ruby-1.9.1-rc1/lib/optparse/version.rb | 70 + lib/ruby-1.9.1-rc1/lib/ostruct.rb | 147 + lib/ruby-1.9.1-rc1/lib/pathname.rb | 1078 + lib/ruby-1.9.1-rc1/lib/pp.rb | 700 + lib/ruby-1.9.1-rc1/lib/prettyprint.rb | 896 + lib/ruby-1.9.1-rc1/lib/prime.rb | 461 + lib/ruby-1.9.1-rc1/lib/profile.rb | 10 + lib/ruby-1.9.1-rc1/lib/profiler.rb | 59 + lib/ruby-1.9.1-rc1/lib/pstore.rb | 543 + lib/ruby-1.9.1-rc1/lib/racc/parser.rb | 441 + lib/ruby-1.9.1-rc1/lib/rake.rb | 2465 + lib/ruby-1.9.1-rc1/lib/rake/classic_namespace.rb | 8 + lib/ruby-1.9.1-rc1/lib/rake/clean.rb | 33 + lib/ruby-1.9.1-rc1/lib/rake/gempackagetask.rb | 97 + lib/ruby-1.9.1-rc1/lib/rake/loaders/makefile.rb | 35 + lib/ruby-1.9.1-rc1/lib/rake/packagetask.rb | 185 + lib/ruby-1.9.1-rc1/lib/rake/rake_test_loader.rb | 5 + lib/ruby-1.9.1-rc1/lib/rake/rdoctask.rb | 147 + lib/ruby-1.9.1-rc1/lib/rake/runtest.rb | 23 + lib/ruby-1.9.1-rc1/lib/rake/tasklib.rb | 23 + lib/ruby-1.9.1-rc1/lib/rake/testtask.rb | 161 + lib/ruby-1.9.1-rc1/lib/rake/win32.rb | 54 + lib/ruby-1.9.1-rc1/lib/rational.rb | 19 + lib/ruby-1.9.1-rc1/lib/rbconfig/datadir.rb | 24 + lib/ruby-1.9.1-rc1/lib/rdoc.rb | 395 + lib/ruby-1.9.1-rc1/lib/rdoc/README | 232 + lib/ruby-1.9.1-rc1/lib/rdoc/code_objects.rb | 1061 + lib/ruby-1.9.1-rc1/lib/rdoc/diagram.rb | 340 + lib/ruby-1.9.1-rc1/lib/rdoc/dot.rb | 249 + lib/ruby-1.9.1-rc1/lib/rdoc/generator.rb | 1082 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/chm.rb | 113 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/chm/chm.rb | 100 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/html.rb | 445 + .../lib/rdoc/generator/html/common.rb | 24 + .../lib/rdoc/generator/html/frameless.rb | 92 + .../lib/rdoc/generator/html/hefss.rb | 150 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/html.rb | 769 + .../lib/rdoc/generator/html/kilmer.rb | 151 + .../lib/rdoc/generator/html/kilmerfactory.rb | 427 + .../lib/rdoc/generator/html/one_page_html.rb | 122 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/ri.rb | 226 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo.rb | 81 + .../lib/rdoc/generator/texinfo/class.texinfo.erb | 44 + .../lib/rdoc/generator/texinfo/file.texinfo.erb | 6 + .../lib/rdoc/generator/texinfo/method.texinfo.erb | 6 + .../lib/rdoc/generator/texinfo/texinfo.erb | 28 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml.rb | 117 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/rdf.rb | 113 + lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/xml.rb | 123 + lib/ruby-1.9.1-rc1/lib/rdoc/known_classes.rb | 68 + lib/ruby-1.9.1-rc1/lib/rdoc/markup.rb | 378 + .../lib/rdoc/markup/attribute_manager.rb | 265 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/formatter.rb | 14 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/fragments.rb | 337 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/inline.rb | 101 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/lines.rb | 152 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/preprocess.rb | 75 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_flow.rb | 185 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html.rb | 403 + .../lib/rdoc/markup/to_html_crossref.rb | 148 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_latex.rb | 328 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_test.rb | 50 + lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_texinfo.rb | 69 + lib/ruby-1.9.1-rc1/lib/rdoc/options.rb | 638 + lib/ruby-1.9.1-rc1/lib/rdoc/parser.rb | 142 + lib/ruby-1.9.1-rc1/lib/rdoc/parser/c.rb | 661 + lib/ruby-1.9.1-rc1/lib/rdoc/parser/f95.rb | 1835 + lib/ruby-1.9.1-rc1/lib/rdoc/parser/perl.rb | 165 + lib/ruby-1.9.1-rc1/lib/rdoc/parser/ruby.rb | 2829 + lib/ruby-1.9.1-rc1/lib/rdoc/parser/simple.rb | 38 + lib/ruby-1.9.1-rc1/lib/rdoc/rdoc.rb | 293 + lib/ruby-1.9.1-rc1/lib/rdoc/ri.rb | 8 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/cache.rb | 187 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/descriptions.rb | 156 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/display.rb | 392 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/driver.rb | 669 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/formatter.rb | 616 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/paths.rb | 93 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/reader.rb | 106 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/util.rb | 79 + lib/ruby-1.9.1-rc1/lib/rdoc/ri/writer.rb | 68 + lib/ruby-1.9.1-rc1/lib/rdoc/stats.rb | 115 + lib/ruby-1.9.1-rc1/lib/rdoc/template.rb | 64 + lib/ruby-1.9.1-rc1/lib/rdoc/tokenstream.rb | 33 + lib/ruby-1.9.1-rc1/lib/resolv-replace.rb | 63 + lib/ruby-1.9.1-rc1/lib/resolv.rb | 2262 + lib/ruby-1.9.1-rc1/lib/rexml/attlistdecl.rb | 62 + lib/ruby-1.9.1-rc1/lib/rexml/attribute.rb | 188 + lib/ruby-1.9.1-rc1/lib/rexml/cdata.rb | 67 + lib/ruby-1.9.1-rc1/lib/rexml/child.rb | 96 + lib/ruby-1.9.1-rc1/lib/rexml/comment.rb | 80 + lib/ruby-1.9.1-rc1/lib/rexml/doctype.rb | 270 + lib/ruby-1.9.1-rc1/lib/rexml/document.rb | 231 + lib/ruby-1.9.1-rc1/lib/rexml/dtd/attlistdecl.rb | 10 + lib/ruby-1.9.1-rc1/lib/rexml/dtd/dtd.rb | 51 + lib/ruby-1.9.1-rc1/lib/rexml/dtd/elementdecl.rb | 17 + lib/ruby-1.9.1-rc1/lib/rexml/dtd/entitydecl.rb | 56 + lib/ruby-1.9.1-rc1/lib/rexml/dtd/notationdecl.rb | 39 + lib/ruby-1.9.1-rc1/lib/rexml/element.rb | 1246 + lib/ruby-1.9.1-rc1/lib/rexml/encoding.rb | 71 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/CP-1252.rb | 103 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/EUC-JP.rb | 35 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/ICONV.rb | 22 + .../lib/rexml/encodings/ISO-8859-1.rb | 7 + .../lib/rexml/encodings/ISO-8859-15.rb | 72 + .../lib/rexml/encodings/SHIFT-JIS.rb | 37 + .../lib/rexml/encodings/SHIFT_JIS.rb | 1 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/UNILE.rb | 34 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/US-ASCII.rb | 30 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-16.rb | 35 + lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-8.rb | 18 + lib/ruby-1.9.1-rc1/lib/rexml/entity.rb | 166 + lib/ruby-1.9.1-rc1/lib/rexml/formatters/default.rb | 109 + lib/ruby-1.9.1-rc1/lib/rexml/formatters/pretty.rb | 139 + .../lib/rexml/formatters/transitive.rb | 58 + lib/ruby-1.9.1-rc1/lib/rexml/functions.rb | 388 + lib/ruby-1.9.1-rc1/lib/rexml/instruction.rb | 70 + lib/ruby-1.9.1-rc1/lib/rexml/light/node.rb | 196 + lib/ruby-1.9.1-rc1/lib/rexml/namespace.rb | 47 + lib/ruby-1.9.1-rc1/lib/rexml/node.rb | 75 + lib/ruby-1.9.1-rc1/lib/rexml/output.rb | 24 + lib/ruby-1.9.1-rc1/lib/rexml/parent.rb | 166 + lib/ruby-1.9.1-rc1/lib/rexml/parseexception.rb | 51 + lib/ruby-1.9.1-rc1/lib/rexml/parsers/baseparser.rb | 530 + .../lib/rexml/parsers/lightparser.rb | 58 + lib/ruby-1.9.1-rc1/lib/rexml/parsers/pullparser.rb | 196 + lib/ruby-1.9.1-rc1/lib/rexml/parsers/sax2parser.rb | 247 + .../lib/rexml/parsers/streamparser.rb | 46 + lib/ruby-1.9.1-rc1/lib/rexml/parsers/treeparser.rb | 100 + .../lib/rexml/parsers/ultralightparser.rb | 56 + .../lib/rexml/parsers/xpathparser.rb | 698 + lib/ruby-1.9.1-rc1/lib/rexml/quickpath.rb | 263 + lib/ruby-1.9.1-rc1/lib/rexml/rexml.rb | 31 + lib/ruby-1.9.1-rc1/lib/rexml/sax2listener.rb | 97 + lib/ruby-1.9.1-rc1/lib/rexml/source.rb | 258 + lib/ruby-1.9.1-rc1/lib/rexml/streamlistener.rb | 92 + lib/ruby-1.9.1-rc1/lib/rexml/syncenumerator.rb | 32 + lib/ruby-1.9.1-rc1/lib/rexml/text.rb | 404 + .../lib/rexml/undefinednamespaceexception.rb | 8 + lib/ruby-1.9.1-rc1/lib/rexml/validation/relaxng.rb | 559 + .../lib/rexml/validation/validation.rb | 155 + .../lib/rexml/validation/validationexception.rb | 9 + lib/ruby-1.9.1-rc1/lib/rexml/xmldecl.rb | 119 + lib/ruby-1.9.1-rc1/lib/rexml/xmltokens.rb | 18 + lib/ruby-1.9.1-rc1/lib/rexml/xpath.rb | 77 + lib/ruby-1.9.1-rc1/lib/rexml/xpath_parser.rb | 792 + lib/ruby-1.9.1-rc1/lib/rinda/.document | 3 + lib/ruby-1.9.1-rc1/lib/rinda/rinda.rb | 283 + lib/ruby-1.9.1-rc1/lib/rinda/ring.rb | 271 + lib/ruby-1.9.1-rc1/lib/rinda/tuplespace.rb | 642 + lib/ruby-1.9.1-rc1/lib/rss.rb | 19 + lib/ruby-1.9.1-rc1/lib/rss/0.9.rb | 428 + lib/ruby-1.9.1-rc1/lib/rss/1.0.rb | 452 + lib/ruby-1.9.1-rc1/lib/rss/2.0.rb | 111 + lib/ruby-1.9.1-rc1/lib/rss/atom.rb | 748 + lib/ruby-1.9.1-rc1/lib/rss/content.rb | 31 + lib/ruby-1.9.1-rc1/lib/rss/content/1.0.rb | 10 + lib/ruby-1.9.1-rc1/lib/rss/content/2.0.rb | 12 + lib/ruby-1.9.1-rc1/lib/rss/converter.rb | 170 + lib/ruby-1.9.1-rc1/lib/rss/dublincore.rb | 161 + lib/ruby-1.9.1-rc1/lib/rss/dublincore/1.0.rb | 13 + lib/ruby-1.9.1-rc1/lib/rss/dublincore/2.0.rb | 13 + lib/ruby-1.9.1-rc1/lib/rss/dublincore/atom.rb | 17 + lib/ruby-1.9.1-rc1/lib/rss/image.rb | 193 + lib/ruby-1.9.1-rc1/lib/rss/itunes.rb | 410 + lib/ruby-1.9.1-rc1/lib/rss/maker.rb | 44 + lib/ruby-1.9.1-rc1/lib/rss/maker/0.9.rb | 467 + lib/ruby-1.9.1-rc1/lib/rss/maker/1.0.rb | 434 + lib/ruby-1.9.1-rc1/lib/rss/maker/2.0.rb | 223 + lib/ruby-1.9.1-rc1/lib/rss/maker/atom.rb | 172 + lib/ruby-1.9.1-rc1/lib/rss/maker/base.rb | 880 + lib/ruby-1.9.1-rc1/lib/rss/maker/content.rb | 21 + lib/ruby-1.9.1-rc1/lib/rss/maker/dublincore.rb | 124 + lib/ruby-1.9.1-rc1/lib/rss/maker/entry.rb | 163 + lib/ruby-1.9.1-rc1/lib/rss/maker/feed.rb | 429 + lib/ruby-1.9.1-rc1/lib/rss/maker/image.rb | 111 + lib/ruby-1.9.1-rc1/lib/rss/maker/itunes.rb | 242 + lib/ruby-1.9.1-rc1/lib/rss/maker/slash.rb | 33 + lib/ruby-1.9.1-rc1/lib/rss/maker/syndication.rb | 18 + lib/ruby-1.9.1-rc1/lib/rss/maker/taxonomy.rb | 118 + lib/ruby-1.9.1-rc1/lib/rss/maker/trackback.rb | 61 + lib/ruby-1.9.1-rc1/lib/rss/parser.rb | 551 + lib/ruby-1.9.1-rc1/lib/rss/rexmlparser.rb | 54 + lib/ruby-1.9.1-rc1/lib/rss/rss.rb | 1313 + lib/ruby-1.9.1-rc1/lib/rss/slash.rb | 49 + lib/ruby-1.9.1-rc1/lib/rss/syndication.rb | 67 + lib/ruby-1.9.1-rc1/lib/rss/taxonomy.rb | 145 + lib/ruby-1.9.1-rc1/lib/rss/trackback.rb | 288 + lib/ruby-1.9.1-rc1/lib/rss/utils.rb | 111 + lib/ruby-1.9.1-rc1/lib/rss/xml-stylesheet.rb | 105 + lib/ruby-1.9.1-rc1/lib/rss/xml.rb | 71 + lib/ruby-1.9.1-rc1/lib/rss/xmlparser.rb | 93 + lib/ruby-1.9.1-rc1/lib/rss/xmlscanner.rb | 121 + lib/ruby-1.9.1-rc1/lib/rubygems.rb | 889 + lib/ruby-1.9.1-rc1/lib/rubygems/builder.rb | 88 + lib/ruby-1.9.1-rc1/lib/rubygems/command.rb | 406 + lib/ruby-1.9.1-rc1/lib/rubygems/command_manager.rb | 146 + .../lib/rubygems/commands/build_command.rb | 53 + .../lib/rubygems/commands/cert_command.rb | 86 + .../lib/rubygems/commands/check_command.rb | 75 + .../lib/rubygems/commands/cleanup_command.rb | 91 + .../lib/rubygems/commands/contents_command.rb | 74 + .../lib/rubygems/commands/dependency_command.rb | 188 + .../lib/rubygems/commands/environment_command.rb | 128 + .../lib/rubygems/commands/fetch_command.rb | 62 + .../rubygems/commands/generate_index_command.rb | 57 + .../lib/rubygems/commands/help_command.rb | 172 + .../lib/rubygems/commands/install_command.rb | 148 + .../lib/rubygems/commands/list_command.rb | 35 + .../lib/rubygems/commands/lock_command.rb | 110 + .../lib/rubygems/commands/mirror_command.rb | 111 + .../lib/rubygems/commands/outdated_command.rb | 33 + .../lib/rubygems/commands/pristine_command.rb | 93 + .../lib/rubygems/commands/query_command.rb | 233 + .../lib/rubygems/commands/rdoc_command.rb | 82 + .../lib/rubygems/commands/search_command.rb | 37 + .../lib/rubygems/commands/server_command.rb | 48 + .../lib/rubygems/commands/sources_command.rb | 152 + .../lib/rubygems/commands/specification_command.rb | 77 + .../lib/rubygems/commands/stale_command.rb | 27 + .../lib/rubygems/commands/uninstall_command.rb | 73 + .../lib/rubygems/commands/unpack_command.rb | 95 + .../lib/rubygems/commands/update_command.rb | 181 + .../lib/rubygems/commands/which_command.rb | 87 + lib/ruby-1.9.1-rc1/lib/rubygems/config_file.rb | 266 + lib/ruby-1.9.1-rc1/lib/rubygems/custom_require.rb | 46 + lib/ruby-1.9.1-rc1/lib/rubygems/defaults.rb | 92 + lib/ruby-1.9.1-rc1/lib/rubygems/dependency.rb | 119 + .../lib/rubygems/dependency_installer.rb | 258 + lib/ruby-1.9.1-rc1/lib/rubygems/dependency_list.rb | 165 + .../lib/rubygems/digest/digest_adapter.rb | 40 + lib/ruby-1.9.1-rc1/lib/rubygems/digest/md5.rb | 23 + lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha1.rb | 17 + lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha2.rb | 17 + lib/ruby-1.9.1-rc1/lib/rubygems/doc_manager.rb | 214 + lib/ruby-1.9.1-rc1/lib/rubygems/exceptions.rb | 84 + lib/ruby-1.9.1-rc1/lib/rubygems/ext.rb | 18 + lib/ruby-1.9.1-rc1/lib/rubygems/ext/builder.rb | 56 + .../lib/rubygems/ext/configure_builder.rb | 24 + .../lib/rubygems/ext/ext_conf_builder.rb | 23 + .../lib/rubygems/ext/rake_builder.rb | 27 + lib/ruby-1.9.1-rc1/lib/rubygems/format.rb | 87 + lib/ruby-1.9.1-rc1/lib/rubygems/gem_openssl.rb | 83 + .../lib/rubygems/gem_path_searcher.rb | 100 + lib/ruby-1.9.1-rc1/lib/rubygems/gem_runner.rb | 58 + lib/ruby-1.9.1-rc1/lib/rubygems/indexer.rb | 370 + .../lib/rubygems/indexer/abstract_index_builder.rb | 88 + .../lib/rubygems/indexer/latest_index_builder.rb | 35 + .../lib/rubygems/indexer/marshal_index_builder.rb | 17 + .../lib/rubygems/indexer/master_index_builder.rb | 54 + .../lib/rubygems/indexer/quick_index_builder.rb | 50 + .../lib/rubygems/install_update_options.rb | 113 + lib/ruby-1.9.1-rc1/lib/rubygems/installer.rb | 575 + .../lib/rubygems/local_remote_options.rb | 134 + lib/ruby-1.9.1-rc1/lib/rubygems/old_format.rb | 148 + lib/ruby-1.9.1-rc1/lib/rubygems/package.rb | 95 + .../lib/rubygems/package/f_sync_dir.rb | 24 + .../lib/rubygems/package/tar_header.rb | 245 + .../lib/rubygems/package/tar_input.rb | 219 + .../lib/rubygems/package/tar_output.rb | 143 + .../lib/rubygems/package/tar_reader.rb | 86 + .../lib/rubygems/package/tar_reader/entry.rb | 99 + .../lib/rubygems/package/tar_writer.rb | 180 + lib/ruby-1.9.1-rc1/lib/rubygems/platform.rb | 178 + lib/ruby-1.9.1-rc1/lib/rubygems/remote_fetcher.rb | 344 + .../lib/rubygems/require_paths_builder.rb | 15 + lib/ruby-1.9.1-rc1/lib/rubygems/requirement.rb | 163 + .../lib/rubygems/rubygems_version.rb | 6 + lib/ruby-1.9.1-rc1/lib/rubygems/security.rb | 786 + lib/ruby-1.9.1-rc1/lib/rubygems/server.rb | 629 + lib/ruby-1.9.1-rc1/lib/rubygems/source_index.rb | 559 + .../lib/rubygems/source_info_cache.rb | 393 + .../lib/rubygems/source_info_cache_entry.rb | 56 + lib/ruby-1.9.1-rc1/lib/rubygems/spec_fetcher.rb | 249 + lib/ruby-1.9.1-rc1/lib/rubygems/specification.rb | 1262 + lib/ruby-1.9.1-rc1/lib/rubygems/test_utilities.rb | 131 + lib/ruby-1.9.1-rc1/lib/rubygems/timer.rb | 25 + lib/ruby-1.9.1-rc1/lib/rubygems/uninstaller.rb | 242 + .../lib/rubygems/user_interaction.rb | 360 + lib/ruby-1.9.1-rc1/lib/rubygems/validator.rb | 209 + lib/ruby-1.9.1-rc1/lib/rubygems/version.rb | 167 + lib/ruby-1.9.1-rc1/lib/rubygems/version_option.rb | 48 + lib/ruby-1.9.1-rc1/lib/scanf.rb | 703 + lib/ruby-1.9.1-rc1/lib/securerandom.rb | 182 + lib/ruby-1.9.1-rc1/lib/set.rb | 1274 + lib/ruby-1.9.1-rc1/lib/shell.rb | 300 + lib/ruby-1.9.1-rc1/lib/shell/builtin-command.rb | 160 + lib/ruby-1.9.1-rc1/lib/shell/command-processor.rb | 593 + lib/ruby-1.9.1-rc1/lib/shell/error.rb | 25 + lib/ruby-1.9.1-rc1/lib/shell/filter.rb | 109 + lib/ruby-1.9.1-rc1/lib/shell/process-controller.rb | 319 + lib/ruby-1.9.1-rc1/lib/shell/system-command.rb | 159 + lib/ruby-1.9.1-rc1/lib/shell/version.rb | 15 + lib/ruby-1.9.1-rc1/lib/shellwords.rb | 156 + lib/ruby-1.9.1-rc1/lib/singleton.rb | 313 + lib/ruby-1.9.1-rc1/lib/sync.rb | 307 + lib/ruby-1.9.1-rc1/lib/tempfile.rb | 215 + lib/ruby-1.9.1-rc1/lib/test/unit.rb | 66 + lib/ruby-1.9.1-rc1/lib/test/unit/assertions.rb | 115 + lib/ruby-1.9.1-rc1/lib/test/unit/testcase.rb | 12 + lib/ruby-1.9.1-rc1/lib/thread.rb | 367 + lib/ruby-1.9.1-rc1/lib/thwait.rb | 168 + lib/ruby-1.9.1-rc1/lib/time.rb | 869 + lib/ruby-1.9.1-rc1/lib/timeout.rb | 108 + lib/ruby-1.9.1-rc1/lib/tmpdir.rb | 137 + lib/ruby-1.9.1-rc1/lib/tracer.rb | 166 + lib/ruby-1.9.1-rc1/lib/tsort.rb | 290 + lib/ruby-1.9.1-rc1/lib/ubygems.rb | 10 + lib/ruby-1.9.1-rc1/lib/un.rb | 302 + lib/ruby-1.9.1-rc1/lib/uri.rb | 29 + lib/ruby-1.9.1-rc1/lib/uri/.document | 7 + lib/ruby-1.9.1-rc1/lib/uri/common.rb | 727 + lib/ruby-1.9.1-rc1/lib/uri/ftp.rb | 198 + lib/ruby-1.9.1-rc1/lib/uri/generic.rb | 1128 + lib/ruby-1.9.1-rc1/lib/uri/http.rb | 100 + lib/ruby-1.9.1-rc1/lib/uri/https.rb | 20 + lib/ruby-1.9.1-rc1/lib/uri/ldap.rb | 190 + lib/ruby-1.9.1-rc1/lib/uri/ldaps.rb | 12 + lib/ruby-1.9.1-rc1/lib/uri/mailto.rb | 266 + lib/ruby-1.9.1-rc1/lib/weakref.rb | 80 + lib/ruby-1.9.1-rc1/lib/webrick.rb | 29 + lib/ruby-1.9.1-rc1/lib/webrick/accesslog.rb | 67 + lib/ruby-1.9.1-rc1/lib/webrick/cgi.rb | 260 + lib/ruby-1.9.1-rc1/lib/webrick/compat.rb | 15 + lib/ruby-1.9.1-rc1/lib/webrick/config.rb | 100 + lib/ruby-1.9.1-rc1/lib/webrick/cookie.rb | 110 + lib/ruby-1.9.1-rc1/lib/webrick/htmlutils.rb | 25 + lib/ruby-1.9.1-rc1/lib/webrick/httpauth.rb | 45 + .../lib/webrick/httpauth/authenticator.rb | 79 + .../lib/webrick/httpauth/basicauth.rb | 65 + .../lib/webrick/httpauth/digestauth.rb | 344 + .../lib/webrick/httpauth/htdigest.rb | 91 + lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htgroup.rb | 61 + .../lib/webrick/httpauth/htpasswd.rb | 83 + lib/ruby-1.9.1-rc1/lib/webrick/httpauth/userdb.rb | 29 + lib/ruby-1.9.1-rc1/lib/webrick/httpproxy.rb | 288 + lib/ruby-1.9.1-rc1/lib/webrick/httprequest.rb | 406 + lib/ruby-1.9.1-rc1/lib/webrick/httpresponse.rb | 326 + lib/ruby-1.9.1-rc1/lib/webrick/https.rb | 63 + lib/ruby-1.9.1-rc1/lib/webrick/httpserver.rb | 217 + lib/ruby-1.9.1-rc1/lib/webrick/httpservlet.rb | 22 + .../lib/webrick/httpservlet/abstract.rb | 71 + .../lib/webrick/httpservlet/cgi_runner.rb | 47 + .../lib/webrick/httpservlet/cgihandler.rb | 110 + .../lib/webrick/httpservlet/erbhandler.rb | 54 + .../lib/webrick/httpservlet/filehandler.rb | 435 + .../lib/webrick/httpservlet/prochandler.rb | 33 + lib/ruby-1.9.1-rc1/lib/webrick/httpstatus.rb | 126 + lib/ruby-1.9.1-rc1/lib/webrick/httputils.rb | 392 + lib/ruby-1.9.1-rc1/lib/webrick/httpversion.rb | 49 + lib/ruby-1.9.1-rc1/lib/webrick/log.rb | 88 + lib/ruby-1.9.1-rc1/lib/webrick/server.rb | 210 + lib/ruby-1.9.1-rc1/lib/webrick/ssl.rb | 126 + lib/ruby-1.9.1-rc1/lib/webrick/utils.rb | 175 + lib/ruby-1.9.1-rc1/lib/webrick/version.rb | 13 + lib/ruby-1.9.1-rc1/lib/xmlrpc/.document | 1 + lib/ruby-1.9.1-rc1/lib/xmlrpc/README.rdoc | 300 + lib/ruby-1.9.1-rc1/lib/xmlrpc/README.txt | 31 + lib/ruby-1.9.1-rc1/lib/xmlrpc/base64.rb | 81 + lib/ruby-1.9.1-rc1/lib/xmlrpc/client.rb | 625 + lib/ruby-1.9.1-rc1/lib/xmlrpc/config.rb | 40 + lib/ruby-1.9.1-rc1/lib/xmlrpc/create.rb | 290 + lib/ruby-1.9.1-rc1/lib/xmlrpc/datetime.rb | 142 + lib/ruby-1.9.1-rc1/lib/xmlrpc/httpserver.rb | 178 + lib/ruby-1.9.1-rc1/lib/xmlrpc/marshal.rb | 76 + lib/ruby-1.9.1-rc1/lib/xmlrpc/parser.rb | 813 + lib/ruby-1.9.1-rc1/lib/xmlrpc/server.rb | 782 + lib/ruby-1.9.1-rc1/lib/xmlrpc/utils.rb | 165 + lib/ruby-1.9.1-rc1/lib/yaml.rb | 440 + lib/ruby-1.9.1-rc1/lib/yaml/baseemitter.rb | 242 + lib/ruby-1.9.1-rc1/lib/yaml/basenode.rb | 216 + lib/ruby-1.9.1-rc1/lib/yaml/constants.rb | 45 + lib/ruby-1.9.1-rc1/lib/yaml/dbm.rb | 111 + lib/ruby-1.9.1-rc1/lib/yaml/encoding.rb | 33 + lib/ruby-1.9.1-rc1/lib/yaml/error.rb | 34 + lib/ruby-1.9.1-rc1/lib/yaml/loader.rb | 14 + lib/ruby-1.9.1-rc1/lib/yaml/rubytypes.rb | 446 + lib/ruby-1.9.1-rc1/lib/yaml/store.rb | 43 + lib/ruby-1.9.1-rc1/lib/yaml/stream.rb | 40 + lib/ruby-1.9.1-rc1/lib/yaml/stringio.rb | 83 + lib/ruby-1.9.1-rc1/lib/yaml/syck.rb | 19 + lib/ruby-1.9.1-rc1/lib/yaml/tag.rb | 91 + lib/ruby-1.9.1-rc1/lib/yaml/types.rb | 192 + lib/ruby-1.9.1-rc1/lib/yaml/yamlnode.rb | 54 + lib/ruby-1.9.1-rc1/lib/yaml/ypath.rb | 52 + lib/ruby-1.9.1-rc1/load.c | 721 + lib/ruby-1.9.1-rc1/main.c | 37 + lib/ruby-1.9.1-rc1/man/erb.1 | 158 + lib/ruby-1.9.1-rc1/man/goruby.1 | 39 + lib/ruby-1.9.1-rc1/man/irb.1 | 173 + lib/ruby-1.9.1-rc1/man/rake.1 | 169 + lib/ruby-1.9.1-rc1/man/ri.1 | 180 + lib/ruby-1.9.1-rc1/man/ruby.1 | 511 + lib/ruby-1.9.1-rc1/marshal.c | 1752 + lib/ruby-1.9.1-rc1/math.c | 758 + lib/ruby-1.9.1-rc1/miniprelude.c | 54 + lib/ruby-1.9.1-rc1/misc/README | 8 + lib/ruby-1.9.1-rc1/misc/inf-ruby.el | 416 + lib/ruby-1.9.1-rc1/misc/ruby-electric.el | 200 + lib/ruby-1.9.1-rc1/misc/ruby-mode.el | 1420 + lib/ruby-1.9.1-rc1/misc/ruby-style.el | 76 + lib/ruby-1.9.1-rc1/misc/rubydb2x.el | 104 + lib/ruby-1.9.1-rc1/misc/rubydb3x.el | 115 + lib/ruby-1.9.1-rc1/missing/acosh.c | 93 + lib/ruby-1.9.1-rc1/missing/alloca.c | 194 + lib/ruby-1.9.1-rc1/missing/cbrt.c | 10 + lib/ruby-1.9.1-rc1/missing/crypt.c | 992 + lib/ruby-1.9.1-rc1/missing/dup2.c | 60 + lib/ruby-1.9.1-rc1/missing/erf.c | 88 + lib/ruby-1.9.1-rc1/missing/file.h | 22 + lib/ruby-1.9.1-rc1/missing/fileblocks.c | 1 + lib/ruby-1.9.1-rc1/missing/finite.c | 7 + lib/ruby-1.9.1-rc1/missing/flock.c | 129 + lib/ruby-1.9.1-rc1/missing/hypot.c | 16 + lib/ruby-1.9.1-rc1/missing/isinf.c | 69 + lib/ruby-1.9.1-rc1/missing/isnan.c | 15 + lib/ruby-1.9.1-rc1/missing/lgamma_r.c | 68 + lib/ruby-1.9.1-rc1/missing/memcmp.c | 17 + lib/ruby-1.9.1-rc1/missing/memmove.c | 21 + lib/ruby-1.9.1-rc1/missing/os2.c | 138 + lib/ruby-1.9.1-rc1/missing/strchr.c | 28 + lib/ruby-1.9.1-rc1/missing/strerror.c | 16 + lib/ruby-1.9.1-rc1/missing/strlcat.c | 73 + lib/ruby-1.9.1-rc1/missing/strlcpy.c | 69 + lib/ruby-1.9.1-rc1/missing/strstr.c | 25 + lib/ruby-1.9.1-rc1/missing/strtol.c | 26 + lib/ruby-1.9.1-rc1/missing/tgamma.c | 92 + lib/ruby-1.9.1-rc1/missing/vsnprintf.c | 1207 + lib/ruby-1.9.1-rc1/mkconfig.rb | 195 + lib/ruby-1.9.1-rc1/newline.c | 185 + lib/ruby-1.9.1-rc1/node.h | 516 + lib/ruby-1.9.1-rc1/node_name.inc | 216 + lib/ruby-1.9.1-rc1/numeric.c | 3252 + lib/ruby-1.9.1-rc1/object.c | 2647 + lib/ruby-1.9.1-rc1/opt_sc.inc | 662 + lib/ruby-1.9.1-rc1/optinsn.inc | 30 + lib/ruby-1.9.1-rc1/optunifs.inc | 115 + lib/ruby-1.9.1-rc1/pack.c | 2180 + lib/ruby-1.9.1-rc1/parse.c | 15556 +++++ lib/ruby-1.9.1-rc1/parse.h | 303 + lib/ruby-1.9.1-rc1/parse.y | 10308 ++++ lib/ruby-1.9.1-rc1/prelude.rb | 35 + lib/ruby-1.9.1-rc1/proc.c | 1924 + lib/ruby-1.9.1-rc1/process.c | 5225 ++ lib/ruby-1.9.1-rc1/random.c | 560 + lib/ruby-1.9.1-rc1/range.c | 948 + lib/ruby-1.9.1-rc1/rational.c | 1606 + lib/ruby-1.9.1-rc1/re.c | 3434 ++ lib/ruby-1.9.1-rc1/regcomp.c | 6311 ++ lib/ruby-1.9.1-rc1/regenc.c | 931 + lib/ruby-1.9.1-rc1/regenc.h | 207 + lib/ruby-1.9.1-rc1/regerror.c | 387 + lib/ruby-1.9.1-rc1/regexec.c | 3822 ++ lib/ruby-1.9.1-rc1/regint.h | 842 + lib/ruby-1.9.1-rc1/regparse.c | 5551 ++ lib/ruby-1.9.1-rc1/regparse.h | 351 + lib/ruby-1.9.1-rc1/regsyntax.c | 315 + lib/ruby-1.9.1-rc1/revision.h | 1 + lib/ruby-1.9.1-rc1/ruby.c | 1841 + lib/ruby-1.9.1-rc1/rubytest.rb | 49 + lib/ruby-1.9.1-rc1/runruby.rb | 79 + lib/ruby-1.9.1-rc1/safe.c | 129 + lib/ruby-1.9.1-rc1/sample/README | 47 + lib/ruby-1.9.1-rc1/sample/biorhythm.rb | 124 + lib/ruby-1.9.1-rc1/sample/cal.rb | 166 + lib/ruby-1.9.1-rc1/sample/cbreak.rb | 36 + lib/ruby-1.9.1-rc1/sample/clnt.rb | 21 + lib/ruby-1.9.1-rc1/sample/coverage.rb | 60 + lib/ruby-1.9.1-rc1/sample/dir.rb | 12 + lib/ruby-1.9.1-rc1/sample/drb/README.rd | 56 + lib/ruby-1.9.1-rc1/sample/drb/README.rd.ja | 59 + lib/ruby-1.9.1-rc1/sample/drb/darray.rb | 12 + lib/ruby-1.9.1-rc1/sample/drb/darrayc.rb | 47 + lib/ruby-1.9.1-rc1/sample/drb/dbiff.rb | 51 + lib/ruby-1.9.1-rc1/sample/drb/dcdbiff.rb | 43 + lib/ruby-1.9.1-rc1/sample/drb/dchatc.rb | 41 + lib/ruby-1.9.1-rc1/sample/drb/dchats.rb | 70 + lib/ruby-1.9.1-rc1/sample/drb/dhasen.rb | 42 + lib/ruby-1.9.1-rc1/sample/drb/dhasenc.rb | 13 + lib/ruby-1.9.1-rc1/sample/drb/dlogc.rb | 16 + lib/ruby-1.9.1-rc1/sample/drb/dlogd.rb | 39 + lib/ruby-1.9.1-rc1/sample/drb/dqin.rb | 13 + lib/ruby-1.9.1-rc1/sample/drb/dqlib.rb | 14 + lib/ruby-1.9.1-rc1/sample/drb/dqout.rb | 14 + lib/ruby-1.9.1-rc1/sample/drb/dqueue.rb | 12 + lib/ruby-1.9.1-rc1/sample/drb/drbc.rb | 45 + lib/ruby-1.9.1-rc1/sample/drb/drbch.rb | 48 + lib/ruby-1.9.1-rc1/sample/drb/drbm.rb | 60 + lib/ruby-1.9.1-rc1/sample/drb/drbmc.rb | 22 + lib/ruby-1.9.1-rc1/sample/drb/drbs-acl.rb | 51 + lib/ruby-1.9.1-rc1/sample/drb/drbs.rb | 64 + lib/ruby-1.9.1-rc1/sample/drb/drbssl_c.rb | 19 + lib/ruby-1.9.1-rc1/sample/drb/drbssl_s.rb | 31 + lib/ruby-1.9.1-rc1/sample/drb/extserv_test.rb | 80 + lib/ruby-1.9.1-rc1/sample/drb/gw_ct.rb | 29 + lib/ruby-1.9.1-rc1/sample/drb/gw_cu.rb | 28 + lib/ruby-1.9.1-rc1/sample/drb/gw_s.rb | 10 + lib/ruby-1.9.1-rc1/sample/drb/holderc.rb | 22 + lib/ruby-1.9.1-rc1/sample/drb/holders.rb | 63 + lib/ruby-1.9.1-rc1/sample/drb/http0.rb | 77 + lib/ruby-1.9.1-rc1/sample/drb/http0serv.rb | 119 + lib/ruby-1.9.1-rc1/sample/drb/name.rb | 117 + lib/ruby-1.9.1-rc1/sample/drb/namec.rb | 36 + lib/ruby-1.9.1-rc1/sample/drb/old_tuplespace.rb | 214 + lib/ruby-1.9.1-rc1/sample/drb/rinda_ts.rb | 7 + lib/ruby-1.9.1-rc1/sample/drb/rindac.rb | 17 + lib/ruby-1.9.1-rc1/sample/drb/rindas.rb | 18 + lib/ruby-1.9.1-rc1/sample/drb/ring_echo.rb | 30 + lib/ruby-1.9.1-rc1/sample/drb/ring_inspect.rb | 30 + lib/ruby-1.9.1-rc1/sample/drb/ring_place.rb | 25 + lib/ruby-1.9.1-rc1/sample/drb/simpletuple.rb | 91 + lib/ruby-1.9.1-rc1/sample/drb/speedc.rb | 21 + lib/ruby-1.9.1-rc1/sample/drb/speeds.rb | 31 + lib/ruby-1.9.1-rc1/sample/dualstack-fetch.rb | 48 + lib/ruby-1.9.1-rc1/sample/dualstack-httpd.rb | 55 + lib/ruby-1.9.1-rc1/sample/eval.rb | 41 + lib/ruby-1.9.1-rc1/sample/export.rb | 40 + lib/ruby-1.9.1-rc1/sample/exyacc.rb | 20 + lib/ruby-1.9.1-rc1/sample/fact.rb | 9 + lib/ruby-1.9.1-rc1/sample/fib.awk | 5 + lib/ruby-1.9.1-rc1/sample/fib.pl | 11 + lib/ruby-1.9.1-rc1/sample/fib.py | 10 + lib/ruby-1.9.1-rc1/sample/fib.rb | 10 + lib/ruby-1.9.1-rc1/sample/fib.scm | 8 + lib/ruby-1.9.1-rc1/sample/freq.rb | 12 + lib/ruby-1.9.1-rc1/sample/from.rb | 113 + lib/ruby-1.9.1-rc1/sample/fullpath.rb | 23 + lib/ruby-1.9.1-rc1/sample/less.rb | 17 + lib/ruby-1.9.1-rc1/sample/list.rb | 80 + lib/ruby-1.9.1-rc1/sample/list2.rb | 16 + lib/ruby-1.9.1-rc1/sample/list3.rb | 18 + lib/ruby-1.9.1-rc1/sample/logger/app.rb | 46 + lib/ruby-1.9.1-rc1/sample/logger/log.rb | 27 + lib/ruby-1.9.1-rc1/sample/logger/shifting.rb | 26 + lib/ruby-1.9.1-rc1/sample/mine.rb | 175 + lib/ruby-1.9.1-rc1/sample/mkproto.rb | 27 + lib/ruby-1.9.1-rc1/sample/mpart.rb | 44 + lib/ruby-1.9.1-rc1/sample/observ.rb | 32 + lib/ruby-1.9.1-rc1/sample/occur.pl | 9 + lib/ruby-1.9.1-rc1/sample/occur.rb | 12 + lib/ruby-1.9.1-rc1/sample/occur2.rb | 16 + lib/ruby-1.9.1-rc1/sample/openssl/c_rehash.rb | 174 + lib/ruby-1.9.1-rc1/sample/openssl/cert2text.rb | 23 + lib/ruby-1.9.1-rc1/sample/openssl/certstore.rb | 161 + lib/ruby-1.9.1-rc1/sample/openssl/cipher.rb | 54 + lib/ruby-1.9.1-rc1/sample/openssl/crlstore.rb | 122 + lib/ruby-1.9.1-rc1/sample/openssl/echo_cli.rb | 44 + lib/ruby-1.9.1-rc1/sample/openssl/echo_svr.rb | 65 + lib/ruby-1.9.1-rc1/sample/openssl/gen_csr.rb | 51 + lib/ruby-1.9.1-rc1/sample/openssl/smime_read.rb | 23 + lib/ruby-1.9.1-rc1/sample/openssl/smime_write.rb | 23 + lib/ruby-1.9.1-rc1/sample/openssl/wget.rb | 34 + lib/ruby-1.9.1-rc1/sample/optparse/opttest.rb | 85 + lib/ruby-1.9.1-rc1/sample/optparse/subcommand.rb | 19 + lib/ruby-1.9.1-rc1/sample/philos.rb | 54 + lib/ruby-1.9.1-rc1/sample/pi.rb | 18 + lib/ruby-1.9.1-rc1/sample/rcs.awk | 33 + lib/ruby-1.9.1-rc1/sample/rcs.dat | 17 + lib/ruby-1.9.1-rc1/sample/rcs.rb | 39 + .../sample/rdoc/markup/rdoc2latex.rb | 15 + lib/ruby-1.9.1-rc1/sample/rdoc/markup/sample.rb | 40 + lib/ruby-1.9.1-rc1/sample/ripper/ruby2html.rb | 112 + lib/ruby-1.9.1-rc1/sample/ripper/strip-comment.rb | 19 + lib/ruby-1.9.1-rc1/sample/rss/blend.rb | 79 + lib/ruby-1.9.1-rc1/sample/rss/convert.rb | 69 + lib/ruby-1.9.1-rc1/sample/rss/list_description.rb | 91 + lib/ruby-1.9.1-rc1/sample/rss/re_read.rb | 64 + lib/ruby-1.9.1-rc1/sample/rss/rss_recent.rb | 85 + lib/ruby-1.9.1-rc1/sample/sieve.rb | 14 + lib/ruby-1.9.1-rc1/sample/svr.rb | 34 + lib/ruby-1.9.1-rc1/sample/test.rb | 2292 + lib/ruby-1.9.1-rc1/sample/testunit/adder.rb | 13 + lib/ruby-1.9.1-rc1/sample/testunit/subtracter.rb | 12 + lib/ruby-1.9.1-rc1/sample/testunit/tc_adder.rb | 18 + .../sample/testunit/tc_subtracter.rb | 18 + lib/ruby-1.9.1-rc1/sample/testunit/ts_examples.rb | 7 + lib/ruby-1.9.1-rc1/sample/time.rb | 12 + lib/ruby-1.9.1-rc1/sample/trojan.rb | 15 + lib/ruby-1.9.1-rc1/sample/tsvr.rb | 20 + lib/ruby-1.9.1-rc1/sample/uumerge.rb | 43 + lib/ruby-1.9.1-rc1/sample/webrick/demo-app.rb | 66 + .../sample/webrick/demo-multipart.cgi | 12 + lib/ruby-1.9.1-rc1/sample/webrick/demo-servlet.rb | 6 + .../sample/webrick/demo-urlencoded.cgi | 12 + lib/ruby-1.9.1-rc1/sample/webrick/hello.cgi | 11 + lib/ruby-1.9.1-rc1/sample/webrick/hello.rb | 8 + lib/ruby-1.9.1-rc1/sample/webrick/httpd.rb | 23 + lib/ruby-1.9.1-rc1/sample/webrick/httpproxy.rb | 26 + lib/ruby-1.9.1-rc1/sample/webrick/httpsd.rb | 33 + lib/ruby-1.9.1-rc1/signal.c | 1146 + lib/ruby-1.9.1-rc1/spec/README | 39 + lib/ruby-1.9.1-rc1/spec/default.mspec | 18 + lib/ruby-1.9.1-rc1/sprintf.c | 1208 + lib/ruby-1.9.1-rc1/st.c | 946 + lib/ruby-1.9.1-rc1/strftime.c | 1108 + lib/ruby-1.9.1-rc1/string.c | 7231 +++ lib/ruby-1.9.1-rc1/struct.c | 909 + lib/ruby-1.9.1-rc1/template/id.h.tmpl | 127 + lib/ruby-1.9.1-rc1/template/insns.inc.tmpl | 20 + lib/ruby-1.9.1-rc1/template/insns_info.inc.tmpl | 83 + lib/ruby-1.9.1-rc1/template/known_errors.inc.tmpl | 14 + lib/ruby-1.9.1-rc1/template/minsns.inc.tmpl | 14 + lib/ruby-1.9.1-rc1/template/opt_sc.inc.tmpl | 32 + lib/ruby-1.9.1-rc1/template/optinsn.inc.tmpl | 30 + lib/ruby-1.9.1-rc1/template/optunifs.inc.tmpl | 35 + lib/ruby-1.9.1-rc1/template/vm.inc.tmpl | 29 + lib/ruby-1.9.1-rc1/template/vmtc.inc.tmpl | 18 + lib/ruby-1.9.1-rc1/template/yarvarch.en | 7 + lib/ruby-1.9.1-rc1/template/yarvarch.ja | 454 + lib/ruby-1.9.1-rc1/template/yasmdata.rb.tmpl | 20 + lib/ruby-1.9.1-rc1/test/base64/test_base64.rb | 99 + .../test/bigdecimal/test_bigdecimal.rb | 696 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_cookie.rb | 107 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_core.rb | 363 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_header.rb | 177 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_modruby.rb | 145 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_multipart.rb | 322 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_session.rb | 173 + lib/ruby-1.9.1-rc1/test/cgi/test_cgi_tag_helper.rb | 341 + lib/ruby-1.9.1-rc1/test/cgi/testdata/file1.html | 10 + lib/ruby-1.9.1-rc1/test/cgi/testdata/large.png | Bin 0 -> 156414 bytes lib/ruby-1.9.1-rc1/test/cgi/testdata/small.png | Bin 0 -> 82 bytes lib/ruby-1.9.1-rc1/test/csv/line_endings.gz | Bin 0 -> 59 bytes lib/ruby-1.9.1-rc1/test/csv/test_csv_parsing.rb | 192 + lib/ruby-1.9.1-rc1/test/csv/test_csv_writing.rb | 97 + .../test/csv/test_data_converters.rb | 261 + lib/ruby-1.9.1-rc1/test/csv/test_encodings.rb | 256 + lib/ruby-1.9.1-rc1/test/csv/test_features.rb | 267 + lib/ruby-1.9.1-rc1/test/csv/test_headers.rb | 288 + lib/ruby-1.9.1-rc1/test/csv/test_interface.rb | 304 + lib/ruby-1.9.1-rc1/test/csv/test_row.rb | 312 + lib/ruby-1.9.1-rc1/test/csv/test_serialization.rb | 156 + lib/ruby-1.9.1-rc1/test/csv/test_table.rb | 408 + lib/ruby-1.9.1-rc1/test/csv/ts_all.rb | 21 + lib/ruby-1.9.1-rc1/test/date/test_date.rb | 144 + lib/ruby-1.9.1-rc1/test/date/test_date_arith.rb | 286 + lib/ruby-1.9.1-rc1/test/date/test_date_attr.rb | 109 + lib/ruby-1.9.1-rc1/test/date/test_date_base.rb | 435 + lib/ruby-1.9.1-rc1/test/date/test_date_compat.rb | 21 + lib/ruby-1.9.1-rc1/test/date/test_date_conv.rb | 130 + lib/ruby-1.9.1-rc1/test/date/test_date_marshal.rb | 29 + lib/ruby-1.9.1-rc1/test/date/test_date_new.rb | 278 + lib/ruby-1.9.1-rc1/test/date/test_date_parse.rb | 973 + lib/ruby-1.9.1-rc1/test/date/test_date_strftime.rb | 388 + lib/ruby-1.9.1-rc1/test/date/test_date_strptime.rb | 469 + lib/ruby-1.9.1-rc1/test/dbm/test_dbm.rb | 559 + lib/ruby-1.9.1-rc1/test/digest/test_digest.rb | 120 + lib/ruby-1.9.1-rc1/test/digest/test_digest_hmac.rb | 3 + lib/ruby-1.9.1-rc1/test/drb/drbtest.rb | 352 + lib/ruby-1.9.1-rc1/test/drb/ignore_test_drb.rb | 24 + lib/ruby-1.9.1-rc1/test/drb/test_acl.rb | 195 + lib/ruby-1.9.1-rc1/test/drb/test_drb.rb | 301 + lib/ruby-1.9.1-rc1/test/drb/test_drbssl.rb | 62 + lib/ruby-1.9.1-rc1/test/drb/test_drbunix.rb | 46 + lib/ruby-1.9.1-rc1/test/drb/ut_array.rb | 15 + lib/ruby-1.9.1-rc1/test/drb/ut_array_drbssl.rb | 24 + lib/ruby-1.9.1-rc1/test/drb/ut_array_drbunix.rb | 15 + lib/ruby-1.9.1-rc1/test/drb/ut_drb.rb | 160 + lib/ruby-1.9.1-rc1/test/drb/ut_drb_drbssl.rb | 25 + lib/ruby-1.9.1-rc1/test/drb/ut_drb_drbunix.rb | 16 + lib/ruby-1.9.1-rc1/test/drb/ut_eval.rb | 31 + lib/ruby-1.9.1-rc1/test/drb/ut_large.rb | 38 + lib/ruby-1.9.1-rc1/test/drb/ut_port.rb | 14 + lib/ruby-1.9.1-rc1/test/drb/ut_safe1.rb | 15 + lib/ruby-1.9.1-rc1/test/drb/ut_timerholder.rb | 49 + lib/ruby-1.9.1-rc1/test/erb/hello.erb | 4 + lib/ruby-1.9.1-rc1/test/erb/test_erb.rb | 446 + lib/ruby-1.9.1-rc1/test/erb/test_erb_m17n.rb | 123 + lib/ruby-1.9.1-rc1/test/etc/test_etc.rb | 101 + lib/ruby-1.9.1-rc1/test/fileutils/fileasserts.rb | 104 + lib/ruby-1.9.1-rc1/test/fileutils/test_dryrun.rb | 25 + .../test/fileutils/test_fileutils.rb | 1081 + lib/ruby-1.9.1-rc1/test/fileutils/test_nowrite.rb | 99 + lib/ruby-1.9.1-rc1/test/fileutils/test_verbose.rb | 25 + lib/ruby-1.9.1-rc1/test/gdbm/test_gdbm.rb | 715 + lib/ruby-1.9.1-rc1/test/iconv/test_basic.rb | 56 + lib/ruby-1.9.1-rc1/test/iconv/test_option.rb | 43 + lib/ruby-1.9.1-rc1/test/iconv/test_partial.rb | 41 + lib/ruby-1.9.1-rc1/test/iconv/utils.rb | 26 + lib/ruby-1.9.1-rc1/test/inlinetest.rb | 55 + lib/ruby-1.9.1-rc1/test/io/nonblock/test_flush.rb | 36 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail1.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail10.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail11.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail12.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail13.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail14.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail18.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail19.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail2.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail20.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail21.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail22.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail23.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail24.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail25.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail27.json | 2 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail28.json | 2 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail3.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail4.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail5.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail6.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail7.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail8.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/fail9.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass1.json | 56 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass15.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass16.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass17.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass2.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass26.json | 1 + lib/ruby-1.9.1-rc1/test/json/fixtures/pass3.json | 6 + lib/ruby-1.9.1-rc1/test/json/test_json.rb | 284 + lib/ruby-1.9.1-rc1/test/json/test_json_addition.rb | 157 + lib/ruby-1.9.1-rc1/test/json/test_json_fixtures.rb | 29 + lib/ruby-1.9.1-rc1/test/json/test_json_generate.rb | 99 + lib/ruby-1.9.1-rc1/test/json/test_json_rails.rb | 114 + lib/ruby-1.9.1-rc1/test/json/test_json_unicode.rb | 58 + lib/ruby-1.9.1-rc1/test/logger/test_logger.rb | 380 + lib/ruby-1.9.1-rc1/test/matrix/test_matrix.rb | 49 + lib/ruby-1.9.1-rc1/test/matrix/test_vector.rb | 49 + lib/ruby-1.9.1-rc1/test/minitest/test_mini_mock.rb | 83 + lib/ruby-1.9.1-rc1/test/minitest/test_mini_spec.rb | 157 + lib/ruby-1.9.1-rc1/test/minitest/test_mini_test.rb | 985 + lib/ruby-1.9.1-rc1/test/monitor/test_monitor.rb | 163 + lib/ruby-1.9.1-rc1/test/net/http/test_http.rb | 320 + .../test/net/http/test_httpheader.rb | 317 + lib/ruby-1.9.1-rc1/test/net/http/test_https.rb | 97 + .../test/net/http/test_https_proxy.rb | 37 + lib/ruby-1.9.1-rc1/test/net/http/utils.rb | 96 + lib/ruby-1.9.1-rc1/test/net/imap/cacert.pem | 62 + lib/ruby-1.9.1-rc1/test/net/imap/server.crt | 12 + lib/ruby-1.9.1-rc1/test/net/imap/server.key | 15 + lib/ruby-1.9.1-rc1/test/net/imap/test_imap.rb | 195 + lib/ruby-1.9.1-rc1/test/net/pop/test_pop.rb | 132 + lib/ruby-1.9.1-rc1/test/nkf/test_kconv.rb | 74 + lib/ruby-1.9.1-rc1/test/nkf/test_nkf.rb | 22 + lib/ruby-1.9.1-rc1/test/openssl/ssl_server.rb | 81 + lib/ruby-1.9.1-rc1/test/openssl/test_asn1.rb | 197 + lib/ruby-1.9.1-rc1/test/openssl/test_cipher.rb | 95 + lib/ruby-1.9.1-rc1/test/openssl/test_digest.rb | 88 + lib/ruby-1.9.1-rc1/test/openssl/test_ec.rb | 113 + lib/ruby-1.9.1-rc1/test/openssl/test_hmac.rb | 34 + lib/ruby-1.9.1-rc1/test/openssl/test_ns_spki.rb | 59 + lib/ruby-1.9.1-rc1/test/openssl/test_pair.rb | 149 + lib/ruby-1.9.1-rc1/test/openssl/test_pkcs7.rb | 154 + lib/ruby-1.9.1-rc1/test/openssl/test_pkey_rsa.rb | 49 + lib/ruby-1.9.1-rc1/test/openssl/test_ssl.rb | 560 + lib/ruby-1.9.1-rc1/test/openssl/test_x509cert.rb | 175 + lib/ruby-1.9.1-rc1/test/openssl/test_x509crl.rb | 218 + lib/ruby-1.9.1-rc1/test/openssl/test_x509ext.rb | 74 + lib/ruby-1.9.1-rc1/test/openssl/test_x509name.rb | 266 + lib/ruby-1.9.1-rc1/test/openssl/test_x509req.rb | 140 + lib/ruby-1.9.1-rc1/test/openssl/test_x509store.rb | 218 + lib/ruby-1.9.1-rc1/test/openssl/utils.rb | 135 + lib/ruby-1.9.1-rc1/test/optparse/test_getopts.rb | 31 + lib/ruby-1.9.1-rc1/test/optparse/test_noarg.rb | 57 + lib/ruby-1.9.1-rc1/test/optparse/test_optarg.rb | 44 + lib/ruby-1.9.1-rc1/test/optparse/test_optparse.rb | 46 + lib/ruby-1.9.1-rc1/test/optparse/test_placearg.rb | 45 + lib/ruby-1.9.1-rc1/test/optparse/test_reqarg.rb | 75 + lib/ruby-1.9.1-rc1/test/optparse/test_summary.rb | 23 + lib/ruby-1.9.1-rc1/test/ostruct/test_ostruct.rb | 23 + lib/ruby-1.9.1-rc1/test/pathname/test_pathname.rb | 518 + lib/ruby-1.9.1-rc1/test/rdoc/binary.dat | Bin 0 -> 1024 bytes .../rdoc/rdoc_markup_to_html_crossref_reference.rb | 31 + .../test/rdoc/test_attribute_manager.rb | 76 + .../test/rdoc/test_rdoc_info_formatting.rb | 179 + .../test/rdoc/test_rdoc_info_sections.rb | 139 + lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_markup.rb | 615 + .../rdoc/test_rdoc_markup_attribute_manager.rb | 234 + .../test/rdoc/test_rdoc_markup_to_html.rb | 45 + .../test/rdoc/test_rdoc_markup_to_html_crossref.rb | 294 + lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser.rb | 23 + lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser_c.rb | 287 + .../test/rdoc/test_rdoc_parser_perl.rb | 74 + .../test/rdoc/test_rdoc_parser_ruby.rb | 751 + .../test/rdoc/test_rdoc_ri_attribute_formatter.rb | 44 + .../test/rdoc/test_rdoc_ri_default_display.rb | 301 + .../test/rdoc/test_rdoc_ri_driver.rb | 94 + .../test/rdoc/test_rdoc_ri_formatter.rb | 320 + .../test/rdoc/test_rdoc_ri_overstrike_formatter.rb | 71 + lib/ruby-1.9.1-rc1/test/readline/test_readline.rb | 246 + .../test/readline/test_readline_history.rb | 327 + lib/ruby-1.9.1-rc1/test/rexml/test_document.rb | 66 + lib/ruby-1.9.1-rc1/test/rinda/test_rinda.rb | 545 + lib/ruby-1.9.1-rc1/test/rinda/test_tuplebag.rb | 172 + lib/ruby-1.9.1-rc1/test/ripper/dummyparser.rb | 571 + lib/ruby-1.9.1-rc1/test/ripper/test_files.rb | 25 + .../test/ripper/test_parser_events.rb | 498 + .../test/ripper/test_scanner_events.rb | 807 + lib/ruby-1.9.1-rc1/test/rss/dot.png | Bin 0 -> 111 bytes lib/ruby-1.9.1-rc1/test/rss/rss-assertions.rb | 2090 + lib/ruby-1.9.1-rc1/test/rss/rss-testcase.rb | 478 + lib/ruby-1.9.1-rc1/test/rss/test_1.0.rb | 296 + lib/ruby-1.9.1-rc1/test/rss/test_2.0.rb | 410 + lib/ruby-1.9.1-rc1/test/rss/test_accessor.rb | 103 + lib/ruby-1.9.1-rc1/test/rss/test_atom.rb | 683 + lib/ruby-1.9.1-rc1/test/rss/test_content.rb | 104 + lib/ruby-1.9.1-rc1/test/rss/test_dublincore.rb | 279 + lib/ruby-1.9.1-rc1/test/rss/test_image.rb | 214 + lib/ruby-1.9.1-rc1/test/rss/test_inherit.rb | 40 + lib/ruby-1.9.1-rc1/test/rss/test_itunes.rb | 347 + lib/ruby-1.9.1-rc1/test/rss/test_maker_0.9.rb | 439 + lib/ruby-1.9.1-rc1/test/rss/test_maker_1.0.rb | 485 + lib/ruby-1.9.1-rc1/test/rss/test_maker_2.0.rb | 706 + .../test/rss/test_maker_atom_entry.rb | 367 + .../test/rss/test_maker_atom_feed.rb | 389 + lib/ruby-1.9.1-rc1/test/rss/test_maker_content.rb | 47 + lib/ruby-1.9.1-rc1/test/rss/test_maker_dc.rb | 149 + lib/ruby-1.9.1-rc1/test/rss/test_maker_image.rb | 62 + lib/ruby-1.9.1-rc1/test/rss/test_maker_itunes.rb | 471 + lib/ruby-1.9.1-rc1/test/rss/test_maker_slash.rb | 37 + lib/ruby-1.9.1-rc1/test/rss/test_maker_sy.rb | 44 + lib/ruby-1.9.1-rc1/test/rss/test_maker_taxo.rb | 81 + .../test/rss/test_maker_trackback.rb | 41 + .../test/rss/test_maker_xml-stylesheet.rb | 83 + lib/ruby-1.9.1-rc1/test/rss/test_parser.rb | 62 + lib/ruby-1.9.1-rc1/test/rss/test_parser_1.0.rb | 512 + lib/ruby-1.9.1-rc1/test/rss/test_parser_2.0.rb | 122 + .../test/rss/test_parser_atom_entry.rb | 163 + .../test/rss/test_parser_atom_feed.rb | 276 + .../test/rss/test_setup_maker_0.9.rb | 246 + .../test/rss/test_setup_maker_1.0.rb | 550 + .../test/rss/test_setup_maker_2.0.rb | 308 + .../test/rss/test_setup_maker_atom_entry.rb | 409 + .../test/rss/test_setup_maker_atom_feed.rb | 445 + .../test/rss/test_setup_maker_itunes.rb | 144 + .../test/rss/test_setup_maker_slash.rb | 38 + lib/ruby-1.9.1-rc1/test/rss/test_slash.rb | 64 + lib/ruby-1.9.1-rc1/test/rss/test_syndication.rb | 125 + lib/ruby-1.9.1-rc1/test/rss/test_taxonomy.rb | 172 + lib/ruby-1.9.1-rc1/test/rss/test_to_s.rb | 670 + lib/ruby-1.9.1-rc1/test/rss/test_trackback.rb | 135 + lib/ruby-1.9.1-rc1/test/rss/test_version.rb | 9 + lib/ruby-1.9.1-rc1/test/rss/test_xml-stylesheet.rb | 108 + lib/ruby-1.9.1-rc1/test/ruby/allpairs.rb | 103 + lib/ruby-1.9.1-rc1/test/ruby/beginmainend.rb | 80 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_big5.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_cp949.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_jp.rb | 24 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_kr.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_tw.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_gb18030.rb | 125 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_gbk.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_iso_8859.rb | 163 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_koi8.rb | 22 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_shift_jis.rb | 27 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_utf16.rb | 384 + lib/ruby-1.9.1-rc1/test/ruby/enc/test_utf32.rb | 93 + .../test/ruby/enc/test_windows_1251.rb | 16 + lib/ruby-1.9.1-rc1/test/ruby/endblockwarn_rb | 12 + lib/ruby-1.9.1-rc1/test/ruby/envutil.rb | 176 + lib/ruby-1.9.1-rc1/test/ruby/lbtest.rb | 48 + lib/ruby-1.9.1-rc1/test/ruby/marshaltestlib.rb | 499 + lib/ruby-1.9.1-rc1/test/ruby/sentence.rb | 668 + lib/ruby-1.9.1-rc1/test/ruby/test_alias.rb | 64 + lib/ruby-1.9.1-rc1/test/ruby/test_argf.rb | 704 + lib/ruby-1.9.1-rc1/test/ruby/test_array.rb | 1666 + lib/ruby-1.9.1-rc1/test/ruby/test_assignment.rb | 687 + .../test/ruby/test_basicinstructions.rb | 628 + lib/ruby-1.9.1-rc1/test/ruby/test_beginendblock.rb | 101 + lib/ruby-1.9.1-rc1/test/ruby/test_bignum.rb | 378 + lib/ruby-1.9.1-rc1/test/ruby/test_call.rb | 19 + lib/ruby-1.9.1-rc1/test/ruby/test_case.rb | 49 + lib/ruby-1.9.1-rc1/test/ruby/test_class.rb | 147 + lib/ruby-1.9.1-rc1/test/ruby/test_clone.rb | 28 + lib/ruby-1.9.1-rc1/test/ruby/test_comparable.rb | 66 + lib/ruby-1.9.1-rc1/test/ruby/test_complex.rb | 1064 + lib/ruby-1.9.1-rc1/test/ruby/test_complex2.rb | 735 + .../test/ruby/test_complexrational.rb | 407 + lib/ruby-1.9.1-rc1/test/ruby/test_condition.rb | 16 + lib/ruby-1.9.1-rc1/test/ruby/test_const.rb | 48 + lib/ruby-1.9.1-rc1/test/ruby/test_continuation.rb | 81 + lib/ruby-1.9.1-rc1/test/ruby/test_defined.rb | 81 + lib/ruby-1.9.1-rc1/test/ruby/test_dir.rb | 170 + lib/ruby-1.9.1-rc1/test/ruby/test_econv.rb | 881 + lib/ruby-1.9.1-rc1/test/ruby/test_encoding.rb | 63 + lib/ruby-1.9.1-rc1/test/ruby/test_enum.rb | 269 + lib/ruby-1.9.1-rc1/test/ruby/test_enumerator.rb | 133 + lib/ruby-1.9.1-rc1/test/ruby/test_env.rb | 351 + lib/ruby-1.9.1-rc1/test/ruby/test_eval.rb | 411 + lib/ruby-1.9.1-rc1/test/ruby/test_exception.rb | 226 + lib/ruby-1.9.1-rc1/test/ruby/test_fiber.rb | 168 + lib/ruby-1.9.1-rc1/test/ruby/test_file.rb | 160 + .../test/ruby/test_file_exhaustive.rb | 726 + lib/ruby-1.9.1-rc1/test/ruby/test_fixnum.rb | 232 + lib/ruby-1.9.1-rc1/test/ruby/test_float.rb | 426 + lib/ruby-1.9.1-rc1/test/ruby/test_fnmatch.rb | 104 + lib/ruby-1.9.1-rc1/test/ruby/test_gc.rb | 54 + lib/ruby-1.9.1-rc1/test/ruby/test_hash.rb | 852 + lib/ruby-1.9.1-rc1/test/ruby/test_ifunless.rb | 14 + lib/ruby-1.9.1-rc1/test/ruby/test_integer.rb | 187 + lib/ruby-1.9.1-rc1/test/ruby/test_integer_comb.rb | 620 + lib/ruby-1.9.1-rc1/test/ruby/test_io.rb | 1291 + lib/ruby-1.9.1-rc1/test/ruby/test_io_m17n.rb | 1695 + lib/ruby-1.9.1-rc1/test/ruby/test_iterator.rb | 497 + lib/ruby-1.9.1-rc1/test/ruby/test_lambda.rb | 68 + lib/ruby-1.9.1-rc1/test/ruby/test_literal.rb | 241 + lib/ruby-1.9.1-rc1/test/ruby/test_m17n.rb | 1314 + lib/ruby-1.9.1-rc1/test/ruby/test_m17n_comb.rb | 1634 + lib/ruby-1.9.1-rc1/test/ruby/test_marshal.rb | 194 + lib/ruby-1.9.1-rc1/test/ruby/test_math.rb | 240 + lib/ruby-1.9.1-rc1/test/ruby/test_metaclass.rb | 167 + lib/ruby-1.9.1-rc1/test/ruby/test_method.rb | 241 + .../test/ruby/test_mixed_unicode_escapes.rb | 25 + lib/ruby-1.9.1-rc1/test/ruby/test_module.rb | 724 + lib/ruby-1.9.1-rc1/test/ruby/test_numeric.rb | 217 + lib/ruby-1.9.1-rc1/test/ruby/test_object.rb | 408 + lib/ruby-1.9.1-rc1/test/ruby/test_objectspace.rb | 67 + lib/ruby-1.9.1-rc1/test/ruby/test_optimization.rb | 140 + lib/ruby-1.9.1-rc1/test/ruby/test_pack.rb | 494 + lib/ruby-1.9.1-rc1/test/ruby/test_parse.rb | 826 + lib/ruby-1.9.1-rc1/test/ruby/test_path.rb | 224 + lib/ruby-1.9.1-rc1/test/ruby/test_pipe.rb | 16 + lib/ruby-1.9.1-rc1/test/ruby/test_primitive.rb | 397 + lib/ruby-1.9.1-rc1/test/ruby/test_proc.rb | 676 + lib/ruby-1.9.1-rc1/test/ruby/test_process.rb | 1025 + lib/ruby-1.9.1-rc1/test/ruby/test_rand.rb | 167 + lib/ruby-1.9.1-rc1/test/ruby/test_range.rb | 279 + lib/ruby-1.9.1-rc1/test/ruby/test_rational.rb | 1020 + lib/ruby-1.9.1-rc1/test/ruby/test_rational2.rb | 1386 + lib/ruby-1.9.1-rc1/test/ruby/test_readpartial.rb | 70 + lib/ruby-1.9.1-rc1/test/ruby/test_regexp.rb | 761 + lib/ruby-1.9.1-rc1/test/ruby/test_require.rb | 198 + lib/ruby-1.9.1-rc1/test/ruby/test_rubyoptions.rb | 287 + lib/ruby-1.9.1-rc1/test/ruby/test_settracefunc.rb | 184 + lib/ruby-1.9.1-rc1/test/ruby/test_signal.rb | 166 + lib/ruby-1.9.1-rc1/test/ruby/test_sleep.rb | 10 + lib/ruby-1.9.1-rc1/test/ruby/test_sprintf.rb | 276 + lib/ruby-1.9.1-rc1/test/ruby/test_sprintf_comb.rb | 553 + lib/ruby-1.9.1-rc1/test/ruby/test_string.rb | 1760 + lib/ruby-1.9.1-rc1/test/ruby/test_stringchar.rb | 166 + lib/ruby-1.9.1-rc1/test/ruby/test_struct.rb | 215 + lib/ruby-1.9.1-rc1/test/ruby/test_super.rb | 134 + lib/ruby-1.9.1-rc1/test/ruby/test_symbol.rb | 135 + lib/ruby-1.9.1-rc1/test/ruby/test_system.rb | 76 + lib/ruby-1.9.1-rc1/test/ruby/test_thread.rb | 519 + lib/ruby-1.9.1-rc1/test/ruby/test_time.rb | 473 + lib/ruby-1.9.1-rc1/test/ruby/test_trace.rb | 49 + lib/ruby-1.9.1-rc1/test/ruby/test_transcode.rb | 1409 + .../test/ruby/test_unicode_escape.rb | 267 + lib/ruby-1.9.1-rc1/test/ruby/test_variable.rb | 84 + lib/ruby-1.9.1-rc1/test/ruby/test_whileuntil.rb | 82 + lib/ruby-1.9.1-rc1/test/ruby/test_yield.rb | 366 + lib/ruby-1.9.1-rc1/test/ruby/ut_eof.rb | 128 + lib/ruby-1.9.1-rc1/test/rubygems/bogussources.rb | 8 + .../test/rubygems/data/gem-private_key.pem | 27 + .../test/rubygems/data/gem-public_cert.pem | 20 + .../test/rubygems/fake_certlib/openssl.rb | 7 + lib/ruby-1.9.1-rc1/test/rubygems/functional.rb | 99 + .../test/rubygems/gem_installer_test_case.rb | 86 + .../test/rubygems/gem_package_tar_test_case.rb | 146 + lib/ruby-1.9.1-rc1/test/rubygems/gemutilities.rb | 488 + lib/ruby-1.9.1-rc1/test/rubygems/insure_session.rb | 51 + lib/ruby-1.9.1-rc1/test/rubygems/mockgemui.rb | 63 + lib/ruby-1.9.1-rc1/test/rubygems/private_key.pem | 27 + lib/ruby-1.9.1-rc1/test/rubygems/public_cert.pem | 20 + lib/ruby-1.9.1-rc1/test/rubygems/simple_gem.rb | 72 + lib/ruby-1.9.1-rc1/test/rubygems/test_config.rb | 19 + lib/ruby-1.9.1-rc1/test/rubygems/test_gem.rb | 575 + .../test/rubygems/test_gem_builder.rb | 33 + .../test/rubygems/test_gem_command.rb | 195 + .../test/rubygems/test_gem_command_manager.rb | 212 + .../rubygems/test_gem_commands_build_command.rb | 74 + .../rubygems/test_gem_commands_cert_command.rb | 125 + .../rubygems/test_gem_commands_check_command.rb | 24 + .../rubygems/test_gem_commands_contents_command.rb | 91 + .../test_gem_commands_dependency_command.rb | 226 + .../test_gem_commands_environment_command.rb | 133 + .../rubygems/test_gem_commands_fetch_command.rb | 54 + .../test_gem_commands_generate_index_command.rb | 32 + .../rubygems/test_gem_commands_install_command.rb | 165 + .../rubygems/test_gem_commands_list_command.rb | 36 + .../rubygems/test_gem_commands_lock_command.rb | 68 + .../rubygems/test_gem_commands_mirror_command.rb | 60 + .../rubygems/test_gem_commands_outdated_command.rb | 42 + .../rubygems/test_gem_commands_pristine_command.rb | 108 + .../rubygems/test_gem_commands_query_command.rb | 326 + .../rubygems/test_gem_commands_server_command.rb | 26 + .../rubygems/test_gem_commands_sources_command.rb | 274 + .../test_gem_commands_specification_command.rb | 96 + .../rubygems/test_gem_commands_stale_command.rb | 38 + .../test_gem_commands_uninstall_command.rb | 61 + .../rubygems/test_gem_commands_unpack_command.rb | 114 + .../rubygems/test_gem_commands_update_command.rb | 164 + .../test/rubygems/test_gem_config_file.rb | 279 + .../test/rubygems/test_gem_dependency.rb | 139 + .../test/rubygems/test_gem_dependency_installer.rb | 636 + .../test/rubygems/test_gem_dependency_list.rb | 209 + .../test/rubygems/test_gem_digest.rb | 46 + .../test/rubygems/test_gem_doc_manager.rb | 31 + .../rubygems/test_gem_ext_configure_builder.rb | 86 + .../test/rubygems/test_gem_ext_ext_conf_builder.rb | 121 + .../test/rubygems/test_gem_ext_rake_builder.rb | 81 + .../test/rubygems/test_gem_format.rb | 67 + .../test/rubygems/test_gem_gem_path_searcher.rb | 67 + .../test/rubygems/test_gem_gem_runner.rb | 34 + .../test/rubygems/test_gem_indexer.rb | 262 + .../rubygems/test_gem_install_update_options.rb | 60 + .../test/rubygems/test_gem_installer.rb | 909 + .../test/rubygems/test_gem_local_remote_options.rb | 96 + .../test/rubygems/test_gem_package_tar_header.rb | 137 + .../test/rubygems/test_gem_package_tar_input.rb | 119 + .../test/rubygems/test_gem_package_tar_output.rb | 104 + .../test/rubygems/test_gem_package_tar_reader.rb | 53 + .../rubygems/test_gem_package_tar_reader_entry.rb | 116 + .../test/rubygems/test_gem_package_tar_writer.rb | 151 + .../test/rubygems/test_gem_platform.rb | 239 + .../test/rubygems/test_gem_remote_fetcher.rb | 708 + .../test/rubygems/test_gem_requirement.rb | 222 + .../test/rubygems/test_gem_server.rb | 300 + .../test/rubygems/test_gem_source_index.rb | 886 + .../test/rubygems/test_gem_source_info_cache.rb | 447 + .../rubygems/test_gem_source_info_cache_entry.rb | 78 + .../test/rubygems/test_gem_spec_fetcher.rb | 312 + .../test/rubygems/test_gem_specification.rb | 959 + .../test/rubygems/test_gem_stream_ui.rb | 116 + .../test/rubygems/test_gem_uninstaller.rb | 87 + .../test/rubygems/test_gem_validator.rb | 69 + .../test/rubygems/test_gem_version.rb | 214 + .../test/rubygems/test_gem_version_option.rb | 76 + lib/ruby-1.9.1-rc1/test/rubygems/test_kernel.rb | 63 + lib/ruby-1.9.1-rc1/test/runner.rb | 25 + lib/ruby-1.9.1-rc1/test/scanf/data.txt | 6 + lib/ruby-1.9.1-rc1/test/scanf/test_scanf.rb | 320 + lib/ruby-1.9.1-rc1/test/scanf/test_scanfblocks.rb | 81 + lib/ruby-1.9.1-rc1/test/scanf/test_scanfio.rb | 19 + lib/ruby-1.9.1-rc1/test/sdbm/test_sdbm.rb | 554 + lib/ruby-1.9.1-rc1/test/socket/test_nonblock.rb | 179 + lib/ruby-1.9.1-rc1/test/socket/test_socket.rb | 100 + lib/ruby-1.9.1-rc1/test/socket/test_tcp.rb | 42 + lib/ruby-1.9.1-rc1/test/socket/test_udp.rb | 32 + lib/ruby-1.9.1-rc1/test/socket/test_unix.rb | 149 + lib/ruby-1.9.1-rc1/test/stringio/test_stringio.rb | 397 + .../test/strscan/test_stringscanner.rb | 674 + lib/ruby-1.9.1-rc1/test/test_delegate.rb | 33 + lib/ruby-1.9.1-rc1/test/test_ipaddr.rb | 4 + lib/ruby-1.9.1-rc1/test/test_pp.rb | 4 + lib/ruby-1.9.1-rc1/test/test_prettyprint.rb | 4 + lib/ruby-1.9.1-rc1/test/test_prime.rb | 126 + lib/ruby-1.9.1-rc1/test/test_pstore.rb | 74 + lib/ruby-1.9.1-rc1/test/test_set.rb | 4 + lib/ruby-1.9.1-rc1/test/test_shellwords.rb | 39 + lib/ruby-1.9.1-rc1/test/test_singleton.rb | 15 + lib/ruby-1.9.1-rc1/test/test_tempfile.rb | 35 + lib/ruby-1.9.1-rc1/test/test_time.rb | 4 + lib/ruby-1.9.1-rc1/test/test_timeout.rb | 13 + lib/ruby-1.9.1-rc1/test/test_tsort.rb | 4 + lib/ruby-1.9.1-rc1/test/uri/test_common.rb | 55 + lib/ruby-1.9.1-rc1/test/uri/test_ftp.rb | 62 + lib/ruby-1.9.1-rc1/test/uri/test_generic.rb | 698 + lib/ruby-1.9.1-rc1/test/uri/test_http.rb | 63 + lib/ruby-1.9.1-rc1/test/uri/test_ldap.rb | 100 + lib/ruby-1.9.1-rc1/test/uri/test_mailto.rb | 122 + lib/ruby-1.9.1-rc1/test/uri/test_parser.rb | 41 + lib/ruby-1.9.1-rc1/test/webrick/.htaccess | 1 + lib/ruby-1.9.1-rc1/test/webrick/test_cgi.rb | 101 + lib/ruby-1.9.1-rc1/test/webrick/test_cookie.rb | 104 + .../test/webrick/test_filehandler.rb | 204 + lib/ruby-1.9.1-rc1/test/webrick/test_httpauth.rb | 82 + lib/ruby-1.9.1-rc1/test/webrick/test_httpproxy.rb | 281 + .../test/webrick/test_httprequest.rb | 349 + lib/ruby-1.9.1-rc1/test/webrick/test_httpserver.rb | 260 + lib/ruby-1.9.1-rc1/test/webrick/test_httputils.rb | 96 + .../test/webrick/test_httpversion.rb | 40 + lib/ruby-1.9.1-rc1/test/webrick/test_server.rb | 64 + lib/ruby-1.9.1-rc1/test/webrick/test_utils.rb | 64 + lib/ruby-1.9.1-rc1/test/webrick/utils.rb | 63 + lib/ruby-1.9.1-rc1/test/webrick/webrick.cgi | 36 + .../test/webrick/webrick_long_filename.cgi | 36 + .../test/win32ole/err_in_callback.rb | 9 + lib/ruby-1.9.1-rc1/test/win32ole/orig_data.csv | 5 + .../test/win32ole/test_err_in_callback.rb | 43 + .../test/win32ole/test_folderitem2_invokeverb.rb | 89 + .../test/win32ole/test_nil2vtempty.rb | 36 + .../test/win32ole/test_ole_methods.rb | 36 + .../test/win32ole/test_propertyputref.rb | 30 + lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole.rb | 484 + .../test/win32ole/test_win32ole_event.rb | 334 + .../test/win32ole/test_win32ole_method.rb | 141 + .../test/win32ole/test_win32ole_param.rb | 91 + .../test/win32ole/test_win32ole_type.rb | 249 + .../test/win32ole/test_win32ole_typelib.rb | 110 + .../test/win32ole/test_win32ole_variable.rb | 61 + .../test/win32ole/test_win32ole_variant.rb | 644 + .../test/win32ole/test_win32ole_variant_m.rb | 35 + .../test/win32ole/test_win32ole_variant_outarg.rb | 69 + lib/ruby-1.9.1-rc1/test/win32ole/test_word.rb | 72 + .../test/xmlrpc/data/bug_bool.expected | 3 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_bool.xml | 8 + .../test/xmlrpc/data/bug_cdata.expected | 3 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_cdata.xml | 8 + .../test/xmlrpc/data/bug_covert.expected | 10 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_covert.xml | 6 + .../test/xmlrpc/data/datetime_iso8601.xml | 8 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/fault.xml | 16 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/value.expected | 7 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/value.xml | 22 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/xml1.expected | 243 + lib/ruby-1.9.1-rc1/test/xmlrpc/data/xml1.xml | 1 + lib/ruby-1.9.1-rc1/test/xmlrpc/test_cookie.rb | 96 + lib/ruby-1.9.1-rc1/test/xmlrpc/test_datetime.rb | 159 + lib/ruby-1.9.1-rc1/test/xmlrpc/test_features.rb | 48 + lib/ruby-1.9.1-rc1/test/xmlrpc/test_marshal.rb | 93 + lib/ruby-1.9.1-rc1/test/xmlrpc/test_parser.rb | 85 + .../test/xmlrpc/test_webrick_server.rb | 98 + lib/ruby-1.9.1-rc1/test/xmlrpc/webrick_testing.rb | 38 + lib/ruby-1.9.1-rc1/test/yaml/test_yaml.rb | 1326 + lib/ruby-1.9.1-rc1/test/yaml/test_yamlstore.rb | 74 + lib/ruby-1.9.1-rc1/test/zlib/test_zlib.rb | 648 + lib/ruby-1.9.1-rc1/thread.c | 3815 ++ lib/ruby-1.9.1-rc1/thread_pthread.c | 849 + lib/ruby-1.9.1-rc1/thread_pthread.h | 24 + lib/ruby-1.9.1-rc1/thread_win32.c | 573 + lib/ruby-1.9.1-rc1/thread_win32.h | 33 + lib/ruby-1.9.1-rc1/time.c | 2469 + lib/ruby-1.9.1-rc1/tool/asm_parse.rb | 51 + lib/ruby-1.9.1-rc1/tool/build-transcode | 16 + lib/ruby-1.9.1-rc1/tool/compile_prelude.rb | 96 + lib/ruby-1.9.1-rc1/tool/eval.rb | 161 + lib/ruby-1.9.1-rc1/tool/file2lastrev.rb | 80 + lib/ruby-1.9.1-rc1/tool/generic_erb.rb | 34 + lib/ruby-1.9.1-rc1/tool/ifchange | 25 + lib/ruby-1.9.1-rc1/tool/insns2vm.rb | 15 + lib/ruby-1.9.1-rc1/tool/instruction.rb | 1385 + lib/ruby-1.9.1-rc1/tool/make-snapshot | 220 + lib/ruby-1.9.1-rc1/tool/mdoc2man.rb | 465 + lib/ruby-1.9.1-rc1/tool/node_name.rb | 4 + lib/ruby-1.9.1-rc1/tool/parse.rb | 13 + lib/ruby-1.9.1-rc1/tool/transcode-tblgen.rb | 842 + lib/ruby-1.9.1-rc1/tool/vtlh.rb | 15 + lib/ruby-1.9.1-rc1/tool/ytab.sed | 30 + lib/ruby-1.9.1-rc1/transcode.c | 4118 ++ lib/ruby-1.9.1-rc1/transcode_data.h | 99 + lib/ruby-1.9.1-rc1/transdb.h | 137 + lib/ruby-1.9.1-rc1/util.c | 3828 ++ lib/ruby-1.9.1-rc1/variable.c | 1981 + lib/ruby-1.9.1-rc1/version.c | 52 + lib/ruby-1.9.1-rc1/version.h | 54 + lib/ruby-1.9.1-rc1/vm.c | 2010 + lib/ruby-1.9.1-rc1/vm.inc | 2838 + lib/ruby-1.9.1-rc1/vm_core.h | 658 + lib/ruby-1.9.1-rc1/vm_dump.c | 618 + lib/ruby-1.9.1-rc1/vm_eval.c | 1348 + lib/ruby-1.9.1-rc1/vm_exec.c | 156 + lib/ruby-1.9.1-rc1/vm_exec.h | 187 + lib/ruby-1.9.1-rc1/vm_insnhelper.c | 1512 + lib/ruby-1.9.1-rc1/vm_insnhelper.h | 194 + lib/ruby-1.9.1-rc1/vm_method.c | 1141 + lib/ruby-1.9.1-rc1/vm_opts.h | 51 + lib/ruby-1.9.1-rc1/vmtc.inc | 96 + lib/ruby-1.9.1-rc1/win32/Makefile.sub | 755 + lib/ruby-1.9.1-rc1/win32/README.win32 | 143 + lib/ruby-1.9.1-rc1/win32/configure.bat | 150 + lib/ruby-1.9.1-rc1/win32/dir.h | 44 + lib/ruby-1.9.1-rc1/win32/enc-setup.mak | 10 + lib/ruby-1.9.1-rc1/win32/ifchange.bat | 69 + lib/ruby-1.9.1-rc1/win32/mkexports.rb | 160 + lib/ruby-1.9.1-rc1/win32/resource.rb | 96 + lib/ruby-1.9.1-rc1/win32/rm.bat | 8 + lib/ruby-1.9.1-rc1/win32/setup.mak | 234 + lib/ruby-1.9.1-rc1/win32/win32.c | 4691 ++ lib/ruby-1.9.1-rc1/win32/winmain.c | 10 + lib/ruby-1.9.1-rc1/yarvtest/runner.rb | 9 + lib/ruby-1.9.1-rc1/yarvtest/test_block.rb | 429 + lib/ruby-1.9.1-rc1/yarvtest/test_eval.rb | 221 + lib/ruby-1.9.1-rc1/yarvtest/test_exception.rb | 408 + lib/ruby-1.9.1-rc1/yarvtest/test_flow.rb | 591 + lib/ruby-1.9.1-rc1/yarvtest/test_jump.rb | 296 + lib/ruby-1.9.1-rc1/yarvtest/test_proc.rb | 293 + lib/ruby-1.9.1-rc1/yarvtest/test_syntax.rb | 594 + lib/ruby-1.9.1-rc1/yarvtest/test_test.rb | 8 + lib/ruby-1.9.1-rc1/yarvtest/test_thread.rb | 209 + lib/ruby-1.9.1-rc1/yarvtest/yarvtest.rb | 112 + 3049 files changed, 1087740 insertions(+) create mode 100644 lib/ruby-1.9.1-rc1/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/.document create mode 100644 lib/ruby-1.9.1-rc1/.gdbinit create mode 100644 lib/ruby-1.9.1-rc1/COPYING create mode 100644 lib/ruby-1.9.1-rc1/COPYING.ja create mode 100644 lib/ruby-1.9.1-rc1/ChangeLog create mode 100644 lib/ruby-1.9.1-rc1/GPL create mode 100644 lib/ruby-1.9.1-rc1/KNOWNBUGS.rb create mode 100644 lib/ruby-1.9.1-rc1/LEGAL create mode 100644 lib/ruby-1.9.1-rc1/LGPL create mode 100644 lib/ruby-1.9.1-rc1/Makefile.in create mode 100644 lib/ruby-1.9.1-rc1/NEWS create mode 100644 lib/ruby-1.9.1-rc1/README create mode 100644 lib/ruby-1.9.1-rc1/README.EXT create mode 100644 lib/ruby-1.9.1-rc1/README.EXT.ja create mode 100644 lib/ruby-1.9.1-rc1/README.ja create mode 100644 lib/ruby-1.9.1-rc1/ToDo create mode 100644 lib/ruby-1.9.1-rc1/array.c create mode 100644 lib/ruby-1.9.1-rc1/bcc32/Makefile.sub create mode 100644 lib/ruby-1.9.1-rc1/bcc32/README.bcc32 create mode 100755 lib/ruby-1.9.1-rc1/bcc32/configure.bat create mode 100755 lib/ruby-1.9.1-rc1/bcc32/mkexports.rb create mode 100644 lib/ruby-1.9.1-rc1/bcc32/setup.mak create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_answer.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_erb.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_factorial.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_fib.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_mandelbrot.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_pentomino.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_raise.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_strconcat.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_tak.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_tarai.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_app_uri.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_io_file_create.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_io_file_read.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_io_file_write.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_loop_for.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_loop_generator.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_loop_times.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop2.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_ackermann.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_array.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_binary_trees.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_concatenate.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_count_words.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_exception.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_fannkuch.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_fasta.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_k_nucleotide.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_lists.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_mandelbrot.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_matrix.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_meteor_contest.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_nbody.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_nested_loop.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve_bits.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_object.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_partial_sums.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_pidigits.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_random.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_reverse_complement.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_sieve.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_so_spectralnorm.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_block.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_const.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ensure.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar_set.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_length.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_neq.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_not.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_rescue.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_simplereturn.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm1_swap.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_array.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_case.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_eval.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_method.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_mutex.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method_ov.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_proc.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_regexp.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_send.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_super.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_unif1.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm2_zsuper.rb create mode 100755 lib/ruby-1.9.1-rc1/benchmark/bm_vm3_gc.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_create_join.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_mutex.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/bmx_temp.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/driver.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/make_fasta_output.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.pl create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.py create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.scm create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/eval.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.pl create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.py create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fact.scm create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.pl create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.py create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/fib.scm create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.pl create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.py create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/loop.scm create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/loop2.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.pl create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.py create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/other-lang/tak.scm create mode 100644 lib/ruby-1.9.1-rc1/benchmark/prepare_so_count_words.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/prepare_so_k_nucleotide.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/prepare_so_reverse_complement.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/report.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/run.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/runc.rb create mode 100644 lib/ruby-1.9.1-rc1/benchmark/wc.input.base create mode 100644 lib/ruby-1.9.1-rc1/bignum.c create mode 100755 lib/ruby-1.9.1-rc1/bin/erb create mode 100755 lib/ruby-1.9.1-rc1/bin/gem create mode 100644 lib/ruby-1.9.1-rc1/bin/irb create mode 100755 lib/ruby-1.9.1-rc1/bin/rake create mode 100644 lib/ruby-1.9.1-rc1/bin/rdoc create mode 100755 lib/ruby-1.9.1-rc1/bin/ri create mode 100755 lib/ruby-1.9.1-rc1/bin/testrb create mode 100644 lib/ruby-1.9.1-rc1/blockinlining.c create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/pending.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/runner.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_attr.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_autoload.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_block.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_class.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_eval.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_exception.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_finalizer.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_flip.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_flow.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_fork.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_io.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_jump.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_literal.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_load.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_marshal.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_massign.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_method.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_objectspace.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_proc.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_struct.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_syntax.rb create mode 100644 lib/ruby-1.9.1-rc1/bootstraptest/test_thread.rb create mode 100644 lib/ruby-1.9.1-rc1/class.c create mode 100644 lib/ruby-1.9.1-rc1/common.mk create mode 100644 lib/ruby-1.9.1-rc1/compar.c create mode 100644 lib/ruby-1.9.1-rc1/compile.c create mode 100644 lib/ruby-1.9.1-rc1/complex.c create mode 100644 lib/ruby-1.9.1-rc1/config.guess create mode 100644 lib/ruby-1.9.1-rc1/config.sub create mode 100755 lib/ruby-1.9.1-rc1/configure create mode 100644 lib/ruby-1.9.1-rc1/configure.in create mode 100644 lib/ruby-1.9.1-rc1/cont.c create mode 100644 lib/ruby-1.9.1-rc1/cygwin/GNUmakefile.in create mode 100644 lib/ruby-1.9.1-rc1/debug.c create mode 100644 lib/ruby-1.9.1-rc1/debug.h create mode 100644 lib/ruby-1.9.1-rc1/defs/keywords create mode 100644 lib/ruby-1.9.1-rc1/defs/known_errors.def create mode 100644 lib/ruby-1.9.1-rc1/defs/lex.c.src create mode 100644 lib/ruby-1.9.1-rc1/defs/opt_insn_unif.def create mode 100644 lib/ruby-1.9.1-rc1/defs/opt_operand.def create mode 100644 lib/ruby-1.9.1-rc1/dir.c create mode 100644 lib/ruby-1.9.1-rc1/dln.c create mode 100644 lib/ruby-1.9.1-rc1/dln.h create mode 100644 lib/ruby-1.9.1-rc1/dmydln.c create mode 100644 lib/ruby-1.9.1-rc1/dmyencoding.c create mode 100644 lib/ruby-1.9.1-rc1/dmyext.c create mode 100644 lib/ruby-1.9.1-rc1/doc/ChangeLog-1.8.0 create mode 100644 lib/ruby-1.9.1-rc1/doc/ChangeLog-YARV create mode 100644 lib/ruby-1.9.1-rc1/doc/NEWS-1.8.7 create mode 100644 lib/ruby-1.9.1-rc1/doc/forwardable.rd create mode 100644 lib/ruby-1.9.1-rc1/doc/forwardable.rd.ja create mode 100644 lib/ruby-1.9.1-rc1/doc/irb/irb-tools.rd.ja create mode 100644 lib/ruby-1.9.1-rc1/doc/irb/irb.rd create mode 100644 lib/ruby-1.9.1-rc1/doc/irb/irb.rd.ja create mode 100644 lib/ruby-1.9.1-rc1/doc/shell.rd create mode 100644 lib/ruby-1.9.1-rc1/doc/shell.rd.ja create mode 100644 lib/ruby-1.9.1-rc1/enc.mk create mode 100644 lib/ruby-1.9.1-rc1/enc/Makefile.in create mode 100644 lib/ruby-1.9.1-rc1/enc/ascii.c create mode 100644 lib/ruby-1.9.1-rc1/enc/big5.c create mode 100644 lib/ruby-1.9.1-rc1/enc/cp949.c create mode 100644 lib/ruby-1.9.1-rc1/enc/depend create mode 100644 lib/ruby-1.9.1-rc1/enc/emacs_mule.c create mode 100644 lib/ruby-1.9.1-rc1/enc/encdb.c create mode 100644 lib/ruby-1.9.1-rc1/enc/euc_jp.c create mode 100644 lib/ruby-1.9.1-rc1/enc/euc_kr.c create mode 100644 lib/ruby-1.9.1-rc1/enc/euc_tw.c create mode 100644 lib/ruby-1.9.1-rc1/enc/gb18030.c create mode 100644 lib/ruby-1.9.1-rc1/enc/gb2312.c create mode 100644 lib/ruby-1.9.1-rc1/enc/gbk.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_2022_jp.h create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_1.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_10.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_11.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_13.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_14.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_15.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_16.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_2.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_3.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_4.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_5.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_6.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_7.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_8.c create mode 100644 lib/ruby-1.9.1-rc1/enc/iso_8859_9.c create mode 100644 lib/ruby-1.9.1-rc1/enc/koi8_r.c create mode 100644 lib/ruby-1.9.1-rc1/enc/koi8_u.c create mode 100644 lib/ruby-1.9.1-rc1/enc/make_encdb.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/make_encmake.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/prelude.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/shift_jis.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/CP932UDA%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@IBM%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@NEC_IBM%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932UDA.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@IBM.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@NEC_IBM.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0201-KANA%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@1990%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@MS%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208UDC%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208VDC@NEC%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212@MS%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212UDC%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212VDC@IBM%UCS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0201-KANA.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@1990.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@MS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208UDC.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208VDC@NEC.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212@MS.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212UDC.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212VDC@IBM.src create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/cp850-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/cp852-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/cp855-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/cp949-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/escape.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/escape.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/euckr-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm437-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm775-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm852-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm855-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm857-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm860-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm861-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm862-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm863-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm865-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm866-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/ibm869-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-1-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-10-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-11-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-13-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-14-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-15-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-2-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-3-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-4-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-5-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-6-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-7-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-8-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso-8859-9-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso2022.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/iso2022.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/koi8-r-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/koi8-u-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/korean.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/korean.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/maccroatian-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/maccyrillic-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/macgreek-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/maciceland-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/macroman-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/macromania-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/macturkish-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/macukraine-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/make_transdb.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/newline.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/newline.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/single_byte.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/single_byte.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/tis-620-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/transdb.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.c create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.trans create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1250-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1251-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1252-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1253-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1254-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1255-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1256-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-1257-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/trans/windows-874-tbl.rb create mode 100644 lib/ruby-1.9.1-rc1/enc/unicode.c create mode 100644 lib/ruby-1.9.1-rc1/enc/us_ascii.c create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_16be.c create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_16le.c create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_32be.c create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_32le.c create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_7.h create mode 100644 lib/ruby-1.9.1-rc1/enc/utf_8.c create mode 100644 lib/ruby-1.9.1-rc1/enc/windows_1251.c create mode 100644 lib/ruby-1.9.1-rc1/encdb.h create mode 100644 lib/ruby-1.9.1-rc1/encoding.c create mode 100644 lib/ruby-1.9.1-rc1/enum.c create mode 100644 lib/ruby-1.9.1-rc1/enumerator.c create mode 100644 lib/ruby-1.9.1-rc1/error.c create mode 100644 lib/ruby-1.9.1-rc1/eval.c create mode 100644 lib/ruby-1.9.1-rc1/eval_error.c create mode 100644 lib/ruby-1.9.1-rc1/eval_intern.h create mode 100644 lib/ruby-1.9.1-rc1/eval_jump.c create mode 100644 lib/ruby-1.9.1-rc1/ext/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/.document create mode 100644 lib/ruby-1.9.1-rc1/ext/Setup create mode 100644 lib/ruby-1.9.1-rc1/ext/Setup.atheos create mode 100644 lib/ruby-1.9.1-rc1/ext/Setup.emx create mode 100644 lib/ruby-1.9.1-rc1/ext/Setup.nt create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/README create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.c create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.def create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.h create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_en.html create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_ja.html create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/jacobian.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/ludcmp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/math.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/newton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/util.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/linear.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/nlsolve.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/pi.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/continuation/continuation.c create mode 100644 lib/ruby-1.9.1-rc1/ext/continuation/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/coverage/coverage.c create mode 100644 lib/ruby-1.9.1-rc1/ext/coverage/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/curses.c create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/hello.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/mouse.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/rain.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/view.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/curses/view2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dbm/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/dbm/dbm.c create mode 100644 lib/ruby-1.9.1-rc1/ext/dbm/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/dbm/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/bubblebabble.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/defs.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/digest.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/digest.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/lib/digest.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/lib/digest/hmac.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/md5.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/md5.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/md5init.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160init.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1init.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/lib/sha2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.h create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2init.c create mode 100644 lib/ruby-1.9.1-rc1/ext/digest/test.sh create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/cfunc.c create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/cptr.c create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/dl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/dl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/handle.c create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/callback.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/cparser.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/func.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/import.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/pack.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/stack.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/struct.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/types.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/lib/dl/value.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/mkcallback.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_all.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_base.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_dl2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_func.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_import.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/test/test_win32.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/win32/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/win32/lib/Win32API.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/registry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/resolv.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/sspi.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/etc.c create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/etc.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/etc.txt.ja create mode 100644 lib/ruby-1.9.1-rc1/ext/etc/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/extmk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/fcntl/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/fcntl/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/fcntl/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/fcntl/fcntl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/fiber/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/fiber/fiber.c create mode 100644 lib/ruby-1.9.1-rc1/ext/gdbm/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/gdbm/README create mode 100644 lib/ruby-1.9.1-rc1/ext/gdbm/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/gdbm/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/gdbm/gdbm.c create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/charset_alias.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/iconv.c create mode 100644 lib/ruby-1.9.1-rc1/ext/iconv/mkwrapper.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/io/wait/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/io/wait/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/io/wait/lib/nonblock.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/io/wait/wait.c create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/generator/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/generator/generator.c create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.c create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.h create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/parser/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.c create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.rl create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.c create mode 100644 lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.h create mode 100644 lib/ruby-1.9.1-rc1/ext/json/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/Array.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/FalseClass.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/Hash.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/Key.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/NilClass.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/Numeric.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/String.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/TrueClass.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/add/core.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/add/rails.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/common.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/editor.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/ext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/json.xpm create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/pure.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/generator.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/parser.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/json/lib/json/version.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/mathn/complex/complex.c create mode 100644 lib/ruby-1.9.1-rc1/ext/mathn/complex/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/mathn/rational/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/mathn/rational/rational.c create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/lib/kconv.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/config.h create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.c create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.h create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/nkf/nkf.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/bn.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/buffering.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/cipher.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/digest.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/ssl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/x509.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dh.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dsa.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_ec.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_rsa.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl_session.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_version.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.h create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509attr.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509cert.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509crl.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509ext.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509name.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509req.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509revoked.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509store.c create mode 100644 lib/ruby-1.9.1-rc1/ext/openssl/ruby_missing.h create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/README create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/README.expect create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/README.expect.ja create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/README.ja create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/expect_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/lib/expect.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/pty.c create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/script.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/pty/shl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/purelib.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/racc/cparse/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/racc/cparse/README create mode 100644 lib/ruby-1.9.1-rc1/ext/racc/cparse/cparse.c create mode 100644 lib/ruby-1.9.1-rc1/ext/racc/cparse/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/racc/cparse/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/README create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/README.ja create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/readline/readline.c create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/README create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/eventids1.c create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/eventids2.c create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/eventids2table.c create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/core.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/filter.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/lexer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/sexp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/ripper.c create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/ripper.y create mode 100755 lib/ruby-1.9.1-rc1/ext/ripper/tools/generate-param-macros.rb create mode 100755 lib/ruby-1.9.1-rc1/ext/ripper/tools/generate.rb create mode 100755 lib/ruby-1.9.1-rc1/ext/ripper/tools/preproc.rb create mode 100755 lib/ruby-1.9.1-rc1/ext/ripper/tools/strip.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/ripper/y.output create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/_sdbm.c create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/init.c create mode 100644 lib/ruby-1.9.1-rc1/ext/sdbm/sdbm.h create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/addrinfo.h create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/getaddrinfo.c create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/getnameinfo.c create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/mkconstants.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/socket.c create mode 100644 lib/ruby-1.9.1-rc1/ext/socket/sockport.h create mode 100644 lib/ruby-1.9.1-rc1/ext/stringio/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/stringio/README create mode 100644 lib/ruby-1.9.1-rc1/ext/stringio/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/stringio/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/stringio/stringio.c create mode 100644 lib/ruby-1.9.1-rc1/ext/strscan/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/strscan/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/strscan/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/strscan/strscan.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/bytecode.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/emitter.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/gram.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/gram.h create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/handler.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/implicit.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/node.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/rubyext.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/syck.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/syck.h create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/token.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/yaml2byte.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syck/yamlbyte.h create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/syslog.c create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/syslog.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/syslog/test.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/ChangeLog.tkextlib create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eng create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eucj create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/README.1st create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/README.ActiveTcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/README.fork create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/README.macosx-aqua create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/README.tcltklib create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/multi-tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/remote-tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tcltk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/after.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/autoload.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bgerror.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bindtag.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/button.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/canvas.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/canvastag.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/checkbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/clipboard.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/clock.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/composite.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/console.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/encodedstr.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/entry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/event.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/font.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/frame.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/grid.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/image.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemconfig.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemfont.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/kinput.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/label.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/labelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/listbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/macpkg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menubar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menuspec.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/message.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/mngfocus.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/msgcat.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/namespace.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optiondb.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optionobj.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/pack.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/package.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/palette.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/panedwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/place.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/radiobutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/root.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollable.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/selection.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/spinbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/tagfont.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/text.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textimage.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textmark.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/texttag.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/timer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/toplevel.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/ttk_selector.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/txtwin_abst.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/validation.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/variable.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/virtevent.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winfo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winpkg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/wm.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tk/xim.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkafter.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkbgerror.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkcanvas.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkclass.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkconsole.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/icons.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/SUPPORT_STATUS create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/barchart.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/bitmap.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/busy.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/component.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/container.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/cutbuffer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/dragdrop.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/eps.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/graph.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/htext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/spline.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/stripchart.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/table.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabnotebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabset.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/ted.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/button.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/frame.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/label.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/toplevel.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/treeview.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/unix_dnd.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/vector.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/watch.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/win_printer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/winop.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/bitmap.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/button.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/buttonbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/combobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dragsite.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dropsite.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/entry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/label.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/listbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/mainframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/messagedlg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/notebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panedwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/passwddlg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressdlg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollview.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectcolor.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectfont.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/separator.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/spinbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/statusbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/titleframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/tree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/widget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/incr_tcl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/incr_tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/calendar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/checkbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/combobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dateentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/datefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/entryfield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/feedback.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/finddialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/menubar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagebox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/notebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/radiobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/shell.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spindate.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinint.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinner.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spintime.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabset.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timeentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/toolbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/watch.rb create mode 100755 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/pkg_checker.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/autoscroll.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ctext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/cursor.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/datefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/getstring.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/history.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ico.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ip_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/panelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/plotchart.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ruler.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/screenruler.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/scrollwin.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/style.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/superframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/swaplist.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tooltip.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/widget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/tclx.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/sizegrip.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/style.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcheckbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcombobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabel.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tmenubutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tnotebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tpaned.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tprogressbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tradiobutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/treeview.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscrollbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tseparator.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tsquare.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/shape.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/tkdnd.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/bmp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/gif.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ico.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/jpeg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pcx.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pixmap.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/png.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ppm.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ps.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/sgi.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/sun.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/tga.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/tiff.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/window.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/xbm.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/xpm.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktable.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktable/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktable/tktable.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/tktrans.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/trofs.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/version.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/bargraph.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/charts.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/dial.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/pie.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/spinbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/setup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/winico.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkfont.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkmacpkg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkmenubar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkmngfocus.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkpalette.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkscrollbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tktext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkvirtevent.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/lib/tkwinpkg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/old-README.tcltklib.eucj create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/24hr_clock.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/binding_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/bindtag_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/binstr_usage.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/btn_with_frame.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/cd_timer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_res_test.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_resource create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog.prev create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.1st create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.tkencoding create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/anilabel.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/aniwave.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/arrow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bind.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bitmap.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/button.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/clrpick.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/colors.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/combo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/cscroll.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ctext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.JP create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.tk80 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms.tk80 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/filebox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/form.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/goldberg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hello create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hscale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/icon.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/items.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/knightstour.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/label.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/labelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/mclist.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu84.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menubu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/pendulum.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/plot.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/puzzle.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rmt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rolodex create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ruler.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/sayings.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/search.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/spin.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/square create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/states.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/style.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tcolor create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/text.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/textpeer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/timer create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tkencoding.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/toolbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkbut.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkmenu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttknote.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkpane.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkprogress.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/unicodeout.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/vscale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/widget create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README.1st create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/anilabel.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/aniwave.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/arrow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bind.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bitmap.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/button.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/clrpick.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/colors.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/combo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/cscroll.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ctext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.JP create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.tk80 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms.tk80 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/filebox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/form.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/goldberg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hello create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hscale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/icon.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/items.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/knightstour.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/label.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/labelframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/mclist.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu84.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu8x.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menubu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/pendulum.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/plot.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/puzzle.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rmt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex-j create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ruler.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/sayings.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/search.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/spin.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/square create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/states.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/style.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tcolor create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/text.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/textpeer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/timer create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/toolbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkbut.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkmenu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttknote.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkpane.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkprogress.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/unicodeout.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/vscale.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/widget create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/editable_listbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/encstr_usage.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/figmemo_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/earth.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/earthris.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/face.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagdown.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagup.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/gray25.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.25 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.5 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/letters.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/noletter.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/pattern.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/tcllogo.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/images/teapot.ppm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/irbtk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/irbtkw.rbw create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/iso2022-kr.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/menubar1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/menubar2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/cs.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/de.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/el.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en_gb.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/eo.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/es.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/fr.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/it.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ja.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/nl.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/pl.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ru.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/de.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/ja.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/cs.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/de.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/el.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en_gb.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/eo.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/es.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/fr.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/it.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ja.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/license.terms create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/nl.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/pl.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ru.msg create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/optobj_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/propagate.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/resource.en create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/resource.ja create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/safe-tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/scrollframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/batsu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines0.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines4.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/maru.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/safeTk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample0.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkalignbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkballoonhelp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkbiff.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkbrowse.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkcombobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons.kde create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/viewIcons.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/barchart5.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/calendar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph6.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7a.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7b.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7c.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/buckskin.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/chalk.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/qv100.t.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/rain.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/sample.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/pareto.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1b.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/readme.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/scripts/stipples.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/winop1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/winop2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/basic.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/bwidget.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/dnd.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/manager.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/select.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/x1.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/datefield.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/xyplot.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/iconlib.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/readme.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/repeater.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/toolbutton.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/README create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/hv.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image10 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image11 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image12 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image13 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image14 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image3 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image4 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image5 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image6 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image7 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image8 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/image9 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page1/index.html create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image10 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image11 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image12 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image13 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image14 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image15 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image16 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image17 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image18 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image19 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image20 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image21 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image22 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image23 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image24 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image25 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image26 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image27 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image28 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image29 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image3 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image30 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image31 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image32 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image33 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image34 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image35 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image36 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image37 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image38 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image39 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image4 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image5 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image6 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image7 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image8 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image9 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/index.html create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image10 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image11 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image12 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image13 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image14 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image3 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image4 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image5 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image6 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image7 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image8 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image9 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/index.html create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image1 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image2 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image3 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image4 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image5 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image6 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image7 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image8 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image9 create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/index.html create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/ss.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkimg/demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkimg/readme.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/basic.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/buttons.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/command.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/debug.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/dynarows.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/maxsize.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/spreadsheet.rb create mode 100755 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/tcllogo.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tktable/valid.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/bitmaps.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/explorer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/help.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/imovie.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/layout.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/mailwasher.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/outlook-folders.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/big-dll.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/big-exe.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/big-file.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/big-folder.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/big-txt.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/checked.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/file.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/folder-open.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/help-page.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-print.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-search.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/internet-security.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/sky.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/small-dll.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/small-exe.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/small-file.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/small-folder.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/small-txt.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/pics/unchecked.gif create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/random.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/readme.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/treectrl/www-options.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/README.txt create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/canvItems.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/canvSticker.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/canvSticker2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/dial_demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/m128_000.xbm create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/oscilloscope.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/pie.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/vu/vu_demo.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkfrom.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkhello.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkline.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmenubutton.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmsgcat-load_rb.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmsgcat-load_rb2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmsgcat-load_tk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmulticolumnlist.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmultilistbox.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkmultilistframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkoptdb-safeTk.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkoptdb.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tkrttimer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tksleep_sample.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktextframe.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktextio.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktimer3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktree.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/tktree.tcl create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/sample/ttk_wrapper.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/stubs.c create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/stubs.h create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/tcltklib.c create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/tkutil/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/tkutil/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/tkutil/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/tk/tkutil/tkutil.c create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/depend create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/lib/win32ole/property.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel1.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/excel3.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/ie.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/ieconst.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/ienavi.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/ienavi2.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/oledirs.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/olegen.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/sample/xml.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/win32ole/win32ole.c create mode 100644 lib/ruby-1.9.1-rc1/ext/zlib/.cvsignore create mode 100644 lib/ruby-1.9.1-rc1/ext/zlib/doc/zlib.rd create mode 100644 lib/ruby-1.9.1-rc1/ext/zlib/extconf.rb create mode 100644 lib/ruby-1.9.1-rc1/ext/zlib/zlib.c create mode 100644 lib/ruby-1.9.1-rc1/file.c create mode 100644 lib/ruby-1.9.1-rc1/gc.c create mode 100644 lib/ruby-1.9.1-rc1/gc.h create mode 100644 lib/ruby-1.9.1-rc1/gem_prelude.rb create mode 100644 lib/ruby-1.9.1-rc1/golf_prelude.c create mode 100644 lib/ruby-1.9.1-rc1/golf_prelude.rb create mode 100644 lib/ruby-1.9.1-rc1/goruby.c create mode 100644 lib/ruby-1.9.1-rc1/hash.c create mode 100644 lib/ruby-1.9.1-rc1/ia64.s create mode 100644 lib/ruby-1.9.1-rc1/id.c create mode 100644 lib/ruby-1.9.1-rc1/id.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/backward/rubyio.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/backward/rubysig.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/backward/st.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/backward/util.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/defines.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/encoding.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/intern.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/io.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/missing.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/oniguruma.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/re.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/regex.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/ruby.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/st.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/util.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/vm.h create mode 100644 lib/ruby-1.9.1-rc1/include/ruby/win32.h create mode 100644 lib/ruby-1.9.1-rc1/inits.c create mode 100644 lib/ruby-1.9.1-rc1/insns.def create mode 100644 lib/ruby-1.9.1-rc1/insns.inc create mode 100644 lib/ruby-1.9.1-rc1/insns_info.inc create mode 100644 lib/ruby-1.9.1-rc1/install-sh create mode 100755 lib/ruby-1.9.1-rc1/instruby.rb create mode 100644 lib/ruby-1.9.1-rc1/io.c create mode 100644 lib/ruby-1.9.1-rc1/iseq.c create mode 100644 lib/ruby-1.9.1-rc1/iseq.h create mode 100644 lib/ruby-1.9.1-rc1/known_errors.inc create mode 100644 lib/ruby-1.9.1-rc1/lex.c create mode 100644 lib/ruby-1.9.1-rc1/lex.c.blt create mode 100644 lib/ruby-1.9.1-rc1/lib/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/English.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/README create mode 100644 lib/ruby-1.9.1-rc1/lib/abbrev.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/base64.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/benchmark.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/cookie.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/core.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/html.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/session.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/session/pstore.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cgi/util.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/cmath.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/complex.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/csv.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/date.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/date/format.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/debug.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/delegate.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/acl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/drb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/eq.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/extserv.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/extservm.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/gw.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/invokemethod.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/observer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/ssl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/timeridconv.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/drb/unix.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/e2mmap.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/erb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/fileutils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/find.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/forwardable.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/getoptlong.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/gserver.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/ipaddr.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/chws.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/fork.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/help.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/load.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/nop.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/pushws.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/cmd/subirb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/completion.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/context.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/change-ws.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/history.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/loader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/math-mode.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/multi-irb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/save-history.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/tracer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/use-loader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ext/workspaces.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/extend-command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/frame.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/help.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/init.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/input-method.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/lc/error.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/lc/help-message create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/lc/ja/encoding_aliases.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/lc/ja/error.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/lc/ja/help-message create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/locale.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/magic-file.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/notifier.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/output-method.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ruby-lex.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ruby-token.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/slex.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/src_encoding.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/workspace.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/ws-for-case-2.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/irb/xmp.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/logger.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/mathn.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/matrix.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/minitest/autorun.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/minitest/mock.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/minitest/spec.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/minitest/unit.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/mkmf.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/monitor.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/mutex_m.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/net/ftp.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/http.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/https.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/imap.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/pop.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/protocol.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/smtp.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/net/telnet.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/observer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/open-uri.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/open3.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse/date.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse/shellwords.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse/time.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse/uri.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/optparse/version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/ostruct.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/pathname.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/pp.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/prettyprint.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/prime.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/profile.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/profiler.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/pstore.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/racc/parser.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rake.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/classic_namespace.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/clean.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/gempackagetask.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/loaders/makefile.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/packagetask.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/rake_test_loader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/rdoctask.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/runtest.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/tasklib.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/testtask.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rake/win32.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rational.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rbconfig/datadir.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/README create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/code_objects.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/diagram.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/dot.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/chm.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/chm/chm.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/common.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/frameless.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/hefss.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/html.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmerfactory.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/one_page_html.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/ri.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/class.texinfo.erb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/file.texinfo.erb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/method.texinfo.erb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/texinfo.erb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/rdf.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/xml.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/known_classes.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/attribute_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/formatter.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/fragments.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/inline.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/lines.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/preprocess.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_flow.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html_crossref.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_latex.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_test.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_texinfo.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/options.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser/c.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser/f95.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser/perl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser/ruby.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/parser/simple.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/rdoc.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/cache.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/descriptions.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/display.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/driver.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/formatter.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/paths.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/reader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/util.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/ri/writer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/stats.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/template.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rdoc/tokenstream.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/resolv-replace.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/resolv.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/attlistdecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/attribute.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/cdata.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/child.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/comment.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/doctype.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/document.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/dtd/attlistdecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/dtd/dtd.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/dtd/elementdecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/dtd/entitydecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/dtd/notationdecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/element.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encoding.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/CP-1252.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/EUC-JP.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/ICONV.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-1.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-15.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT-JIS.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT_JIS.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/UNILE.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/US-ASCII.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-16.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-8.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/entity.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/formatters/default.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/formatters/pretty.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/formatters/transitive.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/functions.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/instruction.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/light/node.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/namespace.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/node.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/output.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parent.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parseexception.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/baseparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/lightparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/pullparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/sax2parser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/streamparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/treeparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/ultralightparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/parsers/xpathparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/quickpath.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/rexml.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/sax2listener.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/source.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/streamlistener.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/syncenumerator.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/text.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/undefinednamespaceexception.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/validation/relaxng.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/validation/validation.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/validation/validationexception.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/xmldecl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/xmltokens.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/xpath.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rexml/xpath_parser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rinda/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/rinda/rinda.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rinda/ring.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rinda/tuplespace.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/0.9.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/atom.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/content.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/content/1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/content/2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/converter.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/dublincore.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/dublincore/1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/dublincore/2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/dublincore/atom.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/image.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/itunes.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/0.9.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/atom.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/base.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/content.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/dublincore.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/entry.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/feed.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/image.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/itunes.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/slash.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/syndication.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/taxonomy.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/maker/trackback.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/parser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/rexmlparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/rss.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/slash.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/syndication.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/taxonomy.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/trackback.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/xml-stylesheet.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/xml.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/xmlparser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rss/xmlscanner.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/command_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/build_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/cert_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/check_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/cleanup_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/contents_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/dependency_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/environment_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/fetch_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/generate_index_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/help_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/install_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/list_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/lock_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/mirror_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/outdated_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/pristine_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/query_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/rdoc_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/search_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/server_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/sources_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/specification_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/stale_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/uninstall_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/unpack_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/update_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/commands/which_command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/config_file.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rubygems/custom_require.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/defaults.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/dependency.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/dependency_installer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/dependency_list.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rubygems/digest/digest_adapter.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rubygems/digest/md5.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha1.rb create mode 100755 lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha2.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/doc_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/exceptions.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/ext.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/ext/builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/ext/configure_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/ext/ext_conf_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/ext/rake_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/format.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/gem_openssl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/gem_path_searcher.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/gem_runner.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer/abstract_index_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer/latest_index_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer/marshal_index_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer/master_index_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/indexer/quick_index_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/install_update_options.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/installer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/local_remote_options.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/old_format.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/f_sync_dir.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_header.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_input.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_output.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader/entry.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_writer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/platform.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/remote_fetcher.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/require_paths_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/requirement.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/rubygems_version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/security.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/server.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/source_index.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/spec_fetcher.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/specification.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/test_utilities.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/timer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/uninstaller.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/user_interaction.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/validator.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/rubygems/version_option.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/scanf.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/securerandom.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/set.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/builtin-command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/command-processor.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/error.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/filter.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/process-controller.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/system-command.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shell/version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/shellwords.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/singleton.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/sync.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/tempfile.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/test/unit.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/test/unit/assertions.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/test/unit/testcase.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/thread.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/thwait.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/time.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/timeout.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/tmpdir.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/tracer.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/tsort.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/ubygems.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/un.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/common.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/ftp.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/generic.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/http.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/https.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/ldap.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/ldaps.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/uri/mailto.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/weakref.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/accesslog.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/cgi.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/compat.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/config.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/cookie.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/htmlutils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/authenticator.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/basicauth.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/digestauth.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htdigest.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htgroup.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htpasswd.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpauth/userdb.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpproxy.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httprequest.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpresponse.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/https.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpserver.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/abstract.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgi_runner.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgihandler.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/erbhandler.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/filehandler.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/prochandler.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpstatus.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httputils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/httpversion.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/log.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/server.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/ssl.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/webrick/version.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/.document create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/README.rdoc create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/README.txt create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/base64.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/client.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/config.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/create.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/datetime.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/httpserver.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/marshal.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/parser.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/server.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/xmlrpc/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/baseemitter.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/basenode.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/constants.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/dbm.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/encoding.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/error.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/loader.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/rubytypes.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/store.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/stream.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/stringio.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/syck.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/tag.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/types.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/yamlnode.rb create mode 100644 lib/ruby-1.9.1-rc1/lib/yaml/ypath.rb create mode 100644 lib/ruby-1.9.1-rc1/load.c create mode 100644 lib/ruby-1.9.1-rc1/main.c create mode 100644 lib/ruby-1.9.1-rc1/man/erb.1 create mode 100644 lib/ruby-1.9.1-rc1/man/goruby.1 create mode 100644 lib/ruby-1.9.1-rc1/man/irb.1 create mode 100644 lib/ruby-1.9.1-rc1/man/rake.1 create mode 100644 lib/ruby-1.9.1-rc1/man/ri.1 create mode 100644 lib/ruby-1.9.1-rc1/man/ruby.1 create mode 100644 lib/ruby-1.9.1-rc1/marshal.c create mode 100644 lib/ruby-1.9.1-rc1/math.c create mode 100644 lib/ruby-1.9.1-rc1/miniprelude.c create mode 100644 lib/ruby-1.9.1-rc1/misc/README create mode 100644 lib/ruby-1.9.1-rc1/misc/inf-ruby.el create mode 100644 lib/ruby-1.9.1-rc1/misc/ruby-electric.el create mode 100644 lib/ruby-1.9.1-rc1/misc/ruby-mode.el create mode 100644 lib/ruby-1.9.1-rc1/misc/ruby-style.el create mode 100644 lib/ruby-1.9.1-rc1/misc/rubydb2x.el create mode 100644 lib/ruby-1.9.1-rc1/misc/rubydb3x.el create mode 100644 lib/ruby-1.9.1-rc1/missing/acosh.c create mode 100644 lib/ruby-1.9.1-rc1/missing/alloca.c create mode 100644 lib/ruby-1.9.1-rc1/missing/cbrt.c create mode 100644 lib/ruby-1.9.1-rc1/missing/crypt.c create mode 100644 lib/ruby-1.9.1-rc1/missing/dup2.c create mode 100644 lib/ruby-1.9.1-rc1/missing/erf.c create mode 100644 lib/ruby-1.9.1-rc1/missing/file.h create mode 100644 lib/ruby-1.9.1-rc1/missing/fileblocks.c create mode 100644 lib/ruby-1.9.1-rc1/missing/finite.c create mode 100644 lib/ruby-1.9.1-rc1/missing/flock.c create mode 100644 lib/ruby-1.9.1-rc1/missing/hypot.c create mode 100644 lib/ruby-1.9.1-rc1/missing/isinf.c create mode 100644 lib/ruby-1.9.1-rc1/missing/isnan.c create mode 100644 lib/ruby-1.9.1-rc1/missing/lgamma_r.c create mode 100644 lib/ruby-1.9.1-rc1/missing/memcmp.c create mode 100644 lib/ruby-1.9.1-rc1/missing/memmove.c create mode 100644 lib/ruby-1.9.1-rc1/missing/os2.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strchr.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strerror.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strlcat.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strlcpy.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strstr.c create mode 100644 lib/ruby-1.9.1-rc1/missing/strtol.c create mode 100644 lib/ruby-1.9.1-rc1/missing/tgamma.c create mode 100644 lib/ruby-1.9.1-rc1/missing/vsnprintf.c create mode 100755 lib/ruby-1.9.1-rc1/mkconfig.rb create mode 100644 lib/ruby-1.9.1-rc1/newline.c create mode 100644 lib/ruby-1.9.1-rc1/node.h create mode 100644 lib/ruby-1.9.1-rc1/node_name.inc create mode 100644 lib/ruby-1.9.1-rc1/numeric.c create mode 100644 lib/ruby-1.9.1-rc1/object.c create mode 100644 lib/ruby-1.9.1-rc1/opt_sc.inc create mode 100644 lib/ruby-1.9.1-rc1/optinsn.inc create mode 100644 lib/ruby-1.9.1-rc1/optunifs.inc create mode 100644 lib/ruby-1.9.1-rc1/pack.c create mode 100644 lib/ruby-1.9.1-rc1/parse.c create mode 100644 lib/ruby-1.9.1-rc1/parse.h create mode 100644 lib/ruby-1.9.1-rc1/parse.y create mode 100644 lib/ruby-1.9.1-rc1/prelude.rb create mode 100644 lib/ruby-1.9.1-rc1/proc.c create mode 100644 lib/ruby-1.9.1-rc1/process.c create mode 100644 lib/ruby-1.9.1-rc1/random.c create mode 100644 lib/ruby-1.9.1-rc1/range.c create mode 100644 lib/ruby-1.9.1-rc1/rational.c create mode 100644 lib/ruby-1.9.1-rc1/re.c create mode 100644 lib/ruby-1.9.1-rc1/regcomp.c create mode 100644 lib/ruby-1.9.1-rc1/regenc.c create mode 100644 lib/ruby-1.9.1-rc1/regenc.h create mode 100644 lib/ruby-1.9.1-rc1/regerror.c create mode 100644 lib/ruby-1.9.1-rc1/regexec.c create mode 100644 lib/ruby-1.9.1-rc1/regint.h create mode 100644 lib/ruby-1.9.1-rc1/regparse.c create mode 100644 lib/ruby-1.9.1-rc1/regparse.h create mode 100644 lib/ruby-1.9.1-rc1/regsyntax.c create mode 100644 lib/ruby-1.9.1-rc1/revision.h create mode 100644 lib/ruby-1.9.1-rc1/ruby.c create mode 100755 lib/ruby-1.9.1-rc1/rubytest.rb create mode 100755 lib/ruby-1.9.1-rc1/runruby.rb create mode 100644 lib/ruby-1.9.1-rc1/safe.c create mode 100644 lib/ruby-1.9.1-rc1/sample/README create mode 100644 lib/ruby-1.9.1-rc1/sample/biorhythm.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/cal.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/cbreak.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/clnt.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/coverage.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/dir.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/README.rd create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/README.rd.ja create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/darray.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/darrayc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dbiff.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dcdbiff.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dchatc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dchats.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dhasen.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dhasenc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dlogc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dlogd.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dqin.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dqlib.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dqout.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/dqueue.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbch.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbm.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbmc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbs-acl.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbs.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbssl_c.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/drbssl_s.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/extserv_test.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/gw_ct.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/gw_cu.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/gw_s.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/holderc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/holders.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/http0.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/http0serv.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/name.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/namec.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/old_tuplespace.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/rinda_ts.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/rindac.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/rindas.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/ring_echo.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/ring_inspect.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/ring_place.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/simpletuple.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/speedc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/drb/speeds.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/dualstack-fetch.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/dualstack-httpd.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/eval.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/export.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/exyacc.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/fact.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/fib.awk create mode 100644 lib/ruby-1.9.1-rc1/sample/fib.pl create mode 100644 lib/ruby-1.9.1-rc1/sample/fib.py create mode 100644 lib/ruby-1.9.1-rc1/sample/fib.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/fib.scm create mode 100644 lib/ruby-1.9.1-rc1/sample/freq.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/from.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/fullpath.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/less.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/list.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/list2.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/list3.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/logger/app.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/logger/log.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/logger/shifting.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/mine.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/mkproto.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/mpart.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/observ.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/occur.pl create mode 100644 lib/ruby-1.9.1-rc1/sample/occur.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/occur2.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/c_rehash.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/cert2text.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/certstore.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/cipher.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/crlstore.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/echo_cli.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/echo_svr.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/gen_csr.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/smime_read.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/smime_write.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/openssl/wget.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/optparse/opttest.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/optparse/subcommand.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/philos.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/pi.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/rcs.awk create mode 100644 lib/ruby-1.9.1-rc1/sample/rcs.dat create mode 100644 lib/ruby-1.9.1-rc1/sample/rcs.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/rdoc/markup/rdoc2latex.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/rdoc/markup/sample.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/ripper/ruby2html.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/ripper/strip-comment.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/rss/blend.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/rss/convert.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/rss/list_description.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/rss/re_read.rb create mode 100755 lib/ruby-1.9.1-rc1/sample/rss/rss_recent.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/sieve.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/svr.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/test.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/testunit/adder.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/testunit/subtracter.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/testunit/tc_adder.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/testunit/tc_subtracter.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/testunit/ts_examples.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/time.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/trojan.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/tsvr.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/uumerge.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/demo-app.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/demo-multipart.cgi create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/demo-servlet.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/demo-urlencoded.cgi create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/hello.cgi create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/hello.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/httpd.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/httpproxy.rb create mode 100644 lib/ruby-1.9.1-rc1/sample/webrick/httpsd.rb create mode 100644 lib/ruby-1.9.1-rc1/signal.c create mode 100644 lib/ruby-1.9.1-rc1/spec/README create mode 100644 lib/ruby-1.9.1-rc1/spec/default.mspec create mode 100644 lib/ruby-1.9.1-rc1/sprintf.c create mode 100644 lib/ruby-1.9.1-rc1/st.c create mode 100644 lib/ruby-1.9.1-rc1/strftime.c create mode 100644 lib/ruby-1.9.1-rc1/string.c create mode 100644 lib/ruby-1.9.1-rc1/struct.c create mode 100644 lib/ruby-1.9.1-rc1/template/id.h.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/insns.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/insns_info.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/known_errors.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/minsns.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/opt_sc.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/optinsn.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/optunifs.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/vm.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/vmtc.inc.tmpl create mode 100644 lib/ruby-1.9.1-rc1/template/yarvarch.en create mode 100644 lib/ruby-1.9.1-rc1/template/yarvarch.ja create mode 100644 lib/ruby-1.9.1-rc1/template/yasmdata.rb.tmpl create mode 100644 lib/ruby-1.9.1-rc1/test/base64/test_base64.rb create mode 100644 lib/ruby-1.9.1-rc1/test/bigdecimal/test_bigdecimal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_cookie.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_core.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_header.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_modruby.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_multipart.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_session.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/test_cgi_tag_helper.rb create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/testdata/file1.html create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/testdata/large.png create mode 100644 lib/ruby-1.9.1-rc1/test/cgi/testdata/small.png create mode 100644 lib/ruby-1.9.1-rc1/test/csv/line_endings.gz create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_csv_parsing.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_csv_writing.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_data_converters.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_encodings.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_features.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_headers.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_interface.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_row.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_serialization.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/test_table.rb create mode 100644 lib/ruby-1.9.1-rc1/test/csv/ts_all.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_arith.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_attr.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_base.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_compat.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_conv.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_marshal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_new.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_parse.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_strftime.rb create mode 100644 lib/ruby-1.9.1-rc1/test/date/test_date_strptime.rb create mode 100644 lib/ruby-1.9.1-rc1/test/dbm/test_dbm.rb create mode 100644 lib/ruby-1.9.1-rc1/test/digest/test_digest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/digest/test_digest_hmac.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/drbtest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ignore_test_drb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/test_acl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/test_drb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/test_drbssl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/test_drbunix.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_array.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_array_drbssl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_array_drbunix.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_drb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_drb_drbssl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_drb_drbunix.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_eval.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_large.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_port.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_safe1.rb create mode 100644 lib/ruby-1.9.1-rc1/test/drb/ut_timerholder.rb create mode 100644 lib/ruby-1.9.1-rc1/test/erb/hello.erb create mode 100644 lib/ruby-1.9.1-rc1/test/erb/test_erb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/erb/test_erb_m17n.rb create mode 100644 lib/ruby-1.9.1-rc1/test/etc/test_etc.rb create mode 100644 lib/ruby-1.9.1-rc1/test/fileutils/fileasserts.rb create mode 100644 lib/ruby-1.9.1-rc1/test/fileutils/test_dryrun.rb create mode 100644 lib/ruby-1.9.1-rc1/test/fileutils/test_fileutils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/fileutils/test_nowrite.rb create mode 100644 lib/ruby-1.9.1-rc1/test/fileutils/test_verbose.rb create mode 100644 lib/ruby-1.9.1-rc1/test/gdbm/test_gdbm.rb create mode 100644 lib/ruby-1.9.1-rc1/test/iconv/test_basic.rb create mode 100644 lib/ruby-1.9.1-rc1/test/iconv/test_option.rb create mode 100644 lib/ruby-1.9.1-rc1/test/iconv/test_partial.rb create mode 100644 lib/ruby-1.9.1-rc1/test/iconv/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/inlinetest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/io/nonblock/test_flush.rb create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail1.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail10.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail11.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail12.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail13.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail14.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail18.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail19.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail2.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail20.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail21.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail22.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail23.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail24.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail25.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail27.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail28.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail3.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail4.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail5.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail6.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail7.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail8.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/fail9.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass1.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass15.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass16.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass17.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass2.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass26.json create mode 100644 lib/ruby-1.9.1-rc1/test/json/fixtures/pass3.json create mode 100755 lib/ruby-1.9.1-rc1/test/json/test_json.rb create mode 100755 lib/ruby-1.9.1-rc1/test/json/test_json_addition.rb create mode 100755 lib/ruby-1.9.1-rc1/test/json/test_json_fixtures.rb create mode 100644 lib/ruby-1.9.1-rc1/test/json/test_json_generate.rb create mode 100644 lib/ruby-1.9.1-rc1/test/json/test_json_rails.rb create mode 100755 lib/ruby-1.9.1-rc1/test/json/test_json_unicode.rb create mode 100644 lib/ruby-1.9.1-rc1/test/logger/test_logger.rb create mode 100644 lib/ruby-1.9.1-rc1/test/matrix/test_matrix.rb create mode 100644 lib/ruby-1.9.1-rc1/test/matrix/test_vector.rb create mode 100644 lib/ruby-1.9.1-rc1/test/minitest/test_mini_mock.rb create mode 100644 lib/ruby-1.9.1-rc1/test/minitest/test_mini_spec.rb create mode 100644 lib/ruby-1.9.1-rc1/test/minitest/test_mini_test.rb create mode 100644 lib/ruby-1.9.1-rc1/test/monitor/test_monitor.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/http/test_http.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/http/test_httpheader.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/http/test_https.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/http/test_https_proxy.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/http/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/imap/cacert.pem create mode 100644 lib/ruby-1.9.1-rc1/test/net/imap/server.crt create mode 100644 lib/ruby-1.9.1-rc1/test/net/imap/server.key create mode 100644 lib/ruby-1.9.1-rc1/test/net/imap/test_imap.rb create mode 100644 lib/ruby-1.9.1-rc1/test/net/pop/test_pop.rb create mode 100644 lib/ruby-1.9.1-rc1/test/nkf/test_kconv.rb create mode 100644 lib/ruby-1.9.1-rc1/test/nkf/test_nkf.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/ssl_server.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_asn1.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_cipher.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_digest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_ec.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_hmac.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_ns_spki.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_pair.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_pkcs7.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_pkey_rsa.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_ssl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509cert.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509crl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509ext.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509name.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509req.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/test_x509store.rb create mode 100644 lib/ruby-1.9.1-rc1/test/openssl/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_getopts.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_noarg.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_optarg.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_optparse.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_placearg.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_reqarg.rb create mode 100644 lib/ruby-1.9.1-rc1/test/optparse/test_summary.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ostruct/test_ostruct.rb create mode 100644 lib/ruby-1.9.1-rc1/test/pathname/test_pathname.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/binary.dat create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/rdoc_markup_to_html_crossref_reference.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_attribute_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_info_formatting.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_info_sections.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_markup.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_markup_attribute_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_markup_to_html.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_markup_to_html_crossref.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser_c.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser_perl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_parser_ruby.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_ri_attribute_formatter.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_ri_default_display.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_ri_driver.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_ri_formatter.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rdoc/test_rdoc_ri_overstrike_formatter.rb create mode 100644 lib/ruby-1.9.1-rc1/test/readline/test_readline.rb create mode 100644 lib/ruby-1.9.1-rc1/test/readline/test_readline_history.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rexml/test_document.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rinda/test_rinda.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rinda/test_tuplebag.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ripper/dummyparser.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ripper/test_files.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ripper/test_parser_events.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ripper/test_scanner_events.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/dot.png create mode 100644 lib/ruby-1.9.1-rc1/test/rss/rss-assertions.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/rss-testcase.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_accessor.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_atom.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_content.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_dublincore.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_image.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_inherit.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_itunes.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_0.9.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_atom_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_atom_feed.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_content.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_dc.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_image.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_itunes.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_slash.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_sy.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_taxo.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_trackback.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_maker_xml-stylesheet.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_parser.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_parser_1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_parser_2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_parser_atom_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_parser_atom_feed.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_0.9.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_1.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_2.0.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_atom_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_atom_feed.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_itunes.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_setup_maker_slash.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_slash.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_syndication.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_taxonomy.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_to_s.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_trackback.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_version.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rss/test_xml-stylesheet.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/allpairs.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/beginmainend.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_big5.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_cp949.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_jp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_kr.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_euc_tw.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_gb18030.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_gbk.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_iso_8859.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_koi8.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_shift_jis.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_utf16.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_utf32.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/enc/test_windows_1251.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/endblockwarn_rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/envutil.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/lbtest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/marshaltestlib.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/sentence.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_alias.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_argf.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_array.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_assignment.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_basicinstructions.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_beginendblock.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_bignum.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_call.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_case.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_class.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_clone.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_comparable.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_complex.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_complex2.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_complexrational.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_condition.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_const.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_continuation.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_defined.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_dir.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_econv.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_encoding.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_enum.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_enumerator.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_env.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_eval.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_exception.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_fiber.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_file.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_file_exhaustive.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_fixnum.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_float.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_fnmatch.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_gc.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_hash.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_ifunless.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_integer.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_integer_comb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_io.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_io_m17n.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_iterator.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_lambda.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_literal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_m17n.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_m17n_comb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_marshal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_math.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_metaclass.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_method.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_mixed_unicode_escapes.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_module.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_numeric.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_object.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_objectspace.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_optimization.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_pack.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_parse.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_path.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_pipe.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_primitive.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_proc.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_process.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_rand.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_range.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_rational.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_rational2.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_readpartial.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_regexp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_require.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_rubyoptions.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_settracefunc.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_signal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_sleep.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_sprintf.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_sprintf_comb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_string.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_stringchar.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_struct.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_super.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_symbol.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_system.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_thread.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_time.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_trace.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_transcode.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_unicode_escape.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_variable.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_whileuntil.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/test_yield.rb create mode 100644 lib/ruby-1.9.1-rc1/test/ruby/ut_eof.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/bogussources.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/data/gem-private_key.pem create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/data/gem-public_cert.pem create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/fake_certlib/openssl.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/functional.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/gem_installer_test_case.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/gem_package_tar_test_case.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/gemutilities.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/insure_session.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/mockgemui.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/private_key.pem create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/public_cert.pem create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/simple_gem.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_config.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_command_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_build_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_cert_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_check_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_contents_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_dependency_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_environment_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_fetch_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_generate_index_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_install_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_list_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_lock_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_mirror_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_outdated_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_pristine_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_query_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_server_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_sources_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_specification_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_stale_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_uninstall_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_unpack_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_commands_update_command.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_config_file.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_dependency.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_dependency_installer.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_dependency_list.rb create mode 100755 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_digest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_doc_manager.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_ext_configure_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_ext_ext_conf_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_ext_rake_builder.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_format.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_gem_path_searcher.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_gem_runner.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_indexer.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_install_update_options.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_installer.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_local_remote_options.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_header.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_input.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_output.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_reader.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_reader_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_package_tar_writer.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_platform.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_remote_fetcher.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_requirement.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_server.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_source_index.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_source_info_cache.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_source_info_cache_entry.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_spec_fetcher.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_specification.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_stream_ui.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_uninstaller.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_validator.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_version.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_gem_version_option.rb create mode 100644 lib/ruby-1.9.1-rc1/test/rubygems/test_kernel.rb create mode 100644 lib/ruby-1.9.1-rc1/test/runner.rb create mode 100644 lib/ruby-1.9.1-rc1/test/scanf/data.txt create mode 100644 lib/ruby-1.9.1-rc1/test/scanf/test_scanf.rb create mode 100644 lib/ruby-1.9.1-rc1/test/scanf/test_scanfblocks.rb create mode 100644 lib/ruby-1.9.1-rc1/test/scanf/test_scanfio.rb create mode 100644 lib/ruby-1.9.1-rc1/test/sdbm/test_sdbm.rb create mode 100644 lib/ruby-1.9.1-rc1/test/socket/test_nonblock.rb create mode 100644 lib/ruby-1.9.1-rc1/test/socket/test_socket.rb create mode 100644 lib/ruby-1.9.1-rc1/test/socket/test_tcp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/socket/test_udp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/socket/test_unix.rb create mode 100644 lib/ruby-1.9.1-rc1/test/stringio/test_stringio.rb create mode 100644 lib/ruby-1.9.1-rc1/test/strscan/test_stringscanner.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_delegate.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_ipaddr.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_pp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_prettyprint.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_prime.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_pstore.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_set.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_shellwords.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_singleton.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_tempfile.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_time.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_timeout.rb create mode 100644 lib/ruby-1.9.1-rc1/test/test_tsort.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_common.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_ftp.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_generic.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_http.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_ldap.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_mailto.rb create mode 100644 lib/ruby-1.9.1-rc1/test/uri/test_parser.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/.htaccess create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_cgi.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_cookie.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_filehandler.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httpauth.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httpproxy.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httprequest.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httpserver.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httputils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_httpversion.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_server.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/test_utils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/utils.rb create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/webrick.cgi create mode 100644 lib/ruby-1.9.1-rc1/test/webrick/webrick_long_filename.cgi create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/err_in_callback.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/orig_data.csv create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_err_in_callback.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_folderitem2_invokeverb.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_nil2vtempty.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_ole_methods.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_propertyputref.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_event.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_method.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_param.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_type.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_typelib.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_variable.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_variant.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_variant_m.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_win32ole_variant_outarg.rb create mode 100644 lib/ruby-1.9.1-rc1/test/win32ole/test_word.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_bool.expected create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_bool.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_cdata.expected create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_cdata.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_covert.expected create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/bug_covert.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/datetime_iso8601.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/fault.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/value.expected create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/value.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/xml1.expected create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/data/xml1.xml create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_cookie.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_datetime.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_features.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_marshal.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_parser.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/test_webrick_server.rb create mode 100644 lib/ruby-1.9.1-rc1/test/xmlrpc/webrick_testing.rb create mode 100644 lib/ruby-1.9.1-rc1/test/yaml/test_yaml.rb create mode 100644 lib/ruby-1.9.1-rc1/test/yaml/test_yamlstore.rb create mode 100644 lib/ruby-1.9.1-rc1/test/zlib/test_zlib.rb create mode 100644 lib/ruby-1.9.1-rc1/thread.c create mode 100644 lib/ruby-1.9.1-rc1/thread_pthread.c create mode 100644 lib/ruby-1.9.1-rc1/thread_pthread.h create mode 100644 lib/ruby-1.9.1-rc1/thread_win32.c create mode 100644 lib/ruby-1.9.1-rc1/thread_win32.h create mode 100644 lib/ruby-1.9.1-rc1/time.c create mode 100644 lib/ruby-1.9.1-rc1/tool/asm_parse.rb create mode 100755 lib/ruby-1.9.1-rc1/tool/build-transcode create mode 100644 lib/ruby-1.9.1-rc1/tool/compile_prelude.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/eval.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/file2lastrev.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/generic_erb.rb create mode 100755 lib/ruby-1.9.1-rc1/tool/ifchange create mode 100755 lib/ruby-1.9.1-rc1/tool/insns2vm.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/instruction.rb create mode 100755 lib/ruby-1.9.1-rc1/tool/make-snapshot create mode 100755 lib/ruby-1.9.1-rc1/tool/mdoc2man.rb create mode 100755 lib/ruby-1.9.1-rc1/tool/node_name.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/parse.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/transcode-tblgen.rb create mode 100644 lib/ruby-1.9.1-rc1/tool/vtlh.rb create mode 100755 lib/ruby-1.9.1-rc1/tool/ytab.sed create mode 100644 lib/ruby-1.9.1-rc1/transcode.c create mode 100644 lib/ruby-1.9.1-rc1/transcode_data.h create mode 100644 lib/ruby-1.9.1-rc1/transdb.h create mode 100644 lib/ruby-1.9.1-rc1/util.c create mode 100644 lib/ruby-1.9.1-rc1/variable.c create mode 100644 lib/ruby-1.9.1-rc1/version.c create mode 100644 lib/ruby-1.9.1-rc1/version.h create mode 100644 lib/ruby-1.9.1-rc1/vm.c create mode 100644 lib/ruby-1.9.1-rc1/vm.inc create mode 100644 lib/ruby-1.9.1-rc1/vm_core.h create mode 100644 lib/ruby-1.9.1-rc1/vm_dump.c create mode 100644 lib/ruby-1.9.1-rc1/vm_eval.c create mode 100644 lib/ruby-1.9.1-rc1/vm_exec.c create mode 100644 lib/ruby-1.9.1-rc1/vm_exec.h create mode 100644 lib/ruby-1.9.1-rc1/vm_insnhelper.c create mode 100644 lib/ruby-1.9.1-rc1/vm_insnhelper.h create mode 100644 lib/ruby-1.9.1-rc1/vm_method.c create mode 100644 lib/ruby-1.9.1-rc1/vm_opts.h create mode 100644 lib/ruby-1.9.1-rc1/vmtc.inc create mode 100644 lib/ruby-1.9.1-rc1/win32/Makefile.sub create mode 100644 lib/ruby-1.9.1-rc1/win32/README.win32 create mode 100755 lib/ruby-1.9.1-rc1/win32/configure.bat create mode 100644 lib/ruby-1.9.1-rc1/win32/dir.h create mode 100644 lib/ruby-1.9.1-rc1/win32/enc-setup.mak create mode 100755 lib/ruby-1.9.1-rc1/win32/ifchange.bat create mode 100755 lib/ruby-1.9.1-rc1/win32/mkexports.rb create mode 100755 lib/ruby-1.9.1-rc1/win32/resource.rb create mode 100755 lib/ruby-1.9.1-rc1/win32/rm.bat create mode 100644 lib/ruby-1.9.1-rc1/win32/setup.mak create mode 100644 lib/ruby-1.9.1-rc1/win32/win32.c create mode 100644 lib/ruby-1.9.1-rc1/win32/winmain.c create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/runner.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_block.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_eval.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_exception.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_flow.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_jump.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_proc.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_syntax.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_test.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/test_thread.rb create mode 100644 lib/ruby-1.9.1-rc1/yarvtest/yarvtest.rb diff --git a/lib/ruby-1.9.1-rc1/.cvsignore b/lib/ruby-1.9.1-rc1/.cvsignore new file mode 100644 index 0000000..76c9bc0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/.cvsignore @@ -0,0 +1,52 @@ +*.bak +*.orig +*.rej +*.sav +*~ +.*.list +.*.time +.ccmalloc +.ppack +.ext +.git +.svn +.pc +COPYING.LIB +ChangeLog.pre-alpha +ChangeLog.pre1_1 +ChangeLog-1.8.0 +Makefile +README.fat-patch +README.v6 +README.atheos +archive +autom4te*.cache +automake +beos +config.cache +config.h +config.h.in +config.log +config.status +configure +libruby.so.* +miniruby +newdate.rb +newver.rb +parse.c +patches +patches-master +pitest.rb +ppack +preview +rbconfig.rb +rename2.h +repack +riscos +rubicon +ruby +ruby-man.rd.gz +tmp +web +y.output +y.tab.c diff --git a/lib/ruby-1.9.1-rc1/.document b/lib/ruby-1.9.1-rc1/.document new file mode 100644 index 0000000..230c50e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/.document @@ -0,0 +1,16 @@ +# This file determines which files in the +# Ruby hierarchy will be processed by the RDoc +# tool when it is given the top-level directory +# as an argument + +# Process all the C source files +*.c + +# the lib/ directory (which has its own .document file) + +lib + + +# and some of the ext/ directory (which has its own .document file) + +ext diff --git a/lib/ruby-1.9.1-rc1/.gdbinit b/lib/ruby-1.9.1-rc1/.gdbinit new file mode 100644 index 0000000..3ecc8f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/.gdbinit @@ -0,0 +1,560 @@ +if dummy_gdb_enums.special_consts +end + +define rp + if (VALUE)$arg0 & RUBY_FIXNUM_FLAG + printf "FIXNUM: %ld\n", $arg0 >> 1 + else + if ((VALUE)$arg0 & ~(~(VALUE)0<> RUBY_SPECIAL_SHIFT + else + if $arg0 == RUBY_Qfalse + echo false\n + else + if $arg0 == RUBY_Qtrue + echo true\n + else + if $arg0 == RUBY_Qnil + echo nil\n + else + if $arg0 == RUBY_Qundef + echo undef\n + else + if (VALUE)$arg0 & RUBY_IMMEDIATE_MASK + echo immediate\n + else + set $flags = ((struct RBasic*)$arg0)->flags + if ($flags & RUBY_T_MASK) == RUBY_T_NONE + printf "T_NONE: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_NIL + printf "T_NIL: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_OBJECT + printf "T_OBJECT: " + print (struct RObject *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_CLASS + printf "T_CLASS: " + print (struct RClass *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_ICLASS + printf "T_ICLASS: " + print (struct RClass *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_MODULE + printf "T_MODULE: " + print (struct RClass *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_FLOAT + printf "T_FLOAT: %.16g ", (((struct RFloat*)$arg0)->float_value) + print (struct RFloat *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_STRING + printf "T_STRING: " + set print address off + output (char *)(($flags & RUBY_FL_USER1) ? \ + ((struct RString*)$arg0)->as.heap.ptr : \ + ((struct RString*)$arg0)->as.ary) + set print address on + printf " bytesize:%ld ", ($flags & RUBY_FL_USER1) ? \ + ((struct RString*)$arg0)->as.heap.len : \ + (($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2) + if !($flags & RUBY_FL_USER1) + printf "(embed) " + else + if ($flags & RUBY_FL_USER2) + printf "(shared) " + end + if ($flags & RUBY_FL_USER3) + printf "(assoc) " + end + end + printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT + if ($flags & RUBY_ENC_CODERANGE_MASK) == 0 + printf "coderange:unknown " + else + if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_7BIT + printf "coderange:7bit " + else + if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_VALID + printf "coderange:valid " + else + printf "coderange:broken " + end + end + end + print (struct RString *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_REGEXP + set $regsrc = ((struct RRegexp*)$arg0)->src + set $rsflags = ((struct RBasic*)$regsrc)->flags + printf "T_REGEXP: " + set print address off + output (char *)(($rsflags & RUBY_FL_USER1) ? \ + ((struct RString*)$regsrc)->as.heap.ptr : \ + ((struct RString*)$regsrc)->as.ary) + set print address on + printf " len:%ld ", ($rsflags & RUBY_FL_USER1) ? \ + ((struct RString*)$regsrc)->as.heap.len : \ + (($rsflags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2) + if $flags & RUBY_FL_USER6 + printf "(none) " + end + if $flags & RUBY_FL_USER5 + printf "(literal) " + end + if $flags & RUBY_FL_USER4 + printf "(fixed) " + end + printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT + print (struct RRegexp *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_ARRAY + if ($flags & RUBY_FL_USER1) + set $len = (($flags & (RUBY_FL_USER3|RUBY_FL_USER4)) >> (RUBY_FL_USHIFT+3)) + printf "T_ARRAY: len=%ld ", $len + printf "(embed) " + if ($len == 0) + printf "{(empty)} " + else + output/x *((VALUE*)((struct RArray*)$arg0)->as.ary) @ $len + printf " " + end + else + set $len = ((struct RArray*)$arg0)->as.heap.len + printf "T_ARRAY: len=%ld ", $len + if ($flags & RUBY_FL_USER2) + printf "(shared) shared=" + output/x ((struct RArray*)$arg0)->as.heap.aux.shared + printf " " + else + printf "(ownership) capa=%ld ", ((struct RArray*)$arg0)->as.heap.aux.capa + end + if ($len == 0) + printf "{(empty)} " + else + output/x *((VALUE*)((struct RArray*)$arg0)->as.heap.ptr) @ $len + printf " " + end + end + print (struct RArray *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_FIXNUM + printf "T_FIXNUM: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_HASH + printf "T_HASH: ", + if ((struct RHash *)$arg0)->ntbl + printf "len=%ld ", ((struct RHash *)$arg0)->ntbl->num_entries + end + print (struct RHash *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_STRUCT + printf "T_STRUCT: len=%ld ", \ + (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ + ($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) >> (RUBY_FL_USHIFT+1) : \ + ((struct RStruct *)$arg0)->as.heap.len) + print (struct RStruct *)$arg0 + x/xw (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ + ((struct RStruct *)$arg0)->as.ary : \ + ((struct RStruct *)$arg0)->as.heap.ptr) + else + if ($flags & RUBY_T_MASK) == RUBY_T_BIGNUM + printf "T_BIGNUM: sign=%d len=%ld ", \ + (($flags & RUBY_FL_USER1) != 0), \ + (($flags & RUBY_FL_USER2) ? \ + ($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \ + ((struct RBignum*)$arg0)->as.heap.len) + if $flags & RUBY_FL_USER2 + printf "(embed) " + end + print (struct RBignum *)$arg0 + x/xw (($flags & RUBY_FL_USER2) ? \ + ((struct RBignum*)$arg0)->as.ary : \ + ((struct RBignum*)$arg0)->as.heap.digits) + else + if ($flags & RUBY_T_MASK) == RUBY_T_RATIONAL + printf "T_RATIONAL: " + print (struct RRational *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_COMPLEX + printf "T_COMPLEX: " + print (struct RComplex *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_FILE + printf "T_FILE: " + print (struct RFile *)$arg0 + output *((struct RFile *)$arg0)->fptr + printf "\n" + else + if ($flags & RUBY_T_MASK) == RUBY_T_TRUE + printf "T_TRUE: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_FALSE + printf "T_FALSE: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_DATA + printf "T_DATA: " + print (struct RData *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_MATCH + printf "T_MATCH: " + print (struct RMatch *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_SYMBOL + printf "T_SYMBOL: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_UNDEF + printf "T_UNDEF: " + print (struct RBasic *)$arg0 + else + if ($flags & RUBY_T_MASK) == RUBY_T_NODE + printf "T_NODE(" + output (enum node_type)(($flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT) + printf "): " + print *(NODE *)$arg0 + if ($flags & RUBY_T_MASK) == RUBY_T_ZOMBIE + printf "T_ZOMBIE: " + print (struct RData *)$arg0 + else + printf "unknown: " + print (struct RBasic *)$arg0 + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end + end +end +document rp + Print a Ruby's VALUE. +end + +define nd_type + print (enum node_type)((((NODE*)$arg0)->flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT) +end +document nd_type + Print a Ruby' node type. +end + +define nd_file + print ((NODE*)$arg0)->nd_file +end +document nd_file + Print the source file name of a node. +end + +define nd_line + print ((unsigned int)((((NODE*)$arg0)->flags>>RUBY_NODE_LSHIFT)&RUBY_NODE_LMASK)) +end +document nd_line + Print the source line number of a node. +end + +# Print members of ruby node. + +define nd_head + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_alen + printf "u2.argc: " + p $arg0.u2.argc +end + +define nd_next + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_cond + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_body + printf "u2.node: " + rp $arg0.u2.node +end + +define nd_else + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_orig + printf "u3.value: " + rp $arg0.u3.value +end + + +define nd_resq + printf "u2.node: " + rp $arg0.u2.node +end + +define nd_ensr + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_1st + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_2nd + printf "u2.node: " + rp $arg0.u2.node +end + + +define nd_stts + printf "u1.node: " + rp $arg0.u1.node +end + + +define nd_entry + printf "u3.entry: " + p $arg0.u3.entry +end + +define nd_vid + printf "u1.id: " + p $arg0.u1.id +end + +define nd_cflag + printf "u2.id: " + p $arg0.u2.id +end + +define nd_cval + printf "u3.value: " + rp $arg0.u3.value +end + + +define nd_cnt + printf "u3.cnt: " + p $arg0.u3.cnt +end + +define nd_tbl + printf "u1.tbl: " + p $arg0.u1.tbl +end + + +define nd_var + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_ibdy + printf "u2.node: " + rp $arg0.u2.node +end + +define nd_iter + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_value + printf "u2.node: " + rp $arg0.u2.node +end + +define nd_aid + printf "u3.id: " + p $arg0.u3.id +end + + +define nd_lit + printf "u1.value: " + rp $arg0.u1.value +end + + +define nd_frml + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_rest + printf "u2.argc: " + p $arg0.u2.argc +end + +define nd_opt + printf "u1.node: " + rp $arg0.u1.node +end + + +define nd_recv + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_mid + printf "u2.id: " + p $arg0.u2.id +end + +define nd_args + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_noex + printf "u1.id: " + p $arg0.u1.id +end + +define nd_defn + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_old + printf "u1.id: " + p $arg0.u1.id +end + +define nd_new + printf "u2.id: " + p $arg0.u2.id +end + + +define nd_cfnc + printf "u1.cfunc: " + p $arg0.u1.cfunc +end + +define nd_argc + printf "u2.argc: " + p $arg0.u2.argc +end + + +define nd_cname + printf "u1.id: " + p $arg0.u1.id +end + +define nd_super + printf "u3.node: " + rp $arg0.u3.node +end + + +define nd_modl + printf "u1.id: " + p $arg0.u1.id +end + +define nd_clss + printf "u1.value: " + rp $arg0.u1.value +end + + +define nd_beg + printf "u1.node: " + rp $arg0.u1.node +end + +define nd_end + printf "u2.node: " + rp $arg0.u2.node +end + +define nd_state + printf "u3.state: " + p $arg0.u3.state +end + +define nd_rval + printf "u2.value: " + rp $arg0.u2.value +end + + +define nd_nth + printf "u2.argc: " + p $arg0.u2.argc +end + + +define nd_tag + printf "u1.id: " + p $arg0.u1.id +end + +define nd_tval + printf "u2.value: " + rp $arg0.u2.value +end + +define rb_p + call rb_p($arg0) +end + +define rb_id2name + call rb_id2name($arg0) +end + +define rb_classname + call classname($arg0) + rb_p $ + print *(struct RClass*)$arg0 +end + +define rb_backtrace + call rb_backtrace() +end diff --git a/lib/ruby-1.9.1-rc1/COPYING b/lib/ruby-1.9.1-rc1/COPYING new file mode 100644 index 0000000..9043404 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/COPYING @@ -0,0 +1,56 @@ +Ruby is copyrighted free software by Yukihiro Matsumoto . +You can redistribute it and/or modify it under either the terms of the GPL +version 2 (see the file GPL), or the conditions below: + + 1. You may make and give away verbatim copies of the source form of the + software without restriction, provided that you duplicate all of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in the manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 4. You may modify and include the part of the software into any other + software (possibly commercial). But some files in the distribution + are not written by the author, so that they are not under these terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whomever generated them, + and may be sold commercially, and may be aggregated with this + software. + + 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. diff --git a/lib/ruby-1.9.1-rc1/COPYING.ja b/lib/ruby-1.9.1-rc1/COPYING.ja new file mode 100644 index 0000000..aa2a163 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/COPYING.ja @@ -0,0 +1,51 @@ +$BK\%W%m%0%i%`$O%U%j!<%=%U%H%&%'%"$G$9!%(BGPL (the GNU General +Public License)$B%P!<%8%g%s(B2$B$^$?$O0J2<$K<($9>r7o$GK\%W%m%0%i%`(B +$B$r:FG[I[$G$-$^$9!%(BGPL$B$K$D$$$F$O(BGPL$B%U%!%$%k$r;2>H$7$F2<$5$$!%(B + + 1. $BJ#@=$O@)8B$J$/<+M3$G$9!%(B + + 2. $B0J2<$N>r7o$N$$$:$l$+$rK~$?$9;~$KK\%W%m%0%i%`$N%=!<%9$r(B + $B<+M3$KJQ99$G$-$^$9!%(B + + (a) $B%M%C%H%K%e!<%:$K%]%9%H$7$?$j!$:nA0$rJQ99$9$k!%(B + $B$=$N%=%U%H%&%'%"$rG[I[$9$k;~$K$OJQ99A0$NK\%W%m%0%i(B + $B%`$bF1;~$KG[I[$9$k!%$^$?$OJQ99A0$NK\%W%m%0%i%`$N%=!<(B + $B%9$NF~$NJQ99>r7o$r:nr7o$N$$$:$l$+$rK~$?$9;~$KK\%W%m%0%i%`$r%3%s%Q%$(B + $B%k$7$?%*%V%8%'%/%H%3!<%I$dA0$rJQ99$7$?$&$(!$%*%j%8%J(B + $B%k$N%=!<%9%3!<%I$NF~$NG[I[>r7o$r:n$N%W%m%0%i%`$X$N0zMQ$O$$$+$J$kL\E*$G$"$l<+M3$G$9!%$?(B + $B$@$7!$K\%W%m%0%i%`$K4^$^$l$kB>$N:n$l$N:nl9g$,$"$j$^$9!%(B + + $B$=$l$i%U%!%$%k$N0lMw$H$=$l$>$l$NG[I[>r7o$J$I$KIU$$$F$O(B + LEGAL$B%U%!%$%k$r;2>H$7$F$/$@$5$$!%(B + + 5. $BK\%W%m%0%i%`$X$NF~NO$H$J$k%9%/%j%W%H$*$h$S!$K\%W%m%0%i(B + $B%`$+$i$N=PNO$N8"Mx$OK\%W%m%0%i%`$N:n(B + $B$l$NF~=PNO$r@8@.$7$??M$KB0$7$^$9!%$^$?!$K\%W%m%0%i%`$K(B + $BAH$_9~$^$l$k$?$a$N3HD%%i%$%V%i%j$K$D$$$F$bF1MM$G$9!%(B + + 6. $BK\%W%m%0%i%`$OL5J]>Z$G$9!%:n + + * lib/minitest/*.rb: Imported minitest 1.3.1 r4506. + * test/minitest/*.rb: ditto. + +Tue Dec 30 17:59:59 2008 Martin Duerst + + * transcode.c: Minor fixes and tweaks in documentation. + +Tue Dec 30 17:03:51 2008 Koichi Sasada + + * ext/dl/test/test_import.rb: fix a prototype decl. + pointed out by Takehiro Kubo [ruby-core:20971]. + +Tue Dec 30 16:56:09 2008 Koichi Sasada + + * thread.c (rb_thread_blocking_region): add a comment. + + * thread.c (rb_thread_call_without_gvl): added as a alias of + rb_thread_blocking_region(). + + * thread.c (rb_thread_call_with_gvl): added. + + * vm_core.h (rb_thread_t#blocking_region_buffer): added for + rb_thread_call_with_gvl(). + +Mon Dec 29 22:37:17 2008 Yuki Sonoda (Yugui) + + * process.c (rb_waitpid): retries waitpid when EINTR. + [ruby-core:19744]. + +Mon Dec 29 23:41:42 2008 Koichi Sasada + + * ext/dl/test/test_base.rb: add libc search logic. + this patch is written by Takehiro Kubo. + [ruby-core:20963] [Bug #932] + + * ext/dl/dl.h: Add ",..." as the last argument. + this patch is written by Takehiro Kubo. + Bug #633 [ruby-core:19289] + + * ext/dl/lib/dl/stack.rb: add add_padding() to calculate + alignment. this patch is written by Takehiro Kubo. + Bug #633 [ruby-core:19289] + + * ext/dl/test/test_func.rb: atof()'s return value is double. + this patch is written by Takehiro Kubo. + Bug #633 [ruby-core:19289] + + * ext/dl/test/test_import.rb: + - atof()'s return value is double. + - The types of qsort's second and third argument are size_t. + - fprintf()'s return value is int. + this patch is written by Takehiro Kubo. + Bug #633 [ruby-core:19289] + +Mon Dec 29 20:57:14 2008 Yuki Sonoda (Yugui) + + * man/ri.1: new manpage. + +Mon Dec 29 17:53:24 2008 Yuki Sonoda (Yugui) + + * bin/erb: accepts options in more flexible styles. + +Mon Dec 29 17:25:17 2008 Yuki Sonoda (Yugui) + + * lib/erb.rb (ERB): m17n of ERB. adds rdoc. + fixes #712. c.f. [ruby-dev:37516]. + + * lib/erb.rb (ERB::Compiler#compile): recognizes magic comments. + returns a pair of compiled script and its script encoding. + + * lib/erb.rb (ERB#set_eoutvar): make generated scripts return a + string in correct encoding. + + * lib/erb.rb (ERB#def_method): use Kernel#eval for encoding-awareness + of the evaluated string. + + * bin/erb.rb (ERB::Main.run): adds -E and -U options. + String is no longer Enumerable. + + * man/erb.1: new manapage. + + * test/erb/test_erb_m17n.rb: new test case for m17n features. + +Mon Dec 29 16:16:20 2008 Koichi Sasada + + * vm.c (vm_set_eval_stack, vm_set_main_stack, vm_set_top_stack): + check stack overflow. [ruby-dev:37646] + +Mon Dec 29 14:50:19 2008 Yuki Sonoda (Yugui) + + * Makefile.in (ext-clean): ext-clean always fails. + + * ext/dl/ripper/extconf.rb: adds y.output into the clean list. + +Mon Dec 29 11:58:39 2008 Koichi Sasada + + * thread.c (rb_mutex_trylock): return false if Mutex owned + by current thread. [ruby-core:20943] + + * thread.c (rb_mutex_lock): check dead lock (recursive lock) here. + + * test/ruby/test_thread.rb: add a test. + +Mon Dec 29 07:15:16 2008 Yukihiro Matsumoto + + * cont.c: small RDoc fix mentioned from + in [ruby-core:20921]. + +Mon Dec 29 03:43:25 2008 Koichi Sasada + + * ruby.c (process_options): set th->base_block only while + it is needed. [ruby-dev:37634] [Bug #939] + + * ruby.c (require_libraries): clear th->base_block before + require libraries. + +Sun Dec 28 18:39:57 2008 Nobuyoshi Nakada + + * sprintf.c: not force to override snprintf/vsnprintf. + [ruby-core:20824] + +Sun Dec 28 21:33:52 2008 NARUSE, Yui + + * test/ext/dl/test_base.rb : add BSD's case. + +Sun Dec 28 21:09:12 2008 Yuki Sonoda (Yugui) + + * ext/dl/lib/dl/import.rb (DL::Importer#sizeof): follows + a feature change in 1.9. + +Sun Dec 28 19:11:03 2008 Nobuyoshi Nakada + + * win32/Makefile.sub (config.h): do not use snprintf/vsnprintf in + msvcrt. + + * sprintf.c: not force to override snprintf/vsnprintf. + [ruby-core:20824] + +Sun Dec 28 17:10:13 2008 TAKANO Mitsuhiro (takano32) + + * ext/dl/test/test_dl2.rb: modify strncpy, strcpy, qsort, types. + Patch by Takehiro Kubo. + Bug #633 [ruby-core:19289] + * ext/dl/test/test_base.rb: /lib/libc.so is x86_64 binary in x86_64 architecture. + +Sun Dec 28 18:36:33 2008 Yuki Sonoda (Yugui) + + * test/rubygems/test_gem_command.rb + (test_add_option_overlapping_common_and_local_options): + follows r21066. + +Sun Dec 28 17:21:36 2008 NARUSE, Yui + + * test/rubygems/test_ext_configure_builder.rb (test_self_build_fail): + Extends pattern for FreeBSD's error message. + +Sun Dec 28 12:24:14 2008 Yusuke Endoh + + * thread.c (mutex_free, mutex_unlock): add qualifiers. + +Sun Dec 28 10:28:04 2008 Yusuke Endoh + + * thread.c (mutex_free): GC thread (main thread) has failed to unlock + a mutex that is locked by another thread, which makes the mutex + dangling in keeping_mutexes and causes [BUG] or stuck finally. + Now unlocking is performed as locking thread. + + * thread.c (mutex_unlock, rb_mutex_unlock, rb_mutex_unlock_all): + mutex_unlock receives a thread. + +Sun Dec 28 05:44:44 2008 Ryan Davis + + * lib/minitest/*.rb: Imported minitest 1.3.1 r4505. + * test/minitest/*.rb: ditto. + +Sun Dec 28 00:43:33 2008 Tanaka Akira + + * runruby.rb: refactored to modify ENV as once. + +Sat Dec 27 22:41:02 2008 Nobuyoshi Nakada + + * test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses + mktmpdir and removes it alfter the test. + + * test/cgi/test_cgi_session.rb (setup, teadown): ditto. + +Sun Dec 28 12:53:10 2008 TAKANO Mitsuhiro (takano32) + + * ext/dl/test/test_base.rb: use libc.dylib when the platform is darwin. + +Sat Dec 27 21:46:10 2008 TAKANO Mitsuhiro (takano32) + + * ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64. + +Sat Dec 27 20:26:59 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_argv_size): if an argument is empty, it's size + is 2, not 0, because it will be converted to "". + +Sat Dec 27 19:40:56 2008 Nobuyoshi Nakada + + * process.c (after_exec): needs to reset before restart timer + thread. + + * thread.c (thread_start_func_2): stops timer thread if forked in + the new thread. [ruby-core:19385] + + * thread.c (rb_thread_atfork, rb_thread_atfork_before_exec): DRY. + +Sat Dec 27 17:08:43 2008 Nobuyoshi Nakada + + * .gdbinit (dummy_gdb_enums.special_consts): forces to load debug + info on Mac OS X. + + * .gdbinit (rp): added T_ZOMBIE. + +Sat Dec 27 16:18:02 2008 Koichi Sasada + + * eval.c (rb_frame_callee, rb_frame_caller): rb_frame_callee() + should return method id on current frame. + add rb_frame_caller() to get method id on parent frame. + Bug #884 [ruby-dev:37446] + + * eval.c (rb_f_method_name): use rb_frame_caller() + instead of rb_frame_callee(). + +Sat Dec 27 15:28:12 2008 Tanaka Akira + + * transcode.c (make_econv_exception): show source and destination + encoding. [ruby-dev:37285] + +Sat Dec 27 15:23:38 2008 Koichi Sasada + + * vm_insnhelper.c (vm_yield_with_cfunc): rename parameter name + "blockptr" to "blockargptr". + +Sat Dec 27 15:15:56 2008 Yuki Sonoda (Yugui) + + * common.mk (revision.h): ignores failure of file2lastrev. + +Sat Dec 27 15:02:38 2008 Koichi Sasada + + * ruby.c (process_options): fix to untouch th->mild_compile_error. + [ruby-dev:37621], [ruby-dev:37620] + +Sat Dec 27 14:48:26 2008 Koichi Sasada + + * iseq.h, iseq.c (rb_iseq_new_main): add a type ISEQ_TYPE_MAIN. + [ruby-dev:37619] + + * compile.c (rb_dvar_defined, ruby_iseq_compile): ditto. + + * iseq.c (iseq_data_to_ary, iseq_load): ditto. + + * compile.c (iseq_compile_each): fix to check ip->compile_data. + +Sat Dec 27 14:29:33 2008 Tanaka Akira + + * lib/open-uri.rb (OpenURI.redirectable?): permit https redirection. + patch from Roman Shterenzon. [ruby-core:20485] + +Sat Dec 27 13:36:55 2008 Koichi Sasada + + * eval.c (get_errinfo): return th->errinfo value + if normal errinfo place (dynamic local viriable) is not found. + fixes Bug #732 [ruby-dev:37046]. + + * bootstraptest/test_proc.rb: add a test. + +Sat Dec 27 11:41:45 2008 Koichi Sasada + + * vm_insnhelper.c (vm_call_method, vm_call_cfunc): use original id instead of + calling id when NODE_CFUNC or NODE_BMETHOD. + fixes Bug #632 [ruby-core:19282]. + + * vm_eval.c (vm_call0, vm_call_super): ditto. + + * vm_method.c (rb_add_method, rb_alias): store original id + in nd_file field of NODE_METHOD. + + * test/stringio/test_stringio.rb: add a test. + +Sat Dec 27 13:09:36 2008 Yuki Sonoda (Yugui) + + * man/irb.1: adds -v, -h, -E, and -U. + +Sat Dec 27 09:48:54 2008 Koichi Sasada + + * vm.c (Init_VM): create and define TOPLEVEL_BINDING at first. + + * vm.c (vm_set_main_stack, rb_iseq_eval_main): added. + + * parse.y (rb_parser_compile_file): fix to check parse_in_eval flag. + + * eval.c (ruby_exec_node): use rb_iseq_eval_main() + instead of rb_iseq_eval(). + + * iseq.c (rb_iseq_new_main), vm_core.h: added. + main script (specified by -e or script name) should be run + under TOPLEVEL_BINDING using Kernel#eval. Above changes + simulate Kernel#eval behaviour. [ruby-dev:37240] + + * compile.c (make_name_for_block): skip iseq except block type. + this fix is needed for [ruby-dev:37240], and also fixes + [ruby-dev:35392]. + +Sat Dec 27 05:38:59 2008 Nobuyoshi Nakada + + * process.c (after_fork): ignores a termination request in the + parent process. [ruby-dev:37447] + +Sat Dec 27 01:52:39 2008 James Edward Gray II + + * lib/csv.rb: Using a more robust transcoding scheme to produce + ASCII compatible inspect() messages. [ruby-dev:37591] + +Mon Dec 22 16:32:21 2008 Yukihiro Matsumoto + + * pack.c (pack_pack): encoding of packed string only from 'm', + 'M', and 'u' should be US-ASCII. [ruby-dev:37284] + + * pack.c (pack_pack): encoding of packed string only from 'U' + should be UTF-8. also upgrade US-ASCII strings to UTF-8. + +Sat Dec 27 09:14:17 2008 Yuki Sonoda (Yugui) + + * cont.c: rdoc for Fiber. patch by Muhammad Ali. + [ruby-core:20894] + +Fri Dec 26 18:04:10 2008 Tanaka Akira + + * io.c (fptr_finalize): don't allocate objects if noraise. + (finish_writeconv): add noalloc argument to be able to avoid + object allocation. + (finish_writeconv_arg): introduced again. + (finish_writeconv_sync): follow the above change. + +Mon Dec 22 09:54:43 2008 Yukihiro Matsumoto + + * parse.y (gettable_gen): the encoding of __FILE__ should be + rb_filesystem_encoding(). [ruby-list:45733] + + * parse.y (gettable_gen): __FILE__ should be ASCII-8BIT when + filesystem encoding is US-ASCII and __FILE__ contains non 7bit + characters. + +Fri Dec 26 15:50:45 2008 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::List#summarize): gives priority + to latter switches. [ruby-dev:36692] + + * lib/optparse.rb (OptionParser#summarize): do not append + unnecessary line terminator. + +Fri Dec 26 14:01:38 2008 Tanaka Akira + + * io.c (fptr_finalize): close the IO object even if finish_writeconv or + flush is failed. + (finish_writeconv): don't raise. return errno or exception. + (finish_writeconv_arg): removed. + (finish_writeconv_sync): follow finish_writeconv change. + + * transcode.c (rb_econv_make_exception): new function. + + * include/ruby/encoding.h (rb_econv_make_exception): declared. + +Fri Dec 26 17:04:14 2008 Yuki Sonoda (Yugui) + + * lib/irb/input-method.rb (IRB::StdioInputMethod#initialize): + removed a 'p' for debugging. + +Thu Dec 25 20:57:01 2008 NARUSE, Yui + + * transcode.c (str_transcode0): set encoding when String#encode was + given explicit but the same destination and source encoding. + +Thu Dec 25 19:35:51 2008 NARUSE, Yui + + * transcode.c (sym_ignore): remove useless symbol. + +Mon Dec 22 21:31:11 2008 Tanaka Akira + + * numeric.c (int_ord): Integer#ord implemented. + +Tue Dec 16 22:15:17 2008 Yukihiro Matsumoto + + * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of): + should assert by instance_of?, not ===. [ruby-dev:37458] + + * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of): + typo fixed. + +Mon Dec 15 20:59:10 2008 Tanaka Akira + + * ext/pty/pty.c (child_info): add slavename. + (chfunc): use slavename. + (establishShell): set slavename. + +Tue Dec 9 13:23:18 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (check_cfunc): use function pointer. + +Thu Nov 27 10:40:52 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return + Integer for #div operation. + + * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should raise + ZeroDivisionError if divisor is zero. [ruby-dev:37207] + +Mon Nov 3 00:36:44 2008 Masaki Suketa + + * test/win32ole/test_win32ole_event.rb: rename test class. + + * test/win32ole/test_win32ole_variant_outarg.rb: add in order + to use ADO instead of Internet Explorer. + remove test/win32ole/test_win32ole_variant_with_ie.rb. + + * test/win32ole/orig_data.csv: ditto. + +Sun Nov 2 22:12:41 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_event_free): invoke IConnectionPoint::Unadvise + before invoking IConnectionPoint::Release. + + * test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb, + test/win32ole/test_err_in_callback.rb: Use ActiveX Data Object + Library instead of InternetExplorer. + +Sun Nov 2 22:06:55 2008 Masaki Suketa + + * win32/Makefile.sub: add RUNRUBYOPT. [ruby-dev:37009] + +Thu Dec 25 17:49:45 2008 NARUSE, Yui + + * transcode.c (decorate_convpath): show type of escaping for + xml_attr_quote or some conversions. + +Thu Dec 25 17:06:13 2008 Tanaka Akira + + * io.c (rb_io_initialize): check fd validity. [ruby-dev:36646] + +Thu Dec 25 16:23:31 2008 Tanaka Akira + + * io.c (flush_before_seek): check io_fflush result. + (rb_io_check_readable): ditto. + (rb_io_flush): ditto. + (rb_io_fsync): ditto. + (remain_size): ditto. + (rb_io_write_nonblock): ditto. + (finish_writeconv): ditto. + (fptr_finalize): ditto. + (io_reopen): ditto. + (rb_io_reopen): ditto. + (copy_stream_body): ditto. + +Thu Dec 25 15:54:00 2008 Yukihiro Matsumoto + + * io.c (io_fflush): flush write buffer without write lock in + finalizers. [ruby-dev:37572] + + * io.c (rb_io_fptr_finalize): clear write lock before finalizing. + +Thu Dec 25 15:07:22 2008 Tanaka Akira + + * io.c (fptr_finalize): close the IO object even if close(2) is failed. + +Thu Dec 25 14:51:43 2008 NAKAMURA Usaku + + * lib/rdoc/parser.rb (RDoc::Parser.binary?): should read in binary mode. + +Thu Dec 25 13:28:20 2008 NAKAMURA Usaku + + * io.c (rb_io_flush): fsync() after buffer is flushed on win32. + [ruby-core:20043] + +Thu Dec 25 14:32:23 2008 Koichi Sasada + + * vm_insnhelper.c (vm_method_search): fix control flow bug. + (commited at r20981) + +Thu Dec 25 13:13:00 2008 Koichi Sasada + + * vm_insnhelper.c (vm_method_search): return rb_cObject if there is no + super class. [ruby-dev:37587] + + * bootstraptest/test_method.rb: add tests for above. + +Thu Dec 25 12:49:12 2008 Koichi Sasada + + * proc.c (proc_new): should use proc_dup() if block has Proc. + + * vm.c (vm_make_proc_from_block): should use rb_cProc for block. + + * vm.c (vm_make_proc): add an assertion. + + * bootstraptest/test_proc.rb: add a test. + +Thu Dec 25 12:44:27 2008 Koichi Sasada + + * vm_insnhelper.c (vm_yield_with_cfunc): check block has Proc. + +Thu Dec 25 05:53:01 2008 Nobuyoshi Nakada + + * template/id.h.tmpl, id.h (ruby_method_ids): not depend on if + token are defined as macros. [ruby-dev:37553] + + * template/id.h.tmpl, id.h (ruby_method_ids_check): enclosed in a + struct. + +Thu Dec 25 01:52:34 2008 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): sets native thread key. + +Thu Dec 25 01:09:23 2008 TAKAO Kouji + + * test/readline/test_readline_history.rb: check the encoding that + is in the Readline::HISTORY. + +Wed Dec 24 22:36:06 2008 Koichi Sasada + + * error.c, vm_dump.c: change message by rb_bug(). + +Wed Dec 24 21:57:39 2008 Koichi Sasada + + * compile.c (iseq_peephole_optimize): fix typo. + +Sun Dec 21 13:38:04 2008 Koichi Sasada + + * vm.c (invoke_block_from_c): fix to point right cfp. + + * vm.c (vm_make_proc, vm_make_proc_from_block), vm_core.h: + remove unused parameter cfp. + + * vm_insnhelper.c, proc.c (proc_new): ditto. + +Wed Dec 24 20:59:12 2008 Koichi Sasada + + * error.c (exc_equal): == method should not raise Exception. + [ruby-dev:37519] + + * sample/test.rb: fix test + +Fri Dec 19 07:45:37 2008 Yukihiro Matsumoto + + * error.c (exc_equal): duck typing equal to make it transitive. + [ruby-dev:34880] + +Wed Dec 24 20:33:45 2008 Koichi Sasada + + * vm_insnhelper.c (vm_call_method): use class of method defined + instead of receiver's class on bmethod. fixes [ruby-core:20786] + + * bootstraptest/test_method.rb: add a test for above. + + * vm_insnhelper.c (vm_setup_method): remove unused parameter klass. + + * vm_insnhelper.h (CALL_METHOD): ditto. + + * insns.def, vm_eval.c: ditto. + +Wed Dec 24 20:15:50 2008 Koichi Sasada + + * tool/file2lastrev.rb (get_revisions): fix to ignore end of line. + +Wed Dec 24 13:33:38 2008 Nobuyoshi Nakada + + * configure.in (HAVE_LONG_LONG, HAVE_OFF_T): revised for autoconf + 2.62 or later. + +Wed Dec 24 06:29:32 2008 Nobuyoshi Nakada + + * configure.in (OBJDUMP, OBJCOPY): autoconf list is not comma + separated. + + * configure.in (AC_HEADER_STDC, AC_CHECK_HEADERS, AC_CHECK_FUNCS): + removed duplicated checks. + +Wed Dec 24 03:21:21 2008 Yukihiro Matsumoto + + * misc/ruby-mode.el: added comment to mention newer version + bundled with Emacs 23 or later. a patch from Phil Hagelberg + in [ruby-core:20838]. + +Tue Dec 23 23:49:37 2008 Tanaka Akira + + * io.c (rb_io_init_copy): call io_seek only if io_tell succeeds. + +Tue Dec 23 20:28:28 2008 Yuki Sonoda (Yugui) + + * io.c: rdoc for File::open and 1.9 feature in file modes. + + * transcode.c: rdoc for String#encode + +Tue Dec 23 19:51:24 2008 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_spawn): deals with quoted commands. + +Tue Dec 23 18:44:21 2008 Tanaka Akira + + * strftime.c (rb_strftime): use locale insensitive functions for tr_TR + locale. + +Tue Dec 23 17:38:03 2008 Tanaka Akira + + * lib/test/unit/assertions.rb (assert_equal): show small differences + for Regexp and Float. + +Tue Dec 23 16:49:48 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_spawn): support normal commands with arguments. + +Tue Dec 23 15:46:43 2008 Yuki Sonoda (Yugui) + + * lib/mathn.rb: Math.sqrt(NaN) should be NaN. [ruby-dev:37537] + +Tue Dec 23 15:46:47 2008 Eric Hodel + * gem_prelude.rb: Match full RubyGems behavior when a gem can't be + found. + +Tue Dec 23 15:30:02 2008 NAKAMURA Usaku + + * io.c (pipe_open): need to initialize args. + +Tue Dec 23 14:18:14 2008 NAKAMURA Usaku + + * include/ruby/st.h: need to include defines.h because LONG_LONG is + defined there. + +Tue Dec 23 13:52:05 2008 Eric Hodel + + * lib/rdoc/parser/c.rb: Don't coalesce adjacent comment blocks. + [bug#901] + +Tue Dec 23 08:10:05 2008 Eric Hodel + + * lib/rubygems/installer.rb: Fix documentation. [bug#827] + +Tue Dec 23 08:04:58 2008 Eric Hodel + + * gem_prelude.rb: Don't remove methods twice. [bug#555] + +Wed Dec 24 20:15:50 2008 Koichi Sasada + + * tool/file2lastrev.rb (get_revisions): fix to ignore end of line. + +Tue Dec 23 15:48:55 2008 NAKAMURA Usaku + + * tool/file2lastrev.rb: shouldn't use single quote in shell's command + line if you want to support Windows. + +Tue Dec 23 15:36:58 2008 Yuki Sonoda (Yugui) + + * tool/file2lastrev.rb: detects vcs directory properly on + building outside of srcdir. [ruby-dev:37555] [ruby-dev:37561] + +Mon Dec 22 19:31:19 2008 Yuki Sonoda (Yugui) + + * common.mk (revision.h): uses tool/file2lastrev.rb to support + git-svn. + + * version.h: changed version string as + `ruby 1.9.1 (2008-12-22 patchlevel-5000 trunk 20912) + [i386-darwin9.6.0]'. + +Mon Dec 22 21:08:54 2008 Tanaka Akira + + * lib/test/unit/assertions.rb (assert_nothing_raised): increment + assertion count. [ruby-dev:37480] + +Mon Dec 22 19:10:44 2008 NAKAMURA Usaku + + * thread_win32.c (Init_native_thread): need to call + ruby_thread_set_native() here. + +Mon Dec 22 18:00:36 2008 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: fix wrong flag value. + +Mon Dec 22 14:35:59 2008 Yukihiro Matsumoto + + * string.c (rb_external_str_new_with_enc): set ASCII-8BIT if + encoding is US-ASCII and string contains 8bit characters. + +Mon Dec 22 12:26:18 2008 Nobuyoshi Nakada + + * cygwin/GNUmakefile.in (rubydll.def), win32/mkexports.rb + (Exports#exports): added VERSION. + +Tue Dec 23 00:16:48 2008 Yusuke Endoh + + * sprintf.c (rb_str_format): fix buffer overflow. + +Mon Dec 22 12:25:09 2008 Nobuyoshi Nakada + + * missing/vsnprintf.c (BSD_vfprintf): fix for test_sprintf_comb.rb, by + wanabe in [ruby-dev:36935]. + +Mon Dec 22 12:05:14 2008 Nobuyoshi Nakada + + * configure.in (mingw): no longer uses snprintf and vsnprintf of + msvcrt. [Bug#6] + + * win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): removed. + + * win32/Makefile.sub (config.h): vsnprintf exists in VC7 or later. + + * win32/mkexports.rb (Exports#initialize): aliases + rb_w32_vsnprintf and rb_w32_snprintf for binary compatibility. + + * sprintf.c (rb_str_format): uses snprintf instead of sprintf. + + * numeric.c (flo_to_s, rb_num2long, rb_num2ll): ditto. + +Sat Dec 20 15:34:36 2008 Yukihiro Matsumoto + + * lib/rake.rb (Rake::FileList#egrep): change open mode to "rb", + i.e. default to binary. [ruby-dev:37385] + + * lib/rake.rb (Rake::FileList#egrep): allow specifying reading + encoding, e.g. FileList['*.rb'].egrep(/require/, encoding: + "ascii-8bit") + +Mon Dec 22 10:59:31 2008 Yukihiro Matsumoto + + * string.c (rb_str_upto): should return enumerator if called + without block. [ruby-dev:37526] + +Thu Dec 25 00:59:06 2008 TAKAO Kouji + + * test/readline/test_readline_history.rb: did not check the + encoding that is in the Readline::HISTORY. I will fix it. + +Mon Dec 22 02:54:56 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: temporary patch for trouble on TkAqua (> Tk8.4.9). + + * ext/tk/sample/demos-jp/widget: set encoding to a demo-code string to + avoid garbled text on the Code Window. + +Sun Dec 21 14:48:51 2008 TAKAO Kouji + + * test/readline/test_readline_history.rb: checked encoding. + +Sun Dec 21 13:50:37 2008 TAKAO Kouji + + * test/readline/test_readline.rb + (TestReadline#test_some_characters_methods): checked encoding. + +Sun Dec 21 14:55:18 2008 Nobuyoshi Nakada + + * lib/optparse.rb (SPLAT_PROC): splat values by hand. + +Sun Dec 21 12:23:16 2008 Nobuyoshi Nakada + + * lib/optparse.rb (SPLAT_PROC): fix for regexp. [ruby-dev:37514] + +Mon Dec 22 15:25:03 2008 Yuki Sonoda (Yugui) + + * thread.c (Thread#set_trace_func, #add_trace_func): removed. + This is an unsupported feature in 1.9.1 and will be supported + in 1.9.2. [ruby-core:19581] + (thread_add_trace_func): removes unnecessary function. + (thread_add_trace_func_m): ditto. + (thread_set_trace_func_m): ditto. + +Sat Dec 20 18:28:26 2008 Nobuyoshi Nakada + + * dln.c (dln_find_1): supplements an extension for executable + files on DOSish platforms. + + * io.c (pipe_open): use rb_w32_aspawn() for array form. + + * win32/win32.c (rb_w32_pipe_exec): no longer used. + + * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): deals with batch + files and commands with extensions. [ruby-core:20695] + + * win32/win32.c (has_redirection): supports environment variables + references. + +Fri Dec 5 01:37:02 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real error + at this point. + + * io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec() + to use our own redirection scheme. + + * lib/rake.rb (Rake::MultiTask): invoke_prerequisites should be + private. a patch from okkez in [ruby-dev:37399] + +Sat Dec 20 10:59:16 2008 Yuki Sonoda (Yugui) + + * lib/irb/locale.rb (IRB::Locale#initialize) + initializes instance variables to suppress warnings. + typo fix to ignore LoadError: [ruby-dev:37508] + +Fri Dec 19 17:01:35 2008 Yukihiro Matsumoto + + * io.c (rb_io_extract_encoding_option): "internal_encoding: nil" + to specify no-transcoding. and other corner case fixed. + [ruby-dev:37496] + + * hash.c (rb_hash_lookup2): new function to look-up hash with + default value. + +Fri Dec 19 15:51:48 2008 Nobuyoshi Nakada + + * ruby.c (process_options): get rid of warning on DOSISH. + +Thu Dec 18 19:31:54 2008 Yuki Sonoda (Yugui) + + * lib/irb/init.rb (IRB.opt_parse): (M17N) adds -U and -E as command + line options. [ruby-dev:37161]. Fixes #711. + improved long optinos. + + * lib/irb/init.rb (IRB.set_encoding): new subroutine for IRB.opt_parse + + * lib/irb/input-method.rb (IRB::StdioInputMethod): (M17N) regards + scripts that user types as encoded in the external_encoding. + + * lib/irb/input-method.rb (IRB::ReadlineInputMethod): ditto. + + * lib/irb/input-method.rb (IRB::FileInputMethod): (M17N) respects + magic comment. + + * lib/irb/help.rb (IRB.print_usage): (M17N) respects magic comment + in the resource file. + + * lib/irb/lc/help-message: adds -U and -E. + + * lib/irb/lc/ja/help-message: ditto. re-encoded from ISO-2022-JP into UTF-8. + + * lib/irb/lc/ja/encoding_aliases.rb: new file. provides Japanese specific + character encoding name table for backward compatibility. + + * lib/irb/lc/ja/error.rb: re-eoncoded from ISO-2022-JP into UTF-8. + magic comment. + + * lib/irb/locale.rb: integrated with Ruby 1.9's M17N support. + + * lib/irb/magic-file.rb: new file. utility to handle files with magic + comment and opens in the correct encoding. + + * lib/irb/ruby-lex.rb (RubyLex#each_top_level_statement): recovers + character encoding for a statement after it lexed so that irb can + eval the statement in correct encoding. + + * lib/irb/src_encoding.rb: new file. utility. + +Thu Dec 18 21:12:28 2008 Takeyuki FUJIOKA + + * lib/cgi/session.rb: fix bug for ignore session_id option. + report from [ruby-core:18635], [Bug #572] + + * lib/cgi/core.rb: use Encoding#find when encoding set. + + * test/cgi/test_cgi_session.rb: test for session_id specified. + +Thu Dec 18 16:48:12 2008 Yukihiro Matsumoto + + * lib/optparse/version.rb: remove variable shadowing to stop + warning. [ruby-core:20612] + + * lib/irb/completion.rb, lib/net/imap.rb, lib/prime.rb, + lib/rinda/ring.rb, lib/racc/parser.rb, + lib/shell/command-processor.rb, lib/yaml/yamlnode.rb: ditto. + + * lib/racc/parser.rb: remove space before parentheses. + + * lib/shell/command-processor.rb, lib/shell/process-controller.rb: + use parentheses around arguments. + + * lib/irb/ext/change-ws.rb, lib/rexml/validation/relaxng.rb, + lib/yaml/baseemitter.rb: indentation fix. + + * lib/matrix.rb: small cosmetic change. + +Thu Dec 18 08:15:04 2008 James Edward Gray II + + * lib/xmlrpc/server.rb: Restricting method inspection to show only + non-inherited public methods. [ruby-core:20603] + + * lib/xmlrpc/server.rb: Fixing method inspection so it doesn't + trigger XMLRPC::FaultException when used. [ruby-core:20604] + +Wed Dec 17 19:39:44 2008 Tanaka Akira + + * ext/socket/socket.c (unix_recv_io): relax msg_controllen error + check. + +Wed Dec 17 19:37:30 2008 Tanaka Akira + + * ext/pty/extconf.rb: check util.h for OpenBSD. + + * ext/pty/pty.c: include util.h if available. + +Wed Dec 17 19:23:28 2008 Keiju Ishitsuka + + * lib/matrix.rb: shut up warning. [ruby-dev:37481] [Bug #899] + +Sat Dec 13 08:35:14 2008 Tadayoshi Funaba + + * complex.c (nucomp_canonicalization): renamed. + + * ext/math/complex.c: followed the above change. + + * rational.c (nurat_canonicalization): renamed. + + * ext/math/rational.c: followed the above change. + + * configure.in: defines a new macro. + +Wed Dec 17 15:44:28 2008 Yukihiro Matsumoto + + * array.c (rb_ary_pop_m): use enum ary_take_pos_flags. + + * array.c (rb_ary_push_m): add modification check before actual + operation. [ruby-dev:37440] + +Wed Dec 17 15:35:39 2008 Yuki Sonoda (Yugui) + + * configure.in (OBJDUMP, OBJCOPY): + Also BSD's ports prefixes GNU binutils with 'g'. + +Wed Dec 17 11:39:39 2008 Kazuhiro NISHIYAMA + + * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_hash): + shut up warning. see [ruby-dev:37437] + +Wed Dec 17 11:01:35 2008 Nobuyoshi Nakada + + * string.c (rb_str_hash): gets rid of collisions between differen + encoding strings. [ruby-core:20526] + +Tue Dec 16 22:55:11 2008 NAKAMURA Usaku + + * bin/testrb: set $0. + +Tue Dec 16 21:59:02 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (VpToString): reverted modification + (that caused a bug) in r20359. [ruby-dev:37370] + + * ext/bigdecimal/bigdecimal.c (BigDecimal_limit): comment update. + [ruby-dev:37465] + +Tue Dec 16 22:42:16 2008 NAKAMURA Usaku + + * lib/test/unit.rb (Test::Unit.setup_argv): sorry, fixed wrong commit. + +Tue Dec 16 21:59:29 2008 NAKAMURA Usaku + + * lib/test/unit.rb (Test::Unit.setup_argv): ALT_SEPARATOR support. + +Tue Dec 16 20:24:20 2008 Tadayoshi Funaba + + * lib/date/format.rb (_parse): m17n compliant. + +Tue Dec 16 19:43:53 2008 Tanaka Akira + + * re.c: use strlcpy for error messages. + +Tue Dec 16 16:41:51 2008 Nobuyoshi Nakada + + * parse.y (stmt): returns dispatched result. + + * parse.y (primary): also in ripper, saves in_def before restoring. + +Tue Dec 16 12:30:56 2008 Nobuyoshi Nakada + + * configure.in (ac_cv_header_ucontext_h): do not use ucontext.h on Mac + OS X 10.5 or later. merged from MacPorts. + + * configure.in (ac_cv_func_daemon): daemon(3) is deprecated on Mac OS + X 10.5 or later. + +Tue Dec 16 11:37:07 2008 NAKAMURA Usaku + + * ruby.c (set_arg0): use strlcpy() instead of strncpy(). + + * load.c (rb_feature_p): ditto. + + * dln.c (dln_load): ditto. + +Tue Dec 16 09:14:28 2008 Yukihiro Matsumoto + + * parse.y (block_call): block should not be given to yield. + [ruby-core:20583] + +Mon Dec 15 23:48:39 2008 Yukihiro Matsumoto + + * thread.c (sleep_timeval): cast tv_usec to long to shut up + warnings on OSX. [ruby-dev:37449] + +Mon Dec 15 23:29:49 2008 Yukihiro Matsumoto + + * ruby.c (process_options): revive global sub, gsub, chop, chomp + only when auto looping options (-p/-n) is specified. + [ruby-core:20570] + +Mon Dec 15 21:01:46 2008 Tanaka Akira + + * ext/pty/pty.c (chfunc): make it static. + +Mon Dec 15 20:16:46 2008 NAKAMURA Usaku + + * common.mk (EXTMK_ARGS): shouldn't use ``\"'' because cmd.exe eat + ''\'' in such quotes. + +Mon Dec 15 19:07:31 2008 NAKAMURA Usaku + + * win32/Makefile.sub (config.h): define CANONICALIZATION_FOR_MATHN + to follow r20683. + +Mon Dec 15 18:12:34 2008 Yukihiro Matsumoto + + * lib/rake/packagetask.rb (Rake::PackageTask): small document + update from okkez in [ruby-dev:37443] + +Mon Dec 15 16:26:46 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (vm_callee_setup_arg_complex): uses cfp from + blockptr instead of the current cfp. [ruby-core:20544] + +Wed Dec 17 09:50:19 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_metaclass.rb: removed codes for my debugging. + sorry. [ruby-dev:37470] + +Mon Dec 15 14:56:59 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_metaclass.rb: new test case for metaclass hierarchy. + + * class.c (make_metametaclass): new function. extracted from + rb_make_metaclass. + + * class.c (rb_make_metaclass): uses make_metametaclass when called for a + metaclass. + + * class.c (rb_singleton_class): creates a meta^(n+2)-class in + addition to a meta^(n+1)-class when called for a meta^(n)-class. + This is because the returned meta^(n+1) class must acts as an instance of + Class, metaclass of Class, ..., meta^(n+1)-class of Class, + Module, metaclass of Module, ..., meta^(n+1)-class of Module, + Object, metaclass of Object, ..., meta^(n+2)-class of Object, + BasicObject, metaclass of BasicObject, ..., meta^(n+2)-class of + and BasicObject even when Class, Module, Object or BasicObject has + not have its meta^(i)-class yet. + +Mon Dec 15 15:13:22 2008 Nobuyoshi Nakada + + * id.h, template/id.h.tmpl (ruby_method_ids): sees YYTOKENTYPE too. + [ruby-dev:37436] + +Mon Dec 15 15:02:24 2008 Nobuyoshi Nakada + + * common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile. + [ruby-core:20131] + +Mon Dec 15 14:39:37 2008 Nobuyoshi Nakada + + * vm_eval.c (vm_call0): NODE_ZSUPER supported. [ruby-core:20480] + + * vm_eval.c (vm_call_super): uses method_missing(). + + * vm_eval.c (method_missing): get rid of too large alloca. + + * vm_eval.c (rb_call0, method_missing): uses idMethodMissing. + + * vm_method.c (rb_add_method, remove_method, rb_undef): uses + id__send__. + + * vm_method.c (Init_eval_method): removed IDs which are defined as + immediate values. + +Mon Dec 15 11:35:27 2008 Nobuyoshi Nakada + + * vm.c (vm_backtrace): defaults to script name for C functions. + +Mon Dec 15 11:32:18 2008 Nobuyoshi Nakada + + * ruby.c (rubylib_mangled_path, rubylib_mangled_path2): cannot use + locale encoding before load path is initialized + + * ruby.c (ruby_init_loadpath_safe): ditto. + + * ruby.c (process_options): loads encdb so that encodings can be + loaded, then associates script name and load paths with the + locale encoding. + +Sun Dec 14 14:26:11 2008 Yuki Sonoda (Yugui) + + * spec/README: directory structrue changed + +Sun Dec 14 01:35:48 2008 Tanaka Akira + + * process.c (forked_child): new variable. + (before_exec): don't call rb_thread_stop_timer_thread if + forked_child. + (after_exec): reset forked_child after rb_thread_start_timer_thread. + (rb_fork): set forked_child just after fork in child. + + * ext/pty/pty.c (chfunc): extracted from establishShell. + (establishShell): use rb_fork. + + [ruby-dev:37418] + +Sat Dec 13 18:34:43 2008 Yukihiro Matsumoto + + * string.c (sym_printable): wrong condition for string iteration. + +Sat Dec 13 15:52:27 2008 Yukihiro Matsumoto + + * string.c (sym_equal): remove documentation error "Otherwise, + compares them as strings". [ruby-dev:37398] + +Sat Dec 13 15:55:37 2008 TAKAO Kouji + + * ruby.c (process_options): fixed default_internal is nil. + (closes #862) + +Sat Dec 13 13:03:20 2008 Tadayoshi Funaba + + * complex.c: use rb_usascii_str_new2 instead of rb_str_new2. + + * rational.c: ditto. + +Fri Dec 12 22:12:46 2008 Tadayoshi Funaba + + * complex.c, rational.c: do not use RUBY_VERSION_CODE. + +Fri Dec 12 10:20:55 2008 Nobuyoshi Nakada + + * complex.c, rational.c: do not use RUBY_VERSION_CODE. + +Tue Dec 16 12:41:52 2008 Yuki Sonoda (Yugui) + + * configure.in (OBJDUMP, OBJCOPY): + (darwin) MacPorts prefixes GNU binutils with 'g'. + +Sun Dec 7 23:17:33 2008 Nobuyoshi Nakada + + * Makefile.in (LIBRUBY_SO): localizes non-public symbols. + + * configure.in (OBJDUMP, OBJCOPY): for dealing with binary files. + +Mon Dec 15 10:00:36 2008 Nobuyoshi Nakada + + * common.mk (btest-ruby): use RUNRUBY instead of MINIRUBY to load the + shared library. [Bug #849] + +Sun Dec 14 09:14:37 2008 Yuki Sonoda (Yugui) + + * reverts r20713. + +Sat Dec 13 22:17:30 2008 Yuki Sonoda (Yugui) + + * common.mk (help): describes more targets. + based on a patch by Michael Klishin. [ruby-core:20523]. + +Sat Dec 13 16:04:48 2008 Yuki Sonoda (Yugui) + + * encoding.c (default_external): endless recursion during + loading a locale encoding on some locale. + fixed by Nobuyoshi Nakada. + + * string.c (sym_inspect): quote if symbol contains non-printable + characters. [ruby-dev:37398] + +Sat Dec 13 14:24:38 2008 Yuki Sonoda (Yugui) + + * test/ruby/enc/test_utf16.rb: feature changed in r20626. + follows it. + +Sat Dec 13 13:41:44 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_m17n_comb.rb: feature changed in r20626. + follows it. + +Sat Dec 13 12:48:57 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_m17n.rb: feature changed in r20626. + follows it. + +Sat Dec 13 12:38:16 2008 Yuki Sonoda (Yugui) + + * lib/minitest/test.rb (MinTest::Unit#location): + skips user-defined assertions as MiniTest's. + e.g. for test/ruby/test_m17n.rb. + +Wed Dec 10 12:56:32 2008 Akinori MUSHA + + * enumerator.c (enumerator_rewind): If the enclosed object + responds to a "rewind" method, call it; cf. [ruby-dev:37268] + +Sat Dec 13 09:17:33 2008 Ryan Davis + + * lib/minitest/*.rb: Imported minitest 1.3.1 r4503. + * test/minitest/test_mini_test.rb: ditto. + * lib/miniunit/autorun.rb: added (as part of r4503). + +Sat Dec 13 01:10:03 2008 TAKAO Kouji + + * ext/readline/readline.c + (readline_s_get_completion_append_character): uses locale + encoding but not ASCII-8BIT. + +Fri Dec 12 19:24:47 2008 Yuki Sonoda (Yugui) + + * common.mk (run, runruby, parse, gdb, gdb-ruby): you can also run + other scripts than $(srcdir)/test.rb. + +Fri Dec 12 19:13:43 2008 TAKAO Kouji + + * ext/readline/readline.c (readline_readline): changed the message + of IOError to 'closed stdin' from 'stdin closed' if stdin was + closed. + +Fri Dec 12 11:00:52 2008 Nobuyoshi Nakada + + * load.c (rb_feature_p): load path must be expanded. + [ruby-dev:37388] + +Fri Dec 12 10:19:21 2008 Nobuyoshi Nakada + + * string.c (rb_string_value_ptr, rb_to_id): do not use a side + effect expression in RSTRING_PTR. + + * string.c (rb_str_split_m): simplified the argument of + RSTRING_LEN. + +Thu Dec 11 23:48:00 2008 Tadayoshi Funaba + + * lib/cmath.rb (sqrt): should pass nan to the original method. + +Thu Dec 11 19:31:45 2008 Tanaka Akira + + * lib/test/unit/assertions.rb: extracted from lib/test/unit.rb. + lib/test/unit/testcase.rb: ditto. + at asakusa.rb. [ruby-core:20014] + +Thu Dec 11 19:23:09 2008 Tanaka Akira + + * test/ruby/test_io.rb (test_dup_many): extracted from test_dup. + test in ruby subprocess. at asakusa.rb. [ruby-dev:35648] + +Thu Dec 11 19:16:30 2008 Tanaka Akira + + * lib/pathname.rb (Pathname#=~): undefed. at asakusa.rb. + [ruby-core:19690] + +Thu Dec 11 13:09:01 2008 Yukihiro Matsumoto + + * re.c (reg_enc_error): raise EncodingCompatibilityError for + encoding incompatibility. [ruby-core:18600] + + * re.c (rb_reg_prepare_enc): more consistent error message. + [ruby-core:18611] + +Fri Dec 12 19:29:07 2008 Yuki Sonoda (Yugui) + + * encoding.c (rb_enc_set_default_external): default_internal can be + nil, but default_external cannot. + + * encoding.c (rb_set_default_internal): adds rdoc. + + * encoding.c (enc_find): ditto. + +Fri Dec 12 14:09:55 2008 Yuki Sonoda (Yugui) + + * encoding.c (enc_get_default_encoding): removed. + Generalizing rb_default_{external,internal}_encoding seems to be + difficult. + default_external cannot be NULL even before detected. [ruby-dev:37390] + + * encoding.c (rb_default_external_encoding): has its own + implementation again. + + * encoding.c (rb_default_internal_encoding): ditto. + + * gem_prelude.rb: added notice. + + * ruby.c (rubylib_mangled_path, rubylib_mangled_path2): uses locale + encoding but not ASCII-8BIT. + + * ruby.c (process_options): refers less to default_external. + +Thu Dec 11 20:05:17 2008 Nobuyoshi Nakada + + * encoding.c (rb_enc_aliases_enc_i): skips default internal. + +Thu Dec 11 13:36:18 2008 Nobuyoshi Nakada + + * encoding.c (enc_set_default_encoding): allowed to set default + encoding. + + * encoding.c (rb_locale_encoding): removed Encoding::LOCALE. + + * encoding.c (rb_enc_set_default_external): ditto. + + * encoding.c (rb_enc_set_default_internal): ditto. + + * encoding.c (rb_enc_set_default_internal): defines internal + encoding as nil. + +Thu Dec 11 10:25:25 2008 Yukihiro Matsumoto + + * test/ruby/test_bignum.rb (TestBignum#test_convert): remove + platform dependent call of Process.wait. coverage should be + accomplished by other method. [ruby-dev:36062] + +Thu Dec 11 10:18:35 2008 Yukihiro Matsumoto + + * lib/rexml/document.rb (REXML::Document#write): require + rexml/formatters/transitive if transitive flag is on. a patch + from akira yamada in [ruby-dev:36230]. fix #553 + + * lib/rexml/element.rb (REXML::Element#write): ditto. + + * lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element): + add hack for IE. [ruby-dev:36230] + +Thu Dec 11 02:37:22 2008 Yukihiro Matsumoto + + * math.c (domain_check): should not raise EDOM exception for NaN + value if operand is also NaN. affects acos, asin, acosh, atanh, + log, log2, log10, sqrt, gamma, lgamma. [ruby-dev:37357] + +Thu Dec 11 01:21:58 2008 Yukihiro Matsumoto + + * thread.c (rb_mutex_unlock): shut up warning. a patch from + Kazuhiro NISHIYAMA in [ruby-dev:37345]. fix #846 + +Wed Dec 10 23:58:56 2008 Tadayoshi Funaba + + * complex.c: avoided warnings on cpp. [ruby-dev:37344] + + * rational.c: ditto. + +Wed Dec 10 12:46:52 2008 Akinori MUSHA + + * enumerator.c (enumerator_next): Fix a typo: s/rewinded/rewound/. + + * lib/prime.rb (Prime::OldCompatibility#each): Ditto. + +Wed Dec 10 11:25:53 2008 NARUSE, Yui + + * re.c (rb_reg_initialize): raise RegexpError when encoding + is dummy encoding. [ruby-dev:37091] + +Tue Dec 9 18:35:35 2008 Martin Duerst + + * enc/trans/single_byte.trans, cp850-tbl.rb, cp852-tbl.rb, + cp855-tbl.rb, koi8-r-tbl.rb, koi8-u-tbl.rb, tis-620-tbl.rb: + new single-byte transcodings (from Yoshihiro Kambayashi) + + * test/ruby/test_transcode.rb: added tests for the above + (from Yoshihiro Kambayashi), small cosmetic fixes + + +Tue Dec 9 13:33:53 2008 Nobuyoshi Nakada + + * compile.c (iseq_compile_each), gc.c (assign_heap_slot), + (gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add), + proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all), + (thread_start_func_2, blocking_region_begin, blocking_region_end), + (rb_thread_kill), thread_pthread.c (native_thread_create), + (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c + (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state), + (vm_call0): use void pointer for %p. + + * cont.c (fiber_status), template/insns.inc.tmpl (ruby_vminsn_type), + vm_insnhelper.h (BOP): ISO C forbids comma at end of enumerator + list. + + * vm_insnhelper.c (check_cfunc): use function pointer. + +Tue Dec 9 12:08:47 2008 Nobuyoshi Nakada + + * .gdbinit (rp): fixed typo for T_STRUCT. + +Tue Dec 9 03:21:37 2008 Nobuyoshi Nakada + + * mkconfig.rb: fix for continued lines. based on a patch from + Marcus Rueckert at [ruby-core:20420]. + +Fri Dec 5 22:56:24 2008 Yukihiro Matsumoto + + * eval.c (rb_make_exception): single argument to raise may be + string compatible object. + +Tue Dec 9 00:54:01 2008 Nobuyoshi Nakada + + * tool/make-snapshot (package): enc.mk in snapshot is dummy and should + not deal with objects. [ruby-core:20422] + +Tue Dec 9 00:17:50 2008 Nobuyoshi Nakada + + * enc/depend (clean-srcs): split out from clean. + +Mon Dec 8 23:34:18 2008 Yuki Sonoda (Yugui) + + * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'. + just ignores '*' in these cases. + [ruby-dev:37289] + +Mon Dec 8 18:31:41 2008 Nobuyoshi Nakada + + * pack.c (pack_pack): fixed length for odd length string. + [ruby-dev:37283] + +Mon Dec 8 10:32:33 2008 Nobuyoshi Nakada + + * ruby.c (set_option_encoding_once): dry. + + * ruby.c (proc_options): checks extra argument for -E/--encoding. + +Sun Dec 7 23:47:37 2008 Nobuyoshi Nakada + + * configure.in (LIBPATHFLAG): use numbered specifier if RPATHFLAG + is set. [ruby-talk:322136] + +Sat Dec 6 17:51:35 2008 Yuki Sonoda (Yugui) + + * pack.c (pack_pack): 'u0' is not special differently from 'm0'. + +Tue Dec 9 11:50:46 2008 Yuki Sonoda (Yugui) + + * pack.c (pack_pck): fixed [ruby-dev:37295]. + Array#pack always has returned an US-ASCII string when + the given format ended with 'u', 'M' or 'm'. + +Sat Dec 6 14:35:06 2008 NARUSE, Yui + + * pack.c (pack_pack): set US-ASCII and CODERANGE_7BIT + when quoted-printable ('M') and base64 ('m'). + [ruby-dev:37284] + + * pack.c (pack_unpack): ditto. + +Thu Dec 11 11:51:36 2008 Nobuyoshi Nakada + + * encoding.c (rb_locale_encoding): removed Encoding::LOCALE. + + * encoding.c (rb_enc_set_default_external): ditto. + + * encoding.c (rb_enc_set_default_internal): ditto. + +Thu Dec 11 11:11:03 2008 Nobuyoshi Nakada + + * include/ruby/st.h (size_t): needs stddef.h or stdlib.h. + [ruby-core:20339] + +Wed Dec 10 01:28:46 2008 NAKAMURA Usaku + + * common.mk (win32.obj): depend on headers. + +Sat Dec 6 18:33:16 2008 Nobuyoshi Nakada + + * tool/make-snapshot (package): added RM and CP. [ruby-dev:37288] + +Fri Dec 5 21:45:45 2008 Tadayoshi Funaba + + * rational.c (nurat_{to_s,inspect}): performance improvement. + +Fri Dec 5 21:42:44 2008 Tadayoshi Funaba + + * complex.c: inpsect should not depend on to_s. + +Fri Dec 5 12:38:48 2008 Nobuyoshi Nakada + + * compile.c (iseq_set_sequence): uses rb_compile_warning() for + warning at compilation time. + +Fri Dec 5 12:35:46 2008 Nobuyoshi Nakada + + * compile.c (ruby_iseq_compile, ruby_iseq_translate_threaded_code), + (ruby_insns_name_array, ruby_iseq_build_from_ary): prefixed with + ruby_. + + * iseq.c (ruby_iseq_load, ruby_insn_make_insn_table): ditto. + +Fri Dec 5 10:01:43 2008 Nobuyoshi Nakada + + * string.c (rb_str_cmp_m): fixed rdoc. pointed out by at [ruby-talk:321967] + +Fri Dec 5 07:58:30 2008 Tanaka Akira + + * io.c (io_binwrite): arg.offset should be updated after retry. + +Fri Dec 5 03:29:17 2008 Nobuyoshi Nakada + + * load.c (rb_get_load_path): returns the load path without + touching. + + * load.c (rb_feature_provided): new function to return the loading + path in addition to rb_provided(). + + * load.c (search_required): sets path if loading. + + * variable.c (autoload_provided): load paths are expanded to check + if loading. + + * variable.c (autoload_node): keeps autoload mark while loading. + [ruby-core:20235] + + * variable.c (rb_const_get_0): loops while autoload mark is set. + +Fri Dec 5 01:19:21 2008 Yukihiro Matsumoto + + * pack.c (pack_pack): propagate taint status from format string to + result string. + +Thu Dec 4 23:02:13 2008 Yuki Sonoda (Yugui) + + * spec/default.mspec: follows changes in rubyspec project. + inherits configurations from ruby.1.9.mspec. + +Thu Dec 4 22:13:55 2008 Tadayoshi Funaba + + * test/ruby/test_complex.rb: added some tests. + + * test/ruby/test_rational.rb: ditto. + +Fri Dec 5 18:13:56 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): check + whether fd is valid. + +Thu Dec 4 23:31:12 2008 NAKAMURA Usaku + + * win32/win32.c (waitpid): fix bug of checking child slot. + + * win32/win32.c (FindChildSlotByHandle): new. + +Thu Dec 4 16:58:12 2008 Yukihiro Matsumoto + + * lib/rubygems/validator.rb (Gem#remove_leading_dot_dir): make + this method private. a patch from okkez in [ruby-dev:37245] + +Thu Dec 4 16:16:09 2008 Yukihiro Matsumoto + + * lib/gserver.rb: fixed type in sample code. a report from Oleg + Puchinin. + +Thu Dec 4 14:54:32 2008 Yukihiro Matsumoto + + * lib/rubygems/local_remote_options.rb (Gem#add_update_sources_option): + little documentation fix. a patch from okkez. [ruby-dev:37271] + +Thu Dec 4 13:56:31 2008 Yukihiro Matsumoto + + * ext/curses/curses.c (window_getch): avoid ISPRINT() macro which + has an issue with OpenSolaris. [ruby-core:20189] + + * ext/curses/curses.c (curses_getch): no ISPRINT(). [ruby-core:20294] + + * signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug. + +Thu Dec 4 11:38:40 2008 Akinori MUSHA + + * vm_method.c (rb_obj_respond_to): Remove a duplicated rdoc + comment and fix a markup error. + +Thu Dec 4 06:04:16 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat + 'parent' and 'variable' options on a Hash argument. + +Thu Dec 4 05:06:47 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix. use ::RubyVM instead of ::VM + [ruby-list:45676] + + * ext/tk/tcltklib.c: update RELEASE_DATE + +Thu Dec 4 01:37:47 2008 Tadayoshi Funaba + + * complex.c (nurat_{to_s,inspect}): provides better representation + for in-finite imag part. + +Thu Dec 4 01:22:41 2008 Tadayoshi Funaba + + * complex.c (f_signbit): NaN may be signed value. + +Wed Dec 3 22:54:39 2008 Nobuyoshi Nakada + + * parse.y (expr): keyword_not can continue across newline. + [ruby-core:20252] + +Wed Dec 3 14:48:52 2008 Nobuyoshi Nakada + + * ext/tk/tcltklib.c (ip_ruby_cmd, ip_invoke_with_position): must + not access internal union directly. [ruby-list:45670] + +Wed Dec 3 12:24:08 2008 Nobuyoshi Nakada + + * io.c (rb_io_getc, rb_io_readchar): documentation correction from + Emiel van de Laar. [ruby-core:20212] + + * ext/stringio/stringio.c (strio_readchar): ditto. + +Wed Dec 3 09:26:29 2008 Yukihiro Matsumoto + + * lib/rexml/xpath.rb (REXML::XPath.first): apply documentation + patch from Ken Bloom in [ruby-core:20213]. + + * lib/rexml/xpath.rb (REXML::XPath.each): ditto. + +Wed Dec 3 02:53:24 2008 Yusuke Endoh + + * test/ruby/test_range.rb: add a test. + +Wed Dec 3 02:26:07 2008 Yusuke Endoh + + * test/ruby/test_string.rb: add some tests. + +Mon Dec 1 12:00:45 2008 Nobuyoshi Nakada + + * cont.c (rb_fiber_start): calls with exact argument number. + [ruby-core:20088] + +Mon Dec 1 16:06:15 2008 NAKAMURA Usaku + + * signal.c (register_sigaltstack): no need to define on non-sigaltstack + platform. + +Sun Nov 30 21:41:10 2008 Yuki Sonoda (Yugui) + + * man/rake.1: new manual page + +Sat Nov 29 23:56:44 2008 Yuki Sonoda (Yugui) + + * man/irb.1 (EXAMPLES): new section + +Sat Nov 29 19:19:32 2008 Yukihiro Matsumoto + + * regparse.c (is_invalid_quantifier_target): Perl and old Ruby + accepts quantifier on anchors. [ruby-core:20161] + +Sat Nov 29 00:18:30 2008 Yukihiro Matsumoto + + * cont.c (fiber_alloc): separate allocation and initialization. + allow subclass to override #initialize. [ruby-core:20086] + +Fri Nov 28 18:31:21 2008 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_getaddrinfo): refactored to remove + code duplication regarding getaddrinfo. + + * ext/socket/socket.c (sock_getaddrinfo): should have updated for + Mac OS X. a patch from Shumpei Akai in [ruby-dev:37234] + +Thu Nov 27 21:41:29 2008 Tadayoshi Funaba + + * strftime.c (rb_strftime): should add padding for %%. + +Thu Nov 27 16:32:53 2008 Nobuyoshi Nakada + + * signal.c (register_sigaltstack): stores alt stack for debug + purpose. + +Thu Nov 27 16:12:33 2008 Nobuyoshi Nakada + + * signal.c (ruby_sigaction_t): added. + +Thu Nov 27 15:59:16 2008 Nobuyoshi Nakada + + * gc.c (ruby_stack_check): no check if using sigaltstack. + + * signal.c (ALT_STACK_SIZE): default minimum size is insufficient + for method calls. + + * signal.c (sigsegv): handles stack overflow if possible. + + * thread.c (ruby_thread_stack_overflow): helper function to raise + sysstack_error. + + * thread_pthread.c (ruby_stack_overflowed_p): checks for stack + overflow. + +Wed Nov 26 23:15:47 2008 Yukihiro Matsumoto + + * strftime.c (STRFTIME): use rb_strftime() recursively, instead of + platform's strftime(). + +Wed Nov 26 22:46:23 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (VpException): bigdecimal zero + division should raise FloatDomainError if mode + VP_EXCEPTION_ZERODIVIDE is set. [ruby-dev:37204] + + * ext/bigdecimal/bigdecimal.c (BigDecimal_mode): should handle + VP_EXCEPTION_ZERODIVIDE. + +Wed Nov 26 15:16:07 2008 Kazuhiro NISHIYAMA + + * ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak. + +Wed Nov 26 03:17:48 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (BigDecimal_to_r): raise exception + for nan/inf conversion. [ruby-dev:37187] fix #793 + + * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): ditto. + +Wed Nov 26 03:00:59 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (VpAlloc): avoid ALLOCA_N() to avoid + segmentation fault caused by (insanely) long decimal values. + [ruby-dev:37189] fix #794 + + * ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_to_i, + BigDecimal_to_f, BigDecimal_to_s, BigDecimal_split, + BigDecimal_inspect): ditto. + + * ext/bigdecimal/bigdecimal.c (VpToString): small performance + improvement. + +Wed Nov 26 00:26:30 2008 Yukihiro Matsumoto + + * strftime.c (STRFTIME): should add padding for %[xXrR] etc. + [ruby-dev:37185] fix: #792 + +Tue Nov 25 16:26:12 2008 Yukihiro Matsumoto + + * array.c (rb_ary_times): taint (and untrust) status should be + inherited by "ary * 0". [ruby-dev:37024] + +Tue Nov 25 15:54:07 2008 Yukihiro Matsumoto + + * strftime.c (rb_strftime): should not swallow incomplete + formatter, e.g. "%E". [ruby-dev:37170] fix: #787 + + * strftime.c (rb_strftime): clear flags before processing unknown + formatter, e.g. "%i". [ruby-dev:37180] + +Tue Nov 25 10:35:29 2008 Yukihiro Matsumoto + + * strftime.c (rb_strftime): "%^P" should convert to upper case. + [ruby-dev:37180] + +Tue Nov 25 07:51:18 2008 Yukihiro Matsumoto + + * strftime.c (FMT): use "%0d" formatter for zero padding, not "%.d". + [ruby-dev:37168] fix: #768 + + * strftime.c (rb_strftime): %s to use zero padding by default. + [ruby-dev:37180] + +Tue Nov 25 03:37:42 2008 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/blt/tabset.rb, + ext/tk/lib/tkextlib/blt/tabnotebook.rb: + fix many bugs. Now, those work properly. + +Tue Nov 25 03:26:04 2008 Yukihiro Matsumoto + + * numeric.c (num_step): treat infinite step specially. + [ruby-dev:37157] fix: #781. + +Tue Nov 25 01:23:25 2008 Tadayoshi Funaba + + * lib/date/format.rb (strftime): ignores '_' flag for %[LN]. + +Sat Nov 29 00:27:33 2008 Yuki Sonoda (Yugui) + + * thread.c, thread_pthread.c, thread_win32.c: merges nobu's commits - + r20117, r20123, r20124, r20127, r20132-r20134, r20138, r20140, r20141 + and r20160 - from trunk into ruby_1_9_1. + + * thread_pthread.c (thread_timer): checks working flags again. + + * thread_pthread.c (rb_thread_create_timer_thread): do not wait never + coming signal if failed to create tiemr thread. + + * thread_pthread.c (native_cond_timedwait): returns error code. + + * thread_pthread.c (thread_timer, rb_thread_create_timer_thread): + handshakes properly. + + * thread_pthread.c (thread_timer): initializes mutex each time. + + * thread_win32.c (thread_start_func_1): use already gotten stack info. + + * thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT + when timed out. + + * thread_pthread.c (thread_timer): uses pthread_cond_timedwait always + instead of pthread_kill. + + * thread.c (thread_timer): uses timedwait on cygwin. + + * thread.c (rb_thread_stop_timer_thread): terminates timer thread + immediately. + +Tue Nov 25 00:08:22 2008 Nobuyoshi Nakada + + * process.c (rb_fork): stops the timer thread during fork. + [ruby-dev:37117] + + * thread.c (rb_thread_start_timer_thread): timer thread needs + system_working to be set. + +Mon Nov 24 23:27:28 2008 Shugo Maeda + + * strftime.c (rb_strftime): The # flag should work with %a, %A, %b, + %B, and %h. [ruby-dev:37162] + + * test/ruby/test_time.rb (test_strftime): ditto. + +Mon Nov 24 23:16:32 2008 Yukihiro Matsumoto + + * signal.c (register_sigaltstack): should not add external + variable (with some cosmetic changes). [ruby-dev:37158] + +Mon Nov 24 22:57:25 2008 Shugo Maeda + + * strftime.c (rb_strftime): A width specifier for %t and %n should + work. [ruby-dev:37160] + +Mon Nov 24 22:07:07 2008 Shugo Maeda + + * strftime.c (rb_strftime): The precision of %0N should be 9. + [ruby-dev:37156] + + * test/ruby/test_time.rb (test_strftime): ditto. + +Mon Nov 24 21:38:23 2008 Shugo Maeda + + * strftime.c (rb_strftime): The default precision should be 1, not + 0. [ruby-dev:37155] + + * test/ruby/test_time.rb (test_strftime): ditto. + +Mon Nov 24 18:35:00 2008 Yukihiro Matsumoto + + * lib/time.rb: r20251 reverted. The patched behavior do not round + trip. [ruby-core:19988] + +Sun Nov 23 16:04:05 2008 Yuki Sonoda (Yugui) + + * signal.c (default_handler, Init_signal): compile error if + USE_SIGALTSTACK is not defined. + +Sun Nov 23 13:39:49 2008 Yuki Sonoda (Yugui) + + * ext/pty/pty.c: reverts 20326. [ruby-dev:37146]. + +Sat Nov 22 23:59:06 2008 Yuki Sonoda (Yugui) + + * lib/time.rb: reverts r20305. [ruby-dev:37144]. + +Sat Nov 22 18:24:24 2008 Yukihiro Matsumoto + + * file.c (rb_file_world_writable_p): should return nil for non + world-writable files. + +Sat Nov 22 10:31:25 2008 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb: + fix NameError bug. + +Sat Nov 22 03:41:22 2008 Yukihiro Matsumoto + + * ext/pty/pty.c (get_device_once): abandon asynchronous exception + that might cause serious problem if a program terminated early. + asynchronous exception is a very bad thing anyway. use + Process.waitpid(pid) or PTY.check(pid) to poll program + termination. if PTY.check is called with optional second + argument being true, it raises an exception same as one from + previous behavior. [incompatible] fix: [ruby-core:19583] + +Fri Nov 21 22:17:15 2008 Yukihiro Matsumoto + + * ruby.c (usage): -W description updated. [ruby-core:19858] + +Sat Nov 22 23:03:47 2008 Yuki Sonoda (Yugui) + + * signal.c (ALT_STACK_SIZE): 4KB is not enough on Mac OS X. + Uses SIGSTKSZ. + +Fri Nov 21 21:50:54 2008 Yukihiro Matsumoto + + * signal.c (register_sigaltstack): use alternative stack for + SIGSEGV to avoid uncaught stack overflow. based on a patch from + Hiro Yoshioka in [ruby-dev:37134]. + [ruby-dev:36993] + +Fri Nov 21 16:06:54 2008 Yukihiro Matsumoto + + * vm.c (thread_free): th->vm may be NULL when pthread_create + failed for ENOMEM. [ruby-dev:37095] + +Thu Nov 20 07:33:15 2008 Yukihiro Matsumoto + + * lib/logger.rb (Logger): should handle the case that cvs/svn do + not expand $Id keyword. [ruby-core:19991] + +Thu Nov 20 07:27:36 2008 Yukihiro Matsumoto + + * lib/minitest/unit.rb (MiniTest::Assertions#capture_io): adjust + indentation to shut up warning. [ruby-core:19993] + +Wed Nov 19 17:48:05 2008 Yukihiro Matsumoto + + * ext/syck/rubyext.c (rb_syck_mktime): return DateTime for a value + out of range of Time. [ruby-core:19919] + +Sat Nov 22 21:29:54 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_method.rb (test_default_accessiblity): test case for + [ruby-dev:37124]. + +Wed Nov 19 14:14:38 2008 Yukihiro Matsumoto + + * node.h (NOEX_MODFUNC): should be include NOEX_PRIVATE. + [ruby-dev:37124] + +Wed Nov 19 03:01:04 2008 Masatoshi SEKI + + * test/rinda/test_rinda.rb: fixed fails occasionally [ruby-dev:37119]. + thanks, shinichiro.h. + +Wed Nov 19 02:39:31 2008 Nobuyoshi Nakada + + * error.c (Init_syserr): moved function definition itself from + template/known_errors.inc.tmpl. + +Wed Nov 19 01:10:52 2008 Masatoshi SEKI + + * lib/drb/drb.rb (DRbConn::alive?): fixed NoMethodError problem + from NaHi [ruby-dev:37110]. + +Wed Nov 19 01:05:26 2008 Yusuke Endoh + + * cont.c (cont_mark, cont_capture, cont_restore_1): speed up + continuation by copying only valid YARV stack. [ruby-dev:37106] + +Wed Nov 19 00:03:13 2008 Yukihiro Matsumoto + + * lib/time.rb: according to RFC2822, -0000 means local time, +0000 + means UTC. a patch from Chun Wang. [ruby-core:19578] + +Tue Nov 18 23:02:23 2008 Yukihiro Matsumoto + + * proc.c (proc_eq): equivalence check should not done by pointer + comparison, but should be based on iseq contents. [ruby-dev:37101] + +Tue Nov 18 20:30:08 2008 Yukihiro Matsumoto + + * lib/net/ftp.rb (Net::FTP#open_socket): SOCKSsocket is obsolete. + a patch from Alan Johnson in + [ruby-core:19982]. + +Tue Nov 18 16:18:23 2008 Nobuyoshi Nakada + + * lib/logger.rb (ProgName): fixed for svn, based on a patch from + Nobuhiro IMAI at [ruby-dev:37108]. + +Tue Nov 18 15:56:55 2008 Yukihiro Matsumoto + + * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#read_request_line): + use possessive match for path retrieval to avoid huge recursion + for insanely long path. + +Tue Nov 18 15:50:11 2008 Yukihiro Matsumoto + + * re.c (rb_reg_desc): re might be NULL. + + * regerror.c (onig_error_code_to_format): message updated. + +Tue Nov 18 09:42:11 2008 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::make_switch): makes default + conversion to splat. [ruby-list:45645] + +Mon Nov 17 18:05:16 2008 Nobuyoshi Nakada + + * enc/depend (LIBS): fixed for disable-shared. [ruby-dev:37103] + +Mon Nov 17 11:12:24 2008 Masatoshi SEKI + + * bin/erb: remove -K option. + +Mon Nov 17 02:19:03 2008 Nobuyoshi Nakada + + * configure.in (LIBRUBYARG_STATIC): fixed for --enable-rpath. + +Sat Nov 15 22:46:32 2008 Nobuyoshi Nakada + + * re.c (rb_reg_regsub): returns -1 unless ascii as well as + rb_enc_ascget(). [ruby-dev:37097] + +Sat Nov 15 22:23:45 2008 Nobuyoshi Nakada + + * configure.in (LDSHARED): do not suppress debug info if higher debug + level is given, on cygwin and mingw. + +Thu Nov 13 11:31:13 2008 Nobuyoshi Nakada + + * thread.c (rb_barrier_wait): gets rid of recursive deadlock. + +Thu Nov 13 06:08:44 2008 Nobuyoshi Nakada + + * thread.c (rb_barrier_{new,wait,release,destroy}): use Mutex so that + circular requires fail with deadlock. [ruby-core:19821] + +Wed Nov 12 07:16:01 2008 David Flanagan + + * ruby.c (set_internal_encoding_once): fix typo in error string + +Wed Nov 12 03:30:59 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_{external,locale}_str_new_cstr): optimized + versions for literal strings. + +Wed Nov 12 03:28:41 2008 Nobuyoshi Nakada + + * load.c (rb_require_safe): destroys barrier after successfully + loaded, to get rid of loading same library again. [ruby-core:19798] + + * thread.c (rb_barrier_wait): can not wait destroyed barrier. + + * thread.c (rb_barrier_destroy): destroys barrier so that no longer + waited. + +Tue Nov 11 21:22:28 2008 Yukihiro Matsumoto + + * lib/uri/generic.rb (URI::Generic#check_path): REL_PATH should a + symbol. [ruby-core:19805] + +Tue Nov 11 23:02:27 2008 Yuki Sonoda (Yugui) + + * man/ruby.1 (RUBYOPT): wrote which option can appear. + (--yydebug): wrote "do not use". + (--dump): wrote "do not use". + +Tue Nov 11 20:49:29 2008 Kazuhiro NISHIYAMA + + * configure.in: fix SEGV on Mac OS X 10.5.3 with pthread. + a patch from Wataru Kimura in Bug #193 [ruby-core:17333]. + +Tue Nov 11 23:24:23 2008 Yuki Sonoda (Yugui) + + * ruby.c: merges r20053 and r20067 from trunk into ruby_1_9_1. + + * ruby.c (moreswitches): splits option string and passes arguments. + + * ruby.c (proc_options): checks if allowed in RUBYOPT. + + * ruby.c (process_options): allows long style options in RUBYOPT. + + * ruby.c (load_file_internal): ditto in shebang. [ruby-dev:36979] + + * ruby.c (process_options): delays setting safe level. + [ruby-dev:36997] + +Tue Nov 11 23:36:45 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_accept): commit miss. + +Tue Nov 11 23:02:27 2008 Yuki Sonoda (Yugui) + + * man/ruby.1 (RUBYOPT): wrote which option can appear. + (--yydebug): wrote "do not use". + (--dump): wrote "do not use". + +Tue Nov 11 14:40:40 2008 Martin Duerst + + * test/ruby/test_transcode.rb: unnecessary setup method + (setup_really_needed?) removed + +Tue Nov 11 14:25:25 2008 Martin Duerst + + * enc/trans/single_byte.trans, macgreek-tbl.rb, macroman-tbl.rb, + macromania-tbl.rb, macturkish-tbl.rb, macukraine-tbl.rb, + ibm437-tbl.rb, ibm852-tbl.rb, ibm855-tbl.rb, ibm857-tbl.rb, + ibm860-tbl.rb, ibm861-tbl.rb, ibm862-tbl.rb, ibm863-tbl.rb, + ibm865-tbl.rb, ibm866-tbl.rb, ibm869-tbl.rb, ibm775-tbl.rb: + new single-byte transcodings (from Yoshihiro Kambayashi) + + * test/ruby/test_transcode.rb: added tests for the above + (from Yoshihiro Kambayashi) + +Tue Nov 11 13:20:23 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (BigDecimal_to_r): moved from + bigdecimal/util, converted into C. [ruby-dev:36805] + +Tue Nov 11 07:55:57 2008 Tadayoshi Funaba + + * lib/date.rb (inspect): changed the format. + +Mon Nov 10 17:34:50 2008 Akinori MUSHA + + * test/sdbm/test_sdbm.rb (TestSDBM#test_index): Reflect the method + name change from #index to #key and remove a duplicated test + method. + +Mon Nov 10 10:50:43 2008 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator.delegating_block): should not refer + DelegateClass specific @delegate_dc_obj. a patch from Erik + Hollensbe in [ruby-core:19671]. + +Sun Nov 9 13:04:52 2008 Yukihiro Matsumoto + + * struct.c (rb_struct_initialize_m): avoid unnecessary array + allocation. + +Sun Nov 9 04:10:19 2008 Nobuyoshi Nakada + + * vm_dump.c (control_frame_dump): suppresses finished method name. + +Sun Nov 9 00:02:01 2008 Takeyuki FUJIOKA + + * lib/cgi/session/pstore.rb: fix indentation. + +Sat Nov 8 23:47:45 2008 Takeyuki FUJIOKA + + * lib/cgi/session.rb (FileStore): use marshalized data. + + * test/cgi/session_dir: add a session directory in test. + + * test/cgi/test_cgi_session.rb: add a test. + +Sat Nov 8 21:57:03 2008 Takeyuki FUJIOKA + + * lib/cgi/session.rb: remove debug code. + +Sat Nov 8 21:33:53 2008 Takeyuki FUJIOKA + + * lib/cgi/session.rb: fix indentation. + +Sat Nov 8 18:11:14 2008 Yukihiro Matsumoto + + * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#do_CONNECT): + use #bytesize instead of #size. a patch submitted from + raspberry lemon in [ruby-core:18571]. + + * lib/webrick/httpauth/digestauth.rb, lib/webrick/httpproxy.rb, + lib/webrick/httprequest.rb, lib/webrick/httpservlet/cgi_runner.rb, + lib/webrick/httpservlet/abstract.rb, lib/webrick/httpresponse.rb, + lib/webrick/httpservlet/cgihandler.rb, lib/webrick/utils.rb: ditto. + +Sat Nov 8 17:31:41 2008 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_ungetc): ungetc position should + not be changed from 1.8. [ruby-core:19632] + +Sat Nov 8 17:15:08 2008 Yukihiro Matsumoto + + * lib/optparse.rb (OptionParser#make_switch): 1.9 Symbols respond + to :match. a patch from keith cascio, . + [ruby-core:19730] + +Sat Nov 8 12:10:15 2008 Yukihiro Matsumoto + + * ext/gdbm/gdbm.c (fgdbm_index): make #index warn like Hash. + [ruby-dev:37039] + + * ext/sdbm/init.c (Init_sdbm): typo fixed. [ruby-dev:37039] + +Sat Nov 8 07:07:48 2008 Yukihiro Matsumoto + + * configure.in: detect stdio buffer pointers for uClibc. a patch + from Brian Candler in [ruby-core:12020]. + [ruby-core:19713] + +Sat Nov 8 06:51:42 2008 Yukihiro Matsumoto + + * ext/dbm/dbm.c (fdbm_index): make #index warn like Hash. + + * ext/dbm/dbm.c (fdbm_key): new method. + + * ext/sdbm/init.c: ditto. + +Sat Nov 8 06:20:42 2008 Yukihiro Matsumoto + + * ext/curses/curses.c: curses encoding should obey locale. + + * ext/curses/curses.c (curses_getch): 1.9 getch should return one + character string for single byte string. wchar_t support may + follow in the future. + +Sat Nov 8 05:46:50 2008 Nobuyoshi Nakada + + * include/ruby/io.h (rb_io_t): added write_lock to serialize. + [ruby-core:19668] + + * gc.c (gc_mark_children): mark write_lock. + + * gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be + deferred. + + * io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing. + +Tue Nov 11 17:37:47 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_accept): secure fd before accept because if + error causes in securing, cannot restore the state of accepted + socket. + fixed [ruby-core:19728] + +Sat Nov 8 05:31:25 2008 Yukihiro Matsumoto + + * safe.c (safe_setter): add warning for $SAFE=3. + +Fri Nov 7 22:51:49 2008 Nobuyoshi Nakada + + * inits.c (rb_call_inits): do not repeat. + +Fri Nov 7 12:26:00 2008 Yukihiro Matsumoto + + * lib/irb.rb (IRB::Irb#eval_input): remove extra @context.prompt_i. + [ruby-core:19718] + +Fri Nov 7 11:55:30 2008 NARUSE, Yui + + * nkf.c: update to r1.188. fixes for 16bit environment. + +Fri Nov 7 07:32:55 2008 Yukihiro Matsumoto + + * lib/yaml/rubytypes.rb: support Rational and Complex as 1.8 + does. a patch from Hiroshi Moriyama in [ruby-dev:36899]. + +Fri Nov 7 06:58:59 2008 Yukihiro Matsumoto + + * string.c (Init_String): remove Symbol#===. [ruby-dev:37026] + +Fri Nov 7 02:00:12 2008 Shugo Maeda + + * lib/rexml/entity.rb (unnormalized): do not call + document.record_entity_expansion if document is nil. + see . + Thanks, Naohisa Goto. + + * test/rexml/test_document.rb: ditto. + +Fri Nov 7 01:24:20 2008 Nobuyoshi Nakada + + * tool/make-snapshot: binary encoding spec is no longer needed in 1.9. + +Mon Nov 10 09:56:20 2008 NAKAMURA Usaku + + * win32/win32.c (ifs_open_socket): should retry without proto_buffer + if cannot find the suitable protocol. a patch from Heesob Park. + fixed [ruby-core:19713] + +Thu Nov 6 22:05:36 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (fole_s_connect, fole_initialize, + folevariant_initialize): check argument type of WIN32OLE.connect, + WIN32OLE.new, WIN32OLE_VARIANT.new. + + * test/win32ole/test_win32ole.rb (test_s_new_exc, test_s_connect_exc): + ditto. + + * test/win32ole/test_win32ole_variant.rb (test_s_new_exc): ditto. + + * test/win32ole/test_win32ole_method.rb: add assertion of + WIN32OLE_METHOD.new. + +Tue Nov 4 08:00:00 2008 TAKANO Mitsuhiro (takano32) + + * test/zlib/test_zlib.rb(test_readchar): compare in same type. + +Tue Nov 4 03:28:31 2008 Nobuyoshi Nakada + + * array.c (rb_ary_join): do not repeat self in a recursive array. + [ruby-dev:37019] + +Tue Nov 4 01:56:46 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_mutex_synchronize): fixed prototype. + + * thread.c (rb_mutex_synchronize): fixed function name. + +Mon Nov 3 16:32:54 2008 Nobuyoshi Nakada + + * missing.h: needs RUBY_EXTERN instead of extern for mswin. + +Sat Nov 1 07:09:40 2008 Eric Hodel + + * gem_prelude.rb: Don't require rubygems/defaults.rb. + +Mon Nov 3 13:01:13 2008 Yuki Sonoda (Yugui) + + * array.c (rb_ary_take_first_or_last): renamed rb_ary_partial more + appropriately. + (ary_take_pos_flags): new enum. makes the fourth argument of + rb_ary_take_first_or_last more descriptive. + (rb_ary_partial): renamed rb_ary_partial0 more appropriately. + takes a new parameter klass for what class to instanciate. + +Mon Nov 3 13:00:26 2008 Yuki Sonoda (Yugui) + + * range.c (rb_range_beg_len): rb_raise takes C values as arguments. + [BUG] ranges turned into other value in a message of RangeError. + +Mon Nov 3 06:41:19 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_event_free): invoke IConnectionPoint::Unadvise + before invoking IConnectionPoint::Release. + + * test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb, + test/win32ole/test_err_in_callback.rb, + test/win32ole/test_win32ole_variant_outarg.rb, + test/win32ole/orig_data.csv: Use ActiveX Data Object + Library instead of InternetExplorer. + remove test/win32ole/test_win32ole_variant_with_ie.rb. + +Sun Nov 2 16:41:52 2008 Nobuyoshi Nakada + + * ext/zlib/zlib.c (Init_zlib): defines readbyte instead redefining + readchar. + +Fri Oct 31 21:58:50 2008 Kouhei Sutou + + * lib/rss/converter.rb (RSS::Converter): use String#encode. + +Fri Oct 31 18:05:05 2008 Martin Duerst + + * enc/trans/single_byte.trans, maccroatioan-tbl.rb, + maccyrillic-tbl.rb, maciceland-tbl.rb: new single-byte + transcodings (from Yoshihiro Kambayashi) + + * test/ruby/test_transcode.rb: added tests for the above + (from Yoshihiro Kambayashi) + +Fri Oct 31 12:51:25 2008 Yukihiro Matsumoto + + * dir.c (dir_globs): need taint check. reported by steve + + +Fri Oct 31 12:42:45 2008 wanabe + + * array.c (rb_ary_decrement_share): fix to work recycling + shared-array without the following. [ruby-dev:36991] + + * array.c (ary_make_substitution): don't recycle substitution array. + +Fri Oct 31 11:35:38 2008 Nobuyoshi Nakada + + * encoding.c (rb_enc_set_default_internal): no alias "internal" if + defalt internal is not set. [ruby-dev:37000] + +Fri Oct 31 21:28:14 2008 Yusuke Endoh + + * lib/webrick/httpauth/digestauth.rb + (WEBrick::HTTPAuth::DigestAuth#initialize): fix typo. + +Fri Oct 31 18:51:42 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_array.rb (test_array_subclass): test for r20076. + +Fri Oct 31 18:42:19 2008 Yuki Sonoda (Yugui) + + * array.c (ary_partial0): recovers the mistakenly change feature at r19723. + Array#[m,n] had returned an Array even for an instance of a + subclass. + +Fri Oct 31 12:27:52 2008 Yuki Sonoda (Yugui) + + * spec/default.mspec: supports that the build directory != srcdir. + +Thu Oct 30 23:32:17 2008 Yuki Sonoda (Yugui) + + * test/test_delegate.rb (test_syscallerror_eq): ignored because the + behaviour is now unspecified. + +Thu Oct 30 21:32:15 2008 Yusuke Endoh + + * array.c (rb_ary_permutation): hide temporal array. + +Thu Oct 30 14:45:45 2008 Martin Duerst + + * enc/trans/single_byte.trans: refactoring to make it easier + to add more transcodings (with Yoshihiro Kambayashi) + + * enc/trans/iso-8859-1-tbl.rb: new file to avoid having to + treat ISO-8859-1 as special + +Thu Oct 30 14:10:46 2008 Yukihiro Matsumoto + + * pack.c (pack_pack): templates a, A, Z should propagate encoding + of original strings. templates b, B, h, H brings ASCII-8BIT to + the result. + +Thu Oct 30 09:31:45 2008 Nobuyoshi Nakada + + * encoding.c (rb_locale_encoding): makes an alias for locale. + [ruby-dev:36976] + + * encoding.c (rb_enc_set_default_external): ditto for external. + + * encoding.c (rb_enc_set_default_internal): ditto for internal. + +Thu Oct 30 03:30:25 2008 Yukihiro Matsumoto + + * ruby.c (load_file_internal): should not set script encoding to + ASCII-8BIT. + + * ruby.c (load_file_internal): do not auto convert scripts even + when default_internal is set. [ruby-core:19579] + +Thu Oct 30 02:20:33 2008 Yusuke Endoh + + * array.c (rb_ary_sort_bang): remove SEGV when replacing array with + embedded one during sort. [ruby-dev:36983] + + * test/ruby/test_array.rb (test_sort!): add tests for above. + +Thu Oct 30 01:44:23 2008 Yusuke Endoh + + * test/ruby/test_array.rb: add some tests. + +Thu Oct 30 01:32:15 2008 Yusuke Endoh + + * array.c (rb_ary_splice): remove redundant check. + +Thu Oct 30 01:24:55 2008 Yusuke Endoh + + * string.c (rb_str_cmp): fix condition which always returned true + because ENCODING_GET returns unsigned long. + +Thu Oct 30 01:10:32 2008 Yusuke Endoh + + * test/ruby/test_array.rb (test_permutation): add a test that replaces + array during permutation. + +Wed Oct 29 23:31:34 2008 Yukihiro Matsumoto + + * string.c (rb_str_check_dummy_enc): new function to check dummy + encoding. + + * string.c (rb_str_upcase_bang): case conversion functions should + not be applicable to strings in dummy encoding. [ruby-dev:36985] + +Wed Oct 29 23:57:29 2008 Yusuke Endoh + + * array.c (rb_ary_sort_bang): replacing array during sort broke + invariant of array. [ruby-dev:36983] + +Wed Oct 29 21:06:46 2008 Yukihiro Matsumoto + + * io.c (rb_io_rewind): should reset fptr->readconv if it's + available. + + * io.c (more_char): clear readconv at EOF. + + * test/ruby/test_file.rb: should not read after EOF. use rewind + instead. + +Wed Oct 29 20:45:08 2008 Yusuke Endoh + + * test/webrick/utils.rb (start_server): provide a reference to log of + webrick. + + * test/webrick/test_httpproxy.rb, test/webrick/test_httpauth.rb, + test/webrick/test_cgi.rb, test/webrick/test_httpserver.rb, + test/webrick/test_server.rb, test/webrick/test_filehandler.rb: use + webrick log as an assertion message. + +Wed Oct 29 16:41:17 2008 Nobuyoshi Nakada + + * pack.c (pack_pack): set encoding from packing string and UTF-8 for + "U". [ruby-core:19590] + +Wed Oct 29 15:50:00 2008 TAKANO Mitsuhiro (takano32) + + * complex.c (imp1, imp2): should declare type. + [BUG] at IA-64 + +Wed Oct 29 14:36:50 2008 Nobuyoshi Nakada + + * common.mk (revision.h): have to be updated daily or by non-trivial + commits. + +Wed Oct 29 13:18:02 2008 Akinori MUSHA + + * README, README.ja: Update the portability section. + +Wed Oct 29 13:02:17 2008 Akinori MUSHA + + * configure.in (rb_cv_lib_xpg4_needed): Drop legacy FreeBSD + support regarding libxpg4. Those old versions of FreeBSD + shipped with the library don't have a working pthread library + anyway. + +Wed Oct 29 11:50:57 2008 Nobuyoshi Nakada + + * configure.in (dln-a-out): cannot make shared library nor work with + ELF. [ruby-core:19571] + +Wed Oct 29 11:01:46 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_open): shouldn't seek here. + + * win32/win32.c (rb_w32_write): write to the end of the file when + FAPPEND is specified. + +Wed Oct 29 09:30:04 2008 Nobuyoshi Nakada + + * ruby.c (load_file_internal): cache common interned IDs. + +Wed Oct 29 00:43:39 2008 Tadayoshi Funaba + + * complex.c: uses macro in declarations. + +Wed Oct 29 00:29:46 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_open): need to seek to the end of the file when + O_APPEND is specified. + +Wed Oct 29 00:08:05 2008 Tadayoshi Funaba + + * math.c (rb_math_{atan2,cos,cosh,hypot,log,sin,sinh,sqrt}): added. + + * complex.c: follows the above change. + +Tue Oct 28 23:29:06 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (kanji_convert): output unicode chars. + [ruby-dev:36957] + + * ext/nkf/nkf-utf8/nkf.c (numchar_getc): increase buffer size. + reported and patched at [ruby-dev:36957] by mame. + +Tue Oct 28 23:03:46 2008 Yuki Sonoda (Yugui) + + * test/ruby/test_proc.rb: filled all patterns for testing + vm_yield_setup_args. + +Tue Oct 28 23:05:35 2008 Tadayoshi Funaba + + * complex.c: continues to support canonicalization *unofficially* + for an odd library mathn for the time being (only 1.9.x). + since grand mathn must be very very special library for us. + + * rational.c: ditto. + + * ext/mathn/*/*: follow the above changes. + +Tue Oct 28 21:31:55 2008 Yusuke Endoh + + * parse.y (parser_yylex): check EOF explicitly. + +Tue Oct 28 21:11:58 2008 NAKAMURA Usaku + + * io.c (extract_binmode): new function to extract binmode/textmode + options from hash. + + * io.c (rb_io_extract_modeenc): use above function. + + * io.c (rb_io_s_pipe): recognize binmode/textmode options. + + * io.c (make_readconv): now can specify the size of cbuf. + + * io.c (read_all, appendline, io_getc, rb_io_ungetc): follow above + change. + + * win32/win32.c (rb_w32_pipe_exec): internal fds should be always + binmode. + +Tue Oct 28 17:22:35 2008 Yuki Sonoda (Yugui) + + * tool/make-snapshot.rb: merged back from trunk. + +Tue Oct 28 16:43:05 2008 Yuki Sonoda (Yugui) + + * tool/make-snapshot.rb: had returned wrong sizes for generated + archives. + +Tue Oct 28 12:42:28 2008 Yuki Sonoda (Yugui) + + * tool/make-snapshot.rb (package): did not accept tagnames with the + prefix "previewN" + +Tue Oct 28 12:06:07 2008 Yuki Sonoda (Yugui) + + * test/rubygems/test_gem.rb (@default_dir_re): considers + --program-suffix and prefix configure options. + +Tue Oct 28 11:06:48 2008 Yuki Sonoda (Yugui) + + * version.h: set 1.9.1 into Ruby's version number. + +Tue Oct 28 10:42:50 2008 Yuki Sonoda (Yugui) + + * gem_prelude.rb: considers --program-suffix and prefix configure + options. + + * lib/rubygems/defaults.rb: ditto. + +Tue Oct 28 09:51:48 2008 NAKAMURA Usaku + + * bootstraptest/test_thread.rb: ignore some exceptions. + [ruby-dev:36951] + +Tue Oct 28 09:19:40 2008 NAKAMURA Usaku + + * win32/Makefile.sub (RUNRUBY): now ruby requires something from + gem_prelude, so need to set library path. + +Mon Oct 27 22:29:11 2008 Yuki Sonoda (Yugui) + + * vm_insnhelper.c (vm_yield_setup_args): supports optional parameters. + Fixed [ruby-core:19503]. + + * vm_insnhelper.c (vm_yield_setup_block_args): a new function. extracted + from vm_yield_setup_args. + + * vm_insnhelper.c (vm_yield_setup_block_args_complex): ditto. + + * test/ruby/test_proc.rb: added tests for arguments on a Proc from + Kernel#proc called. + +Mon Oct 27 20:03:05 2008 NAKAMURA Usaku + + * ext/mathn/complex/complex.c: no need to define rb_cComplex because + it's already defined at $(srcdir)/complex.c. + + * ext/mathn/rational/rational.c: no need to define rb_cRational because + it's already defined at $(srcdir)/rational.c. + +Mon Oct 27 15:58:25 2008 Nobuyoshi Nakada + + * ruby.c (load_file): preserves $.. [ruby-dev:36937] + + * io.c (argf_init): initial value of $. should be 0. + see [ruby-dev:36937]. + +Mon Oct 27 15:38:38 2008 Yuki Sonoda (Yugui) + + * test/minitest/test_mini_test.rb + (test_assert_raises_triggered_different): the test failed when a + file path in the backtrace contontains something except [\w\/\.], + e.g. hyphen, Japanese characters or backslash. + + * test/minitest/test_mini_test.rb + (test_assert_raises_triggered_subclass): ditto. + +Mon Oct 27 15:32:08 2008 Yuki Sonoda (Yugui) + + * test/minitest/test_mini_test.rb: fixed that r19958 made + test-all fail when the ruby was built at $(srcdir). + +Mon Oct 27 12:04:58 2008 Yuki Sonoda (Yugui) + + * test/ruby/envutil.rb: reverted the changeset 19948 because it + concealed unexpected behaviours of ruby. + + * test/ruby/test_io.rb: ditto. + +Mon Oct 27 12:02:53 2008 Kazuhiro NISHIYAMA + + * ext/nkf/nkf.c (rb_nkf_convert): should specify type of variable. + +Mon Oct 27 11:34:56 2008 Yuki Sonoda (Yugui) + + * test/minitest/test_mini_test.rb (test_filter_backtrace): + fixed failure on Ruby built at out of $(srcdir). + + * test/minitest/test_mini_test.rb (test_Filter_backtrace_unit_starts): + ditto. + +Mon Oct 27 10:02:47 2008 NAKAMURA Usaku + + * io.c (read_all): the 3rd argument maybe Qnil. + +Mon Oct 27 01:29:55 2008 Yusuke Endoh + + * test/nkf/test_nkf.rb: add a test for [ruby-dev:36909]. + +Mon Oct 27 01:05:48 2008 NARUSE, Yui + + * ext/nkf/nkf.c (rb_nkf_convert): avoid GC. + reported in [ruby-dev:36909] and patched [ruby-dev:36941] by mame. + +Sun Oct 26 21:28:42 2008 Yusuke Endoh + + * test/json/test_json.rb: remove dependency on permutation gem. + +Sun Oct 26 19:18:36 2008 Nobuyoshi Nakada + + * thread.c (blocking_region_{begin,end}): declared as inline. + + * util.c (freedtoa): used only when MULTIPLE_THREADS is not defined. + + * win32/win32.c (rb_w32_pipe): serial is DWORD. + + * ext/etc/etc.c (sGroup): getgrent may not be available. + +Sun Oct 26 18:11:40 2008 Nobuyoshi Nakada + + * ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on + cygwin. + +Sun Oct 26 18:18:39 2008 Nobuyoshi Nakada + + * gem_prelude.rb: disables debug and verbose flags to suppress failure + messages. interpolation does not occur inside single quotes. + +Sun Oct 26 18:42:21 2008 Nobuyoshi Nakada + + * test/ruby/envutil.rb (assert_in_out_err): disables builtin rubygems + to get rid of the interference. + + * test/ruby/test_io.rb (ruby): ditto. + +Sun Oct 26 13:30:28 2008 Nobuyoshi Nakada + + * io.c (read_all): use the given buffer to read when needs readconv. + based on the patch by wanabe at + [ruby-dev:36931]. + +Sun Oct 26 07:57:35 2008 Eric Hodel + + * lib/rubygems*: Update to RubyGems 1.3.1 r1909. + +Sun Oct 26 07:35:56 2008 Ryan Davis + + * lib/minitest/unit.rb: Imported minitest 1.3.0 r4429. + * test/minitest/*: ditto. + +Sun Oct 26 02:16:29 2008 Yuki Sonoda (Yugui) + + * configure.in ($MANTYPE): followed ruby.1, which had moved. + + * instruby.rb (:man): ditto. + + * mdoc2man.rb: fixed for the case Xr with 2 arguments. + +Sun Oct 26 01:42:45 2008 Yuki Sonoda (Yugui) + + * man/irb.1: new manual page. + +Sun Oct 26 00:11:48 2008 Yuki Sonoda (Yugui) + + * man/ruby.1: moved into man/. added some descriptions. + + * man/goruby.1: new file. + + * instruby.rb (:man): followed ruby.1. + +Sat Oct 25 20:05:22 2008 Narihiro Nakamura + + * gc.c (gc_profile_result): bug fix. The millisecond is 1/1000. + +Sat Oct 25 11:12:40 2008 Yuki Sonoda (Yugui) + + * ruby.c (usage): updated the description of -E option. + +Sat Oct 25 09:54:10 2008 James Edward Gray II + + * lib/csv.rb: Fixed a bug in read_to_char() that would slurp + whole files if the encoding was invalid. It will now read + up to 10 bytes ahead to find a valid character boundary or + give up. [ruby-core:19465] + + * test/csv/test_features.rb, test/csv/test_table.rb, test/csv/test_row.rb: + Loosened some tests to check for a compatible? Encoding instead + of an exact Encoding. [ruby-core:19470] + +Sat Oct 25 07:42:49 2008 Eric Hodel + + * lib/rdoc*: Update to RDoc 2.2.2 r192. + +Sat Oct 25 04:00:31 2008 Nobuyoshi Nakada + + * enc/us_ascii.c (us_ascii_mbc_enc_len): made static. a patch by + Tadashi Saito at [ruby-dev:36916] + + * signal.c (signal_buff): made static. a patch by Tadashi Saito + at [ruby-dev:36915] + + * util.c (freedtoa): made static to get rid of name clash. a patch by + Tadashi Saito at [ruby-dev:36913] + + * util.c (ruby_dtoa): added prefix, ditto. + +Sat Oct 25 03:43:25 2008 Nobuyoshi Nakada + + * parse.y (lambda): need to adjust lpar_beg for both of the parser and + ripper. + +Sat Oct 25 01:29:34 2008 Yukihiro Matsumoto + + * ext/mathn/rational/rational.c: undef duplicated macro definition + first to shut up the warning. + + * ext/mathn/rational/rational.c (rb_rational_new_mathn): specify + omitted return value. + +Sat Oct 25 00:14:41 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sample): fixed sizes and randomness. + +Fri Oct 24 23:04:42 2008 Yuki Sonoda (Yugui) + + * configure.in (sitedir): considers --program-prefix and + --program-suffix. + (vendordir): ditto. + (rubyhdrdir): ditto. + + * mkconfig.rb (CONFIG["rubylibdir"]): ditto. + + * win32/Makefile.sub: ditto. + + * instruby.rb (:rdoc): ditto. + + * lib/rdoc/ri/paths.rb (RDoc::RI::Paths): ditto. + +Fri Oct 24 22:59:27 2008 Yusuke Endoh + + * test/ruby/test_array.rb (test_sample): add tests for size of + returned array and randomness. + +Fri Oct 24 21:50:21 2008 Nobuyoshi Nakada + + * id.h, template/id.h.tmpl (enum ruby_method_ids): reordered. + +Fri Oct 24 21:19:45 2008 Keiju Ishitsuka + + * ext/mathn/rational.c: change several global functions. + +Fri Oct 24 21:05:38 2008 Takeyuki FUJIOKA + + * lib/cgi/html.rb: allow symbolized key. + + * test/cgi/test_cgi_tag_helper.rb: add a test. + +Fri Oct 24 20:54:53 2008 Nobuyoshi Nakada + + * common.mk (exts): renamed to get rid of the existent directory. + +Fri Oct 24 20:45:41 2008 Keiju Ishitsuka + + * ext/mathn/rational.c: change several global functions to static + function. + +Fri Oct 24 19:57:19 2008 Yukihiro Matsumoto + + * string.c (rb_str_dump): should have removed commented out + unnecessary code. [ruby-cvs:27131] + +Fri Oct 24 19:16:36 2008 URABE Shyouhei + + * id.h (enum ruby_method_ids): ISO C forbids comma at end of + enumerator list. + +Fri Oct 24 18:29:00 2008 Keiju Ishitsuka + + * lib/mathn.rb: moved into ext/mathn/rational/rational.c and + ext/mathn/complex/complex.c. + * ext/mathn: new mathn ext-libralies. + +Fri Oct 24 18:21:31 2008 Yukihiro Matsumoto + + * test/ruby/test_array.rb (TestArray#test_join): should restore + global variable after the test. [ruby-dev:36896] + + * test/ruby/test_hash.rb (TestHash#test_to_s): ditto. + +Fri Oct 24 17:43:26 2008 Yukihiro Matsumoto + + * parse.y (lambda): need to adjust lpar_beg for ripper as well. + [ruby-dev:36702] + +Fri Oct 24 16:13:12 2008 Takeyuki FUJIOKA + + * lib/cgi/core.rb (read_multipart): change field value as String + from StringIO or Tempfile when multipart parse except file field. + add files method that can get uploaded files. [ruby-dev:36547] + + * test/cgi/test_cgi_multipart.rb: fix the test for core.rb. + +Fri Oct 24 14:22:48 2008 Nobuyoshi Nakada + + * common.mk (ext): split out the target for extension library. + + * common.mk (encs): depends on enc and trans. + +Fri Oct 24 10:23:24 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_signal.rb (TestSignal#test_exit_action): Thread + may terminate before sysread. [ruby-dev:36835] + +Thu Oct 23 22:06:23 2008 Yuki Sonoda (Yugui) + + * distruby.rb: removed. "make dist" uses tool/make-snapshot for the 1.9 + series. distruby.rb has been no longer used. + +Thu Oct 23 17:30:29 2008 Yukihiro Matsumoto + + * class.c (rb_class_instance_methods): rdoc fixed. [ruby-core:19458] + +Thu Oct 23 16:19:33 2008 Yukihiro Matsumoto + + * lib/irb/init.rb (IRB.load_modules): catch LoadError explicitly. + a patch from Daniel Berger in + [ruby-core:19451]. fix [ruby-core:19450] + +Thu Oct 23 16:16:17 2008 Nobuyoshi Nakada + + * ext/socket/socket.c (sock_s_getservbyport): check if the port range. + [ruby-core:19460] + +Thu Oct 23 14:08:07 2008 Nobuyoshi Nakada + + * ext/socket/socket.c (sock_s_getservbyname): unuse unnecessary + object. + + * ext/socket/socket.c (sock_s_getservbyport): the port should be + converted before the proto so that the #to_int of the former cannot + alter the latter. + +Thu Oct 23 10:55:08 2008 Yukihiro Matsumoto + + * string.c (rb_str_dump): use \u{ff} escape for UTF-8 encoding + string. + +Thu Oct 23 09:26:22 2008 NAKAMURA Usaku + + * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of + warning. + +Thu Oct 23 08:06:03 2008 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_getservbyport): port should be + network byte order. a patch from Dave Thomas in [ruby-core:19454]. + +Thu Oct 23 01:26:25 2008 Yukihiro Matsumoto + + * string.c (rb_str_conv_enc_opts): new function to convert with + specifying ecflags and ecopts. + + * ext/zlib/zlib.c (gzfile_newstr): specify ecflags and ecopts for + conversion using above function. + + * ext/zlib/zlib.c (gzfile_newstr): use own rb_econv_t for dummy + encoding to handling stateful encoding (e.g. iso-2022-jp). + [ruby-dev:36857] + + * ext/zlib/zlib.c (gzfile_getc): ditto. + +Thu Oct 23 01:24:49 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (create_tmpsrc): get rid of side effects. + +Thu Oct 23 00:10:01 2008 Koichi Sasada + + * cont.c: separate data structure between rb_fiber_t and + rb_context_t (rb_fiber_t includes rb_context_t). + rb_fiber_t has double linked list of fibers in same threads. + +Wed Oct 22 17:25:17 2008 Yukihiro Matsumoto + + * io.c (pipe_open): remove unnecessary flush before fork. + a patch from Kazuhiro NISHIYAMA + in [ruby-dev:36840]. + +Wed Oct 22 16:27:57 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (vm_yield_setup_args): should not drop arguments + corresponding to default paramters. + +Wed Oct 22 14:59:30 2008 Yukihiro Matsumoto + + * parse.y (f_larglist): should not allow semicolon separated local + variable declarations if formal argument list is not surrounded + by parentheses, mostly because semicolon outside of parentheses + appears to terminate the expression. + +Wed Oct 22 14:52:17 2008 Yukihiro Matsumoto + + * string.c (rb_external_str_new_with_enc): no implicit strlen call. + [ruby-dev:36854] + + * string.c (rb_external_str_new_cstr): new function to create + string from external NUL terminated C string. + + * string.c (rb_locale_str_new_cstr): ditto. + + * ext/readline/readline.c: now use rb_locale_str_new_cstr(). + + * test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block): + deleted key to the block may be a copy of specified key. + + * test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto. + +Wed Oct 22 13:16:47 2008 Yukihiro Matsumoto + + * re.c (unescape_escaped_nonascii): back out the last change on + the function. [ruby-dev:36818] + +Wed Oct 22 07:09:19 2008 Yukihiro Matsumoto + + * ext/zlib/zlib.c (rb_gzreader_ungetc): should be able to unget + Fixnum. + + * ext/stringio/stringio.c (strio_ungetc): should convert unget + string. + + * ext/stringio/stringio.c (strio_ungetbyte): new method. + +Wed Oct 22 05:46:25 2008 Koichi Sasada + + * include/ruby/vm.h: write a comment. + + * common.mk: remove vm.h from any rules. + vm.h is not needed on this version. + + * vm_core.h: ditto. + +Wed Oct 22 05:39:39 2008 Koichi Sasada + + * parse.y (arg_concat_gen): concat target node should be NODE_ARRAY. + [ruby-core:19413] + + * bootstraptest/test_method.rb: add tests. + +Wed Oct 22 00:29:13 2008 Masatoshi SEKI + + * test/rinda/test_rinda.rb (test_core_03_notify): Fixed test failures + [ruby-dev:36837]. + +Wed Oct 22 00:22:06 2008 Yukihiro Matsumoto + + * string.c (rb_external_str_new_with_enc): wrong condition to + calculate strlen(). + + * ext/readline/readline.c: add encoding support. + +Tue Oct 21 23:12:24 2008 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_write): should convert writing + string to the encoding of the buffer. + + * hash.c (rb_any_hash): typo fixed. + + * ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion + need to be done by to_s. + +Tue Oct 21 22:38:58 2008 Yukihiro Matsumoto + + * io.c (open_key_args): should adjust argc, argv in struct + foreach_arg. + +Tue Oct 21 21:52:00 2008 Yukihiro Matsumoto + + * ext/zlib/zlib.c (rb_gzwriter_write): conversion should be done + using to_str, not to_s. + + * ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion + according to gz encoding. + + * ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding + before unget. + +Tue Oct 21 21:33:36 2008 Nobuyoshi Nakada + + * lib/test/unit.rb (assert_nothing_raised): raise with backtrace. + +Tue Oct 21 20:12:19 2008 Tanaka Akira + + * lib/test/unit.rb (assert_nothing_raised): set backtrace. + +Tue Oct 21 18:17:42 2008 Yukihiro Matsumoto + + * ext/zlib/zlib.c: remove obsolete prototype macros. + + * ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile + structure. + + * ext/zlib/zlib.c (rb_gzreader_getc): now works on characters. + + * ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve + single byte. + + * ext/zlib/zlib.c (rb_gzreader_readbyte): ditto. + + * ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char + + * ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings. + + * ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc. + +Tue Oct 21 13:28:42 2008 Shugo Maeda + + * io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed. + + * ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode() + instead of rb_io_binmode(). + +Tue Oct 21 13:17:39 2008 Yuki Sonoda (Yugui) + + * mdoc2man.rb: moved into tools/. + + * instruby.rb: followed the change of mdoc2man. + +Tue Oct 21 11:34:04 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (strip_glibc_option, map_charset): check if + encoding is a string. based on the patch by Hiroshi Moriyama at + [ruby-dev:36811]. + + * test/iconv/test_basic.rb (test_invalid_arguments): added tests. + +Tue Oct 21 10:40:37 2008 Nobuyoshi Nakada + + * io.c (rb_file_open_internal): should initialize fmode before using. + +Tue Oct 21 08:56:37 2008 Nobuyoshi Nakada + + * regparse.c (parse_char_class): CCV_SB is only for single + byte. [ruby-dev:36786] + +Tue Oct 21 01:49:55 2008 Yukihiro Matsumoto + + * io.c (rb_io_extract_modeenc): plain rb/wb should set ASCII-8BIT + to the external_encoding. + + * io.c (rb_file_open_internal): ditto. + + * io.c (NEED_WRITECONV): no conversion when the external_encoding + is ASCII-8BIT. + + * io.c (do_writeconv): skip ASCII-8BIT. + +Tue Oct 21 00:51:59 2008 Tanaka Akira + + * io.c (rb_io_ascii8bit_binmode): renamed from rb_io_binmode. + (rb_io_binmode): don't change encoding conversion. + (rb_io_binmode_m): call rb_io_ascii8bit_binmode. + +Mon Oct 20 21:19:00 2008 Takeyuki FUJIOKA + + * lib/cgi/core.rb (read_multipart): file's encoding is ascii-8bit + from file field of multipart form. + +Mon Oct 20 20:16:25 2008 Yukihiro Matsumoto + + * ext/zlib/zlib.c (Init_zlib): add getbyte as an alias to getc. + [ruby-dev:36801] + +Mon Oct 20 17:31:17 2008 Yukihiro Matsumoto + + * error.c (exc_equal): should not compare recursively. + [ruby-dev:36796] + +Mon Oct 20 16:48:43 2008 Yukihiro Matsumoto + + * include/ruby/ruby.h (ExportStringValue): new macro to convert + string in internal encoding to external to export. + + * string.c (rb_str_export): new function to do conversion to + external encoding. + + * ext/sdbm/init.c: encoding conversion support. + + * ext/dbm/dbm.c: ditto. + +Mon Oct 20 15:42:02 2008 Yukihiro Matsumoto + + * string.c (rb_locale_str_new): new function to convert string + from locale to internal encoding. + +Mon Oct 20 09:47:13 2008 Tanaka Akira + + * test/runner.rb: search srcdir/test/arg at first to find test/ruby + directory when "ruby" is specified. + +Mon Oct 20 08:20:01 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: support Encoding.default_internal. + + * ext/tk/tcltklib.c: ditto. + + * ext/tk/extconf.rb: improve the strategy for searching Tcl/Tk headers. + +Mon Oct 20 00:57:04 2008 Tanaka Akira + + * lib/test/unit.rb (Test::Unit.setup_argv): call given block for + filtering files. + + * test/runner.rb: search srcdir/test/arg, srcdir/arg. + + * bin/testrb: show usage if no files given. + +Sun Oct 19 21:19:16 2008 Nobuyoshi Nakada + + * common.mk (srcs): removed ID_H_TARGET. + + * tool/generic_erb.rb: always overwrites if no if-change option. + sends the result to stdout if no output option. + + * template/id.h.tmpl: shows which token differs. + +Sun Oct 19 18:15:15 2008 Martin Duerst + + * enc/trans/single_byte.trans: adding WINDOWS-wwww encodings + (wwww = 874/1250/1251/1253/1254/1255/1256/1257) + (contributed by Yoshihiro Kambayashi) + + * enc/trans/windows-wwww-tbl.rb: 8 new files + (contributed by Yoshihiro Kambayashi) + + * test/ruby/test_transcode.rb: added test_windows_wwww + (contributed by Yoshihiro Kambayashi) + +Sun Oct 19 07:37:13 2008 Tadayoshi Funaba + + * lib/cmath.rb (log2,cbrt,frexp,ldexp,hypot,erf,erfc,gamma,lgamma): + should be also provided as module function. [ruby-dev:36787] + +Sun Oct 19 07:25:08 2008 Yuki Sonoda (Yugui) + + * keywords, lex.c.src, opt_insn_unif.def, opt_operand.def: moved rarely changed + input files for code generators into defs/ directory. + + * Makefile.in (lex.c): followed keywords and lex.c.src. + + * common.mk (parser.o): followed keywords. + (INSNS): followed opt_*.def + + * tools/instruction.rb: followed opt_*.def. + +Sun Oct 19 12:28:01 2008 James Edward Gray II + + * test/csv/*: Renamed tc_* files to test_* to fit in within Ruby's + testing process. + +Sun Oct 19 00:15:03 2008 Tanaka Akira + + * lib/test/unit.rb (assert_nothing_thrown): don't intern. + +Sat Oct 18 14:40:32 2008 Yukihiro Matsumoto + + * numeric.c (num_sadded): remove newly defined singleton method + that should not exist after exception handling. [ruby-dev:36569] + +Sat Oct 18 14:27:49 2008 Yukihiro Matsumoto + + * parse.y (opt_block_arg): allow trailing comma after usual + arguments. not after block argument. + +Sat Oct 18 13:30:53 2008 Yukihiro Matsumoto + + * string.c (rb_external_str_new): a new function to convert from + external encoding to internal encoding. if something went + wrong, it returns a string with the external encoding. + + * string.c (rb_external_str_new_with_enc): same as above besides + you can specify the source encoding. + + * ruby.c (ruby_set_argv): use rb_external_str_new() + + * ruby.c (set_arg0, ruby_script): ditto. + +Sat Oct 18 04:08:18 2008 Yukihiro Matsumoto + + * lib/tempfile.rb (Tempfile#initialize): now Tempfile.new takes + keyword arguments to open(). [ruby-dev:36756] + +Sat Oct 18 17:10:10 2008 Martin Duerst + + * tool/transcode-tblgen.rb: added set_valid_byte_pattern + to reduce coupling between table generation script and + specific encodings. + + * enc/trans/single_byte.trans: using set_valid_byte_pattern + +Sat Oct 18 16:39:39 2008 Martin Duerst + + * transcode.c: in transcode_search_path, eliminated a warning + on cygwin about pathlen potentially not being initialized + +Sat Oct 18 13:40:27 2008 Tanaka Akira + + * lib/test/unit.rb (assert_nothing_thrown): implemented. + +Sat Oct 18 01:33:22 2008 WATANABE Hirofumi + + * common.mk: use added options for generic_erb.rb. + +Sat Oct 18 00:47:51 2008 wanabe + + * array.c: don't recycle shared-array while sort!. + +Fri Oct 17 22:04:38 2008 wanabe + + * array.c: recycle shared-array when it isn't referenced. + +Fri Oct 17 20:29:26 2008 Yukihiro Matsumoto + + * re.c (rb_reg_initialize_m): specify ARG_ENCODING_NONE instead of + ARG_ENCODING_FIXED for Regexp.new("", nil, "n"). [ruby-dev:36761] + + * test/ruby/test_regexp.rb (TestRegexp#test_initialize): test + updated. + +Fri Oct 17 19:46:20 2008 Nobuyoshi Nakada + + * tool/ifchange, win32/ifchange.bat: --timestamp option added. + + * tool/generic_erb.rb: --timestamp, --output and --if-change options + added. + +Fri Oct 17 18:33:12 2008 Yuki Sonoda (Yugui) + + * array.c (ary_resize_capa): renamed RESIZE_CAPA. + +Fri Oct 17 18:16:51 2008 Yukihiro Matsumoto + + * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_sqrt_bigdecimal): + test updated. a patch from TAKANO Mitsuhiro in + [ruby-dev:36736]. + +Fri Oct 17 18:14:57 2008 Nobuyoshi Nakada + + * configure.in (uncommon.mk): ignores failures at loading. + + * test/rubygems/gemutilities.rb (RubyGemTestCase#build_rake_in): + get rid of interference with other tests. + +Fri Oct 17 18:06:39 2008 Yukihiro Matsumoto + + * transcode.c (str_transcode0): String#encode without argument now + behave as if :undef => :replace, :invalid => :replace specified. + + * transcode.c (rb_econv_prepare_opts): should preserve options in + any case. + +Fri Oct 17 11:48:18 2008 Shugo Maeda + + * ext/socket/socket.c (init_sock): sockets should be binmode. + + * test/socket/test_tcp.rb (test_encoding): ditto. + +Fri Oct 17 10:26:13 2008 NAKAMURA Usaku + + * tool/insns2vm.rb: remove -Kn option in shebang line because it's + inconsistent with -Ks commandline option in common.mk. + +Fri Oct 17 01:26:09 2008 Tanaka Akira + + * transcode.c (transcode_restartable0): in_pos and out_pos never be + NULL, now. + +Fri Oct 17 00:39:19 2008 Yusuke Endoh + + * lib/test/unit.rb: sort the order of executing tests. + +Fri Oct 17 00:24:15 2008 Tanaka Akira + + * io.c (rb_io_binmode): reset encoding conversion. + +Fri Oct 17 00:16:08 2008 Yusuke Endoh + + * io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending): + remove deprecated functions which do not work. [ruby-dev:36697] + +Thu Oct 16 23:48:34 2008 Tanaka Akira + + * common.mk (TESTS): removed to re-enable test for minitest. + +Thu Oct 16 23:37:11 2008 Yusuke Endoh + + * compile.c (iseq_set_sequence): fix memory leak. + +Thu Oct 16 23:27:27 2008 Tanaka Akira + + * lib/test/unit.rb (assert_equal): avoid incompatible character + encodings error. + +Thu Oct 16 23:23:27 2008 Tanaka Akira + + * lib/test/unit.rb (assert_equal): failure message changed. + +Thu Oct 16 22:52:54 2008 Tanaka Akira + + * lib/test/unit: removed test/unit. + + * lib/test/unit.rb: new compatibility layer using minitest. + + * bin/testrb: use above. + + * test/runner.rb: ditto. + +Thu Oct 16 14:34:16 2008 Nobuyoshi Nakada + + * common.mk, enc/depend (enc, trans): targets for sources. + +Thu Oct 16 14:30:30 2008 Nobuyoshi Nakada + + * instruby.rb (lib): installs all files other than README etc. + +Thu Oct 16 09:48:03 2008 Yukihiro Matsumoto + + * re.c (rb_reg_initialize_m): changed the message to clarify the + third option argument is now ignored. [ruby-dev:36753] + +Thu Oct 16 08:14:39 2008 Yukihiro Matsumoto + + * ruby.c (proc_options): no warning when default_external already + set by -E. + + * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt): + put -K after -E to set script encoding. + +Thu Oct 16 06:20:36 2008 Yukihiro Matsumoto + + * test/ruby/test_transcode.rb (TestTranscode#test_errors): + String#encode now works without any argument. [ruby-dev:36740] + +Wed Oct 15 23:48:22 2008 Yukihiro Matsumoto + + * .gdbinit (rp): REGEXP handling fixed. + + * string.c (rb_str_rindex_m): need not to call rb_enc_check on + regexp. + + * re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for + broken strings. + +Wed Oct 15 23:11:10 2008 Yukihiro Matsumoto + + * lib/delegate.rb (DelegateClass): restored 1.8 behavior for + DelegateClass as well. [ruby-dev:36739] + +Wed Oct 15 22:19:14 2008 NAKAMURA Usaku + + * array.c (RESIZE_CAPA): check whether len is longer than capacity. + + * array.c (rb_ary_compact_bang): resize ary before changing capacity. + fixed [ruby-dev:36704] + +Wed Oct 15 16:57:30 2008 NAKAMURA Usaku + + * version.h (RUBY_DESCRIPTION): remove unnecessary space. + +Tue Oct 14 23:18:15 2008 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator): simplified and restored 1.8 + behavior. [ruby-dev:35986] + +Tue Oct 14 21:50:40 2008 Nobuyoshi Nakada + + * common.mk (TESTS): skips minitest by default, since it interferes + with test/unit. + +Tue Oct 14 21:36:29 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (load_conv_function51932): check + having IMultiLanguage2 or IMultiLanguage. [ruby-dev:36716] + + * ext/win32ole/extconf.rb: ditto. + +Tue Oct 14 20:45:29 2008 Nobuyoshi Nakada + + * io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698] + + * variable.c (*_getter, *_setter, *_marker): made public. + + * include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared. + +Tue Oct 14 20:32:09 2008 Tanaka Akira + + * enc/trans/single_byte.trans (transcode_tblgen_singlebyte): renamed + from transcode_tblgen_windows. + (transcode_tblgen_iso8859): use transcode_tblgen_singlebyte. + +Tue Oct 14 19:32:14 2008 Yukihiro Matsumoto + + * ruby.c (process_options): -U should be allowed in RUBYOPT + environment variable. [ruby-dev:36720] + +Tue Oct 14 14:11:17 2008 Nobuyoshi Nakada + + * ruby.c (proc_options): -U can be followed by other options. + +Tue Oct 14 13:30:30 2008 Martin Duerst + + * enc/trans/single_byte.trans: added windows-1252 + + * enc/trans/windows-1252-tbl.rb: new file + (contributed by Yoshihiro Kambayashi) + + * tool/transcode-tblgen.rb: listed windows-1252 as '1byte' + + * test/ruby/test_transcode.rb: added test_windows_1252 + (contributed by Yoshihiro Kambayashi) + +Tue Oct 14 12:22:32 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_variable.rb (TestVariable#test_variable): add + a test of [ruby-dev:36698]. + +Tue Oct 14 11:14:29 2008 Yukihiro Matsumoto + + * transcode.c (str_transcode0): should not raise error when + default_internal is not set. [ruby-core:19309] + +Tue Oct 14 11:14:26 2008 Kazuhiro NISHIYAMA + + * lib/net/pop.rb: check for invalid APOP timestamp. (CVE-2007-1558) + [ruby-dev:36631] + + * test/net/pop/test_pop.rb: ditto. + +Tue Oct 14 09:39:32 2008 Yukihiro Matsumoto + + * ruby.c (set_internal_encoding_once): check double contradicted + specification of the encoding from command line. + + * ruby.c (set_external_encoding_once): ditto. + +Tue Oct 14 08:28:31 2008 Yukihiro Matsumoto + + * parse.y (parser_yylex): allow reserved word to be keyword argument. + +Mon Oct 13 19:07:52 2008 NARUSE, Yui + + * parse.y (token_info_pop): show source filename. [ruby-dev:36710] + +Mon Oct 13 08:59:08 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (load_conv_function51932): support + CP51932 on cygwin and mingw32. thanks to arton. + + * test/win32ole/test_win32ole.rb (test_cp51932): ditto. + +Mon Oct 13 07:54:00 2008 Yukihiro Matsumoto + + * ruby.c (proc_options): add -U command line option to specify + utf-8 as default_internal. + +Mon Oct 13 07:42:57 2008 Yukihiro Matsumoto + + * transcode.c (str_transcode0): String#encode() with no encoding + specified transcode the string into Encoding.default_internal. + inspired by [ruby-core:19298]. + +Sun Oct 12 18:00:18 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (set_ole_codepage, ole_cp2encoding, + ole_wc2mb, ole_vstr2wc, ole_mb2wc): support CP51932 (only mswin32). + + * test/win32ole/test_win32ole.rb: ditto. + +Sun Oct 12 12:03:38 2008 Koichi Sasada + + * vm.c, vm_insnhelper.h (ruby_vm_redefined_flag): apply optimization + patch proposed by Paul Brannan. [ruby-core:19171] + +Sun Oct 12 09:46:36 2008 Nobuyoshi Nakada + + * strftime.c (rb_strftime): suppressed warnings on cygwin. + +Sat Oct 11 19:49:35 2008 Nobuyoshi Nakada + + * parse.y (parser_prepare): use utf-8 encoding directly. + +Sat Oct 11 10:20:17 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (CLEANINGS): uses escaped form tabs to preventing the + confusion. [ruby-talk:317345] + +Sat Oct 11 08:51:13 2008 Nobuyoshi Nakada + + * lib/rake.rb (Rake::Application#standard_exception_handling): removed + unnecessary SystemExit, and exits with false instead of system + dependent value. [ruby-talk:317330] + +Sat Oct 11 03:54:05 2008 Koichi Sasada + + * parse.y: optimize 'for' statement when one variable given. + + * benchmark/bm_loop_for.rb: added. + + * benchmark/bm_loop_times.rb: modified. + +Sat Oct 11 12:09:05 2008 James Edward Gray II + + * lib/csv/csv.rb: Added support for Encoding::default_internal. + * lib/csv/csv.rb: Switched to new Hash syntax. + +Fri Oct 10 22:16:55 2008 Nobuyoshi Nakada + + * parse.y (comment_at_top): needed for ripper too. + +Fri Oct 10 22:07:05 2008 Nobuyoshi Nakada + + * include/ruby.h: updated macros for headers. [ruby-core:19275] + +Fri Oct 10 19:21:50 2008 Nobuyoshi Nakada + + * parse.y (magic_comment_encoding): warns when ignored. + + * parse.y (parser_magic_comment): replaces '-' with '_'. + + * parse.y (parser_yylex): allows magic comments indented and the + second line or later. + +Fri Oct 10 17:26:50 2008 NARUSE, Yui + + * ext/json/ext/parser/parser.c (JSON_parse_string): + associate encoding. + +Fri Oct 10 10:18:21 2008 Ryan Davis + + * lib/test/*: reverted back to test/unit. + * test/test/*: ditto + * lib/minitest/*: Imported minitest 1.3.0 r4333. + +Fri Oct 10 03:41:31 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): check if codepoint for %c is valid. + [ruby-dev:36691] + +Fri Oct 10 01:55:48 2008 Nobuyoshi Nakada + + * encoding.c (enc_names): minor improvement. + +Fri Oct 10 00:21:39 2008 Nobuyoshi Nakada + + * lib/optparse.rb (ParseError.filter_backtrace): removes internal + backtrace. + +Fri Oct 10 00:11:16 2008 Yusuke Endoh + + * transcode.c (rb_econv_add_converter): remove unnecessary NULL check. + +Thu Oct 9 23:53:23 2008 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-c-mode): buffer may not have file + name. + +Thu Oct 9 23:30:47 2008 Yusuke Endoh + + * process.c (run_exec_dup2): fix resource leak. + +Thu Oct 9 23:19:02 2008 Yusuke Endoh + + * process.c (rb_run_exec_options): fix resource leak. + +Thu Oct 9 22:13:58 2008 Yusuke Endoh + + * test/ruby/test_module.rb (test_remove_class_variable): add a test + for Class#remove_class_variable. + + * test/ruby/test_object.rb (test_remove_instance_variable): add a test + for Object#remove_instance_variable. + +Thu Oct 9 22:04:38 2008 Yusuke Endoh + + * variable.c (rb_mod_remove_cvar): fix r19711. + +Thu Oct 9 21:17:50 2008 Yusuke Endoh + + * ext/syck/syck.c (syck_lookup_sym): remove reading uninitialized + variable. + +Thu Oct 9 16:34:15 2008 NARUSE, Yui + + * ext/json/ext/generator/extconf.rb: fix target. + + * ext/json/ext/parser/extconf.rb: ditto. + +Thu Oct 9 14:37:59 2008 Yuki Sonoda (Yugui) + + * include/ruby/ruby.h: embeds the elements of an array into its + struct RArray for # of elements <= 3. + + * array.c: ditto. + + * gc.c (gc_mark_children): following the change of struct RArray. + + * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. + + * parse.y (coverage): ditto. + + * proc.c (curry): ditto. + + * .gdbinit: ditto. + +Thu Oct 9 11:29:33 2008 NARUSE, Yui + + * encoding.c (Init_Encoding): new instance method Encoding#names, + returns its name and alias names. + + * encoding.c (enc_names): defined for Encoding#names. + + * encoding.c (enc_names_i): defined for enc_names. + +Thu Oct 9 08:47:38 2008 Yukihiro Matsumoto + + * thread.c (rb_thread_wait_fd_rw): should not block by select if + there's only one thread living. fixed [ruby-dev:36646]. + +Wed Oct 8 20:59:52 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage + according to Encoding.default_internal and + Encoding.default_external. + +Wed Oct 8 17:02:21 2008 NARUSE, Yui + + * ext/json/lib/json/pure/generator.rb (utf8_to_json): + process each unpacked Unicode character. + +Wed Oct 8 15:00:22 2008 NARUSE, Yui + + * ext/json/lib/json/pure/parser.rb + (JSON::Pure::Parser#parse_string): force_encoding("UTF-8"). + +Wed Oct 8 11:56:15 2008 NARUSE, Yui + + * lib/test/unit/assertions.rb: assert_nothing_thrown, + assert_raise, assert_not_equal, assert_no_match, assert_not_nil, + assert_not_same are coming back as alias. + +Wed Oct 8 11:18:12 2008 Nobuyoshi Nakada + + * variable.c (autoload_delete, autoload_file): should not delete + autoload table, since it may be shared with duplicated modules. + [ruby-core:19181] + +Wed Oct 8 02:38:28 2008 Yukihiro Matsumoto + + * encoding.c (rb_default_internal_encoding): merged a patch from + Michael Selig in [ruby-core:18985]. + + * io.c (rb_io_ext_int_to_encs): ditto. + + * ruby.c (proc_options): support default internal encoding in -E + option. + +Wed Oct 8 00:03:39 2008 Tadayoshi Funaba + + * lib/date.rb (today,now): should produce own instances. + [ruby-talk:317020] + +Tue Oct 7 16:43:51 2008 NARUSE, Yui + + * ext/json/lib/json/pure/generator.rb (utf8_to_json): + force_encoding before gsub. + +Tue Oct 7 16:35:41 2008 NARUSE, Yui + + * ext/json/lib/json/pure/generator.rb (utf8_to_json): + downcase the result of Unicode escape. + +Mon Oct 6 16:44:52 2008 Takeyuki FUJIOKA + + * lib/cgi/core.rb (CGI::QueryExtension::initialize_query): fix the + condition. + + * test/cgi/test_cgi_core.rb: bug fix encoding. + thanks to TAKANO Mitsuhiro . + + * test/cgi/test_cgi_multipart.rb: temporary comment in. + +Mon Oct 6 15:22:08 2008 Nobuyoshi Nakada + + * gc.c (gc_mark_children): ignores T_ZOMBIE. + +Mon Oct 6 12:45:20 2008 Yukihiro Matsumoto + + * test/ruby/test_module.rb (TestModule#_wrap_assertion): add + definition. is this really needed? + + * test/ruby/test_module.rb (TestModule#test_mod_constants): should + not depend on global Module constants. + +Mon Oct 6 12:38:36 2008 Yukihiro Matsumoto + + * lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised): + should take optional message argument. + +Mon Oct 6 12:18:23 2008 Yukihiro Matsumoto + + * string.c (rb_str_comparable): string comparison should be + transitive. [ruby-dev:36484] + + * test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_eq): test + updated. + +Mon Oct 6 09:00:58 2008 Yukihiro Matsumoto + + * test/bigdecimal/test_bigdecimal.rb (test_sqrt_bigdecimal): test + updated. a patch from TAKANO Mitsuhiro + in [ruby-dev:36669]. + +Sun Oct 5 23:34:28 2008 Nobuyoshi Nakada + + * lib/mkmf.rb ($config_h): now always defines for old libraries. + +Sun Oct 5 23:06:55 2008 Nobuyoshi Nakada + + * vm_method.c (rb_mod_modfunc): method undefined in included module + may not have nd_body. [ruby-core:18738] + +Sun Oct 5 21:28:58 2008 Tadayoshi Funaba + + * lib/rational.rb: resolved conflicts of aliases. + + * lib/mathn.rb: avoided some warnings. + +Sun Oct 5 18:51:50 2008 Tanaka Akira + + * lib/open-uri.rb: remove debug code introduced by previous change. + +Sun Oct 5 17:49:35 2008 NARUSE, Yui + + * lib/open-uri.rb (OpenURI.open_uri): set encoding to strio. + +Sun Oct 5 17:39:21 2008 NARUSE, Yui + + * ext/stringio/stringio.c (strio_set_encoding): defined for + StringIO#set_encoding. + +Sun Oct 5 11:24:42 2008 NARUSE, Yui + + * eval.c: come back definition of environ. + +Sun Oct 5 09:19:49 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/utf8tbl.c: update table. + +Sat Oct 4 22:50:14 2008 Yuki Sonoda (Yugui) + + * dln.c: Ruby no longer supports VMS. + + * error.c: ditto. + + * eval.c: ditto. + + * eval_intern.h: ditto. + + * include/ruby/defines.h: ditto. + + * include/ruby/ruby.h: ditto. + + * io.c: ditto. + + * process.c: ditto. + + * ruby.c: ditto. + + * vms/config.h: removed. + + * vms/vms.h: ditto. + + * vms/vmsruby_private.c: ditto. + + * vms/vmsruby_private.h: ditto. + +Sat Oct 4 22:44:23 2008 Yuki Sonoda (Yugui) + + * dln.c: Ruby no longer supports Windows CE. + + * eval.c: ditto. + + * include/ruby/defines.h: ditto. + + * include/ruby/win32.h: ditto. + + * ruby.c: ditto. + + * strftime.c: ditto. + + * win32/Makefile.sub: ditto. + + * win32/win32.c: ditto. + + * ext/tk/extconf.rb: ditto. + + * lib/fileutils.rb: ditto. + + * test/fileutils/test_fileutils.rb: ditto. + + * wince/*: removed. + +Sat Oct 4 22:35:06 2008 Yuki Sonoda (Yugui) + + * dln.c: Ruby no longer supports MacOS 9 or before. + + * eval.c: ditto. + + * eval_intern.h: ditto. + + * ext/extmk.rb: ditto. + + * ext/tk/sample/tkextlib/treectrl/demo.rb: ditto. + + * ext/tk/stubs.c: ditto. + + * file.c: ditto. + + * hash.c: ditto. + + * include/ruby/defines.h: ditto. + + * ruby.c: ditto. + + * signal.c: ditto. + + * vm_core.h: ditto. + +Sat Oct 4 22:30:28 2008 Yuki Sonoda (Yugui) + + * dln.c: Ruby no longer supports MS-DOS. + + * ext/sdbm/_sdbm.c: ditto. + + * ext/sdbm/sdbm.h: ditto. + + * gc.c: ditto. + + * hash.c: ditto. + + * include/ruby/defines.h: ditto. + + * include/ruby/util.h: ditto. + + * io.c: ditto. + + * process.c: ditto. + + * ruby.c: ditto. + + * strftime.c: ditto. + + * util.c: ditto. + +Sat Oct 4 22:14:15 2008 Yuki Sonoda (Yugui) + + * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp. + + * djgpp/README.djgpp: ditto. + + * djgpp/config.hin: ditto. + + * djgpp/config.sed: ditto. + + * djgpp/configure.bat: ditto. + + * djgpp/mkver.sed: ditto. + + * ext/Setup.dj: ditto. + + * dln.c: removed djgpp supports. + + * file.c: ditto. + + * gc.c: ditto. + + * io.c: ditto. + + * process.c: ditto. + + * ruby.c: ditto. + + * signal.c: ditto. + + * util.c: ditto. + + * vm_core.h: ditto. + + * lib/fileutils.rb: ditto. + + * lib/mkmf.rb: ditto. + + * ext/socket/socket.c: ditto. + + * test/fileutils/test_fileutils.rb: ditto. + + * test/ruby/test_env.rb: ditto. + + * test/ruby/test_path.rb: ditto. + +Sat Oct 4 21:59:39 2008 Yuki Sonoda (Yugui) + + * x68/_dtos18.c: removed. Ruby no longer supports human68k. + + * x68/_round.c: ditto. + + * x68/fconvert.c: ditto. + + * x68/select.c: ditto. + + * ext/Setup.x68: ditto. + + * missing/x68.c: ditto. + + * dln.c (dln_find_exe_r): removed human68k supports. + (dln_find_1): ditto. + + * lib/mkmf.rb: ditto. + + * ext/extmk.rb (Init_ext): ditto. + + * ext/socket/socket.c (init_sock): ditto. + + * gc.c (GC_MALLOC_LIMIT): ditto. + (rb_setjmp, rb_jmpbuf): ditto. + (mark_current_machine_context): ditto. + + * include/ruby/defines.h (PATH_ENV): ditto. + + * io.c: ditto. + + * process.c: ditto. + + * ruby.c: ditto. + + * test/ruby/test_env.rb: ditto. + + * test/ruby/test_path.rb: ditto. + + * LEGAL + +Sat Oct 4 19:02:36 2008 Tadayoshi Funaba + + * lib/date/format.rb: no need to require the "lib/rational.rb". + +Sat Oct 4 19:02:59 2008 NARUSE, Yui + + * ext/nkf/nkf.c (rb_nkf_enc_get): don't replicate encoding. + [ruby-dev:36575] + +Sat Oct 4 18:47:22 2008 NARUSE, Yui + + * ext/stringio/stringio.c (strio_external_encoding): defined. + + * ext/stringio/stringio.c (strio_internal_encoding): defined. + + * ext/stringio/stringio.c (Init_stringio): define above. + +Sat Oct 4 15:52:17 2008 Yuki Sonoda (Yugui) + + * test/mini/test_mini_test.rb: recovered. + It had been temporarily removed at r19645. + + * test/mini/test_mini_mock.rb: ditto. + + * test/mini/test_mini_spec.rb: ditto. + + * lib/test/**/*: replaced by miniunit. + miniunit had been temporarily reverted at r19643 but + now recovered. + +Sat Oct 4 15:33:26 2008 Yuki Sonoda (Yugui) + + * common.mk (gdb-ruby): new target. it runs ruby under controlled by + gdb. + + * common.mk (dist): accepts RELNAME variable as the second argument of + make-snapshot.rb. + +Sat Oct 4 12:17:46 2008 Keiju Ishitsuka + + * lib/irb/irb/ext/save-history.rb: change load_history using File.expand_path. see [ruby-dev:36660]. Thanks Kouhei Sutou. + * lib/irb/irb/context.rb: convert string Symbol of instance variable names in IRB:Context#inspect. + +Fri Oct 3 22:43:04 2008 Yuki Sonoda (Yugui) + + * ext/dl/extconf.rb ($distcleanfiles): added callback-?.c into + the distclean list. + +Fri Oct 3 19:33:21 2008 NARUSE, Yui + + * ext/json/lib/json/pure.rb (module JSON): remove Iconv dependency. + + * ext/json/lib/json/pure/generator.rb (utf8_to_json): process as + binary and remove Iconv dependency. + + * ext/json/lib/json/pure/parser.rb (parse_string): ditto. + +Fri Oct 3 14:04:05 2008 NAKAMURA Usaku + + * win32/{configure.bat,setup.mak,Makefile.sub): add --program-prefix + configure option support. + +Thu Oct 2 21:22:43 2008 Takeyuki FUJIOKA + + * lib/cgi/core.rb (CGI::QueryExtension): delete MorphingBody + and replace like as 1.8's in multipart reading. + see [ruby-dev:36443], + reference from CGIAlt http://cgialt.rubyforge.org/ + + * test/cgi/test_cgi_multipart.rb : fixed multipart test. + +Thu Oct 2 20:46:17 2008 Tanaka Akira + + * string.c (rb_str_sub_bang): fix coderange. + +Wed Oct 1 22:54:09 2008 Yusuke Endoh + + * lib/rexml/parsers/lightparser.rb, lib/debug.rb: remove unused when + clauses. + +Wed Oct 1 22:43:59 2008 Yusuke Endoh + + * lib/xmlrpc, lib/rexml, test/ruby/test_array.rb, + test/ruby/test_unicode_escape.rb, test/scanf/test_scanf.rb, + test/rss/rss-assertions.rb: fix indentation to remove warning. + +Wed Oct 1 21:36:35 2008 Nobuyoshi Nakada + + * gc.c (rb_gc_call_finalizer_at_exit): finalize deferred IO and Data. + + * gc.c (rb_gc_call_finalizer_at_exit): defers IO finalization. + [ruby-dev:36646] + +Wed Oct 1 19:11:48 2008 Nobuyoshi Nakada + + * marshal.c (marshal_dump): fixed for check_dump_arg. + + * marshal.c (marshal_dump): initializes dump_arg before any funcall. + [ruby-dev:36648] + +Wed Oct 1 00:54:32 2008 Yukihiro Matsumoto + + * string.c (rb_str_split_m): should use rb_str_subseq() which use + offset and length by bytes. [ruby-dev:36641] + +Wed Oct 1 00:29:48 2008 Yusuke Endoh + + * test/ruby/test_settracefunc.rb (test_call, test_class): line number + was changed at r19592. + +Wed Oct 1 00:20:38 2008 Tanaka Akira + + * process.c (check_exec_redirect): don't depend on rb_stdout and + rb_stderr. + +Tue Sep 30 23:06:58 2008 Yuki Sonoda (Yugui) + + * test/mini/test_mini_test.rb: removed. + Temporarily removed the tests for miniunit because of + they depend on the miniunit version of test/unit, + where test/unit was temporarily reverted to the state + before importing miniunit. + + * test/mini/test_mini_mock.rb: ditto. + + * test/mini/test_mini_spec.rb: ditto. + +Tue Sep 30 23:04:30 2008 Yuki Sonoda (Yugui) + + * lib/test/**/*: recovered. + Temporarily reverts the changes of lib/test/unit/* in + r19502 and r19501, in order to release 1.9.0-5. + +Tue Sep 30 23:00:05 2008 Yuki Sonoda (Yugui) + + * lib/test/unit.rb: removed. + Temporarily reverts the changes of lib/test/unit/* in + r19543, r19534 and r19503, in order to release 1.9.0-5. + + * lib/test/unit/assertions.rb: ditto. + + * lib/test/unit/deprecate.rb: ditto. + + * lib/test/unit/error.rb: ditto. + + * lib/test/unit/testcase.rb: ditto. + +Tue Sep 30 20:17:26 2008 Yukihiro Matsumoto + + * io.c (rb_io_extract_modeenc): should honor value of the + textmode: and binmode: options. + +Tue Sep 30 17:04:59 2008 Yukihiro Matsumoto + + * test/bigdecimal/test_bigdecimal.rb (test_sqrt_bigdecimal): wrong + precision specification. a patch from TAKANO Mitsuhiro + in [ruby-dev:36634]. + +Tue Sep 30 16:53:55 2008 Nobuyoshi Nakada + + * parse.y (stmt): returns non zero. [ruby-dev:36633] + +Tue Sep 30 16:52:38 2008 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): add %s style named argument + support. a patch from Yusuke Endoh + in [ruby-dev:35851]. + + * sprintf.c (rb_str_format): add gettext style named format + (%{name}) support. inspired by [ruby-dev:35852]. + + * sprintf.c (GETNAMEARG): should raise KeyError exception when no + named argument found. + + * hash.c (rb_hash_fetch): export fetch function. + +Tue Sep 30 13:19:01 2008 Eric Hodel + + * test/rubygems/test_gem_installer.rb: remove extra call to setup to + fix ENV['HOME'] pollution. + +Tue Sep 30 13:04:11 2008 Ryan Davis + + * lib/mini/test.rb: Updated to 1.3.0 r4257. + * test/mini/*: added from r4257. + +Tue Sep 30 07:46:07 2008 Eric Hodel + + * test/rdoc/test_rdoc_markup_attribute_manager.rb: Test with clean + SPECIALS. + * test/rubygems/gemutilities.rb: Restore ENV['HOME'] after test. + * test/runner.rb: Pass -n argument down to miniunit. + +Tue Sep 30 01:02:55 2008 Nobuyoshi Nakada + + * parse.y (token_info_push, token_info_pop): do nothing for evaled + source. + +Tue Sep 30 00:47:43 2008 Nobuyoshi Nakada + + * ext/nkf/nkf-utf8/nkf.c: constified. + +Mon Sep 29 23:32:25 2008 Tanaka Akira + + * string.c (rb_str_subseq): don't use rb_str_drop_bytes for short + string. + +Mon Sep 29 22:54:29 2008 Tadayoshi Funaba + + * lib/mathn.rb: added String#to_[rc]. moved def_canon. + +Mon Sep 29 20:41:19 2008 Tanaka Akira + + * string.c (rb_str_subseq): use rb_str_drop_bytes if possible. + +Mon Sep 29 20:22:20 2008 Tadayoshi Funaba + + * test/date/*.rb: imported additional tests and some adjustments. + +Mon Sep 29 20:13:05 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (fev_initialize): initialization + handler instance variable. + + * test/win32ole/test_win32ole_typelib.rb (test_s_typelibs): + fix the warning of shadowing outer local variable. + +Mon Sep 29 19:59:00 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (rescue_callback): use rb_write_error + instead of fprintf. + +Mon Sep 29 01:51:54 2008 Yusuke Endoh + + * test/rdoc/test_rdoc_info_formatting.rb (teardown): delete tmpdir for + test. + +Mon Sep 29 00:30:20 2008 Takeyuki Fujioka + + * lib/cgi/html.rb (CGI::HtmlExtension::{radio_group, checkbox_group}): + can specify the false as checked or selected value. + [ruby-core:18306], [ruby-core:18307] + + * test/cgi/test_cgi_tag_helper.rb: add a test. + +Sun Sep 28 23:08:38 2008 Takeyuki Fujioka + + * lib/cgi/html.rb (CGI::HtmlExtension::popup_menu): + fix the calls #bytesize on array parameters. [ruby-core:18919] + +Sun Sep 28 22:44:26 2008 Takeyuki Fujioka + + * lib/cgi/core.rb (CGI::parse): ignore illegal query params. + [ruby-dev:36618] + +Sun Sep 28 22:05:07 2008 Yusuke Endoh + + * compile.c (iseq_set_sequence): check duplicated when clause. + [ruby-dev:36616] + +Sun Sep 28 19:04:03 2008 Tadayoshi Funaba + + * test/date/*.rb: imported a date test suite ruby 1.9 limited ed. + +Sun Sep 28 18:40:49 2008 Nobuyoshi Nakada + + * lib/mini/test.rb (MINI_DIR): loaded path is expanded. + + * lib/mini/test.rb (assert_match): get rid of confusion of + ruby-mode.el. + +Sun Sep 28 12:36:09 2008 Koichi Sasada + + * vm_exec.c (vm_exec_core): add an UNLIKELY() hint. + + * vm_insnhelper.h (BASIC_OP_UNREDEFINED_P): add a LIKELY() hint. + +Sun Sep 28 12:04:18 2008 Nobuyoshi Nakada + + * string.c (str_new): sets empty string to coderange 7bit. + [ruby-core:18993] + +Sun Sep 28 09:39:48 2008 Tadayoshi Funaba + + * lib/mathn.rb ({Fixnum,Bignum,Float}#**): may produce complex + value. + +Sun Sep 28 09:05:53 2008 James Edward Gray II + + * lib/csv/csv.rb: Worked around some minor encoding changes in Ruby + pointed out by Nobu. + +Sun Sep 28 08:37:12 2008 Tadayoshi Funaba + + * lib/mathn.rb: a hack to provide canonicalization. This must be + temporary, but this seems to be not bad for the time being. + +Sat Sep 27 06:22:18 2008 Nobuyoshi Nakada + + * lib/rake.rb (Module#rake_extension, String#ext, String#pathmap): use + built-in methods. + + * lib/rake.rb (String#pathmap): fixed typo in rdoc. + +Sat Sep 27 04:28:41 2008 Nobuyoshi Nakada + + * file.c (rmext): preceding dots are not a part of extension. + + * file.c (rb_file_s_extname): ditto. + +Sat Sep 27 03:15:51 2008 Nobuyoshi Nakada + + * vm.c (vm_jump_tag_but_local_jump): exc is not used if val is nil. + +Sat Sep 27 03:12:40 2008 Nobuyoshi Nakada + + * ext/socket/socket.c (host_str): numeric address should be unsigned. + [ruby-core:18971] + +Fri Sep 26 22:46:58 2008 Nobuyoshi Nakada + + * parse.y (primary, brace_block): fix for line number. + + * proc.c (rb_proc_location, rb_method_location): new methods + {Proc,Method,UnboundMethod}#source_location. [ruby-core:18452] + +Fri Sep 26 21:36:33 2008 Koichi Sasada + + * vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint. + +Fri Sep 26 19:33:36 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_str_encode): renamed from + rb_str_transcode. [ruby-dev:36593] + (rb_econv_has_convpath_p): renamed from rb_transcode_convertible. + + * transcode.c: follow the renaming. + + * io.c: ditto. + +Fri Sep 26 19:01:47 2008 Nobuyoshi Nakada + + * test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit + size dependent test. pointed out by TAKANO Mitsuhiro . + +Fri Sep 26 18:57:33 2008 Akinori MUSHA + + * test/pathname/test_pathname.rb: Fix use of deprecated methods. + +Fri Sep 26 18:39:59 2008 Nobuyoshi Nakada + + * common.mk (dist): nothing is needed to run BASERUBY. + + * tool/make-snapshot: new option -archname. + +Fri Sep 26 18:24:28 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el: safe customizable variables. + +Fri Sep 26 17:37:18 2008 Yuki Sonoda (Yugui) + + * include/ruby/ruby.h (rb_mPrecision): removed. + Precision module was temporarily removed at r19430. + +Fri Sep 26 17:25:10 2008 Yuki Sonoda (Yugui) + + * common.mk (dist): Changed its dependencies and action. + +Fri Sep 26 17:07:04 2008 Yuki Sonoda (Yugui) + + * error.c (Init_syserr): moved to the template. + (errno_missing): removed. fixed [ruby-dev:35958]. + + * defs/known_errors.def: added. extracted from Init_syserr. + + * templates/known_errors.inc.tmpl: added. Template for Init_syserr. + c.f. [ruby-dev:35958]. + + * tools/generic_erb.rb: added. general purpose mapper which maps + data+template into source code. + + * common.mk (error.$(OBJEXT), incs, known_errors.inc): + Fixed dependencies. + +Fri Sep 26 17:02:04 2008 Nobuyoshi Nakada + + * thread.c (thlist_signal): clears the woken thread if nothing woke. + + * thread.c (rb_barrier_wait): achieves the lock if no thread was + waiting yet. + +Fri Sep 26 12:04:07 2008 Yukihiro Matsumoto + + * ext/curses/curses.c: should include . + + * ext/io/wait/wait.c: ditto. + + * ext/openssl/ossl.h: ditto. + +Fri Sep 26 11:34:08 2008 NAKAMURA Usaku + + * variable.c (rb_define_hooked_variable): cast to get rid of compiler + warnings. + +Fri Sep 26 11:05:41 2008 NAKAMURA Usaku + + * transcode.c, include/ruby/encoding.c (rb_transcode_convertible): + new function. checking the existence of converter. + +Fri Sep 26 10:35:50 2008 Nobuyoshi Nakada + + * variable.c (global_variable, struct trace_var): made function + members more strict. + +Fri Sep 26 09:55:06 2008 Nobuyoshi Nakada + + * include/ruby{io,sig}.h: moved to include/ruby/backward. + +Fri Sep 26 09:47:15 2008 Nobuyoshi Nakada + + * include/rubysig.h: old macros for backward compatibility. + + * thread.c (BLOCKING_REGION): rewritten using helper functions. + +Fri Sep 26 03:03:32 2008 Tanaka Akira + + * vm_eval.c (Init_vm_eval): define module_eval, class_eval and eval + here for rdoc. + +Fri Sep 26 00:40:30 2008 Yusuke Endoh + + * range.c (range_inspect): fix SEGV for cyclic range object. + [ruby-core:18835] + +Thu Sep 25 23:59:56 2008 Tanaka Akira + + * common.mk: dependency updated. + +Thu Sep 25 21:46:48 2008 Tanaka Akira + + * transcode.c (rb_eUndefinedConversionError): renamed from + rb_eConversionUndefinedError. + (rb_eConverterNotFoundError): renamed from rb_eNoConverterError. + +Thu Sep 25 21:23:08 2008 Yusuke Endoh + + * pack.c (pack_pack, pack_unpack): 'm0' format (base64) complies with + RFC 4648. It adds no line feed when encoding, and raise ArgumentError + if the encoded string contains non-alphabet (including CR and LF). + + * lib/base64.rb: added. This provides encoding/decoding method for + Base64 in standard RFC 2045, Base64 in standard RFC 4648 and ``Base 64 + Encoding with URL and Filename SafeAlphabet'' in RFC 4648. + + * test_pack.c, test/base64/test_base64.rb: add tests for above. + +Thu Sep 25 21:00:32 2008 Koichi Sasada + + * common.mk: fix btest-* rules [ruby-dev:36528]. + and remove obsolete rules. + +Thu Sep 25 20:27:54 2008 Yuki Sonoda (Yugui) + + * class.c (rb_make_metaclass): [BUG] Fixed a bus error + on the case for metaclass of a class which includes a + module. + +Thu Sep 25 19:34:33 2008 Eric Hodel + + * test/rubygems/*: Update some new tests to use build_rake_in. + * test/rubygems/gemutilities.rb: Fix broken merge of rake detection. + +Thu Sep 25 19:13:12 2008 Eric Hodel + + * lib/rubygems*: Update to RubyGems 1.3.0 r1891. + +Thu Sep 25 18:40:42 2008 Yuki Sonoda (Yugui) + + * class.c (rb_make_metaclass): Made class of class of class + from Class into its own eigenclass. Now meta^(n)-class + hierarchy regresses infinitely, again. + (This feature was decided on developer-meeting-20080922.) + +Thu Sep 25 16:01:07 2008 Jim Weirich + + * lib/rake.rb: Update rake source to version 0.8.3. This + version includes some fixes for running Rake on windows. + (1) better APPDATA/HOMExxx/USERPROFILE integration for + system rakefiles, (2) Better handling of the :ruby command + when installed in directory containing spaces. + +Thu Sep 25 11:22:51 2008 Eric Hodel + + * lib/rdoc*: Update to RDoc 2.2.1 r185. + +Thu Sep 25 02:08:47 2008 Tanaka Akira + + * io.c (rb_io_mode_enc): make it static. + +Thu Sep 25 01:22:39 2008 Nobuyoshi Nakada + + * lib/mini/test.rb (Mini::Assertions#assert_raise): fixed typo. + +Wed Sep 24 23:39:00 2008 Takeyuki Fujioka + + * test/cgi/test_cgi_multipart.rb : revert last change. + ( deprecated is assert_raises. ) + * test/cgi/test_cgi_core.rb : ditto. + * test/cgi/test_cgi_header.rb : ditto. + +Wed Sep 24 23:12:49 2008 Takeyuki Fujioka + + * lib/cgi/core.rb (CGI::new, CGI::{accept_charset,accept_charset=}) : + accept parameters either in a hash, + string as a block. add the encoding validation process. + * test/cgi/test_cgi_core.rb : test for query encoding check. + +Wed Sep 24 22:58:18 2008 NAKAMURA Usaku + + * string.c (rb_str_rstrip_bang): raise exception when the encoding of + the string is dummy. + + * string.c (rb_str_rstrip_bang): remove nul characters even if the + encoding of the string is not single byte optimizable. + fixed [ruby-core:18844], reported by Michael Selig. + +Wed Sep 24 19:01:45 2008 NAKAMURA Usaku + + * string.c (rb_str_rstrip_bang): workaround for VC++8 x64. + +Wed Sep 24 17:44:44 2008 Nobuyoshi Nakada + + * complex.c (Init_Complex), rational.c (Init_Rational): undefines + default #allocate methods which call the allocator. + +Wed Sep 24 17:02:14 2008 Nobuyoshi Nakada + + * complex.c (Init_Complex), rational.c (Init_Rational): ID_ALLOCATOR + differs from :allocate, and invisible in ruby level. + +Wed Sep 24 15:58:52 2008 Yukihiro Matsumoto + + * string.c (rb_str_rstrip_bang): removing mixed spaces and nuls at + the end of strings. [ruby-dev:36497] + +Wed Sep 24 15:13:04 2008 Takeyuki Fujioka + + * test/cgi/test_cgi_multipart.rb : test for miniunit. + * test/cgi/test_cgi_core.rb : ditto. + * test/cgi/test_cgi_header.rb : ditto. + +Wed Sep 24 14:38:29 2008 NAKAMURA Usaku + + * lib/tmpdir.rb: setup buffer with nul characters instead of spaces. + fixed [ruby-dev:36493] + +Wed Sep 24 11:18:33 2008 Yukihiro Matsumoto + + * io.c (rb_io_s_binread): offset argument was wrongly passed to + internal IO#read call. [ruby-core:18810] + +Wed Sep 24 07:38:23 2008 URABE Shyouhei + + * vm_core.h: ruby/ruby.h should be included at the very first + place in an entire compilation unit, as it includes + ruby/config.h + +Wed Sep 24 06:41:24 2008 Ryan Davis + + * lib/test/*: removed test/unit. + * lib/test/*: added miniunit. + * lib/mini/*: ditto. + +Wed Sep 24 04:45:35 2008 Koichi Sasada + + * include/ruby/node.h, node.h: move node.h from include path. + This change stop to install node.h because of saving ABI + (node.h will be changed. Extensions should not depends on + this file). + + * blockinlining.c, class.c, compile.c, debug.h, enum.c, + gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c, + vm.c, vm_core.h, vm_dump.c: ditto. + + * ext/ripper/depend: ditto. + +Wed Sep 24 04:09:13 2008 Koichi Sasada + + * vm_core.h: remove unused frame values. + +Wed Sep 24 04:07:07 2008 Koichi Sasada + + * signal.c (signal_exec): execute rb_eval_cmd() directly. + +Wed Sep 24 03:08:58 2008 Eric Hodel + + * lib/uri/mailto.rb: fix indentation. + * lib/uri/generic.rb: ditto. + * lib/yaml.rb: ditto. + * lib/uri/cgi/core.rb: fix indentation and ambiguous argument warning. + +Tue Sep 23 23:39:25 2008 James Edward Gray II + + * lib/csv/csv.rb: Improved the idea of whitespace and word characters used + in substitutions during header conversion as suggested by Michael Selig. + +Tue Sep 23 21:50:53 2008 Tanaka Akira + + * io.c (io_binwrite): allocate wbuf if nosync. + +Tue Sep 23 21:45:02 2008 Tanaka Akira + + * io.c (copy_stream_body): use io_binwrite instead of io_fwrite. + +Tue Sep 23 21:31:16 2008 Tadayoshi Funaba + + * test/ruby/test_rational2.rb: updated. + + * test/ruby/test_complex2.rb: added. + + * test/ruby/test_complexrational.rb: added. + +Tue Sep 23 21:26:32 2008 Tanaka Akira + + * string.c (rb_str_casecmp): make the ordering consistent with + String#<=>. + +Tue Sep 23 20:52:25 2008 Tanaka Akira + + * io.c (io_binwrite): add nosync argument. + (do_writeconv): extracted from io_fwrite. + (io_fwrite): add nosync argument. use do_writeconv. + (io_write): add nosync argument. + (io_write_m): new function for IO#write. + (rb_p): don't append record separator. + +Tue Sep 23 20:24:41 2008 Koichi Sasada + + * signal.c (signal_exec): fix to use rb_proc_call(). + +Tue Sep 23 20:06:46 2008 Yukihiro Matsumoto + + * lib/rexml/formatters/pretty.rb (REXML::Formatters::Pretty#wrap): + abandon wrapping if the line contains no space. [ruby-dev:36045] + +Tue Sep 23 19:38:03 2008 NAKAMURA Usaku + + * win32/win32.c (subtract): check tv_sec. reported by ko1. + +Tue Sep 23 19:21:03 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_canonicalize_internal): does no apply + canonicalization rule anymore. + + * rational.c (nurat_s_canonicalize_internal(_no_reduce)?): ditto. + + * complex.c: removed class method new! and new. + + * rational.c: ditto. + +Tue Sep 23 19:20:59 2008 Yukihiro Matsumoto + + * io.c (rb_io_s_binread): a new method to read binary chunk from a + file. [ruby-core:18674] + + * io.c (open_key_args): wrong permission specified for read-open. + +Tue Sep 23 18:24:34 2008 Tanaka Akira + + * hash.c (rb_obj_is_proc): declaration moved for rdoc. + +Tue Sep 23 18:07:55 2008 Koichi Sasada + + * common.mk (io.o): remove dependency for vm_core.h. + +Tue Sep 23 17:56:44 2008 Koichi Sasada + + * thread.c (rb_thread_blocking_region): fix typo in a document. + +Tue Sep 23 17:50:35 2008 Koichi Sasada + + * thread.c (rb_thread_blocking_region): write a document. + +Tue Sep 23 17:14:31 2008 Koichi Sasada + + * thread.c, include/ruby/intern.h (rb_thread_interrupted): added. + + * io.c: use VALUE of thead instead of rb_tread_t to check interrupts. + +Tue Sep 23 17:05:14 2008 Koichi Sasada + + * class.c, vm_core.h: move decl of rb_iseq_clone() to class.c. + +Tue Sep 23 17:02:47 2008 Tanaka Akira + + * debug.h (ruby_set_debug_option): declared. + + * main.c: include debug.h. + + * common.mk (main.$(OBJEXT)): dependency updated. + +Tue Sep 23 16:59:45 2008 Nobuyoshi Nakada + + * hash.c (ENVMATCH, ENVNMATCH): reduced same code. + +Tue Sep 23 16:55:11 2008 Koichi Sasada + + * ruby.h: fix comment and rename macro HAVE_RUBY_MVM_H to + HAVE_RUBY_VM_H. + +Tue Sep 23 16:41:31 2008 Koichi Sasada + + * include/ruby/node.h, vm_core.h: move definition of + RUBY_VM_METHOD_NODE to node.h. + + * class.c, common.mk: remove useless inclusion. + + * compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h. + move some definitions from vm_core.h to iseq.h. + + * compile.c, iseq.c, vm.c: ditto. + + * eval.c, compile.c: move some functions for parser + from eval.c to compile.c. + + * eval_intern.h, vm_core.h: move va_init_list() macro to + vm_core.h. + + * iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added. + + * load.c, ruby.c: use rb_iseq_new_top() instead of + rb_iseq_new() with ISEQ_TYPE_TOP constant directly. + + * proc.c: use rb_iseq_first_lineno() instead of accessing + iseq structure. + +Tue Sep 23 16:17:54 2008 Yukihiro Matsumoto + + * ext/ripper/eventids2.c (token_to_eventid): supper __ENCODING__ + keyword. [ruby-dev:36478] + +Tue Sep 23 15:30:53 2008 Koichi Sasada + + * common.mk, hash.c: remove unused inclusion. + +Tue Sep 23 09:52:07 2008 Koichi Sasada + + * eval_safe.c, safe.c: rename eval_safe.c to safe.c. + + * common.mk, eval.c, safe.c, inits.c: separate safe.c from eval.c and + make Init_safe(). + +Tue Sep 23 09:20:00 2008 Koichi Sasada + + * common.mk: clean up + - remove blockinlining.$(OBJEXT) to built + - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h) + - make VM_CORE_H_INCLUDES variable (vm_core.h) + - simplify rules. + - make depends rule to output depend status using gcc -MM. + + * include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h. + + * include/ruby.h: ditto. + + * load.c: add inclusion explicitly. + + * enumerator.c, object.c, parse.y, thread.c, vm_dump.c: + remove useless inclusion. + + * eval_intern.h: cleanup inclusion. + + * vm_core.h: rb_thread_t should be defined in this file. + + * vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c. + + * vm.h, vm_exec.h: rename vm.h to vm_exec.h. + + * insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h. + + * vm.c, vm_insnhelper.c, vm_insnhelper.h: + - rename vm_eval() to vm_exec_core(). + - rename vm_eval_body() to vm_exec(). + - cleanup include order. + + * vm_method.c: fix comment. + +Tue Sep 23 09:01:15 2008 Yusuke Endoh + + * lib/pathname.rb (each_filename): return Enumerator if no block + given. + + * test/pathname/test_pathname.rb: add a test for above. + +Tue Sep 23 08:25:56 2008 Yukihiro Matsumoto + + * hash.c (env_aset): allow nil value to remove an entry. + [ruby-dev:36465] + + * test/ruby/test_env.rb (TestEnv#test_aset): test updated. + +Tue Sep 23 08:07:07 2008 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-keyword-end-re): emacs21 support. a + patch from Hiroshi Moriyama in + [ruby-dev:36471]. + + * misc/ruby-mode.el (ruby-in-ppss-context-p): ditto. + + * misc/ruby-mode.el (ruby-here-doc-end-syntax): + +Tue Sep 23 02:07:52 2008 TAKAO Kouji + + * test/readline/test_readline_history.rb + (Readline::TestHistory#test_each): checked return value. + +Tue Sep 23 02:05:34 2008 TAKAO Kouji + + * ext/readline/readline.c (Init_readline): used remove_history to + check offset of history if unsupported clear_history. + +Mon Sep 22 17:39:25 2008 Yukihiro Matsumoto + + * lib/tempfile.rb (Tempfile#open): should return a value from the + block (if given). [ruby-core:18394] + +Mon Sep 22 11:17:51 2008 URABE Shyouhei + + * include/ruby/encoding.h (enum): ISO C forbids comma at end of + enumerator list + +Mon Sep 22 10:15:24 2008 Yukihiro Matsumoto + + * LEGAL: updated file names removed and added. [ruby-dev:36426] + +Mon Sep 22 02:39:05 2008 NARUSE, Yui + + * encoding.c (get_default_external): add description. + +Sun Sep 21 21:52:41 2008 Tadayoshi Funaba + + * math.c (math_log): should check argc. + +Sun Sep 21 21:20:24 2008 Tadayoshi Funaba + + * complex.c: added two macros. + + * rational.c: ditto. + +Sun Sep 21 18:06:38 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_convert): checks argc. + + * rational.c (nurat_s_convert): ditto. + +Sun Sep 21 10:19:04 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_canonicalize_internal): checks exactness of + imag only. + + * rational.c (nurat_s_convert): accepts non real value + (Rational(a,b) as a/b). + + * complex.c (nucomp_s_convert): refined. + +Sun Sep 21 09:37:57 2008 James Edward Gray II + + * lib/csv/csv.rb: Reworked CSV's parser and generator to be m17n. Data + is now parsed in the Encoding it is in without need for translation. + * lib/csv/csv.rb: Improved inspect() messages for better IRb support. + * lib/csv/csv.rb: Fixed header writing bug reported by Dov Murik. + * lib/csv/csv.rb: Use custom separators in parsing header Strings as + suggested by Shmulik Regev. + * lib/csv/csv.rb: Added a :write_headers option for outputting headers. + * lib/csv/csv.rb: Handle open() calls in binary mode whenever we can to + workaround a Windows issue where line-ending translation can cause an + off-by-one error in seeking back to a non-zero starting position after + auto-discovery for :row_sep as suggested by Robert Battle. + * lib/csv/csv.rb: Improved the parser to fail faster when fed some forms + of invalid CSV that can be detected without reading ahead. + * lib/csv/csv.rb: Added a :field_size_limit option to control CSV's + lookahead and prevent the parser from biting off more data than + it can chew. + * lib/csv/csv.rb: Added readers for CSV attributes: col_sep(), row_sep(), + quote_char(), field_size_limit(), converters(), unconverted_fields?(), + headers(), return_headers?(), write_headers?(), header_converters(), + skip_blanks?(), and force_quotes?(). + * lib/csv/csv.rb: Cleaned up code syntax to be more inline with + Ruby 1.9 than 1.8. + +Sun Sep 21 07:43:16 2008 Tadayoshi Funaba + + * complex.c: an instance method image has been removed and + uses "imag" instead of "image". + + * complex.c: two instance method re and im are removed. + + * rational.c: follows the above changes. + + * include/ruby/ruby.h: ditto. + + * gc.c: ditto. + + * lib/cmath.rb: ditto. + + * lib/mathn.rb: ditto. + + * lib/complex.rb: ditto. and provides some obsolete methods. + +Sun Sep 21 02:48:45 2008 NARUSE, Yui + + * ext/json/ext/parser/parse.c: use ruby_xfree(). + + * ext/json/ext/parser/parse.rl: ditto. + + * ext/json/ext/parser/unicode.c: ditto. + +Sun Sep 21 02:40:20 2008 NARUSE, Yui + + * ext/json: import JSON v 1.1.3. + +Sat Sep 20 11:43:08 2008 Yusuke Endoh + + * lib/optparse.rb (summarize): separator "" should output new line. + +Sat Sep 20 08:07:34 2008 NARUSE, Yui + + * parse.y: strings which contain only US-ASCII don't force to have + US-ASCII encoding. [ruby-dev:36400] + +Sat Sep 20 07:59:31 2008 NARUSE, Yui + + * re.c (rb_reg_desc): Regexps of ASCII Compatible encoding may + contain non-ASCII characters. So in that case its encoding + must keep original encoding. + +Sat Sep 20 07:44:56 2008 NARUSE, Yui + + * common.mk: prec.c is removed. + +Fri Sep 19 22:37:25 2008 Tadayoshi Funaba + + * complex.c: uses f_(in)?exact_p macro. + + * rational.c: ditto. + + * bignum.c (rb_big_pow): bignum**bignum - should calculate without + rational. + + * lib/complex.rb: should override Math module at most once. + + * lib/mathn.rb: requires 'cmath' directly. + +Fri Sep 19 20:48:06 2008 Yuki Sonoda + + * prec.c: removed. Precision will be redesigned and be back again. + c.f. [ruby-dev:36352]. + + * common.mk (COMMON_OBJS): removed prec.o. + + * inits.c (rb_call_inits): removed Init_Precision. + + * numeric.c (Init_Numeric): removed inclusion of Precision. + removed #induced_from from each class. + + * rational.c: ditto. + + * ext/bigdecimal/bigdecimal.c: ditto. + + * lib/rdoc/known_classes.rb: removed the entry for Precision. + + * test/ruby/test_prec.rb: removed. + + * test/ruby/test_integer.rb: removed tests for Precision. + + * test/ruby/test_fixnum.rb: ditto. + + * test/ruby/test_float.rb: ditto. + + * test/ruby/test_rational.rb: ditto. + + * test/ruby/test_complex.rb: ditto. + + * test/bigdecimal/test_bigdecimal.rb: ditto. + +Fri Sep 19 19:43:40 2008 Yuki Sonoda + + * common.mk : Reverts the changeset 18994. + Uses the official repository of rubyspec again. + +Fri Sep 19 17:41:56 2008 Yukihiro Matsumoto + + * configure.in: applied OS/2 support patch from Brendan Oakley + in [ruby-core:18707]. + +Fri Sep 19 09:29:26 2008 Yukihiro Matsumoto + + * dln.c: newer BeOS support. a patch from Pete Goodeve + in [ruby-core:18712]. + +Fri Sep 19 03:41:25 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: fix memory violation. mentioned by mame [ruby-dev:36373] + +Fri Sep 19 01:07:36 2008 Tanaka Akira + + * regexec.c (string_cmp_ic): add text_end argument. + (slow_search): call enclen with real string end. + (map_search): add text_end argument. + +Thu Sep 18 22:54:39 2008 Yusuke Endoh + + * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out + fragments of unused code. + +Thu Sep 18 22:35:03 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted as + Infinity. [ruby-dev:36159] + + * ext/bigdecimal/bigdecimal.c (VpPower): Infinity ** 1 returns + Infinity instead of NaN. [ruby-dev:36159] + + * test/bigdecimal/test_bigdecimal.rb: add tests for above. + +Thu Sep 18 22:20:08 2008 Yukihiro Matsumoto + + * error.c (Init_Exception): introduce EncodingError which is a + superclass for all encoding related exception classes, + e.g. Encoding::CompatibilityError. [ruby-dev:36371] + + * transcode.c (Init_transcode): ditto. + +Thu Sep 18 21:57:32 2008 Yukihiro Matsumoto + + * string.c (rb_str_comparable): make ascii8bit string to be + compatible with any other encoding. + + * string.c (rb_str_cmp): use rb_str_comparable() instead of + rb_enc_compatible() since <=> is a comparison anyway. + +Thu Sep 18 21:37:14 2008 Tanaka Akira + + * grapheme cluster implementation reverted. [ruby-dev:36375] + +Thu Sep 18 20:50:36 2008 Nobuyoshi Nakada + + * lib/rake.rb (Rake::Application#standard_exception_handling): + replaced magic numbers for exit status. + +Thu Sep 18 20:37:59 2008 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits + OptionParser internal backtraces unless debug flag is set. + +Thu Sep 18 20:02:48 2008 Yusuke Endoh + + * lib/uri/common.rb (unescape): skip '%' to make String#hex work + correctly. + +Thu Sep 18 19:51:11 2008 Yukihiro Matsumoto + + * bignum.c (big2str_karatsuba): free internal buffer eagerly. + a patch from TOYOFUKU Chikanobu + in [ruby-dev:36217]. + + * bignum.c (rb_big2str0): ditto. + +Thu Sep 18 19:43:04 2008 Yusuke Endoh + + * st.c (new_size): raise RuntimeError when st_table is too big. + [ruby-dev:36354] + +Thu Sep 18 18:23:23 2008 Tanaka Akira + + * transcode.c (enc_arg): must take pointer argument to avoid GC + problem. StringValueCStr modifies the argument and it should be + preserved while the string StringValueCStr returns is used. + Since the string is used by caller, the modified argument should be + hold by caller. Actually + GC.stress = true + def (o=Object.new).to_str() + "universal"+"_newline" + end + "\u3042".encode(o, "") + causes curious warning: + rb_define_const: invalid name `' for constant + +Thu Sep 18 17:32:44 2008 Yukihiro Matsumoto + + * transcode.c: add "Error" suffix for Encoding exception classes. + a patch from Tadashi Saito in + [ruby-dev:36346]. + + * encoding.c (Init_Encoding): rename EncodingCompatibilityError to + Encoding::CompatibilityError. [ruby-dev:36366] + +Thu Sep 18 17:18:35 2008 Yukihiro Matsumoto + + * transcode.c (enc_arg): revert last change. too early exception + raising. + + * transcode.c (enc_arg): need not to take pointer argument. + +Sun Sep 18 02:22:15 2008 Yusuke Endoh + + * test/bigdecimal/test_bigdecimal.rb: add tests to achieve over 90% + test coverage of bigdecimal. + +Wed Sep 17 21:50:14 2008 Tanaka Akira + + * string.c (rb_str_casecmp): don't use rb_enc_codepoint. + +Wed Sep 17 19:55:33 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_convert): accepts complex + value (Complex(a,b) as a+bi). + +Wed Sep 17 19:16:47 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_io.rb (TestIO#test_dup): avoid infinite loop. + [ruby-dev:36326] + + * test/ruby/test_io.rb (TestIO#test_dup): remove needless open. + [ruby-dev:35957] + +Wed Sep 17 17:44:59 2008 Yukihiro Matsumoto + + * io.c (rb_io_extract_modeenc): process option mode: and perm: as + well. + + * io.c (open_key_args): move mode: and perm: related code to + rb_io_extract_modeenc(). + +Wed Sep 17 13:42:59 2008 Takeyuki Fujioka + + * lib/cgi/html.rb (checkbox_group,radio_group): bug fix + use size instead of bytesize. + + * test/cgi/test_cgi_tag_helper.rb: test for checkbox_group,radio_group. + +Wed Sep 17 06:58:31 2008 Tadayoshi Funaba + + * numeric.c: provides predicate real? instead of scalar?. + + * complex.c: follows the above change. + + * lib/cmath.rb: ditto. + +Wed Sep 17 01:56:27 2008 Tanaka Akira + + * test/ruby/test_io_m17n.rb: use __FILE__ instead of /dev/null. + [ruby-dev:36327] + +Wed Sep 17 01:33:11 2008 Tanaka Akira + + * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_ret + argument for mbc_to_code. + (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret. + (ONIGENC_MBC_PRECISE_CODEPOINT): defined. + + * include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined. + + * regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument + added. + (onigenc_mbn_mbc_to_code): ditto. + + * regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument + added. + (onigenc_mbn_mbc_to_code): ditto. + + * string.c (count_utf8_lead_bytes_with_word): removed. + (str_utf8_nth): removed. + (str_utf8_offset): removed. + (str_strlen): UTF-8 codepoint oriented optimization removed. + (rb_str_substr): ditto. + (enc_succ_char): use rb_enc_mbc_precise_codepoint. + (enc_pred_char): ditto. + (rb_str_succ): ditto. + + * encoding.c (rb_enc_ascget): check length with + rb_enc_mbc_precise_codepoint. + (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint. + + * regexec.c (string_cmp_ic): add text_end argument. + (match_at): check end of character after exact string matches. + + * enc/utf_8.c (grapheme_table): defined for extended grapheme cluster + boundary. + (grapheme_cmp): defined. + (get_grapheme_properties): defined. + (grapheme_boundary_p): defined. + (MAX_BYTES_LENGTH): defined. + (comb_char_enc_len): defined. + (mbc_to_code0): extracted from mbc_to_code. + (mbc_to_code): use mbc_to_code0. + (left_adjust_combchar_head): defined. + (utf_8): use a extended grapheme cluster as a unit. + + * enc/unicode.c (onigenc_unicode_mbc_case_fold): use + ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints. + (onigenc_unicode_get_case_fold_codes_by_str): ditto. + + * enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change. + use onigenc_mbn_mbc_to_code. + + * enc/shift_jis.c (mbc_to_code): ditto. + + * enc/emacs_mule.c (mbc_to_code): ditto. + + * enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and + onigenc_mbn_mbc_to_code change. + + * enc/cp949.c (cp949_mbc_to_code): ditto. + + * enc/big5.c (big5_mbc_to_code): ditto. + + * enc/euc_tw.c (euctw_mbc_to_code): ditto. + + * enc/euc_kr.c (euckr_mbc_to_code): ditto. + + * enc/gb18030.c (gb18030_mbc_to_code): ditto. + + * enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field + change. + + * enc/utf_16be.c (utf16be_mbc_to_code): ditto. + + * enc/utf_32le.c (utf32le_mbc_to_code): ditto. + + * enc/utf_16le.c (utf16le_mbc_to_code): ditto. + +Wed Sep 17 01:17:12 2008 NARUSE, Yui + + * transcode.c (enc_arg): raise exception when unknown encoding is + given. + +Tue Sep 16 22:23:24 2008 Takeyuki Fujioka + + * lib/cgi/core.rb (CGI#header): performance improvement. + From CGIAlt http://cgialt.rubyforge.org/ + + * test/cgi/test_cgi_header.rb: exception class fixed. + +Tue Sep 16 22:21:33 2008 NARUSE, Yui + + * string.c (rb_str_concat): fix rdoc. (codepoint is integer) + + * string.c (rb_str_each_codepoint): use UINT2NUM. + +Tue Sep 16 21:48:55 2008 NARUSE, Yui + + * re.c (rb_reg_desc): Regexp#inspect should be US-ASCII. + +Tue Sep 16 21:33:22 2008 Nobuyoshi Nakada + + * string.c (rb_str_crypt): orthodox crypt() sees only first two bytes + of salt. + +Tue Sep 16 19:18:40 2008 Tadayoshi Funaba + + * complex.c (nucomp_marshal_{dump,load}): preserve instance + variables. + + * rational.c (nurat_marshal_{dump,load}): ditto. + +Tue Sep 16 18:28:52 2008 Yukihiro Matsumoto + + * io.c (rb_io_gets_m): rdoc updated. limit counts in bytes. + [ruby-core:18617] + + * io.c (rb_io_readlines, rb_f_gets): ditto. + + * io.c (rb_io_readbyte): rdoc updated. [ruby-core:18617] + +Tue Sep 16 11:55:16 2008 Yukihiro Matsumoto + + * string.c (rb_str_each_codepoint): add new methods, #codepoints + and #each_codepoint. a patch from Michael Selig + in [ruby-core:18532]. + +Tue Sep 16 11:24:44 2008 Yukihiro Matsumoto + + * ext/socket/mkconstants.rb: add new constants. a patch from + IWAMURO Motonori in [ruby-dev:36309]. + +Tue Sep 16 09:20:42 2008 Yukihiro Matsumoto + + * test/ruby/test_io.rb (TestIO#test_dup): exception should be + raised from IO#dup. + +Tue Sep 16 08:35:29 2008 Yukihiro Matsumoto + + * test/ruby/test_io.rb (TestIO#test_dup): this test might fail if + there are any garbage IO objects. + +Tue Sep 16 02:02:56 2008 NARUSE, Yui + + * string.c (rb_str_buf_cat_ascii): codepoint is unsigned int. + + * string.c (rb_str_concat): ditto. + + * string.c (str_cat_char): ditto. + + * string.c (prefix_escape): ditto. + +Tue Sep 16 01:47:07 2008 Yukihiro Matsumoto + + * string.c (single_byte_optimizable): make function inline. based + on a patch from Michael Selig in + [ruby-core:18532]. + + * string.c (str_modify_keep_cr): new function act as + rb_str_modify(), but don't clear coderange + + * string.c (rb_str_casecmp): specialized for single byte strings. + + * string.c (rb_str_splice): preserve coderange. + + * string.c (rb_str_slice_bang, rb_str_reverse_bang, + rb_str_upcase_bang, rb_str_downcase_bang, tr_trans, + rb_str_capitalize_bang, rb_str_swapcase_bang, + rb_str_delete_bang, rb_str_chop_bang, rb_str_chomp_bang, + rb_str_lstrip_bang, rb_str_rstrip_bang): ditto. + + * string.c (rb_str_clear): preset coderange. + + * string.c (rb_str_split_m): specialized for splitting with a + string. + +Tue Sep 16 00:57:56 2008 Tanaka Akira + + * re.c (rb_reg_quote): use rb_enc_mbcput to generate ASCII + incompatible characters properly. + +Tue Sep 16 00:51:59 2008 NARUSE, Yui + + * encoding.c (Encoding#base_encoding): removed. [ruby-dev:36270] + +Tue Sep 16 00:40:56 2008 Tanaka Akira + + * transcode_data.h (STR1_LENGTH): defined. + (makeSTR1LEN): defined. + + * tool/transcode-tblgen.rb: use makeSTR1LEN. generate STR1 for 4 to + 259 bytes. + + * transcode.c (rb_transcoding): new field: output_index. + (transcode_restartable0): use STR1_LENGTH. + +Mon Sep 15 23:52:45 2008 Koichi Sasada + + * gc.c, include/ruby/ruby.h: rename rb_register_mark_object() + to rb_gc_register_mark_object(). + + * eval.c, vm.c: initialize vm->mark_object_ary at + Init_top_self(). + + * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, + io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: + use rb_gc_register_mark_object() instead of + rb_global_variable() or rb_gc_register_address(). + +Mon Sep 15 23:37:15 2008 Tanaka Akira + + * transcode.c (econv_opts): don't use to_sym. + +Mon Sep 15 23:28:28 2008 Tanaka Akira + + * encoding.c (rb_enc_get_index): don't return -1. + + * io.c (rb_scan_open_args): call FilePathValue before encoding + conversion. + +Mon Sep 15 22:11:07 2008 Yukihiro Matsumoto + + * string.c (rb_str_squeeze_bang): specialized for 7bit characters in + ASCII compatible strings. + + * string.c (rb_str_count): ditto. + + * string.c (tr_trans): preserve 7bit/valid coderange flag. + + * string.c (rb_str_squeeze_bang): preserve previous coderange value. + + * string.c (rb_str_lstrip_bang): ditto. + + * string.c (rb_str_rstrip_bang): ditto. + + * encoding.c (rb_default_external_encoding): preserve + default_external_encoding in a static variable. + + * string.c (single_byte_optimizable): check coderange first, to + reduce number of calling rb_enc_from_index(). + +Mon Sep 15 20:57:00 2008 Yuki Sonoda (Yugui) + + * lib/matrix.rb (Matrix#eql?): fixed [ruby-dev:36298]. + Reported by an anonymous user. + + * lib/matrix.rb (Vector#eql?): ditto. + + * (Matrix#compare_by_row_vectors): takes comparison + strategy as an optional parameter. + + * (Vector#compare_by): ditto. + +Mon Sep 15 14:34:32 2008 NARUSE, Yui + + * encoding.c (RUBY_MAX_CHAR_LEN): defined. + + * encoding.c (str_cat_char): use RUBY_MAX_CHAR_LEN. + +Mon Sep 15 13:53:33 2008 NARUSE, Yui + + * encoding.c (rb_enc_compatible): accept other than strings and + regexps. [ruby-core:18595] + + * encoding.c (rb_enc_get_index): works files and encodings. + +Mon Sep 15 13:17:21 2008 Tadayoshi Funaba + + * complex.c (nucomp_eql_p): new. + + * complex.c (nucomp_hash): should use hash values of the elements. + + * rational.c (nurat_hash): ditto. + + * hash.c (rb_any_cmp): removed an unused variable. + +Mon Sep 15 11:11:04 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): resetsize_func and resetstate_func + also returns ssize_t. + + * enc/trans/iso2022.trans: follow the type change. + +Mon Sep 15 10:28:10 2008 Yuki Sonoda (Yugui) + + * test/matrix/test_matrix.rb (setup): typo. + (test_equality): misdefinition of the expected working. + Reported by an anonymous user. + (test_hash): added. + + * test/matrix/test_vector.rb: ditto. + +Mon Sep 15 03:33:10 2008 Tanaka Akira + + * transcode_data.h: return output functions ssize_t. + + * transcode.c (transcode_restartable0): don't need to cast the result + of output functions. + + * enc/trans/newline.trans: follow the type change. + + * enc/trans/escape.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/japanese.trans: ditto. + +Mon Sep 15 03:04:29 2008 Tanaka Akira + + * transcode_data.h: output function takes output buffer size. + + * transcode.c: give output buffer size for output functions. + + * enc/trans/newline.trans: follow the type change. + + * enc/trans/escape.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/japanese.trans: ditto. + +Mon Sep 15 02:37:19 2008 Nobuyoshi Nakada + + * transcode.c (str_encode): returns duplicated string if nothing + changed. [ruby-core:18578] + +Sun Sep 14 22:09:01 2008 Takeyuki Fujioka + + * lib/cgi/core.rb (CGI::parse): performance improvement + +Sun Sep 14 18:33:32 2008 Tadayoshi Funaba + + * complex.c: trivial changes. + +Sun Sep 14 16:15:22 2008 Yuki Sonoda (Yugui) + + * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?". + (Vector#eqn?): removed. Defined by mistake. + Fixes [ruby-dev:36294]. Reported by weda and an anonymous user. + + * test/matrix/test_matrix.rb: added. + + * test/matrix/test_vector.rb: added. + +Sun Sep 14 16:07:04 2008 Nobuyoshi Nakada + + * ruby.c (process_options): associates the locale encoding with $0 as + well as ARGV. + +Sun Sep 14 13:48:03 2008 Yuki Sonoda (Yugui) + + * object.c (Init_Object): added metameta-class initialization for + BasicObject, Object, and Module. + The metameta-classes of them are now the metaclass of Class, as the + metameta-class of Class is. + + * object.c (boot_defmetametaclass): added. + +Sun Sep 14 10:10:43 2008 Tadayoshi Funaba + + * complex.c (f_{add,mul,sub}): omitted some shortcuts for preserving + signed zero anyway. + + * complex.c (nucomp_negate): new. + +Sun Sep 14 04:15:16 2008 Tanaka Akira + + * include/ruby/oniguruma.h (OnigEncodingTypeST): add end argument for + left_adjust_char_head. + (ONIGENC_LEFT_ADJUST_CHAR_HEAD): add end argument. + (onigenc_get_left_adjust_char_head): ditto. + + * include/ruby/encoding.h (rb_enc_left_char_head): add end argument. + + * regenc.h (onigenc_single_byte_left_adjust_char_head): ditto. + + * regenc.c (onigenc_get_right_adjust_char_head): follow the interface + change. + (onigenc_get_right_adjust_char_head_with_prev): ditto. + (onigenc_get_prev_char_head): ditto. + (onigenc_step_back): ditto. + (onigenc_get_left_adjust_char_head): ditto. + (onigenc_single_byte_code_to_mbc): ditto. + + * re.c: ditto. + + * string.c: ditto. + + * io.c: ditto. + + * regexec.c: ditto. + + * enc/euc_jp.c: ditto. + + * enc/cp949.c: ditto. + + * enc/shift_jis.c: ditto. + + * enc/gbk.c: ditto. + + * enc/big5.c: ditto. + + * enc/euc_tw.c: ditto. + + * enc/euc_kr.c: ditto. + + * enc/emacs_mule.c: ditto. + + * enc/gb18030.c: ditto. + + * enc/utf_8.c: ditto. + + * enc/utf_16le.c: ditto. + + * enc/utf_16be.c: ditto. + + * enc/utf_32le.c: ditto. + + * enc/utf_32be.c: ditto. + +Sun Sep 14 03:43:27 2008 Tanaka Akira + + * include/ruby/oniguruma.h (ONIGENC_STEP_BACK): add end argument. + (onigenc_step_back): ditto. + + * regenc.c (onigenc_step_back): add end argument. + + * regexec.c: follow the interface change. + +Sun Sep 14 03:20:03 2008 Tanaka Akira + + * include/ruby/oniguruma.h (onigenc_get_prev_char_head): add end + argument. + + * include/ruby/encoding.h (rb_enc_prev_char): ditto. + + * regenc.c (onigenc_get_prev_char_head): add end argument. + + * regparse.c: follow the interface change. + + * regexec.c: ditto. + + * string.c: ditto. + + * parse.y: ditto. + +Sun Sep 14 02:04:28 2008 Tanaka Akira + + * include/ruby/oniguruma.h + (onigenc_get_right_adjust_char_head_with_prev): add end argument. + + * regenc.c (onigenc_get_right_adjust_char_head_with_prev): use end + argument. + + * regexec.c (forward_search_range): follow the interface change. + +Sun Sep 14 01:38:26 2008 Tanaka Akira + + * include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): add + end argument. + + * include/ruby/encoding.h (rb_enc_right_char_head): add end argument. + + * regenc.c (onigenc_get_right_adjust_char_head): use end argument. + + * re.c (rb_reg_adjust_startpos): follow the interface change. + + * string.c (rb_str_index): ditto. + + * regexec.c (backward_search_range): ditto. + (onig_search): ditto. + +Sun Sep 14 00:43:28 2008 Tanaka Akira + + * ext/ripper/depend (ripper.o): it depends on ruby headers. + +Sat Sep 13 19:27:01 2008 Tanaka Akira + + * io.c (io_encoding_set): don't need argc argument. + (rb_io_s_pipe): update io_encoding_set call. + (rb_io_set_encoding): ditto. + +Sat Sep 13 18:46:41 2008 Tanaka Akira + + * transcode.c (rb_transcoding): align state field. + +Sat Sep 13 18:21:09 2008 Tanaka Akira + + * transcode.c (DECORATOR_P): renamed from SUPPLEMENTAL_CONVERSION. + +Sat Sep 13 18:05:37 2008 Tanaka Akira + + * io.c (make_writeconv): use rb_enc_name. + (make_readconv): ditto. + + * transcode.c (rb_econv_open_opts): ditto. + (econv_args): ditto. + (decorate_convpath): ditto. + (econv_set_replacement): ditto. + +Sat Sep 13 11:15:38 2008 Shugo Maeda + + * lib/rexml/document.rb: fixed typo. + +Sat Sep 13 10:53:13 2008 Tadayoshi Funaba + + * complex.c: refined. + + * rational.c: ditto. + +Sat Sep 13 03:44:52 2008 Tanaka Akira + + * transcode.c (rb_econv_prepare_opts): raise ArgumentError if + a broken string is specified as a replacement. + +Sat Sep 13 03:31:05 2008 Tanaka Akira + + * iseq.c (iseq_s_compile_file): use rb_file_open_str. + + * io.c (rb_file_open_generic): call validate_enc_binmode. + (rb_file_open_str): call FilePathValue. + +Sat Sep 13 02:58:05 2008 Tanaka Akira + + * io.c (validate_enc_binmode): extracted from rb_io_extract_modeenc. + (rb_io_extract_modeenc): use validate_enc_binmode. + (io_encoding_set): call validate_enc_binmode. + +Sat Sep 13 02:50:34 2008 Tanaka Akira + + * transcode.c (rb_econv_prepare_opts): initialize *opt and return 0 + if opthash is nil. + +Sat Sep 13 02:29:19 2008 Tanaka Akira + + * enc/trans/escape.trans: transcoder name renamed to use underscore. + + * transcode.c: follow the renaming. + +Sat Sep 13 02:12:17 2008 Tanaka Akira + + * transcode.c (rb_econv_init_by_convpath_i): new function. + (rb_econv_init_by_convpath): new function. + (econv_init): use rb_econv_init_by_convpath. + +Sat Sep 13 01:11:14 2008 Tanaka Akira + + * transcode.c (econv_args): take snamev_p and dnamev_p to prevent + possible GC problem. + +Sat Sep 13 00:38:54 2008 Tanaka Akira + + * transcode.c (enc_arg): take arg as VALUE * to prevent possible GC + problem. + +Fri Sep 12 23:19:41 2008 Tanaka Akira + + * transcode.c (rb_econv_add_transcoder_at): fix loop condition. + +Fri Sep 12 22:39:46 2008 Tanaka Akira + + * transcode.c (decorator_names): extracted from rb_econv_open. + (rb_econv_open): use decorator_names. + (econv_args): extracted from econv_init. + (econv_init): use econv_args. + (decorate_convpath): new function. + (search_convpath_i): new function. + (econv_s_search_convpath): new method. + (Init_transcode): new method defined. + +Fri Sep 12 21:55:43 2008 Tanaka Akira + + * transcode.c (rb_econv_t): new field: num_allocated. + (rb_econv_alloc): extracted from + rb_econv_open_by_transcoder_entries. + (rb_econv_add_transcoder_at): extracted from rb_econv_decorate_at + and generalized + (rb_econv_open_by_transcoder_entries): use rb_econv_alloc and + rb_econv_add_transcoder_at. + (rb_econv_add_converter): extracted from rb_econv_decorate_at. + (rb_econv_decorate_at): use rb_econv_add_converter. + + +Fri Sep 12 21:22:09 2008 Tanaka Akira + + * transcode.c (rb_econv_t): new field: started. + (rb_econv_open_by_transcoder_entries): initialize started field. + (rb_econv_convert): set started field. + (rb_econv_insert_output): ditto. + (rb_econv_decorate_at): check started field instead of num_finished. + +Fri Sep 12 20:28:59 2008 Tanaka Akira + + * regenc.c (onigenc_single_byte_code_to_mbc): follow OnigEncoding + change. + +Fri Sep 12 20:00:22 2008 Yusuke Endoh + + * regparse.c (parse_exp): fix resource leak. + +Fri Sep 12 01:21:22 2008 Yusuke Endoh + + * ext/syck/node.c (syck_replace_str2): fix wrong check to free ptr. + +Thu Sep 11 20:18:24 2008 Masaki Suketa + + * test/win32ole/test_err_in_callback.rb (teardown): get rid + of infinite loop. + +Thu Sep 11 19:12:56 2008 NARUSE, Yui + + * include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int. + + * include/ruby/encoding.h (rb_enc_codepoint): ditto. + + * encoding.c (rb_enc_codepoint): signed int to unsigned int. + + * encoding.c (rb_enc_ascget): ditto. + + * string.c (rb_str_casecmp): ditto. + + * string.c (enc_succ_alnum_char): ditto. + + * string.c (rb_str_inspect): ditto. + + * string.c (rb_str_upcase_bang): ditto. + + * string.c (rb_str_downcase_bang): ditto. + + * string.c (rb_str_capitalize_bang): ditto. + + * string.c (rb_str_swapcase_bang): ditto. + + * string.c (struct tr): ditto. + + * string.c (trnext): ditto. + + * string.c (tr_trans): ditto. + + * string.c (tr_setup_table): ditto. + + * string.c (tr_find): ditto. + + * string.c (rb_str_delete_bang): ditto. + + * string.c (rb_str_squeeze_bang): ditto. + + * string.c (rb_str_count): ditto. + + * string.c (rb_str_split_m): ditto. + + * string.c (rb_str_each_line): ditto. + + * string.c (rb_str_lstrip_bang): ditto. + + * string.c (rb_str_rstrip_bang): ditto. + + * string.c (rb_str_intern): ditto. + + * dir.c (char_casecmp): ditto. + + * sprintf.c (rb_str_format): ditto. + + * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. + + * enc/emacs_mule.c (code_to_mbc): ditto. + + * enc/gb18030.c (mbc_to_code): ditto. + + * enc/gb18030.c (code_to_mbc): ditto. + +Thu Sep 11 19:09:25 2008 NARUSE, Yui + + * ext/iconv/iconv.c: add attention for machine independent. + +Thu Sep 11 15:23:26 2008 Yukihiro Matsumoto + + * bignum.c (bigdivrem): adjust length for division and remainder. + a patch from TOYOFUKU Chikanobu in + [ruby-dev:36231]. + +Thu Sep 11 02:59:47 2008 Tanaka Akira + + * io.c (io_binwrite): extracted from io_fwrite. + +Thu Sep 11 02:25:34 2008 Tanaka Akira + + * transcode.c (make_encoding): new function. + (make_encobj): new function. + (econv_s_asciicompat_encoding): use make_encoding. + (rb_econv_open_exc): use SUPPLEMENTAL_CONVERSION. + (econv_convpath): use encoding object in the result. + +Thu Sep 11 02:14:38 2008 Tanaka Akira + + * transcode.c (econv_convpath): new method. + +Wed Sep 10 23:00:43 2008 Yusuke Endoh + + * tool/compile_prelude.rb: print "" instead of + "prelude.rb" on stack trace. [ruby-dev:36129] + +Wed Sep 10 21:19:58 2008 Yukihiro Matsumoto + + * bignum.c (big2str_karatsuba): remove unnecessary fixnum code. a + patch from TOYOFUKU Chikanobu in + [ruby-dev:36217]. + +Wed Sep 10 21:09:32 2008 Masaki Suketa + + * test/win32ole/test_err_in_callback.rb: InternetExplorer should + be closed. + + * test/win32ole/err_in_callback.rb: ditto. + +Wed Sep 10 18:25:19 2008 akira yamada + + * lib/uri/common.rb (URI::Parser): new class. + + * lib/uri/mailto.rb, lib/uri/generic.rb: follow the above change. + + * test/uri/test_parser.rb: added tests for URI::Parser. + +Wed Sep 10 10:35:32 2008 Takeyuki Fujioka + + * lib/cgi/cookie.rb (CGI::Cookie#to_s): performance improvement + from http://jp.rubyist.net/magazine/?0023-Cgirb. + +Wed Sep 10 10:12:29 2008 akira yamada + + * lib/sync.rb (Sync_m#sync_exclusive): fixed + typo. [ruby-dev:36233] [RubyForge#11680] + +Wed Sep 10 01:57:23 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (StrSet#hash): cache hash value. + (ActionMap#hash): ditto. + +Wed Sep 10 01:26:01 2008 Tanaka Akira + + * include/ruby/encoding.h (econv_after_output): renamed from + econv_output_followed_by_input. + (ECONV_AFTER_OUTPUT): renamed from ECONV_OUTPUT_FOLLOWED_BY_INPUT. + + * transcode.c: follow the renaming. + + * io.c: ditto. + +Wed Sep 10 01:16:07 2008 Tanaka Akira + + * transcode.c (get_replacement_character): don't return ASCII + incompatible replacements. + (make_replacement): don't convert the result of + get_replacement_character. + +Wed Sep 10 01:05:00 2008 Tanaka Akira + + * enc/trans/newline.trans (rb_universal_newline): swap src_encoding + and dst_encoding. + + * transcode.c (rb_econv_decorate_at): call get_transcoder_entry only + once. + (rb_econv_binmode): follow universal_newline change. + +Wed Sep 10 00:01:36 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): rename field: writeconv_stateless to + writeconv_asciicompat. + + * io.c: follow the renaming. + + * gc.c: ditto. + +Tue Sep 9 23:55:26 2008 Tanaka Akira + + * io.c (io_fwrite): raise an error if ASCII incompatible string + written for text mode IO without encoding conversion. + (rb_io_extract_modeenc): binmode requirement changed. + +Tue Sep 9 21:59:48 2008 Takeyuki Fujioka + + * lib/cgi*: split cgi.rb into four files. [ruby-dev:36041] + +Tue Sep 9 21:17:00 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_DECORATOR_MASK): merge + ECONV_ENCODER_MASK and ECONV_DECORATOR_MASK. + (ECONV_UNIVERSAL_NEWLINE_DECORATOR): renamed from + ECONV_UNIVERSAL_NEWLINE_DECODER. + (ECONV_CRLF_NEWLINE_DECORATOR): renamed from + ECONV_CRLF_NEWLINE_ENCODER. + (ECONV_CR_NEWLINE_DECORATOR): renamed from ECONV_CR_NEWLINE_ENCODER. + (ECONV_XML_TEXT_DECORATOR): renamed from ECONV_XML_TEXT_ENCODER. + (ECONV_XML_ATTR_CONTENT_DECORATOR): renamed from + ECONV_XML_ATTR_CONTENT_ENCODER. + (ECONV_STATEFUL_DECORATOR_MASK): renamed from + ECONV_STATEFUL_ENCODER_MASK. + (ECONV_XML_ATTR_QUOTE_DECORATOR): renamed from + ECONV_XML_ATTR_CONTENT_DECORATOR. + + * io.c: follow the renaming. + + * transcode.c: ditto. + +Tue Sep 9 20:55:55 2008 Tanaka Akira + + * transcode.c (rb_econv_open0): make it static. + (rb_econv_open): place decorators at last. + +Tue Sep 9 20:40:15 2008 Kazuhiro NISHIYAMA + + * test/openssl/test_ssl.rb (OpenSSL#test_client_session): + Debian's openssl 0.9.8g-13 failed at assert(ssl.session_reused?), + when use default SSLContext. [ruby-dev:36167] + +Tue Sep 9 20:34:26 2008 Tanaka Akira + + * transcode.c (rb_econv_t): last_trans_index removed. + (rb_econv_open_by_transcoder_entries): follow the type change. + (rb_econv_open0): ditto. + (rb_econv_decorate_at): ditto. + (rb_econv_binmode): ditto. + (rb_econv_insert_output): simplified because there are no decorators + at last. + +Tue Sep 9 20:21:54 2008 Tanaka Akira + + * transcode.c (rb_econv_open): reverse the order of decoders. + +Tue Sep 9 20:18:26 2008 Tanaka Akira + + * transcode.c (rb_econv_open0): num_encoders and num_decoders removed. + +Tue Sep 9 03:59:13 2008 Tanaka Akira + + * io.c (make_writeconv): useless branch removed. + +Tue Sep 9 02:18:20 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_decorate_at_first): declared. + (rb_econv_decorate_at_last): declared. + + * transcode.c (rb_econv_open_by_transcoder_entries): initialize + replacement_enc. allocate outbuf for the last transcoder. + (rb_econv_open0): extracted from rb_econv_open. + (rb_econv_open): use rb_econv_open0 and decorate the result using + rb_econv_decorate_at_first and rb_econv_decorate_at_last. + (rb_econv_decorate_at): new function. + (rb_econv_decorate_at_first): ditto. + (rb_econv_decorate_at_last): ditto. + (rb_econv_binmode): fix iteration end condition. + (econv_init): don't set source_encoding_name and + destination_encoding_name because they are set in rb_econv_open0. + +Tue Sep 9 01:10:54 2008 Tanaka Akira + + * transcode.c (rb_econv_open): make ec a local variable. + +Tue Sep 9 00:20:10 2008 Tanaka Akira + + * transcode.c (rb_econv_asciicompat_encoding): check decoder. + +Tue Sep 9 00:00:47 2008 Tanaka Akira + + * transcode.c (rb_econv_t): last_error.partial_input removed. + +Mon Sep 8 23:24:54 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_asciicompat_encoding): renamed + from rb_econv_stateless_encoding to apply stateless ASCII + incompatible encodings such as UTF-16BE. + + * io.c (make_writeconv): use rb_econv_asciicompat_encoding. + + * transcode_data.h (rb_transcoder_asciicompat_type_t): renamed from + rb_transcoder_stateful_type_t. + (rb_transcoder): use rb_transcoder_asciicompat_type_t. + + * transcode.c: follow the type change. + (asciicompat_encoding_i): renamed from stateless_encoding_i. + (rb_econv_asciicompat_encoding): renamed from + rb_econv_stateless_encoding. + (econv_s_asciicompat_encoding): method renamed. + + * tool/transcode-tblgen.rb: follow the type change. + + * enc/trans/utf_16_32.trans: follow the type change. + rb_from_UTF_16BE to UTF-8 is asciicompat_decoder. + rb_from_UTF_16LE to UTF-8 is asciicompat_decoder. + rb_from_UTF_32BE to UTF-8 is asciicompat_decoder. + rb_from_UTF_32LE to UTF-8 is asciicompat_decoder. + UTF-8 to rb_to_UTF_16BE is asciicompat_encoder. + UTF-8 to rb_to_UTF_16LE is asciicompat_encoder. + UTF-8 to rb_to_UTF_32BE is asciicompat_encoder. + UTF-8 to rb_to_UTF_32LE is asciicompat_encoder. + + * enc/trans/newline.trans: follow the type change. universal newline + decoder is asciicompat_converter. + + * enc/trans/escape.trans: follow the type change. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/japanese.trans: ditto. + +Mon Sep 8 23:05:42 2008 Tanaka Akira + + * transcode.c (rb_econv_insert_output): "readagain" part should be + after replacement. + +Mon Sep 8 22:30:03 2008 NARUSE, Yui + + * dir.c (dir_initialize): rename option name of Dir.open + from :external_encoding to :encoding. + +Mon Sep 8 22:16:20 2008 Takeyuki FUJIOKA + + * lib/cgi.rb : obsolete regex "n" option. [ruby-dev:36130] + +Mon Sep 8 18:13:20 2008 NAKAMURA Usaku + + * win32/win32.c (getppid): typo. [ruby-dev:36202] + + * process.c (get_ppid): mention the return value on Windows. + +Mon Sep 8 18:15:59 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ArrayCode): less string substitutions. + +Mon Sep 8 18:13:13 2008 Tanaka Akira + + * vm.c (rb_mRubyVMFrozenCore): registered for GC. + + * re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with + powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. + build 5367). + +Mon Sep 8 18:09:07 2008 NAKAMURA Usaku + + * win32/Makefile.sub (config.h): define SIZE_MAX for VC++6/7. + +Mon Sep 8 17:46:09 2008 NAKAMURA Usaku + + * win32/win32.c (filetime_to_unixtime): remove unused variable. + [ruby-dev:36191] + +Mon Sep 8 13:47:39 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_io.rb (TestIO#test_dup): add open in block. + see [ruby-dev:35957]. + +Mon Sep 8 07:09:42 2008 Tadayoshi Funaba + + * complex.c: some adjustments. + + * rational.c: ditto. + +Mon Sep 8 06:50:29 2008 Nobuyoshi Nakada + + * configure.in (XLDFLAGS): added --enable-auto-import for cygwin and + mingw. + +Mon Sep 8 02:04:25 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_set_replacement): renamed from + rb_econv_set_replacemenet. + + * transcode.c: follow the renaming. + +Mon Sep 8 01:10:41 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (transcode_tblgen): log message refined. + +Mon Sep 8 00:58:04 2008 Tadayoshi Funaba + + * rational.c: removed unused code. + +Mon Sep 8 00:04:09 2008 Tanaka Akira + + * enc/trans/iso2022.trans: upcase to iso-2022-jp. + + * enc/emacs_mule.c: ditto. + +Sun Sep 7 23:46:36 2008 Tanaka Akira + + * enc/trans/iso2022.trans: stateless-iso-2022-jp is defined to avoid + undefined conversion error between iso-2022-jp and the corresponding + stateless encoding. + + * enc/emacs_mule.c: replicate emacs-mule as stateless-iso-2022-jp. + +Sun Sep 7 20:03:01 2008 Tanaka Akira + + * enc/trans/escape.trans (hexstr): renamed from str1. + +Sun Sep 7 19:45:31 2008 Tanaka Akira + + * enc/trans/escape.trans: use transcode_tblgen. + + * tool/transcode-tblgen.rb: generate an empty line after str1. + +Sun Sep 7 19:16:38 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ActionMap#str_name): new method to + generate a name base on string content. + (ActionMap#gen_str): extracted from generate_info and use str_name. + +Sun Sep 7 18:28:05 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ActionMap#generate_info): use a memo to + avoid duplication for STR1. + +Sun Sep 7 18:10:28 2008 Tanaka Akira + + * transcode_data.h (STR1): defined for a string up to 255 bytes. + (STR1_BYTEINDEX): defined. + (makeSTR1): defined. + + * tool/transcode-tblgen.rb: generate STR1. + + * transcode.c (transcode_restartable0): interpret STR1. + + * enc/trans/escape.trans (fun_so_escape_xml_chref): removed. STR1 is + used instead. + +Sun Sep 7 17:54:45 2008 Kazuhiro NISHIYAMA + + * configure.in: Mac OS X's crypt(2) is broken with invalid salt. + [ruby-dev:35899] + * string.c (rb_str_crypt): ditto. + +Sun Sep 7 17:29:49 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: o4 is usable only if the first byte is + f0-f7. + +Sun Sep 7 12:44:26 2008 Tanaka Akira + + * io.c (make_writeconv): choose ASCII compatible encoding as + intermediate encoding if stateful encoder exists. + +Sun Sep 7 12:09:29 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_XML_ATTR_CONTENT_ENCODER): defined. + (ECONV_STATEFUL_ENCODER_MASK): defined. + (ECONV_XML_ATTR_QUOTE_ENCODER): defined. + (ECONV_XML_ATTR_ENCODER): removed. + + * enc/trans/escape.trans (rb_escape_xml_attr_content): defined. + (rb_escape_xml_attr_quote): defined. + (rb_escape_xml_attr): removed. + + * io.c (NEED_WRITECONV): writeconv is required if supplemental + converter is used. + (make_writeconv): apply stateful encoder in writeconv. + + * transcode.c: follow the constant change. + +Sun Sep 7 07:24:09 2008 Yukihiro Matsumoto + + * misc/*.el: merged the following patches from Nathan Weizenbaum + . [ruby-core:18424] + + * misc/ruby-mode.el: improve here-doc performance. + + * misc/ruby-mode.el: don't crash the whole mode if the Subversion + $ keyword isn't interpolated. + + * misc/ruby-mode.el: don't highlight keywords when they're the + beginning of non-keyword symbols. + + * misc/ruby-mode.el, misc/ruby-electric.el: use regexp-opt where + possible for more efficient regexps. + + * misc/*.el: untabify, for internal consistency and consistency + with standard Emacs elisp files. + + * misc/ruby-mode.el: fix a variable-name error. + + * misc/emacs-mode.el: don't set case-fold-search globally to nil; + instead just set it when we need it. + +Sun Sep 7 06:31:51 2008 Yukihiro Matsumoto + + * file.c (file_expand_path): applied a patch from Nobuhiro Tachino + in [ruby-dev:35948]. fix #491 + +Sun Sep 7 03:37:05 2008 Yukihiro Matsumoto + + * parse.y (f_block_optarg): allow default for block parameters as + long as the value is primary. a patch from Eric Mahurin + in [ruby-core:16880]. + +Sun Sep 7 01:07:10 2008 Yukihiro Matsumoto + + * parse.y (yylex): "1.upto 2 {|i| p i }" should be syntax error. + [ruby-dev:36008] + + * test/ruby/test_parse.rb (TestParse): update a test not to use + recently fixed inconsistent syntax. + +Sun Sep 7 00:37:25 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_ERROR_HANDLER_MASK): defined. + (ECONV_DECODER_MASK): defined. + (ECONV_ENCODER_MASK): defined. + + * io.c (make_writeconv): restrict ecflags for writeconv with + ECONV_ERROR_HANDLER_MASK. + +Sat Sep 6 23:03:41 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_XML_TEXT_ENCODER): renamed from + ECONV_HTML_TEXT_ENCODER. + (ECONV_XML_ATTR_ENCODER): renamed from ECONV_HTML_ATTR_ENCODER. + + * enc/trans/escape.trans: follow the renaming. + + * transcode.c: ditto. + +Sat Sep 6 21:35:52 2008 Yukihiro Matsumoto + + * ext/socket/mkconstants.rb: add some IPV6 constants. [ruby-dev:36175] + +Sat Sep 6 20:10:48 2008 Tanaka Akira + + * transcode.c (econv_description): show ECONV_HTML_TEXT_ENCODER and + ECONV_HTML_ATTR_ENCODER. + +Sat Sep 6 20:06:09 2008 Tanaka Akira + + * transcode.c (rb_econv_binmode): check actual transcoders. + +Sat Sep 6 19:54:25 2008 Tanaka Akira + + * transcode.c (rb_econv_open): fix last_tc. + +Sat Sep 6 19:36:34 2008 Tanaka Akira + + * io.c (rb_io_binmode): clear newline flags in writeconv_pre_ecflags. + +Sat Sep 6 18:47:40 2008 Tanaka Akira + + * transcode.c (str_transcode0): check ECONV_HTML_TEXT_ENCODER and + ECONV_HTML_ATTR_ENCODER. + +Sat Sep 6 18:38:47 2008 Tanaka Akira + + * transcode.c (allocate_converted_string): fix overflow condition. + +Sat Sep 6 15:06:21 2008 Tanaka Akira + + * transcode.c (sym_html): new variable. + (sym_text): ditto. + (sym_attr): ditto. + (econv_opts): check :html=>:text and :html=>:attr. + (Init_transcode): initialize the above variables. + +Sat Sep 6 14:46:12 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_HTML_TEXT_ENCODER): new constant. + (ECONV_HTML_ATTR_ENCODER): ditto. + + * transcode.c (rb_econv_open): check ECONV_HTML_TEXT_ENCODER and + ECONV_HTML_ATTR_ENCODER. + (Init_transcode): Encoding::Converter::HTML_TEXT_ENCODER and + Encoding::Converter::HTML_ATTR_ENCODER defined. + +Sat Sep 6 14:15:25 2008 Tanaka Akira + + * transcode.c (struct trans_open_t): defined to pass num_additional. + (trans_open_i): use struct trans_open_t. + (rb_econv_open): ditto. + +Sat Sep 6 13:43:20 2008 Tanaka Akira + + * enc/trans/escape.trans (fun_so_escape_html_attr): fix return type. + +Sat Sep 6 12:43:55 2008 Tanaka Akira + + * transcode.c (rb_econv_open): needless branch removed. + +Sat Sep 6 12:38:34 2008 Tanaka Akira + + * transcode.c (rb_econv_open): test condition simplified. + +Sat Sep 6 12:25:31 2008 Tanaka Akira + + * transcode.c (stateless_encoding_i): ignore supplemental conversions. + Encoding::Converter.stateless_encoding("html-attr-escaped") should be + nil. + +Sat Sep 6 12:19:36 2008 Tanaka Akira + + * enc/trans/escape.trans (escape_html_attr_init): new function. + (fun_so_escape_html_attr): new function. + (escape_html_attr_finish): new function. + (rb_escape_html_attr): use them to quote the converted result. + +Sat Sep 6 07:54:36 2008 Tadayoshi Funaba + + * complex.c: uses f_real_p macro. + +Sat Sep 6 07:27:00 2008 Tanaka Akira + + * transcode.c (rb_econv_open): fail for ASCII incompatible with + newline conversion. + +Sat Sep 6 07:24:49 2008 Tanaka Akira + + * io.c (rb_io_extract_modeenc): raise an error for ASCII incompatible + encoding without binmode. + +Sat Sep 6 07:12:42 2008 Yukihiro Matsumoto + + * bignum.c (bigdivrem1): optimization by skipping zeros at the + tail of digits. a patch from TOYOFUKU Chikanobu + in [ruby-dev:36169]. + +Sat Sep 6 06:28:46 2008 Tanaka Akira + + * enc/trans/escape.trans: new file. + +Sat Sep 6 06:23:27 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (StrSet.parse): accept upper case + hexadecimal digits. + +Sat Sep 6 05:37:08 2008 Tanaka Akira + + * transcode.c (output_hex_charref): upcase hexadecimal digits. + +Sat Sep 6 05:22:29 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_UNDEF_HEX_CHARREF): defined. + + * transcode.c (output_hex_charref): new function. + (rb_econv_convert): call output_hex_charref if + ECONV_UNDEF_HEX_CHARREF. + (Init_transcode): Encoding::Converter::UNDEF_HEX_CHARREF added. + +Sat Sep 6 03:52:47 2008 Tanaka Akira + + * transcode.c (rb_econv_convert): use ECONV_INVALID_MASK and + ECONV_UNDEF_MASK. + +Sat Sep 6 06:05:09 2008 Yukihiro Matsumoto + + * include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM. + a patch from Tadashi Saito + in [ruby-dev:36102]. + +Sat Sep 6 04:44:06 2008 Yukihiro Matsumoto + + * proc.c (Init_Proc): add '===' operator to use procs in when + clause of the case statement. inspired by . + +Sat Sep 6 03:18:17 2008 Tanaka Akira + + * transcode.c (allocate_converted_string): add arguments for a buffer + allocated by caller. + (rb_econv_insert_output): provide caller allocated buffer to + allocate_converted_string. + +Sat Sep 6 02:58:53 2008 Tanaka Akira + + * transcode.c (str_transcode_enc_args): local variables renamed. + (str_transcode0): ditto. + +Sat Sep 6 02:23:18 2008 Tanaka Akira + + * transcode.c (econv_s_stateless_encoding): new method. + +Sat Sep 6 02:01:59 2008 Tanaka Akira + + * transcode.c (enc_arg): extracted from str_transcode_enc_args. + (str_transcode_enc_args): use enc_arg. + +Fri Sep 5 20:27:17 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_modestr_fmode): renamed from + rb_io_mode_flags. + (rb_io_modestr_oflags): renamed from rb_io_mode_modenum. + (rb_io_oflags_fmode): renamed from rb_io_modenum_flags. + (rb_io_mode_flags): defined as a macro. + (rb_io_modenum_flags): ditto. + + * io.c: follow the renaming with consistency. + + * process.c (check_exec_redirect): call rb_io_modestr_oflags. + + * ext/pty/depend: pty.o depends on io.h. + +Fri Sep 5 20:12:23 2008 Tanaka Akira + + * enc/trans/newline.trans (universal_newline_finish): new function. + +Fri Sep 5 20:07:37 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_mode_modenum): moved from + include/ruby/intern.h. + +Fri Sep 5 19:59:26 2008 Tanaka Akira + + * io.c (MODENUM_MAX): removed. + +Fri Sep 5 18:37:52 2008 Nobuyoshi Nakada + + * io.c (copy_stream_fallback_body): use read method unless readpartial + is available. [ruby-dev:36124] + +Fri Sep 5 18:16:31 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_create): strips glibc style option before + charset mapping. retries without options if they seemed causing + error, and warns. [ruby-dev:36147] + +Fri Sep 5 03:09:48 2008 Koichi Sasada + + * iseq.c (iseq_data_to_ary): make it static. + + * thread.c (thgroup_enclose): ditto. + +Fri Sep 5 02:56:37 2008 Koichi Sasada + + * vm.c (thread_recycle_stack_slot, thread_recycle_stack_count): + make it static. + +Fri Sep 5 02:40:38 2008 Koichi Sasada + + * thread.c (rb_thread_critical): removed. + +Fri Sep 5 01:22:23 2008 Tanaka Akira + + * io.c (argf_mark): mark p->encs.ecopts. + +Fri Sep 5 00:45:07 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): rename fields: + from_encoding -> src_encoding, to_encoding -> dst_encoding. + + * transcode.c: follow the renaming. + +Fri Sep 5 00:22:34 2008 Tanaka Akira + + * transcode.c: variables renamed for consistency. + +Fri Sep 5 00:05:27 2008 Tanaka Akira + + * pack.c (encodes): make buff fixed length to avoid SEGV by + ruby -e '["a"*10000000].pack("m1000000000")' + +Thu Sep 4 23:47:05 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (BigDecimal_mode): set exception mode + correctly. In spite of BigDecimal.mode(BigDecimal::EXCEPTION_ALL, + true), BigDecimal.new("NaN") did not raise an exception previously. + +Thu Sep 4 23:42:42 2008 Tanaka Akira + + * include/ruby/intern.h (rb_file_open_str): declared. + + * io.c (rb_file_open_str): defined. + + * ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of + rb_file_open. + +Thu Sep 4 23:18:55 2008 Tanaka Akira + + * enc/trans/newline.trans: record newline types met in universal + newline decoder. + +Thu Sep 4 23:05:54 2008 Yuki Sonoda (Yugui) + + * lib/prime.rb (Prime::OldCompatibility#each): added compatibility to + Ruby 1.8.7. + (Prime#each): added more rdocs. + (Prime#each): remembers the last value of the given block. + +Thu Sep 4 21:53:58 2008 Tanaka Akira + + * transcode.c (econv_init): accept an integer as 3rd argument as well. + +Thu Sep 4 21:46:21 2008 Tanaka Akira + + * transcode.c (sym_partial_input): new variable. + (econv_primitive_convert): accept a hash as 5th argument as well. + +Thu Sep 4 21:04:27 2008 Tanaka Akira + + * transcode.c (sym_universal_newline_decoder): new variable. + (sym_crlf_newline_encoder): ditto. + (sym_cr_newline_encoder): ditto. + (econv_opts): check newline converter options. + (econv_init): make 3rd argument hash/nil only. + +Thu Sep 4 21:03:28 2008 Koichi Sasada + + * vm_dump.c: rename some debug functions. + +Thu Sep 4 20:57:54 2008 Koichi Sasada + + * thread.c (rb_thread_check_trap_pending): added for compatibility. + + * ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: remove ruby/signal.h + dependency. + +Thu Sep 4 20:30:24 2008 Tanaka Akira + + * transcode_data.h (PType): defined unconditionally. + + * transcode.c (PType): don't define here. + +Thu Sep 4 20:19:36 2008 Tanaka Akira + + * io.c: variables renamed for consistency. + +Thu Sep 4 19:40:50 2008 Narihiro Nakamura + + * gc.c (gc_profile_record_get): to static function. + (gc_profile_result): ditto. + (gc_profile_report): ditto. + +Thu Sep 4 19:20:24 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_enc_t): rename flags to ecflags. + (rb_io_t): rename writeconv_pre_flags to writeconv_pre_ecflags. + (MakeOpenFile): follow the renaming. + + * io.c: follow the renaming. + +Thu Sep 4 19:10:27 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_INVALID_IGNORE): removed because + it tend to cause security problem. If the behaviour is really + required, ECONV_INVALID_REPLACE with empty string can be used. + For example, CVE-2006-2313, CVE-2008-1036, [ruby-core:15645], + http://unicode.org/reports/tr36/ + (ECONV_UNDEF_IGNORE): ditto. + + * transcode.c (rb_econv_convert): follow the above change. + (econv_opts): ditto. + (Init_transcode): ditto. + +Thu Sep 4 13:22:02 2008 Nobuyoshi Nakada + + * vm_core.h (struct rb_vm_struct): replaced signal staff with trap + staff. + + * signal.c (signal_buff): per process resource now. + + * signal.c (trap_list): moved to VM. + + * signal.c (rb_get_next_signal): reverted. + + * signal.c (rb_trap_exit): trap_pending_list was no longer used. + + * thread.c (timer_thread_function): delivers buffered per-process + signals to each VMs. + + * vm.c (rb_vm_mark): marks trap_list. + +Thu Sep 4 13:01:11 2008 Nobuyoshi Nakada + + * io.c (struct sysopen_struct, rb_sysopen_internal, rb_sysopen): + constified. + + * io.c: expanded ARGF members macros. + +Thu Sep 4 10:43:47 2008 Nobuyoshi Nakada + + * tool/transcode-tblgen.rb (citrus_decode_mapsrc): support older 1.8. + +Thu Sep 4 10:33:43 2008 Nobuyoshi Nakada + + * io.c (argf_next_argv, argf_set_encoding): copy struct wise. + +Thu Sep 4 09:46:18 2008 Tanaka Akira + + * io.c (rb_scan_open_args): follow rb_str_transcode change. + +Thu Sep 4 08:59:29 2008 Tanaka Akira + + * file.c (rb_find_file): fix GC problem on Debian GNU/Linux (IA64) + with gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21). + There is no register/memory to contain load_path. A register (r35) + contains &RARRAY_PTR(load_path), (char*)load_path + 32. + +Thu Sep 4 03:10:05 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): new fields: encs.ecopts and + writeconv_pre_ecopts. + (MakeOpenFile): initialize them. + + * include/ruby/encoding.h (rb_str_transcode): take ecopts argument. + (rb_econv_flags): removed. + (rb_econv_prepare_opts): declared. + (rb_econv_open_opts): declared. + + * io.c (make_writeconv): use rb_econv_open_opts. + (make_readconv): ditto. + (io_fwrite): follow rb_str_transcode change. + (rb_io_extract_modeenc): use rb_econv_prepare_opts. + (rb_file_open_generic): initialize encs.ecopts. + (rb_file_open_internal): ditto. + (rb_io_reopen): ditto. + (argf_ecopts): defined. + (argf_next_argv): set encs.ecopts. + (io_encoding_set): use rb_econv_prepare_opts. + (argf_set_encoding): set argf_ecopts. + + * gc.c (gc_mark_children): mark encs.ecopts and writeconv_pre_ecopts + in T_FILE. + + * transcode.c (transcode_loop): take ecopts argument. use + rb_econv_open_opts. + (rb_econv_flags): removed. + (rb_econv_prepare_opts): defined. + (rb_econv_open_opts): defined. + (str_transcode0): take ecopts. + (str_transcode): use rb_econv_prepare_opts. + (rb_str_transcode): take ecopts. + (econv_init): accept hash argument. + (econv_insert_output): follow rb_str_transcode change. + +Thu Sep 4 01:30:26 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_set_replacemenet): declared. + + * transcode.c (rb_econv_t): new fields: replacement_str, + replacement_len, replacement_enc and replacement_allocated. + (get_replacement_character): make len as size_t. + (rb_econv_open_by_transcoder_entries): initialize the new fields. + (rb_econv_close): deallocate replacement_str if it allocated. + (make_replacement): new function. + (output_replacement_character): use make_replacement. + (rb_econv_set_replacemenet): defined. + (econv_get_replacement): new method. + (econv_set_replacement): new method. + +Thu Sep 4 01:12:03 2008 NAKAMURA Usaku + + * win32/win32.c (filetime_to_timeval): new function, split from + gettimeofday(). + + * win32/win32.c (gettimeofday): use above function. + + * win32/win32.c (filetime_to_unixtime): ditto. [ruby-dev:36135] + +Thu Sep 4 01:00:57 2008 NAKAMURA Usaku + + * transcode.c (transcode_restartable0): avoid VC++6's bug. + +Thu Sep 4 00:26:27 2008 NAKAMURA Usaku + + * io.c (make_writeconv): follow akr's previous commit. + +Thu Sep 4 00:09:05 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_option_t): removed. Since + rb_econv_option_t has only one field, int flags, rb_econv_option_t is + replaced by int. + + * include/ruby/io.h: follow the above change. + + * io.c: ditto. + + * transcode.c: ditto. + +Thu Sep 4 00:04:59 2008 Koichi Sasada + + * win32/win32.c: fix ruby/signal.h depending codes. + +Thu Sep 4 00:01:45 2008 Yusuke Endoh + + * test/etc/test_etc.rb (test_getpwuid, test_getgrgid): use + Process.euid and egid instead of Etc.getlogin to identify current + user which may be different from a login one (e.g., su command). + +Wed Sep 3 23:52:47 2008 Yusuke Endoh + + * test/etc/test_etc.rb: check only typical use of + setpwent/getpwent/endpwent and setgrent/getgrent/endgrent. + +Wed Sep 3 23:33:09 2008 Tanaka Akira + + * transcode.c (rb_transcoding): moved from transcode_data.h. + (TRANSCODING_READBUF): ditto. + (TRANSCODING_WRITEBUF): ditto. + (TRANSCODING_STATE_EMBED_MAX): ditto. + (TRANSCODING_STATE): ditto. + +Wed Sep 3 23:03:37 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): remove stateful field. + add state field. + (TRANSCODING_STATE): defined. + (rb_transcoder): add fields: state_size, state_init_func, + state_fini_func. + change rb_transcoding* argument to void*. + + * transcode.c (transcode_restartable0): use TRANSCODING_STATE for + first arguments of transcoder functions. + (rb_transcoding_open_by_transcoder): initialize state field. + (rb_transcoding_close): finalize state field. + + * tool/transcode-tblgen.rb: provide state size/init/fini. + + * enc/trans/newline.trans (universal_newline_init): defined. + (fun_so_universal_newline): take void* as a state pointer. + (rb_universal_newline): provide state size/init/fini. + (rb_crlf_newline): ditto. + (rb_cr_newline): ditto. + + * enc/trans/iso2022.trans (iso2022jp_init): defined. + (fun_si_iso2022jp_to_eucjp): take void* as a state pointer. + (fun_so_iso2022jp_to_eucjp): ditto. + (fun_so_eucjp_to_iso2022jp): ditto. + (iso2022jp_reset_sequence_size): ditto. + (finish_eucjp_to_iso2022jp): ditto. + (rb_ISO_2022_JP_to_EUC_JP): provide state size/init/fini. + (rb_EUC_JP_to_ISO_2022_JP): ditto. + + * enc/trans/utf_16_32.trans (fun_so_from_utf_16be): take void* as a + state pointer. + (fun_so_to_utf_16be): ditto. + (fun_so_from_utf_16le): ditto. + (fun_so_to_utf_16le): ditto. + (fun_so_from_utf_32be): ditto. + (fun_so_to_utf_32be): ditto. + (fun_so_from_utf_32le): ditto. + (fun_so_to_utf_32le): ditto. + (rb_from_UTF_16BE): provide state size/init/fini. + (rb_to_UTF_16BE): ditto. + (rb_from_UTF_16LE): ditto. + (rb_to_UTF_16LE): ditto. + (rb_from_UTF_32BE): ditto. + (rb_to_UTF_32BE): ditto. + (rb_from_UTF_32LE): ditto. + (rb_to_UTF_32LE): ditto. + + * enc/trans/japanese.trans (fun_so_eucjp2sjis): take void* as a state + pointer. + (fun_so_sjis2eucjp): ditto. + (rb_eucjp2sjis): provide state size/init/fini. + (rb_sjis2eucjp): provide state size/init/fini. + +Wed Sep 3 22:31:11 2008 Yuki Sonoda (Yugui) + + * lib/mathn.rb (Integer): moved into prime.rb. + (Prime): ditto. + + * lib/prime.rb (Integer): moved from mathn.rb. + (Integer.each_prime): added. + (Integer#prime?): added. + (Prime): moved from mathn.rb. + Its implementation was rewritten. see [ruby-dev:35863]. + And patched by Keiju ISHITSUKA , + see [ruby-dev:36128]. + (Prime.new): obsolete. + (Prime.instance): added. + (Prime.each): added. + (Prime.int_from_prime_division): added. + (Prime.prime_division): added. + (Prime.prime?): added. + Patch by TOYOFUKU Chikanobu + in [ruby-dev:36067]. + (Prime.cache): removed. + (Prime.primes): removed. + (Prime.primes_so_far): removed. + (Prime#int_from_prime_division): added. + (Prime#prime_division): added. + (Prime#prime?): added. + (Prime#primes): removed. + (Prime#primes_so_far): removed. + (Prime::PseudoPrmeGenerator): added. + (Prime::EratosthenesGenerator): added. + (Prime::TrialDivisionGenerator): added. + (Prime::Generator23): added. + (Prime::TrialDivision): added. + Extracted from the previous implementation of Prime + by Keiju ISHITSUKA. + (Prime::EratosthenesSieve): added. + + * lib/.document (prime.rb): added + + * lib/README (prime.rb): added + + * test/test_prime.rb: added. + +Wed Sep 3 21:49:00 2008 David A. Black + + * lib/scanf.rb: fixed bug involving matching literal '[' + + * test/scanf/test_scanf.rb: added test for scanf.rb fix + +Wed Sep 3 21:31:59 2008 Tanaka Akira + + * transcode_data.h (WORDINDEX_SHIFT_BITS): defined. + (WORDINDEX2INFO): defined. + (INFO2WORDINDEX): defined. + + * tool/transcode-tblgen.rb: use WORDINDEX2INFO. + + * transcode.c: use INFO2WORDINDEX. + +Wed Sep 3 21:19:51 2008 Kazuhiro NISHIYAMA + + * golf_prelude.rb: suppress warnings when goruby -v. + +Wed Sep 3 21:07:30 2008 Tanaka Akira + + * transcode.c (BL_MIN_BYTE): defined. + (BL_MAX_BYTE): defined. + (BL_OFFSET): defined. + (BL_ACTION): defined. + (transcode_restartable0): use BL_MIN_BYTE, BL_MAX_BYTE and + BL_ACTION. + +Wed Sep 3 20:58:30 2008 Tanaka Akira + + * transcode.c (BYTE_ADDR): defined. + (WORD_ADDR): ditto. + (BL_BASE): use BYTE_ADDR and WORD_ADDR. + (BL_INFO): use WORD_ADDR. + +Wed Sep 3 20:47:31 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): new field: byte_array_length and + word_array_length. + + * tool/transcode-tblgen.rb (transcode_generated_code): generate + byte_array_length and word_array_length. + +Wed Sep 3 20:34:10 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ArrayCode): new class. + (ActionMap#gen_array_code): moved to ArrayCode. + (ActionMap#numelt_array_code): ditto. + (ActionMap#array_code_insert_at_last): ditto. + (TRANSCODE_GENERATED_BYTES_CODE): use ArrayCode. + (TRANSCODE_GENERATED_WORDS_CODE): ditto. + +Wed Sep 3 20:08:35 2008 Tanaka Akira + + * enc/trans/japanese.trans: new file. + +Wed Sep 3 20:04:33 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ActionMap#gen_array_code): extracted from + generate_lookup_node. + (ActionMap#numelt_array_code): ditto. + (ActionMap#array_code_insert_at_last): ditto. + +Wed Sep 3 20:01:01 2008 Tanaka Akira + + * parse.y (parser_encoding_name): defined. + (parser_tokadd_mbchar): show encoding in the message of + "invalid multibyte char" error. + +Wed Sep 3 19:28:04 2008 NAKAMURA Usaku + + * vm_insnhelper.c (vm_method_missing): C99. + +Wed Sep 3 19:18:12 2008 Koichi Sasada + + * test/ruby/test_thread.rb: fix test. + [ruby-dev:35960] + +Wed Sep 3 17:48:32 2008 NARUSE, Yui + + * enc/trans/make_transdb.rb: check $(srcdir)/enc/trans before + enc/trans. + + * enc/trans/make_transdb.rb: keep names_t. + +Wed Sep 3 16:54:46 2008 Koichi Sasada + + * include/ruby/signal.h: removed. + + * common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, + io.c, process.c, signal.c: vm_core.h: ditto. + Some unused external global variables are also removed. + (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, + rb_thread_critical) + + * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, + ext/readline/readline.c, ext/socket/depend, + ext/socket/socket.c: ditto. + +Wed Sep 3 00:23:25 2008 Yusuke Endoh + + * vm_insnhelper.c (vm_method_missing): copy arguments to allocated + memory from machine stack. [ruby-dev:36064] + +Tue Sep 2 22:20:26 2008 Tanaka Akira + + * transcode_data.h (base_element): removed. + (BYTE_LOOKUP): removed. + (BYTE_LOOKUP_BASE): don't cast. + (BYTE_LOOKUP_INFO): ditto. + (PType): unsigned int, instead of uintptr_t. + (rb_transcoding): change type of next_field, conv_tree_start and + word_array. + + * tool/transcode-tblgen.rb: generate word_array as array of unsigned + int. + + * transcode.c (transcode_restartable0): follow the above type change. + +Tue Sep 2 21:22:22 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: add prefix for byte_array and word_array. + +Tue Sep 2 20:57:14 2008 Tanaka Akira + + * enc/trans/make_transdb.rb: check foo.c only if foo.trans exists. + +Tue Sep 2 19:19:55 2008 Tanaka Akira + + * enc/trans/make_transdb.rb: error message improved. + +Tue Sep 2 14:05:50 2008 NAKAMURA Usaku + + * enc/trans/utf_16_32.trans (from_UTF_8): rename from to_UTF_16BE + because it was not collect. + +Tue Sep 2 14:00:54 2008 Yuki Sonoda (Yugui) + + * enc/emacs_mule.c (svn:executable): dropped executable bit. + + * enc/make_encdb.rb (svn:executable): ditto. + +Tue Sep 2 12:58:58 2008 NAKAMURA Usaku + + * win32/Makefile.sub (COMPILERFLAG): new compiler flag to compile + enc/trans/japanese*.c. + +Tue Sep 2 12:37:10 2008 Tanaka Akira + + * enc/trans/japanese_euc.trans: splitted from japanese.trans to avoid + compiler limitation. reported by usa. + + * enc/trans/japanese_sjis.trans: ditto. + +Tue Sep 2 12:31:24 2008 NAKAMURA Usaku + + * win32/Makefile.sub (miniruby): new target. + +Tue Sep 2 11:47:36 2008 Nobuyoshi Nakada + + * marshal.c (struct load_arg): data is now st_table. + + * marshal.c (mark_load_arg): marks data and compat_tbl. + + * marshal.c (r_object0): no need to check if reentered. + + * marshal.c (marshal_load): make the wrapper with mark_load_arg. + +Tue Sep 2 10:49:18 2008 NAKAMURA Usaku + + * win32/win32.c (gettimeofday): easier calculation. use the definition + of the Gregorian calendar. + +Tue Sep 2 10:33:12 2008 Yuki Sonoda (Yugui) + + * common.mk (distclean-golf): moved golf_prelude.c here from + distclean-local. + (GOLFPRELUDE): added. + (distclean-local): moved golf_prelude.c into distclean-golf. + +Tue Sep 2 10:09:17 2008 NAKAMURA Usaku + + * win32/win32.c (gettimeofday): calc tv_sec and tv_usec from system + time by myself. [ruby-dev:36084] + +Tue Sep 2 04:00:37 2008 Tanaka Akira + + * transcode_data.h (o3): prevent sign extension on 64bit environment. + (o4): ditto. + +Tue Sep 2 03:26:24 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: comment removed in generated code. + +Tue Sep 2 03:16:42 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: define TRANSCODE_TABLE_INFO in generated + code. use it in rb_transcoder. + + * enc/trans/newline.trans: use TRANSCODE_TABLE_INFO. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + +Tue Sep 2 03:04:33 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: record infos and BYTE_LOOKUPs as index of + word_array to avoid relocation. + + * transcode.c (transcode_restartable0): add word_array to get infos + and BYTE_LOOKUPs. + + * transcode_data.h (BYTE_LOOKUP_INFO): change return type to + uintptr_t. + +Tue Sep 2 02:48:30 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: don't need to cast offsets array. + +Tue Sep 2 02:36:20 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: record offsets array as index of + byte_array to avoid relocation. + + * transcode.c (transcode_restartable0): add byte_array to get offsets + array. + + * transcode_data.h (BYTE_LOOKUP_BASE): change return type to + uintptr_t. + (rb_transcoder): add fields: byte_array, word_array and word_size. + + * enc/trans/newline.trans: follow rb_transcoder change. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + +Tue Sep 2 02:05:14 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: make infos arrays and BYTE_LOOKUPs into + single array. + +Tue Sep 2 01:47:44 2008 Yuki Sonoda (Yugui) + + * common.mk (clean-golf): added. + (distclean-golf): added. + (realclean-golf): added. + (clean): added clean-golf. + (distclean): added distclean-golf. + (realclean): added realclean-golf. + +Tue Sep 2 01:31:45 2008 Yuki Sonoda (Yugui) + + * common.mk (realclean-local): added newline.c. + +Tue Sep 2 01:19:15 2008 Tanaka Akira + + * transcode_data.h (BYTE_LOOKUP): change to uintptr_t array. + (BYTE_LOOKUP_BASE): follow the type change. + (BYTE_LOOKUP_INFO): ditto. + (PType): ditto. + (rb_transcoding): ditto. + + * tool/transcode-tblgen.rb: follow the type change. + + * transcode.c: ditto. + + * enc/trans/newline.trans: ditto. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + +Mon Sep 1 23:32:46 2008 Tanaka Akira + + * transcode_data.h (BYTE_LOOKUP_BASE): abstract accessor for + BYTE_LOOKUP. + (BYTE_LOOKUP_INFO): ditto. + + * transcode.c (transcode_restartable0): use BYTE_LOOKUP_BASE and + BYTE_LOOKUP_INFO. + +Mon Sep 1 23:14:25 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: gather infos arrays and BYTE_LOOKUPs. + +Mon Sep 1 22:42:54 2008 Yuki Sonoda (Yugui) + + * lib/mkmf.rb (distclean): added RM_RF conftest.dSYM. + Fixes distclean-ext problem on Mac OS X. + (RM_RF): added. + +Mon Sep 1 22:37:06 2008 Shugo Maeda + + * lib/rexml/document.rb: limit entity expansion. Thanks, Luka + Treiber, Mitja Kolsek, and Michael Koziarski. + + * lib/rexml/entity.rb: ditto. + + * test/rexml/test_document.rb: ditto. + +Mon Sep 1 22:20:22 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: make offsets arrays into single array. + +Mon Sep 1 21:46:18 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: gather offsets arrays at top. + +Mon Sep 1 21:09:04 2008 Yuki Sonoda (Yugui) + + * ./: removed rubyspec from svn:ignore subversion property. + rubyspec directory is no longer used. + + * spec: added mspec and rubyspec to svn:ignore. + +Mon Sep 1 19:37:19 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: ValidEncoding['eucJP-ms'] defined. + "\xA2\xAF".encode("utf-8", "eucJP-ms") should raise + Encoding::ConversionUndefined, not Encoding::InvalidByteSequence. + +Mon Sep 1 18:27:51 2008 NAKAMURA Usaku + + * win32/win32.c (gettimeofday): shouldn't use mktime(3) because it's + buggy about handling summer time. + reported by Yoshikawa at [ruby-dev:36071] + +Mon Sep 1 17:07:23 2008 NARUSE, Yui + + * enc/euc_jp.c (euc-jp-ms): euc-jp-ms is not an alias of EUC-JP + but eucJP-ms. + + * enc/trans/japanese.trans (eucJP-ms): eucJP-ms is the correct + name of the encoding in Ruby. [ruby-dev:36070] + +Mon Sep 1 16:48:50 2008 Nobuyoshi Nakada + + * ext/digest/md5/md5init.c (md5), ext/digest/rmd160/rmd160init.c + (rmd160) ext/digest/sha1/sha1init.c (sha1), + ext/digest/sha2/sha2init.c (sha256, sha384, sha512): constified. + +Mon Sep 1 15:15:40 2008 NARUSE, Yui + + * enc/trans/japanese.trans: fix mapping priority. + IBM extended is prior than NEC selected IBM. + +Mon Sep 1 14:44:22 2008 NARUSE, Yui + + * tool/transcode-tblgen.rb (transcode_compile_tree): use the first + mapping when some mappings are given for a character. + [ruby-dev:36068] + + * tool/transcode-tblgen.rb: expandtab. + +Mon Sep 1 14:40:18 2008 Yuki Sonoda (Yugui) + + * README.EXT (Appendix A): fixed the name of class + Enumerator. Enumerable::Enumerator was renamed just + Enumerator at revision 18564. + + * README.EXT (Appendix A): ditto. + +Mon Sep 1 14:37:58 2008 NAKAMURA Usaku + + * tool/transcode-tblgen.rb: set ERB source filename for error message. + +Mon Sep 1 14:37:02 2008 Nobuyoshi Nakada + + * enc/depend: transdb.c may not present. + +Mon Sep 1 14:25:26 2008 NARUSE, Yui + + * enc/trans/japanese.trans: fix Ruby 1.8 compatibility. + + * enc/trans/japanese.trans: fix mapping priority. [ruby-dev:36068] + +Mon Sep 1 14:24:14 2008 NARUSE, Yui + + * test/ruby/test_transcode.rb (test_windows_31j): added. + +Mon Sep 1 14:00:04 2008 Yuki Sonoda (Yugui) + + * README.EXT (Data-types): fixed for current status. + (Manipulating Ruby data): mentioned some more functions. + (Class/module definition): ditto. + (Global variables shared between C and Ruby): + fixed prototypes for the getter/setter's of global variables. + (Appendix A): mentioned some more files. + + * README.EXT.ja: ditto. + +Mon Sep 1 11:31:49 2008 Nobuyoshi Nakada + + * lib/fileutils.rb (copy_stream, fu_copy_stream0, copy_file): use + IO.copy_stream to get rid of extraneous conversion. + +Mon Sep 1 02:55:15 2008 NAKAMURA Usaku + + * strftime.c (rb_strftime): calc timezone offset by myself if system + doesn't provide timezone info. + +Mon Sep 1 02:48:28 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: change "illegal" to "invalid". + +Mon Sep 1 02:31:16 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (transcode_generated_code): defined for + generating table at once. + (transcode_tblgen): returns an empty string. + (transcode_generate_node): ditto. + + * enc/trans/newline.trans: use transcode_generated_code. + + * enc/trans/iso2022.trans: ditto. + + * enc/trans/single_byte.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + + * enc/trans/japanese.trans: ditto. + + * enc/trans/korean.trans: ditto. + +Mon Sep 1 02:10:03 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (citrus_decode_mapsrc): print logging + message on STDERR. + +Mon Sep 1 01:24:09 2008 NARUSE, Yui + + * enc/trans/eucjp-tbl.rb: replace by previous Citrus maps. + + * enc/trans/sjis-tbl.rb: ditto. + +Mon Sep 1 01:18:26 2008 NARUSE, Yui + + * tool/transcode-tblgen.rb: add table generator from Citrus maps. + + * enc/trans/japanese.trans: use Citrus maps. + + * enc/trans/CP: add maps from Citrus. + + * enc/trans/JIS: ditto. + + * test/ruby/test_transcode.rb: Shift_JIS and EUC-JP doesn't support + IBM extended characters. + +Mon Sep 1 00:19:45 2008 Yuki Sonoda (Yugui) + + * common.mk (docs): removed a useless make target. + tool/makedoc.rb was removed at revision 13919. + +Sun Aug 31 20:49:42 2008 Tadayoshi Funaba + + * complex.c (numeric_abs2): new. + +Sun Aug 31 18:22:04 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (have_devel?): checks if the compiler works. + +Sun Aug 31 18:02:41 2008 Yuki Sonoda (Yugui) + + * Temporarily uses git://github.com/yugui/rubyspec.git + until specs for 1.9 is merged into + git://github.com/rubyspec/rubyspec.git. + +Sun Aug 31 18:06:49 2008 Tanaka Akira + + * transcode.c (transcode.c): set source_encoding and + destination_encoding as encoding object. + (ecerr_source_encoding): new method. + (ecerr_destination_encoding): ditto. + +Sun Aug 31 17:58:59 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (Logging.log_open): opens in binary mode to get rid of + extra CR. + + * lib/mkmf.rb (try_func, try_var, have_struct_member), + (scalar_ptr_type?, scalar_type?): use MAIN_DOES_NOTHING. + + * lib/mkmf.rb (MAIN_DOES_NOTHING): defaults to ordinary main. + + * win32/Makefile.sub (config): for MAIN_DOES_NOTHING for wince. + +Sun Aug 31 17:30:35 2008 Yuki Sonoda (Yugui) + + * spec/README (How to run): added. + +Sun Aug 31 17:28:25 2008 Yuki Sonoda (Yugui) + + * spec/default.mspec (config): added. + + * spec/default.mspec (target): replaced the built ruby + to runruby.rb. + Improved $LOAD_PATH on running specs. + + * spec/default.mspec (flags): ditto. + +Sun Aug 31 17:16:07 2008 Tanaka Akira + + * transcode.c (make_econv_exception): rename instance variable names + for storing encoding names. + (ecerr_source_encoding_name): method renamed. + (ecerr_destination_encoding_name): ditto. + +Sun Aug 31 16:57:36 2008 Tanaka Akira + + * transcode.c (econv_putback): associate encoding to the result. + +Sun Aug 31 16:43:56 2008 Koichi Sasada + + * include/ruby/intern.h: rename RB_UBF_DFL to + RUBY_UBF_IO and RUBY_UBF_PROCESS. + Because there is no default (universal) unblocking function. + + * ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto. + +Sun Aug 31 16:42:23 2008 Tanaka Akira + + * transcode.c (econv_insert_output): raise ArgumentError on failure. + +Sun Aug 31 16:39:17 2008 Koichi Sasada + + * bootstraptest/test_thread.rb: add a test. + +Sun Aug 31 16:34:41 2008 Tanaka Akira + + * enc/trans/single_byte.trans (us_ascii_map): don't define 8bit bytes. + +Sun Aug 31 14:27:27 2008 Tanaka Akira + + * transcode.c (econv_last_error): new method. + +Sun Aug 31 14:17:34 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): make two arguments, + destination_byteoffset and destination_bytesize, optional. + +Sun Aug 31 14:12:06 2008 Tanaka Akira + + * transcode.c (make_econv_exception): error message simplified. + +Sun Aug 31 13:47:59 2008 Nobuyoshi Nakada + + * ext/coverage/coverage.c (rb_mCoverage): removed unneeded static variable. + + * ext/socket/socket.c (unix_recv_io): ditto. + + * ext/socket/socket.c (mConst): ditto. + +Sun Aug 31 13:45:41 2008 Nobuyoshi Nakada + + * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): fix for + initialization of r18168. + +Sun Aug 31 13:42:39 2008 Nobuyoshi Nakada + + * ext/ripper/eventids2.c (ripper_init_eventids2): use rb_intern_const. + + * ext/ripper/tools/generate.rb (generate_eventids1): ditto. + + * ext/ripper/tools/generate.rb (generate_eventids2_table): ditto. + +Sun Aug 31 12:56:00 2008 Tanaka Akira + + * ext/dl/mkcallback.rb (rb_dl_init_callbacks): fix indent. + +Sun Aug 31 11:39:21 2008 Tanaka Akira + + * ext/strscan/strscan.c (strscan_do_scan): fix usecnt decrement. + +Sun Aug 31 04:38:47 2008 Tanaka Akira + + * transcode.c (econv_putback): make max argument optional. + +Sun Aug 31 04:35:21 2008 Tanaka Akira + + * transcode.c (rb_econv_putback): putback from last byte. + +Sun Aug 31 04:27:04 2008 Tanaka Akira + + * transcode.c (econv_putback): renamed from econv_primitive_putback. + +Sun Aug 31 04:22:51 2008 Tanaka Akira + + * transcode.c (econv_insert_output): renamed from + econv_primitive_insert_output. + +Sun Aug 31 04:20:46 2008 Tanaka Akira + + * test/ruby/test_econv.rb: follow econv_primitive_errinfo change. + +Sun Aug 31 03:44:24 2008 Tanaka Akira + + * transcode.c (econv_primitive_errinfo): 5th element (partial_input) + removed from result. + +Sun Aug 31 01:53:31 2008 Tanaka Akira + + * ext/dl/mkcallback.rb: split callback.h to callback-[0-9].c to reduce + memory consumption on compilation. [ruby-dev:31898] + + * ext/dl/depend: add dependency for callback-[0-9].[co]. + +Sun Aug 31 01:27:46 2008 Tanaka Akira + + * ext/dl/mkcallback.rb (foreach_proc_entry): extracted. + (gencallback): ditto. + (gen_push_proc_ary): ditto. + (gen_push_addr_ary): ditto. + +Sat Aug 30 23:51:01 2008 Masatoshi SEKI + + * test/rinda/test_tuplebag.rb (test_has_expires_eh): fix failures + [ruby-dev:35937]. + +Sat Aug 30 23:38:00 2008 Tanaka Akira + + * ext/dl/test/test_import.rb: fix character code. + + * ext/dl/test/test_func.rb: ditto. + +Sat Aug 30 22:23:31 2008 Tadayoshi Funaba + + * rational.c: added a static variable for nurat_to_f. + +Sat Aug 30 20:05:41 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_open, rb_w32_read, rb_w32_write): fallback to + MSVCRT if text mode is specified. this case will not be used from + ruby itself. + +Sat Aug 30 19:49:38 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_read): EOF is not error. + ref [ruby-dev:36050] + +Sat Aug 30 18:17:40 2008 Nobuyoshi Nakada + + * parse.y (struct token_info): constified. + + * parse.y (token_info_get_column, token_info_has_nonspaces), + (token_info_push, token_info_pop): constified. + +Sat Aug 30 15:43:03 2008 Yukihiro Matsumoto + + * ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed. + a patch in [ruby-dev:35880]. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. + + * ext/strscan/strscan.c (strscan_do_scan): ditto. + +Sat Aug 30 14:58:32 2008 Nobuyoshi Nakada + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): fix for + initialization of r18168. + +Sat Aug 30 14:47:30 2008 Tanaka Akira + + * ext/dl/mkcallback.rb: fix continuation line detection. + +Sat Aug 30 14:39:51 2008 Tanaka Akira + + * ext/dl/mkcallback.rb (rb_dl_init_callbacks): avoid GC problem which + is caused by 'GC.stress=true; require "dl"'. + +Sat Aug 30 11:54:17 2008 Yukihiro Matsumoto + + * parse.y (token_info_push): -w warns indentation level mismatch. + based on a patch from Yukina Yamano presented at RubyKaigi'07. + See and + (Japanese). + +Sat Aug 30 10:46:44 2008 Koichi Sasada + + * ext/iconv/iconv.c: remove include pragma for "ruby/intern.h". + +Sat Aug 30 10:43:03 2008 Koichi Sasada + + * parse.y: remove include pragma for "ruby/intern.h". + +Sat Aug 30 10:41:57 2008 Nobuyoshi Nakada + + * lib/rake.rb (Rake::Application#help): fix for OPTIONAL_ARGUMENT and + multiple short options. [ruby-dev:36051] + +Sat Aug 30 08:59:25 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_file_s_absolute_path), + (rb_file_absolute_path): prototyped. + +Sat Aug 30 08:09:36 2008 NARUSE, Yui + + * encoding.c (enc_compatible_p): use TYPE not BUILTIN_TYPE. + [ruby-dev:36048] + +Sat Aug 30 07:48:48 2008 NARUSE, Yui + + * encoding.c (enc_compatible_p): add SPECIAL_CONST_P check. + [ruby-dev:36048] + + * test/ruby/test_m17n.rb (test_compatible): fix test. + +Sat Aug 30 02:48:11 2008 Yukihiro Matsumoto + + * object.c (rb_obj_freeze): update rdoc to mention RuntimeError + (not TypeError any longer) would be raised. [ruby-dev:35982] + +Sat Aug 30 01:55:30 2008 Yukihiro Matsumoto + + * bignum.c (bigdivmod): remove redundant code. a patch from + TOYOFUKU Chikanobu in [ruby-dev:36044]. + +Sat Aug 30 01:37:20 2008 Yukihiro Matsumoto + + * lib/cgi.rb (CGI#initialize): remove unused constants. a patch + from Takeyuki Fujioka in [ruby-dev:36046]. + +Fri Aug 29 22:29:41 2008 Tadayoshi Funaba + + * complex.c ({nucomp,numeric}_rect): new. + + * complex.c: added some aliases + (::rectangular, ::rect, #rectangular, #rect, #phase, + #magnitude). + + * complex.c (string_to_c_internal): should not strip any null + bytes. + + * rational.c (string_to_r_internal): ditto. + + * rational.c (i_gcd): reverted to nurat 0.0.2's one. + + * numeric.c: added an alias (#magnitude). + + * bignum.c: ditto. + + * test/ruby/test_complex.rb: added assertions. + + * test/ruby/test_rational.rb: ditto. + +Fri Aug 29 19:46:02 2008 Koichi Sasada + + * gc.c, include/ruby/ruby.h: rename T_DEFERRED to T_ZOMBIE. + +Fri Aug 29 18:22:27 2008 NARUSE, Yui + + * encoding.c (enc_compatible_p): raise TypeError when argument is not + String nor Regexp. + +Fri Aug 29 18:20:56 2008 NARUSE, Yui + + * string.c (rb_str_index_m): only regexp uses byte offset. + + * string.c (rb_str_rindex_m): ditto. + +Fri Aug 29 16:48:34 2008 Koichi Sasada + + * vm_insnhelper.c (vm_call_method): copy arguments to allocated + memory from machine stack. [ruby-dev:36028] + + * KNOWNBUGS.rb, bootstraptest/test_method.rb: move fixed test. + +Fri Aug 29 12:19:12 2008 Nobuyoshi Nakada + + * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): fix for + initialization of r18168. + + * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): ditto. + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. + +Fri Aug 29 11:04:03 2008 NARUSE, Yui + + * encoding.c (rb_enc_compatible): ASCII compatible string and US-ASCII + regexp is compatible. [ruby-dev:36033] + + * string.c (rb_str_index_m): second argument is position of character. + by usa. [ruby-dev:36033] + + * string.c (rb_str_rindex_m): ditto. + +Fri Aug 29 04:47:49 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_read, rb_w32_write): more accurate handling + of wait result. + +Fri Aug 29 02:59:35 2008 Tanaka Akira + + * transcode.c (econv_finish): new method. + +Fri Aug 29 02:45:29 2008 Tanaka Akira + + * transcode.c (econv_convert): new method. + +Fri Aug 29 02:38:14 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): accept nil as + destination_bytesize for unlimited destination size. + +Fri Aug 29 02:11:46 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): accept nil as input for empty + input. + +Fri Aug 29 02:03:56 2008 Shugo Maeda + + * strftime.c (rb_strftime): supported %s and %P. + + * time.c (time_strftime): ditto. + + * test/ruby/test_time.rb (test_strftime): ditto. + +Fri Aug 29 01:57:58 2008 Tanaka Akira + + * transcode.c (sym_invalid_byte_sequence): new variable. + (sym_undefined_conversion): ditto. + (sym_destination_buffer_full): ditto. + (sym_source_buffer_empty): ditto. + (sym_finished): ditto. + (sym_output_followed_by_input): ditto. + (sym_incomplete_input): ditto. + (econv_result_to_symbol): use above variables. + (Init_transcode): initialize above variables. + +Fri Aug 29 00:53:40 2008 Shugo Maeda + + * strftime.c (rb_strftime): fixed a bug of padding. + + * test/ruby/test_time.rb: ditto. + +Fri Aug 29 00:19:54 2008 NAKAMURA Usaku + + * win32/win32.c (set_pioinfo_extra): use MSVCRT's open() and close(). + +Fri Aug 29 00:03:13 2008 Yusuke Endoh + + * file.c (file_expand_path): check invalid access. + +Thu Aug 28 23:55:50 2008 Shugo Maeda + + * strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") should + return "0", not "". + + * test/ruby/test_time.rb: ditto. + +Thu Aug 28 23:55:22 2008 Yusuke Endoh + + * test/ruby/test_time.rb: suppress warning during test. + +Thu Aug 28 23:50:47 2008 Yusuke Endoh + + * test/ruby/test_time.rb (test_strftime): make test for %a independent + from local timezone. [ruby-dev:35992] + +Thu Aug 28 23:39:49 2008 Yusuke Endoh + + * string.c (rb_str_shared_replace): remove corrupt noembed string + which causes SEGV. [ruby-dev:35989] + +Thu Aug 28 23:36:15 2008 Tanaka Akira + + * common.mk: dependency updated. + +Thu Aug 28 23:28:57 2008 Yusuke Endoh + + * KNOWNBUGS.rb: add a test. see [ruby-dev:36028] + +Thu Aug 28 21:43:05 2008 NAKAMURA Usaku + + * win32/win32.c, include/ruby/win32.h (rb_w32_open): overlapped file + I/O support. + + * win32/win32.c, include/ruby/win32.h (rb_w32_pipe): overlapped pipe + I/O support. + + * win32/win32.c (rb_w32_read, rb_w32_write): overlapped I/O support to + enable canceling I/O. + + * thread_win32.c (ubf_handle): remove workaround. + +Thu Aug 28 20:22:49 2008 Yukihiro Matsumoto + + * vm_insnhelper.c (vm_yield_setup_args): object with to_ary should + behave like array. a patch from Yusuke Endoh + in [ruby-dev:35988]. [ruby-dev:35977] + + * object.c (convert_type): call less rb_intern() less frequently + by using cache structure. + + * vm_method.c (rb_method_node): fail earlier if no method found. + +Thu Aug 28 19:04:50 2008 NAKAMURA Usaku + + * bootstraptest/test_io.rb: no need to create real file. + +Thu Aug 28 09:26:53 2008 NARUSE, Yui + + * test/cgi/test_cgi_multipart.rb: add test for multipart. + Patch by Takeyuki Fujioka. [ruby-dev:36014] + From CGIAlt http://cgialt.rubyforge.org/ + +Thu Aug 28 09:22:01 2008 NARUSE, Yui + + * test/cgi/test_cgi_modruby.rb: add test for mod_ruby adaptor. + Patch by Takeyuki Fujioka. [ruby-dev:36013] + From CGIAlt http://cgialt.rubyforge.org/ + +Thu Aug 28 09:17:10 2008 NARUSE, Yui + + * test/cgi/test_cgi_header.rb: add test for CGI::Header. + Patch by Takeyuki Fujioka. [ruby-dev:36010] [ruby-dev:36011] + From CGIAlt http://cgialt.rubyforge.org/ + +Thu Aug 28 02:16:49 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): refcnt field removed. + (MakeOpenFile): refcnt initialization removed. + + * io.c (rb_io_fptr_finalize): don't check refcnt. + (rb_io_close_read): don't use refcnt. + +Thu Aug 28 00:07:59 2008 Tanaka Akira + + * io.c (rb_io_initialize): don't accept IO object. [ruby-dev:35895] + +Wed Aug 27 23:28:51 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]= + accepts number argument. + + * test/win32ole/test_win32ole.rb: ditto. + +Wed Aug 27 14:45:34 2008 NARUSE, Yui + + * test/cgi/test_cgi_core.rb: add core test. + Patch by Takeyuki Fujioka. [ruby-dev:36001] [ruby-dev:36002] + From CGIAlt http://cgialt.rubyforge.org/ + +Wed Aug 27 10:34:42 2008 NARUSE, Yui + + * lib/cgi.rb (CGI::Cookie): remove delegate. + Patch by Takeyuki Fujioka. [ruby-dev:35995] + + * test/cgi/test_cgi_cookie.rb: added for above. + Patch by Takeyuki Fujioka. [ruby-dev:35996] + From CGIAlt http://cgialt.rubyforge.org/ + +Wed Aug 27 01:13:54 2008 Tanaka Akira + + * transcode.c (transcode_loop): simplified. + +Wed Aug 27 01:03:23 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_result_t): enumeration constant: + econv_incomplete_input. + + * io.c (finish_writeconv): check econv_incomplete_input. + + * transcode.c (transcode_restartable0): return econv_incomplete_input + for unexpected end of source buffer. + (trans_sweep): check econv_incomplete_input. + (rb_trans_conv): ditto. + (rb_econv_convert0): ditto. + (rb_econv_convert): ditto. + (transcode_loop): ditto. + (make_econv_exception): change message for econv_incomplete_input. + (econv_result_to_symbol): return :incomplete_input for + econv_incomplete_input. + (ecerr_incomplete_input): new method. + +Wed Aug 27 00:05:55 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): rename crbuf to cbuf. + + * io.c: follow the renaming. + +Tue Aug 26 23:52:24 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_elem_t): move to transcode.c + (rb_econv_t): defined as an incomplete type. + + * transcode.c (rb_econv_elem_t): moved from encoding.h. + (rb_econv_t): complete type defined. + +Tue Aug 26 22:44:12 2008 NAKAMURA Usaku + + * time.c (time_asctime): workaround for MSVCRT's bug. + based on a patch from wanabe at + [ruby-dev:35831] and a suggestion by KIMURA Koichi + at [ruby-dev:35832] + fixed [ruby-dev:35555] + +Tue Aug 26 21:53:56 2008 Tanaka Akira + + * transcode.c (rb_econv_open): disable newline conversion for ASCII + incompatible encodings. + (str_transcode0): don't need disable newline conversion here. + +Tue Aug 26 21:44:39 2008 Tanaka Akira + + * transcode.c (rb_econv_binmode): binmode is effective only once. + +Tue Aug 26 19:43:59 2008 Yukihiro Matsumoto + + * file.c (rb_file_s_expand_path): new class method for class File. + + * file.c (file_expand_path): add absolute_path handling (no ~user + expansion). [ruby-core:18319] + +Tue Aug 26 19:27:54 2008 Akinori MUSHA + + * test/ruby/test_enum.rb (TestEnumerable#test_each_with_object): + Add a test for Enumerable#each_with_object. + +Tue Aug 26 19:25:44 2008 Akinori MUSHA + + * test/ruby/test_enumerator.rb (TestEnumerator#test_with_object): + Add (back) the test for Enumerator#with_object. + +Tue Aug 26 16:16:43 2008 NARUSE, Yui + + * test/cgi/test_cgi_tag_helper.rb: add more tests for html3. + Patch by Takeyuki Fujioka. [ruby-dev:35975] + From CGIAlt http://cgialt.rubyforge.org/ + +Tue Aug 26 14:43:10 2008 Akinori MUSHA + + * enumerator.c: Activate Enumerator#with_object and add + Enumerable#each_with_object. [experimental] + +Tue Aug 26 14:38:32 2008 Akinori MUSHA + + * enumerator.c (enumerator_initialize), + test/ruby/test_enumerator.rb: Add an ability to generate an + enumerator from a block. [experimental] [ruby-dev:35903] + +Tue Aug 26 13:25:25 2008 Martin Duerst + + * test/ruby/test_transcode.rb: added test_euc_jp + (contributed by Yoshihiro Kambayashi) + +Tue Aug 26 11:54:15 2008 NARUSE, Yui + + * test/cgi/test_cgi_tag_helper.rb: added by Takeyuki Fujioka. + [ruby-dev:35971] + +Tue Aug 26 11:33:30 2008 NARUSE, Yui + + * lib/cgi.rb (nOE_element_def): fix error when cascade methods which + don't have arguments. Patch by Takeyuki Fujioka. [ruby-dev:35964] + + * lib/cgi.rb (blockquote): String#collect (this depends on + String#each) is no longer exists. + Patch by Takeyuki Fujioka. [ruby-dev:35946] + + * lib/cgi.rb (blockquote): ditto. + +Tue Aug 26 03:06:48 2008 Tanaka Akira + + * io.c (make_writeconv): copy invalid/undef flags. + +Tue Aug 26 02:47:08 2008 Yuki Sonoda (Yugui) + + * common.mk (dist): tool/make-snapshot is executable. + + * tool/make-snapshot (package): supported release numbers 1.9.0-x. + +Tue Aug 26 02:43:50 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): new field: writeconv_pre_opts. + + * io.c (make_writeconv): initialize writeconv_pre_opts. + (io_fwrite): use writeconv_pre_opts. + +Tue Aug 26 01:48:31 2008 Tanaka Akira + + * io.c: test _WIN32 for CRLF platform. (cygwin defines O_BINARY.) + +Tue Aug 26 01:29:26 2008 Tanaka Akira + + * io.c: force CRLF handling if RUBY_TEST_CRLF_ENVIRONMENT is defined. + This is only for testing. + +Tue Aug 26 01:26:31 2008 Tanaka Akira + + * transcode.c (str_transcode0): disable newline conversion for ASCII + incompatible encoding. + +Tue Aug 26 00:55:46 2008 Tanaka Akira + + * transcode.c (str_transcode0): don't short cut for newline conversion. + +Tue Aug 26 00:36:01 2008 Tanaka Akira + + * io.c (io_fwrite): add TEXTMODE_NEWLINE_ENCODER to option for + rb_str_transcode. + +Tue Aug 26 00:24:23 2008 Tanaka Akira + + * transcode.c (make_econv_exception): show readagain part for invalid + byte sequence exception. store the part as an instance variable. + (ecerr_readagain_bytes): new method to access the readagain part. + +Tue Aug 26 00:02:49 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (VpMult): fix double free. + +Mon Aug 25 23:59:36 2008 Tanaka Akira + + * transcode.c (rb_econv_open): make last_tc NULL if there are only + additional transcoders. + (econv_description): extracted from rb_econv_open_exc. + (rb_econv_open_exc): use econv_description. + (econv_inspect): use econv_description. + +Mon Aug 25 23:56:42 2008 NAKAMURA Usaku + + * win32.c (init_stdhandle): set binmode. + +Mon Aug 25 23:38:17 2008 Tadayoshi Funaba + + * lib/date/format.rb(strftime): %[LN] can print with given + arbitrary precision. + + * lib/date/format.rb(strftime): optional flags and filed width + should also affect %[nt]. + +Mon Aug 25 23:01:17 2008 Yukihiro Matsumoto + + * compile.c (defined_expr): default defined? should return + "expression" without evaluating the expression. [ruby-dev:35967] + +Mon Aug 25 22:46:01 2008 Yusuke Endoh + + * test/ruby/test_thread.rb (test_status_and_stop_p): reduce the risk + of race condition. + +Mon Aug 25 22:39:57 2008 Yusuke Endoh + + * lib/irb/extend-command.rb (def_extend_command): check number of + arguments. [ruby-dev:35074] + + * lib/irb/ext/multi-irb.rb (search): check if a corresponding job is + found. [ruby-dev:35074] + +Mon Aug 25 22:29:13 2008 Yusuke Endoh + + * test/ruby/test_io.rb (test_dup): fix typo. see [ruby-dev:35958] + +Mon Aug 25 22:02:35 2008 Tanaka Akira + + * transcode.c (rb_econv_open_by_transcoder_entries): initialize + last_error. num_trans may be zero. + (rb_econv_convert0): num_trans may be zero. + (rb_econv_putbackable): ditto. + (rb_econv_putback): ditto. + (rb_econv_convert): input_ptr and output_ptr may be NULL. + +Mon Aug 25 19:05:27 2008 Yukihiro Matsumoto + + * compile.c (defined_expr): should handle NODE_{AND,OR} as + "expression". [ruby-dev:35951] + +Mon Aug 25 17:36:26 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_io_ungetbyte): added prototype. + + * io.c (rb_io_gets): use rb_io_getline_1 for unget buffer. + + * ruby.c (load_file): use rb_io_ungetbyte. + + * transcode.c (rb_econv_substr_append): fix for buffer overrun. + + * win32/enc-setup.mak (BUILTIN_TRANSOBJS): added. + +Mon Aug 25 14:22:21 2008 Yuki Sonoda (Yugui) + + * parse.y (YYSTYPE): struct RVarmap has been no longer + defined. + see also r11717 by matz. + +Mon Aug 25 10:42:18 2008 Nobuyoshi Nakada + + * transcode.c (rb_econv_open_exc): constified. + +Mon Aug 25 07:10:21 2008 NARUSE, Yui + + * enc/emacs_mule.c: fix ctype. + +Mon Aug 25 00:52:31 2008 Tanaka Akira + + * configure.in (BUILTIN_TRANSSRCS): defined. + (BUILTIN_TRANSOBJS): defined. + + * enc/Makefile.in (BUILTIN_TRANSES): defined. + + * enc/make_encmake.rb (BUILTIN_TRANSES): defined. + + * enc/depend: don't generate rules for builtin transcoders. + + * common.mk (COMMONOBJS): add BUILTIN_TRANSOBJS. + (enc.mk): pass BUILTIN_TRANSOBJS. + (newline.c): new rule. + (newline.$(OBJEXT)): new rule. + (srcs): newline.c added. + + * Makefile.in (BUILTIN_TRANSSRCS): defined. + (BUILTIN_TRANSOBJS): defined. + + * transcode.c (Init_transcode): call Init_newline. + +Mon Aug 25 00:11:02 2008 Tanaka Akira + + * transcode.c (declare_transcoder): arguments order changed. + (rb_declare_transcoder): call declare_transcoder just once. + +Sun Aug 24 19:48:46 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_t): use rb_econv_option_t. + + * transcode.c: follow the rb_econv_t change. + +Sun Aug 24 19:40:13 2008 Tanaka Akira + + * io.c (rb_io_init_copy): copy encs. + +Sun Aug 24 19:17:31 2008 Tanaka Akira + + * io.c (rb_io_open): add an argument: vperm. + (open_key_args): call rb_io_open with perm. + +Sun Aug 24 19:11:07 2008 Tanaka Akira + + * io.c (sym_invalid): removed. + (sym_undef): removed. + (sym_ignore): removed. + (sym_replace): removed. + +Sun Aug 24 19:07:17 2008 Tanaka Akira + + * io.c (rb_io_reopen): initialize fptr->encs.opts. + +Sun Aug 24 18:37:42 2008 Tanaka Akira + + * io.c (rb_io_s_pipe): accept optional hash. + (rb_io_set_encoding): ditto. + (rb_io_extract_modeenc): use rb_econv_opts to initialize + ecopts. + (rb_file_open_generic): ditto. + (rb_file_open_internal): ditto. + (io_encoding_set): new argument: opt. + (argf_set_encoding): copy fptr->encs.opts to argf_ecopts. + + * transcode.c (rb_econv_opts): accept Qnil for initialization. + +Sun Aug 24 18:10:08 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_enc_t): add opts field. + (FMODE_INVALID_MASK): removed. + (FMODE_INVALID_IGNORE): ditto. + (FMODE_INVALID_REPLACE): ditto. + (FMODE_UNDEF_MASK): ditto. + (FMODE_UNDEF_IGNORE): ditto. + (FMODE_UNDEF_REPLACE): ditto. + (MakeOpenFile): initialize the opts field. + + * io.c (make_writeconv): use the opts field. + (io_fwrite): ditto. + (make_readconv): ditto. + (argf_ecopts): new macro. + (rb_io_extract_modeenc): fill the opts field. + (argf_next_argv): ditto. + (rb_file_open_generic): initialize the opts field. + (rb_file_open_internal): ditto. + (io_encoding_set): ditto. + (argf_set_encoding): ditto. + +Sun Aug 24 18:02:14 2008 Tanaka Akira + + * io.c (struct argf): use struct rb_io_enc_t. + (argf_enc): follow the struct argf change. + (argf_enc2): ditto. + +Sun Aug 24 17:36:21 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_str_transcode): make 3rd argument + rb_econv_option_t*. + + * transcode.c (transcode_loop): take rb_econv_option_t* as a argument. + (str_transcode0): ditto. + (str_transcode): make rb_econv_option_t and call str_transcode0 with + it. + (rb_str_transcode): take rb_econv_option_t*. + + * io.c (io_fwrite): follow the rb_str_transcode change. + +Sun Aug 24 16:47:32 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): make enc and enc2 as struct + rb_io_enc_t; + + * io.c: follow the structure change. + (convconfig_t): defined by rb_io_enc_t. + +Sun Aug 24 16:19:25 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_opts): declared. + + * transcode.c (rb_econv_opts): defined. + + * io.c (rb_io_extract_modeenc): use rb_econv_opts. + +Sun Aug 24 16:06:30 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_option_t): defined. + (rb_econv_open): 3rd arg changed. + (rb_econv_open_exc): ditto. + + * io.c (make_writeconv): use rb_econv_option_t. + (make_readconv): ditto. + (rb_econv_open): take rb_econv_option_t for options. + (rb_econv_open_exc): ditto. + (transcode_loop): use rb_econv_option_t. + (econv_init): use rb_econv_option_t. + +Sun Aug 24 15:43:41 2008 Tanaka Akira + + * transcode.c (rb_econv_substr_append): associate dst with destination + encoding when dst is created. + +Sun Aug 24 15:21:28 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_str_transcode): add ecflags argument. + + * transcode.c (econv_opts): extracted from str_transcode. + (str_transcode_enc_args): extracted from str_transcode. + (str_transcode0): extracted from str_transcode. + (str_transcode): use econv_opts, str_transcode_enc_args, + str_transcode0. + (rb_str_transcode): call str_transcode0. + (econv_primitive_insert_output): give the additional argument for + rb_str_transcode. + + * io.c (make_writeconv): use invalid/undef flags. + (io_fwrite): ditto. + (rb_scan_open_args): give the additional argument for + rb_str_transcode. + +Sun Aug 24 13:27:42 2008 Tanaka Akira + + * transcode.c (str_transcode): check last hash only if 0 < argc. + +Sun Aug 24 12:22:15 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_substr_append): renamed from + rb_econv_string. + (rb_econv_str_convert): declared. + (rb_econv_substr_convert): declared. + (rb_econv_str_append): declared. + + * io.c (io_fwrite): use rb_econv_str_convert instead of + rb_econv_string. + + * transcode.c (rb_econv_substr_append): renamed from rb_econv_string. + (rb_econv_str_append): new function. + (rb_econv_substr_convert): ditto. + (rb_econv_str_convert): ditto. + +Sun Aug 24 12:15:12 2008 NARUSE, Yui + + * lib/net/http.rb (Net::HTTP#urlencode): str[0] returns char in 1.9. + Patch by Junegunn Choi [ruby-core:18368] + +Sun Aug 24 12:02:39 2008 Tanaka Akira + + * transcode.c (rb_econv_open): return NULL on error. + +Sun Aug 24 11:40:38 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_open_exc): declared. + + * transcode.c (rb_eNoConverter): new exception. + (rb_econv_open_exc): new function. + (transcode_loop): use rb_econv_open_exc. + + * io.c (make_writeconv): use rb_econv_open_exc. + (make_readconv): ditto. + +Sun Aug 24 11:26:54 2008 NARUSE, Yui + + * lib/cgi.rb (CGI::unescapeHTML): consider ISO-8859-1. + [ruby-dev:35936] + +Sun Aug 24 10:55:00 2008 NARUSE, Yui + + * enc/emacs_mule.c: support Emacs/Mule internal encoding. + +Sun Aug 24 08:03:31 2008 Nobuyoshi Nakada + + * strftime.c (daylight, timezone): not provided as dllexport on cygwin, + right now. + +Sun Aug 24 06:39:05 2008 NARUSE, Yui + + * lib/cgi.rb (CGI::unescapeHTML): more encoding sensible unescaping. + [ruby-dev:35936] + +Sun Aug 24 04:23:19 2008 NARUSE, Yui + + * encoding.c (enc_compatible_p): raise TypeError when argument is Encoding. + +Sat Aug 23 23:25:47 2008 NARUSE, Yui + + * lib/cgi.rb (CGI#out): remove auto encoding conversion and set + LANGUAGE. [ruby-dev:35922] + +Sat Aug 23 20:01:29 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_process.rb (TestProcess#test_rlimit_value): + add Errno::EINVAL. [ruby-dev:35900] + +Sat Aug 23 18:29:29 2008 Tanaka Akira + + * io.c (rb_scan_open_args): use pop_last_hash. + +Sat Aug 23 16:59:42 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_INVALID_MASK): defined. + (FMODE_INVALID_IGNORE): defined. + (FMODE_INVALID_REPLACE): defined. + (FMODE_UNDEF_MASK): defined. + (FMODE_UNDEF_IGNORE): defined. + (FMODE_UNDEF_REPLACE): defined. + + * io.c (sym_invalid): defined. + (sym_undef): defined. + (sym_ignore): defined. + (sym_replace): defined. + (make_readconv): specify ECONV_INVALID_* and ECONV_UNDEF_* if + FMODE_INVALID_* and FMODE_UNDEF_* is set. + (rb_io_extract_modeenc): check {:invalid, :undef} => {:replace, + :ignore} for FMODE_INVALID_* and FMODE_UNDEF_*. + +Sat Aug 23 17:06:57 2008 Nobuyoshi Nakada + + * strftime.c (rb_strftime): support more flags. + +Sat Aug 23 15:14:10 2008 Koichi Sasada + + * vm_opts.h: enable "OPT_TRACE_INSTRUCTION" on default. + +Sat Aug 23 14:59:32 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_INVALID_MASK): defined. + (ECONV_INVALID_IGNORE): defined. + (ECONV_INVALID_REPLACE): defined. + (ECONV_UNDEF_MASK): defined. + (ECONV_UNDEF_IGNORE): defined. + (ECONV_UNDEF_REPLACE): defined. + + * transcode.c (INVALID_IGNORE): removed. + (INVALID_REPLACE): removed. + (UNDEF_IGNORE): removed. + (UNDEF_REPLACE): removed. + (rb_econv_convert0): renamed from rb_econv_convert. + (rb_econv_convert): defined to call rb_econv_convert0 with + replace/ignore behavior moved from transcode_loop. + (transcode_loop): replace/ignore behavior removed. + +Sat Aug 23 11:23:05 2008 Tanaka Akira + + * io.c (rb_io_extract_modeenc): check :textmode and :binmode in option + hash. + +Sat Aug 23 10:48:56 2008 Tanaka Akira + + * ext/pty/pty.c (pty_getpty): follow rb_io_t's path -> pathv change. + +Sat Aug 23 10:42:52 2008 Tanaka Akira + + * io.c (check_pipe_command): extracted from rb_f_open and rb_io_open. + (rb_f_open): use check_pipe_command. + (rb_io_open): ditto. + +Sat Aug 23 10:13:00 2008 Tanaka Akira + + * io.c (read_all): fptr->enc2 is 0 if no conversion. + (rb_io_getline_fast): ditto. + (io_getc): ditto. + +Sat Aug 23 09:45:35 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): remove path field and add pathv field. + (MakeOpenFile): initialize pathv as Qnil. + + * gc.c: mark pathv field in T_FILE. + + * io.c: follow the rb_io_t field change. + + * file.c: ditto. + + * ext/socket/socket.c: ditto. + +Sat Aug 23 01:42:22 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_TEXTMODE): defined. + + * include/ruby/encoding.h (rb_econv_t): new field: flags. + (rb_econv_binmode): declared. + + * io.c (io_unread): text mode hack removed. + (NEED_NEWLINE_DECODER): defined. + (NEED_NEWLINE_ENCODER): defined. + (NEED_READCONV): defined. + (NEED_WRITECONV): defined. + (TEXTMODE_NEWLINE_ENCODER): defined for windows. + (make_writeconv): setup converter with TEXTMODE_NEWLINE_ENCODER for + text mode. + (io_fwrite): use NEED_WRITECONV. character code conversion is + disabled if fptr->writeconv_stateless is nil. + (make_readconv): setup converter with + ECONV_UNIVERSAL_NEWLINE_DECODER for text mode. + (read_all): use NEED_READCONV. + (appendline): use NEED_READCONV. + (rb_io_getline_1): use NEED_READCONV. + (io_getc): use NEED_READCONV. + (rb_io_ungetc): use NEED_READCONV. + (rb_io_binmode): OS-level text mode test removed. call + rb_econv_binmode. + (rb_io_binmode_m): call rb_io_binmode_m with write_io as well. + (rb_io_flags_mode): return mode string including "t". + (rb_io_mode_flags): detect "t" for text mode. + (rb_sysopen): always specify O_BINARY. + + * transcode.c (rb_econv_open_by_transcoder_entries): initialize flags. + (rb_econv_open): if source and destination encoding is + both empty string, open newline converter. last_tc will be NULL in + this case. + (rb_econv_encoding_to_insert_output): last_tc may be NULL now. + (rb_econv_string): ditto. + (output_replacement_character): ditto. + (transcode_loop): ditto. + (econv_init): ditto. + (econv_inspect): ditto. + (rb_econv_binmode): new function. + +Fri Aug 22 21:18:40 2008 Tadayoshi Funaba + + * complex.c (nucomp_div): now behaves as quo. + + * complex.c (nucomp_s_generic_p): has been removed. + + * complex.c (nucomp_to_s): adopts new form. + + * complex.c (nucomp_inspect): ditto. + + * complex.c (string_to_c_internal): ditto and supports polar form. + + * complex.c (rb_complex_polar): new. + + * rational.c (nurat_to_s): do not canonicalize. + + * rational.c (nurat_inspect): adopts new form. + + * rational.c (string_to_r_internal): ditto. + + * include/ruby/intern.h: added a declaration. + + * lib/complex.rb: added an obsolete class method. + + * lib/cmath.rb: use scalar? instead of generic?. + +Fri Aug 22 20:06:46 2008 Kazuhiro NISHIYAMA + + * lib/webrick/server.rb (WEBrick::GenericServer#shutdown): + rescue Errno::ENOTCONN and close. [ruby-dev:35896] + + * test/openssl/test_ssl.rb (OpenSSL#start_server): ditto. + [ruby-dev:35897] + + * lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898] + +Fri Aug 22 19:58:27 2008 Tadayoshi Funaba + + * lib/date.rb: no need to require the "lib/rational.rb" any more. + +Fri Aug 22 15:47:38 2008 NAKAMURA Usaku + + * lib/cgi.rb: use bytesize instead of size/length. + +Fri Aug 22 14:28:05 2008 Nobuyoshi Nakada + + * strftime.c (rb_strftime): supported flags and precision for most + conversions. [ruby-dev:35906] + +Fri Aug 22 14:04:04 2008 Martin Duerst + + * test/ruby/test_transcode.rb: test_shift_jis: + fixed comment strings (see r18291) + +Fri Aug 22 12:41:47 2008 Tanaka Akira + + * io.c (rb_io_pid): use PIDT2NUM. + +Fri Aug 22 11:36:31 2008 NARUSE, Yui + + * dir.c (dir_enc_str_new): set US-ASCII to the path + when the path is 7bit string and encoding is ASCII compatible. + + * dir.c (push_glob): set file system encoding when argument encoding + is US-ASCII. + +Fri Aug 22 11:30:38 2008 NARUSE, Yui + + * dir.c (dir_enc_str_new): renamed from dir_enc_str. + + * dir.c (dir_read): use dir_enc_str_new. + + * dir.c (dir_each): ditto. + + * dir.c (push_pattern): ditto. + +Fri Aug 22 11:29:10 2008 NARUSE, Yui + + * common.mk: remove config.h dependency. + +Fri Aug 22 10:52:39 2008 Nobuyoshi Nakada + + * configure.in (gmtime_r): check if reentrant versions are available. + + * time.c (IF_HAVE_GMTIME_R, ASCTIME, GMTIME, LOCALTIME): use reentrant + versions if available. + +Fri Aug 22 05:29:17 2008 Tanaka Akira + + * include/ruby/ruby.h (INT2NUM): just use a simple macro on LP64. + (UINT2NUM): ditto. + +Fri Aug 22 05:10:07 2008 Tanaka Akira + + * io.c (rb_file_open_generic): take filename as a VALUE. + (rb_file_open_internal): ditto. + (rb_io_open): ditto. + (rb_file_open): pass filename as a VALUE to rb_file_open_internal. + (rb_open_file): pass filename as a VALUE to rb_file_open_generic. + (open_key_args): pass filename as a VALUE to rb_io_open. + +Fri Aug 22 04:33:56 2008 Tanaka Akira + + * include/ruby/ruby.h: fix previous change for LP64. + +Fri Aug 22 03:19:41 2008 Tanaka Akira + + * include/ruby/ruby.h (NUM2LONG): make it inline function to evaluate + the argument only once. + `t = Object.new; def t.*(x) p x; 0 end; p Time.at(0, t)' did print x + twice. + (NUM2INT): ditto. + (NUM2LL): ditto. + (INT2NUM): make it inline function. + (LONG2NUM): ditto. + (UINT2NUM): ditto. + (ULONG2NUM): ditto. + +Fri Aug 22 03:03:22 2008 Tanaka Akira + + * io.c (rb_io_s_sysopen): mode can be a Bignum. + +Fri Aug 22 02:57:03 2008 Tanaka Akira + + * io.c (rb_io_extract_modeenc): notify coerced to caller. + (rb_io_initialize): mode may be a Bignum. + +Fri Aug 22 02:42:35 2008 Tanaka Akira + + * io.c (rb_io_extract_modeenc): use rb_check_to_integer to test + integer. + +Fri Aug 22 02:25:04 2008 Tanaka Akira + + * iseq.c (iseq_inspect): don't raise on uninitialized object. + show real class name. + +Fri Aug 22 02:08:58 2008 Tanaka Akira + + * io.c (rb_io_initialize): accept hash argument. + +Thu Aug 21 23:51:51 2008 Shugo Maeda + + * strftime.c (rb_strftime): supported %F and %N. + reverted config.h to ruby.h for Windows. + + * test/ruby/test_time.rb (TestTime::test_strftime): added tests + for %F and %N. + + * time.c: documented %F and %N. + +Thu Aug 21 20:23:26 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_crypt): add + key and salt to error message. + +Thu Aug 21 19:20:25 2008 Tanaka Akira + + * file.c (rb_stat_inspect): don't raise if self is not initialized. + +Thu Aug 21 19:17:02 2008 Tanaka Akira + + * process.c (pst_pid): use rb_attr_get to avoid warning on + Process::Status.allocate.pid. + (pst_inspect): don't raise if self is not initialized. + +Thu Aug 21 19:05:40 2008 Tanaka Akira + + * io.c (io_extract_encoding_option): if internal encoding is not + specified, enc is external encoding. + +Thu Aug 21 14:22:50 2008 Shugo Maeda + + * strftime.c: include ruby/config.h instead of ruby/ruby.h. + + * common.mk: removed the old rule for missing/strftime.c. + +Thu Aug 21 09:29:01 2008 Shugo Maeda + + * strftime.c (rb_strftime): return "UTC" instead of "GMT". + + * test/ruby/test_time.rb (test_strftime): ditto. + +Thu Aug 21 07:59:04 2008 NARUSE, Yui + + * test/iconv/test_option.rb (test_ignore_option): skip if iconv + doesn't have transliterate. + + * test/iconv/test_option.rb (test_translit_option): ditto. + +Thu Aug 21 06:12:56 2008 Nobuyoshi Nakada + + * lib/scanf.rb (Scanf::FormatSpecifier#initialize): %i should accept + single digit decimal. [ruby-core:18355] + +Thu Aug 21 06:02:52 2008 Nobuyoshi Nakada + + * range.c (range_initialize_copy): Range is now a Struct. + [ruby-core:18353] + + * struct.c (rb_struct_init_copy): made public. + +Thu Aug 21 03:09:34 2008 Tanaka Akira + + * io.c (io_extract_encoding_option): enc2 is external encoding if + external encoding and internal encoding is given. + (pipe_open): add flags and convconfig argument to initialize + fptr->{mode,enc,enc2}. + (pipe_open_v): pass flags and convconfig from caller to pipe_open. + (pipe_open_s): ditto. + (pop_last_hash): new function. + (rb_io_s_popen): use last hash as option to specify code conversion. + (rb_io_open): specify flags and convconfig arguments for + pipe_open_s. + (rb_f_backquote): ditto. + +Thu Aug 21 02:27:03 2008 Tanaka Akira + + * io.c (prep_io): local variable renamed. + (rb_io_fdopen): ditto. + (prep_stdio): ditto. + +Thu Aug 21 01:58:59 2008 Shugo Maeda + + * configure.in: always check timezone(). + + * strftime.c (rb_strftime): prefer timezone/altzone rather than + gettimeofday(). The second argument to gettimeofday() is ignored + on Solaris. + +Thu Aug 21 02:03:08 2008 Tanaka Akira + + * io.c (open_key_args): simplified. + +Thu Aug 21 01:57:03 2008 Tanaka Akira + + * io.c (open_key_args): IO.foreach(path, rs, limit) didn't work. + +Thu Aug 21 01:31:34 2008 Tanaka Akira + + * io.c (rb_file_sysopen_internal): unused function removed. + (rb_file_sysopen): ditto. + +Thu Aug 21 01:09:26 2008 Tanaka Akira + + * io.c: use mode_t for the 3rd argument, permission, of open(2). + +Thu Aug 21 00:51:42 2008 Shugo Maeda + + * configure.in: removed strftime from AC_REPLACE_FUNCS(). + + * include/ruby/missing.h: removed prototype for strftime(). + + * missing/strftime.c: removed. + + * time.c (time_to_s): use rb_strftime() instead of strftime(3). + (time_zone): ditto. + +Thu Aug 21 00:49:50 2008 NAKAMURA Usaku + + * strftime.c: win32 support. + +Thu Aug 21 00:20:05 2008 Shugo Maeda + + * strftime.c: new file. + + * common.mk (COMMONOBJS): added strftime.$(OBJEXT). + + * time.c (time_strftime): do not use strftime(3). supported + %L(millisecond) and %N(nanosecond). + + * test/ruby/test_time.rb: added tests for %L and %N. + +Wed Aug 20 23:53:42 2008 Tanaka Akira + + * io.c (io_set_encoding): removed. + (rb_io_open): set up encoding using new argument opt. + (open_key_args): call rb_io_open with opt. don't call + io_set_encoding. + +Wed Aug 20 22:30:33 2008 Tanaka Akira + + * io.c (rb_file_open_internal): use rb_io_flags_modenum. + (rb_io_reopen): use rb_io_flags_modenum and rb_io_modenum_mode. + (rb_io_stdio_file): ditto. + +Wed Aug 20 22:28:15 2008 Nobuyoshi Nakada + + * proc.c (proc_new): use the given class. + + * vm.c (vm_make_proc): added an argument for the class. + +Wed Aug 20 22:24:48 2008 Nobuyoshi Nakada + + * enum.c (enum_take): get rid of extraneous iteration. + +Wed Aug 20 20:32:49 2008 Tanaka Akira + + * io.c (rb_io_open_with_args): use rb_open_file instead of rb_io_open. + +Wed Aug 20 20:16:17 2008 Tanaka Akira + + * io.c (rb_scan_open_args): extracted from rb_open_file. + +Wed Aug 20 19:22:32 2008 Tanaka Akira + + * io.c (convconfig_t): new type. + (rb_io_extract_modeenc): new function. + (rb_file_open_generic): new function. + (rb_file_open_internal): use rb_file_open_generic. + (rb_file_sysopen_internal): use rb_file_open_generic. + (rb_open_file): use rb_io_extract_modeenc and rb_file_open_generic. + (rb_io_open): call rb_file_open_internal instead of rb_file_open. + +Wed Aug 20 19:15:35 2008 Tanaka Akira + + * io.c (Init_IO): new constants: File::DSYNC, File::RSYNC and + File::NOFOLLOW. + +Wed Aug 20 18:41:11 2008 Tanaka Akira + + * io.c (rb_open_file): don't lookup :mode and :perm in opt. it is + useless because vmode and perm is overwritten by rb_scan_args + anyway. + +Wed Aug 20 18:37:20 2008 Tanaka Akira + + * io.c (open_key_args): meaningless MEMCPY removed. + +Wed Aug 20 18:30:58 2008 Tanaka Akira + + * io.c (prep_io) [cygwin]: use FMODE_BINMODE instead of O_BINARY. + +Wed Aug 20 16:39:59 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sample): performance improvement for huge array. + +Wed Aug 20 12:28:31 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sample): get rid of infinite loop. #455 + +Wed Aug 20 06:09:31 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_TRUNC): value changed because 0x100 is used + as FMODE_NOREVLOOKUP in socket.c + +Wed Aug 20 05:19:40 2008 Tanaka Akira + + * io.c (parse_mode_enc): extracted from mode_enc. + (io_extract_encoding_option): extracted from io_set_encoding. + +Wed Aug 20 04:17:26 2008 Tanaka Akira + + * io.c (rb_io_flags_modenum): make it static. + +Wed Aug 20 03:36:45 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_TRUNC): new constant. + + * io.c (rb_io_mode_flags): set FMODE_TRUNC for "w". + (rb_io_modenum_flags): set FMODE_TRUNC for O_TRUNC. + (rb_io_flags_modenum): new function. + (rb_io_mode_modenum): just use rb_io_mode_flags and + rb_io_flags_modenum. + +Wed Aug 20 02:36:21 2008 Tanaka Akira + + * io.c (fopen): macro for vms removed. fopen is not used now. + +Wed Aug 20 02:27:42 2008 Tanaka Akira + + * transcode.c (rb_econv_open): fix memory leak. + (rb_econv_close): ditto. + fixed by shinichiro.h. [ruby-dev:35880] + +Tue Aug 19 21:50:43 2008 Tanaka Akira + + * include/ruby/io.h (rb_fopen): declaration removed. + + * io.c (rb_fopen): unused function removed. + +Tue Aug 19 21:14:22 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_READWRITE): define as + FMODE_READABLE|FMODE_WRITABLE. + +Tue Aug 19 21:13:08 2008 Tanaka Akira + + * io.c (rb_io_flags_mode): use hexadecimal in error message. + (rb_io_modenum_mode): ditto. + (rb_io_initialize): ditto. + +Tue Aug 19 18:23:40 2008 Tanaka Akira + + * io.c (rb_io_flags_mode): add a prefix 0 to octal in error message. + (rb_io_modenum_mode): ditto. + +Tue Aug 19 18:05:45 2008 Tanaka Akira + + * include/ruby/io.h (FMODE_*): sorted and describe the values in + hexadecimal. + +Tue Aug 19 17:32:30 2008 Tanaka Akira + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): store the + result of d2i_X509_NAME into DATA_PTR(self). + +Tue Aug 19 04:54:39 2008 Nobuyoshi Nakada + + * lib/rake.rb (FileUtils#ruby): takes care of space containing path. + [ ruby-Bugs-21591 ] + +Tue Aug 19 01:32:37 2008 Tanaka Akira + + * io.c (rb_open_file): encoding in mode string was ignored if perm is + specified. + +Tue Aug 19 01:02:19 2008 Tanaka Akira + + * io.c (rb_open_file): don't access argv[-1] by + File.allocate.instance_eval { initialize }. + +Tue Aug 19 00:56:01 2008 Tanaka Akira + + * re.c (rb_reg_inspect): don't raise for uninitialized Regexp. + +Tue Aug 19 00:34:24 2008 Tanaka Akira + + * io.c (rb_io_check_readable): side effect for STDIN removed. + (rb_io_external_encoding): ditto. + +Mon Aug 18 23:27:07 2008 Tanaka Akira + + * io.c (io_ungetbyte): renamed from io_ungetc. + (rb_io_ungetbyte): new method. + (rb_io_ungetc): push back into character buffer if enc2 is set. + +Mon Aug 18 22:41:46 2008 Tanaka Akira + + * io.c (id_encode): removed. + +Mon Aug 18 22:30:07 2008 Tanaka Akira + + * io.c (make_writeconv): if enc and enc2 is set, convert + string.encoding to enc2. + + * include/ruby/io.h: comment changed. + +Mon Aug 18 21:02:08 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): new fields: writeconv, + writeconv_stateless and writeconv_initialized. + (MakeOpenFile): initialize them. + + * include/ruby/encoding.h (rb_econv_stateless_encoding): declared. + (rb_econv_string): declared. + + * io.c (make_writeconv): new function. + (io_fwrite): use econv. + (make_readconv): fix error message. + (finish_writeconv): new function. + (fptr_finalize): call finish_writeconv. + (clear_writeconv): new function. + (clear_codeconv): new function to call both clear_readconv and + clear_writeconv. + (rb_io_fptr_finalize): call clear_codeconv instead of + clear_readconv. + (mode_enc): ditto. + (io_set_encoding): ditto. + (argf_next_argv): ditto. + (io_encoding_set): ditto. + + * gc.c (gc_mark_children): mark writeconv_stateless in T_FILE. + + * transcode.c (stateless_encoding_i): new function. + (rb_econv_stateless_encoding): ditto. + (rb_econv_string): ditto. + +Mon Aug 18 17:23:38 2008 Tanaka Akira + + * io.c (clear_readconv): extracted from rb_io_fptr_finalize. + (mode_enc): call clear_readconv. + (io_set_encoding): ditto. + (argf_next_argv): ditto. + (io_encoding_set): ditto. + +Mon Aug 18 16:54:06 2008 Tanaka Akira + + * io.c (mode_enc): modify enc and enc2 consistently. + (io_set_encoding): ditto. + (io_encoding_set): ditto. + +Mon Aug 18 13:21:38 2008 Tanaka Akira + + * transcode.c (transcode_search_path): prevent infinite loop by + searching a path for self conversion. + +Mon Aug 18 12:45:24 2008 Tanaka Akira + + * io.c (io_enc_str): code conversion removed. + (io_enc_str_converted): removed because it is identical to + io_enc_str now. + +Mon Aug 18 12:12:29 2008 Tanaka Akira + + * io.c (io_shift_crbuf): add strp argument to append into existing + string. + (read_all): use econv if enc2 is set. + (io_getc): follow the io_shift_crbuf change. + +Mon Aug 18 10:35:25 2008 Tanaka Akira + + * io.c (io_enc_str_converted): new function. + (make_readconv): extracted from io_getc. + (more_char): ditto. + (appendline): use econv via make_readconv and more_char for code + conversion. + (prepare_getline_args): don't convert record separator. + (rb_io_getline_1): don't use rb_io_getline_fast if enc2 is set. + (io_getc): use make_readconv and more_char. + +Mon Aug 18 08:27:44 2008 Kazuhiro NISHIYAMA + + * common.mk: fix error in uncommon.mk. + +Mon Aug 18 06:10:08 2008 NARUSE, Yui + + * common.mk: config.h depends config.status. + +Mon Aug 18 03:59:43 2008 Tanaka Akira + + * io.c (appendline): appendline cannot check character boundary. + (rb_io_getline_1): relax limit until character boundary. + +Mon Aug 18 02:25:11 2008 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI::Socket#eof?): added lacked method. + +Sun Aug 17 21:50:22 2008 Tanaka Akira + + * io.c (prepare_getline_args): io.gets(10,nil) should cause TypeError. + +Sun Aug 17 15:58:39 2008 Nobuyoshi Nakada + + * lib/mkmf.rb: not check config.h. + + * lib/mkmf.rb (init_mkmf): add include/ruby/backward to $INCFLAGS. + + * include/ruby/backward/{st,util}.h: added for backward compatibility. + [ruby-dev:35811] + +Sun Aug 17 13:40:04 2008 Tanaka Akira + + * transcode.c (econv_primitive_putback): new method. + +Sun Aug 17 13:23:53 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_putbackable): declared. + (rb_econv_putback): ditto. + + * transcode.c (rb_econv_putbackable): implemented. + (rb_econv_putback): ditto. + + * io.c (io_getc): put back bytes if possible. + +Sun Aug 17 12:00:18 2008 Tanaka Akira + + * transcode.c (make_econv_exception): add several instance variables + to exception object. + (ecerr_source_encoding): new method: + Encoding::ConversionUndefined#source_encoding and + Encoding::InvalidByteSequence#source_encoding. + (ecerr_destination_encoding): new method: + Encoding::ConversionUndefined#destination_encoding and + Encoding::InvalidByteSequence#destination_encoding. + (econverr_error_char): new method: + Encoding::ConversionUndefined#error_char. + (econverr_error_bytes): new method: + Encoding::ConversionUndefined#error_bytes. + +Sun Aug 17 11:43:18 2008 Nobuyoshi Nakada + + * random.c (struct MT): packed Mersenne Twister staffs. + + * random.c (struct RandSeed): packed random seed staffs. + +Sun Aug 17 08:38:26 2008 NARUSE, Yui + + * test/iconv/test_option.rb (test_ignore_option): skip if iconv + doesn't have transliterate. + + * test/iconv/test_option.rb (test_translit_option): ditto. + +Sun Aug 17 01:29:46 2008 Tanaka Akira + + * include/ruby/io.h (rb_io_t): new fields: readconv, crbuf, crbuf_off, + crbuf_len, crbuf_capa. + (MakeOpenFile): initialize them. + + * io.c (io_shift_crbuf): new function. + (io_getc): use econv. + (rb_io_fptr_finalize): finalize readconv and crbuf. + +Sun Aug 17 00:02:07 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_check_error): declared. + + * transcode.c (make_econv_exception): new function. + (transcode_loop): use make_econv_exception. + (rb_econv_check_error): defined. + +Sat Aug 16 15:23:16 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_elem_t): fields removed: from and + to. + (rb_econv_t): new fields: source_encoding_name and + destination_encoding_name. + + * transcode.c (rb_econv_open_by_transcoder_entries): initialize the + new fields. + (rb_econv_open): set up the new fields. + (econv_inspect): use the new fields. + +Sat Aug 16 14:22:04 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_t): add fields: in_buf_start, + in_data_start, in_data_end, in_buf_end and last_trans_index. + (rb_econv_output): removed. + (rb_econv_insert_output): declared. + (rb_econv_encoding_to_insert_output): declared. + + * enc/trans/newline.trans (rb_universal_newline): stateful_type + changed. + + * transcode.c (transcode_restartable0): initialize inchar_start, + tc->recognized_len and next_table at beginning of the loop. + (rb_econv_open_by_transcoder_entries): initialize new fields. + (rb_econv_open): setup last_trans_index. + (trans_sweep): last out_buf_start can be non-NULL now. + (rb_econv_convert): check last out_buf_start and in_buf_start at + first. + (rb_econv_output_with_destination_encoding): removed. + (econv_just_convert): removed. + (rb_econv_output): removed. + (econv_primitive_output): method removed. + (rb_econv_encoding_to_insert_output): new function. + (allocate_converted_string): new function. + (rb_econv_insert_output): new function. + (econv_primitive_insert_output): new method. + (output_replacement_character): use rb_econv_insert_output. unused + arguments removed. + +Sat Aug 16 09:20:18 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (rb_intern_const): tiny optimization. + + * include/ruby/ruby.h (SSIZET2NUM, NUM2SSIZET, SSIZE_MAX, SSIZE_MIN): + macros for ssize_t. + +Sat Aug 16 08:11:04 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder_stateful_type_t): defined. + (rb_transcoder): add field: stateful_type. + + * tool/transcode-tblgen.rb: generate stateful_type field as + stateless_converter. + + * enc/trans/iso2022.trans: follow rb_transcoder change. + + * enc/trans/newline.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + +Fri Aug 15 23:07:48 2008 Tanaka Akira + + * transcode.c (econv_just_convert): extracted from rb_econv_output. + (rb_econv_output): use econv_just_convert. + (econv_primitive_output): new method. + +Fri Aug 15 19:57:01 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_output): add str_encoding + argument. + + * transcode.c (get_replacement_character): add repl_enc_ptr argument. + (rb_econv_output_with_destination_encoding): renamed from + rb_econv_output and make it static. + (rb_econv_output): convert str and call + rb_econv_output_with_destination_encoding. + (output_replacement_character): follow above interface change. + +Fri Aug 15 19:33:57 2008 Nobuyoshi Nakada + + * string.c (rb_str_drop_bytes): use memmove. + +Fri Aug 15 18:33:22 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_t): add error_tc in last_error. + + * transcode.c (rb_econv_convert): fill error_tc. + +Fri Aug 15 18:10:49 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_t): new field: last_error. + + * transcode.c (rb_trans_conv): new argument: result_position_ptr. + (rb_econv_convert): fill last_error. + (econv_result_to_symbol): extracted from econv_primitive_convert. + (econv_primitive_errinfo): new method. + +Fri Aug 15 17:39:05 2008 Nobuyoshi Nakada + + * common.mk (parse.{c,h}): creates in the dependency order. + +Fri Aug 15 16:59:30 2008 Nobuyoshi Nakada + + * vm_core.h (exec_event_hooks): skips RubyVM::FrozenCore. + + * vm.c (Init_VM): get rid of SEGV in a trace proc. + +Fri Aug 15 09:33:48 2008 Tanaka Akira + + * transcode.c (conv_init): check empty name. + +Fri Aug 15 09:03:54 2008 Tanaka Akira + + * transcode.c (econv_init): don't create dummy encoding if + rb_econv_open is failed. + (make_dummy_encoding): new function extracted from make_encoding. + (make_encoding): removed. + +Fri Aug 15 01:07:16 2008 NARUSE, Yui + + * common.mk ({$(srcdir)}.y.c): escape backslash. + +Fri Aug 15 01:05:39 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): set destination_buffer + encoding. + +Fri Aug 15 00:52:40 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_output): declared. + + * transcode_data.h (rb_transcoder): add resetsize_func field. + + * enc/trans/iso2022.trans (iso2022jp_reset_sequence_size): defined. + (rb_EUC_JP_to_ISO_2022_JP): provide resetsize_func. + + * tool/transcode-tblgen.rb: set NULL for resetsize_func. + + * transcode.c (rb_econv_output): new function for inserting output. + (output_replacement_character): use rb_econv_output. + (transcode_loop): check return value of + output_replacement_character. + +Thu Aug 14 23:47:21 2008 Tanaka Akira + + * include/ruby/encoding.h (ECONV_UNIVERSAL_NEWLINE_DECODER): defined. + (ECONV_CRLF_NEWLINE_ENCODER): ditto. + (ECONV_CR_NEWLINE_ENCODER): ditto. + (ECONV_PARTIAL_INPUT): ditto. + (ECONV_OUTPUT_FOLLOWED_BY_INPUT): ditto. + + * transcode.c: use ECONV_* defined as above. + +Thu Aug 14 23:35:21 2008 Tanaka Akira + + * transcode.c: local variable renamed. + +Thu Aug 14 23:22:24 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_econv_result_t): moved from + transcode_data.h. + (rb_econv_elem_t): ditto. + (rb_econv_t): ditto. source_encoding and destination_encoding field + is added. + (rb_econv_open): declared. + (rb_econv_convert): ditto. + (rb_econv_close): ditto. + + * transcode.c (rb_econv_open_by_transcoder_entries): initialize + source_encoding and destination_encoding field as NULL. + (rb_econv_open): make it external linkage. + (rb_econv_close): ditto. + (rb_econv_convert): ditto. renamed from rb_econv_conv. + (make_encoding): new function. + (econv_init): use make_encoding and store rb_encoding* in + rb_econv_t. + (econv_source_encoding): new method + Encoding::Converter#source_encoding. + (econv_destination_encoding): new method + Encoding::Converter#destination_encoding. + +Thu Aug 14 22:44:32 2008 Tanaka Akira + + * transcode_data.h (rb_econv_result_t): change enumeration + constant's prefix: transcode_ to econv_. + + * transcode.c: follow the constant prefix change. + +Thu Aug 14 21:34:41 2008 Tanaka Akira + + * transcode.c (econv_init): accept Encoding object as source_encoding + and destination_encoding. + +Thu Aug 14 21:10:00 2008 Tanaka Akira + + * encoding.c (rb_filesystem_encoding): use default external encoding + for Unix. + + * dir.c (dir_initialize): don't cache fs_encoding. + +Thu Aug 14 20:58:57 2008 Tanaka Akira + + * transcode.c (rb_econv_open_by_transcoder_entries): renamed from + rb_trans_open_by_transcoder_entries. + +Thu Aug 14 20:56:28 2008 Tanaka Akira + + * transcode.c (econv_max_output): removed. + +Thu Aug 14 20:52:55 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: check unexpected actions. + +Thu Aug 14 20:25:52 2008 Tanaka Akira + + * transcode_data.h (transcode_invalid_byte_sequence): renamed from + transcode_invalid_input. + (transcode_destination_buffer_full): renamed from transcode_obuf_full. + (transcode_source_buffer_empty): renamed from transcode_ibuf_empty. + (rb_econv_result_t): renamed from rb_trans_result_t. + (rb_econv_elem_t): renamed from rb_trans_elem_t. + (rb_econv_t): renamed from rb_trans_t. + + * transcode.c (UNIVERSAL_NEWLINE_DECODER): renamed from + UNIVERSAL_NEWLINE. + (CRLF_NEWLINE_ENCODER): renamed from CRLF_NEWLINE. + (CR_NEWLINE_ENCODER): renamed from CR_NEWLINE. + (rb_econv_open): renamed from rb_trans_open. + (rb_econv_close): renamed from rb_trans_close. + +Thu Aug 14 19:41:42 2008 Tanaka Akira + + * transcode.c (load_transcoder): unused function removed. + (rb_transcoding_open): ditto. + +Thu Aug 14 17:57:05 2008 Nobuyoshi Nakada + + * include/ruby/encoding.h (rb_enc_ispunct): added. + + * common.mk (COMMONOBJS), inits.c (rb_call_inits): id.c is now + included from parse.c. + + * id.c (Init_id), id.h (ruby_method_ids): added IDs used by VM. + + * parse.y (global_symbols): added rooms for VM IDs. + + * parse.y (rb_intern3, rb_id2str): single punctuation symbol is now + same as char code. + +Thu Aug 14 17:46:21 2008 Nobuyoshi Nakada + + * parse.y (union tmpyystype): no longer needed, since YYSTYPE is + defined in parse.h now. + +Thu Aug 14 17:27:07 2008 Yukihiro Matsumoto + + * version.c (Init_version): add RUBY_ENGINE constant. + +Thu Aug 14 15:34:10 2008 Tanaka Akira + + * transcode.c (rb_econv_conv): new function. it doesn't consume + input too much, even for multilevel conversion. + (transcode_loop): use rb_econv_conv. + (econv_primitive_convert): ditto. + +Thu Aug 14 15:27:42 2008 Nobuyoshi Nakada + + * include/ruby/defines.h (RUBY_ALIAS_FUNCTION): fallback definition. + +Thu Aug 14 15:08:17 2008 Tanaka Akira + + * transcode_data.h (rb_trans_result_t): new enumeration constant: + transcode_output_followed_by_input. + + * transcode.c (OUTPUT_FOLLOWED_BY_INPUT): new flag. + (transcode_restartable0): suspend when output followed by input if + OUTPUT_FOLLOWED_BY_INPUT is specified. + (trans_sweep): check OUTPUT_FOLLOWED_BY_INPUT. + (rb_trans_conv): support OUTPUT_FOLLOWED_BY_INPUT. + (econv_primitive_convert): return :output_followed_by_input for + transcode_output_followed_by_input. + +Thu Aug 14 14:57:46 2008 Nobuyoshi Nakada + + * gc.c (getrusage_time): should return the value. + + * thread.c (rb_thread_priority_set): get rid of C99 feature. + + * transcode.c (transcode_search_path): ditto. + + * vm.c (REWIND_CFP): get rid of statement expressions. + +Thu Aug 14 14:13:39 2008 Nobuyoshi Nakada + + * vm.c (Init_VM): hide FrozenCore. + +Thu Aug 14 12:20:36 2008 Nobuyoshi Nakada + + * transcode.c (load_transcoder): suppress warning. + + * missing/vsnprintf.c (BSD_vfprintf): ditto. + +Thu Aug 14 12:01:39 2008 Nobuyoshi Nakada + + * configure.in (gnumake): check for GNU make. + + * Makefile.in (uncommon.mk): includes filtered common.mk. + + * common.mk (parse.h): workaround for nmake. + +Thu Aug 14 06:09:12 2008 Koichi Sasada + + * thread.c (rb_thread_execute_interrupts): switch event + should be occur only once. + +Thu Aug 14 05:36:36 2008 NARUSE, Yui + + * common.mk: parse.h depends on parse.c. + + * common.mk: hash.o depends on $(ID_H_INCLUDES). + +Thu Aug 14 02:45:16 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_file_exhaustive.rb (TestFileExhaustive#setup): + set group of tmpdir. [ruby-dev:35633] + +Thu Aug 14 15:50:30 2008 Giuseppe Bilotta + + * hash.c (set_default): fix rdoc. #441 + +Thu Aug 14 02:23:31 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): add output_byteoffset + argument. + +Thu Aug 14 00:43:53 2008 Nobuyoshi Nakada + + * configure.in (rb_cv_gcc_function_alias): checks alias attribute. + + * string.c (alias_func): replaced with RUBY_ALIAS_FUNCTION. + +Wed Aug 13 23:42:49 2008 Nobuyoshi Nakada + + * common.mk (parse.h): fake rule. + +Wed Aug 13 23:15:58 2008 Shugo Maeda + + * test/ruby/test_thread.rb (test_list): call Thread.pass to run t1. + fixed [ruby-core:18264]. + +Wed Aug 13 23:05:51 2008 TAKAO Kouji + + * string.c (alias_func): changed to 'weak, alias' from 'alias' for + Mac OSX. (closes #429) + +Wed Aug 13 19:40:12 2008 Koichi Sasada + + * gc.c: count only freed object as freelist size. + +Wed Aug 13 18:34:22 2008 Shugo Maeda + + * marshal.c (marshal_load): set arg.untrust properly. + +Wed Aug 13 17:47:09 2008 Tanaka Akira + + * transcode.c (econv_inspect): new method. + +Wed Aug 13 17:35:58 2008 Tanaka Akira + + * transcode.c (transcode_restartable0): several local variables + removed. + +Wed Aug 13 17:35:23 2008 Yukihiro Matsumoto + + * hash.c (rb_hash_set_default_proc): add new method. a patch from + Giuseppe Bilotta. #419 + +Wed Aug 13 17:31:12 2008 Yukihiro Matsumoto + + * vm_insnhelper.c (caller_setup_args): should ensure if the value + from to_proc is a real Proc. + +Wed Aug 13 17:28:29 2008 Akinori MUSHA + + * common.mk: regint.h no longer includes vm_core.h. + +Wed Aug 13 17:26:44 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): add fields: writebuf_off, + writebuf_len and writebuf. + (TRANSCODING_WRITEBUF): new macro. + + * transcode.c (transcode_restartable0): output until output buffer is + really full. + (rb_transcoding_open_by_transcoder): initialize writebuf_len, + writebuf_off and writebuf. + (rb_transcoding_close): finalize writebuf. + +Wed Aug 13 17:18:37 2008 Koichi Sasada + + * thread.c (rb_thread_check_ints): added. please note that + this function may cause ruby's thread switching. + + * include/ruby/intern.h: ditto. + + * regint.h: use rb_thread_check_ints() instead of + RUBY_CHECK_INTS() directly. + +Wed Aug 13 17:01:36 2008 Akinori MUSHA + + * golf_prelude.rb, lib/set.rb (TC_Set#test_each), + test/readline/test_readline_history.rb (Readline#test_each__enumerator), + test/ruby/test_array.rb (TestArray#test_collect), + test/ruby/test_enumerator.rb (TestEnumerator#test_initialize): + Enumerable::Enumerator is now called Enumerator. + + * lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use + enum_for instead of hardcoding Enumerable::Enumerator. + +Wed Aug 13 16:40:57 2008 Koichi Sasada + + * thread.c, vm_core.h: add manual priority support + using time slice. if you enable USE_NATIVE_THREAD_PRIORITY + macro, this mechanism is ignored. [ruby-dev:33124] + + * thread_pthread.c, thread_win32.c: ditto. + + * test/ruby/test_thread.rb: fix test parameter. + +Wed Aug 13 16:02:14 2008 Shugo Maeda + + * object.c (rb_obj_untrusted): new method Object#untrusted?. + (rb_obj_untrust): new method Object#untrust. + (rb_obj_trust): new method Object#trust. + + * array.c, debug.c, time.c, include/ruby/ruby.h, re.c, variable.c, + string.c, io.c, dir.c, vm_method.c, struct.c, class.c, hash.c, + ruby.c, marshal.c: fixes for Object#untrusted?. + + * test/ruby/test_module.rb, test/ruby/test_array.rb, + test/ruby/test_object.rb, test/ruby/test_string.rb, + test/ruby/test_marshal.rb, test/ruby/test_hash.rb: added tests for + Object#untrusted?. + +Wed Aug 13 16:13:58 2008 NARUSE, Yui + + * test/ruby/test_m17n.rb: follow EncodingCompatibilityError. + + * test/ruby/test_mixed_unicode_escapes.rb: ditto. + + * test/ruby/enc/test_utf16.rb: ditto. + +Wed Aug 13 16:05:50 2008 Yukihiro Matsumoto + + * time.c (time_cmp): retry with right hand operand if its not a + time object. [ruby-dev:35011] + +Wed Aug 13 15:51:22 2008 Akinori MUSHA + + * string.c: Apply a temporary fix to fix build on OS X. A real + fix will follow later. + +Wed Aug 13 15:25:09 2008 Akinori MUSHA + + * enumerator.c (Init_Enumerator): Rename Enumerable::Enumerator to + just Enumerator. + +Wed Aug 13 15:13:57 2008 Akinori MUSHA + + * common.mk (prelude.c, golf_prelude.c): Using $(COMPILE_PRELUDE) + requires $(RBCONFIG). + +Wed Aug 13 15:08:04 2008 Tanaka Akira + + * transcode.c (econv_init): make flags argument optional. + (econv_primitive_convert): ditto. + +Wed Aug 13 14:55:27 2008 Akinori MUSHA + + * common.mk (realclean-local): Remove parse.h as well. + + * common.mk: Add missing dependencies regarding vm_core.h, id.h, + parse.c (parse.h), etc.. + +Wed Aug 13 14:45:37 2008 Tanaka Akira + + * enc/trans/newline.trans (rb_crlf_newline): new transcoder. + (rb_cr_newline): new transcoder. + + * transcode.c (trans_open_i): one more extra room for input newline + converter. + (rb_trans_open): crlf newline and cr newline implemented. + (Init_transcode): Encoding::Converter::CRLF_NEWLINE and + Encoding::Converter::CR_NEWLINE defined. + +Wed Aug 13 14:22:16 2008 Tanaka Akira + + * enc/trans/newline.trans: new file. + + * transcode_data.h (rb_trans_t): add last_tc field. + + * transcode.c (UNIVERSAL_NEWLINE): defined. + (CRLF_NEWLINE): defined. + (CR_NEWLINE): defined. + (rb_trans_open_by_transcoder_entries): initialize last_tc. + (trans_open_i): allocate one more room for output newline converter. + (rb_trans_open): universal newline implemented. + (more_output_buffer): take max_output argument instead ts. + (output_replacement_character): take tc argument instead of ts. + (transcode_loop): use last_tc field. + (econv_init): add flags argument for rb_trans_open. + (Init_transcode): Encoding::Converter::UNIVERSAL_NEWLINE defined. + +Wed Aug 13 14:00:19 2008 Nobuyoshi Nakada + + * common.mk (parse.c): generates parse.h together. + + * id.c, id.h: use constants for parser tokens. + +Wed Aug 13 13:47:05 2008 Koichi Sasada + + * vm.c: rewind cfp to show proper backtrace. + [ruby-dev:35820] + +Wed Aug 13 13:09:09 2008 Nobuyoshi Nakada + + * tool/make-snapshot: fix for clean up. + +Wed Aug 13 11:45:51 2008 Akinori MUSHA + + * vm_core.h: Declare rb_iseq_clone, which is used in class.c. + +Wed Aug 13 11:39:19 2008 Tanaka Akira + + * transcode.c (transcode_search_path): return the length of converter + path. + (load_transcoder_entry): renamed from load_transcoder. + (load_transcoder): new function for loading transcoder by encoding + names. + (rb_transcoding_open_by_transcoder): extracted from + rb_transcoding_open. + (rb_transcoding_open): use load_transcoder and + rb_transcoding_open_by_transcoder. + (rb_trans_open_by_transcoder_entries): new function. + (trans_open_i): construct entries array. + (rb_trans_open): use rb_trans_open_by_transcoder_entries. + +Wed Aug 13 10:45:29 2008 Nobuyoshi Nakada + + * tool/make-snapshot: try to find exported directory. + +Wed Aug 13 10:16:35 2008 TAKAO Kouji + + * doc/NEWS: Mention the Readline.vi_editing_mode?, + Readline.emacs_editing_mode?, Readline::HISTORY[] and + Readline::HISTORY.clear change. + +Wed Aug 13 08:03:02 2008 Tanaka Akira + + * transcode.c (econv_primitive_convert): add output_size argument. + +Wed Aug 13 07:41:03 2008 Tanaka Akira + + * transcode.c (rb_trans_conv): report last transcode_obuf_full. + (econv_max_output): new method Encoding::Converter#max_output. + +Wed Aug 13 02:46:01 2008 NARUSE, Yui + + * error.c (rb_eEncCompatError): add Exception. + + * include/ruby/ruby.h: ditto. + + * encoding.c (rb_enc_check): use rb_eEncCompatError. + + * string.c (rb_enc_cr_str_buf_cat): ditto. + + * string.c (rb_str_sub_bang): ditto. + + * string.c (rb_str_hex): ditto. + + * string.c (rb_str_oct): ditto. + +Wed Aug 13 02:36:47 2008 NARUSE, Yui + + * transcode.c (str_transcode): fix error message. + +Tue Aug 12 23:42:31 2008 Tanaka Akira + + * transcode.c (rb_cEncodingConverter): new class Encoding::Converter. + (econv_free): new function. + (econv_s_allocate): ditto. + (econv_init): ditto. + (check_econv): ditto. + (econv_primitive_convert): new method. + (Init_transcode): define Encoding::Converter. + +Tue Aug 12 23:16:09 2008 Tanaka Akira + + * string.c (rb_str_splice_0): call rb_str_drop_bytes, not rb_str_drop. + +Tue Aug 12 19:11:05 2008 Nobuyoshi Nakada + + * tool/make-snapshot: fix for enc.mk. + +Tue Aug 12 19:08:42 2008 Nobuyoshi Nakada + + * string.c (rb_str_drop_bytes): new function to drop first bytes. + +Tue Aug 12 18:58:48 2008 Koichi Sasada + + * vm.c, vm_insnhelper.c (vm_define_method): move + function place. + +Tue Aug 12 18:56:52 2008 Nobuyoshi Nakada + + * string.c: more descriptive aliases of rb_str_new[2-5]. + [ruby-dev:35615] + +Tue Aug 12 18:51:29 2008 TAKAO Kouji + + * gc.c (getrusage_time): Returned effective value on Windows. + +Tue Aug 12 18:51:11 2008 Tanaka Akira + + * transcode.c (rb_trans_open): free ts before raise. + +Tue Aug 12 18:46:36 2008 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): should not ignore + <=> comparison. [ruby-dev:35732] + +Tue Aug 12 18:43:10 2008 Tanaka Akira + + * enc/trans/make_transdb.rb: *.erb.c is not used anymore. + +Tue Aug 12 18:32:33 2008 Tanaka Akira + + * transcode_data.h (rb_trans_elem_t): new field: from and to. + + * transcode.c (trans_open_i): just record from and to. + (rb_trans_open): load transcodings. + +Tue Aug 12 18:32:03 2008 Akinori MUSHA + + * ext/syslog/syslog.c (mSyslog_open): Use of Check_SafeStr() is + deprecated. + (mSyslogConstants_LOG_MASK, mSyslogConstants_LOG_UPTO): Use + NUM2INT() instead of FIX2INT() when the type of an given object + is not determined. + +Tue Aug 12 18:14:00 2008 Yukihiro Matsumoto + + * tool/transcode-tblgen.rb (#transcode_tblgen): slight message + improvement. + +Tue Aug 12 17:16:58 2008 Tanaka Akira + + * transcode.c (trans_open_i): check the result of rb_transcoding_open. + +Tue Aug 12 16:23:32 2008 Narihiro Nakamura + + * gc.c (gc_profile_result): use rb_str_catf. + +Tue Aug 12 16:13:45 2008 Tanaka Akira + + * transcode_data.h (TRANSCODE_ERROR): removed. + + * tool/transcode-tblgen.rb: 8bit byte of ASCII-8BIT is a valid + (but unique to ASCII-8BIT) character. + + * transcode.c (rb_eConversionUndefined): new error. + (rb_eInvalidByteSequence): ditto. + +Tue Aug 12 16:08:51 2008 Minero Aoki + + * lib/net/pop.rb: POP3Command should export @socket since POP + calls #socket. + +Tue Aug 12 16:06:28 2008 Nobuyoshi Nakada + + * sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating point + support. + +Tue Aug 12 15:52:45 2008 Narihiro Nakamura + + * gc.c (gc_profile_result): use sprintf. + +Tue Aug 12 15:37:40 2008 Yukihiro Matsumoto + + * string.c (rb_str_intern): should check symbol table overflow. + +Tue Aug 12 15:31:04 2008 Minero Aoki + + * lib/net/http.rb (send_request_with_body): Content-Length should + be byte length of string. (closes #203) + +Tue Aug 12 15:17:06 2008 NAKAMURA Usaku + + * enc/depend: (transvpath_prefix): prefix has no extension, so replace + %s with "". + +Tue Aug 12 15:03:43 2008 TAKAO Kouji + + * test/readline/test_readline.rb (TestReadline#test_safe_level_4): + tested Readline.vi_editing_mode? and Readline.emacs_editing_mode?. + +Tue Aug 12 14:25:09 2008 Nobuyoshi Nakada + + * enc/Makefile.in (.SUFFIXES): renamed to .trans. + + * enc/make_encmake.rb: added --encs and --no-encs options. + + * enc/depend (TRANSVPATH): fix for nmake. + +Tue Aug 12 14:19:53 2008 Minero Aoki + + * lib/net/https.rb: suppress syntax warning. + +Tue Aug 12 14:15:51 2008 Minero Aoki + + * lib/net/http.rb (Net::HTTP#initialize): initialize net/https + variables to suppress syntax warning. + +Tue Aug 12 14:15:13 2008 Nobuyoshi Nakada + + * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable. + +Tue Aug 12 10:25:14 2008 Yukihiro Matsumoto + + * array.c (rb_ary_delete): Array#delete to return deleted element. + +Tue Aug 12 10:18:01 2008 Yukihiro Matsumoto + + * test/win32ole/test_err_in_callback.rb: do not require 'mkmf' + unless WIN32OLE is defined. + +Tue Aug 12 07:41:13 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): add resetstate_func field for + resetting a state of stateful encoding. + + * enc/trans/iso2022.trans (rb_EUC_JP_to_ISO_2022_JP): specify + finish_eucjp_to_iso2022jp for resetstate_func. + + * tool/transcode-tblgen.rb: specify NULL for resetstate_func. + + * transcode.c (output_replacement_character): call resetstate_func + before appending the replacement character. + +Tue Aug 12 07:19:24 2008 Tanaka Akira + + * transcode.c (get_replacement_character): extracted from + output_replacement_character. + +Tue Aug 12 07:00:02 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): typedef at first. + +Tue Aug 12 06:48:35 2008 Tanaka Akira + + * transcode.c (rb_trans_conv): find second last error. + +Tue Aug 12 00:43:44 2008 Tanaka Akira + + * transcode_data.h (rb_trans_result_t): new type. + (rb_trans_elem_t): new type. + (rb_trans_t): new type. + + * transcode.c (transcode_dispatch_cb): removed. + (transcode_dispatch): removed. + (rb_transcoding_result_t): moved to rb_trans_result_t in + transcode_data.h. + (transcode_restartable0): goto follow_info when FUNsi. + (rb_transcoding_open): use get_transcoder_entry. + (rb_trans_open): new function. + (rb_trans_conv): ditto. + (rb_trans_close): ditto. + (trans_open_i): ditto. + (trans_sweep): ditto. + (more_output_buffer): take rb_trans_t instead of rb_transcoding as + an argument. + (transcode_loop): take from_encoding and to_encoding instead of tr + as arguments. use rb_trans_open/rb_trans_conv/rb_trans_close. + (str_transcode): don't use transcode_dispatch. + +Mon Aug 11 20:37:05 2008 Yukihiro Matsumoto + + * iseq.c (rb_iseq_clone): should preserve cref_stack link. + +Mon Aug 11 20:27:12 2008 Yukihiro Matsumoto + + * ext/dl/cfunc.c (rb_dlcfunc_call): add taint check. + + * ext/dl/dl.c (rb_dl_malloc): add rb_secure(2). + + * ext/dl/dl.c (rb_dl_realloc): ditto. + + * ext/dl/dl.c (rb_dl_free): ditto. + + * ext/dl/dl.c (rb_dl_ptr2value): ditto. + +Mon Aug 11 20:11:21 2008 Nobuyoshi Nakada + + * gc.c (getrusage_time): works only if RUSAGE_SELF is defined right + now. + + * gc.c (gc_profile_result): C99. + +Mon Aug 11 18:57:38 2008 Yukihiro Matsumoto + + * array.c (rb_ary_sample): rename #choice to #sample. in + addition, sample takes optional argument, a la #first. + +Mon Aug 11 18:28:02 2008 Narihiro Nakamura + + * gc.c: added GC::Profiler. + +Mon Aug 11 17:26:16 2008 TAKAO Kouji + + * ext/readline/README.ja: added API document for + Readline.vi_editing_mode? and Readline.emacs_editing_mode?. + + * ext/readline/extconf.rb: checked rl_editing_mode variable in + Readline library. + + * ext/readline/readline.c (readline_s_emacs_editing_mode_p): added + Readline.emacs_editing_mode? method. + (readline_s_vi_editing_mode_p): added Readline.vi_editing_mode? + method. + (Init_readline): ditto. + +Mon Aug 11 16:56:40 2008 TAKAO Kouji + + * test/readline/test_readline.rb: added test for Readline's class + methods. + +Mon Aug 11 16:39:23 2008 Yukihiro Matsumoto + + * class.c (clone_method): should copy cbase in cref as well. + [ruby-dev:35116] + + * iseq.c (iseq_mark): mark original iseq object. + + * iseq.c (iseq_free): do not free internal data if they have + original iseq to belong. + + * iseq.c (rb_iseq_clone): a new function to clone iseq value. + +Mon Aug 11 16:34:48 2008 Tanaka Akira + + * enc/trans/iso2022.trans: renamed from iso2022.erb.c. + + * enc/trans/single_byte.trans: ditto. + + * enc/trans/utf_16_32.trans: ditto. + + * enc/trans/korean.trans: ditto. + + * enc/trans/japanese.trans: ditto. + + * enc/depend: follow the renaming. + + * tool/build-transcode: ditto. + +Mon Aug 11 15:09:23 2008 Tanaka Akira + + * configure.in (rb_cv_broken_glibc_ia64_erfc): renamed from + rb_broken_glibc_ia64_erfc. + [ruby-core:18228] + +Mon Aug 11 10:04:34 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): rename fields. + readlen -> recognized_len. + feedlen -> readagain_len. + + * transcode.c: follow the field renaming. + +Sun Aug 10 22:34:55 2008 Tanaka Akira + + * transcode.c (transcode_restartable0): invalid handling simplified. + (transcode_restartable): use PARTIAL_INPUT for converting buffered + input. + +Sun Aug 10 22:24:24 2008 Yusuke Endoh + + * encoding.c: include util.h. [ruby-dev:35715] + + * common.mk: ditto. + +Sun Aug 10 20:59:54 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): new field: flags. + + * transcode.c (load_transcoder): extracted from transcode_dispatch_cb. + (rb_transcoding_result_t): renamed from transcode_result_t. + (rb_transcoding_open): new function. + (rb_transcoding_convert): ditto. + (rb_transcoding_close): ditto. + (transcode_loop): use rb_transcoding_open, rb_transcoding_convert + and rb_transcoding_close. + (str_transcode): don't need rb_transcoding. + +Sun Aug 10 18:09:16 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: record checksum of + transcode-tblgen.rb itself. + +Sun Aug 10 12:34:41 2008 Nobuyoshi Nakada + + * config.guess ({powerpc-apple,i586-pc}-haiku): re-applied r18403. + [ruby-core:18110] + + * config.{guess,sub}: updated to automake-1.10.1. + +Sun Aug 10 11:45:15 2008 Nobuyoshi Nakada + + * enc/Makefile.in (make-workdir): use MAKEDIRS. + + * enc/depend: makes target directory before compile/link. + + * tool/transcode-tblgen.rb: creates target directory. + +Sun Aug 10 11:30:48 2008 Tanaka Akira + + * transcode.c: rename my_transcoding to tc and my_transcoder to tr. + +Sun Aug 10 11:15:55 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): add feedlen field. + + * transcode.c (transcode_restartable0): renamed from + transcode_restartable. + save input buffer into feed buffer if next character is started the + point before input buffer. for example, "\x00\xd8\x01" then "\x02" + in UTF-16LE. \x02 causes invalid and next character is started from + \x01. + (transcode_restartable): new function to call + transcode_restartable0. if feed buffer is not empty, convert it at + first. + +Sun Aug 10 11:02:58 2008 Nobuyoshi Nakada + + * common.mk (extconf): use MAKEDIRS. + +Sun Aug 10 09:35:12 2008 Nobuyoshi Nakada + + * lib/irb.rb (IRB::Irb#inspect): instance_variables returns symbols + instead of strings now. [ruby-dev:34930] + +Sun Aug 10 09:22:14 2008 Tanaka Akira + + * transcode.c (transcode_char_start): refactored to remove readlen + argument. + (transcode_restartable): refactored to remove readlen variable. + +Sun Aug 10 08:56:14 2008 Nobuyoshi Nakada + + * gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t. + [ruby-core:18207] + + * configure.in (rb_cv_missing__dtos18, rb_cv_missing_fconvert), + ext/digest/md5/md5.c, ext/openssl/ossl.c (main), + ext/socket/extconf.rb (ipv6, wide-getaddrinfo): main should be int. + + * main.c (main), win32/winmain.c, wince/wincemain.c (WinMain): envp is + no longer used so long time. based on a patch from Peter Bowen at + [ruby-core:18208] + +Sat Aug 9 22:05:29 2008 Tanaka Akira + + * transcode.c (transcode_loop): take destination and resize function + as parameters. + (more_output_buffer): ditto. + (str_transcoding_resize): argument changed from rb_transcoding* to + VALUE. + (str_transcode): call transcode_loop with destination string and its + resize function. + + * transcode_data.h (rb_transcoding): move ruby_string_dest and + flush_func to transcode_loop parameters. + +Sat Aug 9 21:29:45 2008 NARUSE, Yui + + * common.mk: encs depend on transdb.h + +Sat Aug 9 21:10:51 2008 Nobuyoshi Nakada + + * configure.in (rb_cv_rshift_sign, rb_cv_binary_elf): get rid of + AC_TRY_RUN. + +Sat Aug 9 16:33:21 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): new fields: next_info and next_byte. + + * transcode.c (transcode_restartable): save/restore next_info and + next_byte. + sync readlen and in_p when invalid. + +Sat Aug 9 15:10:15 2008 Tanaka Akira + + * transcode.c (transcode_restartable): my_transcoder argument removed. + (transcode_loop): my_transcoder argument removed. + +Sat Aug 9 14:39:34 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): add fields for restartable + transcoding. + (rb_transcoder): add max_input field. + from_unit_length field is renamed to input_unit_length. + + * tool/transcode-tblgen.rb: generate max_input field. + + * enc/trans/iso2022.erb.c: follow rb_transcoder change. + + * enc/trans/utf_16_32.erb.c: ditto. + + * transcode.c (PARTIAL_INPUT): new constant. + (transcode_char_start): new function. + (transcode_result_t): new type. + (transcode_restartable): new function. + (more_output_buffer): new function. + (transcode_loop): use transcode_restartable. + +Sat Aug 9 13:35:08 2008 Nobuyoshi Nakada + + * stable/ext/socket/socket.c (NI_MAXHOST, NI_MAXSERV): fixed invalid + preprocessor directives. a patch from Peter Bowen at + [ruby-core:18211]. + +Sat Aug 9 06:37:21 2008 Nobuyoshi Nakada + + * enc/make_encdb.rb, enc/trans/make_transdb.rb: skip nonexistent + directory. [ruby-dev:35802] + +Sat Aug 9 01:07:51 2008 Tanaka Akira + + * enc/trans/utf_16_32.erb.c (fun_so_from_utf_32le): implemented. + (fun_so_to_utf_32le): implemented. + [ruby-dev:35777] + +Sat Aug 9 00:42:33 2008 Tanaka Akira + + * transcode_data.h (rb_transcoder): from_unit_length field added. + from_utf8 field removed. + + * tool/transcode-tblgen.rb: generate offsets range. + follow rb_transcoder change. + + * transcode.c (transcode_loop): don't use from_utf8. + make invalid region from_unit_length wise. + + * enc/trans/iso2022.erb.c: follow rb_transcoder and + transcode_generate_node change. + + * enc/trans/utf_16_32.erb.c: follow rb_transcoder and + transcode_generate_node change. + explicit :invalid map removed. + +Fri Aug 8 23:29:44 2008 Nobuyoshi Nakada + + * enc/depend (TRANSCSRCS): needs rule_subst to apply. + + * io.c (shutdown): not define if defined already. + +Fri Aug 8 22:47:26 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (opt_eq_func): large function to make inline. + + * bcc32/Makefile.sub (config.h): cannot compile a big inline function. + +Fri Aug 8 21:09:10 2008 NARUSE, Yui + + * common.mk (enk.mk): give not RUBY but MINIRUBY. + +Fri Aug 8 17:03:17 2008 Nobuyoshi Nakada + + * configure.in (shutdown, sched_yield, pthread_attr_setinheritsched): + check for Haiku. + + * eval_intern.h, io.c, thread_pthread.c: use autoconfisticated results. + +Fri Aug 8 16:52:55 2008 Nobuyoshi Nakada + + * common.mk (enc.mk): mkmf.rb requires rbconfig.rb. + + * common.mk (srcs-enc): renamed from transcodes. + + * enc/Makefile.in (make-workdir): creates object directories. + + * common.mk (encdb.h): see both $(srcdir)/enc and enc. + + * enc/make_encdb.rb: ditto. + + * enc/trans/make_transdb.rb: fix for the case no transdirs are given. + + * enc/trans/make_transdb.rb: converts only one transcoders for each + basename. + +Fri Aug 8 10:53:52 2008 Tanaka Akira + + * lib/resolv.rb: randomize source port and transaction id. + CVE-2008-1447. + + * lib/resolv-replace.rb (UDPSocket#bind): don't resolv host if host is + "". + +Fri Aug 8 04:20:14 2008 NARUSE, Yui + + * common.mk: see both $(srcdir)/enc/trans and enc/trans. + + * enc/trans/make_transdb.rb: ditto. + +Fri Aug 8 00:05:02 2008 TAKAO Kouji + + * ext/.document: added readline/readline.c. + + * ext/readline/readline.c: changed Copyright. added RDoc. + + * ext/readline/README.ja: fixed typo. + + * ext/readline/README: contents was moved RDoc. + +Thu Aug 7 23:43:11 2008 Tanaka Akira + + * transcode_data.h (rb_transcoding): new field "stateful". + (rb_transcoder): preprocessor and postprocessor field removed. + change arguments of func_ii, func_si, func_io and func_so. + new field "finish_func". + + * tool/transcode-tblgen.rb: make FUNii, FUNsi and FUNio + generatable. + + * transcode.c (transcoder_lib_table): removed. + (transcoder_table): change structure. + (transcoder_key): removed because the above structure change. + (make_transcoder_entry): new function. + (get_transcoder_entry): ditto. + (rb_register_transcoder): follow the structure change. + (declare_transcoder): ditto. + (transcode_search_path): new function for breadth first search to + find a list of converters. + (transcode_search_path_i): new function. + (transcode_dispatch_cb): ditto. + (transcode_dispatch): use transcode_search_path. + (transcode_loop): follow the argument change. + (str_transcode): preprocessor and postprocessor stuff removed. + + * enc/trans/iso2022.erb.c: new file. ISO-2022-JP conversion + re-implemented. + + * enc/trans/japanese.erb.c: ISO-2022-JP stuff removed. + + * enc/trans/utf_16_32.erb.c: follow argument change of FUNso. + + [ruby-dev:35798] + +Thu Aug 7 22:55:44 2008 TAKAO Kouji + + * ext/readline/README.ja: updated API document for Readline module. + +Thu Aug 7 20:52:08 2008 Shugo Maeda + + * lib/net/ftp.rb (login): raise FTPReplyError if passwd or acct + is not supplied. fixed [ruby-core:18058]. + +Thu Aug 7 18:01:44 2008 Akinori MUSHA + + * misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the + regexp to only pick definition lines properly. `module_function' + is not a definition of a module named `_function'. + +Thu Aug 7 17:47:55 2008 Nobuyoshi Nakada + + * enc/depend: add transdb.c. + +Thu Aug 7 16:28:51 2008 Nobuyoshi Nakada + + * Makefile.in, common.mk, {bcc,win}32/Makefile.sub (clean-ext): do not + use miniruby. + +Thu Aug 7 14:17:32 2008 Nobuyoshi Nakada + + * enc/depend: removed needless explicit commands. + + * lib/mkmf.rb, {bcc32,win32}/Makefile.sub (CLEANLIBS, CLEANOBJS): + moved clean targets to platform makefiles. + +Thu Aug 7 13:12:30 2008 NAKAMURA Usaku + + * ext/socket/getaddrinfo.c (gai_strerror): ignore only on Haiku. + a patch from , [ruby-dev:35796]. + +Thu Aug 7 06:31:12 2008 NARUSE, Yui + + * test/ruby/process.rb (test_popen_fork): skip a test which is + freeze in FreeBSD. + +Thu Aug 7 06:05:48 2008 NARUSE, Yui + + * config.guess: add powerpc-apple-haiku, i586-pc-haiku. + see [ruby-core:18110] + +Thu Aug 7 05:51:05 2008 NARUSE, Yui + + * eval_intern.h: Add support to Haiku. see [ruby-core:18110] + + * include/ruby/defines.h: ditto. + + * configure.in: ditto. + + * thread_pthread.c: ditto. + + * io.c: ditto. + + * lib/mkmf.rb: ditto. + + * ext/socket/getaddrinfo.c: ditto. + + * ext/socket/extconf.rb: ditto. + + * ext/socket/socket.c: ditto. + + * ext/socket/addrinfo.h: ditto. + + * ext/socket/getnameinfo.c: ditto. + +Thu Aug 7 05:43:32 2008 NARUSE, Yui + + * common.mk: mkdir enc/trans before build tables. + +Thu Aug 7 05:18:30 2008 NARUSE, Yui + + * enc/depend: enc/*.c is source but enc/trans/*.c is generated. + +Thu Aug 7 05:14:12 2008 NARUSE, Yui + + * regenc.c (code_to_mbc): raise RangeError Integer#chr + when more than 255 is given with single byte encoding. + [ruby-dev:35789] + +Thu Aug 7 05:06:03 2008 Nobuyoshi Nakada + + * gc.c (run_final): runs finalizers with the object terminated. + + * gc.c (rb_gc_call_finalizer_at_exit): keeps finalized objects from + linking to freelist. + +Thu Aug 7 04:43:14 2008 NARUSE, Yui + + * enc/depend: for build in other than srcdir. + +Wed Aug 6 22:40:48 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (transcode_generate_node): code + argument removed. + +Wed Aug 6 21:25:45 2008 Nobuyoshi Nakada + + * gc.c (chain_finalized_object): deletes finalizers to be invoked from + finalizer_table. + + * gc.c (rb_gc_call_finalizer_at_exit): warns when could not invoke + finalizers. + +Wed Aug 6 20:56:43 2008 Tanaka Akira + + * enc/depend: transcode table generation depends on + tool/transcode-tblgen.rb. + +Wed Aug 6 20:48:27 2008 Nobuyoshi Nakada + + * gc.c (rb_gc_call_finalizer_at_exit): self-referencing finalizers + cannot be invoked. [ruby-dev:35681] + +Wed Aug 6 20:44:41 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: distinguish UNDEF and INVALID. + [ruby-dev:35709] + + * transcode.c (transcode_loop): don't need rb_enc_mbclen now. + +Wed Aug 6 14:40:11 2008 Nobuyoshi Nakada + + * common.mk (transdb.h): requires transcoders. + + * enc/depend (srcs): target for transcoders. + +Wed Aug 6 14:04:08 2008 NAKAMURA Usaku + + * enc/depend: replace not only $(<:...) but also $<. + +Wed Aug 6 13:54:30 2008 NAKAMURA Usaku + + * win32/Makefile.sub (config.status): export BASERUBY. + + * enc/depend: avoid GNU make'ism. + +Wed Aug 6 07:59:02 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (ActionMap#eql?): use == to compare @map. + +Wed Aug 6 07:45:26 2008 Tanaka Akira + + * tool/transcode-tblgen.rb: show generating tables in verbose mode. + (transcode_generate_node): call ActionMap#generate_node with showing + table name. + + * enc/trans/utf_16_32.erb.c: use transcode_generate_node. + +Wed Aug 6 06:55:20 2008 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): propagates fatal error and system + exit to the main thread. + +Wed Aug 6 05:31:54 2008 Nobuyoshi Nakada + + * encoding.c (rb_to_encoding_index, rb_to_encoding): check if the name + is ascii compatible as well as Encoding.find. + + * transcode.c (str_encode): no need to duplicate first. + +Wed Aug 6 05:08:30 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sort_bang): reset to real class. + + * file.c (rb_find_file_ext, rb_find_file): ditto. + + * io.c (io_reopen): ditto. + +Wed Aug 6 03:56:39 2008 Nobuyoshi Nakada + + * common.mk (transcodes), tool/build-transcode: generates transcode + sources. + + * enc/trans/{japanese,korean,single_byte,utf_16_32}.c: to be + autogenerated now. + + * enc/depend: added rules for .c from .erb.c. + +Tue Aug 5 20:46:20 2008 Tanaka Akira + + * tool/build-transcode: new file. + + * tool/transcode-tblgen.rb: new file. + + * enc/trans/make_transdb.rb: exclude *.erb.c. + + * enc/depend: exclude *.erb.c. + + * enc/trans/utf_16_32.erb.c: new file. + + * enc/trans/single_byte.erb.c: new file. + + * enc/trans/japanese.erb.c: new file. + + * enc/trans/korean.erb.c: new file. + + * enc/trans/iso-8859-2-tbl.rb: new file. + + * enc/trans/iso-8859-3-tbl.rb: new file. + + * enc/trans/iso-8859-4-tbl.rb: new file. + + * enc/trans/iso-8859-5-tbl.rb: new file. + + * enc/trans/iso-8859-6-tbl.rb: new file. + + * enc/trans/iso-8859-7-tbl.rb: new file. + + * enc/trans/iso-8859-8-tbl.rb: new file. + + * enc/trans/iso-8859-9-tbl.rb: new file. + + * enc/trans/iso-8859-10-tbl.rb: new file. + + * enc/trans/iso-8859-11-tbl.rb: new file. + + * enc/trans/iso-8859-13-tbl.rb: new file. + + * enc/trans/iso-8859-14-tbl.rb: new file. + + * enc/trans/iso-8859-15-tbl.rb: new file. + + * enc/trans/eucjp-tbl.rb: new file. + + * enc/trans/sjis-tbl.rb: new file. + + * enc/trans/euckr-tbl.rb: new file. + + * enc/trans/utf_16_32.c: regenerated. + + * enc/trans/single_byte.c: regenerated. + + * enc/trans/japanese.c: regenerated. + + * enc/trans/korean.c: regenerated. + + [ruby-dev:35730] + +Tue Aug 5 18:02:53 2008 Kazuhiro NISHIYAMA + + * test/io/nonblock/test_flush.rb (TestIONonblock#test_flush): + rescue some exceptions. [ruby-dev:35638] + +Tue Aug 5 16:40:06 2008 Shugo Maeda + + * lib/net/ftp.rb (chdir): handle 5xx errors correctly. + fixed [ruby-core:18057]. + +Tue Aug 5 16:38:59 2008 Nobuyoshi Nakada + + * include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has + stdint.h. + +Tue Aug 5 16:13:05 2008 Shugo Maeda + + * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for + environments without OpenSSL. fixed [ruby-dev:35755]. + +Tue Aug 5 14:19:22 2008 Nobuyoshi Nakada + + * file.c (rb_stat_mode): generalized st_mode mask. + +Tue Aug 5 12:43:47 2008 Nobuyoshi Nakada + + * io.c (retry_sendfile, retry_read): ENOSYS and EWOULDBLOCK are not + defined on every platforms. + +Tue Aug 5 12:34:49 2008 Nobuyoshi Nakada + + * transcode_data.h (TRANSCODE_ERROR): common transcode failure + exception, would be changed later. + + * enc/trans/japanese.c (UNSUPPORTED_MODE): unsupported mode transition + exception. + +Tue Aug 5 03:29:52 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sort_bang): respect overridden <=> for String and + Fixnum. [ruby-core:17708] + + * include/ruby/node.h (NOEX_BASIC): basic definition method flag. + + * include/ruby/intern.h, vm_method.c (rb_method_basic_definition_p): + new function to check if the method is not redefined after the + initialization. + + * vm_method.c (rb_obj_respond_to): use rb_method_basic_definition_p. + +Mon Aug 4 20:39:06 2008 Yuki Sonoda (Yugui) + + * Makefile.in (update-rubyspec): renamed the rubyspec directory + "spec". Changed directory structure. + + * Makefile.in (test-rubyspec): ditto. + + * spec/README: described the structure of "spec" directory. + + * spec/default.mspec: configured for Matz's Ruby Implementation. + +Mon Aug 4 19:21:43 2008 Nobuyoshi Nakada + + * array.c (rb_ary_tmp_new): added. + + * vm_eval.c (vm_call_super): fixed typo, and get rid of too large + alloca. [ruby-core:17922] + +Mon Aug 4 16:48:50 2008 Nobuyoshi Nakada + + * parse.y (deferred_nodes, compstmt, arg, fixup_nodes, range_op): fix + up fixnum range literal in conditional as automagical line number + comparison. [ruby-core:12124], [ruby-dev:35731] + +Mon Aug 4 14:41:25 2008 URABE Shyouhei + + * lib/net/smtp.rb (Net::SMTP::rcptto): fix a typo. a patch from + Masao Takaku + fix [ruby-dev:35489]. + +Mon Aug 4 14:08:55 2008 Nobuyoshi Nakada + + * marshal.c (dump_ensure), process.c (run_exec_dup2), + string.c (rb_str_replace), transcode.c (transcode_dispatch): fixed + memory leaks. based on patches from shinichiro.h at [ruby-dev:35751]. + +Sun Aug 3 19:32:52 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (hash2named_arg): refactoring. + + * ext/win32ole/win32ole.c (ole_invoke, fole_respond_to, ev_on_event, + fev_off_event): accepts Symbol argument. + + * test/win32ole/test_win32ole.rb: ditto. + + * test/win32ole/test_win32ole_event.rb: ditto. + +Sun Aug 3 10:41:54 2008 Nobuyoshi Nakada + + * string.c (rb_str_shared_replace): fixed memory leak. a patch from + shinichiro.h at [ruby-dev:35742] + +Sat Aug 2 22:55:41 2008 Masaki Suketa + + * test/win32ole/test_err_in_callback.rb: remove temporary files. + some refactoring. + +Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada + + * parse.y (yylex): 8 and 9 in octal integer should cause compile + error. [ruby-dev:35729] + +Sat Aug 2 01:06:10 2008 NARUSE, Yui + + * enc/trans/japanese.c: add U+FF5E to EUC-JP. + [ruby-dev:35720] [ruby-dev:35722] + +Fri Aug 1 23:49:44 2008 TAKAO Kouji + + * ext/readline/extconf.rb: checked to have clear_history in + readline library. + * ext/readline/readline.c (hist_get, hist_each, Init_readline): + The offset specified for the argument of history_get() might be + different in GNU Readline and libedit. If use libedit, it was + corrected that the computational method of the offset specified + for the argument of history_get() when the Readline module was + initialized was decided. + (hist_get, hist_set): If use libedit, accesses first an input + content in history when specifies the negative offset for the + argument of history_get() or replace_history_entry(). Then + checks the offset is negative in ruby. + (rb_remove_history): When compiling, it corrects it to warning + when libedit is used. + (hist_clear, Init_readline): added Readline::HISTORY.clear + method. [ruby-dev:35551] + * test/readline/test_readline_history.rb: added unit test for + Readline::HISTORY. + +Fri Aug 1 23:26:45 2008 NARUSE, Yui + + * transcode.c (transcode_loop): undefined character is replaced with + only one character. [ruby-dev:35709] + +Fri Aug 1 23:26:22 2008 Yuki Sonoda (Yugui) + + Merged r16430(akr), r16431(akr), r16433(akr), r16469(nobu), and + r17874(akr) from ruby_1_8. + + * Makefile.in (update-rubyspec): added + + * Makefile.in (test-rubyspec): added + +Fri Aug 1 23:16:03 2008 NARUSE, Yui + + * enc/trans/japanese.c: add support for CP51932, + +Fri Aug 1 22:59:40 2008 NARUSE, Yui + + * enc/trans/japanese.c: add U+FF0C, + +Fri Aug 1 21:49:41 2008 Yusuke Endoh + + * test/sdbm/test_sdbm.rb: add some tests. + +Fri Aug 1 21:36:00 2008 Yusuke Endoh + + * gc.c (allocate_heaps, assign_heap_slot, rb_newobj_from_heap): + reset during_gc before raising NoMemoryError. + +Fri Aug 1 21:29:56 2008 Yusuke Endoh + + * vm.c (Init_BareVM): check failure of malloc(). + +Fri Aug 1 20:55:27 2008 NARUSE, Yui + + * enc/trans/japanese.c (to_SHIFT_JIS_EF_BF_offsets): add U+FFF3, + U+FFF4, U+FFF5. + + * enc/trans/japanese.c (to_SHIFT_JIS_EF_BF_infos): ditto. + + * enc/trans/japanese.c (to_EUC_JP_EF_BF_infos): added. + + * enc/trans/japanese.c (to_EUC_JP_EF_BF): added. + + * enc/trans/japanese.c (to_EUC_JP_EF_infos): change size. + [ruby-dev:35714] + +Fri Aug 1 18:27:15 2008 Yuki Sonoda (Yugui) + + * parse.y (parser_yylex): removed an useless conditional, and magic + comment are ignored unless at the first of line. + + * test/ruby/test_m17n.rb (test_magic_comment_vim): added. + + * test/ruby/test_m17n.rb (test_magic_comment_at_various_positions): + added. + +Fri Aug 1 14:54:42 2008 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_seekdir): no need to rewind to seek forward. + +Fri Aug 1 05:31:08 2008 NARUSE, Yui + + * transcode.c (output_replacement_character): + rename from _get_replacement_character. + + * transcode.c (output_replacement_character): + fix replacement on UTF-32{BE,LE}. [ruby-dev:35705] + + * transcode.c (transcode_loop): ditto. + + * test/ruby/test_transcode.rb (test_invalid_replace): + add for above. + +Fri Aug 1 01:01:49 2008 Yusuke Endoh + + * proc.c (rb_proc_call_with_block): reduce comparison. + +Wed Jul 30 21:08:06 2008 Yusuke Endoh + + * ext/syck/syck.c (syck_free_parser): fix memory leak by + YAML::Syck.compile. + +Thu Jul 31 22:17:35 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (VpMult): prevent memory leak. + +Thu Jul 31 20:05:56 2008 NARUSE, Yui + + * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): + fix option1 and 3. + +Thu Jul 31 19:54:57 2008 NARUSE, Yui + + * transcode.c (get_replacement_character): use U+FFFD as replacement + character when convert to Unicode. + + * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): + rename from test_public_review_issue_121. + + * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): + enable option2. + +Thu Jul 31 17:00:10 2008 NARUSE, Yui + + * transcode.c (get_replacement_character): fix: invalid byte sequence + is always replaced "\x00?". + +Thu Jul 31 16:37:03 2008 NARUSE, Yui + + * test/rubygems/test_gem_ext_configure_builder.rb + (test_self_build_fail): remove extra newline. [ruby-dev:35704] + +Thu Jul 31 15:11:11 2008 Martin Duerst + + * test/ruby/test_transcode.rb: added test_shift_jis + (contributed by Yoshihiro Kambayashi) and + test_public_review_issue_121 + (see http://www.unicode.org/review/pr-121.html) + +Thu Jul 31 13:18:30 2008 Yusuke Endoh + + * include/ruby/ruby.h (struct RString): size of ary must be + RSTRING_EMBED_LEN_MAX + 1. + +Thu Jul 31 12:23:53 2008 Nobuyoshi Nakada + + * pack.c (pack_unpack): upper half of hexdigits has never been used. + +Thu Jul 31 11:31:29 2008 Nobuyoshi Nakada + + * ext/syck/syck.h (ASSERT): fix typo at r18176. + + * ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no + effect unless debug mode. + +Thu Jul 31 10:51:39 2008 Nobuyoshi Nakada + + * iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms which + int size differs from pointer size. + + * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): ditto + + * ext/syck/rubyext.c (rb_syck_err_handler), + (syck_default_error_handler): ditto. + +Thu Jul 31 02:21:39 2008 Yusuke Endoh + + * ext/syck/rubyext.c (rb_syck_compile): remove meaningless branch + that misleads into thinking that the variable sav may be + uninitialized. + +Thu Jul 31 01:25:43 2008 Nobuyoshi Nakada + + * thread.c (rb_mutex_unlock_all): mutex is no longer a ruby object. + +Thu Jul 31 01:18:07 2008 Yusuke Endoh + + * parse.y (magic_comment_encoding): remove meaningless null check. + +Thu Jul 31 01:09:28 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (VpIsRoundMode): fix tautology + condition. + +Thu Jul 31 00:58:33 2008 Nobuyoshi Nakada + + * pack.c (pack_unpack): reduced static variables. + +Thu Jul 31 00:10:20 2008 Yusuke Endoh + + * proc.c (rb_proc_call_with_block): prevent null reference. + +Wed Jul 30 22:19:13 2008 Yusuke Endoh + + * parse.y (vtable_free): remove meaningless null check. + +Wed Jul 30 22:08:25 2008 Tanaka Akira + + * dir.c (struct dir_data): change path field char * to VALUE. + (mark_dir): new function for mark path field. + (free_dir): follow the path field change. + (dir_s_alloc): ditto. + (dir_initialize): ditto. + (dir_s_open): ditto. + (dir_inspect): ditto. + (dir_path): return (duplicate of) the path field to preserve + encoding. [ruby-dev:35685] + +Wed Jul 30 22:06:56 2008 Yusuke Endoh + + * string.c (sym_inspect): remove dead code. + +Wed Jul 30 21:32:52 2008 Yusuke Endoh + + * ChangeLog: fix wrong method name and add reference. + +Wed Jul 30 21:30:08 2008 Yusuke Endoh + + * regparse.c (name_add): fix memory leak. + +Wed Jul 30 21:08:06 2008 Yusuke Endoh + + * regparse.c (parse_exp): fix memory leak at Regexp.new("x{1,1}"). + +Wed Jul 30 17:48:15 2008 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_select): recalc the rest of timeout for each + iterations. [ruby-core:18015] + +Tue Jul 29 23:37:37 2008 Yusuke Endoh + + * io.c (io_ungetc): raise NotImplementedError when ungetc is called + against dummy encoding IO. [ruby-dev:35686] + + * io.c (rb_io_getline_1): ditto when gets with delimiter is called. + + * io.c (io_getc): ditto when getc is called. + + * test/ruby/test_io_m17n.rb (test_terminator_stateful_conversion, + test_getc_stateful_conversion, test_ungetc_stateful_conversion): + these tests should raise NotImplementedError. + +Tue Jul 29 22:55:34 2008 Yusuke Endoh + + * test/ruby/test_io.rb (pipe): run reader thread and writer thread. + +Tue Jul 29 21:38:08 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): fix typo. + +Tue Jul 29 21:35:59 2008 Yusuke Endoh + + * test/etc/test_etc.rb (test_passwd): age field may be string under + some environments. + +Tue Jul 29 17:54:35 2008 NARUSE, Yui + + * dir.c (char_casecmp): fix: return 0 if either of characters is NUL. + +Tue Jul 29 13:17:03 2008 NARUSE, Yui + + * test/etc/test_etc.rb (test_getpwuid): fix for users whose uid is + shared. + +Tue Jul 29 05:37:53 2008 Nobuyoshi Nakada + + * file.c (rb_find_file_ext, rb_find_file): explicit relative path + which starts with "./" or "../" should be searched from cwd + instead of load path. [ruby-dev:35673] + +Tue Jul 29 02:39:46 2008 NARUSE, Yui + + * math.c (math_atanh): raise EDOM on FreeBSD when atanh(1). + + * math.c (math_log): ditto. + + * math.c (math_log2): ditto. + + * math.c (math_log10): ditto. + + * test/ruby/test_math.rb: test for above. + +Tue Jul 29 01:41:15 2008 Tanaka Akira + + * dir.c (struct dir_data): intenc field removed. + (dir_s_alloc): intenc initialization removed. + (dir_initialize): :internal_encoding option removed. dirname code + conversion removed. + (dir_enc_str): code conversion removed. + [ruby-dev:35661] + +Mon Jul 28 21:32:17 2008 Kouhei Sutou + + * test/rss/: use PNG instead of zlib as binary data. + +Mon Jul 28 21:24:33 2008 NAKAMURA Usaku + + * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): reverted + r18239 because r18245 made the changes unnecessary. + + * thread.c (rb_mutex_struct): define after including thread_{pthread, + win32}.c. + +Mon Jul 28 21:00:10 2008 Yusuke Endoh + + * test/ruby/test_require.rb (test_require_too_long_filename): + Kernel#require does not use dln_find_file_r (at r18242). + +Mon Jul 28 20:17:03 2008 Yusuke Endoh + + * vm_core.h: move the definition of struct rb_mutex_struct. + + * thread.c: ditto. + +Mon Jul 28 18:58:46 2008 Yusuke Endoh + + * thread.c (mutex_unlock): fix typo. + +Mon Jul 28 18:15:45 2008 Nobuyoshi Nakada + + * file.c (rb_find_file_ext, rb_find_file): not to split load path with + path separator. [ruby-Bugs-21356] + +Mon Jul 28 18:14:03 2008 Nobuyoshi Nakada + + * win32/win32.c (overlapped_socket_io, fcntl, rb_w32_close): must not + pass a pointer to int which is smaller than st_data_t on mswin64. + +Mon Jul 28 16:49:47 2008 Nobuyoshi Nakada + + * win32/win32.c (CreateChild, overlapped_socket_io): suppress + warnings. + +Mon Jul 28 16:06:36 2008 NAKAMURA Usaku + + * win32/win32.c (MAXPATHLEN): define before use. + +Mon Jul 28 16:01:12 2008 NAKAMURA Usaku + + * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): moved + the definitions from .c to .h because rb_thread_cond_struct is used + in vm_core.h. + +Mon Jul 28 14:29:54 2008 Nobuyoshi Nakada + + * dln.c (load_lib): use dln_find_file_r instead of dln_find_file. + +Mon Jul 28 00:18:47 2008 Yusuke Endoh + + * vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct in + *_free against an object that is going to be free'ed. So, change type + of thread_t#keeping_mutexes from VALUE to mutex_t. + + * vm.c: remove mark to keeping_mutexes. + +Sun Jul 27 23:32:42 2008 Yusuke Endoh + + * test/openssl/test_ssl.rb (server_loop): rescue Errno::EINVAL and + Errno::ECONNABORTED. + +Sun Jul 27 22:11:57 2008 NARUSE, Yui + + * bootstraptests/method.rb: increase RLIMIT_STACK size to 4M+8Kbytes + because FreeBSD fails this less than that. + +Sun Jul 27 21:45:59 2008 Koichi Sasada + + * gc.c (gc_mark_children, obj_free): T_DEFERRED should not be appear. + + * gc.c (gc_sweep, finalize_list): fix to decrement heap_slot#limit + after executing finalizer. + +Sun Jul 27 14:48:37 2008 Koichi Sasada + + * include/ruby/ruby.h: add a type T_DEFERRED. + + * gc.c: fix deferred finalizer system. finalize processes of + T_DATA and T_FILE are executed after gc process. + And fix to use BUILTIN_TYPE() instead of seeing flag. + + * thread.c, vm_core.h: add RUBY_VM_SET_FINALIZER_INTERRUPT() + and check interrupt_flag at rb_thread_execute_interrupts(). + + * thread.c (mutex_mark): fix to mark next_mutex. + + * vm.c (rb_thread_mark): fix to mark keeping_mutexes. + +Sun Jul 27 09:15:28 2008 Nobuyoshi Nakada + + * dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant + versions instead. + +Sun Jul 27 09:02:32 2008 Masatoshi SEKI + + * lib/rinda/tuplespace.rb: merged from 1.8. + + * test/rinda/test_rinda.rb: merged from 1.8. + +Sat Jul 26 22:45:18 2008 Yuki Sonoda (Yugui) + + * sample/exyacc.rb: fixed NoMethodError(Kernel#sub!). + replaced use of special variables with explicit IO + operations. + +Sat Jul 26 21:17:18 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (Init_win32ole): add + WIN32OLE_EVENT#handler=, WIN32OLE_EVENT#handler + + * test/win32ole/test_win32ole_event.rb: ditto. + +Sat Jul 26 07:44:14 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (add_event_call_back): remove unused + variable. + +Fri Jul 25 23:48:10 2008 Nobuyoshi Nakada + + * gc.c (gc_sweep, obj_free, run_final): defer finalizers of IO and + Data. [ruby-dev:35578] + +Fri Jul 25 23:35:18 2008 Nobuyoshi Nakada + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils#split_header_value): + reduce backtrack. based on a fix by Christian Neukirchen + . + +Fri Jul 25 21:55:38 2008 Yusuke Endoh + + * test/ruby/enc/test_koi8.rb: move from test/ruby/test_koi8.rb. + +Fri Jul 25 21:09:32 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_invoke, add_event_callback, + rescue_callback): refactoring. + +Fri Jul 25 20:52:44 2008 Masaki Suketa + + * test/win32ole/err_in_callback.rb: add test of raising + exception in WIN32OLE_EVENT callback. + + * test/win32ole/test_err_in_callback.rb: ditto. + +Fri Jul 25 20:43:57 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (Init_win32ole): add + WIN32OLE_EVENT#off_event. + + * test/win32ole/test_win32ole_event.rb: ditto. + + * test/win32ole/test_win32ole_event.rb: some refactoring. + +Fri Jul 25 19:50:49 2008 Nobuyoshi Nakada + + * regint.c (xmalloc, xrealloc, xfree): not to use ruby managed memory. + +Fri Jul 25 15:52:40 2008 Koichi Sasada + + * vm.c (vm_invoke_proc): skip setting safe_level if + it from bmethod. This change makes test/ruby/test_proc.rb pass. + +Fri Jul 25 10:00:00 2008 Martin Duerst + + * test/ruby/test_transcode.rb: refactoring/cleanup of + test_iso_2022_jp(_1) + +Fri Jul 25 04:12:57 2008 NARUSE, Yui + + * ext/nkf/nkf.c (rb_nkf_convert): output of mime encode is US-ASCII. + [ruby-list:45257] + +Fri Jul 25 02:43:11 2008 Yusuke Endoh + + * sample/coverage.rb: move from lib/coverage.rb because this remains in + an early phase of development. + +Fri Jul 25 00:10:23 2008 Nobuyoshi Nakada + + * file.c (rb_find_file_ext, rb_find_file): converts Windows style path + to Cygwin path. [ruby-dev:35647] + +Thu Jul 24 16:30:21 2008 NAKAMURA Usaku + + * win32/win32.c (exit_handler): use st_free_table() to free socklist. + + * win32/win32.c (rb_w32_pipe_exec, rb_w32_accept, rb_w32_socket, + rb_w32_socketpair): should check and release fd and sockets/handles + if an error occurs in rb_w32_open_osfhandle(). + +Thu Jul 24 16:05:02 2008 NAKAMURA Usaku + + * win32/win32.c (overlapped_socket_io): avoid warnings. + + * thread_win32.c (ubf_handle): refactoring. + +Thu Jul 24 07:01:13 2008 Nobuyoshi Nakada + + * ext/win32ole/win32ole.c: got rid of improper casts. + +Wed Jul 23 23:19:15 2008 Yusuke Endoh + + * test/socket/test_tcp.rb (test_recvfrom): replace an irrelevant test + for old behavior. + +Wed Jul 23 21:38:16 2008 Yusuke Endoh + + * test/ruby/test_marshal.rb: suppress warning during test. + +Wed Jul 23 21:35:53 2008 Yusuke Endoh + + * test/ruby/test_dir.rb: suppress warning during test. + +Wed Jul 23 18:27:46 2008 Nobuyoshi Nakada + + * ext/tk/{stubs,tcltklib}.c, ext/tk/tkutil/tkutil.c: fix warnings + about constness and signedness. + +Wed Jul 23 17:04:22 2008 Nobuyoshi Nakada + + * ext/openssl/openssl_missing.h (d2i_of_void): define for older + versions. [ruby-dev:35637] + +Wed Jul 23 13:53:36 2008 Nobuyoshi Nakada + + * ext/curses/extconf.rb: use try_static_assert. + +Wed Jul 23 10:06:19 2008 Kazuhiro NISHIYAMA + + * test/zlib/test_zlib.rb (TestZlibDeflate#test_params): suppress a + finalizer warning. + +Wed Jul 23 06:25:42 2008 Nobuyoshi Nakada + + * ext/syck: suppress warnings more. + +Wed Jul 23 03:19:31 2008 Nobuyoshi Nakada + + * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename): + constified. + +Wed Jul 23 03:02:08 2008 Nobuyoshi Nakada + + * ext/syck: suppress warnings. + +Wed Jul 23 00:34:20 2008 Nobuyoshi Nakada + + * ext/openssl: suppress warnings. + +Tue Jul 22 23:01:34 2008 Yusuke Endoh + + * ext/syck/rubyext.c, ext/syck/yaml2byte.c, ext/syck/emitter.c, + ext/syck/syck.c, ext/syck/handler.c, ext/syck/syck.h: suppress GCC + warning. + +Tue Jul 22 20:42:24 2008 Yusuke Endoh + + * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): BigDecimal#<=> should + return nil if an argument can't be coerced into BigDecimal. + + * ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c + (VpIsNegDoubleZero, VpItoV): comment out unused functions. + +Tue Jul 22 20:33:54 2008 Yusuke Endoh + + * test/rdoc/test_rdoc_parser_ruby.rb (teardown): close tempfile. + +Tue Jul 22 19:38:38 2008 Martin Duerst + + * test/ruby/test_transcode.rb: added two comments + +Tue Jul 22 18:08:34 2008 NAKAMURA Usaku + + * README.EXT, README.EXT.ja: mention about FIX2LONG and NUM2LONG. + see [ruby-dev:35197] + +Tue Jul 22 17:53:32 2008 Nobuyoshi Nakada + + * compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect), + iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm), + process.c (pst_message), re.c (match_inspect): use rb_str_catf. + + * dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use + rb_sprintf. + + * error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use + rb_vsprintf. + +Tue Jul 22 17:20:25 2008 NAKAMURA Usaku + + * win32/win32.c (init_func): new function to get API's address which + is often used and not supported on all Windows. + + * win32/win32.c (overlapped_socket_io): shouldn't use overlapped I/O if + CancelIo() is not supported. + +Tue Jul 22 16:47:57 2008 Nobuyoshi Nakada + + * include/ruby/intern.h, sprintf.c (rb_str_catf, rb_str_vcatf): new + functions. [ruby-dev:35597] + + * string.c (rb_str_capacity): new function to return the capacity. + +Tue Jul 22 16:08:58 2008 NAKAMURA Usaku + + * ext/socket/socket.c (connect_blocking, socks_connect_blocking, + ruby_connect): cast. + +Tue Jul 22 11:05:08 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_dir.rb: use realpath of tmpdir. [ruby-dev:35481] + + * test/ruby/test_process.rb: ditto. + +Tue Jul 22 09:51:32 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el: fix here-doc strings with inner quotes. patches + by Nathan Weizenbaum from [ruby-core:17615] + through [ruby-core:17910]. + +Tue Jul 22 04:26:16 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_str_buf_new2): optimization for literals. + + * string.c (str_buf_cat): returns VALUE. + +Tue Jul 22 03:34:01 2008 Eric Hodel + + * lib/rdoc*: Update to RDoc 2.1.0 r112. + +Tue Jul 22 02:51:46 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_str_buf_cat2, rb_str_cat2): optimization + for literals. + +Tue Jul 22 02:50:47 2008 Nobuyoshi Nakada + + * README.EXT, README.EXT.ja (1.5 Manipulating Ruby data): fix the + prototype of rb_vsprintf, and added rb_str_cat2. [ruby-dev:35622] + +Mon Jul 21 17:15:38 2008 Tanaka Akira + + * encoding.c (rb_filesystem_encoding): use locale encoding on Unix. + [ruby-dev:35617] + +Mon Jul 21 15:29:32 2008 Nobuyoshi Nakada + + * missing/vsnprintf.c (struct __sbuf, FILE): use size_t. + + * sprintf.c (ruby__sfvwrite): ditto. + +Mon Jul 21 13:55:37 2008 Nobuyoshi Nakada + + * README.EXT, README.EXT.ja (1.5 Manipulating Ruby data): mentioned + rb_sprintf and rb_vsprintf. [ruby-dev:35611] + +Mon Jul 21 10:25:52 2008 Nobuyoshi Nakada + + * io.c (prepare_getline_args): check if rs is a string when non-nil + lim is given. [ruby-dev:35610] + +Mon Jul 21 04:55:20 2008 Tanaka Akira + + * dir.c (dir_initialize): use rb_convert_type instead of + rb_check_convert_type to prevent SEGV by Dir.new(".", true). + (dir_initialize): use FilePathValue before rb_enc_get(dirname) to + prevent SEGV by Dir.new(0). + +Mon Jul 21 04:42:15 2008 Tanaka Akira + + * re.c (rb_reg_s_union): useless rb_enc_get call removed to prevent + SEGV by Regexp.union("", nil). + +Sun Jul 20 22:50:11 2008 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): NODE_POSTEXE should set each end + procs only once. [ruby-dev:35596] + +Sun Jul 20 16:00:37 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (EVENTSINK_Invoke): use rb_protect + instead of rb_rescue2. [ruby-dev:35595] + +Sun Jul 20 01:23:24 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (EVENTSINK_Invoke): little refactoring. + + * ext/win32ole/win32ole.c (EVENTSINK_GetIDsOfNames): return + ITypeInfo::GetIDsOfNames(). + +Sat Jul 19 09:31:35 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (EVENTSINK_Invoke): little refactoring. + + * ext/win32ole/win32ole.c: add document of inspect methods. + +Sat Jul 19 06:08:43 2008 Eric Hodel + + * lib/rdoc*: Import RDoc r104. Various make test-all fixes. + +Sat Jul 19 00:27:58 2008 NAKAMURA Usaku + + * numeric.c (check_uint, rb_num2uint, rb_fix2uint): fixed wrong check + about 64bit positive value. + +Fri Jul 18 23:23:37 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (EVENTSINK_Invoke): avoid cfp consistency + error when exception raised in event callback. + +Fri Jul 18 14:52:14 2008 NAKAMURA Usaku + + * win32/win32.c (socklist): table for registering socket options + (currently only O_NONBLOCK). + + * win32/win32.c (StartSockets, exit_handler): alloc/free socklist. + + * win32/win32.c (is_socket): use socklist. + + * win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair): + register new socket to socklist. + + * win32/win32.c (rb_w32_close): remove closing socket from socklist. + + * win32/win32.c (fcntl): register socket options. + + * win32/win32.c (overlapped_socket_io): send to/recv from socket with + overlapped operation if the socket is not nonblocking mode. + [experimental] + + * win32/win32.c (rb_w32_send, rb_w32_sendto, rb_w32_recv, + rb_w32_recvfrom): use overlapped_socket_io(). + + * win32/win32.c (open_ifs_socket): set overlapped mode. this is the + default mode of winsock's socket(), so lacking it is an old bug. + +Fri Jul 18 09:44:30 2008 Eric Hodel + + * lib/rdoc/*: Import RDoc r101. + +Thu Jul 17 23:45:55 2008 Yusuke Endoh + + * test/rdoc/test_rdoc_c_parser.rb (teardown): close tempfile. + +Thu Jul 17 21:08:49 2008 Yusuke Endoh + + * test/ruby/test_process.rb (test_getpriority, test_setpriority): use + PRIO_PROCESS instead of PRIO_USER. + +Thu Jul 17 20:41:42 2008 Yusuke Endoh + + * pack.c (pack_unpack): fix v and V with big endian. + [1].pack("V").unpack("V") was [4294967296]. + +Thu Jul 17 20:35:03 2008 Yusuke Endoh + + * pack.c (pack_pack): fix i! with big endian. [1].pack("i!") was + "\0\0\0\0". + +Thu Jul 17 16:48:40 2008 NAKAMURA Usaku + + * ext/socket/socket.c (ruby_connect): select() for connect() has + mean only when the socket is non-blocking. + +Thu Jul 17 10:55:24 2008 Eric Hodel + + * mkconfig.rb: Simplify expression for RDoc. + +Thu Jul 17 10:21:15 2008 NAKAMURA Usaku + + * numeric.c (check_uint, rb_num2uint, rb_fix2uint): strict check. + fixed [ruby-dev:33683] + +Thu Jul 17 04:19:33 2008 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): wake up joining threads. + + * thread.c (sleep_forever, sleep_timeval): return when interrupted. + [ruby-dev:35542] + + * thread.c (timer_thread_function): restore main thread status. + [ruby-core:17270] + +Thu Jul 17 01:27:38 2008 Yusuke Endoh + + * io.c (appendline): remove invalid access. + +Wed Jul 16 18:04:34 2008 Nobuyoshi Nakada + + * signal.c (signal_exec, trap_handler): trap accepts a string as + command. [ruby-dev:35533] + +Wed Jul 16 00:04:30 2008 Yusuke Endoh + + * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): new + method. + + * test/ruby/test_argf.rb: use assert_in_out_err instead of + EnvUtil.rubyexec. + + * test/ruby/test_module.rb: ditto. + + * test/ruby/test_require.rb: ditto. + + * test/ruby/test_objectspace.rb: ditto. + + * test/ruby/test_object.rb: ditto. + + * test/ruby/test_string.rb: ditto. + + * test/ruby/test_method.rb: ditto. + + * test/ruby/test_variable.rb: ditto. + + * test/ruby/test_io.rb: ditto. + + * test/ruby/test_rubyoptions.rb: ditto. + + * test/ruby/test_exception.rb: ditto. + + * test/ruby/test_class.rb: ditto. + + * test/ruby/test_thread.rb: ditto. + +Tue Jul 15 22:34:03 2008 NAKAMURA Usaku + + * win32/Makefile.sub (ruby_version): follow changes in configure.in. + +Tue Jul 15 21:58:20 2008 Nobuyoshi Nakada + + * ext/tk/{,tkutil/}extconf.rb: ruby/ruby.h no longer needs to be + checked. + + * ext/tk/{tcltklib.c,tkutil/tkutil.c}: check macros for each headers. + +Tue Jul 15 21:45:41 2008 Akinori MUSHA + + * ext/tk/extconf.rb, ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: Do + not test ruby/ruby.h, which makes OS X's gcc pick the wrong + header file from Ruby.framework. + +Tue Jul 15 21:31:26 2008 Akinori MUSHA + + * configure.in (--with-ruby-version): Add a new option to specify + the ruby version string for version specific directories. + [ruby-dev:35490] + + * mkconfig.rb: Definition of ruby_version is now determined by the + configure script. + +Tue Jul 15 18:14:20 2008 NAKAMURA Usaku + + * ext/socket/socket.c (ruby_connect, s_accept): check before readable/ + writable by select() instead of wrapping in blocking region. + + * ext/socket/socket.c (bsock_send, s_recvfrom, udp_send, unix_send_io, + unix_recv_io): should check readable/writable before calling blocking + functions. + see [ruby-dev:35446] + +Tue Jul 15 18:12:02 2008 NAKAMURA Usaku + + * thread_win32.c (ubf_handle): cancel blocking IO if it can (only + Vista). see [ruby-dev:35446] + + * win32/win32.c (errmap): add ERROR_OPERATION_ABORTED as EINTR. + +Mon Jul 14 20:35:21 2008 Masaki Suketa + + * test/win32ole/test_win32ole_event.rb (teardown): fix typo. + +Mon Jul 14 18:47:30 2008 Nobuyoshi Nakada + + * transcode.c (transcode_loop): constified. + + * transcode.c (str_transcode): rb_str_set_len() sets a delimiter. + + * transcode_data.h (rb_transcoder): constified preprocessor and + postprocessor input. + + * enc/trans/japanese.c: ditto. + +Sun Jul 13 05:37:50 2008 NAKAMURA Usaku + + * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): typo. + + * {bcc32,win32}/Makefile.sub: (SIZEOF_SIZE_T, SIZEOF_PTRDIFF_T): added. + +Sat Jul 12 23:54:55 2008 NAKAMURA Usaku + + * win32/Makefile.sub (LIBRUBY_DLDFLAGS): import library which created + with DLL is broken. save import library which created by lib.exe and + install it. + fixed the problem mentioned at the postscript of [ruby-dev:35448] + +Sat Jul 12 23:24:21 2008 Tanaka Akira + + * ext/socket/socket.c: use PRIuSIZE. + +Sat Jul 12 22:41:39 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): fixed typo. + +Sat Jul 12 22:30:43 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (HAVE_RUBY_RUBY_H): defines macros so that + extconf.rb do not need to check if headers exist under separated + directory. [ruby-dev:35437] + + * include/{ruby,rubyio,rubysig}.h, include/ruby/intern.h: use + "ruby/..." instead of . + +Sat Jul 12 22:17:26 2008 Nobuyoshi Nakada + + * configure.in (sizeof ptrdiff_t): check for size of ptrdiff_t. + + * include/ruby/ruby.h (PRI?PTRDIFF, PRI?SIZE): printf conversion + specifiers for ptrdiff_t and size_t/ssize_t. + + * insns.def (leave), marshal.c (long_toobig), transcode.c + (str_transcode), vm_dump.c (control_frame_dump, stack_dump_each), + (debug_print_register, debug_print_pre): t and z length modifiers + are C99. + +Sat Jul 12 16:02:31 2008 Nobuyoshi Nakada + + * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): requires + webrick/cookie. [ ruby-Bugs-21139 ] + +Sat Jul 12 09:25:07 2008 Masaki Suketa + + * test/win32ole/test_win32ole_event.rb: add test + for WIN32OLE_EVENT#on_event_with_outargs + + * test/win32ole/test_win32ole_event.rb(teardown): calling + WIN32OLE_EVENT.message_loop + +Sat Jul 12 01:54:13 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_select): shouldn't pass non-socket handle to + original select(). + +Fri Jul 11 23:05:40 2008 Yusuke Endoh + + * test/zlib/test_zlib.rb: add a test for Zlib::Deflate#params. + +Fri Jul 11 22:58:28 2008 Yusuke Endoh + + * ext/zlib/zlib.c (rb_deflate_params): flush before deflateParams. + [ruby-core:17675] + +Fri Jul 11 22:09:01 2008 NAKAMURA Usaku + + * win32/setup.rb, win32/Makefile.sub (PLATFORM): use $(PLATFORM) + instead of $(OS) because ENV["OS"] is used in test-all (drb). + +Fri Jul 11 20:51:36 2008 Nobuyoshi Nakada + + * io.c (rb_io_wait_readable, rb_io_wait_writable): check if the file + descriptor is closed. + + * thread.c (rb_thread_wait_fd_rw): ditto. + +Fri Jul 11 16:16:43 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair): + prohibit inheritance of sockets, too. [experimental] + +Fri Jul 11 14:39:49 2008 NAKAMURA Usaku + + * win32/win32.c (CreateChild): the measures for Vista is no longer + unnecessary. + +Fri Jul 11 06:16:26 2008 Nobuyoshi Nakada + + * common.mk (process.o): depends on util.h. + +Fri Jul 11 05:07:46 2008 NAKAMURA Usaku + + * include/ruby/win32.h (pipe): prohibit inheritance. + fixed: [ruby-dev:35421] + +Fri Jul 11 00:56:46 2008 Koichi Sasada + + * thread.c (thread_create_core): fix GC problem. + [ruby-core:17669] + +Thu Jul 10 22:06:00 2008 Nobuyoshi Nakada + + * lib/pstore.rb (PStore#transaction): return the result from the + block. [ruby-core:17718] + +Thu Jul 10 21:15:49 2008 Masaki Suketa + + * test/win32ole/test_win32ole_typelib.rb: add some illegal argument + test. + + * test/win32ole/test_win32ole_type.rb: ditto. + + * test/win32ole/test_win32ole_event.rb: ditto. + + * test/win32ole/test_win32ole_param.rb: ditto. + + * test/win32ole/test_win32ole_method.rb: ditto. + +Thu Jul 10 19:38:35 2008 wanabe + + * test/ruby/envutil.rb (assert_normal_exit): r17993 revert. + +Thu Jul 10 18:29:41 2008 wanabe + + * test/ruby/envutil.rb (assert_normal_exit): finish writing script + before spawn("ruby") to avoid blocking in win32. + +Thu Jul 10 17:20:50 2008 NAKAMURA Usaku + + * win32/win32.c (insert): follow recent changes of globbing. + +Thu Jul 10 14:09:05 2008 Nobuyoshi Nakada + + * ext/coverage/coverage.c (rb_coverage_start): return nil. + +Thu Jul 10 12:41:56 2008 Nobuyoshi Nakada + + * thread.c (rb_thread_wait_for): fixed variable name. + +Thu Jul 10 12:09:58 2008 Nobuyoshi Nakada + + * vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.c + (rb_last_status_get, rb_last_status_set, rb_last_status_clear): + moved last_status from rb_vm_t. [ruby-dev:35414] + + * vm.c (th_init2): initialize last_status with nil. + +Thu Jul 10 12:09:21 2008 Nobuyoshi Nakada + + * thread.c (rb_thread_wait_for): wait until timed out only when + sleeping with timeout. + +Wed Jul 9 22:41:16 2008 Nobuyoshi Nakada + + * thread.c (sleep_timeval): wait until timed out. [ruby-core:17270] + +Wed Jul 9 20:58:16 2008 Tanaka Akira + + * array.c (rb_ary_fill): don't raise even if length is negative. + [ruby-core:17483], [ruby-core:17661] + +Wed Jul 9 20:18:50 2008 Nobuyoshi Nakada + + * configure.in (rb_cv_va_args_macro): check for __VA_ARGS__. + + * thread.c (thread_debug): show source name and line if possible. + + * thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more + stack for debug. + +Wed Jul 9 11:13:39 2008 Nobuyoshi Nakada + + * lib/profiler.rb (Profiler__#print_profile): sort in the descending + order of cumulative time. + +Wed Jul 9 11:11:18 2008 Nobuyoshi Nakada + + * dir.c (struct glob_args, rb_glob_caller, rb_glob2, push_pattern), + (glob_brace): make consistent prototypes. + + * dir.c (push_glob): set enc in the caller of rb_glob_caller as well + as rb_glob2. + +Wed Jul 9 09:12:11 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (options): use input_endian. + +Wed Jul 9 01:38:37 2008 Nobuyoshi Nakada + + * string.c (rb_str_succ): alphabets or numerics mutually enclosing + non-alphanumeric characters can carry up. e.g., "1.999".succ should + be "2.000". + +Wed Jul 9 00:12:31 2008 Yusuke Endoh + + * thread.c (rb_set_coverages, rb_reset_coverages): enable and disable + coverage measurement. + + * thread.c (rb_get_coverages): rename and move from vm.c. + + * vm.c (rb_vm_get_coverages): ditto. + + * iseq.c (prepare_iseq_build): ditto. + + * thread.c (clear_coverage): ditto. + + * parse.y (coverage): ditto. + + * ext/coverage/coverage.c: use above functions, add new method + Coverage.start and fix rdoc . + +Tue Jul 8 23:02:35 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (find_default_source): bug fix when + OLE object does not have default source interface. + + * test/win32ole/test_win32ole_event.rb: ditto. + +Tue Jul 8 22:56:23 2008 Yusuke Endoh + + * thread.c (rb_enable_coverages): hide coverage array by setting 0 to + klass during measurement. + + * parse.y (coverage, yycompile0): ditto. + + * iseq.c (prepare_iseq_build): use rb_hash_lookup instead of + rb_hash_aref. + + * thread.c (rb_coverage_result): restore klass of coverage array + and return it. + + * thread.c (update_coverage): check whether its klass is 0. + +Tue Jul 8 22:28:25 2008 Koichi Sasada + + * lib/debug.rb, lib/profile.rb: fix to use RubyVM. + + * lib/rdoc/parsers/parse_c.rb: ditto. + +Tue Jul 8 21:45:22 2008 Yusuke Endoh + + * vm.c (rb_vm_mark): mark the last element of special_exceptions. + +Tue Jul 8 19:55:40 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (find_default_source): try to + find COCLASS when WIN32OLE object is not COCLASS. + + * test/win32ole/test_win32ole_event.rb: ditto + +Tue Jul 8 13:38:22 2008 Koichi Sasada + + * compile.h: fix to skip inserting a trace insn. + +Tue Jul 8 11:41:17 2008 NAKAMURA Usaku + + * dir.c: shouldn't use ruby object in globbing, because glob service + routines are called before initializing ruby on some platforms (ex. + windows). + +Tue Jul 8 10:08:40 2008 NARUSE, Yui + + * dir.c (Next): use rb_enc_mbclen. [ruby-dev:35390] + +Tue Jul 8 07:59:40 2008 NARUSE, Yui + + * dir.c (Next): use rb_enc_precise_mbclen. + +Tue Jul 8 02:27:23 2008 NARUSE, Yui + + * dir.c: preserve encoding of strings in glob and fnmatch. + + * include/ruby/ruby.h: related changes. + +Tue Jul 8 00:22:58 2008 Nobuyoshi Nakada + + * string.c (rb_str_succ): limit carrying in an alphanumeric region if + exists. [ruby-dev:35094] + +Mon Jul 7 20:39:28 2008 Masaki Suketa + + * ext/win32ole/win32ole.c(Init_win32ole): add + WIN32OLE_TYPE#source_ole_types, WIN32OLE_TYPE#default_ole_types, + WIN32OLE_TYPE#default_event_sources. + + * test/win32ole/test_win32ole_type.rb: ditto. + +Mon Jul 7 19:45:22 2008 NARUSE, Yui + + * test/ruby/test_dir.rb (test_chroot_nodir): add Errno::EPERM. + +Mon Jul 7 17:12:20 2008 Nobuyoshi Nakada + + * lib/ipaddr.rb (IPAddr#initialize): get rid of ArgumentError in + IPAddr#to_range. a patch from okkez in + [ruby-dev:35091]. + +Mon Jul 7 01:24:43 2008 Nobuyoshi Nakada + + * file.c (rb_file_s_extname): fix for file name with spaces. + [ruby-talk:307404] + +Mon Jul 7 00:59:37 2008 Nobuyoshi Nakada + + * thread_pthread.c (ruby_init_stack): prior STACK_END_ADDRESS if + found. [ruby-core:17624] + +Sun Jul 6 23:48:06 2008 Nobuyoshi Nakada + + * ext/socket/socket.c (bsock_send, s_recvfrom, ruby_connect, s_accept), + (udp_send, unix_send_io, unix_recv_io): blocking region support. + +Sun Jul 6 18:34:35 2008 Masaki Suketa + + * test/win32ole/test_win32ole_type.rb (test_initialize): add + more assertions. + +Sun Jul 6 10:12:21 2008 Kouhei Sutou + + * lib/test/unit/collector/objectspace.rb + (Test::Unit::Collector::ObjectSpace::NAME): fix a typo. + +Sun Jul 6 00:56:51 2008 Tanaka Akira + + * ext/socket/socket.c (host_str): fix type mismatch in rb_raise + format and argument. + (port_str): ditto. + (unix_recv_io): ditto. + (sock_s_unpack_sockaddr_un): ditto. + +Sat Jul 5 23:42:23 2008 Tanaka Akira + + * include/ruby/ruby.h (NUM2INT): cast to int. + (FIX2INT): ditto. + (NUM2UINT): cast to unsigned int. + (FIX2UINT): ditto. + +Sat Jul 5 23:10:41 2008 Tanaka Akira + + * io.c (rb_pipe): new function for handling EMFILE and ENFILE + error of pipe(). + (UPDATE_MAXFD_PIPE): removed. + (pipe_open): use rb_pipe. + (rb_io_s_pipe): ditto. + + * process.c (pipe_nocrash): use rb_pipe. + + * include/ruby/intern.h (rb_pipe): declared. + +Sat Jul 5 22:22:27 2008 Nobuyoshi Nakada + + * thread.c (thread_initialize): NUM2INT() returns int. + + * thread.c (timer_thread_function), thread_pthread.c (thread_timer), + thread_win32.c (timer_thread_func), thread_{pthread,win32}.c + (rb_thread_create_timer_thread): passing VM. + +Sat Jul 5 20:53:18 2008 Masaki Suketa + + * test/win32ole/test_word.rb: check word installed. + +Sat Jul 5 16:12:54 2008 Narihiro Nakamura + + * gc.c: revert. before lazy sweep. + +Sat Jul 5 09:55:44 2008 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE#ole_respond_to? + + * test/win32ole/test_win32ole.rb: ditto. + +Sat Jul 5 08:48:05 2008 Tanaka Akira + + * re.c (unescape_nonascii): add has_property argument not to + raise error by /\p{Hiragana}\u{3042}/ in EUC-JP script. + (rb_reg_preprocess): use has_property argument to make regexp + encoding fixed. + +Sat Jul 5 08:29:47 2008 Tanaka Akira + + * re.c (unescape_nonascii): make regexp fixed_encoding if \p is used. + fixed [ruby-core:17279]. + +Fri Jul 4 23:12:53 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (d2time): fix the bug of VT_DATE + to String conversion when negative value. + + * test/win32ole/test_win32ole_variant.rb: ditto. + +Fri Jul 4 22:15:29 2008 Tanaka Akira + + * lib/test/unit/testcase.rb: collect descendants of + Test::Unit::TestCase using inherited. + + * lib/test/unit/autorunner.rb: don't use ObjectSpace.each_object. + + * lib/test/unit/collector/dir.rb: ditto. + + * lib/test/unit/collector/objectspace.rb: ditto. + + [ruby-core:17126] + +Fri Jul 4 20:43:53 2008 Nobuyoshi Nakada + + * include/ruby/oniguruma.h (OnigEncoding): removed auxiliary_data. + + * include/ruby/encoding.h (ENC_DUMMY_P): moved dummy encoding flag to + rb_encoding from Encoding instance. + + * encoding.c (rb_encoding_list): list of Encoding instances. + + * encoding.c (struct rb_encoding_entry): moved base encoding from + instance variable. + +Fri Jul 4 17:51:07 2008 NAKAMURA Usaku + + * numeric.c (check_uint, rb_num2uint, rb_fix2uint): proper check. + +Fri Jul 4 14:17:22 2008 Nobuyoshi Nakada + + * lib/net/ftp.rb (Net::FTP#sendport): use divmod. [ruby-core:17557] + +Fri Jul 4 11:08:37 2008 Narihiro Nakamura + + * gc.c (garbage_collect_force): sweep is completely ended. + + * gc.c (os_obj_of): invoke garbage_collect_force() when freelist none. + +Fri Jul 4 05:01:26 2008 NAKAMURA Usaku + + * numeric.c (rb_num2uint, rb_fix2uint): typo. + +Fri Jul 4 02:21:06 2008 NAKAMURA Usaku + + * numeric.c (check_uint, rb_num2uint, rb_fix2uint): also needs checking + negative value. see [ruby-dev:33683] + +Thu Jul 3 23:26:36 2008 Yusuke Endoh + + * include/ruby/intern.h: remove prototypes about coverage. + + * iseq.c (prepare_iseq_build): add prototype. + + * parse.y (coverage): ditto. + + * thread.c (clear_coverage): ditto. + + * thread.c (update_coverage): use rb_sourceline. + + * thread.c (rb_get_coverages): rename and move to vm.c. + + * vm.c (rb_vm_get_coverages): ditto. + + * ext/coverage/coverage.c: add rdoc. + +Thu Jul 3 21:51:21 2008 Yusuke Endoh + + * ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminate + COVERAGE__ and introduce coverage.so instead. How to measure + coverage: (1) require "coverage.so", (2) require or load Ruby source + file, and (3) Coverage.result will return the same hash as COVERAGE__. + [ruby-dev:35324] + + * thread.c (rb_enable_coverages): start coverage measurement by using + rb_add_event_hook. + + * thread.c (rb_get_coverages): returns current results of coverage + measurement. + + * include/ruby/intern.h: add prototype for above two functions. + + * vm_core.h, vm.c: add field of coverages to rb_vm_t. + + * insns.def (trace): remove special handling for COVERAGE__. + + * iseq.c (prepare_iseq_build): switch COVERAGE__ to + rb_get_coverages(). + + * parse.y (coverage): ditto. + + * thread.c (clear_coverage): ditto. + + * lib/coverage.rb: use coverage.so instead of COVERAGE__. + +Thu Jul 3 21:20:45 2008 Yusuke Endoh + + * thread.c (thread_initialize): NUM2INT returns long. + +Thu Jul 3 21:06:16 2008 Nobuyoshi Nakada + + * eval.c (Init_eval): typo fixed in r17833. + +Thu Jul 3 19:44:44 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (Init_win32ole): remove duplicate line. + +Thu Jul 3 16:08:36 2008 Tanaka Akira + + * configure.in (erfc): erfc of glibc comes with Debian GNU/Linux Etch + on IA64 is broken. erfc(10000.0) aborts. + use missing/erf.c instead. + http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html + +Thu Jul 3 12:49:39 2008 Yukihiro Matsumoto + + * lib/net/smtp.rb (Net::SMTP::start): use 'localhost' instead of + 'localhost.localdomain'. [ruby-dev:35333] + + * lib/net/smtp.rb (Net::SMTP::SMTP.start): ditto. + +Thu Jul 3 07:06:02 2008 Nobuyoshi Nakada + + * Makefile.in (SET_LC_MESSAGES): LC_MESSAGES must be C. + +Thu Jul 3 07:02:55 2008 Nobuyoshi Nakada + + * eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze + messages of preallocated special exceptions also. + +Thu Jul 3 04:39:30 2008 Nobuyoshi Nakada + + * gc.c (rb_during_gc): VALUE cache is irrelevant. + +Thu Jul 3 01:44:01 2008 Yusuke Endoh + + * regint.h (GET_ALIGNMENT_PAD_SIZE, ALIGNMENT_RIGHT): cast pointer to + uintptr_t instead of unsigned int. + +Thu Jul 3 01:23:13 2008 Yusuke Endoh + + * sprintf.c: include ieeefp.h to refer isinf. + + * ext/bigdecimal/bigdecimal.c: ditto. + + * ext/json/ext/generator/generator.c: ditto. + + * rational.c: ditto. + +Thu Jul 3 01:01:57 2008 Yusuke Endoh + + * missing/tgamma.c (tgamma): remove unused variable. + +Thu Jul 3 00:18:00 2008 Masaki Suketa + + * ext/win32ole/win32ole.c: avoid creating Ruby object during + GC. thanks to arton . [ruby-dev:35313] + + * test/win32ole/test_win32ole_event.rb: ditto. + +Thu Jul 3 00:09:31 2008 Masaki Suketa + + * gc.c: add rb_during_gc(). based on a patch from arton at [ruby-dev:35313]. + + * include/ruby/intern.h: ditto. + +Wed Jul 2 09:49:10 2008 Narihiro Nakamura + + * gc.c (gc_lazy_sweep): use lazy sweep algorithm for response + performance gain. + + * gc.c (garbage_collect_force): mark and lazysweep invoke, after + erasing all mark. + + * gc.c (GC_NOT_LAZY_SWEEP): not lazy sweep flag. for debug. + +Wed Jul 2 03:42:44 2008 Yusuke Endoh + + * test/ruby/test_settracefunc.rb: fix expected traces for + RubyVM::FrozenCore's event and r17744. + +Wed Jul 2 03:10:41 2008 Koichi Sasada + + * compile.h, insns.def: reduce insn operand of "trace". + + * include/ruby/ruby.h: add RUBY_EVENT_COVERAGE event. + +Wed Jul 2 02:02:34 2008 Koichi Sasada + + * proc.c, vm.c: fix to refer next ruby level cfp to make binding. + +Wed Jul 2 01:58:19 2008 NAKAMURA Usaku + + * insns.def (trace): C99ism. + +Wed Jul 2 01:53:40 2008 Yusuke Endoh + + * Add coverage measurement constant COVERAGE__. This constant is not + for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or + load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will + return an array whose elements represent number of executions per + line of source code. + + * vm_core.h: add field of coverage array to iseq. + + * iseq.c (prepare_iseq_build): ditto. + + * insns.def (trace): update coverage array. + + * parse.y (coverage): create and initialize coverage array. + + * compile.h (ADD_TRACE): add trace instruction to update coverage + array. + + * thread.c (clear_coverage): delete coverage array when forking. + Otherwise, double count of coverage may occur. + + * lib/coverage.rb: sample coverage measurement tool. + + * error.c: distinguish explicitly between parse_in_eval and + mild_compile_error. + + * load.c: ditto. + + * vm_eval.c: ditto. + +Tue Jul 1 21:32:43 2008 Yusuke Endoh + + * lib/test/unit/ui/console/testrunner.rb: prevent destructive + modification to $0. + + * test/rubygems/gemutilities.rb (build_rake_in): move from + test_gem_ext_rake_builder.rb. + + * test/rubygems/test_gem_ext_rake_builder.rb: ditto. + + * test/rubygems/test_gem_installer.rb: override Gem.ruby and + ENV["rake"]. + + * test/rubygems/test_gem_uninstaller.rb: ditto. + + +Tue Jul 1 21:13:17 2008 Koichi Sasada + + * compile.c, vm.c, insns.def: call FrozenCore.set_postexe method + instead to use "postexe" insn. + + * id.c, id.h: add a prepared id for above. + +Tue Jul 1 21:09:58 2008 URABE Shyouhei + + * lib/mkmf.rb (create_tmpsrc): we need to include COMMON_HEADERS, + namely inclusion of ruby.h, because _GNU_SOURCE is now defined + there (if any) and socket.so requires it on Linux systems. + +Tue Jul 1 20:55:07 2008 URABE Shyouhei + + * eval.c (rb_interrupt): trick to suppress GCC warning. + + * sprintf.c (rb_str_format): ditto. + +Tue Jul 1 20:44:36 2008 Koichi Sasada + + * tool/instruction.rb: RubyVM is not module. + +Tue Jul 1 19:31:24 2008 URABE Shyouhei + + * ext/digest/digest.c (rb_digest_instance_inspect): constified. + + * variable.c (rb_path2class): field precision should have type int. + +Tue Jul 1 19:01:00 2008 NARUSE, Yui + + * enc/shift_jis.c (code_is_ctype): HALF WIDTH KATAKANA is + a character. + +Tue Jul 1 17:56:34 2008 Nobuyoshi Nakada + + * missing/vsnprintf.c (BSD__uqtoa): constified. + +Tue Jul 1 17:50:44 2008 NAKAMURA Usaku + + * enc/make_encdb.h: always add ';' at the end of line. + +Tue Jul 1 17:44:30 2008 Nobuyoshi Nakada + + * iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond), + thread.c (eKillSignal, eTerminateSignal), + missing/vsnprintf.c (BSD_vfprintf): constified. + +Tue Jul 1 17:37:43 2008 URABE Shyouhei + + * enc/ascii.c: ISO C does not allow extra ';' outside of a + function + + * enc/us_ascii.c: ditto. + + * enc/utf_8.c: ditto. + + * enc/big5.c: ditto. + + * enc/euc_jp.c: ditto. + + * enc/euc_kr.c: ditto. + + * enc/euc_tw.c: ditto. + + * enc/gb2312.c: ditto. + + * enc/gbk.c: ditto. + + * enc/iso_8859_1.c: ditto. + + * enc/iso_8859_2.c: ditto. + + * enc/iso_8859_3.c: ditto. + + * enc/iso_8859_4.c: ditto. + + * enc/iso_8859_5.c: ditto. + + * enc/iso_8859_6.c: ditto. + + * enc/iso_8859_7.c: ditto. + + * enc/iso_8859_8.c: ditto. + + * enc/iso_8859_9.c: ditto. + + * enc/iso_8859_10.c: ditto. + + * enc/iso_8859_11.c: ditto. + + * enc/iso_8859_13.c: ditto. + + * enc/iso_8859_14.c: ditto. + + * enc/iso_8859_15.c: ditto. + + * enc/iso_8859_16.c: ditto. + + * enc/koi8_r.c: ditto. + + * enc/shift_jis.c: ditto. + + * enc/utf_16be.c: ditto. + + * enc/utf_32be.c: ditto. + + * enc/utf_32le.c: ditto. + + * enc/windows_1251.c: ditto. + + * process.c (run_exec_rlimit): ISO C90 forbids mixed declarations + and code + + * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids + comma at end of enumerator list + + * include/ruby/ruby.h (enum ruby_value_type): ditto. + + * eval_intern.h (enum): ditto. + + * vm_core.h (enum rb_thread_status): ditto. + + * parse.y (enum lex_state_e): ditto. + + * parse.y (enum string_type): ditto. + + * process.c (enum): ditto. + + * ruby.c (enum dump_flag_bits): ditto. + + * ruby.c (enum disable_flag_bits): ditto. + + * enc/gb18030.c (enum): ditto. + +Tue Jul 1 17:21:42 2008 Nobuyoshi Nakada + + * regexec.c (stack_double): use MatchStackLimitSize atomically. + + * regparse.c (onig_free_shared_cclass_table): OnigTypeCClassTable + needs atomicity + + * regsyntax.c: constified all predefined OnigSyntaxTypes. + +Tue Jul 1 16:57:44 2008 URABE Shyouhei + + * include/ruby/st.h (struct st_table): type of bit-field + 'num_entries' is a GCC extension + + * include/ruby/ruby.h (rb_intern): prefix __extension__ for + braced-groups within expressions. + + * include/ruby/intern.h (rb_usascii_str_new2): ditto. + + * include/ruby/intern.h (rb_tainted_str_new2): ditto. + + * include/ruby/intern.h (rb_str_new2): ditto. + +Tue Jul 1 15:01:13 2008 Nobuyoshi Nakada + + * lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make), + (Gem::Ext::Builder.run): EXIT_SUCCESS may be 0 or may not. + + * test/rubygems/test_gem_ext_rake_builder.rb (build_rake_in): override + Gem.ruby and ENV["rake"]. + + * runruby.rb: bin/rake does not exist in archdir where architecture + depend script (i.e. rbconfig.rb) exists. + +Tue Jul 1 13:19:44 2008 Nobuyoshi Nakada + + * array.c (rb_ary_fill): check if beg is too big. + +Tue Jul 1 12:01:16 2008 Koichi Sasada + + * compile.c, insns.def, vm.c, vm_core.h: remove some insns + (undef, alias, definemethod). + Call RubyVM::FrozenCore's singleton method instead. + Add "putiseq" and "putspecialobject" instructions. + + * id.c, id.h: add ids for above. + + * tool/parse.rb: "VM" no longer exists. Use RubyVM instead. + +Tue Jul 1 03:28:16 2008 Eric Hodel + + * test/rubygems/test_ext_configure_builder.rb: Apply locale-free + patch by Yusuke ENDOH. [ruby-core:17444]. + + * runruby.rb: Set ENV['rake']. Patch by Yusuke ENDOH + [ruby-core:17442]. + +Tue Jul 1 01:07:17 2008 Nobuyoshi Nakada + + * lib/cgi.rb (CGI::QueryExtension.read_multipart): blanks inside + double quotes are allowed. [ruby-list:45140] + +Tue Jul 1 00:59:43 2008 Tanaka Akira + + * numeric.c (num_coerce): call rb_Float(x) first. don't depend on + evaluation order of function arguments. + +Tue Jul 1 00:49:11 2008 Nobuyoshi Nakada + + * gc.c (rb_newobj): abort GC phase before rb_bug. + +Mon Jun 30 23:15:07 2008 Yusuke Endoh + + * test/openssl/test_ssl.rb (start_server): shutdown TCPServer before + close. + +Mon Jun 30 23:01:50 2008 Nobuyoshi Nakada + + * common.mk (RUBY_H_INCLUDES): common headers which are included with + ruby.h together. + +Mon Jun 30 22:57:50 2008 Yusuke Endoh + + * test/ruby/test_settracefunc.rb (test_raise): reveal an exception + hided by rescue modifier. + +Mon Jun 30 22:49:32 2008 Yusuke Endoh + + * test/ruby/test_array.rb (test_aset): access with too big index + raises not ArgumentError but IndexError now. + +Mon Jun 30 22:30:37 2008 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (recursive_collect): r15662 reverted. + +Mon Jun 30 22:27:39 2008 Yusuke Endoh + + * ext/stringio/stringio.c (strio_getline): fix for nil and "" as + separator. [ruby-dev:34591] + +Mon Jun 30 22:21:30 2008 Yusuke Endoh + + * io.c (argf_each_line): pass args to each_line. [ruby-dev:34958] + +Mon Jun 30 22:12:46 2008 Nobuyoshi Nakada + + * gc.c (chain_finalized_object): should not delete from finalizer + table until run. + + * gc.c (rb_gc_call_finalizer_at_exit): deferred_final_list may be + empty first. + +Mon Jun 30 18:57:05 2008 Nobuyoshi Nakada + + * gc.c (gc_finalize_deferred): allow object allocation in finalizers. + + * gc.c (rb_gc_call_finalizer_at_exit): ditto. + +Mon Jun 30 14:41:36 2008 NAKAMURA Usaku + + * gc.c (rb_newobj): prohibit call of rb_newobj() during gc when + USE_VALUE_CACHE is not defined (normal case). + +Mon Jun 30 10:28:33 2008 Yukihiro Matsumoto + + * ext/syslog/syslog.c (syslog_write): syslog operations should be + protected from $SAFE level 4. a patch from Keita Yamaguchi + . + + * ext/syslog/syslog.c (mSyslog_close): ditto. + + * ext/syslog/syslog.c (mSyslog_set_mask): ditto. + +Mon Jun 30 03:01:35 2008 Yusuke Endoh + + * test/net/http/test_http.rb (_test_request__file): specify encoding + explicitly. + + * test/net/http/utils.rb: ditto. + +Mon Jun 30 02:31:07 2008 NARUSE, Yui + + * encoding.c (rb_utf8_encindex): defined. + + * include/ruby/encoding.h (rb_utf8_encindex): ditto. + +Mon Jun 30 02:14:34 2008 Koichi Sasada + + * vm.c, vm_core.h,vm_core.h, vm_dump.c, iseq.c: rename class name + VM -> RubyVM, and rename rb_cVM -> rb_cRubyVM. + "VM" is too short name for class. + + * test/ruby/test_method.rb, test/ruby/test_settracefunc.rb: ditto. + + * include/ruby/ruby.h: rb_cRubyVM, rb_cEnv, rb_cISeq should not be + exposed. + +Mon Jun 30 02:10:32 2008 Koichi Sasada + + * process.c (Init_process): fix to avoid a warning. + +Mon Jun 30 01:52:05 2008 Yusuke Endoh + + * test/ruby/test_parse.rb: remove tests for open_args. + +Sun Jun 29 23:01:54 2008 Tanaka Akira + + * string.c (rb_str_format_m): make tmp volatile to avoid possible GC + problem. + +Sun Jun 29 18:01:30 2008 Kouhei Sutou + + * lib/rss/parser.rb, lib/rss/utils.rb: merge documents from ruby_1_8. + +Sun Jun 29 17:44:23 2008 Kouhei Sutou + + * lib/rss/parser.rb (RSS::ListenerMixin#known_class): define to + work with ruby 1.8.x too. + +Sun Jun 29 17:41:42 2008 Kouhei Sutou + + * lib/rss/maker/base.rb (RSS::Maker::RSSBase#to_feed): raise + exception not return nil if RSS::Maker.make can't get required + information. + + * test/rss/rss-assertions.rb: follow the above change. + +Sun Jun 29 17:37:23 2008 Kouhei Sutou + + * lib/rss/maker/base.rb (RSS::Maker::RSSBase#make): require block. + + * test/rss/test_maker_{0.9,1.0,2.0}.rb: follow the above change. + +Sun Jun 29 17:33:34 2008 Kouhei Sutou + + * lib/rss/maker/base.rb, lib/rss/maker/itunes.rb: don't use + instance_eval to initialize variables. (speed up) + +Sun Jun 29 17:31:15 2008 Kouhei Sutou + + * lib/rss/rss.rb, test/rss/test_version.rb (RSS::VERSION): + 0.2.4 -> 0.2.5. + +Sun Jun 29 11:36:20 2008 Yusuke Endoh + + * dir.rb: fix resource leak. + +Sun Jun 29 09:43:10 2008 Nobuyoshi Nakada + + * lib/tmpdir.rb (@@systmpdir): prior LOCAL_APPDATA if possible, and + should be clean. based on a patch from arton at [ruby-dev:35269] + +Sun Jun 29 07:53:08 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (date2time_str): fix the overflow in + some situation. [ruby-bugs-20793] + +Sat Jun 28 21:25:08 2008 Tanaka Akira + + * include/ruby/ruby.h (struct RRegexp): new field usecnt. replace + str and len by src. + + * gc.c (gc_mark_children): mark src field of regexp. + (obj_free): don't free str field. + + * re.c (REG_BUSY): removed. + (rb_reg_initialize): prohibit re-initialize regexp. + (rb_reg_search): use usecnt to prevent freeing regexp currently + using. this prevents SEGV by: + r = /\A((a.)*(a.)*)*b/ + r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp") + t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")} + sleep 0.2 + r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp") + +Sat Jun 28 21:15:43 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2, + rb_usascii_str_new2): use inline versions only for constant + literals. + +Sat Jun 28 13:12:06 2008 Tanaka Akira + + * test/rubygems/test_gem.rb (test_self_path_APPLE_GEM_HOME): don't use + fixed /tmp/apple_gem_home directory. + +Sat Jun 28 08:40:18 2008 Masaki Suketa + + * ext/win32ole/win32ole.c: check String encoding when + converting String to VT_BSTR in OLE. + + * test/win32ole/test_win32ole.rb: ditto. + +Sat Jun 28 01:08:42 2008 Tanaka Akira + + * time.c (time_timespec): fix rounding negative float. + +Fri Jun 27 21:38:57 2008 Tanaka Akira + + * struct.c: __size__ removed. use the length of __members__ instead. + (num_members): new function. + +Fri Jun 27 21:19:08 2008 Nobuyoshi Nakada + + * test/inlinetest.rb (InlineTest.in_progname): workaround for frozen + $0. [ruby-dev:35261] + + * lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto. + +Fri Jun 27 17:45:17 2008 Kazuhiro NISHIYAMA + + * lib/erb.rb: adjust line number for magic comment. + + * test/erb/test_erb.rb: add tests for def_method. + +Fri Jun 27 14:29:07 2008 Yukihiro Matsumoto + + * parse.y (primary): empty not should call '!' on nil. + cf [ruby-dev:35227] + +Fri Jun 27 14:25:52 2008 Nobuyoshi Nakada + + * vm.c (vm_eval_body): if thrown exception is frozen, reraise it to + create a new instance. + +Fri Jun 27 13:29:26 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2, + rb_usascii_str_new2): use with-length versions with strlen to + optimize strlen, if optimized. + +Fri Jun 27 12:28:57 2008 Nobuyoshi Nakada + + * lib/un.rb (mkmf): new command to create makefile. + +Fri Jun 27 11:06:05 2008 Nobuyoshi Nakada + + * lib/un.rb (wait_writable): added help message. + +Fri Jun 27 06:52:54 2008 Koichi Sasada + + * configure.in: need a ",". + + * process.c (rb_fork): check CANNOT_FORK_WITH_PTHREAD macro. + +Fri Jun 27 06:50:56 2008 Koichi Sasada + + * vm_eval.c (vm_call_super): fix to call method_missing. + [ruby-core:15719], [ruby-core:17340] + +Fri Jun 27 00:00:14 2008 Nobuyoshi Nakada + + * ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keita + Yamaguchi . + +Thu Jun 26 23:58:29 2008 Yusuke Endoh + + * string.c (rb_str_index_m, rb_str_rindex_m, rb_str_include): fix + rdoc. + +Thu Jun 26 17:43:41 2008 Yukihiro Matsumoto + + * variable.c (rb_f_trace_var): should not be allowed at safe level 4. + a patch from Keita Yamaguchi . + +Thu Jun 26 11:04:30 2008 Eric Hodel + + * lib/rubygems: Update to RubyGems 1.2.0 r1824. Incorporates patch by + Yusuke ENDOH [ruby-core:17353]. + +Thu Jun 26 00:48:31 2008 Yukihiro Matsumoto + + * parse.y (primary): not operand might be empty. [ruby-dev:35227] + +Wed Jun 25 21:54:34 2008 Yukihiro Matsumoto + + * parse.y (primary): make functional-style not operator to act + like function. see . + +Wed Jun 25 15:28:50 2008 Nobuyoshi Nakada + + * array.c (rb_ary_fill): not depend on unspecified behavior at integer + overflow. reported by Vincenzo Iozzo . + +Wed Jun 25 13:42:44 2008 NARUSE, Yui + + * lib/erb.rb (ERB::Compiler:Buffer#new): push magic comment first. + + * lib/erb.rb (ERB::Compiler#compile): fix for broken input. + +Wed Jun 25 12:10:01 2008 NARUSE, Yui + + * lib/erb.rb (ERB::Compiler#compile): magic comment needs LF. + +Wed Jun 25 09:31:11 2008 NARUSE, Yui + + * lib/erb.rb (ERB::Compiler#compile): output magic comment. + +Tue Jun 24 22:14:36 2008 Yusuke Endoh + + * vm_eval.c (eval_string_with_cref): preserve parse_in_eval even if + exception raised. + +Tue Jun 24 22:09:18 2008 Masaki Suketa + + * ext/win32ole/win32ole.c(ole_invoke): fix memory leak. + [ruby-bugs-20792] + +Tue Jun 24 17:20:39 2008 Nobuyoshi Nakada + + * configure.in (rb_cv_fork_with_pthread): check after check for + pthread library, and define the macro when checked only. + +Tue Jun 24 17:04:39 2008 NAKAMURA Usaku + + * ext/io/wait/extconf.rb: check sys/socket.h for cygwin. + +Tue Jun 24 16:51:51 2008 NAKAMURA Usaku + + * io.c (io_reopen): remove cygwin handling because it seems to be for + C's stdio. + fixed [ruby-dev:35183] + +Tue Jun 24 11:12:33 2008 NAKAMURA Usaku + + * include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now support + getppid() on win32 (but only Win2k or later). + + * process.c (get_ppid): remove win32 special logic. + +Tue Jun 24 09:40:47 2008 NAKAMURA Usaku + + * ext/socket/socket.c (init_sock): socket is binmode on platforms + which support binmode. + +Tue Jun 24 00:21:53 2008 Yusuke Endoh + + * compile.c (iseq_build_from_ary): initialize arg_opts, a patch from + Adam Strzelecki in [ruby-core:17220]. + +Tue Jun 24 00:10:53 2008 wanabe + + * compile.c (iseq_build_from_ary): fix expression to obtain + iseq->local_size and iseq->local_table_size. [ruby-dev:35205] + +Mon Jun 23 11:31:41 2008 Yukihiro Matsumoto + + * lib/mathn.rb (Rational::power2): removed incomplete method. + see [ruby-dev:35195]. [ruby-core:17293] + +Sun Jun 22 14:16:28 2008 Nobuyoshi Nakada + + * ext/readline/extconf.rb (have_readline_func): readline on Mac OS X + needs headers to detect some functions. + +Sun Jun 22 09:51:14 2008 Nobuyoshi Nakada + + * object.c (rb_class_superclass): rdoc improvement, a patch from + Gaston Ramos in [ruby-core:17371]. + +Sun Jun 22 09:22:32 2008 URABE Shyouhei + + * README.EXT: translated README.EXT.ja + +Sun Jun 22 00:42:02 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_osid, rb_w32_osver, CreateChild): XP is + is different from Vista about pipe handle inheritance. + fixed [ruby-core:17367], reported by Lars Christensen + +Sun Jun 22 00:38:45 2008 NAKAMURA Usaku + + * README.EXT.ja: add note about mark and free. + +Sun Jun 22 00:01:36 2008 NAKAMURA Usaku + + * io.c (rb_io_binmode_p, argf_binmode_p, Init_IO): new method + IO#binmode? and ARGF.binmode? [ruby-dev:35148] + +Sat Jun 21 17:33:50 2008 NAKAMURA Usaku + + * win32/win32.c (rb_w32_spawn): no longer support P_WAIT. + +Sat Jun 21 16:46:09 2008 NAKAMURA Usaku + + * thread_win32.c (native_sleep): must block reentrance when accessing + th->unblock. + fixed [ruby-core:17341], reported by Bill Kelly + +Sat Jun 21 16:29:02 2008 Nobuyoshi Nakada + + * parse.y (call_args2, open_args): removed. + + * parse.y (parser_yylex): unified warnings at space between method + name and argument parenthesis. [ruby-dev:33943] + +Sat Jun 21 16:21:07 2008 Nobuyoshi Nakada + + * numeric.c (flo_round): get rid of overflow. + +Sat Jun 21 15:57:15 2008 Nobuyoshi Nakada + + * lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip + magic comment. + +Sat Jun 21 15:54:55 2008 Nobuyoshi Nakada + + * configure.in: check if fork works with pthread. + +Sat Jun 21 15:31:09 2008 Nobuyoshi Nakada + + * tool/make-snapshot: ported to ruby. + + * tool/make-snapshot: fixed digests. + +Sat Jun 21 04:36:59 2008 Yukihiro Matsumoto + + * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian::dfdxi): + typo fixed (raize -> raise). [ruby-list:45101] + + * enumerator.c (enum_each_cons): typo in RDoc fixed. + +Sat Jun 21 00:45:34 2008 URABE Shyouhei + + * tool/make-snapshot: do not use sha256sum; use BASERUBY instead + + * common.mk (dist): use tool/make-snapshot instead + +Fri Jun 20 16:34:14 2008 Tanaka Akira + + * process.c (Init_process): Process::Status#to_int removed. + (PST2INT): defined. + (pst_to_s): use PST2INT. + (pst_inspect): ditto. + (pst_equal): ditto. + (pst_bitand): ditto. + (pst_rshift): ditto. + (pst_wifstopped): ditto. + (pst_wstopsig): ditto. + (pst_wifsignaled): ditto. + (pst_wtermsig): ditto. + (pst_wifexited): ditto. + (pst_wexitstatus): ditto. + (pst_success_p): ditto. + (pst_wcoredump): ditto. + (rb_f_system): ditto. + +Fri Jun 20 15:40:02 2008 Nobuyoshi Nakada + + * array.c (rb_ary_store, rb_ary_splice): not depend on unspecified + behavior at integer overflow. + + * string.c (str_buf_cat): ditto. + +Fri Jun 20 12:39:55 2008 Nobuyoshi Nakada + + * process.c (rb_detach_process): store detached process ID in the + thread local storage. moved from lib/open3.rb. + +Fri Jun 20 11:57:46 2008 Yukihiro Matsumoto + + * string.c (rb_str_sub_bang): should preserve replacement points + since they may be altered in the yielded block. + +Fri Jun 20 11:07:56 2008 Tanaka Akira + + * string.c (rb_memhash): randomize hash to avoid algorithmic + complexity attacks. + (rb_str_hash): use rb_memhash. + + * include/ruby/intern.h (rb_reset_random_seed): declared. + + * thread.c (rb_thread_atfork): call rb_reset_random_seed. + + * inits.c (rb_call_inits): call Init_RandomSeed at first. + + * random.c (seed_initialized): defined. + (fill_random_seed): extracted from random_seed. + (make_seed_value): extracted from random_seed. + (rb_f_rand): initialize random seed at first. + (initial_seed): defined. + (Init_RandomSeed): defined. + (Init_RandomSeed2): defined. + (rb_reset_random_seed): defined. + (Init_Random): call Init_RandomSeed2. + +Wed Jun 18 21:52:38 2008 URABE Shyouhei + + * array.c (ary_new, rb_ary_initialize, rb_ary_store, + rb_ary_splice, rb_ary_times): integer overflows should be + checked. based on patches from Drew Yao + fixed CVE-2008-2726 + + * string.c (rb_enc_cr_str_buf_cat): fixed unsafe use of alloca, + which led memory corruption. based on a patch from Drew Yao + fixed CVE-2008-2726 + +Fri Jun 20 03:26:00 2008 NAKAMURA Usaku + + * process.c (rb_f_fork): NetBSD 4.0 or later can fork. + +Fri Jun 20 03:19:39 2008 Yusuke Endoh + + * test/testunit/collector/test_dir.rb: r15825 made it unnecessary to + change String to Symbol. + + * test/testunit/collector/test_objectspace.rb: ditto. + +Fri Jun 20 03:14:31 2008 Eric Hodel + + * lib/rubygems*, test/rubygems/*: Update to RubyGems 1.1.1 r1784 (pre + 1.2). + +Fri Jun 20 03:01:59 2008 Yusuke Endoh + + * thread.c: try to remove false positive of deadlock detection (second + trial). + +Fri Jun 20 02:16:43 2008 Yukihiro Matsumoto + + * lib/mathn.rb (Rational::power2): typo fixed. [ruby-core:17293] + +Fri Jun 20 02:11:01 2008 Yukihiro Matsumoto + + * string.c (str_gsub): should preserve last successful match + data. [ruby-dev:35182] + +Fri Jun 20 01:07:28 2008 Koichi Sasada + + * KNOWNBUGS.rb, bootstraptest/pending.rb: move a bug (?) to pending. + +Fri Jun 20 00:40:08 2008 Koichi Sasada + + * proc.c (proc_new): fix to return Proc object if block is already + in heap. [ruby-core:15711] + + * bootstraptest/test_proc.rb: add a test. + +Fri Jun 20 00:18:04 2008 Koichi Sasada + + * thread_win32.c (native_sleep): fix to decrement sleeper count. + +Thu Jun 19 23:48:45 2008 Yusuke Endoh + + * test/net/http/test_http.rb: compare encodings of two strings before + comparing themself, which suppress too big error output. + +Thu Jun 19 23:46:35 2008 Yusuke Endoh + + * ext/json/ext/parser/parser.rl, ext/json/ext/parser/parser.c: JSON + text SHALL be encoded in Unicode. + +Thu Jun 19 23:17:56 2008 Yusuke Endoh + + * thread.c, thread_win32.c, vm_core.h: try to remove false positive of + deadlock detection. + +Thu Jun 19 21:38:08 2008 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): check if compile before showing message. + +Thu Jun 19 21:35:32 2008 Nobuyoshi Nakada + + * tool/make-snapshot: supported multiple snapshots. + +Thu Jun 19 20:37:00 2008 Kazuhiro NISHIYAMA + + * lib/net/pop.rb (Net::POP3#set_all_uids): speed + up. a patch from [ruby-list:45047] + +Thu Jun 19 17:44:15 2008 Yukihiro Matsumoto + + * ext/etc/etc.c (Init_etc): define constant aliases Etc::Passwd + and Etc::Group. [ruby-dev:35150] + +Thu Jun 19 17:37:21 2008 Yukihiro Matsumoto + + * string.c (str_alloc): specify 'inline' modifier. + + * string.c (str_alloc): remove cSymbol hack that no longer + necessary. + + * string.c (scan_once): avoid retrieving encoding info unless + necessary. + +Thu Jun 19 17:19:14 2008 Yukihiro Matsumoto + + * string.c (rb_str_scan): String#scan should preserve last + successful match data. [ruby-dev:35106] + +Thu Jun 19 16:49:36 2008 NAKAMURA Usaku + + * missing/acosh.c (atanh): should set ERANGE to errno if parameter + is the boundary case. fixed [ruby-dev:35155] + +Thu Jun 19 16:06:01 2008 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/tile/treeview.rb: cannot configure tags. + +Thu Jun 19 11:48:33 2008 Koichi Sasada + + * test/ruby/test_enumerator.rb: fix to skip "with_memo" test. + +Thu Jun 19 11:40:55 2008 Koichi Sasada + + * vm_insnhelper.c (vm_throw): fix "return" process from "lambda". + + * bootstraptest/test_proc.rb: add a test. + + * bootstraptest/pending.rb: add a pending bug. + +Thu Jun 19 00:33:40 2008 Yusuke Endoh + + * test/etc/test_etc.rb: avoid infinite loop. [ruby-dev:35158] + +Wed Jun 18 23:07:19 2008 URABE Shyouhei + + * gc.c (rb_newobj): prohibit call of rb_newobj() during gc. + a patch from Sylvain Joyeux in [ruby-core:12099]. + +Wed Jun 18 21:08:14 2008 Nobuyoshi Nakada + + * ruby.c (verbose_setter, opt_W_getter): fixed prototypes. + +Wed Jun 18 19:20:00 2008 NAKAMURA Usaku + + * ruby.c (opt_W_getter): use ruby_verbose directly instead of parameter + because ruby_verbose is not a real variable, so the address of + parameter is not collect. + +Wed Jun 18 18:31:03 2008 NAKAMURA Usaku + + * win32/win32.c (errmap): add some pipe errors. + + * win32/win32.c (rb_w32_write): set errno when CRT's errno is EINVAL + for pipe errors. + +Wed Jun 18 18:09:08 2008 NAKAMURA Usaku + + * win32/win32.c (poll_child_status): set EINVAL to errno when + GetExitCodeProcess() fails with ERROR_INVALID_HANDLE. + +Wed Jun 18 15:01:18 2008 NARUSE, Yui + + * io.c (rb_open_file): fs_encoding and fname_encoding is + rb_encoding *. + fixed [ruby-dev:35151] + +Wed Jun 18 14:30:06 2008 NARUSE, Yui + + * io.c (rb_open_file): not rb_enc_get_index but rb_enc_get. + +Wed Jun 18 13:49:58 2008 NAKAMURA Usaku + + * include/ruby/win32.h (pipe): now pipe is textmode. although this + change is experimental, it will be spec if no compatibility problem + is reported. + +Wed Jun 18 12:05:30 2008 Nobuyoshi Nakada + + * marshal.c (w_object, marshal_dump, r_object0, marshal_load): search + public methods only. [ruby-core:17283] + + * object.c (convert_type): ditto. + + * lib/singleton.rb (Singleton#_dump): conversion method should be + public. + +Wed Jun 18 10:18:11 2008 Nobuyoshi Nakada + + * ext/etc/etc.c (etc_passwd, etc_group): fixed rdoc. a patch from + okkez in [ruby-dev:35141]. + +Wed Jun 18 08:58:16 2008 Eric Hodel + + * lib/rubygems/*: Fix errors for 1.9. + + * gem_prelude.rb: Only remove methods from gem_prelude.rb when + loading real RubyGems. + +Wed Jun 18 07:03:30 2008 Eric Hodel + + * lib/rubygems/*: Update to RubyGems r1778 (pre 1.2). + +Wed Jun 18 04:27:58 2008 Koichi Sasada + + * KNOWNBUGS.rb, bootstraptest/pending.rb: move pending bug. + +Wed Jun 18 04:24:20 2008 Koichi Sasada + + * vm.c, vm_insnhelper.c: fix escape process with "break" and "return" + syntax in "lambda". [ ruby-Bugs-19304 ], [ruby-core:17164] + + * KNOWNBUGS.rb, bootstraptest/test_proc.rb: add/move solved test. + +Wed Jun 18 01:51:10 2008 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: cannot access class variable from + singleton method. + +Wed Jun 18 00:03:33 2008 NAKAMURA Usaku + + * dir.c (Init_Dir): dir_foreach() takes variable argument. + +Tue Jun 17 23:04:24 2008 James Edward Gray II + + * lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by + changes to the Kernel::Integer() method. [ruby-core:17272] + +Tue Jun 17 23:02:18 2008 Nobuyoshi Nakada + + * ruby.c (opt_W_getter): made a hooked variable. + +Tue Jun 17 22:04:47 2008 Yusuke Endoh + + * enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int) + differs from sizeof(long). [ruby-dev:35131] + + * enc/shift_jis.c (property_name_to_ctype): ditto. + + * enc/unicode.c (onigenc_unicode_property_name_to_ctype): ditto. + +Tue Jun 17 20:32:37 2008 Nobuyoshi Nakada + + * common.mk (miniruby$(EXEEXT)): $(PREP) isn't always same as + miniruby, and tests, debug, etc have no meaning when + cross-compiling. + +Tue Jun 17 18:39:11 2008 Ryan Davis + + * common.mk: fixed dependencies on miniruby. + +Tue Jun 17 18:11:01 2008 NAKAMURA Usaku + + * include/ruby/win32.h (pipe): expand pipe buffer size. + +Tue Jun 17 17:07:35 2008 NAKAMURA Usaku + + * win32/win32.c (CreateChild): no need to inherit handles here because + spawn'ed child cannot detect that STDIN is closed. + +Tue Jun 17 06:32:55 2008 NARUSE, Yui + + * dir.c (dir_data): add intenc and extenc. + + * dir.c (dir_s_alloc): ditto. + + * dir.c (dir_initialize): now accept internal_encoding and + external_encoding. + + * dir.c (dir_s_open): changed for dir_initialize. + + * dir.c (dir_open_dir): ditto. + + * dir.c (dir_foreach): changed for dir_open_dir. + + * dir.c (dir_entries): changed for dir_open_dir. + + * dir.c (dir_enc_str): defined. + + * dir.c (dir_path): use dir_enc_str. + + * dir.c (dir_read): ditto. + + * dir.c (dir_each): ditto. + +Tue Jun 17 06:28:57 2008 NARUSE, Yui + + * io.c (io_set_encoding): defined. + + * io.c (rb_open_file): convert path on Windows and Mac OS X. + + * io.c (open_key_args): use io_set_encoding and now accept + internal_encoding and external_encoding. + +Tue Jun 17 06:26:28 2008 NARUSE, Yui + + * encoding.c (rb_filesystem_encoding): defined. + + * include/ruby/encoding.h (rb_filesystem_encoding): added. + +Tue Jun 17 06:24:28 2008 NARUSE, Yui + + * ext/syck/rubyext.c: add encoding header. + +Tue Jun 17 01:52:50 2008 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: SEGV when exit. + + * ext/tk/lib/tk.rb: add a check for safety to Tk.exit. + + * ext/tk/sample/irbtkw.rbw: freezes when receives SIGINT. + +Mon Jun 16 21:58:38 2008 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and + IO#readlines do not affect $_. [ruby-core:17277] + +Mon Jun 16 18:52:47 2008 Nobuyoshi Nakada + + * lib/thwait.rb (ThreadsWait): Exception2MessageMapper no longer has + extend_to method. [ruby-core:17267] + +Mon Jun 16 14:46:25 2008 Nobuyoshi Nakada + + * lib/e2mmap.rb (E2MM.def_e2message): typo. + +Mon Jun 16 09:43:27 2008 Akinori MUSHA + + * enumerator.c (enumerator_with_object, Init_Enumerator): + Temporarily back out with_memo, for which we need a better name. + +Mon Jun 16 07:14:48 2008 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_readline, strio_each) + (strio_readlines): set lastline. [ruby-core:17257] + +Mon Jun 16 01:49:39 2008 Koichi Sasada + + * eval.c (rb_f_block_given_p): fix to skip class frame. + [ruby-core:14813] + + * KNOWNBUGS.rb, bootstraptest/test_method.rb: move solved test. + +Mon Jun 16 01:48:08 2008 Koichi Sasada + + * vm_dump.c (vm_stack_dump_raw): disable verbose debug output. + +Mon Jun 16 01:33:08 2008 Koichi Sasada + + * vm_core.h, thread.c: rename global_interpreter_lock to + global_vm_lock. + +Sun Jun 15 18:40:35 2008 NARUSE, Yui + + * ext/syck/rubyext.c (yaml_org_handler): associate encoding. + + * ext/syck/rubyext.c (syck_genericresolver_node_import): ditto. + +Sun Jun 15 18:17:03 2008 Nobuyoshi Nakada + + * vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated special + exceptions. + + * eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze + preallocated special exceptions. + + * eval.c (rb_longjmp): duplicate the thrown exception to set backtrace + if it was frozen. + + * gc.c (rb_memerror): raise nomem_error without backtrace if failed to + make backtrace. + +Sat Jun 14 22:52:35 2008 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_sysread): should not raise at empty + read. a patch from Arthur Schreiber at [ruby-core:17245]. + +Sat Jun 14 16:55:46 2008 Nobuyoshi Nakada + + * file.c (file_expand_path): no need to expand root path which has no + short file name. [ruby-dev:35095] + +Sat Jun 14 11:59:17 2008 Nobuyoshi Nakada + + * gc.h (STACK_UPPER): moved from gc.c + + * thread.c, thread_{pthread,win32}.c (ruby_init_stack, + ruby_thread_init_stack): moved stack initialization from gc.c. + +Sat Jun 14 11:57:53 2008 Nobuyoshi Nakada + + * gc.h (STACK_UPPER): moved from gc.c + + * thread.c, thread_{pthread,win32}.c (ruby_init_stack, + ruby_thread_init_stack): moved stack initialization from gc.c. + +Sat Jun 14 07:52:53 2008 Tanaka Akira + + * gc.c (ruby_initial_gc_stress): defined. + (ruby_initial_gc_stress_ptr): defined. + + * debug.c (set_debug_option): use ruby_initial_gc_stress_ptr for + gc_stress option. + +Sat Jun 14 00:09:19 2008 Nobuyoshi Nakada + + * gc.c (ruby_gc_stress): moved to rb_objspace_t. + + * gc.c (gc_stress_get, gc_stress_set): VM local attribute. + + * signal.c (sigsegv): ditto. + +Fri Jun 13 21:55:48 2008 Tadayoshi Funaba + + * rational.c (nurat_equal_p): Rational(0,x) and 0 are equivalent, + anyway. + +Fri Jun 13 21:26:39 2008 Tadayoshi Funaba + + * complex.c (string_to_c, nucomp_s_convert): preserve the current + backref. + + * rational.c (string_to_r, nurat_s_convert): ditto. + + * include/ruby/intern.h (rb_match_busy): added a declaration. + +Fri Jun 13 18:08:10 2008 Tanaka Akira + + * lib/time.rb (Time.xmlschema): don't accept decimal dot without + fractional digits. fractional digits handling simplified. + +Fri Jun 13 17:20:40 2008 wanabe + + * complex.c (string_to_c_internal): save and restore backref. + fixed [ruby-dev:34991] + +Fri Jun 13 17:06:20 2008 wanabe + + * rational.c (string_to_r_internal): save and restore backref. + fixed [ruby-dev:34990] + +Fri Jun 13 14:41:26 2008 NAKAMURA Usaku + + * README.EXT.ja: update about Fixnum. reported in + + + * README.EXT.ja: describe about StringValueCStr(). + + * README.EXT: ditto. + +Fri Jun 13 14:24:37 2008 Nobuyoshi Nakada + + * gc.c (rb_memerror): exit with EXIT_FAILURE instead of magic number. + + * gc.c (ruby_stack_check): STACK_LENGTH should be less than + STACK_LEVEL_MAX. + +Fri Jun 13 12:55:37 2008 Yukihiro Matsumoto + + * enum.c (sort_by_i): use NODE_DOT2 instead of NODE_MEMO to avoid + extra calls to is_pointer_to_heap() in GC. + + * enum.c (enum_zip): ditto. + +Fri Jun 13 00:41:58 2008 Yusuke Endoh + + * test/ruby/test_thread.rb: add a test. + +Thu Jun 12 23:30:11 2008 Yusuke Endoh + + * thread.c (mutex_unlock): fix cond_notified consistency. + +Thu Jun 12 22:19:45 2008 NAKAMURA Usaku + + * thread_win32.c (native_sleep): fixed previous commit. + +Thu Jun 12 21:59:17 2008 Yusuke Endoh + + * thread.c, vm_core.h, vm.c, thread_pthread.c, thread_win32.c: add + deadlock detection. [ruby-dev:35044] + + * bootstraptest/test_thread.rb: add tests for above. + +Thu Jun 12 21:39:55 2008 Tadayoshi Funaba + + * complex.c: refactoring. + + * rational.c: ditto. + +Thu Jun 12 17:11:24 2008 Yukihiro Matsumoto + + * regint.h: undefine USE_CAPTURE_HISTORY which is mentioned as + unsupported in the Onigiruma document. + +Thu Jun 12 13:36:54 2008 Tanaka Akira + + * include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for + constant symbols to optimize strlen. + +Thu Jun 12 08:47:51 2008 Yukihiro Matsumoto + + * io.c (read_all): should use io_read_encoding(), not + io_input_encoding(). + + * io.c (rb_io_getline_1): reduce calling of io_read_encoding(). + + * string.c (rb_str_scan): need not to restore $~ value, so avoid + pinning match object. + +Thu Jun 12 02:49:40 2008 Yusuke Endoh + + * ext/stringio/stringio.c (strio_init): rewind when reopened. + +Thu Jun 12 02:43:27 2008 Yusuke Endoh + + * array.c (rb_ary_zip): ANSI style. + +Thu Jun 12 02:25:54 2008 Nobuyoshi Nakada + + * io.c (rb_io_reopen): clear read buffer. + +Thu Jun 12 00:56:20 2008 Nobuyoshi Nakada + + * ext/tk: check proper conditions. [ruby-dev:35047] + +Wed Jun 11 23:33:13 2008 Yukihiro Matsumoto + + * io.c (io_fread): bypass buffered read if reading buffer is empty. + + * io.c (remain_size): do not add extra one byte. + +Wed Jun 11 12:15:17 2008 Tanaka Akira + + * bootstraptest/runner.rb (assert_normal_exit): hide stderr output + when success. + +Wed Jun 11 09:26:43 2008 NAKAMURA Usaku + + * common.mk (encs): need to pass miniruby path for windows. + +Wed Jun 11 05:53:20 2008 Koichi Sasada + + * vm.c, eval_intern.h (PASS_PASSED_BLOCK): + set a VM_FRAME_FLAG_PASSED flag to skip this frame when + searching ruby-level-cfp. + + * eval.c, eval_intern.h, proc.c: fix to check cfp. if there is + no valid ruby-level-cfp, cause RuntimeError exception. + [ruby-dev:34128] + + * vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c, + insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*. + + * KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs. + +Wed Jun 11 05:55:31 2008 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: SEGV when tcltk-stubs is enabled. + + * ext/tk/tcltklib.c: avoid error on a shared object. + + * ext/tk/extconf.rb: support --with-tcltkversion + + * ext/tk/README.tcltklib: add document about --with-tcltkversion + + * ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb, ext/tk/lib/remote-tk.rb: + not work on $SAFE==4 + + * ext/tk/lib/multi-tk.rb: Object#methods returns Symbols on Ruby1.9. + + * ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the + procedure which called at end of the timer. + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb: + support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options. + + * ext/tk/lib/*: treat __IGNORE_UNKNOWN_CONFIGURE_OPTION__ + + * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb, + ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb, + ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix. + + * ext/tk/lib/tk/text.rb: typo. call a wrong method. + + * ext/tk/lib/tk/itemconfig.rb: ditto. + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/itemconfig.rb, + ext/tk/lib/tk/canvas.rb: support alias names of option keys. + + * ext/tk/lib/tk/grid.rb: lack of module-method definitions. + + * ext/tk/lib/tk/pack.rb, ext/tk/lib/tk/grid.rb: increase supported + parameter patterns of configure method. + + * ext/tk/lib/tk.rb: add TkWindow#grid_anchor, grid_column, grid_row. + + * ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot + pass the given block to methods of Tk::Wm module. + + * ext/tk/lib/tk/wm.rb: Wm#overrideredirect overwrites argument to + an invalid value. + + * ext/tk/lib/tk.rb: fix memory (object) leak bug. + + * ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: fix memory leak. + + * ext/tk/sample/demos-jp/aniwave.rb, ext/tk/sample/demos-en/aniwave.rb: + bug fix. + + * ext/tk/lib/tkextlib/blt/component.rb, + ext/tk/lib/tkextlib/tile/tentry.rb, + ext/tk/lib/tkextlib/tile/treeview.rb: ditto. + + * ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add. + + * ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget, + ext/tk/sample/demos-jp/style.rb, ext/tk/sample/demos-en/style.rb, + ext/tk/sample/demos-jp/bind.rb, ext/tk/sample/demos-en/bind.rb: + bug fix. + + * ext/tk/sample/ttk_wrapper.rb: ditto. + + * ext/tk/sample/ttk_wrapper.rb: support "if __FILE__ == $0" idiom. + + * ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode. + + * ext/tk/lib/tkextlib/tile.rb, ext/tk/lib/tkextlib/tile/style.rb, + ext/tk/sample/ttk_wrapper.rb: improve treating and control themes. + add Tk::Tile.themes and Tk::Tile.set_theme(theme). + + * ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions. + + * ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8) + characters for headings. + + * ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name. + + * ext/tk/tkutil/tkutil.c: improve handling callback-subst-keys. + Now, support longnam-keys (e.g. '%CTT' on tkdnd-2.0; however, still + not support tkdnd-2.0 on tkextlib), and symbols of parameters (e.g. + :widget=>'%W', :keycode=>'%k', '%x'=>:x, '%X'=>:root_x, and so on; + those are attributes of event object). It means that Ruby/Tk accepts + not only "widget.bind(ev, '%W', '%k', ...){|w, k, ...| ... }", but + also "widget.bind(ev, :widget, :keycode, ...){|w, k, ...| ... }". + It is potentially incompatible, when user passes symbols to the + arguments of the callback block (the block receives the symbols as + strings). I think that is very rare case (probably, used by Ruby/Tk + experts only). When causes such trouble, please give strings instead + of such symbol parameters (e.g. call Symbol#to_s method). + + * ext/tk/lib/tk/event.rb, ext/tk/lib/tk/validation.rb, + ext/tk/lib/tkextlib/blt/treeview.rb, + ext/tk/lib/tkextlib/winico/winico.rb: ditto. + + * ext/tk/tkutil/tkutil.c: strings are available on subst_tables on + TkUtil::CallbackSubst class (it is useful on Ruby 1.9). + + * ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tkextlib/iwidgets/hierarchy.rb, + ext/tk/lib/tkextlib/iwidgets/spinner.rb, + ext/tk/lib/tkextlib/iwidgets/entryfield.rb, + ext/tk/lib/tkextlib/iwidgets/calendar.rb, + ext/tk/lib/tkextlib/blt/dragdrop.rb, + ext/tk/lib/tkextlib/tkDND/tkdnd.rb, + ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, + ext/tk/lib/tkextlib/tktable/tktable.rb: disable code piece became + unnecessary by reason of the changes of ext/tk/tkutil/tkutil.c. + + * ext/tk/lib/tk.rb, ext/tk/lib/multi-tk.rb: change strategy to define + the constant WITH_ENCODING. + + * ext/tk/lib/tk.rb: fix bug on Tk::Encoding.tk_encoding_names. + +Wed Jun 11 03:40:37 2008 Akinori MUSHA + + * lib/find.rb (Find#find): Return an enumerator if no block is + given. + +Wed Jun 11 01:28:12 2008 Koichi Sasada + + * include/ruby/intern.h, proc.c: revert rb_proc_call() and + create rb_proc_call_with_block() instead. + + * include/ruby/ruby.h, eval_jump.c, thread.c, vm_insnhelper.c: + rb_blockptr should not be exposed. + +Tue Jun 10 21:07:19 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_float.rb: add tests. [ruby-dev:35009] + +Tue Jun 10 20:55:57 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_convert): need not to initialize optional + argument for rb_scan_args(). + +Tue Jun 10 20:13:56 2008 Nobuyoshi Nakada + + * ext/extmk.rb: negate default of --without-ext if --with-ext is + given. + + * ext/extmk.rb: negate default of --without-ext. + +Tue Jun 10 17:43:35 2008 Yukihiro Matsumoto + + * array.c (rb_ary_shuffle_bang): update RDoc. [ruby-dev:35034] + +Tue Jun 10 17:30:19 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_obj_instance_exec, rb_mod_module_exec): + added prototypes. + +Tue Jun 10 17:00:29 2008 wanabe + + * util.c (ruby_strtod): ruby_strtod don't allow a trailing + decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009] + +Tue Jun 10 13:48:38 2008 Yukihiro Matsumoto + + * rational.c (nurat_s_convert): need not to initialize optional + argument for rb_scan_args(). + +Tue Jun 10 12:58:07 2008 Nobuyoshi Nakada + + * ext/io/wait/wait.c (FIONREAD_POSSIBLE_P): suppress warnings. + +Tue Jun 10 12:43:19 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression. + +Tue Jun 10 11:25:15 2008 Nobuyoshi Nakada + + * ruby.c (rb_argv0): revised for ext/tk. + + * include/ruby/encoding.h: not to use varargs.h since requiring C89. + +Tue Jun 10 00:50:51 2008 Yusuke Endoh + + * include/ruby/ruby.h, vm_core.h: add a type rb_blockptr. + + * vm_insnhelper.c (vm_yield_with_cfunc): vm_yield_with_cfunc receives + blockptr and passes it to iterating block. + + * proc.c (rb_proc_call), include/ruby/intern.h: rb_proc_call receives + blockptr. "rb_proc_call(self, args, blockptr)" in C corresponds to + "self.call(*args, &block)" in Ruby. + + * proc.c (proc_call): pass blockptr to block that is written in C. + + * proc.c (curry): receive blockptr and pass it to original proc. + [ruby-core:15551] + + * vm.c (invoke_block_from_c): fix for change of vm_yield_with_cfunc. + + * thread.c (call_trace_proc), eval_jump.c (rb_call_end_proc): fix for + change of rb_proc_call. + +Tue Jun 10 00:10:49 2008 Tanaka Akira + + * common.mk (test-knownbug): give $(OPTS) for bootstraptest/runner.rb. + +Mon Jun 9 23:10:50 2008 Tanaka Akira + + * eval.c (Init_stack): don't declare. it is a macro now. + +Mon Jun 9 22:46:47 2008 wanabe + + * compile.c : treat []&&= in virtually the same way as []||=. + [ruby-dev:34679] + +Mon Jun 9 21:17:26 2008 Nobuyoshi Nakada + + * enc/depend (clean): remove build directories. + + * test_knownbug.rb -> KNOWNBUGS.rb: renamed. + + * common.mk: apply above change. + +Mon Jun 9 21:14:26 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (configuration): set flags. + +Mon Jun 9 21:09:02 2008 Koichi Sasada + + * bootstraptest/test_knownbug.rb -> ./test_knownbug.rb: moved. + + * common.mk: add a rule "test-knownbug". + +Mon Jun 9 21:00:32 2008 Tadayoshi Funaba + + * complex.c (nucomp_s_convert): can accept Complex('i'). + [ruby-dev:34991] + +Mon Jun 9 18:25:30 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc. + + * *.c: no cache in init functions. + +Mon Jun 9 17:56:30 2008 Akinori MUSHA + + * lib/set.rb (Set#delete_if): Call to_a. + (SortedSet#delete_if, TC_SortedSet#test_sortedset): Use super to + yield elements in sorted order; [ruby-core:17144] by Arthur + Schreiber. + (SortedSet#each, SortedSet#each, TC_Set#test_each) + (TC_SortedSet#test_sortedset): Return self; [ruby-dev:35002] by + Arthur Schreiber. + +Mon Jun 9 17:47:09 2008 Tanaka Akira + + * io.c (fptr_finalize): close IO object if fd is already closed. + (rb_p): call rb_io_write just once. + +Mon Jun 9 15:37:38 2008 Yukihiro Matsumoto + + * ruby.c (require_libraries): req_list may be NULL. [ruby-dev:35008] + +Mon Jun 9 14:18:01 2008 Nobuyoshi Nakada + + * vm_core.h (struct rb_vm_struct): moved src_encoding_index, + ruby_debug, ruby_verbose, and rb_progname. + + * ruby.c (rb_argv0): no longer used. + + * ruby.c (struct cmdline_options): moved setids and req_list, and the + latter is now an array, to prevent memory leak. + + * ruby.c (cmdline_options_init): added. + + * ruby.c (add_modules, require_libraries, init_ids, forbid_setid): use + struct cmdline_options. + + * vm.c (vm_init2): initialize src_encoding_index. + + * vm.c: getters/setters for ruby_{debug,verbose}. + +Mon Jun 9 09:54:13 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (Init_stack): make to call ruby_init_stack. + +Mon Jun 9 08:12:40 2008 wanabe + + * vm_insnhelper.c, vm.c, proc.c : revert r17021. [ruby-dev:34997] + +Mon Jun 9 03:12:23 2008 Koichi Sasada + + * bootstraptest/pending.rb: move/remove solved issues. + + * bootstraptest/test_class.rb: ditto. + +Mon Jun 9 02:32:58 2008 Akinori MUSHA + + * ext/zlib/zlib.c (rb_deflate_init_copy): Copy buffers as well. + [ruby-list:45018] + +Sun Jun 8 22:22:20 2008 wanabe + + * vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method with + block that both is written in C. [ruby-dev:34273] [ruby-core:15551] + + * proc.c (curry): use proc_call instead of rb_proc_call. + [ruby-dev:34273] [ruby-core:15551] + +Sun Jun 8 21:50:27 2008 Yusuke Endoh + + * test/zlib/test_zlib.rb: add tests to achieve over 90% test coverage + of zlib. + +Sun Jun 8 20:12:47 2008 wanabe + + * vm_insnhelper.c (vm_throw): regard break as return in lambda. + [ruby-dev:34646] + +Sun Jun 8 19:17:59 2008 Koichi Sasada + + * gc.c: add a build option "CALC_EXACT_MALLOC_SIZE". + This option enables to calculate exact size of current + allocated size by malloc(). You can access these information + with GC.malloc_allocated_size and GC.malloc_allocations. + This option consume additional memory as a header of each memory + object. This option also helps to find out xmalloc()/xfree() + consistency. If you get trouble with this option, some extension + using "free()" instead of "xfree()". + This options is disabled by default. + +Sun Jun 8 18:15:38 2008 Koichi Sasada + + * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c, + enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, + io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, + string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, + vm.c, gc.c: + allocated memory objects by xmalloc (ruby_xmalloc) should be + freed by xfree (ruby_xfree). + + * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, + ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, + ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, + ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, + ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: + ditto. + +Sun Jun 8 01:15:11 2008 Tanaka Akira + + * hash.c (hash_i): make Hash#hash order insensitive. + (rb_hash_dup): use DUPSETUP. + +Sat Jun 7 23:47:35 2008 Akinori MUSHA + + * ext/zlib/zlib.c (rb_deflate_initialize, Init_zlib): Fix up + initialize_copy; [ruby-list:45016]. + +Sat Jun 7 22:15:02 2008 Nobuyoshi Nakada + + * configure.in (VENDOR_DIR): use LIBDIR instead of PREFIX as well as + SITE_DIR. a patch from Richard Brown in + [ruby-core:17129]. + +Sat Jun 7 21:37:58 2008 Nobuyoshi Nakada + + * io.c (rb_f_open), re.c (rb_reg_search), transcode.c (str_transcode): + suppress warnings. + + * util.c (quorem, rv_alloc, nrv_alloc): only used in dtoa(). + +Sat Jun 7 16:06:14 2008 Nobuyoshi Nakada + + * configure.in (CFLAGS, CXXFLAGS): append default flags. + +Sat Jun 7 01:23:59 2008 NAKAMURA Usaku + + * io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int. + fixed [ruby-dev:34979] + +Fri Jun 6 23:46:19 2008 Koichi Sasada + + * vm_insnhelper.c (vm_callee_setup_arg): check simple flag before + calling setup_arg function(). this change reduce function call. + +Fri Jun 6 21:51:46 2008 NAKAMURA Usaku + + * win32/Makefile.sub (COMMON_HEADERS): include ws2tcpip.h. + + * ext/socket/addrinfo.h (addrinfo, getaddrinfo, getnameinfo, + freehostent, freeaddrinfo): undef before define because these are + macros in some versions of Windows SDK. + + merged from ruby_1_8. + +Fri Jun 6 18:25:43 2008 Nobuyoshi Nakada + + * test/iconv/utils.rb (default_test): override not to croak. + +Fri Jun 6 16:41:45 2008 NAKAMURA Usaku + + * include/ruby/win32.h: include ws2tcpip.h. fixed [ruby-Bugs-20528] + +Fri Jun 6 15:05:02 2008 Tanaka Akira + + * gc.c (count_objects): clear hash after counting objects. + +Fri Jun 6 12:43:41 2008 Yukihiro Matsumoto + + * test/ruby/test_dir.rb (TestDir::test_glob): glob file names not sorted. + +Fri Jun 6 00:05:33 2008 Tanaka Akira + + * lib/time.rb (Time.xmlschema): don't use float. fix + http://rubyforge.org/tracker/index.php?func=detail&group_id=426&atid=1698&aid=20504 + +Thu Jun 5 23:56:18 2008 Yusuke Endoh + + * test/ruby/test_gc.rb: add tests to achieve over 90% test coverage of + gc.c. + + * test/ruby/test_objectspace.rb: ditto. + + * test/ruby/test_marshal.rb: ditto. + +Thu Jun 5 23:40:08 2008 Yusuke Endoh + + * gc.c (rb_objspace_alloc): this function is needed only when + ENABLE_VM_OBJSPACE macro is defined. + + * vm.c: ditto. + +Thu Jun 5 23:31:21 2008 Yusuke Endoh + + * test/stringio/test_stringio.rb: add tests to achieve over 95% test + coverage of stringio. + + * test/strscan/test_stringscanner.rb: ditto for strscan. + +Thu Jun 5 23:25:34 2008 Yusuke Endoh + + * eval.c (ruby_finalize_0): clear trace_func after executing END + procs. + + * thread.c: fix typo. + +Thu Jun 5 22:50:50 2008 Tanaka Akira + + * gc.c (os_obj_of): heaps may be modified in yield. + +Thu Jun 5 21:46:50 2008 Yusuke Endoh + + * st.c (st_reverse_foreach): comment out unused function. + + * util.c (dtoa): ditto. + +Thu Jun 5 20:30:46 2008 Akinori MUSHA + + * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize): + Add a null check for ssl; submitted by akira yamada + in [ruby-dev:34950]. + + * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if + SSL_OP_NO_TICKET is present; submitted by akira yamada + in [ruby-dev:34944]. + + * test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a + workaround for the case where OpenSSL is configured with + --enable-tlsext; submitted by akira yamada in [ruby-dev:34944]. + +Thu Jun 5 20:24:15 2008 Yusuke Endoh + + * thread.c (thread_set_trace_func_m): fix check for proc argument. + +Thu Jun 5 20:17:29 2008 Yusuke Endoh + + * lib/rexml/document.rb (REXML::Document:write): leaky modification + trans -> transitive. [ruby-dev:32040], r13686 + + * lib/rexml/text.rb (Text.check): fix check for illegal character. + +Thu Jun 5 14:03:44 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_create): find encoding without options. + +Thu Jun 5 07:48:32 2008 Koichi Sasada + + * string.c (hash): should be "static". + +Thu Jun 5 01:47:18 2008 Yusuke Endoh + + * test/ruby/test_transcode.rb: add tests for iso-2022-jp. + +Thu Jun 5 01:27:42 2008 Yusuke Endoh + + * test/ruby/test_process.rb: add tests. + +Wed Jun 4 23:10:08 2008 Yusuke Endoh + + * ext/zlib/zlib.c (rb_gzfile_set_mtime): fix typo. + +Wed Jun 4 18:53:39 2008 Yukihiro Matsumoto + + * object.c (rb_obj_alloc): RDoc updated. a patch from Gaston + Ramos in [ruby-core:17073]. + +Wed Jun 4 18:36:11 2008 Yukihiro Matsumoto + + * lib/rdoc.rb: massive spelling correction patch from Evan Farrar + in [ruby-doc:1382] applied. + +Wed Jun 4 17:52:18 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_iconv): fix for length argument and now + allows range. [ruby-core:17092] + +Wed Jun 4 15:45:41 2008 Akinori MUSHA + + * enumerator.c (enumerator_with_index, enumerator_with_memo): Fix + grammo in rdoc. + +Wed Jun 4 13:06:58 2008 Nobuyoshi Nakada + + * configure.in (CFLAGS, CXXFLAGS): include additional flags to + CFLAGS and CXXFLAGS while configuration. + +Tue Jun 3 23:06:35 2008 Yusuke Endoh + + * ext/strscan/strscan.c (strscan_scan_full, strscan_search_full): fix + document. + +Tue Jun 3 22:37:26 2008 Yusuke Endoh + + * ext/strscan/strscan.c (strscan_exist_p): fix document. + +Tue Jun 3 22:33:29 2008 Yusuke Endoh + + * test/ruby/test_dir.rb: add tests to achieve over 90% test coverage + of dir.c. + + * test/ruby/test_encoding.rb: add tests for dummy?, name_list and + aliases. + + * test/ruby/test_marshal.rb: add some tests. + +Tue Jun 3 22:25:51 2008 Yusuke Endoh + + * test/etc/test_etc.rb: new tests for etc. + +Tue Jun 3 19:35:02 2008 Akinori MUSHA + + * enumerator.c (enumerator_with_memo): New method: with_memo(). + +Tue Jun 3 20:04:03 2008 Nobuyoshi Nakada + + * win32/Makefile.sub (miniruby$(EXEEXT)): miniruby cannot be + written by miniruby itself. + +Tue Jun 3 19:33:22 2008 Akinori MUSHA + + * enumerator.c (enumerator_init_copy): Take care of + initialize_copy as well as initialize. + +Tue Jun 3 16:06:09 2008 Nobuyoshi Nakada + + * file.c (file_expand_path): fix for non-existent files and SFN of + symlinks. [ruby-talk:303736] + +Tue Jun 3 15:12:01 2008 Akinori MUSHA + + * lib/set.rb (Set#classify): Back out the `group_by' alias. + Better think twice. + +Tue Jun 3 15:00:22 2008 Akinori MUSHA + + * lib/set.rb (Set#collect, Set#select): Back out. I thought it + was consistent but turned out to be wrong. + +Tue Jun 3 13:41:08 2008 Akinori MUSHA + + * lib/set.rb (Set#collect, Set#select): Override Enumerable + methods and make them return a set. [ruby-core:17055] + (Set#delete_if, Set#collect!, Set#reject!, Set#classify) + (Set#divide, Set#delete_if): Return an enumerator if no block is + given. + (Set#classify): Define an alias `group_by' to override that of + Enumerable. + +Tue Jun 3 13:35:40 2008 NAKAMURA Usaku + + * process.c (run_exec_pgroup): C99 ism. + +Tue Jun 3 12:51:57 2008 Akinori MUSHA + + * enumerator.c (enumerator_allocate, enumerator_ptr): Properly + detect if the object is initialized and raise error when + appropriate. + (enumerator_initialize): Fix a typo in rdoc. [ruby-core:17052] + +Tue Jun 3 01:21:51 2008 Yusuke Endoh + + * test/ruby/test_method.rb: add a test. + +Tue Jun 3 00:26:48 2008 Yusuke Endoh + + * marshal.c (w_object): add a check for modification of array during + its dump. + +Mon Jun 2 22:27:57 2008 Yusuke Endoh + + * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. + + * test/ruby/test_big5.rb, test/ruby/test_cp949.rb, + test/ruby/test_euc_jp.rb, test/ruby/test_euc_kr.rb, + test/ruby/test_euc_tw.rb, test/ruby/test_gb18030.rb, + test/ruby/test_gbk.rb, test/ruby/test_iso_8859.rb, + test/ruby/test_koi8.rb, test/ruby/test_shift_jis.rb, + test/ruby/test_windows_1251.rb: new tests for encoding. + + * test/ruby/test_utf16.rb, test/ruby/test_utf32.rb, + test/ruby/test_regexp.rb: add tests. + +Mon Jun 2 21:56:47 2008 Yusuke Endoh + + * test/ruby/test_file.rb: add tests for uninitialized object. + + * test/ruby/test_class.rb: ditto. + + * test/ruby/test_thread.rb: ditto. + +Mon Jun 2 21:44:15 2008 Yusuke Endoh + + * re.c: fix SEGV by Regexp.allocate.names, Match.allocate.names, etc. + + * test/ruby/test_regexp.rb: add tests for above. + + * io.c: fix SEGV by IO.allocate.print, etc. + + * test/ruby/test_io.rb: add tests for above. + +Mon Jun 2 19:17:47 2008 Tanaka Akira + + * test/ruby/test_argf.rb (teardown): remove renamed temporary files. + +Mon Jun 2 18:51:15 2008 Nobuyoshi Nakada + + * lib/un.rb (wait_writable): wait until target files can be + written actually. + + * win32/Makefile.sub (LDSHARED_0, LINK_SO): get rid of failure of + mt.exe. + +Mon Jun 2 16:26:17 2008 Akinori MUSHA + + * lib/delegate.rb (Delegator::MethodDelegation#respond_to): + respond_to? should now take optional second argument; submitted + by Jeremy Kemper in [ruby-core:17045]. + +Mon Jun 2 16:14:18 2008 Akinori MUSHA + + * lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Oops. This + change did not apply to trunk. Backed out. + +Mon Jun 2 16:08:24 2008 Akinori MUSHA + + * lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Fix a bug + where tokens are not yielded one by one. + + * test/erb/test_erb.rb (TestERBCore#_test_01) + (TestERBCore#test_02_safe_04): The expected value should come + first for assert_equal(). + +Mon Jun 2 13:06:38 2008 NAKAMURA Usaku + + * mkconfig.rb: hide build path from rbconfig.rb. + +Mon Jun 2 08:46:52 2008 Nobuyoshi Nakada + + * util.c (ruby_strtod, dtoa): initialize more variables for error + handling. + +Mon Jun 2 04:55:05 2008 Nobuyoshi Nakada + + * suppress warnings on cygwin, mingw and mswin. + +Mon Jun 2 04:35:32 2008 NARUSE, Yui + + * enc/gb18030.c (gb18030_code_to_mbc): add 0x80000000 + for 4bytes character. + +Mon Jun 2 03:52:04 2008 Nobuyoshi Nakada + + * ruby.c (set_arg0): reverted used variable definition. + +Mon Jun 2 03:23:25 2008 NARUSE, Yui + + * enc/gb18030.c (gb18030_mbc_to_code): mask by 0x7FFFFFFF + because OnigCodePoint will be used as 32bit signed int. + Masking by 0x7FFFFFFF is ok on GB18030; + Minimum 4bytes character is 0x81308130. + +Sun Jun 1 22:29:35 2008 NARUSE, Yui + + * rational.c (string_to_r_internal): use rb_isdigit. + + * marshal.c (long_toobig): use %zd. + + * ruby.c (set_arg0): move unused variable definition. + +Sun Jun 1 12:18:12 2008 NARUSE, Yui + + * insns.def (DEFINE_INSN): subtract of pointers is ptrdiff_t. + this is not int on 64bit system. + + * vm_dump.c (control_frame_dump): ditto. + + * vm_dump.c (stack_dump_each): ditto. + + * vm_dump.c (debug_print_register): ditto. + + * vm_dump.c (debug_print_pre): ditto. + + * transcode.c (str_transcode): ditto. + +Sun Jun 1 10:32:18 2008 Tanaka Akira + + * test/ruby/envutil.rb (assert_normal_exit): show coredump status. + +Sat May 31 23:33:34 2008 Akinori MUSHA + + * README, README.ja: Add a note about default C flags. + +Sat May 31 23:02:00 2008 Tanaka Akira + + * gc.c (count_objects): clear given hash. + +Sat May 31 20:28:10 2008 Yusuke Endoh + + * test/ruby/test_regexp.rb: add tests. + +Sat May 31 19:11:39 2008 NARUSE, Yui + + * enc/utf_16{be,le}.c (utf16{be,le}_code_to_mbc): + fix codepoint to bytes. + +Sat May 31 18:28:17 2008 Nobuyoshi Nakada + + * suppress warnings with -Wwrite-string. + +Sat May 31 18:26:33 2008 Yukihiro Matsumoto + + * array.c (rb_ary_delete_if): should return enumerator if no block + is given. [ruby-dev:34901] + +Sat May 31 15:58:08 2008 Nobuyoshi Nakada + + * Makefile.in, configure.in (warnflags): defaulted to -Wall + -Wno-parentheses with gcc. [ruby-dev:34810] + +Sat May 31 15:17:36 2008 Nobuyoshi Nakada + + * include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t and + rb_thread_t from vm_core.h. + +Sat May 31 12:02:23 2008 Tanaka Akira + + * test/ruby/envutil.rb (assert_normal_exit): show pid when fail. + +Fri May 30 23:55:56 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_rubyoptions.rb: add a test of RUBY_DESCRIPTION. + +Fri May 30 22:47:17 2008 Yusuke Endoh + + * test/ruby/test_regexp.rb: add tests. + +Fri May 30 22:40:53 2008 Yusuke Endoh + + * test/ruby/test_signal.rb: add tests to achieve over 80% test + coverage of signal.c. + +Fri May 30 22:28:03 2008 Yusuke Endoh + + * signal.c (esignal_signo): fix SignalException#signo which returned + nil absolutely. + + * signal.c (esignal_init): always prepend "SIG" to a string that is + returned by SignalException#signm. + +Fri May 30 22:17:39 2008 Yusuke Endoh + + * test/ruby/test_argf.rb: rename a conflicting method name. + + * test/ruby/test_string.rb: ditto. + + * test/ruby/test_io.rb: ditto. + +Fri May 30 22:14:37 2008 Yusuke Endoh + + * compile.c (defined_expr): fix SEGV by defined?([1]). + +Fri May 30 12:18:43 2008 Nobuyoshi Nakada + + * common.mk (prelude.c): simply depends on PREP. [ruby-dev:34877] + + * enc/make_encdb.rb, enc/trans/make_transdb.rb: ditto. + +Fri May 30 10:55:42 2008 Nobuyoshi Nakada + + * vm_core.h (struct rb_unblock_callback), thread.c + (set_unblock_function), thread_{pthread,win32}.c (native_sleep): + extracted from struct rb_thread_struct. + + * thread.c (reset_unblock_function): not check interrupts at leaving + blocking region. [ruby-dev:34874] + +Fri May 30 06:09:31 2008 NARUSE, Yui + + * enc/utf_8.c: add UTF8-MAC (UTF-8-MAC). + +Fri May 30 04:17:13 2008 Akinori MUSHA + + * enum.c (enum_count, count_all_i, Init_Enumerable), + array.c (rb_ary_count): If no argument or block is given, count + the number of all elements. + +Fri May 30 03:12:18 2008 Akinori MUSHA + + * ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand): + Int should be enough here. + +Fri May 30 02:35:00 2008 Akinori MUSHA + + * ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand), + ext/openssl/ossl_pkey_dh.c (ossl_dh_s_generate) + (ossl_dh_initialize), + ext/openssl/ossl_pkey_dsa.c (ossl_dsa_s_generate), + ext/openssl/ossl_rand.c (ossl_rand_bytes) + (ossl_rand_pseudo_bytes, ossl_rand_egd_bytes), + ext/openssl/ossl_x509store.c (ossl_x509stctx_set_error): Do not + use FIX2INT() without checking the value type. Use NUM2INT() + instead; found by akr in [ruby-dev:34890]. + +Fri May 30 02:08:20 2008 Yusuke Endoh + + * signal.c (esignal_init): handle a non-integer argument correctly, + allowing SignalException.new(:INT). + +Fri May 30 00:59:47 2008 Yusuke Endoh + + * test/ruby/test_regexp.rb: add tests. + +Thu May 29 22:51:05 2008 Yusuke Endoh + + * test/ruby/test_require.rb: add a test for load with wrap flag, to + achieve 100% test coverage of eval_jump.c. + +Thu May 29 22:47:53 2008 Yusuke Endoh + + * test/ruby/test_argf.rb: new tests for ARGF, to achieve over 85% test + coverage of file.c. + + * test/ruby/test_io.rb: add tests. + +Thu May 29 22:41:48 2008 Yusuke Endoh + + * io.c (argf_readchar): raise EOFError, synchronizing IO#readchar. + +Thu May 29 22:29:39 2008 Yusuke Endoh + + * io.c (argf_external_encoding, argf_internal_encoding): fix SEGV by + ARGF.external_encoding. + +Thu May 29 17:52:31 2008 Nobuyoshi Nakada + + * ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6 + as WIN32. [ruby-core:16984] + +Wed May 28 18:05:28 2008 Akinori MUSHA + + * array.c (rb_ary_nitems, Init_Array): Axe Array#nitems(). + cf. [ruby-dev:34676]-[ruby-dev:34713] + +Wed May 28 17:50:32 2008 Nobuyoshi Nakada + + * win32/mkexports.rb (Exports#objdump, Exports#each_line): extracted. + +Wed May 28 17:41:43 2008 Nobuyoshi Nakada + + * Makefile.in (MKPREP): appended $(RBCONFIG). + + * common.mk (enc.mk, prelude.c): not depend on $(RBCONFIG) on mswin32 + to get of compiling twice each time. + + * win32/Makefile.sub (prelude.c): not depend on $(PREP). + +Wed May 28 17:37:07 2008 NAKAMURA Usaku + + * win32/mkexports.rb (Exports::Mswin#each_export): speed up. + +Wed May 28 16:41:59 2008 Akinori MUSHA + + * array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at the + beginning. [rubyspec] + +Wed May 28 16:12:44 2008 Akinori MUSHA + + * lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler#do_GET): + Set the HTTP status code to 302 if a Location header field is + present and the status code is not valid as a client + redirection. cf. RFC 3875 6.2.3, 6.2.4. + +Wed May 28 15:53:52 2008 NAKAMURA Usaku + + * enc/trans/japanese.c (to_SHIFT_JIS_EF_infos): typo. + +Wed May 28 15:18:16 2008 Nobuyoshi Nakada + + * lib/singleton.rb (SingletonClassMethods): _load should be public. + +Wed May 28 13:30:43 2008 NARUSE, Yui + + * enc/trans/japanese.c: add workaround for Unicode to CP932. + U+2015->0x815C, U+2225->0x8161, U+FF0D->0x817C, U+FF3C->0x815F, + U+FF5E->0x8160, U+FFE0->0x8191, U+FFE1->0x8192, U+FFE2->0x81CA + +Wed May 28 12:52:41 2008 Nobuyoshi Nakada + + * marshal.c (w_object, marshal_dump, r_object0, marshal_load): search + private methods too. [ruby-dev:34671] + + * object.c (convert_type): ditto. + +Wed May 28 08:42:51 2008 Tanaka Akira + + * numeric.c: "%" is required before PRI?VALUE. + +Tue May 27 22:10:44 2008 Nobuyoshi Nakada + + * eval_error.c (error_handle): SystemExit and SignalException throws + TAG_RAISE but not TAG_FATAL. + + * thread.c (rb_thread_execute_interrupts): delay interrupts during + raising exceptions. [ruby-dev:34855] + +Tue May 27 20:18:30 2008 Akinori MUSHA + + * array.c (rb_ary_slice_bang): Return an empty array instead of + nil when pos is valid and len is adjusted from a valid value to + zero; caught by RubySpec. + +Tue May 27 19:12:37 2008 Nobuyoshi Nakada + + * Makefile.in (MKPREP), common.mk, win32/Makefile.sub (prelude.c): get + rid of depending PREP with nmake. + + * common.mk (encs): depends on libruby. + +Tue May 27 19:00:22 2008 Akinori MUSHA + + * ext/stringio/stringio.c (strio_each_char, Init_stringio): Add + StringIO#{each_char,chars}. + (Init_stringio): Fix StringIO#bytes. + +Tue May 27 17:54:35 2008 Akinori MUSHA + + * ext/stringio/stringio.c (strio_each_byte): Return self instead + of nil as the rdoc says. + +Tue May 27 15:36:27 2008 Yukihiro Matsumoto + + * numeric.c (check_int): use PRIxVALUE format specifier. + + * numeric.c (check_uint, rb_num2fix, int_chr): ditto. + + * numeric.c (num_fdiv): fallback to_f should always return float + result. should not use #quo that may return rational. + + * numeric.c (num_div): should raise ZeroDivisionError. + + * numeric.c (fix_divide): ditto. + + * test/ruby/test_numeric.rb (TestNumeric::test_divmod): avoid + ZeroDivisionError in tests. + +Tue May 27 13:14:53 2008 Akinori MUSHA + + * enum.c (enum_to_a): Pass arguments through to #each(). + (enum_sort): Follow the enum_to_a signature change. + (enum_reverse_each): Add #reverse_each(). + +Tue May 27 13:12:37 2008 Akinori MUSHA + + * io.c (Init_IO): Define ARGF.{lines,bytes,chars}. + +Tue May 27 12:06:37 2008 NAKAMURA Usaku + + * file.c (BUFCHECK): wrong condition. [ruby-core:16921] + + * file.c (file_expand_buf): shouldn't use buflen for length of string. + +Mon May 26 18:24:48 2008 Nobuyoshi Nakada + + * file.c (BUFCHECK): no resize if enough room. + + * file.c (file_expand_path): use BUFCHECK. + +Mon May 26 17:48:42 2008 Akinori MUSHA + + * enumerator.c (struct enumerator, enumerator_init) + (enumerator_init_copy, enumerator_each): Eliminate iter. + (enumerator_ptr): Do not hardcode the class name. + (enumerator_with_index): Delay variable initialization after + RETURN_ENUMERATOR(). + +Mon May 26 17:23:49 2008 NAKAMURA Usaku + + * file.c (file_expand_path): add more space for '/'. + + * file.c (file_expand_path): should reset address of p after calling + rb_str_resize(). [ruby-dev:34800] + +Mon May 26 16:49:55 2008 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-mode): use run-hooks if run-mode-hook is + not available. a patch from Kazuhiro NISHIYAMA + in [ruby-dev:34853]. + +Mon May 26 16:41:35 2008 NAKAMURA Usaku + + * file.c (ntfs_tail): filename which starts with '.' is valid. + + * file.c (file_expand_path): cygwin symlink support. + +Mon May 26 07:15:52 2008 Nobuyoshi Nakada + + * vm_dump.c (rb_vm_bugreport): rb_make_backtrace has no arguments. + +Mon May 26 01:17:54 2008 Tanaka Akira + + * test/ruby/envutil.rb (assert_normal_exit): signal description + refined. + +Mon May 26 00:52:52 2008 Akinori MUSHA + + * hash.c (env_each_key, env_each_value, env_reject_bang) + (rb_env_clear, env_replace): Omit duplicated secure level check. + +Mon May 26 00:37:16 2008 Akinori MUSHA + + * hash.c (env_each_value): Do not call env_values() twice. + +Sun May 25 17:54:36 2008 Yusuke Endoh + + * compile.c (iseq_compile): set local_table for + ISEQ_TYPE_DEFINED_GUARD. + +Sun May 25 17:52:25 2008 Yusuke Endoh + + * compile.c (iseq_build_body): remove side effect from + VM::InstructionSequence.load. + +Sun May 25 04:30:45 2008 Yusuke Endoh + + * test/ruby/test_modules.rb (remove_json_mixins): change judgment + condition. + +Sun May 25 03:54:39 2008 Yusuke Endoh + + * test/ruby/test_modules.rb (test_ancestors, test_included_modules): + ignore json mixins. + +Sun May 25 02:37:25 2008 Koichi Sasada + + * eval_method.c: renamed from vm_method.c. "vm_method.c" is included + by "vm.c". + + * vm_eval.c: added. Some codes are moved from "eval.c" + + * common.mk: fix for above changes. + + * compile.c: make a vm_eval(0) + + * eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c, + id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c, + blockinlining.c: fix for above changes. and do some refactoring. + this changes improve rb_yield() performance. + +Sat May 24 22:32:49 2008 Yukihiro Matsumoto + + * util.c (ruby_strtod): clear errno at the top of our own + implementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] + +Sat May 24 15:26:16 2008 Yusuke Endoh + + * compile.c (iseq_set_exception_table, NODE_WHILE, NODE_NEXT): remove + special handling that decrements sp in CATCH_TYPE_NEXT for NODE_WHILE. + + * vm.c (vm_eval_body), vm_insnhelper.c (vm_throw): remove unused code. + +Sat May 24 08:13:34 2008 NARUSE, Yui + + * transcode.c (rb_str_transcode): argc is 1, and argv is &to. + +Fri May 23 17:55:11 2008 Akinori MUSHA + + * array.c (rb_ary_slice_bang): Be consistent with Array#slice() + and String#slice!(). Just return nil when a negative length or + out of boundary index is given instead of raising an exception + via internal functions. + +Fri May 23 16:44:34 2008 Akinori MUSHA + + * enumerator.c (Init_Enumerator): Override + Enumerable::Enumerator#each_with_index with #with_index. + +Fri May 23 12:23:05 2008 Nobuyoshi Nakada + + * vm_core.h (rb_num_t): moved form vm.h. + + * tool/instruction.rb (RubyVM::Instruction#sp_increase_c_expr), + tool/instruction.rb (RubyVM::VmBodyGenerator#make_header_operands): + omit unused variables. + +Fri May 23 08:47:02 2008 Yukihiro Matsumoto + + * error.c (exc_equal): == operator should be transitional. + [ruby-dev:34808] + + * error.c (syserr_eqq): === should be able to handle delegated + objects as well. + +Fri May 23 06:15:20 2008 Nobuyoshi Nakada + + * iseq.c (rb_iseq_compile_with_option): get rid of segv. + +Fri May 23 02:29:14 2008 Koichi Sasada + + * insns.def (opt_gt|ge|lt|le): use values directly to compare. + +Fri May 23 01:15:09 2008 Koichi Sasada + + * eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h, + vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const". + +Thu May 22 23:45:17 2008 Yusuke Endoh + + * compile.c (get_destination_insn, get_next_insn, get_prev_insn): + peephole optimization should not ignore ISEQ_ELEMENT_ADJUST. + +Thu May 22 20:20:54 2008 Nobuyoshi Nakada + + * marshal.c (check_dump_arg, check_load_arg): check if reentered. + [ruby-dev:34802] + +Thu May 22 20:14:28 2008 Yusuke Endoh + + * iseq.c (iseq_load, iseq_data_to_ary): support + ISEQ_TYPE_DEFINED_GUARD. + +Thu May 22 19:01:29 2008 Nobuyoshi Nakada + + * vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h. + + * vm.c (sdr, nsdr): define methods only if VMDEBUG is defined. + +Thu May 22 17:18:35 2008 Tanaka Akira + + * array.c (rb_ary_compact_bang): fix reallocation size. + +Thu May 22 15:20:20 2008 NAKAMURA Usaku + + * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h, + vm.c: need to add const to prototypes, of course. + +Thu May 22 13:24:43 2008 Koichi Sasada + + * eval.c, vm.c, vm_core.h, vm_insnhelper.c: specify "const". + + * vm_opts.h: add a OPT_TOKEN_THREADED_CODE macro. + +Thu May 22 12:51:41 2008 Tanaka Akira + + * insns.def (newhash): fix a variable definition: "const k". + +Thu May 22 12:40:54 2008 Nobuyoshi Nakada + + * array.c (flatten): check if reentered. [ruby-dev:34798] + +Thu May 22 11:39:59 2008 Tanaka Akira + + * test/ruby/envutil.rb (assert_normal_exit): capture stdout and stderr + of the child process. + +Thu May 22 08:28:49 2008 Yukihiro Matsumoto + + * array.c (flatten): free memo hash table before raising exception. + [ruby-dev:34789] + +Thu May 22 06:30:10 2008 Hidetoshi NAGAI + + * array.c (flatten): fix memory leak. + +Thu May 22 06:21:34 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (nkf_str_caseeql): added. + + * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index): use nkf_str_caseeql. + +Thu May 22 05:45:30 2008 Yukihiro Matsumoto + + * proc.c (proc_dup): should copy safe_level from src proc + properly. a patch from Keita Yamaguchi + + +Thu May 22 02:46:08 2008 Shugo Maeda + + * lib/net/imap.rb: do not use Thread#raise. [ruby-dev:34739] + +Thu May 22 00:30:06 2008 Yusuke Endoh + + * test/ruby/test_require.rb: new tests for library requiring, to + achieve over 90% test coverage of dln.c. + + * test/ruby/test_class.rb: add tests to achieve over 90% test coverage + of class.c. + + * test/ruby/test_module.rb: ditto. + +Thu May 22 00:15:44 2008 Koichi Sasada + + * insns.def, vm_insnhelper.c: specify "const". + +Wed May 21 23:20:21 2008 Koichi Sasada + + * bootstraptest/test_eval.rb: fix syntax. + +Wed May 21 17:46:17 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index): + use strcasecmp. [ruby-dev:34787] + +Wed May 21 16:48:22 2008 Yukihiro Matsumoto + + * array.c (rb_ary_compact_bang): avoid forceful realloc. + +Wed May 21 07:42:28 2008 NARUSE, Yui + + * string.c (rb_usascii_str_new): use rb_str_new. + + * string.c (rb_enc_str_new): ditto. + + * string.c (rb_usascii_str_new2): use rb_str_new2. + +Wed May 21 07:22:01 2008 NARUSE, Yui + + * encoding.c, include/ruby/encoding.h + (rb_enc_associate, rb_enc_associate_index): + returns obj. [ruby-dev:34778] + +Wed May 21 04:20:20 2008 NARUSE, Yui + + * encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII. + + * encoding.c, include/ruby/encoding.h (rb_ascii8bit_encindex): + added. + + * encoding.c (rb_locale_encoding): use rb_usascii_encoding(). + +Wed May 21 01:45:58 2008 NAKAMURA Usaku + + * test/ruby/test_file_exhaustive.rb (setup): workaround for Windows + Vista. + + * test/ruby/envutil.rb (rubyexec): now Open3.open3 is supported on + Windows. + + * test/ruby/test_process.rb: use ``||'' instead of ``;'' because + cmd.exe not support it. + +Wed May 21 01:28:47 2008 NARUSE, Yui + + * transcode.c, include/ruby/encoding.h (rb_str_transcode): + C API of encoding conversion for Ruby object. + VALUE rb_str_transcode(VALUE str, VALUE to). + + * transcode.c (str_encode, str_encode_bang): + rename from rb_tr_transcode or rb_str_transcode_bang. + +Tue May 20 23:26:05 2008 Yusuke Endoh + + * test/ruby/test_array.rb: fix tests for 64bit CPU. + +Tue May 20 20:59:56 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (rb_nkf_convert) (nkf_enc_without_bom): + reverted. nkf-utf8/nkf.c should be independent of ruby. + + * ext/nkf/nkf.c (options): + moved from nkf-utf8/nkf.c. + override nkf's original settings for Unicode BOM. + +Tue May 20 13:20:51 2008 Nobuyoshi Nakada + + * ext/nkf/nkf.c (rb_nkf_convert), ext/nkf/nkf-utf8/nkf.c + (nkf_enc_without_bom): BOM is not a part of encodings. + + * ext/nkf/nkf.c (Init_nkf), ext/nkf/nkf-utf8/nkf.c (options): + UTF-{16,32} without endian have no sense. + +Tue May 20 12:13:50 2008 Nobuyoshi Nakada + + * ruby.c (proc_options, process_options): --dump option. + +Tue May 20 11:36:06 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE. + + * gc.c (assign_heap_slot): suppress a warning. + +Tue May 20 03:42:43 2008 Koichi Sasada + + * eval.c, vm_insnhelper.c: fix cref in instance_eval + and cvar_base search protocol. + + * bootstraptest/test_knownbug.rb, test_eval.rb: move solved test + and add new tests. + + * test/ruby/test_eval.rb: fix tests for spec. + +Tue May 20 01:43:44 2008 Koichi Sasada + + * bootstraptest/test_knownbug.rb: fix a test. + "block_given?" returns true if "yield" can be used. + +Tue May 20 01:07:19 2008 Yusuke Endoh + + * parse.y (assignable_gen): when "self = 1" was evaluated, unnecessary + error message was output, which might cause null pointer access. + +Tue May 20 08:38:56 2008 Yukihiro Matsumoto + + * string.c (rb_enc_strlen_cr): need to set ENC_CODERANGE_7BIT if + search_nonascii() fails. [ruby-dev:34751] + + * string.c (rb_str_reverse): preserve coderange info if the + receiver is 7bit string. + + * string.c (rb_str_reverse_bang): ditto. + + * string.c (rb_str_reverse_bang): should have called + single_byte_optimizable before rb_str_modify() that clears + coderange info. + + * string.c (tr_trans): handle single bytes more eagerly. + +Mon May 19 23:32:12 2008 Koichi Sasada + + * vm.c (invoke_block_from_c): fix call flow. + +Mon May 19 23:19:35 2008 Yusuke Endoh + + * regexec.c (slow_search): check the case when the length is 1. + The behavior of memcmp is undefined if the third argument is 0. + +Mon May 19 21:07:48 2008 Koichi Sasada + + * thread_pthread.c (native_thread_apply_priority): + fix argument range check. [ruby-dev:33124] + +Mon May 19 18:22:35 2008 Akinori MUSHA + + * ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): Fix the type + of md; pointed out by Takahiro Kambe + in [ruby-dev:34748]. + +Mon May 19 17:23:55 2008 Yukihiro Matsumoto + + * regparse.c (PINC): use optimized enclen() instead of + ONIGENC_MBC_ENC_LEN(). + + * regparse.c (PFETCH): ditto. + + * regparse.c (PFETCH): small optimization. + + * regexec.c (slow_search): single byte encoding optimization. + + * regenc.h (enclen): avoid calling function when encoding's + min_len == max_len. + + * re.c (rb_reg_regsub): rb_enc_ascget() optimization for single + byte encoding. + + * re.c (rb_reg_search): avoid allocating new re_registers if we + already have MatchData. + + * re.c (match_init_copy): avoid unnecessary onig_region_free() + before onig_region_copy. + + * encoding.c (rb_enc_get_index): remove implicit enc_capable check + each time. + + * encoding.c (rb_enc_set_index): ditto. + + * encoding.c (enc_compatible_p): small refactoring. + + * include/ruby/encoding.h (rb_enc_dummy_p): inline + rb_enc_dummy_p() and export related code. + +Mon May 19 14:32:03 2008 Koichi Sasada + + * version.h: fix strange change by version.h update tool. + +Mon May 19 14:18:13 2008 Koichi Sasada + + * bootstraptest/test_knownbug.rb: move solved tests. + + * bootstraptest/test_eval.rb, test_literal.rb, test_syntax.rb, + test_thread.rb: ditto. + + * test/ruby/test_m17n.rb, test_proc.rb, test_sprintf.rb, + test_string.rb, test/ruby/test_struct.rb: ditto. + +Mon May 19 13:23:03 2008 NAKAMURA Usaku + + * process.c (rb_spawn_internal): set last_status when status == -1 + because there is no path to set it on win32. this patch is derived + from [ruby-core:16787], submitted by Luis Lavena + +Mon May 19 11:32:47 2008 Koichi Sasada + + * vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling. + VM value stack frame of block contains cref information. + (dfp[-1] points CREF) + + * compile.c, eval_intern.h, eval_method.c, load.c, proc.c, + vm_dump.h, vm_core.h: ditto. + + * include/ruby/ruby.h, gc.c: remove T_VALUES because of above + changes. + + * bootstraptest/test_eval.rb, test_knownbug.rb: move solved test. + +Sun May 18 22:26:51 2008 GOTOU Yuuzou + + * lib/webrick/httpservlet/filehandler.rb: should normalize path + name in path_info to prevent script disclosure vulnerability on + DOSISH filesystems. (fix: CVE-2008-1891) + Note: NTFS/FAT filesystem should not be published by the platforms + other than Windows. Pathname interpretation (including short + filename) is less than perfect. + + * lib/webrick/httpservlet/abstract.rb + (WEBrick::HTTPServlet::AbstractServlet#redirect_to_directory_uri): + should escape the value of Location: header. + + * lib/webrick/httpservlet/cgi_runner.rb: accept interpreter + command line arguments. + +Sun May 18 02:54:46 2008 Yusuke Endoh + + * pack.c (pack_pack): check errno to detect error of ruby_strtoul. + + * pack.c (pack_unpack): ditto. + + * test/ruby/test_pack.rb: add a test for above. + +Sat May 17 23:53:57 2008 Nobuyoshi Nakada + + * file.c (file_expand_path): fix for short file name on Cygwin. + +Sat May 17 18:03:52 2008 Yuki Sonoda (Yugui) + + * vm.c (Init_VM): removed the definition of Thread#initialize, + which is overwritten in Init_Thread and is never used. + +Sat May 17 14:01:50 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sort_bang): should not free shared pointer, and set + shared. [ruby-dev:34732] + +Sat May 17 12:34:54 2008 Yuki Sonoda (Yugui) + + * thread_pthread.c (Init_native_thread): Kernel#.sleep used never to + sleep on Mac OS X. Reported by arton . + + * thread_pthread.c (native_sleep): added error checks. + +Sat May 17 11:29:11 2008 Nobuyoshi Nakada + + * file.c (rb_file_s_extname): first dot is not an extension name. + +Sat May 17 03:21:29 2008 Yukihiro Matsumoto + + * array.c (rb_ary_sort_bang): stop memory leak. [ruby-dev:34726] + + * re.c (rb_reg_search): need to free allocated buffer in re_register. + + * regexec.c (onig_region_new): more pedantic malloc check. + + * regexec.c (onig_region_resize): ditto. + + * regexec.c (STATE_CHECK_BUFF_INIT): ditto. + + * regexec.c (onig_region_copy): use onig_region_resize. + +Fri May 16 12:48:33 2008 Yukihiro Matsumoto + + * math.c (to_flo): rb_Float() accepts even strings for input. + + * complex.c (nucomp_to_f): fix wrong message. + + * complex.c (nucomp_to_r): ditto. + + * object.c (rb_Float): do not check NaN for error. NaN is a part + of valid float values. + +Thu May 15 23:36:09 2008 Yusuke Endoh + + * test/ruby/test_string.rb: add tests to achieve over 90% test + coverage of string.c. + + * test/ruby/test_m17n.rb: ditto. + + * test/ruby/test_symbol.rb: ditto. + + * test/ruby/test_pack.rb: ditto. + +Thu May 15 23:01:06 2008 Yusuke Endoh + + * string.c (tr_find): String#delete returned wrong result when multiple + utf-8 arguments are passed. + + * test/ruby/test_m17n.rb (test_delete): add a test for above. + +Thu May 15 22:37:56 2008 NAKAMURA Usaku + + * parse.y (ripper_warningS): now used. + +Thu May 15 15:33:59 2008 Nobuyoshi Nakada + + * file.c (file_expand_path): support for alternative data stream + and ignored trailing garbage of NTFS. + + * file.c (rb_file_s_basename): ditto. + + * file.c (rb_file_s_extname): ditto. + +Thu May 15 13:43:36 2008 Yukihiro Matsumoto + + * object.c (rb_cstr_to_dbl): no need for forceful warning when + converting to float. overflow is a nature of float values. + + * parse.y (parser_yylex): ditto. + +Thu May 15 13:23:20 2008 Yukihiro Matsumoto + + * re.c (rb_reg_prepare_enc): error condition was updated for non + ASCII compatible strings. + +Thu May 15 12:19:42 2008 Yukihiro Matsumoto + + * ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted + prototype change in openssl bundled with newer OpenBSD. + a patch from Takahiro Kambe in + [ruby-dev:34691]. + +Wed May 14 22:09:25 2008 Yusuke Endoh + + * ChangeLog: fix typo. + +Wed May 14 21:49:14 2008 Yusuke Endoh + + * test/ruby/test_object.rb: new tests to achieve over 90% test + coverage of object.c, eval.c and eval_method.c. + + * test/ruby/test_module.rb: ditto. + + * test/ruby/test_trace.rb: ditto. + + * test/ruby/test_integer.rb: ditto. + + * test/ruby/test_float.rb: ditto. + + * test/ruby/test_method.rb: ditto. + + * test/ruby/test_variable.rb: ditto. + + * test/ruby/test_eval.rb: ditto. + + * test/ruby/test_exception.rb: ditto. + + * test/ruby/test_class.rb: ditto. + +Wed May 14 12:46:37 2008 Koichi Sasada + + * iseq.c (insn_operand_intern): remove Qundef related code. + +Wed May 14 12:42:36 2008 Akinori MUSHA + + * array.c (rb_ary_count): Override Enumerable#count for better + performance. + +Wed May 14 11:29:06 2008 Koichi Sasada + + * insns.def: add a "putcbase" instruction. + + * compile.c, insns.def: fix to use putcbase instruction for + class search. Qundef should not be used. + +Wed May 14 07:49:35 2008 Yukihiro Matsumoto + + * eval.c (rb_call0): defer calling of rb_frame_self() until it + become really necessary. + + * eval.c (rb_call): ditto. + +Wed May 14 00:55:56 2008 Yusuke Endoh + + * test/ruby/test_io_m17n.rb: remove a duplicative method. + + * test/ruby/test_utf16.rb: rename a conflicting method name. + + * test/ruby/test_array.rb: ditto. + + * test/ruby/test_file_exhaustive.rb: ditto. + + * test/ruby/test_hash.rb: ditto. + + * test/ruby/test_env.rb: ditto. + + * test/ruby/test_fixnum.rb: ditto. + + * test/ruby/test_rational.rb: ditto. + +Wed May 14 00:45:58 2008 Yusuke Endoh + + * eval_method.c (rb_add_method): fix check for warning when + Object#initialize is redefined. (same as 1.8) + +Tue May 13 23:32:44 2008 Nobuyoshi Nakada + + * enum.c (enum_yield): use rb_yield_values2. + + * enum.c (DEFINE_ENUMFUNCS): macro to define enumerator and yielding + functions. + + * enum.c (enum_all_func, enum_any_func, enum_one_func, + enum_none_func): reduced duplicate code. + +Tue May 13 15:09:38 2008 Akinori MUSHA + + * enumerator.c: Update rdoc. + (enumerator_initialize): Discourage the use. + (enum_each_slice, enum_each_cons, enumerator_each) + (enumerator_with_index): Add a note about a call without a block. + +Tue May 13 08:25:31 2008 Tanaka Akira + + * io.c (rb_f_gets): re-enable rdoc. + (rb_f_readline): ditto. + (rb_f_readlines): ditto. + +Tue May 13 07:56:36 2008 Yukihiro Matsumoto + + * string.c (rb_str_cat): fixed buffer overrun reported by + Christopher Thompson in [ruby-core:16746] + +Mon May 12 23:37:57 2008 Yusuke Endoh + + * vm.c (collect_local_variables_in_env): remove unnecessary check + which causes: x=1;proc{local_variables}.call #=> [] + + * test/ruby/test_variable.rb: add a test for above. + +Mon May 12 23:05:24 2008 NAKAMURA Usaku + + * process.c, include/ruby/intern.h (rb_run_exec_options): externed. + + * process.c (save_redirect_fd, save_env_i, save_env, run_exec_dup2, + run_exec_open, run_exec_pgroup, run_exec_rlimit, rb_run_exec_options): + save parent's process environments. + + * process.c (rb_spawn_internal): remove calling run_exec_options() + because cannot restore after spawn. + + * io.c (pipe_open): ditto. + + * test/ruby/test_process.rb (test_execopts_env): upcase environment + variable name for case insensitive platforms. + + * win32/win32.c (init_env): set USER environment variable only when + USERNAME is available. + +Mon May 12 22:23:01 2008 Tanaka Akira + + * lib/date.rb (once): use Object#object_id instead of Symbol#to_i. + +Mon May 12 21:34:46 2008 NAKAMURA Usaku + + * test/ruby/envutil.rb (rubybin): return expanded rubyexe instead of + expanded ruby if available. + +Mon May 12 20:19:55 2008 Akinori MUSHA + + * enum.c (grep_i): Be aware of multiple values; + fix [ruby-dev:34653]. + (grep_iter_i): Ditto. + (count_i): Ditto. + (find_i): Ditto. + (find_index_i): Ditto. + (find_all_i): Ditto. + (reject_i): Ditto. + (inject_i): Ditto. + (inject_op_i): Ditto. + (partition_i): Ditto. + (group_by_i): Ditto. + (first_i): Ditto. + (sort_by_i): Ditto. + (all_i): Ditto. + (all_iter_i): Ditto. + (any_i): Ditto. + (any_iter_i): Ditto. + (one_i): Ditto. + (one_iter_i): Ditto. + (none_i): Ditto. + (none_iter_i): Ditto. + (min_i): Ditto. + (min_ii): Ditto. + (max_i): Ditto. + (max_ii): Ditto. + (minmax_i): Ditto. + (minmax_ii): Ditto. + (min_by_i): Ditto. + (max_by_i): Ditto. + (minmax_by_i): Ditto. + (member_i): Ditto. + (take_i): Ditto. + (take_while_i): Ditto. + (drop_i): Ditto. + (drop_while_i): Ditto. + (cycle_i): Ditto. + + * enum.c (each_with_index): Update rdoc. each_with_index() takes + arguments that are passed through to each(), and a hash preserves + key order. + +Mon May 12 19:05:24 2008 NAKAMURA Usaku + + * process.c (rb_spawn_internal): remove calling run_exec_options() + because cannot restore after spawn. we'll fix this later. + +Mon May 12 18:16:44 2008 NAKAMURA Usaku + + * process.c (rb_spawn_internal): need to call run_exec_options() before + spawn if the platform doesn't have fork. [ruby-dev:34647] + +Mon May 12 15:20:02 2008 Tanaka Akira + + * gc.c (ruby_vm_xmalloc): increase malloc_increase only if malloc + succeeds. failed malloc size can be huge. it may increase + malloc_limit too big which cause less GC and memory full. + (ruby_vm_xrealloc): ditto. + (rb_objspace): make params.limit and params.increase size_t. + +Mon May 12 15:04:58 2008 Yukihiro Matsumoto + + * re.c (rb_reg_prepare_re): made non static with small refactoring. + + * ext/strscan/strscan.c (strscan_do_scan): should adjust encoding + before regex searching. + +Mon May 12 13:57:19 2008 Yukihiro Matsumoto + + * eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}. "defined?(a||=1)" + should not operate assignment. [ruby-dev:34645] + +Mon May 12 13:29:26 2008 Tanaka Akira + + * bignum.c (bigzero_p): check from MSB to LSB. [ruby-dev:34649] + +Mon May 12 12:32:10 2008 Nobuyoshi Nakada + + * common.mk (RUBYOPT): affected BASERUBY too. [ruby-talk:301514] + +Mon May 12 12:27:55 2008 Tanaka Akira + + * gc.c (assign_heap_slot): fix condition for number of objects in + a heap. + +Mon May 12 12:24:48 2008 Yukihiro Matsumoto + + * string.c (sym_to_i): really removed. [ruby-dev:34641] + +Mon May 12 11:15:55 2008 Yuki Sonoda (Yugui) + + * gc.c (assign_heap_slot): put the binary search routine in order. + +Mon May 12 10:52:51 2008 Nobuyoshi Nakada + + * ruby.c (ruby_init_gems), gem_prelude.rb: check if Gem is defined + instead of Gem::Enable. + + * gem_prelude.rb (load_full_rubygems_library, const_missing): prevent + infinite recursion. [ruby-dev:34539] + +Sun May 11 23:19:39 2008 Nobuyoshi Nakada + + * enum.c (all_iter_i, any_iter_i): reduced duplicated code. + +Sun May 11 22:54:02 2008 Nobuyoshi Nakada + + * bootstraptest/runner.rb (main): leave -I options for purelib.rb + untouched. + + * bootstraptest/runner.rb (main): handle relative path -r options. + +Sun May 11 19:04:06 2008 Yusuke Endoh + + * test/ruby/test_thread.rb: kill and join temporal threads that are + created in each test. + +Sun May 11 17:58:45 2008 Tanaka Akira + + * test/ruby/test_process.rb (TestProcess#with_stdin): defined. + (TestProcess#test_argv0_noarg): don't use redirect_fds. + [ruby-dev:34647] + +Sun May 11 17:57:36 2008 Nobuyoshi Nakada + + * configure.in (MINIRUBY): should not include extension library path. + +Sun May 11 14:40:36 2008 Tanaka Akira + + * include/ruby/ruby.h (SIZET2NUM): new macro. + (NUM2SIZET): new macro. + + * gc.c (struct rb_objspace): use size_t for increment, length and + used for 64bit. + (allocate_heaps): ditto. + (assign_heap_slot): ditto. + (set_heaps_increment): ditto. + (gc_mark_all): ditto. + (is_pointer_to_heap): ditto. + (free_unused_heaps): ditto. + (gc_sweep): ditto. + (os_obj_of): ditto. + (rb_gc_call_finalizer_at_exit): ditto. + (count_objects): ditto. + +Sun May 11 13:14:09 2008 Tanaka Akira + + * thread.c (thread_cleanup_func_before_exec): extracted from + thread_cleanup_func not to touch pthread data. + pthread_cond_destroy in forked process may cause deadlock on + Debian GNU/Linux Etch on x86, x86-64 and IA64. + this doesn't cause resource leak because the process will exec soon. + (terminate_atfork_before_exec_i): defined. + (rb_thread_atfork_before_exec): defined. + + * include/ruby/intern.h (rb_thread_atfork_before_exec): declared. + + * process.c (rb_exec_atfork): call rb_thread_atfork_before_exec + instead of rb_thread_atfork. + + * io.c (popen_exec): call rb_thread_atfork_before_exec instead of + rb_thread_atfork. + +Sat May 10 22:14:03 2008 Yukihiro Matsumoto + + * string.c (tr_trans): single '^' does not mean negation. + [ruby-dev:34632] + + * string.c (tr_trans): should check src size, not str size. + [ruby-dev:34637] + + * string.c (tr_trans): should not turn on modify flag if no + modification happens. [ruby-dev:34631] + +Sat May 10 18:11:18 2008 Yukihiro Matsumoto + + * string.c (rb_str_each_line): zero length record separator should + split a string into paragraphs. [ruby-dev:34586] + + * string.c (rb_str_each_line): RDoc updated. + +Sat May 10 11:36:20 2008 Tanaka Akira + + * vm.c (env_mark): mark env->block.self. prevent SEGV when GC occur + in prepare_iseq_build with gcc version 3.4.6 [FreeBSD] 20060305 on + FreeBSD/amd64. + +Fri May 9 19:16:00 2008 Yukihiro Matsumoto + + * thread.c (timeofday): use monotonic clock. based on a patch + from zimbatm in [ruby-core:16627]. + +Fri May 9 07:47:07 2008 Yukihiro Matsumoto + + * cont.c (cont_restore_0): dynamic stack direction code should be + consistent with static one. [ruby-talk:301152] + +Fri May 9 00:03:50 2008 Yukihiro Matsumoto + + * parse.y (arg): operator assignment "a += b rescue c" should be + parsed as "a += (b rescue c)" just like normal assignment. + [ruby-talk:301000] + +Thu May 8 18:14:00 2008 Yukihiro Matsumoto + + * bignum.c (rb_big_and): bit-wise operation should not take float + values. [ruby-dev:34612] + + * bignum.c (rb_big_or): ditto. + + * bignum.c (rb_big_xor): ditto. + +Thu May 8 17:44:13 2008 Nobuyoshi Nakada + + * common.mk, ext/extmk.rb, lib/mkmf.rb: use absolute path for RUBYOPT. + + * file.c (rb_find_file_ext): guard load_path from GC. + gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) optimizes + load_path by holding only RARRAY_LEN(load_path) and + RARRAY_PTR(load_path) in registers on IA64 GNU/Linux Etch. + +Thu May 8 16:41:20 2008 Nobuyoshi Nakada + + * configure.in (MINIRUBY), common.mk (RUBYOPT): add purelib.rb. + [ruby-core:16642] + +Thu May 8 16:00:41 2008 Yukihiro Matsumoto + + * parse.y (parser_yylex): ! and ? at the bottom are no longer part + of valid symbol names. [ruby-dev:34590] + +Thu May 8 15:36:11 2008 Tanaka Akira + + * thread.c (rb_gc_save_machine_context): call FLUSH_REGISTER_WINDOWS + to mark the register stack from GC on another thread. + +Thu May 8 15:14:34 2008 Nobuyoshi Nakada + + * array.c (rb_ary_sort_bang): freeze temporary array. + +Thu May 8 13:19:18 2008 Nobuyoshi Nakada + + * vm.c (rb_thread_mark): mark stat_insn_usage only when ptr is not + null. + +Thu May 8 10:44:04 2008 Yukihiro Matsumoto + + * array.c (sort_reentered): reentered check may be called from + Array#sort. + +Thu May 8 09:51:52 2008 Nobuyoshi Nakada + + * array.c (sort_1, sort_2): check for reentered and if elements are + accessible. [ruby-core:16679] + +Thu May 8 06:43:52 2008 Nobuyoshi Nakada + + * dln.c (dln_find_exe_r, dln_find_file_r): reentrant versions. + + * file.c (rb_find_file_ext, rb_find_file), process.c (proc_exec_v), + (rb_proc_exec, proc_spawn_v, proc_spawn), ruby.c (process_options): + use reentrant versions. + +Thu May 8 06:27:33 2008 Nobuyoshi Nakada + + * thread.c (rb_thread_key_p): thread local storage stores ID. + +Thu May 8 01:10:03 2008 Yukihiro Matsumoto + + * string.c (tr_trans): should squeeze properly. [ruby-dev:34587] + + * string.c (tr_trans): had a bug in treating multi-byte character + replacement. + + * string.c (rb_str_delete_bang): need not to do anything for empty + strings. + + * test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_delete): add + test for empty receiver. + +Wed May 7 20:19:18 2008 NAKAMURA Usaku + + * ruby.c (process_options, ruby_set_argv): set encoding of rb_argv + after Init_prelude() because cannot load encoding extensions before + it. + +Wed May 7 20:00:21 2008 Yukihiro Matsumoto + + * numeric.c (bit_coerce): float should not be a valid operand of + bitwise operations. [ruby-dev:34583] + +Wed May 7 19:35:29 2008 Yukihiro Matsumoto + + * thread.c (rb_thread_key_p): should always convert symbol to ID. + [ruby-dev:34588] + +Wed May 7 19:30:34 2008 Yukihiro Matsumoto + + * numeric.c (fix_divide): float division should floor() before + rounding into integer. [ruby-dev:34584] + +Wed May 7 18:02:01 2008 Yukihiro Matsumoto + + * string.c (sym_to_i): remove obsolete method. preparation for + symbol GC. + + * numeric.c (fix_to_sym): ditto. + + * numeric.c (fix_id2name): ditto. + +Wed May 7 17:43:22 2008 Nobuyoshi Nakada + + * io.c (io_puts_ary): check recursion first. [ruby-dev:34580] + +Wed May 7 17:41:14 2008 Nobuyoshi Nakada + + * vm.c (vm_eval_body): initialize retval. [ruby-dev:34576] + +Wed May 7 13:02:56 2008 Yukihiro Matsumoto + + * bignum.c (rb_big_fdiv): flo.fdiv(NaN) should result NaN. + + * numeric.c (num_quo): renamed and moved from bignum.c. + [ruby-dev:34582] + + * bignum.c (rb_big_fdiv): update RDoc description + + * rational.c (nurat_s_new_m): small refactoring. + + * bignum.c (rb_big2dbl): no need for forceful warning when + converting to float. overflow is a nature of float values. + +Wed May 7 00:54:25 2008 Yukihiro Matsumoto + + * ext/zlib/zlib.c (gzreader_gets): may cause infinite loop. + a patch from Kouya in + [ruby-reference-manual:762]. + +Tue May 6 02:08:18 2008 Tanaka Akira + + * test/io/nonblock/test_flush.rb: don't set Thread.abort_on_exception. + + * test/net/imap/test_imap.rb: ensure disconnecting imap to terminate + receiver thread. + +Tue May 6 00:29:21 2008 Yukihiro Matsumoto + + * iseq.c (insn_operand_intern): should handle Qundef embedded in + operand. [ruby-core:16656] + +Tue May 6 00:00:02 2008 Yukihiro Matsumoto + + * compile.c (iseq_compile_each): should call compile_cpath() for + modules as well. [ruby-dev:34585] + + * insns.def (defineclass): add undef handling. + +Mon May 5 23:49:40 2008 Yukihiro Matsumoto + + * insns.def (defineclass): was using wrong variable. [ruby-dev:34592] + +Mon May 5 20:07:59 2008 Yukihiro Matsumoto + + * io.c (io_fflush): IO#flush problem within threads. a patch from + in [ruby-dev:34595]. + +Mon May 5 19:58:44 2008 Yukihiro Matsumoto + + * compile.c (defined_expr): protect some expression from + segmentation fault. a patch from wanabe + in [ruby-dev:34593]. + +Mon May 5 19:49:59 2008 Yukihiro Matsumoto + + * struct.c (rb_struct_s_def): Struct.new(0) should not SEGV. + based on the patch from wanabe in + [ruby-dev:34594]. + + * struct.c (make_struct): call to_str on name object. + +Mon May 5 17:17:40 2008 Tanaka Akira + + * eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF to + avoid SEGV by at_exit { Fiber.new{}.resume } on IA64. + +Mon May 5 12:12:11 2008 Yukihiro Matsumoto + + * array.c (rb_ary_slice_bang): should adjust length before making + sub-array. + +Mon May 5 11:36:14 2008 Yukihiro Matsumoto + + * array.c (rb_ary_dup): should dupe corresponding information. + [ruby-dev:34581] + +Mon May 5 11:13:50 2008 Yukihiro Matsumoto + + * compile.c (compile_cpath): use Qundef to denote cbase lookup. + + * insns.def (defineclass): Qundef is passed for cbase. + + * insns.def (setconstant): ditto. + + * vm_insnhelper.c (vm_check_if_namespace): use rb_inspect() + instead of rb_obj_as_string() for better description. + +Mon May 5 02:10:23 2008 Tanaka Akira + + * gc.c (set_heaps_increment): fix memory allocation strategy by + determining heaps_inc from heaps_used, not objects_delta. + (struct rb_objspace): delta removed. change increment, length and + used to long for LP64. + (objects_delta): removed. + (allocate_heaps): add next_heaps_length argument. + (init_heap): renamed from add_heap. + (garbage_collect): use heaps_increment in dont_gc. + +Sun May 4 21:09:32 2008 Tanaka Akira + + * lib/getoptlong.rb: use $stderr instead of $deferr. + +Sun May 4 16:04:28 2008 Tanaka Akira + + * time.c (obj2nsec): fix string argument. + +Sun May 4 14:29:14 2008 Tanaka Akira + + * eval.c (rb_obj_respond_to): check the result of respond_to? method + by RTEST. + +Sun May 4 12:57:58 2008 Tanaka Akira + + * string.c (rb_str_each_line): return original string. + +Sat May 3 20:57:06 2008 Tanaka Akira + + * test/ruby/envutil.rb (Test::Unit::Assertions#assert_normal_exit): + new method. + +Sat May 3 18:10:54 2008 Tanaka Akira + + * time.c (time_timespec): raise TypeError for nil and other objects + which has no divmod method. + +Fri May 2 23:59:26 2008 Nobuyoshi Nakada + + * io.c (internal_read_func, internal_write_func): split from + internal_io_func. + +Fri May 2 23:55:15 2008 Tanaka Akira + + * variable.c (rb_define_hooked_variable): guard *var from GC to + prevent collecting argf under RUBY_DEBUG=gc_stress. + +Fri May 2 17:29:59 2008 Yukihiro Matsumoto + + * range.c (range_step): call to_int if step is not a numeric + value. [ruby-dev:34575] + +Fri May 2 16:10:57 2008 Yukihiro Matsumoto + + * range.c (range_step): do not forcefully convert steps into + integers. [ruby-dev:34571] + +Fri May 2 14:52:33 2008 Yukihiro Matsumoto + + * misc/ruby-mode.el: move fontifying code from hook. a patch from + Phil Hagelberg in [ruby-core:16636]. + +Fri May 2 14:10:17 2008 Yukihiro Matsumoto + + * range.c (range_step): step may be bignum. + +Fri May 2 13:52:36 2008 Yukihiro Matsumoto + + * re.c (Init_Regexp): remove MatchData#select. [ruby-dev:34563] + +Thu May 1 23:59:59 2008 Nobuyoshi Nakada + + * bignum.c (rb_big_divide), numeric.c (fix_divide): check for result + domain. [ruby-dev:34559] + +Thu May 1 23:57:06 2008 James Edward Gray II + + * lib/net/telnet.rb: This patch from Brian Candler adds a FailEOF mode which + can be activated to have net/telnet raise EOFError exceptions when the + remote connection is closed. The default behavior remains unchanged though. + +Thu May 1 23:43:21 2008 Nobuyoshi Nakada + + * range.c (range_step): check if step can be converted to an integer. + [ruby-dev:34558] + + * range.c (range_step): allow float step bigger than zero but less + than one. [ruby-dev:34557] + +Thu May 1 23:20:12 2008 Nobuyoshi Nakada + + * bignum.c (rb_big_divide): return an integer for idiv. + [ruby-dev:34553] + +Thu May 1 20:47:30 2008 Yukihiro Matsumoto + + * hash.c (rb_hash_s_create): should access converted hash value. + [ruby-dev:34555] + +Thu May 1 20:31:09 2008 Yukihiro Matsumoto + + * test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value): + shut up warning. + + * rational.c (nurat_to_f): no need for forceful warning when + converting to float. overflow is a nature of float values. + +Thu May 1 16:10:21 2008 Nobuyoshi Nakada + + * hash.c (env_delete_if): return enumerator if no block given. + [ruby-dev:34554] + +Wed Apr 30 21:36:40 2008 Masatoshi SEKI + + * lib/erb.rb (url_encode): [ruby-dev:34497] ERB::Util#url_encode + bug fix. Reported by rubikitch. + + * test/erb/test_erb.rb: ditto + +Wed Apr 30 20:11:36 2008 James Edward Gray II + + * lib/net/telnet.rb: Fixing a bug where line endings would not be properly + escaped when the two character ending was broken up into separate TCP + packets. Issue reported and patched by Brian Candler. + +Wed Apr 30 18:03:01 2008 Nobuyoshi Nakada + + * load.c (rb_load_path), vm_core.h (rb_vm_t): moved to VM. + + * load.c (rb_get_load_path): returns absolute load path. + + * load.c (load_path_getter): $LOAD_PATH getter. + + * file.c (rb_find_file_ext, rb_find_file), ruby.c (push_include, + ruby_init_loadpath): use the accessor. + + * vm.c (rb_vm_mark): mark load_path. + +Wed Apr 30 17:47:21 2008 Nobuyoshi Nakada + + * re.c (rb_reg_search): use local variable. a patch from wanabe + in [ruby-dev:34537]. [ruby-dev:34492] + +Wed Apr 30 16:10:18 2008 Yusuke Endoh + + * eval_intern.h: specify the values of the enumeration constants + explicitly. [ruby-dev:34489] + +Wed Apr 30 12:32:39 2008 Tanaka Akira + + * process.c (check_exec_redirect_fd): prohibit duplex IO. + (check_exec_fds): record maxhint even if close_others is not + specified. + (rb_exec_arg_fixup): renamed from rb_exec_arg_fix. + +Mon Apr 28 20:24:27 2008 Tadayoshi Funaba + + * rational.c (nurat_marshal_load): checks the given + denominator. [ruby-dev:34536] + +Mon Apr 28 14:21:18 2008 Tanaka Akira + + * include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead of + FIXNUM_MAX to make it possible to convert to double accurately on + environments with 64bit VALUE and 64bit double. + It assumes FLT_RADIX is 2. + fix RubyForge bug #14102. + +Mon Apr 28 12:48:57 2008 NAKAMURA Usaku + + * process.c (rb_exec_arg_addopt, rb_exec_arg_addopt): now can specify + close_exec on having no fork environment (but still meaningless). + +Mon Apr 28 11:11:29 2008 Tanaka Akira + + * process.c (run_exec_options): don't call FIX2INT for nil. + +Mon Apr 28 11:11:38 2008 Yukihiro Matsumoto + + * proc.c (method_name): should return symbols instead of strings. + [ruby-dev:34531] + +Mon Apr 28 09:02:43 2008 Tanaka Akira + + * include/ruby/intern.h (rb_exec_arg_init): declared. + (rb_exec_arg_addopt): declared. + (rb_exec_arg_fix): declared. + (rb_exec_initarg): removed. + (rb_exec_getargs): removed. + (rb_exec_initarg2): removed. + + * io.c (struct popen_arg): make execarg as a pointer. + (popen_exec): follow popen_arg change. + (pipe_open): add eargp argument. extract argc and argv from eargp. + use rb_exec_arg_addopt to add redirect options. + (pipe_open_v): set up struct rb_exec_arg. + (pipe_open_s): set up struct rb_exec_arg. + + * process.c (rb_exec_arg_addopt): new function extracted from + check_exec_options_i. + (check_exec_options_i): use rb_exec_arg_addopt. + (rb_check_exec_options): opthash is always a hash now. + (rb_exec_getargs): make it static. + (rb_exec_fillarg): renamed from rb_exec_initarg2. don't set up + redirect_fds. + (rb_exec_arg_init): new function. + (rb_exec_arg_fix): new function. + (rb_f_exec): use rb_exec_arg_init and rb_exec_arg_fix. use + rb_exec_arg_addopt to set close_others option. + (run_exec_options): make close_others by default. + (rb_spawn_internal): use rb_exec_arg_init and rb_exec_arg_fix. use + rb_exec_arg_addopt to set close_others option. + +Sun Apr 27 18:59:04 2008 Tadayoshi Funaba + + * rational.c (nurat_expt): use f_rational_new2. [ruby-dev:34524] + +Sun Apr 27 15:23:40 2008 Koichi Sasada + + * gc.c (gc_count): add a GC.count method. This method returns + a GC invoking count. + +Sun Apr 27 12:20:33 2008 Nobuyoshi Nakada + + * vm_core.h (rb_vm_t), gc.c (rb_objspace, rb_newobj), vm.c + (Init_BareVM): per-VM object space support, which is disabled now. + + * gc.c (rb_objspace_alloc), vm.c (Init_BareVM): should not use ruby + malloc here. + + * gc.c (garbage_collect, etc): performance improvement by passing the + reference instead of referring the global variable in each functions. + +Sun Apr 27 08:06:15 2008 NARUSE, Yui + + * ruby.c (ruby_set_argv): ARGV should be locale encoding. + [ruby-list:44861] + +Sun Apr 27 01:46:29 2008 Tanaka Akira + + * lib/open3.rb (Open3.popen3w): removed. + (Open3.popen3): notice wait_thr. + +Sun Apr 27 01:13:05 2008 Eric Hodel + + * lib/rdoc, test/rdoc: Update to RDoc 2.0.0 r56. + +Sat Apr 26 21:30:40 2008 Tanaka Akira + + * include/ruby/intern.h (rb_hash_dup): declared. + + * hash.c (rb_hash_dup): new function. + + * process.c (rb_spawn_internal): don't modify option hash. + +Sat Apr 26 18:36:31 2008 Nobuyoshi Nakada + + * io.c, signal.c, thread.c, thread_win32.c, include/ruby/intern.h: + suppress warnings. + +Sat Apr 26 17:42:30 2008 Nobuyoshi Nakada + + * error.c (builtin_types), gc.c (count_objects): added Complex and + Rational. + +Sat Apr 26 17:35:19 2008 Nobuyoshi Nakada + + * error.c (rb_eNOERROR): renamed. + +Sat Apr 26 17:30:11 2008 Koichi Sasada + + * include/ruby/ruby.h, gc.c: remove T_BLOCK. + + * include/ruby/ruby.h: re-number T_xxx. + +Sat Apr 26 17:31:09 2008 Nobuyoshi Nakada + + * process.c (rb_cProcessTms, rb_cProcessStatus): renamed. + + * error.c (builtin_types), signal.c (siglist), st.c (primes), + struct.c (ref_func), time.c (months): constified. + +Sat Apr 26 13:00:41 2008 Tanaka Akira + + * lib/open3.rb: double fork is replaced by spawn with Process.detach. + (Open3.popen3w): new method to access the thread returned by + Process.detach. + +Sat Apr 26 00:47:43 2008 Tanaka Akira + + * process.c (rb_spawn_internal): new function to specify + default_close_others. + (rb_spawn): specify default_close_others true. + (rb_f_system): call rb_spawn_internal with default_close_others as + false. + +Sat Apr 26 12:26:41 2008 Yukihiro Matsumoto + + * range.c (range_each): use INT2FIX() for fixnum values. + +Fri Apr 25 17:56:25 2008 Yukihiro Matsumoto + + * gc.c (free_unused_heaps): preserve last used heap segment to + reduce malloc() call. + +Fri Apr 25 17:54:10 2008 Yukihiro Matsumoto + + * gc.c (HEAP_SIZE): use smaller heap segment (2K) for more chance + to be freed. based on patch from authorNari . + + * gc.c (rb_newobj_from_heap): eventually allocate heap segments. + +Fri Apr 25 15:35:36 2008 Nobuyoshi Nakada + + * process.c (rb_spawn): rb_exec_initarg() returns new argc and argv in + earg. + +Fri Apr 25 12:37:54 2008 Nobuyoshi Nakada + + * array.c (flatten): returns an instance of same class. + [ruby-core:16554] + +Fri Apr 25 10:52:27 2008 NAKAMURA Usaku + + * include/ruby/win32.h: define mode_t for umask. + + * process.c (check_exec_options_i, check_exec_fds, run_exec_options): + support "close_others" only when fork(2) is available. + +Fri Apr 25 00:16:11 2008 Tanaka Akira + + * process.c: include sys/stat.h for umask. + +Thu Apr 24 23:25:17 2008 Tanaka Akira + + * include/ruby/intern.h (rb_env_clear): declared. + (rb_io_mode_modenum): declared. + (rb_close_before_exec): declared. + (struct rb_exec_arg): add options and redirect_fds field. + (rb_check_argv): removed. + (rb_exec_initarg): declared. + (rb_exec_getargs): declared. + (rb_exec_initarg2): declared. + (rb_fork): add third argument: fds. + + * io.c (max_file_descriptor): new static variable to record maximum + file descriptor ruby used. + (UPDATE_MAXFD): new macro. + (UPDATE_MAXFD_PIPE): new macro. + (rb_io_mode_modenum): externed. + (rb_sysopen): update max_file_descriptor. + (rb_close_before_exec): new function. + (popen_exec): redirection removed because it is done by extended + spawn mechanism. + (pipe_open): generate a hash for spawn options to specify + redirections. + (pipe_open_v): use rb_exec_getargs. + (pipe_open_s): use rb_exec_getargs. + (rb_io_initialize): update max_file_descriptor. + + * process.c (hide_obj): new function. + (check_exec_redirect_fd): new function. + (check_exec_redirect): new function. + (check_exec_options_i): new function. + (check_exec_fds): new function. + (rb_check_exec_options): new function. + (check_exec_env_i): new function. + (rb_check_exec_env): new function. + (rb_exec_getargs): new function. + (rb_exec_initarg2): new function. + (rb_exec_initarg): new function. + (rb_f_exec): use rb_exec_initarg. + (intcmp): new function. + (run_exec_dup2): new function. + (run_exec_close): new function. + (run_exec_open): new function. + (run_exec_pgroup): new function. + (run_exec_rlimit): new function. + (run_exec_options): new function. + (rb_exec): call run_exec_options. + (move_fds_to_avoid_crash): new function. + (pipe_nocrash): new function. + (rb_fork): use pipe_nocrash to avoid file descriptor conflicts. + (rb_spawn): use rb_exec_initarg. + (rlimit_resource_name2int): extracted from rlimit_resource_type. + (rlimit_type_by_hname): new function. + (rlimit_type_by_lname): new function. + (rlimit_resource_type): use rlimit_type_by_hname. + (proc_daemon): add fds argument for rb_fork. + + * hash.c (rb_env_clear): renamed from env_clear and externed. + + [ruby-dev:34086] + +Thu Apr 24 23:00:58 2008 Yusuke Endoh + + * test/ruby/test_thread.rb: fix typos. + + * test/ruby/envutil.rb (rubyexec): move Open3.popen3 call into timeout + block. + +Thu Apr 24 22:34:52 2008 Yusuke Endoh + + * test/ruby/test_comparable.rb: new tests for Comparable, to achieve + 100% test coverage of compar.c. + +Thu Apr 24 17:19:01 2008 Yukihiro Matsumoto + + * ruby.c (process_options): set safe_level before loading script. + [ruby-dev:34421] + +Thu Apr 24 14:15:11 2008 Nobuyoshi Nakada + + * dln.c (dln_find_1): prior files with extensions to files sans + extensions. [ruby-core:16517] + +Thu Apr 24 00:26:06 2008 NAKAMURA Usaku + + * lib/rdoc/ri/descriptions.rb: fixed wrong class nestings. + +Thu Apr 24 00:20:01 2008 Yusuke Endoh + + * test/ruby/test_settracefunc.rb: add a test for set_trace_func. + + * test/ruby/envutil.rb: move "rubyexec" method from test_rubyoptions.rb. + + * test/ruby/test_rubyoptions.rb: use rubyexec in envutil.rb. + + * test/ruby/test_thread.rb: add tests to achieve over 90% test coverage + of thread.c. + +Wed Apr 23 15:28:52 2008 Kazuhiro NISHIYAMA + + * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create): failed + notice moved from comment to assertion message. [ruby-dev:29127] + +Wed Apr 23 11:49:54 2008 Akinori MUSHA + + * lib/set.rb (Set#each, SortedSet#each, TC_Set#test_each): Return + an enumerator if no block is given. + +Wed Apr 23 00:36:03 2008 Yusuke Endoh + + * test/openssl/test_ssl.rb (start_server): add timeout to server.join. + +Wed Apr 23 00:18:45 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve + tests of Symbol#to_proc. + +Tue Apr 22 22:40:57 2008 Yukihiro Matsumoto + + * lib/drb/drb.rb (DRb::DRbServer::check_insecure_method): should + check method names by symbols, not by strings. a patch from + Kazuhiro NISHIYAMA in [ruby-dev:34487]. + +Tue Apr 22 22:15:54 2008 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-{case,label}-indent): up list from + indentation point. + +Tue Apr 22 21:09:05 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (score_table_A0, score_table_F0): + type of content is unsigned char. + + * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): 'c' is nkf_char. + + * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): enc is 0 or pointer. + + * ext/nkf//nkf.c (options): type of option is unsigned char. + +Tue Apr 22 20:51:58 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (z_conv): characters must be nkf_char. + +Tue Apr 22 19:23:05 2008 Akinori MUSHA + + * enumerator.c (enumerator_initialize): Remove an undocumented + feature (passing a block to the constructor) that's broken. + This is not what I intended. + +Tue Apr 22 17:54:05 2008 URABE Shyouhei + + * vm_core.h (exec_event_hooks): ``inline'' is a type modifier, not + a type itself. + +Tue Apr 22 16:24:27 2008 URABE Shyouhei + + * string.c (rb_enc_cr_str_buf_cat): do not use C++ comments. + +Tue Apr 22 16:23:53 2008 URABE Shyouhei + + * configure.in: use AC_USE_SYSTEM_EXTENSIONS. + +Tue Apr 22 16:23:16 2008 URABE Shyouhei + + * vm_evalbody.c (DECL_SC_REG): use __asm__ instead. + +Tue Apr 22 16:18:30 2008 Nobuyoshi Nakada + + * vm_evalbody.c (DECL_SC_REG): typo fixed. + +Tue Apr 22 15:25:04 2008 Nobuyoshi Nakada + + * configure.in (struct timespec): needs time.h according to POSIX. + +Tue Apr 22 13:19:48 2008 Yukihiro Matsumoto + + * thread.c (rb_thread_stop_timer_thread): should clear + timer_thread_id after stopping it. + +Tue Apr 22 13:12:58 2008 Nobuyoshi Nakada + + * thread.c (thread_join): remove the current thread from the join list + of the target thread. + +Tue Apr 22 12:03:50 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (vm_get_ev_const): search from the base klass if it + is given. + +Tue Apr 22 09:58:13 2008 NAKAMURA Usaku + + * ext/win32ole/win32ole.c: avoid warnings. + +Tue Apr 22 09:56:51 2008 NAKAMURA Usaku + + * file.c (eaccess): workaround for recent msvcrt's behavior. + [ruby-core:16460] + +Mon Apr 21 19:08:32 2008 Tanaka Akira + + * io.c (copy_stream_body): call rb_io_check_readable and + rb_io_check_writable. + +Mon Apr 21 17:45:27 2008 Akinori MUSHA + + * ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair): + GDBM#{each,each_pair,each_key,each_value}: Return an enumerator + if no block is given. + + * ext/gdbm/gdbm.c (fgdbm_each_value, fgdbm_each_key, + fgdbm_each_pair): GDBM#{each,each_pair,each_key,each_value}: + Return an enumerator if no block is given. + + * ext/openssl/ossl_config.c (ossl_config_each): + OpenSSL::Config#each: Return an enumerator if no block is given. + + * ext/readline/readline.c (hist_each): Readline::HISTORY#each: + Return an enumerator if no block is given. + + * ext/sdbm/init.c (fsdbm_each_value, fsdbm_each_key, + fsdbm_each_pair): SDBM#{each,each_pair,each_key,each_value}: + Return an enumerator if no block is given. + + * ext/stringio/stringio.c (strio_each_byte, strio_each): + StringIO#{each,each_line,each_byte}: Return an enumerator if no + block is given. + + * ext/stringio/stringio.c (Init_stringio): Add #lines and #bytes, + which are aliases to #each_line and #each_byte, respectively. + + * ext/win32ole/win32ole.c (fole_each): WIN32OLE#each: Return an + enumerator if no block is given. + + * ext/zlib/zlib.c (rb_gzreader_each_byte, rb_gzreader_each): + Zlib::GzipReader#{each,each_line,each_byte}: Return an + enumerator if no block is given. + + * ext/zlib/zlib.c (Init_zlib): Add Zlib::GzipReader#lines and + #bytes, which are aliases to #each_line and #each_byte, + respectively. + +Mon Apr 21 17:01:44 2008 Nobuyoshi Nakada + + * iseq.c (rb_iseq_compile_with_option): check if src is a string. + [ruby-core:16453] + +Mon Apr 21 16:06:47 2008 Yukihiro Matsumoto + + * enumerator.c (enumerator_init): preserve the method name in ID. + + * enumerator.c (enumerator_each): need not to call rb_to_id(). + + * enumerator.c (enumerator_with_index): ditto. + +Mon Apr 21 11:00:27 2008 Yukihiro Matsumoto + + * compile.c (defined_expr): capture exception during defined? + evaluation. a patch from wanabe in + [ruby-dev:34461]. [ruby-core:16010] + +Mon Apr 21 10:06:26 2008 Yukihiro Matsumoto + + * time.c: should include to refer errno. + +Mon Apr 21 09:58:04 2008 NAKAMURA Usaku + + * time.c (rb_strftime): check errno to detect strftime(3)'s error. + this is workaround for recent version of MSVCRT. + [ruby-dev:34456] + +Mon Apr 21 08:54:30 2008 NAKAMURA Usaku + + * gc.c (ruby_xmalloc): use size_t for malloc argument instead of long. + +Sun Apr 20 21:00:21 2008 Akinori MUSHA + + * enumerator.c, include/ruby/ruby.h: Export rb_cEnumerator. + +Sun Apr 20 20:47:50 2008 Akinori MUSHA + + * enumerator.c: Resolve the method every time an enumeration + method is run, not once when the enumerator is initialized as it + was before, so that method_missing() and method (re)definition + afterwards are both in effect; pointed out in: [ruby-core:16441] + +Sun Apr 20 15:11:00 2008 Tanaka Akira + + * io.c (copy_stream_rbuf_to_dst): removed. + (copy_stream_fallback_body): don't bypass write method. + (copy_stream_body): simplified. + +Sun Apr 20 15:01:25 2008 Nobuyoshi Nakada + + * vm_core.h (struct iseq_compile_data): moved label_no from + new_label_body(). + + * compile.c (iseq_set_exception_table): allocates catch_table only + when entries exist. + + * compile.c (struct iseq_link_element, struct iseq_insn_data): made + enum for debuggers. + +Sun Apr 20 14:44:45 2008 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): fix for splat in when and rescue. + a patch from wanabe in [ruby-dev:34429]. + [ruby-core:14537] + +Sun Apr 20 13:55:37 2008 Tanaka Akira + + * io.c (copy_stream_fallback): write directly (bypassing write method) + if possible. + +Sun Apr 20 12:49:03 2008 Tanaka Akira + + * io.c (copy_stream_fallback): read directly (bypassing readpartial + method) if possible. + +Sun Apr 20 04:45:13 2008 Tanaka Akira + + * io.c (copy_stream_body): use readpartial and write method for + non-IOs such as StringIO and ARGF. + +Fri Apr 18 20:57:33 2008 Yusuke Endoh + + * test/ruby/test_array.rb: add tests to achieve over 95% test coverage + of array.c. + +Fri Apr 18 17:37:48 2008 Nobuyoshi Nakada + + * gc.c (rb_gc_mark_locations): get rid of underflow. + + * gc.c (mark_current_machine_context): check if the main thread stack + position may shrink under the initialized position. [ruby-core:16436] + +Thu Apr 17 22:20:52 2008 Yusuke Endoh + + * enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): add + parentheses to remove warnings of gcc. + + * io.c (rb_io_getc): remove unused variables. + + * compile.c (NODE_NEXT, NODE_REDO): remove unused labels. + + * ext/nkf/nkf.c (rb_nkf_convert): remove unused variables. + + * ext/syck/rubyext.c (syck_resolver_initialize, + syck_resolver_detect_implicit, syck_emitter_emit): remove unused + variables. + +Thu Apr 17 20:12:47 2008 Yusuke Endoh + + * test/ruby/test_rubyoptions.rb (test_search): enable some assertions. + + * test/ruby/test_rubyoptions.rb: flunk message in win32. + +Thu Apr 17 16:07:12 2008 Nobuyoshi Nakada + + * test/ruby/test_rubyoptions.rb (ruby): run in C locale. + + * test/ruby/test_rubyoptions.rb (test_encoding): --encoding does not + affect source code. + +Thu Apr 17 00:45:41 2008 Yusuke Endoh + + * test/ruby/test_process.rb (test_rlimit_nofile): reset RLIMIT_NOFILE + before exit (for gcov). + + * test/ruby/test_rubyoptions.rb: new tests for option of ruby + interpreter, to achieve over 95% test coverage of ruby.c. + +Wed Apr 16 02:40:44 2008 Nobuyoshi Nakada + + * ruby.c (process_options): preludes and parser need to run in safe + level 0. [ruby-dev:34407] + +Wed Apr 16 02:26:27 2008 Nobuyoshi Nakada + + * ruby.c (process_options): dln_find_file returns the pointer to a + static buffer, so should copy it. [ruby-dev:34409] + +Tue Apr 15 23:08:46 2008 Kouhei Sutou + + * lib/xmlrpc/client.rb: fix cookie handling. [ruby-dev:34403] + + * test/xmlrpc/test_cookie.rb: add a test for the above fix. + +Tue Apr 15 19:20:14 2008 Yukihiro Matsumoto + + * io.c: #undef rb_argv moved before #define. + +Tue Apr 15 18:02:17 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_argv): replaced with rb_get_argv(). + [ruby-Bugs-19514] + +Tue Apr 15 17:10:59 2008 Kazuhiro NISHIYAMA + + * lib/net/http.rb, lib/net/smtp.rb, lib/net/pop.rb: update + URLs of Japanese documents. + +Tue Apr 15 16:45:14 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): add tests. + +Tue Apr 15 15:38:02 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-encoding-map): added shift-jis for older + versions. + + * misc/ruby-mode.el (ruby-mode-set-encoding): + coding-system-to-mime-charset is not a standard function. + [carbon-emacs:795] + fix for the case that magic comment exists but coding system is + absent. + + * misc/ruby-mode.el (ruby-mode): use write-contents-functions or + write-contents-hooks for older versions. + +Tue Apr 15 07:21:21 2008 Tadayoshi Funaba + + * complex.c (nucomp_div): [ruby-dev:34357] + + * complex.c (nucomp_abs): use hypot. + + * complex.c (nucomp_quo): do not force conversion. + + * test/ruby/test_complex.rb: omitted some meaningless tests. + +Mon Apr 14 23:25:50 2008 Yusuke Endoh + + * test/ruby/test_objectspace.rb: add a test for + ObjectSpace.count_objects. + +Mon Apr 14 22:44:24 2008 Yukihiro Matsumoto + + * file.c (SET_EXTERNAL_ENCODING): avoid call rb_enc_check() on + half-baked result string. + + * re.c (rb_reg_search): make search reentrant. [ruby-dev:34223] + + * test/ruby/test_parse.rb (TestParse::test_global_variable): + should preserve $& variable. + +Mon Apr 14 17:23:27 2008 Akinori MUSHA + + * hash.c (rb_hash_delete_if, rb_hash_reject_bang, env_delete_if, + env_reject_bang): Return an enumerator if no block is given. + +Mon Apr 14 14:33:59 2008 Nobuyoshi Nakada + + * compile.c, compile.h (compile_debug): made runtime option. + + * debug.c (ruby_debug_print_indent): returns if debug_level exceeds + the threshold. + + * debug.c (ruby_debug_printf): printf to stderr. + + * iseq.c (make_compile_option, make_compile_option_value): added + debug_level option. + + * vm_core.h (rb_compile_option_t): added debug_level. + + * vm_core.h (struct iseq_compile_data): added node_level. + +Mon Apr 14 12:52:25 2008 Nobuyoshi Nakada + + * gc.c (Init_stack): use ruby_init_stack. [ruby-dev:34350] + + * gc.c (rb_objspace_t): packed globals. [ruby-dev:34348] + + * gc.c (finalizers): removed. [ruby-dev:34349] + +Mon Apr 14 11:30:07 2008 Yukihiro Matsumoto + + * array.c (ary_new): new integer overflow check condition. + suggested by TOYOFUKU Chikanobu in + [ruby-dev:34156]. + + * array.c (rb_ary_initialize): ditto. + +Mon Apr 14 00:51:40 2008 Yusuke Endoh + + * test/ruby/test_parse.rb: add tests to achieve over 95% test coverage + of parse.y. + +Sun Apr 13 23:53:58 2008 Akinori MUSHA + + * enum.c (enum_cycle): Make Enumerable#cycle do a finite loop when + the number of cycles is specified. + + * array.c (rb_ary_cycle): Ditto for Array#cycle. + +Sun Apr 13 18:52:27 2008 Nobuyoshi Nakada + + * thread_pthread.c (lock_func): should not check interrupts in + blocking region. [ruby-dev:34378] + +Sat Apr 12 12:41:49 2008 Nobuyoshi Nakada + + * eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options): + use iseq instead of NODE. + + * gc.c (source_filenames): removed. + + * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, + ripper_initialize): rb_source_filename() is no longer used. + + * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, + parser_warn, e_option_supplied, warn_unless_e_option, range_op, + cond0): nd_file is no longer used. + +Sat Apr 12 12:17:31 2008 Yukihiro Matsumoto + + * prelude.rb (require_relative): move require_relative from + lib/require_relative.rb. [ruby-core:16356] + + * lib/require_relative.rb: removed. + +Sat Apr 12 05:55:57 2008 Eric Hodel + + * lib/rubygems*, test/rubygems*: Update to RubyGems 1.1.1 r1701. + +Sat Apr 12 03:13:38 2008 Nobuyoshi Nakada + + * file.c (file_expand_path): set external encoding. + + * file.c (rb_file_s_basename, rb_file_s_dirname, rb_file_s_extname): + copy encoding. + +Fri Apr 11 17:35:06 2008 Yukihiro Matsumoto + + * enum.c (count_i): modified to shut warning up. + +Fri Apr 11 17:25:09 2008 Akinori MUSHA + + * enum.c (count_i, count_iter_i, enum_count, enum_find_index): + Reduce code. + +Fri Apr 11 17:06:01 2008 Yukihiro Matsumoto + + * enum.c (find_index_i): modified to shut warning up. + + * enum.c (find_index_iter_i): ditto. + +Fri Apr 11 16:44:43 2008 Akinori MUSHA + + * enum.c (enum_find_index): Add support for find_index(obj); + [ruby-dev:34313]. + + * array.c (rb_ary_index): Define find_index as an alias to index. + +Fri Apr 11 16:42:33 2008 Yukihiro Matsumoto + + * lib/yaml/store.rb (YAML::load): modified to support empty + database. + +Fri Apr 11 08:05:12 2008 Yukihiro Matsumoto + + * marshal.c (w_object): add volatile to avoid potential GC bug. a + patch from Tomoyuki Chikanaga + in [ruby-dev:34312]. + +Thu Apr 10 23:08:52 2008 Yukihiro Matsumoto + + * lib/pstore.rb (PStore::dump, PStore::load): allow subclass + overriding. [ruby-dev:34305] + + * lib/yaml/store.rb (YAML::Store::marshal_dump_supports_canonical_option?): + add a method to support faster PStore. + +Thu Apr 10 20:36:45 2008 Akinori MUSHA + + * misc/rdebug.el, misc/README: Remove rdebug.el as per request + from the maintainer and mention the ruby-debug project at + RubyForge in README; bug#19043. + +Thu Apr 10 19:41:00 2008 Akinori MUSHA + + * eval.c (rb_f_loop): Mention StopIteration in the document. + +Thu Apr 10 19:23:55 2008 Akinori MUSHA + + * array.c (rb_ary_pop_m, rb_ary_shift_m): Update documents for + #pop() and #shift(). + + * array.c (rb_ary_slice_bang): Update document. Assigning + array[*args]= nil no longer removes elements. + +Thu Apr 10 16:58:44 2008 Tanaka Akira + + * marshal.c (w_object): TYPE_USERDEF assigns id for ivars first. + [ruby-dev:34159] by nagachika. + +Thu Apr 10 15:03:47 2008 Yukihiro Matsumoto + + * lib/generator.rb: removed obsolete library. [ruby-core:16233] + + * test/test_generator.rb: removed as well. [ruby-dev:34306] + + * lib/pstore.rb: replaced by Hongli Lai's faster version. + +Thu Apr 10 10:27:24 2008 Nobuyoshi Nakada + + * thread_pthread.c (native_sleep): sleep_cond is initialized at + creation. [ruby-Patches-19361]. + +Wed Apr 9 14:43:26 2008 Nobuyoshi Nakada + + * thread.c (lock_func): optimized and checks for interrupt_flag. + based on a patch from Sylvain Joyeux in [ruby-Patches-19361] and + [ruby-Patches-19362]. + +Wed Apr 9 12:12:01 2008 Nobuyoshi Nakada + + * test/ruby/test_thread.rb: new tests from Sylvain Joyeux in + [ruby-Patches-19361]. + +Tue Apr 8 21:36:40 2008 Nobuyoshi Nakada + + * thread.c (rb_mutex_sleep): ensures to re-acquire at waking up. + [ruby-Patches-19361] + +Tue Apr 8 11:00:14 2008 Yukihiro Matsumoto + + * lib/complex.rb: remove Math first before overwriting by CMath. + +Tue Apr 8 10:34:10 2008 Yukihiro Matsumoto + + * load.c (rb_require_safe): should check fname path after $SAFE is + properly set. [ruby-dev:34268] + + * re.c (rb_reg_quote): should always copy the quoting string. + [ruby-core:16235] + +Tue Apr 8 10:30:29 2008 Nobuyoshi Nakada + + * common.mk (prelude.c): depends on enc/prelude.rb. + + * enc/prelude.rb: fixed initial library names. + +Tue Apr 8 03:39:26 2008 Nobuyoshi Nakada + + * load.c (rb_provided): check expanded path for relative path + features, loading or loaded features are already expanded in 1.9. + + * variable.c (rb_autoload_load): no needs to check if provided before + rb_require_safe. [ruby-dev:34266] + +Mon Apr 7 22:41:21 2008 Tadayoshi Funaba + + * numeric.c: cancelled recent changes (except to remove rdiv). + + * bignum.c: ditto. + + * bignum.c: added rb_big_idiv. + +Mon Apr 7 15:51:31 2008 Nobuyoshi Nakada + + * encoding.c (enc_init_db): moved to enc/encdb.c. + + * transcode.c (init_transcoder_table): moved to enc/trans/transdb.c. + + * enc/depend (enc/encdb.o enc/trans/transdb.o): depend on + corresponding headers. + + * common.mk (COMMONOBJS): moved transcode.o from OBJS + +Mon Apr 7 12:26:32 2008 Koichi Sasada + + * bootstraptest/test_knownbug.rb: add a known-bug. + +Mon Apr 7 12:15:24 2008 Nobuyoshi Nakada + + * range.c (range_each_func): should not leave a variable + uninitialized, which could cause SEGV. + + * range.c (range_step): removed duplicated and unreachable code. + +Mon Apr 7 02:12:27 2008 Yukihiro Matsumoto + + * string.c (rb_str_intern): need not to check if tainted. + [ruby-dev:34219] + +Sun Apr 6 09:45:00 2008 Nobuyoshi Nakada + + * dir.c (dir_tell): check if closed. [ruby-core:16223] + +Sat Apr 5 23:17:20 2008 Tadayoshi Funaba + + * lib/cmath.rb: new. + + * lib/complex.rb: depends lib/cmath.rb. + + * lib/rational.rb: added rdiv. + + * complex.c: removed some math functions. + +Sat Apr 5 05:50:57 2008 Eric Hodel + + * lib/rdoc/parsers/parse_rb.rb: Fix uninitialized variable warnings. + + * lib/rdoc/generator/html.rb: ditto. + + * lib/rdoc/options.rb: Fix shadowed variable warning. + + * lib/webrick/httprequest.rb: Fix redefined method warning. + +Sat Apr 5 02:13:52 2008 Yukihiro Matsumoto + + * bignum.c (rb_cmpint): moved from compar.c, to check bignum + zero. + +Fri Apr 4 23:24:06 2008 NARUSE, Yui + + * re.c (rb_memsearch_qs): wrong boundary condition. + + * re.c (rb_memsearch_qs_utf8): ditto. + +Fri Apr 4 14:11:36 2008 Yukihiro Matsumoto + + * re.c (rb_memsearch_qs): wrong boundary condition. a patch from + wanabe in [ruby-dev:34248]. + +Fri Apr 4 05:57:11 2008 Yukihiro Matsumoto + + * lib/net/pop.rb (Net::POP3::do_finish): clear @n_mails and + @n_bytes as well. [ruby-core:16144] + +Fri Apr 4 01:59:30 2008 Yukihiro Matsumoto + + * range.c (range_step): add step for each iteration if begin and + end are numeric. [ruby-core:15990] + +Fri Apr 4 00:42:26 2008 Yukihiro Matsumoto + + * bignum.c (Init_Bignum): rdiv method removed. [ruby-dev:34242] + + * complex.c (nucomp_quo): ditto. + + * numeric.c (num_rdiv): ditto. + + * rational.c (nurat_div): ditto. + + * complex.c (nucomp_fdiv): fdiv implementation restored. + + * numeric.c (num_quo): RDoc updated. + +Thu Apr 3 21:51:45 2008 Tadayoshi Funaba + + * complex.c (nucomp_int_check): function for DRY real check. + + * complex.c (nucomp_{add,sub,mul,div,expt}): use rb_num_coerce_bin(). + +Thu Apr 3 19:59:42 2008 Nobuyoshi Nakada + + * insns.def (defineclass): check if cbase is a class or a module. + [ruby-core:16118] + +Thu Apr 3 14:42:11 2008 NAKAMURA Usaku + + * common.mk (INSNS): add insns_info.inc. + + * common.mk (INSNS): make incs separately for nmake. + +Thu Apr 3 13:20:38 2008 Nobuyoshi Nakada + + * common.mk (endb.h, transdb.h, prelude.c): depend on $(PREP) and + check if really changed. [ruby-core:16102] + + * Makefile.in, common.mk, configure.in, {win32,bcc32}/Makefile.sub + (MINIOBJS, ARCHMINIOBJS): separated. + +Thu Apr 3 09:00:45 2008 Nobuyoshi Nakada + + * compile.c (iseq_set_sequence, iseq_insns_unification, + insn_data_to_s_detail): constified. + + * iseq.c (insn_operand_intern, ruby_iseq_disasm_insn): ditto. + + * template/{insns_info,opt_sc,optunifs}.inc.tmpl: ditto. + + * tool/instruction.rb (OptUnifsIncGenerator): ditto. + +Thu Apr 3 08:46:09 2008 Yukihiro Matsumoto + + * range.c (range_include): add RDoc to describe that comparison + for numeric is done according magnitude of values. + [ruby-core:15907] + +Wed Apr 2 22:29:35 2008 Yukihiro Matsumoto + + * rational.c (nurat_int_check): function for DRY integer check. + + * numeric.c (num_rdiv): should always return rational number. + + * rational.c (nurat_add, nurat_sub, nurat_mul, nurat_fdiv, + nurat_cmp): use rb_num_coerce_bin(). + + * rational.c (nurat_division): does / and rdiv. + + * .gdbinit (rp): no longer use rb_p(). + +Wed Apr 2 06:52:31 2008 Yukihiro Matsumoto + + * .gdbinit (rp): supports rational and complex numbers. it's + cheating since it uses rb_p(). + +Wed Apr 2 06:24:06 2008 Yukihiro Matsumoto + + * include/ruby/node.h: add new constants for rb_call()'s scope. + + * eval.c (iterate_method): use CALL_* scope constant to specify + proper scope value. + + * eval.c (rb_each, rb_apply, rb_funcall, rb_funcall2, rb_funcall3): + ditto. + +Tue Apr 1 21:19:41 2008 Yukihiro Matsumoto + + * rational.c: need to include just once. + +Tue Apr 1 16:40:21 2008 Nobuyoshi Nakada + + * bignum.c (big2dbl): more precise conversion at edge cases. + [ruby-dev:34195] + +Tue Apr 1 14:43:38 2008 Nobuyoshi Nakada + + * configure.in: get rid of empty expansion. + + * configure.in: _setjmp is available but _longjmp is not on mingw. + +Tue Apr 1 09:41:22 2008 NAKAMURA Usaku + + * {bcc,win}32/Makefile (config.h): need to define RUBY_SETJMP, etc. + +Tue Apr 1 07:31:58 2008 Eric Hodel + + * lib/rubygems* test/rubygems*: Import RubyGems 1.1.0. + +Tue Apr 1 03:20:40 2008 Nobuyoshi Nakada + + * configure.in (RUBY_SETJMP, RUBY_LONGJMP, RUBY_JMP_BUF): prefers + _setjmp over setjmp and sigsetjmp. [ruby-core:16023] + __builtin_setjmp cannot handle a variable. + + * configure.in (--with-setjmp-type): new option to override the + default rule in the above. + + * eval_intern.h (ruby_setjmp, ruby_longjmp), gc.c (rb_setjmp), + vm_core.h (rb_jmpbuf_t): use RUBY_SETJMP, RUBY_LONGJMP and + RUBY_JMP_BUF. + +Tue Apr 1 01:55:52 2008 Nobuyoshi Nakada + + * lib/resolv.rb (Resolv::Config.default_config_hash): requires + win32/resolv to use Win32::Resolv. [ruby-dev:34138] + +Tue Apr 1 01:40:58 2008 Tadayoshi Funaba + + * complex.c: adopted the ruby's style. + + * rational.c: ditto. + +Tue Apr 1 00:17:35 2008 Tadayoshi Funaba + + * rational.c: revert. + +Mon Mar 31 18:57:36 2008 NAKAMURA Usaku + + * {bcc,win}32/Makefile.sub (config.h): define ssize_t. + + * io.c (copy_stream_body): some platform don't have O_NOCTTY. + +Mon Mar 31 18:42:41 2008 Nobuyoshi Nakada + + * configure.in: check for ssize_t. [ruby-dev:34184] + +Mon Mar 31 14:45:00 2008 Yukihiro Matsumoto + + * numeric.c (num_quo): should convert its operand to Rational. + + * rational.c (string_to_r_strict): should raise TypeError. + + * bignum.c (Init_Bignum): should not redefine Bignum#div. + Numeric#div will do. [ruby-dev:34066] + +Mon Mar 31 04:05:15 2008 NARUSE, Yui + + * io.c (io_getc): set coderange while getting characters. + +Sun Mar 30 23:16:49 2008 Yukihiro Matsumoto + + * proc.c (proc_dup): should copy is_lambda attribute as well. + [ruby-talk:296244] + +Sun Mar 30 15:33:29 2008 Tanaka Akira + + * io.c: IO.copy_stream implemented. [ruby-dev:33843] + + * thread.c (rb_fd_select): new function. + + * configure.in (sys/sendfile.h): check the header file. + (sendfile): check the function. + (pread): check the function. + +Sat Mar 29 14:18:41 2008 Hidetoshi NAGAI + + * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. + + * ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets' + instate/state/identify method to avoid the conflict with standard + widget options. Those methods are renamed to ttk_instate/ttk_state/ + ttk_identify (tile_instate/tile_state/tile_identify are available + too). Although I don't recommend, if you really need old methods, + please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before + "require 'tkextlib/tile'". + + * ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!" + is obsolete. It outputs warning. To control default widget set, + use "Tk.default_widget_set = :Ttk". + + * ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and + __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defined + as module methods of TkConfigMethod. It may help users to wrap old + Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets. + Ttk widgets don't have some options of standard widgets which are + control the view of widgets. When set ignore-mode true, configure + method tries to ignore such unknown options with no exception. + Of course, it may raise other troubles on the GUI design. + So, those are a little danger methods. + + * ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ + method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method + are defined as module methods of TkItemConfigMethod as the same + purpose as TkConfigMethod's ones. + + * ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for + wrapping old Ruby/Tk scripts (which use standard widgets) to use + Ttk (Tile) widgets as default. + + * ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state + method instead of instate/state method. + + * ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb, + ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's + are replaced to "instance_exec(self)". + + * ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not + a character code on Ruby1.9). + + * ext/tk/lib/tk/variable.rb: support new style of operation argument + on Tcl/Tk's 'trace' command for variables. + + * ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix + + * ext/tk/sample/demos-jp/textpeer.rb, + ext/tk/sample/demos-en/textpeer.rb: new widget demo. + + * ext/tk/tcltklib.c: decrease SEGV troubles (probably) + + * ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9 + + * ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably) + + * ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command + to make Tcl/Tk theme sources (based on different version of Tile + extension) available. + (Tk::Tile::__define_LoadImages_proc_for_compatibility__) + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames + (Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets + as toplevel widgets. + + * ext/tk/lib/tkextlib/tile/style.rb: ditto. + (Tk::Tile::Style.__define_wrapper_proc_for_compatibility__) + + * ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get + properties as a hash. metrics_hash method returns a boolean value + for 'fixed' option. But metrics method returns numeric value + (0 or 1) for 'fixed' option, because of backward compatibility. + + * ext/tk/lib/tk/timer.rb: sometimes fail to set callback procedure. + + * ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep + doesn't block the eventloop. It will be better to use the method + in event callbacks. + + * ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep. + +Thu Mar 27 20:44:22 2008 Tadayoshi Funaba + + * complex.c (f_lcm): removed. + + * rational.c (rb_lcm, rb_gcdlcm): added. + + * lib/complex.rb (gcd, lcm, gcdlcm): removed. + + * lib/rational.rb (gcd, lcm, gcdlcm): ditto. + +Wed Mar 26 18:11:26 2008 Yukihiro Matsumoto + + * variable.c (rb_mod_constants): rdoc updated. a patch from + Florian Gilcher in [ruby-core:16009]. + +Wed Mar 26 00:55:28 2008 Yusuke Endoh + + * test/ruby/test_rand.rb: add tests to achieve over 95% test coverage + of random.c. + +Wed Mar 26 00:28:55 2008 Yusuke Endoh + + * test/ruby/test_rational.rb: add tests to achieve over 90% test + coverage of rational.c. + + * test/ruby/test_complex.rb: ditto for complex.c. + +Tue Mar 25 19:34:05 2008 Yusuke Endoh + + * bootstraptest/test_knownbug.rb: add tests. [ruby-dev:34128] + +Tue Mar 25 19:09:04 2008 Yusuke Endoh + + * array.c (ary_new): fix size check. [ruby-dev:34123] + + * array.c (rb_ary_take, rb_ary_drop): check negative size and use + NUM2LONG instead of FIX2LONG. [ruby-dev:34123] + + * enum.c (enum_take, enum_drop): check negative size. + + * test/ruby/test_array.rb: add tests for above. + +Tue Mar 25 16:32:56 2008 Nobuyoshi Nakada + + * ruby.c (proc_options): checks if the word is empty. + + * ruby.c (process_options): typo fixed. [ruby-dev:34122] + +Tue Mar 25 15:26:30 2008 Nobuyoshi Nakada + + * compile.c (defined_expr): false short-circuit destination label may + be needed. [ruby-talk:295296] + + * compile.c (iseq_compile_each): put nil if false short-circuit is + created. + + * compile.c (compile_massign_opt): no need to use alloca. + +Mon Mar 24 19:23:52 2008 Akinori MUSHA + + * parse.y (debug_lines): Always prepare a new array for each + file's SCRIPT_LINES__ storage, instead of appending source lines + every time a file is re-loaded; submitted by Rocky Bernstein in + #18517. + +Mon Mar 24 10:25:54 2008 Nobuyoshi Nakada + + * configure.in: sitearch should use target_cpu. [ruby-core:15986] + +Sun Mar 23 02:51:57 2008 Tanaka Akira + + * process.c (rlimit_resource_value): use NUM2RLIM. + +Sun Mar 23 02:28:01 2008 Tadayoshi Funaba + + * complex.c: fixed. [ruby-dev:34109] + + * rational.c: ditto. + +Fri Mar 21 21:32:25 2008 Nobuyoshi Nakada + + * io.c (rb_f_gets, rb_f_readline, rb_f_readlines): delegates to ARGF + as well as puts and putc. [ruby-dev:34100] + +Fri Mar 21 21:26:52 2008 Nobuyoshi Nakada + + * lib/resolv.rb (Resolv::Hosts): should not use win32/resolv on cygwin. + [ruby-dev:29945], [ruby-dev:34095] + + * lib/win32/registry.rb (Win32::Registry.expand_environ): try upcased + name too for cygwin. [ruby-dev:29945] + + * lib/win32/resolv.rb (Win32::Resolv.get_hosts_path): use expand_path. + +Fri Mar 21 21:10:00 2008 Akinori MUSHA + + * lib/ipaddr.rb: Say that I am the current maintainer. + + * lib/set.rb: Ditto. + + * lib/shellwords.rb: Ditto. + + * ext/syslog/syslog.txt: Ditto. + +Fri Mar 21 09:24:28 2008 Nobuyoshi Nakada + + * instruby.rb (open_for_install): write block result and rewrite only + if changed from existing file. + +Fri Mar 21 08:29:33 2008 Tadayoshi Funaba + + * rational.c (nurat_to_f): rearrangement. + +Fri Mar 21 06:44:59 2008 Nobuyoshi Nakada + + * rational.c (nurat_to_f): C99. + +Fri Mar 21 01:40:27 2008 Yusuke Endoh + + * complex.c (nucomp_sub, nucomp_expt): call corresponding functions. + +Fri Mar 21 01:21:43 2008 Yusuke Endoh + + * missing/tgamma.c: include config.h before math.h. [ruby-dev:34075] + +Thu Mar 20 21:46:33 2008 Nobuyoshi Nakada + + * io.c (argf_getline): use receiver. + +Thu Mar 20 21:20:19 2008 Tadayoshi Funaba + + * rational.c: some improvements (include Shin-ichiro HARA's + effort). + + * complex.c: some improvements. + + * test/ruby/test_rational2.rb: new. + +Thu Mar 20 00:21:12 2008 Nobuyoshi Nakada + + * io.c (argf_initialize_copy): get rid of segfault. + + * io.c (argf_tell, argf_seek_m, argf_set_pos, argf_rewind, + argf_fileno, argf_to_io, argf_eofl, argf_getc, argf_getbyte, + argf_readchar, argf_readbyte, argf_each_line): use receiver. + +Wed Mar 19 23:52:41 2008 Nobuyoshi Nakada + + * io.c (rb_io_putc, rb_io_puts): output directly if the receiver is + rb_stdout to get rid of infinite recursion. [ruby-dev:34059] + +Wed Mar 19 22:27:41 2008 Tadayoshi Funaba + + * rational.c: added rb_gcd. + + * complex.c: use rb_gcd. + +Wed Mar 19 18:37:00 2008 Tadayoshi Funaba + + * complex.c: revert. + + * rational.c: revert. + +Wed Mar 19 17:31:20 2008 Yukihiro Matsumoto + + * eval_intern.h (TH_EXEC_TAG): need not to FLUSH_REGISTER_WINDOWS. + [ruby-core:15871], [ruby-dev:34088] + +Wed Mar 19 14:53:03 2008 Nobuyoshi Nakada + + * complex.c (nucomp_to_s, nucomp_inspect): get rid of making + unnecessary intermediate objects. + + * complex.c (make_patterns, string_to_c): do not treat successive + underscores as a part of numeric like as literals. [ruby-dev:34085] + + * rational.c (make_patterns, string_to_r): ditto. + +Wed Mar 19 14:36:40 2008 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): treat successive underscores as + nondigit. [ruby-dev:34089] + +Wed Mar 19 14:08:47 2008 Nobuyoshi Nakada + + * encoding.c (enc_check_encoding): should not load autoloaded encoding + directly, instead use rb_enc_find_index() which deal with alias and + replica. [ruby-core:15957] + +Wed Mar 19 11:49:47 2008 NAKAMURA Usaku + + * regint.h (include): include ruby.h instead of defines.h and config.h. + +Wed Mar 19 10:17:12 2008 Yukihiro Matsumoto + + * regint.h (CHECK_INTERRUPT_IN_MATCH_AT): add interrupt check + during match. [ruby-talk:295002] + +Tue Mar 18 16:24:53 2008 Nobuyoshi Nakada + + * parse.y (literal_concat_gen): bail out at different encoding. + +Tue Mar 18 04:00:27 2008 NARUSE, Yui + + * re.c (rb_memsearch_ss): simple shift search. + + * re.c (rb_memsearch_qs): quick search. + + * re.c (rb_memsearch_qs_utf8): quick search for UTF-8 string. + + * re.c (rb_memsearch_qs_utf8_hash): hash functions for above. + + * re.c (rb_memsearch): use above functions. + + * string.c (rb_str_index): give enc to rb_memsearch. + + * include/ruby/intern.h (rb_memsearch): move to encoding.h. + + * include/ruby/encoding.h (rb_memsearch): move from intern.h. + + * common.mk (PREP): add dependency. + +Mon Mar 17 22:23:54 2008 Yusuke Endoh + + * array.c (rb_ary_take, rb_ary_take_while, rb_ary_drop, + rb_ary_drop_while): new methods. [ruby-dev:34067] + + * test/ruby/test_array.rb: add tests for above. + +Mon Mar 17 17:11:13 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-mode): should use `run-mode-hooks' instead + of calling `run-hooks' directly to run the mode hook. patch from + Chiyuan Zhang in [ruby-core:15915] + +Mon Mar 17 16:41:08 2008 Nobuyoshi Nakada + + * configure.in: unset GREP_OPTIONS. [ruby-core:15918] + +Sun Mar 16 18:07:07 2008 Martin Duerst + + * enc/trans/utf_16_32.c: bug fix (some invalid UTF-8 sequences + were legal) + + * test/ruby/test_transcode.rb: test for above bug + +Sun Mar 16 17:28:07 2008 NARUSE, Yui + + * common.mk (LIBRUBY_SO): add dependency to $(BUILTIN_ENCOBJS). + +Sun Mar 16 08:51:41 2008 Tadayoshi Funaba + + * include/ruby/intern.h: added some declarations. + + * include/ruby/ruby.h: ditto. + + * common.mk: added some entries. + + * configure.in: added a check for signbit. + + * lib/complex.rb: nearly all of core definitions have been removed. + + * lib/rational.rb: ditto. + + * lib/mathn.rb: some trivial adjustments. + + * complex.c: new. + + * rational.c: ditto. + + * numeric.c (flo_{quo,rdiv}, fix_fdiv): added. + + * numeric.c ({num,int}_{numerator,denominator}): ditto. + + * bignum.c (rb_big_fdiv): ditto. + + * numeric.c (fix_{quo,pow}): now may yield rational number. + + * bignum.c (rb_big_{quo,pow}): ditto. + + * numeric.c (rb_{int,flo}_induced_from): now can accept rational. + + * gc.c (gc_mark_children, obj_free): now detects complex and rational. + + * inits.c (rb_call_inits): now calls Init_{Complex,Rational}. + + * test/ruby/test_complex.rb: new. + + * test/ruby/test_rational.rb: ditto. + +Sat Mar 15 17:48:48 2008 Yukihiro Matsumoto + + * encoding.c (rb_enc_associate_index): pass unnecessary enc_capable(). + + * string.c (rb_str_cmp): reduce invocation of rb_enc_compatible(). + +Fri Mar 14 17:04:43 2008 Nobuyoshi Nakada + + * include/ruby/ruby.h (inttypes.h): includes always if available. + + * string.c, ext/digest/defs.h: moved inttypes.h to ruby.h. + +Fri Mar 14 16:59:23 2008 Nobuyoshi Nakada + + * configure.in (RUBY_LIB_PREFIX): fix for prefix. + +Fri Mar 14 16:35:11 2008 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::Cookie::initialize): performance patch from + Makoto Kuwata in [ruby-dev:34048]. + +Fri Mar 14 15:49:05 2008 Nobuyoshi Nakada + + * configure.in (RUBY_LIB_PREFIX): use libdir. + +Fri Mar 14 14:24:15 2008 Nobuyoshi Nakada + + * ext/digest/defs.h: inttypes.h is still needed. + +Fri Mar 14 11:34:12 2008 NAKAMURA Usaku + + * {bcc,win}32/Makefile.sub: follow below changes. + +Fri Mar 14 11:24:30 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-encoding-map, ruby-use-encoding-map): added + to customize. + +Fri Mar 14 10:37:15 2008 NARUSE, Yui + + * configure.in (int8_t, uint8_t, int16_t, uint16_t int32_t, + uint32_t int64_t, uint64_t, int128_t, uint128_t, + intptr_t, uintptr_t): check if defined. + + * win32/Makefile.sub: follow configure.in. + + * ext/digest/defs.h: remove checks for uint8_t, uint32_t and uint64_t. + +Fri Mar 14 10:12:29 2008 Nobuyoshi Nakada + + * configure.in (RUBY_CHECK_VARTYPE): should not indent preprocessor + directives. + +Fri Mar 14 10:03:59 2008 Nobuyoshi Nakada + + * string.c (UNALIGNED_WORD_ACCESS): IA64 cannot access unaligned word. + +Thu Mar 13 21:00:50 2008 Yukihiro Matsumoto + + * array.c (rb_ary_slice_bang): should not use rb_ary_subseq() + which shares internal pointer. splice modifies the receiver + right after subseq. [ruby-dev:34005] + + * bootstraptest/test_struct.rb: some test moved from test to shut + warning up. + +Thu Mar 13 19:42:43 2008 NAKAMURA Usaku + + * {bcc,win}32/Makefile.sub (config.h): define uint32_t. + +Thu Mar 13 14:14:19 2008 Nobuyoshi Nakada + + * trunk/configure.in (AC_CHECK_HEADERS): stdint.h is not needed to + check. + + * trunk/configure.in (rb_cv_type_uint32_t): unquoted. [ruby-dev:34030] + + * trunk/string.c (hash): use inttypes.h instead of stdint.h. + +Thu Mar 13 10:42:46 2008 Yukihiro Matsumoto + + * numeric.c (fix_divmod): should return integer division. [ruby-dev:34006] + + * enum.c (zip_ary): wrong boundary condition. + + * test/ruby/test_numeric.rb (TestNumeric::test_num2long): bit-and + should not raise RangeError. + +Thu Mar 13 03:12:48 2008 Yukihiro Matsumoto + + * lib/irb/cmd/help.rb: should be updated for new ri structure. + [ruby-core:15825] + + * lib/rdoc/ri/driver.rb (RDoc::initialize): allow options to be optional. + + * lib/rdoc/ri/driver.rb (RDoc::class_cache): map_dirs may be + empty. + + * lib/rdoc/ri/driver.rb (RDoc::get_info_for): revive get_info_for + method. maybe broken. + + * lib/rdoc/ri/util.rb (RDoc::initialize): should not use RiError + no more. + +Thu Mar 13 01:45:25 2008 Nobuyoshi Nakada + + * configure.in (stdint.h): check if presence. + + * configure.in (uint32_t): check if defined. + + * string.c (hash): fix for portability. [ruby-dev:34020] + +Wed Mar 12 17:33:34 2008 Nobuyoshi Nakada + + * object.c (rb_cstr_to_dbl): fix for a mere underscore. + +Wed Mar 12 14:47:07 2008 Nobuyoshi Nakada + + * eval_intern.h (rb_thread_raised_set): use generic flags. + + * eval.c (rb_longjmp): clear all raised flags. + + * eval.c (stack_check): leave clearing flag to rb_longjmp. + + * gc.c (rb_memerror): use thread raised flag instead of static flag. + +Tue Mar 11 23:38:39 2008 Yukihiro Matsumoto + + * array.c (rb_ary_combination): argument check before creating + Enumerator. + + * array.c (rb_ary_permutation): ditto. + + * enum.c (enum_zip): optimize if all arguments are arrays. + +Tue Mar 11 19:48:09 2008 Nobuyoshi Nakada + + * numeric.c (fix_coerce): try conversion before type check. + [ruby-core:15838] + +Tue Mar 11 12:39:53 2008 Nobuyoshi Nakada + + * common.mk (clean-local): WINMAINOBJ is Windows specific. + +Tue Mar 11 10:19:10 2008 Yukihiro Matsumoto + + * string.c (hash): replaced by MurmurHash described in + . + +Tue Mar 11 09:52:49 2008 Yukihiro Matsumoto + + * string.c (rb_str_comparable): empty strings in any encoding are + compatible each other. + +Tue Mar 11 00:46:29 2008 Yukihiro Matsumoto + + * ruby.c (usage): remove some unimportant lines to fit -h message + in a page. [ruby-dev:34018] + +Mon Mar 10 17:11:00 2008 Yukihiro Matsumoto + + * eval.c (rb_f_local_variables): local_variables should return an + array of symbols. [ruby-dev:34008] + + * vm.c (collect_local_variables_in_env): ditto. + +Mon Mar 10 15:53:48 2008 Nobuyoshi Nakada + + * version.c (MKSTR): make US-ASCII. [ruby-dev:34010] + +Mon Mar 10 02:08:21 2008 NARUSE, Yui + + * string.c (rb_str_index): if t == s + pos, the character beginning + from s + pos is valid. + +Sun Mar 9 13:51:21 2008 Eric Hodel + + * lib/rdoc/generator.rb: Restore missing line to #params. Patch by + Lincoln Stoll + +Sun Mar 9 09:52:00 2008 Eric Hodel + + * lib/rdoc/code_objects.rb: Remove debugging Kernel#p. Patch by + Lincoln Stoll + * lib/rdoc/generator/html.rb: Fully qualify AllReferences. Patch by + Lincoln Stoll + * lib/rdoc/ri/writer.rb: Fix 1.8 backwards compatibility. + +Sat Mar 8 18:50:57 2008 Nobuyoshi Nakada + + * file.c (isdirsep): backslash is valid path separator on cygwin too. + +Sat Mar 8 06:53:48 2008 NARUSE, Yui + + * string.c (search_nonascii): Use VALUE instead of unsigned long + because VALUE can be the fastest unsigned integer type. + On LLP64 unsigned long isn't the fastest. + * string.c (str_strlen): ditto. + * string.c (str_utf8_nth): ditto. + * string.c (count_utf8_lead_bytes_with_ulong): ditto. + + * string.c (count_utf8_lead_bytes_with_word): renamed. + +Fri Mar 7 21:27:43 2008 Yusuke Endoh + + * bignum.c: fix indent. + +Fri Mar 7 21:12:19 2008 Yusuke Endoh + + * bignum.c (power_cache_init, power_cache_get_power0, Init_Bignum): + delayed initializing power cache per base. [ruby-dev:34003] + +Fri Mar 7 20:30:05 2008 Nobuyoshi Nakada + + * cont.c (cont_restore_0): fixed typo. [ruby-core:15821] + +Fri Mar 7 19:56:10 2008 Nobuyoshi Nakada + + * lib/mkmf.rb: rdoc added. [ruby-Patches-9762] + +Thu Mar 6 17:26:53 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): space flag is in effect for Inf/NaN too. + [ruby-dev:34002] + +Thu Mar 6 15:44:20 2008 NAKAMURA Usaku + + * sprintf.c (rb_str_format): casting double to long is undefined + if the integer part of double is out of the range of long. + +Thu Mar 6 15:11:40 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): ignore 0 flag for NaN and Inf. + [ruby-dev:33994] + +Thu Mar 6 15:05:25 2008 NAKAMURA Usaku + + * {bcc32,win32}/Makefile.sub (RUNRUBY): use $(PROGRAM) instead of + ruby$(EXEEXT). + suggested by KIMURA Koichi . + [ruby-dev:34000] + +Thu Mar 6 14:46:08 2008 Tanaka Akira + + * missing/lgamma_r.c (loggamma): return 0 for 1 and 2. + + * test/ruby/test_math.rb: accept errors by functions under missing/. + +Thu Mar 6 14:29:44 2008 NARUSE, Yui + + * transcode.c (rb_str_transcode_bang): set coderange. + + * transcode.c (rb_str_transcode): use rb_str_transcode_bang. + +Thu Mar 6 14:00:10 2008 Tanaka Akira + + * include/ruby/missing.h (cbrt): add declaration. + +Thu Mar 6 11:14:14 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-add-log-current-method): use ruby style + method name format. + +Thu Mar 6 11:12:29 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): no need of loop. + +Thu Mar 6 08:30:42 2008 Yukihiro Matsumoto + + * object.c (rb_mod_freeze): call rb_class_name() directly. + [ruby-core:15802] + +Thu Mar 6 04:32:06 2008 NARUSE, Yui + + * string.c (count_utf8_lead_bytes_with_ulong): fix shift size. + [ruby-dev:33993] + + * string.c (str_utf8_nth) fix wrong counting. + +Thu Mar 6 00:34:00 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): size_t returned from strlen() can be + unsigned. + +Thu Mar 6 00:31:39 2008 Nobuyoshi Nakada + + * struct.c (make_struct): preserve encoding of struct name. + +Wed Mar 5 22:49:20 2008 NARUSE, Yui + + * string.c (is_utf8_lead_byte, count_utf8_lead_bytes_with_ulong): + defined for UTF-8 optimization. + + * string.c (str_strlen): use is_utf8_lead_byte and + count_utf8_lead_bytes_with_ulong. + + * string.c (str_utf8_nth) ditto. + +Wed Mar 5 17:53:01 2008 Nobuyoshi Nakada + + * file.c (rb_file_flock): returns false on EAGAIN if non-blocking. + [ruby-core:15795] + +Wed Mar 5 17:43:43 2008 Martin Duerst + + * transcode.c (transcode_loop): Adjusted detection of invalid + (ill-formed) UTF-8 sequences. Fixing potential security issue, see + http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes. + + * test/ruby/test_transcode.rb: Added two tests for above fix. + +Wed Mar 5 14:00:49 2008 Yukihiro Matsumoto + + * numeric.c (fix_to_s): avoid rb_scan_args() when no argument + given. + * bignum.c (rb_big_to_s): ditto. + * enum.c (enum_first): ditto. + * eval_jump.c (rb_f_catch): ditto. + * io.c (rb_obj_display): ditto. + * class.c (rb_obj_singleton_methods): ditto. + * object.c (rb_class_initialize): ditto. + * random.c (rb_f_srand): ditto. + * range.c (range_step): ditto. + * re.c (rb_reg_s_last_match): ditto. + * string.c (rb_str_to_i): ditto. + * string.c (rb_str_each_line): ditto. + * string.c (rb_str_chomp_bang): ditto. + * string.c (rb_str_sum): ditto. + + * string.c (str_modifiable): declare inline. + * string.c (str_independent): ditto. + +Wed Mar 5 11:50:32 2008 Yukihiro Matsumoto + + * lib/debug.rb: require 'continuation' to implement "restart" + command. [ruby-dev:33992] + + * lib/debug.rb (Context::debug_command): remove local variable + shadowing to shut up warnings. [ruby-dev:33992] + + * lib/debug.rb (Context::display_list): ditto. + + * lib/debug.rb (Context::resume): ditto. + + * lib/debug.rb (Context::get_thread): no longer use #index for Hash. + +Tue Mar 4 21:35:59 2008 Yukihiro Matsumoto + + * lib/irb.rb (IRB::Irb::eval_input): SyntaxError should not be + considered as IRB bug. [ruby-dev:33991] + + * lib/irb/workspace.rb (IRB::WorkSpace::filter_backtrace): should + filter 'irb.rb' as well for context mode 2 and 3. + +Tue Mar 4 19:10:43 2008 Yukihiro Matsumoto + + * hash.c (rb_hash_aset): should not copy key string when + compare_by_identity is set. [ruby-dev:33604] + + * hash.c (hash_equal): two hash tables are different when internal + comparison table differ. [ruby-dev:33989] + +Tue Mar 4 16:29:06 2008 Yukihiro Matsumoto + + * parse.y (parser_yylex): disallow non digits '0o' expression. + +Tue Mar 4 14:35:12 2008 NARUSE, Yui + + * io.c (open_key_args): use rb_io_open_with_args instead of rb_f_open. + [ruby-core:15763] + +Tue Mar 4 13:41:46 2008 Tanaka Akira + + * gc.c (add_heap): fix previous change. [ruby-dev:33988] + +Tue Mar 4 10:21:03 2008 Nobuyoshi Nakada + + * gc.c (add_heap): use binary search to find the place to insert the + new heap slot. [ruby-dev:33983] + +Tue Mar 4 05:30:31 2008 NARUSE, Yui + + * io.c (open_key_args): use rb_io_open instead of rb_f_open. + [ruby-core:15746] + +Mon Mar 3 23:28:37 2008 GOTOU Yuuzou + + * lib/webrick/httpservlet/filehandler.rb: should normalize path + separators in path_info to prevent directory traversal + attacks on DOSISH platforms. + reported by Digital Security Research Group [DSECRG-08-026]. + + * lib/webrick/httpservlet/filehandler.rb: pathnames which have + not to be published should be checked case-insensitively. + +Mon Mar 3 17:25:45 2008 Yukihiro Matsumoto + + * gc.c (add_heap): sort heaps array in ascending order to use + binary search. + + * gc.c (is_pointer_to_heap): use binary search to identify object + in heaps. works better when number of heap segments grow big. + +Mon Mar 3 17:15:09 2008 Yukihiro Matsumoto + + * re.c (rb_reg_regsub): remove too strict encoding check. + [ruby-dev:33966] + +Mon Mar 3 16:14:24 2008 Nobuyoshi Nakada + + * hash.c (rb_any_hash): shrinks all results in Fixnum range. + [ruby-core:15713] + +Sun Mar 2 23:03:59 2008 Nobuyoshi Nakada + + * io.c (rb_io_ungetc): reduce redundant call. + +Sun Mar 2 10:13:12 2008 Nobuyoshi Nakada + + * ruby.c (load_file): parse shebang in us-ascii. a patch from + sheepman in [ruby-dev:33955] + +Sun Mar 2 00:08:10 2008 Nobuyoshi Nakada + + * object.c (rb_cstr_to_dbl): check for successive underscores. + [ruby-dev:33952] + +Sat Mar 1 17:59:01 2008 Nobuyoshi Nakada + + * io.c (struct argf): packed ARGF stuffs. + + * ruby.c (proc_options): use ruby_set_inplace_mode(). + +Sat Mar 1 17:51:34 2008 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (recursive_collect): do not always + include all test_*.rb. + +Sat Mar 1 14:14:17 2008 Yukihiro Matsumoto + + * development snapshot 1.9.0-1 released. + +Sat Mar 1 13:46:26 2008 Yukihiro Matsumoto + + * tool/make-snapshot: make prereq uses MINIRUBY. + + * tool/make-snapshot: allow packaging like 1.9.0-1 by second + command-line argument. + +Sat Mar 1 13:11:03 2008 Tanaka Akira + + * test/ruby/allpairs.rb: new file for all pairs method. + + * test/ruby/test_m17n_comb.rb: use allpairs.rb to reduce test cases. + + * test/ruby/test_sprintf_comb.rb: ditto. + +Sat Mar 1 12:34:21 2008 Yukihiro Matsumoto + + * string.c (sym_inspect): use rb_str_inspect() instead of + rb_str_dump(). [ruby-dev:33946] + +Sat Mar 1 12:15:42 2008 Yukihiro Matsumoto + + * eval_method.c (rb_get_method_body): ent->method may be freed by + GC. [ruby-dev:31819] + + * thread.c (remove_event_hook): should not access freed memory. + [ruby-dev:31820] + +Sat Mar 1 10:31:19 2008 NARUSE, Yui + + * io.c (read_all, rb_io_getline_fast): encoding is io_input_encoding. + +Sat Mar 1 10:09:40 2008 Nobuyoshi Nakada + + * string.c (tr_setup_table, rb_str_split_m, rb_str_chomp_bang): + simplified with rb_enc_ascget(). [ruby-dev:33944] + +Sat Mar 1 10:01:30 2008 Yukihiro Matsumoto + + * string.c (rb_str_coderange_scan_restartable): should not return + offset in the middle of a character. + + * string.c (rb_str_coderange_scan_restartable): should not return + invalid cr value. + +Sat Mar 1 09:36:08 2008 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): "%#.0o" should keep prefix where + "%#.0x" should not. + +Sat Mar 1 02:35:08 2008 Nobuyoshi Nakada + + * bignum.c (big2str_find_n1): check integer overflow. + +Sat Mar 1 00:29:07 2008 Nobuyoshi Nakada + + * encoding.c (rb_enc_dummy_p): bootstrap encodings can not be dummy. + + * encoding.c (rb_enc_ascget): no needs to call rb_enc_precise_mbclen() + twice. + +Fri Feb 29 23:14:38 2008 Yukihiro Matsumoto + + * test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_chomp): test + updated. + +Fri Feb 29 20:58:09 2008 Yukihiro Matsumoto + + * test/ruby/test_iterator.rb (TestIterator::test_enumerator): + adjust test for zip behavior reversion. + +Fri Feb 29 20:25:07 2008 Yukihiro Matsumoto + + * string.c (rb_str_chomp_bang): now works on UTF-16. + + * string.c (tr_setup_table): negation should work on non ASCII + compatible strings as well. + + * string.c (rb_str_split_m): awk split should work on non ASCII + compatible strings as well. + +Fri Feb 29 18:08:43 2008 Yukihiro Matsumoto + + * time.c (time_strftime): format should be ascii compatible. + + * parse.y (rb_intern3): non ASCII compatible symbols. + + * re.c (rb_reg_regsub): add encoding check. + + * string.c (rb_str_chomp_bang): ditto. + + * test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception. + +Fri Feb 29 15:16:31 2008 Yukihiro Matsumoto + + * string.c (rb_str_rpartition): calculation was done in byte indexing. + + * test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_start_with): + allow start_with? matching on broken strings. + +Fri Feb 29 15:12:43 2008 Nobuyoshi Nakada + + * parse.y (opt_block_param): command can start just after block param + definition. [ruby-list:44479] + +Fri Feb 29 03:22:19 2008 NARUSE, Yui + + * test/ruby/test_time.rb (test_readers): fix typo. + (test_strftime): "UTC" is also ok for time.gmtime.strftime("%Z"). + +Fri Feb 29 02:50:07 2008 NARUSE, Yui + + * string.c (str_new): remove encoding assumption of empty string. + + * hash.c ( rb_f_getenv, env_fetch, env_inspect): result of ENV should + be always ASCII-8BIT. + + * object.c (nil_to_s): nil.to_s should be US-ASCII. + +Fri Feb 29 02:24:22 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: forgot to update RELEASE_DATE + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/text.rb, + ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: remove adhoc check + of Ruby's features (use existence of some classes instead of + comparing with RUBY_VERSION) + + * ext/tk/lib/tk/root.rb, ext/tk/lib/tk/autoload.rb: make TkRoot + (Tk::Root) unswitchable + + * ext/tk/lib/multi-tk.rb: partial bug fix (still not work!!) + +Thu Feb 28 23:37:12 2008 Tanaka Akira + + * lib/open-uri.rb (OpenURI::Meta#meta_setup_encoding): use ASCII-8BIT + for charset unspecified non-text data. + +Thu Feb 28 22:19:14 2008 NARUSE, Yui + + * encoding.c (enc_capable): IMMEDIATE_P doesn't include Qnil and Qfalse. + use SPECIAL_CONST_P. + +Thu Feb 28 19:45:52 2008 NARUSE, Yui + + * encoding.c (enc_find): check type of argument and convert to String + if it is StringValue. [ruby-cvs:22866] + +Thu Feb 28 18:07:52 2008 Tanaka Akira + + * lib/open-uri.rb (OpenURI::Meta#meta_setup_encoding): setup encoding + by charset. + (OpenURI::Meta#meta_add_field): call meta_setup_encoding when + content-type. + +Thu Feb 28 15:29:12 2008 NARUSE, Yui + + * io.c (rb_io_getline_fast): scan coderange. + +Thu Feb 28 14:36:46 2008 NARUSE, Yui + + * string.c (rb_enc_str_copy): removed. + +Thu Feb 28 13:51:59 2008 Nobuyoshi Nakada + + * eval.c (stack_check): made flag per threads. + + * thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed. + +Thu Feb 28 11:43:56 2008 Nobuyoshi Nakada + + * file.c (rb_file_flock): immediately returns on EAGAIN if + non-blocking. [ruby-core:15672] + +Thu Feb 28 11:23:50 2008 Nobuyoshi Nakada + + * io.c (rb_io_getline_1): get rid of segfault. [ruby-dev:33938] + +Thu Feb 28 11:19:51 2008 Nobuyoshi Nakada + + * string.c (rb_str_reverse_bang): removed unused variables. + + * include/ruby/encoding.h (rb_str_coderange_scan_restartable): added + prototype. + + * string.c (rb_str_coderange_scan_restartable, rb_str_times): removed + unused variables. + + * string.c (rb_str_reverse_bang): ditto + + * string.c (rb_enc_str_copy): unused now. may be used in future? + +Thu Feb 28 03:03:32 2008 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb, ext/tk/lib/*: make default widget set + switchable between Tk (standard Tcl/Tk widget set) and + Ttk (Tile). Initial default widget set is Tk. Now, toplevel + widget classes are removed and defined as aliases. + For example, "TkButton" is an alias of the "Tk::Button" class. + Those aliases are replaced when switching default widget set. + "Tk.default_widget_set=" is the method for switching default + widget set. "Tk.default_widget_set = :Ttk" defines Ttk (Tile) + widget set as default. It means that "TkButton" denotes + "Tk::Tile::Button" class. And then, "TkButton.new" creates + a Tk::Tile::Button widget. Of course, you can back to use + standard Tk widgets as the default widget set by calling + "Tk.default_widget_set = :Tk", whenever you want. Based on + the feature, you can use Ttk widget styling engine on your + old Ruby/Tk application without modifying its source, if you + don't use widget options unsupported on Ttk widgets (At first, + call "Tk.default_widget_set = :Ttk", and next load and run + your application). + This is one step for supporting Tcl/Tk8.5 features. + +Wed Feb 27 22:55:42 2008 NARUSE, Yui + + * string.c (rb_str_coderange_scan_restartable): coderange scanning + for partial read. + + * io.c (read_all): set coderange when not convert encoding. + +Wed Feb 27 03:55:58 2008 Nobuyoshi Nakada + + * ext/extmk.rb, enc/make_encmake.rb: load current mkmf.rb even if + cross-compiling. + + * ext/extmk.rb, enc/make_encmake.rb, lib/mkmf.rb: need to be 1.8 + compatible for cross-compiling. + +Tue Feb 26 16:53:13 2008 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-calculate-indent): should distinguish + comment and # in strings. [ruby-dev:33874] + +Tue Feb 26 16:41:27 2008 Nobuyoshi Nakada + + * array.c (combi_len, rb_ary_product): check for overflow. + [ruby-Bugs-18355] + +Tue Feb 26 16:38:10 2008 Nobuyoshi Nakada + + * array.c (recursive_cmp): compare minimal length parts. + +Tue Feb 26 16:06:00 2008 Technorama Ltd. + + * ext/openssl/ossl_{ec,dh,dsa,rsa}.c: Remove useless warnings. + + * ext/openssl/ossl_asn1.c: Simplify code. + + * ext/openssl/ossl_ssl_session.c Fix compiler warnings. + Undefine #id if SSL_SESSION_get_id is not supported. + +Tue Feb 26 15:50:10 2008 Nobuyoshi Nakada + + * parse.y (value_expr_gen): removed inappropriate warning. + [ruby-core:15660] + +Tue Feb 26 15:43:42 2008 Tanaka Akira + + * parse.y (tokadd_escape): refactored. [ruby-core:15657] + +Tue Feb 26 15:30:36 2008 Nobuyoshi Nakada + + * array.c (rb_ary_eql, rb_ary_cmp): get rid of stack overflow with + self-recursive constructs. [ruby-Bugs-18356] + +Tue Feb 26 01:16:01 2008 Tanaka Akira + + * include/ruby/ruby.h (ROBJECT_NUMIV): renamed from ROBJECT_LEN. + (ROBJECT_IVPTR): renamed from ROBJECT_PTR. + + * variable.c: follow the above renaming. + + * object.c: ditto. + + * gc.c: ditto. + + * marshal.c: ditto. + +Mon Feb 25 17:30:29 2008 Technorama Ltd. + + * ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb: + Commit patch #9280 from Akinori MUSHA. + Simplify the OpenSSL::Digest class and make use of the + existing Digest framework. + Enhance performance. + +Mon Feb 25 15:33:29 2008 NAKAMURA Usaku + + * bignum.c (big2str_karatsuba): initialize cache if not initialized. + + * bignum.c (Init_Bignum): delayed initializing cache. + [ruby-dev:33930] + +Mon Feb 25 13:40:03 2008 Tanaka Akira + + * process.c (Init_process): share bignum objects for RLIM_INFINITY, + RLIM_SAVED_MAX and RLIM_SAVED_CUR if they are equal. + +Mon Feb 25 10:41:41 2008 Martin Duerst + + * encoding.c (Encoding#dummy): minor grammatical fixes + in rdoc documentation. + +Mon Feb 25 00:01:03 2008 Nobuyoshi Nakada + + * cygwin/GNUmakefile.in (clean-local): should be double-colon. + +Sun Feb 24 23:39:59 2008 Nobuyoshi Nakada + + * common.mk, {bcc,win}32/Makefile.sub (clean-local): remove + intermediate files. + + * cygwin/GNUmakefile.in (clean-local): remove def file. + +Sun Feb 24 06:49:12 2008 Nobuyoshi Nakada + + * debug.c (ruby_set_debug_option): separated ruby_each_words(). + + * util.c (ruby_each_words): extracted from ruby_set_debug_option(). + + * ruby.c (enable_option, disable_option): allow all for all known + features. + + * ruby.c (proc_options): generalized enable/disable options. + + * ruby.c (ruby_init_gems): take enabled flag. [ruby-core:14840] + + * ruby.c (process_options): added --disable-rubyopt flag. + + * include/ruby/util.h (ruby_each_words): prototype. + +Sun Feb 24 05:25:26 2008 Nobuyoshi Nakada + + * ruby.c (proc_options): check if argument for -E exists. + +Sun Feb 24 05:09:43 2008 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-label-indent): fix for labels inside + blocks in switch. + +Sun Feb 24 03:52:58 2008 Nobuyoshi Nakada + + * util.c (valid_filename): use O_EXCL to get rid of clobbering + existing files in race conditions. + +Sat Feb 23 21:36:13 2008 NAKAMURA Usaku + + * ext/win32ole/win32ole.c (ole_init_cp): should return value. + +Sat Feb 23 20:16:05 2008 NARUSE, Yui + + * string.c (str_sublen): removed. + + * string.c (rb_str_reverse, rb_str_reverse_bang): use + single_byte_optimizable. + +Sat Feb 23 19:25:18 2008 NARUSE, Yui + + * string.c (rb_enc_cr_str_copy_for_substr): renamed from + rb_enc_cr_str_copy. + + * string.c: use rb_enc_cr_str_copy_for_substr and keep coderange. + +Sat Feb 23 18:50:17 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_encoding2cp): remove US-ASCII + mapping. + +Sat Feb 23 01:09:47 2008 Tanaka Akira + + * process.c (rlimit_resource_type): new function. + (rlimit_resource_value): new function. + (proc_getrlimit): use rlimit_resource_type to accept + symbol and string as resource type. + (proc_setrlimit): use rlimit_resource_type and rlimit_resource_value + to accept symbol and string as resource type and values. + +Fri Feb 22 21:12:42 2008 NARUSE, Yui + + * string.c (rb_enc_cr_str_copy): check string's coderange is 7bit or + valid. + +Fri Feb 22 19:50:19 2008 Nobuyoshi Nakada + + * bignum.c (BIGZEROP): fix for longer Bignum zeros. [ruby-Bugs-17454] + +Fri Feb 22 15:47:36 2008 Tanaka Akira + + * encoding.c (rb_enc_mbclen): return minlen instead of 1 when + a character is not found properly. + + * string.c (rb_enc_strlen): round up string length with fixed + multibyte encoding such as UTF-32. + (rb_enc_strlen_cr): ditto. + (rb_str_substr): fix substring with fixed multibyte encoding. + (rb_str_justify): check number of characters. + +Fri Feb 22 12:11:12 2008 NARUSE, Yui + + * string.c (rb_str_inspect): string of ascii incompatible encoding + should be escaped and returned as US-ASCII encoding. + +Fri Feb 22 11:16:55 2008 NARUSE, Yui + + * string.c (rb_str_substr): copy encoding although empty string. + +Fri Feb 22 04:48:22 2008 NARUSE, Yui + + * string.c (rb_str_times): empty string's coderange is CODERANGE_7BIT. + + * string.c (rb_str_substr): ditto. + + * encoding.c (rb_enc_compatible): empty string is compatible with not + only nonasciicompatible strings. [ruby-dev:33895] + +Thu Feb 21 17:15:15 2008 Martin Duerst + + * transcode.c: Added basic support for passing options to String#encode + via a hash. Currently only one option, with one value, is supported: + invalid: :ignore (dropping invalid byte sequences instead of + producing an error). Option naming is not yet stable! + + * test/ruby/test_transcode.rb: Added a single test for invalid: :ignore + option. Not more tests because most data does not yet distinguish + between INVALID and UNKNOWN. + +Thu Feb 21 16:35:26 2008 Nobuyoshi Nakada + + * array.c (rb_ary_unshift_m): expands enough for argc. [ruby-dev:33880] + +Thu Feb 21 14:49:40 2008 Nobuyoshi Nakada + + * io.c (argf_set_encoding): uses current_file after check if next + input is available. + +Thu Feb 21 14:13:38 2008 Yukihiro Matsumoto + + * io.c (rb_f_putc): invoke stdout method so that redefining putc + may take effect. [ruby-talk:291844] + + * io.c (rb_f_puts): ditto. + +Thu Feb 21 11:10:49 2008 NARUSE, Yui + + * string.c: replace rb_enc_copy by rb_enc_cr_str_copy or + rb_enc_cr_str_exact_copy. + +Thu Feb 21 10:35:04 2008 NARUSE, Yui + + * include/ruby/encoding.h (rb_enc_asciicompat): dummy encoding is not + ascii compatible. [ruby-dev:33878] + +Thu Feb 21 00:01:34 2008 Nobuyoshi Nakada + + * configure.in (RPATHFLAG): -R option of HP-UX ld is not for runtime + load path. [ruby-list:44600] + +Wed Feb 20 23:55:19 2008 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_map_errno): exported. + +Wed Feb 20 23:28:43 2008 NAKAMURA Usaku + + * ext/readline/extconf.rb (rl_event_hook): workaround for native + windows. + +Wed Feb 20 19:42:03 2008 NARUSE, Yui + + * encoding.c (rb_enc_associate_index): doesn't clear coderange + when new encoding equals to old one. + +Wed Feb 20 19:15:38 2008 NARUSE, Yui + + * string.c (rb_enc_str_copy): added for wrapper for rb_enc_copy. + this also copy coderange when ptr and len is equal. + + * string.c (rb_enc_cr_str_copy): added for wrapper for rb_enc_copy. + this always copy coderange. + + * string.c (str_replace_shared): use rb_enc_str_copy. + + * string.c (str_new3): don't rb_enc_copy because encoding is copied + at str_replace_shared. + +Wed Feb 20 13:08:52 2008 Nobuyoshi Nakada + + * instruby.rb (parse_args): added --dir-mode, --script-mode and + --cmd-type options. [ruby-dev:33816] + + * instruby.rb (parse_args): added bin-arch and bin-comm to install + type, for compiled files and script files. + + * instruby.rb (parse_args): deal with make style command line macros, + and count as long style options if prefixed with INSTALL_. + + * instruby.rb (makedirs): use $dir_mode. [ruby-dev:33805] + + * instruby.rb (open_for_install): set file mode, which is now + permission mode instead of access mode. + + * instruby.rb (bin-comm): installs scripts with replacing shebang + lines. + +Wed Feb 20 10:04:22 2008 NAKAMURA Usaku + + * io.c (open_key_args): set arg->io even if no options passed. + [ruby-dev:33072] + +Tue Feb 19 21:11:49 2008 NARUSE, Yui + + * string.c (rb_enc_strlen_cr): get length with coderange scan. + + * string.c (str_strlen): use rb_enc_strlen_cr. [ruby-dev:33849] + +Tue Feb 19 20:49:49 2008 Nobuyoshi Nakada + + * eval.c (rb_raise_jump): moved adjustment for control frame. + +Tue Feb 19 18:34:32 2008 Tanaka Akira + + * gc.c (STACK_LENGTH) [SPARC] : 0x80 offset removed. [ruby-dev:33857] + +Tue Feb 19 14:27:32 2008 Nobuyoshi Nakada + + * ext/readline/readline.c (readline_event): prevent polling. based on + a patch from error errorsson in [ruby-Bugs-17675]. + +Tue Feb 19 11:14:13 2008 Nobuyoshi Nakada + + * eval.c (ruby_exec_node): no thread starts inside iseq compilation. + + * eval.c (rb_f_raise): skip current control frame. [ruby-core:15589] + + * insns.def (opt_div): raise as the ordinary method. [ruby-core:15589] + +Mon Feb 18 15:16:30 2008 Tanaka Akira + + * string.c (rb_str_each_line): fix newline size. + +Mon Feb 18 13:06:37 2008 Tanaka Akira + + * lib/irb/locale.rb (IRB::Locale#lc2kconv): check ja_JP.EUC-JP as well. + +Mon Feb 18 11:51:19 2008 Tanaka Akira + + * re.c (re_warn): defined to restore warnings for /[a-c-e]/, etc. + +Mon Feb 18 10:17:42 2008 Nobuyoshi Nakada + + * ext/pty/lib/expect.rb (IO#expect): check if peer is closed. + [ruby-Bugs-17940] + +Mon Feb 18 00:33:03 2008 Tanaka Akira + + * re.c (rb_reg_regsub): don't repeat repl twice with + "X".sub!(/./, sprintf("\\%c", 255)). + +Sun Feb 17 23:06:55 2008 Kazuhiro NISHIYAMA + + * lib/cgi.rb (CGI::escapeHTML): use gsub with Hash. [ruby-dev:33828] + +Sun Feb 17 21:38:21 2008 NARUSE, Yui + + * encoding.c (ENC_CODERANGE_AND): fix broken case. [ruby-dev:33826] + + * string.c (rb_str_times): fix broken case. [ruby-dev:33826] + +Sun Feb 17 20:45:10 2008 Tanaka Akira + + * re.c (rb_reg_prepare_re): add enable_warning parameter. + (rb_reg_adjust_startpos): disable warning by rb_reg_prepare_re. + (rb_reg_search): follow rb_reg_prepare_re parameter change. + +Sun Feb 17 20:12:41 2008 Yusuke Endoh + + * test/ruby/test_regexp.rb: add tests to achieve over 90% test + coverage of re.c. + +Sun Feb 17 15:25:08 2008 NARUSE, Yui + + * encoding.c (ENC_CODERANGE_AND): added. + + * string.c (rb_str_plus, rb_str_times): keep coderange. + + * parse.y (STR_NEW0) use rb_usascii_str_new. + +Sun Feb 17 14:07:24 2008 Tanaka Akira + + * string.c (str_strlen): rb_enc_strlen doesn't fail. + +Sun Feb 17 13:03:48 2008 Tanaka Akira + + * string.c (str_sublen): use rb_enc_strlen. + +Sun Feb 17 12:17:52 2008 NARUSE, Yui + + * enc/{euc_jp.c,gbk.c,iso_8859_1.c,iso_8859_11.c,iso_8859_13.c, + iso_8859_2.c,iso_8859_6.c,iso_8859_7.c,iso_8859_8.c,iso_8859_9.c, + shift_jis.c,windows_1251.c}: add document about encodings. + + * enc/cp949.c: divided into new file. + +Sun Feb 17 10:59:04 2008 Tanaka Akira + + * re.c (rb_reg_quote): return US-ASCII string consistently. + +Sun Feb 17 09:17:08 2008 Tanaka Akira + + * string.c (rb_str_times): reduce loop overhead. + +Sun Feb 17 03:37:01 2008 Tanaka Akira + + * include/ruby/re.h (struct rmatch_offset): new struct for character + offsets. + (struct rmatch): new struct. + (struct RMatch): reference struct rmatch. + (RMATCH_REGS): new macro. + + * re.c (match_alloc): initialize struct rmatch. + (pair_byte_cmp): new function. + (update_char_offset): update character offsets. + (match_init_copy): copy regexp and character offsets. + (match_sublen): removed. + (match_offset): use update_char_offset. + (match_begin): ditto. + (match_end): ditto. + (rb_reg_search): make character offset updated flag false. + (match_size): use RMATCH_REGS. + (match_backref_number): ditto. + (rb_reg_nth_defined): ditto. + (rb_reg_nth_match): ditto. + (rb_reg_match_pre): ditto. + (rb_reg_match_post): ditto. + (rb_reg_match_last): ditto. + (match_array): ditto. + (match_aref): ditto. + (match_values_at): ditto. + (match_inspect): ditto. + + * string.c (rb_str_subpat_set): use RMATCH_REGS. + (rb_str_sub_bang): ditto. + (str_gsub): ditto. + (rb_str_split_m): ditto. + (scan_once): ditto. + + * gc.c (obj_free): free character offsets. + +Sun Feb 17 03:13:40 2008 NAKAMURA Usaku + + * win32/resource.rb: made version infos confirm to OS spec. + + * {bcc32,win32}/Makefile.sub (*.rc): add dependency. + +Sat Feb 16 20:49:34 2008 NARUSE, Yui + + * string.c (rb_str_substr): optimized for UTF-8. + +Sat Feb 16 18:13:53 2008 Tanaka Akira + + * encoding.c (rb_enc_compatible): check encoding incapable arguments. + +Sat Feb 16 20:12:47 2008 Tanaka Akira + + * re.c (match_inspect): avoid SEGV with MatchData.allocate.inspect. + +Sat Feb 16 19:04:17 2008 NARUSE, Yui + + * string.c (str_strlen): revert r15507. [ruby-dev:33810] + +Sat Feb 16 18:25:14 2008 NARUSE, Yui + + * string.c (str_strlen): little more optimization. + (rb_enc_nth): remove needless variable 'c'. + +Sat Feb 16 18:00:13 2008 Tanaka Akira + + * encoding.c (rb_enc_compatible): empty strings are always compatible. + + * string.c (rb_enc_cr_str_buf_cat): ditto. + +Sat Feb 16 16:14:35 2008 Tanaka Akira + + * string.c (rb_enc_strlen): UTF-8 character count moved to str_strlen. + (str_strlen): UTF-8 character count is only applicable for valid + UTF-8 string. [ruby-dev:33807] + +Sat Feb 16 13:16:49 2008 Tanaka Akira + + * string.c (rb_str_sub_bang): stringize replacing hash values. + (str_gsub): ditto. + +Sat Feb 16 13:01:33 2008 NARUSE, Yui + + * string.c (rb_enc_strlen): add search_nonascii like character + counter for UTF-8. + +Sat Feb 16 11:53:35 2008 Tanaka Akira + + * encoding.c (rb_enc_strlen): moved to string.c. + + * string.c (rb_enc_strlen): use search_nonascii. + (str_strlen): don't use search_nonascii. + +Sat Feb 16 11:45:31 2008 Tanaka Akira + + * lib/require_relative.rb: check require_relative call in eval. + +Sat Feb 16 08:00:01 2008 NARUSE, Yui + + * ruby.c (process_options): set default_external before loading + libraries. [ruby-dev:33801] + +Sat Feb 16 05:49:54 2008 NARUSE, Yui + + * enc/iso_8859_{4,13}.c: Windows-1257 is replica of ISO-8859-13. + + * string.c (single_byte_optimizable): rb_enc_mbminlen must be 1 + when rb_enc_mbmaxlen is 1. + +Sat Feb 16 03:43:18 2008 Tanaka Akira + + * encoding.c (rb_enc_nth): moved to string.c. + + * string.c (rb_enc_nth): moved from string.c. use search_nonascii + for ASCII compatible string. + (str_nth): wrong optimization removed to fix + "a".force_encoding("EUC-JP").slice!(0,10) returns + "a\x00\x00\x00\x00\x00\x00\x00\x00\x00" + +Sat Feb 16 00:21:49 2008 Nobuyoshi Nakada + + * range.c (rb_range_beg_len): check if responds to "begin" and "end" + methods for non-Range object. + +Fri Feb 15 20:29:42 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage + according to Encoding.default_external. + + * test/win32ole/test_win32ole.rb: ditto. + +Fri Feb 15 19:31:23 2008 Yukihiro Matsumoto + + * include/ruby/node.h (NODE_FL_NEWLINE): renamed from NODE_NEWLINE + to denote its a flag. [ruby-core:15529] + +Fri Feb 15 18:23:54 2008 Nobuyoshi Nakada + + * string.c (rb_str_sub_bang, str_gsub): allows hash for replacement. + +Fri Feb 15 17:12:41 2008 Yukihiro Matsumoto + + * string.c (str_strlen): use search_nonascii() for performance. + + * string.c (str_nth): ditto. + +Fri Feb 15 16:22:49 2008 Yukihiro Matsumoto + + * io.c (open_key_args): allow specifying both :mode and :encoding. + +Fri Feb 15 15:34:47 2008 Tanaka Akira + + * string.c (rb_str_getbyte): new method. + (rb_str_setbyte): new method. + +Fri Feb 15 15:29:03 2008 Tanaka Akira + + * lib/require_relative.rb: new file. + +Fri Feb 15 15:23:12 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_convert): check upper bound. a patch from + Daniel Luz at [ruby-Bugs-17910]. + +Fri Feb 15 10:35:54 2008 Nobuyoshi Nakada + + * re.c (rb_reg_quote): set US-ASCII for ASCII-only string. + [ruby-dev:33785] + +Fri Feb 15 10:27:47 2008 Nobuyoshi Nakada + + * {win,bcc}32/Makefile.sub (config.h): added HAVE_FTRUNCATE. + [ruby-dev:33786] + +Fri Feb 15 09:44:11 2008 Nobuyoshi Nakada + + * parse.y (reg_compile_gen): reg_fragment_setenc might not raise an + exception before rb_reg_compile. + +Fri Feb 15 07:37:40 2008 Eric Hodel + + * lib/rdoc/ri/paths.rb: Preserve compatibility with 1.8. + +Fri Feb 15 02:42:25 2008 Nobuyoshi Nakada + + * configure.in (ftruncate): check if available. + + * file.c (rb_file_truncate): check if ftruncate instead of truncate. + +Fri Feb 15 02:40:54 2008 Nobuyoshi Nakada + + * configure.in (sigsetmask): check when signal semantics is not POSIX. + + * signal.c (USE_TRAP_MASK): set true if sigprocmask or sigsetmask is + available. + +Thu Feb 14 23:56:38 2008 Nobuyoshi Nakada + + * eval_error.c (error_print): append a newline to rest lines. + + * parse.y (reg_compile_gen): appends error message from + rb_reg_compile() to one from reg_fragment_setenc(). + +Thu Feb 14 21:00:14 2008 Tanaka Akira + + * io.c (io_reopen): check STDIN, STDOUT and STDERR mode according to + stdio streams. + +Thu Feb 14 16:07:40 2008 Yukihiro Matsumoto + + * test/ruby/test_math.rb: actual-expected argument ordering for + test_math.rb fixed. a patch from Tadashi Saito + in [ruby-dev:33770]. + +Thu Feb 14 16:02:51 2008 Nobuyoshi Nakada + + * file.c (rb_file_s_utime): inhibits with secure level 2 or higher. + +Thu Feb 14 12:30:02 2008 Tanaka Akira + + * re.c (rb_reg_preprocess_dregexp): use non-preprocessed regexp source + for result. + +Thu Feb 14 01:43:16 2008 Nobuyoshi Nakada + + * lib/timeout.rb (Timeout::timeout): made sensitive to location on the + stack. [ruby-core:15458] + +Thu Feb 14 00:49:53 2008 Nobuyoshi Nakada + + * common.mk (INSTRUBY_ARGS): pass mode to install. [ruby-dev:33766] + + * instruby.rb (parse_args): added --data-mode and --prog-mode options. + +Thu Feb 14 00:02:19 2008 Yusuke Endoh + + * eval.c (eval): allow to eval in a binding that has a singleton method. + [ruby-dev:33763] + + * test/ruby/test_proc.rb: add tests to achieve over 70% test coverage + of proc.c. + + * test/ruby/test_method.rb: ditto. + +Wed Feb 13 22:46:36 2008 Tanaka Akira + + * lib/pathname.rb (Pathname#sub_ext): new method. [ruby-list:44608] + +Wed Feb 13 21:50:32 2008 Yusuke Endoh + + * proc.c (proc_curry): new method. [ruby-dev:33676] + + * test/ruby/test_proc.rb: add tests for above. + +Wed Feb 13 20:48:50 2008 Tanaka Akira + + * include/ruby/ruby.h (RObject): add iv_index_tbl for shortcut of + RCLASS_IV_INDEX_TBL(rb_obj_class(obj)). + (ROBJECT_IV_INDEX_TBL): defined. + + * object.c (init_copy): initialize iv_index_tbl in struct RObject. + + * variable.c (ivar_get): use ROBJECT_IV_INDEX_TBL. + (rb_ivar_defined): ditto. + (obj_ivar_each): ditto. + (rb_obj_remove_instance_variable): ditto. + (rb_ivar_set): update iv_index_tbl in struct RObject. + +Wed Feb 13 16:21:48 2008 NARUSE, Yui + + * lib/uri/generic.rb: revert r15442. 2nd argument of String#sub parse + escapes. [ruby-dev:33726] + + * bootstraptest/test_method.rb, enc/depend, instruby.rb, lib/mkmf.rb, + mkconfig.rb: revert r15443. ditto. + +Wed Feb 13 11:20:26 2008 NAKAMURA Usaku + + * enc/depend: fix typo. + + * lib/mkmf.rb: revert r15443. "\\1#{sep}\\2" is wrong if sep is ended + with "\\". + +Wed Feb 13 08:57:21 2008 Eric Hodel + + * lib/rdoc/markup/inline.rb: Allow inline markup to have a leading + '#' or '\', or trailing punctuation. i.e. *#freeze?*, *\foo?*. + +Wed Feb 13 07:21:23 2008 Eric Hodel + + * lib/rdoc/to_html_hyperlink.rb: Moved linking to to_html.rb, move + crossref to to_html_crossref.rb + +Wed Feb 13 04:15:44 2008 Nobuyoshi Nakada + + * parse.y (arg_concat_gen, arg_append_gen): optimize for array push. + + * parse.y (arg_concat_gen): optimize for array concat. + + * parse.y (arg_add_gen): removed since identical to arg_append_gen. + +Tue Feb 12 21:04:51 2008 Nobuyoshi Nakada + + * parse.y (exc_list): should use mrhs if non array. + +Tue Feb 12 20:32:50 2008 Tadayoshi Funaba + + * lib/rational.rb (floor, ceil, truncate, round): do not use + definitions of Numeric. + + * lib/rational.rb (to_i): should returns truncated self. + + * lib/complex.rb (numerator): requires + Integer#{numerator,denominator}. + + * lib/complex.rb (quo): do not use definition of Numeric. + + * lib/complex.rb (>, >=, <, <=, between?, div, divmod, modulo, + floor, ceil, truncate, round): undef'ed. + + * lib/mathn.rb (Rational#inspect): removed. + +Tue Feb 12 16:48:10 2008 Nobuyoshi Nakada + + * parse.y (args, mrhs): flattens literal array splats. + + * parse.y (exc_list): splat literal array. + +Tue Feb 12 15:27:19 2008 NARUSE, Yui + + * bootstraptest/runner.rb, bootstraptest/test_method.rb, enc/depend, + instruby.rb, lib/mkmf.rb, lib/test/unit/util/procwrapper.rb, + mkconfig.rb, sample/test.rb, template/vm.inc.tmpl, + test/ruby/test_stringchar.rb: fixes around String#gsub. + + +Tue Feb 12 15:11:47 2008 NARUSE, Yui + + * ext/json/lib/json/pure/generator.rb, + ext/json/lib/json/pure/parser.rb, ext/openssl/lib/openssl/x509.rb, + ext/win32ole/sample/olegen.rb, lib/date/format.rb, lib/irb/context.rb, + lib/irb/workspace.rb, lib/net/http.rb, lib/net/imap.rb, + lib/rdoc/generator.rb, lib/rdoc/markup/to_html.rb, + lib/rdoc/markup/to_latex.rb, lib/rdoc/parsers/parse_c.rb, + lib/rdoc/ri/formatter.rb, lib/rexml/parsers/baseparser.rb, + lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rss/parser.rb, + lib/uri/common.rb, lib/uri/generic.rb, lib/webrick/httpresponse.rb, + lib/webrick/httpservlet/filehandler.rb, lib/yaml/baseemitter.rb, + lib/yaml/encoding.rb: performance tuning around String#gsub. + +Tue Feb 12 12:16:45 2008 Yukihiro Matsumoto + + * string.c (rb_str_hash_cmp): lighter version of rb_str_cmp() for + hash comparison function. + + * hash.c (rb_any_cmp): use rb_str_hash_cmp(). + + * string.c (rb_str_casecmp): should return nil for incompatible + comparison. + +Tue Feb 12 12:13:25 2008 Yukihiro Matsumoto + + * instruby.rb: specify file mode to install. a patch from + pegacorn in [ruby-dev:33699]. + +Tue Feb 12 11:38:57 2008 Yukihiro Matsumoto + + * numeric.c (rb_num_coerce_bin): add ID argument to specify + caller's method name. [ruby-dev:33663] + + * numeric.c (rb_num_coerce_cmp): ditto. + + * numeric.c (rb_num_coerce_relop): ditto. + + * ext/bigdecimal/bigdecimal.c (DoSomeOne): add function name argument. + +Tue Feb 12 10:25:02 2008 Eric Hodel + + * lib/rdoc/rdoc.rb: Wrap parse_files' read in version check for + backwards compatibility. + +Tue Feb 12 10:15:14 2008 NARUSE, Yui + + * ruby.c (load_file): enc must effect source encoding. + [ruby-core:15496] + +Tue Feb 12 10:16:47 2008 Eric Hodel + + * lib/rdoc/ri/paths.rb: Restore require rubygems check. + +Tue Feb 12 02:42:27 2008 Yukihiro Matsumoto + + * range.c (range_include): specialize single character string + case (e.g. (?a ..?z).include(?x)) for performance. + [ruby-core:15481] + + * string.c (rb_str_upto): specialize single character case. + + * string.c (rb_str_hash): omit coderange scan for performance. + + * object.c (rb_check_to_integer): check Fixnum first. + + * object.c (rb_to_integer): ditto. + + * string.c (rb_str_equal): inline memcmp to avoid unnecessary + rb_str_comparable(). + + * parse.y (rb_intern2): use US-ASCII encoding. + + * parse.y (rb_intern_str): ditto. + +Mon Feb 11 17:21:18 2008 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION), test/rss/test_version.rb: + 0.2.3 -> 0.2.4. + + * lib/rss/maker.rb, lib/rss/maker/, test/rss/test_maker_2.0.rb: + fixed a bug that RSS::Maker.make("0.9")'s item doesn't make some + elements if description is missed. + Reported by Michael Auzenne. Thanks!!! + + * lib/rss/maker/0.9.rb, test/rss/test_maker_0.9.rb: + RSS::Maker.make("0.9") generates RSS 0.92 not RSS 0.91. + +Mon Feb 11 10:43:31 2008 NARUSE, Yui + + * ruby.c (load_file): the encoding of DATA follows the source + file encoding. [ruby-dev:33693] + +Mon Feb 11 06:50:42 2008 Yusuke Endoh + + * test/ruby/test_pack.rb: fix tests for 64bit CPU. + + * test/ruby/test_bignum.rb: ditto. + + * test/ruby/test_file_exhaustive.rb: ditto. + + * test/ruby/test_integer.rb: ditto. + + * test/ruby/test_time.rb: ditto. + + * test/ruby/test_numeric.rb: ditto. + + * test/ruby/test_fixnum.rb: ditto. + +Mon Feb 11 00:18:57 2008 NARUSE, Yui + + * lib/benchmark.rb (Job::Benchmark#item): fix typo. + +Sun Feb 10 21:58:32 2008 NARUSE, Yui + + * common.mk (encdb, transdb): depend on $(PREP). + +Sun Feb 10 16:58:20 2008 Eric Hodel + + * lib/rubygems*, test/rubygems*, gem_prelude.rb: Import RubyGems + r1601. [ruby-core:15381] + +Sun Feb 10 15:07:23 2008 Nobuyoshi Nakada + + * {bcc32,win32,wince}/Makefile.sub (MISSING): added cbrt.obj. + +Sun Feb 10 12:58:33 2008 Eric Hodel + + * lib/rdoc/code_objects.rb: Make some attributes accessible for reuse. + * lib/rdoc/generator/html.rb: Pull out ContextUser classes and related + methods for reuse. + * lib/rdoc/generator.rb: Move ContextUser classes to + RDoc::Generator::Context for reuse. + * lib/rdoc/rdoc.rb: Make RDoc::RDoc initialization a little easier. + * lib/rdoc/options.rb: Make RDoc::Options easier to use without + parsing an ARGV. + * lib/rdoc/markup/to_*.rb: Subclass RDoc::Markup::Formatter. + * lib/rdoc/markup/formatter.rb: Add RDoc::Markup::Formatter to make + RDoc markup conversion easier. + * lib/rdoc/markup/fragments.rb: Make RDoc::Markup::ListItem easier to + test. + * lib/rdoc/markup/to_html_hyperlink.rb: Pulled out of the HTML + generator for easier reusability. + * lib/rdoc/markup.rb: Fix bug with labeled lists containing bullet + lists. + * lib/rdoc/generators/html/html.rb: Fix Constant display. + +Sat Feb 9 23:44:29 2008 Tanaka Akira + + * missing/tgamma.c (tgamma): use lgamma_r if available. + +Sat Feb 9 23:22:52 2008 Nobuyoshi Nakada + + * ext/bigdecimal/extconf.rb: simplified the condition. + +Sat Feb 9 21:20:28 2008 Yusuke Endoh + + * test/ruby/test_math.rb: add tests for Math.gamma, Math.lgamma and + Math.cbrt, and use assert_in_delta instead of assert. + +Sat Feb 9 18:34:45 2008 Tanaka Akira + + * math.c (math_cbrt): new method Math.cbrt. + + * configure.in (cbrt): check for replacement functions. + + * missing/cbrt.c: new file. + +Sat Feb 9 17:51:24 2008 Nobuyoshi Nakada + + * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use strtod() for more + precision. [ruby-talk:290296] + + * ext/bigdecimal/bigdecimal.c (BASE_FIG): made constant. + + * ext/bigdecimal/extconf.rb: ditto. [ruby-dev:33658] + +Sat Feb 9 12:06:45 2008 Tanaka Akira + + * missing/tgamma.c (tgamma): add error check. + +Sat Feb 9 11:47:03 2008 Tanaka Akira + + * math.c (math_gamma): add error check. + (math_lgamma): ditto. + +Sat Feb 9 11:09:26 2008 Tanaka Akira + + * missing/lgamma_r.c (lgamma_r): return HUGE_VAL for non-positive + integers. + +Sat Feb 9 10:03:07 2008 Tanaka Akira + + * string.c (rb_str_new4): copy encoding from orig, instead of shared + one. + +Sat Feb 9 01:01:38 2008 NARUSE, Yui + + * file.c (lchmod_internal): fix warning cast from pointer to integer of + different size. + +Sat Feb 9 00:44:52 2008 Nobuyoshi Nakada + + * lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than + SystemExit and SignalException. [ruby-core:15359] + +Fri Feb 8 23:51:36 2008 Tanaka Akira + + * missing/lgamma_r.c (lgamma_r): use smaller argument for sin function. + +Fri Feb 8 22:10:36 2008 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_http): rescue URI::InvalidURIError by + URI.parse for location URI. + +Fri Feb 8 19:22:13 2008 Nobuyoshi Nakada + + * ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte + length. [ruby-dev:33653] + + * ext/iconv/iconv.c (iconv_convert): added toidx argument to set + encoding of successfully converted string. [ruby-dev:33221] + +Fri Feb 8 15:09:21 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (xsystem): expand macros like as make. + +Fri Feb 8 09:27:57 2008 NARUSE, Yui + + * lib/rdoc/ri/driver.rb (read_yaml): remove SM* for compatibility. + +Fri Feb 8 00:07:24 2008 Yusuke Endoh + + * test/ruby/test_hash.rb: follow the change of Hash#flatten. + + * test/ruby/test_time.rb: add tests to achieve over 70% test coverage + of time.c. + + * test/ruby/test_prec.rb: ditto over 90% for prec.c. + +Thu Feb 7 19:11:39 2008 Nobuyoshi Nakada + + * string.c (rb_str_dup): reverted unneeded change. [ruby-dev:33634] + + * string.c (rb_str_replace): makes frozen shared string before + sharing. + +Thu Feb 7 16:33:51 2008 Tanaka Akira + + * io.c (io_reopen): don't change access mode for stdin, stdout and + stderr. [ruby-core:15360] + +Thu Feb 7 16:33:48 2008 Nobuyoshi Nakada + + * string.c (str_replace_shared): replaces string with sharing. + + * string.c (rb_str_new4, rb_str_associate, rb_str_associated): allows + associated strings shared. + + * string.c (rb_str_dup, rb_str_substr, rb_str_replace): shares memory. + [ruby-core:15400] + +Thu Feb 7 15:42:42 2008 Nobuyoshi Nakada + + * string.c (rb_str_end_with): compares with the suffix. + +Thu Feb 7 15:03:15 2008 NARUSE, Yui + + * enc/trans/korean.c: add support for CP949 by Park Ji-In. + [ruby-dev:33626] + +Thu Feb 7 11:11:02 2008 NAKAMURA Usaku + + * missing/lgamma_r.c (lgamma_r): some compilers don't permit dividing + by literal 0.0. use const variable instead. + + * {bcc32,win32,wince}/Makefile.sub (MISSING): add lgamma_r.obj and + tgamma.obj. + +Thu Feb 7 10:39:21 2008 Tanaka Akira + + * math.c (math_gamma): new method Math.gamma. + (math_lgamma): new method Math.lgamma. + + * include/ruby/missing.h (tgamma): declared unless HAVE_TGAMMA. + (lgamma_r): declared unless HAVE_LGAMMA_R. + + * configure.in (tgamma): check for replacement functions. + (lgamma_r): ditto. + + * missing/tgamma.c: new file. based on gamma.c from + "C-gengo niyoru saishin algorithm jiten" (New Algorithm handbook + in C language) (Gijyutsu hyouron sha, Tokyo, 1991) + by Haruhiko Okumura. + + * missing/lgamma_r.c: ditto. + + * LEGAL (missing/tgamma.c): describe as public domain. + (missing/lgamma_r.c): ditto. + +Thu Feb 7 09:05:57 2008 Yukihiro Matsumoto + + * ext/nkf/nkf-utf8/nkf.c (nkf_enc_from_index): BINARY does not + have in-bound encoding index. + +Thu Feb 7 04:26:28 2008 NARUSE, Yui + + * enc/trans/korean.c: add EUC-KR conversion support by Park Ji-In. + [ruby-dev:33621] + +Wed Feb 6 01:47:39 2008 Yukihiro Matsumoto + + * hash.c (rb_hash_flatten): do not flatten recursively by default. + [ruby-dev:33603] + +Wed Feb 6 00:50:19 2008 NAKAMURA Usaku + + * insns.def (adjuststack): never use INC_SP with minus value because + some compilers cannot deal it correctly. use DEC_SP instead. + +Wed Feb 6 00:48:41 2008 Yusuke Endoh + + * test/ruby/test_hash.rb: add tests to achieve over 90% test coverage + of hash.c. + + * test/ruby/test_env.rb: ditto. + +Wed Feb 6 00:24:49 2008 Yusuke Endoh + + * hash.c (env_rassoc): remove access to free'd environment on mswin32. + +Tue Feb 5 21:57:34 2008 Yusuke Endoh + + * vm.c (rb_call_super): pass a passed block when super is called via + rb_call_super. [ruby-dev:33598] + +Tue Feb 5 11:14:11 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR. + + * lib/mkmf.rb (install_files): rejects files matching to + $NONINSTALLFILES. + + * lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and + temporary files. + +Mon Feb 4 21:52:06 2008 Nobuyoshi Nakada + + * lib/delegate.rb (DelegateClass): use define_method instead of + module_eval to improve performance. [ruby-dev:33586] + +Mon Feb 4 16:44:24 2008 Nobuyoshi Nakada + + * configure.in (darwin): NSIG is not defined if _XOPEN_SOURCE > 500L. + [ruby-dev:33584] + +Mon Feb 4 14:51:19 2008 Nobuyoshi Nakada + + * parse.y (rb_enc_symname2_p): support "!", "!=" and "!~". + [ruby-dev:33592] + +Mon Feb 4 13:58:42 2008 NAKAMURA Usaku + + * lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extend + shouldn't be delegated. [ruby-dev:32987], etc. + +Mon Feb 4 08:59:31 2008 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::[]): no more transition + extend(CGI::Value). a patch from in + [ruby-dev:33583]. + +Sun Feb 3 21:13:13 2008 Yusuke Endoh + + * test/ruby/test_numeric.rb: forgot to add this (at r15360). + + * test/ruby/test_file_exhaustive.rb: add tests to achieve over 80% test + coverage of file.c. + +Sat Feb 2 20:06:42 2008 Yukihiro Matsumoto + + * lib/benchmark.rb (Benchmark::realtime): make Benchmark#realtime + a bit faster. a patch from Alexander Dymo in + [ruby-core:15337]. + +Sat Feb 2 17:40:21 2008 NARUSE, Yui + + * time.c (time_cmp): Time.<=> no longer supports comparison with + numeric. [ruby-core:15332] + +Sat Feb 2 09:53:39 2008 Nobuyoshi Nakada + + * configure.in (darwin): disabled fat-binary support which confuses + configure much, since ``universal'' implies hidden cross-compiling. + TODO: ruby and libruby.bundle might be possible to bound with `lipo' + after builds for each archs. Anyway, config.h and rbconfig.rb must + be separated definitely at least. + +Sat Feb 2 09:28:36 2008 Tanaka Akira + + * random.c (limited_big_rand): fix buffer overflow when SIZEOF_BDIGITS + is 2. fixed by Kenta Murata. [ruby-dev:33565] + +Fri Feb 1 21:42:37 2008 Nobuyoshi Nakada + + * configure.in (darwin): _XOPEN_SOURCE is necessary to make ucontext_t + consistent with the library implementation of MacOS X 10.5. + [ruby-dev:33461] + + * configure.in (darwin): ucontext on PowerPC MacOS X 10.5 is broken. + +Fri Feb 1 11:44:22 2008 Tanaka Akira + + * tool/compile_prelude.rb (C_ESC): use octal escape to avoid + "\x09for (;;) ..." to be interpret the first character 0x9f. + +Thu Jan 31 23:06:42 2008 Yusuke Endoh + + * test/ruby/test_bignum.rb: suppress warnings during test. + + * test/ruby/test_enum.rb: ditto. + + * test/ruby/test_integer.rb: add tests to achieve over 90% test + coverage of numeric.c. + + * test/ruby/test_float.rb: ditto. + + * test/ruby/test_fixnum.rb: ditto. + + * test/ruby/test_numeric.rb: ditto. + + * test/ruby/test_pack.rb: add tests to achieve over 90% test coverage + of pack.c. + +Thu Jan 31 17:30:42 2008 NAKAMURA Usaku + + * marshal.c (r_object0): no need to call r_entry for immediate values. + +Thu Jan 31 15:46:30 2008 NAKAMURA Usaku + + * lib/rdoc/ri/formatter.rb (output): add accessor. + + * lib/rdoc/ri/display.rb (page): replace @formatter.output instead of + $stdout. + +Thu Jan 31 15:06:50 2008 NARUSE, Yui + + * marshal.c (r_object0): call r_entry/r_leave to call proc when + TYPE_FIXNUM, TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL. + +Thu Jan 31 14:03:38 2008 NAKAMURA Usaku + + * lib/rdoc/ri/display.rb (display_method_list, display_class_list): + use @formatter.raw_print_line instead of puts. + + * lib/rdoc/ri/driver.rb (select_methods): new method to collect all + instance/class methods which match with passed pattern. + + * lib/rdoc/ri/driver.rb (run): use class_cache's result directly + instead of select_classes' because it's removed now. + + * lib/rdoc/ri/driver.rb (run): search methods when passed name is not + class name. [ruby-core:15309] + +Thu Jan 31 08:31:19 2008 Nobuyoshi Nakada + + * common.mk (ext/extmk.rb, instruby.rb): inlined $(MAKE) so that can + be executed even with -n. + +Thu Jan 31 06:24:22 2008 Nobuyoshi Nakada + + * io.c (rb_io_close_read): replaces fptr with the tied writer if + duplex. + + * io.c (rb_io_close_write): unties the tied IO for writing if duplex. + [ruby-dev:33532] + +Thu Jan 31 02:22:04 2008 Yukihiro Matsumoto + + * io.c (open_key_args): allow encoding key to take two encoding + names. a patch from . [ruby-dev:33540] + +Thu Jan 31 02:15:49 2008 Yukihiro Matsumoto + + * parse.y (dsym): allow empty symbols. [ruby-core:15248] + +Thu Jan 31 00:01:51 2008 Tanaka Akira + + * io.c (select_internal): fix SEGV by `select [STDIN],nil,[STDIN]'. + fixed by Petr Chromec. + http://rubyforge.org/tracker/index.php?func=detail&aid=17275&group_id=426&atid=1698 + +Wed Jan 30 17:32:49 2008 NARUSE, Yui + + * enc/*.c: add GB12345, UCS-{2,4}{BE,LE}. + +Wed Jan 30 14:32:18 2008 NAKAMURA Usaku + + * lib/rdoc/ri/driver.rb (cache_file_for): shouldn't use `:' in filename. + +Wed Jan 30 14:27:19 2008 Tanaka Akira + + * string.c (rb_str_succ): use wrapped character as a carry for + ASCII incompatible encoding. + +Wed Jan 30 12:26:59 2008 Tanaka Akira + + * enc/utf_16be.c (UTF16_IS_SURROGATE_FIRST): avoid branch. + (UTF16_IS_SURROGATE_SECOND): ditto. + (UTF16_IS_SURROGATE): defined. + (utf16be_mbc_enc_len): validation implemented. + + * enc/utf_16le.c (UTF16_IS_SURROGATE_FIRST): avoid branch. + (UTF16_IS_SURROGATE_SECOND): ditto. + (UTF16_IS_SURROGATE): defined. + (utf16le_mbc_enc_len): validation implemented. + +Wed Jan 30 12:06:43 2008 Tadayoshi Funaba + + * bignum.c (rb_cstr_to_inum): '0_2' is a valid representation. + +Wed Jan 30 11:57:50 2008 NARUSE, Yui + + * bootstraptest/runner.rb: fix -I../../hoge case. + +Wed Jan 30 01:25:16 2008 Yusuke Endoh + + * test/ruby/test_range.rb: add tests to achieve over 90% test coverage + of range.c. + +Wed Jan 30 00:09:37 2008 Tanaka Akira + + * enc/euc_tw.c (euctw_mbc_enc_len): validation implemented. + +Tue Jan 29 22:58:11 2008 Yusuke Endoh + + * test/ruby/test_enumerator.rb: add tests to achieve over 90% test + coverage of enumerator.c. + + * test/ruby/test_enum.rb: add for enum.c. + +Tue Jan 29 22:29:48 2008 Yusuke Endoh + + * enumerator.c: fix documents. + +Tue Jan 29 22:27:11 2008 Yusuke Endoh + + * range.c: fix SEGV by ("a" .. "z").step(2 ** 30) { }. + +Tue Jan 29 21:59:16 2008 Tanaka Akira + + * enc/euc_tw.c (euctw_islead): 0x8e is a leading byte. + +Tue Jan 29 21:55:35 2008 Yusuke Endoh + + * bignum.c: move object allocation out of blocking_region. + [ruby-dev:33139] + +Tue Jan 29 20:37:36 2008 NARUSE, Yui + + * enc/trans/make_transdb.rb: add for make transdb.h. + + * dmytranscode.c: add for miniruby. + + * enc/gbk.c (gbk_left_adjust_char_head, gbk_is_allowed_reverse_match): + fix odd regexp match. [ruby-dev:33502] + +Tue Jan 29 20:17:06 2008 NAKAMURA Usaku + + * {bcc32,win32}/Makefile.sub (MINIOBJS): add dmytranscode.$(OBJEXT). + +Tue Jan 29 19:39:40 2008 NARUSE, Yui + + * configure.in, common.mk: fix rule for dmytranscode.o. + +Tue Jan 29 19:03:16 2008 NARUSE, Yui + + * enc/trans/japanese.c (rb_to_Windows_31J): to 'Windows-31J'. + + * common.mk: add rules for transdb.h. + + * transcode.c (init_transcoder_table): use transdb.h. + +Tue Jan 29 18:05:48 2008 Nobuyoshi Nakada + + * encoding.c (encdb_{replicate,alias,dummy,declare}): define only if + NO_ENCDB_H is not defined. + +Tue Jan 29 17:54:11 2008 NARUSE, Yui + + * enc/gbk.c (EncLen_gbk): too short. [ruby-dev:33497] + +Tue Jan 29 17:25:22 2008 NARUSE, Yui + + * dmyencoding.c, encoding.c (enc_init_db, NO_ENCDB_H): + miniruby doesn't use encdb. + + * common.mk: encdb.h use miniruby. + +Tue Jan 29 17:37:36 2008 Tanaka Akira + + * enc/gb18030.c (gb18030_mbc_enc_len): validation implemented. + +Tue Jan 29 17:01:07 2008 NARUSE, Yui + + * tool/ifchange: remove $temp when unchanged. + +Tue Jan 29 16:59:01 2008 Tanaka Akira + + * insns.def (toregexp): generate a regexp from strings instead of one + string. + + * re.c (rb_reg_new_ary): defined for toregexp. it concatenates + strings after each string is preprocessed. + + * compile.c (compile_dstr_fragments): split from compile_dstr. + (compile_dstr): call compile_dstr_fragments. + (compile_dregx): defined for dynamic regexp. + (iseq_compile_each): use compile_dregx for dynamic regexp. + + [ruby-dev:33400] + +Tue Jan 29 16:25:26 2008 NARUSE, Yui + + * common.mk, ext/extmk.rb: always make encdb.h. + +Tue Jan 29 12:53:39 2008 NARUSE, Yui + + * enc/gbk.c: add GBK, CP936 and CP949. + + * enc/euc_kr.c: remove CP949. + + * enc/euc_cn.c: remove CP936 and rename to gb2312.c + + * enc/gb2312.c: GB2312 is preferred MIME name. + +Tue Jan 29 03:01:29 2008 NAKAMURA Usaku + + * parse.y (reg_fragment_setenc_gen): US-ASCII script special code. + + * parse.y (reg_fragment_check_len, reg_compile_gen): no need such + trick. + [ruby-dev:33399] + + * test/ruby/test_m17n.rb (test_regexp_usacii_literal): add tests. + +Tue Jan 29 01:38:02 2008 NAKAMURA Usaku + + * common.mk ($(srcdir)/revision.h): no need to show ifchange execution + because ifchange echos updated or unchanged. + +Tue Jan 29 01:26:23 2008 Nobuyoshi Nakada + + * common.mk (up): use last changed revision. + + * common.mk (up): force to update revision.h. + +Tue Jan 29 00:12:17 2008 NAKAMURA Usaku + + * bignum.c (rb_big2str0): should be US-ASCII. + +Tue Jan 29 00:10:00 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-mode-set-encoding): updates magic comment. + +Mon Jan 28 23:47:52 2008 NARUSE, Yui + + * parse.y (rb_id2str, ripper_initialize, Init_ripper): + use rb_usascii_str_new2. [ruby-dev:33449] + +Mon Jan 28 19:37:08 2008 NAKAMURA Usaku + + * ext/win32ole/win32ole.c (ole_cp2encoding): new function. + + * ext/win32ole/win32ole.c (ole_wc2vstr, ole_variant2val, fole_missing): + set encoding to result. + + * ext/win32ole/win32ole.c (fole_s_set_code_page, Init_win32ole): set + default encoding. + [ruby-dev:33433] + +Mon Jan 28 11:17:28 2008 NARUSE, Yui + + * string.c, parse.y, re.c: use rb_ascii8bit_encoding. + +Mon Jan 28 17:54:15 2008 NARUSE, Yui + + * enc/utf_7.h: add dummy encoding UTF-7 and its alias CP65000. + +Mon Jan 28 17:41:19 2008 NAKAMURA Usaku + + * enc/utf_8.c: add alias CP65001. + +Mon Jan 28 15:33:23 2008 Tanaka Akira + + * enc/big5.c (big5_mbc_enc_len): validation implemented. + +Mon Jan 28 13:02:02 2008 Tanaka Akira + + * enc/euc_kr.c (euckr_mbc_enc_len): validation implemented. + +Mon Jan 28 11:24:49 2008 NAKAMURA Usaku + + * parse.y (parser_str_new): encoding of UTF-8 literal string in + US-ASCII script is UTF-8. [ruby-dev:33406] + +Mon Jan 28 10:25:59 2008 NAKAMURA Usaku + + * test/ruby/test_m17n.rb (test_magic_comment): add test. + +Mon Jan 28 09:34:54 2008 NAKAMURA Usaku + + * common.mk (help): use double quotes for nmake. + +Mon Jan 28 00:39:09 2008 Nobuyoshi Nakada + + * parse.y (parser_set_encode): check if encoding is ASCII compatible. + +Mon Jan 28 01:21:15 2008 Yukihiro Matsumoto + + * io.c (rb_open_file): should check NUL in path. + . + + * io.c (rb_io_s_popen): ditto. + + * io.c (rb_io_reopen): ditto. + + * io.c (next_argv): ditto. + +Sun Jan 27 23:33:35 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): fix for left justify flag. + + * sprintf.c (rb_str_format): zero-precision zero bug revised. + [ruby-dev:33419] + +Sun Jan 27 23:20:54 2008 Tanaka Akira + + * include/ruby/oniguruma.h: precise mbclen API redesigned to avoid + inline functions. + (onigenc_mbclen_charfound): removed. + (onigenc_mbclen_needmore): removed. + (onigenc_mbclen_recover): removed. + (ONIGENC_MBCLEN_CHARFOUND): removed. + (ONIGENC_MBCLEN_CHARFOUND_P): defined. + (ONIGENC_MBCLEN_CHARFOUND_LEN): defined. + (ONIGENC_MBCLEN_INVALID): removed. + (ONIGENC_MBCLEN_INVALID_P): defined. + (ONIGENC_MBCLEN_NEEDMORE): removed. + (ONIGENC_MBCLEN_NEEDMORE_P): defined. + (ONIGENC_MBCLEN_NEEDMORE_LEN): defined. + (ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate. + + * regenc.c (onigenc_mbclen_approximate): defined. + + * include/ruby/encoding.h (MBCLEN_CHARFOUND): removed. + (MBCLEN_INVALID): removed. + (MBCLEN_NEEDMORE): removed. + (MBCLEN_CHARFOUND_P): defined. + (MBCLEN_INVALID_P): defined. + (MBCLEN_NEEDMORE_P): defined. + (MBCLEN_CHARFOUND_LEN): defined. + (MBCLEN_NEEDMORE_LEN): defined. + + * encoding.c: use new API. + + * re.c: ditto. + + * string.c: ditto. + + * parse.y: ditto. + +Sun Jan 27 22:55:27 2008 Nobuyoshi Nakada + + * parse.y (value_expr_gen): reverted r12880. [ruby-dev:33388] + +Sun Jan 27 22:33:39 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): fix for octal with precision. + [ruby-dev:33411] + +Sun Jan 27 22:31:45 2008 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-mode-set-encoding): automatically insert + encoding magic comment. + + * misc/ruby-mode.el (ruby-mode): set ruby-mode-set-encoding to buffer + local before-save-hook. + +Sun Jan 27 19:51:15 2008 Tanaka Akira + + * string.c (rb_str_inspect): avoid exception by + "\#\xa1".force_encoding("euc-jp").inspect. + +Sun Jan 27 19:07:33 2008 Tanaka Akira + + * string.c (rb_str_succ): warning suppressed. + +Sun Jan 27 18:18:13 2008 NARUSE, Yui + + * common.mk (help): show major targets. + +Sun Jan 27 17:54:48 2008 NARUSE, Yui + + * ext/nkf/nkf.c: raise error when no output encoding is given. + +Sun Jan 27 17:20:10 2008 Tanaka Akira + + * string.c (rb_str_succ): don't increment/decrement codepoint. + +Sun Jan 27 16:03:42 2008 NARUSE, Yui + + * lib/irb/ruby-lex.rb (RubyLex#buf_input): use chars.to_a. + +Sun Jan 27 16:27:22 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8: update nkf. + +Sun Jan 27 16:25:27 2008 NARUSE, Yui + + * re.c (rb_reg_source): set encoding as regexp encoding. + +Sun Jan 27 05:56:39 2008 Tanaka Akira + + * re.c (rb_reg_preprocess): force fixed encoding when ASCII + incompatible source string. + +Sat Jan 26 23:46:33 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): zero-precision zero should be empty. + [ruby-dev:33363] + + * sprintf.c (rb_str_format): not prepend octal prefix to negative or + zero value. [ruby-dev:33363], [ruby-dev:33367] + +Sat Jan 26 23:42:15 2008 Nobuyoshi Nakada + + * parse.y (assignable_gen, keyword_to_name): __ENCODING__ was missing. + +Sat Jan 26 19:08:45 2008 Tanaka Akira + + * marshal.c (w_object): dump string encoding in USERDEF. + [ruby-dev:33401] + +Sat Jan 26 17:42:23 2008 Koichi Sasada + + * compile.c (iseq_compile_each): validate argument expr of "next" + statement. + + * bootstraptest/test_syntax.rb: add a test. + +Sat Jan 26 17:22:46 2008 Koichi Sasada + + * compile.c, compile.h: fix to calculate correct stack depth + at each instruction. + +Sat Jan 26 09:41:02 2008 NARUSE, Yui + + * lib/rexml/doctype.rb, test/rss/test_maker_itunes.rb: replace + multi-byte string. + + * test/json/{test_json.rb, test_json_unicode.rb}: + add magic comment. + +Sat Jan 26 09:30:26 2008 Nobuyoshi Nakada + + * include/ruby/encoding.h (rb_usascii_encindex): added prototype. + + * include/ruby/intern.h (rb_usascii_str_new, rb_usascii_str_new2): + ditto. + +Sat Jan 26 09:17:13 2008 NARUSE, Yui + + * string.c (rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when + empty string (len == 0). + +Sat Jan 26 03:41:53 2008 NAKAMURA Usaku + + * parse.y (parser_initialize): set default script encoding as US-ASCII. + + * ruby.c (load_file): ditto. + + * ruby.c (process_options): set script encoding of -e from locale + except when -K is specified. + + * ruby.c (load_file): set script encoding of stdin from locale except + when -K is specified. [ruby-dev:33375] + +Sat Jan 26 02:51:06 2008 Koichi Sasada + + * compile.c, compile.h: fix stack pointer issues. + calculate correct stack depth at compile time. + + * insns.def (emptstack): remove it and add a new insn "adjuststack". + + * bootstraptest/test_knownbug.rb: move/remove fixed test. + + * bootstraptest/test_syntax.rb: ditto. + +Sat Jan 26 00:17:18 2008 NARUSE, Yui + + * string.c (rb_str_usascii_new{,2}: defined. + (rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when empty + string. + + * encoding.c (rb_usascii_encoding, rb_usascii_encindex): defined. + (rb_enc_inspect, enc_name, rb_locale_charmap, rb_enc_name_list_i): + use rb_str_ascii_new. + + * array.c (recursive_join, inspect_ary): ditto. + + * object.c (nil_to_s, nil_inspect, true_to_s, false_to_s, + rb_mod_to_s): ditto. + + * hash.c (inspect_hash, rb_hash_inspect, rb_f_getenv, env_fetch, + env_clear, env_to_s, env_inspect): ditto. + + * numeric.c (flo_to_s, int_chr, rb_fix2str): ditto. + + * bignum.c (rb_big2str): ditto. + + * file.c (rb_file_ftype, rb_file_s_dirname, rb_file_s_extname, + file_inspect_join, Init_file): ditto. + + * test/ruby/test_ruby_m17n.rb: add checks for encoding of string. + +Sat Jan 26 01:35:46 2008 Tanaka Akira + + * marshal.c (r_byte): use getbyte instead of getc. + (marshal_load): ditto. + [ruby-dev:33264] + +Sat Jan 26 00:43:40 2008 Tanaka Akira + + * io.c (rb_io_getline_fast): don't care ASCII incompatible encoding. + (prepare_getline_args): generate a newline according to IO encoding + when necessary. + (rb_io_getline_1): call rb_io_getline_fast only for ASCII + compatible encoding. + +Fri Jan 25 21:49:36 2008 Tanaka Akira + + * string.c (rb_str_buf_cat_ascii): use rb_enc_cr_str_buf_cat. + +Fri Jan 25 19:38:45 2008 Nobuyoshi Nakada + + * common.mk (version.$(OBJEXT)): depends on $(srcdir)/revision.h. + + * common.mk (revision.h): extracts revision number with ``svn info''. + + * common.mk (up): target to update from the repository. + + * Makefile.in, {win,bcc}32/Makefile.sub (IFCHANGE): tool to update a + file if changed. + + * tool/ifchange: for unixen. + + * win32/ifchange.bat: some fix + +Fri Jan 25 17:12:13 2008 Nobuyoshi Nakada + + * ruby.c (load_file): set default to ASCII-8BIT explicitly if -K + option is not given. + +Fri Jan 25 16:31:47 2008 Tanaka Akira + + * include/ruby/intern.h (rb_str_buf_cat_ascii): declared. + + * string.c (rb_str_buf_cat_ascii): defined. + + * re.c (rb_reg_s_union): use rb_str_buf_cat_ascii to support ASCII + incompatible encoding. + +Fri Jan 25 16:11:16 2008 Nobuyoshi Nakada + + * ruby.c (process_options, load_file, rb_load_file): propagates script + encoding by -K to libraries. [ruby-dev:33156] + +Fri Jan 25 15:56:48 2008 Nobuyoshi Nakada + + * ruby.c (cmdline_arguments): split argc and argv from cmdline_options. + + * ruby.c (process_options): not set encoding of -e option from -E + option if they are not compatible. + +Fri Jan 25 13:15:23 2008 NAKAMURA Usaku + + * ruby.c (proc_options, process_options, load_file): shouldn't effect + --encoding to script encoding. [ruby-dev:33169] + +Fri Jan 25 10:31:58 2008 Nobuyoshi Nakada + + * */*.bat: set svn:mime-type to text/batch. + +Thu Jan 24 23:23:06 2008 Yusuke Endoh + + * enum.c (enum_one, enum_take_while, enum_drop_while): fix documents. + +Thu Jan 24 21:46:24 2008 Tanaka Akira + + * parse.y (reg_fragment_setenc_gen): associate ASCII-8BIT only if + str has only ASCII characters. + +Thu Jan 24 20:46:17 2008 NAKAMURA Usaku + + * test/ruby/test_m17n.rb: follow to the following changes. + +Thu Jan 24 20:21:07 2008 NAKAMURA Usaku + + * parser.y (parser_str_new): automatically update string literal's + encoding from US-ASCII to ASCII-8BIT when script encoding is US-ASCII + and the string includes non-ascii bytes. [ruby-dev:33348] + + * parser.y (reg_fragment_check_gen, reg_compile_gen): automatically + update regexp literal's encoding from US-ASCII to ASCII-8BIT when + script encoding is US-ASCII, the regexp has no kcode option and the + regexp includes non-ascii bytes. [ruby-dev:33353] + +Thu Jan 24 19:36:22 2008 Nobuyoshi Nakada + + * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead + object_id with printf. [ruby-dev:33347] + +Thu Jan 24 19:29:20 2008 Nobuyoshi Nakada + + * sprintf.c (remove_sign_bits): returns pointer to the first char to + be used, instead of copying. + + * sprintf.c (rb_str_format): negative indicator dots should come + before sign digits always. [ruby-dev:33224] + +Thu Jan 24 18:19:42 2008 Nobuyoshi Nakada + + * include/ruby/encoding.h (rb_enc_is_newline): parenthesized arguments. + +Thu Jan 24 18:14:14 2008 NAKAMURA Usaku + + * re.c (rb_reg_fixed_encoding_p): no need to treat ASCII-8BIT specially. + +Thu Jan 24 16:53:06 2008 NAKAMURA Usaku + + * re.c (rb_reg_initialize): 7bit clean regexp should be US-ASCII. + [ruby-dev:33346] + +Thu Jan 24 16:31:04 2008 Yukihiro Matsumoto + + * io.c (rb_io_getline_fast): the end point of left_char_head() + must be the last character. [ruby-cvs:22445] + +Thu Jan 24 16:24:25 2008 NAKAMURA Usaku + + * parse.y (reg_fragment_setenc_gen): recognize regexp with option n as + as ASCII-8BIT instead of US-ASCII. [ruby-dev:33339] + +Thu Jan 24 15:44:42 2008 Yukihiro Matsumoto + + * array.c (collect_bang_i): use rb_ary_store() to avoid potential + memory corruption. a patch from Yusuke Endoh + in [ruby-dev:33328]. + + * array.c (ITERATE): remove unnecessary macro. + + * array.c (sort_1): remove ary_sort_check(). in-place sort keep + original elements even when it's modified. + + * array.c (sort_2): ditto. + +Thu Jan 24 15:09:40 2008 Tanaka Akira + + * time.c (make_time_t): revert round trip test. [ruby-dev:33058] + +Thu Jan 24 11:14:56 2008 Tanaka Akira + + * string.c (rb_enc_cr_str_buf_cat): ASCII incompatible encoding is + not compatible with any other encoding. + +Thu Jan 24 07:34:34 2008 NARUSE, Yui + + * parse.y (STR_NEW0): set encoding as US-ASCII. + +Thu Jan 24 03:47:41 2008 NARUSE, Yui + + * lib/rexml/text.rb, lib/rubygems/open-uri.rb, lib/open-uri.rb, + test/logger/test_logger.rb, test/ruby/test_regexp.rb: + fix tests. [ruby-dev:33336] + +Thu Jan 24 03:23:44 2008 Yukihiro Matsumoto + + * string.c (rb_str_each_line): use memchr(3) for faster newline + search. + + * io.c (appendline): remove unused arguments + + * io.c (rb_io_getline_fast): make much simpler (and faster). + +Thu Jan 24 02:13:07 2008 Yusuke Endoh + + * insns.def (expandarray): fix stack inc. [ruby-dev:32892] + + * bootstraptest/test_knownbug.rb, test_massign.rb: move a fixed test. + +Thu Jan 24 01:00:34 2008 NARUSE, Yui + + * encoding.{c, h} (rb_usascii_encoding): added. + + * parse.y (parser_str_new, rb_intern3): ascii only string literal is + US-ASCII. + + * ruby.c (proc_optionc): -Kn means ASCII-8BIT. + +Wed Jan 23 23:54:40 2008 Yusuke Endoh + + * sprintf.c: fix comment. [ruby-dev:33275] + + * math.c: fix comment. [ruby-dev:33276] + +Wed Jan 23 22:47:34 2008 Yusuke Endoh + + * test/ruby/test_struct.rb: add tests to achieve over 90% test + coverage of struct.c. + + * test/ruby/test_sprintf.rb: ditto for sprintf.c. + + * test/ruby/test_math.rb: ditto for math.c. + +Wed Jan 23 22:14:28 2008 Nobuyoshi Nakada + + * enc/trans/japanese.c (rb_from_Windows_31J, rb_to_Windows_31J): + provisional workaround for Windows-31J. [ruby-dev:33320] + +Wed Jan 23 15:25:04 2008 Nobuyoshi Nakada + + * time.c (time_strftime): copy encoding from format. [ruby-dev:33303] + +Wed Jan 23 15:04:11 2008 Nobuyoshi Nakada + + * string.c (str_make_independent): should set length. + + * string.c (rb_str_associate): hide associated array from ObjectSpace. + + * string.c (rb_str_associated): return associated array with freezing + instead of false. [ruby-dev:33282] + + * string.c (rb_str_freeze): freeze associated array together. + +Wed Jan 23 13:39:48 2008 Tanaka Akira + + * re.c (rb_reg_prepare_re): fix SEGV by + /a/ =~ "aa".force_encoding("utf-16be"). + +Wed Jan 23 11:53:26 2008 Nobuyoshi Nakada + + * string.c (str_mod_check, str_nth, str_offset): constified. + + * string.c (rb_str_dump): dump in ASCII-8BIT always. + +Wed Jan 23 10:18:10 2008 Yukihiro Matsumoto + + * eval_method.c (rb_export_method): set ruby_vm_redefined_flag for + visibility change as well. reported by K.Kosako in + http://d.hatena.ne.jp/kkos/20080122#1201012720. + +Tue Jan 22 22:26:23 2008 Yusuke Endoh + + * test/ruby/test_bignum.rb: change some tests because rational + redefines Bignum#quo and Bignum#**. + +Tue Jan 22 20:58:15 2008 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): need to output sodir rule. + +Tue Jan 22 19:37:16 2008 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): lib files shouldn't depend on install + dir because if the dir is newer than lib files, lib files will be + always copied. + +Tue Jan 22 17:52:52 2008 Martin Duerst + + * enc/trans/utf_16_32.c: Streamline parentheses, add more + 'static' qualifiers. + +Tue Jan 22 12:57:07 2008 Yukihiro Matsumoto + + * configure.in (MINIRUBY): remove -I$(EXTOUT)/$(arch) from + MINIRUBY since miniruby might not be able to load DLL. + + * test/ruby/test_m17n.rb: move tests from bootstrap test. + + * encoding.c (enc_find): should check name if ASCII compatible. + + * string.c (rb_str_end_with): should check character boundary. + + * encoding.c (rb_enc_compatible): encoding must be ASCII + compatible before checking ENC_CODERANGE_7BIT. + + * encoding.c (rb_enc_compatible): wrong compatibility condition. + [ruby-dev:33273] + +Tue Jan 22 09:26:47 2008 Nobuyoshi Nakada + + * string.c (rb_str_each_char): iterates over a shadow. + [ruby-dev:33243] + +Tue Jan 22 08:59:52 2008 Eric Hodel + + * lib/rdoc/ri/formatter.rb: Indent labeled lists like note lists. + + * test/rdoc/test_rdoc_ri_overstrike_formatter.rb: Added. + + * test/rdoc/test_rdoc_ri_formatter.rb: Added tests. + +Tue Jan 22 04:40:28 2008 Yukihiro Matsumoto + + * parse.y (rb_intern3): do not call rb_enc_mbclen() if *m is + ASCII. [ruby-talk:287225] + + * string.c (rb_str_each_line): use rb_enc_is_newline() to gain + performance if the record separator ($/) is not modified. + +Tue Jan 22 01:15:51 2008 Kazuhiro NISHIYAMA + + * ChangeLog: format-time-string under C locale. [ruby-dev:33261] + +Tue Jan 22 00:45:12 2008 Yusuke Endoh + + * test/ruby/test_bignum.rb: add tests for bignum.c. + +Tue Jan 22 00:30:08 2008 Yusuke Endoh + + * bignum.c (big_shift): fix a bug that caused infinite loop when + left shifting. + +Mon Jan 21 20:09:38 2008 Tadayoshi Funaba + + * lib/date.rb (marshal_load): initialize the cache. + +Mon Jan 21 19:42:42 2008 Martin Duerst + + * transcode.c, enc/trans/utf_16_32.c, test/ruby/test_transcode.rb: + added UTF-32BE and UTF-32LE conversions. + +Mon Jan 21 14:36:14 2008 Nobuyoshi Nakada + + * transcode.c (str_transcode): initialize transcoder in + rb_transcoding. [ruby-dev:33234] + + * transcode_data.h (rb_transcoding): transcoder constified. + +Mon Jan 21 12:50:02 2008 Nobuyoshi Nakada + + * eval.c, gc.c (setjmp): sigsetjmp is a macro on cygwin. + +Mon Jan 21 12:35:00 2008 Nobuyoshi Nakada + + * transcode.c (transcode_loop, str_transcoding_resize): use unsigned + char. [ruby-dev:33232] + + * transcode_data.h (rb_transcoding, rb_transcoder): removed callback + parameters. + + * enc/trans/japanese.c: ditto. + + * enc/trans/utf_16_32.c: parenthesized bit-or operands. + +Mon Jan 21 11:59:00 2008 Nobuyoshi Nakada + + * string.c (rb_str_each_char): move forward. [ruby-dev:33231] + +Mon Jan 21 06:40:03 2008 Nobuyoshi Nakada + + * transcode.c (transcode_dispatch): constified return value. + + * transcode_data.h (rb_transcoding): include pointer to rb_transcoder + and auxiliary data. + + * transcode_data.h (rb_transcoder): all callback functions should have + their own parameters. + + * enc/trans/{japanese,single_byte}.c: constified. + +Mon Jan 21 03:45:49 2008 Nobuyoshi Nakada + + * string.c (rb_str_each_char): advance offset before get next char + length. [ruby-dev:33211] + +Sun Jan 20 20:00:20 2008 Martin Duerst + + * transcode.c, enc/trans/utf_16_32.c, test/ruby/test_transcode.rb: + added UTF-16LE conversions. + + * fixed changelog for last commit + +Sun Jan 20 17:54:00 2008 Martin Duerst + + * added changelog for last commit + +Sun Jan 20 15:08:08 2008 Martin Duerst + + * enc/trans/utf_16_32.c: new file, currently implementing + UTF-16BE conversions only. + + * test/ruby/test_transcode.rb: Added tests for UTF-16BE; + made check_both_ways() use force_encoding differently. + + * transcode_data.h, transcode.c: Support for more conversion + functions. + +Sun Jan 20 13:06:01 2008 Nobuyoshi Nakada + + * string.c (rb_str_each_char): performance improvement, and stop if + shortened in the block. [ruby-dev:33189] + +Sun Jan 20 09:12:26 2008 NARUSE, Yui + + * common.mk: use -Ks when read insns.def. [ruby-dev#33185] + + * parse.y: fix -e and stdin strings aren't set encoding. + +Sun Jan 20 05:12:44 2008 NARUSE, Yui + + * enc/make_encdb.rb: fix duplication check. + +Sun Jan 20 05:03:46 2008 NARUSE, Yui + + * ascii.c: remove definition of replica KOI8-U. + +Sun Jan 20 00:33:59 2008 NARUSE, Yui + + * enc/koi8_u.c: added. + + * regenc.c, enc/utf_8.c, enc/unicode.c, enc/gb18030.c: add ARG_UNUSED. + +Sat Jan 19 22:41:39 2008 Tanaka Akira + + * string.c (coderange_scan): don't call mbclen functions for ASCII + characters with ASCII compatible encoding. + +Sat Jan 19 21:00:34 2008 Tanaka Akira + + * lib/rdoc/template.rb (RDoc): defined to avoid uninitialized constant + error by `./ruby test/rubygems/test_gem_server.rb'. + +Sat Jan 19 20:41:29 2008 Tanaka Akira + + * encoding.c (enc_new): don't free rb_encoding to avoid SEGV by + `miniruby -e exit' on x86_64 GNU/Linux. + +Sat Jan 19 18:40:19 2008 Tadayoshi Funaba + + * lib/date.rb (once): use an instance variable which points a hash + as cache. [experimental] + +Sat Jan 19 17:21:29 2008 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: parse's hints as an + experimental function has been removed. + +Sat Jan 19 11:21:53 2008 Nobuyoshi Nakada + + * configure.in (sigsetjmp): check if available. + + * eval.c, gc.c (setjmp): do not use _setjmp if sigsetjmp is available. + +Sat Jan 19 11:10:11 2008 Nobuyoshi Nakada + + * configure.in: Remove wrong assumptions about Cygwin. a patch from + Corinna Vinschen in [ruby-Bugs-17018]. + +Sat Jan 19 09:23:14 2008 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_set_safe_array): should not use + recursive calling. + + * test/win32ole/test_win32ole_variant.rb: ditto. + +Sat Jan 19 08:58:47 2008 Eric Hodel + + * lib/rdoc/markup: Remove ListBase and Line constants. + + * lib/rdoc/ri: Allow output IO to be specified. + + * test/rdoc/parser/test_parse_c.rb: Move up one level, fixed. + + * test/rdoc/parser/test_rdoc_markup_attribute_manager.rb: Renamed to + match new class name, updated to match new classes. + + * test/rdoc/test_rdoc_ri_formatter.rb: Start of RI formatting tests. + + * test/rdoc/test_rdoc_ri_attribute_manager.rb: Start of + RDoc::RI::AttributeManager tests. + + * test/rdoc/test_simple_markup.rb: Moved to match new class name. + +Sat Jan 19 08:35:36 2008 Nobuyoshi Nakada + + * parse.y (parser_prepare): get encoding from the first line. + [ruby-dev:33168] + + * ruby.c (load_file): set encoding to input with set_encoding. + +Sat Jan 19 03:46:42 2008 Yukihiro Matsumoto + + * thread.c (thread_create_core): prohibit thread creation in the + frozen thread group. a patch in [ruby-dev:33176] from sheepman + . + + * thread.c (thread_create_core): should inherit ThreadGroup from + the current thread. + +Sat Jan 19 00:37:19 2008 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): set result encoding for wider width. + +Sat Jan 19 00:13:19 2008 NAKAMURA Usaku + + * thread_win32.c (w32_wait_events): shouldn't invoke interrupt handle + by timer_thread. + +Fri Jan 18 23:49:41 2008 Nobuyoshi Nakada + + * thread.c (thread_create_core): set thread group before creating + thread. + +Fri Jan 18 20:19:51 2008 NAKAMURA Usaku + + * parse.y (ripper_initialize): too early to set parser->enc. + +Fri Jan 18 20:03:05 2008 NAKAMURA Usaku + + * win32/setup.mak (BASERUBY): nmake cannot execute ruby correctly + if the path of ruby.exe is quoted. + + * win32/setup.mak ($(ARCH)): if a macro is appended by $(APPEND), + a space will be inserted on the top of the line. + +Fri Jan 18 17:56:09 2008 Nobuyoshi Nakada + + * eval_intern.h, insnhelper.h, thread_pthread.h, vm_core.h, vm_opts.h: + prefixed include guards with RUBY. + + * id.h: added include guard. + + * regenc.h, regint.h, regparse.h: prefixed include guards with + ONIGURUMA. + +Fri Jan 18 15:57:05 2008 Nobuyoshi Nakada + + * thread.c (thread_cleanup_func): ignore errors from destroying mutex + of dead thread. [ruby-core:15069] + + * thread_pthread.c, thread_win32.c (native_thread_destroy): ditto. + +Fri Jan 18 15:56:04 2008 Nobuyoshi Nakada + + * encoding.c (rb_enc_name_list_i, rb_enc_aliases_enc_i): freeze + element strings to be returned. + +Fri Jan 18 14:36:34 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_m17n.rb (test_str_dump): added test for + String#dump. [ruby-dev:33142] + +Fri Jan 18 12:25:13 2008 Nobuyoshi Nakada + + * encoding.c (load_encoding): check if successfully loaded. + + * encoding.c (rb_enc_find_index): use original encoding name to + replicate loaded encoding instead alias. + +Fri Jan 18 09:43:02 2008 NAKAMURA Usaku + + * re.c (rb_char_to_option_kcode): Regexp switch `s' should mean + Windows-31J, as wells as `-Ks'. + +Fri Jan 18 09:22:07 2008 Yukihiro Matsumoto + + * parse.y (parser_initialize): explicitly call rb_ascii8bit_encoding(). + + * parse.y (parser_prepare): lex_input may not be have encoding (e.g. IO). + + * parse.y (rb_parser_compile_string): set encoding from input string. + + * encoding.c (rb_enc_find_index): use ASCII-8BIT if loading known + encoding failed. + + * parse.y (ripper_initialize): move parser->enc initialization. + + * encoding.c (rb_enc_aliases_enc_i): exclude non alias names from + Encoding.aliases. + + * encoding.c (rb_enc_find_index): use original encoding name to + load DLL. + +Fri Jan 18 07:06:25 2008 Yukihiro Matsumoto + + * io.c (Init_IO): stdin/stdout may not be duplex. + +Fri Jan 18 04:27:57 2008 Eric Hodel + + * sample/rdoc/markup/rdoc2latex.rb: Fix for new namespacing. + + * lib/rdoc/markup/to_latex.rb: Fix namespacing. + +Fri Jan 18 02:02:28 2008 Nobuyoshi Nakada + + * bootstraptest/runner.rb (assert_valid_syntax): added. + + * bootstraptest/test_knownbug.rb: added test for [ruby-list:44479] + +Fri Jan 18 01:48:06 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (vm_call_method): check argument number to + attr_reader. [ruby-core:15120] + +Fri Jan 18 00:49:31 2008 Nobuyoshi Nakada + + * io.c (rb_io_check_readable): flush tied write IO too. + + * io.c (Init_IO): tie stdin with stdout. [ruby-core:15107] + +Fri Jan 18 00:23:31 2008 Nobuyoshi Nakada + + * encoding.c (enc_free): removed since rb_encoding may be used while + cleanup. + +Fri Jan 18 00:17:19 2008 Nobuyoshi Nakada + + * enc/euc_cn.c: split from enc/euc_kr.c. + +Fri Jan 18 00:03:54 2008 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_init): use default external encoding + if nothing is given. a patch from sheepman in [ruby-dev:33159]. + +Thu Jan 17 23:56:20 2008 Nobuyoshi Nakada + + * common.mk (encdb.h): give output file name to make_encdb.rb. + + * encoding.c (enc_table): simplified. + + * encoding.c (enc_register_at): lazy loading. [ruby-dev:33013] + + * regenc.h (ENC_DUMMY): added. + + * enc/make_encdb.rb: now emits macros only. + + * enc/iso_2022_jp.h: split from encoding.c. + +Thu Jan 17 21:48:21 2008 Nobuyoshi Nakada + + * re.c (rb_char_to_option_kcode): fixed typo. + +Thu Jan 17 21:01:25 2008 Tadayoshi Funaba + + * lib/date.rb (Date::Infinity#<=>): didn't work. A patch from + Dirkjan Bussink [ruby-core:15098]. + This is a bug obviously. However it didn't affect the library's + functions. + + * lib/date.rb, lib/date/format.rb: some trivial changes. + +Thu Jan 17 13:07:18 2008 Yukihiro Matsumoto + + * string.c (rb_str_dump): preserve the encoding of source string + if it is ASCII compatible. otherwise, add '.force_encoding()' + for ugly work around. maybe we should implement some other way + to keep non ASCII encoding in dumped string. [ruby-dev:33142] + +Thu Jan 17 10:30:32 2008 Yukihiro Matsumoto + + * io.c (io_fwrite): always flush IO on tty, even without newlines. + [ruby-core:15107] + +Wed Jan 16 22:45:27 2008 Nobuyoshi Nakada + + * encoding.c (enc_register_at): make own copy. [ruby-dev:33136] + +Wed Jan 16 18:03:10 2008 Nobuyoshi Nakada + + * io.c (pipe_open, rb_io_s_popen): clear temporary object to release + and prevent from GC. + +Wed Jan 16 17:55:07 2008 NAKAMURA Usaku + + * numeric.c (fix_quo): typo. a patch from Shin-ichiro HARA + in [ruby-dev:33130] + +Wed Jan 16 17:36:26 2008 NAKAMURA Usaku + + * test/test_delegate.rb: add new test file for delegate.rb. + +Wed Jan 16 16:14:00 2008 Akinori MUSHA + + * ruby.1: Fix grammar. + +Wed Jan 16 15:26:31 2008 Nobuyoshi Nakada + + * file.c (sys_fail2): get rid of unlimited alloca. + + * io.c (mode_enc, pipe_open, rb_io_s_popen): ditto. + + * load.c (rb_feature_p): ditto. + + * object.c (rb_cstr_to_dbl): ditto. + + * io.c (mode_enc): fixed uninitialized variable. + +Wed Jan 16 12:51:30 2008 Nobuyoshi Nakada + + * include/ruby/intern.h (rb_str_tmp_new, rb_str_shared_replace): + prototype moved. + +Tue Jan 15 23:52:51 2008 NARUSE, Yui + + * enc/*: add ARG_UNUSED. + + * enc/koi8_u.c: added. + +Tue Jan 15 23:00:08 2008 NARUSE, Yui + + * enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct + OnigEncodingST by OnigEncoding. + +Tue Jan 15 22:30:43 2008 NARUSE, Yui + + * encoding.c (ENC_REGISTER): use &OnigEncoding*. + (ENCINDEX_UTF_8): renamed from ENCINDEX_UTF8. + (rb_enc_init): use ENC_REGISTER. + + * include/ruby/oniguruma.h (OnigEncodingUTF8, ONIG_ENCODING_UTF8): + removed. + + * enc/*.c: remove use of &encoding_*; use enc argument instead. + +Tue Jan 15 18:44:46 2008 Yukihiro Matsumoto + + * enc/utf_8.c: remove use of ONIG_ENCODING_UTF8 altogether; use + enc argument instead. + +Tue Jan 15 18:05:26 2008 NAKAMURA Usaku + + * enc/utf_8.c (ONIG_ENCODING_UTF8): reverted. + +Tue Jan 15 18:01:55 2008 NAKAMURA Usaku + + * win32/Makefile.sub (MKFILES): add dependencies. + +Tue Jan 15 18:00:16 2008 Yukihiro Matsumoto + + * enc/utf_8.c (OnigEncodingDefine): encoding name should be kept + unchanged. + +Tue Jan 15 17:53:05 2008 Nobuyoshi Nakada + + * enc/utf_8.c: renamed as IANA name. + + * enc/Makefile.in: ditto. + +Tue Jan 15 16:59:31 2008 Nobuyoshi Nakada + + * ruby.c (proc_options): encoding libraries cannot be loaded until + load path is set. + +Tue Jan 15 15:09:28 2008 Nobuyoshi Nakada + + * win32/setup.mak: strip out empty lines from CPP output. + +Tue Jan 15 14:57:38 2008 Nobuyoshi Nakada + + * {win,bcc}32/setup.mak (-basic-vars-): expand BASERUBY to full path + to get rid of ./ruby.exe. + + * win32/enc-setup.mak: workaround for Borland make. + +Tue Jan 15 14:44:53 2008 Nobuyoshi Nakada + + * encoding.c (rb_locale_charmap): use ASCII-8BIT in miniruby. + +Tue Jan 15 13:54:41 2008 NAKAMURA Usaku + + * {bcc32,win32}/Makefile.sub (RUNRUBY): need to set archdir when + invoking ruby. + +Tue Jan 15 13:43:18 2008 NAKAMURA Usaku + + * common.mk (us_ascii.o): add dependencies. [ruby-dev:33111] + +Tue Jan 15 03:41:42 2008 Nobuyoshi Nakada + + * eval.c (eval): check if backtrace is empty. [ruby-core:15040] + +Tue Jan 15 01:28:47 2008 Nobuyoshi Nakada + + * common.mk: simplified dummy objects dependencies. + +Tue Jan 15 01:19:00 2008 Nobuyoshi Nakada + + * common.mk (OBJS): moved encoding.o from COMMONOBJS. + + * common.mk (dmyencoding.o): added. [ruby-dev:33099] + + * configure.in, {win,bcc}32/Makefile.sub (MINIOBJS): added + dmyencoding.o. + + * dmyencoding.c (rb_locale_charmap): returns nil for miniruby. + +Tue Jan 15 00:05:50 2008 Yukihiro Matsumoto + + * io.c (appendline): specifying limit should not generate broken + byte sequence. strings should be rounded. [ruby-dev:33088] + +Mon Jan 14 23:33:02 2008 NARUSE, Yui + + * ext/nkf/lib/kconv.rb (Kconv.tolocale): argument is str. + +Mon Jan 14 23:31:05 2008 Yukihiro Matsumoto + + * configure.in (setup): add -I$(EXTOUT)/$(arch) to MINIRUBY. + + * bootstraptest/runner.rb (main): expand -I directory path. + +Mon Jan 14 23:28:10 2008 NAKAMURA Usaku + + * win32/enc-setup.mak (BUILTIN_ENCOBJS): depends on enc/Makefile.in. + +Mon Jan 14 22:48:16 2008 Yukihiro Matsumoto + + * re.c (rb_char_to_option_kcode): use rb_enc_find_index() instead + of using fixed index value. + + * enc/Makefile.in (encsrcdir): make US-ASCII built-in. + +Mon Jan 14 22:25:02 2008 WATANABE Hirofumi + + * golf_prelude.rb: Shorter method name completion. Same method + used for const missing. do_while and do_until added. Enumerator + gains all of Array's abilities. Ex: + '123'.m{|i|i*2} #=> "112233" + '123'.pe #=> '123'.perm*' ' #=> "123 132 213 231 312 321" + base on a patch from Darren Smith . + +Mon Jan 14 21:10:02 2008 Yukihiro Matsumoto + + * enc/us_ascii.c: wrong alias name: ANSI_X3.4-1986. + + * rubytest.rb: add -I#{srcdir} to load encoding DLL. + +Mon Jan 14 18:53:58 2008 Koichi Sasada + + * thread.c: clear thread structure. + (TODO: survey that child process should clear mutex or not). + + * bootstraptest/test_knownbug.rb, test_thread.rb: move a fixed test. + +Mon Jan 14 18:43:38 2008 Koichi Sasada + + * bootstraptest/runner.rb: add "flunk" method. + + * bootstraptest/test_knownbug.rb: fix to use flunk. + +Mon Jan 14 18:10:59 2008 Koichi Sasada + + * vm.h: remove dangerous assembler sentence. + +Mon Jan 14 18:06:37 2008 NARUSE, Yui + + * encoding.c (rb_locale_encoding): return US-ASCII when charmap is + nil. + +Mon Jan 14 16:12:58 2008 Yukihiro Matsumoto + + * lib/shellwords.rb: scape should be an alias to shellescape. a + patch from Masahiro Kawato in + [ruby-dev:33060]. + +Mon Jan 14 16:09:16 2008 Yukihiro Matsumoto + + * ruby.1: a patch to describe --encoding. a patch from Yugui + in [ruby-dev:33079]. + + * ruby.c: ditto. + +Mon Jan 14 13:49:26 2008 Tanaka Akira + + * re.c (rb_reg_prepare_re): initialize error message buffer. + (rb_reg_search): ditto. + (rb_reg_check_preprocess): ditto. + (rb_reg_new_str): ditto. + (rb_enc_reg_new): ditto. + (rb_reg_compile): ditto. + (rb_reg_initialize_m): ditto. + (rb_reg_s_union_m): ditto. + +Mon Jan 14 12:33:07 2008 Eric Hodel + + * lib/rdoc/markup*: Renamespace from SM::SimpleMarkup to + RDoc::Markup. + +Mon Jan 14 10:45:45 2008 Martin Duerst + + * enc/ascii.c: Exchanged order of arguments for one ENC_ALIAS + +Mon Jan 14 09:19:07 2008 Tadayoshi Funaba + + * lib/time.rb: do not reference Time directly from the inside of + definitions. [ruby-dev:33059] + +Mon Jan 14 05:44:44 2008 NARUSE, Yui + + * enc/*.c: add replicas and aliases. + + * enc/make_encdb.h: add duplicate and undefined check. + +Mon Jan 14 02:03:05 2008 NARUSE, Yui + + * include/ruby/oniguruma.h: remove ONIG_ENCODING_* and OnigEncoding* + which are not builtin. + + * regenc.{c,h} (onigenc_mb2_code_to_mbclen, onigenc_mb4_code_to_mbclen): + fix prototype. + + * enc/big5.c, enc/euc_kr.c, enc/euc_tw.c, enc/gb18030.c, + enc/koi8_r.c, enc/windows_1251.c: imported from Oniguruma. + +Sun Jan 13 22:47:28 2008 NARUSE, Yui + + * enc/make_encdb.h: sort encoding names by original name. + + * encoding.c, enc/*.c: define replicas and aliases. + +Sun Jan 13 20:24:03 2008 NARUSE, Yui + + * encoding.c: add documents. + +Sun Jan 13 18:41:48 2008 Nobuyoshi Nakada + + * encoding.c (Init_Encoding): moved initialization from encdb.h. + + * enc/make_encdb.rb (enc_name_list): constified. + + * enc/make_encdb.rb (enc_init_db): moved some functions to encoding.c. + +Sun Jan 13 13:53:00 2008 Nobuyoshi Nakada + + * ruby.c (load_file): local variable was not initialized when -x flag + is given. + + * ruby.c (load_file): script files should not be affected by locale. + [ruby-dev:33054] + +Sun Jan 13 12:01:32 2008 Eric Hodel + + * lib/rdoc/generators*: Reorganize RDoc generators. + +Sun Jan 13 11:41:11 2008 NARUSE, Yui + + * encoding.c (ENCINDEX_EUC_JP, ENCINDEX_SJIS): removed. + (rb_enc_init): EUC-JP and Shift_JIS are not builtin now. + + * enc/Makefile.in: ditto. + + * common.mk: ditto. + + * ruby.c (proc_options): ditto. + + * enc/shift_jis.c, enc/euc_jp.c: fixes for remove from builtin. + +Sun Jan 13 10:21:40 2008 Nobuyoshi Nakada + + * encoding.c (enc_table): packed all enc_table stuff. + +Sun Jan 13 09:58:17 2008 NARUSE, Yui + + * encoding.c (rb_enc_init): revert removing SJIS. + + * enc/sjis.c: move to enc/shift_jis.c, to make encoding name equal to + filename for convenience of loading lib. + + * enc/shift_jis.c: moved from enc/sjis.c. + + * common.mk: follows enc/shift_jis.c. + + * enc/Makefile.in: ditto. + +Sun Jan 13 09:22:33 2008 Nobuyoshi Nakada + + * common.mk (incs): includes encdb.h. + +Sun Jan 13 09:17:29 2008 Nobuyoshi Nakada + + * {bcc,win}32/Makefile.sub (MV): use move instead of ren. [ruby-Bugs-17019] + +Sun Jan 13 01:52:31 2008 Yukihiro Matsumoto + + * enc/make_encdb.rb: should work on Ruby 1.8. [ruby-dev:33069] + + * common.mk (encdb.h): pass enc dir from outside to make_encdb.rb. + +Sun Jan 13 00:01:07 2008 NARUSE, Yui + + * enc/make_encdb.rb: added. search enc/*.c and make encoding database. + + * regenc.h (ENC_REPLICATE, ENC_ALIAS): added for defining replica + encoding and encoding alias. + + * encoding.c (rb_enc_init): move alias definitions to enc/*.c. + (rb_enc_find_index): search original of replica and alias when no + encoding library. + (rb_enc_name_list, rb_enc_aliases_enc_i, rb_enc_aliases_str_i, + rb_enc_aliases, Encoding.name_list, Encoding.aliases): added. + (Init_Encoding): init encdb. + + * enc/ascii.c, enc/us_ascii.c, enc/euc_jp.c, enc/sjis.c: + add replica encoding and encoding alias definition. + + * common.mk (dist-clean-local): add rule for remove encdb.h. + +Sat Jan 12 18:27:41 2008 Nobuyoshi Nakada + + * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should + define/undef on a singleton class. [ruby-core:09959] + +Sat Jan 12 12:44:36 2008 NARUSE, Yui + + * ext/nkf/nkf.c: rdoc update. + +Sat Jan 12 12:01:49 2008 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: tuning for performance. + +Sat Jan 12 11:29:45 2008 Nobuyoshi Nakada + + * bootstraptest/test_proc.rb: fixed wrong expected result. pointed + out by Kornelius "murphy" Kalnbach in + [ruby-core:15022]. + +Sat Jan 12 04:38:38 2008 NARUSE, Yui + + * ruby.c (process_options): -e'script' is locale encoding by default. + (load_file): ruby script from stdin is locale encoding by default. + +Sat Jan 12 04:31:59 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: fix bug: -m was -m0. + +Fri Jan 11 23:22:31 2008 Tanaka Akira + + * string.c (string.c): call rb_str_buf_append to update encoding of + str1, even if str2 is empty. + +Fri Jan 11 20:20:16 2008 Nobuyoshi Nakada + + * proc.c (proc_mark): needs to mark the receiver too. a patch from + Chris Heath in [ruby-core:14983]. + [ruby-core:14885] + +Fri Jan 11 18:28:49 2008 Eric Hodel + + * lib/rdoc/usage.rb: Removed. + + * lib/getoptlong.rb: Update example to not use lib/rdoc/usage.rb. + +Fri Jan 11 18:17:10 2008 Eric Hodel + + * lib/rdoc/ri/driver.rb (read_yaml): Follow namespace change + [ruby-core:14964]. + +Fri Jan 11 16:55:21 2008 Nobuyoshi Nakada + + * string.c (rb_str_append): performance improvement. + +Fri Jan 11 12:35:56 2008 Nobuyoshi Nakada + + * configure.in: moved broken syscall checks from process.c etc. + + * defines.h (WORDS_BIGENDIAN): honor __BIG_ENDIAN__ than the result of + configure. + + * lib/rdoc/options.rb (check_diagram): more precise check, darwin + is not Windows but mingw is on it. + +Fri Jan 11 09:59:05 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: update to r1.163. + + * ext/nkf/nkf.c: ASCII's canonical name is US-ASCII. + + * ext/nkf/lib/kconv.rb (Kconv.isjis): force_encoding('BINARY'). + +Fri Jan 11 09:23:31 2008 NARUSE, Yui + + * encoding.c (set_base_encoding): must use rb_enc_dummy_p. + +Fri Jan 11 06:13:14 2008 Nobuyoshi Nakada + + * encoding.c (rb_to_encoding_index, rb_to_encoding): disallow nil. + [ruby-dev:33003] + +Fri Jan 11 01:08:01 2008 Yukihiro Matsumoto + + * thread.c (rb_mutex_unlock): proper error message for unlocking + mutex that is not locked. a patch from Yusuke ENDOH + in [ruby-dev:33010]. + +Thu Jan 10 18:00:41 2008 Yukihiro Matsumoto + + * prelude.rb (Mutex::synchronize): capture exception from unlock. + [ruby-dev:32935] + +Thu Jan 10 10:15:03 2008 Yukihiro Matsumoto + + * io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as + IO.pipe("euc-jp", nil). [ruby-dev:33000] + + * io.c (io_encoding_set): handle nil for v1. + +Thu Jan 10 02:41:22 2008 Yukihiro Matsumoto + + * io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918] + + * io.c (io_read_encoding): need not to return ASCII-8BIT for + binary IO. + +Wed Jan 9 22:04:17 2008 Kazuhiro NISHIYAMA + + * lib/mathn.rb (Prime#each): returns an enumerator if no block + given. [ruby-dev:32815] + +Wed Jan 9 22:03:26 2008 NARUSE, Yui + + * encoding.c (rb_enc_replicate): replica of dummy is a dummy. + +Wed Jan 9 20:55:38 2008 Yukihiro Matsumoto + + * lib/e2mmap.rb (Exception2MessageMapper::Raise): define fail. + [ruby-dev:32854] + +Wed Jan 9 20:35:42 2008 GOTOU Yuuzou + + * lib/webrick/httprequest.rb: support X-Forwarded-* header fields. + WEBrick::HTTPRequest#{host,port,request_uri} is derived having + regards to X-Forwarded-Proto and X-Forwarded-Host. + + * lib/webrick/httprequest.rb + (WEBrick::HTTPRequest#server_name?): new method. + (WEBrick::HTTPRequest#remote_ip?): new method. + (WEBrick::HTTPRequest#ssl?): new method. + +Wed Jan 9 18:24:39 2008 WATANABE Hirofumi + + * golf_prelude.rb (Array#to_s): alias to join. + + * golf_prelude.rb (FalseClass#to_s): return "". + +Wed Jan 9 16:59:54 2008 Tanaka Akira + + * string.c (rb_enc_cr_str_buf_cat): fix self appending. + +Wed Jan 9 15:54:24 2008 Nobuyoshi Nakada + + * ruby.c (process_options): give priority command line encoding option + to RUBYOPT, and enable -E option in RUBYOPT. + + * ruby.c (load_file): deal with encoding option in shebang line if + nothing in command line and RUBYOPT. + +Wed Jan 9 14:55:36 2008 NAKAMURA Usaku + + * parse.y (yycompile0): remove setting parser->enc because it is set + in parser_prepare() by previous change of parser_prepare(). + +Wed Jan 9 14:52:18 2008 Nobuyoshi Nakada + + * string.c (rb_enc_cr_str_buf_cat, rb_str_buf_append): deal with self + appending. + +Wed Jan 9 14:44:57 2008 NAKAMURA Usaku + + * parse.y (parser_prepare): set parser->enc from lex_input for ripper. + +Wed Jan 9 13:45:52 2008 GOTOU Yuuzou + + * lib/webrick/server.rb (WEBrick::HTTPServer#start): + :DoNotReverseLookup option had not been performed. + +Wed Jan 9 13:03:34 2008 Yukihiro Matsumoto + + * string.c (rb_enc_cr_str_buf_cat): do not recalculate coderange + value if it's given from outside. + +Wed Jan 9 08:42:01 2008 James Edward Gray II + + * enum.c: Updating the documentation of Enumerable#zip to reflect + the recent changes Matz made to the method. + +Wed Jan 9 01:35:10 2008 NARUSE, Yui + + * enc/Makefile.in (BUILTIN_ENCS): UTF-{16,32}{BE,LE} are not builtin. + +Tue Jan 8 23:55:15 2008 NARUSE, Yui + + * encoding.c (rb_enc_init): UTF-{16,32}{BE,LE} are not builtin. + +Tue Jan 8 22:33:03 2008 NARUSE, Yui + + * encoding.c, Makefile.in, include/ruby/oniguruma.h, + enc/Makefile.in: fix rules for UTF-{16,32}{BE,LE}. + +Tue Jan 8 20:02:08 2008 Nobuyoshi Nakada + + * win{32,ce}/Makefile.sub: merged. + +Tue Jan 8 19:48:15 2008 Eric Hodel + + * lib/rdoc/ri/driver.rb: Speed up Marshal.load. Fix bug with nested + classes' methods. + +Tue Jan 8 19:17:29 2008 Eric Hodel + + * lib/rdoc/*: Clean up namespacing of RI's classes. + +Tue Jan 8 18:05:35 2008 Eric Hodel + + * bin/ri, lib/rdoc/ri/*: Replace with Ryan Davis' cached ri. + +Tue Jan 8 17:32:07 2008 Yukihiro Matsumoto + + * enum.c (enum_zip): honor length of the receiver, not the + shortest length. [ruby-core:14738] + + * enum.c (enum_zip): returns array not enumerator for no block + form. [ruby-core:14738] + + * enumerator.c (next_ii): do not ignore multiple values yielded. + + * array.c (rb_ary_zip): faster version without creating generators. + +Tue Jan 8 15:47:43 2008 NAKAMURA Usaku + + * enc/utf{16,32}_{be,le}.c: use &OnigEncodingName(*) instead of + ONIG_ENCODING_*. + +Tue Jan 8 15:40:31 2008 Nobuyoshi Nakada + + * regenc.c (onigenc_strlen_null, onigenc_str_bytelen_null): suppressed + warnings. + + * regenc.h, enc/unicode.c (onigenc_unicode_ctype_code_range): added + encoding argument. + + * enc/utf{16,32}_{be,le}.c: added init functions. + + * enc/utf{16,32}_{be,le}.c: imported from Oniguruma 5.9.1. + +Tue Jan 8 15:03:10 2008 Tanaka Akira + + * string.c (str_gsub): avoid appending empty pre-match substr. + +Tue Jan 8 13:05:57 2008 Nobuyoshi Nakada + + * compile.c (iseq_build_from_ary), iseq.c (iseq_load): fix for format change. + +Tue Jan 8 07:56:11 2008 Tanaka Akira + + * string.c (rb_str_buf_append): fix append itself. + +Tue Jan 8 01:13:50 2008 Tanaka Akira + + * string.c (STR_ENC_GET): defined. same as rb_enc_get without + enc_capable. + (coderange_scan): ASCII-8BIT test refined. + (rb_enc_cr_str_buf_cat): new internal function to accumulate + strings with encoding. + (rb_enc_str_buf_cat): use rb_enc_cr_str_buf_cat. + (rb_str_buf_append): ditto + (str_gsub): use rb_str_buf_append. + (rb_str_hash): use ENCODING_GET. + (rb_str_comparable): ditto. + (rb_str_cmp): compare encoding index, not rb_encoding address. + +Mon Jan 7 20:37:55 2008 GOTOU Yuuzou + + * lib/webrick/httpservlet/cgihandler.rb: external encoding of + tempfiles is set to "ASCII-8BIT". + +Mon Jan 7 19:39:50 2008 Eric Hodel + + * lib/rdoc/template.rb: Use ERB instead of custom template language. + + * lib/rdoc/generators/template/html/old_html.rb: Remove. + + * lib/rdoc/generators/template/*: Convert to ERB. + +Mon Jan 7 19:11:30 2008 Yukihiro Matsumoto + + * string.c (Init_String): sym_match arity spec was wrong. a patch + from Hiroyuki Iwatsuki in [ruby-dev:32957]. + +Mon Jan 7 18:10:33 2008 Tanaka Akira + + * string.c (str_gsub): move rb_enc_get(str) to out of loop. + +Mon Jan 7 15:52:10 2008 Tanaka Akira + + * include/ruby/oniguruma.h (OnigEncodingType): new member + ruby_encoding_index to avoid linear search in rb_enc_to_index. + + * include/ruby/encoding.h (rb_enc_to_index): macro defined to use + ruby_encoding_index. + + * encoding.c (rb_enc_to_index): removed. + (enc_register_at): initialize ruby_encoding_index member. + +Mon Jan 7 16:10:35 2008 Eric Hodel + + * lib/rdoc/tokenstream.rb: Namespace under RDoc. + +Mon Jan 7 16:06:09 2008 Eric Hodel + + * lib/rdoc/dot.rb: Namespace under RDoc. + + * lib/rdoc/diagram.rb: Clean up formatting. + +Mon Jan 7 15:51:35 2008 Eric Hodel + + * lib/rdoc/options.rb: Convert to OptionParser, clean up -h output, + namespace under RDoc. + * lib/rdoc/*: Namespace RDoc::Options. + +Mon Jan 7 15:42:46 2008 NAKAMURA Usaku + + * common.mk, Makefile.in, */Makefile.sub (distclean-local): move + removing rule of ext/ripper/y.output from common.mk to Makefiles + that depend on platforms. + +Mon Jan 7 13:54:57 2008 Tanaka Akira + + * re.c (rb_reg_preprocess): fix fixed_enc condition. + +Mon Jan 7 11:51:49 2008 Eric Hodel + + * lib/rdoc/generators/ri_generator.rb: Merge documentation from the + same class on output. Fixes bug where documentation could + disappear. + + * lib/rdoc/options.rb: Fix typo. + + * lib/rdoc/generators/*: Clean up some namespacing and make RDoc + consistent. + +Mon Jan 7 11:44:45 2008 Tanaka Akira + + * encoding.c (rb_enc_internal_get_index): extracted from + rb_enc_get_index. + (rb_enc_internal_set_index): extracted from rb_enc_associate_index + + * include/ruby/encoding.h (ENCODING_SET): work over ENCODING_INLINE_MAX. + (ENCODING_GET): ditto. + (ENCODING_IS_ASCII8BIT): defined. + (ENCODING_CODERANGE_SET): defined. + + * re.c (rb_reg_fixed_encoding_p): use ENCODING_IS_ASCII8BIT. + + * string.c (rb_enc_str_buf_cat): use ENCODING_IS_ASCII8BIT. + + * parse.y (reg_fragment_setenc_gen): use ENCODING_IS_ASCII8BIT. + + * marshal.c (has_ivars): use ENCODING_IS_ASCII8BIT. + +Mon Jan 7 02:14:07 2008 Tanaka Akira + + * string.c (coderange_scan): avoid rb_enc_to_index. + (rb_enc_str_buf_cat): ditto. + (str_cat_char): use rb_enc_str_buf_cat. + (rb_str_inspect): ditto. + +Mon Jan 7 01:36:49 2008 Tanaka Akira + + * string.c (coderange_scan): optimize ASCII-8BIT string. + (rb_enc_str_buf_cat): don't call coderange_scan if possible. + +Mon Jan 7 01:05:45 2008 Tanaka Akira + + * lib/erb.rb (ERB::Revision): cut off locale dependent string in Date + keyword. + +Mon Jan 7 00:48:02 2008 Tanaka Akira + + * Date keyword removed to avoid inclusion of locale dependent + string. [ruby-dev:32940] + +Sun Jan 6 21:14:12 2008 Tanaka Akira + + * re.c (rb_reg_initialize_str): forbid raw non ASCII character + for ASCII-8BIT regexp in non ASCII-8BIT script. + +Sun Jan 6 18:19:12 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_enc_str_buf_cat): declared. + + * string.c (coderange_scan): extracted from rb_enc_str_coderange. + (rb_enc_str_coderange): use coderange_scan. + (rb_str_shared_replace): copy encoding and coderange. + (rb_enc_str_buf_cat): new function for linear complexity string + accumulation with encoding. + (rb_str_sub_bang): don't conflict substituted part and replacement. + (str_gsub): use rb_enc_str_buf_cat. + (rb_str_clear): clear coderange. + + * re.c (rb_reg_regsub): use rb_enc_str_buf_cat. + +Sun Jan 6 17:55:44 2008 Technorama Ltd. + + * lib/securerandom.rb: Add Win32 support. + +Sun Jan 6 09:32:58 2008 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: introduced some constants + (for internal use) and aliases (minute and second). + + * sample/cal.rb: trivial adjustments. + +Sun Jan 6 01:38:07 2008 Tanaka Akira + + * re.c (rb_reg_initialize_str): /\x80/n is not an error even if script + encoding is EUC-JP. + +Sun Jan 6 00:48:12 2008 NARUSE, Yui + + * lib/resolv.rb (Resolv::DNS#each_address): get A record and then AAAA + record. [ruby-dev:32925] + +Sat Jan 5 21:48:03 2008 Tanaka Akira + + * vm_insnhelper.c (vm_callee_setup_arg): it is not inlinable because + alloca is used. + +Sat Jan 5 16:50:48 2008 Nobuyoshi Nakada + + * string.c (rb_str_resize): copy if old data is not empty + [ruby-core:14785] + +Sat Jan 5 13:04:24 2008 Nobuyoshi Nakada + + * ruby.c (proc_options): no need for intermediate object. + +Sat Jan 5 11:48:19 2008 Tanaka Akira + + * encoding.c (Init_Encoding): alias csWindows31J to Windows-31J. + IE6 accepts csWindows31J but Windows-31J. + +Sat Jan 5 02:21:10 2008 Tanaka Akira + + * include/ruby/ruby.h (rb_intern): memorize interned ID for constant + string, using gcc's __builtin_constant_p and statement expression. + +Sat Jan 5 02:14:45 2008 Yukihiro Matsumoto + + * string.c (trnext): should enable backslash escape. + +Sat Jan 5 01:50:32 2008 Yukihiro Matsumoto + + * eval.c (Init_eval): move instance_eval and instance_exec to + BasicObject. [ruby-core:14747] + + * lib/delegate.rb: should preserve new methods in BasicObject. + +Sat Jan 5 01:46:29 2008 Yukihiro Matsumoto + + * ruby.c (proc_options): update according to the last API revert. + +Sat Jan 5 01:30:30 2008 Nobuyoshi Nakada + + * include/ruby/intern.h, re.c (rb_reg_new): keep interface same as + 1.8. [ruby-core:14583] + + * include/ruby/intern.h, re.c (rb_reg_new_str): renamed, and defines + HAVE_RB_REG_NEW_STR macro to tell if it is available. + + * include/ruby/encoding.h (rb_enc_reg_new): added. + + * insns.def (toregexp), marshal.c (r_object0): use rb_reg_new_str(). + + * re.c (rb_reg_regcomp, rb_reg_s_union): ditto. + +Fri Jan 4 23:08:48 2008 Nobuyoshi Nakada + + * time.c (time_arg): use converted object. [ruby-core:14759] + +Fri Jan 4 16:24:58 2008 Tanaka Akira + + * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use + String#bytesize to avoid test errors on EUC-JP environment. + +Fri Jan 4 14:00:50 2008 Tanaka Akira + + * re.c (rb_reg_prepare_re): check string encoding. Oniguruma doesn't + support invalid encoding. + +Fri Jan 4 10:22:25 2008 Yukihiro Matsumoto + + * re.c (rb_reg_search): avoid inner loop for reverse search. + + * regexec.c: unset USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE + which is turned on since oniguruma 5.9.1. + +Fri Jan 4 02:53:31 2008 Tanaka Akira + + * enc/euc_jp.c: remove eucjp_ prefix. breakpoint can be specified as + euc_jp.c:mbc_enc_len. avoid needless conflict by merge. + + * enc/sjis.c: remove sjis_ prefix. + + * enc/utf8.c: remove utf8_ prefix. + + * enc/iso_8859_1.c: remove iso_8859_1_ prefix. + + * enc/iso_8859_2.c: remove iso_8859_2_ prefix. + + * enc/iso_8859_3.c: remove iso_8859_3_ prefix. + + * enc/iso_8859_4.c: remove iso_8859_4_ prefix. + + * enc/iso_8859_5.c: remove iso_8859_5_ prefix. + + * enc/iso_8859_6.c: remove iso_8859_6_ prefix. + + * enc/iso_8859_7.c: remove iso_8859_7_ prefix. + + * enc/iso_8859_8.c: remove iso_8859_8_ prefix. + + * enc/iso_8859_9.c: remove iso_8859_9_ prefix. + + * enc/iso_8859_10.c: remove iso_8859_10_ prefix. + + * enc/iso_8859_11.c: remove iso_8859_11_ prefix. + + * enc/iso_8859_13.c: remove iso_8859_13_ prefix. + + * enc/iso_8859_14.c: remove iso_8859_14_ prefix. + + * enc/iso_8859_15.c: remove iso_8859_15_ prefix. + + * enc/iso_8859_16.c: remove iso_8859_16_ prefix. + +Fri Jan 4 02:47:06 2008 Tanaka Akira + + * re.c (rb_reg_search): iterate onig_match for reverse mode. + +Fri Jan 4 01:20:21 2008 Nobuyoshi Nakada + + * win32.h: only VC6 needs extern "C++" for math.h. [ruby-talk:285660] + +Fri Jan 4 00:54:43 2008 Yukihiro Matsumoto + + * include/ruby/oniguruma.h: Oniguruma 5.9.1 merged. + +Fri Jan 4 00:20:47 2008 Tanaka Akira + + * io.c (io_ungetc): move data in buffer if it is required to store the + argument. + +Thu Jan 3 21:56:07 2008 Tanaka Akira + + * include/ruby/ruby.h (st_strcasecmp): declared for STRCASECMP. + (st_strncasecmp): declared for STRNCASECMP. + +Thu Jan 3 20:24:48 2008 Koichi Sasada + + * eval_jump.c (rb_f_catch): Restore cfp if caught thrown object. + +Thu Jan 3 19:45:57 2008 Koichi Sasada + + * bootstraptest/test_eval.rb, test_knownbug.rb: move a fixed test. + +Thu Jan 3 18:39:12 2008 Tanaka Akira + + * encoding.c: (rb_tolower, rb_toupper): body was exchanged. + +Thu Jan 3 17:54:01 2008 Tanaka Akira + + * regenc.h (onigenc_ascii_is_code_ctype): put back. + +Thu Jan 3 17:33:09 2008 Tanaka Akira + + * encoding.c (rb_isalnum): defined. + (rb_isalpha): ditto. + (rb_isblank): ditto. + (rb_iscntrl): ditto. + (rb_isdigit): ditto. + (rb_isgraph): ditto. + (rb_islower): ditto. + (rb_isprint): ditto. + (rb_ispunct): ditto. + (rb_isspace): ditto. + (rb_isupper): ditto. + (rb_isxdigit): ditto. + (rb_tolower): ditto. + (rb_toupper): ditto. + + * include/ruby/ruby.h: don't include include/ruby/encoding.h. + (rb_isascii): defined. + (rb_isalnum): declared. + (rb_isalpha): ditto. + (rb_isblank): ditto. + (rb_iscntrl): ditto. + (rb_isdigit): ditto. + (rb_isgraph): ditto. + (rb_islower): ditto. + (rb_isprint): ditto. + (rb_ispunct): ditto. + (rb_isspace): ditto. + (rb_isupper): ditto. + (rb_isxdigit): ditto. + (rb_tolower): ditto. + (rb_toupper): ditto. + (ISASCII): simplified. + (ISPRINT): ditto. + (ISSPACE): ditto. + (ISUPPER): ditto. + (ISLOWER): ditto. + (ISALNUM): ditto. + (ISALPHA): ditto. + (ISDIGIT): ditto. + (ISXDIGIT): ditto. + (TOUPPER): ditto. + (TOLOWER): ditto. + + * include/ruby/encoding.h (rb_isascii): removed. + (rb_isalnum): ditto. + (rb_isalpha): ditto. + (rb_isblank): ditto. + (rb_iscntrl): ditto. + (rb_isdigit): ditto. + (rb_isgraph): ditto. + (rb_islower): ditto. + (rb_isprint): ditto. + (rb_ispunct): ditto. + (rb_isspace): ditto. + (rb_isupper): ditto. + (rb_isxdigit): ditto. + (rb_tolower): ditto. + (rb_toupper): ditto. + + * common.mk: dependency updated. + +Thu Jan 3 15:10:26 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_isascii): simplified. + (rb_isalnum): call onigenc_ascii_is_code_ctype without indirect call. + (rb_isalpha): ditto. + (rb_isblank): ditto. + (rb_iscntrl): ditto. + (rb_isdigit): ditto. + (rb_isgraph): ditto. + (rb_islower): ditto. + (rb_isprint): ditto. + (rb_ispunct): ditto. + (rb_isspace): ditto. + (rb_isupper): ditto. + (rb_isxdigit): ditto. + + * include/ruby/oniguruma.h (onigenc_ascii_is_code_ctype): declaration + moved from regenc.h. + +Thu Jan 3 14:37:17 2008 Tanaka Akira + + * parse.y (parser_magic_comment): use STRNCASECMP. + (set_file_encoding): ditto. + +Thu Jan 3 11:44:37 2008 Tanaka Akira + + * time.c: don't mention an obsolete library, ParseDate. + +Thu Jan 3 11:28:58 2008 Nobuyoshi Nakada + + * io.c (fptr_finalize): clear errno first. [ruby-talk:284492] + +Thu Jan 3 05:02:36 2008 Tanaka Akira + + * enc/us_ascii.c: add us_ascii_ prefix for functions to ease + setting breakpoint when debugging. + + * enc/euc_jp.c: add eucjp_ prefix. + + * enc/sjis.c: add sjis_ prefix. + + * enc/iso_8859_1.c: add iso_8859_1_ prefix. + + * enc/iso_8859_2.c: add iso_8859_2_ prefix. + + * enc/iso_8859_3.c: add iso_8859_3_ prefix. + + * enc/iso_8859_4.c: add iso_8859_4_ prefix. + + * enc/iso_8859_5.c: add iso_8859_5_ prefix. + + * enc/iso_8859_6.c: add iso_8859_6_ prefix. + + * enc/iso_8859_7.c: add iso_8859_7_ prefix. + +Thu Jan 3 02:44:34 2008 Tanaka Akira + + * bignum.c (conv_digit): use ISDIGIT, ISLOWER and ISUPPER. + +Wed Jan 2 23:50:15 2008 Tanaka Akira + + * util.c (ruby_strtoul): "0x", "+" and "-" is not a valid integer. + end of integer should be just after "0", the beginning, the + beginning respectively. + +Wed Jan 2 15:23:15 2008 Tanaka Akira + + * util.c (ruby_strtoul): locale independent strtoul is implemented to + avoid "i".to_i(36) cause 0 under tr_TR locale on Debian GNU/Linux + 4.0 (Etch). + This is newly implemented, not a copy of missing/strtoul.c. + + * include/ruby/ruby.h (ruby_strtoul): declared. + (STRTOUL): defined to use ruby_strtoul. + + * bignum.c, pack.c, ext/socket/socket.c: use STRTOUL. + + * configure.in (strtoul): don't check. + + * missing/strtoul.c: removed. + + * include/ruby/missing.h (strtoul): removed. + + * common.mk (strtoul.o): removed. + + * LEGAL (missing/strtoul.c): removed. + +Wed Jan 2 14:41:08 2008 Tanaka Akira + + * common.mk (strcasecmp.o): removed. + (strncasecmp.o): removed. + + * include/ruby/missing.h (strcasecmp): removed. + (strncasecmp): removed. + +Wed Jan 2 11:34:57 2008 Tanaka Akira + + * missing/strcasecmp.c: removed. Ruby don't use locale dependent + strcasecmp. + + * missing/strncasecmp.c: ditto. + + * configure.in: don't check strcasecmp and strncasecmp. + + * LEGAL: missing/strcasecmp.c and missing/strncasecmp.c removed. + +Wed Jan 2 10:13:54 2008 Tadayoshi Funaba + + * sample/time.rb: use Process.times instead of Time.times. + +Wed Jan 2 09:09:53 2008 Tadayoshi Funaba + + * sample/goodfriday.rb: examples for date are enough. retired. + +Wed Jan 2 08:58:54 2008 Tadayoshi Funaba + + * sample/cal.rb: just updated with the newest version. + +Wed Jan 2 01:19:31 2008 Tanaka Akira + + * enc/depend: dependency updated. + +Wed Jan 2 00:14:41 2008 NARUSE, Yui + + * ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: Update nkf. + + * ext/nkf/nkf.c: fix documents. + + * ext/nkf/lib/kconv.rb: fix documents. + (Kconv.is*): use valid_encoding?. + (Kconv.isjis): defined. + +Tue Jan 1 23:17:03 2008 Tanaka Akira + + * common.mk: dependency updated. + +Tue Jan 1 21:11:33 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_isascii): defined. + (rb_isalnum): ditto. + (rb_isalpha): ditto. + (rb_isblank): ditto. + (rb_iscntrl): ditto. + (rb_isdigit): ditto. + (rb_isgraph): ditto. + (rb_islower): ditto. + (rb_isprint): ditto. + (rb_ispunct): ditto. + (rb_isspace): ditto. + (rb_isupper): ditto. + (rb_isxdigit): ditto. + (rb_tolower): ditto. + (rb_toupper): ditto. + + * include/ruby/st.h (st_strcasecmp): declared. + (st_strncasecmp): ditto. + + * st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp. + (st_strcasecmp): defined. + (st_strncasecmp): ditto. + + * include/ruby/ruby.h: include include/ruby/encoding.h. + (ISASCII): use rb_isascii. + (ISPRINT): use rb_isprint. + (ISSPACE): use rb_isspace. + (ISUPPER): use rb_isupper. + (ISLOWER): use rb_islower. + (ISALNUM): use rb_isalnum. + (ISALPHA): use rb_isalpha. + (ISDIGIT): use rb_isdigit. + (ISXDIGIT): use rb_isxdigit. + (TOUPPER): defined. + (TOLOWER): ditto. + (STRCASECMP): ditto. + (STRNCASECMP): ditto. + + * dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c, + transcode.c, ext/readline/readline.c: use locale insensitive + functions. [ruby-core:14662] + +Tue Jan 1 17:50:47 2008 Nobuyoshi Nakada + + * io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode. + [ruby-dev:32913] + +Tue Jan 1 14:41:56 2008 Yukihiro Matsumoto + + * lib/rexml: 1.9 patch from Sam Ruby mentioned in his blog: + + [ruby-core:14639] + +Tue Jan 1 14:15:04 2008 Yukihiro Matsumoto + + * string.c (rb_str_substr): offset movement bug. a patch from + Vincent Isambart in + [ruby-core:14647]. [ruby-core:14644] + +Tue Jan 1 01:29:04 2008 Nobuyoshi Nakada + + * encoding.c (rb_to_encoding): raises for non-nil, non-encoding, + non-string object. [ruby-core:14634] + +Tue Jan 1 01:04:06 2008 Nobuyoshi Nakada + + * ruby.c (process_options): rejects dummy encoding. + +Mon Dec 31 23:53:55 2007 Nobuyoshi Nakada + + * ruby.c (proc_options, process_options): delays finding encoding + until load_path is set. + +Mon Dec 31 23:27:17 2007 Nobuyoshi Nakada + + * string.c (rb_str_resize): embeds if ptr is null. [ruby-dev:32819] + +Mon Dec 31 23:17:22 2007 GOTOU Yuuzou + + * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service): + call do_XXX which correspond with request method. + (WEBrick::HTTPProxyServer#do_CONNECT,do_GET,do_POST,do_HEAD): added. + + * test/webrick/test_httpproxy.rb: add test for WEBrick::HTTPProxyServer. + +Mon Dec 31 22:53:29 2007 Yukihiro Matsumoto + + * thread_pthread.c (native_sleep): timespec tv_sec may overflow on + some platform. a patch from zunda in + [ruby-dev:32904]. + +Mon Dec 31 19:35:20 2007 Tanaka Akira + + * string.c (IS_7BIT): removed. + (single_byte_optimizable): new function to test optimizationability + using single byte string. + (str_strlen): use single_byte_optimizable instead of + is_ascii_string. + (str_nth): rename argument: asc -> singlebyte. + (str_offset): ditto. + (rb_str_substr): use single_byte_optimizable instead of IS_7BIT. + (rb_str_index): ditto. + (rb_str_rindex): ditto. + (rb_str_splice): ditto. + (rb_str_justify): ditto. + +Mon Dec 31 07:39:31 2007 Nobuyoshi Nakada + + * main.c, goruby.c (RUBY_MAIN_INIT): removed. + + * goruby.c (goruby_run_node): run after ruby_init_loadpath() so that + require works, and protect the call. + +Mon Dec 31 06:50:38 2007 Nobuyoshi Nakada + + * common.mk: not use -I$(srcdir)/lib with $(MINIRUBY) for cross + compiling. + + * configure.in, {win,bcc}32/Makefile.sub (MINIRUBY): -I$(srcdir)/lib + moved. + +Mon Dec 31 06:08:34 2007 Nobuyoshi Nakada + + * include/ruby/encoding.h (rb_enc_sprintf, rb_enc_vsprintf): prototyped. + + * sprintf.c (rb_enc_sprintf, rb_enc_vsprintf): new functions to format + arguments with encoding. + +Sun Dec 30 23:48:00 2007 NAKAMURA Usaku + + * golf_prelude.rb (String#/): define / as split, as association of + Array#*. + +Sun Dec 30 23:19:06 2007 WATANABE Hirofumi + + * golf_prelude.rb (@@golf_hash): for performance improvement. + +Sun Dec 30 22:44:50 2007 Tadayoshi Funaba + + * lib/date.rb (_valid_time?): I'm not sure to recommend such an + expression. but anyway it is acceptable now. [ruby-core:14580] + +Sun Dec 30 21:54:26 2007 Nobuyoshi Nakada + + * parse.y (program, yycompile0): too early to drop lex_lastline in + rules. + +Sun Dec 30 19:23:23 2007 NAKAMURA Usaku + + * bootstraptest/test_knownbug.rb: support DOSISH. + +Sun Dec 30 17:43:54 2007 Nobuyoshi Nakada + + * encoding.c (Init_Encoding): registered rb_encoding differs from + ONIG_ENCODINGs. + +Sun Dec 30 13:56:15 2007 Nobuyoshi Nakada + + * parse.y (program): clear input strings after all process. + + * parse.y (parser_nextc, parser_yylex): should not drop lex_lastline + while lex_p is valid. [ruby-dev:32896] + +Sun Dec 30 10:54:49 2007 NARUSE, Yui + + * configure.in: rm largefile.h. + + * common.mk: clean golf, conf*, preludes, and so on. + + * enc/depend: silent and ignore error for rm. + + * enc/Makefile.in: should define prefix and exec_prefix. + +Sun Dec 30 06:31:11 2007 NAKAMURA Usaku + + * encoding.c (Init_encoding): register Windows-31J and its alias. + [ruby-dev:32843] + + * ruby.c (proc_options): -Ks options means Windows-31J, not Shift_JIS. + +Sun Dec 30 06:27:38 2007 NAKAMURA Usaku + + * lib/mkmf.rb (depend_rules): need to convert `/' to `\' for windows + native commands. + +Sun Dec 30 01:43:56 2007 Nobuyoshi Nakada + + * enc/Makefile.in (DLDFLAGS): like as extensions. [ruby-core:14567] + +Sat Dec 29 23:48:13 2007 Tanaka Akira + + * io.c (io_fflush): don't retry when wbuf modified by other threads. + +Sat Dec 29 22:44:30 2007 Nobuyoshi Nakada + + * re.c (rb_reg_regsub): returns the given string itself if nothing + changed. + + * string.c (rb_str_sub_bang): keeps code-range as possible. + + * string.c (str_gsub): adjusts code-range. [ruby-core:14566] + +Sat Dec 29 21:54:37 2007 Nobuyoshi Nakada + + * common.mk (clean, distclean, realclean): should include clean-enc + and others. [ruby-dev:32887] + +Sat Dec 29 13:29:29 2007 Tanaka Akira + + * bootstraptest/test_knownbug.rb: add a test reported by + Kazuhiro NISHIYAMA. [ruby-dev:32819]. + add a test reported by Frederick Cheung. [ruby-core:14556]. + + * test/ruby/test_m17n.rb (test_gsub): add a test reported by + Sam Ruby. [ruby-core:14566] + +Sat Dec 29 04:46:58 2007 GOTOU Yuuzou + + * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throws): + throw won't raise NameError nor ThreadError but ArgumentError on 1.9. + (Test::Unit::Assertions#assert_not_throws): ditto. + + * test/testunit/test_assertions.rb: add assertions for throwing some + objects other than Symbol. + +Sat Dec 29 03:10:12 2007 NAKAMURA Usaku + + * io.c (io_unread): fix typo. + +Sat Dec 29 02:18:45 2007 NAKAMURA Usaku + + * io.c (io_unread): adhoc workaround for non-binary mode of some DOSish + platforms. this is not perfect and safety, but works with most cases. + +Fri Dec 28 23:53:18 2007 Tanaka Akira + + * ext/strscan/strscan.c (str_new): new function for allocate an string + with encoding propagation. + (extract_range): use str_new. + (extract_beg_len): ditto. + (strscan_peek): ditto. + (strscan_rest): ditto. + +Fri Dec 28 20:18:42 2007 WATANABE Hirofumi + + * golf_prelude.rb (Object.say): derived from Perl 5.10. + +Fri Dec 28 19:39:34 2007 NAKAMURA Usaku + + * encoding.c (rb_locale_encoding): should check return value from + rb_locale_charmap(). + + * ruby.c (locale_encoding): removed. + + * ruby.c (process_options): use rb_locale_encoding() instead of + locale_encoding(). + + * ext/readline/readline.c (readline_readline): use locale encoding + instead of input IO's encoding. [ruby-dev:32872] + +Fri Dec 28 19:29:07 2007 NAKAMURA Usaku + + * ext/readline/readline.c (readline_readline, readline_s_set_input): + use mReadline directly because self is not always same. + +Fri Dec 28 19:11:28 2007 Tanaka Akira + + * encoding.c (rb_locale_encoding): defined. + + * include/ruby/encoding.h (rb_locale_encoding): declared. + +Fri Dec 28 18:45:29 2007 NAKAMURA Usaku + + * ext/readline/readline.c (readline_readline): set encoding to result. + + * ext/readline/readline.c (readline_s_set_input, Init_readline): save + input IO to hidden instance variable. + +Fri Dec 28 01:55:04 2007 Martin Duerst + + * transcode.c (transcode_dispatch): reverted some of the changes + in r14746. + + * transcode.c, enc/trans/single_byte.c: Added conversions to/from + US-ASCII and ASCII-8BIT (using data tables). + + * enc/trans/single_byte.c: Some spacing/ordering changes due to + automatic data file generation. + + * transcode_data.h, transcode.c: Preliminary code for using + micro-conversion functions. + + * test/ruby/test_transcode.rb: Added some tests for US-ASCII and + ASCII-8BIT conversions. + +Fri Dec 28 17:33:44 2007 Tanaka Akira + + * time.c (make_time_t): verify mktime and timegm result. + +Fri Dec 28 16:36:33 2007 NARUSE, Yui + + * lib/resolv.rb (Resolv::DNS#each_address): now returns IPv6 address. + +Fri Dec 28 16:10:00 2007 Eric Hodel + + * lib/rdoc/dot/dot.rb: Move to lib/rdoc/dot.rb. Fix namespacing. + + * lib/rdoc/diagram.rb: Update for 1.9. + +Fri Dec 28 15:38:29 2007 Eric Hodel + + * lib/rdoc/markup/sample/: Move to sample/rdoc/markup directory. + +Fri Dec 28 15:15:12 2007 Akinori MUSHA + + * lib/irb/completion.rb: Remove garbage ("X=1"). + +Fri Dec 28 15:12:05 2007 Eric Hodel + + * lib/rdoc, test/rdoc: Move RDoc tests out of lib/. + +Fri Dec 28 15:10:47 2007 Nobuyoshi Nakada + + * encoding.c (set_base_encoding, enc_base_encoding): renamed + based_encoding as base_encoding. + +Fri Dec 28 13:57:49 2007 NAKAMURA Usaku + + * golf_prelude.rb (Integer#each): use alias simply. + +Fri Dec 28 13:45:21 2007 Akinori MUSHA + + * golf_prelude.rb (Object.const_missing): No need to delegate to + superclass. Just raise a NameError when none matches. + +Fri Dec 28 13:18:47 2007 Kouhei Sutou + + * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.2 -> 0.2.3. + + * lib/rss/parser.rb, test/rss/test_parser.rb: supported "-" in tag name. + Reported by Ray Chen. Thanks. + +Fri Dec 28 13:07:31 2007 Nobuyoshi Nakada + + * gc.c (os_obj_of): returns an enumerator if no block given. based on + a patch from Yugui . [ruby-dev:32828] + +Fri Dec 28 11:46:04 2007 Nobuyoshi Nakada + + * tool/ytab.sed: skip yydestruct hack unless yymsg exists, for bison + 1.8 series. [ruby-dev:32825] + +Fri Dec 28 11:39:02 2007 NAKAMURA Usaku + + * golf_prelude.rb (Object.quine): need to join because SCRIPT_LINES__[] + returns an array of lines. + +Fri Dec 28 11:16:53 2007 NAKAMURA Usaku + + * golf_prelude.rb (Object.quine): get the script itself. + +Fri Dec 28 10:06:54 2007 Akinori MUSHA + + * golf_prelude.rb (Object.const_missing): Auto-complete constants. + +Fri Dec 28 01:55:04 2007 Nobuyoshi Nakada + + * transcode.c (transcode_dispatch): allows transcoding from/to + ASCII-8BIT. + +Fri Dec 28 01:47:25 2007 NAKAMURA Usaku + + * golf_prelude.rb (Integer): Integer is now enumerable on goruby. + +Fri Dec 28 01:27:47 2007 Tanaka Akira + + * lib/rdoc/rdoc.rb (parse_files): don't depend on the default external + encoding. + +Fri Dec 28 00:01:57 2007 NAKAMURA Usaku + + * common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because + tool/compile_prelude.rb requires rbconfig.rb. + +Thu Dec 27 23:56:01 2007 Nobuyoshi Nakada + + * mkconfig.rb: should not use the libraries under the source directory + at cross compiling. + +Thu Dec 27 23:43:35 2007 Nobuyoshi Nakada + + * cygwin/GNUmakefile.in (EXTOBJS): uses ruby.rc always for other than + rubyw.exe. + +Thu Dec 27 22:31:37 2007 NAKAMURA Usaku + + * lib/rubygems/commands/update_command.rb (do_rubygems_update): use + portable and safely ENV operation. reported in + . + +Thu Dec 27 21:47:04 2007 NAKAMURA Usaku + + * mkconfig.rb (prefix): archdir is "1.9.0", not "1.9". reported in + . + +Thu Dec 27 17:57:30 2007 Tanaka Akira + + * parse.y, transcode_data.h, transcode.c, lib/weakref.rb, + lib/irb/ruby-lex.rb, lib/irb/lc/error.rb, enc/trans/japanese.c: + change "illegal" to "invalid" in a context which doesn't against + a law. + +Thu Dec 27 16:37:06 2007 Tanaka Akira + + * re.c (rb_reg_s_union): show encodings in error message. + +Thu Dec 27 15:25:16 2007 Tanaka Akira + + * encoding.c (rb_enc_codelen): show codepoint in error message. + + * include/ruby/encoding.h (rb_enc_codelen): comment it returns + positive integer. + + * string.c (rb_str_concat): rb_enc_codelen doesn't return 0. + +Thu Dec 27 15:18:44 2007 Tanaka Akira + + * encoding.c (rb_enc_codelen): error message refined. + +Thu Dec 27 15:11:27 2007 Tanaka Akira + + * encoding.c (rb_enc_check): show encodings in error message. + +Thu Dec 27 15:02:52 2007 Nobuyoshi Nakada + + * string.c (rb_str_casecmp): fixed using a wrong variable. + [ruby-list:44402] + +Thu Dec 27 14:34:38 2007 Tanaka Akira + + * io.c (io_fflush): checks wbuf modification by other threads. + not perfect. it need locks. + +Thu Dec 27 10:44:03 2007 Yukihiro Matsumoto + + * ext/socket/socket.c: a patch to support IRIX from Andrew + Thompson in [ruby-core:14447]. + +Thu Dec 27 02:25:45 2007 NAKAMURA Usaku + + * lib/mkmf.rb (create_tmpsrc): retry to create file if Errno::EACCES + occurs. this is a workaround for mswin32. + +Wed Dec 26 22:47:31 2007 NARUSE, Yui + + * lib/resolv.rb (Resolv::DNS::Name.==): fix for other is array of + Resolv::DNS::Label::Str. + + * lib/resolv.rb (Resolv::DNS::MessageEncoder#put_label): String#string + is not defined, so replace to_s. + + * lib/resolv.rb (Resolv::IPv6#to_name): ip6.int is obsoleted by + ip6.arpa. + + +Wed Dec 26 21:27:02 2007 Tadayoshi Funaba + + * lib/date/format.rb (_xmlschema): some improvements. + + * lib/date/format.rb (_parse): a new hint compfunc. [experimental] + +Wed Dec 26 17:31:08 2007 Tanaka Akira + + * io.c (io_fflush): check closed fptr after rb_write_internal to avoid + SEGV on MacOS X. + +Wed Dec 26 16:10:17 2007 Nobuyoshi Nakada + + * string.c (Init_String): defines chars method. + +Wed Dec 26 14:38:43 2007 NAKAMURA Usaku + + * instruby.rb: install goruby if exists. + +Wed Dec 26 13:55:02 2007 James Edward Gray II + + * lib/csv.rb: Cleaned up some code with Ruby 1.9 idioms. + +Wed Dec 26 13:29:35 2007 Nobuyoshi Nakada + + * array.c (tmpbuf): use rb_str_tmp_new(). + +Wed Dec 26 00:57:53 2007 Nobuyoshi Nakada + + * ext/json/ext/generator/generator.c (Init_generator): requires + json/common.rb for GeneratorError, when static linked. a patch from + Kenta Murata in [ruby-dev:32789]. + +Tue Dec 25 23:33:55 2007 Yukihiro Matsumoto + + * development version 1.9.0 released. + +Tue Dec 25 23:25:29 2007 Yukihiro Matsumoto + + * lib/rexml/node.rb (REXML::Node::indent): should initialize rv + variable. a patch from Tadayoshi Funaba in + [ruby-dev:32783]. + +Tue Dec 25 23:16:01 2007 Nobuyoshi Nakada + + * ruby.c (proc_options): encoding option in shebang and RUBYOPT did not + work, do not store alloca()ed string in a parent scope struct. + +Tue Dec 25 22:56:52 2007 NAKAMURA Usaku + + * win32/Makefile.sub (config.status): keep this file. + +Tue Dec 25 22:55:42 2007 Nobuyoshi Nakada + + * configure.in (TIMEZONE_VOID): typo. + +Tue Dec 25 22:45:10 2007 Koichi Sasada + + * insns2vm.rb: add encoding option to shebang. + +Tue Dec 25 22:13:51 2007 Koichi Sasada + + * bootstraptest/pending.rb: add pending issue. + +Tue Dec 25 22:12:40 2007 Koichi Sasada + + * thread.c: remove Thread.critical(=). + +Tue Dec 25 21:44:50 2007 Nobuyoshi Nakada + + * tool/make-snapshot: add version number. + +Tue Dec 25 21:32:54 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix stack consistency error + (break is compiled to throw instead of jump insn). + these problems are reported by Yusuke ENDOH + + * bootstraptest/test_knownbug.rb, test_syntax.rb: move fixed test. + +Tue Dec 25 21:32:44 2007 Tanaka Akira + + * parse.y (struct parser_params): make parser_ruby_sourcefile common + field. it is used by node_newnode. + new field parser_ruby_sourcefile_string for ripper. + (parser_initialize): initialize parser_ruby_sourcefile in ripper. + (ripper_initialize): initialize parser_ruby_sourcefile_string. + +Tue Dec 25 21:26:09 2007 Nobuyoshi Nakada + + * common.mk (parse.c): depends on tool/ytab.sed. + + * tool/ytab.sed: hack for bison 2.1. + +Tue Dec 25 20:24:58 2007 Technorama Ltd. + + * ext/openssl/ossl_ssl.c: Only show a warning if the default + DH callback is actually used. + + * ext/openssl/ossl_rand.c: New method: random_add(). + +Tue Dec 25 20:24:48 2007 Nobuyoshi Nakada + + * tool/make-snapshot: argument check, and cleanup exported directory. + +Tue Dec 25 20:07:13 2007 WATANABE Hirofumi + + * tool/make-snapshot: more portable. + +Tue Dec 25 19:01:04 2007 Nobuyoshi Nakada + + * encoding.h (rb_enc_mbc_to_codepoint): wrapper for + ONIGENC_MBC_TO_CODE(). + + * string.c (rb_str_succ): deal with invalid sequence as binary. + +Tue Dec 25 18:40:46 2007 Koichi Sasada + + * iseq.c: all methods need $SAFE < 1. + + vm.c: comment out debug functions. + +Tue Dec 25 18:37:42 2007 Yukihiro Matsumoto + + * io.c (appendline): move RS comparison to rb_io_getline_1(). + +Tue Dec 25 18:27:51 2007 Tanaka Akira + + * string.c (rb_str_each_line): don't call rb_enc_codepoint with empty + string. + +Tue Dec 25 18:06:04 2007 Tanaka Akira + + * string.c (rb_str_inspect): don't call rb_enc_codepoint with empty + string. fix '#'.inspect. + + * encoding.c (rb_enc_codepoint): raise on empty string. + +Tue Dec 25 17:48:28 2007 Shugo Maeda + + * vm.c (rb_frame_method_id_and_class): new function to get the + method id and class of the current frame. + +Tue Dec 25 17:32:04 2007 Akinori MUSHA + + * lib/mkmf.rb (create_makefile): Add a missing dependency on the + target directory for each .rb file. This will hopefully fix + parallel make (-jN). Tested on FreeBSD. + +Tue Dec 25 16:51:07 2007 Nobuyoshi Nakada + + * enc/trans/japanese.c (rb_{from,to}_{SHIFT_JIS,EUC_JP}): inversed + from_encoding and to_encoding. + +Tue Dec 25 16:41:57 2007 NAKAMURA Usaku + + * golf_prelude.rb (h): add new method for all golfers. + +Tue Dec 25 16:37:12 2007 Nobuyoshi Nakada + + * enc/trans/japanese.c (rb_to_EUC_JP): fixed typo. + +Tue Dec 25 16:34:58 2007 NAKAMURA Usaku + + * ext/dl/depend: add dependencies. [ruby-dev:32760] + +Tue Dec 25 16:26:48 2007 Koichi Sasada + + * include/ruby/ruby.h, thread.c: rename is_ruby_native_thread() to + ruby_native_thread_p(). + + * ext/tk/tcltklib.c: apply it. + +Tue Dec 25 16:15:15 2007 Nobuyoshi Nakada + + * common.mk (clean-enc): clean encoding objects. + +Tue Dec 25 16:04:28 2007 Nobuyoshi Nakada + + * common.mk, goruby.c, golf_prelude.rb: for golfers. + + * main.c (main): hook for embedding applications. + + * tool/compile_prelude.rb: can change initialize function name. + +Tue Dec 25 15:59:51 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_register): do not use based_encoding to check if + dummy encoding. + +Tue Dec 25 15:55:14 2007 Nobuyoshi Nakada + + * string.c (rb_str_succ): fix for string with non-alphanumeric chars. + +Tue Dec 25 15:42:49 2007 Yukihiro Matsumoto + + * io.c (rb_io_external_encoding): should return nil for + pass-through write IO. [ruby-dev:32740] + +Tue Dec 25 15:24:57 2007 Tanaka Akira + + * io.c (appendline): initialize rslen to 1 if rsptr is 0. + rslen is the length of the delimiter. + if only delim is given, it should be 1. + [ruby-dev:32746] + +Tue Dec 25 15:21:33 2007 Nobuyoshi Nakada + + * transcode.c (transcode_dispatch): fix for multistep transcode. + +Tue Dec 25 15:07:51 2007 NAKAMURA Usaku + + * enc/trans/single_byte.c (Init_single_byte): renamed. + +Tue Dec 25 15:00:33 2007 Yukihiro Matsumoto + + * enum.c (enum_yield): when multiple values yielded from #each + pack them into an array. [ruby-dev:32708] + + * enum.c: all method but all?, any?, one? and none? passed packed + multiple values to the block. + + * enum.c (collect_all): should pack all values. [ruby-core:14410] + +Tue Dec 25 14:57:00 2007 Nobuyoshi Nakada + + * common.mk (COMMONOBJS): transcode_data_*.c moved under enc/trans. + + * transcode_data.h (rb_transcoding, rb_transcoder): prefixed. + + * transcode.c (rb_register_transcoder, rb_declare_transcoder): split + declaration and registration. [ruby-dev:32704] + + * transcode.c (transcode_dispatch): autoload pre-declared transcoder. + + * transcode.c (str_transcode): use rb_define_dummy_encoding(). + + * transcode.c (Init_transcode): initialize transcoder tables. + + * enc/trans/single_byte.c, enc/trans/japanese.c: moved from top. + +Tue Dec 25 14:20:13 2007 Yukihiro Matsumoto + + * lib/mkmf.rb (map_dir): should generate path including $top_srcdir. + +Tue Dec 25 14:09:16 2007 James Edward Gray II + + * lib/csv.rb: Fixed test failures caused by changes to Ruby. + + * test/csv/tc_serialization, test/csv/tc_csv_parsing, test/csv/tc_features: + Fixed test failures caused by changes to Ruby. + +Tue Dec 25 14:11:57 2007 Nobuyoshi Nakada + + * io.c (io_encoding_set): missing return type. + +Tue Dec 25 14:03:48 2007 NARUSE, Yui + + * test/rinda/test_rinda.rb (MockClock#{_forward, forward, sleep}): + Change default value of n as @reso from nil. If default value is + nil, n.+ is not defined. + +Tue Dec 25 13:54:01 2007 Tanaka Akira + + * test/ruby/test_io_m17n.rb (test_pipe): fixed. + [ruby-dev:32743] + +Tue Dec 25 13:44:51 2007 Koichi Sasada + + * thread.c (rb_thread_wait_fd_rw): should check EBADF on select(). + +Tue Dec 25 13:30:03 2007 Koichi Sasada + + * thread_pthread.c, thread_pthread.h, thread_win32.c, + thread_win32.c: make some functions static functions. + a patch from Tadashi Saito + in [ruby-core:14407] + +Tue Dec 25 13:23:13 2007 Tanaka Akira + + * test/ruby/test_io_m17n.rb (test_write_noenc): don't mix text and + binary mode. [ruby-dev:32743] + +Tue Dec 25 13:13:09 2007 Yukihiro Matsumoto + + * README.EXT.ja, dir.c, eval.c, eval_intern.h, lex.c.src, + lex.c.blt, keywords, load.c, thread.c: more ANSI'ize. + a patch from Tadashi Saito + in [ruby-dev:32725] + +Tue Dec 25 13:07:56 2007 Koichi Sasada + + * vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(), + RUBY_VM_SET_TIMER_INTERRUPT(), RUBY_VM_INTERRUPTED(). + + * thread.c, thread_pthread.c, thread_win32.c: fix to ignore time slice + event until sleep. + + * bootstraptest/test_thread.rb: add a test for time limited join test. + +Tue Dec 25 12:42:59 2007 Koichi Sasada + + * vm.c (Init_VM): remove unused code. + [ruby-dev:32732] + +Tue Dec 25 12:32:32 2007 Martin Duerst + + * transcode.c: Moving a static counter from inside register_transcoder() + and register_functional_transcoder() to outside the functions, renaming + from n to next_transcoder_position. Fixes 3) in [ruby-dev:32715]. + +Tue Dec 25 12:22:17 2007 NARUSE, Yui + + * sample/from.rb: follow Ruby 1.9 libraries. + +Tue Dec 25 12:21:56 2007 Yukihiro Matsumoto + + * proc.c (method_inspect): preserve encoding of the method name. + +Tue Dec 25 12:07:52 2007 Nobuyoshi Nakada + + * configure.in (BASERUBY): delayed error until BASERUBY is used. + +Tue Dec 25 11:48:35 2007 Yukihiro Matsumoto + + * sample/README: removed obsoleted files: dbmtest.rb, + getopts.test, mrshtest.rb, regx.rb. + +Tue Dec 25 11:45:34 2007 James Edward Gray II + + * lib/csv.rb: Import the FasterCSV source as the new CSV class. + + * test/csv/*: Added all applicable tests from FasterCSV. + +Tue Dec 25 11:33:52 2007 Nobuyoshi Nakada + + * error.c (report_bug): uses ruby_description. + +Tue Dec 25 11:20:38 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix stack consistency error. + a patch from Yusuke ENDOH [ruby-dev:32720] + + * bootstraptest/test_syntax.rb: add 2 tests for above. + +Tue Dec 25 11:14:20 2007 Koichi Sasada + + * iseq.c, vm_core.h: comment out unused fields. + +Tue Dec 25 11:02:10 2007 Koichi Sasada + + * vm.c: check frame is FINAL when creating env. + [ruby-core:14395] + + * bootstraptest/test_block.rb: add a test for above. + +Tue Dec 25 09:12:13 2007 Eric Hodel + + * lib/rdoc/: Enable RDoc debugging only with $DEBUG_RDOC. + +Tue Dec 25 08:37:43 2007 James Edward Gray II + + * lib/csv.rb, test/csv/test_csv.rb: Removed in preparation for + FasterCSV code import. + +Tue Dec 25 08:27:43 2007 Eric Hodel + + * lib/rubygems.rb: Fix test failures. + + * test/rubygems/test_gem.rb: Fix test failure. + +Tue Dec 25 06:23:40 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb, test_literal.rb: move fixed test. + +Tue Dec 25 06:19:04 2007 GOTOU Yuuzou + + * sample/biorhythm.rb: follow Ruby 1.9 libraries. + +Tue Dec 25 06:15:01 2007 Koichi Sasada + + * vm.c: add dummy toplevel frame. + +Tue Dec 25 05:44:56 2007 Eric Hodel + + * lib/net/http.rb: Fix uninitialized variable warning. + [ruby-talk:284582] + + * lib/irb/output-method.rb: Remove unused #foo method. + [ruby-talk:284582] + +Tue Dec 25 05:24:12 2007 Koichi Sasada + + * compile.c (iseq_compile): clear local table if node == 0. + a patch from Yusuke ENDOH [ruby-dev:32530] + + * vm.c: clear VM stack. + +Tue Dec 25 04:23:32 2007 Tanaka Akira + + * parse.y (rb_id2str): fill klass of returned string as rb_cString. + some strings are allocated before rb_cString is created. + This prevents a "called on terminated object" error by + ObjectSpace.each_object(Module) {|m| p m.name }. + +Tue Dec 25 03:51:55 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix stack consistency bug. + a patch from Yusuke ENDOH + +Tue Dec 25 03:19:47 2007 WATANABE Hirofumi + + * tool/make-snapshot: must create configure and lex.c. + +Tue Dec 25 03:16:05 2007 Yukihiro Matsumoto + + * io.c (rb_io_s_pipe): now takes up to two arguments. allow its + external/internal encoding by Encoding objects. + + * io.c (rb_io_set_encoding): new method to set encoding of the IO. + + * io.c (argf_set_encoding): ditto. + +Tue Dec 25 03:08:53 2007 NAKAMURA Usaku + + * pack.c (pack_pack): use NUM2LONG instead of NUM2INT. + + * numeric.c (fix_lshift, fix_aref): use SIZEOF_LONG instead of + SIZEOF_VALUE. + + * bignum.c (big2ulong, rb_big_aref): ditto. + +Tue Dec 25 02:55:26 2007 GOTOU Yuuzou + + * lib/rexml/element.rb (REXML::Elements#each): yield in each + should be called with one parameter. [ruby-dev:32708] + +Tue Dec 25 02:15:39 2007 Koichi Sasada + + * compile.c (iseq_compile_each): add a "pop" insn after break + to fix stack consistency error. [ruby-core:14385] + + * bootstraptest/test_syntax.rb: add tests for above. + + * bootstraptest/test_knownbug.rb: remove fixed bug. + +Tue Dec 25 01:54:36 2007 Yukihiro Matsumoto + + * id.c (Init_id): remove several unused symbols. [ruby-core:14362] + + * compile.c (iseq_specialized_instruction): do not use + VM_CALL_SEND_BANG flag any longer. + +Tue Dec 25 01:42:41 2007 Tanaka Akira + + * lib/rdoc/rdoc.rb (parse_files): interpret coding cookie. + +Tue Dec 25 01:38:04 2007 Yukihiro Matsumoto + + * proc.c (method_name): preserve Symbol's encoding. + + * numeric.c (fix_id2name): ditto. + +Tue Dec 25 01:19:18 2007 Yukihiro Matsumoto + + * include/ruby/encoding.h (rb_enc_left_char_head): new utility macro. + + * include/ruby/encoding.h (rb_enc_right_char_head): ditto. + + * io.c (appendline): does multibyte RS search in the function. + + * io.c (prepare_getline_args): RS may be nil. + + * io.c (rb_io_getc): should process character based on external + encoding, when transcoding required. + +Tue Dec 25 01:07:57 2007 Tanaka Akira + + * lib/irb/output-method.rb: translate a comment to English to + avoid mix of EUC-JP comment and UTF-8 Date keyword. + svn substitute Date keyword with UTF-8 weekday on UTF-8 locale. + +Tue Dec 25 00:27:28 2007 GOTOU Yuuzou + + * lib/webrick/httpservley/cgihandler.rb + (WEBrick::HTTPServlet::CGIHandler#do_GET): m17nized. + +Mon Dec 24 23:55:29 2007 Tanaka Akira + + * lib/cgi.rb (CGI::escape): m17nized. + (CGI::unescape): ditto. + (CGI::escapeHTML): ditto. + (CGI::unescapeHTML): ditto. + +Mon Dec 24 23:32:24 2007 NAKAMURA Usaku + + * transcode_data_japanese.c (select_iso_2022_mode): '\e' is not valid. + +Mon Dec 24 23:13:09 2007 GOTOU Yuuzou + + * lib/rdoc/diagram.rb (RDoc::Diagram#initialize): use fileuitls + instead of ftools. + +Mon Dec 24 23:04:57 2007 NAKAMURA, Hiroshi + + * lib/ftools.rb: removed obsoleted lib. use fileutils instead (by eban). + + * lib/rdoc/rdoc.rb, lib/rdoc/generators/*, lib/rake.rb: let it use + fileutils instead of ftools. + + * lib/shell/command-processor.rb: removed unused references to ftools. + + * lib/parsedate.rb: removed. see [ruby-core:12535], [ruby-dev:31969]. + + * lib/README: updated. + +Mon Dec 24 23:01:04 2007 Tanaka Akira + + * lib/open-uri.rb (OpenURI::Buffer): use Meta ===. [ruby-core:14295] + +Mon Dec 24 22:46:42 2007 NARUSE, Yui + + * transcode.c: register_functional_transcoder() added. + (init_transcoder_table(: register ISO-2022-JP. + (str_transcode): add preprocessor and postprocessor. + + * transcode_data_japanese.c: add ISO-2022-JP support. + + * transcode_data.h: moved transcoder and transcoding definition from + transcode.c. + +Mon Dec 24 20:29:28 2007 Koichi Sasada + + * test/io/nonblock/test_flush.rb: fix test for 1.9. + +Mon Dec 24 20:23:44 2007 Koichi Sasada + + * test/rinda/test_rinda.rb: revert last commit because this test seems + to have timing problem to halt all tests. + +Mon Dec 24 20:18:52 2007 Koichi Sasada + + * test/rinda/test_rinda.rb: enable rinda test. + +Mon Dec 24 20:16:54 2007 Koichi Sasada + + * instruby.rb: fix rdoc install dir. + +Mon Dec 24 18:37:32 2007 Tanaka Akira + + * re.c (rb_reg_prepare_re): show regexp encoding in the error message. + +Mon Dec 24 18:23:32 2007 Tanaka Akira + + * eval.c (rb_exc_raise): ANSI style. + (rb_exc_fatal): ditto. + (rb_raise_jump): ditto. + (rb_jump_tag): ditto. + (rb_block_given_p): ditto. + + * variable.c (original_module): ditto. + +Mon Dec 24 18:05:09 2007 Koichi Sasada + + * iseq.c (Init_ISeq): disable ISeq.load() because there is no verifier. + + * iseq.c, proc.c: add ISeq.disasm(method). + +Mon Dec 24 18:06:03 2007 Tanaka Akira + + * eval_method.c (Init_eval_method): extracted from Init_eval + for rdoc to find rb_mod_remove_method, rb_mod_undef_method and + rb_mod_alias_method. + + * eval.c (Init_eval): call Init_eval_method. + +Mon Dec 24 17:59:29 2007 Nobuyoshi Nakada + + * load.c (load_lock): reverted. + + * thread.c (rb_barrier_wait): check for recursive wait. + +Mon Dec 24 17:50:54 2007 Tanaka Akira + + * eval.c (function_call_may_return_twice_jmp_buf): removed. + (function_call_may_return_twice_false): removed. + [ruby-core:14335] + +Mon Dec 24 17:40:57 2007 Nobuyoshi Nakada + + * common.mk (node_name.inc, miniprelude.c, prelude.c): nmake cannot + handle target vpath in other than implicit rules. + +Mon Dec 24 17:20:34 2007 NAKAMURA, Hiroshi + + * lib/{mailread.rb,getopts.rb,parsearg.rb}: removed. + see [ruby-core:12535], [ruby-dev:31969]. + +Mon Dec 24 17:12:57 2007 Tanaka Akira + + * include/ruby/intern.h, random.c, array.c: + change exported name. + genrand_int32 -> rb_genrand_int32. + genrand_real -> rb_genrand_real. + [ruby-core:14335] + +Mon Dec 24 17:06:37 2007 NAKAMURA, Hiroshi + + * {lib,test}/{soap,wsdl,xsd}: removed soap4r along to the discussion + at ruby-core and ruby-dev. see [ruby-core:12535], [ruby-dev:31969]. + +Mon Dec 24 17:06:14 2007 Nobuyoshi Nakada + + * load.c (rb_feature_p): returns loading path name too. + + * load.c (search_required): returns path too if feature is being + loaded. [ruby-dev:32048] [TODO: refactoring] + +Mon Dec 24 16:29:12 2007 GOTOU Yuuzou + + * sample/openssl: reviewed and remove dependency on getopts.rb. + +Mon Dec 24 16:18:57 2007 Koichi Sasada + + * mkconfig.rb: add teeny to CONFIG['ruby_version']. + +Mon Dec 24 15:55:50 2007 Koichi Sasada + + * tool/compile.rb, getrev.rb, runruby.rb: remove unused tools. + +Mon Dec 24 15:42:04 2007 Nobuyoshi Nakada + + * configure.in, cygwin/GNUmakefile.in, */Makefile.sub, + djgpp/config.hin.: version dependent directory names now contain + teeny. + +Mon Dec 24 15:29:13 2007 Tanaka Akira + + * tool/serb.rb: removed. + +Mon Dec 24 13:55:35 2007 Nobuyoshi Nakada + + * proc.c (rb_proc_new), vm.c (invoke_block): removed u3.state magic. + [ruby-core:14310] + + * test/ruby/test_symbol.rb (test_to_proc): a test from Frederick + Cheung . + +Mon Dec 24 13:43:36 2007 Nobuyoshi Nakada + + * thread.c (rb_thread_atfork): should not leave living_threads + referring freed table while allocating new table. + +Mon Dec 24 12:49:54 2007 Nobuyoshi Nakada + + * Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify + compiled output file name explicitly. + + * enc/Makefile.in, enc/depend: now makes compiler to put generated + files under directories corresponding to the each source. + enc/trans supported. + + * enc/make_encmake.rb: evaluates depend file before Makefile.in so + that the former can influence to CONFIG. + +Mon Dec 24 12:35:03 2007 Nobuyoshi Nakada + + * win{32,ce}/Makefile.sub (MFLAGS): defaulted to -l. + +Mon Dec 24 12:08:10 2007 Eric Hodel + + * /, ext/: Add svn:ignore for OS X Xcode 3's conftest.dSYM + directories. + +Mon Dec 24 11:56:31 2007 Nobuyoshi Nakada + + * common.mk: should not pass MAKEFLAGS to recursive make. + + normal make: MFLAGS are set and command line options and macros + are all passed silently. + + GNU make: ditto, and all options and macros in MAKEFLAGS are in + effect. + + nmake: MFLAGS is not set and MAKEFLAGS has only options without + hyphen, no macros exist in any variables. + + Borland make: ditto, and command line macros cannot override + macros in makefile, so passing them is vain. + + * {bcc32,win{32,ce}}/Makefile.sub (SET_MAKE): set MFLAGS which is not + set by default, to get rid of chaotic situation of MFLAGS/MAKEFLAGS. + +Mon Dec 24 11:32:44 2007 Yukihiro Matsumoto + + * string.c (rb_str_comparable): fixed to keep transitivity. + [ruby-dev:32693] + +Mon Dec 24 11:20:31 2007 Eric Hodel + + * lib/rdoc/ri/ri_options.rb: Fix display of GEMDIRS, make command + examples match ri's name. + + * lib/rdoc/ri/ri_paths.rb: Only allow latest ri dirs in ri output. + +Mon Dec 24 10:49:04 2007 Eric Hodel + + * lib/uri/mailto.rb, lib/uri/common.rb: Fix Regexp warnings. Patch + #16524 from Kornelius Kalnbach, [ruby-core:14302]. + +Mon Dec 24 10:37:38 2007 Eric Hodel + + * gem_prelude.rb: Remove methods from Gem, not QuickLoader, to fix + warnings. + +Mon Dec 24 09:45:45 2007 Martin Duerst + + * transcode.c, transcode_data_one_byte.c, transcode_data_japanese.c: + added rb_ prefix to external data symbols. + +Mon Dec 24 05:32:22 2007 Yukihiro Matsumoto + + * enum.c (enum_inject): updated documentation. a patch from Keita + Yamaguchi in [ruby-dev:32686]. + + * README.EXT: updated. a patch from Tadashi Saito + in [ruby-core:14328]. + + * array.c (rb_ary_at): updated documentation. a patch from Tadashi + Saito in [ruby-core:14330]. + +Mon Dec 24 05:13:04 2007 Yukihiro Matsumoto + + * string.c (tr_trans): should associate new encoding if modified. + +Mon Dec 24 04:04:12 2007 GOTOU Yuuzou + + * test/net/http/test_https.rb: should rescue LoadError. + +Mon Dec 24 03:57:28 2007 Koichi Sasada + + * cont.c, vm.h: fix to support sparc machine. + a patch from Yusuke ENDOH + +Mon Dec 24 03:35:19 2007 Koichi Sasada + + * common.mk: remove additional "-". + +Mon Dec 24 02:59:32 2007 Yukihiro Matsumoto + + * io.c (rb_io_check_readable): should not fill fptr->enc always. + read-write IO (e.g. socket) does not work. [ruby-dev:32685] + + * io.c (io_read_encoding): retrieve reading encoding. + + * io.c (prepare_getline_args): convert RS to external encoding. + + * string.c (str_new_shared): was setting embedding flag of wrong + string object. [ruby-dev:32685] + + * io.c (io_enc_str): should preserve default_external encoding. + + * io.c (appendline): should do multibyte aware RS search. + +Mon Dec 24 02:06:35 2007 Yukihiro Matsumoto + + * io.c (rb_f_open): documentation update. + + * io.c (rb_io_s_pipe): ditto. + + * io.c (io_fwrite): wrong encoding destination. + + * io.c (rb_io_external_encoding): should return the encoding of + the file reading. + + * io.c (rb_io_internal_encoding): should return the encoding of + read string. + +Mon Dec 24 01:46:43 2007 Yukihiro Matsumoto + + * io.c (rb_io_s_pipe): allow specifying read-side encoding. + + * io.c (io_enc_str): wrong encoding destination. + +Mon Dec 24 01:03:17 2007 Yukihiro Matsumoto + + * string.c (rb_str_comparable): comparison including broken + coderange strings do not consider encoding. + +Mon Dec 24 00:57:15 2007 Yukihiro Matsumoto + + * io.c (open_key_args): IO direct methods (foreach, readlines, + read) now takes keyword argument: encoding, mode, open_args. + +Mon Dec 24 00:52:15 2007 Yukihiro Matsumoto + + * io.c (rb_io_s_read): encoding argument reverted. + + * io.c (mode_enc): independent function to share code. + + * io.c (rb_io_internal_encoding): new method. + +Mon Dec 24 00:47:05 2007 Yukihiro Matsumoto + + * test/ruby/test_beginendblock.rb (TestBeginEndBlock::test_endblockwarn): + rename endblockwarn.rb to endblockwarn_rb to avoid unnecessary + warning in make test. + +Sun Dec 23 23:03:13 2007 Tanaka Akira + + * encoding.c (rb_enc_codepoint): implemented to raise invalid + encoding. + + * include/ruby/encoding.h (rb_enc_codepoint): macro is replaced as a + declaration. + +Sun Dec 23 19:45:22 2007 Tanaka Akira + + * lib/time.rb (Time.httpdate): fix 2 digits year for 20xx. + reported by Tadayoshi Funaba. [ruby-dev:32687] + +Sun Dec 23 19:33:42 2007 Eric Hodel + + * lib/open-uri.rb: Fix method redefined warning. [ruby-core:14304] + +Sun Dec 23 18:31:49 2007 NARUSE, Yui + + * ext/nkf/nkf.c (rb_nkf_enc_get): use rb_define_dummy_encoding. + + * ext/nkf/nkf.c (Init_nkf): use rb_nkf_enc_get("ASCII"). + + * ext/nkf/nkf-utf8/nkf.c: Update 1.161. + + * ext/nkf/nkf-utf9/config.h: default output encoding is now UTF-8. + + * ext/nkf/lib/kconv.rb (Kconv.kconv): replace Encoding#name by + Encoding#to_s. + +Sun Dec 23 18:02:52 2007 Eric Hodel + + * lib/rubygems/gem_open_uri.rb: Fix version check. + +Sun Dec 23 17:24:48 2007 Tanaka Akira + + * encoding.c (rb_enc_init): add eucJP as an alias of EUC-JP. + +Sun Dec 23 17:00:23 2007 Tanaka Akira + + * lib/time.rb (Time.httpdate): use Time.utc for + "day-of-week, dd-mon-yy HH::MM:SS GMT" format. + +Sun Dec 23 16:12:40 2007 Eric Hodel + + * lib/rdoc: Fix 1.9 warnings. + +Sun Dec 23 15:28:37 2007 Eric Hodel + + * lib/rubygems, test/rubygems: Fix new 1.9 warnings. + +Sun Dec 23 14:43:10 2007 Eric Hodel + + * gem_prelude.rb: Use require to load rubygems.rb so the correct path + is in $LOADED_FEATURES on RubyGems upgrade. + +Sun Dec 23 11:26:43 2007 Nobuyoshi Nakada + + * string.c (sym_call): use exact argument array interface. + [ruby-core:14279] + +Sun Dec 23 11:01:35 2007 Nobuyoshi Nakada + + * io.c (rb_io_binmode_m): removed C99ism. + +Sun Dec 23 10:23:23 2007 Martin Duerst + + * transcode_data_one_byte.c: Better (and more honest) optimization. + + * transcode_data_japanese.c: First optimization step. + +Sun Dec 23 09:07:02 2007 Tanaka Akira + + * include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c, + ruby.c, transcode.c, ext/nkf/nkf.c: rename rb_ascii_encoding to + rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with + ASCII-8BIT and US-ASCII. + +Sun Dec 23 03:35:52 2007 Nobuyoshi Nakada + + * version.h: use patchlevel if revision is not set. + + * {bcc32,win{32,ce}}/setup.mak (-version-): skip including revision.h. + + * common.mk (srcs): new target to generated sources. + + * common.mk (encs, ext/ripper/ripper.c): MAKEFLAGS needs -. + + * enc/depend, enc/make_encmake.rb: use erb. + +Sun Dec 23 01:56:18 2007 Yukihiro Matsumoto + + * io.c (rb_io_mode_enc): do not set encoding unless explicitly + specified. + + * io.c (rb_io_check_readable): fill fptr->enc by default_external + if it's empty. + + * io.c (io_enc_str): fptr->enc is always set for reading IO (by + rb_io_check_readable(fptr)). + +Sun Dec 23 01:18:06 2007 David Flanagan + + * io.c, io.h: temporary patch to partially implement + transcode-on-read and transcode-on-write + +Sun Dec 23 00:48:05 2007 Shugo Maeda + + * test/net/imap/test_imap.rb: added tests for SSL. + +Sat Dec 22 21:10:53 2007 Yukihiro Matsumoto + + * ext/syck/rubyext.c (syck_genericresolver_node_import): should + not set instance variable "@kind" before initializing it. + [ruby-dev:32677] + +Sat Dec 22 19:52:23 2007 Koichi Sasada + + * bootstraptest/test_objectspace.rb: fix condition. + +Sat Dec 22 19:17:10 2007 Koichi Sasada + + * ext/probeprofiler/: removed. + +Sat Dec 22 19:14:38 2007 Koichi Sasada + + * process.c (rb_f_fork): Unsupport Kernel.fork() on NetBSD. + +Sat Dec 22 15:54:54 2007 Martin Duerst + + * test/ruby/test_transcode.rb: Added simple tests for + EUC-JP and Shift_JIS and tests for ASCII-only range + +Sat Dec 22 18:20:13 2007 NAKAMURA Usaku + + * common.mk (version.o): add dependency. [ruby-dev:32680] + +Sat Dec 22 17:45:11 2007 NARUSE, Yui + + * ext/nkf/nkf.c (Init_nkf): use rb_ascii_encoding() for + rb_nkf_enc_get("US-ASCII"). + * if use rb_nkf_enc_get("US-ASCII"), ruby will crash - this is bug? + +Sat Dec 22 17:39:03 2007 NAKAMURA Usaku + + * lib/mkmf.rb ($extmk): fixed broken condition. + +Sat Dec 22 17:35:59 2007 NARUSE, Yui + + * ext/nkf/nkf-utf8.c: Update nkf.c rev:1.157. + + * ext/nkf/nkf.c (rb_nkf_enc_get): replicate proper based encoding. + + * ext/nkf/kconv.c (Kconv#kconv, to*): use self.encoding as from_enc + when from_enc isn't given. + +Sat Dec 22 17:06:50 2007 GOTOU Yuuzou + + * ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext.build): removed. + + * ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext#set_params): + new method to set suitable SSL parameters. + + * lib/net/pop.rb, lib/net/http.rb, lib/net/imap.rb, + test/openssl/test_ssl.rb: follow above change. + + * test/net/http/test_https.rb: refine error case. + +Sat Dec 22 16:58:49 2007 Shugo Maeda + + * lib/net/imap.rb (encode_utf7): accept UTF-8 strings. + + * lib/net/imap.rb (decode_utf7): return UTF-8 strings. + +Sat Dec 22 15:56:36 2007 NAKAMURA Usaku + + * transcode_data_japanese: typo. + +Sat Dec 22 15:54:54 2007 Martin Duerst + + * ChangeLog: Information for last patch got lost, fixed + +Sat Dec 22 15:45:45 2007 Martin Duerst + + * transcode_data_one_byte: slightly optimized + + * transcode_data_japanese: new data file for EUC-JP and SHIFT_JIS + (not yet optimized; tests to follow; data from + http://nkf.sourceforge.jp/ucm/{SJIS|eucJP}-nkf.ucm) + + * common.mk, transcode.c: Adjusted for transcode_data_japanese + +Sat Dec 22 15:30:13 2007 NAKAMURA Usaku + + * */Makefile.sub (MFLAGS): define unless defined. + +Sat Dec 22 15:17:40 2007 NAKAMURA Usaku + + * lib/mkmf.rb ($extmk): set true only when under ext/ or tool/. + +Sat Dec 22 15:14:48 2007 Nobuyoshi Nakada + + * common.mk (encs, ext/ripper/ripper.c): needs MFLAGS. + + * configure.in (STRINGIZE): stringizing macro. + + * include/ruby/defines.h (STRINGIZE): fallback. + + * tool/make-snapshot: new file. + + * version.c (ruby_description, ruby_copyright): string constants for + -v option. + +Sat Dec 22 15:03:37 2007 Shugo Maeda + + * lib/net/imap.rb (initialize): fixed documentation. + +Sat Dec 22 15:01:16 2007 Shugo Maeda + + * lib/net/pop.rb (enable_ssl): use OpenSSL::SSL::SSLContext.build + instead of SSLContext.new (default verify mode is now + OpenSSL::SSL::VERIFY_PEER). + +Sat Dec 22 14:45:21 2007 Tadayoshi Funaba + + * lib/date.rb: shouldn't freeze nil. [ruby-dev:32677] + +Sat Dec 22 14:27:27 2007 Tanaka Akira + + * regenc.c (onigenc_ascii_is_code_ctype): moved from enc/ascii.c. + + * regenc.h (onigenc_ascii_is_code_ctype): declared. + + * enc/ascii.c: use onigenc_ascii_is_code_ctype. + + * enc/us_ascii.c: new file for US-ASCII. + +Sat Dec 22 14:30:34 2007 Nobuyoshi Nakada + + * parse.y (reg_named_capture_assign_iter): allows non-ascii names and + get rid of reserved word IDs. + +Sat Dec 22 14:18:45 2007 Koichi Sasada + + * test/ruby/test_float.rb, test_sprintf.rb: fix test place. + +Sat Dec 22 14:17:02 2007 Koichi Sasada + + * bootstraptest/test_objectspace.rb: skip frozen string. + +Sat Dec 22 14:02:58 2007 Koichi Sasada + + * array.c (rb_ary_permutation): add volatile to avoid GC problem. + +Sat Dec 22 11:47:42 2007 Koichi Sasada + + * eval.c (rb_obj_instance_eval): use class of immediate objects. + + * test/ruby/test_eval.rb: fix a test. + +Sat Dec 22 11:37:06 2007 NAKAMURA Usaku + + * encoding.c (rb_locale_charmap): win32 support. + +Sat Dec 22 11:31:14 2007 Eric Hodel + + * gem_prelude.rb: Place bin dir before lib dir so gem bin stubs work. + +Sat Dec 22 11:05:44 2007 Jim Weirich + + * lib/rake.rb (Rake): Added Rake and related libraries to the + source code base. + +Sat Dec 22 10:30:45 2007 Koichi Sasada + + * tool/insns2vm.rb: moved from lib/vm/instruction.rb. + +Sat Dec 22 10:25:44 2007 Yukihiro Matsumoto + + * parse.y (reg_named_capture_assign_iter): captured name should + not be reserved word. a patch from Keita Yamaguchi + in [ruby-dev:32675]. + + * parse.y (reg_named_capture_assign_iter): just ignore the + captures that do not have valid local variable name. + +Sat Dec 22 10:19:08 2007 Yukihiro Matsumoto + + * eval.c (rb_f_method_name): now __method__ and __callee__ are + aliases. [ruby-core:14244] + +Sat Dec 22 08:29:56 2007 Nobuyoshi Nakada + + * string.c (rb_str_buf_append): improvement for non-broken coded + strings. + +Sat Dec 22 06:30:04 2007 Koichi Sasada + + * bootstraptest/test_fork.rb: skip if fork is not unsupported. + + * bootstraptest/test_io.rb: skip if require failed. + +Sat Dec 22 06:09:12 2007 David Flanagan + + * io.c: fix typo in rdoc comment + +Sat Dec 22 05:09:43 2007 NAKAMURA Usaku + + * parse.y (parser_str_new, rb_intern3): rb_default_encoding() renamed. + + * ext/nkf/nkf.c (rb_nkf_putchar): ditto. + +Sat Dec 22 03:54:18 2007 Yukihiro Matsumoto + + * encoding.c (rb_ascii_encoding): renamed from previous + rb_default_encoding(). + +Sat Dec 22 02:49:02 2007 Yukihiro Matsumoto + + * parse.y (command): block from cmd_brace_block was ignored. + [ruby-dev:32644] + + * re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the + encoding of the str is ASCII-8BIT. + +Sat Dec 22 01:52:11 2007 Yukihiro Matsumoto + + * io.c (io_ungetc): avoid buffer relocation, which might cause + serious problem under concurrent situation. + +Sat Dec 22 01:35:41 2007 Tanaka Akira + + * re.c (ARG_ENCODING_NONE): defined for /.../n option. + (REG_ENCODING_NONE): ditto. + (rb_char_to_option_kcode): return ARG_ENCODING_NONE for n. + (rb_reg_prepare_re): warn /ascii/n =~ "non-ascii". + (rb_reg_initialize): set REG_ENCODING_NONE from ARG_ENCODING_NONE. + +Sat Dec 22 01:23:10 2007 Shugo Maeda + + * test/json/test_json_addition.rb (test_core): do not use Time.now + because JSON can't hold nsec. + +Sat Dec 22 01:10:30 2007 NAKAMURA Usaku + + * ext/tk/sample/tkextlib/vu/canvSticker2.rb, + ext/tk/sample/demos-{en,jp}/bind.rb: fix typo. [ruby-dev:32668] + +Sat Dec 22 00:56:43 2007 Yukihiro Matsumoto + + * sample/test.rb (valid_syntax): force_encoding input script. + +Fri Dec 21 23:48:38 2007 NAKAMURA Usaku + + * lib/mkmf.rb (depend_rules): suffixes list broken. fixed. + +Fri Dec 21 20:18:15 2007 Yukihiro Matsumoto + + * bignum.c (rb_big_mul0): remove unused variable. + + * bignum.c (bigdivrem): ditto. + +Fri Dec 21 20:13:51 2007 Nobuyoshi Nakada + + * include/ruby/ruby.h (rb_catch_obj, rb_throw_obj): prototyped. + + * include/ruby/intern.h (rb_fiber_alive_p): prototyped. + +Fri Dec 21 20:09:18 2007 Nobuyoshi Nakada + + * string.c (rb_str_succ): retry increasing until valid char is found. + +Fri Dec 21 20:00:02 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_replicate): now creates first class encoding. + + * encoding.c (rb_define_dummy_encoding): always based on the default + encoding. + + * encoding.c (rb_enc_dummy_p): check if dummy. + + * encoding.c (enc_inspect): shows if dummy. + + * encoding.c (Init_Encoding): added dummy? method + + * include/ruby/encoding.h (ENCODING_INLINE_MAX): increased. + +Fri Dec 21 18:40:54 2007 Koichi Sasada + + * io.c: write() should be in blocking region. + + * bootstraptest/test_io.rb, test_knownbug.rb: move a fixed test. + +Fri Dec 21 17:56:30 2007 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: provisional support on Ruby-VM. + + * ext/tk/MANUAL_tcltklib.eng, ext/tk/MANUAL_tcltklib.eucj: + modify document about new functions. + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/labelframe.rb, + ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/toplevel.rb, + ext/tk/lib/tk/scrollbar.rb, ext/tk/lib/tk/message.rb, + ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/text.rb, + ext/tk/lib/tk/scale.rb, ext/tk/lib/tk/entry.rb, + ext/tk/lib/tk/ttk_selector.rb, ext/tk/lib/tk/menu.rb, + ext/tk/lib/tk/label.rb, ext/tk/lib/tk/spinbox.rb, + ext/tk/lib/tk/textmark.rb, ext/tk/lib/tk/winpkg.rb, + ext/tk/lib/tk/checkbutton.rb, ext/tk/lib/tk/panedwindow.rb, + ext/tk/lib/tk/texttag.rb, ext/tk/lib/tk/root.rb, + ext/tk/lib/tk/textimage.rb, ext/tk/lib/tk/radiobutton.rb, + ext/tk/lib/tk/package.rb, ext/tk/lib/tk/macpkg.rb, + ext/tk/lib/tk/composite.rb, ext/tk/lib/tk/autoload.rb, + ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/button.rb, + ext/tk/lib/tk/textwindow.rb, + ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, + ext/tk/lib/tkextlib/tile/style.rb, + ext/tk/lib/tkextlib/tile/tscrollbar.rb, + ext/tk/lib/tkextlib/tile/tpaned.rb, ext/tk/lib/tkextlib/tile.rb, + ext/tk/extconf.rb: support Tcl/Tk8.5 (partial, not complete). + + * ext/tk/sample/demos-jp/widget, + ext/tk/sample/demos-jp/pendulum.rb, + ext/tk/sample/demos-jp/bind.rb, + ext/tk/sample/tkextlib/vu/canvSticker2.rb, + ext/tk/sample/demos-en/pendulum.rb, + ext/tk/sample/demos-en/bind.rb: remove $KCODE and minor bug fix. + +Fri Dec 21 17:49:06 2007 Nobuyoshi Nakada + + * transcode.c (rb_str_transcode_bang): returns self if no conversion. + [ruby-dev:32662] + +Fri Dec 21 17:44:47 2007 Eric Hodel + + * lib/rubygems*: Update to RubyGems 1.0.1, r1581 + +Fri Dec 21 17:32:49 2007 Koichi Sasada + + * bootstraptest/pending.rb: renamed from featurebug.rb. + This file contains bugs which is known but will not be + fixed in days. + +Fri Dec 21 17:31:22 2007 Nobuyoshi Nakada + + * debug.c (dummy_gdb_enums.various): added ENCODING and CODERANGE + constants. + + * .gdbinit: use enum constants. + +Fri Dec 21 17:28:17 2007 Koichi Sasada + + * bootstraptest/featurebug.rb: added. + + * bootstraptest/test_knownbug.rb: move a feature bug. + +Fri Dec 21 17:25:22 2007 Koichi Sasada + + * thread.c (rb_thread_atfork): fix to mark thread object. + [ruby-dev:32404] + + * bootstraptest/test_knownbug.rb, test_fork.rb: move a fixed test. + +Fri Dec 21 17:07:13 2007 Koichi Sasada + + * gc.h: extern variable should not be initialized. + + * thread_pthread.c: add a parameter. + +Fri Dec 21 16:50:43 2007 Tanaka Akira + + * encoding.c (Init_Encoding): use enc_name as to_s. + (enc_inspect): renamed from enc_to_s. add "#" at beginning. + +Fri Dec 21 16:37:43 2007 NARUSE, Yui + + * ext/nkf/nkf-utf8/config.h (MIME_DECODE_DEFAULT, X0201_DEFAULT): + defined as FALSE. nkf and kconv don't decode MIME encoded string + and don't convert JIS X 0201 Katakana. + + * test/nkf/test_kconv.rb: fix tests. + +Fri Dec 21 16:33:28 2007 Nobuyoshi Nakada + + * enumerator.c (enumerator_iter_i): adjusted for rb_block_call_func. + + * include/ruby/ruby.h (rb_block_call_func): function to be called back + as block. + +Fri Dec 21 16:25:25 2007 Martin Duerst + + * common.mk, transcode_data_iso_8859.c: renamed to + transcode_data_one_byte.c. + +Fri Dec 21 16:10:30 2007 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c (VpMidRound): Round method bug + pointed by Ryan Platte fixed(Patch to the patch from "NATORI + Shin"). [ruby-talk:273360] + +Fri Dec 21 16:06:13 2007 Tanaka Akira + + * re.c (append_utf8): use rb_utf8_encoding() instead of + rb_enc_find("utf-8"). + +Fri Dec 21 15:59:46 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_init): use enc_register_at() directly. + + * encoding.c (rb_utf8_encoding): returns utf-8 encoding. + + * include/ruby/encoding.h (rb_utf8_encoding): prototyped. + + * parse.y (UTF8_ENC): uses rb_utf8_encoding(). + +Fri Dec 21 15:31:59 2007 Yukihiro Matsumoto + + * io.c (rb_io_s_read): allow specifying encoding explicitly. + + * io.c (rb_io_binmode): specifies encoding to ASCII-8BIT (binary). + + * io.c (rb_io_s_read): IO should be in binary mode when offset is + specified. + + * encoding.c (rb_to_encoding): returns default encoding if no + corresponding encoding found. + +Fri Dec 21 15:24:22 2007 Shugo Maeda + + * lib/net/imap.rb (initialize): accept service name. changed + the default value of the old style +verify+ argument to true. + +Fri Dec 21 15:15:44 2007 Tanaka Akira + + * gc.c (rb_garbage_collect): new function for debugging. + +Fri Dec 21 15:16:00 2007 Nobuyoshi Nakada + + * encoding.c (rb_to_encoding_index): should return error instead of + exception even if type is incorrect. + +Fri Dec 21 14:58:27 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_init_copy): prohibit cloning of + generators since Fibers cannot be copied. + + * enumerator.c (enumerator_init_copy): typo fixed. + +Fri Dec 21 14:46:07 2007 Tanaka Akira + + * io.c (Init_IO): define IO::BINARY even if O_BINARY is not exist. + +Fri Dec 21 14:01:14 2007 Yukihiro Matsumoto + + * test/ruby/test_system.rb (TestSystem::valid_syntax): apply + ASCII-8BIT encoding explicitly. + + * re.c (rb_reg_prepare_re): add encoding name in the message. + +Fri Dec 21 13:54:05 2007 Tanaka Akira + + * re.c: change "character encodings differ" error messages. + +Fri Dec 21 13:46:58 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_register): set encoding constant. + + * encoding.c (rb_enc_find_index): replace non-alphanumeric chars with + underscores, so that initialize function can be called. + + * encoding.c (rb_enc_find_index): extension libraries have lower case + names conventionally. + + * ruby.c (proc_options, process_options): finds encoding after + load_path is initialized. + +Fri Dec 21 13:10:57 2007 Yukihiro Matsumoto + + * io.c (rb_io_external_encoding): new method. + + * encoding.c (rb_enc_from_encoding): returns Qnil for NULL + encoding. + + * io.c (rb_io_external_encoding): should fill delayed + initialization for STDIN. + +Fri Dec 21 13:09:11 2007 Tanaka Akira + + * encoding.c (rb_locale_charmap): return nil if no locale information. + +Fri Dec 21 12:55:39 2007 Tanaka Akira + + * lib/runit, lib/rubyunit.rb, test/testunit/runit: removed. + +Fri Dec 21 12:45:49 2007 Yukihiro Matsumoto + + * string.c (rb_str_chomp_bang): avoid unnecessary loop using + ONIGENC_LEFT_ADJUST_CHAR_HEAD(). + +Fri Dec 21 12:32:08 2007 Yukihiro Matsumoto + + * file.c (Init_File): File.exists? revived. + + * dir.c (Init_Dir): Dir.exists? again. + +Fri Dec 21 12:26:36 2007 Koichi Sasada + + * compile.c: remove "illegal". + +Fri Dec 21 12:22:20 2007 Nobuyoshi Nakada + + * keywords, parse.y (__ENCODING__): represent script encoding. + +Fri Dec 21 12:16:50 2007 Tanaka Akira + + * string.c (rb_str_is_ascii_only_p): new method ascii_only?. + +Fri Dec 21 12:11:57 2007 Yukihiro Matsumoto + + * io.c (rb_io_mode_enc): set default external encoding if no + encoding specified explicitly. + +Fri Dec 21 12:00:34 2007 Tanaka Akira + + * configure.in: check langinfo.h and locale.h. + + * encoding.c: use langinfo.h only if available. + + * main.c: use locale.h only if available. + +Fri Dec 21 11:47:56 2007 Tanaka Akira + + * encoding.c: include locale.h + (rb_locale_charmap): new method Encoding.locale_charmap for + nl_langinfo(CODESET). + + * include/ruby/encoding.h (rb_locale_charmap): declared. + + * main.c (main): call setlocale with LC_CTYPE. + + * ruby.c (locale_encoding): use rb_locale_charmap. + +Fri Dec 21 11:35:10 2007 Koichi Sasada + + * vm.c, vm_dump.c: fix typo. Reported by Yuki Mitsui. + +Fri Dec 21 11:28:00 2007 Tanaka Akira + + * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb, + compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c, + ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb, + ext/openssl/ossl_bn.c, numeric.c, vm.c, + benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal" + for non law violation context. + +Fri Dec 21 11:23:24 2007 Nobuyoshi Nakada + + * common.mk (enc.mk): depends on $(RBCONFIG) instead of rbconfig.rb. + + * encoding.c (Init_Encoding): ISO-8859-1 is no longer a replica. + + * regenc.h (OnigEncodingDefine): names of extension and encoding can + differ. + + * enc/Makefile.in: always shared. + + * enc/depend (deffile): should not upcase. + + * enc/{ascii,euc_jp,sjis,utf8,iso_8859_{1..16}}.c: fix for Init. + +Fri Dec 21 09:26:48 2007 Tanaka Akira + + * tool/compile_prelude.rb: use erb. + +Fri Dec 21 08:07:35 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_next): should call next_init() if fiber + is dead already. [ruby-dev:32459] + +Fri Dec 21 01:21:49 2007 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build): + enable CRL checking by default. + +Fri Dec 21 01:20:56 2007 GOTOU Yuuzou + + * lib/net/http.rb (Net::HTTP#connect): use + OpenSSL::SSL::SSLContext.build instead of SSLContext.new (default + verify mode is now OpenSSL::SSL::VERIFY_PEER). + + * lib/net/https.rb: SSL parameters are defined by attr_accessor. + + * test/net/http/test_https.rb: add test for HTTPS features. + +Fri Dec 21 01:11:37 2007 GOTOU Yuuzou + + * io.c (select_internal): should return original value. + +Fri Dec 21 00:26:39 2007 Yukihiro Matsumoto + + * string.c (tr_trans): wrong encoding check for tree strings. + + * test/ruby/test_m17n.rb (TestM17N::test_tr_s): "invalid mbstring + sequence" is not an error to be tested. + + * test/ruby/test_m17n.rb (TestM17N::test_tr): ditto. + +Thu Dec 20 19:29:07 2007 Shugo Maeda + + * lib/net/imap.rb (initialize): the second argument is an option + hash now. use SSLContext.build to specify SSL parameters. + +Thu Dec 20 19:11:56 2007 Koichi Sasada + + * thread_pthread.c (native_thread_apply_priority): check + _POSIX_PRIORITY_SCHEDULING for OpenBSD. + +Thu Dec 20 18:33:54 2007 Koichi Sasada + + * configure.in: add libthr for FreeBSD. + +Thu Dec 20 18:17:14 2007 Koichi Sasada + + * common.mk, *.ci: renamed to *.c. + + * eval_load.c: renamed to load.c. + +Thu Dec 20 17:36:01 2007 Eric Hodel + + * lib/rubygems*: Import RubyGems 1.0.0, r1575. + +Thu Dec 20 17:18:38 2007 Koichi Sasada + + * proc.c: support Proc#binding. + + * sample/test.rb: add a test. + +Thu Dec 20 17:15:15 2007 Martin Duerst + + * pack.c: Slight change to documentation ('character' -> + 'byte (C char)'). [ruby-core:13126], see also [ruby-core:13998]. + +Thu Dec 20 17:07:54 2007 Nobuyoshi Nakada + + * common.mk (enc.mk): depends on rbconfig.rb. + + * regenc.h (OnigEncodingDefine): external encoding definition macro. + + * enc/Makefile.in: fix for linking. + + * enc/depend, enc/make_encmake.rb: fix for Windows. + + * enc/{ascii,euc_jp,sjis,utf8,iso_8859_{1..16}}.c: renamed. + +Thu Dec 20 16:42:55 2007 Koichi Sasada + + * iseq.c (find_line_no): return 0 if not found. + +Thu Dec 20 16:04:17 2007 Koichi Sasada + + * insnhelper.ci, vm.c, vm_core.h: change interface of + vm_invoke_block() to specify block ptr. [ruby-talk:266422] + + * cont.c, eval_jump.ci, insns.def, proc.c, signal.c, thread.c: + apply above change. + + * bootstraptest/test_knownbug.rb: move fixed bug. + + * bootstraptest/test_block.rb: ditto. and add a test. + +Thu Dec 20 15:47:13 2007 Nobuyoshi Nakada + + * enc/iso_8859_{1..16}.c: renamed. + +Thu Dec 20 09:59:27 2007 Koichi Sasada + + * insnhelper.ci (vm_expandarray): fix sp increase place. + a patch from Yusuke ENDOH in [ruby-dev:32581]. + + * bootstraptest/test_massign.rb: add a test for above. + + * bootstraptest/test_syntax.rb: fix last committed test. + +Thu Dec 20 09:47:58 2007 Koichi Sasada + + * bootstraptest/test_syntax.rb: add a test. + +Thu Dec 20 09:40:51 2007 Koichi Sasada + + * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency. + +Thu Dec 20 09:42:11 2007 Yukihiro Matsumoto + + * bignum.c (big2str_orig): access beyond memory region cause crash + on interrupt. a patch from Yusuke ENDOH in + [ruby-dev:32651]. [ruby-dev:32641] + +Thu Dec 20 09:06:54 2007 Yukihiro Matsumoto + + * string.c (rb_str_index): wrong starting position. + +Thu Dec 20 06:34:27 2007 Koichi Sasada + + * compile.c (iseq_compile_each): add pop after throw as return. + + * bootstraptest/test_knownbug.rb, test_syntax.rb: move resolved test. + + * vm_core.h, iseq.c, compile.h: add debug output code. + +Thu Dec 20 04:57:18 2007 Koichi Sasada + + * compile.c (iseq_compile_each): remove unused retry entry. + +Thu Dec 20 04:15:41 2007 NAKAMURA Usaku + + * */Makefile.sub (DEFS, RM): output to config.status. + +Thu Dec 20 02:59:05 2007 Yukihiro Matsumoto + + * common.mk (encs): create encoding directory. + +Thu Dec 20 02:50:28 2007 Nobuyoshi Nakada + + * enc/iso8859_{1..16}.c: adjust for ruby. + +Thu Dec 20 02:28:29 2007 Nobuyoshi Nakada + + * enc/iso8859_{1..16}.c: imported from Onigiruma 5.9.0. + +Thu Dec 20 02:23:22 2007 Nobuyoshi Nakada + + * enc/Makefile.in (RM): added. + + * enc/depend (encs): sort in alpha-numeric order. + + * enc/depend (clean, distclean): added. + +Thu Dec 20 01:10:52 2007 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): should handle upper level eval iseq + from break/next, and COMPILE_ERROR() breaks only one block. + [ruby-dev:31372] + +Thu Dec 20 00:07:36 2007 Masatoshi SEKI + + * test/drb/drbtest.rb (test_07_public_private_protected_missing): + followed current Ruby specification. + +Wed Dec 19 23:57:37 2007 Nobuyoshi Nakada + + * dir.c (dir_inspect, dir_path, dir_tell): check for frozen and closed + is not needed. [ruby-dev:32640] + +Wed Dec 19 22:59:52 2007 Yukihiro Matsumoto + + * string.c (str_sublen): adjust position if position is not at the + head of a character. + + * string.c (rb_str_chomp_bang): check if match start at the head + of a character. + + * string.c (rb_str_chomp_bang): wrong adjust condition. + + * string.c (rb_str_rindex): comparison length should be based on + bytes, not characters. + + * string.c (rb_str_rindex_m): too much adjustment. + + * re.c (reg_match_pos): pos adjustment should be based on + characters. + + * test/ruby/test_m17n.rb (TestM17N::test_str_insert): test updated + to check negative offset behavior. + + * string.c (rb_str_each_line): should consider rslen. + + * string.c (rb_str_buf_append): should propagate encoding. + + * string.c (rb_str_each_line): ditto. + + * test/ruby/test_m17n.rb (TestM17N::test_str_each_line): should + check encoding as well. + + * test/ruby/test_m17n.rb (TestM17N::test_str_each_line): empty + array can not propagate encoding; should not check. + +Wed Dec 19 21:42:18 2007 Nobuyoshi Nakada + + * re.c (rb_reg_regsub): should set checked encoding. + + * string.c (rb_str_sub_bang): applied r14212 too. + +Wed Dec 19 20:40:01 2007 NAKAMURA Usaku + + * bignum.c (bigmul1): C99ism. + + * bignum.c (bigdivrem1): need dummy return value. + +Wed Dec 19 19:18:06 2007 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: Updated. + + * ext/nkf/nkf.c (rb_nkf_enc_get): added. + (find encoding or replicate default encoding) + + * ext/nkf/nkf.c (NKF::): redefine encoding constant. + + * ext/nkf/lib/kconv.rb (Kconv::): redefined as Encoding. + + * ext/nkf/lib/kconv.rb: refactoring. + +Wed Dec 19 19:11:08 2007 Yukihiro Matsumoto + + * bignum.c (rb_big_mul0): blocking check for bigger numbers. + a patch from Yusuke ENDOH in [ruby-dev:32632]. + + * bignum.c (bigdivrem): ditto. + +Wed Dec 19 17:34:50 2007 Koichi Sasada + + * compile.c (iseq_compile_each): remove "retry" in block. + ("iter{retry}" cause syntax error) + Currently, "begin; ...; rescue; iter{retry}; end" cause + syntax error too. + + * bootstraptest/test_jump.rb: ditto. + + * lib/drb/invokemethod.rb: ditto. + + * sample/drb/darrayc.rb: ditto. + + * sample/test.rb: ditto. + + * test/drb/drbtest.rb: ditto. + + * test/ruby/test_iterator.rb: ditto. + + * sample/test.rb: add a 'test' directory on the SYSTEM test. + +Wed Dec 19 17:12:59 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb, test_block.rb: + move fixed bug. + + * bootstraptest/test_m17n.rb: added. + +Wed Dec 19 16:59:55 2007 Koichi Sasada + + * eval.c (errinfo_place): skip if error is Fixnum. [ruby-dev:32608] + + * bootstraptest/test_exception.rb, test_known_bug.rb: move fixed bug. + +Wed Dec 19 16:31:58 2007 Nobuyoshi Nakada + + * parse.y (reg_named_capture_assign_iter): remove C99 dependency. + + * parse.y (reg_named_capture_assign_iter): get rid of creating + unnecessary ID. + + * parse.y (rb_enc_symname2_p): check for non-nul-terminated string. + +Wed Dec 19 15:37:06 2007 Yukihiro Matsumoto + + * insnhelper.ci (vm_yield_with_cfunc): call cfunc with + (argv[0], data, argc, argv) to pass all arguments. + + * enumerator.c (enumerator_each_i): adapted to new calling + convention. + +Wed Dec 19 15:13:20 2007 Yukihiro Matsumoto + + * string.c (rb_str_justify): should propagate encoding from pad + string too. + +Wed Dec 19 13:57:43 2007 Nobuyoshi Nakada + + * configure.in (TIMEZONE_VOID): check whether timezone requires zero + arguments. [ruby-dev:32631] + +Wed Dec 19 13:22:14 2007 NARUSE, Yui + + * ext/nkf/nkf.c (NKF::_ENCODING): removed. + + * ext/nkf/nkf.c (rb_nkf_kconv): renamed to rb_nkf_convert. + + * ext/nkf/nkf.c (rb_nkf_convert): set encoding. + + * ext/nkf/nkf.c (rb_nkf_guess1): removed. + + * ext/nkf/nkf.c (rb_nkf_guess2): renamed to rb_nkf_guess. + + * ext/nkf/nkf.c (rb_nkf_guess): + guess method now returns encoding object. + + * ext/nkf/nkf-utf8/nkf.c: Update to nkf 2.0.8 2007-12-19. + +Wed Dec 19 10:52:29 2007 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): an underscore succeeding after octal + prefix is allowed. [ruby-core:14139] + +Wed Dec 19 00:09:19 2007 Yukihiro Matsumoto + + * bignum.c (rb_cstr_to_inum): wrong radix check. a patch from + Yusuke ENDOH in [ruby-dev:32628]. + + * bignum.c (big2str_find_n1): ditto. + +Tue Dec 18 23:53:53 2007 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): fix for segfault. [ruby-dev:31372] + +Tue Dec 18 23:44:32 2007 GOTOU Yuuzou + + * test/net/http/utils.rb: split TestNetHTTPUtils module from + test/net/http/test_http.rb. and start HTTP server in each test case. + +Tue Dec 18 23:27:51 2007 GOTOU Yuuzou + + * lib/webrick/server.rb (WEBrick::GenericServer#accept_client): + should rescue Errno::EINVAL from TCPServer#accept. this exception + might occur if the server socket is not in ready to listen. + + * lib/webrick/server.rb (WEBrick::GenericServer#accept_client): + don't call TCPServer#close if the :ShutdownSocketWithoutClose is set. + + * lib/webrick/config.rb (WEBrick::Config::General): add new parameter + :ShutdownSocketWithoutClose. + +Tue Dec 18 22:51:47 2007 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#shutdown): + new method which calls TCPSocket#shutdown of the underlying socket. + +Tue Dec 18 22:11:50 2007 GOTOU Yuuzou + + * lib/rss/parser.rb, lib/rss/atom.rb, lib/rss/rss.rb, + test/rss/rss-assertions.rb, test/rss/test_atom.rb: use + pack/unpack("m") instead of base64 library. + + * lib/webrick/httpproxy.rb: use delete("\n") instead of chomp/chop + because the result of pack("m") might be multi-line. + +Tue Dec 18 22:12:35 2007 Koichi Sasada + + * insnhelper.ci, vm.c: rewrite sp manipulation around method/block + invocation. [ruby-dev:32547] + +Tue Dec 18 22:11:23 2007 NAKAMURA Usaku + + * ext/dl/win32/lib/win32/sspi.rb: use pack/unpack("m") instead of + base64 library which was already removed. + +Tue Dec 18 21:09:23 2007 Koichi Sasada + + * vm.c (invoke_block): merge 2 stack overflow checks. + +Tue Dec 18 20:58:35 2007 Koichi Sasada + + * compile.c, insnhelper.ci, insns.def, object.c, vm.c, vm.h: + optimize !@, != method invocation. + + * id.c, id.h: ditto. + + * bootstraptest/test_syntax.rb: add tests for above. + +Tue Dec 18 18:10:05 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: add issues. + +Tue Dec 18 20:22:44 2007 Tanaka Akira + + * parse.y (arg tMATCH arg): call reg_named_capture_assign_gen if regexp + literal is used. + (reg_named_capture_assign_gen): assign the result of named capture + into local variables. + [ruby-dev:32588] + + * re.c: document the assignment by named captures. + +Tue Dec 18 18:09:15 2007 Yukihiro Matsumoto + + * string.c (rb_str_splice): propagate encoding. + + * string.c (rb_str_subpat_set): ditto. + +Tue Dec 18 17:27:12 2007 Yukihiro Matsumoto + + * object.c (rb_obj_freeze): preserve frozen state of immediate + values in internal hash table, a la generic_ivar. + + * object.c (rb_obj_frozen_p): check immediate values too. + + * variable.c (generic_ivar_set): add frozen check fro immediate + values. + +Tue Dec 18 17:04:25 2007 Nobuyoshi Nakada + + * transcode.c (rb_str_transcode_bang, rb_str_transcode): set new + encoding even if no conversion is done because of 7bit only. + [ruby-dev:32591] + +Tue Dec 18 15:43:59 2007 Nobuyoshi Nakada + + * common.mk (encs, ext/ripper/ripper.c): other options must come + before MAKEFLAGS in GNU make. + +Tue Dec 18 15:19:55 2007 Eric Hodel + + * lib/rdoc/parsers/parse_rb.rb: Don't call private fail anymore. + +Tue Dec 18 15:17:26 2007 Nobuyoshi Nakada + + * common.mk (encs, ext/ripper/ripper.c): pass MAKEFLAGS. + +Tue Dec 18 14:45:25 2007 Yukihiro Matsumoto + + * parse.y (op_tbl): remove duplication to avoid symbol aliases. + +Tue Dec 18 14:39:05 2007 Yukihiro Matsumoto + + * string.c (str_nth): need not to raise out-of-range exception. + + * test/ruby/test_m17n.rb (TestM17N::test_str_aref_len): removed + debug print. + +Tue Dec 18 14:05:23 2007 Nobuyoshi Nakada + + * enc/depend: get rid of target expanded as empty for nmake. + +Tue Dec 18 07:56:57 2007 Yukihiro Matsumoto + + * proc.c (rb_obj_public_method): Object#public_method to retrieve + public method object. + + * proc.c (rb_mod_public_instance_method): Module#public_instance_method + to retrieve public instance method from class / module. + + * proc.c (mnew): visibility check added. + + * eval_error.ci (rb_print_undef): add rb_ prefix. + + * eval_error.ci (rb_print_undef): add visibility in the error + message. + +Tue Dec 18 05:54:26 2007 Yukihiro Matsumoto + + * lib/Env.rb, lib/base64.rb, lib/importenv.rb, lib/eregex.rb: removed. + + * lib/ping.rb, lib/readbytes.rb: removed + +Tue Dec 18 02:30:56 2007 Nobuyoshi Nakada + + * configure.in (BUILTIN_ENCS): removed. + + * common.mk (enc.mk): pass BUILTIN_ENCS from command line. + + * enc/depend: ditto. + + * enc/make_encmake.rb: ditto. + +Tue Dec 18 01:46:48 2007 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): need to clear output buffer to avoid + broken encoding compatibility check. + +Tue Dec 18 01:40:20 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (depend_rules): inserts ruby to only headers. + +Tue Dec 18 01:21:19 2007 Nobuyoshi Nakada + + * parse.y (parser_encode_length): chomp eol style modifiers. + + * parse.y (parser_magic_comment): ditto. + + * parse.y (set_file_encoding): ditto. + +Tue Dec 18 01:15:44 2007 Nobuyoshi Nakada + + * common.mk (encs): added dependencies. + + * enc/Makefile.in, enc/depend, enc/make_encmake.rb: moved serb code. + + * lib/mkmf.rb (depend_rules): now takes content string, not file name. + + * win32/enc-setup.mak: overrides default target. + +Tue Dec 18 00:26:12 2007 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): raise error if non-Unicode fixed + encoding option is specified for regexp literals with \u{} + escapes. + + * string.c (rb_str_squeeze_bang): should squeeze multibyte + characters as well. + +Mon Dec 17 21:41:25 2007 Nobuyoshi Nakada + + * win32/enc-setup.mak: extracts BUILTIN_ENCOBJS. + + * tool/compile_prelude.rb: needs srcdir. + +Mon Dec 17 21:24:04 2007 GOTOU Yuuzou + + * common.mk (miniprelude.c): add -I$(srcdir). + +Mon Dec 17 20:53:27 2007 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version): + new method OpenSSL::SSL::SSLContext#ssl_version to wrap + SSL_CTX_set_ssl_version. + + * ext/openssl/ossl_ssl.c (ossl_ssl_get_verify_result): + new method OpenSSL::SSL::SSLSocket#verify_result to wrap + SSL_get_verify_result. + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build): + new method to build OpenSSL::SSL::SSLContext with Hash parameters. + this method provides safety default parameters than SSLContext.new. + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL.verify_certificate_identity): + new module function: pull out identity verification process + from OpenSSL::SSL::SSLSocket#post_connection_check. + +Mon Dec 17 18:42:23 2007 Yukihiro Matsumoto + + * string.c (scan_once): need no encoding compatibility check. + it's done inside of re_reg_search(). + + * string.c (rb_str_split_m): ditto. + + * re.c (rb_reg_regsub): ditto. + +Mon Dec 17 17:50:30 2007 Yukihiro Matsumoto + + * string.c (rb_str_index): check if substring is broken. + + * string.c (rb_str_rindex): ditto. + + * string.c (rb_str_succ): should carry over. + +Mon Dec 17 17:47:26 2007 Nobuyoshi Nakada + + * common.mk (encs): new target to compile external encodings. + + * enc/Makefile.in: became a serb template. + + * enc/make_encmake.rb: creates enc.mk from enc/Makefile.in using serb. + + * lib/mkmf.rb (relative_from): moved from ext/extmk.rb. + + * lib/mkmf.rb ($extmk): true if under to top source directory, not + only ext. + + * lib/mkmf.rb (depend_rules): extracted from create_makefile. + + * tool/serb.rb (serb): splitted from tool/compile_prelude.rb. + +Mon Dec 17 17:32:55 2007 Nobuyoshi Nakada + + * configure.in (MAKEFILES): removed enc/Makefile. + + * configure.in (EXTERNAL_ENCOBJS, ENCSOS): removed. + + * enc/Makefile.in (BUILTIN_ENCS): includes .c suffix. + + * enc/depend: splitted from Makefile.in. + + * {bcc32,win32,wince}/setup.mak (-encs-): extracts BUILTIN_ENCOBJS. + +Mon Dec 17 17:07:53 2007 Tanaka Akira + + * string.c (rb_enc_str_asciionly_p): use rb_enc_str_coderange. + +Mon Dec 17 16:39:25 2007 Tanaka Akira + + * string.c (rb_enc_str_coderange): set ENC_CODERANGE_BROKEN using + rb_enc_precise_mbclen. + (rb_str_valid_encoding_p): just check coderange is + ENC_CODERANGE_BROKEN or not. + +Mon Dec 17 16:04:16 2007 GOTOU Yuuzou + + * ext/openssl/lib/openssl/buffering.rb (Buffering#gets): added second + optional argument to specify maximum length limit. + +Mon Dec 17 16:02:30 2007 GOTOU Yuuzou + + * lib/webrick/httprequest.rb, lib/webrick/cgi.rb: Request-Line or + header fields should be read with maximum length. [ruby-talk:231745] + +Mon Dec 17 14:03:39 2007 Tanaka Akira + + * include/ruby/encoding.h (ENC_CODERANGE_VALID): rename from + ENC_CODERANGE_8BIT. + + * string.c (rb_enc_str_coderange): follow the renaming. + +Mon Dec 17 13:56:53 2007 Yukihiro Matsumoto + + * string.c (tr_find): wrong condition fixed. + + * sprintf.c (rb_str_format): check encoding based on result, not + the format string. + + * string.c (rb_str_upto): add encoding check. + +Mon Dec 17 12:21:25 2007 Nobuyoshi Nakada + + * Makefile.in (RUNRUBY): added RUNRUBYOPT. + +Mon Dec 17 11:38:59 2007 Tanaka Akira + + * thread_win32.ci (native_thread_create): initialize + th->machine_stack_maxsize as rb_gc_stack_maxsize. + +Sun Dec 16 17:07:35 2007 Martin Duerst + + * transcode.c (transcode_loop): removed special case (-1) + for undefined conversions. + + * transcode_data_iso_8859.c: Changed from character constants + ('\xC2') to integer constants (0xC2) for shorter files and + better readability; eliminated duplicated tables; changed + from -1 offset to actual UNDEF entry (not yet distinguishing + UNDEF and ILLEGAL correctly). + + * test/ruby/test_transcode.rb: added a test for UNDEF conversion. + +Sun Dec 16 14:51:59 2007 Nobuyoshi Nakada + + * configure.in (MAKEFILES): should be enc/Makefile, not GNUmakefile. + [ruby-dev:32609] + + * configure.in (BUILTIN_ENCS): removed escapes for OpenBSD. + +Sat Dec 15 23:58:46 2007 Tanaka Akira + + * test/openssl/test_pair.rb (SSLPair#ssl_pair): join the thread, even + on an error. + +Sat Dec 15 23:50:31 2007 Tanaka Akira + + * test/xmlrpc/webrick_testing.rb: join webrick server thread. + +Sat Dec 15 22:27:39 2007 Nobuyoshi Nakada + + * configure.in (BUILTIN_ENCS): splitted command line instead of + semicolons for Solaris. + +Sat Dec 15 21:38:24 2007 Tanaka Akira + + * lib/timeout.rb: join the background thread to make sure it is dead. + +Sat Dec 15 20:20:48 2007 Nobuyoshi Nakada + + * configure.in (enc/Makefile): add external encoding objects list. + + * common.mk (BUILTIN_ENCOBJS): renamed from ENCOBJS. + + * configure.in (BUILTIN_ENCS): [] needs to be enclosed because of m4. + + * Makefile.in (BUILTIN_ENCOBJS): substituted by autoconf. + + * enc/Makefile.in: new file to compile external encoding sources. + + * encoding.c (rb_enc_find_index): auto-load external encoding objects + as "ext/ENCODING_NAME". [ruby-dev:32606] + +Sat Dec 15 13:04:30 2007 Tanaka Akira + + * vm_core.h (rb_thread_t): new member machine_stack_maxsize and + machine_register_stack_maxsize. + + * gc.c (rb_gc_stack_maxsize): new global variable for the thread size + of the main thread. + (STACK_LEVEL_MAX): use machine_stack_maxsize of current thread. + (ruby_stack_check): check IA64 register stack. + (ruby_set_stack_size): set rb_gc_stack_maxsize. + (Init_stack): set rb_gc_stack_maxsize. + + * thread_pthread.ci (native_thread_create): initialize + th->machine_stack_maxsize and th->machine_register_stack_maxsize. + + * vm.c (Init_BareVM): initialize th->machine_stack_maxsize and + th->machine_register_stack_maxsize. + + * thread_win32.ci (native_thread_create): initialize + th->machine_stack_maxsize. not tested. just a guess at all. + + [ruby-dev:32604] + +Sat Dec 15 12:58:00 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_register, rb_enc_replicate, rb_enc_alias): check + if already registered. + +Sat Dec 15 01:57:06 2007 Yukihiro Matsumoto + + * lib/rdoc/options.rb (Options::parse): do not access $KCODE any + longer. [ruby-core:14079] + + * lib/irb/init.rb (IRB::IRB.parse_opts): ditto. + + * lib/cgi.rb (CGI::CGI): ditto. + +Fri Dec 14 18:18:31 2007 Tanaka Akira + + * thread_pthread.ci (native_thread_create): twice the stack size. + 512KB is not enough to complete test-all on Debian GNU/Linux on + IA64. + +Fri Dec 14 16:10:50 2007 Yukihiro Matsumoto + + * io.c (rb_f_p): RDoc update. a patch from murphy . + [ruby-core:14010] + +Fri Dec 14 16:06:18 2007 Yukihiro Matsumoto + + * string.c (rb_str_cmp): encoding aware comparison. + + * string.c (rb_str_casecmp): ditto. + +Fri Dec 14 15:25:30 2007 Martin Duerst + + * transcode.c (encoding_equal): new function. + + * transcode.c (str_transcode, transcode_dispatch): added two-step + conversion logic via UTF-8. + + * transcode.c: some minor formatting fixes + + * transcode_data.h, transcode_data_iso_8859.c: Shortened + extremely frequently used macros to shorten file length. + + * test/ruby/test_transcode.rb: Fixed name of test class; + added setup method to ensure all necessary encodings exist; + split tests into more test methods; added tests; fixed ordering + of arguments in assert_equal to have expected result first. + +Fri Dec 14 13:47:54 2007 Nobuyoshi Nakada + + * common.mk (ruby.imp): fix for circular dependency. a patch from + Yutaka Kanemoto in [ruby-dev:32590]. + + * regint.h, st.c, ext/json/ext/generator/generator.c: suppress + warnings on AIX. + +Fri Dec 14 12:36:35 2007 Nobuyoshi Nakada + + * configure.in (RUBY_CHECK_VARTYPE): check if a variable is defined + and its type. + + * configure.in (timezone, altzone): check for recent cygwin. + + * missing/strftime.c (strftime): fix for timezone. [ruby-dev:32536] + + * lib/mkmf.rb (try_var): should fail for functions. + + * ext/readline/extconf.rb: should use have_func for functions instead + of have_var. + +Fri Dec 14 10:25:56 2007 Yukihiro Matsumoto + + * lib/e2mmap.rb (Exception2MessageMapper::E2MM.Raise): $! no + longer modifiable in 1.9. + +Fri Dec 14 08:17:24 2007 Tanaka Akira + + * eval.c (rb_protect): restore root_jmpbuf even if proc exits by + break such as dbm.delete_if { break }. + +Fri Dec 14 02:55:41 2007 Yukihiro Matsumoto + + * string.c (str_nth): direct jump if string is 7bit only. great + performance boost for worst case. + + * string.c (str_strlen): direct size if string is 7bit only. + +Fri Dec 14 02:29:32 2007 Yukihiro Matsumoto + + * encoding.c (rb_enc_compatible): 1st argument (typically the + receiver) would have higher priority in encoding detection. + +Fri Dec 14 02:05:42 2007 Yukihiro Matsumoto + + * io.c (rb_io_synchronized): should check if initialized. + [ruby-dev:32585] + +Fri Dec 14 00:54:40 2007 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): embedded string may override encoding + of the regular expression. + + * re.c (rb_reg_initialize): fix encoding of regular expression if + embedded string has its own encoding specified. + +Thu Dec 13 22:16:46 2007 Yukihiro Matsumoto + + * encoding.c (rb_enc_compatible): encoding should never fall back + to ASCII-8BIT unless both encodings are ASCII-8BIT. + +Thu Dec 13 20:31:28 2007 Tanaka Akira + + * string.c (rb_str_shared_replace): make str noembed after free. + +Thu Dec 13 20:09:09 2007 Tanaka Akira + + * eval.c (rb_protect): restore root_jmpbuf to avoid SEGV by + 'IO.pipe; [].each.next' with gcc version 3.3.5 (Debian 1:3.3.5-13) + on IA64. + +Thu Dec 13 17:51:54 2007 Yukihiro Matsumoto + + * string.c (rb_str_split_m): need not to check encoding if regexp + is empty. + + * string.c (rb_str_justify): associate encoding of original to the + result. + + * string.c (rb_str_chomp_bang): need to check encoding of record + separator. + + * string.c (str_gsub): should copy encoding to the result. + + * sprintf.c (rb_str_format): ditto. + + * string.c (rb_str_succ): should not enter infinite loop for + non-ASCII, non-alphanumeric character at the bottom. + +Thu Dec 13 17:03:29 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_compatible): should swap encoding indexes too. + +Thu Dec 13 16:41:37 2007 Yukihiro Matsumoto + + * encoding.c (rb_enc_compatible): should not judge compatibility + based on rb_enc_asciicompat(). + +Thu Dec 13 13:09:03 2007 Yukihiro Matsumoto + + * include/ruby/io.h (MakeOpenFile): fptr->enc should be + initialized to zero. [ruby-dev:32569] + +Thu Dec 13 08:56:01 2007 Yukihiro Matsumoto + + * io.c (rb_io_getc): use default external encoding if fptr->enc is + not set. [ruby-dev:32565] + + * lib/rubygems/package.rb (Gem::TarReader::Entry::rewind): typo fixed. + [ruby-dev:32565] + +Thu Dec 13 08:24:16 2007 Yukihiro Matsumoto + + * io.c (read_all): should associate default external encoding. + + * io.c (io_read): should NOT associate default external encoding. + +Wed Dec 12 23:22:58 2007 Tanaka Akira + + * re.c, regerror.c, string.c, parse.y, ruby.c, file.c: + use capital letter for \xHH notation. [ruby-dev:32511] + +Wed Dec 12 22:21:34 2007 Yukihiro Matsumoto + + * io.c (rb_io_mode_enc): allow specifying external encoding in + open mode, e.g. open(path, "r:utf-8"). + +Wed Dec 12 21:26:03 2007 Yukihiro Matsumoto + + * eval_method.ci (rb_alias): no need to skip aliasing when new + equals to old. [ruby-core:13990] + +Wed Dec 12 16:34:53 2007 Yukihiro Matsumoto + + * io.c (rb_io_check_readable): set default external encoding to + STDIN. + + * io.c (io_enc_str): associate encoding to output string. + +Wed Dec 12 12:44:39 2007 Yukihiro Matsumoto + + * parse.y (expr): 'not' and '!' should act as conditional + expression. [ruby-dev:32548] + +Wed Dec 12 12:11:42 2007 Nobuyoshi Nakada + + * re.c (rb_reg_regsub): should copy encoding. + + * string.c (rb_str_sub_bang, str_gsub): should check and copy encoding + to be replaced. + +Tue Dec 11 23:04:17 2007 Yukihiro Matsumoto + + * pack.c (pack_pack): RDoc update. a patch from Gary Wright + . [ruby-core:13998] + + * pack.c (pack_unpack): ditto. + +Tue Dec 11 16:37:47 2007 Tanaka Akira + + * encoding.c (rb_enc_ascget): renamed from rb_enc_get_ascii. + + * include/ruby/encoding.h: follow the renaming. + + * re.c: ditto. + +Tue Dec 11 16:19:26 2007 Nobuyoshi Nakada + + * Makefile.in, */Makefile.sub (CP, MV): added. + + * common.mk (.y.c): not discard the old target until successfully + created. + +Tue Dec 11 15:20:39 2007 Yukihiro Matsumoto + + * object.c (Init_Object): singleton_method_{added,removed,undefined} + hooks should be defined for BasicObject. [ruby-dev:32531] + + * eval.c (Init_eval): method_missing should be defined for all + objects; moved to BasicObject. + +Tue Dec 11 14:27:50 2007 Nobuyoshi Nakada + + * transcode.c (transcode_loop): get rid of SEGV at sequence can not be + converted. + + * transcode.c (rb_str_transcode_bang): copy encoding. [ruby-dev:32532] + + * test/ruby/test_transcode.rb: added tests from Martin Duerst . [ruby-dev:32532] + +Tue Dec 11 12:05:51 2007 Tanaka Akira + + * encoding.c (rb_enc_get_ascii): add an argument to provide the + length of the returned character. + + * include/ruby/encoding.h (rb_enc_get_ascii): add the argument. + + * re.c (rb_reg_expr_str): modify rb_enc_get_ascii call. + (rb_reg_quote): ditto. + (rb_reg_regsub): ditto. + +Tue Dec 11 09:40:21 2007 Tanaka Akira + + * include/ruby/oniguruma.h (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE): + parenthesize an argument. + +Tue Dec 11 02:23:32 2007 Yukihiro Matsumoto + + * eval.c (rb_method_missing): RDoc update patch from Hugh Sasse + . [ruby-core:12932] + +Tue Dec 11 01:51:34 2007 Yukihiro Matsumoto + + * lib/net/http.rb (Net::HTTP::get): now supports gzip + content-encoding. a patch from Hugh Sasse . + [ruby-core:13451] + +Tue Dec 11 01:21:21 2007 Yukihiro Matsumoto + + * parse.y (shadowing_lvar_gen): no duplicate error for "_". + +Mon Dec 10 22:08:47 2007 Akinori MUSHA + + * array.c (rb_ary_slice_bang): If an invalid range is given, do + not raise an exception but return nil just like slice() does. + +Mon Dec 10 21:47:53 2007 Nobuyoshi Nakada + + * transcode.c (str_transcode): allow non-registered encodings. + [ruby-dev:32520] + +Mon Dec 10 21:00:30 2007 Yukihiro Matsumoto + + * array.c (rb_ary_slice_bang): should return nil if position out + of range. a patch from Akinori MUSHA . + [ruby-dev:32518] + +Mon Dec 10 19:02:52 2007 Yukihiro Matsumoto + + * re.c (rb_reg_match): should calculate offset by converted + operand. [ruby-cvs:21416] + +Mon Dec 10 18:28:06 2007 Yukihiro Matsumoto + + * lib/uri/common.rb (URI::REGEXP::PATTERN): typo in REG_NAME + regular expression. a patch from Ueda Satoshi + . [ruby-dev:32514] + +Mon Dec 10 17:46:04 2007 Nobuyoshi Nakada + + * string.c (rb_str_tmp_new): creates hidden temporary buffer. + + * transcode.c (transcoding): added a pointer to function to flush. + + * transcode.c (transcode_loop): do not use string internal. + [ruby-dev:32512] + + * transcode.c (str_transcode): allow Encoding objects. + + * transcode_data.h (BYTE_LOOKUP): use actual struct name. + +Mon Dec 10 16:52:17 2007 Nobuyoshi Nakada + + * string.c (rb_str_insert): should not add length in bytes to index in + chars. + +Mon Dec 10 14:33:50 2007 Yukihiro Matsumoto + + * eval.c (rb_f_public_send): rename invoke_method to public_send. + it now invokes public method only no matter how it's called. + +Mon Dec 10 14:00:43 2007 Yukihiro Matsumoto + + * transcode.c: new file to provide encoding conversion features. + code contributed by Martin Duerst. + +Mon Dec 10 13:50:33 2007 Nobuyoshi Nakada + + * re.c (rb_reg_search): return byte offset. [ruby-dev:32452] + + * re.c (rb_reg_match, rb_reg_match2, rb_reg_match_m): convert byte + offset to char index. + + * string.c (rb_str_index): return byte offset. [ruby-dev:32472] + + * string.c (rb_str_split_m): calculate in byte offset. + +Mon Dec 10 09:56:29 2007 Koichi Sasada + + * benchmark/bm_vm1_neq.rb, bm_vm1_not.rb: added. + +Mon Dec 10 07:48:14 2007 Yukihiro Matsumoto + + * parse.y (parser_yylex): wrong token was generated. [ruby-dev:32498] + + * object.c (rb_obj_not_match): wrong test. + +Mon Dec 10 06:44:47 2007 Tanaka Akira + + * re.c (rb_reg_expr_str): use \xHH instead of \OOO. + + * regerror.c (to_ascii): ditto. + (onig_snprintf_with_pattern): ditto. + (onig_snprintf_with_pattern): ditto. + + * string.c (rb_str_inspect): ditto. + (rb_str_dump): ditto. + + * parse.y (parser_yylex): ditto. + + * ruby.c (proc_options): ditto. + + * file.c (rb_f_test): ditto. + + [ruby-dev:32495] + +Mon Dec 10 06:41:00 2007 Tanaka Akira + + * re.c (rb_reg_names): new method Regexp#names. + (rb_reg_named_captures): new method Regexp#named_captures + (match_regexp): new method MatchData#regexp. + (match_names): new method MatchData#names. + + * lib/pp.rb (MatchData#pretty_print): show names of named captures. + + [ruby-dev:32493] + +Mon Dec 10 01:35:06 2007 Yukihiro Matsumoto + + * parse.y (expr): redefinable not (!) operator. + + * parse.y (arg): ditto. + + * object.c (rb_obj_not): new method "!". + + * object.c (rb_obj_not_equal): new method "!=". + + * object.c (rb_obj_not_match): new method "!~". + +Sun Dec 9 22:31:36 2007 Tanaka Akira + + * re.c (rb_reg_s_last_match): accept named capture's name. + +Sun Dec 9 15:57:53 2007 Tanaka Akira + + * re.c (match_backref_number): new function for converting a backref + name/number to an integer. + (match_offset): use match_backref_number. + (match_begin): ditto. + (match_end): ditto. + (name_to_backref_number): raise IndexError instead of RuntimeError. + (match_inspect): show capture index. + +Sun Dec 9 14:59:15 2007 Koichi Sasada + + * eval_intern.h (CHECK_STACK_OVERFLOW): reserve frame size. + [ruby-dev:32485] + +Sun Dec 9 14:38:25 2007 Koichi Sasada + + * vm.c (rb_thread_mark): use rb_gc_mark_maybe() for + VM stack specified by mark_stack_len. [ruby-dev:32462] + + * insnhelper.ci: clear vm stack extended by opt value. + +Sun Dec 9 14:08:47 2007 Tanaka Akira + + * include/ruby/ruby.h (FilePathStringValue): defined. similar to + FilePathValue but no taint check. + + * file.c (rb_get_path_no_checksafe): implementation of + FilePathStringValue. + (rb_file_s_basename): use FilePathStringValue. + (rb_file_s_dirname): ditto. + (rb_file_s_extname): ditto. + (rb_file_s_split): ditto. + (rb_file_join): ditto. + + * dir.c (file_s_fnmatch): ditto. + +Sun Dec 9 12:49:34 2007 Tanaka Akira + + * re.c (append_utf8): check unicode range. + +Sun Dec 9 12:39:01 2007 Nobuyoshi Nakada + + * lib/cgi.rb (read_multipart): exclude blanks from header values. + [ruby-list:44327] + +Sun Dec 9 12:18:19 2007 Nobuyoshi Nakada + + * file.c (rb_get_path): use the original object if to_path method is + not defined. [ruby-dev:32473] + + * io.c (rb_f_open): call to_open on non-string objects, instead of + to_str. [ruby-dev:32473] + +Sun Dec 9 12:12:23 2007 Nobuyoshi Nakada + + * string.c (tr_find): returns true if no characters to be removed is + specified. + +Sun Dec 9 12:03:16 2007 Nobuyoshi Nakada + + * parse.y (parser_magic_comment): delimits with a semicolon. + +Sun Dec 9 11:29:23 2007 Nobuyoshi Nakada + + * string.c (tr_trans): get rid of segfaults when has multibytes but + source sets have no multibytes. + +Sun Dec 9 04:01:28 2007 Tanaka Akira + + * encoding.c (rb_enc_mbclen): return 1 if underlying implementation + returns a length longer than e-p. + (rb_enc_precise_mbclen): return needmore if underlying + implementation returns a length longer than e-p. + +Sat Dec 8 17:59:40 2007 Tanaka Akira + + * signal.c (posix_signal): return value. + +Sat Dec 8 17:22:16 2007 GOTOU Yuuzou + + * test/openssl/test_pkcs7.rb: Remove redundant module namespace. + +Sat Dec 8 17:07:10 2007 Tanaka Akira + + * ruby.c (proc_options): make rb_raise format as a string literal to + avoid warning. + +Sat Dec 8 16:18:16 2007 Tanaka Akira + + * re.c (rb_reg_check_preprocess): new function for validating regexp + fragment. + + * parse.y (regexp): invoke reg_fragment_check. + (reg_fragment_check): defined. + (reg_fragment_check_gen): defined. + +Sat Dec 8 11:06:29 2007 Tanaka Akira + + * encoding.c (rb_enc_mbclen): make it never fail. + (rb_enc_nth): don't check the return value of rb_enc_mbclen. + (rb_enc_strlen): ditto. + (rb_enc_precise_mbclen): return needmore(1) if e <= p. + (rb_enc_get_ascii): new function for extracting ASCII character. + + * include/ruby/encoding.h (rb_enc_get_ascii): declared. + + * include/ruby/regex.h (ismbchar): removed. + + * re.c (rb_reg_expr_str): use rb_enc_get_ascii. + (unescape_escaped_nonascii): use rb_enc_precise_mbclen to determine + the termination of escaped non-ASCII character. + (unescape_nonascii): use rb_enc_precise_mbclen. + (rb_reg_quote): use rb_enc_get_ascii. + (rb_reg_regsub): use rb_enc_get_ascii. + + * string.c (rb_str_reverse) don't check the return value of + rb_enc_mbclen. + (rb_str_split_m): don't call rb_enc_mbclen with e <= p. + + * parse.y (is_identchar): use ISASCII. + (parser_ismbchar): removed. + (parser_precise_mbclen): new macro. + (parser_isascii): new macro. + (parser_tokadd_mbchar): use parser_precise_mbclen to check invalid + character precisely. + (parser_tokadd_string): use parser_isascii. + (parser_yylex): ditto. + (is_special_global_name): don't call is_identchar with e <= p. + (rb_enc_symname_p): ditto. + + [ruby-dev:32455] + + * ext/tk/sample/tkextlib/vu/canvSticker2.rb: remove coding cookie + because the encoding is not UTF-8. [ruby-dev:32475] + +Fri Dec 7 20:21:35 2007 GOTOU Yuuzou + + * ext/openssl/lib/net/ftptls.rb, ext/openssl/lib/net/telnets.rb: + half-finished libraries are discontinued. + +Fri Dec 7 15:44:40 2007 Tanaka Akira + + * lib/pp.rb: use Hash for recursion check as inspect. + +Fri Dec 7 15:04:01 2007 Nobuyoshi Nakada + + * array.c (flatten): some performance improvements, based on a patch + from Yusuke ENDOH in [ruby-core:13877]. + [ruby-core:13851] + + * thread.c (rb_exec_recursive): use Hash instead of Array for + performance improvement. [ruby-core:13898] + + * thread.c (recursive_pop): use object ID. + +Thu Dec 6 19:52:50 2007 Yukihiro Matsumoto + + * parse.y (arg): typo fixed ("!" -> "|") in the ripper code. + +Thu Dec 6 19:48:41 2007 Yukihiro Matsumoto + + * parse.y (arg): tUPLUS no longer works as identity operation any + more. inspired by [ruby-talk:265532]. + +Thu Dec 6 18:22:11 2007 Tanaka Akira + + * encoding.c (rb_enc_precise_mbclen): new function for mbclen with + validation. + + * include/ruby/encoding.h (rb_enc_precise_mbclen): declared. + (MBCLEN_CHARFOUND): new macro. + (MBCLEN_INVALID): new macro. + (MBCLEN_NEEDMORE): new macro. + + * include/ruby/oniguruma.h (OnigEncodingTypeST): replace mbc_enc_len + by precise_mbc_enc_len. + (ONIGENC_PRECISE_MBC_ENC_LEN): new macro. + (ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND): new macro. + (ONIGENC_CONSTRUCT_MBCLEN_INVALID): new macro. + (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE): new macro. + (ONIGENC_MBCLEN_CHARFOUND): new macro. + (ONIGENC_MBCLEN_INVALID): new macro. + (ONIGENC_MBCLEN_NEEDMORE): new macro. + (ONIGENC_MBC_ENC_LEN): use ONIGENC_PRECISE_MBC_ENC_LEN. + + * enc/euc_jp.c: validation implemented. + + * enc/sjis.c: ditto. + + * enc/utf8.c: ditto. + + * string.c (rb_str_inspect): use rb_enc_precise_mbclen for invalid + encoding. + (rb_str_valid_encoding_p): new method String#valid_encoding?. + + * io.c (rb_io_getc): use rb_enc_precise_mbclen. + + [ruby-dev:32438] + +Thu Dec 6 01:37:23 2007 Nobuyoshi Nakada + + * regparse.c (i_apply_case_fold): fix for negative character class. a + patch from Yusuke ENDOH in [ruby-core:13884]. + +Thu Dec 6 01:00:38 2007 NARUSE, Yui + + * ext/iconv/iconv.c (iconv_s_list): support NetBSD/Citrus iconv. + +Wed Dec 5 16:18:50 2007 Nobuyoshi Nakada + + * proc.c (rb_proc_s_new): call initialize. [ruby-core:13824] + + * proc.c (rb_proc_location): return file name and line number where + the proc is defined. + + * thread.c (thread_s_new): call initialize. [ruby-core:13835] + + * thread.c (thread_initialize): split initialize method. + +Wed Dec 5 15:25:55 2007 Nobuyoshi Nakada + + * parse.y (rb_intern3): fix to changing encoding to default, and + uncommented r13835, which is rare but not impossible. + +Wed Dec 5 15:15:21 2007 Nobuyoshi Nakada + + * range.c (step_i, range_step): support non-fixnum steps. + [ruby-talk:282100] + +Wed Dec 5 14:25:11 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix typo. + +Wed Dec 5 13:41:25 2007 Nobuyoshi Nakada + + * parse.y (yycompile): get rid of tracing while parsing. + [ruby-dev:31351] + + * thread.c (ruby_suppress_tracing): added a new parameter, which + directs to call func always. + +Tue Dec 4 19:56:42 2007 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_convert): should not set encoding unless + the target encoding is supported. [ruby-dev:32451] + +Tue Dec 4 17:34:17 2007 NARUSE, Yui + + * ext/nkf/lib/kconv.rb (tojis, tosjis, toeuc, toutf8): + set encoding. [ruby-dev:32447] + +Tue Dec 4 17:07:25 2007 NARUSE, Yui + + * lib/json.rb, lib/json/*: moved to ext/json/lib. + +Tue Dec 4 16:34:46 2007 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_create): achieve target encoding. + + * ext/iconv/iconv.c (iconv_convert, iconv_finish, iconv_iconv, + iconv_conv): set result string encoding. [ruby-dev:32446] + + * ext/iconv/iconv.c (iconv_initialize, iconv_s_open): set encoding to + Iconv instance. + +Tue Dec 4 14:34:35 2007 Nobuyoshi Nakada + + * ruby.c (process_options): reverted c flag. + +Tue Dec 4 11:23:50 2007 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): trailing spaces may exist at squeezing + preceding 0s. [ruby-core:13873] + +Mon Dec 3 11:51:53 2007 NAKAMURA Usaku + + * ext/Win32API/*: removed or moved to ext/dl/win32. + + * ext/dl/win32/*: new. [ruby-dev:32387] + +Sun Dec 2 22:08:01 2007 Nobuyoshi Nakada + + * parse.y (parser_tokadd_mbchar): fix for ASCII chars. [ruby-dev:32432] + + * parse.y (parser_parse_string, parser_here_document): prevent false + error messages. + +Sun Dec 2 20:43:22 2007 Tanaka Akira + + * re.c (unescape_escaped_nonascii): fix mbclen argument. + +Sun Dec 2 15:47:57 2007 Nobuyoshi Nakada + + * parse.y (parser_tokadd_mbchar): check insufficient multibyte char. + [ruby-dev:32429] + +Sun Dec 2 15:42:16 2007 Kouhei Sutou + + * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.1 -> 0.2.2. + + * lib/rss/maker/itunes.rb: fixed new_itunes_category. + * lib/rss/maker/taxonomy.rb: new_taxo_topic -> new_topic because + of consistency. + + * test/rss/test_maker_itunes.rb, test/rss/test_itunes.rb: removed + needless UTF-8 characters. + +Sun Dec 2 15:18:37 2007 Koichi Sasada + + * insnhelper.ci (vm_callee_setup_arg): fix error message. + [ruby-dev:32430] + +Sun Dec 2 09:12:48 2007 Tanaka Akira + + * parse.y (regexp): fix /#{}\xa1\xa2/e to be EUC-JP. + (reg_fragment_setenc_gen): extracted from reg_compile_gen. + +Sun Dec 2 01:39:51 2007 Tanaka Akira + + * include/ruby/intern.h (rb_uv_to_utf8): declared. + + * re.c (rb_reg_preprocess): new function for dynamic regexp with + \u{} such as Regexp.new("\\u{6666}"). + (rb_reg_prepare_re): preprocess regexp for recompiling. + (read_escaped_byte): new function. + (unescape_escaped_nonascii): new function. + (append_utf8): new function. + (unescape_unicode_list): new function. + (unescape_unicode_bmp): new function. + (unescape_nonascii): new function. + (rb_reg_initialize): preprocess regexp. + + * pack.c (rb_uv_to_utf8): renamed from uv_to_utf8. + + * parse.y (STR_NEW3): take func instead of has8 and hasmb. + (parser_str_new): use default coderange mechanism except for regexp. + (parser_tokadd_utf8): copy regexp source as-is. + (parser_read_escape): UTF-8 stuff removed. + (parser_tokadd_escape): has8bit and hasmb removed. + (parser_tokadd_string): fix 8-bit single byte character with \u. + (parser_parse_string): has8bit and hasmb removed. + (parser_here_document): has8bit and hasmb removed. + (parser_yylex): call parser_tokadd_utf8 instead of read_escape for + UTF-8 character. + +Wed Dec 2 01:00:07 2007 James Edward Gray II + + * lib/xmlrpc/server.rb (XMLRPC::Server#server): Improve signal handling so + pressing control-c in the controlling terminal or sending SIGTERM stops + the XML-RPC server. + +Sat Dec 1 23:04:42 2007 Yukihiro Matsumoto + + * encoding.c: rename primary_encoding -> default_external (encoding). + +Sat Dec 1 19:52:57 2007 Tadayoshi Funaba + + * lib/date.rb (Time#to_datetime): use nsec instead of usec. + + * lib/date.rb (DateTime#to_time): second minute as an argument to + Time::utc contains fractional part in rational; hence Time + object may keep resolution at most nanosecond. + +Sat Dec 1 14:36:05 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: move fixed bugs. + + * test/ruby/test_sprintf.rb: ditto. + + * test/yaml/test_yaml.rb: ditto. + +Sat Dec 1 13:24:47 2007 Koichi Sasada + + * insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on third + parameter of IFUNC. [ruby-dev:32329] + + * enumerator.c: fix to pass exact number of argument. + + * eval.c (rb_yield_values2): added. + + * include/ruby/ruby.h: ditto. + + * bootstraptest/test_knownbug.rb: move a fixed test. + + * bootstraptest/test_block.rb: ditto. + +Sat Dec 1 10:45:56 2007 Yukihiro Matsumoto + + * io.c (rb_f_open): use to_open for every non-string object. path + object may use method_missing. + +Sat Dec 1 09:44:32 2007 Yukihiro Matsumoto + + * insns.def (concatarray, splatarray): use to_a instead of + to_splat. + + * insnhelper.ci (caller_setup_args): ditto. + +Sat Dec 1 03:34:32 2007 Nobuyoshi Nakada + + * parse.y (newline_node): always remove NODE_BEGIN. + +Fri Nov 30 23:48:07 2007 Yukihiro Matsumoto + + * signal.c (ruby_signal): use SA_SIGINFO if available. + [ ruby-Patches-6418 ] + +Fri Nov 30 22:52:54 2007 Yukihiro Matsumoto + + * signal.c (trap_signm): SIGVTALRM no longer used for green + thread. [ruby-talk:281318] + + * signal.c (ruby_sig_finalize): do not install SIG_DFL handler if + previous handler is sighandler(). + +Fri Nov 30 21:02:15 2007 NARUSE, Yui + + * lib/json.rb, lib/json/add/{core.rb, rails.rb}, + test/json/test_json_rails.rb: additional files of JSON 1.1.2. + [ruby-dev:32405] + +Fri Nov 30 19:33:38 2007 Yukihiro Matsumoto + + * ext/syck/rubyext.c (rb_syck_mktime): avoid segmentation fault. + [ruby-core:13735] + +Fri Nov 30 19:05:55 2007 Yukihiro Matsumoto + + * enum.c (enum_count): precise argument number check. + + * enum.c (enum_count): return Enumerator if no block given. + +Fri Nov 30 16:42:50 2007 Yukihiro Matsumoto + + * enum.c (enum_take_while): returns Enumerator if no block given. + + * enum.c (enum_drop_while): ditto. + +Thu Nov 29 16:59:10 2007 Nobuyoshi Nakada + + * parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814] + +Thu Nov 29 06:45:48 2007 Yukihiro Matsumoto + + * hash.c (rb_hash_eql): recursive comparison should be based on + eql? [ruby-core:13803] + +Wed Nov 28 18:08:00 2007 NARUSE, Yui + + * ext/json, lib/json, test/json: Update to JSON 1.1.2. + (RubyForge#15447) + + * math.c: fix typo. + +Wed Nov 28 16:29:35 2007 Koichi Sasada + + * insnhelper.ci (vm_invoke_block): should splat args. + [ruby-dev:32392] + + * test/ruby/test_yield.rb: add tests for above. + +Wed Nov 28 14:43:14 2007 Nobuyoshi Nakada + + * ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to + get rid of mixing $LDFLAGS and $ARCH_FLAG. + + * lib/mkmf.rb (configuration): ditto. + + * lib/mkmf.rb (create_makefile): support for extensions which has no + shared object. + +Wed Nov 28 02:42:10 2007 Nobuyoshi Nakada + + * bignum.c (big2str_find_n1): removed extraneous element. + [ruby-dev:32351], [ruby-dev:32365] + + * bignum.c (big2str_find_n1): returns necessary digits now. + + * sprintf.c (remove_sign_bits): extends sign bit first. + +Tue Nov 27 15:53:43 2007 Koichi Sasada + + * compile.c (iseq_compile_each): "when *[],1" dumps core. + a patch from Yusuke ENDOH . [ruby-dev:32350] + + * bootstraptest/test_syntax.rb: add a test for above. + +Tue Nov 27 15:40:05 2007 Koichi Sasada + + * compile.c (iseq_compile_each): "a[*b] += 1" dumps core. + a patch from Yusuke ENDOH . [ruby-dev:32354] + + * bootstraptest/test_syntax.rb: add a test for above. + +Tue Nov 27 12:47:23 2007 Koichi Sasada + + * compile.c, insns.def: change return value of "defined?" + for $&, $1, ... . If such variables are defined, + return "global-variable". + + * test/ruby/test_defined.rb: add tests. + + * bootstraptest/test_syntax.rb: fix a test. + +Tue Nov 27 11:54:46 2007 Koichi Sasada + + * insns.def: fix typo. + +Tue Nov 27 11:23:20 2007 Koichi Sasada + + * test_beginendblock.rb: add loop to wait signal. + [ruby-dev:32332] + +Tue Nov 27 11:14:57 2007 Tanaka Akira + + * include/ruby/encoding.h, encoding.c, re.c, string.c, parse.y: + rename ENC_CODERANGE_SINGLE to ENC_CODERANGE_7BIT. + rename ENC_CODERANGE_MULTI to ENC_CODERANGE_8BIT. + Because single byte 8bit character, such as Shift_JIS 1byte katakana, + is represented by ENC_CODERANGE_MULTI even if it is not multi byte. + +Tue Nov 27 10:45:45 2007 Koichi Sasada + + * eval.c (rb_method_missing): fix stack trace. + + * bootstraptest/test_knownbug.rb: move solved tests. + + * bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto. + +Tue Nov 27 09:57:42 2007 Koichi Sasada + + * insns.def, compile.c: fix to allow dsym for alias/undef. + [ruby-dev:32355] + + * bootstraptest/test_method.rb: add tests for above. + +Mon Nov 26 23:18:46 2007 Masatoshi SEKI + + * lib/drb/extserv.rb (initialize, stop_service): synchronize with + ExtServManager. + + * test/drb/test_drb.rb (TestDRbEval): ignored. + +Mon Nov 26 17:32:16 2007 Tanaka Akira + + * re.c (Init_Regexp): new method Regexp#fixed_encoding? + [ruby-dev:32361] + +Mon Nov 26 13:28:14 2007 Keiju Ishitsuka + + * lib/complex.rb: be able to create Complex(0, -0.0). [ruby-list:44268] + +Mon Nov 26 11:24:04 2007 Tanaka Akira + + * re.c (rb_reg_fixed_encoding_p): extracted from rb_reg_prepare_re and + rb_reg_s_union. + (rb_reg_s_union): refactored. + +Mon Nov 26 10:44:20 2007 Nobuyoshi Nakada + + * io.c (rb_read_internal, rb_sysopen_internal): remove C99 dependency. + +Sun Nov 25 22:21:35 2007 Tanaka Akira + + * include/ruby/encoding.h (rb_enc_str_asciionly_p): declared. + (rb_enc_str_asciicompat_p): defined. + + * re.c (rb_reg_initialize_str): use rb_enc_str_asciionly_p. + (rb_reg_quote): return ascii-8bit string if the argument is + ascii-only to generate encoding generic regexp if possible. + (rb_reg_s_union): fix encoding handling. [ruby-dev:32094] + + * string.c (rb_enc_str_asciionly_p): defined. + +Sun Nov 25 12:12:03 2007 Eric Hodel + + * gem_prelude.rb: Import fast-loading gem_prelude.rb from RubyGems. + + * lib/rubygems*: Import RubyGems r1516. + +Sat Nov 24 23:25:52 2007 Yukihiro Matsumoto + + * test/ruby/test_eval.rb (TestEval::test_instance_eval_cvar): + updated not to modify class variable of Object class. + +Fri Nov 23 17:34:24 2007 Koichi Sasada + + * io.c: add rb_read_internal() as blocking function. + +Fri Nov 23 17:33:39 2007 Koichi Sasada + + * vm.c: fix comment. + +Fri Nov 23 17:26:11 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: move solved tests. + + * bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb: + ditto. + + * test/ruby/test_integer.rb, test_regexp.rb: ditto. + +Fri Nov 23 15:59:04 2007 Tanaka Akira + + * struct.c (rb_struct_alloc_noinit): new function. + (rb_struct_define_without_accessor): add allocator to the arguments. + + * range.c (range_alloc): re-introduced using rb_struct_alloc_noinit. + +Fri Nov 23 15:27:43 2007 Tanaka Akira + + * re.c (REG_CASESTATE): unused macro removed. + (rb_reg_prepare_re): check encoding difference. + (rb_reg_initialize): check 8bit byte. + + * parse.y (parser_tokadd_escape): fix has8bit. + + [ruby-dev:32113] + +Fri Nov 23 15:16:48 2007 Yukihiro Matsumoto + + * variable.c (rb_f_global_variables): variable names should not + duplicate. [ruby-dev:32344] + +Fri Nov 23 13:34:08 2007 Tanaka Akira + + * struct.c (rb_struct_define_without_accessor): new function. + + * range.c (range_alloc): removed. + (Init_Range): use rb_struct_define_without_accessor. + + based on [ruby-dev:32327]. + +Fri Nov 23 11:01:54 2007 Yukihiro Matsumoto + + * re.c (match_begin): should return offset by character. + [ruby-dev:32331] + + * re.c (match_end): ditto. + + * re.c (rb_reg_search): ditto. + +Fri Nov 23 10:44:24 2007 Yukihiro Matsumoto + + * compile.c (defined_expr): defined(method(x)) dumped core. a + patch from Yusuke ENDOH . [ruby-dev:32335] + +Wed Nov 21 18:03:49 2007 Koichi Sasada + + * vm.c: fix to recycle thread data (VM stack). + + * thread.c: ditto. + + * benchmark/bm_vm3_thread_create_join.rb: add loop count. + +Wed Nov 21 18:02:10 2007 Koichi Sasada + + * benchmark/driver.rb: add path to trunk/lib if driver runner is + in build directory. + +Wed Nov 21 16:39:21 2007 Tanaka Akira + + * test/fileutils/fileasserts.rb (assert_equal_timestamp): new assert + to test tv_sec only for filestamp resolution portability. + (assert_same_entry): use assert_same_entry for mtime comparison. + +Wed Nov 21 14:55:13 2007 Koichi Sasada + + * array.c (rb_ary_permutation): add gc guard codes. + +Wed Nov 21 11:16:37 2007 Yukihiro Matsumoto + + * insnhelper.ci (vm_search_normal_superclass): rename function. + + * insnhelper.ci (vm_search_superclass): ditto. + + * proc.c (struct METHOD): rename rklass -> rclass. + +Wed Nov 21 03:12:50 2007 Yukihiro Matsumoto + + * process.c (rb_f_system): returns nil on execution failure. + [ruby-core:13715] + +Wed Nov 21 01:04:12 2007 Yukihiro Matsumoto + + * object.c (nil_plus): remove unused function. [ruby-core:13737] + +Tue Nov 20 21:46:46 2007 Tanaka Akira + + * time.c (time_mload): ignore invalid digits in submicro. + +Tue Nov 20 20:33:32 2007 Koichi Sasada + + * include/ruby/ruby.h: rename RFloat#double_value -> float_value. + + * numeric.c, parse.y: ditto. + +Tue Nov 20 19:36:21 2007 Koichi Sasada + + * gc.h, vm_core.h: decl of rb_gc_save_machine_context() + should be at vm_core.h. + + * include/ruby/ruby.h, intern.h: remove type rb_thread_t. + + * include/ruby/intern.h: change rb_unblock_function_t, + rb_unblock_function_t. + + * file.c, process.c: apply above changes. + + * thread.c, thread_pthread.ci, thread_win32.ci: ditto. + + * io.c: support blocking open (2). [ruby-core:13614] + +Tue Nov 20 17:10:11 2007 Tanaka Akira + + * io.c (rb_io_close_on_exec_p): new method IO#close_on_exec?. + (rb_io_set_close_on_exec): new method IO#close_on_exec=. + [ruby-dev:32323] + +Tue Nov 20 16:24:31 2007 Tanaka Akira + + * gc.c (gc_mark_children): obj->as.file.fptr may be 0 for T_FILE. + +Tue Nov 20 15:09:00 2007 Nobuyoshi Nakada + + * parse.y (parser_read_escape): has8bit flag may be set with control + escape. [ruby-core:13722] + + * parse.y (parser_prepare): set begging after BOM if exists. + [ruby-core:13718] + +Tue Nov 20 14:55:37 2007 Eric Hodel + + * lib/rubygems*: Update to RubyGems 0.9.5. + +Tue Nov 20 13:00:44 2007 NAKAMURA Usaku + + * include/ruby/win32.h win32/win32.c (rb_w32_pipe_exec): use dual fd + instead of socketpair when mode is RDWR. + + * io.c (pipe_open): pass &write_fd to rb_w32_pipe_exec(). + + * io.c (popen_redirect): define only when HAVE_FORK. + +Tue Nov 20 12:12:04 2007 Tanaka Akira + + * include/ruby/io.h (rb_io_t): add tied_io_for_writing member. + + * io.c: use tied_io_for_writing for duplex popen. + + * gc.c: mark tied_io_for_writing. + + * common.mk: gc.o depends io.h. + + [ruby-dev:32205] + +Tue Nov 20 11:59:33 2007 Tanaka Akira + + * test/drb/test_drb.rb: rename TestRubyYield to TestDRbRubyYield to + avoid name crash with test/ruby/test_yield.rb. + TestRuby18Yield is renamed to TestDRbRuby18Yield too. + +Tue Nov 20 03:24:42 2007 Masatoshi SEKI + + * lib/drb/extservm.rb: merged from ruby_1_8 branch. + + * lib/drb/acl.rb: ditto. + + * lib/drb/ssl.rb: ditto. + + * lib/drb/unix.rb: ditto. + + * lib/drb/drb.rb: ditto. + + * lib/drb/observer.rb: ditto. + + * lib/drb/invokemethod.rb: ditto. + + * test/drb/test_drbssl.rb: ditto. + + * test/drb/test_drb.rb: ditto. + + * test/drb/drbtest.rb: ditto. + + * test/drb/test_drbunix.rb: ditto. + +Tue Nov 20 00:52:46 2007 Tanaka Akira + + * test/fileutils/fileasserts.rb (assert_equal_time): show nsec if + assertion fails but time.to_s equals. + (assert_same_entry): use assert_equal_time. + + * test/fileutils/test_fileutils.rb (test_install): use + assert_equal_time. + +Mon Nov 19 18:46:49 2007 Tanaka Akira + + * file.c (utime_internal): fallback utimensat to utimes. + +Mon Nov 19 17:51:27 2007 Tanaka Akira + + * configure.in: check struct timespec, clock_gettime, utimensat, + struct stat.st_atim, + struct stat.st_atimespec, + struct stat.st_atimensec, + struct stat.st_mtim, + struct stat.st_mtimespec, + struct stat.st_mtimensec, + struct stat.st_ctim, + struct stat.st_ctimespec, + struct stat.st_ctimensec. + + * include/ruby/missing.h: provide struct timespec if not available. + + * time.c: support nanosecond-resolution using struct timespec. + (time_nsec): new method: Time#nsec and Time#tv_nsec. + + * include/ruby/intern.h: provide rb_time_nano_new. + + * file.c (utime_internal): use utimensat if available. + (rb_file_s_utime): refactored. + (rb_f_test): use stat_atime, stat_mtime, stat_ctime. + (rb_stat_cmp): check tv_nsec. + (stat_atimespec): new function. + (stat_atime): ditto. + (stat_mtimespec): ditto. + (stat_mtime): ditto. + (stat_ctimespec): ditto. + (stat_ctime): ditto. + (rb_stat_atime): use stat_atime. + (rb_file_s_atime): ditto. + (rb_file_atime): ditto. + (rb_stat_mtime): use stat_mtime. + (rb_file_s_mtime): ditto. + (rb_file_mtime): ditto. + (rb_file_ctime): use stat_ctime. + (rb_file_s_ctime): ditto. + (rb_stat_ctime): ditto. + + * variable.c (rb_copy_generic_ivar): clear clone's instance variables + if obj has no instance variable. + + * marshal.c (w_object): dump instance variables of generated string + for TYPE_USERDEF, even if original object has instance variables. + + * lib/time.rb (Time#xmlschema): use nsec instead of usec. + + [ruby-dev:32306] + +Mon Nov 19 17:48:30 2007 Yukihiro Matsumoto + + * object.c (rb_class_superclass): should not raise exception for + BasicObject. [ruby-Bugs-15668] + +Mon Nov 19 16:04:08 2007 Yukihiro Matsumoto + + * array.c (rb_ary_permutation): gives all permutations of elements + if no argument given. a patch from Yusuke ENDOH . + [ruby-dev:32309] + +Mon Nov 19 02:44:07 2007 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): alias and undef accept dsyms as well + as literals. [ruby-dev:32308] + +Mon Nov 19 02:31:36 2007 Nobuyoshi Nakada + + * eval_method.ci (rb_add_method): no redefinition warning for undef. + +Mon Nov 19 01:53:11 2007 Nobuyoshi Nakada + + * parse.y (parser_read_escape): disallow control and meta modifiers + for non-ASCII characters. [ruby-core:13685] + +Sun Nov 18 20:47:41 2007 Tanaka Akira + + * marshal.c (mark_dump_arg): it may be called after dump_ensure. + +Sun Nov 18 18:27:47 2007 Tanaka Akira + + * time.c (time_minus): fix Time.at(2**60+1) - Time.at(2**60). + +Sun Nov 18 17:28:49 2007 Tanaka Akira + + * time.c (time_arg): show actual year in 2-3 digits year warning. + (time_mdump): show actual year in "year too big to marshal" error. + +Sun Nov 18 14:03:44 2007 Nobuyoshi Nakada + + * eval_method.ci (rb_alias): do not call hook functions until + initialization finishes. [ruby-talk:279538] + +Sun Nov 18 09:09:48 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (String#tr_cpp): make preprocessor identifiers. + +Sun Nov 18 05:19:46 2007 Tanaka Akira + + * lib/mkmf.rb (have_struct_member): define HAVE_type_member. + +Sat Nov 17 23:51:29 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_invoke): bug fix. [ruby-talk:279100] + +Sat Nov 17 23:21:15 2007 Yukihiro Matsumoto + + * parse.y (parser_yylex): should clear parser->tokp as well. + [ruby-dev:32250] + + * parse.y: remove NEED_ASSOC that break test_parser_events. + + * parse.y (parser_yylex): should not decrement line numbers at the + end of file. + + * file.c (rb_find_file_ext): search .rb files first through in the + loadpath. + +Fri Nov 16 23:31:18 2007 Yukihiro Matsumoto + + * bignum.c (rb_big_odd_p): new method added. a patch from Tadashi + Saito . [ruby-dev:32305] + + * bignum.c (rb_big_even_p): ditto. + +Fri Nov 16 17:41:34 2007 Nobuyoshi Nakada + + * ext/iconv/iconv.c (Document-class): moved the simplest example to + the top. + + * ext/iconv/iconv.c (iconv_s_iconv): Document-method: needs class + prefix for class method. [ruby-core:13542] + + * ext/iconv/iconv.c (iconv_iconv): also instance method needs to be + qualified. + +Fri Nov 16 16:26:57 2007 Shugo Maeda + + * include/ruby/ruby.h: added some declarations for event hooks. + + * lib/profile.rb: set VM::InstructionSequence.compile_option. + +Fri Nov 16 11:16:41 2007 Nobuyoshi Nakada + + * lib/yaml/rubytypes.rb (String#is_binary_data?): use Integer#fdiv. + +Fri Nov 16 03:36:01 2007 why the lucky stiff + + * ext/syck/rubyext.c: Node#value defined twice. + + * lib/yaml/: several method redefinitions causing warnings. + +Fri Nov 16 03:01:00 2007 why the lucky stiff + + * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit. + +Fri Nov 16 02:51:59 2007 why the lucky stiff + + * lib/yaml.rb (quick_emit): use combination of object_id and hash to + identify repeated object references, since GC will reuse memory of + objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698] + +Thu Nov 15 19:49:03 2007 NAKAMURA Usaku + + * ext/curses/extconf.rb: check macro if cannot find func. + [ruby-list:44224] + +Thu Nov 15 18:04:06 2007 Tanaka Akira + + * tool/compile_prelude.rb: fix TMP_RUBY_PREFIX for relative load path + environment. + +Thu Nov 15 17:28:21 2007 Tanaka Akira + + * tool/compile_prelude.rb: absolute path may not start with a slash. + pointed by usa. + +Thu Nov 15 17:07:54 2007 Tanaka Akira + + * tool/compile_prelude.rb: fix first substitution. + use constant for prefix. + pointed by Richard Kilmer. + +Thu Nov 15 14:29:56 2007 Nobuyoshi Nakada + + * common.mk (prereq): added auto generated sources. [ruby-dev:32280] + +Thu Nov 15 12:31:13 2007 Tanaka Akira + + * tool/compile_prelude.rb: use constant for prefix. + +Thu Nov 15 12:24:39 2007 Tanaka Akira + + * tool/compile_prelude.rb: use simple template system for source + code generation. + +Thu Nov 15 12:19:14 2007 Yukihiro Matsumoto + + * lib/cgi/session.rb (CGI::Session::FileStore::restore): use + lockfile for exclusive locks. a patch from . + [ruby-dev:32296] + +Thu Nov 15 12:14:53 2007 Yukihiro Matsumoto + + * tool/compile_prelude.rb (c_esc): need to escape closing brace. + +Thu Nov 15 11:52:16 2007 Tanaka Akira + + * tool/compile_prelude.rb: adjust RbConfig::CONFIG paths relative + to the installation path. + +Thu Nov 15 11:25:20 2007 Tanaka Akira + + * ruby.c (usage): fix typo on --disable-gems option. + pointed by Richard Kilmer. + +Wed Nov 14 16:16:17 2007 Yukihiro Matsumoto + + * test/net/http/test_https_proxy.rb + (HTTPSProxyTest::test_https_proxy_authentication): initialize + local variable 't' first. [ruby-dev:32253] + +Wed Nov 14 15:39:24 2007 Yukihiro Matsumoto + + * test/socket/test_socket.rb: update not to use 1.8 assignment to + external local variable in the block parameters. [ruby-dev:32251] + + * test/strscan/test_stringscanner.rb: avoid $KCODE, and use + String#force_encoding(). [ruby-dev:32251] + +Wed Nov 14 14:04:42 2007 Tanaka Akira + + * common.mk, Makefile.in: rename prelude.c to miniprelude.c. + rename ext_prelude.c to prelude.c + + * win32/Makefile.sub: ditto. + + * bcc32/Makefile.sub: ditto. + +Wed Nov 14 07:09:48 2007 Koichi Sasada + + * blockinlining.c, compile.c, compile.h, debug.c, debug.h, + id.c, insnhelper.h, insns.def, thread.c, thread_pthread.ci, + thread_pthread.h, thread_win32.ci, thread_win32.h, vm.h, + vm_dump.c, vm_evalbody.ci, vm_opts.h: fix comments and + copyright year. + +Wed Nov 14 07:07:51 2007 Koichi Sasada + + * tool/makedocs.rb, template/insnstbl.html: removed. + +Wed Nov 14 02:50:43 2007 Nobuyoshi Nakada + + * common.mk (parse.c): dependency also needs vpath. + + * common.mk (node_name.inc, prelude.c): VPATH in nmake does not + work for targets of explicit rules. + +Wed Nov 14 02:11:38 2007 Tanaka Akira + + * missing/isinf.c (isinf): don't define if the macro is defined. + + * configure.in: no need to set ac_cv_func_isinf=yes on non-gcc + solaris. + +Wed Nov 14 01:34:42 2007 Nobuyoshi Nakada + + * numeric.c (round): fallback definition. + + * numeric.c (flo_divmod, flo_round): use round() always. + [ruby-dev:32269] + +Wed Nov 14 00:33:49 2007 Koichi Sasada + + * include/ruby/ruby.h: introduce 2 macros: + RFLOAT_VALUE(v), DOUBLE2NUM(dbl). + Rename RFloat#value -> RFloat#double_value. + Do not touch RFloat#double_value directly. + + * bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c, + pack.c, parse.y, process.c, random.c, sprintf.c, string.c, + time.c: apply above changes. + + * ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c: + ditto. + +Wed Nov 14 00:15:37 2007 Nobuyoshi Nakada + + * tool/ytab.sed: get rid of GNU sed feature. a patch from Laurent + Sansonetti in [ruby-core:13470]. + +Tue Nov 13 21:41:39 2007 Nobuyoshi Nakada + + * common.mk (parse.c), ext/ripper/depend (ripper.c): process after + bison with sed. [ruby-dev:32204] + + * ruby.c (proc_options): use yydebug in cmdline_options. + + * ruby.c (process_options): set yydebug flag of parser. + + * parse.y (yydebug): moved into struct parser_params. + + * parse.y (rb_parser_get_yydebug, rb_parser_set_yydebug): parser + generic methods. + + * */Makefile.sub (parse.c): moved to common.mk. + + * tool/ytab.sed: comment out yydebug definition, and substitute + yyerror with parser_yyerror. + +Tue Nov 13 16:33:07 2007 Nobuyoshi Nakada + + * numeric.c (flodivmod): work around for infinity. + + * numeric.c (flo_divmod): work around for platforms have no round(). + [ruby-dev:32247] + +Tue Nov 13 15:26:33 2007 Tanaka Akira + + * lex.c.blt: moved from lex.c. + + * lex.c.src: copied from keywords. This is the source of lex.c.blt. + + * Makefile.in (lex.c): use lex.c.blt if keywords is same as lex.c.src. + + * win32/Makefile.sub (lex.c): re-introduce copy rule. + + * bcc32/Makefile.sub (lex.c): ditto. + + * wince/Makefile.sub (lex.c): ditto. + +Tue Nov 13 15:21:52 2007 Koichi Sasada + + * compile.c (iseq_specialized_instruction): check argc. + +Tue Nov 13 14:44:32 2007 why the lucky stiff + + * test/yaml/test_yaml.rb: fixed the failing YAML Struct test + at ko1's request. + +Tue Nov 13 02:57:04 2007 URABE Shyouhei + + * numeric.c (flo_divmod): round to the nearest integer. + [ ruby-Bugs-14540 ] + +Tue Nov 13 00:36:16 2007 Shugo Maeda + + * test/ruby/test_settracefunc.rb: fixed tests for set_trace_func. + +Mon Nov 12 19:47:29 2007 NAKAMURA Usaku + + * thread.c (call_trace_proc): should return value. + +Mon Nov 12 19:45:18 2007 NAKAMURA Usaku + + * {bcc,win}32/Makefile.sub (miniruby): use $(COMMONOBJS) and $(DMYEXT) + instead of $(LIBRUBY_A). + +Mon Nov 12 18:32:53 2007 Nobuyoshi Nakada + + * {bcc,win}32/Makefile.sub (MINIOBJS): added prelude.$(OBJEXT). + +Mon Nov 12 17:13:23 2007 Tanaka Akira + + * Makefile.in, common.mk: add prelude.o to MINIOBJS. + +Mon Nov 12 16:52:29 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): rdoc about srcprefix. a patch from + Daniel Berger in [ruby-core:13378]. + +Mon Nov 12 16:48:09 2007 Tanaka Akira + + * Makefile.in, common.mk: add ext_prelude.o to OBJS. + +Mon Nov 12 13:57:39 2007 Tanaka Akira + + * configure.in (MINIDLNOBJS): removed. + (MINIOBJS): set to dln.o if dmydln.o is not used. + + * Makefile.in (miniruby): use MINIOBJS instead of MINIDLNOBJS. + +Mon Nov 12 13:53:06 2007 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-parse-partial): handle stringified + symbols properly using ruby-forward-string. + +Mon Nov 12 12:17:59 2007 Tanaka Akira + + * configure.in (MINIDLNOBJS): defined. + + * Makefile.in (miniruby): use MINIDLNOBJS and COMMONOBJS instead of + MINIOBJS and OBJS to avoid linking both dmydln.o and dln.o. + +Sun Nov 11 20:32:45 2007 Tanaka Akira + + * {win32,wince,bcc32}/Makefile.sub: delete lex.c rule. + +Sun Nov 11 19:40:52 2007 Tanaka Akira + + * Makefile.in (lex.c): simplified. + +Sun Nov 11 18:31:48 2007 Tanaka Akira + + * Makefile.in (lex.c): touch lex.c if gperf failed but lex.c exists. + Although this may cause non-updated lex.c, + svn co may generate keywords newer than lex.c especially on + a file system which can record fractional mtime such as XFS. + +Sun Nov 11 17:32:46 2007 Shugo Maeda + + * insnhelper.ci (vm_call_method): pass mn->nd_clss to + vm_call_cfunc() instead of klass. + + * vm.c (rb_thread_method_id_and_klass): traverse parent_iseq. + + * thread.c (call_trace_proc): use rb_thread_method_id_and_klass(). + +Sun Nov 11 16:54:25 2007 Tanaka Akira + + * lex.c: renamed from lex.c.blt. + + * Makefile.in (lex.c): use find command to check mtime. + +Sun Nov 11 05:34:13 2007 Eric Hodel + + * bin/gem: Add forgotten gem command. + +Sat Nov 10 23:50:31 2007 Tanaka Akira + + * string.c (tr_trans): cast to unsigned char after dereference + a pointer to a char to avoid SEGV with "\377".tr("a", "b"). + on FreeBSD/amd64. + +Sat Nov 10 23:08:53 2007 Tanaka Akira + + * configure.in, common.mk, Makefile.in: don't generate + libminiruby-static.a. + +Sat Nov 10 19:46:54 2007 Tanaka Akira + + * configure.in, common.mk, Makefile.in: generate libminiruby-static.a + which contains prelude.o for miniruby. + +Sat Nov 10 18:10:07 2007 Tanaka Akira + + * gem_prelude.rb: new file for gem libraries. currently empty. + + * common.mk: generate ext_prelude.c by prelude.rb and gem_prelude.rb. + ruby (not miniruby) is linked with ext_prelude.o instead of + prelude.o. + + * inits.c (rb_call_inits): don't call Init_prelude. + + * ruby.c: support --disable-gems option. + (ruby_init_gems): new function to define Gem::Enable and + invoke Init_prelude. + (process_options): call ruby_init_gems just after + ruby_init_loadpath. + + * tool/compile_prelude.rb: support multiple files. + +Sat Nov 10 17:27:55 2007 Shugo Maeda + + * thread.c (call_trace_proc): don't call ID2SYM() for ID_ALLOCATOR + to avoid SEGV. + +Sat Nov 10 16:37:07 2007 Eric Hodel + + * lib/rubygems: Import RubyGems revision 1493. + + * lib/rubygems.rb: ditto. + + * lib/ubygems.rb: ditto. + + * lib/rbconfig/datadir.rb: ditto. + + * test/rubygems: ditto. + +Sat Nov 10 16:34:21 2007 Eric Hodel + + * lib/soap/property.rb: Don't override Enumerable#inject for 1.9. + +Sat Nov 10 14:43:30 2007 David Flanagan + + * parse.y: use ASCII encoding for string literals that are + 7-bit clean, fixing regression from my previous patch + +Sat Nov 10 13:18:54 2007 Nobuyoshi Nakada + + * {bcc32,win32}/Makefile.sub: vendor_ruby support. + +Fri Nov 9 23:33:16 2007 Nobuyoshi Nakada + + * parse.y (parser_nextc): added single line read forward buffer. + + * parse.y (parser_yylex): adjust line number for fluent interface. + +Fri Nov 9 22:04:21 2007 Nobuyoshi Nakada + + * vm.h (FRAME_MAGIC_MASK_BITS): bits of FRAME_MAGIC_MASK. + + * insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): use shift operations. + +Fri Nov 9 21:46:28 2007 Koichi Sasada + + * eval.c (eval): should be volatile value for GC. + +Fri Nov 9 17:48:22 2007 Nobuyoshi Nakada + + * ruby.c (locale_encoding): guesstimate encoding from environment + variables. [ruby-core:13315] + + * ruby.c (process_options): set primary encoding from environment. + +Fri Nov 9 16:51:42 2007 Yukihiro Matsumoto + + * io.c (rb_io_each_byte): should update rbuf_off and rbuf_len for + each iteration. [ruby-dev:31659][ruby-dev:32192] + + * variable.c (rb_cvar_set): cvar assignment obey same rule to cvar + reference. [ruby-dev:32192] + +Fri Nov 9 15:52:00 2007 Nobuyoshi Nakada + + * encoding.c (enc_check_encoding, rb_set_primary_encoding): ENCODING + is no longer in FL_USERS flags. + +Fri Nov 9 15:20:13 2007 Nobuyoshi Nakada + + * string.c (rb_str_squeeze_bang): initialize squeezing table if no + arguments given. + +Fri Nov 9 13:57:50 2007 Yukihiro Matsumoto + + * enum.c (each_with_index_i): use rb_yield_values() for + compatibility with Enumerator#with_index(). a patch from Yusuke + ENDOH . [ruby-dev:32195] + +Fri Nov 9 13:45:05 2007 Yukihiro Matsumoto + + * test/ruby/test_iterator.rb (TestIterator::IterTest::each): + #each_pair is now alias to #each. [ruby-dev:32192] + + * test/ruby/test_iterator.rb (TestIterator::test_assoc_yield): + ditto + +Fri Nov 9 12:56:36 2007 Nobuyoshi Nakada + + * eval_load.c (loaded_feature_path): check with type of given feature. + +Fri Nov 9 12:43:02 2007 Yukihiro Matsumoto + + * test/ruby/test_basicinstructions.rb: updated for new class + behavior. [ruby-dev:32192] + + * encoding.c (enc_name): Encoding should not rely on ENCODING in + the FL_USERS flags. + + * encoding.c (rb_enc_from_encoding): do not call rb_enc_associate + for encoding itself. + + * encoding.c (enc_register_at): ditto. + + * marshal.c (r_ivar): do not set real instance variable for + encoding data associated. + +Fri Nov 9 10:43:55 2007 Nobuyoshi Nakada + + * eval.c (send_internal): use self in the previous frame to check for + protected methods. [ruby-core:13254] + + * insnhelper.ci (vm_call_method): send! method has gone. + +Fri Nov 9 10:38:13 2007 Koichi Sasada + + * marshal.c (w_object): should be SPECIAL_CONST_P() instead of + IMMEDIATE_P(). + +Fri Nov 9 10:29:21 2007 Nobuyoshi Nakada + + * eval.c (rb_invoke_method): check if invoked in function style. + [ruby-core:13245] + + * insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): stores and returns VM + calling flags. + + * vm.c (rb_vm_cfunc_funcall_p): returns if the current method is + invoked in function style. + +Fri Nov 9 10:10:21 2007 Koichi Sasada + + * cont.c: add rb_context_t#type. + +Fri Nov 9 10:05:54 2007 Koichi Sasada + + * ruby.c (set_arg0): fix breaking environ bugs. + +Fri Nov 9 07:26:04 2007 Yukihiro Matsumoto + + * random.c: update MT URL.[ruby-core:13305]. + +Thu Nov 8 17:09:55 2007 David Flanagan + + * object.c: improve docs for Object.tap + + * ChangeLog: fix bogus dates on my previous entries + +Thu Nov 8 15:13:56 2007 David Flanagan + + * parse.y: fix segfault with \x escapes in regexps + delete unused #if 0 code regions from previous patch + +Thu Nov 8 12:12:10 2007 NAKAMURA Usaku + + * parse.y (parser_read_escape): remove C99/gcc-ism. + +Thu Nov 8 07:54:22 2007 David Flanagan + + * parse.y: patch, based on Nobu's, work to support \u escapes + also modifications for better coderange detection + + * test/ruby/test_unicode_escapes.rb: test cases + + * test/ruby/test_mixed_unicode_escapes.rb: mixed encoding test cases + +Thu Nov 8 07:14:37 2007 David Flanagan + + * parse.y (rb_intern3): commented out broken code that prevented + correct interning of multi-byte symbols. Without this patch + :x==:x is false when x is a multi-byte character. + +Thu Nov 8 07:04:31 2007 David Flanagan + + * string.c (tr_setup_table, tr_trans): fix test failures + in test/ruby/test_string.rb + +Wed Nov 7 15:07:51 2007 Nobuyoshi Nakada + + * enum.c (enum_each_with_index): make different arrays at each + iteration. [ruby-dev:32181] + +Wed Nov 7 05:17:24 2007 David Flanagan + + * eval.c: fix typo in invoke_method documentation + +Wed Nov 7 03:52:26 2007 Yukihiro Matsumoto + + * array.c (rb_ary_product): core dumped with non array arguments. + a patch from Yusuke ENDOH . [ruby-dev:32180] + +Wed Nov 7 03:32:38 2007 Yukihiro Matsumoto + + * lib/rexml/encodings/SHIFT-JIS.rb (REXML::Encoding): place -x for + nkf conversion. a patch from . + [ruby-dev:32183] + +Wed Nov 7 02:59:49 2007 Yukihiro Matsumoto + + * array.c (rb_ary_each_index): should return meaningful value. + +Tue Nov 6 16:37:47 2007 Nobuyoshi Nakada + + * eval_load.c (loaded_feature_path): need to expand relative paths. + + * eval_load.c (rb_feature_p): check if the feature is loading with + load path. [ruby-dev:31932] + + * eval_load.c (load_lock): check the result of barrier waiting. + + * thread.c (rb_barrier_wait): check if owned by the current thread. + + * thread.c (rb_barrier_release): ditto. + +Mon Nov 5 08:01:22 2007 Yukihiro Matsumoto + + * eval.c (Init_eval): move #send to Kernel module from BasicObject. + +Mon Nov 5 05:17:04 2007 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Switch::summarize): fix for long form + option with very long argument. a patch from Kobayashi Noritada + in [ruby-list:44179]. + +Mon Nov 5 01:20:33 2007 Yukihiro Matsumoto + + * parse.y (call_args): remove "parenthesize argument(s) for future + version" warning. when I added this warning, I had a plan to + reimplement the parser that is simpler than the current one. + since we abandoned the plan, warning no longer required. + +Mon Nov 5 01:02:56 2007 Minero Aoki + + * lib/net/http.rb (HTTPHeader#initialize): provide default + User-Agent to fix 500 error on some corrupted HTTP servers. + [ruby-core:13135] + +Mon Nov 5 00:32:32 2007 Yukihiro Matsumoto + + * eval.c (rb_f_send): allow send/__send__ to call methods of all + visibility again. we no longer provide __send, __send!. + + * eval.c (rb_invoke_method): new method to honor private + visibility. if it's invoked in a function call style, it calls + private methods as well (previous 1.9 send behavior). + +Mon Nov 5 00:24:24 2007 NAKAMURA Usaku + + * win32/Makefile.sub: vendor_ruby support. + + * configure.in (RUBY_LIB): duplicated. + +Mon Nov 5 00:01:33 2007 Tanaka Akira + + * re.c (rb_reg_quote): quote \v as well. + +Sun Nov 4 23:51:59 2007 Tanaka Akira + + * re.c (rb_reg_initialize_m): use StringValuePtr instead of + StringValueCStr because \0 exists when Regexp.new("\0"). + +Sun Nov 4 08:11:19 2007 Tanaka Akira + + * gc.c (count_objects): count TOTAL. + +Sun Nov 4 03:58:32 2007 Yukihiro Matsumoto + + * string.c (tr_setup_table): use C array for characters that fit + in a byte to gain performance. + + * string.c (rb_str_delete_bang): ditto. + + * string.c (rb_str_squeeze_bang): ditto. + + * string.c (rb_str_count): ditto. + + * string.c (tr_trans): ditto. + +Sun Nov 4 00:06:40 2007 Tanaka Akira + + * gc.c (count_objects): ObjectSpace.count_objects implemented. + [ruby-core:12301] + +Sat Nov 3 22:49:37 2007 Yukihiro Matsumoto + + * hash.c (rb_hash_each_pair): make Hash#each to be alias to + Hash#each_pair for compatibility and clarity. + + * hash.c (env_each_pair): ditto. + +Sat Nov 3 22:41:05 2007 Tanaka Akira + + * configure.in: --with-vendor-hdrdir implemented. + + * lib/mkmf.rb: check --vendor argument. + + * README.EXT: explain --vendor option for extconf.rb + + * README.EXT.ja: ditto. + +Sat Nov 3 20:30:48 2007 Tanaka Akira + + * configure.in: --with-vendordir implemented. + + * mkconfig.rb: add config to vendorlibdir and vendorarchdir. + + * instruby.rb: make vendor library directories. + + * ruby.c: insert vendor library directories into load path. + +Fri Nov 2 20:55:49 2007 Kouhei Sutou + + * lib/rss/content.rb, lib/rss/content/, lib/rss/maker/content.rb, + test/rss/test_content.rb, test/rss/test_maker_content.rb, + test/rss/rss-testcase.rb (RSS::TestCase): supported + content:encoded with RSS 2.0. + Suggested by Sam Lown. Thanks. + +Fri Nov 2 20:47:04 2007 Kouhei Sutou + + * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.0 -> 0.2.1. + +Thu Nov 1 21:56:45 2007 Yukihiro Matsumoto + + * error.c (Init_Exception): make NameError to be subclass of + StandardError again. + + * error.c (Init_Exception): make SecurityError to be subclass of + Exception, since it's too important to be handled implicitly. + +Thu Nov 1 14:51:39 2007 David Flanagan + * enum.c (take_while_i, drop_while_i) add RTEST to handle nil return + +Thu Nov 1 02:12:50 2007 NAKAMURA Usaku + + * common.mk (prereq): update the path of prelude.c. + + * common.mk (prelude.c): rollback a part of r13675, because it is not + documented and causes build error. + +Thu Nov 1 01:52:23 2007 NAKAMURA Usaku + + * enum.c (enum_drop): fix typo. + +Thu Nov 1 01:51:01 2007 NAKAMURA Usaku + + * vm_core.h (ruby_current_thread): RUBY_EXTERN'ed for probeprofiler. + +Thu Nov 1 00:46:30 2007 NAKAMURA Usaku + + * win32/configure.bat, setup.mak: now can recognize OS even if + the ``--target'' option of configure is omitted. + + * win32/README.win32: update the descriptions about compiler. + +Wed Oct 31 03:13:41 2007 Yukihiro Matsumoto + + * enum.c (enum_take_while): separate with-block form. + + * enum.c (drop_while_i): ditto. + + * enum.c (enum_butfirst): abandon butfirst method. reverted. + +Tue Oct 30 10:03:43 2007 Yukihiro Matsumoto + + * enum.c (enum_butfirst): add a new method to iterates over + elements but first n. RDoc need to be updated. + + * enumerator.c (Init_Enumerator): remove unnecessary symbol + initialization. + +Mon Oct 29 18:42:17 2007 Nobuyoshi Nakada + + * parse.y (bvar): block-local variable can shadow outer variable. + [ruby-core:13036] + +Mon Oct 29 17:58:16 2007 Nobuyoshi Nakada + + * string.c (rb_str_substr): performance improvement. [ruby-dev:31806] + +Mon Oct 29 17:20:13 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_replicate): new function to replicate encoding. + + * encoding.c (enc_based_encoding): Encoding#base_encoding returns + based encoding of replica. + +Mon Oct 29 17:18:36 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_compatible): ASCII encoding is compatible with + ASCII-compatible encoding, even for non-string objects. + +Sun Oct 28 21:50:02 2007 Tanaka Akira + + * lib/open-uri.rb: :redirect option implemented to disable redirects. + (OpenURI::HTTPRedirect): new exception class for redirection. + +Fri Oct 26 17:38:13 2007 Nobuyoshi Nakada + + * numeric.c (int_chr): take an optional encoding parameter. + [ruby-core:12816] + +Fri Oct 26 17:14:14 2007 Nobuyoshi Nakada + + * numeric.c (fix_pow): returns 1.0 for 0**0.0. + + * numeric.c (fix_pow): returns infinity for 0**-1. [ruby-dev:32084] + +Fri Oct 26 15:00:52 2007 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-{case,label}-indent): adjust for + labels inside switch block. + +Fri Oct 26 05:48:57 2007 David Flanagan + * array.c: raise IndexError for negative length in rb_ary_fill + +Wed Oct 25 07:12:03 2007 James Edward Gray II + + * lib/net/telnet.rb (Net::Telnet#login): Allowing "passphrase" in + addition to "password" for Telnet login prompts. [ruby-Bugs-10746] + +Wed Oct 25 06:34:11 2007 James Edward Gray II + + * lib/net/telnet.rb (Net::Telnet#login): Making the password prompt + pattern case insensitive. [ruby-Bugs-10746] + +Fri Oct 26 04:21:36 2007 Yukihiro Matsumoto + + * lib/net/pop.rb (Net::POP3::do_start): type fixed. a patch from + Dan Zwell in [ruby-core:12941]. + +Fri Oct 26 01:48:28 2007 Yukihiro Matsumoto + + * array.c (rb_ary_assoc): check and convert inner arrays (assocs) + using #to_ary. + + * hash.c (rb_hash_s_create): check and convert argument hash + using #to_hash. + + * hash.c (rb_hash_s_create): Hash#[] now takes assocs as source of + hash conversion. + +Thu Oct 25 16:46:05 2007 Yukihiro Matsumoto + + * parse.y (parser_yylex): dot at the head of the line denote line + continuation from previous one to support fluent interface. + [experimental] + + * misc/ruby-mode.el (ruby-calculate-indent): support fluent dot. + +Thu Oct 25 14:19:33 2007 Nobuyoshi Nakada + + * io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093] + +Thu Oct 25 13:59:53 2007 David Flanagan + + * parse.y (parser_tokspace): increment tokidx + fixes test failure at [test/ruby/test_stringchar.rb:72] + +Thu Oct 25 09:49:49 2007 akira yamada + + * lib/uri.rb, lib/uri/ldaps.rb: added LDAPS + scheme. [ruby-dev:31896] + +Wed Oct 25 06:23:14 2007 James Edward Gray II + + * lib/xmlrpc/parser.rb (XMLRPC::Convert::dateTime): Fixing a bug that + caused time zone conversion to fail for some ISO 8601 date formats. + [ruby-Bugs-12677] + +Wed Oct 25 04:59:28 2007 James Edward Gray II + + * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Explicitly start + the HTTP connection to support keepalive requests. [ruby-Bugs-9353] + +Wed Oct 25 04:46:53 2007 James Edward Gray II + + * lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): Improving the error + message for Content-Type check failures. [ruby-core:12163] + +Wed Oct 25 03:45:08 2007 James Edward Gray II + + * lib/xmlrpc/utils.rb (XMLRPC::ParseContentType#parse_content_type): + Making Content-Type checks case insensitive. [ruby-Bugs-3367] + +Wed Oct 24 17:09:39 2007 Nobuyoshi Nakada + + * parse.y (parser_tokspace): make space in token buffer. + + * parse.y (parser_yylex): fix encoding of single character literal. + +Tue Oct 23 13:44:14 2007 Nobuyoshi Nakada + + * parse.y (call_args2): nd_head of NODE_BLOCK_PASS should be a list. + [ruby-core:12850] + +Tue Oct 23 10:42:51 2007 Nobuyoshi Nakada + + * ruby.c (process_options): encoding set by command line option takes + priority over the encoding in the source, as the primary encoding. + +Mon Oct 22 19:24:33 2007 Yukihiro Matsumoto + + * ruby.c (proc_options): allow space after -E (encoding) option. + +Mon Oct 22 11:03:09 2007 Nobuyoshi Nakada + + * encoding.c (enc_check_encoding): returns index now. + + * encoding.c (rb_enc_compatible): check if two objects have compatible + encodings. + + * encoding.c (enc_compatible_p): added Encoding.compatible?. + + * include/ruby/encoding.h (rb_enc_compatible): prototype. + +Sun Oct 21 18:29:17 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_default, rb_enc_primary): return pointers to + rb_encoding of default and primary respectively. [ruby-core:12795] + + * encoding.c (set_primary_encoding): removed primary_encoding setter. + +Sat Oct 20 13:17:01 2007 Yukihiro Matsumoto + + * enum.c (enum_cycle): hide temporary array from ObjectSpace. + [ruby-core:12762] + +Sat Oct 20 11:49:20 2007 Nobuyoshi Nakada + + * file.c (rb_get_path): returns frozen string. + + * file.c (rb_file_s_chown, rb_file_s_lchown): use uid_t and gid_t. + +Fri Oct 19 20:08:14 2007 Nobuyoshi Nakada + + * encoding.c (rb_id_encoding): returns ID "encoding". + + * marshal.c (w_encoding): dump encoding name. + + * marshal.c (r_ivar): load encoding. + +Fri Oct 19 16:41:00 2007 Nobuyoshi Nakada + + * parse.y (parser_regx_options, reg_compile_gen): relaxened encoding + matching rule. + + * re.c (rb_reg_initialize): always set encoding of Regexp. + + * re.c (rb_reg_initialize_str): fix encoding for non 7bit-clean + strings. + + * re.c (rb_reg_initialize_m): use ascii encoding for 'n' option. + +Fri Oct 19 11:09:56 2007 Nobuyoshi Nakada + + * ruby.c (process_options): set primary encoding from the parser + always. [ruby-core:12758] + + * ruby.c (load_file): should not discard the parser parameter. + +Fri Oct 19 10:55:42 2007 Nobuyoshi Nakada + + * range.c (range_last): removed unused variables. + +Thu Oct 18 17:08:57 2007 Yukihiro Matsumoto + + * enum.c (enum_find_index): update RDoc. a patch from David Flanagan + in [ruby-core:12710]. + + * enum.c (enum_take, enum_drop): ditto. + + * enum.c (enum_cycle): should not cause infinite loop for empty + arrays. [ruby-core:12710] + + * range.c (Init_Range): typo fixed. + +Thu Oct 18 16:39:34 2007 Yukihiro Matsumoto + + * lib/rexml/source.rb (REXML::SourceFactory::SourceFactory): more + duck typed. better performance on JRuby. + http://headius.blogspot.com/2007/10/another-performance-discovery-rexml.html + +Thu Oct 18 09:33:25 2007 Yukihiro Matsumoto + + * range.c (range_first): takes first n element if argument is + given. [ruby-core:12697] + + * range.c (range_last): returns last n elements if argument is + given. + + * array.c (rb_ary_subseq, rb_ary_last): export. + +Wed Oct 17 17:39:31 2007 Nobuyoshi Nakada + + * ruby.c (proc_options): fixed reversed condition. [ruby-core:12722] + +Wed Oct 17 13:54:28 2007 Yukihiro Matsumoto + + * re.c (rb_reg_s_union): the last check was not complete. + +Wed Oct 17 11:30:55 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_from_encoding, rb_enc_register): associate index + to self. + + * encoding.c (enc_capable): Encoding objects are encoding capable. + + * re.c (rb_reg_s_union): check if encoding matching by exact encoding + objects. + +Wed Oct 17 06:18:06 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_alias, rb_enc_find_index): changed + enc_table_alias to a name-to-index hash. + + * encoding.c (rb_enc_init): use upper case names for aliases to use as + constant names. + + * encoding.c (enc_find): allow symbols. + + * encoding.c (Init_Encoding): define encoding constants. + + * st.c (strcasehash): fix wrong code range condition. + +Wed Oct 17 05:07:18 2007 Nobuyoshi Nakada + + * encoding.c (rb_primary_encoding): added Encoding.primary_encoding. + + * parse.y (rb_parser_encoding): added. + + * ruby.c (proc_options): added -E and --encoding options. + + * ruby.c (process_options): set primary encoding from command line + option if set, or source encoding. + + * include/ruby/encoding.h (rb_enc_from_encoding, + rb_get_primary_encoding, rb_set_primary_encoding): prototypes. + + * include/ruby/node.h (rb_parser_encoding): prototype. + +Wed Oct 17 03:37:07 2007 Nobuyoshi Nakada + + * re.c (rb_reg_desc): set encoding. + + * re.c (rb_reg_s_union): check encodings. + + * enc/utf8.c (utf8_code_to_mbclen): 0xfe and 0xff are valid Unicode to + be encoded to 2bytes in UTF-8. [ruby-core:12700] + +Wed Oct 17 02:50:49 2007 Nobuyoshi Nakada + + * string.c (rb_str_ord): use encoding. + +Wed Oct 17 01:57:06 2007 Nobuyoshi Nakada + + * re.c (rb_reg_initialize_m): allow binary encoding option. + [ruby-dev:32083] + +Tue Oct 16 19:48:01 2007 Nobuyoshi Nakada + + * re.c (rb_reg_s_union): check for encoding of original object. + +Tue Oct 16 18:28:51 2007 Tanaka Akira + + * debug.c: use enum for constants for gdb if possible. + +Tue Oct 16 18:20:10 2007 Tanaka Akira + + * ruby.c, debug.c: move debug enum and constants to debug.c. + +Tue Oct 16 18:16:15 2007 Tanaka Akira + + * ruby.c (RUBY_ENCODING_SHIFT): added as enum. + + * .gdbinit (rp): show encoding and coderange for strings. + +Tue Oct 16 14:48:38 2007 Nobuyoshi Nakada + + * parse.y (parser_regx_options): check if regexp encoding option + matches to current encoding. + + * re.c (char_to_option, rb_char_to_option_kcode): 'n' is not kcode + option now. + + * re.c (rb_reg_to_s, rb_reg_error_desc): copy encoding rather than + append as an option. + + * re.c (make_regexp, rb_reg_prepare_re): use encoding of Regexp and + String instead of kcode. + + * re.c (rb_reg_initialize): set fixed option if none is set. + + * re.c (rb_reg_regcomp): ditto. + + * re.c (rb_reg_equal): check if encodings are equal. + + * re.c (rb_reg_initialize_m): encoding option is obsolete. + + * re.c (rb_kcode, rb_get_kcode, rb_set_kcode): removed. + + * re.c (Init_Regexp): removed Regexp#kcode method. + + * ruby.c (proc_options): allow long encoding name. + +Tue Oct 16 14:03:09 2007 Yukihiro Matsumoto + + * re.c (rb_reg_s_union): encoding of all regexp objects should + match. [ruby-dev:32076] + +Tue Oct 16 13:49:41 2007 Yukihiro Matsumoto + + * encoding.c (enc_to_s): rename function. + +Tue Oct 16 13:25:46 2007 Nobuyoshi Nakada + + * string.c (rb_str_new4): should copy encoding. a patch from NARUSE, + Yui . [ruby-dev:32076] + +Tue Oct 16 01:31:23 2007 Yukihiro Matsumoto + + * enum.c (enum_inject): RDoc update. a patch from David Flanagan + in [ruby-core:12710]. + +Tue Oct 16 01:25:40 2007 Yukihiro Matsumoto + + * encoding.c (Init_Encoding): define #to_s to show encoding name + in to_s representation as well as #inspect. + +Mon Oct 15 13:24:08 2007 Nobuyoshi Nakada + + * numeric.c (flo_round): should be number but not rounding factor. + [ruby-dev:32060] + +Mon Oct 15 11:45:12 2007 Nobuyoshi Nakada + + * marshal.c (r_bytes0): refined length check. [ruby-dev:32059] + +Mon Oct 15 10:24:19 2007 Tanaka Akira + + * process.c (pst_to_s): returns a string such as "pid 10220 exit 1" + instead of "256". [ruby-dev:32053] + (pst_inspect): change format + "#" to + "#". + +Mon Oct 15 09:58:07 2007 Nobuyoshi Nakada + + * marshal.c (r_bytes0): check if source has enough data. + [ruby-dev:32054] + +Mon Oct 15 01:15:09 2007 Tanaka Akira + + * ext/socket/socket.c (s_accept_nonblock): make accepted fd + nonblocking. [ruby-talk:274079] + +Sun Oct 14 17:31:48 2007 Nobuyoshi Nakada + + * encoding.c (rb_obj_encoding): rdoc update. a patch from David + Flanagan . [ruby-core:12664] + + * encoding.c (enc_dump, enc_load): marshaling feature. a patch from + David Flanagan. [ruby-core:12665] + + * encoding.c (Init_Encoding): undefine allocator of Encoding. + [ruby-core:12665], [ruby-core:12666] + + * test/ruby/test_encoding.rb: tests for Encoding from David Flanagan + [ruby-core:12665] + +Sun Oct 14 11:09:09 2007 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#pp_hash): don't sort keys because hash is + ordered. + (ENV.pretty_print): call pp_hash with sorted hash. + +Sun Oct 14 04:08:34 2007 Nobuyoshi Nakada + + * configure.in (AC_SYS_LARGEFILE): keep results also in command + options, to vail out of mismatch. [ruby-list:44114] + + * mkconfig.rb, lib/mkmf.rb (configuration): add DEFS. + +Sun Oct 14 03:55:52 2007 Nobuyoshi Nakada + + * win32/mkexports.rb: deal with __fastcall name decorations. + [ruby-list:44111] + +Sun Oct 14 02:20:40 2007 Nobuyoshi Nakada + + * encoding.c (rb_cEncoding): new Encoding class. + + * encoding.c (rb_to_encoding, rb_to_encoding_index): helper functions. + + * encoding.c (rb_obj_encoding): return Encoding object now. + + * gc.c (garbage_collect): mark Encoding objects. + + * inits.c (rb_call_inits): call Init_Encoding. + + * string.c (rb_str_force_encoding): accept Encoding object as well as + encoding name. + + * include/ruby/encoding.h (rb_to_encoding_index, rb_to_encoding): + prototypes. + +Sun Oct 14 01:03:30 2007 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_http): fix :ssl_ca_cert option. + +Sat Oct 13 21:23:21 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (foletype_s_ole_classes, + foletype_s_typelibs): refactoring. + + * test/win32ole/test_win32ole_type.rb: add some test. + + * ext/win32ole/win32ole.c (Init_win32ole): change method name + WIN32OLE_TYPELIB.ole_types from WIN32OLE_TYPELIB.ole_classes. + + * test/win32ole/test_win32ole_typelib.rb: ditto. + + * test/win32ole/test_folderitem2_invokeverb.rb: check create + shortcut string more strictly (This test is invoked in Japanese + Windows environment). + +Sat Oct 13 09:11:58 2007 Nobuyoshi Nakada + + * parse.y (set_file_encoding): case-insensitive search, a patch from + David Flanagan [ruby-core:12629] + +Sat Oct 13 09:02:16 2007 Nobuyoshi Nakada + + * {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108] + +Sat Oct 13 00:17:49 2007 Yukihiro Matsumoto + + * lib/rexml/document.rb (REXML::Document::write): leaky + modification trans -> transitive. [ruby-dev:32040] + +Sat Oct 13 00:00:33 2007 Yukihiro Matsumoto + + * parse.y: encoding specifier should work if the line matches + /coding[:=] ?/, a la Python PEP-263, so that VIM comments like + "# vim: set fileencoding=" should be recognized. + +Fri Oct 12 15:04:54 2007 Nobuyoshi Nakada + + * parse.y (magic_comments): add "encoding" as same as "coding". + + * parse.y (set_file_encoding): special file encoding handling. + + * parse.y (parser_yylex): ditto. + +Fri Oct 12 12:44:11 2007 Yukihiro Matsumoto + + * array.c (rb_ary_combination): fixed memory corruption due to too + small memory allocation + + * array.c (rb_ary_product): accessing out of memory bounds. + condition fixed. + +Fri Oct 12 11:22:15 2007 Yukihiro Matsumoto + + * re.c (match_values_at): make #select to be alias to #values_at + to adapt RDoc description. [ruby-core:12588] + +Thu Oct 11 21:10:17 2007 Yukihiro Matsumoto + + * include/ruby/node.h (NOEX_LOCAL): remove unused local visibility. + + * class.c (ins_methods_push): ditto. + + * class.c (rb_class_local_methods): method removed. + +Thu Oct 11 14:29:31 2007 NAKAMURA Usaku + + * */Makefile.sub (COMMON_MACROS): workaround for old SDK's bug. + [ruby-core:12584] + +Thu Oct 11 06:35:43 2007 Nobuyoshi Nakada + + * Makefile.in, */Makefile.sub (VPATH): add enc directory. + + * common.mk (ENCOBJS): encoding objects. + + * enc: directory for encodings. + +Thu Oct 11 00:04:37 2007 Yukihiro Matsumoto + + * include/ruby/oniguruma.h (OnigEncodingTypeST): add OnigEncoding + parameter to every function members. + + * include/ruby/oniguruma.h (OnigEncodingTypeST): add auxiliary + data member to provide user defined data for an encoding. + +Wed Oct 10 23:32:15 2007 Yukihiro Matsumoto + + * re.c (rb_reg_s_quote): no longer takes optional second argument + that has never been documented. + +Wed Oct 10 15:39:04 2007 Tanaka Akira + + * encoding.c (rb_enc_init): don't alias iso-8859-1 to ascii. + + * ascii.c (OnigEncodingASCII): change the name US-ASCII to ASCII-8BIT. + +Wed Oct 10 14:31:05 2007 Nobuyoshi Nakada + + * string.c (rb_enc_str_coderange): fixed check for non-ascii. + +Tue Oct 9 21:35:28 2007 Nobuyoshi Nakada + + * array.c (rb_ary_permutation, rb_ary_combination): missing type + names. + + * array.c (rb_ary_permutation): used buffer should be t1. + + * array.c (rb_ary_permutation): use frozen shared hidden array. + [ruby-dev:31985] + +Tue Oct 9 16:58:10 2007 Yukihiro Matsumoto + + * array.c: remove to_a completely. + + * array.c (tmpbuf): keep DRY to clear klass of temporary objects. + +Tue Oct 9 16:33:32 2007 Nobuyoshi Nakada + + * array.c (rb_ary_permutation, rb_ary_combination, rb_ary_product): + hide internal buffer objects. [ruby-dev:31982] + +Tue Oct 9 16:00:32 2007 NAKAMURA Usaku + + * parse.y (parser_read_escape, parser_tokadd_escape): check code range. + [ruby-dev:31980] + +Tue Oct 9 15:40:24 2007 Nobuyoshi Nakada + + * parse.y (STR_NEW3): check for if single byte sequence. + +Mon Oct 8 20:06:29 2007 GOTOU Yuuzou + + * lib/net/imap.rb, lib/net/smtp.rb, lib/net/pop.rb: hostname should + be verified against server's identity as presented in the server's + certificate. [ruby-dev:31960] + + * ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto. + +Sun Oct 7 22:37:47 2007 Kouhei Sutou + + * test/rss/test_taxonomy.rb, test/rss/test_parser_1.0.rb, + test/rss/test_image.rb, test/rss/rss-testcase.rb: ensured + declaring XML namespaces. + +Sun Oct 7 22:00:01 2007 Tanaka Akira + + * include/ruby/node.h: make node flags as VALUE type. + enum ruby_node_flags removed. + + * ruby.c: define RUBY_NODE_* as const for gdb. + +Sun Oct 7 18:57:12 2007 Tanaka Akira + + * include/ruby/ruby.h: enum ruby_value_flags removed. [ruby-dev:31959] + + * ruby.c: define RUBY_FL_* as const VALUE for gdb. + +Sun Oct 7 17:50:14 2007 GOTOU Yuuzou + + * lib/net/http.rb: remove enable_post_connection_check flag. + + * lib/open-uri.rb: ditto. + +Sun Oct 7 15:48:40 2007 Koichi Sasada + + * insns.def (opt_eq): fix to use rb_str_equal(). + +Sat Oct 6 23:14:54 2007 Yukihiro Matsumoto + + * string.c (rb_str_to_i): update RDoc since base can be any value + between 2 and 36. [ruby-talk:272879] + +Sat Oct 6 16:24:02 2007 Koichi Sasada + + * cont.c (cont_free): check Fiber or Continuation. + + * bootstraptest/test_knownbug.rb: remove a fixed test. + +Sat Oct 6 14:56:02 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_register): returns new index or -1 if failed. + + * encoding.c (rb_enc_alias): check if original name is registered. + + * encoding.c (rb_enc_init): register in same order as kcode options in + re.c. added new aliases. + + * string.c (rb_str_force_encoding): check if valid encoding name. + +Sat Oct 6 14:32:30 2007 Nobuyoshi Nakada + + * insns.def (opt_eq): get rid of gcc bug. + +Sat Oct 6 02:34:18 2007 Yukihiro Matsumoto + + * include/ruby/defines.h: no longer provide DEFAULT_KCODE. + +Fri Oct 5 21:24:59 2007 Tanaka Akira + + * re.c (rb_reg_s_union_m): Regexp.union accepts single argument which + is an array of patterns. [ruby-list:44084] + +Fri Oct 5 16:42:27 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_not_match): new method. + +Fri Oct 5 16:15:52 2007 Akinori MUSHA + + * configure.in: Turn on --enable-pthread by default for FreeBSD + 5.2.1-RELEASE and later, and remove pthread support for older + versions which has never worked perfectly. + +Fri Oct 5 16:11:50 2007 Akinori MUSHA + + * time.c (time_to_s): Fix documentation. Time format changed. + +Fri Oct 5 04:02:39 2007 Akinori MUSHA + + * lib/ipaddr.rb (in_addr, in6_addr, addr_mask): Make some minor + code optimization. + +Fri Oct 5 03:25:51 2007 Akinori MUSHA + + * lib/ipaddr.rb (<=>): Implement IPAddr#<=> and make IPAddr + comparable. + + * lib/ipaddr.rb (succ): Implement IPAddr#succ. You can now create + a range between two IPAddr's, which (Range) object is + enumerable. + + * lib/ipaddr.rb (to_range): A new method to create a Range object + for the (network) address. + +Fri Oct 5 03:14:45 2007 Akinori MUSHA + + * lib/ipaddr.rb (coerce_other): Support type coercion and make &, + |, == and include? accept a string or an integer instead of an + IPAddr object as the argument. + + * lib/ipaddr.rb (initialize): Give better error messages. + + * lib/ipaddr.rb: Improve documentation. + +Thu Oct 4 20:45:53 2007 NAKAMURA Usaku + + * process.c (Init_process): win32 has our own WNOHANG definition, so + remove unnecessary #ifdef guard. + +Thu Oct 4 20:17:19 2007 NAKAMURA Usaku + + * array.c (rb_ary_permutation, rb_ary_product): support non C99 + compilers. + +Thu Oct 4 17:33:18 2007 Yukihiro Matsumoto + + * re.c (kcode_setter): Perl-ish global variable `$=' no longer + effective. + + * io.c (Init_IO): remove obsolete variables: $defout, $deferr. + + * re.c (Init_Regexp): remove obsolete const alias: MatchingData. + + * time.c (Init_Time): remove obsolete Time::times. + + * re.c (ignorecase_setter): change warning message. + + * re.c (ignorecase_getter): now gives warning. + + * string.c (rb_str_cmp_m): update RDoc document. + + * re.c (kcode_setter): restore erroneously removed setter. + +Thu Oct 4 16:28:33 2007 Nobuyoshi Nakada + + * encoding.c (rb_obj_encoding): returns encoding of the given object. + + * parse.y (reg_compile_gen): copy encoding from source string if + non-empty. + + * re.c (Init_Regexp): new method Regexp#encoding. + + * string.c (str_encoding): moved to encoding.c + +Thu Oct 4 15:49:33 2007 Yukihiro Matsumoto + + * array.c (rb_ary_permutation): remove C99 dependency. + [ruby-dev:31934] + + * array.c (rb_ary_product): ditto. + +Wed Oct 3 23:37:17 2007 Yukihiro Matsumoto + + * ext/nkf/nkf.c, bin/ri, bin/irb: fixed typos in doc and comments. + a patch from Eugene Ossintsev . + [ruby-core:12375] + +Wed Oct 3 17:56:22 2007 Koichi Sasada + + * benchmark/driver.rb: enable specify label to executable. + (-e "ruby1::/path/to/ruby1; ruby2::/path/to/ruby2; ...") + +Wed Oct 3 16:58:48 2007 Nobuyoshi Nakada + + * parse.y (parser_str_new, parser_yylex, rb_intern3): set code-range + bits. + + * parse.y (parser_tokadd_string): check code-range. + + * parse.y (parser_parse_string, parser_here_document): ditto. + + * parse.y (parser_set_encode): check if valid encoding. + +Wed Oct 3 15:43:15 2007 Yukihiro Matsumoto + + * variable.c (rb_cvar_set): check whether class variable is + defined in superclasses. root classes have higher priority. + removes lower class variable entry from IV_TBL (if it's defined + in classes, not modules). + + * variable.c (rb_cvar_get): ditto. + +Wed Oct 3 10:06:53 2007 Nobuyoshi Nakada + + * ruby.c (ruby_process_options): push frame with program name. + [ruby-core:12351] + +Tue Oct 2 20:16:55 2007 NAKAMURA Usaku + + * win32/win32.c (init_env): refactoring. remove unused code. + +Tue Oct 2 12:30:40 2007 Yukihiro Matsumoto + + * array.c (rb_ary_product): generalized product, now takes + arbitrary number of arrays. a patch from David Flanagan + . [ruby-core:12346] + +Tue Oct 2 08:25:50 2007 Yukihiro Matsumoto + + * array.c (rb_ary_permutation): implementation contributed from + David Flanagan. [ruby-core:12344] + + * array.c (rb_ary_combination): RDoc update to clarify. a patch + from David Flanagan. [ruby-core:12344] + + * array.c (rb_ary_permutation): small dirty hack by Matz to avoid + arrays on stack. + +Tue Oct 2 07:01:05 2007 Koichi Sasada + + * proc.c (proc_dup): proc->block.proc should be self. + + * bootstraptest/test_knownbug.rb, test_method.rb: + move a fixed test. + +Mon Oct 1 16:17:44 2007 Tanaka Akira + + * bootstraptest/test_method.rb: use assert_normal_exit to test + [ruby-dev:31818]. + +Mon Oct 1 15:57:49 2007 Nobuyoshi Nakada + + * gc.c (id2ref): skip ICLASS. + +Mon Oct 1 15:29:35 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_normal_exit): use `` instead of + system. + +Mon Oct 1 15:17:48 2007 Nobuyoshi Nakada + + * gc.c (id2ref): T_VALUES is less than T_BLOCK. [ruby-dev:31911] + +Mon Oct 1 10:58:42 2007 Nobuyoshi Nakada + + * ruby.c (require_libraries): use require method instead of calling + rb_require directly. [ruby-dev:31322] + +Mon Oct 1 10:52:30 2007 Nobuyoshi Nakada + + * eval.c (ruby_options), ruby.c (proc_options, process_options): not + call exit(2) directly. [ruby-dev:31912] + + * eval.c (ruby_run_node): deal with direct exit code. + +Sun Sep 30 17:12:53 2007 Nobuyoshi Nakada + + * string.c (rb_str_append): always set encoding, and coderange + cache bits. + + * include/ruby/encoding.h (ENC_CODERANGE_SET): fixed a bug not to + set cache bits. + +Sun Sep 30 11:52:11 2007 Tanaka Akira + + * bootstraptest/runner.rb (pretty): don't show beginning empty line. + +Sun Sep 30 11:32:34 2007 Tanaka Akira + + * numeric.c: use #ifdef for test LONG_LONG_VALUE. + +Sun Sep 30 04:30:55 2007 Tanaka Akira + + * bignum.c: use SIZEOF_LONG instead of SIZEOF_ULONG which is not + defined. + +Sun Sep 30 04:03:43 2007 Tanaka Akira + + * re.c (Init_Regexp): test DEFAULT_KCODE in C code because + KCODE_EUC, etc. are enum. + +Sun Sep 30 00:55:40 2007 NAKAMURA Usaku + + * variable.c (obj_ivar_each): get rid of warning. + +Sat Sep 29 17:45:22 2007 Nobuyoshi Nakada + + * main.c (main): use platform-independent per-process initialization. + [ruby-dev:31900] + + * ruby.c (ruby_sysinit): new function for per-process initialization. + + * include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration. + + * include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize + ruby_sysinit. + + * win32/win32.c (rb_w32_sysinit): renamed from NtInitialize. + +Sat Sep 29 17:31:04 2007 Yukihiro Matsumoto + + * array.c (rb_ary_combination): new method to give all combination + of elements from an array. [ruby-list:42671] + + * array.c (rb_ary_product): a new method to get all combinations + of elements from two arrays. can be extended to combinations of + n-arrays, e.g. a.product(b,c,d). anyone volunteer? + + * array.c (rb_ary_permutation): empty function body to calculate + permutations of array elements. need volunteer. + +Sat Sep 29 17:14:44 2007 Yukihiro Matsumoto + + * marshal.c (r_leave): move proc invocation from r_entry() to + avoid potential crash. + +Sat Sep 29 12:28:08 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_normal_exit): new method. + + * bootstraptest/test_knownbug.rb: add test for Marshal.load. + +Sat Sep 29 10:12:20 2007 Tanaka Akira + + * variable.c (rb_ivar_set): fix class instance variable. + + * object.c (rb_class_real): cl argument may be 0. + +Sat Sep 29 09:12:02 2007 Tanaka Akira + + * object.c (rb_class_real): use BUILTIN_TYPE instead of TYPE. + access flags directly instead of FL_TEST. + they are enough because cl argument is a class. + +Sat Sep 29 08:57:15 2007 Nobuyoshi Nakada + + * include/ruby/win32.h (strcasecmp): needed for type_strcasehash. + +Sat Sep 29 06:47:29 2007 Nobuyoshi Nakada + + * ruby.c (struct cmdline_options): static variables packed. + +Sat Sep 29 05:29:30 2007 Nobuyoshi Nakada + + * io.c (rb_io_fdopen): create IO object from fd. + + * parse.y (yycompile): use encoding of the source as default. + + * ruby.c (proc_options, load_file): ditto. + +Sat Sep 29 04:27:08 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_alias): allow encodings multiple aliases. + + * encoding.c (rb_enc_find_index): search the encoding which has the + given name and return its index if found, or -1. + + * st.c (type_strcasehash): case-insensitive string hash type. + + * string.c (rb_str_force_encoding): force encoding of self. this name + comes from [ruby-dev:31894] by Martin Duerst. [ruby-dev:31744] + + * include/ruby/encoding.h (rb_enc_find_index, rb_enc_associate_index): + prototyped. + + * include/ruby/encoding.h (rb_enc_isctype): direct interface to ctype. + + * include/ruby/st.h (st_init_strcasetable): prototyped. + +Sat Sep 29 03:53:26 2007 Koichi Sasada + + * cont.c: Thread local storage should be fiber local. + + * bootstraptest/test_knownbug.rb, test/ruby/test_fiber.rb: + move a fixed test. + +Fri Sep 28 23:15:31 2007 Yukihiro Matsumoto + + * insnhelper.ci (vm_call_method): allow send! to call protected + methods as well. [ruby-core:12280] + +Fri Sep 28 22:33:47 2007 Koichi Sasada + + * benchmark/bm_so_fasta.rb: added. + + * benchmark/bm_so_k_nucleotide.rb: added. + + * benchmark/bm_so_reverse_complement.rb: added. + + * benchmark/make_fasta_output.rb: added. + + * benchmark/prepare_so_k_nucleotide.rb: added. + + * benchmark/prepare_so_reverse_complement.rb: added. + +Fri Sep 28 19:14:51 2007 Koichi Sasada + + * benchmark/driver.rb: fix notations. + + * benchmark/bm_loop_whileloop.rb: ditto. + + * benchmark/bm_loop_whileloop2.rb: ditto. + + * benchmark/bm_app_uri.rb: added. + + * benchmark/bm_vm1_ivar_set.rb: ditto. + + * benchmark/bm_so_binary_trees.rb: added from Computer Language + Benchmarks Game (http://shootout.alioth.debian.org/). + + * benchmark/bm_so_fannkuch.rb: ditto. + + * benchmark/bm_so_mandelbrot.rb: ditto. + + * benchmark/bm_so_meteor_contest.rb: ditto. + + * benchmark/bm_so_nbody.rb: ditto. + + * benchmark/bm_so_nsieve.rb: ditto. + + * benchmark/bm_so_nsieve_bits.rb: ditto. + + * benchmark/bm_so_partial_sums.rb: ditto. + + * benchmark/bm_so_pidigits.rb: ditto. + + * benchmark/bm_so_spectralnorm.rb: ditto. + +Fri Sep 28 16:22:52 2007 Yukihiro Matsumoto + + * vm_core.h (rb_vm_struct): fix typo: bufferd -> buffered. + +Fri Sep 28 15:47:48 2007 Koichi Sasada + + * benchmark/driver.rb: fix to output benchmark results + to file "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}". + + * benchmark/bm_io_file_create.rb: remove useless codes. + + * benchmark/bm_vm2_eval.rb: added. + +Fri Sep 28 15:05:24 2007 Tanaka Akira + + * include/ruby/intern.h: export rb_ivar_foreach. + + * include/ruby/ruby.h: modify struct RObject and RClass for optimizing + T_OBJECT space. [ruby-dev:31853] + (ROBJECT_LEN, ROBJECT_PTR) + (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) + (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor + defined. + + * variable.c: support the modified RObject and RClass. + + * object.c: ditto. + + * class.c: ditto. + + * gc.c: ditto. + + * marshal.c: ditto. + + * eval_method.ci: use the abstract accessor. + + * insns.def: ditto. + + * proc.c: ditto. + + * struct.c: ditto. + + * eval.c: ditto. + + * error.c: ditto. + + * vm.c: ditto. + + * insnhelper.ci: ditto. + + * ext/digest/digest.c: ditto. + +Fri Sep 28 13:20:10 2007 Nobuyoshi Nakada + + * io.c (rb_io_getline_fast, rb_io_getline_1): set encoding to the + result string, as well as getc. + +Fri Sep 28 12:51:42 2007 Koichi Sasada + + * benchmark/bm_app_erb.rb: added. + + * benchmark/bm_io_file_(create|read|write).rb: added. + +Fri Sep 28 12:49:05 2007 Koichi Sasada + + * benchmark/driver.rb: fix file selection algorithm. + +Fri Sep 28 02:05:42 2007 Yukihiro Matsumoto + + * string.c (rb_str_comparable): need not to check asciicompat here. + + * encoding.c (rb_enc_check): ditto. + + * string.c (rb_enc_str_coderange): tuned a bit; no broken check. + + * encoding.c (rb_enc_check): new encoding comparison criteria. + +Thu Sep 27 17:36:28 2007 NAKAMURA Usaku + + * win32/REAMDE.win32: follow recent changes. + +Thu Sep 27 16:01:53 2007 Koichi Sasada + + * benchmark/driver.rb: fix to output some helpful messages. + +Thu Sep 27 15:44:51 2007 Koichi Sasada + + * benchmark/driver.rb: added. + + * common.mk: fix to use above driver. + + * benchmark/prepare_so_count_words.rb: added. + + * benchmark/bm_so_count_words.rb: fix benchmark process. + +Thu Sep 27 15:42:34 2007 Koichi Sasada + + * ext/fiber/fiber.c: modify prototype declaration. + [ruby-core:12247] + +Thu Sep 27 09:42:50 2007 Nobuyoshi Nakada + + * parse.y (strings, xstring, regexp, dsym): empty strings have + US-ASCII encoding. + +Thu Sep 27 07:39:13 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_finish): new method. + + * bootstraptest/test_knownbug.rb: add test for [ruby-dev:31866] using + assert_finish. + +Thu Sep 27 04:46:31 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_associate_index): deal with ASCII compatible + flags. + + * encoding.c (rb_enc_check): allow ASCII compatible strings. + + * parse.y (rb_intern_str): use ASCII encoding for ASCII string. + + * string.c (rb_enc_str_coderange): check for code-range. + + * string.c (rb_str_modify): clear code-range flags. + + * string.c (rb_str_hash, rb_str_eql): ASCII compatible strings are + comparable. + + * include/ruby/encoding.h: added code-range flags. + +Thu Sep 27 04:40:47 2007 Nobuyoshi Nakada + + * gc.c (rb_mark_set): new function to mark keys. + + * marshal.c (struct dump_arg, struct load_arg): added wrappers to mark + data and compat_tbl entries. [ruby-dev:31870] + +Thu Sep 27 03:17:41 2007 Nobuyoshi Nakada + + * process.c (rb_waitpid): no needs to poll. [ruby-dev:31871] + +Wed Sep 26 20:11:46 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: remove a fixed test. + +Wed Sep 26 20:00:12 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: move fixed tests. + + * bootstraptest/test_method.rb: ditto. + + * test/ruby/test_io.rb: ditto. + +Wed Sep 26 19:36:26 2007 Koichi Sasada + + * eval.c (eval): fix to check stack overflow. + [ruby-dev:31850] + + * eval_intern.h, vm.h: move CHECK_STACK_OVERFLOW() macro. + +Wed Sep 26 19:27:11 2007 Koichi Sasada + + * insnhelper.ci (vm_throw): fix to move increment point. + [ruby-dev:31840] + +Wed Sep 26 19:23:56 2007 Koichi Sasada + + * cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146] + + * ext/fiber/fiber.c: enable Fiber#transfer. + +Wed Sep 26 18:38:41 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_check): check for ASCII-compatibilities. + + * parse.y (parser_tokadd_string, parser_parse_string, + parser_here_document, parser_yylex): set encoding to US-ASCII. + + * parse.y (rb_enc_symname_p): check if valid with encoding. + + * parse.y (rb_intern3): let symbols have encoding. + + * string.c (rb_str_hash): add encoding index. + + * string.c (rb_str_comparable, rb_str_equal, rb_str_eql): check if + compatible encoding. + + * string.c (sym_inspect): made encoding aware. + + * insns.def (opt_eq): compare with encoding. + + * include/ruby/encoding.h (rb_enc_asciicompat): check if ASCII + compatible. + + * include/ruby/encoding.h (rb_enc_get_index): added prototype. + + * include/ruby/intern.h (rb_str_comparable, rb_str_equal): ditto. + +Wed Sep 26 15:01:16 2007 Nobuyoshi Nakada + + * eval_method.ci (rb_get_alloc_func): cast to suppress a warning. + + * eval_method.ci (remove_method): local variable to be initialized. + +Wed Sep 26 08:36:31 2007 Nobuyoshi Nakada + + * Makefile.in (ext/extinit.o): use $(OUTFLAG) as well as other + objects. [ruby-Bugs-14228] + +Wed Sep 26 05:12:17 2007 Nobuyoshi Nakada + + * parse.y (parser_yyerror): limit error message length. + [ruby-dev:31848] + +Tue Sep 25 15:11:32 2007 Yukihiro Matsumoto + + * io.c (io_ungetc): reallocate internal buffer if pushing data + excess capacity. [ruby-dev:31650] + +Tue Sep 25 13:43:03 2007 Yukihiro Matsumoto + + * eval_method.ci (remove_method): should not remove undef place + holder. [ruby-dev:31816], [ruby-dev:31817] + +Tue Sep 25 09:51:31 2007 Yukihiro Matsumoto + + * eval.c (rb_longjmp): source file information may be NULL. + [ruby-dev:31849] + + * eval.c (ruby_finalize_0): clear trace_func before finalization. + +Mon Sep 24 22:36:13 2007 Yukihiro Matsumoto + + * array.c (rb_ary_equal): should handle recursive array. + + * hash.c (hash_equal): should handle recursive hash. + +Mon Sep 24 22:14:13 2007 Yukihiro Matsumoto + + * lib/weakref.rb (WeakRef): remove debug print. [ruby-dev:31799] + + * hash.c (hash_i): avoid too frequent hash conflict where key and + value are same. a patch from Yusuke ENDOH . + [ruby-dev:31802] + +Mon Sep 24 17:56:21 2007 Nobuyoshi Nakada + + * ext/strscan/strscan.c (strscan_initialize, strscan_getch): use the + encoding of the target string instead of setting to StringScanner + instance. [ruby-dev:31831] + +Mon Sep 24 16:52:11 2007 Urabe Shyouhei + + * lib/net/http.rb: fix typo. + +Mon Sep 24 06:49:15 2007 GOTOU Yuuzou + + * lib/net/http.rb: an SSL verification (the server hostname should + be matched with its certificate's commonName) is added. + this verification can be skipped by + "Net::HTTP#enable_post_connection_check=(false)". + suggested by Chris Clark + + * lib/net/open-uri.rb: use Net::HTTP#enable_post_connection_check to + perform SSL post connection check. + + * ext/openssl/lib/openssl/ssl.c + (OpenSSL::SSL::SSLSocket#post_connection_check): refine error message. + +Sun Sep 23 09:05:05 2007 Nobuyoshi Nakada + + * gc.c (os_obj_of, os_each_obj): hide objects to be finalized. + [ruby-dev:31810] + +Sun Sep 23 08:58:01 2007 Nobuyoshi Nakada + + * eval_method.ci (rb_attr): should not use alloca for unknown size + input. [ruby-dev:31818] + + * parse.y (rb_intern_str): prevent str from optimization. + +Sun Sep 23 06:16:04 2007 Nobuyoshi Nakada + + * eval_method.ci (remove_method): check for undefined method. + [ruby-dev:31816] + +Sun Sep 23 05:42:35 2007 URABE Shyouhei + + * lib/rdoc/options.rb (Options::check_diagram): dot -V output + changed. [ ruby-Bugs-11978 ], Thanks Florian Frank. + +Sat Sep 22 06:02:11 2007 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::List::summarize): use each_line if + defined rather than each. [ruby-Patches-14096] + +Sat Sep 22 05:19:49 2007 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_init): separate from strio_initialize + to share with strio_reopen properly. [ruby-Bugs-13919] + +Fri Sep 21 14:51:40 2007 Nobuyoshi Nakada + + * gc.c (gc_mark_rest): copy just used part. + + * gc.c (gc_mark_children): mark u1 and u2 of NODE_ARGSCAT. + + * gc.c (os_obj_of): hide T_VALUES too. [ruby-dev:31804] + + * gc.c (run_final): freeze temporary argument array. + +Fri Sep 21 04:58:39 2007 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-label-indent): fix for function top + level labels. + +Fri Sep 21 02:11:22 2007 Yukihiro Matsumoto + + * re.c (rb_reg_match_m): evaluate a block if match. it would make + condition statement much shorter, if no else clause is needed. + + * string.c (rb_str_match_m): ditto. + +Fri Sep 21 02:02:34 2007 Yukihiro Matsumoto + + * hash.c (hash_equal): should call rb_eql when argument eql is set. + +Thu Sep 20 17:28:00 2007 Nobuyoshi Nakada + + * io.c (popen_exec), process.c (rb_spawn): stop other threads before + exec. [ruby-core:08262] + +Tue Sep 18 22:08:42 2007 Keiju Ishitsuka + + * lib/matrix.rb: fix a coerce bug of Vector. [ruby-core: 12190] + +Mon Sep 17 21:06:03 2007 Minero Aoki + + * lib/net/http.rb (HTTP::GenericRequest#initialize): check path is + not nil. [ruby-dev:31149] + +Mon Sep 17 21:00:51 2007 Minero Aoki + + * parse.y (ripper): rename event: arglist_* -> args_*. + + * parse.y (ripper): rename event: restparam -> rest_param. + + * parse.y (ripper): rename event: constpath_* -> const_path_*. + + * parse.y (ripper): rename event: topconst_* -> top_const_*. + + * parse.y (ripper): rename event: iter_block -> method_add_block. + + * parse.y (ripper): support block local parameter declaration. + + * parse.y (ripper): introduce new macro params_new. + + * ext/ripper/lib/ripper/sexp.rb: should not dispose event + arguments whose name ends with "_new" but arity != 0. + +Sat Sep 15 23:36:31 2007 Nobuyoshi Nakada + + * parse.y (struct parser_params): common members in the parser and + ripper must be placed at each same location. + +Sat Sep 15 18:25:15 2007 Kouhei Sutou + + * string.c (rb_str_rstrip_bang): fixed too much rstrip. [ruby-dev:31786] + +Sat Sep 15 17:32:10 2007 Nobuyoshi Nakada + + * parse.y (parser_initialize): set default encoding. [ruby-dev:31787] + + * ruby.c (load_file): make new parse instance after processing shebang + line options. + +Sat Sep 15 17:04:08 2007 Nobuyoshi Nakada + + * encoding.c (rb_enc_associate_index, rb_enc_get_index): check if + object is encoding capable. [ruby-dev:31780] + + * string.c (rb_str_subpat_set): check for if the argument is a String. + +Sat Sep 15 13:31:21 2007 Kouhei Sutou + + * lib/rss.rb, lib/rss/, test/rss/: + - 0.1.9 -> 0.2.0. + - supported Slash module. + +Fri Sep 14 22:20:01 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (fev_unadvise): no needs to reset + event handlers. + +Fri Sep 14 17:28:32 2007 Koichi Sasada + + * test/ruby/test_io.rb: tests which cause SEGV should not be + added. + + * bootstraptest/test_knownbug.rb: add above test to known bug. + +Fri Sep 14 16:24:04 2007 Koichi Sasada + + * insnhelper.ci (vm_expandarray): assignment should be placed + after creating new array. + +Fri Sep 14 16:17:30 2007 Koichi Sasada + + * bootstraptest/runner.rb: add a stress test (-s). + +Fri Sep 14 16:14:28 2007 Koichi Sasada + + * vm.h, eval_intern.h: move some macros to eval_intern.h. + + * eval_jump.ci (rb_f_throw): fix to use NEW_THROW_OBJECT(). + + * eval.c (rb_f_loop): remove additional macro. + +Fri Sep 14 16:12:10 2007 Koichi Sasada + + * insnhelper.ci (vm_expandarray): should be volatile value for GC. + +Thu Sep 13 15:42:03 2007 Nobuyoshi Nakada + + * compile.c (iseq_compile_each): inline cache entries are overwritten + in iseq_build_body(). + +Thu Sep 13 14:00:15 2007 Nobuyoshi Nakada + + * parse.y (brace_block): should use compstmt. patch submitted by + Kirill A. Shutemov [ruby-core:12154]. + +Thu Sep 13 13:47:08 2007 Nobuyoshi Nakada + + * parse.y (rb_id2str): fixed typo. + +Wed Sep 12 23:12:22 2007 Yukihiro Matsumoto + + * ruby.c (proc_options): -W should be allowed in RUBYOPT + environment variable. [ruby-core:12118] + +Wed Sep 12 15:19:04 2007 Nobuyoshi Nakada + + * io.c (rb_io_s_sysopen): should not use alloca for unknown size + input. [ruby-dev:31775] + + * parse.y (rb_id2str): ditto. + + * marshal.c (w_float): use snprintf instead of sprintf. + +Tue Sep 11 17:28:00 2007 Akinori MUSHA + + * lib/tempfile.rb (Tempfile::make_tmpname): Allow to specify a + suffix for a temporary file name. + + * lib/tempfile.rb (Tempfile::make_tmpname): Make temporary file + names less predictable by including a random string. + [inspired by: akr] + +Tue Sep 11 17:25:59 2007 Akinori MUSHA + + * lib/shellwords.rb: Add shellescape() and shelljoin(). + + * lib/shellwords.rb: Rename shellwords() to shellsplit() and make + the former an alias to the latter. + + * lib/shellwords.rb: Add escape(), split(), join() as class + methods, which are aliases to their respective long names + prefixed with `shell'. + + * lib/shellwords.rb: Add String#shellescape(), String#shellsplit() + and Array#shelljoin() for convenience. + +Mon Sep 10 15:48:31 2007 Tanaka Akira + + * range.c: represent initialized state using EXCL instead of FL_USER3. + + * range.c (range_dumper): make uninitialized range dumpable. + (range_loader): make uninitialized range loadable. + +Mon Sep 10 13:44:37 2007 Yukihiro Matsumoto + + * array.c (rb_ary_cycle): avoid infinite loop for empty array. + based on a patch from David Flanagan. [ruby-core:12085] + +Mon Sep 10 01:21:23 2007 Yukihiro Matsumoto + + * marshal.c (r_object0): struct allocation first to check if a + class is a struct. compatibility check should come next. + +Mon Sep 10 01:05:25 2007 Yukihiro Matsumoto + + * range.c (range_step): fixed integer overflow. [ruby-dev:31763] + +Sun Sep 9 08:57:27 2007 Tadayoshi Funaba + + * lib/date/format.rb (_strptime): now also attaches an element + which denotes leftover substring if exists. + +Sun Sep 9 01:59:08 2007 Tanaka Akira + + * marshal.c (r_object0): check T_STRUCT type for structs. + +Sun Sep 9 01:17:05 2007 Tanaka Akira + + * marshal.c (r_object0): don't call user-defined initialize for + T_STRUCT objects. + + * include/ruby/intern.h (rb_struct_initialize): declared. + + * struct.c (rb_struct_initialize): export. + +Sat Sep 8 23:55:56 2007 Tanaka Akira + + * eval_method.ci (rb_get_alloc_func): new function to get allocation + function. + + * include/ruby/intern.h (rb_alloc_func_t): declared. + (rb_define_alloc_func): declared. + (rb_marshal_define_compat): declared. + + * range.c: use T_STRUCT for Range. + + * inits.c: move Init_marshal() prior to Init_Range() because + Init_Range calls rb_marshal_define_compat which needs + marshal's compat_allocator_tbl initialized. + + * marshal.c: support marshal format compatibility layer designed for + marshaling T_STRUCT Range using T_OBJECT format. + (rb_marshal_define_compat): defined. + + [ruby-dev:31710] + +Sat Sep 8 10:05:14 2007 Yukihiro Matsumoto + + * struct.c (rb_struct_s_members): check if __members__ is an + array to prevent segmentation fault. [ruby-dev:31759] + +Sat Sep 8 09:33:09 2007 Tadayoshi Funaba + + * lib/date/format.rb (str[fp]time): now check specifications more + strictly. + +Sat Sep 8 02:56:31 2007 Yukihiro Matsumoto + + * test/ruby/test_fiber.rb (TestFiber::test_throw): uncaught throw + now raise ArgumentError exception. + +Sat Sep 8 02:45:33 2007 Yukihiro Matsumoto + + * struct.c (rb_struct_s_members): should raise TypeError instead + of call rb_bug(). [ruby-dev:31709] + + * marshal.c (r_object0): no nil check require any more. + +Sat Sep 8 01:46:36 2007 NAKAMURA Usaku + + * regenc.c, regenc.h (onigenc_single_byte_mbc_enc_len): should take + two arguments. [ruby-dev:31754] + +Fri Sep 7 00:58:16 2007 Koichi Sasada + + * common.mk: fix typo. + +Fri Sep 7 00:28:25 2007 Yukihiro Matsumoto + + * io.c (rb_io_getc): forgot to commit rb_enc_mbclen() fix. + + * ext/stringio/stringio.c (strio_getc): rb_enc_mbclen() fix. + + * ext/stringio/stringio.c (strio_ungetc): ditto. + +Thu Sep 6 22:57:01 2007 Yukihiro Matsumoto + + * lib/fileutils.rb (FileUtils::Entry_::copy): prevent self copy of + directories. + + * lib/fileutils.rb (FileUtils::fu_each_src_dest0): use try_convert. + + * lib/fileutils.rb (FileUtils::fu_update_option): ditto. + +Thu Sep 6 21:36:33 2007 Yukihiro Matsumoto + + * include/ruby/oniguruma.h (OnigEncodingTypeST): add end parameter + to mbc_enc_len. + + * euc_jp.c (mbc_enc_len), sjis.c (mbc_enc_len), + utf8.c (utf8_mbc_enc_len): ditto. + + * encoding.c (rb_enc_mbclen): add end parameter. + +Thu Sep 6 21:31:49 2007 Yukihiro Matsumoto + + * array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui + . [ruby-dev:31748] + +Thu Sep 6 12:42:10 2007 Nobuyoshi Nakada + + * string.c (rb_str_succ, rb_str_chop_bang, rb_str_chop): m17n support. + [ruby-dev:31734] + +Wed Sep 5 22:02:27 2007 Yukihiro Matsumoto + + * array.c (rb_ary_subseq): need integer overflow check. + [ruby-dev:31736] + + * array.c (rb_ary_splice): ditto. [ruby-dev:31737] + + * array.c (rb_ary_fill): ditto. [ruby-dev:31738] + + * string.c (rb_str_splice): integer overflow for length. + [ruby-dev:31739] + +Tue Sep 4 20:43:44 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_EVENT#unadvise. + + * test/win32ole/test_win32ole_event.rb: ditto. + +Mon Sep 3 15:37:09 2007 Nobuyoshi Nakada + + * common.mk (vm.o): depends on st.h too. + +Sun Sep 2 23:38:29 2007 Tanaka Akira + + * include/ruby/st.h (struct st_table): make num_entries bitfield + instead of num_bins for speed. num_entries has less access. + +Sun Sep 2 00:37:57 2007 Tadayoshi Funaba + + * lib/date/format.rb (_parse): improved parsing of ordinal dates. + + * lib/date/format.rb (_parse): use named character classes in some + regular expressions. + +Sat Sep 1 23:44:26 2007 Yukihiro Matsumoto + + * eval_jump.ci (rb_f_throw): wrap tag and TAG_THROW in a NODE_MEMO + node to make throw instruction to work well. + +Sat Sep 1 20:56:07 2007 Tanaka Akira + + * include/ruby/ruby.h (struct RBignum): embed digits in RBignum for + small bignums. + + * bignum.c: RBignum embedded digits implemented. + + * include/ruby/intern.h: declare rb_big_resize. + + * gc.c: don't free embedded digits. + + * numeric.c: replace direct bignum field accessor by abstract field + accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val). + + * sprintf.c: ditto. + + * compar.c: ditto. + + * marshal.c: ditto. + + * random.c: ditto. + + * .gdbinit: support embedded small bignums. + + [ruby-dev:31689] + +Sat Sep 1 19:59:43 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_event_free): IConnectionPoint should be + released. + + * ext/win32ole/win32ole.c (EVENTSINK_Destructor): ITypeInfo should be + released. + + * ext/win32ole/win32ole.c (fev_initialize): refactoring. + +Sat Sep 1 16:26:09 2007 NAKAMURA Usaku + + * test/socket/test_tcp.rb (test_recvfrom): same as mswin32 on mswin64. + +Sat Sep 1 14:24:23 2007 Nobuyoshi Nakada + + * st.c (st_numcmp, st_numhash): use st_data_t instead of long, because + the former may be larger than the latter. + + * include/ruby/st.h (CHAR_BIT): get rid of magic number. + + * include/ruby/st.h (rb_index_t): use st_data_t for the platforms it + is larger than int. + +Sat Sep 1 10:43:30 2007 Yukihiro Matsumoto + + * eval_jump.ci (rb_f_catch): generate new tag object if no argument is + given. backported from MatzRuby. [ruby-dev:31609] + + * eval_jump.ci (rb_catch): call #catch without arguments if tag + string is NULL. + + * eval_jump.ci (rb_f_throw): allow throwing non-symbol object. + + * eval_jump.ci (rb_catch_obj): new function to wait throw with arbitrary + object. + + * eval_jump.ci (rb_throw_obj): new function to throw arbitrary object. + + * variable.c (check_autoload_table): prevent multiple calls from + RSTRING_PTR(). + +Fri Aug 31 07:12:24 2007 NAKAMURA Usaku + + * numeric.c (SQRT_LONG_MAX): use SIZEOF_LONG instead of SIZEOF_VALUE + because SIZEOF_VALUE > SIZEOF_LONG on some platforms. + +Fri Aug 31 04:18:03 2007 Nobuyoshi Nakada + + * parse.y (f_norm_arg, f_arg_item): not croak already erred names. + [ruby-dev:31687] + + * parse.y (assignable_gen): ignore already erred names. + + * parse.y (shadowing_lvar_gen): always make new block local variable + when shadowing outer local variable. [ruby-dev:31507] + +Thu Aug 30 19:40:33 2007 NAKAMURA Usaku + + * regenc.h: check RUBY_EXTERN before including config.h and defines.h + + * common.mk: update header dependency. + +Thu Aug 30 14:06:50 2007 Nobuyoshi Nakada + + * proc.c (rb_obj_define_method): reverted. [ruby-talk:266637] + +Thu Aug 30 13:49:25 2007 Nobuyoshi Nakada + + * lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682] + + * lib/mkmf.rb (try_const, have_const): check for a const is defined. + [ruby-core:04422] + +Thu Aug 30 08:00:12 2007 Tanaka Akira + + * include/ruby/intern.h: declare rb_hash_tbl. + + * include/ruby/ruby.h (RHash): delay st_table allocation. + rename tbl field to ntbl to detect direct reference to the st_table + as a compile error. + (RHASH_TBL): abstract accessor defined. + (RHASH_ITER_LEV): ditto. + (RHASH_IFNONE): ditto. + (RHASH_SIZE): ditto. + (RHASH_EMPTY_P): ditto. + (hash_alloc0, hash_alloc): unified because hash_alloc doesn't + allocate st_table now. + + * hash.c: delay st_table allocation. + + * gc.c: replace tbl by ntbl. + + * array.c: replace direct field accessor by abstract field accessor + such as RHASH(hash)->tbl to RHASH_TBL(hash). + + * marshal.c: ditto. + + * insns.def: ditto. + + * ext/iconv/iconv.c: ditto. + + * ext/json/ext/generator/generator.c: ditto. + + * ext/json/ext/parser/parser.c: ditto. + + * ext/json/ext/parser/parser.rl: ditto. + + * ext/syck/rubyext.c: ditto. + + * ext/tk/tkutil/tkutil.c: ditto. + + [ruby-dev:31678] + +Wed Aug 29 18:36:06 2007 Tanaka Akira + + * lib/open-uri.rb: add :ftp_active_mode option. [ruby-dev:31677] + +Wed Aug 29 14:55:28 2007 Yukihiro Matsumoto + + * string.c (str_gsub): should not use mbclen2() which has broken API. + + * re.c: remove rb_reg_mbclen2(). + +Wed Aug 29 12:48:17 2007 Nobuyoshi Nakada + + * parse.y (aref_args): args may not be a list. [ruby-dev:31592] + +Wed Aug 29 11:30:10 2007 Tanaka Akira + + * include/ruby/st.h (struct st_table): add entries_packed 1-bit + bitfield. decrease num_bins 1-bit. + + * st.c: pack numhash which have 5 or less entries in bins. + (st_init_table_with_size): setup entries_packed flag. + (st_clear): support packed mode. + (st_lookup): ditto. + (st_insert): ditto. + (st_add_direct): ditto. + (st_copy): ditto. + (st_delete): ditto. + (st_foreach): ditto. + (st_reverse_foreach): ditto. + (unpack_entries): new function for converting to unpacked mode. + + [ruby-list:43954] + +Wed Aug 29 10:46:37 2007 Yukihiro Matsumoto + + * include/ruby/defines.h (flush_register_windows): call "ta 0x03" + even on Linux/Sparc. [ruby-dev:31674] + +Tue Aug 28 19:16:00 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_type_progid): progid getted by + ProgIDFromCLSID should be freed by CoTaskMemFree. Thanks, arton. + + * test/win32ole/test_win32ole.rb (test_raise_message): set negative + compareMode value to raise WIN32OLERuntimeError. + + * test/win32ole/test_win32ole_type.rb (test_implemented_ole_types): + support some environment which returns IShellDispatch5 instead + of IShellDispatch. + +Tue Aug 28 15:42:09 2007 Yukihiro Matsumoto + + * string.c (rb_str_subseq): retrieve substring based on byte offset. + + * string.c (rb_str_rindex_m): was confusing character offset and + byte offset. + +Tue Aug 28 14:23:31 2007 Nobuyoshi Nakada + + * string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665] + +Tue Aug 28 14:21:46 2007 Nobuyoshi Nakada + + * parse.y (parser_prepare): set parser encode too when BOM exists. + +Tue Aug 28 00:51:22 2007 Koichi Sasada + + * thread.c: fix Mutex to be interruptable lock. + + * thread_win32.ci, thread_win32.h, thread_pthread.ci, thread_pthread.h: + prepare native_cond_*() which are based on pthread_cond_*() spec. + + * prelude.rb: fix Mutex#synchronize method. + + * vm_core.h, include/ruby/intern.h: change unblock function interface + (to pass some user data). + + * file.c, process.c: ditto. + + * benchmark/bm_vm2_mutex.rb: add a benchmark for mutex. + + * benchmark/bm_vm3_thread_mutex.rb: add a benchmark for mutex + with contention. + + * benchmark/run.rb: fix to remove ENV['RUBYLIB'] for matzruby. + + * test/ruby/test_thread.rb: add a test. + + * common.mk: fix benchmark options. + +Mon Aug 27 23:14:02 2007 Yukihiro Matsumoto + + * string.c (rb_str_rstrip_bang): wrong strip point. [ruby-dev:31652] + + * string.c (rb_str_each_line): should swallow sequence of newlines + if rs (optional argument) is an empty string. [ruby-dev:31652] + +Mon Aug 27 22:39:08 2007 Yukihiro Matsumoto + + * encoding.c (rb_enc_codelen): raises invalid sequence exception + if ONIGENC_CODE_TO_MBCLEN() returns zero. [ruby-dev:31661] + + * encoding.c (rb_enc_mbclen): check invalid sequence. + +Mon Aug 27 20:27:59 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_type_progid): fix the bug. + [ruby-dev:31576] + + * test/win32ole/test_win32ole_type.rb (test_initialize): + remove duplicate assertions. + +Mon Aug 27 19:10:50 2007 Yukihiro Matsumoto + + * ext/etc/etc.c (etc_getlogin): update documentation to note + security issue. [ruby-Bugs-11821] + +Mon Aug 27 15:56:48 2007 Nobuyoshi Nakada + + * string.c (sym_encoding): return the encoding of a Symbol. + +Mon Aug 27 15:33:10 2007 Nobuyoshi Nakada + + * util.c (IEEE_BIG_ENDIAN): use configured value. [ruby-dev:31623] + + * util.c (Llong): set to LONG_LONG if available. + +Mon Aug 27 13:11:56 2007 Yukihiro Matsumoto + + * string.c (tr_trans): wrong condition for mbmaxlen==1 strings. + [ruby-dev:31652] + +Mon Aug 27 00:41:13 2007 Yukihiro Matsumoto + + * io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652] + + * io.c (rb_io_getc): should return nil at EOF, not EOFError. + + * lib/delegate.rb (SimpleDelegator::__setobj__): use raise + argument to specify backtrace. + + * test/ruby/test_fnmatch.rb (TestFnmatch::bracket_test): + String#include? no longer works for Fixnum. use #chr. + [ruby-dev:31652] + +Sun Aug 26 12:27:14 2007 Koichi Sasada + + * cont.c: fix to remove Fiber.new until fiber.so is not loaded. + + * test/ruby/test_continuation.rb: fix to use resume. + +Sun Aug 26 06:51:46 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_wc2mb, reg_enum_key): allocate + buffer should be NULL terminated. + +Sun Aug 26 06:04:13 2007 Koichi Sasada + + * insnhelper.ci (vm_setup_method): reorder code for branch prediction. + +Sun Aug 26 05:54:49 2007 Koichi Sasada + + * insnhelper.ci (vm_call_method): fix to relaxant safe level check + ($SAFE > 2). [ruby-core:11998] + + * bootstraptest/test_method.rb: add tests for above. + +Sun Aug 26 05:52:08 2007 Koichi Sasada + + * test/ruby/test_fiber.rb: fix to require 'continuation'. + +Sat Aug 25 23:52:14 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_next): message changed. + +Sat Aug 25 23:22:14 2007 Yukihiro Matsumoto + + * include/ruby/encoding.h: remove unused rb_enc_ismbchar(). + +Sat Aug 25 22:50:14 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_event_free, EVENTSINK_Destructor, + fev_initialize): remove the connection ole_event_free and + EVENTSINK_Destructor. + +Sat Aug 25 17:52:06 2007 Koichi Sasada + + * string.c, include/ruby/intern.h: export rb_str_length(). + + * insns.def: use rb_str_length() in opt_length. + +Sat Aug 25 17:48:51 2007 Koichi Sasada + + * cont.c: rename FIBER_STACK_SIZE to FIBER_VM_STACK_SIZE. + +Sat Aug 25 17:05:05 2007 Nobuyoshi Nakada + + * io.c (swallow): removed condition using an unset variable. + + * parse.y, re.c: re-applied revision 13092. + + * string.c (rb_str_splice): return from void function. + + * include/ruby/encoding.h (rb_enc_str_new): prototype added. + +Sat Aug 25 11:45:37 2007 Yukihiro Matsumoto + + * encoding.c: provide basic features for M17N. + + * parse.y: encoding aware parsing. + + * parse.y (pragma_encoding): encoding specification pragma. + + * parse.y (rb_intern3): encoding specified symbols. + + * string.c (rb_str_length): length based on characters. + for older behavior, bytesize method added. + + * string.c (rb_str_index_m): index based on characters. rindex as + well. + + * string.c (succ_char): encoding aware succeeding string. + + * string.c (rb_str_reverse): reverse based on characters. + + * string.c (rb_str_inspect): encoding aware string description. + + * string.c (rb_str_upcase_bang): encoding aware case conversion. + downcase, capitalize, swapcase as well. + + * string.c (rb_str_tr_bang): tr based on characters. delete, + squeeze, tr_s, count as well. + + * string.c (rb_str_split_m): split based on characters. + + * string.c (rb_str_each_line): encoding aware each_line. + + * string.c (rb_str_each_char): added. iteration based on + characters. + + * string.c (rb_str_strip_bang): encoding aware whitespace + stripping. lstrip, rstrip as well. + + * string.c (rb_str_justify): encoding aware justifying (ljust, + rjust, center). + + * string.c (str_encoding): get encoding attribute from a string. + + * re.c (rb_reg_initialize): encoding aware regular expression + + * sprintf.c (rb_str_format): formatting (i.e. length count) based + on characters. + + * io.c (rb_io_getc): getc to return one-character string. + for older behavior, getbyte method added. + + * ext/stringio/stringio.c (strio_getc): ditto. + + * io.c (rb_io_ungetc): allow pushing arbitrary string at the + current reading point. + + * ext/stringio/stringio.c (strio_ungetc): ditto. + + * ext/strscan/strscan.c: encoding support. + +Sat Aug 25 10:59:19 2007 Koichi Sasada + + * cont.c: separate Continuation and Fiber from core. + + * ext/continuation/*, ext/fiber/*: ditto. + + * include/ruby/ruby.h: remove rb_cFiber. + + * include/ruby/intern.h: add the rb_fiber_new() declaration. + + * enumerator.c (next_init): fix to use rb_fiber_new(). + + * test/ruby/test_enumerator.rb: remove next? tests. + + * test/ruby/test_continuation.rb: add a require 'continuation'. + + * test/ruby/test_fiber.rb: add a require 'fiber'. + +Sat Aug 25 10:20:28 2007 Nobuyoshi Nakada + + * common.mk (prelude.o): depends on vm_core.h now. + + * common.mk (prelude.c): depends on tool/compile_prelude.rb too. + + * common.mk (prereq): updates all auto-generated sources. + + * tool/compile_prelude.rb: separated dynamic and static portions. + +Sat Aug 25 10:05:17 2007 Koichi Sasada + + * prelude.rb: add Thread.exclusive. This class method + is different from 1.8's. Thread.exclusive only does + synchronize with VM global mutex. + +Sat Aug 25 09:39:50 2007 Yukihiro Matsumoto + + * array.c (rb_ary_s_try_convert): more document description. + + * re.c (rb_reg_s_try_convert): typo fixed. + +Sat Aug 25 08:54:12 2007 Koichi Sasada + + * id.h, id.c: remove idFuncall. + + * compile.c (iseq_specialized_instruction): ditto. + +Sat Aug 25 08:47:28 2007 Koichi Sasada + + * tool/compile_prelude.rb: fix to include "vm_core.h". + +Sat Aug 25 03:49:14 2007 Tanaka Akira + + * test/ruby/sentence.rb (Sentence): include Enumerable. + (Sentence#each): defined. + + * test/ruby/test_assignment.rb: use Sentence#expand. + +Sat Aug 25 03:08:57 2007 Koichi Sasada + + * prelude.rb: fix Mutex#synchronize definition. + +Sat Aug 25 02:08:45 2007 Yukihiro Matsumoto + + * array.c (rb_ary_s_try_convert): a new class method to convert + object or nil if it's not target-type. this mechanism is used + to convert types in the C implemented methods. + + * hash.c (rb_hash_s_try_convert): ditto. + + * io.c (rb_io_s_try_convert): ditto. + + * re.c (rb_reg_s_try_convert): ditto. + + * string.c (rb_str_s_try_convert): ditto. + +Sat Aug 25 00:49:44 2007 Koichi Sasada + + * benchmark/bm_loop_generator.rb: added. + +Sat Aug 25 00:22:31 2007 Koichi Sasada + + * prelude.rb: added. run this script on startup. + + * tool/compile_prelude.rb: compile prelude.rb to C string. + (prelude.rb -> prelude.c) + + * common.mk: fix to build with prelude.c. + + * inits.c (rb_call_inits): ditto. + + * thread.c (Init_Thread): move definition of Mutex#synchronize + to prelude.rb. + +Sat Aug 25 00:08:43 2007 Koichi Sasada + + * compile.c (compile_massign_opt): fix to skip massign optimization + with global variables. + + * bootstraptest/test_massign.rb: add some tests for above. + +Fri Aug 24 18:42:03 2007 Yukihiro Matsumoto + + * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string. + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize): + initialize @workdir to stop warning. + +Fri Aug 24 18:30:50 2007 Yukihiro Matsumoto + + * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): + replace funcall by send!. other files in the distribution as well. + +Fri Aug 24 17:06:56 2007 Yukihiro Matsumoto + + * eval.c (rb_f_send_bang): abandon the name funcall for private + aware method call. + +Fri Aug 24 15:27:12 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_next): stop pre-fetching. + + * enumerator.c (Init_Enumerator): remove next? method. + +Fri Aug 24 15:14:57 2007 Yukihiro Matsumoto + + * eval.c (rb_f_loop): now handles StopIteration exception. + +Thu Aug 23 20:31:31 2007 Koichi Sasada + + * compile.c: optimize simple massign. + +Thu Aug 23 20:02:25 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx instead + of RegQueryValueEx. + + * ext/win32ole/win32ole.c (typelib_file_from_clsid): fix the bug + that the function always returns Qnil. + + * test/win32ole/test_win32ole_type.rb (test_initialize): add some test. + +Thu Aug 23 17:25:05 2007 Nobuyoshi Nakada + + * configure.in (group_member): check if presents. + + * configure.in (XCFLAGS): add _GNU_SOURCE on linux. + + * file.c (group_member): use system routine if available. + + * process.c: moved _GNU_SOURCE macro to Makefile. + +Thu Aug 23 16:59:40 2007 Nobuyoshi Nakada + + * compile.c (compile_massign), insnhelper.ci (vm_throw): not use C99 + comment. + + * cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield): + suppress warnings. + + * cont.c (rb_fiber_start): change on non-volatile variable between + setjmp and longjmp may not has an effect. + + * enumerator.c (sym_call): initialize first. + + * enumerator.c (enum_iter): typedefed. + + * enumerator.c (next_i): suppress a warning. + +Thu Aug 23 16:04:11 2007 Koichi Sasada + + * compile.c, insns.def, parse.y: fix massign order. This change + causes performance problem. Try vm1_swap benchmark. + [ruby-dev:31522] + + * insns.def, insnhelper.ci: move process body of expandarray insn to + vm_expandarray(). + + * bootstraptest/test_knownbug.rb, bootstraptest/test_massign.rb: + move a solved test. + +Thu Aug 23 15:51:19 2007 Nobuyoshi Nakada + + * parse.y (f_norm_arg): ripper has no shadowing check. + + * parse.y (f_block_arg): dispatch blkarg_mark. + +Thu Aug 23 15:48:26 2007 Nobuyoshi Nakada + + * compile.c (make_masgn_lhs, iseq_compile_each): fixed indent. + + * compile.c (iseq_translate_threaded_code), + vm_evalbody.ci (get_insns_address_table), + template/vmtc.inc.tmpl (insns_address_table): constified. + + * vm_evalbody.ci (vm_eval), + template/insns_info.inc.tmpl (insn_stack_increase, insn_ret_num): + suppress warnings. + +Thu Aug 23 13:19:43 2007 Nobuyoshi Nakada + + * parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502] + +Thu Aug 23 00:06:48 2007 Yukihiro Matsumoto + + * util.c: updated for ANSI C only. applied a patch from + . [ruby-dev:31591] + +Thu Aug 23 00:04:45 2007 Yukihiro Matsumoto + + * missing/strtod.c: removed. [ruby-dev:31588] + + * LEGAL: updated. + +Wed Aug 22 15:59:44 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: + fix typo of filename (test_knownbug.rb). + +Wed Aug 22 14:04:53 2007 Koichi Sasada + + * bootstraptest/test_knownbug.rb: added. This file will contain + test cases which point out known bug. If bug is fixed, tests + should move to the suitable place. + + * bootstraptest/test_massign.rb: move a test which show known bug + to test_knownbug.rb. + +Wed Aug 22 13:02:26 2007 Tanaka Akira + + * bootstraptest/runner.rb (in_temporary_working_directory): + don't remove the directory specified by --dir. + +Wed Aug 22 05:51:23 2007 Yukihiro Matsumoto + + * util.c (ruby_strtod): replaced by the implementation by David + M. Gay inspired by William D. Clinger's paper "How to Read Floating + Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. + a patch from Satoshi Nakagawa . + [ruby-dev:31582] + + * test/ruby/test_float.rb (TestFloat::test_float): add test for + precision. + +Wed Aug 22 03:51:07 2007 Koichi Sasada + + * cont.c: add Fiber#resume and Fiber.yield. + and Fiber::Core class to realize Coroutine. + + * include/ruby/intern.h: declare rb_fiber_yield(), rb_fiber_resume(). + + * enumerator.c: use above api. + + * test/ruby/test_fiber.rb: fix and add tests for above changes. + +Tue Aug 21 21:09:48 2007 Tanaka Akira + + * lib/tmpdir.rb (Dir.mktmpdir): make directory suffix specifiable. + suggested by knu. [ruby-dev:31568] + +Tue Aug 21 15:00:23 2007 Koichi Sasada + + * st.c (st_clear): reset num_entries too. + +Tue Aug 21 13:57:04 2007 Nobuyoshi Nakada + + * hash.c (st_foreach_func, rb_foreach_func): typedefed. + + * hash.c (rb_hash_clear): use st_clear() unless iterating. + + * st.c (struct st_table_entry): add new members, fore and back, to + iterate in inserted order. + + * include/ruby/st.h (struct st_table): ditto. + +Tue Aug 21 04:09:06 2007 Koichi Sasada + + * benchmark/bm_vm2_case.rb: add a new benchmark. + YARV optimize case/when syntax. If every conditions + are literal (such as Symbol, Fixnum, String), dispatch + calc order will be O(1). + +Tue Aug 21 04:08:07 2007 Koichi Sasada + + * test/ruby/test_enumerator.rb: fix last commit. + +Tue Aug 21 03:59:32 2007 Koichi Sasada + + * test_enumerator.rb (enum_test): fix to return sorted + array (for Hash test). + +Tue Aug 21 03:55:20 2007 Koichi Sasada + + * enumerator.c (next_i): fix to return with Fiber#yield at + the end of each block. [ruby-dev:31470] + + * enumerator.c (enumerator_next_p): call init_next if not + initialized. [ruby-dev:31514] + + * test/ruby/test_enumerator.rb: add tests for Enumerator. + +Mon Aug 20 23:28:39 2007 Yukihiro Matsumoto + + * string.c (Init_String): remove Symbol.intern and Symbol#dump. + [ruby-dev:31525] + + * dir.c (dir_foreach): return Enumerator if no block given. + [ruby-dev:31525] + + * io.c (rb_io_s_foreach): argument count check before making + Enumerator. [ruby-dev:31525] + +Mon Aug 20 23:17:14 2007 Nobuyoshi Nakada + + * vm_core.h (struct rb_thread_struct): removed first_func_arg and + reuse first_args instead. + +Sun Aug 19 13:31:40 2007 Tanaka Akira + + * gc.c: use VALGRIND_MAKE_MEM_UNDEFINED to detect use of collected + objects if valgrind is available. It cannot detect first 2 words + because they are used as the free list. + +Sun Aug 19 13:13:52 2007 Koichi Sasada + + * compile.c (iseq_compile_each/NODE_RESBODY): fix to add + additional nop to prevent tailcall optimization. + + * vm_opts.h: clean up comments. + +Sun Aug 19 12:58:39 2007 Koichi Sasada + + * insnhelper.ci (vm_call_bmethod): fix to propagate information + that this proc is "from Method". [ruby-dev:31490] + + * proc.c (method_proc, rb_mod_define_method): ditto. + + * vm.c (vm_invoke_proc_core): removed. + + * vm_core.h: ditto. + +Sun Aug 19 12:36:11 2007 Tanaka Akira + + * test/ruby/sentence.rb: new method Sentence(). + +Sun Aug 19 12:32:39 2007 Koichi Sasada + + * insnhelper.ci (vm_callee_setup_arg): fix to mark enough VM stack. + [ruby-dev:31492] + +Sat Aug 18 19:02:34 2007 Tanaka Akira + + * test/ruby/test_yield.rb (TestYieldGen): relax array size check + in nested parameters. + [ruby-dev:31485] + +Sat Aug 18 17:44:42 2007 Nobuyoshi Nakada + + * ext/tk/tcltklib.c (Init_tcltklib): use rb_set_end_proc(). + +Sat Aug 18 17:40:11 2007 Nobuyoshi Nakada + + * thread.c (is_ruby_native_thread): check properly. [ruby-dev:31166] + +Sat Aug 18 16:44:15 2007 Koichi Sasada + + * insnhelper.ci (vm_call_bmethod), + vm.c (vm_invoke_proc_core): fix to do not restore + $SAFE when proc invoked by bmethod. + + * vm_core.h: ditto. + +Sat Aug 18 16:44:49 2007 Nobuyoshi Nakada + + * eval_error.ci (ruby_error_print): call error_print. + + * eval_jump.ci, process.c (rb_exit, rb_f_exit, rb_f_abort): moved. + +Sat Aug 18 15:59:52 2007 Nobuyoshi Nakada + + * process.c (detach_process_watcher): should not pass the pointer + to an auto variable to the thread to be created. pointed and + fix by KUBO Takehiro [ruby-dev:30618] + +Sat Aug 18 15:52:50 2007 Nobuyoshi Nakada + + * insnhelper.ci (vm_send_optimize): use MEMMOVE to shift values inside + an array. + +Sat Aug 18 15:45:34 2007 Nobuyoshi Nakada + + * insnhelper.ci (vm_yield_setup_args): rsize and psize should not be + negative. + +Sat Aug 18 14:35:00 2007 Nobuyoshi Nakada + + * insnhelper.ci (vm_callee_setup_arg, vm_send_optimize, + vm_yield_setup_args): bulk copy for arguments. + +Sat Aug 18 13:55:58 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix to allow self.x= + if x= is private. + + * bootstraptest/test_method.rb: add a test for above. + +Sat Aug 18 14:05:34 2007 Nobuyoshi Nakada + + * parse.y (reg_compile_gen): obtain error info from errinfo. + + * re.c (rb_reg_error_desc): make RegexpError for initialization error. + + * re.c (rb_reg_compile): return nil and set errinfo if error. + +Sat Aug 18 13:23:01 2007 Koichi Sasada + + * eval.c: $! should not be writable. + + * eval.c (rb_rubylevel_errinfo): added. rb_errinfo() returns + rb_thread_t#errinfo. rb_rubylevel_errinfo() returns $! value. + +Sat Aug 18 13:14:40 2007 Koichi Sasada + + * insnhelper.ci (vm_callee_setup_arg): fix to check arguments + correctly. [ruby-dev:31472] + +Sat Aug 18 13:13:06 2007 Koichi Sasada + + * bootstraptest/test_exception.rb: add escape character ("\") for + editors. + +Sat Aug 18 12:42:50 2007 Tanaka Akira + + * test/ruby/test_yield.rb (TestYieldGen): add test for yielding to + lambda using lambda parameter passing emulator. + +Sat Aug 18 12:24:30 2007 Nobuyoshi Nakada + + * sample/test.rb, test/ruby/test_system.rb(valid_syntax?): keep + comment lines first. + +Sat Aug 18 11:44:59 2007 Koichi Sasada + + * compile.c (iseq_set_arguments), insnhelper.ci + (vm_callee_setup_arg, vm_yield_setup_args): + fix to cause raise on "lambda{|a|}.call(1, 2)". + [ruby-dev:31464] + + * bootstraptest/test_block.rb: add tests for above. + +Sat Aug 18 01:12:01 2007 Nobuyoshi Nakada + + * eval.c (frame_func_id): return proper method ID. + +Fri Aug 17 22:43:11 2007 Koichi Sasada + + * compile.c (iseq_compile_each): massign should return rvalue(s). + +Fri Aug 17 22:10:19 2007 Koichi Sasada + + * test/ruby/test_basicinstructions.rb: fix old tests. + class variables should be inherited. + +Fri Aug 17 21:20:44 2007 Koichi Sasada + + * eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias), + insnhelper.ci (vm_call_method): fix to save safelevel for + method node. + + * include/ruby/node.h: ditto. + + * bootstraptest/test_method.rb: add a test for above. + +Fri Aug 17 16:02:50 2007 Koichi Sasada + + * thread.c (rb_thread_terminate_all): fix to ignore + exceptions. + + * thread.c (thread_start_func_2): fix + abort_on_exception process. [ruby-dev:31394] + +Fri Aug 17 14:38:36 2007 Tanaka Akira + + * bootstraptest/runner.rb (in_temporary_working_directory): use + Dir.mktmpdir to create and remove temporary directory. + (Dir.mktmpdir): define if not available. + [ruby-dev:31431] + +Fri Aug 17 03:07:37 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix throw insn option of next. + +Fri Aug 17 01:25:23 2007 Koichi Sasada + + * compile.c (iseq_set_arguments), insnhelper.ci + (vm_callee_setup_arg, vm_yield_setup_args): fix + block parameter problems. [ruby-dev:31437], [ruby-dev:31440] + + * bootstraptest/test_block.rb: add a test of [ruby-dev:31440]. + +Fri Aug 17 01:24:12 2007 Koichi Sasada + + * iseq.c (ruby_iseq_disasm): fix to show arg_simple value. + +Fri Aug 17 01:21:29 2007 Koichi Sasada + + * insns.def (throw): insert a RUBY_VM_CHECK_INTS(). [ruby-dev:31361] + +Thu Aug 16 20:40:50 2007 Yukihiro Matsumoto + + * bignum.c (bigtrunc): RBIGNUM(x)->len may be zero. out of bound + access. [ruby-dev:31404] + + * sprintf.c (rb_str_format): small float should not call + rb_dbl2big(). + +Thu Aug 16 22:10:06 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix next/redo stack consistency. + [ruby-dev:31373] + + * bootstraptest/test_syntax.rb: add tests for above. + + * sample/test.rb: fix to use __FILE__ instead of $0 to know basedir. + +Thu Aug 16 21:14:06 2007 WATANABE Hirofumi + + * configure.in (BASERUBY): need AC_SUBST. [ruby-dev:31438] + +Thu Aug 16 19:18:26 2007 Tanaka Akira + + * test/ruby/sentence.rb: Sentence class implemented + based on sentgen.rb + + * test/ruby/sentgen.rb: removed. + + * test/ruby/test_assignment.rb: use sentence.rb. + + * test/ruby/test_yield.rb: block parameter passing emulator + implemented. + +Thu Aug 16 16:48:47 2007 Nobuyoshi Nakada + + * configure.in (BASERUBY): check if base ruby is runnable first. + [ruby-core:11900] + +Thu Aug 16 16:46:07 2007 Nobuyoshi Nakada + + * configure.in (aix): enable shared by default. + + * configure.in (aix): for 64bit-mode AIX. [ruby-dev:31401] + + use CC for LDSHARED if non-gcc, + + moved -G option from *LDFLAGS to LDSHARED, + + set -brtl only in XLDFLAGS. + +Thu Aug 16 13:06:08 2007 Tanaka Akira + + * bignum.c (big_lshift): make shift offset long type. + (big_rshift): ditto. + (rb_big_lshift): ditto. + (big_rshift): ditto. + [ruby-dev:31434] + +Thu Aug 16 06:29:08 2007 Nobuyoshi Nakada + + * io.c (argf_readpartial): argf_forward needs argc and argv. + +Thu Aug 16 02:47:39 2007 Koichi Sasada + + * cont.c (rb_fiber_m_yield): added. use this function + for Fiber#yield instead of rb_fiber_yield. + +Thu Aug 16 00:36:52 2007 Tanaka Akira + + * lib/tmpdir.rb (Dir.mktmpdir): new method. [ruby-dev:31416] + +Wed Aug 15 18:57:30 2007 Koichi Sasada + + * gc.c (os_live_obj): fix to skip T_VALUES. + + * sample/test.rb: add an ObjectSpace test. + +Wed Aug 15 16:49:04 2007 Koichi Sasada + + * inits.c (rb_call_inits): change initializing order. + [ruby-dev:31420] + +Wed Aug 15 16:44:15 2007 Yukihiro Matsumoto + + * io.c (ARGF_FORWARD): wrongly compares with current_file with + rb_stdout. should be rb_stdin. [ruby-cvs:20177] + +Wed Aug 15 14:59:21 2007 Nobuyoshi Nakada + + * io.c (rb_io_initialize, argf_each_line, argf_each_byte): suppress + warnings. + +Wed Aug 15 14:22:05 2007 Koichi Sasada + + * parse.y: remove "//" type comment. + +Wed Aug 15 13:42:15 2007 Koichi Sasada + + * parse.y: fix rules around f_margs. "make test" passes all tests. + + * bootstraptest/test_block.rb: add some tests for above. + +Wed Aug 15 13:50:10 2007 Nobuyoshi Nakada + + * hash.c (rb_hash_delete_key): delete the entry without calling block. + + * hash.c (rb_hash_shift): should consider iter_lev too. + + * hash.c (delete_if_i): use rb_hash_delete_key() so that the block + isn't called twice. [ruby-core:11556] + +Wed Aug 15 13:39:25 2007 Koichi Sasada + + * process.c (proc_geteuid): fix strange conversion. [ruby-dev:31417] + +Wed Aug 15 01:05:55 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_check): don't call newtest. + (assert_equal): call newtest. + (assert_match): ditto. + +Tue Aug 14 21:43:39 2007 Tanaka Akira + + * bootstraptest/runner.rb (assert_check): new method. + (assert_match): new method. + (assert_equal): use assert_check. + (pretty): give failure description as an argument. + + * bootstraptest/test_exception.rb: use assert_match to describe the + test for [ruby-dev:31407]. [ruby-dev:31412] + +Tue Aug 14 19:53:15 2007 Koichi Sasada + + * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move + init place of exception_error. + + * inits.c: ditto. + + * eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL. + [ruby-dev:31407] + + * bootstraptest/test_exception.rb: add a test for above. + +Tue Aug 14 19:51:20 2007 Koichi Sasada + + * common.mk: change test order (test -> btest). + +Tue Aug 14 00:04:27 2007 Kouhei Sutou + + * lib/rss/rss.rb: 0.1.8 -> 0.1.9. + + * test/rss/test_version.rb: followed the above change. + + * lib/rss/parser.rb: fixed a bug that handles unintended elements. + Thanks to Takuo Yonezawa. [ruby-list:43841] + +Mon Aug 13 17:23:10 2007 Nobuyoshi Nakada + + * eval.c (rb_clear_trace_func, rb_thread_stop_timer_thread): + declarations for forward references. + + * eval.c (rb_longjmp, eval): use local variable. + + * eval.c (rb_longjmp): string object not to be optimized. + +Mon Aug 13 13:21:58 2007 Tanaka Akira + + * lib/open-uri.rb: make ftp passive mode to avoid NAT problem. + [ruby-dev:31377] + +Mon Aug 13 09:18:05 2007 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_getc): should returns + one-character string. + + * ext/stringio/stringio.c: remove unnecessary prototypes. + + * ext/stringio/stringio.c (strio_getbyte): new method. + + * ext/stringio/stringio.c (strio_readbyte): new method. + + * ext/stringio/stringio.c (strio_ungetc): should take a string as + an input. + +Mon Aug 13 08:19:43 2007 Yukihiro Matsumoto + + * io.c (argf_close): always close via method. + + * io.c (Init_IO): remove obsolete Kernel#getc. + +Mon Aug 13 05:03:53 2007 Koichi Sasada + + * thread.c (rb_thread_raise): check if target thread is + thrown by another thread or not. [ruby-dev:31371] + + * bootstraptest/test_thread.rb: add a test for above. + +Mon Aug 13 04:35:30 2007 Koichi Sasada + + * compile.c (iseq_peephole_optimize): fix peephole optimization + bug. [ruby-dev:31360] + + * bootstraptest/test_syntax.rb: add a test for above. + +Mon Aug 13 04:02:29 2007 Koichi Sasada + + * vm_dump.c (debug_print_pre): fix to show control frame count. + + * insns.def (opt_call_c_function): fix operand type. + + * lib/vm/instruction.rb: ditto. + + * insnhelper.ci (vm_push_frame, vm_pop_frame): fix to show + control stack status on if VMDEBUG == 2. + + * vm.h: add a comment about VMDEBUG. + + * iseq.c (find_prev_line_no): fix to skip bug report if + line is not found. + + * lib/vm/instruction.rb: fix to use build_string() on + source code generators. + +Mon Aug 13 03:57:32 2007 Koichi Sasada + + * template/yasmdata.rb.tmpl: fix type and name. + +Sat Aug 11 23:27:37 2007 Yukihiro Matsumoto + + * io.c (argf_each_line): should use #each_line, not #each. + + * io.c (argf_each_line): simplified. + + * io.c (argf_getline): should handle non T_FILE object in ARGV. + + * io.c (argf_each_byte): each_byte should yield bytes not + one-character strings. [ruby-dev:31374] + +Sat Aug 11 07:24:55 2007 Tadayoshi Funaba + + * lib/date/format.rb: reverted some wrongly erased "o" options + (pointed out by nobu). + +Sat Aug 11 00:01:12 2007 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): not re-raise to main thread if it is + joining the current thread. + +Fri Aug 10 23:54:46 2007 Nobuyoshi Nakada + + * thread.c (thread_create_core): inherit the priority of creating + thread. submitted at [ruby-core:11873] by David Flanagan . [ruby-core:11876] + +Fri Aug 10 05:12:19 2007 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): let abort_on_exception work. + [ruby-core:11873] + +Fri Aug 10 04:47:09 2007 Nobuyoshi Nakada + + * parse.y (internal_id_gen): internal ID must be bigger than + tLAST_TOKEN. + +Thu Aug 9 16:04:55 2007 Nobuyoshi Nakada + + * parse.y (stmt): check if rhs has value before assignment instead + inside node_assign_gen(). [ruby-dev:31293] + + * parse.y (call_bin_op_gen, call_uni_op_gen): split call_op_gen. + +Thu Aug 9 14:01:36 2007 Nobuyoshi Nakada + + * parse.y (f_marg_list): renamed from f_marg_head. + + * parse.y (f_margs): allow multiple mandatory arguments after a splat. + [ruby-dev:31153] + +Thu Aug 9 02:02:02 2007 Yukihiro Matsumoto + + * enum.c (enum_cycle): typo fixed. a patch from Kazuhiro + NISHIYAMA . [ruby-dev:31362] + +Wed Aug 8 19:17:40 2007 Yukihiro Matsumoto + + * ext/dl/cptr.c (rb_dlptr_s_to_ptr): no longer check + HAVE_RB_IO_STDIO_FILE. + +Wed Aug 8 15:52:01 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_next_p): should check correctly even when + e.next has not been called before. + + * enumerator.c (enumerator_next): raise StopIteration (name taken + from Python) instead of IndexError. + + * enum.c (enum_zip): catch StopIteration exception. + + * enumerator.c (enumerator_with_index): return Enumerator if no + block is given. + + * test/ruby/test_iterator.rb (TestIterator::test_enumerator): add + test for enumerators. + +Wed Aug 8 11:48:37 2007 Nobuyoshi Nakada + + * bignum.c (rb_big2str0): should not use RTEST for non-VALUE. + +Wed Aug 8 11:25:25 2007 NAKAMURA Usaku + + * bignum.c (rb_big2str0): should preserve sign mark. + +Wed Aug 8 11:02:43 2007 Nobuyoshi Nakada + + * common.mk (btest-miniruby, test-sample): split the test target + so that -k option works. + +Tue Aug 7 14:58:39 2007 Nobuyoshi Nakada + + * ext/pty/pty.c (establishShell): handshaking before close slave + device. [ruby-talk:263410] + + * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): constified. + + * ext/pty/pty.c (SlaveName): removed static buffer. + + * ext/pty/expect_sample.rb: support for autologin. + +Tue Aug 7 13:58:03 2007 Nobuyoshi Nakada + + * include/ruby/ruby.h (ruby_special_consts): added RUBY_SPECIAL_SHIFT. + + * .gdbinit: some improvements. + +Tue Aug 7 13:28:32 2007 Nobuyoshi Nakada + + * common.mk (node_name.inc): use $? instead of $< for nmake. + [ruby-dev:31356] + +Tue Aug 7 12:45:13 2007 Nobuyoshi Nakada + + * configure.in (ac_cv_func_isinf): set yes also on OpenSolaris. + [ruby-Bugs-12859] + +Tue Aug 7 12:31:51 2007 Nobuyoshi Nakada + + * io.c (pipe_open): fix for win32 platforms. + +Tue Aug 7 02:58:33 2007 Yukihiro Matsumoto + + * bignum.c (rb_big2str0): make Bignum#to_s even faster. a patch + from Kenta Murata . [ruby-dev:31354] + +Tue Aug 7 01:42:05 2007 Yukihiro Matsumoto + + * enum.c (enum_zip): zip no longer converts arguments into + arrays, uses enumerators. + +Tue Aug 7 01:27:47 2007 Yukihiro Matsumoto + + * cont.c (rb_fiber_yield): change argument ordering. export. + + * cont.c (rb_fiber_current): export + + * include/ruby/intern.h: export several functions from cont.c. + + * enumerator.c (enumerator_next): new method to implement external + iterator (generator) using fiber. + + * enumerator.c (enumerator_next_p): new method to check whether + any element is left in the generator sequence. + + * enumerator.c (enumerator_rewind): a new method to rewind the + generator sequence. + +Tue Aug 7 01:15:24 2007 Yukihiro Matsumoto + + * enum.c (enum_cycle): new method to cycle enumerable forever. + +Tue Aug 7 00:05:38 2007 Keiju Ishitsuka + + * irb/ruby-lex.rb: support for '\c'. [ruby-talk:263508] + +Mon Aug 6 20:29:22 2007 Koichi Sasada + + * insnhelper.ci, insns.def: move some statements to functions. + + * vm.c, vm.h, vm_evalbody.ci: fix include/typedef places. + +Mon Aug 6 18:41:12 2007 Koichi Sasada + + * lib/vm/instruction.rb (make_header_analysys): fix last commit. + +Mon Aug 6 18:33:22 2007 Koichi Sasada + + * lib/vm/instruction.rb (make_header_analysys): add to separate + header addition process. + +Mon Aug 6 17:36:29 2007 Nobuyoshi Nakada + + * lib/rexml/encodings/{ISO-8859-15,CP-1252}.rb: fixed invalid syntax. + +Mon Aug 6 16:57:08 2007 Koichi Sasada + + * sample/test.rb: fix to output file name if it contains + invalid syntax. + +Mon Aug 6 16:41:22 2007 Koichi Sasada + + * parse.y (value_expr_gen): fix to cause "void value expression" + when jump expression such as "next" are shown on value_expr(). + [ruby-dev:31119] + + * bootstraptest/test_syntax.rb: fix to above change. + +Mon Aug 6 14:36:30 2007 Koichi Sasada + + * parse.y: fix a f_marg rule. [ruby-dev:31160] + +Mon Aug 6 14:29:30 2007 Koichi Sasada + + * bootstraptest/runner.rb (assert_equal): add additional + message parameter. + +Mon Aug 6 13:34:09 2007 Nobuyoshi Nakada + + * common.mk (INSNS): not chdir to srcdir. + + * common.mk (node_name.inc): auto-generate node name list. + + * iseq.c (ruby_node_name): ditto. + + * iseq.c (iseq_s_compile_option_get, Init_ISeq): added a new + method VM::InstructionSequence::compile_option. + + * lib/vm/instruction.rb (RubyVM::SourceCodeGenerator): --destdir + option. + + * tool/node_name.rb: to auto-generate node name list. + +Sun Aug 5 11:51:39 2007 Kouhei Sutou + + * lib/rss, sample/rss, test/rss: + - 0.1.7 -> 0.1.8. + - supported . + - reverted backward incompatibility API changes introduced 0.1.7. + +Sun Aug 5 04:56:25 2007 Nobuyoshi Nakada + + * io.c (pipe_open_v, pipe_open_s): separate array and string + cases. [ruby-dev:31344] + +Fri Aug 3 11:05:54 2007 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): save all CONFIG values. + + * ext/extmk.rb (extmake): remove mkmf.log at clean, and extconf.h at + distclean, respectively. + + * ext/extmk.rb: remove rdoc at clean, and installed list file at + distclean, respectively. + +Fri Aug 3 07:09:05 2007 Nobuyoshi Nakada + + * lib/mkmf.rb: more verbose message. [ruby-Bugs-12766] + + * lib/mkmf.rb (have_type): suppress a warning with -Wall. + + * lib/mkmf.rb (find_type): new method. + +Fri Aug 3 00:00:20 2007 Nobuyoshi Nakada + + * bignum.c (big2str_table): base cannot be 0 or 1. + +Thu Aug 2 23:42:57 2007 Nobuyoshi Nakada + + * parse.y (reg_compile_gen): set error if failed to compile regexp + literal. [ruby-dev:31336] + + * re.c (option_to_str, arg_kcode, opt_kcode): options conversion + between int and string. + + * re.c (rb_reg_compile): should not use regexp which could not get + initialized. [ruby-dev:31333] + return error message to let the parser know it. + + * re.c (rb_reg_compile): append regexp options to error message. + [ruby-dev:31334] + +Thu Aug 2 22:05:32 2007 Yukihiro Matsumoto + + * bignum.c (rb_big2str0): faster Bignum#to_s using Karatsuba + algorithm. a patch from Yusuke ENDOH + in [ruby-dev:31312], slightly modified by Kenta Murata + in [ruby-dev:31339]. + +Thu Aug 2 13:46:39 2007 Nobuyoshi Nakada + + * sprintf.c (rb_f_sprintf): should not check positional number as + width. [ruby-core:11838] + +Wed Aug 1 12:40:05 2007 Nobuyoshi Nakada + + * generic.rb (URI::Generic::merge_path): behave as RFC 3986. + [ruby-talk:252052] + +Tue Jul 31 23:38:09 2007 Tadayoshi Funaba + + * lib/date/format.rb (_parse): now interprets slashed numerical + dates as a big endian (except dd/mm/yyyy). [experimental] + +Mon Jul 30 11:16:40 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_aref): check for Bignum index range. + [ruby-dev:31271] + +Sat Jul 28 09:35:41 2007 Yukihiro Matsumoto + + * ext/digest/lib/digest.rb (Digest::self.const_missing): avoid + infinite recursive const_missing call. [ruby-talk:262193] + +Thu Jul 26 20:40:25 2007 Yukihiro Matsumoto + + * range.c (range_eqq): call_super() in === does not work well + since Enumerable#=== has different behavior. [ruby-dev:31296] + +Thu Jul 26 13:57:45 2007 Nobuyoshi Nakada + + * dln.c (load_1, dln_find_1): constified. + + * dln.c (conv_to_posix_path): removed. + + * ruby.c (usage): constified. + + * ruby.c (rubylib_mangled_path, rubylib_mangled_path2): return + VALUE instead of a pointer to static buffer. + + * ruby.c (push_include_cygwin): fixed buffer overflow. + [ruby-dev:31297] + + * ruby.c (ruby_init_loadpath): not convert built-in paths. + +Tue Jul 24 10:37:04 2007 Nobuyoshi Nakada + + * io.c (rb_f_p): return nil if no argument. [ruby-dev:31285] + +Tue Jul 24 01:05:07 2007 Yukihiro Matsumoto + + * regint.h (USE_MATCH_RANGE_IS_COMPLETE_RANGE): undef to achieve old + rindex behavior. [ruby-dev:31265] + +Mon Jul 23 18:37:14 2007 Yukihiro Matsumoto + + * include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixes + some memory violation. [ruby-dev:31070] + +Sun Jul 22 20:09:49 2007 Tadayoshi Funaba + + * lib/date/format.rb (Date._parse): now accepts some new + hints. [experimental] + + * lib/parsedate.rb: followed the changes on + lib/date/format.rb. [experimental] + +Sun Jul 22 16:06:56 2007 Nobuyoshi Nakada + + * thread.c (is_ruby_native_thread): made an int function as + well as version 1.8. + + * include/ruby/ruby.h (is_ruby_native_thread): moved prototype + from intern.h as well as version 1.8. + +Sun Jul 22 14:33:46 2007 Nobuyoshi Nakada + + * file.c (rb_file_s_rename): deleted code to get rid of a bug of + old Cygwin. + + * file.c (rb_file_truncate): added prototype of GetLastError() + on cygwin. [ruby-dev:31239] + + * include/ruby/intern.h (is_ruby_native_thread): prototype. + + * missing/strftime.c (strftime): fix printf format and actual + arguments. + + * ext/Win32API/Win32API.c (Win32API_initialize): ditto. + + * ext/tk/tcltklib.c (ip_finalize): ditto. + + * ext/win32ole/win32ole.c (lcid_installed): ditto. + + * ext/socket/getnameinfo.c: include stdio.h always. + +Sat Jul 21 21:39:12 2007 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb (Date._parse): now can take some + hints (its aim must be mainly determination of endianness of + date). [experimental] + + * lib/date.rb, lib/date/format.rb (Date._parse): now completes + truncated year as default action. [experimental] + + * lib/date.rb, lib/date/format.rb: added ::iso8601, ::rfc3339, + ::xmlschema, ::rfc2822, ::httpdate, ::jisx0301, #xmlschema, + #httpdate. [experimental] + +Sat Jul 21 17:48:26 2007 Nobuyoshi Nakada + + * common.mk: inverted rules order. + + * thread_win32.ci (w32_create_thread): bcc does not have + _beginthreadex(). + + * lib/mkmf.rb (create_makefile): make OBJS depend on RUBY_EXTCONF_H + only if extconf.h is created. + + * bcc32/Makefile.sub: headers have moved. + + * bcc32/{Makefile.sub,configure.bat,setup.mak: configure_args + support. + + * bcc32/setup.mak: check runtime version. + + * win32/win32.c (rb_w32_open_osfhandle): prototype has changed + in bcc 5.82. + + * {win32,wince,bcc32}/setup.mak (-version-): no RUBY_EXTERN magic. + + * win32/resource.rb: include patchlevel number. + +Sat Jul 21 12:06:48 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (init_mkmf): should remove mkmf.log too. + +Sat Jul 21 01:45:03 2007 Tadayoshi Funaba + + * lib/date/format.rb (Date._parse): completes calendar week based year. + + * lib/date/format.rb (Date._parse): detects year of ordinal date in + extended format. + +Fri Jul 20 16:30:31 2007 Nobuyoshi Nakada + + * compile.c (iseq_set_sequence): raise SyntaxError instead of rb_bug + since this function can be called from VM::InstructionSequence.load. + + * compile.c (insn_set_sc_state, iseq_set_sequence_stackcaching): ditto. + +Fri Jul 20 16:11:33 2007 Nobuyoshi Nakada + + * compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not to + initialize aggregations with dynamic values. [ruby-talk:259306] + + * eval.c (rb_protect): not to initialize aggregations with dynamic + values. [ruby-talk:259306] + + * gc.c (mark_current_machine_context): ditto. + + * thread.c (thgroup_list, call_trace_func): ditto. + + * vm.c (vm_init_redefined_flag): ditto. + +Fri Jul 20 15:22:51 2007 Nobuyoshi Nakada + + * ext/openssl/ossl_config.c (ossl_config_set_section): do not + initialize aggregations with dynamic values. [ruby-talk:259306] + +Fri Jul 20 10:39:28 2007 Nobuyoshi Nakada + + * parse.y (stmt, mlhs_node, lhs, arg, var_ref): return dummy + NODE_BEGIN after errors. [ruby-dev:31100], [ruby-dev:31118] + + * parse.y (remove_begin): keep empty NODE_BEGIN, instead of null. + [ruby-dev:31252], [ruby-dev:31263] + +Fri Jul 20 09:50:40 2007 Nobuyoshi Nakada + + * bootstraptest/runner.rb (get_result_string): check $?.coredump? + first. + + * bootstraptest/runner.rb (cleanup_coredump, check_coredump): see + stackdump file too. + +Thu Jul 19 20:39:30 2007 Yukihiro Matsumoto + + * parse.y (value_expr_gen): warn for empty expression (). + [ruby-dev:31252] + +Thu Jul 19 19:24:14 2007 Nobuyoshi Nakada + + * eval_error.ci (get_backtrace): check the result more. + [ruby-dev:31261] [ruby-bugs-12398] + +Thu Jul 19 14:38:45 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_lshift, rb_big_rshift): separated functions + to get rid of infinite recursion. fixed calculation in edge + cases. [ruby-dev:31244] + + * numeric.c (rb_fix_lshift, rb_fix_rshift): ditto. + +Wed Jul 18 16:57:41 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_pow): refine overflow check. [ruby-dev:31242] + +Wed Jul 18 09:19:07 2007 Nobuyoshi Nakada + + * parse.y (rb_parser_append_print, rb_parser_while_loop): moved check + for node to the head. + + * ruby.c (proc_options): do nothing for -p/-n options if tree is null. + submitted by Yusuke ENDOH at [ruby-dev:31243]. + +Wed Jul 18 08:47:09 2007 Yukihiro Matsumoto + + * time.c (time_succ): Time#succ should return a time object in the + same timezone mode to the original. [ruby-talk:260256] + +Mon Jul 16 23:07:51 2007 Yukihiro Matsumoto + + * lib/base64.rb (Base64::b64encode): should not specify /o option + for regular expression. [ruby-dev:31221] + +Mon Jul 16 22:57:53 2007 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): make %u behave like %d for negative + values, since decimal format does not work with preceding dots. + [ruby-core:11575] + +Mon Jul 16 18:29:33 2007 Nobuyoshi Nakada + + * string.c (rb_str_rindex_m): accept string-like object convertible + with #to_str method, as well as rb_str_index_m. [ruby-core:11692] + +Mon Jul 16 07:17:28 2007 Nobuyoshi Nakada + + * insns.def (getspecial): lfp_svar_get() requires int for special + global variables. + +Mon Jul 16 05:45:53 2007 Nobuyoshi Nakada + + * sprintf.c (rb_f_sprintf): more checks for format argument. + [ruby-core:11569], [ruby-core:11570], [ruby-core:11571], + [ruby-core:11573] + +Mon Jul 16 00:26:10 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_pow): removed invariant variable. [ruby-dev:31236] + +Sun Jul 15 22:24:37 2007 pegacorn + + * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222] + + * ext/digest/digest.c (rb_digest_instance_update, + rb_digest_instance_finish, rb_digest_instance_reset, + rb_digest_instance_block_length): %s in rb_raise() expects char*. + [ruby-dev:31222] + + * ext/openssl/ossl.h: include ossl_pkcs5.h. [ruby-dev:31231] + + * ext/openssl/ossl_pkcs5.h: new file for PKCS5. [ruby-dev:31231] + + * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise() + instead of rb_raise(). [ruby-dev:31222] + + * ext/sdbm/_sdbm.c: DOSISH platforms need io.h. [ruby-dev:31232] + + * ext/syck/syck.h: include stdlib.h for malloc() and free(). + [ruby-dev:31232] + + * ext/syck/syck.h (syck_parser_set_input_type): prototype added. + [ruby-dev:31231] + + * win32/win32.c: include mbstring.h for _mbspbrk(). [ruby-dev:31232] + + * include/ruby/win32.h (rb_w32_getcwd): prototype added. + [ruby-dev:31232] + +Sun Jul 15 21:07:43 2007 Nobuyoshi Nakada + + * bignum.c (bigtrunc): do not empty Bignum. [ruby-dev:31229] + +Sun Jul 15 19:05:28 2007 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): check leading non-digits. + [ruby-core:11691] + +Sun Jul 15 04:42:20 2007 Nobuyoshi Nakada + + * bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225] + +Sat Jul 14 22:49:30 2007 Yukihiro Matsumoto + + * numeric.c (fix_pow): integer power calculation: 0**n => 0, + 1**n => 1, -1**n => 1 (n: even) / -1 (n: odd). + + * test/ruby/test_fixnum.rb (TestFixnum::test_pow): update test + suite. pow(-3, 2^64) gives NaN when pow(3, 2^64) gives Inf. + +Sat Jul 14 18:46:35 2007 Tanaka Akira + + * configure.in: add --with-valgrind. + + * gc.h (SET_MACHINE_STACK_END): new macro to replace + rb_gc_set_stack_end. it find out accurate stack boundary by + asm using gcc on x86. + + * thread.c (rb_gc_set_stack_end): don't define if asm-version + SET_MACHINE_STACK_END is available. + + * gc.c (mark_current_machine_context): extracted from garbage_collect. + it use SET_MACHINE_STACK_END to not scan out of stack area. + it notify conservative GC information to valgrind if + --with-valgrind. + +Sat Jul 14 14:04:06 2007 Nobuyoshi Nakada + + * enum.c (sort_by_cmp): check if reentered. [ruby-dev:24291] + +Sat Jul 14 11:08:28 2007 Yukihiro Matsumoto + + * ext/json/ext/generator/generator.c (check_max_nesting): wrong + format specifier. a patch from pegacorn . + [ruby-dev:31217] + +Sat Jul 14 02:27:43 2007 Yukihiro Matsumoto + + * numeric.c (int_pow): overflow detection using FIT_SQRT_LONG(). + [ruby-dev:31215] + +Sat Jul 14 02:05:53 2007 Yukihiro Matsumoto + + * insns.def (opt_div): LONG2FIX() may not work for corner cases, + use LONG2NUM() instead. [ruby-dev:31210] + +Sat Jul 14 00:34:01 2007 Yukihiro Matsumoto + + * numeric.c (int_round): should not return false, but self. + [ruby-dev:31212] + +Fri Jul 13 18:31:27 2007 Koichi Sasada + + * include/ruby/intern.h: remove unused function declarations. + + * include/ruby/ruby.h: ditto. + +Fri Jul 13 17:32:37 2007 Yukihiro Matsumoto + + * vm.c (vm_free): clear free'ed living_threads field. + [ruby-dev:31163] + + * insns.def (opt_succ): use cast to shut a warning up. + +Fri Jul 13 16:10:00 2007 Tanaka Akira + + * lib/open-uri.rb (URI::Generic#find_proxy): use ENV.to_hash to access + http_proxy environment variable to avoid case insensitive + environment search. + +Fri Jul 13 15:02:15 2007 Nobuyoshi Nakada + + * win32/win32.c (CreateChild): enclose command line except for + command.com which can not handle quotes. [ruby-talk:258939] + +Fri Jul 13 11:33:09 2007 Nobuyoshi Nakada + + * range.c (range_max, range_min): return nil for empty set as well as + 1.8 and Enumerable. [ruby-dev:31198] + +Fri Jul 13 11:28:37 2007 Yukihiro Matsumoto + + * parse.y (bvar): semicolon was lost for ripper description. + [ruby-dev:31140] + +Fri Jul 13 11:25:10 2007 Nobuyoshi Nakada + + * parse.y (program, stmt, primary): reduced duplicated code. + + * parse.y (dsym): convert also literals containing NUL to + symbol. + + * parse.y (debug_lines): use rb_hash_lookup() to get rid of + call of Hash#default. + + * parse.y (ripper_warningS): unused in ripper right now. + +Fri Jul 13 10:33:29 2007 Nobuyoshi Nakada + + * array.c (rb_ary_flatten_bang): check argument if valid + integer. [ruby-dev:31197] + +Fri Jul 13 10:10:46 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (link_command, cc_command, cpp_command): do not expand + ::CONFIG which is an alias of MAKEFILE_CONFIG. + +Thu Jul 12 21:38:02 2007 NAKAMURA Usaku + + * insns.def (opt_succ): use LONG_MAX as maximum Fixnum VALUE. + [ruby-dev:31199] + +Thu Jul 12 18:42:18 2007 Tanaka Akira + + * range.c (range_max): use FIX2LONG instead of FIX2INT to avoid + RangeError by ((-0x80000001)...(-0x80000001)).max on LP64. + + * insns.def (opt_plus): use FIX2LONG instead of FIX2INT to avoid + RangeError by 0x3fffffffffffffff+1 on LP64. + + * insns.def (opt_succ): don't use 0x80000000 which assumes 32bit VALUE. + use FIX2LONG instead of FIX2INT. + [ruby-dev:31190] + +Thu Jul 12 17:03:15 2007 Nobuyoshi Nakada + + * struct.c (rb_struct_init_copy): disallow changing the size. + [ruby-dev:31168] + +Thu Jul 12 12:58:21 2007 Koichi Sasada + + * blockinlining.c: remove "yarv" prefix. + + * array.c, numeric.c: ditto. + + * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. + + * yarvcore.c: removed. + + * yarvcore.h: renamed to core.h. + + * cont.c, debug.c, error.c, process.c, signal.c : ditto. + + * ext/probeprofiler/probeprofiler.c: ditto. + + * id.c, id.h: added. + + * inits.c: ditto. + + * compile.c: rename internal functions. + + * compile.h: fix debug flag. + + * eval.c, object.c, vm.c: remove ruby_top_self. + use rb_vm_top_self() instead. + + * eval_intern.h, eval_load: ditto. + + * gc.c: rename yarv_machine_stack_mark() to + rb_gc_mark_machine_stack(). + + * insnhelper.h: remove unused macros. + + * iseq.c: add iseq_compile() to create iseq object + from source string. + + * proc.c: rename a internal function. + + * template/insns.inc.tmpl: remove YARV prefix. + + * thread.c: use rb_iseq_eval() and rb_str_new2(). + + * vm.c (rb_iseq_eval): added. + + * vm.c: move some functions from yarvcore.c. + + * vm_dump.c: fix to remove compiler warning. + +Thu Jul 12 12:24:29 2007 Nobuyoshi Nakada + + * insns.def (opt_succ): fixed typo. [ruby-dev:31189] + +Thu Jul 12 10:30:46 2007 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): moved prototye from thread_*.ci. + + * thread_pthread.ci (thread_start_func_2): not use a directive + inside a macro argument. [ruby-talk:258763] + + * thread.c (thread_join): pthread_t may not be pointer. + + * thread_pthread.ci (ubf_select_each): ditto. + +Thu Jul 12 05:32:28 2007 NAKAMURA Usaku + + * include/ruby/ruby.h (FIX2ULONG): drop sign bit for LLP64 platform. + +Tue Jul 10 19:34:45 2007 Koichi Sasada + + * hash.c (rb_hash_lookup): added. this function is similar to + rb_hash_aref(), but doesn't call Hash#default when no entry + exists. + + * include/ruby/intern.h: ditto. + + * insnhelper.ci (lfp_svar_get): use rb_hash_lookup(). + +Tue Jul 10 19:16:28 2007 Koichi Sasada + + * eval.c, insnhelper.ci, vm.c: change cref index (-1 -> 2). + +Tue Jul 10 18:49:56 2007 Koichi Sasada + + * eval.c (exec_under): add proper casts. + +Tue Jul 10 16:58:16 2007 Koichi Sasada + + * vm.c, insnhelper.ci: fix svar interface. + + * compile.c (iseq_compile_each), yarvcore.h: fix to use new + svar interface for flip flop. + + * eval.c: ditto. + + * insns.def: ditto. + + * include/ruby/intern.h: remove "rb_svar()" declaration. + +Tue Jul 10 16:52:01 2007 Nobuyoshi Nakada + + * compile.c (rb_iseq_compile): formatted if/else to switch statement. + +Tue Jul 10 15:57:53 2007 Nobuyoshi Nakada + + * bootstraptest/test_flip.rb: new test for flip-flop operator. + +Tue Jul 10 14:50:01 2007 Nobuyoshi Nakada + + * bcc32/{Makefile.sub,setup.mak}: remove surplus slash from srcdir. + +Mon Jul 9 02:17:36 2007 NAKAMURA Usaku + + * cont.c (cont_restore_1): workaround for x64-mswin64's SEH. + +Sun Jul 8 02:08:53 2007 NARUSE, Yui + + * lib/json.rb, lib/json/, ext/json/: import JSON 1.1.1 + +Sat Jul 7 21:59:29 2007 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#pp_hash): sort condition changed: + all keys have a same class which is kind of Comparable. + +Sat Jul 7 17:12:37 2007 Koichi Sasada + + * compile.c: use rb_bug() instead of rb_compile_error(). + +Sat Jul 7 16:12:48 2007 Koichi Sasada + + * parse.y: fix node construction (around f_margs). + [ruby-dev:31143] + + * bootstraptest/test_block.rb: add a test for above. + + * insnhelper.ci: fix indent. + +Sat Jul 7 15:36:50 2007 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#pp_hash): sort if + all keys are strings, symbols or integers. + +Sat Jul 7 15:30:05 2007 Koichi Sasada + + * insnhelper.ci (vm_yield_setup_args), vm.c, insns.def: + fix to pass nil as block parameter to yielded block. + [ruby-dev:31147] + + * bootstraptest/test_block.rb: add a test for above. + +Fri Jul 6 19:55:10 2007 Keiju Ishitsuka + + * lib/irb.rb: typo. Thanks, Giles Bowkett. + + * lib/irb/completion.rb: support Ruby1.9 changing return value + String to Symbol for Object#methods, etc. [ruby-dev:31148]. + +Fri Jul 6 18:20:50 2007 Koichi Sasada + + * bootstraptest/runner.rb: fix load path. + + * common.mk: fix "test" rule to run with "btest". + + * rubytest.rb, sample/test.rb: fix to show tests progress. + +Fri Jul 6 15:37:48 2007 Koichi Sasada + + * test/ruby/test_iterator.rb: fix test to 1.9 spec. + +Fri Jul 6 15:21:25 2007 Nobuyoshi Nakada + + * eval.c (rb_interrupt): suppress a gcc's officious warning. + +Fri Jul 6 14:57:12 2007 Nobuyoshi Nakada + + * parse.y (keyword_to_name): constified. + + * ext/ripper/eventids2.c (token_to_eventid): ditto. + +Fri Jul 6 14:50:40 2007 Nobuyoshi Nakada + + * bootstraptest/runner.rb: added --quiet option. + +Fri Jul 6 14:35:25 2007 Nobuyoshi Nakada + + * parse.y (f_marg): wrap f_norm_arg assignment node with NODE_LIST. + [ruby-dev:31141] + +Fri Jul 6 12:15:01 2007 Tanaka Akira + + * test/ruby/sentgen.rb: new file. + + * test/ruby/test_assignment.rb: tests implemented using assignment + generator and emulator. + +Fri Jul 6 03:06:58 2007 Koichi Sasada + + * insns.def: remove unused code. + + * compile.c (compile_massign): fix to invoke to_splat on + splat rhs (example: *a = *nil). [ruby-dev:31136] + + * bootstraptest/test_massign.rb: add tests for above. + + * compile.c (iseq_compile_each): disable excess optimization. + [ruby-dev:31126] + +Fri Jul 6 02:08:25 2007 Koichi Sasada + + * insns.def: fix to invoke nil.to_splat on NODE_ARGSCAT. + [ruby-dev:31138]. + + * bootstraptest/test_literal.rb: add tests for above. + +Thu Jul 5 19:45:55 2007 Koichi Sasada + + * yarvcore.h: rename rb_control_frame_t#magic to flag. + + * vm.h: add VM_FRAME_TYPE() and VM_FRAME_FLAG(). + + * cont.c, insnhelper.ci, insns.def, vm.c, vm_dump.c, + vm_evalbody.ci, yarvcore.c: apply above changes. + +Thu Jul 5 19:16:14 2007 Koichi Sasada + + * test/ruby/test_basicinstructions.rb: remove an assertion using + unsupported hash literal (such as {1, 2}). + + * test/ruby/test_hash.rb: ditto. + +Thu Jul 5 19:12:22 2007 NAKAMURA Usaku + + * ruby.c: Qfalse is VALUE, not pointer. + +Thu Jul 5 18:42:01 2007 Koichi Sasada + + * compile.c (iseq_compile_each): add break catch point. + + * insns.def (throw): support correct "break" and "return". + this commit achieve that "make test" passes all tests. + + * vm.c: ditto. + +Thu Jul 5 18:44:12 2007 Tanaka Akira + + * parse.y (mlhs_basic): use mlhs_post after tSTAR. + [ruby-dev:31109] + +Thu Jul 5 18:27:58 2007 Nobuyoshi Nakada + + * include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c, + eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, + yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, + ruby_nerrs): purge global variables. + + * ruby.c (proc_options): moved do_print and do_loop options + handling from ruby_process_options(). + +Thu Jul 5 16:37:34 2007 NAKAMURA Usaku + + * numeric.c (int_pow): fix previous nubu's commit. + + * test/ruby/test_fixnum.rb: new test. + +Thu Jul 5 15:56:06 2007 Nobuyoshi Nakada + + * numeric.c (int_pow): even number multiplication never be negative. + +Thu Jul 5 10:42:07 2007 Nobuyoshi Nakada + + * include/ruby/{node,ruby}.h, ruby.c: added enum constants for gdb + support. [ruby-dev:31066] + + * .gdbinit: some improvements. + +Thu Jul 5 10:13:08 2007 Nobuyoshi Nakada + + * parse.y (global_symbols.last_id): reduce unused ID numbers. + + * include/ruby/st.h, st.c (st_init_table, st_init_table_with_size): + constified. + +Wed Jul 4 23:36:27 2007 NAKAMURA, Hiroshi + + * lib/webrick/httpauth/authenticator.rb + (WEBrick::HTTPAuth::Authenticator#check_scheme): auth-scheme must be + treated as a case-insensitive token according to RFC 2617 section 1.2. + +Wed Jul 4 18:30:04 2007 Tanaka Akira + + * parse.y (mlhs_inner): new rule. [ruby-dev:31132] + +Wed Jul 4 05:11:57 2007 Koichi Sasada + + * iseq.c (set_relation): added. + +Wed Jul 4 04:58:30 2007 Koichi Sasada + + * insnhelper.ci (caller_setup_args): fix to show correct class + on an error message (ex: m(&1)). [ruby-dev:31101] + +Wed Jul 4 04:30:32 2007 Koichi Sasada + + * compile.c (compile_array, iseq_compile_each): fix about array + generation in void context. [ruby-dev:31102] + + * bootstraptest/test_literal.rb: add a test for above. + +Wed Jul 4 04:07:00 2007 Koichi Sasada + + * compile.c (compile_array): ignore NODE_ZARRAY. + [ruby-dev:31110] + + * bootstraptest/test_method.rb: add a test for above. + +Wed Jul 4 04:04:02 2007 Koichi Sasada + + * compile.h: fix debug print level. + +Wed Jul 4 03:52:55 2007 Koichi Sasada + + * compile.c (iseq_compile_each): support v[&b]= type method call. + [ruby-dev:31094] + + * bootstraptest/test_method.rb: add a test for above. + +Wed Jul 4 03:43:29 2007 Koichi Sasada + + * compile.c (compile_massign): fix massign compilation + (example: a, *v, (*x) = ...). [ruby-dev:31107] + + * bootstraptest/test_massign.rb: add tests for above. + +Tue Jul 3 23:12:29 2007 NAKAMURA Usaku + + * include/ruby/onigiruma.h (ONIG_EXTERN): use RUBY_EXTERN if defined. + + * regenc.h: include ruby/defines.h. + + * regint.h: x64-mswin64 support. + +Tue Jul 3 13:47:44 2007 Koichi Sasada + + * cont.c (cont_save_machine_stack): clear saved_thread.machine_stack*. + +Mon Jul 2 21:45:53 2007 Koichi Sasada + + * compile.c: rename iseq_translate_direct_threaded_code() + to iseq_translate_threaded_code(). + + * eval_intern.h, yarvcore.h: mv EXEC_EVENT_HOOK() and + exec_event_hooks() to yarvcore.h. + + * insnhelper.ci, vm.c: mv yarv_finish_insn_seq to vm.c. + + * insns.def (opt_call_c_function): fix to use RESTORE_REGS(). + + * iseq.c (rb_iseq_build_for_ruby2cext): fix to allocate iseq. + +Mon Jul 2 11:59:34 2007 Nobuyoshi Nakada + + * insns.def (defineclass): suppress a warning. + + * insns.def (opt_call_c_function): should raise the thrown exception + instead of returning it. + +Mon Jul 2 08:53:47 2007 Koichi Sasada + + * eval_intern.h, yarvcore.h: move declaration of sysstack_error + to yarvcore.h. + + * iseq.c: fix symbol name (:toplevel -> :top). + + * lib/vm/instruction.rb, template/vm.inc.tmpl: replaceable + current file name. + +Mon Jul 2 05:29:07 2007 Koichi Sasada + + * compile.c, iseq.c: fix iseq some of load/store process. + +Mon Jul 2 03:09:36 2007 Koichi Sasada + + * yarvcore.h, compile.c, insnhelper.ci, iseq.c, vm.c: + rename structure names and field names. + + * insnhelper.h, insns.def: add GET_CONST_INLINE_CACHE(). + + * iseq.c: add rb_iseq_build_for_ruby2cext(). + + * yarvcore.h, vm.h: move declaration of rb_insn_func_t + to yarvcore.h. + +Sun Jul 1 03:25:53 2007 Koichi Sasada + + * insnhelper.h, vm.h: some refactoring. + remove useless comments, etc. + +Sun Jul 1 03:02:29 2007 Koichi Sasada + + * yarvcore.h: some refactoring on rb_iseq_t. + rename some variable names, add comments, etc. + + * compile.c, iseq.c, proc.c, vm.c: ditto. + +Sun Jul 1 02:57:57 2007 Koichi Sasada + + * vm.h: rename insn_func_type to rb_insn_func_type. + + * vm_evalbody.ci: ditto. + + * insns.def: add opt_call_native_compiled instruction + instead of opt_call_native_compiled. + +Sat Jun 30 00:17:00 2007 Nobuyoshi Nakada + + * parse.y (parser_yylex): return non-valid token for an invalid + instance/class variable name. a patch from Yusuke ENDOH + . [ruby-dev:31095] + +Fri Jun 29 23:38:06 2007 Nobuyoshi Nakada + + * parse.y (stmts): fix for ripper. + +Fri Jun 29 21:55:48 2007 Koichi Sasada + + * parse.y: fix to show line number of blank block. + [ruby-dev:31093] + +Fri Jun 29 20:51:04 2007 Tanaka Akira + + * lib/cgi/session.rb (create_new_id): don't cut off md5.hexdigest to + follow Ruby 1.8. + +Fri Jun 29 17:10:14 2007 Nobuyoshi Nakada + + * debug.h: constified. + + * debug.c (ruby_set_debug_option): separated from main.c. + + * gc.c (ruby_gc_stress), signal.c (ruby_enable_coredump): prefixed. + +Fri Jun 29 16:39:06 2007 Koichi Sasada + + * proc.c (proc_new): fix to return a proc object + which block is contained ([ruby-dev:31056]). + +Fri Jun 29 15:43:59 2007 Nobuyoshi Nakada + + * numeric.c (fix_pow): get rid of division by zero. reported by + Yusuke ENDOH [ruby-dev:31040] + + * numeric.c (int_round): do nothing when rounding by zeroth digit. + check underflow. [ruby-dev:31043] + +Fri Jun 29 15:32:00 2007 Koichi Sasada + + * configure.in: add fastcall attribute check. + +Fri Jun 29 14:51:24 2007 Yukihiro Matsumoto + + * parse.y (assoc_list): remove expanded hash literal (no splat). + + * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt + to new syntax. + +Fri Jun 29 14:48:18 2007 Koichi Sasada + + * tool/insns2vm.rb, lib/vm/instruction.rb: move process body + to lib/vm/instruction.rb. + + * common.mk: fix aotc rule. + experimental. bin/ruby2cext is not added yet. + +Fri Jun 29 11:23:09 2007 Nobuyoshi Nakada + + * parse.y (dsym): return non-null NODE even if yyerror(). based on a + patch from Yusuke ENDOH . [ruby-dev:31085] + +Thu Jun 28 23:29:30 2007 Yukihiro Matsumoto + + * parse.y (assoc_list): odd number check only for NODE_ARRAY. + [ruby-dev:31082] + +Thu Jun 28 22:24:33 2007 Koichi Sasada + + * win32/Makefile.sub: define FUNC_FASTCALL macro. + + * vm.h: fix to use FUNC_FASTCALL macro. + TODO: add FUNC_FASTCALL macro by configure. + +Thu Jun 28 19:38:53 2007 Koichi Sasada + + * compile.c: fix to remove -Wall warnings on gcc. + + * compile.c (make_name_with_str): removed. use rb_sprintf() instead. + +Thu Jun 28 18:53:01 2007 Tanaka Akira + + * bignum.c (rb_big_hash): fix hash area. + +Thu Jun 28 15:00:06 2007 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_getline): local variable to be + initialized. [ruby-dev:31077] + +Thu Jun 28 11:30:39 2007 NAKAMURA Usaku + + * gc.c (rb_obj_id): use SIGNED_VALUE instead of long. + +Thu Jun 28 05:01:56 2007 Koichi Sasada + + * common.mk (run.gdb): fix to load $(srcdir)/.gdbinit + + * vm.c (rb_vm_set_finish_env): add a cast. + + * vm.h: support __fastcall for MSVC. + +Thu Jun 28 02:12:08 2007 Koichi Sasada + + * bootstraptest/runner.rb: fix to untouch $:. + +Thu Jun 28 02:03:07 2007 Koichi Sasada + + * compile.c (setup_args): change parameter type. + +Thu Jun 28 02:03:39 2007 NAKAMURA Usaku + + * parse.y (rb_intern2): unconstify cast. + +Thu Jun 28 01:44:31 2007 Tanaka Akira + + * parse.y (rb_intern2): don't allocate a string object at first. + [ruby-dev:31064] + +Thu Jun 28 01:24:02 2007 Koichi Sasada + + * bootstraptest/runner.rb: fix to show file name. + + * bootstraptest/test_*.rb: add bootstrap tests. + +Thu Jun 28 01:22:15 2007 Koichi Sasada + + * include/ruby/node.h, parse.y, gc.c, iseq.c: remove NODE_CREF. + +Thu Jun 28 01:19:43 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix popped backref and others. + ([ruby-dev:31068]). + + * compile.c (iseq_compile_each): remove needless statements. + +Wed Jun 27 23:51:33 2007 NAKAMURA Usaku + + * win32/win32.c: remove unused functions. + +Wed Jun 27 20:46:05 2007 NAKAMURA Usaku + + * include/ruby/win32.h, win32/Makefile.sub, win32/configure.bat, + win32/mkexports.rb, win32/setup.mak, win32/win32.c: import + x64-mswin64 port. + +Wed Jun 27 20:31:07 2007 Koichi Sasada + + * compile.c (iseq_translate_direct_threaded_code): fix prototype + function name. + + * vm.h: add correct cast. + +Wed Jun 27 17:08:42 2007 Koichi Sasada + + * vm_evalbody.ci: support OPT_CALL_THREADED_CODE. + + * insns.def, vm.c, vm.h: ditto. + + * vm.h: add VM_CFP_CNT() and VM_SP_CNT(). + +Wed Jun 27 04:23:47 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix type error. + +Wed Jun 27 03:26:15 2007 Koichi Sasada + + * compile.c (compile_massign), insns.def (expandarray): support + postarg with massign (a, *b, c = ...). + + * bootstraptest/test_massign.rb: add tests for above. + + * compile.h: fix debug macro names. + +Wed Jun 27 00:18:41 2007 Yukihiro Matsumoto + + * string.c (rb_str_clear): need to check STR_EMBED_P() before + free()ing memory. a patch from Yusuke ENDOH . + [ruby-dev:31062] + +Tue Jun 26 16:39:01 2007 Nobuyoshi Nakada + + * process.c (proc_getgroups): use GIDT2NUM for rb_gid_t. + +Tue Jun 26 16:28:24 2007 Koichi Sasada + + * thread.c (rb_thread_wait_fd_rw): terminate fdset. + +Tue Jun 26 16:26:58 2007 NAKAMURA Usaku + + * regint.h: IL32LLP64 support. + +Tue Jun 26 16:22:45 2007 Koichi Sasada + + * iseq.c (ruby_node_name): update node names. + +Tue Jun 26 15:21:20 2007 NAKAMURA Usaku + + * include/ruby/ruby.h: IL32LLP64 support. + + * bignum.c (bigfixize, rb_cstr_to_inum): ditto. + + * insns.def (opt_plus, opt_minus, opt_mult): ditto. + +Tue Jun 26 15:04:06 2007 Koichi Sasada + + * cont.c (rb_fiber_s_new): revert initializing VM stack. + + * yarvcore.c (th_init2): ditto. + + * vm.c, vm.h: fix to stop using Qundef on VM stack. According to + this change, VM stack should not include Qundef value. + + * insns.def (putundef): removed. + + * compile.c (iseq_compile_each): ditto. + + * eval.c (eval): fix spacing. + +Tue Jun 26 04:03:50 2007 Koichi Sasada + + * insnhelper.ci (vm_yield_with_cfunc), proc.c: fix Method#to_proc + to return lambda Proc ([ruby-dev:31021], [ruby-dev:31037]). + +Tue Jun 26 03:46:08 2007 Koichi Sasada + + * cont.c (rb_fiber_s_new): fix to clear rb_thread_t#tag. + [ruby-dev:30995] + +Tue Jun 26 03:38:31 2007 Koichi Sasada + + * cont.c (rb_fiber_s_new), yarvcore.c (th_init2): fix to clear + VM stack ([ruby-dev:31046]). + +Tue Jun 26 03:15:27 2007 Koichi Sasada + + * compile.c: rename setup_arg() to setup_args(). + fix to use setup_args() at processing NODE_YIELD. + +Tue Jun 26 02:50:24 2007 Koichi Sasada + + * compile.c (setup_arg): support kind of "m(*ary, x)" method call. + ([ruby-dev:31048]). + +Tue Jun 26 00:28:44 2007 Koichi Sasada + + * insnhelper.ci, vm.c: complete block parameter support. + post arguments, optional arguments, block argument. + + * compile.c, parse.y: fix {|a|} parameter. + + * insnshelper.ci, insns.def: revert caller_setup_args() option + (need_block_check) parameter. + +Mon Jun 25 20:18:44 2007 NAKAMURA Usaku + + * gc.c (RVALUE): in RVALUE and RBasic, flags must be the same type. + +Mon Jun 25 18:02:55 2007 NAKAMURA Usaku + + * ext/pty/extconf.rb: skip wince and win64. + +Mon Jun 25 17:59:32 2007 NAKAMURA Usaku + + * include/ruby/node.h (NODE_LMASK, nd_line): shouldn't use int and/or + long carelessly. + +Mon Jun 25 11:36:35 2007 Koichi Sasada + + * gc.h: add RUBY_ prefix to debug macros. + + * cont.c, proc.c, yarvcore.c, + + * gc.c: define ruby_gc_debug_indent variable to debug mark/free. + + * vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*. + move some functions, definitions, declarations to suitable files. + + * eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto. + +Mon Jun 25 09:45:46 2007 Nobuyoshi Nakada + + * eval_error.ci, eval_jump.ci, eval_method.ci, eval_safe.ci: c-mode. + +Mon Jun 25 05:27:54 2007 Koichi Sasada + + * eval.c: remove ruby_current_node and change eval() prototype. + fix to use rb_sourcefile/line() instead of ruby_sourcefile/line. + + * error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c, + include/ruby/intern.h, parse.y, process.c, ruby.c: ditto. + + * vm.c: fix spaces. + +Mon Jun 25 04:20:14 2007 Koichi Sasada + + * eval_*.h: rename to eval_*.ci. + + * common.mk: ditto. + + * eval_error.ci: remove ruby_set_current_source(). + + * error.c, eval.c, ruby.c: ditto. + + * eval_safe.c, proc.c: remove unused macros. + +Mon Jun 25 03:37:20 2007 Koichi Sasada + + * insnhelper.ci (caller_setup_args): add need_block_check option. + + * insns.def: ditto. + + * yarvcore.h: add GetCoreDataFromValue(). + +Mon Jun 25 02:14:30 2007 Koichi Sasada + + * call_cfunc.ci: removed. + + * insnhelper.ci: added. this function includes all functions that + vm insns need. + + * common.mk: ditto. + + * insnhelper.h, vm.h, vm.c: move some declaration. + + * gc.h: remove GC_CHECK() macro because GC.stress is more useful. + + * compile.c, iseq.c, vm_dump: ditto. + + * gc.h, thread.c: move a prototype declaration. + + * debug.c, debug.h: rename some functions. + + * compile.h: ditto. + +Mon Jun 25 00:45:02 2007 Koichi Sasada + + * insns.def (invokesuper): fix error message. + +Mon Jun 25 00:14:13 2007 Koichi Sasada + + * vm.c: some refactoring. + * rename th_* to vm_*. + * remove unused variables functions. + * add prototypes. + + * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, + eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, + proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, + vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. + +Sun Jun 24 22:32:00 2007 Koichi Sasada + + * eval_method.h (rb_add_method): fix to check 0. + +Sun Jun 24 22:00:17 2007 Koichi Sasada + + * insn_send.ci: removed. + + * common.mk: ditto. + + * vm.c (vm_call_bmethod), isnsn.def: added. fix to use this + function instead of using goto. + + * vm.c (vm_call_bmethod): renamed from th_invoke_bmethod(). + + * vm.c (vm_method_missing): renamed from eval_method_missing(). + + * vm_evalbody.ci: remove tmp_* variables. + + * insnhelper.h: add some macros. + + * insns.def: forbid zsuper from method defined by define_method(). + + * test/ruby/test_super.rb: ditto. + +Sun Jun 24 20:01:08 2007 Koichi Sasada + + * vm_macro.def: removed. + + * insn_send.ci: added. this file includes send instruction body. + + * common.mk: ditto. + + * insns.def: ditto. + + * tool/insns2vm.rb: ditto. + + * vm.c: ditto. + +Sun Jun 24 19:30:37 2007 Koichi Sasada + + * insnhelper.h (RESTORE_REGS): add do/while(0) around macro. + + * vm.c, vm_macro.def: remove macro_eval_invoke_func() and + add vm_setup_method(). use it instead. + +Sun Jun 24 19:02:33 2007 Koichi Sasada + + * vm.c, vm_macro.def : remove macro_eval_invoke_cfunc() and + add vm_call_cfunc(). + +Sun Jun 24 17:54:13 2007 Koichi Sasada + + * insns.def, vm.c: add/fix stack overflow check. + +Sun Jun 24 17:28:52 2007 Koichi Sasada + + * insnhelper.h: change CHECK_STACK_OVERFLOW() to throw exception. + + * vm.c (caller_setup_arg), vm_macro.def: remove + macro_eval_setup_send_arguments and add caller_setup_arg(). + + * insns.def: ditto. + + * bootstraptest/test_method.rb: add splat arg tests. + +Sun Jun 24 16:35:46 2007 Nobuyoshi Nakada + + * proc.c (proc_to_s): used a variable before initialized. + +Sun Jun 24 16:05:45 2007 Koichi Sasada + + * vm.c (callee_setup_arg): added. support correct post arg. + + * vm_macro.def (macro_eval_invoke_func): fix to use + callee_setup_arg. + + * compile.c (set_arguments): adjust for above changes. + + * compile.c (iseq_compile_each): ditto. + + * iseq.c (ruby_iseq_disasm): ditto. + + * yarvcore.h: add rb_iseq_t#post_arg_start and arg_size. + + * bootstraptest/test_method.rb: add post arg tests. + +Sun Jun 24 16:10:43 2007 Nobuyoshi Nakada + + * proc.c (proc_to_s): suppress warning, and reduced duplicated code. + +Sun Jun 24 15:33:47 2007 Koichi Sasada + + * bootstraptest/runner.rb: set default directory to + '/tmp/bootstraptest.tmpwd' and add --dir option. + fix to output driver and target information. + + * common.mk: fix to run btest on BASERUBY and + add OPTS to pass option ("make btest OPTS=..."). + +Sun Jun 24 03:05:00 2007 Tanaka Akira + + * enum.c (enum_minmax): fix SEGV by [].minmax. + +Sat Jun 23 17:18:19 2007 Tanaka Akira + + * re.c (match_inspect): MatchData#inspect implemented. + +Sat Jun 23 15:00:16 2007 Yukihiro Matsumoto + + * enum.c (enum_minmax): new method to get the minimum and maximum + values from the enumerable at once. + + * enum.c (enum_minmax_by): ditto. + +Sat Jun 23 01:25:40 2007 Yukihiro Matsumoto + + * hash.c (rb_hash_assoc): new method. + + * hash.c (rb_hash_rassoc): ditto. + + * hash.c (rb_hash_flatten): ditto. + +Fri Jun 22 23:55:59 2007 Yukihiro Matsumoto + + * string.c (rb_str_upto): add optional argument to specify + exclusiveness. + + * range.c (range_step): use String#upto with optional argument. + + * range.c (range_each): ditto. + +Fri Jun 22 19:55:51 2007 Tanaka Akira + + * proc.c (proc_to_s): revert the change from %p to %lx at YARV + merge time. + +Fri Jun 22 19:33:49 2007 Tanaka Akira + + * proc.c (proc_to_s): show is_lambda. + +Thu Jun 21 20:36:12 2007 Yukihiro Matsumoto + + * hash.c (rb_hash_sort): remove hash specific implementation. + +Thu Jun 21 20:28:05 2007 Yukihiro Matsumoto + + * hash.c (rb_hash_select): returns new hash, not assoc array. + [ruby-core:11504] + + * hash.c (env_select): ditto. + +Thu Jun 21 23:08:19 2007 Yukihiro Matsumoto + + * parse.y (rb_intern2): ID_JUNK test based on len, not by NUL. + +Thu Jun 21 19:42:07 2007 Nobuyoshi Nakada + + * yarvcore.c (rb_thread_mark): mark also thrown_errinfo. + +Thu Jun 21 17:13:44 2007 Nobuyoshi Nakada + + * parse.y (rb_intern2): name may not be NUL-terminated. + +Wed Jun 20 08:27:57 2007 Tanaka Akira + + * eval_error.h (error_print): show full stacktrace on + non-SystemStackError. + +Wed Jun 20 04:45:39 2007 Nobuyoshi Nakada + + * parse.y (rb_intern2): use rb_intern2 to intern without trailing + equal sign. + + * parse.y (rb_intern2, ripper_id2sym): fixed indent. + +Tue Jun 19 10:55:05 2007 Nobuyoshi Nakada + + * eval_load.c (load_ext, rb_require_safe): pass VALUE instead of + pointer. [ruby-Bugs-11659] + +Mon Jun 18 08:47:54 2007 Technorama Ltd. + + * ext/openssl/{extconf.rb,ossl_ssl_session.c}: + Fix ruby-Bugs-11513. + + * ext/openssl/ossl_pkey_ec.c + New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?] + By default output the same key form as the openssl command. + + * ext/openssl/ossl_rand.c + New method Random.status? + + * test/openssl/test_ec.rb + New tests. + +Mon Jun 18 17:04:07 2007 Nobuyoshi Nakada + + * eval_load.c (rb_require_safe, ruby_init_ext): load with ruby level + cfp. [ruby-core:10779] + + * eval_intern.h, vm.c (rb_vm_call_cfunc): new function to call a + function with ruby level cfp. + +Mon Jun 18 16:57:24 2007 Nobuyoshi Nakada + + * parse.y (yycompile): disable trace while creating ruby_debug_lines. + [ruby-talk:253586] + + * thread.c (ruby_suppress_tracing): new function to call a function + with suppressing trace. + + * lib/debug.rb, lib/tracer.rb: for YARV. + +Mon Jun 18 13:54:36 2007 Nobuyoshi Nakada + + * eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occurred + in at_exit blocks. [ruby-core:11263] + +Mon Jun 18 02:49:16 2007 Koichi Sasada + + * vm.c (env_mark): fix to mark block.proc. + + * vm.c (th_make_proc_from_block): set created proc to block->proc. + +Mon Jun 18 02:48:12 2007 Koichi Sasada + + * vm_dump.c (vm_stack_dump_raw): hide VM stack trace. + +Mon Jun 18 02:43:53 2007 Koichi Sasada + + * signal.c (sigsegv): clear gc_stress flag on SEGV. + +Mon Jun 18 01:14:10 2007 Nobuyoshi Nakada + + * variable.c (rb_path2class): get rid of dangling pointer caused by + optimized out value. + + * variable.c (rb_global_entry, rb_f_untrace_var, rb_alias_variable, + rb_generic_ivar_table, generic_ivar_get, generic_ivar_set, + generic_ivar_defined, generic_ivar_remove, rb_mark_generic_ivar, + rb_free_generic_ivar, rb_copy_generic_ivar, + rb_obj_instance_variables): suppress warnings. + +Sun Jun 17 11:11:07 2007 Tanaka Akira + + * eval.c (rb_method_missing): avoid a warning "too many arguments + for format string" on "./ruby -ve 'def m() super end; m'". + +Sat Jun 16 22:24:17 2007 Tanaka Akira + + * gc.c (garbage_collect): re-introduce ruby_current_node marking code. + [ruby-dev:31005] + +Sat Jun 16 21:37:43 2007 Tanaka Akira + + * gc.c (gc_sweep): re-introduce heap extension strategy change. + [ruby-dev:31005] + +Fri Jun 15 22:59:37 2007 Tanaka Akira + + * .gdbinit: new file to ease debugging using gdb. + +Fri Jun 15 22:33:55 2007 Tanaka Akira + + * signal.c (default_handler): func argument removed. + (trap_handler): support SYSTEM_DEFAULT. call default_handler + internally. + (sig_trap): don't call default_handler. + [ruby-dev:30999] + +Fri Jun 15 22:33:29 2007 Nobuyoshi Nakada + + * common.mk (realclean): separate local and ext. + + * ext/extmk.rb: not remove unrelated directories. + +Fri Jun 15 20:50:02 2007 Tanaka Akira + + * keywords: enclose C code in declaration section by %{ and %} to + avoid extra semicolon after #ifdef RIPPER. + pointed by eban. + +Fri Jun 15 18:56:52 2007 Tanaka Akira + + * signal.c (trap_handler): trap("SIGSEGV", "DEFAULT") may cause wrong + trap error because SIG_DFL may be zero. + +Fri Jun 15 15:55:55 2007 Koichi Sasada + + * insns.def (setconstant, toregexp): fix to mark object correctly. + +Fri Jun 15 13:24:18 2007 Koichi Sasada + + * hash.c: exchange semantics of Hash#each and Hash#each_pair. + pointed out by [ruby-dev:30997]. + + * test/ruby/test_iterator.rb: ditto. + + * test/ruby/test_yield.rb: ditto. + +Fri Jun 15 12:38:29 2007 Koichi Sasada + + * test/ruby/test_iterator.rb: remove debug code (GC.stress=true). + +Fri Jun 15 12:25:33 2007 Koichi Sasada + + * vm.c (th_yield_setup_args): |v| should work as |v,|. + ex) def m;yield 1, 2; end; m{|v| p v} #=> 1 + + * parse.y: apply above change for "for" statement. + + * test/ruby/test_assignment.rb: ditto + + * test/ruby/test_basicinstructions.rb: ditto. + + * test/ruby/test_iterator.rb: ditto. + + * test/ruby/test_yield.rb: ditto. + + * compile.c (iseq_compile_each): fix debug. + +Fri Jun 15 12:22:10 2007 Koichi Sasada + + * eval.c (ruby_finalize_1): rb_thread_t#errinfo should be clear with + Qnil. + +Fri Jun 15 12:20:11 2007 Koichi Sasada + + * cont.c (rb_cont_call): forbid cross fiber continuation call. + + * test/ruby/test_fiber.rb: ditto. + +Fri Jun 15 12:14:07 2007 Koichi Sasada + + * sample/test.rb: fix to show line information whether test succeeds. + +Thu Jun 14 17:16:05 2007 Tanaka Akira + + * eval_load.c (Init_load): delay allocating an array for rb_load_path + to avoid GC problem in very early stage. + (RUBY_GC_STRESS causes GC in such stage.) + + * variable.c (rb_gc_mark_global_tbl): rb_global_tbl may be 0 in + very early stage. + + * thread.c (thread_cleanup_func) [IA64]: clear register stack position. + (thread_start_func_2) [IA64]: record the beginning of register + stack using extra argument. + (rb_gc_save_machine_context) [IA64]: record the end of register + stack. + + * gc.c [IA64] (SET_STACK_END): record the end of register stack. + (garbage_collect) [IA64]: use recorded register stack area for + GC marking. + (yarv_machine_stack_mark) [IA64]: GC mark from the register stack + area. + + * yarvcore.c [IA64] (rb_gc_register_stack_start): defined. + (Init_VM): store th->self on stack to fix GC problem. + (Init_yarv) [IA64]: initialize the beginning of register stack. + + * yarvcore.h (struct rb_thread_struct) [IA64]: new members for + register stack area. + + * thread_pthread.ci (thread_start_func_1) [IA64]: call + thread_start_func_2 with the end of register stack. + + * cont.c (struct rb_context_struct) [IA64]: new members for register + stack area. + (cont_mark) [IA64]: GC mark from register stack area. + (cont_free) [IA64]: free saved register stack. + (cont_save_machine_stack) [IA64]: record the position and contents + of the register stack. + (cont_capture): store cont->self on stack to fix GC problem. + (cont_restore_1) [IA64]: restore the register stack. + [IA64] (register_stack_extend): new function. + (cont_restore_0) [IA64]: call register_stack_extend instead of + cont_restore_1. + + [ruby-dev:30982] + +Thu Jun 14 17:09:48 2007 Nobuyoshi Nakada + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser): handle more + extensions. [ruby-dev:30972] + +Thu Jun 14 14:40:42 2007 Tanaka Akira + + * lib/securerandom.rb: document updated. + suggested by NaHi. [ruby-dev:30966] + +Wed Jun 13 22:42:06 2007 Yukihiro Matsumoto + + * gc.c (garbage_collect): update IA64 register stack code. + [ruby-dev:30971] + +Wed Jun 13 06:05:12 2007 Nobuyoshi Nakada + + * configure.in (darwin): prohibit loading extension libraries to + miniruby. + +Tue Jun 12 21:50:51 2007 Yukihiro Matsumoto + + * parse.y (call_args): no allow splat after assocs. takes + consistency over compatibility. + + * parse.y (call_args2): ditto + +Tue Jun 12 14:53:51 2007 Nobuyoshi Nakada + + * lib/mkmf.rb (Logging.quiet, Logging.message): added quiet flag and + use it. [ruby-core:10909] + + * lib/mkmf.rb (find_header): use header names in the message. + +Sun Jun 10 18:37:13 2007 Nobuyoshi Nakada + + * ext/probeprofiler/probeprofiler.c: clean warnings. + +Sun Jun 10 18:32:24 2007 Nobuyoshi Nakada + + * missing/isinf.c, missing/dup2.c, missing/strtod.c, missing/x68.c, + missing/alloca.c: use "ruby/config.h". + +Sun Jun 10 17:49:20 2007 Nobuyoshi Nakada + + * instruby.rb (install_recursive): should check parent directories of + the destination. [ruby-dev:30947] + +Sun Jun 10 16:59:39 2007 Nobuyoshi Nakada + + * parse.y (do_block, brace_block): fix line numbers. [ruby-dev:30831] + +Sun Jun 10 16:57:20 2007 Nobuyoshi Nakada + + * instruby.rb (install_recursive): add :glob option rather than + using FNM_DOTMACH. + + * instruby.rb (ext-comm): make header directory first. + +Sun Jun 10 16:10:58 2007 NAKAMURA Usaku + + * test/ruby/test_beginendblock.rb: typo. + +Sun Jun 10 16:07:10 2007 Nobuyoshi Nakada + + * instruby.rb (install_recursive): skip .svn directories. + +Sun Jun 10 15:44:43 2007 Nobuyoshi Nakada + + * win32/Makefile.sub (config.status): rubyhdrdir was missing. + +Sun Jun 10 15:26:36 2007 Tanaka Akira + + * Makefile.in: use --output-file for gperf to not leave lex.c.tmp. + +Sun Jun 10 15:11:07 2007 Nobuyoshi Nakada + + * Makefile.in, win32/Makefile.sub (XCFLAGS): -I. is needed for *.inc. + + * ext/extmk.rb: prepend also topdir to mflags at last. + +Sun Jun 10 13:47:36 2007 Nobuyoshi Nakada + + * test/ruby/test_beginendblock.rb (test_should_propagate_signaled): + get rid of invoking shell. [ruby-dev:30942] + +Sun Jun 10 12:56:46 2007 Nobuyoshi Nakada + + * include/ruby: moved public headers. + + * instruby.rb (install_recursive): skip backup files. + + * instruby.rb (ext-comm): install only current platform headers. + +Sun Jun 10 10:42:04 2007 Tanaka Akira + + * lib/securerandom.rb: renamed from lib/secrand.rb. + suggested by NaHi. [ruby-dev:30934] + +Sat Jun 9 06:40:05 2007 Tanaka Akira + + * lib/secrand.rb: rename SecRand() to SecRand.random_number. + suggested by NaHi. [ruby-dev:30934] + +Fri Jun 8 16:34:20 2007 Tanaka Akira + + * ext/zlib/zlib.c (gzfile_s_open): use FilePathValue to support + to_path. + +Fri Jun 8 16:11:00 2007 Koichi Sasada + + * eval_jump.h: th->errinfo should clear with nil. + +Fri Jun 8 14:53:28 2007 Yukihiro Matsumoto + + * parse.y (call_args): allow splat argument after unpacked + assocs like 1.8 does. + + * parse.y (call_args): ditto. + +Fri Jun 8 14:26:18 2007 Tanaka Akira + + * lib/secrand.rb: new file for secure random interface. + + * lib/cgi/session.rb: use secrand for generating cookies. + +Fri Jun 8 12:44:37 2007 NAKAMURA Usaku + + * {win32,wince}/Makefile.sub: add lex.c rule. + +Fri Jun 8 11:54:18 2007 Tanaka Akira + + * lex.c.blt: moved from lex.c. + + * Makefile.in: use lex.c.blt if gperf is not available. + [ruby-list:8212], [ruby-list:8214], [ruby-list:24667], + [ruby-talk:120857], [ruby-dev:28102] + +Thu Jun 7 21:38:39 2007 Koichi Sasada + + * thread.c (rb_thread_execute_interrupts): invoke ensure when + main thread exits. + +Thu Jun 7 19:02:48 2007 Tanaka Akira + + * lib/pp.rb: call original "method" method instead of redefined one. + +Thu Jun 7 17:20:57 2007 Koichi Sasada + + * iseq.c (prepare_iseq_build): freeze filename and name string. + + * variable.c: freeze class name string. + +Thu Jun 7 12:48:33 2007 Koichi Sasada + + * cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911]. + + * test/ruby/test_fiber.rb: add a test. + +Thu Jun 7 07:24:36 2007 NARUSE, Yui + + * lib/json/common.rb: Ponder offering parse! method. + + * lib/json/editor.rb: be a bit more robust while loading data. + + * ext/json/ext/{generator,parser}/extconf.rb: + add a have_header directive for st.h + + * test/json: fix some tests. + +Thu Jun 7 03:29:18 2007 Koichi Sasada + + * test_fiber.rb: add a test (Continuation and Fiber). + +Thu Jun 7 03:17:24 2007 Koichi Sasada + + * cont.c (cont_new): add debug message. + + * cont.c (cont_restore_1): copy stack information from fiber. + + * cont.c (rb_fiber_s_new): fix to mark created fiber. + + * test/ruby/test_fiber.rb: add some tests around Thread and Fiber. + + * yarvcore.c (thread_free): fix to skip freeing stack if root fiber + is available. + +Thu Jun 7 01:03:20 2007 Koichi Sasada + + * eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT(). + + * cont.c (rb_fiber_start): remove zero-clearing tag. + +Wed Jun 6 20:23:46 2007 Koichi Sasada + + * insns.def (invokeblock): fix of splat argument. + (splat same as normal method dispatch) + +Wed Jun 6 16:27:25 2007 NAKAMURA Usaku + + * insns.def: fixed indentation. + +Wed Jun 6 10:58:23 2007 Koichi Sasada + + * eval.c (rb_yield): fix to check Qundef. + +Wed Jun 6 10:57:45 2007 Koichi Sasada + + * test/ruby/test_continuation.rb: add a test for last commit. + +Wed Jun 6 10:55:42 2007 Koichi Sasada + + * cont.c (rb_cont_call): forbid calling dead fiber with + Continuation#call. + +Wed Jun 6 10:50:01 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix around yield arguments + (with NODE_ARGSCAT). + +Wed Jun 6 02:50:53 2007 Koichi Sasada + + * cont.c (rb_fiber_start): clear th->tag and check error to fix + [ruby-dev:30888] and [ruby-dev:30889]. + + * eval_intern.h: fix rb_fiber_start() prototype. + + * test/ruby/test_fiber.rb: add tests for above. + +Wed Jun 6 02:40:20 2007 NAKAMURA Usaku + + * insnhelper.h, insns.def (DEC_SP): shouldn't use unary minus operator + in pointer operation. some compilers (such as VC++8 x64) cannot deal + it with expected way. + +Wed Jun 6 02:19:48 2007 Koichi Sasada + + * parse.y (new_yield), compile.c (iseq_compile_each): fix + passing parameter. + + * eval.c, eval_jump.h: simplify rb_yield*. + + * proc.c (proc_mark): fix to mark proc->block.proc. + + * proc.c (Init_Proc): add Proc#lambda? + + * test/ruby/test_lambda.rb: add some tests. + + * vm.c (invoke_block): fix to check lambda block or not. + + * vm.c (th_yield_setup_args): fix to check arguments size + when lambda block. + +Tue Jun 5 16:30:38 2007 Yukihiro Matsumoto + + * io.c (rb_f_p): returns arguments to intervene. [ruby-dev:29736] + +Tue Jun 5 14:07:55 2007 Koichi Sasada + + * insns.def (invokeblock): check block is created by lambda + or Proc.new. + + * vm.c (block_proc_is_lambda): added. + +Tue Jun 5 14:47:52 2007 Yukihiro Matsumoto + + * lib/pp.rb (PP::PPMethods::seplist): revert last change to work + around wrapper bug. [ruby-dev:30840] + +Tue Jun 5 14:11:15 2007 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback. + +Tue Jun 5 13:32:04 2007 Nobuyoshi Nakada + + * compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c, + pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci, + thread_pthread.ci, thread_win32.ci: fixed indentation. + + * call_cfunc.ci: protoized. + + * thread_win32.ci: fixed typo. + +Tue Jun 5 13:17:11 2007 Nobuyoshi Nakada + + * call_cfunc.ci, compile.c, dir.c, eval.c, eval_jump.h, numeric.c, + pack.c, re.c, thread.c, thread_win32.ci, vm.c, vm_dump.c: fixed + indentation. + +Mon Jun 4 21:15:45 2007 NARUSE, Yui + + * lib/json.rb, lib/json, ext/json, test/json: + import JSON library. + + * ext/nkf: import nkf.c rev:1.124 + Support CP10001. + +Mon Jun 4 20:52:58 2007 Yukihiro Matsumoto + + * numeric.c (int_round): should not just truncate. + +Sat Jun 2 16:48:55 2007 Koichi Sasada + + * cont.c (Fiber#pass): rename to Fiber#yield. Block parameter + of fiber body receive first yield values. + e.g.: Fiber.new{|x| p x}.yield(:ok) #=> :ok + + * cont.c: rename rb_context_t#retval to rb_context_t#value. + + * test/ruby/test_fiber.rb: ditto. + +Sat Jun 2 16:45:21 2007 Koichi Sasada + + * proc.c (Init_Proc): remove a line break. + +Sat Jun 2 01:27:27 2007 Yukihiro Matsumoto + + * numeric.c (int_round): small optimization to handle bignums. + +Fri Jun 1 13:02:35 2007 NAKAMURA Usaku + + * insnhelper.h (INC_SP): shouldn't cast ``x'' to unsigned type because + it might be a negative value. + + * insnhelper.h, insns.def: shouldn't use unary minus operator in index + operator. some compilers (such as VC++8 x64) cannot deal it with + expected way. + +Fri Jun 1 11:33:40 2007 Nobuyoshi Nakada + + * numeric.c (num_round): should convert self to Float. + [ruby-dev:30860] + +Fri Jun 1 02:01:13 2007 Yukihiro Matsumoto + + * numeric.c (flo_round): now takes optional argument to specify + number of digits, like round() in Python/PHP. + + * numeric.c (num_round): ditto. + +Fri Jun 1 01:58:33 2007 Yukihiro Matsumoto + + * enum.c (each_with_index_i): should work well with continuation. + a patch from sheepman . + [ruby-dev:30846] + +Thu May 31 17:27:53 2007 Nobuyoshi Nakada + + * lib/benchmark.rb (Benchmark::Job::item): avoid modifying the + argument unintentionally. [ruby-talk:253676] + +Wed May 30 14:43:00 2007 Koichi Sasada + + * cont.c (cont_capture): store all local variables in heap + ([ruby-dev:30832]). + + * vm.c (th_stack_to_heap): added. + + * test/ruby/test_continuation.rb: add a test for above. + + * eval_intern.h (th_get_ruby_level_cfp): fix to clean code. + +Wed May 30 13:32:34 2007 Shugo Maeda + + * lib/net/imap.rb (ResponseParser#next_token): fixed + error message. + + * lib/net/imap.rb (ResponseParser#parse_error): fixed + the condition not to refer @token.symbol unexpectedly. + Thanks, Dick Monahan. + +Wed May 30 13:24:33 2007 Shugo Maeda + + * lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX + responses for some FTP servers. + +Wed May 30 04:18:37 2007 Nobuyoshi Nakada + + * eval.c (rb_eval_cmd): just return if no exceptions. + [ruby-dev:30820] + +Wed May 30 02:14:25 2007 Nobuyoshi Nakada + + * signal.c (interrupt_init): needs to pass nil for Interrupt. + [ruby-core:11038] + + * signal.c (trap): fixed segfaults. [ruby-dev:30830] + +Wed May 30 00:50:48 2007 Nobuyoshi Nakada + + * gc.c (rb_source_filename, obj_free): suppress warnings. + + * gc.c (garbage_collect, yarv_machine_stack_mark): fixed typo. + http://bugs.debian.org/426267 + +Wed May 30 00:24:09 2007 Nobuyoshi Nakada + + * parse.y (open_args, arg_ambiguous, parser_warning): should not use + rb_warning in the parser. + +Tue May 29 12:31:33 2007 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_opendir): removed duplicated code. + +Tue May 29 10:55:24 2007 Koichi Sasada + + * cont.c: fix bug around Continuation and Fiber. + + * test/ruby/test_continuation.rb: add tests for Continuation. + +Tue May 29 10:54:34 2007 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_opendir, rb_w32_readdir): eliminate magic + numbers. + +Mon May 28 10:27:14 2007 Nobuyoshi Nakada + + * cont.c: fixed a function name. + +Mon May 28 03:56:44 2007 Koichi Sasada + + * cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail. + Fiber is known as "Micro Thread", "Coroutine", and other terms. + At this time, only Fiber#pass is supported to change context. + I want to know more suitable method name/API for Fiber (... do you + know more suitable class name instead of Fiber?) as "suspend/resume", + "call", "yield", "start/kick/stop/restart", .... + + * eval.c, eval_intern.h, thread.c, yarvcore.c, yarvcore.h: ditto. + +Sat May 26 00:38:21 2007 Nobuyoshi Nakada + + * eval.c (ruby_exec_internal): do nothing if no code. + + * compile.c (rb_iseq_compile): check node if NULL before check + nd_type. [ruby-talk:252956] + +Sat May 26 00:05:22 2007 Nobuyoshi Nakada + + * test/ruby/test_beginendblock.rb (test_should_propagate_signaled): + skip tests for exitstatus and termsig on the platforms where + signals not supported. + +Fri May 25 16:04:47 2007 Nobuyoshi Nakada + + * yarvcore.c (Init_VM): wrap already initialized structs to use + it directly. + +Fri May 25 11:09:47 2007 NAKAMURA Usaku + + * regint.h (include): on some platform, defines.h redefines + SIZE_OF_LONG_LONG so shouldn't re-include config.h after included + defines.h. + + * regint.h (vsnprintf): ruby on windows already have vsnprintf macro. + +Thu May 24 12:07:27 2007 Koichi Sasada + + * cont.c: check across trap violation. + + * eval.c, yarvcore.h: ditto. + +Thu May 24 11:46:55 2007 Koichi Sasada + + * gc.c, yarvcore.c: fix to mark VM structure on startup. + + * yarvcore.h: disable USE_CACHED_VALUE. + +Thu May 24 01:54:53 2007 Koichi Sasada + + * cont.c: support callcc which everyone love. + incomplete. please give me bug reports. + + * common.mk, inits.c, thread.c: ditto. + + * yarvcore.c: export thread_mark(). + + * yarvcore.h: disable value cache option. + + * eval_intern.h: set th_get_ruby_level_cfp to inline. + +Wed May 23 15:39:02 2007 Yukihiro Matsumoto + + * common.mk: add a rule for regsyntax.c. + +Wed May 23 10:31:53 2007 Yukihiro Matsumoto + + * oniguruma.h: updated to Oniguruma 5.7.0. + + * regsyntax.c, unicode.c: new files along with Oniguruma 5.x. + +Wed May 23 06:51:46 2007 URABE Shyouhei + + * lib/cgi.rb (CGI#[]): get rid of exceptions being raised. + [ruby-dev:30740], Thanks Kentaro KAWAMOTO. + +Wed May 23 05:49:49 2007 Nobuyoshi Nakada + + * ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default + load path to get rid of load pre-installed extensions/libraries. + [ruby-core:11017] + +Tue May 22 16:37:36 2007 Yukihiro Matsumoto + + * ruby.c (set_arg0): support RSTRING_LEN on HP-UX. a patch from + WATANABE Tetsuya . [ruby-dev:30806] + +Mon May 21 13:40:00 2007 Koichi Sasada + + * compile.c, vm_macro.def: support tail call optimization + (on default, this feature is not enabled). + + * iseq.c, compile.c, vm_opts.h: add "tailcall_optimization" + option. + + * sample/test.rb (test_ok): fix to adjust tailcall stack layout. + + * insns.def, vm.c, compile.c, yarvcore.c, yarvcore.h: + add opt_gt, opt_le instructions. + +Mon May 21 03:34:06 2007 Minero Aoki + + * lib/net/smtp.rb: CRAM-MD5 authentication did not work. + [ruby-dev:30770] + +Sat May 19 10:26:01 2007 Tadayoshi Funaba + + * lib/date/format.rb (Date._parse): detects some OFX dates + (Of course not fully). + +Sat May 19 03:08:05 2007 Nobuyoshi Nakada + + * enum.c (enum_inject): minor improvement. [ruby-dev:30792] + + * enum.c (one_i): no needs to iterate once the result became false. + + * enum.c (enum_one): fix for an example. + + * enum.c (one_iter_i, none_iter_i): DRY.; + +Sat May 19 01:07:42 2007 Yukihiro Matsumoto + + * enum.c (enum_inject): it is now can work without block. you + have to specify two argument method name as the first argument. + + * enum.c (Init_Enumerable): reduce is new alias to inject. + +Sat May 19 01:05:33 2007 Nobuyoshi Nakada + + * file.c (Init_File): method definition mismatch. + +Fri May 18 16:44:04 2007 Yukihiro Matsumoto + + * file.c (Init_File): add to_path method to File objects. + +Fri May 18 11:12:39 2007 Nobuyoshi Nakada + + * ruby.c (DllMain, ruby_init_loadpath): use DLL instance handle given + to DllMain instead of VirtualQuery so that loadpath becomes relative + from the DLL on WinCE too. + +Thu May 17 17:03:11 2007 Nobuyoshi Nakada + + * misc/ruby-style.el (ruby-style-label-indent): for yacc rules. + +Thu May 17 13:30:27 2007 Yukihiro Matsumoto + + * parse.y (f_arg): remove typo from ripper description. + +Thu May 17 13:23:38 2007 Koichi Sasada + + * parse.y, compile.c (set_arguments): fix to support in-paren + parameter (ex: def foo((a, b))). + +Thu May 17 13:01:52 2007 Koichi Sasada + + * iseq.c (ruby_iseq_disasm): fix to show post arg info. + +Thu May 17 12:56:52 2007 Koichi Sasada + + * debug.c (ruby_debug_node): fix to show node line. + +Wed May 16 21:48:44 2007 NAKAMURA, Hiroshi + + * lib/logger.rb (Logger::Application): remove meaningless logdev + attribute and added logger attribute instead. [ruby-core:11143] + also added Logger#formatter rdoc comment. + +Tue May 15 16:40:07 2007 Nobuyoshi Nakada + + * test/ruby/test_beginendblock.rb (test_endblockwarn): now parser + warnings emit source names and line numbers. + +Tue May 15 15:01:38 2007 NAKAMURA Usaku + + * win32/win32.c (init_stdhandle): stderr should be without buffering, + but mswin32 use buffering when stderr is not connected to tty. + +Mon May 14 02:12:07 2007 Yukihiro Matsumoto + + * array.c (rb_ary_zip): a.zip(b,c) should return an array, not + enumerator. + + * array.c (rb_ary_zip): a.zip(b,c) should return array with size + truncated to the size of its shortest argument array. + [incompatible] + +Mon May 14 01:54:15 2007 Yukihiro Matsumoto + + * array.c (rb_ary_choice): should return nil when the array is + empty. + +Sat May 12 18:26:36 2007 Minero Aoki + + * lib/net/http.rb (tokens): forgot to add strip. [ruby-core:11120] + + * test/net/http/test_http.rb: test Net::HTTP.post_form. + +Fri May 11 15:27:09 2007 Nobuyoshi Nakada + + * iseq.c (iseq_data_to_ary): internal IDs must not be exposed. + [ruby-core:11073] + + * parse.y (internal_id_gen): now returns scope local ID instead of + global one. + +Thu May 10 15:15:53 2007 NAKAMURA Usaku + + * test/ruby/test_super.rb: add tests. + +Thu May 10 15:14:05 2007 NAKAMURA Usaku + + * ext/iconv/iconv.c (iconv_s_conv): rdoc fix. + +Thu May 10 15:09:23 2007 Nobuyoshi Nakada + + * parse.y (POINTER_P): pointer may be larger than long. + + * parse.y (vtable_size, vtable_included, vtable_tblcpy, + vtable_to_tbl): constified. + +Thu May 10 10:13:14 2007 Nobuyoshi Nakada + + * thread.c (rb_thread_priority): rdoc fix; the initial value is + inherited from the creating thread. [ruby-core:10607] + +Wed May 9 12:28:57 2007 Nobuyoshi Nakada + + * bignum.c (Init_Bignum), numeric.c (Init_Numeric): added fdiv as + aliases of quo. [ruby-dev:30771] + +Tue May 8 23:39:09 2007 Tadayoshi Funaba + + * lib/date/format.rb (Date._parse): revised treatment of + hyphened/separatorless dates. + + * lib/date/format.rb: some trivial adjustments. + +Tue May 8 20:23:07 2007 Tadayoshi Funaba + + * lib/date/format.rb: reverted. + +Tue May 8 19:32:18 2007 Keiju Ishitsuka + + * lib/rational.rb: fix high-precision Rationals cannot be + converted to Floats. [ruby-Bugs:10502], [ruby-core:11069], + [ruby-dev:30743] + +Mon May 7 10:59:55 2007 Kouhei Sutou + + * lib/rss/image.rb, test/rss/test_image.rb: fixed Image module + namespace URI. reported by Dmitry Borodaenko. Thanks. + +Sun May 6 18:44:11 2007 Minero Aoki + + * lib/net/http.rb (Net::HTTP.post_form): allow an Array of String + for pairs argument. [ruby-Bugs:10340] + + * lib/net/http.rb (Net::HTTP#set_form_data): ditto. + +Sun May 6 17:54:36 2007 Minero Aoki + + * lib/net/http.rb: Connection header field might include both of + "keep-alive" token and "close" token. [ruby-core:10818] + +Sat May 5 16:26:33 2007 Nobuyoshi Nakada + + * lib/date/format.rb (Format::Bag#method_missing): get rid of + modifying original argument. [ruby-core:11090] + +Thu May 3 22:20:08 2007 Nobuyoshi Nakada + + * configure.in, defines.h, eval_load.c (rb_feature_p, rb_provided, + search_required, rb_require_safe), ext/extmk.rb: Fix + a bug where a statically linked extension cannot be autoloaded. + [ruby-dev:30023] / [ruby-dev:30239] + + * thread.c: added an internal class, Barrier. + + * thread.c: copied rdocs from fastthread. + + * yarvcore.h (struct rb_vm_struct): moved loading_table from global. + +Thu May 3 18:10:12 2007 Nobuyoshi Nakada + + * vm_evalbody.ci, insns.def, vm.c, tool/insns2vm.rb (rb_num_t): + renamed to get rid of name clash. [ruby-dev:30504] + + * yarvcore.c (ruby_thread_init): ditto. + +Wed May 2 18:52:58 2007 Koichi Sasada + + * vm.c, yarvcore.h, yarvcore.c, insns.def: fix to mark VM stack + in correct range. + +Wed May 2 17:13:26 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_quo): now calculate in integer. [ruby-dev:30753] + +Wed May 2 15:14:56 2007 Koichi Sasada + + * eval_method.h: add redefine checks ([ruby-dev:30751]). + +Wed May 2 11:22:52 2007 Koichi Sasada + + * compile.c: use Qtrue instead of 2. + + * vm.c, insns.def: support "lambda" calling convention. + +Wed May 2 06:46:43 2007 Nobuyoshi Nakada + + * error.c, parse.y, ruby.h (rb_compile_warn, rb_compile_warning): warn + for compilation. the parser should no longer use rb_warn() and + rb_warning(). [ruby-dev:30121] + +Wed May 2 05:45:21 2007 Nobuyoshi Nakada + + * parse.y (assoc): result of assoc_new needs to be an assoc. + +Wed May 2 05:40:43 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_pow): improvement by calculating from MSB and using + factorization. + +Tue May 1 18:45:45 2007 Koichi Sasada + + * sample/test.rb: import matzruby's sample/test.rb. + +Tue May 1 17:46:05 2007 Yukihiro Matsumoto + + * array.c (rb_ary_choice): a new method to choose an element + randomly from an array. + + * array.c (rb_ary_choice): fixed mistake from RDoc. + +Tue May 1 13:59:18 2007 Koichi Sasada + + * proc.c (proc_arity): fix an arity bug ([ruby-core:11060]). + +Tue May 1 13:12:49 2007 Koichi Sasada + + * yarvcore.h, compile.c (set_arguments): support post arguments. + + * test/ruby/test_method.rb: add tests for above. + + * test/ruby/test_proc.rb: ditto. + + * proc.c: fix an arity bug ([ruby-core:11029]). + + * vm.c, vm.h, insns.def, vm_dump.h: fix bmethod process. + + * vm.c: support block argument on block parameter. + +Fri Apr 27 17:05:41 2007 Nobuyoshi Nakada + + * numeric.c (int_pow): bugfix of overflow detection. + + * numeric.c (int_pow): rb_big_pow() may return other than Bignum. + +Fri Apr 27 01:51:50 2007 Koichi Sasada + + * compile.c: support multiple splat (e.g, [a, *b, *c, e, *f]). + +Fri Apr 27 00:03:48 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_pow): truncate all zero BDIGITs. [ruby-dev:30733] + +Thu Apr 26 17:31:00 2007 Nobuyoshi Nakada + + * bignum.c (rb_big_pow): reduce multiplying for even number. + + * numeric.c (int_pow): calculate power in Fixnum as possible. + [ruby-dev:30726] + +Thu Apr 26 17:18:51 2007 Nobuyoshi Nakada + + * parse.y: fixes for ripper. + + * parse.y (primary): reduced duplicated code. + + * parse.y (f_arg_item): should not override by meaningless value. + + * parse.y (f_arg, assocs): should not use $$ before assigned. + + * parse.y (assoc_list): dispatch assoclist_from_args for assocs as + well as args. + + * parse.y (assoc): return assoc if dispatched result is $1. + +Thu Apr 26 13:54:51 2007 Nobuyoshi Nakada + + * misc/ruby-style.el: new file. C/C++ style for ruby source code. + +Wed Apr 25 19:49:16 2007 Tanaka Akira + + * ext/socket/socket.c (unix_send_io, unix_recv_io): use CMSG_DATA to + align file descriptor appropriately. + +Wed Apr 25 15:23:29 2007 NAKAMURA Usaku + + * win32/win32.c (NtInitialize, exit_handler): add initializing and + cleanup of critical section object for select. + + * win32/win32.c (do_select): block reentrance. + + * win32/win32.c (rb_w32_select): 0 sec polling of socket. this is + workaround because winsock cannot do select at same socket at the + same time by two or more threads. + +Wed Apr 25 14:10:47 2007 Koichi Sasada + + * ext/probeprofiler/probeprofiler.c: fix function name and + return value. + +Wed Apr 25 12:42:40 2007 Koichi Sasada + + * yarvcore.h: remove rb_control_frame_t#callee_id. + + * vm_macro.def: ditto. + + * eval_intern.h (exec_event_hooks): fix to check event flags + + * eval_intern.h (EXEC_EVENT_HOOK): fix to re-check event flags. + + * ext/probeprofiler : added. this profiler is sampling based + profiler. + + * vm.c: add rb_thread_current_status() API for probeprofiler. + + * thread.c (rb_thread_execute_interrupts): add comments. + +Wed Apr 25 10:36:03 2007 Nobuyoshi Nakada + + * eval_intern.h (PUSH_TAG): no argument now. + + * eval.c, eval_error.h, eval_jump.h, eval_load.c, proc.c, thread.c: + ditto. + + * thread.c (alloc_event_hook, rb_thread_remove_event_hook): should + return value. + +Tue Apr 24 09:33:57 2007 Nobuyoshi Nakada + + * dir.c (do_stat, do_lstat, do_opendir): should not warn ENOTDIR. + [ruby-talk:248288] + +Mon Apr 23 22:14:42 2007 Nobuyoshi Nakada + + * ext/extmk.rb ($ruby): add extout directory to include path. + [ruby-core:11003] + + * lib/mkmf.rb (libpathflag): not to append RPATHFLAG to current + directory. + + * lib/mkmf.rb (init_mkmf): add current directory to default + library path with highest priority. [ruby-core:10960] + + * lib/mkmf.rb (LINK_SO): LIBPATH to be placed before DLDFLAGS. + +Fri Apr 20 16:05:22 2007 Nobuyoshi Nakada + + * configure.in (LIBPATHFLAG, RPATHFLAG): no needs to be quoted, + it is done by libpathflag in mkmf.rb. + +Fri Apr 20 12:27:04 2007 Nobuyoshi Nakada + + * lib/optparse.rb: fix to override conv proc. + +Fri Apr 20 12:21:28 2007 Nobuyoshi Nakada + + * eval.c (ruby_cleanup): fixed access to out of bound, and inverted + the order of errinfos. + +Fri Apr 20 10:33:23 2007 Koichi Sasada + + * eval_intern.h: add prototypes of rb_sourceline() and + rb_sourcefile(). + +Fri Apr 20 02:37:48 2007 Nobuyoshi Nakada + + * eval.c (ruby_cleanup): re-send signal. [ruby-dev:30516] + + * eval_error.h (error_handle): no message when exiting by signal. + + * intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes. + + * signal.c (esignal_init): takes a signal number and an optional + signal name. + + * signal.c (interrupt_init): pass SIGINT always. + + * signal.c (ruby_default_signal): invoke system default signal + handler. + + * signal.c (rb_f_kill): use NUM2PIDT instead of NUM2INT. + + * signal.c (rb_signal_exec, trap): handle SIGTERM. [ruby-dev:30505] + + * thread.c (rb_thread_signal_raise): now takes signal number instead + of signal name. + + * thread.c (rb_thread_signal_exit): since rb_make_exception() calls + #exception method, rb_class_new_instance() is not needed here. + + * yarvcore.h (struct rb_vm_struct), eval_jump.h (terminate_process): + exit_code is no longer stored in VM. + +Thu Apr 19 18:37:49 2007 Koichi Sasada + + * eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h: + support set_trace_func (incomplete. id and klass + don't be passed). And support Thread#set_trace_func + which hook only specified thread and Thread#add_trace_func + which add new trace func instead of replace old one. + C level API was modified. See thread.c (logic) and + yarvcore.h (data structures). + + * vm.c, vm_macro.def: add hook points. + + * compile.c, insns.def: fix "trace" instruction. + + * iseq.c, vm_macro.h: add compile option "trace_instruction". + + * test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func. + +Thu Apr 19 20:57:50 2007 Yukihiro Matsumoto + + * parse.y (symbol): symbols should be followed by EXPR_ENDARG. + + * parse.y (dsym): ditto. + + * parse.y (parser_yylex): strings should be followed by + EXPR_ENDARG. + + * parse.y (parser_yylex): ditto for numbers. + + * parse.y (parser_yylex): EXPR_ENDARG after ']' and '}'. + +Thu Apr 19 17:46:36 2007 Koichi Sasada + + * lib/optparse.rb: fix to override conv proc. + +Wed Apr 18 10:41:21 2007 Nobuyoshi Nakada + + * util.c (ruby_strtod): exponent is radix 10. [ruby-talk:248272] + +Wed Apr 18 02:50:50 2007 Nobuyoshi Nakada + + * yarvcore.c (th_init2): push initial blockptr value for + rb_block_given_p() outside ruby_exec(). [ruby-core:10923] + +Wed Apr 18 02:30:24 2007 Nobuyoshi Nakada + + * configure.in (LDFLAGS): prepend -L. instead appending it to + XLDFLAGS. [ruby-core:10933] + + * configure.in (Makefile): remove $U for automake from MISSING. + [ruby-talk:248171] + +Mon Apr 16 22:56:01 2007 Yukihiro Matsumoto + + * ext/pty/expect_sample.rb: avoid symbolic link representation for + expect. a patch from Kazuhiro NISHIYAMA . + [ruby-dev:30714] + +Mon Apr 16 22:51:11 2007 Yukihiro Matsumoto + + * sample: replace TRUE, FALSE with true, false respectively. + a patch from Kazuhiro NISHIYAMA . + [ruby-dev:30713] + +Mon Apr 16 17:08:02 2007 Nobuyoshi Nakada + + * lib/optparse.rb (make_switch): do not clobber converter if pattern + has no convert method. reported by sheepman in [ruby-dev:30709]. + +Mon Apr 16 16:49:32 2007 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_seek): consistent behavior with + IO#seek. patch by sheepman in [ruby-dev:30710]. + +Mon Apr 16 16:34:08 2007 Yukihiro Matsumoto + + * parse.y (parser_yylex): should set command_start after block + starting "do"s and braces. [ruby-core:10916] + +Mon Apr 16 10:51:37 2007 Yukihiro Matsumoto + + * enum.c (enum_each_with_index): each_with_index to forward + arguments to each. [ruby-core:10921] + +Mon Apr 16 10:43:10 2007 Yukihiro Matsumoto + + * time.c (time_arg): should allow to specify 24:00. + [ruby-core:10915] + +Sun Apr 15 09:12:54 2007 Tadayoshi Funaba + + * lib/date/format.rb: added some zone names. + + * lib/date/format.rb (_parse): now interprets doted numerical + dates as a big endian (except dd.mm.yyyy). + +Thu Apr 12 17:13:22 2007 Koichi Sasada + + * thread.c (mutex_try_lock): check and set owner thread. + + * thread_pthread.ci: fix to show error code in error message. + +Thu Apr 12 17:11:54 2007 Koichi Sasada + + * eval.c (rb_rescue2): restore cfp ([ruby-dev:30582]). + +Thu Apr 12 16:06:48 2007 Koichi Sasada + + * eval.c (rb_protect): restore cfp ([ruby-dev:30671]). + +Thu Apr 12 16:04:31 2007 Koichi Sasada + + * compile.c (iseq_compile_each): check node->nd_state == 1, not !0. + +Wed Apr 11 16:35:16 2007 NAKAMURA Usaku + + * win32/win32.[ch] (rb_w32_enter_critical, rb_w32_leave_critical): no + need to reject reentrance. removed. + + * rubysig.h (RUBY_CRITICAL): follow above changes. + + * rubysig.h (TRAP_BEG, TRAP_END): no need to save errno. + +Tue Apr 10 17:02:17 2007 NAKAMURA Usaku + + * win32/win32.c (rb_w32_fclose, rb_w32_close): need to save errno + before calling original fclose()/close(). + +Tue Apr 10 16:14:22 2007 NAKAMURA Usaku + + * thread_win32.ci (w32_wait_events): check whether interrupt_event is + valid handle or not. + + * thread_win32.ci (native_thread_destroy): clear interrupt_event when + close it. + +Tue Apr 10 15:53:17 2007 NAKAMURA Usaku + + * thread_pthread.ci (native_thread_create): initialize sleep_cond. + fixed: [ruby-dev:30675] + +Mon Apr 9 18:48:57 2007 NAKAMURA Usaku + + * thread.c (do_select): ubf_select() is not necessary. interrupt is + checked in the loop. + +Mon Apr 9 18:27:26 2007 NAKAMURA Usaku + + * thread.c (do_select): use ubf_select() as UBF on windows. + + * win32/win32.c (do_select): shouldn't call catch_interrupt() here. + fixed: [ruby-dev:30674], reported by wanabe. + +Mon Apr 9 09:24:32 2007 Shugo Maeda + + * lib/net/imap.rb (disconnect): call shutdown for + SSLSocket. Thanks, Technorama Ltd. + +Sun Apr 8 13:28:17 2007 Nobuyoshi Nakada + + * compile.c (defined_expr): test arguments of NODE_CALL and so + on as well as NODE_ATTRASGN. [ruby-core:10886] + +Fri Apr 6 10:56:29 2007 NAKAMURA Usaku + + * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_get_group): get rid of + warning. we are aware of it. + +Fri Apr 6 04:00:24 2007 Technorama Ltd. + + * ext/openssl/ossl_{bn,x509{attr,cert,name,store}}.c: + Add documentation. + +Thu Apr 5 17:59:19 2007 Nobuyoshi Nakada + + * compile.c (defined_expr): support for assignment. + [ruby-core:10867] + + * compile.h (ADD_CATCH_ENTRY): removed temporary variable. + +Thu Apr 5 15:13:34 2007 NAKAMURA Usaku + + * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_alloc): should + return value. + +Thu Apr 5 14:58:49 2007 Technorama Ltd. + + * ext/openssl/ossl_pkcs5.c: New module. + + * ext/openssl/ossl_{cipher,digest,pkcs7,pkcs12}.c: + Remove redundant module namespace. + + * ext/openssl/lib/openssl/{cipher,digest}.rb + Add backwards compatible classes for rearranged classes. + + * ext/openssl/ossl_{pkcs7,pkcs12}.c: Add documentation. + +Thu Apr 5 00:42:48 2007 Nobuyoshi Nakada + + * error.c (rb_notimplement), io.c (pipe_open): removed definite + articles and UNIX manual section from messages. [ruby-dev:30690] + +Wed Apr 4 17:09:17 2007 Nobuyoshi Nakada + + * io.c (pipe_open): refined the message of NotImplementedError. + [ruby-dev:30685] + +Wed Apr 4 12:29:02 2007 NAKAMURA Usaku + + * error.c (rb_notimplement): should show the name of this func, + not callee. + +Wed Apr 4 10:18:04 2007 Nobuyoshi Nakada + + * io.c (popen_exec): should not close close-on-exec FDs. + [ruby-dev:30679] + + * io.c (pipe_open): raise NotImplementedError for command "-" on + platforms where fork(2) is not available. [ruby-dev:30681] + +Tue Apr 4 04:17:18 2007 Technorama Ltd. + + * ext/openssl/ossl_ssl.c: Add documentation. + +Tue Apr 3 16:22:24 2007 Nobuyoshi Nakada + + * ext/openssl/extconf.rb: check for functions added in 1.9. + + * ext/openssl/ruby_missing.h: check per features instead by + checking version code. [ruby-core:10845] + +Tue Apr 3 16:02:44 2007 Technorama Ltd. + + * ext/openssl/ossl_bn.c: More documentation. + + * ext/openssl/lib/ossl_{pkey,pkey_ec}.[ch]: Add elliptic curves. + +Tue Apr 3 15:50:41 2007 NAKAMURA Usaku + + * ext/socket/socket.c (s_recv, s_recvfrom): some systems (such as + windows) doesn't set fromlen if the socket is connection-oriented. + reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061] + +Tue Apr 3 09:36:55 2007 NAKAMURA Usaku + + * ext/openssl/ruby_missing.h: need to include version.h to check + RUBY_VERSION_CODE. + +Mon Apr 3 07:10:12 2007 Technorama Ltd. + + * ext/openssl/ossl_{ssl.[ch],ssl_session.c}, + ext/openssl/lib/openssl/lib/openssl/ssl.rb: + New SSL::Session class. Add session cb's, getter/setters, + config, and statistics methods. + +Mon Apr 3 04:00:23 2007 Technorama Ltd. + + * ext/openssl/{ossl.[ch],ossl_pkey.c} Add documentation. + + * ext/openssl/ossl_hmac.c Add reset method. + + * ext/openssl/ossl_cipher.c (Cipher#update) Take additional + buffer argument. + + * ext/openssl/{ossl_bio.c,ossl_ssl.c,ruby_missing.h} + compatibility with 1.8. + +Mon Apr 2 21:55:12 2007 Nobuyoshi Nakada + + * insns.def (throw), thread.c, yarvcore.h (throwed_errinfo): fixed + typo. + +Fri Mar 30 11:46:51 2007 NAKAMURA Usaku + + * win32/win32.c (rb_w32_cmdvector): fixed buffer size. reported by + wanabe [ruby-dev:30672] + + * win32/win32.c (init_env, insert, rb_w32_get_environ): use strdup + instead of malloc + strlcpy. suggested by nobu [ruby-dev:30673] + +Fri Mar 30 02:29:04 2007 Technorama + + * ext/openssl/ossl_{bn,cipher,digest,hmac,rand,pkey_{dh,dsa,rsa}}.c: + Add Documentation for various methods. + + * ext/openssl/lib/openssl/cipher.rb: Ditto + + * ext/openssl/ossl_bn.c: add lshift! and rshift! methods. + + * ext/openssl/ossl_digest.c: GetDigestPtr() also accept a string. + +Fri Mar 23 11:28:24 2007 NAKAMURA Usaku + + * win32/win32.c (init_env, insert, cmdglob, rb_w32_cmdvector, + rb_w32_opendir, rb_w32_readdir, rb_w32_strerror, rb_w32_stati64, + rb_w32_get_environ): use strlcpy() and strlcat(). + + * win32/win32.c (rb_w32_opendir): use realloc() instead of xrealloc(). + + * win32/win32.c (rb_w32_closedir): check NULL before free pointers. + +Fri Mar 23 00:24:52 2007 Keiju Ishitsuka + + * lib/shell: commit miss(support for ruby 1.9(YARV) thread model). + +Thu Mar 22 13:32:17 2007 NAKAMURA Usaku + + * win32/Makefile.sub (LIBS): remove an unnecessary library. + +Thu Mar 22 10:27:58 2007 NAKAMURA Usaku + + * test/ruby/test_bignum.rb (test_to_s): add tests for Bignum#to_s. + +Wed Mar 21 20:38:06 2007 NAKAMURA Usaku + + * marshal.c (w_short, w_long, w_object): get rid of VC++ warnings. + +Wed Mar 21 20:05:07 2007 Koichi Sasada + + * compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h, + proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h, + debug.c, debug.h: merge half-baked-1.9 changes. The biggest change + is to change node structure around NODE_SCOPE, NODE_ARGS. Every + scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS + represents more details of arguments information. I'll write a + document about detail of node structure. + +Wed Mar 21 17:04:30 2007 Nobuyoshi Nakada + + * bignum.c (rb_big2str0): round up for the most significant digit. + [ruby-core:10686] + +Tue Mar 21 08:20:00 2007 Nathaniel Talbott + + * test/testunit/collector/test_dir.rb: Fixed test/unit tests that + were breaking due to Module#public_instance_methods now + returning a Symbol instead of a String. + + * test/testunit/collector/test_objectspace.rb: Ditto. + +Tue Mar 20 22:54:50 2007 Yukihiro Matsumoto + + * marshal.c (w_extended): erroneous check condition when dump + method is defined. [ruby-core:10646] + +Tue Mar 20 21:36:47 2007 Keiju Ishitsuka + + * lib/shell.rb, lib/shell: support for ruby 1.9(YARV) thread model. + +Tue Mar 20 16:36:08 2007 URABE Shyouhei + + * distruby.rb: Add zip generation. + +Tue Mar 20 16:20:49 2007 Yukihiro Matsumoto + + * eval.c (rb_f_callee_name): add __method__ and __callee__ again. + __callee__ need to rework to adopt YARV. [ruby-core:10671] + +Tue Mar 20 11:09:00 2007 Akinori MUSHA + + * lib/set.rb: Revise rdoc. + + * lib/set.rb (Set#freeze, Set#taint, Set#untaint): Implement + Set#freeze, Set#taint, and Set#untaint; requested by: Dan + Hutchings in [ruby-bugs:PR#9359]. + +Tue Mar 20 09:13:10 2007 Nobuyoshi Nakada + + * process.c (rb_fork): flush stdouts always before fork(2). + fixed: [ruby-dev:30612] + +Tue Mar 20 01:38:48 2007 Nobuyoshi Nakada + + * thread.c (thread_start_func_2): store the result of first_func + as well as first_proc. + + * thread.c (thread_create_core): block is not used if first_func + is given. + +Mon Mar 19 16:58:52 2007 NAKAMURA Usaku + + * missing/{strlcat,strlcpy}.c, missing.h: new functions. + + * LEGAL: add copyright notice about above files. + + * configure.in: check whether strlcat and strlcpy are exist or not. + + * {bcc32,win32,wince}/Makefile.sub: use above files. + +Mon Mar 19 14:12:25 2007 Yukihiro Matsumoto + + * lib/matrix.rb (Matrix::inverse_from): adding partial pivoting to + the Gauss-Jordan algorithm, making it stable. a patch from + Peter Vanbroekhoven. [ruby-core:10641] + +Mon Mar 19 12:13:36 2007 Yukihiro Matsumoto + + * regparse.c, etc.: K&R to ANSI code cleanup patch from Stefan + Huehner . [ruby-core:10543] + +Mon Mar 19 11:27:13 2007 Minero Aoki + + * lib/net/protocol.rb (rbuf_read): extend buffer size for speed. + +Sun Mar 18 08:31:51 2007 NAKAMURA Usaku + + * win32/dir.h, win32/win32.c (rb_w32_opendir, rb_w32_readdir, + rb_w32_closedir): get rid of possible buffer-overflows. + +Sat Mar 17 19:10:39 2007 Kouhei Sutou + + * lib/rss, test/rss: + - supported Atom. + - bumped version 0.1.6 to 0.1.7. + * sample/rss/convert.rb: added new sample. + +Fri Mar 16 22:32:20 2007 Minero Aoki + + * lib/net/pop.rb: change default verification mode from + VERIFY_PEER to VERIFY_NONE because most POPS server does not have + true certification. + +Fri Mar 16 22:19:24 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE#ole_activex_initialize, + a little bit supporting ActiveX control. [ruby-talk:241188] + +Fri Mar 16 22:16:58 2007 Minero Aoki + + * lib/net/http.rb: merge Ruby-SSPI patch contributed by Justin + Bailey. + + * ext/Win32API/lib/win32/sspi.rb: new file. + +Wed Mar 14 12:30:00 2007 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c: BigDecimal("-.31") is now + treated as ("-0.31") not as ("0.31"). + +Tue Mar 13 19:04:30 2007 Keiju Ishitsuka + + * lib/sync.rb: support for ruby 1.9(YARV) thread model. + +Tue Mar 13 09:25:10 2007 Nobuyoshi Nakada + + * common.mk (clear-installed-list): separated from install-prereq. + +Tue Mar 13 07:23:20 2007 Shugo Maeda + + * lib/monitor.rb (mon_try_enter): call @mon_muetx.try_lock. + Thanks, Keiju ISHITSUKA. [ruby-dev:30507] + +Tue Mar 13 02:42:58 2007 Akinori MUSHA + + * lib/cgi.rb (CGI::header): IIS >= 5.0 does not need the nph + assumption any more; submitted by MIYASAKA Masaru in [ruby-dev:30537]. + +Mon Mar 12 10:53:28 2007 Akinori MUSHA + + * ext/openssl/ossl_asn1.c (Init_ossl_asn1): Let rdoc know about + externally defined modules; submitted by Technorama + Ltd. in [ruby-bugs:PR#4704]. + + * ext/openssl/ossl_bn.c (Init_ossl_bn): Ditto. + + * ext/openssl/ossl_cipher.c (Init_ossl_cipher): Ditto. + + * ext/openssl/ossl_digest.c (Init_ossl_digest): Ditto. + + * ext/openssl/ossl_hmac.c (Init_ossl_hmac): Ditto. + + * ext/openssl/ossl_pkey.c (Init_ossl_pkey): Ditto. + + * ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): Ditto. + + * ext/openssl/ossl_pkey_dsa.c (Init_ossl_dsa): Ditto. + + * ext/openssl/ossl_pkey_rsa.c (Init_ossl_rsa): Ditto. + + * ext/openssl/ossl_rand.c (Init_ossl_rand): Ditto. + + * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Ditto. + +Sun Mar 11 18:42:01 2007 Akinori MUSHA + + * misc/ruby-mode.el (ruby-block-end-re): Support for the + experimental ';;' terminator had been dropped. + +Sun Mar 11 05:45:46 2007 Akinori MUSHA + + * misc/README, misc/rdebug.el: Add rdebug.el, Emacs ruby-debug + interface based on rubydb3x.el; submitted by Martin Nordholts + in [ruby-bugs:PR#9023]. + +Sat Mar 10 07:20:28 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_TYPELIB#library_name, + WIN32OLE_TYPELIB#visible?. + + * test/win32ole/test_win32ole_typelib.rb: ditto. + +Thu Mar 8 09:17:59 2007 Minero Aoki + + * compile.c: iseq_compile -> rb_iseq_compile. + + * iseq.c: ditto. + + * intern.h: provide function prototype of Init_jump. + + * eval_jump.h (Init_jump): declare function type. + + * thread.c: platform-dependent functions should be surrounded by #ifdef. + + * iseq.c (iseq_data_to_ary): remove unused variable. + + * compile.c (set_arguments): ditto. + + * thread.c (set_unblock_function): ditto. + + * thread_pthread.ci: reduce printf warning. + + * vm_dump.c: ditto. + +Tue Mar 6 16:35:04 2007 Keiju Ishitsuka + + * lib/shell/process-controller.rb: fix thread synchronization problem for [ruby-dev:30477]. + +Tue Mar 6 11:53:25 2007 Hidetoshi NAGAI + + * ext/tk/sample/irbtkw.rbw: fails to exit process. + +Tue Mar 6 10:23:09 2007 Nobuyoshi Nakada + + * runruby.rb: added --pure (turned on by default) and --debugger + options. + +Mon Mar 5 09:19:33 2007 Minero Aoki + + * lib/timeout.rb (Timeout.timeout): should return the block value + always. + + * lib/timeout.rb (Timeout.timeout): should yield sec argument + always. + + * lib/timeout.rb (Timeout.timeout): fix document. + +Mon Mar 5 09:16:40 2007 Minero Aoki + + * lib/net/smtp.rb: support automatic STARTTLS. + + * lib/net/smtp.rb: check server advertisement. + + * lib/net/smtp.rb: introduce new class SMTP::Response. + + * lib/net/smtp.rb (getok): should not use sprintf. + + * lib/net/smtp.rb (get_response): ditto. + + * lib/net/protocol.rb: reduce syntax warning on 1.9. + +Mon Mar 5 07:13:28 2007 Minero Aoki + + * lib/net/smtp.rb: reconstruct SMTPS/STARTTLS interface. New + interface is incompatible from current 1.9 interface at all. + + * lib/net/smtp.rb: All SSL-related class methods are removed; use + instance methods instead. + + * lib/net/smtp.rb: rename methods: *ssl -> *tls (with alias + "ssl"). + + * lib/net/smtp.rb: rename methods: *tls -> *starttls. + +Mon Mar 5 01:36:41 2007 Nobuyoshi Nakada + + * parse.y (parser_yylex), win32/win32.c (rb_w32_utime): fixed + indentation broken at YARV merger. + +Sun Mar 4 23:41:14 2007 Nobuyoshi Nakada + + * file.c (rb_stat_uid, rb_stat_gid, eaccess): use rb_uid_t and + rb_gid_t instead of int. + + * file.c (rb_stat_s_utime): fixed a commit miss for the platforms + where utimes() does not exist. + + * lib/fileutils.rb (touch): ditto. + +Sun Mar 4 14:46:56 2007 WATANABE Hirofumi + + * util.c (push_element): should return a int value. + +Sun Mar 4 01:01:25 2007 Akinori MUSHA + + * lib/set.rb (Set#^, Set#&): Correct documentation. Those methods + return sets, not arrays; noted by Oliver Frank Wittich . + +Sat Mar 3 22:54:33 2007 Minero Aoki + + * lib/fileutils.rb (touch): last #touch change causes error when + :mtime option was not given. + +Sat Mar 3 22:51:29 2007 Minero Aoki + + * lib/fileutils.rb (mv): could not move directory between + different file systems. [ruby-dev:30411] + +Sat Mar 3 22:37:02 2007 Nobuyoshi Nakada + + * file.c (rb_file_s_utime): allow nil to set the current time. + + * lib/fileutils.rb (touch): ditto, and added :mtime and :nocreate + options. fixed: [ruby-talk:219037] + +Sat Mar 3 15:52:26 2007 Akinori MUSHA + + * object.c (instance_variable_get): Restore rdoc markups lost in + the last commit. + +Fri Mar 2 21:17:14 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (get_ptr_of_variant, ole_set_safe_array, + ole_val2ptr_variant, ole_val2olevariantdata, ole_variant2val, + ): fix some bugs of WIN32OLE_VARIANT.new when variant type is + VT_ARRAY|VT_BSTR or VT_BYREF. + + * ext/win32ole/win32ole.c (folevariant_s_array, folevariant_initialize): + WIN32OLE_VARIANT#[], WIN32OLE_VARIANT#[]=, WIN32OLE_VARIANT#value= + is defined as instance method of WIN32OLE_VARIANT. + + * test/win32ole/test_win32ole_variant.rb: add some test for + VT_ARRAY, VT_BYREF variant type. + +Fri Mar 2 07:58:24 2007 Yukihiro Matsumoto + + * object.c (rb_obj_ivar_set): RDoc updated according to a + suggestion from Brian Candler . + [ruby-core:10469] + +Thu Mar 1 21:38:07 2007 Nobuyoshi Nakada + + * parse.y (stmt, arg): should not omit lhs of OP_ASGN1 even if + empty. [ruby-dev:30455] + +Thu Mar 1 02:55:25 2007 Akinori MUSHA + + * ext/digest/digest.c (get_digest_base_metadata): Allow inheriting + Digest::Base subclasses, which was unintentionally made + impossible while restructuring Digest classes. + +Thu Mar 1 02:05:17 2007 Nobuyoshi Nakada + + * mkconfig.rb (patchlevel): read from version.h. + +Wed Feb 28 21:15:00 2007 WATANABE Hirofumi + + * configure.in (ac_cv_func_fcntl): fcntl support for MinGW. + + * missing/flock.c: workaround for MinGW. + +Wed Feb 28 20:51:32 2007 URABE Shyouhei + + * pack.c (pack_unpack): properly ignore non-base64 octets such as + UTF-8 encoded BOMs; submitted by SOUMA Yutaka + to fix [ruby-core:10437] + +Wed Feb 28 18:31:51 2007 NAKAMURA Usaku + + * ext/openssl/extconf.rb: no need to check unistd.h and sys/time.h. + they are already checked at configure. + reported by KOBAYASHI Yasuhiro [ruby-list:43225] + +Wed Feb 28 18:23:43 2007 NAKAMURA Usaku + + * lib/mkmf.rb ($DEFLIBPATH): default library paths ($(topdir), etc) + should be the first elements of library paths list. + reported by KOBAYASHI Yasuhiro [ruby-list:43225] + +Wed Feb 28 10:33:58 2007 Nobuyoshi Nakada + + * Makefile.in, configure.in, */Makefile.sub (THREAD_MODEL): system + specific thread model. + + * compile.h, regint.h, vm.h, array.c: removed unnecessary #include. + +Wed Feb 28 04:03:03 2007 Yukihiro Matsumoto + + * enum.c (take_i): small cosmetic / documentation patch from + Tadashi Saito . [ruby-dev:30446] + +Wed Feb 28 01:20:18 2007 NAKAMURA Usaku + + * test/{dbm,gdbm}/test_{dbm,gdbm}.rb: shouldn't use host_os. use + target_os instead. reported by KOBAYASHI Yasuhiro [ruby-list:43225] + +Wed Feb 28 00:08:11 2007 URABE Shyouhei + + * mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL'] + + * common.mk: new target dist + + * distruby.rb: new file + +Tue Feb 27 22:18:45 2007 WATANABE Hirofumi + + * configure.in (--enable-auto-image-base): avoid the necessity to + rebase the shared libs as much as possible; + submitted by Corinna Vinschen in + [ruby-talk:240964]. + +Tue Feb 27 21:36:47 2007 WATANABE Hirofumi + + * util.c (__crt0_glob_function): use ruby_glob() instead of rb_globi(). + +Tue Feb 27 21:33:04 2007 WATANABE Hirofumi + + * configure.in (ac_cv_func_setrlimit): workaround for djgpp. + +Tue Feb 27 20:35:28 2007 NAKAMURA Usaku + + * common.mk (error.c, process.c): depend on yarvcore.h and rubysig.h. + +Tue Feb 27 19:26:31 2007 Akinori MUSHA + + * ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1, + rb_nkf_guess2): Silence warnings regarding char * vs. unsigned + char * mismatch; submitted by Lyle Johnson + in [ruby-core:10416]. + +Tue Feb 27 19:15:01 2007 Akinori MUSHA + + * lib/base64.rb (Base64::b64encode): Fix documentation; submitted + by David Symonds in [ruby-core:10432]. + +Tue Feb 27 18:59:42 2007 Akinori MUSHA + + * ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warnings + regarding char * vs. unsigned char * mismatch; submitted by Lyle + Johnson in [ruby-core:10416]. + + * ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto. + + * ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto. + + * ext/digest/digest.c (rb_digest_base_finish, + rb_digest_base_update): Ditto. + +Tue Feb 27 18:12:05 2007 Yukihiro Matsumoto + + * enum.c (enum_take): new method. [ruby-dev:30407] + + * enum.c (enum_drop): ditto. + +Tue Feb 27 07:47:24 2007 Koichi Sasada + + * yarvcore.h, vm.h: rename th_invoke_yield() to th_yield(). + + * blockinlining.c: ditto. + + * eval.c: ditto. + + * vm.c, insns.def: rename th_invoke_yield_cfunc() + to th_yield_with_cfunc(). + + * yarvcore.h, yarvcore.c: rename theYarvVM to ruby_current_vm and + yarvCurrentThread to ruby_current_thread. remove yarvVMArray. + +Tue Feb 27 00:45:23 2007 Minero Aoki + + * test/ruby/test_optimization.rb: restore method before calling + assert_equal. + +Mon Feb 26 00:58:39 2007 Koichi Sasada + + * yarvcore.h: add rb_thread_t#top_wrapper, top_self. + + * eval_load.c (rb_load): support eval in wrapper module + (load(file, true)). + + * eval.c: ditto. + + * eval_jump.h: ditto. + + * iseq.c: ditto. + + * vm.c: ditto. + + * yarvcore.c: ditto. + + * insns.def: add a empty line. + +Mon Feb 26 00:54:36 2007 Koichi Sasada + + * common.mk: change "gdb" rule. You can debug miniruby with + $(srcdir)/test.rb on gdb by this rule (type "make gdb"). + If you write break points to "breakpoints.gdb" on $srcdir, + gdb runs with this file. + +Sun Feb 25 11:46:58 2007 Koichi Sasada + + * win32/Makefile.sub: enable -Zi (debug) option. + +Sun Feb 25 11:38:40 2007 Koichi Sasada + + * ruby.h: define RUBY_VM macro and remove NATIVETHREAD* macros. + + * intern.h: ditto. + + * signal.c (posix_signal): remove unused function + posix_nativethread_signal(). + +Sun Feb 25 11:31:13 2007 Koichi Sasada + + * thread.c (rb_thread_run): fix to ANSI style. + +Sun Feb 25 11:09:16 2007 Minero Aoki + + * bootstraptest/runner.rb: show source code in error message. + +Sun Feb 25 09:39:50 2007 Koichi Sasada + + * yarvcore.h: + rename: + rb_iseq_t#file_name -> filename + rb_iseq_t#local_tbl -> local_table + add: + rb_iseq_t#local_table_size + + * compile.c: separate local_table_size and local_size + (local variable size) + + * blockinlining.c: apply above rename. + + * compile.h: ditto. + + * eval.c: ditto. + + * iseq.c: ditto. + + * proc.c: ditto. + + * vm.c: ditto. + + * vm_dump.c: ditto. + +Sun Feb 25 10:27:17 2007 Minero Aoki + + * bootstraptest/runner.rb: add lib/ to load path. + +Sat Feb 25 10:16:50 2007 Nobuyoshi Nakada + + * rubyio.h (HAVE_RB_IO_T): macro to tell if rb_io_t is defined. + +Sat Feb 24 19:39:16 2007 Minero Aoki + + * common.mk: new target "btest", to run bootstraptests. + +Sat Feb 24 19:30:40 2007 Nobuyoshi Nakada + + * file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t): + renamed from OpenFile. + + * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, + ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, + ext/readline/readline.c, ext/socket/socket.c: ditto. + +Sat Feb 24 19:28:23 2007 Minero Aoki + + * bootstraptest/runner.rb: new option -v,--verbose. + +Sat Feb 24 18:55:50 2007 Minero Aoki + + * yarvtest/test_method.rb: removed (merged to bootstraptest). + + * yarvtest/test_class.rb: ditto. + +Sat Feb 24 18:44:39 2007 Minero Aoki + + * bootstraptest/test_class.rb: new file. + + * bootstraptest/test_method.rb: add tests. + +Sat Feb 24 18:44:30 2007 Nobuyoshi Nakada + + * intern.h (rb_thread_blocking_region): add prototype. + + * file.c (rb_thread_flock, rb_file_flock): use UBF feature. + + * process.c (rb_waitpid_blocking, rb_waitpid): use UBF feature. + + * thread.c (rb_thread_debug): added runtime debugging flag. + + * thread.c (BLOCKING_REGION): restore previous UBF. + + * thread.c (rb_thread_blocking_region): default UBF to interrupt + in system dependent way by RB_UBF_DFL. + + ubf_select() on posix system + + ubf_handle() on Win32 + + none on cygwin + + * thread_win32.ci (rb_w32_wait_events_blocking): blocking version. + + * win32/win32.c (waitpid): use rb_w32_wait_events_blocking(). + +Sat Feb 24 17:45:48 2007 Minero Aoki + + * parse.y (f_arg, opt_f_block_arg): ripper should export VALUE. + +Sat Feb 24 16:52:55 2007 Minero Aoki + + * bootstraptest/runner.rb: fix syntax error. + +Sat Feb 24 16:51:09 2007 Minero Aoki + + * bootstraptest/runner.rb: new option --help. + +Sat Feb 24 16:47:33 2007 Minero Aoki + + * bootstraptest: new test suite. + + * bootstraptest/runner.rb: new file. + + * bootstraptest/test_literal.rb: new file. + + * bootstraptest/test_method.rb: new file. + +Sat Feb 24 16:29:15 2007 NAKAMURA Usaku + + * win32/win32.c (StartSocket): remove unnecessary code. + +Sat Feb 24 16:04:30 2007 Yukihiro Matsumoto + + * parse.y (struct local_vars): remove unused nofree member from + struct. + + * parse.y (parser_free): ditto. + +Sat Feb 24 15:57:19 2007 Shugo Maeda + + * lib/thread.rb (ConditionVariable#broadcast): use Mutex + instead of Thread.exclusive. + + * lib/monitor.rb (MonitorMixin#mon_exit): unset @mon_owner + before calling Mutex#unlock. + +Sat Feb 24 15:51:45 2007 Minero Aoki + + * parse.y (program): remove useless assignment to reduce warning. + +Sat Feb 24 15:41:51 2007 Yukihiro Matsumoto + + * parse.y (lambda): remove unused clause from the rule to stop + warning. + +Sat Feb 24 15:41:22 2007 Shugo Maeda + + * lib/thread.rb: do not redefine Mutex#synchronize. + +Sat Feb 24 15:14:02 2007 Shugo Maeda + + * lib/monitor.rb: rewritten using Mutex/ConditionVariable. + +Sat Feb 24 13:25:32 2007 Koichi Sasada + + * lib/soap/mapping/factory.rb: catch up with spec changes (return + Symbols instead of Strings). + + * lib/soap/mapping/mapping.rb: ditto. + +Sat Feb 24 10:49:55 2007 Koichi Sasada + + * parse.y, node.h, compile.c: change node tree structure. a purpose + of this change is to unify argument structure of method and block. + this change prohibits duplicate block parameter name. + new argument information: + NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] + NODE_ARGS_AUX [r: ID, b: ID, ->] + NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] + optarg information: + NODE_OPT_ARGS [idx, expr, ->] + + * vm_macro.def: ditto. + + * gc.c: ditto. + + * iseq.c: ditto. + + * compile.h: fix debug function name. + + * test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo| + + * test/ruby/test_lambda.rb: disable test temporarily. + +Sat Feb 24 10:46:28 2007 Koichi Sasada + + * test/testunit/test_testcase.rb: catch up with current instance + variable spec. + +Sat Feb 24 10:32:59 2007 Koichi Sasada + + * common.mk: change vm_macro.def rule. + +Sat Feb 24 10:38:05 2007 Minero Aoki + + * ext/racc/cparse/cparse.c (cparse_params_mark): remove useless + rb_gc_mark. Thanks Tomoyuki Chikanaga. [ruby-dev:30405] + +Sat Feb 24 07:31:35 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_VARIANT.array, + WIN32OLE_VARIANT#value=, refactoring. + + * test/win32ole/test_win32ole_variant.rb: add some test for + WIN32OLE_VARIANT.array, WIN32OLE_VARIANT#value=. + +Fri Feb 23 18:37:55 2007 Minero Aoki + + * test/ruby/test_yield.rb: new test. + + * yarvtest/test_yield.rb: removed (moved to test_yield.rb). + +Fri Feb 23 18:27:17 2007 NAKAMURA Usaku + + * thread.c (rb_thread_polling): check interrupts here. + + * thread_win32.ci (w32_wait_events): rename from w32_wait_event(), and + now receive multiple event handles. + + * win32/win32.c (wait_events, rb_w32_main_context): removed. + + * thread_win32.ci (rb_w32_wait_events): new function. + + * thread_win32.ci, win32/win32.c (rb_w32_sleep, rb_w32_Sleep): move + from win32/win32.c to thread_win32.ci, and use w32_wait_events(). + +Fri Feb 23 18:13:22 2007 Minero Aoki + + * test/ruby/test_optimization.rb: new test (merges test_opts.rb). + + * yarvtest/test_opts.rb: removed. + +Fri Feb 23 16:59:39 2007 Minero Aoki + + * test/ruby/test_assignment.rb: merge yarvtest/test_massign. + + * yarvtest/test_massign.rb: removed (merged to + test_assignment.rb). + +Fri Feb 23 15:58:20 2007 NAKAMURA Usaku + + * signal.c (sighandler): need to re-install sighandler on some + platforms. + +Fri Feb 23 15:05:57 2007 NAKAMURA Usaku + + * win32/win32.c (set_pioinfo_extra): simplified. + +Fri Feb 23 14:23:20 2007 Minero Aoki + + * test/ruby/test_literal.rb: new test. + +Fri Feb 23 12:40:12 2007 James Edward Gray II + + * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): Make the + Content-Length parameter optional for responses in + xmlrpc/client.rb; suggested by Daniel Berger + and approved by the maintainer. + + * lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): Add DateTime + support to xmlrpc; approved by the maintainer. + +Fri Feb 23 12:24:46 2007 Minero Aoki + + * parse.y (lambda): add ripper event. This fixes bus error on + "make test-all". + + * ext/ripper/extconf.rb: do not stop build. + +Fri Feb 23 12:16:05 2007 Yukihiro Matsumoto + + * parse.y: remove dyna_check_gen() prototype. + +Fri Feb 23 11:41:21 2007 Yukihiro Matsumoto + + * parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h, + object.c, string.c, variable.c, vm_macro.def: revert private + instance variable feature, which is postponed until next major + release. + + * marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to + 8th version. + +Fri Feb 23 10:53:21 2007 Shugo Maeda + + * thread_pthread.ci (native_mutex_lock): do not call + pthread_mutex_trylock(). + +Fri Feb 23 10:31:16 2007 Minero Aoki + + * dln.c: use dlopen on Mac OS X 10.3 or later. + +Fri Feb 23 10:03:49 2007 Yukihiro Matsumoto + + * string.c (rb_str_ord): need not to check string length; ord + returns a codepoint for the first character in the string. + +Wed Feb 21 22:29:45 2007 Akinori MUSHA + + * numeric.c (fix_equal): A bit more optimization. + +Wed Feb 21 17:40:37 2007 Yukihiro Matsumoto + + * numeric.c (fix_equal): remove FIX2LONG() to optimize. suggested + in http://t-a-w.blogspot.com/2007/02/making-ruby-faster.html. + [ruby-talk:240223] + + * numeric.c (fix_cmp): ditto. + +Wed Feb 21 09:14:04 2007 Nobuyoshi Nakada + + * eval_load.c (rb_require_safe): should restore safe level. + +Tue Feb 20 21:19:29 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (installed_code_page_proc, + ole_variant2val): small refactoring. + +Tue Feb 20 15:11:42 2007 Koichi Sasada + + * eval.c, vm.c, yarvcore.h: move definition of rb_call_super() to + vm.c from eval.c. change th_call_super() to static function. + +Tue Feb 20 15:08:25 2007 Koichi Sasada + + * test/io/nonblock/test_flush.rb: YARV doesn't raise any errors if + another thread close IO object which current thread is blocking with. + +Tue Feb 20 15:03:29 2007 Koichi Sasada + + * thread.c (do_select, rb_thread_wait_fd_rw): raise sys error if + errno is not 0 and EBADF. + +Mon Feb 19 22:15:31 2007 Nobuyoshi Nakada + + * configure.in (RUBY_REPLACE_TYPE): cache convertible type info. + + * intern.h (rb_detach_process): use rb_pid_t instead of pid_t. + + * ruby.h (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM, NUM2GIDT): + defaulted to conversion using long. + +Mon Feb 19 17:14:28 2007 Yukihiro Matsumoto + + * ext/socket/socket.c (unix_peeraddr): wrong syscall name in error + message for #peeraddr. a patch from Sam Roberts + . [ruby-core:10366] + +Sun Feb 18 22:56:07 2007 Nobuyoshi Nakada + + * ext/etc/etc.c (etc_getgrgid): missed to replace a macro. + +Sun Feb 18 19:33:00 2007 Tadayoshi Funaba + + * lib/date/format.rb: updated based on date2 4.0.3. + +Sun Feb 18 13:11:51 2007 Nobuyoshi Nakada + + * configure.in (pid_t, uid_t, gid_t): check if defined. + + * intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use + rb_{pid,uid,gid}_t instead of plain int. [ruby-dev:30376] + + * ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM, + NUM2GIDT): moved to configure.in. + +Fri Feb 16 21:34:33 2007 Koichi Sasada + + * object.c (rb_obj_ivar_set/get/defined): fix to check :@_v/C id. + + * test/testunit/test_testcase.rb: fix to use instance_variable_get() + to access @_result. + +Fri Feb 16 20:59:10 2007 Koichi Sasada + + * intern.h: add a prototype of rb_sym_to_s(). + +Fri Feb 16 19:24:22 2007 Yukihiro Matsumoto + + * math.c (math_log): update document to mention second optional + argument for logarithm base. + +Fri Feb 16 19:19:21 2007 Yukihiro Matsumoto + + * parse.y (mrhs): need to append by arg_append(). + [ruby-talk:239385] + +Fri Feb 16 11:18:21 2007 Eric Hodel + + * lib/.document: Apply patch for irb, e2mmap and README by Hugh Sasse + from [ruby-core:10135] + + * lib/prettyprint.rb: Suppress RDoc for PrettyPrint test suite. + +Thu Feb 15 20:48:36 2007 NAKAMURA Usaku + + * win32/win32.c (set_pioinfo_extra): new function for VC++8 SP1 + workaround. [ruby-core:10259] + + * win32/win32.c (NtInitialize): call above function. + +Thu Feb 15 16:25:54 2007 Akinori MUSHA + + * lib/uri/generic.rb (URI::Generic::userinfo): Considering how + `scheme://user:@...', `scheme://:password@...' and + `scheme://:@...' are parsed, an empty user name or password + should be allowed and represented as it is. + +Thu Feb 15 01:52:53 2007 Koichi Sasada + + * vm.(c|h), yarvcore.(c|h) (yarvGlobalStateVersion): rename to + ruby_vm_global_state_version. + +Thu Feb 15 01:50:26 2007 Koichi Sasada + + * test/fileutils/test_fileutils.rb (check_singleton): fix to use + symbol instead of string. + + * test/io/nonblock/test_flush.rb: enable tests. + + * test/xmlrpc/test_webrick_server.rb: ditto. + +Thu Feb 15 01:43:45 2007 Koichi Sasada + + * lib/delegate.rb: catch up with class local variable (@_v) spec. + + * lib/singleton.rb: ditto. + +Wed Feb 14 22:52:43 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_variant2val): VC++6 does not + support VT_I8, VT_UI8. + +Wed Feb 14 22:10:21 2007 Koichi Sasada + + * configure.in: change stack limit to 2MB from 32MB. + + * win32/Makefile.sub: ditto. + +Wed Feb 14 21:39:36 2007 Akinori MUSHA + + * ext/digest/lib/digest.rb (Digest::self.const_missing): Drop + autoloads for sha2 classes in favor of handling in + const_missing(), to work around a problem exposed on OS X. + +Wed Feb 14 21:19:47 2007 Koichi Sasada + + * thread_pthread.ci (native_thread_create): adjust 4KB (page size) + alignment. + +Wed Feb 14 21:12:36 2007 Koichi Sasada + + * thread_pthread.ci (CHECK_ERR): call rb_bug() + instead of printf() and exit(). + +Wed Feb 14 16:48:56 2007 Yukihiro Matsumoto + + * lib/date/format.rb (Date::Format::Bag::method_missing): need not + to use instance variables corresponding each method; use Hash + instead. + +Wed Feb 14 13:12:06 2007 Yukihiro Matsumoto + + * re.c (reg_operand): allow symbols to be operands for regular + expression matches. + + * string.c (Init_String): allow Symbol#===. + + * lib/date/format.rb (Date::Format::Bag::to_hash): string + added prefixes. + +Wed Feb 14 12:58:38 2007 Koichi Sasada + + * thread.c (do_select): fix to iterate select(). + on cygwin/mswin32, iterate in unblocking region. + + * thread.c (rb_thread_select): don't iterate on this function. + (iterate in do_select). + +Wed Feb 14 11:39:18 2007 Koichi Sasada + + * thread.c (set_unblock_function): fix function interface. + +Wed Feb 14 11:12:02 2007 Koichi Sasada + + * eval_load.c, yarvcore.h: use rb_vm_t#loaded_features instead of + rb_features (global variable). + + * yarvcore.c: mark rb_vm_t#loaded_features. + +Wed Feb 14 08:46:25 2007 Yukihiro Matsumoto + + * compile.c (defined_expr): no longer distinguish ordinary local + variables and in-block local variables in defined? value. + +Wed Feb 14 03:14:42 2007 Yukihiro Matsumoto + + * lib/uri/generic.rb (URI::Generic::userinfo): should support + empty password. [ruby-core:10290] + + * lib/uri/generic.rb (URI::Generic::set_password): password can be + cleared by nil. [ruby-core:10290] + +Wed Feb 14 03:10:33 2007 Yukihiro Matsumoto + + * parse.y (struct local_vars): no need to warn out-of-scope + variables; remove dnames member from struct. + +Wed Feb 14 03:04:10 2007 Yukihiro Matsumoto + + * parse.y: RVarmap no longer used as yytype; removed. + + * parse.y (dyna_push_gen): no longer need return value. + + * parse.y (dyna_pop_gen): no longer need argument. + + * parse.y (local_push_gen): initialize nofree. + +Wed Feb 14 00:30:07 2007 Yukihiro Matsumoto + + * ext/socket/socket.c (init_unixsock): path may contain NUL for + abstract unix sockets. [ruby-core:10288] + +Tue Feb 13 02:21:12 2007 Sam Roberts + + * io.c (rb_f_syscall): Fix buffer overflow with syscall + arguments. [ruby-bugs:PR#8541] + +Mon Feb 12 13:57:30 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_variant2val): support VT_I8, VT_UI8. + +Mon Feb 12 11:48:52 2007 Kouhei Sutou + + * lib/rss/dublincore.rb, lib/rss/maker/dublincore.rb: dc_rightses + -> dc_rights_list. dc_rightses still exists for backward + compatibility. [ruby-core:8350] + + * test/rss/test_maker_dc.rb: added tests for dc_rights_list. + +Sun Feb 11 22:40:17 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_ptrtype2val): ole_type, ole_type_detail + should not return "VARIANT,VARIANT". + +Sun Feb 11 22:11:05 2007 Kouhei Sutou + + * lib/rss/xml-stylesheet.rb (RSS::XMLStyleSheet#initialize): + kept backward compatibility. + +Sun Feb 11 22:10:08 2007 Kouhei Sutou + + * lib/rss/parser.rb (RSS::ListenerMixin#start_else_element): used + const_defined? instead of constants.include?. + +Sun Feb 11 18:47:14 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_val2olevariantdata): + WIN32OLE_VARIANT#new accepts nil when variant type is VT_ARRAY. + + * test/win32ole/test_win32ole_variant.rb: ditto. + + * ext/win32ole/win32ole.c: small refactoring. + +Sun Feb 11 07:42:25 2007 Akinori MUSHA + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse + a quoted-string in a Content-Disposition value. + +Sat Feb 10 20:21:29 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface. + thanks to Mikael Pahmp. + + * test/win32ole/test_win32ole.rb: ditto. + +Sat Feb 10 17:46:52 2007 Nobuyoshi Nakada + + * common.mk: targets which depend on yarvcore.h now depend on + rubysig.h too. + + * yarvcore.h (rb_vm_t): use rb_atomic_t instead of int. + +Sat Feb 10 00:13:11 2007 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: fix typo (TkConfigMethod::__confinfo_cmd, + __conv_keyonly_opts). + +Fri Feb 9 12:33:40 2007 Koichi Sasada + + * thread_win32.ci (w32_show_error_message): renamed to w32_error. + this function do rb_bug(). + + * thread_win32.ci (w32_set_event, w32_reset_event, w32_close_handle, + w32_resume_thread): added. fix to use these functions instead calling + win32api directly. + + * thread_win32.ci (w32_create_thread): create suspend thread + (caller must call w32_resume_thread()). + +Fri Feb 9 11:03:40 2007 Koichi Sasada + + * test/ruby/test_readpartial.rb: tests are working on mswin32/cygwin. + +Fri Feb 9 05:08:17 2007 Koichi Sasada + + * thread.c, thread_pthread.ci, thread_win32.ci (thread_start_func_1): + move cleanup function to thread_start_func_2(). + + * thread.c, thread_pthread.ci, thread_win32.ci: + add more destruct functions. + (native_thread_destroy() and native_mutex_destroy()) + + * thread_pthread.ci, thread_pthread.h: make native_mutex_* functions + (check error, etc), it's not macro any more. + + * thread_win32.ci (thread_start_func_1): store some values before + running thread (to release these after running thread). + + * thread_win32.ci (native_thread_create): fix spaces. + +Thu Feb 8 22:44:04 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_set_safe_array, ole_variant2val, + ole_val_ary2variant_ary): fix WIN32OLE_VARIANT.new bug when + 1st argument is empty array, and when 2nd argument is + VT_ARRAY|VT_BYREF. + + * test/win32ole/test_win32ole_variant.rb: ditto. + +Thu Feb 8 22:39:09 2007 Koichi Sasada + + * yarvtest/yarvtest.rb: check target command names. + +Thu Feb 8 22:31:45 2007 Koichi Sasada + + * test/ruby/test_clone.rb: fix to current spec + (Module should not be occur many times in ancestors). + +Thu Feb 8 22:26:14 2007 Koichi Sasada + + * test/ruby/test_string.rb: ("foo" == :foo) and ("foo" === :foo) + should be false. + + * ChangeLog: fix last messages. + +Thu Feb 8 22:24:06 2007 Koichi Sasada + + * test/ruby/test_module.rb: fix to use Symbol instead of String. + + * test/ruby/test_module.rb: remove space before argument parentheses. + +Thu Feb 8 22:02:14 2007 Koichi Sasada + + * test/ruby/marshaltestlib.rb: eval(sym) -> eval(sym.to_s) + +Thu Feb 8 21:35:16 2007 Masaki Suketa + + * test/win32ole/test_propertyputref.rb (setup): fix typo. + + * test/win32ole/test_win32ole_event.rb: should not use + InternetExplorer.gohome to test. + +Thu Feb 8 21:02:07 2007 Koichi Sasada + + * thread.c (GVL_UNLOCK_RANGE): rename to BLOCKING_REGION(). + + * thread.c (rb_thread_run_parallel): rename to + rb_thread_blocking_region(). + +Thu Feb 8 15:48:44 2007 Koichi Sasada + + * yarvcore.h, thread.c: fix to use pthread on cygwin. + + * yarvcore.h, thread.c: move GVL_UNLOCK_BEGIN() and GVL_UNLOCK_END() + from yarvcore.h to thread.c. + + * thread.c: change GVL_UNLOCK_RANGE() arguments + (adding ubf as 2nd argument). + + * thread.c: fix to use polling in select on cygwin and mswin32. + + * thread.c, thread_pthread.ci, thread_win32.ci, yarvcore.h: + rename: + * rb_thread_t#interrupt_function -> unblock_function + * rb_interrupt_function_t -> rb_unblock_function + * some interrupt function name -> ubf_* + * yarv_* -> * + +Thu Feb 8 16:08:02 2007 Koichi Sasada + + * common.mk: fix to use RUNRUBY instead of BASERUBY if possible. + + * common.mk ($(INSNS) rule): remove $(PROGRAM) first. + +Thu Feb 8 15:43:05 2007 Koichi Sasada + + * process.c: fix to use rb_status_line_set/get/clear(). + + * eval_intern.h: fix line break. + +Thu Feb 8 15:00:14 2007 Koichi Sasada + + * blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h, + eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c, + thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, + vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: + fix typo (rb_thead_t -> rb_thread_t). + + * eval_intern.h: remove unused definitions. + + * common.mk: fix around vm_opts.h path + and remove harmful argument passed to insns2vm.rb. + +Thu Feb 8 03:11:47 2007 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::unescapeHTML): invalid decoding for single + unescaped ampersand. a patch from Tietew + in [ruby-dev:30292]. + fixed: [ruby-dev:30289] + +Wed Feb 7 23:25:31 2007 Nobuyoshi Nakada + + * eval.c (specific_eval): suppress warning. + + * thread_win32.h: undefine _WIN32 on cygwin. [ruby-dev:30303] + +Wed Feb 7 22:41:34 2007 Koichi Sasada + + * eval_intern.h: remove UNSUPPORTED() macro. + + * thread.c: fix to define Continuation methods + (they only do rb_notimplement()). + +Wed Feb 7 22:33:58 2007 Koichi Sasada + + * eval_intern.h, yarvcore.h: remove unused macro definition. + +Wed Feb 7 22:30:28 2007 Koichi Sasada + + * eval.c: fixed to use ANSI function style. + +Wed Feb 7 09:35:32 2007 Koichi Sasada + + * this commit is a result of refactoring. only renaming functions, + moving definitions place, add/remove prototypes, deleting + unused variables and removing yarv.h. + This commit doesn't change any behavior of ruby/vm. + + * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). + + * error.c, eval_intern.h: include yarvcore.h instead yarv.h + + * rename some functions: + * debug.[ch]: debug_*() -> ruby_debug_*() + * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() + * iseq.c: node_name() -> ruby_node_name() + * vm.c: yarv_check_redefinition_opt_method() -> + rb_vm_check_redefinition_opt_method() + + * some refactoring with checking -Wall. + + * array.c: remove rb_ary_ptr() (unused) and remove unused + local variables. + + * object.c: add a prototype of rb_mod_module_exec(). + + * eval_intern.h (ruby_cref): set it inline. + + * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). + + * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). + + * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). + + * thread.c: remove raw_gets() function (unused) and fix some format + mismatch (format mismatches have remained yet. this is todo). + + * thread.c (rb_thread_wait_fd_rw): fix typo on label name. + + * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. + + * vm.c (rb_svar, rb_backref_get, rb_backref_get, + rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. + + * vm.c (yarv_init_redefined_flag): add a prototype and rename + yarv_opt_method_table to vm_opt_method_table. + + * vm.c (rb_thread_eval): moved from yarvcore.c. + + * yarvcore.c: remove unused global variables and fix to use nsdr(). + +Wed Feb 7 03:39:32 2007 Koichi Sasada + + * blockinlining.c, compile.c, compile.h, error.c, eval.c, + eval_intern.h, eval_jump.h, eval_load.c, eval_method.h, + eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c, + process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, + vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def, + yarv.h, yarvcore.h, yarvcore.c: change type and macro names: + * yarv_*_t -> rb_*_t + * yarv_*_struct -> rb_*_struct + * yarv_tag -> rb_vm_tag + * YARV_* -> RUBY_VM_* + + * proc.c, vm.c: move functions about env object creation + from proc.c to vm.c. + + * proc.c, yarvcore.c: fix rb_cVM initialization place. + + * inits.c: change Init_ISeq() order (after Init_VM). + + * ruby.h, proc.c: change declaration place of rb_cEnv + from proc.c to ruby.c. + +Tue Feb 6 22:06:45 2007 NARUSE, Yui + + * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c}: + imported nkf 2007-01-28. + * Fixed: can't decode MIME encode JIS string. + * Fixed: Fullwidth-halfwidth conversion. + * Support DoCoMo's and Softbank's EMOJI + * Support CP932, CP5022x, eucJP-ms UDC + * Support UTF-32 encoding + * Support beyond BMP + [ruby-dev:29700] [ruby-dev:29922] [ruby-dev:30144] + +Tue Feb 6 20:36:19 2007 Kouhei Sutou + + * lib/rss/rss.rb, lib/rss/parser.rb: followed current Ruby + specification. [ruby-dev:30274] + +Tue Feb 6 20:29:44 2007 Kouhei Sutou + + * lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for + backward compatibility. + +Tue Feb 6 18:43:17 2007 Shugo Maeda + + * lib/net/ftp.rb: moved fixes for EPIPE to the correct + place. [ruby-core:10204] + +Tue Feb 6 16:38:08 2007 Koichi Sasada + + * vm_opts.h: set properties: + svn:keywords: Author Date Id Revision + svn:eol-style: native + +Tue Feb 6 15:55:46 2007 Yukihiro Matsumoto + + * variable.c (ivar_i): need to support class local instance + variables. + +Tue Feb 6 15:44:11 2007 Koichi Sasada + + * compile.c (iseq_compile_each): fix setting is_local flag. + + * yarvtest/test_class.rb: add a test for class local instance variable. + +Tue Feb 6 14:15:34 2007 Koichi Sasada + + * compile.c, insns.def: remove (get|set)instancevariable2 and add a + operand is_local to (get|set)instancevariable. + + * yarvtest/test_class.rb: add a test for class local instance variable. + + * parse.y (rb_decompose_ivar2): remove unused variable oid. + + * tool/insns2vm.rb: remove needless require. + +Tue Feb 6 11:18:41 2007 Shugo Maeda + + * lib/net/ftp.rb: check the control connection on EPIPE. + Thanks, Simon Williams. [ruby-core:9547] + +Tue Feb 6 11:03:27 2007 Koichi Sasada + + * complement last commit. + + * common.mk (*.inc): use VPATH. + + * vm_opts.h: renamed from vm_opts.h.base. + +Tue Feb 6 10:02:41 2007 Nobuyoshi Nakada + + * tool/insns2vm.rb: use vm_opts.h in VPATH. + +Tue Feb 6 03:47:58 2007 Koichi Sasada + + * proc.c: support Binding#eval. + + * yarvtest/test_eval.rb: add a test for above change. + +Tue Feb 6 03:13:33 2007 Koichi Sasada + + * proc.c: refactoring (remove K&R style, move Binding stuffs from + Init_Proc() to Init_Binding()). + +Tue Feb 6 01:07:14 2007 Koichi Sasada + + * intern.h: prepare rb_last_status_get() and rb_last_status_set(). + Use these functions instead of rb_last_status ([ruby-dev:30264]). + + * process.c: define above functions. + + * ext/pty/pty.c: use above functions. + + * io.c (pipe_finalize): ditto. + + * process.c: ditto. + +Mon Feb 5 21:26:56 2007 Koichi Sasada + + * ruby.h: add a prototype of rb_id2str(). + +Mon Feb 5 21:06:50 2007 Koichi Sasada + + * eval_thread.c, common.mk: remove eval_thread.c. + + * yarvcore.c: rename cYarvThread to rb_cThread. + + * gc.c: remove YARV_* prefix. + + * gc.h: add an include guard and prototype of rb_gc_set_stack_end(). + + * inits.c: fix to ANSI prototype style and reorder Init_*(). + + * io.c (pipe_finalize): TODO: comment out last_status. + + * process.c, yarvcore.h: fix to use yarv_vm_t#last_status instead of + rb_last_status and make last_status_get() to access $?. + + * yarvcore.c (vm_mark): mark yarv_vm_t#last_status. + + * ruby.h: add declarations of rb_cISeq and rb_cVM. + + * thread.c: move eval_thread.c codes to thread.c and remove yarv_* + function prefix. + + * thread.c (thread_start_func_2): use yarv_thread_t#first_func if + it is not null. + + * vm.c: fix copyright year. + + * yarvcore.c (Init_vm): rename to Init_VM(). + +Mon Feb 5 04:09:48 2007 Yukihiro Matsumoto + + * eval.c (rb_frame_callee): check if prev_cfp can be accessible. + a patch from Yoshinori Sano in + [ruby-dev:30252]. solves [ruby-dev:30200] and [ruby-core:9856]. + +Sun Feb 4 20:34:41 2007 Kouhei Sutou + + * test/rss/rss-assertions.rb: removed needless code for backward + compatibility. + +Sun Feb 4 02:22:59 2007 Akinori MUSHA + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): Remove a debug + print. + +Sat Feb 3 23:51:58 2007 Yukihiro Matsumoto + + * parse.y (rb_compose_ivar2): function to create a new ivar2 + symbol from a symbol and a class. back-ported from matzruby. + + * parse.y (rb_decompose_ivar2): reverse function of + rb_compose_ivar2(). + + * marshal.c (w_symbol): support class local instance variables. + + * marshal.c (r_object0): ditto. + + * compile.c (defined_expr): ditto. + + * compile.c (iseq_compile_each): ditto. + + * insns.def: add two new instructions: getinstancevariable2 and + setinstancevariable2. + +Sat Feb 3 23:21:13 2007 Yukihiro Matsumoto + + * insns.def (setclassvariable): remove unnecessary operand. + + * compile.c (iseq_compile_each): ditto. + + * common.mk (insns_info.inc): add dependency for insns_info.inc. + +Sat Feb 3 14:32:58 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant): + fix the bug of WIN32OLE_VARIANT.new when variant type is + VT_ARRAY. + + * ext/win32ole/sample/excel1.rb: rewrite using WIN32OLE_VARIANT. + + * test/win32ole/test_win32ole.rb: add some test. + + * test/win32ole/test_win32ole_variant.rb: ditto. + +Sat Feb 3 03:35:20 2007 Nobuyoshi Nakada + + * Makefile.in, */Makefile.sub, common.mk (vmasm): generalized. + + * common.mk (runruby, benchmark, benchmark-each, tbench): use + PROGRAM for the file to be built. + + * proc.c (yarv_proc_alloc): needs return. + + * call_cfunc.ci, compile.c, compile.h, debug.h, eval.c, + eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c, + insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y, + range.c, ruby.h, signal.c, thread.c, thread_win32.ci, vm.c, + vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: + fixed indents and non-C90 comments. + + * regenc.h: revert to before YARV. + + * lib/mkmf.rb (create_makefile): make object files depend on + extconf.h even if depend file exists. + +Fri Feb 2 23:39:42 2007 Yukihiro Matsumoto + + * common.mk (bin): add more dependency. a patch from Tadashi + Saito . [ruby-dev:30245] + +Fri Feb 2 18:44:31 2007 Yukihiro Matsumoto + + * insns.def (setclassvariable): remove warn argument. + +Fri Feb 2 18:36:40 2007 Yukihiro Matsumoto + + * common.mk (compile.$(OBJEXT)): add config.h to vm.c and + compile.c. + +Fri Feb 2 18:27:54 2007 Yukihiro Matsumoto + + * eval.c: remove duplicated global variables rb_cProc and + rb_cBinding. [ruby-dev:30242] + +Fri Feb 2 00:13:44 2007 Yukihiro Matsumoto + + * ruby.h (SYMBOL_P): make Symbol immediate again for performance. + + * string.c: redesign symbol methods. + +Thu Feb 1 23:25:21 2007 Nobuyoshi Nakada + + * parse.y (rb_id2str): store Strings for operator symbols. + [ruby-dev:30235] + +Thu Feb 1 21:04:39 2007 Yukihiro Matsumoto + + * parse.y (assignable_gen): no need to generate NODE_CVDECL. + + * compile.c (iseq_compile_each): no NODE_CVDECL. + +Thu Feb 1 20:53:32 2007 Yukihiro Matsumoto + + * vm.c (eval_get_cvar_base): destination for class variable access + is now strictly innermost surrounding class or module. warned + if accessed from toplevel. + + * variable.c (rb_cvar_get): new class variable look-up scheme: + 1) look up in the class. 2) if the class is singleton attached + to a class (i.e. metaclass) then start look up in the attached + class and its ancestors. 3) otherwise, look-up in ancestors of + the class. + + * eval.c (cvar_cbase): destination for class variable access is + the class/module that holds the method, or cbase outside of + methods. + +Thu Feb 1 20:31:41 2007 Yukihiro Matsumoto + + * variable.c (rb_cvar_set): remove warn argument. + +Wed Jan 31 14:52:09 2007 Yukihiro Matsumoto + + * test/ruby/test_iterator.rb (TestIterator::test_block_given_within_iterator): + add new test. [ruby-core:10125] + +Tue Jan 30 17:01:21 2007 NAKAMURA Usaku + + * string.c (rb_str_sub_bang): calling rb_str_modify() should be just + before actually modifying the string. + fixed: [ruby-dev:30211] (originally reported by zunda) + +Tue Jan 30 13:24:06 2007 Yukihiro Matsumoto + + * numeric.c (int_pred): add Integer#pred corresponding + Integer#succ. [RCR#5] + +Tue Jan 30 12:05:35 2007 Nobuyoshi Nakada + + * mkconfig.rb: autoconf 2.61 support. [ruby-core:10016] + +Mon Jan 29 23:52:32 2007 Yukihiro Matsumoto + + * tool/compile.rb: replace YARVCore by VM class. + +Mon Jan 29 17:52:44 2007 Yukihiro Matsumoto + + * lib/date/format.rb (Date::Format::Bag::method_missing): add + prefix to avoid making t class-local instance variable. + +Mon Jan 29 21:32:37 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE.locale=, WIN32OLE.locale, + WIN32OLE_VARIANT#vartype. + + * test/win32ole/test_win32ole.rb: add test for WIN32OLE.locale=, + WIN32OLE.locale. + + * test/win32ole/test_win32ole_variant.rb: add test for + WIN32OLE_VARIANT#vartype. + +Mon Jan 29 14:14:35 2007 Yukihiro Matsumoto + + * tool/parse.rb: replace YARVCore by VM class. + http://d.hatena.ne.jp/ysano2005/20070128 + +Sun Jan 28 08:41:49 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: refactoring. + +Sat Jan 27 18:36:33 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_val2olevariantdata): bug fix. + WIN32OLE_VARIANT.new check that 1st argument should T_ARRAY + when variant type is VT_ARRAY. + + * test/win32ole/test_win32ole_variant.rb: add some test. + +Fri Jan 26 23:55:56 2007 Masaki Suketa + + * ext/win32ole/win32ole.c: bug fix of WIN32OLE_VARIANT when variant + type is VT_BYREF|VT_VARIANT. + + * test/win32ole/test_win32ole_variant_with_ie.rb: ditto. + +Fri Jan 26 12:03:39 2007 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb (TkConfigMethod#__confinfo_cmd, + __conv_keyonly_optkeys): make them private [ruby-dev:30074]. + + * ext/tk/lib/tk/txtwin_abst.rb: fix typo [ruby-dev:30073]. + + * ext/tk/lib/tk/canvas.rb (TkCanvas#scan_dragto): lack of an argument. + + * ext/tk/lib/tk/canvas.rb: clarify the including module name + [ruby-dev:30080]. + + * ext/tk/lib/tk/scrollable.rb: change primary name of modules + [ruby-dev:30080]. + +Fri Jan 26 07:48:57 2007 Yukihiro Matsumoto + + * enumerator.c (enumerator_init_copy): need to copy internal + structure on clone and dup. [ruby-dev:30192] + +Wed Jan 24 20:34:51 2007 Kouhei Sutou + + * test/ruby/test_iterator.rb: removed a needless workaround. + +Wed Jan 24 18:05:39 2007 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): fix + regexp font-lock bug. [ruby-talk:235758] + +Tue Jan 23 18:26:12 2007 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): use == instead + of ===. [ruby-dev:30176] + +Tue Jan 23 15:39:25 2007 NAKAMURA Usaku + + * Makefile.in, common.mk, configure.in, */{Makefile.sub, configure.bat, + setup.mak}: add --with-baseruby configure option. + +Mon Jan 22 14:57:25 2007 Yukihiro Matsumoto + + * ext/socket/socket.c: fix errors in socket sample code. + [ruby-core:09992] + +Sat Jan 20 21:05:18 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (fole_s_set_code_page): WIN32OLE.codepage= + accepts installed codepage. + + * test/win32ole/test_win32ole.rb (test_s_codepage_changed): ditto. + +Sat Jan 20 11:18:49 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_invoke, ole_invoke2, ole_propertyput): + modify WIN32OLERuntimeError message. + + * test/win32ole/test_win32ole.rb: ditto. + +Sat Jan 20 06:45:21 2007 Yukihiro Matsumoto + + * eval_proc.c (method_receiver): add new method to get the bound + receiver of the method object. [ruby-talk:234949] + + * eval_proc.c (method_name): new method to get the name of a + method. + + * eval_proc.c (method_owner): a new method to get the class or + module that defines the method. + +Fri Jan 19 17:12:23 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (Init_win32ole): add WIN32OLE_VARIANT::Empty, + WIN32OLE_VARIANT::Null, WIN32OLE_VARIANT::Nothing. + + * test/win32ole/test_win32ole_variant.rb: ditto. + + * test/win32ole/test_nil2vtempty.rb(test_openSchema): ditto. + +Fri Jan 19 06:53:38 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (olevariant_free): fix memory leak. + + * ext/win32ole/win32ole.c (ole_val2olevariantdata): + WIN32OLE_VARIANT.new accepts nil as first argument for some VARIANT + TYPE. + + * test/win32ole/test_win32ole_variant.rb: ditto. + +Wed Jan 17 17:31:28 2007 Koichi Sasada + + * some refactoring around yarvcore and proc. + + * eval_proc.c: renamed to proc.c. + + * common.mk: ditto. + + * yarvcore.h, yarvcore.c: rename or remove some global variables + removed: mYarvCore, mYarvInsns + renamed: cYarvISeq -> rb_cISeq, + cYarvProc -> rb_cProc, cYarvBinding -> rb_cBinding + ::YarvCore module is removed and ::YarvCore::VM class becomes ::VM. + And change/remove some functions which added with YARV. + + * compile.c: ditto. + + * eval.c: ditto. + + * iseq.c: ditto. + + * vm.c: ditto. + + * inits.c: rename Init_yarvcore to Init_vm. + + * yarvcore.c, proc.c: move some functions and initialization + from yarvcore.c to proc.c. + + * intern.h, proc.c: add global function rb_binding_new(void). + +Tue Jan 16 17:49:29 2007 Koichi Sasada + + * vm.c (eval_search_super_klass): rename to search_super_klass() and + use it by th_call_super(). + + * insns.def: ditto. + +Tue Jan 16 17:48:11 2007 Koichi Sasada + + * common.mk: fix ruby script path. + +Tue Jan 16 17:39:44 2007 Koichi Sasada + + * vm.c (invoke_block): fix to specify self. + +Tue Jan 16 12:12:27 2007 Koichi Sasada + + * env.h: removed + +Tue Jan 16 12:00:06 2007 Koichi Sasada + + * eval_proc.c (rb_proc_new): added. + + * string.c (sym_to_proc): supported. + + * vm.c (invoke_block, th_invoke_yield, th_invoke_proc): fix to support + rb_proc_new. + + * yarvcore.c: add a test code. + +Sat Jan 13 23:24:59 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_free, ole_type_free, + olemethod_free, olevariable_free, oleparam_free, + ole_event_free): fix memory leak. [ruby-core:09846] + +Wed Jan 10 00:10:23 2007 Nobuyoshi Nakada + + * array.c (rb_ary_replace): use ptr and len of orig instead of + shared. fixed: [ruby-dev:30116] + +Tue Jan 9 17:48:38 2007 NAKAMURA Usaku + + * file.c (rb_find_file): should not call fpath_check() with NULL. + fixed: [ruby-core:09867] + +Tue Jan 9 12:29:20 2007 Nobuyoshi Nakada + + * ext/etc/etc.c (etc_getpwuid, etc_getgrgid): fix to correctly + convert uid/gid from VALUE. + + * ext/etc/etc.c (etc_getpwuid): ditto. + +Tue Jan 9 03:54:38 2007 Yukihiro Matsumoto + + * string.c (rb_str_upto): String#upto from empty string makes + infinite loop. [ruby-core:09864] + + * string.c (rb_str_upto): use RSTRING_LEN(). + +Sun Jan 7 18:36:05 2007 Koichi Sasada + + * thread.c (rb_thread_stop_timer_thread(), rb_thread_reset_timer_thread(), + rb_thread_start_timer_thread()): added. + + * thread_pthread.ci: add a native_thread_join() and move + rb_thread_reset_timer_thread() definition to thread.c. + + * thread_win32.ci: ditto + + * process.c: fix before_exec(), after_exec() to stop timer thread + (and restart timer thread if exec failed). and fix to reset + timer thread information when forked child process starts + (to fix [ruby-core:09822]). + +Sun Jan 7 18:28:17 2007 Koichi Sasada + + * common.mk: add a "compare" rule and fix MATZRUBY variable + +Sun Jan 7 17:47:16 2007 Masaki Suketa + + * test/win32ole/test_win32ole.rb: add test for WIN32OLE#[], + WIN32OLE#[]=. + + * ext/win32ole/win32ole.c: update comment for rdoc of + WIN32OLE#[] and WIN32OLE#[]=. + +Sun Jan 7 12:13:26 2007 Eric Hodel + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_class_comment): + Look for class and module comments above rb_define_class and + rb_define_module. Patch by Daniel Berger + +Sun Jan 7 10:32:12 2007 Eric Hodel + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constants): + Properly handle escaping of : in comments. + * test/rdoc/parsers/test_parse_c.rb: + Test RDoc::C_Parser#do_classes and Rdoc::C_Parser#find_class_comment. + +Sun Jan 7 09:31:18 2007 Tadayoshi Funaba + + * lib/date/format.rb: updated based on date2 4.0.1. + +Sat Jan 6 18:46:34 2007 Nobuyoshi Nakada + + * io.c (rb_io_getline_fast, rb_io_getline): increase lineno + when met the delimiter or EOF. fixed: [ruby-dev:30081] + + * io.c (prepare_getline_args, rb_io_getline_1): split + preparation of arguments and reading. [ruby-dev:30085] + +Sat Jan 6 13:48:36 2007 Koichi Sasada + + * insns.def (send): fix to optimize send() with Symbol. + + * yarvtest/test_method.rb: add another test. + +Sat Jan 6 13:43:55 2007 Koichi Sasada + + * common.mk: add PHONY dependency to some rules + +Sat Jan 6 11:50:33 2007 Yukihiro Matsumoto + + * io.c (argf_read): fix wrong replacement. [ruby-dev:30070] + +Sat Jan 6 09:10:52 2007 Koichi Sasada + + * insns.def: support direct method dispatch with "send" or "funcall". + This means that "obj.send :m" skips "BasicObject#send" invocation + (method frame creation, etc) and "obj.m" invokes directly. + If you make backtrace, there are no entries of "send" method. + + * compile.c (iseq_specialized_instruction): fix to support above + + * eval.c: ditto (remove "static" from rb_f_send and rb_f_funcall + + * yarvcore.c: ditto (add a external IDs for compiler) + + * yarvcore.h: ditto (add a VM_CALL_SEND_BIT macro) + + * yarvtest/test_method.rb: add tests for above changes + + * eval.c: remove unused "Kernel#send" declaration + +Sat Jan 6 08:29:17 2007 Masaki Suketa + + * ext/win32ole/win32ole.c (Init_win32ole): add + WIN32OLE::VARIANT::VT_EMPTY, WIN32OLE::VARIANT::VT_NULL + + * test/win32ole/test_win32ole_variant_m.rb (test_variant): ditto. + +Sat Jan 6 03:49:22 2007 Koichi Sasada + + * benchmark/run.rb: change option format + + * common.mk: ditto + +Fri Jan 5 22:21:08 2007 Koichi Sasada + + * benchmark/bm_app_pentomino.rb: use Array#dup instead of + Array#clone + + * benchmark/bmx_temp.rb: removed + + * benchmark/run.rb: use run.rb instead of run_rite.rb + + * common.mk: ditto + + * benchmark/run_rite.rb: removed + + * common.mk: use $(srcdir)/test.rb to run a test program + with "make run" + + * benchmark/bmx_temp.rb: removed and + set svn:ignore (bmx_*.rb) to benchmark/ + + * test.rb: set svn:ignore + +Fri Jan 5 21:03:08 2007 Koichi Sasada + + * yarvtest/yarvtest.rb: fix to compare results + +Fri Jan 5 20:52:56 2007 Koichi Sasada + + * compile.c, compile.h: add ADD_CALL_RECEIVER() macro. + + * insns.def (send): use GET_SELF() direct if FCALL. + + * eval.c (rb_f_send): check method dispatch type to permit + invoking private method when dispatch type is FCALL/VCALL + + * insns.def (opt_ltlt): remove useless statement. + + * vm.h: remove unused macros. + +Fri Jan 5 20:50:31 2007 Koichi Sasada + + * benchmark/run_rite.rb: fix to use readlines instead of + read(...).lines (because 1.8 doesn't have String#lines). + +Fri Jan 5 20:28:19 2007 Koichi Sasada + + * thread_win32.ci (rb_thread_reset_timer_thread): + added ([ruby-dev:30086]). + +Fri Jan 5 20:20:36 2007 Koichi Sasada + + * common.mk: add .SUFFIXES rule + +Fri Jan 5 15:58:15 2007 Koichi Sasada + + * eval_method.h (rb_alias): fix to check search result + +Fri Jan 5 13:59:53 2007 Koichi Sasada + + * eval_method.h (rb_add_method): fix to check old_node + +Fri Jan 5 12:03:07 2007 Koichi Sasada + + * compile.c (iseq_compile_each, set_block_local_tbl): + support NODE_LAMBDA (partly). + + * sample/test.rb: restore test of NODE_LAMBDA + + * test/ruby/test_lambda.rb: ditto + +Fri Jan 5 12:31:23 2007 GOTOU Yuuzou + + * thread_pthread.ci (native_sleep): fix tv_nsec overflow. + +Thu Jan 4 20:01:29 2007 Koichi Sasada + + * common.mk: rename yarv-test-[all/each] to compare-test[/-each]. + purpose of "compare-test" rule is to compare ruby (trunk) and + matzruby (branches/matzruby) binary in miniruby level. MATZRUBY + parameter means an path to miniruby of matzruby binary. to do this + comparison test, you should build matzruby branch. + + * yarvtest/yarvtest.rb: fix to use command line option as + command names to be compared. + + * yarvtest/runner.rb: remove a debug output. + +Thu Jan 4 19:12:27 2007 Koichi Sasada + + * common.mk: fix to use test.rb script in build directory. + ($(srcdir)/test.rb -> test.rb) + +Thu Jan 4 17:28:05 2007 GOTOU Yuuzou + + * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#initialize): + Arrays could not be modified in its each block. [ruby-dev:30063] + +Thu Jan 4 16:57:14 2007 Koichi Sasada + + * yarv_version.h: removed. + + * common.mk: remove yarv_version.h from rules + + * yarvcore.h (Init_yarvcore): remove useless constants + +Thu Jan 4 17:00:06 2007 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (Init_ossl_asn1): + OpenSSL::ASN1::ASN1Data#value,#tag,#tag_class and + OpenSSL::ASN1::BitString#unused_bits should be public. + +Thu Jan 4 13:45:10 2007 Koichi Sasada + + * thread_pthread.ci: fix last changes around PTHREAD_STACK_MIN. + +Thu Jan 4 13:42:47 2007 Koichi Sasada + + * common.mk: restore changes. + +Thu Jan 4 10:33:54 2007 Koichi Sasada + + * thread_pthread.ci: fix to skip using PTHREAD_STACK_MIN. + [ruby-dev:30063] + +Thu Jan 4 10:30:11 2007 Koichi Sasada + + * benchmark/run_rite.rb (bm): fix to use lines. + +Wed Jan 3 18:49:15 2007 Yukihiro Matsumoto + + * io.c (rb_io_getline): lineno update condition was wrong. + [ruby-dev:30065] + + * io.c (rb_io_getline_fast): ditto. + +Wed Jan 3 11:36:51 2007 Yukihiro Matsumoto + + * io.c (ruby_dup): start GC on ENOMEM as well. + +Tue Jan 2 10:29:54 2007 Eric Hodel + + * ext/zlib/zlib.c: fix to compile on YARV + ruby_errinfo -> rb_errinfo() + +Mon Jan 1 08:07:06 2007 Koichi Sasada + + * ext/tk/tcltklib.c: fix to compile on YARV + ruby_errinfo -> rb_errinfo(), + ruby_safe_level -> rb_safe_level(). + +Mon Jan 1 07:57:17 2007 Koichi Sasada + + * test/drb/test_drbssl.rb: fix to skip drb tests. + +Mon Jan 1 06:13:11 2007 Eric Hodel + + * lib/rdoc/parsers/c_parser.rb: Make Rdoc accessible. Update constant + value information. + +Mon Jan 1 06:13:11 2007 Eric Hodel + + * ext/bigdecimal/bigdecimal.c: Update constant comments to provide + values for RDoc. + +Mon Jan 1 06:05:55 2007 Eric Hodel + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constants): + Allow RDoc comment to give friendly value for rb_define_const. Patch + by Daniel Berger , [ruby-patches-7499]. + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constants): Fix + whitespace handling in constant comments. + +Mon Jan 1 00:00:00 2007 Koichi Sasada + + * Merge YARV + +Sun Dec 31 16:22:48 2006 Eric Hodel + + * array.c: Fix Array#reject. + +Sun Dec 31 00:46:25 2006 Tadayoshi Funaba + + * lib/date2.rb: removed. + +Sun Dec 31 00:15:13 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 4.0. + +Sat Dec 30 04:38:23 2006 Yukihiro Matsumoto + + * enum.c (enum_each_with_index): reuse array for yield parameters. + + * enum.c (enum_min, enum_max): ditto. + +Sat Dec 30 04:25:29 2006 Yukihiro Matsumoto + + * enum.c (enum_inject): reuse array for yield parameters. + +Sat Dec 30 02:54:22 2006 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_gets): accepts limit argument. + + * ext/stringio/stringio.c (strio_readline, strio_each, + strio_readlines): ditto. + +Sat Dec 30 02:22:32 2006 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_getline): add limit capability. + + * io.c (rb_io_gets_m): accepts limit argument. [ruby-talk:231563] + + * io.c (rb_io_readline, rb_io_readlines, rb_io_each_line, argf_getline): + ditto. + + * io.c (appendline): add limit capability. + + * io.c (rb_io_getline_fast, rb_io_getline): ditto. + + * io.c (rb_io_getline): small refactoring for DRY. + + * io.c (rb_io_s_foreach, rb_io_s_readlines): small refactoring. + +Thu Dec 28 15:27:38 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::Cookie::initialize): use Array() again. + [ruby-core:09781] + +Wed Dec 27 20:52:32 2006 Masaki Suketa + + * ext/win32ole/win32ole.c: remove WIN32OLE::PROPERTY class. + + * ext/win32ole/tests/testWIN32OLE.rb: ditto. + +Wed Dec 27 10:04:11 2006 Yukihiro Matsumoto + + * object.c (rb_Array): returns 1-element array if the argument + does not have to_ary nor to_a. + +Tue Dec 26 21:02:14 2006 Masaki Suketa + + * test/win32ole/test_folderitem2_invokeverb.rb: The argument + of Shell.NameSpace should not be file path. + +Tue Dec 26 06:13:08 2006 Minero Aoki + + * ext/bigdecimal/bigdecimal.c: remove useless method + BigDecimal#!=. [ruby-dev:30050] + +Thu Dec 21 15:37:17 2006 Yukihiro Matsumoto + + * string.c (rb_str_slice_bang): rdoc description bug fixed. + [ruby-core:09754] + +Wed Dec 20 12:54:31 2006 Koichi Sasada + + * Convert CVS repository to Subversion repository. + +Mon Dec 18 08:36:29 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::Cookie::initialize): Array(string) no longer + works. [ruby-core:09738] + +Fri Dec 15 00:19:53 2006 Nobuyoshi Nakada + + * win32/Makefile.sub (COMPILE_RULES): latter rule has higher priority. + + * lib/mkmf.rb (create_makefile): remove static library before update, + to get rid of sludge of Borland tlib.exe. + +Thu Dec 14 18:29:13 2006 Yukihiro Matsumoto + + * ext/readline/readline.c: NetBSD editline does not have + rl_username_completion_function() and rl_completion_matches(). + a patch from Takahiro Kambe . + [ruby-dev:30008] + +Thu Dec 14 18:20:43 2006 Yukihiro Matsumoto + + * lib/irb/locale.rb (IRB::Locale::puts): typo fixed. a patch from + NAKAMURA Usaku . [ruby-dev:30012] + +Tue Dec 12 23:33:53 2006 Nobuyoshi Nakada + + * lib/optparse.rb (Switch#parse_arg, Switch#conv_arg): splat failures. + +Mon Dec 11 11:51:10 2006 Akinori MUSHA + + * ext/digest/sha2/lib/sha2.rb: Moved one level up from under + the superfluous subdirectory digest/. + +Mon Dec 11 11:46:18 2006 Yukihiro Matsumoto + + * variable.c (rb_define_const): typo fixed. + +Mon Dec 11 09:36:29 2006 Yukihiro Matsumoto + + * string.c (rb_str_aset): index double decode problem. + [ruby-core:09695] + +Sat Dec 9 21:39:24 2006 Nobuyoshi Nakada + + * eval.c (ruby_cleanup): keep the exception till after END blocks. + [ruby-core:09675] + +Sat Dec 9 11:22:00 2006 Yukihiro Matsumoto + + * lib/irb/locale.rb (IRB::Locale::search_file): use File.exist? + instead of File.exists?. a patch from Yutaka Kanemoto + in [ruby-dev:30000]. + +Fri Dec 8 18:11:18 2006 NAKAMURA Usaku + + * lib/optparse.rb: cannot put :nodoc: before method definition. + put after it. + +Fri Dec 8 17:00:13 2006 NAKAMURA Usaku + + * bin/rdoc: use File.exist? instead of File.exists?. + +Thu Dec 7 23:50:21 2006 Yukihiro Matsumoto + + * object.c (Init_Object): new method Dir.exist?(path). + [ruby-core:09663] + + * file.c (Init_File): remove File.exists?; use File.exist? + instead. + + * file.c: rename functions to test_* to rb_file_*_p. + +Thu Dec 7 09:29:02 2006 Yukihiro Matsumoto + + * lib/weakref.rb (WeakRef::__setobj__): should support + marshaling. [ruby-talk:228508] + +Wed Dec 6 23:58:36 2006 Nobuyoshi Nakada + + * Makefile.in, common.mk (NULLCMD): moved for platforms that empty + command does not run. fixed: [ruby-dev:29994] + + * win32/win32.c (init_stdhandle): redirect unopened IOs to NUL. + [ruby-core:09572] + +Tue Dec 5 19:01:42 2006 WATANABE Hirofumi + + * configure.in (SITE_DIR): fixed to empty RUBY_SITE_LIB in config.h on + NetBSD. fixed: [ruby-dev:29358] + +Tue Dec 5 18:38:21 2006 Yukihiro Matsumoto + + * lib/matrix.rb (Matrix::rank): use quo method to avoid integer + division problem. [ruby-core:09644] + + * lib/matrix.rb (Matrix::rank_e): ditto. + +Tue Dec 5 00:59:05 2006 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-parse-partial): need to parse "/=" as + self assignment operator, not regex. [ruby-talk:227324] + +Tue Dec 5 00:19:14 2006 Nobuyoshi Nakada + + * intern.h, object.c, variable.c (rb_mod_constants): added an optional + flag to search ancestors, which is defaulted to true, as well as + const_defined? and const_get. [ruby-dev:29989] + +Mon Dec 4 23:49:28 2006 Nobuyoshi Nakada + + * instruby.rb (install_recursive): get rid of warning. + + * lib/optparse.rb (CompletingHash#match): get rid of splat failure. + +Mon Dec 4 19:16:39 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb: Do alias << update. + +Mon Dec 4 10:48:03 2006 Yukihiro Matsumoto + + * ruby.h (OFFT2NUM): use LONG2NUM() if sizeof(long) equals to + sizeof(off_t). + +Mon Dec 4 08:32:25 2006 Shugo Maeda + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): should quote + boundary. JVN#84798830 + +Sun Dec 3 16:16:53 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb: Fix problems with update + timing. [Reported by: oss-ruby@technorama.net] + +Sat Dec 2 07:33:53 2006 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils::FormData::<<): + HTTPUtils::parse_header() takes a string. [ruby-dev:29931] + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header): + String does no longer have each method. + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_form_data): + ditto. + +Sat Dec 2 07:09:04 2006 GOTOU Yuuzou + + * ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should be + subclass of OpenSSL::OpenSSLError. [ruby-dev:29980] + +Fri Dec 1 16:31:53 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: shouldn't run the killed thread at callback. + [ruby-talk: 227408] + +Tue Nov 28 17:25:11 2006 Yukihiro Matsumoto + + * array.c (ary_iter_check): should check modification (size + change) during iteration. + + * array.c (rb_ary_initialize, rb_ary_shift, rb_ary_unshift, + rb_ary_splice, rb_ary_reverse, rb_ary_sort, rb_ary_delete, + rb_ary_delete_at, rb_ary_reject_bang, rb_ary_replace, + rb_ary_clear, rb_ary_fill, rb_ary_uniq_bang, rb_ary_compact, + rb_ary_shuffle): add iteration check. + +Mon Nov 27 09:00:15 2006 Yukihiro Matsumoto + + * string.c (rb_str_ord): typo fixed. reported from Kornelius + Kalnbach . [ruby-core:09621] + +Sun Nov 26 16:36:46 2006 URABE Shyouhei + + * version.h: addition of RUBY_PATCHLEVEL. + * version.c: ditto. + +Wed Nov 22 16:00:49 2006 Hidetoshi NAGAI + + * ext/tk/extconf.rb: support --with-X11/--without-X11 option. + + * ext/tk/README.tcltklib: add description about --with-X11-* option + [ruby-talk:225166] and --with-X11/--without-X11 option. + + * ext/tk/tkutil/extconf.rb: able to be called manually + [ruby-talk:225950]. + +Sat Nov 18 23:39:20 2006 Yukihiro Matsumoto + + * object.c (rb_obj_tap): a new method. [ruby-talk:224013] + +Wed Nov 15 23:22:54 2006 Nobuyoshi Nakada + + * file.c (test_grpowned, rb_stat_grpowned): should honor + supplementary group IDs. [ruby-core:09546] + +Tue Nov 7 18:35:18 2006 Yukihiro Matsumoto + + * eval.c (formal_assign): need to pack rest arg information in + argc. + +Tue Nov 7 18:05:01 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/itemconfig.rb: minor bug fix. + +Tue Nov 7 17:52:08 2006 Yukihiro Matsumoto + + * class.c (rb_include_module): revert duplicate inclusion of + modules. [ruby-dev:29793] + +Tue Nov 7 17:18:11 2006 Yukihiro Matsumoto + + * eval.c (method_missing): update old argument adjustment. + +Tue Nov 7 16:41:21 2006 Nobuyoshi Nakada + + * eval.c (when_check): need to splat for NODE_ARGSCAT as well. + [ruby-dev:29860] + +Mon Nov 6 22:23:52 2006 Yukihiro Matsumoto + + * string.c (Init_String): remove duplicated definition of + Symbol#to_s. + +Mon Nov 6 18:54:13 2006 Yukihiro Matsumoto + + * eval.c (svalue_to_avalue): need to splat but no error. + + * eval.c: new macros - YIELD_CALL, YIELD_VALUES. + + * eval.c (rb_yield_values): specify YIELD_VALUES. + + * eval.c (rb_yield_0): use new macros. + + * eval.c (proc_invoke): slightly modified to separate YIELD_CALL + and YIELD_VALUES from YIELD_ARY_ARGS. + + * object.c (Init_Object): add nil.to_splat => []. + +Mon Nov 6 15:41:55 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/itemconfig.rb: ext/tk/lib/tk/itemconfig.rb: bug + fix on 'itemconfiginfo' method, and modify to make it easy to + override 'itemconfiginfo' method. + + * ext/tk/lib/tkextlib/tile/treeview.rb: support Tile 0.7.8. + + * ext/tk/lib/tkextlib/version.rb: [new] add Tk::Tkextlib_RELEASE_DATE + to get the information from scripts. + + * ext/tk/lib/tk.rb: load 'tkextlib/version.rb', and update RELEASE_DATE + + * ext/tk/lib/tkextlib/SUPPORT_STATUS: update. + + * ext/tk/sample/editable_listbox.rb: [new] the listbox with editable + items. It's one of the example about usage of Place geometry manager. + + * ext/tk/sample/tktextio.rb: improve the functions of TkTextIO class. + Those are required by 'irbtkw.rbw'. + + * ext/tk/sample/irbtkw.rbw: [new] IRB on Ruby/Tk. It doesn't need any + real console. IRB works on a text widget without I/O blocking. That + is, thread switching on IRB will work properly, even if on Windows. + +Mon Nov 6 00:42:05 2006 Yukihiro Matsumoto + + * parse.y (arg_dup_check): vid may be nameless internal id. + +Sun Nov 5 19:52:19 2006 Tadayoshi Funaba + + * lib/date.rb: updated based on date2 3.9.7. + +Sat Nov 4 13:09:31 2006 Shugo Maeda + + * lib/net/imap.rb: accept NOMODSEQ. [ruby-core:9002] + +Fri Nov 3 00:16:37 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (ruby_getnameinfo__aix): AF_INET6 workaround + for AIX. a patch from Yutaka Kanemoto . + [ruby-dev:29744] + +Thu Nov 2 14:19:44 2006 Akinori MUSHA + + * lib/set.rb (Set#^): Fix XOR operation against a container that + holds duplicate values. [ruby-core:9372] + +Thu Nov 2 10:00:06 2006 Yukihiro Matsumoto + + * string.c: class Symbol is no longer subclass of String. also + covers [ruby-core:09366] + +Thu Nov 2 08:21:07 2006 Yukihiro Matsumoto + + * lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): Symbol should + come earlier than String. + + * lib/soap/mapping/rubytypeFactory.rb (RubytypeFactory::obj2soap): + ditto. + + * lib/set.rb (TC_Set::test_s_new): strings are no longer + Enumerable + + * lib/soap/property.rb (Property::load): ditto. + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header): ditto. + + * lib/soap/mimemessage.rb (MIMEMessage::Headers::parse): ditto. + +Thu Nov 2 09:08:04 2006 Yukihiro Matsumoto + + * array.c: revert lfree shift/unshift boost patch to avoid unknown + memory error. + +Wed Nov 1 23:24:42 2006 Yukihiro Matsumoto + + * ruby.h (struct RArray): revert embedding ptr in RVALUE. + + * array.c: ditto. + +Wed Nov 1 23:01:55 2006 Yukihiro Matsumoto + + * string.c (hash): use Bob Jenkins' hash algorithm. + +Wed Nov 1 02:22:31 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minor + optimization. + + * ext/digest/digest.c (rb_digest_instance_equal): Allow comparing + a digest instance with another of a different class. + +Wed Nov 1 01:05:13 2006 NAKAMURA Usaku + + * eval.c (rb_call0): fixed bug of zsuper with both of opt and rest. + fixed: [ruby-list:42928] + +Tue Oct 31 17:03:21 2006 Yukihiro Matsumoto + + * time.c (time_dup): duplicate the class of original time. + [ruby-core:09357] + + * lib/time.rb (Time::make_time, Time::rfc2822, Time::httpdate): + should respect subclasses. [ruby-core:09357] + +Tue Oct 31 16:25:22 2006 Yukihiro Matsumoto + + * array.c (ary_shared_first): should address offset after + ary_shared_array(). [ruby-core:09358] + +Mon Oct 30 23:40:52 2006 Nobuyoshi Nakada + + * Makefile.in (miniruby): add XLDFLAGS. + + * configure.in (aix): use -bE option for miniruby. [ruby-dev:29698] + + * dir.c (glob_helper): get rid of possible memory leak. + + * win32/win32.c (cmdglob, rb_w32_cmdvector, rb_w32_opendir, + rb_w32_get_environ): not to use GC before initialization. + +Mon Oct 30 19:28:02 2006 NAKAMURA Usaku + + * bignum.c (rb_big2str0): use better approximation. + +Mon Oct 30 18:35:33 2006 Yukihiro Matsumoto + + * bignum.c (rb_big2str0): wrong allocation length. a patch from + U.Nakamura [ruby-dev:29710] + +Mon Oct 30 12:34:02 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): fix commit miss. [ruby-dev:29707] + +Mon Oct 30 11:15:40 2006 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): should preserve leading zero + information for negative %b and %x. [ruby-talk:221347] + +Sun Oct 29 19:51:31 2006 K.Kosako + + * regexec.c: invalid offset value was used in STATE_CHECK_BUFF_INIT(). + +Sat Oct 28 20:13:18 2006 K.Kosako + + * oniguruma.h: Version 4.4.5 + + * regint.h: ditto. + + * regerror.c: ditto. + + * regexec.c: ditto. + + * regcomp.c ditto. + + * regparse.c ditto. + +Sat Oct 28 07:56:13 2006 Yukihiro Matsumoto + + * marshal.c (r_object0): missing break. [ruby-core:09345] + +Fri Oct 27 17:30:31 2006 Yukihiro Matsumoto + + * enumerator.c (enum_each_cons): move RETURN_ENUMERATOR() after + argument check. + +Thu Oct 26 21:05:48 2006 GOTOU Yuuzou + + * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error. + (fix http://bugs.debian.org/394336) + + * ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto. + +Thu Oct 26 15:23:47 2006 Yukihiro Matsumoto + + * enumerator.c: remove by_slice and by_cons. + +Thu Oct 26 15:12:12 2006 NAKAMURA Usaku + + * ext/digest/digest.c (Init_digest): typo. + +Wed Oct 25 17:16:05 2006 Akinori MUSHA + + * test/digest/test_digest_hmac.rb: added. + +Wed Oct 25 16:34:31 2006 Akinori MUSHA + + * ext/digest/test.sh: make this script work again. + +Wed Oct 25 07:59:42 2006 Tadayoshi Funaba + + * lib/date/format.rb: updated based on date2 3.9.6. + [ruby-core:09323] + +Wed Oct 25 00:58:19 2006 Nobuyoshi Nakada + + * win32/mkexports.rb, win32/resource.rb: use unique variable names. + +Tue Oct 24 19:18:53 2006 Yukihiro Matsumoto + + * enumerator.c (enumerator_by_slice): new method added. + + * enumerator.c (enumerator_by_cons): ditto. + +Tue Oct 24 18:56:13 2006 Yukihiro Matsumoto + + * enumerator.c (enum_each_slice, enum_each_cons): returns + Enumerable::Enumerator if no block is given. [ruby-dev:29246] + + * enumerator.c: remove methods: enum_with_index, enum_slice, + enum_cons. [ruby-dev:29246] + +Tue Oct 24 18:51:27 2006 Yukihiro Matsumoto + + * enum.c (enum_zip): add RETURN_ENUMERATOR() to zip method. + +Mon Oct 23 04:30:04 2006 Yukihiro Matsumoto + + * marshal.c (r_object0): use return value from proc given as the + second argument to Marshal#load() to allow value replacement in + the restoring data. + +Sun Oct 22 14:48:31 2006 Yukihiro Matsumoto + + * signal.c (Init_signal): avoid duplicated installation of SIGCHLD + handler. + +Sun Oct 22 16:47:56 2006 Nobuyoshi Nakada + + * string.c (rb_str_substr): should be infected with only original + string, but not the shared string. fixed: [ruby-core:09152] + + * string.c (rb_str_new4): keep shared string untainted when original + string is tainted. fixed: [ruby-dev:29672] + +Sun Oct 22 07:55:11 2006 Yukihiro Matsumoto + + * string.c (rb_str_upcase, rb_str_downcase, rb_str_downcase, + rb_str_upcase_bang, rb_str_downcase_bang, rb_str_swapcase_bang): + add RDoc description that case conversion to be effective only + in ASCII region. + +Sun Oct 22 05:20:34 2006 URABE Shyouhei + + * configure.in: alloca is broken; use C_ALLOCA instead. + [ruby-dev:29416] + +Sat Oct 21 17:50:40 2006 Akinori MUSHA + + * ext/digest/lib/digest.rb: Follow the framework updates. + +Fri Oct 20 22:00:43 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb: Complete half-boiled updates. + + * ext/digest/sha2/lib/digest/sha2.rb: Fix #initialize_clone(). + +Fri Oct 20 20:28:37 2006 Akinori MUSHA + + * ext/digest: Prefix C constants with RUBY_ and C type names with + rb_ to avoid name clash in writing extensions. + + * ext/digest: Introduce Digest::Class and Digest::Instance for + ease of implementing subclasses and add-ons, inspired by + gotoyuzo. + + * ext/digest: The Digest::Instance module now requires and assumes + that any instance be resettable and clonable, and add some + convenient instance methods such as "new()", for creating a new + copy, parameter taking "digest()" and "hexdigest()", for instant + calculation. These methods make digest instances work just like + digest classes. + + * ext/digest/sha2/lib/digest/sha2.rb: + Add the Digest::SHA2 class to wrap up SHA2 variants: SHA256, + SHA384 and SHA512, hoping this module would make a decent + example of a digest subclass written in Ruby. + + * ext/digest/lib/digest.rb: Adjust autoload entries for SHA2 + classes. + + * ext/digest/lib/digest/hmac.rb: Follow the framework updates. + +Fri Oct 20 10:47:43 2006 NAKAMURA Usaku + + * lib/mkmf.rb: fixed the bug of handling COMMON_MACROS. + +Fri Oct 20 08:42:38 2006 Nobuyoshi Nakada + + * common.mk (NULLCMD): dummy command. + + * bcc32/Makefile.sub (post-install-*): Borland make cannot ignore + command-less double-colon rules. [ruby-dev:29676] + +Fri Oct 20 00:37:07 2006 Nobuyoshi Nakada + + * bcc32/Makefile.sub ($(LIBRUBY_SO)): execute pre-link hook. + + * ext/extmk.rb: workaround for Borland make. + +Wed Oct 18 23:02:40 2006 Nobuyoshi Nakada + + * array.c (rb_ary_shift): shorten copy size. fixed: [ruby-list:42907] + + * signal.c (Init_signal): handle SIGTERM. fixed: [ruby-list:42895] + + * win32/win32.c (rb_w32_utime): allow NULL to set the current time. + [ruby-talk:219248] + +Wed Oct 18 13:25:50 2006 Yukihiro Matsumoto + + * string.c (rb_str_each_line): String#lines now works when a block + is given. in other words, lines become an alias to each_line. + [ruby-core:09218] + + * string.c (rb_str_each_byte): ditto for bytes in place of lines. + +Wed Oct 18 00:55:33 2006 Nobuyoshi Nakada + + * parse.y (parser_yylex): use particular enums. [ruby-core:09221] + +Tue Oct 17 22:03:08 2006 Minero Aoki + + * lib/erb.rb: String#each was removed, use #each_line instead. + +Tue Oct 17 12:27:32 2006 Yukihiro Matsumoto + + * array.c (ary_shared_array): should set NOEMBED flag for a copied + array. + +Tue Oct 17 08:04:31 2006 Yukihiro Matsumoto + + * string.c (rb_str_lines): now takes optional argument for the + line separator. + + * io.c (rb_io_lines, rb_io_bytes): new methods. + +Mon Oct 16 23:33:18 2006 Yukihiro Matsumoto + + * array.c (rb_ary_unshift_m): a bug in lfree shift length + calculation. + +Mon Oct 16 08:30:43 2006 Nobuyoshi Nakada + + * mkconfig.rb: *OBJS are not needed for extension libraries. + + * {bcc32,wince,win32}/Makefile.sub (config.status): fixed typo, + missing comma. + +Mon Oct 16 00:44:26 2006 Yukihiro Matsumoto + + * pack.c (pack_unpack): execute block if given with unpacked value + instead of creating an array. an idea from Tim Bray. + +Sun Oct 15 01:03:08 2006 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (Collector::Dir#collect): append base + directory but not prepend. + + * lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): do not + join with dot. fixed: [ruby-core:09179] + +Sat Oct 14 23:39:50 2006 Yukihiro Matsumoto + + * parse.y (singleton): no need to re-create NODE_SELF() again. + [ruby-core:09177] + +Sat Oct 14 23:25:31 2006 Yukihiro Matsumoto + + * parse.y (parser_warning, parser_warn): some error message may + contain format specifiers. a patch from Akinori MUSHA . [ruby-dev:29657] + + * regparse.c (onig_rb_warning, onig_rb_warn): ditto. + + * ext/bigdecimal/bigdecimal.c (VpException): ditto. + + * ext/dl/handle.c (rb_dlhandle_initialize): ditto. + + * ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto. + +Sat Oct 14 08:15:42 2006 Akinori MUSHA + + * ext/digest/digest.c, ext/digest/digest.h, + ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c, + ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: + Introduce API versioning. + + * ext/digest/digest.c, ext/digest/digest.h, + ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c, + ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: Remove + the constants DIGEST_LENGTH and BLOCK_LENGTH and turn them into + instance methods digest_length() and block_length(). Class + methods with the same names are also provided, which take extra + parameters for a digest method. + + * ext/digest/lib/digest/hmac.rb: Completely redesign the somewhat + bizarre API, now that Digest classes can take hashing + parameters. + +Sat Oct 14 05:54:05 2006 Akinori MUSHA + + * ext/digest/digest.c: Improve RDoc documentation further more. + +Sat Oct 14 04:33:33 2006 Akinori MUSHA + + * ext/digest/digest.c: Improve RDoc documentation. + + * ext/digest/digest.c (Init_digest, rb_digest_base_s_digest, + rb_digest_base_s_hexdigest): Make Digest::Base::digest() and + Digest::Base::hexdigest() take extra arguments, which are passed + through to the constructor in an internal call. + + * ext/digest/bubblebabble/bubblebabble.c + (rb_digest_base_s_bubblebabble): Ditto for + Digest::Base::bubblebabble(). + +Sat Oct 14 00:55:08 2006 Nobuyoshi Nakada + + * bcc32/Makefile.sub (post-install-ext): no longer needed. + + * bcc32/configure.bat: get rid of a quirk of Borland make, which + sets empty macro in command line to "1". + +Fri Oct 13 22:49:02 2006 Tadayoshi Funaba + + * lib/date.rb: updated based on date2 3.9.5. + +Fri Oct 13 21:00:01 2006 Akinori MUSHA + + * ext/digest/lib/digest.rb (Digest): Try to auto-load non-standard + digest modules when a specified digest class is missing. + + * ext/digest/lib/digest.rb: Define Digest(name) for ease of + dynamically selecting a hashing algorithm. + +Fri Oct 13 20:53:37 2006 Akinori MUSHA + + * ext/digest/digest.c (Init_digest): Digest::Base.new() does no + longer take an initial string to feed. This change allows + subclasses to take hashing parameters. A statement such as + ``md = Digest::MD5.new(s)'' can be easily rewritten as + ``md = Digest::MD5.new << s'' or + ``md = Digest::MD5.new.update(s)''. + +Fri Oct 13 20:51:55 2006 Akinori MUSHA + + * ext/digest/digest.c, ext/digest/md5/md5init.c, + ext/digest/rmd160/rmd160init.c, ext/digest/sha1/sha1init.c, + ext/digest/sha2/sha2init.c: Add RDoc documentation. + + * ext/digest/digest.txt, ext/digest/digest.txt.ja: Removed in + favor of embedded RDoc documentation. + +Fri Oct 13 20:38:12 2006 Akinori MUSHA + + * ext/digest/bubblebabble, ext/digest/digest.c: Rip BubbleBabble + support out of the base class and have a separate module named + digest/bubblebabble. + +Fri Oct 13 19:53:59 2006 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_equal): Again, should call + digest() of a subclass instead of the one defined in the base + class. + +Fri Oct 13 18:19:31 2006 Yukihiro Matsumoto + + * object.c: Class#inherited RDoc added. a patch from Daniel + Berger [ruby-core:08942] + +Fri Oct 13 02:42:00 2006 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_equal): Should call digest() + of a subclass instead of the one defined in the base class. + +Fri Oct 13 02:30:12 2006 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (Collector::Dir#collect): prepend + base directory to load path. + + * lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): should + use the given File-like interface, but not File directly. + + * test/testunit/collector/test_dir.rb (TestDir::FileSystem): implement + File-like methods correctly. + +Fri Oct 13 01:48:42 2006 Yukihiro Matsumoto + + * lib/date.rb (Date::self.complete_hash): need to check if g is + nil before dereference. [ruby-core:09116] + +Fri Oct 13 01:05:58 2006 Yukihiro Matsumoto + + * string.c (rb_str_partition): RDoc update. a patch from + Mauricio Fernandez . [ruby-core:09160] + + * hash.c (rb_hash_compare_by_id): ditto. + +Fri Oct 13 00:34:26 2006 Yukihiro Matsumoto + + * object.c (rb_mod_cvar_defined): wrong id check. a patch from + Mauricio Fernandez . [ruby-core:09158] + + * object.c (rb_mod_cvar_get): typo fixed. [ruby-core:09168] + + * object.c (rb_mod_cvar_set): ditto. + +Thu Oct 12 22:58:11 2006 Yukihiro Matsumoto + + * hash.c (rb_hash_compare_by_id): somehow we lost renaming from + Hash#identical. [ruby-core:09163] + +Thu Oct 12 18:25:40 2006 Yukihiro Matsumoto + + * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): need to handle new + character literal (1 char string). + + * lib/mkmf.rb: shut up some warnings from tk's extconf.rb. + +Thu Oct 12 02:15:24 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb: Make use of String#bytes. + +Thu Oct 12 02:12:31 2006 Akinori MUSHA + + * ext/digest/digest.c (get_digest_base_metadata): Use an instance + variable of a class object instead of a class variable for + metadata. This change is only crucial for ruby 1.8 because + class variables are inherited to subclasses prior to 1.9, but + applying it also to 1.9 will assure compatibilities. + + * ext/digest/md5/md5init.c (Init_md5): Ditto. + + * ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto. + + * ext/digest/sha1/sha1init.c (Init_sha1): Ditto. + + * ext/digest/sha2/sha2init.c (Init_sha2): Ditto. + +Wed Oct 11 21:36:47 2006 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_alloc, + rb_digest_base_equal): Simplify the equality check and just + compare resulted digests since state-level equality should + not be so significant. + + * ext/digest/digest.h: Ditto. + + * ext/digest/*/*.[ch]: Ditto. + +Wed Oct 11 17:11:03 2006 Yukihiro Matsumoto + + * eval.c (rb_obj_define_method): add half boiled RDoc document. + +Wed Oct 11 16:57:46 2006 Yukihiro Matsumoto + + * array.c (rb_ary_replace): should shift lfree pointer before + calling xfree. + +Wed Oct 11 15:07:42 2006 Akinori MUSHA + + * ext/digest/lib/digest/hmac.rb: Add digest/hmac, which implements + HMAC keyed-hashing algorithm. + +Wed Oct 11 15:03:55 2006 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_reset): Do not make + recursive calls, but call initialize() when reset() is not + defined in a subclass. + +Wed Oct 11 14:56:10 2006 Yukihiro Matsumoto + + * ext/digest/sha1/sha1ossl.h: libssl 0.9.8c-3 defines no + SHA_BLOCK_LENGTH. + +Wed Oct 11 14:03:31 2006 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_reset, Init_digest): Add + Digest::Base#reset. + + * ext/digest/digest.h: Update the header comment. + + * ext/digest/md5/md5ossl.h, ext/digest/md5/md5init.c (Init_md5): + Define DIGEST_LENGTH and BLOCK_LENGTH. + + * ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto. + + * ext/digest/sha1/sha1init.c (Init_sha1): Ditto. + + * ext/digest/sha2/sha2init.c (Init_sha2): Ditto. + + * ext/digest/depend, ext/digest/extconf.rb: Use $INSTALLFILES + rather than adding make targets. [Pointed out by: nobu] + +Tue Oct 10 16:39:08 2006 Akinori MUSHA + + * ext/digest/digest.c (hexdigest_str_new, bubblebabble_str_new): + Perform StringValue() checks properly. + +Tue Oct 10 13:21:21 2006 Akinori MUSHA + + * ext/digest/sha1/depend, ext/digest/sha2/depend: Remove obsolete + dependencies. + +Mon Oct 9 23:46:29 2006 Yukihiro Matsumoto + + * lib/parsedate.rb: documentation patch from Konrad Meyer + . [ruby-doc:1238] + + * lib/open3.rb, lib/ping.rb: ditto. + +Mon Oct 9 23:40:58 2006 Nobuyoshi Nakada + + * ext/extmk.rb, lib/fileutils.rb, lib/mkmf.rb, lib/optparse.rb, + lib/shellwords.rb: get rid of shadowing outer local variable. + +Mon Oct 9 22:56:12 2006 Yukihiro Matsumoto + + * lib/rexml/encoding.rb (REXML::Encoding::check_encoding): spaces + are allowed around equal sign. [ruby-core:09032] + + * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser): ditto. + +Mon Oct 9 01:56:34 2006 Yukihiro Matsumoto + + * eval.c (rb_obj_define_method): add new method + Kernel#define_singleton_method. [ruby-list:42851] + +Sat Oct 7 23:53:08 2006 Yukihiro Matsumoto + + * string.c (rb_str_scan): small documentation fix. + [ruby-core:09007] + +Sat Oct 7 23:44:33 2006 Yukihiro Matsumoto + + * bignum.c (rb_big_rshift): a bug in right shift of negative + bignums. [ruby-core:09020] + +Sat Oct 7 23:33:02 2006 Yukihiro Matsumoto + + * eval.c (formal_assign): packed post splat arguments may conflict + with normal arguments. [ruby-core:09021] + + * eval.c (rb_call0): ditto. + +Sat Oct 7 11:53:04 2006 Nobuyoshi Nakada + + * object.c (rb_mod_initialize): since module_eval no longer passes + self, use module_exec instead. fixed: [ruby-dev:29637] + +Sat Oct 7 00:27:58 2006 Yukihiro Matsumoto + + * class.c (rb_include_module): remove unnecessary check. + [ruby-talk:218402] + +Fri Oct 6 15:19:59 2006 Akinori MUSHA + + * ext/digest/depend: Fix header installation when the build + directory is different from srcdir. [Pointed out by: eban] + +Fri Oct 6 09:56:31 2006 NAKAMURA Usaku + + * {bcc32,win32,wince}/Makefile.sub (config.status): shouldn't use + copy command instead of install. use -run install. + +Fri Oct 6 06:53:46 2006 Yukihiro Matsumoto + + * eval.c (rb_yield_0): small refactoring. + + * parse.y (bparam_item): fixed bugs in handling parenthesized LHS. + +Fri Oct 6 04:47:07 2006 Akinori MUSHA + + * ext/digest/depend: Install digest.h. + +Fri Oct 6 04:27:40 2006 Akinori MUSHA + + * ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Remove those + compatibility stub libraries. + + * sample/openssl/c_rehash.rb: Use digest/md5 instead of obsolete md5. + +Fri Oct 6 04:09:51 2006 Akinori MUSHA + + * ext/digest/digest.c: Make hexdigest() always call digest() internally. + + * ext/digest/digest.c: Add bubblebabble(). + +Fri Oct 6 02:38:42 2006 Akinori MUSHA + + * ext/digest/digest.c: Allow subclassing in Ruby. + +Fri Oct 6 02:06:10 2006 Akinori MUSHA + + * ext/digest/digest.c (hexdigest_str_new): Add a string size check. + +Thu Oct 5 19:28:35 2006 Akinori MUSHA + + * ext/digest/digest.[ch]: Since the argument order of + hash_final_func_t was inconsistent with others, change it and + rename to hash_finish_func_t to avoid confusion. + + * ext/digest/digest.[ch]: Remove and eliminate the use of + hash_end_func_t. Implement hexdigest conversion in the base + class. + + * ext/digest/md5/md5.c, ext/digest/md5/md5.h, + ext/digest/md5/md5init.c, ext/digest/md5/md5ossl.c, + ext/digest/md5/md5ossl.h: Remove MD5_End() and change + MD5_Final() to MD5_Finish(). + + * ext/digest/rmd160/depend, ext/digest/rmd160/extconf.rb, + ext/digest/rmd160/rmd160.c, ext/digest/rmd160/rmd160.h, + ext/digest/rmd160/rmd160hl.c, ext/digest/rmd160/rmd160init.c, + ext/digest/rmd160/rmd160ossl.c, ext/digest/rmd160/rmd160ossl.h: + Remove unused functions RMD160_End(), RMD160_File(), + RMD160_Data() and change RMD160_Final() to RMD160_Finish(). + + * ext/digest/sha1/extconf.rb, ext/digest/sha1/sha1.c, + ext/digest/sha1/sha1.h, ext/digest/sha1/sha1hl.c, + ext/digest/sha1/sha1init.c, ext/digest/sha1/sha1ossl.c, + ext/digest/sha1/sha1ossl.h: Likewise. + + * ext/digest/sha2/extconf.rb, ext/digest/sha2/sha2.c, + ext/digest/sha2/sha2.h, ext/digest/sha2/sha2hl.c, + ext/digest/sha2/sha2init.c: Likewise. + +Wed Oct 4 18:47:25 2006 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/*: bugfix and update + (see ext/tk/ChangeLog.tkextlib). + +Wed Oct 4 17:25:14 2006 Yukihiro Matsumoto + + * eval.c (rb_call): check protected visibility based on real self, + not ruby_frame->self. [ruby-talk:217822] + +Wed Oct 4 15:46:32 2006 Yukihiro Matsumoto + + * parse.y (block_param): should interpret single parenthesized + left hand side expression. + +Wed Oct 4 08:52:30 2006 Nobuyoshi Nakada + + * test/optparse/test_getopts.rb: changed the class name of test case + to get rid of conflict with test_optparse.rb. + +Tue Oct 3 21:04:29 2006 Yukihiro Matsumoto + + * parse.y (dyna_in_block): inline using macro. + + * parse.y (mlhs): simplifies the rule a bit. + + * parse.y (block_param): restrict block parameters to be local + variables only. + + * test/ruby/test_iterator.rb (TestIterator::test_nested_iterator): + update test suite to conform the last change. + +Tue Oct 3 02:31:13 2006 Yukihiro Matsumoto + + * eval.c (splat_value): use "to_splat" instead of "to_ary" to + prepare splat values as an array. + + * array.c (Init_Array): define to_splat. + + * range.c (range_to_splat): new method. + + * enumerator.c (enumerator_to_splat): ditto. + +Tue Oct 3 01:36:47 2006 Yukihiro Matsumoto + + * string.c (rb_str_lines): returns an Enumerator instead of an + array of lines. + + * string.c (rb_str_bytes): a new method. + +Mon Oct 2 23:47:55 2006 Nobuyoshi Nakada + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::COLLECTORS): + base directory should be lower precedence. fixed: [ruby-dev:29622] + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): typo. + + * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file): + load expanded path. fixed: [ruby-dev:29621] + +Mon Oct 2 15:47:55 2006 NAKAMURA Usaku + + * instruby.rb: batfile should be CRLF'ed. + +Mon Oct 2 01:24:26 2006 Nobuyoshi Nakada + + * common.mk (test-all): separate directory where running test cases + from source tree. + + * lib/test/unit/autorunner.rb (options): added --basedir, --workdir + and --load-path options. + + * lib/test/unit/collector/dir.rb (recursive_collect, collect_file): + base directory support. + +Sun Oct 1 23:56:52 2006 Nobuyoshi Nakada + + * Makefile.in, common.mk, ext/extmk.rb, win{32,ce}/Makefile.in: keep + LIBRUBY_SO unless need to be removed. + +Sun Oct 1 23:12:19 2006 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#make_switch): pass arguments directly. + +Sat Sep 30 15:11:26 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.9.4. + +Fri Sep 29 13:18:24 2006 Akinori MUSHA + + * ext/digest/lib/digest.rb (Digest): Require digest.so and fix the + breakage. Point out by NAKAMURA Usaku in [ruby-dev:29619]. + +Fri Sep 29 12:11:04 2006 WATANABE Hirofumi + + * jcode.rb (succ!): call original succ! if $KCODE == 'n'. + fixed: [ruby-talk:216845] + +Fri Sep 29 11:43:40 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (try_func): revert fallback checking undeclared function. + fixed: [ruby-core:08949] + +Fri Sep 29 09:56:56 2006 Nobuyoshi Nakada + + * ext/extmk.rb: extout is needed for also clean. + fixed: [ruby-core:08944] + + * lib/optparse.rb (OptionParser::Switch#conv_arg): unsplat by + Proc#call if no conversion is given. + +Thu Sep 28 23:59:31 2006 Nobuyoshi Nakada + + * node.h (struct thread): declare win32_exception_list on cygwin and + win32 regardless if it is implemented. Provisional fix for + [ruby-core:08917]. + +Thu Sep 28 20:49:20 2006 NAKAMURA Usaku + + * lib/tmpdir.rb: use return value of getdir.call for length. + +Wed Sep 27 22:08:16 2006 Akinori MUSHA + + * ext/digest/md5/md5init.c (Init_md5): Now that we have digest.rb, + require "digest" rather than "digest.so". + + * ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto. + + * ext/digest/sha1/sha1init.c (Init_sha1): Ditto. + + * ext/digest/sha2/sha2init.c (Init_sha2): Ditto. + +Wed Sep 27 21:21:08 2006 Yukihiro Matsumoto + + * string.c (rb_str_startwith): rename startwith? to start_with?, + endwith? to endwith?, respectively. [ruby-talk:216685] + +Wed Sep 27 13:29:01 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::TagMaker::nOE_element_def): replace to_s by + join. some other methods as well. [ruby-dev:29613] + +Wed Sep 27 01:04:49 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (try_func): check function pointer first and macro next. + + * lib/mkmf.rb (have_type): simplified with typedef and sizeof. + +Wed Sep 27 00:08:12 2006 Yukihiro Matsumoto + + * array.c (rb_ary_shift): shift/unshift performance boost patch, + based on the patch from Eric Mahurin . + [ruby-core:05861] + + * array.c (rb_ary_unshift_m): ditto. + + * array.c (ary_make_shared): ditto. + + * array.c (RESIZE_CAPA): ditto. + + * array.c (rb_ary_free): new function to free memory. code moved + from gc.c. + + * string.c (rb_str_free): ditto. + +Tue Sep 26 23:57:03 2006 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#getopts): use strings as key. + fixed: [ruby-dev:29614] + +Tue Sep 26 15:29:55 2006 NAKAMURA Usaku + + * {win32,wince}/Makefile.sub (CPP): check predefined value. + +Tue Sep 26 07:55:16 2006 Yukihiro Matsumoto + + * array.c (rb_ary_shift): should not move memory region if array + body is shared. a patch from Kent Sibilev . + [ruby-core:08922] + +Mon Sep 25 23:10:46 2006 Yukihiro Matsumoto + + * dir.c (rb_push_glob): need not to check by FilePathValue(). + [ruby-dev:29599] + + * dir.c (dir_globs): ditto. + +Mon Sep 25 22:26:26 2006 Nobuyoshi Nakada + + * file.c (rb_path_end): skip root directory. fixed: [ruby-core:08913] + + * lib/mkmf.rb (rm_f): get rid of NUL. + + * lib/mkmf.rb (init_mkmf): set default $LDFLAGS. Patch by Michal + Suchanek . [ruby-talk:216256] + +Mon Sep 25 15:06:18 2006 Yukihiro Matsumoto + + * sample/test.rb: "print nil" now prints empty string. + + * test/ruby/test_system.rb (TestSystem::test_system): ditto. + +Mon Sep 25 11:26:25 2006 Yukihiro Matsumoto + + * hash.c (recursive_hash): remove unused local variable. + + * parse.y (parser_yylex): ditto. + + * parse.y (rb_gc_mark_symbols): fix unmatched prototype . + + * file.c (rb_get_path): check NUL byte in the path string. + +Mon Sep 25 08:14:43 2006 Yukihiro Matsumoto + + * array.c (rb_ary_shift): should clear shifting top element. + [ruby-talk:216055] + + * array.c (rb_ary_shift): avoid creating shared object if array + size is small. + +Mon Sep 25 08:11:35 2006 Yukihiro Matsumoto + + * random.c (rb_f_rand): RDoc typo fix. a patch from Frederick + Cheung . [ruby-talk:216047] + +Sun Sep 24 21:19:24 2006 Guy Decoux + + * gc.c (gc_mark_children): NODE_POSTEXE holds Ruby VALUE. + [ruby-core:08912] + +Sun Sep 24 22:28:20 2006 Nobuyoshi Nakada + + * runruby.rb: extension library scripts moved into common directory. + +Sun Sep 24 12:10:04 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.9.3. + +Sun Sep 24 06:55:36 2006 Nobuyoshi Nakada + + * io.c (rb_io_print): no special handling for nil as well as puts. + fixed: [ruby-dev:29586] + +Sun Sep 24 06:25:53 2006 why the lucky stiff + + * eval.c (rb_thread_save_context, rb_thread_restore_context): + sandbox hook to save and restore sandbox state. + + * eval.c (thread_no_ensure): added THREAD_NO_ENSURE thread flag. + + * eval.c (rb_thread_kill_bang): Thread#kill! uses the above flag + to circumvent ensure, in order to prevent endless loops. + contributed by MenTaLguY. [ruby-core:08768] + + * eval.c (rb_thread_kill): fix Thread#kill docs, which returns + the thread object in all cases. + + * node.h: expose the rb_jmpbuf_t and rb_thread_t structs, along + with the thread flags. used by the sandbox extension. + + * ruby.h: extern rb_eThreadError, so sandbox can swap it. + +Sat Sep 23 21:34:15 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): CGI content + may be empty. a patch from Jamis Buck . + +Sat Sep 23 20:54:28 2006 K.Kosako + + * oniguruma.h: Version 4.4.4 + + * regexec.c: ditto. + + * regcomp.c ditto. + +Sat Sep 23 08:35:53 2006 Yukihiro Matsumoto + + * lib/rdoc/ri/ri_options.rb: prevent NameError. [ruby-dev:29597] + +Sat Sep 23 01:02:57 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.9.2. + +Fri Sep 22 18:07:17 2006 Yukihiro Matsumoto + + * string.c (rb_str_partition): no need to call rb_call_super(), + since String is no longer includes Enumerable. + +Fri Sep 22 17:33:29 2006 Yukihiro Matsumoto + + * hash.c (rb_hash_eql): new method to be used by Hash. + + * hash.c (rb_hash_hash): ditto. + +Fri Sep 22 06:53:22 2006 Yukihiro Matsumoto + + * bignum.c (rb_big_hash): use rb_memhash(). + + * numeric.c (flo_hash): simplified. klass need not to affect + resulting hash value. + +Fri Sep 22 02:06:26 2006 Nobuyoshi Nakada + + * .cvsignore: ignore timestamp files and installed list file. + +Fri Sep 22 01:36:34 2006 Nobuyoshi Nakada + + * instruby.rb: include FileUtils unconditionally. + +Fri Sep 22 00:36:05 2006 Nobuyoshi Nakada + + * numeric.c (Init_Numeric): fix_odd_p and fix_even_p are for Fixnum. + patch from Ondrej Bilka . [ruby-core:08904] + +Thu Sep 21 22:56:20 2006 Nobuyoshi Nakada + + * common.mk (no-install): not install rdoc actually. + + * common.mk (install-doc, no-install-doc): use instruby.rb. + + * instruby.rb: rdoc installation. + + * ext/extmk.rb: expand ruby executable names. + +Thu Sep 21 20:19:22 2006 Yukihiro Matsumoto + + * string.c (str_new3): embed shorter strings more eagerly. + +Thu Sep 21 17:44:49 2006 Yukihiro Matsumoto + + * string.c (rb_str_startwith): a new method to check if a string + starts with given prefix. + + * string.c (rb_str_endwith): the opposite of String#startwith?. + +Thu Sep 21 16:29:02 2006 WATANABE Hirofumi + + * rubytest.rb: use each_line instead of each. + +Thu Sep 21 15:06:24 2006 Yukihiro Matsumoto + + * numeric.c (int_odd_p): a new method to check even or odd. + [RCR#337] + + * numeric.c (int_even_p): ditto. + +Thu Sep 21 13:55:07 2006 Yukihiro Matsumoto + + * ext/etc/etc.c (etc_getpwuid): uid integer should be wrapped in + uid_t value. [ruby-core:08897] + + * ext/etc/etc.c (etc_getpwuid): uid_t may be bigger than plain + 'int' type. + +Thu Sep 21 10:07:09 2006 Yukihiro Matsumoto + + * string.c (rb_str_partition): RDoc typo fixed. [ruby-core:08898] + + * string.c (rb_str_rpartition): fixed separation seek bug. + +Thu Sep 21 09:38:12 2006 Yukihiro Matsumoto + + * string.c (rb_str_lines): new method to split a string into lines. + + * string.c (Init_String): Strings are no longer Enumerable. use + each_line or lines method explicitly. + + * string.c (Init_String): remove each method. use each_lines. + +Wed Sep 20 23:17:41 2006 Nobuyoshi Nakada + + * common.mk (pre-install-doc): create data directory before install. + + * lib/mkmf.rb (dir_re): fixed typo. + + * lib/mkmf.rb (install_dirs): remove extra slash. + +Wed Sep 20 22:41:45 2006 Nobuyoshi Nakada + + * numeric.c (fix_mul): typo again. patch from Tadashi Saito + . fixed: [ruby-core:08893] + +Wed Sep 20 19:32:06 2006 Yukihiro Matsumoto + + * string.c (rb_str_partition): a new method to separate the string + by a separator. taken from Python 2.5. + + * string.c (rb_str_rpartition): ditto. + +Wed Sep 20 09:49:40 2006 NAKAMURA Usaku + + * {bcc32,win32,wince}/Makefile.sub (INSTALLED_LIST): need to define + this macro to install. + +Wed Sep 20 09:43:10 2006 Shugo Maeda + + * lib/net/imap.rb: allow extra spaces in responses. + Thanks, Tom Soderlund. + +Wed Sep 20 09:25:39 2006 Yukihiro Matsumoto + + * ext/gdbm/gdbm.c: add RDoc documentation. a patch from Peter + Adolphs . + [ruby-doc:1223] + +Tue Sep 19 00:42:15 2006 Nobuyoshi Nakada + + * object.c (rb_obj_ivar_defined, rb_mod_cvar_defined): new methods, + Kernel#instance_variable_defined? and Module#class_variable_defined?. + [ruby-dev:29587] + + * lib/date/format.rb (Date::Bag#method_missing): use new method, + instance_variable_defined? to check if an instance variable is + defined. fixed: [ruby-dev:29554] + -- This didn't fix anything. + +Tue Sep 19 00:07:17 2006 Yukihiro Matsumoto + + * string.c (sym_eql): fail early to gain performance. + + * string.c (sym_hash): cache hash value in aux.shared if possible. + + * gc.c (rb_obj_id): no need to treat symbols specially. + + * lib/fileutils.rb (FileUtils::FileUtils): singleton_methods() no + longer return an array of strings, but of symbols. + + * lib/delegate.rb (DelegateClass): ditto. + +Mon Sep 18 15:29:21 2006 Yukihiro Matsumoto + + * dir.c (dir_s_glob): restore GC protection volatile variable. + [ruby-dev:29588] + + * re.c (rb_reg_regcomp): ditto. + +Mon Sep 18 12:16:48 2006 Nobuyoshi Nakada + + * numeric.c (fix_mul): get rid of shift overflow. + +Mon Sep 18 10:47:49 2006 Yukihiro Matsumoto + + * dir.c (dir_s_glob): remove unused variable. + + * math.c (math_log): ditto. + + * re.c (rb_reg_regcomp): ditto. + + * eval.c (break_jump): ditto. + + * eval.c (rb_thread_yield_0): remove unused function. + +Sun Sep 17 23:44:58 2006 Nobuyoshi Nakada + + * lib/rdoc/rdoc.rb (RDoc::RDoc#document): scan only files modified + after the previous generation. + +Sun Sep 17 17:42:13 2006 Nobuyoshi Nakada + + * common.mk (install-doc): reverted. + + * instruby.rb: stores file name list without destdir prefix. + + * lib/rdoc/generators/ri_generator.rb: do not chdir twice. + +Sun Sep 17 10:42:10 2006 Nobuyoshi Nakada + + * numeric.c (fix_mul): fixed typo. fixed: [ruby-core:08885] + +Sat Sep 16 19:47:16 2006 Yukihiro Matsumoto + + * README.EXT: should mention new macros: RSTRING_PTR, RSTRING_LEN, + RARRAY_PTR, RARRAY_LEN. + + * README.EXT.ja: ditto. + +Sat Sep 16 16:39:23 2006 Nobuyoshi Nakada + + * Makefile.in, common.in, instruby.rb, ext/extmk.rb, lib/mkmf.rb: + use instruby.rb to install extensions instead of ext/extmk.rb. + + * instruby.rb: store installed list into the file. + + * ext/dbm/extconf.rb: allow multiple candidates for dbm-type. + + * ext/io/wait/extconf.rb: suspicious checking_for. + + * ext/pty/pty.c (establishShell): parent pid is not used. + + * ext/pty/pty.c (freeDevice): not used. + + * lib/mkmf.rb (checking_for): improved the messages. + +Sat Sep 16 11:03:49 2006 Yukihiro Matsumoto + + * array.c (ary_shared_first): should create embedded copies + instead of sharing memory region for smaller arrays. + +Sat Sep 16 09:37:39 2006 Yukihiro Matsumoto + + * struct.c (inspect_struct): do not display a class name for + anonymous struct. The member fields are sufficient. + +Fri Sep 15 20:22:15 2006 NARUSE, Yui + + * ext/nkf/nkf-8/nkf.c: imported nkf 2.0.8 rev.110. + * Fix: check_bom cuts \xfe\xff\xXX\xXX of UTF-32LE. + * Add support --ic=UTF-32. + * Fix: can't guess UTF-16 and UTF-32. + * Fix: can't decode beyond BMP of UTF-16LE. + + * ext/nkf/nkf.c (guess): Support UTF-32. + + * ext/nkf/lib/kconv.rb (kconv): Support UTF-32. + + * ext/nkf/lib/kconv.rb (to_utf32): new method. + +Fri Sep 15 05:23:24 2006 NARUSE, Yui + + * ext/nkf/nkf-8/nkf.c: imported nkf 2.0.8 2006-09-15. + Add support for U+10000 - U+10FFFF + Add support UTF-32 + +Fri Sep 15 00:03:07 2006 Tanaka Akira + + * ext/digest/lib/digest.rb (Digest::Base.file): open a file in binary + mode. suggested by Kazuhiro NISHIYAMA. [ruby-dev:29579] + +Thu Sep 14 17:21:07 2006 Yukihiro Matsumoto + + * numeric.c (fix_mul): avoid bignum multiplication as far as + possible. a patch from Ondrej Bilka . + [ruby-core:08825] + +Thu Sep 14 16:34:55 2006 Yukihiro Matsumoto + + * string.c (rb_str_intern): allow zero length symbols. + [ruby-core:08861] + +Thu Sep 14 16:11:15 2006 Yukihiro Matsumoto + + * string.c (rb_str_intern): raise SecurityError only when $SAFE + level is greater than zero. [ruby-core:08862] + + * parse.y (rb_interned_p): new function to check if a string is + already interned. + + * string.c (str_to_id): use rb_str_intern(). + +Thu Sep 14 14:37:45 2006 Tanaka Akira + + * ext/digest/lib/digest.rb (Digest::Base.file): new method. + [ruby-dev:29572] + +Thu Sep 14 08:30:02 2006 Tanaka Akira + + * ext/digest/digest.c (rb_digest_base_inspect): new method. + [ruby-dev:29573] + +Thu Sep 14 01:13:56 2006 NAKAMURA Usaku + + * gc.c (ruby_init_stack): decrease "stack level too deep" in Windows. + [ruby-dev:29569] + +Thu Sep 14 01:02:25 2006 Tanaka Akira + + * ext/digest/lib/digest.rb: new file. + [ruby-dev:28689] + +Wed Sep 13 18:43:05 2006 Yukihiro Matsumoto + + * README.EXT: English adjustment. [ruby-core:08851] and + [ruby-core:08852] + +Wed Sep 13 18:25:18 2006 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-parse-partial): better here-doc support. + a patch from Marshall T. Vandegrift . + [ruby-core:08804] + +Wed Sep 13 16:43:36 2006 Yukihiro Matsumoto + + * string.c (rb_str_intern): prohibit interning tainted string. + +Wed Sep 13 01:14:02 2006 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#getopts): works with pre-registered + options. [ruby-core:08826] + +Tue Sep 12 03:58:39 2006 Yukihiro Matsumoto + + * hash.c (rb_hash_compare_by_identity): rename Hash#identical to + Hash#compare_by_identity. + +Mon Sep 11 16:52:37 2006 Yukihiro Matsumoto + + * hash.c (rb_hash_identical): a new method to make a hash to + compare keys by their identity. + + * hash.c (rb_hash_identical_p): new method to tell if a hash is + identical or not. + + * st.c (st_numcmp, st_numhash): export hash type functions. + +Mon Sep 11 11:42:21 2006 Yukihiro Matsumoto + + * lib/rexml/source.rb (REXML::Source::encoding): should not + convert the body twice. [ruby-core:08828] + + * lib/rexml/encoding.rb (REXML::Encoding::encoding): + Encoding#encoding= to return boolean value to tell if the body + is really converted or not. + + * lib/rexml/encoding.rb (REXML::Encoding::encoding): Specific + conversion library (e.g. rexml/encodings/UTF-16.rb) to have + higher preceding. + + * lib/rexml/encodings/UTF-16.rb (REXML::Encoding::decode_utf16): + UTF-16#decode_utf16 should work strings without BOM. + +Mon Sep 11 07:39:44 2006 Yukihiro Matsumoto + + * string.c (sym_equal): "sym == str" should compare them as + strings. [ruby-dev:29554] + +Sun Sep 10 22:59:43 2006 Nobuyoshi Nakada + + * instruby.rb (parse_args): remove splat. + +Sun Sep 10 20:25:30 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.9.1. + +Sun Sep 10 09:41:29 2006 Nobuyoshi Nakada + + * file.c: ISPRINT() needs ctype.h + +Sun Sep 10 09:19:47 2006 Nobuyoshi Nakada + + * lib/optparse.rb: splat parsed arguments. + +Tue Jan 10 09:18:03 2006 Nobuyoshi Nakada + + * eval.c (rb_require_safe): prevent extension from loading twice. + fixed: [ruby-dev:29523] + +Sat Sep 9 23:55:28 2006 Yukihiro Matsumoto + + * file.c (rb_f_test): test(0) should not have any special + meaning. [ruby-dev:29425] + + * file.c (rb_f_test): properer error message. + +Sat Sep 9 14:08:38 2006 Eric Hodel + + * lib/test/unit/testcase.rb (Test::Unit::TestCase#run): Rescue + Exception in Test::Unit::TestCase#run. [ruby-core:08783] + +Sat Sep 9 04:55:59 2006 Nobuyoshi Nakada + + * lib/pstore.rb: open all in binary mode, and get rid of the quirk of + msvcrt. fixed: [ruby-dev:29518] + +Sat Sep 9 04:47:45 2006 Nobuyoshi Nakada + + * Makefile.in, win32/Makefile.sub (MINIRUBY): append MINIRUBYOPT. + + * mkconfig.rb, ext/extmk.rb, lib/mkmf.rb, win32/mkexports.rb: suppress + warnings with $VERBOSE. + + * win32/resource.rb: only file which has more than one icon is DLL. + +Fri Sep 8 16:53:30 2006 Yukihiro Matsumoto + + * string.c (str_alloc): should allocate a String object, even when + asked to allocate a Symbol object. [ruby-dev:29529] + +Fri Sep 8 16:36:27 2006 NAKAMURA Usaku + + * ext/extmk.rb (extmake): follow Array#to_s. + + * lib/mkmf.rb (create_makefile): ditto. + + * win32/resource.rb: ditto. + +Fri Sep 8 10:00:12 2006 GOTOU Yuuzou + + * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookies): new + method to parse multiple cookies per Set-Cookie header. + Thanks to Aaron Patterson . + [ruby-core:08802] + +Fri Sep 8 08:59:30 2006 Nobuyoshi Nakada + + * win32/Makefile.sub, win32/configure.bat win32/setup.mak: program + name transform. + +Fri Sep 8 08:25:39 2006 Nobuyoshi Nakada + + * lib/optparse.rb: suppress `assigning void value' warning. + +Fri Sep 8 01:16:34 2006 Yukihiro Matsumoto + + * array.c (Init_Array): #to_s to be an alias to #inspect. + [ruby-dev:29520] + + * hash.c (Init_Hash): ditto. + + * lib/mkmf.rb (create_makefile): replace "print array" by + "print *array". + + * mkconfig.rb: ditto. + +Thu Sep 7 21:02:56 2006 Yukihiro Matsumoto + + * object.c (nil_to_s): returns the empty string again. + [ruby-dev:29520] + +Thu Sep 7 23:27:05 2006 Nobuyoshi Nakada + + * file.c (path_check_0, fpath_check): disable path check on cygwin. + [ruby-talk:213074] + +Thu Sep 7 02:03:45 2006 Yukihiro Matsumoto + + * time.c (time_to_s): adopt new date format using digits + e.g. "2006-09-07 02:03:45 +9000". + +Thu Sep 7 01:54:22 2006 Yukihiro Matsumoto + + * string.c (sym_equal): override. check equivalence. + +Wed Sep 6 13:25:04 2006 Yukihiro Matsumoto + + * parse.y (symbols_i): need to initialize early-created symbols. + [ruby-dev:29496] + +Wed Sep 6 12:05:19 2006 NARUSE, Yui + + * ext/nkf/lib/kconv.rb (Kconv::toeuc): remove -m0 [ruby-dev:29505] + +Tue Sep 5 22:06:43 2006 Nobuyoshi Nakada + + * ext/tk/tcltklib.c: use rb_ary_new3() since RARRAY_LEN() is not l-value. + + * ext/tk/tkutil/tkutil.c: use RARRAY_PTR() and RARRAY_LEN() and etc. + fixed: [ruby-dev:29473] + +Tue Sep 5 06:47:22 2006 Nobuyoshi Nakada + + * time.c (time_to_s): variable declaration after an execution + statement. + +Tue Sep 5 05:49:41 2006 Nobuyoshi Nakada + + * file.c (path_check_0): check if sticky bit is set on parent + directories for executable path. fixed: [ruby-dev:29415] + +Tue Sep 5 05:03:46 2006 Yukihiro Matsumoto + + * numeric.c (fix_plus): addition in Fixnum will never overflow + long. a patch from Ondrej Bilka . + [ruby-core:08794] + + * numeric.c (fix_minus): ditto. + + * bignum.c (rb_big_pow): eagerly truncate resulting bignum. + [ruby-core:08794] + +Mon Sep 4 23:15:34 2006 Yukihiro Matsumoto + + * time.c (time_to_s): make it conform to RFC2822 date format. + [ruby-dev:29467] + +Mon Sep 4 21:43:57 2006 Nobuyoshi Nakada + + * ext/dbm/extconf.rb: create makefile according to the result of check + for dbm header. fixed: [ruby-dev:29445] + +Mon Sep 4 21:39:42 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.9. + +Mon Sep 4 21:14:20 2006 Nobuyoshi Nakada + + * time.c (time_strftime): include nul character. fixed: [ruby-dev:29422] + +Mon Sep 4 16:39:11 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::out): specify -x option for nkf. + + * lib/cgi.rb (CGI::out): should not convert utf-8 implicitly using + NKF. it is too Japanese centric. + +Mon Sep 4 14:23:10 2006 Yukihiro Matsumoto + + * ext/dbm/extconf.rb (db_check): remove debug print. + +Mon Sep 4 06:46:08 2006 Yukihiro Matsumoto + + * parse.y (rb_id2sym): intern if id is attrset_id. + [ruby-dev:29420] [ruby-dev:29447] + +Mon Sep 4 01:25:16 2006 Yukihiro Matsumoto + + * eval.c (rb_f_local_variables): list symbols. + + * struct.c (rb_struct_s_members_m): ditto. + + * variable.c (ivar_i): ditto. + + * variable.c (gvar_i): ditto. + + * variable.c (cv_i): ditto. + +Sun Sep 3 20:47:02 2006 Nobuyoshi Nakada + + * ruby.h (SYMBOL_P): Qnil and Qfalse are not Symbol. + +Sun Sep 3 15:32:44 2006 Nobuyoshi Nakada + + * lib/mkmf.rb: get rid of nil.to_s. + +Sun Sep 3 06:24:38 2006 Tanaka Akira + + * ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t. + +Sun Sep 3 04:40:42 2006 Tanaka Akira + + * ext/socket/extconf.rb: check arpa/inet.h for ntohs. + + * ext/socket/socket.c: include arpa/inet.h if available. + +Sat Sep 2 23:59:58 2006 Yukihiro Matsumoto + + * string.c (Init_String): undef Symbol#new. + + * struct.c (rb_struct_s_def): wrong symbol detection. + +Sat Sep 2 23:59:37 2006 Yukihiro Matsumoto + + * string.c (str_to_id): a bug caused by premature optimization. + +Sat Sep 2 23:53:28 2006 Yukihiro Matsumoto + + * object.c (Init_Object): move symbol related code to string.c + + * string.c (Init_String): Symbol as subclass of String. + + * parse.y (rb_intern2): handle symbol as strings. + + * string.c (str_new): substring of symbols are mere strings, not + symbols. + +Sat Sep 2 23:37:29 2006 Yukihiro Matsumoto + + * ruby.h (struct RArray): embed small arrays. + (RARRAY_LEN): defined for accessing array members. + (RARRAY_PTR): ditto. + + * array.c: use RARRAY_LEN and RARRAY_PTR. + +Sat Sep 2 13:23:01 2006 Tanaka Akira + + * common.mk (ia64.o): use the compiler driver to assemble ia64.s + to use appropriate ABI. + +Sat Sep 2 12:06:35 2006 NAKAMURA, Hiroshi + + * lib/soap/generator.rb (SOAP::SOAPGenerator#encode_tag): do not dump + XML attribute which value is nil. value "" and nil both were dumped + as 'attr="value"'. [ruby-dev:29395] + +Sat Sep 2 11:47:58 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): should handle when in else clause. a patch + from Eric Hodel . [ruby-core:08662] + + * parse.y (primary): wrap with NODE_CASE. [ruby-core:08663] + +Sat Sep 2 12:00:32 2006 NAKAMURA, Hiroshi + + * lib/csv.rb (CSV::IOReader#initialize): use String#[](pos, len) + instead of String#[](idx) to check utf BOM. follows String#[](idx) + behavior change of 1.9. + +Sat Sep 2 11:47:58 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): should handle when in else clause. a patch + from Eric Hodel . [ruby-core:08662] + + * parse.y (primary): wrap with NODE_CASE. [ruby-core:08663] + +Fri Sep 1 22:07:04 2006 Yukihiro Matsumoto + + * ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit + environment. [ruby-dev:29369] + +Fri Sep 1 22:02:08 2006 Yukihiro Matsumoto + + * string.c (rb_str_resize): should copy embedded string to + malloc'ed buffer. a patch from in + [ruby-dev:29369]. fixed: [ruby-dev:29368] + + * string.c (rb_str_ord): use %ld specifier since STRING_LEN() is a + long. [ruby-dev:29369] + +Fri Sep 1 21:41:12 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (socks_init): typo fixed. a patch from Sven + Klemm . [ruby-core:08770] + +Fri Sep 1 14:22:42 2006 WATANABE Hirofumi + + * array.c (rb_ary_shuffle): RDoc fixed. + +Fri Sep 1 13:52:57 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/font.rb: TkFont#current_configinfo() doesn't work + on Tcl/Tk8.x. + +Fri Sep 1 09:32:55 2006 Yukihiro Matsumoto + + * lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into + reading buffer (@readed). reported in + . + +Thu Aug 31 23:59:03 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (configuration): follow nil.to_s. + +Thu Aug 31 20:50:46 2006 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): follow nil.to_s. + + * win32/resource.rb: ditto. + +Thu Aug 31 20:21:47 2006 NAKAMURA Usaku + + * eval.c (search_required): use RSTRING_PTR and RSTRING_STR. + + * file.c (test_identical, rb_file_s_truncate): ditto. + + * io.c (pipe_open, rb_io_reopen): ditto. + + * object.c (nil_plus): ditto. + + * process.c (proc_spawn_n, rb_spawn): ditto. + + * util.c (ruby_add_suffix): ditto. + + * ext/Win32API/Win32API.c (Win32API_initialize): ditto. + + * ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto. + + * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto. + + * ext/tk/stubs.c, ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: ditto. + + * ext/win32ole/win32ole.c (ole_val2olevariantdata): ditto. + +Thu Aug 31 18:23:00 2006 Yukihiro Matsumoto + + * ruby.h (struct RString): embed small strings. + (RSTRING_LEN): defined for accessing string members. + (RSTRING_PTR): ditto. + + * string.c: use RSTRING_LEN and RSTRING_PTR. + +Thu Aug 31 17:16:19 2006 Yukihiro Matsumoto + + * array.c (rb_ary_shuffle_bang): new method. + + * array.c (rb_ary_shuffle): ditto. + + * random.c (genrand_real): ditto. + + * random.c (genrand_int32): export the function. + + * random.c (Init_Random): initialize random seed at the + beginning. + +Thu Aug 31 13:12:06 2006 why the lucky stiff + + * eval.c (ruby_init): rename top_cref to ruby_top_cref and export, + along with ruby_cref, for use by the sandbox. [ruby-core:08762] + + * node.h: ditto. + +Wed Aug 30 12:01:57 2006 Nobuyoshi Nakada + + * numeric.c (flo_hash): improve collision. + + * string.c (rb_memhash): new generic function to calculate hash value + for memory chunk. + +Tue Aug 29 19:10:10 2006 Nobuyoshi Nakada + + * hash.c (rb_hash_s_create): fixed memory leak, based on the patch + by Kent Sibilev . fixed: [ruby-talk:211233] + +Mon Aug 28 11:29:46 2006 Eric Hodel + + * eval.c, parse.y: Revert. + * ext/.document: Add digest.c. + * ext/digest/digest.c: Make RDoc show up. + * ext/io/wait.c: Fix call-seq in RDoc. + +Mon Aug 28 08:03:20 2006 Eric Hodel + + * ext/.document: Add C files with RDoc. + * ext/digest/digest.c: Convert to RDoc. + * ext/io/wait.c: ditto. + * lib/rdoc/parsers/parse_rb.rb: Fix typo. Submitted by + . [ruby-core:08724] + +Mon Aug 28 07:21:47 2006 Eric Hodel + + * file.c (File#size?): Fix documentation submitted by Rick Ohnemus. + ruby-Bugs-5529. [ruby-core:08725] + +Sun Aug 27 21:41:23 2006 K.Kosako + + * oniguruma.h: Version 4.4.0 + + * regint.h: ditto. + + * regparse.h: ditto. + + * regexec.c: ditto. + + * regcomp.c ditto. + + * regparse.c: ditto. + +Sat Aug 26 08:03:03 2006 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: updated based on date2 3.8.2. + +Fri Aug 25 21:15:22 2006 K.Kosako + + * common.mk: add regint.h and oniguruma.h to dependence. + + * ext/strscan/depend: ditto. + +Fri Aug 25 20:35:57 2006 NAKAMURA Usaku + + * test/wsdl/document/echo.rb: removed. + + * test/wsdl/document/test_rpc.rb: remove echo.rb after test. + [ruby-dev:29337] + +Fri Aug 25 17:02:06 2006 Yukihiro Matsumoto + + * gc.c (gc_sweep): typo fixed. + +Fri Aug 25 16:05:50 2006 Nobuyoshi Nakada + + * object.c (sym_call): check if the receiver is given. + +Fri Aug 25 01:10:11 2006 Yukihiro Matsumoto + + * object.c (rb_Integer): Integer(nil) should raise TypeError. + [ruby-talk:210205] + + * object.c (nil_to_s): no longer returns empty string but "nil". + [ruby-talk:210205] + + * lib/mkmf.rb: avoid COMMON_HEADERS being nil. + +Wed Aug 23 00:25:14 2006 Nobuyoshi Nakada + + * lib/rexml/source.rb (REXML::IOSource#initialize): encoding have to + be set with the accessor. fixed: [ruby-list:42737] + +Tue Aug 22 19:21:00 2006 Minero Aoki + + * lib/net/smtp.rb: parameter `to_addrs' might be an Array, + .flatten is required. [ruby-dev:29316] + +Tue Aug 22 18:47:51 2006 Yukihiro Matsumoto + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_method): + rdoc documents C module methods as instance methods. a patch in + [ruby-core:08536]. + +Tue Aug 22 12:35:57 2006 NARUSE, Yui + + * ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): fix regexp for + euc-jp [ruby-dev:29344] + +Sun Aug 20 11:46:52 2006 Nobuyoshi Nakada + + * numeric.c (num_step): also return an enumerator object if no block + is given. + +Sat Aug 19 16:47:51 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (hash2named_arg): accept hash argument + of symbol key. + + * test/win32ole/test_win32ole.rb + ditto. + +Sat Aug 19 11:28:08 2006 Nobuyoshi Nakada + + * file.c (rb_file_s_rename): use errno if set properly. + fixed: [ruby-dev:29293] + +Fri Aug 18 01:05:57 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::out): specify -m0 to disable MIME decode. a + patch from Fujioka . [ruby-dev:29284] + +Thu Aug 17 19:15:16 2006 Nobuyoshi Nakada + + * file.c (rb_stat_[rRwWxX]): check for super user. + fixed: [ruby-core:08616] + +Thu Aug 17 14:47:06 2006 Nobuyoshi Nakada + + * lib/mkmf.rb: added rdoc by Daniel Berger. [ruby-core:08177] + +Wed Aug 16 17:46:59 2006 Nobuyoshi Nakada + + * marshal.c (r_byte): IO#getc returns one byte string now. + fixed: [ruby-dev:29255] + +Wed Aug 16 17:22:44 2006 NAKAMURA Usaku + + * common.mk (pre-install-local): remove unnecessary code. + [ruby-dev:29249] + +Wed Aug 16 11:45:36 2006 Nobuyoshi Nakada + + * process.c (proc_setuid, proc_setgid, proc_seteuid, proc_setegid): + get rid of bogus implementations on Mac OS X. + +Wed Aug 16 11:09:26 2006 Nobuyoshi Nakada + + * ruby.c (set_arg0): fill argv other than the first with an empty + string instead of NULL. + +Tue Aug 15 11:21:08 2006 Minero Aoki + + * lib/net/smtp.rb: support SMTP/SSL. Thanks Kazuhiro NISHIYAMA. + + * lib/net/smtp.rb: new method SMTP.use_ssl? + + * lib/net/smtp.rb: new method SMTP.enable_ssl. + + * lib/net/smtp.rb: new method SMTP.disable_ssl. + + * lib/net/smtp.rb: new method SMTP.default_ssl_port. + + * lib/net/smtp.rb: new method SMTP.default_tls_port. + + * lib/net/smtp.rb: now SMTP#enable_tls accepts a SSLContext + object, instead of a verity and cert. [FEATURE CHANGE] + + * lib/net/smtp.rb: new method SMTP.ssl_context. + + * lib/net/smtp.rb: new method SMTP.default_ssl_context. + + * lib/net/smtp.rb: export SMTP.authenticate. + + * lib/net/smtp.rb: export SMTP.auth_plain. + + * lib/net/smtp.rb: export SMTP.auth_login. + + * lib/net/smtp.rb: export SMTP.auth_cram_md5. + + * lib/net/smtp.rb: export SMTP.starttls. + + * lib/net/smtp.rb: export SMTP.helo. + + * lib/net/smtp.rb: export SMTP.ehlo. + + * lib/net/smtp.rb: export SMTP.mailfrom. + + * lib/net/smtp.rb: export SMTP.rcptto. + + * lib/net/smtp.rb: export SMTP.rcptto_list. + + * lib/net/smtp.rb: export SMTP.data. + + * lib/net/smtp.rb: export SMTP.quit. + +Sat Aug 12 22:33:06 2006 Eric Hodel + + * string.c (String#split): Describe grouping behavior. Patch by Jan + Svitok . [ruby-core:08603] + +Sun Aug 13 12:08:02 2006 Tanaka Akira + + * ext/socket/socket.c: ANSIfied. [ruby-core:08601] + +Sat Aug 12 15:55:32 2006 Nobuyoshi Nakada + + * configure.in, bcc32/Makefile.sub, win32/Makefile.sub, win32/dir.h, + win32/win32.c, win32/win32.h: large file support for win32. + +Fri Aug 11 15:39:25 2006 Eric Hodel + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_body): Make RDoc + ignore C function prototypes. Patch by Tilman Sauerbeck + . [ruby-core:8574] + * lib/yaml/tag.rb: Replace nodoc with stopdoc so Module methods get + documented. + +Wed Aug 9 16:53:28 2006 Yukihiro Matsumoto + + * lib/net/smtp.rb (Net::SMTP::auth_cram_md5): use ord to retrieve + bytes from strings. a patch from WATANABE Tetsuya + . [ruby-dev:29240] + +Tue Aug 8 23:49:06 2006 Yukihiro Matsumoto + + * lib/irb/extend-command.rb (IRB::ExtendCommandBundle): pacify + RDoc. a patch from Eric Hodel . + [ruby-core:08522] + +Tue Aug 8 19:26:10 2006 Yukihiro Matsumoto + + * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_string): + affected by str[0] returns 1 char string. [ruby-dev:29223] + + * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder::get_labels): + ditto. + +Tue Aug 8 12:28:43 2006 Nobuyoshi Nakada + + * parse.y (arg): allow newlines before ternary colon. [ruby-dev:29189] + +Mon Aug 7 17:56:59 2006 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c, ext/digest/rmd160/rmd160ossl.c, + ext/digest/sha1/sha1ossl.c, ext/readline/readline.c: move + inclusion of config.h to pacify AIX. a patch from Yutaka + Kanemoto . [ruby-dev:29197] + +Mon Aug 7 15:55:08 2006 Yukihiro Matsumoto + + * ext/syck/syck.c (syck_move_tokens): should avoid negative + memmove. [ruby-list:42625] + +Mon Aug 7 14:37:48 2006 Yukihiro Matsumoto + + * configure.in, common.mk: AIX link issue. a patch from Yutaka + Kanemoto . [ruby-dev:29190] + + * ext/socket/socket.c: AIX socket support. [ruby-dev:29190] + +Mon Aug 7 12:05:28 2006 Yukihiro Matsumoto + + * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning. + a patch from Yutaka Kanemoto . + [ruby-dev:29191] + +Sun Aug 6 20:34:24 2006 Tadayoshi Funaba + + * lib/date/format.rb (str[fp]time): %[EO]U didn't denote %U. + +Sun Aug 6 17:12:12 2006 Tanaka Akira + + * io.c (io_reopen): STDERR.reopen(open("/dev/tty", "w")) should not + clear FMODE_PREP in STDERR. + +Sat Aug 5 22:53:41 2006 K.Kosako + + * oniguruma.h: Version 4.2.2 + + * regint.h: ditto. + + * regparse.h: ditto. + + * regexec.c: ditto. + + * regcomp.c ditto. + + * regerror.c: ditto. + + * regparse.c: ditto. + +Sat Aug 5 17:07:43 2006 Yukihiro Matsumoto + + * parse.y (top_local_setup): local_vars[-1] should point + ruby_scope itself to protect local_tbl from garbage collection. + [ruby-dev:29049] + +Sat Aug 5 13:49:43 2006 Tadayoshi Funaba + + * lib/date/format.rb (str[fp]time): "%\n" means "\n". + +Fri Aug 4 12:13:22 2006 Eric Hodel + + * lib: Clean up files for RDoc. + * lib/.document: Include most of the standard library in RDoc + generation. + * lib/rdoc/ri/ri_formatter.rb: Don't unescape HTML in HtmlFormatter. + Submitted by . [ruby-core:08392]. + * lib/drb/ssl.rb: Close socket on SSLError [ruby-core:7197] + +Fri Aug 4 18:59:49 2006 Keiju Ishitsuka + + * lib/irb/{init.rb,ruby-lex.rb,slex.rb}: can't input '\c' for + [ruby-core: 7122]. and support for ruby1.8.X + +Fri Aug 4 14:02:14 2006 James Edward Gray II + + * lib/date/format.rb (__strptime, strftime): allow multi-line patterns + in Date#strftime the same as Time#strftime accepts. + fixed: [ruby-core:08466] + +Fri Aug 4 13:56:51 2006 Nobuyoshi Nakada + + * pack.c (pack_pack): check argument overrun for 'P'. based on a + patch by rucila . fixed: [ruby-dev:29182] + +Fri Aug 4 02:42:29 2006 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): a bug in %c type check. + +Fri Aug 4 01:28:19 2006 Tanaka Akira + + * io.c (io_reopen): STDERR.reopen(File.open("/dev/null", "w")) should + not fclose stderr. + +Thu Aug 3 15:16:44 2006 Yukihiro Matsumoto + + * range.c (range_include): should always call Enumerable#include? + (not #===) for non numeric end points. [ruby-core:08477] + [ruby-core:08496] + +Mon Jul 31 16:51:40 2006 NAKAMURA Usaku + + * win32/win32.c (exit_handler): new function; release winsock and + environment work area. + + * win32/win32.c (NTInitialize): setup exit_handler. + + * win32/win32.c (StartSockets): use exit_handler. + + * win32/win32.c (rb_w32_getenv): use GetEnvironmentStrings() instead + of GetEnvironmentVariable(), because the latter cannot distinguish + whether a null environment variable exists or not. + fixed: [ruby-talk:205123] + +Mon Jul 31 16:15:13 2006 Tanaka Akira + + * test/ruby/test_process.rb (TestProcess#test_rlimit_nofile): + setrlimit may fail with EINVAL. + reported by MIYAMUKO Katsuyuki. [ruby-dev:29174] + +Mon Jul 31 09:22:12 2006 Yukihiro Matsumoto + + * ruby.h: use ifdef (or defined) for macro constants that may or + may not be defined to shut up gcc's -Wundef warnings. + [ruby-core:08447] + +Mon Jul 31 13:38:13 2006 GOTOU Yuuzou + + * lib/webrick/httprequest.rb (WEBrick::HTTPReuqest#parse_uri): improve + for the value of IPv6 address in the Host: header field. + +Sun Jul 30 23:26:12 2006 Nobuyoshi Nakada + + * eval.c (rb_call0): trace call/return of method defined from block. + fixed: [ruby-core:08329] + + * eval.c (rb_trap_eval): make the current thread runnable to deal with + exceptions which occurred within the trap. fixed: [ruby-dev:27729] + + * lib/cgi/session.rb, lib/cgi/session/pstore.rb: suppress warnings. + fixed: [ruby-talk:204896] + +Sat Jul 29 06:12:06 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: freeze ip_name for security reason. + +Sat Jul 29 01:23:52 2006 Yukihiro Matsumoto + + * lib/logger.rb: improves the amount of documentation that Rdoc + picks up when processing logger.rb by moving the require + statement back before the comment block. a patch from Hugh + Sasse . [ruby-core:08422] + +Fri Jul 28 17:18:03 2006 Nobuyoshi Nakada + + * ext/curses/curses.c (NUM2CH, CH2FIX): use single char strings. + +Fri Jul 28 14:09:14 2006 Yukihiro Matsumoto + + * eval.c (rb_call): fixed typo in cache look-up. [ruby-dev:29167] + +Fri Jul 28 10:41:35 2006 Yukihiro Matsumoto + + * eval.c (rb_call): a bug in method cache look-up. + http://www.rubyist.net/~matz/20060720.html#c04 + +Fri Jul 28 10:19:28 2006 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): documentation update patch from Jacob + Fugal . [ruby-core:08418] + +Fri Jul 28 09:41:45 2006 Yukihiro Matsumoto + + * time.c (time_to_s): fixed typo. [ruby-dev:29162] + +Fri Jul 28 00:26:47 2006 Yukihiro Matsumoto + + * math.c (domain_check): ANSI style function arguments + + * math.c (math_log): too few argument to domain_check(). + +Thu Jul 27 21:19:54 2006 Yukihiro Matsumoto + + * math.c (domain_check): a new function to check domain error + explicitly for systems that return NaN like FreeBSD. + [ruby-core:07019] + + * math.c (math_acos, math_asin, math_acosh, math_atanh, math_log, + math_log10, math_sqrt): use domain_check(). + + * math.c (math_sqrt): fix documentation flaw. + +Thu Jul 27 22:21:52 2006 Nobuyoshi Nakada + + * time.c (time_to_s): fixed format mismatch. + +Thu Jul 27 18:12:12 2006 WATANABE Hirofumi + + * time.c: need to declare time_utc_offset. + +Thu Jul 27 17:01:01 2006 Yukihiro Matsumoto + + * io.c (io_close): always calls "close" method of the receiver. + [ruby-core:6911] [ruby-core:8112] + +Thu Jul 27 16:41:15 2006 Yukihiro Matsumoto + + * ext/openssl/ossl.h: move inclusion point to shut up + Solaris compiler. [ruby-core:08114] + + * time.c (time_to_s): use +0900 style timezone string for local time. + [ruby-dev:29143] + +Wed Jul 26 22:20:59 2006 Yukihiro Matsumoto + + * configure.in: add support for as and ASFLAGS. [ruby-dev:29138] + +Wed Jul 26 21:59:33 2006 Minero Aoki + + * lib/net/http.rb (Net::HTTP#post, request_post, request): should + set Content-Type: x-www-form-urlencoded by default. + + * lib/net/http.rb (Net::HTTPHeader#content_type): should return + nil when there's no Content-Type. + + * lib/net/http.rb (Net::HTTPHeader#sub_type): should return nil + when there's no sub Content-Type (e.g. "Content-Type: text"). + + * lib/net/http.rb (Net::HTTPHeader#type_params): wrongly failed + when there's no Content-Type. + +Wed Jul 26 18:38:13 2006 Minero Aoki + + * ext/strscan/strscan.c (strscan_do_scan): always return nil if + p->curr exceeds string size. + +Wed Jul 26 18:33:31 2006 Yukihiro Matsumoto + + * eval.c (Init_eval): rename #invoke_method and + #invoke_functional_method to __send and __send! respectively. + + * eval.c (remove_method): prohibit removing __send and __send!. + + * eval.c (rb_undef): prohibit undef'ing __send and __send!. + + * eval.c (rb_eval): prohibit redefining __send and __send!. + + * lib/delegate.rb (Delegator): preserve __send. + +Wed Jul 26 18:14:19 2006 Nobuyoshi Nakada + + * ext/pty/pty.c (getDevice): retry once after GC on failure. + [ruby-core:08282] + +Wed Jul 26 17:43:20 2006 Minero Aoki + + * ext/strscan/strscan.c (strscan_do_scan): + StringScanner.new("").scan(//) should return "". [ruby-Bugs:4361] + +Wed Jul 26 17:28:16 2006 Nobuyoshi Nakada + + * sprintf.c (rb_str_format): prepend ".." to %u for negative bignum, + but not "-". fixed: [ruby-core:08167] + +Wed Jul 26 16:39:07 2006 Yukihiro Matsumoto + + * string.c (rb_str_scan): add string modification check. + [ruby-core:7216] + +Wed Jul 26 16:06:03 2006 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): check + multipart boundary end. a patch from Fujioka + [ruby-dev:28470] + +Wed Jul 26 01:02:59 2006 Nobuyoshi Nakada + + * configure.in: suppress warnings by automake 1.8 or later. + +Tue Jul 25 14:46:14 2006 NAKAMURA Usaku + + * lib/mkmf.rb (configuration): typo. + +Tue Jul 25 13:14:32 2006 Yukihiro Matsumoto + + * process.c (rb_proc_times): rename hz to hertz to avoid name + crash on AIX. [ruby-dev:29126] + +Mon Jul 24 22:03:40 2006 Nobuyoshi Nakada + + * eval.c (backtrace): skip frames successive on node and method name. + +Mon Jul 24 15:51:52 2006 Tanaka Akira + + * ext/readline/readline.c (readline_readline): rl_deprep_term_function + may be NULL with libedit. reported by Ryan Davis. [ruby-dev:29070] + +Mon Jul 24 15:19:55 2006 Yukihiro Matsumoto + + * eval.c (rb_call0): revert last change. [ruby-dev:29112] + [ruby-core:08374] + +Sun Jul 23 22:59:49 2006 Tanaka Akira + + * test/socket/test_unix.rb: disabled on cygwin. + reported by Kouhei Yanagita. [ruby-dev:29080] + +Fri Jul 21 23:57:26 2006 Nobuyoshi Nakada + + * ruby.c (proc_options): script is never used while recursing. + +Fri Jul 21 21:21:08 2006 Nobuyoshi Nakada + + * eval.c (rb_call0): include funcalled methods in caller list. + fixed: [ruby-core:08290] + +Fri Jul 21 17:52:24 2006 Yukihiro Matsumoto + + * object.c (rb_cstr_to_dbl): "9_e8" should consider "_e8" as + trailing garbage so that it should return 9.0. [ruby-dev:29088] + +Fri Jul 21 12:11:00 2006 Nobuyoshi Nakada + + * ext/extmk.rb, lib/mkmf.rb (with_destdir): remove drive letter before + prepending destdir on DOSISH. + +Fri Jul 21 04:17:22 2006 Yukihiro Matsumoto + + * eval.c (rb_call): try local method look-up first for fcall, then + normal method look-up. [ruby-talk:202564] + + * eval.c (rb_get_method_body): save local method cache separately. + + * eval.c (search_method): export info whether method is local or + not. + +Thu Jul 20 20:27:07 2006 Yukihiro Matsumoto + + * object.c (rb_mod_attr): make Module#attr to be an alias to + attr_reader. [RCR#331] + +Thu Jul 20 15:07:14 2006 Yukihiro Matsumoto + + * ruby.h: export classes/modules to implement sandbox. + [ruby-core:08283] + +Wed Jul 19 19:40:00 2006 Yukihiro Matsumoto + + * eval.c (rb_yield_0): should check args_args before lambda + argument check. [ruby-dev:29029] + +Tue Jul 18 23:53:59 2006 NAKAMURA Usaku + + * process.c (rb_f_system): shouldn't block SIGCHLD if it's not + exist. + +Tue Jul 18 22:10:13 2006 Yukihiro Matsumoto + + * process.c (rb_f_system): block SIGCHLD during the process + execution, like glibc system(3) does. [ruby-talk:202361] + +Tue Jul 18 23:10:43 2006 NAKAMURA Usaku + + * win32/win32.c (open_ifs_socket): should not use plain malloc. + + * win32/win32.c (rb_w32_opendir): should not use plain realloc. + +Tue Jul 18 18:05:49 2006 Yukihiro Matsumoto + + * test/ruby/test_float.rb (TestFloat::test_strtod): update test to + conform strtod change. + +Tue Jul 18 16:52:29 2006 Yukihiro Matsumoto + + * eval.c (yield_under_i): argument should be passed in avalue + form. [ruby-dev:29044] + +Tue Jul 18 15:49:42 2006 Yukihiro Matsumoto + + * pack.c (pack_unpack): propagate association array to copied + string. [ruby-core:08223] + + * pack.c (pack_unpack): return referenced string itself if it has + same length as specified. a patch from + in [ruby-core:08225]. + + * pack.c (pack_pack): taint 'p' packed strings. + +Tue Jul 18 15:19:07 2006 NAKAMURA Usaku + + * intern.h (st_foreach_safe): fix prototype. + + * node.h (NODE_LMASK): bigger than long on LLP64. + + * missing/vsnprintf.c (BSD__uqtoa): new function to support LLP64. + all changes are derived from [ruby-dev:29045] + +Tue Jul 18 14:03:02 2006 Yukihiro Matsumoto + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer::unmount): remove + inpect argument from sprintf. [ruby-dev:29039] + +Tue Jul 18 10:53:37 2006 Nobuyoshi Nakada + + * object.c (rb_cstr_to_dbl): limit out-of-range message. + + * util.c (ruby_strtod): return end pointer even if ERANGE occurred. + fixed: [ruby-dev:29041] + +Mon Jul 18 00:43:05 2006 Nobuyoshi Nakada + + * util.c (ruby_strtod): stop at dot not followed by digits. + fixed: [ruby-dev:29036] + +Tue Jul 18 00:01:27 2006 Nobuyoshi Nakada + + * ext/extmk.rb: remove LIBRUBY_SO if static linked extensions exist. + +Mon Jul 17 23:30:46 2006 Nobuyoshi Nakada + + * configure.in (rb_cv_msvcrt): defaulted to msvcrt. Workaround for a + bug of cygwin 1.5.20. + +Mon Jul 17 22:55:31 2006 Yukihiro Matsumoto + + * ext/io/wait/wait.c (io_ready_p): protoize. + +Mon Jul 17 13:43:05 2006 Yukihiro Matsumoto + + * pack.c (define_swapx): should not use plain malloc. + + * ext/curses/curses.c (curses_getmouse): ditto. + +Mon Jul 17 12:58:41 2006 WATANABE Hirofumi + + * configure.in: should use ac_cv_lib_dl_dlopen=no on MinGW. + +Mon Jul 17 11:47:35 2006 NAKAMURA Usaku + + * st.c: still need to include config.h on some platforms. + +Sat Jul 15 01:09:22 2006 Yukihiro Matsumoto + + * st.c (malloc): use xmalloc/xcalloc instead of plain + malloc/calloc, to detect memory allocation failure. see + . + +Fri Jul 14 13:08:13 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add methods for new features of latest Tcl/Tk8.5. + + * ext/tk/lib/tk/namespace.rb: ditto. + +Fri Jul 14 02:30:12 2006 Yukihiro Matsumoto + + * lib/monitor.rb: document patch from Hugh Sasse . + [ruby-core:08205] + +Fri Jul 14 00:10:15 2006 Yukihiro Matsumoto + + * array.c (rb_ary_pop): may cause realloc oscillation. a patch + from MORITA Naoyuki . + [ruby-dev:29028] + +Thu Jul 13 22:23:56 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/composite.rb: improve handling of the classname on the + option database for the widget class which includes TkComposite. + +Thu Jul 13 00:40:57 2006 Yukihiro Matsumoto + + * ruby.h (FIX2LONG): returns integer of size of VALUE. + [ruby-dev:29024] + + * ruby.h (FIX2ULONG): ditto. + +Wed Jul 12 20:05:23 2006 Yukihiro Matsumoto + + * parse.y (f_args): allow post mandatory arguments after optional + arguments. [ruby-dev:29014] + + * parse.y (new_args_gen): allow post_args without rest_args. + + * eval.c (formal_assign): ditto. + + * parse.y (new_args_gen): check post argument duplication. + +Tue Jul 11 20:58:18 2006 Yukihiro Matsumoto + + * ruby.h: export rb_cMethod. [ruby-talk:201259] + +Tue Jul 11 19:13:33 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: remove restriction on the class of + pseudo-toplevel. + +Tue Jul 11 18:00:57 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: security fix. + +Tue Jul 11 17:28:08 2006 NAKAMURA Usaku + + * string.c (rb_str_dump): need to extend len for \b. + +Tue Jul 11 15:29:15 2006 Yukihiro Matsumoto + + * bignum.c (rb_int2big): use SIGNED_VALUE. [ruby-dev:29019] + + * bignum.c (rb_int2inum, rb_uint2inum): use VALUE sized integer. + + * bignum.c (rb_big2long, rb_big2ulong): ditto. + + * numeric.c (rb_num2long, rb_num2ulong): ditto. + + * numeric.c (check_int, check_uint): ditto. + + * bignum.c (rb_quad_pack): typo fixed. + +Tue Jul 11 13:40:52 2006 Yukihiro Matsumoto + + * bignum.c (bignorm): sizeof(long) may be smaller than + sizeof(VALUE). [ruby-dev:29013] + + * ruby.h (FIXNUM_MAX): fixnum may be bigger than long. + + * ruby.h (SIGNED_VALUE): signed integer of size of VALUE. + +Mon Jul 10 23:37:14 2006 Yukihiro Matsumoto + + * lib/soap/rpc/proxy.rb (Proxy::Operation::response_doc): remove + splat star from return statements. + + * lib/soap/rpc/proxy.rb (Proxy::Operation::response_obj): retrieve + the first value from the result array if response has only one + value. + +Mon Jul 10 22:00:00 2006 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c: Allows '_' to appear within + digits. [ruby-dev:28872] + + * ext/bigdecimal/lib/bigdecimal/util.rb: Bug in to_r reported by + [ruby-list:42533] fixed. + +Mon Jul 10 19:22:19 2006 Tanaka Akira + + * gc.c (gc_sweep): expand heap earlier. + reported by MORITA Naoyuki. [ruby-dev:28960] + +Mon Jul 10 18:59:34 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/font.rb: sorry. mistaken to patch. + +Mon Jul 10 18:46:52 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: make SEGV risk lower at exit. + + * ext/tk/lib/tk.rb: ditto. + + * ext/tk/lib/multi-tk.rb: fail to call function-style methods on slave + interpreters. The strategy (MultiTkIp_PseudoToplevel_Evaluable) to + fix the problem is a little tricky. You may have to take care of + conflicting with it. + + * ext/tk/lib/tk.rb: a little change for the pseudo-toplevel strategy. + + * ext/tk/lib/tk/font.rb: ditto. + + * ext/tk/lib/tk/msgcat.rb: ditto. + + * ext/tk/lib/tkextlib/itk/incr_tk.rb: ditto. + + * ext/tk/sample/demos-en/widget: fail to call function-style methods + on sample scripts. To fix it, a strategy which similar to the way + on MultiTiIp is used. Please take care when re-write and re-run a + demo script on the Widget-Demo code viewer. + + * ext/tk/sample/demos-jp/widget: ditto. + +Mon Jul 10 17:32:38 2006 Yukihiro Matsumoto + + * sample/test.rb: update test suites. + + * test/ruby/test_assignment.rb (TestAssignment::test_yield): ditto. + + * test/ruby/test_iterator.rb (TestIterator::test_itertest): ditto. + +Mon Jul 10 14:43:47 2006 Yukihiro Matsumoto + + * eval.c (rb_call): remove erroneously restored prot_tag->blkid + initialization. [ruby-dev:28997] [ruby-dev:29000] + +Mon Jul 10 13:58:08 2006 Hidetoshi NAGAI + + * signal.c (install_nativethread_sighandler): commented out. + +Mon Jul 10 09:29:12 2006 Nobuyoshi Nakada + + * eval.c (rb_clear_cache_for_remove): clear entries for included + module. fixed: [ruby-core:08180] + +Mon Jul 10 02:22:58 2006 Yukihiro Matsumoto + + * eval.c (proc_invoke): should not overwrite block information in + current frame. [ruby-dev:28957] + + * eval.c (rb_yield_0): retrieve proper block object from the frame + record. + + * eval.c (proc_alloc): return preserved block object if it's + available. + +Mon Jul 10 01:48:38 2006 Yukihiro Matsumoto + + * st.h (st_data_t): use pointer sized integer for st_data_t. + [ruby-dev:28988] + +Sun Jul 9 18:06:47 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (try_constant): fix for value 1 at cross compiling. + + * lib/mkmf.rb (create_makefile): prevent substitution of macro + definition. fixed: http://www.yotabanana.com/lab/20060624.html#p02 + +Sun Jul 9 07:58:48 2006 Ryan Davis + + * lib/rdoc/parsers/parse_f95.rb: massive overhaul from Yasuhiro + Morikawa including new file suffixes, function support, public + variables and constants, derived-types, defined operators and + assignments, namelists, and subroutine and function + arguments. Truly massive. + + * lib/rdoc/diagram.rb: diagrams are now cached. + + * lib/irb/completion.rb: fixed a crasher when completing against + an unnamed class/module. + + * lib/rdoc/parsers/parse_c.rb: private comment (--/++) support in + C-file rdoc. + + * lib/debug.rb: minor clarification in help. + + * lib/pp.rb: minor clarification on exception. + +Sun Jul 9 00:54:11 2006 Nobuyoshi Nakada + + * eval.c (next_jump): deal with destination of next. + fixed: [ruby-core:08169] + +Fri Jul 7 17:49:16 2006 Nobuyoshi Nakada + + * string.c (rb_str_ord): extract lower byte. fixed: [ruby-dev:28980] + + * lib/jcode.rb (String#succ!): fix for 1.9. fixed: [ruby-dev:28979] + +Fri Jul 7 14:05:03 2006 NAKAMURA Usaku + + * win32/Makefile.sub (config.h): define FUNC_STDCALL/FUNC_CDECL. + from [ruby-dev:28970]. + +Fri Jul 7 00:38:49 2006 Yukihiro Matsumoto + + * hash.c (rb_hash_default): should not call default procedure if + no key is given. [ruby-list:42541] + +Thu Jul 6 23:30:04 2006 Nobuyoshi Nakada + + * process.c (rb_proc_times): use sysconf(_SC_CLK_TCK) value prior to + HZ and CLK_TCK. fixed: [ruby-talk:200293] + +Thu Jul 6 21:50:06 2006 Minero Aoki + + * ext/racc/cparse/cparse.c: sync with original code, rev 1.8. + + * ext/racc/cparse/cparse.c: should mark CparseParams objects. + + * lib/racc/parser.rb: sync with original code, rev 1.8. + + * lib/racc/parser.rb: update coding style. + +Wed Jul 5 05:28:45 2006 Yukihiro Matsumoto + + * parse.y (block_param): should allow block argument after splat + and post splat args. + +Wed Jul 5 01:12:19 2006 Yukihiro Matsumoto + + * test/ruby/test_lambda.rb (TestLambdaParameters::test_lambda_as_iterator): + -> style block no longer available. [ruby-dev:28958] + +Tue Jul 4 21:48:56 2006 NAKAMURA Usaku + + * ruby.c (proc_options): suppress warning on DOSISH. + +Tue Jul 4 15:12:49 2006 Yukihiro Matsumoto + + * eval.c (rb_call): should not set prot_tag->blkid since it would + never catch breaks at this level. [ruby-dev:28922] + +Tue Jul 4 04:48:36 2006 Yukihiro Matsumoto + + * bignum.c: ruby 1.9 HEAD 64 bit warnings clean up from + . [ruby-core:08120] + +Mon Jul 3 19:04:38 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_make_menu_embeddable): help to make a menu + widget embeddable (pack, grid, and so on) like as a general widget. + However, an embeddable menu may require to be defined some event + bindings for general use. + + * ext/tk/lib/tk/event.rb: [bug fix] Tk.callback_break and + Tk.callback_continue don't work on MultiTkIp. + + * ext/tk/lib/multi-tk.rb: ditto. + + * ext/tk/lib/tk.rb: lack of Tk.callback_return. + + * ext/tk/lib/tk/menu.rb: improve creating clone menus. + +Mon Jul 3 14:42:06 2006 Nobuyoshi Nakada + + * ext/etc/extconf.rb (PW_UID2VAL, PW_GID2VAL): defaulted to conversion + from int, and sys/types.h needs to be included before grp.h. + fixed: [ruby-dev:28938] + +Mon Jul 3 10:44:01 2006 Nobuyoshi Nakada + + * io.c (popen_exec): close file descriptors other than standard I/Os. + fixed: [ruby-dev:28924] + +Mon Jul 3 05:15:29 2006 GOTOU Yuuzou + + * test/openssl/test_asn1.c: String#[]= doesn't accept Integer. + +Mon Jul 3 01:14:15 2006 Yukihiro Matsumoto + + * string.c (rb_str_inspect): encode \b (\010) for escape. + [ruby-dev:28927] + + * string.c (rb_str_dump): ditto. + +Sun Jul 2 19:03:30 2006 Minero Aoki + + * ext/racc/cparse/cparse.c: sync with original code, rev 1.7. + + * ext/racc/cparse/cparse.c: must require version.h to get + RUBY_VERSION_CODE. + +Sun Jul 2 18:42:27 2006 Minero Aoki + + * ext/racc/cparse/cparse.c: sync with original source code, rev + 1.6. + + * ext/racc/cparse/cparse.c: do not use rb_iterate to give a block + to the method, use rb_block_call instead. [ruby-dev:28445] + +Sun Jul 2 11:22:03 2006 Tanaka Akira + + * io.c (io_reopen): STDOUT.reopen(filename, "w+") didn't work. + (rb_io_reopen): STDOUT.reopen(File.open(filename, "w+")) didn't work. + +Sat Jul 1 23:55:42 2006 Yukihiro Matsumoto + + * eval.c (PUSH_FRAME): initialize frame->self. [ruby-dev:28911] + +Sat Jul 1 17:00:42 2006 GOTOU Yuuzou + + * test/webrick/utils.rb: use Proc#yield instead of Proc#call. + [ruby-dev:28914] + +Sat Jul 1 15:15:49 2006 Tanaka Akira + + * test/socket/test_nonblock.rb: add timeout to send/receive + an empty UDP packet. + [ruby-dev:28820] + +Fri Jun 30 23:46:23 2006 Yukihiro Matsumoto + + * configure.in: should test isinf for Solaris with GCC compiler. + a patch from . [ruby-core:07791] + + * configure.in: -shared patch from Andrew Morrow + . [ruby-core:08100] + +Fri Jun 30 19:35:41 2006 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils._escape): should + use String#ord to get ascii code from the one-character string. + [ruby-dev:28901] + +Thu Jun 29 23:56:01 2006 Yukihiro Matsumoto + + * gc.c (gc_mark_children): a bug in NODE_BLOCK_PASS marking. + [ruby-dev:28908] + +Thu Jun 29 23:04:36 2006 Yukihiro Matsumoto + + * parse.y: use ARGSPUSH instead of ARGSCAT to prevent too much + splat expansion. + + * eval.c (when_check): need to handle ARGSPUSH as well. + + * eval.c (block_orphan): lambda and proc from method are always + orphan. + + * gc.c (gc_mark_children): proper marking for NODE_LAMBDA. + +Thu Jun 29 22:47:30 2006 Tanaka Akira + + * eval.c (SETUP_ARGS0): avoid GC problem. + [ruby-dev:28902] + +Thu Jun 29 18:58:51 2006 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c (BigDecimal_version): fix patch + failure. + +Thu Jun 29 18:00:51 2006 Yukihiro Matsumoto + + * ext/bigdecimal/bigdecimal.c: add RDoc document. a patch from + mathew . [ruby-core:07050] + +Wed Jun 28 14:53:09 2006 Eric Hodel + + * lib/optparse.rb: RDoc patch from Robin Stocker + [ruby-core:08087] + +Wed Jun 28 23:23:48 2006 Yukihiro Matsumoto + + * object.c (rb_cstr_to_dbl): underscores should appear only + between digits. [ruby-dev:28891] + +Wed Jun 28 19:04:34 2006 Tanaka Akira + + * test/socket/test_unix.rb: test_seqpacket_pair removed. + [ruby-dev:28846] + +Wed Jun 28 13:51:21 2006 Nobuyoshi Nakada + + * eval.c (when_check): arbitrary values are allowed after splats. + fixed: [ruby-dev:28879] + +Wed Jun 28 09:16:18 2006 Yukihiro Matsumoto + + * parse.y (primary): remove meaningless else-only case statement + syntax. + +Wed Jun 28 08:08:13 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): problem to handle else part. [ruby-dev:28873] + +Wed Jun 28 01:48:23 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): support splat in when expression list. + [ruby-dev:28822] + + * eval.c (when_check): a new auxiliary function for case match. + + * eval.c (when_cond): ditto. + +Wed Jun 28 01:05:37 2006 Yukihiro Matsumoto + + * object.c (rb_cstr_to_dbl): should not skip '_' at the beginning + of a string. [ruby-dev:28830] + + * bignum.c (rb_cstr_to_inum): ditto. + +Tue Jun 27 23:03:49 2006 Yukihiro Matsumoto + + * string.c: RDoc update for =~ method. a patch from Alex Young + . [ruby-core:08068] + +Tue Jun 27 22:47:18 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: forgot to update TCLTKLIB_RELEASE_DATE. + + * ext/tk/lib/tk.rb (tk_tcl2ruby): [bug fix] sometimes fail to convert + a tcl string to a ruby object if the tcl string includes "\n". + +Tue Jun 27 20:05:14 2006 Yukihiro Matsumoto + + * io.c (pipe_open): backout unnecessary fix on 2006-06-26. + [ruby-dev:28865] + + * eval.c (rb_yield_0): exact argument number check now done only + for lambda Proc. + + * eval.c (rb_yield_0): add check for number of arguments, if + there's one lambda block parameter. + +Tue Jun 27 16:04:05 2006 WATANABE Hirofumi + + * win32/win32.h: define isascii on MinGW for msvcrt compatibility. + + * configure.in: set ac_cv_header_sys_time_h=no on MinGW + for msvcrt compatibility. + +Tue Jun 27 11:36:02 2006 Nobuyoshi Nakada + + * ext/etc/etc.c (setup_passwd, setup_group): allow bignum uid, gid and + so on. [ruby-talk:199102] + +Tue Jun 27 10:46:53 2006 Tanaka Akira + + * eval.c (rb_yield_0): avoid core dump. [ruby-dev:28840] + +Mon Jun 26 11:03:00 2006 Eric Hodel + + * lib/rdoc/ri: Add options to limit the ri search path. + +Tue Jun 27 01:31:59 2006 Tanaka Akira + + * ext/socket/socket.c (bsock_recv_nonblock): new method + BasicSocket#recv_nonblock. + (udp_recvfrom_nonblock): renamed from ip_recvfrom_nonblock. + IPSocket#recvfrom_nonblock is moved to UDPSocket#recvfrom_nonblock. + (unix_recvfrom_nonblock): removed. + UNIXSocket#recvfrom_nonblock is removed. + +Tue Jun 27 00:52:40 2006 Nobuyoshi Nakada + + * ext/ripper/eventids2.c (token_assoc): added tCHAR, which is not + under 256 now. fixed: [ruby-dev:28832] + +Mon Jun 26 23:42:57 2006 Nobuyoshi Nakada + + * eval.c (call_trace_func): no check for argument number of the + callback. fixed: [ruby-dev:28812] + +Mon Jun 26 18:37:44 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_delete): fix SEGV when a slave-ip is + deleted on callback. + +Mon Jun 26 15:40:26 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_accept): revert to avoid ambiguity of + argument evaluation order. [ruby-dev:28861] + + * ext/socket/socket.c (sock_accept_nonblock): ditto. + +Mon Jun 26 10:47:42 2006 Yukihiro Matsumoto + + * io.c (pipe_open): avoid closing uninitialized file descriptors. + a patch from [ruby-dev:28600] + +Sun Jun 25 23:02:12 2006 Nobuyoshi Nakada + + * Makefile.in, mkconfig.rb: catch-up for latest autoconf. + +Sun Jun 25 17:44:16 2006 Tanaka Akira + + * parse.y (paren_args): wrap $2 by escape_Qundef because it may be + Qundef. [ruby-dev:28843] + +Sun Jun 25 17:18:33 2006 Masaki Suketa + + * ext/win32ole/win32ole.c(ole_invoke): support some kind of + method of word. [ruby-Bugs#3237] + + * test/win32ole/test_word.rb: ditto. + +Sat Jun 24 23:48:08 2006 Yukihiro Matsumoto + + * parse.y: replace terminal token names with more descriptive + name, i.e. kEND to keyword_end. [ruby-list:42477] + +Sat Jun 24 23:37:41 2006 Tanaka Akira + + * eval.c (rb_eval): use rb_ary_new2 instead of rb_ary_new4 to avoid + GC problem. + (rb_yield_values): use rb_ary_new2 instead of rb_ary_new4. + + * array.c (rb_ary_new4): don't set len as n if contents is not + initialized. make it safe with GC. + + [ruby-dev:28826] + +Fri Jun 23 23:35:32 2006 Tanaka Akira + + * ruby.h, lib/drb/drb.rb, lib/drb/invokemethod.rb: remove Values class. + [ruby-dev:28805] + +Fri Jun 23 17:27:52 2006 Nobuyoshi Nakada + + * eval.c (rb_block_pass): removed. + + * eval.c (rb_thread_start_1): use rb_proc_yield() instead of + rb_block_pass(). fixed: [ruby-dev:28794] + +Thu Jun 22 11:52:02 2006 Yukihiro Matsumoto + + * lib/net/http.rb (Net::HTTPResponse): duplicated error 501; + HTTPInternalServerError should be error 500. [ruby-core:08037] + +Thu Jun 22 11:47:52 2006 Yukihiro Matsumoto + + * variable.c (rb_mod_name): returns nil for anonymous modules. + [ruby-talk:198440] + +Thu Jun 22 10:31:39 2006 Yukihiro Matsumoto + + * string.c (rb_str_aref): "abc"[3] should not return an empty + string but nil. [ruby-dev:28786] + +Thu Jun 22 05:15:58 2006 Tanaka Akira + + * ext/socket/socket.c (sock_s_socketpair): try GC only once. + [ruby-dev:28778] + +Wed Jun 21 21:20:31 2006 Tadayoshi Funaba + + * lib/date.rb (jd_to_commercial): now works fine even if in + mathn-ized context. + +Wed Jun 21 17:29:57 2006 NAKAMURA Usaku + + * ext/socket/getaddrinfo.c (freeaddrinfo, get_name): fixed typo. + + * ext/tk/tcltklib.c (tcl_eval, tcl_global_eval): ditto. + + * ext/zlib/zlib.c (rscheck): constified. + +Wed Jun 21 17:18:55 2006 Yukihiro Matsumoto + + * lib/pp.rb (PP::PPMethods::seplist): should have preserved + original reference to the array. [ruby-dev:28747] + +Wed Jun 21 14:35:06 2006 Yukihiro Matsumoto + + * parse.y (block_param): do not use multiple assignment for a sole + block parameter. [ruby-dev:28710] + + * eval.c (rb_yield_0): pass a raw yielded value to a sole block + parameter if a value is passed by yield. + + * eval.c (proc_invoke): args may not be an array. + + * eval.c (rb_proc_yield): pass original value without wrapping + it in an array. + +Wed Jun 21 14:06:47 2006 Yukihiro Matsumoto + + * parse.y (method_call): remove (fn)(args) style lambda + invocation, add fn.(args) instead. + +Wed Jun 21 08:39:54 2006 Yukihiro Matsumoto + + * lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): merge Date + and Time processing. [ruby-core:08033] + +Wed Jun 21 03:01:10 2006 Yukihiro Matsumoto + + * eval.c, file.c, etc.: code-cleanup patch from Stefan Huehner + . [ruby-core:08029] + +Wed Jun 21 01:40:25 2006 Nobuyoshi Nakada + + * parse.y (reswords): modifier token is no longer returned in fname + state. fixed: [ruby-dev:28775] + +Tue Jun 20 23:28:34 2006 Nobuyoshi Nakada + + * ext/extmk.rb (parse_args): provisional catch-up for the recent changes. + + * lib/optparse.rb (OptionParser::List#summarize, OptionParser#order!): ditto. + +Tue Jun 20 11:07:55 2006 Yukihiro Matsumoto + + * eval.c (proc_invoke): intercept break and return from lambda + Proc objects. [ruby-dev:28742] + + * eval.c (proc_invoke): remove unnecessary YIELD_PROC_CALL flag. + + * eval.c (YIELD_EXACT_ARGS): renamed from YIELD_LAMBDA_CALL, which + is no longer related to the behavior turned on by this flag. + + * eval.c (return_jump): no need to care about PROT_YIELD. + + * eval.c (break_jump): no jump to toplevel PROT_THREAD tag. + + * eval.c (rb_yield_0): fix confusion between lambda (which is a + property of a proc) and pcall (which depends on whether it's + called via yield or call). + + * eval.c (rb_thread_yield): no need to specify YIELD_LAMBDA_CALL. + + * eval.c (rb_block_pass): update blkid in prot_tag. + +Mon Jun 19 23:40:59 2006 NARUSE, Yui + + * ext/nkf/lib/kconv.rb: remove default -m0 and fix document. + + * ext/nkf/nkf-8/{nkf.c, config.h, utf8tbl.c, utf8tbl.h}: + imported nkf 2.0.7. + +Mon Jun 19 17:02:14 2006 Yukihiro Matsumoto + + * sample/test.rb (proc_return3): return within non lambda block + should terminate surrounding method. [ruby-dev:28741] + +Mon Jun 19 13:22:48 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (unix_sysaccept): typo fixed. + + * ext/socket/socket.c (sock_connect): remove an unused local + variable tmpaddr. + +Mon Jun 19 02:10:32 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (tcp_accept_nonblock): forgot to remove + abandoned hacks. [ruby-dev:28740] + +Mon Jun 19 00:00:17 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: fix bug: initialize improper tables. + +Sun Jun 18 20:28:43 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (fole_methods): The return value + of WIN32OLE#ole_methods should include PROPERTYPUTREF methods. + + * ext/win32ole/win32ole.c (fole_put_methods): The return value + of WIN32OLE#ole_put_methods should include PROPERTYPUTREF methods. + + * test/win32ole/test_ole_methods.rb: ditto. + + * ext/win32ole/win32ole.c (ole_propertyput): support + PROPERTYPUTREF. [ruby-talk:183042] + + * test/win32ole/test_propertyputref.rb: ditto. + +Sat Jun 17 23:42:26 2006 Yukihiro Matsumoto + + * eval.c (Init_eval): add aliases invoke_method and + invoke_functional_method corresponding send and funcall + respectively. [ruby-talk:197512] + + * parse.y (parser_yylex): returns the most typical keyword token + on EXPR_FNAME. [ruby-core:7995] + + * ext/socket/socket.c: protoize. + +Sat Jun 17 22:17:17 2006 Yukihiro Matsumoto + + * lib/mathn.rb (Integer::prime_division): raise ZeroDivisionError + on zeros. [ruby-dev:28739] + +Sat Jun 17 14:53:32 2006 Tanaka Akira + + * lib/pathname.rb (Kernel#Pathname): new method. + +Sat Jun 17 02:01:00 2006 Tanaka Akira + + * lib/pp.rb (Kernel#pretty_inspect): defined for pretty printed + string. + +Fri Jun 16 01:41:00 2006 Nobuyoshi Nakada + + * eval.c (rb_proc_arity): get rid of segfault for mere splat. + + * gc.c (gc_mark_children): NODE_BLOCK_PASS needs u3 to be marked. + +Thu Jun 15 22:06:56 2006 Yukihiro Matsumoto + + * parse.y (then): remove ':' from 'then' and 'do' rules. + +Wed Jun 14 18:00:20 2006 Eric Hodel + + * enum.c (enum_any): Documentation typo. + +Wed Jun 14 15:01:09 2006 Eric Hodel + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser#warn): Don't print + warnings when -q is set. + +Wed Jun 14 16:11:37 2006 NAKAMURA Usaku + + * eval.c (rb_f_method_name, rb_f_callee_name): document typo. + +Wed Jun 14 15:19:14 2006 Yukihiro Matsumoto + + * hash.c (env_aset): raise TypeError on nil with more descriptive + message. [ruby-core:07990] + +Tue Jun 13 17:22:19 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (Init_socket): remove obsolete constants: + IPsocket, TCPsocket, SOCKSsocket, TCPserver, UDPsocket, + UNIXsocket, UNIXserver. + +Tue Jun 13 09:07:27 2006 Yukihiro Matsumoto + + * eval.c (formal_assign): post splat arguments should have had + higher priority than optional arguments, since they are + mandatory. [ruby-dev:28715] + + * eval.c (VIS_MASK): broken. should be 15. [ruby-dev:28715] + + * io.c (argf_getc): should return one-character string. + [ruby-dev:28715] + + * io.c (rb_io_readchar): ditto. + +Sun Jun 11 23:20:07 2006 Nobuyoshi Nakada + + * object.c (sym_call): disallow to call private methods. + + * lib/optparse.rb (OptionParser::Arguable#getopts): pass self to the + parser. + +Sun Jun 11 09:56:41 2006 NAKAMURA Usaku + + * win32/win32.h (write): not need to define on bcc. + +Sun Jun 11 08:30:33 2006 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#getopts): new methods. + +Sun Jun 11 07:27:11 2006 NAKAMURA Usaku + + * lib/rdoc/ri/ri_writer.rb: use String#ord. + +Sun Jun 11 04:38:20 2006 Nobuyoshi Nakada + + * object.c (sym_to_proc): imported Symbol#to_proc from ActiveSupport. + +Sat Jun 10 18:02:40 2006 Yukihiro Matsumoto + + * ext/bigdecimal/lib/bigdecimal/newton.rb (Newton::nlsolve): typo + fixed: raize -> raise. [ruby-talk:196608] + +Sat Jun 10 17:49:53 2006 Yukihiro Matsumoto + + * string.c (rb_str_ord): new method. + + * parse.y (rbracket): allow optional newline before closing + brackets. + +Sat Jun 10 15:12:29 2006 NAKAMURA Usaku + + * eval.c (rb_f_method_name, rb_f_callee_name): new functions. + new global method `__method__' and `__callee__'. + +Sat Jun 10 10:13:13 2006 NAKAMURA Usaku + + * lib/getoptlong.rb (GetoptLong#set_options): receive arguments + as Array. + + * lib/irb/slex.rb: use Proc#yield. + + * lib/rdoc/markup/simple_markup/inline.rb: follow the new behavior + of String#[]. + + * lib/rdoc/ri/ri_writer.rb: ditto. + +Sat Jun 10 08:17:23 2006 Nobuyoshi Nakada + + * math.c (log2): may be a macro. + + * parse.y (args, block_param, f_args): pass f_post_arg to #params. + + * util.c (powersOf10): constified. + + * ext/readline/readline.c: include extconf.h first. + + * ext/ripper/eventids2.c: removed tLAMBDA_ARG. + + * ext/tk/tcltklib.c (lib_fromUTF8_core): removed conflict. + + * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): rb_id2name() is + defined as const now. + + * ext/win32ole/win32ole.c (fole_missing): ditto. + + * lib/mkmf.rb (create_makefile): force to create extconf header. + + * lib/optparse.rb (order!): use Proc#yield. + +Sat Jun 10 06:53:22 2006 NAKAMURA Usaku + + * eval.c (CALLARGS): remove last semicolon. C90 compiler doesn't + allow any lines (even if they're empty) within variable + declarations. + +Fri Jun 9 09:56:32 2006 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): allow %c to print one character + string (e.g. ?x). + +Thu Jun 8 14:00:02 2006 NAKAMURA Usaku + + * win32/win32.[ch] (rb_w32_read, rb_w32_write): new functions. + use recv() and send() when fd is socket. fixed: [ruby-dev:28694] + +Wed Jun 7 16:22:51 2006 Yukihiro Matsumoto + + * lib/tempfile.rb (Tempfile::make_tmpname): put dot between + basename and pid. [ruby-talk:196272] + +Wed Jun 7 16:16:29 2006 Yukihiro Matsumoto + + * parse.y (do_block): remove -> style block. + + * parse.y (parser_yylex): remove tLAMBDA_ARG. + +Wed Jun 7 14:51:22 2006 NAKAMURA Usaku + + * win32/win32.c (errmap): add some winsock errors. + +Wed Jun 7 09:14:44 2006 Yukihiro Matsumoto + + * eval.c (rb_call0): binding for the return event hook should have + consistent scope. [ruby-core:07928] + +Tue Jun 6 23:25:49 2006 Yukihiro Matsumoto + + * eval.c (proc_invoke): return behavior should depend whether it + is surrounded by a lambda or a mere block. + +Mon Jun 5 18:12:12 2006 Tanaka Akira + + * ext/socket/socket.c (sock_s_unpack_sockaddr_in): reject + non-AF_INET/AF_INET6 sockaddr. + (sock_s_unpack_sockaddr_un): reject non-AF_UNIX sockaddr. + [ruby-dev:28691] + +Sun Jun 4 20:40:19 2006 Tanaka Akira + + * ext/socket/socket.c: fix sockaddr_un handling. + [ruby-dev:28677] + +Sat Jun 3 23:53:18 2006 Yukihiro Matsumoto + + * eval.c (formal_assign): handles post splat arguments. + + * eval.c (rb_call0): ditto. + +Sat Jun 3 13:10:41 2006 Yukihiro Matsumoto + + * st.c (strhash): use FNV-1a hash. + +Fri Jun 2 20:01:24 2006 Yukihiro Matsumoto + + * parse.y (parser_yylex): removed experimental ';;' terminator. + +Fri Jun 2 19:00:40 2006 GOTOU Yuuzou + + * ext/openssl/extconf.rb: use create_header. + + * ext/openssl/ossl.h, ext/openssl/openssl_missing.h: + include RUBY_EXTCONF_H. + +Fri Jun 2 17:16:52 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (CLEANINGS): remove extconf.h by distclean if created. + +Fri Jun 2 00:11:19 2006 Tanaka Akira + + * ext/socket/socket.c (s_recvfrom): alen may be zero with UNIXSocket + too. (tested on NetBSD 3.0) + (s_recvfrom_nonblock): extracted from sock_recvfrom_nonblock. + (sock_recvfrom_nonblock): use s_recvfrom_nonblock. + (ip_recvfrom_nonblock): new method: IPSocket#recvfrom_nonblock + (unix_recvfrom_nonblock): new method: UNIXSocket#recvfrom_nonblock + (s_accept_nonblock): extracted from sock_accept_nonblock. + (sock_accept_nonblock): use s_accept_nonblock. + (tcp_accept_nonblock): new method: TCPServer#accept_nonblock + (unix_accept_nonblock): new method: UNIXServer#accept_nonblock + +Thu Jun 1 19:12:37 2006 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_cmdvector): backslashes inside single-quotes + no longer has special meanings. fixed: [ruby-list:42311] + +Thu Jun 1 17:55:42 2006 Yukihiro Matsumoto + + * eval.c (rb_node_arity): should be aware of post splat arguments. + + * eval.c (rb_proc_arity): ditto. + +Thu Jun 1 16:17:26 2006 NAKAMURA Usaku + + * win32/win32.c (rb_w32_getcwd): runtime's getcwd() will not success + if the length of the cwd is longer than MAX_PATH. + fixed [ruby-list:42335] + +Thu Jun 1 16:07:48 2006 Yukihiro Matsumoto + + * parse.y (f_args): syntax rule enhanced to support arguments + after the splat. + + * parse.y (mlhs_basic): ditto for multiple assignments + + * parse.y (block_param): ditto for block parameters. + + * parse.y (f_post_arg): mandatory formal arguments after the splat + argument. + + * parse.y (new_args_gen): generate nodes for mandatory formal + arguments after the splat argument. + + * eval.c (rb_eval): dispatch mandatory formal arguments after the + splat argument. + +Thu Jun 1 11:33:32 2006 NAKAMURA Usaku + + * win32/win32.c (rb_w32_getcwd): set errno if not set. + fixed [ruby-list:42346] + +Thu Jun 1 00:45:52 2006 Yukihiro Matsumoto + + * parse.y (args): allow more than one splat in the argument list. + +Wed May 31 18:38:11 2006 Yukihiro Matsumoto + + * parse.y (method_call): allow aref [] to accept all kind of + method argument, including assocs, splat, and block argument. + + * eval.c (SETUP_ARGS0): prepare block argument as well. + +Tue May 30 18:13:53 2006 Yukihiro Matsumoto + + * lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931] + +Mon May 29 22:40:13 2006 Yukihiro Matsumoto + + * eval.c (error_line): print receivers true/false/nil specially. + + * eval.c (rb_proc_yield): handles parameters in yield semantics. + + * eval.c (nil_yield): gives LocalJumpError to denote no block + error. + + * io.c (rb_io_getc): now takes one-character string. + +Sat May 27 22:46:38 2006 Yukihiro Matsumoto + + * eval.c (proc_invoke): save and restore block in the current frame. + fixed: [ruby-core:07833], [ruby-talk:191639] + +Sat May 27 11:29:46 2006 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): remove extinit files if no statically linked + extensions. + +Fri May 26 19:56:46 2006 Yukihiro Matsumoto + + * string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo + hashing algorithm. + +Fri May 26 09:05:11 2006 Nobuyoshi Nakada + + * ruby.h, lib/mkmf.rb (create_header): clear command line options for + macros moved to extconf.h. + + * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and + EXTSTATIC permanent. + + * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. + + * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added + $(INCFLAGS). + + * lib/mkmf.rb (configuration): add $defs unless extconf.h was created. + +Thu May 25 01:52:07 2006 Nobuyoshi Nakada + + * lib/mkmf.rb (pkg_config): particular config commands support. + + * ext/extmk.rb: deal with $static set in extconf.rb. + + * mkconfig.rb: merge multiple entries to an entry with multiple lines. + + * lib/mkmf.rb: allow a series of commands to link. + + * win32/Makefile.sub: embed manifests. + + * win32/setup.mak: suffix OS name by runtime version. + +Wed May 24 23:52:11 2006 Nobuyoshi Nakada + + * configure.in (ac_install_sh): ignore dummy install-sh. + [ruby-talk:193876] + +Wed May 24 17:55:13 2006 Yukihiro Matsumoto + + * string.c (rb_str_aref): str[0] now returns 1 character string, + instead of a fixnum. [Ruby2] + + * parse.y (parser_yylex): ?c now returns 1 character string, + instead of a fixnum. [Ruby2] + + * string.c (rb_str_aset): no longer support fixnum insertion. + +Wed May 24 03:10:44 2006 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb + (OpenSSL::SSL::SocketForwarder#setsockopt,getsockopt): typo fixed. + +Mon May 22 16:32:03 2006 Tanaka Akira + + * rubyio.h (rb_io_set_nonblock): declared. + + * io.c (rb_io_set_nonblock): new function. + (io_getpartial): nonblocking read support. + (io_read_nonblock): new method: IO#read_nonblock. + (io_write_nonblock): new method: IO#write_nonblock. + + * ext/socket/socket.c (s_accept): retry for EWOULDBLOCK. + revert [ruby-talk:113807]. + (sock_connect_nonblock): new method: Socket#connect_nonblock. + (sock_accept_nonblock): new method: Socket#accept_nonblock. + (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock. + + [ruby-core:7917] + +Mon May 22 15:57:39 2006 Yukihiro Matsumoto + + * eval.c (umethod_bind): should not update original class. + [ruby-dev:28636] + +Mon May 22 13:38:57 2006 Yukihiro Matsumoto + + * eval.c (ev_const_get): should support constant access from + within instance_eval(). [ruby-dev:28327] + +Sun May 21 09:50:31 2006 K.Kosako + + * regexec.c: add STK_NULL_CHECK_END to IS_TO_VOID_TARGET(). + [ruby-list:42234] + +Thu May 18 22:37:20 2006 GOTOU Yuuzou + + * lib/webrick/config.rb (WEBrick::Config::HTTP): add new parameters, + :InputBufferSize and :OutputBufferSize. + + * lib/webrick/utils.rb (WEBrick::Utils.timeout): add new timeout + method. this implementation is expected to be compatible with + timeout.rb and faster than timeout.rb. + + * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#_read_data): + Timeout.timeout is replaced by WEBrick::Utils.timeout. + + * lib/webrick/httprequest.rb: WEBrick::HTTPRequest::BUFSIZE is + replaced by config[:InputBufferSize]. + + * lib/webrick/httpresposne.rb: WEBrick::HTTPResponse::BUFSIZE is + replaced by config[:OutputBufferSize]. + + * lib/webrick/server.rb: get rid of unnecessary require. + + * test/webrick/test_utils.rb: test for WEBrick::Utils.timeout. + +Thu May 18 17:51:32 2006 Yukihiro Matsumoto + + * time.c (time_timeval): should round for usec floating + number. [ruby-core:07896] + + * time.c (time_add): ditto. + +Thu May 18 00:42:12 2006 Nobuyoshi Nakada + + * ext/extmk.rb, lib/mkmf.rb: use BUILD_FILE_SEPARATOR in Makefiles. + +Wed May 17 17:55:26 2006 Yukihiro Matsumoto + + * dir.c (sys_warning): should not call a vararg function + rb_sys_warning() indirectly. [ruby-core:07886] + +Tue May 16 17:23:19 2006 Shin-ichiro HARA + + * numeric.c (flo_divmod): the first element of Float#divmod should + be an integer. [ruby-dev:28589] + + * test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder. + +Tue May 16 15:34:18 2006 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): should not allow modifying literal + regexps. frozen check moved from rb_reg_initialize_m as well. + +Tue May 16 09:20:16 2006 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): should not modify untainted objects in + safe levels higher than 3. + + * re.c (rb_memcmp): type change from char* to const void*. + + * dir.c (dir_close): should not close untainted dir stream. + + * dir.c (GetDIR): add tainted/frozen check for each dir operation. + +Mon May 15 21:37:12 2006 K.Kosako + + * re.c (rb_reg_prepare_re): don't use onig_recompile(). + +Mon May 15 17:42:39 2006 Yukihiro Matsumoto + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg): + typo fixed. a patch from Florian Gross . + +Sat May 13 16:14:05 2006 Tanaka Akira + + * lib/pp.rb (PP.mcall): new method. + (Struct#pretty_print): call Kernel#class and Struct#members even if + overridden. + (Struct#pretty_print_cycle): ditto. + [ruby-core:7865] + +Fri May 12 15:54:48 2006 Yukihiro Matsumoto + + * eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from + event_hooks. no guarantee for arbitrary hook deletion. + [ruby-dev:28632] + +Thu May 11 19:57:00 2006 Yukihiro Matsumoto + + * util.c (ruby_strtod): differ addition to minimize error. + [ruby-dev:28619] + +Thu May 11 18:30:11 2006 GOTOU Yuuzou + + * ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): should return + value. [ruby-dev:28627] + +Thu May 11 18:10:43 2006 Yukihiro Matsumoto + + * util.c (ruby_strtod): should not raise ERANGE when the input + string does not have any digits. [ruby-dev:28629] + +Wed May 10 23:40:21 2006 K.Kosako + + * oniguruma.h: Version 4.0.3 + + * regexec.c: ditto. + +Mon May 8 09:10:31 2006 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted. + + * ext/openssl/ossl_cipher.c (ossl_s_ciphers): new method + OpenSSL::Cipher.ciphers. it returns all the cipher names. + + * ext/openssl/ossl_cipher.c (ossl_cipher_init): refine warning message. + + * ext/openssl/lib/openssl/cipher.rb: reimplement without eval() and + add constants AES128, AES192, AES256. [ruby-dev:28610] + + * ext/openssl/lib/openssl/digest.rb: reimplement without eval(). + + * test/openssl/test_cipher.rb, test_digest: fix about reimplemented + features. + + * sample/openssl/cipher.rb: rewrite all. + +Sun May 7 03:09:51 2006 Stephan Maka + + * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize): + Use AF_INET6 for nameservers containing colons. + +Sat May 6 23:40:03 2006 Yukihiro Matsumoto + + * eval.c (proc_invoke): should restore old ruby_frame->block. + thanks to ts . [ruby-core:07833] + also fix [ruby-dev:28614] as well. + +Sat May 6 00:38:42 2006 Yukihiro Matsumoto + + * signal.c (trap): sig should be less then NSIG. Coverity found + this bug. a patch from Kevin Tew . + [ruby-core:07823] + +Thu May 4 22:13:22 2006 Yukihiro Matsumoto + + * math.c (math_log2): add new method inspired by + [ruby-talk:191237]. + + * math.c (math_log): add optional base argument to Math::log(). + [ruby-talk:191308] + +Thu May 4 02:24:16 2006 Yukihiro Matsumoto + + * ext/syck/emitter.c (syck_scan_scalar): avoid accessing + uninitialized array element. a patch from Pat Eyler + . [ruby-core:07809] + + * array.c (rb_ary_fill): initialize local variables first. a + patch from Pat Eyler . [ruby-core:07810] + + * ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free + type_tag. a patch from Pat Eyler . + [ruby-core:07808] + +Wed May 3 02:12:07 2006 Yukihiro Matsumoto + + * ext/socket/socket.c (make_hostent_internal): accept ai_family + check from Sam Roberts . + [ruby-core:07691] + +Mon May 1 17:58:16 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (add_event_call_back): should not + delete event handler when the event name is not entried. + +Mon May 1 08:32:10 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_param_ole_type): should return + "unknown type" string when ITypeInfo::GetFuncDesc failed. + +Sat Apr 29 22:43:37 2006 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_asn1_decode0): should initialize + flag. [ruby-core:07785] + +Fri Apr 28 10:53:16 2006 Yukihiro Matsumoto + + * util.c (ruby_strtod): should not cut off 18 digits for no + reason. [ruby-core:07796] + +Thu Apr 27 01:38:10 2006 Yukihiro Matsumoto + + * array.c (rb_ary_fill): internalize local variable "beg" to + pacify Coverity. [ruby-core:07770] + +Wed Apr 26 16:59:24 2006 Yukihiro Matsumoto + + * pack.c (pack_unpack): now supports CRLF newlines. a patch from + . [ruby-dev:28601] + +Wed Apr 26 16:55:19 2006 Yukihiro Matsumoto + + * applied code clean-up patch from Stefan Huehner + . [ruby-core:07764] + +Tue Apr 25 18:00:05 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (delete_slaves): maybe increment the reference + count of a NULL Tcl_Obj [ruby-core:07759]. + +Tue Apr 25 07:55:31 2006 Yukihiro Matsumoto + + * lib/jcode.rb (String::tr_s): should have translated non + squeezing character sequence (i.e. a character) as well. thanks + to Hiroshi Ichikawa [ruby-list:42090] + +Fri Apr 21 15:19:13 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (lib_eventloop_ensure): refer freed pointer + [ruby-core:07744] and memory leak. + +Fri Apr 21 12:14:52 2006 Yukihiro Matsumoto + + * ext/socket/socket.c: document update patch from Sam Roberts + . [ruby-core:07701] + +Thu Apr 20 08:43:54 2006 Yukihiro Matsumoto + + * lib/mathn.rb (Integer): need not to remove gcd2. a patch from + NARUSE, Yui . [ruby-dev:28570] + +Wed Apr 19 13:55:27 2006 Yukihiro Matsumoto + + * parse.y (arg): too much NEW_LIST() + + * eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen. + +Wed Apr 19 11:57:04 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1. + [ruby-dev:28585] + + * parse.y (arg): use NODE_ARGSCAT for placeholder. + +Wed Apr 19 11:13:17 2006 Yukihiro Matsumoto + + * lib/getoptlong.rb (GetoptLong::get): RDoc update patch from + mathew . [ruby-core:07738] + +Wed Apr 19 10:13:27 2006 Yukihiro Matsumoto + + * variable.c (rb_const_set): raise error when no target klass is + supplied. [ruby-dev:28582] + +Tue Apr 18 17:40:37 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: add a binding to a container for a slave IP. + + * ext/tk/lib/tk.rb: update RELEASE_DATE. + + * ext/tk/tcltklib.c: forget to reset a Tcl interpreter. + + * ext/tk/stubs.c: fix potential bugs about handling rb_argv0. + +Mon Apr 10 01:03:10 2006 Yukihiro Matsumoto + + * prec.c (prec_prec_f): documentation patch from + . [ruby-core:07689] + +Sat Apr 8 02:34:34 2006 Yukihiro Matsumoto + + * bignum.c (rb_big_pow): second operand may be too big even if + it's a Fixnum. [ruby-talk:187984] + +Sat Apr 8 02:12:38 2006 Yukihiro Matsumoto + + * README.EXT: update symbol description. [ruby-talk:188104] + +Sat Apr 8 18:06:28 2006 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_METHOD#inspect, + WIN32OLE_PARAM#inspect. + + * test/win32ole/test_win32ole_method.rb: ditto. + + * add test/win32ole/test_win32ole_param.rb. + +Fri Apr 7 22:11:30 2006 Masaki Suketa + + * ext/win32ole/win32ole.c(foletypelib_initialize): WIN32OLE_TYPELIB.new + accepts OLE file. + + * test/win32ole/test_win32ole_typelib.rb(test_initialize): ditto. + +Thu Apr 6 23:28:47 2006 Yukihiro Matsumoto + + * COPYING: explicitly note GPLv2. [ruby-talk:187922] + +Thu Apr 6 16:43:06 2006 Hidetoshi NAGAI + + * intern.h (rb_obj_instance_exec, rb_mod_module_exec): add declaration. + +Thu Apr 6 11:18:37 2006 Hidetoshi NAGAI + + * ext/tk/lib/tk/panedwindow.rb: lack of arguments. [ruby-core:7681] + +Thu Apr 6 01:04:47 2006 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: fix SEGV when embedding to an application. + [ruby-core:7600] + + * ext/tk/tcltklib.c: fix SEGV at exit. [ruby-talk:186489] + + * ext/tk/tkutil/tkutil.c: follow to changing specification of + instance_eval on ruby-1.9.x. + + * ext/tk/lib/tk.rb: ditto. + + * ext/tk/lib/multi-tk.rb: ditto. + + * ext/tk/lib/tk.rb: remove warning about redefinition of methods. + + * ext/tk/lib/tk/variable.rb: remove warning about unseting Tcl + variables. + +Wed Apr 5 00:22:54 2006 Tanaka Akira + + * lib/pathname.rb: use a subclass for instantiation except + methods take pathname argument. suggested by Evan Phoenix. + [ruby-core:7618] + +Tue Apr 4 22:15:41 2006 Yukihiro Matsumoto + + * parse.y: remove some obsolete syntax rules (unparenthesized + method calls in argument list). + +Sat Apr 1 15:11:27 2006 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_TYPE#inspect, + WIN32OLE_VARIABLE#inspect + + * remove ext/win32ole/tests/testOLEVARIABLE.rb, testOLETYPE.rb + testOLETYPELIB.rb. + + * testall.rb: ditto. + + * add test/win32ole + +Fri Mar 31 14:24:55 2006 Nobuyoshi Nakada + + * enumerator.c (enumerator_with_index): removed suspicious return + statement. + +Wed Mar 29 23:06:48 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_invoke): change the behavior of + WIN32OLE#[], WIN32OLE#[]=. These methods invoke DISPID_VALUE. + + * ext/win32ole/sample/excel2.rb: ditto. + + * ext/win32ole/tests/testWIN32OLE.rb: ditto. + +Wed Mar 29 10:11:31 2006 NAKAMURA Usaku + + * ext/nkf/nkf-utf8/nkf.c (nkf_each_char_to_hex, encode_fallback_subchar, + e2w_conv): support C90 compiler. + +Mon Mar 27 22:45:37 2006 NARUSE, Yui + + * ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: imported nkf 2.0.6. + * Add --ic / --oc option and mapping tables. + * Add fallback option. + * Add --no-best-fit-chars option. + * Fix some bugs. + + * ext/nkf/nkf.c (nkf_split_options): added for parse option string. + + * ext/nkf/lib/kconv.rb (Kconv.to*): add -m0. + Note that Kconv.to* still imply -X. + + * ext/nkf/test.rb: Removed. Obsolete by test/nkf. + + * ext/.document: enabled documents in nkf and kconv + + * ext/nkf/nkf.c, ext/nkf/lib/kconv.rb: Add rdoc. + +Mon Mar 27 03:17:21 2006 Yukihiro Matsumoto + + * eval.c (rb_call0): insecure calling should be checked for non + NODE_SCOPE method invocations too. + + * eval.c (rb_alias): should preserve the current safe level as + well as method definition. + +Sun Mar 26 22:02:51 2006 K.Kosako + + * re.c: refactoring for options. + + * parse.y: ditto. + +Fri Mar 24 21:11:02 2006 K.Kosako + + * re.c (match_aref): RDoc description updated. + + * string.c (rb_str_sub): ditto. + + * string.c (rb_str_gsub): ditto. + +Fri Mar 24 17:20:03 2006 Yukihiro Matsumoto + + * process.c (rb_f_sleep): remove RDoc description about SIGALRM + which is not valid on the current implementation. [ruby-dev:28464] + +Thu Mar 23 21:40:47 2006 K.Kosako + + * re.c (rb_reg_regsub): prohibit \1, \2 ...\9 in replaced string + for named regex pattern. + +Thu Mar 23 21:06:23 2006 K.Kosako + + * oniguruma.h: Version 4.0.2 + + * regparse.c: ditto. + + * regcomp.c ditto. + + * regerror.c: ditto. + +Thu Mar 23 10:47:03 2006 Yukihiro Matsumoto + + * eval.c (method_missing): should support argument splat in + super. a bug in combination of super, splat and + method_missing. [ruby-talk:185438] + +Thu Mar 23 00:01:32 2006 K.Kosako + + * re.c (rb_reg_regsub): add back reference by name \k in + replace string. + + * re.h: add regexp argument to rb_reg_regsub(). + + * string.c (rb_str_sub_bang): ditto. + + * string.c (str_gsub): ditto. + +Tue Mar 21 22:14:01 2006 K.Kosako + + * re.c (match_alloc): initialize member regexp. + + * re.c (match_aref): add String and Symbol argument. [ruby-dev:28448] + + * re.h: add member regexp to RMatch. + + * gc.c (gc_mark_children): add gc_mark() to regexp member. + +Mon Mar 20 12:05:18 2006 Yukihiro Matsumoto + + * configure.in: Solaris SunPro compiler -rapth patch from + . [ruby-dev:28443] + +Mon Mar 20 11:12:38 2006 NAKAMURA Usaku + + * ext/win32ole/win32ole.c (folevariant_value): could not compile + with C90 compiler. + +Mon Mar 20 09:40:23 2006 Yukihiro Matsumoto + + * configure.in: remove enable_rpath=no for Solaris. + [ruby-dev:28440] + +Sun Mar 19 09:46:30 2006 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior + of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby + String object. + + * ext/win32ole/win32ole.c (folevariant_value): ditto. + + * ext/win32ole/tests/testOLEVARIANT.rb: ditto. + +Wed Mar 15 16:51:11 2006 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): support libraries without *.so. + +Wed Mar 15 16:39:29 2006 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c, ext/openssl/ossl_nsspki.c: should use + "rb_str_new(0, 0)" to make empty string. + +Sun Mar 12 17:02:10 2006 Masaki Suketa + + * ext/win32ole/win32ole.c(ole_val2olevariantdata): support VT_ARRAY in + WIN32OLE_VARIANT.new(). + + * ext/win32ole/tests/testOLEVARIANT.rb: ditto. + + * ext/win32ole/tests/testOLEPARAM.rb: test method name should not be + duplicated. + +Sat Mar 11 14:24:06 2006 Yukihiro Matsumoto + + * ruby.1: a clarification patch from David Lutterkort + . [ruby-core:7508] + +Sun Mar 5 18:40:58 2006 Minero Aoki + + * lib/fileutils.rb: do not repeat command options. + +Sun Mar 5 18:35:03 2006 Minero Aoki + + * lib/net/http.rb (send_request_with_body): #content_type never + return false, use #main_type instead. [ruby-core:07476] + +Sat Mar 4 15:26:40 2006 Tanaka Akira + + * gc.c (id2ref): fix symbol test. + +Sat Mar 4 01:08:07 2006 Yukihiro Matsumoto + + * lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems + directories. a patch from Eric Hodel . + [ruby-core:07423] + +Fri Mar 3 17:59:00 2006 Yukihiro Matsumoto + + * eval.c (rb_clear_cache_by_class): clearing wrong cache. + +Fri Mar 3 21:22:42 2006 Tanaka Akira + + * lib/fileutils.rb (FileUtils.cp_r): implement :remove_destination + option. + + * ext/extmk.rb: use :remove_destination to install extension libraries + to avoid SEGV. [ruby-dev:28417] + +Fri Mar 3 14:41:04 2006 Minero Aoki + + * ext/dl/.cvsignore: ignore callback.h. + + * ext/ripper/.cvsignore: ignore eventids2table.c. + + * ext/socket/.cvsignore: ignore constants.h. + +Thu Mar 2 18:58:18 2006 Yukihiro Matsumoto + + * eval.c (rb_thread_fd_writable): should not re-schedule output + from KILLED thread (must be error printing). + +Thu Mar 2 09:12:05 2006 Yukihiro Matsumoto + + * array.c (rb_ary_flatten_bang): allow specifying recursion + level. [ruby-talk:182170] + + * array.c (rb_ary_flatten): ditto. + +Thu Mar 2 08:02:42 2006 Yukihiro Matsumoto + + * gc.c (add_heap): a heap_slots may overflow. a patch from Stefan + Weil . + +Wed Mar 1 17:13:37 2006 Yukihiro Matsumoto + + * eval.c (rb_call): use separate cache for fcall/vcall + invocation. + + * eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local + functions. + + * eval.c (rb_mod_local): a new method to specify newly added + visibility "local". + + * eval.c (search_method): search for local methods which are + visible only from the current class. + + * class.c (rb_class_local_methods): a method to list local methods. + +Thu Mar 2 17:54:45 2006 Hirokazu Yamamoto + + * gc.c: commited magic for reducing RVALUE size on windows. (24->20byte) + [ruby-core:7474] + +Thu Mar 2 14:12:26 2006 Tanaka Akira + + * gc.c: align VALUE with sizeof(RVALUE) globally. + (is_pointer_to_heap): check alignment out of loop. + (id2ref): avoid collision between symbols and objects. + (rb_obj_id): ditto. moved from object.c. + [ruby-talk:178364] [ruby-core:7305] + +Thu Mar 2 12:55:16 2006 Hirokazu Yamamoto + + * win32/win32.c (filetime_to_unixtime): should set tm_isdst to -1. + stat() didn't treat daylight saving time property on WinNT. + [ruby-talk:182100] + +Wed Mar 1 00:15:51 2006 Hirokazu Yamamoto + + * lib/rdoc/parsers/parse_rb.rb (read_escape): could not handle /\^/. + merged Mr. Ishizuka's lib/irb/ruby-lex.rb 's patch rev 1.29. + [ruby-talk:181631] [ruby-dev:28404] + +Tue Feb 28 19:32:14 2006 Yukihiro Matsumoto + + * object.c (Init_Object): add BasicObject class as a top level + BlankSlate class. + +Mon Feb 27 00:19:16 2006 Yukihiro Matsumoto + + * ruby.h (SYM2ID): should not cast to signed long. + [ruby-core:07414] + +Fri Feb 24 20:21:38 2006 Masatoshi SEKI + + * test/drb/drbtest.rb (add_service_command): quote pathnames in the + server's command line for space contained directory names. + Thanks, arton. [ruby-dev:28386] + +Fri Feb 24 12:10:07 2006 NAKAMURA Usaku + + * instruby.rb: install *.exe.manifest and *.dll.manifest if exist. + It's for VC++8. + +Fri Feb 24 11:17:45 2006 NAKAMURA Usaku + + * win32/win32.c (NtInitialize): need to set a handler for VC++8. + +Thu Feb 23 22:39:59 2006 Hirokazu Yamamoto + + * bcc32/Makefile.sub: use borlndmm.dll if possible. bcc32's RTL internal + memory manager cannot handle large memory block properly. + ex: 10000.times { "" << "." * 529671; GC.start } # crash + [ruby-dev:28230] + +Thu Feb 23 13:23:03 2006 Hirokazu Yamamoto + + * eval.c (SETUP_ARGS0): fixed memory corruption. [ruby-dev:28360] + +Wed Feb 22 21:16:55 2006 Tanaka Akira + + * lib/pathname.rb (Pathname#each_filename): use split_names properly. + +Wed Feb 22 16:24:05 2006 NAKAMURA Usaku + + * test/webrick/test_cgi.rb: should support platforms which search + library path from the interpreter's path. + And, support test without install incidentally. + +Wed Feb 22 14:21:03 2006 Yukihiro Matsumoto + + * bignum.c (bignorm): x may not be a bignum. [ruby-dev:28367] + +Wed Feb 22 09:22:40 2006 Yukihiro Matsumoto + + * eval.c (proc_alloc): add proper check for creation of a lambda + without a block. + +Tue Feb 21 02:07:39 2006 Yukihiro Matsumoto + + * parse.y (f_arglist): should set command_start = Qtrue for + command body. [ruby-talk:180648] + +Mon Feb 20 22:30:17 2006 Tanaka Akira + + * mkconfig.rb: alias Config to RbConfig for compatibility. + +Mon Feb 20 18:21:41 2006 Tanaka Akira + + * io.c (rb_io_reopen): flush before reopening a file. + reported by Mathieu Bouchard. [ruby-core:7396] + +Mon Feb 20 17:29:50 2006 Tanaka Akira + + * mkconfig.rb: generate RbConfig instead of Config. + + * instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub, + ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb, + lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb, + lib/webrick/httpservlet/cgihandler.rb, + test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, + test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb, + test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb, + win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of + Config. + +Mon Feb 20 13:46:19 2006 NAKAMURA Usaku + + * lib/find.rb: should raise ENOENT if root entry does not exist, + without opening it. [ruby-dev:28345] + +Mon Feb 20 12:27:53 2006 Kent Sibilev + + * lib/rational.rb (Integer::gcd): small typo fix. + [ruby-core:07395] + +Mon Feb 20 10:03:59 2006 Yukihiro Matsumoto + + * variable.c (rb_const_get_0): Object should have been the lowest + in const lookup precedence. [ruby-dev:28343] + +Mon Feb 20 09:17:11 2006 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator): should not delegate "funcall". + +Mon Feb 20 09:13:42 2006 Yukihiro Matsumoto + + * lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler): + qualify the access for Config constant. [ruby-dev:28338] + + * lib/resolv.rb (Resolv::DNS::Resource::IN::A): qualify + ClassValue. [ruby-dev:28338] + +Mon Feb 20 01:05:27 2006 Yukihiro Matsumoto + + * lib/rational.rb (Integer::gcd): replaced by gcd4 in + [ruby-core:07390]. [ruby-core:07377] + +Mon Feb 20 00:57:02 2006 GOTOU Yuuzou + + * ext/openssl/ossl.h (OSSL_Debug): should not use __func__. + [ruby-dev:28339] + +Mon Feb 20 00:13:49 2006 Tanaka Akira + + * lib/open-uri.rb: add :ssl_verify_mode option. + suggested by Will Glynn. + + * lib/open-uri.rb: add :ssl_ca_cert option. + +Sun Feb 19 04:46:29 2006 Guy Decoux + + * eval.c: initial value for block_unique must be 1. + [ruby-talk:180420] + +Sat Feb 18 23:58:26 2006 Yukihiro Matsumoto + + * lib/tracer.rb (Tracer::Tracer.add_filter): turn on tracer mode + only when caller() level size is one. [ruby-core:07389] + + * lib/rdoc/parsers/parse_rb.rb: need not to require "tracer". + [ruby-core:07389] + + * sample/rtags.rb: ditto. + +Sat Feb 18 21:16:27 2006 Yukihiro Matsumoto + + * eval.c (rb_obj_instance_eval): RDoc description updated. a + patch from Ozgur Murat Homurlu . + [ruby-core:07381] + +Sat Feb 18 01:01:17 2006 Yukihiro Matsumoto + + * variable.c (rb_const_get_0): skip ruby_wrapper in const search + to give it lower priority (just above Object). need not to + change rb_const_defined_0() since it's only a precedence matter; + they are defined anyway. + +Sat Feb 18 00:22:39 2006 Yukihiro Matsumoto + + * lib/tracer.rb: merged a minor clarification patch from Daniel + Berger . [ruby-core:07376] + +Fri Feb 17 17:30:20 2006 Yukihiro Matsumoto + + * eval.c (ev_const_get): simplified using rb_const_get_fallback(). + + * eval.c (ev_const_defined): adopt to ev_const_get() using + rb_const_defined_fallback(). + + * variable.c (rb_const_get_fallback): new function to implement + constant search. + + * variable.c (rb_const_defined_fallback): new function to + implement constant definition check. + + * variable.c (rb_const_get_0): adopt to new behavior. constants + are looked up in the order of: current class, super classes (but + Object), lexically external classes/modules, and Object. + + * variable.c (rb_const_defined_0): ditto. + +Fri Feb 17 11:20:53 2006 Hirokazu Yamamoto + + * util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330] + + * pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4. + [ruby-talk:180024] + + * pack.c (pack_unpack): fixed integer overflow on template "w". + [ruby-talk:180126] + +Fri Feb 17 09:39:29 2006 Yukihiro Matsumoto + + * eval.c (rb_thread_wait_for): sleep should always sleep for + specified amount of time. [ruby-talk:180067] + +Wed Feb 15 16:52:52 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): NODE_OP_ASGN1 should allow splat in its + argument list. [ruby-core:07366] + + * parse.y (arg): avoid unnecessary extra argument. + [ruby-core:07366] + + * eval.c (rb_eval): honor visibility on OP_ASGN1 and + OP_ASGN2. [ruby-core:07366] + +Wed Feb 15 15:20:23 2006 Yukihiro Matsumoto + + * eval.c (error_line): remove void control path. [ruby-dev:28335] + +Wed Feb 15 10:09:51 2006 Yukihiro Matsumoto + + * eval.c (yield_under_i): should not pass self as an argument to + the block for instance_eval. [ruby-core:07364] + +Wed Feb 15 09:20:35 2006 Yukihiro Matsumoto + + * eval.c (rb_obj_instance_eval): should be no singleton classes for + true, false, and nil. [ruby-dev:28186] + +Tue Feb 14 20:26:00 2006 Yukihiro Matsumoto + + * enumerator.c (enumerator_each): return self if no block is + given. [yarv-dev:882] + +Tue Feb 14 18:48:33 2006 Yukihiro Matsumoto + + * eval.c (DMETHOD_P): accessing wrong frame. [ruby-dev:28181] + + * eval.c (proc_invoke): preserve FRAME_DMETH flag. + +Tue Feb 14 15:15:22 2006 Hirokazu Yamamoto + + * ext/zlib/zlib.c: suppress warning on test/zlib. [ruby-dev:28323] + +Tue Feb 14 13:47:22 2006 NAKAMURA Usaku + + * win32/win32.c (rb_w32_utime): drop read-only attribute before + changing file time. + +Tue Feb 14 13:38:01 2006 NAKAMURA Usaku + + * win32/Makefile.sub (config.h): should define HAVE_LONG_LONG with + VC++8. + +Tue Feb 14 11:42:38 2006 NAKAMURA Usaku + + * time.c (search_time_t): support non 32bit time_t environments. + + * win32/Makefile.sub (config.h): VC++8 has ``long long'' type. + + * win32/Makefile.sub (config.h): VC++8's time_t is 64bit value. + +Mon Feb 13 18:01:52 2006 Yukihiro Matsumoto + + * eval.c (copy_node_scope): remove duplicated semicolons at end. + a patch from KIMURA Koichi . + [ruby-dev:28332] + + * eval.c (VIS_MODE): remove unnecessary argument. + [ruby-dev:28332] + +Mon Feb 13 13:49:48 2006 Yukihiro Matsumoto + + * parse.y (parser_parse_string): mention "regexp" in a error + message. a patch from Mauricio Fernandez + [ruby-core:07340] + +Mon Feb 13 00:01:32 2006 K.Kosako + + * oniguruma.h: Version 4.0.1 + + * regparse.c (onig_free_shared_cclass_table): fix memory leaks. + + * regcomp.c (optimize_node_left): change from IS_POSIXLINE() to IS_MULTILINE(). + + * regint.h: rename ANCHOR_ANYCHAR_STAR_PL to ANCHOR_ANYCHAR_STAR_ML. + + * regparse.h: ditto. + + * regexec.c: ditto. + +Sat Feb 11 21:57:29 2006 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE.create_guid. + + * ext/win32ole/tests/testWIN32OLE.rb: ditto. + +Sat Feb 11 01:57:44 2006 Yukihiro Matsumoto + + * eval.c (rb_f_autoload): check if ruby_cbase is nil (during + instance_eval for objects cannot have singleton classes, + e.g. fixnums and symbols). [ruby-dev:28178] + +Fri Feb 10 12:31:05 2006 Yukihiro Matsumoto + + * eval.c (rb_eval): should support NODE_ZSUPER in NODE_ITER. + [ruby-dev:28326] + + * eval.c (ZSUPER_ARGS): support macro. + +Wed Feb 8 10:26:06 2006 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while + invoking finalizers. + + * gc.c (rb_gc_finalize_deferred): ditto. + +Tue Feb 7 23:03:13 2006 Hirokazu Yamamoto + + * ext/zlib/zlib.c: should not access ruby objects in finalizer. + [ruby-dev:28286] + +Tue Feb 7 18:42:00 2006 Yukihiro Matsumoto + + * io.c (rb_write_error2): use fwrite(3) if rb_stderr is not + updated or is already freed. [ruby-dev:28313] + +Mon Feb 6 16:02:51 2006 WATANABE Hirofumi + + * file.c (rb_thread_flock): ERROR_NOT_LOCKED is not an error on Cygwin. + In such situation, flock() should return 0. + +Mon Feb 6 14:36:29 2006 Yukihiro Matsumoto + + * eval.c (error_line): include the class name of a surrounding + method in error position description. + +Mon Feb 6 00:14:57 2006 Yukihiro Matsumoto + + * enum.c (enum_find_index): a new method Enumerable#find_index. + [ruby-talk:178495] + +Sun Feb 5 23:29:31 2006 Tanaka Akira + + * ruby.h (struct RStruct): embed 3 or less elements structs. + (RSTRUCT_LEN): defined for accessing struct members. + (RSTRUCT_PTR): ditto. + + * struct.c: use RSTRUCT_LEN and RSTRUCT_PTR. + (struct_alloc): allocate small structs in embedded format. + (rb_struct_init_copy): ditto. + + * gc.c (gc_mark_children): use RSTRUCT_LEN and RSTRUCT_PTR. + (obj_free): ditto. + + * marshal.c (w_object): use RSTRUCT_LEN and RSTRUCT_PTR. + +Sun Feb 5 21:01:49 2006 Hirokazu Yamamoto + + * numeric.c (fix_to_s): removed workaround for radix 2. Historically, + rb_fix2str could only handle radix 8, 10, 16. (Rev1.37) But for now, + it can handle radix 2..36. [ruby-Bugs#3438] [ruby-core:7300] + +Sun Feb 5 18:49:00 2006 Minero Aoki + + * lib/net/http.rb (add_field, get_fields): keep 1.8.2 + compatibility. This patch is contributed by Rob Pitt. + +Sun Feb 5 16:33:50 2006 Hirokazu Yamamoto + + * lib/mkmf.rb (create_makefile): Kernel#sub! was removed on HEAD. + +Sun Feb 5 14:26:54 2006 Hirokazu Yamamoto + + * lib/pstore.rb: should return default value if name is not found. + [ruby-core:7304] + + * lib/pstore.rb: should raise PStore::Error if not in transaction. + +Sat Feb 4 22:51:43 2006 Tanaka Akira + + * eval.c: apply the FreeBSD getcontext/setcontext workaround + only before FreeBSD 7-CURRENT. + +Sat Feb 4 21:10:06 2006 NAKAMURA Usaku + + * win32/win32.c (LK_ERR): ERROR_NOT_LOCKED is not an error. + In such situation, flock() should return 0. + +Sat Feb 4 15:52:56 2006 Hirokazu Yamamoto + + * numeric.c (fix_to_s): (2**32).to_s(2) fails with exception where + sizeof(int) == 4 < sizeof(long). [ruby-core:7300] + +Sat Feb 4 15:02:05 2006 Yukihiro Matsumoto + + * oniguruma.h: merge Oniguruma 4.0.0 [ruby-dev:28290] + +Fri Feb 3 19:25:53 2006 Hirokazu Yamamoto + + * ruby.h: fixed prototype. + + * ext/syck/rubyext.c: defined symbol ID as global variable as others. + +Fri Feb 3 17:57:02 2006 Yukihiro Matsumoto + + * eval.c: unify ruby_class (for method definition) and ruby_cbase + (for constant reference). + +Fri Feb 3 15:02:10 2006 Hirokazu Yamamoto + + * ext/syck/syck.c (syck_move_tokens): should reset p->cursor or etc + even if skip == 0. This causes buffer overrun. + (ex: YAML.load('--- "..' + '\x82\xA0' * 511 + '"')) + +Fri Feb 3 00:01:31 2006 Hirokazu Yamamoto + + * ext/syck/emitter.c (syck_emitter_write): should not set '\0' on + emitter's marker. if marker points to the end of buffer, this is + buffer overrun. (ex: YAML.dump("." * 12288)) + +Thu Feb 2 17:13:01 2006 NAKAMURA Usaku + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser#get_tk): added + support of :'string' style Symbol. + +Thu Feb 2 16:01:24 2006 Yukihiro Matsumoto + + * eval.c (rb_call0): use TMP_ALLOC() instead of allocating + a temporary array object. + + * eval.c (eval): need not to protect $SAFE value. + [ruby-core:07177] + + * error.c (Init_Exception): change NameError to direct subclass of + Exception so that default rescue do not handle it silently. + +Thu Feb 2 14:45:53 2006 Ville Mattila + + * configure.in: The isinf is not recognized by autoconf + library guesser on solaris 10. [ruby-core:7138] + +Wed Feb 1 22:01:47 2006 Hirokazu Yamamoto + + * configure.in, hash.c (ruby_setenv): use setenv(3) and unsetenv(3) + where they are supported. modifying environ variable seems to + segfault solaris 10. [ruby-core:7276] [ruby-dev:28270] + + * ruby.c (set_arg0): if use setenv(3), environ space cannot be used + for altering argv[0]. + +Tue Jan 31 14:46:28 2006 Yukihiro Matsumoto + + * struct.c (rb_struct_select): update RDoc description. + [ruby-core:7254] + +Tue Jan 31 11:58:51 2006 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: add MultiTkIp#eval and bg_eval. + + * ext/tk/lib/tk/namespace.rb: TkNamespace#eval was enbugged at the + last commit. Now it will return a proper object. + +Tue Jan 31 08:07:02 2006 Yukihiro Matsumoto + + * numeric.c (int_upto): return an enumerator if no block is + attached to the method. + + * numeric.c (int_downto): ditto. + + * numeric.c (int_dotimes): ditto. + + * enum.c (enum_first): new method Enumerable#first to take first n + elements from an enumerable. + + * enum.c (enum_group_by): new method Enumerable#group_by that + groups enumerable values according to their block values. + +Tue Jan 31 00:08:22 2006 Hirokazu Yamamoto + + * ext/syck/rubyext.c (syck_resolver_transfer): workaround for SEGV. + ex: ruby -ryaml -e 'YAML.load("!map:B {}")' [ruby-core:7217] + +Sat Jan 28 07:49:30 2006 Hirokazu Yamamoto + + * lib/rdoc/usage.rb: support "a:0:33" style caller[-1]. In this case + file name is "a:0". I don't know this really happens though... + [ruby-Bugs:3344] + +Thu Jan 26 15:55:52 2006 Yukihiro Matsumoto + + * ext/socket/socket.c: turn on do_not_reverse_lookup by default. + +Wed Jan 25 22:29:04 2006 Nobuyoshi Nakada + + * configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use + system routine if provided. fixed: [ruby-core:07195] + +Sun Jan 22 23:27:13 2006 Go Noguchi + + * lib/test/unit/autorunner.rb (process_args): ignore arguments after + '--' so that test scripts can handle them. fixed: [ruby-dev:28258] + +Sun Jan 22 22:09:52 2006 Tanaka Akira + + * eval.c (POST_GETCONTEXT): define separately from PRE_GETCONTEXT on + IA64 to avoid reusing variable address. + +Sun Jan 22 20:03:35 2006 Tanaka Akira + + * eval.c (ruby_setjmp): define PRE_GETCONTEXT and POST_GETCONTEXT + instead of FUNCTION_CALL_MAY_RETURN_TWICE. + define PRE_GETCONTEXT to clear carry flag for workaround of + FreeBSD/i386 getcontext/setcontext bug. + [ruby-dev:28263] + +Thu Jan 19 22:19:18 2006 Minero Aoki + + * lib/fileutils.rb (mv): should remove file after copying. + [ruby-dev:28223] + +Wed Jan 18 23:37:06 2006 Tanaka Akira + + * eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): don't clobber %l7 of SPARC + if enable-shared. + (ruby_setjmp): call FUNCTION_CALL_MAY_RETURN_TWICE after getcontext + too. + reported by Pav Lucistnik and Marius Strobl. + http://lists.freebsd.org/pipermail/freebsd-sparc64/2006-January/003739.html + +Tue Jan 17 23:59:56 2006 Nobuyoshi Nakada + + * object.c (rb_mod_const_get, rb_mod_const_defined): added optional + flag to search ancestors, which is defaulted to true. + fixed: [ruby-talk:175899] + + * eval.c (rb_mod_method_defined): ditto. + +Tue Jan 17 11:31:47 2006 NAKAMURA Usaku + + * win32/setup.mak (MAKE): workaround for nmake 8. + +Tue Jan 17 11:06:19 2006 NAKAMURA Usaku + + * win32/Makefile.sub: invoke .bat via shell. workaround for nmake 8. + +Mon Jan 16 10:13:38 2006 Hirokazu Yamamoto + + * ext/syck/emitter.c (syck_emit_seq, syck_emit_map, syck_emit_item): + should output complex key mark even if map's key is empty seq/map. + [ruby-core:7129] + +Sat Jan 14 03:38:54 2006 Hirokazu Yamamoto + + * file.c (rb_file_s_chmod): avoid warning where sizeof(int) != + sizeof(void*). + +Fri Jan 13 19:26:15 2006 Hirokazu Yamamoto + + * lib/rdoc/diagram.rb: + - properly quote bare element attributes + - terminates dangling elements (e.g. ,
, , etc) + - converts "CVS" to the more HTML-friendly acronym element + - adds missing type attributes to style elements + + based on Paul Duncan's patch [ruby-core:7028] + + * lib/rdoc/generators/html_generator.rb: ditto. + * lib/rdoc/generators/template/html/hefss.rb: ditto. + * lib/rdoc/generators/template/html/html.rb: ditto. + * lib/rdoc/generators/template/html/kilmer.rb: ditto. + +Thu Jan 12 11:53:08 2006 Hidetoshi NAGAI + + * ext/tk/sample/tkballoonhelp.rb: [bug fix] couldn't add to a widget + which is constructed with TkComposite module. + [new feature] support 'command' option which is called just before + popping up the balloon help. + +Wed Jan 11 00:12:29 2006 Masatoshi SEKI + + * lib/erb.rb (ERB::Compiler): add instance variable @insert_cmd to + change <%='s behavior. + +Tue Jan 10 19:42:33 2006 Tanaka Akira + + * gc.c (garbage_collect): mark ruby_current_node. + if an exception is raised in a finalizer written in C called by + rb_gc_call_finalizer_at_exit, ruby_set_current_source may use + collected ruby_current_node and mark_source_filename may corrupt + memory. + +Tue Jan 10 13:30:34 2006 akira yamada + + * ext/syck/rubyext.c (syck_resolver_transfer): should be able to load + !ruby/object:Bignum syntax 1.8.3 dumped. [ruby-core:6159] + +Tue Jan 10 12:47:41 2006 Hirokazu Yamamoto + + * lib/yaml/rubytypes.rb (Fixnum): Bignum could not be loaded in + ruby 1.8.3/1.8.4. [ruby-core:6115] + + * lib/yaml/rubytypes.rb (Numeric): Subclass of Numeric could not + be dumped properly. [ruby-core:7047] + +Tue Jan 10 12:00:48 2006 Aaron Schrab + + * lib/yaml/rubytypes.rb (Symbol#yaml_new): YAML loading of quoted + Symbols broken. [ruby-Bugs:2535] + +Tue Jan 10 07:26:52 2006 Tanaka Akira + + * gc.c (gc_stress): renamed from always_gc and enabled by default. + (gc_stress_get): new function for GC.stress. + (gc_stress_set): new function for GC.stress=. + +Mon Jan 9 19:58:56 2006 arton + + * ext/zlib/extconf.rb: zlib compiled DLL version 1.2.3 distributed by + http://www.zlib.net/ has zdll.lib. [ruby-dev:28209] + +Mon Jan 9 14:25:00 2006 Hirokazu Yamamoto + + * win32/Makefile.sub (OPTFLAGS): I have experienced trouble on y- flag, + (VisualC++6) so use -O2b2xg- if $(MSC_VER) < 1400. [ruby-core:7040] + +Mon Jan 9 14:25:00 2006 Kero van Gelder + + * lib/webrick/httpservlet/filehandler.rb: fixed typo. [ruby-core:7075] + +Sun Jan 8 14:15:27 2006 Tanaka Akira + + * eval.c (GCC_VERSION_BEFORE): check __INTEL_COMPILER. + Intel C++ Compiler defines __GNUC__. + http://www.intel.com/software/products/compilers/clin/docs/ug_cpp/lin1077.htm + +Sat Jan 7 15:40:07 2006 Nobuyoshi Nakada + + * parse.y (singleton): get rid of segfault on syntax error. + fixed: [ruby-core:07070] + +Sat Jan 7 06:24:18 2006 Tanaka Akira + + * eval.c (rb_fd_isset): compare the result of FD_ISSET with 0 to + avoid FreeBSD bug. FreeBSD defines FD_ISSET as just a bitmap of + unsigned long. So returning the value from rb_fd_isset discards + upper 32bits on LP64 environment. + http://www.freebsd.org/cgi/query-pr.cgi?pr=ia64/91421 + +Fri Jan 6 02:20:18 2006 Tanaka Akira + + * configure.in: don't force getcontext on IA64. + + * eval.c (ruby_setjmp): add an argument for just before getcontext. + (THREAD_SAVE_CONTEXT): call rb_thread_save_context just + before getcontext. + [ruby-dev:28205] + +Sun Jan 1 15:28:46 2006 Tanaka Akira + + * missing.h (isinf): avoid macro expansion + "extern int isinf(double);" to + "extern int ((sizeof(double)==sizeof(float))?_Isinff(double):_Isinf(double));" on + HP-UX. + +Sun Jan 1 14:42:54 2006 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_seekdir): should not segfault even if passed + the location which rb_w32_telldir didn't return. (and should change + `bits' position) [ruby-core:7035] + + * win32/dir.h: ditto. (stores `loc' instead of `bitpos') + + * test/ruby/test_dir.rb: added. + +Sat Dec 31 22:57:00 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_save_context): should not recycle scope object used + in a thread. fixed: [ruby-dev:28177] + +Sat Dec 31 19:50:38 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c: attribute name was truncated with Rev1.64. + +Sat Dec 31 11:53:16 2005 Hirokazu Yamamoto + + * lib/generator.rb: (Generator#initialize): should kill @loop_thread + before starting new thread. (occurs when called via Generator#rewind) + [ruby-dev:28184] + +Fri Dec 30 18:22:42 2005 Nobuyoshi Nakada + + * gc.c (garbage_collect): mark objects referred from aborting threads. + [ruby-dev:28190] + + * win32/Makefile.sub: VC++8 support. + +Fri Dec 30 15:17:35 2005 Hirokazu Yamamoto + + * lib/generator.rb (Generator#initialize): ensured to stop @loop_thread. + Mr. Tanaka pointed out one Thread.pass is not enough. [ruby-dev:28185] + +Fri Dec 30 12:20:57 2005 Hirokazu Yamamoto + + * lib/generator.rb (Generator#initialize): fixed dead lock. this occurred + when end? was called before @loop_thread was stopped. [ruby-core:7029] + +Fri Dec 30 01:04:52 2005 Hirokazu Yamamoto + + * lib/generator.rb: should work with another thread. (more robust code) + [ruby-dev:28177] + +Thu Dec 29 23:59:37 2005 Nobuyoshi Nakada + + * eval.c (rb_gc_mark_threads): keep unmarked threads which won't wake + up alone, and mark threads in the loading table. [ruby-dev:28154] + + * eval.c (rb_gc_abort_threads), gc.c (gc_sweep): kill unmarked + threads. [ruby-dev:28172] + +Thu Dec 29 17:02:07 2005 Tanaka Akira + + * test/ruby/envutil.rb (EnvUtil.rubybin): search "ruby" instead of + "miniruby". [ruby-dev:28140] + +Thu Dec 29 14:35:10 2005 Yukihiro Matsumoto + + * eval.c (rb_mod_define_method): should save safe_level in the + proc object. [ruby-dev:28146] + +Thu Dec 29 11:22:34 2005 Hirokazu Yamamoto + + * lib/generator.rb: reimplemented Generator class with Thread instead of + callcc, in order to fix memory leak. [ruby-dev:28142] + +Wed Dec 28 14:10:05 2005 Tanaka Akira + + * ia64.s: remove .pred.safe_across_calls directive. + reported by WATANABE Tetsuya. [ruby-dev:28141] + +Wed Dec 28 01:32:39 2005 Tanaka Akira + + * eval.c (struct thread): add bstr_max. + (rb_thread_save_context): use realloc instead of REALLOC_N + to avoid GC. + +Tue Dec 27 23:59:53 2005 Nobuyoshi Nakada + + * lib/optparse.rb (CompletingHash#match): fix for 1.9. + +Tue Dec 27 16:59:52 2005 Yukihiro Matsumoto + + * test/drb/drbtest.rb (DRbService::self.ext_service): increase + timeout limit. a patch from Kazuhiro NISHIYAMA + . [ruby-dev:28132] + +Tue Dec 27 14:17:55 2005 Tanaka Akira + + * configure.in: define IA64 for portability. (HP aC++/ANSI C doesn't + define __ia64__.) + don't check libunwind stuff. + check __libc_ia64_register_backing_store_base. + + * defines.h: declare rb_ia64_bsp and rb_ia64_flushrs. + (flush_register_windows): call rb_ia64_flushrs on IA64. + + * ia64.s: new file for IA64. + it is separated from C program files because + Intel C++ Compiler for IA64 doesn't support inline assembly. + + * common.mk (ia64.$(OBJEXT)): new target. + + * ruby.h (RUBY_INIT_STACK): defined. + (ruby_init_stack): declared for RUBY_INIT_STACK. + + * main.c (main): precedes RUBY_INIT_STACK before ruby_init. + + * gc.c (rb_gc_register_stack_start): new global variable on IA64. + (garbage_collect): simplify register stack marking code. + don't use libunwind. + (Init_stack): initialize rb_gc_register_stack_start. + (ruby_init_stack): new function for RUBY_INIT_STACK. + + * eval.c (struct thread): add bstr_pos member for original position of + register stack. + (rb_thread_save_context): simplify register stack saving code. + don't use libunwind. + (rb_thread_restore_context_0): new function. moved from + rb_thread_restore_context except the stack position checking code. + don't use libunwind for IA64 register stack. + (register_stack_extend): new function. + (stack_extend): make it self-recursive with + the stack position checking code in old rb_thread_restore_context. + (rb_thread_restore_context): just call stack_extend. + (flush_register_windows): removed. + + [ruby-dev:28127] + +Tue Dec 27 14:09:39 2005 Minero Aoki + + * process.c: new method Process.exec. [ruby-dev:28107] + +Tue Dec 27 08:22:15 2005 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket#post_connection_check): + treat wildcard character in commonName. [ruby-dev:28121] + +Mon Dec 26 08:50:36 2005 Yukihiro Matsumoto + + * eval.c (ev_const_get): fixed a bug in constant reference during + instance_eval. [yarv-dev:707] + + * eval.c (ev_const_defined): ditto. + + * lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from + Joel VanderWerf . + [ruby-talk:165285] [ruby-core:6995] + +Fri Dec 23 10:30:23 2005 Yukihiro Matsumoto + + * ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from + Kailden . [ruby-core:06984] + +Wed Dec 21 16:47:35 2005 Hirokazu Yamamoto + + * file.c (w32_io_info): should return handle because FileIndex is + valid only while file is open. [ruby-dev:28088] + +Wed Dec 21 12:12:21 2005 Tanaka Akira + + * test/pathname/test_pathname.rb (test_kernel_open): use + File.identical?. + [ruby-talk:171804] + +Tue Dec 20 22:41:17 2005 Nobuyoshi Nakada + + * eval.c (eval_under_i): evaluate source in caller's frame. + [ruby-dev:28076] + +Tue Dec 20 12:53:23 2005 why the lucky stiff + + * ext/syck/rubyext.c (syck_emitter_reset): to ensure compatibility + with previous Ruby versions, documents are no longer headless. + +Tue Dec 20 12:33:01 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c (syck_node_transform): ruby object holding + explicitly freed SyckNode caused SEGV. [ruby-dev:28067] + + ... I think syck GC problem was solved now! + +Tue Dec 20 01:46:48 2005 Tanaka Akira + + * io.c (rb_f_backquote): fix a GC problem on + IA64 with gcc 4.0.3 20051216 (prerelease) -O3. + +Mon Dec 19 23:32:39 2005 Nobuyoshi Nakada + + * Makefile.in (XCFLAGS): separated as well as win32/Makefile.sub. + + * main.c (always_gc): dllimport is required for VC to import a DLL + symbol. fixed: [ruby-dev:28051] + + * parse.y (rb_symname_p): fixed wrong validation. [ruby-dev:28047] + +Mon Dec 19 23:09:24 2005 Hirokazu Yamamoto + + * st.c: uses malloc instead of xmalloc to avoid GC. syck uses st_insert + in gram.c to insert node from rb_syck_bad_anchor_handler into + SyckParser's hash table. if GC occurs in st_insert, it's not under + SyckParser's mark system yet. so RString can be released wrongly. + + * ext/syck/syck.h (S_FREE): small hack. no need to check if pointer is + NULL or not before S_FREE. + + * ext/syck/rubyext.c (syck_parser_assign_io): rb_check_string_type can + return new RString. if so, it becomes unreachable from GC after + returns syck_parser_assign_io, and can be freed by GC. (dangling + in syck io system) so extends its life time till syck_parse is called. + + * ext/syck/rubyext.c (syck_parser_s_alloc): always allocates bonus, + so no need to check if NULL, and "volatile VALUE hash" + is not needed. (bonus->port was not protected in syck_emitter_reset) + + * ext/syck/rubyext.c (syck_mark_parser): ditto. + + * ext/syck/rubyext.c (syck_parser_load): ditto. + + * ext/syck/rubyext.c (syck_parser_load_documents): ditto. + + * ext/syck/rubyext.c (syck_emitter_s_alloc): ditto. + + * ext/syck/rubyext.c (syck_mark_emitter): ditto. + + * ext/syck/rubyext.c (syck_emitter_reset): ditto. + + * ext/syck/rubyext.c (syck_scalar_value_set): "should set newly + allocated memory instead of RString's internal storage" stuff again. + by this, should call syck_free_node instead of rb_syck_free_node. + + * ext/syck/rubyext.c (syck_node_type_id_set): ditto. + + ... I believe syck GC problem was solved by this. + +Mon Dec 19 12:20:59 2005 Tanaka Akira + + * eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): activate only + before gcc 4.0.3 on SPARC and IA64. + +Mon Dec 19 11:37:47 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c: sorry, I reverted my "should set newly + allocated memory instead of RString's internal storage" stuff. + node allocated in rubyext.c seems to be freed by rb_syck_free_node + not syck_free_node, and it won't free data.str->ptr and type_id. + + (I still think this is unsafe because RString(foo)->ptr becomes + dangling pointer when RString is modified or freed, but anyway + I misunderstood, so go back to original code for now) + +Sat Dec 17 21:50:41 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c (syck_emitter_reset): should initialize + emitter->bonus->oid. otherwise rb_gc_mark crashes. + + * ext/syck/rubyext.c (syck_mark_parser): should mark anchor nodes + because they hold ruby objects. (ie: rb_syck_bad_anchor_handler) + +Sat Dec 17 11:00:17 2005 Yukihiro Matsumoto + + * ext/syck/rubyext.c (rb_syck_compile): avoid potential memory + leak. + + * ext/syck/rubyext.c (syck_set_ivars): avoid potential memory + leak by explicit symbol allocation. + +Sat Dec 17 03:57:01 2005 Tanaka Akira + + * bignum.c (rb_big_rshift): fix a GC problem on + IA64 with gcc 4.0.3 20051216 (prerelease). + +Sat Dec 17 03:30:23 2005 Tanaka Akira + + * eval.c (bmcall): fix a GC problem by tail call on + IA64 with gcc 4.0.3 20051216 (prerelease). + +Fri Dec 16 17:53:45 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c (rb_syck_compile): fixed memory leak. + + * ext/syck/rubyext.c: should protect global variable from GC. + +Fri Dec 16 11:44:43 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c (syck_resolver_tagurize): fixed memory leak. + + * ext/syck/rubyext.c (syck_node_type_id_set): should set newly + allocated memory instead of RString's internal storage. + + * ext/syck/rubyext.c (syck_scalar_value_set): ditto. + + ... these fixes won't fix [ruby-dev:27839]. more work is needed. + +Fri Dec 16 04:38:55 2005 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator::method_missing): should delegate + block as well. + +Thu Dec 15 19:57:12 2005 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to + use Tempfile. A fix from Zev Blut . + [ruby-core:06076] + + * string.c: remove global functions work on $_. + +Thu Dec 15 12:35:14 2005 Yukihiro Matsumoto + + * lib/tmpdir.rb: merged RDoc patch from Eric Hodel . [ruby-core:06894] + +Thu Dec 15 01:33:31 2005 Tanaka Akira + + * ext/zlib/zlib.c (zstream_run): fix a GC problem by tail call on + x86_64 with gcc 4.0.3 20051111 (prerelease) (Debian 4.0.2-4) + +Wed Dec 14 23:50:20 2005 Nobuyoshi Nakada + + * lib/rdoc/parsers/parse_c.rb (find_class_comment): fix for class + document with prototypes. [ruby-core:06863] + +Wed Dec 14 23:39:53 2005 Nobuyoshi Nakada + + * dir.c (has_magic): glob names contain alphabets to enable case fold + search. [ruby-dev:27735] + + * dir.c (Init_Dir): FNM_SYSCASE which is default case fold flag. + [ruby-dev:23296] + +Wed Dec 14 12:01:26 2005 Tanaka Akira + + * marshal.c (r_object0): fix a GC problem for reading a bignum on + IA64 with gcc 3.3.5 (Debian 1:3.3.5-13). + +Tue Dec 13 12:23:47 2005 Tanaka Akira + + * re.c (rb_reg_regcomp): fix a GC problem on x86_64 with + gcc 3.3.5 (Debian 1:3.3.5-13). + +Tue Dec 13 01:44:16 2005 Tanaka Akira + + * array.c (rb_ary_diff): fix a GC problem on IA64 with + gcc 3.3.5 (Debian 1:3.3.5-13). + When rb_ary_push is called, there was no register which contains + `hash' but `&RHASH(hash)->tbl' instead. + +Tue Dec 13 00:08:09 2005 Tanaka Akira + + * sprintf.c (rb_str_format): fix a GC problem. + [ruby-dev:28001] + +Mon Dec 12 15:51:22 2005 GOTOU Yuuzou + + * test/openssl/test_ssl.rb (test_parallel): call GC.start to close + unused files. [ruby-dev:27981] + +Mon Dec 12 09:58:09 2005 Yukihiro Matsumoto + + * range.c (range_cover): new method Range#cover? added. the + method name might be changed. thanks to takano32 at + http://www.rubyist.net/~matz/20051210.html#c08 for name + suggestion. [ruby-talk:167182] + +Mon Dec 12 00:33:56 2005 Yukihiro Matsumoto + + * ext/digest/digest.c (rb_digest_base_s_digest): add volatile to + protect temporary context object. [ruby-dev:27979] + + * ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should + be called before actual variable initialization. + [ruby-dev:27986] + +Sun Dec 11 23:54:07 2005 Hidetoshi NAGAI + + * ext/tk/*: update to support libraries in ActiveTcl8.4.12.0 + (see ext/tk/ChangeLog.tkextlib). + + * ext/tk/sample/scrollframe.rb: add a new sample. + +Sun Dec 11 22:07:58 2005 Masatoshi SEKI + + * test/rinda/test_rinda.rb (test_remote_array_and_hash): pseudo remote + objects are protected against GC. [ruby-dev:27911] + +Sat Dec 10 01:06:06 2005 Keiju Ishitsuka + + * lib/matrix.rb: add Matrix#determinant_e, Matrix#rank_e. + [ruby-dev:27820] and related thread. + +Sat Dec 10 00:31:42 2005 Nobuyoshi Nakada + + * eval.c (calling_scope_t): gave names to magic numbers for rb_call(). + [ruby-dev:27978] + +Fri Dec 9 23:31:02 2005 Nobuyoshi Nakada + + * lib/rexml/encoding.rb (encoding=): give priority to particular + conversion to iconv. [ruby-core:06520] + +Fri Dec 9 23:16:51 2005 Nobuyoshi Nakada + + * range.c (range_include): return false unless included in numeric + range. fixed: [ruby-dev:27975] + +Thu Dec 8 02:07:19 2005 Nobuyoshi Nakada + + * eval.c (umethod_bind): adjust invoking class for module method. + [ruby-dev:27964] + +Thu Dec 8 00:40:52 2005 Yukihiro Matsumoto + + * eval.c (call_trace_func): klass parameter should be a + class/module that defines calling method. [ruby-talk:169307] + +Wed Dec 7 17:10:27 2005 Kazuhiro NISHIYAMA + + * sprintf.c (rb_f_sprintf): [ruby-dev:27967] + +Wed Dec 7 16:39:18 2005 Yukihiro Matsumoto + + * range.c (range_include): use discrete membership for non Numeric + values, for example, String. + + * numeric.c (num_scalar_p): new method. [ruby-dev:27936] + + * lib/complex.rb (Complex#scalar?): ditto. + +Wed Dec 7 15:31:35 2005 Yukihiro Matsumoto + + * sprintf.c (rb_str_format): integer overflow check added. + + * sprintf.c (GETASTER): ditto. + +Wed Dec 7 01:02:04 2005 Hidetoshi NAGAI + + * ext/tk/README.macosx-aqua: [new document] tips to avoid the known + bug on platform specific dialogs of Tcl/Tk Aqua on MacOS X. + + * ext/tk/tcltklib.c: fix bug on switching threads and waiting on the + deleted interpreter on vwait and tkwait command. + + * ext/tk/lib/multi-tk.rb: kill the meaningless loop for the deleted Tk + interpreter. + + * ext/tk/sample/demos-jp/image3.rb: [bug fix] wrong argument. + + * ext/tk/sample/demos-en/image3.rb: ditto. + + * ext/tk/sample/demos-jp/menu.rb: fix message for MacOS X. + + * ext/tk/sample/demos-jp/menu8x.rb: ditto. + + * ext/tk/sample/demos-en/menu.rb: ditto. + +Tue Dec 6 16:48:40 2005 Yukihiro Matsumoto + + * gc.c (ruby_xmalloc2): change check condition for integer + overflow. [ruby-dev:27399] + + * gc.c (ruby_xrealloc2): ditto. + +Tue Dec 6 16:37:57 2005 Yuya Nishida + + * eval.c (exec_under): avoid accessing ruby_frame->prev. + [ruby-dev:27948] + +Fri Dec 2 19:06:06 2005 Hirokazu Yamamoto + + * dir.c (Compare): should not fold double byte alphabet on win9x. + +Thu Dec 1 00:50:33 2005 Nobuyoshi Nakada + + * eval.c (rb_funcall2): allow to call protected methods. + fixed: [ruby-dev:27890] + +Wed Nov 30 23:52:17 2005 Nobuyoshi Nakada + + * parse.y (struct parser_params): fields common to ripper must be + placed at each same offset. + + * parse.y (NEWHEAP, ADD2HEAP): set count after pointer was set. + fixed: [ruby-dev:27896] + +Wed Nov 30 13:43:07 2005 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-expr-beg): support $! at the end of + expression. [ruby-dev:27868] + +Mon Nov 28 20:24:22 2005 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#object_address_group): mask an address with + word size. + +Tue Nov 29 23:57:05 2005 Nobuyoshi Nakada + + * parse.y (struct parser_params): heap must be placed at same offset + also in ripper.y. fixed: [ruby-dev:27846] + + * parse.y (yycompile): prevent vparser from tail call optimization. + fixed: [ruby-dev:27851] + + * parse.y (parser_mark): value needs to be marked. + fixed: [ruby-dev:27845] + +Tue Nov 29 22:45:30 2005 Masatoshi SEKI + + * lib/drb/observer.rb (notify_observers): follow change of observer.rb. + fixed: [ruby-core:6796] + +Mon Nov 28 20:24:22 2005 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#object_address_group): adjust address format. + +Mon Nov 28 18:55:22 2005 NAKAMURA Usaku + + * ext/socket/socket.c (init_inetsock_internal): remove setting + SO_REUSEADDR option on server socket on Cygwin. + fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ]) + +Mon Nov 28 13:11:45 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_strerror): remove all CR and LF. (avoid broken + error message on bccwin32 + winsock) + +Mon Nov 28 09:15:50 2005 Hirokazu Yamamoto + + * lib/mkmf.rb (create_makefile): should not change sodir with + dir.gsub!. (bccwin32 failed to install third party extensions) + [ruby-dev:27834] + +Sun Nov 27 05:37:20 2005 Tanaka Akira + + * lib/pathname.rb: use File.basename to decompose pathnames. + experimental Windows support. + +Sun Nov 27 00:56:13 2005 NAKAMURA, Hiroshi + + * lib/wsdl/xmlSchema/complexContent.rb: missing + ComplexContent#elementformdefault method. + +Sat Nov 26 19:57:45 2005 WATANABE Hirofumi + + * dln.c (conv_to_posix_path): should initialize posix. + +Fri Nov 25 20:34:56 2005 Yukihiro Matsumoto + + * lib/xmlrpc/datetime.rb (DateTime::to_a): comparison with non + array-convertible object must return false. + +Fri Nov 25 14:34:09 2005 Yukihiro Matsumoto + + * range.c (range_max): treat end exclusion without iteration if + the end value is an integer. [ruby-talk:167433] + +Fri Nov 25 12:52:57 2005 Kouhei Sutou + + * lib/rss/rss.rb: added backward compatibility codes. + * lib/rss/parser.rb: ditto. + * test/rss/test_parser.rb: ditto. + * test/rss/test_2.0.rb: ditto. + + * test/rss/test_content.rb: use #__send__ instead of #funcall for + no private method. + +Fri Nov 25 12:39:56 2005 Kouhei Sutou + + * lib/rss/rss.rb: improved type conversion. + * lib/rss/1.0.rb: ditto. + * lib/rss/0.9.rb: ditto. + * lib/rss/2.0.rb: ditto. + * lib/rss/image.rb: ditto. + * lib/rss/syndication.rb: ditto. + + * test/rss/test_2.0.rb: added type conversion tests. + * test/rss/test_accessor.rb: ditto. + * test/rss/test_to_s.rb: ditto. + * test/rss/test_syndication.rb: ditto. + * test/rss/test_setup_maker_2.0.rb: ditto. + * test/rss/test_setup_maker_1.0.rb: ditto. + * test/rss/test_setup_maker_0.9.rb: ditto. + * test/rss/test_maker_sy.rb: ditto. + * test/rss/test_maker_image.rb: ditto. + * test/rss/test_maker_2.0.rb: ditto. + * test/rss/test_maker_0.9.rb: ditto. + * test/rss/test_image.rb: ditto. + + * test/rss/test_maker_1.0.rb: use assert instead of assert_equal. + + * test/rss/rss-assertions.rb: improved type conversion assertions. + +Fri Nov 25 10:38:20 2005 Kouhei Sutou + + * lib/rss/image.rb: added Image prefix. + + * lib/rss/maker/image.rb: ditto. + +Fri Nov 25 10:33:02 2005 Kouhei Sutou + + * test/rss/test_2.0.rb: added RSS 2.0 tests. + + * test/rss/rss-assertions.rb: extended XML stylesheet assertion. + + * lib/rss/0.9.rb: added initialize method. + + * test/rss/test_1.0.rb: cleanup. + +Fri Nov 25 10:29:48 2005 Yukihiro Matsumoto + + * range.c (range_min): use <=> comparison rather than iteration. + [ruby-talk:167420] + + * range.c (range_max): ditto. + +Thu Nov 24 01:31:44 2005 Hirokazu Yamamoto + + * file.c (w32_io_info): CreateFile failed on Win9x if file was already + opened. (FILE_SHARE_READ was needed, but actually I don't understand + the flags of CreateFile well...) + +Wed Nov 23 23:52:35 2005 Yukihiro Matsumoto + + * numeric.c (num_div): use floor rather than rb_Integer(). + [ruby-dev:27674] + +Wed Nov 23 22:34:15 2005 Kouhei Sutou + + * lib/rss/parser.rb: added entity handling type predicate. + * lib/rss/rexmlparser.rb: ditto. + * lib/rss/xmlparser.rb: ditto. + * lib/rss/xmlscanner.rb: ditto. + + * lib/rss/xmlscanner.rb: more robust entity handling. + + * test/rss/test_parser.rb: added an entity handling test. + +Wed Nov 23 20:59:01 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add Tk.pkgconfig_list and Tk.pkgconfig_get + [Tk8.5 feature]. + + * ext/tk/lib/tk/text.rb: supports new indices modifiers on a Text + widget [Tk8.5 feature]. + + * ext/tk/lib/tk/virtevent.rb: add TkNamedVirtualEvent. + + * ext/tk/lib/tk/autoload.rb: ditto. + + * ext/tk/lib/tk/event.rb: add :data key for virtual events [Tk8.5 + feature]. + +Wed Nov 23 18:52:45 2005 Hirokazu Yamamoto + + * file.c (w32_io_info): should not call GetFileInformationByHandle + for pipe. + + * file.c (w32_io_info): checks return value from rb_w32_get_osfhandle. + + * file.c (w32_io_info): now can identify directory on WinNT. + +Wed Nov 23 18:46:53 2005 Kouhei Sutou + + * lib/rss/: use #__send__ instead of #send. + * test/rss/: ditto. + +Wed Nov 23 18:32:56 2005 Kouhei Sutou + + * test/rss/test_taxonomy.rb: use #reject directory. + +Wed Nov 23 18:26:00 2005 Kouhei Sutou + + * lib/rss/taxonomy.rb: changed class or module prefix to + Taxonomy from Taxo. + * lib/rss/maker/taxonomy.rb: ditto. + +Wed Nov 23 18:21:11 2005 Kouhei Sutou + + * lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS + Maker. + * lib/rss/taxonomy.rb: supported RSS Maker. + * lib/rss/maker.rb: added taxonomy module support. + + * lib/rss/rss.rb: adjusted to other element API. + * lib/rss/1.0.rb: adjusted to other element API but backward + compatibility is reserved. + * lib/rss/0.9.rb: ditto. + + * test/rss/test_maker_taxo.rb: added test case for taxonomy module + for RSS Maker. + * test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic. + + * test/rss/test_setup_maker_1.0.rb: added backward compatibility + test. + * test/rss/test_setup_maker_0.9.rb: ditto. + * test/rss/test_setup_maker_2.0.rb: ditto. + + * test/rss/rss-testcase.rb: added convenience method for setting + up taxo:topic. + * test/rss/rss-assertions.rb: added assertion for taxo:topic. + + * sample/rss/blend.rb: followed new API. + +Wed Nov 23 17:42:24 2005 Kouhei Sutou + + * lib/rss/rss.rb: fixed a indentation bug. + + * lib/rss/taxonomy.rb: fixed #to_s bug. + + * test/rss/test_taxonomy.rb: added a #to_s test. + +Wed Nov 23 03:40:49 2005 Guy Decoux + + * re.c (KR_REHASH): should cast to unsigned for 64bit CPU. + [ruby-core:06721] + +Wed Nov 23 07:26:44 2005 GOTOU Yuuzou + + * ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid. + + * ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use + OPENSSL_malloc to allocate X509V3_CTX. + + * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use + X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which + values are placed in separate section). + + * test/openssl/test_x509ext.rb: new file. + +Wed Nov 23 01:22:57 2005 Nobuyoshi Nakada + + * file.c (test_identical): test if two files are identical. + + * file.c (rb_f_test): support DOSISH systems where st_ino is not + reliable. fixed: [ruby-core:06672] + + * win32.h, win32.c (rb_w32_osid): check the running platform. + +Tue Nov 22 23:52:06 2005 Nobuyoshi Nakada + + * lib/optparse.rb: match incomplete (in current enconding) multibyte + string. http://inamode6.tokuhirom.dnsalias.org/show/1551 + +Tue Nov 22 18:36:11 2005 Hirokazu Yamamoto + + * win32/win32.c (winnt_stat): set mapped errno instead of ENOENT. + +Tue Nov 22 14:36:54 2005 NAKAMURA Usaku + + * file.c (rb_file_s_basename): skip slashes just after UNC top slashes. + + * test/ruby/test_path.rb (test_dirname, test_basename): follow new + spec. and add new tests. + +Tue Nov 22 13:30:15 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_stat): Dir.chdir('//server/shared'); + p Dir.glob('*') should work on WinNT. (implemented our own + stat(2) on WinNT) [ruby-list:41552] [ruby-dev:27711] + +Tue Nov 22 02:31:53 2005 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE + is not defined). + +Tue Nov 22 01:45:21 2005 Nobuyoshi Nakada + + * file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but + DOSISH is not. fixed: [ruby-dev:27797] + +Mon Nov 21 22:50:48 2005 Nobuyoshi Nakada + + * file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without path + should not be splitted. fixed: [ruby-dev:27776] [ruby-dev:27786] + + * parse.y (dsym): prohibit empty symbol literal by interpolation. + fixed: [ruby-talk:166529] + +Mon Nov 21 16:03:48 2005 Nobuyoshi Nakada + + * win32/setup.mk: findstr doesn't exist on win9x. + fixed: [ruby-dev:27756] + +Sun Nov 20 21:39:27 2005 K.Kosako + + * regparse.c (fetch_token_in_cc): tok->escaped should be + initialized. [ruby-dev:27763] + +Sun Nov 20 22:34:06 2005 Nobuyoshi Nakada + + * parse.y (rb_symname_p): [ not followed by ] is not valid symbol. + fixed: [ruby-talk:166520] + +Sat Nov 19 19:57:54 2005 Yukihiro Matsumoto + + * lib/fileutils.rb (FileUtils::ln): ln documentation fix. + [ruby-core:06661] + +Sat Nov 19 08:19:38 2005 Zach Dennis + + * ext/socket/socket.c: Socket Documentation. [ruby-core:6552] + +Sat Nov 19 07:34:32 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/font.rb: remove dependency on Ruby's version (1.8 + or 1.9). + + * ext/tk/lib/tkextlib/ICONS/icons.rb: ditto. + + * ext/tk/sample/tkextlib/treectrl/demo.rb: ditto. + +Fri Nov 18 18:07:05 2005 NAKAMURA Usaku + + * file.c (rb_file_s_dirname): should use skipprefix for UNC path. + pointed out by nobu ([ruby-dev:27744]). fixed: [ruby-core:5076] + +Fri Nov 18 17:35:09 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: add restriction to access the entried + command table and manipulate other IPs (for reason of security). + Now, a IP object can be controlled by only its master IP or the + default IP. + + * ext/tk/lib/remote-tk.rb: add restriction to manipulate. + + * ext/tk/tcltklib.c (ip_is_slave_of_p): add TclTkIp#slave_of?(ip) + to check manipulability. + + * ext/tk/lib/tk.rb: bug fix on handling of Tcl's namespaces. + + * ext/tk/lib/tk/namespace.rb: ditto. + +Fri Nov 18 16:47:33 2005 NAKAMURA Usaku + + * file.c (rb_file_s_dirname): added checks for some patterns with drive + letter. fixed: [ruby-dev:27738] + + * test/ruby/test_path.rb (test_dirname): added tests for above + patterns. + +Fri Nov 18 12:19:16 2005 Hirokazu Yamamoto + + * win32/win32.h (S_IFIFO): r,w = IO.pipe; r.stat.pipe? now + returns true on VisualC++6. + +Thu Nov 17 17:58:00 2005 Kouhei Sutou + + * lib/rss/1.0.rb: added convenience method 'resources'. + + * lib/rss/taxonomy.rb: ditto. + + * test/rss/rss-assertions.rb: added test for 'resources'. + + * test/rss/test_taxonomy.rb: ditto. + +Thu Nov 17 17:53:30 2005 Kouhei Sutou + + * lib/rss/taxonomy.rb: implemented taxonomy module. + + * test/rss/test_taxonomy.rb: added tests for taxonomy support. + +Thu Nov 17 17:40:19 2005 Kouhei Sutou + + * lib/rss/1.0.rb: added rdf:Bag. + +Thu Nov 17 13:52:00 2005 Kouhei Sutou + + * lib/rss/rss.rb: removed needless argument 'prefix'. + + * lib/rss/parser.rb: ditto. + +Wed Nov 16 23:24:17 2005 Nobuyoshi Nakada + + * common.mk (static-ruby): overridable. + + * ext/extmk.rb (parse_args): force to link extensions statically only + if static is given for extstatic. + + * ext/extmk.rb (RUBY, RUBYW): overridable. + +Wed Nov 16 01:29:31 2005 Kouhei Sutou + + * lib/rss/trackback.rb: added TrackBack prefix. + + * lib/rss/maker/trackback.rb: ditto. + +Wed Nov 16 01:26:13 2005 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.5 -> 0.1.6. + + * test/rss/test_version.rb (RSS::TestVersion#test_version): ditto. + +Tue Nov 15 23:54:24 2005 Nobuyoshi Nakada + + * file.c (file_load_ok): eaccess() returns 0 on success. + fixed: [ruby-dev:27713] + +Tue Nov 15 16:36:03 2005 Hirokazu Yamamoto + + * array.c (rb_ary_fill): previous commit disabled this usage: + + a = [0,1,2,3,4,5,6,7,8,9] + a.fill {|i| a[i] * 10} #=> [nil, nil, ...., nil] + + previous commit has the advantage of early garbage collection, but + potentially this would break some script. so I reverted behavior. + +Tue Nov 15 16:15:23 2005 Yukihiro Matsumoto + + * file.c (file_load_ok): use eaccess() instead of actually opening + the file. [ruby-talk:156378] + + * lib/jcode.rb (String::reverse): add new methods. + [ruby-list:41245] + +Tue Nov 15 15:49:34 2005 Hirokazu Yamamoto + + * array.c (rb_ary_fill): tail elements were vanished when the middle + part of array was filled. (ie: [0,1,2,3,4].fill(-1,2,1) => [0,1,-1]) + + * test/ruby/test_array.rb (test_fill): added. + +Tue Nov 15 14:39:16 2005 Yukihiro Matsumoto + + * array.c (rb_ary_fill): should adjust array length correctly when + an array is expanded in the fill process. [ruby-core:06625] + +Mon Nov 14 23:49:57 2005 Nobuyoshi Nakada + + * file.c (rb_file_s_readlink): ERANGE will occur only on GPFS. + [ruby-dev:27699] + +Mon Nov 14 17:36:22 2005 Yukihiro Matsumoto + + * array.c (rb_ary_first): RDoc update from Daniel Berger + . [ruby-core:06577]. + +Sun Nov 13 10:55:24 2005 Minero Aoki + + * lib/uri/common.rb (escape): regard second argument as a + character set. [ruby-dev:27692] + +Sat Nov 12 08:36:40 2005 Nobuyoshi Nakada + + * configure.in, eval.c, intern.h: check fd_mask type. + + * configure.in (socketpair): need to be checked. + +Fri Nov 11 19:53:47 2005 Hirokazu Yamamoto + + * eval.c, intern.h: failed to compile where NFDBITS is defined but + howmany() is not defined. [ruby-dev:27680] + + * io.c (is_socket): failed to compile where S_ISSOCK is not defined. + + * io.c (pipe_open): failed to compile where socketpair is not supported. + +Fri Nov 11 08:20:56 2005 Nobuyoshi Nakada + + * Makefile.in (OUTFLAG): keep trailing spaces. [ruby-dev:27666] + + * mkconfig.rb: substitution references added. + +Fri Nov 11 07:39:49 2005 Hirokazu Yamamoto + + * configure.in: undef HAVE_LINK on BeOS. (link(2) always returns + EINVAL, and this causes error in test/fileutils.) + + * file.c: override chown(2) and fchown(2) on BeOS. (these functions + should not change user/group id if -1 is passed as corresponding + argument, and this causes error in test/fileutils too) + [ruby-dev:27672] + +Thu Nov 10 21:05:03 2005 Nobuyoshi Nakada + + * lib/shellwords.rb: fix for blank but not empty string. + fixed: [ruby-dev:27663] + +Wed Nov 9 08:39:38 2005 Nobuyoshi Nakada + + * lib/shellwords.rb: refactored. [ruby-core:06581] + +Tue Nov 8 17:35:53 2005 Hirokazu Yamamoto + + * intern.h, eval.c (rb_thread_signal_raise): constified. + + * signal.c: cosmetic change. + +Tue Nov 8 15:32:27 2005 GOTOU Yuuzou + + * lib/drb/ssl.rb (DRb::SSLConfig#accept): fixed typo. + [ruby-dev:27560] [ruby-core:4627] + +Mon Nov 7 20:54:57 2005 Nobuyoshi Nakada + + * ext/iconv/iconv.c: iconvctl() support. [EXPERIMENTAL] + +Mon Nov 7 16:23:23 2005 NAKAMURA Usaku + + * ext/openssl/ossl.h: need to include winsock2.h before including + windows.h by some openssl headers. + +Mon Nov 7 13:43:51 2005 Hidetoshi NAGAI + + * ext/tk/stubs.c (_nativethread_consistency_check): use simpler + (low cost) way to check whether the Tcl interpreter was compiled + with threads enabled of not. + + * ext/tk/tcltklib.c: reduce warnings. + + * ext/tk/tkutil/tkutil.c: ditto. + +Mon Nov 7 00:06:12 2005 Hirokazu Yamamoto + + * lib/yaml.rb: removed :nodoc: to generate Kernel doc. [ruby-core:6324] + +Sun Nov 6 23:39:13 2005 Nobuyoshi Nakada + + * ext/iconv/iconv.c (Iconv::BrokenLibrary): exception when detected a + bug of underlying library. + +Sun Nov 6 21:43:22 2005 Hirokazu Yamamoto + + * ext/tk/stubs.c (ruby_tcl_create_ip_and_stubs_init): should touch + interpreter after initialization is done. [ruby-dev:27638] + +Sun Nov 6 20:13:27 2005 Nobuyoshi Nakada + + * file.c (rb_file_s_readlink): readlink(2) on AIX fails with ERANGE if + buffer size is less than required. fixed: [ruby-dev:27634] + +Sat Nov 5 13:42:50 2005 Nobuyoshi Nakada + + * configure.in, cygwin/GNUmakefile.in (mingw): use def file to alias + symbols. [ruby-dev:27532] + + * bcc32/mkexports.rb, win32/mkexports.rb: make aliases in DLL. + + * win32/win32.c, win32/win32.h: replace symbols only when RUBY_EXPORT + is defined. + +Thu Nov 3 07:57:39 2005 Minero Aoki + + * lib/open-uri.rb (open_loop): find_proxy should return nil when + proxy does not exist. [ruby-dev:27630] + +Wed Nov 2 20:25:28 2005 Hidetoshi NAGAI + + * ext/tk/extconf.rb: ext/tk/extconf.rb: change the check parameter + for Win32. + +Wed Nov 2 19:03:06 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_rbUpdateObjCmd, ip_rb_threadUpdateObjCmd): + passed improper flags to DoOneEvent(). + + * ext/tk/tkutil/tkutil.c: use rb_obj_respond_to() instead of + rb_respond_to(). + +Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto + + * eval.c (rb_call_super): should call method_missing if super is + called from Kernel method. + + * eval.c (exec_under): frame during eval should preserve external + information. + +Tue Nov 1 10:48:49 2005 GOTOU Yuuzou + + * ext/openssl/extconf.rb: should check ERR_peek_last_error(). + [ruby-dev:27597] + + * ext/openssl/ossl.c (ossl_raise): ditto. + +Mon Oct 31 17:34:46 2005 Yukihiro Matsumoto + + * configure.in: use proper option for Sun linker. A patch from + Shinya Kuwamura . [ruby-dev:27603] + +Mon Oct 31 05:46:08 2005 GOTOU Yuuzou + + * ext/openssl/ossl_cipher.c (ossl_cipher_update): input data must + not be empty. [ruby-talk:161220] + + * test/openssl/test_cipher.rb: add test for Cipher#update(""). + +Mon Oct 31 05:38:26 2005 GOTOU Yuuzou + + * lib/webrick/httpservlet/cgihandler.rb + (WEBrick::HTTPServlet::CGIHandler#do_GET): the value of Set-Cookie: + header field should be splited into each cookie. [ruby-Bugs:2199] + + * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method + to parse the value of Set-Cookie: header field. + + * test/webrick/test_cookie.rb, test/webrick/test_cgi.rb, + test/webrick/webrick.cgi: add some test for cookie. + +Mon Oct 31 02:33:25 2005 Yukihiro Matsumoto + + * numeric.c (fix_rshift): RDoc fix. [ruby-core:6351] + + * util.h (strtod): add #undef for platforms defines strtod() + macro. [ruby-dev:27563] + +Mon Oct 31 02:31:41 2005 Hirokazu Yamamoto + + * test/ruby/test_float.rb (test_precision): test by assert_in_delta. + [ruby-dev:27575] + +Sat Oct 29 01:58:25 2005 Yukihiro Matsumoto + + * ext/etc/etc.c: document update from mathew . + [ruby-core:06473] + + * ext/fcntl/fcntl.c: ditto. + +Sat Oct 29 16:56:03 2005 Tadayoshi Funaba + + * lib/date.rb: added seven predicates sunday? to saturday?. + + * lib/date.rb: added two methods {prev,next}_month, + that are almost same as << and >>. + +Thu Oct 27 20:34:43 2005 Nobuyoshi Nakada + + * enumerator.c (enumerator_allocate): allow subclassing. + +Thu Oct 27 16:45:31 2005 Yukihiro Matsumoto + + * string.c (scan_once): wrong condition to use mbclen2(). + [ruby-dev:27535] + +Thu Oct 27 11:53:17 2005 Hirokazu Yamamoto + + * missing.h, missing/memcmp.c, missing/memmove.c: + ANSI compatible interface. + +Wed Oct 26 09:15:48 2005 Hirokazu Yamamoto + + * ext/syck/implicit.c (syck_type_id_to_uri): should return + newly allocated memory. otherwise, type_id will be freed + twice. [ruby-dev:27384] [ruby-core:6385] + +Wed Oct 26 01:58:19 2005 Nobuyoshi Nakada + + * configure.in (RUBY_EXTERN): macro to export symbols in shared + library. [ruby-core:05528] + + * defines.h, {bcc32,win32,wince}/Makefile.sub (RUBY_EXTERN): moved to + configuration pass. + + * ext/extmk.rb (extmake): RUBY_EXTERN for static linked extensions. + +Tue Oct 25 20:06:59 2005 Hirokazu Yamamoto + + * ruby.h (Qfalse, Qtrue, Qnil, Qundef): make sure these immediate + values have VALUE type. there is an environment where sizeof(VALUE) + != sizeof(int) like IA64. if 32bit integer (Qtrue) is passed to ANYARGS + and received by 64bit integer (VALUE), upper bits may have garbage value. + [ruby-dev:27513] + +Tue Oct 25 15:32:00 2005 Yukihiro Matsumoto + + * lib/rational.rb: applied documentation patch from Gavin Sinclair + . [ruby-core:06364] + + * lib/irb.rb (IRB::Irb::eval_input): handle prompts with newlines + in irb auto-indentation mode. [ruby-core:06358] + +Tue Oct 25 14:21:46 2005 Hirokazu Yamamoto + + * gc.c (garbage_collect): sorry, previous commit was incorrect. + [ruby-core:6386] + +Tue Oct 25 13:40:16 2005 Hirokazu Yamamoto + + * gc.c (garbage_collect): return now whether there're rooms for new + objects, rather than whether GC run. fixed: [ruby-core:6376] + +Tue Oct 25 02:12:08 2005 Nobuyoshi Nakada + + * lib/rdoc/markup/simple_markup.rb (SM::SimpleMarkup::LABEL_LIST_RE): + reduce redundant backtrack. [ruby-talk:161771] + +Tue Oct 25 00:35:33 2005 Masatoshi SEKI + + * lib/rinda/*: RDoc documentation from Eric Hodel + added. + +Mon Oct 24 21:14:29 2005 Nobuyoshi Nakada + + * configure.in, io.c: use sys/syscall.h if syscall.h is not available. + [ruby-core:06247] + +Mon Oct 24 20:38:25 2005 NAKAMURA Usaku + + * ext/Win32API/lib/win32/resolv.rb (get_info): support multiple DNS. + fixed: [ruby-list:40058], [ruby-dev:27479] + +Mon Oct 24 11:01:11 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/canvas.rb (TkCanvasItemConfig::__item_val2ruby_optkeys): + typo fixed. [ruby-talk:162187] + + * ext/tk/lib/tk/menu.rb (TkMenuEntryConfig::__item_val2ruby_optkeys): + ditto. [ruby-core:06359] + +Mon Oct 24 07:57:56 2005 Yukihiro Matsumoto + + * ext/tk/lib/tk/canvas.rb (TkCanvasItemConfig::__item_val2ruby_optkeys): + typo fixed. [ruby-talk:162187] + + * ext/tk/lib/tk/menu.rb (TkMenuEntryConfig::__item_val2ruby_optkeys): + ditto. [ruby-core:06359] + + * lib/matrix.rb (Matrix::initialize): use funcall instead of send + to allow private methods to be called. A report from + Jean-Claude Arbaut . [ruby-core:06359] + +Mon Oct 24 00:41:18 2005 Yukihiro Matsumoto + + * time.c (time_sunday): added predicate methods for the days of the + week. [ruby-list:41340] + +Sun Oct 23 07:11:11 2005 Hidetoshi NAGAI + + * ext/tk/extconf.rb: improve messages [ruby-core:06325]. + + * ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb, + ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb, + ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb, + ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb, + ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb, + ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb, + ext/tk/lib/tk/toplevel.rb: improve conversion of option values. + + * ext/tk/lib/tkextlib/*: ditto. + + * ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2. + + * ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3. + + * ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2. + + * ext/tk/lib/tkextlib/vu/*: support vu 2.3.0. + + * ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3). + +Sat Oct 22 23:54:07 2005 Nobuyoshi Nakada + + * ext/extmk.rb, lib/mkmf.rb (with_config): support --with-extension + options. [ruby-dev:27449] + +Sat Oct 22 14:25:43 2005 Hirokazu Yamamoto + + * util.[hc] (ruby_add_suffix): constified. + + * util.[hc] (ruby_scan_{oct,hex}): fixed typo. (renamed from + scan_{oct,hex}) + + * util.c: almostly ANSI styled. (except for functions depending on + macro and K&R technique) + +Sat Oct 22 13:26:57 2005 Nobuyoshi Nakada + + * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check + if valid as a symbol name more strictly. [ruby-dev:27478] + + * test/ruby/test_symbol.rb: tests for [ruby-core:03573]. + + * time.c (rb_strftime): removed meaningless volatile modifiers, and + concatenate successive nul characters at once. [ruby-dev:27472] + + * ext/tk/lib/tk/font.rb, ext/tk/lib/tkextlib/ICONS/icons.rb, + ext/tk/sample/tkextlib/treectrl/demo.rb, lib/net/imap.rb, + lib/rss/parser.rb, test/rss/test_content.rb, + test/rss/test_dublincore.rb, test/rss/test_syndication.rb, + test/rss/test_trackback.rb, test/ruby/test_eval.rb, + test/socket/test_socket.rb, test/socket/test_udp.rb: + Object#fcall was renamed as Object#funcall. + +Sat Oct 22 10:08:28 2005 Hirokazu Yamamoto + + * missing.h, missing/*.c: SUSv3 compatible strcasecmp and strncasecmp, + ANSI compatible strtol and strtoul, and ANSI styled other functions. + +Fri Oct 21 19:16:08 2005 Hirokazu Yamamoto + + * rubysig.h (CHECK_INTS): fixed typo. (I believe bit-or is improper) + +Fri Oct 21 17:49:32 2005 Yukihiro Matsumoto + + * bin/erb (ERB::Main::run): typo fixed. [ruby-core:06337] + +Fri Oct 21 15:42:28 2005 Hirokazu Yamamoto + + * intern.h, struct.c (rb_struct_iv_get): constified. + + * marshal.c: avoid one VC++6 warning for implicit conversion + from int to char. + + * ruby.h: ANSI styled. + + * bcc32/Makefile.sub (HAVE_HYPOT): added. + + * ext/socket/extconf.rb: BeOS is only one platform should call + closesocket, so check __BEOS__ macro directly. (I was worried + accidently HAVE_CLOSESOCKET is defined on windows again because + it has it) + + * ext/socket/{getaddrinfo.c,socket.c}: ditto. + + ... these are all cosmetic changes. + +Fri Oct 21 15:23:23 2005 Hirokazu Yamamoto + + * bignum.c (bignew_1): convertion from `int' to `char' discards + upper bits, (ie. (char)0xff00 -> 0) so it's better to test if + nonzero and set 0 or 1 instead of simply casting ... as a flag usage. + (but I believe this won't cause actual bug in current implementation) + [ruby-dev:27055] + + * time.c: should use LONG_LONG instead of `long long'. + +Thu Oct 20 22:22:49 2005 Nobuyoshi Nakada + + * parser.y (struct parser_params): parser never modify input string. + + * ext/ripper/tools/preproc.rb (prelude): do not append surplus + newlines to fix line numbers. + +Thu Oct 20 11:41:57 2005 Hirokazu Yamamoto + + * class.c, eval.c, hash.c, st.c, variable.c: changed /* ??? */ stuff + protoize generated to ANYARGS. + +Thu Oct 20 11:18:11 2005 Hirokazu Yamamoto + + * eval.c, file.c, ruby.c: removed strchr, strrchr, strstr definition + because they are defined in missing.h. + + * missing.h, missing/strchr.c, missing/strstr.c: ANSI styled. + +Thu Oct 20 09:36:06 2005 Hirokazu Yamamoto + + * lib/mkmf.rb (create_makefile): Borland make seems not to allow + empty dependency list. If this change is not good, please correct + it. + +Thu Oct 20 07:55:09 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): get rid of a restriction + of Borland make. fixed: [ruby-dev:27460] + + * ext/ripper/depend: ditto. + +Wed Oct 19 23:58:03 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): do not create unnecessary empty + directories. fixed: [ruby-dev:27451] + +Wed Oct 19 08:28:32 2005 Nobuyoshi Nakada + + * file.c (rb_file_join): elements may contain null pointer strings. + report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326] + +Wed Oct 19 02:34:33 2005 Nobuyoshi Nakada + + * enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c: + made internal symbols static. [ruby-dev:27435] + +Tue Oct 18 10:58:27 2005 NAKAMURA Usaku + + * ext/dl/depend, ext/dl/extconf.rb, ext/socket/depend, + ext/socket/extconf.rb: shouldn't define DESTCLEANFILES in depend, + use $distcleanfiles in extconf.rb. + + * win32/Makefile.sub (distclean-local): should remove .config.h.time. + +Mon Oct 17 09:42:50 2005 NAKAMURA Usaku + + * mkconfig.rb: fixup configure_args for mswin32 configure. + + * win32/configure.bat (srcdir, target): ditto. + +Mon Oct 17 05:01:50 2005 Yukihiro Matsumoto + + * env.h: move struct METHOD and struct BLOCK from eval.c to + support NodeWrap and ParseTree. + +Sun Oct 16 22:16:51 2005 Nobuyoshi Nakada + + * ext/extmk.rb: omit non-existing directories. + +Sun Oct 16 14:40:54 2005 Masatoshi SEKI + + * lib/rinda/rinda.rb (Rinda::Tuple#initialize): check remote hash + tuple. fixed: [ruby-list:41227] + + * test/rinda/test_rinda.rb: test it. + +Sun Oct 16 03:38:07 2005 Yukihiro Matsumoto + + * rubysig.h (CHECK_INTS): prevent signal handler to run during + critical section. [ruby-core:04039] + + * eval.c (load_wait): need not to call rb_thread_schedule() + explicitly. [ruby-core:04039] + + * eval.c (rb_thread_schedule): clear rb_thread_critical. + [ruby-core:04039] + +Sun Oct 16 00:13:14 2005 NAKAMURA Usaku + + * win32/configure.bat: remove unnecessary line which prevents + creating Makefile. + +Sat Oct 15 23:52:07 2005 Shugo Maeda + + * lib/net/ftp.rb: (getbinaryfile): allow nil for localfile, and + returns retrieved data if localfile is nil. + + * lib/net/ftp.rb: (gettextfile): ditto. + +Sat Oct 15 19:51:29 2005 Masatoshi SEKI + + * bin/erb: typo fixed, again. thanks, Doug Kearns. + +Fri Oct 14 23:09:31 2005 Nobuyoshi Nakada + + * win32/Makefile.sub (MKFILES): update MKFILES if configure files get + changed. + + * win32/configure.bat, win32/setup.mak (configure_args): store + arguments to configure files. + +Fri Oct 14 22:05:45 2005 NAKAMURA Usaku + + * win32/win32.c (ioctl): should set errno. + +Fri Oct 14 16:39:37 2005 GOTOU Yuuzou + + * lib/webrick/config.rb (Config::FileHandler): :UserDir should be nil. + It is harmful to permit the access to ~/public_html by default. + suggested by Hiroyuki Iwatsuki. + +Fri Oct 14 04:58:38 2005 Yukihiro Matsumoto + + * eval.c (rb_obj_instance_exec): create instance_exec and + module_exec which pass arguments to the block. + + * eval.c (rb_f_funcall): rename fcall to funcall to follow + tradition. + +Thu Oct 13 23:29:51 2005 Nobuyoshi Nakada + + * parse.y (HEAPCNT): bison allocates indivisible size. + fixed: [ruby-core:06261] + + * io.c, pack.c, ext/syck/rubyext.c, ext/syck/syck.h, missing/isinf.c: + get rid of warnings. fixed: [ruby-core:06247] + +Wed Oct 12 12:51:56 2005 GOTOU Yuuzou + + * ext/openssl/ossl.c (Init_openssl): should call + OpenSSL_add_ssl_algorithms(). + +Wed Oct 12 11:08:54 2005 WATANABE Hirofumi + + * file.c (rb_f_test): typo in RDoc comments. + +Tue Oct 11 21:41:58 2005 Nobuyoshi Nakada + + * configure.in (RUBY_FUNC_ATTRIBUTE): check prefixed attribute form + first. [ruby-dev:27398] + + * array.c, enum.c, eval.c, util.c: safer function pointer usage. + fixed: [ruby-core:06143] + + * util.h (qsort): removed the definition incompatible to ANSI. + fixed: [ruby-core:06147] + + * eval.c (rb_obj_respond_to): check if obj responds to the given + method with the given visibility. [ruby-dev:27408] + + * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] + +Tue Oct 11 00:01:21 2005 Yukihiro Matsumoto + + * st.c (st_free_table): do not call free() but xfree(). + [ruby-core:06205] + +Sat Oct 8 19:49:42 2005 Nobuyoshi Nakada + + * eval.c (Init_Binding): add Binding#dup method. [yarv-dev:666] + + * io.c (rb_io_init_copy): clear PREP flag for copied IO. + fixed: [ruby-dev:27371] + + * parse.y (rb_parser_malloc, rb_parser_free): manage parser stack on + heap. [ruby-list:41199] + + * parse.y (ripper_initialize): use rb_respond_to(). + + * ext/ripper/depend (check): get rid of re-generating ripper.y always. + + * ext/iconv/charset_alias.rb: parse config.charset_alias file directly. + + * ext/nkf/lib/kconv.rb (Kconv.conv): get rid of nil.to_a. + + * lib/scanf.rb (Scanf::FormatSpecifier#letter, #width): use matched + substring directly. + + * test/ruby/test_assignment.rb, test/ruby/test_iterator.rb: followed + change of sample/test.rb. + + * test/net/http/test_http.rb: removed superfluous splatting stars. + +Fri Oct 7 16:41:43 2005 Yukihiro Matsumoto + + * eval.c (splat_value): call rb_Array() to convert svalue to + values. [ruby-dev:27397] + +Fri Oct 7 09:54:00 2005 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::Cookie::parse): Cookies from Nokia devices may + not be parsed correctly. A patch from August Z. Flatby + (augustzf) in [ruby-Patches-2595]. [ruby-core:06183] + +Thu Oct 6 22:51:30 2005 Yukihiro Matsumoto + + * object.c (rb_Array): Array() to raise error for objects without + to_ary, nor to_a. + + * object.c (nil_to_a): revert NilClass#to_a. + +Thu Oct 6 20:10:38 2005 Minero Aoki + + * ext/strscan/strscan.c (strscan_free): remove useless code. + [ruby-dev:26368] [ruby-dev:27389] + +Thu Oct 6 01:02:19 2005 Yukihiro Matsumoto + + * range.c (rb_range_beg_len): should return Qfalse for non-range + object. + +Wed Oct 5 04:42:38 2005 GOTOU Yuuzou + + * lib/xmlrpc/server.rb (XMLRPC::Server#initialize): should mount the + servlet on "/". + +Wed Oct 5 04:06:49 2005 GOTOU Yuuzou + + * lib/xmlrpc/server.rb (XMLRPC::Server#serve): delete wrong call + of "join". + +Mon Oct 3 00:04:00 2005 Kazuhiro NISHIYAMA + + * pack.c (EXTEND16): [ruby-dev:27383] + +Sat Oct 1 23:55:24 2005 NAKAMURA Usaku + + * win32/win32.c (do_select, rb_w32_select): brush up. + +Sat Oct 1 12:57:02 2005 Tanaka Akira + + * bignum.c (rb_big_rand): removed. [ruby-dev:25405] + +Sat Oct 1 01:46:51 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_loop): prohibit multiple proxy + options. + +Thu Sep 29 10:26:18 2005 Tanaka Akira + + * ext/dl/cptr.c (rb_dlptr_s_to_ptr): abolish sizeof(FILE). + [ruby-dev:27317] + +Thu Sep 29 10:15:14 2005 Tanaka Akira + + * lib/open-uri.rb (:proxy_http_basic_authentication): new option. + +Thu Sep 29 07:22:05 2005 Nobuyoshi Nakada + + * eval.c (rb_f_send): underscores need to be escaped. + fixed by Doug Kearns. [ruby-core:06053] + +Thu Sep 29 00:57:35 2005 Nobuyoshi Nakada + + * eval.c (ev_const_get), variable.c (rb_const_get_0): retry only when + autoload succeeded. + + * variable.c (rb_autoload_load): now return true if autoload + succeeded. fixed: [ruby-dev:27331] + +Wed Sep 28 23:40:04 2005 Nobuyoshi Nakada + + * file.c (rb_stat_inspect): constified. + +Wed Sep 28 15:12:28 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI#start): req.query_string should + refer the value of QUERY_STRING. [ruby-list:41186] + + * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#query_string=): + add new method. + +Wed Sep 28 10:45:44 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: cannot compile with Tcl/Tk8.0.x [ruby-dev:27335]. + +Wed Sep 28 07:56:52 2005 Nobuyoshi Nakada + + * lib/yaml/basenode.rb (YAML::BaseNode::match_segment): fix typo. + [ruby-dev:27237], [ruby-core:05854] + + * lib/yaml/tag.rb (Module#yaml_as): suppress warnings. + + * lib/yaml/types.rb (YAML::PrivateType, YAML::DomainType): ditto. + +Wed Sep 28 03:16:41 2005 NAKAMURA Usaku + + * rubysig.h: fixed build problem with --enable-pthread on platforms + which don't have setitimer(). + +Mon Sep 26 22:32:13 2005 Yukihiro Matsumoto + + * eval.c (set_trace_func): add rb_secure(4) to prevent adding + tracing function. + +Mon Sep 26 20:59:28 2005 Hirokazu Yamamoto + + * parse.y: changed to ANSI function style. + +Sun Sep 25 12:02:04 2005 Masatoshi SEKI + + * bin/erb: typo fixed. + +Sun Sep 25 11:54:11 2005 Masatoshi SEKI + + * lib/rinda/tuplespace.rb (Rinda::TemplateEntry::initialize): pull + up method. Tabs converted to spaces. + +Sun Sep 25 09:34:22 2005 Hirokazu Yamamoto + + * parse.y: replaced `foo _((boo))' with `foo(boo)'. + +Sun Sep 25 08:19:53 2005 Nobuyoshi Nakada + + * test/rss/test_content.rb, test/rss/test_syndication.rb: use fcall + instead of send in order to override visibility. + +Sun Sep 25 01:46:43 2005 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-calculate-indent): arrange deep-indent + closing parenthesis at same column as the opening. + +Sun Sep 25 01:33:41 2005 Tanaka Akira + + * process.c (proc_setrlimit): make the third argument (rlim_max) + optional. + +Sun Sep 25 00:42:11 2005 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-expr-beg): deal with heredoc separately. + fixed: [ruby-list:41168] + + * misc/ruby-mode.el (ruby-calculate-indent): not to deepen indent + level for continuous line inside parentheses. + http://nabeken.tdiary.net/20050915.html#p02 + +Sat Sep 24 21:19:39 2005 Minero Aoki + + * ext/strscan/strscan.c: document enhancement. + + * ext/strscan/strscan.c: update copyright year. + + * ext/strscan/strscan.c: update coding style. + +Sat Sep 24 20:20:05 2005 Minero Aoki + + * test/net/http/test_http.rb (teardown): Net::HTTP.version_1_1 breaks + many other tests; ensure that Net::HTTP is version 1.2 after test. + [ruby-dev:27312] + +Sat Sep 24 11:44:28 2005 Minero Aoki + + * test/net/http/test_http.rb: new file. + +Sat Sep 24 08:54:05 2005 Minero Aoki + + * lib/fileutils.rb (cd): no longer accept :noop option, related + code is useless. [ruby-core:05858] [ruby-Bugs:2494] + +Sat Sep 24 08:30:00 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#sub): new method. + +Sat Sep 24 08:29:36 2005 Minero Aoki + + * lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, + DryRun. [ruby-core:05954] + + * test/fileutils/test_nowrite.rb: test it. + + * test/fileutils/test_dryrun.rb: new file. + + * test/fileutils/test_verbose.rb: new file. + +Sat Sep 24 07:59:01 2005 Minero Aoki + + * sample/ripper/colorize.rb: removed (replaced by ruby2html.rb). + + * sample/ripper/ruby2html.rb: added. + +Sat Sep 24 06:35:15 2005 Minero Aoki + + * ext/ripper: no longer generates .rb files. + + * parse.y (Init_ripper): ripper_init_eventids*() takes 1 argument, + self (class Ripper). + + * ext/ripper/depend: target removed: `lib/ripper/core.rb'. + + * ext/ripper/depend: new target `eventids2table.c'. + + * ext/ripper/depend: new target `check'. + + * ext/ripper/eventids2.c: include eventids2table.c. + + * ext/ripper/eventids2.c: initialize SCANNER_EVENT_TABLE. + + * ext/ripper/extconf.rb: update $cleanfiles list. + + * ext/ripper/tools/generate.rb: no longer generate ripper/core.rb. + + * ext/ripper/tools/generate.rb: new mode `check'. + + * ext/ripper/tools/generate.rb: new mode `eventids2table'. + + * ext/ripper/lib/ripper/core.rb.in: removed. + + * ext/ripper/lib/ripper/core.rb: added. + + * ext/ripper/lib/ripper/filter.rb: update copyright year. + + * ext/ripper/lib/ripper/lexer.rb: ditto. + + * ext/ripper/lib/ripper/sexp.rb: ditto. + +Sat Sep 24 02:40:20 2005 Yukihiro Matsumoto + + * lib/delegate.rb: document update from James Edward Gray II + . [ruby-core:05942] + +Sat Sep 24 02:05:51 2005 Yukihiro Matsumoto + + * process.c (proc_daemon): should restrict execution on levels + higher than $SAFE=2. suggested by URABE Shyouhei + . + +Fri Sep 23 20:10:35 2005 Nobuyoshi Nakada + + * ext/ripper/tools/generate.rb, ext/ripper/tools/preproc.rb: StringIO + is not available for miniruby. fixed: [ruby-dev:27307] + +Fri Sep 23 17:36:48 2005 Masaki Suketa + + * ext/win32ole/win32ole.c: avoid core dump with WIN32OLE_EVENT. + [ruby-dev:27133] + +Fri Sep 23 16:27:39 2005 Yukihiro Matsumoto + + * lib/forwardable.rb: replaced by new implementation from + . [ruby-core:05899] + +Fri Sep 23 07:07:47 2005 Minero Aoki + + * test/ripper/depend: use --output option instead of redirect; + nmake does not remove a target when the target file is created by + redirect. [ruby-dev:26466] + + * test/ripper/tools/preproc.rb: new option --output. + +Fri Sep 23 06:57:52 2005 Minero Aoki + + * test/ripper/tools/generate.rb: check parser event arity. + + * test/ripper/tools/generate.rb: detect crash of parser-event-IDs + and scanner-event-IDs. + +Fri Sep 23 06:01:30 2005 Minero Aoki + + * test/ruby/test_file.rb: check File#chown(nil,nil). + [ruby-dev:27140] + +Fri Sep 23 05:57:23 2005 Minero Aoki + + * ext/ripper: refactoring code generation tools. [ruby-dev:27247] + [ruby-dev:27273] + + * ext/ripper/depend: use generate.rb. + + * ext/ripper/lib/ripper/core.rb: removed. + + * ext/ripper/tools/generate-eventids1.rb: removed (code moved to + generate.rb). + + * ext/ripper/tools/generate-ripper_rb.rb: removed (code moved to + generate.rb). + + * ext/ripper/tools/list-parse-event-ids.rb: removed (code moved to + generate.rb). + + * ext/ripper/tools/list-scan-event-ids.rb: removed (code moved to + generate.rb). + + * ext/ripper/lib/ripper/core.rb: removed. + + * ext/ripper: refactoring tests. [ruby-dev:27273] + + * ext/ripper/test/check-event-arity.rb: removed (code moved to + tools/generate.rb). + + * ext/ripper/test/check-event-coverage.rb: removed (code moved to + test/ripper/test_parser_events.rb). + + * ext/ripper/test/check-scanner-event-coverage.rb: removed (code + moved to test/ripper/test_scanner_events.rb). + + * ext/ripper/test/list-called-events.rb: removed. + + * ext/ripper/test/src_rb: removed. + + * ext/ripper/test/validate.rb: removed. + + * test/ripper/test_scanner_events.rb: check event coverage. + + * ext/ripper/lib/ripper/core.rb.in: update copyright year. + +Thu Sep 22 23:40:19 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (find_executable0): default path if environment is not + set. [ruby-dev:27281] + + * ext/ripper/extconf.rb (have_command): replaced with find_executable. + +Thu Sep 22 17:31:48 2005 Shugo Maeda + + * test/readline/test_readline.rb (TestReadline::replace_stdio): + merged the patch of [ruby-dev:25232] instead of [ruby-dev:25223]. + (merged from ruby_1_8 branch) + +Wed Sep 21 23:30:44 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (configuration): generalized nmake dependent code. + +Wed Sep 21 14:16:30 2005 NAKAMURA Usaku + + * ext/ripper/depend (SUFFIXES): no longer needed. + + * ext/ripper/depend (c): avoid nmake problem. fixed [ruby-dev:27191] + +Wed Sep 21 08:52:25 2005 why the lucky stiff + + * ext/syck/token.c: correctly compute indentation of a block + scalar's parent node. [ruby-talk:150620] + +Wed Sep 21 08:20:24 2005 Nobuyoshi Nakada + + * README.EXT, README.EXT.ja: add new features. + +Wed Sep 21 07:43:58 2005 Nobuyoshi Nakada + + * lib/optparse.rb (default_argv, Arguable#options): defaults strings + to be parsed to Arguable instance. + +Wed Sep 21 02:44:09 2005 Yukihiro Matsumoto + + * file.c (path_check_0): disallow sticky world writable directory + in PATH (and $LOAD_PATH). [ruby-dev:27226] + +Wed Sep 21 00:32:22 2005 Yukihiro Matsumoto + + * numeric.c (fix_idiv): 1.div(1.0) should return integer value. + [ruby-dev:27235] + +Tue Sep 20 22:25:43 2005 Nobuyoshi Nakada + + * ext/io/wait/lib/nonblock.rb: disable on platforms non-blocking flag + is not available. fixed: [ruby-dev:27187] + + * file.c (rb_stat_inspect): protoized function pointer. + +Tue Sep 20 18:23:04 2005 Tanaka Akira + + * eval.c (thread_mark): mark th->last_status. [ruby-dev:27179] + +Tue Sep 20 18:20:33 2005 Yukihiro Matsumoto + + * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] + +Tue Sep 20 17:48:34 2005 Yukihiro Matsumoto + + * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset + information to content-type header.[ruby-core:5127] + + * lib/xmlrpc/server.rb (CGIServer::serve): ditto. + + * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. + + * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. + +Tue Sep 20 17:26:42 2005 Hirokazu Yamamoto + + * test/webrick/test_cgi.rb: set ENV["PATH"] to CGIEnvPath on + windows. bcc32's runtime is not installed into system directory, + so it cannot be found without this setting. [ruby-dev:27166] + +Tue Sep 20 17:14:10 2005 Hirokazu Yamamoto + + * io.c: PIPE_BUF is not defined on BeOS. use _POSIX_PIPE_BUF instead. + [ruby-dev:27185] + +Tue Sep 20 17:10:38 2005 Yukihiro Matsumoto + + * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove + test_s_open_error test to detect duplicate open. + [ruby-dev:27202] + +Tue Sep 20 15:39:40 2005 why the lucky stiff + + * ext/syck/emitter.c (syck_scan_scalar): prevent indicators from + appearing alone or at the end of plain scalars. [ruby-core:5826] + + * ext/syck/emitter.c (syck_emit_scalar): treat typed scalar nodes + as complex keys. + + * lib/syck.h: version 0.60. + + * lib/yaml/basenode.rb (YAML::BaseNode#at): transform keys during + key searches. + + * ext/syck/rubyext.c: loading of binary-typed nodes. prevent + emission of plain strings that look like symbols, but which aren't. + +Tue Sep 20 05:48:26 2005 Hirokazu Yamamoto + + * test/xmlrpc/test_webrick_server.rb (setup_http_server): + should not include 'webrick/https' unless 'use_ssl' because + it fails where openssl is not installed. + +Tue Sep 20 01:24:45 2005 Yukihiro Matsumoto + + * eval.c (splat_value): use to_a to splat non Array object. + + * object.c (nil_to_a): remove nil.to_a. [experimental] + +Tue Sep 20 01:01:41 2005 Yukihiro Matsumoto + + * lib/mathn.rb (Fixnum): remove debug print. + + * lib/rational.rb (Rational): ditto. + +Tue Sep 20 00:34:07 2005 Yukihiro Matsumoto + + * io.c (io_close): call rb_io_close() directly if io is a T_FILE + object. [ruby-dev:27156] + +Mon Sep 19 18:58:10 2005 Minero Aoki + + * file.c (rb_file_chown): should accept nil. [ruby-dev:27171] + +Mon Sep 19 18:29:54 2005 Yukihiro Matsumoto + + * file.c (file_expand_path): allow pathnames to expand. + [ruby-dev:27152] + +Mon Sep 19 15:12:15 2005 Minero Aoki + + * ext/ripper/depend: do not make ripper/core.rb. [ruby-dev:26462] + +Mon Sep 19 14:49:19 2005 Minero Aoki + + * ext/ripper/eventids2.c: add prefix `t' to tLAMBDA-related lexer + events. + + * ext/ripper/lib/ripper/core.rb: updated. + +Mon Sep 19 14:39:46 2005 Minero Aoki + + * parse.y (do_block): do_block event dispatches 2 args. + [ruby-dev:26964] + + * ext/ripper/lib/ripper/core.rb: updated. + + * ext/ripper/tools/list-parser-event-ids.rb: check arity mismatch. + +Mon Sep 19 07:45:37 2005 GOTOU Yuuzou + + * ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c: + an instance variable "private" is added to OpenSSL::PKey class. + this ivar is a flag that shows whether there is a private key + in the instance. + + * ext/openssl/ossl_engine.c: (ossl_engine_load_privkey): set private + key flag. + + * test/openssl/test_pkey_rsa.rb: add test about private detection. + +Mon Sep 19 06:38:03 2005 Minero Aoki + + * lib/fileutils.rb: method renaming: collect_methods -> + collect_method. + +Mon Sep 19 05:58:59 2005 Minero Aoki + + * lib/fileutils.rb: use module_function instead of single extend. + + * test/fileutils/test_fileutils.rb: test existence of singleton + methods. + +Mon Sep 19 05:32:41 2005 Minero Aoki + + * lib/fileutils.rb (remove_entry_secure): does not use chdir(2). + +Mon Sep 19 03:17:48 2005 Tanaka Akira + + * file.c (rb_thread_flock): wrap the flock system call by + TRAP_BEG/TRAP_END to enable signals. [ruby-dev:27122] + + * ext/socket/socket.c (bsock_send): wrap the sendto and send system + call by TRAP_BEG/TRAP_END to enable signals when writing to a socket + which is full. [ruby-dev:27132] + + * io.c (rb_io_syswrite): wrap the write system call by + TRAP_BEG/TRAP_END to run signal handler in syswrite method. + [ruby-dev:27134] + +Mon Sep 19 01:07:38 2005 Yukihiro Matsumoto + + * numeric.c (Init_Numeric): should define Fixnum#div. + [ruby-dev:27129] + + * file.c (rb_thread_flock): wrap flock(2) by TRAP_BEG and + TRAP_END. [ruby-dev:27122] + + * file.c (rb_file_join): call FilePathValue() to all Pathnames to + join. [ruby-dev:27127] + + * file.c (rb_get_path): call StringValueCStr() to ensure no nul + bytes in path strings. + + * gc.c (garbage_collect): need value for return. [ruby-dev:27127] + +Sun Sep 18 02:10:47 2005 why the lucky stiff + + * lib/yaml/rubytypes.rb: remove comments that are bungling up + the rdoc and ri output. output symbols as plain scalars. + + * ext/syck/rubyext.c (syck_emitter_reset): emit headless + documents always. + + * ext/syck/emitter.c (syck_scan_scalar): quote scalars with any + kind of surrounding line space, tabs or spaces alike. + + * ext/syck/token.c: accept tabs as whitespace, not for indentation, + but strip from plain scalars. + + * test/yaml/test_yaml.rb: remove outdated tests. + +Sun Sep 18 01:10:37 2005 Nobuyoshi Nakada + + * gc.c (garbage_collect): return false if no GC run. + +Sat Sep 17 23:25:04 2005 sheepman + + * lib/mathn.rb (Rational::inspect): should preserve original + operand. [ruby-core:05806] + +Sat Sep 17 23:20:27 2005 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::Cookie): should handle multiple values for a + cookie name. [ruby-talk:156140] + + * test/socket/test_tcp.rb (TestTCPSocket::test_recvfrom): typo + fixed. [ruby-dev:27123] + +Sat Sep 17 20:58:56 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_select): fixed deadlock bug. + because select(2) modifies its fd_set arguments, it must be + restored sometimes. + + * win32/win32.c (rb_w32_select): performance improvement when + 'always readable/writable handles' and sockets are passed. + sockets should be polled every time. + + require "net/http" + + Thread.new { + loop do + STDOUT.write(".") # busy on console (this is worst case though) + end + } + + # socket operation took long time. (sometimes timed out) + Net::HTTP.start("www.ruby-lang.org") do |http| + http.get("/cgi-bin/cvsweb.cgi/ruby/array.c?rev=1.179") + end + +Sat Sep 17 14:54:40 2005 Hirokazu Yamamoto + + * test/ruby/test_readpartial.rb (test_open_pipe, test_with_stdio): + these tests are working now, so turned on. (windows) + +Sat Sep 17 14:18:15 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_select): I hope performance problem was + solved. + +Sat Sep 17 13:45:22 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_select): console support is back. + but still has performance problem because I loosely took 1 second + for wait time. I'll fix it later. (The reason I drastically changed + the code is that I wanted to implement the fileset management as + single function, and I was worried that if pipe or console + was always available, socket may not be processed any time) + +Sat Sep 17 11:24:16 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_select): select for socket didn't work. + this caused deadlock in drb test. this happened because GetFileType + for socket handle returns FILE_TYPE_PIPE. Of course, it's not a + pipe. So socket handle didn't reach winsock's select function. + + * win32/win32.c (rb_w32_select): read for pipe was still blocked + even if writer handle was closed. + + r,w = IO.pipe + + Thread.new { + sleep 3; puts "------- 1" + w.puts("foo") + sleep 3; puts "------- 2" + w.puts("boo") + sleep 3; puts "------- 3" + w.close + } + + until r.eof? # should break by w.close but didn't. + puts r.gets + end + + * win32/win32.c (rb_w32_select): temporary reverted console support + but it'll be back soon. + +Sat Sep 17 10:42:13 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string and bg_eval_string + should call Kernel.eval on caller's safe-level instead of slave's + safe-level (Of course, the given script should be evaluated on + slave's safe-level). + +Sat Sep 17 09:45:26 2005 Yukihiro Matsumoto + + * string.c (rb_str_substr): should propagate taintness even for + empty strings. [ruby-dev:27121] + + * string.c (rb_str_aref): should infect result if range argument + is tainted. [ruby-dev:27121] + +Sat Sep 17 08:35:39 2005 Kouhei Sutou + + * lib/rss/maker/base.rb (RSS::Maker::ItemsBase#normalize): fixed + strange RSS::Maker::Item#max_size behavior. + Thanks to Kazuhiko . + + * test/rss/test_maker_1.0.rb (RSS::TestMaker10#test_items): ditto. + +Sat Sep 17 08:02:53 2005 Shugo Maeda + + * lib/net/imap.rb: supported DIGEST-MD5. Thanks, Mathieu Arnold. + + * lib/net/imap.rb: use fcall instead of send. Thanks, Satoru + Takabayashi. + +Fri Sep 16 22:45:49 2005 Nobuyoshi Nakada + + * file.c (rb_file_s_extname): empty string for path name ending with a + period. fixed: [ruby-core:05651] + + * file.c (rb_file_join): smarter behavior at edge cases. + fixed: [ruby-core:05706] + + * gc.c (rb_memerror, ruby_xmalloc, ruby_xrealloc, rb_newobj): just + abandon if no memory available, when interpreter is not running. + [ruby-dev:27104] + + * gc.c (garbage_collect): return whether GC could run. + + * dir.c (rb_push_glob): fix delimiter bug. fixed: [ruby-dev:27105] + + * dir.c (dir_s_aref, dir_s_glob): allow multiple patterns. + [ruby-dev:27110] + + * win32/win32.c (cmdglob): enable brace expansion. + +Fri Sep 16 18:34:01 2005 Yukihiro Matsumoto + + * ext/syck/node.c (syck_replace_str): was using return from the + void function. a patch from MIYAMUKO Katsuyuki + . [ruby-dev:27111] + +Fri Sep 16 14:48:48 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: fix typo on MultiTkIp#bg_eval_string + +Fri Sep 16 12:02:12 2005 Yukihiro Matsumoto + + * ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style + comment (//). [ruby-core:05793] + +Fri Sep 16 00:17:03 2005 NAKAMURA, Hiroshi + + * test/logger/test_logger.rb: unintentionally overwritten changes by + Usa. reverted. + +Fri Sep 16 00:03:11 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI::Socket#initialize): should set + $stdout.binmode. + +Thu Sep 15 23:25:21 2005 NAKAMURA, Hiroshi + + * lib/{soap,wsdl,xsd}, test/{soap,wsdl,xsd}: imported soap4r/1.5.5. + + #nnn is a ticket number at http://dev.ctor.org/soap4r + + * SOAP + + * allow to configure an envelope namespace of SOAP request. (#124) + TemporaryNamespace = 'http://www.w3.org/2003/05/soap-envelope' + @client.options["soap.envelope.requestnamespace"] = + TemporaryNamespace + @client.options["soap.envelope.responsenamespace"] = + TemporaryNamespace + @client.do_proc(...) + + * let SOAP request XML indent space configurable. see + "soap.envelope.no_indent" option. (#130) + + * let external CES configurable. + ex. client["soap.mapping.external_ces"] = 'SJIS'. $KCODE is used + by default. (#133) + external CES ::= CES used in Ruby object of client and server + internal CES ::= CES used in SOAP/OM + + * add iso-8859-1 external CES support. (#106) + + * fixed illegal 'qualified' handling of elements. it caused + ASP.NET interoperability problem. (#144) + + * added 'soap.envelope.use_numeric_character_reference' (boolean) + option to let query XML use numeric character reference in XML, + not plain UTF-8 character. !GoogleSearch server seems to not + allow plain UTF-8 character since 2005-08-15 update. (#147) + + * SOAP::Header::SimpleHeader (de)serialization throws an exception + on !SimpleHeader.on_(in|out)bound when header is a String. so we + could not use a simple single element headerItem. fixed. thanks + to emil. (#129) + + * out parameter of rpc operation did not work. (#132) + + * follow HTTP redirect only if using http-access2. (#125) (#145) + + * add a workaround for importing an WSDL whose path begins with + drive letter. (#115) + + * WSDL + + * SOAP Data which is defined as a simpletype was not mapped + correctly to Ruby obj when using wsdl2ruby.rb generated classdef + file. (#123) + + * rpc/literal support. (#118) + + * re-implemented local element qualify/unqualify control. handles + elementFormDefault and form in WSDL. (#119) + + * Array of an element which has simpleType causes a crash. (#128) + + * prarmeterOrder may not contain return part so it can be shorter + than parts size. Thanks to Hugh. (#139) + + * Samples + + * added !BasicAuth client sample. (#117) + + * added Base64 client/server sample. + + * added Flickr SOAP interface client sample. (#122) + + * added !SalesForce client sample. (#135) + + * updated Thawte CA certificate for !GoogleAdWords sample. + + * updated a client script with the newer version made by Johan. + thanks! + + * shortened long file names. (#120) + + * fixed typo in authheader sample. (#129) + + * updated deprecated method usage. (#138) + +Thu Sep 15 22:40:27 2005 NAKAMURA Usaku + + * test/ruby/test_signal.rb (test_exit_action): skip the test using + fork on fork-less platforms. + +Thu Sep 15 13:54:33 2005 Tanaka Akira + + * lib/open-uri.rb: add :read_timeout option. + [ruby-core:4848] + +Thu Sep 15 11:39:18 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/dialog.rb: If a dialog does not show up yet, + TkDialogObj#name raises an exception. [ruby-talk:156109] + +Thu Sep 15 11:01:58 2005 NAKAMURA Usaku + + * win32/win32.c (rb_w32_pipe_exec): remove unnecessary CloseHandle(). + + * win32/win32.c (extract_console_fd, peek_console): new functions. + + * win32/win32.c (rb_w32_select): check consoles by polling them. + +Thu Sep 15 00:18:24 2005 Yukihiro Matsumoto + + * lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with + readpartial. [ruby-talk:127641] + +Wed Sep 14 23:28:28 2005 NAKAMURA Usaku + + * win32/win32.c (collect_file_fd): rename from extract_file_fd. + + * win32/win32.c (extract_pipe_fd, peek_pipe): new functions. + + * win32/win32.c (rb_w32_select): check pipes by polling them. + +Wed Sep 14 22:40:26 2005 Nobuyoshi Nakada + + * dir.c (ruby_glob): glob function not using ruby exception system. + +Wed Sep 14 17:24:22 2005 Hirokazu Yamamoto + + * dir.c: changed `foo (*bar)_((boo))' to `foo (*bar)(boo)`. + + * enumerator.c, eval.c, gc.c, intern.h, io.c, process.c, ruby.c, + ruby.h, signal.c: ditto. + +Wed Sep 14 15:06:22 2005 Hirokazu Yamamoto + + * bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056] + + * defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, + gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, + node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, + rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, + util.c, util.h, variable.c: ditto. + +Tue Sep 13 22:09:40 2005 NAKAMURA, Hiroshi + + * lib/logger.rb (Logger): added formatter accessor to logger for + dictating the way in which the logger should format the messages it + displays. Thanks to Nicholas Seckar (cf. [ruby-talk:153391]) and + Daniel Berger. + + * lib/logger.rb (Logger): added VERSION constant. + + * lib/logger.rb: removed document for LogDevice. It is an + implementation detail and is not a public interface. + + * test/logger/test_logger.rb: added tests. + +Tue Sep 13 21:47:17 2005 Nobuyoshi Nakada + + * eval.c (BEGIN_CALLARGS): pop halfly pushed status. + fixed: [ruby-dev:26881] + +Tue Sep 13 20:24:37 2005 Tanaka Akira + + * ruby.h (PRINTF_ARGS): new macro for printf style argument checking. + +Tue Sep 13 15:41:29 2005 Minero Aoki + + * lib/net/http.rb: wrote docuemntation of HTTPRequest/HTTPResponse + classes. + +Tue Sep 13 14:27:47 2005 Hirokazu Yamamoto + + * string.c, missing.h: failed to build on powerpc-apple-darwin7.9.0 + because of crypt argument's constness mismatch. (I hope this works) + (http://mput.dip.jp/autobuild/ruby-trunk/log/20050913T110001.gz) + +Tue Sep 13 12:33:05 2005 why the lucky stiff + + * lib/yaml.rb: reworking YAML::Stream to use the new + emitter. + + * lib/yaml/stream.rb: ditto. + + * lib/yaml/rubytypes.rb: added Object#yaml_new. + + * lib/yaml/tag.rb: the tag_subclasses? method now + shows up in the class. allow taguri to be set using an accessor. + continue support of Object#to_yaml_type. + + * ext/syck/rubyext.c: new emitter code. yaml_new and yaml_initialize + get called, should they be present. consolidated all the diaspora of internal node types into the family below YAML::Syck::Node -- Map, + Seq, Scalar -- all of whom are SyckNode structs pointing to + Ruby data. moved Object#yaml_new into the node_import and made it + the default behavior. the target_class is always called wih + yaml_new, prepended a parameter, which is the klass. loaded nodes + through GenericResolver show their style. + new Resolver#tagurize converts type ids to taguris. + + * ext/syck/implicit.re: were 'y' and 'n' seriously omitted?? + + * ext/syck/emitter.c: renovated emitter, walks the tree in advance. + consolidated redundant block_styles struct into + the scalar_style struct. (this means loaded nodes can now + be sent back to emitter and preserve at least its very basic + formatting.) + + * ext/syck/gram.c: headless documents of any kind allowed. + + * ext/syck/node.c: new syck_replace_str methods and syck_empty_* + methods for rewriting node contents, while keeping the ID + and other setup info. added syck_seq_assign. + + * ext/syck/syck.h: reflect block_styles and new node functions. + +Tue Sep 13 08:09:18 2005 Nobuyoshi Nakada + + * lib/ostruct.rb (new_ostruct_member): Object#send no longer call + private methods. [ruby-dev:27044] + + * test/rss/test_dublincore.rb, test/rss/test_trackback.rb, + test/ruby/test_eval.rb, test/socket/test_socket.rb: ditto. + + * test/ruby/test_lambda (test_call_with_block): lambda makes new scope + for formal block parameter. + +Tue Sep 13 01:17:45 2005 Yukihiro Matsumoto + + * eval.c (proc_save_safe_level): no need to restrict safe level + memoize in $SAFE>=3. [ruby-dev:27050] + +Tue Sep 13 00:02:33 2005 Nobuyoshi Nakada + + * file.c (apply2files): stricter callback definition. + + * file.c (rb_path_check): constified. + +Mon Sep 12 20:53:06 2005 GOTOU Yuuzou + + * test/openssl/test_pkcs7.rb (test_enveloped): skip this test + to avoid a bug of PKCS7_enctypt() (only if ext/openssl is + compiled with OpenSSL-0.9.7d or earlier versions). + http://www.mail-archive.com/openssl-dev@openssl.org/msg17376.html + +Mon Sep 12 20:32:00 2005 Hirokazu Yamamoto + + * win32/win32.[hc] (rb_w32_argv_size, ...): reverted my latest change + to avoid incompatible pointer warning. (mingw32) + +Mon Sep 12 19:58:53 2005 Hirokazu Yamamoto + + * dln.c: avoid warning of const to non-const convertion. + [ruby-dev:27041] + + * eval.c, io.c, ruby.c: ditto. + +Mon Sep 12 19:26:29 2005 Hirokazu Yamamoto + + * array.c: moved to ANSI function style from K&R function style. + (used protoize on windows, so still K&R remains on #ifdef part of + other platforms. And `foo _((boo))' stuff is still there) + [ruby-dev:26975] + + * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, + enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, + io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, + prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, + regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, + sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, + version.c: ditto. + +Mon Sep 12 14:03:33 2005 Yukihiro Matsumoto + + * test/dbm/test_dbm.rb: remove locking test, which may not be + supported on some platforms. [ruby-dev:27030] + +Sun Sep 11 23:23:02 2005 Shugo Maeda + + * lib/net/imap.rb (starttls): supported the STARTTLS command. + +Sun Sep 11 22:18:07 2005 Masatoshi SEKI + + * bin/erb (ERB::Main#run): set ERB#filename so that it is used + when reporting syntax/runtime errors. Tabs converted to spaces. + +Sat Sep 10 22:34:19 2005 Yukihiro Matsumoto + + * array.c, bignum.c: protoize. + +Sat Sep 10 00:23:01 2005 Yukihiro Matsumoto + + * eval.c (splat_value): simpler and consistent array conversion + for argument splat. [yarv-dev:599] + +Fri Sep 9 16:45:25 2005 Nobuyoshi Nakada + + * string.c (rb_str_times): make empty strings to keep taintness, + and a little improvement. [ruby-dev:26900] + + * ext/iconv/iconv.c (iconv_try), ext/iconv/extconf.rb: get rid of meta + characters in command line option. fixed: [ruby-talk:155369] + + * ext/iconv/iconv.c: protoized. + +Thu Sep 8 14:58:11 2005 Yukihiro Matsumoto + + * merged a patch from Takahiro Kambe to + support DragonFly BSD. [ruby-dev:26984] + +Thu Sep 8 13:14:57 2005 Tadashi Saito + + * missing/strchr.c (strrchr): fixed a bug in detecting NUL in a + string. [ruby-dev:26985] + +Wed Sep 7 17:29:27 2005 GOTOU Yuuzou + + * ext/openssl/ossl_engine.c (ossl_engine_s_by_id): + OpenSSL::Engine.by_id calls given block before calling + ENGINE_init (block parameter is the return value of this method + itself). this functionality is useful to load dynamic shared + engines. + + require "openssl" + pkcs11 = OpenSSL::Engine.by_id("dynamic"){|e| + e.ctrl_cmd("SO_PATH", "/usr/lib/opensc/engine_pkcs11.so") + e.ctrl_cmd("LIST_ADD", "1") + e.ctrl_cmd("LOAD") + } + pkcs11.ctrl_cmd("PIN", "secret") + key = pkcs11.load_private_key + + * ext/openssl/ossl_engine.c (ossl_engine_ctrl_cmd): new method + OpenSSL::Engine#ctrl_cmd. it wraps ENGINE_ctrl_cmd_string. + + * ext/openssl/ossl_engine.c (ossl_engine_get_cmds): new method + OpenSSL::Engine#cmds. it returms engine command definitions. + +Wed Sep 7 15:48:37 2005 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (asn1str_to_str): new function. + + * ext/openssl/ossl_pkcs7.c: new class OpenSSL::PKCS7::RecipientInfo. + this class wraps PKCS7_RECIP_INFO struct. + + * ext/openssl/ossl_pkcs7.c: OpenSSL::PKCS7::Signer is renamed to + OpenSSL::PKCS7::SignerInfo. ("Signer" remains as an alias of + SignerInfo.) + + * test/openssl/test_pkcs7.rb: new file. + +Wed Sep 7 12:55:08 2005 Tanaka Akira + + * lib/open-uri.rb: abolish mod === tempfile to avoid a problem + [ruby-dev:26967]. + +Wed Sep 7 10:45:15 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_switch): convert all exceptions to + SystemExit. fixed: [ruby-core:05724] + + * eval.c (rb_thread_terminated): show backtrace before propagate + exceptions to main thread. + +Wed Sep 7 09:21:41 2005 Hirokazu Yamamoto + + * win32/win32.[hc] (rb_w32_utime): constified. + + * win32/win32.h (rb_w32_stat): added prototype. + + * win32/win32.[hc] (rb_w32_argv_size,rb_w32_join_argv,rb_w32_aspawn): + changed `char *const *' to `const char *const *'. (constify string) + +Wed Sep 7 08:35:04 2005 Nobuyoshi Nakada + + * Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not load + extension libraries. + + * bignum.c (bignew_1, bigadd): K&R style argument actually can't be + defined as char. + + * missing/vsnprintf.c: ANSI compiler supports const keyword. + + * ext/digest/sha2/extconf.rb: reject platforms which has inttypes.h + but no 64bit integer. + + * lib/mkmf.rb (what_type?): guesstimate type. + + * ext/etc/etc.c (setup_passwd), ext/etc/extconf.rb: pw_age might be + char*. fixed: [ruby-core:05470] + +Wed Sep 7 08:32:07 2005 Yukihiro Matsumoto + + * string.c (rb_str_times): should taint empty strings as well. + + * object.c (Init_Object): make class_variable_{get,set} public. + [ruby-dev:26965] + +Mon Sep 5 22:28:46 2005 Nobuyoshi Nakada + + * parse.y (stmt, mlhs_node, lhs, arg, method_call): aref_args might be + nothing. fixed: [ruby-dev:26952] + + * ext/ripper/eventids2.c: added new tokens. fixed: [ruby-dev:26952] + +Mon Sep 5 17:03:07 2005 Yukihiro Matsumoto + + * lib/find.rb: should raise ENOENT if root entry does not exist. + [ruby-list:41054] + + * lib/ostruct.rb: a patch from Florian Gross + merged to allow recursive inspect (and to_s) for OpenStruct. + [ruby-core:05532] + +Mon Sep 5 08:20:19 2005 Yukihiro Matsumoto + + * lib/observer.rb: a patch from nornagon + merged to allow arbitrary names for update methods. + [ruby-core:05416] + +Mon Sep 5 07:01:12 2005 GOTOU Yuuzou + + * ext/openssl/openssl/lib/openssl/buffering.rb (Buffering#do_write): + should clear data from the buffer which already been output. + +Sun Sep 4 15:01:35 2005 Minero Aoki + + * parse.y (f_arg): Ripper should not do semantic check. + [ruby-dev:26948] + +Sat Sep 3 23:52:35 2005 Yukihiro Matsumoto + + * eval.c (rb_f_fcall): new method to avoid inefficiency of + obj.instance_eval{send(...)} tricks. + +Sat Sep 3 13:59:31 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#descend): Pathname.new("./a/b/c").descend + didn't yield "." + (Pathname#ascend): ditto. + +Fri Sep 2 23:51:54 2005 Nobuyoshi Nakada + + * parse.y (f_arg): f_norm_arg is a VALUE in ripper, not an ID. + fixed: [ruby-dev:26942] + + * lib: do not use __send__ to access private methods. [ruby-dev:26935] + +Thu Sep 1 17:11:25 2005 Yukihiro Matsumoto + + * eval.c (rb_call0): wrong condition for $SAFE restoration. + +Thu Sep 1 14:12:45 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: On Tcl8.5, MultiTkIp#invoke_hidden doesn't + work (gives wrong order of arguments). + + * ext/tk/lib/multi-tk.rb: add MultiTkIp#invoke_hidden_on_namespace + to support '-namespace' option of 'interp invokehidden' command + on Tcl8.5. + +Wed Aug 31 14:41:30 2005 NAKAMURA Usaku + + * win32/Makefile.sub (OPTFLAGS): default global optimization to + disabled for all VC++ versions. fixed: [ruby-dev:26897] + +Wed Aug 31 10:36:09 2005 Hirokazu Yamamoto + + * process.c (proc_detach, proc_setmaxgroups): missing argument type + declaration. (I recommend ANSI-style function) + +Wed Aug 31 06:59:01 2005 Nobuyoshi Nakada + + * string.c (rb_str_scan): already String#scan behaves differently + regarding if block is given. + +Tue Aug 30 23:49:34 2005 Nobuyoshi Nakada + + * array.c, dir.c, enum.c, hash.c, io.c, range.c, string.c, struct.c: + let enumerable methods return Enumerator. [ruby-dev:26924] + + * intern.h (RETURN_ENUMERATOR): utility macro for enumerable methods. + +Tue Aug 30 23:25:45 2005 NAKAMURA, Hiroshi + + * lib/debug.rb: no need to restart at exit. + +Tue Aug 30 23:20:19 2005 Nobuyoshi Nakada + + * eval.c (rb_rescue2): initialization miss. fixed: [ruby-dev:26917] + + * lib/mkmf.rb (xsystem, xpopen): no longer expand by Config. + + * lib/mkmf.rb (link_command, cc_command, cpp_command): expand + variables at once, and quote hdrdir. fixed: [ruby-core:05680] + + * lib/mkmf.rb (libpathflag): quote paths. + +Tue Aug 30 19:34:27 2005 GOTOU Yuuzou + + * ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h, + ext/digest/sha1/sha1ossl.h: include to avoid + error in compilation with OpenSSL-0.9.8. [ruby-list:41068] + +Tue Aug 30 16:19:40 2005 Keiju Ishitsuka + + * lib/irb/init.rb: bug fix. [ruby-dev: 26920] + +Tue Aug 30 16:13:00 2005 Yukihiro Matsumoto + + * enum.c (enum_count): new method. [ruby-dev:26895] + +Tue Aug 30 12:45:15 2005 Yukihiro Matsumoto + + * eval.c (rb_f_send): do not call private methods if the receiver + is specified. [ruby-talk:153672] + +Mon Aug 29 19:47:18 2005 Hirokazu Yamamoto + + * lib/rdoc/usage.rb: improper exceptions. [ruby-dev:26870] + + * lib/rdoc/usage.rb: support the case when non-ruby code exists before + shebang. (this is needed when ri.bat is executed on windows) + +Mon Aug 29 18:58:05 2005 Keiju Ishitsuka + + * lib/irb/init.rb: make IRB -I option that is same befavior for ruby. + [ruby-dev:26872] + + * lib/irb/locale.rb: support to print help message when OS locale is + ja_JP.utf-8. [ruby-dev:26872] + +Mon Aug 29 01:43:05 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#descend): new method. + (Pathname#ascend): ditto. + +Mon Aug 29 00:35:09 2005 Tanaka Akira + + * lib/time.rb: require 'date/format' instead of 'parsedate'. + (Time.parse): extract fractional seconds using Date._parse. + (Time.strptime): extract fractional seconds using Date._strptime. + [ruby-talk:153859] + +Sat Aug 27 20:13:31 2005 Hirokazu Yamamoto + + * ext/curses/curses.c ({curses,window}_clrtoeol): added. suggested + by Reyn Vlietstra. + + * ext/curses/curses.c: chtype in curses is not `char', rahter `long'. + [ruby-Bugs:2298] + + * ext/curses/view.rb: String =~ String is deprecated. + +Thu Aug 25 15:48:58 2005 Hirokazu Yamamoto + + * ext/win32ole/win32ole.c: suppress warnings. (win32) + +Wed Aug 24 11:01:26 2005 NAKAMURA Usaku + + * test/logger/test_logger.rb (test_shifting_size): should close log + device before unlink, since some platform cannot unlink opened + file. + +Tue Aug 23 06:07:02 2005 GOTOU Yuuzou + + * ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512. + these features are enabled if this library is compiled with + OpenSSL 0.9.8 or later. + + * test/openssl/test_digest.rb: add test for new digests. + +Tue Aug 23 05:47:04 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): try to decode + the argument as a string. + + * ext/openssl/ossl_ns_pki.c (ossl_spki_to_der): new method. + + * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): should + set @time to avoid warning. + + * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths, + X509_STORE_add_cert, X509_STORE_add_crl): should raise error if + wrapped functions fails. + + * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): fix error message. + + * ext/openssl/ossl_x509req.c (ossl_x509req_set_attributes): get rid + of unused variable. + + * test/openssl/test_ns_spki.rb: add new file. + + * test/openssl/test_x509store.rb: add test for error. + +Tue Aug 23 01:11:40 2005 Hirokazu Yamamoto + + * sprintf.c (ruby__sfvwrite): should move `buf' to the end of + `result'. [ruby-dev:26859] + +Mon Aug 22 23:51:19 2005 Yukihiro Matsumoto + + * parse.y: ONIG_OPTION_CAPTURE_GROUP conflicts with + RE_OPTION_ONCE. [ruby-dev:26852] + +Mon Aug 22 20:11:35 2005 Nobuyoshi Nakada + + * missing/vsnprintf.c (BSD__sprint): needs to call vwrite function + pointer. fixed: [ruby-dev:26854] + +Sat Aug 20 23:55:25 2005 Yukihiro Matsumoto + + * parse.y (parser_yylex): update paren_nest for brackets []. + +Sun Aug 21 00:10:23 2005 NAKAMURA, Hiroshi + + * lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add + a workaround for importing an WSDL whose path begins with drive + letter. [ruby-dev:26242] + +Sat Aug 20 22:05:25 2005 K.Kosako + + * regexec.c (code_is_in_cclass_node): check code size. + [ruby-dev:26840] + +Sat Aug 20 22:37:13 2005 NAKAMURA, Hiroshi + + * lib/logger.rb (write, shift_log?, shift_log): file shifting race + condition bug fixed. [ruby-dev:26764] + + * test/logger/test_logger.rb: tests. + +Fri Aug 19 18:13:39 2005 Tanaka Akira + + * lib/time.rb (Time.apply_offset): fix a problem with last day of + month. reported by Lucas Nussbaum. [ruby-talk:152866] + +Thu Aug 18 11:05:36 2005 NAKAMURA Usaku + + * win32/win32.c (socketpair_internal): need to call open_ifs_socket() + to create sockets instead of winsock's socket(). + fixed: [yarv-dev:581] + +Wed Aug 17 23:58:05 2005 Nobuyoshi Nakada + + * eval.c (terminate_process): take String message. + + * eval.c (rb_thread_switch): propagate the exception caused thread + termination directly. fixed: [ruby-core:05552] + +Wed Aug 17 21:20:05 2005 NARUSE, Yui + + * ext/nkf/lib/kconv.rb: ensure that symbol_to_option is private_class_method + and all other methods are module_function + fixed: [ruby-dev:26808] + +Wed Aug 17 00:05:46 2005 Yukihiro Matsumoto + + * eval.c (rb_add_method): preserve safe level in the environment + where a method is defined . + + * eval.c (rb_call0): restore preserved safe level in the method + execution. + + * parse.y (lambda): need separate block variable stack + manipulation and lpar_beg maintenance. based on a patch found + in [ruby-core:05551] from Mauricio Fernandez . + + * parse.y (parser_yylex): adjust lpar_beg after tLAMBEG and + kDO_LAMBDA. [ruby-core:05551] + +Mon Aug 15 07:24:38 2005 Nobuyoshi Nakada + + * intern.h (rb_check_to_integer): add declaration. + + * object.c (rb_to_integer, rb_check_to_integer): argument constified. + +Mon Aug 15 00:38:51 2005 Nobuyoshi Nakada + + * eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE. + [ruby-dev:26800] + + * range.c (range_check, range_init): reduce uselse exceptions. + +Mon Aug 15 00:34:11 2005 Yukihiro Matsumoto + + * parse.y (yycompile): remove unreachable code. [yarv-dev:570] + +Sat Aug 13 22:16:12 2005 Minero Aoki + + * lib/fileutils.rb (remove_entry_secure): forgot final chdir. + +Sat Aug 13 22:07:49 2005 Minero Aoki + + * lib/fileutils.rb (remove_entry_secure): uses chdir(2) and check + if current directory is correct. [ruby-dev:26100] [ruby-dev:26226] + +Sat Aug 13 21:11:05 2005 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_VARIANT class. + + * ext/win32ole/tests/testall.rb: ditto. + + * ext/win32ole/tests/testOLEVARIANT.rb: ditto. + +Sat Aug 13 18:51:26 2005 Nobuyoshi Nakada + + * eval.c (rb_block_pass): distinguish current block from others. + fixed: [ruby-dev:26274] + + * ext/stringio/stringio.c (strio_set_string): disallow nil. + http://www.rubyist.net/~nobu/t/20050811.html#c05 + +Sat Aug 13 08:01:59 2005 NARUSE, Yui + + * ext/nkf/lib/kconv.rb: Kconv.kconv is now alias of Kconv.conv + * ext/nkf/lib/kconv.rb: remove nkf dependend symbols fomr SYMBOL_TO_OPTION + +Fri Aug 12 17:06:53 2005 Yukihiro Matsumoto + + * parse.y (f_larglist): allow optional arguments even when + parentheses are omitted. based on Nobu's patch from + http://www.rubyist.net/~nobu/t/20050805.html + + * parse.y (parser_yylex): update & maintain lpar_beg for detect + lambda parameters. + +Thu Aug 11 23:29:03 2005 Nobuyoshi Nakada + + * ext/stringio/stringio.c: keep holding string after closed. + +Thu Aug 11 20:48:40 2005 Tadashi Saito + + * numeric.c (fix_equal, fix_cmp, fix_gt, fix_ge, fix_lt, fix_le): + reduce coercing when a method knows about a operand type. + [ruby-dev:26789] + +Thu Aug 11 13:01:48 2005 Kouhei Sutou + + * lib/rss: fixed sort bug. [ruby-list:41018] + + * lib/rss/1.0.rb (RSS::RDF::Channel#setup_maker_attributes): + removed self. + + * lib/rss/maker/base.rb (RSS::Maker::ItemsBase#<=>): use #date + instead of @date. + (RSS::Maker::Base::self.def_array_element): added #size. + + * lib/rss/maker/1.0.rb + (RSS::Maker::RSS10::Channel#to_rss, + RSS::Maker::RSS10::Items::Item#to_rss): cleared dc_dates set + upped by using #date. + + * lib/rss/maker/dublincore.rb + (RSS::Maker::ChannelBase, RSS::Maker::ItemsBase::ItemBase): + fixed opposite alias. + + * test/rss/test_setup_maker_1.0.rb + (RSS::TestSetupMaker10::test_setup_maker_items_sort): added some + tests for RSS::Maker::ItemsBase#do_sort. + +Wed Aug 10 12:01:20 2005 Yukihiro Matsumoto + + * lib/delegate.rb: simplifies Delegator classes; SimpleDelegator + now uses method_missing for all methods. + +Wed Aug 10 10:38:50 2005 Yukihiro Matsumoto + + * bignum.c (rb_big_mul0): multiply two numbers (x, y) without + normalizing the result. x should be a big number. + [ruby-dev:26778] + + * bignum.c (rb_big_pow): use rb_big_mul0() instead of + rb_big_mul(). + + * array.c (rb_ary_or, rb_ary_and, rb_ary_plus, rb_ary_diff): + revert the change on 2005-08-03. Set operation on other item + should have in separate methods. + + * parse.y (shadowing_lvar_gen): warn when arguments shadows + external local variables. + + * parse.y (f_opt): optional arguments should not clobber external + local variables. + + * parse.y (f_rest_arg): rest arguments should not clobber external + local variables. + +Wed Aug 10 10:29:40 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: fix bug on handling __ruby2val_optkeys(). + + * ext/tk/lib/tk/itemconfig.rb: fix bug on handling + __item_ruby2val_optkeys(). + + * ext/tk/lib/tk/canvas.rb: didn't check __item_ruby2val_optkeys(). + + * ext/tk/lib/tkextlib/blt/component.rb: ditto. + +Tue Aug 9 21:53:17 2005 Nobuyoshi Nakada + + * eval.c (formal_assign): let default values override + arguments to zsuper. fixed: [ruby-dev:26743] + +Tue Aug 9 20:30:19 2005 Tadashi Saito + + * bignum.c (rb_big_coerce): allow bignum x bignum coercing. + [ruby-dev:26778] + +Tue Aug 9 15:12:04 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: remove dangerous 'rb_jump_tag's. + + * ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to + help to convert option values between ruby and tcl. + + * ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and + __item_ruby2val_optkeys to help to convert option values between + ruby and tcl. + + * ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable' + option (for the reason of backward compatibility). + + * ext/tk/lib/tk/composite.rb: clarify the arguments of super(). + + * ext/tk/lib/tk/spinbox.rb: ditto. + + * ext/tk/lib/tk/text.rb: ditto. + + * ext/tk/lib/tk/validation.rb: ditto. + + * ext/tk/lib/tkextlib/*: support to treat tkvariable-type + configure options. + +Tue Aug 9 08:24:05 2005 Mauricio Fernandez + + * parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamic + variable lambda arguments. [ruby-core:05540] + +Mon Aug 8 22:13:48 2005 Nobuyoshi Nakada + + * eval.c (assign): deal with new block argument. + fixed: [ruby-core:05536] + + * eval.c (rb_node_arity): follow change of NODE_ARGS. + fixed: [ruby-dev:26761] + +Mon Aug 8 21:28:13 2005 Hirokazu Yamamoto + + * test/ruby/test_fnmatch.rb: separated from test_file.rb. + +Mon Aug 8 20:40:35 2005 NAKAMURA, Hiroshi + + * test/ruby/test_method.rb: added. [ruby-dev:26761] + +Mon Aug 8 01:26:37 2005 Mauricio Fernandez + + * parse.y (f_larglist): mistake in syntax rule. [ruby-core:05535] + +Mon Aug 8 05:16:55 2005 GOTOU Yuuzou + + * ext/openssl/ossl.c (ossl_raise): should use ERR_peek_last_error + to get last error on the current thread. And should report + if errors are on the stack while OpenSSL.debug is true. + + * ext/openssl/ossl.c (ossl_get_errors): new method for debugging + this library. + +Mon Aug 8 05:15:19 2005 GOTOU Yuuzou + + * lib/webrick/httpproxy.rb (HTTPProxyServer#intialize), + lib/webrick/httpserver.rb (HTTPServer#intialize), + lib/webrick/httpservlet/cgihandler.rb (CGIHandler#initialize), + lib/webrick/httpservlet/erbhandler.rb (ERBHandler#initialize), + lib/webrick/httpservlet/filehandler.rb(DefaultFileHandler#initialize): + super (called with no arguments) takes default value of optional + arguments. [ruby-dev:26743] + + * lib/webrick/httputils.rb: add a media-type "text/html" for .xhtml. + +Sun Aug 7 23:52:39 2005 NAKAMURA, Hiroshi + + * test/ruby/test_super.rb: added optional arg tests. [ruby-dev:26743] + the tests expects 1.8 behavior at this time. + +Sat Aug 6 12:35:24 2005 Hidetoshi NAGAI + + * ext/tk/lib/{tk.rb,tk/itemconfig.rb}: configure creates + TkVariable if key name is 'variable' or 'textvariable' + by default. [ruby-dev:26749] + + * ext/tk/lib/tk/{label,radiobutton}.rb: removed its own + {variable,textvariable} function. + + * ext/tk/lib/tk/variable.rb: retains backward conpatibility. + +Fri Aug 5 12:48:31 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c: fixed memory leak when tk_funcall raised + exception. (copies argv into heap in tk_funcall instead of + caller) + +Fri Aug 5 12:36:40 2005 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): need to convert path separetor + before invoking install command. + +Fri Aug 5 08:08:05 2005 Yukihiro Matsumoto + + * eval.c (return_jump): fix "can't across thread" error message + when no thread associated. + http://www.namikilab.tuat.ac.jp/~sasada/diary/200507.html#d31 + +Fri Aug 5 00:25:12 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c: refactoring - extract ruby string <-> + tcl object conversion as get_str_from_obj and get_obj_from_str. + +Fri Aug 5 00:19:33 2005 Nobuyoshi Nakada + + * enumerator.c (Init_Enumerator): provided features should have + extensions. + + * eval.c (rb_feature_p): returns type of the feature instead of + extension. + + * eval.c (search_required): ruby library should be prior to statically + linked extentions. fixed: [ruby-dev:26711] + + * eval.c (formal_assign): returns position of rest arguments variable. + + * parse.y (f_rest_arg): use anonymous variable for rest arguments. + fixed: [ruby-dev:26647] + + * extmk.rb (extmake): needs to be wrapped in an Array. + +Thu Aug 4 20:03:18 2005 Tadashi Saito + + * numeric.c (Init_Numeric): do not share implementation among + Fixnum#/ and Fixnum#div. [ruby-core:05531] + +Thu Aug 4 18:38:36 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: cannot compile for Tcl7.6/Tk4.2. + + * ext/tk/tcltklib.c: add nativethread consistency check. + + * ext/tk/stubs.c: ditto. + + * ext/tk/lib/tk.rb: forgot to define TclTkIp.encoding and encoding= + when Tcl is 7.6 or 8.0. + + * ext/tk/lib/tk/wm.rb: support to make some methods as options of + root or toplevel widget. [ruby-talk:150336] + + * ext/tk/lib/tk/root.rb: ditto. + + * ext/tk/lib/tk/toplevel.rb: ditto. + + * ext/tk/lib/tkextlib/SUPPRT_STATUS: update RELEASE_DATE + +Thu Aug 4 13:30:15 2005 Yukihiro Matsumoto + + * numeric.c (fix_div): should not convert the result into + integer. [ruby-core:05524] + +Thu Aug 4 08:03:39 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): should not modify $mflags for each + extentions. + +Thu Aug 4 00:25:48 2005 Nobuyoshi Nakada + + * common.mk, Makefile.in, {bcc32,win32,wince}/Makefile.sub: integrated + macro definitions. + + * bcc32/Makefile.sub: LIBRUBY_SO should use DLDOBJS, not EXTOBJS. + + * {win32,wince}/Makefile.sub: separate config.h for compiler versions. + +Thu Aug 4 00:24:59 2005 Nobuyoshi Nakada + + * sprintf.c: replacing is no longer needed. + +Wed Aug 3 21:59:16 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/variable.rb: TkVariable#trace didn't work on + TkVariable retrived from TkVariable.new_hash.ref. [ruby-dev:26721] + +Wed Aug 3 12:40:28 2005 Tadashi Saito + + * numeric.c (fix_plus): reduce coercing when a method knows about + a operand type. [ruby-dev:26723] + + * numeric.c (fix_minus, fix_mul, fix_quo, fix_div, fix_mod, + fix_divmod, fix_pow): ditto. + + * bignum.c (rb_big_div, rb_big_modulo): export to reduce + coercing. + +Wed Aug 3 10:13:52 2005 NAKAMURA Usaku + + * configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF, + HAVE_VSNPRINTF): use win32/win32.c's implementation instead of + missing/vsnprintf.c's. + + * win32/win32.[ch] (rb_w32_snprintf, rb_w32_vsnprintf): reverted. + +Wed Aug 3 10:05:08 2005 Nobuyoshi Nakada + + * configure.in: check vsnprintf() and snprintf(). + + * sprintf.c, missing/vsnprintf.c: made vsnprintf() and snprintf() + private. fixed: [ruby-dev:26651] + +Wed Aug 3 08:22:13 2005 Yukihiro Matsumoto + + * ext/socket/socket.c (ruby_connect): revert [ruby-talk:111654] + changes at 2004-09-07. [ruby-dev:26656] + +Wed Aug 3 06:53:35 2005 Yukihiro Matsumoto + + * array.c (rb_ary_or): wraps the operand in an array if it is not + an array. [ruby-talk:150495] [EXPERIMENTAL] + + * array.c (rb_ary_and, rb_ary_plus, rb_ary_diff): ditto. + +Tue Aug 2 10:23:12 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c: use Tcl_[GS]etVar2Ex instead of + Tcl_Obj[GS]etVar2. (avoid Tcl_NewStringObj on supported platforms) + + * ext/tk/tcltklib.c: use ip_{get,set,unset}_variable2_core from + ip_{get,set,unset}_variable. + + * ext/tk/tcltklib.c: replaced Tcl_Panic with rb_bug. + +Tue Aug 2 01:40:38 2005 GOTOU Yuuzou + + * lib/ping.rb (Ping.pingecho): should rescue StandardError. + [ruby-dev:26677] + +Mon Aug 1 19:02:23 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c: refactoring - replaced rb_ivar_defined & + rb_ivar_get with single rb_attr_get call. + +Mon Aug 1 18:44:08 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c (Tcl_GetStringResult): refactoring - define + alternative macro on Tcl7.x or earlier. + +Mon Aug 1 13:53:55 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c (deleted_ip): refactoring - interpreter + deletion check. [ruby-dev:26664] + +Mon Aug 1 01:08:21 2005 Masatoshi SEKI + + * lib/drb/drb.rb (check_insecure_method): use private_methods and + protected_methods instead of respond_to? to check method visibility. + [ruby-dev:26616] + + * test/drb/drbtest.rb: ditto. + + * test/drb/ut_drb.rb: ditto. + +Sat Jul 30 18:49:44 2005 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_TYPE#ole_typelib, + WIN32OLE_TYPE#implemented_ole_types. + + * ext/win32ole/tests/testOLETYPE.rb: ditto. + +Fri Jul 29 16:12:02 2005 Keiju Ishitsuka + + * lib/irb/context.rb: fix `irb --readline` option. [ruby-dev:40955] + +Fri Jul 29 09:59:38 2005 Nobuyoshi Nakada + + * eval.c (rb_call0): fix calling zsuper from a method with anonymous + rest argument. [ruby-dev:26639] + + * eval.c (rb_yield_0): push yielded node instead of yielding. + fixed: [yarv-dev:549] + +Thu Jul 28 21:49:17 2005 IWATSUKI Hiroyuki + + * parse.y (rb_parser_end_seen_p): exclude from ripper. + + + * sprintf.c (clearerr): remove standard macro before re-definition. + + +Thu Jul 28 18:09:55 2005 Hidetoshi NAGAI + + * ext/tk/stubs.c: When --enable-tcltk-stubs, the initialize + routine creates a Tcl/Tk interpreter and deletes it. However, + init cost of Tk's MainWindow is not so small. And that makes it + impossible to use libraries written with Tcl functions only on + an environment without a graphical display. This changes support + delaying initalization of Tk_Stubs until the script needs Tk. + + * ext/tk/stubs.h: New file. Define prototypes and return codes of + functions on stubs.c. + + * ext/tk/tcltklib.c: Support delaying initalization of Tk_Stubs + until the script needs Tk. + + * ext/tk/tcltklib.c: Show friendly error messages for errors on + initialization. + + * ext/tk/tcltklib.c: Avoid SEGV on ip_finalize() when ruby is + exiting and $DEBUG is true. (Not fix. If you know the reason of + why, please fix it.) + + * ext/tk/tkutil/tkutil.c (ary2list, ary2list2): bug fix on handling + of encoding. + + * ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string and bg_eval_string + don't work propery. + + * ext/tk/lib/tk.rb: Forget extending Tk::Encoding module to Tk. + + * ext/tk/lib/tk/variable.rb: TkVarAccess fails to initialize the + object for an element of a Tcl's array variable. + +Thu Jul 28 17:23:37 2005 Yukihiro Matsumoto + + * parse.y (f_larglist): allow block argument in lambda parameter + list without parenthesis. + +Thu Jul 28 17:14:01 2005 Yukihiro Matsumoto + + * hash.c (each_i): typo fixed. [ruby-dev:26622] + +Thu Jul 28 15:04:11 2005 Yukihiro Matsumoto + + * parse.y (f_arg): better argument name duplication check + + * parse.y (new_args_gen): factored out name duplication check for + optional and rest arguments. + + * parse.y (new_bv_gen): allow shadowing outer local variables; + warning remains. + +Thu Jul 28 13:46:06 2005 Nobuyoshi Nakada + + * parse.y (ripper_warningS): the argument was omitted. + [ruby-dev:26621] + +Thu Jul 28 11:30:57 2005 Yukihiro Matsumoto + + * parse.y (f_larglist): allow bv_decl at the end of lambda + argument list. [EXPERIMENTAL] + + * parse.y (new_bv_gen): allow local variable shadowing, with + warning in verbose mode. + +Wed Jul 27 23:23:54 2005 Yukihiro Matsumoto + + * gc.c (obj_free): make message format consistent with one from + gc_mark(). [ruby-talk:149668] + + * sprintf.c (quad_t): prepare quad_t as well. [ruby-talk:149668] + +Wed Jul 27 22:11:37 2005 Kouhei Sutou + + * sample/rss/tdiary_plugin: removed. because the plugin + is imported in the tDiary plugin packages. + +Wed Jul 27 19:11:53 2005 Minero Aoki + + * lib/fileutils.rb (cd): follow :noop option change. (This patch + is contributed by Doug Kearns) + +Wed Jul 27 16:25:59 2005 Yukihiro Matsumoto + + * parse.y (lambda): Perl6 style -> lambda expression. [NEW] + [VERY EXPERIMENTAL] + +Wed Jul 27 10:43:14 2005 Nobuyoshi Nakada + + * gc.c (id2ref): must not assign pointers to long int. use + LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. + [ruby-talk:149645] + + * ruby.h: use LONG_LONG to simplify the change. + [ruby-talk:149645] + +Wed Jul 27 10:59:02 2005 Yukihiro Matsumoto + + * dir.c (dir_each): rewinddir(3) before iteration. + [ruby-talk:149628] + +Wed Jul 27 02:34:58 2005 Yukihiro Matsumoto + + * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. + [ruby-talk:149553] + + * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit + size pointer. [ruby-talk:149553] + +Tue Jul 26 22:41:28 2005 Minero Aoki + + * ext/ripper/lib/ripper/sexp.rb: new method Ripper.sexp_raw. + + * ext/ripper/lib/ripper/sexp.rb (Ripper.sexp): returns more + readable tree. This is suggested by Kirill A. Shutemov. + +Tue Jul 26 22:05:12 2005 Minero Aoki + + * lib/net/http.rb: merge a patch contributed by Daniel Berger, + with some modification. (RubyForge #2128) + +Tue Jul 26 18:11:33 2005 Yukihiro Matsumoto + + * ruby.h: support LLP64 model. [ruby-talk:149524] + +Tue Jul 26 12:57:40 2005 GOTOU Yuuzou + + * ext/openssl/openssl_missin.c: include before + to avoid compilation error of mswin32. + suggested by NAKAMURA Usaku. + +Mon Jul 25 23:48:55 2005 NAKAMURA Usaku + + * win32/win32.[ch]: (rb_w32_vsnprintf, rb_w32_snprintf): removed. + +Mon Jul 25 21:30:46 2005 Nobuyoshi Nakada + + * common.mk: Borland MAKE doesn't look for file names which have paths + from VPATH. fixed: [ruby-dev:26604] + + * ruby.h (NORETURN, DEPRECATED): moved just after config.h. + + * {win32,wince}/Makefile.sub: vsnprintf() is in missing now. + + * {bcc32,win32,wince}/Makefile.sub: moved CPPFLAGS only for ruby + source to XCFLAGS. + +Mon Jul 25 14:10:02 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: fix en-bugged part in the last commit. + +Mon Jul 25 13:45:18 2005 NAJIMA Hiroki + + * io.c: check HAVE_SYS_IOCTL_H before including the header. + [ruby-dev:26610] + +Sat Jul 23 16:48:12 2005 GOTOU Yuuzou + + * ext/openssl/ossl_engine.c (ossl_engine_s_load): should check + OPENSSL_NO_STATIC_ENGINE. + +Sat Jul 23 11:46:30 2005 Tanaka Akira + + * eval.c (rb_fd_select): the all three fd_sets must be long enough for + select. fixed: [ruby-talk:149059] + +Sat Jul 23 10:01:41 2005 Nobuyoshi Nakada + + * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String, + using missing/vsnprintf.c. [ruby-dev:26580] + + * missing/vsnprintf.c: made the output changeable. + +Fri Jul 22 21:06:08 2005 Tadashi Saito + + * bignum.c (rb_big_eq): reduce isnan(). [ruby-dev:26600] + + * numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto. + +Fri Jul 22 15:02:39 2005 Kouhei Sutou + + * lib/rss/rss.rb: moved copyright description to lib/rss.rb. + + * lib/rss.rb: added for convenience. + + * sample/rss/re_read.rb: added #to_s sample. + + * sample/rss/blend.rb: use 'require "rss"' instead of + 'require "rss/*"'. + * sample/rss/list_description.rb: ditto. + * sample/rss/rss_recent.rb: ditto. + * sample/rss/tdiary-plugin/rss-recent.rb: ditto. + + * sample/rss/tdiary-plugin/rss-recent.rb: 0.0.6 -> 0.0.7. + +Fri Jul 22 14:37:43 2005 Kouhei Sutou + + * lib/rss/parser.rb (RSS::Parser#initialize): accept HTTP/FTP + URI and local file path too. + + * test/rss/test_parser.rb (RSS::TestParser#test_parse): test + for the above. + +Fri Jul 22 07:01:42 2005 Hidetoshi NAGAI + + * ext/tk/tkutil/tkutil.c (tk_conv_args): forget to revert + thread_critical and gc_disable when raise ArgumentError. + + * ext/tk/lib/remote-tk.rb: RemoteTkIp doesn't need to include TkUtil. + + * ext/tk/tcltklib.c: add TclTkIp#has_mainwindow? method. + + * ext/tk/lib/tk.rb: add Tk.has_mainwindow? method. + + * ext/tk/lib/multi-tk.rb: add MultiTkIp#has_mainwindow? method. + + * ext/tk/lib/remote-tk.rb: add RemoteTkIp#has_mainwindow? method. + + * ext/tk/lib/multi-tk.rb: slave IP fail to exit itself when $SAFE==4. + + * ext/tk/lib/multi-tk.rb: remove constants from MultiTkIp module to + avoid access from external. + + * ext/tk/lib/multi-tk.rb: check_root flag is ignored on slave IPs' + mainloop. + + * ext/tk/lib/multi-tk.rb: hang-up Tk.mainloop called on a slave IP + with $SAFE==4. + + * ext/tk/lib/multi-tk.rb: MultiTkIp#bg_eval_proc doesn't work + properly. + + * ext/tk/lib/multi-tk.rb: add MultiTkIp#set_cb_error(proc) and + cb_error(exc) to log errors at callbacks on safe slave IPs. + + * ext/tk/lib/multi-tk.rb: fail to get an available slave IP object + when call Tk.mainloop in the block which is given to new_* method, + because cannot finish initialize while the root widget is alive. + + * ext/tk/lib/multi-tk.rb: fail to control a slave IP when Tk.mainloop + runs on the IP. + +Thu Jul 21 01:00:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c,config.h}: + import 1.76 + [ruby-dev:26592] nkf constification + +Wed Jul 20 19:18:52 2005 NAKAMURA Usaku + + * io.c (S_ISREG): need to define S_ISREG before it is used first. + +Wed Jul 20 18:33:15 2005 Hirokazu Yamamoto + + * io.c (wsplit_p): patch for the environment where + fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case, + set FMODE_WSPLIT without fcntl check. [ruby-dev:26566] + +Wed Jul 20 18:07:11 2005 Tanaka Akira + + * io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLIT + by F_SETFL. + +Wed Jul 20 10:04:51 2005 Yukihiro Matsumoto + + * variable.c (rb_class_path): need to adjust snprintf() len for + teminating NUL. [ruby-dev:26581] + +Wed Jul 20 03:58:52 2005 Hirokazu Yamamoto + + * ext/socket/socket.c: sorry, BeOS also uses HAVE_CLOSESOCKET, + so reverted. + + * ext/socket/extconf.rb: should not define HAVE_CLOSESOCKET + on windows. + +Wed Jul 20 03:12:21 2005 Hirokazu Yamamoto + + * ext/socket/socket.c: should not undef close() on win32. + it's defined to rb_w32_close(), otherwise handle leaks. + [ruby-Bugs-2131] + +Wed Jul 20 00:48:16 2005 Yukihiro Matsumoto + + * error.c (syserr_initialize): don't use str before StringValue() + check. [ruby-dev:26579] + +Tue Jul 19 22:47:29 2005 Yukihiro Matsumoto + + * error.c (syserr_initialize): add 1 byte for snprintf() size for + NUL at the end. [ruby-dev:26574] + +Tue Jul 19 17:16:34 2005 Yukihiro Matsumoto + + * signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec(). + [ruby-dev:26440] + + * io.c (rb_io_inspect): replace sprintf() with "%s" format all + over the place by snprintf() to avoid integer overflow. + +Tue Jul 19 14:10:50 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c: rbtk_eventloop_depth is used as int. + + * ext/tk/tcltklib.c: rbtk_pending_exception is tested with + NIL_P, so should assign Qnil instead of 0 (Qfalse). + + * ext/tk/tcltklib.c (ip_invoke_real): fixed memory leak when + ip is deleted. + +Tue Jul 19 13:19:46 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/variable.rb: For symmetry, add TkVariable#string. It + returns a string even if the default value type of the TkVariable + object is not "string". + +Mon Jul 18 21:39:18 2005 Hirokazu Yamamoto + + * eval.c (rb_call0): make the pointer to NODE volatile + instead of NODE itself. + +Mon Jul 18 14:32:21 2005 Tanaka Akira + + * eval.c (rb_call0): make body volatile to avoid possible optimization + problem. + [ruby-dev:26195] + +Mon Jul 18 12:23:27 2005 Hirokazu Yamamoto + + * ext/io/wait/wait.c: wrong backport from trunk, and compile error on + platforms fd_set is not a bit set. fixed: [ruby-dev:26562] + +Mon Jul 18 09:36:25 2005 Tanaka Akira + + * rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant. + + * io.c (wsplit_p): new function. + (io_fflush): split writing data by PIPE_BUF if wsplit_p is true in + multi-threaded mode. + (io_fwrite): ditto. + [ruby-dev:26540] + +Mon Jul 18 05:00:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: import nkf.c 1.73 + fix: TestKconv 1F + +Sun Jul 17 13:46:54 2005 Nobuyoshi Nakada + + * ext/io/wait/extconf.rb, ext/io/wait/wait.c: Win32 platforms support. + +Sat Jul 16 23:43:16 2005 Nobuyoshi Nakada + + * enumerator.c (Init_Enumerator): wrong argument specs. + [ruby-core:05481] + +Sat Jul 16 15:52:50 2005 Hirokazu Yamamoto + + * win32/win32.[hc]: constified socket functions. [ruby-dev:26553] + +Fri Jul 15 23:59:03 2005 Nobuyoshi Nakada + + * lib/rdoc/parsers/parse_c.rb (handle_class_module): handle a + module enclosed in a built-in module. fixed: [ruby-talk:148239] + + * lib/rdoc/parsers/parse_c.rb (find_body): allow macros as methods. + + * lib/rdoc/parsers/parse_c.rb (find_call_seq): allow :nodoc: modifier + in C. [ruby-core:04572] + +Fri Jul 15 23:20:03 2005 Nobuyoshi Nakada + + * enumerator.c (Init_Enumerator): use an internal directly. + +Fri Jul 15 07:58:10 2005 GOTOU Yuuzou + + * lib/webrick/server.rb (WEBrick::GenericServer#accept_client): + sockets should be non-blocking mode. [ruby-dev:26405] + + * lib/webrick/utils.rb (WEBrick::Utils.set_non_blocking): new method. + +Fri Jul 15 00:11:36 2005 Nobuyoshi Nakada + + * enum.c (enumeratorize): create new enumerator for current method if + no block is given. + + * enumerator.c: moved from ext/enumerator. + +Thu Jul 14 18:27:35 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_strerror): should return correct message + for ENAMETOOLONG and ENOTEMPTY. (bcc32) [ruby-dev:26533] + + * win32/win32.c (rb_w32_strerror): stripped CR LF on the tail. + (bcc32) [ruby-dev:26533] + +Thu Jul 14 00:45:42 2005 Nobuyoshi Nakada + + * LEGAL (ext/nkf/nkf-utf8): updated from nkf1.7 to nkf-utf8. + +Wed Jul 13 22:44:00 2005 Nobuyoshi Nakada + + * parse.y: remove static variables. [ruby-dev:26530] + +Wed Jul 13 19:36:29 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_mkdir): should set EEXIST (not EACCES) + if file or directory already exists. (bcc32) [ruby-dev:26508] + + * win32/win32.c (rb_w32_rmdir): should set ENOTDIR (not EINVAL) + if it is not directory. (bcc32, win32) + + * win32/win32.c (rb_w32_rmdir, rb_w32_unlink): restore + FILE_ATTRIBUTE_READONLY flag on function failure. + +Wed Jul 13 12:40:00 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: TclTkLib.do_one_event doesn't work. + + * ext/tk/lib/tk.rb: Tk.thread_update is available. + +Tue Jul 12 23:32:11 2005 Nobuyoshi Nakada + + * lib/mkmf.rb: keep curdir unexpanded. + +Mon Jul 11 23:50:17 2005 Nobuyoshi Nakada + + * eval.c, intern.h (rb_proc_call, rb_obj_method, rb_method_call): + export. + + * ext/enumerator/enumerator.c (enumerator_with_index): [EXPERIMENTAL] + added a new method Enumerator#with_index. [ruby-talk:147728] + +Mon Jul 11 08:31:29 2005 Nobuyoshi Nakada + + * regparse.c (fetch_escaped_value): mask values following \c in + regexp. fixed: [ruby-dev:26500] + +Sun Jul 11 05:18:17 2005 Michael Neumann + + * lib/xmlrpc/server.rb (XMLRPC::Server): Switch from GServer over to + WEBrick. This makes file lib/xmlrpc/httpserver.rb obsolete (at least it is + no further used by the XML-RPC library). + +Mon Jul 11 02:50:23 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): + mistook to merge the patch of [ruby-dev:26235] at + revision 1.11. + +Sun Jul 10 23:58:04 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#unlink): try Dir.unlink first to + avoid unlink a directory by root. + cf. [ruby-dev:26237] + +Sun Jul 10 12:47:01 2005 Nobuyoshi Nakada + + * lib/debug.rb (debug_command): added a deficient format specifier. + fixed: [ruby-core:05419] + +Sat Jul 9 22:02:37 2005 Masaki Suketa + + * ext/win32ole/win32ole.c (ole_method_dispid): convert dispid + in Ruby and C by INT2NUM and NUM2INT. + + * ext/win32ole/win32ole.c (ole_invoke2): ditto. + + * ext/win32ole/test/testWIN32OLE.rb: ditto. + + * ext/win32ole/test/testOLEMETHOD.rb: ditto. + +Fri Jul 8 15:45:04 2005 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.4 -> 0.1.5. + + * test/rss/test_version.rb (RSS::TestVersion#test_version): + ditto. + + * lib/rss/0.9.rb (RSS::Rss::Channel::Item::Category): + domain attribute of is optional. Thanks to + Chris Lee . + + * test/rss/test_parser.rb (RSS::TestParser#test_category20): + adjusted test case. + +Wed Jul 6 18:45:53 2005 Yukihiro Matsumoto + + * object.c (rb_obj_pattern_match): now returns nil. + [ruby-core:05391] + +Mon Jul 4 14:35:52 2005 Yukihiro Matsumoto + + * sample/svr.rb: service can be stopped by ill-behaved client; use + tsvr.rb instead. + +Mon Jul 4 13:25:21 2005 Yukihiro Matsumoto + + * missing/erf.c: original erf.c by prof. Okumura is confirmed to + be public domain. reverted BSD implementation. + +Wed Jul 6 11:15:21 2005 NAKAMURA Usaku + + * win32/win32.c (open_ifs_socket): new function. + + * win32/win32.c (StartSockets, rb_w32_socket): use open_ifs_socket() + instead of socket(). + all changes are derived from [ruby-core:5388]. + +Wed Jul 6 00:15:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c,config.h}: + imported nkf.c 1.70 (support UTF-8-MAC) + + * ext/nkf/lib/kconv.rb: add :utf8mac and :internalunicode + +Tue Jul 5 23:44:06 2005 Nobuyoshi Nakada + + * instruby.rb: expand source library path. + +Tue Jul 5 23:27:14 2005 Nobuyoshi Nakada + + * array.c (sort_2): get rid of yet another bcc's bug. + fixed: [ruby-core:05152] + + * eval.c (rb_thread_save_context): must not switch contexts during + re-allocating stack. fixed: [ruby-core:05219] + +Tue Jul 5 15:15:10 2005 Hidetoshi NAGAI + + * ext/tk/tkutil.c: fix typo. + +Tue Jul 5 14:52:56 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: bug fix on treating Unicode strings. + + * ext/tk/tcltklib.c: add methods to treat encoding mode. + + * ext/tk/MANUAL_tcltklib.eng: add description of TclTkLib#encoding, + encoding_system, and so on. + + * ext/tk/MANUAL_tcltklib.eucj: ditto. + + * ext/tk/tkutil/tkutil.c: fail to create a Tcl's list string from + an array including multiple kind of encoded strings. + + * ext/tk/lib/tk.rb: ditto. + + * ext/tk/lib/multi-tk.rb: 2nd arg of _{to|from}UTF8 is omissible. + + * ext/tk/lib/remote-tk.rb: ditto. + + * ext/tk/lib/tk.rb: override TclTkLib#encoding and encoding= to + use TkCore::INTERP.encoding and encoding=. + + * ext/tk/lib/tk.rb: when "require 'tk'" and $KCODE=='NONE', check + DEFAULT_TK_ENCODING to decide Ruby/Tk's system encoding mode. + + * ext/tk/lib/tk/encodedstr.rb: check both of Tk.encoding and + Tk.encoding_system. Tk.encoding has higher priority. + + * ext/tk/lib/tk/optiondb.rb: ditto. + + * ext/tk/lib/tk/spinbox.rb: ditto. + + * ext/tk/lib/tk/validation.rb: ditto. + + * ext/tk/lib/tk/namespace.rb: arguemnts for TclTkIp#_merge_tklist + should be UTF-8 strings. + +Mon Jul 4 19:29:32 2005 Hirokazu Yamamoto + + * lib/set.rb: test change to follow revision 1.28. (duck typing?) + +Mon Jul 4 11:23:50 2005 NAKAMURA Usaku + + * test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests + which using fork on fork-less platforms. + +Sun Jul 3 23:26:30 2005 NAKAMURA, Hiroshi + + * test/wsdl/document/test_rpc.rb: compare formatted time string of + Time objects instead of comparing Time objects itself to avoid + unintended conflict of usec part. [ruby-dev:26220] + +Sat Jul 2 22:41:04 2005 Tanaka Akira + + * ext/socket/socket.c (unix_send_io, unix_recv_io): support x86-64 and + IA64. + +Sat Jul 2 17:06:23 2005 Tanaka Akira + + * defines.h (FLUSH_REGISTER_WINDOWS): defined for IA64. + (flush_register_windows): declare flush_register_windows. + + * eval.c (flush_register_windows): new function. + + * ruby.h (NOINLINE): move up to be effective in defines.h. + +Sat Jul 2 15:19:41 2005 Tanaka Akira + + * configure.in: check select_large_fdset. + + * eval.c: use select_large_fdset to support large file descriptors + on Solaris. [ruby-dev:26404] + +Fri Jul 1 17:55:08 2005 Yukihiro Matsumoto + + * bignum.c (rb_big_neg): may be accessing bogus pointer value. + +Fri Jul 1 15:50:12 2005 NAKAMURA Usaku + + * missing/erf.c: need to include some headers for some platforms. + + * win32/win32.h (copysign, scalb): define for compatibility with + other platforms. [ruby-dev:26430] + +Fri Jul 1 15:37:42 2005 Yukihiro Matsumoto + + * missing/crypt.c: modified to make it compilable on platforms + other than BSD. [ruby-dev:26430] + + * missing/erf.c: ditto. code from merged. + +Fri Jul 1 12:44:56 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_http): refine post_connection_check + call. + +Fri Jul 1 11:34:08 2005 Yukihiro Matsumoto + + * missing/crypt.c: replaced with 4.4BSD version. + + * missing/erf.c: ditto. + + * missing/vsnprintf.c: removed the third provision from the old + BSD license. [ruby-core:05177] + +Fri Jul 1 01:45:21 2005 Nobuyoshi Nakada + + * enum.c (enum_min, enum_max): must not return Qundef. + fixed: [ruby-core:05299] + +Fri Jul 1 00:18:40 2005 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator::respond_to): respond_to? must check + destination object. [ruby-talk:146894] + +Thu Jun 30 23:52:12 2005 Nobuyoshi Nakada + + * signal.c (trap): non-string trap hander was ignored. + fixed: [ruby-dev:26417] + +Thu Jun 30 19:00:21 2005 Keiju Ishitsuka + + * lib/irb/ruby-lex.rb (RubyLex::identify_number): alternative implements + for [ruby-dev:26410]. And support a numeric form of 0d99999. + +Thu Jun 30 17:28:10 2005 Yukihiro Matsumoto + + * lib/irb/ruby-lex.rb (RubyLex::identify_number): should not treat + plain zero as an octal number. [ruby-dev:26410] + +Thu Jun 30 15:13:16 2005 Yukihiro Matsumoto + + * eval.c (rb_eval): pre-evaluate argument for unambiguous + evaluation order. [ruby-dev:26383] + +Thu Jun 30 14:48:23 2005 GOTOU Yuuzou + + * lib/net/http.rb (Net::HTTP#connect, Net::HTTP#request): should + not send proxy username and password to origin servers. + [ruby-dev:25673] + + * lib/net/http.rb (Net::HTTP::ProxyDelta#edit_path): should not + send HTTPS scheme URL to origine servers. [ruby-dev:25689] + +Thu Jun 30 09:53:56 2005 Yukihiro Matsumoto + + * lib/delegate.rb (Delegator::method_missing): forward unknown + method to the destination. suggested by + . [ruby-talk:146776] + +Wed Jun 29 00:03:20 2005 Kazuhiro NISHIYAMA + + * regparse.c (fetch_token): avoid warning of unused goto tag. + [ruby-dev:26389] + +Tue Jun 28 21:59:29 2005 Kazuhiro NISHIYAMA + + * dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unused + variable" [ruby-dev:26387] + + * dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE' + not handled in switch" [ruby-dev:26392] + +Tue Jun 28 01:52:00 2005 NARUSE, Yui + + * ext/nkf/lib/kconv.rb: add Kconv::VERSION + * ext/nkf/lib/kconv.rb (conv): can process arrayed options + * ext/nkf/nkf-utf8/nkf.c: imported Revision 1.69 + * ext/nkf/nkf-utf8/utf8tbl.c: imported Revision 1.9 + +Sat Jun 25 23:30:51 2005 Yukihiro Matsumoto + + * process.c (detach_process_watcher): terminate process watcher + thread right after rb_waitpid() succeed. [ruby-talk:146430] + +Sat Jun 25 17:12:20 2005 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should + discard if key=val pair is empty. patch from Gary Wright. + +Sat Jun 25 15:49:18 2005 Nobuyoshi Nakada + + * enum.c (enum_min, enum_max, enum_min_by, enum_max_by): do not ignore + nil as the first element. + +Sat Jun 25 15:13:54 2005 Hirokazu Yamamoto + + * lib/set.rb (Set#==): [ruby-dev:25206] (ported from ruby_1_8 branch) + +Sat Jun 25 11:37:00 2005 NARUSE, Yui + + * ext/nkf/lib/kconv.rb: remove constants + Iconv_Shift_JIS, Uconv_EUC_JP, Iconv_UTF8 + * ext/nkf/lib/kconv.rb: add module functions to Kconv + conv, {eucjp, shiftjis, utf8}?, guess_as_symbol + * ext/nkf/lib/kconv.rb: add instance methods to String + conv, {eucjp, shiftjis, utf8}? + * ext/nkf/lib/kconv.rb: add aliases Kconv.to_* and String#to_* + +Fri Jun 24 17:00:00 2005 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c: patch from "NATORI Shin" + (u-tokyo.ac.jp) applied to fix rounding bug. + +Fri Jun 24 13:17:45 2005 akira yamada + + * lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents and + replaced some existent domain name with "example.com". + +Fri Jun 24 12:23:19 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: fix typo on Tk.grid_propagate. + + * ext/tk/lib/tk.rb: Tk.event_generate and TkWindow#event_generate + accept TkEvent::Event object as context argument. + + * ext/tk/lib/tk/event.rb: add TkEvent::Event#valid_fields and + valid_for_generate to get field parameters of event_generate. + +Thu Jun 23 23:55:59 2005 Nobuyoshi Nakada + + * runruby.rb: should load built rbconfig.rb. + +Thu Jun 23 16:53:15 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/canvastag.rb: TkcGroup.new cannot include given items. + TkcGroup#exclude calls wrong method. + Add alias TkcGroup#add [ruby-talk:146049]. + + * ext/tk/lib/tk/canvas.rb: TkCanvas#dtag and some subcommands of + TkCanvas#addtag fail to treat a TkcTag argument. + + * ext/tk/lib/tk/event.rb: add TkEvent::Event#generate to help to send + current event to other widgets. + +Mon Jun 20 18:44:04 2005 Tanaka Akira + + * eval.c (FUNCTION_CALL_MAY_RETURN_TWICE): DUMMY_SETJMP is replaced + because setjmp is not enough to fix getcontext and SPARC register + window problem. + +Mon Jun 20 17:15:51 2005 NAKAMURA Usaku + + * ext/dbm/dbm.c (fdbm_closed): new method DBM#closed? + + * ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed? + + * ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed? + + * test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb + (teardown): close all db objects before deleting data files. + + * win32/win32.{ch} (unlink): hook runtime function to change + file attribute before unlinking. + merge from 1.8, see [ruby-dev:26360] + +Mon Jun 20 02:15:35 2005 Nobuyoshi Nakada + + * gc.c (define_final): document fix: finalizers never get called + before target object is destroyed. + +Mon Jun 20 01:26:49 2005 GOTOU Yuuzou + + * ext/openssl/openssl_missing.c, ext/openssl/ossl.h, + ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c, + ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid + compiler warnings. suggested by Michal Rokos. + +Sun Jun 20 00:22:02 2005 Michael Neumann + + * lib/xmlrpc/utils.rb: Patch by Nobuhiro IMAI fixes the following + problem: Default value modification on + Module#public_instance_methods (false -> true) breaks + s.add_handler(XMLRPC::iPIMethods("sample"), MyHandler.new) style + security protection. + + * lib/xmlrpc/client.rb: Aliased XMLRPC::Client#new2 as + XMLRPC::Client#new_from_uri, and #new3 as #new_from_hash. + +Sun Jun 19 14:09:07 2005 Nobuyoshi Nakada + + * gc.c (run_final): reduce unnecessary object allocation during + finalization. + + * gc.c (rb_gc_call_finalizer_at_exit): deferred finalizers list should + be cleared before calling them. fixed: [ruby-talk:145790] + +Sat Jun 18 01:15:36 2005 Shugo Maeda + + * ext/readline/readline.c (readline_readline): do not set + rl_{in,out}stream. + + * ext/readline/readline.c (readline_s_set_input): new method. + + * ext/readline/readline.c (readline_s_set_output): new method. + + * lib/irb/input-method.rb: set Readline.input and Readline.output. + +Fri Jun 17 13:01:40 2005 Tanaka Akira + + * lib/time.rb (Time.parse): fix previous leap seconds support. + (Time.rfc2822): ditto. + (Time.xmlschema): ditto. + +Thu Jun 16 15:41:32 2005 NAKAMURA Usaku + + * ruby.c (load_file): '!' is already read. reported by gotoyuzo. + +Thu Jun 16 15:09:38 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c (ip_rb_threadVwaitCommand): Tcl_Release + was missing. + +Thu Jun 16 13:34:48 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add Tk.getMultiple{Open|Save}File() which return + an Array of selected files. + +Thu Jun 16 12:53:24 2005 Tanaka Akira + + * lib/time.rb (Time.parse): "Fri Jan 1 08:59:60 +0900 1999" was + parsed as "Fri Jan 01 09:00:00 JST 1999" even on an environment + which supports leap seconds. + (Time.rfc2822): ditto. + (Time.xmlschema): ditto. + +Thu Jun 16 00:13:41 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Resource#ttl): new attribute. + (Resolv::DNS::Resource#==): ignore @ttl. + (Resolv::DNS::Resource#hash): ditto. + (Resolv::DNS::Message::MessageDecoder#get_rr): save TTL in a + Resource object. + based on [ruby-core:5190] by Eric Hodel. + +Wed Jun 15 18:26:39 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: support "tk inactive" sub-command [for Tcl/Tk8.5a3] + + * ext/tk/lib/tk/namespace.rb: support "namespace path" sub-command and + 'namespace ensemble' sub-command [for Tcl/Tk8.5a3] + +Tue Jun 14 02:02:43 2005 Hidetoshi NAGAI + + * ext/tk/tkutil/tkutil.c: add TkUtil::CallbackSubst.subst_arg(m, ...) + & _define_attribute_aliases(hash) to get substitution-argument from + attributes (e.g. subst_arg(:x,:y,:num,:button) --> "%x %y %b %b "). + + * ext/tk/lib/tk/event.rb: use _define_attribute_aliases(). + +Mon Jun 13 13:03:08 2005 Hirokazu Yamamoto + + * hash.c (ruby_setenv): fixed SEGV. [ruby-dev:26186] + +Mon Jun 13 01:54:20 2005 Yukihiro Matsumoto + + * signal.c (sigexit): call rb_thread_signal_exit() instead of + rb_exit(). [ruby-dev:26347] + + * eval.c (rb_thread_signal_exit): a new function to exit on main + thread. + + * eval.c (rb_thread_switch): exit status should be retrieved from + ruby_errinfo. + + * eval.c (rb_f_exit): ensure exit(0) should call + exit(EXIT_SUCCESS). + +Mon Jun 13 01:20:02 2005 Tanaka Akira + + * eval.c (rb_gc_mark_threads): curr_thread may not be part of the + thread list. [ruby-dev:26312] + +Sat Jun 11 22:34:44 2005 Minero Aoki + + * parse.y: missing arg_paren event. This patch is contributed by + Mitchell N Charity. + +Fri Jun 10 23:55:17 2005 Tanaka Akira + + * eval.c (unknown_node): show more information. [ruby-dev:26196] + +Fri Jun 10 23:35:34 2005 Yukihiro Matsumoto + + * missing/mkdir.c: remove. [ruby-core:05177] + +Fri Jun 10 22:54:18 2005 Nobuyoshi Nakada + + * missing.h: fd_set stuffs need sys/types.h. fixed: [ruby-core:05179] + +Thu Jun 9 23:58:12 2005 Nobuyoshi Nakada + + * ext/Win32API/Win32API.c (Win32API_Call): disable global + optimization. fixed: [ruby-core:05143] + +Thu Jun 9 23:35:22 2005 Nobuyoshi Nakada + + * enum.c (enum_inject): default the result value to Qundef to use + first element as initial value if not given. + +Thu Jun 9 19:55:41 2005 Tanaka Akira + + * eval.c (ruby_longjmp): new macro to call longjmp, setcontext, etc. + (ruby_setjmp): new macro to call setjmp, getcontext, etc. + (ruby_setjmp): call setjmp before getcontext to avoid IA64 register + stack problem. + [ruby-talk:144939] + + * gc.c (Init_stack): remove IA64_MAGIC_STACK_LIMIT. + +Thu Jun 9 18:24:16 2005 Tanaka Akira + + * configure.in, eval.c, gc.c: use libunwind only on HP-UX. + [ruby-dev:26297] + +Thu Jun 9 14:46:32 2005 Yukihiro Matsumoto + + * hash.c (env_aset): do not treat nil as key-removing value. + [ruby-list:40865] + + * parse.y (method_call): allow aref expression ([]) to take a + block. + + * parse.y (block_dup_check): a function to check duplication of + a block argument and an actual block. + +Thu Jun 9 11:55:34 2005 Yukihiro Matsumoto + + * lib/delegate.rb (SimpleDelegator::__setobj__): need check for + recursive delegation. [ruby-core:04940] + +Thu Jun 9 11:50:43 2005 Yukihiro Matsumoto + + * lib/cgi.rb: add underscore aliases CGI::escape_html, + CGI::unescape_html, CGI::escape_element, CGI::unescape_element. + [ruby-core:05058] + +Wed Jun 8 18:47:10 2005 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. + +Wed Jun 8 12:25:59 2005 Yukihiro Matsumoto + + * array.c (rb_ary_nitems): add the block feature to Array#nitems. + suggested by Bertram Scharpf in + [ruby-talk:134083]. + +Wed Jun 8 11:11:34 2005 Yukihiro Matsumoto + + * bignum.c (get2comp): revert all prior changes, and calculate + proper 2's complement for negative numbers. + +Wed Jun 8 08:33:10 2005 Nobuyoshi Nakada + + * enum.c (enum_min_by, enum_max_by): return nil if no iteration. + fixed: [ruby-dev:26245] + + * eval.c (rb_need_block): ensure a block is given. + + * eval.c (backtrace): skip successive frames sharing same node. + +Wed Jun 8 01:27:06 2005 Yukihiro Matsumoto + + * bignum.c (bignorm): fixed a bug in normalizing negative numbers + reported from Honda Hiroki . normalizing + should not trim leading zeros from negative numbers. + + * bignum.c (rb_cstr_to_inum): must remove leading zeros for this + case. + +Wed Jun 8 00:15:08 2005 Yukihiro Matsumoto + + * ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from + KUBO Takehiro to support AIX. [ruby-list:40832] + +Wed Jun 8 00:09:01 2005 Yukihiro Matsumoto + + * lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from + Tilman Sauerbeck . [ruby-core:05055] + + * lib/yaml/rubytypes.rb (Hash::to_yaml): ditto. + +Wed Jun 8 00:00:01 2005 Yukihiro Matsumoto + + * ext/curses/curses.c (curses_insertln): merged a patch from + TAKAHASHI Tamotsu . [ruby-ext:02305] + +Tue Jun 7 19:34:15 2005 Yukihiro Matsumoto + + * lib/irb/init.rb (IRB::IRB.rc_file_generators): more flexible + IRB.rc_file_generators. [ruby-core:05163] + +Tue Jun 7 18:39:31 2005 Yukihiro Matsumoto + + * lib/thread.rb: RDoc documentation from Eric Hodel + added. [ruby-core:05148] + +Tue Jun 7 18:30:04 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): add .SUFFIXES from depend file. + fixed: [ruby-dev:26294] + +Tue Jun 7 17:20:39 2005 Yukihiro Matsumoto + + * parse.y (parser_yylex): allow ';;' to be block terminator in + place of 'end'. [highly experimental] + + * misc/ruby-mode.el (ruby-block-end-re): allow ';;' to be a + negative indent trigger. [highly experimental] + + * parse.y (parser_yylex): small error fixed. + +Tue Jun 7 16:45:49 2005 Yukihiro Matsumoto + + * parse.y (parser_yylex): "respond_to?:foo" should be interpreted + as "respond_to? :foo" at the command level. [ruby-talk:144303] + +Tue Jun 7 16:32:53 2005 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): raise exception on debug mode (-d), + not verbose mode (-v/-w). [ruby-core:05123] + + * sprintf.c (rb_f_sprintf): warn always on verbose mode. + +Tue Jun 7 10:30:49 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: slave-ip fails to call procedures + delegated by master-ip. + +Mon Jun 6 16:35:18 2005 NAKAMURA Usaku + + * ext/ripper/depend: add .y to .SUFFIXES for nmake. + +Sun Jun 5 23:00:35 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/console.rb: create console when required + + * ext/tk/sample/tkextlib/tile/demo.rb: fix TypeError & create Console + +Sun Jun 5 10:23:52 2005 Tanaka Akira + + * signal.c (ruby_signal): don't set SA_RESTART. + [ruby-dev:26276] + +Sat Jun 4 14:55:18 2005 Tanaka Akira + + * test/dbm/test_dbm.rb: merged from ext/dbm/testdbm.rb. + + * test/gdbm/test_gdbm.rb: merged from ext/gdbm/testgdbm.rb. + + * test/sdbm/test_sdbm.rb: renamed from ext/sdbm/testsdbm.rb with + modification to use test/unit. + +Fri Jun 3 23:23:02 2005 Nobuyoshi Nakada + + * intern.h (rb_fdset_t): deal with fd bit sets over FD_SETSIZE. + fixed: [ruby-dev:26187] + + * eval.c (rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, + rb_fd_isset, rb_fd_copy): ditto. + + * io.c (rb_io_wait_readable, rb_io_wait_writable, rb_f_select): ditto. + + * ext/io/wait/wait.c (io_wait): ditto. + + * ext/socket/socket.c (wait_connectable, unix_recv_io): ditto. + +Fri Jun 3 14:06:12 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: fix typo. + +Thu Jun 2 23:42:57 2005 Nobuyoshi Nakada + + * parse.y: pragma support on ripper. [ruby-dev:26266] + +Thu Jun 2 00:02:16 2005 Minero Aoki + + * struct.c: accessing >10 member caused segmentation fault. + [ruby-dev:26247] + + * test/ruby/test_struct.rb: test it. + +Wed Jun 1 11:30:09 2005 Hirokazu Yamamoto + + * bcc32/Makefile.sub: can use single quote character in DESTDIR. + [ruby-dev:26205] + + * bcc32/Makefile.sub: Dir.glob in 1.9 doesn't treat \ as path separator. + [ruby-dev:26254] + +Wed Jun 1 00:11:06 2005 Yukihiro Matsumoto + + * parse.y (method_call): new experiment: "(expr)(args...)" to + invoke "expr.call(args...)". [EXPERIMENTAL] + +Tue May 31 23:43:41 2005 Yukihiro Matsumoto + + * parse.y (command): revert implicit "call" for local variables. + +Tue May 31 15:52:45 2005 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should + break the loop if the socket reached to EOF. [ruby-talk:142285] + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): send response + without reading the whole request body if keep-alive is diabled. + [experimental] + +Mon May 30 23:48:29 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/macpkg.rb: add PACKAGE_NAME information of Tcl/Tk + Extension. + + * ext/tk/lib/tk/msgcat.rb: ditto. + + * ext/tk/lib/tk/winpkg.rb: ditto. + + * ext/tk/lib/tkextlib/*: ditto. + +Sat May 28 16:39:21 2005 GOTOU Yuuzou + + * test/openssl/test_x509store.rb: add test for expired CRL + and refine some assertions. + +Sat May 28 05:15:44 2005 GOTOU Yuuzou + + * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should + not set internal flag directry. + +Sat May 28 02:00:11 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): + ENV["REQUEST_URI"] is better to get correct Request-URI + than ENV["SCRIPT_NAME"] + ENV["PATH_INFO"]. [ruby-dev:26235] + +Fri May 27 16:32:04 2005 WATANABE Hirofumi + + * lib/mkmf.rb: use the semicolon as the path separator + in the environment of MSYS. fixed: [ruby-dev:26232] + +Thu May 26 20:31:21 2005 Minero Aoki + + * lib/fileutils.rb (remove_entry_secure): add documentation. + + * lib/fileutils.rb (remove_entry_secure): should not invoke + unlink(2) against a directory. + +Thu May 26 08:29:19 2005 Akiyoshi, Masamichi + + * vms/vmsruby_private.c, vms/vmsruby_private.h: private routines + for VMS port are added. + + * eval.c (ruby_init): change to call VMS private intialization routine. + +Thu May 26 07:39:07 2005 Minero Aoki + + * lib/fileutils.rb (rm_r): use lchown(2), not chown(2). + [ruby-dev:26226] + + * lib/fileutils.rb (cd): remove :noop option. (feature change) + + * lib/fileutils.rb (cp_r): should copy symlink as symlink, for + also tree root. (feature change) + + * lib/fileutils.rb (cp_r): new option :dereference_root. + + * lib/fileutils.rb: new method remove_entry. + + * lib/fileutils.rb: new method remove_entry_secure. + + * lib/fileutils.rb: add documentation. + +Thu May 26 06:08:11 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add shortcut-methods of tk_call + tk_split_list + +Wed May 25 20:06:27 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: TkComm#tk_split_*list fail to split a kind of SJIS + strings. To avoid the trouble, add arguments to control converting + encoding, and do split on a UTF8 string. + + * ext/tk/lib/multi-tk.rb: modify to attend encoding. + + * ext/tk/lib/remote-tk.rb: ditto. + + * ext/tk/lib/tk/itemconfig.rb: ditto. + + * ext/tk/lib/tk/listbox.rb: ditto. + + * ext/tk/lib/tk/namespace.rb: ditto. + + * ext/tk/lib/tk/panedwindow.rb: ditto. + + * ext/tk/lib/tk/text.rb: ditto. + + * ext/tk/lib/tk/textmark.rb: ditto. + + * ext/tk/lib/tk/texttag.rb: ditto. + + * ext/tk/lib/tk/variable.rb: ditto. + + * ext/tk/lib/tk/winfo.rb: ditto. + + * ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto. + + * ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: ditto. + + * ext/tk/lib/tk.rb: add TkWindow#lower_window/raise_window and + Tk#lower_window/raise_window by reason of method-name conflict + + * ext/tk/lib/tk/canvas.rb: bug fix on TkCanvas#delete when given + non-TkcItem arguments. + + * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto. + +Wed May 25 19:48:12 2005 Minero Aoki + + * lib/fileutils.rb (rm_r): does chown(2). [ruby-dev:26199] + +Wed May 25 12:59:48 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI::Meta::RE_QUOTED_STRING): a content of + quoted-string should be zero or more characters. + +Tue May 24 23:42:16 2005 Yukihiro Matsumoto + + * numeric.c (fix_pow): support Fixnum ** Float case directly + without coercing. [ruby-talk:142697] [ruby-talk:143054] + +Tue May 24 16:57:24 2005 Yukihiro Matsumoto + + * ruby.c (require_libraries): caused SEGV when continuation jumped + in to the required library code. + +Tue May 24 17:45:59 2005 Shugo Maeda + + * test/readline/test_readline.rb: do not test libedit. + fixed: [ruby-dev:26217] + +Tue May 24 06:45:31 2005 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): string + literals to be matched non-greedy. + +Tue May 24 00:39:14 2005 NAKAMURA, Hiroshi + + * test/soap/calc: method name 'set' was able to crash with a class Set. + [ruby-dev:26210] + + * test/wsdl/document/test_rpc.rb: dateTime comparison failed under + TZ=right/Asia/Tokyo (with leap second.) [ruby-dev:26208] + +Mon May 23 16:23:06 2005 Hidetoshi NAGAI + + * ext/tk/extconf.rb: Framework support on MacOS X Tiger. + + * ext/tk/README.tcltklib: add description of Framework support options. + +Mon May 23 15:07:34 2005 NAKAMURA Usaku + + * win32/Makefile.sub ($(PROGRAM)): add dependency on $(LIBRUBY_SO). + [experimental] + +Mon May 23 12:21:37 2005 Yukihiro Matsumoto + + * re.c (make_regexp): should not return junk address during + compile time. [ruby-dev:26206] + +Sun May 22 21:54:06 2005 NAKAMURA, Hiroshi + + * lib/{soap,wsdl,xsd}, test/{soap,wsdl,xsd}: imported soap4r/1.5.4. + + == SOAP client and server == + + === for both client side and server side === + + * improved document/literal service support. + style(rpc,document)/use(encoding, literal) combination are all + supported. for the detail about combination, see + test/soap/test_style.rb. + + * let WSDLEncodedRegistry#soap2obj map SOAP/OM to Ruby according to + WSDL as well as obj2soap. closes #70. + + * let SOAP::Mapping::Object handle XML attribute for doc/lit service. + you can set/get XML attribute via accessor methods which as a name + 'xmlattr_' prefixed ( -> Foo#xmlattr_name). + + === client side === + + * WSDLDriver capitalized name operation bug fixed. from + 1.5.3-ruby1.8.2, operation which has capitalized name (such as + KeywordSearchRequest in AWS) is defined as a method having + uncapitalized name. (converted with GenSupport.safemethodname + to handle operation name 'foo-bar'). it introduced serious + incompatibility; in the past, it was defined as a capitalized. + define capitalized method as well under that circumstance. + + * added new factory interface 'WSDLDriverFactory#create_rpc_driver' + to create RPC::Driver, not WSDLDriver (RPC::Driver and WSDLDriver + are merged). 'WSDLDriverFactory#create_driver' still creates + WSDLDriver for compatibility but it warns that the method is + deprecated. please use create_rpc_driver instead of create_driver. + + * allow to use an URI object as an endpoint_url even with net/http, + not http-access2. + + === server side === + + * added mod_ruby support to SOAP::CGIStub. rename a CGI script + server.cgi to server.rb and let mod_ruby's RubyHandler handles the + script. CGIStub detects if it's running under mod_ruby environment + or not. + + * added fcgi support to SOAP::CGIStub. see the sample at + sample/soap/calc/server.fcgi. (almost same as server.cgi but has + fcgi handler at the bottom.) + + * allow to return a SOAPFault object to respond customized SOAP fault. + + * added the interface 'generate_explicit_type' for server side + (CGIStub, HTTPServer). call 'self.generate_explicit_type = true' + if you want to return simplified XML even if it's rpc/encoded + service. + + == WSDL == + + === WSDL definition === + + * improved XML Schema support such as extension, restriction, + simpleType, complexType + simpleContent, ref, length, import, + include. + + * reduced "unknown element/attribute" warnings (warn only 1 time for + each QName). + + * importing XSD file at schemaLocation with xsd:import. + + === code generation from WSDL === + + * generator crashed when there's '-' in defined element/attribute + name. + + * added ApacheMap WSDL definition. + + * sample/{soap,wsdl}: removed. + +Sun May 22 19:11:35 2005 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#intialize): + should initialize session id context. [ruby-core:4663] + + * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): add session id support. + +Sun May 22 12:30:58 2005 Nobuyoshi Nakada + + * intern.h, parse.y (ruby_pragma): removed. fixed: [ruby-dev:26198] + + * parse.y (parser_pragma): pragma name was ignored. + +Sun May 22 02:39:57 2005 Minero Aoki + + * lib/fileutils.rb (rm_r): new option :secure to avoid + time-to-check-to-time-to-use security problem. [ruby-dev:26100] + + * lib/fileutils.rb (remove_file, remove_dir): try chmod(700) only + on Windows. + + * lib/fileutils.rb: does not depend on find.rb. + + * lib/fileutils.rb: new method chmod_R. + + * lib/fileutils.rb (chown_R): did not work. + +Sat May 21 10:23:21 2005 Hirokazu Yamamoto + + * bcc32/Makefile.sub: tds files were not deleted when DESTDIR + included '\' path delimiter. [ruby-dev:26193] + +Fri May 20 15:52:18 2005 Shugo Maeda + + * ext/readline/readline.c (readline_attempted_completion_function): + return 2 items if completion_proc returns only 1 item (for libedit). + +Fri May 20 01:24:33 2005 Shugo Maeda + + * ext/readline/extconf.rb: check rl_vi_editing_mode() and + rl_emacs_editing_mode(). + +Thu May 19 23:33:09 2005 Shugo Maeda + + * ext/readline/readline.c: supported libedit. fixed: [ruby-core:4858] + + * ext/readline/extconf.rb: added new option --enable-libedit. + + * test/readline/test_readline.rb: added assertions for + Readline::HISTORY. + + * lib/irb/input-method.rb: do not use Readline::HISTORY.pop. + +Wed May 18 23:42:25 2005 Nobuyoshi Nakada + + * error.c (exc_exception): reverted to call Exception#initialize + directly. fixed: [ruby-dev:26177] + +Wed May 18 17:38:51 2005 WATANABE Hirofumi + + * dir.c (glob_helper): check whether path is "" before calling + do_opendir. [ruby-dev:26183] + +Wed May 18 13:40:48 2005 NAKAMURA Usaku + + * win32/win32.c (NtInitialize): fix typo. + +Wed May 18 11:07:47 2005 Nobuyoshi Nakada + + * dir.c (glob_helper): get rid of using String. [ruby-dev:26180] + + * eval.c (ruby_options), win32/win32.c (NtInitialize): move argument + intialization back. [ruby-dev:26180] + +Tue May 17 11:49:18 2005 NAKAMURA Usaku + + * win32/win32.c (unixtime_to_filetime): use localtime() instead of + gmtime() when using FileLocalTimeToFileTime(). + +Mon May 16 22:42:52 2005 Nobuyoshi Nakada + + * win32/win32.h, {bcc32,win32,wince}/Makefile.sub: moved rb_[ugp]id_t + to get rid of redefinition warnings on mingw. + + * class.c (rb_class_init_copy): singleton class is disallowed to copy, + from its definition. fixed: [ruby-talk:142749] + + * parse.y (pragma_encoding): add prototype to suppress false warning + by VC. + + * process.c (proc_spawn_v): use rb_w32_aspawn on Win32. + +Mon May 16 03:29:01 2005 Hirokazu Yamamoto + + * win32/win32.{h,c}: define rb_[pgu]id_t. + +Mon May 16 00:21:02 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#unlink): use SystemCallError instead of + Errno::EISDIR because EISDIR is not portable. + [ruby-core:5001] + +Sun May 15 22:28:10 2005 Masatoshi SEKI + + * lib/drb/drb.rb (DRbObject#method_missing): use raise(exception). + [ruby-dev:26164] + +Sun May 15 18:56:35 2005 Nobuyoshi Nakada + + * configure.in, ruby.h: define rb_[pgu]id_t macros instead of typedefs + to get rid of types which might not be defined yet. [ruby-dev:26165] + +Sun May 15 14:35:46 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory + was failed. [ruby-core:4992] + +Sun May 15 09:57:30 2005 Nobuyoshi Nakada + + * win32/win32.c (unixtime_to_filetime): deal with DST. + [ruby-talk:141817] + +Sat May 14 23:59:11 2005 Nobuyoshi Nakada + + * error.c (exc_exception, {exit,name_err,syserr}_initialize): call + Execption#initialize. fixed: [ruby-talk:142593] + +Sat May 14 23:56:41 2005 Erik Huelsmann + + * configure.in: Check for the availability of pid_t, gid_t and uid_t and + remove AC_TYPE_UID_T. fixed: [ruby-core:04745] + + * defines.h: Remove pid_t typedef. + + * ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with + the available system types. + + * process.c: Change instances of pid_t and gid_t to their rb_* + counterparts. + + * ext/pty/pty.c: Change pid_t to rb_pid_t. + + * vms/config.h: Define HAVE_{P,G,U}ID_T to 1. + + * win32/Makefile.sub: Remove #define for {g,u}id_t. + + * win32/win32.c: Change pid_t to rb_pid_t. + + * wince/Makefile.sub: Remove #define for {g,u}id_t. + + * wince/sys/types.h: Remove definitions of {p,g,u}id_t. + +Sat May 14 11:47:57 2005 Nobuyoshi Nakada + + * intern.h (ruby_pragma): prototype. [ruby-core:04881] + + * parse.y (parser_pragma): parse Emacsen hack. + + * parse.y (parser_prepare): deal with specific syntax at the top. + + * ruby.c (load_file): read the first line iff it started with shebang. + +Fri May 13 23:44:22 2005 Nobuyoshi Nakada + + * ext/extmk.rb: keep srcdir unexpanded. + + * lib/mkmf.rb (create_makefile): quote topdir and hdrdir if necessary. + fixed: [ruby-core:04932] + + * lib/mkmf.rb (configuration), {bcc32,win32,wince}/Makefile.sub: make + also INSTALL_PROG and INSTALL_DATA system dependent. + fixed: [ruby-core:04931] + +Fri May 13 23:32:55 2005 Nobuyoshi Nakada + + * eval.c (unknown_node): add volatile directive to prototype. + +Fri May 13 17:50:49 2005 Hirokazu Yamamoto + + * variable.c (generic_ivar_get): rb_attr_get should not warn. + [ruby-dev:26010] + +Thu May 12 17:41:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow nkf 2.0.5 + +Thu May 12 16:50:40 2005 Hirokazu Yamamoto + + * lib/rdoc/parsers/parse_c.rb: more readability for mixing + progress "c..." and warning message. + +Thu May 12 15:50:56 2005 Tilman Sauerbeck + + * lib/rdoc/parsers/parse_c.rb: show parsing progress for C files. + [ruby-core:4341] + +Thu May 12 09:53:57 2005 Nobuyoshi Nakada + + * version.c (ruby_show_version): flush for non-tty stdout. + +Thu May 12 01:23:55 2005 Nobuyoshi Nakada + + * eval.c (unknown_node): ignore broken NODE to get rid of accessing + possibly inaccessible address. fixed: [ruby-dev:26122] + should emit more useful information like [ruby-dev:26126], though. + +Wed May 11 15:58:39 2005 Yukihiro Matsumoto + + * eval.c (break_jump): break should not cross functions. + [ruby-list:40818] + +Wed May 11 10:41:54 2005 Hirokazu Yamamoto + + * lib/tempfile.rb (Tempfile#unlink): fixed typo. + +Wed May 11 01:03:36 2005 Nobuyoshi Nakada + + * eval.c (TMP_ALLOC): use macro NEW_NODE() to get rid of warnings on + platforms which have no alloca(). fixed: [ruby-talk:141301] + +Sun May 8 23:17:47 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb: fix typo. + +Sun May 8 21:00:50 2005 Hirokazu Yamamoto + + * hash.c (Init_Hash): remove custom "hash" and "eql?". + (ported from 1.8) [ruby-dev:26132] + +Sun May 8 16:50:25 2005 Hirokazu Yamamoto + + * lib/profiler.rb: fixed "undefined method `[]' for nil:NilClass" + [ruby-core:4775] [ruby-talk:140401] [ruby-dev:26118] + +Sat May 7 22:58:00 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (have_var): no libs argument is given. + +Fri May 6 08:08:37 2005 Nobuyoshi Nakada + + * hash.c:rb_hash_hash_i() should be static. [ruby-core:04815] + + * re.c should include regint.h for declarations of oniguruma + functions. [ruby-core:04815] + +Sun May 1 09:15:17 2005 Nobuyoshi Nakada + + * ruby.c (process_sflag): replace '-' in variable names with '_'. + [ruby-dev:26107] + + * eval.c (rb_eval), parse.y (arg): reduce fixnum range literal at + parser. fixed: [ruby-dev:26113] + +Sat Apr 30 11:59:25 2005 Nobuyoshi Nakada + + * configure.in (RUBY_FUNC_ATTRIBUTE): check for function attribute. + [ruby-dev:26109] + + * eval.c, gc.c: moved noinline to configure.in. + + * rubyio.h (DEPRECATED): moved to configure.in. + + * ruby.h (DEPRECATED, NOINLINE): default definition. + + * win{32,ce}/Makefile.sub (config.h): deprecated and noinline for + __declspec() are available for VC++7 or later. + +Sat Apr 30 06:57:39 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb: new methods WEBrick::CGI#[], WEBrick::CGI#logger + and WEBrick::CGI#config. these are necessary to use an instance of + WEBrick::CGI as the first argument of HTTPServlet#get_instance. + (suggested by Tatsuki Sugiura) + + * lib/webrick/cgi.rb + (WEBrick::CGI#initalize): set a dummy to @config[:ServerSoftware] + if SERVER_SOFTWARE environment variable is not given. + (WEBrick::CGI#start): req.path_info must be a String. + (WEBrick::CGI::Socket#request_line): treat REQUEST_METHOD, PATH_INFO + and SCRIPT_NAME to run in console. + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape_path): should + not use String#split("/"). it removes trailing empty path component. + +Thu Apr 28 08:21:51 2005 Nobuyoshi Nakada + + * ruby.c (set_arg0): use also environment variable space for setting + $0. [ruby-core:04774] + +Wed Apr 27 23:42:22 2005 Nobuyoshi Nakada + + * win32/Makefile.sub (OPTFLAGS): default global optimization to + disabled only for VC++6. + +Tue Apr 26 22:58:00 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_invoke_core): call Tcl's "::unknown" + command when can't get information of target command. + +Mon Apr 25 13:54:55 2005 speakillof + + * lib/rexml/encodings/SHIFT-JIS.rb: encoding and decoding were + swapped. [ruby-core:4772] + +Mon Apr 25 01:18:43 2005 Tanaka Akira + + * oniguruma.h (OnigWarnFunc): add a variadic argument. + [ruby-core:4751] + +Sat Apr 23 19:49:21 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c (ip_RubyExitCommand): exit with status code + via TclTkIp#_eval didn't work. [ruby-talk:139390] + +Sat Apr 23 11:45:29 2005 Nobuyoshi Nakada + + * eval.c (rb_provided): should check also path name to be loaded. + fixed: [ruby-dev:26093] + +Fri Apr 22 16:55:35 2005 Hirokazu Yamamoto + + * ext/tk/tcltklib.c (ip_set_exc_message): fixed memory leak. + + * ext/tk/tcltklib.c: eTkCallbackReturn was not initialized. + +Thu Apr 21 06:45:28 2005 Nobuyoshi Nakada + + * ruby.c (ruby_incpush_expand, proc_options): expand relative path + given with -I option. [ruby-dev:26090] + + * configure.in, lib/mkmf.rb, {bcc32,win32,wince}/Makefile.sub: improve + C++ support. [ruby-dev:26089] + +Thu Apr 21 01:53:09 2005 Minero Aoki + + * lib/net/http.rb: add rdoc. + +Thu Apr 21 00:07:50 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): support platforms have file separator + other than /. + + * {bcc32,win32,wince}/Makefile.sub (BUILD_FILE_SEPARATOR): separator + of building platform. + + * {bcc32,win32,wince}/Makefile.sub (CP, INSTALL): use COPY command. + +Wed Apr 20 23:22:39 2005 Nobuyoshi Nakada + + * Makefile.in, common.mk: miniruby depends on MINIOBJS. + + * dmydln.c (dln_load): dummy function to raise LoadError. + + * cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby + can't load extensions on Windows. + +Wed Apr 20 23:01:35 2005 Nobuyoshi Nakada + + * win32/ifchange.bat: delete testing files. + +Wed Apr 20 22:54:54 2005 Minero Aoki + + * lib/net/http.rb: new method Net::HTTP.post_form. + + * lib/net/http.rb: new method Net::HTTPHeader#set_form_data and + its alias #form_data=. + + * lib/net/http.rb: Net::HTTPHeader#add_header -> add_field + (adjustted to Ruby 1.8). + +Wed Apr 20 10:53:30 2005 WATANABE Hirofumi + + * lib/rdoc/parsers/parse_rb.rb (lex_init): use IRB module. + [ruby-core:04737] + +Wed Apr 20 07:27:18 2005 Nobuyoshi Nakada + + * {bcc32,win32,wince}/configure.bat, {bcc32,win32,wince}/setup.mak: + add extout option. + + * bcc32/setup.mak: make configuration variables overridable. + +Tue Apr 19 23:37:09 2005 WATANABE Hirofumi + + * lib/ftools.rb (File.safe_unlink): do not modify a symlinked file. + +Tue Apr 19 23:02:40 2005 Nobuyoshi Nakada + + * eval.c (search_required): deal with features with path too. + + * intern.h (rb_file_expand_path): prototype. fixed: [ruby-dev:26082] + +Tue Apr 19 08:38:07 2005 Nobuyoshi Nakada + + * eval.c (search_required, rb_require_safe): expand path in + rb_features. [ruby-dev:26079] + + * file.c (rb_find_file_ext): return absolute path. + + * ext/extmk.rb: expand path for ext/**/extconf.rb. + + * eval.c (search_required): handle static linked extensions. + +Mon Apr 18 15:37:35 2005 Yukihiro Matsumoto + + * eval.c (rb_attr): attribute name check added. + + * numeric.c (flo_plus): small typo fix. + +Mon Apr 18 11:25:14 2005 Hirokazu Yamamoto + + * ext/zlib/zlib.c (zstream_run): fixed SEGV. [ruby-core:4712] + +Sun Apr 17 23:57:49 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extmake, parse_args): do not expand destdir. + + * ext/extmk.rb (relative_from): treat mere drive letter as an absolute + path. + +Sat Apr 16 17:01:16 2005 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb (rss_recent_cache_rss): + use the first date information of items as site date information + if channel doesn't have date information. + +Sat Apr 16 15:27:03 2005 Nobuyoshi Nakada + + * configure.in (RUBY_PROG_INSTALL): not add -p option to INSTALL. + files need timestamps to be kept are only ar-archive on a few + platforms, and be installed by instruby.rb but not INSTALL. + fixed: [ruby-core:04721] + + * mkconfig.rb: purge autoconf value variables. + +Sat Apr 16 10:33:48 2005 Hirokazu Yamamoto + + * bcc32/Makefile.sub: quick hack... prepend DESTDIR. + still have restriction on DESTDIR ("", "/", "e:") + +Sat Apr 16 03:59:42 2005 GOTOU Yuuzou + + * ext/openssl/extconf.rb: check for OPENSSL_cleanse. + + * ext/openssl/openssl_missing.h: ditto. + +Fri Apr 15 22:40:19 2005 Masaki Suketa + + * ext/win32ole/tests/testWIN32OLE.rb: add test for WIN32OLE.codepage= + + * ext/win32ole/tests/testOLETYPELIB.rb: correct expected message. + +Fri Apr 15 22:04:07 2005 Masaki Suketa + + * ext/win32ole/win32ole.c(ole_invoke): retry after converting Qnil + to VT_EMPTY. + +Thu Apr 14 19:05:06 2005 Minero Aoki + + * parse.y [ripper] (regexp): dispatch regexp option. + [ruby-Bugs:1688] + + * ext/ripper/lib/core.rb: regenerated (interface changed). + +Thu Apr 14 18:59:43 2005 Minero Aoki + + * lib/fileutils.rb (remove_file): ignore exceptions caused by + chmod. + + * lib/fileutils.rb (remove_dir): try to get rights to rmdir. + [ruby-Bugs:1502] + +Thu Apr 14 18:51:02 2005 Keiju Ishitsuka + + * lib/irb/ruby-lex.rb, lib/irb/slex.rb: bug fix of [ruby-Bugs-1745] + + * lib/irb/ext/loader.rb, lib/irb/ext/save-history.rb: + fix location of @RCS_ID + + * lib/irb/cmd/help.rb: a lost of release IRB 0.9.5. + +Thu Apr 14 15:10:30 2005 Keiju Ishitsuka + + * lib/irb/notifier.rb, lib/irb/output-method.rb, lib/irb/ext/history.rb + fixed warning of 'ruby -w' + +Thu Apr 14 05:35:45 2005 Keiju Ishitsuka + + * doc/irb/irb.rd.ja: a lost of release IRB 0.9.5. + + * lib/irb/slex.rb: bug fix by [ruby-core:04707]. + +Thu Apr 14 00:20:31 2005 Keiju Ishitsuka + + * bin/irb lib/irb.rb lib/irb/...: IRB 0.9.5. + +Wed Apr 13 23:40:21 2005 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.3 -> 0.1.4. + + * lib/rss/rss.rb (RSS::Element#converter): fixed converter + transmission bug. + +Wed Apr 13 22:12:16 2005 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#order!): call handlers iff matches + non-switch. + +Wed Apr 13 21:20:35 2005 WATANABE Hirofumi + + * configure.in (mingw32): extract msvcr*.dll from objdump result. + +Wed Apr 13 19:25:31 2005 Nobuyoshi Nakada + + * configure.in (mingw32): use actual runtime DLL name as ruby DLL + name and default load path. + + * win32/Makefile.sub, win32/setup.mak: ditto. + +Tue Apr 12 19:30:36 2005 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#make_switch, OptionParser#order!): + added non-option and end-of-args handler. [ruby-talk:136878] + [EXPERIMENTAL] + +Tue Apr 12 15:33:09 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_finalize): better modification than the + previous commit [ruby-dev:26029]. + +Tue Apr 12 12:38:06 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_finalize): fix SEGV when Tcl_GlobalEval() + modifies the argument string to eval. + +Tue Apr 12 02:21:55 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_finalize): add existence check of + Tcl commands before calling Tcl_GlobalEval(). + +Mon Apr 11 23:36:04 2005 Masatoshi SEKI + + * lib/drb/drb.rb: [druby-ja:123] fix: When reference of my object is + loaded, the object is tainted. + + * test/drb/test_drb.rb: ditto. + +Mon Apr 11 22:18:23 2005 WATANABE Hirofumi + + * dir.c, file.c (lstat): avoid warnings for mingw. + +Mon Apr 11 20:11:06 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (ip_finalize): adhoc patch to avoid SEGV when exit + on Tcl/Tk8.3.x. + +Mon Apr 11 15:24:20 2005 NAKAMURA Usaku + + * lib/mkmf.rb (configuration): shouldn't output hdrdir twice. + +Sat Apr 9 18:20:31 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/image.rb: support to create TkImage object without + creating a new image object on Tk. + + * ext/tk/lib/tk/menu.rb: use TkCommandNames on create_self() + + * ext/tk/lib/tk/root.rb: TkRoot.to_eval() returns '.'. + + * ext/tk/lib/tk/text.rb: add methods to create a TkText::IndexString + from (x, y) coords. + + * ext/tk/lib/tkextlib/tile/: add demo and update support status. + +Sat Apr 9 14:42:29 2005 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb: supported configuration + via Web browser. + +Fri Apr 8 20:17:48 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): hdrdir needs to be defined also in + Config::CONFIG. + + * lib/mkmf.rb (configuration, create_makefile): get rid of recursive + macro reference. + +Fri Apr 8 01:55:20 2005 Hidetoshi NAGAI + + * ext/tk/sample/demos-{en,jp}/goldberg.rb: reduced window size. + [ruby-dev:25992] + +Thu Apr 7 23:58:40 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): keep directory names in Makefile as macros. + + * lib/mkmf.rb (configuration, create_makefile): ditto. + + * lib/mkmf.rb (CXX_EXT): separate C++ extensions. + +Thu Apr 7 17:24:17 2005 Shugo Maeda + + * eval.c (rb_call0): "return" event hook should be always executed + if event_hooks is set. + +Thu Apr 7 14:33:09 2005 Kouhei Sutou + + * test/rss/test_maker_dc.rb (test_date): added a test for #date= + and #dc_date=. + +Thu Apr 7 11:49:53 2005 Kouhei Sutou + + * lib/rss/maker/dublincore.rb: _really_ supported multiple Dublin + Core items. + + * test/rss/rss-assertions.rb (assert_multiple_dublin_core): added + an assertion for testing multiple Dublin Core items. + + * test/rss/test_maker_dc.rb (test_rss10_multiple): added a test + for making multiple Dublin Core items. + +Wed Apr 6 16:06:30 2005 Hirokazu Yamamoto + + * test/ruby/test_env.rb (test_key): should test ENV.key instead of + ENV.index. [ruby-dev:25994] + +Tue Apr 5 16:01:12 2005 Kouhei Sutou + + * lib/rss/*: refactored. + - gave a name to 'x'. + - undef_method -> remove_method for avoiding a warning in ruby 1.6. + +Tue Apr 5 15:45:33 2005 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb: + new option: @options['rss-recent.use-image-link']: + use image as link instread of text if available. + + * sample/rss/tdiary_plugin/rss-recent.rb (RSS_RECENT_VERSION): + 0.0.5 -> 0.0.6. + +Tue Apr 5 15:15:26 2005 Kouhei Sutou + + * lib/rss/dublincore.rb: supported multiple Dublin Core items. + + * lib/rss/parser.rb: added class name registry for complex model + elements. (ex. have childlen elements, have some attributes and + a child element and so on.) + + * lib/rss/maker/base.rb: added default current_element implementation. + + * lib/rss/maker/dublincore.rb: supported multiple Dublin Core + items. + + * lib/rss/maker/image.rb: supproted new Dublin Core API. + + + * lib/rss/trackback.rb (RSS::TrackBackUtils.new_with_value_if_need): + moved to RSS::Utils. + + * lib/rss/utils.rb (RSS::Utils.new_with_value_if_need): + moved from RSS::TrackBackUtils. + + + * lib/rss/maker/image.rb: fixed invalid argument of + add_need_initialize_variable bug. + + * lib/rss/maker/trackback.rb: ditto. + + + * lib/rss/rss.rb (Hash#merge): added for ruby 1.6. + + * lib/rss/rss.rb (RSS::BaseModel.date_writer): changed to accept nil + for date value. + + + * test/test_dublincore.rb: added tests for plural accessor and + multiple Dublin Core items. + + * test/test_setup_maker_1.0.rb: fixed swapped actual and expected + values. + +Mon Apr 4 23:17:52 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb (TkComm#array2tk_list): accept enc-mode argument to + decide whether convert encoding of each element or not. + + * ext/tk/lib/tk/variable.rb (TkVariable#value=): fail to convert the + encoding of array elements when assign an array to an TkVariable + object. + +Mon Apr 4 10:26:48 2005 Hirokazu Yamamoto + + * ext/tk/lib/tk/dialog.rb: fixed typo. + +Sat Apr 2 23:38:54 2005 Nobuyoshi Nakada + + * configure.in (CP, INSTALL): get rid of less portable options. + + * lib/mkmf.rb (configuration, create_makefile): correct configuration + variable. + + * wince/configure.bat, wince/setup.mak: add prefix, extstatic and + rdoc options. + + * lib/mkmf.rb (create_makefile): ensure library directories get made + before copying libraries there. + +Sat Apr 2 16:59:46 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: forgot to update RELEASE_DATE + + * ext/tk/lib/tk/variable.rb: fix namespace trouble when autoloading + + * ext/tk/lib/tk/palette.rb: define Tcl variable 'tkPalette' as global + + * ext/tk/lib/tk/dialog.rb: use array2tk_list method when calling + Tk.ip_eval. + + * ext/tk/lib/tk/autoload.rb: add autoload entry 'TkDialogObj' and + 'TkWarningObj' + +Sat Apr 2 13:23:17 2005 Hirokazu Yamamoto + + * hash.c (env_key): ENV.index is deprecated as well as Hash#index. + use ENV.key instead. [ruby-dev:25974] + +Sat Apr 2 02:19:11 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb (TkWindow.initialize): accept 'without_creating' + option without 'widgetname' option to allow creating a widget object + which is used as an argument of Tcl/Tk's widget allocation commands. + + * ext/tk/lib/tk/image.rb (TkImage.initialize): accept 'imagename' + option to create a image object by the given name. + +Thu Mar 31 22:23:51 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case + insensitive file system platforms. + + * README.EXT, README.EXT.ja (Appendix C): utility functions. + +Thu Mar 31 14:08:43 2005 GOTOU Yuuzou + + * ext/openssl/ossl_engine.c (ossl_engine_s_load): should return + value. [ruby-dev:25971] + +Thu Mar 31 11:07:50 2005 Kouhei Sutou + + * lib/rss/parser.rb: @@setter -> @@setters. + + * lib/rss/parser.rb + (RSS::BaseListener.register_uri) + (RSS::BaseListener.uri_registered?) + (RSS::BaseListener.install_get_text_element): + swapped the first argument and the second argument. + + * lib/rss/taxonomy.rb: swapped the first argument and the second + argument for RSS::BaseListener.install_get_text_element. + * lib/rss/image.rb: ditto. + * lib/rss/syndication.rb: ditto. + * lib/rss/dublincore.rb: ditto. + * lib/rss/parser.rb: ditto. + * lib/rss/1.0.rb: ditto. + * lib/rss/2.0.rb: ditto. + * lib/rss/0.9.rb: ditto. + * lib/rss/content.rb: ditto. + +Thu Mar 31 11:00:36 2005 Kouhei Sutou + + * lib/rss/parser.rb + (RSS::BaseListener.install_setter) + (RSS::BaseListener.register_uri): changed fallback way. + +Thu Mar 31 08:25:40 2005 Nobuyoshi Nakada + + * common.mk (RUBYOPT): clear for the environment RubyGems installed. + + * common.mk (clean-local): keep $(PREP) files till distclean. + + * common.mk (check): do all tests. + +Thu Mar 31 06:00:20 2005 GOTOU Yuuzou + + * ext/openssl/ossl_engine.c (ossl_engine_s_load): should not raise + error even if the specified engine could not be loaded. (Dynamic + engines don't have fixed name to load.) + +Wed Mar 30 17:41:48 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: add TclTkIp#_create_console() method to create + a Tcl/Tk's console window. + + * ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method. + + * ext/tk/lib/remote-tk.rb: ditto. + + * ext/tk/lib/tk/console.rb: ditto. + + * ext/tk/lib/tk.rb: update RELEASE_DATE + + * ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object. + + * ext/tk/sample/tkextlib/**: ditto. + +Tue Mar 29 22:20:49 2005 Masatoshi SEKI + + * test/rinda/test_rinda.rb: use DRbObject.new_with instead of reinit. + [ruby-dev:25961] + +Tue Mar 29 00:04:57 2005 Masatoshi SEKI + + * lib/drb/drb.rb: move method DRbObject#reinit to DRbObject.new_with. + extract method DRbObject.prepare_backtrace. add DRb.regist_server, + remove_server, fetch_server. change server in thread variable if + in-proc server. [druby-ja:113] + + * lib/drb/gw.rb: ditto. + +Mon Mar 28 20:53:44 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extract_makefile): nothing to be removed when no file + was deleted. + + * ext/extmk.rb (extmake): restore srcdir. + +Mon Mar 28 08:39:49 2005 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_create): Iconv::Failure requires 3 + arguments. (pointed out by NaHi) + +Sun Mar 27 00:56:58 2005 Minero Aoki + + * lib/fileutils.rb (remove_file): ignore Errno::E* if force option + is set. [ruby-dev:25944] + +Sat Mar 26 22:51:33 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb (_callback_entry_class?): add for checking whether + a class is available for a callback entry. + + * ext/tk/lib/tk.rb (after_cancel): add Tk.after_cancel(afterID) method. + + * ext/tk/lib/tk.rb (array2tk_list): change from private module method + of TkComm to public module method. + + * ext/tk/lib/tk.rb (cget): add check that slot argument is not + empty string. + + * ext/tk/lib/tk.rb (configinfo): ditto. + + * ext/tk/lib/tk/itemconfig.rb (itemcget): add check that slot argument + is not empty string. + + * ext/tk/lib/tk/itemconfig.rb (itemconfiginfo): ditto. + + * ext/tk/lib/tk/entry.rb: add TkEntry#icursor and icursor= (alias of + cursor and cursor= method). + + * ext/tk/lib/tk/font.rb: improve font treatment when the font name is + empty string. + + * ext/tk/lib/tk/variable.rb: add :variable, :window and :procedure + type. + + * ext/tk/lib/tk/variable.rb: improve treatment of array-type + tkvariable. + + * ext/tk/lib/tkextlib/blt.rb: add commands for zooming. + + * ext/tk/lib/tkextlib/blt/*: bug fix. + + * ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix and add methods + to call TreeCtrl commands for bindings. + + * ext/tk/sample/tkextlib/blt/*: new sample scripts. + + * ext/tk/sample/tkextlib/treectrl/*: ditto. + +Fri Mar 25 10:53:16 2005 WATANABE Hirofumi + + * configure.in (WIN32_LEAN_AND_MEAN): removed because a lot of + troubles. [ruby-list:40721] + +Thu Mar 24 23:10:44 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (macro_defined?): try to compile for an old compiler + which doesn't bail out at #error directive. [ruby-dev:25818] + + * lib/mkmf.rb (check_sizeof): refine logging messages. + +Wed Mar 23 19:08:10 2005 GOTOU Yuuzou + + * lib/webrick/utils.rb (WEBrick::Utils.create_listeners): + - should raise ArgumentError if no port is specified. + - even if the specified port is 0, all TCPServers should be + initialized with the port given to the first one. + + * lib/webrick/server.rb (WEBrick::GenericServer#initialize): if :Port + parameter is 0, it should be updated with the port number which + ectually listened. + +Wed Mar 23 16:12:40 2005 Shugo Maeda + + * parse.y (primary): fix lineno of rescue and ensure. + +Wed Mar 23 00:39:05 2005 Shugo Maeda + + * test/ruby/test_settracefunc.rb (test_event): added tests for + "class" and "end" and "raise". + +Sun Mar 20 22:51:19 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (mkmf_failed): check if Makefile is created without + create_makefile. + +Sat Mar 19 23:48:10 2005 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-expr-beg): returned true always. + fixed: [ruby-list:40683] + +Sat Mar 19 00:41:02 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/font.rb: add some TkFont class methods to get font + information without creating a TkFont object. + + * ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix and define some + classes for components of Tk::TreeCtrl + +Thu Mar 17 17:42:13 2005 Yukihiro Matsumoto + + * struct.c (make_struct): allow non local-id field + names. [ruby-core:04575] + + * struct.c (inspect_struct): ditto. + +Wed Mar 16 23:39:13 2005 Shugo Maeda + + * test/ruby/test_settracefunc.rb: added test for c-return. + +Wed Mar 16 22:57:43 2005 Shugo Maeda + + * eval.c (rb_call0): call_cfunc() should be protected. + + * eval.c (rb_add_event_hook): use K&R style. + + * eval.c (rb_remove_event_hook): ditto. + +Wed Mar 16 22:03:15 2005 Shugo Maeda + + * eval.c (rb_add_event_hook): new function to add a hook function for + interpreter events. + +Wed Mar 16 18:08:32 2005 Yukihiro Matsumoto + + * eval.c (rb_call0): reorganize "return" event post. + + * eval.c (return_jump): no need to post "return" event here. + +Tue Mar 15 23:49:19 2005 Nobuyoshi Nakada + + * ext/iconv/iconv.c (Init_iconv): InvalidEncoding also should include + Iconv::Failure. + +Tue Mar 15 23:12:36 2005 Nobuyoshi Nakada + + * eval.c (recursive_check, recursive_push): more restrictive check. + fixed: [ruby-dev:25916] + +Tue Mar 15 16:38:31 2005 Hidetoshi NAGAI + + * ext/tk/tkutil/tkutil.c (ary2list): give wrong arguments to hash2kv() + +Mon Mar 14 19:39:33 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb (TkTimer): forgot to clear @return_value + when restarting + + * ext/tk/lib/tk/sample/cd_timer.rb: new sample of TkRTTimer + +Mon Mar 14 12:21:03 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb (TkRTTimer): forgot to reset the callback + time. So, 'continue' do all callbacks between 'stop' and 'continue'. + +Mon Mar 14 08:14:56 2005 Yukihiro Matsumoto + + * object.c (str_to_id): raise ArgumentError for NUL containing + strings. + +Mon Mar 14 00:13:49 2005 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb (TkRTTimer): correct calculation of offset + value. get a little better accuracy. + + * ext/tk/sample/demos-en/widget: use a binding with no local variables + when eval a sample script. + + * ext/tk/sample/demos-en/bind.rb: ditto. + + * ext/tk/sample/demos-en/tcolor: ditto. + + * ext/tk/sample/demos-jp/widget: ditto. + + * ext/tk/sample/demos-jp/bind.rb: ditto. + + * ext/tk/sample/demos-jp/tcolor: ditto. + +Sun Mar 13 22:19:17 2005 Nobuyoshi Nakada + + * eval.c (recursive_pop): raise TypeError instead of fatal error. + fixed: [ruby-dev:25843] + +Sun Mar 13 10:09:17 2005 Masatoshi SEKI + + * test/rinda/test_rinda.rb: remove test_gc. [ruby-dev:25871] + +Sun Mar 13 02:32:54 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): should get DH + parameter from the current SSL object. + +Sun Mar 13 02:09:03 2005 GOTOU Yuuzou + + * ext/openssl/ossl_pkey_dh.c (ossl_create_dh): fix typo. + patch from IWATSUKI Hiroyuki. [ruby-dev:25867] + + * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto. + (ossl_call_tmp_dh_callback): ditto + +Fri Mar 11 03:24:59 2005 Yukihiro Matsumoto + + * parse.y (primary): wrong var node was set for NODE_LAMBDA. + [ruby-core:04555] + +Thu Mar 10 19:10:29 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (lib_eventloop_ensure): mis-delete a timer handler + when exit from a recursive called eventloop + + * ext/tk/lib/tk/timer.rb: new TkRTTimer class, which can works for a + realtime operation + + * ext/tk/sample/tkrttimer.rb: sample of TkRTTimer class + + * ext/tk/lib/tk/textmark.rb: move TkTextMark#+ and TkTextMark#- to + TkText::IndexModMethods + + * ext/tk/lib/tk/text.rb: improve TkTextMark#+ and TkTextMark#-, and + add them to TkText::IndexModMethods module + + * ext/tk/sample/tktextio.rb: add test part of "seek by text index + modifiers" + +Thu Mar 10 08:10:11 2005 Yukihiro Matsumoto + + * re.c (make_regexp): need to free internal regexp structure when + compilation fails. [ruby-talk:133228] + +Thu Mar 10 01:08:20 2005 Yukihiro Matsumoto + + * parse.y (bv_decl): remove initialize rule from block local + variable declaration. + +Wed Mar 9 23:55:34 2005 Tanaka Akira + + * lib/pp.rb (PP::PPMethods#guard_inspect_key): support + __recursive_key__. [ruby-dev:25821] + +Wed Mar 9 19:42:21 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c: OpenSSL::SSL::SSLContexts suports callbacks: + - SSLContext#client_cert_cb is a Proc. it is called when a client + certificate is requested by a server and no certificate was yet + set for the SSLContext. it must return an Array which includes + OpenSSL::X509::Certificate and OpenSSL::PKey::RSA/DSA objects. + - SSLContext#tmp_dh_callback is called in key exchange with DH + algorithm. it must return an OpenSSL::PKey::DH object. + + * ext/openssl/ossl_ssl.c: + (ossl_sslctx_set_ciphers): ignore the argument if it's nil. + (ossl_start_ssl, ossl_ssl_write): call rb_sys_fail if errno isn't 0. + [ruby-dev:25831] + + * ext/openssl/ossl_pkey.c + (GetPrivPKeyPtr, ossl_pkey_sign): should call rb_funcall first. + (DupPrivPKeyPtr): new function. + + * ext/openssl/ossl_pkey_dh.c: add default DH parameters. + + * ext/openssl/ossl_pkey.h: ditto. + + * ext/openssl/lib/openssl/cipher.rb: fix typo. [ruby-dev:24285] + +Wed Mar 9 18:09:51 2005 Yukihiro Matsumoto + + * parse.y (gettable_gen): warns if VCALL name is used as + out-of-scope block local variable. [EXPERIMENTAL] + + * parse.y (opt_bv_decl): add explicit block local variable + declaration. raises error for name conflicts. [EXPERIMENTAL] + +Wed Mar 9 13:37:57 2005 Hidetoshi NAGAI + + * ext/tk/sample/tktextio.rb: fix bug of handling 'end' position. + support initial text, overwrite setting and pos_gravity control. + +Tue Mar 8 18:16:55 2005 Hidetoshi NAGAI + + * ext/tk/sample/tktextio.rb: New sample script. TkTextIO class in this + sample supports to use a text widget as if it is a I/O stream (such + like as StringIO class). + +Tue Mar 8 13:39:25 2005 NAKAMURA Usaku + + * ext/socket/mkconstants.rb: workaround for some of 4.4BSD-Lite + derived OSs. + +Tue Mar 8 12:36:17 2005 Yukihiro Matsumoto + + * ext/socket/socket.c: document from Sam Roberts + for getsockopt and setsockopt is merged. + [ruby-doc:824] + +Tue Mar 8 10:48:53 2005 NAKAMURA Usaku + + * eval.c (rb_exec_recursive): declaration should precede statements + before C99. + +Tue Mar 8 10:05:40 2005 Yukihiro Matsumoto + + * error.c (errno_missing): Errno.const_missing to allow references + to SyscallError exceptions not defined on the platform. + [ruby-core:04522] + + * error.c (Init_syserr): Errno::NOERROR(0) for fallback exception. + +Tue Mar 8 01:19:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.66 + fixed: [ruby-dev:25828] + +Mon Mar 7 21:29:40 2005 GOTOU Yuuzou + + * lib/webrick/server.rb (WEBrick::GenericServer#start): should + restore @token if accept failure. suggested by Dominique Brezinski. + [ruby-core:04518] + + * sample/webrick/httpsd.rb: fix typo in comment. suggested by + Kazuhiko Shiozaki. + +Mon Mar 7 21:01:37 2005 Nobuyoshi Nakada + + * eval.c (rb_require_safe): get actual path string under safe level + when requested. fixed: [ruby-dev:25815] + +Mon Mar 7 16:46:02 2005 NAKAMURA Usaku + + * ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_read, + ossl_ssl_write): need to set errno on Win32 platform. + +Mon Mar 7 14:55:43 2005 Yukihiro Matsumoto + + * eval.c (block_pass): should not push unique number if a block is + not an orphan. [ruby-dev:25808] + +Mon Mar 7 14:13:23 2005 GOTOU Yuuzou + + * ext/openssl/lib/openssl/buffering.rb (Buffering#initialize): + should set @eof and @rbuffer. + +Mon Mar 7 10:28:00 2005 Yukihiro Matsumoto + + * object.c (inspect_obj): unintended space removal. + [ruby-dev:25810] + + * eval.c (rb_exec_recursive): should not use NODE in disclosed + context. [ruby-dev:25812] + + * io.c (rb_f_open): need not to check if to_open value is a + T_FILE. [ruby-dev:25812] + +Mon Mar 7 01:21:01 2005 Hidetoshi NAGAI + + * ext/tk/tkutil/tkutil.c: follow the change of st.c (committed + at Fri, 4 Mar 2005 15:47:47 +0900 by matz) + +Mon Mar 7 00:01:55 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: fail to call TclTkLib.mainloop when $SAFE==4 + +Sun Mar 6 13:04:10 2005 Dee Zsombor + + * misc/ruby-electric.el: added. + * misc/Readme: updated. + +Sun Mar 6 11:47:10 2005 Sam Roberts + + * lib/pp.rb: rdoced. [ruby-core:4490] + +Sun Mar 6 11:36:37 2005 Tanaka Akira + + * lib/pp.rb (File::Stat#pretty_print): Etc.getpwuid and Etc.getgrgid + may return nil. [ruby-talk:129826] + reported by Daniel Berger. + +Sun Mar 6 06:34:31 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_start_ssl): should wait for that + the underlying IO become readable or writable if the error was + SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. [ruby-dev:25795] + + * ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): ditto. + + * ext/openssl/lib/openssl/buffering.rb + (Buffering#consume_rbuf): pointless eof flag resetting is deleted. + (Buffering#read): should return an empty string if the specified + size is zero. + (Buffering#readpartial): new method. + (Buffering#readline): fix typo. + (Buffering#getc): return the first character of string correctly. + (Buffering#readchar): fix typo. + (Buffering#eof?): should read again it the input buffer is empty. + (Buffering#do_write): should rescue Errno::EAGAIN. + (Buffering#puts): use "\n" as the output field separator. + + * ext/openssl/extconf.rb: get rid of GNUmakefile generation. + + * text/openssl/test_pair.rb: test for IO like methods. + + * test/ruby/ut_eof.rb: test about empty file. + +Sat Mar 5 17:48:31 2005 Hirokazu Yamamoto + + * dir.c (rb_glob): fixed mismatch of argument. + + * dir.c (fnmatch): removed unnecessary code. (by string.c 1.219) + + * win32/win32.c (NtInitialize): ditto. (by numeric.c 1.117) + +Sat Mar 5 16:50:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.65 + +Sat Mar 5 16:29:26 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: freeze callback-entry objects + + * ext/tk/lib/tkextlib/tile.rb: support tile-0.6 + +Sat Mar 5 12:52:08 2005 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): allow putting spaces between target + and colon in depend file. + +Sat Mar 5 02:41:00 2005 NAKAMURA Usaku + + * file.c (eaccess): workaround for VC++8 runtime. + + * win32/win32.c (ioinfo): VC++8 support. + +Fri Mar 4 19:39:55 2005 Nobuyoshi Nakada + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#do_includes): replace + also locally defined modules. + + * ext/iconv/iconv.c: rdocified. + + * ext/strscan/strscan.c: moved misplaced rdoc. + +Fri Mar 4 16:11:20 2005 NAKAMURA Usaku + + * eval.c (rb_exec_recursive): matched the declaration to prototype. + + * ext/curses/curses.c: don't need to check HAVE_WCOLOR_SET excluding + window_color_set(). + + * ext/tk/tcltklib.c: fixed commit mistakes. + +Fri Mar 4 12:45:17 2005 Tilman Sauerbeck + + * lib/rdoc/parsers/parse_c.rb: allow whitespace after function names. + [ruby-core:4296] + + * lib/rdoc/parsers/parse_simple.rb: adds support for private comments + in the "simple" parser. [ruby-core:4301] + +Fri Mar 4 12:45:17 2005 Charles Mills + + * lib/rdoc/parsers/parse_c.rb: adds support for constants + (rb_define_const), accessors (rb_define_attr), and makes a + couple fixes. [ruby-core:4307] + +Fri Mar 4 12:45:17 2005 Florian Gross + + * lib/rdoc/parsers/parse_rb.rb: Logic for def Builtin.method() end + [ruby-core:4302] + +Fri Mar 4 12:45:17 2005 Yukihiro Matsumoto + + * array.c: replace rb_protect_inspect() and rb_inspecting_p() by + rb_exec_recursive() in eval.c. + + * eval.c (rb_exec_recursive): new function. + + * array.c (rb_ary_join): use rb_exec_recursive(). + + * array.c (rb_ary_inspect, rb_ary_hash): ditto. + + * file.c (rb_file_join): ditto. + + * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. + + * io.c (rb_io_puts): ditto. + + * object.c (rb_obj_inspect): ditto + + * struct.c (rb_struct_inspect): ditto. + +Fri Mar 4 10:15:30 2005 Yukihiro Matsumoto + + * lib/set.rb (SortedSet::setup): a hack to shut up warning. + [ruby-talk:132866] + +Fri Mar 4 09:37:12 2005 NAKAMURA Usaku + + * common.mk (install-nodoc, pre-install-doc, post-install-doc): + fix some omissions. + +Fri Mar 4 08:09:12 2005 Yukihiro Matsumoto + + * lib/time.rb (Time::strptime): add new function. inspired by + [ruby-talk:132815]. + + * lib/parsedate.rb (ParseDate::strptime): ditto. + +Fri Mar 4 07:07:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.63 + +Thu Mar 3 23:24:00 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow nkf 1.62 + +Thu Mar 3 18:47:18 2005 Nobuyoshi Nakada + + * {bcc32,win32,wince}/Makefile.sub (config.h): check if affected + when makefiles are modified. + + * {bcc32,win32,wince}/Makefile.sub (config.status): add variables + for tests. + + * win32/ifchange.bat: try to update a file only if modified. + + * win32/resource.rb: more descriptions. + + * common.mk: add {pre,post}-install targets. + + * instruby.rb (install?): install particular part. + + * bcc32/Makefile.sub (post-install-ext): remove debug information + files after installation. + + * ext/tk/tcltklib.c (ip_rbUpdateCommand, ip_rb_threadUpdateCommand): + get rid of warnings with Tcl/Tk 8.3 or former. + +Thu Mar 3 11:49:51 2005 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb: added site information. + +Wed Mar 2 19:53:44 2005 Nobuyoshi Nakada + + * ext/extmk.rb (parse_args): return false if nothing matched. + +Wed Mar 2 17:15:08 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c (lib_eventloop_core): fix typo + +Wed Mar 2 16:59:50 2005 Hidetoshi NAGAI + + * eval.c (ruby_native_thread_kill): call pthread_kill() to send a + signal to ruby's native thread + + * ruby.h: add definition of ruby_native_thread_kill() + + * signal.c (sigsend_to_ruby_thread): send the signal to ruby's + native thread ([ruby-dev:25744], [ruby-dev:25754]), and set + signal mask to the current native thread + +Wed Mar 2 16:03:08 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: enforce thread-check and exception-handling to + avoid SEGV trouble. + + * ext/tk/tkutil/tkutil.c; fix a bug on converting a SJIS string array + to a Tcl's list string. + + * ext/tk/tcltklib.c: wrap Tcl's original "namespace" command to + protect from namespace crash. + + * ext/tk/lib/multi-tk.rb: enforce exception-handling. + + * ext/tk/lib/multi-tk.rb: catch IRB_EXIT to work on irb. + + * ext/tk/lib/tk.rb: ditto. + + * ext/tk/tcltklib.c: add TclTkLib.mainloop_thread? + + * ext/tk/lib/multi-tk.rb: (bug fix) callback returns a value. + + * ext/tk/lib/tk/canvas.rb (delete): bug fix when multiple arguments. + + * ext/tk/lib/clock.rb: fix 'no method error'. + + * ext/tk/lib/clock.rb (self.clicks): accept a Symbol argument. + + * ext/tk/lib/variable.rb: be able to set default_value_type; :numeric, + :bool, :string, :symbol, :list, :numlist or nil (default; same to + :string). If set a type, TkVariable#value returns a value of the + type. + + * ext/tk/lib/tkextlib/tclx/tclx.rb: add Tk::TclX.signal to warn the + risk of using TclX extension's 'signal' command. + + * ext/tk/sample/irbtk.rb: irb with Ruby/Tk. + + * ext/tk/sample/demos-*/anilabel.rb: bug fix on 'show code' + + * ext/tk/sample/demos-*/aniwave.rb: new Ruby/Tk animation demo. + + * ext/tk/sample/demos-*/pendulum.rb: ditto. + + * ext/tk/sample/demos-*/goldberg.rb: ditto. + + * ext/tk/sample/demos-*/widget: add entries of animation demos. + +Wed Mar 2 12:21:18 2005 Nobuyoshi Nakada + + * eval.c (rb_eval): [EXPERIMENTAL] NODE_LAMBDA implemented. + [ruby-dev:25780] + + * node.h (NODE_LAMBDA): for literal Proc object. + + * parse.y (expr): interpret mere do...end block as proc object. + + * parse.y (primary): ditto, for brace block. + +Tue Mar 1 21:16:54 2005 K.Kosako + + * regcomp.c (optimize_node_left): uninitialized member + (OptEnv.backrefed_status) was used. [ruby-dev:25778] + +Tue Mar 1 16:50:37 2005 Yukihiro Matsumoto + + * regparse.c: move st_*_strend() functions from st.c. fixed some + potential memory leaks. + +Tue Mar 1 00:40:35 2005 Masatoshi SEKI + + * lib/rinda/tuplespace.rb (Rinda::TupleSpace): improved keeper thread. + + * test/rinda/test_rinda.rb: ditto. + +Mon Feb 28 23:10:13 2005 Hirokazu Yamamoto + + * ext/socket/socket.c (Init_socket): IPv6 is not supported although + AF_INET6 is defined on bcc32. (rev1.108 again) + + * ext/socket/mkconstants.rb: ditto. + +Mon Feb 28 21:55:49 2005 K.Kosako + + * ext/strscan/strscan.c (strscan_s_allocate): + use onig_region_init(). + + * ext/strscan/strscan.c (adjust_registers_to_matched): + use onig_region_set(). + +Mon Feb 28 15:12:06 2005 Hirokazu Yamamoto + + * ext/socket/socket.c (Init_socket): ported more Socket::Constants + from ruby_1_8, and made it easy to add new constants. + [ruby-dev:25771] + + * ext/socket/depend: ditto. + + * ext/socket/mkconstants.rb: ditto. (added) + +Mon Feb 28 11:42:23 2005 Ian Macdonald + + * exception error messages updated. [ruby-core:04497] + +Mon Feb 28 09:03:09 2005 Yukihiro Matsumoto + + * ext/socket/socket.c (Init_socket): add bunch of Socket + constants. Patch from Sam Roberts . + [ruby-core:04409] + +Sun Feb 27 05:55:38 2005 Minero Aoki + + * parse.y [ripper]: fix typo. [ruby-core:04494] + +Sat Feb 26 16:58:20 2005 K.Kosako + + * parse.y, re.c, regex.h, LEGAL, ext/strscan/strscan.c: + remove oniggnu.h (GNU regex API). + +Wed Feb 23 22:08:16 2005 Kazuo Saito + + * st.c, st.h: imported additional file changes on + Oniguruma 3.7.0. + +Wed Feb 23 21:45:29 2005 Kazuo Saito + + * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, + regenc.c, regenc.h, regerror.c, regexec.c, regint.h, + regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma + 3.7.0. + +Wed Feb 23 15:04:32 2005 akira yamada + + * lib/uri/generic.rb (split_userinfo): should split ":pass" into "" + and "pass". [ruby-dev:25667] + +Wed Feb 23 08:00:18 2005 Yukihiro Matsumoto + + * array.c (rb_ary_s_create): no need for negative argc check. + [ruby-core:04463] + + * array.c (rb_ary_unshift_m): ditto. + +Wed Feb 23 01:53:29 2005 Shugo Maeda + + * lib/net/imap.rb (initialize): handle certs correctly. Thanks, + NABEYA Kenichi. + +Wed Feb 23 00:37:34 2005 Kouhei Sutou + + * lib/mkmf.rb (mkmf_failed): fixed typo. + +Tue Feb 22 23:52:45 2005 Nobuyoshi Nakada + + * configure.in, lib/mkmf.rb: use simple commands if available. + + * mkconfig.rb: remove autoconf internal variables from rbconfig.rb. + + * lib/mkmf.rb (create_makefile): substitute implicit rules in depend + file. + + * {bcc32,win32,wince}/Makefile.sub (COMPILE_RULES, RULE_SUBST): + include $(topdir) and $(hdrdir) to search path. + +Tue Feb 22 23:51:45 2005 Nobuyoshi Nakada + + * ext/syck/rubyext.c: get rid of warnings caused by a bug of VC. + +Tue Feb 22 23:50:26 2005 Nobuyoshi Nakada + + * signal.c (ruby_signal, ruby_nativethread_signal): must be valid as + expressions, not only statements. + +Tue Feb 22 12:54:13 2005 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): update curr_thread before raising + TAG_THREAD. [ruby-dev:25712] + +Tue Feb 22 07:24:57 2005 Nobuyoshi Nakada + + * parse.y (parser_yylex): identifier after dot must not be a variable. + +Mon Feb 21 18:31:12 2005 Hidetoshi NAGAI + + * signal.c: Standard signal handlers ignore signals on non-Ruby native + threads. When a handler is entried with ruby_signal() (like as the + standard signal handlers), the handler for the signal is marked as + it cannot accept non-Ruby native threads. If a handler can treat all + signals on all native threads, please use ruby_nativethread_signal() + to entry it. + +Sun Feb 20 00:48:48 2005 Tanaka Akira + + * lib/open-uri.rb (URI::FTP#buffer_open): access mechanism + re-implemented according to RFC 1738. + reported by Guillaume Marcais. [ruby-talk:131650] + +Sat Feb 19 18:46:56 2005 Masatoshi SEKI + + * lib/drb/drb.rb (DRbObject#respond_to?): take two arguments. + [ruby-dev:25722] + + * test/drb/drbtest.rb: ditto. + +Sat Feb 19 13:52:02 2005 Tanaka Akira + + * lib/open-uri.rb: call OpenSSL::SSL::SSLSocket#post_connection_check + after connection is made. + +Sat Feb 19 13:31:28 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extract_makefile): remove no longer existing installed + files. + + * lib/mkmf.rb (install_dirs): return installation directory list. + + * lib/mkmf.rb (create_makefile): reverted wrongly removed lines. + +Sat Feb 19 01:28:56 2005 Hirokazu Yamamoto + + * ext/bigdecimal/lib/bigdecimal/newton.rb: resolved LoadError. + [ruby-dev:25685] + + * ext/bigdecimal/sample/linear.rb: ditto. + + * ext/bigdecimal/sample/nlsolve.rb: ditto. + + * ext/bigdecimal/lib/bigdecimal/nlsolve.rb: removed because this file + is sample script and same file exists in ext/bigdecimal/sample. + +Fri Feb 18 17:14:00 2005 Yukihiro Matsumoto + + * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass + of StandardError class, not Exception class. [ruby-core:04429] + +Fri Feb 18 04:06:41 2005 Yukihiro Matsumoto + + * parse.y (fcall_gen): lvar(arg) will be evaluated as + lvar.call(arg) when lvar is a defined local variable. [new] + +Thu Feb 17 22:15:34 2005 K.Kosako + + * ext/strscan/strscan.c: calls Oniguruma API directly. + +Thu Feb 17 21:53:12 2005 K.Kosako + + * common.mk, LEGAL: remove reggnu.c. + +Thu Feb 17 21:53:12 2005 Kazuo Saito + + * gc.c, re.c: now ruby calls Oniguruma API directly, bypassing + GNU compatible APIs. + +Thu Feb 17 20:09:23 2005 Hirokazu Yamamoto + + * lib/drb/drb.rb (DRbServer.default_safe_level): fix typo. + +Thu Feb 17 20:09:23 2005 Nobuyoshi Nakada + + * test/digest/test_digest.rb: separate test case for each algorithms. + [ruby-dev:25412] + +Thu Feb 17 14:31:52 2005 Yukihiro Matsumoto + + * object.c (rb_class_initialize): call inherited method before + calling initializing block. + + * eval.c (rb_thread_start_1): initialize newly pushed frame. + fixed: [ruby-dev:25707] + +Thu Feb 17 13:46:00 2005 Nathaniel Talbott + + * lib/test/unit/collector.rb (collect_file): now deletes paths added + to $LOAD_PATH instead of restoring it verbatim. + + * lib/test/unit/autorunner.rb (AutoRunner.run): fixed so that + 'ruby -rtest/unit -rtest1 -rtest2 -e0' will use the objectspace + collector again. Also tried to simplify the calling convention. + + * test/runner.rb: adjusted for new AutoRunner semantics. + + * lib/test/unit.rb: ditto. + +Thu Feb 17 04:21:47 2005 Yukihiro Matsumoto + + * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. + fixed: [ruby-core:04444] + +Thu Feb 17 00:31:21 2005 Masatoshi SEKI + + * test/drb/test_drb.rb, ut_safe1.rb: port from 1.8 + +Thu Feb 17 00:02:27 2005 Yukihiro Matsumoto + + * eval.c (is_defined): NODE_IASGN is an assignment. + +Wed Feb 16 23:54:14 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_start_1): outer block variables wasn't linked to + threads. fixed: [ruby-dev:25700] + +Wed Feb 16 15:11:43 2005 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::Nonblock#initialize): + native win32 platform doesn't have F_GETFL. + +Wed Feb 16 02:47:45 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): should + call rb_sys_fail instead of raising SSLError if SSL_ERROR_SYSCALL + occurred. + + * ext/openssl/lib/openssl/buffering.rb (Buffering#fill_rbuff): + should rescue Errno::EAGAIN. + + * ext/openssl/lib/openssl/buffering.rb (Buffering#each): fix typo. + suggested by Brian Ollenberger. + + * ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the + underlying IO. + +Tue Feb 15 22:14:34 2005 sheepman + + * ext/readline/readline.c (Readline.readline): use rl_outstream + and rl_instream. [ruby-dev:25699] + +Mon Feb 14 23:58:17 2005 Kouhei Sutou + + * lib/rss/parser.rb (RSS::ListenerMixin::tag_end): + fixed invalid namespace handling bug. + +Mon Feb 14 13:12:38 2005 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb + (OpenSSL::SSL::SSLSocket#post_connection_check): new method. + +Mon Feb 14 00:10:17 2005 Masatoshi SEKI + + * lib/drb/drb.rb (DRbServer): add default_safe_level, safe_level, + config[:safe_level] ([druby-ja:120]) + + * test/drb/test_drb.rb, ut_eval.rb, ut_safe1.rb: ditto. + +Sun Feb 13 23:13:46 2005 Kouhei Sutou + + * lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added + convenient methods. + + * lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto. + + * lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto. + + * test/rss/: added tests for the convenient methods. + +Sun Feb 13 23:12:47 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_start_0): restore prot_tag before rewinding. + +Sun Feb 13 16:56:52 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI.start): should set reason-phrase + to the value of status header field. ([ruby-dev:40617]) + +Sun Feb 13 11:38:40 2005 Kazuo Saito + + * regparse.c (type_cclass_hash): (Thanks Nobu) fixed + overrun. ([ruby-dev:25676]). + +Sun Feb 13 10:53:08 2005 Kazuo Saito + + * oniggnu.h, oniguruma.h, regcomp.c, st.c: imported + Oni Guruma 3.6.0. + +Sun Feb 13 01:33:19 2005 Masatoshi SEKI + + * lib/erb.rb (ERB::Util.h, u): make it module_function. + +Sat Feb 12 22:17:11 2005 Nobuyoshi Nakada + + * eval.c (TAG_THREAD): to start a new thread. + + * eval.c (ruby_init, ruby_options, ruby_cleanup, rb_protect, + rb_load_protect, rb_thread_start_0): make thread anchor. + + * eval.c (proc_alloc): clone proc object if klass is not Proc or + created in different thread. + + * eval.c (rb_block_pass): call a function with a block. [new] + + * eval.c (rb_f_throw): raise NameError in main thread. + +Sat Feb 12 17:29:19 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_loop): send authentication only for + the URI directly specified. + +Sat Feb 12 15:07:23 2005 Nobuyoshi Nakada + + * random.c (rand_init): suppress warning. + +Sat Feb 12 14:10:24 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_http): reject userinfo explicitly. + +Sat Feb 12 13:54:03 2005 Tanaka Akira + + * lib/open-uri.rb: support https if the platform provides CA + certificates. + +Sat Feb 12 06:18:28 2005 URABE Shyouhei + + * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check + [ruby-dev:25675] + +Fri Feb 11 17:37:50 2005 GOTOU Yuuzou + + * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths): + new method OpenSSL::X509::Store#set_default_paths. + +Fri Feb 11 11:33:53 2005 Tanaka Akira + + * lib/open-uri.rb (URI::HTTP#proxy_open): new option supported: + :http_basic_authentication. + suggested by Kent Sibilev. [ruby-core:4392] + +Fri Feb 11 06:30:07 2005 George Ogata + + * misc/ruby-mode.el: ignore parenthesis inside heredoc. + [ruby-core:04415] + +Fri Feb 11 04:54:13 2005 Tilman Sauerbeck + + * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] + + * lib/rdoc/generators/ri_generator.rb: ditto. + +Thu Feb 10 13:52:42 2005 NAKAMURA Usaku + + * configure.in, win32/Makefile.sub (LIBS, COMMON_HEADERS): use + winsock2 on mswin32/mingw. + + * ext/socket/extconf.rb: ditto. + + * win32/win32.c (StartSockets): ditto. + + * win32/win32.h: ditto. + +Thu Feb 10 12:09:16 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extract_makefile): default to true if not compiled + previously. + + * ext/extmk.rb (extmake): create dummy makefile if extconf failed. + +Thu Feb 10 12:07:10 2005 Nobuyoshi Nakada + + * win32/win32.c (init_stdhandle): assign standard file handles. + + * bcc32/Makefile.sub (COMMON_LIBS): add libraries included in + import32.lib. + + * lib/mkmf.rb (create_makefile): restrict prefixing with srcdir to + rule lines, add search path to implicit rules, and set Borland make + special macros for search path. + + * win32/win32.c, win32/win32.h (read): avoid a BCC runtime bug. + +Thu Feb 10 00:47:25 2005 Yukihiro Matsumoto + + * struct.c (make_struct): fixed: [ruby-core:04402] + +Wed Feb 9 16:33:05 2005 NAKAMURA Usaku + + * ext/socket/socket.c (wait_connectable): fixed wrong condition. + +Wed Feb 9 14:42:28 2005 URABE Shyouhei + + * eval.c (scope_dup): add volatile not to optimize tbl. + +Wed Feb 9 10:02:02 2005 NAKAMURA Usaku + + * ext/tk/make-tkutil, ext/tk/tkutil/subconf.rb: no longer used. + + * ext/tk/tkutil/extconf.rb: need to compile tkutil. [ruby-dev:25607] + +Wed Feb 9 08:07:08 2005 Paul Duncan + + * ext/curses/curses.c (window_color_set): [ruby-core:04393] + +Tue Feb 8 23:48:36 2005 Masatoshi SEKI + + * lib/drb/drb.rb: reject :instance_eval, :class_eval, :module_eval + [druby-ja:117] + +Tue Feb 8 22:38:28 2005 Nobuyoshi Nakada + + * keywords, parse.y: separate EXPR_VALUE from EXPR_BEG. + fixed: [ruby-core:04310], [ruby-core:04368] + +Tue Feb 8 13:06:12 2005 Sam Roberts + + * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. + [ruby-talk:130092] + +Tue Feb 8 00:19:02 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Name#subdomain_of?): new method. + (Resolv::DNS::Name#inspect): ditto. + Suggested by Sam Roberts. [ruby-talk:129086] + +Mon Feb 7 23:14:11 2005 Tanaka Akira + + * io.c (io_getc): flush rb_stdout before read from stdin, which is + connected to a tty. [ruby-core:4378] + + * rubyio.h (FMODE_TTY): renamed from FMODE_LINEBUF. + +Mon Feb 7 10:06:30 2005 Yukihiro Matsumoto + + * object.c: [ruby-doc:818] + +Mon Feb 7 02:13:05 2005 NAKAMURA Usaku + + * ext/socket/extconf.rb (sockaddr_storage): winsock2.h have the + definition of struct sockaddr_storage, but socket.c doesn't + include it because this version of ruby still has binary level + compatibility with winsock1. + +Mon Feb 7 01:22:50 2005 Nobuyoshi Nakada + + * ext/extmk.rb (extract_makefile): extract previously collected + informations from existing Makefile. + + * ext/socket/extconf.rb: check if getaddrinfo() works fine only when + wide-getaddrinfo option is not given. fixed: [ruby-dev:25422] + + * ext/tk/extconf.rb: separate tkutil configuration. + + * lib/mkmf.rb ($extmk): check if under ext directory. + + * lib/mkmf.rb (Logging.postpone): allow recursive operation. + + * lib/mkmf.rb (try_constant): make sure if really a constant, reduce + the number of times of compile. + + * lib/mkmf.rb (have_macro, have_var, byte_order): new functions. + + * lib/mkmf.rb (find_library): allow directory list with separators. + + * lib/mkmf.rb (arg_config): manage provided configuration options. + + * lib/mkmf.rb (dir_config): accept arrays of directory names as + default values. + + * lib/mkmf.rb (with_cppflags, with_cflags, with_ldflags): keep flags + modified if the block returned true. + +Sun Feb 6 19:20:05 2005 NAKAMURA Usaku + + * eval.c (stack_extend): add prototype because VC++8 doesn't + accept __declspec(noinline) with K&R style function definitions. + +Sun Feb 6 13:56:19 2005 Tadayoshi Funaba + + * lib/date.rb (new_with_hash): changed messages of exception. + + * lib/date/format.rb (str[fp]time): undocumented conversion + specifications %[1-3] are now deprecated. + +Sun Feb 6 11:27:37 2005 Tanaka Akira + + * ext/dl/dl.c (Init_dl): function declaration should precede + statements before C99. + +Sun Feb 6 03:24:20 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Resource::TXT): multiple strings was not + handled. + (Resolv::DNS::Resource::TXT#strings): new method to return all + strings. + (Resolv::DNS::Message::MessageEncoder#put_string_list): new method. + (Resolv::DNS::Message::MessageDecoder#get_string_list): ditto. + based on [ruby-talk:129732] by Sam Roberts. + +Sat Feb 5 02:24:06 2005 Minero Aoki + + * test/ripper/test_scanner_events.rb: fix test. + +Fri Feb 4 18:44:35 2005 Minero Aoki + + * ext/ripper/lib/ripper/lexer.rb: last Lexer fix was incomplete; + test all green. + +Fri Feb 4 15:57:06 2005 Yukihiro Matsumoto + + * parse.y (open_args): fix too verbose warnings for the space + before argument parentheses. [ruby-dev:25492] + + * parse.y (parser_yylex): ditto. + +Fri Feb 4 14:33:25 2005 Minero Aoki + + * ext/ripper/lib/ripper/filter.rb: ripper/tokenizer -> + ripper/lexer. [ruby-dev:25632] + +Fri Feb 4 00:24:15 2005 Kouhei Sutou + + * lib/rss: supported Image module. + http://web.resource.org/rss/1.0/modules/image/ + +Thu Feb 3 23:42:36 2005 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_close, strio_close_read, strio_close_write): + should return nil instead of self as well as IO. [ruby-dev:25623] + + * ext/stringio/stringio.c (strio_extend, strio_putc): fill with zero + extended portion. [ruby-dev:25626] + +Thu Feb 3 16:12:57 2005 Yukihiro Matsumoto + + * parse.y (parser_yylex): the first expression in the parentheses + should not be a command. [ruby-dev:25492] + +Thu Feb 3 03:31:20 2005 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: follow original v 1.57 + + * ext/nkf/nkf-utf8/utf8tbl.c: follow original v 1.8 + + * ext/nkf/nkf-utf8/config.h: follow original v 1.7 + +Wed Feb 2 23:52:53 2005 sheepman + + * ext/stringio/stringio.c (strio_truncate): should MEMZERO an extended + part. [ruby-dev:25618] + +Wed Feb 2 21:56:01 2005 Kouhei Sutou + + * lib/rss/rss.rb (RSS::Element#convert): added. + + * lib/rss/rss.rb: convert -> need_convert. + + * lib/rss/1.0.rb: ditto. + + * lib/rss/0.9.rb: ditto. + + * lib/rss/2.0.rb: ditto. + + * lib/rss/trackback.rb: ditto. + +Wed Feb 2 03:30:58 2005 Minero Aoki + + * ext/ripper/lib/ripper/tokenizer.rb -> lexer.rb. + + * ext/ripper/lib/ripper/lexer.rb: new method Ripper.slice. + [experimental] + + * ext/ripper/lib/ripper/sexp.rb: new file. [experimental] + + * ext/ripper/lib/ripper.rb: require ripper/lexer and ripper/sexp. + +Tue Feb 1 21:49:24 2005 Masatoshi SEKI + + * lib/drb/drb.rb (DRb::DRbObject#respond_to?): check marshal_dump and + _dump. + +Tue Feb 1 00:20:23 2005 Nobuyoshi Nakada + + * Makefile.in, configure.in: made EXTOUT configurable. + + * ext/extmk.rb (extmake), lib/mkmf.rb: keep topdir as relative style. + + * lib/mkmf.rb: make extensions in depth order. [ruby-dev:25522] + + * configure.in (aix): fix linker flags on AIX. [ruby-talk:125460] + +Mon Jan 31 13:16:39 2005 Hidetoshi NAGAI + + * ext/tk/extconf.rb: add tkutil configuration step (remove old schema) + + * ext/tk/depend: remove the information of tkutil + + * ext/tk/make-tkutil: sub-part of Makefile to compile tkutil + + * ext/tk/tkutil/tkutil.c: move tkutil.c to subdirectory + + * ext/tk/tkutil/subconf.rb: configuration file for tkutil.c + + * ext/tk/tkutil/depend: ditto + +Mon Jan 31 13:13:35 2005 Hidetoshi NAGAI + + * ext/tk/tcltklib.c: add invalid namespace check + + * ext/tk/lib/multi-tk.rb: add invalid_namespace? method + + * ext/tk/lib/remote-tk.rb: ditto + +Mon Jan 31 10:29:18 2005 Yukihiro Matsumoto + + * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] + +Mon Jan 31 09:44:03 2005 Yukihiro Matsumoto + + * object.c (Init_Object): remove Object#type. [ruby-core:04335] + +Sat Jan 29 09:42:12 2005 Sam Roberts + + * lib/resolv.rb (Resolv::DNS::Resource::IN::SRV): Added RFC2782 SRV + resource record for specifying location of services. + +Sat Jan 29 00:10:33 2005 Kazuo Saito + + * ascii.c, euc_jp.c, hash.c, oniggnu.h, oniguruma.h, regcomp.c, + regenc.c, regenc.h, regerror.c, regexec.c, reggnu.c, regint.h, + regparse.c, regparse.h, sjis.c, st.c, st.h, utf8.c: imported + Oni Guruma 3.5.4. + +Fri Jan 28 17:16:55 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf): + parse options line for ndots option. + (Resolv::Hosts#lazy_initialize): return self. + (Resolv::DNS#lazy_initialize): ditto. + (Resolv::DNS::Config#lazy_initialize): ditto. + Suggested by Sam Roberts. + +Thu Jan 27 17:15:03 2005 NAKAMURA Usaku + + * ext/tk/extconf.rb: support new tk scheme on bccwin32. + fixed: [ruby-dev:25546] + +Thu Jan 27 13:18:03 2005 Yukihiro Matsumoto + + * st.c (st_foreach): report success/failure by return value. + [ruby-Bugs-1396] + +Thu Jan 27 00:12:19 2005 Minero Aoki + + * test/fileutils/test_fileutils.rb (setup): support BSD style + directory group inheritance (again). + +Thu Jan 27 00:02:40 2005 Minero Aoki + + * test/fileutils/test_fileutils.rb (setup): support BSD style + directory group inheritance. [ruby-dev:25440] + + * test/fileutils/fileasserts.rb (assert_same_entry): show entry + difference. + +Wed Jan 26 17:12:50 2005 Yukihiro Matsumoto + + * parse.y: forgot to initialize parser struct. [ruby-dev:25492] + + * parse.y (parser_yylex): no tLABEL on EXPR_BEG. + [ruby-talk:127711] + +Wed Jan 26 14:12:58 2005 NAKAMURA Usaku + + * ext/Setup*: remove tcltklib. + +Wed Jan 26 12:45:16 2005 NAKAMURA Usaku + + * ext/tk/extconf.rb: support new tk scheme on mswin32. + fixed: [ruby-dev:25535] + +Wed Jan 26 10:45:19 2005 NAKAMURA Usaku + + * win32/win32.c (flock_winnt, flock_win95): unlock file even if + LOCK_NB is specified. + +Tue Jan 25 23:10:48 2005 Hidetoshi NAGAI + + * ext/tk: merge tcltklib for Ruby/Tk installation control + + * ext/tcltklib: remove + +Tue Jan 25 17:05:15 2005 NAKAMURA Usaku + + * ruby.c (proc_options): correct -T option in RUBYOPT. + fixed: [ruby-dev:25512] + +Tue Jan 25 14:05:52 2005 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix SEGV bug; trouble on canceling remained + after scripts [ruby-dev:25479]: NULL current namespace when deleting + Tk interpreter [ruby-talk:126225] + + * ext/tcltklib/extconf.rb: bug fix; TCL_ENABLE_THREAD flag is inverted + [ruby-talk:126360] + + * ext/tcltklib/extconf.rb: add yet another native-thread check + + * ext/tk/tkutil.c: fix SEGV bug; NULL string pointer when finalize + Ruby interpreter + + * ext/tk/lib/multi-tk.rb: avoid warning for deleted safeTk ip frame + + * ext/tk/lib/tk/bindtag.rb: bug fix; new method of named bindtag + doesn't return the created object [ruby-dev:25479] + + * ext/tk/lib/tk/menu.rb: bug on treating arguments [ruby-dev:25479] + + * ext/tk/lib/tk.rb: bug fix; cannot accept a callback ID string for + a command argument [ruby-dev:25479] + + * ext/tk/lib/multi-tk.rb: ditto + + * ext/tk/lib/tk/*.rb: ditto + + * ext/tk/lib/tkextlib/*.rb: ditto + + * ext/tk/sample/demos-jp/anilabel.rb: new demo script + + * ext/tk/sample/demos-en/anilabel.rb: ditto + + * ext/tk/sample/tkHTML/ss.rb: local variable scope bug fix + [ruby-dev:25479] + +Mon Jan 24 16:00:53 2005 NARUSE, Yui + + * ext/nkf/lib/kconv.rb (guess_old): not use NKF.guess_old + but NKF.guess1. fixed: [ruby-dev:25491] + +Mon Jan 24 15:44:25 2005 Yukihiro Matsumoto + + * document updates - [ruby-core:04296], [ruby-core:04301], + [ruby-core:04302], [ruby-core:04307] + +Sun Jan 23 12:38:01 2005 NAKAMURA, Hiroshi + + * lib/soap/wsdlDriver.rb: from 1.5.3-ruby1.8.2, operation which has + capitalized name (such as KeywordSearchRequest in AWS) is defined as + a method having uncapitalized name. (converted with + GenSupport.safemethodname to handle operation name 'foo-bar'). it + introduced serious incompatibility; in the past, it was defined as a + capitalized. + + define capitalized method as well under that circumstance. + +Sun Jan 23 05:24:42 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ocsp.c (ossl_ocspreq_to_der): should call + GetOCSPReq at first. + +Sat Jan 22 22:59:08 2005 Masatoshi SEKI + + * lib/drb/ssl.rb (accept): rescue SSLError. [druby-ja:110] + +Sat Jan 22 22:27:28 2005 Masatoshi SEKI + + * lib/drb/unix.rb: fail if UNIXFileOwner is set. [druby-ja:111] + +Fri Jan 21 20:07:02 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Config.resolv): don't raise ResolvError. + reported by Sam Roberts. [ruby-talk:127133] + +Fri Jan 21 17:09:44 2005 Shugo Maeda + + * lib/net/imap.rb (decode_utf7): use pack("U*") to encode UTF-8. + + * lib/net/imap.rb (encode_utf7): use unpack("U*") to decode UTF-8. + + * test/net/imap/test_imap.rb: added tests for Net::IMAP. + +Fri Jan 21 16:58:10 2005 Yukihiro Matsumoto + + * dir.c (rb_push_glob): should work for NUL delimited patterns. + + * dir.c (rb_glob2): should aware of offset in the pattern. + +Fri Jan 21 13:58:37 2005 Shugo Maeda + + * lib/net/imap.rb (u8tou16): fixed typo. fixed: [ruby-list:40546] + +Fri Jan 21 00:37:09 2005 Hirokazu Yamamoto + + * ext/syck/rubyext.c (syck_parser_bufsize_set): avoid VC++ warning + "local variable 'size' used without having been initialized". + +Thu Jan 20 11:42:02 2005 Yukihiro Matsumoto + + * string.c (rb_str_new4): should propagate taintedness. + + * env.h: rename member names in struct FRAME; last_func -> callee, + orig_func -> this_func, last_class -> this_class. + + * struct.c (rb_struct_set): use original method name, not callee + name, to retrieve member slot. [ruby-core:04268] + + * time.c (time_strftime): protect from format modification from GC + finalizers. + +Thu Jan 20 02:01:10 2005 Yukihiro Matsumoto + + * object.c (Init_Object): remove rb_obj_id_obsolete() + +Wed Jan 19 18:02:19 2005 NAKAMURA Usaku + + * lib/ipaddr.rb (to_s, test_to_s): too many colons with some cases. + +Wed Jan 19 01:16:30 2005 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Config.parse_resolv_conf): ignore + domain and search directive without an argument. + reported by Sam Roberts. [ruby-talk:126781] + +Mon Jan 17 23:33:46 2005 Nobuyoshi Nakada + + * configure.in (aix): fix typo. [ruby-talk:126401] + +Mon Jan 17 07:08:51 2005 Nobuyoshi Nakada + + * ext/readline/readline.c: suppress warnings. + + * lib/irb/extend-command.rb (IRB::ContextExtender.def_extend_command): + ditto. + + * lib/irb/ext/history.rb (IRB::Context::set_last_value): ditto. + + * lib/irb/ext/history.rb (IRB::Context::eval_history): ditto. + + * lib/irb/locale.rb (IRB::Locale::real_load): ditto. + + * lib/irb/slex.rb (SLex::Node::create_subnode): remove garbage. + +Mon Jan 17 00:09:42 2005 WATANABE Hirofumi + + * lib/uri/common.rb (PORT): typo fix. fixed: [ruby-core:04256] + +Sat Jan 15 14:57:22 2005 Nobuyoshi Nakada + + * ruby.c (proc_options): ignore trailing CRs at the end of short + options as well as long options. fixed: [ruby-core:04232] + +Sat Jan 15 13:44:22 2005 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.2 -> 0.1.3. + + * lib/rss/rss.rb: accept inheritance. [ruby-talk:126104] + +Wed Jan 12 12:29:28 2005 Yukihiro Matsumoto + + * eval.c (rb_mod_define_method): incomplete subclass check. + [ruby-dev:25464] + + * class.c (rb_make_metaclass): class of metaclasses should be + plain Class. [ruby-list:40524] + +Tue Jan 11 20:58:52 2005 Nobuyoshi Nakada + + * io.c (remain_size): use buffered data instead of unreading to avoid + inconsistency of text mode. fixed: [ruby-dev:25446] + +Tue Jan 11 09:37:53 2005 Hirokazu Yamamoto + + * numeric.c (Init_Numeric): turn off floating point exceptions + on bcc32. "1e300".to_f had crashed by overflow. + +Mon Jan 10 15:28:51 2005 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): should + escape SCRIPT_NAME and PATH_INFO before being parsed as a URI. + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add + new method to escape URI path component. + + * lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value + of :SSLEnable is false. + + * test/webrick/{test_cgi.rb,webrick.cgi}: new file. + + * test/webrick/utils.rb: require "webrick/https.h". + +Mon Jan 10 01:22:55 2005 Yukihiro Matsumoto + + * gc.c (rb_data_object_alloc): klass may be NULL. + [ruby-list:40498] + +Sun Jan 9 14:12:17 2005 Nobuyoshi Nakada + + * io.c (rb_f_select): IO list could be altered. [ruby-dev:25312] + +Sun Jan 9 04:08:40 2005 GOTOU Yuuzou + + * test/webrick/test_server.rb (test_daemon): delete an assertion + which has possibility to fail by race condition. + +Sun Jan 9 03:22:46 2005 Minero Aoki + + * test/fileutils/test_fileutils.rb (test_copy_entry): copy_entry + copies only file type, not mtime. [ruby-dev:25383] + +Sat Jan 8 04:38:47 2005 why the lucky stiff + + * lib/yaml.rb: Kernel#y requires an argument. + +Fri Jan 7 21:12:29 2005 TAMURA Takashi + + * random.c (rand_init): use ALLOC_N instead of ALLOCA_N + [ruby-dev:25426] + +Fri Jan 7 20:01:31 2005 GOTOU Yuuzou + + * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service): + should delete trailing LF from the result of pack("m*"). + + * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect): + - should delete trailing LF from the result of pack("m*"). + - clear Request-Line not to send the response by HTTPServer#run. + + * lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues): + refine regexp (and change the name of a local variable). + + * lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio + don't allow changing its mode. + + * test/webrick/*, sample/webrick/httpproxy.rb: add new files. + +Fri Jan 7 18:03:35 2005 Tanaka Akira + + * gc.c (mark_locations_array): avoid core dump with -O3. + [ruby-dev:25424] + +Thu Jan 6 20:29:18 2005 NAKAMURA Usaku + + * ext/zlib/zlib.c (zstream_end): should return value. + +Thu Jan 6 19:59:03 2005 Hirokazu Yamamoto + + * win32/win32.c (rb_w32_close): didn't close socket handle. + [ruby-dev:25414] + + * win32/win32.c (rb_w32_open_osfhandle): bcc32's _open_osfhandle + never set EMFILE. + +Thu Jan 6 17:22:41 2005 Hirokazu Yamamoto + + * random.c (random_seed): O_NONBLOCK isn't defined on some + platforms. [ruby-dev:25417] + +Thu Jan 6 13:45:35 2005 Tanaka Akira + + * lib/time.rb: recognize +00:00 and GMT as a localtime. + +Thu Jan 6 07:58:28 2005 Dave Thomas + + * lib/rdoc/usage.rb (RDoc::RDoc.usage_no_exit): Allow for colons + in path names on DOS machines. (thanks to Johan Nilsson) + +Thu Jan 6 00:02:35 2005 Masatoshi SEKI + + * test/rinda/test_rinda.rb: use MockClock.sleep instead of Kernel.sleep + [ruby-dev:25387] + +Wed Jan 5 20:16:32 2005 Tanaka Akira + + * random.c (limited_big_rand): didn't work if SIZEOF_BDIGITS == 2. + [ruby-dev:25408] + + * random.c (random_seed): refined. + +Wed Jan 5 16:39:54 2005 Hirokazu Yamamoto + + * parse.y (BITSTACK_POP): workaround for bcc32 compiler's bug. + shift assignment operator '>>=' for __int64 in struct may + generate collapsed code. [ruby-dev:25342] + + * win32/win32.[ch]: failed to compile on bcc32 (and probably wince) + [ruby-dev:25306] + +Wed Jan 5 12:49:39 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_initialize): Thread objects cannot be initialized + again. fixed: [ruby-core:04067] + +Wed Jan 5 02:30:11 2005 Tanaka Akira + + * random.c (init_by_array): imported from mt19937ar-cok.tgz. + (genrand_int32): ditto. + (genrand_real): replaced with genrand_res53 in mt19937ar-cok. + (rand_init): support bignum for longer seed. + (random_seed): generate longer seed. + (make_mask): new function. + (limited_rand): ditto. + (limited_big_rand): ditto. + (rb_f_rand): call limited_rand and limited_big_rand. + [ruby-dev:25403] + +Tue Jan 4 23:25:29 2005 Yukihiro Matsumoto + + * bignum.c (rb_big_rand): should return positive random number. + [ruby-dev:25401] + +Tue Jan 4 21:25:43 2005 Masatoshi SEKI + + * test/drb/{test_drbssl.rb,test_drbunix.rb,ut_drb.rb}: use + DRbService.ext_service. reduce sleep. + +Mon Jan 3 14:01:54 2005 Tanaka Akira + + * random.c (random_seed): don't use /dev/urandom if it is not + character device. + +Mon Jan 3 11:37:42 2005 Tanaka Akira + + * random.c (random_seed): use /dev/urandom if available. + [ruby-dev:25392] + +Tue Jan 4 11:15:29 2005 TAMURA Takashi + + * bignum.c (rb_big_rand): do not use rb_big_modulo to generate + random bignums. [ruby-dev:25396] + +Mon Jan 3 11:03:37 2005 Masatoshi SEKI + + * test/drb/test_drb.rb: move TestDRbReusePort to new file. + [ruby-dev:25238] + + * test/drb/drbtest.rb: change timeout. + + * test/drb/ignore_test_drb.rb: new file. + +Mon Jan 3 07:27:46 2005 GOTOU Yuuzou + + * lib/webrick/httpauth/htpasswd.rb (WEBrick::Htpasswd#reload): + raise NotImplementedError if password is encrypted by digest + algorithms. This patch is contributed by sheepman. [ruby-list:40467] + + * lib/webrick/httpauth/digestauth.rb + (WEBrick::HTTPAuth::DigestAuth#_authenticate): fix digest calculation. + This patch is contributed by sheepman. [ruby-list:40482] + + * lib/webrick/{httpauth.rb,httpauth/basicauth.rb,httpproxy.rb}: use + pack/unpack-template char "m" instead of lib/base64.rb to do base64 + encoding/decoding. fixed: [ruby-dev:25336] + + * test/webrick/test_httpauth.rb: new file. + +Sun Jan 2 15:42:10 2005 Masatoshi SEKI + + * lib/drb/drb.rb: add lazy stop_service. + + * lib/drb/extserv.rb: ditto. + +Sun Jan 2 01:17:17 2005 Masatoshi SEKI + + * test/drb/drbtest.rb: add method DRbService.ext_service. + + * test/drb/test_drb.rb: ditto. + + * test/drb/test_drbssl.rb: ditto. + +Sat Jan 1 20:23:02 2005 Tanaka Akira + + * io.c (argf_readpartial): new method ARGF.readpartial. + (io_getpartial): extracted from io_readpartial. + (io_readpartial): call io_getpartial. + +Sat Jan 1 17:44:54 2005 Minero Aoki + + * lib/net/http.rb (each_capitalized): should join header field + value. This patch is contributed sheepman [ruby-list:40478] + + * test/net/http/test_httpheader.rb: test it. + +Sat Jan 1 16:21:29 2005 Minero Aoki + + * lib/fileutils.rb (copy_stream): use read/write instead of + sysread/syswrite, which allows duck typing. [ruby-dev:25369] + + * lib/fileutils.rb (copy_stream): does NOT support nonblocking IO. + [ruby-dev:25370] + + * lib/fileutils.rb (copy_entry): could not copy symlink. + + * test/fileutils/test_fileutils.rb: test copy_entry, copy_file, + copy_stream. + +Sat Jan 1 04:20:23 2005 GOTOU Yuuzou + + * ext/openssl/ossl_ns_spki.c (ossl_spki_set_challenge): should call + StringValue before GetSPKI. fixed: [ruby-dev:25359]. + +Sat Jan 1 01:13:28 2005 Yukihiro Matsumoto + + * variable.c (rb_autoload): [ruby-dev:25373] + +Fri Dec 31 14:10:43 2004 Dave Thomas + + * lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item): + Fix problem if heading contains formatting. + +Fri Dec 31 00:08:02 2004 Tanaka Akira + + * configure.in (HAVE_RLIM_T): removed because not used. + +Thu Dec 30 22:45:39 2004 Tanaka Akira + + * rubyio.h: don't deprecate rb_read_check. + + * io.c (STDIO_READ_DATA_PENDING): reverted from old READ_DATA_PENDING + to check stdio read buffer. + (rb_read_check): use STDIO_READ_DATA_PENDING. + (rb_read_pending): ditto. + (rb_getc): ditto. + +Thu Dec 30 05:39:35 2004 Minero Aoki + + * parse.y: eliminate unused members in struct parser_params. + [ruby-dev:25258] (again) + + * parse.y: make parser_new() static. + +Thu Dec 30 00:41:42 2004 Yukihiro Matsumoto + + * eval.c (svalue_to_avalue): [ruby-dev:25366] + + * string.c (rb_str_justify): [ruby-dev:25367] + +Wed Dec 29 11:07:07 2004 Dave Thomas + + * lib/rdoc/generators/template/html/kilmer.rb: Update to use new + sections. + +Tue Dec 28 22:31:46 2004 Nobuyoshi Nakada + + * string.c (rb_str_justify): create buffer string after argument type + conversion. fixed: [ruby-dev:25341] + +Tue Dec 28 17:18:17 2004 NAKAMURA Usaku + + * lib/net/telnet.rb (preprocess): remove NULL unless binmode. + fixed: [ruby-list:40320] + +Tue Dec 28 15:41:48 2004 Nobuyoshi Nakada + + * ext/nkf/nkf-utf8/nkf.c (reinit): should initialize all static + variables. fixed: [ruby-list:40445] + +Tue Dec 28 15:25:20 2004 Nobuyoshi Nakada + + * ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): second byte is up to + 0xfe. + + * ext/nkf/lib/kconv.rb (Kconv#kconv): should handle UTF8 and UTF16 + properly. + +Tue Dec 28 13:35:20 2004 Nobuyoshi Nakada + + * ext/zlib/zlib.c (rb_deflate_s_deflate, rb_inflate_s_inflate): ensure + freeing internal zstreams. fixed: [ruby-dev:25309] + + * ext/zlib/zlib.c (rb_deflate_init_copy): replace rb_deflate_clone. + +Mon Dec 27 20:02:14 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix SEGV bug when deleting Tk interp + + * ext/tk/lib/multi-tk.rb: ditto + +Mon Dec 27 16:54:05 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c (Init_ossl_x509name): should use + rb_hash_new to get exactly a Hash. fix [ruby-dev:25325]. + +Mon Dec 27 15:29:12 2004 Minero Aoki + + * test/fileutils/test_fileutils.rb (cp_r): tested wrong file name. + [ruby-dev:25339] + +Mon Dec 27 15:15:18 2004 Minero Aoki + + * lib/fileutils.rb (mv): should raise error when moving a + directory to the (empty) directory. [ruby-talk:124368] + + * lib/fileutils.rb (mv): wrongly did not overwrite file on Win32 + platforms. + +Mon Dec 27 14:36:20 2004 NAKAMURA Usaku + + * process.c (NUM2RLIM, RLIM2NUM): Without SIZEOF_RLIM_T is not error. + fixed: [ruby-dev:25346] + +Sun Dec 26 16:21:39 2004 Shugo Maeda + + * lib/net/imap.rb (Net::IMAP::PlainAuthenticator): added a new class + to support the PLAIN authentication mechanism. Thanks, Benjamin + Stiglitz. + +Sat Dec 25 01:28:23 2004 Yukihiro Matsumoto + + * io.c (rb_f_select): [ruby-dev:25312] + +Fri Dec 24 23:27:18 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/image.rb: TkPhotoImage#cget bug fix + +Fri Dec 24 03:06:13 2004 Nobuyoshi Nakada + + * io.c (io_reopen, rb_io_reopen): prohibit to change access mode for + special IO ports. [ruby-dev:25225] + + * io.c (next_argv): reduce use of stdio. + +Fri Dec 24 02:22:53 2004 Nobuyoshi Nakada + + * ext/syck/rubyext.c (syck_loader_transfer): check type conversion. + + * ext/syck/rubyext.c (syck_parser_assign_io, rb_new_syck_node): duck + typing. + + * ext/syck/rubyext.c (syck_parser_s_alloc, syck_parser_initialize): + allocation framework. + + * ext/syck/rubyext.c (syck_emitter_s_alloc, syck_emitter_initialize): + ditto. + +Fri Dec 24 01:21:00 2004 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/blt.rb: add BLT extension support + + * ext/tk/lib/tkextlib/blt/*.rb: ditto + + * ext/tk/lib/tkextlib/blt/tile/*.rb: ditto + +Thu Dec 23 23:43:24 2004 Nobuyoshi Nakada + + * process.c (proc_setgroups): check if the argument length is + modified. fixed: [ruby-dev:25285] + + * process.c (SIZEOF_RLIM_T): err if size of rlim_t is not set. + +Thu Dec 23 19:08:41 2004 Tanaka Akira + + * rubyio.h: rename FMODE_UNSEEKABLE to FMODE_DUPLEX. + + * io.c (io_check_tty): extracted function to set FMODE_LINEBUF and + FMODE_DUPLEX. + +Thu Dec 23 13:13:33 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: define TclTkLib::COMPILE_INFO and + RELEASE_DATE + + * ext/tcltklib/extconf.rb: ditto + + * ext/tk/tkutil.c: define TkUtil::RELEASE_DATE + + * ext/tk/lib/tk.rb: define Tk::RELEASE_DATE + +Thu Dec 23 00:16:32 2004 Nobuyoshi Nakada + + * configure.in (bsdi): use $(CC) for LDSHARED. fixed [ruby-dev:25270] + +Wed Dec 22 11:14:55 2004 Nobuyoshi Nakada + + * io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR. + fixed: [ruby-dev:25273] + +Wed Dec 22 08:34:32 2004 Nobuyoshi Nakada + + * ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after + all argument conversion. fixed: [ruby-dev:25271] + +Tue Dec 21 16:15:21 2004 Michael Neumann + + * lib/xmlrpc/client.rb: use "" instead of "." if prefix argument is + nil in proxy methods. nil is default value. + + * test/xmlrpc/test_webrick_server.rb, test/xmlrpc/webrick_testing.rb: + use threads instead of forking. this should fix issue #1208 + (http://rubyforge.org/tracker/?func=detail&atid=1698&aid=1208&group_id=426). + removed testing of SSL enabled servlet as this hangs. + +Wed Dec 22 00:05:10 2004 NAKAMURA, Hiroshi + + * lib/soap/*, test/soap/*, sample/soap/authheader/*: eval cleanup. + +Tue Dec 21 22:07:41 2004 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_asn1_decode_all): use rb_str_new4 + to avoid SEGV. + + * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode, + ossl_asn1_decode_all): temporary value should be marked volatile. + +Tue Dec 21 12:42:34 2004 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode): + use rb_str_new4 to avoid SEGV. fix [ruby-dev:25261] + + * test/openssl/test_asn1.rb: add tests for OpenSSL::ASN1. + +Tue Dec 21 12:10:04 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/grid.rb: rescue bug of 'grid configure' on Tcl/Tk8.3- + +Mon Dec 20 22:52:29 2004 NAKAMURA, Hiroshi + + * added samples for the previous soap4r's commit. + +Mon Dec 20 22:56:39 2004 Tanaka Akira + + * gc.c (set_stack_end): gcc noinline attribute is available since + gcc-3.1. + +Mon Dec 20 22:40:31 2004 NAKAMURA, Hiroshi + + * added files: + * lib/soap/mapping/wsdl*.rb + * lib/wsdl/soap/element.rb + * lib/wsdl/xmlSchema/simpleContent.rb + + * modified files: + * lib/soap/* + * lib/wsdl/* + * lib/xsd/* + * test/soap/* + * test/wsdl/* + * test/xsd/* + + * summary + * imported from the soap4r repository. Version: 1.5.3-ruby1.8.2 + + * added several XSD basetype support: nonPositiveInteger, + negativeInteger, nonNegativeInteger, unsignedLong, unsignedInt, + unsignedShort, unsignedByte, positiveInteger + + * HTTP client connection/send/receive timeout support. + + * HTTP client/server gzipped content encoding support. + + * improved WSDL schema definition support; still is far from + complete, but is making step by step improvement. + +Mon Dec 20 14:45:19 2004 GOTOU Yuuzou + + * lib/net/https.rb: delete descriptions about key_file and cert_file. + fixed: [ruby-dev:25243] + + * ext/openssl/lib/net/telnets.rb: ditto. + +Mon Dec 20 14:07:02 2004 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: supports new features of Tcl/Tk8.5a2 + + * ext/tk/lib/tk/clock.rb: ditto + + * ext/tk/lib/tk/text.rb: ditto + + * ext/tk/lib/tk/panedwindow.rb: ditto + +Mon Dec 20 13:51:40 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] + +Mon Dec 20 10:51:58 2004 Nobuyoshi Nakada + + * parse.y (special_local_set): prevent the parser object from GC. + fixed: [ruby-dev:25252] + +Mon Dec 20 03:30:40 2004 Nobuyoshi Nakada + + * lib/cgi/session.rb (CGI::Session#initialize): empty session id was + used if request had no session key. fixed: [ruby-core:03981] + +Mon Dec 20 01:51:01 2004 Yukihiro Matsumoto + + * struct.c (make_struct): [ruby-dev:25249] + +Mon Dec 20 00:16:54 2004 Kouhei Sutou + + * lib/rexml/encodings/SHIFT_JIS.rb: fixed LoadError bug. + [ruby-core:3958] + +Sun Dec 19 17:24:59 2004 Nobuyoshi Nakada + + * configure.in (enable_rpath): use rpath flag to embed the library + path into extensions on ELF environment. [ruby-dev:25035] + +Sun Dec 19 11:01:25 2004 Nobuyoshi Nakada + + * lib/test/unit.rb: use standalone runner for -e. + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): accept + multiple -p and -x options. + + * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#recursive_collect): + ditto. + +Sat Dec 18 16:36:23 2004 Nobuyoshi Nakada + + * ext/zlib/zlib.c (rb_deflate_s_deflate, rb_inflate_s_inflate): + disallow interrupt by type conversion. fixed: [ruby-dev:25226] + +Sat Dec 18 15:09:02 2004 NAKAMURA, Hiroshi + + * lib/webrick/httpauth.rb, + lib/webrick/httpauth/{basicauth.rb,digestauth.rb}: use + pack/unpack-template char "m" instead of lib/base64.rb to do base64 + encoding/decoding. + +Sat Dec 18 10:51:01 2004 Yukihiro Matsumoto + + * dir.c (dir_open_dir): new function. [ruby-dev:25242] + + * io.c (rb_f_open): add type check for return value from to_open. + +Fri Dec 17 16:44:26 2004 Tanaka Akira + + * configure.in (ac_cv_sizeof_rlim_t): set 8 for BSD/OS. + Reported by OHARA Shigeki. [ruby-dev:25236] + +Fri Dec 17 16:28:12 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: fix bug on setting up system encoding + + * ext/tk/lib/tk/event.rb: fix error on require process + + * ext/tk/lib/tk/font.rb: fix abnormal termination error on Windows + + * ext/tk/lib/tk/virtevent.rb: TkVirtualEvent::PreDefVirtEvent.new() + accepts event-sequence arguments + + * ext/tk/lib/tk/text.rb: fail to dump embedded images + + * ext/tk/lib/tk/text.rb: tag_nextrange and tag_prevrange returns wrong + types of values + + * ext/tk/lib/tk/texttag.rb: nextrange and prevrange returns wrong + types of values + + * ext/tk/lib/tk/text.rb: add TkText::IndexModMethods module and + TkText::IndexString class to treat text index modifiers + + * ext/tk/lib/tk/texttag.rb: use TkText::IndexModMethods module + + * ext/tk/lib/tk/textmark.rb: ditto + + * ext/tk/lib/tk/textimage.rb: ditto + + * ext/tk/lib/tk/textwindow.rb: ditto + + * ext/tk/lib/tk/textimage.rb: wrong gravity of text mark for embedded + image + + * ext/tk/lib/tk/textwindow.rb: wrong gravity of text mark for + embedded window + +Fri Dec 17 13:33:58 2004 Nobuyoshi Nakada + + * lib/cgi/session.rb (CGI::Session#initialize): control adding + session_id hidden fields. fixed: [ruby-talk:123850] + +Fri Dec 17 00:01:48 2004 Nobuyoshi Nakada + + * eval.c (rb_proc_arity, rb_node_arity, rb_mod_method_arity, + rb_obj_method_arity): new functions to obtain method arity. + [ruby-dev:25143] + +Thu Dec 16 23:31:13 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): create RUBYARCHDIR also when no extension + is installed. fixed: [ruby-dev:25215] + +Thu Dec 16 22:36:57 2004 Masatoshi SEKI + + * test/drb/test_drb.rb: adjust and reduce sleep. + +Thu Dec 16 18:37:08 2004 GOTOU Yuuzou + + * ext/openssl/ossl.c (ossl_raise): refine message format. + +Thu Dec 16 16:29:44 2004 Hidetoshi NAGAI + + * ext/tk/sample/demos-en/widget: modify version check for + supporting features + +Thu Dec 16 16:03:50 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/bindtag.rb: bug fix [ruby-talk: 123667] + + * ext/tk/lib/tk/timer.rb: accept :idle for the interval argument + + * ext/tk/lib/tk.rb: add TkComm._callback_entry?() + + * ext/tk/lib/multi-tk.rb: add MultiTkIp.cb_entry_class + + * ext/tk/lib/tk/canvas.rb: use TkComm._callback_entry?() + + * ext/tk/lib/tk/canvastag.rb: ditto + + * ext/tk/lib/tk/dialog.rb: ditto + + * ext/tk/lib/tk/optiondb.rb: ditto + + * ext/tk/lib/tk/text.rb: ditto + + * ext/tk/lib/tk/texttag.rb: ditto + + * ext/tk/lib/tk/textwindow.rb: ditto + + * ext/tk/lib/tk/timer.rb: ditto + + * ext/tk/lib/tk/validation.rb: ditto + + * ext/tk/lib/tkextlib/*: ditto + +Thu Dec 16 04:02:28 2004 Minero Aoki + + * ext/ripper/extconf.rb: bison is not needed if ripper.c exists. + [ruby-dev:25191] + +Thu Dec 16 03:27:10 2004 Minero Aoki + + * lib/net/http.rb: remove junk. + +Thu Dec 16 00:57:30 2004 Yukihiro Matsumoto + + * ext/syck/rubyext.c (rb_syck_io_str_read): [ruby-core:03973] + +Thu Dec 16 00:43:29 2004 Masatoshi SEKI + + * lib/drb/drb.rb: changed default binded address family to use an + available address family of host name. [druby-ja:101] + + * lib/drb/ssl.rb: ditto + +Wed Dec 15 17:47:17 2004 GOTOU Yuuzou + + * lib/webrick/server.rb (WEBrick::GenericServer#start_thread): + should log about all accepted socket. [ruby-core:03962] + + * lib/webrick/accesslog.rb (WEBrick::AccessLog#setup_params): + "%%" and "%u" are supported. [webricken:135] + + * lib/webrick/httpservlet/filehandler.rb + (WEBrick::HTTPServlet::FileHandler#check_filename): + :NondisclosureName is acceptable if it is Enumerable. + + * lib/webrick/config.rb (WEBrick::Config::FileHandler): + default value of :NondisclosureName is [".ht*", "*~"]. + +Wed Dec 15 16:10:23 2004 Yukihiro Matsumoto + + * object.c (rb_obj_id_obsolete): warn always. + +Wed Dec 15 15:31:02 2004 Yukihiro Matsumoto + + * lib/set.rb (Set#==): [ruby-dev:25206] + +Wed Dec 15 14:32:18 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_fdisset): check whether the handle is valid. + +Wed Dec 15 10:30:37 2004 Yukihiro Matsumoto + + * ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198] + +Tue Dec 14 19:17:15 2004 Yukihiro Matsumoto + + * utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561] + + * utf8.c (utf8_mbc_to_normalize): ditto. + +Tue Dec 14 17:08:15 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_close): need to reset osfhnd(). + +Tue Dec 14 14:03:57 2004 GOTOU Yuuzou + + * ext/openssl/ossl.c (ossl_raise): avoid buffer overrun. + [ruby-dev:25187] + +Tue Dec 14 12:36:04 2004 Yukihiro Matsumoto + + * lib/cgi/session.rb (CGI::Session::initialize): generate new + session if given session_id does not exist. [ruby-list:40368] + +Tue Dec 14 08:47:45 2004 Yukihiro Matsumoto + + * eval.c (Init_eval): should mark ruby_eval_tree. [ruby-dev:25189] + +Mon Dec 13 18:13:52 2004 Tanaka Akira + + * gc.c (set_stack_end): new function to obtain stack end address. + set_stack_end obtains a stack end address by an address of local + variable in the function. + (SET_STACK_END, STACK_END): use set_stack_end. don't use alloca. + This makes the conservative garbage collector to scan a stack frame + of the garbage_collect function itself. This is required because + callee-save registers may be stored in the frame. + [ruby-dev:25158] + +Mon Dec 13 02:45:51 2004 Shugo Maeda + + * ext/curses/curses.c (window_subwin): call NUM2INT() before + GetWINDOW(). fixed: [ruby-dev:25161] + +Mon Dec 13 00:58:02 2004 Tanaka Akira + + * lib/pathname.rb (cleanpath_aggressive): make it private. + (cleanpath_conservative): ditto. + Suggested by Daniel Berger. [ruby-core:3914] + +Sun Dec 12 21:32:14 2004 Nobuyoshi Nakada + + * test/ruby/test_super.rb (TestSuper#test_define_method): now methods + from procs can call super. + +Sun Dec 12 10:35:10 2004 Dave Thomas + + * lib/rdoc/generators/template/html/html.rb (RDoc::Page): Don't + show an accessor's r/w flag if none was specified + +Sun Dec 12 10:14:03 2004 Dave Thomas + + * lib/rdoc/rdoc.rb (RDoc::RDoc::parse_files): Never exclude files + explicitly given on the command line. + +Sat Dec 11 21:10:16 2004 Masatoshi SEKI + + * lib/drb/drb.rb: add DRbRemoteError. [ruby-list:40348], + [ruby-list:40390] + + * test/drb/drbtest.rb: ditto. + + * test/drb/ut_drb.rb: ditto. + +Sat Dec 11 13:08:28 2004 Nobuyoshi Nakada + + * sample/optparse/subcommand.rb: a sample for sub commands like + cvs. contributed by Minero Aoki. + +Fri Dec 10 08:39:48 2004 Nobuyoshi Nakada + + * ext/socket/socket.c (sock_listen): get OpenFile just before calling + listen(2). + +Thu Dec 9 16:28:35 2004 NAKAMURA Usaku + + * ext/sdbm/init.c (GetDBM): typo. + +Thu Dec 9 16:21:51 2004 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI#setup_header): avoid + SecurityError. [ruby-dev:24970] + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should wait + for reading request till data arrive. [ruby-talk:121068] + +Thu Dec 9 14:38:35 2004 Nobuyoshi Nakada + + * string.c (rb_str_inspect): escape # which starts an expression + substitution. fixed: [ruby-core:03922] + + * string.c (rb_str_dump): not escape # which isn't a substitution. + +Thu Dec 9 12:31:53 2004 WATANABE Hirofumi + + * io.c (pipe_open): should set prog if argc != 0. + +Thu Dec 9 10:54:36 2004 Yukihiro Matsumoto + + * ext/dbm/dbm.c (fdbm_select): [ruby-dev:25132] + + * ext/sdbm/init.c: ditto. + + * ext/gdbm/gdbm.c: ditto. + +Thu Dec 9 10:19:18 2004 Nobuyoshi Nakada + + * test/socket/test_socket.rb (test_setsockopt): use SO_LINGER instead + of SO_BINDTODEVICE. fixed: [ruby-dev:25133] + +Thu Dec 9 03:08:36 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when + the running script is '-e one-liner' or '-' (stdin). + + * ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for + stub libs + + * ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor + have a wrong parent class. + + * ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and + TkWarning2 --> TkWarningObj (old names are changed to alias names) + + * ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command' + option and hashes for configuration + + * ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the + button name + + * ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==> + get_value() and value=(val) ==> set_value(val). + + * ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec + + * ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton, + TkOptionMenuButton = TkOptionMenubutton) + + * ext/tk/lib/tk/event.rb: new method aliases (same as option keys of + event_generate) for Event object + + * ext/tk/lib/tk/font.rb: configinfo returns proper types of values + + * ext/tk/lib/tk.rb: bind methods accept subst_args + block + + * ext/tk/lib/tk/canvas.rb: ditto + + * ext/tk/lib/tk/canvastag.rb: ditto + + * ext/tk/lib/tk/frame.rb: ditto + + * ext/tk/lib/tk/text.rb: ditto + + * ext/tk/lib/tk/texttag.rb: ditto + + * ext/tk/lib/tk/toplevel.rb: ditto + + * ext/tk/lib/tkextlib/*: ditto and bug fix + +Wed Dec 8 23:54:29 2004 Dave Thomas + + * lib/rdoc/generators/template/html/html.rb (RDoc::Page): Typo + meant that h2 tag was invisible. + +Wed Dec 8 22:10:02 2004 Tanaka Akira + + * rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c: + create FILE object only when required: popen(3) and DL's IO#to_ptr. + [ruby-dev:25122] + + * io.c (rb_io_binmode): use setmode for Human68k. [ruby-dev:25121] + +Wed Dec 8 20:13:06 2004 WATANABE Hirofumi + + * process.c (rb_spawn): support for DJGPP. + + * lib/mkmf.rb (VPATH): specify the implicit path separator for DJGPP. + +Wed Dec 8 17:48:22 2004 Yukihiro Matsumoto + + * eval.c (proc_invoke): merge Guy Decoux's argument preserve + patch in [ruby-core:03874]. + +Wed Dec 8 17:37:33 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_pipe_exec): need to close original socket + handle. + +Wed Dec 8 14:31:36 2004 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): [ruby-dev:25104] + +Wed Dec 8 13:49:46 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_pipe_exec): must close original handle + before exec. fixed: [ruby-dev:25112] + +Wed Dec 8 11:46:26 2004 Nobuyoshi Nakada + + * parse.y (string_content): get rid of segfault at empty evstr. + fixed: [ruby-dev:25113] + +Wed Dec 8 03:26:51 2004 GOTOU Yuuzou + + * ext/openssl/ossl_bio.c (ossl_obj2bio): should not use fptr->f. + [ruby-dev:25101] + +Wed Dec 8 03:26:41 2004 Nobuyoshi Nakada + + * runruby.rb: prepend LIBRUBY_SO to LD_PRELOAD as well as rubytest.rb. + +Wed Dec 8 01:35:44 2004 NAKAMURA Usaku + + * win32/win32.c (is_socket): reorder of function definitions. + +Wed Dec 8 00:44:31 2004 NAKAMURA Usaku + + * io.c (pipe_open): win32 bidirectional pipe support. + + * win32/win32.[ch] (rb_w32_pipe_exec): ditto. + + * win32/win32.[ch] (socketpair): new function. POSIX socketpair + emulation. + + * win32/win32.c (socketpair_internal): ditto. + +Wed Dec 8 00:25:07 2004 Kouhei Sutou + + * test/rss/test_version.rb: added version check test. + [ruby-dev:25053] + +Tue Dec 7 15:40:38 2004 Tanaka Akira + + * io.c (io_fwrite): avoid context switch before writing to stderr. + [ruby-dev:25080] + + * rubyio.h: refine deprecated declaration. + + * configure.in, file.c, io.c: remove useless check: fseeko, etc. + +Tue Dec 7 13:42:07 2004 NAKAMURA Usaku + + * dir.c (dir_s_mkdir): win32 special processing doesn't need any + longer. + + * win32/win32.[ch] (rb_w32_mkdir): new function. POSIX.1 compatible + interface. + + * win32/win32.[ch] (rb_w32_rmdir): new function. + +Tue Dec 7 00:27:37 2004 Yukihiro Matsumoto + + * process.c (proc_setgroups): [ruby-dev:25081] + +Mon Dec 6 23:07:57 2004 Tanaka Akira + + * configure.in: check -lsocket for socketpair and shutdown. + reported by Ville Mattila. [ruby-core:03903] + +Mon Dec 6 23:00:45 2004 WATANABE Hirofumi + + * configure.in (ac_cv_sizeof_rlim_t): setup for DJGPP. + + * io.c (is_socket, shutdown): define dummy macros for DJGPP. + + * process.c: use SIZEOF_RLIM_T instead of HAVE_RLIM_T for DJGPP. + +Mon Dec 6 21:19:40 2004 NAKAMURA Usaku + + * io.c (is_socket): fix typos. [ruby-core:03900] + +Mon Dec 6 20:13:28 2004 NAKAMURA Usaku + + * io.c (is_socket): new function. + + * io.c (rb_io_close_read, rb_io_close_write): use is_socket(). + + * io.c (rb_io_fptr_finalize): need to check fptr->f before calling + rb_io_fptr_cleanup(). + + * io.c (pipe_open): win32 pipe support (experimental). + + * win32/win32.[ch] (rb_w32_pipe_exec): return file descriptors + instead of FILE structure objects. + + * win32/win32.[ch] (rb_w32_is_socket): new function. + +Mon Dec 6 19:40:40 2004 WATANABE Hirofumi + + * Makefile.in (.y.c): simplify the rule. + +Mon Dec 6 18:08:10 2004 Yukihiro Matsumoto + + * re.c (rb_reg_eqq): document fix. [ruby-talk:122541] + +Mon Dec 6 17:49:30 2004 NAKAMURA Usaku + + * eval.c (run_trap_eval): add prototype for Microsoft compiler. + +Mon Dec 6 17:32:38 2004 Tanaka Akira + + * rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c, + ext/pty/pty.c, ext/io/wait/wait.c, ext/openssl/ossl_ssl.c: + Use own buffering mechanism instead of stdio. [ruby-dev:25056] + + * io.c, ext/stringio/stringio.c, test/ruby/ut_eof.rb: + EOF flag removed. + +Mon Dec 6 17:15:17 2004 Nobuyoshi Nakada + + * test/socket/test_socket.rb (TestBasicSocket#test_setsockopt): + BasicSocket#setsockopt dumps core. [ruby-dev:25039] + + * test/socket/test_tcp.rb (TestTCPSocket#test_recvfrom): + TCPSocket#recvfrom dumps core. [ruby-dev:24705] + + * test/socket/test_udp.rb (TestUDPSocket#test_connect): + UDPSocket#connect dumps core. [ruby-dev:25045] + + * test/socket/test_udp.rb (TestUDPSocket#test_bind): + UDPSocket#bind dumps core. [ruby-dev:25057] + +Mon Dec 6 09:59:23 2004 Yukihiro Matsumoto + + * io.c (io_fread): take VALUE argument. + + * ext/socket/socket.c (sock_connect): use rb_str_new4(). + [ruby-dev:25052] + + * eval.c (rb_yield_0): [ruby-dev:25051] + +Mon Dec 6 01:32:31 2004 GOTOU Yuuzou + + * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt, + ossl_rsa_public_decrypt, ossl_rsa_private_encrypt, + ossl_rsa_private_decrypt): should take an optional argument + to specify padding mode. [ruby-talk:122539] + + * ext/openssl/ossl_pkey_rsa.c (Init_ossl_rsa): add new constants + PKCS1_PADDING, SSLV23_PADDING, NO_PADDING and PKCS1_OAEP_PADDING + under OpenSSL::PKey::RSA. + + * test/openssl/test_pkey_rsa.rb: new file. + +Sun Dec 5 19:39:17 2004 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion#complete): new parameter + to direct case insensitiveness. + + * lib/optparse.rb (OptionParser#order!): ignore case only for long + option. [ruby-dev:25048] + +Sun Dec 5 00:54:32 2004 WATANABE Hirofumi + + * mkconfig.rb: setup library paths before requiring library. + [ruby-core:03892] + +Sat Dec 4 22:54:15 2004 Yukihiro Matsumoto + + * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] + + * io.c (io_fwrite): takes VALUE string as an argument. + [ruby-dev:25050] + + * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). + [ruby-dev:25050] + + * ext/socket/socket.c (udp_connect): [ruby-dev:25045] + + * ext/socket/socket.c (udp_bind): ditto. + + * ext/socket/socket.c (udp_send): ditto. + + * ext/socket/socket.c (bsock_send): ditto. + + * ext/socket/socket.c (s_recvfrom): ditto. + + * hash.c (rb_hash_hash): should provide "hash" method where "eql?" + is redefined. [ruby-talk:122482] + +Sat Dec 4 21:29:05 2004 Minero Aoki + + * lib/fileutils.rb: (In previous commit) new method chown. + + * lib/fileutils.rb: (In previous commit) new method chown_R. + + * lib/fileutils.rb: (In previous commit) new method chmod_R + wrongly added. Removed now. + +Sat Dec 4 20:45:52 2004 Minero Aoki + + * lib/fileutils.rb (mkdir, mkdir_p): should chmod explicitly. + [ruby-core:03881] + +Sat Dec 4 18:54:09 2004 Kouhei Sutou + + * lib/rss/rss.rb: removed empty lines from output. + +Sat Dec 4 18:49:09 2004 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.1 -> 0.1.2 + + * lib/rss/rss.rb: #item=/#set_item and so on are obsolete. + +Sat Dec 4 14:28:56 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::Section::set_comment): + Section comments may now be bracketed by lines which are + ignored. You can now write + # ----------- + # :section: Dave's Section + # comment material + # ----------- + The lines before :section: are removed, and identical lines at the end are + also removed if present. + +Sat Dec 4 00:35:08 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] + +Fri Dec 3 12:25:21 2004 Nobuyoshi Nakada + + * st.h: fix prototype for C++. + +Fri Dec 3 01:55:24 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: widget configuration by TkWindow#method_missing + returns proper object. "widget.option = val" returns val, and + "widget.option(val)" returns self. + + * ext/tk/lib/tk/font.rb: TkFont#replace accepts only one font argument. + + * ext/tk/lib/tk/radiobutton.rb: add TkRadiobutton#value and + TkRadiobutton#value=(val). + + * ext/tk/lib/tk/spinbox.rb: callback substitution support on + command option. + + * ext/tk/sample/demos-en/widget: bug fix (wrong image height) + + * ext/tk/sample/demos-jp/widget: ditto. + +Fri Dec 3 00:21:05 2004 Yukihiro Matsumoto + + * eval.c (proc_invoke): prepare to pass a block from "call" method + to a Proc generated by Method#to_proc. [ruby-dev:25031] + + * eval.c (rb_yield_0): actually passes a block given to "call". + + * object.c (convert_type): use rb_respond_to() again. this fix is + based on [ruby-dev:25021] + + * eval.c (rb_respond_to): funcall respond_to? if it's redefined. + [ruby-dev:25021] + +Thu Dec 2 15:13:53 2004 Michael Neumann + + * test/xmlrpc/test_parser.rb, test/xmlrpc/data/*.expected: Expected + values are now stored in YAML instead of using #inspect. This fixes + false hash order. + +Fri Dec 3 00:11:48 2004 Yukihiro Matsumoto + + * io.c (rb_file_initialize): [ruby-dev:25032] + +Thu Dec 2 16:41:03 2004 Nobuyoshi Nakada + + * eval.c (rb_protect): prevent continuations created inside from being + called from the outside. [ruby-dev:25003] + + * eval.c (rb_callcc, rb_cont_call): prohibit calling from different + signal contexts. [ruby-dev:25022] + +Thu Dec 2 10:45:02 2004 Shugo Maeda + + * test/readline/test_readline.rb: fix for NetBSD. + +Thu Dec 2 09:57:24 2004 Yukihiro Matsumoto + + * lib/ostruct.rb (OpenStruct::Marshaler): OpenStruct can be + marshaled again. [ruby-core:03862] + +Thu Dec 2 09:30:58 2004 Nobuyoshi Nakada + + * eval.c (thread_mark): mark thread group. [ruby-dev:25020] + + * eval.c (thgroup_add): check whether the argument is really a Thread. + +Thu Dec 2 07:57:16 2004 Yukihiro Matsumoto + + * io.c (rb_io_ctl): [ruby-dev:25019] + +Wed Dec 1 06:13:00 2004 NARUSE, Yui + + * ext/nkf/nkf.c: add constant NKF::VERSION + + * ext/nkf/nkf.c(guess): this becomes an alias of guess2 + + * ext/nkf/test.rb: add --no-cp932 + + * ext/nkf/nkf-utf8/nkf.c: original nkf2 revision 1.47 + +Wed Dec 1 02:21:02 2004 Yukihiro Matsumoto + + * signal.c (sighandler): call handler immediately only for default + handlers. [ruby-dev:25003] + +Tue Nov 30 23:49:12 2004 Nobuyoshi Nakada + + * io.c (pipe_open): errno should be preserved for rb_sys_fail() when + fork failed. + +Tue Nov 30 16:18:50 2004 Yukihiro Matsumoto + + * io.c (io_fread): need not to null terminate. [ruby-dev:24998] + + * eval.c (rb_eval): should check previous frame for ZSUPER. + + * io.c (read_all): remove unnecessary rb_str_resize(). + [ruby-dev:24996] + + * io.c (io_readpartial): ditto. + + * io.c (io_read): ditto. + +Tue Nov 30 14:58:33 2004 WATANABE Hirofumi + + * instruby.rb (install): add arguments explicitly to "super". + +Tue Nov 30 00:49:08 2004 Yukihiro Matsumoto + + * eval.c (PUSH_FRAME): flags should have been initialized. + + * eval.c (rb_eval): [ruby-core:03856] + + * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992] + +Tue Nov 30 00:12:57 2004 Kazuo Saito + + * regparse.c: now handles many alternatives (over 500000) + in regexp. [ruby-dev:24773] + +Mon Nov 29 16:06:04 2004 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_write): insufficiently filled string + being extended when overwriting. [ruby-core:03836] + +Mon Nov 29 15:59:05 2004 Yukihiro Matsumoto + + * lib/ostruct.rb (OpenStruct::method_missing): check method + duplication for -d. + + * lib/ostruct.rb (OpenStruct::initialize): ditto. + +Mon Nov 29 15:22:28 2004 Nobuyoshi Nakada + + * test/io/nonblock/test_flush.rb: abandon tests when io/nonblock is + not supported. + +Mon Nov 29 13:37:54 2004 Nobuyoshi Nakada + + * io.c (fptr_finalize): must not use FILE after fclose(). + [ruby-dev:24985] + +Mon Nov 29 13:13:13 2004 NAKAMURA Usaku + + * win32/win32.c (CreateChild): push back the last space before next + loop because CharNext() eats it. + +Mon Nov 29 03:08:30 2004 Yukihiro Matsumoto + + * object.c (convert_type): [ruby-core:03845] + + * eval.c (rb_funcall_rescue): new function. + + * object.c (rb_Array): avoid using rb_respond_to(). + + * object.c (rb_Integer): ditto. + + * eval.c (get_backtrace): no conversion for nil. + + * parse.y (reduce_nodes): empty body should return nil. + +Mon Nov 29 01:18:18 2004 Tanaka Akira + + * io.c (rb_io_check_writable): call io_seek regardless of + NEED_IO_SEEK_BETWEEN_RW. [ruby-dev:24986] + +Sun Nov 28 15:57:58 2004 Kouhei Sutou + + * lib/rss/rss.rb (RSS::Element#tag): not use block_given? for + working with ruby 1.6 again. + + * lib/rss/{0.9,2.0,trackback}.rb, lib/rss/maker/base.rb: + undef -> remove_method for working with ruby 1.6 again. + +Sun Nov 28 15:51:40 2004 Kouhei Sutou + + * lib/rss/rss.rb (RSS::NotSetError): added. + + * lib/rss/maker/{1.0,0.9,2.0}.rb: changed RSS Maker to raise + RSS::NotSetError if required values of maker.channel are not + set. [ruby-talk:120061] + + * test/rss/test_maker_{1.0,0.9,2.0}.rb: changed tests to check RSS + Maker raises or not. + +Sun Nov 28 12:14:47 2004 Kazuo Saito + + * regparse.c (fetch_token): fixed test failure on HP-UX ia64 + ([ruby-dev:24859]). + +Sun Nov 28 12:08:15 2004 Kazuo Saito + + * regparse.c, test/ruby/test_regexp.rb: fixed problem with UTF-8 + characters that have U+00FE or invalid characters. + +Sun Nov 28 12:07:04 2004 Kazuo Saito + + * regexec.c, test/ruby/test_regexp.rb: fixed segmentation fault + ([ruby-dev:24887]). + +Sun Nov 28 12:05:48 2004 Kazuo Saito + + * regcomp.c, regint.h: fixed PLATFORM_UNALIGNED_WORD_ACCESS + problem ([ruby-dev:24802] and [ruby-core:3733]) + +Sat Nov 27 23:43:39 2004 Yukihiro Matsumoto + + * io.c (rb_io_initialize): [ruby-dev:24972] + +Sat Nov 27 21:43:39 2004 Tanaka Akira + + * io.c: avoid data lost with nonblocking fd and + stdio buffering in sync mode. [ruby-dev:24966] + based on matz's patch [ruby-dev:24967] + (io_fwrite): new primitive writing function which writes + directly if sync mode. + (rb_io_fwrite): wrapper for io_fwrite now. + (io_write): call io_fwrite instead of rb_io_fwrite. + +Sat Nov 27 17:43:21 2004 Kouhei Sutou + + * lib/rss/{0.9,1.0,2.0,trackback,xml-stylesheet}.rb: added + #setup_maker. + + * test/rss/test_setup_maker_*.rb: added tests for #setup_maker. + + * lib/rss/maker/base.rb(RSS::Maker::Items#max_size=): supported + output item size limitation. + + * sample/rss/blend.rb: added sample for RSS Maker. + +Sat Nov 27 17:41:35 2004 Kouhei Sutou + + * lib/rss/maker/0.9.rb: supported RSS::Maker.make("0.91"). Now, + "0.9" is just alias of "0.91." + + * test/rss/test_maker_0.9.rb: make("0.9") -> maker("0.91"). + + * test/rss/test_to_s.rb: ditto. + +Sat Nov 27 17:21:30 2004 Kouhei Sutou + + * sample/rss/list_description.rb: untabified. + + * sample/rss/rss_recent.rb: ditto. + +Sat Nov 27 14:44:15 2004 Kent Sibilev + + * lib/cgi/session.rb (CGI::Session::initialize): [ruby-core:03832] + +Sat Nov 27 09:41:21 2004 Yukihiro Matsumoto + + * io.c (io_fread): old rb_io_fread with file closing checking. + (rb_io_fread): wrapper for io_fread now. + [ruby-dev:24964] + +Fri Nov 26 18:02:44 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: Tk.destroy uses TkWindow#epath + + * ext/tk/lib/tk/image.rb: bug fix + + * ext/tk/lib/tk/wm.rb: add 'iconphoto' method(Windows only) + + * ext/tk/lib/tkextlib/*: some methods uses TkWindow#epath + +Fri Nov 26 14:29:39 2004 Yukihiro Matsumoto + + * io.c (rb_io_initialize): uninitialized fd was checked to see open + mode. [ruby-dev:24963] + + * io.c (rb_io_initialize): uninitialized fd was used. [ruby-dev:24962] + +Fri Nov 26 13:49:06 2004 Yukihiro Matsumoto + + * io.c (rb_io_initialize): should retrieve flags from copying file + descriptor. [ruby-dev:24961] + + * eval.c (method_missing): raise TypeError for classes do not + have allocators. [ruby-core:03752] + + * lib/erb.rb: add RDoc by James Edward Gray II. [ruby-core:03786] + +Fri Nov 26 13:29:02 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::look_for_directives_in): Break + out of preprocessing when we find a :section: directive (previously cleared out the + comment, but this apparently now generates an error in gsub!) + +Fri Nov 26 00:17:40 2004 Yukihiro Matsumoto + + * io.c (io_read): move StringValue() check before GetOpenFile(). + [ruby-dev:24959] + +Thu Nov 25 20:14:57 2004 Nobuyoshi Nakada + + * lib/thwait.rb (ThreadsWait#join_nowait): abnormally terminated + threads should be also processed. [ruby-talk:121320] + +Thu Nov 25 18:06:37 2004 Tanaka Akira + + * configure.in: AC_CHECK_SIZEOF(rlim_t) to include stdio.h to fix + problem with autoconf 2.52 or earlier. + revert AC_PREREQ to 2.50. + [ruby-core:3809] + +Thu Nov 25 07:59:41 2004 Yukihiro Matsumoto + + * configure.in: AC_PREREQ(2.53) [ruby-core:03800] + + * io.c (read_all): stringify non-nil buffer argument, and always + taint the result. [ruby-dev:24955] + +Wed Nov 24 01:01:31 2004 Yukihiro Matsumoto + + * io.c (io_read): integer conversion should be prior to + GetOpenFile(). [ruby-dev:24952] + + * configure.in, io.c: cancel [ ruby-Patches-1074 ]. + +Tue Nov 23 08:09:50 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/menu.rb: improve usability of TkOptionMenubutton + +Tue Nov 23 02:00:21 2004 Yukihiro Matsumoto + + * file.c (rb_file_chown): integer conversion should be prior to + GetOpenFile(). [ruby-dev:24949] + +Tue Nov 23 00:10:48 2004 Yukihiro Matsumoto + + * file.c (rb_file_chown): integer conversion should be prior to + GetOpenFile(). [ruby-dev:24947] + + * file.c (rb_file_truncate): ditto. + + * file.c (rb_file_s_truncate): ditto. + + * dir.c (dir_seek): use NUM2OFFT(). + + * misc/ruby-mode.el (ruby-non-block-do-re): [ruby-core:03719] + +Mon Nov 22 22:33:02 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::parse_require): Don't use names + of variables or constants when parsing 'require' + +Mon Nov 22 00:13:35 2004 Yukihiro Matsumoto + + * dir.c (dir_seek): should retrieve dir_data after NUM2INT(). + [ruby-dev:24941] + +Sat Nov 20 23:57:33 2004 Dave Thomas + + * lib/rdoc/README (et al): Add a new directive, :section:, and + change the output format to accommodate. :section: allows to to + group together methods, attributes, constants, etc under + headings in the output. If used, a table of contents is + generated. + +Sat Nov 20 23:56:54 2004 Dave Thomas + + * lib/rdoc/options.rb (Options::parse): Force --inline-source if + --one-file option given + +Sat Nov 20 23:55:19 2004 Yukihiro Matsumoto + + * string.c (rb_str_splice): should place index wrapping after + possible modification. [ruby-dev:24940] + +Sat Nov 20 23:25:12 2004 Minero Aoki + + * io.c (rb_io_getline): f.gets("") did not work. [ruby-core:03771] + + * test/ruby/test_io.rb (test_gets_rs): test it. + +Sat Nov 20 22:55:09 2004 WATANABE Hirofumi + + * test/runner.rb (CROSS_COMPILING): need to require rbconfig.rb before + using CROSS_COMPILNG. + +Sat Nov 20 20:42:42 2004 Minero Aoki + + * ext/ripper/depend: fix ripper.o dependency. + +Sat Nov 20 17:48:29 2004 WATANABE Hirofumi + + * io.c (io_reopen): work around problem with Cygwin fseeko + returning ESPIPE. + +Sat Nov 20 05:34:24 2004 NARUSE, Yui + + * ext/nkf/nkf-utf8/nkf.c: original nkf.c rev:1.40 + + * ext/nkf/test.rb: add test for mime encode/decode + +Sat Nov 20 01:45:04 2004 WATANABE Hirofumi + + * test/xmlrpc/test_webrick_server.rb: move `requrie "webrick/https"' + into #setup_http_server method to avoid soap test errors. + +Sat Nov 20 01:37:34 2004 Johan Holmberg + + * eval.c (error_print): nicer traceback at interrupt. + [ruby-core:03774] + +Sat Nov 20 00:07:16 2004 Yukihiro Matsumoto + + * string.c (str_gsub): internal buffer should not be listed by + ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] + +Fri Nov 19 22:44:43 2004 WATANABE Hirofumi + + * lib/test/unit/collector/dir.rb: better support for -p/-x option. + +Fri Nov 19 17:46:56 2004 Kouhei Sutou + + * lib/rss/maker/0.9.rb (RSS::Maker::RSS09::Image#have_required_values): + changed /rss/channel/image to be optional. [ruby-Bugs:1047] + + * test/rss/test_maker_0.9.rb: added tests for the above. + +Fri Nov 19 17:18:17 2004 Kouhei Sutou + + * lib/rss/rss.rb (RSS::VERSION): 0.1.0 -> 0.1.1. + + * lib/rss: #to_s used #tag. + + * test/rss/test_to_s.rb: added. + + * lib/rss/maker.rb (RSS::Maker.make): changed API. It's not + received modules which is used as the second argument. + + * lib/rss/xml-stylesheet.rb (RSS::XMLStyleSheet#alternate): + changed return value type which is not String but Boolean. + + * lib/rss/2.0.rb (RSS::Rss::Channel#ttl): changed return value + type which is not String but Integer. + + * lib/rss/0.9.rb (RSS::Rss::Channel): has s and + has s. + + * lib/rss/maker/0.9.rb (RSS::Maker::RSS09::Channel): ditto. + + * lib/rss/0.9.rb (RSS::Rss::Channel::Item): has s. + + * lib/rss/maker/2.0.rb (RSS::Maker::Rss20::Channel::Item): ditto. + + * lib/rss/2.0.rb (RSS::Rss::Channel): has s. + + * lib/rss/maker/2.0.rb (RSS::Maker::RSS20::Channel): ditto. + + * lib/rss/trackback.rb: parent element has s. + + * lib/rss/maker/trackback.rb: ditto. + +Fri Nov 19 11:10:16 2004 WATANABE Hirofumi + + * lib/test/unit/collector/dir.rb: add support for directory name + with -p/-x options. + + * test/testunit/collector/test_dir.rb: ditto. + + * lib/xmlrpc/datetime.rb (XMLRPC::DateTime#==): should use Array() + instead of to_a. + +Fri Nov 19 10:32:36 2004 Shugo Maeda + + * ext/readline/readline.c (readline_s_set_completion_append_character): + accept nil. [ruby-core:03765] + +Fri Nov 19 01:20:22 2004 Yukihiro Matsumoto + + * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise + exception if data corresponding to session specified from the + client does not exist. + +Fri Nov 19 00:59:31 2004 Yukihiro Matsumoto + + * string.c (str_gsub): internal buffer should not be listed by + ObjectSpace.each_object(). [ruby-dev:24919] + +Thu Nov 18 23:42:36 2004 Minero Aoki + + * ext/ripper/depend: Never regenerate lib/ripper/core.rb + automatically. [ruby-dev:24911] + +Thu Nov 18 20:47:24 2004 NAKAMURA Usaku + + * win32/win32.[ch] (rb_w32_isatty): new function to replace MSVCRT's + isatty because it never sets errno. + +Thu Nov 18 18:41:08 2004 Kazuhiro NISHIYAMA + + * test/ruby/test_stringchar.rb (test_bang): added. + + * string.c (rb_str_upcase_bang, rb_str_capitalize_bang) + (rb_str_swapcase_bang): missing rb_str_modify(). + +Thu Nov 18 17:05:01 2004 Nobuyoshi Nakada + + * parse.y (f_rest_arg): store rest args into invisible local variable + in order to get rid of SEGV at ZSUPER. [ruby-dev:24913] + +Thu Nov 18 15:39:52 2004 Yukihiro Matsumoto + + * hash.c (rb_f_getenv): prohibit for $SAFE=4. [ruby-dev:24908] + +Thu Nov 18 14:58:42 2004 Shugo Maeda + + * ext/readline/readline.c: check $SAFE. + + * test/readline/test_readline.rb: added tests for readline. + +Thu Nov 18 00:21:15 2004 Yukihiro Matsumoto + + * process.c (proc_getpgrp): prohibit for $SAFE=2. + [ruby-dev:24899] + + * process.c (get_pid): ditto. [ruby-dev:24904] + + * process.c (get_ppid): ditto. + + * array.c (rb_ary_delete): defer rb_ary_modify() until actual + modification. [ruby-dev:24901] + +Thu Nov 18 10:10:14 2004 Nobuyoshi Nakada + + * io.c, rubyio.h (rb_io_modenum_flags): exported. + + * ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as + well as IO.new does. [ruby-dev:24896] + +Wed Nov 17 23:47:30 2004 NAKAMURA, Hiroshi + + * test/ruby/test_settracefunc.rb: added. [ruby-dev:24884] + +Wed Nov 17 18:59:16 2004 Kazuhiro NISHIYAMA + + * process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to + methods of Process.{getrlimit,setrlimit} + +Wed Nov 17 13:56:57 2004 Yukihiro Matsumoto + + * parse.y (newline_node): should not use FL_SET. [ruby-dev:24874] + + * parse.y (string_content): should not use FL_UNSET. + + * node.h (NODE_NEWLINE): remove unused bit to utilize flag field + in nodes. + +Wed Nov 17 13:05:10 2004 Nobuyoshi Nakada + + * dir.c (rb_push_glob): fix overrun. [ruby-dev:24886] + +Wed Nov 17 11:48:17 2004 Michael Neumann + + * lib/xmlrpc/parser.rb, test/xmlrpc/test_features.rb: fixed "assigning + to constants" warnings + +Wed Nov 17 09:38:18 2004 Johan Holmberg + + * re.c (rb_reg_initialize_m): should raise exception instead of + compile error. [ruby-core:03755] + +Wed Nov 17 03:42:45 2004 Yukihiro Matsumoto + + * string.c (rb_str_splice): move rb_str_modify() after + StringValue(), which may alter the receiver. [ruby-dev:24878] + + * error.c (rb_error_frozen): now raise RuntimeError instead of + TypeError. + +Tue Nov 16 21:22:47 2004 Michael Neumann + + * lib/xmlrpc/server.rb (CGIServer): fixed bug when client sends + "Content-typ: text/xml; ..." + +Tue Nov 16 23:45:07 2004 Yukihiro Matsumoto + + * numeric.c (flo_divmod): protect float values from GC by + assignment to local variables. [ruby-dev:24873] + +Tue Nov 16 14:31:54 2004 Michael Neumann + + * test/xmlrpc/*: imported and refactored original test cases. + + * test/xmlrpc/test_webrick_server.rb, test/xmlrpc/webrick_testing.rb: + added test case that starts up a WEBrick XML-RPC server and performs + some tests on it (both http and https servers are started). + + * lib/xmlrpc/create.rb (XMLWriter::each_installed_writer), + lib/xmlrpc/parser.rb (XMLParser::each_installed_parser): + added methods to simply original test cases + + * lib/xmlrpc/parser.rb, lib/xmlrpc/datetime.rb: applied patch by + MoonWolf to allow parsing datetime.iso8601 + (e.g. 20041105T01:15:23Z). + + * lib/xmlrpc/server.rb: fixed issue #998 + (http://rubyforge.org/tracker/?func=detail&atid=1700&aid=998&group_id=426) + + * lib/xmlrpc/create.rb, lib/xmlrpc/utils.rb: when marshalling/loading + user-defined data structures, use Class#allocate instead of defining + an empty #initialize method. module XMLRPC::Marshallable is now only + used for tagging. + + * lib/xmlrpc/.document, lib/xmlrpc/README.rdoc: added howto + +Tue Nov 16 16:26:12 2004 NAKAMURA Usaku + + * {bcc32,win32,wince}/setup.mak (-epilogue-): remove config.h and + config.status to force updating them. + +Tue Nov 16 16:20:45 2004 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): position was ignored when a + buffer was passed. http://www.yo.rim.or.jp/~nov/d/?date=20041116#p03 + +Tue Nov 16 13:35:54 2004 NAKAMURA Usaku + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): add + new option --exclude (-x) to skip some tests. [ruby-core:3363], + [ruby-dev:24865] + + * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir.exclude): + ditto. + +Tue Nov 16 11:19:07 2004 Nobuyoshi Nakada + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): use + Regexp conversion. + +Tue Nov 16 01:41:31 2004 Yukihiro Matsumoto + + * string.c (str_mod_check): frozen check should be separated. + [ruby-core:3742] + + * array.c (rb_ary_update): pedantic check to detect + rb_ary_to_ary() to modify the receiver. [ruby-dev:24861] + +Mon Nov 15 18:58:05 2004 Tanaka Akira + + * configure.in: check rlim_t more portably. [ruby-core:3735] + +Mon Nov 15 11:50:32 2004 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-special-char-p, ruby-parse-partial): handle + operator symbols. [ruby-talk:120177] + +Mon Nov 15 08:58:55 2004 Yukihiro Matsumoto + + * eval.c (Init_Proc): make proc as an alias to Proc.new. + [ruby-dev:24848] + +Mon Nov 15 00:46:03 2004 Yukihiro Matsumoto + + * eval.c (rb_yield_0): lambda{}.call(1) should raise exception. + [ruby-talk:120253] + +Mon Nov 15 00:33:40 2004 Yukihiro Matsumoto + + * string.c (rb_str_clear): avoid revealing NULL pointer. + [ruby-dev:24766] + + * string.c (str_gsub): add paranoid check. [ruby-dev:24827] + + * string.c (str_mod_check): check frozen status as well. + [ruby-dev:24801] + +Sun Nov 14 18:59:03 2004 Tanaka Akira + + * process.c (proc_getrlimit): new function for Process.getrlimit. + (proc_setrlimit): new function for Process.setrlimit. + [ruby-dev:24834] + + * configure.in: check rlim_t and its size. check setrlimit. + + * ruby.h (NUM2ULL): new macro. + +Sun Nov 14 13:27:03 2004 Nobuyoshi Nakada + + * lib/pp.rb (PP#object_address_group): remove odd number of 'f' + prefixed to negative address. + +Sun Nov 14 10:48:21 2004 Yukihiro Matsumoto + + * lib/mathn.rb (Integer::gcd2): faster implementation by + . [ruby-talk:120232] + +Sun Nov 14 08:46:33 2004 NAKAMURA, Hiroshi + + * test/logger/test_logger.rb: Logger just expects + Logger#datetime_format to be used for Time#strftime independently of + locale. [ruby-dev:24828] + +Fri Nov 12 17:32:07 2004 NAKAMURA Usaku + + * bcc32/README.bcc32, win32/README.win32: need bison instead of + byacc. + +Fri Nov 12 15:15:06 2004 NAKAMURA Usaku + + * eval.c (ruby_options): now we cannot call rb_glob() before + ruby_init(), so call rb_w32_cmdvector() at ruby_options(). + + * win32/win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and + export it. + +Fri Nov 12 14:08:01 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick + + * ext/tk/lib/tk.rb: ditto + +Fri Nov 12 00:31:05 2004 Yukihiro Matsumoto + + * ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string + pointer. [ruby-dev:24783] + +Thu Nov 11 17:58:19 2004 Yukihiro Matsumoto + + * dir.c (rb_glob): should have called rb_glob_caller(). + [ruby-dev:24773] + +Thu Nov 11 16:56:10 2004 NAKAMURA Usaku + + * test/ruby/test_file.rb (test_truncate_wbuf): we want to test + only File#truncate, not behavior of seek(2). + +Thu Nov 11 01:52:52 2004 Nobuyoshi Nakada + + * error.c (syserr_initialize): use stringified object. + [ruby-dev:24768] + +Wed Nov 10 22:49:01 2004 Yukihiro Matsumoto + + * lib/delegate.rb (SimpleDelegator::dup): wrong number of + arguments. + + * lib/delegate.rb (DelegateClass::dup): ditto. + +Wed Nov 10 19:47:55 2004 Nobuyoshi Nakada + + * dir.c (glob_helper): path is a string object now. + +Wed Nov 10 12:31:21 2004 Nobuyoshi Nakada + + * README.EXT (Example): extconf.rb is indispensable now. + +Wed Nov 10 03:33:36 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix SEGV when compiled with Tcl/Tk8.3.x + or older + + * ext/tk/lib/tkextlib/tile/style.rb: bug fix + +Tue Nov 9 22:24:07 2004 NARUSE, Yui + + * ext/nkf: original nkf.c rev:1.38 + + * ext/nkf/nkf.c: fix bug: can't parse long-name options + + * ext/nkf/test.rb: fix bug: mime tests fail + +Tue Nov 9 14:27:18 2004 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Officious): moved from DefaultList. + +Tue Nov 9 00:50:06 2004 Dave Thomas + + * lib/rdoc/rdoc.rb: Change version numbering of RDoc and ri + +Tue Nov 9 01:05:04 2004 Yukihiro Matsumoto + + * dir.c (rb_glob2): do not allocate buffer from heap to avoid + memory leaks. use string object for buffering instead. + [ruby-dev:24738] + + * dir.c (join_path): ditto. + + * io.c (io_read): external input buffer may be modified even after + rb_str_locktmp(). [ruby-dev:24735] + + * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] + +Tue Nov 9 00:36:26 2004 Masatoshi SEKI + + * lib/drb/extservm.rb: add DRb::ExtServManager#uri=. + [ruby-dev:24743] + +Mon Nov 8 22:20:19 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class): + Fix bug where parent class wasn't being detected if the + child class was defined using the A::B notation. + +Mon Nov 8 00:14:13 2004 WATANABE Hirofumi + + * configure.in: add setup for mignw32 cross compiling. + [ruby-talk:119413] + +Sun Nov 7 23:49:26 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bind-event methods accept multi substitution + arguments. + + * ext/tk/lib/tk/canvas.rb: ditto. + + * ext/tk/lib/tk/canvastag.rb: ditto. + + * ext/tk/lib/tk/text.rb: ditto. + + * ext/tk/lib/tk/texttag.rb: ditto. + + * ext/tk/lib/tkextlib: ditto. + +Sat Nov 6 20:40:16 2004 Masaki Suketa + + * ext/win32ole/win32ole.c: rename WIN32OLE#ole_obj_help to + WIN32OLE#ole_type. alias ole_obj_help to ole_type. + + * ext/win32ole/tests/testWIN32OLE.rb: ditto. + +Sat Nov 6 11:18:59 2004 Tadayoshi Funaba + + * lib/date.rb (_parse): checks whether zone was given. + +Sat Nov 6 00:46:27 2004 Yukihiro Matsumoto + + * string.c (rb_str_locktmp): check STR_TMPLOCK flag before + locking. [ruby-dev:24727] + +Fri Nov 5 19:07:16 2004 NARUSE, Yui + + * ext/nkf: follow CVS Head of original nkf. + +Fri Nov 5 18:12:42 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/scrollable.rb: divide Scrollable module into + X_Scrollable and Y_Scrollable + + * ext/tk/lib/tk/entry.rb: include X_Scrollable instead of Scrollable + + * ext/tk/lib/tk/autoload.rb: define autoload for X_Scrollable and + Y_Scrollable + +Fri Nov 5 16:05:32 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: TkComm._at() supprts both of "@x,y" and "@x" + +Fri Nov 5 13:22:58 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/text.rb: sorry. bug fix again. + +Fri Nov 5 13:17:54 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/text.rb: bug fix + +Fri Nov 5 08:52:48 2004 Yukihiro Matsumoto + + * gc.c (gc_mark): stricter GC stack check. + +Fri Nov 5 08:34:43 2004 Yukihiro Matsumoto + + * string.c (str_gsub): should have removed rb_str_unlocktmp(str). + [ruby-dev:24708] + + * ext/socket/socket.c (s_recvfrom): buffer modification check. + [ruby-dev:24708] + +Thu Nov 4 23:54:21 2004 Kazuo Saito + + * regexec.c, regparse.c, regint.h: fixed conflicts between + vendor branch. + +Thu Nov 4 23:41:55 2004 Kazuo Saito + + * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, + regenc.c, regenc.h, regerror.c, regexec.c, reggnu.c, + regint.h, regparse.c, regparse.h, sjis.c, utf8.c: + imported Oni Guruma 3.4.0. + + * parse.y, re.c: Now mbclen() takes unsigned char as + its argument. + +Thu Nov 4 21:25:38 2004 Yukihiro Matsumoto + + * string.c (str_gsub): string modify check no longer based on + tmplock. [ruby-dev:24706] + +Thu Nov 4 21:13:48 2004 Masaki Suketa + + * ext/win32ole/win32ole.c(typelib_file_from_typelib): search "win16" + entry to get library path. + + * ext/win32ole/win32ole.c(oletypelib_path): ditto. + + * ext/win32ole/win32ole.c(ole_typedesc2val): add VT_LPWSTR, VT_LPSTR, + VT_ERROR case. + +Thu Nov 4 15:02:14 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/variable.rb: forget to initialize instance_variables + of TkVarAccess objects + +Thu Nov 4 09:11:35 2004 Yukihiro Matsumoto + + * gc.c (gc_mark): enable GC stack checking. + +Thu Nov 4 03:11:33 2004 Yukihiro Matsumoto + + * string.c (str_gsub): lock strings temporarily. [ruby-dev:24687] + + * ext/socket/socket.c (s_recvfrom): tmplock input buffer. + [ruby-dev:24705] + +Wed Nov 3 22:24:17 2004 Daigo Moriwaki + + * lib/webrick/httpauth/digestauth.rb: use Base64.encode64 to + avoid warnings. + +Wed Nov 3 17:19:59 2004 Yukihiro Matsumoto + + * array.c (rb_ary_uniq_bang): do not push frozen string from hash + table. [ruby-dev:24695] + + * array.c (rb_ary_and): ditto. + + * array.c (rb_ary_or): ditto. + +Wed Nov 3 17:02:48 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: support to use different Tcl commands between + configure and configinfo + + * ext/tk/lib/font.rb: ditto. + + * ext/tk/lib/itemconfig.rb: support to use different Tcl commands + between item_configure and item_configinfo + + * ext/tk/lib/itemfont.rb: ditto. + + * ext/tk/extconf.rb: install SUPPORT_STATUS + + * ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib) + +Wed Nov 3 15:38:28 2004 Kouhei Sutou + + * test/rss/*.rb: removed tab width configuration headers. + + * test/rss/test_maker_{0.9,1.0}.rb: sort -> do_sort. + + * lib/rss/maker/*.rb: changed API to RSS version independence. + + * lib/rss/maker/base.rb + (RSS::Maker::XMLStyleSheets::XMLStyleSheet): checked required + (pseudo) attributes. + + * lib/rss/maker/base.rb (RSS::Maker::Items): sort -> do_sort. + + * lib/rss/rss.rb (RSS::BaseModel.install_date_element): avoided + warning. + + * lib/rss/0.9.rb (RSS::Rss#textinput): added convenience method. + +Tue Nov 2 16:35:57 2004 Yukihiro Matsumoto + + * ext/enumerator/enumerator.c (each_cons_i): pass copy of an + internal consequent array. [ruby-talk:118691] + +Tue Nov 2 14:54:02 2004 NAKAMURA Usaku + + * io.c (pipe_open): need to set cmd if argc == 0 (win32). + +Tue Nov 2 01:20:09 2004 Yukihiro Matsumoto + + * io.c (pipe_open): IO.popen should take array as 1st argument for + a command line. [ruby-dev:24678] + + * eval.c (proc_invoke): nail down dyna_var node when Proc object + or continuation is created. [ruby-dev:24671] + + * io.c (rb_io_s_popen): do not expand argv array. [ruby-dev:24670] + +Mon Nov 1 22:25:56 2004 Kouhei Sutou + + * lib/rss/maker/base.rb: changed xml-stylesheet's API of RSS Maker + like to item's one. + + * lib/rss/xml-stylesheet.rb (RSS::XMLStyleSheet#guess_type): fixed + regular expression bug. + + * test/rss/test_maker_xml-stylesheet.rb: updated tests for + xml-stylesheet. + +Mon Nov 1 13:59:28 2004 WATANABE Hirofumi + + * ext/extmk.rb (MANIFEST): do not use anymore, use extconf.rb instead. + + * ext/enumerator/extconf.rb, ext/fcntl/extconf.rb, + ext/stringio/extconf.rb: added. + + * MANIFEST, ext/**/MANIFEST: removed. + + * README.EXT, README.EXT.ja: remove MANIFEST stuff. + +Mon Nov 1 11:52:18 2004 NAKAMURA Usaku + + * io.c (pipe_open): avoid conflict of variable name. [ruby-dev:24662] + +Mon Nov 1 11:46:19 2004 WATANABE Hirofumi + + * process.c (rb_f_exec): should check whether prog is NULL. + +Mon Nov 1 09:37:19 2004 Kouhei Sutou + + * lib/rss/maker.rb: added entry point of RSS Maker. + +Mon Nov 1 03:14:14 2004 Yukihiro Matsumoto + + * eval.c (rb_get_method_body): store ICLASS in the cache. + [ruby-core:03672] + + * eval.c (rb_provided): should return true for loading library + too for autoloading. [ruby-core:03655] + +Mon Nov 1 01:14:52 2004 Yukihiro Matsumoto + + * io.c (rb_f_open): create copy of popen specifier. [ruby-dev:24656] + + * string.c (rb_str_locktmp): lock string temporarily. + + * string.c (str_independent): add tmplock check. + + * io.c (io_write): lock output string temporarily. + [ruby-dev:24649] + + * io.c (io_write): use rb_str_locktmp(). + + * io.c (read_all): ditto. + +Sun Oct 31 23:37:00 2004 NARUSE, Yui + + * process.c: on NetBSD don't use setruid() and setrgid(). + +Sun Oct 31 23:12:10 2004 Kouhei Sutou + + * lib/rss/maker/*.rb: added RSS Maker. + + * test/rss/test_maker_*.rb: added tests for RSS Maker. + +Sun Oct 31 16:58:12 2004 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE.codepage, WIN32OLE.codepage=. + + * ext/win32ole/tests/testWIN32OLE.rb: ditto. + +Sun Oct 31 14:35:26 2004 WATANABE Hirofumi + + * ext/nkf/nkf-utf8/nkf.c: add "\075?UTF-8?Q?" for Gmail. + +Sun Oct 31 14:18:56 2004 Minero Aoki + + * parse.y [ripper]: emit lexer-event values to the parser + (still incomplete). + +Sat Oct 30 15:24:41 2004 Masaki Suketa + + * ext/win32ole/win32ole.c: add WIN32OLE_TYPELIB class. add + WIN32OLE#ole_typelib method. + + * ext/win32ole/tests/testOLETYPELIB.rb: add WIN32OLE_TYPELIB class. + +Sat Oct 30 06:53:24 2004 Peter Vanbroekhoven + + * eval.c (rb_eval): NODE_XSTR should pass copy of literal string. + +Sat Oct 30 00:19:40 2004 Yukihiro Matsumoto + + * array.c (rb_ary_update): a[n,m]=nil no longer works as element + deletion. + + * enum.c (enum_sort_by): protect continuation jump in. + [ruby-dev:24642] + + * eval.c (rb_eval), gc.c (gc_mark_children), node.h (NEW_ALIAS, + NEW_VALIAS), parse.y (fitem): allow dynamic symbols to + NODE_UNDEF and NODE_ALIAS. + +Fri Oct 29 21:27:51 2004 Nobuyoshi Nakada + + * io.c (rb_io_check_initialized): new function to check uninitialized + object. [ruby-talk:118234] + + * file.c (rb_file_path), io.c (rb_io_closed): check if initialized. + +Fri Oct 29 19:05:33 2004 NARUSE, Yui + + * ext/nkf: follow nkf2.0. + +Fri Oct 29 17:18:22 2004 NAKAMURA Usaku + + * parse.y (ripper_s_allocate): add prototype for Microsoft compiler. + + * range.c (range_step, range_each): need cast. + +Fri Oct 29 16:34:19 2004 Daiki Ueno + + * misc/ruby-mode.el (ruby-parse-partial): Parse the rest of the + line after opening heredoc identifier. [ruby-dev:24635] + +Fri Oct 29 11:35:04 2004 Nobuyoshi Nakada + + * parse.y (rb_parser_append_print, rb_parser_while_loop): body node + can be empty. [ruby-dev:24628] + +Fri Oct 29 10:00:30 2004 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): forget to free some memory chunks. + [ruby-core:03611] + + * eval.c (ruby_cleanup): ruby_finalize_1 may cause exception, + should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] + +Thu Oct 28 08:42:02 2004 Tanaka Akira + + * io.c (argf_forward): use ANSI style. + (argf_read): call argf_forward with argv argument. + [ruby-dev:24624] + +Wed Oct 27 09:17:30 2004 Nobuyoshi Nakada + + * string.c (str_gsub): use a string object for exception safeness. + [ruby-dev:24601] + +Wed Oct 27 07:38:55 2004 Yukihiro Matsumoto + + * node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers. + [ruby-talk:117841] + + * ruby.h (FL_ABLE): nodes are not subject for flag operations. + + * io.c (ARGF_FORWARD): should have specified argv explicitly, + since we no longer have frame->argv saved. [ruby-dev:24602] + +Tue Oct 26 23:30:39 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::add_class_or_module): + Restore correct :nopdoc: behavior with nested classes and modules. + +Tue Oct 26 18:21:29 2004 Yukihiro Matsumoto + + * string.c (RESIZE_CAPA): check string attribute before modifying + capacity member of string structure. [ruby-dev:24594] + +Tue Oct 26 11:33:26 2004 David G. Andersen + + * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain + performance. [ruby-talk:117701] + +Tue Oct 26 10:56:55 2004 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): raise ArgumentError for extra + arguments, unless (digit)$ style used. + +Mon Oct 25 18:35:39 2004 WATANABE Hirofumi + + * win32/win32.c (isUNCRoot): should check NUL after '.'. + [ruby-dev:24590] + + * win32/win32.c (isUNCRoot): fixed buffer overrun. + +Mon Oct 25 08:03:26 2004 Nobuyoshi Nakada + + * eval.c (get_backtrace): ignore illegal backtrace. [ruby-dev:24587] + +Sun Oct 24 00:40:50 2004 Nobuyoshi Nakada + + * eval.c (rb_load, search_required, rb_require_safe, rb_require): use + frozen shared string to avoid outside modification. [ruby-dev:24580] + +Sat Oct 23 23:40:34 2004 Yukihiro Matsumoto + + * io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in + interpreter termination. [ruby-dev:24579] + +Sat Oct 23 22:18:32 2004 Guy Decoux + + * eval.c (frame_free): Guy Decoux solved the leak problem. + Thanks. [ruby-core:03549] + +Sat Oct 23 00:20:55 2004 Yukihiro Matsumoto + + * ext/zlib/zlib.c (zstream_append_input): clear klass for z->input + to avoid potential vulnerability. + + * ext/zlib/zlib.c (zstream_run): always use zstream_append_input() + to avoid SEGV. [ruby-dev:24568] + +Fri Oct 22 12:02:28 2004 Yukihiro Matsumoto + + * eval.c (rb_alias): was warning for wrong condition. + [ruby-dev:24565] + +Fri Oct 22 10:36:37 2004 GOTOU Yuuzou + + * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#meta_vars): + should check if path_info is not nil. + +Fri Oct 22 00:22:31 2004 Yukihiro Matsumoto + + * ext/zlib/zlib.c (zstream_shift_buffer): should restore class + field of a buffer. [ruby-dev:24562] + +Fri Oct 22 00:20:33 2004 Nobuyoshi Nakada + + * string.c (rb_str_include): should not treat char as negative value. + [ruby-dev:24558] + +Thu Oct 21 21:32:30 2004 IWATSUKI Hiroyuki + + * lib/pstore.rb (PStore#transaction): Use the empty content when a + file is not found. [ruby-dev:24561] + +Thu Oct 21 19:06:15 2004 GOTOU Yuuzou + + * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io): + ensure to close @body. (http://bugs.debian.org/277520) + +Thu Oct 21 13:11:31 2004 WATANABE Hirofumi + + * io.c (pipe_open): variable name "fpw" is conflicted. + +Thu Oct 21 00:36:41 2004 Yukihiro Matsumoto + + * eval.c (rb_alias): should warn on method discarding. + [ruby-dev:24546] + + * ext/zlib/zlib.c (zstream_expand_buffer_into): hide internal + string buffer by clearing klass. [ruby-dev:24548] + + * parse.y (lex_getline): should not touch ruby_debug_lines if + RIPPER is defined. [ruby-dev:24547] + +Wed Oct 20 19:45:13 2004 Yukihiro Matsumoto + + * string.c (str_gsub): reentrant check. [ruby-dev:24432] + +Wed Oct 20 12:42:53 2004 Nobuyoshi Nakada + + * io.c (rb_io_getline): rs modification check should not interfere + in the loop. + +Wed Oct 20 10:31:33 2004 Yukihiro Matsumoto + + * parse.y (lex_getline): should update ruby_debug_lines. + +Wed Oct 20 04:17:55 2004 Yukihiro Matsumoto + + * ext/dbm/dbm.c (fdbm_delete_if): should check if deleting element + is a string. [ruby-dev:24490] + + * ext/sdbm/init.c (fsdbm_delete_if): ditto. + +Wed Oct 20 01:37:18 2004 Yukihiro Matsumoto + + * array.c (rb_ary_times): Array#* should return an instance of + the class of right operand. [ruby-dev:24526] + + * ext/zlib/zlib.c (zstream_detach_buffer): should not expose + class-less object to Ruby world. [ruby-dev:24530] + + * eval.c (proc_dup): provide Proc#dup as well. [ruby-talk:116915] + + * eval.c (ruby_exec): stack marking position may be higher than + expected. thanks to Guy Decoux. [ruby-core:03527] + +Wed Oct 20 00:25:41 2004 Nobuyoshi Nakada + + * eval.c (search_required): required name must not be changed before + loading. [ruby-dev:24492] + +Tue Oct 19 23:59:46 2004 Nobuyoshi Nakada + + * eval.c (rb_require_safe): provide the feature after loaded. + [ruby-list:40085] + +Tue Oct 19 22:43:12 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_attr): If + we come across 'attr' in a context where it isn't + followed by a symbol, just issue a warning. + +Tue Oct 19 20:32:50 2004 Masaki Suketa + + * ext/win32ole.c(ole_invoke): retrieve the result value when + retrying the IDispatch::invoke. + +Tue Oct 19 17:24:11 2004 Yukihiro Matsumoto + + * io.c (read_all): block string buffer modification during + rb_io_fread() by freezing it temporarily. [ruby-dev:24479] + + * dir.c (rb_push_glob): block call at once the end of method. + [ruby-dev:24487] + + * ext/enumerator/enumerator.c (enum_each_slice): remove + rb_gc_force_recycle() to prevent potential SEGV. + [ruby-dev:24499] + + * ext/zlib/zlib.c (zstream_expand_buffer): hide internal string + buffer by clearing klass. [ruby-dev:24510] + +Tue Oct 19 08:47:21 2004 Nobuyoshi Nakada + + * string.c (rb_str_upto): method result must be checked. [ruby-dev:24504] + + * eval.c (error_print): ditto. [ruby-dev:24519] + +Mon Oct 18 23:37:05 2004 Nobuyoshi Nakada + + * marshal.c (r_object0): check inheritance by the internal function. + [ruby-dev:24515] + +Mon Oct 18 11:29:32 2004 Nobuyoshi Nakada + + * io.c (rb_io_flags_mode, rb_io_mode_flags): distinguish whether file + not existing is created. [ruby-dev:24505] + +Mon Oct 18 07:26:21 2004 Nobuyoshi Nakada + + * file.c (rb_file_truncate): discard read buffer before truncation. + [ruby-dev:24197] + +Mon Oct 18 01:56:03 2004 GOTOU Yuuzou + + * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#initialize): + initial value of accpet-* should be array. + +Mon Oct 18 00:42:45 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_getservbyaname): protocol string + might be altered. [ruby-dev:24503] + + * string.c (rb_str_upto): check if return value from succ is a + string. [ruby-dev:24504] + +Sun Oct 17 23:03:48 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb: TkTimer#start and restart accept a block + +Sun Oct 17 12:53:46 2004 Masaki Suketa + + * ext/win32ole/win32ole.c (fole_func_methods): correct argument mismatch. + * ext/win32ole/win32ole.c (fole_get_methods): ditto. + * ext/win32ole/win32ole.c (fole_put_methods): ditto. + * ext/win32ole/tests/testWIN32OLE.rb: add test for WIN32OLE#ole_func_methods + WIN32OLE#ole_get_methods, WIN32OLE#ole_put_methods + +Sat Oct 16 14:45:28 2004 Kouhei Sutou + + * lib/rss/0.9.rb (RSS::Rss#to_s): removed garbage. + +Sat Oct 16 13:42:49 2004 Kouhei Sutou + + * lib/rss/: untabified. + * test/rss/: untabified. + * lib/rss/0.9.rb (RSS::Rss#to_s): inent -> indent. + +Sat Oct 16 13:34:56 2004 Kouhei Sutou + + * lib/rss: supported prety print. + * test/rss/test_1.0.rb: added test for calculating default indent size. + +Sat Oct 16 10:56:36 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): install-rb is needed for statically + linked extensions. [ruby-dev:24491] + +Fri Oct 15 18:07:08 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509store.c + (ossl_x509stctx_initialize): setup OpenSSL::X509::StoreContext with + ossl_x509stctx_* functions instead of X509_STORE_CTX_*. + (ossl_x509store_set_time): add OpenSSL::X509::Store#time=. + (ossl_x509stctx_set_time): add OpenSSL::X509::StoreContext#time=. + + * test/openssl/ossl_x509store.rb: test certificate validity times. + +Fri Oct 15 18:04:35 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/timer.rb: TkTimer.new(interval, loop){ ... } is + acceptable. Add TkTimer.start ( == new + start ). + +Fri Oct 15 12:43:09 2004 Tanaka Akira + + * eval.c (Init_stack): make prototype declaration consistent with + the definition in gc.c. + +Thu Oct 14 13:33:59 2004 Kouhei Sutou + + * lib/rss/rss.rb: added link to Tutorial. + +Tue Oct 12 21:22:50 2004 GOTOU Yuuzou + + * lib/webrick/config.rb: + add WEBrick::Config::FileHandler[:AcceptableLanguages]. + + * lib/webrick/httpservlet/filehandler.rb + (WEBrick::HTTPServlet::FileHandler#set_filename): search files + having suffix of language-name which Accept-Language header field + includes if :AcceptableLanguages options is present. + + * lib/webrick/httpservlet/filehandler.rb + (WEBrick::HTTPServlet::FileHandler#get_servlet): new method to + search servlet correspond to the suffix of filename. + + * lib/webrick/httprequest.rb: add attributes access methods: accept, + accept_charset, accept_encoding, accept_language, content_length + and content_type. + + * lib/webrick/httpresponse.rb: add attribute access methods: + content_length, content_length=, content_type and content_type=. + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.mime_types): + use the second suffix to detect media type. (the first suffix + may be a language name.) + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_qvalues): + add method to parse Accept header field. it returns an Array of + values sorted by the qvalues. + +Tue Oct 12 15:05:32 2004 WATANABE Hirofumi + + * io.c (MODE_BINMODE, MODE_BINARY): fixed reversed condition. + +Mon Oct 11 17:51:34 2004 Yukihiro Matsumoto + + * io.c (rb_io_popen): get mode string via rb_io_flags_mode() to + avoid mode string modification. [ruby-dev:24454] + + * io.c (rb_io_getline_fast): should take delim as unsigned char to + distinguish EOF and '\377'. [ruby-dev:24460] + + * io.c (rb_io_getline): add check for RS modification. + [ruby-dev:24461] + + * enum.c (enum_sort_by): use qsort() directly instead using + rb_iterate(). [ruby-dev:24462] + + * enum.c (enum_each_with_index): remove rb_gc_force_recycle() to + prevent access to recycled object (via continuation for + example). [ruby-dev:24463] + +Mon Oct 11 13:48:20 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/*: untabify + +Sun Oct 10 12:32:08 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::parse_require): Allow 'require' + to be used as a variable name + +Sun Oct 10 02:49:14 2004 Minero Aoki + + * ext/ripper/lib/ripper/filter.rb: require ripper/tokenizer. + + * ext/ripper/lib/ripper/filter.rb (parse): argument is optional. + +Sun Oct 10 02:43:13 2004 Minero Aoki + + * parse.y [ripper]: \n between two comments disappeared. + +Sat Oct 9 21:23:37 2004 Kouhei Sutou + + * lib/rss/converter.rb: changed to try to use Iconv for default + conversion. + + * lib/rss/rss.rb: 0.0.9 -> 0.1.0. + +Sat Oct 9 19:50:36 2004 Nobuyoshi Nakada + + * io.c (rb_io_getline): should not treat char as negative value. + [ruby-dev:24460] + +Sat Oct 9 00:25:39 2004 Tanaka Akira + + * io.c (rb_io_fread): rb_thread_wait_fd() was lost. + [ruby-dev:24457] + +Fri Oct 8 21:36:56 2004 Minero Aoki + + * lib/fileutils.rb (fu_traverse): return value of Dir.entries is + reliable. (pass $SAFE=1) + + * lib/fileutils.rb (remove_dir): return value of Dir.foreach is + reliable. (pass $SAFE=1) + +Fri Oct 8 09:49:32 2004 Yukihiro Matsumoto + + * pack.c (pack_pack): pointer modification check before each + iteration. [ruby-dev:24445] + +Fri Oct 8 01:13:05 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/optiondb.rb: make it more secure + +Thu Oct 7 23:47:57 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/scrollbar.rb: When 'set' operation, a scrollbar + cannot propagate view port information from the source widget + (that calls 'set') to other assigned widgets. + +Thu Oct 7 17:36:25 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: When CHILDKILLED and so on, Tk.errorCode returns + a Fixnum for 2nd element (it's pid) of the return value. + +Thu Oct 7 12:55:04 2004 Yukihiro Matsumoto + + * io.c (io_read): should freeze buffer before thread context + switch. [ruby-dev:24442] + + * pack.c (pack_unpack): string conversion should at the top of the + method. [ruby-dev:24439] + + * io.c (io_read): buffer should be frozen only after the length + check. [ruby-dev:24440] + +Thu Oct 7 02:56:43 2004 Nobuyoshi Nakada + + * ext/stringio/stringio.c: use FMODE_APPEND. + +Thu Oct 7 01:05:33 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add Tk.errorInfo and Tk.errorCode + +Thu Oct 7 00:08:37 2004 Yukihiro Matsumoto + + * io.c (rb_io_s_sysopen): preserve path in the buffer allocated by + ALLOCA_N() to prevent modification. [ruby-dev:24438] + +Wed Oct 6 09:21:00 2004 Yukihiro Matsumoto + + * io.c (rb_io_mode_flags): preserve append mode flag. + [ruby-dev:24436] + + * io.c (rb_io_modenum_mode): do not use external output buffer. + + * string.c (rb_str_justify): differ pointer retrieval to prevent + padding string modification. [ruby-dev:24434] + + * range.c (range_each_func): allow func to terminate loop by + returning RANGE_EACH_BREAK. + + * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] + +Tue Oct 5 09:53:22 2004 Yukihiro Matsumoto + + * io.c (rb_fopen): mode string copy at the lowest level. + + * io.c (rb_io_flags_mode): requires output buffer no more. no + allocation needed. + + * array.c (rb_ary_index): takes a block to compare items in an + array. [ruby-talk:113069] [Ruby2] + + * array.c (rb_ary_rindex): ditto. + +Mon Oct 4 14:03:40 2004 Nobuyoshi Nakada + + * io.c (rb_file_open_internal, rb_io_reopen): fname might be altered + while GC. [ruby-dev:24408] + +Mon Oct 4 12:53:45 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/optiondb.rb: support definition of command + resources on widgets + + * ext/tk/lib/tk/image.rb: bug fix + +Sun Oct 3 21:16:05 2004 Shugo Maeda + + * lib/net/imap.rb (TEXT_REGEXP): allow 8-bit characters for the german + version of Microsoft Exchange Server. + + * lib/net/imap.rb (RTEXT_REGEXP): ditto. + + * lib/net/imap.rb (CTEXT_REGEXP): ditto. + +Sat Oct 2 20:34:05 2004 Nobuyoshi Nakada + + * parse.y (local_vars): moved to struct parser_params. + [ruby-dev:24391] + + * parser.y (stmts): remove suspicious NODE_BEGIN. [ruby-dev:24390] + + * node.h (NEW_DVAR): extra semicolon. + +Sat Oct 2 00:42:20 2004 Yukihiro Matsumoto + + * marshal.c (r_byte): retrieve pointer from string value for each + time. [ruby-dev:24404] + + * marshal.c (r_bytes0): ditto. + + * enum.c (sort_by_i): re-entrance check added. [ruby-dev:24399] + + * io.c (io_read): should freeze all reading buffer. + [ruby-dev:24400] + + * string.c (rb_str_sum): should use bignums when bits is greater + than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] + + * eval.c (specific_eval): defer pointer retrieval to prevent + unsafe sourcefile string modification. [ruby-dev:24382] + + * string.c (rb_str_sum): wrong cast caused wrong result. + [ruby-dev:24385] + + * enum.c (enum_sort_by): hide temporary array from + ObjectSpace.each_object. [ruby-dev:24386] + + * string.c (rb_str_sum): check was done with false pointer. + [ruby-dev:24383] + + * string.c (rb_str_sum): string may be altered. [ruby-dev:24381] + +Fri Oct 1 11:40:14 2004 Yukihiro Matsumoto + + * eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe + sourcefile string modification. [ruby-dev:24373] + + * io.c (io_read): block string buffer modification during + rb_io_fread() by freezing it temporarily. [ruby-dev:24366] + + * io.c (rb_io_s_popen): mode argument may be altered. + [ruby-dev:24375] + + * file.c (rb_file_s_basename): ext argument may be altered. + [ruby-dev:24377] + + * enum.c (enum_sort_by): use NODE instead of 2 element arrays. + [ruby-dev:24378] + + * string.c (rb_str_chomp_bang): StringValue() may change the + receiver. [ruby-dev:24371] + +Fri Oct 1 11:25:20 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/grid.rb: revive TkGrid.grid + + * ext/tk/lib/tk/pack.rb: revive TkPack.pack + + * ext/tk/lib/tk/place.rb: revive TkPlace.place + +Thu Sep 30 00:50:44 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_init): bug fix + + * ext/tk/tkutil.c (get_eval_string_core): accept a Regexp object + + * ext/tk/lib/multi-tk.rb: fix bug on 'exit' operation + + * ext/tk/lib/tk/text.rb: 'tksearch' accepts a Regexp object as a + matting pattern argument + +Wed Sep 29 10:58:07 2004 Nobuyoshi Nakada + + * enum.c (sort_by_i): internally used object must not be changed + outside. [ruby-dev:24368] + +Mon Sep 27 21:25:12 2004 Nobuyoshi Nakada + + * eval.c (rb_call0): invoke finalizers periodically. + + * gc.c (gc_sweep): defer running finalizers. [ruby-dev:24354] + + * gc.c (rb_gc_finalize_deferred): run deferred finalizers. + +Mon Sep 27 15:01:59 2004 Minero Aoki + + * parse.y [ripper]: missing ';'. + +Mon Sep 27 13:46:45 2004 Nobuyoshi Nakada + + * intern.h, struct.c (rb_struct_s_members, rb_struct_members): public + accessors. [ruby-dev:24342] + + * marshal.c (w_object, r_object0): use accessors. + +Mon Sep 27 09:14:03 2004 Yukihiro Matsumoto + + * array.c (rb_ary_delete): comparison may change the capacity. + [ruby-dev:24348] + + * array.c (rb_ary_fill): fill should honor length argument. + [ruby-dev:24346] + + * array.c (rb_ary_replace): should not use ptr from shared array. + [ruby-dev:24345] + + * ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK. + [ruby-talk:113807] + +Sun Sep 26 08:05:10 2004 Tadayoshi Funaba + + * lib/date.rb: provides {Time,Date,DateTime}#to_{time,date,datetime}. + + * sample/cal.rb: uses getoptlong instead of getopts. + +Sat Sep 25 18:39:22 2004 Yukihiro Matsumoto + + * array.c (flatten): element size might change during comparison. + [ruby-dev:24343] + +Sat Sep 25 01:52:49 2004 Yukihiro Matsumoto + + * struct.c (rb_struct_s_members): wrong call of struct_members. + [ruby-dev:24333] + +Fri Sep 24 16:09:42 2004 Yukihiro Matsumoto + + * eval.c (proc_invoke): propagate DVAR_DONT_RECYCLE on termination + to avoid double call to rb_gc_force_recycle(). [ruby-dev:24311] + +Fri Sep 24 08:29:45 2004 Yukihiro Matsumoto + + * parse.y (rb_parser_append_print): should handle prelude. + [llama@u01.gate0] + + * parse.y (rb_parser_while_loop): ditto. + + * array.c (rb_ary_subseq): original object might be modified after + sharing data creation. [ruby-dev:24327] + + * array.c (rb_ary_replace): ditto. + + * array.c (ary_make_shared): freeze shared array. [ruby-dev:24325] + + * struct.c (struct_members): always check struct size and size of + members list in the class. [ruby-dev:24320] + +Thu Sep 23 19:48:14 2004 Minero Aoki + + * ext/ripper/Makefile.dev: removed. + + * ext/ripper/ripper.rb.in: moved to lib/ripper/core.rb.in. + + * ext/ripper/lib/ripper/core.rb: new file. + + * ext/ripper/lib/ripper/core.rb.in: new file. + + * ext/ripper/tools/generate-ripper_rb.rb: change comment. + + * test/ripper/*.rb: on__scan event removed. + + * test/ripper/*.rb: event name is changed: on__XXX -> on_XXX. + +Thu Sep 23 09:29:14 2004 Yukihiro Matsumoto + + * string.c (rb_str_sub_bang): check if string is not modified + during iteration. [ruby-dev:24315] + + * hash.c (rb_hash_rehash): replace st_foreach() by its deep + checking counterpart. [ruby-dev:24310] + +Wed Sep 22 14:21:54 2004 Minero Aoki + + * parse.y [ripper]: on__scan event removed. + + * parse.y [ripper]: event name is changed: on__XXX -> on_XXX. + + * ext/ripper/eventids2.c: ditto. + + * ext/ripper/ripper.rb.in: ditto. + + * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. + + * ext/ripper/lib/ripper/tokenizer: ditto. + + * ext/ripper/lib/ripper/filter: new file. + + * sample/ripper/colorize.rb: new file. + + * sample/ripper/strip-comment.rb: new file. + +Wed Sep 22 13:50:49 2004 Yukihiro Matsumoto + + * hash.c (hash_alloc): was using tbl pointer without + initialization. + +Wed Sep 22 13:38:12 2004 Yukihiro Matsumoto + + * hash.c (rb_hash_rehash): add iteration check. [ruby-dev:24301] + + * st.c (st_foreach): add deep check. + + * hash.c (rb_hash_fetch): returns KeyError instead of IndexError. + + * hash.c (env_fetch): ditto. + +Wed Sep 22 13:02:02 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_call_handler): workaround for Ctrl-C. + +Wed Sep 22 09:04:41 2004 Yukihiro Matsumoto + + * parse.y: remove global variables ruby_eval_tree and + ruby_eval_tree_begin. + + * array.c (rb_ary_collect_bang): element size might change during + comparison. [ruby-dev:24300] + + * array.c (rb_ary_reject_bang): ditto. [ruby-dev:24300] + + * array.c (rb_ary_eql): ditto. [ruby-dev:24300] + +Wed Sep 22 00:11:12 2004 Dave Thomas + + * process.c: Add documentation for fork() + +Tue Sep 21 18:29:49 2004 Yukihiro Matsumoto + + * array.c (rb_ary_uniq_bang): element size might change during + comparison. [ruby-dev:24298] + +Mon Sep 20 17:46:51 2004 Minero Aoki + + * ext/ripper/lib/ripper/tokenizer.rb: fix typo. + +Mon Sep 20 17:38:43 2004 Minero Aoki + + * test/ripper/test_scanner_events.rb: tokens must be reordered. + + * ext/ripper/lib/ripper/tokenizer.rb: ditto. + +Mon Sep 20 16:58:16 2004 Minero Aoki + + * parse.y [ripper]: do not delay dispatching. + + * ext/ripper/lib/ripper/tokenizer.rb: sort tokens by right order. + +Mon Sep 20 15:17:47 2004 Minero Aoki + + * ext/ripper/lib/ripper/tokenizer.rb: new file. + +Mon Sep 20 15:13:52 2004 Minero Aoki + + * test/ripper/test_scanner_events.rb: test #lineno and #column. + +Mon Sep 20 14:50:17 2004 Minero Aoki + + * parse.y [ripper]: delayed heredocument events should be + dispatched after EOF. + +Mon Sep 20 14:39:42 2004 Minero Aoki + + * parse.y [ripper]: adjust lineno and columns for multi-line + strings. + + * parse.y [ripper]: delay heredocument events until seeing + end-of-line. + + * parse.y [ripper]: event on__heredoc_contentn -> + on__tstring_content. + + * ext/ripper/eventids2.c: ditto. + + * ext/ripper/lib/ripper.rb: sync with eventids2.c. + + * test/ripper/test_scanner_events.rb: test it. + + * ext/ripper/tools/generate-ripper_rb.rb: show basename of input. + + * ext/ripper/Makefile.dev: support objdir build. + +Mon Sep 20 13:22:55 2004 Minero Aoki + + * parse.y [ripper]: remove Ripper#pos. + + * parse.y [ripper]: Ripper#column should return the column of the + current token. + +Mon Sep 20 12:02:41 2004 Minero Aoki + + * parse.y [ripper]: unify old_lex_p and token_head. + + * test/ripper/test_scanner_events.rb: now \r\n is saved correctly. + + * parse.y: new macro lex_goto_eol() for next change. + +Mon Sep 20 11:01:55 2004 Minero Aoki + + * parse.y [ripper]: adjust line number for heredoc. [ruby-dev:24272] + +Mon Sep 20 04:49:22 2004 Minero Aoki + + * ext/ripper/ripper.rb.in: new const Ripper::PARSER_EVENT_TABLE. + + * ext/ripper/ripper.rb.in: new const Ripper::SCANNER_EVENT_TABLE. + + * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. + +Mon Sep 20 04:13:00 2004 Minero Aoki + + * test/ripper/test_scanner_events.rb: test spaces before heredoc + mark. + +Mon Sep 20 03:46:54 2004 Minero Aoki + + * parse.y [ripper]: spaces before heredoc marker was lost. + [ruby-dev:24272] + + * keywords: rb_reserved_word() should be defined only in ruby + core. [ruby-dev:24272] + + * lex.c: sync with keywords. + + * ext/ripper/ripper.rb.in (parse): fix typo. + + * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. + +Mon Sep 20 03:37:59 2004 Tanaka Akira + + * ext/zlib/zlib.c (gzfile_read_raw): call readpartial at first. + (Zlib::GzipReader#readpartial): new method. + +Mon Sep 20 00:24:19 2004 Yukihiro Matsumoto + + * enum.c (enum_sort_by): do not use qsort directly. use + rb_ary_sort_bang() instead. [ruby-dev:24291] + + * enum.c (enum_sort_by): pedantic type check added. + [ruby-dev:24291] + + * hash.c (rb_hash_foreach_iter): check iter_lev after each + iteration. [ruby-dev:24289] + + * array.c (rb_ary_and): element size might change during + comparison. [ruby-dev:24290] + + * array.c (rb_ary_or): ditto. [ruby-dev:24292] + + * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] + +Sat Sep 18 15:02:22 2004 Yukihiro Matsumoto + + * array.c (rb_ary_equal): element size might change during + comparison. [ruby-dev:24254] + + * array.c (rb_ary_diff): ditto. [ruby-dev:24274] + + * array.c (rb_ary_select): ditto. [ruby-dev:24278] + + * array.c (rb_ary_delete): ditto. [ruby-dev:24283] + + * array.c (rb_ary_rindex): ditto. [ruby-dev:24275] + + * array.c (rb_ary_initialize): element size might change during + initializing block. [ruby-dev:24284] + +Sat Sep 18 14:10:23 2004 Yukihiro Matsumoto + + * dir.c (dir_s_chdir): avoid memory leak and unnecessary chdir to + the original directory when exception has caused in changing + direcotry or within block. thanks to Johan Holmberg + [ruby-core:03446] + +Fri Sep 17 20:29:33 2004 NAKAMURA Usaku + + * parse.y: add prototypes for Microsoft compiler. + + * ext/ripper/depend (parse.obj): lex.c exists at hdrdir. + + * {bcc32,win32,wince}/Makefile.sub (YACC, YFLAGS, parse.c): + use bison. + +Fri Sep 17 17:11:08 2004 Yukihiro Matsumoto + + * array.c (rb_ary_delete): element comparison might change array + size. [ruby-dev:24273] + + * parse.y: make ruby parser reentrant. merge ripper parser to the + real one. this change makes ruby require bison. + + * file.c (rb_file_truncate): clear stdio buffer before truncating + the file. [ruby-dev:24191] + + * ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF + which might return singleton class. [ruby-dev:24202] + +Fri Sep 17 16:07:09 2004 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: improve exit operation + +Fri Sep 17 15:01:57 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix SEGV when (thread_)vwait or + (thread_)tkwait + + * ext/tk/lib/tk.rb: add alias wait_window to wait_destroy + + * ext/tk/lib/multi-tk.rb: support calling 'mainloop' on slave + interpreters (however, the 'real' eventloop must be run on the + Default Master IP) + + * ext/tk/lib/remote-tk.rb: follow the changes of ext/tk/lib/multi-tk.rb + + * ext/tk/sample/remote-ip_sample2.rb: ditto + + * ext/tk/sample/tkoptdb-safeTk.rb: ditto + +Thu Sep 16 18:12:13 2004 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI#start): should set REMOTE_USER + to request.user attribute. + + * lib/webrick/httpservlet/filehandler.rb + (WEBrick::HTTPServlet::FileHandler#initialize): should expand + the pathname of document root directory. + +Thu Sep 16 15:49:28 2004 Yukihiro Matsumoto + + * string.c (rb_str_intern): protect string argument from GC. + [ruby-core:03411] + +Wed Sep 15 20:22:23 2004 Hidetoshi NAGAI + + * ext/tk/sample/tkoptdb-safeTk.rb: fix a bug depend on the changes + of MultiTkIp + +Tue Sep 14 23:54:11 2004 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string was en-bugged by + the previous changes. + +Tue Sep 14 23:45:44 2004 Dave Thomas + + * lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::TextFormatter.for): + Add Eric Hodel's simpleformatter. + +Tue Sep 14 22:11:08 2004 Minero Aoki + + * parse.y [ripper]: Add rdoc. + +Tue Sep 14 20:24:49 2004 Minero Aoki + + * parse.y [ripper]: space event is on__sp, not on__lwsp. + [ruby-dev:24257] + + * ext/ripper/eventids2.c: ditto. + + * ext/ripper/lib/ripper.rb: ditto. + + * ext/ripper/depend (ripper.o): No action is needed. + [ruby-dev:24260] + + * ext/ripper/depend: Borland make does not accept pipes in + Makefile rules. [ruby-dev:24589] + + * ext/ripper/depend: separate rules for developpers. + + * ext/ripper/Makefile.dev: new file. + + * ext/ripper/MANIFEST: add Makefile.dev. + + * ext/ripper/tools/generate-eventids1.rb: read from file, not + stdin. + + * ext/ripper/extconf.rb: clean ripper.E. + + * ext/ripper/tools/generate-ripper_rb.rb: #include ids1/ids2 + function was lost. + + * ext/ripper/tools/generate-ripper_rb.rb: SCANNER_EVENTS wrongly + contained parser events. + + * ext/ripper/lib/ripper.rb: ditto. + +Tue Sep 14 16:59:37 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix SEGV + + * ext/tk/lib/multi-tk.rb: improve safe-level handling of argument proc + + * ext/tk/sample/multi-ip_sample.rb: rename of old 'safe-tk.rb' + + * ext/tk/sample/safe-tk.rb: new sample script + + +Mon Sep 13 21:33:40 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): add optional + second argument to specify the output format (see also + X509_NAME_print_ex). + + * ext/openssl/ossl_x509name.c (ossl_x509name_init): new constants: + OpenSSL::X509::Name::COMPAT, OpenSSL::X509::Name::RFC2253, + OpenSSL::X509::ONELINE, OpenSSL::X509::MULTILINE. + + * ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name::RFC2253DN): + new module to provide the parse for RFC2253 DN format. + + * ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name.parse_rfc2253): + new method to parse RFC2253 DN format. + +Mon Sep 13 19:16:33 2004 WATANABE Hirofumi + + * eval.c (blk_copy_prev): need frame_dup(). [ruby-dev:24103] + +Mon Sep 13 16:23:27 2004 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: MultiTkIp.new_master and new_slave accept + safe-level value argument + +Mon Sep 13 10:48:37 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_getpid): don't need to use _getpid() on + mswin32 and mingw32. + +Mon Sep 13 10:22:05 2004 NAKAMURA Usaku + + * object.c (nil_inspect): fix typo. + +Mon Sep 13 09:29:58 2004 Minero Aoki + + * ext/ripper/depend: (nmake hack) prepend "./" to ripper.c to + avoid {$(srcdir)}. + +Mon Sep 13 06:43:42 2004 Minero Aoki + + * ext/ripper/tools/list-parse-event-ids.rb: does not use getopts. + + * ext/ripper/tools/list-scan-event-ids.rb: ditto. + +Mon Sep 13 02:42:28 2004 Minero Aoki + + * ext/Setup: add ripper. + + * ext/Setup.atheos: ditto. + + * ext/Setup.dj: ditto. + + * ext/Setup.emx: ditto. + + * ext/Setup.nt: ditto. + + * ext/Setup.x68: ditto. + +Mon Sep 13 02:26:31 2004 Minero Aoki + + * ext/ripper: ripper extention added. + + * ext/ripper/MANIFEST: new file. + + * ext/ripper/README: new file. + + * ext/ripper/depend: new file. + + * ext/ripper/extconf.rb: new file. + + * ext/ripper/eventids2.c: new file. + + * ext/ripper/ripper.rb.in: new file. + + * ext/ripper/lib/ripper.rb: new file. + + * ext/ripper/test/check-event-arity.rb: new file. + + * ext/ripper/test/check-event-coverage.sh: new file. + + * ext/ripper/test/check-scanner-event-coverage.rb: new file. + + * ext/ripper/test/list-called-events.rb: new file. + + * ext/ripper/test/src_rb: new file. + + * ext/ripper/test/validate.rb: new file. + + * ext/ripper/tools/generate-eventids1.rb: new file. + + * ext/ripper/tools/generate-param-macros.rb: new file. + + * ext/ripper/tools/generate-ripper_rb.rb: new file. + + * ext/ripper/tools/list-parse-event-ids.rb: new file. + + * ext/ripper/tools/list-scan-event-ids.rb: new file. + + * ext/ripper/tools/preproc.rb: new file. + + * ext/ripper/tools/strip.rb: new file. + + * test/ripper: ripper tests added. + + * test/ripper/dummyparser.rb: new file. + + * test/ripper/test_parser_events.rb: new file. + + * test/ripper/test_scanner_events.rb: new file. + +Mon Sep 13 01:03:02 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: improve control of preserv/release tcltkip + + * ext/tcltklib/tcltklib.c: store original 'exit' command + + * ext/tk/tkutil.c: fix(?) SEGV + +Mon Sep 13 00:22:53 2004 Minero Aoki + + * parse.y: fix file header. + +Mon Sep 13 00:20:39 2004 Minero Aoki + + * parse.y: ripper merged. + + * lex.c: ditto. + + * keywords: ditto. + +Sun Sep 12 23:53:17 2004 Hirokazu Yamamoto + + * util.c (ruby_strdup): remove unnecessary code. (xmalloc never + returns NULL.) + + * util.c (ruby_getcwd): fix memory leak on failure. + +Sun Sep 12 02:41:58 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: add TclTkIp#allow_ruby_exit? and + allow_ruby_exit= + + * ext/tk/lib/multi-tk.rb: ditto. + + * ext/tk/lib/remote-tk.rb: ditto. + + * ext/tcltklib/MANUAL.euc: ditto. + + * ext/tcltklib/MANUAL.eng: ditto. + + * ext/tcltklib/tcltklib.c: fix some reasons of SEGV + + * ext/tk/tkutil.c: ditto. + + * ext/tk/lib/multi-tk.rb: ditto. + + * ext/tk/lib/tk/timer.rb: ditto. + +Sat Sep 11 16:09:46 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb: Fix up cross-file class merging. + +Fri Sep 10 20:18:05 2004 Hirokazu Yamamoto + + * ext/tcltklib/tcltklib.c (lib_merge_tklist): fix suspicious + pointer conversion. + +Fri Sep 10 19:16:24 2004 Hirokazu Yamamoto + + * bcc32/Makefile.sub: bccwin32 port starts to use RTL dll. + (need to rebuild all) [ruby-dev:24138] + + * win32/win32.{h,c}: ditto. + +Fri Sep 10 15:55:59 2004 Minero Aoki + + * lib/fileutils.rb (mkdir_p): should pass mode argument to + Dir.mkdir. [ruby-dev:24242] + + * test/fileutils/test_fileutils.rb: test it. + +Fri Sep 10 02:43:54 2004 Dave Thomas + + * lib/rdoc/generators/template/kilmer.rb: James Buck's + patch for call-seq. + +Thu Sep 9 13:58:56 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_init): change flag value for setting + 'argv' and 'argv0' variable + + * ext/tk/lib/remote-tk.rb: follow changes of multi-tk.rb + +Thu Sep 9 11:46:18 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_classes): Allow + spaces aroun parameter to define_method_under (James Buck) + +Wed Sep 8 18:44:03 2004 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_write): zero fill a gap if exsts. + [ruby-dev:24190] + +Wed Sep 8 15:19:49 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_init): cannot create a IP at level 4 + + * ext/tk/lib/multi-tk.rb: improve 'exit' operation, security check, + and error treatment + + * ext/tk/lib/multi-tk.rb: allow a trusted slave IP to create slave IPs + + * ext/tk/lib/tk/listbox.rb: add TkListbox#value, value=, clear, and + erase + + * ext/tk/lib/tk/text.rb: add TkText#clear and erase + +Tue Sep 7 15:17:49 2004 Nobuyoshi Nakada + + * ext/socket/socket.c (ruby_connect): break immediately if a + socket is non-blocking. [ruby-talk:111654] + +Tue Sep 7 12:48:22 2004 NAKAMURA Usaku + + * {bcc32,win32,wince}/Makefile.sub (config.h): add fcntl. + + * win32/win32.[ch] (fcntl): ditto. + + * win32/win32.c (rb_w32_connect): support nonblocking mode. + + * ext/socket/socket.c (wait_connectable, ruby_connect): support + nonblocking connect on various platforms. + +Mon Sep 6 11:00:47 2004 Yukihiro Matsumoto + + * dir.c (dir_s_chdir): the patch to shut up false warning when + exception occurred within a block. a patch was given from Johan + Holmberg . [ruby-core:03292] + +Mon Sep 6 10:57:40 2004 Hirokazu Yamamoto + + * ext/tk/lib/tk/menu.rb(TkOptionMenubutton#insert): call correct method + +Mon Sep 6 07:51:42 2004 Yukihiro Matsumoto + + * eval.c (cvar_cbase): singletons should refer outer cvar scope. + [ruby-dev:24223] + + * eval.c (rb_load): should preserve previous ruby_wrapper value. + [ruby-dev:24226] + +Sat Sep 4 01:14:57 2004 Yukihiro Matsumoto + + * eval.c (cvar_cbase): class variables cause SEGV in + instance_eval() for fixnums and symbols. [ruby-dev:24213] + +Fri Sep 3 17:47:58 2004 Yukihiro Matsumoto + + * struct.c (make_struct): remove redefining constant when + conflict. [ruby-dev:24210] + +Fri Sep 3 11:31:44 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: Tk.after makes TkCore::INTERP.tk_cmd_tbl grow + [ruby-dev:24207] + +Fri Sep 3 02:12:48 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix typo [ruby-talk:111266] + + * ext/tk/lib/tk/text.rb: fix typo + + * ext/tk/lib/multi-tk.rb: improve safe-level treatment on slave IPs + +Fri Sep 3 01:54:20 2004 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): extact target prefix from Makefiles. + + * ext/extmk.rb: already built-in libraries satisfy dependencies. + [ruby-dev:24028] + +Wed Sep 1 21:16:50 2004 Hirokazu Yamamoto + + * ext/tk/lib/tk/spinbox.rb: fix typo + +Wed Sep 1 19:28:37 2004 Nobuyoshi Nakada + + * process.c (rb_proc_exec): label cannot precede variable declarations. + +Tue Aug 31 18:20:49 2004 Hirokazu Yamamoto + + * ext/tk/tkutil.c (cbsubst_init): fix memory leak + + * ext/tk/tkutil.c (cbsubst_get_all_subst_keys): fix SEGV + +Tue Aug 31 16:04:22 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_delete): when a tcltkip is deleted, + destroy its root widget + +Tue Aug 31 12:30:36 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (del_root): fix SEGV + +Mon Aug 30 21:50:14 2004 Dave Thomas + + * object.c: Add RDoc for Module.included. + +Mon Aug 30 23:11:06 2004 Dave Thomas + + * lib/rdoc/ri/ri_driver.rb (and others): ri now merges documentation + if it finds the same class in multiple places. + +Mon Aug 30 22:40:30 2004 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: 'restart' method accepts arguments + +Mon Aug 30 15:10:46 2004 WATANABE Hirofumi + + * configure.in (GNU/k*BSD): fixed FTBFS on GNU/k*BSD. [ruby-dev:24051] + +Sun Aug 29 14:08:56 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: compile error on bcc32 [ruby-dev:24081] + + * ext/tk/lib/multi-tk.rb: MultiTkIp#eval_string does not work + +Sat Aug 28 23:04:41 2004 Yukihiro Matsumoto + + * bignum.c (rb_big_and): protect parameters from GC. + [ruby-talk:110664] + +Fri Aug 27 12:13:50 2004 Tanaka Akira + + * ext/stringio/stringio.c (Init_stringio): add StringIO#readpartial as + an alias for StringIO#sysread. + +Fri Aug 27 10:14:21 2004 Nobuyoshi Nakada + + * process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143] + + * win32/win32.c (CreateChild): ditto. + +Thu Aug 26 04:38:29 2004 Dave Thomas + + * eval.c (return_jump): Minor typo in error message. Now reads + "return can't jump across threads". + +Wed Aug 25 15:18:52 2004 Nobuyoshi Nakada + + * eval.c (rb_longjmp): Exception#to_str is no longer defined. + +Wed Aug 25 11:39:10 2004 Yukihiro Matsumoto + + * error.c (exc_equal): exceptions are equal if they share same + class, message and backtrace. [ruby-talk:110354] + + * error.c (name_err_mesg_equal): ditto. + +Tue Aug 24 16:41:48 2004 Shugo Maeda + + * lib/cgi/session.rb (CGI::Session::FileStore#initialize): do not + use a session id as a filename. + + * lib/cgi/session/pstore.rb (CGI::Session::PStore#initialize): ditto. + + * lib/cgi/session/pstore.rb (CGI::Session::PStore#initialize): use + Dir::tmpdir. + +Tue Aug 24 14:32:17 2004 Shugo Maeda + + * lib/cgi/session.rb (CGI::Session::FileStore#initialize): untaint + session id after check. + +Tue Aug 24 08:57:51 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): d2i + functions may replace the pointer indicated by the first argument. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. + +Mon Aug 23 12:43:32 2004 NAKAMURA Usaku + + * lib/resolv.rb (Config.default_config_hash): when multiple domains + are set, Win32::Resolv.get_resolv_info returns Array. + +Sun Aug 22 16:27:38 2004 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_ssl_read): + - should return an empty string if specified length to read is 0. + - should check for pending data and wait for fd before reading. + - call underlying IO's sysread if SSL session is not started. + [ruby-dev:24072], [ruby-dev:24075] + + * ext/openssl/ossl_ssl.c (ossl_ssl_write): + - call underlying IO's syswrite if SSL session is not started. + + * ext/openssl/ossl_ssl.c (ossl_ssl_pending): new method + OpenSSL::SSL#pending. + + * ext/openssl/lib/openssl/buffering.rb: should not use select. + +Sun Aug 22 01:10:36 2004 GOTOU Yuuzou + + * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect): + should call :ProxyContentHandler before finishing CONNECT. + +Sat Aug 21 06:41:16 2004 Nobuyoshi Nakada + + * ext/tcltklib/extconf.rb (find_tcl, find_tk): find stub library. + + * lib/mkmf.rb (arg_config, with_config): deal with '-' and '_' + uniformly. [ruby-dev:24118] + +Fri Aug 20 14:49:42 2004 NAKAMURA Usaku + + * io.c (rb_io_check_writable): no need to check read buffer if + already changed to write mode. + +Fri Aug 20 11:46:43 2004 UENO Katsuhiro + + * ext/zlib/zlib.c: GzipReader#ungetc caused crc error. + +Thu Aug 19 16:29:45 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: Fail to treat a hash value of 'font' option. + + * ext/tk/lib/tk.rb: bindinfo cannot return '%' substiturion infomation. + + * ext/tk/lib/menu.rb: typo bug. + +Thu Aug 19 15:15:24 2004 Yukihiro Matsumoto + + * dir.c (free_dir): fix memory leak. reported by yamamoto + madoka. + +Thu Aug 19 09:19:27 2004 NAKAMURA Usaku + + * configure.in, win32/Makefile.sub (LIBS): need to link shell32 + library for SH* functions on mswin32 and mingw32. + + * wince/Makefile.sub (LIBS): need to link ceshell library for SH* + functions on mswince. + +Thu Aug 19 03:07:00 2004 why the lucky stiff + + * lib/yaml/baseemitter.rb: folding now handles double-quoted strings, + fixed problem with extra line feeds at end of folding, whitespace + opening scalar blocks. + + * lib/yaml/rubytypes.rb: subtelties in handling strings with + non-printable characters and odd whitespace patterns. + +Wed Aug 18 23:44:20 2004 Minero Aoki + + * lib/net/protocol.rb (rbuf_fill): OpenSSL::SSLSocket has its own + buffer, select(2) might not work. [ruby-dev:24072] + +Wed Aug 18 17:10:12 2004 WATANABE Hirofumi + + * ext/tcltklib/stubs.c (ruby_tcltk_stubs): need to call + Tcl_FindExecutable() for Tcl/Tk 8.4. + +Wed Aug 18 12:52:55 2004 Nobuyoshi Nakada + + * eval.c (rb_obj_instance_eval): evaluates under special singleton + classes as for special constants. + +Wed Aug 18 11:22:52 2004 Nobuyoshi Nakada + + * win32/win32.c (init_env): initialize HOME and USER environment + variables unless set. + +Wed Aug 18 10:17:21 2004 Yukihiro Matsumoto + + * eval.c (bind_eval): new method. [RCR 251] + + * string.c (rb_str_clear): new method. [ruby-dev:24104] + +Tue Aug 17 17:20:59 2004 Yukihiro Matsumoto + + * io.c (rb_io_reopen): should clear allocated OpenFile. pointed + out by Guy Decoux. [ruby-core:03288] + +Tue Aug 17 01:36:32 2004 Dave Thomas + + * lib/rdoc/usage.rb: Remove extra indent. Tidy 'ri' option + parsing so RDoc::usage plays better with OptionParser. + +Sat Aug 14 02:48:16 2004 Dave Thomas + + * lib/rdoc/usage.rb: Added. Allows command line programs + to report usage using their initial RDoc comment. + +Sat Aug 14 01:25:48 2004 why the lucky stiff + + * ext/syck/token.c: re2c no longer compiled with bit vectors. caused + problems for non-ascii characters. [ruby-core:03280] + * ext/syck/implicit.c: ditto. + * ext/syck/bytecode.c: ditto. + +Fri Aug 13 12:55:20 2004 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_range_header): + fix regex for range-spec. + + * lib/webrick/httpservlet/filehandler.rb + (WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content): + multipart/byteranges response was broken. + + * lib/xmlrpc/server.rb: refine example code. + +Thu Aug 12 10:54:17 2004 NAKAMURA Usaku + + * rubyio.h (rb_eof_error): should mark as NORETURN. + + * win32/win32.c (make_cmdvector): adjust escaped successive + double-quote handling. + +Thu Aug 12 01:53:10 2004 Tanaka Akira + + * io.c (read_buffered_data): extracted from rb_io_fread. + (io_readpartial): new method IO#readpartial. + [ruby-dev:24055] + +Wed Aug 11 17:17:50 2004 WATANABE Hirofumi + + * configure.in (RPATHFLAG): stop setting RPATHFLAG on Interix. + +Mon Aug 9 15:03:20 2004 GOTOU Yuuzou + + * lib/webrick/httpservlet/erbhandler.rb + (WEBrick::HTTPServlet::ERBHandler#do_GET): should select media type + by suffix of script filename. + +Mon Aug 9 12:51:43 2004 Dave Thomas + + * dir.c (dir_s_glob): Roll in Austin Ziegler's Dir.glob and + fnmatch updates. + +Mon Aug 9 06:33:06 2004 Minero Aoki + + * lib/fileutils.rb (cp_r): copies symlink to symlink, except + root entries of cp_r. + + * lib/fileutils.rb: new method FileUtils.copy_entry. + + * test/fileutils/test_fileutils.rb: more cp_r tests. + +Sun Aug 8 00:43:31 2004 why the lucky stiff + + * lib/implicit.c: added sexagecimal float#base60. + + * ext/syck/rubyext.c (yaml_org_handler): ditto. + + * lib/token.c: indentation absolutely ignored when processing flow + collections. plain scalars are trimmed if indentation follows in + an ambiguous flow collection. + +Sat Aug 7 03:08:21 2004 Yukihiro Matsumoto + + * process.c (proc_daemon): new method. should be modified for + platforms without /dev/null. + +Sat Aug 7 00:50:01 2004 Tanaka Akira + + * ext/zlib/zlib.c: Zlib::GzipReader#read(0) returns "" instead of nil. + +Wed Aug 4 13:26:00 2004 Yukihiro Matsumoto + + * marshal.c (r_bytes0): optimize out read(0). [ruby-talk:108276] + +Tue Aug 3 13:49:12 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/namespace.rb: bug fix + + * ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: add Tk::TreeCtrl.loupe + +Mon Aug 2 23:33:48 2004 Hirokazu Yamamoto + + * test/ruby/test_file.rb (test_fnmatch): added more tests. + +Mon Aug 2 18:04:21 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/msgcat.rb (set_translation): bug fix (fail to set + trans_str to the same as src_str when trans_str is not given.) + +Mon Aug 2 17:40:44 2004 Yukihiro Matsumoto + + * eval.c (blk_free): fixed serious memory leak. [ruby-dev:24013] + +Mon Aug 2 11:53:06 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::find_symbol): Fix infinite recursion + looking up some top level symbols (batsman) + +Mon Aug 2 11:48:29 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Allow '.'s in + variable names to support SWIG generated files (Hans Fugal) + +Sat Jul 31 23:08:00 2004 Yukihiro Matsumoto + + * eval.c (is_defined): stupid mistakes fixed. [ruby-dev:24006] + +Sat Jul 31 17:39:47 2004 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-expr-beg, ruby-parse-partial, + ruby-calculate-indent, ruby-move-to-block, ruby-forward-sexp, + ruby-backward-sexp): keywords must match word-wise. + +Sat Jul 31 13:37:51 2004 Yukihiro Matsumoto + + * eval.c (is_defined): avoid unnecessary method invocations. + +Sat Jul 31 05:35:37 2004 why the lucky stiff + + * lib/yaml/rubytypes.rb: exceptions were using an older + YAML.object_maker. [ruby-core:03080] + + * ext/syck/token.c (sycklex_yaml_utf8): using newline_len to + handline CR-LFs. "\000" was showing up on folded blocks which + stopped at EOF. + +Sat Jul 31 01:25:11 2004 Yukihiro Matsumoto + + * eval.c (is_defined): call is_defined() before invoking + rb_eval(). [ruby-talk:107867] + +Fri Jul 30 16:10:54 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (lib_fromUTF8_core): raise ArgumentError when + the unknown encoding name is given. + + * ext/tcltklib/tcltklib.c (lib_toUTF8_core): ditto. + + * ext/tk/lib/tk.rb (Tk::Encoding.encoding_convertfrom): bug fix. + + * ext/tk/lib/tk.rb (Tk::Encoding.encoding_convertto): ditto. + +Wed Jul 28 18:59:17 2004 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS + and CGI_COOKIES. they will no longer be used. + +Wed Jul 28 15:44:08 2004 Yukihiro Matsumoto + + * eval.c (rb_call0): should call rb_call_super() directly for + visibility overriding. [ruby-dev:23989] + +Wed Jul 28 01:04:44 2004 Yukihiro Matsumoto + + * env.h: remove argv from ruby_frame. + + * eval.c (rb_eval): no more copy on write. + + * eval.c (assign): ditto. + + * eval.c (rb_call0): can receive *rest by specifying negative + argc. (-1 means 0 arg and *rest, -2 means 1 arg and *rest...) + + * eval.c (rb_call0): properly set frame's argc counter. + + * gc.c (rb_gc_mark_frame): need not to mark frame's argv + + * gc.c (run_final): wrong order of data. [ruby-dev:23984] + +Tue Jul 27 07:05:04 2004 Yukihiro Matsumoto + + * eval.c (rb_eval): copy on write for argument local variable + assignment. + + * eval.c (assign): ditto. + + * eval.c (rb_call0): update ruby_frame->argv with the default + value used for the optional arguments. + + * object.c (Init_Object): "===" calls rb_obj_equal() directly. + [ruby-list:39937] + +Mon Jul 26 11:22:55 2004 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape): should + escape space. + +Sun Jul 25 10:56:28 2004 Hirokazu Yamamoto + + * win32/win32.{h,c} (rb_w32_{f,fd,fs}open): workaround for bcc32's + {f,fd,fs}open bug. set errno EMFILE and EBADF. [ruby-dev:23963] + + * test/drb/drbtest.rb: fix method duplication. + +Sat Jul 24 13:32:47 2004 Yukihiro Matsumoto + + * range.c (rb_range_beg_len): returns Qnil only when "beg" points + outside of a range. No boundary check for "end". + +Fri Jul 23 16:40:25 2004 Yukihiro Matsumoto + + * gc.c (define_final): should not disclose NODE* to Ruby world. + [ruby-dev:23957] + +Fri Jul 23 08:52:22 2004 Shugo Maeda + + * lib/net/imap.rb (disconnected?): new method. + +Thu Jul 22 16:41:54 2004 Yukihiro Matsumoto + + * lib/cgi/session.rb (CGI::Session::FileStore#update): sets the + permission of the session data file to 0600. + + * lib/cgi/session/pstore.rb (CGI::Session::Pstore#initialize): + ditto. + +Mon Jul 19 00:53:46 2004 GOTOU Yuuzou + + * lib/webrick/httpservlet/cgihandler.rb + (WEBrick::HTTPServlet::CGIhandler#do_GET): set SystemRoot environment + variable to CGI process on Windows native platforms. [ruby-dev:23936] + +Sun Jul 18 16:14:29 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/msgcat.rb (TkMsgCatalog.callback): bug fix + ( wrong number of argument ) + +Sun Jul 18 08:13:58 2004 Nobuyoshi Nakada + + * sprintf.c (rb_f_sprintf): remove extra sign digit. + +Sun Jul 18 03:19:14 2004 Akinori MUSHA + + * dir.c (bracket): use NULL instead of 0. + +Sun Jul 18 02:35:30 2004 Shugo Maeda + + * lib/net/imap.rb (receive_responses): return if a LOGOUT response + received. + +Sat Jul 17 23:59:01 2004 Shugo Maeda + + * lib/net/imap.rb (send_string_data): wait command continuation + requests before sending octet data of literals. + +Sat Jul 17 23:54:59 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/variable.rb: TkVariable#ref returns a TkVariable object + +Sat Jul 17 22:04:44 2004 akira yamada + + * lib/uri/ldap.rb: method hierarchical? should be in URI::LDAP. + +Sat Jul 17 18:29:07 2004 Nobuyoshi Nakada + + * parse.y (stmt): not to show same error messages twice. + +Sat Jul 17 14:18:11 2004 Yukihiro Matsumoto + + * string.c (rb_str_match_m): String#match should also take + optional argument. [ruby-core:03205] + + * re.c (rb_reg_match_m): add optional second argugment "pos" to + specify match start point. [ruby-core:03203] + +Sat Jul 17 13:13:32 2004 Yukihiro Matsumoto + + * lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do not + process expression interpolation. [ruby-talk:106691] + +Sat Jul 17 05:26:27 2004 Dave Thomas + + * lib/rdoc/diagram.rb: Incorporate Micheal Neumann's + client-side imagemao patch + +Sat Jul 17 01:57:03 2004 Yukihiro Matsumoto + + * eval.c (THREAD_ALLOC): th->thread should be initialized to NULL. + [ruby-talk:106657] The solution was found by Guy Decoux. + +Fri Jul 16 22:30:28 2004 Michael Neumann + + * file.c (rb_stat_dev_major): new methods File::Stat#dev_major and + #dev_minor. [ruby-core:03195] + +Fri Jul 16 11:17:38 2004 Nobuyoshi Nakada + + * error.c (exit_initialize): use EXIT_SUCCESS instead of 0. + [ruby-dev:23913] + + * error.c (exit_success_p): new method SystemExit#success?. + [ruby-dev:23912] + + * error.c (syserr_initialize): initialization for subclasses. + [ruby-dev:23912] + +Thu Jul 15 23:53:38 2004 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#warn, OptionParser#abort): Exception + no longer has to_str method. + +Thu Jul 15 22:59:48 2004 Shugo Maeda + + * ext/readline/extconf.rb: added dir_config for curses, ncurses, + termcap. + +Thu Jul 15 20:44:46 2004 Hirokazu Yamamoto + + * class.c: rdoc patch + +Thu Jul 15 14:12:34 2004 why the lucky stiff + + * lib/yaml.rb (YAML::load_file, YAML::parse_file): added. + + * ext/syck/token.c: re2c compiled with bit vectors now. + * ext/syck/implicit.c: ditto. + * ext/syck/bytecode.c: ditto. + +Thu Jul 15 10:15:04 2004 Hidetoshi NAGAI + + * ext/tk/, ext/tcltklib/: bug fix + + * ext/tk/lib/tk.rb: better operation for SIGINT when processing + callbacks. + * ext/tk/lib/tk/msgcat.rb: ditto. + * ext/tk/lib/tk/variable.rb: ditto. + * ext/tk/lib/tk/timer.rb: ditto. + + * ext/tk/lib/tk/validation.rb: add Tk::ValidateConfigure.__def_validcmd + to define validatecommand methods easier + + * ext/tk/lib/tk.rb (_genobj_for_tkwidget): support autoload Tk ext + classes + + * ext/tk/lib/tk/canvas.rb and so on: remove the parent widget type + check for items (e.g. canvas items; depends on the class) to + avoid some troubles on Tk extension widget class definition. + + * ext/tk/lib/tkextlib/: add Iwidget and TkTable extension support + + * ext/tk/sample/tkextlib/: add samples of Iwidget and TkTable + + +Wed Jul 14 23:49:30 2004 Yukihiro Matsumoto + + * enum.c (enum_min_by): new method Enum#min_by. added Enum#max_by + as well. + +Wed Jul 14 18:05:21 2004 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_asn1cons_to_der): fix type of + argument. [ruby-dev:23891] + + * test/openssl/test_x509store.rb: prune tests for CRL checking + unless X509::V_FLAG_CRL_CHECK is defined. + +Wed Jul 14 12:20:05 2004 Hirokazu Yamamoto + + * util.c (ruby_strtod): should not convert string in the form of + "-I.FE-X" which both "I" and "F" are ommitted. [ruby-dev:23883] + + * test/ruby/test_float.rb (test_strtod): add test for bug fix. + +Wed Jul 14 00:33:48 2004 Hirokazu Yamamoto + + * array.c: rdoc patch. merged patch from Johan Holmberg + [ruby-core:3170] + +Tue Jul 13 19:39:12 2004 akira yamada + + * lib/uri/generic.rb (URI::Generic#merge_path): + "URI('http://www.example.com/foo/..') + './'" should return + "URI('http://www.example.com/')". [ruby-list:39838] + "URI('http://www.example.com/') + './foo/bar/..'" should return + "URI('http://www.example.com/foo/')". [ruby-list:39844] + + * test/uri/test_generic.rb (TestGeneric#test_merge): added tests. + +Tue Jul 13 15:48:56 2004 Akinori MUSHA + + * lib/mkmf.rb (init_mkmf): Do not add $(libdir) to $LIBPATH in + extmk mode. + + * lib/mkmf.rb (dir_config): Prepend a new library path instead of + appending so it is tried first. + +Tue Jul 13 00:50:48 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb: Support call-seq: for Ruby files. + +Mon Jul 12 21:20:51 2004 Dave Thomas + + * html_generator.rb: Support hyperlinks of the form {any text}[xxx] + as well as stuff[xxx] + +Sat Jul 10 09:30:24 2004 NAKAMURA, Hiroshi + + * test/soap/marshal/test_struct.rb: use qualified built-in class name + (::Struct) to avoid name crash. + +Sat Jul 10 04:21:56 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: better operation for SIGINT when processing + callbacks. + * ext/tk/lib/tk/msgcat.rb: ditto. + * ext/tk/lib/tk/variable.rb: ditto. + * ext/tk/lib/tk/timer.rb: ditto. + + * ext/tk/lib/tk/validation.rb (__def_validcmd): add a module + function of Tk::ValidateConfigure to define validatecommand + methods easier + +Fri Jul 9 22:18:59 2004 Hirokazu Yamamoto + + * array.c, enum.c, pack.c: rdoc patch from Johan Holmberg + [ruby-core:3132] [ruby-core:3136] + + * numeric.c: rdoc patch. + +Fri Jul 9 19:26:39 2004 Tanaka Akira + + * lib/open-uri.rb (URI::HTTPS#proxy_open): raise ArgumentError to + notice https is not supported. + +Fri Jul 9 14:28:54 2004 Nobuyoshi Nakada + + * eval.c (rb_thread_raise): accept third argument as well as + Kernel#raise, and evaluate the arguments to create an exception in + the caller's context. [ruby-talk:105507] + +Fri Jul 9 01:47:08 2004 Hidetoshi NAGAI + + * ext/tk/lib: bug fix + * ext/tk/lib/tkextlib/itcl: add [incr Tcl] support + * ext/tk/lib/tkextlib/itk: add [incr Tk] support + * ext/tk/lib/tkextlib/iwidgets: midway point of [incr Widgets] support + * ext/tk/sample/tkextlib/iwidgets: very simple examples of + [incr Widgets] + +Thu Jul 8 19:27:16 2004 Nobuyoshi Nakada + + * configure.in (rb_cv_stack_end_address): detect stack end address + variable supplied by system. [ruby-core:03115] + + * gc.c (Init_stack): use system provided address if possible. + +Thu Jul 8 00:05:23 2004 akira yamada + + * lib/tempfile.rb (Tempfile::initialize): got out code of + generating tmpname. [ruby-dev:23832][ruby-dev:23837] + +Wed Jul 7 02:31:41 2004 Kouhei Sutou + + * lib/rss/{rss,parser,0.9,1.0,2.0}.rb: supported RSS 0.9x/2.0 + validation and validation which disregard order of elements. + * test/rss/test_parser.rb: added tests for RSS 0.9x/2.0 + validation. + * test/rss/{test_trackback,rss-testcase}.rb: fixed no good method + name. + +Wed Jul 7 00:48:34 2004 WATANABE Hirofumi + + * ext/tk/lib/tkextlib/tktrans.rb, + ext/tk/lib/tkextlib/treectrl.rb: fix syntax errors. + +Tue Jul 6 18:38:45 2004 Hidetoshi NAGAI + + * ext/tk/lib: improve framework of developping Tcl/Tk extension + wrappers + +Mon Jul 5 23:56:42 2004 Kouhei Sutou + + * lib/rss/{trackback,syndication,dublincore,content}.rb: worked + with ruby 1.6 again. + + * test/rss/rss-assertions.rb: ditto. + +Mon Jul 5 22:54:39 2004 Tanaka Akira + + * lib/uri/common.rb (Kernel#URI): new global method for parsing URIs. + +Mon Jul 5 09:02:52 2004 Nobuyoshi Nakada + + * eval.c (rb_thread_yield, rb_f_catch): 4th argument to rb_yield_0() + is a set of bit flags. [ruby-dev:23859] + +Mon Jul 5 01:20:17 2004 Hirokazu Yamamoto + + * lib/drb/drb.rb(DRbConn self.open): If socket pool is full, close + the socket whose last-access-time is oldest. (and add new one) + [ruby-dev:23860] + +Sun Jul 4 12:24:50 2004 Kouhei Sutou + + * lib/rss/rss.rb: added copyright header. + +Sat Jul 3 22:25:27 2004 NAKAMURA, Hiroshi + + * added files: + * lib/soap/header/* + * lib/soap/rpc/httpserver.rb + * lib/wsdl/soap/cgiStubCreator.rb + * lib/wsdl/soap/classDefCreator.rb + * lib/wsdl/soap/classDefCreatorSupport.rb + * lib/wsdl/soap/clientSkeltonCreator.rb + * lib/wsdl/soap/driverCreator.rb + * lib/wsdl/soap/mappingRegistryCreator.rb + * lib/wsdl/soap/methodDefCreator.rb + * lib/wsdl/soap/servantSkeltonCreator.rb + * lib/wsdl/soap/standaloneServerStubCreator.rb + * lib/wsdl/xmlSchema/enumeration.rb + * lib/wsdl/xmlSchema/simpleRestriction.rb + * lib/wsdl/xmlSchema/simpleType.rb + * lib/xsd/codegen/* + * lib/xsd/codegen.rb + * sample/soap/authheader/* + * sample/soap/raa2.4/* + * sample/soap/ssl/* + * sample/soap/swa/* + * sample/soap/whois.rb + * sample/wsdl/raa2.4/* + * test/soap/header/* + * test/soap/ssl/* + * test/soap/struct/* + * test/soap/swa/* + * test/soap/wsdlDriver/* + * test/wsdl/multiplefault.wsdl + * test/wsdl/simpletype/* + * test/wsdl/test_multiplefault.rb + + * modified files: + * lib/soap/baseData.rb + * lib/soap/element.rb + * lib/soap/generator.rb + * lib/soap/netHttpClient.rb + * lib/soap/parser.rb + * lib/soap/property.rb + * lib/soap/soap.rb + * lib/soap/streamHandler.rb + * lib/soap/wsdlDriver.rb + * lib/soap/encodingstyle/handler.rb + * lib/soap/encodingstyle/literalHandler.rb + * lib/soap/encodingstyle/soapHandler.rb + * lib/soap/mapping/factory.rb + * lib/soap/mapping/mapping.rb + * lib/soap/mapping/registry.rb + * lib/soap/mapping/rubytypeFactory.rb + * lib/soap/mapping/wsdlRegistry.rb + * lib/soap/rpc/cgistub.rb + * lib/soap/rpc/driver.rb + * lib/soap/rpc/proxy.rb + * lib/soap/rpc/router.rb + * lib/soap/rpc/soaplet.rb + * lib/soap/rpc/standaloneServer.rb + * lib/wsdl/data.rb + * lib/wsdl/definitions.rb + * lib/wsdl/operation.rb + * lib/wsdl/parser.rb + * lib/wsdl/soap/definitions.rb + * lib/wsdl/xmlSchema/complexContent.rb + * lib/wsdl/xmlSchema/complexType.rb + * lib/wsdl/xmlSchema/data.rb + * lib/wsdl/xmlSchema/parser.rb + * lib/wsdl/xmlSchema/schema.rb + * lib/xsd/datatypes.rb + * lib/xsd/qname.rb + * sample/soap/sampleStruct/server.rb + * sample/wsdl/amazon/AmazonSearch.rb + * sample/wsdl/amazon/AmazonSearchDriver.rb + * test/soap/test_property.rb + * test/soap/calc/test_calc_cgi.rb + * test/wsdl/test_emptycomplextype.rb + + * summary + * add SOAP Header mustUnderstand support. + + * add HTTP client SSL configuration and Cookies support (works + completely with http-access2). + + * add header handler for handling sending/receiving SOAP Header. + + * map Ruby's anonymous Struct to common SOAP Struct in SOAP Object + Model. it caused error. + + * add WSDL simpleType support to restrict lexical value space. + +Sat Jul 3 17:19:44 2004 WATANABE Hirofumi + + * ext/tk/lib/tkextlib/tkDND.rb: fix syntax error. + +Thu Jul 1 18:36:08 2004 Hidetoshi NAGAI + + * ext/tk/lib/tcltklib: bug fix + + * ext/tk/lib/tk: bug fix and add Tcl/Tk extension support libraries + +Thu Jul 1 18:31:31 2004 Nobuyoshi Nakada + + * lib/pstore.rb (PStore#transaction): get rid of opening in write mode + when read only transaction. [ruby-dev:23842] + +Thu Jul 1 00:44:42 2004 GOTOU Yuuzou + + * ext/openssl/ossl_cipher.c (ossl_cipher_encrypt, ossl_cipher_decrypt): + re-implemnt (the arguments for this method is ). + + * ext/openssl/ossl_cipher.c (ossl_cipher_pkcs5_keyivgen): new method + OpenSSL::Cipher::Cipher#pkcs5_keyivgen. it calls EVP_BytesToKey(). + + * ext/openssl/ossl_cipher.c (ossl_cipher_set_key_length): new method + OpenSSL::Cipher::Cipher#key_len=. + +Wed Jun 30 19:48:09 2004 GOTOU Yuuzou + + * ext/openssl/extconf.rb: check for EVP_CIPHER_CTX_copy, ENGINE_add, + EVP_CIPHER_CTX_set_padding, EVP_CipherFinal_ex, EVP_CipherInit_ex, + EVP_DigestFinal_ex and EVP_DigestInit_ex. + + * ext/openssl/openssl_missing.c (EVP_CIPHER_CTX_copy): new function. + + * ext/openssl/openssl_missing.h (EVP_DigestInit_ex, EVP_DigestFinal_ex, + EVP_CipherInit_ex, EVP_CipherFinal_ex, HMAC_Init_ex): new macro for + OpenSSL 0.9.6. + + * ext/openssl/ossl_cipher.c (ossl_cipher_alloc, ossl_cipher_initialize, + ossl_cipher_copy, ossl_cipher_reset, ossl_cipher_encrypt, + ossl_cipher_decrypt, ossl_cipher_final, ossl_cipher_set_key, + ossl_cipher_set_iv): replace all EVP_CipherInit and + EVP_CipherFinal into EVP_CipherInit_ex and EVP_CipherFinal_ex. + and EVP_CIPHER_CTX_init should only be called once. + + * ext/openssl/ossl_cipher.c (ossl_cipher_set_padding): check for + EVP_CIPHER_CTX_set_padding. + + * ext/openssl/ossl_cipher.c (Init_ossl_cipher): Cipher#<< is deprecated. + + * ext/openssl/ossl_digest.c: replace all EVP_DigestInit and + EVP_DigestFinal into EVP_DigestInit_ex and EVP_DigestFinal_ex. + and EVP_MD_CTX_init should only be called once. + + * ext/openssl/ossl_digest.c (digest_final): should call + EVP_MD_CTX_cleanup to avoid memory leak. + + * ext/openssl/ossl_hmac.c (ossl_hmac_initialize): repalce HMAC_init + into HMAC_init_ex. and HMAC_CTX_init is moved to ossl_hmac_alloc. + + * ext/openssl/ossl_hmac.c (hmac_final): should call + HMAC_CTX_cleanup to avoid memory leak. + + * test/openssl/test_cipher.rb, test/openssl/test_digest.rb, + test/openssl/test_hmac.rb: new file. + +Wed Jun 30 16:59:39 2004 Hirokazu Yamamoto + + * test/ruby/test_file.rb (test_fnmatch): some tests for File.fnmatch + are added. + +Wed Jun 30 11:38:51 2004 Mikael Brockman + + * parse.y (primary): should not be NULL. [ruby-core:03098] + +Wed Jun 30 02:41:10 2004 why the lucky stiff + + * ext/syck/rubyext.c (syck_emitter_new): set buffer after + Data_Wrap_Struct to avoid possible GC. [ruby-talk:104835] + +Tue Jun 29 10:31:19 2004 Nobuyoshi Nakada + + * eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level. + + * gc.c (define_final, run_final): preserve and restore safe level for + finalizers. [ruby-core:03058] + + * signal.c (signal_exec, rb_trap_exit, trap): preserve and restore + safe level for signal handlers. [ruby-dev:23829] + +Mon Jun 28 14:57:56 2004 Jeff Mitchell + + * configure.in, lib/mkmf.rb (LIBPATHFLAG): use double quotes due to + DOSISH compilers. [ruby-core:03107] + +Mon Jun 28 00:35:29 2004 Masatoshi SEKI + + * sample/drb/*.rb: using 'DRb.thread.join' instead of 'gets' + +Sun Jun 27 22:36:47 2004 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki. + +Sat Jun 26 15:17:11 2004 Nobuyoshi Nakada + + * variable.c (rb_mod_class_variables): class variables are no longer + inherited. [ruby-dev:23808] + +Sat Jun 26 11:07:20 2004 Nobuyoshi Nakada + + * configure.in (aix): -b must come at the start of the command line, + and -e must not appear while testing libraries. [ruby-talk:104501] + + * lib/mkmf.rb (find_header, dir_config): quote directory names if + necessary. [ruby-talk:104505] + +Sat Jun 26 00:13:08 2004 Nobuyoshi Nakada + + * io.c (rb_fopen, rb_fdopen, rb_io_reopen): setvbuf() may return + positive value on failure. [ruby-dev:23792] + +Fri Jun 25 18:07:15 2004 Michal Rokos + + * gc.c: bring back _stklen for DJGPP [ruby-core:3084] + +Fri Jun 25 15:33:01 2004 Nobuyoshi Nakada + + * ext/iconv/extconf.rb: check stricter. [ruby-talk:104501] + +Fri Jun 25 01:58:01 2004 NAKAMURA Usaku + + * {bcc32,win32,wince}/setup.mak: remove RUBY_EXTERN lines when + including version.h. [ruby-talk:104456] + +Thu Jun 24 14:23:29 2004 Nobuyoshi Nakada + + * io.c (rb_io_fread): return already read data when system call is + interrupted. [ruby-talk:97206] + +Thu Jun 24 01:25:21 2004 Shugo Maeda + + * version.h: added declarations of ruby_version, + ruby_release_date, ruby_platform. + +Thu Jun 24 01:07:15 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname() + should give us packed address, not struct sockaddr. + [ruby-core:03053] + +Wed Jun 23 22:19:10 2004 Dave Thomas + + * ext/socket/socket.c (sock_s_gethostbyaddr): Work around problem + with OS X not returning 'from' parameter to recvfrom for + connection-oriented sockets. + +Wed Jun 23 22:16:16 2004 Michal Rokos + + * io.c: io_seek()'s retval should be checked [ruby-core:03045] + +Wed Jun 23 21:48:27 2004 Michal Rokos + + * time.c: Fix indentation. + + * main.c: Remove _stklen, and _CRT_glob. Move _stacksize for + __human68k__ to gc.c where the others are. + + * gc.c: put _stacksize in place and clean the #ifdefs macros. + +Wed Jun 23 17:37:54 2004 Shugo Maeda + + * lib/net/imap.rb: added new option --ssl. + +Wed Jun 23 01:45:27 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_quotation): + Fix problem with the 'r' being dropped from %r{xxx} + +Wed Jun 23 00:10:17 2004 Hirokazu Yamamoto + + * ext/win32ole/win32ole.c (ole_hresult2msg): remove trailing + CRs and LFs. (doesn't depend on CR+LF) [ruby-dev:23749] + +Wed Jun 23 00:00:25 2004 Nobuyoshi Nakada + + * eval.c (return_jump, break_jump): raise unexpected local jump + exception directly. [ruby-dev:23740] + + * io.c (rb_io_initialize): should check fcntl result. [ruby-dev:23742] + +Tue Jun 22 23:35:43 2004 NAKAMURA Usaku + + * sprintf.c (rb_f_sprintf): support FZERO and FSPACE with NaN/Inf. + + * test/ruby/test_sprintf.rb (test_nan, test_inf): add tests. + +Tue Jun 22 21:11:36 2004 Masaki Suketa + + * ext/win32ole/win32ole.c (OLE_FREE): should not call CoFreeUnuse- + dLibraries(). + + * ext/win32ole/win32ole.c (ole_event_free): ditto. + + * ext/win32ole/win32ole.c (ole_hresult2msg): truncate error message + before CR. + +Tue Jun 22 19:24:59 2004 NAKAMURA Usaku + + * sprintf.c (rb_f_sprintf): unify output of NaN, Inf and -Inf with + "%f" or etc on all platform. [ruby-dev:23704], [ruby-dev:23747] + +Tue Jun 22 15:28:12 2004 Michal Rokos + + * compar.c: Remove explicit NIL_P() checks since rb_cmpint() does it + again in the exactly same manner. + +Tue Jun 22 01:32:40 2004 GOTOU Yuuzou + + * ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize): should create + empty pkey object if no argument is passed. [ruby-talk:103328] + + * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize): ditto. + + * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize): ditto. + + * ext/openssl/ossl_pkey_dh.c: add new methods: OpenSSL::PKey::DH#p, + OpenSSL::PKey::DH#p=, OpenSSL::PKey::DH#g, OpenSSL::PKey::DH#g=, + OpenSSL::PKey::DH#pub_key, OpenSSL::PKey::DH#pub_key=, + OpenSSL::PKey::DH#priv_key and OpenSSL::PKey::DH#priv_key=. + + * ext/openssl/ossl_pkey_dsa.c: add new methods: OpenSSL::PKey::DSA#p, + OpenSSL::PKey::DSA#p=, OpenSSL::PKey::DSA#q, OpenSSL::PKey::DSA#q=, + OpenSSL::PKey::DSA#g, OpenSSL::PKey::DSA#g=, + OpenSSL::PKey::DSA#pub_key, OpenSSL::PKey::DSA#pub_key=, + OpenSSL::PKey::DSA#priv_key and OpenSSL::PKey::DSA#priv_key=. + +Mon Jun 21 09:24:51 2004 NAKAMURA Usaku + + * win32/win32.c (rb_w32_opendir): should set errno if error occurs + when calling OS API. + +Sun Jun 20 21:12:54 2004 Shugo Maeda + + * lib/net/ftp.rb (binary=): send TYPE commands only once. + +Sat Jun 19 13:27:01 2004 Nobuyoshi Nakada + + * eval.c (method_call): allow changing $SAFE. [ruby-dev:23713] + + * eval.c (proc_set_safe_level, proc_invoke, rb_mod_define_method): not + set $SAFE for methods defined from Proc. [ruby-dev:23697] + +Sat Jun 19 01:10:12 2004 Kouhei Sutou + + * sample/rss/tdiary_plugin/rss-recent.rb: added more information. + +Fri Jun 18 23:12:22 2004 Nobuyoshi Nakada + + * eval.c (proc_save_safe_level, rb_set_safe_level, safe_setter): limit + safe level. + +Wed Jun 16 23:05:57 2004 Yukihiro Matsumoto + + * object.c (rb_mod_freeze): prepare string representation before + freezing. [ruby-talk:103646] + +Wed Jun 16 19:57:24 2004 Michal Rokos + + * test/ruby/test_array.rb: extend testcase to check #first, #last, + #shift, #unshift, #pop, #push + +Wed Jun 16 16:05:17 2004 Nobuyoshi Nakada + + * array.c (ary_new): move alloc behind checks. [ruby-core:02982] + + * array.c (rb_ary_pop_m, rb_ary_shift_m): take arg to behave as push + and unshift. + + * array.c (rb_ary_first, rb_ary_last): make shared array for result + array, and correct doc for Array#first(n) and Array#last(n) + + * array.c (rb_ary_select): not accept any arg. + +Wed Jun 16 16:03:59 2004 Nobuyoshi Nakada + + * object.c (rb_class_inherited_p): singleton class inherits Class + rather than its object's class. [ruby-dev:23690] + +Wed Jun 16 16:01:17 2004 Nobuyoshi Nakada + + * gc.c (stack_grow_direction): memoize the direction. + + * gc.c (Init_stack): should always move to end of VALUE. + +Tue Jun 15 12:10:04 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix (TkWindow#grab) + +Mon Jun 14 18:23:27 2004 Hidetoshi NAGAI + + * ext/tk/lib/remote-tk.rb: bug fix + +Sun Jun 13 00:23:04 2004 Hidetoshi NAGAI + + * ext/tcltklib/extconf.rb: [EXPERIMENTAL] MacOS X (darwin) support + + * ext/tcltklib/tcltklib.c: fix thread trouble on callback proc, and + eliminate warning about instance variable access + + * ext/tk/lib/tk/menubar.rb: improve supported menu_spec + + * ext/tk/lib/tk/menuspec.rb: [add] menu_spec support library + + * ext/tk/lib/tk/root.rb: add menu_spec support + + * ext/tk/lib/tk/text.rb: bug fix + + * ext/tk/lib/tk/toplevel.rb: add menu_spec support + + * ext/tk/sample/menubar?.rb: [add] sample of menu_spec usage + +Sat Jun 12 14:15:20 2004 Hirokazu Yamamoto + + * dir.c: RDOC for File::FNM_CASEFOLD was missed. + +Sat Jun 12 11:15:53 2004 WATANABE Hirofumi + + * configure.in (target_os): strip -gnu suffix on Linux. + +Fri Jun 11 22:08:50 2004 Yukihiro Matsumoto + + * array.c: remove #indexes, #indices. + + * hash.c: ditto. + + * ext/dbm/dbm.c: remove #indexes, #indices, "values_at" warning + from #select. + + * ext/gdbm/gdbm.c: ditto. + + * ext/sdbm/init.c: ditto. + + * ext/dbm/dbm.c (Init_dbm): set VERSION constant as "unknown" when + DB_VERSION_STRING is not available. + +Thu Jun 10 19:19:41 2004 Yukihiro Matsumoto + + * ext/sdbm/init.c (fsdbm_store): sdbm should use StringValue(). + [ruby-talk:103062] + +Wed Jun 9 16:09:01 2004 akira yamada + + * lib/uri/generic.rb (URI::Generic::merge, + URI::Generic::route_from): accepts non-hierarchical URI. + [ruby-dev:23631] + + * test/uri/test_generic.rb (TestGeneric::test_route, + TestGeneric::test_merge): added tests for above changes. + +Wed Jun 9 15:39:55 2004 Akinori MUSHA + + * configure.in: Add support for DragonFly BSD. + +Wed Jun 9 15:07:06 2004 Akinori MUSHA + + * config.guess, config.sub: Update to a more recent version as of + 2004-01-20. + +Wed Jun 9 11:20:05 2004 NAKAMURA Usaku + + * win32/win32.c: remove unused functions and variables. + +Wed Jun 2 20:16:03 2004 Nobuyoshi Nakada + + * string.c (str_new4): should share shared instance if it already + exists. [ruby-dev:23665] + +Wed Jun 2 12:41:53 2004 Yukihiro Matsumoto + + * io.c (rb_io_gets_m): set lastline ($_) even when read line is + nil. [ruby-dev:23663] + +Fri May 28 11:20:31 2004 Nobuyoshi Nakada + + * eval.c (rb_eval): bad influence on frame node. + + * eval.c (eval): reverted wrongly removed condition. [ruby-dev:23638] + +Thu May 27 21:37:50 2004 Tanaka Akira + + * lib/pathname.rb (Pathname#initialize): fix pathname initialization + by pathname. + +Thu May 27 20:02:09 2004 Hirokazu Yamamoto + + * io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648] + +Thu May 27 15:54:02 2004 Shugo Maeda + + * lib/net/ftp.rb (MDTM_REGEXP): fix for demon's ftp server. + Thanks, Rutger Nijlunsing. + +Thu May 27 14:53:13 2004 WATANABE Hirofumi + + * io.c (rb_io_fwrite): workaround for bcc32's fwrite bug. + add errno checking. [ruby-dev:23627] + + * io.c (rb_io_fwrite): should check if errno == ENOENT, too. + +Thu May 27 11:25:03 2004 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: illegal require module name (../lib/csv.rb). + +Wed May 26 23:12:13 2004 NAKAMURA, Hiroshi + + * lib/csv.rb (CSV.read, CSV.readlines): added. works as IO.read and + IO.readlines in CSV format. + + * lib/csv.rb (CSV.parse): [CAUTION] behavior changed. in the past, + CSV.parse accepts a filename to be read-opened (it was just a + shortcut of CSV.open(filename, 'r')). now CSV.parse accepts a + string or a stream to be parsed e.g. + CSV.parse("1,2\n3,r") #=> [['1', '2'], ['3', '4']] + + * test/csv/test_csv.rb: follow above changes. + +Wed May 26 14:19:42 2004 Nobuyoshi Nakada + + * eval.c (rb_eval, eval): make line number consistent on eval with + Proc. [ruby-talk:101253] + +Wed May 26 13:59:17 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::skip_for_variable): Allow for + 'do' after for statement + +Wed May 26 13:56:03 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb (Generators::MarkUp::style_url): Fix + relative path to code CSS file + +Wed May 26 13:14:52 2004 Nobuyoshi Nakada + + * io.c (rb_io_init_copy): copy also positions. [ruby-talk:100910] + +Wed May 26 00:00:00 2004 why the lucky stiff + + * ext/syck/syck.c (syck_new_parser): clear parser on init. + thanks, ts. [ruby-core:02931] + + * ext/syck/token.c (sycklex_yaml_utf8): buffer underflow. + thanks, ts. [ruby-core:02929] + + * lib/yaml/baseemitter.rb (indent_text): simpler flow block code. + +Tue May 25 11:54:13 2004 Nobuyoshi Nakada + + * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a block + to a Proc. [ruby-dev:23533] + + * parse.y (block_par, block_var): ditto. + +Tue May 25 01:50:17 2004 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_i2d_ASN1_TYPE, ossl_ASN1_TYPE_free): + workaround for the versions earlier than OpenSSL-0.9.7. + +Mon May 24 10:46:26 2004 Kazuhiro NISHIYAMA + + * lib/rdoc/generators/template/html/html.rb: SYSTEM identifiers + must be absolute URIs + +Sun May 23 04:53:50 2004 Kazuhiro NISHIYAMA + + * lib/pstore.rb (transaction): allow overriding dump and load. + [ruby-dev:23567] + + * lib/yaml/store.rb: follow lib/pstore.rb's change. + +Sat May 22 11:54:10 2004 Nobuyoshi Nakada + + * MANIFEST: add test/openssl/test_x509store.rb. + + * ext/tk/MANIFEST: add recent files. + +Sat May 22 05:37:11 2004 Hidetoshi NAGAI + + * ext/tk/lib/remote-tk.rb: (NEW library) controll Tk interpreters + on the other processes by Tcl/Tk's 'send' command + +Fri May 21 09:22:05 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_parameters): + Add ()'s around parameters that don't have them + +Fri May 21 02:21:11 2004 NAKAMURA, Hiroshi + + * lib/csv.rb: fixed a few bugs around multi char record/field separator. + + * test/csv/test_csv.rb: added boundary test for above feature. + +Thu May 20 17:02:03 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (check_sizeof): define result size. [ruby-core:02911] + + * lib/mkmf.rb (create_header): macro name should not include equal + sign. + +Thu May 20 14:35:52 2004 Tanaka Akira + + * ext/socket/socket.c: check SCM_RIGHTS macro addition to + the msg_control field to test existence of file descriptor passing + by msg_control. + +Thu May 20 12:38:06 2004 Yukihiro Matsumoto + + * numeric.c (flo_eq): always check if operands are NaN. + [ruby-list:39685] + +Thu May 20 12:34:39 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_visibility): + At Ryan Davis' suggestion, honor visibility modifers if guarded by a + statement modifier + +Thu May 20 12:22:13 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (have_type): do not check pointer to incomplete type, + which always get compiled. + [ruby-list:39683] + +Wed May 19 23:45:43 2004 Nobuyoshi Nakada + + * test/inlinetest.rb (InlineTest::loadtest): requiring library with + replaced $0 can make $0 == __FILE__ block be evaluated twice. + + * test/ruby/envutil.rb (EnvUtil::rubybin): give priority to + environment variable. [ruby-dev:23538] + +Wed May 19 11:08:10 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: change permition of TkObject#tk_send from + private to public + +Wed May 19 02:29:36 2004 Minero Aoki + + * lib/net/http.rb: support TRACE. + +Wed May 19 02:21:53 2004 Minero Aoki + + * lib/net/http.rb: do not use class variables. + +Tue May 18 21:21:43 2004 NAKAMURA, Hiroshi + + * lib/csv.rb: writes lines with "\n" when row separator is not given. + formerly it was "\r\n". + + * lib/csv.rb: [CAUTION] API change + + * CSV::Row removed. a row is represented as just an Array. since + CSV::Row was a subclass of Array, it won't hurt almost all programs + except one which depended CSV::Row#match. + + * CSV::Cell removed. a cell is represented as just a String or + nil(NULL). this change will cause widespread destruction. + + CSV.open("foo.csv", "r") do |row| + row.each do |cell| + if cell.is_null # Cell#is_null + p "(NULL)" + else + p cell.data # Cell#data + end + end + end + + must be just; + + CSV.open("foo.csv", "r") do |row| + row.each do |cell| + if cell.nil? + p "(NULL)" + else + p cell + end + end + end + + * lib/csv.rb: [CAUTION] record separator(CR, LF, CR+LF) behavior + change. CSV.open, CSV.parse, and CSV,generate now do not force + opened file binmode. formerly it set binmode explicitly. + + with CSV.open, binmode of opened file depends the given mode + parameter "r", "w", "rb", and "wb". CSV.parse and CSV.generate open + file with "r" and "w". + + setting mode properly is user's responsibility now. + + * lib/csv.rb: accepts String as a fs (field separator/column separator) + and rs (record separator/row separator) + + * lib/csv.rb: added CSV.foreach(path, rs = nil, &block). CSV.foreach + now does not handle "| cmd" as a path different from IO.foreach. + needed? + + * test/csv/test_csv.rb: updated. + +Tue May 18 14:24:20 2004 why the lucky stiff + + * lib/yaml.rb: added rdoc to beginning of lib. + +Tue May 18 14:00:46 2004 Nobuyoshi Nakada + + * node.h (NEW_DSTR): adjust list length. + + * parse.y (literal_concat): ditto. + +Tue May 18 09:30:25 2004 SASADA Koichi + + * eval.c (rb_method_node): search cache entry first. + +Mon May 17 16:04:06 2004 Hirokazu Yamamoto + + * numeric.c (flo_to_s): it's preferable that "p 0.0" outputs "0.0" + instead of "0.0e+00". [ruby-dev:23480] + + * numeric.c (flo_to_s): it's preferable that "p 0.00000000000000000001" + outputs "1.0e-20" instead of "9.999999999999999e-21". (the precision + is considered, but there is assumption DBL_DIG == 15 in current + implementation) + +Mon May 17 10:13:33 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (setup_domain_and_type): honor duck typing. + [ruby-dev:23522] + + * ext/socket/socket.c (sock_s_getnameinfo): ditto. + +Mon May 17 00:36:21 2004 why the lucky stiff + + * lib/yaml/baseemitter.rb (indent_text): was forcing a mod value + of zero at times, which kept some blocks from getting indentation. + +Mon May 17 00:07:00 2004 Gavin Sinclair + + * lib/drb/drb.rb: Cosmetic documentation changes. + +Sun May 16 20:55:49 2004 Tanaka Akira + + * ext/dbm/dbm.c (fdbm_initialize): accept optional 3rd argument to + specify an open flag. + (Init_dbm): define open flags: DBM::READER, DBM::WRITER, DBM::WRCREAT + and DBM::NEWDB. + +Sat May 15 17:52:24 2004 Hirokazu Yamamoto + + * test/ruby/test_float.rb(test_strtod): Add test for signed 0.000...1 + +Sat May 15 14:20:13 2004 WATANABE Hirofumi + + * ext/syck/depend: add ruby's headers. + +Sat May 15 13:38:33 2004 Nobuyoshi Nakada + + * ext/syck/MANIFEST, ext/syck/depend: new file. + + * lib/yaml/rubytypes.rb: range of exponential floats. [ruby-core:02824] + + * test/yaml/test_yaml.rb: tests for strings start with colon and some + round trip. + +Sat May 15 12:04:58 2004 why the lucky stiff + + * lib/yaml.rb: removed fallback to pure Ruby parser. + + * lib/yaml/baseemitter.rb (node_text): rewriting folded scalars. + + * ext/syck/syck.h: reports style of scalars now, be they plain, block + single-, or double-quoted. + + * ext/syck/syck.c: ditto. + + * ext/syck/gram.c: ditto. + + * ext/syck/node.c: ditto. + + * ext/syck/token.c: ditto. + + * ext/syck/rubyext.c (yaml_org_handler): symbols loaded only + if scalar style is plain. + + * test/yaml/test_yaml.rb (test_perl_regexp): updated test to + match new regexp serialization. + +Sat May 15 01:41:34 2004 Yukihiro Matsumoto + + * eval.c (eval): forgot to restore $SAFE value before evaluating + compiled node. [ruby-core:02872] + +Sat May 15 01:33:12 2004 Yukihiro Matsumoto + + * range.c (range_each_func): terminates loop if generating value + is same to @end. [ruby-talk:100269] + +Fri May 14 22:08:38 2004 Yukihiro Matsumoto + + * string.c (rb_str_new4): should not reuse frozen shared string if + the original is not an instance of String. [ruby-talk:100193] + +Fri May 14 21:29:26 2004 Yukihiro Matsumoto + + * time.c (time_mdump): preserve GMT bit in the marshal data. + [ruby-talk:100213] + +Fri May 14 18:37:49 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/canvas.rb: improve coords support for canvas + items. Now, supports all of the followings. + TkcLine.new(c, 0, 0, 100, 100, :fill=>'red') + TkcLine.new(c, [0, 0, 100, 100], :fill=>'red') + TkcLine.new(c, [0, 0], [100, 100], :fill=>'red') + TkcLine.new(c, [[0, 0], [100, 100]], :fill=>'red') + TkcLine.new(c, :coords=>[0, 0, 100, 100], :fill=>'red') + TkcLine.new(c, :coords=>[[0, 0], [100, 100]], :fill=>'red') + +Fri May 14 13:30:39 2004 Hirokazu Yamamoto + + * test/ruby/test_float.rb: Add test for util.c revision 1.42. + +Fri May 14 12:13:46 2004 Hirokazu Yamamoto + + * util.c (ruby_strtod): strtod("0", &end); => end should point '\0'. + [ruby-dev:23498] + +Thu May 13 15:47:30 2004 akira yamada + + * lib/net/telnet.rb (Net::Telnet::login): "options" can specify + regexps for login prompt and/or password prompt. + +Thu May 13 14:17:57 2004 why the lucky stiff + + * ext/syck/rubyext.c (yaml_org_handler): some empty strings were + loaded as symbols. + +Thu May 13 11:04:08 2004 Nobuyoshi Nakada + + * pack.c (pack_pack): always add with null for 'Z'. + + * pack.c (pack_unpack): terminated by null for 'Z'. [ruby-talk:98281] + +Wed May 12 19:59:43 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (have_type, check_sizeof): replace unusable characters. + [ruby-talk:99788] + +Wed May 12 17:41:42 2004 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Config): make it configurable without + external file such as /etc/resolv.conf. + +Wed May 12 14:37:27 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c: attribute value of DC (short name of + domainComponent) should be IA5String. + +Wed May 12 13:20:19 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk/composite.rb: improve configure methods (based on + the proposal of [ruby-talk:99671]). + +Wed May 12 11:51:08 2004 Dave Thomas + + * class.c (rb_obj_singleton_methods): fix rdoc + +Tue May 11 07:09:42 2004 Yukihiro Matsumoto + + * eval.c (is_defined): do not protect exception during receiver + evaluation. + +Mon May 10 22:28:14 2004 Minero Aoki + + * lib/net/protocol.rb (each_crlf_line): remove junk line. + +Mon May 10 21:44:42 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Change scheme for + looking up symbols in HTML generator. + +Mon May 10 16:45:21 2004 Yukihiro Matsumoto + + * eval.c (eval): warning during eval should not cause deadlock. + [ruby-talk:98651] + + * eval.c (rb_eval): raise TypeError exception for superclass + mismatch. [ruby-list:39567] + +Mon May 10 12:11:37 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Hack to search parents + for unqualified constant names. + +Mon May 10 01:18:15 2004 Minero Aoki + + * lib/net/pop.rb (logging): append "\n". + +Sun May 9 23:38:00 2004 Gavin Sinclair + + * lib/net/ftp.rb: ported documentation improvement from 1.8 branch + + * lib/net/imap.rb: ditto + + * lib/net/pop.rb: ditto + + * lib/net/smtp.rb: ditto + + * lib/net/telnet.rb: ditto + +Sun May 9 23:34:51 2004 NAKAMURA, Hiroshi + + * test/ruby/test_float.rb: added test_strtod to test Float("0"). + +Sun May 9 13:24:24 2004 WATANABE Hirofumi + + * lib/yaml/store.rb: use FileUtils::copy. + +Sun May 9 12:34:26 2004 Kazuo Saito + + * regex.c: removed unused file. + +Sat May 8 10:53:30 2004 Yukihiro Matsumoto + + * io.c (rb_f_open): open should not ignore block when "to_open" + method is used. [ruby-dev:23478] + +Fri May 7 22:07:39 2004 Minero Aoki + + * lib/fileutils.rb (mv): new option `force'. [ruby-talk:99457] + + * lib/fileutils.rb: new method for command option reflection: + FileUtils.commands, .options, .have_option?, .options_of, + .collect_methods. + + * lib/fileutils.rb: module Verbose, NoWrite, DryRun do not have + option flags @fileutils_verbose and @fileutils_noop, they make no + sense. + +Fri May 7 21:50:21 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::parse_include): Allow + multiple arguments to 'include' + +Fri May 7 21:03:51 2004 Minero Aoki + + * lib/fileutils.rb (fu_list): Array() breaks pathes including "\n". + [ruby-core:02843] + + * test/fileutils/test_fileutils.rb (mkdir): test "\n" in path. + +Fri May 7 20:53:25 2004 Yukihiro Matsumoto + + * ext/dbm/dbm.c (fdbm_modify): typo fixed. [ruby-dev:23473] + +Fri May 7 11:17:27 2004 Hirokazu Yamamoto + + * util.c (ruby_strtod): "0.0000000000000000001" should be converted + to 1.0e-19 instead of 0.0. (leading zeros aren't significant digits) + [ruby-talk:99318] [ruby-dev:23465] + +Thu May 6 22:27:32 2004 Masatoshi SEKI + + * ext/socket/socket.c (ippaddr): use NUMERICHOST if can not resolve + hostname. + +Thu May 6 22:09:29 2004 Hidetoshi NAGAI + + * ext/tk/tkutil.c (get_eval_string_core): bug fix. [ruby-dev:23466] + +Thu May 6 14:22:29 2004 why the lucky stiff + + * lib/yaml/rubytypes.rb (to_yaml): added instance variable handling + for Ranges, Strings, Structs, Regexps. + + * lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a + String's flow style. + + * lib/yaml.rb (YAML::object_maker): now uses Object.allocate. + + * ext/syck/gram.c: fixed transfer methods on structs, broke it + last commit. + +Thu May 6 14:38:02 2004 Hirokazu Yamamoto + + * dir.c (rb_push_glob): simplified code (not change behavior) + +Thu May 6 13:32:44 2004 Nobuyoshi Nakada + + * ext/extmk.rb: get rid of side effect of Config.expand, patched by + (ruby-bugs:PR#597) + +Thu May 6 11:40:28 2004 Shugo Maeda + + * lib/net/imap.rb (string): accept NIL. + + * lib/net/imap.rb (body_type_basic): allow body-fields omissions. + +Thu May 6 01:59:04 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb (Generators::HtmlMethod::params): + Don't include the &block parameter if we have explicit + yield parameters. + +Wed May 5 03:52:31 2004 Masatoshi SEKI + + * lib/rinda/ring.rb: use recv instead of recvfrom. + +Wed May 5 00:38:00 2004 Gavin Sinclair + + * lib/gserver.rb: documented + * lib/xmlrpc/README.txt: introduced for documentation purposes + +Mon May 3 09:47:24 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_or_yield_parameters): + Fix parsing bug if yield called within 1 line block + +Sun May 2 21:56:48 2004 Minero Aoki + + * test/fileutils/test_fileutils.rb (rm_f, rm_r): test :force flag. + +Sun May 2 01:04:38 2004 Hidetoshi NAGAI + + * ext/tcltklib, ext/tk: renewal Ruby/Tk + +Fri Apr 30 20:08:41 2004 WATANABE Hirofumi + + * time.c (SIZEOF_TIME_T): support SIZEOF_TIME_T == SIZEOF_INT. + +Wed Apr 28 01:26:11 2004 Kazuo Saito + + * oniguruma.h, regparse.c: imported Oni Guruma 2.2.8. + +Wed Apr 28 01:16:23 2004 Kazuo Saito + + * oniguruma.h, regparse.c: imported Oni Guruma 2.2.7. + +Tue Apr 27 14:43:32 2004 Nobuyoshi Nakada + + * common.mk: LIBURUBY_A is needed for extconf.rb even when + cross-compiling. + +Tue Apr 27 13:33:50 2004 Yukihiro Matsumoto + + * parse.y (string_content): turn off NODE_NEWLINE flag to avoid + unnecessary line trace for inlined expression. + (ruby-bugs PR#1320) + +Tue Apr 27 08:15:13 2004 why the lucky stiff + + * lib/yaml/rubytypes.rb: passing Range tests. + + * ext/syck/syck.h: version 0.44. + + * ext/syck/gram.c: transfers no longer open an indentation. + fixed transfers which precede blocks. + + * ext/syck/token.c: ditto. + + * ext/syck/syck.c: fixed segfault if an anchor has been released already. + + * ext/syck/node.c (syck_free_members): organized order of free'd nodes. + + * ext/syck/rubyext.c (syck_emitter_write_m): test for proper string with + StringValue. + +Mon Apr 26 23:56:54 2004 Daniel Kelley + + * README.EXT, README.EXT.ja: fixed wrong function signature. + [ruby-talk:98349] + +Mon Apr 26 21:40:09 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::add_alias): Only alias + to instance methods. + +Sun Apr 25 18:26:23 2004 WATANABE Hirofumi + + * configure.in (ac_cv_func_fork): set to no on DJGPP. + +Sat Apr 24 14:32:03 2004 Kazuo Saito + + * re.c: applied stack error handling patch. [ruby-dev:23431] + +Sat Apr 24 10:38:31 2004 Dave Thomas + + * lib/rdoc/markup/simple_markup.rb (SM::SimpleMarkup::group_lines): + Fix bug where consecutive headings are merged. + +Fri Apr 23 23:24:47 2004 Nobuyoshi Nakada + + * lib/mkmf.rb: $hdrdir should not contain macros, for backward + compatibility. [bruby-dev:28] + + * lib/mkmf.rb (create_makefile): in the case of extout, just copy + script files, without comparison. + +Fri Apr 23 16:38:46 2004 Tanaka Akira + + * lib/pathname.rb: sync taint/freeze flag between + a pathname object and its internal string object. + +Fri Apr 23 14:52:14 2004 Nobuyoshi Nakada + + * parse.y (stmt, arg, aref_args): should not make sole splat into + array, in aref_args other than aref with op_asgn. + +Fri Apr 23 14:14:38 2004 Tanaka Akira + + * lib/resolv.rb: don't use Regexp#source to embed regexps. + [ruby-dev:23432] + +Thu Apr 22 18:25:10 2004 Nobuyoshi Nakada + + * common.mk, ext/extmk.rb: make ext and .ext get removed by distclean. + +Thu Apr 22 10:07:01 2004 NAKAMURA Usaku + + * */Makefile.sub (distclean-local): should remove $(RBCONFIG). + +Thu Apr 22 04:17:57 2004 Nobuyoshi Nakada + + * eval.c (rb_mod_define_method): allow binding methods to modules. + [ruby-dev:23410] + + * parse.y (aref_args): should pass expanded list. [ruby-core:02793] + +Thu Apr 22 01:12:57 2004 Yukihiro Matsumoto + + * numeric.c (flo_to_s): tweak output string based to preserve + decimal point and to remove trailing zeros. [ruby-talk:97891] + + * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM + search. [ruby-talk:97342] + +Wed Apr 21 23:04:42 2004 Masatoshi SEKI + + * lib/rinda/rinda.rb, test/rinda/test_rinda.rb: check Hash tuple size. + +Wed Apr 21 20:05:00 2004 Tanaka Akira + + * lib/open-uri.rb (URI::HTTP#proxy_open): set Host: field explicitly. + [ruby-list:39542] + +Wed Apr 21 18:39:46 2004 Minero Aoki + + * lib/net/smtp.rb: merge SMTP-TLS patch. This patch is + contributed by Daniel Hob. [ruby-core:02789] + +Wed Apr 21 18:23:45 2004 Minero Aoki + + * lib/net/smtp.rb: change coding style: def m( a ) -> def m(a). + +Wed Apr 21 18:01:47 2004 Minero Aoki + + * lib/net/pop.rb: do not use class variables. + + * lib/net/pop.rb (do_start): ensure to clean up connection when + authentication failed. + +Wed Apr 21 17:23:59 2004 Minero Aoki + + * lib/net/http.rb (HTTP#connect): CONNECT must precede SSL connect. + [ruby-dev:23379] + + * lib/net/http.rb (HTTP.new): class variables are not inherited + now. + +Wed Apr 21 15:56:43 2004 Nobuyoshi Nakada + + * lib/test/unit/ui/console/testrunner.rb (test_started): restore $0 + after changing process title. [ruby-talk:97426] + +Wed Apr 21 10:18:06 2004 Hirokazu Yamamoto + + * process.c(rb_spawn): fix SEGV at "p system('command line here')" + (may happen only in bccwin32) [ruby-dev:23380] + +Mon Apr 19 20:58:44 2004 Hirokazu Yamamoto + + * dir.c: Updated RDocs. + +Mon Apr 19 18:11:15 2004 Yukihiro Matsumoto + + * hash.c (rb_hash_equal): returns true if two hashes have same set + of key-value set. [ruby-talk:97559] + + * hash.c (rb_hash_eql): returns true if two hashes are equal and + have same default values. + +Mon Apr 19 08:19:11 2004 Doug Kearns + + * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb, + lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, + lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, + lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, + lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb, + lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, + lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, + lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, + lib/test/unit/testsuite.rb: typo fix. + +Mon Apr 19 08:14:18 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body): Allow for + #ifdef HAVE_PROTOTYPES + +Fri Apr 16 17:04:07 2004 Yukihiro Matsumoto + + * string.c (rb_str_equal): always returns true or false, never + returns nil. [ruby-dev:23404] + +Fri Apr 16 12:38:48 2004 Nobuyoshi Nakada + + * lib/drb/drb.rb (DRb::DRbUnknown::initialize): Exception#to_str is + deprecated. + + * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform): multiple + value class changed. + + * lib/drb/invokemethod.rb (DRb::DRbServer::InvokeMethod18Mixin::block_yield): + ditto. + +Fri Apr 16 08:27:08 2004 Nobuyoshi Nakada + + * ext/extmk.rb: skip linking when libraries to be preloaded not + compiled. [ruby-list:39561] + +Thu Apr 15 19:57:11 2004 Nobuyoshi Nakada + + * process.c (pst_success_p): new method Process::Status#success?. + [ruby-dev:23385] + + * rubytest.rb: do nothing while cross-compiling, return status in + system independent style. + +Thu Apr 15 19:26:54 2004 Hirokazu Yamamoto + + * dir.c (rb_push_glob): Dir.glob() should return nil if block is given. + (http://www.ruby-lang.org/ja/man/index.cgi?cmd=view;name=Dir) + + * dir.c (push_braces): Dir.glob() should handle '{ }' nested more than + 3 times. + + * dir.c (push_braces, rb_push_glob): Dir.glob() should handle escaped + '{' and '}' and ','. + + [ruby-dev:23376] + +Thu Apr 15 17:12:13 2004 Tanaka Akira + + * ext/gdbm/gdbm.c (Init_gdbm): define GDBM::READER, GDBM::WRITER, + GDBM::WRCREAT and GDBM::NEWDB. + (fgdbm_initialize): use specified read/write flag. + +Wed Apr 14 13:06:09 2004 Doug Kearns + + * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c, + process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783] + +Wed Apr 14 11:29:56 2004 WATANABE Hirofumi + + * numeric.c (flo_eq): workaround for bcc32's bug. + (ruby-bugs-ja:PR#594) + +Wed Apr 14 11:06:38 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::scan): Changed + behavior of :enddoc: -- it now unconditionally terminates + processing of the current file. + +Wed Apr 14 10:57:40 2004 Hirokazu Yamamoto + + * defines.h: include to get fd_set definition in BeOS. + +Tue Apr 13 23:00:55 2004 Masatoshi SEKI + + * lib/rinda/rinda.rb: change pattern matching. + a === b -> a == b || a === b. [druby-ja:98] + + * test/rinda/test_rinda.rb: ditto. + +Tue Apr 13 21:50:57 2004 Nobuyoshi Nakada + + * bcc32/Makefile.sub (PHONY): Borland make disallows empty command + rules. + +Tue Apr 13 17:55:16 2004 Minero Aoki + + * lib/net/http.rb (begin_transport): should not overwrite HTTP + request header. [ruby-list:39543] + +Tue Apr 13 16:48:00 2004 Minero Aoki + + * lib/net/pop.rb: merge POP3S patch. This patch is contributed by + Daniel Hobe. + +Tue Apr 13 02:56:29 2004 Kazuo Saito + + * common.mk: changed the order of ascii.c alphabetically. + +Mon Apr 12 19:11:21 2004 Eric Hodel + + * gc.c (rb_gc_copy_finalizer): typo. [ruby-core:02774] + +Mon Apr 12 18:45:58 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c (ossl_x509name_init_i): should return + a value. + +Mon Apr 12 10:39:50 2004 Hirokazu Yamamoto + + * dir.c (rb_glob2, rb_glob, push_globs, push_braces, rb_push_glob): + fix memory leak. (leaked when block was interrupted) + +Sun Apr 11 19:10:13 2004 Nobuyoshi Nakada + + * ruby.c (require_libraries): restore source file/line after + statically linked extensions initialized. [ruby-dev:23357] + +Sun Apr 11 10:47:04 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::TopLevel::add_class_or_module): Toplevel + classes and modules are a special case too... (handle extending existing + classes with or without :enddoc:) + +Sat Apr 10 23:51:13 2004 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::add_to): Implementation of :enddoc: + made one too many assumptions... + +Sat Apr 10 00:00:19 2004 Dave Thomas + + * lib/rdoc/markup/simple_markup/inline.rb: Fix problem + with \_cat_dog + +Fri Apr 9 17:05:21 2004 Hirokazu Yamamoto + + * dir.c (has_magic, find_dirsep): incomplete '[' matches no character + in Dir.glob. (follows File.fnmatch's behavior) + + * dir.c (fnmatch_helper): incomplete escape is ignored in File.fnmatch. + (follows Dir.glob's behavior) + + * dir.c (find_dirsep): '/' between '[' and ']' is ignored in Dir.glob. + (follows File.fnmatch with File::FNM_PATHNAME 's behavior) + + * dir.c (find_dirsep): escaped slash '\/' loses its meaning as + directory separator in Dir.glob. + + [ruby-dev:23291] + +Thu Apr 8 20:25:19 2004 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): skip uncompiled extensions. + + * lib/mkmf.rb (create_makefile): emit no rules for static library if + $static is nil, e.g., outside of ext/. + + * lib/test/unit/ui/console/testrunner.rb (test_started): show test + name via $0. + + * runruby.rb: set environments to use the compiled binary. + + * test/runner.rb: do nothing while cross-compiling. + + * test/drb/drbtest.rb, test/soap/calc/test_calc_cgi.rb: use envutil to + know ruby binary, and restore $: after require. + + * test/ruby/envutil.rb: give priority to RUBY environment variable to + use just compiled binary and libraries. + +Thu Apr 8 19:03:33 2004 Nobuyoshi Nakada + + * io.c (rb_io_binmode): inverted condition. [ruby-dev:23349] + +Thu Apr 8 18:22:00 2004 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_s_list): return encoding list if no block + is given. [ruby-dev:23063] + +Wed Apr 7 15:29:24 2004 Yukihiro Matsumoto + + * pack.c (pack_pack): use NUM2INT() instead of num2i32(). + +Wed Apr 7 12:32:02 2004 Kouhei Sutou + + * lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or + resource attribute in rdf:li. + * test/rss/test_parser.rb: added test for above change. + + * lib/rss/dublincore.rb: reverted style. + + * lib/rss/xmlparser.rb: normalized XMLParser class hierarchy. + +Wed Apr 7 10:43:17 2004 Nobuyoshi Nakada + + * Makefile.in, common.mk, */Makefile.sub (ext/extinit.o): OUTFLAG + doesn't work for object files on VC. + + * */Makefile.sub (config.h): need SIZEOF_TIME_T now. + +Wed Apr 7 00:24:34 2004 Masatoshi SEKI + + * lib/rinda/rinda.rb: fix hash tuple bug. + + * lib/rinda/tuplespace.rb: ditto. + + * test/rinda/test_rinda.rb + +Tue Apr 6 18:24:18 2004 Yukihiro Matsumoto + + * file.c (rb_get_path): get path string via "to_path" method if + path object is not a string. [Ruby2] + + * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the + exit finalizers. + + * io.c (rb_io_reopen): should use rb_io_check_io(). + +Tue Apr 6 16:46:09 2004 Tanaka Akira + + * configure.in: check the size of time_t. + + * time.c (time_add): new function. + (time_plus): use time_add. + (time_minus): use time_add. + +Tue Apr 6 13:11:48 2004 NAKAMURA Usaku + + * ext/socket/socket.c (raise_socket_error): never return. + + * ext/socket/socket.c (make_hostent): must return value. + +Tue Apr 6 00:14:43 2004 Yukihiro Matsumoto + + * error.c (Init_Exception): remove Exception#to_str. [Ruby2] + + * eval.c (error_print): should no call "to_str" anymore use + "message" method instead. + + * io.c (rb_f_open): Kernel#open() calls "to_open" if the first + argument responds to it. [Ruby2] + +Tue Apr 6 00:13:43 2004 Masatoshi SEKI + + * lib/rinda/rinda.rb: add require 'drb/drb' + +Mon Apr 5 22:25:32 2004 Tanaka Akira + + * test/zlib/test_zlib.rb: new file. + (TestZlibGzipWriter#test_new_nil): test for [ruby-dev:23228]. + +Mon Apr 5 22:16:23 2004 Minero Aoki + + * parse.y (assoc_list): {a: 1, b: 2} should be allowed. + [ruby-dev:23328] + +Mon Apr 5 19:43:40 2004 Kazuo Saito + + * regexec.c: imported Oni Guruma 2.2.6. + +Mon Apr 5 19:39:10 2004 Kazuo Saito + + * regparse.c, oniguruma.h: imported Oni Guruma 2.2.6. + +Mon Apr 5 12:12:09 2004 NAKAMURA Usaku + + * ext/socket/socket.c (raise_socket_error): some platforms don't have + EAI_SYSTEM. + +Mon Apr 5 08:18:23 2004 Dave Thomas + + * lib/rdoc/rdoc.rb: Remove leading ./ from file names so that cross + references work properly. + +Sun Apr 4 14:01:20 2004 Dave Thomas + + * lib/rdoc/options.rb (Options::parse): Allow multiple -x options to + RDoc. Fix bug where files weren't being excluded properly + +Sat Apr 3 09:36:38 2004 why the lucky stiff + + * ext/syck/syck.h: version 0.43. + +Sat Apr 3 08:28:47 2004 why the lucky stiff + + * ext/syck/lib/gram.c: allow root-level inline collections. + [ruby-talk:94922] + + * lib/yaml/rubytypes.rb (Symbol#to_yaml): emit symbols as implicits. + [ruby-talk:94930] + +Fri Apr 2 19:28:48 2004 Nobuyoshi Nakada + + * bcc32/Makefile.sub (OUTFLAG): needed for static-linked-ext. + +Fri Apr 2 18:00:05 2004 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): extract necessary variables for static link + from Makefile. + + * lib/mkmf.rb (create_makefile): save preload and libpath for next + compile. + +Fri Apr 2 17:27:17 2004 Yukihiro Matsumoto + + * eval.c (top_include): include in the wrapped load is done for + the wrapper, not for a singleton class for wrapped main. + [ruby-dev:23305] + +Fri Apr 2 15:13:44 2004 Yukihiro Matsumoto + + * bignum.c (rb_big_eq): use temporary double variable to save the + result (internal float register may be bigger than 64 bits, for + example, 80 bits on x86). [ruby-dev:23311] + +Fri Apr 2 14:35:26 2004 Yukihiro Matsumoto + + * eval.c (block_pass): should generate unique identifier of the + pushing block. [ruby-talk:96363] + +Fri Apr 2 11:36:20 2004 Minero Aoki + + * eval.c (Init_load): make $LOADED_FEATURES built-in. + [ruby-dev:23299] + + * ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in. + + * lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME. + +Fri Apr 2 07:31:38 2004 Yukihiro Matsumoto + + * ext/socket/socket.c: mistakingly removed do_not_reverse_lookup. + [ruby-list:39475] + + * ext/socket/socket.c (make_hostent): fix memory leak, based on + the patch from HORIKAWA Hisashi . + +Thu Apr 1 22:55:33 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb: Allow rdoc comments in + =begin rdoc/=end + + * lib/rdoc/parsers/parse_rb.rb: Fix problem with comment in + top-level method being taken as file comment. + +Thu Apr 1 22:55:04 2004 Dave Thomas + + * lib/rdoc/ri/ri_options.rb: Fix undefined variable warning. + +Thu Apr 1 19:58:37 2004 NAKAMURA, Hiroshi + + * lib/soap/mapping/{factory.rb,registry.rb}: fixed illegal mapped URI + object with soap/marshal. + added URIFactory class for URI mapping. BasetypeFactory checks + instance_variables when original mapping is not allowed (ivar must + be empty). Instance of URI have instance_variables but it must be + llowed whenever original mapping is allowed or not. + +Wed Mar 31 19:06:23 2004 Tanaka Akira + + * time.c (year_leap_p): new function. + (timegm_noleapsecond): ditto. + (search_time_t): use timegm_noleapsecond instead of + mktime for first guess. + +Wed Mar 31 12:05:17 2004 Nobuyoshi Nakada + + * lib/delegate.rb (DelegateClass): define internal methods of the + result class, but not metaclass of the caller. [ruby-talk:96156] + + * intern.h: provide proper prototypes. [ruby-core:02724] + + * ruby.h: missing.h is now prerequisite to intern.h. + +Wed Mar 31 11:17:16 2004 Yukihiro Matsumoto + + * pack.c (pack_pack): raises RangeError if uv is out of UTF8 value + range. [ruby-dev:23281] + + * io.c (rb_io_binmode): stdio buffer should be empty when calling + IO#binmode. [ruby-talk:96155] + +Tue Mar 30 20:25:34 2004 Tanaka Akira + + * time.c (search_time_t): limit guess range by mktime if it is + available. [ruby-dev:23274] + +Tue Mar 30 18:19:00 2004 Nobuyoshi Nakada + + * eval.c (rb_eval): fix SEGV at retry in iterator's receiver. + [ruby-dev:23227] + +Mon Mar 29 20:17:16 2004 Nobuyoshi Nakada + + * process.c (rb_exec): follow older behavior if close-on-exec is not + available. + + * process.c (rb_fork): protect from exceptions while waiting failed + process, if status is given. + +Sun Mar 28 16:25:37 2004 Nobuyoshi Nakada + + * cygwin/GNUmakefile.in (clean-local, distclean-local): remove + work files. + + * win32/Makefile.sub (clean-local): ditto. + +Sun Mar 28 14:23:02 2004 Minero Aoki + + * lib/net/pop.rb: def m( arg ) -> def m(arg). + +Sun Mar 28 14:09:13 2004 Minero Aoki + + * lib/net/pop.rb (auth): failed when account/password include "%". + [ruby-talk:95933] + +Sat Mar 27 21:40:41 2004 Tanaka Akira + + * lib/open-uri.rb: permit extra semicolon in content-type field. + +Sat Mar 27 10:40:48 2004 Tanaka Akira + + * (lib/pp.rb, lib/prettyprint.rb): define seplist in PP::PPMethods + instead of PrettyPrint. + +Sat Mar 27 01:47:09 2004 NAKAMURA, Hiroshi + + * lib/logger.rb: trim tail space of each line. no user visible change. + + * lib/rss/dublincore.rb: fixed class definition mismatch. + + * sample/openssl/gen_csr.rb: fixed wrong usage text. + +Thu Mar 25 23:15:24 2004 Dave Thomas + + * lib/rdoc/ri/ri_options.rb (RI::Options::show_version): + Add --version option + +Thu Mar 25 21:45:00 2004 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c: Bug in + and - reported by Bret Jolly + fixed. + +Thu Mar 25 21:01:32 2004 Nobuyoshi Nakada + + * version.c (ruby_show_copyright): obtain copyright year from + RUBY_RELEASE_YEAR. + + * win32/resource.rb: ditto. + +Thu Mar 25 19:37:35 2004 Nobuyoshi Nakada + + * win32/resource.rb: default rubyw icon to ruby.ico, and let DLL also + include them. + + * win32/resource.rb: include winver.h for older WindowsCE. + +Thu Mar 25 14:01:03 2004 Nobuyoshi Nakada + + * common.mk, */Makefile.sub (lib, dll): phony targets. + + * configure.in (ruby, miniruby): ditto. + + * cygwin/GNUmakefile.in (rubyw): ditto. + +Thu Mar 25 04:16:18 2004 Dave Thomas + + * lib/rdoc/ri/ri_options.rb (RI::Options): Add the --list-names option, + which dumps our all known names + +Thu Mar 25 03:57:47 2004 Dave Thomas + + * lib/rdoc/ri/ri_util.rb (NameDescriptor::initialize): No longer + allow nested classes to be designated using "."--you must + now use "::" + +Thu Mar 25 02:00:18 2004 Dave Thomas + + * lib/rdoc/generators/template/html/one_page_html.rb (Page): + Fix to work with C modules. + +Wed Mar 24 20:49:00 2004 Gavin Sinclair + + * lib/uri.rb: Documented (thanks Dmitry V. Sabanin). + * lib/uri/common.rb: Ditto. + * lib/uri/ftp.rb: Ditto. + * lib/uri/generic.rb: Ditto. + * lib/uri/http.rb: Ditto. + * lib/uri/https.rb: Ditto. + * lib/uri/ldap.rb: Ditto. + * lib/uri/mailto.rb: Ditto. + +Wed Mar 24 18:48:05 2004 Nobuyoshi Nakada + + * lib/mkmf.rb ($ruby, $topdir, $hdrdir): should not be affected by + DESTDIR after installed. + + * lib/mkmf.rb (dummy_makefile): default file lists to be cleaned. + +Wed Mar 24 12:32:56 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_class_module): + Don't document methods if we don't know for sure the + class or module. + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class): + Don't store documentation for singleton classes if we + don't know the real class. + +Wed Mar 24 11:11:26 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb (Generators::HTMLGenerator::load_html_template): + Allow non-RDoc templates by putting a slash in the template name + +Wed Mar 24 10:05:22 2004 Yukihiro Matsumoto + + * lib/tempfile.rb (Tempfile::_close): should not clear @tmpname + until the file is really removed. [ruby-core:02684] + +Wed Mar 24 04:12:44 2004 Yukihiro Matsumoto + + * object.c (rb_mod_cvar_get): new method Module#class_variable_get. + + * object.c (rb_mod_cvar_set): ditto (Module#class_variable_set). + +Tue Mar 23 17:45:22 2004 Yukihiro Matsumoto + + * eval.c (rb_thread_atfork): 1.9 warns no more for thread + termination. [ruby-dev:23212] + +Tue Mar 23 14:46:10 2004 Nobuyoshi Nakada + + * Makefile.in, */Makefile.sub, common.mk (clean-local, distclean-local): + separate files under directories due to directory separator. + + * */Makefile.sub (MKFILES): common.mk and */Makefile.sub should not be + removed. + + * win32/Makefile.sub, wince/Makefile.sub: $* cannot appear in explicit + rules. + + * cygwin/GNUmakefile.in: some mingw stuffs were missed. + + * lib/mkmf.rb (create_makefile): Borland make wrongly removes braces + from command lines. + + * bcc32/Makefile.sub: needs bcc32/mkexports.rb. + +Mon Mar 22 08:21:17 2004 Nobuyoshi Nakada + + * Makefile.in, */Makefile.sub, common.mk: extract common portions. + + * Makefile.in, cygwin/GNUmakefile.in, */Makefile.sub (RBCONFIG): + separated time stamp file for rbconfig.rb. + + * configure.in: append common.mk to Makefile. + + * mkconfig.rb: keep mtime of rbconfig.rb if unchanged. + + * win32/rm.bat: remove multiple files. + + * wince/mkconfig_wce.rb: use fake.rb instead. + +Sun Mar 21 22:17:35 2004 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#virtual_host): + sort @virtual_hosts in address, port, host order. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): + hostname should not be match if :ServerAlias is not given. + +Sun Mar 21 21:11:16 2004 Keiju Ishitsuka + + * lib/shell/*: bug fix for Shell#system(command_line_string). + +Sun Mar 21 21:04:42 2004 WATANABE Hirofumi + + * ruby.1: add -width option to .Bl for old groff. + +Sun Mar 21 18:57:37 2004 Kouhei Sutou + + * test/rss/*: Test::Unit::TestCase -> RSS::TestCase and + Test::Unit::Assertions -> RSS::Assertions. + +Sun Mar 21 18:48:20 2004 Kouhei Sutou + + * lib/rss/{rss,dublincore,syndication}.rb: handled W3CDTF correctly. + +Sun Mar 21 18:15:29 2004 Kouhei Sutou + + * test/rss/test_xml-stylesheet.rb: added tests for xml-stylesheet. + + * lib/rss/xml-stylesheet.rb: added xml-stylesheet parsing + function. + +Sat Mar 20 23:51:03 2004 WATANABE Hirofumi + + * eval.c (rb_require_safe): preserve old ruby_errinfo. + [ruby-talk:95409] + + * eval.c (rb_f_raise): should not clear backtrace information if + exception object already have one. + +Sat Mar 20 21:21:03 2004 WATANABE Hirofumi + + * ext/extmk.rb: rm -rf $extout, not extout. + +Sat Mar 20 15:25:36 2004 Dave Thomas + + * lib/rdoc/generators/template/html/html.rb (RDoc::Page): Force + page background to white. + +Sat Mar 20 09:33:36 2004 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: _parse() now accepts fractional + part of second minute that follows a comma or a full stop. + +Fri Mar 19 21:06:21 2004 Yukihiro Matsumoto + + * parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2] + this change is done by Nobuyoshi Nakada . + +Fri Mar 19 15:15:15 2004 Yukihiro Matsumoto + + * variable.c (rb_cvar_set): class variables become private to the + particular class/module. [Ruby2] + + * variable.c (rb_cvar_get): ditto. + + * variable.c (rb_cvar_defined): ditto. + +Fri Mar 19 11:31:32 2004 NAKAMURA Usaku + + * lib/mkmf.rb ($beos, $solaris): add OS flags. + + * lib/mkmf.rb (RUBY): / is not recognized as path separator on + nmake/bmake. [ruby-list:39388] + + * lib/mkmf.rb (CLEANLIBS, CLEANOBJS): should remove *.exp with *.so. + +Fri Mar 19 01:55:57 2004 Mauricio Fernandez + + * io.c (rb_io_sync): need not to check writable. [ruby-core:02674] + +Thu Mar 18 19:47:44 2004 WATANABE Hirofumi + + * instruby.rb, rubytest.rb: do not depend on srcdir. + +Thu Mar 18 18:50:06 2004 Nobuyoshi Nakada + + * mkconfig.rb: no longer embed srcdir and compile_dir into + rbconfig.rb. + + * ext/extmk.rb, lib/mkmf.rb: obtain top_srcdir and topdir from library + paths. + +Thu Mar 18 17:46:35 2004 Masatoshi SEKI + + * lib/drb/drb.rb: do not undef :to_a. + +Thu Mar 18 16:22:38 2004 Yukihiro Matsumoto + + * eval.c (proc_eq): avoid false positive by using scope and + dyna_vars. no longer use frame.uniq. + + * eval.c (proc_arity): arity is now defined as number of + parameters that would not be ignored. i.e. Proc.new{}.arity + returns zero. update test suites too. + +Thu Mar 18 15:27:25 2004 Yukihiro Matsumoto + + * eval.c: remove specialized version of rb_Array(). use simple + one defined in object.c. + + * object.c (Init_Object): remove Kernel#to_a. + + * enum.c (enum_zip): use "to_a" instead of "to_ary". + +Wed Mar 17 00:22:03 2004 Kazuo Saito + + * oniguruma.h: imported Oniguruma 2.2.5. + * regparse.c: ditto. + +Tue Mar 16 11:14:17 2004 Hirokazu Yamamoto + + * dir.c (fnmatch_helper): File.fnmatch('\.', '.') should return true. + (Rev1.112 lost compatiblity) + + * dir.c (fnmatch_helper): File.fnmatch('\/', '/', File::FNM_PATHNAME) + should return true. (Rev1.112 lost compatiblity) + + * dir.c (fnmatch): File.fnmatch('**/.boo', '.foo/.boo', + File::FNM_PATHNAME) should return false because of leading period. + +Mon Mar 15 17:01:07 2004 Yukihiro Matsumoto + + * error.c (exc_initialize): calling 'to_str' each time just for + type checking is too heavy. [ruby-core:02661] + +Mon Mar 15 10:14:51 2004 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SocketForwarder): + add do_not_reverse_lookup. + +Mon Mar 15 07:39:13 2004 Yukihiro Matsumoto + + * eval.c (rb_yield_0): should not re-submit TAG_BREAK if this + yield is not break destination. [ruby-dev:23197] + +Sun Mar 14 22:07:38 2004 Nobuyoshi Nakada + + * eval.c (rb_thread_raise): err at unstarted thread. (PR#1302) + +Sat Mar 13 14:56:32 2004 Masatoshi SEKI + + * test/drb/ut_drb.rb: use 'druby://localhost:0'. [ruby-dev:23078] + + * test/drb/ut_eval.rb: ditto. + + * test/drb/ut_large.rb: ditto. + + * test/drb/ut_safe1.rb: ditto. + + * test/drb/ut_drb_drbssl.rb: use 'drbssl://localhost:0'. + +Fri Mar 12 23:52:56 2004 Hirokazu Yamamoto + + * dir.c (fnmatch): directory recursion '**/' can be used with + File::FNM_PATHNAME. [ruby-dev:22901] + + * dir.c (fnmatch, fnmatch_helper): only '/' is accepted as path + separator even in DOSISH environment. [ruby-dev:22974] + [ruby-list:39337] + + * dir.c (fnmatch_helper): faster '*' matching. + +Fri Mar 12 20:19:16 2004 Nobuyoshi Nakada + + * configure.in (rb_cv_noreturn): default for platforms not support + prototypes. + + * ruby.c (ruby_init_loadpath): buffer for path name should have + MAXPATHLEN. + + * lib/mkmf.rb (configuration): include topdir and hdrdir in VPATH. + + * lib/mkmf.rb (create_makefile): default dependency rule. + +Fri Mar 12 07:35:36 2004 GOTOU Yuuzou + + * lib/webrick/config.rb (WEBrick::Config::General): add + :DoNotReverseLookup. + + * lib/webrick/server.rb (WEBrick::GenericServer#accept): call + do_not_reverse_lookup for each socket if :DoNotReverseLookup + is set. [ruby-code:02357] + +Wed Mar 10 22:26:25 2004 Minero Aoki + + * lib/fileutils.rb (remove_dir): should handle symlink correctly. + This patch is contributed by Christian Loew. [ruby-talk:94635] + +Wed Mar 10 16:28:42 2004 Yukihiro Matsumoto + + * eval.c (return_jump): set return value to the return + destination. separated from localjump_destination(). + + * eval.c (break_jump): break innermost loop (or thread or proc). + + * eval.c (rb_yield_0): set exit_value for block break. + +Wed Mar 10 16:00:14 2004 Yukihiro Matsumoto + + * struct.c (rb_struct_s_def): Struct::new executes block with + generated struct class. [ruby-talk:02606] + +Wed Mar 10 15:58:43 2004 Ryan Davis + + * eval.c (eval): Only print backtrace if generating the backtrace + doesn't generate an exception. [ruby-core:02621] + +Wed Mar 10 10:15:16 2004 NAKAMURA Usaku + + * ruby.c (opt_W_getter): get rid of warning. + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub: + fixed dependency. + +Tue Mar 9 13:04:26 2004 Yukihiro Matsumoto + + * io.c (rb_io_ungetc): raise IOError instead of calling + rb_sys_fail(). [ruby-talk:23181] + +Tue Mar 9 10:03:40 2004 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub: + replaced regex.c entry with Oniguruma files. + +Tue Mar 9 01:09:46 2004 Kazuo Saito + + * Makefile.in: replaced regex.c entry with Oniguruma files. + +Mon Mar 8 23:16:07 2004 Minero Aoki + + * lib/net/http.rb: HTTPHeader did not initialized correctly. + + * lib/net/http.rb (connect): does same debug output. + +Mon Mar 8 21:38:18 2004 Minero Aoki + + * lib/net/http.rb (add_header): remove warning. [ruby-dev:23170] + +Mon Mar 8 21:09:39 2004 Hirokazu Yamamoto + + * dir.c (range): Cancel change for incomplete '['. More discussion + is needed. + +Mon Mar 8 19:35:13 2004 akira yamada + + * lib/uri/common.rb (URI::REGEXP::PATTERN::HOSTPORT): (?:#{PORT}) + -> (?::#{PORT}). [ruby-dev:23170] + +Mon Mar 8 15:03:24 2004 Hirokazu Yamamoto + + * dir.c (range): treat incomplete '[' as ordinary character (like + has_magic does). fix buffer overrun at incomplete escape like '[\'. + +Mon Mar 8 13:35:32 2004 WATANABE Hirofumi + + * regparse.c (parse_exp): need to separate initialization for bcc32. + [ruby-dev:23169] + + * oniguruma.h (ONIG_EXTERN): check __GNUC__ instead of __CYGWIN__. + +Mon Mar 8 01:05:55 2004 GOTOU Yuuzou + + * lib/webrick/config.rb (WEBrick::Config::HTTP): rename :RequestHander + to :RequestCallback and add new option :ServerAlias. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): use + :RequestCallback and warn if :RequestHandler is in server's option. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should print + error message for WEBrick::HTTPSataus::Error. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): + lookup for hostname from :ServerAlias if the req.host is not match + to :ServerName. + + * lib/webrick/httpservlet.rb (WEBrick::HTTPServlet::CGIHandler#do_GET): + use $?.exitstatus and refine log message. + +Sun Mar 7 16:22:26 2004 WATANABE Hirofumi + + * Makefile.in (lex.c): use $? instead of $<. + + * lib/pstore.rb (commit_new): use FileUtils.copy_stream for Cygwin. + [ruby-dev:23157] + +Sun Mar 7 05:34:42 2004 Minero Aoki + + * lib/net/http.rb: HTTPHeader keeps its header fields as an array. + + * lib/net/http.rb: new method HTTPHeader#add_header, get_fields. + + * lib/net/http.rb: new method HTTPHeader#content_length=. + + * lib/net/http.rb: new method HTTPHeader#content_type, main_type, + sub_type, type_params, content_type=, set_content_type. + + * lib/net/http.rb (HTTPHeader#basic_encode): result of pack(m) may + contain multiple LFs. + +Sun Mar 7 03:11:00 2004 Minero Aoki + + * lib/net/http.rb: new method Net::HTTPRequest#body(=). + + * lib/net/http.rb: new method Net::HTTPRequest#body_stream(=). + +Sun Mar 7 02:06:07 2004 Minero Aoki + + * lib/net/http.rb: spin off https code again. + + * lib/net/https.rb: new file. + + * ext/openssl/lib/net/https.rb: removed. moved to net/https with + slight modifications. + + * ext/openssl/lib/net/protocols.rb: removed. merged with net/http. + + * lib/net/protocol.rb: new class BufferedIO. + + * lib/net/protocol.rb: InternetMessageIO < BufferedIO. + + * lib/net/protocol.rb: BufferedIO.new takes an IO. + + * lib/net/smtp.rb: follow InternetMessageIO's change. + + * lib/net/pop.rb: ditto. + +Sun Mar 7 00:55:03 2004 Minero Aoki + + * lib/net/protocol.rb: remove method: InternetMessageIO#address, + port, ip_address, read_timeout(=), socket. + + * lib/net/protocol.rb: simplify code. + + * lib/net/protocol.rb: apply latest coding style. + +Sat Mar 6 15:15:05 2004 Nobuyoshi Nakada + + * ext/strscan/depend: depends on re.h and regex.h. + + * ext/strscan/strscan.c: no version check needed. + + * ext/strscan/strscan.c (strscan_init_copy): struct re_registers must + not be bitwise copied. + +Sat Mar 6 11:14:33 2004 David Black + + * lib/scanf.rb: refixed the previous fix in IO#block_scanf + +Sat Mar 6 10:49:40 2004 David Black + + * lib/scanf.rb: fixed a logic glitch in IO#block_scanf + +Sat Mar 6 02:00:19 2004 Minero Aoki + + * lib/net/http.rb: net/https is merged. + + * ext/openssl/lib/net/https.rb: ditto. + +Sat Mar 6 00:39:21 2004 Kazuo Saito + + * oniggnu.h: imported from Oniguruma library. + * oniguruma.h: ditto. + * regcomp.c: ditto. + * regenc.c: ditto. + * regenc.h: ditto. + * regerror.c: ditto. + * regex.c: ditto. + * regexec.c: ditto. + * reggnu.c: ditto. + * regint.h: ditto. + * regparse.c: ditto. + * regparse.h: ditto. + * ascii.c: ditto. + * euc_jp.c: ditto. + * sjis.c: ditto. + * utf8.c: ditto. + + * MANIFEST: added Oniguruma files listed above. + + * LEGAL: added Oniguruma license. + + * regex.h: now includes oniggnu.h. + + * re.c: applied Oniguruma patch. + +Fri Mar 5 23:13:08 2004 Minero Aoki + + * lib/net/http.rb: support WebDAV methods, PROPPATCH, LOCK, + UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE, COPY, MKCOL. + This patch is contributed by Tatsuki Sugiura. + +Fri Mar 5 20:58:37 2004 Minero Aoki + + * lib/net/http.rb: Net::HTTPResponse#response is obsolete. + [ruby-core:02592] + + * lib/net/http.rb: Net::HTTPResponse#header is obsolete. + + * lib/net/http.rb: Net::HTTPResponse#read_header is obsolete. + +Fri Mar 5 20:10:57 2004 Minero Aoki + + * ext/strscan/strscan.c: new method StringScanner#initialize_copy + to allow #dup and #clone. + + * test/strscan/test_strscan.rb: test StringScanner#dup. + +Fri Mar 5 19:42:09 2004 Minero Aoki + + * lib/net/http.rb (HTTPResponse#to_ary): should return an object + which does not respond to #to_ary. It causes infinite loop in + puts. [ruby-core:02578] + +Fri Mar 5 00:51:35 2004 Dave Thomas + + * lib/test/unit.rb: Move RDoc documentation so that you can + now say 'ri Test::Unit' + +Thu Mar 4 22:31:40 2004 Nobuyoshi Nakada + + * Makefile.in: miniruby is not needed for cross compile. + + * configure.in (PREP): miniruby for native compile. + +Thu Mar 4 11:46:32 2004 Nobuyoshi Nakada + + * lib/drb/extservm.rb (DRb::ExtServManager#invoke_service_command): + detach server processes to get rid of zombies. + +Thu Mar 4 10:41:25 2004 Yukihiro Matsumoto + + * ruby.h (T_MASK): save 1 bit in flags bits by shifting T_xxx + values. + +Thu Mar 4 08:08:36 2004 Nobuyoshi Nakada + + * ext/syck/rubyext.c: get rid of warnings. + + * lib/rss/taxonomy.rb: ditto. + + * lib/rdoc/ri/ri_formatter.rb: ditto. + + * test/ruby/test_assignment.rb: ditto. + +Thu Mar 4 01:17:28 2004 Nobuyoshi Nakada + + * lib/rdoc/ri/ri_display.rb (DefaultDisplay::page): wait until the + pager terminates. + +Wed Mar 3 13:10:56 2004 Yukihiro Matsumoto + + * eval.c (method_hash): new method. [ruby-talk:93968] + + * eval.c (proc_eq): do not compare dyna_vars. + + * eval.c (proc_hash): new method. + + * eval.c (rb_yield_0): protect break/return from within orphan (or + lambda) Proc object. + +Wed Mar 3 09:52:05 2004 Nobuyoshi Nakada + + * lib/mkmf.rb ($topdir): use compile_dir only when not installed yet. + [ruby-talk:94098] + +Wed Mar 3 01:18:52 2004 Kouhei Sutou + + * lib/rss/converter.rb: handled Uconv::Error. + + * lib/rss/dublincore.rb: DublincoreModel -> DublinCoreModel + +Wed Mar 3 00:59:30 2004 David Black + + * lib/scanf.rb: soak_up_spaces only ungetc's non-space last + character + + * lib/scanf.rb: IO#block_scanf now returns partial last iteration + array if format string matches partly + +Tue Mar 2 16:30:21 2004 Nobuyoshi Nakada + + * io.c (pipe_open): erred program name should be reported by + exceptions, instead of the first argument. + + * process.c (rb_spawn): ditto. + + * process.c (proc_spawn_v): use first argument as program name. + + * win32/win32.c (rb_w32_aspawn): ditto. + + * win32/win32.c (CreateChild): search executable file if no program + name given. + + * lib/drb/extservm.rb (invoke_service_command): use Process.spawn. + [ruby-dev:23103] + + * lib/rdoc/ri/ri_display.rb (setup_pager): use IO.popen. + [ruby-dev:23086], [ruby-dev:23103] + + * lib/rdoc/diagram.rb (convert_to_png): ditto. + + * lib/rdoc/generators/chm_generator.rb (compile_project): ditto. + +Tue Mar 2 12:24:03 2004 NAKAMURA Usaku + + * win32/Makefile.sub, wince/Makefile.sub (config.h): shouldn't check + defined? NORETURN. [ruby-dev:23100] + +Tue Mar 2 11:28:40 2004 Nobuyoshi Nakada + + * test/ruby/test_iterator.rb (test_ljump): cannot use + assert_nothing_raised due to passing block. + +Tue Mar 2 06:23:14 2004 David Black + + * lib/scanf.rb: fixed Kernel#scanf to propagate code block + +Mon Mar 1 23:25:40 2004 David Black + + * lib/scanf.rb: Partial fix so STDIN#scanf works with new + STDIN#pos behavior + +Mon Mar 1 19:42:05 2004 Hirokazu Yamamoto + + * bcc32/setup.mak: configure's default is "--enable-install-doc" + + * win32/setup.mak: ditto. + +Mon Mar 1 12:24:10 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_alias): + Allow aliases to have parentheses + +Sun Feb 29 23:14:53 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_class): + Handle :nodoc: on singleton classes. + +Sat Feb 28 21:50:20 2004 Nobuyoshi Nakada + + * bcc32/Makefile.sub, bcc32/README.bcc32, bcc32/configure.bat, + bcc32/setup.mak: new configure scheme. use ``configure --prefix=dir'' + instead of ``make DESTDIR=dir install''. + --with-static-linked-ext support on bccwin32. [ruby-dev:23034] + +Sat Feb 28 21:50:20 2004 Hirokazu Yamamoto + + * bcc32/setup.mak: "configure --disable-install-doc" is now working. + + * win32/setup.mak: ditto. + +Sat Feb 28 15:09:49 2004 Hirokazu Yamamoto + + * bcc32/configure.bat: append missing label ":exit". + + * bcc32/configure.bat: fix typo. + +Sat Feb 28 10:31:03 2004 Masatoshi SEKI + + * MANIFEST: add test_erb.rb + + * lib/erb.rb, test/erb/test_erb.rb: don't forget filename, + if both filename and safe_level given. [ruby-dev:23050] + +Sat Feb 28 01:08:40 2004 Yukihiro Matsumoto + + * parse.y (yylex): should not allow symbol for invalid global + variable (e.g. `:$-)`). [ruby-core:02518] + +Fri Feb 27 20:37:09 2004 Yukihiro Matsumoto + + * eval.c (proc_invoke): no orphan block check is needed when pcall + is true. + + * eval.c (localjump_destination): update localjump condition. + +Fri Feb 27 02:10:49 2004 Yukihiro Matsumoto + + * eval.c (localjump_destination): lambda should not interfere + return from the yielded block. + +Fri Feb 27 00:53:49 2004 Masatoshi SEKI + + * lib/drb/drb.rb, test/drb/drbtest.rb: require drb/eq.rb by default + +Thu Feb 26 12:15:02 2004 Nobuyoshi Nakada + + * win32/win32.c (make_cmdvector): adjust successive double-quote + handling. + +Thu Feb 26 09:42:56 2004 Yukihiro Matsumoto + + * hash.c (delete_if_i): use st_delete_safe() (via + rb_hash_delete()) instead of returning ST_DELETE. + +Thu Feb 26 02:35:10 2004 Nobuyoshi Nakada + + * process.c (rb_f_exec): get rid of SEGV when exec failed for command + in single string. + +Wed Feb 25 21:17:33 2004 Nobuyoshi Nakada + + * gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile): + sharing OpenFile. + + * io.c (rb_io_initialize): accept IO instance. [ruby-dev:22195] + +Wed Feb 25 21:16:10 2004 Nobuyoshi Nakada + + * instruby.rb (with_destdir): should return the given argument if no + DESTDIR is given. + + * instruby.rb: use path name expansion of cmd.exe. + +Wed Feb 25 20:44:45 2004 Nobuyoshi Nakada + + * lib/cgi-lib.rb, lib/getopts.rb, lib/importenv.rb, lib/parsearg.rb: + warn with caller position. + + * test/rss/test_content.rb, test/rss/test_dublincore.rb, + test/rss/test_syndication.rb, test/rss/test_trackback.rb: use cgi + instead of cgi-lib. + +Tue Feb 24 18:42:03 2004 Hirokazu Yamamoto + + * dir.c (glob_helper): '**/' should not match leading period + unless File::FNM_DOTMATCH is set. (like '*/') [ruby-dev:23014] + +Tue Feb 24 18:03:14 2004 Nobuyoshi Nakada + + * test/ruby/test_file.rb (test_fnmatch): test for dir.c:1.108. + +Tue Feb 24 17:07:17 2004 Hirokazu Yamamoto + + * dir.c (fnmatch): File.fnmatch with File::FNM_PATHNAME was broken + for the pattern including '*' followed by '/'. + +Tue Feb 24 13:22:21 2004 Dave Thomas + + * lib/rdoc/rdoc.rb (RDoc::RDoc::normalized_file_list): Attempt to get better + heuristics on which files to include and exclude. Now only include + non-standard files if they are explicitly named in ARGV. + +Tue Feb 24 07:23:30 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Deal with :stopdoc: when + choosing a default main page to display (ie. don't select a page + if we don't have documentation for it). + +Tue Feb 24 06:40:14 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle + class variables in code listings + +Tue Feb 24 06:32:27 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_aliases): Handle + aliases in C files. + +Tue Feb 24 06:16:22 2004 Dave Thomas + + * lib/rdoc/rdoc.rb (RDoc::RDoc::document): Now create op dir _before_ + parsing files. + +Tue Feb 24 06:08:47 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant): + Start collecting text of constant values earlier: was missing + values in output if there was no space after '=' + +Tue Feb 24 06:08:25 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Escape contant values. + +Tue Feb 24 03:45:06 2004 GOTOU Yuuzou + + * ext/openssl/ossl_config.c (ossl_config_each): add new method + OpenSSL::Config#each. it iterates with section name, field name + and value. + + * ext/openssl/ossl_config.c (Init_ossl_config): include Enumerable. + +Mon Feb 23 09:09:44 2004 Nobuyoshi Nakada + + * instruby.rb (parse_args): use optparse instead of getopts. + + * instruby.rb (DOSISH): embedded path in batch files should not be + prefixed by DESTDIR. [ruby-core:02186] + +Sun Feb 22 14:58:04 2004 Nobuyoshi Nakada + + * ext/extmk.rb: $extstatic is Array or nil now. [ruby-talk:93383] + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub: terminate options. + + * lib/mkmf.rb (init_mkmf): $INCFLAGS also should be lazy-evaluated. + +Sun Feb 22 13:05:37 2004 akira yamada + + * lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment. + +Sun Feb 22 12:58:35 2004 Nobuyoshi Nakada + + * ext/extmk.rb: use optparse instead of getopts. + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub: ditto. + +Sun Feb 22 09:51:00 2004 Gavin Sinclair + + * re.c: corrected documentation format (rb_reg_initialize_m) + +Sat Feb 21 22:41:00 2004 Gavin Sinclair + + * ext/zlib/zlib.c: documented, but needs more effort. + +Sat Feb 21 14:33:20 2004 Nobuyoshi Nakada + + * ext/extmk.rb: prefer relative path. [ruby-talk:93037] + +Sat Feb 21 11:12:08 2004 Nobuyoshi Nakada + + * missing/os2.c, missing/x68.c: typo fix. pointed out by greentea. + +Fri Feb 20 19:11:20 2004 Nobuyoshi Nakada + + * lib/ostruct.rb (OpenStruct#initialize_copy): should not share + members. [ruby-dev:22966] + +Fri Feb 20 18:59:47 2004 Yukihiro Matsumoto + + * lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to + irb. [ruby-dev:39243] + +Fri Feb 20 12:55:27 2004 Nobuyoshi Nakada + + * io.c (pipe_open): fix typo. + + * win32/win32.c (CreateChild): first argument to CreateProcess() must + have path, not just basename. + +Thu Feb 19 23:24:16 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb (Generators::HtmlClass::build_attribute_list): + Support visibility modifiers for attributes + +Thu Feb 19 22:39:00 2004 Gavin Sinclair + + * lib/ostruct.rb: documented + +Thu Feb 19 22:39:04 2004 NAKAMURA, Hiroshi + + * test/rinda/test_rinda.rb: DRb.start_service only once in testsuites. + DRb.start_service could handle this. + +Thu Feb 19 22:24:04 2004 NAKAMURA, Hiroshi + + * lib/soap/mapping/rubytypeFactory.rb: should not dump singleton class. + [ruby-dev:22588] + c = class << Object.new; class C; self; end; end; SOAPMarshal.dump(c) + +Thu Feb 19 18:08:18 2004 Gavin Sinclair + + * ext/strscan/strscan.c: improved documentation + +Thu Feb 19 18:08:18 2004 Nobuyoshi Nakada + + * win32/win32.c, win32/win32.h: fixed prototypes. + + * win32/win32.c (wait): same as waitpid() with -1. + +Thu Feb 19 02:34:28 2004 Dave Thomas + + * lib/rdoc/markup/simple_markup/preprocess.rb (SM::PreProcess::include_file): + Only strip comment markers if all lines start with comments. + +Thu Feb 19 03:05:49 2004 Minero Aoki + + * ext/strscan/strscan.c: StringScanner#restsize is obsolete; + use #rest_size instead. + + * ext/strscan/strscan.c: StringScanner#matchedsize is obsolete; + use #matched_size instead. + +Thu Feb 19 02:42:19 2004 Minero Aoki + + * ext/strscan/strscan.c: don't use rb_eval_string, it defines + classes under the module when required in module clauses. + [ruby-dev:22951] + +Thu Feb 19 02:37:28 2004 Minero Aoki + + * ext/strscan/strscan.c: merge documentation from 1.8 branch. + Thanks Gavin Sinclair. + +Thu Feb 19 00:20:00 2004 Gavin Sinclair + + * lib/cgi-lib.rb: deprecated after 1.8.1 + + * lib/getopts.rb: ditto + + * lib/importenv.rb: ditto + + * lib/parsearg.rb: ditto + +Thu Feb 19 00:11:05 2004 Dave Thomas + + * lib/rdoc/markup/simple_markup/preprocess.rb (SM::PreProcess::handle): + Strip extraneous space from filenames in :include: + +Wed Feb 18 22:53:41 2004 Masatoshi SEKI + + * lib/drb/unix.rb: remove O_NONBLOCk, thanks \ay + +Wed Feb 18 22:42:19 2004 Masatoshi SEKI + + * test/rinda/test_rinda.rb: improt test_rinda.rb + +Wed Feb 18 22:03:11 2004 NAKAMURA, Hiroshi + + * test/*: should not depend on $KCODE. + +Wed Feb 18 18:07:09 2004 NAKAMURA Usaku + + * test/ruby/test_sprintf.rb: added tests. + +Wed Feb 18 17:18:01 2004 WATANABE Hirofumi + + * ext/win32ole/win32ole.c: need to include on Cygwin. + +Wed Feb 18 10:40:38 2004 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): sign bit extension should not be done + if FPLUS flag is specified. [ruby-list:39224] + + * sprintf.c (rb_f_sprintf): do not prepend dots for negative + numbers if FZERO is specified. [ruby-dev:39218] + +Wed Feb 18 10:23:34 2004 NAKAMURA Usaku + + * sprintf.c (rb_f_sprintf): clean up. + +Tue Feb 17 23:40:34 2004 Guy Decoux + + * sprintf.c (rb_f_sprintf): preserve original val for + format_integer. [ruby-talk:92975] + +Tue Feb 17 23:28:45 2004 NAKAMURA, Hiroshi + + * test/soap/marshal/test_marshal.rb, test/ruby/test_marshal.rb: do $: + trick to share the testcase test/ruby/marshaltestlib.rb. + +Tue Feb 17 23:13:23 2004 NAKAMURA, Hiroshi + + * test/ruby/marshaltestlib.rb: common marshal testcase added. + + * test/ruby/test_marshal.rb: use above testsuite. + + * test/soap/marshal/test_marshal.rb: ditto. + + * test/soap/marshal/cmarshal.rb: removed (not used). + +Tue Feb 17 19:34:26 2004 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): $extout_prefix doesn't vary for libraries. + + * ext/extmk.rb (extmake): remove compile directory if empty. + + * ext/extmk.rb (parse_args) lib/mkmf.rb (create_makefile): move + initialization of $extout_prefix from lib/mkmf.rb. [ruby-dev:22928] + + * ext/extmk.rb: clear ext and extout directory when cleaning. + + * lib/mkmf.rb (CLEANLIBS): should be under $(arch) directory. + +Tue Feb 17 18:02:10 2004 Minero Aoki + + * ext/strscan/strscan.c: ScanError may be (wrongly) garbage + collected. (thanks Gavin Sinclair) + + * ext/strscan/strscan.c: move ::ScanError to StringScanner::Error. + ::ScanError is also defined for backward compatibility. + + * ext/strscan/strscan.c: #peep is obsolete, use #peek. + + * ext/strscan/strscan.c: #empty? is obsolete, use #eos?. + + * ext/strscan/strscan.c: #clear is obsolete, use #terminate. + + * ext/strscan/strscan.c: #getbyte is obsolete, use #get_byte. + +Tue Feb 17 12:12:47 2004 Nobuyoshi Nakada + + * ext/extmk.rb (parse_args): delay expanding $(extout) until invoking + make. + + * lib/mkmf.rb (CLEANLIBS): should remove files have specific + extensions. + +Tue Feb 17 11:33:30 2004 Nobuyoshi Nakada + + * lib/rss/rexmlparser.rb: REXML version may be 4 digits. + +Tue Feb 17 10:45:59 2004 NAKAMURA Usaku + + * ext/syck/rubyext.c (syck_emitter_end_object): takes only one arg. + +Tue Feb 17 07:48:21 2004 Nobuyoshi Nakada + + * lib/rexml/encodings/SHIFT_JIS: wrong library name. + +Tue Feb 17 01:35:28 2004 Tanaka Akira + + * eval.c (rb_eval): care that another thread replace NODE_DREGX_ONCE + to NODE_LIT. [ruby-dev:22920] + +Tue Feb 17 01:20:57 2004 Minero Aoki + + * lib/fileutils.rb: new module FileUtils::DryRun. + +Mon Feb 16 23:28:14 2004 NAKAMURA, Hiroshi + + * lib/csv.rb: document reduction. [ruby-core:02429] + + * test/yaml/test_yaml.rb: added 0..1 test with "0".."1" on display. + it should be defined that the specification about what kind of Range + is supported in ruby's custom type in YAML. + +Mon Feb 16 22:22:00 2004 Gavin Sinclair + + * lib/generator.rb: corrected doc format + + * lib/rinda/rinda.rb: added documentation (from Hugh Sasse) + + * lib/rinda/tuplespace.rb: ditto + + [Note: rinda files actually committed Wed Feb 18 07:27:00 2004] + +Mon Feb 16 20:28:52 2004 Hirokazu Yamamoto + + * bcc32/Makefile.sub: show more warnings. (refering to mingw) + + * bcc32/setup.mak: ditto. + +Mon Feb 16 18:35:58 2004 NAKAMURA Usaku + + * win32/Makefile.sub (config.status): should create *.pdb on ext/, + not .ext/. + + * win32/Makefile.sub (config.status): convert the name of import + library. + + * lib/mkmf.rb (create_makefile): now don't need to remove + $(TARGET).lib. + +Mon Feb 16 15:45:22 2004 Nobuyoshi Nakada + + * configure.in: check functions, fork spawnv. + + * io.c (rb_io_s_popen): accept argv not only single command line. + + * process.c (rb_proc_exec_n): export. + + * process.c (rb_check_argv): check if arguments are safe to invoke. + + * process.c (rb_fork): retry to fork. + + * process.c (rb_spawn): spawn child process asynchronously. + + * process.c (rb_f_system): raise an exception if the command could not + execute. + + * win32/win32.c (rb_w32_argv_size): count necessary size for joined + arguments. + + * win32/win32.c (rb_w32_join_argv): join arguments with quoting. + + * win32/win32.c (rb_w32_pipe_exec, rb_w32_spawn, rb_w32_aspawn): + accept program name adding to command line. + +Mon Feb 16 15:18:33 2004 Minero Aoki + + * lib/racc/parser.rb: add note for Racc full package. + +Mon Feb 16 15:13:01 2004 Minero Aoki + + * ext/racc/cparse/README: new file. + + * ext/racc/cparse/MANIFEST: add README. + +Mon Feb 16 12:29:10 2004 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_s_list): new method Iconv.list + (libiconv only). + +Mon Feb 16 10:29:52 2004 Hirokazu Yamamoto + + * dir.c (CompareImpl): File.fnmatch and Dir.glob get better performance + in Win32. This is achived by calling downcase() for single-byte + characters. (CharLower() is slower than downcase()) + +Mon Feb 16 02:14:29 2004 Hirokazu Yamamoto + + * bcc32/Makefile.sub: should warn suspicious pointer conversion. + + * bcc32/setup.mak: ditto. + +Sun Feb 15 20:56:22 2004 Hirokazu Yamamoto + + * dir.c (push_braces): remove wrong const. [ruby-dev:22891] + +Sun Feb 15 20:41:15 2004 NAKAMURA, Hiroshi + + * sample/soap/calc/httpd.rb, sample/soap/exchange/httpd.rb, + sample/soap/sampleStruct/httpd.rb, sample/wsdl/googleSearch/httpd.rb: + use soap/property instead of getopts for configuring DocumentRoot + and port# of httpd. see samplehttpd.conf below. + + * sample/soap/calc/samplehttpd.conf, + sample/soap/exchange/samplehttpd.conf, + sample/soap/sampleStruct/samplehttpd.conf, + sample/wsdl/googleSearch/samplehttpd.conf: added. + +Sun Feb 15 19:13:33 2004 Masatoshi SEKI + + * lib/rinda/tuplespace.rb: read(tpl,0), raise RequestExpiredError + if not found. + +Sun Feb 15 15:48:57 2004 Masaki Suketa + + * ext/win32ole/win32ole.c: add IDispatch wrapper in val2variant. + Thanks, arton. + +Sun Feb 15 15:23:29 2004 Hirokazu Yamamoto + + * ruby.h, dir.c (rb_glob): add const. + +Sun Feb 15 01:46:05 2004 GOTOU Yuuzou + + * lib/mkmf.rb: absolute path of ruby is assigned to $(RUBY). + [ruby-dev:22870] + +Sat Feb 14 23:59:11 2004 Nobuyoshi Nakada + + * mkconfig.rb: use fileutils.rb instead of ftools.rb. + + * bcc32/Makefile.sub, win32/Makefile.sub (config.h): define + STACK_GROW_DIRECTION. + + * bcc32/Makefile.sub (config.h): add newer checks. + + * wince/Makefile.sub (config.h): define NEED_IO_SEEK_BETWEEN_RW. + +Sat Feb 14 23:26:27 2004 WATANABE Hirofumi + + * lib/un.rb: use OptionParser instead of getopts. + +Sat Feb 14 11:28:14 2004 Masatoshi SEKI + + * sample/drb/*: import lib/drb/sample + +Sat Feb 14 11:14:12 2004 Masatoshi SEKI + + * lib/drb/drb.rb: add pretty_print, thanks gotoken. + +Fri Feb 13 21:51:00 2004 Gavin Sinclair + + * lib/fileutils.rb: slighly improved documentation (sync with 1.8) + +Fri Feb 13 19:57:01 2004 Kouhei Sutou + + * test/rss/test_trackback.rb: added tests for TrackBack with RSS + 2.0. + + * test/rss/common.rb: added methods make RSS 2.0. + + * lib/rss/trackback.rb: TrackBack API is decided. + + * lib/rss/rss.rb: RSS::VERSION 0.0.7 -> 0.0.8. + + * lib/rss/parser.rb, lib/rss/rss.rb: replaced $DEBUG by RSS::DEBUG. + + * lib/rss/2.0.rb: removed RSS 2.0 URI. Because RSS 2.0 doesn't + have URI. + +Fri Feb 13 14:41:00 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: en-bugged at last commit (Feb 11 23:24:22 2004) + +Fri Feb 13 12:26:37 2004 Minero Aoki + + * test/fileutils/test_fileutils.rb: rescue SystemCallError instead + of EINVAL. File.link may raise EACCES on network file systems. + +Fri Feb 13 05:18:58 2004 Minero Aoki + + * test/fileutils/test_fileutils.rb: File.link raises EINVAL on + Win9x. [ruby-dev:22713] + +Thu Feb 12 21:49:00 2004 Gavin Sinclair + + * lib/ftools.rb: documented + +Thu Feb 12 21:19:00 2004 Gavin Sinclair + + * lib/base64.rb: added and tidied documentation + +Thu Feb 12 20:45:01 2004 Minero Aoki + + * lib/net/protocol.rb (WriteAdapater#puts): must append "\n" to + the string, don't prepend. (ruby-bugs:PR#1280) + +Thu Feb 12 20:31:43 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (create_tmpsrc): cpp32 of Borland C++ ignores #error + directives in DOS line-ending files at all. + +Thu Feb 12 15:23:20 2004 Nobuyoshi Nakada + + * parse.y (rparen): ignore preceding newlines to right parentheses. + (ruby-bugs:PR#1221) [ruby-dev:22858] + +Thu Feb 12 14:17:43 2004 WATANABE Hirofumi + + * configure.in: set ac_cv_func_link to yes to enable link() on MinGW. + [ruby-dev:22241] + +Thu Feb 12 13:32:49 2004 NAKAMURA Usaku + + * win32/win32.c (link): raise NotImplementedError on Win9X. + contributed by Tietew. [ruby-dev:22713] + + * win32/win32.c, win32/win32.h (link): add const. + +Thu Feb 12 09:56:19 2004 Nobuyoshi Nakada + + * ext/tk/lib/tk.rb (TkComm::tk_split_list): suppress a warning. + +Thu Feb 12 02:23:56 2004 Tanaka Akira + + * lib/pathname.rb: use assert_raise instead of assert_raises. + + * lib/pp.rb: ditto. + + * lib/time.rb: ditto. + + * lib/tsort.rb: ditto. + use TSortHash and TSortArray instead of Hash and Array in test. + +Wed Feb 11 23:24:22 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: properly treat a Tcl/Tk's string with escaping + special characters. + +Tue Feb 10 20:49:07 2004 Nobuyoshi Nakada + + * eval.c (method_proc): return bound Proc object. [ruby-dev:22854] + + * eval.c (rb_mod_define_method): bind method body itself for Method + object. + + * node.h (NODE_DMETHOD): deprecated. + + * object.c (rb_class_inherited_p): export. + +Tue Feb 10 16:43:50 2004 Nobuyoshi Nakada + + * eval.c (umethod_bind): purge unused check. [ruby-dev:22850] + +Tue Feb 10 14:33:08 2004 NAKAMURA Usaku + + * string.c (rb_str_match): raise TypeError when both arguments are + strings. [ruby-dev:22851] + + * string.c (rb_str_match2): removed. + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, + wince/Makefile.sub (string.c): now not depend on version.h. + +Mon Feb 9 17:46:07 2004 Nobuyoshi Nakada + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, configure.in, + runruby.rb: run rdoc, test and so on with compiled extension + libraries. [ruby-dev:22688] + + * ext/extmk.rb, lib/mkmf.rb: make extension libraries in separated + directory, similar to the actual directory structure. + + * lib/fileutils.rb (FileUtils.copy_file): use the mode of the original + file to create new file. + + * lib/rdoc/ri/ri_paths.rb (RI::Paths::SYSDIR): get rid of unexpected + influence by envirionment variable. + + * bcc32/configure.bat, win32/configure.bat: add install-doc options. + + * win32/win32.c, win32/win32.h (rb_w32_fstat): fix Borland C runtime + bug which returns wrong mode. [ruby-dev:22846] + +Mon Feb 9 16:30:12 2004 Nobuyoshi Nakada + + * process.c (detach_process_watcher): return the last status. + [ruby-dev:22841] + +Sun Feb 8 16:46:08 2004 Nobuyoshi Nakada + + * lib/pp.rb (PP::PPMethods::object_address_group): suppress negative + sign for higher heap areas. + +Sun Feb 8 16:18:27 2004 akira yamada + + * test/yaml/test_yaml.rb (YAML_Unit_Tests::test_range_cycle): + added tests. + +Sun Feb 8 15:51:57 2004 akira yamada + + * test/ruby/test_file.rb (TestFile::test_fnmatch): added tests for + File.fnmatch. [ruby-dev:22815][ruby-dev:22819] + +Sun Feb 8 15:41:45 2004 akira yamada + + * test/yaml/test_yaml.rb (YAML_Unit_Tests::test_range_cycle): + added tests. [ruby-core:02306] [ruby-core:02311] + +Sun Feb 8 14:24:35 2004 Minero Aoki + + * lib/net/http.rb (HTTP#request): should not overwrite Connection + header. (ruby-bugs:PR#1274) + +Sun Feb 8 10:11:21 2004 Hirokazu Yamamoto + + * dir.c (glob_helper): Dir.glob('**/') did not work. [ruby-dev:22832] + +Sun Feb 8 00:29:26 2004 Hirokazu Yamamoto + + * dir.c (fnmatch): File.fnmatch('*?', 'a') should return true. + [ruby-dev:22815] + + * dir.c (fnmatch): File.fnmatch('\[1\]' , '[1]') should return true. + [ruby-dev:22819] + + * dir.c: Did some styles (no change to behavior) + +Sat Feb 7 19:56:11 2004 Nobuyoshi Nakada + + * lib/irb/init.rb (IRB.rc_files): yield possible rc file names. + + * lib/irb/input-method.rb (IRB::ReadlineInputMethod::initialize): + load and save history automatically. [ruby-core:02352] + +Fri Feb 6 22:48:16 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb (gen_url): Support + https in RDoc hyperlinks + +Fri Feb 6 22:41:22 2004 NAKAMURA, Hiroshi + + * lib/pp.rb (PPInspectTest#test_to_s_with_iv): rollback the previous + commit. [ruby-dev:22813] + +Fri Feb 6 22:22:50 2004 NAKAMURA, Hiroshi + + * lib/pp.rb (PPInspectTest#test_to_s_with_iv): remove instance + variable which is defined in the test. + +Fri Feb 6 18:54:18 2004 akira yamada + + * test/ruby/test_proc.rb (TestProc::test_eq): added a + test. [ruby-dev:22599] + +Fri Feb 6 18:26:00 2004 akira yamada + + * test/ruby/test_proc.rb (TestProc::test_eq): added tests for + Proc#==. [ruby-dev:22592], [ruby-dev:22601] + +Fri Feb 6 10:12:06 2004 Nobuyoshi Nakada + + * ext/socket/socket.c (bsock_do_not_reverse_lookup): control reverse + lookup for every instance. [ruby-core:02346] + +Fri Feb 6 09:15:11 2004 Nobuyoshi Nakada + + * lib/irb/extend-command.rb: add irb_help command. [ruby-talk:91610] + + * lib/irb/cmd/help.rb (IRB::ExtendCommand::Help): show RDoc. + +Fri Feb 6 00:48:37 2004 Tanaka Akira + + * lib/prettyprint.rb (PrettyPrint#first?): obsoleted. + +Thu Feb 5 23:56:55 2004 Tanaka Akira + + * lib/prettyprint.rb (PrettyPrint#seplist): added. + + * lib/pp.rb (PPMethods#pp_object): use seplist. + (PPMethods#pp_hash): ditto. + (Array#pretty_print): ditto. + (Struct#pretty_print): ditto. + (MatchData#pretty_print): ditto. + + * lib/set.rb (Set#pretty_print): use seplist. + +Wed Feb 4 22:39:46 2004 Nobuyoshi Nakada + + * file.c (rb_stat_mode): should not sign-expand, so backout. + +Wed Feb 4 02:12:06 2004 Tanaka Akira + + * file.c (test_l): fix wrong method name in document. + (test_S): ditto. + (test_b): ditto. + (test_c): ditto. + (test_suid): ditto. + (test_sgid): ditto. + (test_sticky): ditto. + +Tue Feb 3 22:36:25 2004 Kouhei Sutou + + * lib/rss/2.0.rb, lib/rss/content.rb, lib/rss/dublincore.rb, + lib/rss/rss.rb, lib/rss/syndication.rb: removed warnings. + + * lib/rss/converter.rb: removed handling load error of nkf. + + * test/rss/test_syndication.rb, test/rss/test_trackback.rb, + test/rss/test_dublincore.rb, test/rss/test_content.rb: replaced + 'require "rss/parser"' by 'require "rss/1.0"'. + + * test/rss/test_parser.rb, test/rss/test_accessor.rb: removed + 'require "rss/parser"'. + +Tue Feb 3 11:23:17 2004 Nobuyoshi Nakada + + * parse.y (reduce_nodes): remove tail returns. [ruby-talk:90934] + +Tue Feb 3 08:04:57 2004 Tanaka Akira + + * lib/pp.rb (Struct#pretty_print_cycle): follow 1.8 style. + +Mon Feb 2 22:06:31 2004 Nobuyoshi Nakada + + * parse.y (block_append, new_evstr, void_expr0): remove no longer used + labels. + +Mon Feb 2 18:45:50 2004 WATANABE Hirofumi + + * dln.c (dln_load): don't specify RTLD_GLOBAL on Interix, + because it caused SEGV when running runner.rb. + +Mon Feb 2 01:54:00 2004 Tanaka Akira + + * lib/pp.rb (Struct#pretty_print): make it 1.8 style. + (Numeric#pretty_print, FalseClass#pretty_print) + (TrueClass#pretty_print, Module#pretty_print): fix pp for objects + with instance variables. [ruby-talk:91157] + + * lib/open-uri.rb (URI::Generic#find_proxy): return nil on loopback + address. + + * lib/resolv-replace.rb (BasicSocket#send): don't replace because + it has no hostname argument. + (IPSocket.getaddress): raise SocketError instead of + Resolv::ResolvError for errors. + (TCPSocket#initialize, UDPSocket#bind, UDPSocket#connect) + (SOCKSSocket#initialize): use IPSocket.getaddress instead of + Resolv.getaddress. + (UDPSocket#send): recognize 3 arguments form. try all addresses on + 4 arguments form. + +Sun Feb 1 23:00:00 2004 Shigeo Kobayashi + + * ext/bigdecimal.c: Bug in BigDecimal("1e#{n}").add BigDecimal('.5'),n) + reported and fixed by Javier Goizueta. + +Sun Feb 1 18:21:00 2004 Gavin Sinclair + + From ruby_1_8 branch: + * lib/test/unit.rb: rearranged documentation for RDoc's sake. + * lib/matrix.rb: improved documentation. + * lib/net/http.rb: slight documentation formatting improvement. + +Sun Feb 1 05:30:06 2004 Tanaka Akira + + * lib/open-uri.rb (URI::Generic#find_proxy): warn HTTP_PROXY. + raise an errror on non-http proxy URI. + (OpenURI::Buffer#<<): make a tempfile binmode. [ruby-talk:90793] + +Sun Feb 1 00:57:41 2004 Kouhei Sutou + + * lib/rss/parser.rb (RSS::Parser): added @@default_parser. Used + XML parser became selectable. + * test/rss/test_parser.rb: added tests for + RSS::Parser.default_parser. + +Sat Jan 31 02:28:15 2004 WATANABE Hirofumi + + * configure.in (RPATHFLAG): set to -Wl,-R like NetBSD on Interix. + +Sat Jan 31 01:09:41 2004 NAKAMURA, Hiroshi + + * lib/logger.rb: leading 0 padding of timestamp usec part. + +Fri Jan 30 18:53:23 2004 Yukihiro Matsumoto + + * re.c (KR_REHASH): wrong hash value on sizeof(long) > sizeof(int). + +Thu Jan 29 23:11:57 2004 WATANABE Hirofumi + + * configure.in (DLEXT2): removed. Ruby does not treat + ".dll" as a extention library anymore. + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub (DLEXT2): + ditto. + + * util.c (mblen): fix overrun. [ruby-dev:22672] + +Thu Jan 29 22:41:53 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Allow 'link:' in Tidylinks. + THis means you can write "see f1[link:files/f1_rb.html]". + +Thu Jan 29 22:24:47 2004 NAKAMURA, Hiroshi + + * sample/openssl/gen_csr.rb: follow OpenSSL::X509::Name change. + ASN.1 type of subject DN elements were wrong. + +Thu Jan 29 22:19:51 2004 NAKAMURA, Hiroshi + + * test/*: remove $: trick. [ruby-dev:22763] use test/runner.rb to + run test. + +Thu Jan 29 19:28:16 2004 Minero Aoki + + * lib/net/http.rb (Request#initialize): reject only when a path is + empty. [ruby-dev:22771] + +Thu Jan 29 18:54:08 2004 H.Yamamoto + + * dir.c (glob_helper): infinite loop bug in win32 code. + [ruby-dev:22770] + +Thu Jan 29 17:03:49 2004 Yukihiro Matsumoto + + * dir.c: merge tuning from H.Yamamoto . + [ruby-dev:22761] + +Thu Jan 29 11:32:14 2004 NAKAMURA, Hiroshi + + * test/rss/test_*: do $: trick while searching a module in the current + directory. + + * test/xsd/test_xmlschemaparser.rb, test/wsdl/test_emptycomplextype.rb, + test/soap/helloworld/test_helloworld.rb, + test/soap/calc/{test_calc.rb,test_calc2.rb}: do File.expand_path + before using __FILE__. + + * test/yaml/test_yaml.rb: assert_equals -> assert_equal. + +Thu Jan 29 01:56:02 2004 why the lucky stiff + + * ext/syck/rubyext.c: usec round-tripping skew. [ruby-core:2305] + + * lib/yaml/rubytypes.rb: character Range now round-trips. [ruby-core:2306] + + * test/yaml/test_yaml.rb: add Time and Range tests. + +Thu Jan 29 00:00:46 2004 Kouhei Sutou + + * lib/rss: rss/parser.rb is always required. + +Wed Jan 28 15:09:14 2004 Nobuyoshi Nakada + + * test/rss/*.rb: remove "test/" prefix. + +Wed Jan 28 13:07:02 2004 Nobuyoshi Nakada + + * ext/iconv/extconf.rb: include iconv.h for libiconv. [ruby-dev:22715] + +Wed Jan 28 12:43:07 2004 Yukihiro Matsumoto + + * lib/rss: rss library imported. [ruby-dev:22726] + +Wed Jan 28 04:29:41 2004 Eric Schwartz + + * lib/cgi/session.rb: use LOCK_SH to read, and a few other + improvements. [ruby-core:02328] + +Tue Jan 27 15:00:14 2004 Yukihiro Matsumoto + + * misc/ruby-mode.el: better support for general delimited + strings. [ruby-dev:22695] + +Tue Jan 27 11:04:40 2004 FUKUMOTO Atsushi + + * ext/socket/socket.c (s_recvfrom): sending length should be an + invariant while retrying on EAGAIN. [ruby-talk:89962] + +Tue Jan 27 10:31:28 2004 NAKAMURA Usaku + + * ext/win32ole/win32ole.c (set_argv): fix condition. + +Tue Jan 27 02:26:31 2004 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick:HTTPUtils::parse_header): + refine regex for header-name. + +Mon Jan 26 22:53:04 2004 Dave Thomas + + * io.c: Remove documentation references to $defout. + +Mon Jan 26 14:41:46 2004 Yukihiro Matsumoto + + * lib/weakref.rb (WeakRef::initialize): set up @__id before + calling "super". + + * lib/delegate.rb (Delegator::initialize): preserve + singleton_method_added method [ruby-dev:22685] + + * lib/delegate.rb (Delegator::initialize): use Kernel::raise + instead of mere raise. [ruby-dev:22681] + +Mon Jan 26 12:45:23 2004 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: define CONST84 when TCL_MAJOR_VERSION == 7 + +Mon Jan 26 11:30:58 2004 Nobuyoshi Nakada + + * ext/extmk.rb: Makefiles should depend on also rbconfig.rb. + (ruby-bugs:PR#1256) + + * ext/win32ole/win32ole.c (set_argv): set real arguments to + WIN32OLE::ARGV. [ruby-list:39073] + +Sun Jan 25 18:25:26 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): third + argument become optional. + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): ditto. + + * ext/openssl/ossl_x509name.c (Init_x509name): emailAddress and + domainComponent should be IA5String. + +Sun Jan 25 01:45:38 2004 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): support + virtual host. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#virtual_host): add + new method to register virtual hosting server. + + * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): add + new method to lookup virtual hosting server. + +Sat Jan 24 13:06:26 2004 GOTOU Yuuzou + + * ext/openssl/ossl_x509hame.c (ossl_x509name_initialize): change + second argument. it expected to be a Hash not an Integer. + + * ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): add new + function for OpenSSL::X509::Name#add_entry. + + * ext/openssl/ossl_x509name.c (Init_ossl_x509name): add constants + OpenSSL::X509::Name::DEFAULT_OBJECT_TYPE and OBJECT_TYPE_TEMPLATE. + + * ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name#initialize): + second argument takes OBJECT_TYPE_TEMPLATE by default. + +Fri Jan 23 02:26:30 2004 Yukihiro Matsumoto + + * pack.c (num2i32): pack should not raise RangeError. + [ruby-dev:22654] + + * pack.c (pack_pack): do not auto convert nil to zero. + +Thu Jan 22 22:54:53 2004 Shugo Maeda + + * lib/net/imap.rb (BEG_REGEXP): allow 8-bit characters in quoted + strings for Novell GroupWise Internet Agent. + + * lib/net/imap.rb (DATA_REGEXP): ditto. + +Thu Jan 22 18:35:49 2004 WATANABE Hirofumi + + * lib/e2mmap.rb (VERSION): remove unnecessary version checking. + +Thu Jan 22 16:21:02 2004 Nobuyoshi Nakada + + * parse.y (string_content): reset lexical states at the beginning of + string contents. [ruby-list:39061] + +Thu Jan 22 08:08:50 2004 Yukihiro Matsumoto + + * parse.y (opt_rescue): use NODE_ERRINFO() instead of + NODE_GVAR("$!"), to avoid confusion from variable aliasing. + [ruby-talk:90074] + + * version.c (Init_version): remove obsolete constants VERSION + etc. [ruby-dev:22643] + +Thu Jan 22 01:46:32 2004 Yukihiro Matsumoto + + * parse.y (newline_node): do not use NODE_NEWLINE node anymore, + use NEWLINE flag instead. + +Thu Jan 22 01:12:12 2004 Siena. + + * missing/os2.c (chdir, getcwd): + use _chdir2 and _getcwd2 supporting multiple drives in OS/2 with EMX. + +Thu Jan 22 00:33:52 2004 Siena. + + * configure.in: check availability of link(). [ruby-dev:22237] + * file.c (rb_file_s_link): raise an exception when link() is unavailable. + * missing/os2.c (link): removed. File#link isn't supported. + * bcc32/Makefile.sub: define HAVE_LINK to enable link(). [ruby-dev:22241] + * win32/Makefile.sub: ditto. + +Thu Jan 22 00:26:25 2004 Siena. + + * ChangeLog: typo: RUBY_MBCHAR_MAX was RUBY_MBCHAR_MAXSIZE. + +Thu Jan 22 00:12:51 2004 Siena. + + * defines.h: define RUBY_MBCHAR_MAX instead of MB_CUR_MAX. + * dir.c (Next, emx_mblen): use RUBY_MBCHAR_MAX for mblen(). + * file.c (CharNext): ditto. + * ruby.c (translate_char): ditto. + * util.c (__crt0_glob_function): ditto. + +Thu Jan 22 00:10:01 2004 Dave Thomas + + * lib/base64.rb: :nodoc: the Deprecated module + +Wed Jan 21 23:52:39 2004 WATANABE Hirofumi + + * configure.in: Interix(SFU) support. + +Wed Jan 21 23:03:45 2004 Masatoshi SEKI + + * lib/drb/drb.rb: remove O_NONBLOCK, thanks \ay + * lib/drb/extserv.rb: typo + +Wed Jan 21 17:57:56 2004 Shugo Maeda + + * lib/net/imap.rb (envelope): allow NIL. + * lib/net/imap.rb (body): ditto. + * lib/net/imap.rb (number): ditto. + * lib/net/imap.rb (ensure_nz_number): show a detailed error + message. + +Wed Jan 21 16:44:15 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (merge_libs): squeeze successive same libraries. + [ruby-dev:22652] + +Wed Jan 21 16:10:36 2004 Nobuyoshi Nakada + + * lib/base64.rb: enclosed in a module. [ruby-core:02285] + +Wed Jan 21 16:01:26 2004 Nobuyoshi Nakada + + * ext/digest/rmd160/extconf.rb: have_library appends found library. + +Wed Jan 21 11:36:00 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_gethostbyname): returns host if + ai_canonname is NULL. (ruby-bugs PR#1243) + + * parse.y (block_append): update nd_end for "real" head node. + [ruby-list:39058] + +Tue Jan 20 14:48:28 2004 GOTOU Yuuzou + + * ext/openssl/extconf.rb: should check instead + of OPENSSL_VERSION_NUMBER. [ruby-list:39056] + +Tue Jan 20 14:43:17 2004 Dave Thomas + + * lib/base64.rb: Add RDoc + +Tue Jan 20 14:25:51 2004 Dave Thomas + + * lib/abbrev.rb: Add RDoc + +Tue Jan 20 13:22:39 2004 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Document aliases at + top-most level. + + * lib/English.rb: Document English.rb. + +Tue Jan 20 04:41:58 2004 Nobuyoshi Nakada + + * test/ruby/test_marshal.rb (MarshalTestLib::test_exception): test + for [ruby-dev:22604]. + + * test/ruby/test_marshal.rb (MarshalTestLibtest_singleton): test + for [ruby-dev:22588]. + +Tue Jan 20 02:38:13 2004 Yukihiro Matsumoto + + * marshal.c (w_class): should not dump singleton class. + [ruby-dev:22631] + +Tue Jan 20 02:49:22 2004 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for OpenSSL version. + [ruby-list:39054] + +Mon Jan 19 23:56:20 2004 Nobuyoshi Nakada + + * error.c (name_err_mesg_to_str): inverted condition for result of + inspection. [ruby-dev:22628] + +Mon Jan 19 22:24:28 2004 WATANABE Hirofumi + + * sample/exyacc.rb: escape '}' to avoid warning. + + * lib/rdoc/parsers/parse_c.rb: escape '{' and '}' to avoid warnings. + +Mon Jan 19 21:28:06 2004 Nobuyoshi Nakada + + * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: remove + useless casts for Borland C. + +Mon Jan 19 17:39:38 2004 Nobuyoshi Nakada + + * error.c (NameError::message): internal use only. + + * eval.c (rb_method_missing): use hidden constant. + +Mon Jan 19 16:30:53 2004 akira yamada + + * test/ruby/test_time.rb: added tests for [ruby-dev:22614] and + [ruby-dev:22617]. + +Mon Jan 19 13:09:21 2004 NAKAMURA Usaku + + * ext/extmk.rb, win32/Makefile.sub, win32/configure.bat, + win32/setup.mak: --with-static-linked-ext support on mswin32. + +Mon Jan 19 06:49:07 2004 Tadayoshi Funaba + + * lib/date.rb: zone was wrong when it was behind UTC. + Thanks Mark J. Reed. + + * lib/date/format.rb: %z is now always replaced by four digits + with a leading plus or minus sign. + + * sample/cal.rb: added a class, anyway. + +Mon Jan 19 01:08:39 2004 Yukihiro Matsumoto + + * class.c, error.c, eval.c, intern.h, object.c, variable.c: + do not set path if it is a singleton class. [ruby-dev:22588] + + * lib/cgi.rb (CGI::QueryExtension): give extended string, not a + delegater object. + +Sun Jan 18 23:59:44 2004 Nobuyoshi Nakada + + * ext/iconv/charset_alias.rb: prefer us_EN locale encodings or + former. [ruby-dev:22609] + + * ext/iconv/iconv.c (iconv_create): raise InvalidEncoding + exception when EINVAL. + +Sun Jan 18 23:16:34 2004 Nobuyoshi Nakada + + * class.c, error.c, file.c, io.c, numeric.c, object.c, re.c, struct.c, + time.c: marked init_copy functions nodoc. + +Sun Jan 18 20:47:35 2004 WATANABE Hirofumi + + * ruby.c: use translate_char() on Cygwin. + +Sun Jan 18 20:00:16 2004 NAKAMURA, Hiroshi + + * lib/soap/wsdlDriver.rb, lib/wsdl/soap/operation.rb: add support of + "parts" attribute of soap:body element in WSDL. + + * lib/wsdl/xmlSchema/schema.rb: friendly warning message for + simpleType element which is not supported for now. + + * test/wsdl/soap/{soapbodyparts.wsdl,test_soapbodyparts.wsdl}: new + files. + +Sun Jan 18 16:46:48 2004 Nobuyoshi Nakada + + * time.c (time_overflow_p): should return results. [ruby-dev:22614] + +Sun Jan 18 12:07:24 2004 Siena. + + * test/ruby/test_time.rb: new test case to test Time#[+-]. + + * time.c (time_plus, time_minus): fix RangeError for a negative + argument in environments whose time_t is unsigned. [ruby-dev:22608] + +Sun Jan 18 02:33:26 2004 WATANABE Hirofumi + + * defines.h (_WIN32): undef _WIN32 on Cygwin before defining DOSISH. + +Sun Jan 18 00:23:55 2004 Nobuyoshi Nakada + + * marshal.c (class2path): check anonymous class/module before + checking referable, and allow singleton classes. + +Sat Jan 17 23:58:51 2004 Nobuyoshi Nakada + + * error.c (NameError::Message): new class for lazy evaluation of + message to ensure replaced before marshalling. [ruby-dev:22604] + + * eval.c (rb_method_missing): use NameError::Message. + +Sat Jan 17 21:49:50 2004 NAKAMURA Usaku + + * lib/time.rb (test_rfc2822, test_rfc3339, test_encode_xmlschema): + should not expect that all platforms handle negative time_t value. + +Fri Jan 16 23:53:09 2004 Nobuyoshi Nakada + + * eval.c (proc_eq): compare also arguments and environment + (including local variables). [ruby-dev:22590] + +Fri Jan 16 14:33:35 2004 Nobuyoshi Nakada + + * marshal.c (class2path): get class path and check referable. + [ruby-dev:22588] + +Thu Jan 15 12:58:26 2004 Nobuyoshi Nakada + + * io.c (argf_read): do not append EOF. (ruby-bugs-ja:PR#585) + + * io.c (rb_io_fwrite): ad-hockery hack to get rid of HP-UX stdio + weird behavior. [ruby-dev:22424] + +Wed Jan 14 21:13:06 2004 Nobuyoshi Nakada + + * test/inlinetest.rb (InlineTest::eval_part): eval under the top + level environment. + +Wed Jan 14 17:54:17 2004 Nobuyoshi Nakada + + * test/inlinetest.rb (InlineTest::loadtest): require instead of + load, to get rid of multiple loading. + +Wed Jan 14 13:30:52 2004 Nobuyoshi Nakada + + * ext/iconv/extconf.rb: wrapper iconv.rb is dependent on platform. + +Wed Jan 14 09:32:02 2004 NAKAMURA Usaku + + * MANIFEST: add test/net/test_httpheader.rb. (commit miss?) + +Wed Jan 14 00:58:35 2004 Yukihiro Matsumoto + + * eval.c (Init_Proc): move SystemStackError from under + StandardError to Exception. [ruby-talk:89782] + +Tue Jan 13 18:03:02 2004 Ian Macdonald + + * file.c (rb_stat_wr, rb_stat_ww): New functions + implementing new methods (File::Stat#world_readable?, + File::Stat#world_writable?). + +Tue Jan 13 16:53:25 2004 why the lucky stiff + + * ext/syck/rubyext.c: omission of Date library code caused + test suite failure. [ruby-core:2251] + +Tue Jan 13 16:50:03 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: use $0 as the default application class name. + +Tue Jan 13 14:48:00 2004 Ian Macdonald + + * lib/pathname.rb: New methods (Pathname#world_readable?, + Pathname#world_writable?). + +Tue Jan 13 14:48:01 2004 Yukihiro Matsumoto + + * parse.y (primary): allow no "when" case. [ruby-dev:22578] + + * ruby.h (rb_class_of): reduce branch. [ruby-dev:22577] + + * ruby.h (rb_type): ditto. + +Tue Jan 13 14:26:59 2004 Kazuhiro NISHIYAMA + + * lib/test/unit/ui/testrunnerutilities.rb (TestRunnerUtilities): + moved run method which allows output level. [ruby-dev:22554] + +Tue Jan 13 13:04:24 2004 NAKAMURA, Hiroshi + + * test/test_*.rb: Pathname#parent -> Pathname#dirname. + +Tue Jan 13 11:38:58 2004 Nobuyoshi Nakada + + * test/yaml/test_yaml.rb (YAML_Unit_Tests::test_spec_type_{int,float}): + fix syntax error. + +Tue Jan 13 07:52:40 2004 why the lucky stiff + + * ext/syck/bytecode.c: turn off default implicit typing. + + * ext/syck/implicit.c: detect base60 integers. + + * ext/syck/rubyext.c: handle base60, as well as hex and octal + with commas. implicit typing of ruby symbols. + + * test/yaml/test_yaml.rb: add test. + +Tue Jan 13 04:29:52 2004 Dave Thomas + + * lib/rdoc/ri/ri_driver.rb (RiDriver::report_method_stuff): + Show fully-qualified class names in class list. + +Tue Jan 13 01:24:17 2004 Yukihiro Matsumoto + + * file.c (test_wr): Rdoc fix. [ruby-core:02225] + +Tue Jan 13 01:04:37 2004 Dave Thomas + + * lib/rdoc/ri/ri_paths.rb (RI::Paths): First attempt at + incorporating DESTDIR in the rdoc installation. + +Mon Jan 12 23:26:21 2004 Nobuyoshi Nakada + + * parse.y (primary): fix position after FCALL. [ruby-dev:22574] + +Mon Jan 12 18:00:11 2004 Ian Macdonald + + * file.c (test_wr, test_ww): New functions implementing new + methods (File::world_readable?, File::world_writable?). + + * file.c (S_IRUGO, S_IGUGO): New macros. + +Mon Jan 12 12:07:22 2004 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): + Someone changed the "// in eval.c" comments to "/*...*/" style, + so the parsing of the source file name broke. + + * object.c: Remove spurious space in TrueClass documentation. + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body): Fix + bad regexp: if the code before a documented method contained + a comment that wasn't terminated by whitespace, that comment + and all intervening code was included in the following + method's documentation. + + * lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter::break_to_newline): + HTML formats need explicit line breaks. + +Mon Jan 12 02:24:07 2004 Dave Thomas + + * lib/rdoc/ri/ri_formatter.rb (RI::HtmlFormatter): Add HTML + generation support to ri (Elliot Hughes) + +Sun Jan 11 23:54:41 2004 Nobuyoshi Nakada + + * env.h (ruby_frame, ruby_scope, ruby_in_eval, ruby_class, + ruby_dyna_vars): export. [ruby-dev:22566] + +Sun Jan 11 02:35:53 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (make_hostent): a bug in brace position. + + * configure.in: install rdoc by default. if you do not want to + install rdoc, specify --disable-install-doc. + +Sun Jan 11 02:07:47 2004 Dave Thomas + + * lib/rdoc/ri/ri_options.rb (RI::Options::OptionList::OptionList): + Also accept command line options via the 'RI' environment variable. + +Sat Jan 10 21:27:41 2004 Yukihiro Matsumoto + + * eval.c (eval): need to add message delimiter. [ruby-dev:22561] + +Sat Jan 10 01:54:50 2004 Eric Sunshine + + * defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP, + S_IRWXO, etc. macros are defined since future code might require + them (even though present code only requires a subset). + + * defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set + correctly on Rhapsody when -arch compiler flag was used (via + configure's --enable-fat-binary option). + +Sat Jan 10 23:01:41 2004 Nobuyoshi Nakada + + * configure.in (LIBPATHFLAG, RPATHFLAG): enclose paths with single + quotes. [ruby-dev:22564] + + * lib/mkmf.rb (libpathflag): do not enclose with quotes always. + + * {bcc32,win32,wince}/Makefile.sub (LIBPATHFLAG): quoted. + +Sat Jan 10 22:46:18 2004 Nobuyoshi Nakada + + * dir.c (dir_inspect): new method, Dir#inspect. [ruby-dev:22562] + +Fri Jan 9 17:36:51 2004 Yukihiro Matsumoto + + * ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not + fill ai_canonname if serv is not supplied. (ruby-bugs PR#1243) + +Fri Jan 9 13:14:59 2004 NAKAMURA, Hiroshi + + * lib/test/unit/collector/dir.rb: do not ignore exceptions(LoadError + and SystemExitError) while loading a testcase. smell of bug. + + * test/testunit/collector/test_dir.rb: add new test of the LoadError. + + * test/drb/{test_drbssl.rb,test_drbunix.rb}: do not define testcase if + openssl is not installed. + + * test/testunit/collector/test_dir.rb: assert_raises -> assert_raise. + +Fri Jan 9 11:52:16 2004 Nobuyoshi Nakada + + * rubysig.h: is needed to use errno which may be a macro. + +Fri Jan 9 11:20:24 2004 Siena. + + * ext/extmk.rb (extmake): should not reduce necessary libraries. + [ruby-dev:22440] + + * lib/mkmf.rb (merge_libs): merge libraries according to + dependency. + +Fri Jan 9 10:05:23 2004 Siena. + + * lib/mkmf.rb (libpathflag): use single quotes. [ruby-dev:22440] + +Thu Jan 8 23:49:21 2004 WATANABE Hirofumi + + * configure.in (RDOCTARGET): new macro. if you want to install + rdoc documentation, you need to run configure with + --enable-install-doc. + +Thu Jan 8 21:17:43 2004 GOTOU Yuuzou + + * ext/openssl/ossl_pkey.c (ossl_pkey_to_der): removed; it returns + public key only. + + * ext/openssl/ossl_pkey_dh.c (ossl_dh_to_der): new function for + OpenSSL::PKey::DH#to_der. + + * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_to_der): new function for + OpenSSL::PKey::DSA#to_der. + + * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_to_der): new function for + OpenSSL::PKey::RSA#to_der. + +Thu Jan 8 18:25:29 2004 Nobuyoshi Nakada + + * dir.c (glob_helper): should not recurse in exceptional status. + +Thu Jan 8 16:51:04 2004 NAKAMURA, Hiroshi + + * test/wsdl/datetime/test_datetime.rb: fixed a stupid testcase which + dumps "E" at month-end. + +Thu Jan 8 11:20:01 2004 WATANABE Hirofumi + + * eval.c, object.c, process.c, re.c: don't use C++ style comments. + +Thu Jan 8 08:46:14 2004 Nobuyoshi Nakada + + * ext/syck/rubyext.c (yaml_org_handler): lazy-load Date for + static-ext. + +Thu Jan 8 07:06:30 2004 Nobuyoshi Nakada + + * ext/extmk.rb: preserve order in Setup. [ruby-dev:22503] + + * ext/extmk.rb: move dependent libraries just after depended + libraries. + + * ext/digest/*/extconf.rb: depend on digest. + +Thu Jan 8 04:36:17 2004 GOTOU Yuuzou + + * lib/webrick/cgi.rb (WEBrick::CGI#initialize): should create + @config[:Logger] if it was not given. + +Wed Jan 7 22:28:12 2004 Nobuyoshi Nakada + + * dir.c (glob_helper): fix memory leak. + +Wed Jan 7 21:15:07 2004 GOTOU Yuuzou + + * sample/webrick/*: new files. + + * MANIFEST: add sample/webrick/* + +Wed Jan 7 20:51:51 2004 Minero Aoki + + * test/net/test_httpheader.rb: new file. + + * MANIFEST: add test/net/test_httpheader.rb. + +Wed Jan 7 20:42:06 2004 Minero Aoki + + * lib/net/http.rb (HTTPHeader#content_length): should return nil + unless header exists. [ruby-dev:22519] + +Wed Jan 7 14:26:05 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb (TkPanedWindow): use epath for embedded windows. + + * ext/tk/lib/tktext.rb: use epath for embedded windows. + + * ext/tk/lib/tkcanvas.rb: use epath for window items. + +Wed Jan 7 14:24:04 2004 NAKAMURA, Hiroshi + + * lib/soap/{attachment.rb,mimemessage.rb}: added from soap4r/1.5.2. + +Wed Jan 7 13:00:18 2004 Dave Thomas + + * lib/rdoc/ri/ri_driver.rb: Fix problem where ri was + being too eager to find matches of ambiguous method + names (such as "ri Thread.join" would return both + Thread.join and ThreadsWait.join) + +Wed Jan 7 12:35:41 2004 NAKAMURA, Hiroshi + + * lib/debug.rb: revert command parse regexps. [ruby-list:39014] by + Shirai,Kaoru. + +Wed Jan 7 08:21:04 2004 Dave Thomas + + * lib/rdoc/parsers/parserfactory.rb: Check for shebang + line in files that would otherwise be treated as + plain text. + +Tue Jan 6 22:13:34 2004 Yukihiro Matsumoto + + * eval.c (rb_mod_modfunc): should break if m has no super class. + [ruby-dev:22498] + +Tue Jan 6 21:51:37 2004 Nobuyoshi Nakada + + * io.c (fptr_finalize): should save errno just after failure. + [ruby-dev:22492] + +Tue Jan 6 20:51:10 2004 NAKAMURA, Hiroshi + + * lib/logger.rb(Logger#msg2str): no special treatment for the object + which responds to :to_str. + + * lib/logger.rb(LogDevice#initialize): remove type checking if the + given object is a String. Kernel.open handles it correctly. + + * test/logger/test_logger.rb: follow above change (ArgumentError -> + TypeError.) + +Tue Jan 6 14:53:14 2004 Dave Thomas + + * bin/ri: split out the display side, making it pluggable. Added + new ri_driver and ri_display files in lib/rdoc/ri. + +Tue Jan 6 11:29:43 2004 NAKAMURA, Hiroshi + + * test/inlinetest.rb, test/{test_generator.rb,test_ipaddr.rb, + test_pathname.rb,test_pp.rb,test_prettyprint.rb,test_set.rb, + test_time.rb,test_tsort.rb: added. + +Tue Jan 6 09:38:27 2004 NAKAMURA, Hiroshi + + * import soap4r/1.5.2; + + * lib/soap/{attachment.rb,baseData.rb,encodingstyle/soapHandler.rb}: + introduce SOAPExternalReference class as a referenct to SOAPEnvelope + external content. + + * lib/soap/{attachment.rb,mimemessage.rb}: great SwA (SOAP messages + with Attachments) support code by Jamie Herre. + + * lib/soap/{element.rb,marshal.rb,parser.rb,processor.rb, + streamHandler.rb,wsdlDriver.rb}: SwA support. + + * lib/soap/rpc/{cgistub.rb,driver.rb,element.rb,proxy.rb,router.rb, + soaplet.rb}: SwA support and refactoring. + + * lib/soap/generator.rb, lib/soap/mapping/mapping.rb: follow + SOAPReference#initialize signature change. + + * lib/soap/mapping/factory.rb: deleted unused methods. + + * lib/soap/mapping/rubytypeFactory.rb: do no ignore case while xsi:type + string <-> Ruby class name matching. + + * lib/xsd/datatypes.rb: check the smallest positive non-zero + single-precision float exactly instead of packing with "f". + [ruby-talk:88822] + + * test/soap/test_basetype.rb, test/xsd/test_xsd.rb: use 1.402e-45, not + 1.4e-45. 1.4e-45 is smaller than 2 ** -149... + + * test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb, + test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0". + + * test/soap/test_streamhandler.rb: revert to the previous test that + warns "basic_auth unsupported under net/http". + +Tue Jan 6 06:37:53 2004 Dave Thomas + + * bin/rdoc: Add --ri-system switch + + * lib/.document: Update with list of files that seem to have + documentation + + * lib/test/unit.rb: Reorder comment to make it RDoc friendly. + + * Makefile.in: add install-nodoc target, and make it + generate RDoc on default install. + + * lib/rdoc/ri/ri_options.rb (RI::Options::parse): Add + --doc-dir option to ri. + +Tue Jan 6 00:04:40 2004 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method_or_yield_parameters): + fix parsing if there are braces in a method parameter list + +Tue Jan 6 01:01:04 2004 NAKAMURA Usaku + + * win32/dir.h, win32/win32.c: fix patch miss. + + * win32/Makefile.sub: fix file dependency. + +Mon Jan 5 20:32:00 2004 Gavin Sinclair + + * lib/logger.rb: enhanced documentation. + +Mon Jan 5 18:58:47 2004 Yukihiro Matsumoto + + * dir.c: merge tuning from H.Yamamoto . + [ruby-dev:22486] + + * pack.c (pack_unpack): unpack requires big endian offet (OFF16B + and OFF32B). The patch is from Minero Aoki in [ruby-dev:22489] + + * pack.c (OFF16B): add big-endian offset again. + +Mon Jan 5 03:00:53 2004 Minero Aoki + + * test/ruby/test_pack.rb: new test test_unpack_N. + +Mon Jan 5 01:47:53 2004 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): remove duplicated object files + from $objs on DOSISH platforms. + +Sat Jan 3 02:44:48 2004 Yukihiro Matsumoto + + * rubysig.h (TRAP_END): preserve errno before switching context. + [ruby-core:02137] + +Sat Jan 3 01:18:08 2004 Yukihiro Matsumoto + + * dir.c: merge tuning from H.Yamamoto . + [ruby-dev:22476] + +Fri Jan 2 14:54:11 2004 Dave Thomas + + * bin/ri: Add new --classes option, and arrange for + help messages to be paged too. + + * bin/rdoc: Add statistics. + + * process.c: (MG) Added Process documentation + + * lib/rdoc/ri/ri_formatter.rb (RI::AttributeFormatter::wrap): + Fix problem with labels not displaying in RI labeled + lists using BS and ANSI modes. + +Fri Jan 2 01:50:13 2004 Yukihiro Matsumoto + + * io.c (argf_eof): ARGF.eof? should not have any side effect. + [ruby-dev:22469] + +Thu Jan 1 09:03:20 2004 Dave Thomas + + * bin/ri (report_class_stuff): Fix problem with ambiguous nested + classes not matching. + +Wed Dec 31 17:25:17 2003 Yukihiro Matsumoto + + * io.c (argf_each_byte): should return self. [ruby-dev:22465] + +Wed Dec 31 15:05:00 2003 Gavin Sinclair + + * lib/pathname.rb: Corrected small coding error. + +Wed Dec 31 15:00:00 2003 Gavin Sinclair + + * lib/pathname.rb: Completed documentation. + +Wed Dec 31 11:20:34 2003 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Make + file referenced in "// in sss.c" relative to current file. + +Wed Dec 31 11:17:37 2003 Dave Thomas + + * lib/rdoc/generators/html_generator.rb: Fix problem when + a public method was aliased, but the alias is then + made private, and hence doesn't appear in RDoc output. + +Wed Dec 31 01:33:05 2003 Dave Thomas + + * array.c, error.c, eval.c, io.c, prec.c, range.c, re.c, + string.c, time.c: Add RDoc for Kernel functions, and tidy. + +Tue Dec 30 19:39:14 2003 Yukihiro Matsumoto + + * io.c (rb_f_readline): should raise EOFError at the end of + files. [ruby-dev:22458] + + * io.c (argf_read): should concatenate input files when length + argument is nil. [ruby-dev:22450] + + * io.c (argf_read): should update supplied string buffer (2nd + argument) even when IO#read is called multiple times. + + * io.c: should initialize lineno by zero. [ruby-dev:22460] + +Tue Dec 30 12:30:30 2003 Dave Thomas + + * lib/rdoc/code_objects.rb (RDoc::Context::find_symbol): If a + class and a method have the same name, finding Xxx.abc was trying + to find 'abc' in method 'Xxx', not class 'Xxx'. + +Tue Dec 30 08:32:32 2003 Dave Thomas + + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_method): + Handle undoing nsting of yield parameters correctly for: + + def each_entry(&b) Dir.foreach(@path) {|f| yield P.new(f) } end + +Tue Dec 30 07:30:00 2003 Gavin Sinclair + + * lib/pathname.rb: Added documentation. + +Mon Dec 29 20:08:17 2003 Minero Aoki + + * lib/net/http.rb (GenericRequest#initialize): check if path + begins with '/'. + + * lib/net/http.rb: def m( arg ) -> def m(arg) + +Mon Dec 29 12:51:02 2003 Dave Thomas + + * eval.c: Add RDoc for Kernel global functions. + +Mon Dec 29 11:00:16 2003 Dave Thomas + + * array.c: Tidy up RDoc loose ends. + +Mon Dec 29 05:05:51 2003 Dave Thomas + + * struct.c, random: Add RDoc comments + +Mon Dec 29 02:25:00 2003 Gavin Sinclair + + * lib/optparse.rb: Improved documentation. + +Mon Dec 29 02:20:54 2003 Dave Thomas + + * eval.c: Add RDoc for class Proc, Method, UnboundMethod + +Mon Dec 29 02:20:26 2003 NAKAMURA Usaku + + * instruby.rb: fix install directory if destdir and compile_dir are + not in the same drive. + + * ext/extmk.rb: ditto. [ruby-list:39009] + + * win32/Makefile.sub, win32/README.win32, win32/configure.bat, + win32/setup.mak: new configure scheme. use ``configure --prefix=dir'' + instead of ``nmake DESTDIR=dir install''. + +Mon Dec 29 00:41:44 2003 Dave Thomas + + * math.c: Add RDoc comments + +Sun Dec 28 20:19:11 2003 Tanaka Akira + + * ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn't + raise EOFError. + + * ext/zlib/zlib.c (gzreader_gets): don't increment lineno when + gzfile_read_all returns "". + +Sun Dec 28 15:25:08 2003 Dave Thomas + + * class.c,object.c,parse.y,sprintf.c,variable.c: Document classes + Object, Module, etc... + +Sun Dec 28 11:55:29 2003 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: generate bom.csv and mac.csv files on the fly. + [ruby-talk:88852] + + * test/csv/{bom.csv,mac.csv}: removed. + +Sun Dec 28 08:56:51 2003 Dave Thomas + + * eval.c: Thead[Group] RDoc (thanks to MG) + +Sun Dec 28 03:50:05 2003 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_override_comment): + Escape method names used in regexp + +Sun Dec 28 01:46:02 2003 Dave Thomas + + * lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item): + Add support for rules in 'ri' output. + +Sun Dec 28 01:35:35 2003 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_body): + Sometimes the Ruby source aliases two otherwise + unrelated methods (for example Kernel#object_id and + Kernel#hash are both the same C function). Provide a + facility to allow the methods to be documented + separately. + +Sun Dec 28 01:05:31 2003 Dave Thomas + + * marshal.c, signal.c: RDoc collemts added by Elliott Hughes + +Sun Dec 28 00:46:25 2003 Dave Thomas + + * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_class_comment): + Some Ruby source uses lower-case class names for the + Init_Xxx C function name. + +Sat Dec 27 23:41:46 2003 WATANABE Hirofumi + + * configure.in: fix "test: too many arguments" error. + +Sat Dec 27 15:32:40 2003 Dave Thomas + + * time.c: Add RDoc comments for Time class. + +Sat Dec 27 15:07:26 2003 Dave Thomas + + * object.c: Add RDoc comments for Symbol class. + +Sat Dec 27 14:39:53 2003 Dave Thomas + + * numeric.c (Init_Numeric): Add RDoc comments. + +Sat Dec 27 00:44:00 2003 Yukihiro Matsumoto + + * io.c (next_argv): warn always for stdin on inplace edit mode. + + * io.c (read_all): need to check string value. + + * io.c (argf_read): allow ARGF.read(nil). [ruby-dev:22433] + +Fri Dec 26 23:02:09 2003 Yukihiro Matsumoto + + * io.c (rb_f_backquote): need not to check nil result. + [ruby-core:02078] + + * io.c (rb_io_getline): should return nil when read_all gives + empty string, even when nil rs is specified. [ruby-core:02077] + +Fri Dec 26 18:33:54 2003 Nobuyoshi Nakada + + * configure.in: check if getcontext and setcontext are available. + + * eval.c: use presence of getcontext/setcontext. + +Fri Dec 26 16:40:53 2003 Tanaka Akira + + * lib/pathname.rb (PathnameTest#test_plus): add 2 assertions. + +Fri Dec 26 14:05:13 2003 Minero Aoki + + * test/ruby/test_pack.rb: new test test_pack_N. + +Fri Dec 26 12:53:26 2003 Yukihiro Matsumoto + + * pack.c (pack_pack): add sign check for 'i', and 'l'. + [ruby-dev:22427] + + * bignum.c (rb_quad_pack): add range check for 'quad int'. + +Fri Dec 26 10:58:58 2003 NAKAMURA Usaku + + * MANIFEST: add vms/config.h and remove vms/config.h_in. + +Fri Dec 26 10:42:00 2003 AKIYOSHI, Masamichi + + * io.c: [VMS] "rfm=stmlf" is specified for open() and fopen(). + +Thu Dec 25 22:29:53 2003 NAKAMURA Usaku + + * string.c (rb_str_update): don't return any value. + +Thu Dec 25 15:30:17 2003 Yukihiro Matsumoto + + * string.c (rb_str_update): call rb_str_modify(). + +Thu Dec 25 05:08:09 2003 Nobuyoshi Nakada + + * eval.c (search_required): search actual file name once when no + extension specified. + +Thu Dec 25 04:00:44 2003 Yukihiro Matsumoto + + * stable version 1.8.1 released. + +Thu Dec 25 00:17:53 2003 Yukihiro Matsumoto + + * configure.in: check for nanosleep, -lrt if required. + [ruby-core:02059] + + * eval.c (thread_timer): use select(2) if nanosleep(2) is not + available. + + * eval.c: check __stub_getcontext for glibc on some platforms. + [ruby-list:38984] + +Wed Dec 24 23:48:04 2003 NAKAMURA, Hiroshi + + * test/soap/test_basetype.rb, test/soap/marshal/test_marshal.rb + test/xsd/test_xsd.rb: use "(-1.0 / (1.0 / 0.0))" instead of "-0.0" + to express -0.0. [ruby-talk:88786] + +Wed Dec 24 23:29:30 2003 Tanaka Akira + + * lib/tsort.rb (test_orphaned_break): removed. + +Wed Dec 24 20:53:06 2003 Hidetoshi NAGAI + + * ext/tk/sample/tkmulticolumnlist.rb: new sample + + * ext/tk/sample/tkmultilistframe.rb: bug fix + +Wed Dec 24 20:37:37 2003 Eric Sunshine + + * configure.in (LDSHARED): Fixed typographical error in assignment of + LDSHARED for Rhapsody which caused linking of extension modules to + fail. + +Wed Dec 24 17:51:18 2003 Yukihiro Matsumoto + + * file.c (rb_thread_flock): enable thread support again. + +Wed Dec 24 16:46:08 2003 Yukihiro Matsumoto + + * eval.c (catch_timer): do not call rb_thread_schedule() inside to + avoid pthread_mutex_lock() deadlock. interrupts to system calls + are detected by TRAP_END via EINTR error. + + * eval.c (thread_timer): do not post signal unless it is + absolutely necessary. + + * rubysig.h (TRAP_END): add CHECK_INTS to switch thread. + + * regex.c (re_compile_pattern): check if nextp is smaller than + pend. [ruby-dev:22372] + + * eval.c (umethod_bind): remove method overridden check. + [ruby-dev:22366] + +Wed Dec 24 16:13:05 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_ssl_read): should check for error + status by SSL_get_error(). + + * ext/openssl/ossl_ssl.c (ossl_ssl_write): ditto. + +Wed Dec 24 14:23:27 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): clear the buffer argument + when returning nil. [ruby-dev:22363] + + * test/ruby/ut_eof.rb (TestEOF::test_eof_0, TestEOF::test_eof_1): + add buffer argument tests. + +Wed Dec 24 14:07:55 2003 Nobuyoshi Nakada + + * lib/test/unit/assertions.rb: Modules are allowed to rescue. + + * lib/test/unit/autorunner.rb: show output_level in order. + + * lib/test/unit/collector/dir.rb: get rid of successive same + directories in load path. + + * test/testunit/test_assertions.rb (test_assert_nothing_raised, + test_assert_raise): test for modules. + +Wed Dec 24 13:43:34 2003 Shugo Maeda + + * lib/net/imap.rb (authenticate): remove "\n" from base64 encoded + strings. + +Wed Dec 24 11:26:41 2003 Nobuyoshi Nakada + + * test/fileutils/test_fileutils.rb: should not create any + files or directories in current directory. [ruby-talk:88724] + +Wed Dec 24 10:29:53 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): never return nil at + unlimited read. [ruby-dev:22334] + + * ext/stringio/stringio.c (strio_read): support second + argument. [ruby-dev:22350] + +Wed Dec 24 09:38:49 2003 Nobuyoshi Nakada + + * parse.y (arg): should return 0 after error. [ruby-dev:22360] + +Wed Dec 24 00:56:54 2003 Yukihiro Matsumoto + + * io.c (read_all): do not return nil at the end of file. + [ruby-dev:22334] + + * io.c (argf_read): do not depend on nil at eof behavior of + IO#read(). + + * eval.c (rb_thread_join): dup exception before re-raising it. + + * io.c (rb_io_eof): call clearerr() to prevent side effect. this + patch is supplied by Masahiro Sakai . + [ruby-dev:22234] + + * pack.c (OFF16): get offset for big endian machines. + + * pack.c (pack_pack): use OFF16 instead of OFF16B. + [ruby-dev:22344] + + * pack.c (pack_unpack): ditto. + +Tue Dec 23 22:47:14 2003 Yukihiro Matsumoto + + * io.c (rb_io_check_readable): set FMODE_RBUF always, even if + NEED_IO_SEEK_BETWEEN_RW is not defined. [ruby-dev:22340] + + * io.c (rb_io_check_writable): clear FMODE_RBUF before writing + something. + +Tue Dec 23 22:25:00 2003 Gavin Sinclair + + * lib/optparse.rb: incomplete RDoc documentation added in place of + existing RD comments. Tabs converted to spaces. + +Tue Dec 23 19:44:47 2003 NAKAMURA, Hiroshi + + * test/soap/test_streamhandler.rb (test_basic_auth): removed. + soap4r + basic_auth is not officially supported in ruby/1.8.1 even + though soap4r + basic_auth + http-access2 should run fine. + +Tue Dec 23 19:42:59 2003 Nobuyoshi Nakada + + * io.c (rb_io_ungetc): raise an exception at unread stream to + avoid unspecified behavior. [ruby-dev:22330] + + * test/ruby/test_system.rb (test_syntax): glob relatively from + __FILE__. + +Tue Dec 23 18:09:40 2003 Yukihiro Matsumoto + + * pack.c (pack_pack): remove unnecessary negative value check. + [ruby-dev:22329] + +Tue Dec 23 17:26:55 2003 KONISHI Hiromasa + + * bcc32/Makefile.sub (config.h): bcc has finite(). [ruby-list:38940] + +Tue Dec 23 16:08:16 2003 NAKAMURA, Hiroshi + + * lib/rexml/encodings/US-ASCII.rb: typo. [ruby-talk:88650] + + * test/ruby/test_system.rb: num of asserts depended on running dir. + + * test/xsd/test_noencoding.rb: rexml + without iconv/uconv cannot + handle euc-jp. install iconv, uconv or xmlscan. + +Tue Dec 23 14:13:51 2003 akira yamada + + * lib/uri/generic.rb (URI::Generic::check_userinfo, + URI::Generic::check_user, URI::Generic::check_password): tests + conflicts/depends with other components closely. + + * test/uri/test_generic.rb (TestGeneric::test_set_component): + added tets. + +Tue Dec 23 11:08:34 2003 NAKAMURA, Hiroshi + + * test/xsd/test_noencoding.rb: rescue Errno::EINVAL and do not test. + "euc-jp" might not be in supported encoding name list. + [ruby-talk:88650] + +Tue Dec 23 06:10:31 2003 GOTOU Yuuzou + + * lib/webrick/cgi.rb (CGI): add support for mod_ruby. + + * lib/webrick/cgi.rb (CGI::Socket): add check for existence of + OpenSSL module in all HTTPS related methods. + + * lib/webrick/cgi.rb (CGI::Socket#cipher): should create similar + value to OpenSSL::SSLSocket#cipher. + + * lib/webrick/httpresponse.rb (HTTPResponse#setup_header): should + set "connection: close" if @keep_alive is false. + + * lib/webrick/https.rb (HTTPrequest#meta_vars): add supprt for + SSL_PROTOCOL, SSL_CIPHER_USEKEYSIZE and SSL_CIPHER_ALGKEYSIZE. + +Mon Dec 22 23:00:05 2003 akira yamada + + * lib/uri/generic.rb (URI::Generic::check_opaque): fixed typo. + +Mon Dec 22 21:59:24 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (map_charset): always ensure code is a String. + +Mon Dec 22 21:15:29 2003 Nobuyoshi Nakada + + * class.c (rb_mod_init_copy): always copy singleton class. + [ruby-dev:22325] + +Mon Dec 22 20:44:36 2003 akira yamada + + * lib/uri/generic.rb (URI::Generic#route_from): accepts urls which + has no host-part. + + * test/uri/test_generic.rb (TestGeneric::test_route): added a test. + +Mon Dec 22 20:38:44 2003 Nobuyoshi Nakada + + * lib/cgi.rb: reduce eval. + + * lib/cgi.rb (CGI::QueryExtension::read_multipart): alias path to + local_path. [ruby-list:38883] + +Mon Dec 22 20:09:31 2003 NAKAMURA, Hiroshi + + * test/soap/test_property.rb: remove duplicated test method. + +Mon Dec 22 18:22:04 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub (config.h): remove + HAVE_ISINF definition to follow previous commits of missing.h + and win32/win32.h. + +Mon Dec 22 17:23:42 2003 Nobuyoshi Nakada + + * configure.in (ac_cv_func_setitimer): moved from defines.h + + * defines.h, rubysig.h, signal.c: removed macro handling which + should be done in configure. + + * configure.in (intrinsics.h): check if present. + + * ruby.h: include intrinsics.h if available. + + * bignum.c, marshal.c: include ieeefp.h if available. + + * missing.h (isinf): define as a macro if finite() and isnan() + are available. [ruby-core:02032] + +Mon Dec 22 17:07:31 2003 WATANABE Hirofumi + + * configure.in (mingw): set isnan, finite and isinf to yes. + +Mon Dec 22 13:40:19 2003 NAKAMURA, Hiroshi + + * lib/soap/property.rb: passing block by reference. + +Mon Dec 22 00:32:43 2003 Yukihiro Matsumoto + + * eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead of + ALLOW_INTS which may switch context. [ruby-dev:22319] + + * ext/syck/emitter.c (syck_emitter_write): str bigger than + e->bufsize causes buffer overflow. [ruby-dev:22307] + +Sun Dec 21 17:29:00 2003 Nobuyoshi Nakada + + * class.c (rb_check_inheritable): new function. [ruby-dev:22316] + + * intern.h: add prototype. + + * eval.c (superclass): use rb_check_inheritable(). + + * object.c (rb_class_initialize): check argument validity. + +Sun Dec 21 16:25:10 2003 Tanaka Akira + + * lib/pathname.rb (Pathname#+): re-implemented to resolve ".." in + beginning of the argument. + (Pathname#join): concatenate from the last argument. + (Pathname#parent): just use Pathname#+. + +Sun Dec 21 00:12:37 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add new methods (TkScrollbar#assign, assign_list) + + * ext/tk/sample/tkmultilistframe.rb: use TkScrollbar#assign method + +Sat Dec 20 21:59:03 2003 GOTOU Yuuzou + + * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): refine regexp. + + * lib/webrick/cgi.rb (CGI#start): NPH scripts return status line + instead of Status: header field. + + * lib/webrick/cgi.rb (CGI::Socket): refine some coditions. + +Sat Dec 20 16:07:14 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion::complete): wrong + Regexp for word boundary. pointed out by Gavin Sinclair. + + * lib/optparse.rb (OptionParser::make_switch): [no-] prefix was + missing. + +Sat Dec 20 11:40:10 2003 Nobuyoshi Nakada + + * lib/yaml.rb (YAML::YAML): adjust Marshal version. + +Sat Dec 20 03:56:02 2003 Yukihiro Matsumoto + + * eval.c (rb_with_disable_interrupt): prohibit thread context + switch during proc execution. [ruby-dev:21899] + +Sat Dec 20 02:41:02 2003 GOTOU Yuuzou + + * lib/webrick/cgi.rb: add file. (yet another CGI library) + + * MANIFEST: add lib/webrick/cgi.rb. + +Sat Dec 20 02:18:31 2003 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-calculate-indent): proper indentation + inside of parentheses. [ruby-dev:22308] + +Fri Dec 19 21:24:22 2003 GOTOU Yuuzou + + * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): should not set + HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH. + + * lib/webrick/https.rb (HTTPRequest#parse): should check presence + of cert() method to detect SSLSocket. + +Fri Dec 19 22:56:46 2003 NAKAMURA, Hiroshi + + * lib/soap/property.rb (SOAP::Property#load): new method for loading + property value into existing property tree. + + * test/soap/test_property.rb: add test. + +Fri Dec 19 19:21:49 2003 akira yamada + + * lib/runit/cui/testrunner.rb (RUNIT::CUI::TestRunner::run): + should use Test::Unit::UI::{PROGRESS_ONLY,VERBOSE}. + +Fri Dec 19 17:36:49 2003 Hidetoshi NAGAI + + * ext/tk/sample/tkmultilistbox.rb: bug fix + + * ext/tk/sample/tkmultilistframe.rb: new sample script + +Fri Dec 19 03:44:27 2003 GOTOU Yuuzou + + * lib/webrick/httputils.rb (parse_form_data): should return an + empty Hash if the body is empty. + +Thu Dec 18 21:47:35 2003 NAKAMURA Usaku + + * lib/mkmf.rb (create_makefile): should remove deffile if it's + made by miniruby. based on nobu's patch. + +Thu Dec 18 21:44:21 2003 NAKAMURA Usaku + + * eval.c (stack_extend): ignore inline optimization on VC7. + + * win32/Makefile.sub (OS, RT): can override. + + * win32/Makefile.sub (LDFLAGS): ditto. shouldn't use pdb:none + option. based on Tietew's patch [ruby-dev:22289] + +Thu Dec 18 16:38:44 2003 Nobuyoshi Nakada + + * dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never + return NULL. + +Thu Dec 18 15:27:59 2003 WATANABE Hirofumi + + * lib/ipaddr.rb (IPSocket::getaddress): merge usa's patch. + [ruby-dev:21678] + +Wed Dec 17 15:15:30 2003 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::Value::[]): should work like + String#[] if more than one arguments are specified. + + * lib/delegate.rb: avoid using common instance name as "@obj". + + * lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer + subclass of String, but DelegateClass(String). + + * ext/curses/extconf.rb: restore function check for init_color. + [ruby-list:38905] + + * Makefile.in: need to specify $(MAINLIBS) for the miniruby + generation rule. + + * configure.in: better FreeBSD -lc_r support. + +Wed Dec 17 00:16:14 2003 Minero Aoki + + * ext/strscan/strscan.c: new method + StringScanner#beginning_of_line? (alias #bol?) + + * ext/strscan/strscan.c: new method StringScanner#concat and #<<. + + * ext/strscan/strscan.c: StringScanner#new(str) does not duplicate + nor freeze STR (allow destructive modification). + + * test/strscan/test_stringscanner.rb: test new methods above. + + * test/strscan/test_stringscanner.rb: test destructive string + modification. + +Tue Dec 16 21:20:47 2003 Tanaka Akira + + * lib/pp.rb: don't use local variable `pp'. + + * lib/prettyprint.rb: ditto. + +Tue Dec 16 13:20:43 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: condition bug of if statement on + {pack,grid}_propagate methods + +Tue Dec 16 03:17:29 2003 why the lucky stiff + + * lib/yaml/rubytypes.rb: comments in strings. [ruby-talk:88012] + + * test/yaml/test_yaml.rb: add test. + +Tue Dec 16 01:14:44 2003 Nobuyoshi Nakada + + * eval.c (catch_timer): check rb_thread_crtical in main native + thread. + + * eval.c (thread_timer): just sends signals periodically, to + prevent main native thread from receiving them in critical + section. [ruby-core:01959] + +Mon Dec 15 13:32:22 2003 Nobuyoshi Nakada + + * dir.c (check_dirname): check string safety and remove extraneous + trailing directory separators. [ruby-dev:22279] + + * file.c: renamed and externalized rb_path_next, + rb_path_skip_prefix, rb_path_last_separator, rb_path_end. + + * intern.h: prototypes for rb_path_next, rb_path_skip_prefix, + rb_path_last_separator, rb_path_end. + +Mon Dec 15 09:27:46 2003 NAKAMURA Usaku + + * ext/openssl/ossl_pkcs12.c (ossl_pkcs12_initialize): first argument + of rb_protect should take an argument of VALUE. + +Sun Dec 14 18:46:48 2003 WATANABE Hirofumi + + * ext/socket/socket.c (Init_socket): IPv6 is not supported although + AF_INET6 is defined on MinGW. + + * lib/ipaddr.rb (AF_INET6): workaround in the environment which does + not support IPv6. + +Sat Dec 13 18:55:16 2003 Nobuyoshi Nakada + + * ext/iconv/charset_alias.rb: preserve original order. + + * ext/iconv/extconf.rb: remove wrapper file at clean. + +Sat Dec 13 18:09:42 2003 Yukihiro Matsumoto + + * eval.c (thread_timer): use timer by sub-thread and nanosleep. + [ruby-talk:87519] + + * gc.c (Init_stack): no stack adjustment for THREAD_SAFE. + +Sat Dec 13 17:17:59 2003 Nobuyoshi Nakada + + * eval.c (proc_alloc): cache the created object at first time. + [ruby-talk:61288], [ruby-dev:22240] + +Sat Dec 13 09:01:23 2003 Nobuyoshi Nakada + + * configure.in: check ucontext.h. + + * eval.c: use getcontext/setcontext() instead of setjmp/longjmp() + on ia64 or with native thread enabled. [ruby-core:01932] + +Sat Dec 13 03:09:14 2003 why the lucky stiff + + * lib/yaml/rubytypes.rb: anonymous struct fix. [ruby-core:01946] + + * test/yaml/test_yaml.rb: add test. + +Fri Dec 12 22:36:44 2003 NAKAMURA, Hiroshi + + * lib/csv.rb: add Cell#to_str and Cell#to_s for /.../ =~ aCell, + "#{aCell}" and so on. + + * test/csv/test_csv.rb: add tests. + +Fri Dec 12 19:33:06 2003 Minero Aoki + + * lib/fileutils.rb (mkdir): remove trailing `/' from pathes. + + * lib/fileutils.rb (rmdir): ditto. [ruby-dev:22238] + + * lib/fileutils.rb (rmdir_r): ditto. + + * lib/fileutils.rb (fu_copy_dir): check if it is a directory after + mkdir(2). + +Fri Dec 12 06:06:09 2003 Nobuyoshi Nakada + + * eval.c (proc_invoke): fix class name in warning message for + define_method. [ruby-dev:22235] + +Thu Dec 11 21:24:43 2003 GOTOU Yuuzou + + * ext/openssl/ossl_pkcs12.[ch]: new files. add OpenSSL::PKCS12. + + * ext/openssl/ossl.[ch]: ditto. + + * ext/openssl/MANIFEST: add ossl_pkcs12.[ch]. + +Thu Dec 11 20:54:28 2003 Minero Aoki + + * lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). + mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1. + + * lib/fileutils.rb (fu_list): call to_str for all arguments. + +Thu Dec 11 20:07:01 2003 WATANABE Hirofumi + + * lib/ftools.rb (makedirs): sync with fileutils. + +Thu Dec 11 19:53:03 2003 Minero Aoki + + * lib/fileutils.rb (mkdir_p): catch all SystemCallErrors. + (mkdir("C:\") causes EACCESS on Windows 2000/NTFS) + +Thu Dec 11 19:08:02 2003 Minero Aoki + + * lib/fileutils.rb (mkdir_p): check if it is a directory after + mkdir(2) instead of before mkdir(2), to avoid race condition. + [ruby-talk:87730] + Refer: mkinstalldirs sh script, GNU mkdir(1) (coreutils 5.0) + +Thu Dec 11 18:49:30 2003 Minero Aoki + + * lib/fileutils.rb: def m( arg ) -> def m(arg). + +Thu Dec 11 11:39:43 2003 Nobuyoshi Nakada + + * configure.in (ieeefp.h), numeric.c: needed for finite() on + Solaris. [ruby-core:01921] + + * file.c (rb_stat_inspect): adjust format specifier. + + * parse.c (arg_prepend): nodetype() is for debug use. + + * ruby.h (ISASCII, etc): cast to int to get rid of warning. + + * ruby.h (alloca.h): include even in GCC. [ruby-core:01925] + + * ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format + specifier. + + * ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce, + BigDecimal_divmod): use rb_assoc_new() to suppress memory usage. + + * ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto. + + * ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be + volatile. + + * ext/iconv/iconv.c (iconv_convert): ensure actual parameter with + format specifier. + + * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not + define unless used. + + * ext/pty/pty.c (getDevice): get rid of warning. + + * ext/socket/socket.c (port_str, sock_s_getaddrinfo, + sock_s_getnameinfo): FIX2INT() now returns long. + + * ext/socket/socket.c (init_inetsock_internal): uninitialized + variable. + + * ext/syck/rubyext.c (syck_parser_assign_io): add prototype. + + * ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use + ISDIGIT() instead of isdigit() to avoid warnings and for + platforms which don't support non-ascii charater. + +Wed Dec 10 19:28:56 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): set EOF flag at short read. + [ruby-dev:22223], [ruby-dev:22224] + +Wed Dec 10 18:07:25 2003 Minero Aoki + + * lib/erb.rb: new method ERB#filename(=). [ruby-dev:22208] + +Wed Dec 10 17:54:51 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): do not set EOF flag when + requested length is zero. [ruby-dev:22214] + +Wed Dec 10 17:17:18 2003 Yukihiro Matsumoto + + * io.c (read_all): should return given string even if data read is + empty. [ruby-dev:22207] + +Wed Dec 10 17:16:06 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): adjust behavior at reading + beyond EOF to IO. [ruby-dev:22205] + + * test/ruby/ut_eof.rb (TestEOF::Seek): test behaviors at reading + beyond EOF. + + * test/ruby/test_file.rb, test/stringio/test_stringio.rb: include + TestEOF::Seek test case. + +Wed Dec 10 15:01:19 2003 Shugo Maeda + + * test/monitor/test_monitor.rb (test_cond): use Queue#deq + instead of sleep. + +Wed Dec 10 14:45:39 2003 WATANABE Hirofumi + + * ext/pty/pty.c (HAVE_SYS_IOCTL_H): need to include + for TIOCSCTTY on *BSD. based on gotoyuzo's patch. + (ruby-bugs:PR#1211) + + * ext/pty/pty.c (establishShell): should close descriptors if fork + failed. + +Wed Dec 10 12:53:05 2003 WATANABE Hirofumi + + * win32/win32.h: define execv() using do_aspawn(). + + * process.c (proc_exec_v): remove #ifdef's which stopped needing. + +Tue Dec 9 23:32:23 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb, ext/tk/lib/tkcanvas.rb, ext/tk/lib/tkdialog.rb, + ext/tk/lib/tkentry.rb, ext/tk/lib/tkscrollbox.rb, ext/tk/lib/tktext.rb, + ext/tk/sample/tkalignbox.rb, ext/tk/sample/tkcombobox.rb, + ext/tk/sample/tkmultilistbox.rb, ext/tk/sample/tkoptdb.rb, ext/tk/sample/tktextframe.rb, + ext/tk/sample/demos-en/dialog1.rb, ext/tk/sample/demos-en/dialog2.rb, + ext/tk/sample/demos-jp/dialog1.rb, ext/tk/sample/demos-jp/dialog2.rb: + overrided instance methods, which are private methods on the super + class, are changed to 'private' + +Tue Dec 9 19:53:02 2003 akira yamada + + * lib/uri/generic.rb (URI::Generic#route_from0): make case insensitive + for host-part. + + * test/uri/test_generic.rb (test_route): added tests for the above + change. + +Tue Dec 9 14:10:48 2003 Tanaka Akira + + * io.c (rb_io_check_readable): don't call io_seek if EOF flag is set, + to avoid clearing EOF flag. + (rb_io_check_writable): ditto. + +Tue Dec 9 02:53:55 2003 Hidetoshi NAGAI + + * ext/tk/sample/tkalignbox.rb: new sample script + +Tue Dec 9 00:45:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: renamed #assert_raises to #assert_raise + and made the former call the latter. [ruby-core:01890] + + * test/testunit/test_assertions.rb: ditto. + +Tue Dec 9 00:07:35 2003 NAKAMURA, Hiroshi + + * lib/soap/rpc/standaloneServer.rb: add 'shutdown' and 'status' + methods as delegates to WEBrick. + + * test/soap/calc/{test_calc.rb,test_calc2.rb}, + test/soap/helloworld/test_helloworld.rb, + test/wsdl/datetime/test_datetime.rb, test/wsdl/raa/test_raa.rb: + follow the change. + +Mon Dec 8 22:48:03 2003 Nobuyoshi Nakada + + * lib/test/unit/autorunner.rb: remove dependency to a particular + runner. [ruby-core:01901], [ruby-list:38869] + + * lib/test/unit/ui/testrunnerutilities.rb: moved output level + constants from Console. + + * lib/test/unit/ui/console/testrunner.rb: ditto. + + * lib/test/unit/ui/{fox,gtk,gtk2,tk}/testrunner.rb (initialize): + accept output_level. + +Mon Dec 8 15:03:30 2003 Nobuyoshi Nakada + + * ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow. + +Mon Dec 8 13:02:11 2003 Minero Aoki + + * lib/uri/common.rb: new method URI.regexp. [ruby-dev:22121] + + * test/uri/test_common.rb: add test for URI.regexp. + +Mon Dec 8 12:44:14 2003 Yukihiro Matsumoto + + * pack.c: define swap16 and swap32 only if they are not + defined. OpenBSD defines these macros. [ruby-dev:22181] + +Sun Dec 7 20:54:17 2003 Tanaka Akira + + * ext/iconv/iconv.c (map_charset): make case sensitive. + ext/iconv/charset_alias.rb (charset_alias): don't ignore + config.charset's information. sort aliases. + +Sat Dec 6 22:58:03 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap + SSL_connect and SSL_accept; if SSL_connect (or SSL_accept) returned + but not finished the handshake process, we should retry it. + + * ext/openssl/ossl_ssl.c (ossl_ssl_connect): call ossl_start_ssl. + + * ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto. + + * ext/openssl/ossl_ssl.c (ossl_ssl_read): allow signal traps. + +Sat Dec 6 21:45:10 2003 WATANABE Hirofumi + + * io.c (flush_before_seek): flush before seek on any platform. + + * configure.in: ditto. + +Sat Dec 6 17:23:00 2003 NAKAMURA, Hiroshi + + * lib/soap/soap.rb(SOAP::Env.getenv): allow upcase environment variable + as well as downcase one. + + * lib/soap/netHttpClient.rb(SOAP::NetHttpClient#proxy=): check URI. + +Fri Dec 5 23:22:30 2003 Nobuyoshi Nakada + + * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises, + Test::Unit::Assertions::assert_nothing_raised): use the last + argument as message unless class object. + + * test/testunit/test_assertions.rb (test_assert_raises): test for + multiple exception list. [ruby-core:01891] + + * test/testunit/test_assertions.rb (test_assert_nothing_raised): test + for non-exception classes. + +Fri Dec 5 22:23:04 2003 NAKAMURA, Hiroshi + + * lib/soap/netHttpClient.rb: proxy support did not work. fixed. + + * lib/soap/property.rb: add class methods for loading property from + stream/file/propertyfile. propertyfile is a file which is located at + somedir in $:. + + * lib/soap/soap.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb, + lib/wsdl/importer.rb: load property from propertyfile 'soap/property' + e.g. /usr/local/lib/ruby/site_ruby/1.8/soap/property. + + * test/soap/test_property.rb, test/soap/test_streamhandler.rb: new file. + +Fri Dec 5 17:26:23 2003 Nobuyoshi Nakada + + * eval.c (rb_exec_end_proc): maintain tmp_end_procs. + [ruby-dev:22154] + +Fri Dec 5 13:36:59 2003 Yukihiro Matsumoto + + * eval.c (rb_exec_end_proc): should not clear end_procs and + ephemeral_end_procs before execution. [ruby-dev:22144] + + * eval.c (rb_obj_extend): call Module#extended hook after + extended_object. [ruby-list:38866] + + * object.c (Init_Object): Module#extended defined. + +Fri Dec 5 13:17:30 2003 Tanaka Akira + + * test/ruby/test_pipe.rb: use IO.pipe instead of IO.popen. + +Fri Dec 5 11:54:45 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): follow IO#read. + + * test/ruby/ut_eof.rb, test/ruby/test_file.rb, test/ruby/test_pipe.rb, + test/stringio/test_stringio.rb: add EOF test. + +Fri Dec 5 02:49:35 2003 Nobuyoshi Nakada + + * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises): + allow multiple exception list. [ruby-core:01884] + + * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_nothing_raised): + check whether arguments are subclass of Exception. + +Thu Dec 4 23:54:00 2003 Rick Ohnemus + + * dln.c (aix_loaderror): should not use member named 'errno' which + might be a macro (e.g. on AIX). + +Thu Dec 4 23:32:26 2003 Yukihiro Matsumoto + + * io.c (read_all): do not depend on lseek position. + [ruby-dev:22026] + +Thu Dec 4 22:37:26 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): preserve $! value when retry happens in the + rescue clause. [ruby-talk:86697] + +Thu Dec 4 21:50:07 2003 Nobuyoshi Nakada + + * lib/drb/drb.rb (DRb::DRbMessage::send_request, send_reply): + should rescue errors and re-raise DRbConnError on write too. + [ruby-dev:22132] + +Thu Dec 4 16:41:17 2003 Nobuyoshi Nakada + + * parse.y (exc_list): allow expanding list. [ruby-dev:22134] + +Thu Dec 4 14:09:24 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb (test_cp): test if the error is + kind of SystemCallError. It is needless details that which errno + is set on each systems. + +Thu Dec 4 13:24:13 2003 Shugo Maeda + + * lib/monitor.rb: use Object#__send__ instead of Object#send. + +Thu Dec 4 13:17:45 2003 NAKAMURA, Hiroshi + + * lib/soap/streamHandler.rb: support latest released version of + http-access2. + +Thu Dec 4 13:04:44 2003 NAKAMURA, Hiroshi + + * lib/soap/soap.rb: add SOAP::Env module for environment repository + such as HTTP_PROXY. + + * lib/soap/property.rb: property implementation. + + * lib/soap/streamHandler.rb, lib/soap/wsdlDriver.rb, + lib/soap/rpc/driver.rb: use soap/property.rb. + + * lib/wsdl/importer.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb: + use SOAP::Env. + + * lib/soap/netHttpClient.rb: add basic_auth, ssl_config, and cookie + management interface, but ignored for now. + + * lib/xsd/charset.rb: add XSD::Charset.encoding= interface to set + wiredump charset explicitly. it was fixed to 'utf-8' when iconv or + uconv module was found. + +Thu Dec 4 10:43:58 2003 NAKAMURA Usaku + + * ext/dl/sym.c (rb_dlsym_guardcall): __declspec(noinline) is VC7 + feature. + +Thu Dec 4 10:27:12 2003 Minero Aoki + + * lib/net/http.rb: update hyperlink to the Japanese document. + +Thu Dec 4 09:12:43 2003 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (asn1time_to_time): should check that + the underlying value of ASN1_TIME isn't NULL. [ruby-core:01881] + +Thu Dec 4 08:29:43 2003 GOTOU Yuuzou + + * lib/webrick/server.rb (GenericServer#start): should rescue + Exception to avoid unexpected aborting. [ruby-core:01853] + + * lib/webrick/server.rb (GenericServer#start_thread): should check + that peeraddr isn't nil before printing. + + * lib/webrick/httpresponse.rb (HTTPResponse#start_thread): should + rescue Exception to avoid unexpected aborting of thread. + +Thu Dec 4 03:48:59 2003 Tanaka Akira + + * lib/pathname.rb (Pathname#link, Pathname#symlink): obsoleted. + (Pathname#make_link, Pathname#make_symlink): new method. + +Thu Dec 4 01:45:24 2003 Yukihiro Matsumoto + + * io.c (argf_read): should not terminate on empty string; wait + until real EOF. [ruby-dev:21969] + + * io.c (argf_read): should adjust length to read, when length is + specified and read spans command line argument files. + +Wed Dec 3 19:38:36 2003 Masatoshi SEKI + + * lib/drb/drb.rb: correct fcntl parameter. [ruby-dev:22120] + +Wed Dec 3 13:49:07 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: 'format'==>'Kernel.format' (avoid override trouble) + + * ext/tk/lib/tkafter.rb: ditto. + + * ext/tk/lib/tkcanvas.rb: ditto. + + * ext/tk/lib/tkdialog.rb: ditto. + + * ext/tk/lib/tktext.rb: ditto. + +Wed Dec 3 13:28:13 2003 Nobuyoshi Nakada + + * Makefile.in (lex.c): try gperf first, and copy from the source + directory if failed. [ruby-dev:22123] + + * ext/extmk.rb (MTIMES): let makefiles depend to mkmf.rb. + + * lib/mkmf.rb (configuration): DLDFLAGS was duplicated. + +Tue Dec 2 23:18:12 2003 Minero Aoki + + * lib/net/http.rb: wrote the warning about HTTP_PROXY environment + variable. + +Tue Dec 2 21:31:42 2003 Nobuyoshi Nakada + + * bin/testrb: new test runner. [ruby-core:01845] + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner.run, + Test::Unit::AutoRunner#process_args): take test list to run and + options. + + * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::RUNNERS, + Test::Unit::AutoRunner#run): should not exit inside a library, + just return the result instead. + + * lib/test/unit.rb: ditto. + + * test/runner.rb: exit with the test result. + +Tue Dec 2 20:18:48 2003 Eric Sunshine + + * configure.in (AC_PROG_YACC): AC_DEFINE(OLD_YACC) if Yacc is found + instead of Bison or byacc. + + * parse.y: If OLD_YACC is defined, ensure that YYMAXDEPTH is at least + 10000 (Bison's default) since some old versions of Yacc define it as + low as 150 by default, which is too low for Ruby to parse some files, + such as date/format.rb. Among other issues, the parse problem causes + "make test" to fail. + +Tue Dec 2 20:03:20 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb: check if Pathnames are usable + for arguments. + +Tue Dec 2 04:22:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: fixed #assert_no_match message. + + * test/testunit/test_assertions.rb: ditto. + +Tue Dec 2 00:43:00 2003 why the lucky stiff + + * ext/syck/syck.c: string buffering bug. decrementing by full + max_size now. [ruby-core:01834] + +Mon Dec 1 21:33:08 2003 Yukihiro Matsumoto + + * numeric.c (num_sadded): prohibit singleton method definition for + Numerics. fill yet another gap between Fixnum and Bignum. + +Mon Dec 1 17:33:47 2003 Yukihiro Matsumoto + + * pack.c (htov16): converts endian using swap16. htov32(), hton16, + hton32 as well. [ruby-talk:85377] + + * pack.c (swap16): swap 2 bytes no matter how big short is on the + platform. swap32() is also prepared. + + * numeric.c (rb_num2int): returns long to preserve information. + rb_fix2int(), rb_num2uint(), rb_fix2uint() as well. + [ruby-talk:85377] + + * numeric.c (rb_num2uint): should not check for value range if the + source value is negative. + +Mon Dec 1 17:14:34 2003 Nobuyoshi Nakada + + * sample/optparse/opttest.rb: added. + +Mon Dec 1 16:10:52 2003 Dave Thomas + + * lib/rdoc/rdoc.rb: (etc) initial merge into main tree. + +Mon Dec 1 14:17:49 2003 Minero Aoki + + * lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow + Pathname for arguments. [ruby-core:01795] + + * test/fileutils/test_fileutils.rb: does much strict test on + "same" files detecting. + +Mon Dec 1 09:28:14 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (XCFLAGS): re-export $(XCFLAGS). + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (ARCH_FLAG): export $(ARCH_FLAG) (perhaps empty value). + +Mon Dec 1 01:03:27 2003 WATANABE Hirofumi + + * lib/mkmf.rb (TRY_LINK, link_command): added support for DLDFLAGS + and ARCH_FLAG. [ruby-dev:22085] + +Sun Nov 30 20:18:07 2003 WATANABE Hirofumi + + * configure.in: keep ARCH_FLAG separate. export ARCH_FLAG. + [ruby-core:01819] + + * Makefile.in: add ARCH_FLAG to CFLAGS. + + * Makefile.in: add @CPPFLAGS@ to CPPFLAGS. + + * lib/mkmf.rb (link_command, cc_command): use ARCH_FLAG. + + * lib/mkmf.rb (configuration): add ARCH_FLAG to DLDFLAGS. + + * Makefile.in: add ARCH_FLAG to DLDFLAGS. + + * configure.in: should put getcwd in AC_CHECK_FUNCS, not + AC_REPLACE_FUNCS. [ruby-core:01826] + +Sun Nov 30 18:22:48 2003 WATANABE Hirofumi + + * configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS, + DLDFLAGS and LDSHARED. + + * configure.in: XCFLAGS for compiling ruby itself. ARCH_FLAG is + reflected in CFLAGS. + + * lib/mkmf.rb: ditto. do not import XCFLAGS from config.status. + +Sun Nov 30 17:37:36 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix [ruby-talk:86746] + +Sun Nov 30 13:02:00 2003 NAKAMURA, Hiroshi + + * lib/soap/encodingstyle/soapHandler.rb: refactoring - Simplifying + Conditional Expressions. + + * lib/wsdl/soap/definitions.rb: refactoring - Move Method. + + * test/xsd/{test_noencoding.rb,noencoding.xml}: new files. test for + encoding unspecified XML file parsing. + + * test/wsdl/{test_fault.rb,map,datetime}: new files. test of + SOAPFault, dateTime and Apache's Map. + +Sun Nov 30 09:35:14 2003 Nobuyoshi Nakada + + * string.c (rb_str_update): get rid of SEGV at just allocated String. + [ruby-core:01812] + +Fri Nov 28 23:19:34 2003 Yukihiro Matsumoto + + * gc.c (gc_mark): explicitly check mark recursion levels, instead + of unreliable stack length. + +Fri Nov 28 22:49:56 2003 Masatoshi SEKI + + * lib/rinda/rinda.rb: fix TupleSpaceProxy#read, read_all. + +Fri Nov 28 21:44:40 2003 WATANABE Hirofumi + + * test/fileutils/test_fileutils.rb (test_ln_s): should be a file, not + a directory for FreeBSD. + +Fri Nov 28 19:37:56 2003 Nobuyoshi Nakada + + * hash.c (env_has_value, env_index): must match exactly. + + * test/ruby/test_env.rb (test_has_value, test_index): condition for + aboves. + +Fri Nov 28 17:59:20 2003 NAKAMURA Usaku + + * test/ruby/test_env.rb: add tests for ENV. + +Fri Nov 28 17:47:46 2003 Masatoshi SEKI + + * lib/drb/drb.rb (DRbMessage#load): rescue Errno::* and raise + DRbConnError. + +Fri Nov 28 15:41:15 2003 Tanaka Akira + + * lib/pathname.rb (Pathname#realpath): obsolete the force_absolute + argument. + +Fri Nov 28 14:41:52 2003 NAKAMURA, Hiroshi + + * lib/soap/streamHandler.rb: drop unused http parameters. + + * lib/soap/encodingstyle/soapHandler.rb, lib/soap/mapping/factory.rb, + lib/soap/mapping/mapping.rb, lib/soap/mapping/registry.rb, + lib/wsdl/soap/complexType.rb: ApacheSOAP's map support was broken + under WSDL dynanic client environment. fixed. + + * test/wsdl/raa/*: add tests. + + * lib/xsd/datatypes.rb: dateTime precision bug fix (at least, I hope.) + bug of soap4r. XSDDateTimeImple.to_time passed a Float to + Time.local/Time.gm as an usec, and NUM2LONG(rb_num2long for Float) + causes rounding error. + + * test/soap/test_basetype.rb, test/xsd/test_xsd.rb: add tests. + +Fri Nov 28 04:15:24 2003 Nobuyoshi Nakada + + * eval.c (method_arity): used wrong Proc object. [ruby-talk:86504] + +Fri Nov 28 00:47:29 2003 Nobuyoshi Nakada + + * eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true as + success, false as failure. [ruby-dev:22067] + + * eval.c (rb_f_abort, rb_thread_switch), process.c (rb_f_system): use + ANSI macro instead of hard coded value. + + * eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not but + TYPEs. + +Thu Nov 27 22:05:48 2003 Akinori MUSHA + + * eval.c, gc.c: FreeBSD/ia64 currently does not have a way for a + process to get the base address for the RSE backing store, so + hardcode it for the moment. + [submitted by: Marcel Moolenaar ] + +Thu Nov 27 17:36:42 2003 Hidetoshi NAGAI + + * ext/tk/lib/tkafter.rb: bug fix on TkTimer#cancel_on_exception=(mode). + TkTimer#wait recieves the exception of the callback. + The exception is kept on @return_value. + +Thu Nov 27 16:58:48 2003 WATANABE Hirofumi + + * win32/win32.c (rb_w32_stat): remove _fullpath() for NUL: device. + +Wed Nov 26 15:38:47 2003 WATANABE Hirofumi + + * test/fileutils/test_fileutils.rb (test_ln_s): should take the + existing symbolic link for OpenBSD. + +Wed Nov 26 04:48:42 2003 why the lucky stiff + + * ext/syck/token.c: removed YYTOKTMP references which + were causing buffer overflows on large block scalars, + comments, quoted scalars and plain scalars. + + * ext/syck/rubyext.c: dynamic changing of buffer size. + + * ext/syck/syck.h: default buffer size of 4k. + +Wed Nov 26 00:55:30 2003 GOTOU Yuuzou + + * lib/webrick/httpresponse.rb: add HTTPResponse#keep_alive=. + + * lib/webrick/httpserver.rb (HTTPServer#run): should pass the + request's keep_alive flag to the response. + +Tue Nov 25 21:41:35 2003 NAKAMURA Usaku + + * defines.h (ENV_IGNORECASE): should define when DOSISH without + human68k. [ruby-dev:22047] + + * hash.c (env_has_value, env_index): don't ignore case of value. + [ruby-dev:22048] + +Tue Nov 25 21:39:37 2003 Yukihiro Matsumoto + + * file.c (path_check_1): honor sticky bits always. + [ruby-talk:86273] + +Tue Nov 25 20:02:14 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb: do test in more deep + directory. + + * test/fileutils/test_nowrite.rb: ditto. + +Tue Nov 25 19:04:23 2003 Tanaka Akira + + * lib/open-uri.rb (URI::Generic#find_proxy): ENV case sensitivity test + refined. + +Tue Nov 25 18:13:30 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each + test. [ruby-dev:22045] + + * test/fileutils/test_nowrite.rb: ditto. + +Tue Nov 25 17:52:11 2003 Tanaka Akira + + * lib/open-uri.rb (URI::Generic#find_proxy): use http_proxy under CGI + if the environment variable is case sensitive. + +Tue Nov 25 16:41:33 2003 NAKAMURA, Hiroshi + + * test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: + removed. this test requires extra libraries in soap4r/1.5.*. + +Tue Nov 25 16:24:42 2003 NAKAMURA, Hiroshi + + * lib/soap/**/*.rb, lib/wsdl/**/*.rb, lib/xsd/**/*.rb: changed license; + GPL2 -> Ruby's. + + * lib/soap/rpc/driver.rb, lib/soap/wsdlDriver.rb, + lib/soap/streamHandler.rb: add interface to streamhandler. + + * lib/soap/marshal.rb: raise error if parse fails. + + * lib/soap/netHttpClient.rb: add https support. Patched by + Oliver M. Bolzer. + + * lib/soap/netHttpClient.rb: dump HTTP response message body by itself. + + * lib/soap/rpc/driver.rb, lib/soap/rpc/proxy.rb, + lib/soap/wsdlDriver.rb: add driver#mandatorycharset interface to foce + using charset for parsing response from buggy server. + + * lib/soap/encodingstyle/soapHandler.rb: support Apache Axis's half + typed multi-ref array. + + * lib/soap/mapping/factory.rb, lib/soap/mapping/registry.rb: map + SOAPStruct which has multi-accessors which name are the same, to an + array. + + * lib/soap/rpc/element.rb: fixed illegal parameter order. + + * lib/soap/rpc/element.rb: element name of response message could have + the name other than 'return'. + + * lib/wsdl/operation.rb, lib/wsdl/operationBinding.rb, + lib/wsdl/soap/classDefCreator.rb, lib/wsdl/soap/methodDefCreator.rb, + lib/wsdl/soap/methodDefCreatorSupport.rb: WSDL/1.1 allows plural + fault definition in a operation. [ruby-talk:84948] + + * test/wsdl/multiplefault.wsdl, test/wsdl/test_multiplefault.rb: add + test for above fix. + + * lib/wsdl/soap/complexType.rb: support WSDL array definition with + maxOccures="unbound". + + * lib/xsd/charset.rb: use cp932 under emx. Patched by + Siena. / SHINAGAWA, Norihide in [ruby-dev:21972] + + * lib/xsd/xmlparser/parser.rb: set @charset nil by default. Nil means + 'follow encoding declaration in XML'. + + * sample/soap/digraph.rb, sample/wsdl/amazon/wsdlDriver.rb, + sample/wsdl/googleSearch/sampleClient.rb, + sample/wsdl/googleSearch/wsdlDriver.rb, + test/wsdl/test_emptycomplextype.rb, + test/wsdl/marshal/test_wsdlmarshal.rb, + test/xsd/test_xmlschemaparser.rb: use File.open(...) { |f| f.read } + instead of File.open(...).read. [ruby-dev:21964] + + * test/wsdl/emptycomplextype.wsdl, test/wsdl/test_emptycomplextype.rb: + simplify the test case. + + * test/wsdl/axisArray/*: add tests for axis's array encoding. + +Tue Nov 25 16:15:29 2003 WATANABE Hirofumi + + * ruby.h: don't treat Cygwin as Windows. + +Tue Nov 25 15:18:28 2003 Hidetoshi NAGAI + + * configure.in: change default value of --enable-pthread (default: no) + +Tue Nov 25 07:31:16 2003 Nobuyoshi Nakada + + * parse.y (primary): allow newlines just before right argument + parenthesis. (ruby-bugs:PR#1221) + +Mon Nov 24 23:32:06 2003 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_loop, URI::HTTP#proxy_open): use + catch/throw for redirection instead of exception. + (OpenURI.open_loop, OpenURI.redirectable?): restrict redirection. + +Mon Nov 24 19:59:48 2003 Tanaka Akira + + * lib/open-uri.rb (URI::Generic#find_proxy): use CGI_HTTP_PROXY + instead of HTTP_PROXY in the CGI environment. + +Mon Nov 24 19:32:55 2003 WATANABE Hirofumi + + * ext/etc/extconf.rb: check for pw_passwd in struct passwd and + gr_passwd in struct group for DJGPP. + + * ext/etc/etc.c: ditto. + + * ext/Setup.dj: support for curses, etc, zlib. + +Mon Nov 24 17:00:00 2003 Tanaka Akira + + * lib/open-uri.rb: validate option names. + :content_length_proc and :progress_proc option implemented. + +Mon Nov 24 14:53:10 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (XCFLAGS): output empty value instead of `-DRUBY_EXPORT'. + +Sat Nov 22 23:09:45 2003 WATANABE Hirofumi + + * configure.in: set enable_pthread to no on MinGW. + +Sat Nov 22 22:56:20 2003 Hidetoshi NAGAI + + * configure.in: add --enable-pthread option (default: yes) + +Sat Nov 22 22:48:46 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add Tk.grab_release and fix bug of TkComposite + + * ext/tk/lib/tkafter.rb: bug fix of TkAfter#start + + * ext/tk/sample/tkcombobox.rb: new sample script + + * ext/tcltklib/tcltklib.c: add native thread check + +Sat Nov 22 18:49:47 2003 NAKAMURA Usaku + + * ext/curses/curses.c (window_nodelay): nodelay() of NetBSD's + libcruses returns no value, just like keypad(). + +Sat Nov 22 17:36:36 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (HAVE_GETCWD): output to config.h. + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (XCFLAGS): output to config.status. + +Sat Nov 22 13:10:10 2003 Minero Aoki + + * lib/fileutils.rb (have_st_ino?): djgpp has valid st_ino. + +Sat Nov 22 11:28:48 2003 Yukihiro Matsumoto + + * gc.c (Init_stack): stack region is far smaller than usual if + pthread is used. + +Sat Nov 22 07:30:00 2003 Nathaniel Talbott + + * lib/test/unit/util/backtracefilter.rb: fixed a bug that occurred + when an exception had no backtrace. + + * test/testunit/util/test_backtracefilter.rb: ditto. + +Fri Nov 21 16:44:18 2003 Hidetoshi NAGAI + + * ext/tk/lib/tkentry.rb: fix the encoding trouble of percent + substitutions on validatecommand option of TkEntry widget + + * ext/tk/lib/tk.rb: fix bug on {pack|grid}_propagate() method + +Fri Nov 21 16:12:11 2003 Akinori MUSHA + + * ruby.1: Fix markups and grammar. + +Fri Nov 21 14:49:42 2003 Minero Aoki + + * ruby.1: wrote about ruby related environment variables. + +Fri Nov 21 12:28:03 2003 Yukihiro Matsumoto + + * marshal.c (w_extended): singleton methods should not be checked + when dumping via marshal_dump() or _dump(). [ruby-talk:85909] + +Fri Nov 21 01:40:00 2003 Hidetoshi NAGAI + + * configure.in: check + + * ruby.h: include pthread.h if existence. + define is_ruby_native() macro when not HAVE_NATIVETHREAD + + * eval.c: undef is_ruby_native() function when not HAVE_NATIVETHREAD + +Fri Nov 21 00:43:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: use #__send__ instead of #send. + + * lib/test/unit/testcase.rb: ditto. + +Thu Nov 20 19:19:22 2003 WATANABE Hirofumi + + * configure.in: don't find the Cygwin's pthread library on MinGW. + +Thu Nov 20 19:15:50 2003 Minero Aoki + + * lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not + have st_ino (always 0). [ruby-dev:21972] + + * lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not + allow overwriting files by rename(2). + + * test/fileutils/test_fileutils.rb: windows? -> + have_drive_letter?, have_file_perm? + +Thu Nov 20 17:50:58 2003 Hidetoshi NAGAI + + * ext/tk/sample/tkballoonhelp.rb: new sample script + + * ext/tk/sample/tkmultilistbox.rb: ditto + + * ext/tk/sample/tktextframe.rb: ditto + +Thu Nov 20 13:37:34 2003 Hidetoshi NAGAI + + * ruby.h: define is_ruby_native_thread() for no native thread + environment + + * eval.c: ditto + +Thu Nov 20 12:42:47 2003 Hidetoshi NAGAI + + * configure.in: always check existence of the pthread library + + * ruby.h: define macros for ruby's native thread check + + * eval.c: add ruby's native thread check + + * gc.c: ditto + +Wed Nov 19 14:45:18 2003 Minero Aoki + + * lib/net/http.rb (to_ary): print more friendly warning message. + +Wed Nov 19 14:32:08 2003 Minero Aoki + + * lib/fileutils.rb (fu_same?): add djgpp and wince. + + * lib/fileutils.rb (cannot_overwrite_file?): add wince. + +Wed Nov 19 11:04:47 2003 NAKAMURA Usaku + + * lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32 + is same as mswin32. + +Wed Nov 19 07:54:00 2003 Nathaniel Talbott + + * lib/test/unit.rb: do not run tests if $! is set. + + * lib/test/unit/assertionfailederror.rb: extend StandardError instead + Exception (irb catches the former but not the latter). + +Tue Nov 18 23:31:36 2003 WATANABE Hirofumi + + * missing/memmove.c (memmove): take void *, not char *. + + * missing.h (memmove): ditto. + + * missing.h (strchr, strrchr): return char *, not int. + +Tue Nov 18 22:20:10 2003 Minero Aoki + + * lib/fileutils.rb (fu_same?): temporal fix for windows. + +Tue Nov 18 19:05:04 2003 Minero Aoki + + * lib/fileutils.rb (fu_same?): check by inode instead of path + name, to detect two hard links pointing to the same content. + + * test/fileutils.rb: did not create correctly looped symlinks. + +Tue Nov 18 18:23:05 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_read): behave as IO at empty string. + [ruby-dev:21939], [ruby-dev:21941] + + * ext/stringio/stringio.c (strio_getc, strio_getline): set EOF flag. + + * ext/stringio/stringio.c (strio_rewind, strio_seek, strio_ungetc): + clear EOF flag. + + * test/stringio/test_stringio.rb: imported from [ruby-dev:21941]. + +Tue Nov 18 14:06:35 2003 Minero Aoki + + * lib/fileutils.rb (fu_each_src_dest): raise if src==dest. + [ruby-talk:85344] [ruby-core:01699] + + * lib/fileutils.rb: use Object#is_a? instead of Class#=== to allow + e.g. remote objects for receivers. + + * lib/fileutils.rb: FileTest -> File. + + * lib/fileutils.rb: put parentheses for arguments of File.xxxx? + + * test/fileutils/test_fileutils.rb (test_cp): test "cp a a". + + * test/fileutils/test_fileutils.rb (test_mv): test "mv a a". + + * test/fileutils/test_fileutils.rb (test_ln): test "ln a a". + + * test/fileutils/test_fileutils.rb (test_ln_s): test "ln_s a a". + + * test/fileutils/test_fileutils.rb (test_install): test "install a a". + + * test/fileutils/fileasserts.rb: new method assert_symlink. + + * test/fileutils/fileasserts.rb: assert_is_directory -> assert_directory. + +Mon Nov 17 19:38:49 2003 Yukihiro Matsumoto + + * file.c (getcwdofdrv): avoid using getcwd() directly, use + my_getcwd() instead. + + * merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine + . [ruby-core:01596] + +Mon Nov 17 10:50:27 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion::complete): allow least + common completion for three or more candidates. + +Mon Nov 17 09:41:38 2003 Nobuyoshi Nakada + + * lib/test/unit/ui/tk/testrunner.rb, + lib/test/unit/ui/gtk/testrunner.rb: + run GUI main loop in sub thread. + + * lib/test/unit/ui/gtk2/testrunner.rb: imported from rough. + + * lib/test/unit/autorunner.rb (keyword_display): sort keywords. + +Sun Nov 16 18:10:57 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): iterator should return value from next inside + begin/rescue/end. (ruby-bugs:PR#1218) + +Sun Nov 16 13:26:07 2003 Yukihiro Matsumoto + + * marshal.c (w_object): LINK check earlier than anything else, + i.e. do not dump TYPE_IVAR for already dumped objects. + (ruby-bugs:PR#1220) + + * eval.c (rb_eval): call "inherited" only when a new class is + generated; not on reopening. + + * eval.c (eval): prepend error position in evaluating string to + "mesg" attribute string only when it's available and is a + string. + +Sun Nov 16 12:16:10 2003 Minero Aoki + + * lib/net/protocol.rb: logging response body. [experimental] + [ruby-list:38800] + +Sun Nov 16 10:49:38 2003 Gavin Sinclair + + * lib/thread.rb (Thread.exclusive): wrap method definition in + class Thread to enable rdoc to process. + +Sun Nov 16 09:45:23 2003 Minero Aoki + + * lib/net/http.rb (set_debug_output): warn if method is called + after #start. [ruby-dev:38798] + +Sun Nov 16 04:41:33 2003 Yukihiro Matsumoto + + * eval.c (eval): do not re-raise exception to avoid unnecessary + exception copying, instead modify exception and internal + information to adjust eval(). + + * eval.c (backtrace): can return the current frame information + only if lev < -1. + +Sat Nov 15 22:16:42 2003 GOTOU Yuuzou + + * /ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): + refine error message. + +Sat Nov 15 10:05:40 2003 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_loop, OpenURI::HTTP#proxy_open): + refactored to support options. + (Buffer): maintain size by this class. + +Sat Nov 15 07:40:14 2003 Yukihiro Matsumoto + + * eval.c (rb_method_node): new API to retrieve method body. + +Fri Nov 14 13:21:30 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07) + + * ext/tk/lib/tkdialog.rb: TkDialog.new accepts a parent widget + argument [ruby-talk:85066] + +Thu Nov 13 20:53:35 2003 Tanaka Akira + + * lib/open-uri.rb (Kernel[#.]open): hard coded URI schemes removed. + [ruby-ext:02251] + +Thu Nov 13 19:17:00 2003 Hidetoshi NAGAI + + * lib/test/unit/ui/tk/testrunner.rb: use grid and panedwindow + (if available) + +Thu Nov 13 17:56:41 2003 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_uri): use File::RDONLY. + reported by Take_tk . + [ruby-ext:02245] + +Thu Nov 13 16:45:53 2003 GOTOU Yuuzou + + * ext/openssl/ossl_x509req.c (ossl_x509req_to_der): add function for + X509::Request#to_der. + +Thu Nov 13 11:31:14 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion#complete): prior shorter + name to containing longer name. + +Thu Nov 13 06:08:54 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: stop freezing some classes + + * ext/tk/lib/multi-tk.rb: ditto. + +Wed Nov 12 17:32:49 2003 Nobuyoshi Nakada + + * lib/test/unit/assertions.rb (assert_throws, assert_nothing_thrown): + uncaught throw in sub thread raises ThreadError. + + * lib/test/unit/ui/tk/testrunner.rb (setup_ui): "expand" is not + necessary. + +Wed Nov 12 14:09:43 2003 Shugo Maeda + + * test/monitor/test_monitor.rb: fix the timing problem by Queue. + +Wed Nov 12 12:59:44 2003 Shugo Maeda + + * test/monitor/test_monitor.rb: added. + +Wed Nov 12 10:14:28 2003 Shugo Maeda + + * lib/monitor.rb: refactored. Thanks, Gennady Bystritsky. + +Wed Nov 12 06:11:39 2003 GOTOU Yuuzou + + * ext/openssl/ossl.c (ossl_x509_sk2ary, ossl_x509crl_sk2ary): + add functions to convert STACK into Array. + + * ext/openssl/ossl.h: add prototypes. + + * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_set_certificates, + ossl_pkcs7_get_certificates, ossl_pkcs7_get_crls, + ossl_pkcs7_set_crls): add functions for PKCS7#certificates= + PKCS7#certificates, PKCS7#crls= and PKCS7#crls. + +Wed Nov 12 00:47:00 2003 Nathaniel Talbott + + * lib/test/unit/ui/testrunnermediator.rb: should require 'test/unit'. + +Tue Nov 11 23:54:00 2003 Nathaniel Talbott + + * lib/test/unit/ui/gtk/testrunner.rb: added a rescue clause to handle + the case when the requested font is not available. + +Tue Nov 11 22:44:08 2003 Yukihiro Matsumoto + + * io.c (appendline): file may not end with newline. a bug if + READ_DATA_PENDING_PTR is defined. [ruby-talk:84925] + +Tue Nov 11 10:42:41 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: raise an exception when creating TkWindow + object, because TkWindow class is an abstract class. + +Tue Nov 11 03:30:43 2003 GOTOU Yuuzou + + * lib/ext/openssl/ossl_conf.c (ossl_config_get_value): return nil + if the specified value doesn't exist. + + * lib/ext/openssl/ossl_conf.c (ossl_config_get_section): return + a empty hash if the specified section doesn't exist. + +Mon Nov 10 11:40:29 2003 Shugo Maeda + + * lib/monitor.rb (wait): return true on signal/broadcastfalse and + false on timeout. Thanks Gennady Bystritsky. + +Mon Nov 10 00:07:10 2003 Nobuyoshi Nakada + + * parse.y (primary): primary_value may be 0 when syntax error. + [ruby-talk:84893] + +Sun Nov 9 02:05:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: un-deprecated #assert_not_nil to + maintain symmetry with #assert_nil. Also added better output for + #assert_kind_of. + + * test/testunit/tc_assertions.rb: ditto. + +Sat Nov 8 18:50:20 2003 NAKAMURA, Hiroshi + + * test/wsdl/raa/*: add new testcase for WSDL loading, parsing and + reading. + + * test/soap/marshal/*: backport from soap4r/1.5.1. all differences are + for ruby/1.6. + + * lib/soap/*: backport from soap4r/1.5.1. all differences are for + ruby/1.6. + + * lib/wsdl/data.rb, lib/wsdl/xmlSchema/data.rb: move definition of + ArrayTypeAttrName from ::WSDL::XMLSchema::* to ::WSDL::*. + [ruby-talk:84813] + + * lib/wsdl/soap/definitions.rb: element name typo in custom exception + struct definition which is needed for wsdlDriver; camelCase -> + underscore_name. + +Sat Nov 8 13:49:50 2003 Hidetoshi NAGAI + + * configure.in: improvement of pthread check + +Sat Nov 8 13:28:46 2003 Takaaki Tateishi + + * ext/dl/sym.c: Add DL.win32_last_error and DL.last_error. + Thanks, Kaoru Shirai. + +Sat Nov 8 06:19:38 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: To fix 'pthread-enabled Tcl/Tk' problem, + TclTkIp#_eval calls Tcl_Eval() on the mainloop thread only + (queueing a handler to the EventQueue). + + * ext/tcltklib/README.1st: edit the description of '--with-pthread-ext' + +Fri Nov 7 23:23:04 2003 Tanaka Akira + + * lib/pathname.rb (Pathname#+): if self or the argument is `.', return + another. + (Pathname#parent): if self is `.', return `..'. + (Pathname#children): if self is `.', don't prepend self for a + pathname in a result. + (Pathname#join): re-implemented using Pathname#+. + (Pathname#find): if self is `.', remove `./' prefix of yielding + pathname. + +Fri Nov 7 10:23:24 2003 Nobuyoshi Nakada + + * ext/socket/socket.c (make_hostent): get rid of SEGV on aliases + lookup failure. (ruby-bugs:PR#1215) + +Fri Nov 7 04:08:05 2003 UENO Katsuhiro + + * ext/zlib/zlib.c (Init_zlib): define Zlib::GzipReader#each_line as + an alias of Zlib::GzipReader#each. + +Fri Nov 7 01:03:16 2003 Yukihiro Matsumoto + + * eval.c (rb_load): save and restore rb_prohibit_interrupt. + [ruby-dev:21857] + +Thu Nov 6 18:05:07 2003 Nobuyoshi Nakada + + * io.c (rb_io_inspect): show the path also at a closed file. + [ruby-dev:21851] + +Thu Nov 6 11:42:07 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_set_string, strio_reopen): check + tainted. + + * ext/stringio/stringio.c (strio_copy, strio_ungetc, strio_write, + strio_putc): add infection. + + * ext/stringio/stringio.c (strio_path): just nil. [ruby-dev:21846] + + * ruby.c (proc_options): reserve searched script path in the + source file name table. [ruby-list:38765] + + * lib/optparse.rb (OptionParser::Completion#complete): default not to + ignore case on completion. [ruby-talk:84726] + + * win32/win32.c (make_cmdvector): process backslashes even if a quote + is not enclosed. + +Wed Nov 5 23:49:45 2003 NAKAMURA, Hiroshi + + * sample/openssl/gen_csr.rb: there (at least) is a CA which does not + accept DN in UTF8STRING format. it's a sample. + +Wed Nov 5 22:55:16 2003 Hidetoshi NAGAI + + * configure.in, eval.c, signal.c: : add '--with-pthread-ext' + option to fix the pthread trouble on 'tcltklib' + + * ext/tcltklib/README.1st: add the description of '--with-pthread-ext' + + * ext/tk/lib/tktext.rb: add TkText#text_copy, text_cut, text_paste + to support Tcl/Tk8.4's tk_textCopy, tk_textCut, tk_textPaste + + * ext/tk/lib/tk.rb: add TkMenu#set_focus support Tcl/Tk's + tk_menuSetFocus + +Wed Nov 5 17:33:45 2003 Yukihiro Matsumoto + + * eval.c (rb_load): allow interrupt during loaded program + evaluation. [ruby-dev:21834] + + * hash.c (rb_hash_fetch): always warn if default argument and a + block are supplied at the same time. [ruby-dev:21842] + + * hash.c (env_fetch): ditto. + + * array.c (rb_ary_fetch): ditto. + +Wed Nov 5 19:08:47 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse): + do not remove next argument if empty value is placed. + + * test/optparse: added. + +Wed Nov 5 17:05:18 2003 Nobuyoshi Nakada + + * lib/test/unit/ui/gtk/testrunner.rb: typo. + +Wed Nov 5 11:13:32 2003 NAKAMURA Usaku + + * string.c: add #include "version.h". this file still depends on it. + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, + wince/Makefile.sub: add version.h dependency to string.c. + +Wed Nov 5 09:14:23 2003 Shugo Maeda + + * lib/monitor.rb: revert to the previous revision. + +Wed Nov 5 08:39:51 2003 GOTOU Yuuzou + + * lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain. + + * lib/webrick/https.rb (HTTPRequest#meta_vars): create + SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain. + + * ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil + if no cert-chain was given. + +Tue Nov 4 23:44:48 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub: + remove needless version.h dependency. + +Tue Nov 4 23:38:43 2003 WATANABE Hirofumi + + * class.c, hash.c, string.c: remove #include "version.h". + + * Makefile.in: remove needless version.h dependency. + +Tue Nov 4 06:54:52 2003 Yukihiro Matsumoto + + * io.c (read_all): fptr->f may be NULL, if IO is closed in the + signal handler. + + * io.c (io_read): ditto. + + * string.c (get_pat): remove 1.8.0 warning code. + + * string.c (rb_str_match): extend warning until 1.8.2. + + * string.c (rb_str_match2): ditto. + + * class.c (class_instance_method_list): remove 1.8.0 warnings. + method_list now recurs. [ruby-dev:21816] + + * class.c (rb_obj_singleton_methods): ditto. + + * array.c (rb_ary_select): remove select with block. + [ruby-dev:21824] + + * hash.c (rb_hash_select): ditto. + + * hash.c (env_select): ditto. + + * re.c (match_select): ditto. + + * struct.c (rb_struct_select): ditto. + +Mon Nov 3 22:53:21 2003 Minero Aoki + + * lib/racc/parser.rb: synchronize with Racc 1.4.4. + + * ext/racc/cparse/cparse.c: ditto. + + * ext/racc/cparse/cparse.c (parse_main): should abort when + the length of LR state stack <=1, not ==0. + +Mon Nov 3 08:50:47 2003 Yukihiro Matsumoto + + * process.c (check_uid_switch): remove duplicated error messages. + + * process.c (check_gid_switch): ditto. + +Sun Nov 2 02:28:33 2003 GOTOU Yuuzou + + * lib/webrick/ssl.rb: new option :SSLExtraChainCert. + +Sun Nov 2 01:02:04 2003 Akinori MUSHA + + * string.c (rb_str_hash): Update the HASH_PERL alternative hash + algorithm in sync with Perl 5.8. + + * st.c (strhash): Ditto. + +Sat Nov 1 18:21:09 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new method + SSLSocket#peer_cert_chain. + + * ext/openssl/ossl_x509req.c (GetX509ReqPtr): new function + which returns underlying X509_REQ. + + * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_issuer_cert, + ossl_x509extfactory_set_subject_cert, ossl_x509extfactory_set_crl, + ossl_x509extfactory_set_subject_req, ossl_x509extfactory_set_config): + use underlying C struct without duplication not to leak momory. + +Sat Nov 1 01:49:03 2003 NAKAMURA, Hiroshi + + * lib/soap/mapping/factory.rb: mark marshalled basetype objects when + @allow_original_mapping is true. multi-referencing basetype node is + prohibited in SOAP/1.1 encoding but soap4r's original ruby object + mapping requires basetype to be marked to detect self referencing + loop. e.g. o = 1; o.instance_eval { @iv = o } soap4r's original + mapping is only used through soap/marshal API. + + * test/soap/marshal/test_marshal.rb: add tests for self referencing + immutable objects. + + * test/soap/calc/test_calc_cgi.rb: fix test name. + +Fri Oct 31 22:26:29 2003 Takaaki Uematsu + + * wince/string_wce.c (strrchr): should decrement pointer. + + * wince/Makefile.sub: correct a range of isdigit(). + +Fri Oct 31 12:55:24 2003 WATANABE Hirofumi + + * configure.in, lib/mkmf.rb: add RPATHFLAG for NetBSD. + [ruby-dev:21791] + + * bcc32/Makefile.sub, win32/Makefile.sub, win32/Makefile.sub: ditto. + +Fri Oct 31 01:38:14 2003 NAKAMURA Usaku + + * wince/Makefile.sub, win32/Makefile.sub (.y.c): allow white spaces + at the beginning of line to remove by sed. (ruby-bugs-ja:PR#580) + +Fri Oct 31 01:02:24 2003 Yukihiro Matsumoto + + * compar.c (cmp_equal): protect exceptions from <=> comparison + again. returns nil if any exception or error happened during + comparison. + + * eval.c (search_required): should update *featurep when DLEXT2 is + defined. (ruby-bugs-ja:PR#581) + +Thu Oct 30 23:41:04 2003 Masatoshi SEKI + + * lib/drb/drb.rb: add DRbArray + + * lib/drb/invokemethod.rb: fix Hash#each problem. [ruby-dev:21773] + + * lib/drb/unix.rb: add LoadError. [ruby-dev:21743] + +Thu Oct 30 23:19:11 2003 NAKAMURA, Hiroshi + + * lib/soap/generator.rb: better XML pretty printing. + + * lib/soap/encodingstyle/soapHandler.rb: remove unnecessary namespace + assignment in the element which has "encodingStyle" attribute, and + add necessary namespace assignment for "arrayType" attribute. + + * test/soap/calc/test_calc_cgi.rb: take over $DEBUG to ruby process + through CGI. + +Thu Oct 30 22:59:39 2003 why the lucky stiff + + * ext/syck/yaml2byte.c: HASH const too long. Thanks, matz. + +Thu Oct 30 19:13:53 2003 Akinori MUSHA + + * ext/syck/MANIFEST: Add yamlbyte.h. + +Thu Oct 30 14:25:31 2003 Yukihiro Matsumoto + + * io.c (READ_DATA_BUFFERED): new macro to detect whether stdio + buffer filled. + + * io.c (rb_io_fptr_cleanup): move path deallocation to + rb_io_fptr_finalize (finalizer called by GC). + +Thu Oct 30 13:23:39 2003 Yukihiro Matsumoto + + * parse.y (logop): left may be NULL. [ruby-talk:84539] + + * eval.c (rb_eval): NODE_CASE nd_head may be NULL. + +Thu Oct 30 10:14:51 2003 NAKAMURA, Hiroshi + + * lib/test/unit/autorunner.rb: make fox runner work. + +Thu Oct 30 09:32:26 2003 NAKAMURA Usaku + + * process.c (rb_f_system): fixed lack of security check before + calling do_spawn() on win32. [ruby-talk:84555] + +Thu Oct 30 02:46:35 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): single array value to normal Proc#call + (i.e. not via lambda call), should be treated just like yield. + [ruby-dev:21726] + +Thu Oct 30 02:25:48 2003 GOTOU Yuuzou + + * ext/openssl/lib/openssl/buffering.rb (Buffering#initialize): + add new method to inherit @sync from @io.sync. + + * ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): no need to + set sync flag explicitly. + + * ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): call super. + + * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): set extra chain + certificates in @extra_chain_cert. + +Wed Oct 29 22:02:04 2003 NAKAMURA, Hiroshi + + * test/drb/drbtest.rb: use rbconfig.rb to make the path of ruby + interpreter to exec, instead of test/ruby/envutil.rb, + +Wed Oct 29 19:58:59 2003 NAKAMURA Usaku + + * ext/tcltklib/tcltklib.c (CONST84): define CONST84 when it is not + defined and TCL_MAJOR_VERSION >= 8. + + * ext/tcltklib/tcltklib.c (VwaitVarProc, WaitVariableProc, + rb_threadVwaitProc): use CONST84 instead of CONST. + + * ext/tcltklib/tcltklib.c (ip_rbTkWaitCommand, + ip_rb_threadTkWaitCommand): use CONST84 always. + +Wed Oct 29 17:27:05 2003 Tanaka Akira + + * re.c (rb_reg_s_union, Init_Regexp): new method `Regexp.union'. + + * lib/pathname.rb (realpath): examine Dir.pwd because it may have + symlinks. + +Wed Oct 29 17:16:31 2003 Nobuyoshi Nakada + + * eval.c (rb_longjmp): must not disturb original jump. + [ruby-dev:21733] + +Wed Oct 29 15:28:34 2003 Yukihiro Matsumoto + + * eval.c (Init_Proc): taint preallocated exception object + sysstack_error. [ruby-talk:84534] + +Wed Oct 29 11:27:39 2003 Yukihiro Matsumoto + + * parse.y (ret_args): node may be NULL. [ruby-talk:84530] + +Tue Oct 28 15:20:12 2003 NAKAMURA Usaku + + * ext/tcltklib/tcltklib.c (VwaitVarProc, ip_rbVwaitObjCmd, + WaitVariableProc, WaitVisibilityProc, WaitWindowProc, + ip_rbTkWaitObjCmd, ip_rbTkWaitCommand, rb_threadVwaitProc, + rb_threadWaitVisibilityProc, rb_threadWaitWindowProc, + ip_rb_threadVwaitObjCmd, ip_rb_threadTkWaitObjCmd): prototype; + avoid VC++ warnings. + +Mon Oct 27 19:19:55 2003 Nobuyoshi Nakada + + * eval.c (rb_longjmp): ignore reentering error while warning. + [ruby-dev:21730] + +Mon Oct 27 00:23:50 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_ruby): bug fix on Win : hang-up when + calling 'exit' in the Tk callback procedure. [ruby-list:38656] + +Sat Oct 25 09:18:04 2003 Yukihiro Matsumoto + + * eval.c (rb_method_missing): protect exception from within + "inspect". (ruby-bugs:PR#1204) + +Fri Oct 24 23:26:34 2003 Yukihiro Matsumoto + + * hash.c (rb_hash_each): Hash#each should yield single value. + [ruby-talk:84420] + + * hash.c (env_each): ditto for ENV.each. + +Thu Oct 23 20:25:32 2003 GOTOU Yuuzou + + * lib/webrick/server.rb (GenericServer#start): should rescue + IOError from IO::accept. [ruby-dev:21692] + +Thu Oct 23 17:59:36 2003 Nobuyoshi Nakada + + * eval.c (ruby_cleanup): initialize stack bottom for embedding. + [ruby-dev:21686] + + * ext/dl/extconf.rb: move list of files to clean from DEPEND file, + to get rid of macro redefinitions. + +Thu Oct 23 13:44:00 2003 Nobuyoshi Nakada + + * parse.y: integrate operations for stack_type. [ruby-dev:21681] + +Thu Oct 23 00:41:45 2003 NAKAMURA, Hiroshi + + * test/soap/calc/*, test/soap/helloworld/*: set logging threshold + to ERROR. + +Wed Oct 22 12:53:31 2003 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file): + ignore tests which raised LoadError. + + * test/drb/drbtest.rb, test/ruby/test_beginendblock.rb, + test/ruby/test_system.rb: avoid requiring same file twice. + + * test/drb/test_drbssl.rb, test/drb/test_drbunix.rb: should not use + ARGV unless invoked directly. do not create test cases unless + required libraries are available. + +Wed Oct 22 02:31:34 2003 Yukihiro Matsumoto + + * eval.c (ruby_cleanup): should not ignore exit_value in END + execution. [ruby-dev:21670] + +Tue Oct 21 23:16:26 2003 Yukihiro Matsumoto + + * eval.c (ruby_cleanup): call finalizers and exit procs before + terminating threads. + + * eval.c (ruby_cleanup): preserve ruby_errinfo before ruby_finalize_0(). + +Tue Oct 21 15:57:11 2003 Nobuyoshi Nakada + + * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file): + prepend the directory of target file to the load path. + +Tue Oct 21 15:08:53 2003 NAKAMURA Usaku + + * win32/win32.c (do_spawn, do_aspawn): should wait child process even + if callded with P_OVERLAY. + + * win32/win32.c (do_spawn, do_aspawn): should return child's exit + status to parent. + +Tue Oct 21 00:35:02 2003 NAKAMURA, Hiroshi + + * test/soap/calc/*, test/soap/helloworld/*: catch the exception from + test server thread and recover. + +Tue Oct 21 00:22:57 2003 Masatoshi SEKI + + * test/drb/*: import drb/runit. + +Mon Oct 20 23:55:47 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): set current node after arguments evaluation. + [ruby-dev:21632] + + * eval.c (rb_yield_0): set current node and keep it at local jump. + +Mon Oct 20 22:01:18 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_cleanup): keep thread group for main thread. + [ruby-dev:21644] + +Mon Oct 20 18:28:10 2003 Nobuyoshi Nakada + + * eval.c (rb_catch): backout. + +Mon Oct 20 17:31:46 2003 Yukihiro Matsumoto + + * eval.c (PUSH_FRAME): generate unique number to be TAG_JUMP() + destination. + + * eval.c (localjump_destination): use unique number in ruby_frame + for localjump destination. + +Mon Oct 20 11:31:44 2003 Nobuyoshi Nakada + + * test/ruby/test_signal.rb (test_signal): restore old trap. + +Mon Oct 20 11:00:46 2003 Yukihiro Matsumoto + + * gc.c (gc_sweep): loosen page free condition to avoid add_heap() + race condition. [ruby-dev:21633] + + * gc.c (gc_sweep): do not update malloc_limit when malloc_increase + is smaller than malloc_limit. + +Mon Oct 20 09:45:12 2003 NAKAMURA Usaku + + * lib/debug.rb (debug_command): remove debug print. + +Sun Oct 19 13:12:30 2003 Tanaka Akira + + * lib/pathname.rb (foreachline, dir_foreach): add obsolete warning. + +Sun Oct 19 00:14:22 2003 NAKAMURA, Hiroshi + + * test/soap/calc/*, test/soap/helloworkd/*: changed port# of test + server. (17171) + +Sat Oct 18 23:01:32 2003 WATANABE Hirofumi + + * missing/acosh.c (DBL_MANT_DIG): typo fix(ifdef -> ifndef). + +Sat Oct 18 05:48:59 2003 why the lucky stiff + + * ext/syck/rubyext.c: YAML::Syck::compile method. + + * ext/syck/syck.c: Buffer edge bug. + + * ext/syck/yaml2byte.c: YAML to bytecode converter. + + * ext/syck/yamlbyte.h: Ditto. + + * ext/syck/bytecode.c: Bytecode parser fixes to empty collections + and empty strings. + + * ext/syck/token.c: Ditto. + +Fri Oct 17 23:07:38 2003 Akinori MUSHA + + * ext/enumerator/enumerator.c, ext/enumerator/enumerator.txt: + Provide Kernel#to_enum as an alias for Kernel#enum_for. Maybe + this is a better name. + +Fri Oct 17 23:00:30 2003 Akinori MUSHA + + * lib/generator.rb: Add rdoc documentation. + +Fri Oct 17 22:16:42 2003 Akinori MUSHA + + * lib/set.rb: Reword and fix Overview. + + * lib/set.rb: It is not necessary to require + 'test/unit/ui/console/testrunner'. + +Fri Oct 17 11:15:22 2003 NAKAMURA Usaku + + * test/ruby/test_range.rb: added. + + * MANIFEST: add test/ruby/test_range.rb. + +Fri Oct 17 03:21:23 2003 William Sobel + + * ext/socket/socket.c (make_hostent): h_aliases may be NULL. + (ruby-bugs:PR#1195) + + * ext/socket/socket.c (sock_s_gethostbyaddr): ditto. + +Fri Oct 17 00:12:41 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: (bug fix) instance variable @frame was used + without initializing on TkComposite module. + +Thu Oct 16 23:51:04 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: If $DEBUG == true and some exception is caused + in a callback operation, Ruby/Tk shows a (verbose) backtrace + information on the callback process. + +Thu Oct 16 17:09:19 2003 Yukihiro Matsumoto + + * lib/debug.rb (DEBUGGER__::Context::debug_command): do not call + debug_silent_eval() when $1 is not set. (ruby-bugs:PR#1194) + +Thu Oct 16 16:54:57 2003 Yukihiro Matsumoto + + * string.c (rb_str_upto): ("a"..."a").to_a should return []. + [ruby-core:01634] + +Thu Oct 16 16:40:51 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: + Add Tk::EncodedString and Tk::UTF8_String class to support + characters using the \uXXXX escape to the UNICODE string. + + * ext/tk/sample/{demos-en,demos-jp}/unicodeout.rb + new demo-scripts (samples of Tk::UTF8_String) + + * ext/tk/sample/{demos-en,demos-jp}/widget + add entries for 'unicodeout.rb' + +Thu Oct 16 08:38:06 2003 Nobuyoshi Nakada + + * test/digest/test_digest.rb (test_eq): show failed class. + + * test/ruby/test_iterator.rb (test_break, test_return_trace_func): + test localjump destination. + +Wed Oct 15 20:22:31 2003 NAKAMURA, Hiroshi + + * lib/soap/netHttpClient.rb: use URI::HTTP#request_uri instead of + instance_eval('path_query'). [ruby-list:38575] + +Wed Oct 15 17:24:45 2003 URABE Shyouhei + + * lib/cgi.rb (CGI::Cookie): tiny typo fix. + +Wed Oct 15 15:00:54 2003 Nobuyoshi Nakada + + * eval.c (ruby_run): just return FAILURE instead of parse error + count. [ruby-list:38569] + +Wed Oct 15 13:17:02 2003 NAKAMURA Usaku + + * ext/digest/digest.c (rb_digest_base_alloc): need to initialize + buffer. [ruby-dev:21622] + +Wed Oct 15 11:23:05 2003 Yukihiro Matsumoto + + * marshal.c (w_object): dump extended modules as well. + + * marshal.c (r_object0): TYPE_USRMARSHAL should restore extended + modules before invoking marshal_load. these two fixes are done + by Masatoshi Seki . + +Wed Oct 15 09:30:34 2003 NAKAMURA Usaku + + * ext/enumerator/enumerator.c (enumerator_each): avoid VC++ warning. + + * ext/syck/syck.h: include stdio.h for definition of FILE. + +Wed Oct 15 08:09:07 2003 why the lucky stiff + + * ext/syck/bytecode.c: Checkin of YAML bytecode support. + + * ext/syck/gram.c: Ditto. + + * ext/syck/syck.c: Ditto. + + * ext/syck/token.c: Ditto. + + * ext/syck/handler.c: Ditto. + + * ext/syck/handler.c: Now using 'tag' rather than 'taguri' in type URIs. + + * ext/syck/rubyext.c: Ditto (on both counts). + +Wed Oct 15 05:05:53 2003 Akinori MUSHA + + * lib/generator.rb: A new library which converts an internal + iterator to an external iterator. + + * lib/abbrev.rb: A new library which creates an abbreviation table + from a list. + +Wed Oct 15 04:31:51 2003 Hidetoshi NAGAI + + * ext/tk/sample/demos-en/entry3.rb, ext/tk/sample/demos-jp/entry3.rb: + new demo-scripts + + * ext/tk/sample/demos-en/widget, ext/tk/sample/demos-jp/widget: + add entries for 'entry3.rb' + +Wed Oct 15 04:31:47 2003 Akinori MUSHA + + * test/digest/test_digest.rb: Moved from ext/digest/test.rb. + +Wed Oct 15 03:53:20 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: fixed trouble on auto-load Tcl commands (enbug + on the last commit). + +Wed Oct 15 00:25:00 2003 Yukihiro Matsumoto + + * parse.y (yylex): argument parentheses preceded by spaces should + be warned; not error. [ruby-talk:84103] + +Wed Oct 15 00:20:15 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: replace Tcl/Tk's vwait and tkwait to + switch on threads smoothly and avoid seg-fault. + + * ext/tcltklib/tcltklib.c: add TclTkIp._thread_vwait and + _thread_tkwait for waiting on a thread. (Because Tcl/Tk's vwait + and tkwait command wait on an eventloop.) + + * ext/tk/lib/multi-tk.rb: support TclTkIp._thread_vwait and + _thread_tkwait. + + * ext/tk/lib/tk.rb: now, TkVariable#wait has 2 arguments. + If 1st argument is true, waits on a thread. If false, waits on + an eventloop. If 2nd argument is true, checks existence of + rootwidgets. If false, doesn't. Default is wait(true, false). + + * ext/tk/lib/tk.rb: add TkVariable#tkwait(arg) which is equal to + TkVariable#wait(arg, true). wait_visibility and wait_destroy + have an argument for waiting on a thread or an eventloop. + + * ext/tk/lib/tk.rb: improve of accessing Tcl/Tk's special variables. + + * ext/tk/lib/tkafter.rb: support 'wait on a thread' and 'wait on + an eventloop'. + +Wed Oct 15 00:10:24 2003 NAKAMURA, Hiroshi + + * lib/soap/baseData.rb: Introduce SOAPType as the common ancestor of + SOAPBasetype and SOAPCompoundtype. + + * lib/soap/generator.rb, lib/soap/element.rb, lib/soap/encodingstyle/*: + Encoding methods signature change. Pass SOAPGenerator as a parameter. + + * lib/soap/mapping/*, test/soap/marshal/test_marshal.rb: Refactoring + for better marshalling/unmarshalling support. Now I think SOAP + marshaller supports all kind of object graph which is supported by + Ruby's original marshaller. Of course there could be bugs as always. + Find it. :-) + + * lib/soap/rpc/standaloneServer.rb: Set severity threshould to INFO. + DEBUG is too noisy. + + * lib/xsd/datatypes.rb: DateTime#of is obsoleted. Use DateTime#offset. + + * test/wsdl/emptycomplextype.wsdl, test/xsd/xmlschema.xml: Avoid + useless warning. + +Tue Oct 14 19:09:35 2003 Nobuyoshi Nakada + + * eval.c (ruby_finalize_0): return the given exit status unless + SystemExit got raised. + +Tue Oct 14 11:53:49 2003 Nobuyoshi Nakada + + * intern.h (ruby_stop): never return. + + * ruby.h (ruby_run): ditto. + +Tue Oct 14 04:43:55 2003 Tanaka Akira + + * lib/pathname.rb (realpath): make ELOOP check bit more robust. + (children): prepend self by default. + (chroot): obsoleted. + +Tue Oct 14 02:29:31 2003 Nobuyoshi Nakada + + * eval.c (rb_require_safe): segfault after loading .so. + +Tue Oct 14 02:05:23 2003 Akinori MUSHA + + * ext/Setup*, ext/enumerator/*: Add ext/enumerator, a helper + module for the Enumerable interface. + +Mon Oct 13 23:55:59 2003 WATANABE Hirofumi + + * test/ruby/envutil.rb: use Config::CONFIG["ruby_install_name"], + not "ruby". + +Mon Oct 13 23:57:29 2003 Nobuyoshi Nakada + + * eval.c (rb_feature_p): match by classified suffix. + + * eval.c (rb_require_safe): require library in the specified safe + level. + + * variable.c (rb_autoload, rb_autoload_load): restore safe level + when autoload was called. [ruby-dev:21338] + + * intern.h: prototypes; rb_require_safe. + + * test/runner.rb: accept non-option arguments. + +Mon Oct 13 20:49:51 2003 Yukihiro Matsumoto + + * string.c (str_new4): should not preserve FL_TAINT status in the + internal shared string. [ruby-dev:21601] + + * string.c (rb_str_new4): ditto. + + * eval.c: use EXIT_SUCCESS and EXIT_FAILURE for exit values. + + * process.c: ditto. [ruby-list:38521] + +Mon Oct 13 19:51:02 2003 Koji Arai + + * lib/debug.rb (debug_command): should enter emacs mode when + assigned any value to the environment variable "EMACS". + On Meadow, (getenv "EMACS") is "meadow". + +Sun Oct 12 14:45:03 2003 WATANABE Hirofumi + + * ext/win32ole/extconf.rb: check "windows.h", not "windows". + [ruby-talk:84051] + +Sat Oct 11 20:41:03 2003 Corinna Vinschen + + * file.c (eaccess): Use access(2) on Cygwin. + +Sat Oct 11 17:09:21 2003 WATANABE Hirofumi + + * lib/rexml/quickpath.rb (REXML::QuickPath::match): + escape '[' to avoid warning. + +Sat Oct 11 16:08:41 2003 Tanaka Akira + + * lib/pathname.rb (realpath): check existence of the file. + + * lib/pathname.rb (realpath): re-implemented. + (realpath_root?, realpath_rec): removed + +Sat Oct 11 10:19:39 2003 Shugo Maeda + + * lib/monitor.rb: handle exceptions correctly. Thanks, Gennady + Bystritsky. + +Fri Oct 10 07:50:54 2003 Nobuyoshi Nakada + + * eval.c (is_defined): inheritance line adjustment as like as + rb_call_super(). + +Fri Oct 10 01:19:00 2003 GOTOU Yuuzou + + * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): add + optional argument to specify the DirectoryString type + (ASN1::UTF8STRING by default). RFC3280 deprecates PrintableString + for DirectoryString, and strongly requires to use UTF8String for + all certificates issued after December, 31 2003. + + * ext/openssl/lib/openssl/x509.rb (X509::Name::parse): ditto. + +Thu Oct 9 23:50:21 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_start_0): prevent thread from GC. + [ruby-dev:21572] + +Thu Oct 9 19:11:44 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_start_0): non-volatile should be restored from + volatile. + +Thu Oct 9 17:43:36 2003 Nobuyoshi Nakada + + * eval.c (proc_save_safe_level, proc_get_safe_level, + proc_set_safe_level): save/restore safe level 1..4. + +Thu Oct 9 16:33:23 2003 Yukihiro Matsumoto + + * marshal.c (r_object0): remove unnecessary iv restoration for + USRMARSHAL. [ruby-dev:21582] + + * marshal.c (w_object): dump generic instance variables from + a string from '_dump'. + + * variable.c (rb_generic_ivar_table): return 0 if obj's FL_EXIVAR + is not set. + + * time.c (time_dump): copy instance variables to dumped string, to + be included in the marshaled data. + + * bignum.c (rb_big2ulong): add range check to ensure round trip. + +Thu Oct 9 15:45:27 2003 Yukihiro Matsumoto + + * pack.c (uv_to_utf8): change message to "out of range", since + negative values are not "too big". [ruby-dev:21567] + +Thu Oct 9 14:05:38 2003 Nobuyoshi Nakada + + * eval.c (rb_set_end_proc, rb_exec_end_proc): restore safe level. + [ruby-dev:21557] + +Thu Oct 9 10:51:04 2003 Nobuyoshi Nakada + + * eval.c (rb_yield_0): no error if block is empty. + +Thu Oct 9 06:43:33 2003 Nobuyoshi Nakada + + * eval.c (localjump_error): id should be ID. + + * eval.c (rb_eval): nd_rval is set in copy_node_scope(). + + * eval.c (rb_yield_0): unused variable. + + * eval.c (rb_yield_0): nothing to do for empty node. + + * eval.c (call_end_proc, proc_invoke): adjust backtrace in END. + [ruby-dev:21551] + + * eval.c (rb_thread_start_0): set the value by break as the result. + [ruby-dev:21552] + + * eval.c (rb_thread_start_0, rb_thread_raise, rb_callcc): save + variables across THREAD_SAVE_CONTEXT. + +Thu Oct 9 12:05:46 2003 Eric Sunshine + + * configure.in: revived NextStep, OpenStep, and Rhapsody ports which + had become unbuildable; enhanced --enable-fat-binary option so that + it accepts a list of desired architectures (rather than assuming a + fixed list), or defaults to a platform-appropriate list if user does + not provide an explicit list; made the default list of architectures + for MAB (fat binary) more comprehensive; now uses -fno-common even + when building the interpreter (in addition to using it for + extensions), thus allowing the interpreter to be embedded into a + plugin module of an external project (in addition to allowing + embedding directly into an application); added checks for + (needed by `socket' extension) and getcwd(); now + ensures that -I/usr/local/include is employed when extensions' + extconf.rb scripts invoke have_header() since extension checks on + NextStep and OpenStep will fail without it if the desired resource + resides in the /usr/local tree; fixed formatting of --help message. + + * Makefile.in: $(LIBRUBY_A) rule now deletes the archive before + invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives + (see configure's --enable-fat-binary option); added rule for new + missing/getcwd.c. + + * defines.h: fixed endian handling during MAB build (see configure's + --enable-fat-binary option) to ensure that all portions of the + project see the correct WORDS_BIGENDIAN value (some extension modules + were getting the wrong endian setting); added missing constants + GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep + and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H + define in NeXT section. + + * dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on + NextStep since, on some installations, this value always resolves + uselessly to zero. + + * dln.c: added error reporting to NextStep extension loader since the + previous behavior of failing silently was not useful; now ensures + that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined + for OpenStep and Rhapsody; no longer includes twice + on Rhapsody since this header lacks multiple-include protection, + which resulted in "redefinition" compilation errors. + + * main.c: also create hard reference to objc_msgSend() on NeXT + platforms (in addition to Apple platforms). + + * lib/mkmf.rb: now exports XCFLAGS from configure script to extension + makefiles so that extensions can be built MAB (see configure's + --enable-fat-binary option); also utilize XCFLAGS in cc_command() + (but not cpp_command() because MAB flags are incompatible with + direct invocation of `cpp'). + + * ext/curses/extconf.rb: now additionally checks for presence of these + curses functions which are not present on NextStep or Openstep: + bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(), + setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(), + wscrl(), wsetscrreg() + + * ext/curses/curses.c: added appropriate #ifdef's for additional set of + curses functions now checked by extconf.rb; fixed curses_bkgd() and + window_bkgd() to correctly return boolean result rather than numeric + result; fixed window_getbkgd() to correctly signal an error by + returning nil rather than -1. + + * ext/etc/etc.c: setup_passwd() and setup_group() now check for null + pointers before invoking rb_tainted_str_new2() upon fields extracted + from `struct passwd' and `struct group' since null pointers in some + fields are common on NextStep/OpenStep (especially so for the + `pw_comment' field) and rb_tainted_str_new2() throws an exception + when it receives a null pointer. + + * ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for + platforms such as NextStep and OpenStep which lack strdup(). + + * ext/socket/getaddrinfo.c: cast first argument of getservbyname(), + gethostbyaddr(), and gethostbyname() from (const char*) to non-const + (char*) for older platforms such as NextStep and OpenStep. + + * ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for + platforms such as NextStep and OpenStep which lack strdup(); include + if present for NextStep and OpenStep; cast first + argument of gethostbyaddr() and getservbyname() from (const char*) to + non-const (char*) for older platforms. + + * ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for + platforms such as NextStep and OpenStep which lack strdup(). + +Wed Oct 8 22:19:00 2003 Nathaniel Talbott + + * lib/test/unit.rb: removed installation instructions. + + * lib/test/unit/ui/testrunnermediator.rb: moved the run flag to a more + central location. + + * lib/test/unit.rb: ditto. + + * lib/test/unit.rb: extracted the running code in to AutoRunner. + + * lib/test/unit/autorunner.rb: added. + + * lib/test/unit/collector/objectspace.rb: extracted common test + collection functionality in to a module. + + * lib/test/unit/collector.rb: ditto; added. + + * test/testunit/collector/test_objectspace.rb: ditto. + + * lib/test/unit/collector/dir.rb: added. Supports collecting tests out + of a directory structure. + + * test/testunit/collector/test_dir.rb: added. + + * test/runner.rb: simplified to use the new capabilities. + +Tue Oct 7 15:23:09 2003 NAKAMURA, Hiroshi + + * test/ruby/test_beginendblock.rb: add tests for nested BEGIN/END. + + * test/ruby/beginmainend.rb: add tests for nested BEGIN/END. + + * test/ruby/endblockwarn.rb: new file added to test of END-in-method + warning. + +Tue Oct 7 12:23:47 2003 Tanaka Akira + + * ext/fcntl/fcntl.c (Init_fcntl): define Fcntl::O_ACCMODE. + + * ext/socket/extconf.rb: useless assignment removed. + +Tue Oct 7 09:13:24 2003 Nobuyoshi Nakada + + * test/ruby/test_beginendblock.rb (test_endinmethod): END{} is now + allowed in eval. + +Tue Oct 7 04:15:25 2003 Nobuyoshi Nakada + + * parse.y (stmt): should not expand mrhs if lhs is solely starred. + +Tue Oct 7 02:57:53 2003 Yukihiro Matsumoto + + * parse.y (stmt): rhs of multiple assignment should not be + expanded using "to_a". [ruby-dev:21527] + +Tue Oct 7 01:42:34 2003 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): use appropriate + free function for ASN1_OBJECT. + + * ext/openssl/ossl_asn1.c (ossl_asn1obj_get_sn): add new function for + ASN1::ObjectId#sn; it returns short name text representation of OID. + + * ext/openssl/ossl_asn1.c (ossl_asn1obj_get_ln): add new function for + ASN1::ObjectId#ln; it returns long name text representation of OID. + + * ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): add new function for + ASN1::ObjectId#oid; it returns numerical representation of OID. + +Mon Oct 6 22:59:46 2003 NAKAMURA, Hiroshi + + * lib/csv.rb (IOReader, BasicWriter): call binmode when a given IO + respond_to?(:binmode). record separator was wrong when you gave + text mode IO to Reader.parse and Writer.generate. + + * test/csv/test_csv.rb: add tests for above change. + +Sun Oct 5 23:27:09 2003 Tanaka Akira + + * ext/socket/extconf.rb: check recvmsg even if sendmsg is exists. + + * ext/socket/socket.c (thread_read_select): restored. + +Mon Oct 6 16:23:38 2003 Nobuyoshi Nakada + + * marshal.c (w_object): wrong method name in the message. + +Mon Oct 6 16:02:05 2003 Yukihiro Matsumoto + + * parse.y (stmt): END in method should cause warning. + [ruby-dev:21519] + +Mon Oct 6 15:17:23 2003 NAKAMURA, Hiroshi + + * test/ruby/test_iterator.rb (test_block_argument_without_paren): + added. (follows sample/test.rb) + +Mon Oct 6 11:57:06 2003 NAKAMURA, Hiroshi + + * test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: added + test for eval-ed BEGIN END order. + +Mon Oct 6 09:19:54 2003 Yukihiro Matsumoto + + * marshal.c (w_object): should pass "weak" value to next level. + [ruby-dev:21496] + + * eval.c (proc_alloc): should not use cached object if klass is + different. [ruby-talk:83685] + +Sun Oct 5 23:27:09 2003 Tanaka Akira + + * lib/pathname.rb: version information is added in document. + +Sun Oct 5 23:07:03 2003 Nobuyoshi Nakada + + * eval.c (rb_f_END): block should be given. [ruby-dev:21497] + +Sun Oct 5 22:51:23 2003 GOTOU Yuuzou + + * lib/ext/openssl/extconf.rb: add check for some engine functions + unavailable in OpenSSL-0.9.6. + + * lib/ext/openssl/ossl_engine.c: ditto. + +Sun Oct 5 17:56:30 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): fix evaluation order. [ruby-list:38431] + +Sun Oct 5 15:05:06 2003 akira yamada + + * test/uri/*: translated RUNIT to Test::Unit. + +Sun Oct 5 14:37:39 2003 NAKAMURA, Hiroshi + + * lib/xsd/datatypes.rb: Rational -> Decimal string bug fix. + + * test/soap/marshal/test_marshal.rb: ditto. + + * test/soap/calc/test_calc_cgi.rb: add Config::CONFIG["EXEEXT"] to + RUBYBIN. + +Sun Oct 5 13:47:22 2003 NAKAMURA, Hiroshi + + * test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: add tests + about scope, order and allowed syntax. + +Sun Oct 5 11:54:29 2003 NAKAMURA, Hiroshi + + * test/ruby/envutil.rb: added. split "rubybin" from test_system.rb. + + * test/ruby/test_system.rb: use envutil.rb + + * test/ruby/test_beginendblock.rb: added. + + * test/ruby/beginmainend.rb: added. used in test_beginendblock.rb. + +Sun Oct 5 11:23:00 2003 Nathaniel Talbott + + * test/testunit/runit/test_testresult.rb: removed some unnecessary + cruft. + +Sun Oct 5 11:14:00 2003 Nathaniel Talbott + + * lib/rubyunit.rb: aliasing TestCase into the top level is + problematic. + + * lib/runit/assert.rb: fixed a couple of bugs caused by recent + refactoring in Test::Unit. + + * test/testunit/runit/*: added. + +Sun Oct 5 10:55:29 2003 NAKAMURA, Hiroshi + + * lib/open-uri.rb (URI::Generic#find_proxy): no_proxy support did not + work. [ruby-dev:21484] + +Sun Oct 5 09:52:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: will use pp for output if available. + Can be disabled by setting Assertions.use_pp = false. + + * test/testunit/test_assertions.rb: made a small change to exception + formatting. + +Sun Oct 5 07:42:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: made small improvements to assertion + messages. Deprecated Assertions#assert_not_nil; use #assert instead. + + * test/testunit/test_assertions.rb: ditto. + + * test/testunit/util/test_procwrapper.rb: use #assert instead of + #assert_not_nil. + +Sun Oct 5 04:10:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: refactored message building. + +Sun Oct 5 03:40:22 2003 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.h: global symbols should be declared + as external. + +Sun Oct 5 03:03:20 2003 akira yamada + + * test/ruby/test_exception.rb (test_else): added. + +Sun Oct 5 02:12:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: changed assertion messages to rely more + heavily on #inspect. Added backtrace filtering for exceptions in + assertion messages. + + * test/testunit/test_assertions.rb: ditto. + +Sun Oct 5 02:12:00 2003 Masatoshi SEKI + + * lib/drb/acl.rb, lib/drb/ssl.rb: added. + + * lib/drb/drb.rb: exit from a thread using 'break'. + +Sat Oct 4 21:49:14 2003 WATANABE Hirofumi + + * gc.c (Init_stack): the type of space is changed to unsigned int + from double. [ruby-dev:21483] + +Sat Oct 4 17:52:59 2003 NAKAMURA, Hiroshi + + * lib/soap/netHttpClient.rb: follow http-access2. hosts which matches + ENV['no_proxy'] or ENV['NO_PROXY'] are not proxyed. + - [,:] separated. ("ruby-lang.org:rubyist.net") + - no regexp. (give "ruby-lang.org", not "*.ruby-lang.org") + - if you want specify host by IP address, give full address. + ("192.168.1.1, 192.168.1.2") + + * lib/soap/rpc/cgistub.rb: return "Status: XXX MMM" line. + + * test/runner.rb: give testsuite name. + +Sat Oct 4 15:16:02 2003 Yukihiro Matsumoto + + * marshal.c (w_object): instance variable dump do not cause error + for objects that cannot be dumped, if they traversed from + marshal_dump. they are just ignored. + + * gc.c (Init_stack): cast "space" (doble value) into unsigned + int. should run on PowerPC. + + * eval.c (rb_eval): should not execute else part if any exception + is caught. [ruby-dev:21482] + + * parse.y (f_args): should allow unparenthesized block argument. + + * parse.y (f_rest_arg): should allow unparenthesized rest + argument. + +Sat Oct 4 14:59:51 2003 Tanaka Akira + + * lib/pathname.rb (initialize): raise ArgumentError if argument has + '\0' character. + (relative_path_from): new method. + (each_entry): new method for replacement of dir_foreach. + (foreach, foreachline, dir_foreach, chdir): obsoleted. + +Sat Oct 4 12:58:48 2003 akira yamada + + * test/uri/* (6 files): added. + +Sat Oct 4 12:44:45 2003 akira yamada + + * lib/uri/ftp.rb, lib/uri/mailto.rb: renamed to #to_s from #to_str. + +Sat Oct 4 07:33:00 2003 Nathaniel Talbott + + * lib/test/unit/testsuite.rb: changed #<< to return self, and added + #delete. + + * test/testunit/test_testsuite.rb: ditto. Also slightly refactored + #test_size. + + * lib/test/unit/collector/objectspace.rb: collector now preserves the + hierarchy of suites. + + * test/testunit/collector/test_objectspace.rb: ditto. + +Sat Oct 4 04:48:49 2003 why the lucky stiff + + * ext/syck/rubyext.c: default keys handled. + + * ext/syck/syck.h: lowered default buffer size to 16k for increased + performance. + + * test/yaml: checkin of basic unit tests. + +Sat Oct 4 04:24:19 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for X509V3_set_nconf. + + * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config): + cannot implement if X509V3_set_nconf doesn't exist. + +Sat Oct 4 02:12:44 2003 NAKAMURA, Hiroshi + + * lib/xsd/datatypes.rb: dump sign by itself. under the problematic + platform, sprintf("%+.10g", -0.0) => +0. sigh. + + * sample/wsdl/amazon/*: update schema ver2 to ver3. + +Sat Oct 4 01:33:46 2003 Tanaka Akira + + * lib/pathname.rb (initialize): duplicate and freeze argument. + (to_s): return duplicated string. + (children): new method. + (each_line): new alias to foreachline. + +Fri Oct 3 16:13:19 2003 GOTOU Yuuzou + + * ext/openssl/ossl_asn1.c: add DER encoder and decoder. + + * ext/openssl/ossl_asn1.h: add OpenSSL::ASN1 module. + + * ext/openssl/ossl.c (Init_openssl): call Init_ossl_asn1. + + * ext/openssl/extconf.rb: check if X509_ATTRIBUTE has field "single". + + * ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): accept + DER encoded data argument. + + * ext/openssl/ossl_x509attr.c (ossl_x509attr_get_value): return + DER encoded data in OpenSSL::ASN1 types. + +Fri Oct 3 13:02:00 2003 Nathaniel Talbott + + * lib/test/unit.rb: refactored to use optparse. + + * lib/test/unit.rb: added support for selecting the output + level from the command-line. + + * lib/test/unit.rb: added a command-line switch to stop processing + the command-line, allowing arguments to be passed to tests. + + * lib/test/unit.rb: changed the method for specifying a runner or a + filter from the command-line. + + * lib/test/unit/collector/objectspace.rb: fixed a bug causing all + tests to be excluded when the filter was set to an empty array. + + * test/testunit/collector/test_objectspace.rb: ditto. + +Fri Oct 3 08:14:32 2003 Yukihiro Matsumoto + + * lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support + 'class ::Foo' syntax. [ruby-talk:83514] + +Fri Oct 3 08:01:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: added a default message for #assert, + #assert_block, and #flunk. + + * test/testunit/test_assertions.rb: ditto. + + * lib/test/unit/failure.rb: failures now show a better trace of where + they occurred. + + * test/testunit/test_failure.rb: ditto (added). + + * lib/test/unit/testcase.rb: ditto. + + * test/testunit/test_testcase.rb: ditto. + + * lib/test/unit/util/backtracefilter.rb: added. + + * test/testunit/util/test_backtracefilter.rb: added. + + * lib/test/unit/error.rb: changed to use BacktraceFilter and improved + output. + + * test/testunit/test_error.rb: ditto. + +Thu Oct 2 20:33:49 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_failure_initialize): conform with + orthodox initialization method. + + * ext/iconv/iconv.c (iconv_fail): initialize exception instance + from the class, and do not share instance variables with the + others. [ruby-dev:21470] + +Thu Oct 2 18:20:27 2003 Nobuyoshi Nakada + + * time.c (Init_Time): define initialize. [ruby-dev:21469] + +Thu Oct 2 17:39:38 2003 GOTOU Yuuzou + + * ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine. + it supports OpenSSL hardware cryptographic engine interface. + + * ext/openssl/ossl_engine.h: ditto. + + * ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h. + + * ext/openssl/extconf.rb: add check for openssl/engine.h. + + * ext/openssl/ossl.c: call Init_ossl_engine(). + + * ext/openssl/ossl.h: include openssl/engine.h. + + * ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying + EVP_PKEY referes engine. + +Thu Oct 2 17:22:37 2003 Yukihiro Matsumoto + + * time.c (time_load): restore instance variables (if any) before + loading from marshaled data. + +Thu Oct 2 14:19:15 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_fail): now yield erred substring, and + set error object to $!. + + * ext/iconv/iconv.c (iconv_convert): error handler block should + return appended part and the rest. if rest is nil, the + conversion stops. + +Thu Oct 2 12:00:18 2003 Nobuyoshi Nakada + + * variable.c (rb_const_defined_0): look up constants in Object as + well. [ruby-dev:21458] + + * test/ruby/test_defined.rb (TestDefined::test_defined): test for + constants. + +Thu Oct 2 11:17:00 2003 Nathaniel Talbott + + * lib/test/unit/assertions.rb: should not capture an + AssertionFailedError unless explicitly requested. + + * test/testunit/test_assertions.rb: ditto. + + * test/testunit/collector/test_objectspace.rb: fixed a test failure + caused by methods being returned in different orders on different + platforms by moving test sorting from TestSuite into the locations + where suites are constructed. [ruby-talk:83156] + + * lib/test/unit/testcase.rb: ditto. + + * lib/test/unit/testsuite.rb: ditto. + + * lib/test/unit/collector/objectspace.rb: ditto. + +Thu Oct 2 03:25:01 2003 NAKAMURA Usaku + + * eval.c (rb_thread_raise): prototype; avoid VC++ warning. + +Thu Oct 2 01:37:34 2003 Yukihiro Matsumoto + + * time.c (time_mdump): new marshal dumper. _dump is still + available for compatibility. + + * time.c (time_mload): new marshal loader. + + * marshal.c (w_object): preserve instance variables for objects + with marshal_dump. + + * marshal.c (r_object0): restore instance variables before calling + marshal_load. + + * error.c (rb_warn_m): always return nil. + +Thu Oct 2 01:32:46 2003 Yukihiro Matsumoto + + * eval.c (rb_f_block_given_p): real required condition is + ruby_frame->prev->iter == ITER_CUR. + + * eval.c (rb_block_given_p): ditto. + + * eval.c (block_pass): update ruby_frame->iter only when previous + value is ITER_NOT. + +Thu Oct 2 01:02:35 2003 Yukihiro Matsumoto + + * variable.c (rb_const_defined_at): should exclude constants from + Object when TYPE(klass) == T_MODULE *and* exclude is on. + [ruby-dev:21458] + + * variable.c (rb_const_get_0): do not lookup constants from Object + when TYPE(klass) == T_MODULE *and* exclude is on. + +Thu Oct 2 00:21:11 2003 NAKAMURA, Hiroshi + + * test/logger/test_logger.rb: unlinking file before close causes + problem under win32 box. + + * lib/xsd/datatypes.rb(XSDFloat, XSDDouble): add +/- sign explicitly + when stringified and embedded into XML instance. Ruby's sprintf may + format -0.0 as "0.0" (no minus sign) depending on underlying C + sprintf implementation. + + * test/xsd/test_xsd.rb, test/soap/test_basetype.rb: follow above change. + + * test/soap/calc/*: give httpd config param "CGIInterpreter". + "/usr/bin/env ruby" thing does not work under non-Unix boxes. + +Thu Oct 2 00:25:21 2003 Nobuyoshi Nakada + + * signal.c (ruby_signal_name): adjust to the prototype. + + * process.c (pst_inspect): ditto. + + * ext/etc/etc.c (etc_getgrent, Init_etc): typo. + +Wed Oct 1 20:49:41 2003 Nobuyoshi Nakada + + * gc.c (heaps): manage slots and limits together. [ruby-dev:21453] + + * gc.c (add_heap): should not clear heaps slot even if realloc() + failed. + +Wed Oct 1 20:36:49 2003 WATANABE Hirofumi + + * MANIFEST: add wince/mkconfig_wce.rb. + +Wed Oct 1 17:22:33 2003 Yukihiro Matsumoto + + * ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent, + setgrent, getgrent, endgrent. + + * ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup. + +Wed Oct 1 17:01:30 2003 Nobuyoshi Nakada + + * eval.c (rb_load): Object scope had priority over required file + scope. [ruby-dev:21415] + +Wed Oct 1 14:09:53 2003 Takaaki Uematsu + + * wince/mkconfig_wce.rb: sorry, forget to commit. + +Wed Oct 1 10:08:42 2003 Takaaki Uematsu + + * wince/setup.mak: add sigmarionIII SDK support. + + * wince/Makefile.sub: ditto. + + * wince/mkexports.rb: fix linker error in SH4. + + * wince/mkconfig_wce.rb: camouflage RUBY_PLATFORM for compiling ext. + +Wed Oct 1 08:02:52 2003 Takaaki Uematsu + + * wince/time_wce.c (time): add zero check. + +Tue Sep 30 16:11:05 2003 Yukihiro Matsumoto + + * Makefile.in: copy lex.c from $(srcdir) if it's not the current + directory. [ruby-dev:21437] + +Tue Sep 30 11:29:23 2003 Tanaka Akira + + * process.c (pst_inspect): describe stopped process "stopped". + +Tue Sep 30 09:31:56 2003 Nobuyoshi Nakada + + * test/runner.rb: glob for directories. + +Tue Sep 30 09:11:43 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): while/until should not capture break unless + they are destination of the break. + +Tue Sep 30 03:12:02 2003 Minero Aoki + + * lib/net/http.rb (finish): revert to 1.93. + + * lib/net/pop.rb (finish): revert to 1.60. + + * lib/net/smtp.rb (finish): revert to 1.67. + + * lib/net/http.rb (do_start): ensure to close socket if failed to + start session. + + * lib/net/pop.rb (do_start): ditto. + + * lib/net/smtp.rb (do_start): ditto. + + * lib/net/smtp.rb: SMTP#started? wrongly returned false always. + +Tue Sep 30 02:54:49 2003 Minero Aoki + + * test/ruby/test_iterator.rb: new test + test_break__nested_loop[123]. + +Mon Sep 29 23:39:13 2003 Minero Aoki + + * lib/net/http.rb (finish): does not raise IOError even if + !started?, to allow closing socket which was opened before + session started. + + * lib/net/pop.rb (finish): ditto. + + * lib/net/smtp.rb (finish): ditto. + +Mon Sep 29 19:06:51 2003 WATANABE Hirofumi + + * ext/win32ole/extconf.rb: add windows.h checking. + (ruby-bugs:PR#1185) + +Mon Sep 29 16:18:30 2003 NAKAMURA, Hiroshi + + * lib/logger.rb: check if the given logdevice object respond_to :write + and :close, not is_a? IO. duck duck. + + * test/logger/test_logger.rb: self IO.pipe reading/writing may be + locked by the flood. use tempfile. + + * lib/wsdl/xmlSchema/data.rb: wrong constant reference. + +Mon Sep 29 16:11:23 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb: clean up temporary symlink. + Patched by NaHi. [ruby-dev:21420] + +Mon Sep 29 11:16:55 2003 Yukihiro Matsumoto + + * eval.c (rb_thread_atfork): wrong format specifier. + [ruby-dev:21428] + + * process.c (pst_inspect): better description. + +Mon Sep 29 02:31:44 2003 GOTOU Yuuzou + + * lib/webrick/utils.rb (Utils::su): use setgid and setuid to + set real and effective IDs. and setup group access list by + initgroups. + +Sun Sep 28 11:14:19 2003 Koji Arai + + * ext/digest/digest.c (Init_digest): `copy_object' was deprecated. + `initialize_copy' should be defined. + + * ext/stringio/stringio.c (Init_stringio): ditto. + +Sat Sep 27 18:25:13 2003 NAKAMURA, Hiroshi + + * lib/xsd/charset.rb: XSD::Charset.is_ces did return always true under + $KCODE = "NONE" environment. check added. + + * test/xsd/test_xsd.rb: add tests for above fix. + +Sat Sep 27 15:58:50 2003 NAKAMURA, Hiroshi + + * lib/soap/rpc/cgistub.rb: make logging severity threshold higher. + + * lib/soap/rpc/standaloneServer.rb: defer WEBrick server start to give + a chance to reset logging severity threshold. + + * test/soap/calc/test_*, test/soap/helloworld/test_helloworld.rb: run + silent. + +Sat Sep 27 09:44:18 2003 Minero Aoki + + * test/fileutils/test_fileutils.rb: clear all errors on Windows. + [ruby-dev:21417] + + * test/fileutils/test_nowrite.rb: ditto. + +Sat Sep 27 04:57:07 2003 NAKAMURA, Hiroshi + + * test/ruby/test_file.rb: new file. only asserts unlink-before-close + behaviour now. + + * test/soap/marshal/test_digraph.rb: should close before unlink. + unlink-before-close pattern is not needed here. + +Sat Sep 27 03:32:37 2003 NAKAMURA, Hiroshi + + * test/soap/*, test/wsdl/*, test/xsd/*: move TestCase classes into + each module namespace. TestMarshal in + test/soap/marshal/test_marshal.rb crashed with + test/ruby/test_marshal.rb. + +Sat Sep 27 01:30:59 2003 NAKAMURA Usaku + + * ext/socket/socket.c (ruby_connect): on win32, type of the 4th + argument of getsockopt is char *. + +Fri Sep 26 18:35:40 2003 Nobuyoshi Nakada + + * lib/resolv-replace.rb: 1.8 compliance. [ruby-talk:82946] + +Fri Sep 26 17:39:27 2003 NAKAMURA, Hiroshi + + * test/ruby/test_marshal.rb: add test for ruby's objects. + +Fri Sep 26 09:52:44 2003 Nobuyoshi Nakada + + * defines.h (flush_register_windows): use volatile only for gcc on + Solaris. [ruby-dev:21403] + + * lib/mkmf.rb (xsystem): use system directly to honor shell meta + charaters. + +Fri Sep 26 00:10:13 2003 NAKAMURA, Hiroshi + + * lib/README: updated. + +Thu Sep 25 17:48:10 2003 NAKAMURA Usaku + + * ext/openssl/ossl.c (ossl_buf2str): fix type of 1st argument for + rb_protect. + + * ext/openssl/ossl_hmac.c (ossl_hmac_digest): should return meaningful + value. + +Thu Sep 25 09:00:00 2003 Nathaniel Talbott + + * lib/ostruct.rb: Added OpenStruct#==. + + * test/ostruct/test_ostruct.rb: Added. + +Thu Sep 25 07:55:26 2003 Nobuyoshi Nakada + + * ext/win32ole/win32ole.c, ext/openssl/ossl_pkey_dsa.c, + ext/openssl/ossl_pkey_rsa.c, ext/bigdecimal/bigdecimal.h: must + not use C++ or C99 style comment yet. (ruby-bugs:PR#1184) + +Thu Sep 25 00:23:22 2003 WATANABE Hirofumi + + * MANIFEST: add SOAP4R. + +Thu Sep 25 00:13:15 2003 NAKAMURA, Hiroshi + + * lib/soap/* (29 files): SOAP4R added. + + * lib/wsdl/* (42 files): WSDL4R added. + + * lib/xsd/* (12 files): XSD4R added. + + * test/soap/* (16 files): added. + + * test/wsdl/* (2 files): added. + + * test/xsd/* (3 files): added. + + * sample/soap/* (27 files): added. + + * sample/wsdl/* (13 files): added. + +Wed Sep 24 02:08:11 2003 GOTOU Yuuzou + + * lib/webrick/httpservlet/cgihandler.rb: conform to mswin32. + [ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818] + +Tue Sep 23 23:10:16 2003 NAKAMURA, Hiroshi + + * lib/logger.rb: add Logger#<<(msg) for writing msg without any + formatting. + + * test/logger/test_logger.rb: ditto. + +Tue Sep 23 20:47:51 2003 Yukihiro Matsumoto + + * error.c (rb_warn_m): should not warn if -W0 is specified. + [ruby-talk:82675] + +Mon Sep 22 21:28:57 2003 WATANABE Hirofumi + + * MANIFEST: updated. + +Mon Sep 22 19:22:26 2003 GOTOU Yuuzou + + * configure.in (AC_CHECK_FUNCS): add setuid and setgid. + +Mon Sep 22 12:34:55 2003 Yukihiro Matsumoto + + * util.c (ruby_strtod): skip preceding zeros before counting + digits in the mantissa. (ruby-bugs:PR#1181) + +Sun Sep 21 04:12:36 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): the argument + should be a String. + + * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): ditt. + + * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): ditto. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. + +Sat Sep 20 11:49:05 2003 NAKAMURA, Hiroshi + + * lib/logger.rb: typo fixed. + + * test/logger/test_logger.rb: new file. + +Fri Sep 19 11:39:00 2003 Nathaniel Talbott + + * test/testunit/*: Added. + + * lib/test/unit.rb: Documentation update. + + * lib/test/unit/ui/console/testrunner.rb (TestRunner#initialize): + Ditto. + + * lib/test/unit.rb: Factored out an ObjectSpace collector. + + * lib/test/unit/collector/objectspace.rb: Ditto. + + * sample/testunit/*: Added. + +Fri Sep 19 01:00:48 2003 GOTOU Yuuzou + + * lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual + condition. + + * lib/webrick/log.rb (BasicLog#format): add "\n" to message. + +Thu Sep 18 22:43:20 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): should push PROT_PCALL tag for orphans. + + * eval.c (proc_invoke): should update "result" for orphans. + +Thu Sep 18 20:33:03 2003 Tietew + + * parse.y (str_xquote): do not prepend escapes in + backqoute literals. [ruby-list:38409] + +Thu Sep 18 20:30:17 2003 Tanaka Akira + + * lib/pathname.rb: update document. + +Thu Sep 18 15:27:05 2003 NAKAMURA, Hiroshi + + * lib/logger.rb: new file. Logger, formerly called devel-logger or + Devel::Logger. + + * sample/logger/*: new file. samples of logger.rb. + +Wed Sep 17 23:41:45 2003 Yukihiro Matsumoto + + * eval.c (localjump_destination): should not raise ThreadError + exception for "break". [ruby-dev:21348] + + * eval.c (proc_invoke): use result instead of prot_tag->retval. + retval is no longer propagated to the ancestors. + +Wed Sep 17 20:34:00 2003 Nobuyoshi Nakada + + * parse.y (tokadd_string, parse_string, yylex): escaped terminator + is now interpreted as is. [ruby-talk:82206] + +Wed Sep 17 18:52:36 2003 Minero Aoki + + * test/fileutils/fileassertions.rb: new file. + + * test/fileutils/test_fileutils.rb: new file. + + * test/fileutils/test_nowrite.rb: new file. + +Wed Sep 17 18:51:02 2003 Minero Aoki + + * test/strscan/test_stringscanner.rb: require test/unit. + +Wed Sep 17 18:35:34 2003 Minero Aoki + + * test/strscan/test_stringscanner.rb: new file. + +Wed Sep 17 18:03:30 2003 GOTOU Yuuzou + + * ext/openssl: all files are reviewed to simplify and avoid memory leak. + + * ext/openssl/extconf.rb: add check for assert.h. + + * ext/openssl/ossl.c (ossl_buf2str): new function to convert + C buffer to String and free buffer. + + * ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert + Array of OpenSSL::X509 to STACK_OF(X509) with exception safe. + + * ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new + functions to convert object to DER string. + + * ext/openssl/ossl.h: ditto. + + * ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert + BIO to String object and free BIO. + + * ext/openssl/ossl_bio.h: ditto. + + * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der". + + * ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto. + + * ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto. + + * ext/openssl/ossl_x509ext.c (create_ext_from_array): removed + and reimplement in openssl/x509.rb. + + * ext/openssl/ossl_x509attr.c: reimplemented and disable some + method temporarily. this class doesn't work fine without ASN.1 + data support;-) I'll rewrite in near future. + + * ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off + unused code. + + * ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all. + +Tue Sep 16 22:25:06 2003 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: add negative tests of row_sep. + +Tue Sep 16 18:02:36 2003 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should not translate character + class range edge. [ruby-list:38393] + +Tue Sep 16 16:47:56 2003 WATANABE Hirofumi + + * MANIFEST: add test/csv/mac.csv. + + * win32/Makefile.sub, bcc32/Makefile.sub (test): add phony NUL target. + +Mon Sep 15 19:02:52 2003 NAKAMURA, Hiroshi + + * lib/csv.rb: add extra pamameter to specify row(record) separater + character. To parse Mac's CR separated CSV, do like this. + CSV.open("mac.csv", "r", ?,, ?\r) { |row| p row.to_a } + The 3rd parameter in this example ?, is for column separater and the + 4th ?\r is for row separater. Row separater is nil by default. Nil + separater means "\r\n" or "\n". + + * test/csv/test_csv.rb: add tests for above feature. + + * test/csv/mac.csv: added. Sample CR separated CSV file. + +Fri Sep 12 22:41:48 2003 Michal Rokos + + * ext/openssl/ossl.c: move ASN.1 stuff to ossl_asn1.[ch] + + * ext/openssl/ossl.c: move BIO stuff to ossl_bio.[ch] + + * ext/openssl/ossl_asn1.[ch]: new files + + * ext/openssl/ossl_bio.[ch]: new files + +Fri Sep 12 12:30:41 2003 Nobuyoshi Nakada + + * intern.h (rb_disable_super, rb_enable_super): replace with dummy + expressions instead of prototypes. the functions remain yet for + binary compatibility. [ruby-talk:81758] + +Fri Sep 12 12:09:54 2003 Yukihiro Matsumoto + + * bignum.c (rb_big_and): convert argument using 'to_int'. + + * bignum.c (rb_big_or): ditto. + + * bignum.c (rb_big_xor): ditto. + +Fri Sep 12 07:06:14 2003 David Black + + * lib/scanf.rb: Took out useless @matched_item variable; some small + refactoring. + +Thu Sep 11 08:43:44 2003 Yukihiro Matsumoto + + * eval.c (rb_f_require): allow "require" on $SAFE>0, if feature + name is not tainted. + + * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream): + Supports StringIO. + +Wed Sep 10 22:47:30 2003 GOTOU Yuuzou + + * ext/openssl/ossl.h: add a workaround for win32 platform. + libeay32.dll doesn't export functions defined in conf_api.h. + + * ext/openssl/ossl_config.c (ossl_config_initialize): ditto. + + * ext/openssl/ossl_config.c (ossl_config_add_value): ditto. + + * ext/openssl/ossl_config.c (set_conf_section_i): should check + if the argument is Array. + +Wed Sep 10 22:41:54 2003 Tietew + + * eval.c (win32_get_exception_list): avoid VC7 warning. + [ruby-win32:577] + +Tue Sep 9 10:39:51 2003 Nobuyoshi Nakada + + * eval.c (struct tag): dst should be VALUE. + +Tue Sep 9 10:39:51 2003 Nobuyoshi Nakada + + * eval.c (localjump_destination): stop at the scope where the current + block was created. [ruby-dev:21353] + +Tue Sep 9 05:17:04 2003 GOTOU Yuuzou + + * ext/openssl/ossl_config.rb: avoid compile error in OpenSSL-0.9.6. + +Tue Sep 9 02:41:35 2003 Michal Rokos + + * ext/openssl/ossl_config.c: Refine compatibility. + +Tue Sep 9 01:50:45 2003 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to + the message. + + * lib/webrick/log.rb (BasicLog#log): add "\n" only if needed. + +Mon Sep 8 22:15:33 2003 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: modify security check at creating + a new interpreter + +Mon Sep 8 20:00:12 2003 Nobuyoshi Nakada + + * lib/optparse.rb, lib/optparse/version.rb: search also all + capital versions. + +Mon Sep 8 19:26:33 2003 GOTOU Yuuzou + + * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h. + + * ext/openssl/ossl_config.c: refine all with backward compatibility. + + * ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr(). + + * ext/openssl/ossl_x509.c: added new constants under X509 module. + DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE, + DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR. + + * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free + the members of the struct. it's left to GC. + + * ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=. + + * ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize): + add attr readers: issuer_certificate, subject_certificate, + subject_request, crl and config. + +Mon Sep 8 18:26:41 2003 GOTOU Yuuzou + + * lib/webrick/accesslog.rb (AccessLog::setup_params): use req.port + instead of config[:Port] or req.request_uri.port. + + * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto. + + * lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto. + + * lib/webrick/config.rb: :Listen option never be used. + + * lib/webrick/server.rb (GenericServer#initialize): don't use :Listen + option and add warning message. + + * lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...). + + * lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging. + +Sun Sep 7 16:08:28 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (lib_mainloop_core): fixed signal-trap bug + + * ext/tk/lib/*.rb: Ruby/Tk works at $SAFE == 4 + +Sat Sep 6 02:26:34 2003 NAKAMURA, Hiroshi + + * test/ruby/test_*.rb: assert_same, assert_match, and so on. + +Sat Sep 6 18:45:46 2003 Mauricio Fernandez + + * parse.y (assignable): call rb_compile_error(), not rb_bug(). + [ruby-core:01523] + +Sat Sep 6 17:40:41 2003 GOTOU Yuuzou + + * ext/openssl/ruby_missing.c: rid of unnecessary backward + compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from + all sources. + + * ext/openssl/ossl_x509ext.c (X509::Extension.new): new method. + + * ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method. + + * ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method. + + * ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method. + +Sat Sep 6 01:23:22 2003 NAKAMURA Usaku + + * win32/win32.c (CreateChild): need to quote cmd if RUBYSHELL is set. + + * win32/win32.c (CreateChild): fix condition about whether to call + shell or not. + +Sat Sep 6 00:36:20 2003 Nobuyoshi Nakada + + * Makefile.in (test): phony target. + + * lib/mkmf.rb (have_library, find_library): configure by library + name. + + * lib/optparse.rb (OptionParser#order, #permute, #parse): allow an + array as argument. + + * test/ruby/test_*.rb: moved invariants to left side in + assert_equal, and use assert_nil, assert_raises and so on. + + * win32/win32.c (isInternalCmd): distinguish command.com and + cmd.exe. + + * win32/win32.c (make_cmdvector): a character just after wildcard + was ignored. [ruby-core:01518] + +Fri Sep 5 20:27:08 2003 NAKAMURA, Hiroshi + + * test/ruby/test_*.rb: replace 'assert(a == b)' with assert_equal(a, b)' + +Fri Sep 5 18:00:51 2003 GOTOU Yuuzou + + * ext/openssl/lib/openssl/x509.rb: new method X509::Name::parse. + + * ext/openssl/ossl_digest.c: add ossl_digest_new(). + + * ext/openssl/ossl_digest.h: ditto. + + * ext/openssl/ossl_cipher.c: add ossl_cipher_new(). + + * ext/openssl/ossl_cipher.h: ditto. + +Fri Sep 5 15:32:04 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-maybe-here-docs): should not + search delimiter forward if found in backward. + +Fri Sep 5 13:32:48 2003 Nobuyoshi Nakada + + * test/runner.rb: arguments should be keys. + +Fri Sep 5 12:09:55 2003 WATANABE Hirofumi + + * test/ruby/test_system.rb (test_system): check existence of ruby + interpreter. + +Fri Sep 5 11:32:17 2003 Nobuyoshi Nakada + + * lib/optparse.rb (--version): fix assignment/reference order. + + * lib/optparse.rb (OptionParser#help): new; OptionParser#to_s may + be deprecated in future. + + * lib/optparse/version.rb (OptionParser#show_version): hide Object. + + * test/runner.rb: fix optparse usage. + + * test/runner.rb: glob all testsuits if no tests given. + +Fri Sep 5 10:42:58 2003 NAKAMURA, Hiroshi + + * test/runner.rb: added. gets testcases from command line and runs it. + + * test/ruby/test_gc.rb: remove useless part which was for dumping test + result. + +Fri Sep 5 09:28:59 2003 NAKAMURA, Hiroshi + + * test/ruby/test_gc.rb: added. splitter.rb which I made to split + sample/test.rb into test/ruby/test_* kindly removed GC test (the + last section in the original test) to reduce things to be worried. + +Fri Sep 5 03:00:04 2003 Nobuyoshi Nakada + + * test/ruby/test_iterator.rb (test_block_in_arg): add no block + given tests. + + * test/ruby/test_iterator.rb (test_ljump): uncomment LocalJumpError + test. + +Fri Sep 5 01:10:11 2003 NAKAMURA, Hiroshi + + * test/ruby: tests for ruby itself. + + * test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases. + some tests could not be translates... search '!!' mark to see it. + + * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test + runner should set load path correctly. + +Fri Sep 5 01:03:59 2003 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: close opened files for CSV::IOBuf explicitly. + opened file cannot be removed under win32 box. + +Thu Sep 4 23:59:40 2003 Nobuyoshi Nakada + + * parse.y (tokadd_string): newlines have no special meanings in + %w/%W, otherwise they are ignored only when interpolation is + enabled. [ruby-dev:21325] + +Thu Sep 4 19:38:25 2003 NAKAMURA, Hiroshi + + * ext/io/wait/.cvsignore: added. + + * ext/openssl/.cvsignore: added. + +Thu Sep 4 19:28:24 2003 NAKAMURA, Hiroshi + + * sample/openssl: added. Sample of standard distribution library + should be locate in sample/{module_name}/*. + + * ext/openssl/sample/*: removed. move to sample/openssl/*. + +Thu Sep 4 18:02:15 2003 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: use remove_const to reduce warnings. use + Dir.tmpdir to locate working files. + +Thu Sep 4 17:41:31 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-here-doc-beg-re): underscore also is + valid delimiter. + + * misc/ruby-mode.el (ruby-here-doc-end-match): must quote + arbitrary string to use as regexp. + + * misc/ruby-mode.el (ruby-font-lock-maybe-here-docs): must not + call `ruby-here-doc-end-match' unless `ruby-here-doc-beg-re' + matched. + +Thu Sep 4 15:40:07 2003 NAKAMURA, Hiroshi + + * test/csv/test_csv.rb: run on test/unit original layer. + +Thu Sep 4 12:54:50 2003 why the lucky stiff + + * ext/syck/token.c: headerless documents with root-level spacing now + honored. + +Thu Sep 4 00:06:14 2003 Yukihiro Matsumoto + + * eval.c (mark_frame_adj): need to adjust argv pointer if using + system's alloca. [ruby-core:01503] + +Wed Sep 3 21:33:20 2003 NAKAMURA, Hiroshi + + * test: add test directory. Test::Unit aware testcases and needed + files should be located in this directory. dir/file name convention; + test/{module_name}/test_{testcase_name}.rb + test/{module_name}/{needed_files} + someday, someone will write testrunner which searches test_*.rb and + run testcases automatically. + + * test/csv/*: add testcase for lib/csv.rb. + +Wed Sep 3 01:37:09 2003 Yukihiro Matsumoto + + * io.c (rb_f_gets): should call next_argv() before type check + current_file. [ruby-list:38336] + +Tue Sep 2 20:37:15 2003 GOTOU Yuuzou + + * ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): warning + for skipping server verification. + +Tue Sep 2 23:36:57 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): should retrieve retval when pcall is true. + +Tue Sep 2 14:09:20 2003 Yukihiro Matsumoto + + * ext/socket/extconf.rb: check s6_addr8 in in6_addr (Tru64 UNIX). + the patch is submitted by nmu . + + * ext/socket/getaddrinfo.c (getaddrinfo): should use in6_addr8 on + some platforms. + + * ext/socket/getnameinfo.c (getnameinfo): ditto. + +Tue Sep 2 14:02:19 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (ip_invoke): fixed bug on passing a exception + + * ext/tk/lib/{tk.rb, tkcanvas.rb, tkfont.rb, tktext.rb}: + bug fix and improvement of font control + +Tue Sep 2 09:51:36 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): should not handle exceptions within rescue + argument. [ruby-talk:80804] + +Tue Sep 2 00:44:37 2003 Nobuyoshi Nakada + + * re.c (rb_memsearch): fix overrun. [ruby-talk:80759] + +Tue Sep 2 00:41:27 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (map_charset): use lower case keys. + + * ext/iconv/iconv.c (iconv_fail): just yield error and return the + result if a block is given. + + * ext/iconv/iconv.c (iconv_convert): yield error and append the + result if a block is given. + + * ext/iconv/charset_alias.rb (charset_alias): optional third + argument. + + * ext/iconv/charset_alias.rb (charset_alias): use CP932 instead of + SHIFT_JIS on cygwin. + +Mon Sep 1 18:34:25 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): make tail recursion in ELSE clause of + RESCUE a jump. + +Mon Sep 1 18:00:02 2003 Yukihiro Matsumoto + + * parse.y (aref_args): forgot to call NEW_SPLAT(). reported by + Dave Butcher. + + * eval.c (Init_Thread): protect thgroup_default. suggested by Guy + Decoux in [ruby-talk:80623] + +Mon Sep 1 16:59:10 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_switch): add RESTORE_EXIT; exit by another + thread termination. + + * eval.c (rb_thread_start_0): should not error_print() within + terminated thread, because $stderr used by it might be + overriden now. [ruby-dev:21280] + +Sun Aug 31 22:46:55 2003 WATANABE Hirofumi + + * eval.c (TAG_DST()): take no argument. + + * process.c (p_gid_sw_ensure): return VALUE. + +Sun Aug 31 22:27:10 2003 Hidetoshi NAGAI + + * process.c (p_gid_sw_ensure): lack of function type + +Sun Aug 31 12:25:06 2003 Nobuyoshi Nakada + + * lib/optparse.rb: --version takes an optional argument; "all" or + a list of package names. + +Sun Aug 31 10:17:02 2003 Tadayoshi Funaba + + * lib/date/format.rb: yyyy/mm is not an acceptable format. + + * lib/time.rb: follow above. + +Sat Aug 30 14:25:43 2003 Yukihiro Matsumoto + + * eval.c (rb_iter_break): should not call TAG_JUMP directly. + +Sat Aug 30 03:58:21 2003 Yukihiro Matsumoto + + * eval.c (struct BLOCK): remove BLOCKTAG, use scope instead. + + * eval.c (POP_TAG): no longer propagate retval. retval is now set + directly by localjump_destination(). + + * eval.c (localjump_destination): new function to cast + return/break local jump. + + * eval.c (rb_yield_0): stop TAG_RETURN/TAG_BREAK escaping. + +Fri Aug 29 22:35:00 2003 Shigeo Kobayashi + + * bigdecimal.c *.html: The 2nd arg. for add,sub,mult, and div is 0, + then result will be the same as +,-,*,/ respectively. + +Fri Aug 29 17:30:15 2003 Hidetoshi NAGAI + + * process.c: bug fix + + * process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys} + + * process.c: deny handling IDs during evaluating the block given to + the Process::{UID,GID}.switch method + + * ext/tcltklib/tcltklib.c: some methods have no effect if on slave-IP + + * ext/tcltklib/tcltklib.c: can create a interpreter without Tk + + * ext/tcltklib/tcltklib.c: bug fix on handling exceptions + + * ext/tcltklib/MANUAL.euc: modify + + * ext/tk/lib/tk.rb: freeze some core modules + + * ext/tk/lib/multi-tk.rb: more secure + + * ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the + Tk's list + + * ext/tk/lib/tk.rb: improve accessibility of TkVariable object + + * ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb, + ext/tk/lib/tktext.rb: fix bug of font handling + + * ext/tk/lib/tkfont.rb: TkFont.new() accepts compound fonts + +Thu Aug 28 22:07:12 2003 Yukihiro Matsumoto + + * variable.c (rb_autoload_load): call const_missing if autoloading + constant is not defined to allow hook. + + * eval.c (rb_eval): use rb_const_get_from() instead of + rb_const_get_at(). + + * eval.c (is_defined): forgot to check NODE_COLON3. + +Thu Aug 28 17:30:24 2003 Yukihiro Matsumoto + + * variable.c (rb_const_get_0): should check constants defined in + included modules, if klass is Object. [ruby-talk:79302] + + * numeric.c (check_uint): check should be done using UINT_MAX, not + INT_MAX. this fix is submitted by Lyle Johnson + in [ruby-core:01486] + +Thu Aug 28 05:02:52 2003 Yukihiro Matsumoto + + * parse.y (singleton): typo fixed (ruby-bugs-ja:PR#562) + +Thu Aug 28 02:37:45 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): *a = [1,2] now assigns [[1,2]] to a. + consistent with *a = [1], which set [[1]] to a. + + * node.h: merge NODE_RESTARY to NODE_SPLAT. + + * parse.y: rules simplified a bit by removing NODE_RESTARY. + + * sample/test.rb: updated for new assignment behavior. + +Wed Aug 27 22:33:24 2003 Nobuyoshi Nakada + + * error.c (rb_bug): should not use other methods; this function is + not for ordinary use. [ruby-dev:21259] + +Wed Aug 27 15:07:57 2003 Minero Aoki + + * lib/net/smtp.rb (check_response): AUTH CRAM-MD5 returns 334 + response. [ruby-list:38279] + +Wed Aug 27 05:10:15 2003 NAKAMURA Usaku + + * win32/win32.c (map_errno): support winsock error. + + * win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid, + kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime): + pass errno to map_errno(). + + * win32/win32.c (rb_w32_select, rb_w32_accept, rb_w32_bind, + rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname, + rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv, + rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt, + rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr, + rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname, + rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport, + rb_w32_fclose, rb_w32_close): use map_errno(). + + * win32/win32.h: add winsock errors. + +Tue Aug 26 23:53:23 2003 Yukihiro Matsumoto + + * lib/ostruct.rb (OpenStruct::method_missing): prohibit modifying + frozen OpenStruct. [ruby-talk:80214] + +Tue Aug 26 20:03:50 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (create_tmpsrc): add the hook for source. + [ruby-list:38122] + +Tue Aug 26 15:59:53 2003 why the lucky stiff + + * implicit.c (syck_type_id_to_taguri): corrected detection of + x-private types. + +Sun Aug 24 01:02:48 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): performance improvement. + [ruby-talk:79748] + +Sat Aug 23 23:41:16 2003 Yukihiro Matsumoto + + * file.c (rb_file_s_expand_path): avoid calling rb_scan_args() for + apparent cases. [ruby-talk:79748] + +Sat Aug 23 18:56:53 2003 Nobuyoshi Nakada + + * ext/nkf/nkf.c (rb_nkf_putchar): should use rb_str_resize() to just + resize a string, rb_str_cat() disallows NULL. [ruby-dev:21237] + +Sat Aug 23 16:48:41 2003 Keiju Ishitsuka + + * lib/irb/ruby-lex.rb: bug fix for "foo" !~ /bar/. [ruby-talk:79942] + +Sat Aug 23 15:59:58 2003 Nobuyoshi Nakada + + * eval.c (rb_eval, rb_iterate, block_pass): reduce PUSH/POP_TAG and + EXEC_TAG() for retry. [ruby-dev:21216] + +Sat Aug 23 02:32:33 2003 Yukihiro Matsumoto + + * eval.c (rb_yield_splat): should check if "values" is array. + + * enum.c (each_with_index_i): typo. + +Fri Aug 22 17:07:05 2003 Yukihiro Matsumoto + + * enum.c (inject_i): use rb_yield_values. + + * enum.c (each_with_index_i): ditto. + + * eval.c (rb_yield_splat): new function to call "yield *values". + + * string.c (rb_str_scan): use rb_yield_splat(). + +Fri Aug 22 06:13:22 2003 why the lucky stiff + + * ext/syck/rubyext.c: refactoring of the transfer method + dispatch. added yaml_org_handler for faster dispatch of + transfers to base types. + + * lib/yaml/rubytypes.rb: removed handling of builtins from + Ruby library. + + * ext/syck/token.c: quoted and block scalars are now implicit !str + + * ext/syck/implicit.c: empty string detected as !null. + +Fri Aug 22 01:00:31 2003 Nobuyoshi Nakada + + * eval.c (block_pass): improve passing current block. + +Fri Aug 22 00:13:00 2003 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c: Int. overflow bug in multiplication + fixed, and VpNmlz() speed up. + +Wed Aug 20 16:44:49 2003 Nobuyoshi Nakada + + * ext/socket/socket.c (ruby_connect): many systems seem to have + a problem in select() after EINPROGRESS. [ruby-list:38080] + +Wed Aug 20 01:31:17 2003 why the lucky stiff + + * ext/syck/syck.h: Parser definition problems on HP-UX. + [ruby-talk:79389] + + * ext/syck/handler.c (syck_hdlr_get_anchor): Memory leak. + + * ext/syck/syck.s (syck_io_file_read): Bad arguments to fread. + + * ext/syck/rubyext.c: Tainting issues. + +Tue Aug 19 23:20:00 2003 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c .h .html: to_s("+") implemented. + + * ext/bigdecimal/lib/bigdecimal/math.rb: E implemented. + +Tue Aug 19 07:47:09 2003 GOTOU Yuuzou + + * lib/webrick/ssl.rb: new file; SSL/TLS enhancement for GenericServer. + + * lib/webrick/https.rb: SSLSocket handling is moved to webrick/ssl.rb. + + * lib/webrick/compat.rb (File::fnmatch): remove old migration code. + + * lib/webrick/httpserver.rb (HTTPServer#run): ditto. + + * lib/webrick/server.rb (GenericServer#listen): the body of this + method is pull out as Utils::create_lisnteners. + + * lib/webrick/utils.rb (Utils::create_lisnteners): new method. + + * lib/webrick/server.rb (GenericServer#start): should rescue + unknown errors. and refine comments. + + * ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): should close + socket if SSLSocket raises error. + +Tue Aug 19 11:19:33 2003 Shugo Maeda + + * io.c (next_argv): should not call GetOpenFile() if rb_stdout is + not a IO (T_FILE). + +Tue Aug 19 07:47:09 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as + a builtin. + + * ext/openssl/lib/openssl/buffering.rb (Buffering#close): ditto. + + * ext/openssl/lib/openssl/buffering.rb (Buffering#puts): should + add a return to the tails of each line. + + * ext/openssl/lib/openssl/ssl.rb: new class OpenSSL::SSL::SSLServer. + + * ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): use sync_close. + + * ext/openssl/sample/echo_svr.rb: use SSLServer. + + * ext/openssl/sample/echo_cli.rb: add example of SSLSocket#sync_close. + +Tue Aug 19 01:24:34 2003 Nobuyoshi Nakada + + * ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): Mac OS X standard + headers are inconsistent at this macro. [ruby-core:01432] + + * ext/curses/extconf.rb: check if _XOPEN_SOURCE_EXTENDED breaks. + + * ext/tcltklib/stubs.c: Status macro in X11/Xthreads.h bothers + winspool.h + + * instruby.rb: make list at first instead of iterator. + [ruby-talk:79347] + +Mon Aug 18 11:23:11 2003 Nobuyoshi Nakada + + * dir.c (glob_helper): preserve raw order for **. + +Sun Aug 17 23:39:55 2003 Nobuyoshi Nakada + + * ext/openssl/extconf.rb (HAVE_VA_ARGS_MACRO): need to compile. + +Sun Aug 17 17:10:03 2003 GOTOU Yuuzou + + * ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a + method to specify if the underlying IO will be closed in + SSLSocket#close. + + * ext/openssl/lib/openssl/buffering.rb: add forwarders to + setsockopt, getsockopt and fcntl. + + * ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket. + +Sun Aug 17 11:32:04 2003 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): should not force to remake Makefile when + installation and so on. + +Sat Aug 16 23:58:18 2003 Nobuyoshi Nakada + + * marshal.c (w_symbol, w_object): get rid of warnings. + + * re.c (rb_memsearch): ditto. + + * time.c (time_dump): ditto. + + * ext/extmk.rb (extmake): not continue making when extconf.rb + failed. + + * ext/openssl/extconf.rb: check __VA_ARGS__ macro more precisely. + + * ext/openssl/ossl.h: remove version.h dependency. + + * ext/openssl/ruby_missing.h: ditto. + + * lib/mkmf.rb (pkg_config): use --libs output except with + only-L for other options. [ruby-list:38099] + + * lib/mkmf.rb (create_makefile): separate rule for static + library from shared object. + + * win32/Makefile.sub, bcc32/Makefile.sub, wince/Makefile.sub: + define exec_prefix and libdir. + +Fri Aug 15 23:15:00 2003 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c .h: Bug in combination of limit & div + method fixed. + + * ext/bigdecimal/lib/bigdecimal/math.rb: atan() & sqrt() added. + +Fri Aug 15 12:01:43 2003 Nobuyoshi Nakada + + * configure.in (HUGE_ST_INO): check whether struct stat.st_ino + is larger than long. [ruby-dev:21194] + http://www.geocities.co.jp/SiliconValley-PaloAlto/1409/ruby/beos.html + + * error.c (syserr_eqq): errno might exceed Fixnum limit. + + * error.c (Init_Exception): moved base initialization from + init_syserr(). + + * inits.c (rb_call_inits): postpone initializing errnos until + Bignum is available. + +Fri Aug 15 12:01:43 2003 Nobuyoshi Nakada + + * ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): needed to let + keyname() and so on be declared. + + * ext/curses/curses.c (curses_resizeterm, window_resize): + arguments conflicted with macros in term.h. + + * ext/curses/curses.c (Curses module methods): ensure + initialized. [ruby-dev:21191] + +Fri Aug 15 02:08:53 2003 Yukihiro Matsumoto + + * gc.c (id2ref): recycle check should be done by klass == 0. + [ruby-core:01408] + +Fri Aug 15 01:34:23 2003 Michal Rokos + + * ext/openssl/ossl_pkey.c: move generate_cb here + + * ext/openssl/ossl_pkey_{dh|dsa|rsa}.c: adapt to this cb + + * ext/openssl/openssl_missing.[ch]: add (0.9.6x, x + + * ext/bigdecimal/bigdecimal.c: Bug in div method fixed. + + * ext/bigdecimal/lib/bigdecimal/math.rb: Newly added. + + * ext/bigdecimal/sample/pi.rb: Changed so as to use math.rb. + +Thu Aug 14 21:19:14 2003 Yukihiro Matsumoto + + * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] + +Thu Aug 14 20:03:34 2003 Masaki Suketa + + * ext/win32ole/win32ole.c (OLE_FREE): should not call + ole_message_loop. + + * ext/win32ole/win32ole.c (ole_event_free): ditto. + + * ext/win32ole/win32ole.c (ole_initialize): stop calling + OleUninitialize at exit. + +Thu Aug 14 11:27:37 2003 NAKAMURA Usaku + + * gc.c (rb_data_object_alloc): check type of 1st argument. + [ruby-dev:21192] + +Thu Aug 14 00:21:14 2003 Yukihiro Matsumoto + + * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. + + * parse.y (lhs): ditto. + + * parse.y (yylex): should return tCOLON3 right after kCLASS. + [ruby-talk:78918] + + * error.c (exc_initialize): was converting argument to string too + eagerly. Only check was needed. [ruby-talk:78958] + +Wed Aug 13 23:31:00 2003 Shigeo Kobayashi + + * ext/bigdecimal/bigdecimal.c .h .html: Ambiguity of + BigDecimal::limit removed. + +Wed Aug 13 19:21:34 2003 Christian Neukirchen + + * lib/webrick/https.rb (HTTPServer#run): should set syncing-mode + to SSLSocket. [ruby-talk:78919] + +Wed Aug 13 18:13:49 2003 Yukihiro Matsumoto + + * eval.c (POP_BLOCK): turn on BLOCK_LEFT flag when leaving block. + + * eval.c (proc_invoke): unpack return/break destination when block + is already left. + +Wed Aug 13 15:58:31 2003 WATANABE Hirofumi + + * object.c (rb_class_s_alloc): add function prototype to avoid VC++ + warning. + +Wed Aug 13 13:50:59 2003 NAKAMURA Usaku + + * ext/Win32API/Win32API.c (Win32API_initialize): should pass some + class to first argument of Data_Wrap_Struct(). (ruby-bugs:PR#1109) + +Tue Aug 12 16:55:11 2003 Nobuyoshi Nakada + + * Makefile.in: static link libraries to LIBRUBY_SO with static linked + ext. [ruby-dev:21157] + + * ext/extmk.rb (extmake): sort extension library initialization order. + + * ext/extmk.rb (extmake): compact $extlibs. + +Tue Aug 12 02:48:56 2003 Yukihiro Matsumoto + + * eval.c (THREAD_SAVE_CONTEXT): should explicitly turn off the + flag before calling getcontext(2). + + * eval.c (struct thread): add member to save backing store on + IA64. (ruby-bugs PR1086) + + * eval.c (thread_mark): mark IA64 backing store region. + + * eval.c (thread_free): free saved IA64 backing store. + + * eval.c (rb_thread_save_context): save IA64 backing store as well. + + * eval.c (rb_thread_restore_context): restore IA64 backing store. + + * eval.c (THREAD_ALLOC): initialize IA64 members. + +Mon Aug 11 22:31:50 2003 NAKAMURA, Hiroshi + + * lib/debug.rb(debug_command): inspection command should inspect + resulting value even if it's nil. [ruby-dev:21180] by OMAE, jun + . + + * lib/debug.rb(debug_command): incomplete regexp. + +Mon Aug 11 17:33:07 2003 Yukihiro Matsumoto + + * eval.c (rb_call_super): do not use rb_block_given_p() for + check. [ruby-talk:78656] + + * eval.c (BEGIN_CALLARGS): push ITER_NOT only when ITER_PRE. + +Sun Aug 10 10:43:05 2003 GOTOU Yuuzou + + * ext/openssl/lib/openssl/buffering.rb: increase BLOCK_SIZE + from 1k to 16k bytes. [ruby-talk:78603] + + * ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc): enable + partial write to allow interruption in SSLSocket#write. + +Sun Aug 10 00:34:16 2003 WATANABE Hirofumi + + * cygwin/GNUmakefile: remove unnecessary '--drive-name=$(CC)' + for ccache. + +Sat Aug 9 10:36:21 2003 Yukihiro Matsumoto + + * marshal.c (w_object): do not dump generic instance variable when + marshal_dump is defined. + +Sat Aug 9 00:35:00 2003 Shigeo Kobayashi + + * ext/bigdecimal.c: F style output(like 1234.56789) implemented + to to_s method. + * ext/bigdecimal_??.html: F style output(like 1234.56789) + implemented to to_s method. + +Fri Aug 8 12:33:17 2003 WATANABE Hirofumi + + * bcc32/Makefile.sub: rubyw.exe should be a Windows GUI program. + add the -aa option to WLDFLAGS. + +Fri Aug 8 11:29:26 2003 Koji Arai + + * marshal.c (w_object): should set `c_arg' at first. + +Fri Aug 8 03:22:28 2003 GOTOU Yuuzou + + * lib/webrick/httputils.rb (FormData#list): should not take + a side effect for the receiver. + +Thu Aug 7 14:40:37 2003 WATANABE Hirofumi + + * cygwin/GNUmakefile: better --disbale-shared option support. + + * cygwin/GNUmakefile: add forwarding DLL target for cygwin. + +Thu Aug 7 14:21:05 2003 Corinna Vinschen + + * configure.in: Fix Cygwin specific naming of libraries to + be net distribution compliant. (ruby-bugs:PR#1077) + cygwin-ruby18.dll -> cygruby18.dll + +Thu Aug 7 12:51:38 2003 Yukihiro Matsumoto + + * eval.c (rb_f_at_exit): should not be called without a block. + block_given check added. + +Thu Aug 7 06:46:06 2003 Yukihiro Matsumoto + + * eval.c (rb_call0): forgot to pop ruby_class. + + * eval.c (rb_call0): update ruby_class as well as ruby_cref. + (ruby-bugs-ja:PR#540) + +Thu Aug 7 04:52:50 2003 Yukihiro Matsumoto + + * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to + ruby_cref. [ruby-talk:78141] + +Thu Aug 7 04:19:15 2003 Akinori MUSHA + + * gc.c: FreeBSD/ia64's mcontext_t is a bit different from that of + Linux/ia64. This makes gc.c compile but miniruby coredumps for + the moment. + +Thu Aug 7 00:15:00 2003 Shigeo Kobayashi + + * ext/bigdecimal.c: Comparison results adjusted to Float's. + * ext/bigdecimal.c: Use rb_num_coerce_????(x,y) instead of own. + +Wed Aug 6 22:58:00 2003 Nathaniel Talbott + + * lib/test/unit/testcase.rb: Added equality checking. + * lib/test/unit/testsuite.rb: Added equality checking. + * lib/test/unit/assertions.rb: Fixed a warning. + +Wed Aug 6 17:28:10 2003 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): pass LIBPATH to make ruby. [ruby-dev:21137] + + * ext/extmk.rb (extmake): set library name as source file name in + Init_ext(). [ruby-dev:21137] + + * lib/mkmf.rb (Logging::postpone): postpone logging messages after + heading message as the result of the block. + + * lib/mkmf.rb (macro_defined?): append newline to src unless ended + with it. + + * lib/mkmf.rb (have_library): treat nil function name as "main". + (ruby-bugs:PR#1083) + + * lib/mkmf.rb (pkg_config): should append additional libraries to + $libs but not $LIBS. [ruby-dev:21137] + + * ext/io/wait/extconf.rb: check DOSISH macro instead of platform. + + * ext/digest/sha1/extconf.rb: have_library already appends library + name. + +Wed Aug 6 17:23:57 2003 Yukihiro Matsumoto + + * eval.c: initialize /* OK */ variables by Qnil to stop warnings. + +Wed Aug 6 04:58:32 2003 NAKAMURA Usaku + + * ext/Setup*: add io/wait and openssl. + +Wed Aug 6 01:13:38 2003 Yukihiro Matsumoto + + * eval.c (rb_f_autoload): use ruby_cbase instead of ruby_class. + + * eval.c (rb_f_autoload_p): ditto. + + * class.c (rb_mod_init_copy): no longer implements independent + clone and dup methods. override "initialize_copy" instead. + [ruby-core:01352] + + * object.c (rb_class_s_alloc): define Class allocation function. + this makes Classes to follow clone framework that uses + initialize_copy. + + * object.c (rb_class_initialize): separate instantiation and + initialization. + + * object.c (rb_obj_alloc): prohibit instantiation from + uninitialized class. + + * object.c (rb_class_superclass): check uninitialized class. + + * array.c (rb_ary_fill): wrong index processing with block. this + fix was done by Koji Arai [ruby-list:38029] + + * marshal.c (w_object): should preserve generic ivar for nil, + true, false, symbols, and fixnums. + + * marshal.c (w_uclass): base_klass check should be done after + rb_class_real(). + +Wed Aug 6 01:18:50 2003 Minero Aoki + + * lib/net/http.rb: update document. + + * lib/net/pop.rb: ditto. + + * lib/net/protocol.rb: ditto. + +Wed Aug 6 00:48:37 2003 Koji Arai + + * marshal.c (w_object): should recommend marshal_dump rather than + _dump_data. + +Tue Aug 5 17:58:57 2003 WATANABE Hirofumi + + * lib/fileutils.rb (install): should preserve timestamp only. + +Tue Aug 5 17:31:59 2003 Ian Macdonald + + * lib/shell/command-processor.rb (Shell::CommandProcessor::rmdir): + simple typo. + +Tue Aug 5 15:47:34 2003 Nobuyoshi Nakada + + * eval.c (rb_load): should preserve current source file/line. + +Tue Aug 5 10:04:42 2003 Yukihiro Matsumoto + + * string.c (str_new4): ptr may refer null_str. + +Mon Aug 4 17:25:18 2003 Yukihiro Matsumoto + + * stable version 1.8.0 released. + +For the changes before 1.8.0, see doc/ChangeLog-1.8.0 + +Local variables: +add-log-time-format: (lambda () + (let* ((time (current-time)) + (system-time-locale "C") + (diff (+ (cadr time) 32400)) + (lo (% diff 65536)) + (hi (+ (car time) (/ diff 65536)))) + (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t))) +indent-tabs-mode: t +tab-width: 8 +end: diff --git a/lib/ruby-1.9.1-rc1/GPL b/lib/ruby-1.9.1-rc1/GPL new file mode 100644 index 0000000..5b6e7c6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/GPL @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/lib/ruby-1.9.1-rc1/KNOWNBUGS.rb b/lib/ruby-1.9.1-rc1/KNOWNBUGS.rb new file mode 100644 index 0000000..39dc6a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/KNOWNBUGS.rb @@ -0,0 +1,4 @@ +# +# This test file concludes tests which point out known bugs. +# So all tests will cause failure. +# diff --git a/lib/ruby-1.9.1-rc1/LEGAL b/lib/ruby-1.9.1-rc1/LEGAL new file mode 100644 index 0000000..96cc4fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/LEGAL @@ -0,0 +1,393 @@ +LEGAL NOTICE INFORMATION +------------------------ + +All the files in this distribution are covered under either the Ruby's +license (see the file COPYING) or public-domain except some files +mentioned below. + +include/ruby/oniguruma.h: +regcomp.c: +regenc.[ch]: +regerror.c: +regexec.c: +regint.h: +regparse.[ch]: +enc/ascii.c +enc/big5.c +enc/cp949.c +enc/emacs_mule.c +enc/encdb.c +enc/euc_jp.c +enc/euc_kr.c +enc/euc_tw.c +enc/gb18030.c +enc/gb2312.c +enc/gbk.c +enc/iso_8859_1.c +enc/iso_8859_10.c +enc/iso_8859_11.c +enc/iso_8859_13.c +enc/iso_8859_14.c +enc/iso_8859_15.c +enc/iso_8859_16.c +enc/iso_8859_2.c +enc/iso_8859_3.c +enc/iso_8859_4.c +enc/iso_8859_5.c +enc/iso_8859_6.c +enc/iso_8859_7.c +enc/iso_8859_8.c +enc/iso_8859_9.c +enc/koi8_r.c +enc/koi8_u.c +enc/shift_jis.c +enc/unicode.c +enc/us_ascii.c +enc/utf_16be.c +enc/utf_16le.c +enc/utf_32be.c +enc/utf_32le.c +enc/utf_8.c +enc/windows_1251.c + +Oniguruma ---- (C) K.Kosako + +http://www.geocities.jp/kosako3/oniguruma/ +http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/ +http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/ + + When this software is partly used or it is distributed with Ruby, + this of Ruby follows the license of Ruby. + +configure: + + This file is free software. + + Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. + + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + +config.guess: +config.sub: +parse.c: + + As long as you distribute these files with the file configure, they + are covered under the Ruby's license. + + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 + Free Software Foundation, Inc. + + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a + configuration script generated by Autoconf, you may include it under + the same distribution terms that you use for the rest of that program. + +util.c (partly): + + Copyright (c) 1991, 2000, 2001 by Lucent Technologies. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + +util.c (partly): +win32/win32.[ch]: + + You can apply the Artistic License to these files. (or GPL, + alternatively) + + Copyright (c) 1993, Intergraph Corporation + + You may distribute under the terms of either the GNU General Public + License or the Artistic License, as specified in the perl README file. + +random.c + + This file is under the new-style BSD license. + + A C-program for MT19937, with initialization improved 2002/2/10. + Coded by Takuji Nishimura and Makoto Matsumoto. + This is a faster version by taking Shawn Cokus's optimization, + Matthe Bellew's simplification, Isaku Wada's real version. + + Before using, initialize the state by using init_genrand(seed) + or init_by_array(init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + 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 names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + + + Any feedback is very welcome. + http://www.math.keio.ac.jp/matumoto/emt.html + email: matumoto@math.keio.ac.jp + +st.[ch]: +missing/alloca.c: +missing/dup2.c: +missing/finite.c: +missing/hypot.c: +missing/isinf.c: +missing/isnan.c: +missing/memcmp.c: +missing/memmove.c: +missing/strchr.c: +missing/strstr.c: +missing/strtol.c: +ext/digest/sha1/sha1.[ch]: + + These files are all under public domain. + +missing/erf.c: +missing/tgamma.c: +missing/lgamma_r.c: +missing/crypt.c: +missing/vsnprintf.c: + + This file is under the old-style BSD license. Note that the + paragraph 3 below is now null and void. + + Copyright (c) 1990, 1993 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Chris Torek. + + 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. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + IMPORTANT NOTE: + -------------- + From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + paragraph 3 above is now null and void. + +missing/strlcat.c +missing/strlcpy.c + + These files are under the new-style BSD license. + + Copyright (c) 1998 Todd C. Miller + 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 ``AS IS'' AND ANY EXPRESS OR 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. + +ext/digest/md5/md5.[ch]: + + These files are under the following license. Ruby uses modified + versions of them. + + Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + +ext/digest/rmd160/rmd160.[ch]: + + These files have the following copyright information, and by the + author we are allowed to use it under the new-style BSD license. + + AUTHOR: Antoon Bosselaers, ESAT-COSIC + (Arranged for libc by Todd C. Miller) + DATE: 1 March 1996 + + Copyright (c) Katholieke Universiteit Leuven + 1996, All Rights Reserved + +ext/digest/sha2/sha2.[ch]: + + These files are under the new-style BSD license. + + Copyright 2000 Aaron D. Gifford. 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. Neither the name of the copyright holder nor the names of contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND + ANY EXPRESS OR 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(S) OR CONTRIBUTOR(S) BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR 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. + +ext/nkf/nkf-utf8/config.h: +ext/nkf/nkf-utf8/nkf.c: +ext/nkf/nkf-utf8/utf8tbl.c: + + These files are under the following license. So to speak, it is + copyrighted semi-public-domain software. + + Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA) + Everyone is permitted to do anything on this program + including copying, modifying, improving, + as long as you don't try to pretend that you wrote it. + i.e., the above copyright notice has to appear in all copies. + Binary distribution requires original version messages. + You don't have to ask before copying, redistribution or publishing. + THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. + +ext/socket/addrinfo.h: +ext/socket/getaddrinfo.c: +ext/socket/getnameinfo.c: + + These files are under the new-style BSD license. + + Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. + 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. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. + +ext/win32ole/win32ole.c: + + You can apply the Artistic License to this file. (or GPL, + alternatively) + + (c) 1995 Microsoft Corporation. All rights reserved. + Developed by ActiveWare Internet Corp., http://www.ActiveWare.com + + Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy + and Jan Dubois + + You may distribute under the terms of either the GNU General Public + License or the Artistic License, as specified in the README file + of the Perl distribution. diff --git a/lib/ruby-1.9.1-rc1/LGPL b/lib/ruby-1.9.1-rc1/LGPL new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/LGPL @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/lib/ruby-1.9.1-rc1/Makefile.in b/lib/ruby-1.9.1-rc1/Makefile.in new file mode 100644 index 0000000..3b8543d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/Makefile.in @@ -0,0 +1,255 @@ +SHELL = /bin/sh +NULLCMD = : + +#### Start of system configuration section. #### + +srcdir = @srcdir@ +hdrdir = $(srcdir)/include + +CC = @CC@ +YACC = bison +PURIFY = +AUTOCONF = autoconf +@SET_MAKE@ +MKFILES = @MAKEFILES@ +BASERUBY = @BASERUBY@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +sbindir = @sbindir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +datarootdir = @datarootdir@ +datadir = @datadir@ +arch = @arch@ +sitearch = @sitearch@ +sitedir = @sitedir@ + +TESTUI = console +TESTS = +RDOCTARGET = @RDOCTARGET@ + +EXTOUT = @EXTOUT@ +RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system +arch_hdrdir = $(EXTOUT)/include/$(arch) +VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing + +empty = +OUTFLAG = @OUTFLAG@$(empty) +COUTFLAG = @COUTFLAG@$(empty) +CFLAGS = @CFLAGS@ @ARCH_FLAG@ +cflags = @cflags@ +optflags = @optflags@ +debugflags = @debugflags@ +warnflags = @warnflags@ +XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@ +EXTLDFLAGS = +XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS) +EXTLIBS = +LIBS = @LIBS@ $(EXTLIBS) +MISSING = @LIBOBJS@ @ALLOCA@ +LDSHARED = @LIBRUBY_LDSHARED@ +DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@ +SOLIBS = @SOLIBS@ +MAINLIBS = @MAINLIBS@ +ARCHMINIOBJS = @MINIOBJS@ +BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@ +BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@ +BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@ + +RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@ +RUBY_SO_NAME=@RUBY_SO_NAME@ +EXEEXT = @EXEEXT@ +PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT) +RUBY = $(RUBY_INSTALL_NAME) +MINIRUBY = @MINIRUBY@ $(MINIRUBYOPT) +RUNRUBY = @RUNRUBY@ $(RUNRUBYOPT) -- + +#### End of system configuration section. #### + +MAJOR= @MAJOR@ +MINOR= @MINOR@ +TEENY= @TEENY@ + +LIBRUBY_A = @LIBRUBY_A@ +LIBRUBY_SO = @LIBRUBY_SO@ +LIBRUBY_ALIASES= @LIBRUBY_ALIASES@ +LIBRUBY = @LIBRUBY@ +LIBRUBYARG = @LIBRUBYARG@ +LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@ +LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@ + +THREAD_MODEL = @THREAD_MODEL@ + +PREP = @PREP@ +ARCHFILE = @ARCHFILE@ +SETUP = +EXTSTATIC = @EXTSTATIC@ +SET_LC_MESSAGES = env LC_MESSAGES=C + +MAKEDIRS = @MAKEDIRS@ +CP = cp +MV = mv +RM = rm -f +NM = @NM@ +AR = @AR@ +ARFLAGS = rcu +RANLIB = @RANLIB@ +AS = @AS@ +ASFLAGS = @ASFLAGS@ +IFCHANGE = $(srcdir)/tool/ifchange +SET_LC_MESSAGES = env LC_MESSAGES=C +OBJDUMP = @OBJDUMP@ +OBJCOPY = @OBJCOPY@ + +OBJEXT = @OBJEXT@ +ASMEXT = S +DLEXT = @DLEXT@ +MANTYPE = @MANTYPE@ + +INSTALLED_LIST= .installed.list +#### End of variables + +all: + +.DEFAULT: all + +# Prevent GNU make v3 from overflowing arg limit on SysV. +.NOEXPORT: + +miniruby$(EXEEXT): + @$(RM) $@ + $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) $(LIBS) $(OUTFLAG)$@ + +$(PROGRAM): + @$(RM) $@ + $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(OUTFLAG)$@ + +# We must `rm' the library each time this rule is invoked because "updating" a +# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not +# supported. +$(LIBRUBY_A): + @$(RM) $@ + $(AR) $(ARFLAGS) $@ $(OBJS) $(DMYEXT) + @-$(RANLIB) $@ 2> /dev/null || true + +$(LIBRUBY_SO): + @-$(PRE_LIBRUBY_UPDATE) + $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@ + @-test "$(OBJDUMP)" = "" || test "$(OBJCOPY)" = "" || { \ + set dummy `$(OBJDUMP) -t $@ | sed '/^[^ ]* g/!d;s/.* //;/^\(Init_\|vm_\)/!d;s/^/-L /'`; \ + shift; test "$$#" = 0 || $(OBJCOPY) "$$@" $@; } + @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \ + File.symlink "$(LIBRUBY_SO)", link}' \ + $(LIBRUBY_ALIASES) || true + +fake.rb: Makefile + @echo ' \ + class Object; \ + CROSS_COMPILING = RUBY_PLATFORM; \ + remove_const :RUBY_PLATFORM; \ + remove_const :RUBY_VERSION; \ + RUBY_PLATFORM = "@arch@"; \ + RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"; \ + end; \ + if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \ + class File; \ + remove_const :ALT_SEPARATOR; \ + ALT_SEPARATOR = "\\"; \ + end; \ + end; \ + ' > $@ + +Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in + +$(MKFILES): config.status + MAKE=$(MAKE) $(SHELL) ./config.status + @{ \ + echo "all:; -@rm -f conftest.mk"; \ + echo "conftest.mk: .force; @echo AUTO_REMAKE"; \ + echo ".force:"; \ + } > conftest.mk || exit 1; \ + $(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \ + { echo "Makefile updated, restart."; exit 1; } + +uncommon.mk: $(srcdir)/common.mk + sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@ + +config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in + MINIRUBY="$(MINIRUBY)" $(SHELL) ./config.status --recheck + +$(srcdir)/configure: $(srcdir)/configure.in + cd $(srcdir) && $(AUTOCONF) + +# Things which should be considered: +# * with gperf v.s. without gperf +# * ./configure v.s. ../ruby/configure +# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime. +# * svn checkout generate a file with mtime as current time +# * XFS has a mtime with fractional part +lex.c: defs/keywords + @\ + if cmp -s $(srcdir)/defs/lex.c.src $?; then \ + set -x; \ + cp $(srcdir)/lex.c.blt $@; \ + else \ + set -x; \ + gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \ + mv $@.tmp $@ && \ + cp $? $(srcdir)/defs/lex.c.src && \ + cp $@ $(srcdir)/lex.c.blt; \ + fi + +.c.@OBJEXT@: + $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $< + +.s.@OBJEXT@: + $(AS) $(ASFLAGS) -o $@ $< + +.c.S: + $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -S $< + +clean-local:: + @$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output + +distclean-local:: + @$(RM) ext/config.cache $(RBCONFIG) + -$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h + -rmdir -p $(arch_hdrdir)/ruby + +clean-ext distclean-ext realclean-ext:: + @find ext -name Makefile | sort | while read mk; do \ + dir=`dirname "$$mk"`; \ + echo $(@:-ext=)ing `expr "$$dir" : 'ext/\(.*\)'`; \ + (cd "$$dir"; $(MAKE) $(MFLAGS) $(@:-ext=)) && \ + if [ $@ == clean-ext ]; then \ + true; \ + else \ + rmdir -p "$$dir" 2> /dev/null; \ + fi; \ + done + +ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP) + $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c + +update-rubyspec: + if [ -d $(srcdir)/spec/mspec ]; then \ + cd $(srcdir)/spec/mspec; \ + git pull; \ + cd ../..; \ + else \ + git clone $(MSPEC_GIT_URL) $(srcdir)/spec/mspec; \ + fi + if [ -d $(srcdir)/spec/rubyspec ]; then \ + cd $(srcdir)/spec/rubyspec; \ + git pull; \ + else \ + git clone $(RUBYSPEC_GIT_URL) $(srcdir)/spec/rubyspec; \ + fi + +test-rubyspec: + @if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi + $(RUNRUBY) $(srcdir)/spec/mspec/bin/mspec $(srcdir)/spec/rubyspec/$(MAJOR).$(MINOR) diff --git a/lib/ruby-1.9.1-rc1/NEWS b/lib/ruby-1.9.1-rc1/NEWS new file mode 100644 index 0000000..584bbe3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/NEWS @@ -0,0 +1,402 @@ += NEWS + +This document is a list of user visible feature changes made between +releases except for bug fixes. + +Note that each entry is kept so brief that no reason behind or +reference information is supplied with. For a full list of changes +with all sufficient information, see the ChangeLog file. + +== Changes since the 1.8.7 release +See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7. + +=== Compatibility issues + +* language core + + * New syntax and semantics + o Block arguments are always local + o New semantics for block arguments + o Method used for splat arguments: #to_splat instead of + #to_ary + o defined? and local variables + o Parser expects that your source code has only valid byte + sequence in some character encoding. Use magic comments + to tell the parser which encoding you use. + +* builtin classes and objects + + * Kernel and Object + o Kernel#methods and #singleton_methods used to return an + array of strings but now they return an array of symbols. + * Class and Module + o Module#attr is an alias of attr_reader + o Module#instance_methods, #private_instance_methods and + #public_instance_methods used to return an array of + strings but now they return an array of symbols. + o Extra subclassing check when binding UnboundMethods + + * Exceptions + o Exceptions are equal to each other if they belong to + the same class and have the same message and backtrace. + o SystemStackError used to be a subclass of StandardError + but not it is a direct subclass of Exception. + o SecurityError: ditto + o Removed Exception#to_str [Ruby2] + + * Enumerable and Enumerator + o Enumerable::Enumerator, compatibility alias of Enumerator, + is removed. + o Enumerable#map,collect_all called without a block returns + an enumerator. + o Even more builtin and bundled libraries have been made to + return an enumerator when called without a block. + * Array + o Array#nitems was removed (use count {|i| !i.nil?}) + o Array#choice was removed (use sample) + o Array#[m,n] = nil places nil in the array. + * Hash + o Hash#to_s is equivalent to Hash#inspect + o Semantics for Hash#each and Hash#each_pair + o Hash#select returns a hash + o Hash#key is the new name for #index which has been + deprecated. + o Hash preserves order. It enumerates its elements in the + order in which the keys are inserted. + o Most of the changes in Hash apply to hash like interfaces + such as ENV and *DBM. + * IO operations + o Many methods used to act byte-wise but now some of those act + character-wise. You can use alternate byte-wise methods. + o IO#getc + o Non-blocking IO + o Kernel#open takes "t" for newline conversion + o Kernel#open takes encoding specified + o IO#initialize now accepts an IO argument + o IO automatically converts byte sequence from a character + encodings into another if specified. + o StringIO#readpartial + o IO.try_convert + o IO.binread + o IO.copy_stream + o IO#binmode? + o IO#close_on_exec= and IO#close_on_exec? + o Limit input in IO#gets, IO#readline, IO#readlines, + IO#each_line, IO#lines, IO.foreach, IO.readlines, + StringIO#gets, StringIO#readline, StringIO#each, + StringIO#readlines + o IO#ungetc, StringIO#ungetc + o IO#ungetbyte, StringIO#ungetbyte + o IO#internal_encoding, IO#external_encoding, + IO#set_encoding + o IO.pipe takes encoding option + o Directive %u behaves like %d for negative values in + printf-style formatting. + * File and Dir operations + o #to_path is called as necessary in File.path, File.chmod, + File.lchmod, File.chown, File.lchown, File.utime, + File.unlink, etc.. + o File.world_readable? + o File.world_writable? + o Dir.[], Dir.glob + o Dir.exist? + o Dir.exists? + * File::Stat + o File::Stat#world_readable? + o File::Stat#world_writable? + * String and Regexp + o No longer an Enumerable + o ?c semantics + o "One-char-wide" semantics for String#[] and String#[]= + o Character-wise semantics in many methods in stead of + byte-wise. + o Encoding-awareness + o Regexp matches only with strings which is encoded in a + compatible character encoding to the regexp's. + o Regexp#kcode is removed. use Regexp#encoding. + * Symbols: restriction on literal symbols + * Numeric + o Numeric#div always rounds as Integer#div has done. + o Numeric#fdiv: ditto. + * Integer + o Integer(nil) raises TypeError + * Fixnum + o Fixnum#id2name removed + o Fixnum#to_sym removed + * Struct + o Struct#inspect + * Time + o New format in Time#to_s + o Timezone information preserved on Marshal.dump/load + * $SAFE and bound methods + o New trusted/untrusted model in addition to + tainted/untainted model. + + * Deprecation + o Kernel#to_a + o Kernel#getc, #gsub, #sub + o Kernel#callcc and Continuation now become 'continuation' + bundled library. + o Object#type + o Removed Array and Hash #indices, #indexes + o Hash#index + o ENV.index + o Process::Status#to_int + o Numeric#rdiv + o Precision is removed. Don't cry, it will be redesigned + and come back in future version. + o Symbol#to_int and Symbol#to_i + o $KCODE is no longer effective. Use Encoding related + features of each class. + o VERSION and friends + +* bundled libraries + + * Pathname + o No longer has #to_str nor #=~. + * time and date + o Time.parse and Date.parse interprets slashed numerical dates + as "dd/mm/yyyy". + * Readline + o If Readline uses libedit, Readline::HISTORY[0] returns the + first of the history. + * Continuation + o as above + + * Deprecation + o Complex#image: use Complex#imag + o All SSL-related class methods in Net::SMTP + o Prime#cache, Prime#primes, Prime#primes_so_far + o mailread library: use tmail gem. + o cgi-lib library: use cgi. + o date2 library: use date. + o eregex library + o finalize library: use ObjectSpace.define_finalizer if you + really need a finalizer. really? + o ftools library: use fileutils. + o generator library: use Enumerator. + o importenv library and Env library + o jcode library: use multilingualization support of String + o parsedate library + o ping library + o readbytes library + o getopts library and parsearg library: use optparse or + getoptlong. + o soap, wsdl and xsd libraries: use soap4r gem. + o Win32API library: use dl. + o dl library: Reimplemented and API changed. use the new + version of dl or ffi gem. + o rubyunit library and runit library: use minitest or + test/unit. Or use anything you love through RubyGems. + o test/unit is reimplemented on top of minitest. This is + not fully compatible with the original. + +=== Language core changes + + * New syntax and semantics + o Magic comments to declare in which encoding your source + code is written + o New literal hash syntax and new syntax for hash style + arguments + o New syntax for lambdas + o .() and calling Procs without #call/#[] + o Block in block arguments + o Block local variables + o Mandatory arguments after optional arguments allowed + o Multiple splats allowed + o #[] can take splatted arguments, hash style arguments + and a block. + o New directives in printf-style formatted strings (%). + o Newlines allowed before ternary colon + o Encoding.default_external and default_internal + + +=== Library updates + +* builtin classes and objects + * Kernel and Object + o BasicObject + o Object#=~ returns nil instead of false by default. + o Kernel#define_singleton_method + o Kernel#load can load a library from the highest versions + of gems by default. + * Class and Module + o Module#const_defined?, #const_get and #method_defined? + take an optional parameter. + o #class_variable_{set,get} are public. + o Class of singleton classes + + * Errno::EXXX + o All of those are always defined. Errno::EXXX will be + defined as an alias to Errno::NOERROR if your platform + does not have one. + + * Binding#eval + * Blocks and Procs + o Arity of blocks without arguments + o proc is now a synonym of Proc.new + o Proc#yield + o Passing blocks to #[] + o Proc#lambda? + o Proc#curry + * Fiber: coroutines/micro-threads + * Thread + o Thread.critical and Thread.critical= removed + o Thread#exit!, Thread#kill! and Thread#terminate! removed. + + * Enumerable and Enumerator + o Enumerable#each_with_index can take optional arguments + and passes them to #each. + o Enumerable#each_with_object + o Enumerator#with_object + o Enumerator.new { ... } + * Array + o Array#delete returns a deleted element rather than a given + object + o Array#to_s is equivalent to Array#inspect + o Array.try_convert + o Array#pack('m0') complies with RFC 4648. + * Hash + o preserving item insertion order + o Hash#default_proc= + o Hash#_compare_by_identity and Hash#compare_by_identity? + o Hash.try_convert + o Hash#assoc + o Hash#rassoc + o Hash#flatten + * Range + o Range#cover? + o Range#include? iterates over elements and compares the + given value with each element unless the range is numeric. + Use Range#cover? for the old behavior, i.e. comparison + with boundary values. + o Range#min, Range#max + + * File and Dir operations + o New methods + * Process + o Process.spawn + o Process.daemon + * String + o String#clear + o String#ord + o String#getbyte, String#setbyte + o String#chars and String#each_char act as character-wise. + o String#codepoints, String#each_codepoint + o String#unpack with a block + o String#hash + o String.try_convert + o String#encoding + o String#force_encoding, String#encode and String#encode! + o String#ascii_only? + o String#valid_encoding? + o String#match + * Symbol + o Zero-length symbols allowed + o Symbol#=== matches strings + o Symbol#intern + o Symbol#encoding + o Symbol methods similar to those in String + * Regexp + o Regexp#=== matches symbols + o Regexp.try_convert + o Regexp#match + o Regexp#fixed_encoding? + o Regexp#encoding + o Regexp#named_captures + o Regexp#names + * MatchData + o MatchData#names + o MatchData#regexp + * Encoding + * Encoding::Converter + o supports conversion between many encodings + * Numeric + o Numeric#upto, #downto, #times, #step + o Numeric#real?, Complex#real? + o Numeric#magnitude + * Rational / Complex + o They are in the core library now + * Math + o Math#log takes an optional argument. + o Math#log2 + o Math#cbrt, Math#lgamma, Math#gamma + * Time + o Time.times removed. Use Process.times. + o Time#sunday? + o Time#monday? + o Time#tuesday? + o Time#wednesday? + o Time#thursday? + o Time#friday? + o Time#saturday? + o Time#tv_nsec and Time#nsec + * Misc. new methods + o RUBY_ENGINE to distinguish between Ruby processor implementation + o public_method + o public_send + o GC.count + o ObjectSpace.count_objects + o Method#hash, Proc#hash + o Method#source_location, UnboundMethod#source_location and + Proc#source_location + o __callee__ + o Elements in $LOAD_PATH and $LOADED_FEATURES are expanded + +* bundled libraries + * RubyGems + o Package management system for Ruby. + o Integrated with Ruby's library loader. + * Rake + o Ruby make. A simple ruby build program with capabilities + similar to make. + * minitest + o Our new testing library which is faster, cleaner and easier + to read than the old test/unit. + o You can introduce the old test/unit as testunit gem through + RubyGems if you want. + * CMath + o Complex number version of Math + * Prime + o Extracted from Mathn and improved. You can easily enumerate + prime numbers. + o Prime.new is obsolete. Use its class methods. + * ripper + o Ruby script parser + * Readline + o Readline.vi_editing_mode? + o Readline.emacs_editing_mode? + o Readline::HISTORY.clear + * Tk + o TkXXX widget classes are removed and redefined as aliases of + Tk::XXX classes. + * RDoc + o Updated to version 2.2.2. See: + http://rubyforge.org/frs/shownotes.php?group_id=627&release_id=26434 + +* commandline options + * -E, --encoding + * -U + * --enable-gems, --disable-gems + * --enable-rubyopt, --disable-rubyopt + * long options are allowed in RUBYOPT environment variable. + +=== Implementation changes + +* Memory Diet + * Object Compaction - Object, Array, String, Hash, Struct, Class, + Module + * st_table compaction (inlining small tables) +* YARV + * Ruby codes are compiled into opcodes before executed. + * Native thread + +* Platform supports + * Support levels + (0) Supported + (1) Best effort + (2) Perhaps + (3) Not supported + * Dropped + o No longer supports djgpp, human68k, MacOS 9 or earlier, + VMS nor Windows CE. diff --git a/lib/ruby-1.9.1-rc1/README b/lib/ruby-1.9.1-rc1/README new file mode 100644 index 0000000..7e8370e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/README @@ -0,0 +1,114 @@ +* What's Ruby + +Ruby is the interpreted scripting language for quick and +easy object-oriented programming. It has many features to +process text files and to do system management tasks (as in +Perl). It is simple, straight-forward, and extensible. + + +* Features of Ruby + + + Simple Syntax + + *Normal* Object-Oriented features(ex. class, method calls) + + *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method) + + Operator Overloading + + Exception Handling + + Iterators and Closures + + Garbage Collection + + Dynamic Loading of Object files(on some architecture) + + Highly Portable (works on many Unix-like/POSIX compatible platforms + as well as Windows, Mac OS X, BeOS etc.) + cf. http://redmine.ruby-lang.org/wiki/ruby-19/SupportedPlatforms + + +* How to get Ruby + +The Ruby distribution files can be found in the following FTP site: + + ftp://ftp.ruby-lang.org/pub/ruby/ + +The trunk of the Ruby source tree can be checked out with the +following command: + + $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby + +There are some other branches under development. Try the following +command and see the list of branches: + + $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/ + + +* Ruby home-page + +The URL of the Ruby home-page is: + + http://www.ruby-lang.org/ + + +* Mailing list + +There is a mailing list to talk about Ruby. +To subscribe this list, please send the following phrase + + subscribe YourFirstName YourFamilyName +e.g. + subscribe Joseph Smith + +in the mail body (not subject) to the address . + + +* How to compile and install + +This is what you need to do to compile and install Ruby: + + 1. If ./configure does not exist or is older than configure.in, + run autoconf to (re)generate configure. + + 2. Run ./configure, which will generate config.h and Makefile. + + Some C compiler flags may be added by default depending on your + environment. Specify optflags=.. and warnflags=.. as necessary + to override them. + + 3. Edit defines.h if you need. Usually this step will not be needed. + + 4. Remove comment mark(#) before the module names from ext/Setup (or + add module names if not present), if you want to link modules + statically. + + If you don't want to compile non static extension modules + (probably on architectures which does not allow dynamic loading), + remove comment mark from the line "#option nodynamic" in + ext/Setup. + + 5. Run make. + + 6. Optionally, run 'make test' to check whether the compiled Ruby + interpreter works well. If you see the message "test succeeded", + your ruby works as it should (hopefully). + + 7. Run 'make install' + + You may have to be a super user to install ruby. + +If you fail to compile ruby, please send the detailed error report with +the error log and machine/OS type, to help others. + + +* Copying + +See the file COPYING. + + +* The Author + +Feel free to send comments and bug reports to the author. Here is the +author's latest mail address: + + matz@netlab.jp + +------------------------------------------------------- +created at: Thu Aug 3 11:57:36 JST 1995 +Local variables: +mode: indented-text +end: diff --git a/lib/ruby-1.9.1-rc1/README.EXT b/lib/ruby-1.9.1-rc1/README.EXT new file mode 100644 index 0000000..edfbf22 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/README.EXT @@ -0,0 +1,1326 @@ +.\" README.EXT - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995 + +This document explains how to make extension libraries for Ruby. + +1. Basic knowledge + +In C, variables have types and data do not have types. In contrast, +Ruby variables do not have a static type, and data themselves have +types, so data will need to be converted between the languages. + +Data in Ruby are represented by the C type `VALUE'. Each VALUE data +has its data-type. + +To retrieve C data from a VALUE, you need to: + + (1) Identify the VALUE's data type + (2) Convert the VALUE into C data + +Converting to the wrong data type may cause serious problems. + + +1.1 Data-types + +The Ruby interpreter has the following data types: + + T_NIL nil + T_OBJECT ordinary object + T_CLASS class + T_MODULE module + T_FLOAT floating point number + T_STRING string + T_REGEXP regular expression + T_ARRAY array + T_HASH associative array + T_STRUCT (Ruby) structure + T_BIGNUM multi precision integer + T_FIXNUM Fixnum(31bit or 63bit integer) + T_COMPLEX complex number + T_RATIONAL rational number + T_FILE IO + T_TRUE true + T_FALSE false + T_DATA data + T_SYMBOL symbol + +In addition, there are several other types used internally: + + T_ICLASS + T_MATCH + T_UNDEF + T_NODE + T_ZOMBIE + +Most of the types are represented by C structures. + +1.2 Check Data Type of the VALUE + +The macro TYPE() defined in ruby.h shows the data type of the VALUE. +TYPE() returns the constant number T_XXXX described above. To handle +data types, your code will look something like this: + + switch (TYPE(obj)) { + case T_FIXNUM: + /* process Fixnum */ + break; + case T_STRING: + /* process String */ + break; + case T_ARRAY: + /* process Array */ + break; + default: + /* raise exception */ + rb_raise(rb_eTypeError, "not valid value"); + break; + } + +There is the data-type check function + + void Check_Type(VALUE value, int type) + +which raises an exception if the VALUE does not have the type +specified. + +There are also faster check macros for fixnums and nil. + + FIXNUM_P(obj) + NIL_P(obj) + +1.3 Convert VALUE into C data + +The data for type T_NIL, T_FALSE, T_TRUE are nil, true, false +respectively. They are singletons for the data type. + +The T_FIXNUM data is a 31bit length fixed integer (63bit length on +some machines), which can be converted to a C integer by using the +FIX2INT() macro or FIX2LONG(). Though you have to check that the +data is really FIXNUM before using them, they are faster. FIX2LONG() +never raises exceptions, but FIX2INT() raises RangeError if the +result is bigger or smaller than the size of int. +There are also NUM2INT() and NUM2LONG() which converts any Ruby +numbers into C integers. These macros includes a type check, +so an exception will be raised if the conversion failed. NUM2DBL() +can be used to retrieve the double float value in the same way. + +In version 1.7 or later it is recommended that you use the new macros +StringValue() and StringValuePtr() to get a char* from a VALUE. +StringValue(var) replaces var's value with the result of "var.to_str()". +StringValuePtr(var) does same replacement and returns char* +representation of var. These macros will skip the replacement if var +is a String. Notice that the macros take only the lvalue as their +argument, to change the value of var in place. + +You can also use the macro named StringValueCStr(). This is just +like StringValuePtr(), but always add nul character at the end of +the result. If the result contains nul character, this macro causes +the ArgumentError exception. +StringValuePtr() doesn't gurantee to exist nul at the end of the +result, and the result may contain nul. + +In version 1.6 or earlier, STR2CSTR() was used to do the same thing +but now it is deprecated in version 1.7, because STR2CSTR() has a risk +of a dangling pointer problem in the to_str() implicit conversion. + +Other data types have corresponding C structures, e.g. struct RArray +for T_ARRAY etc. The VALUE of the type which has the corresponding +structure can be cast to retrieve the pointer to the struct. The +casting macro will be of the form RXXXX for each data type; for +instance, RARRAY(obj). See "ruby.h". + +There are some accessing macros for structure members, for example +`RSTRING_LEN(s)' to to get the size of the Ruby String object. The +allocated region can be accessed by `RSTRING_PTR(str). For arrays, use +`RARRAY_LEN(ary) and `RARRAY_PTR(ary) respectively. + +Notice: Do not change the value of the structure directly, unless you +are responsible for the result. This ends up being the cause of +interesting bugs. + +1.4 Convert C data into VALUE + +To convert C data to Ruby values: + + * FIXNUM + + left shift 1 bit, and turn on LSB. + + * Other pointer values + + cast to VALUE. + +You can determine whether a VALUE is pointer or not by checking its LSB. + +Notice Ruby does not allow arbitrary pointer values to be a VALUE. They +should be pointers to the structures which Ruby knows about. The known +structures are defined in . + +To convert C numbers to Ruby values, use these macros. + + INT2FIX() for integers within 31bits. + INT2NUM() for arbitrary sized integer. + +INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM +range, but is a bit slower. + +1.5 Manipulating Ruby data + +As I already mentioned, it is not recommended to modify an object's +internal structure. To manipulate objects, use the functions supplied +by the Ruby interpreter. Some (not all) of the useful functions are +listed below: + + String functions + + rb_str_new(const char *ptr, long len) + + Creates a new Ruby string. + + rb_str_new2(const char *ptr) + rb_str_new_cstr(const char *ptr) + + Creates a new Ruby string from a C string. This is equivalent to + rb_str_new(ptr, strlen(ptr)). + + rb_tainted_str_new(const char *ptr, long len) + + Creates a new tainted Ruby string. Strings from external data + sources should be tainted. + + rb_tainted_str_new2(const char *ptr) + rb_tainted_str_new_cstr(const char *ptr) + + Creates a new tainted Ruby string from a C string. + + rb_sprintf(const char *format, ...) + rb_vsprintf(const char *format, va_list ap) + + Creates a new Ruby string with printf(3) format. + + rb_str_cat(VALUE str, const char *ptr, long len) + + Appends len bytes of data from ptr to the Ruby string. + + rb_str_cat2(VALUE str, const char* ptr) + + Appends C string ptr to Ruby string str. This function is + equivalent to rb_str_cat(str, ptr, strlen(ptr)). + + rb_str_catf(VALUE str, const char* format, ...) + rb_str_vcatf(VALUE str, const char* format, va_list ap) + + Appends C string format and successive arguments to Ruby string + str according to a printf-like format. These functions are + equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and + rb_str_cat2(str, rb_vsprintf(format, ap)), respectively. + + rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) + + Creates a new Ruby string with the specified encoding. + + rb_usascii_str_new(const char *ptr, long len) + rb_usascii_str_new_cstr(const char *ptr) + + Creates a new Ruby string with encoding US-ASCII. + + Array functions + + rb_ary_new() + + Creates an array with no elements. + + rb_ary_new2(long len) + + Creates an array with no elements, allocating internal buffer + for len elements. + + rb_ary_new3(long n, ...) + + Creates an n-element array from the arguments. + + rb_ary_new4(long n, VALUE *elts) + + Creates an n-element array from a C array. + + rb_ary_to_ary(VALUE obj) + + Converts the object into an array. + Equivalent to Object#to_ary. + + There are many functions to operate an array. + They may dump core if other types are given. + + rb_ary_aref(argc, VALUE *argv, VALUE ary) + + Equivaelent to Array#[]. + + rb_ary_entry(VALUE ary, long offset) + + ary[offset] + + rb_ary_subseq(VALUE ary, long beg, long len) + + ary[beg, len] + + rb_ary_push(VALUE ary, VALUE val) + rb_ary_pop(VALUE ary) + rb_ary_shift(VALUE ary) + rb_ary_unshift(VALUE ary, VALUE val) + + +2. Extending Ruby with C + +2.1 Adding new features to Ruby + +You can add new features (classes, methods, etc.) to the Ruby +interpreter. Ruby provides APIs for defining the following things: + + * Classes, Modules + * Methods, Singleton Methods + * Constants + +2.1.1 Class/module definition + +To define a class or module, use the functions below: + + VALUE rb_define_class(const char *name, VALUE super) + VALUE rb_define_module(const char *name) + +These functions return the newly created class or module. You may +want to save this reference into a variable to use later. + +To define nested classes or modules, use the functions below: + + VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super) + VALUE rb_define_module_under(VALUE outer, const char *name) + +2.1.2 Method/singleton method definition + +To define methods or singleton methods, use these functions: + + void rb_define_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + + void rb_define_singleton_method(VALUE object, const char *name, + VALUE (*func)(), int argc) + +The `argc' represents the number of the arguments to the C function, +which must be less than 17. But I doubt you'll need that many. + +If `argc' is negative, it specifies the calling sequence, not number of +the arguments. + +If argc is -1, the function will be called as: + + VALUE func(int argc, VALUE *argv, VALUE obj) + +where argc is the actual number of arguments, argv is the C array of +the arguments, and obj is the receiver. + +If argc is -2, the arguments are passed in a Ruby array. The function +will be called like: + + VALUE func(VALUE obj, VALUE args) + +where obj is the receiver, and args is the Ruby array containing +actual arguments. + +There are some more functions to define methods. One takes an ID +as the name of method to be defined. See 2.2.2 for IDs. + + void rb_define_method_id(VALUE klass, ID name, + VALUE (*func)(ANYARGS), int argc) + +There are two functions to define private/protected methods: + + void rb_define_private_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + void rb_define_protected_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + +At last, rb_define_module_funcion defines a module functions, +which are private AND singleton methods of the module. +For example, sqrt is the module function defined in Math module. +It can be called in the following way: + + Math.sqrt(4) + +or + + include Math + sqrt(4) + +To define module functions, use: + + void rb_define_module_function(VALUE module, const char *name, + VALUE (*func)(), int argc) + +Oh, in addition, function-like methods, which are private methods defined +in the Kernel module, can be defined using: + + void rb_define_global_function(const char *name, VALUE (*func)(), int argc) + +To define an alias for the method, + + void rb_define_alias(VALUE module, const char* new, const char* old); + +To define an reader/writer to an attribute, + + void rb_define_attr(VALUE klass, const char *name, int read, int write) + +To define and undefine the `allocate' class method, + + void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass)); + void rb_undef_alloc_func(VALUE klass); + +func have to take the klass as the argument and return a newly +allocated instance. This instance should be empty as possible, +without any expensive (including external) resources. + +2.1.3 Constant definition + +We have 2 functions to define constants: + + void rb_define_const(VALUE klass, const char *name, VALUE val) + void rb_define_global_const(const char *name, VALUE val) + +The former is to define a constant under specified class/module. The +latter is to define a global constant. + +2.2 Use Ruby features from C + +There are several ways to invoke Ruby's features from C code. + +2.2.1 Evaluate Ruby Programs in a String + +The easiest way to use Ruby's functionality from a C program is to +evaluate the string as Ruby program. This function will do the job: + + VALUE rb_eval_string(const char *str) + +Evaluation is done under the current context, thus current local variables +of the innermost method (which is defined by Ruby) can be accessed. + +Note that the evaluation can raise an exception. There is a safer +function: + + VALUE rb_eval_string_protect(const char *str, int *state) + +It returns nil when an error occur. And *state is zero if str was +successfully evaluated, or nonzero otherwise. + + +2.2.2 ID or Symbol + +You can invoke methods directly, without parsing the string. First I +need to explain about ID. ID is the integer number to represent +Ruby's identifiers such as variable names. The Ruby data type +corresponding to ID is Symbol. It can be accessed from Ruby in the +form: + + :Identifier +or + :"any kind of string" + +You can get the ID value from a string within C code by using + + rb_intern(const char *name) + +You can retrieve ID from Ruby object (Symbol or String) given as an +argument by using + + rb_to_id(VALUE symbol) + +You can convert C ID to Ruby Symbol by using + + VALUE ID2SYM(ID id) + +and to convert Ruby Symbol object to ID, use + + ID SYM2ID(VALUE symbol) + +2.2.3 Invoke Ruby method from C + +To invoke methods directly, you can use the function below + + VALUE rb_funcall(VALUE recv, ID mid, int argc, ...) + +This function invokes a method on the recv, with the method name +specified by the symbol mid. + +2.2.4 Accessing the variables and constants + +You can access class variables and instance variables using access +functions. Also, global variables can be shared between both +environments. There's no way to access Ruby's local variables. + +The functions to access/modify instance variables are below: + + VALUE rb_ivar_get(VALUE obj, ID id) + VALUE rb_ivar_set(VALUE obj, ID id, VALUE val) + +id must be the symbol, which can be retrieved by rb_intern(). + +To access the constants of the class/module: + + VALUE rb_const_get(VALUE obj, ID id) + +See 2.1.3 for defining new constant. + +3. Information sharing between Ruby and C + +3.1 Ruby constants that C can be accessed from C + +The following Ruby constants can be referred from C. + + Qtrue + Qfalse + +Boolean values. Qfalse is false in C also (i.e. 0). + + Qnil + +Ruby nil in C scope. + +3.2 Global variables shared between C and Ruby + +Information can be shared between the two environments using shared global +variables. To define them, you can use functions listed below: + + void rb_define_variable(const char *name, VALUE *var) + +This function defines the variable which is shared by both environments. +The value of the global variable pointed to by `var' can be accessed +through Ruby's global variable named `name'. + +You can define read-only (from Ruby, of course) variables using the +function below. + + void rb_define_readonly_variable(const char *name, VALUE *var) + +You can defined hooked variables. The accessor functions (getter and +setter) are called on access to the hooked variables. + + void rb_define_hooked_variable(const char *name, VALUE *var, + VALUE (*getter)(), void (*setter)()) + +If you need to supply either setter or getter, just supply 0 for the +hook you don't need. If both hooks are 0, rb_define_hooked_variable() +works just like rb_define_variable(). + +The prototypes of the getter and setter functions are as follows: + + VALUE (*getter)(ID id, VALUE *var); + void (*setter)(VALUE val, ID id, VALUE *var); + + +Also you can define a Ruby global variable without a corresponding C +variable. The value of the variable will be set/get only by hooks. + + void rb_define_virtual_variable(const char *name, + VALUE (*getter)(), void (*setter)()) + +The prototypes of the getter and setter functions are as follows: + + VALUE (*getter)(ID id); + void (*setter)(VALUE val, ID id); + + +3.3 Encapsulate C data into a Ruby object + +To wrap and objectify a C pointer as a Ruby object (so called +DATA), use Data_Wrap_Struct(). + + Data_Wrap_Struct(klass, mark, free, ptr) + +Data_Wrap_Struct() returns a created DATA object. The klass argument +is the class for the DATA object. The mark argument is the function +to mark Ruby objects pointed by this data. The free argument is the +function to free the pointer allocation. If this is -1, the pointer +will be just freed. The functions mark and free will be called from +garbage collector. + +These mark / free functions are invoked during GC execution. No +object allocations are allowed during it, so do not allocate ruby +objects inside them. + +You can allocate and wrap the structure in one step. + + Data_Make_Struct(klass, type, mark, free, sval) + +This macro returns an allocated Data object, wrapping the pointer to +the structure, which is also allocated. This macro works like: + + (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval)) + +Arguments klass, mark, and free work like their counterparts in +Data_Wrap_Struct(). A pointer to the allocated structure will be +assigned to sval, which should be a pointer of the type specified. + +To retrieve the C pointer from the Data object, use the macro +Data_Get_Struct(). + + Data_Get_Struct(obj, type, sval) + +A pointer to the structure will be assigned to the variable sval. + +See the example below for details. + +4. Example - Creating dbm extension + +OK, here's the example of making an extension library. This is the +extension to access DBMs. The full source is included in the ext/ +directory in the Ruby's source tree. + +(1) make the directory + + % mkdir ext/dbm + +Make a directory for the extension library under ext directory. + +(2) design the library + +You need to design the library features, before making it. + +(3) write C code. + +You need to write C code for your extension library. If your library +has only one source file, choosing ``LIBRARY.c'' as a file name is +preferred. On the other hand, in case your library has multiple source +files, avoid choosing ``LIBRARY.c'' for a file name. It may conflict +with an intermediate file ``LIBRARY.o'' on some platforms. + +Ruby will execute the initializing function named ``Init_LIBRARY'' in +the library. For example, ``Init_dbm()'' will be executed when loading +the library. + +Here's the example of an initializing function. + +-- +void +Init_dbm(void) +{ + /* define DBM class */ + cDBM = rb_define_class("DBM", rb_cObject); + /* DBM includes Enumerate module */ + rb_include_module(cDBM, rb_mEnumerable); + + /* DBM has class method open(): arguments are received as C array */ + rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1); + + /* DBM instance method close(): no args */ + rb_define_method(cDBM, "close", fdbm_close, 0); + /* DBM instance method []: 1 argument */ + rb_define_method(cDBM, "[]", fdbm_fetch, 1); + : + + /* ID for a instance variable to store DBM data */ + id_dbm = rb_intern("dbm"); +} +-- + +The dbm extension wraps the dbm struct in the C environment using +Data_Make_Struct. + +-- +struct dbmdata { + int di_size; + DBM *di_dbm; +}; + + +obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp); +-- + +This code wraps the dbmdata structure into a Ruby object. We avoid +wrapping DBM* directly, because we want to cache size information. + +To retrieve the dbmdata structure from a Ruby object, we define the +following macro: + +-- +#define GetDBM(obj, dbmp) {\ + Data_Get_Struct(obj, struct dbmdata, dbmp);\ + if (dbmp->di_dbm == 0) closed_dbm();\ +} +-- + +This sort of complicated macro does the retrieving and close checking for +the DBM. + +There are three kinds of way to receive method arguments. First, +methods with a fixed number of arguments receive arguments like this: + +-- +static VALUE +fdbm_delete(VALUE obj, VALUE keystr) +{ + : +} +-- + +The first argument of the C function is the self, the rest are the +arguments to the method. + +Second, methods with an arbitrary number of arguments receive +arguments like this: + +-- +static VALUE +fdbm_s_open(int argc, VALUE *argv, VALUE klass) +{ + : + if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) { + mode = 0666; /* default value */ + } + : +} +-- + +The first argument is the number of method arguments, the second +argument is the C array of the method arguments, and the third +argument is the receiver of the method. + +You can use the function rb_scan_args() to check and retrieve the +arguments. For example, "11" means that the method requires at least one +argument, and at most receives two arguments. + +Methods with an arbitrary number of arguments can receive arguments +by Ruby's array, like this: + +-- +static VALUE +fdbm_indexes(VALUE obj, VALUE args) +{ + : +} +-- + +The first argument is the receiver, the second one is the Ruby array +which contains the arguments to the method. + +** Notice + +GC should know about global variables which refer to Ruby's objects, but +are not exported to the Ruby world. You need to protect them by + + void rb_global_variable(VALUE *var) + +(4) prepare extconf.rb + +If the file named extconf.rb exists, it will be executed to generate +Makefile. + +extconf.rb is the file for checking compilation conditions etc. You +need to put + + require 'mkmf' + +at the top of the file. You can use the functions below to check +various conditions. + + have_library(lib, func): check whether library containing function exists. + have_func(func, header): check whether function exists + have_header(header): check whether header file exists + create_makefile(target): generate Makefile + +The value of the variables below will affect the Makefile. + + $CFLAGS: included in CFLAGS make variable (such as -O) + $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D) + $LDFLAGS: included in LDFLAGS make variable (such as -L) + $objs: list of object file names + +Normally, the object files list is automatically generated by searching +source files, but you must define them explicitly if any sources will +be generated while building. + +If a compilation condition is not fulfilled, you should not call +``create_makefile''. The Makefile will not be generated, compilation will +not be done. + +(5) prepare depend (optional) + +If the file named depend exists, Makefile will include that file to +check dependencies. You can make this file by invoking + + % gcc -MM *.c > depend + +It's harmless. Prepare it. + +(6) generate Makefile + +Try generating the Makefile by: + + ruby extconf.rb + +If the library should be installed under vendor_ruby directory +instead of site_ruby directory, use --vendor option as follows. + + ruby extconf.rb --vendor + +You don't need this step if you put the extension library under the ext +directory of the ruby source tree. In that case, compilation of the +interpreter will do this step for you. + +(7) make + +Type + + make + +to compile your extension. You don't need this step either if you have +put the extension library under the ext directory of the ruby source tree. + +(8) debug + +You may need to rb_debug the extension. Extensions can be linked +statically by adding the directory name in the ext/Setup file so that +you can inspect the extension with the debugger. + +(9) done, now you have the extension library + +You can do anything you want with your library. The author of Ruby +will not claim any restrictions on your code depending on the Ruby API. +Feel free to use, modify, distribute or sell your program. + +Appendix A. Ruby source files overview + +ruby language core + + class.c : classes and modules + error.c : exception classes and exception mechanism + gc.c : memory management + load.c : library loading + object.c : objects + variable.c : variables and constants + +ruby syntax parser + parse.y + -> parse.c : automatically generated + keywords : reserved keywords + -> lex.c : automatically generated + +ruby evaluator (a.k.a. YARV) + blockinlining.c + compile.c + eval.c + eval_error.c + eval_jump.c + eval_safe.c + insns.def : definition of VM instructions + iseq.c : implementation of VM::ISeq + thread.c : thread management and context swiching + thread_win32.c : thread implementation + thread_pthread.c : ditto + vm.c + vm_dump.c + vm_eval.c + vm_exec.c + vm_insnhelper.c + vm_method.c + + opt_insns_unif.def : instruction unification + opt_operand.def : definitions for optimization + + -> insn*.inc : automatically generated + -> opt*.inc : automatically generated + -> vm.inc : automatically generated + +regular expression engine (oniguruma) + regex.c + regcomp.c + regenc.c + regerror.c + regexec.c + regparse.c + regsyntax.c + +utility functions + + debug.c : debug symbols for C debuggger + dln.c : dynamic loading + st.c : general purpose hash table + strftime.c : formatting times + util.c : misc utilities + +ruby interpreter implementation + + dmyext.c + dmydln.c + dmyencoding.c + id.c + inits.c + main.c + ruby.c + version.c + + gem_prelude.rb + prelude.rb + + +class library + + array.c : Array + bignum.c : Bignum + compar.c : Comparable + complex.c : Complex + cont.c : Fiber, Continuation + dir.c : Dir + enum.c : Enumerable + enumerator.c : Enumerator + file.c : File + hash.c : Hash + io.c : IO + marshal.c : Marshal + math.c : Math + numeric.c : Numeric, Integer, Fixnum, Float + pack.c : Array#pack, String#unpack + proc.c : Binding, Proc + process.c : Process + random.c : random number + range.c : Range + rational.c : Rational + re.c : Regexp, MatchData + signal.c : Signal + sprintf.c : + string.c : String + struct.c : Struct + time.c : Time + + defs/knwon_errors.def : Errno::* exception classes + -> known_errors.inc : automatically generated + +multilingualization + encoding.c : Encoding + transcode.c : Encoding::Converter + enc/*.c : encoding classes + enc/trans/* : codepoint mapping tables + +goruby interpreter implementation + + goruby.c + golf_prelude.rb : goruby specific libraries. + -> golf_prelude.c : automatically generated + + +Appendix B. Ruby extension API reference + +** Types + + VALUE + +The type for the Ruby object. Actual structures are defined in ruby.h, +such as struct RString, etc. To refer the values in structures, use +casting macros like RSTRING(obj). + +** Variables and constants + + Qnil + +const: nil object + + Qtrue + +const: true object(default true value) + + Qfalse + +const: false object + +** C pointer wrapping + + Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) + +Wrap a C pointer into a Ruby object. If object has references to other +Ruby objects, they should be marked by using the mark function during +the GC process. Otherwise, mark should be 0. When this object is no +longer referred by anywhere, the pointer will be discarded by free +function. + + Data_Make_Struct(klass, type, mark, free, sval) + +This macro allocates memory using malloc(), assigns it to the variable +sval, and returns the DATA encapsulating the pointer to memory region. + + Data_Get_Struct(data, type, sval) + +This macro retrieves the pointer value from DATA, and assigns it to +the variable sval. + +** Checking data types + +TYPE(value) +FIXNUM_P(value) +NIL_P(value) +void Check_Type(VALUE value, int type) +void Check_SafeStr(VALUE value) + +** Data type conversion + +FIX2INT(value) +FIX2LONG(value) +INT2FIX(i) +NUM2INT(value) +NUM2LONG(value) +INT2NUM(i) +NUM2DBL(value) +rb_float_new(f) +StringValue(value) +StringValuePtr(value) +StringValueCStr(value) +rb_str_new2(s) + +** defining class/module + + VALUE rb_define_class(const char *name, VALUE super) + +Defines a new Ruby class as a subclass of super. + + VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) + +Creates a new Ruby class as a subclass of super, under the module's +namespace. + + VALUE rb_define_module(const char *name) + +Defines a new Ruby module. + + VALUE rb_define_module_under(VALUE module, const char *name) + +Defines a new Ruby module under the module's namespace. + + void rb_include_module(VALUE klass, VALUE module) + +Includes module into class. If class already includes it, just +ignored. + + void rb_extend_object(VALUE object, VALUE module) + +Extend the object with the module's attributes. + +** Defining Global Variables + + void rb_define_variable(const char *name, VALUE *var) + +Defines a global variable which is shared between C and Ruby. If name +contains a character which is not allowed to be part of the symbol, +it can't be seen from Ruby programs. + + void rb_define_readonly_variable(const char *name, VALUE *var) + +Defines a read-only global variable. Works just like +rb_define_variable(), except the defined variable is read-only. + + void rb_define_virtual_variable(const char *name, + VALUE (*getter)(), VALUE (*setter)()) + +Defines a virtual variable, whose behavior is defined by a pair of C +functions. The getter function is called when the variable is +referenced. The setter function is called when the variable is set to a +value. The prototype for getter/setter functions are: + + VALUE getter(ID id) + void setter(VALUE val, ID id) + +The getter function must return the value for the access. + + void rb_define_hooked_variable(const char *name, VALUE *var, + VALUE (*getter)(), VALUE (*setter)()) + +Defines hooked variable. It's a virtual variable with a C variable. +The getter is called as + + VALUE getter(ID id, VALUE *var) + +returning a new value. The setter is called as + + void setter(VALUE val, ID id, VALUE *var) + +GC requires C global variables which hold Ruby values to be marked. + + void rb_global_variable(VALUE *var) + +Tells GC to protect these variables. + +** Constant Definition + + void rb_define_const(VALUE klass, const char *name, VALUE val) + +Defines a new constant under the class/module. + + void rb_define_global_const(const char *name, VALUE val) + +Defines a global constant. This is just the same as + + rb_define_const(cKernal, name, val) + +** Method Definition + + rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + +Defines a method for the class. func is the function pointer. argc +is the number of arguments. if argc is -1, the function will receive +3 arguments: argc, argv, and self. if argc is -2, the function will +receive 2 arguments, self and args, where args is a Ruby array of +the method arguments. + + rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + +Defines a private method for the class. Arguments are same as +rb_define_method(). + + rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + +Defines a singleton method. Arguments are same as rb_define_method(). + + rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) + +Retrieve argument from argc, argv. The fmt is the format string for +the arguments, such as "12" for 1 non-optional argument, 2 optional +arguments. If `*' appears at the end of fmt, it means the rest of +the arguments are assigned to the corresponding variable, packed in +an array. + +** Invoking Ruby method + + VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) + +Invokes a method. To retrieve mid from a method name, use rb_intern(). + + VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) + +Invokes a method, passing arguments by an array of values. + + VALUE rb_eval_string(const char *str) + +Compiles and executes the string as a Ruby program. + + ID rb_intern(const char *name) + +Returns ID corresponding to the name. + + char *rb_id2name(ID id) + +Returns the name corresponding ID. + + char *rb_class2name(VALUE klass) + +Returns the name of the class. + + int rb_respond_to(VALUE object, ID id) + +Returns true if the object responds to the message specified by id. + +** Instance Variables + + VALUE rb_iv_get(VALUE obj, const char *name) + +Retrieve the value of the instance variable. If the name is not +prefixed by `@', that variable shall be inaccessible from Ruby. + + VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) + +Sets the value of the instance variable. + +** Control Structure + + VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) + +Calls the function func1, supplying func2 as the block. func1 will be +called with the argument arg1. func2 receives the value from yield as +the first argument, arg2 as the second argument. + + VALUE rb_yield(VALUE val) + +Evaluates the block with value val. + + VALUE rb_rescue(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) + +Calls the function func1, with arg1 as the argument. If an exception +occurs during func1, it calls func2 with arg2 as the argument. The +return value of rb_rescue() is the return value from func1 if no +exception occurs, from func2 otherwise. + + VALUE rb_ensure(VALUE (*func1)(), void *arg1, void (*func2)(), void *arg2) + +Calls the function func1 with arg1 as the argument, then calls func2 +with arg2 if execution terminated. The return value from +rb_ensure() is that of func1. + +** Exceptions and Errors + + void rb_warn(const char *fmt, ...) + +Prints a warning message according to a printf-like format. + + void rb_warning(const char *fmt, ...) + +Prints a warning message according to a printf-like format, if +$VERBOSE is true. + +void rb_raise(rb_eRuntimeError, const char *fmt, ...) + +Raises RuntimeError. The fmt is a format string just like printf(). + + void rb_raise(VALUE exception, const char *fmt, ...) + +Raises a class exception. The fmt is a format string just like printf(). + + void rb_fatal(const char *fmt, ...) + +Raises a fatal error, terminates the interpreter. No exception handling +will be done for fatal errors, but ensure blocks will be executed. + + void rb_bug(const char *fmt, ...) + +Terminates the interpreter immediately. This function should be +called under the situation caused by the bug in the interpreter. No +exception handling nor ensure execution will be done. + +** Initialize and Start the Interpreter + +The embedding API functions are below (not needed for extension libraries): + + void ruby_init() + +Initializes the interpreter. + + void ruby_options(int argc, char **argv) + +Process command line arguments for the interpreter. + + void ruby_run() + +Starts execution of the interpreter. + + void ruby_script(char *name) + +Specifies the name of the script ($0). + +** Hooks for the Interpreter Events + + void rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events) + +Adds a hook function for the specified interpreter events. +events should be Or'ed value of: + + RUBY_EVENT_LINE + RUBY_EVENT_CLASS + RUBY_EVENT_END + RUBY_EVENT_CALL + RUBY_EVENT_RETURN + RUBY_EVENT_C_CALL + RUBY_EVENT_C_RETURN + RUBY_EVENT_RAISE + RUBY_EVENT_ALL + +The definition of rb_event_hook_func_t is below: + + typedef void (*rb_event_hook_func_t)(rb_event_t event, NODE *node, + VALUE self, ID id, VALUE klass) + + int rb_remove_event_hook(rb_event_hook_func_t func) + +Removes the specified hook function. + +Appendix C. Functions Available in extconf.rb + +These functions are available in extconf.rb: + + have_macro(macro, headers) + +Checks whether macro is defined with header. Returns true if the macro +is defined. + + have_library(lib, func) + +Checks whether the library exists, containing the specified function. +Returns true if the library exists. + + find_library(lib, func, path...) + +Checks whether a library which contains the specified function exists in +path. Returns true if the library exists. + + have_func(func, header) + +Checks whether func exists with header. Returns true if the function +exists. To check functions in an additional library, you need to +check that library first using have_library(). + + have_var(var, header) + +Checks whether var exists with header. Returns true if the variable +exists. To check variables in an additional library, you need to +check that library first using have_library(). + + have_header(header) + +Checks whether header exists. Returns true if the header file exists. + + find_header(header, path...) + +Checks whether header exists in path. Returns true if the header file +exists. + + have_struct_member(type, member, header) + +Checks whether type has member with header. Returns true if the type +is defined and has the member. + + have_type(type, header, opt) + +Checks whether type is defined with header. Returns true if the type +is defined. + + check_sizeof(type, header) + +Checks the size of type in char with header. Returns the size if the +type is defined, otherwise nil. + + create_makefile(target) + +Generates the Makefile for the extension library. If you don't invoke +this method, the compilation will not be done. + + find_executable(bin, path) + +Finds command in path, which is File::PATH_SEPARATOR-separated list of +directories. If path is nil or omitted, environment variable PATH +will be used. Returns the path name of the command if it is found, +otherwise nil. + + with_config(withval[, default=nil]) + +Parses the command line options and returns the value specified by +--with-. + + enable_config(config, *defaults) + disable_config(config, *defaults) + +Parses the command line options for boolean. Returns true if +--enable- is given, or false if --disable- is given. +Otherwise, yields defaults to the given block and returns the result +if it is called with a block, or returns defaults. + + dir_config(target[, default_dir]) + dir_config(target[, default_include, default_lib]) + +Parses the command line options and adds the directories specified by +--with--dir, --with--include, and/or --with--lib +to $CFLAGS and/or $LDFLAGS. --with--dir=/path is equivalent to +--with--include=/path/include --with--lib=/path/lib. +Returns an array of the added directories ([include_dir, lib_dir]). + + pkg_config(pkg) + +Obtains the information for pkg by pkg-config command. The actual +command name can be overridden by --with-pkg-config command line +option. + +/* + * Local variables: + * fill-column: 70 + * end: + */ diff --git a/lib/ruby-1.9.1-rc1/README.EXT.ja b/lib/ruby-1.9.1-rc1/README.EXT.ja new file mode 100644 index 0000000..9a8a4fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/README.EXT.ja @@ -0,0 +1,1447 @@ +.\" README.EXT.ja - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995 + +Ruby¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Îºî¤êÊý¤òÀâÌÀ¤·¤Þ¤¹¡¥ + +1¡¥´ðÁÃÃμ± + +C¤ÎÊÑ¿ô¤Ë¤Ï·¿¤¬¤¢¤ê¡¤¥Ç¡¼¥¿¤Ë¤Ï·¿¤¬¤¢¤ê¤Þ¤»¤ó¡¥¤Ç¤¹¤«¤é¡¤¤¿ +¤È¤¨¤Ð¥Ý¥¤¥ó¥¿¤òint¤ÎÊÑ¿ô¤ËÂåÆþ¤¹¤ë¤È¡¤¤½¤ÎÃͤÏÀ°¿ô¤È¤·¤Æ¼è +¤ê°·¤ï¤ì¤Þ¤¹¡¥µÕ¤ËRuby¤ÎÊÑ¿ô¤Ë¤Ï·¿¤¬¤Ê¤¯¡¤¥Ç¡¼¥¿¤Ë·¿¤¬¤¢¤ê¤Þ +¤¹¡¥¤³¤Î°ã¤¤¤Î¤¿¤á¡¤C¤ÈRuby¤ÏÁê¸ß¤ËÊÑ´¹¤·¤Ê¤±¤ì¤Ð¡¤¤ª¸ß¤¤¤Î +¥Ç¡¼¥¿¤ò¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡¥ + +Ruby¤Î¥Ç¡¼¥¿¤ÏVALUE¤È¤¤¤¦C¤Î·¿¤Çɽ¸½¤µ¤ì¤Þ¤¹¡¥VALUE·¿¤Î¥Ç¡¼ +¥¿¤Ï¤½¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ò¼«Ê¬¤ÇÃΤäƤ¤¤Þ¤¹¡¥¤³¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤È +¤¤¤¦¤Î¤Ï¥Ç¡¼¥¿(¥ª¥Ö¥¸¥§¥¯¥È)¤Î¼ÂºÝ¤Î¹½Â¤¤ò°ÕÌ£¤·¤Æ¤¤¤Æ¡¤Ruby +¤Î¥¯¥é¥¹¤È¤Ï¤Þ¤¿°ã¤Ã¤¿¤â¤Î¤Ç¤¹¡¥ + +VALUE¤«¤éC¤Ë¤È¤Ã¤Æ°ÕÌ£¤Î¤¢¤ë¥Ç¡¼¥¿¤ò¼è¤ê½Ð¤¹¤¿¤á¤Ë¤Ï + + (1) VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤òÃΤë + (2) VALUE¤òC¤Î¥Ç¡¼¥¿¤ËÊÑ´¹¤¹¤ë + +¤ÎξÊý¤¬É¬ÍפǤ¹¡¥(1)¤ò˺¤ì¤ë¤È´Ö°ã¤Ã¤¿¥Ç¡¼¥¿¤ÎÊÑ´¹¤¬¹Ô¤ï¤ì +¤Æ¡¤ºÇ°­¥×¥í¥°¥é¥à¤¬core dump¤·¤Þ¤¹¡¥ + +1.1 ¥Ç¡¼¥¿¥¿¥¤¥× + +Ruby¤Ë¤Ï¥æ¡¼¥¶¤¬»È¤¦²ÄǽÀ­¤Î¤¢¤ë°Ê²¼¤Î¥¿¥¤¥×¤¬¤¢¤ê¤Þ¤¹¡¥ + + T_NIL nil + T_OBJECT Ä̾ï¤Î¥ª¥Ö¥¸¥§¥¯¥È + T_CLASS ¥¯¥é¥¹ + T_MODULE ¥â¥¸¥å¡¼¥ë + T_FLOAT ÉâÆ°¾®¿ôÅÀ¿ô + T_STRING ʸ»úÎó + T_REGEXP Àµµ¬É½¸½ + T_ARRAY ÇÛÎó + T_HASH Ï¢ÁÛÇÛÎó + T_STRUCT (Ruby¤Î)¹½Â¤ÂÎ + T_BIGNUM ¿ÇÜĹÀ°¿ô + T_FIXNUM Fixnum(31bit¤Þ¤¿¤Ï63bitĹÀ°¿ô) + T_COMPLEX Ê£ÁÇ¿ô + T_RATIONAL Í­Íý¿ô + T_FILE Æþ½ÐÎÏ + T_TRUE ¿¿ + T_FALSE µ¶ + T_DATA ¥Ç¡¼¥¿ + T_SYMBOL ¥·¥ó¥Ü¥ë + +¤½¤Î¾¤ËÆâÉô¤ÇÍøÍѤµ¤ì¤Æ¤¤¤ë°Ê²¼¤Î¥¿¥¤¥×¤¬¤¢¤ê¤Þ¤¹¡¥ + + T_ICLASS + T_MATCH + T_UNDEF + T_NODE + T_ZOMBIE + +¤Û¤È¤ó¤É¤Î¥¿¥¤¥×¤ÏC¤Î¹½Â¤ÂΤǼÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + +1.2 VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ò¥Á¥§¥Ã¥¯¤¹¤ë + +ruby.h¤Ç¤ÏTYPE()¤È¤¤¤¦¥Þ¥¯¥í¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Æ¡¤VALUE¤Î¥Ç¡¼¥¿ +¥¿¥¤¥×¤òÃΤ뤳¤È¤¬½ÐÍè¤Þ¤¹¡¥TYPE()¥Þ¥¯¥í¤Ï¾å¤Ç¾Ò²ð¤·¤¿T_XXXX +¤Î·Á¼°¤ÎÄê¿ô¤òÊÖ¤·¤Þ¤¹¡¥VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤Ë±þ¤¸¤Æ½èÍý¤¹¤ë +¾ì¹ç¤Ë¤Ï¡¤TYPE()¤ÎÃͤÇʬ´ô¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥ + + switch (TYPE(obj)) { + case T_FIXNUM: + /* FIXNUM¤Î½èÍý */ + break; + case T_STRING: + /* ʸ»úÎó¤Î½èÍý */ + break; + case T_ARRAY: + /* ÇÛÎó¤Î½èÍý */ + break; + default: + /* Îã³°¤òȯÀ¸¤µ¤»¤ë */ + rb_raise(rb_eTypeError, "not valid value"); + break; + } + +¤½¤ì¤È¥Ç¡¼¥¿¥¿¥¤¥×¤ò¥Á¥§¥Ã¥¯¤·¤Æ¡¤Àµ¤·¤¯¤Ê¤±¤ì¤ÐÎã³°¤òȯÀ¸¤¹ +¤ë´Ø¿ô¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + + void Check_Type(VALUE value, int type) + +¤³¤Î´Ø¿ô¤Ïvalue¤¬type¤Ç̵¤±¤ì¤Ð¡¤Îã³°¤òȯÀ¸¤µ¤»¤Þ¤¹¡¥°ú¿ô¤È +¤·¤ÆÍ¿¤¨¤é¤ì¤¿VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤¬Àµ¤·¤¤¤«¤É¤¦¤«¥Á¥§¥Ã¥¯¤¹ +¤ë¤¿¤á¤Ë¤Ï¡¤¤³¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + +FIXNUM¤ÈNIL¤Ë´Ø¤·¤Æ¤Ï¤è¤ê¹â®¤ÊȽÊÌ¥Þ¥¯¥í¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + + FIXNUM_P(obj) + NIL_P(obj) + +1.3 VALUE¤òC¤Î¥Ç¡¼¥¿¤ËÊÑ´¹¤¹¤ë + +¥Ç¡¼¥¿¥¿¥¤¥×¤¬T_NIL¡¤T_FALSE¡¤T_TRUE¤Ç¤¢¤ë»þ¡¤¥Ç¡¼¥¿¤Ï¤½¤ì¤¾ +¤ìnil¡¤false¡¤true¤Ç¤¹¡¥¤³¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ï¤Ò¤È +¤Ä¤º¤Ä¤·¤«Â¸ºß¤·¤Þ¤»¤ó¡¥ + +¥Ç¡¼¥¿¥¿¥¤¥×¤¬T_FIXNUM¤Î»þ¡¤¤³¤ì¤Ï31bit¤Þ¤¿¤Ï63bit¤Î¥µ¥¤¥º¤ò +»ý¤ÄÀ°¿ô¤Ç¤¹¡¥long¤Î¥µ¥¤¥º¤¬32bit¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤¢¤ì¤Ð +31bit¤Ë¡¤long¤Î¥µ¥¤¥º¤¬64bit¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤¢¤ì¤Ð63bit +¤Ë¤Ê¤ê¤Þ¤¹. FIXNUM ¤ò C ¤ÎÀ°¿ô¤ËÊÑ´¹¤¹¤ë¤¿¤á¤Ë¤Ï¥Þ¥¯¥í +¡ÖFIX2INT()¡×¤Þ¤¿¤Ï¡ÖFIX2LONG()¡×¤ò»È¤¤¤Þ¤¹¡¥¤³¤ì¤é¤Î¥Þ¥¯¥í +¤ò»ÈÍѤ¹¤ëºÝ¤Ë¤Ï»öÁ°¤Ë¥Ç¡¼¥¿¥¿¥¤¥×¤¬FIXNUM¤Ç¤¢¤ë¤³¤È¤ò³Îǧ¤¹ +¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤¬¡¢Èæ³ÓŪ¹â®¤ËÊÑ´¹¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥¤Þ +¤¿¡¢¡ÖFIX2LONG()¡×¤ÏÎã³°¤òȯÀ¸¤·¤Þ¤»¤ó¤¬¡¢¡ÖFIX2INT()¡×¤ÏÊÑ +´¹·ë²Ì¤¬int¤Î¥µ¥¤¥º¤Ë¼ý¤Þ¤é¤Ê¤¤¾ì¹ç¤Ë¤ÏÎã³°¤òȯÀ¸¤·¤Þ¤¹¡£ +¤½¤ì¤«¤é¡¤FIXNUM¤Ë¸Â¤é¤ºRuby¤Î¥Ç¡¼¥¿¤òÀ°¿ô¤ËÊÑ´¹¤¹¤ë +¡ÖNUM2INT()¡×¤ª¤è¤Ó¡ÖNUM2LONG()¡×¤È¤¤¤¦¥Þ¥¯¥í¤¬¤¢¤ê¤Þ¤¹¡¥¤³ +¤ì¤é¤Î¥Þ¥¯¥í¤Ï¥Þ¥¯¥í¤Ï¥Ç¡¼¥¿¥¿¥¤¥×¤Î¥Á¥§¥Ã¥¯Ìµ¤·¤Ç»È¤¨¤Þ¤¹ +(À°¿ô¤ËÊÑ´¹¤Ç¤­¤Ê¤¤¾ì¹ç¤Ë¤ÏÎã³°¤¬È¯À¸¤¹¤ë)¡¥Æ±Íͤ˥Á¥§¥Ã¥¯Ìµ +¤Ç»È¤¨¤ëÊÑ´¹¥Þ¥¯¥í¤Ïdouble¤ò¼è¤ê½Ð¤¹¡ÖNUM2DBL()¡×¤¬¤¢¤ê¤Þ¤¹¡¥ + +char* ¤ò¼è¤ê½Ð¤¹¾ì¹ç¡¤version 1.6 °ÊÁ°¤Ç¤Ï¡ÖSTR2CSTR()¡×¤È¤¤ +¤¦¥Þ¥¯¥í¤ò»È¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬¡¤¤³¤ì¤Ï to_str() ¤Ë¤è¤ë°ÅÌۤη¿ÊÑ +´¹·ë²Ì¤¬ GC ¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¤¿¤á¡¤version 1.7 °Ê¹ß¤Ç¤Ï +obsolete ¤È¤Ê¤ê¡¤Âå¤ï¤ê¤Ë StringValue() ¤È StringValuePtr() +¤ò»È¤¦»ö¤ò¿ä¾©¤·¤Æ¤¤¤Þ¤¹¡¥StringValue(var) ¤Ï var ¤¬ String +¤Ç¤¢¤ì¤Ð²¿¤â¤»¤º¡¤¤½¤¦¤Ç¤Ê¤±¤ì¤Ð var ¤ò var.to_str() ¤Î·ë²Ì +¤ËÃÖ¤­´¹¤¨¤ë¥Þ¥¯¥í¡¤StringValuePtr(var) ¤ÏƱÍÍ¤Ë var ¤ò +String ¤ËÃÖ¤­´¹¤¨¤Æ¤«¤é var ¤Î¥Ð¥¤¥ÈÎóɽ¸½¤ËÂФ¹¤ë char* ¤ò +ÊÖ¤¹¥Þ¥¯¥í¤Ç¤¹¡¥var ¤ÎÆâÍƤòľÀÜÃÖ¤­´¹¤¨¤ë½èÍý¤¬Æþ¤ë¤Î¤Ç¡¤ +var ¤Ï lvalue ¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥ +¤Þ¤¿¡¤StringValuePtr() ¤ËÎà»÷¤·¤¿ StringValueCStr() ¤È¤¤¤¦¥Þ +¥¯¥í¤â¤¢¤ê¤Þ¤¹¡¥StringValueCStr(var) ¤Ï var ¤ò String ¤ËÃÖ¤­ +´¹¤¨¤Æ¤«¤é var ¤Îʸ»úÎóɽ¸½¤ËÂФ¹¤ë char* ¤òÊÖ¤·¤Þ¤¹¡¥ÊÖ¤µ¤ì +¤ëʸ»úÎó¤ÎËöÈø¤Ë¤Ï nul ʸ»ú¤¬Éղ䵤ì¤Þ¤¹¡¥¤Ê¤ª¡¤ÅÓÃæ¤Ë nul +ʸ»ú¤¬´Þ¤Þ¤ì¤ë¾ì¹ç¤Ï ArgumentError ¤¬È¯À¸¤·¤Þ¤¹¡¥ +°ìÊý¡¤StringValuePtr() ¤Ç¤Ï¡¤ËöÈø¤Ë nul ʸ»ú¤¬¤¢¤ëÊݾڤϤʤ¯¡¤ +ÅÓÃæ¤Ë nul ʸ»ú¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë²ÄǽÀ­¤â¤¢¤ê¤Þ¤¹¡¥ + +¤½¤ì°Ê³°¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ÏÂбþ¤¹¤ëC¤Î¹½Â¤ÂΤ¬¤¢¤ê¤Þ¤¹¡¥Âбþ¤¹ +¤ë¹½Â¤ÂΤΤ¢¤ëVALUE¤Ï¤½¤Î¤Þ¤Þ¥­¥ã¥¹¥È(·¿ÊÑ´¹)¤¹¤ì¤Ð¹½Â¤ÂΤΠ+¥Ý¥¤¥ó¥¿¤ËÊÑ´¹¤Ç¤­¤Þ¤¹¡¥ + +¹½Â¤ÂΤϡÖstruct RXxxxx¡×¤È¤¤¤¦Ì¾Á°¤Çruby.h¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ +¤¹¡¥Î㤨¤Ðʸ»úÎó¤Ï¡Östruct RString¡×¤Ç¤¹¡¥¼ÂºÝ¤Ë»È¤¦²ÄǽÀ­¤¬ +¤¢¤ë¤Î¤Ïʸ»úÎó¤ÈÇÛÎ󤯤餤¤À¤È»×¤¤¤Þ¤¹¡¥ + +ruby.h¤Ç¤Ï¹½Â¤ÂΤإ­¥ã¥¹¥È¤¹¤ë¥Þ¥¯¥í¤â¡ÖRXXXXX()¡×(Á´ÉôÂçʸ +»ú¤Ë¤·¤¿¤â¤Î)¤È¤¤¤¦Ì¾Á°¤ÇÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹(Îã: RSTRING())¡¥ + +¹½Â¤ÂΤ«¤é¥Ç¡¼¥¿¤ò¼è¤ê½Ð¤¹¥Þ¥¯¥í¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡¥Ê¸»úÎó +str¤ÎŤµ¤òÆÀ¤ë¤¿¤á¤Ë¤Ï¡ÖRSTRING_LEN(str)¡×¤È¤·¡¤Ê¸»úÎóstr¤ò +char*¤È¤·¤ÆÆÀ¤ë¤¿¤á¤Ë¤Ï¡ÖRSTRING_PTR(str)¡×¤È¤·¤Þ¤¹¡¥ÇÛÎó¤Î +¾ì¹ç¤Ë¤Ï¡¤¤½¤ì¤¾¤ì¡ÖRARRAY_LEN(ary)¡×¡¤¡ÖRARRAY_PTR(ary)¡×¤È +¤Ê¤ê¤Þ¤¹¡¥ + +Ruby¤Î¹½Â¤ÂΤòľÀÜ¥¢¥¯¥»¥¹¤¹¤ë»þ¤Ëµ¤¤ò¤Ä¤±¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤³ +¤È¤Ï¡¤ÇÛÎó¤äʸ»úÎó¤Î¹½Â¤ÂΤÎÃæ¿È¤Ï»²¾È¤¹¤ë¤À¤±¤Ç¡¤Ä¾ÀÜÊѹ¹¤· +¤Ê¤¤¤³¤È¤Ç¤¹¡¥Ä¾ÀÜÊѹ¹¤·¤¿¾ì¹ç¡¤¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆâÍƤÎÀ°¹çÀ­¤¬ +¤È¤ì¤Ê¤¯¤Ê¤Ã¤Æ¡¤»×¤ï¤Ì¥Ð¥°¤Î¸¶°ø¤Ë¤Ê¤ê¤Þ¤¹¡¥ + +1.4 C¤Î¥Ç¡¼¥¿¤òVALUE¤ËÊÑ´¹¤¹¤ë + +VALUE¤Î¼ÂºÝ¤Î¹½Â¤¤Ï + + * FIXNUM¤Î¾ì¹ç + + 1bitº¸¥·¥Õ¥È¤·¤Æ¡¤LSB¤òΩ¤Æ¤ë¡¥ + + * ¤½¤Î¾¤Î¥Ý¥¤¥ó¥¿¤Î¾ì¹ç + + ¤½¤Î¤Þ¤ÞVALUE¤Ë¥­¥ã¥¹¥È¤¹¤ë¡¥ + +¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥¤è¤Ã¤Æ¡¤LSB¤ò¥Á¥§¥Ã¥¯¤¹¤ì¤ÐVALUE¤¬FIXNUM¤«¤É +¤¦¤«¤ï¤«¤ë¤ï¤±¤Ç¤¹(¥Ý¥¤¥ó¥¿¤ÎLSB¤¬Î©¤Ã¤Æ¤¤¤Ê¤¤¤³¤È¤ò²¾Äꤷ¤Æ +¤¤¤ë)¡¥ + +¤Ç¤¹¤«¤é¡¤FIXNUM°Ê³°¤ÎRuby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤ÂΤÏñ¤ËVALUE +¤Ë¥­¥ã¥¹¥È¤¹¤ë¤À¤±¤ÇVALUE¤ËÊÑ´¹½ÐÍè¤Þ¤¹¡¥¤¿¤À¤·¡¤Ç¤°Õ¤Î¹½Â¤ +ÂΤ¬VALUE¤Ë¥­¥ã¥¹¥È½ÐÍè¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡¥¥­¥ã¥¹¥È¤¹¤ë¤Î +¤ÏRuby¤ÎÃΤäƤ¤¤ë¹½Â¤ÂÎ(ruby.h¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ëstruct RXxxx +¤Î¤â¤Î)¤À¤±¤Ç¤¹¡¥ + +FIXNUM¤Ë´Ø¤·¤Æ¤ÏÊÑ´¹¥Þ¥¯¥í¤ò·Ðͳ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥C¤ÎÀ°¿ô +¤«¤éVALUE¤ËÊÑ´¹¤¹¤ë¥Þ¥¯¥í¤Ï°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥É¬Íפ˱þ¤¸ +¤Æ»È¤¤Ê¬¤±¤Æ¤¯¤À¤µ¤¤¡¥ + + INT2FIX() ¤â¤È¤ÎÀ°¿ô¤¬31bit¤Þ¤¿¤Ï63bit°ÊÆâ¤Ë¼ý¤Þ¤ë¼«¿® + ¤¬¤¢¤ë»þ + INT2NUM() Ǥ°Õ¤ÎÀ°¿ô¤«¤éVALUE¤Ø + +INT2NUM()¤ÏÀ°¿ô¤¬FIXNUM¤ÎÈϰϤ˼ý¤Þ¤é¤Ê¤¤¾ì¹ç¡¤Bignum¤ËÊÑ´¹ +¤·¤Æ¤¯¤ì¤Þ¤¹(¤¬¡¤¾¯¤·ÃÙ¤¤)¡¥ + +1.5 Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë + +ÀèÄø¤â½Ò¤Ù¤¿Ä̤ꡤRuby¤Î¹½Â¤ÂΤò¥¢¥¯¥»¥¹¤¹¤ë»þ¤ËÆâÍƤι¹¿·¤ò +¹Ô¤¦¤³¤È¤Ï´«¤á¤é¤ì¤Þ¤»¤ó¡¥¤Ç¡¤Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë»þ¤Ë¤Ï +Ruby¤¬ÍÑ°Õ¤·¤Æ¤¤¤ë´Ø¿ô¤òÍѤ¤¤Æ¤¯¤À¤µ¤¤¡¥ + +¤³¤³¤Ç¤Ï¤â¤Ã¤È¤â»È¤ï¤ì¤ë¤Ç¤¢¤í¤¦Ê¸»úÎó¤ÈÇÛÎó¤ÎÀ¸À®/Áàºî¤ò¹Ô +¤¤´Ø¿ô¤ò¤¢¤²¤Þ¤¹(Á´Éô¤Ç¤Ï¤Ê¤¤¤Ç¤¹)¡¥ + + ʸ»úÎó¤ËÂФ¹¤ë´Ø¿ô + + rb_str_new(const char *ptr, long len) + + ¿·¤·¤¤Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_str_new2(const char *ptr) + rb_str_new_cstr(const char *ptr) + + C¤Îʸ»úÎ󤫤éRuby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥¤³¤Î´Ø¿ô¤Îµ¡Ç½¤Ï + rb_str_new(ptr, strlen(ptr))¤ÈƱÅù¤Ç¤¢¤ë¡¥ + + rb_tainted_str_new(const char *ptr, long len) + rb_tainted_str_new_cstr(const char *ptr) + + ±øÀ÷¥Þ¡¼¥¯¤¬Éղ䵤줿¿·¤·¤¤Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥³°Éô + ¤«¤é¤Î¥Ç¡¼¥¿¤Ë´ð¤Å¤¯Ê¸»úÎó¤Ë¤Ï±øÀ÷¥Þ¡¼¥¯¤¬Éղ䵤ì¤ë¤Ù¤­ + ¤Ç¤¢¤ë¡¥ + + rb_tainted_str_new2(const char *ptr) + + C¤Îʸ»úÎ󤫤é±øÀ÷¥Þ¡¼¥¯¤¬Éղ䵤줿Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_sprintf(const char *format, ...) + rb_vsprintf(const char *format, va_list ap) + + C¤Îʸ»úÎóformat¤È³¤¯°ú¿ô¤òprintf(3)¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë¤·¤¿¤¬¤Ã¤Æ + À°·Á¤·¡¤Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_str_cat(VALUE str, const char *ptr, long len) + + Ruby¤Îʸ»úÎóstr¤Ëlen¥Ð¥¤¥È¤Îʸ»úÎóptr¤òÄɲ乤롥 + + rb_str_cat2(VALUE str, const char* ptr) + + Ruby¤Îʸ»úÎóstr¤ËC¤Îʸ»úÎóptr¤òÄɲ乤롥¤³¤Î´Ø¿ô¤Îµ¡Ç½¤Ï + rb_str_cat(str, ptr, strlen(ptr))¤ÈƱÅù¤Ç¤¢¤ë¡¥ + + rb_str_catf(VALUE str, const char* format, ...) + rb_str_vcatf(VALUE str, const char* format, va_list ap) + + C¤Îʸ»úÎóformat¤È³¤¯°ú¿ô¤òprintf(3)¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë¤·¤¿¤¬¤Ã¤Æ + À°·Á¤·¡¤Ruby¤Îʸ»úÎóstr¤ËÄɲ乤롥¤³¤Î´Ø¿ô¤Îµ¡Ç½¤Ï¡¤¤½¤ì¤¾¤ì + rb_str_cat2(str, rb_sprintf(format, ...)) ¤ä + rb_str_cat2(str, rb_vsprintf(format, ap)) ¤ÈƱÅù¤Ç¤¢¤ë¡¥ + + rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) + + »ØÄꤵ¤ì¤¿¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ÇRuby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë. + + rb_usascii_str_new(const char *ptr, long len) + rb_usascii_str_new_cstr(const char *ptr) + + ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬US-ASCII¤ÎRuby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë. + + + ÇÛÎó¤ËÂФ¹¤ë´Ø¿ô + + rb_ary_new() + + Í×ÁǤ¬0¤ÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_ary_new2(long len) + + Í×ÁǤ¬0¤ÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥lenÍ×ÁÇʬ¤ÎÎΰè¤ò¤¢¤é¤«¤¸¤á³ä¤ê + Åö¤Æ¤Æ¤ª¤¯¡¥ + + rb_ary_new3(long n, ...) + + °ú¿ô¤Ç»ØÄꤷ¤¿nÍ×ÁǤò´Þ¤àÇÛÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_ary_new4(long n, VALUE *elts) + + ÇÛÎó¤ÇÍ¿¤¨¤¿nÍ×ÁǤÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥ + + rb_ary_to_ary(VALUE obj) + + ¥ª¥Ö¥¸¥§¥¯¥È¤òÇÛÎó¤ËÊÑ´¹¤¹¤ë. + Object#to_ary¤ÈƱÅù¤Ç¤¢¤ë. + + ¾¤Ë¤âÇÛÎó¤òÁàºî¤¹¤ë´Ø¿ô¤¬Â¿¿ô¤¢¤ë. ¤³¤ì¤é¤Ï + °ú¿ôary¤ËÇÛÎó¤òÅϤµ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. ¤µ¤â¤Ê¤¤¤È + ¥³¥¢¤òÅǤ¯. + + rb_ary_aref(argc, VALUE *argv, VALUE ary) + + Array#[]¤ÈƱÅù. + + rb_ary_entry(VALUE ary, long offset) + + ary[offset] + + rb_ary_subseq(VALUE ary, long beg, long len) + + ary[beg, len] + + rb_ary_push(VALUE ary, VALUE val) + rb_ary_pop(VALUE ary) + rb_ary_shift(VALUE ary) + rb_ary_unshift(VALUE ary, VALUE val) + +2¡¥Ruby¤Îµ¡Ç½¤ò»È¤¦ + +¸¶ÍýŪ¤ËRuby¤Ç½ñ¤±¤ë¤³¤È¤ÏC¤Ç¤â½ñ¤±¤Þ¤¹¡¥Ruby¤½¤Î¤â¤Î¤¬C¤Çµ­ +½Ò¤µ¤ì¤Æ¤¤¤ë¤ó¤Ç¤¹¤«¤é¡¤ÅöÁ³¤È¤¤¤¨¤ÐÅöÁ³¤Ê¤ó¤Ç¤¹¤±¤É¡¥¤³¤³¤Ç +¤ÏRuby¤Î³ÈÄ¥¤Ë»È¤¦¤³¤È¤¬Â¿¤¤¤À¤í¤¦¤Èͽ¬¤µ¤ì¤ëµ¡Ç½¤òÃæ¿´¤Ë¾Ò +²ð¤·¤Þ¤¹¡¥ + +2.1 Ruby¤Ëµ¡Ç½¤òÄɲ乤ë + +Ruby¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤ò»È¤¨¤ÐRuby¥¤¥ó¥¿¥×¥ê¥¿¤Ë¿·¤·¤¤µ¡Ç½ +¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤Þ¤¹¡¥Ruby¤Ç¤Ï°Ê²¼¤Îµ¡Ç½¤òÄɲ乤ë´Ø¿ô¤¬ +Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + + * ¥¯¥é¥¹¡¤¥â¥¸¥å¡¼¥ë + * ¥á¥½¥Ã¥É¡¤Æðۥ᥽¥Ã¥É¤Ê¤É + * Äê¿ô + +¤Ç¤Ï½ç¤Ë¾Ò²ð¤·¤Þ¤¹¡¥ + +2.1.1 ¥¯¥é¥¹/¥â¥¸¥å¡¼¥ëÄêµÁ + +¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤¹¤ë¤¿¤á¤Ë¤Ï¡¤°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + + VALUE rb_define_class(const char *name, VALUE super) + VALUE rb_define_module(const char *name) + +¤³¤ì¤é¤Î´Ø¿ô¤Ï¿·¤·¤¯ÄêµÁ¤µ¤ì¤¿¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤òÊÖ¤·¤Þ¤¹¡¥ +¥á¥½¥Ã¥É¤äÄê¿ô¤ÎÄêµÁ¤Ë¤³¤ì¤é¤ÎÃͤ¬É¬ÍפʤΤǡ¤¤Û¤È¤ó¤É¤Î¾ì¹ç +¤ÏÌá¤êÃͤòÊÑ¿ô¤Ë³ÊǼ¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡¥ + +¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤ò¾¤Î¥¯¥é¥¹¤ÎÆâÉô¤Ë¥Í¥¹¥È¤·¤ÆÄêµÁ¤¹¤ë»þ¤Ë +¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + + VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super) + VALUE rb_define_module_under(VALUE outer, const char *name) + +2.1.2 ¥á¥½¥Ã¥É/Æðۥ᥽¥Ã¥ÉÄêµÁ + +¥á¥½¥Ã¥É¤äÆðۥ᥽¥Ã¥É¤òÄêµÁ¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + + void rb_define_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + + void rb_define_singleton_method(VALUE object, const char *name, + VALUE (*func)(), int argc) + + +Ç°¤Î¤¿¤áÀâÌÀ¤¹¤ë¤È¡ÖÆðۥ᥽¥Ã¥É¡×¤È¤Ï¡¤¤½¤ÎÆÃÄê¤Î¥ª¥Ö¥¸¥§¥¯ +¥È¤ËÂФ·¤Æ¤À¤±Í­¸ú¤Ê¥á¥½¥Ã¥É¤Ç¤¹¡¥Ruby¤Ç¤Ï¤è¤¯Smalltalk¤Ë¤ª +¤±¤ë¥¯¥é¥¹¥á¥½¥Ã¥É¤È¤·¤Æ¡¤¥¯¥é¥¹¤ËÂФ¹¤ëÆðۥ᥽¥Ã¥É¤¬»È¤ï¤ì +¤Þ¤¹¡¥ + +¤³¤ì¤é¤Î´Ø¿ô¤Î argc¤È¤¤¤¦°ú¿ô¤ÏC¤Î´Ø¿ô¤ØÅϤµ¤ì¤ë°ú¿ô¤Î¿ô(¤È +·Á¼°)¤ò·è¤á¤Þ¤¹¡¥argc¤¬0°Ê¾å¤Î»þ¤Ï´Ø¿ô¤Ë°ú¤­ÅϤ¹°ú¿ô¤Î¿ô¤ò°Õ +Ì£¤·¤Þ¤¹¡¥16¸Ä°Ê¾å¤Î°ú¿ô¤Ï»È¤¨¤Þ¤»¤ó(¤¬¡¤Íפê¤Þ¤»¤ó¤è¤Í¡¤¤½ +¤ó¤Ê¤Ë)¡¥¼ÂºÝ¤Î´Ø¿ô¤Ë¤ÏÀèƬ¤Î°ú¿ô¤È¤·¤Æself¤¬Í¿¤¨¤é¤ì¤Þ¤¹¤Î +¤Ç¡¤»ØÄꤷ¤¿¿ô¤è¤ê1¿¤¤°ú¿ô¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥ + +argc¤¬Éé¤Î»þ¤Ï°ú¿ô¤Î¿ô¤Ç¤Ï¤Ê¤¯¡¤·Á¼°¤ò»ØÄꤷ¤¿¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥ +argc¤¬-1¤Î»þ¤Ï°ú¿ô¤òÇÛÎó¤ËÆþ¤ì¤ÆÅϤµ¤ì¤Þ¤¹¡¥argc¤¬-2¤Î»þ¤Ï°ú +¿ô¤ÏRuby¤ÎÇÛÎó¤È¤·¤ÆÅϤµ¤ì¤Þ¤¹¡¥ + +¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë´Ø¿ô¤Ï¤Þ¤À¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹. ¤Ò¤È¤Ä¤Ï¥á¥½¥Ã¥É +̾¤È¤·¤ÆID¤ò¼è¤ê¤Þ¤¹. ID¤Ë¤Ä¤¤¤Æ¤Ï2.2.2¤ò»²¾È. + + void rb_define_method_id(VALUE klass, ID name, + VALUE (*func)(ANYARGS), int argc) + +private/protected¤Ê¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¤Õ¤¿¤Ä¤Î´Ø¿ô¤¬¤¢¤ê¤Þ¤¹. + + void rb_define_private_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + void rb_define_protected_method(VALUE klass, const char *name, + VALUE (*func)(), int argc) + +private¥á¥½¥Ã¥É¤È¤Ï´Ø¿ô·Á¼°¤Ç¤·¤«¸Æ¤Ó½Ð¤¹¤³¤È¤Î½ÐÍè¤Ê¤¤¥á¥½¥Ã +¥É¤Ç¤¹¡¥ + +ºÇ¸å¤Ë¡¢ rb_define_module´Ø¿ô¤Ï¥â¥¸¥å¡¼¥ë´Ø¿ô¤òÄêµÁ¤·¤Þ¤¹¡£ +¥â¥¸¥å¡¼¥ë´Ø¿ô¤È¤Ï¥â¥¸¥å¡¼¥ë¤ÎÆðۥ᥽¥Ã¥É¤Ç¤¢¤ê¡¤Æ±»þ¤Ë +private¥á¥½¥Ã¥É¤Ç¤â¤¢¤ë¤â¤Î¤Ç¤¹¡¥Îã¤ò¤¢¤²¤ë¤ÈMath¥â¥¸¥å¡¼¥ë +¤Îsqrt()¤Ê¤É¤¬¤¢¤²¤é¤ì¤Þ¤¹¡¥¤³¤Î¥á¥½¥Ã¥É¤Ï + + Math.sqrt(4) + +¤È¤¤¤¦·Á¼°¤Ç¤â + + include Math + sqrt(4) + +¤È¤¤¤¦·Á¼°¤Ç¤â»È¤¨¤Þ¤¹¡¥¥â¥¸¥å¡¼¥ë´Ø¿ô¤òÄêµÁ¤¹¤ë´Ø¿ô¤Ï°Ê²¼¤Î +Ä̤ê¤Ç¤¹¡¥ + + void rb_define_module_function(VALUE module, const char *name, + VALUE (*func)(), int argc) + +´Ø¿ôŪ¥á¥½¥Ã¥É(Kernel¥â¥¸¥å¡¼¥ë¤Îprivate method)¤òÄêµÁ¤¹¤ë¤¿ +¤á¤Î´Ø¿ô¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥ + + void rb_define_global_function(const char *name, VALUE (*func)(), int argc) + + +¥á¥½¥Ã¥É¤ÎÊÌ̾¤òÄêµÁ¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥ + + void rb_define_alias(VALUE module, const char* new, const char* old); + +°À­¤Î¼èÆÀ¡¦ÀßÄê¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¤Ë¤Ï + + void rb_define_attr(VALUE klass, const char *name, int read, int write) + +¥¯¥é¥¹¥á¥½¥Ã¥Éallocate¤òÄêµÁ¤·¤¿¤êºï½ü¤·¤¿¤ê¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ï +°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥ + + void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass)); + void rb_undef_alloc_func(VALUE klass); + +func¤Ï¥¯¥é¥¹¤ò°ú¿ô¤È¤·¤Æ¼õ¤±¼è¤Ã¤Æ¡¤¿·¤·¤¯³ä¤êÅö¤Æ¤é¤ì¤¿¥¤¥ó +¥¹¥¿¥ó¥¹¤òÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡¥¤³¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ï¡¤³°Éô¥ê +¥½¡¼¥¹¤Ê¤É¤ò´Þ¤Þ¤Ê¤¤¡¤¤Ç¤­¤ë¤À¤±¡Ö¶õ¡×¤Î¤Þ¤Þ¤Ë¤·¤Æ¤ª¤¤¤¿¤Û¤¦ +¤¬¤è¤¤¤Ç¤·¤ç¤¦¡¥ + +2.1.3 Äê¿ôÄêµÁ + +³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤¬É¬ÍפÊÄê¿ô¤Ï¤¢¤é¤«¤¸¤áÄêµÁ¤·¤Æ¤ª¤¤¤¿Êý¤¬Îɤ¤ +¤Ç¤·¤ç¤¦¡¥Äê¿ô¤òÄêµÁ¤¹¤ë´Ø¿ô¤ÏÆó¤Ä¤¢¤ê¤Þ¤¹¡¥ + + void rb_define_const(VALUE klass, const char *name, VALUE val) + void rb_define_global_const(const char *name, VALUE val) + +Á°¼Ô¤ÏÆÃÄê¤Î¥¯¥é¥¹/¥â¥¸¥å¡¼¥ë¤Ë°¤¹¤ëÄê¿ô¤òÄêµÁ¤¹¤ë¤â¤Î¡¤¸å +¼Ô¤Ï¥°¥í¡¼¥Ð¥ë¤ÊÄê¿ô¤òÄêµÁ¤¹¤ë¤â¤Î¤Ç¤¹¡¥ + +2.2 Ruby¤Îµ¡Ç½¤òC¤«¤é¸Æ¤Ó½Ð¤¹ + +´û¤Ë¡Ø1.5 Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë¡Ù¤Ç°ìÉô¾Ò²ð¤·¤¿¤è¤¦¤Ê´Ø¿ô¤ò +»È¤¨¤Ð¡¤Ruby¤Îµ¡Ç½¤ò¼Â¸½¤·¤Æ¤¤¤ë´Ø¿ô¤òľÀܸƤӽФ¹¤³¤È¤¬½ÐÍè +¤Þ¤¹¡¥ + +# ¤³¤Î¤è¤¦¤Ê´Ø¿ô¤Î°ìÍ÷ɽ¤Ï¤¤¤Þ¤Î¤È¤³¤í¤¢¤ê¤Þ¤»¤ó¡¥¥½¡¼¥¹¤ò¸« +# ¤ë¤·¤«¤Ê¤¤¤Ç¤¹¤Í¡¥ + +¤½¤ì°Ê³°¤Ë¤âRuby¤Îµ¡Ç½¤ò¸Æ¤Ó½Ð¤¹ÊýË¡¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡¥ + +2.2.1 Ruby¤Î¥×¥í¥°¥é¥à¤òeval¤¹¤ë + +C¤«¤éRuby¤Îµ¡Ç½¤ò¸Æ¤Ó½Ð¤¹¤â¤Ã¤È¤â´Êñ¤ÊÊýË¡¤È¤·¤Æ¡¤Ê¸»úÎó¤Ç +Í¿¤¨¤é¤ì¤¿Ruby¤Î¥×¥í¥°¥é¥à¤òɾ²Á¤¹¤ë°Ê²¼¤Î´Ø¿ô¤¬¤¢¤ê¤Þ¤¹¡¥ + + VALUE rb_eval_string(const char *str) + +¤³¤Îɾ²Á¤Ï¸½ºß¤Î´Ä¶­¤Ç¹Ô¤ï¤ì¤Þ¤¹¡¥¤Ä¤Þ¤ê¡¤¸½ºß¤Î¥í¡¼¥«¥ëÊÑ¿ô +¤Ê¤É¤ò¼õ¤±·Ñ¤®¤Þ¤¹¡¥ + +ɾ²Á¤ÏÎã³°¤òȯÀ¸¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Þ¤·¤ç¤¦. ¤è¤ê°ÂÁ´ +¤Ê´Ø¿ô¤â¤¢¤ê¤Þ¤¹. + + VALUE rb_eval_string_protect(const char *str, int *state) + +¤³¤Î´Ø¿ô¤Ï¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¤Ènil¤òÊÖ¤·¤Þ¤¹¡£¤½¤·¤Æ¡¢À®¸ù»þ¤Ë¤Ï +*state¤Ï¥¼¥í¤Ë¡¢¤µ¤â¤Ê¤¯¤ÐÈó¥¼¥í¤Ë¤Ê¤ê¤Þ¤¹¡£ + + +2.2.2 ID¤Þ¤¿¤Ï¥·¥ó¥Ü¥ë + +C¤«¤éʸ»úÎó¤ò·Ðͳ¤»¤º¤ËRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤â¤Ç¤­¤Þ +¤¹¡¥¤½¤ÎÁ°¤Ë¡¤Ruby¥¤¥ó¥¿¥×¥ê¥¿Æâ¤Ç¥á¥½¥Ã¥É¤äÊÑ¿ô̾¤ò»ØÄꤹ¤ë +»þ¤Ë»È¤ï¤ì¤Æ¤¤¤ëID¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡¥ + +ID¤È¤ÏÊÑ¿ô̾¡¤¥á¥½¥Ã¥É̾¤òɽ¤¹À°¿ô¤Ç¤¹¡¥Ruby¤ÎÃæ¤Ç¤Ï + + :¼±ÊÌ»Ò +¤Þ¤¿¤Ï + :"Ǥ°Õ¤Îʸ»úÎó" + +¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡¥C¤«¤é¤³¤ÎÀ°¿ô¤òÆÀ¤ë¤¿¤á¤Ë¤Ï´Ø¿ô + + rb_intern(const char *name) + +¤ò»È¤¤¤Þ¤¹¡¥Ruby¤«¤é°ú¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤¿¥·¥ó¥Ü¥ë(¤Þ¤¿¤Ïʸ»ú +Îó)¤òID¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + + rb_to_id(VALUE symbol) + +2.2.3 C¤«¤éRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹ + +C¤«¤éʸ»úÎó¤ò·Ðͳ¤»¤º¤ËRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤¿¤á¤Ë¤Ï°Ê²¼ +¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥ + + VALUE rb_funcall(VALUE recv, ID mid, int argc, ...) + +¤³¤Î´Ø¿ô¤Ï¥ª¥Ö¥¸¥§¥¯¥Èrecv¤Îmid¤Ç»ØÄꤵ¤ì¤ë¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð +¤·¤Þ¤¹¡¥¤½¤Î¾¤Ë°ú¿ô¤Î»ØÄê¤Î»ÅÊý¤¬°ã¤¦°Ê²¼¤Î´Ø¿ô¤â¤¢¤ê¤Þ¤¹¡¥ + + VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) + VALUE rb_apply(VALUE recv, ID mid, VALUE args) + +apply¤Ë¤Ï°ú¿ô¤È¤·¤ÆRuby¤ÎÇÛÎó¤òÍ¿¤¨¤Þ¤¹¡¥ + +2.2.4 ÊÑ¿ô/Äê¿ô¤ò»²¾È/¹¹¿·¤¹¤ë + +C¤«¤é´Ø¿ô¤ò»È¤Ã¤Æ»²¾È¡¦¹¹¿·¤Ç¤­¤ë¤Î¤Ï¡¤Äê¿ô¡¤¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ +¿ô¤Ç¤¹¡¥Âç°èÊÑ¿ô¤Ï°ìÉô¤Î¤â¤Î¤ÏC¤ÎÂç°èÊÑ¿ô¤È¤·¤Æ¥¢¥¯¥»¥¹¤Ç¤­ +¤Þ¤¹¡¥¥í¡¼¥«¥ëÊÑ¿ô¤ò»²¾È¤¹¤ëÊýË¡¤Ï¸ø³«¤·¤Æ¤¤¤Þ¤»¤ó¡¥ + +¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ò»²¾È¡¦¹¹¿·¤¹¤ë´Ø¿ô¤Ï°Ê²¼¤ÎÄÌ +¤ê¤Ç¤¹¡¥ + + VALUE rb_ivar_get(VALUE obj, ID id) + VALUE rb_ivar_set(VALUE obj, ID id, VALUE val) + +id¤Ïrb_intern()¤ÇÆÀ¤é¤ì¤ë¤â¤Î¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥ + +Äê¿ô¤ò»²¾È¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥ + + VALUE rb_const_get(VALUE obj, ID id) + +Äê¿ô¤ò¿·¤·¤¯ÄêµÁ¤¹¤ë¤¿¤á¤Ë¤Ï¡Ø2.1.3 Äê¿ôÄêµÁ¡Ù¤Ç¾Ò²ð¤µ +¤ì¤Æ¤¤¤ë´Ø¿ô¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥ + +3¡¥Ruby¤ÈC¤È¤Î¾ðÊó¶¦Í­ + +C¸À¸ì¤ÈRuby¤Î´Ö¤Ç¾ðÊó¤ò¶¦Í­¤¹¤ëÊýË¡¤Ë¤Ä¤¤¤Æ²òÀ⤷¤Þ¤¹¡¥ + +3.1 C¤«¤é»²¾È¤Ç¤­¤ëRuby¤ÎÄê¿ô + +°Ê²¼¤ÎRuby¤ÎÄê¿ô¤ÏC¤Î¥ì¥Ù¥ë¤«¤é»²¾È¤Ç¤­¤Þ¤¹¡¥ + + Qtrue + Qfalse + + ¿¿µ¶ÃÍ¡¥Qfalse¤ÏC¸À¸ì¤Ç¤âµ¶¤È¤ß¤Ê¤µ¤ì¤Þ¤¹(¤Ä¤Þ¤ê0)¡¥ + + Qnil + + C¸À¸ì¤«¤é¸«¤¿¡Önil¡×¡¥ + +3.2 C¤ÈRuby¤Ç¶¦Í­¤µ¤ì¤ëÂç°èÊÑ¿ô + +C¤ÈRuby¤ÇÂç°èÊÑ¿ô¤ò»È¤Ã¤Æ¾ðÊó¤ò¶¦Í­¤Ç¤­¤Þ¤¹¡¥¶¦Í­¤Ç¤­¤ëÂç°è +ÊÑ¿ô¤Ë¤Ï¤¤¤¯¤Ä¤«¤Î¼ïÎब¤¢¤ê¤Þ¤¹¡¥¤½¤Î¤Ê¤«¤Ç¤â¤Ã¤È¤âÎɤ¯»È¤ï +¤ì¤ë¤È»×¤ï¤ì¤ë¤Î¤Ïrb_define_variable()¤Ç¤¹¡¥ + + void rb_define_variable(const char *name, VALUE *var) + +¤³¤Î´Ø¿ô¤ÏRuby¤ÈC¤È¤Ç¶¦Í­¤¹¤ëÂç°èÊÑ¿ô¤òÄêµÁ¤·¤Þ¤¹¡¥ÊÑ¿ô̾¤¬ +`$'¤Ç»Ï¤Þ¤é¤Ê¤¤»þ¤Ë¤Ï¼«Æ°Åª¤ËÄɲ䵤ì¤Þ¤¹¡¥¤³¤ÎÊÑ¿ô¤ÎÃͤòÊÑ +¹¹¤¹¤ë¤È¼«Æ°Åª¤ËRuby¤ÎÂбþ¤¹¤ëÊÑ¿ô¤ÎÃͤâÊѤï¤ê¤Þ¤¹¡¥ + +¤Þ¤¿Ruby¦¤«¤é¤Ï¹¹¿·¤Ç¤­¤Ê¤¤ÊÑ¿ô¤â¤¢¤ê¤Þ¤¹¡¥¤³¤Îread only¤Î +ÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤ÇÄêµÁ¤·¤Þ¤¹¡¥ + + void rb_define_readonly_variable(const char *name, VALUE *var) + +¤³¤ì¤éÊÑ¿ô¤Î¾¤Ëhook¤ò¤Ä¤±¤¿Âç°èÊÑ¿ô¤òÄêµÁ¤Ç¤­¤Þ¤¹¡¥hookÉÕ¤­ +¤ÎÂç°èÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤òÍѤ¤¤ÆÄêµÁ¤·¤Þ¤¹¡¥hookÉÕ¤­Âç°èÊÑ¿ô¤Î +Ãͤλ²¾È¤äÀßÄê¤Ïhook¤Ç¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥ + + void rb_define_hooked_variable(const char *name, VALUE *var, + VALUE (*getter)(), void (*setter)()) + +¤³¤Î´Ø¿ô¤ÏC¤Î´Ø¿ô¤Ë¤è¤Ã¤Æhook¤Î¤Ä¤±¤é¤ì¤¿Âç°èÊÑ¿ô¤òÄêµÁ¤·¤Þ +¤¹¡¥ÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ï´Ø¿ôgetter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì +¤¿»þ¤Ë¤Ï´Ø¿ôsetter¤¬¸Æ¤Ð¤ì¤ë¡¥hook¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ïgetter¤ä +setter¤Ë0¤ò»ØÄꤷ¤Þ¤¹¡¥ +# getter¤âsetter¤â0¤Ê¤é¤Ðrb_define_variable()¤ÈƱ¤¸¤Ë¤Ê¤ë¡¥ + +getter¤Èsetter¤Î»ÅÍͤϼ¡¤ÎÄ̤ê¤Ç¤¹¡£ + + VALUE (*getter)(ID id, VALUE *var); + void (*setter)(VALUE val, ID id, VALUE *var); + + +¤½¤ì¤«¤é¡¤Âбþ¤¹¤ëC¤ÎÊÑ¿ô¤ò»ý¤¿¤Ê¤¤Ruby¤ÎÂç°èÊÑ¿ô¤òÄêµÁ¤¹¤ë +¤³¤È¤â¤Ç¤­¤Þ¤¹. ¤½¤ÎÊÑ¿ô¤ÎÃͤϥե寴ؿô¤Î¤ß¤Ë¤è¤Ã¤Æ¼èÆÀ¡¦ÀßÄê +¤µ¤ì¤Þ¤¹. + + void rb_define_virtual_variable(const char *name, + VALUE (*getter)(), void (*setter)()) + +¤³¤Î´Ø¿ô¤Ë¤è¤Ã¤ÆÄêµÁ¤µ¤ì¤¿Ruby¤ÎÂç°èÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ï +getter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ïsetter¤¬¸Æ¤Ð¤ì¤Þ¤¹¡¥ + +getter¤Èsetter¤Î»ÅÍͤϰʲ¼¤ÎÄ̤ê¤Ç¤¹¡¥ + + (*getter)(ID id); + (*setter)(VALUE val, ID id); + +3.3 C¤Î¥Ç¡¼¥¿¤òRuby¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤¹¤ë + +C¤ÎÀ¤³¦¤ÇÄêµÁ¤µ¤ì¤¿¥Ç¡¼¥¿(¹½Â¤ÂÎ)¤òRuby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ +¼è¤ê°·¤¤¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤¨¤Þ¤¹¡¥¤³¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¡¤Data¤È¤¤¤¦ +Ruby¥ª¥Ö¥¸¥§¥¯¥È¤ËC¤Î¹½Â¤ÂÎ(¤Ø¤Î¥Ý¥¤¥ó¥¿)¤ò¤¯¤ë¤à¤³¤È¤ÇRuby +¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¼è¤ê°·¤¨¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥ + +Data¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Æ¹½Â¤ÂΤòRuby¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥«¥×¥»¥ë +²½¤¹¤ë¤¿¤á¤Ë¤Ï¡¤°Ê²¼¤Î¥Þ¥¯¥í¤ò»È¤¤¤Þ¤¹¡¥ + + Data_Wrap_Struct(klass, mark, free, ptr) + +¤³¤Î¥Þ¥¯¥í¤ÎÌá¤êÃͤÏÀ¸À®¤µ¤ì¤¿Data¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡¥ + +klass¤Ï¤³¤ÎData¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥é¥¹¤Ç¤¹¡¥ptr¤Ï¥«¥×¥»¥ë²½¤¹¤ë +C¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¹¡¥mark¤Ï¤³¤Î¹½Â¤ÂΤ¬Ruby¤Î¥ª¥Ö¥¸¥§ +¥¯¥È¤Ø¤Î»²¾È¤¬¤¢¤ë»þ¤Ë»È¤¦´Ø¿ô¤Ç¤¹¡¥¤½¤Î¤è¤¦¤Ê»²¾È¤ò´Þ¤Þ¤Ê¤¤ +»þ¤Ë¤Ï0¤ò»ØÄꤷ¤Þ¤¹¡¥ + +# ¤½¤Î¤è¤¦¤Ê»²¾È¤Ï´«¤á¤é¤ì¤Þ¤»¤ó¡¥ + +free¤Ï¤³¤Î¹½Â¤ÂΤ¬¤â¤¦ÉÔÍפˤʤä¿»þ¤Ë¸Æ¤Ð¤ì¤ë´Ø¿ô¤Ç¤¹¡¥¤³¤Î +´Ø¿ô¤¬¥¬¡¼¥Ù¡¼¥¸¥³¥ì¥¯¥¿¤«¤é¸Æ¤Ð¤ì¤Þ¤¹¡¥¤³¤ì¤¬-1¤Î¾ì¹ç¤Ï¡¤Ã± +½ã¤Ë³«Êü¤µ¤ì¤Þ¤¹¡¥ + +mark¤ª¤è¤Ófree´Ø¿ô¤ÏGC¼Â¹ÔÃæ¤Ë¸Æ¤Ó½Ð¤µ¤ì¤Þ¤¹. +¤Ê¤ª, GC¼Â¹ÔÃæ¤ÏRuby¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¢¥í¥±¡¼¥·¥ç¥ó¤Ï¶Ø»ß¤µ¤ì¤Þ +¤¹. ¤è¤Ã¤Æ, mark¤ª¤è¤Ófree´Ø¿ô¤ÇRuby¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¢¥í¥±¡¼¥· +¥ç¥ó¤Ï¹Ô¤ï¤Ê¤¤¤Ç¤¯¤À¤µ¤¤. + +C¤Î¹½Â¤ÂΤγäÅö¤ÈData¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ¸À®¤òƱ»þ¤Ë¹Ô¤¦¥Þ¥¯¥í¤È +¤·¤Æ°Ê²¼¤Î¤â¤Î¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + + Data_Make_Struct(klass, type, mark, free, sval) + +¤³¤Î¥Þ¥¯¥í¤ÎÌá¤êÃͤÏÀ¸À®¤µ¤ì¤¿Data¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡¥ + +klass, mark, free¤ÏData_Wrap_Struct¤ÈƱ¤¸Æ¯¤­¤ò¤·¤Þ¤¹¡¥type +¤Ï³ä¤êÅö¤Æ¤ëC¹½Â¤ÂΤη¿¤Ç¤¹¡¥³ä¤êÅö¤Æ¤é¤ì¤¿¹½Â¤ÂΤÏÊÑ¿ôsval +¤ËÂåÆþ¤µ¤ì¤Þ¤¹¡¥¤³¤ÎÊÑ¿ô¤Î·¿¤Ï (type*) ¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥ + +Data¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¥Ý¥¤¥ó¥¿¤ò¼è¤ê½Ð¤¹¤Î¤Ï°Ê²¼¤Î¥Þ¥¯¥í¤òÍѤ¤ +¤Þ¤¹¡¥ + + Data_Get_Struct(obj, type, sval) + +C¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ÏÊÑ¿ôsval¤ËÂåÆþ¤µ¤ì¤Þ¤¹¡¥ + +¤³¤ì¤é¤ÎData¤Î»È¤¤Êý¤Ï¤Á¤ç¤Ã¤Èʬ¤«¤ê¤Ë¤¯¤¤¤Î¤Ç¡¤¸å¤ÇÀâÌÀ¤¹¤ë +ÎãÂê¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +4¡¥ÎãÂê - dbm¥Ñ¥Ã¥±¡¼¥¸¤òºî¤ë + +¤³¤³¤Þ¤Ç¤ÎÀâÌÀ¤Ç¤È¤ê¤¢¤¨¤º³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ïºî¤ì¤ë¤Ï¤º¤Ç¤¹¡¥ +Ruby¤Îext¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ëdbm¥é¥¤¥Ö¥é¥ê¤òÎã¤Ë +¤·¤ÆÃʳ¬Åª¤ËÀâÌÀ¤·¤Þ¤¹¡¥ + +(1) ¥Ç¥£¥ì¥¯¥È¥ê¤òºî¤ë + + % mkdir ext/dbm + +Ruby 1.1¤«¤é¤ÏǤ°Õ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç¥À¥¤¥Ê¥ß¥Ã¥¯¥é¥¤¥Ö¥é¥ê¤òºî +¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡¥Ruby¤ËÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë¾ì¹ç¤Ë +¤ÏRuby¤òŸ³«¤·¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¡¤ext¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤Ë³ÈÄ¥ +¥é¥¤¥Ö¥é¥êÍѤΥǥ£¥ì¥¯¥È¥ê¤òºî¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥Ì¾Á°¤ÏŬÅö¤Ë +Áª¤ó¤Ç¹½¤¤¤Þ¤»¤ó¡¥ + +(2) À߷פ¹¤ë + +¤Þ¤¢¡¤ÅöÁ³¤Ê¤ó¤Ç¤¹¤±¤É¡¤¤É¤¦¤¤¤¦µ¡Ç½¤ò¼Â¸½¤¹¤ë¤«¤É¤¦¤«¤Þ¤ºÀß +·×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥¤É¤ó¤Ê¥¯¥é¥¹¤ò¤Ä¤¯¤ë¤«¡¤¤½¤Î¥¯¥é¥¹¤Ë¤Ï +¤É¤ó¤Ê¥á¥½¥Ã¥É¤¬¤¢¤ë¤«¡¤¥¯¥é¥¹¤¬Ä󶡤¹¤ëÄê¿ô¤Ê¤É¤Ë¤Ä¤¤¤ÆÀß·× +¤·¤Þ¤¹¡¥ + +(3) C¥³¡¼¥É¤ò½ñ¤¯ + +³ÈÄ¥¥é¥¤¥Ö¥é¥êËÜÂΤȤʤëC¸À¸ì¤Î¥½¡¼¥¹¤ò½ñ¤­¤Þ¤¹¡¥C¸À¸ì¤Î¥½¡¼ +¥¹¤¬¤Ò¤È¤Ä¤Î»þ¤Ë¤Ï¡Ö¥é¥¤¥Ö¥é¥ê̾.c¡×¤òÁª¤Ö¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡¥C +¸À¸ì¤Î¥½¡¼¥¹¤¬Ê£¿ô¤Î¾ì¹ç¤Ë¤ÏµÕ¤Ë¡Ö¥é¥¤¥Ö¥é¥ê̾.c¡×¤È¤¤¤¦¥Õ¥¡ +¥¤¥ë̾¤ÏÈò¤±¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤È¥â¥¸¥å¡¼ +¥ëÀ¸À®»þ¤ËÃæ´ÖŪ¤ËÀ¸À®¤µ¤ì¤ë¡Ö¥é¥¤¥Ö¥é¥ê̾.o¡×¤È¤¤¤¦¥Õ¥¡¥¤¥ë +¤È¤¬¾×Æͤ¹¤ë¤«¤é¤Ç¤¹¡¥ + +Ruby¤Ï³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤¹¤ë»þ¤Ë¡ÖInit_¥é¥¤¥Ö¥é¥ê̾¡×¤È +¤¤¤¦´Ø¿ô¤ò¼«Æ°Åª¤Ë¼Â¹Ô¤·¤Þ¤¹¡¥dbm¥é¥¤¥Ö¥é¥ê¤Î¾ì¹ç¡ÖInit_dbm¡× +¤Ç¤¹¡¥¤³¤Î´Ø¿ô¤ÎÃæ¤Ç¥¯¥é¥¹¡¤¥â¥¸¥å¡¼¥ë¡¤¥á¥½¥Ã¥É¡¤Äê¿ô¤Ê¤É¤Î +ÄêµÁ¤ò¹Ô¤¤¤Þ¤¹¡¥dbm.c¤«¤é°ìÉô°úÍѤ·¤Þ¤¹¡¥ + +-- +void +Init_dbm(void) +{ + /* DBM¥¯¥é¥¹¤òÄêµÁ¤¹¤ë */ + cDBM = rb_define_class("DBM", rb_cObject); + /* DBM¤ÏEnumerate¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë */ + rb_include_module(cDBM, rb_mEnumerable); + + /* DBM¥¯¥é¥¹¤Î¥¯¥é¥¹¥á¥½¥Ã¥Éopen(): °ú¿ô¤ÏC¤ÎÇÛÎó¤Ç¼õ¤±¤ë */ + rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1); + + /* DBM¥¯¥é¥¹¤Î¥á¥½¥Ã¥Éclose(): °ú¿ô¤Ï¤Ê¤· */ + rb_define_method(cDBM, "close", fdbm_close, 0); + /* DBM¥¯¥é¥¹¤Î¥á¥½¥Ã¥É[]: °ú¿ô¤Ï1¸Ä */ + rb_define_method(cDBM, "[]", fdbm_fetch, 1); + : + + /* DBM¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô̾¤Î¤¿¤á¤ÎID */ + id_dbm = rb_intern("dbm"); +} +-- + +DBM¥é¥¤¥Ö¥é¥ê¤Ïdbm¤Î¥Ç¡¼¥¿¤ÈÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ê¤ë¤Ï¤º¤Ç +¤¹¤«¤é¡¤C¤ÎÀ¤³¦¤Îdbm¤òRuby¤ÎÀ¤³¦¤Ë¼è¤ê¹þ¤àɬÍפ¬¤¢¤ê¤Þ¤¹¡¥ + + +dbm.c¤Ç¤ÏData_Make_Struct¤ò°Ê²¼¤Î¤è¤¦¤Ë»È¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +-- +struct dbmdata { + int di_size; + DBM *di_dbm; +}; + + +obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp); +-- + +¤³¤³¤Ç¤Ïdbmstruct¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òData¤Ë¥«¥×¥»¥ë²½¤·¤Æ¤¤ +¤Þ¤¹¡¥DBM*¤òľÀÜ¥«¥×¥»¥ë²½¤·¤Ê¤¤¤Î¤Ïclose()¤·¤¿»þ¤Î½èÍý¤ò¹Í +¤¨¤Æ¤Î¤³¤È¤Ç¤¹¡¥ + +Data¥ª¥Ö¥¸¥§¥¯¥È¤«¤édbmstruct¹½Â¤ÂΤΥݥ¤¥ó¥¿¤ò¼è¤ê½Ð¤¹¤¿¤á +¤Ë°Ê²¼¤Î¥Þ¥¯¥í¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +-- +#define GetDBM(obj, dbmp) {\ + Data_Get_Struct(obj, struct dbmdata, dbmp);\ + if (dbmp->di_dbm == 0) closed_dbm();\ +} +-- + +¤Á¤ç¤Ã¤ÈÊ£»¨¤Ê¥Þ¥¯¥í¤Ç¤¹¤¬¡¤Íפ¹¤ë¤Ëdbmdata¹½Â¤ÂΤΥݥ¤¥ó¥¿ +¤Î¼è¤ê½Ð¤·¤È¡¤close¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Î¥Á¥§¥Ã¥¯¤ò¤Þ¤È¤á¤Æ¤¤ +¤ë¤À¤±¤Ç¤¹¡¥ + +DBM¥¯¥é¥¹¤Ë¤Ï¤¿¤¯¤µ¤ó¥á¥½¥Ã¥É¤¬¤¢¤ê¤Þ¤¹¤¬¡¤Ê¬Îह¤ë¤È3¼ïÎà¤Î +°ú¿ô¤Î¼õ¤±Êý¤¬¤¢¤ê¤Þ¤¹¡¥¤Ò¤È¤Ä¤Ï°ú¿ô¤Î¿ô¤¬¸ÇÄê¤Î¤â¤Î¤Ç¡¤Îã¤È +¤·¤Æ¤Ïdelete¥á¥½¥Ã¥É¤¬¤¢¤ê¤Þ¤¹¡¥delete¥á¥½¥Ã¥É¤ò¼ÂÁõ¤·¤Æ¤¤¤ë +fdbm_delete()¤Ï¤³¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +-- +static VALUE +fdbm_delete(VALUE obj, VALUE keystr) +{ + : +} +-- + +°ú¿ô¤Î¿ô¤¬¸ÇÄê¤Î¥¿¥¤¥×¤ÏÂè1°ú¿ô¤¬self¡¤Âè2°ú¿ô°Ê¹ß¤¬¥á¥½¥Ã¥É +¤Î°ú¿ô¤È¤Ê¤ê¤Þ¤¹¡¥ + +°ú¿ô¤Î¿ô¤¬ÉÔÄê¤Î¤â¤Î¤ÏC¤ÎÇÛÎó¤Ç¼õ¤±¤ë¤â¤Î¤ÈRuby¤ÎÇÛÎó¤Ç¼õ¤± +¤ë¤â¤Î¤È¤¬¤¢¤ê¤Þ¤¹¡¥dbm¥é¥¤¥Ö¥é¥ê¤ÎÃæ¤Ç¡¤C¤ÎÇÛÎó¤Ç¼õ¤±¤ë¤â¤Î +¤ÏDBM¤Î¥¯¥é¥¹¥á¥½¥Ã¥É¤Ç¤¢¤ëopen()¤Ç¤¹¡¥¤³¤ì¤ò¼ÂÁõ¤·¤Æ¤¤¤ë´Ø +¿ôfdbm_s_open()¤Ï¤³¤¦¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +-- +static VALUE +fdbm_s_open(int argc, VALUE *argv, VALUE klass) +{ + : + if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) { + mode = 0666; /* default value */ + } + : +} +-- + +¤³¤Î¥¿¥¤¥×¤Î´Ø¿ô¤ÏÂè1°ú¿ô¤¬Í¿¤¨¤é¤ì¤¿°ú¿ô¤Î¿ô¡¤Âè2°ú¿ô¤¬Í¿¤¨ +¤é¤ì¤¿°ú¿ô¤ÎÆþ¤Ã¤Æ¤¤¤ëÇÛÎó¤Ë¤Ê¤ê¤Þ¤¹¡¥self¤ÏÂè3°ú¿ô¤È¤·¤ÆÍ¿ +¤¨¤é¤ì¤Þ¤¹¡¥ + +¤³¤ÎÇÛÎó¤ÇÍ¿¤¨¤é¤ì¤¿°ú¿ô¤ò²òÀϤ¹¤ë¤¿¤á¤Î´Ø¿ô¤¬open()¤Ç¤â»È¤ï +¤ì¤Æ¤¤¤ërb_scan_args()¤Ç¤¹¡¥Âè3°ú¿ô¤Ë»ØÄꤷ¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë +½¾¤¤¡¤Âè4ÊÑ¿ô°Ê¹ß¤Ë»ØÄꤷ¤¿ÊÑ¿ô¤ËÃͤòÂåÆþ¤·¤Æ¤¯¤ì¤Þ¤¹¡¥¤³¤Î +¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï¡¤Âè1ʸ»úÌܤ¬¾Êά¤Ç¤­¤Ê¤¤°ú¿ô¤Î¿ô¡¤Âè2ʸ»úÌܤ¬ +¾Êά¤Ç¤­¤ë°ú¿ô¤Î¿ô¡¤Âè3ʸ»úÌܤ¬Âбþ¤¹¤ëÁê¼ê¤¬Ìµ¤¤¤¢¤Þ¤ê¤Î°ú +¿ô¤¬¤¢¤ë¤«¤É¤¦¤«¤ò¼¨¤¹"*"¤Ç¤¹¡¥2ʸ»úÌܤÈ3ʸ»úÌܤϾÊά¤Ç¤­¤Þ +¤¹¡¥dbm.c¤ÎÎã¤Ç¤Ï¡¤¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï"11"¤Ç¤¹¤«¤é¡¤°ú¿ô¤ÏºÇÄã1¤Ä +¤Ç¡¤2¤Ä¤Þ¤Çµö¤µ¤ì¤ë¤È¤¤¤¦°ÕÌ£¤Ë¤Ê¤ê¤Þ¤¹¡¥¾Êά¤µ¤ì¤Æ¤¤¤ë»þ¤Î +ÊÑ¿ô¤ÎÃͤÏnil(C¸À¸ì¤Î¥ì¥Ù¥ë¤Ç¤ÏQnil)¤Ë¤Ê¤ê¤Þ¤¹¡¥ + +Ruby¤ÎÇÛÎó¤Ç°ú¿ô¤ò¼õ¤±¼è¤ë¤â¤Î¤Ïindexes¤¬¤¢¤ê¤Þ¤¹¡¥¼ÂÁõ¤Ï¤³ +¤¦¤Ç¤¹¡¥ + +-- +static VALUE +fdbm_indexes(VALUE obj, VALUE args) +{ + : +} +-- + +Âè1°ú¿ô¤Ïself¡¤Âè2°ú¿ô¤ÏRuby¤ÎÇÛÎó¤Ç¤¹¡¥ + +** Ãí°Õ»ö¹à + +Ruby¤È¶¦Í­¤Ï¤·¤Ê¤¤¤¬Ruby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ò³ÊǼ¤¹¤ë²ÄǽÀ­¤Î¤¢¤ë +C¤ÎÂç°èÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤Ã¤ÆRuby¥¤¥ó¥¿¥×¥ê¥¿¤ËÊÑ¿ô¤Î¸ºß +¤ò¶µ¤¨¤Æ¤¢¤²¤Æ¤¯¤À¤µ¤¤¡¥¤Ç¤Ê¤¤¤ÈGC¤Ç¥È¥é¥Ö¥ë¤òµ¯¤³¤·¤Þ¤¹¡¥ + + void rb_global_variable(VALUE *var) + +(4) extconf.rb¤òÍÑ°Õ¤¹¤ë + +Makefile¤òºî¤ë¾ì¹ç¤Î¿÷·¿¤Ë¤Ê¤ëextconf.rb¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤òºî¤ê +¤Þ¤¹¡¥extconf.rb¤Ï¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¤ËɬÍפʾò·ï¤Î¥Á¥§¥Ã +¥¯¤Ê¤É¤ò¹Ô¤¦¤³¤È¤¬ÌÜŪ¤Ç¤¹¡¥¤Þ¤º¡¤ + + require 'mkmf' + +¤òextconf.rb¤ÎÀèƬ¤ËÃÖ¤­¤Þ¤¹¡¥extconf.rb¤ÎÃæ¤Ç¤Ï°Ê²¼¤ÎRuby´Ø +¿ô¤ò»È¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥ + + have_library(lib, func): ¥é¥¤¥Ö¥é¥ê¤Î¸ºß¥Á¥§¥Ã¥¯ + have_func(func, header): ´Ø¿ô¤Î¸ºß¥Á¥§¥Ã¥¯ + have_header(header): ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Î¸ºß¥Á¥§¥Ã¥¯ + create_makefile(target): Makefile¤ÎÀ¸À® + +°Ê²¼¤ÎÊÑ¿ô¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥ + + $CFLAGS: ¥³¥ó¥Ñ¥¤¥ë»þ¤ËÄɲÃŪ¤Ë»ØÄꤹ¤ë¥Õ¥é¥°(-O¤Ê¤É) + $CPPFLAGS: ¥×¥ê¥×¥í¥»¥Ã¥µ¤ËÄɲÃŪ¤Ë»ØÄꤹ¤ë¥Õ¥é¥°(-I¤ä-D¤Ê¤É) + $LDFLAGS: ¥ê¥ó¥¯»þ¤ËÄɲÃŪ¤Ë»ØÄꤹ¤ë¥Õ¥é¥°(-L¤Ê¤É) + $objs: ¥ê¥ó¥¯¤µ¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë̾¤Î¥ê¥¹¥È + +¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤Ï¡¤Ä̾ï¤Ï¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤· +¤Æ¼«Æ°Åª¤ËÀ¸À®¤µ¤ì¤Þ¤¹¤¬¡¤make¤ÎÅÓÃæ¤Ç¥½¡¼¥¹¤òÀ¸À®¤¹¤ë¤è¤¦¤Ê +¾ì¹ç¤ÏÌÀ¼¨Åª¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥ + +¥é¥¤¥Ö¥é¥ê¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¾ò·ï¤¬Â·¤ï¤º¡¤¤½¤Î¥é¥¤¥Ö¥é¥ê¤ò¥³¥ó +¥Ñ¥¤¥ë¤·¤Ê¤¤»þ¤Ë¤Ïcreate_makefile¤ò¸Æ¤Ð¤Ê¤±¤ì¤ÐMakefile¤ÏÀ¸ +À®¤µ¤ì¤º¡¤¥³¥ó¥Ñ¥¤¥ë¤â¹Ô¤ï¤ì¤Þ¤»¤ó¡¥ + +(5) depend¤òÍÑ°Õ¤¹¤ë + +¤â¤·¡¤¥Ç¥£¥ì¥¯¥È¥ê¤Ëdepend¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ì¤Ð¡¤ +Makefile¤¬°Í¸´Ø·¸¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤¯¤ì¤Þ¤¹¡¥ + + % gcc -MM *.c > depend + +¤Ê¤É¤Çºî¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥¤¢¤Ã¤Æ»¤Ï̵¤¤¤Ç¤·¤ç¤¦¡¥ + +(6) Makefile¤òÀ¸À®¤¹¤ë + +Makefile¤ò¼ÂºÝ¤ËÀ¸À®¤¹¤ë¤¿¤á¤Ë¤Ï + + ruby extconf.rb + +¤È¤·¤Þ¤¹¡¥extconf.rb¤Ë require 'mkmf' ¤Î¹Ô¤¬¤Ê¤¤¾ì¹ç¤Ë¤Ï¥¨¥é¡¼ +¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¤°ú¿ô¤òÄɲä·¤Æ + + ruby -r mkmf extconf.rb + +¤È¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +site_ruby ¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ê¤¯¡¤ +vendor_ruby ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¾ì¹ç¤Ë¤Ï +°Ê²¼¤Î¤è¤¦¤Ë --vendor ¥ª¥×¥·¥ç¥ó¤ò²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡¥ + + ruby extconf.rb --vendor + +¥Ç¥£¥ì¥¯¥È¥ê¤òext°Ê²¼¤ËÍÑ°Õ¤·¤¿¾ì¹ç¤Ë¤ÏRubyÁ´ÂΤÎmake¤Î»þ¤Ë +¼«Æ°Åª¤ËMakefile¤¬À¸À®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¤¤³¤Î¥¹¥Æ¥Ã¥×¤ÏÉÔÍפǤ¹¡¥ + +(7) make¤¹¤ë + +ưŪ¥ê¥ó¥¯¥é¥¤¥Ö¥é¥ê¤òÀ¸À®¤¹¤ë¾ì¹ç¤Ë¤Ï¤½¤Î¾ì¤Çmake¤·¤Æ¤¯¤À¤µ +¤¤¡¥É¬ÍפǤ¢¤ì¤Ð make install ¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹¡¥ + +ext°Ê²¼¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤òÍÑ°Õ¤·¤¿¾ì¹ç¤Ï¡¤Ruby¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç +make¤ò¼Â¹Ô¤¹¤ë¤ÈMakefile¤òÀ¸À®¤«¤émake¡¤É¬Íפˤè¤Ã¤Æ¤Ï¤½¤Î¥â +¥¸¥å¡¼¥ë¤ÎRuby¤Ø¤Î¥ê¥ó¥¯¤Þ¤Ç¼«Æ°Åª¤Ë¼Â¹Ô¤·¤Æ¤¯¤ì¤Þ¤¹¡¥ +extconf.rb¤ò½ñ¤­´¹¤¨¤ë¤Ê¤É¤·¤ÆMakefile¤ÎºÆÀ¸À®¤¬É¬Íפʻþ¤Ï¤Þ +¤¿Ruby¥Ç¥£¥ì¥¯¥È¥ê¤Çmake¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ïmake install¤ÇRuby¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î +²¼¤Ë¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡¥¤â¤·³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤È¶¨Ä´¤·¤Æ»È¤¦Ruby¤Çµ­ +½Ò¤µ¤ì¤¿¥×¥í¥°¥é¥à¤¬¤¢¤ê¡¤Ruby¥é¥¤¥Ö¥é¥ê¤ËÃÖ¤­¤¿¤¤¾ì¹ç¤Ë¤Ï¡¤ +³ÈÄ¥¥é¥¤¥Ö¥é¥êÍѤΥǥ£¥ì¥¯¥È¥ê¤Î²¼¤Ë lib ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê +¤òºî¤ê¡¤¤½¤³¤Ë ³ÈÄ¥»Ò .rb ¤Î¥Õ¥¡¥¤¥ë¤òÃÖ¤¤¤Æ¤ª¤±¤ÐƱ»þ¤Ë¥¤¥ó +¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹¡¥ + +(8) ¥Ç¥Ð¥Ã¥° + +¤Þ¤¢¡¤¥Ç¥Ð¥Ã¥°¤·¤Ê¤¤¤ÈÆ°¤«¤Ê¤¤¤Ç¤·¤ç¤¦¤Í¡¥ext/Setup¤Ë¥Ç¥£¥ì +¥¯¥È¥ê̾¤ò½ñ¤¯¤ÈÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë¤Î¤Ç¥Ç¥Ð¥Ã¥¬¤¬»È¤¨¤ë¤è¤¦¤Ë¤Ê +¤ê¤Þ¤¹¡¥¤½¤Îʬ¥³¥ó¥Ñ¥¤¥ë¤¬ÃÙ¤¯¤Ê¤ê¤Þ¤¹¤±¤É¡¥ + +(9) ¤Ç¤­¤¢¤¬¤ê + +¸å¤Ï¤³¤Ã¤½¤ê»È¤¦¤Ê¤ê¡¤¹­¤¯¸ø³«¤¹¤ë¤Ê¤ê¡¤Çä¤ë¤Ê¤ê¡¤¤´¼«Í³¤Ë¤ª +»È¤¤¤¯¤À¤µ¤¤¡¥Ruby¤Îºî¼Ô¤Ï³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ë´Ø¤·¤Æ°ìÀڤθ¢Íø¤ò +¼çÄ¥¤·¤Þ¤»¤ó¡¥ + +Appendix A. Ruby¤Î¥½¡¼¥¹¥³¡¼¥É¤ÎʬÎà + +Ruby¤Î¥½¡¼¥¹¤Ï¤¤¤¯¤Ä¤«¤ËʬÎह¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥¤³¤Î¤¦¤Á¥¯¥é +¥¹¥é¥¤¥Ö¥é¥ê¤ÎÉôʬ¤Ï´ðËÜŪ¤Ë³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ÈƱ¤¸ºî¤êÊý¤Ë¤Ê¤Ã +¤Æ¤¤¤Þ¤¹¡¥¤³¤ì¤é¤Î¥½¡¼¥¹¤Ïº£¤Þ¤Ç¤ÎÀâÌÀ¤Ç¤Û¤È¤ó¤ÉÍý²ò¤Ç¤­¤ë¤È +»×¤¤¤Þ¤¹¡¥ + +Ruby¸À¸ì¤Î¥³¥¢ + + class.c : ¥¯¥é¥¹¤È¥â¥¸¥å¡¼¥ë + error.c : Îã³°¥¯¥é¥¹¤ÈÎã³°µ¡¹½ + gc.c : µ­²±Îΰè´ÉÍý + load.c : ¥é¥¤¥Ö¥é¥ê¤Î¥í¡¼¥É + object.c : ¥ª¥Ö¥¸¥§¥¯¥È + variable.c : ÊÑ¿ô¤ÈÄê¿ô + +Ruby¤Î¹½Ê¸²òÀÏ´ï + parse.y : »ú¶ç²òÀÏ´ï¤È¹½Ê¸ÄêµÁ + -> parse.c : ¼«Æ°À¸À® + keywords : ͽÌó¸ì + -> lex.c : ¼«Æ°À¸À® + +Ruby¤Îɾ²Á´ï(Ä̾ÎYARV) + blockinlining.c + compile.c + eval.c + eval_error.c + eval_jump.c + eval_safe.c + insns.def : ²¾ÁÛµ¡³£¸ì¤ÎÄêµÁ + iseq.c : VM::ISeq¤Î¼ÂÁõ + thread.c : ¥¹¥ì¥Ã¥É´ÉÍý¤È¥³¥ó¥Æ¥­¥¹¥ÈÀÚ¤êÂؤ¨ + thread_win32.c : ¥¹¥ì¥Ã¥É¼ÂÁõ + thread_pthread.c : Ʊ¾å + vm.c + vm_dump.c + vm_eval.c + vm_exec.c + vm_insnhelper.c + vm_method.c + + opt_insns_unif.def : Ì¿ÎáÍ»¹ç + opt_operand.def : ºÇŬ²½¤Î¤¿¤á¤ÎÄêµÁ + + -> insn*.inc : ¼«Æ°À¸À® + -> opt*.inc : ¼«Æ°À¸À® + -> vm.inc : ¼«Æ°À¸À® + +Àµµ¬É½¸½¥¨¥ó¥¸¥ó (µ´¼Ö) + regex.c + regcomp.c + regenc.c + regerror.c + regexec.c + regparse.c + regsyntax.c + +¥æ¡¼¥Æ¥£¥ê¥Æ¥£´Ø¿ô + + debug.c : C¥Ç¥Ð¥Ã¥¬ÍѤΥǥХå°¥·¥ó¥Ü¥ë + dln.c : ưŪ¥í¡¼¥Ç¥£¥ó¥° + st.c : ÈÆÍѥϥå·¥åɽ + strftime.c : »þ¹ïÀ°·Á + util.c : ¤½¤Î¾¤Î¥æ¡¼¥Æ¥£¥ê¥Æ¥£ + +Ruby¥³¥Þ¥ó¥É¤Î¼ÂÁõ + + dmyext.c + dmydln.c + dmyencoding.c + id.c + inits.c + main.c + ruby.c + version.c + + gem_prelude.rb + prelude.rb + +¥¯¥é¥¹¥é¥¤¥Ö¥é¥ê + + array.c : Array + bignum.c : Bignum + compar.c : Comparable + complex.c : Complex + cont.c : Fiber, Continuation + dir.c : Dir + enum.c : Enumerable + enumerator.c : Enumerator + file.c : File + hash.c : Hash + io.c : IO + marshal.c : Marshal + math.c : Math + numeric.c : Numeric, Integer, Fixnum, Float + pack.c : Array#pack, String#unpack + proc.c : Binding, Proc + process.c : Process + random.c : Íð¿ô + range.c : Range + rational.c : Rational + re.c : Regexp, MatchData + signal.c : Signal + sprintf.c : + string.c : String + struct.c : Struct + time.c : Time + + defs/knwon_errors.def : Îã³°¥¯¥é¥¹ Errno::* + -> known_errors.inc : ¼«Æ°À¸À® + +¿¸À¸ì²½ + encoding.c : Encoding + transcode.c : Encoding::Converter + enc/*.c : ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¥¯¥é¥¹·² + enc/trans/* : ¥³¡¼¥É¥Ý¥¤¥ó¥ÈÂбþɽ + +goruby¥³¥Þ¥ó¥É¤Î¼ÂÁõ + + goruby.c + golf_prelude.rb : goruby¸ÇÍ­¤Î¥é¥¤¥Ö¥é¥ê + -> golf_prelude.c : ¼«Æ°À¸À® + + +Appendix B. ³ÈÄ¥ÍÑ´Ø¿ô¥ê¥Õ¥¡¥ì¥ó¥¹ + +C¸À¸ì¤«¤éRuby¤Îµ¡Ç½¤òÍøÍѤ¹¤ëAPI¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡¥ + +** ·¿ + +VALUE + + Ruby¥ª¥Ö¥¸¥§¥¯¥È¤òɽ¸½¤¹¤ë·¿¡¥É¬Íפ˱þ¤¸¤Æ¥­¥ã¥¹¥È¤·¤ÆÍѤ¤¤ë¡¥ + ÁȤ߹þ¤ß·¿¤òɽ¸½¤¹¤ëC¤Î·¿¤Ïruby.h¤Ëµ­½Ò¤·¤Æ¤¢¤ëR¤Ç»Ï¤Þ¤ë¹½Â¤ + ÂΤǤ¢¤ë¡¥VALUE·¿¤ò¤³¤ì¤é¤Ë¥­¥ã¥¹¥È¤¹¤ë¤¿¤á¤ËR¤Ç»Ï¤Þ¤ë¹½Â¤ÂÎ + ̾¤òÁ´¤ÆÂçʸ»ú¤Ë¤·¤¿Ì¾Á°¤Î¥Þ¥¯¥í¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¡¥ + +** ÊÑ¿ô¡¦Äê¿ô + +Qnil + + Äê¿ô: nil¥ª¥Ö¥¸¥§¥¯¥È + +Qtrue + + Äê¿ô: true¥ª¥Ö¥¸¥§¥¯¥È(¿¿¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ) + +Qfalse + + Äê¿ô: false¥ª¥Ö¥¸¥§¥¯¥È + +** C¥Ç¡¼¥¿¤Î¥«¥×¥»¥ë²½ + +Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval) + + C¤ÎǤ°Õ¤Î¥Ý¥¤¥ó¥¿¤ò¥«¥×¥»¥ë²½¤·¤¿Ruby¥ª¥Ö¥¸¥§¥¯¥È¤òÊÖ¤¹¡¥¤³ + ¤Î¥Ý¥¤¥ó¥¿¤¬Ruby¤«¤é¥¢¥¯¥»¥¹¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿»þ¡¤free¤Ç»ØÄꤷ¤¿ + ´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¡¥¤Þ¤¿¡¤¤³¤Î¥Ý¥¤¥ó¥¿¤Î»Ø¤¹¥Ç¡¼¥¿¤¬Â¾¤ÎRuby¥ª¥Ö + ¥¸¥§¥¯¥È¤ò»Ø¤·¤Æ¤¤¤ë¾ì¹ç¡¤mark¤Ë»ØÄꤹ¤ë´Ø¿ô¤Ç¥Þ¡¼¥¯¤¹¤ëɬÍ× + ¤¬¤¢¤ë¡¥ + +Data_Make_Struct(klass, type, mark, free, sval) + + type·¿¤Î¥á¥â¥ê¤òmalloc¤·¡¤ÊÑ¿ôsval¤ËÂåÆþ¤·¤¿¸å¡¤¤½¤ì¤ò¥«¥×¥» + ¥ë²½¤·¤¿¥Ç¡¼¥¿¤òÊÖ¤¹¥Þ¥¯¥í¡¥ + +Data_Get_Struct(data, type, sval) + + data¤«¤étype·¿¤Î¥Ý¥¤¥ó¥¿¤ò¼è¤ê½Ð¤·ÊÑ¿ôsval¤ËÂåÆþ¤¹¤ë¥Þ¥¯¥í¡¥ + +** ·¿¥Á¥§¥Ã¥¯ + +TYPE(value) +FIXNUM_P(value) +NIL_P(value) +void Check_Type(VALUE value, int type) +void Check_SafeStr(VALUE value) + +** ·¿ÊÑ´¹ + +FIX2INT(value) +FIX2LONG(value) +INT2FIX(i) +NUM2INT(value) +NUM2LONG(value) +INT2NUM(i) +NUM2DBL(value) +rb_float_new(f) +StringValue(value) +StringValuePtr(value) +StringValueCStr(value) +rb_str_new2(s) + +** ¥¯¥é¥¹/¥â¥¸¥å¡¼¥ëÄêµÁ + +VALUE rb_define_class(const char *name, VALUE super) + + super¤Î¥µ¥Ö¥¯¥é¥¹¤È¤·¤Æ¿·¤·¤¤Ruby¥¯¥é¥¹¤òÄêµÁ¤¹¤ë¡¥ + +VALUE rb_define_class_under(VALUE module, const char *name, VALUE super) + + super¤Î¥µ¥Ö¥¯¥é¥¹¤È¤·¤Æ¿·¤·¤¤Ruby¥¯¥é¥¹¤òÄêµÁ¤·¡¤module¤Î + Äê¿ô¤È¤·¤ÆÄêµÁ¤¹¤ë¡¥ + +VALUE rb_define_module(const char *name) + + ¿·¤·¤¤Ruby¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤¹¤ë¡¥ + +VALUE rb_define_module_under(VALUE module, const char *name) + + ¿·¤·¤¤Ruby¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤·¡¤module¤ÎÄê¿ô¤È¤·¤ÆÄêµÁ¤¹¤ë¡¥ + +void rb_include_module(VALUE klass, VALUE module) + + ¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¡¥class¤¬¤¹¤Ç¤Ëmodule¤ò¥¤¥ó¥¯ + ¥ë¡¼¥É¤·¤Æ¤¤¤ë»þ¤Ë¤Ï²¿¤â¤·¤Ê¤¤(¿½Å¥¤¥ó¥¯¥ë¡¼¥É¤Î¶Ø»ß)¡¥ + +void rb_extend_object(VALUE object, VALUE module) + + ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥â¥¸¥å¡¼¥ë(¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥á¥½¥Ã¥É)¤Ç³ÈÄ¥¤¹¤ë¡¥ + +** Âç°èÊÑ¿ôÄêµÁ + +void rb_define_variable(const char *name, VALUE *var) + + Ruby¤ÈC¤È¤Ç¶¦Í­¤¹¤ë¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô̾¤¬`$'¤Ç + »Ï¤Þ¤é¤Ê¤¤»þ¤Ë¤Ï¼«Æ°Åª¤ËÄɲ䵤ì¤ë¡¥name¤È¤·¤ÆRuby¤Î¼±ÊÌ»Ò + ¤È¤·¤Æµö¤µ¤ì¤Ê¤¤Ê¸»ú(Î㤨¤Ð` ')¤ò´Þ¤à¾ì¹ç¤Ë¤ÏRuby¥×¥í¥°¥é + ¥à¤«¤é¤Ï¸«¤¨¤Ê¤¯¤Ê¤ë¡¥ + +void rb_define_readonly_variable(const char *name, VALUE *var) + + Ruby¤ÈC¤È¤Ç¶¦Í­¤¹¤ëread only¤Î¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ + read only¤Ç¤¢¤ë¤³¤È°Ê³°¤Ïrb_define_variable()¤ÈƱ¤¸¡¥ + +void rb_define_virtual_variable(const char *name, + VALUE (*getter)(), void (*setter)()) + + ´Ø¿ô¤Ë¤è¤Ã¤Æ¼Â¸½¤µ¤ì¤ëRubyÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿ + »þ¤Ë¤Ïgetter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ïsetter¤¬¸Æ¤Ð¤ì + ¤ë¡¥ + +void rb_define_hooked_variable(const char *name, VALUE *var, + VALUE (*getter)(), void (*setter)()) + + ´Ø¿ô¤Ë¤è¤Ã¤Æhook¤Î¤Ä¤±¤é¤ì¤¿¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô + ¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ïgetter¤¬¡¤´Ø¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ï + setter¤¬¸Æ¤Ð¤ì¤ë¡¥getter¤äsetter¤Ë0¤ò»ØÄꤷ¤¿»þ¤Ë¤Ïhook¤ò + »ØÄꤷ¤Ê¤¤¤Î¤ÈƱ¤¸»ö¤Ë¤Ê¤ë¡¥ + +void rb_global_variable(VALUE *var) + + GC¤Î¤¿¤á¡¤Ruby¥×¥í¥°¥é¥à¤«¤é¤Ï¥¢¥¯¥»¥¹¤µ¤ì¤Ê¤¤¤¬, Ruby¥ª¥Ö + ¥¸¥§¥¯¥È¤ò´Þ¤àÂç°èÊÑ¿ô¤ò¥Þ¡¼¥¯¤¹¤ë¡¥ + +** Äê¿ô + +void rb_define_const(VALUE klass, const char *name, VALUE val) + + Äê¿ô¤òÄêµÁ¤¹¤ë¡¥ + +void rb_define_global_const(const char *name, VALUE val) + + Âç°èÄê¿ô¤òÄêµÁ¤¹¤ë¡¥ + + rb_define_const(rb_cObject, name, val) + + ¤ÈƱ¤¸°ÕÌ£¡¥ + +** ¥á¥½¥Ã¥ÉÄêµÁ + +rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + + ¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥argc¤Ïself¤ò½ü¤¯°ú¿ô¤Î¿ô¡¥argc¤¬-1¤Î»þ, + ´Ø¿ô¤Ë¤Ï°ú¿ô¤Î¿ô(self¤ò´Þ¤Þ¤Ê¤¤)¤òÂè1°ú¿ô, °ú¿ô¤ÎÇÛÎó¤òÂè2 + °ú¿ô¤È¤¹¤ë·Á¼°¤ÇÍ¿¤¨¤é¤ì¤ë(Âè3°ú¿ô¤Ïself)¡¥argc¤¬-2¤Î»þ, + Âè1°ú¿ô¤¬self, Âè2°ú¿ô¤¬args(args¤Ï°ú¿ô¤ò´Þ¤àRuby¤ÎÇÛÎó)¤È + ¤¤¤¦·Á¼°¤ÇÍ¿¤¨¤é¤ì¤ë¡¥ + +rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + + private¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥°ú¿ô¤Ïrb_define_method()¤ÈƱ¤¸¡¥ + +rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc) + + Æðۥ᥽¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥°ú¿ô¤Ïrb_define_method()¤ÈƱ¤¸¡¥ + +rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) + + argc, argv·Á¼°¤ÇÍ¿¤¨¤é¤ì¤¿°ú¿ô¤òʬ²ò¤¹¤ë¡¥fmt¤Ïɬ¿Ü°ú¿ô¤Î¿ô, + Éղðú¿ô¤Î¿ô, »Ä¤ê¤Î°ú¿ô¤¬¤¢¤ë¤«¤ò»ØÄꤹ¤ëʸ»úÎó¤Ç, "¿ô»ú + ¿ô»ú*"¤È¤¤¤¦·Á¼°¤Ç¤¢¤ë¡¥ 2 ÈÖÌܤοô»ú¤È"*"¤Ï¤½¤ì¤¾¤ì¾Êά²Ä + ǽ¤Ç¤¢¤ë¡¥É¬¿Ü°ú¿ô¤¬°ì¤Ä¤â¤Ê¤¤¾ì¹ç¤Ï0¤ò»ØÄꤹ¤ë¡¥Âè3°ú¿ô°Ê + ¹ß¤ÏÊÑ¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç, ³ºÅö¤¹¤ëÍ×ÁǤ¬¤½¤ÎÊÑ¿ô¤Ë³ÊǼ¤µ¤ì¤ë¡¥ + Éղðú¿ô¤ËÂбþ¤¹¤ë°ú¿ô¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤ÏÊÑ¿ô¤ËQnil¤¬ + ÂåÆþ¤µ¤ì¤ë¡¥ + +** Ruby¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤· + +VALUE rb_funcall(VALUE recv, ID mid, int narg, ...) + + ¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·¡¥Ê¸»úÎ󤫤émid¤òÆÀ¤ë¤¿¤á¤Ë¤Ïrb_intern()¤ò + »È¤¦¡¥ + +VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv) + + ¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·¡¥°ú¿ô¤òargc, argv·Á¼°¤ÇÅϤ¹¡¥ + +VALUE rb_eval_string(const char *str) + + ʸ»úÎó¤òRuby¥¹¥¯¥ê¥×¥È¤È¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¡¦¼Â¹Ô¤¹¤ë¡¥ + +ID rb_intern(const char *name) + + ʸ»úÎó¤ËÂбþ¤¹¤ëID¤òÊÖ¤¹¡¥ + +char *rb_id2name(ID id) + + ID¤ËÂбþ¤¹¤ëʸ»úÎó¤òÊÖ¤¹(¥Ç¥Ð¥Ã¥°ÍÑ)¡¥ + +char *rb_class2name(VALUE klass) + + ¥¯¥é¥¹¤Î̾Á°¤òÊÖ¤¹(¥Ç¥Ð¥Ã¥°ÍÑ)¡¥¥¯¥é¥¹¤¬Ì¾Á°¤ò»ý¤¿¤Ê¤¤»þ¤Ë + ¤Ï, ÁÄÀè¤òÁ̤äÆ̾Á°¤ò»ý¤Ä¥¯¥é¥¹¤Î̾Á°¤òÊÖ¤¹¡¥ + +int rb_respond_to(VALUE obj, ID id) + + obj¤¬id¤Ç¼¨¤µ¤ì¤ë¥á¥½¥Ã¥É¤ò»ý¤Ä¤«¤É¤¦¤«¤òÊÖ¤¹¡¥ + +** ¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô + +VALUE rb_iv_get(VALUE obj, const char *name) + + obj¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ÎÃͤòÆÀ¤ë¡¥`@'¤Ç»Ï¤Þ¤é¤Ê¤¤¥¤¥ó¥¹¥¿¥ó + ¥¹ÊÑ¿ô¤Ï Ruby¥×¥í¥°¥é¥à¤«¤é¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¡Ö±£¤ì¤¿¡×¥¤¥ó + ¥¹¥¿¥ó¥¹ÊÑ¿ô¤Ë¤Ê¤ë¡¥Äê¿ô¤ÏÂçʸ»ú¤Î̾Á°¤ò»ý¤Ä¥¯¥é¥¹(¤Þ¤¿¤Ï + ¥â¥¸¥å¡¼¥ë)¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡¥ + +VALUE rb_iv_set(VALUE obj, const char *name, VALUE val) + + obj¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤òval¤Ë¥»¥Ã¥È¤¹¤ë¡¥ + +** À©¸æ¹½Â¤ + +VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) + + func2¤ò¥Ö¥í¥Ã¥¯¤È¤·¤ÆÀßÄꤷ, func1¤ò¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ¸Æ¤Ö¡¥ + func1¤Ë¤Ï arg1¤¬°ú¿ô¤È¤·¤ÆÅϤµ¤ì, func2¤Ë¤ÏÂè1°ú¿ô¤Ë¥¤¥Æ¥ì¡¼ + ¥¿¤«¤éÍ¿¤¨¤é¤ì¤¿ÃÍ, Âè2°ú¿ô¤Ëarg2¤¬ÅϤµ¤ì¤ë¡¥ + +VALUE rb_yield(VALUE val) + + val¤òÃͤȤ·¤Æ¥¤¥Æ¥ì¡¼¥¿¥Ö¥í¥Ã¥¯¤ò¸Æ¤Ó½Ð¤¹¡¥ + +VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2) + + ´Ø¿ôfunc1¤òarg1¤ò°ú¿ô¤Ë¸Æ¤Ó½Ð¤¹¡¥func1¤Î¼Â¹ÔÃæ¤ËÎã³°¤¬È¯À¸ + ¤·¤¿»þ¤Ë¤Ï func2¤òarg2¤ò°ú¿ô¤È¤·¤Æ¸Æ¤Ö¡¥Ìá¤êÃͤÏÎã³°¤¬È¯À¸ + ¤·¤Ê¤«¤Ã¤¿»þ¤Ïfunc1¤ÎÌá¤êÃÍ, Îã³°¤¬È¯À¸¤·¤¿»þ¤Ë¤Ïfunc2¤ÎÌá + ¤êÃͤǤ¢¤ë¡¥ + +VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, void (*func2)(), VALUE arg2) + + ´Ø¿ôfunc1¤òarg1¤ò°ú¿ô¤È¤·¤Æ¼Â¹Ô¤·, ¼Â¹Ô½ªÎ»¸å(¤¿¤È¤¨Îã³°¤¬ + ȯÀ¸¤·¤Æ¤â) func2¤òarg2¤ò°ú¿ô¤È¤·¤Æ¼Â¹Ô¤¹¤ë¡¥Ìá¤êÃͤÏfunc1 + ¤ÎÌá¤êÃͤǤ¢¤ë(Îã³°¤¬È¯À¸¤·¤¿»þ¤ÏÌá¤é¤Ê¤¤)¡¥ + +** Îã³°¡¦¥¨¥é¡¼ + +void rb_warning(const char *fmt, ...) + + rb_verbose»þ¤Ëɸ½à¥¨¥é¡¼½ÐÎϤ˷ٹð¾ðÊó¤òɽ¼¨¤¹¤ë¡¥°ú¿ô¤Ï + printf()¤ÈƱ¤¸¡¥ + +void rb_raise(rb_eRuntimeError, const char *fmt, ...) + + RuntimeErrorÎã³°¤òȯÀ¸¤µ¤»¤ë¡¥°ú¿ô¤Ïprintf()¤ÈƱ¤¸¡¥ + +void rb_raise(VALUE exception, const char *fmt, ...) + + exception¤Ç»ØÄꤷ¤¿Îã³°¤òȯÀ¸¤µ¤»¤ë¡¥fmt°Ê²¼¤Î°ú¿ô¤Ï + printf()¤ÈƱ¤¸¡¥ + +void rb_fatal(const char *fmt, ...) + + Ã×̿ŪÎã³°¤òȯÀ¸¤µ¤»¤ë¡¥Ä̾ï¤ÎÎã³°½èÍý¤Ï¹Ô¤Ê¤ï¤ì¤º, ¥¤¥ó¥¿¡¼ + ¥×¥ê¥¿¤¬½ªÎ»¤¹¤ë(¤¿¤À¤·ensure¤Ç»ØÄꤵ¤ì¤¿¥³¡¼¥É¤Ï½ªÎ»Á°¤Ë + ¼Â¹Ô¤µ¤ì¤ë)¡¥ + +void rb_bug(const char *fmt, ...) + + ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ê¤É¥×¥í¥°¥é¥à¤Î¥Ð¥°¤Ç¤·¤«È¯À¸¤¹¤ë¤Ï¤º¤Î¤Ê¤¤ + ¾õ¶·¤Î»þ¸Æ¤Ö¡¥¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ï¥³¥¢¥À¥ó¥×¤·Ä¾¤Á¤Ë½ªÎ»¤¹¤ë¡¥ + Îã³°½èÍý¤Ï°ìÀڹԤʤï¤ì¤Ê¤¤¡¥ + +** Ruby¤Î½é´ü²½¡¦¼Â¹Ô + +Ruby¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËËä¤á¹þ¤à¾ì¹ç¤Ë¤Ï°Ê²¼¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +¤ò»È¤¦¡¥Ä̾ï¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ë¤ÏɬÍפʤ¤¡¥ + +void ruby_init() + + Ruby¥¤¥ó¥¿¥×¥ê¥¿¤Î½é´ü²½¤ò¹Ô¤Ê¤¦¡¥ + +void ruby_options(int argc, char **argv) + + Ruby¥¤¥ó¥¿¥×¥ê¥¿¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô¤Î½èÍý¤ò¹Ô¤Ê¤¦¡¥ + +void ruby_run() + + Ruby¥¤¥ó¥¿¥×¥ê¥¿¤ò¼Â¹Ô¤¹¤ë¡¥ + +void ruby_script(char *name) + + Ruby¤Î¥¹¥¯¥ê¥×¥È̾($0)¤òÀßÄꤹ¤ë¡¥ + +** ¥¤¥ó¥¿¥×¥ê¥¿¤Î¥¤¥Ù¥ó¥È¤Î¥Õ¥Ã¥¯ + + void rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events) + +»ØÄꤵ¤ì¤¿¥¤¥ó¥¿¥×¥ê¥¿¤Î¥¤¥Ù¥ó¥È¤ËÂФ¹¤ë¥Õ¥Ã¥¯´Ø¿ô¤òÄɲä·¤Þ¤¹¡¥ +events¤Ï°Ê²¼¤ÎÃͤÎor¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó: + + RUBY_EVENT_LINE + RUBY_EVENT_CLASS + RUBY_EVENT_END + RUBY_EVENT_CALL + RUBY_EVENT_RETURN + RUBY_EVENT_C_CALL + RUBY_EVENT_C_RETURN + RUBY_EVENT_RAISE + RUBY_EVENT_ALL + +rb_event_hook_func_t¤ÎÄêµÁ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹: + + typedef void (*rb_event_hook_func_t)(rb_event_t event, NODE *node, + VALUE self, ID id, VALUE klass) + + int rb_remove_event_hook(rb_event_hook_func_t func) + +»ØÄꤵ¤ì¤¿¥Õ¥Ã¥¯´Ø¿ô¤òºï½ü¤·¤Þ¤¹¡¥ + + +Appendix C. extconf.rb¤Ç»È¤¨¤ë´Ø¿ô¤¿¤Á + +extconf.rb¤ÎÃæ¤Ç¤ÏÍøÍѲÄǽ¤Ê¥³¥ó¥Ñ¥¤¥ë¾ò·ï¥Á¥§¥Ã¥¯¤Î´Ø¿ô¤Ï°Ê +²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡¥ + +have_macro(macro, headers) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ¥Þ¥¯¥ímacro¤¬ÄêµÁ¤µ + ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¥Á¥§¥Ã¥¯¤¹¤ë¡¥¥Þ¥¯¥í¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë»þtrue + ¤òÊÖ¤¹¡¥ + +have_library(lib, func) + + ´Ø¿ôfunc¤òÄêµÁ¤·¤Æ¤¤¤ë¥é¥¤¥Ö¥é¥êlib¤Î¸ºß¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡¥ + ¥é¥¤¥Ö¥é¥ê¤¬Â¸ºß¤¹¤ë»þ¡¤true¤òÊÖ¤¹¡¥ + +find_library(lib, func, path...) + + ´Ø¿ôfunc¤òÄêµÁ¤·¤Æ¤¤¤ë¥é¥¤¥Ö¥é¥êlib¤Î¸ºß¤ò -Lpath ¤òÄɲà + ¤·¤Ê¤¬¤é¥Á¥§¥Ã¥¯¤¹¤ë¡¥¥é¥¤¥Ö¥é¥ê¤¬¸«ÉÕ¤«¤Ã¤¿»þ¡¤true¤òÊÖ¤¹¡¥ + +have_func(func, header) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ´Ø¿ôfunc¤Î¸ºß¤ò¥Á¥§ + ¥Ã¥¯¤¹¤ë¡¥func¤¬É¸½à¤Ç¤Ï¥ê¥ó¥¯¤µ¤ì¤Ê¤¤¥é¥¤¥Ö¥é¥êÆâ¤Î¤â¤Î¤Ç + ¤¢¤ë»þ¤Ë¤ÏÀè¤Ëhave_library¤Ç¤½¤Î¥é¥¤¥Ö¥é¥ê¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ª + ¤¯»ö¡¥´Ø¿ô¤¬Â¸ºß¤¹¤ë»þtrue¤òÊÖ¤¹¡¥ + +have_var(var, header) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤ÆÊÑ¿ôvar¤Î¸ºß¤ò¥Á¥§¥Ã + ¥¯¤¹¤ë¡¥var¤¬É¸½à¤Ç¤Ï¥ê¥ó¥¯¤µ¤ì¤Ê¤¤¥é¥¤¥Ö¥é¥êÆâ¤Î¤â¤Î¤Ç¤¢ + ¤ë»þ¤Ë¤ÏÀè¤Ëhave_library¤Ç¤½¤Î¥é¥¤¥Ö¥é¥ê¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ª¤¯ + »ö¡¥ÊÑ¿ô¤¬Â¸ºß¤¹¤ë»þtrue¤òÊÖ¤¹¡¥ + +have_header(header) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Î¸ºß¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡¥¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹ + ¤ë»þtrue¤òÊÖ¤¹¡¥ + +find_header(header, path...) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤Î¸ºß¤ò -Ipath ¤òÄɲ䷤ʤ¬¤é¥Á¥§¥Ã¥¯ + ¤¹¤ë¡¥¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤¬¸«ÉÕ¤«¤Ã¤¿»þ¡¤true¤òÊÖ¤¹¡¥ + +have_struct_member(type, member, header) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ·¿type¤Ë¥á¥ó¥Ðmember + ¤¬Â¸ºß¤¹¤ë¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡¥type¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Æ¡¤member¤ò + »ý¤Ä¤¹¤ë»þtrue¤òÊÖ¤¹¡¥ + +have_type(type, header, opt) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ·¿type¤¬Â¸ºß¤¹¤ë¤«¤ò + ¥Á¥§¥Ã¥¯¤¹¤ë¡¥type¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë»þtrue¤òÊÖ¤¹¡¥ + +check_sizeof(type, header) + + ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ·¿type¤Îcharñ°Ì¥µ¥¤ + ¥º¤òÄ´¤Ù¤ë¡¥type¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë»þ¤½¤Î¥µ¥¤¥º¤òÊÖ¤¹¡¥ÄêµÁ¤µ + ¤ì¤Æ¤¤¤Ê¤¤¤È¤­¤Ïnil¤òÊÖ¤¹¡¥ + +create_makefile(target) + + ³ÈÄ¥¥é¥¤¥Ö¥é¥êÍѤÎMakefile¤òÀ¸À®¤¹¤ë¡¥¤³¤Î´Ø¿ô¤ò¸Æ¤Ð¤Ê¤±¤ì + ¤Ð¤½¤Î¥é¥¤¥Ö¥é¥ê¤Ï¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Ê¤¤¡¥target¤Ï¥â¥¸¥å¡¼¥ë̾ + ¤òɽ¤¹¡¥ + +find_executable(command, path) + + ¥³¥Þ¥ó¥Écommand¤òFile::PATH_SEPARATOR¤Ç¶èÀÚ¤é¤ì¤¿¥Ñ¥¹Ì¾¤Î + ¥ê¥¹¥Èpath¤«¤éõ¤¹¡¥path¤¬nil¤Þ¤¿¤Ï¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¤´Ä¶­ + ÊÑ¿ôPATH¤ÎÃͤò»ÈÍѤ¹¤ë¡¥¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤Ã¤¿¾ì¹ç + ¤Ï¥Ñ¥¹¤ò´Þ¤à¥Õ¥¡¥¤¥ë̾¡¤¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ïnil¤òÊÖ¤¹¡¥ + +with_config(withval[, default=nil]) + + ¥³¥Þ¥ó¥É¥é¥¤¥ó¾å¤Î--with-¤Ç»ØÄꤵ¤ì¤¿¥ª¥×¥·¥ç¥óÃÍ + ¤òÆÀ¤ë¡¥ + +enable_config(config, *defaults) +disable_config(config, *defaults) + + ¥³¥Þ¥ó¥É¥é¥¤¥ó¾å¤Î--enable-¤Þ¤¿¤Ï + --disable-¤Ç»ØÄꤵ¤ì¤¿¿¿µ¶ÃͤòÆÀ¤ë¡¥ + --enable-¤¬»ØÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç¤Ïtrue¡¤ + --disable-¤¬»ØÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç¤Ïfalse¤òÊÖ¤¹¡¥ + ¤É¤Á¤é¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¤¥Ö¥í¥Ã¥¯¤Ä¤­¤Ç¸Æ¤Ó½Ð¤µ¤ì¤Æ + ¤¤¤ë¾ì¹ç¤Ï*defaults¤òyield¤·¤¿·ë²Ì¡¤¥Ö¥í¥Ã¥¯¤Ê¤·¤Ê¤é + *defaults¤òÊÖ¤¹¡¥ + +dir_config(target[, default_dir]) +dir_config(target[, default_include, default_lib]) + + ¥³¥Þ¥ó¥É¥é¥¤¥ó¾å¤Î--with--dir, --with--include, + --with--lib¤Î¤¤¤º¤ì¤«¤Ç»ØÄꤵ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ò + $CFLAGS ¤ä $LDFLAGS ¤ËÄɲ乤롥--with--dir=/path¤Ï + --with--include=/path/include --with--lib=/path/lib + ¤ÈÅù²Á¤Ç¤¢¤ë¡¥Äɲ䵤줿 include ¥Ç¥£¥ì¥¯¥È¥ê¤È lib ¥Ç¥£¥ì + ¥¯¥È¥ê¤ÎÇÛÎó¤òÊÖ¤¹¡¥ ([include_dir, lib_dir]) + +pkg_config(pkg) + + pkg-config¥³¥Þ¥ó¥É¤«¤é¥Ñ¥Ã¥±¡¼¥¸pkg¤Î¾ðÊó¤òÆÀ¤ë¡¥ + pkg-config¤Î¼ÂºÝ¤Î¥³¥Þ¥ó¥É̾¤Ï¡¤--with-pkg-config¥³¥Þ¥ó¥É + ¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤Ç»ØÄê²Äǽ¡¥ + +/* + * Local variables: + * fill-column: 60 + * end: + */ diff --git a/lib/ruby-1.9.1-rc1/README.ja b/lib/ruby-1.9.1-rc1/README.ja new file mode 100644 index 0000000..aeb1707 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/README.ja @@ -0,0 +1,160 @@ +* Ruby¤È¤Ï + +Ruby¤Ï¥·¥ó¥×¥ë¤«¤Ä¶¯ÎϤʥª¥Ö¥¸¥§¥¯¥È»Ø¸þ¥¹¥¯¥ê¥×¥È¸À¸ì¤Ç¤¹¡¥ +Ruby¤ÏºÇ½é¤«¤é½ã¿è¤Ê¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¸À¸ì¤È¤·¤ÆÀ߷פµ¤ì¤Æ¤¤¤Þ +¤¹¤«¤é¡¤¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¥×¥í¥°¥é¥ß¥ó¥°¤ò¼ê·Ú¤Ë¹Ô¤¦»ö¤¬½ÐÍè¤Þ +¤¹¡¥¤â¤Á¤í¤óÄ̾ï¤Î¼ê³¤­·¿¤Î¥×¥í¥°¥é¥ß¥ó¥°¤â²Äǽ¤Ç¤¹¡¥ + +Ruby¤Ï¥Æ¥­¥¹¥È½èÍý´Ø·¸¤ÎǽÎϤʤɤËÍ¥¤ì¡¤Perl¤ÈƱ¤¸¤¯¤é¤¤¶¯ÎÏ +¤Ç¤¹¡¥¤µ¤é¤Ë¥·¥ó¥×¥ë¤Êʸˡ¤È¡¤Îã³°½èÍý¤ä¥¤¥Æ¥ì¡¼¥¿¤Ê¤É¤Îµ¡¹½ +¤Ë¤è¤Ã¤Æ¡¤¤è¤êʬ¤«¤ê¤ä¤¹¤¤¥×¥í¥°¥é¥ß¥ó¥°¤¬½ÐÍè¤Þ¤¹¡¥ + + +* Ruby¤ÎÆÃĹ + + + ¥·¥ó¥×¥ë¤Êʸˡ + + ÉáÄ̤Υª¥Ö¥¸¥§¥¯¥È»Ø¸þµ¡Ç½(¥¯¥é¥¹¡¤¥á¥½¥Ã¥É¥³¡¼¥ë¤Ê¤É) + + Æüì¤Ê¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þµ¡Ç½(Mixin, Æðۥ᥽¥Ã¥É¤Ê¤É) + + ±é»»»Ò¥ª¡¼¥Ð¡¼¥í¡¼¥É + + Îã³°½èÍýµ¡Ç½ + + ¥¤¥Æ¥ì¡¼¥¿¤È¥¯¥í¡¼¥¸¥ã + + ¥¬¡¼¥Ù¡¼¥¸¥³¥ì¥¯¥¿ + + ¥À¥¤¥Ê¥ß¥Ã¥¯¥í¡¼¥Ç¥£¥ó¥° (¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ë¤è¤ë) + + °Ü¿¢À­¤¬¹â¤¤¡¥Â¿¤¯¤ÎUnix-like/POSIX¸ß´¹¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¾å¤Ç + Æ°¤¯¤À¤±¤Ç¤Ê¤¯¡¤Windows¡¤ Mac OS X¡¤BeOS¤Ê¤É¤Î¾å¤Ç¤âÆ°¤¯ + cf. http://redmine.ruby-lang.org/wiki/ruby-19/SupportedPlatformsJa + +* Æþ¼êË¡ + +** FTP¤Ç + +°Ê²¼¤Î¾ì½ê¤Ë¤ª¤¤¤Æ¤¢¤ê¤Þ¤¹¡¥ + + ftp://ftp.ruby-lang.org/pub/ruby/ + +** Subversion¤Ç + +³«È¯Àèü¤Î¥½¡¼¥¹¥³¡¼¥É¤Ï¼¡¤Î¥³¥Þ¥ó¥É¤Ç¼èÆÀ¤Ç¤­¤Þ¤¹¡¥ + + $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby + +¾¤Ë³«È¯Ãæ¤Î¥Ö¥é¥ó¥Á¤Î°ìÍ÷¤Ï¼¡¤Î¥³¥Þ¥ó¥É¤Ç¸«¤é¤ì¤Þ¤¹¡¥ + + $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/ + + +* ¥Û¡¼¥à¥Ú¡¼¥¸ + +Ruby¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤ÎURL¤Ï + + http://www.ruby-lang.org/ + +¤Ç¤¹¡¥ + + +* ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È + +Ruby¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤¬¤¢¤ê¤Þ¤¹¡£»²²Ã´õ˾¤ÎÊý¤Ï + + ruby-list-ctl@ruby-lang.org + +¤Þ¤ÇËÜʸ¤Ë + + subscribe YourFirstName YourFamilyName + +¤È½ñ¤¤¤ÆÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ + +Ruby³«È¯¼Ô¸þ¤±¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£¤³¤Á¤é¤Ç¤Ïruby¤Î¥Ð +¥°¡¢¾­Íè¤Î»ÅÍͳÈÄ¥¤Ê¤É¼ÂÁõ¾å¤ÎÌäÂê¤Ë¤Ä¤¤¤ÆµÄÏÀ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +»²²Ã´õ˾¤ÎÊý¤Ï + + ruby-dev-ctl@ruby-lang.org + +¤Þ¤Çruby-list¤ÈƱÍͤÎÊýË¡¤Ç¥á¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£ + +Ruby³ÈÄ¥¥â¥¸¥å¡¼¥ë¤Ë¤Ä¤¤¤ÆÏ䷹礦ruby-ext¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤È +¿ô³Ø´Ø·¸¤ÎÏÃÂê¤Ë¤Ä¤¤¤ÆÏ䷹礦ruby-math¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤È +±Ñ¸ì¤ÇÏ䷹礦ruby-talk¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£»²²ÃÊýË¡ +¤Ï¤É¤ì¤âƱ¤¸¤Ç¤¹¡£ + + +* ¥³¥ó¥Ñ¥¤¥ë¡¦¥¤¥ó¥¹¥È¡¼¥ë + +°Ê²¼¤Î¼ê½ç¤Ç¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡¥ + + 1. ¤â¤·configure¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤é¤Ê¤¤¡¢¤â¤·¤¯¤Ï + configure.in¤è¤ê¸Å¤¤¤è¤¦¤Ê¤é¡¢autoconf¤ò¼Â¹Ô¤·¤Æ + ¿·¤·¤¯configure¤òÀ¸À®¤¹¤ë + + 2. configure¤ò¼Â¹Ô¤·¤ÆMakefile¤Ê¤É¤òÀ¸À®¤¹¤ë + + ´Ä¶­¤Ë¤è¤Ã¤Æ¤Ï¥Ç¥Õ¥©¥ë¥È¤ÎC¥³¥ó¥Ñ¥¤¥éÍÑ¥ª¥×¥·¥ç¥ó¤¬ÉÕ¤­ + ¤Þ¤¹¡¥configure¥ª¥×¥·¥ç¥ó¤Ç optflags=.. warnflags=.. Åù + ¤Ç¾å½ñ¤­¤Ç¤­¤Þ¤¹¡¥ + + 3. (ɬÍפʤé¤Ð)defines.h¤òÊÔ½¸¤¹¤ë + + ¿ʬ¡¤É¬Í×̵¤¤¤È»×¤¤¤Þ¤¹¡¥ + + 4. (ɬÍפʤé¤Ð)ext/Setup¤ËÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë³ÈÄ¥¥â¥¸¥å¡¼¥ë¤ò + »ØÄꤹ¤ë + + ext/Setup¤Ëµ­½Ò¤·¤¿¥â¥¸¥å¡¼¥ë¤ÏÀÅŪ¤Ë¥ê¥ó¥¯¤µ¤ì¤Þ¤¹¡¥ + + ¥À¥¤¥Ê¥ß¥Ã¥¯¥í¡¼¥Ç¥£¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¥¢¡¼¥­¥Æ¥¯ + ¥Á¥ã¤Ç¤ÏSetup¤Î1¹ÔÌܤΡÖoption nodynamic¡×¤È¤¤¤¦¹Ô¤Î¥³ + ¥á¥ó¥È¤ò³°¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥¤Þ¤¿¡¤¤³¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç + ³ÈÄ¥¥â¥¸¥å¡¼¥ë¤òÍøÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¤¤¢¤é¤«¤¸¤áÀÅŪ¤Ë¥ê¥ó + ¥¯¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥ + + 5. make¤ò¼Â¹Ô¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë + + 6. make test¤Ç¥Æ¥¹¥È¤ò¹Ô¤¦¡¥ + + ¡Ötest succeeded¡×¤Èɽ¼¨¤µ¤ì¤ì¤ÐÀ®¸ù¤Ç¤¹¡¥¤¿¤À¤·¥Æ¥¹¥È + ¤ËÀ®¸ù¤·¤Æ¤â´°àú¤À¤ÈÊݾڤµ¤ì¤Æ¤¤¤ëÌõ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡¥ + + 7. make install + + root¤Çºî¶È¤¹¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡¥ + +¤â¤·¡¤¥³¥ó¥Ñ¥¤¥ë»þ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ë¤Ï¥¨¥é¡¼¤Î¥í¥°¤È¥Þ +¥·¥ó¡¤OS¤Î¼ïÎà¤ò´Þ¤à¤Ç¤­¤ë¤À¤±¾Ü¤·¤¤¥ì¥Ý¡¼¥È¤òºî¼Ô¤ËÁ÷¤Ã¤Æ¤¯ +¤À¤µ¤ë¤È¾¤ÎÊý¤Î¤¿¤á¤Ë¤â¤Ê¤ê¤Þ¤¹¡¥ + + +* °Ü¿¢ + +UNIX¤Ç¤¢¤ì¤Ðconfigure¤¬¤Û¤È¤ó¤É¤Îº¹°Û¤òµÛ¼ý¤·¤Æ¤¯¤ì¤ë¤Ï¤º¤Ç +¤¹¤¬¡¤»×¤ï¤Ì¸«Íî¤È¤·¤¬¤¢¤Ã¤¿¾ì¹ç(¤¢¤ë¤Ë°ã¤¤¤Ê¤¤)¡¤ºî¼Ô¤Ë¤½¤Î +¤³¤È¤ò¥ì¥Ý¡¼¥È¤¹¤ì¤Ð¡¤²ò·è¤Ç¤­¤ë¤«¤âÃΤì¤Þ¤»¤ó¡¥ + +¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ë¤â¤Ã¤È¤â°Í¸¤¹¤ë¤Î¤ÏGCÉô¤Ç¤¹¡¥Ruby¤ÎGC¤ÏÂÐ¾Ý +¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤¬setjmp()¤Ë¤è¤Ã¤ÆÁ´¤Æ¤Î¥ì¥¸¥¹¥¿¤ò jmp_buf¤Ë +³ÊǼ¤¹¤ë¤³¤È¤È¡¤jmp_buf¤È¥¹¥¿¥Ã¥¯¤¬32bit¥¢¥é¥¤¥ó¥á¥ó¥È¤µ¤ì¤Æ +¤¤¤ë¤³¤È¤ò²¾Äꤷ¤Æ¤¤¤Þ¤¹¡¥ÆäËÁ°¼Ô¤¬À®Î©¤·¤Ê¤¤¾ì¹ç¤ÎÂбþ¤ÏÈó +¾ï¤Ëº¤Æñ¤Ç¤·¤ç¤¦¡¥¸å¼Ô¤Î²ò·è¤ÏÈæ³ÓŪ´Êñ¤Ç¡¤gc.c¤Ç¥¹¥¿¥Ã¥¯¤ò +¥Þ¡¼¥¯¤·¤Æ¤¤¤ëÉôʬ¤Ë¥¢¥é¥¤¥ó¥á¥ó¥È¤Î¥Ð¥¤¥È¿ô¤À¤±¤º¤é¤·¤Æ¥Þ¡¼ +¥¯¤¹¤ë¥³¡¼¥É¤òÄɲ乤ë¤À¤±¤ÇºÑ¤ß¤Þ¤¹¡¥¡Ödefined(THINK_C)¡×¤Ç +³ç¤é¤ì¤Æ¤¤¤ëÉôʬ¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤ + +# ¼ÂºÝ¤Ë¤ÏRuby¤ÏThink C¤Ç¤Ï¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Þ¤»¤ó¡¥ + +¥ì¥¸¥¹¥¿¥¦¥£¥ó¥É¥¦¤ò»ý¤ÄCPU¤Ç¤Ï¡¤¥ì¥¸¥¹¥¿¥¦¥£¥ó¥É¥¦¤ò¥¹¥¿¥Ã +¥¯¤Ë¥Õ¥é¥Ã¥·¥å¤¹¤ë¥¢¥»¥ó¥Ö¥é¥³¡¼¥É¤òÄɲ乤ëɬÍפ¬¤¢¤ë¤«¤âÃÎ +¤ì¤Þ¤»¤ó¡¥ + + +* ÇÛÉÛ¾ò·ï + +COPYING.ja¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ + + +* Ãø¼Ô + +¥³¥á¥ó¥È¡¤¥Ð¥°¥ì¥Ý¡¼¥È¤½¤Î¾¤Ï matz@netlab.jp ¤Þ¤Ç¡¥ +------------------------------------------------------- +created at: Thu Aug 3 11:57:36 JST 1995 +Local variables: +mode: indented-text +end: diff --git a/lib/ruby-1.9.1-rc1/ToDo b/lib/ruby-1.9.1-rc1/ToDo new file mode 100644 index 0000000..7e5ef52 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ToDo @@ -0,0 +1,124 @@ +Language Spec. + +- Class#allocate - basicNew +- class Foo::Bar value hash in the form of {symbol: value, ...} ?? +* operator !! for rescue. ??? +* objectify characters +* ../... outside condition invokes operator method too. +* ... inside condition turns off just before right condition.??? +* package or access control for global variables?? +* named arguments like foo(nation:="german") or foo(nation: "german"). +* method to retrieve argument information (needs new C API) +* multiple return values, yield values. maybe incompatible ??? +* cascading method invocation ??? +* def Class#method .. end ?? +* def Foo::Bar::baz() .. end ?? +* I18N (or M17N) script/string/regexp +* discourage use of symbol variables (e.g. $/, etc.) in manual +* discourage use of Perlish features by giving warnings. +* non confusing in-block local variable (is it possible?) + + remove scope by block + + variables appears within block may have independent values. +* Regexp: make /o thread safe. +* decide whether begin with rescue or ensure make do..while loop. +* unify == and eql? again +* to_i returns nil if str contains no digit. +* jar like combined library package. -> RubyGems? +* method combination, e.g. before, after, around, etc. +* .. or something like defadvice in Emacs. +* property - for methods, or for objects in general. +* "in" modifier, to annotate, or to encourage assertion. +* selector namespace - something like generic-flet in CLOS, to help RubyBehavior +* private instance variable (as in Python?) @_foo in class Foo => @_Foo_foo +* warn/error "bare word" method, like "foo", you should type "foo()" + +Hacking Interpreter + +- generational GC +* non-blocking open (e.g. for named pipe) for thread +* avoid blocking with gethostbyname/gethostbyaddr (use fork ???) +* objectify interpreters ??? +* remove rb_eval() recursions +* syntax tree -> bytecode ??? +* scrambled script, or script filter +* setuid ruby +* performance tune for in-block (dynamic) local variables. +* give warnings to assign magic variables. +* export rb_io_{addstr,printf,puts,print} +* autoload should work with threads [ruby-talk:4589] +* remove stdio dependency from IOs. +* warn for inconsistent local variable usage (lv m and method m at the same time). +* MicroRuby +* Built-in Interactive Ruby. +* Parser API +* trap every method invocation, which can be enabled by e.g. trap_call :method. +* unify Errno exceptions of same errno, or new exception comparison scheme. +* 2.times{|i| if i==0 then a = 15 else puts eval("a") end} should print nil. +* Thread#max_stack_size attribute (possible??) + +Standard Libraries + +- Module#define_method which takes a name and a body (block, proc or method). +- Enume#inject +- Array#fetch +- IO::for_fd +- Process::waitall [ruby-talk:4557] +- Process::Status +- File::lchown, File::lchmod; xxx - still need work for non existing platforms +- move Time::times to Process. +- Enumerable#sort_by for Schwartzian transformation +- fork_and_kill_other_threads. +- signal list (Signal::trap, Signal::list). +- move NameError under StandardError. +- Integer#to_s(base) +- Hash::new{default} +- hash etc. should handle self referenceing array/hash +- Array#select(n1,n2...) works like Array#indexes(n1,n2...) +- use Mersenne Twister RNG for random. +- deprecate Array#indexes, and Array#indices. +- remove dependency on MAXPATHLEN. +- String#scanf(?) +* Object#fmt(?) +* Time::strptime +* Integer[num], Float[num]; Fixnum[num]? +* method to retrieve non-number trailer for to_i/to_f. +* Stream or Port, abstract superclass of IO ? +* String#{pred,prev}, String#downto +* optional stepsize argument for succ() +* Ruby module -- Ruby::Version, Ruby::Interpreter +* introduce Boolean class; super of TrueClass, FalseClass +* synchronized method - synchronized{...}, synchronized :foo, :bar +* Array#&, Array#| to allow duplication. ??? +* way to specify immortal (fork endurance) thread; +* or raise ForkException to every thread but fork caller. +* new user-defined marshal scheme. _dump(dumper), _load(restorer) +* library to load per-user profile seeking .ruby_profile or ruby.ini file. +* warning framework (warn, warning for Ruby level) +* marshal should not depend on sprintf (works bad with locale). +* ternary arg pow: a.pow(b,c) == a**b%c +* new caller(), e.g. call_stack; needs better name. +* pointer share mechanism similar to one in String for Array. +* require "1.6" etc. by /usr/lib/ruby/1.6/1.6.rb ;-) +* save both "feature names" and "normalized path" in $" +* implement Mutex_m (or MutexMixin) using Mutex. + +Extension Libraries + +* ptk.rb pTk wrapper that is compatible to tk.rb +* Berkeley DB extension +* BitVector +* thread-safe fcgi + +Ruby Libraries + +- urllib.rb, nttplib.rb, etc. +* format like perl's + +Tools + +* freeze or undump to bundle everything +* bundle using zlib diff --git a/lib/ruby-1.9.1-rc1/array.c b/lib/ruby-1.9.1-rc1/array.c new file mode 100644 index 0000000..4e49da2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/array.c @@ -0,0 +1,3876 @@ +/********************************************************************** + + array.c - + + $Author: yugui $ + created at: Fri Aug 6 09:46:12 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/util.h" +#include "ruby/st.h" + +#ifndef ARRAY_DEBUG +# define NDEBUG +#endif +#include + +VALUE rb_cArray; + +static ID id_cmp; + +#define ARY_DEFAULT_SIZE 16 +#define ARY_MAX_SIZE (LONG_MAX / sizeof(VALUE)) + +void +rb_mem_clear(register VALUE *mem, register long size) +{ + while (size--) { + *mem++ = Qnil; + } +} + +static inline void +memfill(register VALUE *mem, register long size, register VALUE val) +{ + while (size--) { + *mem++ = val; + } +} + +# define ARY_SHARED_P(ary) \ + (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \ + FL_TEST(ary,ELTS_SHARED)) +# define ARY_EMBED_P(ary) \ + (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \ + FL_TEST(ary, RARRAY_EMBED_FLAG)) + +#define ARY_HEAP_PTR(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.ptr) +#define ARY_HEAP_LEN(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.len) +#define ARY_EMBED_PTR(a) (assert(ARY_EMBED_P(a)), RARRAY(a)->as.ary) +#define ARY_EMBED_LEN(a) \ + (assert(ARY_EMBED_P(a)), \ + (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \ + (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))) + +#define ARY_OWNS_HEAP_P(a) (!FL_TEST(a, ELTS_SHARED|RARRAY_EMBED_FLAG)) +#define FL_SET_EMBED(a) do { \ + assert(!ARY_SHARED_P(a)); \ + assert(!OBJ_FROZEN(a)); \ + FL_SET(a, RARRAY_EMBED_FLAG); \ +} while (0) +#define FL_UNSET_EMBED(ary) FL_UNSET(ary, RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK) +#define FL_SET_SHARED(ary) do { \ + assert(!ARY_EMBED_P(ary)); \ + FL_SET(ary, ELTS_SHARED); \ +} while (0) +#define FL_UNSET_SHARED(ary) FL_UNSET(ary, ELTS_SHARED) + +#define ARY_SET_PTR(ary, p) do { \ + assert(!ARY_EMBED_P(ary)); \ + assert(!OBJ_FROZEN(ary)); \ + RARRAY(ary)->as.heap.ptr = (p); \ +} while (0) +#define ARY_SET_EMBED_LEN(ary, n) do { \ + long tmp_n = n; \ + assert(ARY_EMBED_P(ary)); \ + assert(!OBJ_FROZEN(ary)); \ + RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK; \ + RBASIC(ary)->flags |= (tmp_n) << RARRAY_EMBED_LEN_SHIFT; \ +} while (0) +#define ARY_SET_HEAP_LEN(ary, n) do { \ + assert(!ARY_EMBED_P(ary)); \ + RARRAY(ary)->as.heap.len = n; \ +} while (0) +#define ARY_SET_LEN(ary, n) do { \ + if (ARY_EMBED_P(ary)) { \ + ARY_SET_EMBED_LEN(ary, n); \ + } \ + else { \ + ARY_SET_HEAP_LEN(ary, n); \ + } \ + assert(RARRAY_LEN(ary) == n); \ +} while (0) +#define ARY_INCREASE_PTR(ary, n) do { \ + assert(!ARY_EMBED_P(ary)); \ + assert(!OBJ_FROZEN(ary)); \ + RARRAY(ary)->as.heap.ptr += n; \ +} while (0) +#define ARY_INCREASE_LEN(ary, n) do { \ + assert(!OBJ_FROZEN(ary)); \ + if (ARY_EMBED_P(ary)) { \ + ARY_SET_EMBED_LEN(ary, RARRAY_LEN(ary)+n); \ + } \ + else { \ + RARRAY(ary)->as.heap.len += n; \ + } \ +} while (0) + +#define ARY_CAPA(ary) (ARY_EMBED_P(ary) ? RARRAY_EMBED_LEN_MAX : \ + ARY_SHARED_ROOT_P(ary) ? RARRAY_LEN(ary) : RARRAY(ary)->as.heap.aux.capa) +#define ARY_SET_CAPA(ary, n) do { \ + assert(!ARY_EMBED_P(ary)); \ + assert(!ARY_SHARED_P(ary)); \ + assert(!OBJ_FROZEN(ary)); \ + RARRAY(ary)->as.heap.aux.capa = (n); \ +} while (0) + +#define ARY_SHARED(ary) (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared) +#define ARY_SET_SHARED(ary, value) do { \ + assert(!ARY_EMBED_P(ary)); \ + assert(ARY_SHARED_P(ary)); \ + assert(ARY_SHARED_ROOT_P(value)); \ + RARRAY(ary)->as.heap.aux.shared = (value); \ +} while (0) +#define RARRAY_SHARED_ROOT_FLAG FL_USER5 +#define ARY_SHARED_ROOT_P(ary) (FL_TEST(ary, RARRAY_SHARED_ROOT_FLAG)) +#define ARY_SHARED_NUM(ary) \ + (assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa) +#define ARY_SET_SHARED_NUM(ary, value) do { \ + assert(ARY_SHARED_ROOT_P(ary)); \ + RARRAY(ary)->as.heap.aux.capa = (value); \ +} while (0) +#define FL_SET_SHARED_ROOT(ary) do { \ + assert(!ARY_EMBED_P(ary)); \ + FL_SET(ary, RARRAY_SHARED_ROOT_FLAG); \ +} while (0) + +static void +ary_resize_capa(VALUE ary, long capacity) +{ + assert(RARRAY_LEN(ary) <= capacity); + assert(!OBJ_FROZEN(ary)); + assert(!ARY_SHARED_P(ary)); + if (capacity > RARRAY_EMBED_LEN_MAX) { + if (ARY_EMBED_P(ary)) { + long len = ARY_EMBED_LEN(ary); + VALUE *ptr = ALLOC_N(VALUE, (capacity)); + MEMCPY(ptr, ARY_EMBED_PTR(ary), VALUE, len); + FL_UNSET_EMBED(ary); + ARY_SET_PTR(ary, ptr); + ARY_SET_HEAP_LEN(ary, len); + } + else { + REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, (capacity)); + } + ARY_SET_CAPA(ary, (capacity)); + } + else { + if (!ARY_EMBED_P(ary)) { + long len = RARRAY_LEN(ary); + VALUE *ptr = RARRAY_PTR(ary); + MEMCPY(RARRAY(ary)->as.ary, ptr, VALUE, len); + FL_SET_EMBED(ary); + ARY_SET_LEN(ary, len); + xfree(ptr); + } + } +} + +static void +rb_ary_decrement_share(VALUE shared) +{ + if (shared) { + int num = ARY_SHARED_NUM(shared) - 1; + if (num == 0) { + rb_ary_free(shared); + rb_gc_force_recycle(shared); + } + else if (num > 0) { + ARY_SET_SHARED_NUM(shared, num); + } + } +} + +static void +rb_ary_unshare(VALUE ary) +{ + VALUE shared = RARRAY(ary)->as.heap.aux.shared; + rb_ary_decrement_share(shared); + FL_UNSET_SHARED(ary); +} + +static inline void +rb_ary_unshare_safe(VALUE ary) { + if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) { + rb_ary_unshare(ary); + } +} + +static VALUE +rb_ary_increment_share(VALUE shared) { + int num = ARY_SHARED_NUM(shared); + if (num >= 0) { + ARY_SET_SHARED_NUM(shared, num + 1); + } + return shared; +} + +static void +rb_ary_set_shared(VALUE ary, VALUE shared) +{ + rb_ary_increment_share(shared); + FL_SET_SHARED(ary); + ARY_SET_SHARED(ary, shared); +} + +static inline void +rb_ary_modify_check(VALUE ary) +{ + if (OBJ_FROZEN(ary)) rb_error_frozen("array"); + if (!OBJ_UNTRUSTED(ary) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't modify array"); +} + +static void +rb_ary_modify(VALUE ary) +{ + rb_ary_modify_check(ary); + if (ARY_SHARED_P(ary)) { + long len = RARRAY_LEN(ary); + if (len <= RARRAY_EMBED_LEN_MAX) { + VALUE *ptr = ARY_HEAP_PTR(ary); + VALUE shared = ARY_SHARED(ary); + FL_UNSET_SHARED(ary); + FL_SET_EMBED(ary); + MEMCPY(ARY_EMBED_PTR(ary), ptr, VALUE, len); + rb_ary_decrement_share(shared); + ARY_SET_EMBED_LEN(ary, len); + } + else { + VALUE *ptr = ALLOC_N(VALUE, len); + MEMCPY(ptr, RARRAY_PTR(ary), VALUE, len); + rb_ary_unshare(ary); + ARY_SET_CAPA(ary, len); + ARY_SET_PTR(ary, ptr); + } + } +} + +VALUE +rb_ary_freeze(VALUE ary) +{ + return rb_obj_freeze(ary); +} + +/* + * call-seq: + * array.frozen? -> true or false + * + * Return true if this array is frozen (or temporarily frozen + * while being sorted). + */ + +static VALUE +rb_ary_frozen_p(VALUE ary) +{ + if (OBJ_FROZEN(ary)) return Qtrue; + return Qfalse; +} + +static VALUE +ary_alloc(VALUE klass) +{ + NEWOBJ(ary, struct RArray); + OBJSETUP(ary, klass, T_ARRAY); + FL_SET_EMBED((VALUE)ary); + ARY_SET_EMBED_LEN((VALUE)ary, 0); + + return (VALUE)ary; +} + +static VALUE +ary_new(VALUE klass, long len) +{ + VALUE ary; + + if (len < 0) { + rb_raise(rb_eArgError, "negative array size (or size too big)"); + } + if (len > ARY_MAX_SIZE) { + rb_raise(rb_eArgError, "array size too big"); + } + ary = ary_alloc(klass); + if (len > RARRAY_EMBED_LEN_MAX) { + FL_UNSET_EMBED(ary); + ARY_SET_PTR(ary, ALLOC_N(VALUE, len)); + ARY_SET_CAPA(ary, len); + ARY_SET_HEAP_LEN(ary, 0); + } + + return ary; +} + +VALUE +rb_ary_new2(long len) +{ + return ary_new(rb_cArray, len); +} + + +VALUE +rb_ary_new(void) +{ + return rb_ary_new2(RARRAY_EMBED_LEN_MAX); +} + +#include + +VALUE +rb_ary_new3(long n, ...) +{ + va_list ar; + VALUE ary; + long i; + + ary = rb_ary_new2(n); + + va_start(ar, n); + for (i=0; i 0 && elts) { + MEMCPY(RARRAY_PTR(ary), elts, VALUE, n); + ARY_SET_LEN(ary, n); + } + + return ary; +} + +VALUE +rb_ary_tmp_new(long len) +{ + return ary_new(0, len); +} + +void +rb_ary_free(VALUE ary) +{ + if (ARY_OWNS_HEAP_P(ary)) { + xfree(RARRAY_PTR(ary)); + } +} + +static VALUE +ary_make_shared(VALUE ary) +{ + assert(!ARY_EMBED_P(ary)); + if (ARY_SHARED_P(ary)) { + return ARY_SHARED(ary); + } + else { + NEWOBJ(shared, struct RArray); + OBJSETUP(shared, 0, T_ARRAY); + FL_UNSET_EMBED(shared); + + ARY_SET_LEN((VALUE)shared, RARRAY_LEN(ary)); + ARY_SET_PTR((VALUE)shared, RARRAY_PTR(ary)); + FL_SET_SHARED_ROOT(shared); + ARY_SET_SHARED_NUM((VALUE)shared, 1); + FL_SET_SHARED(ary); + ARY_SET_SHARED(ary, (VALUE)shared); + OBJ_FREEZE(shared); + return (VALUE)shared; + } +} + + +static VALUE +ary_make_substitution(VALUE ary) +{ + if (RARRAY_LEN(ary) <= RARRAY_EMBED_LEN_MAX) { + VALUE subst = rb_ary_new2(RARRAY_LEN(ary)); + MEMCPY(ARY_EMBED_PTR(subst), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary)); + ARY_SET_EMBED_LEN(subst, RARRAY_LEN(ary)); + return subst; + } + else { + return rb_ary_increment_share(ary_make_shared(ary)); + } +} + +VALUE +rb_assoc_new(VALUE car, VALUE cdr) +{ + return rb_ary_new3(2, car, cdr); +} + +static VALUE +to_ary(VALUE ary) +{ + return rb_convert_type(ary, T_ARRAY, "Array", "to_ary"); +} + +VALUE +rb_check_array_type(VALUE ary) +{ + return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary"); +} + +/* + * call-seq: + * Array.try_convert(obj) -> array or nil + * + * Try to convert obj into an array, using to_ary method. + * Returns converted array or nil if obj cannot be converted + * for any reason. This method is to check if an argument is an + * array. + * + * Array.try_convert([1]) # => [1] + * Array.try_convert("1") # => nil + * + * if tmp = Array.try_convert(arg) + * # the argument is an array + * elsif tmp = String.try_convert(arg) + * # the argument is a string + * end + * + */ + +static VALUE +rb_ary_s_try_convert(VALUE dummy, VALUE ary) +{ + return rb_check_array_type(ary); +} + +/* + * call-seq: + * Array.new(size=0, obj=nil) + * Array.new(array) + * Array.new(size) {|index| block } + * + * Returns a new array. In the first form, the new array is + * empty. In the second it is created with _size_ copies of _obj_ + * (that is, _size_ references to the same + * _obj_). The third form creates a copy of the array + * passed as a parameter (the array is generated by calling + * to_ary on the parameter). In the last form, an array + * of the given size is created. Each element in this array is + * calculated by passing the element's index to the given block and + * storing the return value. + * + * Array.new + * Array.new(2) + * Array.new(5, "A") + * + * # only one copy of the object is created + * a = Array.new(2, Hash.new) + * a[0]['cat'] = 'feline' + * a + * a[1]['cat'] = 'Felix' + * a + * + * # here multiple copies are created + * a = Array.new(2) { Hash.new } + * a[0]['cat'] = 'feline' + * a + * + * squares = Array.new(5) {|i| i*i} + * squares + * + * copy = Array.new(squares) + */ + +static VALUE +rb_ary_initialize(int argc, VALUE *argv, VALUE ary) +{ + long len; + VALUE size, val; + + rb_ary_modify(ary); + if (argc == 0) { + if (ARY_OWNS_HEAP_P(ary) && RARRAY_PTR(ary)) { + xfree(RARRAY_PTR(ary)); + } + rb_ary_unshare_safe(ary); + FL_SET_EMBED(ary); + ARY_SET_EMBED_LEN(ary, 0); + if (rb_block_given_p()) { + rb_warning("given block not used"); + } + return ary; + } + rb_scan_args(argc, argv, "02", &size, &val); + if (argc == 1 && !FIXNUM_P(size)) { + val = rb_check_array_type(size); + if (!NIL_P(val)) { + rb_ary_replace(ary, val); + return ary; + } + } + + len = NUM2LONG(size); + if (len < 0) { + rb_raise(rb_eArgError, "negative array size"); + } + if (len > ARY_MAX_SIZE) { + rb_raise(rb_eArgError, "array size too big"); + } + rb_ary_modify(ary); + ary_resize_capa(ary, len); + if (rb_block_given_p()) { + long i; + + if (argc == 2) { + rb_warn("block supersedes default value argument"); + } + for (i=0; i 0 && argv) { + MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc); + ARY_SET_LEN(ary, argc); + } + + return ary; +} + +void +rb_ary_store(VALUE ary, long idx, VALUE val) +{ + if (idx < 0) { + idx += RARRAY_LEN(ary); + if (idx < 0) { + rb_raise(rb_eIndexError, "index %ld out of array", + idx - RARRAY_LEN(ary)); + } + } + else if (idx >= ARY_MAX_SIZE) { + rb_raise(rb_eIndexError, "index %ld too big", idx); + } + + rb_ary_modify(ary); + if (idx >= ARY_CAPA(ary)) { + long new_capa = ARY_CAPA(ary) / 2; + + if (new_capa < ARY_DEFAULT_SIZE) { + new_capa = ARY_DEFAULT_SIZE; + } + if (new_capa >= ARY_MAX_SIZE - idx) { + new_capa = (ARY_MAX_SIZE - idx) / 2; + } + new_capa += idx; + ary_resize_capa(ary, new_capa); + } + if (idx > RARRAY_LEN(ary)) { + rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), + idx-RARRAY_LEN(ary) + 1); + } + + if (idx >= RARRAY_LEN(ary)) { + ARY_SET_LEN(ary, idx + 1); + } + RARRAY_PTR(ary)[idx] = val; +} + +static VALUE +ary_make_partial(VALUE ary, VALUE klass, long offset, long len) +{ + assert(offset >= 0); + assert(len >= 0); + assert(offset+len <= RARRAY_LEN(ary)); + + if (len <= RARRAY_EMBED_LEN_MAX) { + VALUE result = ary_alloc(klass); + MEMCPY(ARY_EMBED_PTR(result), RARRAY_PTR(ary) + offset, VALUE, len); + ARY_SET_EMBED_LEN(result, len); + return result; + } + else { + VALUE shared, result = ary_alloc(klass); + FL_UNSET_EMBED(result); + + shared = ary_make_shared(ary); + ARY_SET_PTR(result, RARRAY_PTR(ary)); + ARY_SET_LEN(result, RARRAY_LEN(ary)); + rb_ary_set_shared(result, shared); + + ARY_INCREASE_PTR(result, offset); + ARY_SET_LEN(result, len); + return result; + } +} + +enum ary_take_pos_flags +{ + ARY_TAKE_FIRST = 0, + ARY_TAKE_LAST = 1 +}; + +static VALUE +ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags last) +{ + VALUE nv; + long n; + long offset = 0; + + rb_scan_args(argc, argv, "1", &nv); + n = NUM2LONG(nv); + if (n > RARRAY_LEN(ary)) { + n = RARRAY_LEN(ary); + } + else if (n < 0) { + rb_raise(rb_eArgError, "negative array size"); + } + if (last) { + offset = RARRAY_LEN(ary) - n; + } + return ary_make_partial(ary, rb_cArray, offset, n); +} + +/* + * call-seq: + * array << obj -> array + * + * Append---Pushes the given object on to the end of this array. This + * expression returns the array itself, so several appends + * may be chained together. + * + * [ 1, 2 ] << "c" << "d" << [ 3, 4 ] + * #=> [ 1, 2, "c", "d", [ 3, 4 ] ] + * + */ + +VALUE +rb_ary_push(VALUE ary, VALUE item) +{ + rb_ary_store(ary, RARRAY_LEN(ary), item); + return ary; +} + +/* + * call-seq: + * array.push(obj, ... ) -> array + * + * Append---Pushes the given object(s) on to the end of this array. This + * expression returns the array itself, so several appends + * may be chained together. + * + * a = [ "a", "b", "c" ] + * a.push("d", "e", "f") + * #=> ["a", "b", "c", "d", "e", "f"] + */ + +static VALUE +rb_ary_push_m(int argc, VALUE *argv, VALUE ary) +{ + rb_ary_modify_check(ary); + while (argc--) { + rb_ary_push(ary, *argv++); + } + return ary; +} + +VALUE +rb_ary_pop(VALUE ary) +{ + long n; + rb_ary_modify_check(ary); + if (RARRAY_LEN(ary) == 0) return Qnil; + if (ARY_OWNS_HEAP_P(ary) && + RARRAY_LEN(ary) * 3 < ARY_CAPA(ary) && + ARY_CAPA(ary) > ARY_DEFAULT_SIZE) + { + ary_resize_capa(ary, RARRAY_LEN(ary) * 2); + } + n = RARRAY_LEN(ary)-1; + ARY_SET_LEN(ary, n); + return RARRAY_PTR(ary)[n]; +} + +/* + * call-seq: + * array.pop -> obj or nil + * array.pop(n) -> array + * + * Removes the last element from self and returns it, or + * nil if the array is empty. + * + * If a number _n_ is given, returns an array of the last n elements + * (or less) just like array.slice!(-n, n) does. + * + * a = [ "a", "b", "c", "d" ] + * a.pop #=> "d" + * a.pop(2) #=> ["b", "c"] + * a #=> ["a"] + */ + +static VALUE +rb_ary_pop_m(int argc, VALUE *argv, VALUE ary) +{ + VALUE result; + + if (argc == 0) { + return rb_ary_pop(ary); + } + + rb_ary_modify_check(ary); + result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST); + ARY_INCREASE_LEN(ary, -RARRAY_LEN(result)); + return result; +} + +VALUE +rb_ary_shift(VALUE ary) +{ + VALUE top; + + rb_ary_modify_check(ary); + if (RARRAY_LEN(ary) == 0) return Qnil; + top = RARRAY_PTR(ary)[0]; + if (!ARY_SHARED_P(ary)) { + if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) { + MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary)-1); + ARY_INCREASE_LEN(ary, -1); + return top; + } + assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */ + + RARRAY_PTR(ary)[0] = Qnil; + ary_make_shared(ary); + } + ARY_INCREASE_PTR(ary, 1); /* shift ptr */ + ARY_INCREASE_LEN(ary, -1); + + return top; +} + +/* + * call-seq: + * array.shift -> obj or nil + * array.shift(n) -> array + * + * Returns the first element of self and removes it (shifting all + * other elements down by one). Returns nil if the array + * is empty. + * + * If a number _n_ is given, returns an array of the first n elements + * (or less) just like array.slice!(0, n) does. + * + * args = [ "-m", "-q", "filename" ] + * args.shift #=> "-m" + * args #=> ["-q", "filename"] + * + * args = [ "-m", "-q", "filename" ] + * args.shift(2) #=> ["-m", "-q"] + * args #=> ["filename"] + */ + +static VALUE +rb_ary_shift_m(int argc, VALUE *argv, VALUE ary) +{ + VALUE result; + long n; + + if (argc == 0) { + return rb_ary_shift(ary); + } + + rb_ary_modify_check(ary); + result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST); + n = RARRAY_LEN(result); + if (ARY_SHARED_P(ary)) { + ARY_INCREASE_PTR(ary, n); + } + else { + MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n); + } + ARY_INCREASE_LEN(ary, -n); + + return result; +} + +/* + * call-seq: + * array.unshift(obj, ...) -> array + * + * Prepends objects to the front of array. + * other elements up one. + * + * a = [ "b", "c", "d" ] + * a.unshift("a") #=> ["a", "b", "c", "d"] + * a.unshift(1, 2) #=> [ 1, 2, "a", "b", "c", "d"] + */ + +static VALUE +rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary) +{ + long len; + + if (argc == 0) return ary; + rb_ary_modify(ary); + if (ARY_CAPA(ary) <= (len = RARRAY_LEN(ary)) + argc) { + ary_resize_capa(ary, len + argc + ARY_DEFAULT_SIZE); + } + + /* sliding items */ + MEMMOVE(RARRAY_PTR(ary) + argc, RARRAY_PTR(ary), VALUE, len); + MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc); + ARY_INCREASE_LEN(ary, argc); + + return ary; +} + +VALUE +rb_ary_unshift(VALUE ary, VALUE item) +{ + return rb_ary_unshift_m(1,&item,ary); +} + +/* faster version - use this if you don't need to treat negative offset */ +static inline VALUE +rb_ary_elt(VALUE ary, long offset) +{ + if (RARRAY_LEN(ary) == 0) return Qnil; + if (offset < 0 || RARRAY_LEN(ary) <= offset) { + return Qnil; + } + return RARRAY_PTR(ary)[offset]; +} + +VALUE +rb_ary_entry(VALUE ary, long offset) +{ + if (offset < 0) { + offset += RARRAY_LEN(ary); + } + return rb_ary_elt(ary, offset); +} + +VALUE +rb_ary_subseq(VALUE ary, long beg, long len) +{ + VALUE klass; + + if (beg > RARRAY_LEN(ary)) return Qnil; + if (beg < 0 || len < 0) return Qnil; + + if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) { + len = RARRAY_LEN(ary) - beg; + } + klass = rb_obj_class(ary); + if (len == 0) return ary_new(klass, 0); + + return ary_make_partial(ary, klass, beg, len); +} + +/* + * call-seq: + * array[index] -> obj or nil + * array[start, length] -> an_array or nil + * array[range] -> an_array or nil + * array.slice(index) -> obj or nil + * array.slice(start, length) -> an_array or nil + * array.slice(range) -> an_array or nil + * + * Element Reference---Returns the element at _index_, + * or returns a subarray starting at _start_ and + * continuing for _length_ elements, or returns a subarray + * specified by _range_. + * Negative indices count backward from the end of the + * array (-1 is the last element). Returns nil if the index + * (or starting index) are out of range. + * + * a = [ "a", "b", "c", "d", "e" ] + * a[2] + a[0] + a[1] #=> "cab" + * a[6] #=> nil + * a[1, 2] #=> [ "b", "c" ] + * a[1..3] #=> [ "b", "c", "d" ] + * a[4..7] #=> [ "e" ] + * a[6..10] #=> nil + * a[-3, 3] #=> [ "c", "d", "e" ] + * # special cases + * a[5] #=> nil + * a[5, 1] #=> [] + * a[5..10] #=> [] + * + */ + +VALUE +rb_ary_aref(int argc, VALUE *argv, VALUE ary) +{ + VALUE arg; + long beg, len; + + if (argc == 2) { + beg = NUM2LONG(argv[0]); + len = NUM2LONG(argv[1]); + if (beg < 0) { + beg += RARRAY_LEN(ary); + } + return rb_ary_subseq(ary, beg, len); + } + if (argc != 1) { + rb_scan_args(argc, argv, "11", 0, 0); + } + arg = argv[0]; + /* special case - speeding up */ + if (FIXNUM_P(arg)) { + return rb_ary_entry(ary, FIX2LONG(arg)); + } + /* check if idx is Range */ + switch (rb_range_beg_len(arg, &beg, &len, RARRAY_LEN(ary), 0)) { + case Qfalse: + break; + case Qnil: + return Qnil; + default: + return rb_ary_subseq(ary, beg, len); + } + return rb_ary_entry(ary, NUM2LONG(arg)); +} + +/* + * call-seq: + * array.at(index) -> obj or nil + * + * Returns the element at _index_. A + * negative index counts from the end of _self_. Returns +nil+ + * if the index is out of range. See also Array#[]. + * + * a = [ "a", "b", "c", "d", "e" ] + * a.at(0) #=> "a" + * a.at(-1) #=> "e" + */ + +static VALUE +rb_ary_at(VALUE ary, VALUE pos) +{ + return rb_ary_entry(ary, NUM2LONG(pos)); +} + +/* + * call-seq: + * array.first -> obj or nil + * array.first(n) -> an_array + * + * Returns the first element, or the first +n+ elements, of the array. + * If the array is empty, the first form returns nil, and the + * second form returns an empty array. + * + * a = [ "q", "r", "s", "t" ] + * a.first #=> "q" + * a.first(2) #=> ["q", "r"] + */ + +static VALUE +rb_ary_first(int argc, VALUE *argv, VALUE ary) +{ + if (argc == 0) { + if (RARRAY_LEN(ary) == 0) return Qnil; + return RARRAY_PTR(ary)[0]; + } + else { + return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST); + } +} + +/* + * call-seq: + * array.last -> obj or nil + * array.last(n) -> an_array + * + * Returns the last element(s) of self. If the array is empty, + * the first form returns nil. + * + * a = [ "w", "x", "y", "z" ] + * a.last #=> "z" + * a.last(2) #=> ["y", "z"] + */ + +VALUE +rb_ary_last(int argc, VALUE *argv, VALUE ary) +{ + if (argc == 0) { + if (RARRAY_LEN(ary) == 0) return Qnil; + return RARRAY_PTR(ary)[RARRAY_LEN(ary)-1]; + } + else { + return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST); + } +} + +/* + * call-seq: + * array.fetch(index) -> obj + * array.fetch(index, default ) -> obj + * array.fetch(index) {|index| block } -> obj + * + * Tries to return the element at position index. If the index + * lies outside the array, the first form throws an + * IndexError exception, the second form returns + * default, and the third form returns the value of invoking + * the block, passing in the index. Negative values of index + * count from the end of the array. + * + * a = [ 11, 22, 33, 44 ] + * a.fetch(1) #=> 22 + * a.fetch(-1) #=> 44 + * a.fetch(4, 'cat') #=> "cat" + * a.fetch(4) { |i| i*i } #=> 16 + */ + +static VALUE +rb_ary_fetch(int argc, VALUE *argv, VALUE ary) +{ + VALUE pos, ifnone; + long block_given; + long idx; + + rb_scan_args(argc, argv, "11", &pos, &ifnone); + block_given = rb_block_given_p(); + if (block_given && argc == 2) { + rb_warn("block supersedes default value argument"); + } + idx = NUM2LONG(pos); + + if (idx < 0) { + idx += RARRAY_LEN(ary); + } + if (idx < 0 || RARRAY_LEN(ary) <= idx) { + if (block_given) return rb_yield(pos); + if (argc == 1) { + rb_raise(rb_eIndexError, "index %ld out of array", idx); + } + return ifnone; + } + return RARRAY_PTR(ary)[idx]; +} + +/* + * call-seq: + * array.index(obj) -> int or nil + * array.index {|item| block} -> int or nil + * + * Returns the index of the first object in self such that is + * == to obj. If a block is given instead of an + * argument, returns first object for which block is true. + * Returns nil if no match is found. + * + * a = [ "a", "b", "c" ] + * a.index("b") #=> 1 + * a.index("z") #=> nil + * a.index{|x|x=="b"} #=> 1 + * + * This is an alias of #find_index. + */ + +static VALUE +rb_ary_index(int argc, VALUE *argv, VALUE ary) +{ + VALUE val; + long i; + + if (argc == 0) { + RETURN_ENUMERATOR(ary, 0, 0); + for (i=0; i int or nil + * + * Returns the index of the last object in array + * == to obj. If a block is given instead of an + * argument, returns first object for which block is + * true. Returns nil if no match is found. + * + * a = [ "a", "b", "b", "b", "c" ] + * a.rindex("b") #=> 3 + * a.rindex("z") #=> nil + * a.rindex{|x|x=="b"} #=> 3 + */ + +static VALUE +rb_ary_rindex(int argc, VALUE *argv, VALUE ary) +{ + VALUE val; + long i = RARRAY_LEN(ary); + + if (argc == 0) { + RETURN_ENUMERATOR(ary, 0, 0); + while (i--) { + if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) + return LONG2NUM(i); + if (i > RARRAY_LEN(ary)) { + i = RARRAY_LEN(ary); + } + } + return Qnil; + } + rb_scan_args(argc, argv, "01", &val); + while (i--) { + if (rb_equal(RARRAY_PTR(ary)[i], val)) + return LONG2NUM(i); + if (i > RARRAY_LEN(ary)) { + i = RARRAY_LEN(ary); + } + } + return Qnil; +} + +VALUE +rb_ary_to_ary(VALUE obj) +{ + if (TYPE(obj) == T_ARRAY) { + return obj; + } + if (rb_respond_to(obj, rb_intern("to_ary"))) { + return to_ary(obj); + } + return rb_ary_new3(1, obj); +} + +static void +rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl) +{ + long rlen; + + if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len); + if (beg < 0) { + beg += RARRAY_LEN(ary); + if (beg < 0) { + beg -= RARRAY_LEN(ary); + rb_raise(rb_eIndexError, "index %ld out of array", beg); + } + } + if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) { + len = RARRAY_LEN(ary) - beg; + } + + if (rpl == Qundef) { + rlen = 0; + } + else { + rpl = rb_ary_to_ary(rpl); + rlen = RARRAY_LEN(rpl); + } + rb_ary_modify(ary); + if (beg >= RARRAY_LEN(ary)) { + if (beg > ARY_MAX_SIZE - rlen) { + rb_raise(rb_eIndexError, "index %ld too big", beg); + } + len = beg + rlen; + if (len >= ARY_CAPA(ary)) { + ary_resize_capa(ary, len); + } + rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), beg - RARRAY_LEN(ary)); + if (rlen > 0) { + MEMCPY(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen); + } + ARY_SET_LEN(ary, len); + } + else { + long alen; + + alen = RARRAY_LEN(ary) + rlen - len; + if (alen >= ARY_CAPA(ary)) { + ary_resize_capa(ary, alen); + } + + if (len != rlen) { + MEMMOVE(RARRAY_PTR(ary) + beg + rlen, RARRAY_PTR(ary) + beg + len, + VALUE, RARRAY_LEN(ary) - (beg + len)); + ARY_SET_LEN(ary, alen); + } + if (rlen > 0) { + MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen); + } + } +} + +/* + * call-seq: + * array[index] = obj -> obj + * array[start, length] = obj or an_array or nil -> obj or an_array or nil + * array[range] = obj or an_array or nil -> obj or an_array or nil + * + * Element Assignment---Sets the element at _index_, + * or replaces a subarray starting at _start_ and + * continuing for _length_ elements, or replaces a subarray + * specified by _range_. If indices are greater than + * the current capacity of the array, the array grows + * automatically. A negative indices will count backward + * from the end of the array. Inserts elements if _length_ is + * zero. An +IndexError+ is raised if a negative index points + * past the beginning of the array. See also + * Array#push, and Array#unshift. + * + * a = Array.new + * a[4] = "4"; #=> [nil, nil, nil, nil, "4"] + * a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"] + * a[1..2] = [ 1, 2 ] #=> ["a", 1, 2, nil, "4"] + * a[0, 2] = "?" #=> ["?", 2, nil, "4"] + * a[0..2] = "A" #=> ["A", "4"] + * a[-1] = "Z" #=> ["A", "Z"] + * a[1..-1] = nil #=> ["A", nil] + * a[1..-1] = [] #=> ["A"] + */ + +static VALUE +rb_ary_aset(int argc, VALUE *argv, VALUE ary) +{ + long offset, beg, len; + + if (argc == 3) { + rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]); + return argv[2]; + } + if (argc != 2) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); + } + if (FIXNUM_P(argv[0])) { + offset = FIX2LONG(argv[0]); + goto fixnum; + } + if (rb_range_beg_len(argv[0], &beg, &len, RARRAY_LEN(ary), 1)) { + /* check if idx is Range */ + rb_ary_splice(ary, beg, len, argv[1]); + return argv[1]; + } + + offset = NUM2LONG(argv[0]); +fixnum: + rb_ary_store(ary, offset, argv[1]); + return argv[1]; +} + +/* + * call-seq: + * array.insert(index, obj...) -> array + * + * Inserts the given values before the element with the given index + * (which may be negative). + * + * a = %w{ a b c d } + * a.insert(2, 99) #=> ["a", "b", 99, "c", "d"] + * a.insert(-2, 1, 2, 3) #=> ["a", "b", 99, "c", 1, 2, 3, "d"] + */ + +static VALUE +rb_ary_insert(int argc, VALUE *argv, VALUE ary) +{ + long pos; + + if (argc == 1) return ary; + if (argc < 1) { + rb_raise(rb_eArgError, "wrong number of arguments (at least 1)"); + } + pos = NUM2LONG(argv[0]); + if (pos == -1) { + pos = RARRAY_LEN(ary); + } + if (pos < 0) { + pos++; + } + rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1)); + return ary; +} + +/* + * call-seq: + * array.each {|item| block } -> array + * + * Calls block once for each element in self, passing that + * element as a parameter. + * + * a = [ "a", "b", "c" ] + * a.each {|x| print x, " -- " } + * + * produces: + * + * a -- b -- c -- + */ + +VALUE +rb_ary_each(VALUE ary) +{ + long i; + + RETURN_ENUMERATOR(ary, 0, 0); + for (i=0; i array + * + * Same as Array#each, but passes the index of the element + * instead of the element itself. + * + * a = [ "a", "b", "c" ] + * a.each_index {|x| print x, " -- " } + * + * produces: + * + * 0 -- 1 -- 2 -- + */ + +static VALUE +rb_ary_each_index(VALUE ary) +{ + long i; + RETURN_ENUMERATOR(ary, 0, 0); + + for (i=0; iArray#each, but traverses self in reverse + * order. + * + * a = [ "a", "b", "c" ] + * a.reverse_each {|x| print x, " " } + * + * produces: + * + * c b a + */ + +static VALUE +rb_ary_reverse_each(VALUE ary) +{ + long len; + + RETURN_ENUMERATOR(ary, 0, 0); + len = RARRAY_LEN(ary); + while (len--) { + rb_yield(RARRAY_PTR(ary)[len]); + if (RARRAY_LEN(ary) < len) { + len = RARRAY_LEN(ary); + } + } + return ary; +} + +/* + * call-seq: + * array.length -> int + * + * Returns the number of elements in self. May be zero. + * + * [ 1, 2, 3, 4, 5 ].length #=> 5 + */ + +static VALUE +rb_ary_length(VALUE ary) +{ + long len = RARRAY_LEN(ary); + return LONG2NUM(len); +} + +/* + * call-seq: + * array.empty? -> true or false + * + * Returns true if self array contains no elements. + * + * [].empty? #=> true + */ + +static VALUE +rb_ary_empty_p(VALUE ary) +{ + if (RARRAY_LEN(ary) == 0) + return Qtrue; + return Qfalse; +} + +VALUE +rb_ary_dup(VALUE ary) +{ + VALUE dup = rb_ary_new2(RARRAY_LEN(ary)); + int is_embed = ARY_EMBED_P(dup); + DUPSETUP(dup, ary); + if (is_embed) FL_SET_EMBED(dup); + MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary)); + ARY_SET_LEN(dup, RARRAY_LEN(ary)); + + return dup; +} + +extern VALUE rb_output_fs; + +static VALUE +recursive_join(VALUE ary, VALUE argp, int recur) +{ + VALUE *arg = (VALUE *)argp; + if (recur) { + return rb_usascii_str_new2("[...]"); + } + return rb_ary_join(arg[0], arg[1]); +} + +VALUE +rb_ary_join(VALUE ary, VALUE sep) +{ + long len = 1, i; + int taint = Qfalse; + int untrust = Qfalse; + VALUE result, tmp; + + if (RARRAY_LEN(ary) == 0) return rb_str_new(0, 0); + if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue; + if (OBJ_UNTRUSTED(ary) || OBJ_UNTRUSTED(sep)) untrust = Qtrue; + + for (i=0; i 0 && !NIL_P(sep)) + rb_str_buf_append(result, sep); + rb_str_buf_append(result, tmp); + if (OBJ_TAINTED(tmp)) taint = Qtrue; + if (OBJ_UNTRUSTED(tmp)) untrust = Qtrue; + } + + if (taint) OBJ_TAINT(result); + if (untrust) OBJ_UNTRUST(result); + return result; +} + +/* + * call-seq: + * array.join(sep=$,) -> str + * + * Returns a string created by converting each element of the array to + * a string, separated by sep. + * + * [ "a", "b", "c" ].join #=> "abc" + * [ "a", "b", "c" ].join("-") #=> "a-b-c" + */ + +static VALUE +rb_ary_join_m(int argc, VALUE *argv, VALUE ary) +{ + VALUE sep; + + rb_scan_args(argc, argv, "01", &sep); + if (NIL_P(sep)) sep = rb_output_fs; + + return rb_ary_join(ary, sep); +} + +static VALUE +inspect_ary(VALUE ary, VALUE dummy, int recur) +{ + int tainted = OBJ_TAINTED(ary); + int untrust = OBJ_UNTRUSTED(ary); + long i; + VALUE s, str; + + if (recur) return rb_tainted_str_new2("[...]"); + str = rb_str_buf_new2("["); + for (i=0; i 0) rb_str_buf_cat2(str, ", "); + rb_str_buf_append(str, s); + } + rb_str_buf_cat2(str, "]"); + if (tainted) OBJ_TAINT(str); + if (untrust) OBJ_UNTRUST(str); + return str; +} + +/* + * call-seq: + * array.to_s -> string + * array.inspect -> string + * + * Create a printable version of array. + */ + +static VALUE +rb_ary_inspect(VALUE ary) +{ + if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new2("[]"); + return rb_exec_recursive(inspect_ary, ary, 0); +} + +VALUE +rb_ary_to_s(VALUE ary) +{ + return rb_ary_inspect(ary); +} + +/* + * call-seq: + * array.to_a -> array + * + * Returns _self_. If called on a subclass of Array, converts + * the receiver to an Array object. + */ + +static VALUE +rb_ary_to_a(VALUE ary) +{ + if (rb_obj_class(ary) != rb_cArray) { + VALUE dup = rb_ary_new2(RARRAY_LEN(ary)); + rb_ary_replace(dup, ary); + return dup; + } + return ary; +} + +/* + * call-seq: + * array.to_ary -> array + * + * Returns _self_. + */ + +static VALUE +rb_ary_to_ary_m(VALUE ary) +{ + return ary; +} + +VALUE +rb_ary_reverse(VALUE ary) +{ + VALUE *p1, *p2; + VALUE tmp; + + rb_ary_modify(ary); + if (RARRAY_LEN(ary) > 1) { + p1 = RARRAY_PTR(ary); + p2 = p1 + RARRAY_LEN(ary) - 1; /* points last item */ + + while (p1 < p2) { + tmp = *p1; + *p1++ = *p2; + *p2-- = tmp; + } + } + return ary; +} + +/* + * call-seq: + * array.reverse! -> array + * + * Reverses _self_ in place. + * + * a = [ "a", "b", "c" ] + * a.reverse! #=> ["c", "b", "a"] + * a #=> ["c", "b", "a"] + */ + +static VALUE +rb_ary_reverse_bang(VALUE ary) +{ + return rb_ary_reverse(ary); +} + +/* + * call-seq: + * array.reverse -> an_array + * + * Returns a new array containing self's elements in reverse order. + * + * [ "a", "b", "c" ].reverse #=> ["c", "b", "a"] + * [ 1 ].reverse #=> [1] + */ + +static VALUE +rb_ary_reverse_m(VALUE ary) +{ + return rb_ary_reverse(rb_ary_dup(ary)); +} + +struct ary_sort_data { + VALUE ary; + int opt_methods; + int opt_inited; +}; + +enum { + sort_opt_Fixnum, + sort_opt_String, + sort_optimizable_count +}; + +#define STRING_P(s) (TYPE(s) == T_STRING && CLASS_OF(s) == rb_cString) + +#define SORT_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(sort_opt_,type)) +#define SORT_OPTIMIZABLE(data, type) \ + ((data->opt_inited & SORT_OPTIMIZABLE_BIT(type)) ? \ + (data->opt_methods & SORT_OPTIMIZABLE_BIT(type)) : \ + ((data->opt_inited |= SORT_OPTIMIZABLE_BIT(type)), \ + rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \ + (data->opt_methods |= SORT_OPTIMIZABLE_BIT(type)))) + +static VALUE +sort_reentered(VALUE ary) +{ + if (RBASIC(ary)->klass) { + rb_raise(rb_eRuntimeError, "sort reentered"); + } + return Qnil; +} + +static int +sort_1(const void *ap, const void *bp, void *dummy) +{ + struct ary_sort_data *data = dummy; + VALUE retval = sort_reentered(data->ary); + VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp; + int n; + + retval = rb_yield_values(2, a, b); + n = rb_cmpint(retval, a, b); + sort_reentered(data->ary); + return n; +} + +static int +sort_2(const void *ap, const void *bp, void *dummy) +{ + struct ary_sort_data *data = dummy; + VALUE retval = sort_reentered(data->ary); + VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp; + int n; + + if (FIXNUM_P(a) && FIXNUM_P(b) && SORT_OPTIMIZABLE(data, Fixnum)) { + if ((long)a > (long)b) return 1; + if ((long)a < (long)b) return -1; + return 0; + } + if (STRING_P(a) && STRING_P(b) && SORT_OPTIMIZABLE(data, String)) { + return rb_str_cmp(a, b); + } + + retval = rb_funcall(a, id_cmp, 1, b); + n = rb_cmpint(retval, a, b); + sort_reentered(data->ary); + + return n; +} + +/* + * call-seq: + * array.sort! -> array + * array.sort! {| a,b | block } -> array + * + * Sorts _self_. Comparisons for + * the sort will be done using the <=> operator or using + * an optional code block. The block implements a comparison between + * a and b, returning -1, 0, or +1. See also + * Enumerable#sort_by. + * + * a = [ "d", "a", "e", "c", "b" ] + * a.sort #=> ["a", "b", "c", "d", "e"] + * a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] + */ + +VALUE +rb_ary_sort_bang(VALUE ary) +{ + rb_ary_modify(ary); + assert(!ARY_SHARED_P(ary)); + if (RARRAY_LEN(ary) > 1) { + VALUE tmp = ary_make_substitution(ary); /* only ary refers tmp */ + struct ary_sort_data data; + + RBASIC(tmp)->klass = 0; + data.ary = tmp; + data.opt_methods = 0; + data.opt_inited = 0; + ruby_qsort(RARRAY_PTR(tmp), RARRAY_LEN(tmp), sizeof(VALUE), + rb_block_given_p()?sort_1:sort_2, &data); + + if (ARY_EMBED_P(tmp)) { + assert(ARY_EMBED_P(tmp)); + if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */ + rb_ary_unshare(ary); + } + FL_SET_EMBED(ary); + MEMCPY(RARRAY_PTR(ary), ARY_EMBED_PTR(tmp), VALUE, ARY_EMBED_LEN(tmp)); + ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp)); + } + else { + assert(!ARY_EMBED_P(tmp)); + if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) { + assert(!ARY_EMBED_P(ary)); + FL_UNSET_SHARED(ary); + ARY_SET_CAPA(ary, ARY_CAPA(tmp)); + } + else { + assert(!ARY_SHARED_P(tmp)); + if (ARY_EMBED_P(ary)) { + FL_UNSET_EMBED(ary); + } + else if (ARY_SHARED_P(ary)) { + /* ary might be destructively operated in the given block */ + rb_ary_unshare(ary); + } + else { + xfree(ARY_HEAP_PTR(ary)); + } + ARY_SET_PTR(ary, RARRAY_PTR(tmp)); + ARY_SET_HEAP_LEN(ary, RARRAY_LEN(tmp)); + ARY_SET_CAPA(ary, ARY_CAPA(tmp)); + } + /* tmp was lost ownership for the ptr */ + FL_UNSET(tmp, FL_FREEZE); + FL_SET_EMBED(tmp); + ARY_SET_EMBED_LEN(tmp, 0); + FL_SET(tmp, FL_FREEZE); + } + /* tmp will be GC'ed. */ + RBASIC(tmp)->klass = rb_cArray; + } + return ary; +} + +/* + * call-seq: + * array.sort -> an_array + * array.sort {| a,b | block } -> an_array + * + * Returns a new array created by sorting self. Comparisons for + * the sort will be done using the <=> operator or using + * an optional code block. The block implements a comparison between + * a and b, returning -1, 0, or +1. See also + * Enumerable#sort_by. + * + * a = [ "d", "a", "e", "c", "b" ] + * a.sort #=> ["a", "b", "c", "d", "e"] + * a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] + */ + +VALUE +rb_ary_sort(VALUE ary) +{ + ary = rb_ary_dup(ary); + rb_ary_sort_bang(ary); + return ary; +} + + +/* + * call-seq: + * array.collect {|item| block } -> an_array + * array.map {|item| block } -> an_array + * + * Invokes block once for each element of self. Creates a + * new array containing the values returned by the block. + * See also Enumerable#collect. + * + * a = [ "a", "b", "c", "d" ] + * a.collect {|x| x + "!" } #=> ["a!", "b!", "c!", "d!"] + * a #=> ["a", "b", "c", "d"] + */ + +static VALUE +rb_ary_collect(VALUE ary) +{ + long i; + VALUE collect; + + RETURN_ENUMERATOR(ary, 0, 0); + collect = rb_ary_new2(RARRAY_LEN(ary)); + for (i = 0; i < RARRAY_LEN(ary); i++) { + rb_ary_push(collect, rb_yield(RARRAY_PTR(ary)[i])); + } + return collect; +} + + +/* + * call-seq: + * array.collect! {|item| block } -> array + * array.map! {|item| block } -> array + * + * Invokes the block once for each element of _self_, replacing the + * element with the value returned by _block_. + * See also Enumerable#collect. + * + * a = [ "a", "b", "c", "d" ] + * a.collect! {|x| x + "!" } + * a #=> [ "a!", "b!", "c!", "d!" ] + */ + +static VALUE +rb_ary_collect_bang(VALUE ary) +{ + long i; + + RETURN_ENUMERATOR(ary, 0, 0); + rb_ary_modify(ary); + for (i = 0; i < RARRAY_LEN(ary); i++) { + rb_ary_store(ary, i, rb_yield(RARRAY_PTR(ary)[i])); + } + return ary; +} + +VALUE +rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long)) +{ + VALUE result = rb_ary_new2(argc); + long beg, len, i, j; + + for (i=0; i an_array + * + * Returns an array containing the elements in + * _self_ corresponding to the given selector(s). The selectors + * may be either integer indices or ranges. + * See also Array#select. + * + * a = %w{ a b c d e f } + * a.values_at(1, 3, 5) + * a.values_at(1, 3, 5, 7) + * a.values_at(-1, -3, -5, -7) + * a.values_at(1..3, 2...5) + */ + +static VALUE +rb_ary_values_at(int argc, VALUE *argv, VALUE ary) +{ + return rb_get_values_at(ary, RARRAY_LEN(ary), argc, argv, rb_ary_entry); +} + + +/* + * call-seq: + * array.select {|item| block } -> an_array + * + * Invokes the block passing in successive elements from array, + * returning an array containing those elements for which the block + * returns a true value (equivalent to Enumerable#select). + * + * a = %w{ a b c d e f } + * a.select {|v| v =~ /[aeiou]/} #=> ["a", "e"] + */ + +static VALUE +rb_ary_select(VALUE ary) +{ + VALUE result; + long i; + + RETURN_ENUMERATOR(ary, 0, 0); + result = rb_ary_new2(RARRAY_LEN(ary)); + for (i = 0; i < RARRAY_LEN(ary); i++) { + if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) { + rb_ary_push(result, rb_ary_elt(ary, i)); + } + } + return result; +} + +/* + * call-seq: + * array.delete(obj) -> obj or nil + * array.delete(obj) { block } -> obj or nil + * + * Deletes items from self that are equal to obj. If + * the item is not found, returns nil. If the optional + * code block is given, returns the result of block if the item + * is not found. + * + * a = [ "a", "b", "b", "b", "c" ] + * a.delete("b") #=> "b" + * a #=> ["a", "c"] + * a.delete("z") #=> nil + * a.delete("z") { "not found" } #=> "not found" + */ + +VALUE +rb_ary_delete(VALUE ary, VALUE item) +{ + VALUE v = item; + long i1, i2; + + for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) { + VALUE e = RARRAY_PTR(ary)[i1]; + + if (rb_equal(e, item)) { + v = e; + continue; + } + if (i1 != i2) { + rb_ary_store(ary, i2, e); + } + i2++; + } + if (RARRAY_LEN(ary) == i2) { + if (rb_block_given_p()) { + return rb_yield(item); + } + return Qnil; + } + + rb_ary_modify(ary); + if (RARRAY_LEN(ary) > i2) { + ARY_SET_LEN(ary, i2); + if (i2 * 2 < ARY_CAPA(ary) && + ARY_CAPA(ary) > ARY_DEFAULT_SIZE) { + ary_resize_capa(ary, i2*2); + } + } + + return v; +} + +VALUE +rb_ary_delete_at(VALUE ary, long pos) +{ + long len = RARRAY_LEN(ary); + VALUE del; + + if (pos >= len) return Qnil; + if (pos < 0) { + pos += len; + if (pos < 0) return Qnil; + } + + rb_ary_modify(ary); + del = RARRAY_PTR(ary)[pos]; + MEMMOVE(RARRAY_PTR(ary)+pos, RARRAY_PTR(ary)+pos+1, VALUE, + RARRAY_LEN(ary)-pos-1); + ARY_INCREASE_LEN(ary, -1); + + return del; +} + +/* + * call-seq: + * array.delete_at(index) -> obj or nil + * + * Deletes the element at the specified index, returning that element, + * or nil if the index is out of range. See also + * Array#slice!. + * + * a = %w( ant bat cat dog ) + * a.delete_at(2) #=> "cat" + * a #=> ["ant", "bat", "dog"] + * a.delete_at(99) #=> nil + */ + +static VALUE +rb_ary_delete_at_m(VALUE ary, VALUE pos) +{ + return rb_ary_delete_at(ary, NUM2LONG(pos)); +} + +/* + * call-seq: + * array.slice!(index) -> obj or nil + * array.slice!(start, length) -> sub_array or nil + * array.slice!(range) -> sub_array or nil + * + * Deletes the element(s) given by an index (optionally with a length) + * or by a range. Returns the deleted object, subarray, or + * nil if the index is out of range. + * + * a = [ "a", "b", "c" ] + * a.slice!(1) #=> "b" + * a #=> ["a", "c"] + * a.slice!(-1) #=> "c" + * a #=> ["a"] + * a.slice!(100) #=> nil + * a #=> ["a"] + */ + +static VALUE +rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary) +{ + VALUE arg1, arg2; + long pos, len, orig_len; + + rb_ary_modify_check(ary); + if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) { + pos = NUM2LONG(arg1); + len = NUM2LONG(arg2); + delete_pos_len: + if (len < 0) return Qnil; + orig_len = RARRAY_LEN(ary); + if (pos < 0) { + pos += orig_len; + if (pos < 0) return Qnil; + } + else if (orig_len < pos) return Qnil; + if (orig_len < pos + len) { + len = orig_len - pos; + } + if (len == 0) return rb_ary_new2(0); + arg2 = rb_ary_new4(len, RARRAY_PTR(ary)+pos); + RBASIC(arg2)->klass = rb_obj_class(ary); + rb_ary_splice(ary, pos, len, Qundef); + return arg2; + } + + if (!FIXNUM_P(arg1)) { + switch (rb_range_beg_len(arg1, &pos, &len, RARRAY_LEN(ary), 0)) { + case Qtrue: + /* valid range */ + goto delete_pos_len; + case Qnil: + /* invalid range */ + return Qnil; + default: + /* not a range */ + break; + } + } + + return rb_ary_delete_at(ary, NUM2LONG(arg1)); +} + +/* + * call-seq: + * array.reject! {|item| block } -> array or nil + * + * Equivalent to Array#delete_if, deleting elements from + * _self_ for which the block evaluates to true, but returns + * nil if no changes were made. Also see + * Enumerable#reject. + */ + +static VALUE +rb_ary_reject_bang(VALUE ary) +{ + long i1, i2; + + RETURN_ENUMERATOR(ary, 0, 0); + rb_ary_modify(ary); + for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) { + VALUE v = RARRAY_PTR(ary)[i1]; + if (RTEST(rb_yield(v))) continue; + if (i1 != i2) { + rb_ary_store(ary, i2, v); + } + i2++; + } + + if (RARRAY_LEN(ary) == i2) return Qnil; + if (i2 < RARRAY_LEN(ary)) + ARY_SET_LEN(ary, i2); + return ary; +} + +/* + * call-seq: + * array.reject {|item| block } -> an_array + * + * Returns a new array containing the items in _self_ + * for which the block is not true. + */ + +static VALUE +rb_ary_reject(VALUE ary) +{ + RETURN_ENUMERATOR(ary, 0, 0); + ary = rb_ary_dup(ary); + rb_ary_reject_bang(ary); + return ary; +} + +/* + * call-seq: + * array.delete_if {|item| block } -> array + * + * Deletes every element of self for which block evaluates + * to true. + * + * a = [ "a", "b", "c" ] + * a.delete_if {|x| x >= "b" } #=> ["a"] + */ + +static VALUE +rb_ary_delete_if(VALUE ary) +{ + RETURN_ENUMERATOR(ary, 0, 0); + rb_ary_reject_bang(ary); + return ary; +} + +static VALUE +take_i(VALUE val, VALUE *args, int argc, VALUE *argv) +{ + if (args[1]-- == 0) rb_iter_break(); + if (argc > 1) val = rb_ary_new4(argc, argv); + rb_ary_push(args[0], val); + return Qnil; +} + +static VALUE +take_items(VALUE obj, long n) +{ + VALUE result = rb_ary_new2(n); + VALUE args[2]; + + args[0] = result; args[1] = (VALUE)n; + rb_block_call(obj, rb_intern("each"), 0, 0, take_i, (VALUE)args); + return result; +} + + +/* + * call-seq: + * array.zip(arg, ...) -> an_array + * array.zip(arg, ...) {| arr | block } -> nil + * + * Converts any arguments to arrays, then merges elements of + * self with corresponding elements from each argument. This + * generates a sequence of self.size n-element + * arrays, where n is one more that the count of arguments. If + * the size of any argument is less than enumObj.size, + * nil values are supplied. If a block given, it is + * invoked for each output array, otherwise an array of arrays is + * returned. + * + * a = [ 4, 5, 6 ] + * b = [ 7, 8, 9 ] + * [1,2,3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]] + * [1,2].zip(a,b) #=> [[1, 4, 7], [2, 5, 8]] + * a.zip([1,2],[8]) #=> [[4,1,8], [5,2,nil], [6,nil,nil]] + */ + +static VALUE +rb_ary_zip(int argc, VALUE *argv, VALUE ary) +{ + int i, j; + long len; + VALUE result = Qnil; + + len = RARRAY_LEN(ary); + for (i=0; i an_array + * + * Assumes that self is an array of arrays and transposes the + * rows and columns. + * + * a = [[1,2], [3,4], [5,6]] + * a.transpose #=> [[1, 3, 5], [2, 4, 6]] + */ + +static VALUE +rb_ary_transpose(VALUE ary) +{ + long elen = -1, alen, i, j; + VALUE tmp, result = 0; + + alen = RARRAY_LEN(ary); + if (alen == 0) return rb_ary_dup(ary); + for (i=0; i array + * + * Replaces the contents of self with the contents of + * other_array, truncating or expanding if necessary. + * + * a = [ "a", "b", "c", "d", "e" ] + * a.replace([ "x", "y", "z" ]) #=> ["x", "y", "z"] + * a #=> ["x", "y", "z"] + */ + +VALUE +rb_ary_replace(VALUE copy, VALUE orig) +{ + orig = to_ary(orig); + rb_ary_modify_check(copy); + if (copy == orig) return copy; + + if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) { + VALUE *ptr; + VALUE shared = 0; + + if (ARY_OWNS_HEAP_P(copy)) { + xfree(RARRAY_PTR(copy)); + } + else if (ARY_SHARED_P(copy)) { + shared = ARY_SHARED(copy); + FL_UNSET_SHARED(copy); + } + FL_SET_EMBED(copy); + ptr = RARRAY_PTR(orig); + MEMCPY(RARRAY_PTR(copy), ptr, VALUE, RARRAY_LEN(orig)); + if (shared) { + rb_ary_decrement_share(shared); + } + ARY_SET_LEN(copy, RARRAY_LEN(orig)); + } + else { + VALUE shared = ary_make_shared(orig); + if (ARY_OWNS_HEAP_P(copy)) { + xfree(RARRAY_PTR(copy)); + } else { + rb_ary_unshare_safe(copy); + } + FL_UNSET_EMBED(copy); + ARY_SET_PTR(copy, RARRAY_PTR(orig)); + ARY_SET_LEN(copy, RARRAY_LEN(orig)); + rb_ary_set_shared(copy, shared); + } + return copy; +} + +/* + * call-seq: + * array.clear -> array + * + * Removes all elements from _self_. + * + * a = [ "a", "b", "c", "d", "e" ] + * a.clear #=> [ ] + */ + +VALUE +rb_ary_clear(VALUE ary) +{ + rb_ary_modify(ary); + ARY_SET_LEN(ary, 0); + if (ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) { + ary_resize_capa(ary, ARY_DEFAULT_SIZE * 2); + } + return ary; +} + +/* + * call-seq: + * array.fill(obj) -> array + * array.fill(obj, start [, length]) -> array + * array.fill(obj, range ) -> array + * array.fill {|index| block } -> array + * array.fill(start [, length] ) {|index| block } -> array + * array.fill(range) {|index| block } -> array + * + * The first three forms set the selected elements of self (which + * may be the entire array) to obj. A start of + * nil is equivalent to zero. A length of + * nil is equivalent to self.length. The last three + * forms fill the array with the value of the block. The block is + * passed the absolute index of each element to be filled. + * + * a = [ "a", "b", "c", "d" ] + * a.fill("x") #=> ["x", "x", "x", "x"] + * a.fill("z", 2, 2) #=> ["x", "x", "z", "z"] + * a.fill("y", 0..1) #=> ["y", "y", "z", "z"] + * a.fill {|i| i*i} #=> [0, 1, 4, 9] + * a.fill(-2) {|i| i*i*i} #=> [0, 1, 8, 27] + */ + +static VALUE +rb_ary_fill(int argc, VALUE *argv, VALUE ary) +{ + VALUE item, arg1, arg2; + long beg = 0, end = 0, len = 0; + VALUE *p, *pend; + int block_p = Qfalse; + + if (rb_block_given_p()) { + block_p = Qtrue; + rb_scan_args(argc, argv, "02", &arg1, &arg2); + argc += 1; /* hackish */ + } + else { + rb_scan_args(argc, argv, "12", &item, &arg1, &arg2); + } + switch (argc) { + case 1: + beg = 0; + len = RARRAY_LEN(ary); + break; + case 2: + if (rb_range_beg_len(arg1, &beg, &len, RARRAY_LEN(ary), 1)) { + break; + } + /* fall through */ + case 3: + beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1); + if (beg < 0) { + beg = RARRAY_LEN(ary) + beg; + if (beg < 0) beg = 0; + } + len = NIL_P(arg2) ? RARRAY_LEN(ary) - beg : NUM2LONG(arg2); + break; + } + rb_ary_modify(ary); + if (len < 0) { + return ary; + } + if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) { + rb_raise(rb_eArgError, "argument too big"); + } + end = beg + len; + if (RARRAY_LEN(ary) < end) { + if (end >= ARY_CAPA(ary)) { + ary_resize_capa(ary, end); + } + rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), end - RARRAY_LEN(ary)); + ARY_SET_LEN(ary, end); + } + + if (block_p) { + VALUE v; + long i; + + for (i=beg; i=RARRAY_LEN(ary)) break; + RARRAY_PTR(ary)[i] = v; + } + } + else { + p = RARRAY_PTR(ary) + beg; + pend = p + len; + while (p < pend) { + *p++ = item; + } + } + return ary; +} + +/* + * call-seq: + * array + other_array -> an_array + * + * Concatenation---Returns a new array built by concatenating the + * two arrays together to produce a third array. + * + * [ 1, 2, 3 ] + [ 4, 5 ] #=> [ 1, 2, 3, 4, 5 ] + */ + +VALUE +rb_ary_plus(VALUE x, VALUE y) +{ + VALUE z; + long len; + + y = to_ary(y); + len = RARRAY_LEN(x) + RARRAY_LEN(y); + z = rb_ary_new2(len); + MEMCPY(RARRAY_PTR(z), RARRAY_PTR(x), VALUE, RARRAY_LEN(x)); + MEMCPY(RARRAY_PTR(z) + RARRAY_LEN(x), RARRAY_PTR(y), VALUE, RARRAY_LEN(y)); + ARY_SET_LEN(z, len); + return z; +} + +/* + * call-seq: + * array.concat(other_array) -> array + * + * Appends the elements in other_array to _self_. + * + * [ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ] + */ + + +VALUE +rb_ary_concat(VALUE x, VALUE y) +{ + y = to_ary(y); + if (RARRAY_LEN(y) > 0) { + rb_ary_splice(x, RARRAY_LEN(x), 0, y); + } + return x; +} + + +/* + * call-seq: + * array * int -> an_array + * array * str -> a_string + * + * Repetition---With a String argument, equivalent to + * self.join(str). Otherwise, returns a new array + * built by concatenating the _int_ copies of _self_. + * + * + * [ 1, 2, 3 ] * 3 #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ] + * [ 1, 2, 3 ] * "," #=> "1,2,3" + * + */ + +static VALUE +rb_ary_times(VALUE ary, VALUE times) +{ + VALUE ary2, tmp; + long i, len; + + tmp = rb_check_string_type(times); + if (!NIL_P(tmp)) { + return rb_ary_join(ary, tmp); + } + + len = NUM2LONG(times); + if (len == 0) { + ary2 = ary_new(rb_obj_class(ary), 0); + goto out; + } + if (len < 0) { + rb_raise(rb_eArgError, "negative argument"); + } + if (ARY_MAX_SIZE/len < RARRAY_LEN(ary)) { + rb_raise(rb_eArgError, "argument too big"); + } + len *= RARRAY_LEN(ary); + + ary2 = ary_new(rb_obj_class(ary), len); + ARY_SET_LEN(ary2, len); + + for (i=0; i an_array or nil + * + * Searches through an array whose elements are also arrays + * comparing _obj_ with the first element of each contained array + * using obj.==. + * Returns the first contained array that matches (that + * is, the first associated array), + * or +nil+ if no match is found. + * See also Array#rassoc. + * + * s1 = [ "colors", "red", "blue", "green" ] + * s2 = [ "letters", "a", "b", "c" ] + * s3 = "foo" + * a = [ s1, s2, s3 ] + * a.assoc("letters") #=> [ "letters", "a", "b", "c" ] + * a.assoc("foo") #=> nil + */ + +VALUE +rb_ary_assoc(VALUE ary, VALUE key) +{ + long i; + VALUE v; + + for (i = 0; i < RARRAY_LEN(ary); ++i) { + v = rb_check_array_type(RARRAY_PTR(ary)[i]); + if (!NIL_P(v) && RARRAY_LEN(v) > 0 && + rb_equal(RARRAY_PTR(v)[0], key)) + return v; + } + return Qnil; +} + +/* + * call-seq: + * array.rassoc(obj) -> an_array or nil + * + * Searches through the array whose elements are also arrays. Compares + * _obj_ with the second element of each contained array using + * ==. Returns the first contained array that matches. See + * also Array#assoc. + * + * a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ] + * a.rassoc("two") #=> [2, "two"] + * a.rassoc("four") #=> nil + */ + +VALUE +rb_ary_rassoc(VALUE ary, VALUE value) +{ + long i; + VALUE v; + + for (i = 0; i < RARRAY_LEN(ary); ++i) { + v = RARRAY_PTR(ary)[i]; + if (TYPE(v) == T_ARRAY && + RARRAY_LEN(v) > 1 && + rb_equal(RARRAY_PTR(v)[1], value)) + return v; + } + return Qnil; +} + +static VALUE +recursive_equal(VALUE ary1, VALUE ary2, int recur) +{ + long i; + + if (recur) return Qfalse; + for (i=0; i bool + * + * Equality---Two arrays are equal if they contain the same number + * of elements and if each element is equal to (according to + * Object.==) the corresponding element in the other array. + * + * [ "a", "c" ] == [ "a", "c", 7 ] #=> false + * [ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true + * [ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false + * + */ + +static VALUE +rb_ary_equal(VALUE ary1, VALUE ary2) +{ + if (ary1 == ary2) return Qtrue; + if (TYPE(ary2) != T_ARRAY) { + if (!rb_respond_to(ary2, rb_intern("to_ary"))) { + return Qfalse; + } + return rb_equal(ary2, ary1); + } + if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse; + return rb_exec_recursive(recursive_equal, ary1, ary2); +} + +static VALUE +recursive_eql(VALUE ary1, VALUE ary2, int recur) +{ + long i; + + if (recur) return Qfalse; + for (i=0; i true or false + * + * Returns true if _array_ and _other_ are the same object, + * or are both arrays with the same content. + */ + +static VALUE +rb_ary_eql(VALUE ary1, VALUE ary2) +{ + if (ary1 == ary2) return Qtrue; + if (TYPE(ary2) != T_ARRAY) return Qfalse; + if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse; + return rb_exec_recursive(recursive_eql, ary1, ary2); +} + +static VALUE +recursive_hash(VALUE ary, VALUE dummy, int recur) +{ + long i, h; + VALUE n; + + if (recur) { + return LONG2FIX(0); + } + h = RARRAY_LEN(ary); + for (i=0; i fixnum + * + * Compute a hash-code for this array. Two arrays with the same content + * will have the same hash code (and will compare using eql?). + */ + +static VALUE +rb_ary_hash(VALUE ary) +{ + return rb_exec_recursive(recursive_hash, ary, 0); +} + +/* + * call-seq: + * array.include?(obj) -> true or false + * + * Returns true if the given object is present in + * self (that is, if any object == anObject), + * false otherwise. + * + * a = [ "a", "b", "c" ] + * a.include?("b") #=> true + * a.include?("z") #=> false + */ + +VALUE +rb_ary_includes(VALUE ary, VALUE item) +{ + long i; + + for (i=0; i RARRAY_LEN(ary2)) { + len = RARRAY_LEN(ary2); + } + for (i=0; i other_array -> -1, 0, +1 + * + * Comparison---Returns an integer (-1, 0, + * or +1) if this array is less than, equal to, or greater than + * other_array. Each object in each array is compared + * (using <=>). If any value isn't + * equal, then that inequality is the return value. If all the + * values found are equal, then the return is based on a + * comparison of the array lengths. Thus, two arrays are + * ``equal'' according to Array#<=> if and only if they have + * the same length and the value of each element is equal to the + * value of the corresponding element in the other array. + * + * [ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1 + * [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1 + * + */ + +VALUE +rb_ary_cmp(VALUE ary1, VALUE ary2) +{ + long len; + VALUE v; + + ary2 = to_ary(ary2); + if (ary1 == ary2) return INT2FIX(0); + v = rb_exec_recursive(recursive_cmp, ary1, ary2); + if (v != Qundef) return v; + len = RARRAY_LEN(ary1) - RARRAY_LEN(ary2); + if (len == 0) return INT2FIX(0); + if (len > 0) return INT2FIX(1); + return INT2FIX(-1); +} + +static VALUE +ary_make_hash(VALUE ary1, VALUE ary2) +{ + VALUE hash = rb_hash_new(); + long i; + + for (i=0; i an_array + * + * Array Difference---Returns a new array that is a copy of + * the original array, removing any items that also appear in + * other_array. (If you need set-like behavior, see the + * library class Set.) + * + * [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ] + */ + +static VALUE +rb_ary_diff(VALUE ary1, VALUE ary2) +{ + VALUE ary3; + volatile VALUE hash; + long i; + + hash = ary_make_hash(to_ary(ary2), 0); + ary3 = rb_ary_new(); + + for (i=0; i [ 1, 3 ] + */ + + +static VALUE +rb_ary_and(VALUE ary1, VALUE ary2) +{ + VALUE hash, ary3, v, vv; + long i; + + ary2 = to_ary(ary2); + ary3 = rb_ary_new2(RARRAY_LEN(ary1) < RARRAY_LEN(ary2) ? + RARRAY_LEN(ary1) : RARRAY_LEN(ary2)); + hash = ary_make_hash(ary2, 0); + + if (RHASH_EMPTY_P(hash)) + return ary3; + + for (i=0; i an_array + * + * Set Union---Returns a new array by joining this array with + * other_array, removing duplicates. + * + * [ "a", "b", "c" ] | [ "c", "d", "a" ] + * #=> [ "a", "b", "c", "d" ] + */ + +static VALUE +rb_ary_or(VALUE ary1, VALUE ary2) +{ + VALUE hash, ary3; + VALUE v, vv; + long i; + + ary2 = to_ary(ary2); + ary3 = rb_ary_new2(RARRAY_LEN(ary1)+RARRAY_LEN(ary2)); + hash = ary_make_hash(ary1, ary2); + + for (i=0; i array or nil + * + * Removes duplicate elements from _self_. + * Returns nil if no changes are made (that is, no + * duplicates are found). + * + * a = [ "a", "a", "b", "b", "c" ] + * a.uniq! #=> ["a", "b", "c"] + * b = [ "a", "b", "c" ] + * b.uniq! #=> nil + */ + +static VALUE +rb_ary_uniq_bang(VALUE ary) +{ + VALUE hash, v, vv; + long i, j; + + hash = ary_make_hash(ary, 0); + + if (RARRAY_LEN(ary) == RHASH_SIZE(hash)) { + return Qnil; + } + for (i=j=0; i an_array + * + * Returns a new array by removing duplicate values in self. + * + * a = [ "a", "a", "b", "b", "c" ] + * a.uniq #=> ["a", "b", "c"] + */ + +static VALUE +rb_ary_uniq(VALUE ary) +{ + ary = rb_ary_dup(ary); + rb_ary_uniq_bang(ary); + return ary; +} + +/* + * call-seq: + * array.compact! -> array or nil + * + * Removes +nil+ elements from array. + * Returns +nil+ if no changes were made. + * + * [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ] + * [ "a", "b", "c" ].compact! #=> nil + */ + +static VALUE +rb_ary_compact_bang(VALUE ary) +{ + VALUE *p, *t, *end; + long n; + + rb_ary_modify(ary); + p = t = RARRAY_PTR(ary); + end = p + RARRAY_LEN(ary); + + while (t < end) { + if (NIL_P(*t)) t++; + else *p++ = *t++; + } + n = p - RARRAY_PTR(ary); + if (RARRAY_LEN(ary) == n) { + return Qnil; + } + ARY_SET_LEN(ary, n); + if (n * 2 < ARY_CAPA(ary) && ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) { + ary_resize_capa(ary, n * 2); + } + + return ary; +} + +/* + * call-seq: + * array.compact -> an_array + * + * Returns a copy of _self_ with all +nil+ elements removed. + * + * [ "a", nil, "b", nil, "c", nil ].compact + * #=> [ "a", "b", "c" ] + */ + +static VALUE +rb_ary_compact(VALUE ary) +{ + ary = rb_ary_dup(ary); + rb_ary_compact_bang(ary); + return ary; +} + +/* + * call-seq: + * array.count -> int + * array.count(obj) -> int + * array.count { |item| block } -> int + * + * Returns the number of elements. If an argument is given, counts + * the number of elements which equals to obj. If a block is + * given, counts the number of elements yielding a true value. + * + * ary = [1, 2, 4, 2] + * ary.count # => 4 + * ary.count(2) # => 2 + * ary.count{|x|x%2==0} # => 3 + * + */ + +static VALUE +rb_ary_count(int argc, VALUE *argv, VALUE ary) +{ + long n = 0; + + if (argc == 0) { + VALUE *p, *pend; + + if (!rb_block_given_p()) + return LONG2NUM(RARRAY_LEN(ary)); + + for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) { + if (RTEST(rb_yield(*p))) n++; + } + } + else { + VALUE obj, *p, *pend; + + rb_scan_args(argc, argv, "1", &obj); + if (rb_block_given_p()) { + rb_warn("given block not used"); + } + for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) { + if (rb_equal(*p, obj)) n++; + } + } + + return LONG2NUM(n); +} + +static VALUE +flatten(VALUE ary, int level, int *modified) +{ + long i = 0; + VALUE stack, result, tmp, elt; + st_table *memo; + st_data_t id; + + stack = ary_new(0, ARY_DEFAULT_SIZE); + result = ary_new(0, RARRAY_LEN(ary)); + memo = st_init_numtable(); + st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue); + *modified = 0; + + while (1) { + while (i < RARRAY_LEN(ary)) { + elt = RARRAY_PTR(ary)[i++]; + tmp = rb_check_array_type(elt); + if (RBASIC(result)->klass) { + rb_raise(rb_eRuntimeError, "flatten reentered"); + } + if (NIL_P(tmp) || (level >= 0 && RARRAY_LEN(stack) / 2 >= level)) { + rb_ary_push(result, elt); + } + else { + *modified = 1; + id = (st_data_t)tmp; + if (st_lookup(memo, id, 0)) { + st_free_table(memo); + rb_raise(rb_eArgError, "tried to flatten recursive array"); + } + st_insert(memo, id, (st_data_t)Qtrue); + rb_ary_push(stack, ary); + rb_ary_push(stack, LONG2NUM(i)); + ary = tmp; + i = 0; + } + } + if (RARRAY_LEN(stack) == 0) { + break; + } + id = (st_data_t)ary; + st_delete(memo, &id, 0); + tmp = rb_ary_pop(stack); + i = NUM2LONG(tmp); + ary = rb_ary_pop(stack); + } + + st_free_table(memo); + + RBASIC(result)->klass = rb_class_of(ary); + return result; +} + +/* + * call-seq: + * array.flatten! -> array or nil + * array.flatten!(level) -> array or nil + * + * Flattens _self_ in place. + * Returns nil if no modifications were made (i.e., + * array contains no subarrays.) If the optional level + * argument determines the level of recursion to flatten. + * + * a = [ 1, 2, [3, [4, 5] ] ] + * a.flatten! #=> [1, 2, 3, 4, 5] + * a.flatten! #=> nil + * a #=> [1, 2, 3, 4, 5] + * a = [ 1, 2, [3, [4, 5] ] ] + * a.flatten!(1) #=> [1, 2, 3, [4, 5]] + */ + +static VALUE +rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary) +{ + int mod = 0, level = -1; + VALUE result, lv; + + rb_scan_args(argc, argv, "01", &lv); + if (!NIL_P(lv)) level = NUM2INT(lv); + if (level == 0) return ary; + + result = flatten(ary, level, &mod); + if (mod == 0) return Qnil; + rb_ary_replace(ary, result); + + return ary; +} + +/* + * call-seq: + * array.flatten -> an_array + * array.flatten(level) -> an_array + * + * Returns a new array that is a one-dimensional flattening of this + * array (recursively). That is, for every element that is an array, + * extract its elements into the new array. If the optional + * level argument determines the level of recursion to flatten. + * + * s = [ 1, 2, 3 ] #=> [1, 2, 3] + * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] + * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] + * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + * a = [ 1, 2, [3, [4, 5] ] ] + * a.flatten(1) #=> [1, 2, 3, [4, 5]] + */ + +static VALUE +rb_ary_flatten(int argc, VALUE *argv, VALUE ary) +{ + int mod = 0, level = -1; + VALUE result, lv; + + rb_scan_args(argc, argv, "01", &lv); + if (!NIL_P(lv)) level = NUM2INT(lv); + if (level == 0) return ary; + + result = flatten(ary, level, &mod); + OBJ_INFECT(result, ary); + + return result; +} + +/* + * call-seq: + * array.shuffle! -> array + * + * Shuffles elements in _self_ in place. + */ + + +static VALUE +rb_ary_shuffle_bang(VALUE ary) +{ + long i = RARRAY_LEN(ary); + + rb_ary_modify(ary); + while (i) { + long j = rb_genrand_real()*i; + VALUE tmp = RARRAY_PTR(ary)[--i]; + RARRAY_PTR(ary)[i] = RARRAY_PTR(ary)[j]; + RARRAY_PTR(ary)[j] = tmp; + } + return ary; +} + + +/* + * call-seq: + * array.shuffle -> an_array + * + * Returns a new array with elements of this array shuffled. + * + * a = [ 1, 2, 3 ] #=> [1, 2, 3] + * a.shuffle #=> [2, 3, 1] + */ + +static VALUE +rb_ary_shuffle(VALUE ary) +{ + ary = rb_ary_dup(ary); + rb_ary_shuffle_bang(ary); + return ary; +} + + +/* + * call-seq: + * array.sample -> obj + * array.sample(n) -> an_array + * + * Choose a random element, or the random +n+ elements, from the array. + * If the array is empty, the first form returns nil, and the + * second form returns an empty array. + * + */ + + +static VALUE +rb_ary_sample(int argc, VALUE *argv, VALUE ary) +{ + VALUE nv, result, *ptr; + long n, len, i, j, k, idx[10]; + + len = RARRAY_LEN(ary); + if (argc == 0) { + if (len == 0) return Qnil; + i = len == 1 ? 0 : rb_genrand_real()*len; + return RARRAY_PTR(ary)[i]; + } + rb_scan_args(argc, argv, "1", &nv); + n = NUM2LONG(nv); + ptr = RARRAY_PTR(ary); + len = RARRAY_LEN(ary); + if (n > len) n = len; + switch (n) { + case 0: return rb_ary_new2(0); + case 1: + return rb_ary_new4(1, &ptr[(long)(rb_genrand_real()*len)]); + case 2: + i = rb_genrand_real()*len; + j = rb_genrand_real()*(len-1); + if (j >= i) j++; + return rb_ary_new3(2, ptr[i], ptr[j]); + case 3: + i = rb_genrand_real()*len; + j = rb_genrand_real()*(len-1); + k = rb_genrand_real()*(len-2); + { + long l = j, g = i; + if (j >= i) l = i, g = ++j; + if (k >= l && (++k >= g)) ++k; + } + return rb_ary_new3(3, ptr[i], ptr[j], ptr[k]); + } + if (n < sizeof(idx)/sizeof(idx[0])) { + long sorted[sizeof(idx)/sizeof(idx[0])]; + sorted[0] = idx[0] = rb_genrand_real()*len; + for (i=1; iblock for each element repeatedly _n_ times or + * forever if none or nil is given. If a non-positive number is + * given or the array is empty, does nothing. Returns nil if the + * loop has finished without getting interrupted. + * + * a = ["a", "b", "c"] + * a.cycle {|x| puts x } # print, a, b, c, a, b, c,.. forever. + * a.cycle(2) {|x| puts x } # print, a, b, c, a, b, c. + * + */ + +static VALUE +rb_ary_cycle(int argc, VALUE *argv, VALUE ary) +{ + long n, i; + VALUE nv = Qnil; + + rb_scan_args(argc, argv, "01", &nv); + + RETURN_ENUMERATOR(ary, argc, argv); + if (NIL_P(nv)) { + n = -1; + } + else { + n = NUM2LONG(nv); + if (n <= 0) return Qnil; + } + + while (RARRAY_LEN(ary) > 0 && (n < 0 || 0 < n--)) { + for (i=0; i array + * ary.permutation -> enumerator + * ary.permutation(n) { |p| block } -> array + * ary.permutation(n) -> enumerator + * + * When invoked with a block, yield all permutations of length n + * of the elements of ary, then return the array itself. + * If n is not specified, yield all permutations of all elements. + * The implementation makes no guarantees about the order in which + * the permutations are yielded. + * + * When invoked without a block, return an enumerator object instead. + * + * Examples: + * + * a = [1, 2, 3] + * a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] + * a.permutation(1).to_a #=> [[1],[2],[3]] + * a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]] + * a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] + * a.permutation(0).to_a #=> [[]] # one permutation of length 0 + * a.permutation(4).to_a #=> [] # no permutations of length 4 + */ + +static VALUE +rb_ary_permutation(int argc, VALUE *argv, VALUE ary) +{ + VALUE num; + long r, n, i; + + n = RARRAY_LEN(ary); /* Array length */ + RETURN_ENUMERATOR(ary, argc, argv); /* Return enumerator if no block */ + rb_scan_args(argc, argv, "01", &num); + r = NIL_P(num) ? n : NUM2LONG(num); /* Permutation size from argument */ + + if (r < 0 || n < r) { + /* no permutations: yield nothing */ + } + else if (r == 0) { /* exactly one permutation: the zero-length array */ + rb_yield(rb_ary_new2(0)); + } + else if (r == 1) { /* this is a special, easy case */ + for (i = 0; i < RARRAY_LEN(ary); i++) { + rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i])); + } + } + else { /* this is the general case */ + volatile VALUE t0 = tmpbuf(n,sizeof(long)); + long *p = (long*)RSTRING_PTR(t0); + volatile VALUE t1 = tmpbuf(n,sizeof(int)); + int *used = (int*)RSTRING_PTR(t1); + VALUE ary0 = ary_make_substitution(ary); /* private defensive copy of ary */ + RBASIC(ary0)->klass = 0; + + for (i = 0; i < n; i++) used[i] = 0; /* initialize array */ + + permute0(n, r, p, 0, used, ary0); /* compute and yield permutations */ + RB_GC_GUARD(t0); + RB_GC_GUARD(t1); + RBASIC(ary0)->klass = rb_cArray; + } + return ary; +} + +static long +combi_len(long n, long k) +{ + long i, val = 1; + + if (k*2 > n) k = n-k; + if (k == 0) return 1; + if (k < 0) return 0; + val = 1; + for (i=1; i <= k; i++,n--) { + long m = val; + val *= n; + if (val < m) { + rb_raise(rb_eRangeError, "too big for combination"); + } + val /= i; + } + return val; +} + +/* + * call-seq: + * ary.combination(n) { |c| block } -> ary + * ary.combination(n) -> enumerator + * + * When invoked with a block, yields all combinations of length n + * of elements from ary and then returns ary itself. + * The implementation makes no guarantees about the order in which + * the combinations are yielded. + * + * When invoked without a block, returns an enumerator object instead. + * + * Examples: + * + * a = [1, 2, 3, 4] + * a.combination(1).to_a #=> [[1],[2],[3],[4]] + * a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]] + * a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]] + * a.combination(4).to_a #=> [[1,2,3,4]] + * a.combination(0).to_a #=> [[]] # one combination of length 0 + * a.combination(5).to_a #=> [] # no combinations of length 5 + * + */ + +static VALUE +rb_ary_combination(VALUE ary, VALUE num) +{ + long n, i, len; + + n = NUM2LONG(num); + RETURN_ENUMERATOR(ary, 1, &num); + len = RARRAY_LEN(ary); + if (n < 0 || len < n) { + /* yield nothing */ + } + else if (n == 0) { + rb_yield(rb_ary_new2(0)); + } + else if (n == 1) { + for (i = 0; i < len; i++) { + rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i])); + } + } + else { + volatile VALUE t0 = tmpbuf(n+1, sizeof(long)); + long *stack = (long*)RSTRING_PTR(t0); + long nlen = combi_len(len, n); + volatile VALUE cc = rb_ary_new2(n); + VALUE *chosen = RARRAY_PTR(cc); + long lev = 0; + + RBASIC(cc)->klass = 0; + MEMZERO(stack, long, n); + stack[0] = -1; + for (i = 0; i < nlen; i++) { + chosen[lev] = RARRAY_PTR(ary)[stack[lev+1]]; + for (lev++; lev < n; lev++) { + chosen[lev] = RARRAY_PTR(ary)[stack[lev+1] = stack[lev]+1]; + } + rb_yield(rb_ary_new4(n, chosen)); + do { + stack[lev--]++; + } while (lev && (stack[lev+1]+n == len+lev+1)); + } + } + return ary; +} + +/* + * call-seq: + * ary.product(other_ary, ...) + * + * Returns an array of all combinations of elements from all arrays. + * The length of the returned array is the product of the length + * of ary and the argument arrays + * + * [1,2,3].product([4,5]) # => [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]] + * [1,2].product([1,2]) # => [[1,1],[1,2],[2,1],[2,2]] + * [1,2].product([3,4],[5,6]) # => [[1,3,5],[1,3,6],[1,4,5],[1,4,6], + * # [2,3,5],[2,3,6],[2,4,5],[2,4,6]] + * [1,2].product() # => [[1],[2]] + * [1,2].product([]) # => [] + */ + +static VALUE +rb_ary_product(int argc, VALUE *argv, VALUE ary) +{ + int n = argc+1; /* How many arrays we're operating on */ + volatile VALUE t0 = tmpbuf(n, sizeof(VALUE)); + volatile VALUE t1 = tmpbuf(n, sizeof(int)); + VALUE *arrays = (VALUE*)RSTRING_PTR(t0); /* The arrays we're computing the product of */ + int *counters = (int*)RSTRING_PTR(t1); /* The current position in each one */ + VALUE result; /* The array we'll be returning */ + long i,j; + long resultlen = 1; + + RBASIC(t0)->klass = 0; + RBASIC(t1)->klass = 0; + + /* initialize the arrays of arrays */ + arrays[0] = ary; + for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]); + + /* initialize the counters for the arrays */ + for (i = 0; i < n; i++) counters[i] = 0; + + /* Compute the length of the result array; return [] if any is empty */ + for (i = 0; i < n; i++) { + long k = RARRAY_LEN(arrays[i]), l = resultlen; + if (k == 0) return rb_ary_new2(0); + resultlen *= k; + if (resultlen < k || resultlen < l || resultlen / k != l) { + rb_raise(rb_eRangeError, "too big to product"); + } + } + + /* Otherwise, allocate and fill in an array of results */ + result = rb_ary_new2(resultlen); + for (i = 0; i < resultlen; i++) { + int m; + /* fill in one subarray */ + VALUE subarray = rb_ary_new2(n); + for (j = 0; j < n; j++) { + rb_ary_push(subarray, rb_ary_entry(arrays[j], counters[j])); + } + + /* put it on the result array */ + rb_ary_push(result, subarray); + + /* + * Increment the last counter. If it overflows, reset to 0 + * and increment the one before it. + */ + m = n-1; + counters[m]++; + while (m > 0 && counters[m] == RARRAY_LEN(arrays[m])) { + counters[m] = 0; + m--; + counters[m]++; + } + } + + return result; +} + +/* + * call-seq: + * ary.take(n) => array + * + * Returns first n elements from ary. + * + * a = [1, 2, 3, 4, 5, 0] + * a.take(3) # => [1, 2, 3] + * + */ + +static VALUE +rb_ary_take(VALUE obj, VALUE n) +{ + long len = NUM2LONG(n); + if (len < 0) { + rb_raise(rb_eArgError, "attempt to take negative size"); + } + return rb_ary_subseq(obj, 0, len); +} + +/* + * call-seq: + * ary.take_while {|arr| block } => array + * + * Passes elements to the block until the block returns nil or false, + * then stops iterating and returns an array of all prior elements. + * + * a = [1, 2, 3, 4, 5, 0] + * a.take_while {|i| i < 3 } # => [1, 2] + * + */ + +static VALUE +rb_ary_take_while(VALUE ary) +{ + long i; + + RETURN_ENUMERATOR(ary, 0, 0); + for (i = 0; i < RARRAY_LEN(ary); i++) { + if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break; + } + return rb_ary_take(ary, LONG2FIX(i)); +} + +/* + * call-seq: + * ary.drop(n) => array + * + * Drops first n elements from ary, and returns rest elements + * in an array. + * + * a = [1, 2, 3, 4, 5, 0] + * a.drop(3) # => [4, 5, 0] + * + */ + +static VALUE +rb_ary_drop(VALUE ary, VALUE n) +{ + VALUE result; + long pos = NUM2LONG(n); + if (pos < 0) { + rb_raise(rb_eArgError, "attempt to drop negative size"); + } + + result = rb_ary_subseq(ary, pos, RARRAY_LEN(ary)); + if (result == Qnil) result = rb_ary_new(); + return result; +} + +/* + * call-seq: + * ary.drop_while {|arr| block } => array + * + * Drops elements up to, but not including, the first element for + * which the block returns nil or false and returns an array + * containing the remaining elements. + * + * a = [1, 2, 3, 4, 5, 0] + * a.drop_while {|i| i < 3 } # => [3, 4, 5, 0] + * + */ + +static VALUE +rb_ary_drop_while(VALUE ary) +{ + long i; + + RETURN_ENUMERATOR(ary, 0, 0); + for (i = 0; i < RARRAY_LEN(ary); i++) { + if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break; + } + return rb_ary_drop(ary, LONG2FIX(i)); +} + + + +/* Arrays are ordered, integer-indexed collections of any object. + * Array indexing starts at 0, as in C or Java. A negative index is + * assumed to be relative to the end of the array---that is, an index of -1 + * indicates the last element of the array, -2 is the next to last + * element in the array, and so on. + */ + +void +Init_Array(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + rb_cArray = rb_define_class("Array", rb_cObject); + rb_include_module(rb_cArray, rb_mEnumerable); + + rb_define_alloc_func(rb_cArray, ary_alloc); + rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1); + rb_define_singleton_method(rb_cArray, "try_convert", rb_ary_s_try_convert, 1); + rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1); + rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1); + + rb_define_method(rb_cArray, "to_s", rb_ary_inspect, 0); + rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0); + rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0); + rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0); + rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0); + + rb_define_method(rb_cArray, "==", rb_ary_equal, 1); + rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1); + rb_define_method(rb_cArray, "hash", rb_ary_hash, 0); + + rb_define_method(rb_cArray, "[]", rb_ary_aref, -1); + rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1); + rb_define_method(rb_cArray, "at", rb_ary_at, 1); + rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1); + rb_define_method(rb_cArray, "first", rb_ary_first, -1); + rb_define_method(rb_cArray, "last", rb_ary_last, -1); + rb_define_method(rb_cArray, "concat", rb_ary_concat, 1); + rb_define_method(rb_cArray, "<<", rb_ary_push, 1); + rb_define_method(rb_cArray, "push", rb_ary_push_m, -1); + rb_define_method(rb_cArray, "pop", rb_ary_pop_m, -1); + rb_define_method(rb_cArray, "shift", rb_ary_shift_m, -1); + rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1); + rb_define_method(rb_cArray, "insert", rb_ary_insert, -1); + rb_define_method(rb_cArray, "each", rb_ary_each, 0); + rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0); + rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0); + rb_define_method(rb_cArray, "length", rb_ary_length, 0); + rb_define_alias(rb_cArray, "size", "length"); + rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0); + rb_define_method(rb_cArray, "find_index", rb_ary_index, -1); + rb_define_method(rb_cArray, "index", rb_ary_index, -1); + rb_define_method(rb_cArray, "rindex", rb_ary_rindex, -1); + rb_define_method(rb_cArray, "join", rb_ary_join_m, -1); + rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0); + rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0); + rb_define_method(rb_cArray, "sort", rb_ary_sort, 0); + rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0); + rb_define_method(rb_cArray, "collect", rb_ary_collect, 0); + rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0); + rb_define_method(rb_cArray, "map", rb_ary_collect, 0); + rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0); + rb_define_method(rb_cArray, "select", rb_ary_select, 0); + rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1); + rb_define_method(rb_cArray, "delete", rb_ary_delete, 1); + rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1); + rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0); + rb_define_method(rb_cArray, "reject", rb_ary_reject, 0); + rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0); + rb_define_method(rb_cArray, "zip", rb_ary_zip, -1); + rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0); + rb_define_method(rb_cArray, "replace", rb_ary_replace, 1); + rb_define_method(rb_cArray, "clear", rb_ary_clear, 0); + rb_define_method(rb_cArray, "fill", rb_ary_fill, -1); + rb_define_method(rb_cArray, "include?", rb_ary_includes, 1); + rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1); + + rb_define_method(rb_cArray, "slice", rb_ary_aref, -1); + rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1); + + rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1); + rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1); + + rb_define_method(rb_cArray, "+", rb_ary_plus, 1); + rb_define_method(rb_cArray, "*", rb_ary_times, 1); + + rb_define_method(rb_cArray, "-", rb_ary_diff, 1); + rb_define_method(rb_cArray, "&", rb_ary_and, 1); + rb_define_method(rb_cArray, "|", rb_ary_or, 1); + + rb_define_method(rb_cArray, "uniq", rb_ary_uniq, 0); + rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0); + rb_define_method(rb_cArray, "compact", rb_ary_compact, 0); + rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0); + rb_define_method(rb_cArray, "flatten", rb_ary_flatten, -1); + rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, -1); + rb_define_method(rb_cArray, "count", rb_ary_count, -1); + rb_define_method(rb_cArray, "shuffle!", rb_ary_shuffle_bang, 0); + rb_define_method(rb_cArray, "shuffle", rb_ary_shuffle, 0); + rb_define_method(rb_cArray, "sample", rb_ary_sample, -1); + rb_define_method(rb_cArray, "cycle", rb_ary_cycle, -1); + rb_define_method(rb_cArray, "permutation", rb_ary_permutation, -1); + rb_define_method(rb_cArray, "combination", rb_ary_combination, 1); + rb_define_method(rb_cArray, "product", rb_ary_product, -1); + + rb_define_method(rb_cArray, "take", rb_ary_take, 1); + rb_define_method(rb_cArray, "take_while", rb_ary_take_while, 0); + rb_define_method(rb_cArray, "drop", rb_ary_drop, 1); + rb_define_method(rb_cArray, "drop_while", rb_ary_drop_while, 0); + + id_cmp = rb_intern("<=>"); +} diff --git a/lib/ruby-1.9.1-rc1/bcc32/Makefile.sub b/lib/ruby-1.9.1-rc1/bcc32/Makefile.sub new file mode 100644 index 0000000..2434b2f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bcc32/Makefile.sub @@ -0,0 +1,611 @@ +# -*- makefile -*- + +SHELL = $(COMSPEC) +MKFILES = Makefile + +!ifndef MFLAGS +MFLAGS=- +!endif + +#### Start of system configuration section. #### +!ifndef OS +OS = bccwin32 +!endif +!if !defined(RT) +!error RT not defined. Retry from configure pass. +!endif + +arch = $(ARCH)-$(OS) + +## variables may be overridden by $(compile_dir)/Makefile +!ifndef srcdir +srcdir = .. +!endif +!ifndef RUBY_INSTALL_NAME +RUBY_INSTALL_NAME = ruby +!endif +!ifndef RUBYW_INSTALL_NAME +RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw) +!elif "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)" +RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw) +!endif +!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)" +RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w +!endif +!ifndef RUBY_SO_NAME +RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY) +!endif +!ifndef icondirs +!ifdef ICONDIRS +icondirs=$(ICONDIRS) +!endif +!endif +!ifdef icondirs +icondirs=$(icondirs:\=/) +iconinc=-I$(icondirs: = -I) +!endif +############### + +.SUFFIXES: .y + +!ifndef CC +CC = bcc32 +!endif +!ifndef CPP +CPP = cpp32 +!endif +!ifndef RC +RC = brcc32 +!endif +!ifndef YACC +YACC = bison +!endif +!ifndef AR +AR = tlib +!endif +!ifndef BASERUBY +BASERUBY = ruby +!endif + +PURIFY = +AUTOCONF = autoconf +IFCHANGE = $(srcdir:/=\)\win32\ifchange.bat +RM = $(srcdir:/=\)\win32\rm.bat +CP = copy > nul +MV = move > nul + +!if !defined(PROCESSOR_ARCHITECTURE) +PROCESSOR_ARCHITECTURE = x86 +!endif +MACHINE = $(PROCESSOR_ARCHITECTURE) +!if "$(PROCESSOR_ARCHITECTURE)" == "x86" +!ifndef PROCESSOR_LEVEL +PROCESSOR_LEVEL = 5 +!endif +!if 6 < $(PROCESSOR_LEVEL) +PROCESSOR_LEVEL = 6 +!endif +PROCESSOR_FLAG = -$(PROCESSOR_LEVEL) +CPU = i$(PROCESSOR_LEVEL)86 +ARCH = i386 +!else +CPU = $(PROCESSOR_ARCHITECTURE) +ARCH = $(PROCESSOR_ARCHITECTURE) +!endif +!ifndef DEBUGFLAGS +DEBUGFLAGS = +!endif +!ifndef OPTFLAGS +OPTFLAGS = -O +!endif + +!ifndef prefix +prefix = /usr +!endif +!ifndef exec_prefix +exec_prefix = $(prefix) +!endif +!ifndef libdir +libdir = $(exec_prefix)/lib +!endif +!if !defined(datadir) +datadir = $(prefix)/share +!endif +!ifndef EXTOUT +EXTOUT = .ext +!endif +!ifndef RIDATADIR +RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system +!endif +!ifndef TESTUI +TESTUI = console +!endif +!ifndef TESTS +TESTS = +!endif +!ifndef RDOCTARGET +RDOCTARGET = install-doc +!endif + +OUTFLAG = -o +COUTFLAG = -o +!ifndef CFLAGS +CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi +!endif +!ifndef DEFS +DEFS = +!endif +!ifndef CPPFLAGS +CPPFLAGS = +!endif +CPPFLAGS = $(DEFS) $(CPPFLAGS) +!ifndef CXXFLAGS +CXXFLAGS = $(CFLAGS) +!endif +!ifndef LDFLAGS +LDFLAGS = -S:$(STACK) +!endif +!ifndef RFLAGS +RFLAGS = $(iconinc) +!endif +!ifndef EXTLIBS +EXTLIBS = +!endif +!ifndef MEMLIB +MEMLIB = +!endif +LIBS = $(MEMLIB) cw32i.lib import32.lib ws2_32.lib $(EXTLIBS) +MISSING = acosh.obj cbrt.obj crypt.obj erf.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32.obj + +!ifndef STACK +STACK = 0x2000000 +!endif + +XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing + +ARFLAGS = /a /p32 +LD = ilink32 -q -Gn +LDSHARED = $(LD) +XLDFLAGS = -Tpe c0x32.obj +WLDFLAGS = -aa -Tpe c0w32.obj +DLDFLAGS = -Tpd c0d32.obj +LIBRUBY_LDSHARED = $(LDSHARED) +LIBRUBY_DLDFLAGS = -Gi $(DLDFLAGS) $(EXTLDFLAGS) +LDOBJECTS = $(MAINOBJ) + +SOLIBS = + +EXEEXT = .exe +PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT) +WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT) +RUBYDEF = $(RUBY_SO_NAME).def +MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib $(MINIRUBYOPT) +RUNRUBY = .\$(PROGRAM) -i"$(EXTOUT)/$(arch)" "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" -- + +ORGLIBPATH = $(LIB) + +#### End of system configuration section. #### + +LIBRUBY_A = $(RUBY_SO_NAME)-static.lib +LIBRUBY_SO = $(RUBY_SO_NAME).dll +LIBRUBY = $(RUBY_SO_NAME).lib +LIBRUBYARG = $(LIBRUBY) +THREAD_MODEL = win32 + +PREP = miniruby$(EXEEXT) + +OBJEXT = obj +ASMEXT = asm + +INSTALLED_LIST= .installed.list + +WINMAINOBJ = winmain.$(OBJEXT) +ARCHMINIOBJS = dmydln.$(OBJEXT) + +arch_hdrdir = $(EXTOUT)/include/$(arch) +hdrdir = $(srcdir)/include +VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/win32 + +.path.c = .;$(srcdir);$(srcdir)/enc;$(srcdir)/win32;$(srcdir)/missing +.path.ci = $(srcdir) +.path.inc = .;$(srcdir) +.path.def = .;$(srcdir) +.path.h = .;$(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/win32;$(srcdir)/missing +.path.y = $(srcdir) +.path. = $(srcdir) + +.c.obj: + $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:/=\) + +.c.asm: + $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -S $(<:\=/) + +.rc.res: + $(RC) $(RFLAGS) -I. -I$( nul -q -f &&| +PHONY: nul + @exit +| + +PHONY: nul + +RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h +CONFIG_H = ./.config.h.time + +config: config.status + +config.status: $(CONFIG_H) + +$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub + @if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\) + @if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby + @$(IFCHANGE) $(RUBY_CONFIG_H:/=\) &&| +\#define NO_BIG_INLINE 1 +\#define HAVE_SYS_TYPES_H 1 +\#define HAVE_SYS_STAT_H 1 +\#define HAVE_STDLIB_H 1 +\#define HAVE_STRING_H 1 +\#define HAVE_MEMORY_H 1 +\#define HAVE_LONG_LONG 1 +\#define HAVE_OFF_T 1 +\#define SIZEOF_INT 4 +\#define SIZEOF_SHORT 2 +\#define SIZEOF_LONG 4 +\#define SIZEOF_LONG_LONG 0 +\#define SIZEOF___INT64 8 +\#define SIZEOF_OFF_T 8 +\#define SIZEOF_VOIDP 4 +\#define SIZEOF_FLOAT 4 +\#define SIZEOF_DOUBLE 8 +\#define SIZEOF_TIME_T 4 +\#define SIZEOF_RLIM_T 0 +\#define SIZEOF_SIZE_T 4 +\#define SIZEOF_PTRDIFF_T 4 +\#define HAVE_PROTOTYPES 1 +\#define TOKEN_PASTE(x,y) x\#\#y +\#define HAVE_STDARG_PROTOTYPES 1 +\#define NORETURN(x) x +\#define RUBY_EXTERN extern __declspec(dllimport) +\#define HAVE_DECL_SYS_NERR 1 +\#define HAVE_LIMITS_H 1 +\#define HAVE_FCNTL_H 1 +\#define HAVE_UTIME_H 1 +\#define HAVE_FLOAT_H 1 +\#define rb_uid_t uid_t +\#define rb_gid_t gid_t +\#define rb_pid_t int +\#define HAVE_STRUCT_STAT_ST_RDEV 1 +\#define HAVE_ST_RDEV 1 +!if $(BORLANDC) < 0x0580 +\#define int8_t signed char +\#define uint8_t unsigned char +\#define int16_t short +\#define uint16_t unsigned short +\#define int32_t int +\#define uint32_t unsigned int +\#define int64_t __int64 +\#define uint64_t unsigned __int64 +\#define ssize_t int +!endif +\#define HAVE_UINT8_T 1 +\#define HAVE_INT16_T 1 +\#define HAVE_UINT16_T 1 +\#define HAVE_INT32_T 1 +\#define HAVE_UINT32_T 1 +\#define HAVE_INT64_T HAVE_LONG_LONG +\#define HAVE_UINT64_T HAVE_LONG_LONG +\#define HAVE_INTPTR_T 1 +\#define HAVE_UINTPTR_T 1 +\#define HAVE_SSIZE_T 1 +\#define GETGROUPS_T int +\#define RETSIGTYPE void +\#define HAVE_ALLOCA 1 +\#define HAVE_DUP2 1 +\#define HAVE_MEMMOVE 1 +\#define HAVE_MKDIR 1 +\#define HAVE_STRCASECMP 1 +\#define HAVE_STRNCASECMP 1 +\#define HAVE_STRERROR 1 +\#define HAVE_STRFTIME 1 +\#define HAVE_STRCHR 1 +\#define HAVE_STRSTR 1 +\#define HAVE_STRTOD 1 +\#define HAVE_STRTOL 1 +\#define HAVE_STRTOUL 1 +\#define HAVE_SNPRINTF 1 +\#define HAVE_VSNPRINTF 1 +\#define HAVE_ISNAN 1 +\#define HAVE_FINITE 1 +\#define HAVE_HYPOT 1 +\#define HAVE_FMOD 1 +\#define HAVE_WAITPID 1 +\#define HAVE_FSYNC 1 +\#define HAVE_GETCWD 1 +\#define HAVE_TRUNCATE 1 +\#define HAVE_FTRUNCATE 1 +\#define HAVE_FSEEKO 1 +\#define HAVE_FTELLO 1 +\#define HAVE_TIMES 1 +\#define HAVE_FCNTL 1 +\#define HAVE_LINK 1 +\#define HAVE_TELLDIR 1 +\#define HAVE_SEEKDIR 1 +\#define HAVE_COSH 1 +\#define HAVE_SINH 1 +\#define HAVE_TANH 1 +\#define RSHIFT(x,y) ((x)>>(int)y) +\#define FILE_COUNT level +\#define FILE_READPTR curp +\#define RUBY_SETJMP(env) setjmp(env) +\#define RUBY_LONGJMP(env,val) longjmp(env,val) +\#define RUBY_JMP_BUF jmp_buf +\#define inline __inline +\#define NEED_IO_SEEK_BETWEEN_RW 1 +\#define STACK_GROW_DIRECTION -1 +\#define DEFAULT_KCODE KCODE_NONE +\#define DLEXT ".so" +\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)" +\#define RUBY_SITE_LIB "/lib/ruby/site_ruby" +\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)" +\#define RUBY_VENDOR_LIB "/lib/ruby/vendor_ruby" +\#define RUBY_VENDOR_LIB2 "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)" +\#define RUBY_PLATFORM "$(ARCH)-$(OS)" +\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" +\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" +\#define RUBY_VENDOR_ARCHLIB "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)" +| + @exit > $(@:/=\) + +config.status: $(MKFILES) $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk + @echo Creating $@ + @type > $@ &&| +# Generated automatically by Makefile.sub. +s,@SHELL@,$$(COMSPEC),;t t +s,@BUILD_FILE_SEPARATOR@,\,;t t +s,@PATH_SEPARATOR@,;,;t t +s,@CFLAGS@,$(CFLAGS),;t t +s,@DEFS@,$(DEFS),;t t +s,@CPPFLAGS@,$(CPPFLAGS),;t t +s,@CXXFLAGS@,$(CXXFLAGS),;t t +s,@FFLAGS@,$(FFLAGS),;t t +s,@LDFLAGS@,,;t t +s,@LIBS@,$(LIBS),;t t +s,@exec_prefix@,$${prefix},;t t +s,@prefix@,$(prefix),;t t +s,@program_transform_name@,s,,,,;t t +s,@bindir@,$${exec_prefix}/bin,;t t +s,@sbindir@,$${exec_prefix}/sbin,;t t +s,@libexecdir@,$${exec_prefix}/libexec,;t t +s,@datadir@,$${prefix}/share,;t t +s,@sysconfdir@,$${prefix}/etc,;t t +s,@sharedstatedir@,/etc,;t t +s,@localstatedir@,/var,;t t +s,@libdir@,$${exec_prefix}/lib,;t t +s,@includedir@,$${prefix}/include,;t t +s,@oldincludedir@,/usr/include,;t t +s,@infodir@,$${prefix}/info,;t t +s,@mandir@,$${prefix}/man,;t t +s,@build@,$(CPU)-pc-$(OS),;t t +s,@build_alias@,$(CPU)-$(OS),;t t +s,@build_cpu@,$(CPU),;t t +s,@build_vendor@,pc,;t t +s,@build_os@,$(OS),;t t +s,@host@,$(CPU)-pc-$(OS),;t t +s,@host_alias@,$(CPU)-$(OS),;t t +s,@host_cpu@,$(CPU),;t t +s,@host_vendor@,pc,;t t +s,@host_os@,$(OS),;t t +s,@target@,$(ARCH)-pc-$(OS),;t t +s,@target_alias@,$(ARCH)-$(OS),;t t +s,@target_cpu@,$(ARCH),;t t +s,@target_vendor@,pc,;t t +s,@target_os@,$(OS),;t t +s,@CC@,$(CC),;t t +s,@CPP@,cpp32,;t t +s,@CXX@,$$(CC),;t t +s,@LD@,$(LD),;t t +s,@YACC@,$(YACC),;t t +s,@RANLIB@,,;t t +s,@AR@,$(AR),;t t +s,@ARFLAGS@,$(ARFLAGS) ,;t t +s,@LN_S@,$(LN_S),;t t +s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t +s,@RM@,$$(top_srcdir:/=\)\win32\rm.bat,;t t +s,@CP@,copy > nul,;t t +s,@LIBOBJS@, $(MISSING),;t t +s,@ALLOCA@,$(ALLOCA),;t t +s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t +s,@EXEEXT@,.exe,;t t +s,@OBJEXT@,obj,;t t +s,@XCFLAGS@,$(XCFLAGS),;t t +s,@XLDFLAGS@,$(XLDFLAGS),;t t +s,@DLDFLAGS@,$(DLDFLAGS),;t t +s,@ARCH_FLAG@,$(ARCH_FLAG),;t t +s,@STATIC@,$(STATIC),;t t +s,@CCDLFLAGS@,,;t t +s,@LDSHARED@,$(LDSHARED),;t t +s,@DLEXT@,so,;t t +s,@LIBEXT@,lib,;t t +s,@STRIP@,$(STRIP),;t t +s,@EXTSTATIC@,$(EXTSTATIC),;t t +s,@setup@,Setup,;t t +s,@MINIRUBY@,$(MINIRUBY),;t t +s,@PREP@,miniruby$(EXEEXT),;t t +s,@RUNRUBY@,$(RUNRUBY),;t t +s,@EXTOUT@,$(EXTOUT),;t t +s,@ARCHFILE@,,;t t +s,@RDOCTARGET@,,;t t +s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t +s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t +s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t +s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t +s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t +s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t +s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t +s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t +s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t +s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t +s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t +s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t +s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t +s,@SOLIBS@,$(SOLIBS),;t t +s,@DLDLIBS@,$(DLDLIBS),;t t +s,@ENABLE_SHARED@,yes,;t t +s,@OUTFLAG@,$(OUTFLAG),;t t +s,@COUTFLAG@,$(COUTFLAG),;t t +s,@CPPOUTFILE@,,;t t +s,@LIBPATHFLAG@, -L"%s",;t t +s,@RPATHFLAG@,,;t t +s,@LIBARG@,%s.lib,;t t +s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS:/=\), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE:/=\), $$(RESFILE:/=\),;t t +s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c $$(<:/=\),;t t +s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -P $(COUTFLAG)$$(@) -c $$(<:/=\),;t t +s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t +s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t +s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t +s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN WIN32,;t t +s,@COMMON_HEADERS@,winsock2.h windows.h,;t t +s,@cleanlibs@,$$*.tds,;t t +s,@cleanobjs@,$$*-$$(arch).def $$*.il? $$*.lib,;t t +s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t +s,@EXPORT_PREFIX@,_,;t t +s,@arch@,$(ARCH)-$(OS),;t t +s,@sitearch@,$(ARCH)-$(OS),;t t +s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t +s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t +s,@rubyhdrdir@,$$(includedir)/ruby-$$(MAJOR).$$(MINOR).$$(TEENY),;t t +s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t +s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t +s,@configure_args@,--enable-shared $(configure_args),;t t +s,@configure_input@,$$configure_input,;t t +s,@srcdir@,$(srcdir),;t t +s,@top_srcdir@,$(srcdir),;t t +| + +miniruby$(EXEEXT): + @echo $(LIBS) + $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS:/=\) $(DMYEXT),$@,nul,$(LIBS) + +$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res + $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res + +$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res + $(LD) $(LDFLAGS) $(WLDFLAGS) $(MAINOBJ) $(WINMAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBYW_INSTALL_NAME).res + +$(LIBRUBY_A): $(OBJS) $(DMYEXT) + @-if exist $@ del $@ + $(AR) $(ARFLAGS) "$@" $(OBJS) $(DMYEXT) + +# $(LIBRUBY): $(LIBRUBY_SO) +# implib $@ $(LIBRUBY_SO) + +$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res + @echo $(DLDOBJS) + @$(PRE_LIBRUBY_UPDATE) + $(LIBRUBY_LDSHARED) $(LIBRUBY_DLDFLAGS) $(DLDOBJS:/=\),$(LIBRUBY_SO),nul,$(LIBRUBY_A) $(LIBS),$(RUBYDEF),$(RUBY_SO_NAME).res + +$(LIBRUBY): $(LIBRUBY_SO) + +$(RUBYDEF): $(LIBRUBY_A) $(PREP) + $(MINIRUBY) $(srcdir)/bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A) + +$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb $(srcdir)/revision.h $(srcdir)/win32/resource.rb + @$(MINIRUBY) $(srcdir)/win32/resource.rb \ + -ruby_name=$(RUBY_INSTALL_NAME) \ + -rubyw_name=$(RUBYW_INSTALL_NAME) \ + -so_name=$(RUBY_SO_NAME) \ + . $(icondirs) $(srcdir)/win32 + +lex.c: {$(srcdir)}lex.c.blt + copy "$(?:/=\)" $@ + +post-install-bin:: + @$(NULLCMD) +post-install-lib:: + @$(NULLCMD) +post-install-ext-comm:: + @$(NULLCMD) +post-install-ext-arch:: + @$(NULLCMD) +post-install-man:: + @$(NULLCMD) +post-install-doc:: + @$(NULLCMD) + +clean-local:: + @$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib + @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res + @$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output + +distclean-local:: + @$(RM) ext\config.cache $(RBCONFIG:/=\) + @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc + +clean-ext distclean-ext realclean-ext:: + @for /R ext %I in (.) do @if exist %I\Makefile ( \ + echo $(@:-ext=)ing %~nI & \ + cd %I & \ + $(MAKE) $(MFLAGS) $(@:-ext=) & \ + cd %CD% \ + ) + +ext/extinit.obj: ext/extinit.c $(SETUP) + $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c + +main.$(OBJEXT): win32.h +ascii.$(OBJEXT): win32.h +array.$(OBJEXT): win32.h +bignum.$(OBJEXT): win32.h +class.$(OBJEXT): win32.h +compar.$(OBJEXT): win32.h +dir.$(OBJEXT): dir.h win32.h +dln.$(OBJEXT): win32.h +enum.$(OBJEXT): win32.h +error.$(OBJEXT): win32.h +euc_jp.$(OBJEXT): win32.h +eval.$(OBJEXT): win32.h +file.$(OBJEXT): win32.h +gc.$(OBJEXT): win32.h +hash.$(OBJEXT): win32.h +inits.$(OBJEXT): win32.h +io.$(OBJEXT): win32.h +marshal.$(OBJEXT): win32.h +math.$(OBJEXT): win32.h +numeric.$(OBJEXT): win32.h +object.$(OBJEXT): win32.h +pack.$(OBJEXT): win32.h +parse.$(OBJEXT): win32.h +process.$(OBJEXT): win32.h +prec.$(OBJEXT): win32.h +random.$(OBJEXT): win32.h +range.$(OBJEXT): win32.h +re.$(OBJEXT): win32.h +regcomp.$(OBJEXT): win32.h +regenc.$(OBJEXT): win32.h +regerror.$(OBJEXT): win32.h +regexec.$(OBJEXT): win32.h +reggnu.$(OBJEXT): win32.h +regparse.$(OBJEXT): win32.h +ruby.$(OBJEXT): win32.h +signal.$(OBJEXT): win32.h +sjis.$(OBJEXT): win32.h +sprintf.$(OBJEXT): win32.h +st.$(OBJEXT): win32.h +string.$(OBJEXT): win32.h +struct.$(OBJEXT): win32.h +time.$(OBJEXT): win32.h +utf_8.$(OBJEXT): win32.h +util.$(OBJEXT): win32.h +variable.$(OBJEXT): win32.h +version.$(OBJEXT): win32.h diff --git a/lib/ruby-1.9.1-rc1/bcc32/README.bcc32 b/lib/ruby-1.9.1-rc1/bcc32/README.bcc32 new file mode 100644 index 0000000..fb19906 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bcc32/README.bcc32 @@ -0,0 +1,142 @@ +=begin + += How to build ruby using Borland C++ + +== Requirement + +(1) Borland C++ 5.0 or later. + +(2) Please set environment variable (({PATH})) + to run required commands properly from the command line. + + Note: building ruby requires following commands. + * make + * bcc32 + * tlib + * ilink32 + +(3) If you want to build from CVS source, following commands are required. + * bison (()) + * sed (()) + +(4) We strongly recommend to build ruby on C++Builder, to link following files. + * usebormm.lib + * memmgr.lib + + RTL's internal memory manager cannot handle large memory block properly, + so we should use borlndmm.dll instead. + 10000.times { "" << "." * 529671; GC.start } # crash + +== How to compile and install + +(1) Execute bcc32\configure.bat on your build directory. + ex. c:\src\ruby> bcc32\configure.bat + You can specify the target platform as an argument. + For example, run `((%configure i686-bccwin32%))' + You can also specify the install directory. + For example, run `((%configure --prefix=%))' + Default of the install directory is /usr . + +(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile})) + if you want to change the name of the executable files. + And add ((|RUBYW_INSTALL_NAME|)) to change the name of the + executable without console window if also you want. + +(3) Run `((%make%))' + +(4) Run `((%make test%))' + +(5) Run `((%make install%))' + + This command will create following directories and install files onto them. + * \bin + * \lib + * \lib\ruby + * \lib\ruby\. + * \lib\ruby\.\ + * \lib\ruby\site_ruby + * \lib\ruby\site_ruby\. + * \lib\ruby\site_ruby\.\ + * \man\man1 + If Ruby's version is `x.y.z', the ((||)) is `x' and the ((||)) is `y'. + The default ((||)) is `(({i386-bccwin32}))'. + +(6) Requires dynamic RTL (cc3250.dll on C++Builder5) and borlndmm.dll (If built with + usebormm.lib) to use installed binary. These files are ordinary in bcc32's bin + directory. + +== Icons + +Any icon files(*.ico) in the build directory, directories specified with +((|icondirs|)) make variable and (({win32})) directory under the ruby +source directory will be included in DLL or executable files, according +to their base names. + $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe + $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe + the others --> $(RUBY_SO_NAME).dll + +Although no icons are distributed with the ruby source or in the official +site, you can use anything you like. For example, followings are written +in Japanese, but you can download at least. + +* (()) or + (()) +* (()) or + (()) + +== Build examples + +* Build on the ruby source directory. + + ex.) + ruby source directory: C:\ruby + build directory: C:\ruby + install directory: C:\usr\local + + C: + cd \ruby + bcc32\configure --prefix=/usr/local + make + make test + make install + +* Build on the relative directory from the ruby source directory and CPU type + i386. + + ex.) + ruby source directory: C:\ruby + build directory: C:\ruby\bccwin32 + install directory: C:\usr\local + CPU i386 + + C: + cd \ruby + mkdir bccwin32 + cd bccwin32 + ..\bcc32\configure --prefix=/usr/local + make + make test + make install + +* Build on the different drive. + + ex.) + ruby source directory: C:\src\ruby + build directory: D:\build\ruby + install directory: C:\usr\local + + D: + cd D:\build\ruby + C:\src\ruby\bcc32\configure --prefix=C:/usr/local + make + make test + make install + +== Bugs + +You can ((*NOT*)) use a path name contains any white space characters as +the ruby source directory, this restriction comes from the behavior of +(({!INCLUDE})) directives of (({MAKE})). +((- you may call it a bug. -)) + +=end diff --git a/lib/ruby-1.9.1-rc1/bcc32/configure.bat b/lib/ruby-1.9.1-rc1/bcc32/configure.bat new file mode 100755 index 0000000..8cdfc64 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bcc32/configure.bat @@ -0,0 +1,163 @@ +@echo off +::: Don't set environment variable in batch file other than autoexec.bat +::: to avoid "Out of environment space" problem on Windows 95/98. +::: set TMPMAKE=~tmp~.mak + +echo> ~tmp~.mak #### +echo>> ~tmp~.mak conf = %0 +echo>> ~tmp~.mak $(conf:\=/): nul +echo>> ~tmp~.mak @del ~setup~.mak +echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \ +if exist pathlist.tmp del pathlist.tmp +if exist confargs.mk del confargs.mk +:loop +if "%1" == "" goto :end +if "%1" == "--prefix" goto :prefix +if "%1" == "prefix" goto :prefix +if "%1" == "--srcdir" goto :srcdir +if "%1" == "srcdir" goto :srcdir +if "%1" == "--target" goto :target +if "%1" == "target" goto :target +if "%1" == "--with-static-linked-ext" goto :extstatic +if "%1" == "--program-suffix" goto :suffix +if "%1" == "RUBY_SUFFIX" goto :suffix +if "%1" == "--program-name" goto :installname +if "%1" == "--install-name" goto :installname +if "%1" == "RUBY_INSTALL_NAME" goto :installname +if "%1" == "--so-name" goto :soname +if "%1" == "RUBY_SO_NAME" goto :soname +if "%1" == "--enable-install-doc" goto :enable-rdoc +if "%1" == "--disable-install-doc" goto :disable-rdoc +if "%1" == "--extout" goto :extout +if "%1" == "EXTOUT" goto :extout +if "%1" == "--with-baseruby" goto :baseruby +if "%1" == "BASERUBY" goto :baseruby +if "%1" == "--path" goto :path +if "%1" == "-h" goto :help +if "%1" == "--help" goto :help + echo>>confargs.tmp %1 \ + shift +goto :loop +:srcdir + echo>> ~tmp~.mak -Dsrcdir=%2 \ + echo>>confargs.tmp --srcdir=%2 \ + shift + shift +goto :loop +:prefix + echo>> ~tmp~.mak -Dprefix=%2 \ + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:suffix + echo>>confargs.mk !ifndef RUBY_SUFFIX + echo>>confargs.mk RUBY_SUFFIX = %2 + echo>>confargs.mk !endif + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:installname + echo>>confargs.mk !ifndef RUBY_INSTALL_NAME + echo>>confargs.mk RUBY_INSTALL_NAME = %2 + echo>>confargs.mk !endif + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:soname + echo>>confargs.mk !ifndef RUBY_SO_NAME + echo>>confargs.mk RUBY_SO_NAME = %2 + echo>>confargs.mk !endif + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:target + echo>> ~tmp~.mak %2 \ + echo>>confargs.tmp --target=%2 \ + shift + shift +goto :loop +:extstatic + echo>>confargs.mk !ifndef EXTSTATIC + echo>>confargs.mk EXTSTATIC = static + echo>>confargs.mk !endif + echo>>confargs.tmp %1 \ + shift +goto :loop +:enable-rdoc + echo>>confargs.mk !ifndef RDOCTARGET + echo>>confargs.mk RDOCTARGET = install-doc + echo>>confargs.mk !endif + echo>>confargs.tmp %1 \ + shift +goto :loop +:disable-rdoc + echo>>confargs.mk !ifndef RDOCTARGET + echo>>confargs.mk RDOCTARGET = install-nodoc + echo>>confargs.mk !endif + echo>>confargs.tmp %1 \ + shift +goto :loop +:extout + echo>>confargs.mk !ifndef EXTOUT + echo>>confargs.mk EXTOUT = %2 + echo>>confargs.mk !endif + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:baseruby + echo>>confargs.mk !ifndef BASERUBY + echo>>confargs.mk BASERUBY = %2 + echo>>confargs.mk !endif + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:path + echo>>pathlist.tmp %2;\ + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop +:help + echo Configuration: + echo --help display this help + echo --srcdir=DIR find the sources in DIR [configure dir or `..'] + echo Installation directories: + echo --prefix=PREFIX install files in PREFIX (ignored currently) + echo System types: + echo --target=TARGET configure for TARGET [i386-bccwin32] + echo Optional Package: + echo --with-baseruby=RUBY use RUBY as baseruby [ruby] + echo --with-static-linked-ext link external modules statically + echo --enable-install-doc install rdoc indexes during install + del *.tmp + del ~tmp~.mak +goto :exit +:end +echo>> ~tmp~.mak -Dbcc32dir=$(@D) +if not exist confargs.tmp goto :noconfargs + echo>>confargs.mk configure_args = \ + type>>confargs.mk confargs.tmp + echo.>>confargs.mk + echo>>confargs.mk #### +:noconfargs +if not exist pathlist.tmp goto :nopathlist + echo>>confargs.mk pathlist = \ + type>>confargs.mk pathlist.tmp + echo.>>confargs.mk + echo>>confargs.mk #### + echo>>confargs.mk PATH = $(pathlist:;=/bin;)$(PATH) + echo>>confargs.mk INCLUDE = $(pathlist:;=/include;) + echo>>confargs.mk LIB = $(pathlist:;=/lib;) +:nopathlist +if exist confargs.mk copy confargs.mk ~setup~.mak > nul +type>>~setup~.mak ~tmp~.mak +del *.tmp > nul +del ~tmp~.mak > nul +make -s -f ~setup~.mak +:exit diff --git a/lib/ruby-1.9.1-rc1/bcc32/mkexports.rb b/lib/ruby-1.9.1-rc1/bcc32/mkexports.rb new file mode 100755 index 0000000..888ab2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bcc32/mkexports.rb @@ -0,0 +1,26 @@ +#!./miniruby -s + +$:.unshift(File.expand_path("../..", __FILE__)) +require 'win32/mkexports' + +class Exports::Bcc < Exports + def forwarding(internal, export) + internal[/\A_?/]+export + end + + def each_line(objs, &block) + objs.each do |obj| + opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32" + IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul", &block) + end + end + + def each_export(objs) + objdump(objs) do |l| + next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l + yield $1 if /'(.*?)'/ =~ l + end + yield "_strcasecmp", "_stricmp" + yield "_strncasecmp", "_strnicmp" + end +end diff --git a/lib/ruby-1.9.1-rc1/bcc32/setup.mak b/lib/ruby-1.9.1-rc1/bcc32/setup.mak new file mode 100644 index 0000000..e5b4ee8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bcc32/setup.mak @@ -0,0 +1,179 @@ +# -*- makefile -*- + +!if "$(srcdir)" != "" +bcc32dir = $(srcdir)/bcc32 +!elseif "$(bcc32dir)" == "bcc32/" +srcdir = . +!elseif "$(bcc32dir:/bcc32/=)/bcc32/" == "$(bcc32dir)" +srcdir = $(bcc32dir:/bcc32/=) +!else +srcdir = $(bcc32dir)/.. +!endif +!ifndef prefix +prefix = /usr +!endif +OS = bccwin32 +RT = $(OS) +BANG = ! +APPEND = echo.>>$(MAKEFILE) +!ifdef MAKEFILE +MAKE = $(MAKE) -f $(MAKEFILE) +!else +MAKEFILE = Makefile +!endif + +all: Makefile +Makefile: -prologue- -generic- -epilogue- +i386-$(OS): -prologue- -i386- -epilogue- +i486-$(OS): -prologue- -i486- -epilogue- +i586-$(OS): -prologue- -i586- -epilogue- +i686-$(OS): -prologue- -i686- -epilogue- +alpha-$(OS): -prologue- -alpha- -epilogue- + +-prologue-: -basic-vars- -version- -system-vars- + +-basic-vars-: nul + @echo Creating $(MAKEFILE) + @type > $(MAKEFILE) &&| +\#\#\# Makefile for ruby $(OS) \#\#\# +$(BANG)ifndef srcdir +srcdir = $(srcdir:\=/) +$(BANG)endif +$(BANG)ifndef prefix +prefix = $(prefix:\=/) +$(BANG)endif +$(BANG)if !defined(BASERUBY) +!if defined(BASERUBY) +BASERUBY = $(BASERUBY) +!endif +| +!if !defined(BASERUBY) + @for %I in (ruby.exe) do @echo BASERUBY = "%~$$PATH:I" >> $(MAKEFILE) +!endif + @type >> $(MAKEFILE) &&| +$(BANG)endif +| +!if exist(confargs.mk) + @type confargs.mk >> $(MAKEFILE) + @del confargs.mk +!endif + +-system-vars-: -runtime- -bormm- + +-bormm-: nul + @-ilink32 -q -Gn -x usebormm.lib > nul + @-if exist usebormm.tds $(APPEND) MEMLIB = usebormm.lib + @if exist usebormm.* del usebormm.* + +-osname-: nul + @echo OS = >>$(MAKEFILE) + +-runtime-: nul + type > conftest.c &&| +\#include +int main(){printf("");return 0;} +| + bcc32 conftest.c cw32i.lib > nul + tdump conftest.exe < nul > conftest.i + grep "^Imports from CC" conftest.i > conftest.c + cpp32 -P- -DFile=\# -DImports=RTNAME -Dfrom== conftest.c > nul + $(MAKE) > nul -DBANG=$(BANG) -f &&| +-runtime-: nul +$(BANG)include conftest.i +RT = $$(RTNAME:.DLL=) +OS = $$(RT:CC32=) +-runtime-: + del conftest.* +$(BANG)if "$$(OS)" == "50" + echo OS = bccwin32 >> $(MAKEFILE) +$(BANG)else + echo OS = bccwin32_$$(OS) >> $(MAKEFILE) +$(BANG)endif +| + @echo RT = $$(OS) >> $(MAKEFILE) + +-version-: nul + @cpp32 -I$(srcdir) -P- -o$(MAKEFILE) > nul &&| +\#define RUBY_REVISION 0 +\#include "version.h" +MAJOR = RUBY_VERSION_MAJOR +MINOR = RUBY_VERSION_MINOR +TEENY = RUBY_VERSION_TEENY + +BORLANDC = __BORLANDC__ +| + @$(MAKE) > nul -DBANG=$(BANG) -f &&, +-version-: nul +$(BANG)include $(MAKEFILE) +$(BANG)include $(MAKEFILE).i +-version-: + @del $(MAKEFILE).i + @type >> $(MAKEFILE) &&| +MAJOR = $$(MAJOR) +MINOR = $$(MINOR) +TEENY = $$(TEENY) +BORLANDC = $$(BORLANDC) +| +, + +-generic-: nul +!if defined(PROCESSOR_ARCHITECTURE) || defined(PROCESSOR_LEVEL) + @type >> $(MAKEFILE) &&| +!if defined(PROCESSOR_ARCHITECTURE) +$(BANG)ifndef PROCESSOR_ARCHITECTURE +PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) +$(BANG)endif +!endif +!if defined(PROCESSOR_LEVEL) +$(BANG)ifndef PROCESSOR_LEVEL +PROCESSOR_LEVEL = $(PROCESSOR_LEVEL) +$(BANG)endif +!endif +| +!endif + +-alpha-: nul + @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE + @$(APPEND) PROCESSOR_ARCHITECTURE = alpha + @$(APPEND) !endif +-ix86-: nul + @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE + @$(APPEND) PROCESSOR_ARCHITECTURE = x86 + @$(APPEND) !endif + +-i386-: -ix86- + @$(APPEND) !ifndef PROCESSOR_LEVEL + @$(APPEND) PROCESSOR_LEVEL = 3 + @$(APPEND) !endif +-i486-: -ix86- + @$(APPEND) !ifndef PROCESSOR_LEVEL + @$(APPEND) PROCESSOR_LEVEL = 4 + @$(APPEND) !endif +-i586-: -ix86- + @$(APPEND) !ifndef PROCESSOR_LEVEL + @$(APPEND) PROCESSOR_LEVEL = 5 + @$(APPEND) !endif +-i686-: -ix86- + @$(APPEND) !ifndef PROCESSOR_LEVEL + @$(APPEND) PROCESSOR_LEVEL = 6 + @$(APPEND) !endif + +-epilogue-: -encs- + +-encs-: nul + @$(MAKE) -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE) + +-epilogue-: nul + @type >> $(MAKEFILE) &&| + +\# RUBY_INSTALL_NAME = ruby +\# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR) +\# CFLAGS = -q $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi +\# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\" +\# STACK = 0x2000000 +\# LDFLAGS = -S:$$(STACK) +\# RFLAGS = $$(iconinc) +\# EXTLIBS = cw32.lib import32.lib user32.lib kernel32.lib +$(BANG)include $$(srcdir)/bcc32/Makefile.sub +| + @echo type "`$(MAKE)'" to make ruby for $(OS). diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_answer.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_answer.rb new file mode 100644 index 0000000..3cd8a8f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_answer.rb @@ -0,0 +1,15 @@ +def ack(m, n) + if m == 0 then + n + 1 + elsif n == 0 then + ack(m - 1, 1) + else + ack(m - 1, ack(m, n - 1)) + end +end + +def the_answer_to_life_the_universe_and_everything + (ack(3,7).to_s.split(//).inject(0){|s,x| s+x.to_i}.to_s + "2" ).to_i +end + +answer = the_answer_to_life_the_universe_and_everything diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_erb.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_erb.rb new file mode 100644 index 0000000..e58b7a3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_erb.rb @@ -0,0 +1,26 @@ +# +# Create many HTML strings with ERB. +# + +require 'erb' + +data = DATA.read +max = 5_000 +title = "hello world!" +content = "hello world!\n" * 10 + +max.times{ + ERB.new(data).result(binding) +} + +__END__ + + + <%= title %> + +

<%= title %>

+

+ <%= content %> +

+ + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_factorial.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_factorial.rb new file mode 100644 index 0000000..a5a5de0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_factorial.rb @@ -0,0 +1,11 @@ +def fact(n) + if(n > 1) + n * fact(n-1) + else + 1 + end +end + +8.times{ + fact(5000) +} \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_fib.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_fib.rb new file mode 100644 index 0000000..34a7b2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_fib.rb @@ -0,0 +1,10 @@ +def fib n + if n < 3 + 1 + else + fib(n-1) + fib(n-2) + end +end + +fib(34) + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_mandelbrot.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_mandelbrot.rb new file mode 100644 index 0000000..a0dcf5e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_mandelbrot.rb @@ -0,0 +1,23 @@ +require 'complex' + +def mandelbrot? z + i = 0 + while i<100 + i+=1 + z = z * z + return false if z.abs > 2 + end + true +end + +ary = [] + +(0..100).each{|dx| + (0..100).each{|dy| + x = dx / 50.0 + y = dy / 50.0 + c = Complex(x, y) + ary << c if mandelbrot?(c) + } +} + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_pentomino.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_pentomino.rb new file mode 100644 index 0000000..59c63f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_pentomino.rb @@ -0,0 +1,259 @@ +#!/usr/local/bin/ruby +# This program is contributed by Shin Nishiyama + + +# modified by K.Sasada + +NP = 5 +ROW = 8 + NP +COL = 8 + +$p = [] +$b = [] +$no = 0 + +def piece(n, a, nb) + nb.each{|x| + a[n] = x + if n == NP-1 + $p << [a.sort] + else + nbc=nb.dup + [-ROW, -1, 1, ROW].each{|d| + if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d) + nbc << x+d + end + } + nbc.delete x + piece(n+1,a[0..n],nbc) + end + } +end + +def kikaku(a) + a.collect {|x| x - a[0]} +end +def ud(a) + kikaku(a.collect {|x| ((x+NP)%ROW)-ROW*((x+NP)/ROW) }.sort) +end +def rl(a) + kikaku(a.collect {|x| ROW*((x+NP)/ROW)+ROW-((x+NP)%ROW)}.sort) +end +def xy(a) + kikaku(a.collect {|x| ROW*((x+NP)%ROW) + (x+NP)/ROW }.sort) +end + +def mkpieces + piece(0,[],[0]) + $p.each do |a| + a0 = a[0] + a[1] = ud(a0) + a[2] = rl(a0) + a[3] = ud(rl(a0)) + a[4] = xy(a0) + a[5] = ud(xy(a0)) + a[6] = rl(xy(a0)) + a[7] = ud(rl(xy(a0))) + a.sort! + a.uniq! + end + $p.uniq!.sort! {|x,y| x[0] <=> y[0] } +end + +def mkboard + (0...ROW*COL).each{|i| + if i % ROW >= ROW-NP + $b[i] = -2 + else + $b[i] = -1 + end + $b[3*ROW+3]=$b[3*ROW+4]=$b[4*ROW+3]=$b[4*ROW+4]=-2 + } +end + +def pboard + return # skip print + print "No. #$no\n" + (0...COL).each{|i| + print "|" + (0...ROW-NP).each{|j| + x = $b[i*ROW+j] + if x < 0 + print "..|" + else + printf "%2d|",x+1 + end + } + print "\n" + } + print "\n" +end + +$pnum=[] +def setpiece(a,pos) + if a.length == $p.length then + $no += 1 + pboard + return + end + while $b[pos] != -1 + pos += 1 + end + ($pnum - a).each do |i| + $p[i].each do |x| + f = 0 + x.each{|s| + if $b[pos+s] != -1 + f=1 + break + end + } + if f == 0 then + x.each{|s| + $b[pos+s] = i + } + a << i + setpiece(a.dup, pos) + a.pop + x.each{|s| + $b[pos+s] = -1 + } + end + end + end +end + +mkpieces +mkboard +$p[4] = [$p[4][0]] +$pnum = (0...$p.length).to_a +setpiece([],0) + + +__END__ + +# original + +NP = 5 +ROW = 8 + NP +COL = 8 + +$p = [] +$b = [] +$no = 0 + +def piece(n,a,nb) + for x in nb + a[n] = x + if n == NP-1 + $p << [a.sort] + else + nbc=nb.dup + for d in [-ROW, -1, 1, ROW] + if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d) + nbc << x+d + end + end + nbc.delete x + piece(n+1,a[0..n],nbc) + end + end +end + +def kikaku(a) + a.collect {|x| x - a[0]} +end +def ud(a) + kikaku(a.collect {|x| ((x+NP)%ROW)-ROW*((x+NP)/ROW) }.sort) +end +def rl(a) + kikaku(a.collect {|x| ROW*((x+NP)/ROW)+ROW-((x+NP)%ROW)}.sort) +end +def xy(a) + kikaku(a.collect {|x| ROW*((x+NP)%ROW) + (x+NP)/ROW }.sort) +end + +def mkpieces + piece(0,[],[0]) + $p.each do |a| + a0 = a[0] + a[1] = ud(a0) + a[2] = rl(a0) + a[3] = ud(rl(a0)) + a[4] = xy(a0) + a[5] = ud(xy(a0)) + a[6] = rl(xy(a0)) + a[7] = ud(rl(xy(a0))) + a.sort! + a.uniq! + end + $p.uniq!.sort! {|x,y| x[0] <=> y[0] } +end + +def mkboard + for i in 0...ROW*COL + if i % ROW >= ROW-NP + $b[i] = -2 + else + $b[i] = -1 + end + $b[3*ROW+3]=$b[3*ROW+4]=$b[4*ROW+3]=$b[4*ROW+4]=-2 + end +end + +def pboard + print "No. #$no\n" + for i in 0...COL + print "|" + for j in 0...ROW-NP + x = $b[i*ROW+j] + if x < 0 + print "..|" + else + printf "%2d|",x+1 + end + end + print "\n" + end + print "\n" +end + +$pnum=[] +def setpiece(a,pos) + if a.length == $p.length then + $no += 1 + pboard + return + end + while $b[pos] != -1 + pos += 1 + end + ($pnum - a).each do |i| + $p[i].each do |x| + f = 0 + for s in x do + if $b[pos+s] != -1 + f=1 + break + end + end + if f == 0 then + for s in x do + $b[pos+s] = i + end + a << i + setpiece(a.dup, pos) + a.pop + for s in x do + $b[pos+s] = -1 + end + end + end + end +end + +mkpieces +mkboard +$p[4] = [$p[4][0]] +$pnum = (0...$p.length).to_a +setpiece([],0) diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_raise.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_raise.rb new file mode 100644 index 0000000..01d2ae3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_raise.rb @@ -0,0 +1,8 @@ +i=0 +while i<300000 + i+=1 + begin + raise + rescue + end +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_strconcat.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_strconcat.rb new file mode 100644 index 0000000..c6ef817 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_strconcat.rb @@ -0,0 +1,5 @@ +i=0 +while i<500000 + "#{1+1} #{1+1} #{1+1}" + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_tak.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_tak.rb new file mode 100644 index 0000000..efe5380 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_tak.rb @@ -0,0 +1,13 @@ + +def tak x, y, z + unless y < x + z + else + tak( tak(x-1, y, z), + tak(y-1, z, x), + tak(z-1, x, y)) + end +end + +tak(18, 9, 0) + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_tarai.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_tarai.rb new file mode 100644 index 0000000..4c146f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_tarai.rb @@ -0,0 +1,10 @@ +def tarai( x, y, z ) + if x <= y + then y + else tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) + end +end + +tarai(12, 6, 0) diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_app_uri.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_app_uri.rb new file mode 100644 index 0000000..586edfd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_app_uri.rb @@ -0,0 +1,8 @@ +require 'uri' + +100_000.times{ + uri = URI.parse('http://www.ruby-lang.org') + uri.scheme + uri.host + uri.port +} diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_create.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_create.rb new file mode 100644 index 0000000..7adbe9e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_create.rb @@ -0,0 +1,13 @@ +# +# Create files +# + +max = 50_000 +file = './tmpfile_of_bm_io_file_create' + +max.times{ + f = open(file, 'w') + f.close#(true) +} +File.unlink(file) + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_read.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_read.rb new file mode 100644 index 0000000..2b4212d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_read.rb @@ -0,0 +1,15 @@ +# +# Seek and Read file. +# + +require 'tempfile' + +max = 20_000 +str = "Hello world! " * 1000 +f = Tempfile.new('yarv-benchmark') +f.write str + +max.times{ + f.seek 0 + f.read +} diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_write.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_write.rb new file mode 100644 index 0000000..3cec58c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_io_file_write.rb @@ -0,0 +1,14 @@ +# +# Seek and Write file. +# + +require 'tempfile' + +max = 20_000 +str = "Hello world! " * 1000 +f = Tempfile.new('yarv-benchmark') + +max.times{ + f.seek 0 + f.write str +} diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_loop_for.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_for.rb new file mode 100644 index 0000000..0fc4cc1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_for.rb @@ -0,0 +1,3 @@ +for i in 1..30_000_000 + # +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_loop_generator.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_generator.rb new file mode 100644 index 0000000..d3375c7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_generator.rb @@ -0,0 +1,14 @@ +max = 600000 + +if defined? Fiber + gen = (1..max).each + loop do + gen.next + end +else + require 'generator' + gen = Generator.new((0..max)) + while gen.next? + gen.next + end +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_loop_times.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_times.rb new file mode 100644 index 0000000..521f72a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_times.rb @@ -0,0 +1 @@ +30_000_000.times{|e|} diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop.rb new file mode 100644 index 0000000..43d35e1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop.rb @@ -0,0 +1,4 @@ +i=0 +while i<30_000_000 # benchmark loop 1 + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop2.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop2.rb new file mode 100644 index 0000000..e514989 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_loop_whileloop2.rb @@ -0,0 +1,4 @@ +i=0 +while i< 6_000_000 # benchmark loop 2 + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_ackermann.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_ackermann.rb new file mode 100644 index 0000000..7db5be9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_ackermann.rb @@ -0,0 +1,19 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: ackermann-ruby.code,v 1.4 2004/11/13 07:40:41 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ + +def ack(m, n) + if m == 0 then + n + 1 + elsif n == 0 then + ack(m - 1, 1) + else + ack(m - 1, ack(m, n - 1)) + end +end + +NUM = 9 +ack(3, NUM) + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_array.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_array.rb new file mode 100644 index 0000000..2b8fce8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_array.rb @@ -0,0 +1,23 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: ary-ruby.code,v 1.4 2004/11/13 07:41:27 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ +# with help from Paul Brannan and Mark Hubbart + +n = 9000 # Integer(ARGV.shift || 1) + +x = Array.new(n) +y = Array.new(n, 0) + +n.times{|bi| + x[bi] = bi + 1 +} + +(0 .. 999).each do |e| + (n-1).step(0,-1) do |bi| + y[bi] += x.at(bi) + end +end +# puts "#{y.first} #{y.last}" + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_binary_trees.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_binary_trees.rb new file mode 100644 index 0000000..6a26465 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_binary_trees.rb @@ -0,0 +1,57 @@ +# The Computer Language Shootout Benchmarks +# http://shootout.alioth.debian.org +# +# contributed by Jesse Millikan + +# disable output +def STDOUT.write_ *args +end + +def item_check(tree) + if tree[0] == nil + tree[1] + else + tree[1] + item_check(tree[0]) - item_check(tree[2]) + end +end + +def bottom_up_tree(item, depth) + if depth > 0 + item_item = 2 * item + depth -= 1 + [bottom_up_tree(item_item - 1, depth), item, bottom_up_tree(item_item, depth)] + else + [nil, item, nil] + end +end + +max_depth = 12 # 16 # ARGV[0].to_i +min_depth = 4 + +max_depth = min_depth + 2 if min_depth + 2 > max_depth + +stretch_depth = max_depth + 1 +stretch_tree = bottom_up_tree(0, stretch_depth) + +puts "stretch tree of depth #{stretch_depth}\t check: #{item_check(stretch_tree)}" +stretch_tree = nil + +long_lived_tree = bottom_up_tree(0, max_depth) + +min_depth.step(max_depth + 1, 2) do |depth| + iterations = 2**(max_depth - depth + min_depth) + + check = 0 + + for i in 1..iterations + temp_tree = bottom_up_tree(i, depth) + check += item_check(temp_tree) + + temp_tree = bottom_up_tree(-i, depth) + check += item_check(temp_tree) + end + + puts "#{iterations * 2}\t trees of depth #{depth}\t check: #{check}" +end + +puts "long lived tree of depth #{max_depth}\t check: #{item_check(long_lived_tree)}" diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_concatenate.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_concatenate.rb new file mode 100644 index 0000000..8262968 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_concatenate.rb @@ -0,0 +1,18 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: strcat-ruby.code,v 1.4 2004/11/13 07:43:28 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ +# based on code from Aristarkh A Zagorodnikov and Dat Nguyen + +STUFF = "hello\n" +i=0 +while i<10 + i+=1 + hello = '' + 400000.times do |e| + hello << STUFF + end +end +# puts hello.length + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_count_words.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_count_words.rb new file mode 100644 index 0000000..65f6337 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_count_words.rb @@ -0,0 +1,19 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: wc-ruby.code,v 1.4 2004/11/13 07:43:32 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ +# with help from Paul Brannan + +input = open(File.join(File.dirname($0), 'wc.input'), 'rb') + +nl = nw = nc = 0 +while true + tmp = input.read(4096) or break + data = tmp << (input.gets || "") + nc += data.length + nl += data.count("\n") + ((data.strip! || data).tr!("\n", " ") || data).squeeze! + nw += data.count(" ") + 1 +end +# STDERR.puts "#{nl} #{nw} #{nc}" + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_exception.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_exception.rb new file mode 100644 index 0000000..d8b4612 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_exception.rb @@ -0,0 +1,61 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: except-ruby.code,v 1.4 2004/11/13 07:41:33 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ + +$HI = 0 +$LO = 0 +NUM = 250000 # Integer(ARGV[0] || 1) + + +class Lo_Exception < Exception + def initialize(num) + @value = num + end +end + +class Hi_Exception < Exception + def initialize(num) + @value = num + end +end + +def some_function(num) + begin + hi_function(num) + rescue + print "We shouldn't get here, exception is: #{$!.type}\n" + end +end + +def hi_function(num) + begin + lo_function(num) + rescue Hi_Exception + $HI = $HI + 1 + end +end + +def lo_function(num) + begin + blowup(num) + rescue Lo_Exception + $LO = $LO + 1 + end +end + +def blowup(num) + if num % 2 == 0 + raise Lo_Exception.new(num) + else + raise Hi_Exception.new(num) + end +end + + +i = 1 +max = NUM+1 +while i < max + i+=1 + some_function(i+1) +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_fannkuch.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_fannkuch.rb new file mode 100644 index 0000000..a214f2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_fannkuch.rb @@ -0,0 +1,45 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org/ +# Contributed by Sokolov Yura +# Modified by Ryan Williams + +def fannkuch(n) + maxFlips, m, r, check = 0, n-1, n, 0 + count = (1..n).to_a + perm = (1..n).to_a + + while true + if check < 30 + puts "#{perm}" + check += 1 + end + + while r != 1 + count[r-1] = r + r -= 1 + end + + if perm[0] != 1 and perm[m] != n + perml = perm.clone #.dup + flips = 0 + while (k = perml.first ) != 1 + perml = perml.slice!(0, k).reverse + perml + flips += 1 + end + maxFlips = flips if flips > maxFlips + end + while true + if r==n then return maxFlips end + perm.insert r,perm.shift + break if (count[r] -= 1) > 0 + r += 1 + end + end +end + +def puts *args +end + +N = 10 # (ARGV[0] || 1).to_i +puts "Pfannkuchen(#{N}) = #{fannkuch(N)}" + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_fasta.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_fasta.rb new file mode 100644 index 0000000..3f759ba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_fasta.rb @@ -0,0 +1,81 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org/ +# Contributed by Sokolov Yura + +$last = 42.0 +def gen_random (max,im=139968,ia=3877,ic=29573) + (max * ($last = ($last * ia + ic) % im)) / im +end + +alu = + "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG"+ + "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA"+ + "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT"+ + "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA"+ + "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG"+ + "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC"+ + "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA" + +iub = [ + ["a", 0.27], + ["c", 0.12], + ["g", 0.12], + ["t", 0.27], + + ["B", 0.02], + ["D", 0.02], + ["H", 0.02], + ["K", 0.02], + ["M", 0.02], + ["N", 0.02], + ["R", 0.02], + ["S", 0.02], + ["V", 0.02], + ["W", 0.02], + ["Y", 0.02], +] +homosapiens = [ + ["a", 0.3029549426680], + ["c", 0.1979883004921], + ["g", 0.1975473066391], + ["t", 0.3015094502008], +] + +def make_repeat_fasta(id, desc, src, n) + puts ">#{id} #{desc}" + v = nil + width = 60 + l = src.length + s = src * ((n / l) + 1) + s.slice!(n, l) + puts(s.scan(/.{1,#{width}}/).join("\n")) +end + +def make_random_fasta(id, desc, table, n) + puts ">#{id} #{desc}" + rand, v = nil,nil + width = 60 + chunk = 1 * width + prob = 0.0 + table.each{|v| v[1]= (prob += v[1])} + for i in 1..(n/width) + puts((1..width).collect{ + rand = gen_random(1.0) + table.find{|v| v[1]>rand}[0] + }.join) + end + if n%width != 0 + puts((1..(n%width)).collect{ + rand = gen_random(1.0) + table.find{|v| v[1]>rand}[0] + }.join) + end +end + + +n = (ARGV[0] or 250_000).to_i + +make_repeat_fasta('ONE', 'Homo sapiens alu', alu, n*2) +make_random_fasta('TWO', 'IUB ambiguity codes', iub, n*3) +make_random_fasta('THREE', 'Homo sapiens frequency', homosapiens, n*5) + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_k_nucleotide.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_k_nucleotide.rb new file mode 100644 index 0000000..dadab3e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_k_nucleotide.rb @@ -0,0 +1,48 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org +# +# contributed by jose fco. gonzalez +# modified by Sokolov Yura + +seq = String.new + +def frecuency( seq,length ) + n, table = seq.length - length + 1, Hash.new(0) + f, i = nil, nil + (0 ... length).each do |f| + (f ... n).step(length) do |i| + table[seq[i,length]] += 1 + end + end + [n,table] + +end + +def sort_by_freq( seq,length ) + n,table = frecuency( seq,length ) + a, b, v = nil, nil, nil + table.sort{|a,b| b[1] <=> a[1]}.each do |v| + puts "%s %.3f" % [v[0].upcase,((v[1]*100).to_f/n)] + end + puts +end + +def find_seq( seq,s ) + n,table = frecuency( seq,s.length ) + puts "#{table[s].to_s}\t#{s.upcase}" +end + +input = open(File.join(File.dirname($0), 'fasta.output.100000'), 'rb') + +line = input.gets while line !~ /^>THREE/ +line = input.gets + +while (line !~ /^>/) & line do + seq << line.chomp + line = input.gets +end + +[1,2].each {|i| sort_by_freq( seq,i ) } + +%w(ggt ggta ggtatt ggtattttaatt ggtattttaatttatagt).each{|s| find_seq( seq,s) } + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_lists.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_lists.rb new file mode 100644 index 0000000..3652288 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_lists.rb @@ -0,0 +1,47 @@ +#from http://www.bagley.org/~doug/shootout/bench/lists/lists.ruby + +NUM = 100 +SIZE = 10000 + +def test_lists() + # create a list of integers (Li1) from 1 to SIZE + li1 = (1..SIZE).to_a + # copy the list to li2 (not by individual items) + li2 = li1.dup + # remove each individual item from left side of li2 and + # append to right side of li3 (preserving order) + li3 = Array.new + while (not li2.empty?) + li3.push(li2.shift) + end + # li2 must now be empty + # remove each individual item from right side of li3 and + # append to right side of li2 (reversing list) + while (not li3.empty?) + li2.push(li3.pop) + end + # li3 must now be empty + # reverse li1 in place + li1.reverse! + # check that first item is now SIZE + if li1[0] != SIZE then + p "not SIZE" + 0 + else + # compare li1 and li2 for equality + if li1 != li2 then + return(0) + else + # return the length of the list + li1.length + end + end +end + +i = 0 +while i LIMIT_SQUARED + escape = true + break + end + end + + byte_acc = (byte_acc << 1) | (escape ? 0b0 : 0b1) + bit_num += 1 + + # Code is very similar for these cases, but using separate blocks + # ensures we skip the shifting when it's unnecessary, which is most cases. + if (bit_num == 8) + print byte_acc.chr + byte_acc = 0 + bit_num = 0 + elsif (x == count_size) + byte_acc <<= (8 - bit_num) + print byte_acc.chr + byte_acc = 0 + bit_num = 0 + end + end +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_matrix.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_matrix.rb new file mode 100644 index 0000000..0f274ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_matrix.rb @@ -0,0 +1,48 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: matrix-ruby.code,v 1.4 2004/11/13 07:42:14 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ + +n = 60 #Integer(ARGV.shift || 1) + +size = 30 + +def mkmatrix(rows, cols) + count = 1 + mx = Array.new(rows) + (0 .. (rows - 1)).each do |bi| + row = Array.new(cols, 0) + (0 .. (cols - 1)).each do |j| + row[j] = count + count += 1 + end + mx[bi] = row + end + mx +end + +def mmult(rows, cols, m1, m2) + m3 = Array.new(rows) + (0 .. (rows - 1)).each do |bi| + row = Array.new(cols, 0) + (0 .. (cols - 1)).each do |j| + val = 0 + (0 .. (cols - 1)).each do |k| + val += m1.at(bi).at(k) * m2.at(k).at(j) + end + row[j] = val + end + m3[bi] = row + end + m3 +end + +m1 = mkmatrix(size, size) +m2 = mkmatrix(size, size) +mm = Array.new +n.times do + mm = mmult(size, size, m1, m2) +end +# puts "#{mm[0][0]} #{mm[2][3]} #{mm[3][2]} #{mm[4][4]}" + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_meteor_contest.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_meteor_contest.rb new file mode 100644 index 0000000..99cf6a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_meteor_contest.rb @@ -0,0 +1,564 @@ +#!/usr/bin/env ruby +# +# The Computer Language Shootout +# http://shootout.alioth.debian.org +# contributed by Kevin Barnes (Ruby novice) + +# PROGRAM: the main body is at the bottom. +# 1) read about the problem here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/ +# 2) see how I represent a board as a bitmask by reading the blank_board comments +# 3) read as your mental paths take you + +def print *args +end + +# class to represent all information about a particular rotation of a particular piece +class Rotation + # an array (by location) containing a bit mask for how the piece maps at the given location. + # if the rotation is invalid at that location the mask will contain false + attr_reader :start_masks + + # maps a direction to a relative location. these differ depending on whether it is an even or + # odd row being mapped from + @@rotation_even_adder = { :west => -1, :east => 1, :nw => -7, :ne => -6, :sw => 5, :se => 6 } + @@rotation_odd_adder = { :west => -1, :east => 1, :nw => -6, :ne => -5, :sw => 6, :se => 7 } + + def initialize( directions ) + @even_offsets, @odd_offsets = normalize_offsets( get_values( directions )) + + @even_mask = mask_for_offsets( @even_offsets) + @odd_mask = mask_for_offsets( @odd_offsets) + + @start_masks = Array.new(60) + + # create the rotational masks by placing the base mask at the location and seeing if + # 1) it overlaps the boundries and 2) it produces a prunable board. if either of these + # is true the piece cannot be placed + 0.upto(59) do | offset | + mask = is_even(offset) ? (@even_mask << offset) : (@odd_mask << offset) + if (blank_board & mask == 0 && !prunable(blank_board | mask, 0, true)) then + imask = compute_required( mask, offset) + @start_masks[offset] = [ mask, imask, imask | mask ] + else + @start_masks[offset] = false + end + end + end + + def compute_required( mask, offset ) + board = blank_board + 0.upto(offset) { | i | board |= 1 << i } + board |= mask + return 0 if (!prunable(board | mask, offset)) + board = flood_fill(board,58) + count = 0 + imask = 0 + 0.upto(59) do | i | + if (board[i] == 0) then + imask |= (1 << i) + count += 1 + end + end + (count > 0 && count < 5) ? imask : 0 + end + + def flood_fill( board, location) + return board if (board[location] == 1) + board |= 1 << location + row, col = location.divmod(6) + board = flood_fill( board, location - 1) if (col > 0) + board = flood_fill( board, location + 1) if (col < 4) + if (row % 2 == 0) then + board = flood_fill( board, location - 7) if (col > 0 && row > 0) + board = flood_fill( board, location - 6) if (row > 0) + board = flood_fill( board, location + 6) if (row < 9) + board = flood_fill( board, location + 5) if (col > 0 && row < 9) + else + board = flood_fill( board, location - 5) if (col < 4 && row > 0) + board = flood_fill( board, location - 6) if (row > 0) + board = flood_fill( board, location + 6) if (row < 9) + board = flood_fill( board, location + 7) if (col < 4 && row < 9) + end + board + end + + # given a location, produces a list of relative locations covered by the piece at this rotation + def offsets( location) + if is_even( location) then + @even_offsets.collect { | value | value + location } + else + @odd_offsets.collect { | value | value + location } + end + end + + # returns a set of offsets relative to the top-left most piece of the rotation (by even or odd rows) + # this is hard to explain. imagine we have this partial board: + # 0 0 0 0 0 x [positions 0-5] + # 0 0 1 1 0 x [positions 6-11] + # 0 0 1 0 0 x [positions 12-17] + # 0 1 0 0 0 x [positions 18-23] + # 0 1 0 0 0 x [positions 24-29] + # 0 0 0 0 0 x [positions 30-35] + # ... + # The top-left of the piece is at position 8, the + # board would be passed as a set of positions (values array) containing [8,9,14,19,25] not necessarily in that + # sorted order. Since that array starts on an odd row, the offsets for an odd row are: [0,1,6,11,17] obtained + # by subtracting 8 from everything. Now imagine the piece shifted up and to the right so it's on an even row: + # 0 0 0 1 1 x [positions 0-5] + # 0 0 1 0 0 x [positions 6-11] + # 0 0 1 0 0 x [positions 12-17] + # 0 1 0 0 0 x [positions 18-23] + # 0 0 0 0 0 x [positions 24-29] + # 0 0 0 0 0 x [positions 30-35] + # ... + # Now the positions are [3,4,8,14,19] which after subtracting the lowest value (3) gives [0,1,5,11,16] thus, the + # offsets for this particular piece are (in even, odd order) [0,1,5,11,16],[0,1,6,11,17] which is what + # this function would return + def normalize_offsets( values) + min = values.min + even_min = is_even(min) + other_min = even_min ? min + 6 : min + 7 + other_values = values.collect do | value | + if is_even(value) then + value + 6 - other_min + else + value + 7 - other_min + end + end + values.collect! { | value | value - min } + + if even_min then + [values, other_values] + else + [other_values, values] + end + end + + # produce a bitmask representation of an array of offset locations + def mask_for_offsets( offsets ) + mask = 0 + offsets.each { | value | mask = mask + ( 1 << value ) } + mask + end + + # finds a "safe" position that a position as described by a list of directions can be placed + # without falling off any edge of the board. the values returned a location to place the first piece + # at so it will fit after making the described moves + def start_adjust( directions ) + south = east = 0; + directions.each do | direction | + east += 1 if ( direction == :sw || direction == :nw || direction == :west ) + south += 1 if ( direction == :nw || direction == :ne ) + end + south * 6 + east + end + + # given a set of directions places the piece (as defined by a set of directions) on the board at + # a location that will not take it off the edge + def get_values ( directions ) + start = start_adjust(directions) + values = [ start ] + directions.each do | direction | + if (start % 12 >= 6) then + start += @@rotation_odd_adder[direction] + else + start += @@rotation_even_adder[direction] + end + values += [ start ] + end + + # some moves take you back to an existing location, we'll strip duplicates + values.uniq + end +end + +# describes a piece and caches information about its rotations to as to be efficient for iteration +# ATTRIBUTES: +# rotations -- all the rotations of the piece +# type -- a numeic "name" of the piece +# masks -- an array by location of all legal rotational masks (a n inner array) for that location +# placed -- the mask that this piece was last placed at (not a location, but the actual mask used) +class Piece + attr_reader :rotations, :type, :masks + attr_accessor :placed + + # transform hashes that change one direction into another when you either flip or rotate a set of directions + @@flip_converter = { :west => :west, :east => :east, :nw => :sw, :ne => :se, :sw => :nw, :se => :ne } + @@rotate_converter = { :west => :nw, :east => :se, :nw => :ne, :ne => :east, :sw => :west, :se => :sw } + + def initialize( directions, type ) + @type = type + @rotations = Array.new(); + @map = {} + + generate_rotations( directions ) + directions.collect! { | value | @@flip_converter[value] } + generate_rotations( directions ) + + # creates the masks AND a map that returns [location, rotation] for any given mask + # this is used when a board is found and we want to draw it, otherwise the map is unused + @masks = Array.new(); + 0.upto(59) do | i | + even = true + @masks[i] = @rotations.collect do | rotation | + mask = rotation.start_masks[i] + @map[mask[0]] = [ i, rotation ] if (mask) + mask || nil + end + @masks[i].compact! + end + end + + # rotates a set of directions through all six angles and adds a Rotation to the list for each one + def generate_rotations( directions ) + 6.times do + rotations.push( Rotation.new(directions)) + directions.collect! { | value | @@rotate_converter[value] } + end + end + + # given a board string, adds this piece to the board at whatever location/rotation + # important: the outbound board string is 5 wide, the normal location notation is six wide (padded) + def fill_string( board_string) + location, rotation = @map[@placed] + rotation.offsets(location).each do | offset | + row, col = offset.divmod(6) + board_string[ row*5 + col, 1 ] = @type.to_s + end + end +end + +# a blank bit board having this form: +# +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 0 0 0 0 0 1 +# 1 1 1 1 1 1 +# +# where left lest significant bit is the top left and the most significant is the lower right +# the actual board only consists of the 0 places, the 1 places are blockers to keep things from running +# off the edges or bottom +def blank_board + 0b111111100000100000100000100000100000100000100000100000100000100000 +end + +def full_board + 0b111111111111111111111111111111111111111111111111111111111111111111 +end + +# determines if a location (bit position) is in an even row +def is_even( location) + (location % 12) < 6 +end + +# support function that create three utility maps: +# $converter -- for each row an array that maps a five bit row (via array mapping) +# to the a a five bit representation of the bits below it +# $bit_count -- maps a five bit row (via array mapping) to the number of 1s in the row +# @@new_regions -- maps a five bit row (via array mapping) to an array of "region" arrays +# a region array has three values the first is a mask of bits in the region, +# the second is the count of those bits and the third is identical to the first +# examples: +# 0b10010 => [ 0b01100, 2, 0b01100 ], [ 0b00001, 1, 0b00001] +# 0b01010 => [ 0b10000, 1, 0b10000 ], [ 0b00100, 1, 0b00100 ], [ 0b00001, 1, 0b00001] +# 0b10001 => [ 0b01110, 3, 0b01110 ] +def create_collector_support + odd_map = [0b11, 0b110, 0b1100, 0b11000, 0b10000] + even_map = [0b1, 0b11, 0b110, 0b1100, 0b11000] + + all_odds = Array.new(0b100000) + all_evens = Array.new(0b100000) + bit_counts = Array.new(0b100000) + new_regions = Array.new(0b100000) + 0.upto(0b11111) do | i | + bit_count = odd = even = 0 + 0.upto(4) do | bit | + if (i[bit] == 1) then + bit_count += 1 + odd |= odd_map[bit] + even |= even_map[bit] + end + end + all_odds[i] = odd + all_evens[i] = even + bit_counts[i] = bit_count + new_regions[i] = create_regions( i) + end + + $converter = [] + 10.times { | row | $converter.push((row % 2 == 0) ? all_evens : all_odds) } + $bit_counts = bit_counts + $regions = new_regions.collect { | set | set.collect { | value | [ value, bit_counts[value], value] } } +end + +# determines if a board is punable, meaning that there is no possibility that it +# can be filled up with pieces. A board is prunable if there is a grouping of unfilled spaces +# that are not a multiple of five. The following board is an example of a prunable board: +# 0 0 1 0 0 +# 0 1 0 0 0 +# 1 1 0 0 0 +# 0 1 0 0 0 +# 0 0 0 0 0 +# ... +# +# This board is prunable because the top left corner is only 3 bits in area, no piece will ever fit it +# parameters: +# board -- an initial bit board (6 bit padded rows, see blank_board for format) +# location -- starting location, everything above and to the left is already full +# slotting -- set to true only when testing initial pieces, when filling normally +# additional assumptions are possible +# +# Algorithm: +# The algorithm starts at the top row (as determined by location) and iterates a row at a time +# maintainng counts of active open areas (kept in the collector array) each collector contains +# three values at the start of an iteration: +# 0: mask of bits that would be adjacent to the collector in this row +# 1: the number of bits collected so far +# 2: a scratch space starting as zero, but used during the computation to represent +# the empty bits in the new row that are adjacent (position 0) +# The exact procedure is described in-code +def prunable( board, location, slotting = false) + collectors = [] + # loop accross the rows + (location / 6).to_i.upto(9) do | row_on | + # obtain a set of regions representing the bits of the curent row. + regions = $regions[(board >> (row_on * 6)) & 0b11111] + converter = $converter[row_on] + + # track the number of collectors at the start of the cycle so that + # we don't compute against newly created collectors, only existing collectors + initial_collector_count = collectors.length + + # loop against the regions. For each region of the row + # we will see if it connects to one or more existing collectors. + # if it connects to 1 collector, the bits from the region are added to the + # bits of the collector and the mask is placed in collector[2] + # If the region overlaps more than one collector then all the collectors + # it overlaps with are merged into the first one (the others are set to nil in the array) + # if NO collectors are found then the region is copied as a new collector + regions.each do | region | + collector_found = nil + region_mask = region[2] + initial_collector_count.times do | collector_num | + collector = collectors[collector_num] + if (collector) then + collector_mask = collector[0] + if (collector_mask & region_mask != 0) then + if (collector_found) then + collector_found[0] |= collector_mask + collector_found[1] += collector[1] + collector_found[2] |= collector[2] + collectors[collector_num] = nil + else + collector_found = collector + collector[1] += region[1] + collector[2] |= region_mask + end + end + end + end + if (collector_found == nil) then + collectors.push(Array.new(region)) + end + end + + # check the existing collectors, if any collector overlapped no bits in the region its [2] value will + # be zero. The size of any such reaason is tested if it is not a muliple of five true is returned since + # the board is prunable. if it is a multiple of five it is removed. + # Collector that are still active have a new adjacent value [0] set based n the matched bits + # and have [2] cleared out for the next cycle. + collectors.length.times do | collector_num | + collector = collectors[collector_num] + if (collector) then + if (collector[2] == 0) then + return true if (collector[1] % 5 != 0) + collectors[collector_num] = nil + else + # if a collector matches all bits in the row then we can return unprunable early for the + # follwing reasons: + # 1) there can be no more unavailable bits bince we fill from the top left downward + # 2) all previous regions have been closed or joined so only this region can fail + # 3) this region must be good since there can never be only 1 region that is nuot + # a multiple of five + # this rule only applies when filling normally, so we ignore the rule if we are "slotting" + # in pieces to see what configurations work for them (the only other time this algorithm is used). + return false if (collector[2] == 0b11111 && !slotting) + collector[0] = converter[collector[2]] + collector[2] = 0 + end + end + end + + # get rid of all the empty converters for the next round + collectors.compact! + end + return false if (collectors.length <= 1) # 1 collector or less and the region is fine + collectors.any? { | collector | (collector[1] % 5) != 0 } # more than 1 and we test them all for bad size +end + +# creates a region given a row mask. see prunable for what a "region" is +def create_regions( value ) + regions = [] + cur_region = 0 + 5.times do | bit | + if (value[bit] == 0) then + cur_region |= 1 << bit + else + if (cur_region != 0 ) then + regions.push( cur_region) + cur_region = 0; + end + end + end + regions.push(cur_region) if (cur_region != 0) + regions +end + +# find up to the counted number of solutions (or all solutions) and prints the final result +def find_all + find_top( 1) + find_top( 0) + print_results +end + +# show the board +def print_results + print "#{@boards_found} solutions found\n\n" + print_full_board( @min_board) + print "\n" + print_full_board( @max_board) + print "\n" +end + +# finds solutions. This special version of the main function is only used for the top level +# the reason for it is basically to force a particular ordering on how the rotations are tested for +# the first piece. It is called twice, first looking for placements of the odd rotations and then +# looking for placements of the even locations. +# +# WHY? +# Since any found solution has an inverse we want to maximize finding solutions that are not already found +# as an inverse. The inverse will ALWAYS be 3 one of the piece configurations that is exactly 3 rotations away +# (an odd number). Checking even vs odd then produces a higher probability of finding more pieces earlier +# in the cycle. We still need to keep checking all the permutations, but our probability of finding one will +# diminsh over time. Since we are TOLD how many to search for this lets us exit before checking all pieces +# this bennifit is very great when seeking small numbers of solutions and is 0 when looking for more than the +# maximum number +def find_top( rotation_skip) + board = blank_board + (@pieces.length-1).times do + piece = @pieces.shift + piece.masks[0].each do | mask, imask, cmask | + if ((rotation_skip += 1) % 2 == 0) then + piece.placed = mask + find( 1, 1, board | mask) + end + end + @pieces.push(piece) + end + piece = @pieces.shift + @pieces.push(piece) +end + +# the normail find routine, iterates through the available pieces, checks all rotations at the current location +# and adds any boards found. depth is acheived via recursion. the overall approach is described +# here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/ +# parameters: +# start_location -- where to start looking for place for the next piece at +# placed -- number of pieces placed +# board -- current state of the board +# +# see in-code comments +def find( start_location, placed, board) + # find the next location to place a piece by looking for an empty bit + while board[start_location] == 1 + start_location += 1 + end + + @pieces.length.times do + piece = @pieces.shift + piece.masks[start_location].each do | mask, imask, cmask | + if ( board & cmask == imask) then + piece.placed = mask + if (placed == 9) then + add_board + else + find( start_location + 1, placed + 1, board | mask) + end + end + end + @pieces.push(piece) + end +end + +# print the board +def print_full_board( board_string) + 10.times do | row | + print " " if (row % 2 == 1) + 5.times do | col | + print "#{board_string[row*5 + col,1]} " + end + print "\n" + end +end + +# when a board is found we "draw it" into a string and then flip that string, adding both to +# the list (hash) of solutions if they are unique. +def add_board + board_string = "99999999999999999999999999999999999999999999999999" + @all_pieces.each { | piece | piece.fill_string( board_string ) } + save( board_string) + save( board_string.reverse) +end + +# adds a board string to the list (if new) and updates the current best/worst board +def save( board_string) + if (@all_boards[board_string] == nil) then + @min_board = board_string if (board_string < @min_board) + @max_board = board_string if (board_string > @max_board) + @all_boards.store(board_string,true) + @boards_found += 1 + + # the exit motif is a time saver. Ideally the function should return, but those tests + # take noticable time (performance). + if (@boards_found == @stop_count) then + print_results + exit(0) + end + end +end + + +## +## MAIN BODY :) +## +create_collector_support +@pieces = [ + Piece.new( [ :nw, :ne, :east, :east ], 2), + Piece.new( [ :ne, :se, :east, :ne ], 7), + Piece.new( [ :ne, :east, :ne, :nw ], 1), + Piece.new( [ :east, :sw, :sw, :se ], 6), + Piece.new( [ :east, :ne, :se, :ne ], 5), + Piece.new( [ :east, :east, :east, :se ], 0), + Piece.new( [ :ne, :nw, :se, :east, :se ], 4), + Piece.new( [ :se, :se, :se, :west ], 9), + Piece.new( [ :se, :se, :east, :se ], 8), + Piece.new( [ :east, :east, :sw, :se ], 3) + ]; + +@all_pieces = Array.new( @pieces) + +@min_board = "99999999999999999999999999999999999999999999999999" +@max_board = "00000000000000000000000000000000000000000000000000" +@stop_count = ARGV[0].to_i || 2089 +@all_boards = {} +@boards_found = 0 + +find_all ######## DO IT!!! + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_nbody.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nbody.rb new file mode 100644 index 0000000..d6c5bb9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nbody.rb @@ -0,0 +1,148 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org +# +# Optimized for Ruby by Jesse Millikan +# From version ported by Michael Neumann from the C gcc version, +# which was written by Christoph Bauer. + +SOLAR_MASS = 4 * Math::PI**2 +DAYS_PER_YEAR = 365.24 + +def _puts *args +end + +class Planet + attr_accessor :x, :y, :z, :vx, :vy, :vz, :mass + + def initialize(x, y, z, vx, vy, vz, mass) + @x, @y, @z = x, y, z + @vx, @vy, @vz = vx * DAYS_PER_YEAR, vy * DAYS_PER_YEAR, vz * DAYS_PER_YEAR + @mass = mass * SOLAR_MASS + end + + def move_from_i(bodies, nbodies, dt, i) + while i < nbodies + b2 = bodies[i] + dx = @x - b2.x + dy = @y - b2.y + dz = @z - b2.z + + distance = Math.sqrt(dx * dx + dy * dy + dz * dz) + mag = dt / (distance * distance * distance) + b_mass_mag, b2_mass_mag = @mass * mag, b2.mass * mag + + @vx -= dx * b2_mass_mag + @vy -= dy * b2_mass_mag + @vz -= dz * b2_mass_mag + b2.vx += dx * b_mass_mag + b2.vy += dy * b_mass_mag + b2.vz += dz * b_mass_mag + i += 1 + end + + @x += dt * @vx + @y += dt * @vy + @z += dt * @vz + end +end + +def energy(bodies) + e = 0.0 + nbodies = bodies.size + + for i in 0 ... nbodies + b = bodies[i] + e += 0.5 * b.mass * (b.vx * b.vx + b.vy * b.vy + b.vz * b.vz) + for j in (i + 1) ... nbodies + b2 = bodies[j] + dx = b.x - b2.x + dy = b.y - b2.y + dz = b.z - b2.z + distance = Math.sqrt(dx * dx + dy * dy + dz * dz) + e -= (b.mass * b2.mass) / distance + end + end + e +end + +def offset_momentum(bodies) + px, py, pz = 0.0, 0.0, 0.0 + + for b in bodies + m = b.mass + px += b.vx * m + py += b.vy * m + pz += b.vz * m + end + + b = bodies[0] + b.vx = - px / SOLAR_MASS + b.vy = - py / SOLAR_MASS + b.vz = - pz / SOLAR_MASS +end + +BODIES = [ + # sun + Planet.new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0), + + # jupiter + Planet.new( + 4.84143144246472090e+00, + -1.16032004402742839e+00, + -1.03622044471123109e-01, + 1.66007664274403694e-03, + 7.69901118419740425e-03, + -6.90460016972063023e-05, + 9.54791938424326609e-04), + + # saturn + Planet.new( + 8.34336671824457987e+00, + 4.12479856412430479e+00, + -4.03523417114321381e-01, + -2.76742510726862411e-03, + 4.99852801234917238e-03, + 2.30417297573763929e-05, + 2.85885980666130812e-04), + + # uranus + Planet.new( + 1.28943695621391310e+01, + -1.51111514016986312e+01, + -2.23307578892655734e-01, + 2.96460137564761618e-03, + 2.37847173959480950e-03, + -2.96589568540237556e-05, + 4.36624404335156298e-05), + + # neptune + Planet.new( + 1.53796971148509165e+01, + -2.59193146099879641e+01, + 1.79258772950371181e-01, + 2.68067772490389322e-03, + 1.62824170038242295e-03, + -9.51592254519715870e-05, + 5.15138902046611451e-05) +] + +init = 200_000 # ARGV[0] +n = Integer(init) + +offset_momentum(BODIES) + +puts "%.9f" % energy(BODIES) + +nbodies = BODIES.size +dt = 0.01 + +n.times do + i = 0 + while i < nbodies + b = BODIES[i] + b.move_from_i(BODIES, nbodies, dt, i + 1) + i += 1 + end +end + +puts "%.9f" % energy(BODIES) diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_nested_loop.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nested_loop.rb new file mode 100644 index 0000000..a0513f8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nested_loop.rb @@ -0,0 +1,24 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: nestedloop-ruby.code,v 1.4 2004/11/13 07:42:22 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ +# from Avi Bryant + +n = 16 # Integer(ARGV.shift || 1) +x = 0 +n.times do + n.times do + n.times do + n.times do + n.times do + n.times do + x += 1 + end + end + end + end + end +end +# puts x + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve.rb new file mode 100644 index 0000000..a65cc78 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve.rb @@ -0,0 +1,35 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org/ +# +# contributed by Glenn Parker, March 2005 +# modified by Evan Phoenix, Sept 2006 + +def sieve(m) + flags = Flags.dup[0,m] + count = 0 + pmax = m - 1 + p = 2 + while p <= pmax + unless flags[p].zero? + count += 1 + mult = p + while mult <= pmax + flags[mult] = 0 + mult += p + end + end + p += 1 + end + count +end + +n = 9 # (ARGV[0] || 2).to_i +Flags = ("\x1" * ( 2 ** n * 10_000)).unpack("c*") + +n.downto(n-2) do |exponent| + break if exponent < 0 + m = (1 << exponent) * 10_000 + # m = (2 ** exponent) * 10_000 + count = sieve(m) + printf "Primes up to %8d %8d\n", m, count +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve_bits.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve_bits.rb new file mode 100644 index 0000000..019b8b6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_nsieve_bits.rb @@ -0,0 +1,42 @@ +#!/usr/bin/ruby +# +# The Great Computer Language Shootout +# http://shootout.alioth.debian.org/ +# +# nsieve-bits in Ruby +# Contributed by Glenn Parker, March 2005 + +CharExponent = 3 +BitsPerChar = 1 << CharExponent +LowMask = BitsPerChar - 1 + +def sieve(m) + items = "\xFF" * ((m / BitsPerChar) + 1) + masks = "" + BitsPerChar.times do |b| + masks << (1 << b).chr + end + + count = 0 + pmax = m - 1 + 2.step(pmax, 1) do |p| + if items[p >> CharExponent][p & LowMask] == 1 + count += 1 + p.step(pmax, p) do |mult| + a = mult >> CharExponent + b = mult & LowMask + items[a] -= masks[b] if items[a][b] != 0 + end + end + end + count +end + +n = 9 # (ARGV[0] || 2).to_i +n.step(n - 2, -1) do |exponent| + break if exponent < 0 + m = 2 ** exponent * 10_000 + count = sieve(m) + printf "Primes up to %8d %8d\n", m, count +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_object.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_object.rb new file mode 100644 index 0000000..e8607c7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_object.rb @@ -0,0 +1,56 @@ +#!/usr/bin/ruby +# -*- mode: ruby -*- +# $Id: objinst-ruby.code,v 1.4 2004/11/13 07:42:25 bfulgham Exp $ +# http://www.bagley.org/~doug/shootout/ +# with help from Aristarkh Zagorodnikov + +class Toggle + def initialize(start_state) + @bool = start_state + end + + def value + @bool + end + + def activate + @bool = !@bool + self + end +end + +class NthToggle < Toggle + def initialize(start_state, max_counter) + super start_state + @count_max = max_counter + @counter = 0 + end + + def activate + @counter += 1 + if @counter >= @count_max + @bool = !@bool + @counter = 0 + end + self + end +end + +n = 1500000 # (ARGV.shift || 1).to_i + +toggle = Toggle.new 1 +5.times do + toggle.activate.value ? 'true' : 'false' +end +n.times do + toggle = Toggle.new 1 +end + +ntoggle = NthToggle.new 1, 3 +8.times do + ntoggle.activate.value ? 'true' : 'false' +end +n.times do + ntoggle = NthToggle.new 1, 3 +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_partial_sums.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_partial_sums.rb new file mode 100644 index 0000000..630b45c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_partial_sums.rb @@ -0,0 +1,31 @@ +n = 2_500_000 # (ARGV.shift || 1).to_i + +alt = 1.0 ; s0 = s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = 0.0 + +1.upto(n) do |d| + d = d.to_f ; d2 = d * d ; d3 = d2 * d ; ds = Math.sin(d) ; dc = Math.cos(d) + + s0 += (2.0 / 3.0) ** (d - 1.0) + s1 += 1.0 / Math.sqrt(d) + s2 += 1.0 / (d * (d + 1.0)) + s3 += 1.0 / (d3 * ds * ds) + s4 += 1.0 / (d3 * dc * dc) + s5 += 1.0 / d + s6 += 1.0 / d2 + s7 += alt / d + s8 += alt / (2.0 * d - 1.0) + + alt = -alt +end + +if false + printf("%.9f\t(2/3)^k\n", s0) + printf("%.9f\tk^-0.5\n", s1) + printf("%.9f\t1/k(k+1)\n", s2) + printf("%.9f\tFlint Hills\n", s3) + printf("%.9f\tCookson Hills\n", s4) + printf("%.9f\tHarmonic\n", s5) + printf("%.9f\tRiemann Zeta\n", s6) + printf("%.9f\tAlternating Harmonic\n", s7) + printf("%.9f\tGregory\n", s8) +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_pidigits.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_pidigits.rb new file mode 100644 index 0000000..c7d6fbf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_pidigits.rb @@ -0,0 +1,92 @@ +# The Great Computer Language Shootout +# http://shootout.alioth.debian.org/ +# +# contributed by Gabriele Renzi + +class PiDigitSpigot + + def initialize() + @z = Transformation.new 1,0,0,1 + @x = Transformation.new 0,0,0,0 + @inverse = Transformation.new 0,0,0,0 + end + + def next! + @y = @z.extract(3) + if safe? @y + @z = produce(@y) + @y + else + @z = consume @x.next!() + next!() + end + end + + def safe?(digit) + digit == @z.extract(4) + end + + def produce(i) + @inverse.qrst(10,-10*i,0,1).compose(@z) + end + + def consume(a) + @z.compose(a) + end +end + + +class Transformation + attr_reader :q, :r, :s, :t + def initialize (q, r, s, t) + @q,@r,@s,@t,@k = q,r,s,t,0 + end + + def next!() + @q = @k = @k + 1 + @r = 4 * @k + 2 + @s = 0 + @t = 2 * @k + 1 + self + end + + def extract(j) + (@q * j + @r) / (@s * j + @t) + end + + def compose(a) + self.class.new( @q * a.q, + @q * a.r + r * a.t, + @s * a.q + t * a.s, + @s * a.r + t * a.t + ) + end + + def qrst *args + initialize *args + self + end + + +end + + +WIDTH = 10 +n = 2_500 # Integer(ARGV[0]) +j = 0 + +digits = PiDigitSpigot.new + +while n > 0 + if n >= WIDTH + WIDTH.times {print digits.next!} + j += WIDTH + else + n.times {print digits.next!} + (WIDTH-n).times {print " "} + j += n + end + puts "\t:"+j.to_s + n -= WIDTH +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_random.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_random.rb new file mode 100644 index 0000000..83c0d6d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_random.rb @@ -0,0 +1,20 @@ +# from http://www.bagley.org/~doug/shootout/bench/random/random.ruby + +IM = 139968.0 +IA = 3877.0 +IC = 29573.0 + +$last = 42.0 + +def gen_random(max) + (max * ($last = ($last * IA + IC) % IM)) / IM +end + +N = 1000000 + +i=0 +while i/ + if seq.length != 0 + revcomp(seq.join) + seq=Array.new + end + puts $_ + else + $_.sub(/\n/,'') + seq.push $_ + end +end +revcomp(seq.join) diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_sieve.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_sieve.rb new file mode 100644 index 0000000..dbe2bfa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_sieve.rb @@ -0,0 +1,24 @@ +# from http://www.bagley.org/~doug/shootout/bench/sieve/sieve.ruby +num = 40 +count = i = j = 0 +flags0 = Array.new(8192,1) +k = 0 +while k < num + k+=1 + count = 0 + flags = flags0.dup + i = 2 + while i<8192 + i+=1 + if flags[i] + # remove all multiples of prime: i + j = i*i + while j < 8192 + j += i + flags[j] = nil + end + count += 1 + end + end +end +count diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_so_spectralnorm.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_so_spectralnorm.rb new file mode 100644 index 0000000..6b97206 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_so_spectralnorm.rb @@ -0,0 +1,50 @@ +# The Computer Language Shootout +# http://shootout.alioth.debian.org/ +# Contributed by Sokolov Yura + +def eval_A(i,j) + return 1.0/((i+j)*(i+j+1)/2+i+1) +end + +def eval_A_times_u(u) + v, i = nil, nil + (0..u.length-1).collect { |i| + v = 0 + for j in 0..u.length-1 + v += eval_A(i,j)*u[j] + end + v + } +end + +def eval_At_times_u(u) + v, i = nil, nil + (0..u.length-1).collect{|i| + v = 0 + for j in 0..u.length-1 + v += eval_A(j,i)*u[j] + end + v + } +end + +def eval_AtA_times_u(u) + return eval_At_times_u(eval_A_times_u(u)) +end + +n = 500 # ARGV[0].to_i + +u=[1]*n +for i in 1..10 + v=eval_AtA_times_u(u) + u=eval_AtA_times_u(v) +end +vBv=0 +vv=0 +for i in 0..n-1 + vBv += u[i]*v[i] + vv += v[i]*v[i] +end + +str = "%0.9f" % (Math.sqrt(vBv/vv)), "\n" +# print str diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_block.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_block.rb new file mode 100644 index 0000000..2dc4e72 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_block.rb @@ -0,0 +1,10 @@ +def m + yield +end + +i=0 +while i<30000000 # while loop 1 + i+=1 + m{ + } +end \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_const.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_const.rb new file mode 100644 index 0000000..3e395d9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_const.rb @@ -0,0 +1,8 @@ +Const = 1 + +i = 0 +while i<30000000 # while loop 1 + i+= 1 + j = Const + k = Const +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ensure.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ensure.rb new file mode 100644 index 0000000..c3b71ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ensure.rb @@ -0,0 +1,11 @@ +i=0 +while i<30000000 # benchmark loop 1 + i+=1 + begin + begin + ensure + end + ensure + end +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar.rb new file mode 100644 index 0000000..4de833a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar.rb @@ -0,0 +1,8 @@ +@a = 1 + +i = 0 +while i<30000000 # while loop 1 + i+= 1 + j = @a + k = @a +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar_set.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar_set.rb new file mode 100644 index 0000000..c8076c6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_ivar_set.rb @@ -0,0 +1,6 @@ +i = 0 +while i<30_000_000 # while loop 1 + i+= 1 + @a = 1 + @b = 2 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_length.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_length.rb new file mode 100644 index 0000000..2d7d7f0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_length.rb @@ -0,0 +1,9 @@ +a = 'abc' +b = [1, 2, 3] +i=0 +while i<30000000 # while loop 1 + i+=1 + a.length + b.length +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_neq.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_neq.rb new file mode 100644 index 0000000..212f056 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_neq.rb @@ -0,0 +1,8 @@ +i = 0 +obj1 = Object.new +obj2 = Object.new + +while i<30000000 # while loop 1 + i+= 1 + obj1 != obj2 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_not.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_not.rb new file mode 100644 index 0000000..f139fed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_not.rb @@ -0,0 +1,7 @@ +i = 0 +obj = Object.new + +while i<30000000 # while loop 1 + i+= 1 + !obj +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_rescue.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_rescue.rb new file mode 100644 index 0000000..0c98d00 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_rescue.rb @@ -0,0 +1,7 @@ +i=0 +while i<30000000 # while loop 1 + i+=1 + begin + rescue + end +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_simplereturn.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_simplereturn.rb new file mode 100644 index 0000000..c843ee3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_simplereturn.rb @@ -0,0 +1,9 @@ +def m + return 1 +end +i=0 +while i<30000000 # while loop 1 + i+=1 + m +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_swap.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_swap.rb new file mode 100644 index 0000000..a565b6f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm1_swap.rb @@ -0,0 +1,8 @@ +a = 1 +b = 2 +i=0 +while i<30000000 # while loop 1 + i+=1 + a, b = b, a +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_array.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_array.rb new file mode 100644 index 0000000..e29c112 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_array.rb @@ -0,0 +1,5 @@ +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + a = [1,2,3,4,5,6,7,8,9,10] +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_case.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_case.rb new file mode 100644 index 0000000..1ec34ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_case.rb @@ -0,0 +1,14 @@ +i=0 +while i<6000000 # while loop 2 + case :foo + when :bar + raise + when :baz + raise + when :boo + raise + when :foo + i+=1 + end +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_eval.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_eval.rb new file mode 100644 index 0000000..375dccc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_eval.rb @@ -0,0 +1,6 @@ +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + eval("1") +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_method.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_method.rb new file mode 100644 index 0000000..cc94b8a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_method.rb @@ -0,0 +1,9 @@ +def m + nil +end + +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + m; m; m; m; m; m; m; m; +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_mutex.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_mutex.rb new file mode 100644 index 0000000..9ec1a0f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_mutex.rb @@ -0,0 +1,9 @@ +require 'thread' + +m = Mutex.new + +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + m.synchronize{} +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method.rb new file mode 100644 index 0000000..ac9953c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method.rb @@ -0,0 +1,20 @@ +class C1 + def m + 1 + end +end +class C2 + def m + 2 + end +end + +o1 = C1.new +o2 = C2.new + +i=0 +while i<6000000 # benchmark loop 2 + o = (i % 2 == 0) ? o1 : o2 + o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method_ov.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method_ov.rb new file mode 100644 index 0000000..856ba9b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_poly_method_ov.rb @@ -0,0 +1,20 @@ +class C1 + def m + 1 + end +end +class C2 + def m + 2 + end +end + +o1 = C1.new +o2 = C2.new + +i=0 +while i<6000000 # benchmark loop 2 + o = (i % 2 == 0) ? o1 : o2 +# o.m; o.m; o.m; o.m; o.m; o.m; o.m; o.m + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_proc.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_proc.rb new file mode 100644 index 0000000..0bd05b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_proc.rb @@ -0,0 +1,14 @@ +def m &b + b +end + +pr = m{ + a = 1 +} + +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + pr.call +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_regexp.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_regexp.rb new file mode 100644 index 0000000..44f6ed4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_regexp.rb @@ -0,0 +1,6 @@ +i=0 +str = 'xxxhogexxx' +while i<6000000 # benchmark loop 2 + /hoge/ =~ str + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_send.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_send.rb new file mode 100644 index 0000000..c20dbdd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_send.rb @@ -0,0 +1,12 @@ +class C + def m + end +end + +o = C.new + +i=0 +while i<6000000 # benchmark loop 2 + i+=1 + o.__send__ :m +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_super.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_super.rb new file mode 100644 index 0000000..70c86b3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_super.rb @@ -0,0 +1,20 @@ + +class C + def m + 1 + end +end + +class CC < C + def m + super() + end +end + +obj = CC.new + +i = 0 +while i<6000000 # benchmark loop 2 + obj.m + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_unif1.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_unif1.rb new file mode 100644 index 0000000..e12bd2a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_unif1.rb @@ -0,0 +1,8 @@ +i = 0 +def m a, b +end + +while i<6000000 # benchmark loop 2 + i+=1 + m 100, 200 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_zsuper.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_zsuper.rb new file mode 100644 index 0000000..3a75960 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm2_zsuper.rb @@ -0,0 +1,20 @@ +i = 0 + +class C + def m a + 1 + end +end + +class CC < C + def m a + super + end +end + +obj = CC.new + +while i<6000000 # benchmark loop 2 + obj.m 10 + i+=1 +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_gc.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_gc.rb new file mode 100755 index 0000000..7db9829 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_gc.rb @@ -0,0 +1,7 @@ +#! /usr/bin/ruby +5000.times do + 100.times do + {"xxxx"=>"yyyy"} + end + GC.start +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_create_join.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_create_join.rb new file mode 100644 index 0000000..325a66d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_create_join.rb @@ -0,0 +1,6 @@ +i=0 +while i<100_000 # benchmark loop 3 + i+=1 + Thread.new{ + }.join +end diff --git a/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_mutex.rb b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_mutex.rb new file mode 100644 index 0000000..649f1fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/bm_vm3_thread_mutex.rb @@ -0,0 +1,18 @@ +require 'thread' +m = Mutex.new +r = 0 +max = 1000 +(1..max).map{ + Thread.new{ + i=0 + while i 1 + output "minimum results in each #{@repeat} measurements." + end + + output "name\t#{@execs.map{|(e, v)| v}.join("\t")}" + @results.each{|v, result| + rets = [] + s = nil + result.each_with_index{|e, i| + r = e.min + case v + when /^vm1_/ + if @loop_wl1 + r -= @loop_wl1[i] + s = '*' + end + when /^vm2_/ + if @loop_wl2 + r -= @loop_wl2[i] + s = '*' + end + end + rets << sprintf("%.3f", r) + } + output "#{v}#{s}\t#{rets.join("\t")}" + } + end + + def files + flag = {} + vm1 = vm2 = wl1 = wl2 = false + @files = Dir.glob(File.join(@dir, 'bm*.rb')).map{|file| + next if @pattern && /#{@pattern}/ !~ File.basename(file) + case file + when /bm_(vm[12])_/, /bm_loop_(whileloop2?).rb/ + flag[$1] = true + end + file + }.compact + + if flag['vm1'] && !flag['whileloop'] + @files << File.join(@dir, 'bm_loop_whileloop.rb') + elsif flag['vm2'] && !flag['whileloop2'] + @files << File.join(@dir, 'bm_loop_whileloop2.rb') + end + + @files.sort! + progress_message "total: #{@files.size * @repeat} trial(s) (#{@repeat} trial(s) for #{@files.size} benchmark(s))\n" + @files + end + + def run + files.each_with_index{|file, i| + @i = i + r = measure_file(file) + + if /bm_loop_whileloop.rb/ =~ file + @loop_wl1 = r[1].map{|e| e.min} + elsif /bm_loop_whileloop2.rb/ =~ file + @loop_wl2 = r[1].map{|e| e.min} + end + } + end + + def measure_file file + name = File.basename(file, '.rb').sub(/^bm_/, '') + prepare_file = File.join(File.dirname(file), "prepare_#{name}.rb") + load prepare_file if FileTest.exist?(prepare_file) + + if @verbose + output + output '-----------------------------------------------------------' + output name + output + output File.read(file) + output + end + + result = [name] + result << @execs.map{|(e, v)| + (0...@repeat).map{ + message_print "#{v}\t" + progress_message '.' + + m = measure(e, file) + message "#{m}" + m + } + } + @results << result + result + end + + def measure executable, file + cmd = "#{executable} #{file}" + m = Benchmark.measure{ + `#{cmd}` + } + + if $? != 0 + raise "Benchmark process exited with abnormal status (#{$?})" + end + + m.real + end +end + +if __FILE__ == $0 + opt = { + :execs => ['ruby'], + :dir => './', + :repeat => 1, + :output => "bmlog-#{Time.now.strftime('%Y%m%d-%H%M%S')}.#{$$}", + } + + parser = OptionParser.new{|o| + o.on('-e', '--executables [EXECS]', + "Specify benchmark one or more targets. (exec1; exec2; exec3, ...)"){|e| + opt[:execs] = e.split(/;/) + } + o.on('-d', '--directory [DIRECTORY]', "Benchmark suites directory"){|d| + opt[:dir] = d + } + o.on('-p', '--pattern [PATTERN]', "Benchmark name pattern"){|p| + opt[:pattern] = p + } + o.on('-r', '--repeat-count [NUM]', "Repeat count"){|n| + opt[:repeat] = n.to_i + } + o.on('-o', '--output-file [FILE]', "Output file"){|o| + opt[:output] = o + } + o.on('-q', '--quiet', "Run without notify information except result table."){|q| + opt[:quiet] = q + } + o.on('-v', '--verbose'){|v| + opt[:verbose] = v + } + } + + parser.parse!(ARGV) + BenchmarkDriver.benchmark(opt) +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/make_fasta_output.rb b/lib/ruby-1.9.1-rc1/benchmark/make_fasta_output.rb new file mode 100644 index 0000000..b6d787a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/make_fasta_output.rb @@ -0,0 +1,19 @@ +# prepare 'fasta.output' + +def prepare_fasta_output n + filebase = File.join(File.dirname($0), 'fasta.output') + script = File.join(File.dirname($0), 'bm_so_fasta.rb') + file = "#{filebase}.#{n}" + + unless FileTest.exist?(file) + STDERR.puts "preparing #{file}" + + open(file, 'w'){|f| + ARGV[0] = n + $stdout = f + load script + $stdout = STDOUT + } + end +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.pl b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.pl new file mode 100644 index 0000000..201e22d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.pl @@ -0,0 +1,11 @@ +use integer; + +sub Ack { + return $_[0] ? ($_[1] ? Ack($_[0]-1, Ack($_[0], $_[1]-1)) + : Ack($_[0]-1, 1)) + : $_[1]+1; +} + +my $NUM = 9; +$NUM = 1 if ($NUM < 1); +my $ack = Ack(3, $NUM); diff --git a/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.py b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.py new file mode 100644 index 0000000..9968e7c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.py @@ -0,0 +1,16 @@ +import sys +sys.setrecursionlimit(5000000) + +def Ack(M, N): + if (not M): + return( N + 1 ) + if (not N): + return( Ack(M-1, 1) ) + return( Ack(M-1, Ack(M, N-1)) ) + +def main(): + NUM = 9 + sys.setrecursionlimit(10000) + Ack(3, NUM) + +main() diff --git a/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.rb b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.rb new file mode 100644 index 0000000..7451bed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.rb @@ -0,0 +1,12 @@ +def ack(m, n) + if m == 0 then + n + 1 + elsif n == 0 then + ack(m - 1, 1) + else + ack(m - 1, ack(m, n - 1)) + end +end + +NUM = 9 +ack(3, NUM) diff --git a/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.scm b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.scm new file mode 100644 index 0000000..a80b73b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/other-lang/ack.scm @@ -0,0 +1,7 @@ +(define (ack m n) + (cond ((zero? m) (+ n 1)) + ((zero? n) (ack (- m 1) 1)) + (else (ack (- m 1) (ack m (- n 1)))))) + +(ack 3 9) + diff --git a/lib/ruby-1.9.1-rc1/benchmark/other-lang/eval.rb b/lib/ruby-1.9.1-rc1/benchmark/other-lang/eval.rb new file mode 100644 index 0000000..3875927 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/other-lang/eval.rb @@ -0,0 +1,66 @@ + +Bench = %w( + loop + ack + fib + tak + fact +) + +Lang = < exec_command_error_variable + puts "\t" + exec_command_error_variable.message + end + EOP +end + +def benchmark cmd + rubybin = ENV['RUBY'] || File.join( + Config::CONFIG["bindir"], + Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]) + + IO.popen(rubybin, 'r+'){|io| + io.write cmd + io.close_write + return io.gets + } +end + +def ruby_exec file + prog = exec_command 'ruby', file, 'load' + benchmark prog +end + +def yarv_exec file + prog = exec_command 'yarv', file, 'YARVUtil.load_bm' + benchmark prog +end + +$wr = $wy = nil + +def measure bench + file = File.dirname($0) + "/bm_#{bench}.rb" + r = ruby_exec(file).to_f + y = yarv_exec(file).to_f + puts "#{bench}\t#{r}\t#{y}" +end + +def measure2 + r = ruby_exec.to_f + y = yarv_exec.to_f + puts r/y +end + +if $0 == __FILE__ + %w{ + whileloop + whileloop2 + times + const + method + poly_method + block + rescue + rescue2 + }.each{|bench| + measure bench + } +end + + + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/run.rb b/lib/ruby-1.9.1-rc1/benchmark/run.rb new file mode 100644 index 0000000..6ef2943 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/run.rb @@ -0,0 +1,127 @@ +# +# Ruby benchmark driver +# + +require 'benchmark' +require 'rbconfig' + +$matzrubyonly = false +$rubyonly = false + +$results = [] + +# prepare 'wc.input' +def prepare_wc_input + wcinput = File.join(File.dirname($0), 'wc.input') + wcbase = File.join(File.dirname($0), 'wc.input.base') + unless FileTest.exist?(wcinput) + data = File.read(wcbase) + 13.times{ + data << data + } + open(wcinput, 'w'){|f| f.write data} + end +end + +prepare_wc_input + +def bm file + prog = File.readlines(file).map{|e| e.rstrip}.join("\n") + return if prog.empty? + + /[a-z]+_(.+)\.rb/ =~ file + bm_name = $1 + puts '-----------------------------------------------------------' unless $rubyonly || $matzrubyonly + puts "#{bm_name}: " + + +puts < e + puts + puts "** benchmark failure: #{e}" + puts e.backtrace + end +end + +def benchmark file, bin + m = Benchmark.measure{ + `#{bin} #{$opts} #{file}` + } + sec = '%.3f' % m.real + puts " #{sec}" + sec +end + +def ruby_exec file + print 'ruby' + benchmark file, $ruby_program +end + +def matzruby_exec file + print 'matz' + rubylib = ENV['RUBYLIB'] + ENV['RUBYLIB'] = '' + r = benchmark file, $matzruby_program + ENV['RUBYLIB'] = rubylib + r +end + +if $0 == __FILE__ + ARGV.each{|arg| + case arg + when /\A--ruby=(.+)/ + $ruby_program = $1 + when /\A--matzruby=(.+)/ + $matzruby_program = $1 + when /\A--opts=(.+)/ + $opts = $1 + when /\A(-r|--only-ruby)\z/ + $rubyonly = true + when /\A(-m|--only-matzruby)\z/ + $matzrubyonly = true + end + } + ARGV.delete_if{|arg| + /\A-/ =~ arg + } + + puts "MatzRuby:" + system("#{$matzruby_program} -v") + puts "Ruby:" + system("#{$ruby_program} -v") + puts + + if ARGV.empty? + Dir.glob(File.dirname(__FILE__) + '/bm_*.rb').sort.each{|file| + bm file + } + else + ARGV.each{|file| + Dir.glob(File.join(File.dirname(__FILE__), file + '*')){|ef| + # file = "#{File.dirname(__FILE__)}/#{file}.rb" + bm ef + } + } + end + + puts + puts "-- benchmark summary ---------------------------" + $results.each{|res| + print res.shift, "\t" + (res||[]).each{|result| + /([\d\.]+)/ =~ result + print $1 + "\t" if $1 + } + puts + } +end + diff --git a/lib/ruby-1.9.1-rc1/benchmark/runc.rb b/lib/ruby-1.9.1-rc1/benchmark/runc.rb new file mode 100644 index 0000000..14ab171 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/runc.rb @@ -0,0 +1,29 @@ +# +# +# + +require 'benchmark' +require 'rbconfig' + +$rubybin = ENV['RUBY'] || File.join( + Config::CONFIG["bindir"], + Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]) + +def runfile file + puts file + file = File.join(File.dirname($0), 'contrib', file) + Benchmark.bm{|x| + x.report('ruby'){ + system("#{$rubybin} #{file}") + } + x.report('yarv'){ + system("#{$rubybin} -rite -I.. #{file}") + } + } +end + +ARGV.each{|file| + runfile file +} + + diff --git a/lib/ruby-1.9.1-rc1/benchmark/wc.input.base b/lib/ruby-1.9.1-rc1/benchmark/wc.input.base new file mode 100644 index 0000000..41143fb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/benchmark/wc.input.base @@ -0,0 +1,25 @@ +Subject: Re: Who was Izchak Miller? +From: "Jane D. Anonymous" +Date: 1996/04/28 +Message-Id: <4lv7bc$oh@news.ycc.yale.edu> +References: <317C405E.5DFA@panix.com> <4lk6vl$gde@ns.oar.net> +To: 75176.2330@compuserve.com +Content-Type: text/plain; charset=us-ascii +Organization: Yale University +X-Url: news:4lk6vl$gde@ns.oar.net +Mime-Version: 1.0 +Newsgroups: rec.games.roguelike.nethack +X-Mailer: Mozilla 1.1N (Macintosh; I; 68K) + +Hello there, Izchak Miller was my father. When I was younger I spent +many a night, hunched over the keyboard with a cup of tea, playing +nethack with him and my brother. my dad was a philosopher with a strong +weakness for fantasy/sci fi. I remember when he started to get involved +with the Nethack team- my brother's Dungeons and Dragons monster book +found a regular place beside my dad's desk. it's nice to see him living +on in the game he loved so much :-). + Tamar Miller + +The following is a really long word of 5000 characters: + +wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww diff --git a/lib/ruby-1.9.1-rc1/bignum.c b/lib/ruby-1.9.1-rc1/bignum.c new file mode 100644 index 0000000..c06e782 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bignum.c @@ -0,0 +1,2706 @@ +/********************************************************************** + + bignum.c - + + $Author: tadf $ + created at: Fri Jun 10 00:48:55 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" + +#include +#include +#include +#ifdef HAVE_IEEEFP_H +#include +#endif + +VALUE rb_cBignum; + +#if defined __MINGW32__ +#define USHORT _USHORT +#endif + +#define BDIGITS(x) (RBIGNUM_DIGITS(x)) +#define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT) +#define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG) +#define DIGSPERLONG ((unsigned int)(SIZEOF_LONG/SIZEOF_BDIGITS)) +#if HAVE_LONG_LONG +# define DIGSPERLL ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS)) +#endif +#define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG) +#define BIGDN(x) RSHIFT(x,BITSPERDIG) +#define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1))) +#define BDIGMAX ((BDIGIT)-1) + +#define BIGZEROP(x) (RBIGNUM_LEN(x) == 0 || \ + (BDIGITS(x)[0] == 0 && \ + (RBIGNUM_LEN(x) == 1 || bigzero_p(x)))) + +static int +bigzero_p(VALUE x) +{ + long i; + for (i = RBIGNUM_LEN(x) - 1; 0 <= i; i--) { + if (BDIGITS(x)[i]) return 0; + } + return 1; +} + +int +rb_cmpint(VALUE val, VALUE a, VALUE b) +{ + if (NIL_P(val)) { + rb_cmperr(a, b); + } + if (FIXNUM_P(val)) return FIX2INT(val); + if (TYPE(val) == T_BIGNUM) { + if (BIGZEROP(val)) return 0; + if (RBIGNUM_SIGN(val)) return 1; + return -1; + } + if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1; + if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1; + return 0; +} + +#define RBIGNUM_SET_LEN(b,l) \ + ((RBASIC(b)->flags & RBIGNUM_EMBED_FLAG) ? \ + (RBASIC(b)->flags = (RBASIC(b)->flags & ~RBIGNUM_EMBED_LEN_MASK) | \ + ((l) << RBIGNUM_EMBED_LEN_SHIFT)) : \ + (RBIGNUM(b)->as.heap.len = (l))) + +static void +rb_big_realloc(VALUE big, long len) +{ + BDIGIT *ds; + if (RBASIC(big)->flags & RBIGNUM_EMBED_FLAG) { + if (RBIGNUM_EMBED_LEN_MAX < len) { + ds = ALLOC_N(BDIGIT, len); + MEMCPY(ds, RBIGNUM(big)->as.ary, BDIGIT, RBIGNUM_EMBED_LEN_MAX); + RBIGNUM(big)->as.heap.len = RBIGNUM_LEN(big); + RBIGNUM(big)->as.heap.digits = ds; + RBASIC(big)->flags &= ~RBIGNUM_EMBED_FLAG; + } + } + else { + if (len <= RBIGNUM_EMBED_LEN_MAX) { + ds = RBIGNUM(big)->as.heap.digits; + RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG; + RBIGNUM_SET_LEN(big, len); + if (ds) { + MEMCPY(RBIGNUM(big)->as.ary, ds, BDIGIT, len); + xfree(ds); + } + } + else { + if (RBIGNUM_LEN(big) == 0) { + RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len); + } + else { + REALLOC_N(RBIGNUM(big)->as.heap.digits, BDIGIT, len); + } + } + } +} + +void +rb_big_resize(VALUE big, long len) +{ + rb_big_realloc(big, len); + RBIGNUM_SET_LEN(big, len); +} + +static VALUE +bignew_1(VALUE klass, long len, int sign) +{ + NEWOBJ(big, struct RBignum); + OBJSETUP(big, klass, T_BIGNUM); + RBIGNUM_SET_SIGN(big, sign?1:0); + if (len <= RBIGNUM_EMBED_LEN_MAX) { + RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG; + RBIGNUM_SET_LEN(big, len); + } + else { + rb_big_resize((VALUE)big, len); + } + + return (VALUE)big; +} + +#define bignew(len,sign) bignew_1(rb_cBignum,len,sign) + +VALUE +rb_big_clone(VALUE x) +{ + VALUE z = bignew_1(CLASS_OF(x), RBIGNUM_LEN(x), RBIGNUM_SIGN(x)); + + MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM_LEN(x)); + return z; +} + +/* modify a bignum by 2's complement */ +static void +get2comp(VALUE x) +{ + long i = RBIGNUM_LEN(x); + BDIGIT *ds = BDIGITS(x); + BDIGIT_DBL num; + + if (!i) return; + while (i--) ds[i] = ~ds[i]; + i = 0; num = 1; + do { + num += ds[i]; + ds[i++] = BIGLO(num); + num = BIGDN(num); + } while (i < RBIGNUM_LEN(x)); + if (num != 0) { + rb_big_resize(x, RBIGNUM_LEN(x)+1); + ds = BDIGITS(x); + ds[RBIGNUM_LEN(x)-1] = 1; + } +} + +void +rb_big_2comp(VALUE x) /* get 2's complement */ +{ + get2comp(x); +} + +static VALUE +bigtrunc(VALUE x) +{ + long len = RBIGNUM_LEN(x); + BDIGIT *ds = BDIGITS(x); + + if (len == 0) return x; + while (--len && !ds[len]); + rb_big_resize(x, len+1); + return x; +} + +static VALUE +bigfixize(VALUE x) +{ + long len = RBIGNUM_LEN(x); + BDIGIT *ds = BDIGITS(x); + + if (len*SIZEOF_BDIGITS <= sizeof(long)) { + long num = 0; + while (len--) { + num = BIGUP(num) + ds[len]; + } + if (num >= 0) { + if (RBIGNUM_SIGN(x)) { + if (POSFIXABLE(num)) return LONG2FIX(num); + } + else { + if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num); + } + } + } + return x; +} + +static VALUE +bignorm(VALUE x) +{ + if (!FIXNUM_P(x) && TYPE(x) == T_BIGNUM) { + x = bigfixize(bigtrunc(x)); + } + return x; +} + +VALUE +rb_big_norm(VALUE x) +{ + return bignorm(x); +} + +VALUE +rb_uint2big(VALUE n) +{ + BDIGIT_DBL num = n; + long i = 0; + BDIGIT *digits; + VALUE big; + + big = bignew(DIGSPERLONG, 1); + digits = BDIGITS(big); + while (i < DIGSPERLONG) { + digits[i++] = BIGLO(num); + num = BIGDN(num); + } + + i = DIGSPERLONG; + while (--i && !digits[i]) ; + RBIGNUM_SET_LEN(big, i+1); + return big; +} + +VALUE +rb_int2big(SIGNED_VALUE n) +{ + long neg = 0; + VALUE big; + + if (n < 0) { + n = -n; + neg = 1; + } + big = rb_uint2big(n); + if (neg) { + RBIGNUM_SET_SIGN(big, 0); + } + return big; +} + +VALUE +rb_uint2inum(VALUE n) +{ + if (POSFIXABLE(n)) return LONG2FIX(n); + return rb_uint2big(n); +} + +VALUE +rb_int2inum(SIGNED_VALUE n) +{ + if (FIXABLE(n)) return LONG2FIX(n); + return rb_int2big(n); +} + +#ifdef HAVE_LONG_LONG + +void +rb_quad_pack(char *buf, VALUE val) +{ + LONG_LONG q; + + val = rb_to_int(val); + if (FIXNUM_P(val)) { + q = FIX2LONG(val); + } + else { + long len = RBIGNUM_LEN(val); + BDIGIT *ds; + + if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) { + len = SIZEOF_LONG_LONG/SIZEOF_BDIGITS; + } + ds = BDIGITS(val); + q = 0; + while (len--) { + q = BIGUP(q); + q += ds[len]; + } + if (!RBIGNUM_SIGN(val)) q = -q; + } + memcpy(buf, (char*)&q, SIZEOF_LONG_LONG); +} + +VALUE +rb_quad_unpack(const char *buf, int sign) +{ + unsigned LONG_LONG q; + long neg = 0; + long i; + BDIGIT *digits; + VALUE big; + + memcpy(&q, buf, SIZEOF_LONG_LONG); + if (sign) { + if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q); + if ((LONG_LONG)q < 0) { + q = -(LONG_LONG)q; + neg = 1; + } + } + else { + if (POSFIXABLE(q)) return LONG2FIX(q); + } + + i = 0; + big = bignew(DIGSPERLL, 1); + digits = BDIGITS(big); + while (i < DIGSPERLL) { + digits[i++] = BIGLO(q); + q = BIGDN(q); + } + + i = DIGSPERLL; + while (i-- && !digits[i]) ; + RBIGNUM_SET_LEN(big, i+1); + + if (neg) { + RBIGNUM_SET_SIGN(big, 0); + } + return bignorm(big); +} + +#else + +#define QUAD_SIZE 8 + +void +rb_quad_pack(char *buf, VALUE val) +{ + long len; + + memset(buf, 0, QUAD_SIZE); + val = rb_to_int(val); + if (FIXNUM_P(val)) { + val = rb_int2big(FIX2LONG(val)); + } + len = RBIGNUM_LEN(val) * SIZEOF_BDIGITS; + if (len > QUAD_SIZE) { + rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'"); + } + memcpy(buf, (char*)BDIGITS(val), len); + if (!RBIGNUM_SIGN(val)) { + len = QUAD_SIZE; + while (len--) { + *buf = ~*buf; + buf++; + } + } +} + +#define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0) + +VALUE +rb_quad_unpack(const char *buf, int sign) +{ + VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1); + + memcpy((char*)BDIGITS(big), buf, QUAD_SIZE); + if (sign && BNEG(buf)) { + long len = QUAD_SIZE; + char *tmp = (char*)BDIGITS(big); + + RBIGNUM_SET_SIGN(big, 0); + while (len--) { + *tmp = ~*tmp; + tmp++; + } + } + + return bignorm(big); +} + +#endif + +VALUE +rb_cstr_to_inum(const char *str, int base, int badcheck) +{ + const char *s = str; + char *end; + char sign = 1, nondigit = 0; + int c; + BDIGIT_DBL num; + long len, blen = 1; + long i; + VALUE z; + BDIGIT *zds; + +#define conv_digit(c) \ + (!ISASCII(c) ? -1 : \ + ISDIGIT(c) ? ((c) - '0') : \ + ISLOWER(c) ? ((c) - 'a' + 10) : \ + ISUPPER(c) ? ((c) - 'A' + 10) : \ + -1) + + if (!str) { + if (badcheck) goto bad; + return INT2FIX(0); + } + while (ISSPACE(*str)) str++; + + if (str[0] == '+') { + str++; + } + else if (str[0] == '-') { + str++; + sign = 0; + } + if (str[0] == '+' || str[0] == '-') { + if (badcheck) goto bad; + return INT2FIX(0); + } + if (base <= 0) { + if (str[0] == '0') { + switch (str[1]) { + case 'x': case 'X': + base = 16; + break; + case 'b': case 'B': + base = 2; + break; + case 'o': case 'O': + base = 8; + break; + case 'd': case 'D': + base = 10; + break; + default: + base = 8; + } + } + else if (base < -1) { + base = -base; + } + else { + base = 10; + } + } + switch (base) { + case 2: + len = 1; + if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) { + str += 2; + } + break; + case 3: + len = 2; + break; + case 8: + if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) { + str += 2; + } + case 4: case 5: case 6: case 7: + len = 3; + break; + case 10: + if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) { + str += 2; + } + case 9: case 11: case 12: case 13: case 14: case 15: + len = 4; + break; + case 16: + len = 4; + if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) { + str += 2; + } + break; + default: + if (base < 2 || 36 < base) { + rb_raise(rb_eArgError, "invalid radix %d", base); + } + if (base <= 32) { + len = 5; + } + else { + len = 6; + } + break; + } + if (*str == '0') { /* squeeze preceding 0s */ + int us = 0; + while ((c = *++str) == '0' || c == '_') { + if (c == '_') { + if (++us >= 2) + break; + } else + us = 0; + } + if (!(c = *str) || ISSPACE(c)) --str; + } + c = *str; + c = conv_digit(c); + if (c < 0 || c >= base) { + if (badcheck) goto bad; + return INT2FIX(0); + } + len *= strlen(str)*sizeof(char); + + if (len <= (sizeof(long)*CHAR_BIT)) { + unsigned long val = STRTOUL(str, &end, base); + + if (str < end && *end == '_') goto bigparse; + if (badcheck) { + if (end == str) goto bad; /* no number */ + while (*end && ISSPACE(*end)) end++; + if (*end) goto bad; /* trailing garbage */ + } + + if (POSFIXABLE(val)) { + if (sign) return LONG2FIX(val); + else { + long result = -(long)val; + return LONG2FIX(result); + } + } + else { + VALUE big = rb_uint2big(val); + RBIGNUM_SET_SIGN(big, sign); + return bignorm(big); + } + } + bigparse: + len = (len/BITSPERDIG)+1; + if (badcheck && *str == '_') goto bad; + + z = bignew(len, sign); + zds = BDIGITS(z); + for (i=len;i--;) zds[i]=0; + while ((c = *str++) != 0) { + if (c == '_') { + if (nondigit) { + if (badcheck) goto bad; + break; + } + nondigit = c; + continue; + } + else if ((c = conv_digit(c)) < 0) { + break; + } + if (c >= base) break; + nondigit = 0; + i = 0; + num = c; + for (;;) { + while (i> 1) & MASK_55; + x = ((x >> 2) & MASK_33) + (x & MASK_33); + x = ((x >> 4) + x) & MASK_0f; + x += (x >> 8); + x += (x >> 16); +#if SIZEOF_LONG == 8 + x += (x >> 32); +#endif + return (int)(x & 0x7f); +#undef MASK_0f +#undef MASK_33 +#undef MASK_55 +} + +static inline unsigned long +next_pow2(register unsigned long x) +{ + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; +#if SIZEOF_LONG == 8 + x |= x >> 32; +#endif + return x + 1; +} + +static inline int +floor_log2(register unsigned long x) +{ + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; +#if SIZEOF_LONG == 8 + x |= x >> 32; +#endif + return (int)ones(x) - 1; +} + +static inline int +ceil_log2(register unsigned long x) +{ + return floor_log2(x) + !POW2_P(x); +} + +#define LOG2_KARATSUBA_DIGITS 7 +#define KARATSUBA_DIGITS (1L< KARATSUBA_DIGITS"); + + m = ceil_log2(n1); + if (m1) *m1 = 1 << m; + i = m - LOG2_KARATSUBA_DIGITS; + if (i >= MAX_BIG2STR_TABLE_ENTRIES) + i = MAX_BIG2STR_TABLE_ENTRIES - 1; + t = power_cache_get_power0(base, i); + + j = KARATSUBA_DIGITS*(1 << i); + while (n1 > j) { + t = bigsqr(t); + j *= 2; + } + return t; +} + +/* big2str_muraken_find_n1 + * + * Let a natural number x is given by: + * x = 2^0 * x_0 + 2^1 * x_1 + ... + 2^(B*n_0 - 1) * x_{B*n_0 - 1}, + * where B is BITSPERDIG (i.e. BDIGITS*CHAR_BIT) and n_0 is + * RBIGNUM_LEN(x). + * + * Now, we assume n_1 = min_n \{ n | 2^(B*n_0/2) <= b_1^(n_1) \}, so + * it is realized that 2^(B*n_0) <= {b_1}^{2*n_1}, where b_1 is a + * given radix number. And then, we have n_1 <= (B*n_0) / + * (2*log_2(b_1)), therefore n_1 is given by ceil((B*n_0) / + * (2*log_2(b_1))). + */ +static long +big2str_find_n1(VALUE x, int base) +{ + static const double log_2[] = { + 1.0, 1.58496250072116, 2.0, + 2.32192809488736, 2.58496250072116, 2.8073549220576, + 3.0, 3.16992500144231, 3.32192809488736, + 3.4594316186373, 3.58496250072116, 3.70043971814109, + 3.8073549220576, 3.90689059560852, 4.0, + 4.08746284125034, 4.16992500144231, 4.24792751344359, + 4.32192809488736, 4.39231742277876, 4.4594316186373, + 4.52356195605701, 4.58496250072116, 4.64385618977472, + 4.70043971814109, 4.75488750216347, 4.8073549220576, + 4.85798099512757, 4.90689059560852, 4.95419631038688, + 5.0, 5.04439411935845, 5.08746284125034, + 5.12928301694497, 5.16992500144231 + }; + long bits; + + if (base < 2 || 36 < base) + rb_bug("invalid radix %d", base); + + if (FIXNUM_P(x)) { + bits = (SIZEOF_LONG*CHAR_BIT - 1)/2 + 1; + } + else if (BIGZEROP(x)) { + return 0; + } + else if (RBIGNUM_LEN(x) >= LONG_MAX/BITSPERDIG) { + rb_raise(rb_eRangeError, "bignum too big to convert into `string'"); + } + else { + bits = BITSPERDIG*RBIGNUM_LEN(x); + } + + return (long)ceil(bits/log_2[base - 2]); +} + +static long +big2str_orig(VALUE x, int base, char* ptr, long len, long hbase, int trim) +{ + long i = RBIGNUM_LEN(x), j = len; + BDIGIT* ds = BDIGITS(x); + + while (i && j > 0) { + long k = i; + BDIGIT_DBL num = 0; + + while (k--) { /* x / hbase */ + num = BIGUP(num) + ds[k]; + ds[k] = (BDIGIT)(num / hbase); + num %= hbase; + } + if (trim && ds[i-1] == 0) i--; + k = SIZEOF_BDIGITS; + while (k--) { + ptr[--j] = ruby_digitmap[num % base]; + num /= base; + if (j <= 0) break; + if (trim && i == 0 && num == 0) break; + } + } + if (trim) { + while (j < len && ptr[j] == '0') j++; + MEMMOVE(ptr, ptr + j, char, len - j); + len -= j; + } + return len; +} + +static long +big2str_karatsuba(VALUE x, int base, char* ptr, + long n1, long len, long hbase, int trim) +{ + long lh, ll, m1; + VALUE b, q, r; + + if (BIGZEROP(x)) { + if (trim) return 0; + else { + memset(ptr, '0', len); + return len; + } + } + + if (n1 <= KARATSUBA_DIGITS) { + return big2str_orig(x, base, ptr, len, hbase, trim); + } + + b = power_cache_get_power(base, n1, &m1); + bigdivmod(x, b, &q, &r); + lh = big2str_karatsuba(q, base, ptr, (len - m1)/2, + len - m1, hbase, trim); + rb_big_resize(q, 0); + ll = big2str_karatsuba(r, base, ptr + lh, m1/2, + m1, hbase, !lh && trim); + rb_big_resize(r, 0); + + return lh + ll; +} + +VALUE +rb_big2str0(VALUE x, int base, int trim) +{ + int off; + VALUE ss, xx; + long n1, n2, len, hbase; + char* ptr; + + if (FIXNUM_P(x)) { + return rb_fix2str(x, base); + } + if (BIGZEROP(x)) { + return rb_usascii_str_new2("0"); + } + + if (base < 2 || 36 < base) + rb_raise(rb_eArgError, "invalid radix %d", base); + + n2 = big2str_find_n1(x, base); + n1 = (n2 + 1) / 2; + ss = rb_usascii_str_new(0, n2 + 1); /* plus one for sign */ + ptr = RSTRING_PTR(ss); + ptr[0] = RBIGNUM_SIGN(x) ? '+' : '-'; + + hbase = base*base; +#if SIZEOF_BDIGITS > 2 + hbase *= hbase; +#endif + off = !(trim && RBIGNUM_SIGN(x)); /* erase plus sign if trim */ + xx = rb_big_clone(x); + RBIGNUM_SET_SIGN(xx, 1); + if (n1 <= KARATSUBA_DIGITS) { + len = off + big2str_orig(xx, base, ptr + off, n2, hbase, trim); + } + else { + len = off + big2str_karatsuba(xx, base, ptr + off, n1, + n2, hbase, trim); + } + rb_big_resize(xx, 0); + + ptr[len] = '\0'; + rb_str_resize(ss, len); + + return ss; +} + +VALUE +rb_big2str(VALUE x, int base) +{ + return rb_big2str0(x, base, 1); +} + +/* + * call-seq: + * big.to_s(base=10) => string + * + * Returns a string containing the representation of big radix + * base (2 through 36). + * + * 12345654321.to_s #=> "12345654321" + * 12345654321.to_s(2) #=> "1011011111110110111011110000110001" + * 12345654321.to_s(8) #=> "133766736061" + * 12345654321.to_s(16) #=> "2dfdbbc31" + * 78546939656932.to_s(36) #=> "rubyrules" + */ + +static VALUE +rb_big_to_s(int argc, VALUE *argv, VALUE x) +{ + int base; + + if (argc == 0) base = 10; + else { + VALUE b; + + rb_scan_args(argc, argv, "01", &b); + base = NUM2INT(b); + } + return rb_big2str(x, base); +} + +static VALUE +big2ulong(VALUE x, const char *type, int check) +{ + long len = RBIGNUM_LEN(x); + BDIGIT_DBL num; + BDIGIT *ds; + + if (len > DIGSPERLONG) { + if (check) + rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type); + len = DIGSPERLONG; + } + ds = BDIGITS(x); + num = 0; + while (len--) { + num = BIGUP(num); + num += ds[len]; + } + return num; +} + +VALUE +rb_big2ulong_pack(VALUE x) +{ + VALUE num = big2ulong(x, "unsigned long", Qfalse); + if (!RBIGNUM_SIGN(x)) { + return -num; + } + return num; +} + +VALUE +rb_big2ulong(VALUE x) +{ + VALUE num = big2ulong(x, "unsigned long", Qtrue); + + if (!RBIGNUM_SIGN(x)) { + if ((SIGNED_VALUE)num < 0) { + rb_raise(rb_eRangeError, "bignum out of range of unsigned long"); + } + return -num; + } + return num; +} + +SIGNED_VALUE +rb_big2long(VALUE x) +{ + VALUE num = big2ulong(x, "long", Qtrue); + + if ((SIGNED_VALUE)num < 0 && + (RBIGNUM_SIGN(x) || (SIGNED_VALUE)num != LONG_MIN)) { + rb_raise(rb_eRangeError, "bignum too big to convert into `long'"); + } + if (!RBIGNUM_SIGN(x)) return -(SIGNED_VALUE)num; + return num; +} + +#if HAVE_LONG_LONG + +static unsigned LONG_LONG +big2ull(VALUE x, const char *type) +{ + long len = RBIGNUM_LEN(x); + BDIGIT_DBL num; + BDIGIT *ds; + + if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) + rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type); + ds = BDIGITS(x); + num = 0; + while (len--) { + num = BIGUP(num); + num += ds[len]; + } + return num; +} + +unsigned LONG_LONG +rb_big2ull(VALUE x) +{ + unsigned LONG_LONG num = big2ull(x, "unsigned long long"); + + if (!RBIGNUM_SIGN(x)) return -num; + return num; +} + +LONG_LONG +rb_big2ll(VALUE x) +{ + unsigned LONG_LONG num = big2ull(x, "long long"); + + if ((LONG_LONG)num < 0 && (RBIGNUM_SIGN(x) + || (LONG_LONG)num != LLONG_MIN)) { + rb_raise(rb_eRangeError, "bignum too big to convert into `long long'"); + } + if (!RBIGNUM_SIGN(x)) return -(LONG_LONG)num; + return num; +} + +#endif /* HAVE_LONG_LONG */ + +static VALUE +dbl2big(double d) +{ + long i = 0; + BDIGIT c; + BDIGIT *digits; + VALUE z; + double u = (d < 0)?-d:d; + + if (isinf(d)) { + rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity"); + } + if (isnan(d)) { + rb_raise(rb_eFloatDomainError, "NaN"); + } + + while (!POSFIXABLE(u) || 0 != (long)u) { + u /= (double)(BIGRAD); + i++; + } + z = bignew(i, d>=0); + digits = BDIGITS(z); + while (i--) { + u *= BIGRAD; + c = (BDIGIT)u; + u -= c; + digits[i] = c; + } + + return z; +} + +VALUE +rb_dbl2big(double d) +{ + return bignorm(dbl2big(d)); +} + +static int +nlz(BDIGIT x) +{ + BDIGIT y; + int n = BITSPERDIG; +#if BITSPERDIG > 64 + y = x >> 64; if (y) {n -= 64; x = y;} +#endif +#if BITSPERDIG > 32 + y = x >> 32; if (y) {n -= 32; x = y;} +#endif +#if BITSPERDIG > 16 + y = x >> 16; if (y) {n -= 16; x = y;} +#endif + y = x >> 8; if (y) {n -= 8; x = y;} + y = x >> 4; if (y) {n -= 4; x = y;} + y = x >> 2; if (y) {n -= 2; x = y;} + y = x >> 1; if (y) {return n - 2;} + return n - x; +} + +static double +big2dbl(VALUE x) +{ + double d = 0.0; + long i = RBIGNUM_LEN(x), lo = 0, bits; + BDIGIT *ds = BDIGITS(x), dl; + + if (i) { + bits = i * BITSPERDIG - nlz(ds[i-1]); + if (bits > DBL_MANT_DIG+DBL_MAX_EXP) { + d = HUGE_VAL; + } + else { + if (bits > DBL_MANT_DIG+1) + lo = (bits -= DBL_MANT_DIG+1) / BITSPERDIG; + else + bits = 0; + while (--i > lo) { + d = ds[i] + BIGRAD*d; + } + dl = ds[i]; + if (bits && (dl & (1UL << (bits %= BITSPERDIG)))) { + int carry = dl & ~(~0UL << bits); + if (!carry) { + while (i-- > 0) { + if ((carry = ds[i]) != 0) break; + } + } + if (carry) { + dl &= ~0UL << bits; + dl += 1UL << bits; + if (!dl) d += 1; + } + } + d = dl + BIGRAD*d; + if (lo) d = ldexp(d, lo * BITSPERDIG); + } + } + if (!RBIGNUM_SIGN(x)) d = -d; + return d; +} + +double +rb_big2dbl(VALUE x) +{ + double d = big2dbl(x); + + if (isinf(d)) { + rb_warning("Bignum out of Float range"); + d = HUGE_VAL; + } + return d; +} + +/* + * call-seq: + * big.to_f -> float + * + * Converts big to a Float. If big doesn't + * fit in a Float, the result is infinity. + * + */ + +static VALUE +rb_big_to_f(VALUE x) +{ + return DBL2NUM(rb_big2dbl(x)); +} + +/* + * call-seq: + * big <=> numeric => -1, 0, +1 + * + * Comparison---Returns -1, 0, or +1 depending on whether big is + * less than, equal to, or greater than numeric. This is the + * basis for the tests in Comparable. + * + */ + +VALUE +rb_big_cmp(VALUE x, VALUE y) +{ + long xlen = RBIGNUM_LEN(x); + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + case T_FLOAT: + return rb_dbl_cmp(rb_big2dbl(x), RFLOAT_VALUE(y)); + + default: + return rb_num_coerce_cmp(x, y, rb_intern("<=>")); + } + + if (RBIGNUM_SIGN(x) > RBIGNUM_SIGN(y)) return INT2FIX(1); + if (RBIGNUM_SIGN(x) < RBIGNUM_SIGN(y)) return INT2FIX(-1); + if (xlen < RBIGNUM_LEN(y)) + return (RBIGNUM_SIGN(x)) ? INT2FIX(-1) : INT2FIX(1); + if (xlen > RBIGNUM_LEN(y)) + return (RBIGNUM_SIGN(x)) ? INT2FIX(1) : INT2FIX(-1); + + while(xlen-- && (BDIGITS(x)[xlen]==BDIGITS(y)[xlen])); + if (-1 == xlen) return INT2FIX(0); + return (BDIGITS(x)[xlen] > BDIGITS(y)[xlen]) ? + (RBIGNUM_SIGN(x) ? INT2FIX(1) : INT2FIX(-1)) : + (RBIGNUM_SIGN(x) ? INT2FIX(-1) : INT2FIX(1)); +} + +/* + * call-seq: + * big == obj => true or false + * + * Returns true only if obj has the same value + * as big. Contrast this with Bignum#eql?, which + * requires obj to be a Bignum. + * + * 68719476736 == 68719476736.0 #=> true + */ + +VALUE +rb_big_eq(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + case T_BIGNUM: + break; + case T_FLOAT: + { + volatile double a, b; + + a = RFLOAT_VALUE(y); + if (isnan(a)) return Qfalse; + b = rb_big2dbl(x); + return (a == b)?Qtrue:Qfalse; + } + default: + return rb_equal(y, x); + } + if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y)) return Qfalse; + if (RBIGNUM_LEN(x) != RBIGNUM_LEN(y)) return Qfalse; + if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM_LEN(y)) != 0) return Qfalse; + return Qtrue; +} + +/* + * call-seq: + * big.eql?(obj) => true or false + * + * Returns true only if obj is a + * Bignum with the same value as big. Contrast this + * with Bignum#==, which performs type conversions. + * + * 68719476736.eql?(68719476736.0) #=> false + */ + +static VALUE +rb_big_eql(VALUE x, VALUE y) +{ + if (TYPE(y) != T_BIGNUM) return Qfalse; + if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y)) return Qfalse; + if (RBIGNUM_LEN(x) != RBIGNUM_LEN(y)) return Qfalse; + if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM_LEN(y)) != 0) return Qfalse; + return Qtrue; +} + +/* + * call-seq: + * -big => other_big + * + * Unary minus (returns a new Bignum whose value is 0-big) + */ + +static VALUE +rb_big_uminus(VALUE x) +{ + VALUE z = rb_big_clone(x); + + RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x)); + + return bignorm(z); +} + +/* + * call-seq: + * ~big => integer + * + * Inverts the bits in big. As Bignums are conceptually infinite + * length, the result acts as if it had an infinite number of one + * bits to the left. In hex representations, this is displayed + * as two periods to the left of the digits. + * + * sprintf("%X", ~0x1122334455) #=> "..FEEDDCCBBAA" + */ + +static VALUE +rb_big_neg(VALUE x) +{ + VALUE z = rb_big_clone(x); + BDIGIT *ds; + long i; + + if (!RBIGNUM_SIGN(x)) get2comp(z); + ds = BDIGITS(z); + i = RBIGNUM_LEN(x); + if (!i) return INT2FIX(~(SIGNED_VALUE)0); + while (i--) { + ds[i] = ~ds[i]; + } + RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(z)); + if (RBIGNUM_SIGN(x)) get2comp(z); + + return bignorm(z); +} + +static VALUE +bigsub(VALUE x, VALUE y) +{ + VALUE z = 0; + BDIGIT *zds; + BDIGIT_DBL_SIGNED num; + long i = RBIGNUM_LEN(x); + + /* if x is larger than y, swap */ + if (RBIGNUM_LEN(x) < RBIGNUM_LEN(y)) { + z = x; x = y; y = z; /* swap x y */ + } + else if (RBIGNUM_LEN(x) == RBIGNUM_LEN(y)) { + while (i > 0) { + i--; + if (BDIGITS(x)[i] > BDIGITS(y)[i]) { + break; + } + if (BDIGITS(x)[i] < BDIGITS(y)[i]) { + z = x; x = y; y = z; /* swap x y */ + break; + } + } + } + + z = bignew(RBIGNUM_LEN(x), z==0); + zds = BDIGITS(z); + + for (i = 0, num = 0; i < RBIGNUM_LEN(y); i++) { + num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i]; + zds[i] = BIGLO(num); + num = BIGDN(num); + } + while (num && i < RBIGNUM_LEN(x)) { + num += BDIGITS(x)[i]; + zds[i++] = BIGLO(num); + num = BIGDN(num); + } + while (i < RBIGNUM_LEN(x)) { + zds[i] = BDIGITS(x)[i]; + i++; + } + + return z; +} + +static VALUE +bigadd(VALUE x, VALUE y, int sign) +{ + VALUE z; + BDIGIT_DBL num; + long i, len; + + sign = (sign == RBIGNUM_SIGN(y)); + if (RBIGNUM_SIGN(x) != sign) { + if (sign) return bigsub(y, x); + return bigsub(x, y); + } + + if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) { + len = RBIGNUM_LEN(x) + 1; + z = x; x = y; y = z; + } + else { + len = RBIGNUM_LEN(y) + 1; + } + z = bignew(len, sign); + + len = RBIGNUM_LEN(x); + for (i = 0, num = 0; i < len; i++) { + num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i]; + BDIGITS(z)[i] = BIGLO(num); + num = BIGDN(num); + } + len = RBIGNUM_LEN(y); + while (num && i < len) { + num += BDIGITS(y)[i]; + BDIGITS(z)[i++] = BIGLO(num); + num = BIGDN(num); + } + while (i < len) { + BDIGITS(z)[i] = BDIGITS(y)[i]; + i++; + } + BDIGITS(z)[i] = (BDIGIT)num; + + return z; +} + +/* + * call-seq: + * big + other => Numeric + * + * Adds big and other, returning the result. + */ + +VALUE +rb_big_plus(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + /* fall through */ + case T_BIGNUM: + return bignorm(bigadd(x, y, 1)); + + case T_FLOAT: + return DBL2NUM(rb_big2dbl(x) + RFLOAT_VALUE(y)); + + default: + return rb_num_coerce_bin(x, y, '+'); + } +} + +/* + * call-seq: + * big - other => Numeric + * + * Subtracts other from big, returning the result. + */ + +VALUE +rb_big_minus(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + /* fall through */ + case T_BIGNUM: + return bignorm(bigadd(x, y, 0)); + + case T_FLOAT: + return DBL2NUM(rb_big2dbl(x) - RFLOAT_VALUE(y)); + + default: + return rb_num_coerce_bin(x, y, '-'); + } +} + +static void +rb_big_stop(void *ptr) +{ + VALUE *stop = (VALUE*)ptr; + *stop = Qtrue; +} + +struct big_mul_struct { + VALUE x, y, z, stop; +}; + +static VALUE +bigmul1(void *ptr) +{ + struct big_mul_struct *bms = (struct big_mul_struct*)ptr; + long i, j; + BDIGIT_DBL n = 0; + VALUE x = bms->x, y = bms->y, z = bms->z; + BDIGIT *zds; + + j = RBIGNUM_LEN(x) + RBIGNUM_LEN(y) + 1; + zds = BDIGITS(z); + while (j--) zds[j] = 0; + for (i = 0; i < RBIGNUM_LEN(x); i++) { + BDIGIT_DBL dd; + if (bms->stop) return Qnil; + dd = BDIGITS(x)[i]; + if (dd == 0) continue; + n = 0; + for (j = 0; j < RBIGNUM_LEN(y); j++) { + BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j]; + n = zds[i + j] + ee; + if (ee) zds[i + j] = BIGLO(n); + n = BIGDN(n); + } + if (n) { + zds[i + j] = n; + } + } + return z; +} + +static VALUE +rb_big_mul0(VALUE x, VALUE y) +{ + struct big_mul_struct bms; + volatile VALUE z; + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + case T_FLOAT: + return DBL2NUM(rb_big2dbl(x) * RFLOAT_VALUE(y)); + + default: + return rb_num_coerce_bin(x, y, '*'); + } + + bms.x = x; + bms.y = y; + bms.z = bignew(RBIGNUM_LEN(x) + RBIGNUM_LEN(y) + 1, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y)); + bms.stop = Qfalse; + + if (RBIGNUM_LEN(x) + RBIGNUM_LEN(y) > 10000) { + z = rb_thread_blocking_region(bigmul1, &bms, rb_big_stop, &bms.stop); + } + else { + z = bigmul1(&bms); + } + + return z; +} + +/* + * call-seq: + * big * other => Numeric + * + * Multiplies big and other, returning the result. + */ + +VALUE +rb_big_mul(VALUE x, VALUE y) +{ + return bignorm(rb_big_mul0(x, y)); +} + +struct big_div_struct { + long nx, ny; + BDIGIT *yds, *zds; + VALUE stop; +}; + +static VALUE +bigdivrem1(void *ptr) +{ + struct big_div_struct *bds = (struct big_div_struct*)ptr; + long nx = bds->nx, ny = bds->ny; + long i, j, nyzero; + BDIGIT *yds = bds->yds, *zds = bds->zds; + BDIGIT_DBL t2; + BDIGIT_DBL_SIGNED num; + BDIGIT q; + + j = nx==ny?nx+1:nx; + for (nyzero = 0; !yds[nyzero]; nyzero++); + do { + if (bds->stop) return Qnil; + if (zds[j] == yds[ny-1]) q = BIGRAD-1; + else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]); + if (q) { + i = nyzero; num = 0; t2 = 0; + do { /* multiply and subtract */ + BDIGIT_DBL ee; + t2 += (BDIGIT_DBL)yds[i] * q; + ee = num - BIGLO(t2); + num = (BDIGIT_DBL)zds[j - ny + i] + ee; + if (ee) zds[j - ny + i] = BIGLO(num); + num = BIGDN(num); + t2 = BIGDN(t2); + } while (++i < ny); + num += zds[j - ny + i] - t2;/* borrow from high digit; don't update */ + while (num) { /* "add back" required */ + i = 0; num = 0; q--; + do { + BDIGIT_DBL ee = num + yds[i]; + num = (BDIGIT_DBL)zds[j - ny + i] + ee; + if (ee) zds[j - ny + i] = BIGLO(num); + num = BIGDN(num); + } while (++i < ny); + num--; + } + } + zds[j] = q; + } while (--j >= ny); + return Qnil; +} + +static VALUE +bigdivrem(VALUE x, VALUE y, VALUE *divp, VALUE *modp) +{ + struct big_div_struct bds; + long nx = RBIGNUM_LEN(x), ny = RBIGNUM_LEN(y); + long i, j; + volatile VALUE yy, z; + BDIGIT *xds, *yds, *zds, *tds; + BDIGIT_DBL t2; + BDIGIT dd, q; + + if (BIGZEROP(y)) rb_num_zerodiv(); + yds = BDIGITS(y); + if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) { + if (divp) *divp = rb_int2big(0); + if (modp) *modp = x; + return Qnil; + } + xds = BDIGITS(x); + if (ny == 1) { + dd = yds[0]; + z = rb_big_clone(x); + zds = BDIGITS(z); + t2 = 0; i = nx; + while (i--) { + t2 = BIGUP(t2) + zds[i]; + zds[i] = (BDIGIT)(t2 / dd); + t2 %= dd; + } + RBIGNUM_SET_SIGN(z, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y)); + if (modp) { + *modp = rb_uint2big((VALUE)t2); + RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x)); + } + if (divp) *divp = z; + return Qnil; + } + z = bignew(nx==ny?nx+2:nx+1, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y)); + zds = BDIGITS(z); + if (nx==ny) zds[nx+1] = 0; + while (!yds[ny-1]) ny--; + + dd = 0; + q = yds[ny-1]; + while ((q & (1UL<<(BITSPERDIG-1))) == 0) { + q <<= 1UL; + dd++; + } + if (dd) { + yy = rb_big_clone(y); + tds = BDIGITS(yy); + j = 0; + t2 = 0; + while (j 10000 || RBIGNUM_LEN(y) > 10000) { + rb_thread_blocking_region(bigdivrem1, &bds, rb_big_stop, &bds.stop); + } + else { + bigdivrem1(&bds); + } + + if (divp) { /* move quotient down in z */ + *divp = rb_big_clone(z); + zds = BDIGITS(*divp); + j = (nx==ny ? nx+2 : nx+1) - ny; + for (i = 0;i < j;i++) zds[i] = zds[i+ny]; + if (!zds[i-1]) i--; + RBIGNUM_SET_LEN(*divp, i); + } + if (modp) { /* normalize remainder */ + *modp = rb_big_clone(z); + zds = BDIGITS(*modp); + while (--ny && !zds[ny]); ++ny; + if (dd) { + t2 = 0; i = ny; + while(i--) { + t2 = (t2 | zds[i]) >> dd; + q = zds[i]; + zds[i] = BIGLO(t2); + t2 = BIGUP(q); + } + } + if (!zds[ny-1]) ny--; + RBIGNUM_SET_LEN(*modp, ny); + RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x)); + } + return z; +} + +static void +bigdivmod(VALUE x, VALUE y, VALUE *divp, VALUE *modp) +{ + VALUE mod; + + bigdivrem(x, y, divp, &mod); + if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y) && !BIGZEROP(mod)) { + if (divp) *divp = bigadd(*divp, rb_int2big(1), 0); + if (modp) *modp = bigadd(mod, y, 1); + } + else if (modp) { + *modp = mod; + } +} + + +static VALUE +rb_big_divide(VALUE x, VALUE y, ID op) +{ + VALUE z; + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + case T_FLOAT: + { + double div = rb_big2dbl(x) / RFLOAT_VALUE(y); + if (op == '/') { + return DBL2NUM(div); + } + else { + return rb_dbl2big(div); + } + } + + default: + return rb_num_coerce_bin(x, y, op); + } + bigdivmod(x, y, &z, 0); + + return bignorm(z); +} + +/* + * call-seq: + * big / other => Numeric + * + * Divides big by other, returning the result. + */ + +VALUE +rb_big_div(VALUE x, VALUE y) +{ + return rb_big_divide(x, y, '/'); +} + +VALUE +rb_big_idiv(VALUE x, VALUE y) +{ + return rb_big_divide(x, y, rb_intern("div")); +} + +/* + * call-seq: + * big % other => Numeric + * big.modulo(other) => Numeric + * + * Returns big modulo other. See Numeric.divmod for more + * information. + */ + +VALUE +rb_big_modulo(VALUE x, VALUE y) +{ + VALUE z; + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + default: + return rb_num_coerce_bin(x, y, '%'); + } + bigdivmod(x, y, 0, &z); + + return bignorm(z); +} + +/* + * call-seq: + * big.remainder(numeric) => number + * + * Returns the remainder after dividing big by numeric. + * + * -1234567890987654321.remainder(13731) #=> -6966 + * -1234567890987654321.remainder(13731.24) #=> -9906.22531493148 + */ +static VALUE +rb_big_remainder(VALUE x, VALUE y) +{ + VALUE z; + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + default: + return rb_num_coerce_bin(x, y, rb_intern("remainder")); + } + bigdivrem(x, y, 0, &z); + + return bignorm(z); +} + +/* + * call-seq: + * big.divmod(numeric) => array + * + * See Numeric#divmod. + * + */ +VALUE +rb_big_divmod(VALUE x, VALUE y) +{ + VALUE div, mod; + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + break; + + case T_BIGNUM: + break; + + default: + return rb_num_coerce_bin(x, y, rb_intern("divmod")); + } + bigdivmod(x, y, &div, &mod); + + return rb_assoc_new(bignorm(div), bignorm(mod)); +} + +static int +bdigbitsize(BDIGIT x) +{ + int size = 1; + int nb = BITSPERDIG / 2; + BDIGIT bits = (~0 << nb); + + if (!x) return 0; + while (x > 1) { + if (x & bits) { + size += nb; + x >>= nb; + } + x &= ~bits; + nb /= 2; + bits >>= nb; + } + + return size; +} + +static VALUE big_lshift(VALUE, unsigned long); +static VALUE big_rshift(VALUE, unsigned long); + +static VALUE big_shift(VALUE x, int n) +{ + if (n < 0) + return big_lshift(x, (unsigned int)-n); + else if (n > 0) + return big_rshift(x, (unsigned int)n); + return x; +} + +/* + * call-seq: + * big.fdiv(numeric) -> float + * + * Returns the floating point result of dividing big by + * numeric. + * + * -1234567890987654321.fdiv(13731) #=> -89910996357705.5 + * -1234567890987654321.fdiv(13731.24) #=> -89909424858035.7 + * + */ + +static VALUE +rb_big_fdiv(VALUE x, VALUE y) +{ + double dx = big2dbl(x); + double dy; + + if (isinf(dx)) { +#define DBL_BIGDIG ((DBL_MANT_DIG + BITSPERDIG) / BITSPERDIG) + VALUE z; + int ex, ey; + + ex = (RBIGNUM_LEN(bigtrunc(x)) - 1) * BITSPERDIG; + ex += bdigbitsize(BDIGITS(x)[RBIGNUM_LEN(x) - 1]); + ex -= 2 * DBL_BIGDIG * BITSPERDIG; + if (ex) x = big_shift(x, ex); + + switch (TYPE(y)) { + case T_FIXNUM: + y = rb_int2big(FIX2LONG(y)); + case T_BIGNUM: { + ey = (RBIGNUM_LEN(bigtrunc(y)) - 1) * BITSPERDIG; + ey += bdigbitsize(BDIGITS(y)[RBIGNUM_LEN(y) - 1]); + ey -= DBL_BIGDIG * BITSPERDIG; + if (ey) y = big_shift(y, ey); + bignum: + bigdivrem(x, y, &z, 0); + return DBL2NUM(ldexp(big2dbl(z), ex - ey)); + } + case T_FLOAT: + if (isnan(RFLOAT_VALUE(y))) return y; + y = dbl2big(ldexp(frexp(RFLOAT_VALUE(y), &ey), DBL_MANT_DIG)); + ey -= DBL_MANT_DIG; + goto bignum; + } + } + switch (TYPE(y)) { + case T_FIXNUM: + dy = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + dy = rb_big2dbl(y); + break; + + case T_FLOAT: + dy = RFLOAT_VALUE(y); + break; + + default: + return rb_num_coerce_bin(x, y, rb_intern("fdiv")); + } + return DBL2NUM(dx / dy); +} + +static VALUE +bigsqr(VALUE x) +{ + long len = RBIGNUM_LEN(x), k = len / 2, i; + VALUE a, b, a2, z; + BDIGIT_DBL num; + + if (len < 4000 / BITSPERDIG) { + return bigtrunc(rb_big_mul0(x, x)); + } + + a = bignew(len - k, 1); + MEMCPY(BDIGITS(a), BDIGITS(x) + k, BDIGIT, len - k); + b = bignew(k, 1); + MEMCPY(BDIGITS(b), BDIGITS(x), BDIGIT, k); + + a2 = bigtrunc(bigsqr(a)); + z = bigsqr(b); + rb_big_realloc(z, (len = 2 * k + RBIGNUM_LEN(a2)) + 1); + while (RBIGNUM_LEN(z) < 2 * k) { + BDIGITS(z)[RBIGNUM_LEN(z)] = 0; + RBIGNUM_SET_LEN(z, RBIGNUM_LEN(z)+1); + } + MEMCPY(BDIGITS(z) + 2 * k, BDIGITS(a2), BDIGIT, RBIGNUM_LEN(a2)); + RBIGNUM_SET_LEN(z, len); + a2 = bigtrunc(rb_big_mul0(a, b)); + len = RBIGNUM_LEN(a2); + for (i = 0, num = 0; i < len; i++) { + num += (BDIGIT_DBL)BDIGITS(z)[i + k] + ((BDIGIT_DBL)BDIGITS(a2)[i] << 1); + BDIGITS(z)[i + k] = BIGLO(num); + num = BIGDN(num); + } + if (num) { + len = RBIGNUM_LEN(z); + for (i += k; i < len && num; ++i) { + num += (BDIGIT_DBL)BDIGITS(z)[i]; + BDIGITS(z)[i] = BIGLO(num); + num = BIGDN(num); + } + if (num) { + BDIGITS(z)[RBIGNUM_LEN(z)] = BIGLO(num); + RBIGNUM_SET_LEN(z, RBIGNUM_LEN(z)+1); + } + } + return bigtrunc(z); +} + +/* + * call-seq: + * big ** exponent => numeric + * + * Raises _big_ to the _exponent_ power (which may be an integer, float, + * or anything that will coerce to a number). The result may be + * a Fixnum, Bignum, or Float + * + * 123456789 ** 2 #=> 15241578750190521 + * 123456789 ** 1.2 #=> 5126464716.09932 + * 123456789 ** -2 #=> 6.5610001194102e-17 + */ + +VALUE +rb_big_pow(VALUE x, VALUE y) +{ + double d; + SIGNED_VALUE yy; + + if (y == INT2FIX(0)) return INT2FIX(1); + switch (TYPE(y)) { + case T_FLOAT: + d = RFLOAT_VALUE(y); + break; + + case T_BIGNUM: + rb_warn("in a**b, b may be too big"); + d = rb_big2dbl(y); + break; + + case T_FIXNUM: + yy = FIX2LONG(y); + + if (yy < 0) + return rb_funcall(rb_rational_raw1(x), rb_intern("**"), 1, y); + else { + VALUE z = 0; + SIGNED_VALUE mask; + const long BIGLEN_LIMIT = 1024*1024 / SIZEOF_BDIGITS; + + if ((RBIGNUM_LEN(x) > BIGLEN_LIMIT) || + (RBIGNUM_LEN(x) > BIGLEN_LIMIT / yy)) { + rb_warn("in a**b, b may be too big"); + d = (double)yy; + break; + } + for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) { + if (z) z = bigtrunc(bigsqr(z)); + if (yy & mask) { + z = z ? bigtrunc(rb_big_mul0(z, x)) : x; + } + } + return bignorm(z); + } + /* NOTREACHED */ + break; + + default: + return rb_num_coerce_bin(x, y, rb_intern("**")); + } + return DBL2NUM(pow(rb_big2dbl(x), d)); +} + +static VALUE +bit_coerce(VALUE x) +{ + while (!FIXNUM_P(x) && TYPE(x) != T_BIGNUM) { + if (TYPE(x) == T_FLOAT) { + rb_raise(rb_eTypeError, "can't convert Float into Integer"); + } + x = rb_to_int(x); + } + return x; +} + +/* + * call-seq: + * big & numeric => integer + * + * Performs bitwise +and+ between _big_ and _numeric_. + */ + +VALUE +rb_big_and(VALUE xx, VALUE yy) +{ + volatile VALUE x, y, z; + BDIGIT *ds1, *ds2, *zds; + long i, l1, l2; + char sign; + + x = xx; + y = bit_coerce(yy); + if (FIXNUM_P(y)) { + y = rb_int2big(FIX2LONG(y)); + } + if (!RBIGNUM_SIGN(y)) { + y = rb_big_clone(y); + get2comp(y); + } + if (!RBIGNUM_SIGN(x)) { + x = rb_big_clone(x); + get2comp(x); + } + if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) { + l1 = RBIGNUM_LEN(y); + l2 = RBIGNUM_LEN(x); + ds1 = BDIGITS(y); + ds2 = BDIGITS(x); + sign = RBIGNUM_SIGN(y); + } + else { + l1 = RBIGNUM_LEN(x); + l2 = RBIGNUM_LEN(y); + ds1 = BDIGITS(x); + ds2 = BDIGITS(y); + sign = RBIGNUM_SIGN(x); + } + z = bignew(l2, RBIGNUM_SIGN(x) || RBIGNUM_SIGN(y)); + zds = BDIGITS(z); + + for (i=0; i integer + * + * Performs bitwise +or+ between _big_ and _numeric_. + */ + +VALUE +rb_big_or(VALUE xx, VALUE yy) +{ + volatile VALUE x, y, z; + BDIGIT *ds1, *ds2, *zds; + long i, l1, l2; + char sign; + + x = xx; + y = bit_coerce(yy); + if (FIXNUM_P(y)) { + y = rb_int2big(FIX2LONG(y)); + } + + if (!RBIGNUM_SIGN(y)) { + y = rb_big_clone(y); + get2comp(y); + } + if (!RBIGNUM_SIGN(x)) { + x = rb_big_clone(x); + get2comp(x); + } + if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) { + l1 = RBIGNUM_LEN(y); + l2 = RBIGNUM_LEN(x); + ds1 = BDIGITS(y); + ds2 = BDIGITS(x); + sign = RBIGNUM_SIGN(y); + } + else { + l1 = RBIGNUM_LEN(x); + l2 = RBIGNUM_LEN(y); + ds1 = BDIGITS(x); + ds2 = BDIGITS(y); + sign = RBIGNUM_SIGN(x); + } + z = bignew(l2, RBIGNUM_SIGN(x) && RBIGNUM_SIGN(y)); + zds = BDIGITS(z); + + for (i=0; i integer + * + * Performs bitwise +exclusive or+ between _big_ and _numeric_. + */ + +VALUE +rb_big_xor(VALUE xx, VALUE yy) +{ + volatile VALUE x, y; + VALUE z; + BDIGIT *ds1, *ds2, *zds; + long i, l1, l2; + char sign; + + x = xx; + y = bit_coerce(yy); + if (FIXNUM_P(y)) { + y = rb_int2big(FIX2LONG(y)); + } + + if (!RBIGNUM_SIGN(y)) { + y = rb_big_clone(y); + get2comp(y); + } + if (!RBIGNUM_SIGN(x)) { + x = rb_big_clone(x); + get2comp(x); + } + if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) { + l1 = RBIGNUM_LEN(y); + l2 = RBIGNUM_LEN(x); + ds1 = BDIGITS(y); + ds2 = BDIGITS(x); + sign = RBIGNUM_SIGN(y); + } + else { + l1 = RBIGNUM_LEN(x); + l2 = RBIGNUM_LEN(y); + ds1 = BDIGITS(x); + ds2 = BDIGITS(y); + sign = RBIGNUM_SIGN(x); + } + RBIGNUM_SET_SIGN(x, RBIGNUM_SIGN(x)?1:0); + RBIGNUM_SET_SIGN(y, RBIGNUM_SIGN(y)?1:0); + z = bignew(l2, !(RBIGNUM_SIGN(x) ^ RBIGNUM_SIGN(y))); + zds = BDIGITS(z); + + for (i=0; i SIZEOF_LONG / SIZEOF_BDIGITS) { + return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(-1); + } + return Qnil; +} + +/* + * call-seq: + * big << numeric => integer + * + * Shifts big left _numeric_ positions (right if _numeric_ is negative). + */ + +VALUE +rb_big_lshift(VALUE x, VALUE y) +{ + long shift; + int neg = 0; + + for (;;) { + if (FIXNUM_P(y)) { + shift = FIX2LONG(y); + if (shift < 0) { + neg = 1; + shift = -shift; + } + break; + } + else if (TYPE(y) == T_BIGNUM) { + if (!RBIGNUM_SIGN(y)) { + VALUE t = check_shiftdown(y, x); + if (!NIL_P(t)) return t; + neg = 1; + } + shift = big2ulong(y, "long", Qtrue); + break; + } + y = rb_to_int(y); + } + + if (neg) return big_rshift(x, shift); + return big_lshift(x, shift); +} + +static VALUE +big_lshift(VALUE x, unsigned long shift) +{ + BDIGIT *xds, *zds; + long s1 = shift/BITSPERDIG; + int s2 = shift%BITSPERDIG; + VALUE z; + BDIGIT_DBL num = 0; + long len, i; + + len = RBIGNUM_LEN(x); + z = bignew(len+s1+1, RBIGNUM_SIGN(x)); + zds = BDIGITS(z); + for (i=0; i> numeric => integer + * + * Shifts big right _numeric_ positions (left if _numeric_ is negative). + */ + +VALUE +rb_big_rshift(VALUE x, VALUE y) +{ + long shift; + int neg = 0; + + for (;;) { + if (FIXNUM_P(y)) { + shift = FIX2LONG(y); + if (shift < 0) { + neg = 1; + shift = -shift; + } + break; + } + else if (TYPE(y) == T_BIGNUM) { + if (RBIGNUM_SIGN(y)) { + VALUE t = check_shiftdown(y, x); + if (!NIL_P(t)) return t; + } + else { + neg = 1; + } + shift = big2ulong(y, "long", Qtrue); + break; + } + y = rb_to_int(y); + } + + if (neg) return big_lshift(x, shift); + return big_rshift(x, shift); +} + +static VALUE +big_rshift(VALUE x, unsigned long shift) +{ + BDIGIT *xds, *zds; + long s1 = shift/BITSPERDIG; + int s2 = shift%BITSPERDIG; + VALUE z; + BDIGIT_DBL num = 0; + long i, j; + volatile VALUE save_x; + + if (s1 > RBIGNUM_LEN(x)) { + if (RBIGNUM_SIGN(x)) + return INT2FIX(0); + else + return INT2FIX(-1); + } + if (!RBIGNUM_SIGN(x)) { + save_x = x = rb_big_clone(x); + get2comp(x); + } + xds = BDIGITS(x); + i = RBIGNUM_LEN(x); j = i - s1; + if (j == 0) { + if (RBIGNUM_SIGN(x)) return INT2FIX(0); + else return INT2FIX(-1); + } + z = bignew(j, RBIGNUM_SIGN(x)); + if (!RBIGNUM_SIGN(x)) { + num = ((BDIGIT_DBL)~0) << BITSPERDIG; + } + zds = BDIGITS(z); + while (i--, j--) { + num = (num | xds[i]) >> s2; + zds[j] = BIGLO(num); + num = BIGUP(xds[i]); + } + if (!RBIGNUM_SIGN(x)) { + get2comp(z); + } + return bignorm(z); +} + +/* + * call-seq: + * big[n] -> 0, 1 + * + * Bit Reference---Returns the nth bit in the (assumed) binary + * representation of big, where big[0] is the least + * significant bit. + * + * a = 9**15 + * 50.downto(0) do |n| + * print a[n] + * end + * + * produces: + * + * 000101110110100000111000011110010100111100010111001 + * + */ + +static VALUE +rb_big_aref(VALUE x, VALUE y) +{ + BDIGIT *xds; + BDIGIT_DBL num; + VALUE shift; + long i, s1, s2; + + if (TYPE(y) == T_BIGNUM) { + if (!RBIGNUM_SIGN(y)) + return INT2FIX(0); + if (RBIGNUM_LEN(bigtrunc(y)) > DIGSPERLONG) { + out_of_range: + return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1); + } + shift = big2ulong(y, "long", Qfalse); + } + else { + i = NUM2LONG(y); + if (i < 0) return INT2FIX(0); + shift = (VALUE)i; + } + s1 = shift/BITSPERDIG; + s2 = shift%BITSPERDIG; + + if (s1 >= RBIGNUM_LEN(x)) goto out_of_range; + if (!RBIGNUM_SIGN(x)) { + xds = BDIGITS(x); + i = 0; num = 1; + while (num += ~xds[i], ++i <= s1) { + num = BIGDN(num); + } + } + else { + num = BDIGITS(x)[s1]; + } + if (num & ((BDIGIT_DBL)1< fixnum + * + * Compute a hash based on the value of _big_. + */ + +static VALUE +rb_big_hash(VALUE x) +{ + int hash; + + hash = rb_memhash(BDIGITS(x), sizeof(BDIGIT)*RBIGNUM_LEN(x)) ^ RBIGNUM_SIGN(x); + return INT2FIX(hash); +} + +/* + * MISSING: documentation + */ + +static VALUE +rb_big_coerce(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + return rb_assoc_new(rb_int2big(FIX2LONG(y)), x); + } + else if (TYPE(y) == T_BIGNUM) { + return rb_assoc_new(y, x); + } + else { + rb_raise(rb_eTypeError, "can't coerce %s to Bignum", + rb_obj_classname(y)); + } + /* not reached */ + return Qnil; +} + +/* + * call-seq: + * big.abs -> aBignum + * + * Returns the absolute value of big. + * + * -1234567890987654321.abs #=> 1234567890987654321 + */ + +static VALUE +rb_big_abs(VALUE x) +{ + if (!RBIGNUM_SIGN(x)) { + x = rb_big_clone(x); + RBIGNUM_SET_SIGN(x, 1); + } + return x; +} + +/* + * call-seq: + * big.size -> integer + * + * Returns the number of bytes in the machine representation of + * big. + * + * (256**10 - 1).size #=> 12 + * (256**20 - 1).size #=> 20 + * (256**40 - 1).size #=> 40 + */ + +static VALUE +rb_big_size(VALUE big) +{ + return LONG2FIX(RBIGNUM_LEN(big)*SIZEOF_BDIGITS); +} + +/* + * call-seq: + * big.odd? -> true or false + * + * Returns true if big is an odd number. + */ + +static VALUE +rb_big_odd_p(VALUE num) +{ + if (BDIGITS(num)[0] & 1) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * big.even? -> true or false + * + * Returns true if big is an even number. + */ + +static VALUE +rb_big_even_p(VALUE num) +{ + if (BDIGITS(num)[0] & 1) { + return Qfalse; + } + return Qtrue; +} + +/* + * Bignum objects hold integers outside the range of + * Fixnum. Bignum objects are created + * automatically when integer calculations would otherwise overflow a + * Fixnum. When a calculation involving + * Bignum objects returns a result that will fit in a + * Fixnum, the result is automatically converted. + * + * For the purposes of the bitwise operations and [], a + * Bignum is treated as if it were an infinite-length + * bitstring with 2's complement representation. + * + * While Fixnum values are immediate, Bignum + * objects are not---assignment and parameter passing work with + * references to objects, not the objects themselves. + * + */ + +void +Init_Bignum(void) +{ + rb_cBignum = rb_define_class("Bignum", rb_cInteger); + + rb_define_method(rb_cBignum, "to_s", rb_big_to_s, -1); + rb_define_method(rb_cBignum, "coerce", rb_big_coerce, 1); + rb_define_method(rb_cBignum, "-@", rb_big_uminus, 0); + rb_define_method(rb_cBignum, "+", rb_big_plus, 1); + rb_define_method(rb_cBignum, "-", rb_big_minus, 1); + rb_define_method(rb_cBignum, "*", rb_big_mul, 1); + rb_define_method(rb_cBignum, "/", rb_big_div, 1); + rb_define_method(rb_cBignum, "%", rb_big_modulo, 1); + rb_define_method(rb_cBignum, "div", rb_big_idiv, 1); + rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1); + rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1); + rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1); + rb_define_method(rb_cBignum, "fdiv", rb_big_fdiv, 1); + rb_define_method(rb_cBignum, "**", rb_big_pow, 1); + rb_define_method(rb_cBignum, "&", rb_big_and, 1); + rb_define_method(rb_cBignum, "|", rb_big_or, 1); + rb_define_method(rb_cBignum, "^", rb_big_xor, 1); + rb_define_method(rb_cBignum, "~", rb_big_neg, 0); + rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1); + rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1); + rb_define_method(rb_cBignum, "[]", rb_big_aref, 1); + + rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1); + rb_define_method(rb_cBignum, "==", rb_big_eq, 1); + rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1); + rb_define_method(rb_cBignum, "hash", rb_big_hash, 0); + rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0); + rb_define_method(rb_cBignum, "abs", rb_big_abs, 0); + rb_define_method(rb_cBignum, "magnitude", rb_big_abs, 0); + rb_define_method(rb_cBignum, "size", rb_big_size, 0); + rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0); + rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0); + + power_cache_init(); +} diff --git a/lib/ruby-1.9.1-rc1/bin/erb b/lib/ruby-1.9.1-rc1/bin/erb new file mode 100755 index 0000000..6db3d0b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/erb @@ -0,0 +1,155 @@ +#!/usr/bin/env ruby +# Tiny eRuby --- ERB2 +# Copyright (c) 1999-2000,2002 Masatoshi SEKI +# You can redistribute it and/or modify it under the same terms as Ruby. + +require 'erb' + +class ERB + module Main + def ARGV.switch + return nil if self.empty? + arg = self.shift + return nil if arg == '--' + if arg =~ /^-(.)(.*)/ + if $1 == '-' + arg, @maybe_arg = arg.split(/=/, 2) + return arg + end + raise 'unknown switch "-"' if $2[0] == ?- and $1 != 'T' + if $2.size > 0 + self.unshift "-#{$2}" + @maybe_arg = $2 + else + @maybe_arg = nil + end + "-#{$1}" + else + self.unshift arg + nil + end + end + + def ARGV.req_arg + (@maybe_arg || self.shift || raise('missing argument')).tap { + @maybe_arg = nil + } + end + + def trim_mode_opt(trim_mode, disable_percent) + return trim_mode if disable_percent + case trim_mode + when 0 + return '%' + when 1 + return '%>' + when 2 + return '%<>' + when '-' + return '%-' + end + end + module_function :trim_mode_opt + + def run(factory=ERB) + trim_mode = 0 + disable_percent = false + begin + while switch = ARGV.switch + case switch + when '-x' # ruby source + output = true + when '-n' # line number + number = true + when '-v' # verbose + $VERBOSE = true + when '--version' # version + STDERR.puts factory.version + exit + when '-d', '--debug' # debug + $DEBUG = true + when '-r' # require + require ARGV.req_arg + when '-S' # security level + arg = ARGV.req_arg + raise "invalid safe_level #{arg.dump}" unless arg =~ /^[0-4]$/ + safe_level = arg.to_i + when '-T' # trim mode + arg = ARGV.req_arg + if arg == '-' + trim_mode = arg + next + end + raise "invalid trim mode #{arg.dump}" unless arg =~ /^[0-2]$/ + trim_mode = arg.to_i + when '-E', '--encoding' + arg = ARGV.req_arg + set_encoding(*arg.split(/:/, 2)) + when '-U' + set_encoding(Encoding::UTF_8, Encoding::UTF_8) + when '-P' + disable_percent = true + when '--help' + raise "print this help" + else + raise "unknown switch #{switch.dump}" + end + end + rescue # usage + STDERR.puts $!.to_s + STDERR.puts File.basename($0) + + " [switches] [inputfile]" + STDERR.puts < 1.8.3" + +unless required_version.satisfied_by? Gem.ruby_version then + abort "Expected Ruby Version #{required_version}, was #{Gem.ruby_version}" +end + +# We need to preserve the original ARGV to use for passing gem options +# to source gems. If there is a -- in the line, strip all options after +# it...its for the source building process. +args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")] + +begin + Gem::GemRunner.new.run args +rescue Gem::SystemExitException => e + exit e.exit_code +end + diff --git a/lib/ruby-1.9.1-rc1/bin/irb b/lib/ruby-1.9.1-rc1/bin/irb new file mode 100644 index 0000000..39f9fa5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/irb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby +# +# irb.rb - interactive ruby +# $Release Version: 0.9.5 $ +# $Revision: 14912 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# + +require "irb" + +if __FILE__ == $0 + IRB.start(__FILE__) +else + # check -e option + if /^-e$/ =~ $0 + IRB.start(__FILE__) + else + IRB.setup(__FILE__) + end +end diff --git a/lib/ruby-1.9.1-rc1/bin/rake b/lib/ruby-1.9.1-rc1/bin/rake new file mode 100755 index 0000000..c9e95da --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/rake @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +#-- +# Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +#++ + +begin + require 'rake' +rescue LoadError + require 'rubygems' + require 'rake' +end +Rake.application.run diff --git a/lib/ruby-1.9.1-rc1/bin/rdoc b/lib/ruby-1.9.1-rc1/bin/rdoc new file mode 100644 index 0000000..0ad244d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/rdoc @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +# +# RDoc: Documentation tool for source code +# (see lib/rdoc/rdoc.rb for more information) +# +# Copyright (c) 2003 Dave Thomas +# Released under the same terms as Ruby +# +# $Revision: 15033 $ + +require 'rdoc/rdoc' + +begin + r = RDoc::RDoc.new + r.document ARGV +rescue Interrupt + $stderr.puts + $stderr.puts "Interrupted" +rescue RDoc::Error => e + $stderr.puts e.message + exit 1 +end diff --git a/lib/ruby-1.9.1-rc1/bin/ri b/lib/ruby-1.9.1-rc1/bin/ri new file mode 100755 index 0000000..2435574 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/ri @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +require 'rdoc/ri/driver' + +RDoc::RI::Driver.run ARGV diff --git a/lib/ruby-1.9.1-rc1/bin/testrb b/lib/ruby-1.9.1-rc1/bin/testrb new file mode 100755 index 0000000..e4eb909 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bin/testrb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'test/unit' +Test::Unit.setup_argv {|files| + if files.empty? + puts "Usage: testrb [options] tests..." + exit 1 + end + if files.size == 1 + $0 = File.basename(files[0]) + else + $0 = files.to_s + end + files +} diff --git a/lib/ruby-1.9.1-rc1/blockinlining.c b/lib/ruby-1.9.1-rc1/blockinlining.c new file mode 100644 index 0000000..14cc5f6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/blockinlining.c @@ -0,0 +1,464 @@ +/********************************************************************** + + blockinlining.c - + + $Author: ko1 $ + + Copyright (C) 2004-2007 Koichi Sasada + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "vm_core.h" + +static VALUE +iseq_special_block(rb_iseq_t *iseq, void *builder) +{ +#if OPT_BLOCKINLINING + VALUE parent = Qfalse; + VALUE iseqval; + + if (iseq->argc > 1 || iseq->arg_simple == 0) { + /* argument check */ + return 0; + } + + if (iseq->cached_special_block_builder) { + if (iseq->cached_special_block_builder == builder) { + return iseq->cached_special_block; + } + else { + return 0; + } + } + else { + iseq->cached_special_block_builder = (void *)1; + } + + if (iseq->parent_iseq) { + parent = iseq->parent_iseq->self; + } + iseqval = rb_iseq_new_with_bopt(iseq->node, iseq->name, iseq->filename, + parent, iseq->type, + GC_GUARDED_PTR(builder)); + if (0) { + printf("%s\n", RSTRING_PTR(ruby_iseq_disasm(iseqval))); + } + iseq->cached_special_block = iseqval; + iseq->cached_special_block_builder = builder; + return iseqval; +#else + return 0; +#endif +} + +static NODE * +new_block(NODE * head, NODE * tail) +{ + head = NEW_BLOCK(head); + tail = NEW_BLOCK(tail); + head->nd_next = tail; + return head; +} + +static NODE * +new_ary(NODE * head, NODE * tail) +{ + head = NEW_ARRAY(head); + head->nd_next = tail; + return head; +} + +static NODE * +new_assign(NODE * lnode, NODE * rhs) +{ + switch (nd_type(lnode)) { + case NODE_LASGN:{ + return NEW_NODE(NODE_LASGN, lnode->nd_vid, rhs, lnode->nd_cnt); + /* NEW_LASGN(lnode->nd_vid, rhs); */ + } + case NODE_GASGN:{ + return NEW_GASGN(lnode->nd_vid, rhs); + } + case NODE_DASGN:{ + return NEW_DASGN(lnode->nd_vid, rhs); + } + case NODE_ATTRASGN:{ + NODE *args = 0; + if (lnode->nd_args) { + args = NEW_ARRAY(lnode->nd_args->nd_head); + args->nd_next = NEW_ARRAY(rhs); + args->nd_alen = 2; + } + else { + args = NEW_ARRAY(rhs); + } + + return NEW_ATTRASGN(lnode->nd_recv, + lnode->nd_mid, + args); + } + default: + rb_bug("unimplemented (block inlining): %s", ruby_node_name(nd_type(lnode))); + } + return 0; +} + +static NODE * +build_Integer_times_node(rb_iseq_t *iseq, NODE * node, NODE * lnode, + VALUE param_vars, VALUE local_vars) +{ + /* Special Block for Integer#times + {|e, _self| + _e = e + while(e < _self) + e = _e + redo_point: + BODY + next_point: + _e = _e.succ + end + } + + {|e, _self| + while(e < _self) + BODY + next_point: + e = e.succ + end + } + */ + ID _self; + CONST_ID(_self, "#_self"); + if (iseq->argc == 0) { + ID e; + CONST_ID(e, "#e"); + rb_ary_push(param_vars, ID2SYM(e)); + rb_ary_push(param_vars, ID2SYM(_self)); + iseq->argc += 2; + + node = + NEW_WHILE(NEW_CALL + (NEW_DVAR(e), idLT, new_ary(NEW_DVAR(_self), 0)), + new_block(NEW_OPTBLOCK(node), + NEW_DASGN(e, + NEW_CALL(NEW_DVAR(e), idSucc, 0))), + Qundef); + } + else { + ID _e; + ID e = SYM2ID(rb_ary_entry(param_vars, 0)); + NODE *assign; + + CONST_ID(_e, "#_e"); + rb_ary_push(param_vars, ID2SYM(_self)); + rb_ary_push(local_vars, ID2SYM(_e)); + iseq->argc++; + + if (nd_type(lnode) == NODE_DASGN_CURR) { + assign = NEW_DASGN(e, NEW_DVAR(_e)); + } + else { + assign = new_assign(lnode, NEW_DVAR(_e)); + } + + node = + new_block(NEW_DASGN(_e, NEW_DVAR(e)), + NEW_WHILE(NEW_CALL + (NEW_DVAR(_e), idLT, + new_ary(NEW_DVAR(_self), 0)), + new_block(assign, + new_block(NEW_OPTBLOCK(node), + NEW_DASGN(_e, + NEW_CALL + (NEW_DVAR(_e), + idSucc, 0)))), + Qundef)); + } + return node; +} + +VALUE +invoke_Integer_times_special_block(VALUE num) +{ + rb_thread_t *th = GET_THREAD(); + rb_block_t *orig_block = GC_GUARDED_PTR_REF(th->cfp->lfp[0]); + + if (orig_block && BUILTIN_TYPE(orig_block->iseq) != T_NODE) { + VALUE tsiseqval = iseq_special_block(orig_block->iseq, + build_Integer_times_node); + rb_iseq_t *tsiseq; + VALUE argv[2], val; + + if (tsiseqval) { + rb_block_t block = *orig_block; + GetISeqPtr(tsiseqval, tsiseq); + block.iseq = tsiseq; + th->cfp->lfp[0] = GC_GUARDED_PTR(&block); + argv[0] = INT2FIX(0); + argv[1] = num; + val = rb_yield_values(2, argv); + if (val == Qundef) { + return num; + } + else { + return val; + } + } + } + return Qundef; +} + +static NODE * +build_Range_each_node(rb_iseq_t *iseq, NODE * node, NODE * lnode, + VALUE param_vars, VALUE local_vars, ID mid) +{ + /* Special Block for Range#each + {|e, _last| + _e = e + while _e < _last + e = _e + next_point: + BODY + redo_point: + _e = _e.succ + end + } + {|e, _last| + while e < _last + BODY + redo_point: + e = e.succ + end + } + */ + ID _last; + CONST_ID(_last, "#_last"); + if (iseq->argc == 0) { + ID e; + CONST_ID(e, "#e"); + rb_ary_push(param_vars, ID2SYM(e)); + rb_ary_push(param_vars, ID2SYM(_last)); + iseq->argc += 2; + + node = + NEW_WHILE(NEW_CALL(NEW_DVAR(e), mid, new_ary(NEW_DVAR(_last), 0)), + new_block(NEW_OPTBLOCK(node), + NEW_DASGN(e, + NEW_CALL(NEW_DVAR(e), idSucc, 0))), + Qundef); + } + else { + ID _e; + ID e = SYM2ID(rb_ary_entry(param_vars, 0)); + NODE *assign; + + CONST_ID(_e, "#_e"); + rb_ary_push(param_vars, ID2SYM(_last)); + rb_ary_push(local_vars, ID2SYM(_e)); + iseq->argc++; + + if (nd_type(lnode) == NODE_DASGN_CURR) { + assign = NEW_DASGN(e, NEW_DVAR(_e)); + } + else { + assign = new_assign(lnode, NEW_DVAR(_e)); + } + + node = + new_block(NEW_DASGN(_e, NEW_DVAR(e)), + NEW_WHILE(NEW_CALL + (NEW_DVAR(_e), mid, + new_ary(NEW_DVAR(_last), 0)), + new_block(assign, + new_block(NEW_OPTBLOCK(node), + NEW_DASGN(_e, + NEW_CALL + (NEW_DVAR(_e), + idSucc, 0)))), + Qundef)); + } + return node; +} + +static NODE * +build_Range_each_node_LE(rb_iseq_t *iseq, NODE * node, NODE * lnode, + VALUE param_vars, VALUE local_vars) +{ + return build_Range_each_node(iseq, node, lnode, + param_vars, local_vars, idLE); +} + +static NODE * +build_Range_each_node_LT(rb_iseq_t *iseq, NODE * node, NODE * lnode, + VALUE param_vars, VALUE local_vars) +{ + return build_Range_each_node(iseq, node, lnode, + param_vars, local_vars, idLT); +} + +VALUE +invoke_Range_each_special_block(VALUE range, + VALUE beg, VALUE end, int excl) +{ + rb_thread_t *th = GET_THREAD(); + rb_block_t *orig_block = GC_GUARDED_PTR_REF(th->cfp->lfp[0]); + + if (BUILTIN_TYPE(orig_block->iseq) != T_NODE) { + void *builder = + excl ? build_Range_each_node_LT : build_Range_each_node_LE; + VALUE tsiseqval = iseq_special_block(orig_block->iseq, builder); + rb_iseq_t *tsiseq; + VALUE argv[2]; + + if (tsiseqval) { + VALUE val; + rb_block_t block = *orig_block; + GetISeqPtr(tsiseqval, tsiseq); + block.iseq = tsiseq; + th->cfp->lfp[0] = GC_GUARDED_PTR(&block); + argv[0] = beg; + argv[1] = end; + val = rb_yield_values(2, argv); + if (val == Qundef) { + return range; + } + else { + return val; + } + } + } + return Qundef; +} + + +static NODE * +build_Array_each_node(rb_iseq_t *iseq, NODE * node, NODE * lnode, + VALUE param_vars, VALUE local_vars) +{ + /* Special block for Array#each + ary.each{|e| + BODY + } + => + {|e, _self| + _i = 0 + while _i < _self.length + e = _self[_i] + redo_point: + BODY + next_point: + _i = _i.succ + end + } + + ary.each{ + BODY + } + => + {|_i, _self| + _i = 0 + while _i < _self.length + redo_point: + BODY + next_point: + _i = _i.succ + end + } + */ + + ID _self, _i; + + CONST_ID(_self, "#_self"); + CONST_ID(_i, "#_i"); + if (iseq->argc == 0) { + ID _e; + CONST_ID(_e, "#_e"); + rb_ary_push(param_vars, ID2SYM(_e)); + rb_ary_push(param_vars, ID2SYM(_self)); + iseq->argc += 2; + rb_ary_push(local_vars, ID2SYM(_i)); + + node = + new_block(NEW_DASGN(_i, NEW_LIT(INT2FIX(0))), + NEW_WHILE(NEW_CALL(NEW_DVAR(_i), idLT, + new_ary(NEW_CALL + (NEW_DVAR(_self), idLength, + 0), 0)), + new_block(NEW_OPTBLOCK(node), + NEW_DASGN(_i, + NEW_CALL(NEW_DVAR(_i), + idSucc, 0))), + Qundef)); + } + else { + ID e = SYM2ID(rb_ary_entry(param_vars, 0)); + NODE *assign; + + rb_ary_push(param_vars, ID2SYM(_self)); + iseq->argc++; + rb_ary_push(local_vars, ID2SYM(_i)); + + if (nd_type(lnode) == NODE_DASGN_CURR) { + assign = NEW_DASGN(e, + NEW_CALL(NEW_DVAR(_self), idAREF, + new_ary(NEW_DVAR(_i), 0))); + } + else { + assign = new_assign(lnode, + NEW_CALL(NEW_DVAR(_self), idAREF, + new_ary(NEW_DVAR(_i), 0))); + } + + node = + new_block(NEW_DASGN(_i, NEW_LIT(INT2FIX(0))), + NEW_WHILE(NEW_CALL(NEW_DVAR(_i), idLT, + new_ary(NEW_CALL + (NEW_DVAR(_self), idLength, + 0), 0)), new_block(assign, + new_block + (NEW_OPTBLOCK + (node), + NEW_DASGN + (_i, + NEW_CALL + (NEW_DVAR + (_i), + idSucc, + 0)))), + Qundef)); + } + return node; +} + +VALUE +invoke_Array_each_special_block(VALUE ary) +{ + rb_thread_t *th = GET_THREAD(); + rb_block_t *orig_block = GC_GUARDED_PTR_REF(th->cfp->lfp[0]); + + if (BUILTIN_TYPE(orig_block->iseq) != T_NODE) { + VALUE tsiseqval = iseq_special_block(orig_block->iseq, + build_Array_each_node); + rb_iseq_t *tsiseq; + VALUE argv[2]; + + if (tsiseqval) { + VALUE val; + rb_block_t block = *orig_block; + GetISeqPtr(tsiseqval, tsiseq); + block.iseq = tsiseq; + th->cfp->lfp[0] = GC_GUARDED_PTR(&block); + argv[0] = 0; + argv[1] = ary; + val = rb_yield_values(2, argv); + if (val == Qundef) { + return ary; + } + else { + return val; + } + } + } + return Qundef; +} diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/pending.rb b/lib/ruby-1.9.1-rc1/bootstraptest/pending.rb new file mode 100644 index 0000000..744c0ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/pending.rb @@ -0,0 +1,39 @@ +assert_equal 'A', %q{ + class A + @@a = 'A' + def a=(x) + @@a = x + end + def a + @@a + end + end + + B = A.dup + B.new.a = 'B' + A.new.a +}, '[ruby-core:17019]' + +assert_equal 'ok', %q{ + def m + lambda{ + proc{ + return :ng1 + } + }.call.call + :ng2 + end + + begin + m() + rescue LocalJumpError + :ok + end +} + +assert_normal_exit %q{ + r = Range.allocate + def r.<=>(o) true end + r.instance_eval { initialize r, r } + r.inspect +} diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/runner.rb b/lib/ruby-1.9.1-rc1/bootstraptest/runner.rb new file mode 100644 index 0000000..ff53395 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/runner.rb @@ -0,0 +1,354 @@ +# $Id: runner.rb 18027 2008-07-11 11:51:39Z nobu $ + +# NOTE: +# Never use optparse in this file. +# Never use test/unit in this file. +# Never use Ruby extensions in this file. + +begin + require 'fileutils' + require 'tmpdir' +rescue LoadError + $:.unshift File.join(File.dirname(__FILE__), '../lib') + retry +end + +if !Dir.respond_to?(:mktmpdir) + # copied from lib/tmpdir.rb + def Dir.mktmpdir(prefix="d", tmpdir=nil) + tmpdir ||= Dir.tmpdir + t = Time.now.strftime("%Y%m%d") + n = nil + begin + path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}" + path << "-#{n}" if n + Dir.mkdir(path, 0700) + rescue Errno::EEXIST + n ||= 0 + n += 1 + retry + end + + if block_given? + begin + yield path + ensure + FileUtils.remove_entry_secure path + end + else + path + end + end +end + +def main + @ruby = File.expand_path('miniruby') + @verbose = false + dir = nil + quiet = false + tests = nil + ARGV.delete_if {|arg| + case arg + when /\A--ruby=(.*)/ + @ruby = $1 + @ruby.gsub!(/^([^ ]*)/){File.expand_path($1)} + @ruby.gsub!(/(\s+-I\s*)((?!(?:\.\/)*-(?:\s|\z))\S+)/){$1+File.expand_path($2)} + @ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)} + true + when /\A--sets=(.*)/ + tests = Dir.glob("#{File.dirname($0)}/test_{#{$1}}*.rb") + puts tests.map {|path| File.basename(path) }.inspect + true + when /\A--dir=(.*)/ + dir = $1 + true + when /\A(--stress|-s)/ + $stress = true + when /\A(-q|--q(uiet))\z/ + quiet = true + true + when /\A(-v|--v(erbose))\z/ + @verbose = true + when /\A(-h|--h(elp)?)\z/ + puts(<<-End) +Usage: #{File.basename($0, '.*')} --ruby=PATH [--sets=NAME,NAME,...] + --sets=NAME,NAME,... Name of test sets. + --dir=DIRECTORY Working directory. + default: /tmp/bootstraptest.tmpwd + -s, --stress stress test. + -v, --verbose Output test name before exec. + -q, --quiet Don\'t print header message. + -h, --help Print this message and quit. +End + exit true + else + false + end + } + if tests and not ARGV.empty? + $stderr.puts "--tests and arguments are exclusive" + exit false + end + tests ||= ARGV + tests = Dir.glob("#{File.dirname($0)}/test_*.rb") if tests.empty? + pathes = tests.map {|path| File.expand_path(path) } + + unless quiet + puts Time.now + patchlevel = defined?(RUBY_PATCHLEVEL) ? " patchlevel #{RUBY_PATCHLEVEL}" : '' + puts "Driver is ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}#{patchlevel}) [#{RUBY_PLATFORM}]" + puts "Target is #{`#{@ruby} -v`.chomp}" + puts + $stdout.flush + end + + in_temporary_working_directory(dir) { + exec_test pathes + } +end + +def exec_test(pathes) + @count = 0 + @error = 0 + @errbuf = [] + @location = nil + pathes.each do |path| + $stderr.print "\n#{File.basename(path)} " + load File.expand_path(path) + end + $stderr.puts + if @error == 0 + $stderr.puts "PASS #{@count} tests" + exit true + else + @errbuf.each do |msg| + $stderr.puts msg + end + $stderr.puts "FAIL #{@error}/#{@count} tests failed" + exit false + end +end + +def assert_check(testsrc, message = '', opt = '') + $stderr.puts "\##{@count} #{@location}" if @verbose + result = get_result_string(testsrc, opt) + check_coredump + faildesc = yield(result) + if !faildesc + $stderr.print '.' + else + $stderr.print 'F' + error faildesc, message + end +rescue Exception => err + $stderr.print 'E' + error err.message, message +end + +def assert_equal(expected, testsrc, message = '') + newtest + assert_check(testsrc, message) {|result| + if expected == result + nil + else + desc = "#{result.inspect} (expected #{expected.inspect})" + pretty(testsrc, desc, result) + end + } +end + +def assert_match(expected_pattern, testsrc, message = '') + newtest + assert_check(testsrc, message) {|result| + if expected_pattern =~ result + nil + else + desc = "#{expected_pattern.inspect} expected to be =~\n#{result.inspect}" + pretty(testsrc, desc, result) + end + } +end + +def assert_not_match(unexpected_pattern, testsrc, message = '') + newtest + assert_check(testsrc, message) {|result| + if unexpected_pattern !~ result + nil + else + desc = "#{unexpected_pattern.inspect} expected to be !~\n#{result.inspect}" + pretty(testsrc, desc, result) + end + } +end + +def assert_valid_syntax(testsrc, message = '') + newtest + assert_check(testsrc, message, '-c') {|result| + result if /Syntax OK/ !~ result + } +end + +def assert_normal_exit(testsrc, message = '', ignore_signals = nil) + newtest + $stderr.puts "\##{@count} #{@location}" if @verbose + faildesc = nil + filename = make_srcfile(testsrc) + old_stderr = $stderr.dup + begin + $stderr.reopen("assert_normal_exit_stderr.log", "w") + `#{@ruby} -W0 #{filename}` + status = $? + ensure + $stderr.reopen(old_stderr) + old_stderr.close + end + if status.signaled? + signo = status.termsig + signame = Signal.list.invert[signo] + unless ignore_signals and ignore_signals.include?(signame) + sigdesc = "signal #{signo}" + if signame + sigdesc = "SIG#{signame} (#{sigdesc})" + end + faildesc = pretty(testsrc, "killed by #{sigdesc}", nil) + stderr_log = File.read("assert_normal_exit_stderr.log") + if !stderr_log.empty? + faildesc << "\n" if /\n\z/ !~ faildesc + stderr_log << "\n" if /\n\z/ !~ stderr_log + stderr_log.gsub!(/^.*\n/) { '| ' + $& } + faildesc << stderr_log + end + end + end + if !faildesc + $stderr.print '.' + true + else + $stderr.print 'F' + error faildesc, message + false + end +rescue Exception => err + $stderr.print 'E' + error err.message, message + false +end + +def assert_finish(timeout_seconds, testsrc, message = '') + newtest + $stderr.puts "\##{@count} #{@location}" if @verbose + faildesc = nil + filename = make_srcfile(testsrc) + io = IO.popen("#{@ruby} -W0 #{filename}") + pid = io.pid + waited = false + tlimit = Time.now + timeout_seconds + while Time.now < tlimit + if Process.waitpid pid, Process::WNOHANG + waited = true + break + end + sleep 0.1 + end + if !waited + Process.kill(:KILL, pid) + Process.waitpid pid + faildesc = pretty(testsrc, "not finished in #{timeout_seconds} seconds", nil) + end + io.close + if !faildesc + $stderr.print '.' + else + $stderr.print 'F' + error faildesc, message + end +rescue Exception => err + $stderr.print 'E' + error err.message, message +end + +def flunk(message = '') + newtest + $stderr.print 'F' + error message, '' +end + +def pretty(src, desc, result) + src = src.sub(/\A.*\n/, '') + (/\n/ =~ src ? "\n#{adjust_indent(src)}" : src) + " #=> #{desc}" +end + +INDENT = 27 + +def adjust_indent(src) + untabify(src).gsub(/^ {#{INDENT}}/o, '').gsub(/^/, ' ') +end + +def untabify(str) + str.gsub(/^\t+/) {' ' * (8 * $&.size) } +end + +def make_srcfile(src) + filename = 'bootstraptest.tmp.rb' + File.open(filename, 'w') {|f| + f.puts "GC.stress = true" if $stress + f.puts "print(begin; #{src}; end)" + } + filename +end + +def get_result_string(src, opt = '') + if @ruby + filename = make_srcfile(src) + begin + `#{@ruby} -W0 #{opt} #{filename}` + ensure + raise CoreDumpError, "core dumped" if $? and $?.coredump? + end + else + eval(src).to_s + end +end + +def newtest + @location = File.basename(caller(2).first) + @count += 1 + cleanup_coredump +end + +def error(msg, additional_message) + @errbuf.push "\##{@count} #{@location}: #{msg} #{additional_message}" + @error += 1 +end + +def in_temporary_working_directory(dir) + if dir + Dir.mkdir dir + Dir.chdir(dir) { + yield + } + else + Dir.mktmpdir("bootstraptest.tmpwd") {|d| + Dir.chdir(d) { + yield + } + } + end +end + +def cleanup_coredump + FileUtils.rm_f 'core' + FileUtils.rm_f Dir.glob('core.*') + FileUtils.rm_f @ruby+'.stackdump' if @ruby +end + +class CoreDumpError < StandardError; end + +def check_coredump + if File.file?('core') or not Dir.glob('core.*').empty? or + (@ruby and File.exist?(@ruby+'.stackdump')) + raise CoreDumpError, "core dumped" + end +end + +main diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_attr.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_attr.rb new file mode 100644 index 0000000..721a847 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_attr.rb @@ -0,0 +1,36 @@ +assert_equal 'ok', %q{ + module M + class A + class << self + attr_accessor :at + def workflow_rule + yield self + end + + def eval_str(str) + eval(str) + end + end + end + end + begin + M::A.eval_str(<<-END) + workflow_rule do |r| + r.at 1 + end + END + rescue ArgumentError => e + print "ok" + end +}, '[ruby-core:14641]' + +assert_equal %{ok}, %{ + class A + attr :m + end + begin + A.new.m(3) + rescue ArgumentError => e + print "ok" + end +}, '[ruby-core:15120]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_autoload.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_autoload.rb new file mode 100644 index 0000000..0482561 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_autoload.rb @@ -0,0 +1,61 @@ +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"} + autoload :ZZZ, "./zzz.rb" + ZZZ.ok +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"} + autoload :ZZZ, "./zzz.rb" + require "./zzz.rb" + ZZZ.ok +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"} + autoload :ZZZ, "./zzz.rb" + proc{$SAFE=4; ZZZ.ok}.call +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"} + autoload :ZZZ, "./zzz.rb" + require "./zzz.rb" + proc{$SAFE=4; ZZZ.ok}.call +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"} + autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb') + module M; end + Thread.new{M.instance_eval('$SAFE=4; ZZZ.new.hoge')}.value +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"} + autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb') + module M; end + Thread.new{$SAFE=4; M.instance_eval('ZZZ.new.hoge')}.value +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"} + autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb') + Thread.new{$SAFE=4; eval('ZZZ.new.hoge')}.value +} + +assert_equal 'ok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"} + autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb') + module M; end + Thread.new{eval('$SAFE=4; ZZZ.new.hoge')}.value +} + +assert_equal 'okok', %q{ + open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"} + autoload :ZZZ, "./zzz.rb" + t1 = Thread.new {ZZZ.ok} + t2 = Thread.new {ZZZ.ok} + [t1.value, t2.value].join +} + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_block.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_block.rb new file mode 100644 index 0000000..ce7f00b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_block.rb @@ -0,0 +1,567 @@ +assert_equal %q{1}, %q{ + 1.times{ + begin + a = 1 + ensure + foo = nil + end + } +} +assert_equal %q{2}, %q{ + [1,2,3].find{|x| x == 2} +} +assert_equal %q{2}, %q{ + class E + include Enumerable + def each(&block) + [1, 2, 3].each(&block) + end + end + E.new.find {|x| x == 2 } +} +assert_equal %q{6}, %q{ + sum = 0 + for x in [1, 2, 3] + sum += x + end + sum +} +assert_equal %q{15}, %q{ + sum = 0 + for x in (1..5) + sum += x + end + sum +} +assert_equal %q{0}, %q{ + sum = 0 + for x in [] + sum += x + end + sum +} +assert_equal %q{1}, %q{ + ans = [] + 1.times{ + for n in 1..3 + a = n + ans << a + end + } +} +assert_equal %q{1..3}, %q{ + ans = [] + for m in 1..3 + for n in 1..3 + a = [m, n] + ans << a + end + end +} +assert_equal %q{[1, 2, 3]}, %q{ + (1..3).to_a +} +assert_equal %q{[4, 8, 12]}, %q{ + (1..3).map{|e| + e * 4 + } +} +assert_equal %q{[1, 2, 3]}, %q{ + class C + include Enumerable + def each + [1,2,3].each{|e| + yield e + } + end + end + + C.new.to_a +} +assert_equal %q{[4, 5, 6]}, %q{ + class C + include Enumerable + def each + [1,2,3].each{|e| + yield e + } + end + end + + C.new.map{|e| + e + 3 + } +} +assert_equal %q{100}, %q{ + def m + yield + end + def n + yield + end + + m{ + n{ + 100 + } + } +} +assert_equal %q{20}, %q{ + def m + yield 1 + end + + m{|ib| + m{|jb| + i = 20 + } + } +} +assert_equal %q{2}, %q{ + def m + yield 1 + end + + m{|ib| + m{|jb| + ib = 20 + kb = 2 + } + } +} +assert_equal %q{3}, %q{ + def iter1 + iter2{ + yield + } + end + + def iter2 + yield + end + + iter1{ + jb = 2 + iter1{ + jb = 3 + } + jb + } +} +assert_equal %q{2}, %q{ + def iter1 + iter2{ + yield + } + end + + def iter2 + yield + end + + iter1{ + jb = 2 + iter1{ + jb + } + jb + } +} +assert_equal %q{2}, %q{ + def m + yield 1 + end + m{|ib| + ib*2 + } +} +assert_equal %q{92580}, %q{ + def m + yield 12345, 67890 + end + m{|ib,jb| + ib*2+jb + } +} +assert_equal %q{[10, nil]}, %q{ + def iter + yield 10 + end + + a = nil + [iter{|a| + a + }, a] +} +assert_equal %q{21}, %q{ + def iter + yield 10 + end + + iter{|a| + iter{|a| + a + 1 + } + a + } +} +assert_equal %q{[10, 20, 30, 40, nil, nil, nil, nil]}, %q{ + def iter + yield 10, 20, 30, 40 + end + + a = b = c = d = nil + iter{|a, b, c, d| + [a, b, c, d] + } + [a, b, c, d] +} +assert_equal %q{[10, 20, 30, 40, nil, nil]}, %q{ + def iter + yield 10, 20, 30, 40 + end + + a = b = nil + iter{|a, b, c, d| + [a, b, c, d] + } + [a, b] +} +assert_equal %q{[1]}, %q{ + $a = [] + + def iter + yield 1 + end + + def m + x = iter{|x| + $a << x + y = 0 + } + end + m + $a +} +assert_equal %q{[1, [2]]}, %q{ + def iter + yield 1, 2 + end + + iter{|a, *b| + [a, b] + } +} +assert_equal %q{[[1, 2]]}, %q{ + def iter + yield 1, 2 + end + + iter{|*a| + [a] + } +} +assert_equal %q{[1, 2, []]}, %q{ + def iter + yield 1, 2 + end + + iter{|a, b, *c| + [a, b, c] + } +} +assert_equal %q{[1, 2, nil, []]}, %q{ + def iter + yield 1, 2 + end + + iter{|a, b, c, *d| + [a, b, c, d] + } +} +assert_equal %q{1}, %q{ + def m + yield + end + m{ + 1 + } +} +assert_equal %q{15129}, %q{ + def m + yield 123 + end + m{|ib| + m{|jb| + ib*jb + } + } +} +assert_equal %q{2}, %q{ + def m a + yield a + end + m(1){|ib| + m(2){|jb| + ib*jb + } + } +} +assert_equal %q{9}, %q{ + sum = 0 + 3.times{|ib| + 2.times{|jb| + sum += ib + jb + }} + sum +} +assert_equal %q{10}, %q{ + 3.times{|bl| + break 10 + } +} +assert_equal %q{[1, 2]}, %q{ + def iter + yield 1,2,3 + end + + iter{|i, j| + [i, j] + } +} +assert_equal %q{[1, nil]}, %q{ + def iter + yield 1 + end + + iter{|i, j| + [i, j] + } +} + +assert_equal '0', %q{ +def m() +end +m {|(v0,*,(*)),|} +m {|(*v0,(*)),|} +m {|(v0,*v1,(*)),|} +m {|((v0,*v1,v2)),|} +m {|(v0,*v1,v2),|} +m {|(v0,*v1,(v2)),|} +m {|((*),*v0,v1),|} +m {|((v0),*v1,v2),|} +m {|(v0,v1,*v2,v3),|} +m {|v0,(v1,*v2,v3),|} +m {|(v0,*v1,v2),v3,|} +m {|(v0,*v1,v2)|} +m {|(v0,*v1,v2),&v3|} +m {|(v0,*v1,v2),*|} +m {|(v0,*v1,v2),*,&v3|} +m {|*,(v0,*v1,v2)|} +m {|*,(v0,*v1,v2),&v3|} +m {|v0,*,(v1,*v2,v3)|} +m {|v0,*,(v1,*v2,v3),&v4|} +m {|(v0,*v1,v2),*,v3|} +m {|(v0,*v1,v2),*,v3,&v4|} +m {|(v0, *v1, v2)|} +m {|(*,v)|} +0 +}, "block parameter (shouldn't SEGV: [ruby-dev:31143])" + +assert_equal 'nil', %q{ + def m + yield + end + m{|&b| b}.inspect +}, '[ruby-dev:31147]' + +assert_equal 'nil', %q{ + def m() + yield + end + m {|(v,(*))|}.inspect +}, '[ruby-dev:31160]' + +assert_equal 'nil', %q{ + def m() + yield + end + m {|(*,a,b)|}.inspect +}, '[ruby-dev:31153]' + +assert_equal 'nil', %q{ + def m() + yield + end + m {|((*))|}.inspect +} + +assert_equal %q{[1, 1, [1, nil], [1, nil], [1, nil], [1, nil], [1, 1], 1, [1, nil], [1, nil], [1, nil], [1, nil], [[1, 1], [1, 1]], [1, 1], [1, 1], [1, 1], [1, nil], [1, nil], [[[1, 1], [1, 1]], [[1, 1], [1, 1]]], [[1, 1], [1, 1]], [[1, 1], [1, 1]], [[1, 1], [1, 1]], [1, 1], [1, 1], [[[[1, 1], [1, 1]], [[1, 1], [1, 1]]], [[[1, 1], [1, 1]], [[1, 1], [1, 1]]]], [[[1, 1], [1, 1]], [[1, 1], [1, 1]]], [[[1, 1], [1, 1]], [[1, 1], [1, 1]]], [[[1, 1], [1, 1]], [[1, 1], [1, 1]]], [[1, 1], [1, 1]], [[1, 1], [1, 1]]]}, %q{ +def m(ary = []) + yield(ary) +end + +$ans = [] +o = 1 +5.times{ + v,(*) = o; $ans << o + m(o){|(v,(*))| $ans << v} + ((x, y)) = o; $ans << [x, y] + m(o){|((x, y))| $ans << [x, y]} + (((x, y))) = o; $ans << [x, y] + m(o){|(((x, y)))| $ans << [x, y]} + o = [o, o] +}; $ans +} + +assert_equal '0', %q{ + def m() + yield [0] + end + m {|*,v| v}.inspect +}, '[ruby-dev:31437]' +assert_equal '[0]', %q{ + def m + yield [0] + end + m{|v, &b| v}.inspect +}, '[ruby-dev:31440]' +assert_equal 'ok', %q{ + begin + lambda{|a|}.call(1, 2) + rescue ArgumentError + :ok + else + :ng + end +}, '[ruby-dev:31464]' +assert_equal 'ok', %q{ + begin + lambda{|&b|}.call(3) + rescue ArgumentError + :ok + else + :ng + end +}, '[ruby-dev:31472]' +assert_equal 'ok', %q{ + class C + def each + yield [1,2] + yield 1,2 + end + end + vs1 = [] + C.new.each {|*v| vs1 << v } + vs2 = [] + C.new.to_enum.each {|*v| vs2 << v } + vs1 == vs2 ? :ok : :ng +}, '[ruby-dev:32329]' + +assert_normal_exit %q{ + e = [1,2,3].each + 10000.times { + e = [e].each + } + Thread.new { GC.start }.join +}, '[ruby-dev:32604]' + + +assert_equal '[nil, []]', %q{ + def m() yield nil,[] end + l = lambda {|*v| v} + GC.stress=true + r = m(&l) + GC.stress=false + r.inspect +}, '[ruby-dev:32567]' + +assert_equal NilClass.to_s, %q{ + r = false; 1.times{|&b| r = b}; r.class +} + +assert_equal 'ok', %q{ + class C + define_method(:foo) do |arg, &block| + if block then block.call else arg end + end + end + C.new.foo("ng") {"ok"} +}, '[ruby-talk:266422]' + +assert_equal 'ok', %q{ + class C + define_method(:xyz) do |o, k, &block| + block.call(o, k) + end + end + C.new.xyz("o","k") {|o, k| o+k} +}, '[ruby-core:20544]' + +assert_equal 'ok', %q{ + class C + define_method(:xyz) do |*args, &block| + block.call(*args) + end + end + C.new.xyz("o","k") {|*args| args.join("")} +}, '[ruby-core:20544]' + +assert_equal 'ok', %q{ + STDERR.reopen(STDOUT) + class C + define_method(:foo) do |&block| + block.call if block + end + result = "ng" + new.foo() {result = "ok"} + result + end +} + +assert_equal "ok", %q{ + class Bar + def bar; :ok; end + end + def foo + yield(Bar.new) if block_given? + end + foo(&:bar) +}, '[ruby-core:14279]' + +assert_normal_exit %q{ + class Controller + def respond_to(&block) + responder = Responder.new + block.call(responder) + responder.respond + end + def test_for_bug + respond_to{|format| + format.js{ + puts "in test" + render{|obj| + puts obj + } + } + } + end + def render(&block) + puts "in render" + end + end + + class Responder + def method_missing(symbol, &block) + puts "enter method_missing" + @response = Proc.new{ + puts 'in method missing' + block.call + } + puts "leave method_missing" + end + def respond + @response.call + end + end + t = Controller.new + t.test_for_bug +}, '[ruby-core:14395]' + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_class.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_class.rb new file mode 100644 index 0000000..1c49b83 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_class.rb @@ -0,0 +1,132 @@ +# class +assert_equal 'true', %q( class C; end + Object.const_defined?(:C) ) +assert_equal 'Class', %q( class C; end + C.class ) +assert_equal 'C', %q( class C; end + C.name ) +assert_equal 'C', %q( class C; end + C.new.class ) +assert_equal 'C', %q( class C; end + C.new.class.name ) +assert_equal 'Class', %q( class C; end + C.new.class.class ) + +# inherited class +assert_equal 'true', %q( class A; end + class C < A; end + Object.const_defined?(:C) ) +assert_equal 'Class', %q( class A; end + class C < A; end + C.class ) +assert_equal 'C', %q( class A; end + class C < A; end + C.name ) +assert_equal 'C', %q( class A; end + class C < A; end + C.new.class ) +assert_equal 'C', %q( class A; end + class C < A; end + C.new.class.name ) +assert_equal 'Class', %q( class A; end + class C < A; end + C.new.class.class ) + +# module +assert_equal 'true', %q( module M; end + Object.const_defined?(:M) ) +assert_equal 'Module', %q( module M; end + M.class ) +assert_equal 'M', %q( module M; end + M.name ) +assert_equal 'C', %q( module M; end + class C; include M; end + C.new.class ) + +# nested class +assert_equal 'A::B', %q( class A; end + class A::B; end + A::B ) +assert_equal 'A::B', %q( class A; end + class A::B; end + A::B.name ) +assert_equal 'A::B', %q( class A; end + class A::B; end + A::B.new.class ) +assert_equal 'Class', %q( class A; end + class A::B; end + A::B.new.class.class ) +assert_equal 'A::B::C', %q( class A; end + class A::B; end + class A::B::C; end + A::B::C ) +assert_equal 'A::B::C', %q( class A; end + class A::B; end + class A::B::C; end + A::B::C.name ) +assert_equal 'Class', %q( class A; end + class A::B; end + class A::B::C; end + A::B::C.class ) +assert_equal 'A::B::C', %q( class A; end + class A::B; end + class A::B::C; end + A::B::C.new.class ) +assert_equal 'Class', %q( class A; end + class A::B; end + class A::B::C; end + A::B::C.new.class.class ) +assert_equal 'A::B2', %q( class A; end + class A::B; end + class A::B2 < A::B; end + A::B2 ) +assert_equal 'Class', %q( class A; end + class A::B; end + class A::B2 < A::B; end + A::B2.class ) + +# reopen +assert_equal 'true', %q( class C; end; c1 = ::C + class C; end; c2 = ::C + c1.equal?(c2) ) +assert_equal '1', %q( class C; end + class A; end + begin class C < A; end; rescue TypeError; 1 end ) +assert_equal '1', %q( class C; end + begin module C; end; rescue TypeError; 1 end ) +assert_equal '1', %q( C = 1 # [yarv-dev:782] + begin class C; end; rescue TypeError; 1 end ) +assert_equal '1', %q( C = 1 # [yarv-dev:800] + begin module C; end; rescue TypeError; 1 end ) + +# colon2, colon3 +assert_equal '1', %q( class A; end; A::C = 1; A::C ) +assert_equal '1', %q( A = 7; begin A::C = 7; rescue TypeError; 1 end ) +assert_equal '1', %q( begin 7::C = 7; rescue TypeError; 1 end ) +assert_equal 'C', %q( class A; class ::C; end end; C ) +assert_equal 'Class', %q( class A; class ::C; end end; C.class ) +assert_equal 'OK', %q( class A; ::C = "OK"; end; C ) +assert_equal 'String', %q( class A; ::C = "OK"; end; C.class ) + +# class/module dup +assert_equal 'Class', %q( class C; end; C.dup.class ) +assert_equal 'Module', %q( module M; end; M.dup.class ) + + +assert_equal "ok", %q{ + module Foo + end + + begin + def foo(&b) + Foo.module_eval &b + end + foo{ + def bar + end + } + bar() + rescue NameError + :ok + end +}, '[ruby-core:14378]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_eval.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_eval.rb new file mode 100644 index 0000000..6dc2346 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_eval.rb @@ -0,0 +1,301 @@ +assert_equal %q{ok}, %q{ + def m + a = :ok + $b = binding + end + m + eval('a', $b) +} +assert_equal %q{[:ok, :ok2]}, %q{ + def m + a = :ok + $b = binding + end + m + eval('b = :ok2', $b) + eval('[a, b]', $b) +} +assert_equal %q{[nil, 1]}, %q{ + $ans = [] + def m + $b = binding + end + m + $ans << eval(%q{ + $ans << eval(%q{ + a + }, $b) + a = 1 + }, $b) + $ans +} +assert_equal %q{C}, %q{ + Const = :top + class C + Const = :C + def m + binding + end + end + eval('Const', C.new.m) +} +assert_equal %q{top}, %q{ + Const = :top + a = 1 + class C + Const = :C + def m + eval('Const', TOPLEVEL_BINDING) + end + end + C.new.m +} +assert_equal %q{:ok +ok}, %q{ + class C + $b = binding + end + eval %q{ + def m + :ok + end + }, $b + p C.new.m +} +assert_equal %q{ok}, %q{ + b = proc{ + a = :ok + binding + }.call + a = :ng + eval("a", b) +} +assert_equal %q{C}, %q{ + class C + def foo + binding + end + end + C.new.foo.eval("self.class.to_s") +} +assert_equal %q{1}, %q{ + eval('1') +} +assert_equal %q{1}, %q{ + eval('a=1; a') +} +assert_equal %q{1}, %q{ + a = 1 + eval('a') +} +assert_equal %q{ok}, %q{ + __send__ :eval, %{ + :ok + } +} +assert_equal %q{ok}, %q{ + 1.__send__ :instance_eval, %{ + :ok + } +} +assert_equal %q{1}, %q{ + 1.instance_eval{ + self + } +} +assert_equal %q{foo}, %q{ + 'foo'.instance_eval{ + self + } +} +assert_equal %q{1}, %q{ + class Fixnum + Const = 1 + end + 1.instance_eval %{ + Const + } +} +assert_equal %q{C}, %q{ + Const = :top + class C + Const = :C + end + C.module_eval{ + Const + } +} +assert_equal %q{C}, %q{ + Const = :top + class C + Const = :C + end + C.class_eval %{ + def m + Const + end + } + C.new.m +} +assert_equal %q{C}, %q{ + Const = :top + class C + Const = :C + end + C.class_eval{ + def m + Const + end + } + C.new.m +} +assert_equal %q{[:top, :C, :top, :C]}, %q{ + Const = :top + class C + Const = :C + end + $nest = false + $ans = [] + def m + $ans << Const + C.module_eval %{ + $ans << Const + Boo = false unless defined? Boo + unless $nest + $nest = true + m + end + } + end + m + $ans +} +assert_equal %q{[10, main]}, %q{ + $nested = false + $ans = [] + $pr = proc{ + $ans << self + unless $nested + $nested = true + $pr.call + end + } + class C + def initialize &b + 10.instance_eval(&b) + end + end + C.new(&$pr) + $ans +} + +%w[break next redo].each do |keyword| + assert_match %r"Can't escape from eval with #{keyword}\z", %{ + begin + eval "0 rescue #{keyword}" + rescue SyntaxError => e + e.message + end + }, '[ruby-dev:31372]' +end + +assert_normal_exit %q{ + STDERR.reopen(STDOUT) + class Foo + def self.add_method + class_eval("def some-bad-name; puts 'hello' unless @some_variable.some_function(''); end") + end + end + Foo.add_method +}, '[ruby-core:14556] reported by Frederick Cheung' + +assert_equal 'ok', %q{ + class Module + def my_module_eval(&block) + module_eval(&block) + end + end + class String + Integer.my_module_eval do + def hoge; end + end + end + if Integer.instance_methods(false).map{|m|m.to_sym}.include?(:hoge) && + !String.instance_methods(false).map{|m|m.to_sym}.include?(:hoge) + :ok + else + :ng + end +}, "[ruby-dev:34236]" + +assert_equal 'ok', %q{ + begin + eval("class nil::Foo; end") + :ng + rescue Exception + :ok + end +} + +assert_equal 'ok', %q{ + begin + 0.instance_eval { def m() :m end } + 1.m + :ng + rescue Exception + :ok + end +}, '[ruby-dev:34579]' + +assert_equal 'ok', %q{ + begin + 12.instance_eval { @@a } + rescue NameError + :ok + end +}, '[ruby-core:16794]' + +assert_equal 'ok', %q{ + begin + 12.instance_exec { @@a } + rescue NameError + :ok + end +}, '[ruby-core:16794]' + +assert_equal 'ok', %q{ + begin + nil.instance_eval { + def a() :a end + } + rescue TypeError + :ok + end +}, '[ruby-core:16796]' + +assert_equal 'ok', %q{ + begin + nil.instance_exec { + def a() :a end + } + rescue TypeError + :ok + end +}, '[ruby-core:16796]' + +assert_normal_exit %q{ + eval("", method(:proc).call {}.binding) +} + +assert_equal "(eval):1:in `block in
': ", %q{ + b = binding + 10.times{ + eval('', b) + } + begin + eval('1.times{raise}', b) + rescue => e + e.message + end +}, ' [ruby-dev:35392]' + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_exception.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_exception.rb new file mode 100644 index 0000000..bd3d02a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_exception.rb @@ -0,0 +1,404 @@ +assert_equal %q{2}, %q{ + begin + 1+1 + ensure + 2+2 + end +} +assert_equal %q{4}, %q{ + begin + 1+1 + begin + 2+2 + ensure + 3+3 + end + ensure + 4+4 + end +} +assert_equal %q{4}, %q{ + begin + 1+1 + begin + 2+2 + ensure + 3+3 + end + ensure + 4+4 + begin + 5+5 + ensure + 6+6 + end + end +} +assert_equal %q{NilClass}, %q{ + a = nil + 1.times{|e| + begin + rescue => err + end + a = err.class + } + a +} +assert_equal %q{RuntimeError}, %q{ + a = nil + 1.times{|e| + begin + raise + rescue => err + end + a = err.class + } + a +} +assert_equal %q{}, %q{ + $! +} +assert_equal %q{FOO}, %q{ + begin + raise "FOO" + rescue + $! + end +} +assert_equal %q{FOO}, %q{ + def m + $! + end + begin + raise "FOO" + rescue + m() + end +} +assert_equal %q{[#, #]}, %q{ + $ans = [] + def m + $! + end + begin + raise "FOO" + rescue + begin + raise "BAR" + rescue + $ans << m() + end + $ans << m() + end + $ans +} +assert_equal %q{[#, #]}, %q{ + $ans = [] + def m + $! + end + + begin + begin + raise "FOO" + ensure + $ans << m() + end + rescue + $ans << m() + end +} +assert_equal %q{[nil]}, %q{ + $ans = [] + def m + $! + end + def m2 + 1.times{ + begin + return + ensure + $ans << m + end + } + end + m2 + $ans +} +assert_equal %q{ok}, %q{ + begin + raise + rescue + :ok + end +} +assert_equal %q{ok}, %q{ + begin + raise + rescue + :ok + ensure + :ng + end +} +assert_equal %q{RuntimeError}, %q{ + begin + raise + rescue => e + e.class + end +} +assert_equal %q{ng}, %q{ + begin + raise + rescue StandardError + :ng + rescue Exception + :ok + end +} +assert_equal %q{c}, %q{ + begin + begin + raise "a" + rescue + raise "b" + ensure + raise "c" + end + rescue => e + e.message + end +} +assert_equal %q{33}, %q{ + def m a, b + a + b + end + m(1, begin + raise + rescue + 2 + end) + + m(10, begin + raise + rescue + 20 + ensure + 30 + end) +} +assert_equal %q{3}, %q{ + def m a, b + a + b + end + m(begin + raise + rescue + 1 + end, + begin + raise + rescue + 2 + end) +} +assert_equal %q{ok3}, %q{ + class E1 < Exception + end + + def m + yield + end + + begin + begin + begin + m{ + raise + } + rescue E1 + :ok2 + ensure + end + rescue + :ok3 + ensure + end + rescue E1 + :ok + ensure + end +} +assert_equal %q{7}, %q{ + $i = 0 + def m + iter{ + begin + $i += 1 + begin + $i += 2 + break + ensure + + end + ensure + $i += 4 + end + $i = 0 + } + end + + def iter + yield + end + m + $i +} +assert_equal %q{10}, %q{ + $i = 0 + def m + begin + $i += 1 + begin + $i += 2 + return + ensure + $i += 3 + end + ensure + $i += 4 + end + p :end + end + m + $i +} +assert_equal %q{1}, %q{ + begin + 1 + rescue + 2 + end +} +assert_equal %q{4}, %q{ + begin + 1 + begin + 2 + rescue + 3 + end + 4 + rescue + 5 + end +} +assert_equal %q{3}, %q{ + begin + 1 + rescue + 2 + else + 3 + end +} +assert_equal %q{2}, %q{ + begin + 1+1 + rescue + 2+2 + ensure + 3+3 + end + } +assert_equal %q{2}, %q{ + begin + 1+1 + rescue + 2+2 + ensure + 3+3 + end + } +assert_equal %q{6}, %q{ + begin + 1+1 + rescue + 2+2 + else + 3+3 + ensure + 4+4 + end + } +assert_equal %q{12}, %q{ + begin + 1+1 + begin + 2+2 + rescue + 3+3 + else + 4+4 + end + rescue + 5+5 + else + 6+6 + ensure + 7+7 + end + } +assert_equal %q{ok}, %q{ # + proc{ + begin + raise + break + rescue + :ok + end + }.call +} +assert_equal %q{}, %q{ + proc do + begin + raise StandardError + redo + rescue StandardError + end + end.call +} + +## +assert_match /undefined method `foo\'/, %q{ + STDERR.reopen(STDOUT) + class C + def inspect + bar {} + end + + def bar + raise + ensure + end + end + C.new.foo +}, "[ruby-dev:31407]" + +assert_equal 'nil', %q{ + doit = false + exc = nil + t = Thread.new { + begin + doit = true + sleep 10 + ensure + exc = $! + end + } + Thread.pass until doit + t.kill + t.join + exc.inspect +}, '[ruby-dev:32608]' + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_finalizer.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_finalizer.rb new file mode 100644 index 0000000..22a16b1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_finalizer.rb @@ -0,0 +1,8 @@ +assert_normal_exit %q{ +a1,a2,b1,b2=Array.new(4){""} +ObjectSpace.define_finalizer(b2,proc{}) +ObjectSpace.define_finalizer(b1,proc{b1.inspect}) + +ObjectSpace.define_finalizer(a2,proc{a1.inspect}) +ObjectSpace.define_finalizer(a1,proc{}) +}, '[ruby-dev:35778]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_flip.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_flip.rb new file mode 100644 index 0000000..ff19486 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_flip.rb @@ -0,0 +1 @@ +assert_equal %q{E}, %q{$_ = "E"; eval("nil if true..~/^E/",nil,"-e"); $_} diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_flow.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_flow.rb new file mode 100644 index 0000000..9964dfb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_flow.rb @@ -0,0 +1,491 @@ +assert_equal %q{[1, 2, 4, 5, 6, 7, 8]}, %q{$a = []; begin; ; $a << 1 + [1,2].each{; $a << 2 + break; $a << 3 + }; $a << 4 + begin; $a << 5 + ensure; $a << 6 + end; $a << 7 +; $a << 8 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 6, 7, 8]}, %q{$a = []; begin; ; $a << 1 + begin; $a << 2 + [1,2].each do; $a << 3 + break; $a << 4 + end; $a << 5 + ensure; $a << 6 + end; $a << 7 +; $a << 8 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{ok}, %q{ + ["a"].inject("ng"){|x,y| + break :ok + } +} +assert_equal %q{ok}, %q{ + unless ''.respond_to? :lines + class String + def lines + self + end + end + end + + ('a').lines.map{|e| + break :ok + } +} +assert_equal %q{[1, 2, 4, 5]}, %q{$a = []; begin; ; $a << 1 + ["a"].inject("ng"){|x,y|; $a << 2 + break :ok; $a << 3 + }; $a << 4 +; $a << 5 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 4, 5]}, %q{$a = []; begin; ; $a << 1 + ('a'..'b').map{|e|; $a << 2 + break :ok; $a << 3 + }; $a << 4 +; $a << 5 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 7, 8]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + break; $a << 4 + ensure; $a << 5 + end; $a << 6 + end; $a << 7 +; $a << 8 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 6, 9, 10]}, %q{$a = []; begin; ; $a << 1 + i=0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + begin; $a << 5 + ensure; $a << 6 + break; $a << 7 + end; $a << 8 + end; $a << 9 +; $a << 10 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 7, 10, 11]}, %q{$a = []; begin; ; $a << 1 + i=0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + begin; $a << 5 + raise; $a << 6 + ensure; $a << 7 + break; $a << 8 + end; $a << 9 + end; $a << 10 +; $a << 11 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 7, 10, 11]}, %q{$a = []; begin; ; $a << 1 + i=0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + begin; $a << 5 + raise; $a << 6 + rescue; $a << 7 + break; $a << 8 + end; $a << 9 + end; $a << 10 +; $a << 11 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 8, 9]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + raise StandardError; $a << 4 + ensure; $a << 5 + break; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 8, 9]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + raise StandardError; $a << 4 + rescue; $a << 5 + break; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 6, 8, 10, 11]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + begin; $a << 4 + break; $a << 5 + ensure; $a << 6 + end; $a << 7 + ensure; $a << 8 + end; $a << 9 + end; $a << 10 +; $a << 11 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 3, 4, 5, 6, 7, 8, 10, 13, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15]}, %q{$a = []; begin; ; $a << 1 + i = 0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + j = 0; $a << 5 + while j<3; $a << 6 + j+=1; $a << 7 + begin; $a << 8 + raise; $a << 9 + rescue; $a << 10 + break; $a << 11 + end; $a << 12 + end; $a << 13 + end; $a << 14 +; $a << 15 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 16, 17]}, %q{$a = []; begin; ; $a << 1 + i = 0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + j = 0; $a << 5 + while j<3; $a << 6 + j+=1; $a << 7 + 1.times{; $a << 8 + begin; $a << 9 + raise; $a << 10 + rescue; $a << 11 + break; $a << 12 + end; $a << 13 + }; $a << 14 + end; $a << 15 + end; $a << 16 +; $a << 17 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 3, 4, 5, 6, 7, 8, 10, 13, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15]}, %q{$a = []; begin; ; $a << 1 + i = 0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + j = 0; $a << 5 + while j<3; $a << 6 + j+=1; $a << 7 + begin; $a << 8 + raise; $a << 9 + ensure; $a << 10 + break; $a << 11 + end; $a << 12 + end; $a << 13 + end; $a << 14 +; $a << 15 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 3, 4, 5, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 6, 7, 8, 9, 11, 14, 15, 16, 17]}, %q{$a = []; begin; ; $a << 1 + i = 0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + j = 0; $a << 5 + while j<3; $a << 6 + j+=1; $a << 7 + 1.times{; $a << 8 + begin; $a << 9 + raise; $a << 10 + ensure; $a << 11 + break; $a << 12 + end; $a << 13 + }; $a << 14 + end; $a << 15 + end; $a << 16 +; $a << 17 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 8, 9]}, %q{$a = []; begin; ; $a << 1 + while true; $a << 2 + begin; $a << 3 + break; $a << 4 + ensure; $a << 5 + break; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 99]}, %q{$a = []; begin; ; $a << 1 + while true; $a << 2 + begin; $a << 3 + break; $a << 4 + ensure; $a << 5 + raise; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 6, 8, 9, 10, 11]}, %q{$a = []; begin; ; $a << 1 + begin; $a << 2 + [1,2].each do; $a << 3 + begin; $a << 4 + break; $a << 5 + ensure; $a << 6 + end; $a << 7 + end; $a << 8 + ensure; $a << 9 + end; $a << 10 +; $a << 11 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 4, 99]}, %q{$a = []; begin; ; $a << 1 + begin; $a << 2 + raise StandardError; $a << 3 + ensure; $a << 4 + end; $a << 5 +; $a << 6 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4]}, %q{$a = []; begin; ; $a << 1 + begin; $a << 2 + ensure; $a << 3 + end ; $a << 4 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 5, 99]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + break; $a << 4 + ensure; $a << 5 + raise StandardError; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{3}, %q{ + def m a, b + a + b + end + m(1, + while true + break 2 + end + ) +} +assert_equal %q{4}, %q{ + def m a, b + a + b + end + m(1, + (i=0; while i<2 + i+=1 + class C + next 2 + end + end; 3) + ) +} +assert_equal %q{34}, %q{ + def m a, b + a+b + end + m(1, 1.times{break 3}) + + m(10, (1.times{next 3}; 20)) +} +assert_equal %q{[1, 2, 3, 6, 7]}, %q{$a = []; begin; ; $a << 1 + 3.times{; $a << 2 + class C; $a << 3 + break; $a << 4 + end; $a << 5 + }; $a << 6 +; $a << 7 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 8, 9]}, %q{$a = []; begin; ; $a << 1 + 3.times{; $a << 2 + class A; $a << 3 + class B; $a << 4 + break; $a << 5 + end; $a << 6 + end; $a << 7 + }; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 2, 3, 2, 3, 6, 7]}, %q{$a = []; begin; ; $a << 1 + 3.times{; $a << 2 + class C; $a << 3 + next; $a << 4 + end; $a << 5 + }; $a << 6 +; $a << 7 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 8, 9]}, %q{$a = []; begin; ; $a << 1 + 3.times{; $a << 2 + class C; $a << 3 + class D; $a << 4 + next; $a << 5 + end; $a << 6 + end; $a << 7 + }; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 6, 7]}, %q{$a = []; begin; ; $a << 1 + while true; $a << 2 + class C; $a << 3 + break; $a << 4 + end; $a << 5 + end; $a << 6 +; $a << 7 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 8, 9]}, %q{$a = []; begin; ; $a << 1 + while true; $a << 2 + class C; $a << 3 + class D; $a << 4 + break; $a << 5 + end; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 8, 9]}, %q{$a = []; begin; ; $a << 1 + i=0; $a << 2 + while i<3; $a << 3 + i+=1; $a << 4 + class C; $a << 5 + next 10; $a << 6 + end; $a << 7 + end; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{1}, %q{ + 1.times{ + while true + class C + begin + break + ensure + break + end + end + end + } +} +assert_equal %q{[1, 2, 3, 5, 2, 3, 5, 7, 8]}, %q{$a = []; begin; ; $a << 1 + [1,2].each do; $a << 2 + begin; $a << 3 + next; $a << 4 + ensure; $a << 5 + end; $a << 6 + end; $a << 7 +; $a << 8 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 2, 6, 3, 5, 7, 8]}, %q{$a = []; begin; ; $a << 1 + o = "test"; $a << 2 + def o.test(a); $a << 3 + return a; $a << 4 + ensure; $a << 5 + end; $a << 6 + o.test(123); $a << 7 +; $a << 8 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 4, 7, 5, 8, 9]}, %q{$a = []; begin; ; $a << 1 + def m1 *args; $a << 2 + ; $a << 3 + end; $a << 4 + def m2; $a << 5 + m1(:a, :b, (return 1; :c)); $a << 6 + end; $a << 7 + m2; $a << 8 +; $a << 9 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 8, 2, 3, 4, 5, 9, 10]}, %q{$a = []; begin; ; $a << 1 + def m(); $a << 2 + begin; $a << 3 + 2; $a << 4 + ensure; $a << 5 + return 3; $a << 6 + end; $a << 7 + end; $a << 8 + m; $a << 9 +; $a << 10 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 3, 11, 4, 5, 6, 7, 12, 13]}, %q{$a = []; begin; ; $a << 1 + def m2; $a << 2 + end; $a << 3 + def m(); $a << 4 + m2(begin; $a << 5 + 2; $a << 6 + ensure; $a << 7 + return 3; $a << 8 + end); $a << 9 + 4; $a << 10 + end; $a << 11 + m(); $a << 12 +; $a << 13 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[1, 16, 2, 3, 4, 5, 6, 7, 10, 11, 17, 18]}, %q{$a = []; begin; ; $a << 1 + def m; $a << 2 + 1; $a << 3 + 1.times{; $a << 4 + 2; $a << 5 + begin; $a << 6 + 3; $a << 7 + return; $a << 8 + 4; $a << 9 + ensure; $a << 10 + 5; $a << 11 + end; $a << 12 + 6; $a << 13 + }; $a << 14 + 7; $a << 15 + end; $a << 16 + m(); $a << 17 +; $a << 18 +; rescue Exception; $a << 99; end; $a} +assert_equal %q{[:ok, :ok2, :last]}, %q{ + a = [] + i = 0 + begin + while i < 1 + i+=1 + begin + begin + next + ensure + a << :ok + end + ensure + a << :ok2 + end + end + ensure + a << :last + end + a +} +assert_equal %q{[:ok, :ok2, :last]}, %q{ + a = [] + i = 0 + begin + while i < 1 + i+=1 + begin + begin + break + ensure + a << :ok + end + ensure + a << :ok2 + end + end + ensure + a << :last + end + a +} +assert_equal %q{[:ok, :ok2, :last]}, %q{ + a = [] + i = 0 + begin + while i < 1 + if i>0 + break + end + i+=1 + begin + begin + redo + ensure + a << :ok + end + ensure + a << :ok2 + end + end + ensure + a << :last + end + a + } diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_fork.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_fork.rb new file mode 100644 index 0000000..743c22c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_fork.rb @@ -0,0 +1,10 @@ +assert_equal '0', %q{ + begin + GC.stress = true + pid = fork {} + Process.wait pid + $?.to_i + rescue NotImplementedError + 0 + end +}, '[ruby-dev:32404]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_io.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_io.rb new file mode 100644 index 0000000..75570cd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_io.rb @@ -0,0 +1,94 @@ +assert_finish 5, %q{ + r, w = IO.pipe + t1 = Thread.new { r.sysread(1) } + t2 = Thread.new { r.sysread(1) } + sleep 0.1 + w.write "a" + sleep 0.1 + w.write "a" +}, '[ruby-dev:31866]' + +assert_finish 10, %q{ + begin + require "io/nonblock" + r, w = IO.pipe + w.nonblock = true + w.write_nonblock("a" * 100000) + w.nonblock = false + t1 = Thread.new { w.write("b" * 4096) } + t2 = Thread.new { w.write("c" * 4096) } + sleep 0.5 + r.sysread(4096).length + sleep 0.5 + r.sysread(4096).length + t1.join + t2.join + rescue LoadError + end +}, '[ruby-dev:32566]' + +assert_finish 1, %q{ + r, w = IO.pipe + Thread.new { + w << "ab" + sleep 0.1 + w << "ab" + } + r.gets("abab") +} + +assert_equal 'ok', %q{ + require 'tmpdir' + begin + tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}" + rw = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL) + rescue Errno::EEXIST + retry + end + save = STDIN.dup + STDIN.reopen(rw) + STDIN.reopen(save) + rw.close + File.unlink(tmpname) + :ok +} + +assert_equal 'ok', %q{ + require 'tmpdir' + begin + tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}" + rw = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL) + rescue Errno::EEXIST + retry + end + save = STDIN.dup + STDIN.reopen(rw) + STDIN.print "a" + STDIN.reopen(save) + rw.close + File.unlink(tmpname) + :ok +} + +assert_normal_exit %q{ + ARGF.set_encoding "foo" +} + +50.times do + assert_normal_exit %q{ + at_exit { p :foo } + + megacontent = "abc" * 12345678 + #File.open("megasrc", "w") {|f| f << megacontent } + + Thread.new { sleep rand*0.2; Process.kill(:INT, $$) } + + r1, w1 = IO.pipe + r2, w2 = IO.pipe + t1 = Thread.new { w1 << megacontent; w1.close } + t2 = Thread.new { r2.read } + IO.copy_stream(r1, w2) rescue nil + r2.close; w2.close + r1.close; w1.close + }, '', ["INT"] or break +end diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_jump.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_jump.rb new file mode 100644 index 0000000..7746733 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_jump.rb @@ -0,0 +1,261 @@ +assert_equal %q{ok}, %q{ + def m + :ng1 + mm{ + yield + } + :ng2 + end + + def mm + :ng3 + yield + :ng4 + end + + m{ + break :ok + } +} +assert_equal %q{ok}, %q{ + 3.times{ + break :ok + } +} +assert_equal %q{}, %q{ + catch(:foo){ + throw :foo + } +} +assert_equal %q{false}, %q{ + catch(:foo){ + throw :foo, false + } +} +assert_equal %q{}, %q{ + catch(:foo){ + throw :foo, nil + } +} +assert_equal %q{ok}, %q{ + catch(:foo){ + throw :foo, :ok + } +} +assert_equal %q{}, %q{ + catch(:foo){ + 1.times{ + throw :foo + } + } +} +assert_equal %q{ok}, %q{ + catch(:foo){ + 1.times{ + throw :foo, :ok + } + } +} +assert_equal %q{ok}, %q{ + catch(:foo){ + catch(:bar){ + throw :foo, :ok + } + :ng + } +} +assert_equal %q{ok}, %q{ + catch(:foo){ + catch(:bar){ + 1.times{ + throw :foo, :ok + } + } + :ng + } +} +assert_equal %q{2}, %q{ + module Enumerable + def all_? + self.each{|e| + unless yield(e) + return false + end + } + true + end + end + + xxx = 0 + [1,2].each{|bi| + [3,4].each{|bj| + [true, nil, true].all_?{|be| be} + break + } + xxx += 1 + } + xxx +} +assert_equal %q{ok}, %q{ + def m + yield + end + + m{ + begin + ensure + break :ok + end + } +} +assert_equal %q{ok}, %q{ + def m + yield + :ok + end + i=0 + m{ + if i>10 + i*i + else + i+=1 + next + end + } +} +assert_equal %q{ok}, %q{ + def m + yield + end + + m{ + next :ok + } +} +assert_equal %q{131}, %q{ + def m + yield + 10 + end + i=0 + m{ + if i>10 + i*i + else + i+=1 + redo + end + } +} +assert_equal %q{ok}, %q{ +begin + eval %q{ + 1.times{ + retry + } + } +rescue SyntaxError + :ok +end +} +assert_equal %q{3}, %q{ + def m + return 3 + end + m +} +assert_equal %q{ok}, %q{ + def m + :ng1 + mm{ + return :ok + } + :ng2 + end + + def mm + :ng3 + yield + :ng4 + end + m +} +assert_equal %q{100}, %q{ + $i = 0 + def m + begin + iter{ + return + } + ensure + $i = 100 + end + end + + def iter + yield + end + m + $i +} +assert_equal %q{ok}, %q{ + def m + begin + raise + rescue + return :ok + end + :ng + end + m +} +assert_equal %q{1}, %q{ + def m + begin + raise + rescue + return 1 + end + end + + m +} +assert_equal %q{1}, %q{ + def m + begin + # + ensure + return 1 + end + end + + m +} +assert_equal 'ok', %q{ + begin + catch {|t| throw t, :ok } + rescue ArgumentError + :ng + end +}, '[ruby-dev:31609]' + +assert_equal "1", %q{ + catch do |t| + begin + throw t, 1 + 2 + ensure + 3 + end + end +}, "[ruby-dev:31698]" + +assert_normal_exit %q{ + f = 0 + 1.times do + begin + f += 1 + ensure + redo unless f > 2 + end + end +} diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_literal.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_literal.rb new file mode 100644 index 0000000..8480c65 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_literal.rb @@ -0,0 +1,194 @@ +# empty program +assert_equal '', '' +assert_equal '', ' ' +assert_equal '', "\n" + +# special const +assert_equal 'true', 'true' +assert_equal 'TrueClass', 'true.class' +assert_equal 'false', 'false' +assert_equal 'FalseClass', 'false.class' +assert_equal '', 'nil' +assert_equal 'nil', 'nil.inspect' +assert_equal 'NilClass', 'nil.class' +assert_equal 'sym', ':sym' +assert_equal ':sym', ':sym.inspect' +assert_equal 'Symbol', ':sym.class' +assert_equal '1234', '1234' +assert_equal 'Fixnum', '1234.class' +assert_equal '1234', '1_2_3_4' +assert_equal 'Fixnum', '1_2_3_4.class' +assert_equal '18', '0x12' +assert_equal 'Fixnum', '0x12.class' +assert_equal '15', '0o17' +assert_equal 'Fixnum', '0o17.class' +assert_equal '5', '0b101' +assert_equal 'Fixnum', '0b101.class' +assert_equal '123456789012345678901234567890', '123456789012345678901234567890' +assert_equal 'Bignum', '123456789012345678901234567890.class' +assert_equal '2.0', '2.0' +assert_equal 'Float', '1.3.class' + +# self +assert_equal 'main', 'self' +assert_equal 'Object', 'self.class' + +# string literal +assert_equal 'a', '?a' +assert_equal 'String', '?a.class' +assert_equal 'A', '?A' +assert_equal 'String', '?A.class' +assert_equal "\n", '?\n' +assert_equal 'String', '?\n.class' +assert_equal ' ', '?\ ' +assert_equal 'String', '?\ .class' +assert_equal 'string', "'string'" +assert_equal 'string', '"string"' +assert_equal 'string', '%(string)' +assert_equal 'string', '%q(string)' +assert_equal 'string', '%Q(string)' +assert_equal 'string string', '"string string"' +assert_equal ' ', '" "' +assert_equal "\0", '"\0"' +assert_equal "\1", '"\1"' +assert_equal "3", '"\x33"' +assert_equal "\n", '"\n"' + +# dynamic string literal +assert_equal '2', '"#{1 + 1}"' +assert_equal '16', '"#{2 ** 4}"' +assert_equal 'string', 's = "string"; "#{s}"' + +# dynamic symbol literal +assert_equal 'a3c', ':"a#{1+2}c"' +assert_equal ':a3c', ':"a#{1+2}c".inspect' +assert_equal 'Symbol', ':"a#{1+2}c".class' + +# xstring +assert_equal "foo\n", %q(`echo foo`) +assert_equal "foo\n", %q(s = "foo"; `echo #{s}`) + +# regexp +assert_equal '', '//.source' +assert_equal 'Regexp', '//.class' +assert_equal '0', '// =~ "a"' +assert_equal '0', '// =~ ""' +assert_equal 'a', '/a/.source' +assert_equal 'Regexp', '/a/.class' +assert_equal '0', '/a/ =~ "a"' +assert_equal '0', '/test/ =~ "test"' +assert_equal '', '/test/ =~ "tes"' +assert_equal '0', 're = /test/; re =~ "test"' +assert_equal '0', 'str = "test"; /test/ =~ str' +assert_equal '0', 're = /test/; str = "test"; re =~ str' + +# dynacmi regexp +assert_equal 'regexp', %q(/re#{'ge'}xp/.source) +assert_equal 'Regexp', %q(/re#{'ge'}xp/.class) + +# array +assert_equal 'Array', '[].class' +assert_equal '0', '[].size' +assert_equal '0', '[].length' +assert_equal '[]', '[].inspect' +assert_equal 'Array', '[0].class' +assert_equal '1', '[3].size' +assert_equal '[3]', '[3].inspect' +assert_equal '3', 'a = [3]; a[0]' +assert_equal 'Array', '[1,2].class' +assert_equal '2', '[1,2].size' +assert_equal '[1, 2]', '[1,2].inspect' +assert_equal 'Array', '[1,2,3,4,5].class' +assert_equal '5', '[1,2,3,4,5].size' +assert_equal '[1, 2, 3, 4, 5]', '[1,2,3,4,5].inspect' +assert_equal '1', 'a = [1,2]; a[0]' +assert_equal '2', 'a = [1,2]; a[1]' +assert_equal 'Array', 'a = [1 + 2, 3 + 4, 5 + 6]; a.class' +assert_equal '[3, 7, 11]', 'a = [1 + 2, 3 + 4, 5 + 6]; a.inspect' +assert_equal '7', 'a = [1 + 2, 3 + 4, 5 + 6]; a[1]' +assert_equal '1', '([0][0] += 1)' +assert_equal '1', '([2][0] -= 1)' +assert_equal 'Array', 'a = [obj = Object.new]; a.class' +assert_equal '1', 'a = [obj = Object.new]; a.size' +assert_equal 'true', 'a = [obj = Object.new]; a[0] == obj' +assert_equal '5', 'a = [1,2,3]; a[1] = 5; a[1]' +assert_equal 'bar', '[*:foo];:bar' +assert_equal '[1, 2]', 'def nil.to_a; [2]; end; [1, *nil]' +assert_equal '[1, 2]', 'def nil.to_a; [1, 2]; end; [*nil]' +assert_equal '[0, 1, {2=>3}]', '[0, *[1], 2=>3]', "[ruby-dev:31592]" + + +# hash +assert_equal 'Hash', '{}.class' +assert_equal '{}', '{}.inspect' +assert_equal 'Hash', '{1=>2}.class' +assert_equal '{1=>2}', '{1=>2}.inspect' +assert_equal '2', 'h = {1 => 2}; h[1]' +assert_equal '0', 'h = {1 => 2}; h.delete(1); h.size' +assert_equal '', 'h = {1 => 2}; h.delete(1); h[1]' +assert_equal '2', 'h = {"string" => "literal", "goto" => "hell"}; h.size' +assert_equal 'literal', 'h = {"string"=>"literal", "goto"=>"hell"}; h["string"]' +assert_equal 'hell', 'h = {"string"=>"literal", "goto"=>"hell"}; h["goto"]' + +# range +assert_equal 'Range', '(1..2).class' +assert_equal '1..2', '(1..2).inspect' +assert_equal '1', '(1..2).begin' +assert_equal '2', '(1..2).end' +assert_equal 'false', '(1..2).exclude_end?' +assert_equal 'Range', 'r = 1..2; r.class' +assert_equal '1..2', 'r = 1..2; r.inspect' +assert_equal '1', 'r = 1..2; r.begin' +assert_equal '2', 'r = 1..2; r.end' +assert_equal 'false', 'r = 1..2; r.exclude_end?' +assert_equal 'Range', '(1...3).class' +assert_equal '1...3', '(1...3).inspect' +assert_equal '1', '(1...3).begin' +assert_equal '3', '(1...3).end' +assert_equal 'true', '(1...3).exclude_end?' +assert_equal 'Range', 'r = (1...3); r.class' +assert_equal '1...3', 'r = (1...3); r.inspect' +assert_equal '1', 'r = (1...3); r.begin' +assert_equal '3', 'r = (1...3); r.end' +assert_equal 'true', 'r = (1...3); r.exclude_end?' +assert_equal 'Range', 'r = (1+2 .. 3+4); r.class' +assert_equal '3..7', 'r = (1+2 .. 3+4); r.inspect' +assert_equal '3', 'r = (1+2 .. 3+4); r.begin' +assert_equal '7', 'r = (1+2 .. 3+4); r.end' +assert_equal 'false', 'r = (1+2 .. 3+4); r.exclude_end?' +assert_equal 'Range', 'r = (1+2 ... 3+4); r.class' +assert_equal '3...7', 'r = (1+2 ... 3+4); r.inspect' +assert_equal '3', 'r = (1+2 ... 3+4); r.begin' +assert_equal '7', 'r = (1+2 ... 3+4); r.end' +assert_equal 'true', 'r = (1+2 ... 3+4); r.exclude_end?' +assert_equal 'Range', 'r = ("a".."c"); r.class' +assert_equal '"a".."c"', 'r = ("a".."c"); r.inspect' +assert_equal 'a', 'r = ("a".."c"); r.begin' +assert_equal 'c', 'r = ("a".."c"); r.end' + +assert_equal 'String', '__FILE__.class' +assert_equal 'Fixnum', '__LINE__.class' + +### + +assert_equal 'ok', %q{ + # this cause "called on terminated object". + ObjectSpace.each_object(Module) {|m| m.name.inspect } + :ok +} + +assert_normal_exit %q{ + begin + r = 0**-1 + r + r + rescue + end +}, '[ruby-dev:34524]' + +assert_normal_exit %q{ + begin + r = Marshal.load("\x04\bU:\rRational[\ai\x06i\x05") + r + r + rescue + end +}, '[ruby-dev:34536]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_load.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_load.rb new file mode 100644 index 0000000..18e8cc0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_load.rb @@ -0,0 +1,15 @@ +assert_equal 'ok', %q{ + open("require-lock-test.rb", "w") {|f| + f.puts "sleep 0.1" + f.puts "module M" + f.puts "end" + } + $:.unshift Dir.pwd + vs = (1..2).map {|i| + Thread.start { + require "require-lock-test" + M + } + }.map {|t| t.value } + vs[0] == M && vs[1] == M ? :ok : :ng +}, '[ruby-dev:32048]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_marshal.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_marshal.rb new file mode 100644 index 0000000..7e34176 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_marshal.rb @@ -0,0 +1,5 @@ + +assert_normal_exit %q{ + Marshal.load(Marshal.dump({"k"=>"v"}), lambda {|v| v}) +} + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_massign.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_massign.rb new file mode 100644 index 0000000..0f63dd4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_massign.rb @@ -0,0 +1,183 @@ +assert_equal '[[1], 2, 3]', '*v1, (a, b) = [1,[2, 3]]; [v1, a, b]' +assert_equal '[[1], 2, 3]', '*v1,(*), (a, b) = [1,:x,[2, 3]]; [v1, a, b]' + +assert_equal '[]', '*a = *nil; a' +assert_equal '[nil]', '*a = nil; a' +assert_equal '2', 'a, a = 1, 2; a', "[ruby-dev:31522]" +assert_equal '[1, 2]', 'a, b = 1, 2' +assert_equal '[1, 2]', %q{ + ans = [] + trace_var(:$a){|v| ans << v} + trace_var(:$b){|v| ans << v} + $a, $b = 1, 2 + ans +} + +assert_equal 'ok', %q{ + r = :ok + :ng.tap {|(r)|} + r +}, '[ruby-dev:31507]' + +=begin +# generated by this script: + +3.times{|i| + 8.times{|e| + ary = (0...e).to_a + a,b,c,d,e,f = nil + vals = %w(a b c d e f) + vals[i] = '*' + vals[i] + program = "#{vals.join(", ")} = *ary" + eval(program) + ans = [a,b,c,d,e,f] + puts %Q{ + assert_equal "#{ans.inspect}", %q{ + ary = #{ary.inspect} + #{program}; [a, b, c, d, e, f] + }} + } +} +=end + + assert_equal "[[], nil, nil, nil, nil, nil]", %q{ + ary = [] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[], 0, nil, nil, nil, nil]", %q{ + ary = [0] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[], 0, 1, nil, nil, nil]", %q{ + ary = [0, 1] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[], 0, 1, 2, nil, nil]", %q{ + ary = [0, 1, 2] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[], 0, 1, 2, 3, nil]", %q{ + ary = [0, 1, 2, 3] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[], 0, 1, 2, 3, 4]", %q{ + ary = [0, 1, 2, 3, 4] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[0], 1, 2, 3, 4, 5]", %q{ + ary = [0, 1, 2, 3, 4, 5] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[[0, 1], 2, 3, 4, 5, 6]", %q{ + ary = [0, 1, 2, 3, 4, 5, 6] + *a, b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[nil, [], nil, nil, nil, nil]", %q{ + ary = [] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [], nil, nil, nil, nil]", %q{ + ary = [0] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [], 1, nil, nil, nil]", %q{ + ary = [0, 1] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [], 1, 2, nil, nil]", %q{ + ary = [0, 1, 2] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [], 1, 2, 3, nil]", %q{ + ary = [0, 1, 2, 3] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [], 1, 2, 3, 4]", %q{ + ary = [0, 1, 2, 3, 4] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [1], 2, 3, 4, 5]", %q{ + ary = [0, 1, 2, 3, 4, 5] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, [1, 2], 3, 4, 5, 6]", %q{ + ary = [0, 1, 2, 3, 4, 5, 6] + a, *b, c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[nil, nil, [], nil, nil, nil]", %q{ + ary = [] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, nil, [], nil, nil, nil]", %q{ + ary = [0] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [], nil, nil, nil]", %q{ + ary = [0, 1] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [], 2, nil, nil]", %q{ + ary = [0, 1, 2] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [], 2, 3, nil]", %q{ + ary = [0, 1, 2, 3] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [], 2, 3, 4]", %q{ + ary = [0, 1, 2, 3, 4] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [2], 3, 4, 5]", %q{ + ary = [0, 1, 2, 3, 4, 5] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + assert_equal "[0, 1, [2, 3], 4, 5, 6]", %q{ + ary = [0, 1, 2, 3, 4, 5, 6] + a, b, *c, d, e, f = *ary; [a, b, c, d, e, f] + } + + +# +assert_equal 'ok', %q{ + a,s=[],"aaa" + 300.times { a< e + e.message + end +} + +assert_equal 'wrong number of arguments (0 for 1)', %q{ + def m a; end + begin + m + rescue => e + e.message + end +} + +# default argument +assert_equal '1', 'def m(x=1) x end; m()' +assert_equal '1', 'def m(x=7) x end; m(1)' +assert_equal '1', 'def m(a,x=1) x end; m(7)' +assert_equal '1', 'def m(a,x=7) x end; m(7,1)' +assert_equal '1', 'def m(a,b,x=1) x end; m(7,7)' +assert_equal '1', 'def m(a,b,x=7) x end; m(7,7,1)' +assert_equal '1', 'def m(a,x=1,y=1) x end; m(7)' +assert_equal '1', 'def m(a,x=1,y=1) y end; m(7)' +assert_equal '1', 'def m(a,x=7,y=1) x end; m(7,1)' +assert_equal '1', 'def m(a,x=7,y=1) y end; m(7,1)' +assert_equal '1', 'def m(a,x=7,y=7) x end; m(7,1,1)' +assert_equal '1', 'def m(a,x=7,y=7) y end; m(7,1,1)' + +# rest argument +assert_equal '[]', 'def m(*a) a end; m().inspect' +assert_equal '[1]', 'def m(*a) a end; m(1).inspect' +assert_equal '[1, 2]', 'def m(*a) a end; m(1,2).inspect' +assert_equal '[]', 'def m(x,*a) a end; m(7).inspect' +assert_equal '[1]', 'def m(x,*a) a end; m(7,1).inspect' +assert_equal '[1, 2]', 'def m(x,*a) a end; m(7,1,2).inspect' +assert_equal '[]', 'def m(x,y,*a) a end; m(7,7).inspect' +assert_equal '[1]', 'def m(x,y,*a) a end; m(7,7,1).inspect' +assert_equal '[1, 2]', 'def m(x,y,*a) a end; m(7,7,1,2).inspect' +assert_equal '[]', 'def m(x,y=7,*a) a end; m(7).inspect' +assert_equal '[]', 'def m(x,y,z=7,*a) a end; m(7,7).inspect' +assert_equal '[]', 'def m(x,y,z=7,*a) a end; m(7,7,7).inspect' +assert_equal '[]', 'def m(x,y,z=7,zz=7,*a) a end; m(7,7,7).inspect' +assert_equal '[]', 'def m(x,y,z=7,zz=7,*a) a end; m(7,7,7,7).inspect' +assert_equal '1', 'def m(x,y,z=7,zz=1,*a) zz end; m(7,7,7).inspect' +assert_equal '1', 'def m(x,y,z=7,zz=1,*a) zz end; m(7,7,7).inspect' +assert_equal '1', 'def m(x,y,z=7,zz=7,*a) zz end; m(7,7,7,1).inspect' + +# block argument +assert_equal 'Proc', 'def m(&block) block end; m{}.class' +assert_equal 'nil', 'def m(&block) block end; m().inspect' +assert_equal 'Proc', 'def m(a,&block) block end; m(7){}.class' +assert_equal 'nil', 'def m(a,&block) block end; m(7).inspect' +assert_equal '1', 'def m(a,&block) a end; m(1){}' +assert_equal 'Proc', 'def m(a,b=nil,&block) block end; m(7){}.class' +assert_equal 'nil', 'def m(a,b=nil,&block) block end; m(7).inspect' +assert_equal 'Proc', 'def m(a,b=nil,&block) block end; m(7,7){}.class' +assert_equal '1', 'def m(a,b=nil,&block) b end; m(7,1){}' +assert_equal 'Proc', 'def m(a,b=nil,*c,&block) block end; m(7){}.class' +assert_equal 'nil', 'def m(a,b=nil,*c,&block) block end; m(7).inspect' +assert_equal '1', 'def m(a,b=nil,*c,&block) a end; m(1).inspect' +assert_equal '1', 'def m(a,b=1,*c,&block) b end; m(7).inspect' +assert_equal '1', 'def m(a,b=7,*c,&block) b end; m(7,1).inspect' +assert_equal '[1]', 'def m(a,b=7,*c,&block) c end; m(7,7,1).inspect' + +# splat +assert_equal '1', 'def m(a) a end; m(*[1])' +assert_equal '1', 'def m(x,a) a end; m(7,*[1])' +assert_equal '1', 'def m(x,y,a) a end; m(7,7,*[1])' +assert_equal '1', 'def m(a,b) a end; m(*[1,7])' +assert_equal '1', 'def m(a,b) b end; m(*[7,1])' +assert_equal '1', 'def m(x,a,b) b end; m(7,*[7,1])' +assert_equal '1', 'def m(x,y,a,b) b end; m(7,7,*[7,1])' +assert_equal '1', 'def m(a,b,c) a end; m(*[1,7,7])' +assert_equal '1', 'def m(a,b,c) b end; m(*[7,1,7])' +assert_equal '1', 'def m(a,b,c) c end; m(*[7,7,1])' +assert_equal '1', 'def m(x,a,b,c) a end; m(7,*[1,7,7])' +assert_equal '1', 'def m(x,y,a,b,c) a end; m(7,7,*[1,7,7])' + +# hash argument +assert_equal '1', 'def m(h) h end; m(7=>1)[7]' +assert_equal '1', 'def m(h) h end; m(7=>1).size' +assert_equal '1', 'def m(h) h end; m(7=>1, 8=>7)[7]' +assert_equal '2', 'def m(h) h end; m(7=>1, 8=>7).size' +assert_equal '1', 'def m(h) h end; m(7=>1, 8=>7, 9=>7)[7]' +assert_equal '3', 'def m(h) h end; m(7=>1, 8=>7, 9=>7).size' +assert_equal '1', 'def m(x,h) h end; m(7, 7=>1)[7]' +assert_equal '1', 'def m(x,h) h end; m(7, 7=>1, 8=>7)[7]' +assert_equal '1', 'def m(x,h) h end; m(7, 7=>1, 8=>7, 9=>7)[7]' +assert_equal '1', 'def m(x,y,h) h end; m(7,7, 7=>1)[7]' +assert_equal '1', 'def m(x,y,h) h end; m(7,7, 7=>1, 8=>7)[7]' +assert_equal '1', 'def m(x,y,h) h end; m(7,7, 7=>1, 8=>7, 9=>7)[7]' + +# block argument +assert_equal '1', %q(def m(&block) mm(&block) end + def mm() yield 1 end + m {|a| a }) +assert_equal '1', %q(def m(x,&block) mm(x,&block) end + def mm(x) yield 1 end + m(7) {|a| a }) +assert_equal '1', %q(def m(x,y,&block) mm(x,y,&block) end + def mm(x,y) yield 1 end + m(7,7) {|a| a }) + +# recursive call +assert_equal '1', %q(def m(n) n == 0 ? 1 : m(n-1) end; m(5)) + +# instance method +assert_equal '1', %q(class C; def m() 1 end end; C.new.m) +assert_equal '1', %q(class C; def m(a) a end end; C.new.m(1)) +assert_equal '1', %q(class C; def m(a = 1) a end end; C.new.m) +assert_equal '[1]', %q(class C; def m(*a) a end end; C.new.m(1).inspect) +assert_equal '1', %q( class C + def m() mm() end + def mm() 1 end + end + C.new.m ) + +# singleton method (const) +assert_equal '1', %q(class C; def C.m() 1 end end; C.m) +assert_equal '1', %q(class C; def C.m(a) a end end; C.m(1)) +assert_equal '1', %q(class C; def C.m(a = 1) a end end; C.m) +assert_equal '[1]', %q(class C; def C.m(*a) a end end; C.m(1).inspect) +assert_equal '1', %q(class C; end; def C.m() 1 end; C.m) +assert_equal '1', %q(class C; end; def C.m(a) a end; C.m(1)) +assert_equal '1', %q(class C; end; def C.m(a = 1) a end; C.m) +assert_equal '[1]', %q(class C; end; def C.m(*a) a end; C.m(1).inspect) +assert_equal '1', %q(class C; def m() 7 end end; def C.m() 1 end; C.m) +assert_equal '1', %q( class C + def C.m() mm() end + def C.mm() 1 end + end + C.m ) + +# singleton method (lvar) +assert_equal '1', %q(obj = Object.new; def obj.m() 1 end; obj.m) +assert_equal '1', %q(obj = Object.new; def obj.m(a) a end; obj.m(1)) +assert_equal '1', %q(obj = Object.new; def obj.m(a=1) a end; obj.m) +assert_equal '[1]', %q(obj = Object.new; def obj.m(*a) a end; obj.m(1)) +assert_equal '1', %q(class C; def m() 7 end; end + obj = C.new + def obj.m() 1 end + obj.m) + +# inheritance +assert_equal '1', %q(class A; def m(a) a end end + class B < A; end + B.new.m(1)) +assert_equal '1', %q(class A; end + class B < A; def m(a) a end end + B.new.m(1)) +assert_equal '1', %q(class A; def m(a) a end end + class B < A; end + class C < B; end + C.new.m(1)) + +# include +assert_equal '1', %q(class A; def m(a) a end end + module M; end + class B < A; include M; end + B.new.m(1)) +assert_equal '1', %q(class A; end + module M; def m(a) a end end + class B < A; include M; end + B.new.m(1)) + +# alias +assert_equal '1', %q( def a() 1 end + alias m a + m() ) +assert_equal '1', %q( class C + def a() 1 end + alias m a + end + C.new.m ) +assert_equal '1', %q( class C + def a() 1 end + alias :m a + end + C.new.m ) +assert_equal '1', %q( class C + def a() 1 end + alias m :a + end + C.new.m ) +assert_equal '1', %q( class C + def a() 1 end + alias :m :a + end + C.new.m ) +assert_equal '1', %q( class C + def a() 1 end + alias m a + undef a + end + C.new.m ) + +# undef +assert_equal '1', %q( class C + def m() end + undef m + end + begin C.new.m; rescue NoMethodError; 1 end ) +assert_equal '1', %q( class A + def m() end + end + class C < A + def m() end + undef m + end + begin C.new.m; rescue NoMethodError; 1 end ) +assert_equal '1', %q( class A; def a() end end # [yarv-dev:999] + class B < A + def b() end + undef a, b + end + begin B.new.a; rescue NoMethodError; 1 end ) +assert_equal '1', %q( class A; def a() end end # [yarv-dev:999] + class B < A + def b() end + undef a, b + end + begin B.new.b; rescue NoMethodError; 1 end ) + +assert_equal '3', %q{ + def m1 + 1 + end + alias m2 m1 + alias :"#{'m3'}" m1 + m1 + m2 + m3 +}, '[ruby-dev:32308]' +assert_equal '1', %q{ + def foobar + end + undef :"foo#{:bar}" + 1 +}, '[ruby-dev:32308]' +assert_equal '1', %q{ + def foobar + 1 + end + alias :"bar#{:baz}" :"foo#{:bar}" + barbaz +}, '[ruby-dev:32308]' + +# private +assert_equal '1', %q( class C + def m() mm() end + def mm() 1 end + private :mm + end + C.new.m ) +assert_equal '1', %q( class C + def m() 7 end + private :m + end + begin C.m; rescue NoMethodError; 1 end ) +assert_equal '1', %q( class C + def C.m() mm() end + def C.mm() 1 end + private_class_method :mm + end + C.m ) +assert_equal '1', %q( class C + def C.m() 7 end + private_class_method :m + end + begin C.m; rescue NoMethodError; 1 end ) +assert_equal '1', %q( class C; def m() 1 end end + C.new.m # cache + class C + alias mm m; private :mm + end + C.new.m + begin C.new.mm; 7; rescue NoMethodError; 1 end ) + +# nested method +assert_equal '1', %q( class C + def m + def mm() 1 end + end + end + C.new.m + C.new.mm ) +assert_equal '1', %q( class C + def m + def mm() 1 end + end + end + instance_eval "C.new.m; C.new.mm" ) + +# method_missing +assert_equal ':m', %q( class C + def method_missing(mid, *args) mid end + end + C.new.m.inspect ) +assert_equal ':mm', %q( class C + def method_missing(mid, *args) mid end + end + C.new.mm.inspect ) +assert_equal '[1, 2]', %q( class C + def method_missing(mid, *args) args end + end + C.new.m(1,2).inspect ) +assert_equal '1', %q( class C + def method_missing(mid, *args) yield 1 end + end + C.new.m {|a| a }) +assert_equal 'nil', %q( class C + def method_missing(mid, *args, &block) block end + end + C.new.m.inspect ) + +# send +assert_equal '1', %q( class C; def m() 1 end end; + C.new.__send__(:m) ) +assert_equal '1', %q( class C; def m() 1 end end; + C.new.send(:m) ) +assert_equal '1', %q( class C; def m(a) a end end; + C.new.send(:m,1) ) +assert_equal '1', %q( class C; def m(a,b) a end end; + C.new.send(:m,1,7) ) +assert_equal '1', %q( class C; def m(x,a=1) a end end; + C.new.send(:m,7) ) +assert_equal '1', %q( class C; def m(x,a=7) a end end; + C.new.send(:m,7,1) ) +assert_equal '[1, 2]', %q( class C; def m(*a) a end end; + C.new.send(:m,1,2).inspect ) +assert_equal '1', %q( class C; def m() 7 end; private :m end + begin C.new.public_send(:m); rescue NoMethodError; 1 end ) +assert_equal '1', %q( class C; def m() 1 end; private :m end + C.new.send(:m) ) + +# with block +assert_equal '[[:ok1, :foo], [:ok2, :foo, :bar]]', +%q{ + class C + def [](a) + $ary << [yield, a] + end + def []=(a, b) + $ary << [yield, a, b] + end + end + + $ary = [] + C.new[:foo, &lambda{:ok1}] + C.new[:foo, &lambda{:ok2}] = :bar + $ary +} + +# with +assert_equal '[:ok1, [:ok2, 11]]', %q{ + class C + def [] + $ary << :ok1 + 10 + end + def []=(a) + $ary << [:ok2, a] + end + end + $ary = [] + C.new[]+=1 + $ary +} + +# splat and block arguments +assert_equal %q{[[[:x, :y, :z], NilClass], [[1, :x, :y, :z], NilClass], [[1, 2, :x, :y, :z], NilClass], [[:obj], NilClass], [[1, :obj], NilClass], [[1, 2, :obj], NilClass], [[], Proc], [[1], Proc], [[1, 2], Proc], [[], Proc], [[1], Proc], [[1, 2], Proc], [[:x, :y, :z], Proc], [[1, :x, :y, :z], Proc], [[1, 2, :x, :y, :z], Proc]]}, %q{ +def m(*args, &b) + $result << [args, b.class] +end +$result = [] +ary = [:x, :y, :z] +obj = :obj +b = Proc.new{} + +m(*ary) +m(1,*ary) +m(1,2,*ary) +m(*obj) +m(1,*obj) +m(1,2,*obj) +m(){} +m(1){} +m(1,2){} +m(&b) +m(1,&b) +m(1,2,&b) +m(*ary,&b) +m(1,*ary,&b) +m(1,2,*ary,&b) +$result +} + +# post test +assert_equal %q{[1, 2, :o1, :o2, [], 3, 4, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4)} + +assert_equal %q{[1, 2, 3, :o2, [], 4, 5, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5)} + +assert_equal %q{[1, 2, 3, 4, [], 5, 6, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6)} + +assert_equal %q{[1, 2, 3, 4, [5], 6, 7, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7)} + +assert_equal %q{[1, 2, 3, 4, [5, 6], 7, 8, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8)} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7], 8, 9, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9)} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7, 8], 9, 10, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7, 8, 9], 10, 11, NilClass, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)} + +assert_equal %q{[1, 2, :o1, :o2, [], 3, 4, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4){}} + +assert_equal %q{[1, 2, 3, :o2, [], 4, 5, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5){}} + +assert_equal %q{[1, 2, 3, 4, [], 5, 6, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6){}} + +assert_equal %q{[1, 2, 3, 4, [5], 6, 7, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7){}} + +assert_equal %q{[1, 2, 3, 4, [5, 6], 7, 8, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8){}} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7], 8, 9, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9){}} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7, 8], 9, 10, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9, 10){}} + +assert_equal %q{[1, 2, 3, 4, [5, 6, 7, 8, 9], 10, 11, Proc, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, b.class, x, y] +end +; m(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11){}} + +assert_equal %q{[1, 2, :o1, :o2, [], 3, 4, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, x, y] +end +; m(1, 2, 3, 4)} + +assert_equal %q{[1, 2, 3, :o2, [], 4, 5, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, x, y] +end +; m(1, 2, 3, 4, 5)} + +assert_equal %q{[1, 2, 3, 4, [], 5, 6, nil, nil]}, %q{ +def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2) + x, y = :x, :y if $foo + [m1, m2, o1, o2, r, p1, p2, x, y] +end +; m(1, 2, 3, 4, 5, 6)} + + +# +# super +# +=begin +# below programs are generated by this program: + +BASE = <; super; end; end +EOS__ + +tests = { +%q{ + def m +} => %q{ + C1.new.m +}, +# +%q{ + def m a +} => %q{ + C1.new.m 1 +}, +%q{ + def m a + a = :a +} => %q{ + C1.new.m 1 +}, +# +%q{ + def m a, o=:o +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 +}, +%q{ + def m a, o=:o + a = :a +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 +}, +%q{ + def m a, o=:o + o = :x +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 +}, +# +%q{ + def m a, *r +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 + C1.new.m 1, 2, 3 +}, +%q{ + def m a, *r + r = [:x, :y] +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 + C1.new.m 1, 2, 3 +}, +# +%q{ + def m a, o=:o, *r +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 + C1.new.m 1, 2, 3 + C1.new.m 1, 2, 3, 4 +}, +# +%q{ + def m a, o=:o, *r, &b +} => %q{ + C1.new.m 1 + C1.new.m 1, 2 + C1.new.m 1, 2, 3 + C1.new.m 1, 2, 3, 4 + C1.new.m(1){} + C1.new.m(1, 2){} + C1.new.m(1, 2, 3){} + C1.new.m(1, 2, 3, 4){} +}, +# +"def m(m1, m2, o1=:o1, o2=:o2, p1, p2)" => +%q{ +C1.new.m(1,2,3,4) +C1.new.m(1,2,3,4,5) +C1.new.m(1,2,3,4,5,6) +}, +# +"def m(m1, m2, *r, p1, p2)" => +%q{ +C1.new.m(1,2,3,4) +C1.new.m(1,2,3,4,5) +C1.new.m(1,2,3,4,5,6) +C1.new.m(1,2,3,4,5,6,7) +C1.new.m(1,2,3,4,5,6,7,8) +}, +# +"def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2)" => +%q{ +C1.new.m(1,2,3,4) +C1.new.m(1,2,3,4,5) +C1.new.m(1,2,3,4,5,6) +C1.new.m(1,2,3,4,5,6,7) +C1.new.m(1,2,3,4,5,6,7,8) +C1.new.m(1,2,3,4,5,6,7,8,9) +}, + +### +} + + +tests.each{|setup, methods| setup = setup.dup; setup.strip! + setup = BASE.gsub(//){setup} + methods.split(/\n/).each{|m| m = m.dup; m.strip! + next if m.empty? + expr = "#{setup}; #{m}" + result = eval(expr) + puts "assert_equal %q{#{result.inspect}}, %q{\n#{expr}}" + puts + } +} + +=end + +assert_equal %q{[:C0_m, [1, 2, :o1, :o2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, p1, p2); super; end; end +; C1.new.m(1,2,3,4)} + +assert_equal %q{[:C0_m, [1, 2, 3, :o2, 4, 5]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6)} + +assert_equal %q{[:C0_m, [1, :o]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [1, 2, 3]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r; super; end; end +; C1.new.m 1, 2, 3} + +assert_equal %q{[:C0_m, [1, 2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r; super; end; end +; C1.new.m 1, 2, 3, 4} + +assert_equal %q{[:C0_m, [:a]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a + a = :a; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, 2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6, 7]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6,7)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6, 7, 8]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6,7,8)} + +assert_equal %q{[:C0_m, [1, :o]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [1, 2, 3]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m 1, 2, 3} + +assert_equal %q{[:C0_m, [1, 2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m 1, 2, 3, 4} + +assert_equal %q{[:C0_m, [1, :o]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m(1){}} + +assert_equal %q{[:C0_m, [1, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m(1, 2){}} + +assert_equal %q{[:C0_m, [1, 2, 3]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m(1, 2, 3){}} + +assert_equal %q{[:C0_m, [1, 2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o, *r, &b; super; end; end +; C1.new.m(1, 2, 3, 4){}} + +assert_equal %q{[:C0_m, [1, :x]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o + o = :x; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, :x]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o + o = :x; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [:a, :o]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o + a = :a; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [:a, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o + a = :a; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [1]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, :x, :y]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r + r = [:x, :y]; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, :x, :y]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r + r = [:x, :y]; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [1, :x, :y]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r + r = [:x, :y]; super; end; end +; C1.new.m 1, 2, 3} + +assert_equal %q{[:C0_m, [1, 2, :o1, :o2, 3, 4]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4)} + +assert_equal %q{[:C0_m, [1, 2, 3, :o2, 4, 5]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6, 7]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6,7)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6, 7, 8]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6,7,8)} + +assert_equal %q{[:C0_m, [1, 2, 3, 4, 5, 6, 7, 8, 9]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2); super; end; end +; C1.new.m(1,2,3,4,5,6,7,8,9)} + +assert_equal %q{[:C0_m, [1]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:C0_m, [1, 2, 3]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, *r; super; end; end +; C1.new.m 1, 2, 3} + +assert_equal %q{[:C0_m, []]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m; super; end; end +; C1.new.m} + +assert_equal %q{[:C0_m, [1, :o]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o; super; end; end +; C1.new.m 1} + +assert_equal %q{[:C0_m, [1, 2]]}, %q{ +class C0; def m *args; [:C0_m, args]; end; end +class C1 < C0; def m a, o=:o; super; end; end +; C1.new.m 1, 2} + +assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{ + $ans = [] + class Foo + def m + end + end + + c1 = c2 = nil + + lambda{ + $SAFE = 4 + c1 = Class.new{ + def m + end + } + c2 = Class.new(Foo){ + alias mm m + } + }.call + + def test + begin + yield + rescue SecurityError + $ans << :ok + else + $ans << :ng + end + end + + o1 = c1.new + o2 = c2.new + + test{o1.m} + test{o2.mm} + test{o1.send :m} + test{o2.send :mm} + test{o1.public_send :m} + test{o2.public_send :mm} + test{o1.method(:m).call} + test{o2.method(:mm).call} + $ans +} + +assert_equal 'ok', %q{ + class C + def x=(n) + end + def m + self.x = :ok + end + end + C.new.m +} + +assert_equal 'ok', %q{ + proc{ + $SAFE = 1 + class C + def m + :ok + end + end + }.call + C.new.m +}, '[ruby-core:11998]' + +assert_equal 'ok', %q{ + proc{ + $SAFE = 2 + class C + def m + :ok + end + end + }.call + C.new.m +}, '[ruby-core:11998]' + +assert_equal 'ok', %q{ + proc{ + $SAFE = 3 + class C + def m + :ng + end + end + }.call + begin + C.new.m + rescue SecurityError + :ok + end +}, '[ruby-core:11998]' + +assert_equal 'ok', %q{ + class B + def m() :fail end + end + class C < B + undef m + begin + remove_method :m + rescue NameError + end + end + begin + C.new.m + rescue NameError + :ok + end +}, '[ruby-dev:31816], [ruby-dev:31817]' + +assert_normal_exit %q{ + begin + Process.setrlimit(Process::RLIMIT_STACK, 4_202_496) + # FreeBSD fails this less than 4M + 8K bytes. + rescue Exception + exit + end + class C + attr "a" * (10*1024*1024) + end +}, '[ruby-dev:31818]' + +assert_equal 'ok', %q{ + class Module + def define_method2(name, &block) + define_method(name, &block) + end + end + class C + define_method2(:m) {|x, y| :fail } + end + begin + C.new.m([1,2]) + rescue ArgumentError + :ok + end +} + +assert_not_match /method_missing/, %q{ + STDERR.reopen(STDOUT) + variable_or_mehtod_not_exist +} + +assert_equal '[false, false, false, false, true, true]', %q{ + class C + define_method(:foo) { + block_given? + } + end + + C.new.foo {} + + class D + def foo + D.module_eval{ + define_method(:m1){ + block_given? + } + } + end + def bar + D.module_eval{ + define_method(:m2){ + block_given? + } + } + end + end + + D.new.foo + D.new.bar{} + [C.new.foo, C.new.foo{}, D.new.m1, D.new.m1{}, D.new.m2, D.new.m2{}] +}, '[ruby-core:14813]' + +assert_equal 'ok', %q{ + class Foo + define_method(:foo) do |&b| + b.call + end + end + Foo.new.foo do + break :ok + end +}, '[ruby-dev:36028]' + +assert_equal '[1, 2, [3, 4]]', %q{ + def regular(a, b, *c) + [a, b, c] + end + regular(*[], 1, *[], *[2, 3], *[], 4) +}, '[ruby-core:19413]' + +assert_equal '[1, [:foo, 3, 4, :foo]]', %q{ + def regular(a, *b) + [a, b] + end + a = b = [:foo] + regular(1, *a, *[3, 4], *b) +} + +assert_equal '["B", "A"]', %q{ + class A + def m + 'A' + end + end + + class B < A + define_method(:m) do + ['B', super()] + end + end + + class C < B + end + + C.new.m +} + +assert_equal 'ok', %q{ + module Foo + def foo + begin + super + rescue NoMethodError + :ok + end + end + module_function :foo + end + Foo.foo +}, '[ruby-dev:37587]' + +assert_equal 'Object#foo', %q{ + class Object + def self.foo + "Object.foo" + end + def foo + "Object#foo" + end + end + + module Foo + def foo + begin + super + rescue NoMethodError + :ok + end + end + module_function :foo + end + Foo.foo +}, '[ruby-dev:37587]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_objectspace.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_objectspace.rb new file mode 100644 index 0000000..1a43d42 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_objectspace.rb @@ -0,0 +1,33 @@ +assert_normal_exit %q{ + eval("", TOPLEVEL_BINDING) + minobj = ObjectSpace.to_enum(:each_object).min_by {|a| a.object_id } + maxobj = ObjectSpace.to_enum(:each_object).max_by {|a| a.object_id } + minobj.object_id.upto(maxobj.object_id) {|id| + begin + o = ObjectSpace._id2ref(id) + rescue RangeError + next + end + o.inspect if defined?(o.inspect) + } +}, '[ruby-dev:31911]' + +assert_normal_exit %q{ + ary = (1..10).to_a + ary.permutation(2) {|x| + if x == [1,2] + ObjectSpace.each_object(String) {|s| + s.clear if !s.frozen? && (s.length == 40 || s.length == 80) + } + end + } +}, '[ruby-dev:31982]' + +assert_normal_exit %q{ + ary = (1..100).to_a + ary.permutation(2) {|x| + if x == [1,2] + ObjectSpace.each_object(Array) {|o| o.clear if o == ary && o.object_id != ary.object_id } + end + } +}, '[ruby-dev:31985]' diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_proc.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_proc.rb new file mode 100644 index 0000000..820dc1f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_proc.rb @@ -0,0 +1,428 @@ +assert_equal %q{[1, 2, 3]}, %q{ + def getproc &b + b + end + + def m + yield + end + + m{ + i = 1 + m{ + j = 2 + m{ + k = 3 + getproc{ + [i, j, k] + } + } + } + }.call +} +assert_equal %q{7}, %q{ + def make_proc(&b) + b + end + + def make_closure + a = 0 + make_proc{ + a+=1 + } + end + + cl = make_closure + cl.call + cl.call * cl.call +} +assert_equal %q{ok}, %q{ + class C + def foo + :ok + end + end + + def block + C.method(:new).to_proc + end + b = block() + b.call.foo +} +assert_equal %q{[0, 1, :last, 0, 2, :last]}, %q{ + def proc &b + b + end + + pr = [] + proc{|i_b| + p3 = proc{|j_b| + pr << proc{|k_b| + [i_b, j_b, k_b] + } + } + p3.call(1) + p3.call(2) + }.call(0) + + pr[0].call(:last).concat pr[1].call(:last) +} +assert_equal %q{12}, %q{ + def iter + yield + end + + def getproc &b + b + end + + iter{ + bvar = 3 + getproc{ + bvar2 = 4 + bvar * bvar2 + } + }.call +} +assert_equal %q{200}, %q{ + def iter + yield + end + + def getproc &b + b + end + + loc1 = 0 + pr1 = iter{ + bl1 = 1 + getproc{ + loc1 += 1 + bl1 += 1 + loc1 + bl1 + } + } + + pr2 = iter{ + bl1 = 1 + getproc{ + loc1 += 1 + bl1 += 1 + loc1 + bl1 + } + } + + pr1.call; pr2.call + pr1.call; pr2.call + pr1.call; pr2.call + (pr1.call + pr2.call) * loc1 +} +assert_equal %q{[1, 2]}, %q{ + def proc(&pr) + pr + end + + def m + a = 1 + m2{ + a + } + end + + def m2 + b = 2 + proc{ + [yield, b] + } + end + + pr = m + x = ['a', 1,2,3,4,5,6,7,8,9,0, + 1,2,3,4,5,6,7,8,9,0, + 1,2,3,4,5,6,7,8,9,0, + 1,2,3,4,5,6,7,8,9,0, + 1,2,3,4,5,6,7,8,9,0,] + pr.call +} +assert_equal %q{1}, %q{ + def proc(&pr) + pr + end + + def m + a = 1 + m2{ + a + } + end + + def m2 + b = 2 + proc{ + [yield, b] + } + 100000.times{|x| + "#{x}" + } + yield + end + m +} +assert_equal %q{[:C, :C]}, %q{ + Const = :top + class C + Const = :C + $pr = proc{ + (1..2).map{ + Const + } + } + end + $pr.call +} +assert_equal %q{top}, %q{ + Const = :top + class C + Const = :C + end + pr = proc{ + Const + } + C.class_eval %q{ + pr.call + } +} +assert_equal %q{1}, %q{ + def m(&b) + b + end + + m{|e_proctest| e_proctest}.call(1) +} +assert_equal %q{12}, %q{ + def m(&b) + b + end + + m{|e_proctest1, e_proctest2| + a = e_proctest1 * e_proctest2 * 2 + a * 3 + }.call(1, 2) +} +assert_equal %q{[[], [1], [1, 2], [1, 2, 3]]}, %q{ + [ + Proc.new{|*args| args}.call(), + Proc.new{|*args| args}.call(1), + Proc.new{|*args| args}.call(1, 2), + Proc.new{|*args| args}.call(1, 2, 3), + ] +} +assert_equal %q{[[nil, []], [1, []], [1, [2]], [1, [2, 3]]]}, %q{ + [ + Proc.new{|a, *b| [a, b]}.call(), + Proc.new{|a, *b| [a, b]}.call(1), + Proc.new{|a, *b| [a, b]}.call(1, 2), + Proc.new{|a, *b| [a, b]}.call(1, 2, 3), + ] +} +assert_equal %q{0}, %q{ + pr = proc{ + $SAFE + } + $SAFE = 1 + pr.call +} +assert_equal %q{[1, 0]}, %q{ + pr = proc{ + $SAFE += 1 + } + [pr.call, $SAFE] +} +assert_equal %q{1}, %q{ + def m(&b) + b + end + m{1}.call +} +assert_equal %q{3}, %q{ + def m(&b) + b + end + + m{ + a = 1 + a + 2 + }.call +} +assert_equal %Q{ok\n}, %q{ + class A; def get_block; proc {puts "ok"} end end + block = A.new.get_block + GC.start + block.call +}, '[ruby-core:14885]' + +assert_equal 'ok', %q{ + a = lambda {|x, y, &b| b } + b = a.curry[1] + if b.call(2){} == nil + :ng + else + :ok + end +}, '[ruby-core:15551]' + +assert_equal 'ok', %q{ + lambda { + break :ok + :ng + }.call +}, '[ruby-dev:34646]' + +assert_equal %q{[:bar, :foo]}, %q{ + def foo + klass = Class.new do + define_method(:bar) do + return :bar + end + end + [klass.new.bar, :foo] + end + foo +}, "[ ruby-Bugs-19304 ]" + +assert_equal 'ok', %q{ + $x = :ok + def def7(x, y) + x[y] + $x = :ng + end + def test_def7 + def7(lambda {|x| x.call}, Proc.new {return}) + $x = :ng + end + test_def7 + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + lambda { a = lambda { return }; $x = :ng; a[]; $x = :ok }.call + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + lambda { a = lambda { break }; $x = :ng; a[]; $x = :ok }.call + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + def def8 + $x = :ng + lambda { a = Proc.new { return }; a[]}.call + $x = :ok + end + def8 + $x +}, '[ruby-core:17164]' + + +assert_equal 'ok', %q{ + def def9 + lambda {|a| $x = :ok; a[]; $x = :ng }.call(Proc.new { return }) + $x = :ng + end + def9 + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + def def10 + $x = :ng + lambda { 1.times { return } }.call + $x = :ok + end + $x = :ok + def10 + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + def def11 + yield + end + begin + lambda { def11 { return } }.call + rescue LocalJumpError + :ng + else + :ok + end +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + def def12 + b = Proc.new { $x = :ng; lambda { return }.call; $x = :ok }.call + end + def12 + $x +}, '[ruby-core:17164]' + +assert_equal 'ok', %q{ + def m + pr = proc{ + proc{ + return :ok + } + }.call + pr.call + :ng + end + m() +} + +assert_equal 'ok', %q{ + class Foo + def call_it + p = Proc.new + p.call + end + end + + def give_it + proc { :ok } + end + + f = Foo.new + a_proc = give_it + f.call_it(&give_it()) +}, '[ruby-core:15711]' + +assert_equal 'foo!', %q{ + class FooProc < Proc + def initialize + @foo = "foo!" + end + + def bar + @foo + end + end + + def bar + FooProc.new &lambda{ + p 1 + } + end + + fp = bar(&lambda{ + p 2 + }) + + fp.bar +}, 'Subclass of Proc' + +assert_equal 'ok', %q{ + at_exit{ + print $!.message + } + raise "ok" +} + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_struct.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_struct.rb new file mode 100644 index 0000000..a65964d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_struct.rb @@ -0,0 +1,5 @@ +assert_equal 'Struct::Foo', %q{ + Struct.instance_eval { const_set(:Foo, nil) } + Struct.new("Foo") + Struct::Foo +} diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_syntax.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_syntax.rb new file mode 100644 index 0000000..a9005a4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_syntax.rb @@ -0,0 +1,830 @@ +assert_equal %q{4}, %q{1 && 2 && 3 && 4} +assert_equal %q{}, %q{1 && nil && 3 && 4} +assert_equal %q{}, %q{1 && 2 && 3 && nil} +assert_equal %q{false}, %q{1 && 2 && 3 && false} +assert_equal %q{4}, %q{1 and 2 and 3 and 4} +assert_equal %q{}, %q{1 and nil and 3 and 4} +assert_equal %q{}, %q{1 and 2 and 3 and nil} +assert_equal %q{false}, %q{1 and 2 and 3 and false} +assert_equal %q{}, %q{nil && true} +assert_equal %q{false}, %q{false && true} +assert_equal %q{}, %q{ + case 1 + when 2 + :ng + end} +assert_equal %q{ok}, %q{ + case 1 + when 10,20,30 + :ng1 + when 1,2,3 + :ok + when 100,200,300 + :ng2 + else + :elseng + end} +assert_equal %q{elseok}, %q{ + case 123 + when 10,20,30 + :ng1 + when 1,2,3 + :ng2 + when 100,200,300 + :ng3 + else + :elseok + end +} +assert_equal %q{ok}, %q{ + case 'test' + when /testx/ + :ng1 + when /test/ + :ok + when /tetxx/ + :ng2 + else + :ng_else + end +} +assert_equal %q{ok}, %q{ + case Object.new + when Object + :ok + end +} +assert_equal %q{ok}, %q{ + case Object + when Object.new + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + case 'test' + when 'tes' + :ng + when 'te' + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + case 'test' + when 'tes' + :ng + when 'te' + :ng + when 'test' + :ok + end +} +assert_equal %q{ng}, %q{ + case 'test' + when 'tes' + :ng + when /te/ + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + case 'test' + when 'tes' + :ng + when /test/ + :ok + else + :ng + end +} +assert_equal %q{100}, %q{ + def test(arg) + case 1 + when 2 + 3 + end + return arg + end + + test(100) +} +assert_equal %q{ok}, %q{ + ary = [1, 2] + case 1 + when *ary + :ok + else + :ng + end +} +assert_equal %q{ok}, %q{ + ary = [1, 2] + case 3 + when *ary + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + ary = [1, 2] + case 1 + when :x, *ary + :ok + when :z + :ng1 + else + :ng2 + end +} +assert_equal %q{ok}, %q{ + ary = [1, 2] + case 3 + when :x, *ary + :ng1 + when :z + :ng2 + else + :ok + end +} +assert_equal %q{[:false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :false, :false, :false, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :then, :false, :then, :then, :then, :false, :false, :false, :false, :false, :false, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :false, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :false, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :false, :then, :then, :then, :then, :then, :then, :then, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep, :then, :sep]}, %q{ + + def make_perm ary, num + if num == 1 + ary.map{|e| [e]} + else + base = make_perm(ary, num-1) + res = [] + base.each{|b| + ary.each{|e| + res << [e] + b + } + } + res + end + end + + def each_test + conds = make_perm(['fv', 'tv'], 3) + bangs = make_perm(['', '!'], 3) + exprs = make_perm(['and', 'or'], 3) + ['if', 'unless'].each{|syn| + conds.each{|cs| + bangs.each{|bs| + exprs.each{|es| + yield(syn, cs, bs, es) + } + } + } + } + end + + fv = false + tv = true + + $ans = [] + each_test{|syn, conds, bangs, exprs| + c1, c2, c3 = conds + bang1, bang2, bang3 = bangs + e1, e2 = exprs + eval %Q{ + #{syn} #{bang1}#{c1} #{e1} #{bang2}#{c2} #{e2} #{bang3}#{c3} + $ans << :then + else + $ans << :false + end + } + } + + each_test{|syn, conds, bangs, exprs| + c1, c2, c3 = conds + bang1, bang2, bang3 = bangs + e1, e2 = exprs + eval %Q{ + #{syn} #{bang1}#{c1} #{e1} #{bang2}#{c2} #{e2} #{bang3}#{c3} + $ans << :then + end + $ans << :sep + } + } + $ans +} +assert_equal %q{}, %q{ + defined?(m) +} +assert_equal %q{method}, %q{ + def m + end + defined?(m) +} +assert_equal %q{}, %q{ + defined?(a.class) +} +assert_equal %q{method}, %q{ + a = 1 + defined?(a.class) +} +assert_equal %q{["method", "method", "method", "method", nil, nil, "method", "method", "method", nil]}, %q{ + class C + def test + [defined?(m1()), defined?(self.m1), defined?(C.new.m1), + defined?(m2()), defined?(self.m2), defined?(C.new.m2), + defined?(m3()), defined?(self.m3), defined?(C.new.m3)] + end + def m1 + end + private + def m2 + end + protected + def m3 + end + end + C.new.test + [defined?(C.new.m3)] +} +assert_equal %q{[nil, nil, nil, nil, "global-variable", "global-variable", nil, nil]}, %q{ + $ans = [defined?($1), defined?($2), defined?($3), defined?($4)] + /(a)(b)/ =~ 'ab' + $ans + [defined?($1), defined?($2), defined?($3), defined?($4)] +} +assert_equal %q{nilselftruefalse}, %q{ + defined?(nil) + defined?(self) + + defined?(true) + defined?(false) +} +assert_equal %q{}, %q{ + defined?(@a) +} +assert_equal %q{instance-variable}, %q{ + @a = 1 + defined?(@a) +} +assert_equal %q{}, %q{ + defined?(@@a) +} +assert_equal %q{class variable}, %q{ + @@a = 1 + defined?(@@a) +} +assert_equal %q{}, %q{ + defined?($a) +} +assert_equal %q{global-variable}, %q{ + $a = 1 + defined?($a) +} +assert_equal %q{}, %q{ + defined?(C_definedtest) +} +assert_equal %q{constant}, %q{ + C_definedtest = 1 + defined?(C_definedtest) +} +assert_equal %q{}, %q{ + defined?(::C_definedtest) +} +assert_equal %q{constant}, %q{ + C_definedtest = 1 + defined?(::C_definedtest) +} +assert_equal %q{}, %q{ + defined?(C_definedtestA::C_definedtestB::C_definedtestC) +} +assert_equal %q{constant}, %q{ + class C_definedtestA + class C_definedtestB + C_definedtestC = 1 + end + end + defined?(C_definedtestA::C_definedtestB::C_definedtestC) +} +assert_equal %q{30}, %q{ + sum = 0 + 30.times{|ib| + if ib % 10 == 0 .. true + sum += ib + end + } + sum +} +assert_equal %q{63}, %q{ + sum = 0 + 30.times{|ib| + if ib % 10 == 0 ... true + sum += ib + end + } + sum +} +assert_equal %q{[["NUM", "Type: NUM\n"], ["NUM", "123\n"], ["NUM", "456\n"], ["NUM", "Type: ARP\n"], ["NUM", "aaa\n"], ["NUM", "bbb\n"], ["NUM", "\f\n"], ["ARP", "Type: ARP\n"], ["ARP", "aaa\n"], ["ARP", "bbb\n"]]}, %q{ + t = nil + unless ''.respond_to? :lines + class String + def lines + self + end + end + end + ary = [] +"this must not print +Type: NUM +123 +456 +Type: ARP +aaa +bbb +\f +this must not print +hoge +Type: ARP +aaa +bbb +".lines.each{|l| + if (t = l[/^Type: (.*)/, 1])..(/^\f/ =~ l) + ary << [t, l] + end + } + ary +} +assert_equal %q{1}, %q{if true then 1 ; end} +assert_equal %q{}, %q{if false then 1 ; end} +assert_equal %q{1}, %q{if true then 1 ; else; 2; end} +assert_equal %q{2}, %q{if false then 1 ; else; 2; end} +assert_equal %q{}, %q{if true then ; elsif true then ; 1 ; end} +assert_equal %q{1}, %q{if false then ; elsif true then ; 1 ; end} +assert_equal %q{}, %q{unless true then 1 ; end} +assert_equal %q{1}, %q{unless false then 1 ; end} +assert_equal %q{2}, %q{unless true then 1 ; else; 2; end} +assert_equal %q{1}, %q{unless false then 1 ; else; 2; end} +assert_equal %q{1}, %q{1 if true} +assert_equal %q{}, %q{1 if false} +assert_equal %q{}, %q{1 if nil} +assert_equal %q{}, %q{1 unless true} +assert_equal %q{1}, %q{1 unless false} +assert_equal %q{1}, %q{1 unless nil} +assert_equal %q{1}, %q{1 || 2 || 3 || 4} +assert_equal %q{1}, %q{1 || false || 3 || 4} +assert_equal %q{2}, %q{nil || 2 || 3 || 4} +assert_equal %q{2}, %q{false || 2 || 3 || 4} +assert_equal %q{false}, %q{nil || false || nil || false} +assert_equal %q{1}, %q{1 or 2 or 3 or 4} +assert_equal %q{1}, %q{1 or false or 3 or 4} +assert_equal %q{2}, %q{nil or 2 or 3 or 4} +assert_equal %q{2}, %q{false or 2 or 3 or 4} +assert_equal %q{false}, %q{nil or false or nil or false} +assert_equal %q{elseng}, %q{ + case + when 1==2, 2==3 + :ng1 + when false, 4==5 + :ok + when false + :ng2 + else + :elseng + end +} +assert_equal %q{ok}, %q{ + case + when nil, nil + :ng1 + when 1,2,3 + :ok + when false, false + :ng2 + else + :elseng + end +} +assert_equal %q{elseok}, %q{ + case + when nil + :ng1 + when false + :ng2 + else + :elseok + end} +assert_equal %q{}, %q{ + case + when 1 + end +} +assert_equal %q{ok}, %q{ + r = nil + ary = [] + case + when false + r = :ng1 + when false, false + r = :ng2 + when *ary + r = :ng3 + when false, *ary + r = :ng4 + when true, *ary + r = :ok + end + r +} +assert_equal %q{ok}, %q{ + ary = [] + case + when false, *ary + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + ary = [false, nil] + case + when *ary + :ng + else + :ok + end +} +assert_equal %q{ok}, %q{ + ary = [false, nil] + case + when *ary + :ng + when true + :ok + else + :ng2 + end +} +assert_equal %q{ng}, %q{ + ary = [false, nil] + case + when *ary + :ok + else + :ng + end +} +assert_equal %q{ok}, %q{ + ary = [false, true] + case + when *ary + :ok + else + :ng + end +} +assert_equal %q{ok}, %q{ + ary = [false, true] + case + when false, false + when false, *ary + :ok + else + :ng + end +} +assert_equal %q{}, %q{ + i = 0 + while i < 10 + i+=1 + end} +assert_equal %q{10}, %q{ + i = 0 + while i < 10 + i+=1 + end; i} +assert_equal %q{}, %q{ + i = 0 + until i > 10 + i+=1 + end} +assert_equal %q{11}, %q{ + i = 0 + until i > 10 + i+=1 + end; i} +assert_equal %q{1}, %q{ + i = 0 + begin + i+=1 + end while false + i +} +assert_equal %q{1}, %q{ + i = 0 + begin + i+=1 + end until true + i +} +def assert_syntax_error expected, code, message = '' + assert_equal "#{expected}", + "begin eval(%q{#{code}}, nil, '', 0)"'; rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end', message +end +assert_syntax_error "unterminated string meets end of file", '().."', '[ruby-dev:29732]' +assert_equal %q{[]}, %q{$&;[]}, '[ruby-dev:31068]' +assert_syntax_error "syntax error, unexpected tSTAR, expecting '}'", %q{{*0}}, '[ruby-dev:31072]' +assert_syntax_error "`@0' is not allowed as an instance variable name", %q{@0..0}, '[ruby-dev:31095]' +assert_syntax_error "identifier $00 is not valid to get", %q{$00..0}, '[ruby-dev:31100]' +assert_syntax_error "identifier $00 is not valid to set", %q{0..$00=1} +assert_equal %q{0}, %q{[*0];0}, '[ruby-dev:31102]' +assert_syntax_error "syntax error, unexpected ')'", %q{v0,(*,v1,) = 0}, '[ruby-dev:31104]' +assert_equal %q{1}, %q{ + class << (ary=[]); def []; 0; end; def []=(x); super(0,x);end;end; ary[]+=1 +}, '[ruby-dev:31110]' +assert_syntax_error "Can't set variable $1", %q{0..$1=1}, '[ruby-dev:31118]' +assert_valid_syntax %q{1.times{1+(1&&next)}}, '[ruby-dev:31119]' +assert_valid_syntax %q{x=-1;loop{x+=1&&redo if (x+=1).zero?}}, '[ruby-dev:31119]' +assert_syntax_error %q{syntax error, unexpected $end}, %q{!}, '[ruby-dev:31243]' +assert_equal %q{[nil]}, %q{[()]}, '[ruby-dev:31252]' +assert_equal %q{true}, %q{!_=()}, '[ruby-dev:31263]' +assert_equal 'ok', %q{while true; redo; end if 1 == 2; :ok}, '[ruby-dev:31360]' +assert_equal 'ok', %q{ + 1.times { + begin + ensure + next + end + }; :ok +}, '[ruby-dev:31373]' +assert_equal 'ok', %q{ + flag = false + 1.times { + next if flag + flag = true + begin + ensure + redo + end + }; :ok +}, '[ruby-dev:31373]' + +assert_equal 'ok', %q{ + 1.times{ + p(1, (next; 2)) + }; :ok +} +assert_equal '3', %q{ + i = 0 + 1 + (while true + break 2 if (i+=1) > 1 + next + end) +} +assert_equal '3', %q{ + i = 0 + 1 + (while true + break 2 if (i+=1) > 1 + p(1, (next; 2)) + end) +} +# redo +assert_equal 'ok', %q{ + i = 0 + 1.times{ + break if i>1 + i+=1 + p(1, (redo; 2)) + }; :ok +} +assert_equal '3', %q{ + i = 0 + 1 + (while true + break 2 if (i+=1) > 1 + redo + end) +} +assert_equal '3', %q{ + i = 0 + 1 + (while true + break 2 if (i+=1) > 1 + p(1, (redo; 2)) + end) +} +assert_equal '1', %q{ + a = [0] + a[*a]+=1 +} +assert_equal '2', %q{ + ary = [0] + case 1 + when *ary, 1 + 1 + end + + case + when *ary + 1 + end +} + +assert_match /invalid multibyte char/, %q{ + STDERR.reopen(STDOUT) + eval("\"\xf0".force_encoding("utf-8")) +}, '[ruby-dev:32429]' + +# method ! and != +assert_equal 'true', %q{!false} +assert_equal 'true', %q{1 == 1} +assert_equal 'true', %q{1 != 2} +assert_equal 'true', %q{ + class C; def !=(obj); true; end; end + C.new != 1 +} +assert_equal 'true', %q{ + class C; def !@; true; end; end + !C.new +} +assert_normal_exit %q{ + eval "while true; return; end rescue p $!" +}, '[ruby-dev:31663]' +assert_equal '1', %q{ + def bar + raise + end + + def foo + 1.times{ + begin + return bar + rescue + :ok + end + } + end + + foo +} + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + next if counter != 0 + break + end + :ok +}, '[ruby-core:14385]' + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + next if counter != 0 + break :ok + end # direct +}, '[ruby-core:14385]' + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + "#{next}" + end + :ok +}, 'reported by Yusuke ENDOH' + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + redo + end + :ok +}, 'reported by Yusuke ENDOH' + +assert_equal 'ok', %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + "#{ redo }" + end + :ok +}, 'reported by Yusuke ENDOH' + +assert_normal_exit %q{ + begin + raise + rescue + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + retry + end + end +}, 'reported by Yusuke ENDOH' + +assert_normal_exit %q{ + counter = 2 + while true + counter -= 1 + break if counter == 0 + next + "#{ break }" + end +}, 'reported by Yusuke ENDOH' + +assert_normal_exit %q{ + counter = 2 + while true + counter -= 1 + next if counter != 0 + "#{ break }" + end +}, 'reported by Yusuke ENDOH' + +assert_equal 'ok', %q{ + 1.times do + [ + 1, 2, 3, 4, 5, 6, 7, 8, + begin + false ? next : p + break while true + end + ] + end + :ok +}, '[ruby-dev:32882]' + +assert_equal "1\n2\n", %q{ + i = 0 + while i<2 + i += 1 + next p(i) + end +} + +assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]') + +assert_equal 'ok', %q{ + def a() end + begin + if defined?(a(1).a) + :ng + else + :ok + end + rescue + :ng + end +}, '[ruby-core:16010]' + +assert_equal 'ok', %q{ + def a() end + begin + if defined?(a::B) + :ng + else + :ok + end + rescue + :ng + end +}, '[ruby-core:16010]' + +assert_normal_exit %q{ + defined? C && 0 +} + +assert_normal_exit %q{ + class C + def m + defined?(super()) + end + end + C.new.m +} + +assert_equal 'ok', %q{ + class X < RuntimeError;end + x = [X] + begin + raise X + rescue *x + :ok + end +}, '[ruby-core:14537]' + +assert_equal 'ok', %q{ + a = [false] + (a[0] &&= true) == false ? :ok : :ng +}, '[ruby-dev:34679]' + +assert_normal_exit %q{ + a = [] + 100.times {|i| a << i << nil << nil } + p a.compact! +} + diff --git a/lib/ruby-1.9.1-rc1/bootstraptest/test_thread.rb b/lib/ruby-1.9.1-rc1/bootstraptest/test_thread.rb new file mode 100644 index 0000000..ce90737 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/bootstraptest/test_thread.rb @@ -0,0 +1,371 @@ +# Thread and Fiber + +assert_equal %q{ok}, %q{ + Thread.new{ + }.join + :ok +} +assert_equal %q{ok}, %q{ + Thread.new{ + :ok + }.value +} +assert_equal %q{20100}, %q{ + v = 0 + (1..200).map{|i| + Thread.new{ + i + } + }.each{|t| + v += t.value + } + v +} +assert_equal %q{5000}, %q{ + 5000.times{|e| + (1..2).map{ + Thread.new{ + } + }.each{|e| + e.join() + } + } +} +assert_equal %q{5000}, %q{ + 5000.times{|e| + (1..2).map{ + Thread.new{ + } + }.each{|e| + e.join(1000000000) + } + } +} +assert_equal %q{5000}, %q{ + 5000.times{ + t = Thread.new{} + while t.alive? + Thread.pass + end + } +} +assert_equal %q{100}, %q{ + 100.times{ + Thread.new{loop{Thread.pass}} + } +} +assert_equal %q{ok}, %q{ + Thread.new{ + :ok + }.join.value +} +assert_equal %q{ok}, %q{ + begin + Thread.new{ + raise "ok" + }.join + rescue => e + e + end +} +assert_equal %q{ok}, %q{ + ans = nil + t = Thread.new{ + begin + sleep 0.5 + ensure + ans = :ok + end + } + Thread.pass + t.kill + t.join + ans +} +assert_equal %q{ok}, %q{ + t = Thread.new{ + sleep + } + sleep 0.1 + t.raise + begin + t.join + :ng + rescue + :ok + end +} +assert_equal %q{ok}, %q{ + t = Thread.new{ + loop{} + } + Thread.pass + t.raise + begin + t.join + :ng + rescue + :ok + end +} +assert_equal %q{ok}, %q{ + t = Thread.new{ + } + Thread.pass + t.join + t.raise # raise to exited thread + begin + t.join + :ok + rescue + :ng + end +} +assert_equal %q{run}, %q{ + t = Thread.new{ + loop{} + } + st = t.status + t.kill + st +} +assert_equal %q{sleep}, %q{ + t = Thread.new{ + sleep + } + sleep 0.1 + st = t.status + t.kill + st +} +assert_equal %q{false}, %q{ + t = Thread.new{ + } + t.kill + sleep 0.1 + t.status +} +assert_equal %q{[ThreadGroup, true]}, %q{ + ptg = Thread.current.group + Thread.new{ + ctg = Thread.current.group + [ctg.class, ctg == ptg] + }.value +} +assert_equal %q{[1, 1]}, %q{ + thg = ThreadGroup.new + + t = Thread.new{ + thg.add Thread.current + sleep + } + sleep 0.1 + [thg.list.size, ThreadGroup::Default.list.size] +} +assert_equal %q{true}, %q{ + thg = ThreadGroup.new + + t = Thread.new{sleep 5} + thg.add t + thg.list.include?(t) +} +assert_equal %q{[true, nil, true]}, %q{ + /a/ =~ 'a' + $a = $~ + Thread.new{ + $b = $~ + /a/ =~ 'a' + $c = $~ + } + $d = $~ + [$a == $d, $b, $c != $d] +} +assert_equal %q{11}, %q{ + Thread.current[:a] = 1 + Thread.new{ + Thread.current[:a] = 10 + Thread.pass + Thread.current[:a] + }.value + Thread.current[:a] +} +assert_equal %q{100}, %q{ +begin + 100.times do |i| + begin + Thread.start(Thread.current) {|u| u.raise } + raise + rescue + ensure + end + end +rescue + 100 +end +}, '[ruby-dev:31371]' + +assert_equal 'true', %{ + t = Thread.new { loop {} } + begin + pid = fork { + exit t.status != "run" + } + Process.wait pid + $?.success? + rescue NotImplementedError + true + end +} + +assert_finish 3, %{ + th = Thread.new {sleep 2} + th.join(1) + th.join +} + +assert_finish 3, %{ + require 'timeout' + th = Thread.new {sleep 2} + begin + Timeout.timeout(1) {th.join} + rescue Timeout::Error + end + th.join +} + +assert_normal_exit %q{ + STDERR.reopen(STDOUT) + exec "/" +} + +assert_normal_exit %q{ + (0..10).map { + Thread.new { + 10000.times { + Object.new.to_s + } + } + }.each {|t| + t.join + } +} + +assert_equal 'ok', %q{ + def m + t = Thread.new { while true do // =~ "" end } + sleep 0.1 + 10.times { + if /((ab)*(ab)*)*(b)/ =~ "ab"*7 + return :ng if !$4 + return :ng if $~.size != 5 + end + } + :ok + ensure + Thread.kill t + end + m +}, '[ruby-dev:34492]' + +assert_normal_exit %q{ + at_exit { Fiber.new{}.resume } +} + +assert_normal_exit %q{ + g = enum_for(:local_variables) + loop { g.next } +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + g = enum_for(:block_given?) + loop { g.next } +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + g = enum_for(:binding) + loop { g.next } +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + g = "abc".enum_for(:scan, /./) + loop { g.next } +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + g = Module.enum_for(:new) + loop { g.next } +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + Fiber.new(&Object.method(:class_eval)).resume("foo") +}, '[ruby-dev:34128]' + +assert_normal_exit %q{ + Thread.new("foo", &Object.method(:class_eval)).join +}, '[ruby-dev:34128]' + +assert_equal 'ok', %q{ + begin + Thread.new { Thread.stop } + Thread.stop + :ng + rescue Exception + :ok + end +} + +assert_equal 'ok', %q{ + begin + m1, m2 = Mutex.new, Mutex.new + Thread.new { m1.lock; sleep 1; m2.lock } + m2.lock; sleep 1; m1.lock + :ng + rescue Exception + :ok + end +} + +assert_equal 'ok', %q{ + m = Mutex.new + Thread.new { m.lock }; sleep 1; m.lock + :ok +} + +assert_equal 'ok', %q{ + m = Mutex.new + Thread.new { m.lock }; m.lock + :ok +} + +assert_equal 'ok', %q{ + m = Mutex.new + Thread.new { m.lock }.join; m.lock + :ok +} + +assert_equal 'ok', %q{ + m = Mutex.new + Thread.new { m.lock; sleep 2 } + sleep 1; m.lock + :ok +} + +assert_equal 'ok', %q{ + m = Mutex.new + Thread.new { m.lock; sleep 2; m.unlock } + sleep 1; m.lock + :ok +} + +assert_equal 'ok', %q{ + t = Thread.new {`echo`} + t.join + $? ? :ng : :ok +}, '[ruby-dev:35414]' + +assert_equal 'ok', %q{ + begin + 10000.times { Thread.new(true) {|x| x == false } } + rescue NoMemoryError, StandardError + end + :ok +} diff --git a/lib/ruby-1.9.1-rc1/class.c b/lib/ruby-1.9.1-rc1/class.c new file mode 100644 index 0000000..85450b2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/class.c @@ -0,0 +1,998 @@ +/********************************************************************** + + class.c - + + $Author: yugui $ + created at: Tue Aug 10 15:05:44 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "node.h" +#include + +extern st_table *rb_class_tbl; + +static VALUE +class_alloc(VALUE flags, VALUE klass) +{ + rb_classext_t *ext = ALLOC(rb_classext_t); + NEWOBJ(obj, struct RClass); + OBJSETUP(obj, klass, flags); + obj->ptr = ext; + RCLASS_IV_TBL(obj) = 0; + RCLASS_M_TBL(obj) = 0; + RCLASS_SUPER(obj) = 0; + RCLASS_IV_INDEX_TBL(obj) = 0; + return (VALUE)obj; +} + +VALUE +rb_class_boot(VALUE super) +{ + VALUE klass = class_alloc(T_CLASS, rb_cClass); + + RCLASS_SUPER(klass) = super; + RCLASS_M_TBL(klass) = st_init_numtable(); + + OBJ_INFECT(klass, super); + return (VALUE)klass; +} + +void +rb_check_inheritable(VALUE super) +{ + if (TYPE(super) != T_CLASS) { + rb_raise(rb_eTypeError, "superclass must be a Class (%s given)", + rb_obj_classname(super)); + } + if (RBASIC(super)->flags & FL_SINGLETON) { + rb_raise(rb_eTypeError, "can't make subclass of singleton class"); + } +} + +VALUE +rb_class_new(VALUE super) +{ + Check_Type(super, T_CLASS); + rb_check_inheritable(super); + if (super == rb_cClass) { + rb_raise(rb_eTypeError, "can't make subclass of Class"); + } + return rb_class_boot(super); +} + +struct clone_method_data { + st_table *tbl; + VALUE klass; +}; + +VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase); + +static int +clone_method(ID mid, NODE *body, struct clone_method_data *data) +{ + if (body == 0) { + st_insert(data->tbl, mid, 0); + } + else { + NODE *fbody = body->nd_body->nd_body; + + if (nd_type(fbody) == RUBY_VM_METHOD_NODE) { + fbody = NEW_NODE(RUBY_VM_METHOD_NODE, 0, + rb_iseq_clone((VALUE)fbody->nd_body, data->klass), + 0); + } + st_insert(data->tbl, mid, + (st_data_t) + NEW_FBODY( + NEW_METHOD(fbody, + data->klass, /* TODO */ + body->nd_body->nd_noex), + 0)); + } + return ST_CONTINUE; +} + +/* :nodoc: */ +VALUE +rb_mod_init_copy(VALUE clone, VALUE orig) +{ + rb_obj_init_copy(clone, orig); + if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) { + RBASIC(clone)->klass = rb_singleton_class_clone(orig); + } + RCLASS_SUPER(clone) = RCLASS_SUPER(orig); + if (RCLASS_IV_TBL(orig)) { + ID id; + + RCLASS_IV_TBL(clone) = st_copy(RCLASS_IV_TBL(orig)); + CONST_ID(id, "__classpath__"); + st_delete(RCLASS_IV_TBL(clone), (st_data_t*)&id, 0); + CONST_ID(id, "__classid__"); + st_delete(RCLASS_IV_TBL(clone), (st_data_t*)&id, 0); + } + if (RCLASS_M_TBL(orig)) { + struct clone_method_data data; + data.tbl = RCLASS_M_TBL(clone) = st_init_numtable(); + data.klass = clone; + st_foreach(RCLASS_M_TBL(orig), clone_method, + (st_data_t)&data); + } + + return clone; +} + +/* :nodoc: */ +VALUE +rb_class_init_copy(VALUE clone, VALUE orig) +{ + if (RCLASS_SUPER(clone) != 0) { + rb_raise(rb_eTypeError, "already initialized class"); + } + if (FL_TEST(orig, FL_SINGLETON)) { + rb_raise(rb_eTypeError, "can't copy singleton class"); + } + return rb_mod_init_copy(clone, orig); +} + +VALUE +rb_singleton_class_clone(VALUE obj) +{ + VALUE klass = RBASIC(obj)->klass; + + if (!FL_TEST(klass, FL_SINGLETON)) + return klass; + else { + struct clone_method_data data; + /* copy singleton(unnamed) class */ + VALUE clone = class_alloc(RBASIC(klass)->flags, 0); + + if (BUILTIN_TYPE(obj) == T_CLASS) { + RBASIC(clone)->klass = (VALUE)clone; + } + else { + RBASIC(clone)->klass = rb_singleton_class_clone(klass); + } + + RCLASS_SUPER(clone) = RCLASS_SUPER(klass); + if (RCLASS_IV_TBL(klass)) { + RCLASS_IV_TBL(clone) = st_copy(RCLASS_IV_TBL(klass)); + } + RCLASS_M_TBL(clone) = st_init_numtable(); + data.tbl = RCLASS_M_TBL(clone); + data.klass = (VALUE)clone; + st_foreach(RCLASS_M_TBL(klass), clone_method, + (st_data_t)&data); + rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone); + FL_SET(clone, FL_SINGLETON); + return (VALUE)clone; + } +} + +void +rb_singleton_class_attached(VALUE klass, VALUE obj) +{ + if (FL_TEST(klass, FL_SINGLETON)) { + ID attached; + if (!RCLASS_IV_TBL(klass)) { + RCLASS_IV_TBL(klass) = st_init_numtable(); + } + CONST_ID(attached, "__attached__"); + st_insert(RCLASS_IV_TBL(klass), attached, obj); + } +} + + +static VALUE +make_metametaclass(VALUE metaclass) +{ + VALUE metametaclass, super_of_metaclass; + + if (RBASIC(metaclass)->klass == metaclass) { /* for meta^(n)-class of Class */ + metametaclass = rb_class_boot(Qnil); + RBASIC(metametaclass)->klass = metametaclass; + } + else { + metametaclass = rb_class_boot(Qnil); + RBASIC(metametaclass)->klass = + (RBASIC(RBASIC(metaclass)->klass)->klass == RBASIC(metaclass)->klass) + ? make_metametaclass(RBASIC(metaclass)->klass) + : RBASIC(RBASIC(metaclass)->klass)->klass; + } + + FL_SET(metametaclass, FL_SINGLETON); + rb_singleton_class_attached(metametaclass, metaclass); + RBASIC(metaclass)->klass = metametaclass; + + super_of_metaclass = RCLASS_SUPER(metaclass); + while (FL_TEST(super_of_metaclass, T_ICLASS)) { + super_of_metaclass = RCLASS_SUPER(super_of_metaclass); + } + RCLASS_SUPER(metametaclass) = + rb_iv_get(RBASIC(super_of_metaclass)->klass, "__attached__") == super_of_metaclass + ? RBASIC(super_of_metaclass)->klass + : make_metametaclass(super_of_metaclass); + OBJ_INFECT(metametaclass, RCLASS_SUPER(metametaclass)); + + return metametaclass; +} + + +VALUE +rb_make_metaclass(VALUE obj, VALUE super) +{ + if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) { /* obj is a metaclass */ + return make_metametaclass(obj); + } + else { + VALUE metasuper; + VALUE klass = rb_class_boot(super); + + FL_SET(klass, FL_SINGLETON); + RBASIC(obj)->klass = klass; + rb_singleton_class_attached(klass, obj); + + metasuper = RBASIC(rb_class_real(super))->klass; + /* metaclass of a superclass may be NULL at boot time */ + if (metasuper) { + RBASIC(klass)->klass = metasuper; + } + return klass; + } +} + +VALUE +rb_define_class_id(ID id, VALUE super) +{ + VALUE klass; + + if (!super) super = rb_cObject; + klass = rb_class_new(super); + rb_make_metaclass(klass, RBASIC(super)->klass); + + return klass; +} + +VALUE +rb_class_inherited(VALUE super, VALUE klass) +{ + ID inherited; + if (!super) super = rb_cObject; + CONST_ID(inherited, "inherited"); + return rb_funcall(super, inherited, 1, klass); +} + +VALUE +rb_define_class(const char *name, VALUE super) +{ + VALUE klass; + ID id; + + id = rb_intern(name); + if (rb_const_defined(rb_cObject, id)) { + klass = rb_const_get(rb_cObject, id); + if (TYPE(klass) != T_CLASS) { + rb_raise(rb_eTypeError, "%s is not a class", name); + } + if (rb_class_real(RCLASS_SUPER(klass)) != super) { + rb_name_error(id, "%s is already defined", name); + } + return klass; + } + if (!super) { + rb_warn("no super class for `%s', Object assumed", name); + } + klass = rb_define_class_id(id, super); + st_add_direct(rb_class_tbl, id, klass); + rb_name_class(klass, id); + rb_const_set(rb_cObject, id, klass); + rb_class_inherited(super, klass); + + return klass; +} + +VALUE +rb_define_class_under(VALUE outer, const char *name, VALUE super) +{ + VALUE klass; + ID id; + + id = rb_intern(name); + if (rb_const_defined_at(outer, id)) { + klass = rb_const_get_at(outer, id); + if (TYPE(klass) != T_CLASS) { + rb_raise(rb_eTypeError, "%s is not a class", name); + } + if (rb_class_real(RCLASS_SUPER(klass)) != super) { + rb_name_error(id, "%s is already defined", name); + } + return klass; + } + if (!super) { + rb_warn("no super class for `%s::%s', Object assumed", + rb_class2name(outer), name); + } + klass = rb_define_class_id(id, super); + rb_set_class_path(klass, outer, name); + rb_const_set(outer, id, klass); + rb_class_inherited(super, klass); + + return klass; +} + +VALUE +rb_module_new(void) +{ + VALUE mdl = class_alloc(T_MODULE, rb_cModule); + + RCLASS_M_TBL(mdl) = st_init_numtable(); + + return (VALUE)mdl; +} + +VALUE +rb_define_module_id(ID id) +{ + VALUE mdl; + + mdl = rb_module_new(); + rb_name_class(mdl, id); + + return mdl; +} + +VALUE +rb_define_module(const char *name) +{ + VALUE module; + ID id; + + id = rb_intern(name); + if (rb_const_defined(rb_cObject, id)) { + module = rb_const_get(rb_cObject, id); + if (TYPE(module) == T_MODULE) + return module; + rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module)); + } + module = rb_define_module_id(id); + st_add_direct(rb_class_tbl, id, module); + rb_const_set(rb_cObject, id, module); + + return module; +} + +VALUE +rb_define_module_under(VALUE outer, const char *name) +{ + VALUE module; + ID id; + + id = rb_intern(name); + if (rb_const_defined_at(outer, id)) { + module = rb_const_get_at(outer, id); + if (TYPE(module) == T_MODULE) + return module; + rb_raise(rb_eTypeError, "%s::%s is not a module", + rb_class2name(outer), rb_obj_classname(module)); + } + module = rb_define_module_id(id); + rb_const_set(outer, id, module); + rb_set_class_path(module, outer, name); + + return module; +} + +static VALUE +include_class_new(VALUE module, VALUE super) +{ + VALUE klass = class_alloc(T_ICLASS, rb_cClass); + + if (BUILTIN_TYPE(module) == T_ICLASS) { + module = RBASIC(module)->klass; + } + if (!RCLASS_IV_TBL(module)) { + RCLASS_IV_TBL(module) = st_init_numtable(); + } + RCLASS_IV_TBL(klass) = RCLASS_IV_TBL(module); + RCLASS_M_TBL(klass) = RCLASS_M_TBL(module); + RCLASS_SUPER(klass) = super; + if (TYPE(module) == T_ICLASS) { + RBASIC(klass)->klass = RBASIC(module)->klass; + } + else { + RBASIC(klass)->klass = module; + } + OBJ_INFECT(klass, module); + OBJ_INFECT(klass, super); + + return (VALUE)klass; +} + +void +rb_include_module(VALUE klass, VALUE module) +{ + VALUE p, c; + int changed = 0; + + rb_frozen_class_p(klass); + if (!OBJ_UNTRUSTED(klass)) { + rb_secure(4); + } + + if (TYPE(module) != T_MODULE) { + Check_Type(module, T_MODULE); + } + + OBJ_INFECT(klass, module); + c = klass; + while (module) { + int superclass_seen = Qfalse; + + if (RCLASS_M_TBL(klass) == RCLASS_M_TBL(module)) + rb_raise(rb_eArgError, "cyclic include detected"); + /* ignore if the module included already in superclasses */ + for (p = RCLASS_SUPER(klass); p; p = RCLASS_SUPER(p)) { + switch (BUILTIN_TYPE(p)) { + case T_ICLASS: + if (RCLASS_M_TBL(p) == RCLASS_M_TBL(module)) { + if (!superclass_seen) { + c = p; /* move insertion point */ + } + goto skip; + } + break; + case T_CLASS: + superclass_seen = Qtrue; + break; + } + } + c = RCLASS_SUPER(c) = include_class_new(module, RCLASS_SUPER(c)); + changed = 1; + skip: + module = RCLASS_SUPER(module); + } + if (changed) rb_clear_cache(); +} + +/* + * call-seq: + * mod.included_modules -> array + * + * Returns the list of modules included in mod. + * + * module Mixin + * end + * + * module Outer + * include Mixin + * end + * + * Mixin.included_modules #=> [] + * Outer.included_modules #=> [Mixin] + */ + +VALUE +rb_mod_included_modules(VALUE mod) +{ + VALUE ary = rb_ary_new(); + VALUE p; + + for (p = RCLASS_SUPER(mod); p; p = RCLASS_SUPER(p)) { + if (BUILTIN_TYPE(p) == T_ICLASS) { + rb_ary_push(ary, RBASIC(p)->klass); + } + } + return ary; +} + +/* + * call-seq: + * mod.include?(module) => true or false + * + * Returns true if module is included in + * mod or one of mod's ancestors. + * + * module A + * end + * class B + * include A + * end + * class C < B + * end + * B.include?(A) #=> true + * C.include?(A) #=> true + * A.include?(A) #=> false + */ + +VALUE +rb_mod_include_p(VALUE mod, VALUE mod2) +{ + VALUE p; + + Check_Type(mod2, T_MODULE); + for (p = RCLASS_SUPER(mod); p; p = RCLASS_SUPER(p)) { + if (BUILTIN_TYPE(p) == T_ICLASS) { + if (RBASIC(p)->klass == mod2) return Qtrue; + } + } + return Qfalse; +} + +/* + * call-seq: + * mod.ancestors -> array + * + * Returns a list of modules included in mod (including + * mod itself). + * + * module Mod + * include Math + * include Comparable + * end + * + * Mod.ancestors #=> [Mod, Comparable, Math] + * Math.ancestors #=> [Math] + */ + +VALUE +rb_mod_ancestors(VALUE mod) +{ + VALUE p, ary = rb_ary_new(); + + for (p = mod; p; p = RCLASS_SUPER(p)) { + if (FL_TEST(p, FL_SINGLETON)) + continue; + if (BUILTIN_TYPE(p) == T_ICLASS) { + rb_ary_push(ary, RBASIC(p)->klass); + } + else { + rb_ary_push(ary, p); + } + } + return ary; +} + +#define VISI(x) ((x)&NOEX_MASK) +#define VISI_CHECK(x,f) (VISI(x) == (f)) + +static int +ins_methods_push(ID name, long type, VALUE ary, long visi) +{ + if (type == -1) return ST_CONTINUE; + + switch (visi) { + case NOEX_PRIVATE: + case NOEX_PROTECTED: + case NOEX_PUBLIC: + visi = (type == visi); + break; + default: + visi = (type != NOEX_PRIVATE); + break; + } + if (visi) { + rb_ary_push(ary, ID2SYM(name)); + } + return ST_CONTINUE; +} + +static int +ins_methods_i(ID name, long type, VALUE ary) +{ + return ins_methods_push(name, type, ary, -1); /* everything but private */ +} + +static int +ins_methods_prot_i(ID name, long type, VALUE ary) +{ + return ins_methods_push(name, type, ary, NOEX_PROTECTED); +} + +static int +ins_methods_priv_i(ID name, long type, VALUE ary) +{ + return ins_methods_push(name, type, ary, NOEX_PRIVATE); +} + +static int +ins_methods_pub_i(ID name, long type, VALUE ary) +{ + return ins_methods_push(name, type, ary, NOEX_PUBLIC); +} + +static int +method_entry(ID key, NODE *body, st_table *list) +{ + long type; + + if (key == ID_ALLOCATOR) { + return ST_CONTINUE; + } + + if (!st_lookup(list, key, 0)) { + if (body ==0 || !body->nd_body->nd_body) { + type = -1; /* none */ + } + else { + type = VISI(body->nd_body->nd_noex); + } + st_add_direct(list, key, type); + } + return ST_CONTINUE; +} + +static VALUE +class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, long, VALUE)) +{ + VALUE ary; + int recur; + st_table *list; + + if (argc == 0) { + recur = Qtrue; + } + else { + VALUE r; + rb_scan_args(argc, argv, "01", &r); + recur = RTEST(r); + } + + list = st_init_numtable(); + for (; mod; mod = RCLASS_SUPER(mod)) { + st_foreach(RCLASS_M_TBL(mod), method_entry, (st_data_t)list); + if (BUILTIN_TYPE(mod) == T_ICLASS) continue; + if (FL_TEST(mod, FL_SINGLETON)) continue; + if (!recur) break; + } + ary = rb_ary_new(); + st_foreach(list, func, ary); + st_free_table(list); + + return ary; +} + +/* + * call-seq: + * mod.instance_methods(include_super=true) => array + * + * Returns an array containing the names of instance methods that is callable + * from outside in the receiver. For a module, these are the public methods; + * for a class, they are the instance (not singleton) methods. With no + * argument, or with an argument that is false, the + * instance methods in mod are returned, otherwise the methods + * in mod and mod's superclasses are returned. + * + * module A + * def method1() end + * end + * class B + * def method2() end + * end + * class C < B + * def method3() end + * end + * + * A.instance_methods #=> [:method1] + * B.instance_methods(false) #=> [:method2] + * C.instance_methods(false) #=> [:method3] + * C.instance_methods(true).length #=> 43 + */ + +VALUE +rb_class_instance_methods(int argc, VALUE *argv, VALUE mod) +{ + return class_instance_method_list(argc, argv, mod, ins_methods_i); +} + +/* + * call-seq: + * mod.protected_instance_methods(include_super=true) => array + * + * Returns a list of the protected instance methods defined in + * mod. If the optional parameter is not false, the + * methods of any ancestors are included. + */ + +VALUE +rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod) +{ + return class_instance_method_list(argc, argv, mod, ins_methods_prot_i); +} + +/* + * call-seq: + * mod.private_instance_methods(include_super=true) => array + * + * Returns a list of the private instance methods defined in + * mod. If the optional parameter is not false, the + * methods of any ancestors are included. + * + * module Mod + * def method1() end + * private :method1 + * def method2() end + * end + * Mod.instance_methods #=> [:method2] + * Mod.private_instance_methods #=> [:method1] + */ + +VALUE +rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod) +{ + return class_instance_method_list(argc, argv, mod, ins_methods_priv_i); +} + +/* + * call-seq: + * mod.public_instance_methods(include_super=true) => array + * + * Returns a list of the public instance methods defined in mod. + * If the optional parameter is not false, the methods of + * any ancestors are included. + */ + +VALUE +rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod) +{ + return class_instance_method_list(argc, argv, mod, ins_methods_pub_i); +} + +/* + * call-seq: + * obj.singleton_methods(all=true) => array + * + * Returns an array of the names of singleton methods for obj. + * If the optional all parameter is true, the list will include + * methods in modules included in obj. + * + * module Other + * def three() end + * end + * + * class Single + * def Single.four() end + * end + * + * a = Single.new + * + * def a.one() + * end + * + * class << a + * include Other + * def two() + * end + * end + * + * Single.singleton_methods #=> [:four] + * a.singleton_methods(false) #=> [:two, :one] + * a.singleton_methods #=> [:two, :one, :three] + */ + +VALUE +rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj) +{ + VALUE recur, ary, klass; + st_table *list; + + if (argc == 0) { + recur = Qtrue; + } + else { + rb_scan_args(argc, argv, "01", &recur); + } + klass = CLASS_OF(obj); + list = st_init_numtable(); + if (klass && FL_TEST(klass, FL_SINGLETON)) { + st_foreach(RCLASS_M_TBL(klass), method_entry, (st_data_t)list); + klass = RCLASS_SUPER(klass); + } + if (RTEST(recur)) { + while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) { + st_foreach(RCLASS_M_TBL(klass), method_entry, (st_data_t)list); + klass = RCLASS_SUPER(klass); + } + } + ary = rb_ary_new(); + st_foreach(list, ins_methods_i, ary); + st_free_table(list); + + return ary; +} + +void +rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc) +{ + rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC); +} + +void +rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC); +} + +void +rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED); +} + +void +rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE); +} + +void +rb_undef_method(VALUE klass, const char *name) +{ + rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF); +} + +#define SPECIAL_SINGLETON(x,c) do {\ + if (obj == (x)) {\ + return c;\ + }\ +} while (0) + +VALUE +rb_singleton_class(VALUE obj) +{ + VALUE klass; + + if (FIXNUM_P(obj) || SYMBOL_P(obj)) { + rb_raise(rb_eTypeError, "can't define singleton"); + } + if (rb_special_const_p(obj)) { + SPECIAL_SINGLETON(Qnil, rb_cNilClass); + SPECIAL_SINGLETON(Qfalse, rb_cFalseClass); + SPECIAL_SINGLETON(Qtrue, rb_cTrueClass); + rb_bug("unknown immediate %ld", obj); + } + + if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) && + rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) { + klass = RBASIC(obj)->klass; + } + else { + klass = rb_make_metaclass(obj, RBASIC(obj)->klass); + } + + if (BUILTIN_TYPE(obj) == T_CLASS) { + if (rb_iv_get(RBASIC(klass)->klass, "__attached__") != klass) + make_metametaclass(klass); + } + if (OBJ_TAINTED(obj)) { + OBJ_TAINT(klass); + } + else { + FL_UNSET(klass, FL_TAINT); + } + if (OBJ_UNTRUSTED(obj)) { + OBJ_UNTRUST(klass); + } + else { + FL_UNSET(klass, FL_UNTRUSTED); + } + if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass); + + return klass; +} + +void +rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_define_method(rb_singleton_class(obj), name, func, argc); +} + +void +rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_define_private_method(module, name, func, argc); + rb_define_singleton_method(module, name, func, argc); +} + +void +rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc) +{ + rb_define_module_function(rb_mKernel, name, func, argc); +} + +void +rb_define_alias(VALUE klass, const char *name1, const char *name2) +{ + rb_alias(klass, rb_intern(name1), rb_intern(name2)); +} + +void +rb_define_attr(VALUE klass, const char *name, int read, int write) +{ + rb_attr(klass, rb_intern(name), read, write, Qfalse); +} + +#include + +int +rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...) +{ + int n, i = 0; + const char *p = fmt; + VALUE *var; + va_list vargs; + + va_start(vargs, fmt); + + if (*p == '*') goto rest_arg; + + if (ISDIGIT(*p)) { + n = *p - '0'; + if (n > argc) + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n); + for (i=0; i i) { + if (var) *var = argv[i]; + } + else { + if (var) *var = Qnil; + } + } + p++; + } + + if(*p == '*') { + rest_arg: + var = va_arg(vargs, VALUE*); + if (argc > i) { + if (var) *var = rb_ary_new4(argc-i, argv+i); + i = argc; + } + else { + if (var) *var = rb_ary_new(); + } + p++; + } + + if (*p == '&') { + var = va_arg(vargs, VALUE*); + if (rb_block_given_p()) { + *var = rb_block_proc(); + } + else { + *var = Qnil; + } + p++; + } + va_end(vargs); + + if (*p != '\0') { + goto error; + } + + if (argc > i) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i); + } + + return argc; + + error: + rb_fatal("bad scan arg format: %s", fmt); + return 0; +} diff --git a/lib/ruby-1.9.1-rc1/common.mk b/lib/ruby-1.9.1-rc1/common.mk new file mode 100644 index 0000000..5cedf98 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/common.mk @@ -0,0 +1,758 @@ +bin: $(PROGRAM) $(WPROGRAM) +lib: $(LIBRUBY) +dll: $(LIBRUBY_SO) + +.SUFFIXES: .inc .h .c .y + +RUBYLIB = - +RUBYOPT = - + +SPEC_GIT_BASE = git://github.com/rubyspec +MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git +RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git + +STATIC_RUBY = static-ruby + +EXTCONF = extconf.rb +RBCONFIG = ./.rbconfig.time +LIBRUBY_EXTS = ./.libruby-with-ext.time +RDOCOUT = $(EXTOUT)/rdoc +ID_H_TARGET = -id.h- + +DMYEXT = dmyext.$(OBJEXT) +NORMALMAINOBJ = main.$(OBJEXT) +MAINOBJ = $(NORMALMAINOBJ) +EXTOBJS = +DLDOBJS = $(DMYEXT) +MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) miniprelude.$(OBJEXT) +ENC_MK = enc.mk + +COMMONOBJS = array.$(OBJEXT) \ + bignum.$(OBJEXT) \ + class.$(OBJEXT) \ + compar.$(OBJEXT) \ + complex.$(OBJEXT) \ + dir.$(OBJEXT) \ + enum.$(OBJEXT) \ + enumerator.$(OBJEXT) \ + error.$(OBJEXT) \ + eval.$(OBJEXT) \ + load.$(OBJEXT) \ + proc.$(OBJEXT) \ + file.$(OBJEXT) \ + gc.$(OBJEXT) \ + hash.$(OBJEXT) \ + inits.$(OBJEXT) \ + io.$(OBJEXT) \ + marshal.$(OBJEXT) \ + math.$(OBJEXT) \ + numeric.$(OBJEXT) \ + object.$(OBJEXT) \ + pack.$(OBJEXT) \ + parse.$(OBJEXT) \ + process.$(OBJEXT) \ + random.$(OBJEXT) \ + range.$(OBJEXT) \ + rational.$(OBJEXT) \ + re.$(OBJEXT) \ + regcomp.$(OBJEXT) \ + regenc.$(OBJEXT) \ + regerror.$(OBJEXT) \ + regexec.$(OBJEXT) \ + regparse.$(OBJEXT) \ + regsyntax.$(OBJEXT) \ + ruby.$(OBJEXT) \ + safe.$(OBJEXT) \ + signal.$(OBJEXT) \ + sprintf.$(OBJEXT) \ + st.$(OBJEXT) \ + strftime.$(OBJEXT) \ + string.$(OBJEXT) \ + struct.$(OBJEXT) \ + time.$(OBJEXT) \ + transcode.$(OBJEXT) \ + util.$(OBJEXT) \ + variable.$(OBJEXT) \ + version.$(OBJEXT) \ + compile.$(OBJEXT) \ + debug.$(OBJEXT) \ + iseq.$(OBJEXT) \ + vm.$(OBJEXT) \ + vm_dump.$(OBJEXT) \ + thread.$(OBJEXT) \ + cont.$(OBJEXT) \ + $(BUILTIN_ENCOBJS) \ + $(BUILTIN_TRANSOBJS) \ + $(MISSING) + +OBJS = dln.$(OBJEXT) \ + encoding.$(OBJEXT) \ + prelude.$(OBJEXT) \ + $(COMMONOBJS) + +GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) + +PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb +PRELUDES = prelude.c miniprelude.c +GOLFPRELUDES = golf_prelude.c + +SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \ + --extout="$(EXTOUT)" \ + --mflags="$(MFLAGS)" \ + --make-flags="$(MAKEFLAGS)" +EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \ + --make-flags="MINIRUBY='$(MINIRUBY)'" -- +INSTRUBY_ARGS = $(SCRIPT_ARGS) \ + --data-mode=$(INSTALL_DATA_MODE) \ + --prog-mode=$(INSTALL_PROG_MODE) \ + --installed-list $(INSTALLED_LIST) +INSTALL_PROG_MODE = 0755 +INSTALL_DATA_MODE = 0644 + +PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil' -- \ + $(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE) + +TESTSDIR = $(srcdir)/test +TESTWORKDIR = testwork + +TESTRUN_SCRIPT = $(srcdir)/test.rb + +BOOTSTRAPRUBY = $(BASERUBY) + +COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb + +VCS = svn + +all: encs exts +exts: $(MKFILES) incs $(PREP) $(RBCONFIG) $(LIBRUBY) + @$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS) +prog: $(PROGRAM) $(WPROGRAM) + +loadpath: $(PREP) + $(MINIRUBY) -e 'p $$:' + +$(PREP): $(MKFILES) + +miniruby$(EXEEXT): config.status $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) + +GORUBY = go$(RUBY_INSTALL_NAME) +golf: $(LIBRUBY) $(GOLFOBJS) + $(MAKE) $(MFLAGS) MAINOBJ="$(GOLFOBJS)" PROGRAM=$(GORUBY)$(EXEEXT) program + +program: $(PROGRAM) + +$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP) + +$(LIBRUBY_A): $(OBJS) $(DMYEXT) $(ARCHFILE) + +$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS) + +$(LIBRUBY_EXTS): + @exit > $@ + +$(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) + @$(RM) $@ + $(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS) + +ruby.imp: $(COMMONOBJS) + @$(NM) -Pgp $(COMMONOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@ + +install: install-nodoc $(RDOCTARGET) +install-all: install-nodoc install-doc + +install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc +pre-install-nodoc:: pre-install-local pre-install-ext +do-install-nodoc: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)" +post-install-nodoc:: post-install-local post-install-ext + +install-local: pre-install-local do-install-local post-install-local +pre-install-local:: pre-install-bin pre-install-lib pre-install-man +do-install-local: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)" +post-install-local:: post-install-bin post-install-lib post-install-man + +install-ext: pre-install-ext do-install-ext post-install-ext +pre-install-ext:: pre-install-ext-arch pre-install-ext-comm +do-install-ext: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext +post-install-ext:: post-install-ext-arch post-install-ext-comm + +install-arch: pre-install-arch do-install-arch post-install-arch +pre-install-arch:: pre-install-bin pre-install-ext-arch +do-install-arch: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch +post-install-arch:: post-install-bin post-install-ext-arch + +install-comm: pre-install-comm do-install-comm post-install-comm +pre-install-comm:: pre-install-lib pre-install-ext-comm pre-install-man +do-install-comm: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man +post-install-comm:: post-install-lib post-install-ext-comm post-install-man + +install-bin: pre-install-bin do-install-bin post-install-bin +pre-install-bin:: install-prereq +do-install-bin: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin +post-install-bin:: + @$(NULLCMD) + +install-lib: pre-install-lib do-install-lib post-install-lib +pre-install-lib:: install-prereq +do-install-lib: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib +post-install-lib:: + @$(NULLCMD) + +install-ext-comm: pre-install-ext-comm do-install-ext-comm post-install-ext-comm +pre-install-ext-comm:: install-prereq +do-install-ext-comm: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm +post-install-ext-comm:: + @$(NULLCMD) + +install-ext-arch: pre-install-ext-arch do-install-ext-arch post-install-ext-arch +pre-install-ext-arch:: install-prereq +do-install-ext-arch: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch +post-install-ext-arch:: + @$(NULLCMD) + +install-man: pre-install-man do-install-man post-install-man +pre-install-man:: install-prereq +do-install-man: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)" +post-install-man:: + @$(NULLCMD) + +what-where: no-install +no-install: no-install-nodoc no-install-doc +what-where-all: no-install-all +no-install-all: no-install-nodoc + +what-where-nodoc: no-install-nodoc +no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc +pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext +dont-install-nodoc: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)" +post-no-install-nodoc:: post-no-install-local post-no-install-ext + +what-where-local: no-install-local +no-install-local: pre-no-install-local dont-install-local post-no-install-local +pre-no-install-local:: pre-no-install-bin pre-no-install-lib pre-no-install-man +dont-install-local: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)" +post-no-install-local:: post-no-install-bin post-no-install-lib post-no-install-man + +what-where-ext: no-install-ext +no-install-ext: pre-no-install-ext dont-install-ext post-no-install-ext +pre-no-install-ext:: pre-no-install-ext-arch pre-no-install-ext-comm +dont-install-ext: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext +post-no-install-ext:: post-no-install-ext-arch post-no-install-ext-comm + +what-where-arch: no-install-arch +no-install-arch: pre-no-install-arch dont-install-arch post-no-install-arch +pre-no-install-arch:: pre-no-install-bin pre-no-install-ext-arch +dont-install-arch: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch +post-no-install-arch:: post-no-install-lib post-no-install-man post-no-install-ext-arch + +what-where-comm: no-install-comm +no-install-comm: pre-no-install-comm dont-install-comm post-no-install-comm +pre-no-install-comm:: pre-no-install-lib pre-no-install-ext-comm pre-no-install-man +dont-install-comm: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man +post-no-install-comm:: post-no-install-lib post-no-install-ext-comm post-no-install-man + +what-where-bin: no-install-bin +no-install-bin: pre-no-install-bin dont-install-bin post-no-install-bin +pre-no-install-bin:: install-prereq +dont-install-bin: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin +post-no-install-bin:: + @$(NULLCMD) + +what-where-lib: no-install-lib +no-install-lib: pre-no-install-lib dont-install-lib post-no-install-lib +pre-no-install-lib:: install-prereq +dont-install-lib: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib +post-no-install-lib:: + @$(NULLCMD) + +what-where-ext-comm: no-install-ext-comm +no-install-ext-comm: pre-no-install-ext-comm dont-install-ext-comm post-no-install-ext-comm +pre-no-install-ext-comm:: install-prereq +dont-install-ext-comm: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm +post-no-install-ext-comm:: + @$(NULLCMD) + +what-where-ext-arch: no-install-ext-arch +no-install-ext-arch: pre-no-install-ext-arch dont-install-ext-arch post-no-install-ext-arch +pre-no-install-ext-arch:: install-prereq +dont-install-ext-arch: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch +post-no-install-ext-arch:: + @$(NULLCMD) + +what-where-man: no-install-man +no-install-man: pre-no-install-man dont-install-man post-no-install-man +pre-no-install-man:: install-prereq +dont-install-man: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)" +post-no-install-man:: + @$(NULLCMD) + +install-doc: rdoc pre-install-doc do-install-doc post-install-doc +pre-install-doc:: install-prereq +do-install-doc: $(PROGRAM) + $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)" +post-install-doc:: + @$(NULLCMD) + +rdoc: $(PROGRAM) PHONY + @echo Generating RDoc documentation + $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)" + +what-where-doc: no-install-doc +no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc +pre-no-install-doc:: install-prereq +dont-install-doc:: $(PREP) + $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)" +post-no-install-doc:: + @$(NULLCMD) + +CLEAR_INSTALLED_LIST = clear-installed-list + +install-prereq: $(CLEAR_INSTALLED_LIST) + +clear-installed-list: + @exit > $(INSTALLED_LIST) + +clean: clean-ext clean-local clean-enc clean-golf +clean-local:: + @$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES) + @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time + @$(RM) *.inc y.tab.c y.output encdb.h transdb.h +clean-ext:: +clean-enc: + @-$(MAKE) -f $(ENC_MK) $(MFLAGS) clean +clean-golf: + @$(RM) $(GORUBY)$(EXEEXT) $(GOLFOBJS) + +distclean: distclean-ext distclean-local distclean-enc distclean-golf +distclean-local:: clean-local + @$(RM) $(MKFILES) $(arch_hdrdir)/ruby/config.h rbconfig.rb yasmdata.rb encdb.h + @$(RM) config.cache config.log config.status config.status.lineno $(PRELUDES) + @$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP) +distclean-ext:: +distclean-enc: clean-enc + @-$(MAKE) -f $(ENC_MK) $(MFLAGS) distclean +distclean-golf: clean-golf + @$(RM) $(GOLFPRELUDES) + +realclean:: realclean-ext realclean-local realclean-enc realclean-golf +realclean-local:: distclean-local + @$(RM) parse.c parse.h lex.c newline.c revision.h +realclean-ext:: +realclean-enc:: distclean-enc +realclean-golf: distclean-golf + +check: test test-all + +btest: miniruby$(EXEEXT) PHONY + $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(MINIRUBY)" $(OPTS) + +btest-ruby: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY + @$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib" -q + +test-sample: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY + @$(MINIRUBY) $(srcdir)/rubytest.rb + +test-knownbug: miniruby$(EXEEXT) $(PROGRAM) $(RBCONFIG) PHONY + $(MINIRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(OPTS) $(srcdir)/KNOWNBUGS.rb + +test: test-sample btest-ruby test-knownbug + +test-all: + $(RUNRUBY) "$(srcdir)/test/runner.rb" $(TESTS) + +extconf: $(PREP) + $(MAKEDIRS) "$(EXTCONFDIR)" + $(RUNRUBY) -C "$(EXTCONFDIR)" $(EXTCONF) $(EXTCONFARGS) + +$(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) + @$(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=$@ \ + -install_name=$(RUBY_INSTALL_NAME) \ + -so_name=$(RUBY_SO_NAME) rbconfig.rb + +encs: enc trans +encs enc trans: $(ENC_MK) $(LIBRUBY) $(PREP) + $(MAKE) -f $(ENC_MK) RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) $@ + +enc: {$(VPATH)}encdb.h +trans: {$(VPATH)}transdb.h + +$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \ + $(srcdir)/lib/mkmf.rb $(RBCONFIG) + $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" $@ $(ENCS) + +.PRECIOUS: $(MKFILES) + +.PHONY: test install install-nodoc install-doc dist + +PHONY: + +{$(VPATH)}parse.c: {$(VPATH)}parse.y $(srcdir)/tool/ytab.sed +parse.h {$(VPATH)}parse.h: {$(VPATH)}parse.c + +{$(srcdir)}.y.c: + $(YACC) -d $(YFLAGS) -o y.tab.c $(<:\\=/) + sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new + @$(MV) $@.new $@ + sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse\.y/d" y.tab.h > $(@:.c=.h).new + @$(IFCHANGE) $(@:.c=.h) $(@:.c=.h).new + @$(RM) y.tab.c y.tab.h + +acosh.$(OBJEXT): {$(VPATH)}acosh.c +alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h +crypt.$(OBJEXT): {$(VPATH)}crypt.c +dup2.$(OBJEXT): {$(VPATH)}dup2.c +erf.$(OBJEXT): {$(VPATH)}erf.c +finite.$(OBJEXT): {$(VPATH)}finite.c +flock.$(OBJEXT): {$(VPATH)}flock.c +memcmp.$(OBJEXT): {$(VPATH)}memcmp.c +memmove.$(OBJEXT): {$(VPATH)}memmove.c +mkdir.$(OBJEXT): {$(VPATH)}mkdir.c +strchr.$(OBJEXT): {$(VPATH)}strchr.c +strdup.$(OBJEXT): {$(VPATH)}strdup.c +strerror.$(OBJEXT): {$(VPATH)}strerror.c +strstr.$(OBJEXT): {$(VPATH)}strstr.c +strtod.$(OBJEXT): {$(VPATH)}strtod.c +strtol.$(OBJEXT): {$(VPATH)}strtol.c +nt.$(OBJEXT): {$(VPATH)}nt.c +os2.$(OBJEXT): {$(VPATH)}os2.c +dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c +ia64.$(OBJEXT): {$(VPATH)}ia64.s + $(CC) $(CFLAGS) -c $< + +# when I use -I., there is confliction at "OpenFile" +# so, set . into environment varible "include" +win32.$(OBJEXT): {$(VPATH)}win32.c $(RUBY_H_INCLUDES) + +### + +RUBY_H_INCLUDES = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \ + {$(VPATH)}intern.h {$(VPATH)}missing.h {$(VPATH)}st.h +ENCODING_H_INCLUDES= {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h +ID_H_INCLUDES = {$(VPATH)}id.h +VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}vm_opts.h \ + {$(VPATH)}thread_$(THREAD_MODEL).h \ + {$(VPATH)}node.h $(ID_H_INCLUDES) + +array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h +bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) +class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h +compar.$(OBJEXT): {$(VPATH)}compar.c $(RUBY_H_INCLUDES) +complex.$(OBJEXT): {$(VPATH)}complex.c $(RUBY_H_INCLUDES) +dir.$(OBJEXT): {$(VPATH)}dir.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \ + $(ENCODING_H_INCLUDES) +dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}dln.h $(RUBY_H_INCLUDES) +dmydln.$(OBJEXT): {$(VPATH)}dmydln.c dln.$(OBJEXT) +dmyext.$(OBJEXT): {$(VPATH)}dmyext.c +dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}regenc.h {$(VPATH)}util.h $(ENCODING_H_INCLUDES) \ + {$(VPATH)}encoding.c +encoding.$(OBJEXT): {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) {$(VPATH)}regenc.h {$(VPATH)}util.h +enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \ + {$(VPATH)}util.h +enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES) +error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \ + $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \ + {$(VPATH)}eval_jump.c {$(VPATH)}debug.h \ + {$(VPATH)}iseq.h +load.$(OBJEXT): {$(VPATH)}load.c {$(VPATH)}eval_intern.h \ + {$(VPATH)}util.h $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) \ + {$(VPATH)}dln.h {$(VPATH)}debug.h +file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \ + $(ENCODING_H_INCLUDES) {$(VPATH)}util.h {$(VPATH)}dln.h +gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \ + {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \ + {$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \ + {$(VPATH)}debug.h +hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h +inits.$(OBJEXT): {$(VPATH)}inits.c $(RUBY_H_INCLUDES) +io.$(OBJEXT): {$(VPATH)}io.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \ + {$(VPATH)}util.h $(ENCODING_H_INCLUDES) +main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}debug.h \ + {$(VPATH)}node.h +marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \ + $(ENCODING_H_INCLUDES) {$(VPATH)}util.h +math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES) +numeric.$(OBJEXT): {$(VPATH)}numeric.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) +object.$(OBJEXT): {$(VPATH)}object.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h +pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES) +parse.$(OBJEXT): {$(VPATH)}parse.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}node.h $(ENCODING_H_INCLUDES) $(ID_H_INCLUDES) \ + {$(VPATH)}regenc.h {$(VPATH)}regex.h {$(VPATH)}util.h {$(VPATH)}lex.c \ + {$(VPATH)}defs/keywords {$(VPATH)}id.c +proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \ + $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \ + {$(VPATH)}debug.h +process.$(OBJEXT): {$(VPATH)}process.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}util.h {$(VPATH)}io.h $(ENCODING_H_INCLUDES) {$(VPATH)}dln.h \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +random.$(OBJEXT): {$(VPATH)}random.c $(RUBY_H_INCLUDES) +range.$(OBJEXT): {$(VPATH)}range.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) +rational.$(OBJEXT): {$(VPATH)}rational.c $(RUBY_H_INCLUDES) +re.$(OBJEXT): {$(VPATH)}re.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \ + {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) {$(VPATH)}util.h \ + {$(VPATH)}regint.h {$(VPATH)}regenc.h +regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}regparse.h \ + {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h \ + $(RUBY_H_INCLUDES) +regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES) +regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES) +regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES) +regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}regparse.h \ + {$(VPATH)}regint.h {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h \ + $(RUBY_H_INCLUDES) +regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c {$(VPATH)}regint.h \ + {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES) +ruby.$(OBJEXT): {$(VPATH)}ruby.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \ + $(ENCODING_H_INCLUDES) {$(VPATH)}eval_intern.h $(VM_CORE_H_INCLUDES) \ + {$(VPATH)}dln.h {$(VPATH)}debug.h +safe.$(OBJEXT): {$(VPATH)}safe.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \ + {$(VPATH)}regex.h {$(VPATH)}vsnprintf.c $(ENCODING_H_INCLUDES) +st.$(OBJEXT): {$(VPATH)}st.c {$(VPATH)}config.h {$(VPATH)}defines.h \ + {$(VPATH)}st.h {$(VPATH)}ruby.h {$(VPATH)}missing.h {$(VPATH)}intern.h +strftime.$(OBJEXT): {$(VPATH)}strftime.c {$(VPATH)}ruby.h \ + {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}missing.h \ + {$(VPATH)}intern.h {$(VPATH)}st.h +string.$(OBJEXT): {$(VPATH)}string.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \ + {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) +struct.$(OBJEXT): {$(VPATH)}struct.c $(RUBY_H_INCLUDES) +thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \ + $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \ + {$(VPATH)}debug.h {$(VPATH)}thread_$(THREAD_MODEL).c +transcode.$(OBJEXT): {$(VPATH)}transcode.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) {$(VPATH)}transcode_data.h +cont.$(OBJEXT): {$(VPATH)}cont.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}gc.h {$(VPATH)}eval_intern.h \ + {$(VPATH)}debug.h +time.$(OBJEXT): {$(VPATH)}time.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) +util.$(OBJEXT): {$(VPATH)}util.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h +variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}node.h {$(VPATH)}util.h +version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}version.h $(srcdir)/revision.h + +compile.$(OBJEXT): {$(VPATH)}compile.c {$(VPATH)}iseq.h \ + $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}insns.inc \ + {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc {$(VPATH)}debug.h +iseq.$(OBJEXT): {$(VPATH)}iseq.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \ + $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}insns.inc \ + {$(VPATH)}insns_info.inc {$(VPATH)}node_name.inc {$(VPATH)}debug.h +vm.$(OBJEXT): {$(VPATH)}vm.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \ + {$(VPATH)}eval_intern.h $(RUBY_H_INCLUDES) $(ENCODING_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}vm_method.c {$(VPATH)}vm_eval.c \ + {$(VPATH)}vm_insnhelper.c {$(VPATH)}vm_insnhelper.h {$(VPATH)}vm_exec.c \ + {$(VPATH)}vm_exec.h {$(VPATH)}insns.def {$(VPATH)}vmtc.inc \ + {$(VPATH)}vm.inc {$(VPATH)}insns.inc {$(VPATH)}debug.h +vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +debug.$(OBJEXT): {$(VPATH)}debug.c $(RUBY_H_INCLUDES) \ + $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_intern.h \ + {$(VPATH)}util.h {$(VPATH)}debug.h +id.$(OBJEXT): {$(VPATH)}id.c $(RUBY_H_INCLUDES) $(ID_H_INCLUDES) +miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +prelude.$(OBJEXT): {$(VPATH)}prelude.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c $(RUBY_H_INCLUDES) \ + $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h +goruby.$(OBJEXT): {$(VPATH)}goruby.c {$(VPATH)}main.c $(RUBY_H_INCLUDES) \ + {$(VPATH)}debug.h {$(VPATH)}node.h + +ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \ + {$(VPATH)}defines.h {$(VPATH)}oniguruma.h +us_ascii.$(OBJEXT): {$(VPATH)}us_ascii.c {$(VPATH)}regenc.h \ + {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}oniguruma.h +unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \ + {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \ + {$(VPATH)}oniguruma.h {$(VPATH)}st.h {$(VPATH)}ruby.h \ + {$(VPATH)}missing.h {$(VPATH)}intern.h +utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \ + {$(VPATH)}defines.h {$(VPATH)}oniguruma.h + +newline.c: $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb +newline.$(OBJEXT): {$(VPATH)}newline.c {$(VPATH)}defines.h \ + {$(VPATH)}intern.h {$(VPATH)}missing.h {$(VPATH)}st.h \ + {$(VPATH)}transcode_data.h {$(VPATH)}ruby.h {$(VPATH)}config.h + +INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \ + vmtc.inc vm.inc + +INSNS2VMOPT = --srcdir="$(srcdir)" + +$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def + @$(RM) $(PROGRAM) + $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@ + +minsns.inc: $(srcdir)/template/minsns.inc.tmpl + +opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl + +optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl + +optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl + +insns.inc: $(srcdir)/template/insns.inc.tmpl + +insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl + +vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl + +vm.inc: $(srcdir)/template/vm.inc.tmpl + +srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c $(srcdir)/ext/ripper/ripper.c srcs-enc + +srcs-enc: $(ENC_MK) + $(MAKE) -f $(ENC_MK) RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs + +incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h {$(VPATH)}known_errors.inc $(srcdir)/revision.h + +insns: $(INSNS) + +node_name.inc: {$(VPATH)}node.h + $(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@ + +encdb.h: $(PREP) + $(MINIRUBY) $(srcdir)/enc/make_encdb.rb $@.new $(srcdir)/enc enc + $(IFCHANGE) "$@" "$@.new" + +transdb.h: $(PREP) srcs-enc + $(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $@.new $(srcdir)/enc/trans enc/trans + $(IFCHANGE) "$@" "$@.new" + +# {$(VPATH)}id.h: {$(VPATH)}parse.h $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl +# $(BASERUBY) $(srcdir)/tool/generic_erb.rb --if-change --output=$@ \ +# $(srcdir)/template/id.h.tmpl --vpath=$(VPATH) parse.h + +known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def + $(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def + +miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb + $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@ + +prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(PRELUDE_SCRIPTS) $(PREP) + $(COMPILE_PRELUDE) $(PRELUDE_SCRIPTS) $@ + +golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP) + $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@ + +newline.c: + $(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo newline.c $(srcdir)/enc/trans/newline.trans + +prereq: incs srcs preludes + +preludes: {$(VPATH)}miniprelude.c +preludes: {$(srcdir)}golf_prelude.c + +$(srcdir)/revision.h: $(srcdir)/version.h $(srcdir)/ChangeLog $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE) + @-$(BASERUBY) $(srcdir)/tool/file2lastrev.rb --revision.h "$(@D)" > "$@.tmp" + @$(IFCHANGE) "$@" "$@.tmp" + +$(srcdir)/ext/ripper/ripper.c: + cd $(srcdir)/ext/ripper && exec $(MAKE) -f depend $(MFLAGS) top_srcdir=../.. srcdir=. + +## + +run: miniruby$(EXEEXT) PHONY + $(MINIRUBY) $(TESTRUN_SCRIPT) $(RUNOPT) + +runruby: $(PROGRAM) PHONY + $(RUNRUBY) $(TESTRUN_SCRIPT) + +parse: miniruby$(EXEEXT) PHONY + $(MINIRUBY) $(srcdir)/tool/parse.rb $(TESTRUN_SCRIPT) + +COMPARE_RUBY = $(BASERUBY) +ITEM = +OPTS = + +benchmark: $(PROGRAM) PHONY + $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \ + --executables="$(COMPARE_RUBY); $(RUNRUBY)" \ + --pattern='bm_' --directory=$(srcdir)/benchmark $(OPTS) + +benchmark-each: $(PROGRAM) PHONY + $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \ + --executables="$(COMPARE_RUBY); $(RUNRUBY)" \ + --pattern=$(ITEM) --directory=$(srcdir)/benchmark $(OPTS) + +tbench: $(PROGRAM) PHONY + $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \ + --executables="$(COMPARE_RUBY); $(RUNRUBY)" \ + --pattern='bmx_' --directory=$(srcdir)/benchmark $(OPTS) + +run.gdb: + echo b ruby_debug_breakpoint > run.gdb + echo '# handle SIGINT nostop' >> run.gdb + echo '# handle SIGPIPE nostop' >> run.gdb + echo '# b rb_longjmp' >> run.gdb + echo source $(srcdir)/breakpoints.gdb >> run.gdb + echo source $(srcdir)/.gdbinit >> run.gdb + echo run >> run.gdb + +gdb: miniruby$(EXEEXT) run.gdb PHONY + gdb -x run.gdb --quiet --args $(MINIRUBY) $(TESTRUN_SCRIPT) + +gdb-ruby: $(PROGRAM) run.gdb PHONY + gdb -x run.gdb --quiet --args $(PROGRAM) $(TESTRUN_SCRIPT) + +dist: + $(BASERUBY) $(srcdir)/tool/make-snapshot tmp $(RELNAME) + +up: + @$(VCS) up "$(srcdir)" + -@$(MAKE) $(MFLAGS) REVISION_FORCE=PHONY "$(srcdir)/revision.h" + +help: PHONY + @echo " Makefile of Ruby" + @echo "" + @echo "targets:" + @echo " all (default): builds ruby" + @echo " miniruby: builds only miniruby" + @echo " run: runs test.rb by miniruby" + @echo " runruby: runs test.rb by ruby you just built" + @echo " gdb: runs test.rb by miniruby under gdb" + @echo " gdb-ruby: runs test.rb by ruby under gdb" + @echo " all: compile ruby and extensions" + @echo " check: equals make test test-all" + @echo " test: ruby core tests" + @echo " test-all: all ruby tests" + @echo " test-rubyspec run RubySpec test suite" + @echo " update-rubyspec update local copy of RubySpec" + @echo " install: install all ruby distributions" + @echo " install-nodoc: install without rdoc" + @echo " clean: clean built objects" + @echo " golf: for golfers" + @echo + @echo "see DeveloperHowto for more detail: " + @echo " http://redmine.ruby-lang.org/wiki/ruby/DeveloperHowto" diff --git a/lib/ruby-1.9.1-rc1/compar.c b/lib/ruby-1.9.1-rc1/compar.c new file mode 100644 index 0000000..f232d4d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/compar.c @@ -0,0 +1,213 @@ +/********************************************************************** + + compar.c - + + $Author: nobu $ + created at: Thu Aug 26 14:39:48 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" + +VALUE rb_mComparable; + +static ID cmp; + +void +rb_cmperr(VALUE x, VALUE y) +{ + const char *classname; + + if (SPECIAL_CONST_P(y)) { + y = rb_inspect(y); + classname = StringValuePtr(y); + } + else { + classname = rb_obj_classname(y); + } + rb_raise(rb_eArgError, "comparison of %s with %s failed", + rb_obj_classname(x), classname); +} + +static VALUE +cmp_eq(VALUE *a) +{ + VALUE c = rb_funcall(a[0], cmp, 1, a[1]); + + if (NIL_P(c)) return Qfalse; + if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue; + return Qfalse; +} + +static VALUE +cmp_failed(void) +{ + return Qfalse; +} + +/* + * call-seq: + * obj == other => true or false + * + * Compares two objects based on the receiver's <=> + * method, returning true if it returns 0. Also returns true if + * _obj_ and _other_ are the same object. + */ + +static VALUE +cmp_equal(VALUE x, VALUE y) +{ + VALUE a[2]; + + if (x == y) return Qtrue; + + a[0] = x; a[1] = y; + return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0); +} + +/* + * call-seq: + * obj > other => true or false + * + * Compares two objects based on the receiver's <=> + * method, returning true if it returns 1. + */ + +static VALUE +cmp_gt(VALUE x, VALUE y) +{ + VALUE c = rb_funcall(x, cmp, 1, y); + + if (rb_cmpint(c, x, y) > 0) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj >= other => true or false + * + * Compares two objects based on the receiver's <=> + * method, returning true if it returns 0 or 1. + */ + +static VALUE +cmp_ge(VALUE x, VALUE y) +{ + VALUE c = rb_funcall(x, cmp, 1, y); + + if (rb_cmpint(c, x, y) >= 0) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj < other => true or false + * + * Compares two objects based on the receiver's <=> + * method, returning true if it returns -1. + */ + +static VALUE +cmp_lt(VALUE x, VALUE y) +{ + VALUE c = rb_funcall(x, cmp, 1, y); + + if (rb_cmpint(c, x, y) < 0) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj <= other => true or false + * + * Compares two objects based on the receiver's <=> + * method, returning true if it returns -1 or 0. + */ + +static VALUE +cmp_le(VALUE x, VALUE y) +{ + VALUE c = rb_funcall(x, cmp, 1, y); + + if (rb_cmpint(c, x, y) <= 0) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj.between?(min, max) => true or false + * + * Returns false if obj <=> + * min is less than zero or if anObject <=> + * max is greater than zero, true otherwise. + * + * 3.between?(1, 5) #=> true + * 6.between?(1, 5) #=> false + * 'cat'.between?('ant', 'dog') #=> true + * 'gnu'.between?('ant', 'dog') #=> false + * + */ + +static VALUE +cmp_between(VALUE x, VALUE min, VALUE max) +{ + if (RTEST(cmp_lt(x, min))) return Qfalse; + if (RTEST(cmp_gt(x, max))) return Qfalse; + return Qtrue; +} + +/* + * The Comparable mixin is used by classes whose objects + * may be ordered. The class must define the <=> operator, + * which compares the receiver against another object, returning -1, 0, + * or +1 depending on whether the receiver is less than, equal to, or + * greater than the other object. Comparable uses + * <=> to implement the conventional comparison operators + * (<, <=, ==, >=, + * and >) and the method between?. + * + * class SizeMatters + * include Comparable + * attr :str + * def <=>(anOther) + * str.size <=> anOther.str.size + * end + * def initialize(str) + * @str = str + * end + * def inspect + * @str + * end + * end + * + * s1 = SizeMatters.new("Z") + * s2 = SizeMatters.new("YY") + * s3 = SizeMatters.new("XXX") + * s4 = SizeMatters.new("WWWW") + * s5 = SizeMatters.new("VVVVV") + * + * s1 < s2 #=> true + * s4.between?(s1, s3) #=> false + * s4.between?(s3, s5) #=> true + * [ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV] + * + */ + +void +Init_Comparable(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + rb_mComparable = rb_define_module("Comparable"); + rb_define_method(rb_mComparable, "==", cmp_equal, 1); + rb_define_method(rb_mComparable, ">", cmp_gt, 1); + rb_define_method(rb_mComparable, ">=", cmp_ge, 1); + rb_define_method(rb_mComparable, "<", cmp_lt, 1); + rb_define_method(rb_mComparable, "<=", cmp_le, 1); + rb_define_method(rb_mComparable, "between?", cmp_between, 2); + + cmp = rb_intern("<=>"); +} diff --git a/lib/ruby-1.9.1-rc1/compile.c b/lib/ruby-1.9.1-rc1/compile.c new file mode 100644 index 0000000..4ea2484 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/compile.c @@ -0,0 +1,5352 @@ +/********************************************************************** + + compile.c - ruby node tree -> VM instruction sequence + + $Author: yugui $ + created at: 04/01/01 03:42:15 JST + + Copyright (C) 2004-2007 Koichi Sasada + +**********************************************************************/ + +#include "ruby/ruby.h" + +#define USE_INSN_STACK_INCREASE 1 +#include "vm_core.h" +#include "iseq.h" +#include "insns.inc" +#include "insns_info.inc" + + +typedef struct iseq_link_element { + enum { + ISEQ_ELEMENT_NONE = INT2FIX(0x00), + ISEQ_ELEMENT_LABEL = INT2FIX(0x01), + ISEQ_ELEMENT_INSN = INT2FIX(0x02), + ISEQ_ELEMENT_ADJUST = INT2FIX(0x03) + } type; + struct iseq_link_element *next; + struct iseq_link_element *prev; +} LINK_ELEMENT; + +typedef struct iseq_link_anchor { + LINK_ELEMENT anchor; + LINK_ELEMENT *last; +} LINK_ANCHOR; + +typedef struct iseq_label_data { + LINK_ELEMENT link; + int label_no; + int position; + int sc_state; + int set; + int sp; +} LABEL; + +typedef struct iseq_insn_data { + LINK_ELEMENT link; + enum ruby_vminsn_type insn_id; + int line_no; + int operand_size; + int sc_state; + VALUE *operands; +} INSN; + +typedef struct iseq_adjust_data { + LINK_ELEMENT link; + LABEL *label; + int line_no; +} ADJUST; + +struct ensure_range { + LABEL *begin; + LABEL *end; + struct ensure_range *next; +}; + +struct iseq_compile_data_ensure_node_stack { + NODE *ensure_node; + struct iseq_compile_data_ensure_node_stack *prev; + struct ensure_range *erange; +}; + +/** + * debug function(macro) interface depend on CPDEBUG + * if it is less than 0, runtime option is in effect. + * + * debug level: + * 0: no debug output + * 1: show node type + * 2: show node important parameters + * ... + * 5: show other parameters + * 10: show every AST array + */ + +#ifndef CPDEBUG +#define CPDEBUG 0 +#endif + +#if CPDEBUG >= 0 +#define compile_debug CPDEBUG +#else +#define compile_debug iseq->compile_data->option->debug_level +#endif + +NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4)); + +#if CPDEBUG + +#define compile_debug_print_indent(level) \ + ruby_debug_print_indent(level, compile_debug, gl_node_level * 2) + +#define debugp(header, value) (void) \ + (compile_debug_print_indent(1) && \ + ruby_debug_print_value(1, compile_debug, header, value)) + +#define debugi(header, id) (void) \ + (compile_debug_print_indent(1) && \ + ruby_debug_print_id(1, compile_debug, header, id)) + +#define debugp_param(header, value) (void) \ + (compile_debug_print_indent(1) && \ + ruby_debug_print_value(1, compile_debug, header, value)) + +#define debugp_verbose(header, value) (void) \ + (compile_debug_print_indent(2) && \ + ruby_debug_print_value(2, compile_debug, header, value)) + +#define debugp_verbose_node(header, value) (void) \ + (compile_debug_print_indent(10) && \ + ruby_debug_print_value(10, compile_debug, header, value)) + +#define debug_node_start(node) ((void) \ + (compile_debug_print_indent(1) && \ + (ruby_debug_print_node(1, CPDEBUG, "", (NODE *)node), gl_node_level)), \ + gl_node_level++) + +#define debug_node_end() gl_node_level --; + +#else + +static inline ID +r_id(ID id) +{ + return id; +} + +static inline VALUE +r_value(VALUE value) +{ + return value; +} + +#define debugi(header, id) r_id(id) +#define debugp(header, value) r_value(value) +#define debugp_verbose(header, value) r_value(value) +#define debugp_verbose_node(header, value) r_value(value) +#define debugp_param(header, value) r_value(value) +#define debug_node_start(node) ((void)0) +#define debug_node_end() ((void)0) +#endif + +#if CPDEBUG > 1 || CPDEBUG < 0 +PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2); +#define debugs if (compile_debug_print_indent(1)) ruby_debug_printf +#define debug_compile(msg, v) ((void)(compile_debug_print_indent(1) && fputs(msg, stderr)), (v)) +#else +#define debugs if(0)printf +#define debug_compile(msg, v) (v) +#endif + + +/* create new label */ +#define NEW_LABEL(l) new_label_body(iseq, l) + +#define iseq_filename(iseq) \ + (((rb_iseq_t*)DATA_PTR(iseq))->filename) + +#define NEW_ISEQVAL(node, name, type) \ + new_child_iseq(iseq, node, name, 0, type) + +#define NEW_CHILD_ISEQVAL(node, name, type) \ + new_child_iseq(iseq, node, name, iseq->self, type) + +#define NEW_SPECIAQL_BLOCK_ISEQVAL(iseq, sym) \ + new_child_iseq(iseq, iseq->node, iseq->name, iseq->parent_iseq, iseq->type, sym) + +/* add instructions */ +#define ADD_SEQ(seq1, seq2) \ + APPEND_LIST(seq1, seq2) + +/* add an instruction */ +#define ADD_INSN(seq, line, insn) \ + ADD_ELEM(seq, (LINK_ELEMENT *) new_insn_body(iseq, line, BIN(insn), 0)) + +/* add an instruction with label operand */ +#define ADD_INSNL(seq, line, insn, label) \ + ADD_ELEM(seq, (LINK_ELEMENT *) \ + new_insn_body(iseq, line, BIN(insn), 1, (VALUE)label)) + +/* add an instruction with some operands (1, 2, 3, 5) */ +#define ADD_INSN1(seq, line, insn, op1) \ + ADD_ELEM(seq, (LINK_ELEMENT *) \ + new_insn_body(iseq, line, BIN(insn), 1, (VALUE)op1)) + +#define ADD_INSN2(seq, line, insn, op1, op2) \ + ADD_ELEM(seq, (LINK_ELEMENT *) \ + new_insn_body(iseq, line, BIN(insn), 2, (VALUE)op1, (VALUE)op2)) + +#define ADD_INSN3(seq, line, insn, op1, op2, op3) \ + ADD_ELEM(seq, (LINK_ELEMENT *) \ + new_insn_body(iseq, line, BIN(insn), 3, (VALUE)op1, (VALUE)op2, (VALUE)op3)) + +/* Specific Insn factory */ +#define ADD_SEND(seq, line, id, argc) \ + ADD_SEND_R(seq, line, id, argc, (VALUE)Qfalse, (VALUE)INT2FIX(0)) + +#define ADD_CALL_RECEIVER(seq, line) \ + ADD_INSN(seq, line, putnil) + +#define ADD_CALL(seq, line, id, argc) \ + ADD_SEND_R(seq, line, id, argc, (VALUE)Qfalse, (VALUE)INT2FIX(VM_CALL_FCALL_BIT)) + +#define ADD_CALL_WITH_BLOCK(seq, line, id, argc, block) \ + ADD_SEND_R(seq, line, id, argc, block, (VALUE)INT2FIX(VM_CALL_FCALL_BIT)) + +#define ADD_SEND_R(seq, line, id, argc, block, flag) \ + ADD_ELEM(seq, (LINK_ELEMENT *) \ + new_insn_send(iseq, line, \ + (VALUE)id, (VALUE)argc, (VALUE)block, (VALUE)flag)) + +#define ADD_TRACE(seq, line, event) \ + do { \ + if ((event) == RUBY_EVENT_LINE && iseq->coverage && \ + RARRAY_PTR(iseq->coverage)[(line) - 1] == Qnil) { \ + RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \ + ADD_INSN1(seq, line, trace, INT2FIX(RUBY_EVENT_COVERAGE)); \ + } \ + if (iseq->compile_data->option->trace_instruction) { \ + ADD_INSN1(seq, line, trace, INT2FIX(event)); \ + } \ + }while(0); + +/* add label */ +#define ADD_LABEL(seq, label) \ + ADD_ELEM(seq, (LINK_ELEMENT *) label) + +#define ADD_ADJUST(seq, line, label) \ + ADD_ELEM(seq, (LINK_ELEMENT *) new_adjust_body(iseq, label, line)) + +#define ADD_ADJUST_RESTORE(seq, label) \ + ADD_ELEM(seq, (LINK_ELEMENT *) new_adjust_body(iseq, label, -1)) + +#define ADD_CATCH_ENTRY(type, ls, le, iseqv, lc) \ + (rb_ary_push(iseq->compile_data->catch_table_ary, \ + rb_ary_new3(5, type, \ + (VALUE)(ls) | 1, (VALUE)(le) | 1, \ + iseqv, (VALUE)(lc) | 1))) + +/* compile node */ +#define COMPILE(anchor, desc, node) \ + (debug_compile("== " desc "\n", \ + iseq_compile_each(iseq, anchor, node, 0))) + +/* compile node, this node's value will be poped */ +#define COMPILE_POPED(anchor, desc, node) \ + (debug_compile("== " desc "\n", \ + iseq_compile_each(iseq, anchor, node, 1))) + +/* compile node, which is poped when 'poped' is true */ +#define COMPILE_(anchor, desc, node, poped) \ + (debug_compile("== " desc "\n", \ + iseq_compile_each(iseq, anchor, node, poped))) + +#define OPERAND_AT(insn, idx) \ + (((INSN*)(insn))->operands[idx]) + +#define INSN_OF(insn) \ + (((INSN*)(insn))->insn_id) + +/* error */ +#define COMPILE_ERROR(strs) \ +{ \ + VALUE tmp = GET_THREAD()->errinfo; \ + if (compile_debug) rb_compile_bug strs; \ + GET_THREAD()->errinfo = iseq->compile_data->err_info; \ + rb_compile_error strs; \ + iseq->compile_data->err_info = GET_THREAD()->errinfo; \ + GET_THREAD()->errinfo = tmp; \ + ret = 0; \ + break; \ +} + +#define ERROR_ARGS ruby_sourcefile, nd_line(node), + + +#define COMPILE_OK 1 +#define COMPILE_NG 0 + + +/* leave name uninitialized so that compiler warn if INIT_ANCHOR is + * missing */ +#define DECL_ANCHOR(name) \ + LINK_ANCHOR *name, name##_body__ = {{0,},} +#define INIT_ANCHOR(name) \ + (name##_body__.last = &name##_body__.anchor, name = &name##_body__) + + +#include "optinsn.inc" +#if OPT_INSTRUCTIONS_UNIFICATION +#include "optunifs.inc" +#endif + +/* for debug */ +#if CPDEBUG < 0 +#define ISEQ_ARG iseq, +#define ISEQ_ARG_DECLARE rb_iseq_t *iseq, +#else +#define ISEQ_ARG +#define ISEQ_ARG_DECLARE +#endif + +#if CPDEBUG +#define gl_node_level iseq->compile_data->node_level +#if 0 +static void debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor); +#endif +#endif + +static void dump_disasm_list(LINK_ELEMENT *elem); + +static int insn_data_length(INSN *iobj); +static int insn_data_line_no(INSN *iobj); +static int calc_sp_depth(int depth, INSN *iobj); + +static void ADD_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor, LINK_ELEMENT *elem); + +static INSN *new_insn_body(rb_iseq_t *iseq, int line_no, int insn_id, int argc, ...); +static LABEL *new_label_body(rb_iseq_t *iseq, int line); +static ADJUST *new_adjust_body(rb_iseq_t *iseq, LABEL *label, int line); + +static int iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *anchor, NODE * n, int); +static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor); +static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *anchor); +static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *anchor); + +static int iseq_set_local_table(rb_iseq_t *iseq, ID *tbl); +static int iseq_set_exception_local_table(rb_iseq_t *iseq); +static int iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *anchor, NODE * node); + +static int iseq_set_sequence_stackcaching(rb_iseq_t *iseq, LINK_ANCHOR *anchor); +static int iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor); +static int iseq_set_exception_table(rb_iseq_t *iseq); +static int iseq_set_optargs_table(rb_iseq_t *iseq); + +/* + * To make Array to LinkedList, use link_anchor + */ + +static void +verify_list(ISEQ_ARG_DECLARE const char *info, LINK_ANCHOR *anchor) +{ +#if CPDEBUG + int flag = 0; + LINK_ELEMENT *list, *plist; + + if (!compile_debug) return; + + list = anchor->anchor.next; + plist = &anchor->anchor; + while (list) { + if (plist != list->prev) { + flag += 1; + } + plist = list; + list = list->next; + } + + if (anchor->last != plist && anchor->last != 0) { + flag |= 0x70000; + } + + if (flag != 0) { + rb_bug("list verify error: %08x (%s)", flag, info); + } +#endif +} +#if CPDEBUG < 0 +#define verify_list(info, anchor) verify_list(iseq, info, anchor) +#endif + +/* + * elem1, elem2 => elem1, elem2, elem + */ +static void +ADD_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor, LINK_ELEMENT *elem) +{ + elem->prev = anchor->last; + anchor->last->next = elem; + anchor->last = elem; + verify_list("add", anchor); +} +#if CPDEBUG < 0 +#define ADD_ELEM(anchor, elem) ADD_ELEM(iseq, anchor, elem) +#endif + +static int +iseq_add_mark_object(rb_iseq_t *iseq, VALUE v) +{ + if (!SPECIAL_CONST_P(v)) { + rb_ary_push(iseq->mark_ary, v); + } + return COMPILE_OK; +} + +#define ruby_sourcefile RSTRING_PTR(iseq->filename) + +static int +iseq_add_mark_object_compile_time(rb_iseq_t *iseq, VALUE v) +{ + if (!SPECIAL_CONST_P(v)) { + rb_ary_push(iseq->compile_data->mark_ary, v); + } + return COMPILE_OK; +} + +VALUE +ruby_iseq_compile(VALUE self, NODE *node) +{ + DECL_ANCHOR(ret); + rb_iseq_t *iseq; + INIT_ANCHOR(ret); + GetISeqPtr(self, iseq); + + if (node == 0) { + COMPILE(ret, "nil", node); + iseq_set_local_table(iseq, 0); + } + else if (nd_type(node) == NODE_SCOPE) { + /* iseq type of top, method, class, block */ + iseq_set_local_table(iseq, node->nd_tbl); + iseq_set_arguments(iseq, ret, node->nd_args); + + switch (iseq->type) { + case ISEQ_TYPE_BLOCK: { + LABEL *start = iseq->compile_data->start_label = NEW_LABEL(0); + LABEL *end = iseq->compile_data->end_label = NEW_LABEL(0); + + ADD_LABEL(ret, start); + COMPILE(ret, "block body", node->nd_body); + ADD_LABEL(ret, end); + + /* wide range catch handler must put at last */ + ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, 0, start); + ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, start, end, 0, end); + break; + } + case ISEQ_TYPE_CLASS: { + ADD_TRACE(ret, nd_line(node), RUBY_EVENT_CLASS); + COMPILE(ret, "scoped node", node->nd_body); + ADD_TRACE(ret, nd_line(node), RUBY_EVENT_END); + break; + } + case ISEQ_TYPE_METHOD: { + ADD_TRACE(ret, nd_line(node), RUBY_EVENT_CALL); + COMPILE(ret, "scoped node", node->nd_body); + ADD_TRACE(ret, nd_line(node), RUBY_EVENT_RETURN); + break; + } + default: { + COMPILE(ret, "scoped node", node->nd_body); + break; + } + } + } + else { + switch (iseq->type) { + case ISEQ_TYPE_METHOD: + case ISEQ_TYPE_CLASS: + case ISEQ_TYPE_BLOCK: + case ISEQ_TYPE_EVAL: + case ISEQ_TYPE_MAIN: + case ISEQ_TYPE_TOP: + rb_compile_error(ERROR_ARGS "compile/should not be reached: %s:%d", + __FILE__, __LINE__); + break; + case ISEQ_TYPE_RESCUE: + iseq_set_exception_local_table(iseq); + COMPILE(ret, "rescue", node); + break; + case ISEQ_TYPE_ENSURE: + iseq_set_exception_local_table(iseq); + COMPILE_POPED(ret, "ensure", node); + break; + case ISEQ_TYPE_DEFINED_GUARD: + iseq_set_local_table(iseq, 0); + COMPILE(ret, "defined guard", node); + break; + default: + rb_bug("unknown scope"); + } + } + + if (iseq->type == ISEQ_TYPE_RESCUE || iseq->type == ISEQ_TYPE_ENSURE) { + ADD_INSN2(ret, 0, getdynamic, INT2FIX(2), INT2FIX(0)); + ADD_INSN1(ret, 0, throw, INT2FIX(0) /* continue throw */ ); + } + else { + ADD_INSN(ret, iseq->compile_data->last_line, leave); + } + + return iseq_setup(iseq, ret); +} + +int +ruby_iseq_translate_threaded_code(rb_iseq_t *iseq) +{ +#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE + extern const void **vm_get_insns_address_table(void); +#if OPT_DIRECT_THREADED_CODE + const void * const *table = vm_get_insns_address_table(); +#else + const void * const *table = vm_get_insns_address_table(); +#endif + int i; + + iseq->iseq_encoded = ALLOC_N(VALUE, iseq->iseq_size); + MEMCPY(iseq->iseq_encoded, iseq->iseq, VALUE, iseq->iseq_size); + + for (i = 0; i < iseq->iseq_size; /* */ ) { + int insn = iseq->iseq_encoded[i]; + int len = insn_len(insn); + iseq->iseq_encoded[i] = (VALUE)table[insn]; + i += len; + } +#else + iseq->iseq_encoded = iseq->iseq; +#endif + return COMPILE_OK; +} + +/*********************************************/ +/* definition of data structure for compiler */ +/*********************************************/ + +static void * +compile_data_alloc(rb_iseq_t *iseq, size_t size) +{ + void *ptr = 0; + struct iseq_compile_data_storage *storage = + iseq->compile_data->storage_current; + + if (storage->pos + size > storage->size) { + unsigned long alloc_size = storage->size * 2; + + retry: + if (alloc_size < size) { + alloc_size *= 2; + goto retry; + } + storage->next = (void *)ALLOC_N(char, alloc_size + + sizeof(struct + iseq_compile_data_storage)); + storage = iseq->compile_data->storage_current = storage->next; + storage->next = 0; + storage->pos = 0; + storage->size = alloc_size; + storage->buff = (char *)(&storage->buff + 1); + } + + ptr = (void *)&storage->buff[storage->pos]; + storage->pos += size; + return ptr; +} + +static INSN * +compile_data_alloc_insn(rb_iseq_t *iseq) +{ + return (INSN *)compile_data_alloc(iseq, sizeof(INSN)); +} + +static LABEL * +compile_data_alloc_label(rb_iseq_t *iseq) +{ + return (LABEL *)compile_data_alloc(iseq, sizeof(LABEL)); +} + +static ADJUST * +compile_data_alloc_adjust(rb_iseq_t *iseq) +{ + return (ADJUST *)compile_data_alloc(iseq, sizeof(ADJUST)); +} + +/* + * elem1, elemX => elem1, elem2, elemX + */ +static void +INSERT_ELEM_NEXT(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2) +{ + elem2->next = elem1->next; + elem2->prev = elem1; + elem1->next = elem2; + if (elem2->next) { + elem2->next->prev = elem2; + } +} + +#if 0 /* unused */ +/* + * elemX, elem1 => elemX, elem2, elem1 + */ +static void +INSERT_ELEM_PREV(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2) +{ + elem2->prev = elem1->prev; + elem2->next = elem1; + elem1->prev = elem2; + if (elem2->prev) { + elem2->prev->next = elem2; + } +} +#endif + +/* + * elemX, elem1, elemY => elemX, elem2, elemY + */ +static void +REPLACE_ELEM(LINK_ELEMENT *elem1, LINK_ELEMENT *elem2) +{ + elem2->prev = elem1->prev; + elem2->next = elem1->next; + if (elem1->prev) { + elem1->prev->next = elem2; + } + if (elem1->next) { + elem1->next->prev = elem2; + } +} + +static void +REMOVE_ELEM(LINK_ELEMENT *elem) +{ + elem->prev->next = elem->next; + if (elem->next) { + elem->next->prev = elem->prev; + } +} + +static LINK_ELEMENT * +FIRST_ELEMENT(LINK_ANCHOR *anchor) +{ + return anchor->anchor.next; +} + +#if 0 /* unused */ +static LINK_ELEMENT * +LAST_ELEMENT(LINK_ANCHOR *anchor) +{ + return anchor->last; +} +#endif + +static LINK_ELEMENT * +POP_ELEMENT(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor) +{ + LINK_ELEMENT *elem = anchor->last; + anchor->last = anchor->last->prev; + anchor->last->next = 0; + verify_list("pop", anchor); + return elem; +} +#if CPDEBUG < 0 +#define POP_ELEMENT(anchor) POP_ELEMENT(iseq, anchor) +#endif + +#if 0 /* unused */ +static LINK_ELEMENT * +SHIFT_ELEMENT(LINK_ANCHOR *anchor) +{ + LINK_ELEMENT *elem = anchor->anchor.next; + if (elem) { + anchor->anchor.next = elem->next; + } + return elem; +} +#endif + +#if 0 /* unused */ +static int +LIST_SIZE(LINK_ANCHOR *anchor) +{ + LINK_ELEMENT *elem = anchor->anchor.next; + int size = 0; + while (elem) { + size += 1; + elem = elem->next; + } + return size; +} +#endif + +static int +LIST_SIZE_ZERO(LINK_ANCHOR *anchor) +{ + if (anchor->anchor.next == 0) { + return 1; + } + else { + return 0; + } +} + +/* + * anc1: e1, e2, e3 + * anc2: e4, e5 + *#=> + * anc1: e1, e2, e3, e4, e5 + * anc2: e4, e5 (broken) + */ +static void +APPEND_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2) +{ + if (anc2->anchor.next) { + anc1->last->next = anc2->anchor.next; + anc2->anchor.next->prev = anc1->last; + anc1->last = anc2->last; + } + verify_list("append", anc1); +} +#if CPDEBUG < 0 +#define APPEND_LIST(anc1, anc2) APPEND_LIST(iseq, anc1, anc2) +#endif + +/* + * anc1: e1, e2, e3 + * anc2: e4, e5 + *#=> + * anc1: e4, e5, e1, e2, e3 + * anc2: e4, e5 (broken) + */ +static void +INSERT_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2) +{ + if (anc2->anchor.next) { + LINK_ELEMENT *first = anc1->anchor.next; + anc1->anchor.next = anc2->anchor.next; + anc1->anchor.next->prev = &anc1->anchor; + anc2->last->next = first; + if (first) { + first->prev = anc2->last; + } + else { + anc1->last = anc2->last; + } + } + + verify_list("append", anc1); +} +#if CPDEBUG < 0 +#define INSERT_LIST(anc1, anc2) INSERT_LIST(iseq, anc1, anc2) +#endif + +#if 0 /* unused */ +/* + * anc1: e1, e2, e3 + * anc2: e4, e5 + *#=> + * anc1: e4, e5 + * anc2: e1, e2, e3 + */ +static void +SWAP_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc1, LINK_ANCHOR *anc2) +{ + LINK_ANCHOR tmp = *anc2; + + /* it has bug */ + *anc2 = *anc1; + *anc1 = tmp; + + verify_list("swap1", anc1); + verify_list("swap2", anc2); +} +#if CPDEBUG < 0 +#define SWAP_LIST(anc1, anc2) SWAP_LIST(iseq, anc1, anc2) +#endif + +static LINK_ANCHOR * +REVERSE_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *anc) +{ + LINK_ELEMENT *first, *last, *elem, *e; + first = &anc->anchor; + elem = first->next; + last = anc->last; + + if (elem != 0) { + anc->anchor.next = last; + anc->last = elem; + } + else { + /* null list */ + return anc; + } + while (elem) { + e = elem->next; + elem->next = elem->prev; + elem->prev = e; + elem = e; + } + + first->next = last; + last->prev = first; + anc->last->next = 0; + + verify_list("reverse", anc); + return anc; +} +#if CPDEBUG < 0 +#define REVERSE_LIST(anc) REVERSE_LIST(iseq, anc) +#endif +#endif + +#if CPDEBUG && 0 +static void +debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor) +{ + LINK_ELEMENT *list = FIRST_ELEMENT(anchor); + printf("----\n"); + printf("anch: %p, frst: %p, last: %p\n", &anchor->anchor, + anchor->anchor.next, anchor->last); + while (list) { + printf("curr: %p, next: %p, prev: %p, type: %d\n", list, list->next, + list->prev, FIX2INT(list->type)); + list = list->next; + } + printf("----\n"); + + dump_disasm_list(anchor->anchor.next); + verify_list("debug list", anchor); +} +#if CPDEBUG < 0 +#define debug_list(anc) debug_list(iseq, anc) +#endif +#endif + +static LABEL * +new_label_body(rb_iseq_t *iseq, int line) +{ + LABEL *labelobj = compile_data_alloc_label(iseq); + + labelobj->link.type = ISEQ_ELEMENT_LABEL; + labelobj->link.next = 0; + + labelobj->label_no = iseq->compile_data->label_no++; + labelobj->sc_state = 0; + labelobj->sp = -1; + return labelobj; +} + +static ADJUST * +new_adjust_body(rb_iseq_t *iseq, LABEL *label, int line) +{ + ADJUST *adjust = compile_data_alloc_adjust(iseq); + adjust->link.type = ISEQ_ELEMENT_ADJUST; + adjust->link.next = 0; + adjust->label = label; + adjust->line_no = line; + return adjust; +} + +static INSN * +new_insn_core(rb_iseq_t *iseq, int line_no, + int insn_id, int argc, VALUE *argv) +{ + INSN *iobj = compile_data_alloc_insn(iseq); + + iobj->link.type = ISEQ_ELEMENT_INSN; + iobj->link.next = 0; + iobj->insn_id = insn_id; + iobj->line_no = line_no; + iobj->operands = argv; + iobj->operand_size = argc; + iobj->sc_state = 0; + return iobj; +} + +static INSN * +new_insn_body(rb_iseq_t *iseq, int line_no, int insn_id, int argc, ...) +{ + VALUE *operands = 0; + va_list argv; + if (argc > 0) { + int i; + va_init_list(argv, argc); + operands = (VALUE *)compile_data_alloc(iseq, sizeof(VALUE) * argc); + for (i = 0; i < argc; i++) { + VALUE v = va_arg(argv, VALUE); + operands[i] = v; + } + va_end(argv); + } + return new_insn_core(iseq, line_no, insn_id, argc, operands); +} + +static INSN * +new_insn_send(rb_iseq_t *iseq, int line_no, + VALUE id, VALUE argc, VALUE block, VALUE flag) +{ + INSN *iobj = 0; + VALUE *operands = + (VALUE *)compile_data_alloc(iseq, sizeof(VALUE) * 5); + operands[0] = id; + operands[1] = argc; + operands[2] = block; + operands[3] = flag; + operands[4] = 0; + iobj = new_insn_core(iseq, line_no, BIN(send), 5, operands); + return iobj; +} + +static VALUE +new_child_iseq(rb_iseq_t *iseq, NODE *node, + VALUE name, VALUE parent, VALUE type) +{ + VALUE ret; + + debugs("[new_child_iseq]> ---------------------------------------\n"); + ret = rb_iseq_new_with_opt(node, name, iseq_filename(iseq->self), + parent, type, iseq->compile_data->option); + debugs("[new_child_iseq]< ---------------------------------------\n"); + iseq_add_mark_object(iseq, ret); + return ret; +} + +static int +iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor) +{ + /* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */ + + if (compile_debug > 5) + dump_disasm_list(FIRST_ELEMENT(anchor)); + + debugs("[compile step 3.1 (iseq_optimize)]\n"); + iseq_optimize(iseq, anchor); + + if (compile_debug > 5) + dump_disasm_list(FIRST_ELEMENT(anchor)); + + if (iseq->compile_data->option->instructions_unification) { + debugs("[compile step 3.2 (iseq_insns_unification)]\n"); + iseq_insns_unification(iseq, anchor); + if (compile_debug > 5) + dump_disasm_list(FIRST_ELEMENT(anchor)); + } + + if (iseq->compile_data->option->stack_caching) { + debugs("[compile step 3.3 (iseq_set_sequence_stackcaching)]\n"); + iseq_set_sequence_stackcaching(iseq, anchor); + if (compile_debug > 5) + dump_disasm_list(FIRST_ELEMENT(anchor)); + } + + debugs("[compile step 4.1 (iseq_set_sequence)]\n"); + iseq_set_sequence(iseq, anchor); + if (compile_debug > 5) + dump_disasm_list(FIRST_ELEMENT(anchor)); + + debugs("[compile step 4.2 (iseq_set_exception_table)]\n"); + iseq_set_exception_table(iseq); + + debugs("[compile step 4.3 (set_optargs_table)] \n"); + iseq_set_optargs_table(iseq); + + debugs("[compile step 5 (iseq_translate_threaded_code)] \n"); + ruby_iseq_translate_threaded_code(iseq); + + if (compile_debug > 1) { + VALUE str = ruby_iseq_disasm(iseq->self); + printf("%s\n", StringValueCStr(str)); + fflush(stdout); + } + debugs("[compile step: finish]\n"); + + return 0; +} + +static int +iseq_set_exception_local_table(rb_iseq_t *iseq) +{ + ID id_dollar_bang; + + CONST_ID(id_dollar_bang, "#$!"); + iseq->local_table = (ID *)ALLOC_N(ID *, 1); + iseq->local_table_size = 1; + iseq->local_size = iseq->local_table_size + 1; + iseq->local_table[0] = id_dollar_bang; + return COMPILE_OK; +} + +static int +get_dyna_var_idx_at_raw(rb_iseq_t *iseq, ID id) +{ + int i; + + for (i = 0; i < iseq->local_table_size; i++) { + if (iseq->local_table[i] == id) { + return i; + } + } + return -1; +} + +static int +get_local_var_idx(rb_iseq_t *iseq, ID id) +{ + int idx = get_dyna_var_idx_at_raw(iseq->local_iseq, id); + + if (idx < 0) { + rb_bug("get_local_var_idx: %d", idx); + } + + return idx; +} + +static int +get_dyna_var_idx(rb_iseq_t *iseq, ID id, int *level, int *ls) +{ + int lv = 0, idx = -1; + + while (iseq) { + idx = get_dyna_var_idx_at_raw(iseq, id); + if (idx >= 0) { + break; + } + iseq = iseq->parent_iseq; + lv++; + } + + if (idx < 0) { + rb_bug("get_dyna_var_idx: -1"); + } + + *level = lv; + *ls = iseq->local_size; + return idx; +} + +static int +iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args) +{ + debugs("iseq_set_arguments: %s\n", node_args ? "" : "0"); + + if (node_args) { + NODE *node_aux = node_args->nd_next; + NODE *node_opt = node_args->nd_opt; + ID rest_id = 0; + int last_comma = 0; + ID block_id = 0; + NODE *node_init = 0; + + if (nd_type(node_args) != NODE_ARGS) { + rb_bug("iseq_set_arguments: NODE_ARGS is expected, but %s", + ruby_node_name(nd_type(node_args))); + } + + /* + * new argument infromation: + * NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] + * NODE_ARGS_AUX [r: ID, b: ID, ->] + * NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] + * optarg information: + * NODE_OPT_ARGS [idx, expr, next ->] + * init arg: + * NODE_AND(m_init, p_init) + * if "r" is 1, it's means "{|x,|}" type block parameter. + */ + + iseq->argc = node_args->nd_frml; + debugs(" - argc: %d\n", iseq->argc); + + if (node_aux) { + rest_id = node_aux->nd_rest; + if (rest_id == 1) { + last_comma = 1; + rest_id = 0; + } + block_id = (ID)node_aux->nd_body; + node_aux = node_aux->nd_next; + + if (node_aux) { + ID post_start_id = node_aux->nd_pid; + iseq->arg_post_start = get_dyna_var_idx_at_raw(iseq, post_start_id); + iseq->arg_post_len = node_aux->nd_plen; + node_init = node_aux->nd_next; + } + } + + if (node_opt) { + NODE *node = node_opt; + LABEL *label; + VALUE labels = rb_ary_new(); + int i = 0, j; + + while (node) { + label = NEW_LABEL(nd_line(node)); + rb_ary_push(labels, (VALUE)label | 1); + ADD_LABEL(optargs, label); + COMPILE_POPED(optargs, "optarg", node->nd_body); + node = node->nd_next; + i += 1; + } + + /* last label */ + label = NEW_LABEL(nd_line(node_args)); + rb_ary_push(labels, (VALUE)label | 1); + ADD_LABEL(optargs, label); + i += 1; + + iseq->arg_opts = i; + iseq->arg_opt_table = ALLOC_N(VALUE, i); + MEMCPY(iseq->arg_opt_table, RARRAY_PTR(labels), VALUE, i); + for (j = 0; j < i; j++) { + iseq->arg_opt_table[j] &= ~1; + } + } + else { + iseq->arg_opts = 0; + } + + if (node_init) { + if (node_init->nd_1st) { /* m_init */ + COMPILE_POPED(optargs, "init arguments (m)", node_init->nd_1st); + } + if (node_init->nd_2nd) { /* p_init */ + COMPILE_POPED(optargs, "init arguments (p)", node_init->nd_2nd); + } + } + + if (rest_id) { + iseq->arg_rest = get_dyna_var_idx_at_raw(iseq, rest_id); + + if (iseq->arg_rest == -1) { + rb_bug("arg_rest: -1"); + } + + if (iseq->arg_post_start == 0) { + iseq->arg_post_start = iseq->arg_rest + 1; + } + } + + if (block_id) { + iseq->arg_block = get_dyna_var_idx_at_raw(iseq, block_id); + } + + if (iseq->arg_opts != 0 || iseq->arg_post_len != 0 || + iseq->arg_rest != -1 || iseq->arg_block != -1) { + iseq->arg_simple = 0; + + /* set arg_size: size of arguments */ + if (iseq->arg_block != -1) { + iseq->arg_size = iseq->arg_block + 1; + } + else if (iseq->arg_post_len) { + iseq->arg_size = iseq->arg_post_start + iseq->arg_post_len; + } + else if (iseq->arg_rest != -1) { + iseq->arg_size = iseq->arg_rest + 1; + } + else if (iseq->arg_opts) { + iseq->arg_size = iseq->argc + iseq->arg_opts - 1; + } + else { + iseq->arg_size = iseq->argc; + } + } + else { + iseq->arg_simple = 1; + iseq->arg_size = iseq->argc; + } + + if (iseq->type == ISEQ_TYPE_BLOCK) { + if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 && iseq->arg_rest == -1) { + if (iseq->argc == 1 && last_comma == 0) { + /* {|a|} */ + iseq->arg_simple |= 0x02; + } + } + } + } + else { + iseq->arg_simple = 1; + } + + return COMPILE_OK; +} + +static int +iseq_set_local_table(rb_iseq_t *iseq, ID *tbl) +{ + int size; + + if (tbl) { + size = *tbl; + tbl++; + } + else { + size = 0; + } + + if (size > 0) { + iseq->local_table = (ID *)ALLOC_N(ID *, size); + MEMCPY(iseq->local_table, tbl, ID *, size); + } + + iseq->local_size = iseq->local_table_size = size; + iseq->local_size += 1; + /* + if (lfp == dfp ) { // top, class, method + dfp[-1]: svar + else { // block + dfp[-1]: cref + } + */ + + debugs("iseq_set_local_table: %d, %d\n", iseq->local_size, iseq->local_table_size); + return COMPILE_OK; +} + +/** + ruby insn object array -> raw instruction sequence + */ +static int +iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) +{ + LABEL *lobj; + INSN *iobj; + struct iseq_insn_info_entry *insn_info_table; + LINK_ELEMENT *list; + VALUE *generated_iseq; + + int k, pos, sp, stack_max = 0, line = 0; + + /* set label position */ + list = FIRST_ELEMENT(anchor); + k = pos = 0; + while (list) { + switch (list->type) { + case ISEQ_ELEMENT_INSN: + { + iobj = (INSN *)list; + line = iobj->line_no; + pos += insn_data_length(iobj); + k++; + break; + } + case ISEQ_ELEMENT_LABEL: + { + lobj = (LABEL *)list; + lobj->position = pos; + lobj->set = Qtrue; + break; + } + case ISEQ_ELEMENT_NONE: + { + /* ignore */ + break; + } + case ISEQ_ELEMENT_ADJUST: + { + ADJUST *adjust = (ADJUST *)list; + if (adjust->line_no != -1) { + pos += 2 /* insn + 1 operand */; + k++; + } + break; + } + default: + dump_disasm_list(FIRST_ELEMENT(anchor)); + dump_disasm_list(list); + rb_compile_error(RSTRING_PTR(iseq->filename), line, + "error: set_sequence"); + break; + } + list = list->next; + } + + /* make instruction sequence */ + generated_iseq = ALLOC_N(VALUE, pos); + insn_info_table = ALLOC_N(struct iseq_insn_info_entry, k); + + list = FIRST_ELEMENT(anchor); + k = pos = sp = 0; + + while (list) { + switch (list->type) { + case ISEQ_ELEMENT_INSN: + { + int j, len, insn; + const char *types; + VALUE *operands; + + iobj = (INSN *)list; + + /* update sp */ + sp = calc_sp_depth(sp, iobj); + if (sp > stack_max) { + stack_max = sp; + } + + /* fprintf(stderr, "insn: %-16s, sp: %d\n", insn_name(iobj->insn_id), sp); */ + + operands = iobj->operands; + insn = iobj->insn_id; + generated_iseq[pos] = insn; + types = insn_op_types(insn); + len = insn_len(insn); + + /* operand check */ + if (iobj->operand_size != len - 1) { + dump_disasm_list(list); + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, + "operand size miss! (%d for %d)", + iobj->operand_size, len - 1); + xfree(generated_iseq); + xfree(insn_info_table); + return 0; + } + + for (j = 0; types[j]; j++) { + char type = types[j]; + /* printf("--> [%c - (%d-%d)]\n", type, k, j); */ + switch (type) { + case TS_OFFSET: + { + /* label(destination position) */ + lobj = (LABEL *)operands[j]; + if (lobj->set != Qtrue) { + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, + "unknown label"); + } + if (lobj->sp == -1) { + lobj->sp = sp; + } + generated_iseq[pos + 1 + j] = + lobj->position - (pos + len); + break; + } + case TS_CDHASH: + { + /* + * [obj, label, ...] + */ + int i; + VALUE lits = operands[j]; + VALUE map = rb_hash_new(); + + for (i=0; i < RARRAY_LEN(lits); i+=2) { + VALUE obj = rb_ary_entry(lits, i); + VALUE lv = rb_ary_entry(lits, i+1); + lobj = (LABEL *)(lv & ~1); + + if (lobj->set != Qtrue) { + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, + "unknown label"); + } + if (!st_lookup(rb_hash_tbl(map), obj, 0)) { + rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len))); + } + else { + rb_compile_warning(RSTRING_PTR(iseq->filename), iobj->line_no, + "duplicated when clause is ignored"); + } + } + generated_iseq[pos + 1 + j] = map; + iseq_add_mark_object(iseq, map); + break; + } + case TS_LINDEX: + case TS_DINDEX: + case TS_NUM: /* ulong */ + generated_iseq[pos + 1 + j] = FIX2INT(operands[j]); + break; + case TS_ISEQ: /* iseq */ + { + VALUE v = operands[j]; + rb_iseq_t *block = 0; + if (v) { + GetISeqPtr(v, block); + } + generated_iseq[pos + 1 + j] = (VALUE)block; + break; + } + case TS_VALUE: /* VALUE */ + { + VALUE v = operands[j]; + generated_iseq[pos + 1 + j] = v; + /* to mark ruby object */ + iseq_add_mark_object(iseq, v); + break; + } + case TS_IC: /* inline cache */ + { + VALUE v = (VALUE)NEW_INLINE_CACHE_ENTRY(); + generated_iseq[pos + 1 + j] = v; + iseq_add_mark_object(iseq, v); + break; + } + case TS_ID: /* ID */ + generated_iseq[pos + 1 + j] = SYM2ID(operands[j]); + break; + case TS_GENTRY: + { + struct global_entry *entry = + (struct global_entry *)(operands[j] & (~1)); + generated_iseq[pos + 1 + j] = (VALUE)entry; + } + break; + default: + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, + "unknown operand type: %c", type); + xfree(generated_iseq); + xfree(insn_info_table); + return 0; + } + } + insn_info_table[k].line_no = iobj->line_no; + insn_info_table[k].position = pos; + insn_info_table[k].sp = sp; + pos += len; + k++; + break; + } + case ISEQ_ELEMENT_LABEL: + { + lobj = (LABEL *)list; + if (lobj->sp == -1) { + lobj->sp = sp; + } + else { + sp = lobj->sp; + } + break; + } + case ISEQ_ELEMENT_ADJUST: + { + ADJUST *adjust = (ADJUST *)list; + int orig_sp = sp; + + if (adjust->label) { + sp = adjust->label->sp; + } + else { + sp = 0; + } + + if (adjust->line_no != -1) { + if (orig_sp - sp > 0) { + insn_info_table[k].line_no = adjust->line_no; + insn_info_table[k].position = pos; + insn_info_table[k].sp = sp; + k++; + generated_iseq[pos++] = BIN(adjuststack); + generated_iseq[pos++] = orig_sp - sp; + } + else if (orig_sp - sp == 0) { + /* jump to next insn */ + insn_info_table[k].line_no = adjust->line_no; + insn_info_table[k].position = pos; + insn_info_table[k].sp = sp; + k++; + generated_iseq[pos++] = BIN(jump); + generated_iseq[pos++] = 0; + } + else { + rb_bug("iseq_set_sequence: adjust bug"); + } + } + break; + } + default: + /* ignore */ + break; + } + list = list->next; + } + +#if 0 /* XXX */ + /* this check need dead code elimination */ + if (sp != 1) { + rb_bug("SP is not 0 on %s (%d)\n", RSTRING_PTR(iseq->name), sp); + } +#endif + + iseq->iseq = (void *)generated_iseq; + iseq->iseq_size = pos; + iseq->insn_info_table = insn_info_table; + iseq->insn_info_size = k; + iseq->stack_max = stack_max; + + return COMPILE_OK; +} + +static int +label_get_position(LABEL *lobj) +{ + return lobj->position; +} + +static int +label_get_sp(LABEL *lobj) +{ + return lobj->sp; +} + +static int +iseq_set_exception_table(rb_iseq_t *iseq) +{ + VALUE *tptr, *ptr; + int tlen, i; + struct iseq_catch_table_entry *entry; + + tlen = RARRAY_LEN(iseq->compile_data->catch_table_ary); + tptr = RARRAY_PTR(iseq->compile_data->catch_table_ary); + + iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0; + iseq->catch_table_size = tlen; + + for (i = 0; i < tlen; i++) { + ptr = RARRAY_PTR(tptr[i]); + entry = &iseq->catch_table[i]; + entry->type = ptr[0] & 0xffff; + entry->start = label_get_position((LABEL *)(ptr[1] & ~1)); + entry->end = label_get_position((LABEL *)(ptr[2] & ~1)); + entry->iseq = ptr[3]; + + /* register iseq as mark object */ + if (entry->iseq != 0) { + iseq_add_mark_object(iseq, entry->iseq); + } + + /* stack depth */ + if (ptr[4]) { + LABEL *lobj = (LABEL *)(ptr[4] & ~1); + entry->cont = label_get_position(lobj); + entry->sp = label_get_sp(lobj); + + /* TODO: Dirty Hack! Fix me */ + if (entry->type == CATCH_TYPE_RESCUE || + entry->type == CATCH_TYPE_BREAK || + entry->type == CATCH_TYPE_NEXT) { + entry->sp--; + } + } + else { + entry->cont = 0; + } + } + + iseq->compile_data->catch_table_ary = 0; /* free */ + return COMPILE_OK; +} + +/* + * set optional argument table + * def foo(a, b=expr1, c=expr2) + * => + * b: + * expr1 + * c: + * expr2 + */ +static int +iseq_set_optargs_table(rb_iseq_t *iseq) +{ + int i; + + if (iseq->arg_opts != 0) { + for (i = 0; i < iseq->arg_opts; i++) { + iseq->arg_opt_table[i] = + label_get_position((LABEL *)iseq->arg_opt_table[i]); + } + } + return COMPILE_OK; +} + +static LINK_ELEMENT * +get_destination_insn(INSN *iobj) +{ + LABEL *lobj = (LABEL *)OPERAND_AT(iobj, 0); + LINK_ELEMENT *list; + + list = lobj->link.next; + while (list) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { + break; + } + list = list->next; + } + return list; +} + +static LINK_ELEMENT * +get_next_insn(INSN *iobj) +{ + LINK_ELEMENT *list = iobj->link.next; + + while (list) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { + return list; + } + list = list->next; + } + return 0; +} + +static LINK_ELEMENT * +get_prev_insn(INSN *iobj) +{ + LINK_ELEMENT *list = iobj->link.prev; + + while (list) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { + return list; + } + list = list->prev; + } + return 0; +} + +static int +iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcallopt) +{ + INSN *iobj = (INSN *)list; + again: + if (iobj->insn_id == BIN(jump)) { + INSN *niobj, *diobj, *piobj; + /* + * useless jump elimination: + * jump LABEL1 + * ... + * LABEL1: + * jump LABEL2 + * + * => in this case, first jump instruction should jump to + * LABEL2 directly + */ + diobj = (INSN *)get_destination_insn(iobj); + niobj = (INSN *)get_next_insn(iobj); + + if (diobj == niobj) { + /* + * jump LABEL + * LABEL: + * => + * LABEL: + */ + REMOVE_ELEM(&iobj->link); + } + else if (iobj != diobj && diobj->insn_id == BIN(jump)) { + if (OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) { + OPERAND_AT(iobj, 0) = OPERAND_AT(diobj, 0); + goto again; + } + } + else if (diobj->insn_id == BIN(leave)) { + /* + * jump LABEL + * ... + * LABEL: + * leave + * => + * leave + * ... + * LABEL: + * leave + */ + INSN *eiobj = new_insn_core(iseq, iobj->line_no, BIN(leave), + diobj->operand_size, diobj->operands); + INSN *popiobj = new_insn_core(iseq, iobj->line_no, + BIN(pop), 0, 0); + /* replace */ + REPLACE_ELEM((LINK_ELEMENT *)iobj, (LINK_ELEMENT *)eiobj); + INSERT_ELEM_NEXT((LINK_ELEMENT *)eiobj, (LINK_ELEMENT *)popiobj); + iobj = popiobj; + } + /* + * useless jump elimination (if/unless destination): + * if L1 + * jump L2 + * L1: + * ... + * L2: + * + * ==> + * unless L2 + * L1: + * ... + * L2: + */ + else if ((piobj = (INSN *)get_prev_insn(iobj)) != 0 && + (piobj->insn_id == BIN(branchif) || + piobj->insn_id == BIN(branchunless))) { + if (niobj == (INSN *)get_destination_insn(piobj)) { + piobj->insn_id = (piobj->insn_id == BIN(branchif)) + ? BIN(branchunless) : BIN(branchif); + OPERAND_AT(piobj, 0) = OPERAND_AT(iobj, 0); + REMOVE_ELEM(&iobj->link); + } + } + } + + if (iobj->insn_id == BIN(branchif) || + iobj->insn_id == BIN(branchunless)) { + /* + * if L1 + * ... + * L1: + * jump L2 + * => + * if L2 + */ + INSN *nobj = (INSN *)get_destination_insn(iobj); + if (nobj->insn_id == BIN(jump)) { + OPERAND_AT(iobj, 0) = OPERAND_AT(nobj, 0); + } + } + + if (do_tailcallopt && iobj->insn_id == BIN(leave)) { + /* + * send ... + * leave + * => + * send ..., ... | VM_CALL_TAILCALL_BIT, ... + * leave # unreachable + */ + INSN *piobj = (INSN *)get_prev_insn((INSN *)list); + + if (piobj->insn_id == BIN(send) && + piobj->operands[2] == 0 /* block */ + ) { + piobj->operands[3] = INT2FIX(FIX2INT(piobj->operands[3]) | VM_CALL_TAILCALL_BIT); + } + } + return COMPILE_OK; +} + +static int +insn_set_specialized_instruction(INSN *iobj, int insn_id) +{ + iobj->insn_id = insn_id; + iobj->operand_size = 0; + return COMPILE_OK; +} + +static int +insn_set_specialized_instruction_with_ic(INSN *iobj, int insn_id, int n) +{ + int i; + iobj->insn_id = insn_id; + iobj->operand_size = n; + + /* max of n is 4 */ + for (i=0; ioperands[i] = Qnil; + } + + return COMPILE_OK; +} + + +static int +iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj) +{ + if (iobj->insn_id == BIN(send)) { + ID mid = SYM2ID(OPERAND_AT(iobj, 0)); + int argc = FIX2INT(OPERAND_AT(iobj, 1)); + VALUE block = OPERAND_AT(iobj, 2); + VALUE flag = OPERAND_AT(iobj, 3); + + /* TODO: should be more sophisticated search */ + if (block == 0 && flag == INT2FIX(0)) { + if (argc == 0) { + if (mid == idLength) { + insn_set_specialized_instruction(iobj, BIN(opt_length)); + } + else if (mid == idSucc) { + insn_set_specialized_instruction(iobj, BIN(opt_succ)); + } + else if (mid == idNot) { + insn_set_specialized_instruction_with_ic(iobj, BIN(opt_not), 1); + } + } + else if (argc == 1) { + if (0) { + } + else if (mid == idPLUS) { + insn_set_specialized_instruction(iobj, BIN(opt_plus)); + } + else if (mid == idMINUS) { + insn_set_specialized_instruction(iobj, BIN(opt_minus)); + } + else if (mid == idMULT) { + insn_set_specialized_instruction(iobj, BIN(opt_mult)); + } + else if (mid == idDIV) { + insn_set_specialized_instruction(iobj, BIN(opt_div)); + } + else if (mid == idMOD) { + insn_set_specialized_instruction(iobj, BIN(opt_mod)); + } + else if (mid == idEq) { + insn_set_specialized_instruction_with_ic(iobj, BIN(opt_eq), 1); + } + else if (mid == idNeq) { + insn_set_specialized_instruction_with_ic(iobj, BIN(opt_neq), 2); + } + else if (mid == idLT) { + insn_set_specialized_instruction(iobj, BIN(opt_lt)); + } + else if (mid == idLE) { + insn_set_specialized_instruction(iobj, BIN(opt_le)); + } + else if (mid == idGT) { + insn_set_specialized_instruction(iobj, BIN(opt_gt)); + } + else if (mid == idGE) { + insn_set_specialized_instruction(iobj, BIN(opt_ge)); + } + else if (mid == idLTLT) { + insn_set_specialized_instruction(iobj, BIN(opt_ltlt)); + } + else if (mid == idAREF) { + insn_set_specialized_instruction(iobj, BIN(opt_aref)); + } + } + } + + if (argc > 0) { + if (mid == idSend || mid == id__send__ ) { + OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT); + } + } + } + return COMPILE_OK; +} + +static int +iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *anchor) +{ + LINK_ELEMENT *list; + const int do_peepholeopt = iseq->compile_data->option->peephole_optimization; + const int do_tailcallopt = iseq->compile_data->option->tailcall_optimization; + const int do_si = iseq->compile_data->option->specialized_instruction; + const int do_ou = iseq->compile_data->option->operands_unification; + list = FIRST_ELEMENT(anchor); + + while (list) { + if (list->type == ISEQ_ELEMENT_INSN) { + if (do_peepholeopt) { + iseq_peephole_optimize(iseq, list, do_tailcallopt); + } + if (do_si) { + iseq_specialized_instruction(iseq, (INSN *)list); + } + if (do_ou) { + insn_operands_unification((INSN *)list); + } + } + list = list->next; + } + return COMPILE_OK; +} + +#if OPT_INSTRUCTIONS_UNIFICATION +static INSN * +new_unified_insn(rb_iseq_t *iseq, + int insn_id, int size, LINK_ELEMENT *seq_list) +{ + INSN *iobj = 0; + LINK_ELEMENT *list = seq_list; + int i, argc = 0; + VALUE *operands = 0, *ptr = 0; + + + /* count argc */ + for (i = 0; i < size; i++) { + iobj = (INSN *)list; + argc += iobj->operand_size; + list = list->next; + } + + if (argc > 0) { + ptr = operands = + (VALUE *)compile_data_alloc(iseq, sizeof(VALUE) * argc); + } + + /* copy operands */ + list = seq_list; + for (i = 0; i < size; i++) { + iobj = (INSN *)list; + MEMCPY(ptr, iobj->operands, VALUE, iobj->operand_size); + ptr += iobj->operand_size; + list = list->next; + } + + return new_insn_core(iseq, iobj->line_no, insn_id, argc, operands); +} +#endif + +/* + * This scheme can get more performance if do this optimize with + * label address resolving. + * It's future work (if compile time was bottle neck). + */ +static int +iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *anchor) +{ +#if OPT_INSTRUCTIONS_UNIFICATION + LINK_ELEMENT *list; + INSN *iobj, *niobj; + int id, j, k; + + list = FIRST_ELEMENT(anchor); + while (list) { + if (list->type == ISEQ_ELEMENT_INSN) { + iobj = (INSN *)list; + id = iobj->insn_id; + if (unified_insns_data[id] != 0) { + const int *const *entry = unified_insns_data[id]; + for (j = 1; j < (int)entry[0]; j++) { + const int *unified = entry[j]; + LINK_ELEMENT *li = list->next; + for (k = 2; k < unified[1]; k++) { + if (li->type != ISEQ_ELEMENT_INSN || + ((INSN *)li)->insn_id != unified[k]) { + goto miss; + } + li = li->next; + } + /* matched */ + niobj = + new_unified_insn(iseq, unified[0], unified[1] - 1, + list); + + /* insert to list */ + niobj->link.prev = (LINK_ELEMENT *)iobj->link.prev; + niobj->link.next = li; + if (li) { + li->prev = (LINK_ELEMENT *)niobj; + } + + list->prev->next = (LINK_ELEMENT *)niobj; + list = (LINK_ELEMENT *)niobj; + break; + miss:; + } + } + } + list = list->next; + } +#endif + return COMPILE_OK; +} + +#if OPT_STACK_CACHING + +#define SC_INSN(insn, stat) sc_insn_info[(insn)][(stat)] +#define SC_NEXT(insn) sc_insn_next[insn] + +#include "opt_sc.inc" + +static int +insn_set_sc_state(rb_iseq_t *iseq, INSN *iobj, int state) +{ + int nstate; + int insn_id; + + insn_id = iobj->insn_id; + iobj->insn_id = SC_INSN(insn_id, state); + nstate = SC_NEXT(iobj->insn_id); + + if (insn_id == BIN(jump) || + insn_id == BIN(branchif) || insn_id == BIN(branchunless)) { + LABEL *lobj = (LABEL *)OPERAND_AT(iobj, 0); + + if (lobj->sc_state != 0) { + if (lobj->sc_state != nstate) { + dump_disasm_list((LINK_ELEMENT *)iobj); + dump_disasm_list((LINK_ELEMENT *)lobj); + printf("\n-- %d, %d\n", lobj->sc_state, nstate); + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->lineno, + "insn_set_sc_state error\n"); + return 0; + } + } + else { + lobj->sc_state = nstate; + } + if (insn_id == BIN(jump)) { + nstate = SCS_XX; + } + } + else if (insn_id == BIN(leave)) { + nstate = SCS_XX; + } + + return nstate; +} + +static int +label_set_sc_state(LABEL *lobj, int state) +{ + if (lobj->sc_state != 0) { + if (lobj->sc_state != state) { + state = lobj->sc_state; + } + } + else { + lobj->sc_state = state; + } + + return state; +} + + +#endif + +static int +iseq_set_sequence_stackcaching(rb_iseq_t *iseq, LINK_ANCHOR *anchor) +{ +#if OPT_STACK_CACHING + LINK_ELEMENT *list; + int state, insn_id; + + /* initialize */ + state = SCS_XX; + list = FIRST_ELEMENT(anchor); + /* dump_disasm_list(list); */ + + /* for each list element */ + while (list) { + redo_point: + switch (list->type) { + case ISEQ_ELEMENT_INSN: + { + INSN *iobj = (INSN *)list; + insn_id = iobj->insn_id; + + /* dump_disasm_list(list); */ + + switch (insn_id) { + case BIN(nop): + { + /* exception merge point */ + if (state != SCS_AX) { + INSN *rpobj = + new_insn_body(iseq, 0, BIN(reput), 0); + + /* replace this insn */ + REPLACE_ELEM(list, (LINK_ELEMENT *)rpobj); + list = (LINK_ELEMENT *)rpobj; + goto redo_point; + } + break; + } + case BIN(swap): + { + if (state == SCS_AB || state == SCS_BA) { + state = (state == SCS_AB ? SCS_BA : SCS_AB); + + REMOVE_ELEM(list); + list = list->next; + goto redo_point; + } + break; + } + case BIN(pop): + { + switch (state) { + case SCS_AX: + case SCS_BX: + state = SCS_XX; + break; + case SCS_AB: + state = SCS_AX; + break; + case SCS_BA: + state = SCS_BX; + break; + case SCS_XX: + goto normal_insn; + default: + rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no, + "unreachable"); + } + /* remove useless pop */ + REMOVE_ELEM(list); + list = list->next; + goto redo_point; + } + default:; + /* none */ + } /* end of switch */ + normal_insn: + state = insn_set_sc_state(iseq, iobj, state); + break; + } + case ISEQ_ELEMENT_LABEL: + { + LABEL *lobj; + lobj = (LABEL *)list; + + state = label_set_sc_state(lobj, state); + } + default: + break; + } + list = list->next; + } +#endif + return COMPILE_OK; +} + + + +static int +compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int *cntp) +{ + NODE *list = node->nd_next; + VALUE lit = node->nd_lit; + int cnt = 1; + + debugp_param("nd_lit", lit); + ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit); + + while (list) { + COMPILE(ret, "each string", list->nd_head); + cnt++; + list = list->nd_next; + } + *cntp = cnt; + + return COMPILE_OK; +} + +static int +compile_dstr(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node) +{ + int cnt; + compile_dstr_fragments(iseq, ret, node, &cnt); + ADD_INSN1(ret, nd_line(node), concatstrings, INT2FIX(cnt)); + return COMPILE_OK; +} + +static int +compile_dregx(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node) +{ + int cnt; + compile_dstr_fragments(iseq, ret, node, &cnt); + ADD_INSN2(ret, nd_line(node), toregexp, INT2FIX(node->nd_cflag), INT2FIX(cnt)); + return COMPILE_OK; +} + +static int +compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * cond, + LABEL *then_label, LABEL *else_label) +{ + switch (nd_type(cond)) { + case NODE_AND: + { + LABEL *label = NEW_LABEL(nd_line(cond)); + compile_branch_condition(iseq, ret, cond->nd_1st, label, + else_label); + ADD_LABEL(ret, label); + compile_branch_condition(iseq, ret, cond->nd_2nd, then_label, + else_label); + break; + } + case NODE_OR: + { + LABEL *label = NEW_LABEL(nd_line(cond)); + compile_branch_condition(iseq, ret, cond->nd_1st, then_label, + label); + ADD_LABEL(ret, label); + compile_branch_condition(iseq, ret, cond->nd_2nd, then_label, + else_label); + break; + } + case NODE_LIT: /* NODE_LIT is always not true */ + case NODE_TRUE: + case NODE_STR: + /* printf("useless conditon eliminate (%s)\n", ruby_node_name(nd_type(cond))); */ + ADD_INSNL(ret, nd_line(cond), jump, then_label); + break; + case NODE_FALSE: + case NODE_NIL: + /* printf("useless conditon eliminate (%s)\n", ruby_node_name(nd_type(cond))); */ + ADD_INSNL(ret, nd_line(cond), jump, else_label); + break; + default: + COMPILE(ret, "branch condition", cond); + ADD_INSNL(ret, nd_line(cond), branchunless, else_label); + ADD_INSNL(ret, nd_line(cond), jump, then_label); + break; + } + return COMPILE_OK; +} + +static int +compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root, + VALUE opt_p, int poped) +{ + NODE *node = node_root; + int len = node->nd_alen, line = nd_line(node), i=0; + DECL_ANCHOR(anchor); + + INIT_ANCHOR(anchor); + if (nd_type(node) != NODE_ZARRAY) { + while (node) { + if (nd_type(node) != NODE_ARRAY) { + rb_bug("compile_array: This node is not NODE_ARRAY, but %s", + ruby_node_name(nd_type(node))); + } + + i++; + if (opt_p && nd_type(node->nd_head) != NODE_LIT) { + opt_p = Qfalse; + } + COMPILE_(anchor, "array element", node->nd_head, poped); + node = node->nd_next; + } + } + + if (len != i) { + if (0) { + rb_bug("node error: compile_array (%d: %d-%d)", + (int)nd_line(node_root), len, i); + } + len = i; + } + + if (opt_p == Qtrue) { + if (!poped) { + VALUE ary = rb_ary_new(); + node = node_root; + while (node) { + rb_ary_push(ary, node->nd_head->nd_lit); + node = node->nd_next; + } + + iseq_add_mark_object_compile_time(iseq, ary); + ADD_INSN1(ret, nd_line(node_root), duparray, ary); + } + } + else { + if (!poped) { + ADD_INSN1(anchor, line, newarray, INT2FIX(len)); + } + APPEND_LIST(ret, anchor); + } + return len; +} + +static VALUE +compile_array(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root, VALUE opt_p) +{ + return compile_array_(iseq, ret, node_root, opt_p, 0); +} + +static VALUE +case_when_optimizable_literal(NODE * node) +{ + switch (nd_type(node)) { + case NODE_LIT: { + VALUE v = node->nd_lit; + if (SYMBOL_P(v) || rb_obj_is_kind_of(v, rb_cNumeric)) { + return v; + } + break; + } + case NODE_STR: + return node->nd_lit; + } + return Qfalse; +} + +static VALUE +when_vals(rb_iseq_t *iseq, LINK_ANCHOR *cond_seq, NODE *vals, LABEL *l1, VALUE special_literals) +{ + while (vals) { + VALUE lit; + NODE* val; + + val = vals->nd_head; + + if (special_literals && + (lit = case_when_optimizable_literal(val)) != Qfalse) { + rb_ary_push(special_literals, lit); + rb_ary_push(special_literals, (VALUE)(l1) | 1); + } + else { + special_literals = Qfalse; + } + + COMPILE(cond_seq, "when cond", val); + ADD_INSN1(cond_seq, nd_line(val), topn, INT2FIX(1)); + ADD_SEND(cond_seq, nd_line(val), ID2SYM(idEqq), INT2FIX(1)); + ADD_INSNL(cond_seq, nd_line(val), branchif, l1); + vals = vals->nd_next; + } + return special_literals; +} + +static int +compile_massign_lhs(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node) +{ + switch (nd_type(node)) { + case NODE_ATTRASGN: { + INSN *iobj; + VALUE dupidx; + + COMPILE_POPED(ret, "masgn lhs (NODE_ATTRASGN)", node); + POP_ELEMENT(ret); /* pop pop insn */ + iobj = (INSN *)POP_ELEMENT(ret); /* pop send insn */ + + dupidx = iobj->operands[1]; + dupidx = INT2FIX(FIX2INT(dupidx) + 1); + iobj->operands[1] = dupidx; + + ADD_INSN1(ret, nd_line(node), topn, dupidx); + ADD_ELEM(ret, (LINK_ELEMENT *)iobj); + ADD_INSN(ret, nd_line(node), pop); /* result */ + ADD_INSN(ret, nd_line(node), pop); /* rhs */ + break; + } + case NODE_MASGN: { + DECL_ANCHOR(anchor); + INIT_ANCHOR(anchor); + COMPILE_POPED(anchor, "nest masgn lhs", node); + REMOVE_ELEM(FIRST_ELEMENT(anchor)); + ADD_SEQ(ret, anchor); + break; + } + default: { + DECL_ANCHOR(anchor); + INIT_ANCHOR(anchor); + COMPILE_POPED(anchor, "masgn lhs", node); + REMOVE_ELEM(FIRST_ELEMENT(anchor)); + ADD_SEQ(ret, anchor); + } + } + + return COMPILE_OK; +} + +static void +compile_massign_opt_lhs(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *lhsn) +{ + if (lhsn) { + compile_massign_opt_lhs(iseq, ret, lhsn->nd_next); + compile_massign_lhs(iseq, ret, lhsn->nd_head); + } +} + +static int +compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *ret, + NODE *rhsn, NODE *orig_lhsn) +{ + VALUE mem[64]; + const int memsize = sizeof(mem) / sizeof(mem[0]); + int memindex = 0; + int llen = 0, rlen = 0; + int i; + NODE *lhsn = orig_lhsn; + +#define MEMORY(v) { \ + int i; \ + if (memindex == memsize) return 0; \ + for (i=0; ind_head; + switch (nd_type(ln)) { + case NODE_LASGN: + MEMORY(ln->nd_vid); + break; + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_IASGN: + case NODE_IASGN2: + case NODE_CVASGN: + MEMORY(ln->nd_vid); + break; + default: + return 0; + } + lhsn = lhsn->nd_next; + llen++; + } + + while (rhsn) { + if (llen <= rlen) { + COMPILE_POPED(ret, "masgn val (poped)", rhsn->nd_head); + } + else { + COMPILE(ret, "masgn val", rhsn->nd_head); + } + rhsn = rhsn->nd_next; + rlen++; + } + + if (llen > rlen) { + for (i=0; ind_value; + NODE *splatn = node->nd_args; + NODE *lhsn = node->nd_head; + int lhs_splat = (splatn && (VALUE)splatn != (VALUE)-1) ? 1 : 0; + + if (!poped || splatn || !compile_massign_opt(iseq, ret, rhsn, lhsn)) { + int llen = 0; + DECL_ANCHOR(lhsseq); + + INIT_ANCHOR(lhsseq); + + while (lhsn) { + compile_massign_lhs(iseq, lhsseq, lhsn->nd_head); + llen += 1; + lhsn = lhsn->nd_next; + } + + COMPILE(ret, "normal masgn rhs", rhsn); + + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + + ADD_INSN2(ret, nd_line(node), expandarray, + INT2FIX(llen), INT2FIX(lhs_splat)); + ADD_SEQ(ret, lhsseq); + + if (lhs_splat) { + if (nd_type(splatn) == NODE_POSTARG) { + /*a, b, *r, p1, p2 */ + NODE *postn = splatn->nd_2nd; + NODE *restn = splatn->nd_1st; + int num = postn->nd_alen; + int flag = 0x02 | (((VALUE)restn == (VALUE)-1) ? 0x00 : 0x01); + + ADD_INSN2(ret, nd_line(splatn), expandarray, + INT2FIX(num), INT2FIX(flag)); + + if ((VALUE)restn != (VALUE)-1) { + compile_massign_lhs(iseq, ret, restn); + } + while (postn) { + compile_massign_lhs(iseq, ret, postn->nd_head); + postn = postn->nd_next; + } + } + else { + /* a, b, *r */ + compile_massign_lhs(iseq, ret, splatn); + } + } + } + return COMPILE_OK; +} + +static int +compile_colon2(rb_iseq_t *iseq, NODE * node, + LINK_ANCHOR *pref, LINK_ANCHOR *body) +{ + switch (nd_type(node)) { + case NODE_CONST: + debugi("compile_colon2 - colon", node->nd_vid); + ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_vid)); + break; + case NODE_COLON3: + debugi("compile_colon2 - colon3", node->nd_mid); + ADD_INSN(body, nd_line(node), pop); + ADD_INSN1(body, nd_line(node), putobject, rb_cObject); + ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_mid)); + break; + case NODE_COLON2: + compile_colon2(iseq, node->nd_head, pref, body); + debugi("compile_colon2 - colon2", node->nd_mid); + ADD_INSN1(body, nd_line(node), getconstant, ID2SYM(node->nd_mid)); + break; + default: + COMPILE(pref, "const colon2 prefix", node); + break; + } + return COMPILE_OK; +} + +static VALUE +compile_cpath(LINK_ANCHOR *ret, rb_iseq_t *iseq, NODE *cpath) +{ + if (nd_type(cpath) == NODE_COLON3) { + /* toplevel class ::Foo */ + ADD_INSN1(ret, nd_line(cpath), putobject, rb_cObject); + return Qfalse; + } + else if (cpath->nd_head) { + /* Bar::Foo */ + COMPILE(ret, "nd_else->nd_head", cpath->nd_head); + return Qfalse; + } + else { + /* class at cbase Foo */ + ADD_INSN1(ret, nd_line(cpath), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + return Qtrue; + } +} + +static int +defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret, + NODE *node, LABEL **lfinish, VALUE needstr) +{ + const char *estr = 0; + enum node_type type; + + switch (type = nd_type(node)) { + + /* easy literals */ + case NODE_NIL: + estr = "nil"; + break; + case NODE_SELF: + estr = "self"; + break; + case NODE_TRUE: + estr = "true"; + break; + case NODE_FALSE: + estr = "false"; + break; + + case NODE_ARRAY:{ + NODE *vals = node; + + do { + defined_expr(iseq, ret, vals->nd_head, lfinish, Qfalse); + + if (!lfinish[1]) { + lfinish[1] = NEW_LABEL(nd_line(node)); + } + ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]); + } while ((vals = vals->nd_next) != NULL); + } + case NODE_STR: + case NODE_LIT: + case NODE_ZARRAY: + case NODE_AND: + case NODE_OR: + default: + estr = "expression"; + break; + + /* variables */ + case NODE_LVAR: + case NODE_DVAR: + estr = "local-variable"; + break; + + case NODE_IVAR: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_IVAR), + ID2SYM(node->nd_vid), needstr); + return 1; + + case NODE_GVAR: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_GVAR), + ((VALUE)node->nd_entry) | 1, needstr); + return 1; + + case NODE_CVAR: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_CVAR), + ID2SYM(node->nd_vid), needstr); + return 1; + + case NODE_CONST: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_CONST), + ID2SYM(node->nd_vid), needstr); + return 1; + case NODE_COLON2: + if (!lfinish[1]) { + lfinish[1] = NEW_LABEL(nd_line(node)); + } + defined_expr(iseq, ret, node->nd_head, lfinish, Qfalse); + ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]); + + if (rb_is_const_id(node->nd_mid)) { + COMPILE(ret, "defined/colon2#nd_head", node->nd_head); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_CONST), + ID2SYM(node->nd_mid), needstr); + } + else { + COMPILE(ret, "defined/colon2#nd_head", node->nd_head); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_METHOD), + ID2SYM(node->nd_mid), needstr); + } + return 1; + case NODE_COLON3: + ADD_INSN1(ret, nd_line(node), putobject, rb_cObject); + ADD_INSN3(ret, nd_line(node), defined, + INT2FIX(DEFINED_CONST), ID2SYM(node->nd_mid), needstr); + return 1; + + /* method dispatch */ + case NODE_CALL: + case NODE_VCALL: + case NODE_FCALL: + case NODE_ATTRASGN:{ + int self = Qtrue; + + switch (type) { + case NODE_ATTRASGN: + if (node->nd_recv == (NODE *)1) break; + case NODE_CALL: + self = Qfalse; + break; + default: + /* through */; + } + if (!lfinish[1]) { + lfinish[1] = NEW_LABEL(nd_line(node)); + } + if (node->nd_args) { + defined_expr(iseq, ret, node->nd_args, lfinish, Qfalse); + ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]); + } + if (!self) { + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + VALUE rescue = NEW_CHILD_ISEQVAL(NEW_NIL(), + rb_str_concat(rb_str_new2 + ("defined guard in "), + iseq->name), + ISEQ_TYPE_DEFINED_GUARD); + + defined_expr(iseq, ret, node->nd_recv, lfinish, Qfalse); + ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]); + + ADD_LABEL(ret, lstart); + COMPILE(ret, "defined/recv", node->nd_recv); + ADD_LABEL(ret, lend); + ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lfinish[1]); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_METHOD), + ID2SYM(node->nd_mid), needstr); + } + else { + ADD_INSN(ret, nd_line(node), putself); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_FUNC), + ID2SYM(node->nd_mid), needstr); + } + return 1; + } + + case NODE_YIELD: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_YIELD), 0, + needstr); + return 1; + + case NODE_BACK_REF: + case NODE_NTH_REF: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_REF), + INT2FIX((node->nd_nth << 1) | (type == NODE_BACK_REF)), + needstr); + return 1; + + case NODE_SUPER: + case NODE_ZSUPER: + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_ZSUPER), 0, + needstr); + return 1; + + case NODE_OP_ASGN1: + case NODE_OP_ASGN2: + case NODE_OP_ASGN_OR: + case NODE_OP_ASGN_AND: + case NODE_MASGN: + case NODE_LASGN: + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_GASGN: + case NODE_IASGN: + case NODE_CDECL: + case NODE_CVDECL: + case NODE_CVASGN: + estr = "assignment"; + break; + } + + if (estr != 0) { + if (needstr != Qfalse) { + VALUE str = rb_str_new2(estr); + ADD_INSN1(ret, nd_line(node), putstring, str); + iseq_add_mark_object_compile_time(iseq, str); + } + else { + ADD_INSN1(ret, nd_line(node), putobject, Qtrue); + } + return 1; + } + return 0; +} + +#define BUFSIZE 0x100 + +static VALUE +make_name_for_block(rb_iseq_t *iseq) +{ + int level = 1; + rb_iseq_t *ip = iseq; + + if (iseq->parent_iseq != 0) { + while (ip->local_iseq != ip) { + if (ip->type == ISEQ_TYPE_BLOCK) { + level++; + } + ip = ip->parent_iseq; + } + } + + if (level == 1) { + return rb_sprintf("block in %s", RSTRING_PTR(ip->name)); + } + else { + return rb_sprintf("block (%d levels) in %s", level, RSTRING_PTR(ip->name)); + } +} + +static void +add_ensure_range(rb_iseq_t *iseq, struct ensure_range *erange, + LABEL *lstart, LABEL *lend) +{ + struct ensure_range *ne = + compile_data_alloc(iseq, sizeof(struct ensure_range)); + + while (erange->next != 0) { + erange = erange->next; + } + ne->next = 0; + ne->begin = lend; + ne->end = erange->end; + erange->end = lstart; + + erange->next = ne; +} + +static void +add_ensure_iseq(LINK_ANCHOR *ret, rb_iseq_t *iseq) +{ + struct iseq_compile_data_ensure_node_stack *enlp = + iseq->compile_data->ensure_node_stack; + struct iseq_compile_data_ensure_node_stack *prev_enlp = enlp; + DECL_ANCHOR(ensure); + + INIT_ANCHOR(ensure); + while (enlp) { + DECL_ANCHOR(ensure_part); + LABEL *lstart = NEW_LABEL(0); + LABEL *lend = NEW_LABEL(0); + + INIT_ANCHOR(ensure_part); + add_ensure_range(iseq, enlp->erange, lstart, lend); + + iseq->compile_data->ensure_node_stack = enlp->prev; + ADD_LABEL(ensure_part, lstart); + COMPILE_POPED(ensure_part, "ensure part", enlp->ensure_node); + ADD_LABEL(ensure_part, lend); + + ADD_SEQ(ensure, ensure_part); + enlp = enlp->prev; + } + iseq->compile_data->ensure_node_stack = prev_enlp; + ADD_SEQ(ret, ensure); +} + +static VALUE +setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, unsigned long *flag) +{ + VALUE argc = INT2FIX(0); + int nsplat = 0; + DECL_ANCHOR(arg_block); + DECL_ANCHOR(args_splat); + + INIT_ANCHOR(arg_block); + INIT_ANCHOR(args_splat); + if (argn && nd_type(argn) == NODE_BLOCK_PASS) { + COMPILE(arg_block, "block", argn->nd_body); + *flag |= VM_CALL_ARGS_BLOCKARG_BIT; + argn = argn->nd_head; + } + + setup_argn: + if (argn) { + switch (nd_type(argn)) { + case NODE_SPLAT: { + COMPILE(args, "args (splat)", argn->nd_head); + argc = INT2FIX(1); + nsplat++; + *flag |= VM_CALL_ARGS_SPLAT_BIT; + break; + } + case NODE_ARGSCAT: + case NODE_ARGSPUSH: { + int next_is_array = (nd_type(argn->nd_head) == NODE_ARRAY); + DECL_ANCHOR(tmp); + + INIT_ANCHOR(tmp); + COMPILE(tmp, "args (cat: splat)", argn->nd_body); + if (next_is_array && nsplat == 0) { + /* none */ + } + else { + if (nd_type(argn) == NODE_ARGSCAT) { + ADD_INSN1(tmp, nd_line(argn), splatarray, Qfalse); + } + else { + ADD_INSN1(tmp, nd_line(argn), newarray, INT2FIX(1)); + } + } + INSERT_LIST(args_splat, tmp); + nsplat++; + *flag |= VM_CALL_ARGS_SPLAT_BIT; + + if (next_is_array) { + argc = INT2FIX(compile_array(iseq, args, argn->nd_head, Qfalse) + 1); + POP_ELEMENT(args); + } + else { + argn = argn->nd_head; + goto setup_argn; + } + break; + } + case NODE_ARRAY: { + argc = INT2FIX(compile_array(iseq, args, argn, Qfalse)); + POP_ELEMENT(args); + break; + } + default: { + rb_bug("setup_arg: unknown node: %s\n", ruby_node_name(nd_type(argn))); + } + } + } + + if (nsplat > 1) { + int i; + for (i=1; icompile_data->last_line, putnil); + } + return COMPILE_OK; + } + + iseq->compile_data->last_line = nd_line(node); + debug_node_start(node); + + type = nd_type(node); + + if (node->flags & NODE_FL_NEWLINE) { + ADD_TRACE(ret, nd_line(node), RUBY_EVENT_LINE); + } + + switch (type) { + case NODE_BLOCK:{ + while (node && nd_type(node) == NODE_BLOCK) { + COMPILE_(ret, "BLOCK body", node->nd_head, + (node->nd_next == 0 && poped == 0) ? 0 : 1); + node = node->nd_next; + } + if (node) { + COMPILE_(ret, "BLOCK next", node->nd_next, poped); + } + break; + } + case NODE_IF:{ + DECL_ANCHOR(cond_seq); + DECL_ANCHOR(then_seq); + DECL_ANCHOR(else_seq); + LABEL *then_label, *else_label, *end_label; + + INIT_ANCHOR(cond_seq); + INIT_ANCHOR(then_seq); + INIT_ANCHOR(else_seq); + then_label = NEW_LABEL(nd_line(node)); + else_label = NEW_LABEL(nd_line(node)); + end_label = NEW_LABEL(nd_line(node)); + + compile_branch_condition(iseq, cond_seq, node->nd_cond, + then_label, else_label); + COMPILE_(then_seq, "then", node->nd_body, poped); + COMPILE_(else_seq, "else", node->nd_else, poped); + + ADD_SEQ(ret, cond_seq); + + ADD_LABEL(ret, then_label); + ADD_SEQ(ret, then_seq); + ADD_INSNL(ret, nd_line(node), jump, end_label); + + ADD_LABEL(ret, else_label); + ADD_SEQ(ret, else_seq); + + ADD_LABEL(ret, end_label); + + break; + } + case NODE_CASE:{ + NODE *vals; + NODE *tempnode = node; + LABEL *endlabel, *elselabel; + DECL_ANCHOR(head); + DECL_ANCHOR(body_seq); + DECL_ANCHOR(cond_seq); + VALUE special_literals = rb_ary_new(); + + INIT_ANCHOR(head); + INIT_ANCHOR(body_seq); + INIT_ANCHOR(cond_seq); + if (node->nd_head == 0) { + COMPILE_(ret, "when", node->nd_body, poped); + break; + } + COMPILE(head, "case base", node->nd_head); + + node = node->nd_body; + type = nd_type(node); + + if (type != NODE_WHEN) { + COMPILE_ERROR((ERROR_ARGS "NODE_CASE: unexpected node. must be NODE_WHEN, but %s", ruby_node_name(type))); + } + + endlabel = NEW_LABEL(nd_line(node)); + elselabel = NEW_LABEL(nd_line(node)); + + ADD_SEQ(ret, head); /* case VAL */ + + while (type == NODE_WHEN) { + LABEL *l1; + + l1 = NEW_LABEL(nd_line(node)); + ADD_LABEL(body_seq, l1); + ADD_INSN(body_seq, nd_line(node), pop); + COMPILE_(body_seq, "when body", node->nd_body, poped); + ADD_INSNL(body_seq, nd_line(node), jump, endlabel); + + vals = node->nd_head; + if (vals) { + switch (nd_type(vals)) { + case NODE_ARRAY: + special_literals = when_vals(iseq, cond_seq, vals, l1, special_literals); + break; + case NODE_SPLAT: + case NODE_ARGSCAT: + case NODE_ARGSPUSH: + special_literals = 0; + COMPILE(cond_seq, "when/cond splat", vals); + ADD_INSN1(cond_seq, nd_line(vals), checkincludearray, Qtrue); + ADD_INSNL(cond_seq, nd_line(vals), branchif, l1); + break; + default: + rb_bug("NODE_CASE: unknown node (%s)", + ruby_node_name(nd_type(vals))); + } + } + else { + rb_bug("NODE_CASE: must be NODE_ARRAY, but 0"); + } + + node = node->nd_next; + if (!node) { + break; + } + type = nd_type(node); + } + /* else */ + if (node) { + ADD_LABEL(cond_seq, elselabel); + ADD_INSN(cond_seq, nd_line(node), pop); + COMPILE_(cond_seq, "else", node, poped); + ADD_INSNL(cond_seq, nd_line(node), jump, endlabel); + } + else { + debugs("== else (implicit)\n"); + ADD_LABEL(cond_seq, elselabel); + ADD_INSN(cond_seq, nd_line(tempnode), pop); + if (!poped) { + ADD_INSN(cond_seq, nd_line(tempnode), putnil); + } + ADD_INSNL(cond_seq, nd_line(tempnode), jump, endlabel); + } + + if (special_literals) { + ADD_INSN(ret, nd_line(tempnode), dup); + ADD_INSN2(ret, nd_line(tempnode), opt_case_dispatch, + special_literals, elselabel); + iseq_add_mark_object_compile_time(iseq, special_literals); + } + + ADD_SEQ(ret, cond_seq); + ADD_SEQ(ret, body_seq); + ADD_LABEL(ret, endlabel); + break; + } + case NODE_WHEN:{ + NODE *vals; + NODE *val; + NODE *orig_node = node; + LABEL *endlabel; + DECL_ANCHOR(body_seq); + + INIT_ANCHOR(body_seq); + endlabel = NEW_LABEL(nd_line(node)); + + while (node && nd_type(node) == NODE_WHEN) { + LABEL *l1 = NEW_LABEL(nd_line(node)); + ADD_LABEL(body_seq, l1); + COMPILE_(body_seq, "when", node->nd_body, poped); + ADD_INSNL(body_seq, nd_line(node), jump, endlabel); + + vals = node->nd_head; + if (vals && nd_type(vals) == NODE_ARRAY) { + while (vals) { + val = vals->nd_head; + COMPILE(ret, "when2", val); + ADD_INSNL(ret, nd_line(val), branchif, l1); + vals = vals->nd_next; + } + } + else if (nd_type(vals) == NODE_SPLAT || + nd_type(vals) == NODE_ARGSCAT || + nd_type(vals) == NODE_ARGSPUSH) { + + NODE *val = vals->nd_head; + + if (nd_type(vals) == NODE_ARGSCAT || nd_type(vals) == NODE_ARGSPUSH) { + NODE *vs = vals->nd_head; + val = vals->nd_body; + + while (vs) { + NODE* val = vs->nd_head; + COMPILE(ret, "when/argscat", val); + ADD_INSNL(ret, nd_line(val), branchif, l1); + vs = vs->nd_next; + } + } + + ADD_INSN(ret, nd_line(val), putnil); + COMPILE(ret, "when2/splat", val); + ADD_INSN1(ret, nd_line(val), checkincludearray, Qfalse); + ADD_INSN(ret, nd_line(val), pop); + ADD_INSNL(ret, nd_line(val), branchif, l1); + } + else { + rb_bug("err"); + } + node = node->nd_next; + } + /* else */ + COMPILE_(ret, "else", node, poped); + ADD_INSNL(ret, nd_line(orig_node), jump, endlabel); + + ADD_SEQ(ret, body_seq); + ADD_LABEL(ret, endlabel); + + break; + } + case NODE_OPT_N: + case NODE_WHILE: + case NODE_UNTIL:{ + LABEL *prev_start_label = iseq->compile_data->start_label; + LABEL *prev_end_label = iseq->compile_data->end_label; + LABEL *prev_redo_label = iseq->compile_data->redo_label; + VALUE prev_loopval_popped = iseq->compile_data->loopval_popped; + + struct iseq_compile_data_ensure_node_stack *enlp = + iseq->compile_data->ensure_node_stack; + + LABEL *next_label = iseq->compile_data->start_label = NEW_LABEL(nd_line(node)); /* next */ + LABEL *redo_label = iseq->compile_data->redo_label = NEW_LABEL(nd_line(node)); /* redo */ + LABEL *break_label = iseq->compile_data->end_label = NEW_LABEL(nd_line(node)); /* break */ + LABEL *end_label = NEW_LABEL(nd_line(node)); + + LABEL *next_catch_label = NEW_LABEL(nd_line(node)); + LABEL *tmp_label = NULL; + + iseq->compile_data->loopval_popped = 0; + iseq->compile_data->ensure_node_stack = 0; + + if (type == NODE_OPT_N || node->nd_state == 1) { + ADD_INSNL(ret, nd_line(node), jump, next_label); + } + else { + tmp_label = NEW_LABEL(nd_line(node)); + ADD_INSNL(ret, nd_line(node), jump, tmp_label); + } + ADD_INSN(ret, nd_line(node), putnil); + ADD_LABEL(ret, next_catch_label); + ADD_INSN(ret, nd_line(node), pop); + ADD_INSNL(ret, nd_line(node), jump, next_label); + if (tmp_label) ADD_LABEL(ret, tmp_label); + + ADD_LABEL(ret, redo_label); + COMPILE_POPED(ret, "while body", node->nd_body); + ADD_LABEL(ret, next_label); /* next */ + + if (type == NODE_WHILE) { + compile_branch_condition(iseq, ret, node->nd_cond, + redo_label, end_label); + } + else if (type == NODE_UNTIL) { + /* untile */ + compile_branch_condition(iseq, ret, node->nd_cond, + end_label, redo_label); + } + else { + ADD_CALL_RECEIVER(ret, nd_line(node)); + ADD_CALL(ret, nd_line(node), ID2SYM(idGets), INT2FIX(0)); + ADD_INSNL(ret, nd_line(node), branchif, redo_label); + /* opt_n */ + } + + ADD_LABEL(ret, end_label); + + if (node->nd_state == Qundef) { + /* ADD_INSN(ret, nd_line(node), putundef); */ + rb_bug("unsupported: putundef"); + } + else { + ADD_INSN(ret, nd_line(node), putnil); + } + + ADD_LABEL(ret, break_label); /* break */ + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + + ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, redo_label, break_label, + 0, break_label); + ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, redo_label, break_label, 0, + next_catch_label); + ADD_CATCH_ENTRY(CATCH_TYPE_REDO, redo_label, break_label, 0, + iseq->compile_data->redo_label); + + iseq->compile_data->start_label = prev_start_label; + iseq->compile_data->end_label = prev_end_label; + iseq->compile_data->redo_label = prev_redo_label; + iseq->compile_data->loopval_popped = prev_loopval_popped; + iseq->compile_data->ensure_node_stack = enlp; + break; + } + case NODE_ITER: + case NODE_FOR:{ + VALUE prevblock = iseq->compile_data->current_block; + LABEL *retry_label = NEW_LABEL(nd_line(node)); + LABEL *retry_end_l = NEW_LABEL(nd_line(node)); + ID mid = 0; + + ADD_LABEL(ret, retry_label); + if (nd_type(node) == NODE_FOR) { + COMPILE(ret, "iter caller (for)", node->nd_iter); + + iseq->compile_data->current_block = + NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), + ISEQ_TYPE_BLOCK); + + mid = idEach; + ADD_SEND_R(ret, nd_line(node), ID2SYM(idEach), INT2FIX(0), + iseq->compile_data->current_block, INT2FIX(0)); + } + else { + iseq->compile_data->current_block = + NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), + ISEQ_TYPE_BLOCK); + COMPILE(ret, "iter caller", node->nd_iter); + } + ADD_LABEL(ret, retry_end_l); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + + iseq->compile_data->current_block = prevblock; + + ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, retry_label, retry_end_l, 0, retry_end_l); + + break; + } + case NODE_BREAK:{ + unsigned long level = 0; + + if (iseq->compile_data->redo_label != 0) { + /* while/until */ + LABEL *splabel = NEW_LABEL(0); + ADD_LABEL(ret, splabel); + ADD_ADJUST(ret, nd_line(node), iseq->compile_data->redo_label); + COMPILE_(ret, "break val (while/until)", node->nd_stts, iseq->compile_data->loopval_popped); + add_ensure_iseq(ret, iseq); + ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->end_label); + ADD_ADJUST_RESTORE(ret, splabel); + + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + } + } + else if (iseq->type == ISEQ_TYPE_BLOCK) { + break_by_insn: + /* escape from block */ + COMPILE(ret, "break val (block)", node->nd_stts); + ADD_INSN1(ret, nd_line(node), throw, INT2FIX(level | 0x02) /* TAG_BREAK */ ); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + } + else if (iseq->type == ISEQ_TYPE_EVAL) { + break_in_eval: + COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with break")); + } + else { + rb_iseq_t *ip = iseq->parent_iseq; + while (ip) { + if (!ip->compile_data) { + ip = 0; + break; + } + + level++; + if (ip->compile_data->redo_label != 0) { + level = 0x8000; + if (ip->compile_data->loopval_popped == 0) { + /* need value */ + level |= 0x4000; + } + goto break_by_insn; + } + else if (ip->type == ISEQ_TYPE_BLOCK) { + level <<= 16; + goto break_by_insn; + } + else if (ip->type == ISEQ_TYPE_EVAL) { + goto break_in_eval; + } + + ip = ip->parent_iseq; + } + COMPILE_ERROR((ERROR_ARGS "Invalid break")); + } + break; + } + case NODE_NEXT:{ + unsigned long level = 0; + + if (iseq->compile_data->redo_label != 0) { + LABEL *splabel = NEW_LABEL(0); + debugs("next in while loop\n"); + ADD_LABEL(ret, splabel); + COMPILE(ret, "next val/valid syntax?", node->nd_stts); + add_ensure_iseq(ret, iseq); + ADD_ADJUST(ret, nd_line(node), iseq->compile_data->redo_label); + ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->start_label); + ADD_ADJUST_RESTORE(ret, splabel); + } + else if (iseq->compile_data->end_label) { + LABEL *splabel = NEW_LABEL(0); + debugs("next in block\n"); + ADD_LABEL(ret, splabel); + ADD_ADJUST(ret, nd_line(node), iseq->compile_data->start_label); + COMPILE(ret, "next val", node->nd_stts); + add_ensure_iseq(ret, iseq); + ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->end_label); + ADD_ADJUST_RESTORE(ret, splabel); + + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + } + } + else if (iseq->type == ISEQ_TYPE_EVAL) { + next_in_eval: + COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with next")); + } + else { + rb_iseq_t *ip; + ip = iseq; + while (ip) { + if (!ip->compile_data) { + ip = 0; + break; + } + + level = 0x8000 | 0x4000; + if (ip->compile_data->redo_label != 0) { + /* while loop */ + break; + } + else if (ip->type == ISEQ_TYPE_BLOCK) { + break; + } + else if (ip->type == ISEQ_TYPE_EVAL) { + goto next_in_eval; + } + + ip = ip->parent_iseq; + } + if (ip != 0) { + COMPILE(ret, "next val", node->nd_stts); + ADD_INSN1(ret, nd_line(node), throw, INT2FIX(level | 0x03) /* TAG_NEXT */ ); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + } + else { + COMPILE_ERROR((ERROR_ARGS "Invalid next")); + } + } + break; + } + case NODE_REDO:{ + if (iseq->compile_data->redo_label) { + LABEL *splabel = NEW_LABEL(0); + debugs("redo in while"); + ADD_LABEL(ret, splabel); + ADD_ADJUST(ret, nd_line(node), iseq->compile_data->redo_label); + add_ensure_iseq(ret, iseq); + ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->redo_label); + ADD_ADJUST_RESTORE(ret, splabel); + } + else if (iseq->type == ISEQ_TYPE_EVAL) { + redo_in_eval: + COMPILE_ERROR((ERROR_ARGS "Can't escape from eval with redo")); + } + else if (iseq->compile_data->start_label) { + LABEL *splabel = NEW_LABEL(0); + + debugs("redo in block"); + ADD_LABEL(ret, splabel); + add_ensure_iseq(ret, iseq); + ADD_ADJUST(ret, nd_line(node), iseq->compile_data->start_label); + ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->start_label); + ADD_ADJUST_RESTORE(ret, splabel); + + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + } + } + else { + rb_iseq_t *ip; + unsigned long level; + level = 0x8000 | 0x4000; + ip = iseq; + while (ip) { + if (!ip->compile_data) { + ip = 0; + break; + } + + if (ip->compile_data->redo_label != 0) { + break; + } + else if (ip->type == ISEQ_TYPE_BLOCK) { + break; + } + else if (ip->type == ISEQ_TYPE_EVAL) { + goto redo_in_eval; + } + + ip = ip->parent_iseq; + } + if (ip != 0) { + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN1(ret, nd_line(node), throw, INT2FIX(level | 0x05) /* TAG_REDO */ ); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + } + else { + COMPILE_ERROR((ERROR_ARGS "Invalid redo")); + } + } + break; + } + case NODE_RETRY:{ + if (iseq->type == ISEQ_TYPE_RESCUE) { + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN1(ret, nd_line(node), throw, INT2FIX(0x04) /* TAG_RETRY */ ); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + } + else { + COMPILE_ERROR((ERROR_ARGS "Invalid retry")); + } + break; + } + case NODE_BEGIN:{ + COMPILE_(ret, "NODE_BEGIN", node->nd_body, poped); + break; + } + case NODE_RESCUE:{ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + LABEL *lcont = NEW_LABEL(nd_line(node)); + VALUE rescue = NEW_CHILD_ISEQVAL( + node->nd_resq, + rb_str_concat(rb_str_new2("rescue in "), iseq->name), + ISEQ_TYPE_RESCUE); + + ADD_LABEL(ret, lstart); + COMPILE(ret, "rescue head", node->nd_head); + ADD_LABEL(ret, lend); + if (node->nd_else) { + ADD_INSN(ret, nd_line(node), pop); + COMPILE(ret, "rescue else", node->nd_else); + } + ADD_INSN(ret, nd_line(node), nop); + ADD_LABEL(ret, lcont); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + + /* resgister catch entry */ + ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lcont); + ADD_CATCH_ENTRY(CATCH_TYPE_RETRY, lend, lcont, 0, lstart); + break; + } + case NODE_RESBODY:{ + NODE *resq = node; + NODE *narg; + LABEL *label_miss, *label_hit; + + while (resq) { + label_miss = NEW_LABEL(nd_line(node)); + label_hit = NEW_LABEL(nd_line(node)); + + narg = resq->nd_args; + if (narg) { + switch (nd_type(narg)) { + case NODE_ARRAY: + while (narg) { + COMPILE(ret, "rescue arg", narg->nd_head); + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(2), INT2FIX(0)); + ADD_SEND(ret, nd_line(node), ID2SYM(idEqq), INT2FIX(1)); + ADD_INSNL(ret, nd_line(node), branchif, label_hit); + narg = narg->nd_next; + } + break; + case NODE_SPLAT: + case NODE_ARGSCAT: + case NODE_ARGSPUSH: + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(2), INT2FIX(0)); + COMPILE(ret, "rescue/cond splat", narg); + ADD_INSN1(ret, nd_line(node), checkincludearray, Qtrue); + ADD_INSN(ret, nd_line(node), swap); + ADD_INSN(ret, nd_line(node), pop); + ADD_INSNL(ret, nd_line(node), branchif, label_hit); + break; + default: + rb_bug("NODE_RESBODY: unknown node (%s)", + ruby_node_name(nd_type(narg))); + } + } + else { + ADD_INSN1(ret, nd_line(node), putobject, + rb_eStandardError); + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(2), INT2FIX(0)); + ADD_SEND(ret, nd_line(node), ID2SYM(idEqq), INT2FIX(1)); + ADD_INSNL(ret, nd_line(node), branchif, label_hit); + } + ADD_INSNL(ret, nd_line(node), jump, label_miss); + ADD_LABEL(ret, label_hit); + COMPILE(ret, "resbody body", resq->nd_body); + if (iseq->compile_data->option->tailcall_optimization) { + ADD_INSN(ret, nd_line(node), nop); + } + ADD_INSN(ret, nd_line(node), leave); + ADD_LABEL(ret, label_miss); + resq = resq->nd_head; + } + break; + } + case NODE_ENSURE:{ + DECL_ANCHOR(ensr); + VALUE ensure = NEW_CHILD_ISEQVAL(node->nd_ensr, + rb_str_concat(rb_str_new2 + ("ensure in "), + iseq->name), + ISEQ_TYPE_ENSURE); + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + LABEL *lcont = NEW_LABEL(nd_line(node)); + struct ensure_range er = { 0 }; + struct iseq_compile_data_ensure_node_stack enl; + struct ensure_range *erange; + + INIT_ANCHOR(ensr); + er.begin = lstart; + er.end = lend; + enl.ensure_node = node->nd_ensr; + enl.prev = iseq->compile_data->ensure_node_stack; /* prev */ + enl.erange = &er; + COMPILE_POPED(ensr, "ensure ensr", node->nd_ensr); + + iseq->compile_data->ensure_node_stack = &enl; + + ADD_LABEL(ret, lstart); + COMPILE_(ret, "ensure head", node->nd_head, poped); + ADD_LABEL(ret, lend); + if (ensr->anchor.next == 0) { + ADD_INSN(ret, nd_line(node), nop); + } + else { + ADD_SEQ(ret, ensr); + } + ADD_LABEL(ret, lcont); + + erange = iseq->compile_data->ensure_node_stack->erange; + while (erange) { + ADD_CATCH_ENTRY(CATCH_TYPE_ENSURE, erange->begin, erange->end, + ensure, lcont); + erange = erange->next; + } + iseq->compile_data->ensure_node_stack = enl.prev; + break; + } + + case NODE_AND: + case NODE_OR:{ + LABEL *end_label = NEW_LABEL(nd_line(node)); + COMPILE(ret, "nd_1st", node->nd_1st); + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + if (type == NODE_AND) { + ADD_INSNL(ret, nd_line(node), branchunless, end_label); + } + else { + ADD_INSNL(ret, nd_line(node), branchif, end_label); + } + if (!poped) { + ADD_INSN(ret, nd_line(node), pop); + } + COMPILE_(ret, "nd_2nd", node->nd_2nd, poped); + ADD_LABEL(ret, end_label); + break; + } + + case NODE_MASGN:{ + compile_massign(iseq, ret, node, poped); + break; + } + + case NODE_LASGN:{ + ID id = node->nd_vid; + int idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id); + + debugs("lvar: %s idx: %d\n", rb_id2name(id), idx); + COMPILE(ret, "rvalue", node->nd_value); + + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + ADD_INSN1(ret, nd_line(node), setlocal, INT2FIX(idx)); + + break; + } + case NODE_DASGN: + case NODE_DASGN_CURR:{ + int idx, lv, ls; + COMPILE(ret, "dvalue", node->nd_value); + debugp_param("dassn id", rb_str_new2(rb_id2name(node->nd_vid) ? rb_id2name(node->nd_vid) : "*")); + + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + + idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls); + + if (idx < 0) { + rb_bug("NODE_DASGN(_CURR): unknown id (%s)", rb_id2name(node->nd_vid)); + } + + ADD_INSN2(ret, nd_line(node), setdynamic, + INT2FIX(ls - idx), INT2FIX(lv)); + break; + } + case NODE_GASGN:{ + COMPILE(ret, "lvalue", node->nd_value); + + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + ADD_INSN1(ret, nd_line(node), setglobal, + (((long)node->nd_entry) | 1)); + break; + } + case NODE_IASGN: + case NODE_IASGN2:{ + COMPILE(ret, "lvalue", node->nd_value); + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + ADD_INSN1(ret, nd_line(node), setinstancevariable, + ID2SYM(node->nd_vid)); + break; + } + case NODE_CDECL:{ + COMPILE(ret, "lvalue", node->nd_value); + + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + + if (node->nd_vid) { + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_vid)); + } + else { + compile_cpath(ret, iseq, node->nd_else); + ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_else->nd_mid)); + } + break; + } + case NODE_CVASGN:{ + COMPILE(ret, "cvasgn val", node->nd_value); + if (!poped) { + ADD_INSN(ret, nd_line(node), dup); + } + ADD_INSN1(ret, nd_line(node), setclassvariable, + ID2SYM(node->nd_vid)); + break; + } + case NODE_OP_ASGN1: { + DECL_ANCHOR(args); + VALUE argc; + unsigned long flag = 0; + ID id = node->nd_mid; + + /* + * a[x] (op)= y + * + * eval a # a + * eval x # a x + * dupn 2 # a x a x + * send :[] # a x a[x] + * eval y # a x a[x] y + * send op # a x a[x]+y + * send []= # ret + */ + + /* + * nd_recv[nd_args->nd_body] (nd_mid)= nd_args->nd_head; + * NODE_OP_ASGN nd_recv + * nd_args->nd_head + * nd_args->nd_body + * nd_mid + */ + + COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv); + if (nd_type(node->nd_args->nd_body) != NODE_ZARRAY) { + INIT_ANCHOR(args); + argc = setup_args(iseq, args, node->nd_args->nd_body, &flag); + ADD_SEQ(ret, args); + } + else { + argc = INT2FIX(0); + } + ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(FIX2INT(argc)+1)); + ADD_SEND_R(ret, nd_line(node), ID2SYM(idAREF), argc, Qfalse, LONG2FIX(flag)); + + if (id == 0 || id == 1) { + /* 0: or, 1: and + a[x] ||= y + + unless/if a[x] + a[x]= y + else + nil + end + */ + LABEL *label = NEW_LABEL(nd_line(node)); + LABEL *lfin = NEW_LABEL(nd_line(node)); + + if (id == 0) { + /* or */ + ADD_INSN(ret, nd_line(node), dup); + ADD_INSNL(ret, nd_line(node), branchif, label); + ADD_INSN(ret, nd_line(node), pop); + } + else { + /* and */ + ADD_INSN(ret, nd_line(node), dup); + ADD_INSNL(ret, nd_line(node), branchunless, label); + ADD_INSN(ret, nd_line(node), pop); + } + + COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head); + if (flag & VM_CALL_ARGS_SPLAT_BIT) { + ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1)); + ADD_INSN(ret, nd_line(node), concatarray); + ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET), + argc, Qfalse, LONG2FIX(flag)); + } + else { + ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET), + INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag)); + } + ADD_INSNL(ret, nd_line(node), jump, lfin); + ADD_LABEL(ret, label); + if (id == 0 || id == 1) { /* 0: or, 1: and */ + ADD_INSN(ret, nd_line(node), swap); + ADD_INSN(ret, nd_line(node), pop); + ADD_INSN(ret, nd_line(node), swap); + ADD_INSN(ret, nd_line(node), pop); + } + ADD_LABEL(ret, lfin); + } + else { + COMPILE(ret, "NODE_OP_ASGN1 args->head: ", node->nd_args->nd_head); + ADD_SEND(ret, nd_line(node), ID2SYM(id), INT2FIX(1)); + if (flag & VM_CALL_ARGS_SPLAT_BIT) { + ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1)); + ADD_INSN(ret, nd_line(node), concatarray); + ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET), + argc, Qfalse, LONG2FIX(flag)); + } + else { + ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET), + INT2FIX(FIX2INT(argc) + 1), Qfalse, LONG2FIX(flag)); + } + } + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + + break; + } + case NODE_OP_ASGN2:{ + ID atype = node->nd_next->nd_mid; + LABEL *lfin = NEW_LABEL(nd_line(node)); + LABEL *lcfin = NEW_LABEL(nd_line(node)); + /* + class C; attr_accessor :c; end + r = C.new + r.a &&= v # asgn2 + + eval r # r + dup # r r + eval r.a # r o + + # or + dup # r o o + if lcfin # r o + pop # r + eval v # r v + send a= # v + jump lfin # v + + lcfin: # r o + swap # o r + pop # o + + lfin: # v + + # and + dup # r o o + unless lcfin + pop # r + eval v # r v + send a= # v + jump lfin # v + + # others + eval v # r o v + send ?? # r w + send a= # w + + */ + + COMPILE(ret, "NODE_OP_ASGN2#recv", node->nd_recv); + ADD_INSN(ret, nd_line(node), dup); + ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_vid), + INT2FIX(0)); + + if (atype == 0 || atype == 1) { /* 0: OR or 1: AND */ + ADD_INSN(ret, nd_line(node), dup); + if (atype == 0) { + ADD_INSNL(ret, nd_line(node), branchif, lcfin); + } + else { + ADD_INSNL(ret, nd_line(node), branchunless, lcfin); + } + ADD_INSN(ret, nd_line(node), pop); + COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value); + ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_aid), + INT2FIX(1)); + ADD_INSNL(ret, nd_line(node), jump, lfin); + + ADD_LABEL(ret, lcfin); + ADD_INSN(ret, nd_line(node), swap); + ADD_INSN(ret, nd_line(node), pop); + + ADD_LABEL(ret, lfin); + } + else { + COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value); + ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_mid), + INT2FIX(1)); + ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_aid), + INT2FIX(1)); + } + + if (poped) { + /* we can apply more optimize */ + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_OP_ASGN_AND: + case NODE_OP_ASGN_OR:{ + LABEL *lfin = NEW_LABEL(nd_line(node)); + LABEL *lassign; + + if (nd_type(node) == NODE_OP_ASGN_OR) { + LABEL *lfinish[2]; + lfinish[0] = lfin; + lfinish[1] = 0; + defined_expr(iseq, ret, node->nd_head, lfinish, Qfalse); + lassign = lfinish[1]; + if (!lassign) { + lassign = NEW_LABEL(nd_line(node)); + } + ADD_INSNL(ret, nd_line(node), branchunless, lassign); + } + else { + lassign = NEW_LABEL(nd_line(node)); + } + + COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_head", node->nd_head); + ADD_INSN(ret, nd_line(node), dup); + + if (nd_type(node) == NODE_OP_ASGN_AND) { + ADD_INSNL(ret, nd_line(node), branchunless, lfin); + } + else { + ADD_INSNL(ret, nd_line(node), branchif, lfin); + } + + ADD_INSN(ret, nd_line(node), pop); + ADD_LABEL(ret, lassign); + COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_value", node->nd_value); + ADD_LABEL(ret, lfin); + + if (poped) { + /* we can apply more optimize */ + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_CALL: + case NODE_FCALL: + case NODE_VCALL:{ /* VCALL: variable or call */ + /* + call: obj.method(...) + fcall: func(...) + vcall: func + */ + DECL_ANCHOR(recv); + DECL_ANCHOR(args); + ID mid = node->nd_mid; + VALUE argc; + unsigned long flag = 0; + VALUE parent_block = iseq->compile_data->current_block; + iseq->compile_data->current_block = Qfalse; + + INIT_ANCHOR(recv); + INIT_ANCHOR(args); +#if SUPPORT_JOKE + if (nd_type(node) == NODE_VCALL) { + if (mid == idBitblt) { + ADD_INSN(ret, nd_line(node), bitblt); + break; + } + else if (mid == idAnswer) { + ADD_INSN(ret, nd_line(node), answer); + break; + } + } + /* only joke */ + { + ID goto_id; + ID label_id; + VALUE label; + VALUE label_sym; + + + CONST_ID(goto_id, "__goto__"); + CONST_ID(label_id, "__label__"); + + if (nd_type(node) == NODE_FCALL && + (mid == goto_id || mid == label_id)) { + if (nd_type(node->nd_args->nd_head) == NODE_LIT && + SYMBOL_P(node->nd_args->nd_head->nd_lit)) { + + label_sym = label = node->nd_args->nd_head->nd_lit; + if ((label = + rb_hash_aref(iseq->compile_data, + label_sym)) == Qnil) { + rb_hash_aset(iseq->compile_data, label_sym, + label = NEW_LABEL(nd_line(node))); + } + } + else { + rb_bug("invalid goto/label format"); + } + + + if (mid == goto_id) { + ADD_INSNL(ret, nd_line(node), jump, label); + } + else { + ADD_LABEL(ret, label); + } + break; + } + } +#endif + /* reciever */ + if (type == NODE_CALL) { + COMPILE(recv, "recv", node->nd_recv); + } + else if (type == NODE_FCALL || type == NODE_VCALL) { + ADD_CALL_RECEIVER(recv, nd_line(node)); + } + + /* args */ + if (nd_type(node) != NODE_VCALL) { + argc = setup_args(iseq, args, node->nd_args, &flag); + } + else { + argc = INT2FIX(0); + } + + ADD_SEQ(ret, recv); + ADD_SEQ(ret, args); + + debugp_param("call args argc", argc); + debugp_param("call method", ID2SYM(mid)); + + switch (nd_type(node)) { + case NODE_VCALL: + flag |= VM_CALL_VCALL_BIT; + /* VCALL is funcall, so fall through */ + case NODE_FCALL: + flag |= VM_CALL_FCALL_BIT; + } + + ADD_SEND_R(ret, nd_line(node), ID2SYM(mid), + argc, parent_block, LONG2FIX(flag)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_SUPER: + case NODE_ZSUPER:{ + DECL_ANCHOR(args); + VALUE argc; + unsigned long flag = 0; + VALUE parent_block = iseq->compile_data->current_block; + + INIT_ANCHOR(args); + iseq->compile_data->current_block = Qfalse; + if (nd_type(node) == NODE_SUPER) { + argc = setup_args(iseq, args, node->nd_args, &flag); + } + else { + /* NODE_ZSUPER */ + int i; + rb_iseq_t *liseq = iseq->local_iseq; + + argc = INT2FIX(liseq->argc); + + /* normal arguments */ + for (i = 0; i < liseq->argc; i++) { + int idx = liseq->local_size - i; + ADD_INSN1(args, nd_line(node), getlocal, INT2FIX(idx)); + } + + if (!liseq->arg_simple) { + if (liseq->arg_opts) { + /* optional arguments */ + int j; + for (j = 0; j < liseq->arg_opts - 1; j++) { + int idx = liseq->local_size - (i + j); + ADD_INSN1(args, nd_line(node), getlocal, INT2FIX(idx)); + } + i += j; + argc = INT2FIX(i); + } + + if (liseq->arg_rest != -1) { + /* rest argument */ + int idx = liseq->local_size - liseq->arg_rest; + ADD_INSN1(args, nd_line(node), getlocal, INT2FIX(idx)); + argc = INT2FIX(liseq->arg_rest + 1); + flag |= VM_CALL_ARGS_SPLAT_BIT; + } + + if (liseq->arg_post_len) { + /* post arguments */ + int post_len = liseq->arg_post_len; + int post_start = liseq->arg_post_start; + + if (liseq->arg_rest != -1) { + int j; + for (j=0; jlocal_size - (post_start + j); + ADD_INSN1(args, nd_line(node), getlocal, INT2FIX(idx)); + } + ADD_INSN1(args, nd_line(node), newarray, INT2FIX(j)); + ADD_INSN (args, nd_line(node), concatarray); + /* argc is setteled at above */ + } + else { + int j; + for (j=0; jlocal_size - (post_start + j); + ADD_INSN1(args, nd_line(node), getlocal, INT2FIX(idx)); + } + argc = INT2FIX(post_len + post_start); + } + } + } + } + + /* dummy reciever */ + ADD_INSN1(ret, nd_line(node), putobject, + nd_type(node) == NODE_ZSUPER ? Qfalse : Qtrue); + ADD_SEQ(ret, args); + ADD_INSN3(ret, nd_line(node), invokesuper, + argc, parent_block, LONG2FIX(flag)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_ARRAY:{ + compile_array_(iseq, ret, node, Qtrue, poped); + break; + } + case NODE_ZARRAY:{ + if (!poped) { + ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(0)); + } + break; + } + case NODE_VALUES:{ + NODE *n = node; + while (n) { + COMPILE(ret, "values item", n->nd_head); + n = n->nd_next; + } + ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(node->nd_alen)); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_HASH:{ + DECL_ANCHOR(list); + VALUE size = 0; + int type = node->nd_head ? nd_type(node->nd_head) : NODE_ZARRAY; + + INIT_ANCHOR(list); + switch (type) { + case NODE_ARRAY:{ + compile_array(iseq, list, node->nd_head, Qfalse); + size = OPERAND_AT(POP_ELEMENT(list), 0); + ADD_SEQ(ret, list); + break; + } + case NODE_ZARRAY: + size = INT2FIX(0); + break; + + default: + rb_bug("can't make hash with this node: %s", ruby_node_name(type)); + } + + ADD_INSN1(ret, nd_line(node), newhash, size); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_RETURN:{ + rb_iseq_t *is = iseq; + + while (is) { + if (is->type == ISEQ_TYPE_TOP || is->type == ISEQ_TYPE_CLASS) { + COMPILE_ERROR((ERROR_ARGS "Invalid return")); + break; + } + else { + LABEL *splabel = 0; + + if (is->type == ISEQ_TYPE_METHOD) { + splabel = NEW_LABEL(0); + ADD_LABEL(ret, splabel); + ADD_ADJUST(ret, nd_line(node), 0); + } + + COMPILE(ret, "return nd_stts (return val)", node->nd_stts); + + if (is->type == ISEQ_TYPE_METHOD) { + add_ensure_iseq(ret, iseq); + ADD_INSN(ret, nd_line(node), leave); + ADD_ADJUST_RESTORE(ret, splabel); + + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + } + } + else { + ADD_INSN1(ret, nd_line(node), throw, INT2FIX(0x01) /* TAG_RETURN */ ); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + } + break; + } + } + break; + } + case NODE_YIELD:{ + DECL_ANCHOR(args); + VALUE argc; + unsigned long flag = 0; + + INIT_ANCHOR(args); + if (iseq->type == ISEQ_TYPE_TOP || iseq->type == ISEQ_TYPE_CLASS) { + COMPILE_ERROR((ERROR_ARGS "Invalid yield")); + } + + if (node->nd_head) { + argc = setup_args(iseq, args, node->nd_head, &flag); + } + else { + argc = INT2FIX(0); + } + + ADD_SEQ(ret, args); + ADD_INSN2(ret, nd_line(node), invokeblock, argc, LONG2FIX(flag)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_LVAR:{ + if (!poped) { + ID id = node->nd_vid; + int idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id); + + debugs("id: %s idx: %d\n", rb_id2name(id), idx); + ADD_INSN1(ret, nd_line(node), getlocal, INT2FIX(idx)); + } + break; + } + case NODE_DVAR:{ + int lv, idx, ls; + debugi("nd_vid", node->nd_vid); + if (!poped) { + idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls); + if (idx < 0) { + rb_bug("unknown dvar (%s)", rb_id2name(node->nd_vid)); + } + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(ls - idx), INT2FIX(lv)); + } + break; + } + case NODE_GVAR:{ + ADD_INSN1(ret, nd_line(node), getglobal, + (((long)node->nd_entry) | 1)); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_IVAR:{ + debugi("nd_vid", node->nd_vid); + if (!poped) { + ADD_INSN1(ret, nd_line(node), getinstancevariable, + ID2SYM(node->nd_vid)); + } + break; + } + case NODE_CONST:{ + debugi("nd_vid", node->nd_vid); + + if (iseq->compile_data->option->inline_const_cache) { + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend); + ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_vid)); + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + } + else { + ADD_INSN(ret, nd_line(node), putnil); + ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_vid)); + } + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_CVAR:{ + if (!poped) { + ADD_INSN1(ret, nd_line(node), getclassvariable, + ID2SYM(node->nd_vid)); + } + break; + } + case NODE_NTH_REF:{ + if (!poped) { + ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* '~' */, + INT2FIX(node->nd_nth << 1)); + } + break; + } + case NODE_BACK_REF:{ + if (!poped) { + ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* '~' */, + INT2FIX(0x01 | (node->nd_nth << 1))); + } + break; + } + case NODE_MATCH: + case NODE_MATCH2: + case NODE_MATCH3:{ + DECL_ANCHOR(recv); + DECL_ANCHOR(val); + + INIT_ANCHOR(recv); + INIT_ANCHOR(val); + switch(nd_type(node)) { + case NODE_MATCH: + ADD_INSN1(recv, nd_line(node), putobject, node->nd_lit); + ADD_INSN2(val, nd_line(node), getspecial, INT2FIX(0), + INT2FIX(0)); + break; + case NODE_MATCH2: + COMPILE(recv, "reciever", node->nd_recv); + COMPILE(val, "value", node->nd_value); + break; + case NODE_MATCH3: + COMPILE(recv, "reciever", node->nd_value); + COMPILE(val, "value", node->nd_recv); + break; + } + + if (iseq->compile_data->option->specialized_instruction) { + /* TODO: detect by node */ + if (recv->last == recv->anchor.next && + INSN_OF(recv->last) == BIN(putobject) && + nd_type(node) == NODE_MATCH2) { + ADD_SEQ(ret, val); + ADD_INSN1(ret, nd_line(node), opt_regexpmatch1, + OPERAND_AT(recv->last, 0)); + } + else { + ADD_SEQ(ret, recv); + ADD_SEQ(ret, val); + ADD_INSN(ret, nd_line(node), opt_regexpmatch2); + } + } + else { + ADD_SEQ(ret, recv); + ADD_SEQ(ret, val); + ADD_SEND(ret, nd_line(node), ID2SYM(idEqTilde), INT2FIX(1)); + } + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_LIT:{ + debugp_param("lit", node->nd_lit); + if (!poped) { + ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit); + } + break; + } + case NODE_STR:{ + debugp_param("nd_lit", node->nd_lit); + if (!poped) { + ADD_INSN1(ret, nd_line(node), putstring, node->nd_lit); + } + break; + } + case NODE_DSTR:{ + compile_dstr(iseq, ret, node); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_XSTR:{ + ADD_CALL_RECEIVER(ret, nd_line(node)); + ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit); + ADD_CALL(ret, nd_line(node), ID2SYM(idBackquote), INT2FIX(1)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_DXSTR:{ + ADD_CALL_RECEIVER(ret, nd_line(node)); + compile_dstr(iseq, ret, node); + ADD_CALL(ret, nd_line(node), ID2SYM(idBackquote), INT2FIX(1)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_EVSTR:{ + COMPILE(ret, "nd_body", node->nd_body); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + else { + ADD_INSN(ret, nd_line(node), tostring); + } + break; + } + case NODE_DREGX:{ + compile_dregx(iseq, ret, node); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_DREGX_ONCE:{ + /* TODO: once? */ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), onceinlinecache, 0, lend); + ADD_INSN(ret, nd_line(node), pop); + + compile_dregx(iseq, ret, node); + + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_ARGSCAT:{ + COMPILE(ret, "argscat head", node->nd_head); + COMPILE(ret, "argscat body", node->nd_body); + ADD_INSN(ret, nd_line(node), concatarray); + break; + } + case NODE_ARGSPUSH:{ + COMPILE(ret, "arsgpush head", node->nd_head); + COMPILE(ret, "argspush body", node->nd_body); + ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1)); + ADD_INSN(ret, nd_line(node), concatarray); + break; + } + case NODE_SPLAT:{ + COMPILE(ret, "splat", node->nd_head); + ADD_INSN1(ret, nd_line(node), splatarray, Qfalse); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_DEFN:{ + VALUE iseqval = NEW_ISEQVAL(node->nd_defn, + rb_str_dup(rb_id2str(node->nd_mid)), + ISEQ_TYPE_METHOD); + + debugp_param("defn/iseq", iseqval); + + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->nd_mid)); + ADD_INSN1(ret, nd_line(node), putiseq, iseqval); + ADD_SEND (ret, nd_line(node), ID2SYM(id_core_define_method), INT2FIX(3)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + + debugp_param("defn", iseqval); + break; + } + case NODE_DEFS:{ + VALUE iseqval = NEW_ISEQVAL(node->nd_defn, + rb_str_dup(rb_id2str(node->nd_mid)), + ISEQ_TYPE_METHOD); + + debugp_param("defs/iseq", iseqval); + + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + COMPILE(ret, "defs: recv", node->nd_recv); + ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->nd_mid)); + ADD_INSN1(ret, nd_line(node), putiseq, iseqval); + ADD_SEND (ret, nd_line(node), ID2SYM(id_core_define_singleton_method), INT2FIX(3)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_ALIAS:{ + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + COMPILE(ret, "alias arg1", node->u1.node); + COMPILE(ret, "alias arg2", node->u2.node); + ADD_SEND(ret, nd_line(node), ID2SYM(id_core_set_method_alias), INT2FIX(3)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_VALIAS:{ + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->u1.id)); + ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->u2.id)); + ADD_SEND(ret, nd_line(node), ID2SYM(id_core_set_variable_alias), INT2FIX(2)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_UNDEF:{ + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + COMPILE(ret, "undef arg", node->u2.node); + ADD_SEND(ret, nd_line(node), ID2SYM(id_core_undef_method), INT2FIX(2)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_CLASS:{ + VALUE iseqval = + NEW_CHILD_ISEQVAL( + node->nd_body, + rb_sprintf("", rb_id2name(node->nd_cpath->nd_mid)), + ISEQ_TYPE_CLASS); + compile_cpath(ret, iseq, node->nd_cpath); + COMPILE(ret, "super", node->nd_super); + ADD_INSN3(ret, nd_line(node), defineclass, + ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(0)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_MODULE:{ + VALUE iseqval = NEW_CHILD_ISEQVAL( + node->nd_body, + rb_sprintf("", rb_id2name(node->nd_cpath->nd_mid)), + ISEQ_TYPE_CLASS); + + compile_cpath(ret, iseq, node->nd_cpath); + ADD_INSN (ret, nd_line(node), putnil); /* dummy */ + ADD_INSN3(ret, nd_line(node), defineclass, + ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(2)); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_SCLASS:{ + ID singletonclass; + VALUE iseqval = + NEW_ISEQVAL(node->nd_body, rb_str_new2("singletonclass"), + ISEQ_TYPE_CLASS); + + COMPILE(ret, "sclass#recv", node->nd_recv); + ADD_INSN (ret, nd_line(node), putnil); + CONST_ID(singletonclass, "singletonclass"); + ADD_INSN3(ret, nd_line(node), defineclass, + ID2SYM(singletonclass), iseqval, INT2FIX(1)); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_COLON2:{ + if (rb_is_const_id(node->nd_mid)) { + /* constant */ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + DECL_ANCHOR(pref); + DECL_ANCHOR(body); + + INIT_ANCHOR(pref); + INIT_ANCHOR(body); + compile_colon2(iseq, node, pref, body); + if (LIST_SIZE_ZERO(pref)) { + if (iseq->compile_data->option->inline_const_cache) { + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend); + } + else { + ADD_INSN(ret, nd_line(node), putnil); + } + + ADD_SEQ(ret, body); + + if (iseq->compile_data->option->inline_const_cache) { + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + } + } + else { + ADD_SEQ(ret, pref); + ADD_SEQ(ret, body); + } + } + else { + /* function call */ + ADD_CALL_RECEIVER(ret, nd_line(node)); + COMPILE(ret, "colon2#nd_head", node->nd_head); + ADD_CALL(ret, nd_line(node), ID2SYM(node->nd_mid), + INT2FIX(1)); + } + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_COLON3:{ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + debugi("colon3#nd_mid", node->nd_mid); + + /* add cache insn */ + if (iseq->compile_data->option->inline_const_cache) { + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), getinlinecache, 0, lend); + ADD_INSN(ret, nd_line(node), pop); + } + + ADD_INSN1(ret, nd_line(node), putobject, rb_cObject); + ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_mid)); + + if (iseq->compile_data->option->inline_const_cache) { + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + } + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_DOT2: + case NODE_DOT3:{ + int flag = type == NODE_DOT2 ? INT2FIX(0) : INT2FIX(1); + COMPILE(ret, "min", (NODE *) node->nd_beg); + COMPILE(ret, "max", (NODE *) node->nd_end); + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + ADD_INSN(ret, nd_line(node), pop); + } + else { + ADD_INSN1(ret, nd_line(node), newrange, flag); + } + break; + } + case NODE_FLIP2: + case NODE_FLIP3:{ + LABEL *lend = NEW_LABEL(nd_line(node)); + LABEL *lfin = NEW_LABEL(nd_line(node)); + LABEL *ltrue = NEW_LABEL(nd_line(node)); + VALUE key = rb_sprintf("flipflag/%s-%p-%d", + RSTRING_PTR(iseq->name), (void *)iseq, + iseq->compile_data->flip_cnt++); + + iseq_add_mark_object_compile_time(iseq, key); + ADD_INSN2(ret, nd_line(node), getspecial, key, INT2FIX(0)); + ADD_INSNL(ret, nd_line(node), branchif, lend); + + /* *flip == 0 */ + COMPILE(ret, "flip2 beg", node->nd_beg); + ADD_INSN(ret, nd_line(node), dup); + ADD_INSNL(ret, nd_line(node), branchunless, lfin); + if (nd_type(node) == NODE_FLIP3) { + ADD_INSN(ret, nd_line(node), dup); + ADD_INSN1(ret, nd_line(node), setspecial, key); + ADD_INSNL(ret, nd_line(node), jump, lfin); + } + else { + ADD_INSN1(ret, nd_line(node), setspecial, key); + } + + /* *flip == 1 */ + ADD_LABEL(ret, lend); + COMPILE(ret, "flip2 end", node->nd_end); + ADD_INSNL(ret, nd_line(node), branchunless, ltrue); + ADD_INSN1(ret, nd_line(node), putobject, Qfalse); + ADD_INSN1(ret, nd_line(node), setspecial, key); + + ADD_LABEL(ret, ltrue); + ADD_INSN1(ret, nd_line(node), putobject, Qtrue); + + ADD_LABEL(ret, lfin); + break; + } + case NODE_SELF:{ + if (!poped) { + ADD_INSN(ret, nd_line(node), putself); + } + break; + } + case NODE_NIL:{ + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + } + break; + } + case NODE_TRUE:{ + if (!poped) { + ADD_INSN1(ret, nd_line(node), putobject, Qtrue); + } + break; + } + case NODE_FALSE:{ + if (!poped) { + ADD_INSN1(ret, nd_line(node), putobject, Qfalse); + } + break; + } + case NODE_ERRINFO:{ + if (!poped) { + if (iseq->type == ISEQ_TYPE_RESCUE) { + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(2), INT2FIX(0)); + } + else { + rb_iseq_t *ip = iseq; + int level = 0; + while (ip) { + if (ip->type == ISEQ_TYPE_RESCUE) { + break; + } + ip = ip->parent_iseq; + level++; + } + if (ip) { + ADD_INSN2(ret, nd_line(node), getdynamic, INT2FIX(2), INT2FIX(level)); + } + else { + ADD_INSN(ret, nd_line(node), putnil); + } + } + } + break; + } + case NODE_DEFINED:{ + if (!poped) { + LABEL *lfinish[2]; + lfinish[0] = NEW_LABEL(nd_line(node)); + lfinish[1] = 0; + defined_expr(iseq, ret, node->nd_head, lfinish, Qtrue); + if (lfinish[1]) { + ADD_INSNL(ret, nd_line(node), jump, lfinish[0]); + ADD_LABEL(ret, lfinish[1]); + ADD_INSN(ret, nd_line(node), putnil); + } + ADD_LABEL(ret, lfinish[0]); + } + break; + } + case NODE_POSTEXE:{ + LABEL *lstart = NEW_LABEL(nd_line(node)); + LABEL *lend = NEW_LABEL(nd_line(node)); + VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK); + + ADD_LABEL(ret, lstart); + ADD_INSN2(ret, nd_line(node), onceinlinecache, 0, lend); + ADD_INSN(ret, nd_line(node), pop); + + ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); + ADD_INSN1(ret, nd_line(node), putiseq, block); + ADD_SEND (ret, nd_line(node), ID2SYM(id_core_set_postexe), INT2FIX(1)); + + ADD_INSN1(ret, nd_line(node), setinlinecache, lstart); + ADD_LABEL(ret, lend); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_DSYM:{ + compile_dstr(iseq, ret, node); + if (!poped) { + ADD_SEND(ret, nd_line(node), ID2SYM(idIntern), INT2FIX(0)); + } + else { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + case NODE_ATTRASGN:{ + DECL_ANCHOR(recv); + DECL_ANCHOR(args); + unsigned long flag = 0; + VALUE argc; + + INIT_ANCHOR(recv); + INIT_ANCHOR(args); + argc = setup_args(iseq, args, node->nd_args, &flag); + + if (node->nd_recv == (NODE *) 1) { + flag |= VM_CALL_FCALL_BIT; + ADD_INSN(recv, nd_line(node), putself); + } + else { + COMPILE(recv, "recv", node->nd_recv); + } + + debugp_param("argc", argc); + debugp_param("nd_mid", ID2SYM(node->nd_mid)); + + if (!poped) { + ADD_INSN(ret, nd_line(node), putnil); + ADD_SEQ(ret, recv); + ADD_SEQ(ret, args); + + if (flag & VM_CALL_ARGS_BLOCKARG_BIT) { + ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1)); + ADD_INSN1(ret, nd_line(node), setn, INT2FIX(FIX2INT(argc) + 3)); + ADD_INSN (ret, nd_line(node), pop); + } + else { + ADD_INSN1(ret, nd_line(node), setn, INT2FIX(FIX2INT(argc) + 1)); + } + } + else { + ADD_SEQ(ret, recv); + ADD_SEQ(ret, args); + } + ADD_SEND_R(ret, nd_line(node), ID2SYM(node->nd_mid), argc, 0, LONG2FIX(flag)); + ADD_INSN(ret, nd_line(node), pop); + + break; + } + case NODE_OPTBLOCK:{ + /* for optimize */ + LABEL *redo_label = NEW_LABEL(0); + LABEL *next_label = NEW_LABEL(0); + + iseq->compile_data->start_label = next_label; + iseq->compile_data->redo_label = redo_label; + + ADD_LABEL(ret, redo_label); + COMPILE_(ret, "optblock body", node->nd_head, 1 /* pop */ ); + ADD_LABEL(ret, next_label); + ADD_INSN(ret, 0, opt_checkenv); + break; + } + case NODE_PRELUDE:{ + COMPILE_POPED(ret, "prelude", node->nd_head); + COMPILE_(ret, "body", node->nd_body, poped); + break; + } + case NODE_LAMBDA:{ + /* compile same as lambda{...} */ + VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK); + VALUE argc = INT2FIX(0); + ADD_CALL_RECEIVER(ret, nd_line(node)); + ADD_CALL_WITH_BLOCK(ret, nd_line(node), ID2SYM(idLambda), argc, block); + + if (poped) { + ADD_INSN(ret, nd_line(node), pop); + } + break; + } + default: + rb_bug("iseq_compile_each: unknown node: %s", ruby_node_name(type)); + return Qnil; + } + + debug_node_end(); + return COMPILE_OK; +} + +/***************************/ +/* instruction information */ +/***************************/ + +static int +insn_data_length(INSN *iobj) +{ + return insn_len(iobj->insn_id); +} + +static int +calc_sp_depth(int depth, INSN *insn) +{ + return insn_stack_increase(depth, insn->insn_id, insn->operands); +} + +static int +insn_data_line_no(INSN *iobj) +{ + return insn_len(iobj->line_no); +} + +static VALUE +insn_data_to_s_detail(INSN *iobj) +{ + VALUE str = rb_str_new(0, 0); + + str = rb_sprintf("%-16s", insn_name(iobj->insn_id)); + if (iobj->operands) { + const char *types = insn_op_types(iobj->insn_id); + int j; + + for (j = 0; types[j]; j++) { + char type = types[j]; + + switch (type) { + case TS_OFFSET: /* label(destination position) */ + { + LABEL *lobj = (LABEL *)OPERAND_AT(iobj, j); + rb_str_catf(str, "", lobj->label_no); + break; + } + break; + case TS_ISEQ: /* iseq */ + { + rb_iseq_t *iseq = (rb_iseq_t *)OPERAND_AT(iobj, j); + VALUE val = Qnil; + if (iseq) { + val = iseq->self; + } + rb_str_concat(str, rb_inspect(val)); + } + break; + case TS_LINDEX: + case TS_DINDEX: + case TS_NUM: /* ulong */ + case TS_VALUE: /* VALUE */ + rb_str_concat(str, rb_inspect(OPERAND_AT(iobj, j))); + break; + case TS_ID: /* ID */ + rb_str_concat(str, rb_inspect(OPERAND_AT(iobj, j))); + break; + case TS_GENTRY: + { + struct global_entry *entry = (struct global_entry *) + (OPERAND_AT(iobj, j) & (~1)); + rb_str_cat2(str, rb_id2name(entry->id)); + } + case TS_IC: /* method cache */ + rb_str_cat2(str, ""); + break; + case TS_CDHASH: /* case/when condition cache */ + rb_str_cat2(str, ""); + break; + default:{ + rb_raise(rb_eSyntaxError, "unknown operand type: %c", type); + } + } + if (types[j + 1]) { + rb_str_cat2(str, ", "); + } + } + } + return str; +} + +static void +dump_disasm_list(struct iseq_link_element *link) +{ + int pos = 0; + INSN *iobj; + LABEL *lobj; + VALUE str; + + printf("-- raw disasm--------\n"); + + while (link) { + switch (link->type) { + case ISEQ_ELEMENT_INSN: + { + iobj = (INSN *)link; + str = insn_data_to_s_detail(iobj); + printf("%04d %-65s(%4d)\n", pos, StringValueCStr(str), + insn_data_line_no(iobj)); + pos += insn_data_length(iobj); + break; + } + case ISEQ_ELEMENT_LABEL: + { + lobj = (LABEL *)link; + printf("\n", lobj->label_no); + break; + } + case ISEQ_ELEMENT_NONE: + { + printf("[none]\n"); + break; + } + case ISEQ_ELEMENT_ADJUST: + { + ADJUST *adjust = (ADJUST *)link; + printf("adjust: [label: %d]\n", adjust->label->label_no); + break; + } + default: + /* ignore */ + rb_raise(rb_eSyntaxError, "dump_disasm_list error: %ld\n", FIX2LONG(link->type)); + } + link = link->next; + } + printf("---------------------\n"); +} + +VALUE +ruby_insns_name_array(void) +{ + VALUE ary = rb_ary_new(); + int i; + for (i = 0; i < sizeof(insn_name_info) / sizeof(insn_name_info[0]); i++) { + rb_ary_push(ary, rb_obj_freeze(rb_str_new2(insn_name_info[i]))); + } + return rb_obj_freeze(ary); +} + +static LABEL * +register_label(rb_iseq_t *iseq, struct st_table *labels_table, VALUE obj) +{ + LABEL *label = 0; + st_data_t tmp; + obj = rb_convert_type(obj, T_SYMBOL, "Symbol", "to_sym"); + + if (st_lookup(labels_table, obj, &tmp) == 0) { + label = NEW_LABEL(0); + st_insert(labels_table, obj, (st_data_t)label); + } + else { + label = (LABEL *)tmp; + } + return label; +} + +static VALUE +get_exception_sym2type(VALUE sym) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + static VALUE symRescue, symEnsure, symRetry; + static VALUE symBreak, symRedo, symNext; + + if (symRescue == 0) { + symRescue = ID2SYM(rb_intern("rescue")); + symEnsure = ID2SYM(rb_intern("ensure")); + symRetry = ID2SYM(rb_intern("retry")); + symBreak = ID2SYM(rb_intern("break")); + symRedo = ID2SYM(rb_intern("redo")); + symNext = ID2SYM(rb_intern("next")); + } + + if (sym == symRescue) return CATCH_TYPE_RESCUE; + if (sym == symEnsure) return CATCH_TYPE_ENSURE; + if (sym == symRetry) return CATCH_TYPE_RETRY; + if (sym == symBreak) return CATCH_TYPE_BREAK; + if (sym == symRedo) return CATCH_TYPE_REDO; + if (sym == symNext) return CATCH_TYPE_NEXT; + rb_raise(rb_eSyntaxError, "invalid exception symbol: %s", + RSTRING_PTR(rb_inspect(sym))); + return 0; +} + +static int +iseq_build_exception(rb_iseq_t *iseq, struct st_table *labels_table, + VALUE exception) +{ + int i; + + for (i=0; iself, Qnil); + } + + lstart = register_label(iseq, labels_table, ptr[2]); + lend = register_label(iseq, labels_table, ptr[3]); + lcont = register_label(iseq, labels_table, ptr[4]); + sp = NUM2INT(ptr[5]); + + ADD_CATCH_ENTRY(type, lstart, lend, eiseqval, lcont); + } + return COMPILE_OK; +} + +static int +iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor, + VALUE body, struct st_table *labels_table) +{ + /* TODO: body should be freezed */ + VALUE *ptr = RARRAY_PTR(body); + int len = RARRAY_LEN(body); + int i, j; + int line_no = 0; + /* + * index -> LABEL *label + */ + static struct st_table *insn_table; + + if (insn_table == 0) { + insn_table = ruby_insn_make_insn_table(); + } + + for (i=0; ifilename), line_no, + "unknown instruction: %s", RSTRING_PTR(insn)); + } + + if (argc != insn_len(insn_id)-1) { + rb_compile_error(RSTRING_PTR(iseq->filename), line_no, + "operand size mismatch"); + } + + if (argc > 0) { + argv = compile_data_alloc(iseq, sizeof(VALUE) * argc); + for (j=0; jself, Qnil); + } + else if (CLASS_OF(op) == rb_cISeq) { + argv[j] = op; + } + else { + rb_raise(rb_eSyntaxError, "ISEQ is required"); + } + iseq_add_mark_object(iseq, argv[j]); + } + else { + argv[j] = 0; + } + } + break; + case TS_GENTRY: + op = rb_convert_type(op, T_SYMBOL, "Symbol", "to_sym"); + argv[j] = (VALUE)rb_global_entry(SYM2ID(op)); + break; + case TS_IC: + argv[j] = (VALUE)NEW_INLINE_CACHE_ENTRY(); + iseq_add_mark_object(iseq, argv[j]); + break; + case TS_ID: + argv[j] = rb_convert_type(op, T_SYMBOL, + "Symbol", "to_sym"); + break; + case TS_CDHASH: + { + int i; + op = rb_convert_type(op, T_ARRAY, "Array", "to_ary"); + op = rb_ary_dup(op); + for (i=0; ilocal_table_size = RARRAY_LEN(locals); + iseq->local_table = tbl = (ID *)ALLOC_N(ID *, iseq->local_table_size); + iseq->local_size = iseq->local_table_size + 1; + + for (i=0; iarg_size = iseq->argc = FIX2INT(args); + iseq->arg_simple = 1; + } + else { + int i = 0; + VALUE argc = CHECK_INTEGER(rb_ary_entry(args, i++)); + VALUE arg_opt_labels = CHECK_ARRAY(rb_ary_entry(args, i++)); + VALUE arg_post_len = CHECK_INTEGER(rb_ary_entry(args, i++)); + VALUE arg_post_start = CHECK_INTEGER(rb_ary_entry(args, i++)); + VALUE arg_rest = CHECK_INTEGER(rb_ary_entry(args, i++)); + VALUE arg_block = CHECK_INTEGER(rb_ary_entry(args, i++)); + VALUE arg_simple = CHECK_INTEGER(rb_ary_entry(args, i++)); + + iseq->argc = FIX2INT(argc); + iseq->arg_rest = FIX2INT(arg_rest); + iseq->arg_post_len = FIX2INT(arg_post_len); + iseq->arg_post_start = FIX2INT(arg_post_start); + iseq->arg_block = FIX2INT(arg_block); + iseq->arg_opts = RARRAY_LEN(arg_opt_labels); + iseq->arg_opt_table = (VALUE *)ALLOC_N(VALUE, iseq->arg_opts); + + if (iseq->arg_block != -1) { + iseq->arg_size = iseq->arg_block + 1; + } + else if (iseq->arg_post_len) { + iseq->arg_size = iseq->arg_post_start + iseq->arg_post_len; + } + else if (iseq->arg_rest != -1) { + iseq->arg_size = iseq->arg_rest + 1; + } + else { + iseq->arg_size = iseq->argc + (iseq->arg_opts ? iseq->arg_opts - 1 : 0); + } + + for (i=0; iarg_opt_table[i] = + (VALUE)register_label(iseq, labels_table, + rb_ary_entry(arg_opt_labels, i)); + } + + iseq->arg_simple = NUM2INT(arg_simple); + } + + /* exception */ + iseq_build_exception(iseq, labels_table, exception); + + /* body */ + iseq_build_body(iseq, anchor, body, labels_table); + return iseq->self; +} + +/* for parser */ + +int +rb_dvar_defined(ID id) +{ + rb_thread_t *th = GET_THREAD(); + rb_iseq_t *iseq; + if (th->base_block && (iseq = th->base_block->iseq)) { + while (iseq->type == ISEQ_TYPE_BLOCK || + iseq->type == ISEQ_TYPE_RESCUE || + iseq->type == ISEQ_TYPE_ENSURE || + iseq->type == ISEQ_TYPE_EVAL || + iseq->type == ISEQ_TYPE_MAIN + ) { + int i; + + for (i = 0; i < iseq->local_table_size; i++) { + if (iseq->local_table[i] == id) { + return 1; + } + } + iseq = iseq->parent_iseq; + } + } + return 0; +} + +int +rb_local_defined(ID id) +{ + rb_thread_t *th = GET_THREAD(); + rb_iseq_t *iseq; + + if (th->base_block && th->base_block->iseq) { + int i; + iseq = th->base_block->iseq->local_iseq; + + for (i=0; ilocal_table_size; i++) { + if (iseq->local_table[i] == id) { + return 1; + } + } + } + return 0; +} + +int +rb_parse_in_eval(void) +{ + return GET_THREAD()->parse_in_eval != 0; +} diff --git a/lib/ruby-1.9.1-rc1/complex.c b/lib/ruby-1.9.1-rc1/complex.c new file mode 100644 index 0000000..390658b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/complex.c @@ -0,0 +1,1521 @@ +/* + complex.c: Coded by Tadayoshi Funaba 2008 + + This implementation is based on Keiju Ishitsuka's Complex library + which is written in ruby. +*/ + +#include "ruby.h" +#include + +#define NDEBUG +#include + +#ifndef COMPLEX_NAME +#define COMPLEX_NAME "Complex" +#endif + +#define ZERO INT2FIX(0) +#define ONE INT2FIX(1) +#define TWO INT2FIX(2) + +VALUE rb_cComplex; + +static ID id_abs, id_abs2, id_arg, id_cmp, id_conj, id_convert, + id_denominator, id_divmod, id_equal_p, id_expt, id_floor, id_hash, + id_idiv, id_inspect, id_negate, id_numerator, id_polar, id_quo, + id_real_p, id_to_f, id_to_i, id_to_r, id_to_s; + +#define f_boolcast(x) ((x) ? Qtrue : Qfalse) + +#define binop(n,op) \ +inline static VALUE \ +f_##n(VALUE x, VALUE y)\ +{\ + return rb_funcall(x, op, 1, y);\ +} + +#define fun1(n) \ +inline static VALUE \ +f_##n(VALUE x)\ +{\ + return rb_funcall(x, id_##n, 0);\ +} + +#define fun2(n) \ +inline static VALUE \ +f_##n(VALUE x, VALUE y)\ +{\ + return rb_funcall(x, id_##n, 1, y);\ +} + +#define math1(n) \ +inline static VALUE \ +m_##n(VALUE x)\ +{\ + return rb_funcall(rb_mMath, id_##n, 1, x);\ +} + +#define math2(n) \ +inline static VALUE \ +m_##n(VALUE x, VALUE y)\ +{\ + return rb_funcall(rb_mMath, id_##n, 2, x, y);\ +} + +#define PRESERVE_SIGNEDZERO + +inline static VALUE +f_add(VALUE x, VALUE y) +{ +#ifndef PRESERVE_SIGNEDZERO + if (FIXNUM_P(y) && FIX2LONG(y) == 0) + return x; + else if (FIXNUM_P(x) && FIX2LONG(x) == 0) + return y; +#endif + return rb_funcall(x, '+', 1, y); +} + +inline static VALUE +f_cmp(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) { + long c = FIX2LONG(x) - FIX2LONG(y); + if (c > 0) + c = 1; + else if (c < 0) + c = -1; + return INT2FIX(c); + } + return rb_funcall(x, id_cmp, 1, y); +} + +inline static VALUE +f_div(VALUE x, VALUE y) +{ + if (FIXNUM_P(y) && FIX2LONG(y) == 1) + return x; + return rb_funcall(x, '/', 1, y); +} + +inline static VALUE +f_gt_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) > FIX2LONG(y)); + return rb_funcall(x, '>', 1, y); +} + +inline static VALUE +f_lt_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) < FIX2LONG(y)); + return rb_funcall(x, '<', 1, y); +} + +binop(mod, '%') + +inline static VALUE +f_mul(VALUE x, VALUE y) +{ +#ifndef PRESERVE_SIGNEDZERO + if (FIXNUM_P(y)) { + long iy = FIX2LONG(y); + if (iy == 0) { + if (FIXNUM_P(x) || TYPE(x) == T_BIGNUM) + return ZERO; + } + else if (iy == 1) + return x; + } + else if (FIXNUM_P(x)) { + long ix = FIX2LONG(x); + if (ix == 0) { + if (FIXNUM_P(y) || TYPE(y) == T_BIGNUM) + return ZERO; + } + else if (ix == 1) + return y; + } +#endif + return rb_funcall(x, '*', 1, y); +} + +inline static VALUE +f_sub(VALUE x, VALUE y) +{ +#ifndef PRESERVE_SIGNEDZERO + if (FIXNUM_P(y) && FIX2LONG(y) == 0) + return x; +#endif + return rb_funcall(x, '-', 1, y); +} + +binop(xor, '^') + +fun1(abs) +fun1(abs2) +fun1(arg) +fun1(conj) +fun1(denominator) +fun1(floor) +fun1(hash) +fun1(inspect) +fun1(negate) +fun1(numerator) +fun1(polar) +fun1(real_p) + +fun1(to_f) +fun1(to_i) +fun1(to_r) +fun1(to_s) + +fun2(divmod) + +inline static VALUE +f_equal_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) == FIX2LONG(y)); + return rb_funcall(x, id_equal_p, 1, y); +} + +fun2(expt) +fun2(idiv) +fun2(quo) + +inline static VALUE +f_negative_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) < 0); + return rb_funcall(x, '<', 1, ZERO); +} + +#define f_positive_p(x) (!f_negative_p(x)) + +inline static VALUE +f_zero_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) == 0); + return rb_funcall(x, id_equal_p, 1, ZERO); +} + +#define f_nonzero_p(x) (!f_zero_p(x)) + +inline static VALUE +f_one_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) == 1); + return rb_funcall(x, id_equal_p, 1, ONE); +} + +inline static VALUE +f_kind_of_p(VALUE x, VALUE c) +{ + return rb_obj_is_kind_of(x, c); +} + +inline static VALUE +k_numeric_p(VALUE x) +{ + return f_kind_of_p(x, rb_cNumeric); +} + +inline static VALUE +k_integer_p(VALUE x) +{ + return f_kind_of_p(x, rb_cInteger); +} + +inline static VALUE +k_float_p(VALUE x) +{ + return f_kind_of_p(x, rb_cFloat); +} + +inline static VALUE +k_rational_p(VALUE x) +{ + return f_kind_of_p(x, rb_cRational); +} + +inline static VALUE +k_complex_p(VALUE x) +{ + return f_kind_of_p(x, rb_cComplex); +} + +#define k_exact_p(x) (!k_float_p(x)) +#define k_inexact_p(x) k_float_p(x) + +#define get_dat1(x) \ + struct RComplex *dat;\ + dat = ((struct RComplex *)(x)) + +#define get_dat2(x,y) \ + struct RComplex *adat, *bdat;\ + adat = ((struct RComplex *)(x));\ + bdat = ((struct RComplex *)(y)) + +inline static VALUE +nucomp_s_new_internal(VALUE klass, VALUE real, VALUE imag) +{ + NEWOBJ(obj, struct RComplex); + OBJSETUP(obj, klass, T_COMPLEX); + + obj->real = real; + obj->imag = imag; + + return (VALUE)obj; +} + +static VALUE +nucomp_s_alloc(VALUE klass) +{ + return nucomp_s_new_internal(klass, ZERO, ZERO); +} + +#if 0 +static VALUE +nucomp_s_new_bang(int argc, VALUE *argv, VALUE klass) +{ + VALUE real, imag; + + switch (rb_scan_args(argc, argv, "11", &real, &imag)) { + case 1: + if (!k_numeric_p(real)) + real = f_to_i(real); + imag = ZERO; + break; + default: + if (!k_numeric_p(real)) + real = f_to_i(real); + if (!k_numeric_p(imag)) + imag = f_to_i(imag); + break; + } + + return nucomp_s_new_internal(klass, real, imag); +} +#endif + +inline static VALUE +f_complex_new_bang1(VALUE klass, VALUE x) +{ + assert(!k_complex_p(x)); + return nucomp_s_new_internal(klass, x, ZERO); +} + +inline static VALUE +f_complex_new_bang2(VALUE klass, VALUE x, VALUE y) +{ + assert(!k_complex_p(x)); + assert(!k_complex_p(y)); + return nucomp_s_new_internal(klass, x, y); +} + +#ifdef CANONICALIZATION_FOR_MATHN +#define CANON +#endif + +#ifdef CANON +static int canonicalization = 0; + +void +nucomp_canonicalization(int f) +{ + canonicalization = f; +} +#endif + +inline static void +nucomp_real_check(VALUE num) +{ + switch (TYPE(num)) { + case T_FIXNUM: + case T_BIGNUM: + case T_FLOAT: + case T_RATIONAL: + break; + default: + if (!k_numeric_p(num) || !f_real_p(num)) + rb_raise(rb_eArgError, "not a real"); + } +} + +inline static VALUE +nucomp_s_canonicalize_internal(VALUE klass, VALUE real, VALUE imag) +{ +#ifdef CANON +#define CL_CANON +#ifdef CL_CANON + if (f_zero_p(imag) && k_exact_p(imag) && canonicalization) + return real; +#else + if (f_zero_p(imag) && canonicalization) + return real; +#endif +#endif + if (f_real_p(real) && f_real_p(imag)) + return nucomp_s_new_internal(klass, real, imag); + else if (f_real_p(real)) { + get_dat1(imag); + + return nucomp_s_new_internal(klass, + f_sub(real, dat->imag), + f_add(ZERO, dat->real)); + } + else if (f_real_p(imag)) { + get_dat1(real); + + return nucomp_s_new_internal(klass, + dat->real, + f_add(dat->imag, imag)); + } + else { + get_dat2(real, imag); + + return nucomp_s_new_internal(klass, + f_sub(adat->real, bdat->imag), + f_add(adat->imag, bdat->real)); + } +} + +static VALUE +nucomp_s_new(int argc, VALUE *argv, VALUE klass) +{ + VALUE real, imag; + + switch (rb_scan_args(argc, argv, "11", &real, &imag)) { + case 1: + nucomp_real_check(real); + imag = ZERO; + break; + default: + nucomp_real_check(real); + nucomp_real_check(imag); + break; + } + + return nucomp_s_canonicalize_internal(klass, real, imag); +} + +inline static VALUE +f_complex_new1(VALUE klass, VALUE x) +{ + assert(!k_complex_p(x)); + return nucomp_s_canonicalize_internal(klass, x, ZERO); +} + +inline static VALUE +f_complex_new2(VALUE klass, VALUE x, VALUE y) +{ + assert(!k_complex_p(x)); + return nucomp_s_canonicalize_internal(klass, x, y); +} + +static VALUE +nucomp_f_complex(int argc, VALUE *argv, VALUE klass) +{ + return rb_funcall2(rb_cComplex, id_convert, argc, argv); +} + +#define imp1(n) \ +extern VALUE rb_math_##n(VALUE x);\ +inline static VALUE \ +m_##n##_bang(VALUE x)\ +{\ + return rb_math_##n(x);\ +} + +#define imp2(n) \ +extern VALUE rb_math_##n(VALUE x, VALUE y);\ +inline static VALUE \ +m_##n##_bang(VALUE x, VALUE y)\ +{\ + return rb_math_##n(x, y);\ +} + +imp2(atan2) +imp1(cos) +imp1(cosh) +imp1(exp) +imp2(hypot) + +#define m_hypot(x,y) m_hypot_bang(x,y) + +extern VALUE rb_math_log(int argc, VALUE *argv); + +static VALUE +m_log_bang(VALUE x) +{ + return rb_math_log(1, &x); +} + +imp1(sin) +imp1(sinh) +imp1(sqrt) + +static VALUE +m_cos(VALUE x) +{ + if (f_real_p(x)) + return m_cos_bang(x); + { + get_dat1(x); + return f_complex_new2(rb_cComplex, + f_mul(m_cos_bang(dat->real), + m_cosh_bang(dat->imag)), + f_mul(f_negate(m_sin_bang(dat->real)), + m_sinh_bang(dat->imag))); + } +} + +static VALUE +m_sin(VALUE x) +{ + if (f_real_p(x)) + return m_sin_bang(x); + { + get_dat1(x); + return f_complex_new2(rb_cComplex, + f_mul(m_sin_bang(dat->real), + m_cosh_bang(dat->imag)), + f_mul(m_cos_bang(dat->real), + m_sinh_bang(dat->imag))); + } +} + +#if 0 +static VALUE +m_sqrt(VALUE x) +{ + if (f_real_p(x)) { + if (f_positive_p(x)) + return m_sqrt_bang(x); + return f_complex_new2(rb_cComplex, ZERO, m_sqrt_bang(f_negate(x))); + } + else { + get_dat1(x); + + if (f_negative_p(dat->imag)) + return f_conj(m_sqrt(f_conj(x))); + else { + VALUE a = f_abs(x); + return f_complex_new2(rb_cComplex, + m_sqrt_bang(f_div(f_add(a, dat->real), TWO)), + m_sqrt_bang(f_div(f_sub(a, dat->real), TWO))); + } + } +} +#endif + +inline static VALUE +f_complex_polar(VALUE klass, VALUE x, VALUE y) +{ + assert(!k_complex_p(x)); + assert(!k_complex_p(y)); + return nucomp_s_canonicalize_internal(klass, + f_mul(x, m_cos(y)), + f_mul(x, m_sin(y))); +} + +static VALUE +nucomp_s_polar(VALUE klass, VALUE abs, VALUE arg) +{ + return f_complex_polar(klass, abs, arg); +} + +static VALUE +nucomp_real(VALUE self) +{ + get_dat1(self); + return dat->real; +} + +static VALUE +nucomp_imag(VALUE self) +{ + get_dat1(self); + return dat->imag; +} + +static VALUE +nucomp_negate(VALUE self) +{ + get_dat1(self); + return f_complex_new2(CLASS_OF(self), + f_negate(dat->real), f_negate(dat->imag)); +} + +static VALUE +nucomp_add(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + VALUE real, imag; + + get_dat2(self, other); + + real = f_add(adat->real, bdat->real); + imag = f_add(adat->imag, bdat->imag); + + return f_complex_new2(CLASS_OF(self), real, imag); + } + if (k_numeric_p(other) && f_real_p(other)) { + get_dat1(self); + + return f_complex_new2(CLASS_OF(self), + f_add(dat->real, other), dat->imag); + } + return rb_num_coerce_bin(self, other, '+'); +} + +static VALUE +nucomp_sub(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + VALUE real, imag; + + get_dat2(self, other); + + real = f_sub(adat->real, bdat->real); + imag = f_sub(adat->imag, bdat->imag); + + return f_complex_new2(CLASS_OF(self), real, imag); + } + if (k_numeric_p(other) && f_real_p(other)) { + get_dat1(self); + + return f_complex_new2(CLASS_OF(self), + f_sub(dat->real, other), dat->imag); + } + return rb_num_coerce_bin(self, other, '-'); +} + +static VALUE +nucomp_mul(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + VALUE real, imag; + + get_dat2(self, other); + + real = f_sub(f_mul(adat->real, bdat->real), + f_mul(adat->imag, bdat->imag)); + imag = f_add(f_mul(adat->real, bdat->imag), + f_mul(adat->imag, bdat->real)); + + return f_complex_new2(CLASS_OF(self), real, imag); + } + if (k_numeric_p(other) && f_real_p(other)) { + get_dat1(self); + + return f_complex_new2(CLASS_OF(self), + f_mul(dat->real, other), + f_mul(dat->imag, other)); + } + return rb_num_coerce_bin(self, other, '*'); +} + +#define f_div f_quo + +static VALUE +nucomp_div(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + get_dat2(self, other); + + if (TYPE(adat->real) == T_FLOAT || + TYPE(adat->imag) == T_FLOAT || + TYPE(bdat->real) == T_FLOAT || + TYPE(bdat->imag) == T_FLOAT) { + VALUE magn = m_hypot(bdat->real, bdat->imag); + VALUE tmp = f_complex_new_bang2(CLASS_OF(self), + f_div(bdat->real, magn), + f_div(bdat->imag, magn)); + return f_div(f_mul(self, f_conj(tmp)), magn); + } + return f_div(f_mul(self, f_conj(other)), f_abs2(other)); + } + if (k_numeric_p(other) && f_real_p(other)) { + get_dat1(self); + + return f_complex_new2(CLASS_OF(self), + f_div(dat->real, other), + f_div(dat->imag, other)); + } + return rb_num_coerce_bin(self, other, '/'); +} + +#undef f_div +#define nucomp_quo nucomp_div + +static VALUE +nucomp_fdiv(VALUE self, VALUE other) +{ + get_dat1(self); + + return f_div(f_complex_new2(CLASS_OF(self), + f_to_f(dat->real), + f_to_f(dat->imag)), other); +} + +static VALUE +nucomp_expt(VALUE self, VALUE other) +{ + if (k_exact_p(other) && f_zero_p(other)) + return f_complex_new_bang1(CLASS_OF(self), ONE); + + if (k_rational_p(other) && f_one_p(f_denominator(other))) + other = f_numerator(other); /* good? */ + + if (k_complex_p(other)) { + VALUE a, r, theta, ore, oim, nr, ntheta; + + get_dat1(other); + + a = f_polar(self); + r = RARRAY_PTR(a)[0]; + theta = RARRAY_PTR(a)[1]; + + ore = dat->real; + oim = dat->imag; + nr = m_exp_bang(f_sub(f_mul(ore, m_log_bang(r)), + f_mul(oim, theta))); + ntheta = f_add(f_mul(theta, ore), f_mul(oim, m_log_bang(r))); + return f_complex_polar(CLASS_OF(self), nr, ntheta); + } + if (k_integer_p(other)) { + if (f_gt_p(other, ZERO)) { + VALUE x, z, n; + + x = self; + z = x; + n = f_sub(other, ONE); + + while (f_nonzero_p(n)) { + VALUE a; + + while (a = f_divmod(n, TWO), + f_zero_p(RARRAY_PTR(a)[1])) { + get_dat1(x); + + x = f_complex_new2(CLASS_OF(self), + f_sub(f_mul(dat->real, dat->real), + f_mul(dat->imag, dat->imag)), + f_mul(f_mul(TWO, dat->real), dat->imag)); + n = RARRAY_PTR(a)[0]; + } + z = f_mul(z, x); + n = f_sub(n, ONE); + } + return z; + } + return f_expt(f_div(f_to_r(ONE), self), f_negate(other)); + } + if (k_numeric_p(other) && f_real_p(other)) { + VALUE a, r, theta; + + a = f_polar(self); + r = RARRAY_PTR(a)[0]; + theta = RARRAY_PTR(a)[1]; + return f_complex_polar(CLASS_OF(self), f_expt(r, other), + f_mul(theta, other)); + } + return rb_num_coerce_bin(self, other, id_expt); +} + +static VALUE +nucomp_equal_p(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + get_dat2(self, other); + + return f_boolcast(f_equal_p(adat->real, bdat->real) && + f_equal_p(adat->imag, bdat->imag)); + } + if (k_numeric_p(other) && f_real_p(other)) { + get_dat1(self); + + return f_boolcast(f_equal_p(dat->real, other) && f_zero_p(dat->imag)); + } + return f_equal_p(other, self); +} + +static VALUE +nucomp_coerce(VALUE self, VALUE other) +{ + if (k_numeric_p(other) && f_real_p(other)) + return rb_assoc_new(f_complex_new_bang1(CLASS_OF(self), other), self); + + rb_raise(rb_eTypeError, "%s can't be coerced into %s", + rb_obj_classname(other), rb_obj_classname(self)); + return Qnil; +} + +static VALUE +nucomp_abs(VALUE self) +{ + get_dat1(self); + return m_hypot(dat->real, dat->imag); +} + +static VALUE +nucomp_abs2(VALUE self) +{ + get_dat1(self); + return f_add(f_mul(dat->real, dat->real), + f_mul(dat->imag, dat->imag)); +} + +static VALUE +nucomp_arg(VALUE self) +{ + get_dat1(self); + return m_atan2_bang(dat->imag, dat->real); +} + +static VALUE +nucomp_rect(VALUE self) +{ + get_dat1(self); + return rb_assoc_new(dat->real, dat->imag); +} + +static VALUE +nucomp_polar(VALUE self) +{ + return rb_assoc_new(f_abs(self), f_arg(self)); +} + +static VALUE +nucomp_conj(VALUE self) +{ + get_dat1(self); + return f_complex_new2(CLASS_OF(self), dat->real, f_negate(dat->imag)); +} + +#if 0 +static VALUE +nucomp_true(VALUE self) +{ + return Qtrue; +} +#endif + +static VALUE +nucomp_false(VALUE self) +{ + return Qfalse; +} + +#if 0 +static VALUE +nucomp_exact_p(VALUE self) +{ + get_dat1(self); + return f_boolcast(f_exact_p(dat->real) && f_exact_p(dat->imag)); +} + +static VALUE +nucomp_inexact_p(VALUE self) +{ + return f_boolcast(!nucomp_exact_p(self)); +} +#endif + +extern VALUE rb_lcm(VALUE x, VALUE y); + +static VALUE +nucomp_denominator(VALUE self) +{ + get_dat1(self); + return rb_lcm(f_denominator(dat->real), f_denominator(dat->imag)); +} + +static VALUE +nucomp_numerator(VALUE self) +{ + VALUE cd; + + get_dat1(self); + + cd = f_denominator(self); + return f_complex_new2(CLASS_OF(self), + f_mul(f_numerator(dat->real), + f_div(cd, f_denominator(dat->real))), + f_mul(f_numerator(dat->imag), + f_div(cd, f_denominator(dat->imag)))); +} + +static VALUE +nucomp_hash(VALUE self) +{ + get_dat1(self); + return f_xor(f_hash(dat->real), f_hash(dat->imag)); +} + +static VALUE +nucomp_eql_p(VALUE self, VALUE other) +{ + if (k_complex_p(other)) { + get_dat2(self, other); + + return f_boolcast((CLASS_OF(adat->real) == CLASS_OF(bdat->real)) && + (CLASS_OF(adat->imag) == CLASS_OF(bdat->imag)) && + f_equal_p(self, other)); + + } + return Qfalse; +} + +#ifndef HAVE_SIGNBIT +#ifdef signbit +#define HAVE_SIGNBIT 1 +#endif +#endif + +inline static VALUE +f_signbit(VALUE x) +{ + switch (TYPE(x)) { + case T_FLOAT: +#ifdef HAVE_SIGNBIT + { + double f = RFLOAT_VALUE(x); + return f_boolcast(!isnan(f) && signbit(f)); + } +#else + { + char s[2]; + + (void)snprintf(s, sizeof s, "%.0f", RFLOAT_VALUE(x)); + return f_boolcast(s[0] == '-'); + } +#endif + } + return f_negative_p(x); +} + +inline static VALUE +f_tpositive_p(VALUE x) +{ + return f_boolcast(!f_signbit(x)); +} + +static VALUE +nucomp_format(VALUE self, VALUE (*func)(VALUE)) +{ + VALUE s, impos; + + get_dat1(self); + + impos = f_tpositive_p(dat->imag); + + s = (*func)(dat->real); + rb_str_cat2(s, !impos ? "-" : "+"); + + rb_str_concat(s, (*func)(f_abs(dat->imag))); + if (!rb_isdigit(RSTRING_PTR(s)[RSTRING_LEN(s) - 1])) + rb_str_cat2(s, "*"); + rb_str_cat2(s, "i"); + + return s; +} + +static VALUE +nucomp_to_s(VALUE self) +{ + return nucomp_format(self, f_to_s); +} + +static VALUE +nucomp_inspect(VALUE self) +{ + VALUE s; + + s = rb_usascii_str_new2("("); + rb_str_concat(s, nucomp_format(self, f_inspect)); + rb_str_cat2(s, ")"); + + return s; +} + +static VALUE +nucomp_marshal_dump(VALUE self) +{ + VALUE a; + get_dat1(self); + + a = rb_assoc_new(dat->real, dat->imag); + rb_copy_generic_ivar(a, self); + return a; +} + +static VALUE +nucomp_marshal_load(VALUE self, VALUE a) +{ + get_dat1(self); + dat->real = RARRAY_PTR(a)[0]; + dat->imag = RARRAY_PTR(a)[1]; + rb_copy_generic_ivar(self, a); + return self; +} + +/* --- */ + +VALUE +rb_complex_raw(VALUE x, VALUE y) +{ + return nucomp_s_new_internal(rb_cComplex, x, y); +} + +VALUE +rb_complex_new(VALUE x, VALUE y) +{ + return nucomp_s_canonicalize_internal(rb_cComplex, x, y); +} + +VALUE +rb_complex_polar(VALUE x, VALUE y) +{ + return nucomp_s_polar(rb_cComplex, x, y); +} + +static VALUE nucomp_s_convert(int argc, VALUE *argv, VALUE klass); + +VALUE +rb_Complex(VALUE x, VALUE y) +{ + VALUE a[2]; + a[0] = x; + a[1] = y; + return nucomp_s_convert(2, a, rb_cComplex); +} + +static VALUE +nucomp_to_i(VALUE self) +{ + get_dat1(self); + + if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) { + VALUE s = f_to_s(self); + rb_raise(rb_eRangeError, "can't convert %s into Integer", + StringValuePtr(s)); + } + return f_to_i(dat->real); +} + +static VALUE +nucomp_to_f(VALUE self) +{ + get_dat1(self); + + if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) { + VALUE s = f_to_s(self); + rb_raise(rb_eRangeError, "can't convert %s into Float", + StringValuePtr(s)); + } + return f_to_f(dat->real); +} + +static VALUE +nucomp_to_r(VALUE self) +{ + get_dat1(self); + + if (k_inexact_p(dat->imag) || f_nonzero_p(dat->imag)) { + VALUE s = f_to_s(self); + rb_raise(rb_eRangeError, "can't convert %s into Rational", + StringValuePtr(s)); + } + return f_to_r(dat->real); +} + +static VALUE +nilclass_to_c(VALUE self) +{ + return rb_complex_new1(INT2FIX(0)); +} + +static VALUE +numeric_to_c(VALUE self) +{ + return rb_complex_new1(self); +} + +static VALUE comp_pat0, comp_pat1, comp_pat2, a_slash, a_dot_and_an_e, + null_string, underscores_pat, an_underscore; + +#define WS "\\s*" +#define DIGITS "(?:\\d(?:_\\d|\\d)*)" +#define NUMERATOR "(?:" DIGITS "?\\.)?" DIGITS "(?:[eE][-+]?" DIGITS ")?" +#define DENOMINATOR DIGITS +#define NUMBER "[-+]?" NUMERATOR "(?:\\/" DENOMINATOR ")?" +#define NUMBERNOS NUMERATOR "(?:\\/" DENOMINATOR ")?" +#define PATTERN0 "\\A" WS "(" NUMBER ")@(" NUMBER ")" WS +#define PATTERN1 "\\A" WS "([-+])?(" NUMBER ")?[iIjJ]" WS +#define PATTERN2 "\\A" WS "(" NUMBER ")(([-+])(" NUMBERNOS ")?[iIjJ])?" WS + +static void +make_patterns(void) +{ + static const char comp_pat0_source[] = PATTERN0; + static const char comp_pat1_source[] = PATTERN1; + static const char comp_pat2_source[] = PATTERN2; + static const char underscores_pat_source[] = "_+"; + + if (comp_pat0) return; + + comp_pat0 = rb_reg_new(comp_pat0_source, sizeof comp_pat0_source - 1, 0); + rb_gc_register_mark_object(comp_pat0); + + comp_pat1 = rb_reg_new(comp_pat1_source, sizeof comp_pat1_source - 1, 0); + rb_gc_register_mark_object(comp_pat1); + + comp_pat2 = rb_reg_new(comp_pat2_source, sizeof comp_pat2_source - 1, 0); + rb_gc_register_mark_object(comp_pat2); + + a_slash = rb_usascii_str_new2("/"); + rb_gc_register_mark_object(a_slash); + + a_dot_and_an_e = rb_usascii_str_new2(".eE"); + rb_gc_register_mark_object(a_dot_and_an_e); + + null_string = rb_usascii_str_new2(""); + rb_gc_register_mark_object(null_string); + + underscores_pat = rb_reg_new(underscores_pat_source, + sizeof underscores_pat_source - 1, 0); + rb_gc_register_mark_object(underscores_pat); + + an_underscore = rb_usascii_str_new2("_"); + rb_gc_register_mark_object(an_underscore); +} + +#define id_match rb_intern("match") +#define f_match(x,y) rb_funcall(x, id_match, 1, y) + +#define id_aref rb_intern("[]") +#define f_aref(x,y) rb_funcall(x, id_aref, 1, y) + +#define id_post_match rb_intern("post_match") +#define f_post_match(x) rb_funcall(x, id_post_match, 0) + +#define id_split rb_intern("split") +#define f_split(x,y) rb_funcall(x, id_split, 1, y) + +#define id_include_p rb_intern("include?") +#define f_include_p(x,y) rb_funcall(x, id_include_p, 1, y) + +#define id_count rb_intern("count") +#define f_count(x,y) rb_funcall(x, id_count, 1, y) + +#define id_gsub_bang rb_intern("gsub!") +#define f_gsub_bang(x,y,z) rb_funcall(x, id_gsub_bang, 2, y, z) + +static VALUE +string_to_c_internal(VALUE self) +{ + VALUE s; + + s = self; + + if (RSTRING_LEN(s) == 0) + return rb_assoc_new(Qnil, self); + + { + VALUE m, sr, si, re, r, i; + int po; + + m = f_match(comp_pat0, s); + if (!NIL_P(m)) { + sr = f_aref(m, INT2FIX(1)); + si = f_aref(m, INT2FIX(2)); + re = f_post_match(m); + po = 1; + } + if (NIL_P(m)) { + m = f_match(comp_pat1, s); + if (!NIL_P(m)) { + sr = Qnil; + si = f_aref(m, INT2FIX(1)); + if (NIL_P(si)) + si = rb_usascii_str_new2(""); + { + VALUE t; + + t = f_aref(m, INT2FIX(2)); + if (NIL_P(t)) + t = rb_usascii_str_new2("1"); + rb_str_concat(si, t); + } + re = f_post_match(m); + po = 0; + } + } + if (NIL_P(m)) { + m = f_match(comp_pat2, s); + if (NIL_P(m)) + return rb_assoc_new(Qnil, self); + sr = f_aref(m, INT2FIX(1)); + if (NIL_P(f_aref(m, INT2FIX(2)))) + si = Qnil; + else { + VALUE t; + + si = f_aref(m, INT2FIX(3)); + t = f_aref(m, INT2FIX(4)); + if (NIL_P(t)) + t = rb_usascii_str_new2("1"); + rb_str_concat(si, t); + } + re = f_post_match(m); + po = 0; + } + r = INT2FIX(0); + i = INT2FIX(0); + if (!NIL_P(sr)) { + if (f_include_p(sr, a_slash)) + r = f_to_r(sr); + else if (f_gt_p(f_count(sr, a_dot_and_an_e), INT2FIX(0))) + r = f_to_f(sr); + else + r = f_to_i(sr); + } + if (!NIL_P(si)) { + if (f_include_p(si, a_slash)) + i = f_to_r(si); + else if (f_gt_p(f_count(si, a_dot_and_an_e), INT2FIX(0))) + i = f_to_f(si); + else + i = f_to_i(si); + } + if (po) + return rb_assoc_new(rb_complex_polar(r, i), re); + else + return rb_assoc_new(rb_complex_new2(r, i), re); + } +} + +static VALUE +string_to_c_strict(VALUE self) +{ + VALUE a = string_to_c_internal(self); + if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) { + VALUE s = f_inspect(self); + rb_raise(rb_eArgError, "invalid value for Complex: %s", + StringValuePtr(s)); + } + return RARRAY_PTR(a)[0]; +} + +#define id_gsub rb_intern("gsub") +#define f_gsub(x,y,z) rb_funcall(x, id_gsub, 2, y, z) + +static VALUE +string_to_c(VALUE self) +{ + VALUE s, a, backref; + + backref = rb_backref_get(); + rb_match_busy(backref); + + s = f_gsub(self, underscores_pat, an_underscore); + a = string_to_c_internal(s); + + rb_backref_set(backref); + + if (!NIL_P(RARRAY_PTR(a)[0])) + return RARRAY_PTR(a)[0]; + return rb_complex_new1(INT2FIX(0)); +} + +static VALUE +nucomp_s_convert(int argc, VALUE *argv, VALUE klass) +{ + VALUE a1, a2, backref; + + rb_scan_args(argc, argv, "11", &a1, &a2); + + backref = rb_backref_get(); + rb_match_busy(backref); + + switch (TYPE(a1)) { + case T_FIXNUM: + case T_BIGNUM: + case T_FLOAT: + break; + case T_STRING: + a1 = string_to_c_strict(a1); + break; + } + + switch (TYPE(a2)) { + case T_FIXNUM: + case T_BIGNUM: + case T_FLOAT: + break; + case T_STRING: + a2 = string_to_c_strict(a2); + break; + } + + rb_backref_set(backref); + + switch (TYPE(a1)) { + case T_COMPLEX: + { + get_dat1(a1); + + if (k_exact_p(dat->imag) && f_zero_p(dat->imag)) + a1 = dat->real; + } + } + + switch (TYPE(a2)) { + case T_COMPLEX: + { + get_dat1(a2); + + if (k_exact_p(dat->imag) && f_zero_p(dat->imag)) + a2 = dat->real; + } + } + + switch (TYPE(a1)) { + case T_COMPLEX: + if (argc == 1 || (k_exact_p(a2) && f_zero_p(a2))) + return a1; + } + + if (argc == 1) { + if (k_numeric_p(a1) && !f_real_p(a1)) + return a1; + } + else { + if ((k_numeric_p(a1) && k_numeric_p(a2)) && + (!f_real_p(a1) || !f_real_p(a2))) + return f_add(a1, + f_mul(a2, + f_complex_new_bang2(rb_cComplex, ZERO, ONE))); + } + + { + VALUE argv2[2]; + argv2[0] = a1; + argv2[1] = a2; + return nucomp_s_new(argc, argv2, klass); + } +} + +/* --- */ + +static VALUE +numeric_real(VALUE self) +{ + return self; +} + +static VALUE +numeric_imag(VALUE self) +{ + return INT2FIX(0); +} + +static VALUE +numeric_abs2(VALUE self) +{ + return f_mul(self, self); +} + +#define id_PI rb_intern("PI") + +static VALUE +numeric_arg(VALUE self) +{ + if (f_positive_p(self)) + return INT2FIX(0); + return rb_const_get(rb_mMath, id_PI); +} + +static VALUE +numeric_rect(VALUE self) +{ + return rb_assoc_new(self, INT2FIX(0)); +} + +static VALUE +numeric_polar(VALUE self) +{ + return rb_assoc_new(f_abs(self), f_arg(self)); +} + +static VALUE +numeric_conj(VALUE self) +{ + return self; +} + +void +Init_Complex(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + assert(fprintf(stderr, "assert() is now active\n")); + + id_abs = rb_intern("abs"); + id_abs2 = rb_intern("abs2"); + id_arg = rb_intern("arg"); + id_cmp = rb_intern("<=>"); + id_conj = rb_intern("conj"); + id_convert = rb_intern("convert"); + id_denominator = rb_intern("denominator"); + id_divmod = rb_intern("divmod"); + id_equal_p = rb_intern("=="); + id_expt = rb_intern("**"); + id_floor = rb_intern("floor"); + id_hash = rb_intern("hash"); + id_idiv = rb_intern("div"); + id_inspect = rb_intern("inspect"); + id_negate = rb_intern("-@"); + id_numerator = rb_intern("numerator"); + id_polar = rb_intern("polar"); + id_quo = rb_intern("quo"); + id_real_p = rb_intern("real?"); + id_to_f = rb_intern("to_f"); + id_to_i = rb_intern("to_i"); + id_to_r = rb_intern("to_r"); + id_to_s = rb_intern("to_s"); + + rb_cComplex = rb_define_class(COMPLEX_NAME, rb_cNumeric); + + rb_define_alloc_func(rb_cComplex, nucomp_s_alloc); + rb_undef_method(CLASS_OF(rb_cComplex), "allocate"); + +#if 0 + rb_define_private_method(CLASS_OF(rb_cComplex), "new!", nucomp_s_new_bang, -1); + rb_define_private_method(CLASS_OF(rb_cComplex), "new", nucomp_s_new, -1); +#else + rb_undef_method(CLASS_OF(rb_cComplex), "new"); +#endif + + rb_define_singleton_method(rb_cComplex, "rectangular", nucomp_s_new, -1); + rb_define_singleton_method(rb_cComplex, "rect", nucomp_s_new, -1); + rb_define_singleton_method(rb_cComplex, "polar", nucomp_s_polar, 2); + + rb_define_global_function(COMPLEX_NAME, nucomp_f_complex, -1); + + rb_undef_method(rb_cComplex, "<"); + rb_undef_method(rb_cComplex, "<="); + rb_undef_method(rb_cComplex, "<=>"); + rb_undef_method(rb_cComplex, ">"); + rb_undef_method(rb_cComplex, ">="); + rb_undef_method(rb_cComplex, "between?"); + rb_undef_method(rb_cComplex, "divmod"); + rb_undef_method(rb_cComplex, "floor"); + rb_undef_method(rb_cComplex, "ceil"); + rb_undef_method(rb_cComplex, "modulo"); + rb_undef_method(rb_cComplex, "round"); + rb_undef_method(rb_cComplex, "step"); + rb_undef_method(rb_cComplex, "truncate"); + +#if 0 /* NUBY */ + rb_undef_method(rb_cComplex, "//"); +#endif + + rb_define_method(rb_cComplex, "real", nucomp_real, 0); + rb_define_method(rb_cComplex, "imaginary", nucomp_imag, 0); + rb_define_method(rb_cComplex, "imag", nucomp_imag, 0); + + rb_define_method(rb_cComplex, "-@", nucomp_negate, 0); + rb_define_method(rb_cComplex, "+", nucomp_add, 1); + rb_define_method(rb_cComplex, "-", nucomp_sub, 1); + rb_define_method(rb_cComplex, "*", nucomp_mul, 1); + rb_define_method(rb_cComplex, "/", nucomp_div, 1); + rb_define_method(rb_cComplex, "quo", nucomp_quo, 1); + rb_define_method(rb_cComplex, "fdiv", nucomp_fdiv, 1); + rb_define_method(rb_cComplex, "**", nucomp_expt, 1); + + rb_define_method(rb_cComplex, "==", nucomp_equal_p, 1); + rb_define_method(rb_cComplex, "coerce", nucomp_coerce, 1); + + rb_define_method(rb_cComplex, "abs", nucomp_abs, 0); + rb_define_method(rb_cComplex, "magnitude", nucomp_abs, 0); + rb_define_method(rb_cComplex, "abs2", nucomp_abs2, 0); + rb_define_method(rb_cComplex, "arg", nucomp_arg, 0); + rb_define_method(rb_cComplex, "angle", nucomp_arg, 0); + rb_define_method(rb_cComplex, "phase", nucomp_arg, 0); + rb_define_method(rb_cComplex, "rectangular", nucomp_rect, 0); + rb_define_method(rb_cComplex, "rect", nucomp_rect, 0); + rb_define_method(rb_cComplex, "polar", nucomp_polar, 0); + rb_define_method(rb_cComplex, "conjugate", nucomp_conj, 0); + rb_define_method(rb_cComplex, "conj", nucomp_conj, 0); +#if 0 + rb_define_method(rb_cComplex, "~", nucomp_conj, 0); /* gcc */ +#endif + + rb_define_method(rb_cComplex, "real?", nucomp_false, 0); +#if 0 + rb_define_method(rb_cComplex, "complex?", nucomp_true, 0); + rb_define_method(rb_cComplex, "exact?", nucomp_exact_p, 0); + rb_define_method(rb_cComplex, "inexact?", nucomp_inexact_p, 0); +#endif + + rb_define_method(rb_cComplex, "numerator", nucomp_numerator, 0); + rb_define_method(rb_cComplex, "denominator", nucomp_denominator, 0); + + rb_define_method(rb_cComplex, "hash", nucomp_hash, 0); + rb_define_method(rb_cComplex, "eql?", nucomp_eql_p, 1); + + rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0); + rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 0); + + rb_define_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0); + rb_define_method(rb_cComplex, "marshal_load", nucomp_marshal_load, 1); + + /* --- */ + + rb_define_method(rb_cComplex, "to_i", nucomp_to_i, 0); + rb_define_method(rb_cComplex, "to_f", nucomp_to_f, 0); + rb_define_method(rb_cComplex, "to_r", nucomp_to_r, 0); + rb_define_method(rb_cNilClass, "to_c", nilclass_to_c, 0); + rb_define_method(rb_cNumeric, "to_c", numeric_to_c, 0); + + make_patterns(); + + rb_define_method(rb_cString, "to_c", string_to_c, 0); + + rb_define_private_method(CLASS_OF(rb_cComplex), "convert", nucomp_s_convert, -1); + + /* --- */ + + rb_define_method(rb_cNumeric, "real", numeric_real, 0); + rb_define_method(rb_cNumeric, "imaginary", numeric_imag, 0); + rb_define_method(rb_cNumeric, "imag", numeric_imag, 0); + rb_define_method(rb_cNumeric, "abs2", numeric_abs2, 0); + rb_define_method(rb_cNumeric, "arg", numeric_arg, 0); + rb_define_method(rb_cNumeric, "angle", numeric_arg, 0); + rb_define_method(rb_cNumeric, "phase", numeric_arg, 0); + rb_define_method(rb_cNumeric, "rectangular", numeric_rect, 0); + rb_define_method(rb_cNumeric, "rect", numeric_rect, 0); + rb_define_method(rb_cNumeric, "polar", numeric_polar, 0); + rb_define_method(rb_cNumeric, "conjugate", numeric_conj, 0); + rb_define_method(rb_cNumeric, "conj", numeric_conj, 0); + + rb_define_const(rb_cComplex, "I", + f_complex_new_bang2(rb_cComplex, ZERO, ONE)); +} + +/* +Local variables: +c-file-style: "ruby" +End: +*/ diff --git a/lib/ruby-1.9.1-rc1/config.guess b/lib/ruby-1.9.1-rc1/config.guess new file mode 100644 index 0000000..5186e37 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/config.guess @@ -0,0 +1,1532 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-08-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BeMac:Haiku:*:*) + echo powerpc-apple-haiku + exit ;; + BePC:Haiku:*:*) + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ruby-1.9.1-rc1/config.sub b/lib/ruby-1.9.1-rc1/config.sub new file mode 100644 index 0000000..6759825 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/config.sub @@ -0,0 +1,1658 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-16' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/ruby-1.9.1-rc1/configure b/lib/ruby-1.9.1-rc1/configure new file mode 100755 index 0000000..4dbddad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/configure @@ -0,0 +1,23787 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +BUILTIN_TRANSOBJS +BUILTIN_TRANSSRCS +BUILTIN_ENCOBJS +MANTYPE +NROFF +vendorhdrdir +sitehdrdir +rubyhdrdir +configure_args +vendordir +sitedir +ruby_version +sitearch +arch +MAKEFILES +THREAD_MODEL +MINIOBJS +EXPORT_PREFIX +COMMON_HEADERS +COMMON_MACROS +COMMON_LIBS +MAINLIBS +ENABLE_SHARED +DLDLIBS +SOLIBS +LIBRUBYARG_SHARED +LIBRUBYARG_STATIC +LIBRUBYARG +LIBRUBY +LIBRUBY_ALIASES +LIBRUBY_SO +LIBRUBY_A +RUBY_SO_NAME +RUBYW_INSTALL_NAME +rubyw_install_name +RUBY_INSTALL_NAME +LIBRUBY_DLDFLAGS +LIBRUBY_LDSHARED +XLDFLAGS +XCFLAGS +warnflags +debugflags +optflags +cflags +cppflags +RDOCTARGET +ARCHFILE +EXTOUT +RUNRUBY +PREP +MINIRUBY +setup +EXTSTATIC +STRIP +TRY_LINK +LIBPATHENV +RPATHFLAG +LIBPATHFLAG +LINK_SO +LIBEXT +DLEXT2 +DLEXT +LDSHAREDXX +LDSHARED +CCDLFLAGS +STATIC +ARCH_FLAG +DLDFLAGS +ALLOCA +LIBOBJS +MAKEDIRS +CP +RM +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SET_MAKE +LN_S +DLLWRAP +WINDRES +NM +ac_ct_OBJCOPY +OBJCOPY +ac_ct_OBJDUMP +OBJDUMP +ASFLAGS +AS +AR +RANLIB +COUTFLAG +OUTFLAG +CPPOUTFILE +GNU_LD +EGREP +GREP +CPP +ac_ct_CXX +CXXFLAGS +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +TEENY +MINOR +MAJOR +BASERUBY +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_baseruby +with_gcc +enable_frame_address +enable_largefile +enable_pthread +with_setjmp_type +enable_setreuid +with_valgrind +with_dln_a_out +enable_rpath +with_static_linked_ext +enable_shared +enable_install_doc +with_ruby_version +with_sitedir +with_vendordir +with_search_path +with_rubyhdrdir +with_sitehdrdir +with_vendorhdrdir +with_mantype +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-frame-address use GCC __builtin_frame_address(). + --disable-largefile omit support for large files + --enable-pthread use pthread library. + --enable-setreuid use setreuid()/setregid() according to need even if obsolete. + --disable-rpath embed run path into extension libraries. + --enable-shared build a shared library for Ruby. + --disable-install-doc do not install rdoc indexes during install + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby + --without-gcc never use gcc + --with-setjmp-type select setjmp type + --with-valgrind enable valgrind memcheck support. + --with-dln-a-out use dln_a_out if possible + --with-static-linked-ext link external modules statically + --with-ruby-version=STR ruby version string for version specific directories [full] (full|minor|STR) + --with-sitedir=DIR site libraries in DIR [LIBDIR/ruby/site_ruby] + --with-vendordir=DIR vendor libraries in DIR [LIBDIR/ruby/vendor_ruby] + --with-search-path=DIR specify the additional search path + --with-ruby-hdrdir=DIR core headers in DIR INCLUDEDIR + --with-site-hdrdir=DIR core headers in DIR INCLUDEDIR + --with-vendor-hdrdir=DIR core headers in DIR INCLUDEDIR + --with-mantype=TYPE specify man page type; TYPE is one of man and doc + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + +# Check whether --with-baseruby was given. +if test "${with_baseruby+set}" = set; then + withval=$with_baseruby; + case "$withval" in + *ruby*) + BASERUBY=$withval + ;; + *) + { { $as_echo "$as_me:$LINENO: error: need ruby" >&5 +$as_echo "$as_me: error: need ruby" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + +else + + BASERUBY="ruby" + +fi + +test "`$BASERUBY -e 'p 42' 2>/dev/null`" = 42 || + BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" + + + + + + + + +unset GREP_OPTIONS +rb_version=`grep '^#define RUBY_VERSION ' $srcdir/version.h` +MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'` +MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'` +TEENY=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)"'` +if test "$MAJOR" = ""; then + { { $as_echo "$as_me:$LINENO: error: could not determine MAJOR number from version.h" >&5 +$as_echo "$as_me: error: could not determine MAJOR number from version.h" >&2;} + { (exit 1); exit 1; }; } +fi +if test "$MINOR" = ""; then + { { $as_echo "$as_me:$LINENO: error: could not determine MINOR number from version.h" >&5 +$as_echo "$as_me: error: could not determine MINOR number from version.h" >&2;} + { (exit 1); exit 1; }; } +fi +if test "$TEENY" = ""; then + { { $as_echo "$as_me:$LINENO: error: could not determine TEENY number from version.h" >&5 +$as_echo "$as_me: error: could not determine TEENY number from version.h" >&2;} + { (exit 1); exit 1; }; } +fi + + + +if test "$MAJOR" = "1"; then + cat >>confdefs.h <<\_ACEOF +#define CANONICALIZATION_FOR_MATHN 1 +_ACEOF + +fi + +# Check whether --with-gcc was given. +if test "${with_gcc+set}" = set; then + withval=$with_gcc; + case $withval in + no) : ${CC=cc} + ;; + yes) : ${CC=gcc} + ;; + *) CC=$withval + ;; + esac +fi + +if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" +then + { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file +(it is also a good idea to do 'make clean' before compiling)" >&5 +$as_echo "$as_me: error: cached CC is different -- throw away $cache_file +(it is also a good idea to do 'make clean' before compiling)" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "$program_prefix" = NONE; then + program_prefix= +fi + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` +ac_install_sh='' # unusable for extension libraries. + +fat_binary=no + +case $target_cpu in + i?86) frame_address=yes;; + *) frame_address=no;; +esac +# Check whether --enable-frame-address was given. +if test "${enable_frame_address+set}" = set; then + enableval=$enable_frame_address; frame_address=$enableval +fi + +if test $frame_address = yes; then + cat >>confdefs.h <<\_ACEOF +#define USE_BUILTIN_FRAME_ADDRESS 1 +_ACEOF + +fi + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + + + +: ${CFLAGS=} ${cflags='${optflags} ${debugflags} ${warnflags}'} +: ${CXXFLAGS=} ${cxxflags='${optflags} ${debugflags} ${warnflags}'} +if test x"${build}" != x"${host}"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +test $ac_cv_prog_cc_g = yes && : ${debugflags=-g} +if test "$GCC" = yes; then + linker_flag=-Wl, + : ${optflags=-O2} ${warnflags="-Wall -Wno-parentheses"} +else + linker_flag= +fi +CFLAGS="${CFLAGS} `eval echo $cflags`" +CXXFLAGS="${CXXFLAGS} `eval echo $cxxflags`" + +{ $as_echo "$as_me:$LINENO: checking whether the linker is GNU ld" >&5 +$as_echo_n "checking whether the linker is GNU ld... " >&6; } +if test "${rb_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if `$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld 2>&1` -v 2>&1 | grep "GNU ld" > /dev/null; then + rb_cv_prog_gnu_ld=yes +else + rb_cv_prog_gnu_ld=no +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_prog_gnu_ld" >&5 +$as_echo "$rb_cv_prog_gnu_ld" >&6; } +GNU_LD=$rb_cv_prog_gnu_ld + +{ $as_echo "$as_me:$LINENO: checking whether ${CPP} accepts -o" >&5 +$as_echo_n "checking whether ${CPP} accepts -o... " >&6; } +if test "${rb_cv_cppoutfile+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cppflags=$CPPFLAGS +CPPFLAGS='-o conftest.i' +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + rb_cv_cppoutfile=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_cppoutfile=no +fi + +rm -f conftest.err conftest.$ac_ext +CPPFLAGS=$cppflags +rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_cppoutfile" >&5 +$as_echo "$rb_cv_cppoutfile" >&6; } +if test "$rb_cv_cppoutfile" = yes; then + CPPOUTFILE='-o conftest.i' +elif test "$rb_cv_cppoutfile" = no; then + CPPOUTFILE='> conftest.i' +elif test -n "$rb_cv_cppoutfile"; then + CPPOUTFILE="$rb_cv_cppoutfile" +fi + + +: ${OUTFLAG='-o '} +: ${COUTFLAG=${OUTFLAG}} + + + +case "$host_os" in +cygwin*) +{ $as_echo "$as_me:$LINENO: checking for mingw32 environment" >&5 +$as_echo_n "checking for mingw32 environment... " >&6; } +if test "${rb_cv_mingw32+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef __MINGW32__ +# error +#endif + +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + rb_cv_mingw32=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_mingw32=no +fi + +rm -f conftest.err conftest.$ac_ext +rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_mingw32" >&5 +$as_echo "$rb_cv_mingw32" >&6; } +test "$rb_cv_mingw32" = yes && target_os="mingw32" + ;; +esac + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -z "$AR"; then + for ac_prog in aal +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break +done +test -n "$AR" || AR="ar" + +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:$LINENO: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + +ASFLAGS=$ASFLAGS + + +# BSD's ports and MacPorts prefix GNU binutils with 'g' +if test -n "$ac_tool_prefix"; then + for ac_prog in objdump gobjdump + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$OBJDUMP" && break + done +fi +if test -z "$OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + for ac_prog in objdump gobjdump +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_OBJDUMP" && break +done + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +fi + +if test -n "$ac_tool_prefix"; then + for ac_prog in objcopy gobjcopy + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJCOPY+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJCOPY=$ac_cv_prog_OBJCOPY +if test -n "$OBJCOPY"; then + { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5 +$as_echo "$OBJCOPY" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$OBJCOPY" && break + done +fi +if test -z "$OBJCOPY"; then + ac_ct_OBJCOPY=$OBJCOPY + for ac_prog in objcopy gobjcopy +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJCOPY"; then + ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY +if test -n "$ac_ct_OBJCOPY"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5 +$as_echo "$ac_ct_OBJCOPY" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_OBJCOPY" && break +done + + if test "x$ac_ct_OBJCOPY" = x; then + OBJCOPY="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJCOPY=$ac_ct_OBJCOPY + fi +fi + + +case "$target_os" in +cygwin*|mingw*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. +set dummy ${ac_tool_prefix}nm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NM="${ac_tool_prefix}nm" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:$LINENO: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NM"; then + ac_ct_NM=$NM + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NM="nm" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NM" = x; then + NM="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NM=$ac_ct_NM + fi +else + NM="$ac_cv_prog_NM" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_WINDRES+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_WINDRES="windres" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args. +set dummy ${ac_tool_prefix}dllwrap; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLWRAP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLWRAP"; then + ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DLLWRAP=$ac_cv_prog_DLLWRAP +if test -n "$DLLWRAP"; then + { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5 +$as_echo "$DLLWRAP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLWRAP"; then + ac_ct_DLLWRAP=$DLLWRAP + # Extract the first word of "dllwrap", so it can be a program name with args. +set dummy dllwrap; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLWRAP"; then + ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLWRAP="dllwrap" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP +if test -n "$ac_ct_DLLWRAP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5 +$as_echo "$ac_ct_DLLWRAP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLWRAP" = x; then + DLLWRAP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLWRAP=$ac_ct_DLLWRAP + fi +else + DLLWRAP="$ac_cv_prog_DLLWRAP" +fi + + target_cpu=`echo $target_cpu | sed s/i.86/i386/` + case "$target_os" in + mingw*) + test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt + { $as_echo "$as_me:$LINENO: checking for mingw32 runtime DLL" >&5 +$as_echo_n "checking for mingw32 runtime DLL... " >&6; } +if test "${rb_cv_msvcrt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +FILE* volatile f = stdin; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | + tr A-Z a-z | + sed -n '/^[ ]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'` +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_msvcrt=msvcrt +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_msvcrt" >&5 +$as_echo "$rb_cv_msvcrt" >&6; } + esac + : ${enable_shared=yes} + ;; +aix*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. +set dummy ${ac_tool_prefix}nm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/usr/ccs/bin:$PATH" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NM="${ac_tool_prefix}nm" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:$LINENO: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NM"; then + ac_ct_NM=$NM + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/usr/ccs/bin:$PATH" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NM="nm" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NM" = x; then + NM="/usr/ccs/bin/nm" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NM=$ac_ct_NM + fi +else + NM="$ac_cv_prog_NM" +fi + + ;; +hiuxmpp*) + # by TOYODA Eizi + cat >>confdefs.h <<\_ACEOF +#define __HIUX_MPP__ 1 +_ACEOF + + ;; +esac + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +# checks for UNIX variants that set C preprocessor variables +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + if test "${ac_cv_header_minix_config_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +$as_echo_n "checking minix/config.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +$as_echo_n "checking minix/config.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } + +fi +if test "x$ac_cv_header_minix_config_h" = x""yes; then + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_safe_to_define___extensions__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + +RM='rm -f' + +CP='cp' + +if $as_mkdir_p; then + MAKEDIRS='mkdir -p' +else + MAKEDIRS='install -d' +fi + + +mv confdefs.h confdefs1.h +: > confdefs.h +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + $as_echo_n "(cached) " >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + +mv confdefs.h largefile.h +mv confdefs1.h confdefs.h +cat largefile.h >> confdefs.h + +case "$target_os" in +mingw*) + ac_cv_type_off_t=yes + ac_cv_sizeof_off_t=8 + ;; +esac + +{ $as_echo "$as_me:$LINENO: checking for long long" >&5 +$as_echo_n "checking for long long... " >&6; } +if test "${ac_cv_type_long_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((long long))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +$as_echo "$ac_cv_type_long_long" >&6; } +if test "x$ac_cv_type_long_long" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + +fi +{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 +$as_echo_n "checking for off_t... " >&6; } +if test "${ac_cv_type_off_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_off_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((off_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_off_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +$as_echo "$ac_cv_type_off_t" >&6; } +if test "x$ac_cv_type_off_t" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_OFF_T 1 +_ACEOF + + +fi + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (short))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (short)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (short)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (short) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_short=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (long))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (long)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long_long=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (long long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (long long))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (long long)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (long long)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long_long=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of __int64" >&5 +$as_echo_n "checking size of __int64... " >&6; } +if test "${ac_cv_sizeof___int64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof___int64=$ac_lo;; +'') if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (__int64) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof___int64=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (__int64)); } +static unsigned long int ulongval () { return (long int) (sizeof (__int64)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (__int64))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (__int64)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (__int64)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof___int64=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (__int64) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof___int64=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 +$as_echo "$ac_cv_sizeof___int64" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF___INT64 $ac_cv_sizeof___int64 +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if test "${ac_cv_sizeof_off_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_off_t=$ac_lo;; +'') if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (off_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (off_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (off_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_off_t=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (off_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_off_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of void*" >&5 +$as_echo_n "checking size of void*... " >&6; } +if test "${ac_cv_sizeof_voidp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void*))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void*))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void*))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void*))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void*))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_voidp=$ac_lo;; +'') if test "$ac_cv_type_voidp" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void*) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void*) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_voidp=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (void*)); } +static unsigned long int ulongval () { return (long int) (sizeof (void*)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (void*))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (void*)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (void*)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_voidp=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_voidp" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void*) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void*) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_voidp=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5 +$as_echo "$ac_cv_sizeof_voidp" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOIDP $ac_cv_sizeof_voidp +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if test "${ac_cv_sizeof_float+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_float=$ac_lo;; +'') if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_float=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (float)); } +static unsigned long int ulongval () { return (long int) (sizeof (float)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (float))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (float)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (float)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_float=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_float" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (float) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_float=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if test "${ac_cv_sizeof_double+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_double=$ac_lo;; +'') if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (double) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_double=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (double)); } +static unsigned long int ulongval () { return (long int) (sizeof (double)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (double))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (double)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (double)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_double=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_double" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (double) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_double=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_time_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (time_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (time_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (time_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (time_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_time_t=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_time_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +$as_echo_n "checking for pid_t... " >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_pid_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((pid_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +$as_echo "$ac_cv_type_pid_t" >&6; } +if test "x$ac_cv_type_pid_t" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define rb_pid_t pid_t +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define rb_pid_t int +_ACEOF + +fi + + { $as_echo "$as_me:$LINENO: checking for convertible type of pid_t" >&5 +$as_echo_n "checking for convertible type of pid_t... " >&6; } +if test "${rb_cv_pid_t_convertible+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + u= t= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !((rb_pid_t)-1 > 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + u=U +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_pid_t) > sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LL +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_pid_t) == sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LONG +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + t=INT + fi + rb_cv_pid_t_convertible=${u}${t} +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_pid_t_convertible" >&5 +$as_echo "$rb_cv_pid_t_convertible" >&6; } + cat >>confdefs.h <<_ACEOF +#define PIDT2NUM(v) ${rb_cv_pid_t_convertible}2NUM(v) +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define NUM2PIDT(v) NUM2${rb_cv_pid_t_convertible}(v) +_ACEOF + + + { $as_echo "$as_me:$LINENO: checking for uid_t" >&5 +$as_echo_n "checking for uid_t... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_uid_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (uid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((uid_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uid_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test "x$ac_cv_type_uid_t" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define rb_uid_t uid_t +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define rb_uid_t int +_ACEOF + +fi + + { $as_echo "$as_me:$LINENO: checking for convertible type of uid_t" >&5 +$as_echo_n "checking for convertible type of uid_t... " >&6; } +if test "${rb_cv_uid_t_convertible+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + u= t= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !((rb_uid_t)-1 > 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + u=U +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_uid_t) > sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LL +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_uid_t) == sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LONG +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + t=INT + fi + rb_cv_uid_t_convertible=${u}${t} +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_uid_t_convertible" >&5 +$as_echo "$rb_cv_uid_t_convertible" >&6; } + cat >>confdefs.h <<_ACEOF +#define UIDT2NUM(v) ${rb_cv_uid_t_convertible}2NUM(v) +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define NUM2UIDT(v) NUM2${rb_cv_uid_t_convertible}(v) +_ACEOF + + + { $as_echo "$as_me:$LINENO: checking for gid_t" >&5 +$as_echo_n "checking for gid_t... " >&6; } +if test "${ac_cv_type_gid_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_gid_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (gid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((gid_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_gid_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_gid_t" >&5 +$as_echo "$ac_cv_type_gid_t" >&6; } +if test "x$ac_cv_type_gid_t" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define rb_gid_t gid_t +_ACEOF + +else + cat >>confdefs.h <<_ACEOF +#define rb_gid_t int +_ACEOF + +fi + + { $as_echo "$as_me:$LINENO: checking for convertible type of gid_t" >&5 +$as_echo_n "checking for convertible type of gid_t... " >&6; } +if test "${rb_cv_gid_t_convertible+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + u= t= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !((rb_gid_t)-1 > 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + u=U +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_gid_t) > sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LL +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(rb_gid_t) == sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + t=LONG +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test x"$t" = x; then + t=INT + fi + rb_cv_gid_t_convertible=${u}${t} +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_gid_t_convertible" >&5 +$as_echo "$rb_cv_gid_t_convertible" >&6; } + cat >>confdefs.h <<_ACEOF +#define GIDT2NUM(v) ${rb_cv_gid_t_convertible}2NUM(v) +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define NUM2GIDT(v) NUM2${rb_cv_gid_t_convertible}(v) +_ACEOF + + + +{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5 +$as_echo_n "checking for prototypes... " >&6; } +if test "${rb_cv_have_prototypes+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int foo(int x) { return 0; } +int +main () +{ +return foo(10); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_have_prototypes=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_have_prototypes=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_have_prototypes" >&5 +$as_echo "$rb_cv_have_prototypes" >&6; } +if test "$rb_cv_have_prototypes" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PROTOTYPES 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking token paste string" >&5 +$as_echo_n "checking token paste string... " >&6; } +if test "${rb_cv_tokenpaste+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define paste(a,b) a##b +int +main () +{ +int xy = 1; return paste(x,y); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_tokenpaste=ansi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_tokenpaste=knr +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_tokenpaste" >&5 +$as_echo "$rb_cv_tokenpaste" >&6; } +if test "$rb_cv_tokenpaste" = ansi; then + cat >>confdefs.h <<\_ACEOF +#define TOKEN_PASTE(x,y) x##y +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define TOKEN_PASTE(x,y) x/**/y +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking stringization" >&5 +$as_echo_n "checking stringization... " >&6; } +if test "${rb_cv_stringization+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + rb_cv_stringization=no + for string in "#expr" '"expr"'; do + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define STRINGIZE0(expr) $string +#define STRINGIZE(expr) STRINGIZE0(expr) +#undef real_test_for_stringization +#define test_for_stringization -.real_test_for_stringization.- +const char stringized[] = STRINGIZE(test_for_stringization); + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(stringized) == 32)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_stringization="$string"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_stringization=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_stringization" >&5 +$as_echo "$rb_cv_stringization" >&6; } +cat >>confdefs.h <<\_ACEOF +#define STRINGIZE(expr) STRINGIZE0(expr) +_ACEOF + +if test x"$rb_cv_stringization" != xno -a "$rb_cv_stringization" != "#expr"; then + cat >>confdefs.h <<_ACEOF +#define STRINGIZE0(expr) $rb_cv_stringization +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define OLD_FASHIONED_STRINGIZATION 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking string literal concatenation" >&5 +$as_echo_n "checking string literal concatenation... " >&6; } +if test "${rb_cv_string_literal_concatenation+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +const char concatenated_literal[] = "literals" "to" + "be" "concatenated."; + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(concatenated_literal) == 26)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_string_literal_concatenation=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_string_literal_concatenation=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_string_literal_concatenation" >&5 +$as_echo "$rb_cv_string_literal_concatenation" >&6; } +if test "$rb_cv_string_literal_concatenation" = no; then + cat >>confdefs.h <<\_ACEOF +#define NO_STRING_LITERAL_CONCATENATION 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 +$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } +if test "${rb_cv_stdarg+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +int foo(int x, ...) { + va_list va; + va_start(va, x); + va_arg(va, int); + va_arg(va, char *); + va_arg(va, double); + return 0; +} + +int +main () +{ +return foo(10, "", 3.14); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_stdarg=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_stdarg=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_stdarg" >&5 +$as_echo "$rb_cv_stdarg" >&6; } +if test "$rb_cv_stdarg" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STDARG_PROTOTYPES 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for variable length macro" >&5 +$as_echo_n "checking for variable length macro... " >&6; } +if test "${rb_cv_va_args_macro+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define FOO(a, ...) foo(a, ##__VA_ARGS__) +int +main () +{ +FOO(1);FOO(1,2);FOO(1,2,3); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_va_args_macro=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_va_args_macro=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_va_args_macro" >&5 +$as_echo "$rb_cv_va_args_macro" >&6; } +if test "$rb_cv_va_args_macro" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_ARGS_MACRO 1 +_ACEOF + +fi + + + + { $as_echo "$as_me:$LINENO: checking for noreturn function attribute" >&5 +$as_echo_n "checking for noreturn function attribute... " >&6; } +if test "${rb_cv_func_noreturn+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_noreturn=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((noreturn)) x" "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define NORETURN(x) $mac + NORETURN(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_noreturn="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_noreturn" >&5 +$as_echo "$rb_cv_func_noreturn" >&6; } +cat >>confdefs.h <<_ACEOF +#define NORETURN(x) $rb_cv_func_noreturn +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for deprecated function attribute" >&5 +$as_echo_n "checking for deprecated function attribute... " >&6; } +if test "${rb_cv_func_deprecated+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_deprecated=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((deprecated)) x" "x __attribute__ ((deprecated))" "__declspec(deprecated) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define DEPRECATED(x) $mac + DEPRECATED(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_deprecated="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_deprecated" >&5 +$as_echo "$rb_cv_func_deprecated" >&6; } +cat >>confdefs.h <<_ACEOF +#define DEPRECATED(x) $rb_cv_func_deprecated +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for noinline function attribute" >&5 +$as_echo_n "checking for noinline function attribute... " >&6; } +if test "${rb_cv_func_noinline+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_noinline=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((noinline)) x" "x __attribute__ ((noinline))" "__declspec(noinline) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define NOINLINE(x) $mac + NOINLINE(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_noinline="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_noinline" >&5 +$as_echo "$rb_cv_func_noinline" >&6; } +cat >>confdefs.h <<_ACEOF +#define NOINLINE(x) $rb_cv_func_noinline +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for stdcall function attribute" >&5 +$as_echo_n "checking for stdcall function attribute... " >&6; } +if test "${rb_cv_func_stdcall+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_stdcall=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((stdcall)) x" "x __attribute__ ((stdcall))" "__declspec(stdcall) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define FUNC_STDCALL(x) $mac + FUNC_STDCALL(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_stdcall="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_stdcall" >&5 +$as_echo "$rb_cv_func_stdcall" >&6; } +cat >>confdefs.h <<_ACEOF +#define FUNC_STDCALL(x) $rb_cv_func_stdcall +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for cdecl function attribute" >&5 +$as_echo_n "checking for cdecl function attribute... " >&6; } +if test "${rb_cv_func_cdecl+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_cdecl=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((cdecl)) x" "x __attribute__ ((cdecl))" "__declspec(cdecl) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define FUNC_CDECL(x) $mac + FUNC_CDECL(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_cdecl="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_cdecl" >&5 +$as_echo "$rb_cv_func_cdecl" >&6; } +cat >>confdefs.h <<_ACEOF +#define FUNC_CDECL(x) $rb_cv_func_cdecl +_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking for fastcall function attribute" >&5 +$as_echo_n "checking for fastcall function attribute... " >&6; } +if test "${rb_cv_func_fastcall+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_func_fastcall=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ ((fastcall)) x" "x __attribute__ ((fastcall))" "__declspec(fastcall) x" x; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define FUNC_FASTCALL(x) $mac + FUNC_FASTCALL(void conftest_attribute_check(void)); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_fastcall="$mac"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_fastcall" >&5 +$as_echo "$rb_cv_func_fastcall" >&6; } +cat >>confdefs.h <<_ACEOF +#define FUNC_FASTCALL(x) $rb_cv_func_fastcall +_ACEOF + + + + + +if test "$GCC" = yes; then + { $as_echo "$as_me:$LINENO: checking for function alias" >&5 +$as_echo_n "checking for function alias... " >&6; } +if test "${rb_cv_gcc_function_alias+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_gcc_function_alias=no + for a in alias weak,alias; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void foo(void) {} + void bar(void) __attribute__(($a("foo"))); +int +main () +{ +bar() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rb_cv_gcc_function_alias=$a; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_gcc_function_alias" >&5 +$as_echo "$rb_cv_gcc_function_alias" >&6; } + if test "$rb_cv_gcc_function_alias" = no; then + cat >>confdefs.h <<\_ACEOF +#define RUBY_ALIAS_FUNCTION(old_prot, new_name, args) VALUE old_prot {return new_name args;} +_ACEOF + + else + cat >>confdefs.h <<_ACEOF +#define RUBY_ALIAS_FUNCTION(old_prot, new_name, args) VALUE old_prot __attribute__(($rb_cv_gcc_function_alias(#new_name))); +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for RUBY_EXTERN" >&5 +$as_echo_n "checking for RUBY_EXTERN... " >&6; } +if test "${rb_cv_ruby_extern+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_ruby_extern=no +for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern $mac void conftest(void); +int +main () +{ +rb_cv_ruby_extern="extern $mac"; break + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_ruby_extern" >&5 +$as_echo "$rb_cv_ruby_extern" >&6; } +test "x$rb_cv_ruby_extern" = xno || cat >>confdefs.h <<_ACEOF +#define RUBY_EXTERN $rb_cv_ruby_extern +_ACEOF + + +XCFLAGS="$XCFLAGS -DRUBY_EXPORT" + +{ $as_echo "$as_me:$LINENO: checking whether sys_nerr is declared" >&5 +$as_echo_n "checking whether sys_nerr is declared... " >&6; } +if test "${ac_cv_have_decl_sys_nerr+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include + +int +main () +{ +#ifndef sys_nerr + (void) sys_nerr; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_sys_nerr=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_sys_nerr=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_nerr" >&5 +$as_echo "$ac_cv_have_decl_sys_nerr" >&6; } +if test "x$ac_cv_have_decl_sys_nerr" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_NERR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_NERR 0 +_ACEOF + + +fi + + + +case "$target_os" in +freebsd*) + { $as_echo "$as_me:$LINENO: checking whether pthread should be enabled by default" >&5 +$as_echo_n "checking whether pthread should be enabled by default... " >&6; } +if test "${rb_cv_enable_pthread_default+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if __FreeBSD_version < 502102 +#error pthread should be disabled on this platform +#endif + +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + rb_cv_enable_pthread_default=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_enable_pthread_default=no +fi + +rm -f conftest.err conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_enable_pthread_default" >&5 +$as_echo "$rb_cv_enable_pthread_default" >&6; } + enable_pthread_default=$rb_cv_enable_pthread_default + ;; +mingw*) + enable_pthread_default=no + ;; +*) + enable_pthread_default=yes + ;; +esac + +# Check whether --enable-pthread was given. +if test "${enable_pthread+set}" = set; then + enableval=$enable_pthread; enable_pthread=$enableval +else + enable_pthread=$enable_pthread_default +fi + + +case "$target_os" in +nextstep*) ;; +openstep*) ;; +rhapsody*) ;; +darwin*) LIBS="-lobjc $LIBS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 + #error pre OS X 10.4 + [!<===== pre OS X 10.4 =====>] + #endif + +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + + ac_cv_header_ucontext_h=no + ac_cv_func_daemon=no + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + cat >>confdefs.h <<\_ACEOF +#define BROKEN_SETREUID 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define BROKEN_SETREGID 1 +_ACEOF + + +fi + +rm -f conftest.err conftest.$ac_ext + ac_cv_lib_crypt_crypt=no + { $as_echo "$as_me:$LINENO: checking for broken crypt with 8bit chars" >&5 +$as_echo_n "checking for broken crypt with 8bit chars... " >&6; } +if test "${rb_cv_broken_crypt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_broken_crypt=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +int +main() +{ + char buf[256]; + strcpy(buf, crypt("", "\xE0\xA0")); + return strcmp(buf, crypt("", "\xE0\xA0")); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_broken_crypt=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_broken_crypt=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_broken_crypt" >&5 +$as_echo "$rb_cv_broken_crypt" >&6; } + if test "$rb_cv_broken_crypt" = yes; then + cat >>confdefs.h <<\_ACEOF +#define BROKEN_CRYPT 1 +_ACEOF + + fi + ;; +hpux*) LIBS="-lm $LIBS" + ac_cv_c_inline=no;; +human*) ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ;; +beos*|haiku*) ac_cv_func_link=no + ac_cv_func_sched_yield=no + ac_cv_func_pthread_attr_setinheritsched=no + case "$target_os" in + beos*) ac_cv_header_net_socket_h=yes;; + haiku*) ac_cv_func_shutdown=no;; + esac + LIBS="$LIBS" # m lib is include in root under BeOS/Haiku + ;; +cygwin*) ;; +mingw*) LIBS="-lshell32 -lws2_32 $LIBS" + ac_cv_header_a_out_h=no + ac_cv_header_pwd_h=no + ac_cv_header_utime_h=no + ac_cv_header_sys_ioctl_h=no + ac_cv_header_sys_param_h=no + ac_cv_header_sys_resource_h=no + ac_cv_header_sys_select_h=no + ac_cv_header_sys_time_h=no + ac_cv_header_sys_times_h=no + ac_cv_header_sys_socket_h=no + ac_cv_func_times=yes + ac_cv_func_waitpid=yes + ac_cv_func_fsync=yes + ac_cv_func_seekdir=yes + ac_cv_func_telldir=yes + ac_cv_func_isinf=yes + ac_cv_func_isnan=yes + ac_cv_func_finite=yes + ac_cv_func_link=yes + ac_cv_func_truncate=yes + ac_cv_func_fseeko=yes + ac_cv_func_ftello=yes + ac_cv_lib_crypt_crypt=no + ac_cv_func_getpgrp_void=no + ac_cv_func_setpgrp_void=yes + ac_cv_func_memcmp_working=yes + ac_cv_lib_dl_dlopen=no + rb_cv_binary_elf=no + rb_cv_negative_time_t=no + ac_cv_func_fcntl=yes + ;; +os2-emx*) LIBS="-lm $LIBS" + ac_cv_lib_dir_opendir=no;; +msdosdjgpp*) LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ac_cv_sizeof_rlim_t=4 + ac_cv_func_fork=no + ac_cv_func_setrlimit=no + ac_cv_header_sys_socket_h=no + ;; +bsdi*) LIBS="-lm $LIBS" + cat >>confdefs.h <<\_ACEOF +#define BROKEN_SETREUID 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define BROKEN_SETREGID 1 +_ACEOF + + ac_cv_sizeof_rlim_t=8;; +freebsd*) LIBS="-lm $LIBS" + ;; +dragonfly*) LIBS="-lm $LIBS" + ;; +bow) ac_cv_func_setitimer=no + ;; +superux*) ac_cv_func_setitimer=no + ;; +*) LIBS="-lm $LIBS";; +esac + +{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +$as_echo_n "checking for crypt in -lcrypt... " >&6; } +if test "${ac_cv_lib_crypt_crypt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char crypt (); +int +main () +{ +return crypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_crypt_crypt=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_crypt_crypt=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +$as_echo "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPT 1 +_ACEOF + + LIBS="-lcrypt $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + # Dynamic linking for SunOS/Solaris and SYSV + +{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDLD 1 +_ACEOF + + LIBS="-ldld $LIBS" + +fi + # Dynamic linking for HP-UX + +{ $as_echo "$as_me:$LINENO: checking for socketpair in -lsocket" >&5 +$as_echo_n "checking for socketpair in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_socketpair+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socketpair (); +int +main () +{ +return socketpair (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_socket_socketpair=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_socketpair=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socketpair" >&5 +$as_echo "$ac_cv_lib_socket_socketpair" >&6; } +if test "x$ac_cv_lib_socket_socketpair" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + # SunOS/Solaris + +{ $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_rt_clock_gettime=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_rt_clock_gettime=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF + + LIBS="-lrt $LIBS" + +fi + # GNU/Linux + +case "$target_cpu" in +alpha*) case "$target_os"::"$GCC" in + *::yes) CFLAGS="-mieee $CFLAGS" ;; # gcc + osf*) CFLAGS="-ieee $CFLAGS" ;; # ccc + esac ;; +esac + +ac_cv_header_net_socket_h=${ac_cv_header_net_socket_h=no} +if test "$ac_cv_header_net_socket_h" = yes; then + ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=no} +else + ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes} +fi + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_opendir=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_sys_wait_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in limits.h sys/file.h sys/ioctl.h sys/syscall.h\ + fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ + syscall.h pwd.h grp.h a.out.h utime.h direct.h sys/resource.h \ + sys/mkdev.h sys/utime.h xti.h netinet/in_systm.h float.h ieeefp.h pthread.h \ + ucontext.h intrinsics.h langinfo.h locale.h sys/sendfile.h time.h \ + net/socket.h sys/socket.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of rlim_t" >&5 +$as_echo_n "checking size of rlim_t... " >&6; } +if test "${ac_cv_sizeof_rlim_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (rlim_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (rlim_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (rlim_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (rlim_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (rlim_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_rlim_t=$ac_lo;; +'') if test "$ac_cv_type_rlim_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (rlim_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (rlim_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_rlim_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include + + +static long int longval () { return (long int) (sizeof (rlim_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (rlim_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (rlim_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (rlim_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (rlim_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_rlim_t=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_rlim_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (rlim_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (rlim_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_rlim_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_rlim_t" >&5 +$as_echo "$ac_cv_sizeof_rlim_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_RLIM_T $ac_cv_sizeof_rlim_t +_ACEOF + + + +{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +$as_echo_n "checking for size_t... " >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_size_t=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((size_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +$as_echo "$ac_cv_type_size_t" >&6; } +if test "x$ac_cv_type_size_t" = x""yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if test "${ac_cv_sizeof_size_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_size_t=$ac_lo;; +'') if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (size_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (size_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (size_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (size_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_size_t=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (size_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_size_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of ptrdiff_t" >&5 +$as_echo_n "checking size of ptrdiff_t... " >&6; } +if test "${ac_cv_sizeof_ptrdiff_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ptrdiff_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ptrdiff_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ptrdiff_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ptrdiff_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ptrdiff_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_ptrdiff_t=$ac_lo;; +'') if test "$ac_cv_type_ptrdiff_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (ptrdiff_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (ptrdiff_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_ptrdiff_t=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (ptrdiff_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (ptrdiff_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ptrdiff_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ptrdiff_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ptrdiff_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_ptrdiff_t=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_ptrdiff_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (ptrdiff_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (ptrdiff_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_ptrdiff_t=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_ptrdiff_t" >&5 +$as_echo "$ac_cv_sizeof_ptrdiff_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t +_ACEOF + + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +$as_echo_n "checking for struct stat.st_blksize... " >&6; } +if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blksize=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blksize=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_BLKSIZE 1 +_ACEOF + +fi + + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +$as_echo_n "checking for struct stat.st_blocks... " >&6; } +if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blocks) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blocks=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blocks=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blocks=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_BLOCKS 1 +_ACEOF + +else + case " $LIBOBJS " in + *" fileblocks.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" + ;; +esac + +fi + + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +$as_echo_n "checking for struct stat.st_rdev... " >&6; } +if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_rdev) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_rdev=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_rdev) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_rdev=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_rdev=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 +$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_RDEV 1 +_ACEOF + +fi + + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_atim" >&5 +$as_echo_n "checking for struct stat.st_atim... " >&6; } +if test "${ac_cv_member_struct_stat_st_atim+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atim=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atim" >&5 +$as_echo "$ac_cv_member_struct_stat_st_atim" >&6; } +if test "x$ac_cv_member_struct_stat_st_atim" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_atimespec" >&5 +$as_echo_n "checking for struct stat.st_atimespec... " >&6; } +if test "${ac_cv_member_struct_stat_st_atimespec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atimespec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimespec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_atimespec" >&6; } +if test "x$ac_cv_member_struct_stat_st_atimespec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMESPEC 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_atimensec" >&5 +$as_echo_n "checking for struct stat.st_atimensec... " >&6; } +if test "${ac_cv_member_struct_stat_st_atimensec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_atimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atimensec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimensec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_atimensec" >&6; } +if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim" >&5 +$as_echo_n "checking for struct stat.st_mtim... " >&6; } +if test "${ac_cv_member_struct_stat_st_mtim+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_mtim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_mtim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_mtim=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim" >&5 +$as_echo "$ac_cv_member_struct_stat_st_mtim" >&6; } +if test "x$ac_cv_member_struct_stat_st_mtim" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIM 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimespec" >&5 +$as_echo_n "checking for struct stat.st_mtimespec... " >&6; } +if test "${ac_cv_member_struct_stat_st_mtimespec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_mtimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_mtimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_mtimespec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_mtimespec" >&6; } +if test "x$ac_cv_member_struct_stat_st_mtimespec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIMESPEC 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtimensec" >&5 +$as_echo_n "checking for struct stat.st_mtimensec... " >&6; } +if test "${ac_cv_member_struct_stat_st_mtimensec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_mtimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_mtimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_mtimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_mtimensec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimensec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_mtimensec" >&6; } +if test "x$ac_cv_member_struct_stat_st_mtimensec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_ctim" >&5 +$as_echo_n "checking for struct stat.st_ctim... " >&6; } +if test "${ac_cv_member_struct_stat_st_ctim+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_ctim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_ctim) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctim=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_ctim=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctim" >&5 +$as_echo "$ac_cv_member_struct_stat_st_ctim" >&6; } +if test "x$ac_cv_member_struct_stat_st_ctim" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIM 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_ctimespec" >&5 +$as_echo_n "checking for struct stat.st_ctimespec... " >&6; } +if test "${ac_cv_member_struct_stat_st_ctimespec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_ctimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_ctimespec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctimespec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_ctimespec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctimespec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_ctimespec" >&6; } +if test "x$ac_cv_member_struct_stat_st_ctimespec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIMESPEC 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct stat.st_ctimensec" >&5 +$as_echo_n "checking for struct stat.st_ctimensec... " >&6; } +if test "${ac_cv_member_struct_stat_st_ctimensec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_ctimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_ctimensec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_ctimensec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_ctimensec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_ctimensec" >&5 +$as_echo "$ac_cv_member_struct_stat_st_ctimensec" >&6; } +if test "x$ac_cv_member_struct_stat_st_ctimensec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_CTIMENSEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking for struct timespec" >&5 +$as_echo_n "checking for struct timespec... " >&6; } +if test "${ac_cv_type_struct_timespec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_struct_timespec=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_TIME_H +#include +#endif + +int +main () +{ +if (sizeof (struct timespec)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_TIME_H +#include +#endif + +int +main () +{ +if (sizeof ((struct timespec))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_struct_timespec=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 +$as_echo "$ac_cv_type_struct_timespec" >&6; } +if test "x$ac_cv_type_struct_timespec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMESPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:$LINENO: checking for fd_mask" >&5 +$as_echo_n "checking for fd_mask... " >&6; } +if test "${ac_cv_type_fd_mask+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_type_fd_mask=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof (fd_mask)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if (sizeof ((fd_mask))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_fd_mask=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fd_mask" >&5 +$as_echo "$ac_cv_type_fd_mask" >&6; } +if test "x$ac_cv_type_fd_mask" = x""yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_RB_FD_INIT 1 +_ACEOF + +fi + + + + +{ $as_echo "$as_me:$LINENO: checking for int8_t" >&5 +$as_echo_n "checking for int8_t... " >&6; } +if test "${rb_cv_type_int8_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int8_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_int8_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 1 in + "1") rb_cv_type_int8_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_int8_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_int8_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_int8_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_int8_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_int8_t="__int64";; + *) rb_cv_type_int8_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_int8_t" >&5 +$as_echo "$rb_cv_type_int8_t" >&6; } +if test "${rb_cv_type_int8_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT8_T 1 +_ACEOF + + test "${rb_cv_type_int8_t}" = yes || cat >>confdefs.h <<_ACEOF +#define int8_t $rb_cv_type_int8_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 +$as_echo_n "checking for uint8_t... " >&6; } +if test "${rb_cv_type_uint8_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint8_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uint8_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 1 in + "1") rb_cv_type_uint8_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uint8_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uint8_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uint8_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uint8_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uint8_t="unsigned __int64";; + *) rb_cv_type_uint8_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uint8_t" >&5 +$as_echo "$rb_cv_type_uint8_t" >&6; } +if test "${rb_cv_type_uint8_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINT8_T 1 +_ACEOF + + test "${rb_cv_type_uint8_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uint8_t $rb_cv_type_uint8_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for int16_t" >&5 +$as_echo_n "checking for int16_t... " >&6; } +if test "${rb_cv_type_int16_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int16_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_int16_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 2 in + "1") rb_cv_type_int16_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_int16_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_int16_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_int16_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_int16_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_int16_t="__int64";; + *) rb_cv_type_int16_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_int16_t" >&5 +$as_echo "$rb_cv_type_int16_t" >&6; } +if test "${rb_cv_type_int16_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT16_T 1 +_ACEOF + + test "${rb_cv_type_int16_t}" = yes || cat >>confdefs.h <<_ACEOF +#define int16_t $rb_cv_type_int16_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 +$as_echo_n "checking for uint16_t... " >&6; } +if test "${rb_cv_type_uint16_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint16_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uint16_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 2 in + "1") rb_cv_type_uint16_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uint16_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uint16_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uint16_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uint16_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uint16_t="unsigned __int64";; + *) rb_cv_type_uint16_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uint16_t" >&5 +$as_echo "$rb_cv_type_uint16_t" >&6; } +if test "${rb_cv_type_uint16_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINT16_T 1 +_ACEOF + + test "${rb_cv_type_uint16_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uint16_t $rb_cv_type_uint16_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for int32_t" >&5 +$as_echo_n "checking for int32_t... " >&6; } +if test "${rb_cv_type_int32_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int32_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_int32_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 4 in + "1") rb_cv_type_int32_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_int32_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_int32_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_int32_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_int32_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_int32_t="__int64";; + *) rb_cv_type_int32_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_int32_t" >&5 +$as_echo "$rb_cv_type_int32_t" >&6; } +if test "${rb_cv_type_int32_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT32_T 1 +_ACEOF + + test "${rb_cv_type_int32_t}" = yes || cat >>confdefs.h <<_ACEOF +#define int32_t $rb_cv_type_int32_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 +$as_echo_n "checking for uint32_t... " >&6; } +if test "${rb_cv_type_uint32_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint32_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uint32_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 4 in + "1") rb_cv_type_uint32_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uint32_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uint32_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uint32_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uint32_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uint32_t="unsigned __int64";; + *) rb_cv_type_uint32_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uint32_t" >&5 +$as_echo "$rb_cv_type_uint32_t" >&6; } +if test "${rb_cv_type_uint32_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINT32_T 1 +_ACEOF + + test "${rb_cv_type_uint32_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uint32_t $rb_cv_type_uint32_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for int64_t" >&5 +$as_echo_n "checking for int64_t... " >&6; } +if test "${rb_cv_type_int64_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int64_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_int64_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 8 in + "1") rb_cv_type_int64_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_int64_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_int64_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_int64_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_int64_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_int64_t="__int64";; + *) rb_cv_type_int64_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_int64_t" >&5 +$as_echo "$rb_cv_type_int64_t" >&6; } +if test "${rb_cv_type_int64_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT64_T 1 +_ACEOF + + test "${rb_cv_type_int64_t}" = yes || cat >>confdefs.h <<_ACEOF +#define int64_t $rb_cv_type_int64_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 +$as_echo_n "checking for uint64_t... " >&6; } +if test "${rb_cv_type_uint64_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint64_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uint64_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 8 in + "1") rb_cv_type_uint64_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uint64_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uint64_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uint64_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uint64_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uint64_t="unsigned __int64";; + *) rb_cv_type_uint64_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uint64_t" >&5 +$as_echo "$rb_cv_type_uint64_t" >&6; } +if test "${rb_cv_type_uint64_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINT64_T 1 +_ACEOF + + test "${rb_cv_type_uint64_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uint64_t $rb_cv_type_uint64_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for int128_t" >&5 +$as_echo_n "checking for int128_t... " >&6; } +if test "${rb_cv_type_int128_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int128_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_int128_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 16 in + "1") rb_cv_type_int128_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_int128_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_int128_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_int128_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_int128_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_int128_t="__int64";; + *) rb_cv_type_int128_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_int128_t" >&5 +$as_echo "$rb_cv_type_int128_t" >&6; } +if test "${rb_cv_type_int128_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT128_T 1 +_ACEOF + + test "${rb_cv_type_int128_t}" = yes || cat >>confdefs.h <<_ACEOF +#define int128_t $rb_cv_type_int128_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uint128_t" >&5 +$as_echo_n "checking for uint128_t... " >&6; } +if test "${rb_cv_type_uint128_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint128_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uint128_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case 16 in + "1") rb_cv_type_uint128_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uint128_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uint128_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uint128_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uint128_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uint128_t="unsigned __int64";; + *) rb_cv_type_uint128_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uint128_t" >&5 +$as_echo "$rb_cv_type_uint128_t" >&6; } +if test "${rb_cv_type_uint128_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINT128_T 1 +_ACEOF + + test "${rb_cv_type_uint128_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uint128_t $rb_cv_type_uint128_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for intptr_t" >&5 +$as_echo_n "checking for intptr_t... " >&6; } +if test "${rb_cv_type_intptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef intptr_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_intptr_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_cv_sizeof_voidp in + "1") rb_cv_type_intptr_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_intptr_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_intptr_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_intptr_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_intptr_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_intptr_t="__int64";; + *) rb_cv_type_intptr_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_intptr_t" >&5 +$as_echo "$rb_cv_type_intptr_t" >&6; } +if test "${rb_cv_type_intptr_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_INTPTR_T 1 +_ACEOF + + test "${rb_cv_type_intptr_t}" = yes || cat >>confdefs.h <<_ACEOF +#define intptr_t $rb_cv_type_intptr_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 +$as_echo_n "checking for uintptr_t... " >&6; } +if test "${rb_cv_type_uintptr_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uintptr_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_uintptr_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_cv_sizeof_voidp in + "1") rb_cv_type_uintptr_t="unsigned char";; + "$ac_cv_sizeof_short") rb_cv_type_uintptr_t="unsigned short";; + "$ac_cv_sizeof_int") rb_cv_type_uintptr_t="unsigned int";; + "$ac_cv_sizeof_long") rb_cv_type_uintptr_t="unsigned long";; + "$ac_cv_sizeof_long_long") rb_cv_type_uintptr_t="unsigned long long";; + "$ac_cv_sizeof___int64") rb_cv_type_uintptr_t="unsigned __int64";; + *) rb_cv_type_uintptr_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_uintptr_t" >&5 +$as_echo "$rb_cv_type_uintptr_t" >&6; } +if test "${rb_cv_type_uintptr_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + test "${rb_cv_type_uintptr_t}" = yes || cat >>confdefs.h <<_ACEOF +#define uintptr_t $rb_cv_type_uintptr_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if test "${rb_cv_type_ssize_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef ssize_t t; int s = sizeof(t) == 42; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_type_ssize_t=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + case $ac_cv_sizeof_size_t in + "1") rb_cv_type_ssize_t="signed char";; + "$ac_cv_sizeof_short") rb_cv_type_ssize_t="short";; + "$ac_cv_sizeof_int") rb_cv_type_ssize_t="int";; + "$ac_cv_sizeof_long") rb_cv_type_ssize_t="long";; + "$ac_cv_sizeof_long_long") rb_cv_type_ssize_t="long long";; + "$ac_cv_sizeof___int64") rb_cv_type_ssize_t="__int64";; + *) rb_cv_type_ssize_t=no;; + esac +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_type_ssize_t" >&5 +$as_echo "$rb_cv_type_ssize_t" >&6; } +if test "${rb_cv_type_ssize_t}" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_SSIZE_T 1 +_ACEOF + + test "${rb_cv_type_ssize_t}" = yes || cat >>confdefs.h <<_ACEOF +#define ssize_t $rb_cv_type_ssize_t +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for stack end address" >&5 +$as_echo_n "checking for stack end address... " >&6; } +if test "${rb_cv_stack_end_address+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_stack_end_address=no +for addr in __libc_stack_end _SEND; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern void *$addr; +int +main () +{ +if (!$addr) return 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rb_cv_stack_end_address="$addr"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +done +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_stack_end_address" >&5 +$as_echo "$rb_cv_stack_end_address" >&6; } +if test $rb_cv_stack_end_address != no; then + cat >>confdefs.h <<_ACEOF +#define STACK_END_ADDRESS $rb_cv_stack_end_address +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if test "${ac_cv_type_getgroups+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_getgroups=gid_t +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_type_getgroups=int +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +if test $ac_cv_type_getgroups = cross; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF + + +{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +case "${target_cpu}-${target_os}" in +powerpc-darwin*) + + ALLOCA=\${LIBOBJDIR}alloca.${ac_objext} + + cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define alloca alloca +_ACEOF + + ;; +*) + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_working_alloca_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_working_alloca_h=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_alloca_works=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_alloca_works=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_working=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memcmp_working=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_memcmp_working=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac + + + +# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html +# Debian GNU/Linux Etch's libc6.1 2.3.6.ds1-13etch5 has this problem. +# Debian GNU/Linux Lenny's libc6.1 2.7-10 has no problem. +{ $as_echo "$as_me:$LINENO: checking for broken erfc of glibc-2.3.6 on IA64" >&5 +$as_echo_n "checking for broken erfc of glibc-2.3.6 on IA64... " >&6; } +if test "${rb_cv_broken_glibc_ia64_erfc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_broken_glibc_ia64_erfc=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +int +main() +{ + erfc(10000.0); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_broken_glibc_ia64_erfc=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_broken_glibc_ia64_erfc=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_broken_glibc_ia64_erfc" >&5 +$as_echo "$rb_cv_broken_glibc_ia64_erfc" >&6; } +case $rb_cv_broken_glibc_ia64_erfc in + yes) ac_cv_func_erf=no;; +esac + + + + + + + + + + + + + + + + + + + + +for ac_func in dup2 memmove strerror\ + strchr strstr crypt flock vsnprintf\ + isnan finite isinf hypot acosh erf tgamma lgamma_r cbrt \ + strlcpy strlcat +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac + +fi +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd eaccess\ + truncate ftruncate chsize times utimes utimensat fcntl lockf lstat\ + link symlink readlink\ + setitimer setruid seteuid setreuid setresuid setproctitle socketpair\ + setrgid setegid setregid setresgid issetugid pause lchown lchmod\ + getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\ + getpriority getrlimit setrlimit sysconf group_member\ + dlopen sigprocmask sigaction sigsetjmp _setjmp _longjmp snprintf\ + setsid telldir seekdir fchmod cosh sinh tanh log2 round signbit\ + setuid setgid daemon select_large_fdset setenv unsetenv\ + mktime timegm gmtime_r clock_gettime gettimeofday\ + pread sendfile shutdown sigaltstack +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:$LINENO: checking for __builtin_setjmp" >&5 +$as_echo_n "checking for __builtin_setjmp... " >&6; } +if test "${ac_cv_func___builtin_setjmp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);} +int +main () +{ +__builtin_setjmp(jb); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func___builtin_setjmp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func___builtin_setjmp=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___builtin_setjmp" >&5 +$as_echo "$ac_cv_func___builtin_setjmp" >&6; } + +test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no + +{ $as_echo "$as_me:$LINENO: checking for setjmp type" >&5 +$as_echo_n "checking for setjmp type... " >&6; } + +# Check whether --with-setjmp-type was given. +if test "${with_setjmp_type+set}" = set; then + withval=$with_setjmp_type; + case $withval in + __builtin_setjmp) setjmp_prefix=__builtin_;; + _setjmp) setjmp_prefix=_;; + sigsetjmp) setjmp_prefix=sig;; + setjmp) setjmp_prefix=;; + '') unset setjmp_prefix;; + *) { { $as_echo "$as_me:$LINENO: error: invalid setjmp type: $withval" >&5 +$as_echo "$as_me: error: invalid setjmp type: $withval" >&2;} + { (exit 1); exit 1; }; };; + esac +else + unset setjmp_prefix +fi + +if test ${setjmp_prefix+set}; then + if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp = no; then + { { $as_echo "$as_me:$LINENO: error: ${setjmp_prefix}setjmp is not available" >&5 +$as_echo "$as_me: error: ${setjmp_prefix}setjmp is not available" >&2;} + { (exit 1); exit 1; }; } + fi +elif test "$ac_cv_func___builtin_setjmp" = yes; then + setjmp_prefix=__builtin_ +elif test "$ac_cv_func__setjmp" = yes; then + setjmp_prefix=_ +elif test "$ac_cv_func_sigsetjmp" = yes; then + case $target_os in + solaris*|cygwin*) + setjmp_prefix=;; + *) + setjmp_prefix=sig;; + esac +else + setjmp_prefix= +fi +if test x$setjmp_prefix = xsig; then + setjmp_sigmask=yes +else + unset setjmp_sigmask +fi +{ $as_echo "$as_me:$LINENO: result: ${setjmp_prefix}setjmp" >&5 +$as_echo "${setjmp_prefix}setjmp" >&6; } +cat >>confdefs.h <<_ACEOF +#define RUBY_SETJMP(env) ${setjmp_prefix}setjmp(env${setjmp_sigmask+,0}) +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_LONGJMP(env,val) ${setjmp_prefix}longjmp(env,val) +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_JMP_BUF ${setjmp_sigmask+${setjmp_prefix}}jmp_buf +_ACEOF + + +# Check whether --enable-setreuid was given. +if test "${enable_setreuid+set}" = set; then + enableval=$enable_setreuid; use_setreuid=$enableval +fi + +if test "$use_setreuid" = yes; then + cat >>confdefs.h <<\_ACEOF +#define USE_SETREUID 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define USE_SETREGID 1 +_ACEOF + +fi +{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_struct_tm=time.h +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +$as_echo_n "checking for struct tm.tm_zone... " >&6; } +if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_zone=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_ZONE 1 +_ACEOF + +else + { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +$as_echo_n "checking whether tzname is declared... " >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +$as_echo "$ac_cv_have_decl_tzname" >&6; } +if test "x$ac_cv_have_decl_tzname" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if test "${ac_cv_var_tzname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_var_tzname=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 +$as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } +if test "${rb_cv_member_struct_tm_tm_gmtoff+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +struct tm t; t.tm_gmtoff = 3600; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_member_struct_tm_tm_gmtoff=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_member_struct_tm_tm_gmtoff=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_member_struct_tm_tm_gmtoff" >&5 +$as_echo "$rb_cv_member_struct_tm_tm_gmtoff" >&6; } +if test "$rb_cv_member_struct_tm_tm_gmtoff" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_TM_TM_GMTOFF 1 +_ACEOF + +fi +{ $as_echo "$as_me:$LINENO: checking for external int daylight" >&5 +$as_echo_n "checking for external int daylight... " >&6; } +if test "${rb_cv_have_daylight+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int i; +int +main () +{ +i = daylight; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rb_cv_have_daylight=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_have_daylight=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_have_daylight" >&5 +$as_echo "$rb_cv_have_daylight" >&6; } +if test "$rb_cv_have_daylight" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_DAYLIGHT 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for external timezone" >&5 +$as_echo_n "checking for external timezone... " >&6; } +if test "${rb_cv_var_timezone+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_var_timezone=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +#include +; +const volatile void *volatile t; +int +main () +{ +t = &(&timezone)[0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + for t in long int; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +#include +; +extern $t timezone; +const volatile void *volatile t; +int +main () +{ +t = &(&timezone)[0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_var_timezone=$t; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_var_timezone" >&5 +$as_echo "$rb_cv_var_timezone" >&6; } +if test "$rb_cv_var_timezone" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_VAR_TIMEZONE 1 +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define TYPEOF_VAR_TIMEZONE $rb_cv_var_timezone +_ACEOF + +fi +{ $as_echo "$as_me:$LINENO: checking for external altzone" >&5 +$as_echo_n "checking for external altzone... " >&6; } +if test "${rb_cv_var_altzone+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv_var_altzone=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +#include +; +const volatile void *volatile t; +int +main () +{ +t = &(&altzone)[0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + for t in long int; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +#include +; +extern $t altzone; +const volatile void *volatile t; +int +main () +{ +t = &(&altzone)[0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_var_altzone=$t; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_var_altzone" >&5 +$as_echo "$rb_cv_var_altzone" >&6; } +if test "$rb_cv_var_altzone" != no; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_VAR_ALTZONE 1 +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define TYPEOF_VAR_ALTZONE $rb_cv_var_altzone +_ACEOF + +fi + +for ac_func in timezone +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "$ac_cv_func_timezone" = yes; then + { $as_echo "$as_me:$LINENO: checking whether timezone requires zero arguments" >&5 +$as_echo_n "checking whether timezone requires zero arguments... " >&6; } +if test "${rb_cv_func_timezone_void+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +(void)timezone(0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_func_timezone_void=no +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_func_timezone_void=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_func_timezone_void" >&5 +$as_echo "$rb_cv_func_timezone_void" >&6; } + if test $rb_cv_func_timezone_void = yes; then + cat >>confdefs.h <<\_ACEOF +#define TIMEZONE_VOID 1 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking for negative time_t for gmtime(3)" >&5 +$as_echo_n "checking for negative time_t for gmtime(3)... " >&6; } +if test "${rb_cv_negative_time_t+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_negative_time_t=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include + +void +check(tm, y, m, d, h, s) + struct tm *tm; + int y, m, d, h, s; +{ + if (!tm || + tm->tm_year != y || + tm->tm_mon != m-1 || + tm->tm_mday != d || + tm->tm_hour != h || + tm->tm_sec != s) { + exit(1); + } +} + +int +main() +{ + time_t t = -1; + struct tm *tm; + + check(gmtime(&t), 69, 12, 31, 23, 59); + t = ~(time_t)0 << 31; + check(gmtime(&t), 1, 12, 13, 20, 52); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_negative_time_t=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_negative_time_t=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_negative_time_t" >&5 +$as_echo "$rb_cv_negative_time_t" >&6; } +if test "$rb_cv_negative_time_t" = yes; then + cat >>confdefs.h <<\_ACEOF +#define NEGATIVE_TIME_T 1 +_ACEOF + +fi + +if test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = yes; then + cat >>confdefs.h <<\_ACEOF +#define POSIX_SIGNAL 1 +_ACEOF + +else + +for ac_func in sigsetmask +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + { $as_echo "$as_me:$LINENO: checking for BSD signal semantics" >&5 +$as_echo_n "checking for BSD signal semantics... " >&6; } +if test "${rb_cv_bsd_signal+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_bsd_signal=$ac_cv_func_sigsetmask +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +void +sig_handler(dummy) + int dummy; +{ +} + +int +main() +{ + signal(SIGINT, sig_handler); + kill(getpid(), SIGINT); + kill(getpid(), SIGINT); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_bsd_signal=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_bsd_signal=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_bsd_signal" >&5 +$as_echo "$rb_cv_bsd_signal" >&6; } + if test "$rb_cv_bsd_signal" = yes; then + cat >>confdefs.h <<\_ACEOF +#define BSD_SIGNAL 1 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 +$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } +if test "${ac_cv_func_getpgrp_void+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Use it with a single arg. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_func_getpgrp_void=no +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpgrp_void=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 +$as_echo "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define GETPGRP_VOID 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if test "${ac_cv_func_setpgrp_void+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 +$as_echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +/* If this system has a BSD-style setpgrp which takes arguments, + setpgrp(1, 1) will fail with ESRCH and return -1, in that case + exit successfully. */ + return setpgrp (1,1) != -1; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_setpgrp_void=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_setpgrp_void=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } +if test $ac_cv_func_setpgrp_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define SETPGRP_VOID 1 +_ACEOF + +fi + + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + + +{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_char_unsigned=no +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_char_unsigned=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + cat >>confdefs.h <<\_ACEOF +#define __CHAR_UNSIGNED__ 1 +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if test "${ac_cv_c_volatile+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_volatile=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_volatile=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +cat >>confdefs.h <<\_ACEOF +#define volatile /**/ +_ACEOF + +fi + + +if test x"$target_cpu" = xia64; then + case " $LIBOBJS " in + *" ia64.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS ia64.$ac_objext" + ;; +esac + + { $as_echo "$as_me:$LINENO: checking for __libc_ia64_register_backing_store_base" >&5 +$as_echo_n "checking for __libc_ia64_register_backing_store_base... " >&6; } +if test "${rb_cv___libc_ia64_register_backing_store_base+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rb_cv___libc_ia64_register_backing_store_base=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +extern unsigned long __libc_ia64_register_backing_store_base; +int +main () +{ +unsigned long p = __libc_ia64_register_backing_store_base; + printf("%ld\n", p); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rb_cv___libc_ia64_register_backing_store_base=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv___libc_ia64_register_backing_store_base" >&5 +$as_echo "$rb_cv___libc_ia64_register_backing_store_base" >&6; } + if test $rb_cv___libc_ia64_register_backing_store_base = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE___LIBC_IA64_REGISTER_BACKING_STORE_BASE 1 +_ACEOF + + fi +fi + +{ $as_echo "$as_me:$LINENO: checking whether right shift preserve sign bit" >&5 +$as_echo_n "checking whether right shift preserve sign bit... " >&6; } +if test "${rb_cv_rshift_sign+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +static int test_array [1 - 2 * !((-1==(-1>>1)))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_rshift_sign=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_rshift_sign=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_rshift_sign" >&5 +$as_echo "$rb_cv_rshift_sign" >&6; } +if test "$rb_cv_rshift_sign" = yes; then + cat >>confdefs.h <<\_ACEOF +#define RSHIFT(x,y) ((x)>>(int)y) +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define RSHIFT(x,y) (((x)<0) ? ~((~(x))>>y) : (x)>>y) +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking read count field in FILE structures" >&5 +$as_echo_n "checking read count field in FILE structures... " >&6; } +if test "${rb_cv_fcnt+set}" = set; then + $as_echo_n "(cached) " >&6 +else + for fcnt in _cnt __cnt _r readCount _rcount ; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +FILE *f = stdin; f->$fcnt = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_fcnt="$fcnt"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_fcnt="not found" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +fi + +if test "$rb_cv_fcnt" = "not found"; then + { $as_echo "$as_me:$LINENO: result: not found(OK if using GNU libc)" >&5 +$as_echo "not found(OK if using GNU libc)" >&6; } +else + { $as_echo "$as_me:$LINENO: result: $rb_cv_fcnt" >&5 +$as_echo "$rb_cv_fcnt" >&6; } + cat >>confdefs.h <<_ACEOF +#define FILE_COUNT $rb_cv_fcnt +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking read buffer ptr field in FILE structures" >&5 +$as_echo_n "checking read buffer ptr field in FILE structures... " >&6; } +if test "${rb_cv_frptr+set}" = set; then + $as_echo_n "(cached) " >&6 +else + for frptr in _IO_read_ptr _ptr __ptr bufpos _p __bufpos ; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +FILE *f = stdin; char buf[256]; f->$frptr = buf; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_frptr="$frptr"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_frptr="not found" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +fi + +if test "$rb_cv_frptr" = "not found"; then + { $as_echo "$as_me:$LINENO: result: not found" >&5 +$as_echo "not found" >&6; } +else + { $as_echo "$as_me:$LINENO: result: $rb_cv_frptr" >&5 +$as_echo "$rb_cv_frptr" >&6; } + cat >>confdefs.h <<_ACEOF +#define FILE_READPTR $rb_cv_frptr +_ACEOF + + + if test "$rb_cv_fcnt" = "not found"; then + { $as_echo "$as_me:$LINENO: checking read buffer end field in FILE structures" >&5 +$as_echo_n "checking read buffer end field in FILE structures... " >&6; } + if test "${rb_cv_frend+set}" = set; then + $as_echo_n "(cached) " >&6 +else + for frend in _IO_read_end bufread __bufread ; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +FILE *f = stdin; char buf[256]; f->$frend = buf; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_frend="$frend"; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_frend="not found" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +fi + + if test "$rb_cv_frend" = "not found"; then + { $as_echo "$as_me:$LINENO: result: not found" >&5 +$as_echo "not found" >&6; } + else + { $as_echo "$as_me:$LINENO: result: $rb_cv_frend" >&5 +$as_echo "$rb_cv_frend" >&6; } + cat >>confdefs.h <<_ACEOF +#define FILE_READEND $rb_cv_frend +_ACEOF + + fi + fi +fi + +{ $as_echo "$as_me:$LINENO: checking whether st_ino is huge" >&5 +$as_echo_n "checking whether st_ino is huge... " >&6; } +if test "${rb_cv_huge_st_ino+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +struct stat test_stat; + +int +main () +{ +static int test_array [1 - 2 * !(sizeof(test_stat.st_ino)>sizeof(long))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_huge_st_ino=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_huge_st_ino=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_huge_st_ino" >&5 +$as_echo "$rb_cv_huge_st_ino" >&6; } +if test $rb_cv_huge_st_ino = yes; then + cat >>confdefs.h <<\_ACEOF +#define HUGE_ST_INO 1 +_ACEOF + +fi + +if test "$ac_cv_func_sysconf" = yes; then + + { $as_echo "$as_me:$LINENO: checking whether _SC_CLK_TCK is supported" >&5 +$as_echo_n "checking whether _SC_CLK_TCK is supported... " >&6; } +if test "${rb_cv_have_sc_clk_tck+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +_SC_CLK_TCK >= 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_have_sc_clk_tck=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_have_sc_clk_tck=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_have_sc_clk_tck" >&5 +$as_echo "$rb_cv_have_sc_clk_tck" >&6; } + if test "$rb_cv_have_sc_clk_tck" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE__SC_CLK_TCK 1 +_ACEOF + + fi + +fi + +case "$target_cpu" in +m68*|i?86|ia64|sparc*|alpha*) rb_cv_stack_grow_dir=-1;; +hppa*) rb_cv_stack_grow_dir=+1;; +esac +{ $as_echo "$as_me:$LINENO: checking stack growing direction" >&5 +$as_echo_n "checking stack growing direction... " >&6; } +if test "${rb_cv_stack_grow_dir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_stack_grow_dir=0 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* recurse to get rid of inlining */ +static int +stack_growup_p(addr, n) + volatile int *addr, n; +{ + volatile int end; + if (n > 0) + return *addr = stack_growup_p(addr, n - 1); + else + return (&end > addr); +} +int main() +{ + int x; + return stack_growup_p(&x, 10); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_stack_grow_dir=-1 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_stack_grow_dir=+1 +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_stack_grow_dir" >&5 +$as_echo "$rb_cv_stack_grow_dir" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_GROW_DIRECTION $rb_cv_stack_grow_dir +_ACEOF + + +if test x"$enable_pthread" = xyes; then + for pthread_lib in thr pthread pthreads c c_r root; do + as_ac_Lib=`$as_echo "ac_cv_lib_$pthread_lib''_pthread_kill" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for pthread_kill in -l$pthread_lib" >&5 +$as_echo_n "checking for pthread_kill in -l$pthread_lib... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$pthread_lib $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + rb_with_pthread=yes +else + rb_with_pthread=no +fi + + if test "$rb_with_pthread" = "yes"; then break; fi + done + if test x"$rb_with_pthread" = xyes; then + cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _THREAD_SAFE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + case $pthread_lib in + c) + ;; + root) + ;; + c_r) + MAINLIBS="-pthread $MAINLIBS" + ;; + *) + LIBS="-l$pthread_lib $LIBS" + ;; + esac + else + { $as_echo "$as_me:$LINENO: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&5 +$as_echo "$as_me: WARNING: \"Don't know how to find pthread library on your system -- thread support disabled\"" >&2;} + fi + + + +for ac_func in nanosleep sched_yield pthread_attr_setinheritsched +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + if test x"$ac_cv_func_nanosleep" = xno; then + +{ $as_echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 +$as_echo_n "checking for nanosleep in -lrt... " >&6; } +if test "${ac_cv_lib_rt_nanosleep+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_rt_nanosleep=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_rt_nanosleep=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5 +$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } +if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF + + LIBS="-lrt $LIBS" + +fi + + if test x"$ac_cv_lib_rt_nanosleep" = xyes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_NANOSLEEP 1 +_ACEOF + + fi + fi +fi +if test x"$ac_cv_header_ucontext_h" = xyes; then + if test x"$rb_with_pthread" = xyes; then + + +for ac_func in getcontext setcontext +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi +fi + +if test "$ac_cv_func_fork" = "yes" -a "$rb_with_pthread" = "yes"; then + { $as_echo "$as_me:$LINENO: checking if fork works with pthread" >&5 +$as_echo_n "checking if fork works with pthread... " >&6; } +if test "${rb_cv_fork_with_pthread+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_fork_with_pthread=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include +#include +#include +#include +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + +void * +thread_func(void *dmy) +{ + return dmy; +} + +int +use_threads(void) +{ + pthread_t tid; + if (pthread_create(&tid, 0, thread_func, 0) != 0) { + return -1; + } + if (pthread_join(tid, 0) != 0) { + return -1; + } + return 0; +} + +int +main(int argc, char *argv[]) +{ + pid_t pid; + if (use_threads()) return EXIT_FAILURE; + pid = fork(); + + if (pid) { + int loc; + sleep(1); + if (waitpid(pid, &loc, WNOHANG) == 0) { + kill(pid, SIGKILL); + return EXIT_FAILURE; + } + } + else { + if (use_threads()) return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_fork_with_pthread=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_fork_with_pthread=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_fork_with_pthread" >&5 +$as_echo "$rb_cv_fork_with_pthread" >&6; } + test x$rb_cv_fork_with_pthread = xyes || cat >>confdefs.h <<\_ACEOF +#define CANNOT_FORK_WITH_PTHREAD 1 +_ACEOF + +fi + + +for ac_func in backtrace +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +# Check whether --with-valgrind was given. +if test "${with_valgrind+set}" = set; then + withval=$with_valgrind; +for ac_header in valgrind/memcheck.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + + + +# Check whether --with-dln-a-out was given. +if test "${with_dln_a_out+set}" = set; then + withval=$with_dln_a_out; + case $withval in + yes) + if test "$enable_shared" = yes; then + { { $as_echo "$as_me:$LINENO: error: dln_a_out can not make shared library" >&5 +$as_echo "$as_me: error: dln_a_out can not make shared library" >&2;} + { (exit 1); exit 1; }; } + fi + with_dln_a_out=yes;; + *) with_dln_a_out=no;; + esac +else + with_dln_a_out=no +fi + + +{ $as_echo "$as_me:$LINENO: checking whether ELF binaries are produced" >&5 +$as_echo_n "checking whether ELF binaries are produced... " >&6; } +if test "${rb_cv_binary_elf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +case "`head -1 conftest$EXEEXT | cat -e`" in +'^?ELF'*) + rb_cv_binary_elf=yes;; +*) + rb_cv_binary_elf=no;; +esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_binary_elf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_binary_elf" >&5 +$as_echo "$rb_cv_binary_elf" >&6; } + +if test "$rb_cv_binary_elf" = yes; then + cat >>confdefs.h <<\_ACEOF +#define USE_ELF 1 +_ACEOF + + if test "$with_dln_a_out" = yes; then + { { $as_echo "$as_me:$LINENO: error: dln_a_out does not work with ELF" >&5 +$as_echo "$as_me: error: dln_a_out does not work with ELF" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +case "$target_os" in +linux* | gnu* | k*bsd*-gnu | bsdi*) + if test "$rb_cv_binary_elf" = no; then + with_dln_a_out=yes + else + LDFLAGS="$LDFLAGS -rdynamic" + fi;; +esac +LIBEXT=a + + + +STATIC= +: ${PATHFLAG=''} + +if test "$with_dln_a_out" != yes; then + rb_cv_dlopen=unknown + { $as_echo "$as_me:$LINENO: checking whether OS depend dynamic link works" >&5 +$as_echo_n "checking whether OS depend dynamic link works... " >&6; } + if test "$GCC" = yes; then + case "$target_os" in + nextstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + openstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + rhapsody*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + darwin*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) ;; + *) CCDLFLAGS="$CCDLFLAGS -fPIC";; + esac + else + case "$target_os" in + hpux*) CCDLFLAGS="$CCDLFLAGS +Z";; + solaris*|irix*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;; + sunos*) CCDLFLAGS="$CCDLFLAGS -PIC" ;; + esix*|uxpds*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;; + *) : ${CCDLFLAGS=""} ;; + esac + fi + + + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; enable_rpath=$enableval +else + enable_rpath="$rb_cv_binary_elf" +fi + + if test "$enable_rpath" = yes; then + RPATHFLAG=" ${linker_flag}-R%1\$-s" + fi + + case "$target_os" in + hpux*) DLDFLAGS="$DLDFLAGS -E" + : ${LDSHARED='ld -b'} + XLDFLAGS="$XLDFLAGS -Wl,-E" + : ${LIBPATHENV=SHLIB_PATH} + if test "$rb_cv_prog_gnu_ld" = no; then + RPATHFLAG=' +b %1$-s' + fi + rb_cv_dlopen=yes;; + solaris*) if test "$GCC" = yes; then + : ${LDSHARED='$(CC) -shared'} + if test "$rb_cv_prog_gnu_ld" = yes; then + LDFLAGS="$LDFLAGS -Wl,-E" + fi + else + : ${LDSHARED='ld -G'} + fi + rb_cv_dlopen=yes;; + sunos*) : ${LDSHARED='ld -assert nodefinitions'} + rb_cv_dlopen=yes;; + irix*) : ${LDSHARED='ld -shared'} + rb_cv_dlopen=yes;; + sysv4*) : ${LDSHARED='ld -G'} + rb_cv_dlopen=yes;; + nto-qnx*) : ${LDSHARED="qcc -shared"} + rb_cv_dlopen=yes ;; + esix*|uxpds*) : ${LDSHARED="ld -G"} + rb_cv_dlopen=yes ;; + osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""} + rb_cv_dlopen=yes ;; + bsdi3*) case "$CC" in + *shlicc*) : ${LDSHARED="$CC -r"} + rb_cv_dlopen=yes ;; + esac ;; + linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*) + : ${LDSHARED='${CC} -shared'} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + fi + rb_cv_dlopen=yes ;; + interix*) : ${LDSHARED="$CC -shared"} + XLDFLAGS="$XLDFLAGS -Wl,-E" + LIBPATHFLAG=" -L%1\$-s" + rb_cv_dlopen=yes ;; + freebsd*|dragonfly*) : ${LDSHARED="$CC -shared"} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -rdynamic" + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)' + else + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable" + fi + rb_cv_dlopen=yes ;; + openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-E" + fi + rb_cv_dlopen=yes ;; + nextstep*) : ${LDSHARED='cc -r -nostdlib'} + LDFLAGS="$LDFLAGS -u libsys_s" + rb_cv_dlopen=yes ;; + openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'} + : ${LDFLAGS=""} + rb_cv_dlopen=yes ;; + rhapsody*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'} + : ${LDFLAGS=""} + rb_cv_dlopen=yes ;; + darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'} + : ${LDFLAGS=""} + : ${LIBPATHENV=DYLD_LIBRARY_PATH} + rb_cv_dlopen=yes ;; + aix*) if test "$GCC" = yes; then + : ${LDSHARED='$(CC) -shared'} + else + : ${LDSHARED='$(CC)'} + fi + LDSHARED="$LDSHARED ${linker_flag}-G" + DLDFLAGS='-eInit_$(TARGET)' + XLDFLAGS="${linker_flag}-bE:ruby.imp ${linker_flag}-brtl" + XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}" + : ${ARCHFILE="ruby.imp"} + TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)' + TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)' + : ${LIBPATHENV=SHLIB_PATH} + RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s" + rb_cv_dlopen=yes ;; + human*) : ${DLDFLAGS=''} + : ${LDSHARED=''} + : ${LDFLAGS=''} + : ${LINK_SO='ar cru $@ $(OBJS)'} + rb_cv_dlopen=yes ;; + beos*) case "$target_cpu" in + powerpc*) + : ${LDSHARED="ld -xms"} + DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + LDFLAGS="$LDFLAGS -L/boot/home/config/lib -lbe -lroot" + ;; + i586*) + : ${LDSHARED="ld -shared"} + DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lbe -lroot" + LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lbe -lroot" + ;; + esac + : ${LIBPATHENV=LIBRARY_PATH} + rb_cv_dlopen=yes ;; + haiku*) case "$target_cpu" in + powerpc*) + : ${LDSHARED="ld -xms"} + DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + ;; + i586*) + : ${LDSHARED="ld -shared"} + DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot" + ;; + esac + : ${LIBPATHENV=LIBRARY_PATH} + rb_cv_dlopen=yes ;; + nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib" + : ${LDSHARED='ld -Bshareable -x'} + LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib" + rb_cv_dlopen=yes;; + cygwin*|mingw*) : ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'} + XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import" + DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all" + : ${LIBPATHENV=""} + rb_cv_dlopen=yes ;; + hiuxmpp) : ${LDSHARED='ld -r'} ;; + atheos*) : ${LDSHARED="$CC -shared"} + rb_cv_dlopen=yes ;; + os2-emx*) LDFLAGS="$LDFLAGS -Zomf" + ;; + *) : ${LDSHARED='ld'} ;; + esac + { $as_echo "$as_me:$LINENO: result: $rb_cv_dlopen" >&5 +$as_echo "$rb_cv_dlopen" >&6; } +fi +if test "${LDSHAREDXX}" = ""; then + case "${LDSHARED}" in + *'$(CC)'*) + LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\$(CC)/$(CXX)/'` + ;; + *'${CC}'*) + LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\${CC}/${CXX}/'` + ;; + *$CC*) + LDSHAREDXX=`echo "${LDSHARED}" | sed "s|$CC|$CXX|"` + ;; + ld" "*) + ;; + esac +fi +case ${RPATHFLAG} in +*'%1$'*) + : ${LIBPATHFLAG=' -L%1$-s'};; +*) + : ${LIBPATHFLAG=' -L%s'};; +esac + + + + +LIBPATHENV="${LIBPATHENV-LD_LIBRARY_PATH}" + + + +dln_a_out_works=no +if test "$ac_cv_header_a_out_h" = yes; then + if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then + cat confdefs.h > config.h + { $as_echo "$as_me:$LINENO: checking whether matz's dln works" >&5 +$as_echo_n "checking whether matz's dln works... " >&6; } +if test "${rb_cv_dln_a_out+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define USE_DLN_A_OUT +#include "dln.c" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + rb_cv_dln_a_out=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + rb_cv_dln_a_out=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_dln_a_out" >&5 +$as_echo "$rb_cv_dln_a_out" >&6; } + if test "$rb_cv_dln_a_out" = yes; then + dln_a_out_works=yes + cat >>confdefs.h <<\_ACEOF +#define USE_DLN_A_OUT 1 +_ACEOF + + fi + fi +fi + +if test "$dln_a_out_works" = yes; then + if test "$GCC" = yes; then + STATIC=-static + else + STATIC=-Bstatic + fi + DLEXT=so + CCDLFLAGS= +else + case "$target_os" in + hpux*) DLEXT=sl;; + nextstep*) DLEXT=bundle;; + openstep*) DLEXT=bundle;; + rhapsody*) DLEXT=bundle;; + darwin*) DLEXT=bundle;; + os2-emx*) DLEXT=dll;; + cygwin*|mingw*) DLEXT=so;; + *) DLEXT=so;; + esac +fi +len=2 # .rb +n=`expr "$DLEXT" : '.*'`; test "$n" -gt "$len" && len=$n +n=`expr "$DLEXT2" : '.*'`; test "$n" -gt "$len" && len=$n +cat >>confdefs.h <<_ACEOF +#define DLEXT_MAXLEN `expr $len + 1` +_ACEOF + +test ".$DLEXT" = "." || cat >>confdefs.h <<_ACEOF +#define DLEXT ".$DLEXT" +_ACEOF + +test ".$DLEXT2" = "." || cat >>confdefs.h <<_ACEOF +#define DLEXT2 ".$DLEXT2" +_ACEOF + + + +if test "$with_dln_a_out" = yes; then + STRIP=true +else + STRIP=strip +fi + +case "$target_os" in + linux* | gnu* | k*bsd*-gnu) + STRIP='strip -S -x';; + nextstep*) + STRIP='strip -A -n';; + openstep*) + STRIP='strip -A -n';; + rhapsody*) + STRIP='strip -A -n';; + darwin*) + STRIP='strip -A -n';; +esac + +EXTSTATIC= + +# Check whether --with-static-linked-ext was given. +if test "${with_static_linked_ext+set}" = set; then + withval=$with_static_linked_ext; case $withval in + yes) STATIC= + EXTSTATIC=static;; + *) ;; + esac +fi + + +case "$target_os" in + human*) + +{ $as_echo "$as_me:$LINENO: checking for _harderr in -lsignal" >&5 +$as_echo_n "checking for _harderr in -lsignal... " >&6; } +if test "${ac_cv_lib_signal__harderr+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsignal $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _harderr (); +int +main () +{ +return _harderr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_signal__harderr=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_signal__harderr=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_signal__harderr" >&5 +$as_echo "$ac_cv_lib_signal__harderr" >&6; } +if test "x$ac_cv_lib_signal__harderr" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSIGNAL 1 +_ACEOF + + LIBS="-lsignal $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for hmemset in -lhmem" >&5 +$as_echo_n "checking for hmemset in -lhmem... " >&6; } +if test "${ac_cv_lib_hmem_hmemset+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhmem $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hmemset (); +int +main () +{ +return hmemset (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_hmem_hmemset=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_hmem_hmemset=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hmem_hmemset" >&5 +$as_echo "$ac_cv_lib_hmem_hmemset" >&6; } +if test "x$ac_cv_lib_hmem_hmemset" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBHMEM 1 +_ACEOF + + LIBS="-lhmem $LIBS" + +fi + + +for ac_func in select +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + { $as_echo "$as_me:$LINENO: checking whether PD libc _dtos18 fail to convert big number" >&5 +$as_echo_n "checking whether PD libc _dtos18 fail to convert big number... " >&6; } +if test "${rb_cv_missing__dtos18+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_missing__dtos18=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +int +main() +{ + char buf[256]; + sprintf(buf, "%g", 1e+300); + return (strcmp (buf, "1e+300") ? 0 : 1); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_missing__dtos18=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_missing__dtos18=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_missing__dtos18" >&5 +$as_echo "$rb_cv_missing__dtos18" >&6; } + if test "$rb_cv_missing__dtos18" = yes; then + cat >>confdefs.h <<\_ACEOF +#define MISSING__DTOS18 1 +_ACEOF + + fi + { $as_echo "$as_me:$LINENO: checking whether PD libc fconvert fail to round" >&5 +$as_echo_n "checking whether PD libc fconvert fail to round... " >&6; } +if test "${rb_cv_missing_fconvert+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + rb_cv_missing_fconvert=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int +main() +{ + char buf[256]; + sprintf(buf, "%f", log(exp(1.0))); + return (strcmp (buf, "1.000000") ? 0 : 1); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rb_cv_missing_fconvert=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rb_cv_missing_fconvert=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:$LINENO: result: $rb_cv_missing_fconvert" >&5 +$as_echo "$rb_cv_missing_fconvert" >&6; } + if test "$rb_cv_missing_fconvert" = yes; then + cat >>confdefs.h <<\_ACEOF +#define MISSING_FCONVERT 1 +_ACEOF + + fi + case " $LIBOBJS " in + *" x68.o.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS x68.o.$ac_objext" + ;; +esac + + CFLAGS="$CFLAGS -fansi-only" + XCFLAGS="$XCFLAGS -cc1-stack=262144 -cpp-stack=2694144" + EXEEXT=.x + OBJEXT=o + setup=Setup.x68 + ;; + os2-emx) + case " $LIBOBJS " in + *" os2.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS os2.$ac_objext" + ;; +esac + + setup=Setup.emx + ;; + *djgpp*) + setup=Setup.dj + ;; + *) + setup=Setup + ;; +esac + + + +if test "$prefix" = NONE; then + prefix=$ac_default_prefix +fi + +#if test "$fat_binary" != no ; then +# CFLAGS="$CFLAGS $ARCH_FLAG" +#fi + +if test x"$cross_compiling" = xyes; then + test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake" + PREP=fake.rb + RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`' +else + MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib' + MINIRUBY="$MINIRUBY"' -I$(EXTOUT)/common -I./- -r$(srcdir)/ext/purelib.rb' + PREP='miniruby$(EXEEXT)' + RUNRUBY='$(MINIRUBY) $(srcdir)/runruby.rb --extout=$(EXTOUT)' +fi + + + +EXTOUT=${EXTOUT=.ext} + + +FIRSTMAKEFILE="" +LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' +LIBRUBY='$(LIBRUBY_A)' +LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static' +LIBRUBYARG='$(LIBRUBYARG_STATIC)' +SOLIBS= + +case "$target_os" in + cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*) + : ${DLDLIBS=""} + ;; + *) + DLDLIBS="$DLDLIBS -lc" + ;; +esac + +RUBY_SO_NAME='$(RUBY_INSTALL_NAME)' +LIBRUBY_LDSHARED=$LDSHARED +LIBRUBY_DLDFLAGS=$DLDFLAGS +LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY)' +LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so' +ENABLE_SHARED=no + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; enable_shared=$enableval +fi + +LIBRUBYARG_SHARED='-l$(RUBY_SO_NAME)' +if test "$enable_shared" = 'yes'; then + LIBRUBY='$(LIBRUBY_SO)' + LIBRUBYARG='$(LIBRUBYARG_SHARED)' + CFLAGS="$CFLAGS $CCDLFLAGS" + ENABLE_SHARED=yes + if test "$rb_cv_binary_elf" = yes; then + SOLIBS='$(LIBS)' + fi + case "$target_os" in + sunos4*) + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + ;; + linux* | gnu* | k*bsd*-gnu | atheos*) + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + ;; + freebsd*|dragonfly*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' + if test "$rb_cv_binary_elf" != "yes" ; then + LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)" + LIBRUBY_ALIASES='' + fi + ;; + netbsd*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)' + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' + if test "$rb_cv_binary_elf" = yes; then # ELF platforms + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so' + else # a.out platforms + LIBRUBY_ALIASES="" + fi + ;; + openbsd*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}` + ;; + solaris*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so' + if test "$GCC" = yes; then + LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)' + fi + XLDFLAGS="$XLDFLAGS "'-R${libdir}' + ;; + hpux*) + XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).sl' + ;; + aix*) + LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS" + LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' + SOLIBS='-lm -lc' + ;; + beos*) + case "$target_cpu" in + powerpc*) + LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + ;; + esac + ;; + darwin*) + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib' + LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace' + LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib' + ;; + interix*) + LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)' + ;; + *) + ;; + esac +fi +if test "$enable_rpath" = yes; then + LIBRUBY_RPATHFLAGS="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir)" + LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED" + LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC" +fi + +LDFLAGS="-L. $LDFLAGS" + + +RDOCTARGET="" +# Check whether --enable-install-doc was given. +if test "${enable_install_doc+set}" = set; then + enableval=$enable_install_doc; install_doc=$enableval +else + install_doc=yes +fi + +if test "$install_doc" != no; then + RDOCTARGET="install-doc" +fi + + +if test "$rb_with_pthread" = "yes"; then + THREAD_MODEL=pthread +fi +MINIDLNOBJ=dln.o +case "$target_os" in + linux*) + ;; + netbsd*) + CFLAGS="$CFLAGS -pipe" + ;; + nextstep*|openstep*) + # The -fno-common is needed if we wish to embed the Ruby interpreter + # into a plugin module of some project (as opposed to embedding it + # within the project's application). The -I/usr/local/include is + # needed because CPP as discovered by configure (cc -E -traditional) + # fails to consult /usr/local/include by default. This causes + # mkmf.rb's have_header() to fail if the desired resource happens to be + # installed in the /usr/local tree. + CFLAGS="$CFLAGS -pipe -fno-common" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + ;; + rhapsody*) + CFLAGS="$CFLAGS -pipe -no-precomp -fno-common" + ;; + darwin*) + CFLAGS="$CFLAGS -pipe -fno-common" + MINIDLNOBJ=dmydln.o + ;; + os2-emx) + CFLAGS="$CFLAGS -DOS2" + LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'` + LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'` + LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'` + ;; + osf*) + if test "$GCC" != "yes" ; then + # compile something small: taint.c is fine for this. + # the main point is the '-v' flag of 'cc'. + case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in + */gemc_cc*) # we have the new DEC GEM CC + CFLAGS="$CFLAGS -oldc" + ;; + *) # we have the old MIPS CC + ;; + esac + # cleanup + rm -f /tmp/main.o + CFLAGS="$CFLAGS -std" + fi + ;; + beos*) + case "$target_cpu" in + powerpc*) + CFLAGS="$CFLAGS -relax_pointers" + ;; + esac + CPPFLAGS="$CPPFLAGS -I/boot/home/config/include" + ;; + cygwin*|mingw*) + LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' + case "$target_os" in + cygwin*) + if test x"$enable_shared" = xyes; then + LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}${TEENY}.dll + fi + ;; + mingw*) + RUBY_SO_NAME=${rb_cv_msvcrt}-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR}${TEENY} + if test x"$enable_shared" = xyes; then + LIBRUBY_SO='$(RUBY_SO_NAME)'.dll + LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)' + fi + case " $LIBOBJS " in + *" win32.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS win32.$ac_objext" + ;; +esac + + COMMON_LIBS=m +# COMMON_MACROS="WIN32_LEAN_AND_MEAN=" + COMMON_HEADERS="winsock2.h windows.h" + THREAD_MODEL=win32 + ;; + esac + LIBRUBY_ALIASES='' + FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in + SOLIBS='$(LIBS)' + if test x"$enable_shared" = xyes; then + LIBRUBY='lib$(RUBY_SO_NAME).dll.a' + else + LIBRUBY_SO=dummy + LIBRUBY='lib$(RUBY_SO_NAME).a' + LIBRUBYARG='-l$(RUBY_SO_NAME)' + fi + MINIDLNOBJ=dmydln.o + ;; + hpux*) + case "$YACC" in + *yacc*) + XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300" + YACC="$YACC -Nl40000 -Nm40000" + ;; + esac + MINIDLNOBJ=dmydln.o + ;; + *msdosdjgpp*) + FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in + ;; + *) + ;; +esac +MINIOBJS="$MINIDLNOBJ" + +case "$FIRSTMAKEFILE" in +*GNUmakefile:*) + gnumake=yes + ;; +*) + { $as_echo "$as_me:$LINENO: checking for if ${MAKE-make} is GNU make" >&5 +$as_echo_n "checking for if ${MAKE-make} is GNU make... " >&6; } + mkdir conftest.dir + echo "all:; @echo yes" > conftest.dir/GNUmakefile + echo "all:; @echo no" > conftest.dir/Makefile + gnumake=`(cd conftest.dir; ${MAKE-make})` + rm -fr conftest.dir + case "$gnumake" in + *yes*) + echo "include Makefile" > GNUmakefile + echo "-include uncommon.mk" >> GNUmakefile + gnumake=yes;; + *) + gnumake=no;; + esac + { $as_echo "$as_me:$LINENO: result: $gnumake" >&5 +$as_echo "$gnumake" >&6; } + ;; +esac + +CPPFLAGS="$CPPFLAGS "'$(DEFS)' +test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}' +cflagspat=`eval echo '"'"${cflags}"'"' | sed 's/|.*/\\&/g'` +CFLAGS=`echo "$CFLAGS" | sed "s|$cflagspat"'|${cflags}|'` +cxxflagspat=`eval echo '"'"${cxxflags}"'"' | sed 's/|.*/\\&/g'` +CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$cxxflagspat"'|${cxxflags}|'` +cflags='${optflags} ${debugflags} ${warnflags}' + + + + + + + + + + + + + + + + + + + + + + + + +MAKEFILES="Makefile `echo $FIRSTMAKEFILE | sed 's/:.*//'`" +MAKEFILES="`echo $MAKEFILES`" + + +ri_prefix= +test "$program_prefix" != NONE && + ri_prefix=$program_prefix + +ri_suffix= +test "$program_suffix" != NONE && + ri_suffix=$program_suffix + +RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}" +case "$target_os" in + cygwin*|mingw*) + RUBYW_INSTALL_NAME="${ri_prefix}rubyw${ri_suffix}" + rubyw_install_name="$RUBYW_INSTALL_NAME" + ;; +esac +RUBY_LIB_PREFIX=`eval echo \\"${libdir}/${RUBY_INSTALL_NAME}\\"` + + +# Check whether --with-ruby-version was given. +if test "${with_ruby_version+set}" = set; then + withval=$with_ruby_version; ruby_version=$withval +else + ruby_version=full +fi + +case "$ruby_version" in + full) + ruby_version="${MAJOR}.${MINOR}.${TEENY}" + ;; + minor) + ruby_version="${MAJOR}.${MINOR}" + ;; +esac + + +# Check whether --with-sitedir was given. +if test "${with_sitedir+set}" = set; then + withval=$with_sitedir; sitedir=$withval +else + sitedir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby' +fi + +SITE_DIR=`eval echo \\"${sitedir}\\"` + + +# Check whether --with-vendordir was given. +if test "${with_vendordir+set}" = set; then + withval=$with_vendordir; vendordir=$withval +else + vendordir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby' +fi + +VENDOR_DIR=`eval echo \\"${vendordir}\\"` + +case "$target_os" in + cygwin*|mingw*|*djgpp*|os2-emx*) + RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + ;; + *) + RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + ;; +esac +RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${ruby_version}" +RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${ruby_version}" +RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${ruby_version}" + +cat >>confdefs.h <<_ACEOF +#define RUBY_LIB "${RUBY_LIB_PATH}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_SITE_LIB "${RUBY_SITE_LIB_PATH}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_SITE_LIB2 "${RUBY_SITE_LIB_PATH2}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_VENDOR_LIB "${RUBY_VENDOR_LIB_PATH}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_VENDOR_LIB2 "${RUBY_VENDOR_LIB_PATH2}" +_ACEOF + + + +configure_args=$ac_configure_args + +if test "$fat_binary" != no ; then + arch="fat-${target_os}" + + cat >>confdefs.h <<_ACEOF +#define RUBY_THIN_ARCHLIB "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}" +_ACEOF + + + cat >>confdefs.h <<_ACEOF +#define RUBY_SITE_THIN_ARCHLIB "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define RUBY_VENDOR_THIN_ARCHLIB "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}" +_ACEOF + + cat >>confdefs.h <<_ACEOF +#define RUBY_PLATFORM __ARCHITECTURE__ "-${target_os}" +_ACEOF + +else + arch="${target_cpu}-${target_os}" + cat >>confdefs.h <<_ACEOF +#define RUBY_PLATFORM "${arch}" +_ACEOF + +fi + +case "$target_os" in + mingw*) sitearch="$target_cpu-$rb_cv_msvcrt" ;; + *) sitearch="${arch}" ;; +esac + +cat >>confdefs.h <<_ACEOF +#define RUBY_ARCHLIB "${RUBY_LIB_PATH}/${arch}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_SITE_ARCHLIB "${RUBY_SITE_LIB_PATH2}/${sitearch}" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define RUBY_VENDOR_ARCHLIB "${RUBY_VENDOR_LIB_PATH2}/${sitearch}" +_ACEOF + + + +# Check whether --with-search-path was given. +if test "${with_search_path+set}" = set; then + withval=$with_search_path; search_path=$withval +fi + +if test "$search_path" != ""; then + cat >>confdefs.h <<_ACEOF +#define RUBY_SEARCH_PATH "$search_path" +_ACEOF + +fi + + +# Check whether --with-rubyhdrdir was given. +if test "${with_rubyhdrdir+set}" = set; then + withval=$with_rubyhdrdir; rubyhdrdir=$withval +else + rubyhdrdir='${includedir}/${RUBY_INSTALL_NAME}-${ruby_version}' +fi + + + +# Check whether --with-sitehdrdir was given. +if test "${with_sitehdrdir+set}" = set; then + withval=$with_sitehdrdir; sitehdrdir=$withval +else + sitehdrdir='${rubyhdrdir}/site_ruby' +fi + + + +# Check whether --with-vendorhdrdir was given. +if test "${with_vendorhdrdir+set}" = set; then + withval=$with_vendorhdrdir; vendorhdrdir=$withval +else + vendorhdrdir='${rubyhdrdir}/vendor_ruby' +fi + + + + +# Check whether --with-mantype was given. +if test "${with_mantype+set}" = set; then + withval=$with_mantype; + case "$withval" in + man|doc) + MANTYPE=$withval + ;; + *) + { { $as_echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 +$as_echo "$as_me: error: invalid man type: $withval" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + +fi + +if test -z "$MANTYPE"; then + for ac_prog in nroff awf +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_NROFF+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $NROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""/usr/bin:/usr/ucb"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +NROFF=$ac_cv_path_NROFF +if test -n "$NROFF"; then + { $as_echo "$as_me:$LINENO: result: $NROFF" >&5 +$as_echo "$NROFF" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$NROFF" && break +done +test -n "$NROFF" || NROFF="/bin/false" + + if ${NROFF} -mdoc ${srcdir}/man/ruby.1 >/dev/null 2>&1; then + MANTYPE=doc + else + MANTYPE=man + fi +fi + + +arch_hdrdir="${EXTOUT}/include/${arch}/ruby" +$MAKEDIRS "${arch_hdrdir}" +config_h="${arch_hdrdir}/config.h" +if test -f "${config_h}" && tr -d '\015' < confdefs.h | cmp -s "${config_h}" -; then + echo "config.h unchanged" +else + echo "creating config.h" + tr -d '\015' < confdefs.h > "${config_h}" +fi +tr -d '\015' < largefile.h > confdefs.h +rm largefile.h + +BUILTIN_ENCS="`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \ + -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ + -e '}' "${srcdir}/enc/Makefile.in"`" +BUILTIN_ENCOBJS= +for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done + + +BUILTIN_TRANSES="`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \ + -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ + -e '}' "${srcdir}/enc/Makefile.in"`" +BUILTIN_TRANSSRCS= +BUILTIN_TRANSOBJS= +for e in $BUILTIN_TRANSES; do + BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS `basename $e .trans`"'.c'; + BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS `basename $e .trans`"'.$(OBJEXT)'; +done + + + +ac_config_files="$ac_config_files $FIRSTMAKEFILE" + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT gnumake=$gnumake + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "$FIRSTMAKEFILE") CONFIG_FILES="$CONFIG_FILES $FIRSTMAKEFILE" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + + + + esac + + + case $ac_file$ac_mode in + "Makefile":F) { + sed '/^MISSING/s/\$U\././g' Makefile + echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)' + test "$RUBY_INSTALL_NAME$EXEEXT" = ruby || echo 'ruby: $(PROGRAM);' + if test "$gnumake" != yes; then + echo '$(MKFILES): $(srcdir)/common.mk' + sed 's/{\$([^(){}]*)[^{}]*}//g' ${srcdir}/common.mk + else + echo 'distclean-local::; @$(RM) GNUmakefile uncommon.mk' + fi + } >> confmk$$.tmp && mv -f confmk$$.tmp Makefile ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/lib/ruby-1.9.1-rc1/configure.in b/lib/ruby-1.9.1-rc1/configure.in new file mode 100644 index 0000000..e2050a3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/configure.in @@ -0,0 +1,2148 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT() + +AC_PREREQ(2.60) + +AC_ARG_WITH(baseruby, + [ --with-baseruby=RUBY use RUBY as baseruby; RUBY is the pathname of ruby], + [ + case "$withval" in + *ruby*) + BASERUBY=$withval + ;; + *) + AC_MSG_ERROR(need ruby) + ;; + esac + ], + [ + BASERUBY="ruby" + ]) +test "`$BASERUBY -e 'p 42' 2>/dev/null`" = 42 || + BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" +AC_SUBST(BASERUBY) + +AC_DEFUN([RUBY_MINGW32], +[case "$host_os" in +cygwin*) +AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32, +[AC_TRY_CPP([ +#ifndef __MINGW32__ +# error +#endif +], rb_cv_mingw32=yes,rb_cv_mingw32=no) +rm -f conftest*]) +test "$rb_cv_mingw32" = yes && target_os="mingw32" + ;; +esac]) + +AC_DEFUN([RUBY_CPPOUTFILE], +[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile, +[cppflags=$CPPFLAGS +CPPFLAGS='-o conftest.i' +AC_TRY_CPP([], rb_cv_cppoutfile=yes, rb_cv_cppoutfile=no) +CPPFLAGS=$cppflags +rm -f conftest*]) +if test "$rb_cv_cppoutfile" = yes; then + CPPOUTFILE='-o conftest.i' +elif test "$rb_cv_cppoutfile" = no; then + CPPOUTFILE='> conftest.i' +elif test -n "$rb_cv_cppoutfile"; then + CPPOUTFILE="$rb_cv_cppoutfile" +fi +AC_SUBST(CPPOUTFILE)]) + +AC_DEFUN([RUBY_PROG_GNU_LD], +[AC_CACHE_CHECK(whether the linker is GNU ld, rb_cv_prog_gnu_ld, +[if `$CC $CFLAGS $CPPFLAGS $LDFLAGS --print-prog-name=ld 2>&1` -v 2>&1 | grep "GNU ld" > /dev/null; then + rb_cv_prog_gnu_ld=yes +else + rb_cv_prog_gnu_ld=no +fi +]) +GNU_LD=$rb_cv_prog_gnu_ld +AC_SUBST(GNU_LD)]) + +unset GREP_OPTIONS +rb_version=`grep '^#define RUBY_VERSION ' $srcdir/version.h` +MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'` +MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'` +TEENY=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)"'` +if test "$MAJOR" = ""; then + AC_MSG_ERROR(could not determine MAJOR number from version.h) +fi +if test "$MINOR" = ""; then + AC_MSG_ERROR(could not determine MINOR number from version.h) +fi +if test "$TEENY" = ""; then + AC_MSG_ERROR(could not determine TEENY number from version.h) +fi +AC_SUBST(MAJOR) +AC_SUBST(MINOR) +AC_SUBST(TEENY) +if test "$MAJOR" = "1"; then + AC_DEFINE(CANONICALIZATION_FOR_MATHN) +fi +dnl checks for alternative programs +AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [ + case $withval in + no) : ${CC=cc} + ;; + yes) : ${CC=gcc} + ;; + *) CC=$withval + ;; + esac]) +dnl If the user switches compilers, we can't believe the cache +if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" +then + AC_MSG_ERROR(cached CC is different -- throw away $cache_file +(it is also a good idea to do 'make clean' before compiling)) +fi + +if test "$program_prefix" = NONE; then + program_prefix= +fi + +AC_CANONICAL_TARGET +target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` +ac_install_sh='' # unusable for extension libraries. + +ifelse(currently,disabled, [ +dnl checks for fat-binary +AC_ARG_ENABLE(fat-binary, + [ --enable-fat-binary=ARCHS + build an Apple/NeXT Multi Architecture Binary (MAB); + ARCHS is a comma-delimited list of architectures for + which to build; if ARCHS is omitted, then the package + will be built for all architectures supported by the + platform ("ppc" for MacOS/X and Darwin; "ppc,i386" + for Rhapsody; "m68k,i386,sparc" for OpenStep; + "m68k,i386,sparc,hppa" for NextStep); if this option + is disabled or omitted entirely, then the package + will be built only for the target platform], + [fat_binary=$enableval], [fat_binary=no]) +if test "$fat_binary" != no; then + + AC_MSG_CHECKING([target architectures]) + + # Respect TARGET_ARCHS setting from environment if available. + if test -z "$TARGET_ARCHS"; then + # Respect ARCH given to --enable-fat-binary if present. + if test "$fat_binary" != yes; then + TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '` + else + # Choose a default set of architectures based upon platform. + case "$target_os" in + darwin*) + TARGET_ARCHS="ppc" + ;; + rhapsody*) + TARGET_ARCHS="ppc i386" + ;; + openstep*) + TARGET_ARCHS="m68k i386 sparc" + ;; + nextstep*) + TARGET_ARCHS="m68k i386 sparc hppa" + ;; + *) + TARGET_ARCHS=`arch` + esac + fi + fi + + AC_MSG_RESULT([$TARGET_ARCHS]) + + # /usr/lib/arch_tool -archify_list $TARGET_ARCHS + ARCH_FLAG= + for archs in $TARGET_ARCHS + do + ARCH_FLAG="$ARCH_FLAG -arch $archs" + done + AC_DEFINE(NEXT_FAT_BINARY) +fi +], [fat_binary=no]) + +case $target_cpu in + i?86) frame_address=yes;; + *) frame_address=no;; +esac +AC_ARG_ENABLE(frame-address, + [ --enable-frame-address use GCC __builtin_frame_address(). ], + [frame_address=$enableval]) +if test $frame_address = yes; then + AC_DEFINE(USE_BUILTIN_FRAME_ADDRESS) +fi + +AC_ARG_PROGRAM + +dnl Checks for programs. + +: ${CFLAGS=} ${cflags='${optflags} ${debugflags} ${warnflags}'} +: ${CXXFLAGS=} ${cxxflags='${optflags} ${debugflags} ${warnflags}'} +if test x"${build}" != x"${host}"; then + AC_CHECK_TOOL(CC, gcc) +fi +AC_PROG_CC +AC_PROG_CXX +AC_PROG_GCC_TRADITIONAL +test $ac_cv_prog_cc_g = yes && : ${debugflags=-g} +if test "$GCC" = yes; then + linker_flag=-Wl, + : ${optflags=-O2} ${warnflags="-Wall -Wno-parentheses"} +else + linker_flag= +fi +CFLAGS="${CFLAGS} `eval echo $cflags`" +CXXFLAGS="${CXXFLAGS} `eval echo $cxxflags`" + +RUBY_PROG_GNU_LD +RUBY_CPPOUTFILE + +: ${OUTFLAG='-o '} +: ${COUTFLAG=${OUTFLAG}} +AC_SUBST(OUTFLAG) +AC_SUBST(COUTFLAG) + +RUBY_MINGW32 + +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(AR, ar) +if test -z "$AR"; then + AC_CHECK_PROGS(AR, aal, ar) +fi + +AC_CHECK_TOOL(AS, as) +ASFLAGS=$ASFLAGS +AC_SUBST(ASFLAGS) + +# BSD's ports and MacPorts prefix GNU binutils with 'g' +AC_CHECK_TOOLS(OBJDUMP, [objdump gobjdump]) +AC_CHECK_TOOLS(OBJCOPY, [objcopy gobjcopy]) + +case "$target_os" in +cygwin*|mingw*) + AC_CHECK_TOOL(NM, nm) + AC_CHECK_TOOL(WINDRES, windres) + AC_CHECK_TOOL(DLLWRAP, dllwrap) + target_cpu=`echo $target_cpu | sed s/i.86/i386/` + case "$target_os" in + mingw*) + test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt + AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [ + AC_TRY_LINK([#include ], + [FILE* volatile f = stdin; return 0;], + [rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | + tr A-Z a-z | + sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`], + [rb_cv_msvcrt=msvcrt]) + test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt]) + esac + : ${enable_shared=yes} + ;; +aix*) + AC_CHECK_TOOL(NM, nm, /usr/ccs/bin/nm, /usr/ccs/bin:$PATH) + ;; +hiuxmpp*) + # by TOYODA Eizi + AC_DEFINE(__HIUX_MPP__) + ;; +esac + +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_INSTALL + +# checks for UNIX variants that set C preprocessor variables +AC_USE_SYSTEM_EXTENSIONS + +AC_SUBST(RM, ['rm -f']) +AC_SUBST(CP, ['cp']) +if $as_mkdir_p; then + MAKEDIRS='mkdir -p' +else + MAKEDIRS='install -d' +fi +AC_SUBST(MAKEDIRS) + +dnl check for large file stuff +mv confdefs.h confdefs1.h +: > confdefs.h +AC_SYS_LARGEFILE +mv confdefs.h largefile.h +mv confdefs1.h confdefs.h +cat largefile.h >> confdefs.h + +case "$target_os" in +mingw*) + ac_cv_type_off_t=yes + ac_cv_sizeof_off_t=8 + ;; +esac + +AC_CHECK_TYPES([long long, off_t]) + +AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF(short, 2) +AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(long long, 0) +AC_CHECK_SIZEOF(__int64, 0) +AC_CHECK_SIZEOF(off_t, 0) +AC_CHECK_SIZEOF(void*, 4) +AC_CHECK_SIZEOF(float, 4) +AC_CHECK_SIZEOF(double, 8) +AC_CHECK_SIZEOF(time_t, 0) + +dnl RUBY_REPLACE_TYPE [typename] [default type] [macro type] [included] +AC_DEFUN([RUBY_REPLACE_TYPE], [dnl + AC_CHECK_TYPE([$1], + [AC_DEFINE_UNQUOTED(rb_[$1], [$1])], + [AC_DEFINE_UNQUOTED(rb_[$1], [$2])], + [$4]) + AC_CACHE_CHECK([for convertible type of [$1]], rb_cv_[$1]_convertible, [ + u= t= + AC_COMPILE_IFELSE( + [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT] + [$4], [(rb_[$1])-1 > 0])], + [u=U]) + if test x"$t" = x; then + AC_COMPILE_IFELSE( + [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT] + [$4], [sizeof(rb_[$1]) > sizeof(long)])], + [t=LL]) + fi + if test x"$t" = x; then + AC_COMPILE_IFELSE( + [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT] + [$4], [sizeof(rb_[$1]) == sizeof(long)])], + [t=LONG]) + fi + if test x"$t" = x; then + t=INT + fi + rb_cv_[$1]_convertible=${u}${t}]) + AC_DEFINE_UNQUOTED([$3]2NUM[(v)], [${rb_cv_[$1]_convertible}2NUM(v)]) + AC_DEFINE_UNQUOTED(NUM2[$3][(v)], [NUM2${rb_cv_[$1]_convertible}(v)]) +]) +RUBY_REPLACE_TYPE(pid_t, int, PIDT) +RUBY_REPLACE_TYPE(uid_t, int, UIDT) +RUBY_REPLACE_TYPE(gid_t, int, GIDT) + +AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes, + [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);], + rb_cv_have_prototypes=yes, + rb_cv_have_prototypes=no)]) +if test "$rb_cv_have_prototypes" = yes; then + AC_DEFINE(HAVE_PROTOTYPES) +fi + +AC_CACHE_CHECK(token paste string, rb_cv_tokenpaste, + [AC_TRY_COMPILE([#define paste(a,b) a##b], + [int xy = 1; return paste(x,y);], + rb_cv_tokenpaste=ansi, + rb_cv_tokenpaste=knr)]) +if test "$rb_cv_tokenpaste" = ansi; then + AC_DEFINE(TOKEN_PASTE(x,y),[x##y]) +else + AC_DEFINE(TOKEN_PASTE(x,y),[x/**/y]) +fi + +AC_CACHE_CHECK(stringization, rb_cv_stringization, [ + rb_cv_stringization=no + for string in "#expr" '"expr"'; do + AC_COMPILE_IFELSE([ + AC_LANG_BOOL_COMPILE_TRY([ +#define STRINGIZE0(expr) $string +#define STRINGIZE(expr) STRINGIZE0(expr) +#undef real_test_for_stringization +#define test_for_stringization -.real_test_for_stringization.- +const char stringized[[]] = STRINGIZE(test_for_stringization); +], [sizeof(stringized) == 32])], + [rb_cv_stringization="$string"; break], + [rb_cv_stringization=no]) + done] +) +AC_DEFINE(STRINGIZE(expr),STRINGIZE0(expr)) +if test x"$rb_cv_stringization" != xno -a "$rb_cv_stringization" != "#expr"; then + AC_DEFINE_UNQUOTED(STRINGIZE0(expr),$rb_cv_stringization) + AC_DEFINE(OLD_FASHIONED_STRINGIZATION,1) +fi + +AC_CACHE_CHECK([string literal concatenation], + rb_cv_string_literal_concatenation, [ + AC_COMPILE_IFELSE([ + AC_LANG_BOOL_COMPILE_TRY([ +const char concatenated_literal[[]] = "literals" "to" + "be" "concatenated."; +], [sizeof(concatenated_literal) == 26])], + [rb_cv_string_literal_concatenation=yes], + [rb_cv_string_literal_concatenation=no])] +) +if test "$rb_cv_string_literal_concatenation" = no; then + AC_DEFINE(NO_STRING_LITERAL_CONCATENATION,1) +fi + +AC_CACHE_CHECK(for variable length prototypes and stdarg.h, rb_cv_stdarg, + [AC_TRY_COMPILE([ +#include +int foo(int x, ...) { + va_list va; + va_start(va, x); + va_arg(va, int); + va_arg(va, char *); + va_arg(va, double); + return 0; +} +], [return foo(10, "", 3.14);], + rb_cv_stdarg=yes, + rb_cv_stdarg=no)]) +if test "$rb_cv_stdarg" = yes; then + AC_DEFINE(HAVE_STDARG_PROTOTYPES) +fi + +AC_CACHE_CHECK(for variable length macro, rb_cv_va_args_macro, + [AC_TRY_COMPILE([@%:@define FOO(a, ...) foo(a, @%:@@%:@__VA_ARGS__)], + [FOO(1);FOO(1,2);FOO(1,2,3);], + rb_cv_va_args_macro=yes, + rb_cv_va_args_macro=no)]) +if test "$rb_cv_va_args_macro" = yes; then + AC_DEFINE(HAVE_VA_ARGS_MACRO) +fi + +AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl +m4_ifval([$2], dnl + [AS_VAR_PUSHDEF([attrib],[$2])], dnl + [AS_VAR_PUSHDEF([attrib],[FUNC_]AS_TR_CPP($1))] dnl +)dnl +m4_ifval([$3], dnl + [AS_VAR_PUSHDEF([rbcv],[$3])], dnl + [AS_VAR_PUSHDEF([rbcv],[rb_cv_func_][$1])]dnl +)dnl +AC_CACHE_CHECK(for [$1] function attribute, rbcv, +[rbcv=x +if test "${ac_c_werror_flag+set}"; then + rb_c_werror_flag="$ac_c_werror_flag" +else + unset rb_c_werror_flag +fi +ac_c_werror_flag=yes +for mac in "__attribute__ (($1)) x" "x __attribute__ (($1))" "__declspec($1) x" x; do + AC_TRY_COMPILE( + [#define ]attrib[(x) $mac + ]attrib[(void conftest_attribute_check(void));], [], + [rbcv="$mac"; break]) +done +if test "${rb_c_werror_flag+set}"; then + ac_c_werror_flag="$rb_c_werror_flag" +else + unset ac_c_werror_flag +fi +]) +AC_DEFINE_UNQUOTED(attrib[(x)], $rbcv) +AS_VAR_POPDEF([attrib]) +AS_VAR_POPDEF([rbcv]) +]) + +RUBY_FUNC_ATTRIBUTE(noreturn, NORETURN) +RUBY_FUNC_ATTRIBUTE(deprecated, DEPRECATED) +RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE) +RUBY_FUNC_ATTRIBUTE(stdcall) +RUBY_FUNC_ATTRIBUTE(cdecl) +RUBY_FUNC_ATTRIBUTE(fastcall) + +if test "$GCC" = yes; then + AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias], + [rb_cv_gcc_function_alias=no + for a in alias weak,alias; do + AC_TRY_LINK([void foo(void) {} + void bar(void) __attribute__(($a("foo")));], [bar()], + [rb_cv_gcc_function_alias=$a; break]) + done]) + if test "$rb_cv_gcc_function_alias" = no; then + AC_DEFINE([RUBY_ALIAS_FUNCTION(old_prot, new_name, args)], + [VALUE old_prot {return new_name args;}]) + else + AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION(old_prot, new_name, args)], + [VALUE old_prot __attribute__(($rb_cv_gcc_function_alias(@%:@new_name)));]) + fi +fi + +AC_CACHE_CHECK([for RUBY_EXTERN], rb_cv_ruby_extern, +[rb_cv_ruby_extern=no +for mac in "__attribute__((dllimport))" "__declspec(dllimport)"; do + AC_TRY_COMPILE( + [extern $mac void conftest(void);], + [rb_cv_ruby_extern="extern $mac"; break]) +done]) +test "x$rb_cv_ruby_extern" = xno || AC_DEFINE_UNQUOTED(RUBY_EXTERN, $rb_cv_ruby_extern) + +XCFLAGS="$XCFLAGS -DRUBY_EXPORT" + +dnl Check whether we need to define sys_nerr locally +AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default +#include ]) + +case "$target_os" in +freebsd*) + AC_CACHE_CHECK([whether pthread should be enabled by default], + rb_cv_enable_pthread_default, + [AC_TRY_CPP([ +#include +#if __FreeBSD_version < 502102 +#error pthread should be disabled on this platform +#endif + ], + rb_cv_enable_pthread_default=yes, + rb_cv_enable_pthread_default=no)]) + enable_pthread_default=$rb_cv_enable_pthread_default + ;; +mingw*) + enable_pthread_default=no + ;; +*) + enable_pthread_default=yes + ;; +esac + +AC_ARG_ENABLE(pthread, + [ --enable-pthread use pthread library.], + [enable_pthread=$enableval], [enable_pthread=$enable_pthread_default]) + +dnl Checks for libraries. +case "$target_os" in +nextstep*) ;; +openstep*) ;; +rhapsody*) ;; +darwin*) LIBS="-lobjc $LIBS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE" + AC_TRY_CPP([#include + #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 + #error pre OS X 10.4 + [!<===== pre OS X 10.4 =====>] + #endif + ], + [ + ac_cv_header_ucontext_h=no + ac_cv_func_daemon=no + ], + [ + AC_DEFINE(BROKEN_SETREUID, 1) + AC_DEFINE(BROKEN_SETREGID, 1) + ]) + ac_cv_lib_crypt_crypt=no + AC_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt, + [AC_TRY_RUN([ +#include +#include +#include +int +main() +{ + char buf[256]; + strcpy(buf, crypt("", "\xE0\xA0")); + return strcmp(buf, crypt("", "\xE0\xA0")); +} +], + rb_cv_broken_crypt=no, + rb_cv_broken_crypt=yes, + rb_cv_broken_crypt=yes)]) + if test "$rb_cv_broken_crypt" = yes; then + AC_DEFINE(BROKEN_CRYPT, 1) + fi + ;; +hpux*) LIBS="-lm $LIBS" + ac_cv_c_inline=no;; +human*) ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ;; +beos*|haiku*) ac_cv_func_link=no + ac_cv_func_sched_yield=no + ac_cv_func_pthread_attr_setinheritsched=no + case "$target_os" in + beos*) ac_cv_header_net_socket_h=yes;; + haiku*) ac_cv_func_shutdown=no;; + esac + LIBS="$LIBS" # m lib is include in root under BeOS/Haiku + ;; +cygwin*) ;; +mingw*) LIBS="-lshell32 -lws2_32 $LIBS" + ac_cv_header_a_out_h=no + ac_cv_header_pwd_h=no + ac_cv_header_utime_h=no + ac_cv_header_sys_ioctl_h=no + ac_cv_header_sys_param_h=no + ac_cv_header_sys_resource_h=no + ac_cv_header_sys_select_h=no + ac_cv_header_sys_time_h=no + ac_cv_header_sys_times_h=no + ac_cv_header_sys_socket_h=no + ac_cv_func_times=yes + ac_cv_func_waitpid=yes + ac_cv_func_fsync=yes + ac_cv_func_seekdir=yes + ac_cv_func_telldir=yes + ac_cv_func_isinf=yes + ac_cv_func_isnan=yes + ac_cv_func_finite=yes + ac_cv_func_link=yes + ac_cv_func_truncate=yes + ac_cv_func_fseeko=yes + ac_cv_func_ftello=yes + ac_cv_lib_crypt_crypt=no + ac_cv_func_getpgrp_void=no + ac_cv_func_setpgrp_void=yes + ac_cv_func_memcmp_working=yes + ac_cv_lib_dl_dlopen=no + rb_cv_binary_elf=no + rb_cv_negative_time_t=no + ac_cv_func_fcntl=yes + ;; +os2-emx*) LIBS="-lm $LIBS" + ac_cv_lib_dir_opendir=no;; +msdosdjgpp*) LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes + ac_cv_func_setitimer=no + ac_cv_sizeof_rlim_t=4 + ac_cv_func_fork=no + ac_cv_func_setrlimit=no + ac_cv_header_sys_socket_h=no + ;; +bsdi*) LIBS="-lm $LIBS" + AC_DEFINE(BROKEN_SETREUID, 1) + AC_DEFINE(BROKEN_SETREGID, 1) + ac_cv_sizeof_rlim_t=8;; +freebsd*) LIBS="-lm $LIBS" + ;; +dragonfly*) LIBS="-lm $LIBS" + ;; +bow) ac_cv_func_setitimer=no + ;; +superux*) ac_cv_func_setitimer=no + ;; +*) LIBS="-lm $LIBS";; +esac +AC_CHECK_LIB(crypt, crypt) +AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV +AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX +AC_CHECK_LIB(socket, socketpair) # SunOS/Solaris +AC_CHECK_LIB(rt, clock_gettime) # GNU/Linux + +case "$target_cpu" in +alpha*) case "$target_os"::"$GCC" in + *::yes) CFLAGS="-mieee $CFLAGS" ;; # gcc + osf*) CFLAGS="-ieee $CFLAGS" ;; # ccc + esac ;; +esac + +ac_cv_header_net_socket_h=${ac_cv_header_net_socket_h=no} +if test "$ac_cv_header_net_socket_h" = yes; then + ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=no} +else + ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes} +fi + +dnl Checks for header files. +AC_HEADER_DIRENT +dnl AC_HEADER_STDC has been checked in AC_USE_SYSTEM_EXTENSIONS +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(limits.h sys/file.h sys/ioctl.h sys/syscall.h\ + fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ + syscall.h pwd.h grp.h a.out.h utime.h direct.h sys/resource.h \ + sys/mkdev.h sys/utime.h xti.h netinet/in_systm.h float.h ieeefp.h pthread.h \ + ucontext.h intrinsics.h langinfo.h locale.h sys/sendfile.h time.h \ + net/socket.h sys/socket.h) + +dnl Check additional types. +AC_CHECK_SIZEOF(rlim_t, 0, [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include + #endif + #ifdef HAVE_UNISTD_H + # include + #endif + #include +]) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T +AC_CHECK_SIZEOF(size_t, 0) +AC_CHECK_SIZEOF(ptrdiff_t, $ac_cv_sizeof_size_t) +AC_STRUCT_ST_BLKSIZE +AC_STRUCT_ST_BLOCKS +AC_STRUCT_ST_RDEV +AC_CHECK_MEMBERS([struct stat.st_atim]) +AC_CHECK_MEMBERS([struct stat.st_atimespec]) +AC_CHECK_MEMBERS([struct stat.st_atimensec]) +AC_CHECK_MEMBERS([struct stat.st_mtim]) +AC_CHECK_MEMBERS([struct stat.st_mtimespec]) +AC_CHECK_MEMBERS([struct stat.st_mtimensec]) +AC_CHECK_MEMBERS([struct stat.st_ctim]) +AC_CHECK_MEMBERS([struct stat.st_ctimespec]) +AC_CHECK_MEMBERS([struct stat.st_ctimensec]) + +AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H +@%:@include +@%:@endif]) + +AC_CHECK_TYPE(fd_mask, [AC_DEFINE(HAVE_RB_FD_INIT, 1)]) + +dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES] +AC_DEFUN([RUBY_DEFINT], [dnl +AC_CACHE_CHECK([for $1], [rb_cv_type_$1], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4]) +typedef $1 t; int s = sizeof(t) == 42;])], + [rb_cv_type_$1=yes], + [case m4_bmatch([$2], [^[1-9][0-9]*$], $2, [$ac_cv_sizeof_]AS_TR_SH($2)) in + "1") rb_cv_type_$1="m4_if([$3], [], [signed ], [$3 ])char";; + "$ac_cv_sizeof_short") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])short";; + "$ac_cv_sizeof_int") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])int";; + "$ac_cv_sizeof_long") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long";; + "$ac_cv_sizeof_long_long") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long long";; + "$ac_cv_sizeof___int64") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int64";; + *) rb_cv_type_$1=no;; + esac])]) +if test "${rb_cv_type_$1}" != no; then + AC_DEFINE([HAVE_]AS_TR_CPP($1), 1) + test "${rb_cv_type_$1}" = yes || AC_DEFINE_UNQUOTED($1, [$rb_cv_type_$1]) +fi +]) + +RUBY_DEFINT(int8_t, 1) +RUBY_DEFINT(uint8_t, 1, unsigned) +RUBY_DEFINT(int16_t, 2) +RUBY_DEFINT(uint16_t, 2, unsigned) +RUBY_DEFINT(int32_t, 4) +RUBY_DEFINT(uint32_t, 4, unsigned) +RUBY_DEFINT(int64_t, 8) +RUBY_DEFINT(uint64_t, 8, unsigned) +RUBY_DEFINT(int128_t, 16) +RUBY_DEFINT(uint128_t, 16, unsigned) +RUBY_DEFINT(intptr_t, void*) +RUBY_DEFINT(uintptr_t, void*, unsigned) +RUBY_DEFINT(ssize_t, size_t) dnl may differ from int, so not use AC_TYPE_SSIZE_T. + +AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address, +[rb_cv_stack_end_address=no +for addr in __libc_stack_end _SEND; do + AC_TRY_LINK( + [extern void *$addr;], + [if (!$addr) return 1;], + [rb_cv_stack_end_address="$addr"; break]) +done]) +if test $rb_cv_stack_end_address != no; then + AC_DEFINE_UNQUOTED(STACK_END_ADDRESS, $rb_cv_stack_end_address) +fi + +dnl Checks for library functions. +AC_TYPE_GETGROUPS +AC_TYPE_SIGNAL +case "${target_cpu}-${target_os}" in +powerpc-darwin*) + AC_LIBSOURCES(alloca.c) + AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}]) + AC_DEFINE(C_ALLOCA) + AC_DEFINE_UNQUOTED(alloca, alloca) + ;; +*) + AC_FUNC_ALLOCA + ;; +esac +AC_FUNC_MEMCMP + +# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html +# Debian GNU/Linux Etch's libc6.1 2.3.6.ds1-13etch5 has this problem. +# Debian GNU/Linux Lenny's libc6.1 2.7-10 has no problem. +AC_CACHE_CHECK(for broken erfc of glibc-2.3.6 on IA64, rb_cv_broken_glibc_ia64_erfc, + [AC_TRY_RUN([ +#include +int +main() +{ + erfc(10000.0); + return 0; +} +], + rb_cv_broken_glibc_ia64_erfc=no, + rb_cv_broken_glibc_ia64_erfc=yes, + rb_cv_broken_glibc_ia64_erfc=no)]) +case $rb_cv_broken_glibc_ia64_erfc in + yes) ac_cv_func_erf=no;; +esac + +AC_REPLACE_FUNCS(dup2 memmove strerror\ + strchr strstr crypt flock vsnprintf\ + isnan finite isinf hypot acosh erf tgamma lgamma_r cbrt \ + strlcpy strlcat) +AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd eaccess\ + truncate ftruncate chsize times utimes utimensat fcntl lockf lstat\ + link symlink readlink\ + setitimer setruid seteuid setreuid setresuid setproctitle socketpair\ + setrgid setegid setregid setresgid issetugid pause lchown lchmod\ + getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\ + getpriority getrlimit setrlimit sysconf group_member\ + dlopen sigprocmask sigaction sigsetjmp _setjmp _longjmp snprintf\ + setsid telldir seekdir fchmod cosh sinh tanh log2 round signbit\ + setuid setgid daemon select_large_fdset setenv unsetenv\ + mktime timegm gmtime_r clock_gettime gettimeofday\ + pread sendfile shutdown sigaltstack) + +AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp, +[AC_TRY_LINK([@%:@include + jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);}], + [__builtin_setjmp(jb);], + [ac_cv_func___builtin_setjmp=yes], + [ac_cv_func___builtin_setjmp=no]) +]) + +test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no + +AC_MSG_CHECKING(for setjmp type) +AC_ARG_WITH(setjmp-type, + [ --with-setjmp-type select setjmp type], [ + case $withval in + __builtin_setjmp) setjmp_prefix=__builtin_;; + _setjmp) setjmp_prefix=_;; + sigsetjmp) setjmp_prefix=sig;; + setjmp) setjmp_prefix=;; + '') unset setjmp_prefix;; + *) AC_MSG_ERROR(invalid setjmp type: $withval);; + esac], [unset setjmp_prefix]) +if test ${setjmp_prefix+set}; then + if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp = no; then + AC_MSG_ERROR(${setjmp_prefix}setjmp is not available) + fi +elif test "$ac_cv_func___builtin_setjmp" = yes; then + setjmp_prefix=__builtin_ +elif test "$ac_cv_func__setjmp" = yes; then + setjmp_prefix=_ +elif test "$ac_cv_func_sigsetjmp" = yes; then + case $target_os in + solaris*|cygwin*) + setjmp_prefix=;; + *) + setjmp_prefix=sig;; + esac +else + setjmp_prefix= +fi +if test x$setjmp_prefix = xsig; then + setjmp_sigmask=yes +else + unset setjmp_sigmask +fi +AC_MSG_RESULT(${setjmp_prefix}setjmp) +AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp(env${setjmp_sigmask+,0})]) +AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp(env,val)]) +AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf) + +AC_ARG_ENABLE(setreuid, + [ --enable-setreuid use setreuid()/setregid() according to need even if obsolete.], + [use_setreuid=$enableval]) +if test "$use_setreuid" = yes; then + AC_DEFINE(USE_SETREUID) + AC_DEFINE(USE_SETREGID) +fi +AC_STRUCT_TIMEZONE +AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff, + [AC_TRY_COMPILE([#include ], + [struct tm t; t.tm_gmtoff = 3600;], + [rb_cv_member_struct_tm_tm_gmtoff=yes], + [rb_cv_member_struct_tm_tm_gmtoff=no])]) +if test "$rb_cv_member_struct_tm_tm_gmtoff" = yes; then + AC_DEFINE(HAVE_STRUCT_TM_TM_GMTOFF) +fi +AC_CACHE_CHECK(for external int daylight, rb_cv_have_daylight, + [AC_TRY_LINK([#include + int i;], + [i = daylight;], + rb_cv_have_daylight=yes, + rb_cv_have_daylight=no)]) +if test "$rb_cv_have_daylight" = yes; then + AC_DEFINE(HAVE_DAYLIGHT) +fi +AC_DEFUN([RUBY_CHECK_VARTYPE], [dnl +AC_CACHE_CHECK([for external $1], rb_cv_var_$1, + [rb_cv_var_$1=no + AC_TRY_COMPILE([ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +$2 +; +const volatile void *volatile t;], + [t = &(&$1)[0];], + [for t in $3; do + AC_TRY_COMPILE([ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif +$2 +; +extern $t $1; +const volatile void *volatile t;], + [t = &(&$1)[0];], + [rb_cv_var_$1=$t; break]) + done])]) +if test "[$rb_cv_var_]$1" != no; then + AC_DEFINE([HAVE_VAR_]m4_toupper($1)) + AC_DEFINE_UNQUOTED([TYPEOF_VAR_]m4_toupper($1), $rb_cv_var_$1) +fi]) +RUBY_CHECK_VARTYPE(timezone, [@%:@include ], [long int]) +RUBY_CHECK_VARTYPE(altzone, [@%:@include ], [long int]) +AC_CHECK_FUNCS(timezone) +if test "$ac_cv_func_timezone" = yes; then + AC_CACHE_CHECK([whether timezone requires zero arguments], rb_cv_func_timezone_void, + [AC_TRY_COMPILE([@%:@include ], + [(void)timezone(0, 0);], + [rb_cv_func_timezone_void=no], + [rb_cv_func_timezone_void=yes])] + ) + if test $rb_cv_func_timezone_void = yes; then + AC_DEFINE(TIMEZONE_VOID) + fi +fi + +AC_CACHE_CHECK(for negative time_t for gmtime(3), rb_cv_negative_time_t, + [AC_TRY_RUN([ +#include + +void +check(tm, y, m, d, h, s) + struct tm *tm; + int y, m, d, h, s; +{ + if (!tm || + tm->tm_year != y || + tm->tm_mon != m-1 || + tm->tm_mday != d || + tm->tm_hour != h || + tm->tm_sec != s) { + exit(1); + } +} + +int +main() +{ + time_t t = -1; + struct tm *tm; + + check(gmtime(&t), 69, 12, 31, 23, 59); + t = ~(time_t)0 << 31; + check(gmtime(&t), 1, 12, 13, 20, 52); + return 0; +} +], + rb_cv_negative_time_t=yes, + rb_cv_negative_time_t=no, + rb_cv_negative_time_t=yes)]) +if test "$rb_cv_negative_time_t" = yes; then + AC_DEFINE(NEGATIVE_TIME_T) +fi + +if test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = yes; then + AC_DEFINE(POSIX_SIGNAL) +else + AC_CHECK_FUNCS(sigsetmask) + AC_CACHE_CHECK(for BSD signal semantics, rb_cv_bsd_signal, + [AC_TRY_RUN([ +#include +#include + +void +sig_handler(dummy) + int dummy; +{ +} + +int +main() +{ + signal(SIGINT, sig_handler); + kill(getpid(), SIGINT); + kill(getpid(), SIGINT); + return 0; +} +], + rb_cv_bsd_signal=yes, + rb_cv_bsd_signal=no, + rb_cv_bsd_signal=$ac_cv_func_sigsetmask)]) + if test "$rb_cv_bsd_signal" = yes; then + AC_DEFINE(BSD_SIGNAL) + fi +fi + +AC_FUNC_GETPGRP +AC_FUNC_SETPGRP + +AC_C_BIGENDIAN +AC_C_CONST +AC_C_CHAR_UNSIGNED +AC_C_INLINE +AC_C_VOLATILE + +if test x"$target_cpu" = xia64; then + AC_LIBOBJ([ia64]) + AC_CACHE_CHECK(for __libc_ia64_register_backing_store_base, + rb_cv___libc_ia64_register_backing_store_base, + [rb_cv___libc_ia64_register_backing_store_base=no + AC_TRY_LINK( + [extern unsigned long __libc_ia64_register_backing_store_base;], + [unsigned long p = __libc_ia64_register_backing_store_base; + printf("%ld\n", p);], + [rb_cv___libc_ia64_register_backing_store_base=yes])]) + if test $rb_cv___libc_ia64_register_backing_store_base = yes; then + AC_DEFINE(HAVE___LIBC_IA64_REGISTER_BACKING_STORE_BASE) + fi +fi + +AC_CACHE_CHECK(whether right shift preserve sign bit, rb_cv_rshift_sign, + [AC_COMPILE_IFELSE(AC_LANG_BOOL_COMPILE_TRY([], [(-1==(-1>>1))]), + rb_cv_rshift_sign=yes, + rb_cv_rshift_sign=no)]) +if test "$rb_cv_rshift_sign" = yes; then + AC_DEFINE(RSHIFT(x,y), ((x)>>(int)y)) +else + AC_DEFINE(RSHIFT(x,y), (((x)<0) ? ~((~(x))>>y) : (x)>>y)) +fi + +AC_MSG_CHECKING(read count field in FILE structures) +AC_CACHE_VAL(rb_cv_fcnt, +[for fcnt in dnl + _cnt dnl + __cnt dnl + _r dnl + readCount dnl + _rcount dnl for emx0.9c +; do + AC_TRY_COMPILE([#include +], + [FILE *f = stdin; f->$fcnt = 0;], + rb_cv_fcnt="$fcnt"; break, + rb_cv_fcnt="not found") +done]) +if test "$rb_cv_fcnt" = "not found"; then + AC_MSG_RESULT([not found(OK if using GNU libc)]) +else + AC_MSG_RESULT($rb_cv_fcnt) + AC_DEFINE_UNQUOTED(FILE_COUNT, $rb_cv_fcnt) +fi + +AC_MSG_CHECKING(read buffer ptr field in FILE structures) +AC_CACHE_VAL(rb_cv_frptr, +[for frptr in dnl + _IO_read_ptr dnl + _ptr dnl + __ptr dnl + bufpos dnl + _p dnl + __bufpos dnl +; do + AC_TRY_COMPILE([#include +], + [FILE *f = stdin; char buf[256]; f->$frptr = buf;], + rb_cv_frptr="$frptr"; break, + rb_cv_frptr="not found") +done]) +if test "$rb_cv_frptr" = "not found"; then + AC_MSG_RESULT([not found]) +else + AC_MSG_RESULT($rb_cv_frptr) + AC_DEFINE_UNQUOTED(FILE_READPTR, $rb_cv_frptr) + + if test "$rb_cv_fcnt" = "not found"; then + AC_MSG_CHECKING(read buffer end field in FILE structures) + AC_CACHE_VAL(rb_cv_frend, + [for frend in dnl + _IO_read_end dnl + bufread dnl + __bufread dnl + ; do + AC_TRY_COMPILE([#include + ], + [FILE *f = stdin; char buf[256]; f->$frend = buf;], + rb_cv_frend="$frend"; break, + rb_cv_frend="not found") + done]) + if test "$rb_cv_frend" = "not found"; then + AC_MSG_RESULT([not found]) + else + AC_MSG_RESULT($rb_cv_frend) + AC_DEFINE_UNQUOTED(FILE_READEND, $rb_cv_frend) + fi + fi +fi + +AC_CACHE_CHECK([whether st_ino is huge], rb_cv_huge_st_ino, +[AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([ +#include +struct stat test_stat; +], [sizeof(test_stat.st_ino)>sizeof(long)])], +rb_cv_huge_st_ino=yes, +rb_cv_huge_st_ino=no) +]) +if test $rb_cv_huge_st_ino = yes; then + AC_DEFINE(HUGE_ST_INO) +fi + +if test "$ac_cv_func_sysconf" = yes; then + AC_DEFUN([RUBY_CHECK_SYSCONF], [dnl + AC_CACHE_CHECK([whether _SC_$1 is supported], rb_cv_have_sc_[]m4_tolower($1), + [AC_TRY_COMPILE([#include + ], + [_SC_$1 >= 0], + rb_cv_have_sc_[]m4_tolower($1)=yes, + rb_cv_have_sc_[]m4_tolower($1)=no) + ]) + if test "$rb_cv_have_sc_[]m4_tolower($1)" = yes; then + AC_DEFINE(HAVE__SC_$1) + fi + ]) + RUBY_CHECK_SYSCONF(CLK_TCK) +fi + +case "$target_cpu" in +m68*|i?86|ia64|sparc*|alpha*) rb_cv_stack_grow_dir=-1;; +hppa*) rb_cv_stack_grow_dir=+1;; +esac +AC_CACHE_CHECK(stack growing direction, rb_cv_stack_grow_dir, + [AC_TRY_RUN([ +/* recurse to get rid of inlining */ +static int +stack_growup_p(addr, n) + volatile int *addr, n; +{ + volatile int end; + if (n > 0) + return *addr = stack_growup_p(addr, n - 1); + else + return (&end > addr); +} +int main() +{ + int x; + return stack_growup_p(&x, 10); +} +], rb_cv_stack_grow_dir=-1, rb_cv_stack_grow_dir=+1, rb_cv_stack_grow_dir=0)]) +AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $rb_cv_stack_grow_dir) + +if test x"$enable_pthread" = xyes; then + for pthread_lib in thr pthread pthreads c c_r root; do + AC_CHECK_LIB($pthread_lib, pthread_kill, + rb_with_pthread=yes, rb_with_pthread=no) + if test "$rb_with_pthread" = "yes"; then break; fi + done + if test x"$rb_with_pthread" = xyes; then + AC_DEFINE(_REENTRANT) + AC_DEFINE(_THREAD_SAFE) + AC_DEFINE(HAVE_LIBPTHREAD) + case $pthread_lib in + c) + ;; + root) + ;; + c_r) + MAINLIBS="-pthread $MAINLIBS" + ;; + *) + LIBS="-l$pthread_lib $LIBS" + ;; + esac + else + AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled") + fi + AC_CHECK_FUNCS(nanosleep sched_yield pthread_attr_setinheritsched) + if test x"$ac_cv_func_nanosleep" = xno; then + AC_CHECK_LIB(rt, nanosleep) + if test x"$ac_cv_lib_rt_nanosleep" = xyes; then + AC_DEFINE(HAVE_NANOSLEEP) + fi + fi +fi +if test x"$ac_cv_header_ucontext_h" = xyes; then + if test x"$rb_with_pthread" = xyes; then + AC_CHECK_FUNCS(getcontext setcontext) + fi +fi + +if test "$ac_cv_func_fork" = "yes" -a "$rb_with_pthread" = "yes"; then + AC_CACHE_CHECK([if fork works with pthread], rb_cv_fork_with_pthread, + [AC_TRY_RUN([ +#include +#include +#include +#include +#include +#include +#include +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + +void * +thread_func(void *dmy) +{ + return dmy; +} + +int +use_threads(void) +{ + pthread_t tid; + if (pthread_create(&tid, 0, thread_func, 0) != 0) { + return -1; + } + if (pthread_join(tid, 0) != 0) { + return -1; + } + return 0; +} + +int +main(int argc, char *argv[]) +{ + pid_t pid; + if (use_threads()) return EXIT_FAILURE; + pid = fork(); + + if (pid) { + int loc; + sleep(1); + if (waitpid(pid, &loc, WNOHANG) == 0) { + kill(pid, SIGKILL); + return EXIT_FAILURE; + } + } + else { + if (use_threads()) return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +}], + rb_cv_fork_with_pthread=yes, + rb_cv_fork_with_pthread=no, + rb_cv_fork_with_pthread=yes)]) + test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD) +fi + +AC_CHECK_FUNCS(backtrace) + +AC_ARG_WITH(valgrind, + [ --with-valgrind enable valgrind memcheck support.], + [AC_CHECK_HEADERS(valgrind/memcheck.h)]) + +dnl wheather use dln_a_out or not +AC_ARG_WITH(dln-a-out, + [ --with-dln-a-out use dln_a_out if possible], [ + case $withval in + dnl ( + yes) + if test "$enable_shared" = yes; then + AC_MSG_ERROR(dln_a_out can not make shared library) + fi + with_dln_a_out=yes;; + dnl ( + *) with_dln_a_out=no;; + esac], [with_dln_a_out=no]) + +AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf, +[AC_TRY_LINK([],[], [ +case "`head -1 conftest$EXEEXT | cat -e`" in +dnl ( +'^?ELF'*) + rb_cv_binary_elf=yes;; +dnl ( +*) + rb_cv_binary_elf=no;; +esac], +rb_cv_binary_elf=no)]) + +if test "$rb_cv_binary_elf" = yes; then + AC_DEFINE(USE_ELF) + if test "$with_dln_a_out" = yes; then + AC_MSG_ERROR(dln_a_out does not work with ELF) + fi +fi + +case "$target_os" in +linux* | gnu* | k*bsd*-gnu | bsdi*) + if test "$rb_cv_binary_elf" = no; then + with_dln_a_out=yes + else + LDFLAGS="$LDFLAGS -rdynamic" + fi;; +esac +LIBEXT=a + +AC_SUBST(DLDFLAGS)dnl +AC_SUBST(ARCH_FLAG)dnl + +AC_SUBST(STATIC)dnl +AC_SUBST(CCDLFLAGS)dnl +AC_SUBST(LDSHARED)dnl +AC_SUBST(LDSHAREDXX)dnl +AC_SUBST(DLEXT)dnl +AC_SUBST(DLEXT2)dnl +AC_SUBST(LIBEXT)dnl + +STATIC= +: ${PATHFLAG=''} + +if test "$with_dln_a_out" != yes; then + rb_cv_dlopen=unknown + AC_MSG_CHECKING(whether OS depend dynamic link works) + if test "$GCC" = yes; then + case "$target_os" in + nextstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + openstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + rhapsody*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + darwin*) CCDLFLAGS="$CCDLFLAGS -fno-common";; + human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) ;; + *) CCDLFLAGS="$CCDLFLAGS -fPIC";; + esac + else + case "$target_os" in + hpux*) CCDLFLAGS="$CCDLFLAGS +Z";; + solaris*|irix*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;; + sunos*) CCDLFLAGS="$CCDLFLAGS -PIC" ;; + esix*|uxpds*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;; + *) : ${CCDLFLAGS=""} ;; + esac + fi + + + AC_ARG_ENABLE(rpath, + [ --disable-rpath embed run path into extension libraries.], + [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"]) + if test "$enable_rpath" = yes; then + RPATHFLAG=" ${linker_flag}-R%1\$-s" + fi + + case "$target_os" in + hpux*) DLDFLAGS="$DLDFLAGS -E" + : ${LDSHARED='ld -b'} + XLDFLAGS="$XLDFLAGS -Wl,-E" + : ${LIBPATHENV=SHLIB_PATH} + if test "$rb_cv_prog_gnu_ld" = no; then + RPATHFLAG=' +b %1$-s' + fi + rb_cv_dlopen=yes;; + solaris*) if test "$GCC" = yes; then + : ${LDSHARED='$(CC) -shared'} + if test "$rb_cv_prog_gnu_ld" = yes; then + LDFLAGS="$LDFLAGS -Wl,-E" + fi + else + : ${LDSHARED='ld -G'} + fi + rb_cv_dlopen=yes;; + sunos*) : ${LDSHARED='ld -assert nodefinitions'} + rb_cv_dlopen=yes;; + irix*) : ${LDSHARED='ld -shared'} + rb_cv_dlopen=yes;; + sysv4*) : ${LDSHARED='ld -G'} + rb_cv_dlopen=yes;; + nto-qnx*) : ${LDSHARED="qcc -shared"} + rb_cv_dlopen=yes ;; + esix*|uxpds*) : ${LDSHARED="ld -G"} + rb_cv_dlopen=yes ;; + osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""} + rb_cv_dlopen=yes ;; + bsdi3*) case "$CC" in + *shlicc*) : ${LDSHARED="$CC -r"} + rb_cv_dlopen=yes ;; + esac ;; + linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi*) + : ${LDSHARED='${CC} -shared'} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + fi + rb_cv_dlopen=yes ;; + interix*) : ${LDSHARED="$CC -shared"} + XLDFLAGS="$XLDFLAGS -Wl,-E" + LIBPATHFLAG=" -L%1\$-s" + rb_cv_dlopen=yes ;; + freebsd*|dragonfly*) : ${LDSHARED="$CC -shared"} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -rdynamic" + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)' + else + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable" + fi + rb_cv_dlopen=yes ;; + openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-E" + fi + rb_cv_dlopen=yes ;; + nextstep*) : ${LDSHARED='cc -r -nostdlib'} + LDFLAGS="$LDFLAGS -u libsys_s" + rb_cv_dlopen=yes ;; + openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'} + : ${LDFLAGS=""} + rb_cv_dlopen=yes ;; + rhapsody*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'} + : ${LDFLAGS=""} + rb_cv_dlopen=yes ;; + darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'} + : ${LDFLAGS=""} + : ${LIBPATHENV=DYLD_LIBRARY_PATH} + rb_cv_dlopen=yes ;; + aix*) if test "$GCC" = yes; then + : ${LDSHARED='$(CC) -shared'} + else + : ${LDSHARED='$(CC)'} + fi + LDSHARED="$LDSHARED ${linker_flag}-G" + DLDFLAGS='-eInit_$(TARGET)' + XLDFLAGS="${linker_flag}-bE:ruby.imp ${linker_flag}-brtl" + XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}" + : ${ARCHFILE="ruby.imp"} + TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)' + TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)' + : ${LIBPATHENV=SHLIB_PATH} + RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s" + rb_cv_dlopen=yes ;; + human*) : ${DLDFLAGS=''} + : ${LDSHARED=''} + : ${LDFLAGS=''} + : ${LINK_SO='ar cru $@ $(OBJS)'} + rb_cv_dlopen=yes ;; + beos*) case "$target_cpu" in + powerpc*) + : ${LDSHARED="ld -xms"} + DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + LDFLAGS="$LDFLAGS -L/boot/home/config/lib -lbe -lroot" + ;; + i586*) + : ${LDSHARED="ld -shared"} + DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lbe -lroot" + LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lbe -lroot" + ;; + esac + : ${LIBPATHENV=LIBRARY_PATH} + rb_cv_dlopen=yes ;; + haiku*) case "$target_cpu" in + powerpc*) + : ${LDSHARED="ld -xms"} + DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + ;; + i586*) + : ${LDSHARED="ld -shared"} + DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot" + ;; + esac + : ${LIBPATHENV=LIBRARY_PATH} + rb_cv_dlopen=yes ;; + nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib" + : ${LDSHARED='ld -Bshareable -x'} + LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib" + rb_cv_dlopen=yes;; + cygwin*|mingw*) : ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'} + XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import" + DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all" + : ${LIBPATHENV=""} + rb_cv_dlopen=yes ;; + hiuxmpp) : ${LDSHARED='ld -r'} ;; + atheos*) : ${LDSHARED="$CC -shared"} + rb_cv_dlopen=yes ;; + os2-emx*) LDFLAGS="$LDFLAGS -Zomf" + ;; + *) : ${LDSHARED='ld'} ;; + esac + AC_MSG_RESULT($rb_cv_dlopen) +fi +if test "${LDSHAREDXX}" = ""; then + case "${LDSHARED}" in + *'$(CC)'*) + LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\$(CC)/$(CXX)/'` + ;; + *'${CC}'*) + LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\${CC}/${CXX}/'` + ;; + *$CC*) + LDSHAREDXX=`echo "${LDSHARED}" | sed "s|$CC|$CXX|"` + ;; + ld" "*) + ;; + esac +fi +case ${RPATHFLAG} in +*'%1$'*) + : ${LIBPATHFLAG=' -L%1$-s'};; +*) + : ${LIBPATHFLAG=' -L%s'};; +esac + +AC_SUBST(LINK_SO) +AC_SUBST(LIBPATHFLAG) +AC_SUBST(RPATHFLAG) +AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}") +AC_SUBST(TRY_LINK) + +dln_a_out_works=no +if test "$ac_cv_header_a_out_h" = yes; then + if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then + cat confdefs.h > config.h + AC_CACHE_CHECK(whether matz's dln works, rb_cv_dln_a_out, + [AC_TRY_COMPILE([ +#define USE_DLN_A_OUT +#include "dln.c" +], + [], + rb_cv_dln_a_out=yes, + rb_cv_dln_a_out=no)]) + if test "$rb_cv_dln_a_out" = yes; then + dln_a_out_works=yes + AC_DEFINE(USE_DLN_A_OUT) + fi + fi +fi + +if test "$dln_a_out_works" = yes; then + if test "$GCC" = yes; then + STATIC=-static + else + STATIC=-Bstatic + fi + DLEXT=so + CCDLFLAGS= +else + case "$target_os" in + hpux*) DLEXT=sl;; + nextstep*) DLEXT=bundle;; + openstep*) DLEXT=bundle;; + rhapsody*) DLEXT=bundle;; + darwin*) DLEXT=bundle;; + os2-emx*) DLEXT=dll;; + cygwin*|mingw*) DLEXT=so;; + *) DLEXT=so;; + esac +fi +len=2 # .rb +n=`expr "$DLEXT" : '.*'`; test "$n" -gt "$len" && len=$n +n=`expr "$DLEXT2" : '.*'`; test "$n" -gt "$len" && len=$n +AC_DEFINE_UNQUOTED(DLEXT_MAXLEN, `expr $len + 1`) +test ".$DLEXT" = "." || AC_DEFINE_UNQUOTED(DLEXT, ".$DLEXT") +test ".$DLEXT2" = "." || AC_DEFINE_UNQUOTED(DLEXT2, ".$DLEXT2") +AC_SUBST(DLEXT) + +AC_SUBST(STRIP)dnl +if test "$with_dln_a_out" = yes; then + STRIP=true +else + STRIP=strip +fi + +case "$target_os" in + linux* | gnu* | k*bsd*-gnu) + STRIP='strip -S -x';; + nextstep*) + STRIP='strip -A -n';; + openstep*) + STRIP='strip -A -n';; + rhapsody*) + STRIP='strip -A -n';; + darwin*) + STRIP='strip -A -n';; +esac + +EXTSTATIC= +AC_SUBST(EXTSTATIC)dnl +AC_ARG_WITH(static-linked-ext, + [ --with-static-linked-ext link external modules statically], + [case $withval in + yes) STATIC= + EXTSTATIC=static;; + *) ;; + esac]) + +case "$target_os" in + human*) + AC_CHECK_LIB(signal, _harderr) + AC_CHECK_LIB(hmem, hmemset) + AC_CHECK_FUNCS(select) + AC_CACHE_CHECK(whether PD libc _dtos18 fail to convert big number, + rb_cv_missing__dtos18, + [AC_TRY_RUN( +changequote(<<, >>)dnl +<< +#include +int +main() +{ + char buf[256]; + sprintf(buf, "%g", 1e+300); + return (strcmp (buf, "1e+300") ? 0 : 1); +} +>>, +changequote([, ])dnl +rb_cv_missing__dtos18=yes, rb_cv_missing__dtos18=no, rb_cv_missing__dtos18=no)]) + if test "$rb_cv_missing__dtos18" = yes; then + AC_DEFINE(MISSING__DTOS18) + fi + AC_CACHE_CHECK(whether PD libc fconvert fail to round, + rb_cv_missing_fconvert, + [AC_TRY_RUN( +changequote(<<, >>)dnl +<< +#include +#include +int +main() +{ + char buf[256]; + sprintf(buf, "%f", log(exp(1.0))); + return (strcmp (buf, "1.000000") ? 0 : 1); +} +>>, +changequote([, ])dnl +rb_cv_missing_fconvert=yes, rb_cv_missing_fconvert=no, rb_cv_missing_fconvert=no)]) + if test "$rb_cv_missing_fconvert" = yes; then + AC_DEFINE(MISSING_FCONVERT) + fi + AC_LIBOBJ([x68.o]) + CFLAGS="$CFLAGS -fansi-only" + XCFLAGS="$XCFLAGS -cc1-stack=262144 -cpp-stack=2694144" + EXEEXT=.x + OBJEXT=o + setup=Setup.x68 + ;; + dnl OS/2 environment w/ Autoconf 2.1x for EMX + os2-emx) + AC_LIBOBJ([os2]) + setup=Setup.emx + ;; + *djgpp*) + setup=Setup.dj + ;; + *) + setup=Setup + ;; +esac + +AC_SUBST(setup) + +if test "$prefix" = NONE; then + prefix=$ac_default_prefix +fi + +#if test "$fat_binary" != no ; then +# CFLAGS="$CFLAGS $ARCH_FLAG" +#fi + +if test x"$cross_compiling" = xyes; then + test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake" + PREP=fake.rb + RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`' +else + MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib' + MINIRUBY="$MINIRUBY"' -I$(EXTOUT)/common -I./- -r$(srcdir)/ext/purelib.rb' + PREP='miniruby$(EXEEXT)' + RUNRUBY='$(MINIRUBY) $(srcdir)/runruby.rb --extout=$(EXTOUT)' +fi +AC_SUBST(MINIRUBY) +AC_SUBST(PREP) +AC_SUBST(RUNRUBY) +AC_SUBST(EXTOUT, [${EXTOUT=.ext}]) + +FIRSTMAKEFILE="" +LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' +LIBRUBY='$(LIBRUBY_A)' +LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static' +LIBRUBYARG='$(LIBRUBYARG_STATIC)' +SOLIBS= + +case "$target_os" in + cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*) + : ${DLDLIBS=""} + ;; + *) + DLDLIBS="$DLDLIBS -lc" + ;; +esac + +RUBY_SO_NAME='$(RUBY_INSTALL_NAME)' +LIBRUBY_LDSHARED=$LDSHARED +LIBRUBY_DLDFLAGS=$DLDFLAGS +LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY)' +LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so' +ENABLE_SHARED=no + +AC_ARG_ENABLE(shared, + [ --enable-shared build a shared library for Ruby. ], + [enable_shared=$enableval]) +LIBRUBYARG_SHARED='-l$(RUBY_SO_NAME)' +if test "$enable_shared" = 'yes'; then + LIBRUBY='$(LIBRUBY_SO)' + LIBRUBYARG='$(LIBRUBYARG_SHARED)' + CFLAGS="$CFLAGS $CCDLFLAGS" + ENABLE_SHARED=yes + if test "$rb_cv_binary_elf" = yes; then + SOLIBS='$(LIBS)' + fi + case "$target_os" in + sunos4*) + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + ;; + linux* | gnu* | k*bsd*-gnu | atheos*) + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + ;; + freebsd*|dragonfly*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' + if test "$rb_cv_binary_elf" != "yes" ; then + LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)" + LIBRUBY_ALIASES='' + fi + ;; + netbsd*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)' + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)' + if test "$rb_cv_binary_elf" = yes; then # ELF platforms + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so' + else # a.out platforms + LIBRUBY_ALIASES="" + fi + ;; + openbsd*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}` + ;; + solaris*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so' + if test "$GCC" = yes; then + LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)' + fi + XLDFLAGS="$XLDFLAGS "'-R${libdir}' + ;; + hpux*) + XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).sl' + ;; + aix*) + LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS" + LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' + SOLIBS='-lm -lc' + ;; + beos*) + case "$target_cpu" in + powerpc*) + LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o' + ;; + esac + ;; + darwin*) + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib' + LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace' + LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib' + ;; + interix*) + LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)' + ;; + *) + ;; + esac +fi +if test "$enable_rpath" = yes; then + LIBRUBY_RPATHFLAGS="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir)" + LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED" + LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC" +fi + +LDFLAGS="-L. $LDFLAGS" +AC_SUBST(ARCHFILE) + +dnl build rdoc index if requested +RDOCTARGET="" +AC_ARG_ENABLE(install-doc, + [ --disable-install-doc do not install rdoc indexes during install ], + [install_doc=$enableval], [install_doc=yes]) +if test "$install_doc" != no; then + RDOCTARGET="install-doc" +fi +AC_SUBST(RDOCTARGET) + +if test "$rb_with_pthread" = "yes"; then + THREAD_MODEL=pthread +fi +MINIDLNOBJ=dln.o +case "$target_os" in + linux*) + ;; + netbsd*) + CFLAGS="$CFLAGS -pipe" + ;; + nextstep*|openstep*) + # The -fno-common is needed if we wish to embed the Ruby interpreter + # into a plugin module of some project (as opposed to embedding it + # within the project's application). The -I/usr/local/include is + # needed because CPP as discovered by configure (cc -E -traditional) + # fails to consult /usr/local/include by default. This causes + # mkmf.rb's have_header() to fail if the desired resource happens to be + # installed in the /usr/local tree. + CFLAGS="$CFLAGS -pipe -fno-common" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + ;; + rhapsody*) + CFLAGS="$CFLAGS -pipe -no-precomp -fno-common" + ;; + darwin*) + CFLAGS="$CFLAGS -pipe -fno-common" + MINIDLNOBJ=dmydln.o + ;; + os2-emx) + CFLAGS="$CFLAGS -DOS2" + LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'` + LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'` + LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'` + ;; + osf*) + if test "$GCC" != "yes" ; then + # compile something small: taint.c is fine for this. + # the main point is the '-v' flag of 'cc'. + case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in + */gemc_cc*) # we have the new DEC GEM CC + CFLAGS="$CFLAGS -oldc" + ;; + *) # we have the old MIPS CC + ;; + esac + # cleanup + rm -f /tmp/main.o + CFLAGS="$CFLAGS -std" + fi + ;; + beos*) + case "$target_cpu" in + powerpc*) + CFLAGS="$CFLAGS -relax_pointers" + ;; + esac + CPPFLAGS="$CPPFLAGS -I/boot/home/config/include" + ;; + cygwin*|mingw*) + LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)' + case "$target_os" in + cygwin*) + if test x"$enable_shared" = xyes; then + LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}${TEENY}.dll + fi + ;; + mingw*) + RUBY_SO_NAME=${rb_cv_msvcrt}-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR}${TEENY} + if test x"$enable_shared" = xyes; then + LIBRUBY_SO='$(RUBY_SO_NAME)'.dll + LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)' + fi + AC_LIBOBJ([win32]) + COMMON_LIBS=m +# COMMON_MACROS="WIN32_LEAN_AND_MEAN=" + COMMON_HEADERS="winsock2.h windows.h" + THREAD_MODEL=win32 + ;; + esac + LIBRUBY_ALIASES='' + FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in + SOLIBS='$(LIBS)' + if test x"$enable_shared" = xyes; then + LIBRUBY='lib$(RUBY_SO_NAME).dll.a' + else + LIBRUBY_SO=dummy + LIBRUBY='lib$(RUBY_SO_NAME).a' + LIBRUBYARG='-l$(RUBY_SO_NAME)' + fi + MINIDLNOBJ=dmydln.o + ;; + hpux*) + case "$YACC" in + *yacc*) + XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300" + YACC="$YACC -Nl40000 -Nm40000" + ;; + esac + MINIDLNOBJ=dmydln.o + ;; + *msdosdjgpp*) + FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in + ;; + *) + ;; +esac +MINIOBJS="$MINIDLNOBJ" + +case "$FIRSTMAKEFILE" in +dnl ( +*GNUmakefile:*) + gnumake=yes + ;; +dnl ( +*) + AC_MSG_CHECKING([for if ${MAKE-make} is GNU make]) + mkdir conftest.dir + echo "all:; @echo yes" > conftest.dir/GNUmakefile + echo "all:; @echo no" > conftest.dir/Makefile + gnumake=`(cd conftest.dir; ${MAKE-make})` + rm -fr conftest.dir + case "$gnumake" in + dnl ( + *yes*) + echo "include Makefile" > GNUmakefile + echo "-include uncommon.mk" >> GNUmakefile + gnumake=yes;; + dnl ( + *) + gnumake=no;; + esac + AC_MSG_RESULT($gnumake) + ;; +esac + +CPPFLAGS="$CPPFLAGS "'$(DEFS)' +test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}' +cflagspat=`eval echo '"'"${cflags}"'"' | sed 's/[][|.*]/\\&/g'` +CFLAGS=`echo "$CFLAGS" | sed "s|$cflagspat"'|${cflags}|'` +cxxflagspat=`eval echo '"'"${cxxflags}"'"' | sed 's/[][|.*]/\\&/g'` +CXXFLAGS=`echo "$CXXFLAGS" | sed "s|$cxxflagspat"'|${cxxflags}|'` +AC_SUBST(cppflags, [])dnl +AC_SUBST(cflags, ['${optflags} ${debugflags} ${warnflags}'])dnl +AC_SUBST(optflags)dnl +AC_SUBST(debugflags)dnl +AC_SUBST(warnflags)dnl +AC_SUBST(XCFLAGS)dnl +AC_SUBST(XLDFLAGS)dnl +AC_SUBST(LIBRUBY_LDSHARED) +AC_SUBST(LIBRUBY_DLDFLAGS) +AC_SUBST(RUBY_INSTALL_NAME) +AC_SUBST(rubyw_install_name) +AC_SUBST(RUBYW_INSTALL_NAME) +AC_SUBST(RUBY_SO_NAME) +AC_SUBST(LIBRUBY_A) +AC_SUBST(LIBRUBY_SO) +AC_SUBST(LIBRUBY_ALIASES) +AC_SUBST(LIBRUBY) +AC_SUBST(LIBRUBYARG) +AC_SUBST(LIBRUBYARG_STATIC) +AC_SUBST(LIBRUBYARG_SHARED) +AC_SUBST(SOLIBS) +AC_SUBST(DLDLIBS) +AC_SUBST(ENABLE_SHARED) +AC_SUBST(MAINLIBS) +AC_SUBST(COMMON_LIBS) +AC_SUBST(COMMON_MACROS) +AC_SUBST(COMMON_HEADERS) +AC_SUBST(EXPORT_PREFIX) +AC_SUBST(MINIOBJS) +AC_SUBST(THREAD_MODEL) + +MAKEFILES="Makefile `echo $FIRSTMAKEFILE | sed 's/:.*//'`" +MAKEFILES="`echo $MAKEFILES`" +AC_SUBST(MAKEFILES) + +ri_prefix= +test "$program_prefix" != NONE && + ri_prefix=$program_prefix + +ri_suffix= +test "$program_suffix" != NONE && + ri_suffix=$program_suffix + +RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}" +case "$target_os" in + cygwin*|mingw*) + RUBYW_INSTALL_NAME="${ri_prefix}rubyw${ri_suffix}" + rubyw_install_name="$RUBYW_INSTALL_NAME" + ;; +esac +RUBY_LIB_PREFIX=`eval echo \\"${libdir}/${RUBY_INSTALL_NAME}\\"` + +AC_ARG_WITH(ruby-version, + [ --with-ruby-version=STR ruby version string for version specific directories [[full]] (full|minor|STR)], + [ruby_version=$withval], + [ruby_version=full]) +case "$ruby_version" in + full) + ruby_version="${MAJOR}.${MINOR}.${TEENY}" + ;; + minor) + ruby_version="${MAJOR}.${MINOR}" + ;; +esac + +AC_ARG_WITH(sitedir, + [ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]], + [sitedir=$withval], + [sitedir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby']) +SITE_DIR=`eval echo \\"${sitedir}\\"` + +AC_ARG_WITH(vendordir, + [ --with-vendordir=DIR vendor libraries in DIR [[LIBDIR/ruby/vendor_ruby]]], + [vendordir=$withval], + [vendordir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby']) +VENDOR_DIR=`eval echo \\"${vendordir}\\"` + +case "$target_os" in + cygwin*|mingw*|*djgpp*|os2-emx*) + RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + ;; + *) + RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + ;; +esac +RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${ruby_version}" +RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${ruby_version}" +RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${ruby_version}" + +AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") +AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") +AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") +AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH}") +AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}") + +AC_SUBST(arch)dnl +AC_SUBST(sitearch)dnl +AC_SUBST(ruby_version)dnl +AC_SUBST(sitedir)dnl +AC_SUBST(vendordir)dnl + +configure_args=$ac_configure_args +AC_SUBST(configure_args)dnl + +if test "$fat_binary" != no ; then + arch="fat-${target_os}" + + AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, + "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") + + AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, + "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") + AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB, + "${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") + AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}") +else + arch="${target_cpu}-${target_os}" + AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}") +fi + +case "$target_os" in + mingw*) sitearch="$target_cpu-$rb_cv_msvcrt" ;; + *) sitearch="${arch}" ;; +esac + +AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") +AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}") +AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH2}/${sitearch}") + +AC_ARG_WITH(search-path, + [ --with-search-path=DIR specify the additional search path], + [search_path=$withval]) +if test "$search_path" != ""; then + AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path") +fi + +AC_ARG_WITH(rubyhdrdir, + [ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]], + [rubyhdrdir=$withval], + [rubyhdrdir='${includedir}/${RUBY_INSTALL_NAME}-${ruby_version}']) + +AC_ARG_WITH(sitehdrdir, + [ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]], + [sitehdrdir=$withval], + [sitehdrdir='${rubyhdrdir}/site_ruby']) + +AC_ARG_WITH(vendorhdrdir, + [ --with-vendor-hdrdir=DIR core headers in DIR [INCLUDEDIR]], + [vendorhdrdir=$withval], + [vendorhdrdir='${rubyhdrdir}/vendor_ruby']) + +AC_SUBST(rubyhdrdir)dnl +AC_SUBST(sitehdrdir)dnl +AC_SUBST(vendorhdrdir)dnl + +AC_ARG_WITH(mantype, + [ --with-mantype=TYPE specify man page type; TYPE is one of man and doc], + [ + case "$withval" in + man|doc) + MANTYPE=$withval + ;; + *) + AC_MSG_ERROR(invalid man type: $withval) + ;; + esac + ]) +if test -z "$MANTYPE"; then + AC_PATH_PROGS(NROFF, nroff awf, /bin/false, "/usr/bin:/usr/ucb") + if ${NROFF} -mdoc ${srcdir}/man/ruby.1 >/dev/null 2>&1; then + MANTYPE=doc + else + MANTYPE=man + fi +fi +AC_SUBST(MANTYPE) + +arch_hdrdir="${EXTOUT}/include/${arch}/ruby" +$MAKEDIRS "${arch_hdrdir}" +config_h="${arch_hdrdir}/config.h" +if test -f "${config_h}" && tr -d '\015' < confdefs.h | cmp -s "${config_h}" -; then + echo "config.h unchanged" +else + echo "creating config.h" + tr -d '\015' < confdefs.h > "${config_h}" +fi +tr -d '\015' < largefile.h > confdefs.h +rm largefile.h + +BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \ + -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ + -e '}' "${srcdir}/enc/Makefile.in"`"] +BUILTIN_ENCOBJS= +for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done +AC_SUBST(BUILTIN_ENCOBJS) + +BUILTIN_TRANSES=["`sed -n -e '/^BUILTIN_TRANSES[ ]*=/{' \ + -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ + -e '}' "${srcdir}/enc/Makefile.in"`"] +BUILTIN_TRANSSRCS= +BUILTIN_TRANSOBJS= +for e in $BUILTIN_TRANSES; do + BUILTIN_TRANSSRCS="$BUILTIN_TRANSSRCS `basename $e .trans`"'.c'; + BUILTIN_TRANSOBJS="$BUILTIN_TRANSOBJS `basename $e .trans`"'.$(OBJEXT)'; +done +AC_SUBST(BUILTIN_TRANSSRCS) +AC_SUBST(BUILTIN_TRANSOBJS) + +AC_CONFIG_FILES($FIRSTMAKEFILE) +AC_CONFIG_FILES(Makefile, [{ + sed '/^MISSING/s/\$U\././g' Makefile + echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)' + test "$RUBY_INSTALL_NAME$EXEEXT" = ruby || echo 'ruby: $(PROGRAM);' + if test "$gnumake" != yes; then + echo ['$(MKFILES): $(srcdir)/common.mk'] + sed ['s/{\$([^(){}]*)[^{}]*}//g'] ${srcdir}/common.mk + else + echo 'distclean-local::; @$(RM) GNUmakefile uncommon.mk' + fi + } >> confmk$$.tmp && mv -f confmk$$.tmp Makefile], +[RUBY_INSTALL_NAME=$RUBY_INSTALL_NAME EXEEXT=$EXEEXT gnumake=$gnumake]) +AC_OUTPUT diff --git a/lib/ruby-1.9.1-rc1/cont.c b/lib/ruby-1.9.1-rc1/cont.c new file mode 100644 index 0000000..5b8a73c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/cont.c @@ -0,0 +1,1022 @@ +/********************************************************************** + + cont.c - + + $Author: yugui $ + created at: Thu May 23 09:03:43 2007 + + Copyright (C) 2007 Koichi Sasada + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "vm_core.h" +#include "gc.h" +#include "eval_intern.h" + +#define CAPTURE_JUST_VALID_VM_STACK 1 + +enum context_type { + CONTINUATION_CONTEXT = 0, + FIBER_CONTEXT = 1, + ROOT_FIBER_CONTEXT = 2 +}; + +typedef struct rb_context_struct { + enum context_type type; + VALUE self; + int argc; + VALUE value; + VALUE *vm_stack; +#ifdef CAPTURE_JUST_VALID_VM_STACK + int vm_stack_slen; /* length of stack (head of th->stack) */ + int vm_stack_clen; /* length of control frames (tail of th->stack) */ +#endif + VALUE *machine_stack; + VALUE *machine_stack_src; +#ifdef __ia64 + VALUE *machine_register_stack; + VALUE *machine_register_stack_src; + int machine_register_stack_size; +#endif + rb_thread_t saved_thread; + rb_jmpbuf_t jmpbuf; + int machine_stack_size; +} rb_context_t; + +enum fiber_status { + CREATED, + RUNNING, + TERMINATED +}; + +typedef struct rb_fiber_struct { + rb_context_t cont; + VALUE prev; + enum fiber_status status; + struct rb_fiber_struct *prev_fiber; + struct rb_fiber_struct *next_fiber; +} rb_fiber_t; + +static VALUE rb_cContinuation; +static VALUE rb_cFiber; +static VALUE rb_eFiberError; + +#define GetContPtr(obj, ptr) \ + Data_Get_Struct(obj, rb_context_t, ptr) + +#define GetFiberPtr(obj, ptr) do {\ + ptr = (rb_fiber_t*)DATA_PTR(obj);\ + if (!ptr) rb_raise(rb_eFiberError, "uninitialized fiber");\ +} while(0) + +NOINLINE(static VALUE cont_capture(volatile int *stat)); + +void rb_thread_mark(rb_thread_t *th); + +static void +cont_mark(void *ptr) +{ + RUBY_MARK_ENTER("cont"); + if (ptr) { + rb_context_t *cont = ptr; + rb_gc_mark(cont->value); + rb_thread_mark(&cont->saved_thread); + + if (cont->vm_stack) { +#ifdef CAPTURE_JUST_VALID_VM_STACK + rb_gc_mark_locations(cont->vm_stack, + cont->vm_stack + cont->vm_stack_slen + cont->vm_stack_clen); +#elif + rb_gc_mark_localtion(cont->vm_stack, + cont->vm_stack, cont->saved_thread.stack_size); +#endif + } + + if (cont->machine_stack) { + rb_gc_mark_locations(cont->machine_stack, + cont->machine_stack + cont->machine_stack_size); + } +#ifdef __ia64 + if (cont->machine_register_stack) { + rb_gc_mark_locations(cont->machine_register_stack, + cont->machine_register_stack + cont->machine_register_stack_size); + } +#endif + } + RUBY_MARK_LEAVE("cont"); +} + +static void +cont_free(void *ptr) +{ + RUBY_FREE_ENTER("cont"); + if (ptr) { + rb_context_t *cont = ptr; + RUBY_FREE_UNLESS_NULL(cont->saved_thread.stack); fflush(stdout); + RUBY_FREE_UNLESS_NULL(cont->machine_stack); +#ifdef __ia64 + RUBY_FREE_UNLESS_NULL(cont->machine_register_stack); +#endif + RUBY_FREE_UNLESS_NULL(cont->vm_stack); + + /* free rb_cont_t or rb_fiber_t */ + ruby_xfree(ptr); + } + RUBY_FREE_LEAVE("cont"); +} + +static void +fiber_mark(void *ptr) +{ + RUBY_MARK_ENTER("cont"); + if (ptr) { + rb_fiber_t *fib = ptr; + rb_gc_mark(fib->prev); + cont_mark(&fib->cont); + } + RUBY_MARK_LEAVE("cont"); +} + +static void +fiber_link_join(rb_fiber_t *fib) +{ + VALUE current_fibval = rb_fiber_current(); + rb_fiber_t *current_fib; + GetFiberPtr(current_fibval, current_fib); + + /* join fiber link */ + fib->next_fiber = current_fib->next_fiber; + fib->prev_fiber = current_fib; + current_fib->next_fiber->prev_fiber = fib; + current_fib->next_fiber = fib; +} + +static void +fiber_link_remove(rb_fiber_t *fib) +{ + fib->prev_fiber->next_fiber = fib->next_fiber; + fib->next_fiber->prev_fiber = fib->prev_fiber; +} + +static void +fiber_free(void *ptr) +{ + RUBY_FREE_ENTER("fiber"); + if (ptr) { + rb_fiber_t *fib = ptr; + + if (fib->cont.type != ROOT_FIBER_CONTEXT) { + st_free_table(fib->cont.saved_thread.local_storage); + } + fiber_link_remove(fib); + + cont_free(&fib->cont); + } + RUBY_FREE_LEAVE("fiber"); +} + +static void +cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont) +{ + int size; + rb_thread_t *sth = &cont->saved_thread; + + SET_MACHINE_STACK_END(&th->machine_stack_end); +#ifdef __ia64 + th->machine_register_stack_end = rb_ia64_bsp(); +#endif + + if (th->machine_stack_start > th->machine_stack_end) { + size = cont->machine_stack_size = th->machine_stack_start - th->machine_stack_end; + cont->machine_stack_src = th->machine_stack_end; + } + else { + size = cont->machine_stack_size = th->machine_stack_end - th->machine_stack_start; + cont->machine_stack_src = th->machine_stack_start; + } + + if (cont->machine_stack) { + REALLOC_N(cont->machine_stack, VALUE, size); + } + else { + cont->machine_stack = ALLOC_N(VALUE, size); + } + + FLUSH_REGISTER_WINDOWS; + MEMCPY(cont->machine_stack, cont->machine_stack_src, VALUE, size); + +#ifdef __ia64 + rb_ia64_flushrs(); + size = cont->machine_register_stack_size = th->machine_register_stack_end - th->machine_register_stack_start; + cont->machine_register_stack_src = th->machine_register_stack_start; + if (cont->machine_register_stack) { + REALLOC_N(cont->machine_register_stack, VALUE, size); + } + else { + cont->machine_register_stack = ALLOC_N(VALUE, size); + } + + MEMCPY(cont->machine_register_stack, cont->machine_register_stack_src, VALUE, size); +#endif + + sth->machine_stack_start = sth->machine_stack_end = 0; +#ifdef __ia64 + sth->machine_register_stack_start = sth->machine_register_stack_end = 0; +#endif +} + +static void +cont_init(rb_context_t *cont) +{ + rb_thread_t *th = GET_THREAD(); + + /* save thread context */ + cont->saved_thread = *th; +} + +static rb_context_t * +cont_new(VALUE klass) +{ + rb_context_t *cont; + volatile VALUE contval; + + contval = Data_Make_Struct(klass, rb_context_t, cont_mark, cont_free, cont); + cont->self = contval; + cont_init(cont); + return cont; +} + +void vm_stack_to_heap(rb_thread_t *th); + +static VALUE +cont_capture(volatile int *stat) +{ + rb_context_t *cont; + rb_thread_t *th = GET_THREAD(), *sth; + volatile VALUE contval; + + vm_stack_to_heap(th); + cont = cont_new(rb_cContinuation); + contval = cont->self; + sth = &cont->saved_thread; + +#ifdef CAPTURE_JUST_VALID_VM_STACK + cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack; + cont->vm_stack_clen = th->stack + th->stack_size - (VALUE*)th->cfp; + cont->vm_stack = ALLOC_N(VALUE, cont->vm_stack_slen + cont->vm_stack_clen); + MEMCPY(cont->vm_stack, th->stack, VALUE, cont->vm_stack_slen); + MEMCPY(cont->vm_stack + cont->vm_stack_slen, (VALUE*)th->cfp, VALUE, cont->vm_stack_clen); +#elif + cont->vm_stack = ALLOC_N(VALUE, th->stack_size); + MEMCPY(cont->vm_stack, th->stack, VALUE, th->stack_size); +#endif + sth->stack = 0; + + cont_save_machine_stack(th, cont); + + if (ruby_setjmp(cont->jmpbuf)) { + VALUE value; + + value = cont->value; + cont->value = Qnil; + *stat = 1; + return value; + } + else { + *stat = 0; + return cont->self; + } +} + +NORETURN(static void cont_restore_1(rb_context_t *)); + +static void +cont_restore_1(rb_context_t *cont) +{ + rb_thread_t *th = GET_THREAD(), *sth = &cont->saved_thread; + + /* restore thread context */ + if (cont->type == CONTINUATION_CONTEXT) { + /* continuation */ + VALUE fib; + + th->fiber = sth->fiber; + fib = th->fiber ? th->fiber : th->root_fiber; + + if (fib) { + rb_context_t *fcont; + GetContPtr(fib, fcont); + th->stack_size = fcont->saved_thread.stack_size; + th->stack = fcont->saved_thread.stack; + } +#ifdef CAPTURE_JUST_VALID_VM_STACK + MEMCPY(th->stack, cont->vm_stack, VALUE, cont->vm_stack_slen); + MEMCPY(th->stack + sth->stack_size - cont->vm_stack_clen, + cont->vm_stack + cont->vm_stack_slen, VALUE, cont->vm_stack_clen); +#elif + MEMCPY(th->stack, cont->vm_stack, VALUE, sth->stack_size); +#endif + } + else { + /* fiber */ + th->stack = sth->stack; + th->stack_size = sth->stack_size; + th->local_storage = sth->local_storage; + th->fiber = cont->self; + } + + th->cfp = sth->cfp; + th->safe_level = sth->safe_level; + th->raised_flag = sth->raised_flag; + th->state = sth->state; + th->status = sth->status; + th->tag = sth->tag; + th->trap_tag = sth->trap_tag; + th->errinfo = sth->errinfo; + th->first_proc = sth->first_proc; + + /* restore machine stack */ +#ifdef _M_AMD64 + { + /* workaround for x64 SEH */ + jmp_buf buf; + setjmp(buf); + ((_JUMP_BUFFER*)(&cont->jmpbuf))->Frame = + ((_JUMP_BUFFER*)(&buf))->Frame; + } +#endif + if (cont->machine_stack_src) { + FLUSH_REGISTER_WINDOWS; + MEMCPY(cont->machine_stack_src, cont->machine_stack, + VALUE, cont->machine_stack_size); + } + +#ifdef __ia64 + if (cont->machine_register_stack_src) { + MEMCPY(cont->machine_register_stack_src, cont->machine_register_stack, + VALUE, cont->machine_register_stack_size); + } +#endif + + ruby_longjmp(cont->jmpbuf, 1); +} + +NORETURN(NOINLINE(static void cont_restore_0(rb_context_t *, VALUE *))); + +#ifdef __ia64 +#define C(a) rse_##a##0, rse_##a##1, rse_##a##2, rse_##a##3, rse_##a##4 +#define E(a) rse_##a##0= rse_##a##1= rse_##a##2= rse_##a##3= rse_##a##4 +static volatile int C(a), C(b), C(c), C(d), C(e); +static volatile int C(f), C(g), C(h), C(i), C(j); +static volatile int C(k), C(l), C(m), C(n), C(o); +static volatile int C(p), C(q), C(r), C(s), C(t); +int rb_dummy_false = 0; +NORETURN(NOINLINE(static void register_stack_extend(rb_context_t *, VALUE *))); +static void +register_stack_extend(rb_context_t *cont, VALUE *curr_bsp) +{ + if (rb_dummy_false) { + /* use registers as much as possible */ + E(a) = E(b) = E(c) = E(d) = E(e) = + E(f) = E(g) = E(h) = E(i) = E(j) = + E(k) = E(l) = E(m) = E(n) = E(o) = + E(p) = E(q) = E(r) = E(s) = E(t) = 0; + E(a) = E(b) = E(c) = E(d) = E(e) = + E(f) = E(g) = E(h) = E(i) = E(j) = + E(k) = E(l) = E(m) = E(n) = E(o) = + E(p) = E(q) = E(r) = E(s) = E(t) = 0; + } + if (curr_bsp < cont->machine_register_stack_src+cont->machine_register_stack_size) { + register_stack_extend(cont, (VALUE*)rb_ia64_bsp()); + } + cont_restore_1(cont); +} +#undef C +#undef E +#endif + +static void +cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame) +{ + if (cont->machine_stack_src) { +#define STACK_PAD_SIZE 1024 + VALUE space[STACK_PAD_SIZE]; + +#if STACK_GROW_DIRECTION < 0 /* downward */ + if (addr_in_prev_frame > cont->machine_stack_src) { + cont_restore_0(cont, &space[0]); + } +#elif STACK_GROW_DIRECTION > 0 /* upward */ + if (addr_in_prev_frame < cont->machine_stack_src + cont->machine_stack_size) { + cont_restore_0(cont, &space[STACK_PAD_SIZE-1]); + } +#else + if (addr_in_prev_frame > &space[0]) { + /* Stack grows downward */ + if (addr_in_prev_frame > cont->machine_stack_src) { + cont_restore_0(cont, &space[0]); + } + } + else { + /* Stack grows upward */ + if (addr_in_prev_frame < cont->machine_stack_src + cont->machine_stack_size) { + cont_restore_0(cont, &space[STACK_PAD_SIZE-1]); + } + } +#endif + } +#ifdef __ia64 + register_stack_extend(cont, (VALUE*)rb_ia64_bsp()); +#else + cont_restore_1(cont); +#endif +} + +/* + * Document-class: Continuation + * + * Continuation objects are generated by + * Kernel#callcc. They hold a return address and execution + * context, allowing a nonlocal return to the end of the + * callcc block from anywhere within a program. + * Continuations are somewhat analogous to a structured version of C's + * setjmp/longjmp (although they contain more state, so + * you might consider them closer to threads). + * + * For instance: + * + * arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ] + * callcc{|$cc|} + * puts(message = arr.shift) + * $cc.call unless message =~ /Max/ + * + * produces: + * + * Freddie + * Herbie + * Ron + * Max + * + * This (somewhat contrived) example allows the inner loop to abandon + * processing early: + * + * callcc {|cont| + * for i in 0..4 + * print "\n#{i}: " + * for j in i*5...(i+1)*5 + * cont.call() if j == 17 + * printf "%3d", j + * end + * end + * } + * print "\n" + * + * produces: + * + * 0: 0 1 2 3 4 + * 1: 5 6 7 8 9 + * 2: 10 11 12 13 14 + * 3: 15 16 + */ + +/* + * call-seq: + * callcc {|cont| block } => obj + * + * Generates a Continuation object, which it passes to the + * associated block. Performing a cont.call will + * cause the callcc to return (as will falling through the + * end of the block). The value returned by the callcc is + * the value of the block, or the value passed to + * cont.call. See class Continuation + * for more details. Also see Kernel::throw for + * an alternative mechanism for unwinding a call stack. + */ + +static VALUE +rb_callcc(VALUE self) +{ + volatile int called; + volatile VALUE val = cont_capture(&called); + + if (called) { + return val; + } + else { + return rb_yield(val); + } +} + +static VALUE +make_passing_arg(int argc, VALUE *argv) +{ + switch(argc) { + case 0: + return Qnil; + case 1: + return argv[0]; + default: + return rb_ary_new4(argc, argv); + } +} + +/* + * call-seq: + * cont.call(args, ...) + * cont[args, ...] + * + * Invokes the continuation. The program continues from the end of the + * callcc block. If no arguments are given, the original + * callcc returns nil. If one argument is + * given, callcc returns it. Otherwise, an array + * containing args is returned. + * + * callcc {|cont| cont.call } #=> nil + * callcc {|cont| cont.call 1 } #=> 1 + * callcc {|cont| cont.call 1, 2, 3 } #=> [1, 2, 3] + */ + +static VALUE +rb_cont_call(int argc, VALUE *argv, VALUE contval) +{ + rb_context_t *cont; + rb_thread_t *th = GET_THREAD(); + GetContPtr(contval, cont); + + if (cont->saved_thread.self != th->self) { + rb_raise(rb_eRuntimeError, "continuation called across threads"); + } + if (cont->saved_thread.trap_tag != th->trap_tag) { + rb_raise(rb_eRuntimeError, "continuation called across trap"); + } + if (cont->saved_thread.fiber) { + rb_context_t *fcont; + GetContPtr(cont->saved_thread.fiber, fcont); + + if (th->fiber != cont->saved_thread.fiber) { + rb_raise(rb_eRuntimeError, "continuation called across fiber"); + } + } + + cont->argc = argc; + cont->value = make_passing_arg(argc, argv); + + cont_restore_0(cont, &contval); + return Qnil; /* unreachable */ +} + +/*********/ +/* fiber */ +/*********/ + +/* + * Document-class: Fiber + * + * Fibers are primitives for implementing light weight cooperative + * concurrency in Ruby. Basically they are a means of creating code blocks + * that can be paused and resumed, much like threads. The main difference + * is that they are never preempted and that the scheduling must be done by + * the programmer and not the VM. + * + * As opposed to other stackless light weight concurrency models, each fiber + * comes with a small 4KB stack. This enables the fiber to be paused from deeply + * nested function calls within the fiber block. + * + * When a fiber is created it will not run automatically. Rather it must be + * be explicitly asked to run using the Fiber#resume method. + * The code running inside the fiber can give up control by calling + * Fiber.yield in which case it yields control back to caller + * (the caller of the Fiber#resume). + * + * Upon yielding or termination the Fiber returns the value of the last + * executed expression + * + * For instance: + * + * fiber = Fiber.new do + * Fiber.yield 1 + * 2 + * end + * + * puts fiber.resume + * puts fiber.resume + * puts fiber.resume + * + * produces + * + * 1 + * 2 + * FiberError: dead fiber called + * + * The Fiber#resume method accepts an arbitary number of + * parameters, if it is the first call to resume then they + * will be passed as block arguments. Otherwise they will be the return + * value of the call to Fiber.yield + * + * Example: + * + * fiber = Fiber.new do |first| + * second = Fiber.yield first + 2 + * end + * + * puts fiber.resume 10 + * puts fiber.resume 14 + * puts fiber.resume 18 + * + * produces + * + * 12 + * 14 + * FiberError: dead fiber called + * + */ + +#define FIBER_VM_STACK_SIZE (4 * 1024) + +static VALUE +fiber_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, fiber_mark, fiber_free, 0); +} + +static rb_fiber_t* +fiber_t_alloc(VALUE fibval) +{ + rb_fiber_t *fib = ALLOC(rb_fiber_t); + + memset(fib, 0, sizeof(rb_fiber_t)); + fib->cont.self = fibval; + fib->cont.type = FIBER_CONTEXT; + cont_init(&fib->cont); + fib->prev = Qnil; + fib->status = CREATED; + + DATA_PTR(fibval) = fib; + + return fib; +} + +static VALUE +fiber_init(VALUE fibval, VALUE proc) +{ + rb_fiber_t *fib = fiber_t_alloc(fibval); + rb_context_t *cont = &fib->cont; + rb_thread_t *th = &cont->saved_thread; + + fiber_link_join(fib); + + /* initialize cont */ + cont->vm_stack = 0; + + th->stack = 0; + th->stack_size = FIBER_VM_STACK_SIZE; + th->stack = ALLOC_N(VALUE, th->stack_size); + + th->cfp = (void *)(th->stack + th->stack_size); + th->cfp--; + th->cfp->pc = 0; + th->cfp->sp = th->stack + 1; + th->cfp->bp = 0; + th->cfp->lfp = th->stack; + *th->cfp->lfp = 0; + th->cfp->dfp = th->stack; + th->cfp->self = Qnil; + th->cfp->flag = 0; + th->cfp->iseq = 0; + th->cfp->proc = 0; + th->cfp->block_iseq = 0; + th->tag = 0; + th->local_storage = st_init_numtable(); + + th->first_proc = proc; + + MEMCPY(&cont->jmpbuf, &th->root_jmpbuf, rb_jmpbuf_t, 1); + + return fibval; +} + +static VALUE +rb_fiber_init(VALUE fibval) +{ + return fiber_init(fibval, rb_block_proc()); +} + +VALUE +rb_fiber_new(VALUE (*func)(ANYARGS), VALUE obj) +{ + return fiber_init(fiber_alloc(rb_cFiber), rb_proc_new(func, obj)); +} + +static VALUE +return_fiber(void) +{ + rb_fiber_t *fib; + VALUE curr = rb_fiber_current(); + GetFiberPtr(curr, fib); + + if (fib->prev == Qnil) { + rb_thread_t *th = GET_THREAD(); + + if (th->root_fiber != curr) { + return th->root_fiber; + } + else { + rb_raise(rb_eFiberError, "can't yield from root fiber"); + } + } + else { + VALUE prev = fib->prev; + fib->prev = Qnil; + return prev; + } +} + +VALUE rb_fiber_transfer(VALUE fib, int argc, VALUE *argv); + +static void +rb_fiber_terminate(rb_fiber_t *fib) +{ + VALUE value = fib->cont.value; + fib->status = TERMINATED; + rb_fiber_transfer(return_fiber(), 1, &value); +} + +void +rb_fiber_start(void) +{ + rb_thread_t *th = GET_THREAD(); + rb_fiber_t *fib; + rb_context_t *cont; + rb_proc_t *proc; + int state; + + GetFiberPtr(th->fiber, fib); + cont = &fib->cont; + + TH_PUSH_TAG(th); + if ((state = EXEC_TAG()) == 0) { + int argc; + VALUE *argv, args; + GetProcPtr(cont->saved_thread.first_proc, proc); + args = cont->value; + argv = (argc = cont->argc) > 1 ? RARRAY_PTR(args) : &args; + cont->value = Qnil; + th->errinfo = Qnil; + th->local_lfp = proc->block.lfp; + th->local_svar = Qnil; + + fib->status = RUNNING; + cont->value = vm_invoke_proc(th, proc, proc->block.self, argc, argv, 0); + } + TH_POP_TAG(); + + if (state) { + if (TAG_RAISE) { + th->thrown_errinfo = th->errinfo; + } + else { + th->thrown_errinfo = + vm_make_jump_tag_but_local_jump(state, th->errinfo); + } + RUBY_VM_SET_INTERRUPT(th); + } + + rb_fiber_terminate(fib); + rb_bug("rb_fiber_start: unreachable"); +} + +static rb_fiber_t * +root_fiber_alloc(rb_thread_t *th) +{ + rb_fiber_t *fib; + + /* no need to allocate vm stack */ + fib = fiber_t_alloc(fiber_alloc(rb_cFiber)); + fib->cont.type = ROOT_FIBER_CONTEXT; + fib->prev_fiber = fib->next_fiber = fib; + + return fib; +} + +VALUE +rb_fiber_current() +{ + rb_thread_t *th = GET_THREAD(); + if (th->fiber == 0) { + /* save root */ + rb_fiber_t *fib = root_fiber_alloc(th); + th->root_fiber = th->fiber = fib->cont.self; + } + return th->fiber; +} + +static VALUE +fiber_store(rb_fiber_t *next_fib) +{ + rb_thread_t *th = GET_THREAD(); + rb_fiber_t *fib; + + if (th->fiber) { + GetFiberPtr(th->fiber, fib); + fib->cont.saved_thread = *th; + } + else { + /* create current fiber */ + fib = root_fiber_alloc(th); + th->root_fiber = th->fiber = fib->cont.self; + } + + cont_save_machine_stack(th, &fib->cont); + + if (ruby_setjmp(fib->cont.jmpbuf)) { + /* restored */ + GetFiberPtr(th->fiber, fib); + return fib->cont.value; + } + else { + return Qundef; + } +} + +static inline VALUE +fiber_switch(VALUE fibval, int argc, VALUE *argv, int is_resume) +{ + VALUE value; + rb_fiber_t *fib; + rb_context_t *cont; + rb_thread_t *th = GET_THREAD(); + + GetFiberPtr(fibval, fib); + cont = &fib->cont; + + if (cont->saved_thread.self != th->self) { + rb_raise(rb_eFiberError, "fiber called across threads"); + } + else if (cont->saved_thread.trap_tag != th->trap_tag) { + rb_raise(rb_eFiberError, "fiber called across trap"); + } + else if (fib->status == TERMINATED) { + rb_raise(rb_eFiberError, "dead fiber called"); + } + + if (is_resume) { + fib->prev = rb_fiber_current(); + } + + cont->argc = argc; + cont->value = make_passing_arg(argc, argv); + + if ((value = fiber_store(fib)) == Qundef) { + cont_restore_0(&fib->cont, &value); + rb_bug("rb_fiber_resume: unreachable"); + } + + RUBY_VM_CHECK_INTS(); + + return value; +} + +VALUE +rb_fiber_transfer(VALUE fib, int argc, VALUE *argv) +{ + return fiber_switch(fib, argc, argv, 0); +} + +VALUE +rb_fiber_resume(VALUE fibval, int argc, VALUE *argv) +{ + rb_fiber_t *fib; + GetFiberPtr(fibval, fib); + + if (fib->prev != Qnil) { + rb_raise(rb_eFiberError, "double resume"); + } + + return fiber_switch(fibval, argc, argv, 1); +} + +VALUE +rb_fiber_yield(int argc, VALUE *argv) +{ + return rb_fiber_transfer(return_fiber(), argc, argv); +} + +/* + * call-seq: + * fiber.alive? -> true or false + * + * Returns true if the fiber can still be resumed (or transferred to). + * After finishing execution of the fiber block this method will always + * return false. + */ +VALUE +rb_fiber_alive_p(VALUE fibval) +{ + rb_fiber_t *fib; + GetFiberPtr(fibval, fib); + return fib->status != TERMINATED; +} + +/* + * call-seq: + * fiber.resume(args, ...) -> obj + * + * Resumes the fiber from the point at which the last Fiber.yield + * was called, or starts running it if it is the first call to + * resume. Arguments passed to resume will be the value of + * the Fiber.yield expression or will be passed as block + * parameters to the fiber's block if this is the first resume. + * + * Alternatively, when resume is called it evaluates to the arguments passed + * to the next Fiber.yield statement inside the fiber's block + * or to the block value if it runs to completion without any + * Fiber.yield + */ +static VALUE +rb_fiber_m_resume(int argc, VALUE *argv, VALUE fib) +{ + return rb_fiber_resume(fib, argc, argv); +} + +/* + * call-seq: + * fiber.transfer(args, ...) -> obj + * + * Transfer control to another fiber, resuming it from where it last + * stopped or starting it if it was not resumed before. The calling + * fiber will be suspended much like in a call to Fiber.yield. + * + * The fiber which recieves the transfer call is treats it much like + * a resume call. Arguments passed to transfer are treated like those + * passed to resume. + * + * You cannot resume a fiber that transferred control to another one. + * This will cause a double resume error. You need to transfer control + * back to this fiber before it can yield and resume. + */ +static VALUE +rb_fiber_m_transfer(int argc, VALUE *argv, VALUE fib) +{ + return rb_fiber_transfer(fib, argc, argv); +} + +/* + * call-seq: + * Fiber.yield(args, ...) -> obj + * + * Yields control back to the context that resumed the fiber, passing + * along any arguments that were passed to it. The fiber will resume + * processing at this point when resume is called next. + * Any arguments passed to the next resume will be the + * value that this Fiber.yield expression evaluates to. + */ +static VALUE +rb_fiber_s_yield(int argc, VALUE *argv, VALUE klass) +{ + return rb_fiber_yield(argc, argv); +} + +/* + * call-seq: + * Fiber.current() -> fiber + * + * Returns the current fiber. You need to require 'fiber' + * before using this method. If you are not running in the context of + * a fiber this method will return the root fiber. + */ +static VALUE +rb_fiber_s_current(VALUE klass) +{ + return rb_fiber_current(); +} + +void +Init_Cont(void) +{ + rb_cFiber = rb_define_class("Fiber", rb_cObject); + rb_define_alloc_func(rb_cFiber, fiber_alloc); + rb_eFiberError = rb_define_class("FiberError", rb_eStandardError); + rb_define_singleton_method(rb_cFiber, "yield", rb_fiber_s_yield, -1); + rb_define_method(rb_cFiber, "initialize", rb_fiber_init, 0); + rb_define_method(rb_cFiber, "resume", rb_fiber_m_resume, -1); +} + +void +Init_Continuation_body(void) +{ + rb_cContinuation = rb_define_class("Continuation", rb_cObject); + rb_undef_alloc_func(rb_cContinuation); + rb_undef_method(CLASS_OF(rb_cContinuation), "new"); + rb_define_method(rb_cContinuation, "call", rb_cont_call, -1); + rb_define_method(rb_cContinuation, "[]", rb_cont_call, -1); + rb_define_global_function("callcc", rb_callcc, 0); +} + +void +Init_Fiber_as_Coroutine(void) +{ + rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1); + rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0); + rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0); +} diff --git a/lib/ruby-1.9.1-rc1/cygwin/GNUmakefile.in b/lib/ruby-1.9.1-rc1/cygwin/GNUmakefile.in new file mode 100644 index 0000000..91a5e73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/cygwin/GNUmakefile.in @@ -0,0 +1,88 @@ +include Makefile +-include uncommon.mk + +ENABLE_SHARED=@ENABLE_SHARED@ +DLLWRAP = @DLLWRAP@ --target=@target_os@ + +ifeq (@target_os@,cygwin) + DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO)) +else + DLL_BASE_NAME := $(RUBY_SO_NAME) + DLLWRAP += -mno-cygwin + VPATH := $(VPATH):$(srcdir)/win32 +endif + +ifneq ($(ENABLE_SHARED),yes) + RUBY_EXP = $(RUBY_INSTALL_NAME).exp + EXTOBJS = $(RUBY_EXP) + LIBRUBYARG = $(LIBRUBY_A) + LIBRUBY_SO = +endif + +ifeq ($(RUBY_INSTALL_NAME),ruby) + RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w +else + RUBYW_INSTALL_NAME = $(subst ruby,rubyw,$(RUBY_INSTALL_NAME)) +endif + +WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT) +SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS) +EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT) +RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc +RUBYDEF = $(RUBY_SO_NAME).def + +ruby: $(PROGRAM) +rubyw: $(WPROGRAM) + +$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO) +$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@ + +%.res.@OBJEXT@: %.rc + @WINDRES@ --include-dir . --include-dir $(rubydll.def + @DLLWRAP@ -s --def=rubydll.def -o $@ + @rm -f rubydll.def +endif + +clean-local:: + @$(RM) $(RUBY_EXP) $(RCFILES:.rc=.res.@OBJEXT@) + +distclean-local:: + @$(RM) $(RCFILES) diff --git a/lib/ruby-1.9.1-rc1/debug.c b/lib/ruby-1.9.1-rc1/debug.c new file mode 100644 index 0000000..bfce7ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/debug.c @@ -0,0 +1,159 @@ +/********************************************************************** + + debug.c - + + $Author: shugo $ + created at: 04/08/25 02:31:54 JST + + Copyright (C) 2004-2007 Koichi Sasada + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" +#include "ruby/util.h" +#include "debug.h" +#include "eval_intern.h" +#include "vm_core.h" + +/* for gdb */ +static const union { + enum ruby_special_consts special_consts; + enum ruby_value_type value_type; + enum ruby_tag_type tag_type; + enum node_type node_type; + enum { + RUBY_ENCODING_INLINE_MAX = ENCODING_INLINE_MAX, + RUBY_ENCODING_SHIFT = ENCODING_SHIFT, + RUBY_ENCODING_MASK = ENCODING_MASK, + RUBY_ENC_CODERANGE_MASK = ENC_CODERANGE_MASK, + RUBY_ENC_CODERANGE_UNKNOWN = ENC_CODERANGE_UNKNOWN, + RUBY_ENC_CODERANGE_7BIT = ENC_CODERANGE_7BIT, + RUBY_ENC_CODERANGE_VALID = ENC_CODERANGE_VALID, + RUBY_ENC_CODERANGE_BROKEN = ENC_CODERANGE_BROKEN, + RUBY_FL_MARK = FL_MARK, + RUBY_FL_RESERVED = FL_RESERVED, + RUBY_FL_FINALIZE = FL_FINALIZE, + RUBY_FL_TAINT = FL_TAINT, + RUBY_FL_UNTRUSTED = FL_UNTRUSTED, + RUBY_FL_EXIVAR = FL_EXIVAR, + RUBY_FL_FREEZE = FL_FREEZE, + RUBY_FL_SINGLETON = FL_SINGLETON, + RUBY_FL_USER0 = FL_USER0, + RUBY_FL_USER1 = FL_USER1, + RUBY_FL_USER2 = FL_USER2, + RUBY_FL_USER3 = FL_USER3, + RUBY_FL_USER4 = FL_USER4, + RUBY_FL_USER5 = FL_USER5, + RUBY_FL_USER6 = FL_USER6, + RUBY_FL_USER7 = FL_USER7, + RUBY_FL_USER8 = FL_USER8, + RUBY_FL_USER9 = FL_USER9, + RUBY_FL_USER10 = FL_USER10, + RUBY_FL_USER11 = FL_USER11, + RUBY_FL_USER12 = FL_USER12, + RUBY_FL_USER13 = FL_USER13, + RUBY_FL_USER14 = FL_USER14, + RUBY_FL_USER15 = FL_USER15, + RUBY_FL_USER16 = FL_USER16, + RUBY_FL_USER17 = FL_USER17, + RUBY_FL_USER18 = FL_USER18, + RUBY_FL_USHIFT = FL_USHIFT, + RUBY_NODE_TYPESHIFT = NODE_TYPESHIFT, + RUBY_NODE_TYPEMASK = NODE_TYPEMASK, + RUBY_NODE_LSHIFT = NODE_LSHIFT, + RUBY_NODE_LMASK = NODE_LMASK, + RUBY_NODE_FL_NEWLINE = NODE_FL_NEWLINE + } various; +} dummy_gdb_enums; + +const VALUE RUBY_FL_USER19 = FL_USER19; + +int +ruby_debug_print_indent(int level, int debug_level, int indent_level) +{ + if (level < debug_level) { + fprintf(stderr, "%*s", indent_level, ""); + fflush(stderr); + return Qtrue; + } + return Qfalse; +} + +void +ruby_debug_printf(const char *format, ...) +{ + va_list ap; + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); +} + +VALUE +ruby_debug_print_value(int level, int debug_level, const char *header, VALUE obj) +{ + if (level < debug_level) { + VALUE str; + str = rb_inspect(obj); + fprintf(stderr, "DBG> %s: %s\n", header, + obj == -1 ? "" : StringValueCStr(str)); + fflush(stderr); + } + return obj; +} + +void +ruby_debug_print_v(VALUE v) +{ + ruby_debug_print_value(0, 1, "", v); +} + +ID +ruby_debug_print_id(int level, int debug_level, const char *header, ID id) +{ + if (level < debug_level) { + fprintf(stderr, "DBG> %s: %s\n", header, rb_id2name(id)); + fflush(stderr); + } + return id; +} + +NODE * +ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node) +{ + if (level < debug_level) { + fprintf(stderr, "DBG> %s: %s (%lu)\n", header, + ruby_node_name(nd_type(node)), nd_line(node)); + } + return (NODE *)node; +} + +void +ruby_debug_breakpoint(void) +{ + /* */ +} + +#ifdef RUBY_DEBUG_ENV +static void +set_debug_option(const char *str, int len, void *arg) +{ +#define SET_WHEN(name, var) do { \ + if (len == sizeof(name) - 1 && \ + strncmp(str, name, len) == 0) { \ + extern int var; \ + var = 1; \ + return; \ + } \ + } while (0) + SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr); + SET_WHEN("core", ruby_enable_coredump); + fprintf(stderr, "unexpected debug option: %.*s\n", len, str); +} + +void +ruby_set_debug_option(const char *str) +{ + ruby_each_words(str, set_debug_option, 0); +} +#endif diff --git a/lib/ruby-1.9.1-rc1/debug.h b/lib/ruby-1.9.1-rc1/debug.h new file mode 100644 index 0000000..98caab1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/debug.h @@ -0,0 +1,36 @@ +/********************************************************************** + + debug.h - YARV Debug function interface + + $Author: ko1 $ + created at: 04/08/25 02:33:49 JST + + Copyright (C) 2004-2007 Koichi Sasada + +**********************************************************************/ + +#ifndef RUBY_DEBUG_H +#define RUBY_DEBUG_H + +#include "ruby/ruby.h" +#include "node.h" + +#define dpv(h,v) ruby_debug_print_value(-1, 0, h, v) +#define dp(v) ruby_debug_print_value(-1, 0, "", v) +#define dpi(i) ruby_debug_print_id(-1, 0, "", i) +#define dpn(n) ruby_debug_print_node(-1, 0, "", n) + +#define bp() ruby_debug_breakpoint() + +VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v); +ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id); +NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node); +int ruby_debug_print_indent(int level, int debug_level, int indent_level); +void ruby_debug_breakpoint(void); +void ruby_debug_gc_check_func(void); + +#ifdef RUBY_DEBUG_ENV +void ruby_set_debug_option(const char *str); +#endif + +#endif /* RUBY_DEBUG_H */ diff --git a/lib/ruby-1.9.1-rc1/defs/keywords b/lib/ruby-1.9.1-rc1/defs/keywords new file mode 100644 index 0000000..f0d82a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/defs/keywords @@ -0,0 +1,51 @@ +%{ +struct kwtable {const char *name; int id[2]; enum lex_state_e state;}; +const struct kwtable *rb_reserved_word(const char *, unsigned int); +#ifndef RIPPER +%} + +struct kwtable; +%% +__ENCODING__, {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END +__LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END +__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END +BEGIN, {keyword_BEGIN, keyword_BEGIN}, EXPR_END +END, {keyword_END, keyword_END}, EXPR_END +alias, {keyword_alias, keyword_alias}, EXPR_FNAME +and, {keyword_and, keyword_and}, EXPR_VALUE +begin, {keyword_begin, keyword_begin}, EXPR_BEG +break, {keyword_break, keyword_break}, EXPR_MID +case, {keyword_case, keyword_case}, EXPR_VALUE +class, {keyword_class, keyword_class}, EXPR_CLASS +def, {keyword_def, keyword_def}, EXPR_FNAME +defined?, {keyword_defined, keyword_defined}, EXPR_ARG +do, {keyword_do, keyword_do}, EXPR_BEG +else, {keyword_else, keyword_else}, EXPR_BEG +elsif, {keyword_elsif, keyword_elsif}, EXPR_VALUE +end, {keyword_end, keyword_end}, EXPR_END +ensure, {keyword_ensure, keyword_ensure}, EXPR_BEG +false, {keyword_false, keyword_false}, EXPR_END +for, {keyword_for, keyword_for}, EXPR_VALUE +if, {keyword_if, modifier_if}, EXPR_VALUE +in, {keyword_in, keyword_in}, EXPR_VALUE +module, {keyword_module, keyword_module}, EXPR_VALUE +next, {keyword_next, keyword_next}, EXPR_MID +nil, {keyword_nil, keyword_nil}, EXPR_END +not, {keyword_not, keyword_not}, EXPR_ARG +or, {keyword_or, keyword_or}, EXPR_VALUE +redo, {keyword_redo, keyword_redo}, EXPR_END +rescue, {keyword_rescue, modifier_rescue}, EXPR_MID +retry, {keyword_retry, keyword_retry}, EXPR_END +return, {keyword_return, keyword_return}, EXPR_MID +self, {keyword_self, keyword_self}, EXPR_END +super, {keyword_super, keyword_super}, EXPR_ARG +then, {keyword_then, keyword_then}, EXPR_BEG +true, {keyword_true, keyword_true}, EXPR_END +undef, {keyword_undef, keyword_undef}, EXPR_FNAME +unless, {keyword_unless, modifier_unless}, EXPR_VALUE +until, {keyword_until, modifier_until}, EXPR_VALUE +when, {keyword_when, keyword_when}, EXPR_VALUE +while, {keyword_while, modifier_while}, EXPR_VALUE +yield, {keyword_yield, keyword_yield}, EXPR_ARG +%% +#endif diff --git a/lib/ruby-1.9.1-rc1/defs/known_errors.def b/lib/ruby-1.9.1-rc1/defs/known_errors.def new file mode 100644 index 0000000..9f09aa9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/defs/known_errors.def @@ -0,0 +1,122 @@ +EPERM +ENOENT +ESRCH +EINTR +EIO +ENXIO +E2BIG +ENOEXEC +EBADF +ECHILD +EAGAIN +ENOMEM +EACCES +EFAULT +ENOTBLK +EBUSY +EEXIST +EXDEV +ENODEV +ENOTDIR +EISDIR +EINVAL +ENFILE +EMFILE +ENOTTY +ETXTBSY +EFBIG +ENOSPC +ESPIPE +EROFS +EMLINK +EPIPE +EDOM +ERANGE +EDEADLK +ENAMETOOLONG +ENOLCK +ENOSYS +ENOTEMPTY +ELOOP +EWOULDBLOCK +ENOMSG +EIDRM +ECHRNG +EL2NSYNC +EL3HLT +EL3RST +ELNRNG +EUNATCH +ENOCSI +EL2HLT +EBADE +EBADR +EXFULL +ENOANO +EBADRQC +EBADSLT +EDEADLOCK +EBFONT +ENOSTR +ENODATA +ETIME +ENOSR +ENONET +ENOPKG +EREMOTE +ENOLINK +EADV +ESRMNT +ECOMM +EPROTO +EMULTIHOP +EDOTDOT +EBADMSG +EOVERFLOW +ENOTUNIQ +EBADFD +EREMCHG +ELIBACC +ELIBBAD +ELIBSCN +ELIBMAX +ELIBEXEC +EILSEQ +ERESTART +ESTRPIPE +EUSERS +ENOTSOCK +EDESTADDRREQ +EMSGSIZE +EPROTOTYPE +ENOPROTOOPT +EPROTONOSUPPORT +ESOCKTNOSUPPORT +EOPNOTSUPP +EPFNOSUPPORT +EAFNOSUPPORT +EADDRINUSE +EADDRNOTAVAIL +ENETDOWN +ENETUNREACH +ENETRESET +ECONNABORTED +ECONNRESET +ENOBUFS +EISCONN +ENOTCONN +ESHUTDOWN +ETOOMANYREFS +ETIMEDOUT +ECONNREFUSED +EHOSTDOWN +EHOSTUNREACH +EALREADY +EINPROGRESS +ESTALE +EUCLEAN +ENOTNAM +ENAVAIL +EISNAM +EREMOTEIO +EDQUOT diff --git a/lib/ruby-1.9.1-rc1/defs/lex.c.src b/lib/ruby-1.9.1-rc1/defs/lex.c.src new file mode 100644 index 0000000..f0d82a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/defs/lex.c.src @@ -0,0 +1,51 @@ +%{ +struct kwtable {const char *name; int id[2]; enum lex_state_e state;}; +const struct kwtable *rb_reserved_word(const char *, unsigned int); +#ifndef RIPPER +%} + +struct kwtable; +%% +__ENCODING__, {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END +__LINE__, {keyword__LINE__, keyword__LINE__}, EXPR_END +__FILE__, {keyword__FILE__, keyword__FILE__}, EXPR_END +BEGIN, {keyword_BEGIN, keyword_BEGIN}, EXPR_END +END, {keyword_END, keyword_END}, EXPR_END +alias, {keyword_alias, keyword_alias}, EXPR_FNAME +and, {keyword_and, keyword_and}, EXPR_VALUE +begin, {keyword_begin, keyword_begin}, EXPR_BEG +break, {keyword_break, keyword_break}, EXPR_MID +case, {keyword_case, keyword_case}, EXPR_VALUE +class, {keyword_class, keyword_class}, EXPR_CLASS +def, {keyword_def, keyword_def}, EXPR_FNAME +defined?, {keyword_defined, keyword_defined}, EXPR_ARG +do, {keyword_do, keyword_do}, EXPR_BEG +else, {keyword_else, keyword_else}, EXPR_BEG +elsif, {keyword_elsif, keyword_elsif}, EXPR_VALUE +end, {keyword_end, keyword_end}, EXPR_END +ensure, {keyword_ensure, keyword_ensure}, EXPR_BEG +false, {keyword_false, keyword_false}, EXPR_END +for, {keyword_for, keyword_for}, EXPR_VALUE +if, {keyword_if, modifier_if}, EXPR_VALUE +in, {keyword_in, keyword_in}, EXPR_VALUE +module, {keyword_module, keyword_module}, EXPR_VALUE +next, {keyword_next, keyword_next}, EXPR_MID +nil, {keyword_nil, keyword_nil}, EXPR_END +not, {keyword_not, keyword_not}, EXPR_ARG +or, {keyword_or, keyword_or}, EXPR_VALUE +redo, {keyword_redo, keyword_redo}, EXPR_END +rescue, {keyword_rescue, modifier_rescue}, EXPR_MID +retry, {keyword_retry, keyword_retry}, EXPR_END +return, {keyword_return, keyword_return}, EXPR_MID +self, {keyword_self, keyword_self}, EXPR_END +super, {keyword_super, keyword_super}, EXPR_ARG +then, {keyword_then, keyword_then}, EXPR_BEG +true, {keyword_true, keyword_true}, EXPR_END +undef, {keyword_undef, keyword_undef}, EXPR_FNAME +unless, {keyword_unless, modifier_unless}, EXPR_VALUE +until, {keyword_until, modifier_until}, EXPR_VALUE +when, {keyword_when, keyword_when}, EXPR_VALUE +while, {keyword_while, modifier_while}, EXPR_VALUE +yield, {keyword_yield, keyword_yield}, EXPR_ARG +%% +#endif diff --git a/lib/ruby-1.9.1-rc1/defs/opt_insn_unif.def b/lib/ruby-1.9.1-rc1/defs/opt_insn_unif.def new file mode 100644 index 0000000..1ac613d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/defs/opt_insn_unif.def @@ -0,0 +1,29 @@ +# +# a definition of instruction unification +# +# + +__END__ + +putobject putobject +putobject putstring +putobject setlocal +putobject setdynamic + +putstring putstring +putstring putobject +putstring setlocal +putstring setdynamic + +# putnil end + +dup setlocal + +# from tarai +getlocal getlocal +# getlocal send + +# from tak, ackermann +getlocal putobject + + diff --git a/lib/ruby-1.9.1-rc1/defs/opt_operand.def b/lib/ruby-1.9.1-rc1/defs/opt_operand.def new file mode 100644 index 0000000..5ca1d74 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/defs/opt_operand.def @@ -0,0 +1,59 @@ +# +# configration file for operand union optimization +# +# format: +# [insn name] op1, op2 ... +# +# wildcard: * +# + +__END__ + +getlocal 2 +getlocal 3 +getlocal 4 + +setlocal 2 +setlocal 3 +setlocal 4 + +getdynamic *, 0 +getdynamic 1, 0 +getdynamic 2, 0 +getdynamic 3, 0 +getdynamic 4, 0 + +setdynamic *, 0 +setdynamic 1, 0 +setdynamic 2, 0 +setdynamic 3, 0 +setdynamic 4, 0 + +putobject INT2FIX(0) +putobject INT2FIX(1) +putobject Qtrue +putobject Qfalse + +# CALL +send *, *, Qfalse, 0, * +send *, 0, Qfalse, 0, * +send *, 1, Qfalse, 0, * +send *, 2, Qfalse, 0, * +send *, 3, Qfalse, 0, * + +# FCALL +send *, *, Qfalse, 0x04, * +send *, 0, Qfalse, 0x04, * +send *, 1, Qfalse, 0x04, * +send *, 2, Qfalse, 0x04, * +send *, 3, Qfalse, 0x04, * + +# VCALL +send *, 0, Qfalse, 0x0c, * + + +__END__ + + + + diff --git a/lib/ruby-1.9.1-rc1/dir.c b/lib/ruby-1.9.1-rc1/dir.c new file mode 100644 index 0000000..e217841 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dir.c @@ -0,0 +1,1910 @@ +/********************************************************************** + + dir.c - + + $Author: yugui $ + created at: Wed Jan 5 09:51:01 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" + +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#if defined HAVE_DIRENT_H && !defined _WIN32 +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#elif defined HAVE_DIRECT_H && !defined _WIN32 +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# if !defined __NeXT__ +# define NAMLEN(dirent) (dirent)->d_namlen +# else +# /* On some versions of NextStep, d_namlen is always zero, so avoid it. */ +# define NAMLEN(dirent) strlen((dirent)->d_name) +# endif +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +# ifdef _WIN32 +# include "win32/dir.h" +# endif +#endif + +#include + +#ifndef HAVE_STDLIB_H +char *getenv(); +#endif + +#ifndef HAVE_STRING_H +char *strchr(char*,char); +#endif + +#include + +#include "ruby/util.h" + +#if !defined HAVE_LSTAT && !defined lstat +#define lstat stat +#endif + +#define FNM_NOESCAPE 0x01 +#define FNM_PATHNAME 0x02 +#define FNM_DOTMATCH 0x04 +#define FNM_CASEFOLD 0x08 +#if CASEFOLD_FILESYSTEM +#define FNM_SYSCASE FNM_CASEFOLD +#else +#define FNM_SYSCASE 0 +#endif + +#define FNM_NOMATCH 1 +#define FNM_ERROR 2 + +# define Next(p, e, enc) (p + rb_enc_mbclen(p, e, enc)) +# define Inc(p, e, enc) ((p) = Next(p, e, enc)) + +static int +char_casecmp(const char *p1, const char *p2, rb_encoding *enc, const int nocase) +{ + const char *p1end, *p2end; + unsigned int c1, c2; + + if (!*p1 || !*p2) return !!*p1 - !!*p2; + p1end = p1 + strlen(p1); + p2end = p2 + strlen(p2); + c1 = rb_enc_codepoint(p1, p1end, enc); + c2 = rb_enc_codepoint(p2, p2end, enc); + + if (c1 == c2) return 0; + if (nocase) { + c1 = rb_enc_toupper(c1, enc); + c2 = rb_enc_toupper(c2, enc); + } + return c1 - c2; +} + +static char * +bracket( + const char *p, /* pattern (next to '[') */ + const char *s, /* string */ + int flags, + rb_encoding *enc) +{ + const char *pend = p + strlen(p); + const int nocase = flags & FNM_CASEFOLD; + const int escape = !(flags & FNM_NOESCAPE); + + int ok = 0, not = 0; + + if (*p == '!' || *p == '^') { + not = 1; + p++; + } + + while (*p != ']') { + const char *t1 = p; + if (escape && *t1 == '\\') + t1++; + if (!*t1) + return NULL; + p = Next(t1, pend, enc); + if (p[0] == '-' && p[1] != ']') { + const char *t2 = p + 1; + if (escape && *t2 == '\\') + t2++; + if (!*t2) + return NULL; + p = Next(t2, pend, enc); + if (!ok && char_casecmp(t1, s, enc, nocase) <= 0 && char_casecmp(s, t2, enc, nocase) <= 0) + ok = 1; + } + else + if (!ok && char_casecmp(t1, s, enc, nocase) == 0) + ok = 1; + } + + return ok == not ? NULL : (char *)p + 1; +} + +/* If FNM_PATHNAME is set, only path element will be matched. (upto '/' or '\0') + Otherwise, entire string will be matched. + End marker itself won't be compared. + And if function succeeds, *pcur reaches end marker. +*/ +#define UNESCAPE(p) (escape && *(p) == '\\' ? (p) + 1 : (p)) +#define ISEND(p) (!*(p) || (pathname && *(p) == '/')) +#define RETURN(val) return *pcur = p, *scur = s, (val); + +static int +fnmatch_helper( + const char **pcur, /* pattern */ + const char **scur, /* string */ + int flags, + rb_encoding *enc) +{ + const int period = !(flags & FNM_DOTMATCH); + const int pathname = flags & FNM_PATHNAME; + const int escape = !(flags & FNM_NOESCAPE); + const int nocase = flags & FNM_CASEFOLD; + + const char *ptmp = 0; + const char *stmp = 0; + + const char *p = *pcur; + const char *pend = p + strlen(p); + const char *s = *scur; + const char *send = s + strlen(s); + + if (period && *s == '.' && *UNESCAPE(p) != '.') /* leading period */ + RETURN(FNM_NOMATCH); + + while (1) { + switch (*p) { + case '*': + do { p++; } while (*p == '*'); + if (ISEND(UNESCAPE(p))) { + p = UNESCAPE(p); + RETURN(0); + } + if (ISEND(s)) + RETURN(FNM_NOMATCH); + ptmp = p; + stmp = s; + continue; + + case '?': + if (ISEND(s)) + RETURN(FNM_NOMATCH); + p++; + Inc(s, send, enc); + continue; + + case '[': { + const char *t; + if (ISEND(s)) + RETURN(FNM_NOMATCH); + if ((t = bracket(p + 1, s, flags, enc)) != 0) { + p = t; + Inc(s, send, enc); + continue; + } + goto failed; + } + } + + /* ordinary */ + p = UNESCAPE(p); + if (ISEND(s)) + RETURN(ISEND(p) ? 0 : FNM_NOMATCH); + if (ISEND(p)) + goto failed; + if (char_casecmp(p, s, enc, nocase) != 0) + goto failed; + Inc(p, pend, enc); + Inc(s, send, enc); + continue; + + failed: /* try next '*' position */ + if (ptmp && stmp) { + p = ptmp; + Inc(stmp, send, enc); /* !ISEND(*stmp) */ + s = stmp; + continue; + } + RETURN(FNM_NOMATCH); + } +} + +static int +fnmatch( + const char *pattern, + rb_encoding *enc, + const char *string, + int flags) +{ + const char *p = pattern; + const char *s = string; + const char *send = s + strlen(string); + const int period = !(flags & FNM_DOTMATCH); + const int pathname = flags & FNM_PATHNAME; + + const char *ptmp = 0; + const char *stmp = 0; + + if (pathname) { + while (1) { + if (p[0] == '*' && p[1] == '*' && p[2] == '/') { + do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/'); + ptmp = p; + stmp = s; + } + if (fnmatch_helper(&p, &s, flags, enc) == 0) { + while (*s && *s != '/') Inc(s, send, enc); + if (*p && *s) { + p++; + s++; + continue; + } + if (!*p && !*s) + return 0; + } + /* failed : try next recursion */ + if (ptmp && stmp && !(period && *stmp == '.')) { + while (*stmp && *stmp != '/') Inc(stmp, send, enc); + if (*stmp) { + p = ptmp; + stmp++; + s = stmp; + continue; + } + } + return FNM_NOMATCH; + } + } + else + return fnmatch_helper(&p, &s, flags, enc); +} + +VALUE rb_cDir; + +struct dir_data { + DIR *dir; + VALUE path; + rb_encoding *enc; +}; + +static void +mark_dir(struct dir_data *dir) +{ + rb_gc_mark(dir->path); +} + +static void +free_dir(struct dir_data *dir) +{ + if (dir) { + if (dir->dir) closedir(dir->dir); + } + xfree(dir); +} + +static VALUE dir_close(VALUE); + +static VALUE +dir_s_alloc(VALUE klass) +{ + struct dir_data *dirp; + VALUE obj = Data_Make_Struct(klass, struct dir_data, mark_dir, free_dir, dirp); + + dirp->dir = NULL; + dirp->path = Qnil; + dirp->enc = NULL; + + return obj; +} + +/* + * call-seq: + * Dir.new( string ) -> aDir + * + * Returns a new directory object for the named directory. + */ +static VALUE +dir_initialize(int argc, VALUE *argv, VALUE dir) +{ + struct dir_data *dp; + rb_encoding *fsenc; + VALUE dirname, opt; + static VALUE sym_enc; + + if (!sym_enc) { + sym_enc = ID2SYM(rb_intern("encoding")); + } + fsenc = rb_filesystem_encoding(); + + rb_scan_args(argc, argv, "11", &dirname, &opt); + + if (!NIL_P(opt)) { + VALUE v, enc=Qnil; + opt = rb_convert_type(opt, T_HASH, "Hash", "to_hash"); + + v = rb_hash_aref(opt, sym_enc); + if (!NIL_P(v)) enc = v; + + if (!NIL_P(enc)) { + fsenc = rb_to_encoding(enc); + } + } + + FilePathValue(dirname); + + Data_Get_Struct(dir, struct dir_data, dp); + if (dp->dir) closedir(dp->dir); + dp->dir = NULL; + dp->path = Qnil; + dp->enc = fsenc; + dp->dir = opendir(RSTRING_PTR(dirname)); + if (dp->dir == NULL) { + if (errno == EMFILE || errno == ENFILE) { + rb_gc(); + dp->dir = opendir(RSTRING_PTR(dirname)); + } + if (dp->dir == NULL) { + rb_sys_fail(RSTRING_PTR(dirname)); + } + } + dp->path = rb_str_dup_frozen(dirname); + + return dir; +} + +/* + * call-seq: + * Dir.open( string ) => aDir + * Dir.open( string ) {| aDir | block } => anObject + * + * With no block, open is a synonym for + * Dir::new. If a block is present, it is passed + * aDir as a parameter. The directory is closed at the end of + * the block, and Dir::open returns the value of the + * block. + */ +static VALUE +dir_s_open(int argc, VALUE *argv, VALUE klass) +{ + struct dir_data *dp; + VALUE dir = Data_Make_Struct(klass, struct dir_data, mark_dir, free_dir, dp); + + dir_initialize(argc, argv, dir); + if (rb_block_given_p()) { + return rb_ensure(rb_yield, dir, dir_close, dir); + } + + return dir; +} + +static void +dir_closed(void) +{ + rb_raise(rb_eIOError, "closed directory"); +} + +static void +dir_check(VALUE dir) +{ + if (!OBJ_UNTRUSTED(dir) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: operation on trusted Dir"); + rb_check_frozen(dir); +} + +#define GetDIR(obj, dirp) do {\ + dir_check(dir);\ + Data_Get_Struct(obj, struct dir_data, dirp);\ + if (dirp->dir == NULL) dir_closed();\ +} while (0) + + +/* + * call-seq: + * dir.inspect => string + * + * Return a string describing this Dir object. + */ +static VALUE +dir_inspect(VALUE dir) +{ + struct dir_data *dirp; + + Data_Get_Struct(dir, struct dir_data, dirp); + if (!NIL_P(dirp->path)) { + const char *c = rb_obj_classname(dir); + return rb_sprintf("#<%s:%s>", c, RSTRING_PTR(dirp->path)); + } + return rb_funcall(dir, rb_intern("to_s"), 0, 0); +} + +/* + * call-seq: + * dir.path => string or nil + * + * Returns the path parameter passed to dir's constructor. + * + * d = Dir.new("..") + * d.path #=> ".." + */ +static VALUE +dir_path(VALUE dir) +{ + struct dir_data *dirp; + + Data_Get_Struct(dir, struct dir_data, dirp); + if (NIL_P(dirp->path)) return Qnil; + return rb_str_dup(dirp->path); +} + +/* + * call-seq: + * dir.read => string or nil + * + * Reads the next entry from dir and returns it as a string. + * Returns nil at the end of the stream. + * + * d = Dir.new("testdir") + * d.read #=> "." + * d.read #=> ".." + * d.read #=> "config.h" + */ +static VALUE +dir_read(VALUE dir) +{ + struct dir_data *dirp; + struct dirent *dp; + + GetDIR(dir, dirp); + errno = 0; + dp = readdir(dirp->dir); + if (dp) { + return rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc); + } + else if (errno == 0) { /* end of stream */ + return Qnil; + } + else { + rb_sys_fail(0); + } + return Qnil; /* not reached */ +} + +/* + * call-seq: + * dir.each { |filename| block } => dir + * + * Calls the block once for each entry in this directory, passing the + * filename of each entry as a parameter to the block. + * + * d = Dir.new("testdir") + * d.each {|x| puts "Got #{x}" } + * + * produces: + * + * Got . + * Got .. + * Got config.h + * Got main.rb + */ +static VALUE +dir_each(VALUE dir) +{ + struct dir_data *dirp; + struct dirent *dp; + + RETURN_ENUMERATOR(dir, 0, 0); + GetDIR(dir, dirp); + rewinddir(dirp->dir); + for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) { + rb_yield(rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc)); + if (dirp->dir == NULL) dir_closed(); + } + return dir; +} + +/* + * call-seq: + * dir.pos => integer + * dir.tell => integer + * + * Returns the current position in dir. See also + * Dir#seek. + * + * d = Dir.new("testdir") + * d.tell #=> 0 + * d.read #=> "." + * d.tell #=> 12 + */ +static VALUE +dir_tell(VALUE dir) +{ +#ifdef HAVE_TELLDIR + struct dir_data *dirp; + long pos; + + GetDIR(dir, dirp); + pos = telldir(dirp->dir); + return rb_int2inum(pos); +#else + rb_notimplement(); +#endif +} + +/* + * call-seq: + * dir.seek( integer ) => dir + * + * Seeks to a particular location in dir. integer + * must be a value returned by Dir#tell. + * + * d = Dir.new("testdir") #=> # + * d.read #=> "." + * i = d.tell #=> 12 + * d.read #=> ".." + * d.seek(i) #=> # + * d.read #=> ".." + */ +static VALUE +dir_seek(VALUE dir, VALUE pos) +{ + struct dir_data *dirp; + off_t p = NUM2OFFT(pos); + + GetDIR(dir, dirp); +#ifdef HAVE_SEEKDIR + seekdir(dirp->dir, p); + return dir; +#else + rb_notimplement(); +#endif +} + +/* + * call-seq: + * dir.pos( integer ) => integer + * + * Synonym for Dir#seek, but returns the position + * parameter. + * + * d = Dir.new("testdir") #=> # + * d.read #=> "." + * i = d.pos #=> 12 + * d.read #=> ".." + * d.pos = i #=> 12 + * d.read #=> ".." + */ +static VALUE +dir_set_pos(VALUE dir, VALUE pos) +{ + dir_seek(dir, pos); + return pos; +} + +/* + * call-seq: + * dir.rewind => dir + * + * Repositions dir to the first entry. + * + * d = Dir.new("testdir") + * d.read #=> "." + * d.rewind #=> # + * d.read #=> "." + */ +static VALUE +dir_rewind(VALUE dir) +{ + struct dir_data *dirp; + + if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(dir)) { + rb_raise(rb_eSecurityError, "Insecure: can't close"); + } + GetDIR(dir, dirp); + rewinddir(dirp->dir); + return dir; +} + +/* + * call-seq: + * dir.close => nil + * + * Closes the directory stream. Any further attempts to access + * dir will raise an IOError. + * + * d = Dir.new("testdir") + * d.close #=> nil + */ +static VALUE +dir_close(VALUE dir) +{ + struct dir_data *dirp; + + GetDIR(dir, dirp); + closedir(dirp->dir); + dirp->dir = NULL; + + return Qnil; +} + +static void +dir_chdir(VALUE path) +{ + if (chdir(RSTRING_PTR(path)) < 0) + rb_sys_fail(RSTRING_PTR(path)); +} + +static int chdir_blocking = 0; +static VALUE chdir_thread = Qnil; + +struct chdir_data { + VALUE old_path, new_path; + int done; +}; + +static VALUE +chdir_yield(struct chdir_data *args) +{ + dir_chdir(args->new_path); + args->done = Qtrue; + chdir_blocking++; + if (chdir_thread == Qnil) + chdir_thread = rb_thread_current(); + return rb_yield(args->new_path); +} + +static VALUE +chdir_restore(struct chdir_data *args) +{ + if (args->done) { + chdir_blocking--; + if (chdir_blocking == 0) + chdir_thread = Qnil; + dir_chdir(args->old_path); + } + return Qnil; +} + +/* + * call-seq: + * Dir.chdir( [ string] ) => 0 + * Dir.chdir( [ string] ) {| path | block } => anObject + * + * Changes the current working directory of the process to the given + * string. When called without an argument, changes the directory to + * the value of the environment variable HOME, or + * LOGDIR. SystemCallError (probably + * Errno::ENOENT) if the target directory does not exist. + * + * If a block is given, it is passed the name of the new current + * directory, and the block is executed with that as the current + * directory. The original working directory is restored when the block + * exits. The return value of chdir is the value of the + * block. chdir blocks can be nested, but in a + * multi-threaded program an error will be raised if a thread attempts + * to open a chdir block while another thread has one + * open. + * + * Dir.chdir("/var/spool/mail") + * puts Dir.pwd + * Dir.chdir("/tmp") do + * puts Dir.pwd + * Dir.chdir("/usr") do + * puts Dir.pwd + * end + * puts Dir.pwd + * end + * puts Dir.pwd + * + * produces: + * + * /var/spool/mail + * /tmp + * /usr + * /tmp + * /var/spool/mail + */ +static VALUE +dir_s_chdir(int argc, VALUE *argv, VALUE obj) +{ + VALUE path = Qnil; + + rb_secure(2); + if (rb_scan_args(argc, argv, "01", &path) == 1) { + FilePathValue(path); + } + else { + const char *dist = getenv("HOME"); + if (!dist) { + dist = getenv("LOGDIR"); + if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set"); + } + path = rb_str_new2(dist); + } + + if (chdir_blocking > 0) { + if (!rb_block_given_p() || rb_thread_current() != chdir_thread) + rb_warn("conflicting chdir during another chdir block"); + } + + if (rb_block_given_p()) { + struct chdir_data args; + char *cwd = my_getcwd(); + + args.old_path = rb_tainted_str_new2(cwd); xfree(cwd); + args.new_path = path; + args.done = Qfalse; + return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args); + } + dir_chdir(path); + + return INT2FIX(0); +} + +/* + * call-seq: + * Dir.getwd => string + * Dir.pwd => string + * + * Returns the path to the current working directory of this process as + * a string. + * + * Dir.chdir("/tmp") #=> 0 + * Dir.getwd #=> "/tmp" + */ +static VALUE +dir_s_getwd(VALUE dir) +{ + char *path; + VALUE cwd; + + rb_secure(4); + path = my_getcwd(); + cwd = rb_tainted_str_new2(path); + + xfree(path); + return cwd; +} + +static void +check_dirname(volatile VALUE *dir) +{ + char *path, *pend; + + rb_secure(2); + FilePathValue(*dir); + path = RSTRING_PTR(*dir); + if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) { + *dir = rb_str_new(path, pend - path); + } +} + +/* + * call-seq: + * Dir.chroot( string ) => 0 + * + * Changes this process's idea of the file system root. Only a + * privileged process may make this call. Not available on all + * platforms. On Unix systems, see chroot(2) for more + * information. + */ +static VALUE +dir_s_chroot(VALUE dir, VALUE path) +{ +#if defined(HAVE_CHROOT) && !defined(__CHECKER__) + check_dirname(&path); + + if (chroot(RSTRING_PTR(path)) == -1) + rb_sys_fail(RSTRING_PTR(path)); + + return INT2FIX(0); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +/* + * call-seq: + * Dir.mkdir( string [, integer] ) => 0 + * + * Makes a new directory named by string, with permissions + * specified by the optional parameter anInteger. The + * permissions may be modified by the value of + * File::umask, and are ignored on NT. Raises a + * SystemCallError if the directory cannot be created. See + * also the discussion of permissions in the class documentation for + * File. + * + */ +static VALUE +dir_s_mkdir(int argc, VALUE *argv, VALUE obj) +{ + VALUE path, vmode; + int mode; + + if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) { + mode = NUM2INT(vmode); + } + else { + mode = 0777; + } + + check_dirname(&path); + if (mkdir(RSTRING_PTR(path), mode) == -1) + rb_sys_fail(RSTRING_PTR(path)); + + return INT2FIX(0); +} + +/* + * call-seq: + * Dir.delete( string ) => 0 + * Dir.rmdir( string ) => 0 + * Dir.unlink( string ) => 0 + * + * Deletes the named directory. Raises a subclass of + * SystemCallError if the directory isn't empty. + */ +static VALUE +dir_s_rmdir(VALUE obj, VALUE dir) +{ + check_dirname(&dir); + if (rmdir(RSTRING_PTR(dir)) < 0) + rb_sys_fail(RSTRING_PTR(dir)); + + return INT2FIX(0); +} + +static void +sys_warning_1(const char* mesg) +{ + rb_sys_warning("%s", mesg); +} + +#define GLOB_VERBOSE (1UL << (sizeof(int) * CHAR_BIT - 1)) +#define sys_warning(val) \ + (void)((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))sys_warning_1, (VALUE)(val), 0)) + +#define GLOB_ALLOC(type) (type *)malloc(sizeof(type)) +#define GLOB_ALLOC_N(type, n) (type *)malloc(sizeof(type) * (n)) +#define GLOB_FREE(ptr) free(ptr) +#define GLOB_JUMP_TAG(status) ((status == -1) ? rb_memerror() : rb_jump_tag(status)) + +/* + * ENOTDIR can be returned by stat(2) if a non-leaf element of the path + * is not a directory. + */ +#define to_be_ignored(e) ((e) == ENOENT || (e) == ENOTDIR) + +/* System call with warning */ +static int +do_stat(const char *path, struct stat *pst, int flags) + +{ + int ret = stat(path, pst); + if (ret < 0 && !to_be_ignored(errno)) + sys_warning(path); + + return ret; +} + +static int +do_lstat(const char *path, struct stat *pst, int flags) +{ + int ret = lstat(path, pst); + if (ret < 0 && !to_be_ignored(errno)) + sys_warning(path); + + return ret; +} + +static DIR * +do_opendir(const char *path, int flags) +{ + DIR *dirp = opendir(path); + if (dirp == NULL && !to_be_ignored(errno)) + sys_warning(path); + + return dirp; +} + +/* Return nonzero if S has any special globbing chars in it. */ +static int +has_magic(const char *s, int flags, rb_encoding *enc) +{ + const int escape = !(flags & FNM_NOESCAPE); + const int nocase = flags & FNM_CASEFOLD; + + register const char *p = s; + register const char *pend = p + strlen(p); + register char c; + + while ((c = *p++) != 0) { + switch (c) { + case '*': + case '?': + case '[': + return 1; + + case '\\': + if (escape && !(c = *p++)) + return 0; + continue; + + default: + if (!FNM_SYSCASE && ISALPHA(c) && nocase) + return 1; + } + + p = Next(p-1, pend, enc); + } + + return 0; +} + +/* Find separator in globbing pattern. */ +static char * +find_dirsep(const char *s, int flags, rb_encoding *enc) +{ + const int escape = !(flags & FNM_NOESCAPE); + + register const char *p = s; + register const char *pend = p + strlen(p); + register char c; + int open = 0; + + while ((c = *p++) != 0) { + switch (c) { + case '[': + open = 1; + continue; + case ']': + open = 0; + continue; + + case '/': + if (!open) + return (char *)p-1; + continue; + + case '\\': + if (escape && !(c = *p++)) + return (char *)p-1; + continue; + } + + p = Next(p-1, pend, enc); + } + + return (char *)p-1; +} + +/* Remove escaping backslashes */ +static void +remove_backslashes(char *p, rb_encoding *enc) +{ + register const char *pend = p + strlen(p); + char *t = p; + char *s = p; + + while (*p) { + if (*p == '\\') { + if (t != s) + memmove(t, s, p - s); + t += p - s; + s = ++p; + if (!*p) break; + } + Inc(p, pend, enc); + } + + while (*p++); + + if (t != s) + memmove(t, s, p - s); /* move '\0' too */ +} + +/* Globing pattern */ +enum glob_pattern_type { PLAIN, MAGICAL, RECURSIVE, MATCH_ALL, MATCH_DIR }; + +struct glob_pattern { + char *str; + enum glob_pattern_type type; + struct glob_pattern *next; +}; + +static void glob_free_pattern(struct glob_pattern *list); + +static struct glob_pattern * +glob_make_pattern(const char *p, int flags, rb_encoding *enc) +{ + struct glob_pattern *list, *tmp, **tail = &list; + int dirsep = 0; /* pattern is terminated with '/' */ + + while (*p) { + tmp = GLOB_ALLOC(struct glob_pattern); + if (!tmp) goto error; + if (p[0] == '*' && p[1] == '*' && p[2] == '/') { + /* fold continuous RECURSIVEs (needed in glob_helper) */ + do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/'); + tmp->type = RECURSIVE; + tmp->str = 0; + dirsep = 1; + } + else { + const char *m = find_dirsep(p, flags, enc); + char *buf = GLOB_ALLOC_N(char, m-p+1); + if (!buf) { + GLOB_FREE(tmp); + goto error; + } + memcpy(buf, p, m-p); + buf[m-p] = '\0'; + tmp->type = has_magic(buf, flags, enc) ? MAGICAL : PLAIN; + tmp->str = buf; + if (*m) { + dirsep = 1; + p = m + 1; + } + else { + dirsep = 0; + p = m; + } + } + *tail = tmp; + tail = &tmp->next; + } + + tmp = GLOB_ALLOC(struct glob_pattern); + if (!tmp) { + error: + *tail = 0; + glob_free_pattern(list); + return 0; + } + tmp->type = dirsep ? MATCH_DIR : MATCH_ALL; + tmp->str = 0; + *tail = tmp; + tmp->next = 0; + + return list; +} + +static void +glob_free_pattern(struct glob_pattern *list) +{ + while (list) { + struct glob_pattern *tmp = list; + list = list->next; + if (tmp->str) + GLOB_FREE(tmp->str); + GLOB_FREE(tmp); + } +} + +static char * +join_path(const char *path, int dirsep, const char *name) +{ + long len = strlen(path); + char *buf = GLOB_ALLOC_N(char, len+strlen(name)+(dirsep?1:0)+1); + + if (!buf) return 0; + memcpy(buf, path, len); + if (dirsep) { + strcpy(buf+len, "/"); + len++; + } + strcpy(buf+len, name); + return buf; +} + +enum answer { YES, NO, UNKNOWN }; + +#ifndef S_ISDIR +# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISLNK +# ifndef S_IFLNK +# define S_ISLNK(m) (0) +# else +# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) +# endif +#endif + +struct glob_args { + void (*func)(const char *, VALUE, void *); + const char *path; + VALUE value; + rb_encoding *enc; +}; + +static VALUE +glob_func_caller(VALUE val) +{ + struct glob_args *args = (struct glob_args *)val; + + (*args->func)(args->path, args->value, args->enc); + return Qnil; +} + +#define glob_call_func(func, path, arg, enc) (*func)(path, arg, enc) + +static int +glob_helper( + const char *path, + int dirsep, /* '/' should be placed before appending child entry's name to 'path'. */ + enum answer exist, /* Does 'path' indicate an existing entry? */ + enum answer isdir, /* Does 'path' indicate a directory or a symlink to a directory? */ + struct glob_pattern **beg, + struct glob_pattern **end, + int flags, + ruby_glob_func *func, + VALUE arg, + rb_encoding *enc) +{ + struct stat st; + int status = 0; + struct glob_pattern **cur, **new_beg, **new_end; + int plain = 0, magical = 0, recursive = 0, match_all = 0, match_dir = 0; + int escape = !(flags & FNM_NOESCAPE); + + for (cur = beg; cur < end; ++cur) { + struct glob_pattern *p = *cur; + if (p->type == RECURSIVE) { + recursive = 1; + p = p->next; + } + switch (p->type) { + case PLAIN: + plain = 1; + break; + case MAGICAL: + magical = 1; + break; + case MATCH_ALL: + match_all = 1; + break; + case MATCH_DIR: + match_dir = 1; + break; + case RECURSIVE: + rb_bug("continuous RECURSIVEs"); + } + } + + if (*path) { + if (match_all && exist == UNKNOWN) { + if (do_lstat(path, &st, flags) == 0) { + exist = YES; + isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO; + } + else { + exist = NO; + isdir = NO; + } + } + if (match_dir && isdir == UNKNOWN) { + if (do_stat(path, &st, flags) == 0) { + exist = YES; + isdir = S_ISDIR(st.st_mode) ? YES : NO; + } + else { + exist = NO; + isdir = NO; + } + } + if (match_all && exist == YES) { + status = glob_call_func(func, path, arg, enc); + if (status) return status; + } + if (match_dir && isdir == YES) { + char *tmp = join_path(path, dirsep, ""); + if (!tmp) return -1; + status = glob_call_func(func, tmp, arg, enc); + GLOB_FREE(tmp); + if (status) return status; + } + } + + if (exist == NO || isdir == NO) return 0; + + if (magical || recursive) { + struct dirent *dp; + DIR *dirp = do_opendir(*path ? path : ".", flags); + if (dirp == NULL) return 0; + + for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { + char *buf = join_path(path, dirsep, dp->d_name); + enum answer new_isdir = UNKNOWN; + + if (!buf) { + status = -1; + break; + } + if (recursive && strcmp(dp->d_name, ".") != 0 && strcmp(dp->d_name, "..") != 0 + && fnmatch("*", rb_usascii_encoding(), dp->d_name, flags) == 0) { +#ifndef _WIN32 + if (do_lstat(buf, &st, flags) == 0) + new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO; + else + new_isdir = NO; +#else + new_isdir = dp->d_isdir ? (!dp->d_isrep ? YES : UNKNOWN) : NO; +#endif + } + + new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, (end - beg) * 2); + if (!new_beg) { + GLOB_FREE(buf); + status = -1; + break; + } + + for (cur = beg; cur < end; ++cur) { + struct glob_pattern *p = *cur; + if (p->type == RECURSIVE) { + if (new_isdir == YES) /* not symlink but real directory */ + *new_end++ = p; /* append recursive pattern */ + p = p->next; /* 0 times recursion */ + } + if (p->type == PLAIN || p->type == MAGICAL) { + if (fnmatch(p->str, enc, dp->d_name, flags) == 0) + *new_end++ = p->next; + } + } + + status = glob_helper(buf, 1, YES, new_isdir, new_beg, new_end, + flags, func, arg, enc); + GLOB_FREE(buf); + GLOB_FREE(new_beg); + if (status) break; + } + + closedir(dirp); + } + else if (plain) { + struct glob_pattern **copy_beg, **copy_end, **cur2; + + copy_beg = copy_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg); + if (!copy_beg) return -1; + for (cur = beg; cur < end; ++cur) + *copy_end++ = (*cur)->type == PLAIN ? *cur : 0; + + for (cur = copy_beg; cur < copy_end; ++cur) { + if (*cur) { + char *buf; + char *name; + name = GLOB_ALLOC_N(char, strlen((*cur)->str) + 1); + if (!name) { + status = -1; + break; + } + strcpy(name, (*cur)->str); + if (escape) remove_backslashes(name, enc); + + new_beg = new_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg); + if (!new_beg) { + GLOB_FREE(name); + status = -1; + break; + } + *new_end++ = (*cur)->next; + for (cur2 = cur + 1; cur2 < copy_end; ++cur2) { + if (*cur2 && fnmatch((*cur2)->str, enc, name, flags) == 0) { + *new_end++ = (*cur2)->next; + *cur2 = 0; + } + } + + buf = join_path(path, dirsep, name); + GLOB_FREE(name); + if (!buf) { + GLOB_FREE(new_beg); + status = -1; + break; + } + status = glob_helper(buf, 1, UNKNOWN, UNKNOWN, new_beg, + new_end, flags, func, arg, enc); + GLOB_FREE(buf); + GLOB_FREE(new_beg); + if (status) break; + } + } + + GLOB_FREE(copy_beg); + } + + return status; +} + +static int +ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc) +{ + struct glob_pattern *list; + const char *root, *start; + char *buf; + int n; + int status; + + start = root = path; + flags |= FNM_SYSCASE; +#if defined DOSISH + root = rb_path_skip_prefix(root); +#endif + + if (root && *root == '/') root++; + + n = root - start; + buf = GLOB_ALLOC_N(char, n + 1); + if (!buf) return -1; + MEMCPY(buf, start, char, n); + buf[n] = '\0'; + + list = glob_make_pattern(root, flags, enc); + if (!list) { + GLOB_FREE(buf); + return -1; + } + status = glob_helper(buf, 0, UNKNOWN, UNKNOWN, &list, &list + 1, flags, func, arg, enc); + glob_free_pattern(list); + GLOB_FREE(buf); + + return status; +} + +int +ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg) +{ + return ruby_glob0(path, flags & ~GLOB_VERBOSE, func, arg, + rb_ascii8bit_encoding()); +} + +static int +rb_glob_caller(const char *path, VALUE a, void *enc) +{ + int status; + struct glob_args *args = (struct glob_args *)a; + + args->path = path; + rb_protect(glob_func_caller, a, &status); + return status; +} + +static int +rb_glob2(const char *path, int flags, + void (*func)(const char *, VALUE, void *), VALUE arg, + rb_encoding* enc) +{ + struct glob_args args; + + args.func = func; + args.value = arg; + args.enc = enc; + + if (flags & FNM_SYSCASE) { + rb_warning("Dir.glob() ignores File::FNM_CASEFOLD"); + } + + return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args, + enc); +} + +void +rb_glob(const char *path, void (*func)(const char *, VALUE, void *), VALUE arg) +{ + int status = rb_glob2(path, 0, func, arg, rb_ascii8bit_encoding()); + if (status) GLOB_JUMP_TAG(status); +} + +static void +push_pattern(const char *path, VALUE ary, void *enc) +{ + rb_ary_push(ary, rb_external_str_new_with_enc(path, strlen(path), enc)); +} + +static int +ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg, + rb_encoding *enc) +{ + const int escape = !(flags & FNM_NOESCAPE); + const char *p = str; + const char *pend = p + strlen(p); + const char *s = p; + const char *lbrace = 0, *rbrace = 0; + int nest = 0, status = 0; + + while (*p) { + if (*p == '{' && nest++ == 0) { + lbrace = p; + } + if (*p == '}' && --nest <= 0) { + rbrace = p; + break; + } + if (*p == '\\' && escape) { + if (!*++p) break; + } + Inc(p, pend, enc); + } + + if (lbrace && rbrace) { + char *buf = GLOB_ALLOC_N(char, strlen(s) + 1); + long shift; + + if (!buf) return -1; + memcpy(buf, s, lbrace-s); + shift = (lbrace-s); + p = lbrace; + while (p < rbrace) { + const char *t = ++p; + nest = 0; + while (p < rbrace && !(*p == ',' && nest == 0)) { + if (*p == '{') nest++; + if (*p == '}') nest--; + if (*p == '\\' && escape) { + if (++p == rbrace) break; + } + Inc(p, pend, enc); + } + memcpy(buf+shift, t, p-t); + strcpy(buf+shift+(p-t), rbrace+1); + status = ruby_brace_expand(buf, flags, func, arg, enc); + if (status) break; + } + GLOB_FREE(buf); + } + else if (!lbrace && !rbrace) { + status = (*func)(s, arg, enc); + } + + return status; +} + +struct brace_args { + ruby_glob_func *func; + VALUE value; + int flags; +}; + +static int +glob_brace(const char *path, VALUE val, void *enc) +{ + struct brace_args *arg = (struct brace_args *)val; + + return ruby_glob0(path, arg->flags, arg->func, arg->value, enc); +} + +static int +ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg, + rb_encoding* enc) +{ + struct brace_args args; + + args.func = func; + args.value = arg; + args.flags = flags; + return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc); +} + +int +ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg) +{ + return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg, + rb_ascii8bit_encoding()); +} + +static int +push_glob(VALUE ary, VALUE str, int flags) +{ + struct glob_args args; + rb_encoding *enc = rb_enc_get(str); + + if (enc == rb_usascii_encoding()) enc = rb_filesystem_encoding(); + args.func = push_pattern; + args.value = ary; + args.enc = enc; + + return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE, + rb_glob_caller, (VALUE)&args, enc); +} + +static VALUE +rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */ +{ + long offset = 0; + VALUE ary; + + StringValue(str); + ary = rb_ary_new(); + + while (offset < RSTRING_LEN(str)) { + char *p, *pend; + int status; + p = RSTRING_PTR(str) + offset; + status = push_glob(ary, rb_enc_str_new(p, strlen(p), rb_enc_get(str)), + flags); + if (status) GLOB_JUMP_TAG(status); + if (offset >= RSTRING_LEN(str)) break; + p += strlen(p) + 1; + pend = RSTRING_PTR(str) + RSTRING_LEN(str); + while (p < pend && !*p) + p++; + offset = p - RSTRING_PTR(str); + } + + return ary; +} + +static VALUE +dir_globs(long argc, VALUE *argv, int flags) +{ + VALUE ary = rb_ary_new(); + long i; + + for (i = 0; i < argc; ++i) { + int status; + VALUE str = argv[i]; + SafeStringValue(str); + status = push_glob(ary, str, flags); + if (status) GLOB_JUMP_TAG(status); + } + + return ary; +} + +/* + * call-seq: + * Dir[ array ] => array + * Dir[ string [, string ...] ] => array + * + * Equivalent to calling + * Dir.glob(array,0) and + * Dir.glob([string,...],0). + * + */ +static VALUE +dir_s_aref(int argc, VALUE *argv, VALUE obj) +{ + if (argc == 1) { + return rb_push_glob(argv[0], 0); + } + return dir_globs(argc, argv, 0); +} + +/* + * call-seq: + * Dir.glob( pattern, [flags] ) => array + * Dir.glob( pattern, [flags] ) {| filename | block } => nil + * + * Returns the filenames found by expanding pattern which is + * an +Array+ of the patterns or the pattern +String+, either as an + * array or as parameters to the block. Note that this pattern + * is not a regexp (it's closer to a shell glob). See + * File::fnmatch for the meaning of the flags + * parameter. Note that case sensitivity depends on your system (so + * File::FNM_CASEFOLD is ignored) + * + * *:: Matches any file. Can be restricted by + * other values in the glob. * + * will match all files; c* will + * match all files beginning with + * c; *c will match + * all files ending with c; and + * *c* will match all files that + * have c in them (including at + * the beginning or end). Equivalent to + * / .* /x in regexp. + * **:: Matches directories recursively. + * ?:: Matches any one character. Equivalent to + * /.{1}/ in regexp. + * [set]:: Matches any one character in +set+. + * Behaves exactly like character sets in + * Regexp, including set negation + * ([^a-z]). + * {p,q}:: Matches either literal p or + * literal q. Matching literals + * may be more than one character in length. + * More than two literals may be specified. + * Equivalent to pattern alternation in + * regexp. + * \:: Escapes the next metacharacter. + * + * Dir["config.?"] #=> ["config.h"] + * Dir.glob("config.?") #=> ["config.h"] + * Dir.glob("*.[a-z][a-z]") #=> ["main.rb"] + * Dir.glob("*.[^r]*") #=> ["config.h"] + * Dir.glob("*.{rb,h}") #=> ["main.rb", "config.h"] + * Dir.glob("*") #=> ["config.h", "main.rb"] + * Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"] + * + * rbfiles = File.join("**", "*.rb") + * Dir.glob(rbfiles) #=> ["main.rb", + * # "lib/song.rb", + * # "lib/song/karaoke.rb"] + * libdirs = File.join("**", "lib") + * Dir.glob(libdirs) #=> ["lib"] + * + * librbfiles = File.join("**", "lib", "**", "*.rb") + * Dir.glob(librbfiles) #=> ["lib/song.rb", + * # "lib/song/karaoke.rb"] + * + * librbfiles = File.join("**", "lib", "*.rb") + * Dir.glob(librbfiles) #=> ["lib/song.rb"] + */ +static VALUE +dir_s_glob(int argc, VALUE *argv, VALUE obj) +{ + VALUE str, rflags, ary; + int flags; + + if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2) + flags = NUM2INT(rflags); + else + flags = 0; + + ary = rb_check_array_type(str); + if (NIL_P(ary)) { + ary = rb_push_glob(str, flags); + } + else { + volatile VALUE v = ary; + ary = dir_globs(RARRAY_LEN(v), RARRAY_PTR(v), flags); + } + + if (rb_block_given_p()) { + rb_ary_each(ary); + return Qnil; + } + return ary; +} + +static VALUE +dir_open_dir(int argc, VALUE *argv) +{ + VALUE dir = rb_funcall2(rb_cDir, rb_intern("open"), argc, argv); + + if (TYPE(dir) != T_DATA || + RDATA(dir)->dfree != (RUBY_DATA_FUNC)free_dir) { + rb_raise(rb_eTypeError, "wrong argument type %s (expected Dir)", + rb_obj_classname(dir)); + } + return dir; +} + + +/* + * call-seq: + * Dir.foreach( dirname ) {| filename | block } => nil + * + * Calls the block once for each entry in the named directory, passing + * the filename of each entry as a parameter to the block. + * + * Dir.foreach("testdir") {|x| puts "Got #{x}" } + * + * produces: + * + * Got . + * Got .. + * Got config.h + * Got main.rb + * + */ +static VALUE +dir_foreach(int argc, VALUE *argv, VALUE io) +{ + VALUE dir; + + RETURN_ENUMERATOR(io, argc, argv); + dir = dir_open_dir(argc, argv); + rb_ensure(dir_each, dir, dir_close, dir); + return Qnil; +} + +/* + * call-seq: + * Dir.entries( dirname ) => array + * + * Returns an array containing all of the filenames in the given + * directory. Will raise a SystemCallError if the named + * directory doesn't exist. + * + * Dir.entries("testdir") #=> [".", "..", "config.h", "main.rb"] + * + */ +static VALUE +dir_entries(int argc, VALUE *argv, VALUE io) +{ + VALUE dir; + + dir = dir_open_dir(argc, argv); + return rb_ensure(rb_Array, dir, dir_close, dir); +} + +/* + * call-seq: + * File.fnmatch( pattern, path, [flags] ) => (true or false) + * File.fnmatch?( pattern, path, [flags] ) => (true or false) + * + * Returns true if path matches against pattern The + * pattern is not a regular expression; instead it follows rules + * similar to shell filename globbing. It may contain the following + * metacharacters: + * + * *:: Matches any file. Can be restricted by + * other values in the glob. * + * will match all files; c* will + * match all files beginning with + * c; *c will match + * all files ending with c; and + * *c* will match all files that + * have c in them (including at + * the beginning or end). Equivalent to + * / .* /x in regexp. + * **:: Matches directories recursively or files + * expansively. + * ?:: Matches any one character. Equivalent to + * /.{1}/ in regexp. + * [set]:: Matches any one character in +set+. + * Behaves exactly like character sets in + * Regexp, including set negation + * ([^a-z]). + * \:: Escapes the next metacharacter. + * + * flags is a bitwise OR of the FNM_xxx + * parameters. The same glob pattern and flags are used by + * Dir::glob. + * + * File.fnmatch('cat', 'cat') #=> true # match entire string + * File.fnmatch('cat', 'category') #=> false # only match partial string + * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported + * + * File.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character + * File.fnmatch('c??t', 'cat') #=> false # ditto + * File.fnmatch('c*', 'cats') #=> true # '*' match 0 or more characters + * File.fnmatch('c*t', 'c/a/b/t') #=> true # ditto + * File.fnmatch('ca[a-z]', 'cat') #=> true # inclusive bracket expression + * File.fnmatch('ca[^t]', 'cat') #=> false # exclusive bracket expression ('^' or '!') + * + * File.fnmatch('cat', 'CAT') #=> false # case sensitive + * File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true # case insensitive + * + * File.fnmatch('?', '/', File::FNM_PATHNAME) #=> false # wildcard doesn't match '/' on FNM_PATHNAME + * File.fnmatch('*', '/', File::FNM_PATHNAME) #=> false # ditto + * File.fnmatch('[/]', '/', File::FNM_PATHNAME) #=> false # ditto + * + * File.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary + * File.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary + * File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESACPE makes '\' ordinary + * File.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression + * + * File.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading + * File.fnmatch('*', '.profile', File::FNM_DOTMATCH) #=> true # period by default. + * File.fnmatch('.*', '.profile') #=> true + * + * rbfiles = '**' '/' '*.rb' # you don't have to do like this. just write in single string. + * File.fnmatch(rbfiles, 'main.rb') #=> false + * File.fnmatch(rbfiles, './main.rb') #=> false + * File.fnmatch(rbfiles, 'lib/song.rb') #=> true + * File.fnmatch('**.rb', 'main.rb') #=> true + * File.fnmatch('**.rb', './main.rb') #=> false + * File.fnmatch('**.rb', 'lib/song.rb') #=> true + * File.fnmatch('*', 'dave/.profile') #=> true + * + * pattern = '*' '/' '*' + * File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME) #=> false + * File.fnmatch(pattern, 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true + * + * pattern = '**' '/' 'foo' + * File.fnmatch(pattern, 'a/b/c/foo', File::FNM_PATHNAME) #=> true + * File.fnmatch(pattern, '/a/b/c/foo', File::FNM_PATHNAME) #=> true + * File.fnmatch(pattern, 'c:/a/b/c/foo', File::FNM_PATHNAME) #=> true + * File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME) #=> false + * File.fnmatch(pattern, 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true + */ +static VALUE +file_s_fnmatch(int argc, VALUE *argv, VALUE obj) +{ + VALUE pattern, path; + VALUE rflags; + int flags; + + if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3) + flags = NUM2INT(rflags); + else + flags = 0; + + StringValue(pattern); + FilePathStringValue(path); + + if (fnmatch(RSTRING_PTR(pattern), rb_enc_get(pattern), RSTRING_PTR(path), + flags) == 0) + return Qtrue; + + return Qfalse; +} + +/* + * Objects of class Dir are directory streams representing + * directories in the underlying file system. They provide a variety of + * ways to list directories and their contents. See also + * File. + * + * The directory used in these examples contains the two regular files + * (config.h and main.rb), the parent + * directory (..), and the directory itself + * (.). + */ +void +Init_Dir(void) +{ + rb_cDir = rb_define_class("Dir", rb_cObject); + + rb_include_module(rb_cDir, rb_mEnumerable); + + rb_define_alloc_func(rb_cDir, dir_s_alloc); + rb_define_singleton_method(rb_cDir, "open", dir_s_open, -1); + rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, -1); + rb_define_singleton_method(rb_cDir, "entries", dir_entries, -1); + + rb_define_method(rb_cDir,"initialize", dir_initialize, -1); + rb_define_method(rb_cDir,"path", dir_path, 0); + rb_define_method(rb_cDir,"inspect", dir_inspect, 0); + rb_define_method(rb_cDir,"read", dir_read, 0); + rb_define_method(rb_cDir,"each", dir_each, 0); + rb_define_method(rb_cDir,"rewind", dir_rewind, 0); + rb_define_method(rb_cDir,"tell", dir_tell, 0); + rb_define_method(rb_cDir,"seek", dir_seek, 1); + rb_define_method(rb_cDir,"pos", dir_tell, 0); + rb_define_method(rb_cDir,"pos=", dir_set_pos, 1); + rb_define_method(rb_cDir,"close", dir_close, 0); + + rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1); + rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0); + rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0); + rb_define_singleton_method(rb_cDir,"chroot", dir_s_chroot, 1); + rb_define_singleton_method(rb_cDir,"mkdir", dir_s_mkdir, -1); + rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1); + rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1); + rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1); + + rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1); + rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1); + rb_define_singleton_method(rb_cDir,"exist?", rb_file_directory_p, 1); /* in file.c */ + rb_define_singleton_method(rb_cDir,"exists?", rb_file_directory_p, 1); /* in file.c */ + + rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1); + rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1); + + rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE)); + rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME)); + rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH)); + rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD)); + rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE)); +} diff --git a/lib/ruby-1.9.1-rc1/dln.c b/lib/ruby-1.9.1-rc1/dln.c new file mode 100644 index 0000000..e5fbcaa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dln.c @@ -0,0 +1,1686 @@ +/********************************************************************** + + dln.c - + + $Author: yugui $ + created at: Tue Jan 18 17:05:06 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "dln.h" + +#ifdef HAVE_STDLIB_H +# include +#endif + +#ifdef __CHECKER__ +#undef HAVE_DLOPEN +#undef USE_DLN_A_OUT +#undef USE_DLN_DLOPEN +#endif + +#ifdef USE_DLN_A_OUT +char *dln_argv0; +#endif + +#if defined(HAVE_ALLOCA_H) +#include +#endif + +#ifdef HAVE_STRING_H +# include +#else +# include +#endif + +#ifndef xmalloc +void *xmalloc(); +void *xcalloc(); +void *xrealloc(); +#endif + +#define free(x) xfree(x) + +#include +#if defined(_WIN32) +#include "missing/file.h" +#endif +#include +#include + +#ifndef S_ISDIR +# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) +#endif + +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef _WIN32 +char *getenv(); +#endif + +#if defined(__APPLE__) && defined(__MACH__) /* Mac OS X */ +# if defined(HAVE_DLOPEN) + /* Mac OS X with dlopen (10.3 or later) */ +# define MACOSX_DLOPEN +# else +# define MACOSX_DYLD +# endif +#endif + +#ifdef __BEOS__ +# include +#endif + +#ifndef NO_DLN_LOAD + +#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(MACOSX_DYLD) && !defined(_UNICOSMP) +/* dynamic load with dlopen() */ +# define USE_DLN_DLOPEN +#endif + +#ifndef FUNCNAME_PATTERN +# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(MACOSX_DYLD) +# define FUNCNAME_PATTERN "_Init_%s" +# else +# define FUNCNAME_PATTERN "Init_%s" +# endif +#endif + +static int +init_funcname_len(char **buf, const char *file) +{ + char *p; + const char *slash; + int len; + + /* Load the file as an object one */ + for (slash = file-1; *file; file++) /* Find position of last '/' */ + if (*file == '/') slash = file; + + len = strlen(FUNCNAME_PATTERN) + strlen(slash + 1); + *buf = xmalloc(len); + snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1); + for (p = *buf; *p; p++) { /* Delete suffix if it exists */ + if (*p == '.') { + *p = '\0'; break; + } + } + return p - *buf; +} + +#define init_funcname(buf, file) do {\ + int len = init_funcname_len(buf, file);\ + char *tmp = ALLOCA_N(char, len+1);\ + if (!tmp) {\ + free(*buf);\ + rb_memerror();\ + }\ + strcpy(tmp, *buf);\ + free(*buf);\ + *buf = tmp;\ +} while (0) + +#ifdef USE_DLN_A_OUT + +#ifndef LIBC_NAME +# define LIBC_NAME "libc.a" +#endif + +#ifndef DLN_DEFAULT_LIB_PATH +# define DLN_DEFAULT_LIB_PATH "/lib:/usr/lib:/usr/local/lib:." +#endif + +#include + +static int dln_errno; + +#define DLN_ENOEXEC ENOEXEC /* Exec format error */ +#define DLN_ECONFL 1201 /* Symbol name conflict */ +#define DLN_ENOINIT 1202 /* No initializer given */ +#define DLN_EUNDEF 1203 /* Undefine symbol remains */ +#define DLN_ENOTLIB 1204 /* Not a library file */ +#define DLN_EBADLIB 1205 /* Malformed library file */ +#define DLN_EINIT 1206 /* Not initialized */ + +static int dln_init_p = 0; + +#include +#include +#ifndef N_COMM +# define N_COMM 0x12 +#endif +#ifndef N_MAGIC +# define N_MAGIC(x) (x).a_magic +#endif + +#define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC) + +#include "ruby/util.h" +#include "ruby/st.h" + +static st_table *sym_tbl; +static st_table *undef_tbl; + +static int load_lib(); + +static int +load_header(int fd, struct exec *hdrp, long disp) +{ + int size; + + lseek(fd, disp, 0); + size = read(fd, hdrp, sizeof(struct exec)); + if (size == -1) { + dln_errno = errno; + return -1; + } + if (size != sizeof(struct exec) || N_BADMAG(*hdrp)) { + dln_errno = DLN_ENOEXEC; + return -1; + } + return 0; +} + +#if defined(sequent) +#define RELOC_SYMBOL(r) ((r)->r_symbolnum) +#define RELOC_MEMORY_SUB_P(r) ((r)->r_bsr) +#define RELOC_PCREL_P(r) ((r)->r_pcrel || (r)->r_bsr) +#define RELOC_TARGET_SIZE(r) ((r)->r_length) +#endif + +/* Default macros */ +#ifndef RELOC_ADDRESS +#define RELOC_ADDRESS(r) ((r)->r_address) +#define RELOC_EXTERN_P(r) ((r)->r_extern) +#define RELOC_SYMBOL(r) ((r)->r_symbolnum) +#define RELOC_MEMORY_SUB_P(r) 0 +#define RELOC_PCREL_P(r) ((r)->r_pcrel) +#define RELOC_TARGET_SIZE(r) ((r)->r_length) +#endif + +#if defined(sun) && defined(sparc) +/* Sparc (Sun 4) macros */ +# undef relocation_info +# define relocation_info reloc_info_sparc +# define R_RIGHTSHIFT(r) (reloc_r_rightshift[(r)->r_type]) +# define R_BITSIZE(r) (reloc_r_bitsize[(r)->r_type]) +# define R_LENGTH(r) (reloc_r_length[(r)->r_type]) +static int reloc_r_rightshift[] = { + 0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 0, 0, 0, +}; +static int reloc_r_bitsize[] = { + 8, 16, 32, 8, 16, 32, 30, 22, 22, 22, 13, 10, 32, 32, 16, +}; +static int reloc_r_length[] = { + 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +}; +# define R_PCREL(r) \ + ((r)->r_type >= RELOC_DISP8 && (r)->r_type <= RELOC_WDISP22) +# define R_SYMBOL(r) ((r)->r_index) +#endif + +#if defined(sequent) +#define R_SYMBOL(r) ((r)->r_symbolnum) +#define R_MEMORY_SUB(r) ((r)->r_bsr) +#define R_PCREL(r) ((r)->r_pcrel || (r)->r_bsr) +#define R_LENGTH(r) ((r)->r_length) +#endif + +#ifndef R_SYMBOL +# define R_SYMBOL(r) ((r)->r_symbolnum) +# define R_MEMORY_SUB(r) 0 +# define R_PCREL(r) ((r)->r_pcrel) +# define R_LENGTH(r) ((r)->r_length) +#endif + +static struct relocation_info * +load_reloc(int fd, struct exec *hdrp, long disp) +{ + struct relocation_info *reloc; + int size; + + lseek(fd, disp + N_TXTOFF(*hdrp) + hdrp->a_text + hdrp->a_data, 0); + size = hdrp->a_trsize + hdrp->a_drsize; + reloc = (struct relocation_info*)xmalloc(size); + if (reloc == NULL) { + dln_errno = errno; + return NULL; + } + + if (read(fd, reloc, size) != size) { + dln_errno = errno; + free(reloc); + return NULL; + } + + return reloc; +} + +static struct nlist * +load_sym(int fd, struct exec *hdrp, long disp) +{ + struct nlist * buffer; + struct nlist * sym; + struct nlist * end; + long displ; + int size; + + lseek(fd, N_SYMOFF(*hdrp) + hdrp->a_syms + disp, 0); + if (read(fd, &size, sizeof(int)) != sizeof(int)) { + goto err_noexec; + } + + buffer = (struct nlist*)xmalloc(hdrp->a_syms + size); + if (buffer == NULL) { + dln_errno = errno; + return NULL; + } + + lseek(fd, disp + N_SYMOFF(*hdrp), 0); + if (read(fd, buffer, hdrp->a_syms + size) != hdrp->a_syms + size) { + free(buffer); + goto err_noexec; + } + + sym = buffer; + end = sym + hdrp->a_syms / sizeof(struct nlist); + displ = (long)buffer + (long)(hdrp->a_syms); + + while (sym < end) { + sym->n_un.n_name = (char*)sym->n_un.n_strx + displ; + sym++; + } + return buffer; + + err_noexec: + dln_errno = DLN_ENOEXEC; + return NULL; +} + +static st_table * +sym_hash(struct exec *hdrp, struct nlist *syms) +{ + st_table *tbl; + struct nlist *sym = syms; + struct nlist *end = syms + (hdrp->a_syms / sizeof(struct nlist)); + + tbl = st_init_strtable(); + if (tbl == NULL) { + dln_errno = errno; + return NULL; + } + + while (sym < end) { + st_insert(tbl, sym->n_un.n_name, sym); + sym++; + } + return tbl; +} + +static int +dln_init(const char *prog) +{ + char *file, fbuf[MAXPATHLEN]; + int fd; + struct exec hdr; + struct nlist *syms; + + if (dln_init_p == 1) return 0; + + file = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)); + if (file == NULL || (fd = open(file, O_RDONLY)) < 0) { + dln_errno = errno; + return -1; + } + + if (load_header(fd, &hdr, 0) == -1) return -1; + syms = load_sym(fd, &hdr, 0); + if (syms == NULL) { + close(fd); + return -1; + } + sym_tbl = sym_hash(&hdr, syms); + if (sym_tbl == NULL) { /* file may be start with #! */ + char c = '\0'; + char buf[MAXPATHLEN]; + char *p; + + free(syms); + lseek(fd, 0L, 0); + if (read(fd, &c, 1) == -1) { + dln_errno = errno; + return -1; + } + if (c != '#') goto err_noexec; + if (read(fd, &c, 1) == -1) { + dln_errno = errno; + return -1; + } + if (c != '!') goto err_noexec; + + p = buf; + /* skip forwarding spaces */ + while (read(fd, &c, 1) == 1) { + if (c == '\n') goto err_noexec; + if (c != '\t' && c != ' ') { + *p++ = c; + break; + } + } + /* read in command name */ + while (read(fd, p, 1) == 1) { + if (*p == '\n' || *p == '\t' || *p == ' ') break; + p++; + if (p-buf >= MAXPATHLEN) { + dln_errno = ENAMETOOLONG; + return -1; + } + } + *p = '\0'; + + return dln_init(buf); + } + dln_init_p = 1; + undef_tbl = st_init_strtable(); + close(fd); + return 0; + + err_noexec: + close(fd); + dln_errno = DLN_ENOEXEC; + return -1; +} + +static long +load_text_data(int fd, struct exec *hdrp, int bss, long disp) +{ + int size; + unsigned char* addr; + + lseek(fd, disp + N_TXTOFF(*hdrp), 0); + size = hdrp->a_text + hdrp->a_data; + + if (bss == -1) size += hdrp->a_bss; + else if (bss > 1) size += bss; + + addr = (unsigned char*)xmalloc(size); + if (addr == NULL) { + dln_errno = errno; + return 0; + } + + if (read(fd, addr, size) != size) { + dln_errno = errno; + free(addr); + return 0; + } + + if (bss == -1) { + memset(addr + hdrp->a_text + hdrp->a_data, 0, hdrp->a_bss); + } + else if (bss > 0) { + memset(addr + hdrp->a_text + hdrp->a_data, 0, bss); + } + + return (long)addr; +} + +static int +undef_print(char *key, char *value) +{ + fprintf(stderr, " %s\n", key); + return ST_CONTINUE; +} + +static void +dln_print_undef() +{ + fprintf(stderr, " Undefined symbols:\n"); + st_foreach(undef_tbl, undef_print, NULL); +} + +static void +dln_undefined() +{ + if (undef_tbl->num_entries > 0) { + fprintf(stderr, "dln: Calling undefined function\n"); + dln_print_undef(); + rb_exit(1); + } +} + +struct undef { + char *name; + struct relocation_info reloc; + long base; + char *addr; + union { + char c; + short s; + long l; + } u; +}; + +static st_table *reloc_tbl = NULL; +static void +link_undef(const char *name, long base, struct relocation_info *reloc) +{ + static int u_no = 0; + struct undef *obj; + char *addr = (char*)(reloc->r_address + base); + + obj = (struct undef*)xmalloc(sizeof(struct undef)); + obj->name = strdup(name); + obj->reloc = *reloc; + obj->base = base; + switch (R_LENGTH(reloc)) { + case 0: /* byte */ + obj->u.c = *addr; + break; + case 1: /* word */ + obj->u.s = *(short*)addr; + break; + case 2: /* long */ + obj->u.l = *(long*)addr; + break; + } + if (reloc_tbl == NULL) { + reloc_tbl = st_init_numtable(); + } + st_insert(reloc_tbl, u_no++, obj); +} + +struct reloc_arg { + const char *name; + long value; +}; + +static int +reloc_undef(int no, struct undef *undef, struct reloc_arg *arg) +{ + int datum; + char *address; +#if defined(sun) && defined(sparc) + unsigned int mask = 0; +#endif + + if (strcmp(arg->name, undef->name) != 0) return ST_CONTINUE; + address = (char*)(undef->base + undef->reloc.r_address); + datum = arg->value; + + if (R_PCREL(&(undef->reloc))) datum -= undef->base; +#if defined(sun) && defined(sparc) + datum += undef->reloc.r_addend; + datum >>= R_RIGHTSHIFT(&(undef->reloc)); + mask = (1 << R_BITSIZE(&(undef->reloc))) - 1; + mask |= mask -1; + datum &= mask; + switch (R_LENGTH(&(undef->reloc))) { + case 0: + *address = undef->u.c; + *address &= ~mask; + *address |= datum; + break; + case 1: + *(short *)address = undef->u.s; + *(short *)address &= ~mask; + *(short *)address |= datum; + break; + case 2: + *(long *)address = undef->u.l; + *(long *)address &= ~mask; + *(long *)address |= datum; + break; + } +#else + switch (R_LENGTH(&(undef->reloc))) { + case 0: /* byte */ + if (R_MEMORY_SUB(&(undef->reloc))) + *address = datum - *address; + else *address = undef->u.c + datum; + break; + case 1: /* word */ + if (R_MEMORY_SUB(&(undef->reloc))) + *(short*)address = datum - *(short*)address; + else *(short*)address = undef->u.s + datum; + break; + case 2: /* long */ + if (R_MEMORY_SUB(&(undef->reloc))) + *(long*)address = datum - *(long*)address; + else *(long*)address = undef->u.l + datum; + break; + } +#endif + free(undef->name); + free(undef); + return ST_DELETE; +} + +static void +unlink_undef(const char *name, long value) +{ + struct reloc_arg arg; + + arg.name = name; + arg.value = value; + st_foreach(reloc_tbl, reloc_undef, &arg); +} + +#ifdef N_INDR +struct indr_data { + char *name0, *name1; +}; + +static int +reloc_repl(int no, struct undef *undef, struct indr_data *data) +{ + if (strcmp(data->name0, undef->name) == 0) { + free(undef->name); + undef->name = strdup(data->name1); + } + return ST_CONTINUE; +} +#endif + +static int +load_1(int fd, long disp, const char *need_init) +{ + static const char *libc = LIBC_NAME; + struct exec hdr; + struct relocation_info *reloc = NULL; + long block = 0; + long new_common = 0; /* Length of new common */ + struct nlist *syms = NULL; + struct nlist *sym; + struct nlist *end; + int init_p = 0; + + if (load_header(fd, &hdr, disp) == -1) return -1; + if (INVALID_OBJECT(hdr)) { + dln_errno = DLN_ENOEXEC; + return -1; + } + reloc = load_reloc(fd, &hdr, disp); + if (reloc == NULL) return -1; + + syms = load_sym(fd, &hdr, disp); + if (syms == NULL) { + free(reloc); + return -1; + } + + sym = syms; + end = syms + (hdr.a_syms / sizeof(struct nlist)); + while (sym < end) { + struct nlist *old_sym; + int value = sym->n_value; + +#ifdef N_INDR + if (sym->n_type == (N_INDR | N_EXT)) { + char *key = sym->n_un.n_name; + + if (st_lookup(sym_tbl, sym[1].n_un.n_name, &old_sym)) { + if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) { + unlink_undef(key, old_sym->n_value); + free(key); + } + } + else { + struct indr_data data; + + data.name0 = sym->n_un.n_name; + data.name1 = sym[1].n_un.n_name; + st_foreach(reloc_tbl, reloc_repl, &data); + + st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL); + if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) { + free(key); + } + } + sym += 2; + continue; + } +#endif + if (sym->n_type == (N_UNDF | N_EXT)) { + if (st_lookup(sym_tbl, sym->n_un.n_name, &old_sym) == 0) { + old_sym = NULL; + } + + if (value) { + if (old_sym) { + sym->n_type = N_EXT | N_COMM; + sym->n_value = old_sym->n_value; + } + else { + int rnd = + value >= sizeof(double) ? sizeof(double) - 1 + : value >= sizeof(long) ? sizeof(long) - 1 + : sizeof(short) - 1; + + sym->n_type = N_COMM; + new_common += rnd; + new_common &= ~(long)rnd; + sym->n_value = new_common; + new_common += value; + } + } + else { + if (old_sym) { + sym->n_type = N_EXT | N_COMM; + sym->n_value = old_sym->n_value; + } + else { + sym->n_value = (long)dln_undefined; + st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL); + } + } + } + sym++; + } + + block = load_text_data(fd, &hdr, hdr.a_bss + new_common, disp); + if (block == 0) goto err_exit; + + sym = syms; + while (sym < end) { + struct nlist *new_sym; + char *key; + + switch (sym->n_type) { + case N_COMM: + sym->n_value += hdr.a_text + hdr.a_data; + case N_TEXT|N_EXT: + case N_DATA|N_EXT: + + sym->n_value += block; + + if (st_lookup(sym_tbl, sym->n_un.n_name, &new_sym) != 0 + && new_sym->n_value != (long)dln_undefined) { + dln_errno = DLN_ECONFL; + goto err_exit; + } + + key = sym->n_un.n_name; + if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) { + unlink_undef(key, sym->n_value); + free(key); + } + + new_sym = (struct nlist*)xmalloc(sizeof(struct nlist)); + *new_sym = *sym; + new_sym->n_un.n_name = strdup(sym->n_un.n_name); + st_insert(sym_tbl, new_sym->n_un.n_name, new_sym); + break; + + case N_TEXT: + case N_DATA: + sym->n_value += block; + break; + } + sym++; + } + + /* + * First comes the text-relocation + */ + { + struct relocation_info * rel = reloc; + struct relocation_info * rel_beg = reloc + + (hdr.a_trsize/sizeof(struct relocation_info)); + struct relocation_info * rel_end = reloc + + (hdr.a_trsize+hdr.a_drsize)/sizeof(struct relocation_info); + + while (rel < rel_end) { + char *address = (char*)(rel->r_address + block); + long datum = 0; +#if defined(sun) && defined(sparc) + unsigned int mask = 0; +#endif + + if(rel >= rel_beg) + address += hdr.a_text; + + if (rel->r_extern) { /* Look it up in symbol-table */ + sym = &(syms[R_SYMBOL(rel)]); + switch (sym->n_type) { + case N_EXT|N_UNDF: + link_undef(sym->n_un.n_name, block, rel); + case N_EXT|N_COMM: + case N_COMM: + datum = sym->n_value; + break; + default: + goto err_exit; + } + } /* end.. look it up */ + else { /* is static */ + switch (R_SYMBOL(rel)) { + case N_TEXT: + case N_DATA: + datum = block; + break; + case N_BSS: + datum = block + new_common; + break; + case N_ABS: + break; + } + } /* end .. is static */ + if (R_PCREL(rel)) datum -= block; + +#if defined(sun) && defined(sparc) + datum += rel->r_addend; + datum >>= R_RIGHTSHIFT(rel); + mask = (1 << R_BITSIZE(rel)) - 1; + mask |= mask -1; + datum &= mask; + + switch (R_LENGTH(rel)) { + case 0: + *address &= ~mask; + *address |= datum; + break; + case 1: + *(short *)address &= ~mask; + *(short *)address |= datum; + break; + case 2: + *(long *)address &= ~mask; + *(long *)address |= datum; + break; + } +#else + switch (R_LENGTH(rel)) { + case 0: /* byte */ + if (datum < -128 || datum > 127) goto err_exit; + *address += datum; + break; + case 1: /* word */ + *(short *)address += datum; + break; + case 2: /* long */ + *(long *)address += datum; + break; + } +#endif + rel++; + } + } + + if (need_init) { + int len; + char **libs_to_be_linked = 0; + char *buf; + + if (undef_tbl->num_entries > 0) { + if (load_lib(libc) == -1) goto err_exit; + } + + init_funcname(&buf, need_init); + len = strlen(buf); + + for (sym = syms; symn_un.n_name; + if (name[0] == '_' && sym->n_value >= block) { + if (strcmp(name+1, "dln_libs_to_be_linked") == 0) { + libs_to_be_linked = (char**)sym->n_value; + } + else if (strcmp(name+1, buf) == 0) { + init_p = 1; + ((int (*)())sym->n_value)(); + } + } + } + if (libs_to_be_linked && undef_tbl->num_entries > 0) { + while (*libs_to_be_linked) { + load_lib(*libs_to_be_linked); + libs_to_be_linked++; + } + } + } + free(reloc); + free(syms); + if (need_init) { + if (init_p == 0) { + dln_errno = DLN_ENOINIT; + return -1; + } + if (undef_tbl->num_entries > 0) { + if (load_lib(libc) == -1) goto err_exit; + if (undef_tbl->num_entries > 0) { + dln_errno = DLN_EUNDEF; + return -1; + } + } + } + return 0; + + err_exit: + if (syms) free(syms); + if (reloc) free(reloc); + if (block) free((char*)block); + return -1; +} + +static int target_offset; +static int +search_undef(const char *key, int value, st_table *lib_tbl) +{ + long offset; + + if (st_lookup(lib_tbl, key, &offset) == 0) return ST_CONTINUE; + target_offset = offset; + return ST_STOP; +} + +struct symdef { + int rb_str_index; + int lib_offset; +}; + +char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH; + +static int +load_lib(const char *lib) +{ + char *path, *file, fbuf[MAXPATHLEN]; + char armagic[SARMAG]; + int fd, size; + struct ar_hdr ahdr; + st_table *lib_tbl = NULL; + int *data, nsym; + struct symdef *base; + char *name_base; + + if (dln_init_p == 0) { + dln_errno = DLN_ENOINIT; + return -1; + } + + if (undef_tbl->num_entries == 0) return 0; + dln_errno = DLN_EBADLIB; + + if (lib[0] == '-' && lib[1] == 'l') { + long len = strlen(lib) + 4; + char *p = alloca(len); + snprintf(p, len, "lib%s.a", lib+2); + lib = p; + } + + /* library search path: */ + /* look for environment variable DLN_LIBRARY_PATH first. */ + /* then variable dln_librrb_ary_path. */ + /* if path is still NULL, use "." for path. */ + path = getenv("DLN_LIBRARY_PATH"); + if (path == NULL) path = dln_librrb_ary_path; + + file = dln_find_file_r(lib, path, fbuf, sizeof(fbuf)); + fd = open(file, O_RDONLY); + if (fd == -1) goto syserr; + size = read(fd, armagic, SARMAG); + if (size == -1) goto syserr; + + if (size != SARMAG) { + dln_errno = DLN_ENOTLIB; + goto badlib; + } + size = read(fd, &ahdr, sizeof(ahdr)); + if (size == -1) goto syserr; + if (size != sizeof(ahdr) || sscanf(ahdr.ar_size, "%d", &size) != 1) { + goto badlib; + } + + if (strncmp(ahdr.ar_name, "__.SYMDEF", 9) == 0) { + /* make hash table from __.SYMDEF */ + + lib_tbl = st_init_strtable(); + data = (int*)xmalloc(size); + if (data == NULL) goto syserr; + size = read(fd, data, size); + nsym = *data / sizeof(struct symdef); + base = (struct symdef*)(data + 1); + name_base = (char*)(base + nsym) + sizeof(int); + while (nsym > 0) { + char *name = name_base + base->rb_str_index; + + st_insert(lib_tbl, name, base->lib_offset + sizeof(ahdr)); + nsym--; + base++; + } + for (;;) { + target_offset = -1; + st_foreach(undef_tbl, search_undef, lib_tbl); + if (target_offset == -1) break; + if (load_1(fd, target_offset, 0) == -1) { + st_free_table(lib_tbl); + free(data); + goto badlib; + } + if (undef_tbl->num_entries == 0) break; + } + free(data); + st_free_table(lib_tbl); + } + else { + /* linear library, need to scan (FUTURE) */ + + for (;;) { + int offset = SARMAG; + int found = 0; + struct exec hdr; + struct nlist *syms, *sym, *end; + + while (undef_tbl->num_entries > 0) { + found = 0; + lseek(fd, offset, 0); + size = read(fd, &ahdr, sizeof(ahdr)); + if (size == -1) goto syserr; + if (size == 0) break; + if (size != sizeof(ahdr) + || sscanf(ahdr.ar_size, "%d", &size) != 1) { + goto badlib; + } + offset += sizeof(ahdr); + if (load_header(fd, &hdr, offset) == -1) + goto badlib; + syms = load_sym(fd, &hdr, offset); + if (syms == NULL) goto badlib; + sym = syms; + end = syms + (hdr.a_syms / sizeof(struct nlist)); + while (sym < end) { + if (sym->n_type == N_EXT|N_TEXT + && st_lookup(undef_tbl, sym->n_un.n_name, NULL)) { + break; + } + sym++; + } + if (sym < end) { + found++; + free(syms); + if (load_1(fd, offset, 0) == -1) { + goto badlib; + } + } + offset += size; + if (offset & 1) offset++; + } + if (found) break; + } + } + close(fd); + return 0; + + syserr: + dln_errno = errno; + badlib: + if (fd >= 0) close(fd); + return -1; +} + +static int +load(const char *file) +{ + int fd; + int result; + + if (dln_init_p == 0) { + if (dln_init(dln_argv0) == -1) return -1; + } + result = strlen(file); + if (file[result-1] == 'a') { + return load_lib(file); + } + + fd = open(file, O_RDONLY); + if (fd == -1) { + dln_errno = errno; + return -1; + } + result = load_1(fd, 0, file); + close(fd); + + return result; +} + +void* +dln_sym(const char *name) +{ + struct nlist *sym; + + if (st_lookup(sym_tbl, name, &sym)) + return (void*)sym->n_value; + return NULL; +} + +#endif /* USE_DLN_A_OUT */ + +#ifdef USE_DLN_DLOPEN +# include +#endif + +#ifdef __hpux +#include +#include "dl.h" +#endif + +#if defined(_AIX) +#include /* for isdigit() */ +#include /* for global errno */ +#include +#endif + +#ifdef NeXT +#if NS_TARGET_MAJOR < 4 +#include +#else +#include +#ifndef NSLINKMODULE_OPTION_BINDNOW +#define NSLINKMODULE_OPTION_BINDNOW 1 +#endif +#endif +#else +#ifdef MACOSX_DYLD +#include +#endif +#endif + +#if defined _WIN32 && !defined __CYGWIN__ +#include +#endif + +static const char * +dln_strerror(void) +{ +#ifdef USE_DLN_A_OUT + char *strerror(); + + switch (dln_errno) { + case DLN_ECONFL: + return "Symbol name conflict"; + case DLN_ENOINIT: + return "No initializer given"; + case DLN_EUNDEF: + return "Unresolved symbols"; + case DLN_ENOTLIB: + return "Not a library file"; + case DLN_EBADLIB: + return "Malformed library file"; + case DLN_EINIT: + return "Not initialized"; + default: + return strerror(dln_errno); + } +#endif + +#ifdef USE_DLN_DLOPEN + return (char*)dlerror(); +#endif + +#if defined _WIN32 && !defined __CYGWIN__ + static char message[1024]; + int error = GetLastError(); + char *p = message; + p += sprintf(message, "%d: ", error); + FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + p, + sizeof message - strlen(message), + NULL); + + for (p = message; *p; p++) { + if (*p == '\n' || *p == '\r') + *p = ' '; + } + return message; +#endif +} + + +#if defined(_AIX) && ! defined(_IA64) +static void +aix_loaderror(const char *pathname) +{ + char *message[8], errbuf[1024]; + int i,j; + + struct errtab { + int errnum; + char *errstr; + } load_errtab[] = { + {L_ERROR_TOOMANY, "too many errors, rest skipped."}, + {L_ERROR_NOLIB, "can't load library:"}, + {L_ERROR_UNDEF, "can't find symbol in library:"}, + {L_ERROR_RLDBAD, + "RLD index out of range or bad relocation type:"}, + {L_ERROR_FORMAT, "not a valid, executable xcoff file:"}, + {L_ERROR_MEMBER, + "file not an archive or does not contain requested member:"}, + {L_ERROR_TYPE, "symbol table mismatch:"}, + {L_ERROR_ALIGN, "text alignment in file is wrong."}, + {L_ERROR_SYSTEM, "System error:"}, + {L_ERROR_ERRNO, NULL} + }; + +#define LOAD_ERRTAB_LEN (sizeof(load_errtab)/sizeof(load_errtab[0])) +#define ERRBUF_APPEND(s) strncat(errbuf, s, sizeof(errbuf)-strlen(errbuf)-1) + + snprintf(errbuf, 1024, "load failed - %s ", pathname); + + if (!loadquery(1, &message[0], sizeof(message))) + ERRBUF_APPEND(strerror(errno)); + for(i = 0; message[i] && *message[i]; i++) { + int nerr = atoi(message[i]); + for (j=0; j= MAXPATHLEN) rb_loaderror("filename too long"); + + /* Load the file as an object one */ + init_funcname(&buf, file); + + strcpy(winfile, file); + + /* Load file */ + if ((handle = LoadLibrary(winfile)) == NULL) { + error = dln_strerror(); + goto failed; + } + + if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) { + rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file); + } + + /* Call the init code */ + (*init_fct)(); + return handle; +#else +#ifdef USE_DLN_A_OUT + if (load(file) == -1) { + error = dln_strerror(); + goto failed; + } + return 0; +#else + + char *buf; + /* Load the file as an object one */ + init_funcname(&buf, file); + +#ifdef USE_DLN_DLOPEN +#define DLN_DEFINED + { + void *handle; + void (*init_fct)(); + +#ifndef RTLD_LAZY +# define RTLD_LAZY 1 +#endif +#ifdef __INTERIX +# undef RTLD_GLOBAL +#endif +#ifndef RTLD_GLOBAL +# define RTLD_GLOBAL 0 +#endif + + /* Load file */ + if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) { + error = dln_strerror(); + goto failed; + } + + init_fct = (void(*)())dlsym(handle, buf); + if (init_fct == NULL) { + error = DLN_ERROR(); + dlclose(handle); + goto failed; + } + /* Call the init code */ + (*init_fct)(); + + return handle; + } +#endif /* USE_DLN_DLOPEN */ + +#ifdef __hpux +#define DLN_DEFINED + { + shl_t lib = NULL; + int flags; + void (*init_fct)(); + + flags = BIND_DEFERRED; + lib = shl_load(file, flags, 0); + if (lib == NULL) { + extern int errno; + rb_loaderror("%s - %s", strerror(errno), file); + } + shl_findsym(&lib, buf, TYPE_PROCEDURE, (void*)&init_fct); + if (init_fct == NULL) { + shl_findsym(&lib, buf, TYPE_UNDEFINED, (void*)&init_fct); + if (init_fct == NULL) { + errno = ENOSYM; + rb_loaderror("%s - %s", strerror(ENOSYM), file); + } + } + (*init_fct)(); + return (void*)lib; + } +#endif /* hpux */ + +#if defined(_AIX) && ! defined(_IA64) +#define DLN_DEFINED + { + void (*init_fct)(); + + init_fct = (void(*)())load((char*)file, 1, 0); + if (init_fct == NULL) { + aix_loaderror(file); + } + if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) { + aix_loaderror(file); + } + (*init_fct)(); + return (void*)init_fct; + } +#endif /* _AIX */ + +#if defined(NeXT) || defined(MACOSX_DYLD) +#define DLN_DEFINED +/*---------------------------------------------------- + By SHIROYAMA Takayuki Psi@fortune.nest.or.jp + + Special Thanks... + Yu tomoak-i@is.aist-nara.ac.jp, + Mi hisho@tasihara.nest.or.jp, + sunshine@sunshineco.com, + and... Miss ARAI Akino(^^;) + ----------------------------------------------------*/ +#if defined(NeXT) && (NS_TARGET_MAJOR < 4)/* NeXTSTEP rld functions */ + + { + NXStream* s; + unsigned long init_address; + char *object_files[2] = {NULL, NULL}; + + void (*init_fct)(); + + object_files[0] = (char*)file; + + s = NXOpenFile(2,NX_WRITEONLY); + + /* Load object file, if return value ==0 , load failed*/ + if(rld_load(s, NULL, object_files, NULL) == 0) { + NXFlush(s); + NXClose(s); + rb_loaderror("Failed to load %.200s", file); + } + + /* lookup the initial function */ + if(rld_lookup(s, buf, &init_address) == 0) { + NXFlush(s); + NXClose(s); + rb_loaderror("Failed to lookup Init function %.200s", file); + } + + NXFlush(s); + NXClose(s); + + /* Cannot call *init_address directory, so copy this value to + funtion pointer */ + init_fct = (void(*)())init_address; + (*init_fct)(); + return (void*)init_address; + } +#else/* OPENSTEP dyld functions */ + { + int dyld_result; + NSObjectFileImage obj_file; /* handle, but not use it */ + /* "file" is module file name . + "buf" is pointer to initial function name with "_" . */ + + void (*init_fct)(); + + + dyld_result = NSCreateObjectFileImageFromFile(file, &obj_file); + + if (dyld_result != NSObjectFileImageSuccess) { + rb_loaderror("Failed to load %.200s", file); + } + + NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW); + + /* lookup the initial function */ + if(!NSIsSymbolNameDefined(buf)) { + rb_loaderror("Failed to lookup Init function %.200s",file); + } + init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf)); + (*init_fct)(); + + return (void*)init_fct; + } +#endif /* rld or dyld */ +#endif + +#ifdef __BEOS__ +# define DLN_DEFINED + { + status_t err_stat; /* BeOS error status code */ + image_id img_id; /* extention module unique id */ + void (*init_fct)(); /* initialize function for extention module */ + + /* load extention module */ + img_id = load_add_on(file); + if (img_id <= 0) { + rb_loaderror("Failed to load add_on %.200s error_code=%x", + file, img_id); + } + + /* find symbol for module initialize function. */ + /* The Be Book KernelKit Images section described to use + B_SYMBOL_TYPE_TEXT for symbol of function, not + B_SYMBOL_TYPE_CODE. Why ? */ + /* strcat(init_fct_symname, "__Fv"); */ /* parameter nothing. */ + /* "__Fv" dont need! The Be Book Bug ? */ + err_stat = get_image_symbol(img_id, buf, + B_SYMBOL_TYPE_TEXT, (void **)&init_fct); + + if (err_stat != B_NO_ERROR) { + char real_name[MAXPATHLEN]; + + strlcpy(real_name, buf, MAXPATHLEN); + strlcat(real_name, "__Fv", MAXPATHLEN); + err_stat = get_image_symbol(img_id, real_name, + B_SYMBOL_TYPE_TEXT, (void **)&init_fct); + } + + if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) { + unload_add_on(img_id); + rb_loaderror("Failed to lookup Init function %.200s", file); + } + else if (B_NO_ERROR != err_stat) { + char errmsg[] = "Internal of BeOS version. %.200s (symbol_name = %s)"; + unload_add_on(img_id); + rb_loaderror(errmsg, strerror(err_stat), buf); + } + + /* call module initialize function. */ + (*init_fct)(); + return (void*)img_id; + } +#endif /* __BEOS__*/ + +#ifndef DLN_DEFINED + rb_notimplement(); +#endif + +#endif /* USE_DLN_A_OUT */ +#endif +#if !defined(_AIX) && !defined(NeXT) + failed: + rb_loaderror("%s - %s", error, file); +#endif + +#endif /* NO_DLN_LOAD */ + return 0; /* dummy return */ +} + +static char *dln_find_1(const char *fname, const char *path, char *buf, int size, int exe_flag); + +char * +dln_find_exe_r(const char *fname, const char *path, char *buf, int size) +{ + if (!path) { + path = getenv(PATH_ENV); + } + + if (!path) { +#if defined(_WIN32) + path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;."; +#else + path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:."; +#endif + } + return dln_find_1(fname, path, buf, size, 1); +} + +char * +dln_find_file_r(const char *fname, const char *path, char *buf, int size) +{ + if (!path) path = "."; + return dln_find_1(fname, path, buf, size, 0); +} + +static char fbuf[MAXPATHLEN]; + +char * +dln_find_exe(const char *fname, const char *path) +{ + return dln_find_exe_r(fname, path, fbuf, sizeof(fbuf)); +} + +char * +dln_find_file(const char *fname, const char *path) +{ + return dln_find_file_r(fname, path, fbuf, sizeof(fbuf)); +} + +static char * +dln_find_1(const char *fname, const char *path, char *fbuf, int size, + int exe_flag /* non 0 if looking for executable. */) +{ + register const char *dp; + register const char *ep; + register char *bp; + struct stat st; + int i, fspace; +#ifdef DOSISH + int is_abs = 0, has_path = 0, has_ext = 0; + const char *p = fname; +#endif + +#define RETURN_IF(expr) if (expr) return (char *)fname; + + RETURN_IF(!fname); +#ifdef DOSISH +# ifndef CharNext +# define CharNext(p) ((p)+1) +# endif +# ifdef DOSISH_DRIVE_LETTER + if (((p[0] | 0x20) - 'a') < 26 && p[1] == ':') { + p += 2; + is_abs = 1; + } +# endif + switch (*p) { + case '/': case '\\': + is_abs = 1; + p++; + } + has_path = is_abs; + while (*p) { + switch (*p) { + case '/': case '\\': + has_path = 1; + has_ext = 0; + p++; + break; + case '.': + has_ext = 1; + p++; + break; + default: + p = CharNext(p); + } + } + ep = bp = 0; + if (!exe_flag) { + RETURN_IF(is_abs); + } + else if (has_path) { + RETURN_IF(has_ext); + i = p - fname; + if (i + 1 > size) goto toolong; + fspace = size - i - 1; + bp = fbuf; + ep = p; + memcpy(fbuf, fname, i + 1); + goto needs_extension; + } +#endif + + RETURN_IF(fname[0] == '/'); + RETURN_IF(strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0); + RETURN_IF(exe_flag && strchr(fname, '/')); + +#undef RETURN_IF + + for (dp = path;; dp = ++ep) { + register int l; + + /* extract a component */ + ep = strchr(dp, PATH_SEP[0]); + if (ep == NULL) + ep = dp+strlen(dp); + + /* find the length of that component */ + l = ep - dp; + bp = fbuf; + fspace = size - 2; + if (l > 0) { + /* + ** If the length of the component is zero length, + ** start from the current directory. If the + ** component begins with "~", start from the + ** user's $HOME environment variable. Otherwise + ** take the path literally. + */ + + if (*dp == '~' && (l == 1 || +#if defined(DOSISH) + dp[1] == '\\' || +#endif + dp[1] == '/')) { + char *home; + + home = getenv("HOME"); + if (home != NULL) { + i = strlen(home); + if ((fspace -= i) < 0) + goto toolong; + memcpy(bp, home, i); + bp += i; + } + dp++; + l--; + } + if (l > 0) { + if ((fspace -= l) < 0) + goto toolong; + memcpy(bp, dp, l); + bp += l; + } + + /* add a "/" between directory and filename */ + if (ep[-1] != '/') + *bp++ = '/'; + } + + /* now append the file name */ + i = strlen(fname); + if ((fspace -= i) < 0) { + toolong: + fprintf(stderr, "openpath: pathname too long (ignored)\n"); + *bp = '\0'; + fprintf(stderr, "\tDirectory \"%s\"\n", fbuf); + fprintf(stderr, "\tFile \"%s\"\n", fname); + goto next; + } + memcpy(bp, fname, i + 1); + +#if defined(DOSISH) + if (exe_flag && !has_ext) { + static const char extension[][5] = { +#if defined(__EMX__) || defined(_WIN32) + ".exe", ".com", ".cmd", ".bat", +/* end of __EMX__ or _WIN32 */ +#endif + }; + int j; + + needs_extension: + for (j = 0; j < sizeof(extension) / sizeof(extension[0]); j++) { + if (fspace < strlen(extension[j])) { + fprintf(stderr, "openpath: pathname too long (ignored)\n"); + fprintf(stderr, "\tDirectory \"%.*s\"\n", (int) (bp - fbuf), fbuf); + fprintf(stderr, "\tFile \"%s%s\"\n", fname, extension[j]); + continue; + } + strcpy(bp + i, extension[j]); + if (stat(fbuf, &st) == 0) + return fbuf; + } + goto next; + } +#endif /* _WIN32 or __EMX__ */ + + if (stat(fbuf, &st) == 0) { + if (exe_flag == 0) return fbuf; + /* looking for executable */ + if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0) + return fbuf; + } + next: + /* if not, and no other alternatives, life is bleak */ + if (*ep == '\0') { + return NULL; + } + + /* otherwise try the next component in the search path */ + } +} diff --git a/lib/ruby-1.9.1-rc1/dln.h b/lib/ruby-1.9.1-rc1/dln.h new file mode 100644 index 0000000..1c51edd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dln.h @@ -0,0 +1,41 @@ +/********************************************************************** + + dln.h - + + $Author: nobu $ + created at: Wed Jan 19 16:53:09 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#ifndef DLN_H +#define DLN_H + +#ifdef __cplusplus +# ifndef HAVE_PROTOTYPES +# define HAVE_PROTOTYPES 1 +# endif +# ifndef HAVE_STDARG_PROTOTYPES +# define HAVE_STDARG_PROTOTYPES 1 +# endif +#endif + +#undef _ +#ifdef HAVE_PROTOTYPES +# define _(args) args +#else +# define _(args) () +#endif + +DEPRECATED(char *dln_find_exe(const char*,const char*)); +DEPRECATED(char *dln_find_file(const char*,const char*)); +char *dln_find_exe_r(const char*,const char*,char*,int); +char *dln_find_file_r(const char*,const char*,char*,int); + +#ifdef USE_DLN_A_OUT +extern char *dln_argv0; +#endif + +void *dln_load(const char*); +#endif diff --git a/lib/ruby-1.9.1-rc1/dmydln.c b/lib/ruby-1.9.1-rc1/dmydln.c new file mode 100644 index 0000000..09ea068 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dmydln.c @@ -0,0 +1,2 @@ +#define NO_DLN_LOAD 1 +#include "dln.c" diff --git a/lib/ruby-1.9.1-rc1/dmyencoding.c b/lib/ruby-1.9.1-rc1/dmyencoding.c new file mode 100644 index 0000000..1bd1106 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dmyencoding.c @@ -0,0 +1,2 @@ +#define NO_LOCALE_CHARMAP 1 +#include "encoding.c" diff --git a/lib/ruby-1.9.1-rc1/dmyext.c b/lib/ruby-1.9.1-rc1/dmyext.c new file mode 100644 index 0000000..4d273f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/dmyext.c @@ -0,0 +1,4 @@ +void +Init_ext(void) +{ +} diff --git a/lib/ruby-1.9.1-rc1/doc/ChangeLog-1.8.0 b/lib/ruby-1.9.1-rc1/doc/ChangeLog-1.8.0 new file mode 100644 index 0000000..d168a50 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/ChangeLog-1.8.0 @@ -0,0 +1,24345 @@ +Mon Aug 4 17:21:19 2003 Yukihiro Matsumoto + + * class.c (class_instance_method_list): methods defined in + singleton class and extended modules should be included. + [ruby-dev:21119] + +Mon Aug 4 13:05:57 2003 Yukihiro Matsumoto + + * eval.c (method_proc): should specify YIELD_FUNC_SVALUE. + [ruby-dev:21107] + + * marshal.c (w_object): should not call w_extended for USRMARSHAL + dump. [ruby-dev:21106] + +Mon Aug 4 10:42:00 2003 Nathaniel Talbott + + * lib/test/unit/ui/console/testrunner.rb: Flushed io in the + Console::TestRunner so that it will output immediately. + +Mon Aug 4 10:27:22 2003 Nobuyoshi Nakada + + * util.h: remove unnecessary parentheses. [ruby-dev:20879] + +Mon Aug 4 10:00:47 2003 Shugo Maeda + + * lib/net/imap.rb (receive_responses): raise exception to + client_thread. Thanks to William Webber. + +Mon Aug 4 09:22:53 2003 William Webber + + * lib/net/imap.rb: convert RD to RDoc. + +Mon Aug 4 02:34:05 2003 NAKAMURA Usaku + + * win32/win32.c (rb_w32_utime): never use utime() of C runtime. + [ruby-talk:77782] + +Sun Aug 3 23:56:50 2003 Nobuyoshi Nakada + + * eval.c (rb_call_super): should propagate previous block for + super call. [ruby-talk:77884] + +Sun Aug 3 22:07:47 2003 Hidetoshi NAGAI + + * ext/tk/lib/tkentry.rb: support 'validatecommand' option of + TkEntry/TkSpinbox widget + + * ext/tk/sample/{demos-en,demos-jp}/spin.rb: add + +Sun Aug 3 19:25:28 2003 Nobuyoshi Nakada + + * eval.c (call_trace_func): clear exception flag temporarily. + [ruby-dev:21090] + +Sun Aug 3 18:03:44 2003 WATANABE Hirofumi + + * regex.h (re_mbctab): should refer to RUBY_EXPORT. [ruby-ext:02199] + + * lib/un.h (help): new. % ruby -run -e help cp + +Sun Aug 3 08:53:06 2003 Hidetoshi NAGAI + + * ext/tk/sample/{demos-en,demos-jp}/image3.rb: add + + * ext/tk/lib/tkcanvas.rb: bug fix on Tk object ID management + + * ext/tk/lib/tktext.rb: ditto + +Sun Aug 3 02:55:52 2003 Hidetoshi NAGAI + + * process.c: modify macro to detect 'MacOS X' [ruby-talk:77849] + + * ext/tcltklib/lib/tcltk.rb: bug fix ( NOT MAINTAINED : only + for running 'line2.rb' demo. ) + +Sun Aug 3 02:45:06 2003 Koji Arai + + * numeric.c (flo_to_s): get rid of buffer overflow. + +Sat Aug 2 23:51:52 2003 Yukihiro Matsumoto + + * io.c (appendline): clearerr(3) before raising exception, since + exception may be captured by rescue. [ruby-talk:77794] + +Sat Aug 2 09:58:13 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix --- TkGrid failed to treat + RELATIVE PLACEMENT + + * ext/tk/sample/demos-en/, demos-jp/: add or modify some + widget demo scripts + +Sat Aug 2 20:59:38 2003 GOTOU Yuuzou + + * lib/webrick/https.rb: change an option name. + :SSLCertStore -> :SSLCertificateStore. + +Sat Aug 2 19:18:40 2003 Minero Aoki + + * lib/net/smtp.rb: respond_to? needs 2nd argument. + Thanks Jim Bob. [ruby-talk:77796] + +Sat Aug 2 15:11:54 2003 WATANABE Hirofumi + + * ext/extmk.rb (--no-undefined): annoying option removed. + +Sat Aug 2 14:53:55 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (pkg_config): get configuration by pkg-config. [new] + + * ext/openssl/extconf.rb: use pkg_config. + +Sat Aug 2 13:45:17 2003 Yukihiro Matsumoto + + * gc.c: add "#pragma weak" for __libc_ia64_register_backing_store_base. + [ruby-dev:21072] + +Sat Aug 2 14:02:39 2003 Nobuyoshi Nakada + + * variable.c (classname): find regular class name if not set. + [ruby-dev:20496] + +Sat Aug 2 09:58:13 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix --- forgot to entry a widget class + name of 'labelframe' widget + + * ext/tk/sample/{demos-en,demos-jp}/{labelframe.rb,paned1.rb, + paned2.rb,spin.rb}: add demo-scripts to the JP/EN widget demos + +Sat Aug 2 05:04:30 2003 Hidetoshi NAGAI + + * ext/tk/lib/tkentry.rb: bug fix of TkEntry#delete + + * ext/tk/samples/: bug fix of some widget demos + + * ext/tk/lib/tk.rb: support == + + * ext/tk/lib/*.rb: freeze some object for security reason + +Sat Aug 2 03:30:25 2003 Yukihiro Matsumoto + + * class.c (rb_obj_singleton_methods): should not go up to + ancestors unless the recursive flag is set. [ruby-list:38007] + + * eval.c (rb_yield_0): expand [] to nil if avalue is set. + [ruby-dev:21058] + + * hash.c (env_each_key): use env_keys to avoid environment modify + on the fly. + + * hash.c (env_each_value): use env_values for safety. + + * hash.c (env_each): allocate environment array first. + +Fri Aug 2 03:20:00 2003 why the lucky stiff + + * lib/yaml/store.rb (YAML::Store#initialize): filename is first + argument. Thanks Kent Dahl. + +Sat Aug 2 00:49:31 2003 Minero Aoki + + * lib/net/http.rb: refine document. + +Fri Aug 1 23:57:45 2003 Nobuyoshi Nakada + + * gc.c (rb_gc_mark_locations): no need to swap arguments. + + * gc.c (STACK_LENGTH): insufficient for growing up stack + architectures. + + * gc.c (rb_gc, Init_stack) ditto. + +Fri Aug 1 23:33:36 2003 Masatoshi Seki + + * rubytest.rb: set dldpath on darwin. + +Fri Aug 1 23:07:38 2003 Minero Aoki + + * lib/net/http.rb: convert RD to RDoc. Thanks William Webber. + [ruby-doc:456] + +Fri Aug 1 19:48:56 2003 Yukihiro Matsumoto + + * ext/syck/rubyext.c (syck_emitter_write_m): forgot to declare + "self", making it default to "int". + + * ext/syck/rubyext.c (syck_emitter_simple_write): ditto. + + * gc.c (rb_gc): should mark backing store region on IA64. + +Fri Aug 1 18:51:10 2003 Hidetoshi NAGAI + + * process.c: bug fix --- preprocessor errors occur on OpenBSD-current + +Fri Aug 1 17:13:23 2003 Nobuyoshi Nakada + + * ext/openssl/extconf.rb: should replace literally. + +Fri Aug 1 16:22:57 2003 Nobuyoshi Nakada + + * io.c (rb_io_check_readable, rb_io_check_writable): ensure not + closed at first. + + * io.c (rb_io_getline): check readable always. (ruby-bugs:PR#1069) + + * io.c (rb_io_each_byte): ditto. + +Fri Aug 1 16:02:46 2003 Nobuyoshi Nakada + + * io.c (READ_DATA_PENDING_PTR): cast to get rid of warnings. + + * ext/socket/socket.c (unix_send_io, unix_recv_io): ditto. + +Fri Aug 1 15:53:24 2003 NAKAMURA Usaku + + * win32/win32.c (isInternalCmd): shouldn't return if find end of str. + [ruby-talk:77678] + +Fri Aug 1 13:45:14 2003 Nobuyoshi Nakada + + * eval.c (rb_call_super): propagate previous block if a block is + given. [ruby-talk:77577] + +Fri Aug 1 09:54:38 2003 Yukihiro Matsumoto + + * array.c (rb_ary_fill): array length may be changed during the + block execution. [ruby-talk:77579] + + * array.c (rb_ary_zip): ditto. + + * array.c (rb_ary_fill): ditto. + + * hash.c (env_reject_bang): length may be changed during the block + execution. + + * hash.c (env_clear): ditto. + +Fri Aug 1 04:58:55 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix --- forget to eval given block to + TkRoot.new method + + * ext/tk/sample/tkoptdb-safeTk.rb: new sample script + +Fri Aug 1 00:52:58 2003 Yukihiro Matsumoto + + * gc.c (Init_stack): IA64 requires STACK_LEVEL_MAX to be less than + magic number when optimizer turned on, regardless of rlimit + values. + +Thu Jul 31 23:44:00 2003 Masatoshi SEKI + + * lib/erb.rb: import erb-2.0.4b4. + +Thu Jul 31 23:04:45 2003 Hidetoshi NAGAI + + * ext/tk/sample/resource.en, ext/tk/sample/resource.jp: + wrong resource file format + + * ext/tk/lib/tk.rb: add Tk::Encoding.{encoding_convertfrom, + encoding_convertto} + + * ext/tk/lib/tk.rb: add TkOptionDB.read_with_encoding to read + non-utf8 resource file + +Thu Jul 31 23:02:47 2003 NAKAMURA Usaku + + * ext/etc/etc.c: revert getenv()'s prototype. use it only when _WIN32 + is not defined. + +Thu Jul 31 20:52:40 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: (IMPORTANT BUG FIX) scan of event keywords + doesn't work on recent versions of Tck/Tk + + * ext/tk/lib/tk.rb: initialize error of instance variable on + TkComposite + + * ext/tk/lib/multi-tk.rb: initialize error on encoding-system on + MultiTkIp + + * ext/tk/lib/tk.rb: trouble on destroying widgets + + * ext/tk/sample/demos-en/, demos-jp/: add JP and EN version of + Ruby/Tk widget demos + +Thu Jul 31 15:25:12 2003 NAKAMURA Usaku + + * array.c (rb_ary_collect): must get length of array for each + iteration. reported on [ruby-talk:77500], and fixed by + K.Sasada on [ruby-talk:77504] + +Thu Jul 31 14:11:54 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: move gmake specific features + into GNUmakefile. + +Thu Jul 31 12:36:11 2003 Masatoshi SEKI + + * bin/erb, lib/erb.rb: add explicit trim mode. + +Thu Jul 31 04:59:10 2003 Yukihiro Matsumoto + + * numeric.c (rb_num_coerce_relop): export function. + +Thu Jul 31 08:18:00 2003 Nathaniel Talbott + + * lib/test/unit.rb: A useful return code is now set if tests fail when + running automatically using the Console::TestRunner. + +Thu Jul 31 07:59:18 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: wrap the command-proc of TkScale --- pass + the numeric object to the proc + + * ext/tk/lib/tk.rb: better support for widgets created on + Tk interpreter (without Ruby) + + * ext/tk/lib/multi-tk.rb: a little more stable on Multiple Tk + interpreters running + +Thu Jul 31 00:17:19 2003 Shugo Maeda + + * lib/net/ftp.rb (return_code): obsolete. + + * lib/net/ftp.rb (last_response_code): new method. lastresp is now + alias to last_response_code. + + * lib/net/ftp.rb (last_response): new method. + +Wed Jul 30 23:55:44 2003 Yukihiro Matsumoto + + * marshal.c (w_object): check has been dropped. "_dump must return + string." [ruby-dev:21024] + +Wed Jul 30 22:35:19 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (dir_config): allow multiple directories separated + by File::PATH_SEPARATOR. + + * lib/mkmf.rb (create_makefile): DLDFLAGS include $LDFLAGS again. + [ruby-talk:76894] + + * lib/mkmf.rb (init_mkmf): not default $LDFLAGS to LDFLAGS for + ruby itself, but default $DLDFLAGS to DLDFLAGS. + +Wed Jul 30 16:17:06 2003 Yukihiro Matsumoto + + * marshal.c (w_object): marshal_dump should not take any + argument. + +Wed Jul 30 15:54:04 2003 GOTOU Yuuzou + + * ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): should initialize + instance variables. [ruby-talk:77362] + +Wed Jul 30 15:39:54 2003 Yukihiro Matsumoto + + * ruby.c (proc_options): -F set compiled regular expression to $;. + [ruby-talk:77381] + + * string.c (Init_String): no setter type check for $; + +Wed Jul 30 15:10:02 2003 Nobuyoshi Nakada + + * error.c (rb_raise): snprintf() termination moved to + win32/win32.c. + + * win32/win32.c (valid_filename, str_grow): unused. + + * win32/win32.c (NTLoginName, ChildRecord): make static. + + * win32/win32.c (CreateChild): argument check. + + * win32/win32.c (kill): should not call CloseHandle() when + OpenProcess() failed. + + * win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): ensure buffer + terminated. [ruby-talk:69672] + +Wed Jul 30 10:54:10 2003 Shugo Maeda + + * lib/net/ftp.rb (get): fix wrong argument name. Thanks to William + Webber. + +Wed Jul 30 10:31:37 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_convert): append unchanged portion + after overflow. [ruby-dev:21006] + + * ext/iconv/extconf.rb: check if iconv() 2nd argument is const. + +Wed Jul 30 09:31:55 2003 Nobuyoshi Nakada + + * configure.in (os2-emx): renamed from os2_emx, add flags to + CFLAGS and LDFLAGS, and remove lib prefix. [ruby-dev:20993] + + * file.c (rb_file_s_rename): retry with removing new file on + DOSISH. [ruby-dev:21007] + + * ext/socket/extconf.rb (sendmsg, recvmsg): check functions. + + * ext/socket/socket.c (unix_send_io, unix_recv_io): raise + NotImplementedError unless system calls are available. + + * ext/socket/socket.c (sock_initialize): rename from sock_init() + to get rid of conflict with OS/2 socket library. + +Wed Jul 30 07:23:14 2003 Hidetoshi NAGAI + + * ext/tk/lib/tkentry.rb: fix lack of methods for TkEntry + + * ext/tk/lib/multi-tk.rb, ext/tk/lib/tk.rb, + ext/tk/lib/tkdialog.rb, ext/tk/lib/tkentry.rb, + ext/tk/sample/safe-tk.rb, ext/tk/sample/tktimer2.rb: bug fix + + * ext/tk/lib/multi-tk.rb: MultiTkIp.new_* accept a block to + eval under the new interpreter + +Wed Jul 30 04:36:30 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c, + ext/tk/lib/tk.rb, ext/tk/lib/tkafter.rb: additional check of + Tk interpreters' status for a little more safety + +Wed Jul 30 02:37:12 2003 Yukihiro Matsumoto + + * marshal.c (w_object): if object responds to 'marshal_dump', + Marshal.dump uses it to dump object. unlike '_dump', + marshal_dump returns any kind of object. + + * marshal.c (r_object0): restore instance by calling + 'marshal_load' method. unlike '_load', it's an instance + method, to handle cyclic reference. + + * marshal.c (marshal_load): all objects read from file should be + tainted. [ruby-core:01325] + +Wed Jul 30 01:47:51 2003 Hugh Sasse + + * lib/timeout.rb (Timeout::timeout): execute immediately if sec is + zero. + +Wed Jul 30 01:36:18 2003 Aron Griffis + + * ext/socket/socket.c (socks_init): typo fixed. [ruby-talk:77232] + +Wed Jul 30 00:48:43 2003 Yukihiro Matsumoto + + * ext/socket/extconf.rb: the default value for --enable-socks is + taken from ENV["SOCKS_SERVER"]. [ruby-talk:77232] + + * ruby.c (proc_options): add -W option. -W0 to shut up all warning + messages. [ruby-talk:77227] + + * error.c (rb_warn): no message will be printed if the value of + $VERBOSE is "nil", i.e. perfect silence. + + * ruby.c (verbose_setter): $VERBOSE value is either true, false, + or nil. + + * io.c (Init_IO): no "read" check for $stdin. in addition some + function names has been changed. + +Tue Jul 29 23:10:19 2003 Yoshida Masato + + * regex.c (re_match_exec): incorrect multibyte match. + +Tue Jul 29 22:36:50 2003 Minero Aoki + + * lib/net/smtp.rb (send0): do taint check only when $SAFE > 0 + +Tue Jul 29 19:20:34 2003 WATANABE Hirofumi + + * lib/fileutils.rb (install): support preserve timestamp. + + * instruby.rb (install): use FileUtils::install preserve mode. + + * lib/un.rb: new. % ruby -run -e cp -- -p foo bar + + * lib/mkmf.rb: use un.rb instead of ftools.rb. + + * MANIFEST: add lib/un.rb. + + * ext/extmk.rb (INSTALL_PROG, INSTALL_DATA): modify verbose messages. + +Tue Jul 29 18:55:22 2003 Minero Aoki + + * lib/net/smtp.rb: unify coding style. + + * lib/net/http.rb: ditto. + +Tue Jul 29 17:27:59 2003 NAKAMURA Usaku + + * ruby.h (LLONG_MIN): fix typo. + +Tue Jul 29 16:38:44 2003 Yukihiro Matsumoto + + * lib/net/smtp.rb (Net::SMTP::send0): add taint check. + +Tue Jul 29 15:41:02 2003 WATANABE Hirofumi + + * instruby.rb (install): preserve the timestamp for Mac OS X ranlib + problem. + +Tue Jul 29 01:14:51 2003 Rick Ohnemus + + * ruby.h (LLONG_MIN): wrong value. + +Mon Jul 28 22:57:52 2003 Yukihiro Matsumoto + + * io.c (rb_f_getc): $stdin may not be IO. [ruby-dev:20973] + +Tue Jul 29 16:20:36 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: bug fix and + change mainloop_abort_on_no_widget_cmd => mainloop_abort_on_exception + ( to avoid thread timing trouble on accessing destroyed widgets ) + + * ext/tk/lib/multi-tk.rb: change default mode of + mainloop_abort_on_exception on multi-tk.rb + + * ext/tk/lib/multi-tk.rb: fix a bug of the procedure for + 'Delete' button on the safe-Tk frmae + +Tue Jul 29 12:22:28 2003 why the lucky stiff + + * ext/syck/token.c: prefixed many constants and definitions + with YAML_ to avoid name clash. + + * ext/syck/gram.c: ditto. + + * ext/syck/gram.h: ditto. + +Tue Jul 29 12:15:37 2003 NAKAMURA Usaku + + * ext/etc/etc.c: add real prototype to getenv(). + + * win32/win32.h: add arguments to definitions of functions if possible. + +Tue Jul 29 08:05:30 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb, ext/tk/lib/tkdialog.rb, ext/tk/lib/tktext.rb, + ext/tk/sample/tkbiff.rb, ext/tk/sample/tkdialog.rb, + ext/tk/sample/tkform.rb: bug fix ( tested with Ruby/Tk widget demo ) + +Tue Jul 29 04:22:08 2003 why the lucky stiff + + * ext/syck/syck.h: Added 'syck' yacc prefixes. + + * ext/syck/gram.c: ditto. + + * ext/syck/token.c: ditto. + + * ext/syck: Added ruby.h reference to source files. + +Tue Jul 29 03:53:28 2003 GOTOU Yuuzou + + * ext/openssl/lib/net/https.rb (use_ssl=): raise ProtocolError if + connection is set up already. + +Tue Jul 29 01:45:32 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: use RTEST() + +Tue Jul 29 01:24:32 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: bug fix + + * ext/tk/lib/multi-tk.rb: bug fix and pack options are pssed + to the safeTk container + + * ext/tk/sample/safe-tk.rb: add example for pack options of + safeTk container + +Mon Jul 28 23:23:08 2003 Nobuyoshi Nakada + + * file.c (Init_File): IO should include File::Const. + [ruby-dev:20964] + +Mon Jul 28 18:53:03 2003 WATANABE Hirofumi + + * ext/openssl/extconf.rb: check again after pkg-config for MinGW on + Cygwin. + +Mon Jul 28 15:32:04 2003 Yukihiro Matsumoto + + * ext/stringio/stringio.c (strio_gets): only "gets" should set $_. + + * ext/stringio/stringio.c (strio_getline): should not set $_ here. + + * io.c (argf_to_s): argf.to_s returns "ARGF". + + * io.c (set_defout_var, set_deferr_var): make $defout and $deferr + obsolete. + + * io.c (set_input_var, set_output_var): allow $stdin, $stdout, + $stderr not to be instance of IO. + + * io.c (rb_f_readline): forward method to current_file. gets, + readline, readlines, getc, readchar, tell, seek, pos=, rewind, + fileno, to_io, eof, each_line, each_byte, binmode, and closed? + as well. + + * io.c (argf_forward): utility function to forward method to + current_file. + +Mon Jul 28 06:10:13 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: bug fix + + * ext/lib/tk/multi-tk.rb: bug fix + + * ext/lib/tk/multi-tk.rb: add methods depend on Tcl's 'interp' command + + * ext/lib/tk/multi-tk.rb: suppot safe-level control of each interpreter + +Mon Jul 28 03:08:47 2003 Akinori MUSHA + + * lib/set.rb: each() should return self. + +Mon Jul 28 01:35:32 2003 Yukihiro Matsumoto + + * string.c (rb_str_chomp_bang): defer rb_str_modify() to actual + modify point. other methods, replace, tr, delete, squeeze, + lstrip, and rstrip as well. + + * string.c (rb_str_rstrip_bang): remove trailing '\0' at the end + of string. + + * string.c (rb_str_lstrip_bang): do not strip '\0' from the left. + +Sun Jul 27 21:16:30 2003 WATANABE Hirofumi + + * ext/openssl/extconf.rb: better support MinGW. add + dir_config("kerberos") and with_config("pkg-config"). + + * mkconfig.rb: initialize global variables to avoid warnings. + +Sun Jul 27 19:35:06 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: add some methods to support + multiple interpreters (low level) + + * ext/tk/lib/multi-tk.rb: new library to support multiple Tk + interpreters (high level) + + * ext/tcltklib/demo/safeTk.rb: new sample of safeTk interpreter + + * ext/tk/sample/safe-tk.rb: new sample of multi-tk.rb + + * ext/tk/lib/tk.rb: bug fix and add feature to supprt multi-tk + + * ext/tk/lib/tkafter.rb: ditto + +Sun Jul 27 14:43:37 2003 NAKAMURA, Hiroshi + + * lib/debug.rb: fix breakpoint parameter parsing/checking. + (?:(file|class):)(line_number|method) + +Sun Jul 27 10:21:28 2003 Masatoshi SEKI + + * lib/drb/unix.rb: add UNIXFileOwner, UNIXFileGroup. + +Sun Jul 27 03:10:43 2003 Nobuyoshi Nakada + + * io.c (io_reopen): avoid dup2() equal handles not to close itself and + to get rid of a msvcrt bug. [ruby-dev:20919] + +Sun Jul 27 00:37:16 2003 WATANABE Hirofumi + + * lib/tmpdir.rb: use GetWindowsDirectory, not GetSystemDirectory. + [ruby-talk:77073] + +Sat Jul 26 21:25:21 2003 NAKAMURA Usaku + + * io.c (rb_fdopen): set errno if it's zero on win32 platforms. + + * ext/openssl/ossl_ssl.c (TO_SOCKET): define special version when + _WIN32 is defined. this is ruby's problem, not OpenSSL. + + * win32/win32.c: remove some old comments. + +Sat Jul 26 14:26:57 2003 Yukihiro Matsumoto + + * ext/tk/lib/tk.rb (TkCore::chooseDirectory): back up wrongly + removed method. + +Sat Jul 26 14:14:12 2003 Nobuyoshi Nakada + + * ext/stringio/stringio.c: includes Enumerable as well as IO. + [ruby-talk:77058] + +Sat Jul 26 07:00:53 2003 Masatoshi SEKI + + * lib/erb.rb: fix % line. + +Sat Jul 26 05:31:09 2003 GOTOU Yuuzou + + * ext/openssl/ossl.h: fix comment. + + * ext/openssl/ossl.c (ossl_debug): should enable if no va-args + macro supplied. + +Sat Jul 26 04:04:36 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: refine va-args macro detection. + [ruby-talk:76983] + +Sat Jul 26 01:33:51 2003 NAKAMURA Usaku + + * ext/openssl/ossl_ssl.c (ossl_ssl_setup): need to pass the real + socket to SSL_get_fd on native win32 platforms. + +Sat Jul 26 01:20:29 2003 Yukihiro Matsumoto + + * variable.c (rb_mod_const_missing): "const_missing" should not + appear in the caller(); add call frame adjustment. + + * eval.c (rb_method_missing): simplify call frame adjustment. + +Fri Jul 26 00:04:25 2003 NAKAMURA, Hiroshi + + * ext/openssl/sample: add samples. + - cert2text.rb: dump certificate file as text. + - crlstore.rb: CRL store implementation. Fetch CRL via HTTP when + http-access2 is installed. + - certstore.rb: certificate store implementation. + - cert_store_view.rb: certificate store viewer with FXRuby. Uses + c_rehash.rb, crlstore.rb and certstore.rb. + +Fri Jul 25 16:43:03 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: add TclTkIp#create_slave, + TclTkIp#_make_safe and TclTkIp#safe? + + * ext/tcltklib/MANUAL.euc: modify descriptions + + * ext/tk/lib/tk.rb: bug fix [ruby-talk:76980] and modify to + support multi Tk IPs + + * ext/tk/lib/tkafter.rb: modify to support multi Tk IPs + +Fri Jul 25 15:47:39 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for BN_rand_range() and + BN_pseudo_rand_range(). + + * ext/openssl/ossl_bn.c (ossl_bn_s_rand_range): should raise + NotImplementedError if BN_rand_range() wan not defined. + + * ext/openssl/ossl_bn.c (ossl_bn_s_pseudo_rand_range): should raise + NotImplementedError if BN_pseudo_rand_range() wan not defined. + + * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_s_encrypt): avoid compiler + warning for OpenSSL-0.9.6. + + * ext/openssl/ossl_pkcs7.c (ossl_pkcs7si_initialize): ditto. + +Fri Jul 25 14:34:55 2003 Yukihiro Matsumoto + + * ext/socket/socket.c (tcp_s_gethostbyname): was using + uninitialized size_t value. [ruby-talk:76946] + +Fri Jul 25 13:38:38 2003 Nobuyoshi Nakada + + * re.c (rb_reg_options_m): use rb_reg_options() to mask internal + flags. + + * re.c (rb_reg_initialize_m): allow nil as third argument and + ignore, and mask code flags if the argument is given. + [ruby-dev:20885] + + * re.c (rb_reg_options): get common flags directly. + +Fri Jul 25 03:52:21 2003 why the lucky stiff + + * lib/yaml/dbm.rb: replace indexes with values_at. + +Fri Jul 25 02:55:59 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for libsocket and libnsl. + + * ext/openssl/extconf.rb: use pkg-config to build CFLAGS and LDFLAGS. + +Fri Jul 25 01:27:59 2003 why the lucky stiff + + * ext/syck/emitter.c (syck_emitter_flush): accepts count + of bytes to flush. anchor offsets now functional. + + * ext/syck/syck.h (syck_emitter_flush): ditto. + + * ext/syck/rubyext.c: ditto. + + * ext/syck/token.c: URI escaping now supported. + +Thu Jul 24 16:41:31 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (have_type): check if a type is defined. + + * lib/mkmf.rb (check_sizeof): check size of a type. + + * ext/dbm/extconf.rb: check if type DBM is defined. + [ruby-talk:76693] + +Thu Jul 24 16:18:40 2003 Nobuyoshi Nakada + + * ChangeLog (add-log-time-format): "%c" contains timezone on + XEmacs. + +Thu Jul 24 16:05:22 2003 Nobuyoshi Nakada + + * configure.in (AC_C_VOLATILE): check if volatile works. + + * defines.h (volatile): removed. + + * eval.c (rb_thread_group): Thread#group. [new] + +Thu Jul 24 15:50:42 2003 GOTOU Yuuzou + + * ext/openssl/extconf.rb: add check for win32 OpenSSL libraries. + + * ext/openssl/extconf.rb: add check for __VA_ARGS__. + + * ext/openssl/ossl.h: avoid non C99 compiler errors. + +Thu Jul 24 13:32:56 2003 Yukihiro Matsumoto + + * eval.c (thgroup_add): no warning for terminated threads. + +Thu Jul 24 13:09:26 2003 Tanaka Akira + + * lib/pathname.rb: added. + +Thu Jul 24 11:21:10 2003 Nobuyoshi Nakada + + * ext/io/wait/extconf.rb: removed unnecessary backward + compatibility stuff. + +Thu Jul 24 11:09:10 2003 WATANABE Hirofumi + + * ext/openssl/extconf.rb: revert use of dir_config. + +Thu Jul 24 09:58:32 2003 NAKAMURA Usaku + + * ext/Win32API/lib/win32/resolv.rb: added. + + * lib/resolv.rb: support Win32 platforms. based on Tietew's work + [ruby-dev:15573]. + +Thu Jul 24 04:05:46 2003 GOTOU Yuuzou + + * ext/openssl/ssl.h: undef X509_NAME and PKCS7_SIGNER_INFO to + avoid name confliction on mswin32. + + * ext/openssl/ssl.c (ossl_protect_obj2bio): avoid VC++ warnings + in function prototype. + + * ext/openssl/ssl.c (ossl_protect_membio2str): ditto. + + * ext/openssl/ssl.c (ossl_protect_x509_ary2sk): ditto. + +Thu Jul 24 03:44:04 2003 Michal Rokos + + * ext/openssl/extconf.rb: cut check for OpenSSL version + +Thu Jul 24 03:41:30 2003 NAKAMURA Usaku + + * ext/tcltklib/tcltklib.c (ip_init): need at least one statement after + label. + +Thu Jul 24 01:48:03 2003 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::[]): should return StringIO (or + Tempfile) for multipart/form. + + * variable.c (rb_define_const): give warning for non constant + name. [ruby-core:01287] + +Thu Jul 24 01:51:08 2003 GOTOU Yuuzou + + * lib/webrick: imported. + + * MANIFEST: added webrick files. + +Thu Jul 24 01:32:04 2003 WATANABE Hirofumi + + * lib/tmpdir.rb (tmpdir): new method. remove TMPDIR. + use GetSystemWindowsDirectory(GetSystemDirectory), not GetTempPath. + +Thu Jul 24 01:08:43 2003 GOTOU Yuuzou + + * ext/openssl: imported. + +Wed Jul 23 23:06:59 2003 WATANABE Hirofumi + + * file.c (DOSISH): better Cygwin support. + +Wed Jul 23 19:13:21 2003 Yukihiro Matsumoto + + * string.c (rb_str_split_m): the receiver may be empty string. + +Wed Jul 23 18:43:00 2003 Masatoshi SEKI + + * lib/erb.rb: import erb-2.0.4b1. + +Wed Jul 23 18:21:52 2003 Nobuyoshi Nakada + + * ext/io/wait: imported. + +Wed Jul 23 16:07:35 2003 Hidetoshi NAGAI + + * process.c: unify indentation + + * configure.in: add --enable-setreuid option + + * ext/tcltklib/tcltklib.c: TclTkIp.new accepts 'ip-name' and 'options' + + * ext/tk/lib/tk.rb: support arguments of TclTkIp.new + + * ext/tk/lib/tk*.rb: preparations for multi-Tk interpreter support + +Wed Jul 23 15:49:01 2003 Yukihiro Matsumoto + + * string.c (rb_str_lstrip_bang): strip NUL along with white + spaces. [ruby-talk:76659] + + * string.c (rb_str_rstrip_bang): ditto. + +Wed Jul 23 14:19:17 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (log_src, checking_for, create_header): + Logging.message is printf like format. + +Wed Jul 23 10:11:15 2003 Nobuyoshi Nakada + + * ext/iconv/iconv.c (check_iconv): check if Iconv instance. + + * ext/iconv/iconv.c (iconv_convert): stringify argument. + +Wed Jul 23 02:39:46 2003 Hidetoshi NAGAI + + * process.c: add a module for raw syscalls to control UID/GID + + * process.c: add modules for portable UID/GID control + +Tue Jul 22 19:16:40 2003 Tanaka Akira + + * ext/iconv/iconv.c (iconv_failure_initialize): limit + inspect message. [ruby-dev:20785] + + * ext/iconv/iconv.c (rb_str_derive): share with original + string if possible. [ruby-dev:20785] + +Tue Jul 22 17:22:34 2003 Yukihiro Matsumoto + + * variable.c (rb_mod_const_missing): new method. [ruby-core:00441] + + * variable.c (rb_const_get_at): allow "const_missing" hook. + + * variable.c (rb_const_get_0): ditto. + + * eval.c (method_missing): rename from rb_undefined to clarify. + + * eval.c (ruby_finalize_0): update exit status if any of END proc + raises SystemExit. [ruby-core:01256] + + * signal.c (rb_trap_exit): wrap rb_eval_cmd + + * eval.c (rb_exec_end_proc): reduce rb_protect(). + +Tue Jul 22 17:15:57 2003 WATANABE Hirofumi + + * MANIFEST (lib/cgi/session/pstore.rb, lib/yaml/baseemitter.rb): + added. + +Tue Jul 22 10:52:19 2003 NAKAMURA Usaku + + * lib/tmpdir.rb: remove charcters after "\000" and regularize path. + +Tue Jul 22 02:22:45 2003 Yukihiro Matsumoto + + * numeric.c (num_equal): should not use rb_equal(). + + * string.c (rb_str_equal): should return nil for non string + operand to conform comparable convention. [ruby-dev:20759] + +Tue Jul 22 00:19:19 2003 Yukihiro Matsumoto + + * lib/tmpdir.rb: new library to get temporary directory path, + using GetTempPath on Win32 environment. + + * lib/tempfile.rb: now uses tmpdir.rb. + + * lib/cgi/session.rb, ib/drb/unix.rb: ditto. + +Mon Jul 21 01:53:43 2003 Yukihiro Matsumoto + + * string.c (rb_string_value_cstr): check null byte in the string + before retrieving C ptr. accessed via macro StringValueCStr. + + * file.c: use StringValueCStr to retrieve paths to system calls. + + * file.c (sys_fail2): raise error for two operand system calls + such as rename, link, symlink. (ruby-bugs PR#1047) + +Sun Jul 20 11:03:25 2003 UENO Katsuhiro + + * ext/zlib/zlib.c (gzfile_read_header): gz->z.input may be nil after + finishing reading a gzip header. + +Sat Jul 19 22:25:47 2003 Yukihiro Matsumoto + + * string.c (rb_str_match2): add warning to "~string". + [ruby-list:37751] + + * lib/net/ftp.rb (Net::FTP::open): takes block. suggested by Gavin + Sinclair in [ruby-core:01237]. + +Sat Jul 19 19:03:24 2003 Takaaki Uematsu + + * wince/stdlib.c: add bsearch(). + +Sat Jul 19 12:34:45 2003 David Black + + * lib/scanf.rb: import. + +Sat Jul 19 11:27:25 2003 Yukihiro Matsumoto + + * lib/xmlrpc: import. + + * eval.c (thgroup_add): should return group for terminated thread + case. + + * eval.c (thgroup_add): do not raise ThreadError on terminated + thread addition for compatibility. just warning. + +Sat Jul 19 04:50:56 2003 Nobuyoshi Nakada + + * ext/iconv/charset_alias.rb, ext/iconv/extconf.rb: make wrapper + script which maps charset names. [ruby-dev:20625] + + * ext/iconv/iconv.c (charset_map): charset name map. + + * ext/iconv/iconv.c (iconv_dfree): no exception while + finalization. + + * ext/iconv/iconv.c (iconv_s_conv): new method Iconv.conv. + [ruby-dev:20588] + +Sat Jul 19 03:09:18 2003 NAKAMURA Usaku + + * ext/Win32API/lib/win32/registry.rb (Win32::Registry::Error): + inherit StandardError instead of SystemCallError. + +Sat Jul 19 02:00:39 2003 Nobuyoshi Nakada + + * eval.c (rb_attr): extra calls of method_added. [ruby-talk:76361] + +Fri Jul 18 18:44:22 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (init_mkmf): clear $INSTALLFILES. [ruby-dev:20727] + +Fri Jul 18 17:34:39 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (rm_f): use FileUtils. + + * lib/mkmf.rb (modified?): return mtime of the target if + it exists and newer than times. + + * lib/mkmf.rb (install_files): add a current directory + file even if it does not exist yet. + + * lib/mkmf.rb (configuration): do not add $LDFLAGS to + DLDFLAGS. + + * ext/extmk.rb (extmake): check whether Makefile is newer + than depend and MANIFEST. + +Fri Jul 18 14:57:19 2003 NAKAMURA Usaku + + * win32/win32.c (make_cmdvector): recognize quote within string. + based on Nobu's patch ([ruby-win32:450]). [ruby-talk:75853] + +Fri Jul 18 13:04:36 2003 Yukihiro Matsumoto + + * eval.c (rb_f_missing): VCALL is called only for LOCAL_ID. no + check required. + + * parse.y (primary): primary:tFID generates NODE_FCALL. + [ruby-dev:20641] + +Thu Jul 17 18:50:26 2003 Yukihiro Matsumoto + + * re.c (match_captures): rename from "groups". + +Thu Jul 17 17:57:32 2003 Yukihiro Matsumoto + + * eval.c (rb_clear_cache_by_class): check both klass and origin. + +Thu Jul 17 13:46:25 2003 Yukihiro Matsumoto + + * eval.c (ruby_init): set ruby_running to true after + initialization. + +Thu Jul 17 13:42:53 2003 WATANABE Hirofumi + + * lib/ftools.rb (File::makedirs): do not handle "//" as a directory. + +Thu Jul 17 06:40:28 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: recover and fix typo : Tk.chooseDirectory + (Tk8.4 feature) + +Wed Jul 16 16:23:58 2003 Yukihiro Matsumoto + + * eval.c (rb_proc_new): call svalue_to_avalue for yield argument. + +Wed Jul 16 00:31:00 2003 Yukihiro Matsumoto + + * eval.c (rb_disable_super, rb_enable_super): deprecate. + + * eval.c (thgroup_s_alloc): re-implement group struct. + + * eval.c (thgroup_add): add check for enclose and frozen status. + +Tue Jul 15 19:50:49 2003 Nobuyoshi Nakada + + * eval.c (rb_add_method, rb_alias): need to clear cache by + ID when method defined in parent class is cached for + grand child classes. [ruby-dev:20672] + +Tue Jul 15 14:38:21 2003 Yukihiro Matsumoto + + * lib/matrix.rb: remove elements conversion to_f, to_i, to_r. + + * lib/cgi/session/pstore.rb: add new file. + +Tue Jul 15 03:30:41 2003 why the lucky stiff + + * ext/syck/rubyext.c (syck_mark_emitter): forgot to rb_gc_mark the + outgoing IO object. + +Sun Jul 13 14:55:36 2003 Koji Arai + + * process.c (proc_getgroups, proc_setmaxgroups): fix typo. + +Sat Jul 12 17:01:28 2003 NAKAMURA Usaku + + * struct.c (struct_entry): add prototype to avoid VC++ warnings. + +Sat Jul 12 04:43:57 2003 why the lucky stiff + + * ext/syck/emitter.c: new emitter code. + + * ext/syck/rubyext.c: Emitter class. + + * lib/yaml.rb: Load Syck emitter, if available. + + * lib/yaml/stream.rb: ditto. + + * lib/yaml/baseemitter.rb: underlying class for all emitters. + + * lib/yaml/rubytypes.rb: use BaseEmitter abstraction. + + * lib/yaml/emitter.rb: ditto. + +Sat Jul 12 04:23:13 2003 Nobuyoshi Nakada + + * eval.c (rb_undef): need to clear cache for inherited class. + (rubicon/builtin/TestModulePrivate.rb:test_undef_method) + +Sat Jul 12 01:21:54 2003 Nobuyoshi Nakada + + * eval.c (avalue_to_svalue): typo. + + * eval.c (rb_load): rb_prohibit_interrupt must not underflow. + + * parse.y (NODE_STRTERM, tokadd_string, parse_string): moved + string nest level from a static variable to NODE_STRTERM, to + preserve it from word to word in %W/%w. + +Fri Jul 11 22:37:18 2003 Nobuyoshi Nakada + + * configure.in (aix): needs ruby.imp even with gcc. + (ruby-bugs:PR#1007) + +Fri Jul 11 18:37:37 2003 WATANABE Hirofumi + + * instruby.rb: do not handle directories. [ruby-dev:20613] + +Fri Jul 11 16:09:09 2003 Yukihiro Matsumoto + + * util.c (ruby_strtod): exp should be less than MDMAXEXPT. + +Fri Jul 11 07:17:47 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: not create a Tcl/Tk interpreter if already + defined TkCore::INTERP + + * ext/tk/lib/tk.rb: bugfix on TkWindow#configure + +Thu Jul 10 14:42:02 2003 WATANABE Hirofumi + + * math.c (math_log): nan takes a dummy argument on Cygwin 1.5.0. + +Wed Jul 9 23:50:46 2003 Nobuyoshi Nakada + + * regex.c (mbctab_sjis): 0x80 is not shift jis first byte. + [ruby-dev:20516] + +Wed Jul 9 15:38:28 2003 WATANABE Hirofumi + + * instruby.rb: do not install shared libraries as man pages. + + * mkconfig.rb: support text-mount on Cygwin. + +Wed Jul 9 11:09:57 2003 NAKAMURA Usaku + + * re.c (match_entry): add prototype to avoid VC++ warnings. + +Wed Jul 9 03:48:27 2003 Yukihiro Matsumoto + + * eval.c (rb_load): put rb_load_file() in a thread critical + section. [ruby-dev:20490] + + * eval.c (compile): put rb_compile_string() in a thread critical + section. + +Tue Jul 8 02:35:41 2003 Yukihiro Matsumoto + + * variable.c (rb_const_get_0): should not warn if constant is not + defined. (ruby-bugs-ja PR#509) + + * bignum.c (rb_big2dbl): give a warning on overflow. + (ruby-bugs-ja PR#510) + + * util.c (ruby_strtod): change MDMAXEXPT from 511 to 308. + + * pack.c (utf8_to_uv): long is sufficient. LONG_LONG is not + required. + +Tue Jul 8 01:43:16 2003 Koji Arai + + * bignum.c (rb_big2str): support 32 bit (without `long long' type) + machines. (ruby-bugs-ja PR#512) + +Mon Jul 7 10:22:46 2003 WATANABE Hirofumi + + * ext/dbm/extconf.rb (gdbm_compat, qdbm): add check for gdbm_compat + and qdbm. + +Mon Jul 7 01:34:49 2003 Yukihiro Matsumoto + + * eval.c (rb_call_super): k->super maybe NULL if klass is Kernel. + [ruby-dev:20519] + + * gc.c (obj_free): clear method cache when freeing class/module. + +Sat Jul 5 23:32:06 2003 Yukihiro Matsumoto + + * eval.c (rb_mod_remove_method): allow "remove_method" to accept + multiple arguments. + +Sat Jul 5 00:22:59 2003 Yukihiro Matsumoto + + * node.h (NEW_NODE): cast arguments to rb_node_newnode(). + +Fri Jul 4 21:48:44 2003 Nobuyoshi Nakada + + * ext/syck/rubyext.c, ext/syck/syck.c, ext/syck/syck.h, + ext/syck/token.c: C++ style comments are not allowed. + (ruby-bugs:PR#1008) + +Thu Jul 3 23:41:30 2003 Tanaka Akira + + * lib/timeout.rb: add optional exception argument for compatibility + function. + +Thu Jul 3 14:22:46 2003 Yukihiro Matsumoto + + * array.c (rb_values_at): extract common procedure from + rb_ary_values_at. follow DRY principle. + + * re.c (match_values_at): values_at should understand ranges. + + * struct.c (rb_struct_values_at): ditto. + + * struct.c (inspect_struct): inspect format changed; add "struct " + at the top. + + * sprintf.c (rb_f_sprintf): "%p" specifier for inspect output. + (RCR#69) + + * eval.c (rb_mod_undef_method): allow "undef_method" to accept + multiple arguments. (RCR#146) + + * lib/timeout.rb: put timeout in Timeout module. (RCR#121) + [ruby-talk:61028] + + * re.c (match_groups): new method added. (RCR#139) + + * variable.c (rb_mod_const_of): should exclude constant defined + in Object, unless retrieving constants of Object. + +Thu Jul 3 12:13:05 2003 WATANABE Hirofumi + + * lib/mkmf.rb (VPATH): convert from Windows form to Unix form on + MinGW. This fixes the build with GNU make 3.80-1 for Cygwin. + +Wed Jul 2 23:27:34 2003 Yukihiro Matsumoto + + * string.c (rb_str_new4): do not allocate new string if original + is frozen or already have copy-on-write entry. [ruby-talk:74940] + +Wed Jul 2 13:22:39 2003 Yukihiro Matsumoto + + * string.c (rb_str_shared_replace): clear flags before copy. + + * string.c (rb_str_replace): ditto. + + * eval.c (rb_yield_0): override visibility mode for module_eval + etc. (ruby-bugs-ja PR#505) + +Wed Jul 2 11:45:34 2003 Minero Aoki + + * lib/net/smtp.rb: synchronize document with source code. + + * lib/net/pop.rb: ditto. + +Wed Jul 2 11:39:50 2003 Minero Aoki + + * lib/net/smtp.rb: unify SMTP and SMTPCommand. + + * lib/net/smtp.rb: new exception class SMTPError. + + * lib/net/smtp.rb: new exception class SMTPAuthenticationError. + + * lib/net/smtp.rb: new exception class SMTPServerBusy. + + * lib/net/smtp.rb: new exception class SMTPSyntaxError. + + * lib/net/smtp.rb: new exception class SMTPFatalError. + + * lib/net/smtp.rb: new exception class SMTPUnknownError. + + * lib/net/smtp.rb: change critical section protect algorithm. + + * lib/net/smtp.rb (SMTP#do_start): check authentication args + before all. + + * lib/net/smtp.rb: new method send_message (alias send_mail). + + * lib/net/smtp.rb: new method open_message_stream (alias ready). + + * lib/net/pop.rb: POPBadResponse is a POPError. + + * lib/net/pop.rb (POPMail#pop): ban ReadAdapter. + + * lib/net/pop.rb (POPMail#top): ditto. + + * lib/net/pop.rb (POP3Command): change critical section protect + algorithm. + + * lib/net/pop.rb (POP3Command#auth): USER and PASS should be one + critical block. + + * lib/net/pop.rb (POP3Command#retr): ban `dest' argument using + iterator. + + * lib/net/pop.rb (POP3Command#top): ditto. + + * lib/net/protocol.rb: #read_message_to -> #each_message_chunk + + * lib/net/protocol.rb: #D -> #LOG + + * lib/net/protocol.rb: #D_off -> #LOG_off + + * lib/net/protocol.rb: #D_on -> #LOG_on + +Wed Jul 2 11:10:47 2003 Minero Aoki + + * lib/net/http.rb: set old class aliases for backward + compatibility. [ruby-talk:74863] + + * lib/net/protocol.rb: ditto. + +Wed Jul 2 01:32:40 2003 WATANABE Hirofumi + + * lib/net/pop.rb (Net::POP3#start): typofix. + +Tue Jul 1 22:08:19 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: TkWindow include TkWinfo + + * ext/tk/lib/tk.rb: treat unknown widget classes as subclasses + of TkWindow + +Tue Jul 1 19:02:12 2003 WATANABE Hirofumi + + * parse.y (rb_intern): should use mbclen instead of mblen. + +Tue Jul 1 10:36:19 2003 Nobuyoshi Nakada + + * class.c (rb_define_class, rb_define_module): also set constant under + Object. [ruby-dev:20445] + + * object.c (boot_defclass): ditto. + + * variable.c (rb_const_get_at, rb_const_get_0, rb_mod_const_at, + rb_const_defined, mod_av_set, rb_const_assign): toplevel constants + are now under Object, rb_class_tbl remains for GC. + +Mon Jun 30 17:53:06 2003 Nobuyoshi Nakada + + * eval.c (mnew): ignore metaclasses have no influence, for rklass. + [ruby-talk:74706] + +Sun Jun 29 06:59:07 2003 Masatoshi SEKI + + * lib/drb/drb.rb, lib/drb/invokemethod.rb: import drb-2.0.4 + (use LocalJumpError#reason) + +Sat Jun 28 12:28:54 2003 Nobuyoshi Nakada + + * configure.in (rb_cv_stack_grow_dir): check stack growing direction. + + * eval.c (rb_thread_restore_context): prior configuration macro. + + * gc.c (ruby_stack_length): always return the address of lower edge. + + * gc.c (rb_gc_mark_locations): remove margin. [ruby-dev:20462] + + * gc.c (rb_gc, Init_stack): prior configuration macro. + + * gc.c (Init_stack): add safety margin. + +Fri Jun 27 14:41:22 2003 Nobuyoshi Nakada + + * string.c (rb_str_split_m): remove white spaces on the head of + the last element, when limit is specified. [ruby-talk:74506] + +Fri Jun 27 03:24:54 2003 Nobuyoshi Nakada + + * io.c (io_fflush): need to check if closed after thread switch. + [ruby-dev:20351] + + * io.c (fptr_finalize): ditto. + + * string.c (rb_str_rindex_m): fixed wrong fix. should move backward + first only when matching from the end. + +Thu Jun 26 21:34:49 2003 Nobuyoshi Nakada + + * class.c (class_instance_method_list): get rid of warning about + arguement type mismatch, and inline method_list(). + [ruby-core:01198] + +Wed Jun 25 14:40:33 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add and modify methods --- + TkWidget.database_class, TkWidget.database_classname, + TkWidget#database_class, TkWidget#database_classname + + * ext/tk/lib/tk.rb: instances of a subclass of TkToplevel or + TkFrame are created with ":class=>subclass" option as default. + + * ext/tk/sample/tkoptdb.rb: add a new part + +Wed Jun 25 12:52:58 2003 Matthew Dempsky + + * class.c (rb_generic_class_instance_methods): merge argument + check (and warning) into one function; following DRY principle. + [ruby-core:01193] + +Wed Jun 25 05:49:10 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: add widget destroy hook binding to TkBindTag::ALL + + * ext/tk/lib/tkcanvas.rb: Although requiring manual control of GC, + memory eating problem of TkCanvas Items is fixed. + + * ext/tk/lib/tktext.rb: add some methods and bug fix + +Wed Jun 25 00:14:30 2003 Yukihiro Matsumoto + + * variable.c (autoload_delete): should delete Qundef from iv_tbl. + (ruby-bugs-ja PR#504) + +Tue Jun 24 16:46:07 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix on TkToplevel, TkFrame, + TkPanedwindow, TkOptionDB + + * ext/tk/lib/tk.rb: TkOptionDB --- make it more secure to use procs + defined on resourceDB + + * ext/tk/sample/tkoptdb.rb, resource.ja, resource.en: + sample script how to use TkOptionDB. + +Tue Jun 24 14:22:41 2003 why the lucky stiff + + * lib/yaml/types.rb: replaced Kernel::Hash reference with Object::Hash + from [ruby-talk:74270] + +Tue Jun 24 17:59:30 2003 Nobuyoshi Nakada + + * eval.c (rb_yield_0): show yielded block position not only yielding + point. [ruby-dev:20441] + +Tue Jun 24 16:47:07 2003 Minero Aoki + + * lib/net/http.rb (HTTPHeader#proxy_basic_auth): missing `@'. + Thanks Douglas Koszerek. (ruby-bugs:PR975) + +Tue Jun 24 14:31:17 2003 Minero Aoki + + * config.guess: have wrongly returned "alphaev56-unknown-linux-" + on Linux/Alpha. [ruby-dev:20434] + +Tue Jun 24 04:54:46 2003 Minero Aoki + + * configure.in: always add -mieee for gcc/alpha. [ruby-dev:20429] + +Tue Jun 24 02:40:09 2003 Nobuyoshi Nakada + + * array.c (rb_ary_unshift_m): need to check number of arguments. + [ruby-talk:74189] + +Mon Jun 23 23:59:56 2003 Minero Aoki + + * io.c (io_close): missing prototype. [ruby-dev:20422] + + * ext/socket/socket.c (bsock_do_not_rev_lookup_set): ditto. + + * ext/win32ole/win32ole.c (foletype_guid, foletype_progid): ditto. + + * error.c (syserr_initialize): length argument of sprintf() is an + int. + +Mon Jun 23 23:28:14 2003 WATANABE Hirofumi + + * MANIFEST: add wince files. + + * ext/tk/MANIFEST: add sample/tkmenubutton.rb. + +Mon Jun 23 17:40:58 2003 Nobuyoshi Nakada + + * dir.c (find_dirsep): get rid of warnings. + + * eval.c (error_print): temporary value might be disposed by GC. + + * hash.c (env_has_value, env_index): should not increment NULL. + + * io.c (io_read, rb_io_sysread): not read when length is 0. + + * io.c (rb_io_reopen): ensure initialized IO. + + * io.c (rb_io_init_copy): sychronize file pointer. + + * io.c (rb_io_s_pipe): make exception proof. + + * string.c (rb_str_rindex_m): Fixnum 0 matched end of string. + +Mon Jun 23 16:18:12 2003 Tanaka Akira + + * io.c (rb_open_file): initialize flags. + + * time.c (time_arg): initialize v[6] even when argc is 10 to + avoid valgrind error. + +Mon Jun 23 14:22:44 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix on TkRoot and TkToplevel + +Mon Jun 23 08:24:01 2003 Florian Frank + + * string.c (rb_str_upto): generate sequence according to "succ" + order. formerly check was done by dictionary order. + [ruby-talk:74138] + +Mon Jun 23 00:27:32 2003 Yukihiro Matsumoto + + * string.c (rb_string_value): fill constant empty string along + with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] + + * string.c (rb_string_value_ptr): ditto. + + * string.c (rb_check_string_type): ditto. + +Sun Jun 22 23:42:20 2003 Nobuyoshi Nakada + + * string.c (str_gsub): move END(0) check before mbclen2(). + + * string.c (scan_once): reduce END(0) check. + + * io.c (rb_io_initialize): accept fixnum mode. + + * eval.c (error_print): replace strchr() by memchr(), einfo may + contain "\0". + + * pack.c (pack_unpack): range check for "@" move; initialize check + for "m". + + * error.c (syserr_initialize): avoid buffer overflow. + + * file.c (rb_file_s_readlink): expand buffer until readlink + succeed. + +Sun Jun 22 16:17:02 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm + commands as elements + + * ext/tk/lib/tk.rb: TkMenu --- add some methods + + * ext/tk/lib/tk.rb: TkOptionMenubutton --- bug fix + + * ext/tk/sample/tkmenubutton.rb: sample of TkMenubutton and + TkOptionMenubutton + +Sat Jun 21 23:15:08 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): should not propagate distination tag if + tag is already handled in this level. (ruby-bugs-ja PR#501) + + * object.c (str_to_id): check for empty string before intern. + [ruby-talk:74006] + +Sat Jun 21 13:56:09 2003 Takaaki Uematsu + + * wince/Makefile.sub: undefine HAVE__SETJMP. + + * wince/resource.rb: include winver.h in wince3.0. + +Sat Jun 21 12:55:17 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm commands + as elements of a hash argument. + + * ext/tk/sample/tktimer2.rb: add comments about the usage of a + TkTimer object. + +Sat Jun 21 08:47:22 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk*.rb: remove direct-accesses to TkComm::INTERP and + TkComm::INITIALIZE_TARGETS + + * ext/tk/lib/tk*.rb: use TkINTERP_SETUP_SCRIPTS constant for setting + up the interpreter + + * ext/tcltklib/tcltklib.c: support to create a safe interpreter + with safe-Tk + +Fri Jun 20 23:28:27 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): should not propagate TAG_BREAK and + TAG_RETURN from orphan Proc object. [ruby-core:01148] + +Fri Jun 20 15:04:28 2003 NAKAMURA Usaku + + * defines.h (PATH_ENV): name of PATH environment. [new]. + + * defines.h (ENV_IGNORECASE): define for case insensitive platforms + to access environment variables. + + * dln.c (dln_find_exe): use PATH_ENV instead of "PATH". + + * hash.c (env_delete, rb_f_getenv, env_fetch, rb_env_path_tainted, + env_aset): ditto. + + * ruby.c (proc_options): ditto. + +Fri Jun 20 14:52:46 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: Tk interpreter returns TAINTED strings. + +Fri Jun 20 03:09:21 2003 Yukihiro Matsumoto + + * parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]". + [ruby-dev:20360] + + * eval.c (rb_eval): support new_yield() change. + + * variable.c (rb_const_get_0): warn for Foo::BAR when BAR is a + toplevel constant (i.e. a constant defined under Object). + [ruby-list:36935] + + * parse.y (no_blockarg): separate no block argument check and + ret_args argument processing. + +Fri Jun 20 00:45:19 2003 NAKAMURA, Hiroshi + + * lib/csv.rb: import csv module. + +Thu Jun 19 22:51:41 2003 Masatoshi SEKI + + * lib/drb.rb, lib/drb/drb.rb, lib/drb/eq.rb, + lib/drb/extserv.rb, lib/drb/extservm.rb, lib/drb/gw.rb, + lib/drb/invokemethod.rb, lib/drb/observer.rb, + lib/drb/timeridconv.rb, lib/drb/unix.rb: import drb-2.0.4b3 + +Thu Jun 19 16:14:43 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c (lib_do_one_event): change default + value of the argument + + * ext/tcltklib/tcltklib.c (lib_do_one_event): returns true/false + + * ext/tcltklib/tcltklib.c: add TclTkLib::EventFlag::NONE ( == 0 ) + + * ext/tcltklib/tcltklib.c: add set_no_event_wait() and + get_no_event_wait() + + * ext/tcltklib/MANUAL.euc: modify + + * ext/tcltklib/README.euc: ditto + + * ext/tk/lib/tk.rb: change default value of TkCore.do_one_event + argument + + * ext/tk/lib/tk.rb: add TkCore.set_no_event_wait(wait) and + TkCore.get_no_event_wait + + * ext/tk/lib/tk.rb: add Tk.exit ( == destroy root widget ) + + * ext/tk/lib/tkafter.rb: rename TkAfter => TkTimer (TkAfter is + an alias name) + + * ext/tk/lib/tkafter.rb: set_callback returns self + + * ext/tk/lib/tkafter.rb: continue() raises an exception, if already + running or no procedure. + + * ext/tk/lib/tkafter.rb: skip() raises an exception, if not running. + + * ext/tk/sample/tktimer2.rb: new sample for TkTimer class. + +Thu Jun 19 16:13:54 2003 WATANABE Hirofumi + + * rubytest.rb: add library path to include standard libraries. + +Thu Jun 19 13:13:10 2003 NAKAMURA Usaku + + * hash.c (env_delete, rb_f_getenv, env_fetch): case insensitive to + access environment variables on DOSISH platforms. + +Thu Jun 19 00:51:47 2003 NAKAMURA, Hiroshi + + * range.c (rb_range_beg_len): out_of_range check after adjusting + end point. [ruby-dev:20370] + +Wed Jun 18 23:59:11 2003 Guy Decoux + + * parse.y (call_args): the first argument to arg_cancat() should + be NODE_LIST. [ruby-core:01151] + +Wed Jun 18 23:41:27 2003 Marc Cartright + + * ext/zlib/zlib.c (zstream_run): In a particular situation, + deflate/inflate will return Z_BUF_ERROR, even though another call + is required by the zlib library. + +Wed Jun 18 19:46:21 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: bug fix + + * ext/tk/lib/tk.rb: rename 'no_create' option to 'without_creating' + + * ext/tk/lib/tk.rb: add TkWindow#pack_in, TkWindow#grid_in, + TkWindow#place_in + + * ext/tk/lib/tk.rb: add TkWindow#bind_class and TkWindow#database_class + + * ext/tk/lib/tk.rb: add TkBindTag.new_by_name and TkDatabaseClass + for binding to database class + + * ext/tk/lib/tk.rb: check varname whether already exsist or not. + (TkVarAccess.new) + + * ext/tk/lib/tk.rb: TkTextWin#bbox returns an array of four numbers + + * ext/tk/lib/tk.rb: autoload TkDialog2, TkWarning2 + + * ext/tk/lib/tk.rb: scan event callback arguments and convert + to proper type + + * ext/tk/lib/tk.rb: TkBindTag.new accepts a block + + * ext/tk/lib/tk.rb: If given taglist, TkWindow#bindtags(taglist) + returns taglist + + * ext/tk/lib/tk.rb: add TkWindow#bindtags=(taglist) + + * ext/tk/lib/tk.rb: Tk.focue and Tk.focus_lastfor return nil + if there is no target widget. + + * ext/tk/lib/tk.rb: Tk::Wm.client returns the argument string + when setting name + + * ext/tk/lib/tk.rb: TkGrid.columnconfiginfo and rowconfiginfo + given a slot return a number. + + * ext/tk/lib/tk.rb: TkWindow.grid_columnconfiginfo and + grid_rowconfiginfo --- ditto + + * ext/tk/lib/tk.rb: rename and define alias :: TkOption ==> TkOptionDB + + * ext/tk/lib/tk.rb: define alias :: TkTimer ==> TkAfter + + * ext/tk/lib/tk.rb: some instance methods change from public to private + + * ext/tk/lib/tk.rb: some TkComm methods change to module functions + + * ext/tk/lib/tk.rb: add support for -displayof option to some + TkWinfo methods + + * ext/tk/lib/tk.rb: bind, bind_append and bind_remove --- + returns the target of event-binding + + * ext/tk/lib/tk.rb: add Tk8.4 features + + * ext/tk/lib/tk.rb: add TkPaneWindow + + * ext/tk/lib/tkdialog.rb: bug fix + + * ext/tk/lib/tkdialog.rb: some methods return self + + * ext/tk/lib/tkdialog.rb: add TkTextMark#+(mod) and TkTextMark#-(mod) + + * ext/tk/lib/tkdialog.rb: add some methods + + * ext/tk/lib/tkcanvas.rb: bug fix and some methods return self + + * ext/tk/lib/tkentry.rb: some methods return self + + * ext/tk/lib/tkentry.rb: TkEntry#bbox returns an array of four numbers + + * ext/tk/lib/tkentry.rb: scan validatecommand arguments and + convert to proper type + + * ext/tk/lib/tkbgerror.rb: support to define a error handler by user + + * ext/tcltklib/tcltklib.c: [ruby-talk:60759] + +Wed Jun 18 13:50:06 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): should dispatch based on ID type. + +Wed Jun 18 12:53:42 2003 Minero Aoki + + * eval.c (rb_yield_0): should restore scope_vmode during yield. + [ruby-dev:20361] + +Wed Jun 18 01:13:36 2003 why the lucky stiff + + * ext/syck/rubyext.c (rb_syck_load_handler): merge key implemented. + + * ext/syck/rubyext.c (transfer_find_i): removed use of String#=~ in favor + of Regexp#match. + + * lib/yaml.rb: YAML::try_implicit returns. + + * lib/yaml/rubytypes.rb: Regexps added for type matching. + + * lib/yaml/emitter.rb: fix String + nil error. + +Tue Jun 17 17:01:08 2003 why the lucky stiff + + * ext/syck/gram.c: added grammar for certain empty sequence entries. + + * ext/syck/handler.c, ext/syck/syck.c, ext/syck/syck.h: track bad anchors. + + * ext/syck/token.c: added pause token, tag possible circular references. + + * lib/yaml/rubytypes.rb: parsing YMD time as Date instance. + + * ext/syck/rubyext.c: ditto. DomainType, PrivateType, BadAlias classes. + +Tue Jun 17 21:28:27 2003 Ariff Abdullah + + * win32/win32.c (rb_w32_opendir): need to set errno. [ruby-talk:73761] + +Mon Jun 16 19:01:25 2003 Yukihiro Matsumoto + + * eval.c: remove rb_cBlock. + +Mon Jun 16 18:06:33 2003 WATANABE Hirofumi + + * numeric.c (rb_fix2uint): renamed from rb_fix2int on IA64. + +Mon Jun 16 17:02:57 2003 Nobuyoshi Nakada + + * eval.c (proc_invoke): format the message for localjump_error(). + +Mon Jun 16 16:23:56 2003 NAKAMURA Usaku + + * ext/dl/dl.c (rb_dl_callback): use rb_block_proc() instead of + rb_block_new(). + + * ext/win32ole/win32ole.c (ev_on_event): ditto. + +Mon Jun 16 16:06:47 2003 Yukihiro Matsumoto + + * eval.c (proc_alloc): re-unification of Block and Proc. Block + class is no longer available. + +Mon Jun 16 14:43:14 2003 WATANABE Hirofumi + + * bcc32/Makefile.sub: undefine HAVE_GETGROUPS. + +Sat Jun 14 16:58:41 2003 Guy Decoux + + * regex.c (calculate_must_string): should handle option_set + properly. [ruby-talk:73481] + + * regex.c (re_compile_fastmap): a bug in flag manipulation. + [ruby-talk:73549] + +Sat Jun 14 17:59:59 2003 Guy Decoux + + * eval.c (method_arity): should handle NODE_BMETHOD and + NODE_DMETHOD. [ruby-core:01138] + +Fri Jun 13 09:24:39 2003 Shugo Maeda + + * lib/net/ftp.rb (storebinary): seek correctly. Thanks, William Webber. + + * lib/net/ftp.rb (putbinaryfile): rescue FTPPermError. + +Thu Jun 12 22:13:13 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb : add 'no_create' option to widget + initialize method. + + * ext/tk/MANIFEST : forgot to commit when added tkmacpkg.rb + and tkwinpkg.rb + + * ext/tk/lib/README : ditto. + +Thu Jun 12 21:14:11 2003 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb : widget configure returns self (for method + call chain) + + * ext/tk/lib/tkmacpkg.rb : Mac resource (not new but not + included until now) + + * ext/tk/lib/tkwinpkg.rb : Win DDE and registry (not new but not + included until now) + +Tue Jun 10 14:26:30 2003 why the lucky stiff + + * ext/syck/token.c: preserve newlines prepended to a block. + + * ext/syck/implicit.c (syck_match_implicit): added !merge and !default. + + * lib/yaml/constants.rb: remove '\z' escape. + + * lib/yaml/emitter.rb: ensure reset of @seq_map shortcut flag. + + * lib/yaml/encoding.rb: remove Unicode translation methods. + + * lib/yaml/rubytypes.rb: improved round-tripping of Strings. + [ruby-core:1134] + +Tue Jun 10 01:07:54 2003 Yukihiro Matsumoto + + * lib/irb.rb (IRB::Irb::eval_input): warn and exit if $SAFE >=3 + after input evaluation. + + * lib/irb.rb (IRB::Irb::eval_input): untaint input string. now + irb works for levels 1 and 2. + +Mon Jun 9 19:02:33 2003 Nobuyoshi Nakada + + * configure.in: checks presence of grp.h and setgroups(). + + * process.c (proc_getgroups, proc_setgroups): raise + NotImplementedError unless available. [ruby-talk:73014] + +Mon Jun 9 18:09:11 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fixed 100% CPU problem of Tk.mainloop + +Mon Jun 9 15:50:24 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: renewal Tk.mainloop + +Sun Jun 8 13:37:21 2003 Takaaki Uematsu + + * wince/setup.mak: set SUBSYSTEM in each platform. + + * wince/stdlib.c: fix mblen() bug. + +Sat Jun 7 22:22:03 2003 Yukihiro Matsumoto + + * ext/syck/rubyext.c (syck_loader_transfer): should not use + rb_cProc directly, since type_proc may be Proc, Block, or + Method. + + * parse.y (value_expr0): class and module statements should not be + warned for "void value expression". [ruby-talk:72989] + +Sat Jun 7 01:46:41 2003 Yukihiro Matsumoto + + * gc.c (add_final): should determine type by respond_to? + + * gc.c (define_final): ditto. + + * io.c (rb_io_ctl): should not depend on respond_to? + + * range.c (range_step): rb_check_string_type(). + +Fri Jun 6 20:29:14 2003 Nobuyoshi Nakada + + * eval.c (error_print): needs to be exception proof. + + * eval.c (error_handle, rb_longjmp): bails out when exception + reentered. (ruby-bugs-ja:PR#487), [ruby-core:01119], + [ruby-core:01122] + + * eval.c (Init_Proc): pre-allocates critical error objects. + +Fri Jun 6 20:29:14 2003 Nobuyoshi Nakada + + * parse.y (cmd_brace_block, do_block, brace_block): initialize block + variables at the beginning of the block. [ruby-talk:72521] + +Fri Jun 6 18:49:11 2003 Yukihiro Matsumoto + + * process.c (proc_setgroups): new functions. + +Fri Jun 6 18:33:27 2003 Yukihiro Matsumoto + + * gc.c (define_final): eliminate rb_f_lambda() call. + + * class.c (rb_scan_args): ditto. + + * signal.c (sig_trap): ditto. + + * hash.c (rb_hash_initialize): ditto. + + * variable.c (rb_f_trace_var): ditto. + + * ext/dl/dl.c (rb_dl_callback): ditto. + + * ext/win32ole/win32ole.c (ev_on_event): ditto. + +Fri Jun 6 16:10:01 2003 Minero Aoki + + * lib/net/http.rb: define Net::HTTPResponse#to_ary for backward + compatibility. [ruby-talk:72927] + + * lib/net/protocol.rb: add warning. + +Fri Jun 6 13:30:57 2003 Yukihiro Matsumoto + + * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. + Each END proc should preserve its own $SAFE level. [ruby-core:01119] + + * marshal.c (marshal_load): remove unused variable "hash". + [ruby-core:01120] + + * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] + + * array.c (rb_ary_first): optional argument to retrieve first n + elements. + + * array.c (rb_ary_last): optional argument to retrieve last n + elements. + +Thu Jun 5 21:31:55 2003 Takaaki Uematsu + + * wince/stdlib.c: add mblen(). + +Thu Jun 5 18:33:46 2003 WATANABE Hirofumi + + * ext/curses/curses.c (window_s_allocate,curses_finalize): + avoid VC++ warnings. + +Thu Jun 5 17:44:11 2003 why the lucky stiff + + * ext/syck/rubyext.c (syck_parser_mark): was a bit heavy on the GC. + + * lib/yaml.rb (YAML::transfer): added. + +Thu Jun 5 16:11:50 2003 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub + (MISSING): link with missing/erf.c. + + * missing.h (erf, erfc): fix prototype. + + * missing/erf.c: new. [ruby-list:37753] + +Thu Jun 5 15:09:06 2003 Yukihiro Matsumoto + + * math.c (math_erf,math_erfc): new function. [ruby-list:37753] + +Thu Jun 5 14:49:43 2003 why the lucky stiff + + * ext/syck/rubyext.c: using GC nodes caused segfault. [ruby-core:1071] + +Thu Jun 5 13:48:57 2003 why the lucky stiff + + * ext/syck/token.c: directives choked on a period. + + * ext/syck/gram.y: anchors work above a collection. [ruby-core:1071] + + * ext/syck/handler.c, ext/syck/syck.c: ensure a fresh strtable between + parser iterations. + +Wed Jun 4 12:06:59 2003 Yukihiro Matsumoto + + * eval.c (ruby_finalize): no longer need to turn off $DEBUG in the + finalizer. (ruby-bugs-ja PR#473) + +Tue Jun 3 22:20:49 2003 Yukihiro Matsumoto + + * eval.c (rb_call_super): should search superclass method based on + orig_func, not last_func. + +Tue Jun 3 09:59:27 2003 Yukihiro Matsumoto + + * eval.c (rb_call_super): inheritance line adjustment moved from + rb_call(). [ruby-core:01113] + + * eval.c (rb_eval): use rb_call_super() to follow DRY principle. + +Mon Jun 2 02:20:52 2003 Yukihiro Matsumoto + + * array.c (push_values_at): Array#values_at should work with + ranges too. + + * range.c (rb_range_beg_len): length calculation was wrong. + + * eval.c (rb_call): should set T_ICLASS in the frame->last_class. + [ruby-core:01110] + +Sun Jun 1 21:50:01 2003 WATANABE Hirofumi + + * configure.in: should not use def file, use ld with + --export-all-symbols option on Cygwin/MinGW. + + * defines.h: ditto. + + * cygwin/GNUmakefile.in: ditto. + + * ext/digest/defs.h: avoid warnings on Cygwin. + +Sun Jun 01 13:33:49 2003 Takaaki Uematsu + + * wince/string_wce.c: add strpbrk() for hpcpro support. + + * wince/setup.mak: add hpcpro(CE2.11) & armv4t(CE.NET) support. + + * wince/resource.rb: ditto. + + * wince/Makefile.sub: ditto. + +Sun Jun 1 10:38:28 2003 Nobuyoshi Nakada + + * variable.c (rb_autoload_load): autoloaded constants under a module + belong to the module. [ruby-core:01094], [ruby-dev:20309] + +Sat May 31 04:36:54 2003 Nobuyoshi Nakada + + * parse.y (rb_intern): should handle multibyte name. + +Fri May 30 23:18:01 2003 why the lucky stiff + + * ext/syck/rubyext.c (rb_syck_mktime): seconds calculated wrong. + + * ext/syck/gram.c: flexibility to anchors and transfer methods on + collections. + + * ext/syck/token.c: hex escapes. + + * lib/yaml/basenode.rb: YamlNode references changed to YAML::BaseNode. + +Fri May 30 22:28:04 2003 Nobuyoshi Nakada + + * numeric.c (rb_num2uint, rb_fix2int): new function to convert + values over INT_MAX. [ruby-core:01099] + + * ruby.h (NUM2UINT, FIX2INT): ditto. + +Fri May 30 15:01:05 2003 why the lucky stiff + + * ext/syck/token.c: preserve any indentation past an explicit + indentation. + +Fri May 30 14:55:44 2003 Nobuyoshi Nakada + + * eval.c (rb_Array): exclude Kernel#to_a instead of Object#to_a. + (ruby-bugs-ja:PR#483) + + * lib/optparse.rb (OptionParser::Switch#parse_arg): not splat. + + * lib/optparse.rb (OptionParser::Switch#conv_arg): splat if no + conversion supplied. + + * lib/optparse.rb (OptionParser::Switch::PlacedArgument#parse): + override next switch after argument conversion. + +Fri May 30 14:41:34 2003 why the lucky stiff + + * ext/syck/handler.c, ext/syck/syck.h: removed syck_fold_format(). + + * ext/syck/gram.c: flexibility for aliases and anchors. + + * ext/syck/token.c: folding now handled in the tokenizer. + +Fri May 30 06:21:18 2003 Nobuyoshi Nakada + + * variable.c (rb_autoload_load): should delete autoloaded + symbol itself before load. [ruby-core:01097] + + * variable.c (rb_mod_remove_const): must not return Qundef. + +Thu May 29 14:59:10 2003 WATANABE Hirofumi + + * win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW. + + * configure.in: remove '-D__USE_CRTIMP' from XCFLAGS on MinGW. + + * win32/win32.c (NtMakeCmdVector): handle quotes only if not instring. + +Thu May 29 09:11:01 2003 Nobuyoshi Nakada + + * eval.c (ev_const_defined, ev_const_get), variable.c + (rb_const_get_at, rb_const_get, rb_mod_remove_const): use Qundef + as autoload marker. [ruby-dev:18103], [ruby-dev:18184] + + * eval.c (rb_mod_autoload, rb_mod_autoload_p): new method; + Module#autoload, Module#autoload?. + + * variable.c (rb_autoload, rb_autoload_load, rb_autoload_p): + manage autoload constants per classes/modules. + + * variable.c (rb_const_defined_at, rb_const_defined): return false + for autoloading constants. + + * class.c (rb_define_class, rb_define_module), eval.c (rb_eval), + variable.c (rb_mod_const_at, rb_const_assign): removed autoload + stuff. + + * intern.h: prototypes; rb_autoload, rb_autoload_load, + rb_autoload_p. + + * lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse): + do not treat unmatched argument as an option. + +Wed May 28 08:44:26 2003 Yukihiro Matsumoto + + * io.c (rb_f_syscall): type dispatch should be based on + rb_check_string_type(), not FIXNUM_P(), because values may be a + bignum. [ruby-talk:72257] + +Tue May 27 20:33:18 2003 Nobuyoshi Nakada + + * eval.c, util.c: removed duplicated includes/defines. + + * ext/socket/socket.c (sock_addrinfo): get rid of SEGV at NULL ptr + String. increase buffer size for 64bit platforms. + +Tue May 27 02:34:14 2003 Yukihiro Matsumoto + + * eval.c (rb_call0): should pass the current klass value to + block_invoke, which may be called via "super". [ruby-core:01077] + + * eval.c (block_invoke): now takes 4th argument "klass". + + * eval.c (block_alloc): should propagate BLOCK_PROC to + ruby_block. + +Mon May 26 23:51:38 2003 Yukihiro Matsumoto + + * marshal.c (r_object0): should not use "yield" method, use "call" + instead. (ruby-bugs-ja PR#476) + +Mon May 26 21:39:46 2003 MoonWolf + + * lib/mkmf.rb, lib/optparse.rb, lib/tracer.rb: use Method#to_block + instead of deprecated Method#to_proc. (ruby-bugs-ja:PR#477) + +Mon May 26 21:21:20 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Switch::parse, + OptionParser::order): use {Block,Proc}#call instead of deprecated + #yield. + +Mon May 26 16:39:10 2003 Yukihiro Matsumoto + + * eval.c (Init_Proc): Block/Proc separation. [huge change] + + * eval.c (block_arity): returns exact arity number for Procs out + of methods. also gives 1 for {|a|..}. + + * string.c (rb_str_match): revert use of String#index for + invocation like string =~ string. + + * eval.c (rb_Array): move Object#to_a exclusion hack from + splat_value(). need to be in eval.c for a while. + +Sun May 25 23:48:21 2003 Nobuyoshi Nakada + + * bignum.c (rb_quad_pack): should negate negative bignum. + (ruby-bugs-ja:PR#474) + +Sun May 25 03:27:25 2003 Minero Aoki + + * lib/net/smtp.rb: support LOGIN authentication, based on + the patch by Kazuhiko Izawa. [ruby-talk:78981] + +Sat May 24 18:19:51 2003 Takaaki Uematsu + + * wince/Makefile.sub: add eMbedded Visual C++ 4.0 support. + + * wince/resource.rb: ditto. + + * wince/setup.mak: ditto. + + * wince/configure.bat: ditto. + + * wince/mkexports.rb: delete japanese comments. + +Fri May 23 18:34:05 2003 Nobuyoshi Nakada + + * eval.c (rb_longjmp): get rid of reentering while debug warning. + (ruby-bugs-ja:PR473) + +Fri May 23 15:16:16 2003 Nobuyoshi Nakada + + * pack.c (pack_unpack): sign-extend if sizeof long is bigger than + 32. (ruby-bugs-ja:PR#472) + +Fri May 23 14:19:29 2003 Yukihiro Matsumoto + + * eval.c (ruby_finalize): turn off ruby_debug flag before calling + at_exit procs and finalizers. (ruby-bugs-ja:PR473) + + * ext/tcltklib/tcltklib.c (lib_mainloop_core): OK to block if + there's no other thread. (ruby-bugs:PR#861) + +Thu May 22 18:07:46 2003 why the lucky stiff + + * ext/syck/token.c: single- and double-quoted root-level fix. + + * lib/yaml.rb (YAML::object_maker): can create object attributes (such as + found in Exception class) + + * lib/yaml/rubytypes.rb: roundtripping of Exception and subclasses. + +Fri May 23 01:26:26 2003 Yukihiro Matsumoto + + * object.c (rb_obj_clone): defer copying freezing state after + calling initialize_copy(). [ruby-dev:20276] + +Thu May 22 17:12:10 2003 Yukihiro Matsumoto + + * gc.c (run_final): use rb_thread_critical instead of DEFER_INTS. + [ruby-dev:20272] + + * marshal.c: try to make ArgumentError and TypeError consistent. + [ruby-core:01068] + +Thu May 22 15:46:37 2003 Yukihiro Matsumoto + + * eval.c (rb_define_alloc_func): need not to disable + rb_call_super() for allocation functions. [ruby-core:1065] + +Thu May 22 06:21:33 2003 why the lucky stiff + + * ext/syck/rubyext.c (rb_syck_err_handler): raise ArgumentError on + malformed YAML. + + * lib/yaml/rubytypes.rb: String#to_yaml was missing space indicators at + the end of a line. + +Thu May 22 05:43:24 2003 why the lucky stiff + + * ext/syck/rubyext.c (syck_parser_load): root-level false was returning + nil. + + * ext/syck/token.c: root-level transfer method bug. + + * ext/syck/gram.c: root-level empty gave a parse error. + + * lib/yaml/rubytypes.rb: Symbol#to_yaml generating method call error. + +Thu May 22 02:46:38 2003 Nobuyoshi Nakada + + * eval.c (rb_eval): splat NODE_RESTARY. [ruby-dev:20268] + + * eval.c (rb_thread_fd_close): raise for writing threads. + [ruby-dev:20269] + + * io.c (rb_io_close, io_reopen): ditto. + + * io.c (io_reopen): keep stdio objects for stdin, stdout, + and stderr. [ruby-dev:19442] + +Thu May 22 01:11:15 2003 Nobuyoshi Nakada + + * parse.y (strings, word_list): must create new instance always. + http://yowaken.dip.jp/tdiary/20030521.html#p02 + + * parse.y (yylex): slight optimization. + +Wed May 21 23:07:08 2003 Yukihiro Matsumoto + + * error.c (rb_sys_fail): should not specify errno explicitly. + [ruby-dev:20264] + +Wed May 21 20:51:47 2003 Nobuyoshi Nakada + + * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, + wince/Makefile.sub: update dependencies. + +Wed May 21 17:44:16 2003 Yukihiro Matsumoto + + * error.c (syserr_initialize): prohibit specifying errno for + subclasses of SystemCallError. in addition, if initialize is + called for SystenCallError instance, its class be changed. + [ruby-dev:20257] + + * gc.c (run_final): to protect thread context switch, finalizers + are wrapped in DEFER_INTS/ENABLE_INTS. + +Wed May 21 13:26:08 2003 Nobuyoshi Nakada + + * lib/optparse.rb: get rid of warnings. + +Tue May 20 18:59:54 2003 Yukihiro Matsumoto + + * eval.c (rb_thread_save_context): prohibit rb_gc_force_recycle() + on thread saved ruby_dyna_vars. [ruby-dev:20236] + +Tue May 20 17:39:15 2003 Yukihiro Matsumoto + + * object.c (init_copy): call initialize_copy at the end of copy + process. + +Tue May 20 17:15:55 2003 Nobuyoshi Nakada + + * error.c (syserr_initialize): use Errno constants as default + errno for subclasses. [ruby-dev:20241] + +Tue May 20 15:26:25 2003 WATANABE Hirofumi + + * st.h: define ST_DATA_T_DEFINED for portability. + + * ext/syck/syck.h: add typedef, st_data_t for Ruby 1.6. + + * ext/syck/syck.c (syck_st_free_nodes): return int. + + * ext/syck/syck.c (syck_add_sym): cast the data to st_data_t + to avoid error on bcc32. + + * ext/syck/syck.c (syck_lookup_sym): ditto. + + * ext/syck/syck.c (syck_free_parser): NULL is not integer. + +Tue May 20 13:29:04 2003 NAKAMURA Usaku + + * win32/win32.c (kill): set errno after calling raise(). + +Tue May 20 10:51:26 2003 Nobuyoshi Nakada + + * eval.c (rb_f_missing): create exception instance by ordinal + method. [ruby-dev:20033] + + * error.c (rb_name_error, rb_sys_fail): ditto. + + * error.c (exc_to_s, exit_status, name_err_name, + nometh_err_args, syserr_errno, syserr_eqq): access + attributes. + + * error.c (name_err_initialize, nometh_err_initialize, + syserr_initialize): initialize attributes. + +Tue May 20 10:26:56 2003 Yukihiro Matsumoto + + * eval.c (rb_yield_0): give warning for multiple values for a + block parameter. + + * eval.c (rb_yield_values): a function to yield multiple values. + + * array.c (sort_1): use rb_yield_values. + + * enum.c (min_ii, max_ii): ditto. + + * hash.c (rb_hash_update_block_i, delete_if_i, select_i, + each_pair_i, env_each, env_reject_bang, env_select, + env_update_i): ditto. + + * struct.c (rb_struct_each_pair): ditto. + + * eval.c (top_include): should include module in the current self, + not ruby_top_self. [ruby-dev:20198] + + * eval.c (top_include): stop inclusion to ruby_wrapper; give + warning. + +Mon May 19 18:54:30 2003 why the lucky stiff + + * ext/syck/token.c, ext/syck/implicit.c: expanded character set to + allow UTF-8, other Ruby encodings. + +Mon May 19 16:47:00 2003 why the lucky stiff + + * ext/syck/syck.c, ext/syck/syck.h, ext/syck/token.c, ext/syck/gram.c: + count line numbers only if line pointer has increased. + +Tue May 20 00:45:40 2003 Yukihiro Matsumoto + + * dir.c (push_braces): do not push_braces() unless rbrace is found. + (ruby-bugs-ja:PR#469) + +Tue May 20 00:09:41 2003 Yukihiro Matsumoto + + * ext/pty/pty.c (pty_finalize_syswait): join (using Thread#value) + before detach pid. [ruby-talk:71519] + +Mon May 19 23:02:10 2003 Yukihiro Matsumoto + + * eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677], + [ruby-dev:20202] + + * eval.c (BEGIN_CALLARGS): restore outer block by using + ruby_block->outer. + + * eval.c (block_pass): do not alter block->prev, but block->outer. + + * array.c (get_inspect_tbl): warning on wrong condition. + +Mon May 19 16:13:57 2003 Minero Aoki + + * class.c: add #include "version.h". + + * hash.c: ditto. + + * string.c: ditto. + +Mon May 19 15:33:27 2003 Yukihiro Matsumoto + + * eval.c (localjump_xvalue): renamed exitstatus to exit_value + since it's not exit "status" after all. + + * eval.c (localjump_error): add reason to LocalJumpError. + + * compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value + is nil. now take new 2 arguments. + + * time.c (time_cmp): 2003-05-16 fix was incomplete. + (ruby-bugs-ja:PR#458) + +Mon May 19 14:42:50 2003 Yukihiro Matsumoto + + * object.c (rb_mod_cmp): stupid comparison fixed. + + * io.c (Init_IO): ARGF.path added (alias to ARGF.filename). + [ruby-dev:20197] + +Mon May 19 13:58:03 2003 Yukihiro Matsumoto + + * object.c (init_copy): rename copy_object as initialize_copy, + since it works as copy constructor. + + * eval.c (rb_add_method): initialize_copy should always be + private, like initialize. + +Mon May 19 13:51:50 2003 Minero Aoki + + * re.c (rb_reg_quote): \n \r \f \v quoting was wrong. + [ruby-dev:20203] + + * re.c (rb_reg_quote): rb_reg_quote(" ") should be "\\ ", not + "\\s". + +Mon May 19 08:08:51 2003 Tadayoshi Funaba + + * lib/date.rb: use warn() instead of $stderr.puts(). + + * sample/cal.rb: ditto. + +Sat May 17 12:02:25 2003 Yukihiro Matsumoto + + * array.c (get_inspect_tbl): check whether inspect_tbl value is a + valid array. (ruby-bugs-ja PR#65) + + * array.c (inspect_ensure,rb_protect_inspect,rb_inspecting_p): + use get_inspect_tbl(). + +Sat May 17 11:50:26 2003 Yukihiro Matsumoto + + * eval.c (rb_f_abort): call exit(1) if exception is raised. This + patch was made by Nobuyoshi Nakada on + 2002-05-30. (ruby-bugs-ja PR#236) + + * signal.c: disable Ruby's interrupt handler at the beginning. + (ruby-bugs-ja PR#236) + +Sat May 17 02:17:42 2003 Nobuyoshi Nakada + + * lib/rational.rb (Integer::denominator): fixed typo. + (ruby-bugs-ja:PR#466) + +Sat May 17 00:18:11 2003 Nobuyoshi Nakada + + * ext/socket/socket.c (ruby_connect): connect() after EINPROGRESS + returns EINVAL on some platforms, need to check true error + status. [ruby-core:01037] + +Sat May 17 00:21:51 2003 Yukihiro Matsumoto + + * object.c (rb_class_allocate_instance): singleton class check + moved to rb_obj_alloc(). (ruby-bugs-ja PR#345) + +Fri May 16 23:55:50 2003 Yukihiro Matsumoto + + * re.c (rb_reg_quote): should escape white space characters, + \t, \f, \n, \r. (ruby-bugs-ja PR#231) + +Fri May 16 12:40:40 2003 Yukihiro Matsumoto + + * eval.c (block_pass): chain previous block to the pushing block. + [ruby-list:37677] + + * time.c (time_cmp): does not compare with numbers for + interchangeability. (ruby-bugs-ja:PR#458) + +Thu May 15 21:55:54 2003 why the lucky stiff + + * ext/syck/gram.c: fixes to one-line documents and end of stream + documents. + + * ext/syck/syck.c, ext/syck/syck.h: add root_on_error to parser + struct, specifying the symbol to be returned on a parse error. + +Thu May 15 18:44:31 2003 Tanaka Akira + + * lib/open-uri.rb (OpenURI::Redirect#initialize): call super to + initialize mesg. + + * lib/open-uri.rb (OpenURI::Meta#charset): call block to guess charset + if block is given and charset is not given. + +Thu May 15 16:55:16 2003 Yukihiro Matsumoto + + * object.c (rb_mod_le): returns nil if two classes/modules are not + in class-superclass relationship. + + * object.c (rb_mod_cmp): uses new rb_mod_le() behavior. + +Thu May 15 07:45:30 2003 why the lucky stiff + + * ext/syck/rubyext.c, ext/syck/implicit.c: timestamp repairs to + timezone and milliseconds. + + * ext/syck/syck.c (syck_parser_reset_levels): duplicate string literal + to avoid warning. + +Thu May 15 13:26:48 2003 Yukihiro Matsumoto + + * class.c (rb_class_instance_methods): default will be changed in + 1.8.1. + + * io.c (set_stdio): better message. + +Thu May 15 13:18:11 2003 Yukihiro Matsumoto + + * io.c (set_stdio): $stdin, $stdout, $stderr now became read-only. + + * variable.c (readonly_setter): message changed. + +Thu May 15 09:50:51 2003 NAKAMURA Usaku + + * ext/syck/syck.c (syck_parser_pop_level): add prototype. + + * ext/syck/syck.c (syck_strndup): should return value. + +Thu May 15 09:32:25 2003 NAKAMURA Usaku + + * win32/win32.c (kill): fix typo and add signal 0 support. + +Wed May 14 20:09:26 2003 why the lucky stiff + + * ext/syck/gram.c: sequence-in-map shortcut, transfer methods on + sequence-in-sequence, memory leak in mapping merge. + + * ext/syck/syck.c: memory leak in domain anchoring. + + * lib/yaml/rubytypes.rb, lib/yaml/types.rb: eliminated 1.6.x code. + +Wed May 14 19:56:43 2003 NAKAMURA Usaku + + * ext/syck/rubyext.c: add prototypes to avoid VC++ warnings. + +Wed May 14 12:23:46 2003 Minero Aoki + + * lib/net/http.rb (Net::HTTP#start): should check whether HTTP + session is opened before finishing. (ruby-bugs-ja:PR#463) + +Wed May 14 09:12:55 2003 Minero Aoki + + * lib/net/http.rb: reduce warning. (ruby-bugs-ja:PR#462) + +Tue May 13 22:31:04 2003 why the lucky stiff + + * lib/yaml/rubytypes.rb, lib/yaml/types.rb: using Object#object_id + rather than deprecated Object#id. + + * ext/syck/token.c: changed ASCII escapes to octal notation. + + * ext/Setup*: added entries for static linking of Syck extension. + +Tue May 13 20:31:58 2003 WATANABE Hirofumi + + * configure.in: add '--Wl,--enable-auto-import' to DLDFLAGS + on Cygwin/MinGW. + + * configure.in: add '-D__USE_CRTIMP' to XCFLAGS on MinGW. + + * ext/syck/handler.c: add proper casts. + + * ext/syck/syck.c: ditto. + +Tue May 13 17:58:08 2003 NAKAMURA Usaku + + * configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define + HAVE_FSYNC. + + * win32/win32.h (fsync): define as _commit(). + +Tue May 13 15:35:35 2003 Yukihiro Matsumoto + + * regex.c (re_match_exec): \Z changed to be consistent with new $ + (endbuf) behavior. + +Tue May 13 14:48:07 2003 Yukihiro Matsumoto + + * eval.c (error_pos): use $deferr for output instead of stderr + directly. + + * eval.c (error_print,error_handle,rb_longjmp,rb_thread_schedule): + ditto. + +Tue May 13 06:34:19 2003 why the lucky stiff + + * lib/yaml/rubytypes.rb: object and struct loading + + * lib/yaml.rb: YAML::detect_implicit will discover typing for a Ruby + string + + * ext/syck/: Fixed portable comments, misuse of NULL and methods without + return VALUEs. + +Mon May 12 18:08:21 2003 Yukihiro Matsumoto + + * io.c (Init_IO): new variable $deferr which is default output + port of error messages. + + * io.c (rb_warn_m): new method "warn". [new] + + * error.c (warn_print): use $deferr. + + * error.c (rb_bug): ditto. + + * error.c (err_append): ditto. + +Sun May 11 13:50:12 2003 Tanaka Akira + + * lib/pp.rb: refine to_s test. + + * lib/pp.rb (PP::ObjectMixin#pretty_print): refine to_s handling. + +Sun May 11 06:32:13 2003 why the lucky stiff + + * ext/syck/implicit.c, ext/syck/rubyext.c: transfer methods applied to + native loading + + * ext/syck/token.c: fix for transfer methods on same indentation as nested + mapping + + * lib/yaml/rubytypes.rb: all type names in lowercase + +Sat May 10 19:55:18 2003 why the lucky stiff + + * ext/syck/gram.c ext/syck/handler.c ext/syck/implicit.c + ext/syck/node.c ext/syck/rubyext.c ext/syck/syck.c + ext/syck/syck.h ext/syck/token.c: updated to Syck 0.27 + + * lib/yaml/loader.rb: new YAML::Loader class + + * lib/yaml.rb: loading of type families leverages YAML::DefaultLoader + +Sat May 10 19:00:08 2003 Takaaki Uematsu + + * wince/string.c: file removed. + + * wince/stdlib.c: file added. + +Sat May 10 16:17:02 2003 Shugo Maeda + + * lib/net/imap.rb (decode_utf7): new method. + + * lib/net/imap.rb (encode_utf7): new method. + +Fri May 9 21:25:50 2003 why the lucky stiff + + * ruby/ext/syck, ruby/lib/yaml: Initial checkin of YAML substances. + +Fri May 9 16:38:30 2003 Yukihiro Matsumoto + + * io.c (rb_io_reopen): It should be possible to reopen closed IO. + [ruby-talk:70941] + + * io.c (rb_io_reopen): inherit original file mode unless specified. + +Thu May 8 18:44:09 2003 Yukihiro Matsumoto + + * gc.c (rb_gc): check odd alignment stack on m68k machines. + +Thu May 8 12:56:04 2003 Nobuyoshi Nakada + + * compar.c (rb_cmperr): raise comparison failure. + + * intern.h: prototype; rb_cmperr + + * numeric.c (flo_gt, flo_ge, flo_lt, flo_le, fix_gt, fix_ge, + fix_lt, fix_le): should fail unless the argument is comparable. + (ruby-bugs-ja:PR#456) + + * numeric.c (int_upto, int_downto): should fail unless the + argument is comparable. (ruby-bugs-ja:PR#454) + +Wed May 7 13:30:11 2003 Masahiro TANAKA + + * numeric.c (num_step): better error treatment of float values. + +Tue May 6 17:51:54 2003 Minero Aoki + + * lib/net/pop.rb: rename method: POP3#mail_size -> n_mails + + * lib/net/pop.rb: rename method: POP3#bytes -> n_bytes + +Tue May 6 17:21:01 2003 Minero Aoki + + * ext/bigdecimal/.cvsignore: new file. + + * ext/zlib/.cvsignore: new file. + +Tue May 6 14:39:36 2003 Yukihiro Matsumoto + + * object.c (rb_obj_methods): list singleton methods if recur + argument is false; list all methods otherwise. + +Mon May 5 21:19:25 2003 Koji Arai + + * ext/gdbm/gdbm.c (fgdbm_values_at): new method to replace + select(index..). + + * ext/sdbm/init.c (fsdbm_values_at): ditto. + + * ext/dbm/dbm.c (fdbm_values_at): ditto. + + * ext/dbm/dbm.c (DBM::VERSION): defined. + + * ext/gdbm/testgdbm.rb: replace select with values_at. + + * ext/sdbm/testsdbm.rb: ditto. + + * ext/dbm/testdbm.rb: ditto. + + * ext/dbm/testdbm.rb (setup): DBM.open(path, 0400) cause EACCESS + on Berkeley DB[234]. + +Mon May 5 22:57:07 2003 Tadayoshi Funaba + + * sample/cal.rb: use values_at instead of select. + + * sample/biorhythm.rb: ditto. + +Mon May 5 18:59:45 2003 WATANABE Hirofumi + + * sample/test.rb: substitute 'select' with 'values_at'. + + * lib/date.rb: ditto. + + * lib/parsedate.rb: ditto. + +Mon May 5 00:46:10 2003 Yukihiro Matsumoto + + * array.c (rb_ary_values_at): new method to replace select(index..). + + * hash.c (rb_hash_values_at,env_values_at): ditto. + + * re.c (match_values_at): ditto. + + * struct.c (rb_struct_values_at): ditto. + + * re.c (match_select): add iterator behavior. + +Sun May 4 19:08:53 2003 Tadayoshi Funaba + + * lib/date/format.rb: synchronized with date2 3.3.2. + +Sun May 4 15:21:18 2003 Minero Aoki + + * lib/net/smtp.rb: ESMTP -> SMTP transition wrongly fails. + +Sun May 4 15:06:37 2003 Minero Aoki + + * lib/net/pop.rb: APOP did not work. [ruby-dev:20149] + +Sat May 3 21:14:29 2003 Johan Holmberg + + * ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c, + ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up + "_FILE_OFFSET_BITS redefined" warning on Solaris. + +Sat May 3 11:00:12 2003 Yukihiro Matsumoto + + * class.c (rb_class_protected_instance_methods): now gives + warnings to show migration path. The default will be reversed + on Jan 2004. + +Sat May 3 00:58:53 2003 Yukihiro Matsumoto + + * object.c (rb_obj_methods): now accepts recurse parameter. + + * lib/delegate.rb (Delegator::initialize): instance_methods + etc. now recurse by default. need to specify false. + +Sat May 3 00:22:00 2003 Minero Aoki + + * lib/net/protocol.rb: reintroduce Protocol.protocol_param. + + * lib/net/http.rb: ditto. + + * lib/net/pop.rb: ditto. + + * lib/net/smtp.rb: ditto. + +Fri May 2 23:29:53 2003 Minero Aoki + + * lib/net/protocol.rb: remove Protocol class. + + * lib/net/smtp.rb (SMTP): ditto. + + * lib/net/pop.rb (POP3): ditto. + + * lib/net/http.rb (HTTP): ditto. + + * lib/net/protocol.rb: remove Command class. + + * lib/net/smtp.rb (SMTPCommand): ditto. + + * lib/net/pop.rb (POP3Command): ditto. + + * lib/net/pop.rb: remove APOPCommand class. + + * lib/net/protocol.rb: remove Code class and its all subclasses. + + * lib/net/protocol.rb: remove Response class and its all + subclasses. + + * lib/net/pop.rb (POPMail): new method unique_id (alias uidl). + +Fri May 2 18:17:37 2003 Yukihiro Matsumoto + + * compar.c (cmp_gt): raises ArgumentError when "<=>" give nil. + inspired by discussion on comp.lang.python. + +Fri May 2 17:37:01 2003 Yukihiro Matsumoto + + * lib/cgi/session.rb (CGI::Session::initialize): updated to + support 2003-04-23 change in cgi.rb [ruby-core:1002] + +Fri May 2 17:21:02 2003 Yukihiro Matsumoto + + * class.c (method_list): classify methods based on nearest + visibility. [ruby-dev:20127] + + * class.c (rb_class_instance_methods): recurse by default. other + method listing methods as well. + +Fri May 2 09:38:06 2003 Warren Brown + + * string.c (rb_str_ljust): now takes optional argument to specify + pad string. [ruby-talk:70482] + + * string.c (rb_str_rjust): ditto. + + * string.c (rb_str_center): ditto. + + * string.c (rb_str_justify): utility function. + +Fri May 2 04:10:59 2003 Yukihiro Matsumoto + + * eval.c (rb_add_method): call singleton_method_added or + method_added for every method definition (after ruby_running). + [ruby-talk:70471] + + * array.c (rb_ary_reverse_bang): Array#reverse! should not return + nil even for arrays sized less than 2. + +Thu May 1 23:18:01 2003 Yukihiro Matsumoto + + * io.c (argf_eof): should not block after reading all argument + files. (ruby-bugs-ja PR#449) + +Fri May 2 15:10:41 2003 Minero Aoki + + * lib/fileutils.rb: use hashes to pass options. + + * lib/fileutils.rb: new option mkdir(:mode), mkdir_p(:mode). + + * instruby.rb: follow fileutils.rb feature change. + +Thu May 1 08:24:00 2003 Yukihiro Matsumoto + + * regex.c (re_match_exec): $ _always_ matches at the end of string. + +Wed Apr 30 14:12:00 2003 wanowa.kimura@nifty.ne.jp (kimura wataru) + + * net/imap.rb: support THREAD extension. + +Sun Apr 27 23:13:20 2003 Nobuyoshi Nakada + + * string.c (rb_str_to_i): disallow negative radix. + [ruby-dev:20087] + +Sat Apr 26 23:34:42 2003 Yukihiro Matsumoto + + * parse.y (open_args): warning message changed to "don't put space + before argument parentheses". + +Sat Apr 26 14:25:00 2003 Takaaki Uematsu + + * wince/ : files removed. + (config, dll.mak, exe.mak, mswince-ruby17.def, + io.c, process.c, signal.c, string.c, time.c) + + * wince/ : files added. + (assert.c, Makefile.sub, mkexports.rb, io_wce.c, + process_wce.c, signal_wce.c, string_wce.c, + time_wce.c) + + * wince/configure.bat : like mswin32 style. + + * wince/direct.c : remove "static" at _currentdir. + + * wince/io.h : change definition. + + * wince/stdio.c : _fdopen -> fdopen. + + * wince/process.h : add _P_OVERLAY. + + * wince/time.h : change definition. + + * wince/wincemain.c : add wce_SetCurrentDir. + + * wince/wince.c : add wce_SetCurrentDir and wce_fopen. + fix GetModuleFileNameA to return correct "lpFileName". + + * wince/wince.h : remove #ifdef. + + * wince/sys/utime.h, utime.c : rename _utime to utime. + + * wince/sys/stat.c : expand relative directory in stat. + +Sat Apr 26 06:33:04 2003 Yukihiro Matsumoto + + * io.c (argf_read): ARGF.read() should read all argument files. + +Fri Apr 25 18:46:00 2003 Takaaki Uematsu + + * gc.c: STACK_LEVEL_MAX=65535 on mswince. + +Fri Apr 25 18:40:07 2003 Yukihiro Matsumoto + + * io.c (argf_read): read should not span two files. [ruby-dev:20073] + +Fri Apr 25 18:19:03 2003 Yukihiro Matsumoto + + * eval.c (splat_value): split splat_value() and avalue_splat(). + + * io.c: there's no way to set non-IO value to current_file, thus + no need for argf_forward(). + +Fri Apr 25 02:03:25 2003 Yukihiro Matsumoto + + * eval.c (proc_invoke): Proc#yield should pass through retry and + break like keyword yield. [ruby-talk:70034] + + * eval.c (proc_invoke): orphan Proc now raises LocalJumpError for + break and retry again. + + * eval.c (rb_eval): ARGSCAT should splat the argument. + + * eval.c (splat_value): splat operation function. + +Thu Apr 24 23:37:02 2003 Dave Thomas + + * lib/matrix.rb (Matrix#minor): Used Range#size, which no longer + exists. + + * lib/complex.rb (new!): Complex.new had been made private, but + Kernel#Complex called it. Re-exposed as new!. + + * lib/matrix.rb (Matrix.row_vector): Fix method name typo + +Thu Apr 24 19:40:02 2003 WATANABE Hirofumi + + * ext/extmk.rb: add -Wl,--no-undefined to LDSHARED only + if GNU ld is 2.11 or later. + +Wed Apr 23 14:05:40 2003 Dave Thomas + + * lib/ipaddr.rb (include?): Support non-IPAddr parameters. + [ruby-core:00980] + +Wed Apr 23 13:31:10 2003 Yukihiro Matsumoto + + * lib/cgi.rb (CGI::QueryExtension::[]): always return Value + object. + +Wed Apr 23 08:39:27 2003 Nobuyoshi Nakada + + * ext/zlib/extconf.rb: bccwin32 is win32 too. + +Tue Apr 22 20:58:00 2003 Takaaki Uematsu + + * ruby.c: don't call VirtualQuery in ruby_init_loadpath() + on mswince. + +Tue Apr 22 19:08:53 2003 Nobuyoshi Nakada + + * marshal.c (save_mantissa, load_mantissa): for interoperability + should count cut-down bit from topmost. + +Tue Apr 22 09:20:40 2003 Yukihiro Matsumoto + + * parse.y (arg_ambiguous): hopefully better message. + + * lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary + removed. + +Tue Apr 22 06:06:22 2003 Tanaka Akira + + * lib/resolv.rb (Resolv::DNS::Resource#hash): use XOR to accumulate + hash value. + + * lib/tsort.rb (TSort#each_strongly_connected_component): don't use + block argument. + (each_strongly_connected_component_from): ditto. + +Mon Apr 21 21:59:48 2003 Nobuyoshi Nakada + + * marshal.c: one more digit for decimal point. [ruby-talk:69808] + +Mon Apr 21 21:25:59 2003 Nobuyoshi Nakada + + * numeric.c (flo_is_finite_p): use finite() if available. + + * win32/win32.h (isinf, isnan): define as macro. + [ruby-win32:00533] + + * bcc32/Makefile.sub, win32/Makefile.sub: no longer use + missing/isinf.c, missing/isnan.c. + +Mon Apr 21 18:36:28 2003 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): unnecessarily long buffer was used + for radix 9. [ruby-dev:20057] + +Mon Apr 21 17:44:34 2003 Nobuyoshi Nakada + + * parse.y (block_append, value_expr0, assign_in_cond, + warn_unless_e_option, warning_unless_e_option, range_op, + cond0): adjust line number in warning. + +Mon Apr 21 00:47:42 2003 WATANABE Hirofumi + + * sample/test.rb: avoid the MSVCRT *printf problem(float). + [ruby-dev:20037] + +Mon Apr 21 00:11:15 2003 Nobuyoshi Nakada + + * marshal.c (w_float): append least mantissa bits to get rid + of roundoff problem. [ruby-talk:69518] + + * marshal.c (r_object0): load least mantissa bits. + +Sun Apr 20 23:24:25 2003 WATANABE Hirofumi + + * win32/win32.c (NtInitialize): set the floating-point control word + on bcc32. + + * win32/win32.h, bcc32/Makefile.sub: use missing/isinf.c, should not + use _finite() because it returns 0 if NaN. + +Sun Apr 20 03:09:30 2003 WATANABE Hirofumi + + * parse.y (void_expr0): node might become NULL after calling + remove_begin(). + +Sat Apr 19 21:55:10 2003 Akinori MUSHA + + * ext/Setup*: Add zlib and remove bogus and obsolete entries. + +Sat Apr 19 14:47:07 2003 Yukihiro Matsumoto + + * gc.c (rb_gc): use rb_gc_mark_maybe() to mark registered C + addresses. C variables may not hold valid reference to Ruby + objects. [ruby-core:00975] + +Sat Apr 19 00:56:13 2003 Yukihiro Matsumoto + + * struct.c (rb_struct_eql): should compare values with "eql?". + +Fri Apr 18 23:29:08 2003 Yukihiro Matsumoto + + * range.c (range_check): <=> returns nil for invalid values; + should check. + +Fri Apr 18 15:26:50 2003 NAKAMURA Usaku + + * error.c (rb_raise): workaround for some implementations of + vsnprintf. + +Fri Apr 18 02:23:42 2003 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should not set RE_OPTIMIZE_ANCHOR, + if anychar_repeat is enclosed by parentheses. + +Fri Apr 18 01:49:18 2003 Nobuyoshi Nakada + + * util.c (ruby_strtod): improved conversion accuracy. + +Thu Apr 17 14:39:23 2003 NAKAMURA Usaku + + * ext/dbm/dbm.c (each_pair): add prototype to avoid VC++ warnings. + + * ext/readline/readline.c (Init_readline): follow readline 4.2 + prototype. + +Thu Apr 17 14:22:36 2003 Nobuyoshi Nakada + + * parse.y (cond0): warn only range literals whose both side are + literals. [ruby-core:00964] + +Thu Apr 17 11:10:59 2003 WATANABE Hirofumi + + * ext/readline/readline.c: add the defined operator for bcc32. + +Wed Apr 16 00:14:06 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-special-char-p): should test at the + point if no argument. fixed by Michael Scholz + . + +Tue Apr 15 19:35:08 2003 Minero Aoki + + * lib/fileutils.rb: rm_r should raise Errno::ENOENT if file + does not exist ([ruby-core:958]). Thanks Johan Holmberg. + +Tue Apr 15 19:12:21 2003 Nobuyoshi Nakada + + * struct.c (rb_struct_hash): new methods Struct#hash, Struct#eql?. + (ruby-bugs:PR#758) + +Tue Apr 15 16:05:11 2003 Nobuyoshi Nakada + + * numeric.c (rb_fix2str): buffer was insufficient. + (ruby-bugs-ja:PR#431) + +Mon Apr 14 19:45:56 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): root must follow buf when + reallocated. [ruby-talk:69339], [ruby-dev:20025] + +Mon Apr 14 03:22:33 2003 Yukihiro Matsumoto + + * rubyio.h (struct OpenFile): add noraise flag to finalizer. + + * io.c (Init_IO): define $/, $-0, and $\ as string-only + variables. + + * string.c (rb_str_split_m): does not generate empty string if + the receiver is empty. + + * io.c (fptr_finalize): should raise error on EBADF for readable + IOs as well. + +Mon Apr 14 15:54:18 2003 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix. + + * numeric.c (rb_fix2str): ditto. + + * string.c (rb_str_to_i): ditto. + +Sun Apr 13 03:20:31 2003 WATANABE Hirofumi + + * lib/mkmf.rb (try_func): remove COMMON_HEADERS at first for + performance. + +Sat Apr 12 20:59:40 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-beginning-of-arg): substitute + ruby-backward-arg. + + * misc/ruby-mode.el (ruby-calculate-indent): fixed wrong + indentation in brace block and parentheses. + + * misc/ruby-mode.el (ruby-forward-sexp, ruby-backward-sexp): + support special char literal, and negative arguments. + +Sat Apr 12 17:52:47 2003 Yukihiro Matsumoto + + * file.c (rb_stat): use rb_check_convert_type() to retrieve IO. + +Fri Apr 11 19:00:14 2003 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_stat): check arguments. [ruby-dev:20007] + [ruby-win32:535] + +Fri Apr 11 15:56:08 2003 Nobuyoshi Nakada + + * numeric.c (coerce_rescue): prevent inspected String from GC. + + * numeric.c (flo_eq, rb_dbl_cmp, flo_gt, flo_ge, flo_lt, flo_le, + flo_eql): correct NaN comparison. (ruby-bugs:PR#744) + + * sample/test.rb: NaN comparison test. + +Fri Apr 11 14:48:47 2003 Yukihiro Matsumoto + + * file.c (rb_stat): dereference using StringValuePtr(). + + * file.c (rb_file_s_stat): use rb_stat(). [ruby-dev:20007] + +Fri Apr 11 10:51:08 2003 Nobuyoshi Nakada + + * lib/benchmark.rb (Benchmark::bm): get rid of warning. + [ruby-talk:69124] + +Fri Apr 11 02:41:35 2003 Nobuyoshi Nakada + + * io.c (set_stdin): assigned value must respond to "read" and + "getc". + + * io.c (set_outfile): assigned value must respond to "write". + (ruby-bugs-ja:PR#425) + +Thu Apr 10 21:12:19 2003 Minero Aoki + + * lib/net/pop.rb: Exception line was accidentaly removed. + [ruby-dev:19989] + +Thu Apr 10 18:42:13 2003 Tadayoshi Funaba + + * array.c (rb_ary_times): added some checks for request size. + +Thu Apr 10 03:22:38 2003 Yukihiro Matsumoto + + * variable.c (rb_mod_name): always return empty string for + anonymous class/module. (ruby-bugs-ja PR#424) + + * config.sub: stop forcing addition of -gnu to -linux. + + * variable.c (classname): refactoring. + + * variable.c (rb_class_path): __tmp__classpath__ handling moved + from classname(). + +Thu Apr 10 01:52:24 2003 Nobuyoshi Nakada + + * eval.c (rb_obj_is_method): indefinite return value. + +Thu Apr 10 00:39:32 2003 Tanaka Akira + + * regex.c (re_compile_pattern): /[\--\-]/ was warned. warn /]/. + + * mkconfig.rb: escape `]' in regexp. + +Thu Apr 10 00:27:07 2003 Nobuyoshi Nakada + + * time.c (time_strftime): RSTRING(format)->ptr might become NULL. + +Wed Apr 9 23:54:50 2003 Yukihiro Matsumoto + + * variable.c (rb_obj_remove_instance_variable): better message. + [ruby-talk:68987] + + * variable.c (rb_mod_remove_const): ditto. + + * object.c (rb_obj_ivar_get): ditto. + + * object.c (rb_obj_ivar_set): ditto. + + * parse.y (yylex): ditto. + +Wed Apr 9 21:51:20 2003 Dave Thomas + + * eval.c (rb_mod_define_method): Allow UnboundMethod as + parameter. + +Wed Apr 9 18:30:58 2003 Yukihiro Matsumoto + + * eval.c (top_include): include module to wrapper module if + wrapper is present. experimental. [ruby-list:37539] + +Wed Apr 9 17:24:21 2003 Yukihiro Matsumoto + + * gc.c (rb_gc_mark_children): introduce this function again; this + is required when stack was very tight. [ruby-talk:68916] + +Wed Apr 9 15:49:30 2003 Yukihiro Matsumoto + + * bignum.c (bigdivmod): small typo. + +Wed Apr 9 15:35:04 2003 NAKAMURA Usaku + + * ext/readline/readline.c: include only when + HAVE_UNISTD_H is defined. + +Wed Apr 9 14:05:00 2003 Nobuyoshi Nakada + + * marshal.c (w_object): preserve extended module on struct. + (ruby-bugs-ja:PR#422) + +Wed Apr 9 03:43:14 2003 Yukihiro Matsumoto + + * bignum.c (BIGZEROP): macro to determine if x is a bignum zero. + +Tue Apr 8 11:49:31 2003 Yukihiro Matsumoto + + * eval.c (Init_Proc): make Method and UnboundMethod independent. + They are like instance and its class. [ruby-core:00941] + + * parse.y (yylex): disallow global variables like "$1ve". + [ruby-core:00945] + + * marshal.c (marshal_dump): Marshal.dump(0, false) should cause an + error. (ruby-bugs-ja PR#421) + + * regex.c (re_compile_pattern): warn if '-' is the edge of + character range. + +Mon Apr 7 15:49:09 2003 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_unpack_sockaddr_in): remove struct + size check. getnameinfo(3) can handle. [ruby-dev:19967] + +Mon Apr 7 01:33:31 2003 Yukihiro Matsumoto + + * io.c (io_read): do not call rb_sys_fail() when required data + length is zero. (ruby-bugs-ja PR#420) + + * eval.c (umethod_proc): should raise TypeError, instead of + returning error causing Proc. Following the principle of "fail + early". [ruby-core:00927] + +Sun Apr 6 18:29:21 2003 UENO Katsuhiro + + * ext/zlib/zlib.c: the return value of GzipReader#getc must be + unsigned. + +Sun Apr 6 00:35:37 2003 Tanaka Akira + + * sample/exyacc.rb: use Regexp in gsub!. + +Sat Apr 5 23:41:28 2003 Yukihiro Matsumoto + + * pack.c (pack_pack): small but serious typo. + +Sat Apr 5 04:23:05 2003 Warren Brown + + * sprintf.c (rb_f_sprintf): was decrementing width even if there + is no sign character. + +Sat Apr 5 01:41:28 2003 Yukihiro Matsumoto + + * eval.c (backtrace): skip internal allocator frame. + (ruby-bugs-ja PR#416) + +Fri Apr 4 10:53:22 2003 Yukihiro Matsumoto + + * eval.c (assign): should prepare mrhs by svalue_to_mrhs(). + +Wed Apr 2 15:11:23 2003 Nobuyoshi Nakada + + * README.EXT, README.EXT.ja (3.3): clarified -1 as free for + Data_Wrap_Struct(). [ruby-dev:19881] + +Mon Mar 31 11:11:36 2003 Yukihiro Matsumoto + + * eval.c (rb_f_missing): use "inspect" for T_OBJECT as well. + +Mon Mar 31 10:50:48 2003 Yukihiro Matsumoto + + * hash.c (env_reject_bang): untaint key string. + + * hash.c (env_delete_m): execute block only if deleting key does + not exist. + +Sat Mar 29 17:54:46 2003 Yukihiro Matsumoto + + * pack.c (pack_pack): do not call rb_str_buf_cat() with NULL ptr, + which causes SEGV; jump to grow instead. [ruby-dev:19944] + +Sat Mar 29 15:19:48 2003 Tanaka Akira + + * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb, + lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb, + lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert + escape for `-' in character class. + +Sat Mar 29 09:48:35 2003 Yukihiro Matsumoto + + * eval.c (avalue_to_svalue): use rb_check_array_type() again. + Clarify how "to_ary" and "to_a" work. [ruby-talk:68155] + + * eval.c (svalue_to_avalue): ditto. + + * eval.c (svalue_to_mrhs): ditto. + + * eval.c (rb_eval): unary splat to use to_a, but we need a hack to + exclude Object#to_a until it's removed. + + * object.c (rb_Array): check obj.respond_to?("to_a"). Currently + all object respond_to "to_a", but Object#to_a will be removed. + + * range.c (Init_Range): undefine to_ary. + + * re.c (Init_Regexp): ditto. + +Sat Mar 29 09:47:52 2003 Nobuyoshi Nakada + + * MANIFEST (ext/aix_mksym.rb): remove obsolete file. + +Fri Mar 29 06:21:24 2003 UENO Katsuhiro + + * ext/zlib: merge from rough. + +Fri Mar 28 19:33:39 2003 Nobuyoshi Nakada + + * variable.c (rb_class_path): hold temporary class path in a + instance variable to get rid of GC. [ruby-dev:19932] + + * variable.c (classname): remove temporary class path when exact + name found. + +Fri Mar 28 18:29:23 2003 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): do not warn if "-" is at the top + or last of character class. + +Thu Mar 27 12:10:15 2003 Tanaka Akira + + * regex.c (re_compile_pattern): fix [:name:] handling. + /[\[:digit:]]/ was treated as /[[:digit:]]/. + /[[:-@]/ was treated as /[\[:\-@]/. + /[%-[:digit:]]/ was treated as /[%-\[:digit:]\]/. + +Thu Mar 27 03:26:40 2003 Nobuyoshi Nakada + + * string.c (rb_str_capitalize_bang): check length before upcase + first character. (ruby-bugs:PR#697) + +Wed Mar 26 20:25:10 2003 Nobuyoshi Nakada + + * dln.c (dln_find_1): break if path list end, even for too long + path names. (ruby-bugs-ja:PR#412) + +Wed Mar 26 13:19:32 2003 Yukihiro Matsumoto + + * eval.c (avalue_splat): new function to do unary * (splat) + operator. + + * eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do + not use implicit "to_ary" conversion. + + * ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check. + + * ext/curses/curses.c (curses_init_screen): ditto. + + * ext/curses/curses.c (window_initialize): ditto. + + * gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe + mode ($SAFE >= 4). + +Tue Mar 25 23:26:02 2003 Yukihiro Matsumoto + + * signal.c (trap): return "DEFAULT" and "IGNORE" respectively for + previous sighandler SIG_DFL and SIG_IGN. [ruby-talk:67860] + +Tue Mar 25 12:24:15 2003 Yukihiro Matsumoto + + * eval.c (rb_yield_0): call avalue_to_mrhs() to assign block + parameter |a|. [ruby-dev:19897] + + * ruby.c (ruby_set_argv): freeze argument strings. + +Tue Mar 25 12:01:54 2003 Yukihiro Matsumoto + + * io.c (rb_io_initialize): should check rb_secure(4). + + * dir.c (dir_s_getwd): should check rb_secure(4). + + * object.c (rb_obj_infect): function version of OBJ_INFECT(). + + * eval.c (rb_secure_update): new function to check object update. + +Tue Mar 25 10:18:05 2003 Minero Aoki + + * ext/strscan/strscan.c: should infect also return values of + #inspect. + + * ext/strscan/strscan.c: use snprintf() instead of sprintf(). + +Mon Mar 24 16:55:04 2003 Takaaki Tateishi + + * ext/dl/dl.c: added rb_secure(4). (Thanks to Minero Aoki) + + * ext/dl/sym.c: ditto. + + * ext/dl/ptr.c: ditto. + +Mon Mar 24 00:09:02 2003 Nobuyoshi Nakada + + * parse.y (block_append): warn unused literal. + +Sun Mar 23 22:22:04 2003 WATANABE Hirofumi + + * lib/jcode.rb (tr!, delete!, szueeze!): add empty string checking. + +Sun Mar 23 19:54:53 2003 Nobuyoshi Nakada + + * gc.c (rb_gc_call_finalizer_at_exit): use free() if dfree is -1. + +Sat Mar 22 15:50:29 2003 Tanaka Akira + + * time.c (make_time_t): try search_time_t if mktime/timegm is failed. + +Sat Mar 22 13:26:33 2003 Tanaka Akira + + * lib/optparse.rb, lib/jcode.rb, ext/tk/lib/tk.rb: reorder character + class /[\]\[]/ to /[\[\]]/ for readability. + +Sat Mar 22 12:44:15 2003 Tanaka Akira + + * lib/date/format.rb, lib/uri/common.rb: escape `[', `]', `-' in + character class in regexp to avoid warning. + +Sat Mar 22 07:39:32 2003 Ulf Betlehem + + * io.c (rb_io_fread): may lose data on nonblocking read. + +Fri Mar 21 23:40:41 2003 Tanaka Akira + + * regex.c (re_compile_pattern): fix previous change. + + * instruby.rb, ext/extmk.rb, ext/tk/lib/tk.rb, lib/benchmark.rb, + lib/cgi.rb, lib/debug.rb, lib/getoptlong.rb, lib/jcode.rb, + lib/optparse.rb, lib/time.rb, lib/date/format.rb, + lib/irb/ruby-lex.rb: escape `[', `]', `-' in character class in + regexp to avoid warning. + +Fri Mar 21 23:23:45 2003 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): give warning for unescaped square + brackets and minus in character class. [ruby-dev:19868] + +Fri Mar 21 18:12:20 2003 Nobuyoshi Nakada + + * eval.c (bmcall): missing type. + +Fri Mar 21 01:29:35 2003 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): copy sign bits only if value is + negative. + + * missing.h: include or if HAVE_VSNPRINTF + is not defined. + +Thu Mar 20 18:31:37 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser#order!): follow recent change + of proc argument. + +Thu Mar 20 16:12:53 2003 Yukihiro Matsumoto + + * numeric.c (flo_to_s): change format specifier to "%.15g" to + avoid unnecessary 9s (e.g. 99.59999999999999). (ruby-bugs-ja PR#406) + +Thu Mar 20 16:03:18 2003 Nobuyoshi Nakada + + * parse.y (stmt, primary): get rid of SEGV at empty or invalid + condition. (ruby-bugs-ja:PR#410) + + * parse.y (cond_negative): negate condition node when NODE_NOT. + +Thu Mar 20 10:45:29 2003 Tanaka Akira + + * eval.c (bmcall): add volatile to avoid GC problem. + +Thu Mar 20 10:10:49 2003 Yukihiro Matsumoto + + * eval.c (load_dyna): clear ruby_errinfo. (ruby-bugs-ja PR#409) + +Wed Mar 19 23:05:30 2003 NAKAMURA, Hiroshi + + * lib/tracer.rb (trace_func): save and recover Thread.critical state. + Fixed by Fukumoto Atsushi [ruby-dev:19830] + +Wed Mar 19 02:55:46 2003 Yukihiro Matsumoto + + * io.c (read_all): make str empty if given. (ruby-bugs-ja PR#408) + + * io.c (io_read): ditto. + + * io.c (rb_io_sysread): ditto. + +Tue Mar 18 18:24:03 2003 Yukihiro Matsumoto + + * range.c: do not override min and max. + +Sun Mar 16 12:29:55 2003 Tanaka Akira + + * lib/pp.rb (object_address_group): use to_s instead of name + to get name of class. + +Fri Mar 14 08:53:29 2003 Yukihiro Matsumoto + + * sprintf.c (remove_sign_bits): octal left most digit for negative + numbers may be '3'. (ruby-bugs-ja PR#407) + + * sprintf.c (rb_f_sprintf): should prefix sign bits if bignum is + negative, using sign_bits(). + +Wed Mar 12 16:48:19 2003 WATANABE Hirofumi + + * io.c (prep_stdio): set binmode only if the file descriptor + is not connected to a terminal on Cygwin. + +Wed Mar 12 11:23:49 2003 Yukihiro Matsumoto + + * eval.c (avalue_to_mrhs): split argument passing and assignment + conversion. + + * eval.c (svalue_to_mrhs): ditto. + + * eval.c (avalue_to_svalue): avalue_to_svalue([[1,2]]) should be + [[1,2]], not [1,2] to wrap-around. + +Tue Mar 11 21:00:59 2003 Minero Aoki + + * lib/net/smtp.rb: Digest string wrongly included '\n' when user + name is too long (ruby-bugs-ja:PR#404). + +Tue Mar 11 20:07:01 2003 Minero Aoki + + * lib/net/http.rb: speeding up by avoiding extra flush. + (suggested by Brian Candler [ruby-talk:66516]) + +Tue Mar 11 04:30:12 2003 Yukihiro Matsumoto + + * eval.c (massign): remove unnecessary array unpacking; it should + be handled before massign() by svalue_to_mrhs(). + + * eval.c (svalue_to_mrhs): '*a = v' value conversion to avalue + (i.e. [1] => [[1]], [1,2] => [1,2]). + + * eval.c (rb_eval): use svalue_to_mrhs. + + * eval.c (rb_yield_0): ditto. + + * eval.c (proc_invoke): break from "Proc#yield" is legal. + +Mon Mar 10 23:19:29 2003 Yukihiro Matsumoto + + * file.c (rb_find_file): need world writable directory check for + relative paths too. + +Mon Mar 10 11:23:00 2003 Yukihiro Matsumoto + + * file.c (rb_find_file): world writable directory check if + $SAFE >= 1 (was $SAFE >= 2). + +Mon Mar 10 01:59:47 2003 Minero Aoki + + * lib/net/pop.rb: do not dispatch LIST when a mailbox is empty. + + * lib/net/pop.rb: merge the 'STAT' patch from Frank S.Fejes + , with modifications (listed below). + + * lib/net/pop.rb: new method Net::POP#mail_size. + + * lib/net/pop.rb: new method Net::POP#bytes. + + * lib/net/pop.rb: new method Net::POPCommand#stat. + +Sun Mar 9 19:30:25 2003 WATANABE Hirofumi + + * lib/fileutils.rb (mkdir, mkdir_p): revert. + + * instruby.rb (umask): umask 0022, not 0. + +Sun Mar 9 17:09:40 2003 WATANABE Hirofumi + + * lib/fileutils.rb (mkdir, mkdir_p): set mode to 0755. + + * Makefile.in (fake.rb): set ALT_SEPARATOR to the default value. + +Sat Mar 8 11:30:59 2003 Nobuyoshi Nakada + + * eval.c (massign): fix a bug not to expand in assignment to sole + lhs. [ruby-dev:19766] + +Fri Mar 7 21:57:25 2003 Tanaka Akira + + * lib/pp.rb (Kernel.pp): module function. + (MatchData#pretty_print): new method. + +Fri Mar 7 20:27:19 2003 Nobuyoshi Nakada + + * ext/tcltklib/extconf.rb (find_tcl, find_tk): return true if + non-versioned found. [ruby-dev:19759] + +Fri Mar 7 15:05:35 2003 WATANABE Hirofumi + + * ext/dbm/extconf.rb: add QDBM support. + +Fri Mar 7 12:59:39 2003 Nobuyoshi Nakada + + * eval.c (massign): deal with sole lhs, assign rest args from + converted array. [ruby-dev:19751] + +Fri Mar 7 03:31:36 2003 Yukihiro Matsumoto + + * parse.y (dsym): :"symbol string" style should not contain `\0'. + + * process.c (proc_detach): new method Process.detach(pid) which + create background watcher thread to issue waitpid. [new] + + * process.c (rb_detach_process): utility function to detach + process from C code. + + * ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread, + and detach child process (by creating new idle waitpid watcher + thread). + + * ext/pty/pty.c (pty_syswait): may lost signal stopped child. + +Fri Mar 7 00:30:33 2003 WATANABE Hirofumi + + * ext/Win32API/Win32API.c: no longer use inline-asms. + + * ext/Win32API/extconf.rb: no need to add gcc options. + +Thu Mar 6 13:02:10 2003 Yukihiro Matsumoto + + * parse.y (reswords): fix reswords list. + +Wed Mar 5 12:13:21 2003 WATANABE Hirofumi + + * configure.in: better YACC support on HP-UX. + +Wed Mar 5 05:55:20 2003 Yukihiro Matsumoto + + * string.c (rb_str_cat): remove ptr NULL check and MEMZERO(). ptr + must be non NULL. + +Tue Mar 4 23:12:07 2003 Nobuyoshi Nakada + + * configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define + RUBY_EXPORT to export symbols. + + * defines.h: use RUBY_EXTERN instead of EXTERN. + + * intern.h, re.h, ruby.h, rubysig.h: ditto. + + * win32/win32.h: remove EXTERN definition. + +Tue Mar 4 17:54:30 2003 Yukihiro Matsumoto + + * array.c (rb_ary_aref): raise TypeError if index is a symbol. + [ruby-list:37217] + + * array.c (rb_ary_aset): ditto. + +Tue Nov 13 14:39:11 2001 WATANABE Tetsuya + + * missing/strftime.c: HP-UX support. + +Tue Mar 4 15:08:08 2003 WATANABE Hirofumi + + * configure.in: better HP-UX support. + + * missing/strftime.c: ditto. + +Tue Mar 4 10:11:32 2003 Yukihiro Matsumoto + + * io.c (rb_io_popen): do not call rb_io_close() directly, call + "close" method instead. [ruby-dev:19717] + + * io.c (rb_io_s_open): ditto. + + * hash.c (rb_any_hash): remove DEFER_INTS. all do_hash() calls in + st.c are at the top of functions. No reentrant problem. + +Tue Mar 4 01:19:21 2003 Akinori MUSHA + + * ext/dl/MANIFEST: Exclude .cvsignore. [found by: eban] + +Tue Mar 4 01:17:08 2003 Akinori MUSHA + + * ext/Win32API/MANIFEST: Belatedly add lib/win32/registry.rb. + [found by: eban] + +Tue Mar 4 00:33:04 2003 Akinori MUSHA + + * MANIFEST: Belatedly add Test::Unit files. D'oh! + +Sun Mar 2 09:51:47 2003 Nobuyoshi Nakada + + * marshal.c (w_nbyte): should output always via rb_io_write(). + + * marshal.c (dump_ensure): ditto. + + * marshal.c (marshal_dump): should call "binmode" method, if it + responds to. + + * marshal.c (r_byte): should input always via "getc" method. + + * marshal.c (r_bytes0): should input always via "read" method. + + * marshal.c (marshal_load): need not to set up FILE* fp; + +Mon Mar 3 11:29:04 2003 Yukihiro Matsumoto + + * parse.y (arg): parse 'lhs = a rescue b' as 'lhs=(a rescue b)'. + +Mon Mar 3 02:53:52 2003 Yukihiro Matsumoto + + * io.c (rb_io_fread): should not clearerr() if there's no filled + buffer (i.e. rb_io_fread() returning zero). + +Mon Mar 3 01:42:35 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-expr-beg): escaped char syntax. + + * misc/ruby-mode.el (ruby-parse-partial): ditto. + + * misc/ruby-mode.el (ruby-parse-partial): no deep indent for + block. + + * misc/ruby-mode.el (ruby-backward-arg): skip arguments backward. + + * misc/ruby-mode.el (ruby-calculate-indent): too deep indentation. + +Fri Feb 28 23:50:32 2003 NAKAMURA Usaku + + * win32/win32.c (map_errno): map OS error to errno. [new] + + * win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid, + kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime): use + map_errno() instead of using GetLastError() directly. + + * win32/win32.c (rb_w32_select, rb_w32_accept, rb_w32_bind, + rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname, + rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv, + rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt, + rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr, + rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname, + rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport, + rb_w32_fclose, rb_w32_close): map winsock error to errno. + +Fri Feb 28 22:54:10 2003 Nobuyoshi Nakada + + * win32/win32.c (flock): supports larger files, and maps error + code. + + * win32/win32.c (rb_w32_asynchronize): returns errno from child + thread. + + * win32/win32.c (rb_w32_fclose, rb_w32_close): ensures unlocked. + +Wed Feb 26 17:38:16 2003 Tanaka Akira + + * lib/open-uri.rb: replace Kernel.open as well. + +Tue Feb 25 23:03:08 2003 NAKAMURA, Hiroshi + + * lib/debug.rb (DEBUGGER__::Context#debug_command): bp filename must + be the basename of it. [ruby-talk:65644] + +Mon Feb 24 17:49:35 2003 Nobuyoshi Nakada + + * parse.y (yycompile): zero clear ruby_eval_tree_begin if + compilation failed. + +Mon Feb 24 08:06:29 2003 Yukihiro Matsumoto + + * string.c (str_new): need no MEMZERO(). + +Sun Feb 23 17:57:06 2003 WATANABE Hirofumi + + * lib/fileutils (fu_stream_blksize): wrong logical condition. + (and -> or). + +Sat Feb 22 03:12:56 2003 Yukihiro Matsumoto + + * numeric.c (fix_gt): use rb_num_coerce_cmp() instead of + rb_num_coerce_bin. + + * numeric.c (fix_ge, fix_lt, fix_le): ditto. + + * numeric.c (flo_gt, flo_ge, flo_lt, flo_le): ditto. + +Sat Feb 22 02:45:20 2003 Yukihiro Matsumoto + + * eval.c (rb_thread_create): may called from place higher than + rb_gc_stack_start. + + * gc.c (Init_stack): update rb_gc_stack_start if it is lower (or + higher if stack grows down) than the previous value. + +Fri Feb 21 21:03:41 2003 Minero Aoki + + * lib/fileutils.rb: new method FileUtils#copy_stream. + + * lib/fileutils.rb: new method FileUtils#compare_file. + + * lib/fileutils.rb: new method FileUtils#compare_stream. + + * lib/fileutils.rb: new method FileUtils#rmtree (alias of rm_rf). + +Fri Feb 21 17:19:27 2003 WATANABE Hirofumi + + * eval.c (rb_f_require): do not need to abort if a DLEXT file + is not found. + +Fri Feb 21 13:39:25 2003 Yukihiro Matsumoto + + * string.c (rb_str_cmp_m): should use LONG2NUM(). + +Fri Feb 21 12:45:50 2003 Yukihiro Matsumoto + + * string.c (rb_str_cmp_m): two small bugs fixed. + +Fri Feb 21 08:03:09 2003 Yukihiro Matsumoto + + * gc.c (rb_gc_mark): inline rb_gc_mark_children(). + + * gc.c (gc_sweep): new tactics to increase malloc_limit mildly. + +Fri Feb 21 05:16:14 2003 Yukihiro Matsumoto + + * string.c (rb_str_cmp_m): return nil if str2 does not respond to + both "to_str" and "<=>". + + * compar.c (cmp_gt): return nil if "<=>" returns nil (means + incomparable). + + * compar.c (cmp_ge, cmp_lt, cmp_le): ditto. + + * compar.c (cmp_between): use RTEST(), since cmp_lt and cmp_gt may + return nil. + +Thu Feb 20 19:05:51 2003 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): main thread swapped by fork() may + terminate rb_thread_start_0() successfully. call ruby_stop(0); + this change was suggested by Rudi Cilibrasi + . + +Thu Feb 20 18:44:51 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): fix wrong behavior for root file. + expand_path("..", "//machine/share") => "//machine/share" + expand_path("..", "c:/a") => "c:/" + expand_path("..", "/a") => "/" + +Thu Feb 20 18:11:01 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): should not upward beyond share name. + +Thu Feb 20 15:45:33 2003 WATANABE Hirofumi + + * missing.h (strtoul): fix prototype of strtoul. + +Thu Feb 20 10:11:30 2003 Yukihiro Matsumoto + + * parse.y (clhs): allow "Foo::Bar = x". + +Thu Feb 20 04:07:06 2003 Nobuyoshi Nakada + + * parse.y (primary): "self[n]=x" can be legal even when "[]=" is + private. changes submitted in [ruby-talk:63982] + + * parse.y (aryset): ditto. + + * parse.y (attrset): "self.foo=x" can be legal even when "foo=" + is private. + + * eval.c (is_defined): private "[]=" and "foo=" support. + + * eval.c (rb_eval, assign): ditto. + +Thu Feb 20 03:58:34 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): "foo=" should not always be public. + +Thu Feb 20 01:23:59 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_restore_context): inhibit interrupts in + critical section while context switching. [ruby-talk:64785] + +Wed Feb 19 18:27:42 2003 Nobuyoshi Nakada + + * node.h (nd_cpath): nested class/module declaration. + [EXPERIMENTAL] + + * eval.c (rb_eval): ditto. + + * gc.c (rb_gc_mark_children): ditto. + + * parse.y (cpath): ditto. + +Tue Feb 18 21:39:27 2003 Yukihiro Matsumoto + + * eval.c (rb_call0): should not report uninitialized warning by + attribute reader method. + + * variable.c (rb_attr_get): new function to get instance variable + without uninitialized warning. + + * io.c (argf_to_io): should prefetch argv. + +Tue Feb 18 00:13:50 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-comment-column): customize comment + column. [new] + + * misc/ruby-mode.el (ruby-deep-indent-paren): deep indentation + parentheses. [new] + + * misc/ruby-mode.el (ruby-expr-beg): fix for / after $?. + + * misc/ruby-mode.el (ruby-parse-partial, ruby-calculate-indent): + deep indentation support. + + * misc/ruby-mode.el (ruby-forward-sexp, ruby-backward-sexp): + move forward/backward across one balanced expression. [new] + + * misc/ruby-mode.el (ruby-indent-exp): indent balanced + expression. [new] + + * misc/ruby-mode.el (ruby-electric-brace): indent before + show matching parenthesis. (contributed by NABEYA Kenichi) + +Mon Feb 17 14:36:56 2003 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens. + +Mon Feb 17 14:13:25 2003 NAKAMURA Usaku + + * win32/win32.c (link): implement with CreateHardLink(). + + * win32/win32.c, win32/win32.h (rb_w32_utime): enable utime() to + directory if on NT. [new] (ruby-bugs-ja:PR#393) + +Mon Feb 17 13:28:51 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): strip last slash when path is + root. + +Sun Feb 16 19:22:31 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): buffer might be reallocated while + expanding default directory. + + * file.c (file_expand_path): default directory was being + ignored if path was full path with no drive letter, under + DOSISH. + +Sun Feb 16 03:14:33 2003 WATANABE Hirofumi + + * io.c (prep_stdio, Init_io): always set binmode on Cygwin. + +Sat Feb 15 01:01:45 2003 Nobuyoshi Nakada + + * file.c (file_expand_path): fix surplus path separators while + expanding at root directory. [ruby-dev:19572] + +Fri Feb 14 14:25:24 2003 akira yamada + + * lib/uri/generic.rb, lib/uri/ldap.rb, lib/uri/mailto.ldap: all foo=() + returns arguments passed by caller. + + * lib/uri/generic.rb (Generic#to_str, Generic#to_s): removed to_str. + Suggested by Tanaka Akira at [ruby-dev:19475]. + + * lib/uri/generic.rb (Generic#==): should not generate an URI object + from argument. Suggested by Tanaka Akira at + [ruby-dev:19475]. + +Thu Feb 13 11:54:50 2003 Nobuyoshi Nakada + + * ruby.c (ruby_init_loadpath): ensures buffer terminated + before use strncpy(). + + * ruby.c (proc_options): avoid SEGV at -S with no arguments. + script argument is in effect only when -e is not given. + (ruby-bugs-ja:PR#391) + +Thu Feb 13 01:30:10 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_schedule): current thread may be dead when + deadlock. (ruby-bugs:PR#588) + +Thu Feb 13 00:28:52 2003 Yukihiro Matsumoto + + * range.c (range_step): step might be float 0 < x < 1. + + * eval.c (rb_thread_schedule): pause if no runnable thread when + there's only one thread. + +Thu Feb 13 00:09:47 2003 Nobuyoshi Nakada + + * file.c (strrdirsep): ignore trailing directory separators. + + * file.c (rb_file_s_expand_path): File.expand_path(".","/") should + return "/". (ruby-bugs-ja:PR#389) + + * file.c (rb_file_s_basename): also ignore trailing directory + separators, in compliance with SUSv3. (ruby-bugs-ja:PR#390) + + * file.c (rb_file_s_dirname, rb_file_s_extname): ditto. + + * file.c (rb_file_s_dirname): append "." if drive only. + + * file.c (rb_file_s_split): get rid of converting twice. + +Mon Feb 10 20:55:15 2003 WATANABE Hirofumi + + * ext/extmk.rb (parse_args): add '-n' to $mflags BEFORE "--". + do not add DESTDIR if already included in $mflags. + +Mon Feb 10 19:54:30 2003 Minero Aoki + + * lib/fileutils.rb (FileUtils#uptodate?): use mtime for + comparison. + +Mon Feb 10 10:14:26 2003 Yukihiro Matsumoto + + * array.c (rb_ary_to_a): return value should be an Array if the + receiver is an instance of subclass of Array. + + * string.c (rb_str_to_s): return value should be a String if the + receiver is an instance of subclass of String. + +Mon Feb 10 03:33:42 2003 WATANABE Hirofumi + + * io.c (rb_file_sysopen): rb_file_sysopen_internal() needs four + arguments. + +Sun Feb 9 15:16:04 2003 Nobuyoshi Nakada + + * intern.h (HAVE_RB_DEFINE_ALLOC_FUNC, RB_CVAR_SET_4ARGS): + define to 1. + + * ruby.h (NORETURN_STYLE_NEW): ditto. + +Sun Feb 9 12:28:18 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (init_mkmf): add libdir to LIBPATH unless cross + compiling. + +Sun Feb 9 08:34:45 2003 Minero Aoki + + * lib/net/http.rb: 4xx raises Net::ProtoServerError, 5xx raises + Net::ProtoFatalError (for backward compatibility). + +Sun Feb 9 07:07:26 2003 Minero Aoki + + * lib/fileutils.rb: new method FileUtils.pwd (really). + + * lib/fileutils.rb: FileUtils.pwd, cmp, identical?, uptodate? does + not accept any option. + +Sat Feb 8 18:35:30 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-forward-string): fixed void variable + error. + +Sat Feb 8 16:23:11 2003 NABEYA Kenichi + + * misc/ruby-mode.el (ruby-font-lock-keywords): method name can + be delimited by tab. + +Sat Feb 8 03:57:32 2003 Akinori MUSHA + + * lib/irb/workspace.rb, lib/irb/ext/math-mode.rb, + lib/irb/ext/multi-irb.rb, lib/irb/lc/error.rb, + lib/irb/lc/help-message, lib/irb/lc/ja/error.rb, + lib/shell/command-processor.rb, lib/shell/error.rb, + lib/shell/filter.rb: Fix typos and grammos. [approved by: keiju] + +Sat Feb 8 03:34:28 2003 Akinori MUSHA + + * intern.h (HAVE_RB_DEFINE_ALLOC_FUNC): New boolean macro to make + it easier to write extensions that work with both ~1.6 and 1.8~. + + * intern.h (RB_CVAR_SET_4ARGS): Ditto. + + * ruby.h (NORETURN_STYLE_NEW): Ditto. + +Sat Feb 8 00:47:24 2003 Yukihiro Matsumoto + + * eval.c (rb_call): calls method_missing when superclass method + does not exist. + + * eval.c (rb_f_missing): now handles "no super" case. + + * object.c (rb_obj_ivar_get): Object#instance_variable_get: new + method to get instance variable value without eval(). [new] + + * object.c (rb_obj_ivar_set): Object#instance_variable_set: new + method to set instance variable value without eval(). [new] + +Fri Feb 7 15:35:21 2003 Nobuyoshi Nakada + + * intern.h, re.c (rb_memsearch): returns long. + + * string.c (rb_str_index): should return offset position. + +Fri Feb 7 15:30:15 2003 Nobuyoshi Nakada + + * eval.c (proc_invoke): should propagate self to super + methods. [ruby-dev:19510] + +Thu Feb 6 19:04:32 2003 Yukihiro Matsumoto + + * re.c (rb_reg_initialize_m): should not preset "kcode" unless + encoding is explicitly specified. + +Thu Feb 6 19:01:32 2003 Minero Aoki + + * lib/fileutils.rb: new method FileUtils.pwd. + + * lib/fileutils.rb: default label is ''. + + * lib/fileutils.rb: using module_eval again, to avoid ruby's bug. + + * lib/fileutils.rb: fix wrong examples in rdoc. + +Thu Feb 6 17:43:56 2003 Yukihiro Matsumoto + + * lib/complex.rb (Complex#==): should not raise error by type + mismatch. + + * lib/rational.rb (Rational#==): ditto. + +Thu Feb 6 11:44:40 2003 MoonWolf + + * re.c (rb_reg_initialize_m): 3rd argument was ignored. + +Thu Feb 6 01:09:05 2003 Yukihiro Matsumoto + + * string.c (rb_str_count): return 0 for empty string (was + returning nil). + +Wed Feb 5 19:41:37 2003 Tanaka Akira + + * lib/open-uri.rb: dispatch code restructured to make it openable + that has `open' method. + + * lib/open-uri.rb: Location: field may has a relative URI. + pointed out by erik eriksson . + +Wed Feb 5 17:11:02 2003 Yukihiro Matsumoto + + * parse.y (yylex): no . float literal anymore. + +Tue Feb 4 16:11:30 2003 Yukihiro Matsumoto + + * array.c (rb_ary_equal): a == b is true when b is non T_ARRAY + object, if b has "to_ary" and b == a. + + * hash.c (rb_hash_equal): a == b is true when b is non T_HASH + object, if b has "to_hash" and b == a. + + * string.c (rb_str_equal): a == b is true when b is non T_STRING + object, if b has "to_str" and b == a. + +Mon Feb 3 23:46:48 2003 Yukihiro Matsumoto + + * io.c (argf_getline): should not increment lineno at EOF. + +Mon Feb 3 16:49:19 2003 Yukihiro Matsumoto + + * object.c (Init_Object): default Object#=== now calls "==" + internally. + + * re.c (rb_reg_initialize_m): should honor option status of + original regexp. + + * array.c (rb_ary_equal): ary2 should be T_ARRAY (no to_ary + conversion). + + * array.c (rb_ary_eql): ditto. + + * string.c (rb_str_equal): str2 should be T_STRING (no to_str + conversion). + +Mon Feb 3 16:32:52 2003 Nobuyoshi Nakada + + * re.c (rb_memsearch): a little improvement. + +Mon Feb 3 13:18:05 2003 Yukihiro Matsumoto + + * re.c (rb_memsearch): algorithm body of String#index. + + * error.c (Init_Exception): "to_str" removed. + + * eval.c (eval): should not rely on Exception#to_str + + * eval.c (compile_error): ditto. + + * error.c (err_append): ditto. + +Sat Feb 1 23:56:29 2003 Yukihiro Matsumoto + + * hash.c (rb_hash_merge): Hash#merge, non destructive "update". + now there's also Hash#merge! which is an alias to "update". + +Fri Jan 31 14:16:59 2003 Yukihiro Matsumoto + + * string.c (rb_str_index): search using Karp-Rabin algorithm. + +Fri Jan 31 12:45:11 2003 Yukihiro Matsumoto + + * variable.c (rb_obj_classname): new function. + + * string.c (rb_str_dup): should preserve original's class (but not + hidden singleton class). + + * string.c (rb_str_substr): ditto. + + * parse.y: backout EXPR_CMDARG removal. + +Fri Jan 31 09:40:07 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::List::accept): default + pattern must not be nil. + + * lib/optparse.rb (OptionParser::make_switch): NoArgument doesn't + override other styles. + +Thu Jan 30 16:46:43 2003 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Switch::PlacedArgument): added. + if the next argument doesn't start with '-', use it as the + value. + + * lib/optparse.rb (OptionParser::make_switch): fixed a bug of + pattern. + + * lib/optparse.rb (Array): no need to guard. + +Thu Jan 30 08:27:19 2003 Nobuyoshi Nakada + + * file.c (rb_file_s_expand_path): removed a sludge. + +Wed Jan 29 03:24:39 2003 Michal Rokos + + * dir.c (glob_helper): memory leak fixed. + +Tue Jan 28 04:45:03 2003 Akinori MUSHA + + * instruby.rb (parse_args), ext/extmk.rb (parse_args): Prepend a + hyphen to the first argument of MAKEFLAGS only if appropriate. + Remove wrong comments. + +Mon Jan 27 03:30:06 2003 NAKAMURA Usaku + + * error.c (get_syserror): use snprintf() instead of sprintf(). pointed + out by knu. + +Mon Jan 27 02:06:38 2003 NAKAMURA Usaku + + * error.c (get_syserror): some Windows' errno have 5 digits. pointed + out by znz. + +Sun Jan 26 19:23:10 2003 NAKAMURA Usaku + + * instruby.rb ($mflags.set?): Check $make instead of $nmake, since + there is no such a variable. + + * instruby.rb ($mflags.set?), ext/extmk.rb ($mflags.set?): Return + false if unmatched. + +Sun Jan 26 19:08:30 2003 Akinori MUSHA + + * lib/shellwords.rb: Embed rdoc style comments. + + * lib/shellwords.rb (shellwords): Use String#lstrip!. + + * lib/shellwords.rb (shellwords): Recognize an object that + responds to to_str() by using String.new(). + +Sun Jan 26 17:53:04 2003 Akinori MUSHA + + * instruby.rb (parse_args), ext/extmk.rb (parse_args): Detect -n + and emulate a dry run. Use 'make' in case no --make argument is + given. + +Sun Jan 26 07:18:42 2003 Nobuyoshi Nakada + + * instruby.rb: re-define individual methods verbosely rather than + including FileUtils::Verbose, in order to suppress messages from + FileUtils#cmp. + + * instruby.rb (makedirs): make same directory only once even if + dryrun. + + * lib/fileutils.rb (FileUtils::Verbose, FileUtils::NoWrite): + re-define methods with define_method instead of module_eval. + +Sun Jan 26 03:37:18 2003 Akinori MUSHA + + * instruby.rb, ext/extmk.rb, Makefile.in, win32/Makefile.sub, + bcc32/Makefile.sub: Replace the complicated MFLAGS/MAKEFLAGS + parser with something plain and comprehensible. This fixes a + bug where make flags were wrongly reordered and the resulted + command line often did not make sense especially when BSD make + is used with extra arguments given. Tested with FreeBSD and + Linux by me and mswin32, bccwin32 and mingw by usa. + +Fri Jan 24 18:15:33 2003 Yukihiro Matsumoto + + * parse.y: tMINUS should have lower precedence than tPOW. + +Fri Jan 24 05:12:55 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): deal + with escaped $ and ? at the end of strings. [ruby-talk:62297] + + * misc/ruby-mode.el (ruby-font-lock-keywords): added defined?. + +Thu Jan 23 17:25:04 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): do not warn discarding already undefined + method. + + * lib/rational.rb: undef quo before replacing. + +Thu Jan 23 15:49:57 2003 Nobuyoshi Nakada + + * parse.y (arg): missing arguments. + +Thu Jan 23 14:56:52 2003 Yukihiro Matsumoto + + * lib/rational.rb: modified to support "quo". + + * numeric.c (num_quo): should return most exact quotient value, + i.e. float by default, rational if available. + + * numeric.c (num_div): "div" should return x.divmod(x)[0]. + +Thu Jan 23 13:24:18 2003 Yukihiro Matsumoto + + * time.c (time_arg): was accessing garbage argv value. + +Thu Jan 23 06:37:01 2003 Nobuyoshi Nakada + + * instruby.rb: should not contain destdir in shebang line. + +Wed Jan 22 23:19:57 2003 NAKAMURA Usaku + + * win32/win32.c (pipe_exec): remove unnecessary SetStdHandle(). + +Wed Jan 22 20:20:59 2003 Yukihiro Matsumoto + + * parse.y (arg): syntaxify tPOW negative number hack. + + * parse.y (negate_lit): new function to negate literal numeric + values in compile time. + +Wed Jan 22 15:36:54 2003 Yukihiro Matsumoto + + * regex.c (re_match_exec): charset info may be stored in MBC + region when $KCODE != NONE. + +Wed Jan 22 14:22:53 2003 Yukihiro Matsumoto + + * error.c (set_syserr): should preserve duplicated error names. + +Tue Jan 21 20:29:31 2003 Michal Rokos + + * mkmf.rb: make possible to add files to clean and distclean targets + +Tue Jan 21 18:05:25 2003 Nobuyoshi Nakada + + * bcc32/Makefile.sub (LIBRUBY_A): link dmyext. + +Tue Jan 21 16:59:18 2003 NAKAMURA Usaku + + * instruby.rb: use real interpreter pathname at shebang line. + [ruby-dev:19370] + +Tue Jan 21 16:22:32 2003 Yukihiro Matsumoto + + * parse.y (arg): put back old ** behavior for negative number + right operand. + +Tue Jan 21 14:46:12 2003 Tanaka Akira + + * lib/pp.rb: Use Test::Unit. + + * lib/prettyprint.rb: Ditto + + * lib/time.rb: Ditto + + * lib/tsort.rb: Ditto + +Tue Jan 21 04:15:50 2003 Tanaka Akira + + * lib/pp.rb: Use redefined `to_s' as well as `inspect'. + Useless `pretty_print' methods removed. + (PP::ObjectMixin#pretty_print_inspect): new method. + +Mon Jan 20 21:48:43 2003 Akinori MUSHA + + * configure.in (MANTYPE): Detect if the system's nroff(1) groks + mdoc. Provide a new option --with-mantype={doc|man} in case the + check does not work as expected. + + * Makefile.in (MANTYPE): Define MANTYPE and pass it to + instruby.rb. + + * instruby.rb: Convert mdoc manpages to man for systems which + nroff(1) does not grok mdoc. + +Mon Jan 20 21:25:18 2003 Akinori MUSHA + + * lib/tempfile.rb (self.open): If a block is given, call it with + tempfile as an argument and automatically close the tempfile + when the block terminates. + +Mon Jan 20 21:02:50 2003 Akinori MUSHA + + * mdoc2man.rb: Properly put nested braces, parentheses and angles. + + * mdoc2man.rb: Add support for .An and .Aq/.Ao/.Ac. + + * mdoc2man.rb: Add support for .Dl. + + * mdoc2man.rb: Make .Pf macro actually work. + + * mdoc2man.rb: Properly handle .Os. + + * mdoc2man.rb: Correctly omit spaces around punctuation + characters. + +Mon Jan 20 19:43:41 2003 Akinori MUSHA + + * mdoc2man.rb: Make this work as a library. + +Mon Jan 20 18:22:40 2003 Nobuyoshi Nakada + + * eval.c (rb_f_require): purge too many goto's. + +Mon Jan 20 17:50:05 2003 Akinori MUSHA + + * mdoc2man.rb (parse_macro): Understand .Ux. + +Mon Jan 20 17:32:56 2003 Akinori MUSHA + + * mdoc2man.rb: New file. A mdoc to man converter ported from + Perl. + +Mon Jan 20 15:40:15 2003 Akinori MUSHA + + * ruby.1: Properly close .Bl with .El. + +Mon Jan 20 04:14:17 2003 Nobuyoshi Nakada + + * lib/mkmf.rb (egrep_cpp): use inspect to show options. + + * lib/mkmf.rb (dir_config): prior configured directories to + defaults. + + * lib/mkmf.rb (dir_config): extract first word to determine + make command type. + +Mon Jan 20 02:15:53 2003 Nobuyoshi Nakada + + * ext/aix_mksym.rb: no longer used. + +Mon Jan 20 00:17:16 2003 Matt Armstrong + + * file.c (eaccess): under windows, make eaccess() just call + access(). [ruby-core:716], [ruby-bugs:PR#556] + +Sun Jan 19 23:08:18 2003 Akinori MUSHA + + * lib/shellwords.rb (shellwords): A backslash ('\') in single + quotes should not be regarded as meta character. This bug or + maybe feature was inherited from Perl's shellwords.pl. + +Sun Jan 19 14:01:12 2003 UENO Katsuhiro + + * regex.c (is_in_list): should work well with UTF-8. + + * regex.c (re_match_exec): ditto. + +Sat Jan 18 14:53:49 2003 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): should not erase all 0s, but + squeeze into one. [ruby-dev:19377] + +Fri Jan 17 03:33:42 2003 Akinori MUSHA + + * sprintf.c (rb_f_sprintf): Fix a bug caused by an uninitialized + variable v, that a bignum unexpectedly gets converted into a + string with its higher figures all filled with ./f/7/1, + depending on the base. This bug seems to have been introduced + in rev.1.27. + + * sprintf.c (rb_f_sprintf): Use switch instead of a sequence of + else-if's. + +Wed Jan 15 15:18:38 2003 moumar + + * configure.in (ARCHFILE): set even unless --enable-shared on + AIX. [ruby-talk:61466] + + * marshal.c (math.h): should be included after ruby.h on AIX. + [ruby-talk:61366] + +Tue Jan 14 21:47:56 2003 Nobuyoshi Nakada + + * eval.c (rb_f_require): do not search adding .rb/.so suffixes if + the suffix specified. [ruby-dev:18702] + http://moonrock.jp/~don/d/200211.html#d08_t1 + +Tue Jan 14 18:36:41 2003 Yukihiro Matsumoto + + * enum.c (enum_all): now works without block. + + * enum.c (enum_any): ditto. + +Tue Jan 14 01:21:32 2003 Nobuyoshi Nakada + + * io.c (next_argv): not always set binmode. + +Mon Jan 13 20:45:19 2003 Guy Decoux + + * parse.y (list_append): avoid O(n) search using node->nd_next->nd_end. + + * parse.y (list_concat): ditto. + + * eval.c (rb_eval): NODE_ARRY nd_end adoption. + +Mon Jan 13 02:22:11 2003 WATANABE Hirofumi + + * ext/dl/lib/dl/win32.rb: eliminate unnecessary "A" adding. + +Sun Jan 12 16:07:17 2003 WATANABE Hirofumi + + * io.c (next_argv): inherit binmode from $defout. + +Sat Jan 11 22:50:47 2003 WATANABE Hirofumi + + * ext/dl/lib/dl/win32.rb: compatibility improvement. + +Sat Jan 11 01:44:16 2003 Nobuyoshi Nakada + + * configure.in (RUBY_CHECK_IO_NEED): added more tests. + + * io.c (rb_io_check_readable): seek after synchronized write. + +Fri Jan 10 01:23:45 2003 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): syntax + classes are not allowed inside character classes. + [ruby-talk:60996] + +Thu Jan 9 23:28:01 2003 Nobuyoshi Nakada + + * configure.in: AC_MSG_FAILURE is a new macro in 2.54b or later. + +Thu Jan 9 17:05:24 2003 Nobuyoshi Nakada + + * configure.in (RUBY_CHECK_IO_NEED): check whether fseek() and + fflush() are needed. + + * io.c (flush_before_seek): flush write stream only. + + * io.c (rb_io_check_readable): seek instead of flush if the last + operation was write. + + * io.c (rb_io_check_writable): seek instead of flush if the last + operation was read. + + * bcc32/Makefile.sub, win32/Makefile.sub: needs to seek between + R/W. + +Thu Jan 9 16:31:51 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): should not discard nested NODE_BLOCK. + +Thu Jan 9 15:12:30 2003 Yukihiro Matsumoto + + * parse.y (stmt): NODE_NOT elimination for if/unless/while/until node. + + * parse.y (primary): ditto. + +Thu Jan 9 13:26:18 2003 Akinori MUSHA + + * st.h, st.c: Back out the introduction of st_*_func_t. Some + compilers complain about function type mismatch. + +Thu Jan 9 02:10:44 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): reduce recursive rb_eval() call by using sort + of continuation passing style. + +Wed Jan 8 17:10:32 2003 NAKAMURA Usaku + + * ext/Win32API/lib/win32/registry.rb: added. [new] + +Wed Jan 8 15:54:05 2003 Yukihiro Matsumoto + + * eval.c: remove ruby_last_node and assignments seems to be + unnecessary + + * intern.h: debug does not run if ID_ALLOCATOR is zero. + +Wed Jan 8 15:04:11 2003 Yukihiro Matsumoto + + * range.c (range_each): treat fixnums specially to boost. + + * numeric.c (num_step): remove rb_scan_args() for small speedup. + +Tue Jan 7 17:56:08 2003 Yukihiro Matsumoto + + * eval.c (svalue_to_avalue): should return converted array. + +Tue Jan 7 07:48:01 2003 Nobuyoshi Nakada + + * eval.c (rb_f_local_variables): skip $_, $~ and flip states in + dynamic variables. [ruby-core:00681] + +Tue Jan 7 02:46:29 2003 Yukihiro Matsumoto + + * hash.c (env_clear): new Hash compatible method. + + * hash.c (env_shift, env_invert, env_replace, env_update): ditto. + +Mon Jan 6 23:36:29 2003 Akinori MUSHA + + * st.h, st.c: Introduce new conventional typedef's, st_data_t, + st_compare_func_t, st_hash_func_t and st_each_func_t. + + * st.h, st.c: Do explicit function declarations and do not rely on + implicit declarations. + + * class.c, eval.c, gc.c, hash.c, marshal.c, parse.y, variable.c: + Add proper casts to avoid warnings. + +Mon Jan 6 20:44:43 2003 Akinori MUSHA + + * intern.h (rb_check_array_type): Declare rb_check_array_type(). + + * ext/digest/md5/md5ossl.c: Include stdio.h for sprintf() and + string.h for memcmp(). + + * ext/dl/ptr.c: Include ctype.h for isdigit(). + +Mon Jan 6 18:43:17 2003 NAKAMURA Usaku + + * file.c: improve DOSISH drive letter support. + +Mon Jan 6 18:31:45 2003 WATANABE Hirofumi + + * lib/fileutils.rb (ln): add ' -f' in the verbose message. + + * lib/fileutils.rb (cp_r): add 'p' in the verbose message. + +Mon Jan 6 16:44:52 2003 Yukihiro Matsumoto + + * array.c (rb_ary_join): dispatch based on "to_str". + + * array.c (rb_ary_times, rb_ary_equal): ditto. + +Mon Jan 6 13:26:35 2003 NAKAMURA Usaku + + * process.c (proc_exec_v): follow to proc_spawn_v(). call do_aspawn() + on Win32. + + * process.c (rb_proc_exec): call do_spawn() on Win32. + + * win32/win32.c, win32/win32.h (do_spawn, do_aspawn): add mode flag. + + * process.c (proc_spawn_v, rb_f_system): follow above change. + +Mon Jan 6 05:11:15 2003 Nobuyoshi Nakada + + * ext/extmk.rb: make $0 normal variable. + +Mon Jan 6 02:32:46 2003 Nobuyoshi Nakada + + * struct.c (make_struct): needs meta class. + +Sun Jan 5 22:54:05 2003 WATANABE Hirofumi + + * lib/fileutils.rb (ln): `argv' is not a argument. + +Sun Jan 5 17:44:37 2003 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): set $0 temporarily while loading + extconf.rb. + +Sun Jan 5 14:46:46 2003 WATANABE Hirofumi + + * instruby.rb: need paren in regexp(make -n install). + + * ext/extmk.rb (sysquote): do not need to quote on mswin/bccwin/mingw. + + * ext/extmk.rb ($mflags): uniq items and remove '-' and '--'. + move options to the lead. + + * lib/fileutils.rb (install): model on the real install + command(message). + +Sun Jan 5 09:36:46 2003 Nobuyoshi Nakada + + * ruby.c (ruby_init_loadpath): under Windows, get the module + path from an internal address instead of hard coded library + name. + + * cygwin/GNUmakefile.in, bcc32/Makefile.sub, + win32/Makefile.sub (CPPFLAGS): removed LIBRUBY_SO macro. + + * bcc32/Makefile.sub, win32/Makefile.sub (config.h): no longer + depends on makefiles. + +Sun Jan 5 04:17:05 2003 Akinori MUSHA + + * gc.c (SET_STACK_END): Issue a FLUSH_REGISTER_WINDOWS here too. + This fixes make test on FreeBSD/sparc64. + +Sun Jan 5 03:43:47 2003 Akinori MUSHA + + * defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call an + inline function so it can be used as an expression. + + * eval.c (EXEC_TAG, THREAD_SAVE_CONTEXT): Consistently call + FLUSH_REGISTER_WINDOWS before calling setjmp(). (I suspect that + every setjmp() implementation should take care of register + windows, though) + +Sun Jan 5 03:12:32 2003 NAKAMURA Usaku + + * file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32. + + * win32/Makefile.sub (LIBS): use oldnames.lib. + + * win32/win32.c (rb_w32_getcwd): follow above change. + + * win32/win32.h: ditto. + + * wince/direct.c, wince/direct.h (getcwd): ditto. + + * wince/io.h: ditto. + + * wince/string.c, wince/wince.h (stricmp, strnicmp): ditto. + +Sat Jan 4 15:18:50 2003 NAKAMURA Usaku + + * process.c (rb_proc_exec): use same logic as DJGPP on win32 ports. + + * process.c (rb_f_system): ditto. + + * win32/win32.c, win32/win32.h (do_aspawn): [new]. for arrayed + arguments. + + * win32/win32.c (CreateChild): add new argument for real filename of + executing process. + + * win32/win32.c (NtHasRedirection, pipe_exec): follow above change. + +Sat Jan 4 14:29:52 2003 NAKAMURA Usaku + + * configure.in: set rb_cv_need_io_flush_between_seek=yes. + + * win32/Makefile.sub (config.h): define NEED_IO_FLUSH_BETWEE_SEEK. + (pointed out by moriq [ruby-dev:19299]) + +Sat Jan 4 03:12:14 2003 Yukihiro Matsumoto + + * eval.c (umethod_bind): exact class match is not required. relax + the restriction to subclasses. + +Sat Jan 4 01:33:40 2003 Nobuyoshi Nakada + + * file.c (rb_file_s_lchmod): get rid of gcc-3 -O3 warning. + +Fri Jan 3 22:26:07 2003 Nobuyoshi Nakada + + * process.c (rb_proc_times): need to initialize first. + +Fri Jan 3 01:10:17 2003 Yukihiro Matsumoto + + * eval.c (rb_eval): call "inherited" before executing class body. + + * class.c (rb_define_class): call "inherited" after defining the + constant. + + * class.c (rb_define_class_under): ditto. + +Thu Jan 2 19:37:30 2003 Yukihiro Matsumoto + + * eval.c (massign): expand first element if RHS is an array and + its size is 1, and LHS has concrete assignment target (i.e. LHS + has target(s) other than *var). + + * eval.c (massign): avoid unnecessary avalue/svalue conversion. + + * eval.c (rb_yield_0): ditto + + * array.c (rb_ary_update): do not allocate unused array if rpl is + nil (i.e. merely removing elements). + +Thu Jan 2 13:55:08 2003 Mathieu Bouchard + + * io.c (io_read): should resize supplied string if it's shorter + than expected. + +Thu Jan 2 11:01:20 2003 Nobuyoshi Nakada + + * eval.c (bmcall): arguments should be an array. + +Wed Jan 1 18:18:45 2003 WATANABE Hirofumi + + * configure.in: better DJGPP support. add GNUmakefile. + + * djgpp/GNUmakefile: new. + +Wed Jan 1 04:16:18 2003 Akinori MUSHA + + * node.h (struct RNode): Change argc from int to long. Otherwise + NEW_CFUNC() sets argc to a wrong value on platforms where + sizeof(int) != sizeof(long) and the byte order is big-endian. + This fixes breakage on FreeBSD/sparc64. + +Tue Dec 31 23:22:50 2002 Yukihiro Matsumoto + + * eval.c (massign): removed awkward conversion between yvalue, + mvalue, etc. + + * eval.c (rb_yield_0): new parameter added to tell whether val is + an array value or not. + + * parse.y (yield_args): restructuring: new nodes: NODE_RESTARY2, + NODE_SVALUE; removed node: NODE_RESTARGS. + +Tue Dec 31 21:13:51 2002 WATANABE Hirofumi + + * Makefile.in, {win32,bcc32}/Makefile.sub: add new target: + what-where, no-install. + + * mkconfig.rb: add const: CROSS_COMPILING. + + * ext/extmk.rb: no-install support. add MAKEDIRS macro. + + * lib/mkmf.rb: add !ifdef .. !endif for Borland make. + + * process.c: improve DJGPP support. system "ls", "-l". + +Tue Dec 31 20:16:37 2002 Akinori MUSHA + + * ext/socket/addrinfo.h (NI_MAXHOST): Define NI_MAXHOST and + NI_MAXSERV only if they are not defined yet. This fixes build + on such platforms as OpenBSD. + +Tue Dec 31 20:07:49 2002 Akinori MUSHA + + * ext/tcltklib/extconf.rb (find_tcl, find_tk): Look for both + lib{tcl,tk}M.N and lib{tcl,tk}MN on all platforms. *BSD have + Tcl/Tk libraries named this way. + +Tue Dec 31 19:48:21 2002 Akinori MUSHA + + * configure.in: Improve OpenBSD support. [obtained from: OpenBSD + ports] + + * dln.c (FUNCNAME_PATTERN): Ditto. + +Tue Dec 31 19:21:02 2002 Akinori MUSHA + + * array.c (rb_ary_transpose): Properly declare ary as a VALUE. + + * file.c (rb_file_s_chmod): Do not directly cast an int to void * + to avoid a warning. + + * defines.h (FLUSH_REGISTER_WINDOWS): Add support for + FreeBSD/sparc64. miniruby still coredumps in a different place, + though. + +Tue Dec 31 07:47:15 2002 Nobuyoshi Nakada + + * parse.y (parse_string): readjusted. + + * parse.y (heredoc_identifier): readjusted. + + * parse.y (here_document): make EOL codes of single-quoted + here-documents consistent. + + * parse.y (yylex): reduced unnecessary conditionals. + +Tue Dec 31 04:49:51 2002 Akinori MUSHA + + * ruby.1: mdoc'ify. + +Tue Dec 31 01:30:29 2002 WATANABE Hirofumi + + * parse.y (yylex): do not accept " __END__\n". ([ruby-dev:19245]) + +Mon Dec 30 21:10:59 2002 WATANABE Hirofumi + + * parse.y (yylex): use strncmp instead of strcmp. + accept "__END__\r\n". ([ruby-dev:19241]) + +Mon Dec 30 20:32:14 2002 Yukihiro Matsumoto + + * gc.c (rb_gc_mark_frame): should mark frame->node. + +Mon Dec 30 19:10:30 2002 Nobuyoshi Nakada + + * ext/extmk.rb: split --make argument contains options, assume + the first word of --make-flags is always options even unless + preceded by -, and ignore letter-case of options if nmake. + + * instruby.rb: extract -n option also from --make and + --make-flags. + + * bcc32/Makefile.sub, win32/Makefile.sub: not prepend - to + $(MFLAGS) + +Mon Dec 30 16:44:14 2002 Nobuyoshi Nakada + + * string.c (rb_str_substr): should share the shared string if + present, instead of the original string. (ruby-bugs:PR#528) + +Mon Dec 30 05:10:00 2002 Nobuyoshi Nakada + + * ext/socket/socket.c (tcp_svr_init): local host to + init_inetsock() is VALUE but not pointer. + + * ext/socket/socket.c (sock_s_unpack_sockaddr_in): get rid of + gcc-3 -O3 warning. + +Sun Dec 29 23:45:53 2002 Nobuyoshi Nakada + + * gc.c (gc_sweep): adjust GC trigger. + + * dln.c (init_funcname_len): get rid of gcc-3 -O3 warning. + + * eval.c (copy_node_scope): ditto. + + * hash.c (rb_hash_foreach, delete_if_i, select_i, each_value_i, + each_key_i, each_pair_i, envix): ditto. + + * range.c (range_each_func): ditto. + + * file.c (rb_file_s_chmod): ditto. + +Sun Dec 29 15:30:37 2002 Minero Aoki + + * lib/fileutils.rb (fu_parseargs): should not inherit ftools.rb's + misfeature. + +Sun Dec 29 05:08:13 2002 NAKAMURA Usaku + + * lib/fileutils.rb (cmp): return false if file size differs. + +Sat Dec 28 19:21:24 2002 WATANABE Hirofumi + + * instruby.rb: remove junk args. + + * lib/mkmf.rb (create_makefile): remove a trouble library + before making a shared library. + + * win32/Makefile.sub: invoke instruby.rb with the --make-flags option. + +Sat Dec 28 03:09:58 2002 Wakou Aoyama + + * lib/cgi.rb (CGI#[]): improvement. thanks to Kazuhiro NISHIYAMA + + +Sat Dec 28 00:34:03 2002 WATANABE Hirofumi + + * {win32,bcc32}/Makefile.sub: remove `=' from --make-flags options. + nmake quotes args if included `=' in args. + + * instruby.rb: use getopts.rb. + + * ext/dbm/extconf.rb (-DDBM_HDR): substitute ' with " to avoid + a error on Win32. + + * ext/gdbm/gdbm.c: add prototypes to avoid VC++ warnings. + +Fri Dec 27 21:41:57 2002 Nobuyoshi Nakada + + * bcc32/setup.mak, win32/setup.mak(-prologue-): move srcdir from + CPP input or UNC path will be removed as a comment. + +Fri Dec 27 17:55:00 2002 Takaaki Uematsu + + * wince/config, wince/configure.bat: replace 1.7 with 1.8 + in macros. + +Fri Dec 27 13:28:14 2002 Minero Aoki + + * instruby.rb: fileutils.rb accepts only one argument. + +Fri Dec 27 13:23:29 2002 Minero Aoki + + * lib/fileutils.rb (fu_parseargs): reject illegal options + correctly. + + * lib/fileutils.rb (uptodate?): parameter declaration was wrong. + + * lib/fileutils.rb: change coding styles. + +Fri Dec 27 09:25:22 2002 ABE Shigeru + + * process.c (rb_proc_times): avoid WindowsXP crash using volatile + variables. + +Fri Dec 27 02:56:58 2002 Nobuyoshi Nakada + + * instruby.rb: check only `-' option, and use fileutils instead of + ftools. + +Fri Dec 27 02:45:17 2002 Wakou Aoyama + + * lib/net/telnet.rb: Telnet#print not add "\n". + + * lib/cgi.rb: cgi['key'] is equal cgi['key'][0] + +Thu Dec 26 22:33:18 2002 WATANABE Hirofumi + + * ext/extmk.rb (create_makefile): check only `-' option. + + * configure.in: cleanups for MinGW. remove -D__NO_ISOCEXT in $CFLAGS. + + * win32/win32.h: prototypes for isinf, isnan are not needed on MinGW. + +Thu Dec 26 19:22:00 2002 YOSHIDA Kazuhiro + + * win32/setup.mak (-prologue-): moved srcdir macro definition. + [ruby-win32:420]. + +Wed Dec 25 18:26:44 2002 K.Kosako + + * regex.c (re_match): fixed wrong \G behavior. (ruby-bugs-ja:PR#377) + +Wed Dec 25 16:41:16 2002 Yukihiro Matsumoto + + * regex.c (re_match_exec): fix odd \G behavior based on the patch + from Nobu. + +Wed Dec 25 11:05:11 2002 Nobuyoshi Nakada + + * bcc32/setup.mak (-generic-): removed garbages. + +Wed Dec 25 10:36:20 2002 NAKAMURA Usaku + + * bcc32/Makefile.sub, win32/Makefile.sub (RUBY_SO_NAME, config.h): + use $(MAJOR) and $(MINOR). based on Nobu's patch. [ruby-win32:413] + + * bcc32/setup.mak, win32/setup.mak (-prologue-): define MAJOR, MINOR + and TEENY from version.h. based on Nobu's patch. [ruby-win32:413] + + * win32/Makefile.sub (config.h): add HAVE_FLOAT_H. + + * win32/Makefile.sub (parse.obj): depend on win32/win32.h. + +Tue Dec 24 23:49:16 2002 Akinori MUSHA + + * lib/irb/completion.rb: Use Object#class rather than Object#type. + +Tue Dec 24 23:37:40 2002 TADA Tadashi + + * lib/cgi.rb (Cookie::parse), lib/cgi-lib.rb (initialize): Do not + pass to split() a bare string longer than 2 characters as + separator. + +Tue Dec 24 19:19:24 2002 Tietew + + * numeric.c (DBL_MAX_10_EXP): fix typo. [ruby-dev:19175] + +Tue Dec 24 17:02:46 2002 Yukihiro Matsumoto + + * eval.c (rb_undefined): use NoMethodError instead of fatal. + +Tue Dec 24 02:12:45 2002 Akinori MUSHA + + * lib/README: Synchronize with reality. + +Tue Dec 24 02:05:51 2002 Akinori MUSHA + + * MANIFEST, lib/README, lib/ipaddr.rb: Add ipaddr.rb from rough. + +Sun Dec 22 04:07:47 2002 NAKAMURA Usaku + + * ext/dbm/dbm.c (fdbm_alloc): allocator takes only one argument. + +Sun Dec 22 02:49:25 2002 NAKAMURA Usaku + + * array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc), + file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc), + object.c (rb_module_s_alloc, rb_class_allocate_instance), + re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc), + time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc), + ext/tcltklib/tcltklib.c (ip_alloc), + ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate) + : add prototype to get rid of VC++ warnings. + + * ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument. + +Sun Dec 22 00:36:43 2002 WATANABE Hirofumi + + * lib/mkmf.rb (create_makefile): accept pure ruby libraries. + +Sat Dec 21 23:59:42 2002 Yukihiro Matsumoto + + * class.c (ins_methods_i): should not show ID_ALLOCATOR. + + * class.c (ins_methods_prot_i): ditto. + + * class.c (ins_methods_priv_i): ditto. + + * class.c (ins_methods_pub_i): ditto. + + * eval.c (call_trace_func): ditto. + + * eval.c (rb_undefined): ditto. + +Sat Dec 21 07:27:24 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-parse-partial): keywords must not be + preceded by @ or $. + +Fri Dec 20 20:29:04 2002 Nobuyoshi Nakada + + * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, + ext/dl/handle.c, ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, + ext/iconv/iconv.c, ext/sdbm/init.c, ext/stringio/stringio.c, + ext/strscan/strscan.c, ext/tcltklib/tcltklib.c, + ext/win32ole/win32ole.c: use rb_define_alloc_func(). + +Fri Dec 20 18:29:04 2002 Nobuyoshi Nakada + + * io.c (rb_io_fwrite): separated from io_write(). + + * marshal.c (w_byten): use rb_io_fwrite() to support non-blocking + IO, and added error check. + + * rubyio.h: prototypes; rb_io_fwrite + +Fri Dec 20 17:40:59 2002 Yukihiro Matsumoto + + * object.c (Init_Object): should not remove Class#allocate. + + * lib/profiler.rb: separate profiling functions, without + trace_func and at_exit setting. + +Fri Dec 20 16:20:04 2002 Yukihiro Matsumoto + + * parse.y (do_block): split "do" block and tLBRACE_ARG block. + + * parse.y (cmd_brace_block): new tLBRACE_ARG block rule + + * parse.y (command): can take optional cmd_brace_block; use %prec + to resolve shift/reduce conflict. (ruby-bugs-ja PR#372) + + * eval.c (ruby_finalize): trace_func should be cleared here (after + executing exit procs and finalizers). + + * eval.c (rb_define_alloc_func): new allocation framework, based + on Nobu's work [ruby-dev:19116]. "allocate" method is no longer + used for object allocation. + +Fri Dec 20 05:06:49 2002 Akinori MUSHA + + * lib/README, lib/cgi/ftplib.rb, lib/telnet.rb: Delete ftplib.rb + and telnet.rb. It has been quite some time sinc they were + obsoleted and made to emit warnings. + +Fri Dec 20 04:58:22 2002 Akinori MUSHA + + * lib/tempfile.rb: Embed Rdoc style comments. + + * lib/tempfile.rb: Add length as an alias for size. + +Fri Dec 20 03:57:32 2002 Akinori MUSHA + + * lib/tempfile.rb: Add Tempfile#close!() as a shorthand for + Tempfile#close(true). + + * lib/tempfile.rb: Add Tempfile#{unlink,delete}(). + +Fri Dec 20 03:53:01 2002 Akinori MUSHA + + * lib/README, lib/cgi/final.rb, lib/cgi/session.rb: Delete + final.rb, which was obsoleted long ago. + +Fri Dec 20 00:16:06 2002 Nobuyoshi Nakada + + * re.c (rb_reg_match_pre, rb_reg_match_post, match_to_a, + match_select): return instances of same class as the original + string. [ruby-dev:19119] + +Thu Dec 19 22:55:49 2002 NAKAMURA Usaku + + * numeric.c (DBL_EPSILON): fix typo. + +Thu Dec 19 22:35:20 2002 Nobuyoshi Nakada + + * eval.c (assign): avoid [BUG] at multiple attribute assignment. + +Thu Dec 19 01:00:09 2002 Yukihiro Matsumoto + + * numeric.c (num_step): use DBL_EPSILON. + + * array.c (rb_check_array_type): new function: return an array + (convert if possible), or nil. + + * string.c (rb_check_string_type): new function: return a string + (convert if possible), or nil. + + * numeric.c (rb_dbl_cmp): returns nil if values are not + comparable. + + * numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp() + + * bignum.c (rb_big_cmp): ditto. + + * numeric.c (rb_num_coerce_cmp): new coercing function for "<=>", + which does not raise TypeError. + + * numeric.c (do_coerce): can be suppress exception now. + + * object.c (rb_mod_cmp): should return nil for non class/module + objects. + +Thu Dec 19 04:21:10 2002 Akinori MUSHA + + * lib/open-uri.rb: add a missing ||. (found by: ruby -wc) + +Wed Dec 18 17:53:05 2002 Yukihiro Matsumoto + + * re.c (rb_reg_eqq): return false if the argument is not a + string. now returns boolean value. + + * class.c (rb_include_module): argument should be T_MODULE, not + T_class, nor T_ICLASS. + +Wed Dec 18 03:52:55 2002 Nobuyoshi Nakada + + * string.c (rb_str_new4): handle tail shared string. + (ruby-bugs-ja:PR#370) + + * string.c (rb_str_dup_frozen): ditto. + +Tue Dec 17 21:08:29 2002 Nobuyoshi Nakada + + * node.h (NODE_ATTRASGN): new node, assignment to attribute. + [ruby-core:00637]. + + * eval.c (is_defined, rb_eval): ditto. + + * parse.y (attrset, node_assign): ditto. + + * string.c (rb_str_substr): tail sharing. [ruby-core:00650] + + * re.c (rb_reg_nth_match): ditto. + +Tue Dec 17 16:52:38 2002 Yukihiro Matsumoto + + * eval.c (is_defined): "defined?" should return "assignment" for + attribute assignment (e.g. a.foo=b) and indexed assignment + (e.g. a[2] = 44). + + * parse.y (aryset): use NODE_ATTRASGN. + +Tue Dec 17 04:03:45 2002 Tanaka Akira + + * lib/open-uri.rb: new file. + +Tue Dec 17 00:28:19 2002 NAKAMURA Usaku + + * file.c (utimbuf): need to define for VC++. + +Mon Dec 16 15:53:20 2002 Nobuyoshi Nakada + + * parse.y (nextc): get rid of overrun. (pointed out by akr + [ruby-list:36773]) + +Sun Dec 15 21:16:44 2002 WATANABE Hirofumi + + * lib/mkmf.rb (init_mkmf): add $(topdir) to $LIBPATH if $extmk. + remove adding $(archdir) to $LIBPATH. + +Sat Dec 15 12:15:00 2002 Takaaki Uematsu + + * configure.in, defines.h, dir.c, dir.h, dln.c, error.c, + eval.c, file.c, hash.c, io.c, main.c, missing.c, + process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h, + bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h, + ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c, + ext/socket/getnameinfo.c, ext/socket/socket.c, + ext/tcltklib/stubs.c + : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER + * wince/exe.mak : delete \r at the end of lines. + * wince/mswince-ruby17.def : delete rb_obj_become + +Sun Dec 15 11:43:26 2002 Nobuyoshi Nakada + + * parse.y (dispose_string): dispose String object. + + * parse.y (heredoc_restore, here_document): fix memory leak. + +Sat Dec 14 14:25:00 2002 Takaaki Uematsu + + * wince/sys : add stat.c, stat.h, timeb.c, timeb.h, + types.h, utime.c, utime.h + * wince/dll.mak : object file name changed. + * wince/io.c : add empty dup2(). + * wince/io.h : add dup2 definition. + +Sat Dec 14 01:51:29 2002 WATANABE Hirofumi + + * ext/dbm/extconf.rb (rb_check): support for GNU dbm 1.8.3. + (-with-dbm-type=gdbm_compat). link against -lgdbm_compat + and -lgdbm. + +Fri Dec 13 23:42:16 2002 WATANABE Hirofumi + + * ext/dbm/extconf.rb (db_check): check existence of the function + in the specified library before checking it in libc. + +Fri Dec 13 17:15:49 2002 Yukihiro Matsumoto + + * variable.c (generic_ivar_get): should always warn uninitialized + instance variables. + +Fri Dec 13 12:33:22 2002 Nobuyoshi Nakada + + * parse.y (expr): rescue clause was ignored. + +Thu Dec 12 18:19:14 2002 WATANABE Hirofumi + + * configure.in (RUBY_PROG_GNU_LD): add $CFLAGS, $CPPFLAGS, $LDFLAGS + to the option of $CC. + + * configure.in: set LIBRUBYARG to '-l$(RUBY_SO_NAME)' if the + target os is cygwin and --disable-shared option is supplied. + + * lib/mkmf.rb (init_mkmf): expand config["LIBRUBY"] and + config["LIBRUBY_A"]. don't link $LIBRUBYARG_STATIC if + --disable-shared option is supplied. + + * configure.in (RUBY_CPPOUTFILE): should be a better message. + + * ext/Win32API/extconf.rb: join with a space. + +Thu Dec 12 17:27:19 2002 Yukihiro Matsumoto + + * re.c (rb_reg_hash): define Regexp#hash to make regexps to be + hash keys. + + * re.c (Init_Regexp): define Regexp#eql? (alias to Regexp#==). + +Thu Dec 12 16:26:31 2002 Nobuyoshi Nakada + + * marshal.c (r_object0): singleton class instance can't be loaded. + (ruby-bugs-ja:PR#366) + +Wed Dec 11 23:35:43 2002 WATANABE Hirofumi + + * ext/extmk.rb (create_makefile): -no-undefined -> --no-undefined. + +Wed Dec 11 17:54:59 2002 Yukihiro Matsumoto + + * io.c (io_read): takes optional second argument to specify a + string to be written. the string should not be frozen. + + * io.c (rb_io_sysread): ditto. + +Wed Dec 11 11:30:28 2002 Nobuyoshi Nakada + + * ext/digest/digest.c (rb_digest_base_copy): renamed "become". + + * ext/stringio/stringio.c (strio_copy): ditto. + +Wed Dec 11 00:45:00 2002 Yukihiro Matsumoto + + * lib/getoptlong.rb (GetoptLong::Error): provide a common ancestor + for GetoptLong error classes (RCR#129). + +Tue Dec 10 17:42:39 2002 K.Kosako + + * re.c (rb_reg_copy_object): fixed memory leak. + +Tue Dec 10 17:30:35 2002 Tanaka Akira + + * pack.c (utf8_limits): fix the limit of 4 bytes UTF-8 sequence. + +Tue Dec 10 12:01:15 2002 Nobuyoshi Nakada + + * eval.c (mnew): original class of method defined in module should + be the module not intermediate class. [ruby-dev:19040] + +Tue Dec 10 01:16:52 2002 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): preceding ".." for negative numbers + still left; removed. + + * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec + for example "%5.3d". + +Sat Dec 7 18:14:23 2002 Yukihiro Matsumoto + + * process.c (Init_process): add Process.exit and Process.abort + + * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant + UTF-8 sequences. + +Fri Dec 6 03:46:00 2002 Yukihiro Matsumoto + + * process.c (last_status_set): add pid attribute to Process::Status. + +Wed Dec 4 17:31:42 2002 Yukihiro Matsumoto + + * pack.c (uv_to_utf8): limit maximum length of the encoded string + to 6 bytes, even when the platform supports 8 bytes long integers. + + * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. + + * object.c (copy_object): use "copy_object" method, not "become". + +Wed Dec 4 16:37:11 2002 Yukihiro Matsumoto + + * object.c (copy_object): copy finalizers as well if any. + + * gc.c (rb_gc_copy_finalizer): new function to copy finalizers. + +Tue Dec 3 01:13:41 2002 Tanaka Akira + + * lib/pp.rb (PP.singleline_pp): new method. + +Sun Dec 1 23:04:03 2002 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::new): same as OptionParser#on but + returns new OptionParser::switch. + +Sun Dec 1 22:43:29 2002 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_stat): empty path is invalid, and return + ENOENT rather than EBADF in such case. [ruby-talk:57177] + +Fri Nov 29 18:01:48 2002 Yukihiro Matsumoto + + * pack.c (utf8_to_uv): added checks for malformed or redundant + UTF-8 sequences. + +Thu Nov 28 12:08:30 2002 Akinori MUSHA + + * lib/mkmf.rb: Avoid the use of "clean::" in favor of "clean:" in + order not to let make(1) choke if there is another dependency on + the target added in a depend file. + +Thu Nov 28 02:40:42 2002 Akinori MUSHA + + * lib/mkmf.rb: Make sure to dig the destination directory before + installing a file there. Formerly "make install" could fail + depending on make(1)'s mood of the moment, especially when -jN + is given. + +Wed Nov 27 17:39:38 2002 Akinori MUSHA + + * ext/syslog/syslog.c: Cut redundancy. + + * ext/syslog/syslog.c: Do not leak ident. + +Wed Nov 27 17:25:29 2002 Akinori MUSHA + + * ext/syslog/syslog.c, ext/syslog/test.rb: Syslog.close should + raise RuntimeError when not opened. + + * ext/syslog/syslog.c, ext/syslog/test.rb: + Syslog.{ident,options,facility,mask} should all return nil when + not opened. + + * ext/syslog/syslog.c, ext/syslog/test.rb: Change back the output + format of inspect(). + +Wed Nov 27 16:25:43 2002 Akinori MUSHA + + * ext/digest/test.rb: Switch from RUnit to Test::Unit. + +Wed Nov 27 16:14:12 2002 Akinori MUSHA + + * ext/syslog/syslog.c: Fix a problem where Syslog.ident was not + marked and could thus be GC'd. + +Wed Nov 27 16:11:53 2002 Akinori MUSHA + + * ext/syslog/test.rb: Switch from RUnit to Test::Unit. + + * ext/syslog/test.rb: The output format of inspect() is slightly + altered. + +Wed Nov 27 06:43:26 2002 Nobuyoshi Nakada + + * error.c (exit_initialize): add SystemExit#initialize to set + instance variable status. (ruby-bugs-ja:PR#362) + Now accepts status as optional first argument. + + * eval.c (error_handle): now SystemExit have status always. + + * eval.c (system_exit): just instantiate SystemExit without raise. + + * eval.c (rb_thread_start_0): initialize SystemExit properly. + +Tue Nov 26 10:17:04 2002 Yukihiro Matsumoto + + * dln.c (init_funcname_len): remove MAXPATHLEN dependency. + +Mon Nov 25 19:55:38 2002 WATANABE Hirofumi + + * ext/extmk.rb (extmake): return true if not dynamic and not static. + +Mon Nov 25 01:08:40 2002 WATANABE Hirofumi + + * dln.c: revert and add the MAXPATHLEN definition on mswin32/mingw32. + +Sun Nov 24 20:36:53 2002 WATANABE Hirofumi + + * dln.c: move the MAXPATHLEN definition in front. + +Fri Nov 22 22:55:01 2002 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): preceding ".." for negative + hexadecimal numbers should not appear if prec (e.g. %.4) is + specified. + + * pack.c (NUM2I32): support platforms which does not have 32bit + integers (e.g. Cray). + +Fri Nov 22 19:20:36 2002 Akinori MUSHA + + * instruby.rb: Install batch files on Windows. [Submitted by usa] + +Fri Nov 22 18:31:46 2002 Yukihiro Matsumoto + + * eval.c (rb_add_method): node may be NULL. + +Thu Nov 21 20:53:06 2002 Minero Aoki + + * lib/net/smtp.rb: changes coding style. + + * lib/net/pop.rb: ditto. + + * lib/net/protocol.rb: ditto. + +Thu Nov 21 20:17:08 2002 Minero Aoki + + * lib/net/http.rb: changes coding style. + +Thu Nov 21 20:04:06 2002 Minero Aoki + + * lib/net/http.rb: should not overwrite Host: header. + (This patch is contributed by sean@ruby-lang.org) + +Thu Nov 21 20:01:33 2002 Minero Aoki + + * lib/net/http.rb: support Proxy-Authorization. + (This patch is contributed by Alexander Bokovoy) + +Thu Nov 21 11:03:39 2002 Yukihiro Matsumoto + + * file.c (rb_find_file_ext): should not terminate searching with + empty path, just ignore. + + * dir.c: remove inclusion. + +Wed Nov 20 02:07:12 2002 Yukihiro Matsumoto + + * compar.c (cmp_eq,cmp_gt,cmp_ge,cmp_lt,cmp_le): check using + rb_cmpint(). + + * error.c (init_syserr): remove sys_nerr dependency. + +Wed Nov 20 01:52:21 2002 Yukihiro Matsumoto + + * numeric.c (num_cmp): added to satisfy Comparable assumption. + + * eval.c (rb_add_method): "initialize" should be public if it is a + singleton method. + +Tue Nov 19 22:37:23 2002 Yukihiro Matsumoto + + * regex.c (re_match): avoid dereferencing if size == 0. + (ruby-bugs-ja:PR#360) + +Tue Nov 19 20:40:39 2002 Yukihiro Matsumoto + + * time.c (time_cmp): should return nil if an operand is not a + number nor time. (ruby-bugs-ja:PR#359) + + * file.c (rb_stat_cmp): should return nil if an operand is not + File::Stat. + +Tue Nov 19 14:35:09 2002 Yukihiro Matsumoto + + * array.c (rb_ary_zip): iterates over items in the receiver. + zipped with nil if argument arrays are shorter. if arrays are + longer, left items are ignored. now works with blocks. + + * enum.c (zip_i): changed for new behavior. + + * array.c (rb_ary_transpose): added. [new] + +Tue Nov 19 05:12:21 2002 Akinori MUSHA + + * instruby.rb: Do not install various working files under bin/. + +Tue Nov 19 05:07:39 2002 Nobuyoshi Nakada + + * instruby.rb: not rewrite installed scripts when dry-run mode. + + * lib/ostruct.rb (OpenStruct::initialize): should symbolize keys + instead of values. + +Tue Nov 19 02:24:10 2002 Akinori MUSHA + + * instruby.rb: Rewrite installed scripts' shebang lines. + + * instruby.rb: Use File.join() where appropriate. + +Tue Nov 19 01:53:35 2002 Akinori MUSHA + + * bin/irb: Moved from sample/irb.rb. + + * instruby.rb: Install script files under bin/ with ruby's program + prefix and suffix. + +Mon Nov 18 02:13:36 2002 Akinori MUSHA + + * lib/tempfile.rb: Make this library thread safe. + + * lib/tempfile.rb: Do not pick a name which was once used and is + still scheduled for removal. + + * lib/tempfile.rb: A lock file need not and must not be scheduled + for removal. + + * lib/tempfile.rb: Compare Max_try with the number of mkdir + failures instead of the suffix counter. + + * lib/tempfile.rb: Overall cleanup and add some important notices. + +Sun Nov 17 22:57:31 2002 Nobuyoshi Nakada + + * parse.y (dsym): garbage returned. (ruby-bugs-ja:PR#358) + +Fri Nov 15 07:40:08 2002 NAKAMURA, Hiroshi + + * observer.rb: raise NoMethodError instead of NameError. + [ruby-dev:18788] + + * ostruct.rb: ditto. fix a bug in inspect which called String#+ with + Symbol. [ruby-dev:18788] + + * profile.rb: illegal use of Array#sort!. replaced it with non-bang + method. [ruby-dev:18792] + +Thu Nov 14 22:40:29 2002 Nobuyoshi Nakada + + * configure.in (LIBRUBY_A): append -static. [ruby-dev:18689] + + * configure.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): linker + argument to link static/shared library respectively. + + * Makefile.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): added. + + * bcc32/Makefile.sub, win32/Makefile.sub: ditto. + + * instruby.rb (LIBRUBY_A): install to libdir. + + * lib/mkmf.rb (link_command): link static library of ruby, or + try_run fails unless LIBRUBY_SO is installed. [ruby-dev:18646] + + * eval.c (call_trace_func): toplevel caller was missing. + [ruby-dev:18754] + + * eval.c (proc_to_s): adjust created line number. + + * parse.y (primary, do_block, brace_block): adjust line number of + block to beginning line, instead of the first statement inside + the block. + +Thu Nov 14 08:23:42 2002 Yukihiro Matsumoto + + * math.c (math_acos): check errno after operation. ditto for + asin, acosh, atanh, log, log10 and sqrt. + + * eval.c (rb_add_method): initialize should always be private. + + * parse.y (expr): add rescue modifier rule. + + * parse.y (command_call): return, break and next with argument is + now part of this rule. + +Wed Nov 13 16:22:38 2002 Nobuyoshi Nakada + + * configure.in (DLDFLAGS): removed -Wl,-no-undefined to + ext/extmk.rb, in order to allow references to symbols in other + extension libraries for mkmf.rb. [ruby-dev:18724] + + * ext/extmk.rb (extmake): ditto. + + * ext/extmk.rb (extmake): exit when make failed. + +Sun Nov 10 03:46:18 2002 Akinori MUSHA + + * lib/set.rb: retire contain?() and add superset?(), + proper_superset?() subset?(), and proper_subset?(). + [obtained from: Jason Voegele's set.rb] + + * lib/set.rb: define several aliases: union() for |(), + difference() for -(), and intersection() for &(). + [obtained from: Jason Voegele's set.rb] + + * lib/set.rb: deal with a s/id/object_id/ leftover. + +Sat Nov 9 16:06:57 2002 WATANABE Hirofumi + + * ext/tcltklib/stubs.c: should include "util.h" for ruby_strdup. + +Sat Nov 9 11:39:45 2002 Nobuyoshi Nakada + + * eval.c: remove ENABLE_TRACE/DISABLE_TRACE to trace child nodes of + c-call. [ruby-dev:18699] + +Fri Nov 8 04:16:55 2002 Yukihiro Matsumoto + + * parse.y (yylex): "a" in "a /5" should be considered as a local + variable. [experimental] + +Thu Nov 7 09:51:37 2002 Nobuyoshi Nakada + + * eval.c (rb_yield_0): should enable trace for non-cfunc nodes. + [ruby-dev:18645] + + * eval.c (blk_orphan): a block created in a different thread is + orphan. [ruby-dev:17471] + +Wed Nov 6 16:57:06 2002 Yukihiro Matsumoto + + * class.c (rb_define_method): do not set NOEX_CFUNC if klass is + really a module, whose methods must be safe for reciever's type. + + * eval.c (rb_eval): nosuper should not be inherited unless the + overwritten method is an undef placeholder. + +Tue Nov 5 00:46:04 2002 Akinori MUSHA + + * ext/extmk.rb: Properly pass the given target to + make(1). [pointed out by eban] + +Mon Nov 4 20:03:53 2002 NAKAMURA Usaku + + * instruby.rb, lib/mkmf.rb: use CONFIG["ENABLE_SHARED"] instead of + checking whether CONFIG["configure-args"] includes "--enable-shared". + +Mon Nov 4 16:49:14 2002 Yukihiro Matsumoto + + * parse.y (primary): allow 'when'-less case statement; persuaded + by Sean Chittenden. + +Mon Nov 4 06:28:09 2002 Akinori MUSHA + + * Makefile.in, ext/extmk.rb, bcc32/Makefile.sub, + win32/Makefile.sub: Introduce better command line syntax + (--make/--make-flags/--extstatic) to extmk.rb and instruby.rb. + Previously such command as 'make -j3 install' with pmake doesn't + fail. Formerly extmk.rb was receiving "make -j 3 -j 3" via the + command line arguments and just ended up recognizing the first + "3" as destdir. [with help of usa] + +Mon Nov 4 03:59:51 2002 Akinori MUSHA + + * lib/getopts.rb: Do not choke on characters that cannot be used + in a variable name. Replace them with `_'. Define a hash named + $OPT for convenience. + +Sat Nov 2 00:38:55 2002 Yukihiro Matsumoto + + * object.c (Init_Object): added Object#object_id, new name for + Object#id. [new] + + * object.c (rb_obj_id_obsolete): give warning for Object#id. + + * numeric.c (fix_intern): added Fixnum#to_sym. [new] + + * object.c (sym_to_sym): rename from Symbol#intern + +Fri Nov 1 14:21:06 2002 Yukihiro Matsumoto + + * enum.c (enum_zip): added Enumerable#zip. [new] + + * array.c (rb_ary_zip): added Array#zip. + +Thu Oct 31 20:10:18 2002 Yukihiro Matsumoto + + * error.c (init_syserr): remove sys_nerr dependency. + +Thu Oct 31 09:31:51 2002 K.Kosako + + * eval.c (rb_export_method): undef'ed method visibility should not + be changed. + +Wed Oct 30 17:00:47 2002 Yukihiro Matsumoto + + * eval.c (rb_mod_public_method_defined, etc.): new methods: + public_method_defined?, private_method_defined?, + protected_method_defined? + + * object.c (rb_obj_public_methods): new method + Object#public_methods. + + * class.c (ins_methods_i): Object#methods should list both public + and protected methods. + + * class.c (rb_class_public_instance_methods): new method + Module#public_instance_methods. + +Wed Oct 30 06:29:00 2002 Akinori MUSHA + + * eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c, + ext/socket/socket.c: differentiate long and int; use proper + printf type specifiers and do casts where appropriate. + +Wed Oct 30 04:07:33 2002 Nobuyoshi Nakada + + * eval.c (error_print, rb_longjmp, rb_thread_schedule): flush + error message. [ruby-dev:18582] + + * eval.c (ruby_cleanup): added. just clean up without exit. + [ruby-dev:18582] + + * eval.c (ruby_exec): added. execute main evaluation tree without + exit. [ruby-dev:18582] + + * intern.h: prototypes; ruby_cleanup, ruby_exec + +Tue Oct 29 02:00:08 2002 Nobuyoshi Nakada + + * ext/extmk.rb (extmake): use dummy_makefile to create dummy + Makefile. + + * lib/mkmf.rb (find_executable0): EXEEXT is optional. + + * lib/mkmf.rb (dummy_makefile): make dummy Makefile content. + + * lib/mkmf.rb (create_makefile): define EXTLIB replacing -l. + + * lib/mkmf.rb ($bccwin): detect Borland make by help message. + + * lib/mkmf.rb (CLEANINGS): common rules to clean. + +Mon Oct 28 01:27:17 2002 WATANABE Hirofumi + + * djgpp/config.sed (@program_transform_name@): use `%', not `,'. + +Sun Oct 27 22:59:50 2002 KONISHI Hiromasa + + * ext/extmk.rb(78) : The unnecessary error when installing by bccwin32 + is controlled. + + * lib/mkmf.rb(773) : Also in the case of bccwin32, the path was added. + +Sun Oct 27 17:07:25 2002 WATANABE Hirofumi + + * djgpp/*: sync with the latest. + + * ext/extmk.rb, lib/mkmf.rb: flush $stdout. + + * io.c (READ_DATA_PENDING_COUNT, READ_DATA_PENDING_PTR): + undef these macros on DJGPP. + +Sat Oct 26 10:11:47 2002 Akinori MUSHA + + * node.h (nd_type): cast the value to int. + +Sat Oct 26 04:27:35 2002 Akinori MUSHA + + * ext/dbm/dbm.c (fdbm_indexes, fdbm_select): add a missing + argument and prevent coredump when a nonexistent key is + specified. + + * ext/sdbm/init.c (fsdbm_indexes, fsdbm_select): ditto. + +Sat Oct 26 03:28:43 2002 Akinori MUSHA + + * eval.c, gc.c: use a common set of alloca() #ifdef's. This fixes + the build with Intel C Compiler for Linux. + + * eval.c (rb_f_require): declare old_func with a real type, not + just type modifiers. + +Fri Oct 25 02:55:01 2002 Minero Aoki + + * string.c (rb_str_split_m): RSTRING(str)->ptr might become NULL. + [ruby-dev:18581] + +Thu Oct 24 21:57:02 2002 Nobuyoshi Nakada + + * configure.in (LIBPATHFLAG): avoid $ substitution. + [ruby-dev:18577] + + * ext/extmk.rb (extmake): expand $srcdir. + + * ext/win32ole/extconf.rb: should not override $CFLAGS, but + append. + + * lib/mkmf.rb (config_string): use given config hash. + + * bcc32/Makefile.sub (.rc.res): directory part may be empty in + Borland make. + +Thu Oct 24 03:38:07 2002 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): site-install target for backward + compatibility. + + * lib/mkmf.rb (init_mkmf): libdir prior to topdir. + + * configure.in (LIBPATHFLAG): should escape $. [ruby-dev:18572] + + * mkconfig.rb: never substitute escaped $$. + + * instruby.rb: not install LIBRUBY_SO unless enable-shared. + [ruby-dev:18569] + +Wed Oct 23 19:16:06 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): added NODE_DSYM, symbol literal with + interpolation. + + * node.h: ditto. + + * intern.h: prototypes; rb_is_junk_id, rb_str_dump, rb_str_intern + + * object.c (sym_inspect): escape and quote for non-alphanumeric + symbols. + + * parse.y (dsym, tokadd_string, yylex): extended symbol literals. + + * parse.y (rb_is_junk_id): added. + + * string.c (rb_str_dump, rb_str_intern) : make extern. + + * lib/mkmf.rb (create_makefile): deffile should be removed by + distclean, not clean. + +Tue Oct 22 23:56:41 2002 WATANABE Hirofumi + + * lib/mkmf.rb (init_mkmf): add dir_config("opt"). + +Tue Oct 22 19:44:03 2002 KONISHI Hiromasa + + * bcc32/configure.bat : The command line when calling setup.mak is + corrected. + + * bcc32/readme.bcc32 : It follows up about the option of configure.bat. + +Tue Oct 22 15:23:19 2002 Nobuyoshi Nakada + + * instruby.rb: add dryrun mode. + + * ext/extmk.rb (extmake): add install: target to dummy Makefile. + + * ext/extmk.rb (extmake): avoid Borland make's quirk behavior. + + * lib/mkmf.rb (link_command): opt is not a makefile macro. + + * bcc32/Makefile.sub ($(LIBRUBY_SO) $(LIBRUBY)): EXTOBJS were not + linked. + + * bcc32/Makefile.sub (ext/extinit.obj): missing. + + * bcc32/Makefile.sub (TRY_LINK): options have to place before any + non-option arguments. + + * win32/Makefile.sub (TRY_LINK): need -link and -libpath options. + + * bcc32/Makefile.sub, win32/Makefile.sub (RANLIB): logical + operator never work with command.com. + +Tue Oct 22 00:59:59 2002 WATANABE Hirofumi + + * configure.in (RUBY_CPPOUTFILE): fix cache file bug. + + * lib/mkmf.rb (link_command): put 'opt' after conftest.c for + static linking. + +Mon Oct 21 22:53:02 2002 Nobuyoshi Nakada + + * configure.in (XCFLAGS): CFLAGS to compile ruby itself. + + * configure.in (LIBEXT): suffix for static libraries. + + * configure.in (LIBPATHFLAG): switch template to specify library + path. + + * configure.in (LINK_SO): command to link shared objects. + + * configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent + files. + + * configure.in (EXPORT_PREFIX): prefix to exported symbols on + Windows. + + * configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS): + libraries, macros and headers used in common. + + * configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode + executable name. + + * Makefile.in (CFLAGS): append XCFLAGS. + + * Makefile.in (PREP): miscellaneous system dependent files. + + * Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb. + + * Makefile.in (fake.rb): CROSS_COMPILING keeps building platform. + + * Makefile.in (MAKEFILES): depend on *.in and config.status. + + * Makefile.in (parse.c): replace "y.tab.c" with actual name for + byacc. + + * ext/extmk.rb, lib/mkmf.rb: integrated. + + * ext/extmk.rb: propagate MFLAGS. + + * ext/extmk.rb (extmake): make dummy Makefile to clean even if no + Makefile is made. + + * lib/mkmf.rb (older): accept multiple file names and Time + objects. + + * lib/mkmf.rb (xsystem): split and quote. + + * lib/mkmf.rb (cpp_include): make include directives. + + * lib/mkmf.rb (try_func): try whether specified function is + available. + + * lib/mkmf.rb (install_files): default to site-install. + + * lib/mkmf.rb (checking_for): added. + + * lib/mkmf.rb (find_executable0): just find executable file with + no message. + + * lib/mkmf.rb (create_header): output header file is variable. + + * lib/mkmf.rb (create_makefile): separate sections. + + * lib/mkmf.rb (init_mkmf): initialize global variables. + + * win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added. + + * bcc32/Makefile.sub (ARCH): fixed to i386. + + * win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not + link EXTOBJS. + + * ext/dl/extconf.rb: use try_cpp to cross compile. + + * ext/dl/extconf.rb: not modify files in source directory. + +Fri Oct 18 23:11:21 2002 Nobuyoshi Nakada + + * parse.y (value_expr0): allow return/break/next/redo/retry in rhs + of logical operator. [ruby-dev:18534] + + * parse.y (remove_begin): eliminate useless NODE_BEGIN. + [ruby-dev:18535] + +Fri Oct 18 01:02:44 2002 Akinori MUSHA + + * hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on + Darwin for namespace cleanness. [ruby-core:00537] + + * dln.c (dln_load): Fix Darwin support that has been disabled and + switch to using it on Darwin instead of the system dlopen(). + [ruby-core:00541] + +Thu Oct 17 19:17:56 2002 Nobuyoshi Nakada + + * marshal.c (w_byten): added; write n bytes from s to arg. + + * marshal.c (dump): flush buffered data. + + * marshal.c (marshal_dump, r_byte, r_bytes0, marshal_load): unify + marshaling I/O. [ruby-talk:53368] + +Thu Oct 17 12:58:24 2002 Minero Aoki + + * lib/fileutils.rb: stat.blksize might be 0/nil. + + * lib/fileutils.rb: change coding style. + +Wed Oct 16 22:35:53 2002 Nobuyoshi Nakada + + * sprintf.c (rb_f_sprintf): disallow mixed usage of numbered and + unnumbered arguments. [ruby-dev:18531] + get rid of memory leak at exception. [ruby-core:00460] + +Wed Oct 16 13:36:29 2002 Nobuyoshi Nakada + + * variable.c (rb_global_entry): not add global entry until + initialized to avoid accessing it while GC. [ruby-dev:18514] + + * variable.c (rb_alias_variable): ditto. + +Wed Oct 16 01:03:54 2002 Yukihiro Matsumoto + + * object.c (rb_str_to_dbl): RString ptr might be NULL. + + * object.c (rb_cstr_to_dbl): p pointer might be NULL. + + * bignum.c (rb_str_to_inum): RString ptr might be NULL. + + * bignum.c (rb_cstr_to_inum): str pointer might be NULL. + +Sat Oct 12 23:44:11 2002 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_putc): wrong condition to fill or flush on + bccwin32. [ruby-win32:408] + +Fri Oct 11 15:58:06 2002 Yukihiro Matsumoto + + * parse.y (arg): rescue modifier is now an operator with + precedence right below assignments. i.e. "a = b rescue c" now + parsed as "a = (b rescue c)", not as "(a = b) rescue c". [new] + [experimental] + +Fri Oct 11 06:05:30 2002 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_fclose, rb_w32_close): use closesocket() + for socket. [ruby-win32:382] + + * win32/win32.c (StartSockets): set NtSocketsInitialized. + + * win32/win32.h: prototypes; rb_w32_fclose, rb_w32_close + +Fri Oct 11 00:24:57 2002 Nobuyoshi Nakada + + * gc.c (ruby_xmalloc, ruby_xrealloc): restrict total allocation + size according to memories consumed by live objects. + [ruby-dev:18482] + + * gc.c (gc_sweep): estimate how live objects consume memories. + +Thu Oct 10 17:26:12 2002 WATANABE Hirofumi + + * ext/tcltklib/stubs.c (ruby_tcltk_stubs): fix memory leak. + [ruby-dev:18478] + +Thu Oct 10 15:20:18 2002 Nobuyoshi Nakada + + * lib/weakref.rb (WeakRef::@@final): use Hash#delete. + + * lib/weakref.rb (WeakRef::__getobj__): examine if alive or not by + ID_REV_MAP to deal with recycled object. [ruby-dev:18472] + + * lib/weakref.rb (WeakRef::weakref_alive?): ditto. + +Wed Oct 9 07:11:25 2002 Nobuyoshi Nakada + + * gc.c (gc_sweep): also adjust heaps_limits when free unused heap + page. [ruby-core:00526] + + * io.c (io_fflush): condition to retry can occur. + + * io.c (io_write): returned 0 wrongly if no error occurred. + +Tue Oct 8 14:19:07 2002 Nobuyoshi Nakada + + * io.c (io_write): must check returned value from fwrite() before + test with ferror(). (ruby-bugs-ja:PR#350) + +Tue Oct 8 10:55:23 2002 Tanaka Akira + + * lib/prettyprint.rb (PrettyPrint.singleline_format): new method. + +Mon Oct 7 16:43:07 2002 Yukihiro Matsumoto + + * bignum.c (bigdivrem): bignum zero's len should not be 0. + +Mon Oct 7 15:36:42 2002 Yukihiro Matsumoto + + * bignum.c (bigdivmod): wrong condition check for Bignum zero. + + * bignum.c (Init_Bignum): need to add Bignum#div. + +Sun Oct 6 00:49:15 2002 Minero Aoki + + * eval.c (rb_load): should not pass blocks to the loaded file. + [ruby-dev:18458] + +Fri Oct 4 20:25:38 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_interrupt, rb_thread_signal_raise): no need to + save dead thread context. (same as [ruby-dev:18322]) + (ruby-bugs-ja:PR#349) + +Fri Oct 4 13:05:58 2002 WATANABE Hirofumi + + * configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld. + + * ext/extmk.rb (create_makefile): add -Wl,-no-undefined to $DLDFLAGS + on Linux if GNU ld is used and --enable-shared is specified. + +Fri Oct 4 02:21:16 2002 Yukihiro Matsumoto + + * bignum.c (rb_big_rshift): num should be initialized by carry + bits if x is negative. + + * bignum.c (bigdivmod): len for bignum zero is 1, not 0. + +Thu Oct 3 20:22:11 2002 Nobuyoshi Nakada + + * bcc32/mkexports.rb: to work on cygwin via telnet. + [ruby-win32:358] + + * ext/tcltklib/tcltklib.c (ip_invoke): requires command name + argument. [ruby-dev:18438] + + * eval.c (ruby_init, ruby_options): Init_stack() with local + location. (ruby-bugs-ja:PR#277) + + * eval.c (rb_call0): disable trace call. [ruby-dev:18074] + + * eval.c (eval, rb_load): enable trace call. [ruby-dev:18074] + + * eval.c (rb_f_require): set source file name for extension + libraries. [ruby-dev:18445] + + * gc.c (Init_stack): prefer address of argument rather than local + variable to initialize rb_gc_stack_start. + + * ruby.c (translate_char): translate a character in a string; + DOSISH only. [ruby-dev:18274] + + * ruby.c (ruby_init_loadpath): added argv[0] handling under + Human68K. [ruby-dev:18274] + + * ruby.c (proc_options): translate directory separator in $0 to + '/'. [ruby-dev:18274] + +Thu Oct 3 00:27:26 2002 Nobuyoshi Nakada + + * lib/delegate.rb (Delegator::initialize): use Object#class + instead of deprecated Object#type. + +Wed Oct 2 23:32:48 2002 Nobuyoshi Nakada + + * configure.in (RUBY_CHECK_IO_NEED_FLUSH): check whether fflush() + is needed. + + * io.c (flush_before_seek): flush before seek if buffered data + may remain. + + * io.c (rb_io_check_readable): flush if the last operation was + write. + + * io.c (rb_io_check_writable): flush if the last operation was + read. + + * rubyio.h (FMODE_RBUF): added. + +Wed Oct 2 23:09:20 2002 Nobuyoshi Nakada + + * io.c (rb_io_wait_readable): handle retryable errors. + + * io.c (rb_io_wait_writable): ditto. + + * ext/socket/socket.c (bsock_send): ditto. + + * ext/socket/socket.c (s_recvfrom): ditto. + + * ext/socket/socket.c (s_accept): ditto. + + * ext/socket/socket.c (udp_send): ditto. + + * ext/socket/getaddrinfo.c (afdl): made private structures constant. + + * rubyio.h: prototype; rb_io_wait_readable(), rb_io_wait_writable(). + +Wed Oct 2 13:03:58 2002 WATANABE Hirofumi + + * configure.in: set ac_cv_func_setitimer to "no" on Cygwin. + +Wed Oct 2 10:59:29 2002 Yukihiro Matsumoto + + * gc.c (gc_sweep): free unused heap page to reduce process size if + possible. + + * object.c (rb_obj_type): deprecated Object#type; use Object#class. + +Tue Oct 1 23:48:32 2002 Nobuyoshi Nakada + + * ext/socket/socket.c (init_sock): no need for special finalizer, + socket descriptor is no longer duplicated in 1.7. + [ruby-talk:50732] + + * win32/win32.c, win32/win32.h (rb_w32_fddup, rb_w32_fdclose): + delete. + +Mon Sep 30 20:29:10 2002 Nobuyoshi Nakada + + * io.c (rb_io_inspect): not need to raise IOError for closed + stream. [ruby-talk:51871] + +Mon Sep 30 03:48:15 2002 Yukihiro Matsumoto + + * range.c (range_check): need no Fixnum check. + +Sun Sep 29 18:30:24 2002 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_open_osfhandle): adjust + rb_w32_open_osfhandle() with _open_osfhandle(). + + * win32/win32.c (rb_w32_accept, rb_w32_socket): return -1 on + error. + + * win32/win32.h: should use file descriptor instead of SOCKET. + +Sun Sep 29 06:33:03 2002 NAKAMURA Usaku + + * win32/win32.c (is_socket, rb_w32_select, rb_w32_accept, rb_w32_bind, + rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname, + rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv, + rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt, + rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr, + rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname, + rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport): + need to protect WSAGetLastError() by RUBY_CRITICAL. [ruby-talk:51778] + +Sat Sep 28 20:06:36 2002 Nobuyoshi Nakada + + * keywords: add braces around initializers. + +Sat Sep 28 13:19:29 2002 Nobuyoshi Nakada + + * hash.c (rb_hash_become): should check self-assignment after + conversion. + +Sat Sep 28 10:40:44 2002 Yukihiro Matsumoto + + * hash.c (rb_hash_become): Hash#become should check added + self-assignment. + + * class.c (rb_make_metaclass): metaclass of a superclass may be + NULL at boot time. + +Sat Sep 28 09:50:03 2002 KONISHI Hiromasa + + * ext/extmk.rb: The condition judgment without necessity was deleted. + +Fri Sep 27 18:40:42 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_deadlock): more verbose message at deadlock. + + * eval.c (rb_thread_schedule): ditto. + + * eval.c (rb_thread_join): ditto. + +Fri Sep 27 13:24:35 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): Class#inherited should be called after the + execution of the class body. + +Fri Sep 27 02:41:53 2002 Akinori MUSHA + + * ext/digest/sha1: Use OpenSSL's SHA1 engine if available. It is + much faster than what we have now (sha1.[ch]). Add a knob + (--with-bundled-sha1) to extconf.rb which makes it use the + bundled one anyway. + +Fri Sep 27 02:25:14 2002 Akinori MUSHA + + * ext/digest/rmd160: Use OpenSSL's RMD160 engine if available. It + is much faster than what we have now (rmd160.[ch]). Add a knob + (--with-bundled-rmd160) to extconf.rb which makes it use the + bundled one anyway. + +Fri Sep 27 01:23:39 2002 Akinori MUSHA + + * ext/digest/md5: Use OpenSSL's MD5 engine if available. It is + much faster than what we have now (md5.[ch]). Add a knob + (--with-bundled-md5) to extconf.rb which makes it use the + bundled one anyway. + +Thu Sep 26 22:44:21 2002 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_s_digest): Fix a double + free() bug mingled with allocation framework deployment. + + * ext/digest/digest.c (rb_digest_base_s_hexdigest): Get rid of + redundant struct allocation. + +Thu Sep 26 09:52:52 2002 Yukihiro Matsumoto + + * parse.y (primary): remove "return outside of method" check at + compile time. + +Wed Sep 25 23:51:29 2002 Nobuyoshi Nakada + + * dir.c (glob_helper): must not closedir() when exception raised + while globbing "**". + + * marshal.c (w_uclass): unused variable. + + * re.c (match_clone): unused. + + * regex.c (re_compile_pattern): get rid of implicit promotion from + plain char to int. + +Wed Sep 25 17:46:46 2002 NAKAMURA Usaku + + * lib/mkmf.rb (libpathflag): restore ENV['LIB'] when some error + occurred. + +Wed Sep 25 16:14:51 2002 Yukihiro Matsumoto + + * regex.c (re_match): p1 may exceed pend limit. + +Mon Sep 23 23:22:43 2002 Nobuyoshi Nakada + + * eval.c (rb_call0): must not clear ruby_current_node, or + backtrace cannot be generated. + + * intern.h (ruby_yyparse): rather than yyparse(). + + * parse.y (yylex): nextc() returns -1 at end of input, not 0. + + * parse.y (newline_node): reduce duplicated newline node. + + * parse.y (literal_concat): get rid of warning. + + * parse.y (new_evstr): fixed junk code. + +Mon Sep 23 19:57:52 2002 WATANABE Hirofumi + + * configure.in (RUBY_MINGW32): new macro. check for the MinGW + compiler environment. + + * lib/mkmf.rb: refactoring. + +Mon Sep 23 08:27:11 2002 Tanaka Akira + + * io.c (appendline): forget to terminate with nul. + +Mon Sep 23 02:46:29 2002 Yukihiro Matsumoto + + * eval.c (ruby_run): should set toplevel visibility again here. + + * eval.c (rb_eval): should not rely on ruby_class == rb_cObject + check. Besides allow implicit publicity for attribute set + methods. + + * parse.y (primary): need not to check class_nest, just set + whether method is an attrset or not. + +Sun Sep 22 21:49:42 2002 Nobuyoshi Nakada + + * eval.c (call_trace_func): should not call trace function while + compilation. + + * eval.c (rb_call0): also inside c-func. + + * parse.y (yycompile): ditto. + + * ruby.c (require_libraries): preserve source file/line for each + require. + +Sun Sep 22 17:08:11 2002 Tanaka Akira + + * string.c (rb_str_each_line): p might be at the top of the + string. + +Sat Sep 21 23:28:28 2002 Yukihiro Matsumoto + + * class.c (rb_make_metaclass): class of metaclass should be + metaclass of superclass, unless class itself is a metaclass; + class of metaclass of metaclass should point back to self. + eh, confusing, isn't it. + + * class.c (rb_singleton_class): check if its class is singleton + AND attached to self. + +Sat Sep 21 22:23:41 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_raise): no need to save dead thread context. + [ruby-dev:18322] + +Fri Sep 20 23:02:01 2002 Nobuyoshi Nakada + + * parse.y (block_append): eliminate unused literal nodes. + + * parse.y (literal_concat): refined literal concatenation. + +Fri Sep 20 19:43:40 2002 Akinori MUSHA + + * lib/set.rb: Merge rough/lib/set.rb rev.1.5-1.15. + +Wed Sep 18 12:41:16 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): should define class/module under ruby_cbase. + + * eval.c (rb_eval): should set class/module path based on + ruby_cbase, not ruby_class. + + * eval.c (module_setup): use ruby_cbase instead of ruby_class. + +Tue Sep 17 21:06:04 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_die): put thread dead state. + + * eval.c (rb_thread_atfork): free stack buffer at fork too. + +Tue Sep 17 01:13:31 2002 Yukihiro Matsumoto + + * eval.c (rb_mod_nesting): load wrapping module should appear in + Module#nesting list. (ruby-bugs-ja:PR#328) + + * eval.c (rb_thread_remove): free stack buffer on remove. + +Tue Sep 17 00:58:35 2002 Minero Aoki + + * io.c: add parameter prototype. + + * re.c: ditto. + +Sun Sep 15 21:14:22 2002 KONISHI Hiromasa + + * win32/win32.c (rb_w32_opendir, rb_w32_stat): Corresponds to + the unjust path containing ". + +Sun Sep 15 19:48:55 2002 WATANABE Hirofumi + + * configure.in (OUTFLAG, CPPOUTFILE): moved from lib/mkmf.rb. + check whether ${CPP} accepts the -o option. + + * win32/Makefile.sub (OUTFLAG, CPPOUTFILE): ditto. + + * bcc32/Makefile.sub (OUTFLAG, CPPOUTFILE): ditto. + + * djgpp/config.sed (OUTFLAG, CPPOUTFILE): ditto. + + * lib/mkmf.rb (OUTFLAG, CPPOUTFILE): use CONFIG. + make easy to understand log. + + * mkconfig.rb (val): should not strip. + +Sat Sep 14 20:13:42 2002 KONISHI Hiromasa + + * error.c(rb_sys_fail): remove case EPIPE on bcc32 . + +Fri Sep 13 23:39:49 2002 Nobuyoshi Nakada + + * dir.c (glob_func_caller): add prototype to get rid of warning. + +Fri Sep 13 18:35:12 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): avoid uninitialized global/class variable + warnings at `||='. [ruby-dev:18278] + + * parse.y (stmt, arg): ditto + +Fri Sep 13 13:28:04 2002 WATANABE Hirofumi + + * lib/mkmf.rb ($INSTALLFILES): avoid warning when $VERBOSE mode. + +Thu Sep 12 23:20:10 2002 KONISHI Hiromasa + + * bcc32/setup.mak : Control of a message. + + * bcc32/makefile.sub : include resource. + +Thu Sep 12 18:10:03 2002 Nobuyoshi Nakada + + * dir.c (glob_helper): fixed freeing buffer. (ruby-bugs-ja:PR#332) + + * dir.c (glob_helper): should pass matched path. (ruby-bugs-ja:PR#333) + +Thu Sep 12 00:09:32 2002 Nobuyoshi Nakada + + * eval.c (rb_trap_eval): preserve thread status and so on. + [ruby-talk:40337], [ruby-core:00019] + +Wed Sep 11 21:25:52 2002 Tanaka Akira + + * pp.rb (ARGF.pretty_print): implemented. + (PP.pp): arguments reordered. + +Wed Sep 11 18:55:38 2002 Nobuyoshi Nakada + + * eval.c (proc_to_s): refined format. [ruby-dev:18215] + +Wed Sep 11 17:47:17 2002 NAKAMURA Usaku + + * win32/win32.c, win32/win32.h (rb_w32_getpid): negate pid under Win9x. + [ruby-dev:18262] + +Wed Sep 11 12:58:57 2002 Akinori MUSHA + + * string.c (get_pat): Add an extra argument "quote". + + * string.c (rb_str_match_m): Do not bother to convert if a regexp + is given. + +Wed Sep 11 11:33:40 2002 NAKAMURA Usaku + + * bcc32/Makefile.sub: remove unnecessary `.dll' from filename of + dll's resource file. + + * cygwin/GNUmakefile.in: ditto. [ruby-dev:17103] + + * win32/Makefile.sub: ditto. [ruby-dev:17103] + + * win32/resource.rb: ditto. [ruby-dev:17103] + +Wed Sep 11 09:59:46 2002 Nobuyoshi Nakada + + * io.c (rb_io_wait_readable): added. + + * io.c (rb_io_wait_writable): added. + + * io.c (io_read_retryable): added. + + * io.c (io_write): retry on EINTR, ERESTART and EWOULDBLOCK. + [ruby-dev:17855], [ruby-dev:17878], [ruby-core:00444] + + * io.c (rb_io_fread): ditto. + + * io.c (read_all): ditto. + + * io.c (appendline): ditto. + + * io.c (rb_io_each_byte): ditto. + + * io.c (rb_io_getc): ditto. + +Wed Sep 11 09:29:24 2002 NAKAMURA Usaku + + * win32/Makefile.sub (ext): make directory `ext' on compile dir. + [ruby-dev:18255] + +Wed Sep 11 00:41:10 2002 Nobuyoshi Nakada + + * eval.c (rb_mod_define_method): initialize orig_func too. + (ruby-bugs-ja:PR#330) + +Wed Sep 11 00:01:32 2002 Yukihiro Matsumoto + + * dir.c (glob_helper): prevent memory leak using rb_protect(). + + * string.c (rb_str_associate): no need to check freeze flag. + + * string.c (rb_str_resize): should honor STR_ASSOC flag on + resize. + + * string.c (rb_str_resize): proper STR_ASSOC handling. pointed + out by Michal Rokos. + + * string.c (rb_str_buf_cat): ditto. + + * string.c (rb_str_cat): ditto. + + * string.c (rb_str_buf_append): ditto. + + * string.c (rb_str_append): ditto. + +Tue Sep 10 23:35:46 2002 Nobuyoshi Nakada + + * parse.y (nextc): restore line number after here documents. + (ruby-bugs-ja:PR#331) + + * parse.y (heredoc_restore): ditto. + +Tue Sep 10 18:26:52 2002 WATANABE Hirofumi + + * ext/extmk.rb, lib/mkmf.rb ($INCFLAGS): new var for -I$(topdir). + + * lib/mkmf.rb: add #define WIN32_LEAN_AND_MEAN to improve compile + times. + +Tue Sep 10 17:16:14 2002 NAKAMURA Usaku + + * win32/Makefile.sub (miniruby): shouldn't link $(EXTOBJS). + [ruby-dev:17059] + + * win32/Makefile.sub ($(LIBRUBY_A), $(LIBRUBY)): avoid lib.exe's + warning. [ruby-dev:17059] + + * win32/Makefile.sub: remove unnecessary rules. [ruby-dev:17059] + + * win32/configure.bat, win32/setup.mak, win32/README.win32: enable to + pass some arguments to configure. [ruby-dev:17059] + +Mon Sep 9 23:43:33 2002 WATANABE Hirofumi + + * win32/win32.h (S_I?USR): define only if not mingw32. + +Mon Sep 9 11:21:04 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_set_string): reinitialize + properly. + + * ext/stringio/stringio.c (strio_become): added self-assign check + and experimental auto-conversion to StringIO. + + * ext/stringio/stringio.c (strio_reopen): added. + + +Sun Sep 8 21:29:25 2002 WATANABE Hirofumi + + * time.c (time_free): prototype; struct time_object -> void *. + avoid GCC warnings. + + * lib/mkmf.rb, ext/extmk.rb ($LINK, $CPP): move to lib/mkmf.rb. + +Sun Sep 8 19:02:28 2002 NAKAMURA Usaku + + * time.c: prototype; time_free() to avoid VC++ warnings. + + * ext/tcltklib/tcltklib.c: prototype; invoke_queue_handler() to avoid + VC++ warning. + + * win32/win32.c (rb_w32_stat): remove S_IWGRP and S_IWOTH bits from + st_mode. + + * win32/win32.h (S_I*): define if not defined. + +Sun Sep 8 14:38:31 2002 WATANABE Hirofumi + + * configure.in: modify program_prefix only if specified + --program-prefix. + + * configure.in: don't generate ext/extmk.rb. + + * Makefile.in: execute directly $(srcdir)/ext/extmk.rb. + remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb. + + * {win32,bccwin32}/Makefile.sub: ditto. + + * instruby.rb: ditto. + + * ext/extmk.rb: renamed from ext/extmk.rb.in. + + * lib/mkmf.rb (module Logging): create log files (mkmf.log) + in each extension module directories. + + * ext/extmk.rb: ditto. + + * lib/mkmf.rb (macro_defined?): new method. + + * ext/.cvsignore: remove extmk.rb. + + * ext/*/.cvsignore: add "*.def". + + * lib/mkmf.rb (have_struct_member): moved from ext/socket/extconf.rb. + + * ext/socket/extconf.rb: use macro_defined? instead of egrep_cpp. + + * ext/etc/extconf.rb: use have_struct_member. + + * ext/etc/etc.c: add prefix HAVE_ST_ to PW_ macros. + +Sun Sep 8 14:36:40 2002 KONISHI Hiromasa + + * bcc32/configure.bat : Control of a message. + * bcc32/makefile.sub : @(sitearch) typo. + * ext/extmk.rb.in : [bccwin32] libdir is added to a library path. + * lib/mkmf.rb : ditto. + +Sat Sep 7 23:32:56 2002 Nobuyoshi Nakada + + * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp + alist for error message from ruby. + + * misc/inf-ruby.el (inferior-ruby-mode): fixed for Emacs. + + * misc/inf-ruby.el (ruby-send-region): compilation-parse-errors + doesn't parse first line, so insert separators before each + evaluations. + +Sat Sep 7 19:46:57 2002 Akinori MUSHA + + * lib/set.rb: Disallow Set.new(false). Add even more tests. + [Submitted by: "Christoph" ] + +Sat Sep 7 19:23:56 2002 Akinori MUSHA + + * lib/set.rb: Fix a bug in flatten()'s recursive set detection. + [Submitted by: "Christoph" ] Some tests + against the bug are added. + + * lib/set.rb: Resurrect the test suite by putting it after + __END__ and executing `eval DATA.read'. + +Sat Sep 7 08:41:39 2002 Minero Aoki + + * parse.y (rb_gc_mark_parser): ruby_eval_tree is marked in eval.c. + +Fri Sep 6 20:01:38 2002 Nobuyoshi Nakada + + * lib/mkmf.rb ($CC): command to compile C source. + + * lib/mkmf.rb (logging): added. + + * lib/mkmf.rb (try_compile): added. + + * lib/mkmf.rb (egrep_cpp): use internal grep when pattern is + Regexp, otherwise use external egrep command but get rid of + pipe of command.com. + + * lib/mkmf.rb (have_func): local variable should be volatile not + to be eliminated by optimization. + + * lib/mkmf.rb (create_makefile): link with CONFIG["LIBS"]. + + * lib/mkmf.rb (create_makefile): emit .SUFFIXES:. + +Fri Sep 6 12:11:22 2002 Minero Aoki + + * parse.y (rb_gc_mark_parser): should mark ALL global variables + defined in parse.y. + +Fri Sep 6 01:15:23 2002 Yukihiro Matsumoto + + * gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequent + garbage collection. + +Fri Sep 6 11:47:37 2002 Minero Aoki + + * parse.y (rb_gc_mark_parser): should mark global variables + defined in parse.y. + +Fri Sep 6 10:34:32 2002 Minero Aoki + + * io.c (rb_io_puts): RSTRING(line)->ptr might be NULL. + +Fri Sep 6 10:26:37 2002 Minero Aoki + + * parse.y: should not put non-NODE-VALUEs in the semantic stack. + +Fri Sep 6 05:48:26 2002 Nobuyoshi Nakada + + * file.c (rb_path_check): nothing to check under DOSISH. + [ruby-list:35772] + +Fri Sep 6 05:03:50 2002 Minero Aoki + + * gc.c (rb_gc): should mark parser. + + * parse.y (rb_gc_mark_parser): new function. + + * intern.h (rb_gc_mark_parser): added. + +Thu Sep 5 18:32:32 2002 Yukihiro Matsumoto + + * variable.c (rb_path2class): should not use rb_eval_string(). + +Thu Sep 5 17:18:22 2002 Michal Rokos + + * dln.c: fix memory leak in dln_load (ruby-core:405) and + in load_1 (ruby-core:407) + +Thu Sep 5 15:43:54 2002 Yukihiro Matsumoto + + * marshal.c (w_extended): should allow marshaling of object which + is extended by named module. + + * class.c (rb_make_metaclass): super may be T_ICLASS, need to skip. + +Thu Sep 5 13:09:22 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): overriding false constant with class/module + definition should be error. (PR#327) + +Thu Sep 5 01:24:26 2002 WATANABE Hirofumi + + * extmk.rb (create_makefile): add macro MAKEDIRS, INSTALL_PROG, + INSTALL_DATA. + + * extmk.rb (create_makefile): support for building to any directory. + + * extmk.rb (xsystem): move to mkmf.rb. + + * mkmf.rb (xsystem): support for extmk.rb + + * mkmf.rb ($CPP): remove '-E' option. add CPPFLAGS. + +Wed Sep 4 16:15:17 2002 Akinori MUSHA + + * lib/set.rb: ==(o) should be aware of all the Set variant + instances, not just those of its subclasses. [Submitted by: + "Christoph" ] + + * lib/set.rb: - Fix eql?(). [ditto] + +Wed Sep 4 15:23:23 2002 Yukihiro Matsumoto + + * class.c (rb_make_metaclass): obj.meta.super.meta should be equal + to obj.meta.meta.super (ruby-bugs-ja:PR#324). + +Wed Sep 4 05:10:16 2002 Koji Arai + + * parse.y (yylex): the warning message "invalid + character syntax" was never issued (ruby-bugs-ja:PR#323). + +Wed Sep 4 01:08:45 2002 Yukihiro Matsumoto + + * marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382). + +Tue Sep 3 17:12:59 2002 WATANABE Hirofumi + + * extmk.rb: require mkmf.rb. remove duplicate methods. + use Config::CONFIG["FOO"] instead of @FOO@. + + * mkmf.rb: support for extmk.rb. + +Mon Sep 2 23:01:50 2002 Nobuyoshi Nakada + + * re.c (rb_reg_search): MatchData must be rb_cMatch. + (ruby-bugs-ja:PR#319) + +Mon Sep 2 21:21:46 2002 Minero Aoki + + * gc.c (gc_sweep): does reclaim nodes in also compile time, if we + can. + + * ruby.c (load_file): omit GC if we can. + + * parse.y (ruby_parser_stack_on_heap): new function. + + * intern.h (ruby_parser_stack_on_heap): added. + +Mon Sep 2 18:45:07 2002 Yukihiro Matsumoto + + * variable.c (rb_copy_generic_ivar): remove old generic instance + variable table if it exists. + +Sun Sep 1 15:54:33 2002 WATANABE Hirofumi + + * config.guess: fixed for Linux/PPC. + +Sat Aug 31 09:38:12 2002 Yukihiro Matsumoto + + * class.c (rb_make_metaclass): metaclass of a metaclass is a + metaclass itself. + +Fri Aug 30 22:45:16 2002 Akinori MUSHA + + * lib/set.rb: Added. + +Fri Aug 30 20:58:54 2002 KONISHI Hiromasa + + * ext/Win32API/Win32API.c (Win32API_Call): typo. + +Fri Aug 30 19:45:52 2002 Nobuyoshi Nakada + + * variable.c (rb_const_assign): st_delete() takes pointer to key. + +Fri Aug 30 19:40:28 2002 Nobuyoshi Nakada + + * ext/Win32API/Win32API.c (Win32API_Call): RSTRING()->ptr may be + NULL. + + * ext/nkf/nkf.c (rb_nkf_guess): ditto. + + * ext/readline/readline.c (readline_s_set_completion_append_character): + ditto. + + * ext/socket/socket.c (sock_s_getaddrinfo, sock_s_getnameinfo): + ditto. + + * ext/tcltklib/tcltklib.c (ip_toUTF8, ip_fromUTF8): ditto. + +Fri Aug 30 01:32:17 2002 Yukihiro Matsumoto + + * class.c (rb_singleton_class): superclass of a metaclass + should be a metaclass of superclass. + + * range.c (range_eq): two instances must belong to a same class to + be equal. + + * range.c (range_eql): ditto. + + * io.c (rb_io_taint_check): frozen check added. + + * file.c (rb_stat_become): frozen check added. + + * object.c (rb_obj_become): ditto. + + * re.c (rb_reg_become): ditto. + + * struct.c (rb_struct_become): ditto. + + * time.c (time_become): ditto. + + * array.c (rb_ary_become): should call rb_ary_modify(). + + * hash.c (rb_hash_become): should call rb_hash_modify(). + + * compar.c (cmp_equal): should not use NUM2LONG(), since <=> may + return bignum. + + * compar.c (cmp_gt, cmp_ge, cmp_lt, cmp_le, cmp_between): ditto. + +Thu Aug 29 23:34:42 2002 KONISHI Hiromasa + + * bcc32/MakeFile.sub (sitearch): add. + +Thu Aug 29 13:36:42 2002 WATANABE Hirofumi + + * io.c (read_all): should use off_t instead of long. + +Thu Aug 29 00:55:55 2002 Nobuyoshi Nakada + + * marshal.c (r_object): yield loaded objects, not intermediates. + (ruby-bugs-ja:PR#296) + +Thu Aug 29 00:06:54 2002 Yukihiro Matsumoto + + * array.c (rb_ary_become): should not free ptr if it's shared. + + * eval.c (rb_alias): prohibit making an alias named "allocate" if + klass is a metaclass. + +Wed Aug 28 23:59:15 2002 Michal Rokos + + * signal.c: remove #ifdef SIGINT for struct signals. + + * variable.c: get rid of fix length buffer in rb_class_path. + +Wed Aug 28 23:34:32 2002 Nobuyoshi Nakada + + * io.c (appendline): data was lost when raw mode. + +Wed Aug 28 22:57:34 2002 Yukihiro Matsumoto + + * string.c (rb_string_value_ptr): StringValuePtr() should never + return NULL pointer. + +Wed Aug 28 19:12:46 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_initialize): RSTRING(mode)->ptr + can be NULL. + + * ext/stringio/stringio.c (strio_ungetc): fix buffer overflow. + +Wed Aug 28 18:19:55 2002 Michal Rokos + + * file.c: fix memory leak in rb_stat_init. + +Wed Aug 28 17:45:03 2002 Nobuyoshi Nakada + + * win32/win32.c (kill): negate pid under Win9x. + +Wed Aug 28 16:36:40 2002 WATANABE Hirofumi + + * configure.in (ar): don't check ar twice. + +Wed Aug 28 15:00:29 2002 Yukihiro Matsumoto + + * string.c (rb_str_delete_bang): should check if str->ptr is 0. + + * string.c (rb_str_squeeze_bang): ditto. + + * string.c (rb_str_count): ditto. + + * string.c (rb_str_lstrip_bang): ditto. + + * string.c (rb_str_rstrip_bang): ditto. + + * string.c (rb_str_intern): ditto. + +Wed Aug 28 11:37:35 2002 NAKAMURA Usaku + + * win32/win32.h: define SIGINT and SIGKILL if not defined. + + * win32/win32.c: remove definition of SIGINT and SIGKILL. + +Tue Aug 27 19:50:27 2002 Nobuyoshi Nakada + + * ruby.c (require_libraries): prevent ruby_sourcefile from GC. + +Tue Aug 27 15:03:35 2002 Yukihiro Matsumoto + + * file.c (rb_find_file): $LOAD_PATH must not be empty. + + * file.c (rb_find_file_ext): ditto. + +Tue Aug 27 02:35:21 2002 Yukihiro Matsumoto + + * range.c (range_eq): class check should be based on range.class, + instead of Range to work with Range.dup. + + * range.c (range_eql): ditto. + +Mon Aug 26 18:17:56 2002 Yukihiro Matsumoto + + * class.c (rb_mod_dup): need to preserve metaclass and flags. + +Mon Aug 26 10:44:18 2002 Tanaka Akira + + * object.c (rb_cstr_to_dbl): had a buffer overrun. + +Sun Aug 25 20:10:32 2002 Wakou Aoyama + + * lib/cgi.rb (CGI#form): fix ruby-bugs-ja:PR#280, add default action. + +Sat Aug 24 15:32:16 2002 Nobuyoshi Nakada + + * eval.c (call_trace_func): restore source file/line, as trace + function installed in required library with -r option can be + called while parsing. (ruby-bugs:PR#372) + + * eval.c (module_setup): unused variable. [ruby-core:00358] + +Sat Aug 24 14:59:02 2002 Yukihiro Matsumoto + + * marshal.c (w_class): integrate singleton check into a function + to follow DRY principle. + + * marshal.c (w_uclass): should check singleton method. + + * object.c (rb_obj_dup): dmark and dfree functions must be match + for T_DATA type. + + * object.c (rb_obj_dup): class of the duped object must be match + to the class of the original. + +Sat Aug 24 13:57:28 2002 Tanaka Akira + + * lib/time.rb (Time.rfc2822, Time#rfc2822): preserve localtimeness. + + * lib/pp.rb: pretty_print_cycled is renamed to pretty_print_cycle. + +Fri Aug 23 23:59:57 2002 Nobuyoshi Nakada + + * eval.c (method_call): check receiver is defined. + + * eval.c (umethod_call): removed. + +Fri Aug 23 23:39:17 2002 Yukihiro Matsumoto + + * re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are + not regular expression metacharacters. + + * time.c (time_s_alloc): use time_free instead of free (null check, + also serves for type mark). + + * time.c (time_s_at): check dfree function too. + +Fri Aug 23 17:06:48 2002 WATANABE Hirofumi + + * configure.in: RUBY_SO_NAME is msvcrt-rubyXX on mswin32/mingw32. + + * configure.in (sitearch): new var. + + * mkconfig.rb, lib/mkmf.rb (sitearch): ditto. + + * win32/Makefile.sub, win32/setup.mak (sitearch): ditto. + + * instruby.rb: ditto. + +Wed Aug 21 16:53:00 2002 Michal Rokos + + * *.c: int, long types cleanup. + + * parse.y: ditto. + + * re.h, regex.h, ruby.h: ditto. + +Wed Aug 21 16:43:19 2002 Yukihiro Matsumoto + + * eval.c (rb_thread_cleanup): should not modify the global + variable curr_thread. + +Wed Aug 21 16:14:26 2002 WATANABE Hirofumi + + * configure.in: set ac_cv_func__setjmp to "no" on Cygwin. + + * configure.in: set ac_cv_func_crypt to "no" on MinGW. + +Tue Aug 20 21:47 2002 KONISHI Hiromasa + + * io.c (rb_io_fread): remove case EPIPE on bcc32 . + + * win32/win32.c (rb_w32_getc): clear EPIPE error on bcc32. + +Tue Aug 20 19:39:03 2002 WATANABE Hirofumi + + * file.c (rb_file_s_expand_path): accept drive letter on Cygwin. + + * file.c (is_absolute_path): ditto. + +Tue Aug 20 12:12:25 2002 Tietew + + * io.c (rb_io_putc): output via rb_io_write(). + +Mon Aug 19 19:01:55 2002 Nobuyoshi Nakada + + * misc/inf-ruby.el (inf-ruby-keys): ruby-send-definition + conflicted with ruby-insert-end. + + * misc/inf-ruby.el (inferior-ruby-mode): compilation-minor-mode. + + * misc/inf-ruby.el (ruby-send-region): send as here document to + adjust source file/line. [ruby-talk:47113], [ruby-dev:17965] + + * misc/inf-ruby.el (ruby-send-terminator): added to make unique + terminator. + +Mon Aug 19 17:08:19 2002 Yukihiro Matsumoto + + * re.c (rb_reg_initialize_m): frozen check should be moved here + from rb_reg_initialize(). + +Mon Aug 19 15:38:44 2002 Yukihiro Matsumoto + + * array.c (sort_2): comparison should be done as signed long. + + * array.c (sort_2): should return int, not VALUE. + +Mon Aug 19 12:38:33 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_save_context, rb_thread_restore_context): + save/restore SEH chain on MS-Windows at thread switch. + [ruby-win32:273] + + * eval.c (win32_get_exception_list, win32_set_exception_list): + added. + +Sat Aug 17 23:01:25 2002 Yukihiro Matsumoto + + * array.c (sort_2): *a - *b may overflow. + +Sat Aug 17 00:25:08 2002 Yukihiro Matsumoto + + * array.c (ary_new): len*sizeof(VALUE) may be a positive value. + + * array.c (rb_ary_initialize): ditto. + +Fri Aug 16 15:58:16 2002 WATANABE Hirofumi + + * io.c (NOFILE): define NOFILE as 64 if not defined. + + * signal.c (sighandler_t): rename to sh_t on dietlibc. + +Fri Aug 16 15:37:04 2002 Nobuyoshi Nakada + + * bignum.c (rb_cstr_to_inum): new decimal and octal string. + +Fri Aug 16 13:17:11 2002 Yukihiro Matsumoto + + * object.c (rb_class_allocate_instance): move singleton class + check from rb_obj_alloc(). + +Fri Aug 16 11:47:24 2002 Nobuyoshi Nakada + + * io.c (rb_io_fread): renamed from io_fread and made extern. + + * marshal.c (r_bytes0): check if successfully read, use + rb_io_fread() instead of fread() to be preemptive. + (ruby-bugs-ja:PR#294, 295) + + * rubyio.h (rb_io_fread): added. + +Fri Aug 16 07:57:26 2002 Nobuyoshi Nakada + + * eval.c (compile_error): must not clear ruby_sourcefile here. + (ruby-bugs:PR#364). + + * eval.c (rb_longjmp): set ruby_sourcefile before making + backtrace. + +Thu Aug 15 20:38:58 2002 Nobuyoshi Nakada + + * eval.c (ruby_current_node) : added to set sourceline on demand. + + * eval.c (error_pos, error_print, rb_longjmp, assign): set source + file/line. + + * eval.c (rb_eval): store current node instead of file/line, and + preserve it at return. + + * eval.c (module_setup): ditto. + + * eval.c (struct thread): store node instead of file/line. + + * eval.c (rb_thread_raise): ditto. + + * intern.h (ruby_current_node): added. + + * intern.h (ruby_set_current_source): added. + + * parse.y (stmt, arg): not fix position of assignment. + + * parse.y (node_assign): ditto. + + * parse.y (yycompile): clear current node. + +Thu Aug 15 00:48:46 2002 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): should not modify frozen Regexp. + +Tue Aug 13 18:33:18 2002 Yukihiro Matsumoto + + * ext/tcltklib/tcltklib.c (ip_init): allocation framework. + +Tue Aug 13 15:32:14 2002 Yukihiro Matsumoto + + * hash.c (rb_hash_replace): should copy ifnone. + + * hash.c (rb_hash_dup): should preserve HASH_PROC_DEFAULT and + HASH_DELETED flags. + + * hash.c (rb_hash_shift): shift from empty hash should not return + its default proc. + + * hash.c (rb_hash_default_proc): new method. [new] + +Tue Aug 13 00:37:11 2002 Yukihiro Matsumoto + + * array.c (rb_ary_aref): no need for Bignum check. + + * array.c (rb_ary_aset): explicit Bignum check removed. + + * numeric.c (fix_aref): normalize bignum before bit-op. + + * bignum.c (rb_big_rand): max may be Bignum zero. + + * bignum.c (rb_cstr_to_inum): should normalize bignums, to avoid + returning fixable bignum value. + + * bignum.c (rb_uint2big): there should be no zero sized bignum. + +Mon Aug 12 23:45:28 2002 Yukihiro Matsumoto + + * ext/extmk.rb.in: extmake() that works properly for both tkutil + (tk/tkutil.so) and digest/sha1. + +Mon Aug 12 22:29:35 2002 Akinori MUSHA + + * ruby.c (set_arg0): Correct the position of #endif. + +Mon Aug 12 17:25:06 2002 Yukihiro Matsumoto + + * hash.c (rb_hash_equal): should check HASH_PROC_DEFAULT too. + +Mon Aug 12 16:15:37 2002 Nobuyoshi Nakada + + * bignum.c (rb_big_cmp): raise for NaN. (ruby-bugs-ja:PR#284). + +Sun Aug 11 09:34:07 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): set line number from all nodes. + + * eval.c (proc_to_s): show source file/line if available. + + * marshal.c (r_object): register TYPE_BIGNUM regardless real type. + +Sat Aug 10 23:47:16 2002 Yukihiro Matsumoto + + * bignum.c (rb_big_cmp): use dbl2big() for Floats, instead of + big2dbl(). + + * bignum.c (Init_Bignum): rb_big_zero_p() removed. There may be + Bignum zero. + +Fri Aug 9 13:31:40 2002 WATANABE Hirofumi + + * ext/Win32API/extconf.rb: check existence of . + +Thu Aug 8 09:37:02 2002 Nobuyoshi Nakada + + * lib/optparse.rb (NilClass): must provide conversion block. + + * lib/optparse.rb (String): ditto. + +Thu Aug 8 00:45:15 2002 Yukihiro Matsumoto + + * eval.c (rb_call0): new argument added for original method name. + preserve original method name in frame->orig_func. + + * eval.c (is_defined): use frame->orig_func, not last_func. + + * eval.c (rb_eval): ditto. + + * eval.c (method_call): supply data->oid also to rb_call0(). + + * object.c (rb_class_allocate_instance): call rb_obj_alloc() when + called from alias, thus invoke original "allocate". + + * eval.c (remove_method): removing allocate from classes should + cause NameError. + +Wed Aug 7 22:12:54 2002 Nobuyoshi Nakada + + * lib/optparse.rb (OptionParser::Completion::convert): returned + all values not first one. + + * lib/optparse.rb (OptionParser::Switch::parse): return values as + is. + + * lib/optparse.rb (OptionParser::order): ditto. + + * lib/optparse/time.rb: prior time.rb. + + * lib/optparse/uri.rb: require standard uri module. thanks to + Minero Aoki. + +Wed Aug 7 09:51:54 2002 Yukihiro Matsumoto + + * hash.c (rb_hash_equal): should check default values. + +Wed Aug 7 08:44:32 2002 Minero Aoki + + * ext/racc/cparse/cparse.c: reduce goto. + +Tue Aug 6 15:19:39 2002 NAKAMURA Usaku + + * string.c (rb_str_rindex): must return -1 if unmatched. + +Mon Aug 5 22:41:18 2002 Minero Aoki + + * MANIFEST: add lib/racc/parser.rb. + + * ext/racc/cparse/cparse.c: code refine. + + * ext/racc/cparse/MANIFEST: add depend. + +Sun Aug 4 22:30:50 2002 Nobuyoshi Nakada + + * ext/curses/curses.c: follow allocation framework. + +Sat Aug 3 21:23:56 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): set constant in cbase scope. + + * eval.c (assign): ditto. + +Fri Aug 2 09:12:32 2002 Minero Aoki + + * ext/strscan/strscan.c: follow allocation framework. + +Fri Aug 2 01:21:52 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (s_recvfrom): update RSTRING len. + +Thu Aug 1 17:47:15 2002 Tachino Nobuhiro + + * parse.y (tokadd_string): ignore backslashed spaces in %w. + +Thu Aug 1 14:14:15 2002 Yukihiro Matsumoto + + * enum.c (enum_find): do not use rb_eval_cmd(); should not accept + a string for if_none. + +Wed Jul 31 14:11:43 2002 Yukihiro Matsumoto + + * eval.c (rb_undef): undef should be done for klass, not ruby_class. + +Tue Jul 30 19:48:51 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-accurate-end-of-block): restrict search + region. + + * misc/ruby-mode.el (ruby-parse-partial): reversed wrong patch. + +Tue Jul 30 17:21:13 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-accurate-end-of-block): incomplete block + caused infinite loop. + + * misc/ruby-mode.el (ruby-parse-partial): returns nil unless + delimiters found. + +Tue Jul 30 15:24:07 2002 WATANABE Hirofumi + + * ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns + the same address always, so allocate string by ruby_strdup. + + * win32/win32.c: prototype; rb_w32_open_osfhandle(). + +Tue Jul 30 09:11:07 2002 Minero Aoki + + * eval.c (rb_thread_join_m): add parameter type declaration. + +Tue Jul 30 08:37:11 2002 Minero Aoki + + * eval.c (localjump_error): add parameter type declaration. + +Mon Jul 29 16:00:54 2002 WATANABE Hirofumi + + * ext/extmk.rb.in: always use File.expand_path for $top_srcdir. + +Sat Jul 27 23:07:52 2002 Yukihiro Matsumoto + + * numeric.c (num_to_int): default to_int implementation for every + numeric class. + +Sat Jul 27 08:09:03 2002 Booker C. Bense + + * re.c (rb_reg_quote): initial part of the string was never copied + to the quoted string. + +Fri Jul 26 23:03:53 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): no need to convert to string twice. + +Fri Jul 26 18:32:37 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-expr-beg): wrong indent at modifiers + after ?. + +Fri Jul 26 16:01:16 2002 WATANABE Hirofumi + + * ext/extmk.rb.in (create_makefile): use Regexp in gsub. + + * sample/mkproto.rb: ditto and fix bug. + +Fri Jul 26 14:31:06 2002 Yukihiro Matsumoto + + * random.c: replace with Mersenne Twister RNG. + +Fri Jul 26 12:14:48 2002 Minero Aoki + + * parse.y (yylex): modify to accept a code like "m (a){...}". + +Thu Jul 25 09:05:02 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-delimiter): include here document. + + * misc/ruby-mode.el (ruby-deep-arglist): skips spaces after + parenthesis when 'space. + + * misc/ruby-mode.el (ruby-imenu-create-index): fix for nested + classes. + + * misc/ruby-mode.el (ruby-accurate-end-of-block): added. scan a + block in the order. + + * misc/ruby-mode.el (ruby-expr-beg): support for here document. + + * misc/ruby-mode.el (ruby-parse-partial): splitted from + ruby-parse-region. + + * misc/ruby-mode.el (ruby-move-to-block): skips RD style comments. + +Wed Jul 24 09:47:42 2002 Yukihiro Matsumoto + + * eval.c (jump_tag_but_local_jump): preserve retval in + LocalJumpError exceptions. + + * parse.y (command): no more check for "super outside of method". + + * eval.c (rb_mod_define_method): should set last_class and + last_func in the block->frame. + +Mon Jul 22 17:23:00 2002 Yukihiro Matsumoto + + * eval.c (error_handle): should handle TAG_THROW as well. + +Fri Jul 19 10:52:32 2002 Yukihiro Matsumoto + + * parse.y (yylex): new decimal notation '0d4567'. + +Thu Jul 18 11:52:02 2002 Shugo Maeda + + * lib/net/ftp.rb (set_socket): new method. + +Thu Jul 18 06:51:24 2002 Minero Aoki + + * parse.y (yylex): fix typo. + +Wed Jul 17 18:41:28 2002 Yukihiro Matsumoto + + * parse.y (yylex): new octal notation '0o777'. + +Mon Jul 15 18:36:42 2002 Yukihiro Matsumoto + + * parse.y (string_content): every string_content node should + return string only. use NODE_EVSTR to coercing. + + * eval.c (rb_eval): NODE_EVSTR support. + +Mon Jul 15 10:35:35 2002 Minero Aoki + + * parse.y (heredoc_identifier): fix typo. + +Sat Jul 13 09:30:04 2002 Nobuyoshi Nakada + + * parse.y (literal_concat_string): wrong optimization. + +Sat Jul 13 01:25:38 2002 Nobuyoshi Nakada + + * lib/resolv.rb (Resolv::DNS::open, close): new. + + * lib/optparse.rb, lib/optparse: import. + +Fri Jul 12 06:34:05 2002 Minero Aoki + + * lib/net/http.rb: rename HTTP.get_uri get_response. + + * lib/net/http.rb: HTTP.get_print accepts URI objects. + + * lib/net/http.rb: HTTP.get had not work with URI objects. + +Fri Jul 12 02:15:58 2002 Nobuyoshi Nakada + + * string.c (rb_str_match): fix for string match. + +Fri Jul 12 00:02:50 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_gets_internal): fixed for record + separator longer than 1. + +Thu Jul 11 17:59:20 2002 Yukihiro Matsumoto + + * re.c (rb_reg_quote): avoid unnecessary string allocation. + + * string.c (get_pat): quote metacharacters before compiling a + string into a regex. + + * string.c (rb_str_split_m): special treatment of strings of size + 1, but AWK emulation. now uses get_pat(). + + * string.c (rb_str_match_m): quote metacharacters. + + * string.c (rb_str_match2): ditto. + +Thu Jul 11 12:59:23 2002 Shugo Maeda + + * lib/resolv.rb: untaint strings read from /etc/hosts and + /etc/resolv.conf to prevent SecurityError when $SAFE==1. + +Thu Jul 11 09:00:43 2002 Yukihiro Matsumoto + + * string.c (rb_str_slice_bang): if there's no corresponding + substring, slice! should return nil without exception. + +Tue Jul 9 20:03:55 2002 Keiju Ishitsuka + + * irb 0.9 + +Sat Jul 6 07:35:02 2002 Jamie Herre + + * array.c (rb_ary_insert): type fixed. + +Fri Jul 5 09:17:00 2002 Yukihiro Matsumoto + + * string.c (rb_str_split_m): accept separator value nil as well. + +Fri Jul 5 08:59:15 2002 Michal Rokos + + * enum.c: Fix bug in enum_sort_by and some code indents + +Fri Jul 5 05:00:40 2002 Wakou Aoyama + + * lib/cgi.rb (CGI#initialize): improvement for mod_ruby. + thanks to Sean Chittenden , Shugo Maeda + + +Fri Jul 5 00:10:09 2002 Yukihiro Matsumoto + + * string.c (rb_str_become): was leaking memory. + +Thu Jul 4 23:43:26 2002 Minero Aoki + + * parse.y: remove useless function str_extend_p(). + +Wed Jul 3 14:26:40 2002 Sean Chittenden + + * lib/net/ftp.rb (get): new method. + + * lib/net/ftp.rb (putt): ditto. + + * lib/net/ftp.rb (binary): ditto. + + * lib/net/ftp.rb (binary=): ditto. + +Wed Jul 3 13:57:53 2002 Sean Chittenden + + * lib/net/ftp.rb (getbinaryfile): the second argument (localfile) + is now optional. + + * lib/net/ftp.rb (gettextfile): ditto. + +Wed Jul 3 13:45:42 2002 Shugo Maeda + + * lib/net/ftp.rb: use &block and yield for speed. + +Wed Jul 3 02:32:31 2002 Wakou Aoyama + + * lib/cgi.rb (CGI#initialize): improvement for mod_ruby. + +Tue Jul 2 14:53:10 2002 Yukihiro Matsumoto + + * class.c (rb_include_module): should not alter other + classes/modules by inclusion. by this fix, local order may not + be preserved for some cases. + + * class.c (include_class_new): module may be T_ICLASS; retrieve + original module information. + +Tue Jul 2 14:13:11 2002 Wakou Aoyama + + * lib/cgi.rb (CGI#header): accept any type as value. + +Sun Jun 30 17:05:29 2002 WATANABE Hirofumi + + * configure.in (seekdir, telldir): add ac_cv_func_telldir=yes, + ac_cv_func_seekdir=yes for MinGW. + +Sat Jun 29 01:43:32 2002 NAKAMURA Usaku + + * io.c (pipe_finalize, pipe_popen): two-way pipe support for win32. + + * win32/win32.c (ChildRecord, FindFreeChildSlot): ditto. + + * win32/win32.c, win32/win32.h (pipe_exec): new function for two-way + pipe support for win32. + + * win32/win32.c, win32/win32.h (FindPipedChildSlot, rb_w32_popen, + rb_w32_pclose): removed functions for two-way pipe support for win32. + +Fri Jun 28 23:49:34 2002 NAKAMURA Usaku + + * pack.c (pack_unpack): change names of local variables because their + names are overlapped. + +Fri Jun 28 17:54:07 2002 Tanaka Akira + + * lib/pp.rb: fix object address. + +Thu Jun 27 23:55:50 2002 NAKAMURA Usaku + + * win32/win32.c (rb_w32_stat): fix buffer overflow. (ruby-bugs:PR#329) + +Thu Jun 27 20:57:45 2002 Tanaka Akira + + * lib/prettyprint.rb, lib/pp.rb: convenience methods added. + +Thu Jun 27 15:22:18 2002 Tanaka Akira + + * lib/prettyprint.rb: re-implemented for incremental output to handle + huge data. API is changed a bit. + + * lib/pp.rb: adapt new pretty printing API. + +Thu Jun 27 08:28:18 2002 Nobuyoshi Nakada + + * parse.y (literal_concat_string): non-string last expression in + #{} was ignored when followed by literal. + +Thu Jun 27 03:42:04 2002 Yukihiro Matsumoto + + * re.c (rb_reg_expr_str): need to process backslashes properly. + +Wed Jun 26 17:33:38 2002 Yukihiro Matsumoto + + * object.c (rb_any_to_a): declare Object#to_a to be obsolete. + + * object.c (rb_Array): do not convert nil into [] automagically. + +Wed Jun 26 15:40:00 2002 Nobuyoshi Nakada + + * parse.y (words, qwords): word list literal rules. + + * parse.y (parse_string): ditto. + + * parse.y (yylex): %W: word list literal with interpolation. [new] + +Tue Jun 25 18:53:34 2002 Nobuyoshi Nakada + + * parse.y (string1, xstring, regexp): moved lex_strnest + initialization to string_contents/xstring_contents. + +Tue Jun 25 19:24:38 2002 KONISHI Hiromasa + + * dln.c: remove definition rb_loaderror(). + +Tue Jun 25 00:34:54 2002 Yukihiro Matsumoto + + * object.c (rb_Integer): use "to_int" instead of + "to_i". [experimental] + + * object.c (nil_to_f): new method. + + * object.c (rb_Integer): Symbols and nil should cause error. + + * object.c (rb_Float): nil should cause error. + +Tue Jun 25 00:21:00 2002 KONISHI Hiromasa + + * dln.c: remark definition rb_loaderror(). + +Tue Jun 25 00:14:07 2002 Nobuyoshi Nakada + + * parse.y (string_dvar): allow back references in interpolation. + +Mon Jun 24 16:32:31 2002 Nobuyoshi Nakada + + * eval.c (rb_eval): NODE_EVSTR is no longer used. + + * eval.c (eval): not enforce to make assigned variables dynamic. + + * parse.y (string): split rules to strings/xstring/regexp to allow + arbitrary statements inside string interpolation. + + * parse.y (here_document): splitted into three phases. + + * parse.y (literall_append, literal_concat): added. + append/concatenate string literals. + + * sample/test.rb (valid_syntax): adjust line number for BEGIN. + + * lib/mkmf.rb (create_makefile): get rid of nested string. + + * lib/mkmf.rb (install_rb): site-install didn't work properly. + +Sun Jun 23 00:19:10 2002 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb, sample/cal.rb, sample/goodfriday.rb: + updated to the new version (based on date2 3.3). + +Sat Jun 22 14:41:33 2002 Guy Decoux + + * ext/socket/socket.c (sock_addrinfo): make all 3 versions of + getaddrinfo happy. [ruby-core:00184] + +Fri Jun 21 18:49:58 2002 Yukihiro Matsumoto + + * parse.y (yylex): __END__ should not be effective within + string literals. + +Thu Jun 20 21:09:37 2002 Nobuyoshi Nakada + + * ext/readline/readline.c (readline_readline): get rid of + libreadline's bug. (ruby-bugs-ja:PR#268) + +Thu Jun 20 17:10:27 2002 WATANABE Hirofumi + + * lib/ftool.rb (BUFSIZE): tuning, set buffer length to 8192. + + * configure.in (__NO_ISOCEXT): add for mingw-runtime 2.0-2. + + * configure.in (__MSVCRT__): removed because it is defined + in the GCC specs. + +Wed Jun 19 14:46:18 2002 WATANABE Hirofumi + + * ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem + is called. + +Wed Jun 19 01:01:13 2002 Yukihiro Matsumoto + + * parse.y (here_document): should be aware of __END__ within here + documents. + +Wed Jun 19 00:50:50 2002 Nobuyoshi Nakada + + * parse.y (yylex): ? followed by successive word characters is + ternary operator not numeric literal. + + * parse.y (yylex): commands after break/next/rescue can take + arguments. (ruby-bugs-ja:PR#265) + +Tue Jun 18 19:20:16 2002 NAKAMURA Usaku + + * win32/mkexports.rb: remove unnecessary exports. (ruby-dev:17418) + +Tue Jun 18 12:50:17 2002 Nobuyoshi Nakada + + * parse.y (yylex): should pushback proper char after '<<'. + + * parse.y (range_op, cond0, cond): get rid of doubled warnings. + + * parse.y (value_expr): reduce recursion level. + + * parse.y (logop): ditto. + +Mon Jun 17 11:11:34 2002 Kazuhiro NISHIYAMA + + * string.c (rb_str_crypt): result need not be tainted always. + +Mon Jun 17 10:51:37 2002 Nobuyoshi Nakada + + * dln.c (dln_load): need to preserve dln_strerror() result, + calling other dl family can clear it. + +Sat Jun 15 22:56:37 2002 Yukihiro Matsumoto + + * parse.y (yylex): obsolete '?'; use '?\s', '?\n', + etc, instead. + +Sat Jun 15 18:51:13 2002 Akinori MUSHA + + * dir.c (glob_helper): Use lstat() instead of stat() so it catches + a dead symlink. Given a dead symlink named "a", Dir.glob("?") + did catch it but Dir.glob("a") somehow didn't. + +Sat Jun 15 01:59:05 2002 Yukihiro Matsumoto + + * parse.y (yylex): no here document after a dot. + + * parse.y (yylex): should have set lex_state after '`'. + + * parse.y (yylex): should have set lex_state properly after + tOP_ASGN. + +Fri Jun 14 21:01:48 2002 KONISHI Hiromasa + + * bcc32/mkexports.rb: insert sleep(1) for win9x. + + * bcc32/configure.bat: change return code LF -> CRLF for win9x. + + * win32/win32.c: fix rb_w32_open_osfhandle() + +Fri Jun 14 15:22:19 2002 Nobuyoshi Nakada + + * parse.y (read_escape): deny zero-width hexadecimal character. + (ruby-bugs-ja:PR#260) + + * parse.y (tokadd_escape): ditto. + + * regex.c (re_compile_pattern): ditto. + +Fri Jun 14 00:49:54 2002 Yukihiro Matsumoto + + * bignum.c (rb_big2dbl): return canonical HUGE_VAL for infinity. + +Thu Jun 13 09:43:37 2002 Yukihiro Matsumoto + + * eval.c (svalue_to_avalue): v may be Qundef. This fix was + suggested by Guy Decoux. + +Thu Jun 13 00:33:49 2002 takuma ozawa + + * hash.c (rb_hash_s_create): use rb_hash_aset() instead of calling + st_insert() directly, to dup&freeze string keys. + +Thu Jun 13 00:12:54 2002 Yukihiro Matsumoto + + * parse.y (yylex): proper error message for "@@0". + + * parse.y (yylex): paren to parse_string() must be zero for + unparenthesized strings. + + * parse.y (str_extend): broken string when unterminated "#{". + + * enum.c (enum_sort_by): had a bug in 1 element enumeration. + +Wed Jun 12 18:04:44 2002 akira yamada + + * uri/common.rb (REGEXP::PATTERN::X_ABS_URI): 'file:/foo' is valid. + + * uri/generic.rb (Generic#xxx=): should return substituted value. + (ruby-dev:16728.) + + * test/generic.rb (test_set_component): added tests for the above + change. + +Wed Jun 12 02:38:00 2002 Nobuyoshi Nakada + + * parse.y (stmt): fix typo. + +Wed Jun 12 01:10:55 2002 Yukihiro Matsumoto + + * parse.y (yylex): 'do' should return kDO_BLOCK on EXPR_ENDARG. + + * parse.y (singleton): "def (()).a end" dumped core. + + * parse.y (range_op): node may be null. + + * parse.y (match_gen): ditto. + +Tue Jun 11 19:20:34 2002 WATANABE Hirofumi + + * configure.in (LIBRUBY): rename to lib$(LIBRUBY_SO).a on Cygwin/MinGW. + + * configure.in, cygwin/GNUmakefile: use dllwrap when --disable-shared + is specified. + +Tue Jun 11 17:12:04 2002 Yukihiro Matsumoto + + * parse.y (arg): void value check for "..", "...", "!", and "not". + + * parse.y (match_gen): void value check for "=~". + + * parse.y (value_expr): check NODE_AND and NODE_OR recursively. + + * parse.y (cond0): void value check added for conditionals. + +Tue Jun 11 13:18:47 2002 Shugo Maeda + + * lib/net/ftp.rb (noop): new method. + + * lib/net/ftp.rb (site): ditto. + +Tue Jun 11 13:15:41 2002 NAKAMURA Usaku + + * bcc32/Makefile.sub: set PROCESSOR_LEVEL to 6 if it's too big value. + + * win32/Makefile.sub: ditto. + +Tue Jun 11 12:37:46 2002 KONISHI Hiromasa + + * bcc32/configure.bat fix. + +Tue Jun 11 10:18:23 2002 KONISHI Hiromasa + + * new platform [bccwin32] merged. + - create new folder bcc32 + - modify any files for bccwin32 + error.c, file.c, hash.c, io.c, instruby.rb, + ext/extmk.rb.in, + lib/mkmf.rb, lib/ftools.rb, + ext/digest/defs.h, + ext/dl/depend, ext/dl/dl.c, ext/dl/sym.c, ext/dl/extconf.rb, + ext/socket/extconf.rb, + ext/pty/extconf.rb, + ext/tcltklib/extconf.rb + ext/Win32API/Win32API.c, + win32/dir.h, win32/win32.c, win32/win32.h, win32/resource.rb + +Mon Jun 10 19:02:19 2002 Nobuyoshi Nakada + + * numeric.c (fix_lshift): negative shift count means right shift. + (ruby-bugs-ja:PR#248) + + * numeric.c (fix_rshift): return -1 when left side operand is + negative. (ruby-bugs-ja:PR#247) + + * parse.y (yylex): `0_' should be an error. (ruby-bugs-ja:PR#249) + +Mon Jun 10 01:53:54 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): ruby_frame->last_func may be null, if it's + called outside of a method. + + * parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS. + + * parse.y (arg): unnecessary negative tPOW treatment. + + * parse.y (tokadd_escape): wrong backslash escapement. + +Sun Jun 9 17:40:41 2002 Takaaki Tateishi + + * ext/dl: change the callback mechanism. + +Sat Jun 8 00:48:38 2002 Yukihiro Matsumoto + + * parse.y (stmt,arg): too much void value check. + + * parse.y (stmt,arg): need to check void value on rules which does + not use node_assign(). + +Thu Jun 6 19:50:39 2002 KONISHI Hiromasa + + * sample/biorhythm.rb (getPosiiton,etc) + fix at changing Date module ( Date is changed Fixnum to Rational ) + +Thu Jun 6 17:42:39 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (ipaddr): need not to taint hostnames. + +Thu Jun 6 12:04:30 2002 NAKAMURA Usaku + + * win32/Makefile.sub (config.status): use sub! instead of []= because + []= causes exception. + +Thu Jun 6 11:42:15 2002 Nobuyoshi Nakada + + * lib/thread.rb (Queue::pop): get rid of race condition. + +Wed Jun 5 01:56:47 2002 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: Stop the running zombi-eventloop when + mainloop_watchdog is killed. + +Tue Jun 4 23:09:24 2002 Yukihiro Matsumoto + + * range.c (range_include): should be based on "<=>", whereas + member? still is based on "each". + + * range.c (range_min,range_max): redefine methods based on "<=>". + +Tue Jun 4 18:28:37 2002 WATANABE Hirofumi + + * ext/socket/extconf.rb: The IPv6 stack of Cygwin is still incomplete. + + * ext/Win32API/extconf.rb: refactoring. + +Tue Jun 4 07:03:33 2002 Hidetoshi NAGAI + + * ext/tk/lib/tkfont.rb: Fix bugs on TkFont.init_widget_font for Tk8.x. + + * ext/tk/lib/tkafter.rb: Add self to 1st argument of interval- + and loop-proc + TkAfter#current_interval returns an interval (sleep) time value + TkAfter#current_args returns an array of arguments + TkAfter#return_value returns a return value of last loop-proc + + * ext/tk/lib/tk*.rb: Allow to use Symbols for parameters. + + * ext/tk/lib/tkcanvas.rb: (TkcItem) Add 'coords' parameter to the + canvas item constructor (for new notation of constructor). + + * ext/tcltklib/tcltklib.c: New 'mainloop' and 'mainloop_watchdog'. + + * ext/tk/lib/tk.rb: (Tk.restart) Add 'app-name' paramater and + 'use' parameter. + + * ext/tk/lib/tk.rb: Add new parameter 'widgetname' to the widget + constructor to support effective use of Resource Database. + + * ext/tk/lib/tk.rb: TkOption::get always returns a tainted string. + +Tue Jun 4 00:45:50 2002 Nobuyoshi Nakada + + * ext/socket/addrinfo.h: typo. + + * ext/socket/getaddrinfo.c (gai_strerror): make literals const. + + * ext/socket/socket.c (init_inetsock): ensures resources are + freed at exceptions. + + * ext/socket/socket.c (init_unixsock): ditto. + + * ext/socket/socket.c (udp_connect): ditto. + +Mon Jun 3 20:39:51 2002 Masaki Suketa + + * ext/win32ole/extconf.rb : change PLATFORM with RUBY_PLATFORM. + +Mon Jun 3 07:07:07 2002 Nobuyoshi Nakada + + * parse.y (here_document): check if identifier is terminated. + (ruby-bugs-ja:PR#239) + + * parse.y (yylex): should pushback proper char after '**'. + (ruby-bugs-ja:PR#240) + +Mon Jun 3 05:56:17 2002 Yukihiro Matsumoto + + * string.c (rb_str_aset): should raise error if an indexing string + is not found in the receiver. + + * sprintf.c (rb_f_sprintf): "%d" should convert objects into + integers using Integer(). + +Sat Jun 1 19:20:07 2002 Masaki Suketa + + * ext/win32ole: merge from rough. + +Fri May 31 17:11:42 2002 Yukihiro Matsumoto + + * lib/tempfile.rb (Tempfile::size): added. + +Thu May 30 12:52:42 2002 Yukihiro Matsumoto + + * range.c (range_step): iteration done using "+" if elements are + Numeric. Otherwise using "succ". + + * range.c (range_each): iteration done using "succ". If the + elements does not respond to "succ", raise TypeError. As a + result, all Enumerable methods, e.g. collect, require elements + to respond to "succ". + + * range.c (range_member): comparison done using "each", if + elements are non-Numeric or no-"succ" objects. Otherwise + compare using "<=>". + + * range.c (Init_Range): remove "size" and "length". + +Thu May 30 09:16:36 2002 Wakou Aoyama + + * lib/cgi.rb: if StringIO is usable then use it. + +Wed May 29 18:55:47 2002 KONISHI Hiromasa + + * function renames my* and win32_* to rb_w32_* in win32/win32.c + fixed files win32/win32.c, win32/win32.h, win32/dir.h, + hash.c, rubysig.h, signal.c, ext/socket/socket.c + +Wed May 29 17:32:55 2002 WATANABE Hirofumi + + * time.c (tmcmp, search_time_t): activate unless HAVE_TIMEGM. + +Wed May 29 13:45:15 2002 Wakou Aoyama + + * lib/cgi.rb: not use const if GET, HEAD. check multipart form head. + +Tue May 28 17:56:02 2002 Sean Chittenden + + * parse.y: yyparse #defines moved from intern.h + + * ruby.c (proc_options): access prefixed "ruby_yydebug". + + * applied modifies to pacify some of gcc -Wall warnings. + +Tue May 28 14:07:00 2002 Yukihiro Matsumoto + + * parse.y (arg): no more ugly hack for "**", so that "-2**2" to be + parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed + as "-(2**2)". + + * parse.y (yylex): '-2' to be literal fixnum. [new] + +Tue May 28 12:13:37 2002 Nobuyoshi Nakada + + * eval.c (scope_node): trick to keep the node has a scope. + + * eval.c (rb_eval): NODE_EVSTR: write back local_tbl to the node. + + * eval.c (rb_eval): NODE_SCOPE: hold the scope node in ruby_scope. + + * eval.c (module_setup): ditto. + + * eval.c (rb_call0): ditto. + + * node.h (NEW_DASGN, NEW_DASGN_CURR): remove surplus semicolons. + +Fri May 24 09:06:29 2002 Yukihiro Matsumoto + + * time.c (time_arg): nil test against v[6] (usec). + +Thu May 23 16:39:21 2002 Nobuyoshi Nakada + + * ruby.c (proc_options): option parsing problem. + (ruby-bugs-ja:PR#233) + +Thu May 23 09:13:56 2002 Yukihiro Matsumoto + + * ruby.c (proc_options): removed "-*-" support for #! line. + + * io.c (rb_io_s_sysopen): new method to get a raw file + descriptor. [new] + + * ext/socket/socket.c (tcp_sysaccept): new method to return an + accepted socket fd (integer). [new] + + * ext/socket/socket.c (unix_sysaccept,sock_sysaccept): ditto. + +Wed May 22 21:26:47 2002 Nobuyoshi Nakada + + * ruby.c (proc_options): -T consumes digits only. + +Wed May 22 20:18:31 2002 WATANABE Hirofumi + + * configure.in: need not link vsnprintf.o on MinGW. + +Wed May 22 18:34:23 2002 Minero Aoki + + * parse.y (yylex): Here-document label ate '-'. + +Tue May 21 13:25:18 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-keywords): symbols end with + '_'. + +Tue May 21 04:48:37 2002 Sean Chittenden + + * lib/cgi-lib.rb: Checking for constant MOD_RUBY instead of + environment variable. Remove a mod_ruby warning and use + Apache::request.headers_out[] instead. + +Tue May 21 01:16:46 2002 Nobuyoshi Nakada + + * parse.y (bodystmt): ensure clause was executed on else clause + without rescue clause. + +Tue May 21 00:20:25 2002 Takaaki Tateishi + + * ext/dl/ptr.c: rename PtrData::alloc to PtrData::malloc. + + * ext/dl/lib/dl/struct.c: rename Struct#alloc to Struct#malloc. + +Mon May 20 14:29:14 2002 Yukihiro Matsumoto + + * object.c (Init_Object): should do exact match for Module#==. + + * compar.c (cmp_eq): returns 'false' if <=> returns 'nil'. + + * compar.c (cmp_gt,cmp_ge,cmp_lt,cmp_le,cmp_between): ditto. + +Mon May 20 13:28:52 2002 Nobuyoshi Nakada + + * io.c (rb_io_clone): writing stream was not copied properly. + +Sat May 18 21:38:11 2002 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb, lib/parsedate.rb: + updated to the new version (based on date2 3.2.1). + +Sat May 18 21:18:00 2002 NAKAMURA Usaku + + * win32/Makefile.sub (config.h): add VC++4/5 support about noreturn + directive. + +Sat May 18 02:16:41 2002 Yukihiro Matsumoto + + * pack.c (pack_pack): should propagate taintedness. + + * pack.c (pack_unpack): ditto. + +Fri May 17 16:16:19 2002 WATANABE Hirofumi + + * sample/test.rb: use eval instead of './miniruby -c', + in order to check a syntax error. + +Thu May 16 14:46:34 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_select): cleanup conditional compilation. + +Wed May 15 06:13:35 2002 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): need to preserve errno before + calling rb_trap_exec(). + + * regex.c (calculate_must_string): a bug in charset/charset_not + parsing. + +Tue May 14 18:17:44 2002 Nobuyoshi Nakada + + * win32/Makefile.sub: config.h inlined. and catch up with the + latest change. + + * win32/config.h.in: no longer used. + +Tue May 14 14:49:05 2002 WATANABE Hirofumi + + * gc.c (is_pointer_to_heap): avoid GCC 3.1 warnings. + + * missing/strftime.c (timezone): it should take no argument on Cygwin. + +Tue May 14 03:07:35 2002 Yukihiro Matsumoto + + * eval.c (rb_clear_cache_by_class): new function. + + * eval.c (set_method_visibility): should have clear cache for + updated visibility. + +Mon May 13 14:38:33 2002 WATANABE Hirofumi + + * djgpp/config.hin, djgpp/config.sed: catch up with the latest change. + +Mon May 13 01:59:55 2002 Yukihiro Matsumoto + + * numeric.c (flo_to_s): default format precision to be "%.16g". + + * util.c (ruby_strtod): use own strtod(3) implementation to avoid + locale hell. Due to this change "0xff".to_f no longer returns 255.0 + +Sun May 12 03:01:08 2002 WATANABE Hirofumi + + * missing.h: add for missing/*.c. + + * ruby.h: add `#include "missing.h"'. + + * Makefile.in: add the dependency of missing.h by gcc -MM. + + * MANIFEST: add missing.h + +Sat May 11 23:24:52 2002 Takaaki Tateishi + + * ext/dl: enable dl's stack emulation for constructing function call. + +Sat May 11 10:52:09 2002 Nobuyoshi Nakada + + * dir.c (glob_helper): remove escaping backslashes. + +Sat May 11 02:46:43 2002 Yukihiro Matsumoto + + * eval.c (avalue_to_yvalue): new function to distinguish yvalue + (no-arg == Qundef) from svalue (no-arg == Qnil). + + * eval.c (rb_yield_0): use avalue_to_yvalue(). + + * eval.c (assign): warn if val == Qundef where it means rhs is + void (e.g. yield without value or call without argument). + +Fri May 10 19:00:47 2002 Nobuyoshi Nakada + + * parse.y (here_document): preserve line number begins here + document. + +Fri May 10 01:55:44 2002 Nobuyoshi Nakada + + * eval.c (rb_thread_join): added an argument to limit time to wait + the thread. + + * eval.c (rb_thread_join_m): new. and added optional argument. + +Wed May 8 23:48:40 2002 Yukihiro Matsumoto + + * parse.y (value_expr): need not to warn for WHILE and UNTIL, + since they can have return value (via valued break). + +Tue May 7 17:13:40 2002 WATANABE Hirofumi + + * configure.in: forgot to add '-Wl,' to the gcc option on Cygwin/MinGW. + +Tue May 7 15:41:33 2002 Nobuyoshi Nakada + + * ext/iconv/iconv.c (iconv_try): should initialize exceptions + properly. (ruby-bugs-ja:PR#232) + +Tue May 7 15:28:03 2002 Minero Aoki + + * eval.c (rb_yield_0): The destination of the goto jump was wrong. + +Tue May 7 09:17:51 2002 Minero Aoki + + * eval.c (superclass): undesirable "unexpected return" when the + superclass is not a Class. + +Sun May 5 06:53:45 2002 Akinori MUSHA + + * lib/mkmf.rb: exclude topdir from the system configuration + section and prevent it from being overridden. + +Fri May 3 20:19:00 2002 WATANABE Hirofumi + + * configure.in: add #include in AC_CHECK_DECLS(). + + * win32/config.h.in: define HAVE_DECL_SYS_NERR. + +Thu May 2 23:42:40 2002 Yukihiro Matsumoto + + * re.c (rb_reg_s_quote): # also should be quoted. + +Thu May 2 18:27:13 2002 WATANABE Hirofumi + + * ext/extmk.rb.in, lib/mkmf.rb: use 'do...end' instead of '{}' for + Borland make. + +Thu May 2 08:01:56 2002 Chris Thomas + + * error.c: use HAVE_DECL_SYS_NERR instead of platform names. + +Tue Apr 30 09:23:05 2002 Yukihiro Matsumoto + + * numeric.c (num_step): better iteration condition for float + values; suggested by Masahiro TANAKA . + +Tue Apr 30 05:59:42 2002 Michal Rokos + + * range.c (range_step): step (for Range#step method) <= 0 makes no + sense, thus ArgError will be raised. + + * range.c (range_each): Range#each method is special case for + Range#step(1) + +Mon Apr 29 18:46:42 2002 Yukihiro Matsumoto + + * file.c (rb_find_file): load must be done from an absolute path if + $SAFE >= 4. + +Sun Apr 28 17:01:56 2002 WATANABE Hirofumi + + * win32/win32.c (insert): fix prototype for ANSI C. + +Fri Apr 26 13:47:15 2002 Yukihiro Matsumoto + + * enum.c (enum_partition): new method. [new] + +Fri Apr 26 13:41:00 2002 Yukihiro Matsumoto + + * re.c (rb_reg_s_quote): quote whitespaces for /x cases. + +Fri Apr 26 06:48:23 2002 Takaaki Tateishi + + * ext/dl/ptr.c (cary2ary): missing break in switch statements. + +Fri Apr 26 09:35:47 2002 Nobuyoshi Nakada + + * eval.c (rb_proc_new): make Proc from C function. [new] + + * intern.h (rb_proc_new): prototype. + +Wed Apr 24 14:56:46 2002 Nobuyoshi Nakada + + * eval.c (proc_to_proc): return self. [new] + + * eval.c (block_pass): no need to convert if block is Proc. + +Wed Apr 24 14:21:41 2002 WATANABE Hirofumi + + * configure.in: set size of the initial stack from + 2MB to 32MB on MinGW/Cygwin. + +Wed Apr 24 14:06:35 2002 Yukihiro Matsumoto + + * numeric.c (num_step): try to reduce residual on Float operations. + +Wed Apr 24 06:48:31 2002 Koji Arai + + * io.c (rb_io_mode_flags): both 'r+b' and 'rb+' should be allowed. + + * io.c (rb_io_mode_modenum): ditto. + +Wed Apr 24 01:16:14 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_mark): must check if ptr is NULL + first. [ruby-talk:38873] + + * lib/mkmf.rb (create_makefile): should print depend file when + make is other than nmake. + +Wed Apr 24 00:37:12 2002 NAKAMURA Usaku + + * ext/extmk.rb.in (create_makefile): use `{$(srcdir)}' directive instead + of `$(srcdir)/' when including depend file. + + * lib/mkmf.rb (create_makefile): add `{$(srcdir)}' when including depend + file. + +Tue Apr 23 12:58:18 2002 Yukihiro Matsumoto + + * gc.c (rb_memerror): rename from mem_error, and exported. + + * gc.c (Init_GC): pre-allocate NoMemoryError instance. + + * object.c (convert_type): error message changed from "failed to + convert" to "cannot convert", since it does not try to convert + if an object does not respond to the converting method. + +Mon Apr 22 09:31:30 2002 Yukihiro Matsumoto + + * eval.c (block_pass): convert Method to Proc using + rb_check_convert_type(). + + * object.c (rb_check_convert_type): always convert T_DATA + + * eval.c (rb_thread_cleanup): should not terminate main_thread by + Fatal error. + + * regex.c (is_in_list): need to not exclude NUL and NEWLINE. + +Sat Apr 20 00:19:13 2002 Yukihiro Matsumoto + + * re.c (rb_reg_expr_str): wrong backslash escapement. + + * re.c (rb_reg_expr_str): do not escape embedded space + characters. + +Fri Apr 19 22:03:40 2002 NAKAMURA Usaku + + * win32/Makefile.sub: add -DNT to $CFLAGS instead of $CPPFLAGS. + + * win32/setup.mak: ditto. + +Fri Apr 19 17:24:22 2002 Yukihiro Matsumoto + + * marshal.c (w_object): T_DATA process patch from Joel VanderWerf + . This is temporary hack; it remains + undocumented, and it will be removed when marshaling is + re-designed. + + * marshal.c (r_object): ditto. + +Fri Apr 19 17:10:55 2002 Yukihiro Matsumoto + + * numeric.c (num_step): Integer#step is moved to Numeric#step; + Fixnum#step is merged into this method. + + * numeric.c (int_dotimes): Fixnum#times is merged. + + * numeric.c (int_upto): Fixnum#upto is merged. + + * numeric.c (int_downto): Fixnum#downto is merged. + +Fri Apr 19 16:22:55 2002 WATANABE Hirofumi + + * ext/socket/extconf.rb: include , on _WIN32. + + * win32/win32.c: include on __MINGW32__. + + * configure.in: cleanup for autoconf 2.5x. + + * configure.in: use gcc -shared instead of dllwrap on Cygwin/MinGW. + + * ext/extmk.rb, lib/mkmf.rb: get rid of "--def=". + +Fri Apr 19 14:57:44 2002 Nobuyoshi Nakada + + * re.c (rb_reg_to_s): remove redundant shy group. + +Fri Apr 19 01:08:20 2002 Yukihiro Matsumoto + + * eval.c (rb_thread_cleanup): current thread may be THREAD_STOPPED, + for example when terminated from signal handler. + +Thu Apr 18 19:03:15 2002 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): remove /p support. + + * regex.h: ditto. + + * parse.y (parse_regx): ditto. + +Thu Apr 18 17:01:43 2002 Takaaki Tateishi + + * ext/dl/ptr.c (rb_dlptr_cast): removed. + +Thu Apr 18 17:01:43 2002 Tanaka Akira + + * re.c (rb_reg_to_s): new function for Regexp#to_s. + +Wed Apr 17 23:55:34 2002 Akinori MUSHA + + * ext/Setup*, ext/bigfloat/*: Back out the import of BigFloat in + favor of its forthcoming successor, BigDecimal. + +Wed Apr 17 16:53:33 2002 Yukihiro Matsumoto + + * re.c (rb_reg_expr_str): should treat backslash specially in + escaping. + +Wed Apr 17 08:16:41 2002 Michal Rokos + + * io.c: complete off_t handling; missing argument for + fptr_finalize(); polished rb_scan_args call. + +Wed Apr 17 00:01:59 2002 Michal Rokos + + * dir.c: wrap multi-statement macro by do { } while (0) + + * eval.c, numeric,c, sprintf.c, util.c: ditto. + +Tue Apr 16 08:59:50 2002 Nobuyoshi Nakada + + * eval.c (assign): convert mrhs to mvalue. + +Mon Apr 15 18:12:57 2002 Yukihiro Matsumoto + + * bignum.c (rb_big_eq): check `y == x' if y is neither Fixnum, + Bignum, nor Float. + +Mon Apr 15 09:27:31 2002 Yukihiro Matsumoto + + * pack.c (pack_unpack): should treat 'U' in character unit, not in + byte unit. + + * error.c (exc_initialize): should clear backtrace information. + +Sat Apr 13 23:42:43 2002 Yukihiro Matsumoto + + * io.c (rb_io_fptr_cleanup): should close IO created by IO.new(fd). + + * rubyio.h: remove FMODE_FDOPEN + +Fri Apr 12 12:54:04 2002 NAKAMURA Usaku + + * win32/Makefile.sub: use missing/acosh.c. + + * win32/config.h.in: define HAVE_COSH, HAVE_SINH, and HAVE_TANH. + +Fri Apr 12 02:58:55 2002 Koji Arai + + * struct.c (rb_struct_select): fix typo. + +Fri Apr 12 00:34:17 2002 Nobuyoshi Nakada + + * MANIFEST (missing/acosh.c): added. + + * Makefile.in (missing/acosh.c): ditto. + + * Makefile.in (missing/fileblocks.c): ditto. + + * configure.in (AC_REPLACE_FUNCS): check acosh() on behalf of + inverse hyperbolic functions, asinh() and atanh(). + + * missing/acosh.c: added for acosh(), asinh() and atanh(). + +Thu Apr 11 20:01:44 2002 Masahiro Tomita + + * io.c (io_write): check error if written data is less than + specified size to detect EPIPE. + +Thu Apr 11 19:10:37 2002 WATANABE Hirofumi + + * io.c (remain_size): IO#read returns "" if file.size == 0. + + * random.c (rand_init): add check for initstate(3). + + * configure.in: ditto. + +Thu Apr 11 09:31:19 2002 Takaaki Tateishi + + * ext/dl/ptr.c: raise() -> rb_raise(). (Thanks Tetsuya Watanabe) + + * ext/dl/sym.c: ditto. + +Thu Apr 11 07:57:48 2002 Michal Rokos + + * eval.c (assign): ruby_verbose should be surrounded by RTEST(). + + * object.c (rb_str2cstr): ditto. + + * parse.y (void_expr): ditto. + + * parse.y (void_stmts): ditto. + + * variable.c (rb_ivar_get): ditto. + + * variable.c (rb_cvar_set): ditto. + + * variable.c (rb_cvar_get): ditto. + +Thu Apr 11 07:02:31 2002 Takaaki Tateishi + + * ext/dl: Add dl.txt instead of README and README.html. + +Thu Apr 11 01:55:52 2002 Wakou Aoyama + + * lib/cgi/session.rb: support for multipart form. + +Wed Apr 10 18:42:23 2002 Tachino Nobuhiro + + * dir.c (glob_helper): should have proceed link when link->path + was non existing symbolic link. + +Wed Apr 10 17:30:19 2002 Yukihiro Matsumoto + + * variable.c (rb_obj_remove_instance_variable): raise NameError if + specified instance variable is not defined. + + * variable.c (generic_ivar_remove): modified to check ivar + existence. + +Wed Apr 10 14:16:45 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-keywords): fontify symbols for + unary operators and aset. + +Tue Apr 9 13:40:31 2002 Nobuyoshi Nakada + + * lib/mkmf.rb (try_link0): need expand macro in command, sync with + ext/extmk.rb.in. + + * lib/mkmf.rb (try_cpp): ditto. + + * lib/mkmf.rb (egrep_cpp): ditto. + +Tue Apr 9 12:44:59 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (check_modifiable): performance + improvement. avoid calling rb_str_modify() twice. + + * ext/stringio/stringio.c (strio_ungetc): ditto. + + * ext/stringio/stringio.c (strio_putc): ditto. + + * ext/stringio/stringio.c (strio_write): ditto, and use + rb_str_cat() as possible. + +Tue Apr 9 05:17:48 2002 Akinori MUSHA + + * re.c (match_select): fix index references and make + MatchData#select actually work. + +Tue Apr 9 00:20:52 2002 Yukihiro Matsumoto + + * file.c (rb_file_s_extname): new method based on the proposal + (and patch) from Mike Hall. [new] + +Mon Apr 8 04:50:51 2002 Nobuyoshi Nakada + + * eval.c (error_handle): default to 1 unless status is set. + + * eval.c (ruby_options): guard error_handle() with PROT_NONE. + + * eval.c (ruby_stop): ditto. + +Mon Apr 8 01:22:24 2002 Yukihiro Matsumoto + + * math.c (math_acosh): added. [new] + + * math.c (math_asinh): ditto. + + * math.c (math_atanh): ditto. + + * struct.c (rb_struct_each_pair): method added. [new] + +Sat Apr 6 02:04:49 2002 Guy Decoux + + * class.c (rb_singleton_class): wrong condition; was creating + unnecessary singleton class. + +Sat Apr 6 01:09:41 2002 Yukihiro Matsumoto + + * sprintf.c (remove_sign_bits): simplifies the condition. + + * bignum.c (get2comp): calculate proper carry over. + +Fri Apr 5 05:07:28 2002 Takaaki Tateishi + + * ext/dl: Add dl/struct.rb. + +Thu Apr 4 14:08:52 2002 Takaaki Tateishi + + * ext/dl/lib/dl/import.rb: Get rid of ineffective + encoding/decoding procedures. + +Thu Apr 4 01:08:23 2002 Yukihiro Matsumoto + + * numeric.c (int_step): step may be a float less than 1. + +Wed Apr 3 20:42:34 2002 Takaaki Tateishi + + * ext/dl: Merge Nakada's patch. + + * ext/dl/dl.h: define StringValuePtr for ruby-1.6. + +Wed Apr 3 15:37:24 2002 Takaaki Tateishi + + * ext/dl: Add dl/types.rb. + +Wed Apr 3 01:54:10 2002 Nobuyoshi Nakada + + * ext/extmk.rb.in (enable_config): follow lib/mkmf.rb. + +Tue Apr 2 19:59:13 2002 Takaaki Tateishi + + * ext/dl: Merge from rough. + +Tue Apr 2 15:17:54 2002 Yukihiro Matsumoto + + * Makefile.in (CPPFLAGS): remove @includedir@. + + * lib/mkmf.rb (create_makefile): ditto. + + * ext/extmk.rb.in (create_makefile): ditto. + +Tue Apr 2 15:09:05 2002 WATANABE Hirofumi + + * ext/socket/socket.c (sock_addrinfo): should clear addrinfo hints. + +Mon Apr 1 23:48:12 2002 Takaaki Tateishi + + * lib/mkmf.rb: install any files using $INSTALLFILES. + (see also [ruby-dev:16683]) + +Mon Apr 1 17:25:50 2002 Yukihiro Matsumoto + + * io.c (rb_io_fptr_cleanup): need flush even when io will not be + closed. + + * io.c (rb_io_initialize): was calling wrong function + rb_io_mode_flags(). + +Mon Apr 1 16:52:00 2002 Nobuyoshi Nakada + + * ext/sdbm/init.c (each_pair): moved prototype before the + definition. + + * ext/racc/cparse/cparse.c (call_scaniter): ditto. + +Mon Apr 1 15:11:40 2002 NAKAMURA Usaku + + * ext/racc/cparse/cparse.c: prototype; call_scaniter(). + + * ext/sdbm/init.c: prototype; each_pair(). + + * ext/tcltklib/tcltklib.c: prototypes; _timer_for_tcl() and ip_ruby(), + Nobu's patch at [ruby-dev:14483]. + +Mon Apr 1 10:56:40 2002 Yukihiro Matsumoto + + * re.c (match_setter): it's OK to assign nil to $~. + +Mon Apr 1 03:55:46 2002 Yukihiro Matsumoto + + * io.c (rb_io_fptr_cleanup): do not close IO created by for_fd(). + + * io.c (rb_io_initialize): mark IO created by for_fd + + * ext/socket/socket.c (bsock_s_for_fd): ditto. + +Fri Mar 29 20:21:58 2002 Nobuyoshi Nakada + + * lib/mkmf.rb (create_makefile): default FLAGS to empty strings. + +Fri Mar 29 16:36:52 2002 Nobuyoshi Nakada + + * lib/mkmf.rb (arg_config): should use Shellwords::shellwords like + ext/extmk.rb.in. + + * lib/mkmf.rb (enable_config): default had priority over command + line options and configure_args. + + * lib/mkmf.rb: support autoconf 2.53 style variables from + environment. + + * lib/mkmf.rb: add directory options. + +Fri Mar 29 15:49:29 2002 Usaku Nakamura + + * win32/README.win32: follow recent changes. + +Fri Mar 29 14:44:05 2002 Yukihiro Matsumoto + + * io.c (io_fflush): DRY patch from /Christoph applied. + +Thu Mar 28 18:58:13 2002 Usaku Nakamura + + * win32/Makefile.sub (config.status): reflect user defined $CC in + config.status. + +Thu Mar 28 18:03:51 2002 Minero Aoki + + * ext/strscan/strscan.c: add taint check. + + * ext/strscan/strscan.c: #getch/#get_byte should set regexp + registers. + + * ext/strscan/strscan.c: remove useless #include directive. + + * ext/strscan/strscan.c: refactor struct strscanner. + +Thu Mar 28 14:51:38 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_addrinfo): should specify socktype + from outside. + +Wed Mar 27 17:04:30 2002 Yukihiro Matsumoto + + * io.c (argf_binmode): should call next_argv() to initialize ARGF. + + * io.c (argf_filename): ditto. + + * io.c (argf_file): ditto. + +Wed Mar 27 14:47:32 2002 WATANABE Hirofumi + + * io.c (READ_DATA_PENDING): configure.in has supported for uClibc, + so remove uClibc stuff. + +Wed Mar 27 13:14:43 2002 Yukihiro Matsumoto + + * io.c (rb_io_sysseek): new method based on a patch from Aristarkh + A Zagorodnikov . [new] + + * io.c (READ_DATA_PENDING): use !feof(fp) for default behavior. + +Tue Mar 26 20:28:50 2002 Minero Aoki + + * lib/net/http.rb: HTTP.get accepts URI. + + * lib/net/http.rb: new method HTTP.get_uri. + + * lib/net/http.rb: add some HTTP 1.1 response codes. + +Tue Mar 26 20:25:28 2002 Minero Aoki + + * doc/net/protocol.rd.ja, smtp.rd.ja, pop.rd.ja: removed. + + * MANIFEST: remove doc/net/* entries. + +Tue Mar 26 18:45:15 2002 WATANABE Hirofumi + + * configure.in (FILE_READPTR): check bufread instead of bufend + for uClibc. + + * ext/extmk.rb.in (arg_config): should use Shellwords::shellwords. + +Tue Mar 26 01:56:33 2002 Yukihiro Matsumoto + + * parse.y (primary): while/until statement modifiers to "begin" + statement now work as "do .. while" even when begin statement + has "rescue" or "ensure" [new]. + + * parse.y (bodystmt): rescue/ensure is allowed at every bodies, + i.e. method bodies, begin bodies, class bodies[new], and module + bodies[new]. + +Mon Mar 25 22:10:04 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_addrinfo): should specify ai_socktype + for getaddrinfo hints. + +Mon Mar 25 17:18:48 2002 Nobuyoshi Nakada + + * dir.c (rb_push_glob): local variable 'maxnest' was + uninitialized. + +Mon Mar 25 16:53:30 2002 Yukihiro Matsumoto + + * eval.c (rb_f_abort): embed aborting message into exception + object [new]. + + * eval.c (terminate_process): utility function for exit and abort. + +Tue Mar 26 14:04:47 2002 okabe katsuyuki + + * win32/mkexports.rb: support VC++.NET. + +Tue Mar 26 14:00:17 2002 Akinori MUSHA + + * ext/bigfloat/bigfloat.c: Fix the initializer's function name + according to the new library name. (pointed out by nobu) + +Tue Mar 26 11:12:01 2002 Minero Aoki + + * lib/fileutils.rb: new file. + +Tue Mar 26 03:23:50 2002 Tanaka Akira + + * lib/pp.rb (pp): return nil like p. + +Tue Mar 26 01:48:01 2002 Akinori MUSHA + + * ext/bigfloat/extconf.rb: Downcase the library name. (BigFloat.so + -> bigfloat.so) + + * ext/bigfloat/bigfloat.c (BigFloat_inspect): Alter the inspect + format not to look like an array. (pointed out by akr) + + * ext/bigfloat/bigfloat.c (BigFloat_hash): Implement BigFloat#hash. + + * ext/bigfloat/bigfloat.c (BigFloat_dump, BigFloat_load): + Support marshaling. + +Tue Mar 26 00:38:11 2002 Tanaka Akira + + * configure.in (FILE_READPTR): check _p for 4.4BSD. + +Mon Mar 25 23:39:25 2002 Nobuyoshi Nakada + + * configure.in (FILE_READPTR): new. for IO#gets improvement. + + * io.c (READ_DATA_PENDING_PTR): ditto. + + * io.c (remain_size): separated from read_all(). + + * io.c (read_all): argument changed. + + * io.c (appendline): new. get a line and append to string. + + * io.c (swallow): new. swallow continuous line delimiters. + + * io.c (rb_io_getline_fast): add delimiter argument. + + * io.c (rb_io_getline): performance improvement. + +Mon Mar 25 19:30:25 2002 WATANABE Hirofumi + + * ext/extmk.rb.in (arg_config): get rid of single quotes + for autoconf 2.53. + +Mon Mar 25 17:49:41 2002 Nobuyoshi Nakada + + * regex.c (mbc_startpos_func): VC6 seems to be unable to + understand forward declaration for static variables. + + * dir.c (rb_push_glob): local variable 'maxnest' was + uninitialized. + +Mon Mar 25 13:24:20 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (bsock_do_not_rev_lookup_set): should not be + allowed when $SAFE > 3. + + * eval.c (rb_thread_ready): THREAD_TO_KILL threads should not turn + into THREAD_RUNNABLE on wakeup. + + * eval.c (rb_thread_list): THREAD_TO_KILL threads should be in the + list. + + * eval.c (thgroup_list): ditto; by moving gid clearance from + rb_thread_cleanup(). + +Mon Mar 25 11:06:19 2002 Nobuyoshi Nakada + + * dln.c (dln_argv0): unused unless USE_DLN_A_OUT. + + * regex.c (mbc_startpos_func): should be static. + +Sun Mar 24 12:19:09 2002 Koji Arai + + * dir.c (fnmatch): "*/bar" (with FNM_PATHNAME flag) does not + match "foo/bar". + +Sun Mar 24 00:46:05 2002 WATANABE Hirofumi + + * util.c (push_element): avoid warning for djgpp. + +Sat Mar 23 01:50:30 2002 Yukihiro Matsumoto + + * io.c (read_all): files on /proc filesystem with zero stat size, + may have contents. + +Fri Mar 22 18:07:29 2002 Yukihiro Matsumoto + + * ext/socket/socket.c (tcp_s_gethostbyname): refactored. + + * ext/socket/socket.c (sock_s_gethostbyname): ditto. + +Fri Mar 22 16:46:54 2002 Minero Aoki + + * ext/extmk.rb.in: replace mkdir with mkpath to compile racc/cparse. + +Fri Mar 22 16:22:55 2002 Yukihiro Matsumoto + + * the VMS support patch submitted by Akiyoshi, Masamichi + is merged. + +Fri Mar 22 16:27:24 2002 Minero Aoki + + * lib/racc/parser.rb: new file. + + * ext/racc/MANIFEST, cparse.c, depend, extconf.rb: new files. + + * lib/README: add racc/parser.rb. + + * ext/Setup*: add racc/cparse. + +Fri Mar 22 15:04:03 2002 Yukihiro Matsumoto + + * eval.c (exec_under): changing ruby_class is OK, but should not + alter cbase. + + * eval.c (yield_under_i): ditto. + +Fri Mar 22 15:44:38 2002 Minero Aoki + + * ext/strscan/MANIFEST, strscan.c, depend, extconf.rb: new files. + + * ext/Setup*: add strscan entry. + +Fri Mar 22 14:32:14 2002 Minero Aoki + + * lib/net/protocol.rb: Protocol#start should return self. + +Fri Mar 22 14:14:21 2002 Tanaka Akira + + * lib/resolv.rb: fix arguments to create exceptions. + Patch from matt@lickey.com. (ruby-bugs:PR#278) + +Fri Mar 22 13:51:11 2002 Akinori MUSHA + + * ext/bigfloat/.cvsignore, ext/bigfloat/MANIFEST: BigFloat 1.1.8 + has been imported. Add .cvsignore and MANIFEST. + +Fri Mar 22 04:07:55 2002 Koji Arai + + * sprintf.c (rb_f_printf): discard meaningless prefix ".." for '%u'. + +Thu Mar 21 01:11:37 2002 Usaku Nakamura + + * win32/Makefile.sub (config.status): fix install path (prefix). + +Thu Mar 21 01:03:05 2002 Nobuyoshi Nakada + + * ext/configsub.rb: latest autoconf style support. + +Wed Mar 20 22:16:25 2002 Usaku Nakamura + + * mkconfig.rb: close duplicated $stdout before renaming rbconfig.rb. + +Wed Mar 20 21:54:17 2002 Nobuyoshi Nakada + + * win32/Makefile.sub: made variables configurable. + + * win32/Makefile.sub (config.h): updates RUBY_PLATFORM from + Makefile. + + * win32/Makefile.sub (config.status): ditto. and use recent + autoconf format. + + * win32/Makefile.sub (clean): separate ext and local clean up. + + * win32/Makefile.sub (distclean): ditto. + + * win32/config.status.in: no longer used. + +Wed Mar 20 20:12:35 2002 Nobuyoshi Nakada + + * variable.c (rb_const_list): a temporary table must be freed. + +Wed Mar 20 19:44:09 2002 Tanaka Akira + + * mkconfig.rb: don't touch rbconfig.rb if there is a trouble. + +Wed Mar 20 16:05:37 2002 Yukihiro Matsumoto + + * eval.c (is_defined): should check receiver only once. + + * eval.c (is_defined): should handle NODE_NEWLINE. + +Wed Mar 20 11:29:25 2002 Aristarkh A Zagorodnikov + + * file.c (rb_file_s_expand_path): memory leak fixed. + +Wed Mar 20 00:36:43 2002 Akinori MUSHA + + * util.c (ruby_getcwd): the content of buf is uncertain and must + not be printed when getcwd(buf, size) has failed. + +Mon Mar 18 22:19:52 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c (check_modifiable): wrong declaration. + +Mon Mar 18 18:04:05 2002 Nobuyoshi Nakada + + * ext/digest: add depend file. + + * ext/digest/md5: ditto. + + * ext/digest/rmd160: ditto. + + * ext/digest/sha1: ditto. + + * ext/digest/sha2: ditto. + + * ext/iconv/MANIFEST: ditto. + + * ext/stringio/MANIFEST: ditto. + + * ext/syslog: ditto. + +Mon Mar 18 17:18:06 2002 Nobuyoshi Nakada + + * eval.c (rb_f_abort): should not bypass cleanup. + + * ext/stringio/stringio.c (check_modifiable): void function. + +Mon Mar 18 12:52:01 2002 WATANABE Hirofumi + + * ext/iconv/extconf.rb: workaround for GNU libiconv. + +Mon Mar 18 10:55:03 2002 Nobuyoshi Nakada + + * parse.y (parse_string): part of multi-byte sequence must not + match to paren. + + * parse.y (parse_qstring): ditto. + + * parse.y (parse_quotedwords): ditto. + + * parse.y (str_extend): handle multi-byte characters. + +Mon Mar 18 10:31:20 2002 Nobuyoshi Nakada + + * enum.c (enum_find): catch a value before recycle. + + * enum.c (enum_all): ditto. + + * enum.c (enum_any): ditto. + + * enum.c (enum_min): ditto. + + * enum.c (enum_max): ditto. + +Sun Mar 17 20:08:04 2002 Nobuyoshi Nakada + + * ext/iconv/depend: added. + + * ext/stringio/depend: added. + +Sat Mar 16 22:43:53 2002 WATANABE Hirofumi + + * missing/fileblocks.c: add for autoconf. + +Sat Mar 16 15:30:40 2002 Yukihiro Matsumoto + + * re.c (rb_reg_search): should clear last_match if pos is out of + string range. + + * string.c (rb_str_index_m): ditto. + + * string.c (rb_str_rindex): ditto. + +Sat Mar 16 09:04:58 2002 Koji Arai + + * enum.c (enum_inject): use the first iterated element as the + initial value when omitted. + + * enum.c (inject_i): ditto. + + * enum.c (Init_Enumerable): Enumerable#inject now takes variable + count arguments. + +Fri Mar 15 19:47:31 2002 Nobuyoshi Nakada + + * win32/win32.c (StartSockets): remove duplicated lines. + +Fri Mar 15 17:44:08 2002 Usaku Nakamura + + * bignum.c, intern.h (rb_ull2big, rb_ll2big, rb_ull2inum, rb_ll2inum, + big2ull, rb_big2ull, rb_big2ll): use LONG_LONG macro instead of + long long. + + * numeric.c, intern.h, ruby.h (rb_num2ll, rb_num2ull): ditto. + + * ruby.h: use _I64_MAX and _I64_MIN if they are defined (for VC++). + +Fri Mar 15 14:02:43 2002 Nobuyoshi Nakada + + * ext/iconv/iconv.c: fixed document, Iconv#new is no longer an + iterator. thanks to Tanaka Akira . + +Thu Mar 14 22:17:45 2002 Nobuyoshi Nakada + + * ext/iconv: imported. + +Thu Mar 14 16:42:37 2002 Yukihiro Matsumoto + + * class.c (rb_define_class): should handle autoload. + + * class.c (rb_define_module): ditto. + +Thu Mar 14 16:18:12 2002 WATANABE Hirofumi + + * configure.in: autoconf 2.53 support. use AC_LIBOBJ. + +Thu Mar 14 00:29:12 2002 Yukihiro Matsumoto + + * re.c (rb_reg_match): should clear $~ if operand is nil. + + * re.c (rb_reg_match2): ditto. + +Thu Mar 14 12:32:59 2002 Nobuyoshi Nakada + + * ext/stringio/stringio.c: fixed frozen string bug. ungetc no + longer raises on readonly stream unless modifies actually. + +Thu Mar 14 08:57:41 2002 Nobuyoshi Nakada + + * dir.c (rb_push_glob): avoid SEGV when a block given. + +Thu Mar 14 00:16:02 2002 Nobuyoshi Nakada + + * string.c (rb_str_subpat_set): must make str independent after + rb_reg_search() matched. + +Wed Mar 13 19:05:15 2002 Akinori MUSHA + + * dir.c: FNM_PERIOD is obsoleted and FNM_DOTMATCH is introduced + instead, which has the opposite meaning of FNM_PERIOD. + + * dir.c: Dir::glob now accepts optional FNM_* flags via the second + argument, whereas Dir::[] doesn't. + +Wed Mar 13 18:36:55 2002 Akinori MUSHA + + * lib/getopts.rb: single_options can be nil[*], and is not not + optional. ([*]Pointed out by gotoken) + +Wed Mar 13 17:23:46 2002 Yukihiro Matsumoto + + * configure: merge Jonathan Baker's large file support patch + [ruby-talk:35316], with read_all patch in [ruby-talk:35470]. + +Wed Mar 13 04:06:48 2002 Yukihiro Matsumoto + + * eval.c (rb_f_abort): optional message argument that be printed + on termination. + +Tue Mar 12 17:12:06 2002 Tanaka Akira + + * lib/resolv.rb: don't complete domains for absolute FQNs. + +Mon Mar 11 23:08:48 2002 Tanaka Akira + + * lib/tsort.rb: new file. + +Mon Mar 11 21:03:37 2002 Nobuyoshi Nakada + + * ext/stringio: new. + +Mon Mar 11 18:03:37 2002 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): '\0111' should be '\011' plus '1', + since octal literals are formed by three digits at most. + +Mon Mar 11 14:44:38 2002 Yukihiro Matsumoto + + * marshal.c (w_object): module inclusion using extend() should + also be detected. + + * eval.c (rb_eval_cmd): cbase should not be NULL; it should be + either ruby_wrapper or Object. + +Sun Mar 10 02:18:22 2002 Koji Arai + + * enum.c (enum_each_with_index): should return self. + + * process.c (proc_setpgrp): should return value for non-void function. + + * process.c (proc_getpgid): should raise exception if getpgid() return -1. + + * string.c (rb_str_ljust): should return a duplicated string. + + * string.c (rb_str_rjust): ditto. + + * string.c (rb_str_center): ditto. + +Sat Mar 9 08:45:58 2002 Tanaka Akira + + * ext/socket/extconf.rb (have_struct_member): don't print checked + result. + +Fri Mar 8 12:19:15 2002 Tanaka Akira + + * lib/resolv.rb: use its own thread group for background threads. + +Fri Mar 8 02:21:32 2002 Yukihiro Matsumoto + + * eval.c (cvar_cbase): utility function to find innermost non + singleton cbase. + + * eval.c (is_defined): adopt new cvar behavior. + + * eval.c (rb_eval): ditto. + + * eval.c (assign): ditto. + +Thu Mar 7 20:08:25 2002 Nobuyoshi Nakada + + * gc.c (rb_source_filename): added. holds unique strings for file + names with GC space. + + * gc.c (rb_gc_mark): mark source file name. + + * gc.c (gc_sweep): ditto. + + * gc.c (Init_GC): initialize source file name table. + + * intern.h (rb_source_filename): added. + + * eval.c (rb_eval_string): use rb_source_filename(). + + * parse.y (yycompile): ditto. + + * ruby.c (proc_options): ditto. + + * ruby.c (load_file): ditto. + + * ruby.c (ruby_script): ditto. + + * ruby.c (ruby_prog_init): ditto. + +Wed Mar 6 17:58:08 2002 WATANABE Hirofumi + + * dln.c (dln_load): use LoadLibrary instead of LoadLibraryEx. + +Wed Mar 6 16:50:37 2002 Yukihiro Matsumoto + + * class.c (rb_mod_clone): should not call rb_obj_clone(), since + Module does not provide "allocate". + + * class.c (rb_singleton_class): should create new singleton class + if obj is a class or module and attached object is different, + which means metaclass of singleton class is sought. + + * time.c (time_s_alloc): now follows allocation framework. + +Tue Mar 5 05:56:29 2002 Akinori MUSHA + + * lib/getopts.rb: Rewrite to fix some bugs and complete features. + - Accept options with the colon in the first argument; + getopts("a:bcd:") is equivalent to getopts("bc", "a:", "d:"). + - Do not discard the argument that caused an error. + - Do not discard '-', which commonly stands for stdin or stdout. + - Allow specifying a long option with a value using '='. + (command --long-option=value) + - Stop reading options when it meets a non-option argument. + +Mon Mar 4 13:19:18 2002 Akinori MUSHA + + * ext/extmk.rb.in (dir_config): Sync with mkmf.rb: Fix a bug where + --with-xx-{include,lib} is ignored when --with-xx-dir is + specified. + +Mon Mar 4 00:09:55 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): should initialize outer class variables from + methods in singleton class definitions. + + * eval.c (assign): ditto. + +Fri Mar 1 11:29:10 2002 WATANABE Hirofumi + + * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): add const + qualifier only for uClibc. + +Fri Mar 1 11:22:51 2002 Amos Gouaux + + * lib/net/imap.rb: added document. + + * lib/net/imap.rb (getquotaroot): new method. + + * lib/net/imap.rb (setacl): remove the rights if the rights + parameter is nil. + + * lib/net/imap.rb (getacl): return an array of MailboxACLItem. + +Fri Mar 1 06:25:49 2002 Tanaka Akira + + * ext/socket/extconf.rb (have_struct_member): new method. + check msg_control and msg_accrights in struct msghdr. check + sys/uio.h. + + * ext/socket/socket.c: include sys/uio.h if available. + (thread_read_select): new function. + (unix_send_io): ditto. + (unix_recv_io): ditto. + (unix_s_socketpair): ditto. + (Init_socket): define UNIXSocket#send_io, UNIXSocket#recv_io, + UNIXSocket.socketpair and UNIXSocket.pair. + + * dln.c (dln_load): fix typo. + +Wed Feb 27 16:30:50 2002 Yukihiro Matsumoto + + * eval.c (rb_mod_include): load modules in argument order. + + * st.c (st_init_table_with_size): num_bins should be prime numbers + (no decrement). + + * st.c (rehash): ditto. + +Wed Feb 27 13:18:49 2002 WATANABE Hirofumi + + * io.c (READ_DATA_PENDING): uClibc support. + + * random.c (rand_init): ditto. + + * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto. + +Wed Feb 27 07:05:17 2002 Akinori MUSHA + + * ext/digest/sha2/sha2.c: Merge from rough. Fix a couple of + off-by-one errors in Aaron Gifford's code. + + Obtained from: KAME via FreeBSD + KAME PR: 393 + FreeBSD PR: kern/34242 + +Wed Feb 27 03:36:47 2002 Koji Arai + + * ext/dbm/dbm.c (fdbm_select): 1.7 behavior. + + * ext/gdbm/gdbm.c (fgdbm_select): ditto. + + * ext/sdbm/sdbm.c (fsdbm_select): ditto. + + * ext/dbm/dbm.c (fdbm_delete): adopt Hash#delete behavior. + + * ext/sdbm/sdbm.c (fsdbm_delete): ditto. + + * ext/gdbm/gdbm.c: need not to dup key to the block. + + * ext/sdbm/sdbm.c : replace RuntimeError with SDBMError. + +Tue Feb 26 21:34:07 2002 Usaku Nakamura + + * bignum.c (rb_big_2comp): void function cannot return any value. + +Tue Feb 26 16:52:12 2002 Yukihiro Matsumoto + + * eval.c (rb_f_missing): NoMethod error messages for true, false, + nil must respond visibility like for other objects. + +Tue Feb 26 15:41:30 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): call trace_func for if/while conditions. + + * marshal.c (r_object): separate r_regist from proc calling. + +Tue Feb 26 11:25:50 2002 akira yamada + + * lib/uri/generic.rb: merge0 should return [oth, oth] if oth is + absolute URI. + + * lib/uri/generic.rb: registry part must not be allowed for any + schemes for the Internet. (RFC2396, section 3.2.2 and 3.2.1.) + +Mon Feb 25 21:22:41 2002 Akinori MUSHA + + * ext/syslog/syslog.c: Merge from rough. Use SafeStringValue(). + +Mon Feb 25 21:12:08 2002 Akinori MUSHA + + * ext/syslog/syslog.c: Merge from rough. Turn Syslog into a + module keeping backward compatibility intact. + +Mon Feb 25 19:35:48 2002 Nobuyoshi Nakada + + * sample/test.rb (system): test with scripts under the source + directory. + +Mon Feb 25 15:14:01 2002 Yukihiro Matsumoto + + * eval.c (method_inspect): should not dump core for unbound + singleton methods. + + * object.c (rb_mod_to_s): better description. + +Mon Feb 25 13:32:13 2002 Nobuyoshi Nakada + + * lib/shell.rb (Shell::expand_path): relative to @cwd. + +Mon Feb 25 06:30:11 2002 Koji Arai + + * hash.c (env_select): should path the assoc list. + +Sun Feb 24 17:20:22 2002 Akinori MUSHA + + * ext/digest/*/*.h: Merge from rough. + - Avoid namespace pollution. (MD5_* -> rb_Digest_MD5_*, etc.) + +Sat Feb 23 21:12:13 2002 Yukihiro Matsumoto + + * process.c (rb_syswait): thread kludge; should be fixed to + support native thread. + +Fri Feb 22 21:20:53 2002 Minero Aoki + + * lib/net/protocol.rb: set read_timeout dynamically. + + * lib/net/http.rb: @@newimpl is always true in the main trunk. + + * lib/net/http.rb: HTTP.port -> default_port + + * lib/net/http.rb: HTTPResponse.read_response_status -> + read_status_line + +Fri Feb 22 19:56:15 2002 Usaku Nakamura + + * win32/config.status.in: set LIBRUBY_SO. + +Fri Feb 22 03:34:38 2002 Yukihiro Matsumoto + + * bignum.c (get2comp): need to specify to carry or not. + + * io.c (rb_io_inspect): embed path info. + +Fri Feb 22 11:30:01 2002 Tanaka Akira + + * lib/prettyprint.rb: FillGroup implemented. + +Thu Feb 21 21:40:18 2002 Usaku Nakamura + + * ext/extmk.rb.in (create_makefile): remove unnecessary -L option from + LIBS macro. + +Thu Feb 21 02:49:12 2002 Koji Arai + + * pack.c (pack_pack): wrong # comment treatment. + + * pack.c (pack_unpack): ditto. + +Wed Feb 20 15:15:03 2002 Nobuyoshi Nakada + + * intern.h: prototypes; rb_io_addstr(), rb_io_printf(), + rb_io_print(), rb_io_puts() + + * io.c (rb_io_addstr): make extern. + + * io.c (rb_io_printf): ditto. + + * io.c (rb_io_print): ditto. + + * io.c (rb_io_puts): ditto. + +Wed Feb 20 13:41:35 2002 Usaku Nakamura + + * io.c (rb_io_close): return Qnil. + +Wed Feb 20 12:41:59 2002 Yukihiro Matsumoto + + * hash.c (rb_any_cmp): should handle Qundef in keys. + + * eval.c (remove_method): should not remove a empty method to + implement "undef". + + * eval.c (rb_eval): should allow singleton class def for + true/false/nil. + +Tue Feb 19 21:43:32 2002 Minero Aoki + + * lib/net/protocol.rb: rename Protocol.port to default_port. + + * lib/net/smtp.rb: ditto. + + * lib/net/pop.rb: ditto. + + * lib/net/http.rb: ditto. + + * lib/net/protocol.rb: rename BufferedSocket class to + InternetMessageIO. + + * lib/net/smtp.rb: ditto. + + * lib/net/pop.rb: ditto. + + * lib/net/http.rb: ditto. + + * lib/net/protocol.rb: rename InternetMessageIO#write_pendstr to + write_message. + + * lib/net/smtp.rb: ditto. + + * lib/net/protocol.rb: new method + InternetMessageIO#through_message. + + * lib/net/smtp.rb: ditto. + + * lib/net/protocol.rb: rename InternetMessageIO#read_pendstr to + read_message_to. + + * lib/net/pop.rb: ditto. + + * lib/net/protocol.rb: rename InternetMessageIO#read_pendlist to + each_list_item + + * lib/net/pop.rb: ditto. + + * lib/net/protocol.rb: Now block size is 1024. + + * lib/net/smtp.rb: new methods SMTP#esmtp? and #esmtp=. + + * lib/net/http.rb: Using singleton method syntax instead of + singleton class clause, to avoid behavior change of class + variables in ruby 1.7. + + * lib/net/http.rb: HTTPResponse class does not inherit from + Net::Response. + + * lib/net/http.rb: divide HTTP#connecting into + {begin,end}_transport. + + * lib/net/http.rb: unused class Accumulator removed. + + * lib/net/http.rb: Net::HTTP reads response. not HTTPRequest. + + * lib/net/http.rb: proxy related class-instance-variables are not + initialized correctly. + +Tue Feb 19 20:20:12 2002 Ed Sinjiashvili + + * parse.y (str_extend): backslash escape was done wrong. + +Tue Feb 19 17:10:25 2002 Nobuyoshi Nakada + + * file.c (path_check_1): do not fail on world writable *parent* + directories too. + +Tue Feb 19 15:51:41 2002 Yukihiro Matsumoto + + * file.c (path_check_1): do not warn on world writable *parent* + directories. + + * class.c (rb_include_module): should preserve ancestor order in + the included class/module. + +Tue Feb 19 14:45:32 2002 Yukihiro Matsumoto + + * file.c (path_check_1): should check directory sticky bits. + + * process.c (security): need not to warn twice. + + * marshal.c (r_object): complete restoration before calling + r_regist(). + +Tue Feb 19 14:24:36 2002 Yukihiro Matsumoto + + * parse.y (yylex): operators in the "op" rule should make + lex_state EXPR_ARG on EXPR_FNAME and EXPR_DOT. + +Tue Feb 19 13:38:10 2002 Yukihiro Matsumoto + + * eval.c (rb_eval_string_wrap): should hide the toplevel local + variable bindings by PUSH_SCOPE(). + +Tue Feb 19 13:21:51 2002 WATANABE Hirofumi + + * regex.c: fix prototypes of xmalloc(), xcalloc() and xrealloc(). + +Tue Feb 19 13:16:08 2002 Nobuyoshi Nakada + + * io.c (rb_io_ungetc): don't fail pushed EOF back. + +Mon Feb 18 20:48:40 2002 Nobuyoshi Nakada + + * pack.c (pack_pack): avoid infinite loop at comment. + + * pack.c (pack_unpack): ditto. + +Mon Feb 18 14:06:28 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-block-hanging-re): rescue block was too + indented. + +Mon Feb 18 13:56:44 2002 Yukihiro Matsumoto + + * parse.y (expr_value, arg_value, primary_value): value_expr() + check in place. + + * eval.c (block_pass): "&nil" should clear block given. + +Mon Feb 18 02:05:56 2002 Wolfgang Jahrling + + * dir.c (push_braces): remove MAXPATHLEN dependency. + + * dir.c (dir_s_globd): ditto. + + * dln.c (init_funcname): ditto. + + * dln.c (load_1): ditto. + + * dln.c (dln_load): ditto. + + * configure.in: add GNU/Hurd switches. + +Fri Feb 15 17:44:26 2002 Yukihiro Matsumoto + + * pack.c (pack_pack): allows comment in template strings. + + * pack.c (pack_unpack): ditto. + +Sun Feb 17 23:41:37 2002 Nobuyoshi Nakada + + * mkconfig.rb (Config::expand): expand ${} too. + + * ext/extmk.rb.in (try_link0): expand command. + + * ext/extmk.rb.in (try_cpp): ditto. + + * ext/extmk.rb.in (extmake): default $LIBPATH to $libdir + +Sun Feb 17 21:39:24 2002 Tetsuya Watanabe + + * ext/digest/md5/md5init.c (Init_md5): rb_cvar_declare() is + replaced by rb_cvar_set(). + + * ext/digest/rmd160/rmd160init.c (Init_rmd160): ditto. + + * ext/digest/sha1/sha1init.c (Init_sha1): ditto. + + * ext/digest/sha2/sha2init.c (Init_sha2): ditto. + +Sun Feb 17 18:10:09 2002 Nobuyoshi Nakada + + * class.c (rb_define_class): warn unless superclass is specified + explicitly. + + * class.c (rb_define_class_under): ditto. + +Thu Feb 16 02:11:08 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-keywords): fontify + instance/class/global variables start with '_'. + +Fri Feb 15 14:40:38 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): replace rb_cvar_declare() by rb_cvar_set(). + + * eval.c (assign): ditto. + + * variable.c (rb_cvar_set): 4th argument (warn) added; define new + class variable if it's not defined yet. + + * variable.c (rb_cvar_declare): removed. + +Fri Feb 15 13:36:58 2002 Yukihiro Matsumoto + + * bignum.c (rb_big_rshift): should properly convert the negative + value to 2's compliment. + +Thu Feb 14 17:38:35 2002 Nobuyoshi Nakada + + * parse.y: avoid SEGV at OP_ASIGN to pseudo variable. + +Thu Feb 14 14:13:16 2002 Yukihiro Matsumoto + + * struct.c (Init_Struct): should undefine "allocate" for Struct + class (it's redefined in the subclasses). + +Wed Feb 13 17:58:12 2002 Yukihiro Matsumoto + + * parse.y (stmt): local variable declaration order was changed + since 1.6 + + * parse.y (arg): ditto. + + * pack.c (pack_pack): add templates 'q' and 'Q'. + + * pack.c (pack_unpack): ditto. + + * bignum.c (rb_quad_pack): new utility function. + + * bignum.c (rb_quad_unpack): ditto. + +Tue Feb 12 01:21:34 2002 Yukihiro Matsumoto + + * parse.y (assignable): should emit CVASGN within the method + body. + +Mon Feb 11 06:13:53 2002 Matt Armstrong + + * dir.c (dir_s_glob): should not warn even if no match found. + +Mon Feb 11 04:25:54 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): clean up class variable behavior. + + * eval.c (assign): ditto. + + * eval.c (is_defined): ditto. + + * variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton(). + + * variable.c (rb_cvar_singleton): removed. + +Mon Feb 11 00:10:41 2002 Nobuyoshi Nakada + + * regex.c (re_compile_fastmap): skip begpos. + +Sun Feb 10 16:52:53 2002 Nobuyoshi Nakada + + * ruby.c (load_file): avoid SEGV on '#' only input. + +Fri Feb 8 23:07:23 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): singleton check should be moved from yycompile + to here. + + * eval.c (is_defined): check should be added here too. + +Fri Feb 8 05:31:48 2002 Minero Aoki + + * lib/net/http.rb: HTTP.Proxy should use self for proxy-class's + super class. + + * lib/net/http.rb: initialize HTTP.proxy_port by HTTP.port. + +Fri Feb 8 01:27:33 2002 Yukihiro Matsumoto + + * parse.y (yycompile): should inherit "in_single" if eval happened + in a singleton method. + + * eval.c (rb_eval): class variables from singleton methods defined + within singleton class statement should work like ones defined + by singleton def statements. + +Thu Feb 7 13:44:08 2002 akira yamada + + * uri/common.rb (URI::join): new method. + + * uri/generic.rb (Generic#merge): URI.parse("http://a/")+"b" should + return "http://a/b" but it returned "http://a//b". + + * uri/generic.rb (Generic#check_path): corrected error message, + @path -> v + +Thu Feb 7 00:18:43 2002 Yukihiro Matsumoto + + * io.c (io_write): flag when buffered write is done. + + * io.c (fptr_finalize): do not raise error on EBADF if write + buffer is empty. + +Wed Feb 6 17:18:54 2002 Nobuyoshi Nakada + + * configure.in: keep old config.h unless changed. + +Wed Feb 6 13:28:53 2002 Amos Gouaux + + * lib/net/imap.rb: OpenSSL support. + + * lib/net/imap.rb (setquota): unset quota if the second argument + is nil. + +Wed Feb 6 13:05:11 2002 Yukihiro Matsumoto + + * io.c (rb_io_readlines): avoid calling GetOpenFile() repeatedly. + + * io.c (rb_io_each_line): ditto. + + * io.c (argf_getline): ditto. + + * process.c: should include to get proper CLK_TCK. + +Wed Feb 6 02:10:30 2002 Nobuyoshi Nakada + + * io.c (fptr_finalize): ignore EBADF when f and f2 use same + descriptor. + +Tue Feb 5 16:17:20 2002 Yukihiro Matsumoto + + * io.c (fptr_finalize): should raise error when fclose fails. + + * eval.c (method_inspect): proper output format to distinguish + methods and singleton methods. + +Mon Feb 4 22:44:58 2002 Nobuyoshi Nakada + + * file.c (rb_file_s_expand_path): should terminate. + +Mon Feb 4 15:38:29 2002 Yukihiro Matsumoto + + * object.c (rb_class_real): should not follow ICLASS link + + * variable.c (classname): should follow ICLASS link explicitly. + + * eval.c (rb_call): ditto. + +Fri Feb 1 19:10:04 2002 Nobuyoshi Nakada + + * intern.h: prototypes for new functions; rb_cstr_to_inum(), + rb_str_to_inum(), rb_cstr_to_dbl(), rb_str_to_dbl() + + * bignum.c (rb_cstr_to_inum): changed from rb_cstr2inum(), and + added argument badcheck to be consistent with parser. [new] + + * bignum.c (rb_str_to_inum): ditto. + + * bignum.c (rb_cstr2inum): wrapper of rb_cstr_to_inum() now. + + * bignum.c (rb_str2inum): ditto. + + * object.c (rb_cstr_to_dbl): float number parser. [new] + + * object.c (rb_str_to_dbl): ditto. + + * object.c (rb_Float): use rb_cstr_to_dbl() for strict check. + + * object.c (rb_Integer): use rb_str_to_inum() for strict check. + + * string.c (rb_str_to_f): use rb_str_to_dbl() with less check. + + * string.c (rb_str_to_i): use rb_str_to_inum() with less check. + + * string.c (rb_str_hex): ditto. + + * string.c (rb_str_oct): ditto. + + * sprintf.c (rb_f_sprintf): ditto. + + * time.c (obj2long): ditto. + + * parse.y (yylex): use rb_cstr_to_inum() for strict check. + +Fri Feb 1 17:46:39 2002 Nobuyoshi Nakada + + * regex.c (mbc_startpos): become macro. + + * regex.c (euc_startpos): added for improvement. + + * regex.c (sjis_startpos): ditto. + + * regex.c (utf8_startpos): ditto. + +Fri Feb 1 00:03:30 2002 Yukihiro Matsumoto + + * file.c (rb_stat_inspect): print dev, rdev in hexadecimal. + +Thu Jan 31 20:45:33 2002 Nobuyoshi Nakada + + * lib/mkmf.rb (dir_config): prior --with flag. + + * lib/mkmf.rb (arg_config): avoid special variables for + font-lock-mode. + +Thu Jan 31 13:22:36 2002 Tanaka Akira + + * lib/pp.rb (File::Stat#pretty_print): print rdev_major and rdev_minor. + +Wed Jan 30 15:58:04 2002 K.Kosako + + * regex.c (re_adjust_startpos): fix for SJIS and UTF-8. + + * regex.c (mbc_startpos): ditto. + +Wed Jan 30 13:37:05 2002 Yukihiro Matsumoto + + * re.c (rb_reg_search): should set regs.allocated. + +Wed Jan 30 02:25:38 2002 Nobuyoshi Nakada + + * regex.c (re_adjust_startpos): search start of multibyte + backward. + + * regex.c (mbc_startpos): ditto. + +Tue Jan 29 17:59:20 2002 Tanaka Akira + + * file.c: `major' and `minor' macro needs sys/mkdev.h on SunOS 5.x. + + * configure.in: add check for `sys/mkdev.h'. + + * lib/pp.rb: don't print a mode File::Stat as decimal number. + +Mon Jan 28 19:16:58 2002 Nobuyoshi Nakada + + * array.c (rb_ary_fill): shouldn't yield unless block given. + +Mon Jan 28 18:33:18 2002 Nobuyoshi Nakada + + * parse.y (yylex): strict check for numbers. + +Mon Jan 28 18:01:01 2002 Yukihiro Matsumoto + + * file.c (rb_stat_rdev_major): added. [new] + + * file.c (rb_stat_rdev_minor): added. [new] + + * file.c (rb_stat_inspect): print mode in octal. + +Mon Jan 28 13:29:41 2002 K.Kosako + + * eval.c (is_defined): defined?(Foo::Baz) should check constants + only, no methods. + + * eval.c (is_defined): should not dump core on defined?(a::b) + where a is not a class nor a module. + +Mon Jan 28 02:50:12 2002 Yukihiro Matsumoto + + * object.c (Init_Object): remove dup and clone from TrueClass, + FalseClass, and NilClass. + + * array.c (rb_ary_fill): Array#fill takes block to get the value to + fill. + +Sat Jan 26 20:05:18 2002 Yukihiro Matsumoto + + * string.c (rb_str_to_i): to_i(0) auto-detects base radix. + + * array.c (rb_ary_initialize): fill by the block evaluation value + if block is given. + +Fri Jan 25 17:48:43 2002 WATANABE Hirofumi + + * configure.in (solaris): add '-shared' only for GNU ld. + +Fri Jan 25 17:16:23 2002 Yukihiro Matsumoto + + * class.c (rb_include_module): detect cyclic module inclusion. + +Fri Jan 25 02:17:56 2002 Yukihiro Matsumoto + + * eval.c (rb_thread_cleanup): need not to free thread stacks at + process termination. + + * array.c (rb_ary_fetch): use the block to get the default value + if the block is given. + + * eval.c (rb_thread_schedule): should check time only if BOTH + WAIT_SELECT and WAIT_TIME. + +Thu Jan 24 11:49:05 2002 Yukihiro Matsumoto + + * eval.c (umethod_bind): should update rklass field. + + * hash.c (rb_hash_update): if a block is given, yields [key, + value1, value2] to the block to resolve conflict. + +Thu Jan 24 05:42:01 2002 Koji Arai + + * string.c (rb_str_split_m): no need to consider KANJI + characters, if the length of separator is 1 (byte). + +Wed Jan 23 16:07:31 2002 Yukihiro Matsumoto + + * array.c (Init_Array): remove Array#filter. + +Wed Jan 23 13:27:44 2002 Nobuyoshi Nakada + + * eval.c (rb_yield_0): restore source file/line after yield. + +Wed Jan 23 02:00:14 2002 Yukihiro Matsumoto + + * object.c (rb_mod_initialize): should accept zero argument. + + * object.c (rb_mod_cmp): should raise ArgumentError if + inheritance/inclusion relation between two classes/modules is + not defined. [new] + +Tue Jan 22 17:45:23 2002 Yukihiro Matsumoto + + * io.c (rb_io_fsync): new method. [new] + +Mon Jan 21 22:57:18 2002 Nobuyoshi Nakada + + * signal.c (ruby_signal): must define sighandler_t for every + occasion. + +Mon Jan 21 08:25:30 2002 Yukihiro Matsumoto + + * eval.c (ruby_stop): should not trace error handler. + + * signal.c (install_sighandler): do not install sighandler unless + the old value is SIG_DFL. + + * io.c (io_write): should not raise exception on O_NONBLOCK io. + + * dir.c (dir_set_pos): seek should return dir, pos= should not. + +Sat Jan 19 02:31:45 2002 Yukihiro Matsumoto + + * eval.c (rb_eval): need not to clear method cache for NODE_CLASS, + NODE_SCLASS. + + * gc.c (obj_free): need not to clear method cache on class/module + finalization. + +Fri Jan 18 23:38:03 2002 Yukihiro Matsumoto + + * array.c (rb_ary_fetch): index out of range raises exception + unless optional second argument is specified. + +Fri Jan 18 17:32:09 2002 Yukihiro Matsumoto + + * io.c (rb_io_s_new): block check moved from initialize to this + method. + + * io.c (rb_io_s_open): open should call initialize too. IO#for_fd + also calls initialize. [new] + +Fri Jan 18 10:26:33 2002 Yukihiro Matsumoto + + * error.c (rb_sys_fail): replace INT2FIX() by INT2NUM() since + errno value may not fit in Fixnum size on Hurd. + + * error.c (set_syserr): ditto. + +Fri Jan 18 10:12:00 2002 Usaku Nakamura + + * ext/socket/socket.c (tcp_svr_s_open): fix typo. + +Fri Jan 18 02:27:48 2002 Yukihiro Matsumoto + + * dir.c (dir_s_glob): returns nil if block given. + + * io.c (rb_io_each_byte): should return self. + + * io.c (rb_io_close_m): close check added. + + * dir.c (dir_seek): should return pos. + +Fri Jan 18 01:21:53 2002 Yukihiro Matsumoto + + * parse.y (fixpos): orig may be (NODE*)1, which should not be + dereferenced. + +Thu Jan 17 16:21:42 2002 Yukihiro Matsumoto + + * eval.c (block_pass): allow "retry" from within argument passed + block. [new] + + * eval.c (localjump_error): should preserve exit status in the + exception object. [new] + + * eval.c (proc_invoke): should raise exception for "break" if it's + yielding, not calling. [new] + + * eval.c (block_pass): should NOT raise exception for "break". [new] + + * eval.c (block_pass): should allow block argument relay even in + the tainted mode. + +Thu Jan 17 04:51:48 2002 Yukihiro Matsumoto + + * ext/socket/socket.c: support subclassing by proper "initialize" + calling convention. [new] + +Wed Jan 16 18:25:08 2002 Yukihiro Matsumoto + + * st.c: primes should be primes. + +Wed Jan 16 12:29:14 2002 Tanaka Akira + + * lib/timeout.rb (timeout): new optional argument to specify an + exception class. + + * lib/resolv.rb: use Resolv::ResolvTimeout for internal timeout to + avoid problem with timeout of application. + +Wed Jan 16 11:12:30 2002 Nobuyoshi Nakada + + * object.c (rb_Float): remove underscores between digits. + + * bignum.c (rb_cstr2inum): reject prefix followed by spaces only. + + * class.c (rb_class_inherited): should use Object when no super + class. + +Tue Jan 15 01:11:44 2002 Yukihiro Matsumoto + + * eval.c (is_defined): method defined? check should honor + protected too. + +Mon Jan 14 13:06:02 2002 Yukihiro Matsumoto + + * eval.c (block_pass): should not pass tainted block, if $SAFE > 0. + +Sun Jan 13 09:31:41 2002 Koji Arai + + * variable.c (rb_mod_remove_cvar): should pass the char*. + +Fri Jan 11 05:06:25 2002 Nobuyoshi Nakada + + * class.c (rb_make_metaclass): [new] + + * class.c (rb_define_class_id): use rb_make_metaclass(), don't + call Class#inherited hook. + + * class.c (rb_class_inherited): [new] + + * class.c (rb_define_class): call Class#inherited hook here. + + * class.c (rb_define_class_under): ditto after class path is set. + + * class.c (rb_singleton_class): use rb_make_metaclass(). + + * eval.c (rb_eval): same as rb_define_class_under(). + + * intern.h: prototypes of rb_make_metaclass() and + rb_class_inherited(). + + * object.c (rb_class_s_new): use rb_make_metaclass() and + rb_class_inherited(). + + * object.c (Init_Object): use rb_make_metaclass(). + + * struct.c (make_struct): use rb_class_inherited(). + +Thu Jan 10 19:15:15 2002 Nobuyoshi Nakada + + * eval.c (rb_add_method): should clear cache by id always. + + * eval.c (rb_disable_super): no longer need to clear cache before + rb_add_method(). + + * eval.c (rb_export_method): ditto. + + * eval.c (rb_attr): ditto. + + * eval.c (rb_undef): ditto. + + * eval.c (rb_eval): ditto. + + * eval.c (rb_mod_modfunc): ditto. + + * eval.c (rb_mod_define_method): ditto. + +Thu Jan 10 11:42:47 2002 Usaku Nakamura + + * win32/resource.rb: Modify copyright in resource script. + +Thu Jan 10 07:15:44 2002 takuma ozawa + + * re.c (match_select): should propagate taintness. + +Thu Jan 10 00:54:57 2002 Yukihiro Matsumoto + + * hash.c (rb_hash_set_default): Hash#default= should return the + new value. + +Wed Jan 9 20:21:09 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-calculate-indent): indentation after + comment at beginning of buffer failed. + + * misc/ruby-mode.el (font-lock-defaults): unless XEmacs, set + font-lock variables in ruby-mode-hook. + +Tue Jan 8 15:56:20 2002 Yukihiro Matsumoto + + * string.c (rb_str_to_i): accepts optional base argument. [new] + + * numeric.c (rb_fix2str): should not handle negative fixnum values + int32 via calling sprintf() directly. + +Tue Jan 8 15:54:02 2002 Nobuyoshi Nakada + + * eval.c (rb_add_method): clear replaced method from the cache. + +Mon Jan 7 12:38:47 2002 Tanaka Akira + + * lib/time.rb (Time#xmlschema): new optional argument + fractional_seconds to specify a number of digits of + fractional part of the time. + +Sat Jan 5 13:18:11 2002 Nobuyoshi Nakada + + * range.c (range_member): beginning check was + wrong. [ruby-talk:30252] + +Sat Jan 5 03:07:34 2002 Yukihiro Matsumoto + + * string.c (rb_str_new2): NULL pointer check added. + +Sat Jan 5 00:19:12 2002 Nobuyoshi Nakada + + * parse.y (yycompile): strdup()'ed twice. + +Fri Jan 4 18:29:10 2002 Michal Rokos + + * class.c (rb_define_module_under): should locate predefined + module using rb_const_defined_at(). + +Fri Jan 4 17:23:49 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-forward-string): forward a string. [new] + + * misc/ruby-mode.el (ruby-parse-region): handle nested parentheses + in a string and terminators in #{}. + + * misc/ruby-mode.el (ruby-calculate-indent): ditto. + +Wed Jan 2 23:34:25 2002 WATANABE Hirofumi + + * lib/mkmf.rb (create_makefile): add -I. to CPPFLAGS. + + * lib/mkmf.rb (create_makefile): srcdir support(.def and depend file). + +Wed Jan 2 11:51:56 2002 Yukihiro Matsumoto + + * process.c (rb_f_system): abandon vfork. + + * io.c (pipe_open): ditto. + +Tue Jan 1 02:16:48 2002 WATANABE Hirofumi + + * ext/curses/extconf.rb: add dir_config. + + * Makefile.in (fake.rb): set RUBY_VERSION. + +Mon Dec 31 14:20:46 2001 Nobuyoshi Nakada + + * parse.y (yycompile): always store copy of filename. + + * parse.y (rb_compile_file): no longer need to strdup() here. + +Mon Dec 31 05:26:40 2001 Ferris McCormick + + * defines.h: sparc linux needs different FLUSH_REGISTER_WINDOWS + +Mon Dec 31 04:27:28 2001 Minero Aoki + + * lib/net/protocol.rb: Protocol#start returns the return value of + block. + + * lib/net/protocol.rb: set timeout limit by default. + + * lib/net/protocol.rb: new methods WriteAdapter#write, puts, + print, printf. + + * lib/net/http.rb: rename HTTP#get2 to request_get, post2 to + request_post ... + + * lib/net/smtp.rb: should not resolve HELO domain automatically. + +Sun Dec 30 00:59:16 2001 WATANABE Hirofumi + + * ext/extmk.rb.in, lib/mkmf.rb (have_library): accept -lm + unconditionally on mswin32/mingw32. + +Sat Dec 29 01:55:42 2001 Yukihiro Matsumoto + + * regex.c (re_search): abandon stclass optimization. + +Fri Dec 28 14:39:05 2001 Nobuyoshi Nakada + + * array.c (rb_cmpint): fixed typo. + +Thu Dec 27 18:43:04 2001 Nobuyoshi Nakada + + * bignum.c (rb_cstr2inum): deny "0_". + +Thu Dec 27 01:54:02 2001 Nobuyoshi Nakada + + * bignum.c (rb_cstr2inum): allow "0\n" and so on. + +Wed Dec 26 19:24:21 2001 Yukihiro Matsumoto + + * error.c (rb_invalid_str): utility function to show inspect()'ed + string. + + * bignum.c (rb_cstr2inum): prints invalid strings in inspect()'ed + format. + + * object.c (rb_Float): ditto. + +Wed Dec 26 02:41:29 2001 Yukihiro Matsumoto + + * object.c (rb_convert_type): no longer use rb_rescue(). + +Tue Dec 25 18:32:16 2001 K.Kosako + + * re.c (rb_reg_search): initialize taint status of match object. + +Tue Dec 25 02:37:49 2001 Tanaka Akira + + * lib/pp.rb, lib/prettyprint.rb: new files. + +Tue Dec 25 02:11:17 2001 Yukihiro Matsumoto + + * object.c (rb_convert_type): check method response check before + invoking rb_rescue(). + + * object.c (rb_check_convert_type): ditto. + +Mon Dec 24 02:37:40 2001 Le Wang + + * misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): + fix font-lock problem [ruby-talk:29296]. + +Sat Dec 22 22:52:14 2001 Yukihiro Matsumoto + + * time.c (time_timeval): wrong cast to time_t. + + * time.c (time_plus): ditto. + +Fri Dec 21 20:33:34 2001 K.Kosako + + * parse.y (str_extend): make up "#$;" handling. + +Fri Dec 21 16:18:17 2001 Nobuyoshi Nakada + + * dln.h, ruby.h, util.h: enable prototypes in C++. + +Fri Dec 21 15:12:41 2001 Yukihiro Matsumoto + + * time.c (time_plus): result should not be negative unless + NEGATIVE_TIME_T is defined. + + * time.c (time_new_internal): should check tv_sec overflow too. + + * time.c (time_timeval): should check time_t range when time is + initialized from float. + + * time.c (time_plus): uses modf(3). + +Fri Dec 21 03:15:52 2001 Nobuyoshi Nakada + + * eval.c (rb_mod_define_method): must not convert Method to Proc. + +Fri Dec 21 01:17:57 2001 Nobuyoshi Nakada + + * lib/mkmf.rb (with_destdir): new. + + * lib/mkmf.rb: prefix target directories with $(DESTDIR) all. + + * lib/mkmf.rb: no need to mkdir $(libdir) + +Thu Dec 20 14:08:20 2001 Minero Aoki + + * lib/net/protocol.rb: rename Net::Socket to Net::BufferedSocket + +Thu Dec 20 13:51:52 2001 K.Kosako + + * variable.c (rb_cvar_set): add frozen class/module check. + + * variable.c (rb_cvar_declare): add frozen class/module check. + +Thu Dec 20 01:01:50 2001 takuma ozawa + + * re.c (match_to_a): should propagate taint. + + * re.c (rb_reg_s_quote): ditto. + +Wed Dec 19 16:58:29 2001 Shugo Maeda + + * ext/readline/readline.c: new methods + Readline::basic_word_break_characters, + Readline::basic_word_break_characters=, + Readline::completer_word_break_characters, + Readline::completer_word_break_characters=, + Readline::basic_quote_characters, + Readline::basic_quote_characters=, + Readline::completer_quote_characters, + Readline::completer_quote_characters=, + Readline::filename_quote_characters, + Readline::filename_quote_characters=. + +Wed Dec 19 14:05:00 2001 Yukihiro Matsumoto + + * eval.c (rb_mod_define_method): define_method should follow + default method visibility. + + * eval.c (rb_attr): should warn if the default method visibility + is "module_function" (can be error). + + * eval.c (rb_mod_define_method): should define class/module method + also if the visibility is "module_function". + + * eval.c (rb_mod_define_method): should call hook method + "method_added", and "singleton_method_added". + +Wed Dec 19 11:42:13 2001 K.Kosako + + * string.c: use RESIZE_CAPA for capacity change. + +Wed Dec 19 03:08:40 2001 Tanaka Akira + + * lib/time.rb: date.rb is not required anymore. + + * lib/resolv.rb: fix document. refine IPv6 regex. + +Tue Dec 18 23:24:53 2001 Yukihiro Matsumoto + + * ext/socket/socket.c (Init_socket): add listen method to + TCPServer and UNIXServer. + +Tue Dec 18 17:54:53 2001 WATANABE Hirofumi + + * sample/test.rb: Hash#indexes -> Hash#select. + +Tue Dec 18 01:02:13 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): should not select a thread which is + not yet initialized. + +Mon Dec 17 18:53:49 2001 K.Kosako + + * string.c (rb_str_replace): swap arguments of OBJ_INFECT. + +Mon Dec 17 16:52:20 2001 Nobuyoshi Nakada + + * intern.h: add prototypes. + rb_gc_enable(), rb_gc_disable(), rb_gc_start(), rb_str_new5() + rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(), + rb_str_dup_frozen() + + * ruby.h: added declaration. + rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo + + * rubyio.h: changed double include guard macro to RUBYIO_H. + + * array.c (inspect_call): make static. + + * eval.c (dvar_asgn): ditto. + + * io.c (rb_io_close_read): ditto. + + * lex.c (rb_reserved_word): ditto. + + * ruby.c: (req_list_head, req_list_last): ditto. + + * ruby.c (require_libraries): ditto. + +Mon Dec 17 15:41:24 2001 Yukihiro Matsumoto + + * time.c (time_plus): wrong boundary check. + + * time.c (time_minus): ditto. + +Mon Dec 17 15:19:32 2001 Tanaka Akira + + * time.c: new method `gmtoff', `gmt_offset' and `utc_offset'. + (time_utc_offset): new function. + (Init_Time): bind above methods to `time_utc_offset'. + + * time.c: 64bit time_t support. + (time_s_at): use NUM2LONG instead of NUM2INT for tv_sec. + (time_arg): initialize tm_isdst correctly. + use long to initialize tm_year. + (search_time_t): renamed from `make_time_t'. + (make_time_t): call `timegm' and `mktime' instead of `search_time_t' + if available. + (time_to_i): use LONG2NUM instead of INT2NUM. + (time_localtime): check localtime failure. + (time_gmtime): check gmtime failure. + (time_year): use LONG2NUM instead of INT2FIX. + (time_to_a): use long for tm_year. + (time_dump): check tm_year which is not representable with 17bit. + (time_load): initialize tm_isdst. + + * configure.in: check existence of `mktime' and `timegm'. + check existence of tm_gmtoff field of struct tm. + fix negative time_t for 64bit time_t. + + * missing/strftime.c: fix overflow by tm_year + 1900. + + * lib/time.rb: use Time#utc_offset. + +Mon Dec 17 00:02:04 2001 Guy Decoux + + * variable.c (find_class_path): should initialize iv_tbl if it's + NULL. + +Fri Dec 14 04:23:36 2001 Minero Aoki + + * lib/net/pop.rb: new method Net::POP3.APOP + + * lib/net/http.rb: set default Content-Type to + x-www-form-urlencoded (causes warning) + + * lib/net/protocol.rb: remove Net::NetPrivate module. + + * lib/net/smtp.rb: ditto. + + * lib/net/pop.rb: ditto. + + * lib/net/http.rb: ditto. + +Fri Dec 14 00:16:06 2001 Yukihiro Matsumoto + + * class.c (rb_define_class): should return the existing class if + the class is already defined and its superclass is identical to + the specified superclass. + + * class.c (rb_define_class_under): ditto. + + * class.c (rb_define_module): should return the existing module if + the module is already defined. + +Thu Dec 13 09:52:59 2001 Yukihiro Matsumoto + + * time.c (time_new_internal): avoid loop to calculate negative + div, mod. + + * time.c (time_cmp): should handle Bignums. + +Tue Dec 11 17:39:16 2001 K.Kosako + + * array.c (rb_ary_pop): should ELTS_SHARED flag check before + REALLOC. + +Tue Dec 11 12:45:28 2001 Yukihiro Matsumoto + + * string.c (rb_str_match_m): should convert an argument into + regexp if it's a string. + +Tue Dec 11 03:40:23 2001 Yukihiro Matsumoto + + * array.c (rb_ary_select): Array#select(n,m,...) now works like + Array#indexes(n,m,..). [new, experimental] + + * hash.c (rb_hash_select): ditto. + + * hash.c (env_select): ditto. + + * re.c (match_select): ditto. + + * struct.c (rb_struct_select): ditto. + +Tue Dec 11 03:17:19 2001 Nobuyoshi Nakada + + * object.c (rb_class_real): follow included modules. + +Mon Dec 10 23:37:51 2001 Usaku Nakamura + + * util.h: change prototype of ruby_qsort() to accord with its + definition. + +Mon Dec 10 20:30:01 2001 K.Kosako + + * gc.c (STR_ASSOC): use FL_USER3 instead of FL_USER2. + +Mon Dec 10 17:40:02 2001 K.Kosako + + * parse.y (str_extend): make up pushback call. + +Mon Dec 10 02:09:28 2001 Yukihiro Matsumoto + + * array.c (rb_ary_modify): should copy the internal buffer if the + modifying buffer is shared. + + * array.c (ary_make_shared): make an internal buffer of an array + to be shared. + + * array.c (rb_ary_shift): avoid sliding an internal buffer by + using shared buffer. + + * array.c (rb_ary_subseq): avoid copying the buffer. + +Mon Dec 10 01:06:56 2001 Yukihiro Matsumoto + + * parse.y (gettable): should freeze __FILE__ string. + +Sun Dec 9 18:06:26 2001 Minero Aoki + + * lib/net/protocol.rb: calls on_connect before conn_command + +Sat Dec 8 23:27:44 2001 Yukihiro Matsumoto + + * io.c (rb_io_puts): old behavior restored. rationale: a) if you + want to call to_s for arrays, you can just call print a, "\n". + b) to_s wastes memory if array (and sum of its contents) is + huge. c) now any object that has to_ary is treated as an array, + using rb_check_convert_type(). + +Sat Dec 8 22:40:38 2001 Yukihiro Matsumoto + + * hash.c (rb_hash_initialize): now accepts a block to calculate + the default value. [new] + + * hash.c (rb_hash_aref): call "default" method to get the value + corresponding to the non existing key. + + * hash.c (rb_hash_default): get the default value based on the + block given to 'new'. Now it takes an optional "key" argument. + "default" became the method to get the value for non existing + key. Users may override "default" method to change the hash + behavior. + + * hash.c (rb_hash_set_default): clear the flag if a block is given + to 'new' + +Sat Dec 8 02:29:54 2001 Yukihiro Matsumoto + + * object.c (Init_Object): undef Data.allocate, left Data.new. + +Fri Dec 7 19:12:14 2001 Minero Aoki + + * lib/net/smtp.rb: SMTP.new requires at least one arg. + + * lib/net/pop.rb: POP.new requires at least one arg. + + * lib/net/pop.rb: uses "raise *Error.new" instead of simple raise. + + * lib/net/http.rb: HTTP.new requires at least one arg. + + * lib/net/http.rb: changes implicit start algorithm. + +Fri Dec 7 15:49:39 2001 Usaku Nakamura + + * ext/extmk.rb.in: ignore adding -Wl,-R to DLDFLAGS when the directory + is $topdir. + +Fri Dec 7 13:58:58 2001 Yukihiro Matsumoto + + * ext/curses/curses.c (window_scrollok): use RTEST(). + + * ext/curses/curses.c (window_idlok): ditto. + + * ext/curses/curses.c (window_keypad): ditto. + + * ext/curses/curses.c (window_idlok): idlok() may return void on + some platforms; so don't use return value. + + * ext/curses/curses.c (window_scrollok): ditto for consistency. + + * ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT(). + +Fri Dec 7 09:51:00 2001 Yukihiro Matsumoto + + * parse.y (str_extend): should not process immature #$x and + #@x interpolation, e.g #@#@ etc. + +Fri Dec 7 03:21:18 2001 Yukihiro Matsumoto + + * enum.c (enum_sort_by): sort_by does not have to be stable always. + + * enum.c (enum_sort_by): call qsort directly to gain performance. + +Thu Dec 6 18:52:28 2001 Usaku Nakamura + + * ext/extmk.rb.in: add -Wl,-R flags to DLDFLAGS on netbsdelf. + + * lib/mkmf.rb: ditto. + +Thu Dec 6 09:15:14 2001 Yukihiro Matsumoto + + * util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe. + + * error.c (rb_sys_fail): it must be a bug if it's called when + errno == 0. + +Wed Dec 5 23:36:56 2001 Yukihiro Matsumoto + + * regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8. + +Wed Dec 5 20:05:18 2001 Florian Frank + + * ext/socket/socket.c (bsock_send): should raise EWOULDBLOCK + exception. + + * ext/socket/socket.c (s_recvfrom): ditto. + + * ext/socket/socket.c (s_accept): ditto. + + * ext/socket/socket.c (udp_send): ditto. + +Tue Dec 4 17:43:10 2001 Yukihiro Matsumoto + + * ruby.h (DUPSETUP): new SETUP macro for duplication. + + * time.c (time_dup): implement in Time class using DUPSETUP. + + * time.c (time_getlocaltime): new method; probably requires + better name than getlocaltime. [new,experimental] + + * time.c (time_getgmtime): ditto. + + * array.c (rb_ary_dup): uses DUPSETUP. + + * string.c (rb_str_dup): uses DUPSETUP. now properly copies + instance variables too. + +Tue Dec 4 03:49:06 2001 Yukihiro Matsumoto + + * io.c (io_fread): EAGAIN/EWOULDBLOCK should not terminate and + throw away the input. + + * time.c (time_new_internal): underflow adjustment must not use + negative div/mod. + + * time.c (time_cmp): should consider tv_usec on non Fixnum number + comparison. +Sun Dec 9 23:00:54 2001 Keiju Ishitsuka + * matrix.rb: Vector#* bug. reported from Massimiliano Mirra + . + +Sun Dec 9 22:15:59 2001 Nobuyoshi Nakada + + * enum.c (enum_sort_by): should replace with last elements. + +Mon Dec 3 16:06:57 2001 WATANABE Hirofumi + + * ext/socket/extconf.rb: remove -L/usr/local/lib. + + * configure.in: add -Wl,-export-dynamic on NetBSD. + +Mon Dec 3 16:04:16 2001 Usaku Nakamura + + * configure.in: not use X11BASE, since it's not always set. + +Mon Dec 3 13:53:49 2001 Tanaka Akira + + * time.c (rb_strftime): buffer length condition was wrong. + + * time.c (time_strftime): should backup buf to the original + buffer. + +Mon Dec 3 09:59:08 2001 Yukihiro Matsumoto + + * time.c (time_plus): must detect result overflow. + + * time.c (time_minus): ditto. + + * time.c (time_new_internal): round usec overflow and underflow + here. + + * time.c (time_plus): move operand overflow/underflow check to + time_new_internal(). + + * time.c (time_minus): ditto. + + * time.c (time_cmp): should consider tv_usec too. + +Mon Dec 3 03:32:22 2001 Usaku Nakamura + + * configure.in: apply patch from NetBSD's pkgsrc (patch-aa). + +Sun Dec 2 22:01:52 2001 WATANABE Hirofumi + + * configure.in: use GCC, not without_gcc. remove without_gcc. + + * ext/curses/extconf.rb: check for curses.h. + + * ext/dbm/extconf.rb: check if $CFLAGS includes DBM_HDR. + +Sat Dec 1 12:13:20 2001 Yukihiro Matsumoto + + * time.c (time_gmtime): time_modify() should be called even if tm + struct is not calculated yet. + +Fri Nov 30 17:02:55 2001 WATANABE Hirofumi + + * configure.in: set target_cpu to i386 on cygwin and mingw32. + + * configure.in: default --enable-shared to yes on cygwin and mingw32. + +Fri Nov 30 00:25:28 2001 Usaku Nakamura + + * README.EXT: Appendix B is duplicated. + + * README.EXT.ja: ditto. + +Thu Nov 29 00:28:07 2001 Yukihiro Matsumoto + + * string.c (rb_str_equal): object with to_str must be treated as a + string. + +Wed Nov 28 18:46:28 2001 Ville Mattila + + * eval.c (rb_thread_select): should subtract timeofday() from + limit, not reverse. + +Wed Nov 28 16:03:28 2001 K.Kosako + + * util.c (scan_hex): x is not a hexadecimal digit. + +Wed Nov 28 13:38:04 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): should treat the case that + select(2) returns 0, if a thread is under both WAIT_SELECT and + WAIT_TIME. Jakub Travnik actually fixed + this bug. + +Tue Nov 27 02:15:25 2001 Yukihiro Matsumoto + + * marshal.c (w_float): must distinguish -0.0 from 0.0. + +Mon Nov 26 20:57:24 2001 Akinori MUSHA + + * ext/Setup*, ext/syslog/*: import the "syslog" module from the + rough ruby project. + +Mon Nov 26 16:14:42 2001 K.Kosako + + * gc.c (gc_mark_all): tweak mark order for little bit better scan. + + * gc.c (rb_gc_mark): ditto. + + * gc.c (rb_gc): ditto. + +Mon Nov 26 16:54:59 2001 Usaku Nakamura + + * win32/win32.c (mypopen): fixed that mypclose() didn't really close + pipe. + + * win32/win32.c (CreateChild): set STARTF_USESTDHANDLES flag only + when some handles are passed. + +Mon Nov 26 16:31:28 2001 Yukihiro Matsumoto + + * enum.c (sort_by_i): slight performance boost. + +Sun Nov 25 21:02:18 2001 Usaku Nakamura + + * parse.y (str_extend): change types of second and third arguments + from char to int. + +Thu Nov 22 20:15:28 2001 TAMURA Takashi + + * gc.c (gc_mark_rest): should call gc_mark_children(), not gc_mark(). + + * gc.c (rb_gc_mark): may cause infinite loop. + +Thu Nov 22 00:28:13 2001 Yukihiro Matsumoto + + * parse.y (str_extend): should check nesting parentheses in #{}. + +Wed Nov 21 12:22:52 2001 Shugo Maeda + + * lib/cgi.rb: CGI#header: do not set Apache.request.status for + Location: if Apache.request.status is already set. + +Wed Nov 21 02:24:18 2001 Yukihiro Matsumoto + + * process.c (pst_wstopsig): returns nil unless WIFSTOPPED() is + non-zero. + + * process.c (pst_wtermsig): returns nil unless WIFSIGNALED() is + non-zero. + + * process.c (pst_wexitstatus): returns nil unless WIFEXITED() is + non-zero. + +Wed Nov 21 00:17:54 2001 Ville Mattila + + * eval.c (rb_thread_select): tv_sec and tv_usec should not be + negative. + + * signal.c (posix_signal): do not set SA_RESTART for SIGVTALRM. + +Tue Nov 20 21:09:22 2001 Guy Decoux + + * parse.y (call_args2): block_arg may follow the first argument in + call_args2. + +Tue Nov 20 02:01:15 2001 Yukihiro Matsumoto + + * eval.c (stack_check): should avoid stack length check during + raising SystemStackError exception. + +Tue Nov 20 01:07:13 2001 Yukihiro Matsumoto + + * parse.y (str_extend): should not terminate string interpolation + with newlines in here-docs and newline terminated strings. + +Mon Nov 19 17:58:49 2001 Yukihiro Matsumoto + + * eval.c (rb_mod_modfunc): should follow NODE_ZSUPER link; based + on Guy Decoux's patch in [ruby-talk:25478]. + +Mon Nov 19 16:09:33 2001 Tanaka Akira + + * string.c (rb_str_succ): there was buffer overrun. + +Mon Nov 19 14:14:58 2001 Yukihiro Matsumoto + + * parse.y (str_extend): term can be any character. + +Mon Nov 19 04:58:42 2001 Wakou Aoyama + + * lib/cgi.rb (header): support for Apache. thanks to + Shugo Maeda . + +Sun Nov 18 19:37:55 2001 Nobuyoshi Nakada + + * parse.y: needless conditionals. + + * parse.y (parse_regx): parse error at unterminated regex /#{. + (ruby-bugs-ja:PR#142) + +Sat Nov 17 12:37:39 2001 Yukihiro Matsumoto + + * pack.c (pack_unpack): should give length to utf8_to_uv(). + + * pack.c (utf8_to_uv): add length check. + +Sat Nov 17 01:41:52 2001 Yukihiro Matsumoto + + * massages: replace "wrong #" by "wrong number". + + * marshal.c (w_float): output Infinity and NaN explicitly. + + * marshal.c (r_object): support new explicit float format. + + * eval.c (rb_thread_wait_for): select may cause ERESTART on + Solaris. + + * eval.c (rb_thread_select): ditto. + +Thu Nov 15 15:29:39 2001 Nobuyoshi Nakada + + * array.c (rb_ary_join): non-nil separator must be converted to + String. and separators' total length was wrong. + +Thu Nov 15 03:37:17 2001 Usaku Nakamura + + * hash.c (ruby_setenv): remove USE_WIN32_RTL_ENV block since it's + obsoleted. + + * win32/win32.c, win32/win32.h: sort out #if 0 - #endif or others. + +Thu Nov 15 00:07:12 2001 Yukihiro Matsumoto + + * array.c (rb_ary_to_s): if rb_output_fs is nil, insert newlines + between array elements (use rb_default_rs as newline literal) + [experimental]. + +Wed Nov 14 15:16:23 2001 K.Kosako + + * gc.c (init_mark_stack): no need to clear mark_stack. + + * gc.c (gc_mark_all): need to handle finalizer mark. + + * gc.c (gc_mark_rest): use MEMCPY instead of memcpy. + + * gc.c (rb_gc_mark): earlier const check to avoid pusing special + constants into mark stack. + +Wed Nov 14 01:12:07 2001 Usaku Nakamura + + * win32/win32.c (waitpid): fix wait count. + + * win32/win32.c (poll_child_status): rename from wait_child(). + +Wed Nov 14 01:33:49 2001 Yukihiro Matsumoto + + * numeric.c (fix_to_s): 'to_s' now takes optional argument to + specify radix. [new] + + * bignum.c (rb_big_to_s): ditto. [new] + +Tue Nov 13 19:50:30 2001 WATANABE Hirofumi + + * configure.in: do not override CC if set. + +Tue Nov 13 16:49:16 2001 Usaku Nakamura + + * win32/win32.c (mypopen): return error status instead of calling + rb_sys_fail(). + + * win32/win32.c (do_spawn): ditto. + +Tue Nov 13 14:39:11 2001 WATANABE Tetsuya + + * signal.c (sighandle): should not re-register sighandler if + POSIX_SIGNAL is defined. + +Tue Nov 13 12:55:59 2001 Usaku Nakamura + + * win32/win32.c (do_spawn): use CreateChild() instead of calling + CreateProcess() directly. Original patches comes from Patrick Cheng. + + * win32/win32.c (mypopen): ditto. + + * win32/win32.c (mypclose): use rb_syswait() instead of waiting in this + function. + + * win32/win32.c (waitpid): use wait_child() instead of _cwait(). + + * win32/win32.c (CreateChild): added. [new] + + * win32/win32.c (wait_child): added. [new] + + * win32/win32.c (FindFirstChildSlot): added. [new] + + * win32/win32.c (FindChildSlot): added. [new] + + * win32/win32.c (FindPipedChildSlot): added. [new] + + * win32/win32.c (CloseChildHandle): added. [new] + + * win32/win32.c (FindFreeChildSlot): added. [new] + +Tue Nov 13 12:38:12 2001 Usaku Nakamura + + * hash.c (envix): use GET_ENVIRON and FREE_ENVIRON to get environment + variables list. + + * hash.c (env_keys): ditto. + + * hash.c (env_each_key): ditto. + + * hash.c (env_values): ditto. + + * hash.c (env_keys): ditto. + + * hash.c (env_each_value): ditto. + + * hash.c (env_each): ditto. + + * hash.c (env_inspect): ditto. + + * hash.c (env_to_a): ditto. + + * hash.c (env_size): ditto. + + * hash.c (env_empty_p): ditto. + + * hash.c (env_has_value): ditto. + + * hash.c (env_index): ditto. + + * hash.c (env_to_hash): ditto. + + * win32/win32.c (win32_getenv): use static buffer. + + * win32/win32.c, win32/win32.h (win32_get_environ): get environment + variables list. [new] + + * win32/win32.c, win32/win32.h (win32_free_environ): free environment + variables list. [new] + +Mon Nov 12 16:48:48 2001 Yukihiro Matsumoto + + * eval.c (error_print): errat array may be empty. + +Mon Nov 12 01:30:37 2001 Yukihiro Matsumoto + + * eval.c (rb_eval_cmd): should not upgrade safe level unless + explicitly specified by argument newly added. + + * signal.c (sig_trap): should not allow tainted trap closure. + + * variable.c (rb_f_trace_var): should not allow trace_var on safe + level higher than 3. + + * variable.c (rb_f_trace_var): should not allow tainted trace + closure. + +Sun Nov 11 00:12:23 2001 TAMURA Takashi + + * gc.c: do not use static stack until system stack overflows. + +Sat Nov 10 03:57:09 2001 Yukihiro Matsumoto + + * eval.c (eval): should call Exception#exception instead of + calling rb_exc_new3() directly. + + * error.c (exc_exception): set "mesg" directly to the clone. it + might be better to set mesg via some method for flexibility. + +Sat Nov 10 00:14:24 2001 Yukihiro Matsumoto + + * variable.c (cvar_override_check): should print original module + name, if 'a' is T_ICLASS. + + * parse.y (yylex): float '1_.0' should not be allowed. + + * variable.c (var_getter): should care about var as Qfalse + (ruby-bugs#PR199). + +Fri Nov 9 13:50:06 2001 Usaku Nakamura + + * win32/config.status.in: make CFLAGS same as Makefile's one. + +Thu Nov 8 20:20:37 2001 Nobuyoshi Nakada + + * eval.c (rb_trap_eval): avoid annoying warning with signal. + [ruby-talk:23225] + + * eval.c (rb_call0): adjust caller source file/line while + evaluating optional arguments. + +Thu Nov 8 18:41:58 2001 Yukihiro Matsumoto + + * array.c (cmpint): <=> or block for {min,max} may return bignum. + + * array.c (sort_1): use rb_compint. + + * array.c (sort_2): ditto. + + * enum.c (min_ii): ditto. + + * enum.c (min_ii): ditto. + + * enum.c (max_i): ditto. + + * enum.c (max_ii): ditto. + +Thu Nov 8 18:21:02 2001 Yukihiro Matsumoto + + * file.c (path_check_1): forgot to initialize 'p'. + +Thu Nov 8 14:52:15 2001 Tanaka Akira + + * mkconfig.rb: use String#dump to generate Ruby string literal. + +Thu Nov 8 15:46:54 2001 Yukihiro Matsumoto + + * range.c (range_eql): should override 'eql?' + + * array.c (rb_ary_hash): should override 'hash' too. + +Tue Nov 6 14:38:48 2001 Yukihiro Matsumoto + + * process.c (security): always give warning for insecure PATH. + + * dir.c (my_getcwd): do not rely on MAXPATHLEN. + + * file.c (rb_file_s_readlink): ditto. + + * file.c (path_check_1): ditto. + +Tue Nov 6 14:17:14 2001 Amos Gouaux + + * lib/net/imap.rb (getquota_response): use astring for mailbox + names. + + * lib/net/imap.rb (getacl_response): ditto. + +Mon Nov 5 17:09:55 2001 Yukihiro Matsumoto + + * eval.c (rb_yield_0): should not call rb_f_block_given_p(). + +Sat Nov 3 23:33:18 2001 Yukihiro Matsumoto + + * string.c (rb_str_chomp_bang): should terminate string by NUL. + +Sat Nov 3 22:28:51 2001 Keiju Ishitsuka + + * matrix.rb (Matrix#column_vectors, Matrix#row_vectors): ditto bug. + this bug report and fix by tsutomu@nucba.ac.jp. + + * forwardable.rb: change raise to Kernel::raise + +Sat Nov 3 10:11:57 2001 Yukihiro Matsumoto + + * eval.c (rb_yield_0): better error message. + +Thu Nov 1 14:08:42 2001 Yukihiro Matsumoto + + * bignum.c (rb_big_aref): idx may be a Bignum. + + * numeric.c (fix_aref): negative index must return zero. + +Thu Nov 1 13:23:50 2001 Yukihiro Matsumoto + + * gc.c (gc_mark_children): should NOT treat last element of + structs and arrays specially. + +Wed Oct 31 16:59:25 2001 Yukihiro Matsumoto + + * eval.c (exec_under): should initialize ruby_frame->self; + +Wed Oct 31 15:09:28 2001 Yukihiro Matsumoto + + * eval.c (POP_VARS): should not set DVAR_DONT_RECYCLE if _old + ruby_vars is already force_recycled. + +Wed Oct 31 10:28:49 2001 Yukihiro Matsumoto + + * gc.c (rb_gc): handles mark stack overflow. + + * gc.c (PUSH_MARK): use static mark stack, no more recursion. + +Wed Oct 31 02:44:06 2001 Wakou Aoyama + + * lib/cgi.rb: CGI::Cookie::parse(): Ignore duplicate keys caused by + Netscape bug. + +Tue Oct 30 18:21:51 2001 Usaku Nakamura + + * win32/mkexports.rb: follow the change of rb_io_puts(). + +Tue Oct 30 14:04:04 2001 Yukihiro Matsumoto + + * string.c (rb_str_chomp_bang): do smart chomp if $/ == '\n'. [new] + + * io.c (rb_io_puts): don't treat Array specially. + + * bignum.c (rb_big_cmp): should convert bignum to float. + + * eval.c (rb_f_eval): can't modify untainted binding. + +Mon Oct 29 16:08:30 2001 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should preserve p0 value. + +Mon Oct 29 14:56:44 2001 Usaku Nakamura + + * intern.h (rb_protect_inspect): follow the change of array.c. + + * eval.c (rb_exec_end_proc): follow the change of rb_protect(). + + * eval.c (method_proc, umethod_proc, rb_catch): cast the first + parameter of rb_iterate() to avoid VC++ warning. + + * range.c (range_step): ditto. + + * ext/sdbm/init.c (fsdbm_update, fsdbm_replace): ditto. + +Mon Oct 29 07:57:31 2001 Yukihiro Matsumoto + + * parse.y (str_extend): should allow interpolation of $-x. + + * variable.c (rb_cvar_set): empty iv_tbl may cause infinite loop. + + * variable.c (rb_cvar_get): ditto. + + * variable.c (cvar_override_check): ditto. + +Sat Oct 27 23:01:19 2001 Yukihiro Matsumoto + + * bignum.c (rb_big_eq): convert Bignum to Float, instead of + reverse. + +Fri Oct 26 06:19:29 2001 Yukihiro Matsumoto + + * time.c (time_localtime): getting tm should not be prohibited for + frozen time objects. + + * time.c (time_gmtime): ditto. + + * version.c (Init_version): freeze RUBY_VERSION, + RUBY_RELEASE_DATE, and RUBY_PLATFORM. + + * file.c (Init_File): freeze File::SEPARATOR, ALT_SEPARATOR and + PATH_SEPARATOR. + + * file.c (rb_stat_cmp): should check operand type before calling + get_stat(). + +Thu Oct 25 10:28:15 2001 Yukihiro Matsumoto + + * eval.c (rb_eval_cmd): should not invoke "call" with a block on + any occasion. + +Wed Oct 24 03:25:31 2001 Yukihiro Matsumoto + + * numeric.c (fix_aref): idx may be a Bignum. + +Tue Oct 23 01:21:19 2001 Nobuyoshi Nakada + + * eval.c (proc_invoke): fix self switching in Proc#call + (ruby-bugs-ja#PR108) and GC failure. use Qundef instead of 0 + to direct not switching self. + + * eval.c (call_trace_func): ditto. + + * eval.c (call_end_proc): ditto. + + * eval.c (proc_call): ditto. + + * eval.c (proc_yield): ditto. + +Tue Oct 23 01:15:43 2001 K.Kosako + + * variable.c (rb_global_entry): reconstruct global variable + aliasing (sharing global_entry->var with other global_entry). + + * variable.c (undef_getter): ditto. + + * variable.c (undef_setter): ditto. + + * variable.c (val_setter): ditto. + + * variable.c (mark_global_entry): ditto. + + * variable.c (rb_define_hooked_variable): ditto. + + * variable.c (rb_f_trace_var): ditto. + + * variable.c (remove_trace): ditto. + + * variable.c (rb_f_untrace_var): ditto. + + * variable.c (rb_gvar_get): ditto. + + * variable.c (trace_en): ditto. + + * variable.c (rb_gvar_set): ditto. + + * variable.c (rb_gvar_defined): ditto. + + * variable.c (rb_alias_variable): ditto. + +Mon Oct 22 18:53:55 2001 Masahiro Tanaka + + * numeric.c (num_remainder): a bug in Numeric#remainder. + +Mon Oct 22 15:21:55 2001 Yukihiro Matsumoto + + * eval.c (rb_exec_end_proc): END might be called within END + block. + + * class.c (rb_mod_clone): should not copy class name, since clone + should remain anonymous. + +Fri Oct 19 23:40:37 2001 Nobuyoshi Nakada + + * variable.c (remove_trace): should not access already freed area. + + * variable.c (rb_f_untrace_var): fix memory leak. + +Fri Oct 19 17:55:14 2001 Nobuyoshi Nakada + + * marshal.c (w_uclass): cloned class is not user + class. (ruby-bugs-ja#PR103) + + * marshal.c (r_object): Struct subclass couldn't + load. (ruby-bugs-ja#PR104) + +Wed Oct 17 14:12:50 2001 Nobuyoshi Nakada + + * variable.c (alias_fixup): added. ad hoc support for ordinary + global variable aliasing. when original entry is set, make the + alias to refer directly as possible. + + * variable.c (alias_getter, alias_setter): ditto. + + * variable.c (rb_alias_variable): ditto. and no need to mark alias + variables. + + * variable.c (rb_gvar_defined): refer the original entry of an alias. + +Tue Oct 16 23:29:26 2001 Yukihiro Matsumoto + + * eval.c (rb_call0): self in a block given to define_method now be + switched to the receiver of the method. + + * eval.c (proc_invoke): added new parameter to allow self + switching. + +Tue Oct 16 21:38:15 2001 Nobuyoshi Nakada + + * eval.c (rb_f_missing): check stack level with rb_stack_check(). + + * eval.c (rb_call0): ditto. + + * eval.c, intern.h (rb_stack_check): added. [new] + +Tue Oct 16 13:18:47 2001 Nobuyoshi Nakada + + * object.c (rb_mod_initialize): optional block with + Module.new. [new] (from 2001-10-10) + +Tue Oct 16 00:07:06 2001 Nobuyoshi Nakada + + * parse.y (yylex): disallow alpha-numeric and mbchar for + terminator of %string. + +Mon Oct 15 18:00:05 2001 Pit Capitain + + * string.c (rb_str_index): wrong increment for non alphanumeric + string. + +Mon Oct 15 05:23:02 2001 Koji Arai + + * sprintf.c (rb_f_sprintf): support "%B". + +Wed Oct 10 03:11:47 2001 Yukihiro Matsumoto + + * file.c (rb_stat_clone): should copy internal data too. + + * numeric.c (num_clone): Numeric should not be copied by clone. + + * object.c (rb_obj_clone): should check immediate values. + + * parse.y (command): `yield' should take command_args. + + * parse.y (parse_quotedwords): %w(...) is not a string. + +Tue Oct 9 18:40:35 2001 WATANABE Hirofumi + + * process.c (Init_process): activate the case NT. + +Tue Oct 9 17:08:00 2001 Nobuyoshi Nakada + + * eval.c (thread_status_name): separated from + rb_thread_inspect(). return string expression for thread status. + + * eval.c (rb_thread_status, rb_thread_inspect): use + thread_status_name(). + + * eval.c (rb_thread_priority_set): return the priority not but + self. + +Sat Oct 6 23:07:08 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): NODE_MATCH3 was confusing left and right. sigh. + +Fri Oct 5 15:19:46 2001 Yukihiro Matsumoto + + * marshal.c (w_unique): should not dump anonymous class. + +Fri Oct 5 11:59:13 2001 Nobuyoshi Nakada + + * eval.c (proc_s_new): revived. + + * eval.c (Init_Proc): define Proc.new instead of Proc.allocate to + inhibit from creating uninitialized Proc. + +Thu Oct 4 14:11:03 2001 WATANABE Hirofumi + + * ext/socket/socket.c (ruby_connect): EALREADY is the equivalent + for EINPROGRESS in ws2_32.lib. + +Wed Oct 3 20:11:06 2001 Nobuyoshi Nakada + + * re.c (rb_reg_s_alloc): avoid infinite recursion. + +Wed Oct 3 16:49:49 2001 Nobuyoshi Nakada + + * ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now. + +Wed Oct 3 13:32:06 2001 Yukihiro Matsumoto + + * marshal.c (r_object): better allocation type check for + TYPE_UCLASS. usage of allocation framework is disabled for now. + + * variable.c (rb_class_path): Module may have subclass. + + * string.c (rb_str_update): should maintain original negative + offset. + + * string.c (rb_str_subpat_set): ditto + + * string.c (rb_str_aset): ditto. + + * re.c (rb_reg_nth_match): should check negative nth. + + * re.c (rb_reg_nth_defined): ditto. + +Tue Oct 2 19:12:47 2001 WATANABE Hirofumi + + * lib/ftools.rb (catname): allow trailing '/' for the destination. + +Tue Oct 2 18:31:20 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): should override existing class. + +Tue Oct 2 17:08:49 2001 Yukihiro Matsumoto + + * object.c (rb_obj_alloc): general instance allocation framework. + use of NEWOBJ() is deprecated except within 'allocate' method. + +Tue Oct 2 08:04:52 2001 Nobuyoshi Nakada + + * marshal.c (r_object): TYPE_UCLASS check should be inversed. + +Mon Oct 1 19:18:54 2001 Tanaka Akira + + * ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0. + + * ext/socket/socket.c (unix_peeraddr): getpeername(2) may result + len = 0. + +Mon Oct 1 09:59:07 2001 Yukihiro Matsumoto + + * string.c (rb_str_subpat_set): support function for new argument + pattern String#[re,offset] = val. [new] + +Sat Sep 29 02:30:06 2001 Yukihiro Matsumoto + + * eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much. + Should not be called if SCOPE_DONT_RECYCLE is set. + +Wed Sep 26 22:21:52 2001 Yukihiro Matsumoto + + * string.c (rb_str_aref_m): new argument pattern + String#[re,offset]. [new] + +Wed Sep 26 19:02:39 2001 Guy Decoux + + * parse.y: allow 'primary[] = arg' + +Tue Sep 25 10:46:42 2001 Usaku Nakamura + + * win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector + (Tietew 's patch). + +Mon Sep 24 00:55:06 2001 Yukihiro Matsumoto + + * string.c (rb_str_substr): should return an instance of + receiver's class. + + * string.c (rb_str_succ): ditto. + + * array.c (rb_ary_subseq): ditto. + + * array.c (rb_ary_initialize): Array.new([1,2,3]) => [1,2,3]. [new] + +Sat Sep 22 22:16:08 2001 Yukihiro Matsumoto + + * string.c (rb_str_reverse): should return an instance of + receiver's class. + + * string.c (rb_str_times): ditto. + + * array.c (rb_ary_times): ditto + + * string.c (str_gsub): ditto. + + * string.c (rb_str_ljust): ditto. + + * string.c (rb_str_rjust): ditto. + + * string.c (rb_str_center): ditto. + +Sat Sep 22 12:13:39 2001 Yukihiro Matsumoto + + * eval.c (eval): retrieves file, line information from binding. + +Thu Sep 20 21:25:00 2001 Nobuyoshi Nakada + + * eval.c (MATCH_DATA): access via rb_svar(). + +Thu Sep 20 15:20:00 2001 Nobuyoshi Nakada + + * eval.c, intern.h (rb_svar): return reference to special variable + from local variable index. [new] + + * eval.c (rb_eval): use rb_svar() for NODE_FLIP{2,3}. + + * parse.y (rb_(backref|lastline)_(get|set)): access via rb_svar(). + + * eval.c (proc_invoke): push dynamic variables. + + * eval.c (rb_thread_yield): push special variables as dynamic + variables($_, $~ and FLIP states). + +Thu Sep 20 15:20:00 2001 Nobuyoshi Nakada + + * intern.h, parse.y (rb_is_local_id): return true if the ID is + local symbol. [new] + + * parse.y (internal_id): make new ID for internal use. [new] + + * parse.y (cond0): allocate internal ID for NODE_FLIP{2,3}. + + * eval.c (rb_f_local_variables): use rb_is_local_id() to select + visible local variables. + +Thu Sep 20 15:20:00 2001 Nobuyoshi Nakada + + * eval.c (rb_thread_start_0): SCOPE_SHARED is removed. + + * eval.c, intern.h (rb_thread_scope_shared_p): removed. special + variables are no longer shared by threads. + + * re.c (rb_reg_search): MATCHDATA is no longer shared by threads. + +Tue Sep 18 11:44:26 2001 Yukihiro Matsumoto + + * string.c (rb_str_init): String.new() => "" [new] + +Tue Sep 11 20:53:56 2001 Yukihiro Matsumoto + + * dir.c (dir_path): new method. + + * dir.c (dir_initialize): wrap DIR into struct, along with path + information. + +Sat Sep 8 07:13:42 2001 Wakou Aoyama + + * lib/net/telnet.rb: waitfor(): improvement. thanks to + nobu.nakada@nifty.ne.jp + +Sat Sep 8 04:34:17 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_restore_context): save current value of + lastline and lastmatch in the thread struct for later restore. + + * eval.c (rb_thread_save_context): restore lastline and lastmatch. + +Fri Sep 7 11:27:56 2001 akira yamada + + * numeric.c (flo_to_s): should handle negative float value. + +Fri Sep 7 09:44:44 2001 Wakou Aoyama + + * lib/net/telnet.rb: waitfor(): bug fix. + +Fri Sep 7 07:11:34 2001 Wakou Aoyama + + * lib/cgi.rb: CGI#doctype(): bug fix (html4Fr). + + * lib/net/telnet.rb, lib/cgi.rb: remove VERSION, RELEASE_DATE, + VERSION_CODE, RELEASE_CODE. please use REVISION. + + * lib/cgi.rb: CGI#header(): bug fix. + + * lib/net/telnet.rb, lib/cgi.rb: concat --> += + +Thu Sep 6 17:38:18 2001 Nobuyoshi Nakada + + * dir.c (dir_s_chdir): raise if environment variable HOME/LOGDIR + not set. + + * dir.c (glob_helper): avoid infinite loop on a file name with + wildcard characters. (ruby-bugs#PR177) + +Thu Sep 6 14:25:15 2001 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_s_hexdigest): remove a debug + print. + +Thu Sep 6 13:56:14 2001 Akinori MUSHA + + * ext/digest/digest.c (rb_digest_base_s_digest, + rb_digest_base_s_hexdigest): ensure that a string is given. + +Thu Sep 6 13:28:51 2001 WATANABE Hirofumi + + * lib/jcode.rb (_regexp_quote): fix quote handling, again. + +Thu Sep 6 07:28:56 2001 Nobuyoshi Nakada + + * file.c (rb_find_file_ext): add const qualifiers to ext. + + * intern.h (rb_find_file_ext): ditto. + +Thu Sep 6 07:16:14 2001 Nobuyoshi Nakada + + * ext/socket/socket.c (Init_socket): remove duplicating constants. + +Thu Sep 6 03:15:24 2001 Yukihiro Matsumoto + + * class.c (rb_include_module): should check whole ancestors to + avoid duplicate module inclusion. + +Wed Sep 5 20:02:27 2001 Shin'ya Adzumi + + * string.c (trnext): should check backslash before updating "now" + position. + +Wed Sep 5 17:41:11 2001 WATANABE Hirofumi + + * lib/jcode.rb (_regexp_quote): fix quote handling. + +Tue Sep 4 01:03:18 2001 Yukihiro Matsumoto + + * re.c (Init_Regexp): to_s to be alias to inspect. + +Mon Sep 3 22:46:59 2001 Yukihiro Matsumoto + + * parse.y (yylex): should support 'keyword='. + +Mon Sep 3 20:26:08 2001 Nobuyoshi Nakada + + * intern.h (rb_find_file_ext): changed from rb_find_file_noext(). + +Mon Sep 3 15:12:49 2001 Yukihiro Matsumoto + + * ruby.c (proc_options): should not adjust argc/argv if -e option + is supplied. + +Mon Sep 3 14:11:17 2001 Akinori MUSHA + + * error.c: unbreak the build on *BSD with gcc 3.0.1 by removing + the conflicting declaration of sys_nerr for *BSD. + +Sat Sep 1 18:50:07 2001 Yukihiro Matsumoto + + * ruby.c (proc_options): should not alter origargv[]. + + * ruby.c (set_arg0): long strings for $0 dumped core. + +Sat Sep 1 09:50:54 2001 Nobuyoshi Nakada + + * ruby.c (set_arg0): prevent SEGV when val is longer than the + original arguments. + + * ruby.c (ruby_process_options): initialize total length of + original arguments at first. + +Sat Sep 1 14:05:28 2001 Brian F. Feldman + + * ruby.c (set_arg0): use setprogtitle() if it's available. + +Sat Sep 1 03:49:11 2001 Yukihiro Matsumoto + + * io.c (rb_io_popen): accept integer flags as mode. + +Fri Aug 31 19:46:05 2001 Nobuyoshi Nakada + + * file.c (rb_find_file_ext): extension table can be supplied from + outside. renamed. + + * eval.c (rb_f_require): replace rb_find_file_noext by + rb_find_file_ext. + +Fri Aug 31 19:26:55 2001 Nobuyoshi Nakada + + * eval.c (rb_provided): should also check feature without + extension. + +Fri Aug 31 13:06:33 2001 Yukihiro Matsumoto + + * numeric.c (flo_to_s): do not rely on decimal point to be '.' + +Wed Aug 29 02:18:53 2001 Yukihiro Matsumoto + + * parse.y (yylex): ternary ? can be followed by newline. + +Tue Aug 28 00:40:48 2001 Yukihiro Matsumoto + + * eval.c (rb_f_require): should check static linked libraries + before raising exception. + +Fri Aug 24 15:17:40 2001 Yukihiro Matsumoto + + * array.c (rb_ary_equal): check identity equality first. + + * string.c (rb_str_equal): ditto. + + * struct.c (rb_struct_equal): ditto. + +Fri Aug 24 14:38:17 2001 Usaku Nakamura + + * dln.c (dln_strerror): fix a bug that sometimes made null message on + win32 (Tietew 's patch). + + * win32/win32.c (mystrerror): ditto. + +Fri Aug 24 03:15:07 2001 Yukihiro Matsumoto + + * numeric.c (Init_Numeric): undef Integer::new. + +Fri Aug 24 00:46:44 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): NODE_WHILE should update result for each + conditional evaluation. + + * eval.c (rb_eval): NODE_UNTIL should return last evaluated value + (or value given to break). + +Thu Aug 23 21:59:38 2001 Nobuyoshi Nakada + + * enum.c (sort_by_i): fix typo. + +Thu Aug 23 10:10:59 2001 Yukihiro Matsumoto + + * eval.c (is_defined): should not dump core for "defined?(())". + + * eval.c (umethod_bind): recv can be an instance of descender of + oklass if oklass is a Module. + +Wed Aug 22 23:20:03 2001 Yukihiro Matsumoto + + * hash.c (rb_hash_equal): check identity equality first. + +Wed Aug 22 19:58:59 2001 Nobuyoshi Nakada + + * eval.c (intersect_fds): counts intersecting fds. + + * eval.c (rb_thread_schedule): only fds requested by + each thread count as select_value. + +Tue Aug 21 22:28:09 2001 Nobuyoshi Nakada + + * file.c (group_member): should check real gid only. + + * file.c (eaccess): do not cache euid, since effective euid may be + changed via Process.euid=(). + + * file.c (eaccess): return -1 unless every specified access mode + is permitted. + +Tue Aug 21 16:09:27 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): while/until returns the value which is given + to break. + + * parse.y (value_expr): using while/until/class/def as an + expression is now gives a warning, not an error. + +Tue Aug 21 11:56:02 2001 Yukihiro Matsumoto + + * range.c (range_eqq): should compare strings based on magical + increment (using String#upto), not dictionary order. + +Mon Aug 20 19:53:16 2001 WATANABE Hirofumi + + * ext/digest/sha2/extconf.rb: fix support for cross-compiling. + + * mkconfig.rb: fix support for autoconf 2.52. + +Mon Aug 20 17:24:15 2001 Yukihiro Matsumoto + + * enum.c (enum_sort_by): new method for Schewartzian transformed + stable sort. + +Mon Aug 20 16:09:05 2001 Yukihiro Matsumoto + + * variable.c (mod_av_set): detect constant overriding for built-in + classes/modules. + +Mon Aug 20 15:14:27 2001 Yukihiro Matsumoto + + * parse.y (tokadd_escape): escaped backslashes too much. + +Mon Aug 20 13:24:08 2001 Yukihiro Matsumoto + + * range.c (range_step): 'iter' here should be an array. + +Mon Aug 20 12:43:08 2001 Yukihiro Matsumoto + + * marshal.c (w_object): should retrieve __member__ data from + non-singleton class. + +Sat Aug 18 23:11:14 2001 Yukihiro Matsumoto + + * variable.c (rb_cvar_get): class variable override check added. + + * variable.c (rb_cvar_set): ditto + + * variable.c (rb_cvar_declare): ditto. + +Fri Aug 17 12:13:48 2001 Minero Aoki + + * lib/net/protocol.rb: Protocol.new requires at least one arg. + + * lib/net/smtp.rb: ditto. + + * lib/net/pop.rb: ditto. + + * lib/net/http.rb: ditto. + +Fri Aug 17 00:49:51 2001 Yukihiro Matsumoto + + * parse.y (parse_regx): handle backslash escaping of delimiter here. + +Thu Aug 16 23:03:40 2001 Koji Arai + + * io.c: prevent recursive malloc calls on NEC UX/4800. + + * ext/socket/socket.c: ditto. + +Thu Aug 16 13:54:04 2001 Usaku Nakamura + + * ext/socket/socket.c (s_recvfrom): fix typo. + +Thu Aug 16 09:53:28 2001 Usaku Nakamura + + * ext/socket/socket.c (s_recvfrom): avoid VC++6 warning. + +Thu Aug 16 03:50:33 2001 Usaku Nakamura + + * win32/win32.c (NtCmdGlob): avoid VC++ warning. + + * lib/mkmf.rb: add -I$(srcdir) to CPPFLAGS. + +Wed Aug 15 04:59:15 2001 Akinori MUSHA + + * ext/digest/*/extconf.rb: really fix so that they build from any + directory. + +Wed Aug 15 04:04:02 2001 Akinori MUSHA + + * ext/digest/sha2/extconf.rb: fix so that they build from any + directory. + +Wed Aug 15 01:59:19 2001 Akinori MUSHA + + * ext/digest/defs.h: Define NO_UINT64_T instead of emitting an + error to fail. + + * ext/digest/sha2/extconf.rb: Do not exit on error, and utilize + NO_UINT64_T to detect if the system has a 64bit integer type. + +Tue Aug 14 21:14:07 2001 Akinori MUSHA + + * ext/digest/sha2/extconf.rb: do not create Makefile when no 64bit + integer type is detected. + +Tue Aug 14 17:09:12 2001 Yukihiro Matsumoto + + * range.c (range_step): new method. + +Tue Aug 14 11:49:00 2001 TOYOFUKU Chikanobu + + * string.c (rb_str_cmp): remove needless conditional. + +Tue Aug 14 03:23:25 2001 Koji Arai + + * string.c (rb_str_lstrip_bang) `return Qnil' was missing. + +Mon Aug 13 14:16:46 2001 Akinori MUSHA + + * bignum.c, marshal.c: Detypo: s/SIZEOF_ING/SIZEOF_INT/. + +Sun Aug 12 15:01:58 2001 Nobuyoshi Nakada + + * string.c (rb_str_cat): fix buffer overflow. + + * string.c (rb_str_append): nothing to append actually when `str2' + is empty. + +Sat Aug 11 14:43:47 2001 Tanaka Akira + + * array.c (rb_inspecting_p): initialize inspect_key if it is + not initialized yet. + +Fri Aug 10 22:14:37 2001 Yukihiro Matsumoto + + * parse.y (cond0): operands of logical operators are not treated + as conditional expression anymore, but propagate conditional + status if used in conditionals. + +Tue Aug 7 09:10:32 2001 Usaku Nakamura + + * win32/win32.h: fix problems with BC++ (ruby-bugs#PR161). + +Mon Aug 6 23:47:46 2001 Nobuyoshi Nakada + + * pack.c (pack_pack): associates p/P strings once at last + (reverted to 1.26). + + * string.c (rb_str_associate): associates an Array at once, not + but a String. realloc's when str_buf. + +Mon Aug 6 17:01:33 2001 Yukihiro Matsumoto + + * eval.c (rb_gc_mark_threads): should mark ruby_cref. + +Mon Aug 6 14:31:37 2001 Usaku Nakamura + + * numeric.c (num_divmod): fix typo. + +Mon Aug 6 03:29:03 2001 Yukihiro Matsumoto + + * string.c (rb_str_lstrip_bang): new method. + + * string.c (rb_str_rstrip_bang): new method. + +Mon Aug 6 00:35:03 2001 Guy Decoux + + * struct.c (rb_struct_modify): should check frozen and taint + status. + +Sun Aug 5 19:28:39 2001 Nobuyoshi Nakada + + * string.c (rb_str_associate): should consider STR_ASSOC too. + +Sun Aug 5 07:46:18 2001 Nobuyoshi Nakada + + * eval.c (rb_undefined): do not recurse if method_missing is + undefined. + +Thu Aug 2 21:37:32 2001 Yukihiro Matsumoto + + * process.c (proc_waitpid): now all arguments are optional. + + * process.c (Init_process): waitpid is now alias to wait. + + * process.c (Init_process): waitpid2 is now alias to wait2. + + * process.c (rb_waitpid): made public. + + * ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using + thread and rb_waitpid. + +Thu Aug 2 11:23:07 2001 Yukihiro Matsumoto + + * process.c (proc_getpgrp): now takes no argument on all + platforms. + + * process.c (proc_setpgrp): ditto. + +Thu Aug 2 01:29:42 2001 Nobuyoshi Nakada + + * file.c (strrdirsep): removed meaningless code. + + * file.c (rb_file_s_expand_path): reverted to 1.66. + +Wed Aug 1 16:17:47 2001 Yukihiro Matsumoto + + * ext/socket/socket.c (sock_s_pack_sockaddr_in): added + Socket::pack_sockaddr_in(). [new] + + * ext/socket/socket.c (sock_s_pack_sockaddr_un): added + Socket::pack_sockaddr_un(). [new] + + * ext/socket/socket.c (sock_s_pack_sockaddr_in): added + Socket::unpack_sockaddr_in(). [new] + + * ext/socket/socket.c (sock_s_pack_sockaddr_un): added + Socket::unpack_sockaddr_un(). [new] + +Wed Aug 1 15:42:16 2001 Usaku Nakamura + + * eval.c (ruby_run): avoid VC++ warning. + +Tue Jul 31 17:30:53 2001 Usaku Nakamura + + * marshal.c (Init_marshal): fix typos. + +Tue Jul 31 15:16:39 2001 Nobuyoshi Nakada + + * process.c (last_status_set): nothing returned, should be void. + + * ext/socket/socket.c (load_addr_info): ditto. + +Tue Jul 31 12:11:42 2001 Yukihiro Matsumoto + + * marshal.c (Init_marshal): new constant Marshal::MAJOR_VERSION + and Marshal::MINOR_VERSION. + +Tue Jul 31 07:18:04 2001 Nobuyoshi Nakada + + * file.c (rb_file_s_expand_path): scans per path element not per + byte/character, including fix of [ruby-talk:18152] and + multi-byte pathname support. + +Tue Jul 31 11:52:10 2001 akira yamada + + * marshal.c (marshal_load): ruby_verbose test should be wrapped by + RTEST(). + +Mon Jul 30 17:54:23 2001 Yukihiro Matsumoto + + * hash.c (rb_hash_index): should return nil (not the default + value) if value is not in the hash. + +Mon Jul 30 12:55:47 2001 Yukihiro Matsumoto + + * numeric.c (num_div): new method added. alias to '/' which + should be preserved even if '/' is redefined (e.g. by + mathn). [new] + +Mon Jul 30 11:12:14 2001 Amos Gouaux + + * lib/net/imap.rb: added new commands for managing folder quotas + and folder ACLs. + +Mon Jul 30 03:19:53 2001 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): "0 ff".hex should return 0, not 255. + +Fri Jul 27 22:29:41 2001 Nobuyoshi Nakada + + * file.c (rb_file_s_expand_path): fixed using CharNext(). + +Fri Jul 27 18:07:27 2001 Yukihiro Matsumoto + + * eval.c (rb_provided): extension should be guessed using + rb_find_file_noext(). + + * eval.c (rb_f_require): should call rb_feature_p() after + extension completion. + +Fri Jul 27 16:25:52 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): add CHECK_INTS before next, redo, retry to + avoid potential uninterruptable infinite loop. + +Thu Jul 26 11:27:12 2001 WATANABE Hirofumi + + * file.c (rb_find_file_noext, rb_find_file): fix tilde expansion + problem. + +Wed Jul 25 17:54:20 2001 Yukihiro Matsumoto + + * file.c (rb_file_s_expand_path): use CharNext() to expand. + +Wed Jul 25 17:16:26 2001 Akinori MUSHA + + * intern.h: add some missing function prototypes. + +Wed Jul 25 15:50:05 2001 Guy Decoux + + * file.c (rb_file_s_expand_path): should not expand "." and ".." + not following dirsep. + +Wed Jul 25 12:15:32 2001 WATANABE Hirofumi + + * file.c (rb_find_file_noext): should update f by expanded path. + + * file.c (rb_find_file): ditto. + +Tue Jul 24 23:10:47 2001 Nobuyoshi Nakada + + * file.c (strrdirsep): multi-byte pathname and DOSish separator + support. originally comes from Patrick Cheng. [new] + + * file.c (rb_file_s_basename, rb_file_s_dirname): use + strrdirsep(). comes from Patrick Cheng. + + * file.c (is_absolute_path): restricted in DOSish absolute path + with drive letter, and UNC support. originally comes from + Patrick Cheng. + + * file.c (getcwd): define macro using getwd() unless provided. + +Tue Jul 24 19:23:15 2001 Akinori MUSHA + + * ext/extmk.rb.in, lib/mkmf.rb: dig the target subdirectory for + lib/* files properly in case of create_makefile("dir/name"). + +Mon Jul 23 00:26:04 2001 Yukihiro Matsumoto + + * eval.c (rb_provide_feature): should not tweak extension used for + loading. + +Sun Jul 22 21:16:43 2001 Akinori MUSHA + + * ext/extmk.rb.in, lib/mkmf.rb: introduce a couple of new make + variables: CLEANFILES and DISTCLEANFILES. They'd typically be + defined in a file "depend". + +Sat Jul 21 09:40:10 2001 Nobuyoshi Nakada + + * io.c (io_fread): use fread(3) if PENDING_COUNT is available. + +Fri Jul 20 22:55:01 2001 Akinori MUSHA + + * gc.c (ruby_xrealloc): fix a dangling bug which led memory + reallocation to fail even though the second try after a GC + succeeds. + +Fri Jul 20 03:00:46 2001 Akinori MUSHA + + * class.c (rb_mod_include_p): Module#include? added. [new] + +Fri Jul 20 01:05:50 2001 Yukihiro Matsumoto + + * re.c (ignorecase_setter): give warning on modifying $=. + + * string.c (rb_str_casecmp): new method. [new] + + * string.c (rb_str_eql): separated from rb_str_equal(), make it + always be case sensitive. [new] + + * string.c (rb_str_hash): made it always be case sensitive. + +Thu Jul 19 13:03:15 2001 Nobuyoshi Nakada + + * eval.c (rb_f_require): should not include path in $" value + + * file.c (rb_find_file): should return 0 explicitly on failure. + +Tue Jul 17 11:44:40 2001 Usaku Nakamura + + * ruby.h: enable volatile directive with VC++. + + * regex.c: ditto. + +Tue Jul 17 06:01:12 2001 Minero Aoki + + * doc/net/smtp.rd.ja, pop.rd.ja, http.rd.ja: new files. + + * MANIFEST: add doc/net/{http,pop,smtp}.rd.ja. + +Tue Jul 17 11:22:01 2001 Yukihiro Matsumoto + + * regex.c (NUM_FAILURE_ITEMS): was confusing NUM_REG_ITEMS and + NUM_NONREG_ITEMS, which have happened to be same value. + +Tue Jul 17 11:08:34 2001 Usaku Nakamura + + * ext/extmk.rb.in: modify RM macro because command.com/cmd.exe don't + recognize single quotation as quote character. + + * lib/mkmf.rb: ditto. + +Tue Jul 17 01:38:15 2001 Yukihiro Matsumoto + + * class.c (rb_class_new): subclass check moved to this function. + + * class.c (rb_class_boot): check less version of rb_class_new(). + +Man Jul 16 13:21:30 2001 Usaku Nakamura + + * file.c (file_load_ok): fix typo. + +Mon Jul 16 12:58:07 2001 Yukihiro Matsumoto + + * eval.c (proc_invoke): should preserve iter status for embedded + frame in the block. + +Mon Jul 16 00:04:39 2001 Yukihiro Matsumoto + + * file.c (rb_file_s_expand_path): may overrun buffer on stack. + +Sun Jul 15 01:38:28 2001 Guy Decoux + + * string.c (rb_str_insert): forgot to call rb_str_modify(). + +Sat Jul 14 12:26:30 2001 Nobuyoshi Nakada + + * ext/digest/*/extconf.rb: fix so that they build from any + directory. + +Sat Jul 14 06:20:17 2001 WATANABE Hirofumi + + * lib/net/http.rb: HTTP#proxy? did not worked. + +Sat Jul 14 02:56:19 2001 Akinori MUSHA + + * ext/extmk.rb.in: support multi-level ext/ directories. + (e.g. you can have ext/foo, ext/foo/bar and ext/foo/baz) + +Sat Jul 14 02:55:02 2001 Akinori MUSHA + + * ext/.cvsignore: let cvs ignore extinit.c. + +Fri Jul 13 23:47:35 2001 Yukihiro Matsumoto + + * regex.c (re_search): should consider reverse search. + +Fri Jul 13 22:26:09 2001 Akinori MUSHA + + * lib/mkmf.rb: use File::split to split a target into a prefix and + a module name. This also works around a just found bug of + String#rindex. + + * ext/extmk.rb.in: ditto. + +Fri Jul 13 02:36:10 2001 Minero Aoki + + * dir.c (dir_s_chdir): warn only when invoked from multiple + threads or block is not given. + +Thu Jul 12 15:11:48 2001 WATANABE Hirofumi + + * ext/socket/socket.c (ruby_connect): workaround for the setup of + Cygwin socket(EALREADY). + +Mon Jul 9 16:49:30 2001 WATANABE Hirofumi + + * ext/extmk.rb.in: modify RM macro. + + * lib/mkmf.rb: ditto. + +Sun Jul 8 20:52:02 2001 Akinori MUSHA + + * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi(). + +Sun Jul 8 16:04:35 2001 Minero Aoki + + * lib/net/http.rb: rename HTTP#request_by_name to send_request. + + * lib/net/protocol.rb (ProtoSocket#read): modify typo. + +Sat Jul 7 17:45:35 2001 Yukihiro Matsumoto + + * object.c (rb_convert_type): should use rb_rescue(), not rb_rescue2(). + + * range.c (range_init): ditto. + +Fri Jul 6 18:01:10 2001 Yukihiro Matsumoto + + * object.c (rb_obj_dup): copies (actually does not free) + generic_ivar on dupif original owns them. + +Fri Jul 6 02:15:06 2001 Akinori MUSHA + + * lib/tempfile.rb: a tempfile must be created with mode 0600. + +Thu Jul 5 20:28:53 2001 Tietew + + * string.c (rb_str_each_line): should propagate taint mark. + + * ext/nkf/nkf.c (rb_nkf_kconv): ditto. + +Fri Jul 6 14:54:27 2001 Yukihiro Matsumoto + + * eval.c (rb_f_require): revamp for simpler implementation. + + * file.c (rb_find_file_noext): use String object, instead of + passing char* around. + + * file.c (rb_find_file): ditto. + +Thu Jul 5 22:01:02 2001 Mitsuhiro Kondo + + * dln.c (dln_load): should use NSLINKMODULE_OPTION_BINDNOW. + +Thu Jul 5 13:44:03 2001 Yukihiro Matsumoto + + * ruby.c (load_file): local variables 'c' remain uninitialized on + xflag. + +Thu Jul 5 10:00:59 2001 Yukihiro Matsumoto + + * regex.c (re_match): prefetched escaped character too early. + +Wed Jul 4 08:58:30 2001 Yukihiro Matsumoto + + * eval.c (rb_call0): add argument check for attr_readers. + +Wed Jul 4 04:22:44 2001 Minero Aoki + + * lib/net/http.rb (HTTP#request_by_name): arg order changes. + +Wed Jul 4 04:07:36 2001 Minero Aoki + + * lib/net/http.rb (HTTP#request_by_name): bug fix. + + * lib/net/http.rb: does not write Connection: by default. + + * lib/net/protocol.rb: "start" for started protocol is an error. + + * lib/net/protocol.rb: "finish" for finished protocol is an error. + +Wed Jul 4 03:17:31 2001 Minero Aoki + + * lib/net/http.rb: new method HTTP#request_by_name (test) + + * lib/net/http.rb: new class HTTPGenericRequest + +Tue Jul 3 23:58:29 2001 Akinori MUSHA + + * lib/mkmf.rb: distclean should remove mkmf.log as well. + +Tue Jul 3 18:35:49 2001 Yukihiro Matsumoto + + * eval.c (rb_eval_string_wrap): should push frame (and adjust + cbase) before wrapped eval. + + * eval.c (rb_eval_cmd): ditto. + + * eval.c (eval): should update ruby_class always after all. + +Tue Jul 3 14:56:27 2001 Shugo Maeda + + * eval.c (block_pass): do not change wrapper information. + + * eval.c (rb_yield_0): preserve wrapper information. + +Tue Jul 3 08:59:50 2001 Nobuyoshi Nakada + + * error.c (rb_name_error): raise NameError instead of LoadError. + +Mon Jul 2 17:22:00 2001 Yukihiro Matsumoto + + * error.c (exc_exception): clone the receiver exception instead of + creating brand new exception object of the receiver. + +Mon Jul 2 09:53:12 2001 Yukihiro Matsumoto + + * eval.c (rb_eval_string_wrap): extend new ruby_top_self, not + original self. + + * eval.c (rb_eval_cmd): respect ruby_wrapper if set. + + * eval.c (eval): do not update ruby_class unless scope is not + provided. + +Sun Jul 1 10:51:15 2001 Shugo Maeda + + * eval.c (eval): preserve wrapper information. + + * eval.c (proc_invoke): ditto. + + * eval.c (block_pass): ditto. + +Sat Jun 30 02:55:45 2001 Yukihiro Matsumoto + + * parse.y (void_expr): too much warnings for void context + (e.g. foo[1] that can be mere Proc call). + +Fri Jun 29 17:23:18 2001 Yukihiro Matsumoto + + * error.c (rb_name_error): new function to raise NameError with + name attribute set. + + * eval.c (rb_f_missing): set name and args in the exception + object. [new] + + * error.c (name_name): NameError#name - new method. + + * error.c (nometh_args): NoMethodError#args - new method. + +Fri Jun 29 15:29:31 2001 Yukihiro Matsumoto + + * lex.c (rb_reserved_word): lex_state after tRESCUE should be + EXPR_MID. + +Thu Jun 28 00:21:28 2001 Keiju Ishitsuka + + * lib/matrix.rb: resolve 'ruby -w' warnings. + + * lib/irb/locale.rb: resolve 'ruby -w' warnings. + + * lib/irb/multi-irb.rb: resolve 'ruby -w' warnings. + + * lib/irb/ruby-lex.rb: fix problem for "\\M-\\..." and "\\C-\\..." + and resolve 'ruby -w' warnings. + + * lib/irb/ruby-token.rb: fix typo + + * lib/shell/command-processor.rb: resolve 'ruby -w' warnings. + +Wed Jun 27 08:53:26 2001 Minero Aoki + + * lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only + + * lib/net/http.rb: HTTP.Proxy returns self if ADDRESS is nil. + + * lib/net/protocol.rb: new method ProtocolError#response + + * lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: add document. + +Tue Jun 26 18:42:42 2001 Yukihiro Matsumoto + + * gc.c (add_heap): allocation size of the heap unit is doubled for + each allocation. + +Mon Jun 25 09:54:48 2001 Yukihiro Matsumoto + + * dir.c (isdelim): space, tab, and newline are no longer + delimiters for glob patterns. + +Sat Jun 23 22:28:52 2001 Yukihiro Matsumoto + + * eval.c (svalue_to_avalue): new conversion scheme between single + value and array values. + + * eval.c (avalue_to_svalue): ditto. + + * eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return + and yield too. + + * eval.c (rb_yield_0): use avalue_to_svalue(). + + * eval.c (proc_invoke): Proc#call gives avaules, whereas + Proc#yield gives mvalues. + + * eval.c (bmcall): convert given value (svalue) to avalue. + +Sat Jun 23 18:28:52 2001 Akinori MUSHA + + * ext/readline/readline.c (readline_event): a non-void function + should return a value. + +Fri Jun 22 23:17:28 2001 WATANABE Hirofumi + + * ext/socket/socket.c (ruby_connect): workaround for the setup of + Cygwin socket. + +Fri Jun 22 23:11:17 2001 Keiju Ishitsuka + + * lib/irb/locale.rb: fix for require "kconv" problem + +Fri Jun 22 18:08:45 2001 Yukihiro Matsumoto + + * eval.c (rb_yield_0): no mvalue_to_svalue conversion here. + + * eval.c (massign): takes svalue, convert it to mvalue inside. + + * eval.c (rb_eval): parameters for yield/return are always + svalues now. + + * eval.c (svalue_to_mvalue): more strict conversion. + + * eval.c (mvalue_to_svalue): ditto. + +Fri Jun 22 17:12:23 2001 Yukihiro Matsumoto + + * st.c (new_size): prime hash size enabled. + + * ext/socket/socket.c (Init_socket): SO_* constants added. + +Tue Jun 19 22:24:07 2001 WATANABE Hirofumi + + * gc.c (rb_setjmp): avoid GCC 3.0 warnings. + +Tue Jun 19 18:19:30 2001 Akinori MUSHA + + * ext/readline/readline.c: add new methods: + Readline::completion_append_character and + Readline::completion_append_character=. + +Tue Jun 19 16:29:50 2001 Yukihiro Matsumoto + + * eval.c (svalue_to_mvalue): new function to convert from svalue + to mvalue. [experimental] + + * eval.c (mvalue_to_svalue): new function to convert from mvalue + to svalue. + + * eval.c (rb_eval): use mvalue_to_svalue(). + + * eval.c (rb_yield_0): use mvalue_to_svalue(). + + * eval.c (proc_invoke): proper mvalue handling. + +Mon Jun 18 17:38:50 2001 Yukihiro Matsumoto + + * eval.c (rb_f_require): searches ".rb" and ".so" at the same + time. previous behavior (search ".rb", then ".so") has a + security risk (ruby-bugs#PR140). + + * array.c (rb_ary_to_ary): new function to replace internal + rb_Array(), which never calls to_a, but to_ary (rb_Array() might + call both). [new] + +Mon Jun 18 00:43:20 2001 Yukihiro Matsumoto + + * regex.c (PUSH_FAILURE_POINT): push option status again. + + * regex.c (re_compile_pattern): avoid pushing unnecessary + option_set. + +Sat Jun 16 10:58:48 2001 Yukihiro Matsumoto + + * eval.c (rb_load): tainted string is OK if wrapped *and* + $SAFE >= 4. + +Thu Jun 14 16:27:07 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): should not nail down higher blocks + before preserving original context (i.e. should not alter + original context). + +Wed Jun 13 19:34:59 2001 Akinori MUSHA + + * dir.c (Init_Dir): add a new method File::fnmatch? along with + File::Constants::FNM_*. While I am here, FNM_NOCASE is renamed + to FNM_CASEFOLD which is commonly used by *BSD and GNU libc. + +Wed Jun 13 09:33:45 2001 Yukihiro Matsumoto + + * eval.c (proc_yield): new method equivalent to Proc#call but no + check for number of arguments. [new] + +Tue Jun 12 14:21:28 2001 Nobuyoshi Nakada + + * lib/mkmf.rb: target_prefix is only for installation, not for + build. + +Tue Jun 12 00:41:18 2001 Yukihiro Matsumoto + + * eval.c (method_eq): new method Method#==. [new] + +Mon Jun 11 14:29:41 2001 WATANABE Hirofumi + + * confgure.in: add RUBY_CANONICAL_BUILD. + +Sun Jun 10 17:31:47 2001 Guy Decoux + + * gc.c (STR_NO_ORIG): STR_NO_ORIG value was different between + string.c and gc.c + +Sat Jun 9 22:10:04 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): should convert *non-array at the end of + arguments by using Array(). + +Sat Jun 9 17:04:30 2001 Nobuyoshi Nakada + + * hash.c (ruby_setenv): readline library leaves their environment + strings uncopied. "free" check revised. + +Sat Jun 9 16:31:03 2001 Usaku Nakamura + + * ext/extmk.rb.in: Use -F and -T for mswin32 because cl.exe doesn't + support -o officially and cl.exe considers that *.cc and *.cxx are + OBJs. + + * lib/mkmf.rb: ditto. + + * win32/Makefile.sub: Use del instead of rm. + All these changes are derived from Nobuyoshi Nakada's patch. + Thanks. + +Fri Jun 8 22:37:40 2001 Yukihiro Matsumoto + + * gc.c (Init_stack): avoid __builtin_frame_address(2) to retrieve + stack bottom line. + +Fri Jun 8 18:14:12 2001 Yukihiro Matsumoto + + * st.c (numhash): should shuffle bits by dividing by prime number. + +Fri Jun 8 17:05:21 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): multiple assignment behavior fixed, which + results "*a = nil" makes "a == []" now. + +Fri Jun 8 15:25:09 2001 Yukihiro Matsumoto + + * eval.c (rb_f_require): should set SCOPE_PUBLIC before calling + dln_load(). + +Thu Jun 7 17:28:00 2001 Yukihiro Matsumoto + + * parse.y (yylex): exclude kDO_BLOCK too much by false condition. + +Wed Jun 6 23:02:36 2001 Keiju Ishitsuka + + * lib/sync.rb: bug fix if obj.initialize has parameters when + obj.extend(Sync_m) + + * lib/mutex_m.rb: modified bit + +Wed Jun 6 16:11:06 2001 Yukihiro Matsumoto + + * eval.c (rb_load): should check if tainted even when wrap is + specified. + +Wed Jun 6 14:34:27 2001 Yukihiro Matsumoto + + * parse.y (mrhs_basic): "*arg" should always be expanded by REXPAND. + + * regex.c (re_compile_pattern): too much optimization for the + cases like /(.|a)b/. + +Tue Jun 5 23:58:43 2001 Yukihiro Matsumoto + + * variable.c (fc_i): removed vast string allocation. + +Tue Jun 5 16:45:48 2001 Yukihiro Matsumoto + + * error.c (Init_Exception): NameError went under StandardError, + and NoMethodError went under NameError. + +Tue Jun 5 16:40:06 2001 Yukihiro Matsumoto + + * parse.y (rb_intern): non identifier symbols should be + categorized as ID_JUNK. [new] + +Tue Jun 5 16:15:58 2001 Yukihiro Matsumoto + + * variable.c (rb_mod_const_at): use hash table as internal + data. [new] + + * variable.c (rb_mod_const_of): ditto. + + * variable.c (rb_const_list): new function to convert internal + data (hash table) to array of strings. + + * eval.c (rb_mod_s_constants): data handling scheme has changed. + +Tue Jun 5 15:16:06 2001 Yukihiro Matsumoto + + * eval.c (rb_add_method): should not call rb_secure(), for + last_func may not be set. + + * io.c (rb_io_ctl): ioctl should accept any integer within C long + range. + +Tue Jun 5 13:41:13 2001 WATANABE Hirofumi + + * ext/etc/extconf.rb: use egrep_cpp. + +Tue Jun 5 12:44:59 2001 Yukihiro Matsumoto + + * marshal.c (r_object): wrong type check for modules. + + * marshal.c (w_object): should not dump anonymous classes/modules. + +Tue Jun 5 01:19:34 2001 Yukihiro Matsumoto + + * io.c (rb_open_file): use rb_file_sysopen_internal() if the 3rd + argument (permission flags) is given. [new, should be backported?] + + * io.c (rb_io_mode_binmode): mode string (e.g. "r+") to flags to + open(2). + +Mon Jun 4 23:55:54 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): NODE_REXPAND expand an array of 1 element as + the element itself. [new, should be backported?] + + * parse.y (ret_args): should treat "*[a]" in rhs expression as + "a", not "[a]". + +Mon Jun 4 04:14:53 2001 Wakou Aoyama + + * lib/shellwords.rb: don't destroy argument. + +Sat Jun 2 23:23:05 2001 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should push option modifier at the + right place. + +Sat Jun 2 23:05:20 2001 Shugo Maeda + + * lib/cgi/session.rb: don't use module_function for Class. + +Sat Jun 2 00:02:22 2001 Keiju Ishitsuka + + * irb messages: fix typos. + +Fri Jun 1 17:26:24 2001 K.Kosako + + * hash.c (replace_i): ignore when key == Qundef. + +Fri Jun 1 16:50:59 2001 Yukihiro Matsumoto + + * parse.y (call_args2): confusion with list_append() and + list_concat() was fixed. + +Fri Jun 1 15:01:40 2001 Yukihiro Matsumoto + + * parse.y (yylex): fixed 'print CGI::bar() {}, "\n"' syntax + breakage, adding new lex_state status. sigh. [new] + +Fri Jun 1 11:21:04 2001 WATANABE Hirofumi + + * configure.in: use waitpid on mingw32. + + * ext/dbm/extconf.rb: include , not . + +Thu May 31 18:34:57 2001 K.Kosako + + * file.c (rb_file_s_unlink): should not allow if $SAFE >= 2. + +Thu May 31 17:23:25 2001 Yukihiro Matsumoto + + * range.c (Init_Range): define "to_ary". + +Thu May 31 13:30:25 2001 WATANABE Hirofumi + + * mkconfig.rb, ext/configsub.rb: VERSION -> RUBY_VERSION. + +Thu May 31 08:00:58 2001 Usaku Nakamura + + * win32/dir.h: re-add. + +Thu May 31 01:25:59 2001 Akinori MUSHA + + * configure.in: default --with-libc_r to `no' until the problem is + fixed. (FreeBSD only) + +Tue May 29 17:24:23 2001 K.Kosako + + * ruby.c (proc_options): unexpected SecurityError happens when -T4. + +Tue May 29 18:46:04 2001 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): * \1 .. \9 should be + backreferences always. + + * regex.c (re_match): backreferences corresponding to + unclosed/unmatched parentheses should fail always. + +Tue May 29 16:35:49 2001 Yukihiro Matsumoto + + * string.c (rb_str_cat): use rb_str_buf_cat() if possible. [new] + + * string.c (rb_str_append): ditto. + + * string.c (rb_str_buf_cat): remove unnecessary check (type, + taint, modify) to gain performance. + + * string.c (rb_str_buf_append): ditto. + + * string.c (rb_str_buf_finish): removed. + +Tue May 29 02:05:55 2001 Yukihiro Matsumoto + + * string.c (rb_str_buf_new): buffering string function. [new] + + * string.c (rb_str_buf_append): ditto. + + * string.c (rb_str_buf_cat): ditto. + + * string.c (rb_str_buf_finish): ditto. + +Mon May 28 23:20:43 2001 WATANABE Hirofumi + + * configure.in: remove unnecessary AC_CANONICAL_BUILD + + * defines.h: #define HAVE_SETITIMER on Cygwin(bug fixed). + + * ruby.c: use relative path from LIBRUBY_SO. + + * ruby.c: don't use -mwin32 option on Cygwin. + + * cygwin/GNUmakefile.in: ditto. + + * ext/sdbm/_sdbm: ditto. + + * ext/tcltklib/extconf.rb: ditto. + + * ext/tcltklib/stubs.c: ditto. + +Mon May 28 22:12:01 2001 Nobuyoshi Nakada + + * ext/extconf.rb.in: make the priority of the make rule of .c + higher than .C . + +Mon May 28 13:22:19 2001 Tanaka Akira + + * time.c (make_time_t): local time adjustment revised. + +Mon May 28 02:20:38 2001 Akinori MUSHA + + * dir.c (glob_helper): teach has_magic() to handle flags and get + glob_helper to properly support FNM_NOESCAPE. + + * dir.c (fnmatch): fix a bug when FNM_PATHNAME and FNM_PERIOD are + specified at the same time. + +Sat May 26 09:55:26 2001 Yukihiro Matsumoto + + * parse.y: accomplish extended syntax described in [ruby-talk:14525] + using tSPC token. [new, experimental] + +Sat May 26 07:05:45 2001 Usaku Nakamura + + * MANIFEST: add win32/dir.h . + +Fri May 25 20:03:51 2001 Pascal Rigaux + + * dln.c (dln_find_1): should exclude directories in executable + file lookup. + +Fri May 25 18:00:26 2001 Yukihiro Matsumoto + + * class.c (rb_obj_singleton_methods): list methods in extended + modules if optional argument is true. [new] + +Fri May 25 14:19:25 2001 K.Kosako + + * string.c (rb_str_replace): add taint status infection + (OBJ_INFECT()). + + * string.c (rb_str_crypt): ditto. + + * string.c (rb_str_ljust): ditto. + + * string.c (rb_str_rjust): ditto. + + * string.c (rb_str_center): ditto. + +Fri May 25 05:39:03 2001 Akinori MUSHA + + * ext/sha1/sha1-ruby.c (sha1_hexdigest): fix buffer overflow. The + buffer for a SHA-1 hexdigest needs to be 41 bytes in length. + +Fri May 25 01:47:39 2001 Akinori MUSHA + + * MANIFEST: update the entries I forgot to add or remove. + +Fri May 25 00:57:25 2001 Akinori MUSHA + + * ext/sha1/sha1-ruby.c (sha1_new): separate initialize() from + new(). + + * ext/md5/md5init.c (md5i_new): ditto. + +Fri May 25 00:53:41 2001 Akinori MUSHA + + * ext/dbm/extconf.rb: fix support for *BSD and set $CFLAGS + properly. + +Thu May 24 16:10:33 2001 Yukihiro Matsumoto + + * range.c (range_member): check based on "<=>" comparison. [new] + + * range.c (range_check): add "succ" check if first end is not a + numeric. + + * range.c (range_eqq): comparison should based on "<=>". + + * range.c (range_each): ditto. + +Thu May 24 16:08:21 2001 WATANABE Hirofumi + + * mkconfig.rb: autoconf 2.50 support. + +Thu May 24 14:23:35 2001 Yukihiro Matsumoto + + * eval.c (rb_yield_0): need argument adjustment for C defined + blocks too. + +Thu May 24 01:11:30 2001 Yukihiro Matsumoto + + * ext/dbm/extconf.rb: header search added. [new] + +Wed May 23 02:58:21 2001 Tanaka Akira + + * time.c (make_time_t): fix ad-hoc local time adjustment, using + binary tree search. + +Tue May 22 17:10:35 2001 K.Kosako + + * variable.c (rb_alias_variable): should not allow variable + aliasing if $SAFE >= 4. + +Tue May 22 02:37:45 2001 Yukihiro Matsumoto + + * parse.y (expr): "break" and "next" to take optional expression, + which is used as a value for termination. [new, experimental] + + * eval.c (rb_eval): "break" can give value to terminating method. + + * eval.c (rb_eval): "break" and "next" to take optional expression. + + * eval.c (rb_yield_0): "next" can give value to terminating "yield". + + * eval.c (rb_iterate): "break" can give value to terminating method. + + * eval.c (proc_call): ditto. + +Mon May 21 13:15:25 2001 Yukihiro Matsumoto + + * bignum.c (rb_big2str): t should be protected from GC. + +Sat May 19 09:29:07 2001 Yukihiro Matsumoto + + * process.c (rb_proc_times): need not to check return value from + times(2). + +Fri May 18 05:36:08 2001 Akinori MUSHA + + * ext/extmk.rb.in (xsystem): backout the previous fix which was + bogus. + +Fri May 18 05:19:55 2001 Akinori MUSHA + + * lib/mkmf.rb (xsystem): make a temporary fix to get $(...) macros + properly expanded on a command execution. + + * ext/extmk.rb.in (xsystem): ditto. + +Fri May 18 03:45:55 2001 Brian F. Feldman + + * lib/mkmf.rb: unbreak "make install". lib/* must be installed + under $rubylibdir, not under $libdir. + +Fri May 18 01:28:07 2001 Yukihiro Matsumoto + + * parse.y (expr): break, next, redo, retry are moved from primary. + +Fri May 18 01:11:02 2001 Usaku Nakamura + + * ext/sha1/sha1-ruby.c (sha1_new): get rid of an unneeded + rb_obj_call_init() call. + +Fri May 18 01:03:55 2001 Usaku Nakamura + + * ext/sha1/sha1.txt, ext/sha1/sha1.txt.jp: fix typos. + +Thu May 17 19:17:11 2001 Akinori MUSHA + + * lib/shell.rb, lib/shell/process-controller.rb, + lib/shell/command-processor.rb: translate Japanese comments into + English. + +Thu May 17 19:07:14 2001 Akinori MUSHA + + * doc/shell.rd.jp: RD'ify and make some fixes. + + * doc/shell.rd: RD'ify, delete Japanese leftovers, make overall + English fixes, and sync with doc/shell.rd.jp. + +Thu May 17 17:35:04 2001 Yukihiro Matsumoto + + * eval.c (rb_call0): address of local_vars might change during eval. + +Thu May 17 07:27:09 2001 Akinori MUSHA + + * ext/md5/md5.txt.jp, ext/sha1/sha1.txt.jp: + s/SuperClass/Superclass/. + +Thu May 17 07:21:44 2001 Akinori MUSHA + + * ext/Setup.dj, ext/Setup.emx, ext/Setup.nt, ext/Setup.x68: + compile sha1 in as well as md5. + + * ext/Setup: put sha1 in a comment. + +Thu May 17 07:16:38 2001 Akinori MUSHA + + * ext/sha1/sha1.txt.jp: add the Japanese version derived from + ext/md5/md5.txt.jp. + + * ext/sha1/sha1.txt: revise the copyright info and reduce the + difference from ext/md5/md5.txt. + + * ext/md5/md5.txt: reduce the difference from ext/sha1/sha1.txt. + +Thu May 17 07:11:35 2001 Akinori MUSHA + + * ext/sha1/extconf.rb, ext/sha1/sha1.c: use WORDS_BIGENDIAN to + detect the platform's endian. + +Thu May 17 06:31:30 2001 Akinori MUSHA + + * ext/md5/md5.txt: make wording fixes, and mention the newly added + method: "<<". + + * ext/md5/md5.txt.jp: ditto. + +Wed May 16 18:05:52 2001 Akinori MUSHA + + * ext/md5/md5init.c: add an instance method "<<" as an alias for + "update". (inspired by Steve Coltrin's ruby-sha1) + +Tue May 15 17:46:37 2001 Yukihiro Matsumoto + + * array.c (rb_ary_and): should not push frozen key string. + + * array.c (rb_ary_or): ditto. + +Tue May 15 02:18:23 2001 Akinori MUSHA + + * lib/thread.rb: rescue ThreadError in case the thread is dead + just before calling Thread#run. + +Mon May 14 13:50:22 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): should save context before raising + deadlock, saved context for current thread might be obsolete. + + * time.c (make_time_t): non DST timezone shift supported (hopefully). + + * time.c (make_time_t): strict range detection for negative time_t. + +Mon May 14 11:54:20 2001 Tanaka Akira + + * signal.c: SIGINFO added. + +Mon May 14 08:57:06 2001 Yukihiro Matsumoto + + * eval.c (rb_ensure): should not SEGV when prot_tag is NULL. + +Sun May 13 23:51:14 2001 Usaku Nakamura + + * win32/resource.rb: Modify copyright in resource script. + +Sun May 13 14:03:33 2001 Okada Jun + + * lib/thread.rb: fix Queue#pop and SizedQueue#max= to avoid + deadlock. + +Sat May 12 15:43:55 2001 Usaku Nakamura + + * win32/win32.c (kill): add support of signal 9 on mswin32/mingw32. + +Fri May 11 15:09:52 2001 WATANABE Hirofumi + + * ruby.h (rb_string_value): add volatile to avoid compiler warning. + + * string.c (rb_string_value): ditto. + +Fri May 11 03:35:33 2001 Akinori MUSHA + + * README.EXT: Document find_library(), with_config() and + dir_config(). + +Fri May 11 03:34:20 2001 Akinori MUSHA + + * README.EXT.jp: Remove the description of find_header() because + such a function does not actually exist. + + * README.EXT.jp: Update the description of dir_config(). + +Fri May 11 02:42:05 2001 Kazuhiro NISHIYAMA + + * README, README.jp: Fix CVS access and mailing lists info. + +Fri May 11 02:00:44 2001 Ryo HAYASAKA + + * bignum.c (bigdivrem): access boundary bug. + +Thu May 10 02:40:47 2001 Yukihiro Matsumoto + + * marshal.c (w_object): prohibit dumping out singleton classes. + + * object.c (rb_mod_to_s): distinguish singleton classes. + + * variable.c (rb_class2name): it's ok to reveal NilClass, + TrueClass, FalseClass. + +Wed May 9 14:38:33 2001 K.Kosako + + * eval.c (rb_yield_0): preserve and restore ruby_cref as well. + +Tue May 8 18:28:19 2001 Keiju Ishitsuka + + * lib/irb.rb lib/irb/multi-irb.rb lib/irb/ruby-lex.rb + lib/irb/version.rb resolve ctrl-c problem + +Tue May 8 17:12:43 2001 K.Kosako + + * eval.c (is_defined): core dumped during instance_eval for + special constants. + + * eval.c (rb_eval): ditto. + +Tue May 8 08:52:57 2001 Akinori MUSHA + + * doc/forwardable.rd, doc/forwardable.rd.jp: Hit `=begin' and + `=end' in proper places so rd2 can format them without a problem. + + * doc/irb/irb-tools.rd.jp, doc/irb/irb.rd, doc/irb/irb.rd.jp: + ditto. + +Tue May 8 08:38:53 2001 Akinori MUSHA + + * doc/forwardable.rd, doc/forwardable.rd.jp, lib/forwardable.rb: + Import forwardable 1.1. + +Tue May 8 08:34:33 2001 Akinori MUSHA + + * doc/irb/irb-tools.rd.jp, doc/irb/irb.rd.jp: Convert from JIS to + EUC. + +Tue May 8 03:46:39 2001 Akinori MUSHA + + * sample/rbc.rb: Obsoleted by IRB. + +Mon May 7 15:58:45 2001 Yukihiro Matsumoto + + * parse.y (arg): "||=" should not warn for uninitialized instance + variables. + + * eval.c (rb_eval): ditto. + + * eval.c (eval): preserve and restore ruby_cref as well. + +Mon May 7 15:45:48 2001 WATANABE Hirofumi + + * lib/ftools.rb (syscopy): chmod destination file only if + it does not exist. + +Mon May 7 14:35:57 2001 Yukihiro Matsumoto + + * object.c (rb_obj_is_instance_of): takes only class/module as an + argument. + +Sun May 6 16:27:29 2001 Koji Arai + + * eval.c (is_defined): rb_reg_nth_defined() may return Qnil. + +Thu May 3 03:15:06 2001 SHIROYAMA Takayuki + + * configure.in: get --enable-shared to work on MacOS X. + + * Makefile.in: make $(LIBRUBY_SO) depend on miniruby properly. + Now `make -jN' should work without a problem. + +Thu May 3 02:07:45 2001 Usaku Nakamura + + * win32/config.h.in: add SIZEOF___INT64 definition. + +Wed May 2 20:39:35 2001 WATANABE Hirofumi + + * dir.c (rb_glob, rb_globi): remove unnecessary FNM_PATHNAME. + +Wed May 2 11:46:13 2001 K.Kosako + + * eval.c (block_pass): should not downgrade safe level. + +Wed May 2 03:07:49 2001 Yukihiro Matsumoto + + * ext/dbm/extconf.rb: allow specifying dbm-type explicitly. + + * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks + memory, whereas gdbm.so doesn't. potential incompatibility. + +Wed May 2 02:02:18 2001 Yukihiro Matsumoto + + * string.c (rb_str_insert): new method. + +Tue May 1 17:55:58 2001 Yukihiro Matsumoto + + * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. + +Tue May 1 16:23:03 2001 Yukihiro Matsumoto + + * array.c (rb_ary_insert): new method. + + * array.c (rb_ary_update): new utility function. + +Tue May 1 03:24:05 2001 Akinori MUSHA + + * lib/irb/completion.rb, lib/irb/frame.rb, lib/irb/xmp.rb, + doc/irb/irb-tools.rd.jp: Merge from irb-tools 0.7.1. + +Tue May 1 03:07:17 2001 Akinori MUSHA + + * sample/irb.rb, lib/irb.rb, lib/irb/*, doc/irb/*: Merge from irb + 0.7.3. + + * instruby.rb: Install help-message's too. + + * lib/irb/main.rb: This file is not needed anymore. + +Fri Apr 27 09:27:10 2001 Yukihiro Matsumoto + + * io.c (set_outfile): should check if closed before assignment. + +Thu Apr 26 22:36:11 2001 WATANABE Hirofumi + + * configure.in: don't use tzname on Cygwin 1.3.1+. + + * configure.in: add -mieee/-ieee to CFLAGS on OSF1/Alpha + to disable "DIVISION BY ZERO" exception. + +Thu Apr 26 22:30:43 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): should preserve value of ruby_errinfo. + +Thu Apr 26 10:36:09 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): infinite sleep should not cause + dead lock. + +Wed Apr 25 16:40:44 2001 Yukihiro Matsumoto + + * array.c (rb_ary_flatten_bang): proper recursive detection. + +Wed Apr 25 15:36:15 2001 K.Kosako + + * eval.c (yield_under): need not to prohibit at safe level 4. + +Wed Apr 25 15:22:20 2001 Yukihiro Matsumoto + + * pack.c (pack_pack): p/P packs nil into NULL. + + * pack.c (pack_unpack): p/P unpacks NULL into nil. + +Tue Apr 24 15:35:32 2001 Yukihiro Matsumoto + + * pack.c (pack_pack): size check for P template. + + * ruby.c (set_arg0): wrong predicate when new $0 value is bigger + than original space. + +Tue Apr 24 15:18:49 2001 Akinori MUSHA + + * ext/extmk.rb.in, lib/mkmf.rb: (dir_config) do not add the + specified include directory if already included in $CPPFLAGS. + + * ext/extmk.rb.in, lib/mkmf.rb: (dir_config) return a more useful + value, [include_dir, lib_dir]. + +Mon Apr 23 14:43:59 2001 Yukihiro Matsumoto + + * gc.c (id2ref): should use NUM2ULONG() + + * object.c (rb_mod_const_get): check whether name is a class + variable name. + + * object.c (rb_mod_const_set): ditto. + + * object.c (rb_mod_const_defined): ditto. + +Sat Apr 21 22:33:26 2001 Yukihiro Matsumoto + + * marshal.c (w_float): precision changed to "%.16g" + +Sat Apr 21 22:07:58 2001 Guy Decoux + + * eval.c (rb_call0): wrong retry behavior. + +Fri Apr 20 19:12:20 2001 Yukihiro Matsumoto + + * numeric.c (fix_aref): a bug on long>int architecture. + +Fri Apr 20 14:57:15 2001 K.Kosako + + * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. + +Sun Apr 22 17:44:37 2001 WATANABE Hirofumi + + * configure.in: add -mieee to CFLAGS on Linux/Alpha + to disable "DIVISION BY ZERO" exception. + + * configure.in: remove -ansi on OSF/1. + +Wed Apr 18 04:37:51 2001 Wakou Aoyama + + * lib/cgi.rb: CGI::Cookie: no use PATH_INFO. + +Wed Apr 18 00:24:40 2001 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): char class at either edge of range + should be invalid. + +Tue Apr 17 17:33:55 2001 Yukihiro Matsumoto + + * eval.c (handle_rescue): use === to compare exception match. + + * error.c (syserr_eqq): comparison between SytemCallErrors should + based on their error numbers. + +Tue Apr 17 16:54:39 2001 K.Kosako + + * eval.c (safe_getter): should use INT2NUM(). + +Tue Apr 17 15:12:56 2001 Yukihiro Matsumoto + + * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. + +Sat Apr 14 22:46:43 2001 Guy Decoux + + * regex.c (calculate_must_string): wrong length calculation. + +Sat Apr 14 13:37:32 2001 Usaku Nakamura + + * win32/config.status.in: no longer use missing/alloca.c. + + * win32/Makefile.sub: ditto. + +Fri Apr 13 12:40:48 2001 K.Kosako + + * eval.c (rb_thread_start_0): fixed memory leak. + +Fri Apr 13 16:41:18 2001 Yukihiro Matsumoto + + * parse.y (none): should clear cmdarg_stack too. + +Fri Apr 13 06:19:29 2001 GOTOU Yuuzou + + * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on + some platforms. + +Wed Apr 11 23:36:26 2001 Yukihiro Matsumoto + + * file.c (rb_stat_dev): device functions should honor stat field + types (except long long such as dev_t). + +Wed Apr 11 18:07:53 2001 K.Kosako + + * eval.c (rb_mod_nesting): should not push nil for nesting array. + + * eval.c (rb_mod_s_constants): should not search array by + rb_mod_const_at() for nil (happens for singleton class). + +Wed Apr 11 13:29:26 2001 Yukihiro Matsumoto + + * class.c (rb_singleton_class_attached): should modify iv_tbl by + itself, no longer use rb_iv_set() to avoid freeze check error. + + * variable.c (rb_const_get): error message "uninitialized constant + Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". + +Tue Apr 10 17:52:10 2001 Yukihiro Matsumoto + + * eval.c (rb_mod_included): new hook called from rb_mod_include(). + +Tue Apr 10 02:24:40 2001 Nobuyoshi Nakada + + * io.c (opt_i_set): should strdup() inplace_edit string. + +Mon Apr 9 23:29:54 2001 Yukihiro Matsumoto + + * eval.c (exec_under): need to push cref too. + +Mon Apr 9 15:20:21 2001 Yukihiro Matsumoto + + * eval.c (rb_f_missing): raise NameError for "undefined local + variable or method". + + * error.c (Init_Exception): new exception NoMethodError. + NameError moved under ScriptError again. + + * eval.c (rb_f_missing): use NoMethodError instead of NameError. + +Mon Apr 9 12:05:44 2001 Yukihiro Matsumoto + + * file.c (Init_File): should redefine "new" class method. + +Mon Apr 9 11:56:52 2001 Shugo Maeda + + * lib/net/imap.rb: fix typo. + +Fri Apr 6 01:46:35 2001 Yukihiro Matsumoto + + * eval.c (PUSH_CREF): sharing cref node was problematic. maintain + runtime cref list instead. + + * eval.c (rb_eval): copy defn node before registering. + + * eval.c (rb_load): clear ruby_cref before loading. + +Thu Apr 5 22:40:12 2001 Yukihiro Matsumoto + + * variable.c (rb_const_get): no recursion to show full class path + for modules. + + * eval.c (rb_set_safe_level): should set safe level in curr_thread + as well. + + * eval.c (safe_setter): ditto. + +Thu Apr 5 13:46:06 2001 K.Kosako + + * object.c (rb_obj_is_instance_of): nil belongs to false, not true. + +Thu Apr 5 02:19:03 2001 Yukihiro Matsumoto + + * time.c (make_time_t): proper (I hope) daylight saving time + handling for both US and Europe. I HATE DST! + + * eval.c (rb_thread_wait_for): non blocked signal interrupt should + stop the interval. + +Wed Apr 4 03:47:03 2001 Yukihiro Matsumoto + + * eval.c (proc_eq): class check added. + + * eval.c (proc_eq): typo fixed ("return" was omitted). + + * error.c (Init_Exception): move NameError under StandardError. + + * class.c (rb_mod_clone): should copy method bodies too. + + * bignum.c (bigdivrem): should trim trailing zero bdigits of + remainder, even if dd == 0. + + * file.c (check3rdbyte): safe string check moved here. + +Tue Apr 3 09:56:20 2001 WATANABE Hirofumi + + * ext/extmk.rb.in (create_makefile): create def file only if + it does not yet exist. + + * lib/mkmf.rb: ditto. + +Tue Apr 3 00:05:07 2001 Yukihiro Matsumoto + + * time.c (make_time_t): remove HAVE_TM_ZONE code since it + sometimes reports wrong time. + + * time.c (make_time_t): remove unnecessary range check for + platforms where negative time_t is available. + +Mon Apr 2 16:52:48 2001 Yukihiro Matsumoto + + * process.c (proc_waitall): should push Process::Status instead of + Fixnum status. + + * process.c (waitall_each): should add all entries in pid_tbl. + these changes are inspired by Koji Arai. Thanks. + + * process.c (proc_wait): should not iterate if pid_tbl is 0. + + * process.c (proc_waitall): ditto. + +Mon Apr 2 14:25:49 2001 Shugo Maeda + + * lib/monitor.rb (wait): ensure reentrance. + + * lib/monitor.rb (wait): fix timeout support. + +Mon Apr 2 12:40:45 2001 Shugo Maeda + + * lib/net/imap.rb (media_subtype): return subtype. + +Mon Apr 2 12:01:15 2001 Shugo Maeda + + * lib/net/imap.rb (flag_list): capitalize flags. + +Mon Apr 2 01:32:38 2001 Akinori MUSHA + + * Makefile.in: Introduce MAINLIBS. + + * configure.in: Link libc_r against the ruby executable on + FreeBSD, which is the first attempt to work around a certain + problem regarding pthread on FreeBSD. It should make ruby/libruby + happy when it loads an extension to a library compiled and linked + with -pthread. Note, however, that libruby is _not_ linked with + libc_r so as not to mess up pthread unfriendly stuff including + apache+mod_ruby and vim6+ruby_interp. + +Mon Apr 2 01:16:24 2001 WATANABE Hirofumi + + * win32/win32.c: use ruby's opendir on mingw32. + + * win32/dir.h, dir.c, Makefile: ditto. + +Sun Apr 1 23:26:14 2001 TOYOFUKU Chikanobu + + * numeric.c (flodivmod): a bug in no fmod case. + +Sun Apr 1 18:36:14 2001 Koji Arai + + * process.c (pst_wifsignaled): should apply WIFSIGNALED for status + (int), not st (VALUE). + +Sat Mar 31 04:47:55 2001 Shugo Maeda + + * lib/net/imap.rb: add document and example code. + +Sat Mar 31 03:24:10 2001 Yukihiro Matsumoto + + * io.c (Init_IO): value of $/ and $\ are no longer restricted to + strings. type checks are done on demand. + + * class.c (rb_include_module): module inclusion should be check + taints. + + * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). + + * ruby.h (rb_str2cstr): ditto. + +Fri Mar 30 23:37:49 2001 Yukihiro Matsumoto + + * eval.c (rb_load): should not copy toplevel local variables. It + cause variable/method ambiguity. Thanks to L. Peter Deutsch. + +Fri Mar 30 22:56:56 2001 Shugo Maeda + + * lib/net/imap.rb: rename ContinueRequest to ContinuationRequest. + +Fri Mar 30 12:51:19 2001 Yukihiro Matsumoto + + * class.c (rb_include_module): freeze check at first. + +Thu Mar 29 17:05:09 2001 Yukihiro Matsumoto + + * eval.c (rb_attr): sprintf() and rb_intern() moved into + conditional body. + +Wed Mar 28 23:43:00 2001 Nobuyoshi Nakada + + * ext/extmk.rb.in, lib/mkmf.rb: add C++ rules in addition to C + rules for the mswin32 platforms. + +Wed Mar 28 19:29:21 2001 Akinori MUSHA + + * ext/extmk.rb.in, lib/mkmf.rb: move C++ rules to the right place. + +Wed Mar 28 17:39:04 2001 Yukihiro Matsumoto + + * object.c (rb_str2cstr): warn if string contains \0 and length + value is ignored. + +Wed Mar 28 15:00:31 2001 K.Kosako + + * class.c (rb_singleton_class_clone): should copy class constant + table as well. + +Wed Mar 28 14:23:23 2001 Yukihiro Matsumoto + + * class.c (rb_include_module): sometimes cache was mistakenly left + uncleared - based on the patch by K.Kosako. + + * ruby.h: all Check_SafeStr()'s are replaced by SafeStr() to + ensure 'to_str' be always effective. + +Wed Mar 28 09:52:33 2001 WATANABE Hirofumi + + * win32/Makefile.sub: disable global optimization. + +Tue Mar 27 15:00:54 2001 K.Kosako + + * eval.c (rb_mod_define_method): should have clear method cache. + + * eval.c (rb_mod_define_method): should have raised exception for + type error. + +Tue Mar 27 14:48:17 2001 Yukihiro Matsumoto + + * ruby.h: changed "extern INLINE" to "static inline". + +Mon Mar 26 23:19:33 2001 WATANABE Hirofumi + + * time.c (rb_strftime): check whether strftime returns empty string. + +Mon Mar 26 21:16:56 2001 Shugo Maeda + + * lib/net/imap.rb: supports response handlers and multiple commands. + +Mon Mar 26 17:21:07 2001 Yukihiro Matsumoto + + * eval.c: remove TMP_PROTECT_END to prevent C_ALLOCA crash. + +Mon Mar 26 14:04:41 2001 WATANABE Hirofumi + + * ext/Win32API/Win32API.c: remove Init_win32api(). + +Sun Mar 25 16:52:48 2001 Koji Arai + + * file.c (rb_file_flock): do not trap EINTR. + + * missing/flock.c (flock): returns the value from lockf(2) + directly. + +Sat Mar 24 23:44:50 2001 Yukihiro Matsumoto + + * eval.c (ev_const_defined): should ignore toplevel cbase (Object). + + * eval.c (ev_const_get): ditto. + +Fri Mar 23 17:37:52 2001 Yukihiro Matsumoto + + * ext/md5/md5.h: replace by independent md5 implementation + contributed by L. Peter Deutsch (thanks). + + * ext/md5/md5init.c: adopted to Deutsch's md5 implementation. + +Fri Mar 23 17:26:19 2001 Yukihiro Matsumoto + + * pack.c (pack_unpack): string from P/p should be tainted. + +Fri Mar 23 12:18:44 2001 SHIROYAMA Takayuki + + * ext/curses/curses.c: curses on Mac OS X public beta does not + have _maxx etc. + +Fri Mar 23 10:50:31 2001 Yukihiro Matsumoto + + * marshal.c (w_object): should truncate trailing zero short for + bignums. + +Fri Mar 23 09:49:02 2001 Yukihiro Matsumoto + + * object.c (sym_intern): new method. + +Thu Mar 22 22:15:45 2001 WATANABE Hirofumi + + * ext/Win32API/extconf.rb: add -fno-omit-frame-pointer. + +Thu Mar 22 18:17:36 2001 Yukihiro Matsumoto + + * eval.c (rb_mod_nesting): should not include Object at the + toplevel. + +Thu Mar 22 17:43:44 2001 Yukihiro Matsumoto + + * ruby.h: better inline function support. + + * configure.in (NO_C_INLINE): check if inline is available for the + C compiler. + +Mon Mar 19 11:03:10 2001 Koji Arai + + * marshal.c (r_object): len calculation patch was wrong for + machines SIZEOF_BDIGITS == SIZEOF_SHORT. + + * gc.c: alloca prototype reorganized for C_ALLOCA machine. + +Wed Mar 21 23:07:45 2001 WATANABE Hirofumi + + * win32/win32.c (win32_stat): WinNT/2k "//host/share" support. + +Wed Mar 21 08:05:35 2001 Nobuyoshi Nakada + + * win32/dir.h: replace missing/dir.h . + + * win32/win32.h: ditto. + + * win32/win32.c: ditto. + +Wed Mar 21 01:26:14 2001 Yukihiro Matsumoto + + * gc.c (id2ref): sometimes confused symbol and reference. + +Tue Mar 20 23:09:33 2001 WATANABE Hirofumi + + * win32/win32.c (win32_stat): UNC support. + + * dir.c (extract_path): fix "./*" problem. + +Tue Mar 20 15:10:00 2001 Yukihiro Matsumoto + + * dir.c (glob_helper): breaks loop after calling recursive + glob_helper; all wild cards should be consumed; no need for + further match. + + * dir.c (dir_s_glob): gives warning if no match found. + +Tue Mar 20 14:13:45 2001 Koji Arai + + * object.c (sym_inspect): did allocate extra byte space. + +Mon Mar 19 19:14:47 2001 Guy Decoux + + * marshal.c (shortlen): shortlen should return number of bytes + written. + +Mon Mar 19 16:52:23 2001 K.Kosako + + * eval.c (ev_const_defined): need not to check if cbase->nd_class + is rb_cObject. + + * eval.c (ev_const_get): ditto. + +Mon Mar 19 17:11:20 2001 Yukihiro Matsumoto + + * time.c (time_zone): return "UTC" for UTC time objects. + +Mon Mar 19 16:27:32 2001 Yukihiro Matsumoto + + * eval.c (THREAD_ALLOC): flags should be initialized. + + * signal.c (rb_f_kill): should use FIX2INT, not FIX2UINT. + +Mon Mar 19 10:55:10 2001 Yukihiro Matsumoto + + * dir.c (glob_helper): replace lstat() by stat() to follow symlink + in the case like 'symlink/*'. + + * dir.c (glob_helper): gave warning too much. + +Sun Mar 18 08:58:18 2001 Wakou Aoyama + + * lib/cgi.rb: // === '' --> //.match('') + + * lib/cgi.rb: cgi#header(): improvement for mod_ruby. + + * lib/cgi.rb: cgi#rfc1123date(): improvement. + thanks to TADA Tadashi . + + * lib/cgi.rb: cgi#rfc1123date(): document bug fix. + thanks to Kazuhiro NISHIYAMA . + + * lib/cgi.rb: cgi#header(): bug fix. + thanks to IWATSUKI Hiroyuki . + +Sat Mar 17 11:11:24 2001 Yukihiro Matsumoto + + * dir.c (glob_helper): * should follow symlink, whereas ** should + not follow. + +Thu Mar 15 01:28:02 2001 Yukihiro Matsumoto + + * dir.c (dir_s_chdir): block form of Dir.chdir. (RCR#U016). + +Fri Mar 16 17:14:17 2001 Akinori MUSHA + + * configure.in: Set SOLIBS properly for all ELF and + FreeBSD/NetBSD/OpenBSD a.out platforms so that the shlib + dependencies are recorded in the libruby shlib. + +Wed Mar 14 16:41:45 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): raise FATAL just once to + THREAD_TO_KILL. + +Wed Mar 14 10:41:34 2001 Yukihiro Matsumoto + + * eval.c (rb_yield_0): 0 (= Qfalse) is a valid value, so that + default self should be checked by klass == 0. + + * bignum.c (rb_cstr2inum): should disallow '++1', '+-1', etc. + +Tue Mar 13 17:51:09 2001 Yukihiro Matsumoto + + * eval.c (ev_const_defined): add new parameter self for special + const fallback. + + * eval.c (ev_const_get): ditto. + +Tue Mar 13 16:39:45 2001 WATANABE Hirofumi + + * dir.c (rb_glob_helper): fix drive letter handling on DOSISH. + +Tue Mar 13 14:54:39 2001 Minero Aoki + + * lib/net/http.rb: add HTTPRequest#basic_auth. + + * lib/net/smtp.rb: raise if only account or password is given. + + * lib/net/protocol.rb: WriteAdapter#<< returns self. + +Tue Mar 13 14:41:16 2001 Yukihiro Matsumoto + + * io.c (argf_seek_m): wrong calling sequence of rb_io_seek(). + +Tue Mar 13 09:14:19 2001 Yukihiro Matsumoto + + * parse.y (cond0): no special treatment of string literal in + condition. + +Mon Mar 12 18:59:38 2001 WATANABE Hirofumi + + * lib/mkmf.rb (create_makefile): save/restore $libs and $LIBPATH. + +Sun Mar 11 18:13:34 2001 Masahiro Tanaka + + * math.c: add acos, asin, atan, conh, sinh, tanh and hypot to Math. + + * configure.in: check hypot availability. + + * missing/hypot.c: public domain rewrite of hypot. + +Sun Mar 11 13:21:04 2001 Koji Arai + + * parse.y (warn_unless_e_option): warning condition was wrong. + + * parse.y (warning_unless_e_option): ditto. + +Sun Mar 11 00:55:31 2001 WATANABE Hirofumi + + * lib/mkmf.rb (install_rb): fix handling of destination path. + +Sat Mar 10 22:56:44 2001 Yukihiro Matsumoto + + * enum.c (enum_all): new method 'all?', which returns true if + block returns true for all elements. + + * enum.c (enum_any): new method 'any?', which returns true if + block returns true for any of elements. + +Sat Mar 10 02:34:18 2001 WATANABE Hirofumi + + * math.c (math_log, math_log10): use nan() instead of 0.0/0.0 on Cygwin. + +Fri Mar 9 09:56:19 2001 Yukihiro Matsumoto + + * marshal.c (marshal_load): do not give warning unless explicitly + set to verbose. + +Fri Mar 9 02:07:53 2001 Yukihiro Matsumoto + + * eval.c (rb_exit): give string value "exit" to SystemExit. + + * ruby.c (proc_options): -v should not print version if + proc_options called via moreswitches(). + +Thu Mar 8 17:45:19 2001 Minero Aoki + + * lib/net/protocol.rb: one write(2) per one line. + +Wed Mar 7 14:26:11 2001 WATANABE Hirofumi + + * math.c (math_log, math_log10): should return NaN if x < 0.0 + on Cygwin. + +Thu Mar 7 10:31:26 2001 Nobuyoshi Nakada + + * parse.y (stmt): while/until modifier must work for empty body. + +Tue Mar 6 22:53:58 2001 Kazuhiro Yoshida + + * ruby.c (ruby_set_argv): clear ARGV contents before adding args. + +Tue Mar 6 10:50:29 2001 Yukihiro Matsumoto + + * parse.y (primary): rescue and ensure clauses should be allowed + to appear in singleton method body. + +Mon Mar 5 17:25:13 2001 Yukihiro Matsumoto + + * eval.c (proc_eq): compare Procs using blocktag equality. + + * eval.c (proc_to_s): stringify according to block tag address. + +Mon Mar 5 17:19:56 2001 WATANABE Hirofumi + + * win32/win32.c (gettimeofday): use GetLocalTime() instead of ftime() + for high-resolution timing. + +Sun Mar 4 17:01:09 2001 WATANABE Hirofumi + + * string.c (trnext): support backslash escape in String#tr. + +Sat Mar 3 16:15:16 2001 Yukihiro Matsumoto + + * eval.c (rb_eval): push cbase if ruby_cbase != ruby_class, for + example in the case NODE_DEFN/NODE_DEFS are called within + module_eval. + +Wed Feb 28 11:02:41 2001 Yukihiro Matsumoto + + * string.c (rb_str_delete_bang): delete! should take at least 1 + argument. + + * ruby.c (load_file): add rb_gc() after loading to avoid + extraordinary memory growth. + +Wed Feb 28 05:01:40 2001 Koji Arai + + * dir.c (rb_glob_helper): "./foo" should match "foo", not "./foo". + +Tue Feb 27 16:38:15 2001 Yukihiro Matsumoto + + * eval.c (ev_const_get): retrieve Object's constant if no current + class is available (e.g. defining singleton class for Fixnums). + + * eval.c (ev_const_defined): check Object's constant if no current + class is available (e.g. defining singleton class for Fixnums). + + * time.c (time_timeval): negative time interval should not be + allowed. + + * eval.c (proc_call): ignore block to `call' always, despite of + being orphan or not. + +Wed Feb 27 10:16:32 2001 Nobuyoshi Nakada + + * eval.c (rb_yield_0): should check based on rb_block_given_p() + and rb_f_block_given_p(). + +Tue Feb 27 04:13:45 2001 Nobuyoshi Nakada + + * configure.in (frame-address): --enable-frame-address to allow + __builtin_frame_address() to be used. + + * eval.c (stack_length): use __builtin_frame_address() based on + the macro USE_BUILTIN_FRAME_ADDRESS. + + * gc.c (rb_gc): ditto. + + * gc.c (Init_stack): ditto. + +Mon Feb 26 16:20:27 2001 Yukihiro Matsumoto + + * ruby.c (proc_options): call ruby_show_version() just once. + + * dir.c (dir_s_open): returns the value from a block (if given). + +Mon Feb 26 14:29:04 2001 Akinori MUSHA + + * ext/extmk.rb.in, lib/mkmf.rb: add C++ rules in addition to C + rules. + +Mon Feb 26 00:04:52 2001 Yukihiro Matsumoto + + * eval.c (proc_call): should not modify ruby_block->frame.iter + based on ruby_frame->iter altered by PUSH_ITER(). + +Mon Feb 26 05:27:52 2001 Wakou Aoyama + + * lib/net/telnet.rb: #telnetmode(), #binmode(): bug fix. + thanks to nobu.nakada@nifty.ne.jp. + +Mon Feb 26 04:55:50 2001 Wakou Aoyama + + * lib/cgi.rb: CGI#form(): bug fix. + thanks to MoonWolf . + + * lib/cgi.rb: CGI#rfc1123_date(): improvement. + thanks to Tomoyasu Akita . + + * lib/cgi.rb: CGI#header(): improvement for mod_ruby. + thanks to Shugo Maeda . + +Sun Feb 25 02:45:30 2001 WATANABE Hirofumi + + * file.c (rb_file_s_rename): avoid Cygwin's bug. + +Sat Feb 24 23:32:55 2001 Yukihiro Matsumoto + + * eval.c (rb_thread_fd_close): should save current context before + raising exception. + +Sat Feb 24 22:14:00 2001 WATANABE Hirofumi + + * win32/win32.c (myrename): fix error handling. + +Sat Feb 24 13:58:48 2001 Minero Aoki + + * lib/net/http.rb: always close connection on request without + body. + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: change copyright. + +Sat Feb 24 03:15:49 2001 Yukihiro Matsumoto + + * io.c (set_stdin): preserve original stdin. + + * io.c (set_outfile): preserve original stdout/stderr. + +Fri Feb 23 08:28:58 2001 Minero Aoki + + * lib/net/protocol.rb: clear read buffer after reopen. + + * lib/net/protocol.rb: refactoring. + + * lib/net/http.rb: split module HTTPHeader from HTTPResponse. + +Tue Feb 20 23:45:35 2001 WATANABE Hirofumi + + * process.c: add W* macro if not available. + +Tue Feb 20 16:37:58 2001 Yukihiro Matsumoto + + * configure.in: add check for negative time_t for gmtime(3). + + * time.c (time_new_internal): no positive check if gmtime(3) can + handle negative time_t. + + * time.c (time_timeval): ditto. + + * bignum.c (rb_big2long): should not raise RangeError for Bignum + LONG_MIN value. + +Mon Feb 19 17:46:37 2001 Yukihiro Matsumoto + + * string.c (rb_str_substr): "a"[1,2] should return ""; need + rubicon upgrade. + +Mon Feb 19 12:10:36 2001 Triet H. Lai + + * error.c (rb_sys_warning): new function to give warning with + strerror() message. + + * dir.c (rb_glob_helper): better error handling, along with + performance tune. + +Mon Feb 19 01:55:43 2001 Yukihiro Matsumoto + + * eval.c (secure_visibility): visibility check for untainted modules. + +Mon Feb 19 00:29:29 2001 Nobuyoshi Nakada + + * signal.c (sigpipe): sighandler which does nothing. + + * signal.c (trap): set sigpipe function for SIGPIPE. + + * signal.c (Init_signal): default SIGPIPE handler should be + sigpipe function. + +Sun Feb 18 15:42:38 2001 WATANABE Hirofumi + + * ext/curses/extconf.rb: add dir_config. + + * missing/flock.c: use fcntl(2) instead of lockf(2). + +Sun Feb 18 05:46:03 2001 Minero Aoki + + * lib/net/http.rb: Response#range_length was not debugged. + +Sun Feb 18 04:02:03 2001 Yasushi Shoji + + * array.c (rb_ary_subseq): wrong boundary check. + +Sun Feb 18 00:09:50 2001 Nobuyoshi Nakada + + * win32/win32.c: make file I/O faster on mswin32/mingw32. + + * win32/win32.h: ditto. + + * rubysig.h: ditto. + +Sat Feb 17 23:32:45 2001 Yukihiro Matsumoto + + * parse.y (cond0): integer literal in condition should not be + compared to lineno ($.). + +Fri Feb 16 01:44:56 2001 Yukihiro Matsumoto + + * io.c (set_outfile): f should be the FILE* from the assigning value. + + * ext/socket/socket.c (tcp_s_open): should not give default value + to local_host. + + * time.c (time_s_times): move to Process::times. + + * file.c (rb_file_s_lchmod): new method File::lchmod. + + * file.c (rb_file_s_lchown): new method File::lchown. + +Thu Feb 15 11:33:49 2001 Shugo Maeda + + * lib/cgi/session.rb (close): fixed reversed condition. + +Thu Feb 15 08:34:14 2001 Yukihiro Matsumoto + + * process.c (proc_waitall): new method based on a patch from Brian + Fundakowski Feldman . + + * process.c (last_status_set): objectify $? value (Process::Status). + +Wed Feb 14 17:28:24 2001 Shugo Maeda + + * lib/net/imap.rb: supports unknown resp_text_code. + +Wed Feb 14 00:44:17 2001 Yukihiro Matsumoto + + * dir.c (dir_s_glob): support backslash escape of metacharacters + and delimiters. + + * dir.c (remove_backslases): remove backslashes from path before + calling stat(2). + + * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if + block is given to the method. + + * dir.c (push_pattern): do not call rb_ary_push; yield directly. + + * eval.c (blk_copy_prev): reduced ALLOC_N too much. + + * eval.c (frame_dup): ditto. + +Tue Feb 13 23:05:38 2001 WATANABE Hirofumi + + * dir.c (lstat): should use rb_sys_stat if lstat(2) is not + available. + +Tue Feb 13 08:43:10 2001 Yukihiro Matsumoto + + * io.c (rb_io_ctl): do not call ioctl/fcntl for f2, if f and f2 + have same fileno. + +Tue Feb 13 01:13:43 2001 Yukihiro Matsumoto + + * eval.c (rb_load): raise LocalJumpError if unexpected local jumps + appear during load. + + * ext/socket/socket.c (bsock_close_read): don't call rb_thread_fd_close(); + it's supposed to be called by io_io_close(). + + * ext/socket/socket.c (bsock_close_read): do not modify f and f2. + + * ext/socket/socket.c (bsock_close_write): ditto. + + * ext/socket/socket.c (sock_new): avoid dup(2) on sockets. + + * parse.y (primary): preserve and clear in_single and in_def using + stack to prevent nested method errors in singleton class bodies. + +Sun Feb 11 16:00:30 2001 WATANABE Hirofumi + + * eval.c (stack_length): use __builtin_frame_address() only if + GCC and i386 CPU. + + * gc.c (rb_gc, Init_stack): ditto. + + * configure.in: add ac_cv_func_getpgrp_void=yes on DJGPP. + +Sat Feb 10 23:43:49 2001 Nobuyoshi Nakada + + * hash.c (rb_any_hash): dumped core on machines sizeof(int) != sizeof(long). + +Sat Feb 10 23:07:15 2001 Yukihiro Matsumoto + + * io.c (rb_io_s_for_fd): IO::for_fd(fd) - new method. + + * regex.c (PREV_IS_A_LETTER): should not treat c>0x7f as a word + character if -Kn. + +Sat Feb 10 00:00:30 2001 Nobuyoshi Nakada + + * win32/win32.c (win32_stat): replace stat to enable when pathname + ends with '/' or '\' for mswin32 on Win9X / Win2k. + + * win32/win32.h: ditto. + + * ruby.h: ditto. + + * dir.c (rb_glob_helper): ditto. + + * file.c (rb_stat, rb_file_s_stat, eaccess, check3rdbyte): ditto. + +Fri Feb 9 22:54:57 2001 WATANABE Hirofumi + + * ruby.c (ruby_init_loadpath): convert '\\' to '/' + before finding executable file path. + +Fri Feb 9 17:41:53 2001 Triet H. Lai + + * dir.c (rb_glob_helper): do not follow symbolic links. + +Thu Feb 8 21:27:24 2001 WATANABE Hirofumi + + * lib/mkmf.rb (install_rb): fix handling of relative path. + + * lib/mkmf.rb (create_makefile): add srcdir. + +Thu Feb 8 02:22:09 2001 Minero Aoki + + * lib/net/http.rb: join HTTPReadResponse into HTTPResponse again. + + * lib/net/http.rb: move http_version() from HTTPRequest to + HTTPResponse. + + * lib/net/protocol.rb: refactoring. + +Wed Feb 7 16:27:27 2001 Minero Aoki + + * lib/net/http.rb: split HTTPResponse into HTTPReadResponse + module. + + * lib/net/protocol.rb: add Net::net_private. + + * lib/net/protocol.rb: Socket#reopen takes arg, open_timeout. + +Wed Feb 7 16:05:22 2001 Nobuyoshi Nakada + + * parse.y (parse_quotedwords): %w should allow parenthesis escape. + +Wed Feb 7 00:57:42 2001 Yukihiro Matsumoto + + * parse.y (parse_qstring): %q should allow terminator escape. + + * re.c (rb_reg_options): new method to give an option values. + + * parse.y (cond0): disable special treating of integer literal in + conditional unless option -e is supplied. changes current + behavior. experimental. + + * parse.y (cond0): give warning for string/integer literals and + dot operators in conditionals unless option -e is supplied. + + * re.c (rb_reg_equal): all option flags should be same to be equal. + +Tue Feb 6 21:30:44 2001 Minero Aoki + + * lib/net/http.rb: call on_connect() on re-opening socket. + + * lib/net/pop.rb: also POP3 can use APOP auth. + +Tue Feb 6 20:19:10 2001 Minero Aoki + + * lib/net/http.rb: add HTTP#request. + + * lib/net/http.rb: take HTTP 1.0 server into account (incomplete). + + * lib/net/protocol.rb: timeout for open/read. + + * lib/net/protocol.rb: add Protocol#on_connect,on_disconnect. + +Mon Feb 5 23:15:46 2001 Yukihiro Matsumoto + + * error.c (Init_Exception): make Interrupt a subclass of + SignalException. + +Mon Feb 5 00:39:06 2001 KANEKO Naoshi + + * dir.c: use ISXXX() instead of isxxx(). + + * dln.c (aix_loaderror): ditto. + + * file.c (rb_file_s_expand_path): ditto. + + * string.c (rb_str_upcase_bang): ditto. + + * win32/win32.c (do_spawn): ditto. + + * win32/win32.c (NtMakeCmdVector): ditto. + + * win32/win32.c (opendir): ditto. + +Sat Feb 3 14:44:53 2001 Nobuyoshi Nakada + + * configure.in (AC_C_INLINE): check inline attribute. + + * gc.c (is_pointer_to_heap): use inline rather than __inline__. + + * pack.c (hex2num): ditto. + + * ruby.h (rb_class_of, rb_type, rb_special_const_p): ditto. + + * util.c (rb_class_of, rb_type, rb_special_const_p): defined in + ruby.h. + +Fri Feb 2 16:14:51 2001 Yukihiro Matsumoto + + * array.c (rb_ary_sort_bang): returns self, even if its length is + less than 2. + + * eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if + SCOPE_DONT_RECYCLE of ruby_scope is set. + +Wed Jan 31 22:27:29 2001 WATANABE Hirofumi + + * configure.in: gcc-2.95.2-7(Cygwin) support. + add -mwin32 if available. + + * cygwin/GNUmakefile: ditto. + +Tue Jan 30 17:56:48 2001 Yukihiro Matsumoto + + * array.c (rb_ary_fetch): new method. + +Mon Jan 29 17:36:19 2001 TOYOFUKU Chikanobu + + * eval.c (rb_eval): nd_iter evaluation should be wrapped by + BEGIN_CALLARGS and END_CALLARGS. + +Mon Jan 29 14:25:39 2001 Yukihiro Matsumoto + + * eval.c (block_pass): return from block jumps directory to + block invoker. + +Mon Jan 29 01:40:27 2001 Yukihiro Matsumoto + + * string.c (str_independent): should not clear str->orig here. + it's too early. + +Fri Jan 26 01:42:40 2001 Yukihiro Matsumoto + + * parse.y: clarify do ambiguity, bit more complex but natural + from my point of view. + +Wed Jan 24 14:58:08 2001 Akinori MUSHA + + * lib/cgi.rb: fix the problem that when running under mod_ruby + header() outputs only one Set-Cookie line. + +Wed Jan 24 01:45:49 2001 Yukihiro Matsumoto + + * eval.c (POP_BLOCK_TAG): call rb_gc_force_recycle() if block has + not been objectified. + + * eval.c (rb_callcc): should nail down block->tag history to avoid + rb_gc_force_recycle(). + +Tue Jan 23 18:51:57 2001 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): should finalize objects in + deferred_final_list too. + +Tue Jan 23 16:10:12 2001 Yukihiro Matsumoto + + * gc.c (os_live_obj): do not list terminated object. + + * gc.c (os_obj_of): ditto. + + * gc.c (rb_gc_mark): support new T_BLKTAG tag. + + * gc.c (obj_free): ditto. + + * eval.c (new_blktag): creation of new block tag, which holds + destination of global jump and orphan status. + + * eval.c (block_pass): break from orphan Proc object will raise a + LocalJumpError exception. + +Mon Jan 22 16:33:16 2001 WATANABE Hirofumi + + * mkconfig.rb: autoconf 2.49 support. + +Mon Jan 22 00:32:44 2001 Yukihiro Matsumoto + + * eval.c (block_pass): behavior consistency with proc_call(). do + not propagate `break'. + +Sat Jan 20 03:54:00 2001 Yukihiro Matsumoto + + * parse.y (yylex): fixed serious syntax misbehavior. do's + preceding was too high. a block in `foo bar do .. end' should + be passed to `foo', not `bar'. + + * parse.y (block_call): syntax restructure. + +Thu Jan 18 04:28:14 2001 Yukihiro Matsumoto + + * io.c (rb_io_s_read): new method to call IO#read from + pathname. In addition, it accepts third optional argument to + specify starting point. + +Wed Jan 17 13:28:26 2001 WATANABE Hirofumi + + * configure.in: remove DEFS definition. + + * mkconfig.rb: ditto. + + * win32/config.status.in: ditto. + +Tue Jan 16 17:00:50 2001 Minero Aoki + + * lib/net/protocol.rb: ignore EOFError for read. + + * lib/net/http.rb: user specified header was not used. + +Mon Jan 15 16:00:07 2001 Yukihiro Matsumoto + + * pack.c (pack_unpack): should check associated pointer packed by + pack("P"). Thus pointers can be retrieved only from pointer + packed strings. restriction added. + +Sun Jan 14 21:49:28 2001 Koji Arai + + * sprintf.c (rb_f_sprintf): simple typo. binary base should be 2, + not '2'. + + * re.c (rb_reg_s_last_match): should explicitly return nth match. + +Sun Jan 14 18:21:30 2001 Usaku Nakamura + + * win32/config.status.in: add some field. + + * win32/win32.c (isInternalCmd): ignore case for shell's internal + command. + + * win32/win32.c (do_spawn): recognize quoted command line. + +Sun Jan 14 04:10:27 2001 Minero Aoki + + * lib/net/protocol.rb (adding): too few "yield" in case of arg is + not String/File. + + * lib/net/http.rb: add http request object. + +Sat Jan 13 19:39:30 2001 WATANABE Hirofumi + + * re.c (rb_reg_desc): separate RE_OPTION_MULTILINE + + * re.c (rb_reg_options): add RE_OPTION_{POSIXLINE,RE_OPTION_MULTILINE, + RE_OPTION_EXTENDED} + +Thu Jan 11 10:45:04 2001 WATANABE Hirofumi + + * win32/win32.h, win32/config.h.in: move NORETURN from win32.h + to config.h.in. + + * win32/config.h.in (inline): renamed from INLINE. + + * djgpp/config.hin (INLINE): removed. + +Thu Jan 11 06:45:55 2001 Yukihiro Matsumoto + + * object.c (rb_mod_dup): should propagate FL_SINGLETON. + + * object.c (inspect_obj): handles the case of no instance variable. + +Wed Jan 10 16:15:08 2001 WATANABE Hirofumi + + * ruby.h: NORETURN macro is changed for VC++ 6.0. + + * eval.c, intern.h: ditto. + + * djgpp/config.hin, win32/win32.h: ditto. + + * configure.in: ditto. + +Wed Jan 10 13:54:53 2001 WATANABE Hirofumi + + * process.c (proc_setuid): use setresuid() if available. + + * process.c (proc_setgid): use setresgid() if available. + + * configure.in: ditto. + +Wed Jan 10 01:50:45 2001 Yukihiro Matsumoto + + * configure.in (AC_C_INLINE): check inline attribute. + + * string.c (rb_str_reverse_bang): forgot to call rb_str_modify(). + +Tue Jan 9 17:41:40 2001 Yukihiro Matsumoto + + * object.c (rb_obj_taint): check frozen status before modifying + taint status. + + * object.c (rb_obj_untaint): ditto. + +Tue Jan 9 16:22:14 2001 Yukihiro Matsumoto + + * enum.c (enum_inject): new method. + +Tue Jan 9 02:16:42 2001 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): clear klass member of + terminating object. + + * eval.c (rb_call): raise exception for terminated object. + +Mon Jan 8 21:24:37 2001 Yukihiro Matsumoto + + * bignum.c (bigdivrem): t2 might be too big for signed long; do + not use rb_int2big(), but rb_uint2big(). + +Mon Jan 8 21:35:10 2001 Guy Decoux + + * file.c (path_check_1): should restore modified path. + +Mon Jan 8 03:09:58 2001 Yukihiro Matsumoto + + * error.c (rb_load_fail): new func to report LoadError. + + * ruby.c (load_file): use rb_load_fail. + +Sat Jan 6 00:17:18 2001 WATANABE Hirofumi + + * pack.c (pack_pack): avoid infinite loop(pack 'm2'). + +Fri Jan 5 01:02:17 2001 Yukihiro Matsumoto + + * eval.c (ruby_finalize): should enclosed by PUSH_TAG/POP_TAG. + + * gc.c (rb_gc_mark): link 2 of NODE_IFUNC should not be explicitly + marked. it may contain non object pointer. + +Tue Jan 2 00:20:06 2001 Yukihiro Matsumoto + + * re.c (reg_s_last_match): Regexp::last_match(nth) returns nth + substring of the match (alternative for $& and $). + +Sun Dec 31 01:39:16 2000 Guy Decoux + + * eval.c (rb_mod_define_method): wrong comparison for blocks. + +Sat Dec 30 19:28:50 2000 Yukihiro Matsumoto + + * gc.c (id2ref): should handle Symbol too. + + * gc.c (id2ref): should print original ptr value + +Sat Dec 30 03:14:22 2000 Yukihiro Matsumoto + + * eval.c (rb_iterate): NODE_CFUNC does not protect its data + (nd_tval), so create new node NODE_IFUNC for iteration C + function. + + * eval.c (rb_yield_0): use NODE_IFUNC. + + * gc.c (rb_gc_mark): support NODE_IFUNC. + +Fri Dec 29 11:41:55 2000 Yukihiro Matsumoto + + * gc.c (mem_error): prohibit recursive mem_error(). + (ruby-bugs-ja:PR#36) + +Fri Dec 29 11:05:41 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_fd_writable): should not switch context if + rb_thread_critical is set. + + * eval.c (rb_thread_wait_fd): ditto. + + * eval.c (rb_thread_wait_for): ditto. + + * eval.c (rb_thread_select): ditto. + + * eval.c (rb_thread_join): join during critical section causes + deadlock. + +Fri Dec 29 00:38:46 2000 Yukihiro Matsumoto + + * m17n.c: new file - core functions of M17N. + +Tue Dec 26 18:46:41 2000 NAKAMURA, Hiroshi + + * lib/debug.rb: Avoid thread deadlock in debugging stopped thread. + + * lib/debug.rb: Uncleared 'finish' state. + +Tue Dec 26 16:53:55 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): remove dvar node by rb_gc_force_recycle() + more eagerly. + + * eval.c (rb_f_binding): recycling should be stopped for outer + scope too. + + * eval.c (proc_new): ditto. + +Tue Dec 26 15:45:35 2000 Yukihiro Matsumoto + + * string.c (rb_str_inspect): should treat multibyte characters + properly. + +Mon Dec 25 17:49:08 2000 K.Kosako + + * string.c (rb_str_replace_m): unexpected string share happens if + replace is done for associated (STR_NO_ORIG) string. + +Tue Dec 26 15:01:53 2000 Yukihiro Matsumoto + + * io.c (rb_f_p): should not call rb_io_flush() if rb_defout is not + a IO (T_FILE). + +Mon Dec 25 15:52:39 2000 Yukihiro Matsumoto + + * stable version 1.6.2 released. + +Mon Dec 25 05:11:04 2000 Wakou Aoyama + + * lib/cgi.rb: version 2.1.2 (some bug fixes). + + * lib/cgi.rb: Regexp::last_match[1] --> $1 + + * lib/net/telnet.rb: ditto. + +Mon Dec 25 04:43:02 2000 Minero Aoki + + * lib/net/http.rb: does not send HEAD on closing socket. + +Mon Dec 25 00:44:48 2000 Yukihiro Matsumoto + + * hash.c (rb_any_cmp): should use rb_str_cmp() if TYPE == T_STRING + and CLASS_OF == rb_cString. + + * string.c (rb_str_new4): should copy class of original too. + +Mon Dec 25 00:04:54 2000 Nobuyoshi Nakada + + * eval.c (rb_thread_schedule): initial value of `max' changed to -1. + +Mon Dec 25 00:16:14 2000 Yukihiro Matsumoto + + * string.c (rb_str_replace_m): copy-on-write replace. + + * parse.y (yylex): should handle => after identifier as well as == + and =~. + +Sat Dec 23 23:55:57 2000 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): Integer("") should not return 0. + +Sat Dec 23 11:55:57 2000 Yukihiro Matsumoto + + * array.c (rb_ary_and): Array#& should preserve original order. + +Sat Dec 23 03:44:16 2000 Minero Aoki + + * lib/net/protocol.rb: set @closed false in Socket#reopen. + + * lib/net/pop.rb: add POP3.foreach, delete_all. + + * lib/net/pop.rb: add POP3#delete_all. + + * lib/net/http.rb: add HTTP.version_1_1, version_1_2 + + * lib/net/http.rb: refactoring. + +Fri Dec 22 23:11:12 2000 Ueno Katsuhiro + + * eval.c (rb_feature_p): ext might be null. + +Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada + + * win32/win32.c (myselect): avoid busy loop by adjusting fd_count. + +Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): prefix like '0x' had removed too much. + +Thu Dec 21 13:01:46 2000 Tanaka Akira + + * lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress. + +Wed Dec 20 12:00:15 2000 Yukihiro Matsumoto + + * bignum.c (rb_big_lshift): should cast up to BDIGIT_DBL. + + * parse.y (yylex): disallow trailing '_' for numeric literals. + + * bignum.c (rb_cstr2inum): allow `_' within converting string. + + * eval.c (specific_eval): should take no argument if block is + supplied. + +Tue Dec 19 13:44:50 2000 K.Kosako + + * io.c (rb_f_p): should flush rb_defout, not stdout. + +Tue Dec 19 00:57:10 2000 Yukihiro Matsumoto + + * time.c (time_minus): usec might overflow. (ruby-bugs-ja:PR#35) + + * eval.c (rb_obj_extend): Object#extend should take at least one + argument. + + * parse.y (mrhs_basic): should check value_expr($3), not $1. + +Mon Dec 18 23:18:39 2000 WATANABE Hirofumi + + * util.c (mblen, __crt0_glob_function): add for multibyte + on DJGPP 2.03. + +Mon Dec 18 18:10:30 2000 Yukihiro Matsumoto + + * time.c (time_plus): usec might underflow (ruby-bugs-ja:#PR33). + +Mon Dec 18 08:11:20 2000 Yukihiro Matsumoto + + * hash.c (rb_hash_set_default): should call rb_hash_modify(). + +Sat Dec 16 02:58:26 2000 Minero Aoki + + * eval.c (rb_eval): should clear ruby_errinfo on retry. + + * eval.c (rb_rescue2): ditto. + +Thu Dec 14 13:06:18 2000 Nobuyoshi Nakada + + * class.c (rb_include_module): prohibit frozen class/module. + + * eval.c (rb_frozen_class_p): make external. + + * intern.h (rb_frozen_class_p): prototyped. + + * intern.h (rb_undef): prototyped not but rb_undef_method() + which is also in ruby.h. + +Thu Dec 14 09:20:26 2000 Wakou Aoyama + + * lib/cgi.rb: support -T1 on ruby 1.6.2 + + * lib/cgi.rb: $1 --> Regexp::last_match[1] + + * lib/net/telnet.rb: ditto. + +Wed Dec 13 23:27:06 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): handles case statement without expr, which + looks for any TRUE (non nil, non false) when expression. + + * parse.y (primary): case expression should not be compstmt, but + mere expr. + + * parse.y (primary): case without following expression is now + separated rule. + +Wed Dec 13 12:41:27 2000 WATANABE Hirofumi + + * ruby.c (proc_options): accept "--^M" for DOS line endings. + +Tue Dec 12 15:45:42 2000 Yukihiro Matsumoto + + * parse.y (newline_node): cancel newline unification. + +Mon Dec 11 23:01:57 2000 Yukihiro Matsumoto + + * parse.y (yylex): supports cases `?' precedes EOF and newline. + +Mon Dec 11 12:11:25 2000 Yukihiro Matsumoto + + * eval.c (call_end_proc): some frame members were left + uninitialized. + +Mon Dec 11 01:14:58 2000 Yukihiro Matsumoto + + * io.c (rb_io_fptr_finalize): do not fclose stdin, stdout and + stderr at exit. + +Sat Dec 9 17:34:48 2000 Tachino Nobuhiro + + * time.c (time_cmp): should check with kind_of?, not instance_of? + + * time.c (time_eql): ditto. + + * time.c (time_minus): ditto. + +Fri Dec 8 17:23:25 2000 Tachino Nobuhiro + + * sprintf.c (rb_f_sprintf): proper string precision treat. + +Fri Dec 8 10:44:05 2000 Yukihiro Matsumoto + + * variable.c (rb_mod_remove_cvar): Module#remove_class_variable + added. + +Thu Dec 7 17:35:51 2000 Shugo Maeda + + * eval.c (stack_length): don't use __builtin_frame_address() on alpha. + +Wed Dec 6 18:07:13 2000 WATANABE Hirofumi + + * djgpp/config.sed, win32/Makefile.sub: typo. + + * eval.c (rb_mod_define_method): avoid VC4.0 warnings. + +Wed Dec 6 13:38:08 2000 Yukihiro Matsumoto + + * array.c (rb_ary_and): tuning, make hash from shorter operand. + +Wed Dec 6 01:28:50 2000 SHIROYAMA Takayuki + + * gc.c (rb_gc): __builtin_frame_address() should not be used on + MacOS X. + + * gc.c (Init_stack): ditto. + +Mon Dec 4 13:44:01 2000 WATANABE Hirofumi + + * lib/jcode.rb: consider multibyte. not /n. + +Mon Dec 4 09:49:36 2000 Yukihiro Matsumoto + + * string.c (rb_str_inspect): output whole string contents. no more `...' + + * string.c (rb_str_dump): should propagate taintness. + + * hash.c (env_inspect): hash like human readable output. + + * variable.c (rb_ivar_get): prohibiting instance variable access + is too much restriction. + + * class.c (method_list): retrieving information should not be + restricted where $SAFE=4. + + * class.c (rb_obj_singleton_methods): ditto. + + * eval.c (rb_thread_priority): ditto. + + * eval.c (rb_thread_local_aref): ditto. + + * variable.c (rb_obj_instance_variables): ditto. + + * variable.c (rb_mod_const_at): ditto. + + * variable.c (rb_mod_class_variables): ditto. + + * eval.c (rb_exec_end_proc): end_proc should be preserved. + +Sat Dec 2 22:32:43 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): || should accept exactly zero argument. + + * parse.y (stmt): multiple right hand side for single assignment + (e.g. a = 1,2) is allowed. + +Wed Nov 29 07:55:29 2000 Yukihiro Matsumoto + + * marshal.c (w_long): dumping long should be smaller than 32bit max. + + * marshal.c (w_long): shorter long format for small integers(-123..122). + + * marshal.c (r_long): ditto. + +Tue Nov 28 18:10:51 2000 Yukihiro Matsumoto + + * eval.c (rb_mod_define_method): quick hack to implement + on-the-fly method definition. experimental. + +Mon Nov 27 17:00:35 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): should not redefine builtin classes/modules + from within wrapped load. + +Mon Nov 27 08:57:33 2000 Yukihiro Matsumoto + + * eval.c (call_end_proc): should be isolated from outer block. + +Mon Nov 27 00:10:08 2000 Yukihiro Matsumoto + + * io.c (rb_io_ctl): call ioctl/fcntl for fptr->f2 too. + + * process.c (rb_f_fork): call rb_thread_atfork() after creating + child process. + + * eval.c (rb_thread_atfork): kill all other threads immediately, + then turn the current thread into the main thread. + +Sat Nov 25 23:12:22 2000 Yukihiro Matsumoto + + * eval.c (ruby_run): move calling point of rb_trap_exit after + cleaning up threads. + + * eval.c (ruby_finalize): new function to call EXIT trap, END + procs and GC finalizers. + + * eval.c (rb_exec_end_proc): prevent recursion. + + * gc.c (rb_gc_call_finalizer_at_exit): ditto. + + * signal.c (rb_trap_exit): ditto. made static. + + * process.c (rb_f_fork): should swallow all exceptions from block + execution. + + * process.c (fork_rescue): should call ruby_finalize(). + + * parse.y (yycompile): rb_gc() removed. I don't remember why I put + this here. test code? + +Fri Nov 24 22:03:48 2000 Yukihiro Matsumoto + + * range.c (EXCL): exclusive information is now stored in an + instance variable. this enables proper marshal dump. + + * process.c (proc_waitpid): should clear rb_last_status ($?) if + no pid was given by waitpid(2). + +Thu Nov 23 01:35:38 2000 Yukihiro Matsumoto + + * process.c (proc_waitpid2): returns nil if no pid found. + +Wed Nov 22 23:45:15 2000 Yukihiro Matsumoto + + * range.c (range_eq): new method. Compares start and end of range + respectively. + +Wed Nov 22 11:01:32 2000 Yukihiro Matsumoto + + * variable.c (rb_mod_class_variables): should honor singleton + class variable rule defined yesterday. + +Tue Nov 21 23:24:14 2000 Mitsuteru S Nakao + + * numeric.c (flodivmod): missing second operand (typo). + +Tue Nov 21 03:39:41 2000 Yukihiro Matsumoto + + * marshal.c (marshal_load): marshal format compatibility check + revised. greater minor revision is UPWARD compatible; + downward compatibility is not assured. + + * eval.c (is_defined): clarify class variable behavior for + singleton classes. class variables within singleton class + should be treated like within singleton method. + +Mon Nov 20 13:45:21 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): set ruby_sourceline before evaluating + exceptions. + + * gc.c (gc_sweep): defer finalization in GC during compilation or + interrupt prohibit section. + + * gc.c (gc_sweep): mark all nodes before sweeping if GC happened + during compilation. + + * eval.c (rb_eval): should treat class variables specially in a + method defined in the singleton class. + +Mon Nov 20 10:20:21 2000 WATANABE Hirofumi + + * dir.c, win32/win32.c, ruby.h: add rb_iglob(). + +Mon Nov 20 00:18:16 2000 Yukihiro Matsumoto + + * array.c (rb_ary_subseq): should return nil for outbound start + index. + + * marshal.c (marshal_load): show format versions explicitly when + format version mismatch happens. + +Sun Nov 19 06:13:24 2000 Kazuhiro NISHIYAMA + + * marshal.c: use long for string/array length. + + * pack.c (swaps): use bit-or(|) instead of plus(+). + + * pack.c (swapl): ditto. + +Sat Nov 18 15:18:16 2000 Kazuhiro NISHIYAMA + + * array.c (rb_ary_replace): array size should be in long. + + * array.c (rb_ary_concat): ditto. + + * array.c (rb_ary_hash): ditto. + +Sat Nov 18 14:07:20 2000 Minero Aoki + + * lib/net/http.rb: Socket#readline() reads until "\n", not "\r\n" + +Fri Nov 17 14:55:18 2000 WATANABE Hirofumi + + * string.c (rb_str_succ): output should be NUL terminated. + +Fri Nov 17 02:54:15 2000 Yukihiro Matsumoto + + * io.c (rb_io_close): need not to flush before closing. + + * eval.c (rb_thread_join): should preserve last thread status when + THREAD_TO_KILL. + + * eval.c (rb_thread_stop): ditto. + + * io.c (io_fflush): wrap fflush by TRAP_BEG, TRAP_END. + + * eval.c (rb_eval): method defined within singleton class + definition should behave like singleton method about class + variables. + + * eval.c (is_defined): ditto. + +Thu Nov 16 23:06:07 2000 Minero Aoki + + * lib/net/http.rb: can call {old,new}_implementation any times. + + * lib/net/http.rb: HTTP#connecting, receive -> + common_oper, connecting. + + * lib/net/http.rb: output warning if u_header includes + duplicated header. + + * lib/net/http.rb: not check Connection:/Proxy-Connection; + always read until eof. + + * lib/net/protocol.rb: detects and catches "break" from block. + +Thu Nov 16 16:32:45 2000 Masahiro Tanaka + + * bignum.c (bigdivrem): should have incremented ny first. + +Thu Nov 16 14:58:00 2000 Nobuyoshi Nakada + + * ext/socket/socket.c (sock_new): duplicates file descriptor + with myfddup() on mswin32/mingw32. + + * win32/win32.h: uses system original fdopen(). + + * win32/win32.c (myfddup): newly added instead of myfdopen(). + + * win32/win32.c (mybind, myconnect, mygetsockname, mygetsockopt, + mylisten, mysetsockopt): now accept file descriptor only, not + SOCKET. + + * win32/win32.c (myaccept, mysocket): return file descriptor, + instead of SOCKET. + +Thu Nov 16 10:23:24 2000 Yukihiro Matsumoto + + * eval.c (massign): too strict check for nameless rest argument. + + * eval.c (method_arity): mere * should return -1. + + * eval.c (intersect_fds): should check all FDs in the fd_set. + +Wed Nov 15 19:33:20 2000 Nobuyoshi Nakada + + * eval.c (rb_attr): should clear method cache before calling hook. + + * eval.c (rb_eval): ditto. + + * eval.c (rb_mod_modfunc): ditto. + +Mon Nov 13 22:44:52 2000 Yukihiro Matsumoto + + * error.c (rb_bug): print version to stderr. + +Mon Nov 13 19:02:08 2000 WATANABE Hirofumi + + * win32/win32.c, io.c, process.c: the exit status of program must be + multiplied 256 on mswin32 and msdosdjgpp(system(), ``). + +Sat Nov 11 22:57:38 2000 Yukihiro Matsumoto + + * parse.y (arg): uniformed treatment of -a**b, where a is a + number literal; hacky but behavior appears more consistent. + + * parse.y (newline_node): reduce newline node (one per line). + + * random.c (rb_f_srand): should be prohibited in safe level + greater than 4. + +Sat Nov 11 22:37:36 2000 Nobuyoshi Nakada + + * rubysig.h: do not use rb_trap_immediate on win32. + + * rubysig.h: new macros, ATOMIC_TEST, ATOMIC_SET, ATOMIC_INC, + ATOMIC_DEC, RUBY_CRITICAL and new definition of TRAP_BEG, + TRAP_END. + + * gc.c (ruby_xmalloc): should wrap malloc() by RUBY_CRITICAL. + + * signal.c (sighandle): better win32 sig handling. + + * win32/win32.c (flock): better implementation. + + * win32/win32.c (myselect): ditto. + + * win32/win32.c (myaccept): ditto. + + * win32/win32.c (waitpid): ditto. + + * win32/win32.c (myrename): ditto. + + * win32/win32.c (wait_events): support function for win32 signal + handling. + +Sat Nov 11 08:34:18 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.31. + + * lib/net/http.rb: initializes header in HTTP, not HTTPCommand. + + * lib/net/protocol.rb, http.rb: rewrites proxy code. + +Fri Nov 10 16:15:53 2000 Yukihiro Matsumoto + + * numeric.c (rb_num2long): use to_int, not to_i. + + * error.c: T_SYMBOL was misplaced by T_UNDEF. + + * parse.y (yylex): eval("^") caused infinite loop. + +Thu Nov 9 14:22:13 2000 Yukihiro Matsumoto + + * io.c (rb_io_taint_check): should check IO taintness; no + operation for untainted IO should be allowed in the sandbox. + + * rubyio.h (GetOpenFile): check IO taintness inside using + rb_io_taint_check(). + +Wed Nov 8 03:08:53 2000 Yukihiro Matsumoto + + * io.c (io_fflush): ensure fflush(3) would not block by calling + rb_thread_fd_writable(). + +Tue Nov 7 20:29:56 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.30. + + * lib/net/protocol.rb, smtp.rb: Command#critical_ok -> error_ok + + * lib/net/http.rb: reads header when also "100 Continue". + +Tue Nov 7 04:32:19 2000 Yukihiro Matsumoto + + * bignum.c (bigdivrem): use bit shift to make y's MSB set. + +Mon Nov 6 1:22:49 2000 Yukihiro Matsumoto + + * error.c (warn_print): do not use err_append(), to ensure output + to stderr. + + * error.c (rb_warn): use warn_print() instead of err_print(). + + * error.c (rb_warning): ditto. + + * error.c (rb_bug): ditto. + + * eval.c (rb_load): re-raise exceptions during load. + + * time.c (make_time_t): remove useless adjust + +Thu Nov 2 18:01:16 2000 Yukihiro Matsumoto + + * random.c (rb_f_rand): half-baked float support fixed. This fix + was originally proposed by K.Kosako . + +Tue Oct 31 17:27:17 2000 Yukihiro Matsumoto + + * bignum.c: change digit size to `long|int' if long long is + available. + + * marshal.c (w_object): support `long|int' digits. + + * marshal.c (r_object): ditto. + +Sat Oct 28 23:54:22 2000 Yukihiro Matsumoto + + * parse.y (yylex): allow =end at the end of file (without a + newline at the end). + +Fri Oct 27 10:00:27 2000 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): should ignore trailing white spaces. + + * bignum.c (rb_str2inum): string may not have sentinel NUL. + +Fri Oct 27 02:37:22 2000 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): wrongly assigned base to c before + badcheck check. + +Thu Oct 26 02:42:50 2000 Minero Aoki + + * lib/net/protocol.rb: Command#critical_ok + + * lib/net/smtp.rb: clear critical flag before go to SMTP + +Wed Oct 25 12:30:19 2000 Yukihiro Matsumoto + + * array.c (rb_ary_concat): replacing array might be the receiver + itself. do not call rb_ary_push_m. + + * array.c (rb_ary_replace): replacing array might be the receiver + itself. use memmove. + +Fri Oct 20 07:56:23 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): ARGSPUSH should not modify args array. + +Thu Oct 19 14:58:17 2000 WATANABE Tetsuya + + * pack.c (NUM2U32): should use NUM2ULONG(). + +Tue Oct 17 17:30:34 2000 WATANABE Hirofumi + + * eval.c (error_print): ruby_sourcefile may be NULL. + +Tue Oct 17 16:36:28 2000 Wes Nakamura + + * pack.c (NATINT_U32): wrong use of sizeof. + +Tue Oct 17 12:48:20 2000 Katsuyuki Komatsu + + * eval.c (rb_abort): nil check against ruby_errinfo. + + * eval.c (rb_thread_schedule): use FOREACH_THREAD_FROM instead of + FOREACH_THREAD, since curr_thread may be removed from thread ring. + + * eval.c (THREAD_ALLOC): errinfo should be Qnil. + + * eval.c (rb_callcc): th->prev,th->next are now already + initialized in THREAD_ALLOC. + +Mon Oct 16 15:37:33 2000 Kazuhiro NISHIYAMA + + * eval.c (rb_thread_inspect): tag size was shorter than required. + + * object.c (rb_obj_inspect): ditto. + +Mon Oct 16 14:25:18 2000 Shugo Maeda + + * object.c (sym_inspect): used `name' before initialization. + +Mon Oct 16 14:06:00 2000 Yukihiro Matsumoto + + * pack.c (pack_pack): use NATINT_U32 for 'l', 'L', and 'N'. + + * pack.c (I32,U32): 32 bit sized integer. + + * pack.c (OFF16,OFF32B): big endian offset for network byteorder. + +Mon Oct 16 06:39:32 2000 Minero Aoki + + * lib/net/http.rb: hex-alpha is not [a-h] but [a-f]. + +Mon Oct 16 01:02:02 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): should not abort on exception if + $SAFE >= 4. + + * parse.y (sym): symbols for class variable names. + +Sun Oct 15 01:49:18 2000 Yukihiro Matsumoto + + * file.c (rb_file_flock): should accept interrupt. + + * process.c (rb_waitpid): ditto. + + * process.c (rb_waitpid): ditto. + + * process.c (proc_wait): ditto. + + * process.c (proc_waitpid2): wrong recursion. + +Sat Oct 14 03:32:13 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_alloc): should not link a new thread in the + live thread ring before initialization. + +Fri Oct 13 17:08:09 2000 Shugo Maeda + + * lib/net/imap.rb: new file. + +Thu Oct 12 18:56:28 2000 Minero Aoki + + * lib/net/pop.rb: POP3#reset + + * lib/net/http.rb: a code for "Switch Protocol" was wrongly 100. + +Thu Oct 12 01:23:38 2000 Wakou Aoyama + + * lib/cgi.rb: bug fix: CGI::html(): PRETTY option didn't work. + +Thu Oct 12 00:03:02 2000 Yukihiro Matsumoto + + * object.c (sym_inspect): should adjust string length. + + * struct.c (rb_struct_to_s): ditto. + + * struct.c (rb_struct_inspect): ditto. + +Wed Oct 11 22:15:47 2000 Katsuyuki Komatsu + + * eval.c (rb_thread_inspect): should adjust string length. + + * object.c (rb_any_to_s): ditto. + + * object.c (rb_obj_inspect): ditto. + +Wed Oct 11 18:13:50 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): should check insecure exit. + +Wed Oct 11 14:29:51 2000 Minero Aoki + + * lib/net/protocol.rb: 2nd arg for ProtocolError#initialize is + optional. + + * lib/net/http.rb: code refining. + +Wed Oct 11 11:13:03 2000 Yukihiro Matsumoto + + * parse.y (primary): setter method (e.g. foo=) should always be + public. + + * eval.c (rb_thread_raise): should not raise SecurityError if + exception raised by the interpreter. + + * eval.c (rb_thread_cleanup): skip all THREAD_KILLED threads + before FOREACH_THREAD. + +Tue Oct 10 16:11:54 2000 WATANABE Hirofumi + + * dln.c (dln_load): remove unused code for Cygwin. + +Tue Oct 10 09:49:23 2000 Yukihiro Matsumoto + + * file.c (Init_File): FileTest.size should return 0 (not nil) for + empty files. + +Sun Oct 8 13:20:26 2000 Guy Decoux + + * eval.c (POP_SCOPE): not just set SCOPE_DONT_RECYCLE, but do + scope_dup(). + +Sat Oct 7 15:10:50 2000 Yukihiro Matsumoto + + * string.c (rb_str_reverse_bang): unnecessary ALLOCA_N() was + removed. + +Fri Oct 6 14:50:24 2000 WATANABE Hirofumi + + * ext/extmk.rb.in, lib/mkmf.rb: remove "DESTDIR =". + + * Makefile.in, win32/Makefile.sub, ruby.1: renamed -X to -C. + +Fri Oct 6 12:50:52 2000 Yukihiro Matsumoto + + * array.c (rb_ary_plus): use to_ary(), not Check_Type(). + + * array.c (rb_ary_concat): ditto. + + * gc.c (rb_gc): use __builtin_frame_address() for gcc. + + * eval.c (stack_length): ditto. + + * parse.y (assign_in_cond): stop warning till some better warning + condition will be found. + +Thu Oct 5 18:02:39 2000 Yukihiro Matsumoto + + * object.c (rb_obj_dup): should have propagated taint flag. + (ruby-bugs:#PR64,65) + +Wed Oct 4 00:26:11 2000 Yukihiro Matsumoto + + * eval.c (proc_arity): proc{|a|}'s arity should be -1. + +Mon Oct 2 05:28:58 2000 akira yamada + + * string.c (trnext): minus at the end of pattern. + +Sun Oct 1 00:43:34 2000 WATANABE Hirofumi + + * configure.in: exp-name was wrong on cygwin and mingw32. + +Thu Sep 28 14:57:09 2000 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should try must_string calculation + every time. + +Tue Sep 19 23:47:44 2000 SHIROYAMA Takayuki + + * configure.in, config.guess, config.sub: MacOS X support. + +Wed Sep 27 18:40:05 2000 Yukihiro Matsumoto + + * stable version 1.6.1 released. + +Wed Sep 27 16:13:05 2000 WATANABE Hirofumi + + * mkconfig.rb: variables should be expanded only if /\$\{?\w+\}?/. + +Tue Sep 26 18:09:51 2000 WATANABE Hirofumi + + * string.c: include + +Tue Sep 26 15:59:50 2000 Yukihiro Matsumoto + + * object.c (rb_mod_dup): metaclasses of class/module should not be + cleared by rb_obj_dup. + +Tue Sep 26 02:44:54 2000 Yukihiro Matsumoto + + * gc.c (GC_MALLOC_LIMIT): size extended. + + * regex.c (DOUBLE_STACK): use machine's stack region for regex + stack if its size is small enough. + +Mon Sep 25 18:13:07 2000 Yukihiro Matsumoto + + * regex.c: include . + + * eval.c (rb_add_method): cache mismatch by method + definition. need to clear_cache_by_id every time. + +Mon Sep 25 13:31:45 2000 WATANABE Hirofumi + + * win32/win32.c (NtCmdGlob): substitute '\\' with '/'. + +Mon Sep 25 00:35:01 2000 WATANABE Hirofumi + + * defines.h: #undef HAVE_SETITIMER on cygwin. + +Sun Sep 24 03:01:53 2000 Minero Aoki + + * lib/net/protocol.rb, http.rb: typo. + +Sat Sep 23 07:33:20 2000 Aleksi Niemela + + * regex.c (re_compile_pattern): nicer regexp error messages for + invalid patterns. + +Sat Sep 23 03:06:25 2000 Yukihiro Matsumoto + + * variable.c (rb_autoload_load): should not require already + provided features. + +Fri Sep 22 15:46:21 2000 Minero Aoki + + * lib/net/http.rb: too early parameter expansion in string. + +Fri Sep 22 13:58:51 2000 WATANABE Hirofumi + + * ext/extmk.rb.in: don't use default $: + +Fri Sep 22 13:42:50 2000 Katsuyuki Komatsu + + * regex.c (PUSH_FAILURE_COUNT): avoid casting warning on alpha. + + * regex.c (PUSH_FAILURE_POINT): ditto. + +Fri Sep 22 10:16:21 2000 WATANABE Hirofumi + + * win32/config.h.in: add HAVE_TELLDIR, HAVE_SEEKDIR + +Thu Sep 21 19:04:34 2000 WATANABE Hirofumi + + * ext/extmk.rb, lib/mkmf.rb (install_rb): check whether libdir is + directory or not. + +Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto + + * file.c (rb_file_s_symlink): use HAVE_SYMLINK. + + * file.c (rb_file_s_readlink): use HAVE_READLINK. + + * dir.c (dir_tell): use HAVE_TELLDIR. + + * dir.c (dir_seek): use HAVE_SEEKDIR. + + * configure.in (AC_CHECK_FUNCS): lstat, symlink, readlink, + telldir, seekdir checks added. + + * file.c (lstat): should use stat(2) if lstat(2) is not + available. + +Thu Sep 21 15:59:23 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.29. + + * lib/net/http.rb: HTTPReadAdapter -> HTTPResponseReceiver + + * lib/net/http.rb (connecting): response is got in receive() + +Thu Sep 21 15:49:07 2000 Wayne Scott + + * lib/find.rb (find): should not follow symbolic links; + tuned performance too. + +Wed Sep 20 23:21:38 2000 Yukihiro Matsumoto + + * ruby.c (load_file): two Ctrl-D was required to stop ruby at the + beginning of stdin script read. + +Wed Sep 20 14:01:45 2000 Yukihiro Matsumoto + + * eval.c (rb_provided): detect infinite load loop. + + * eval.c (rb_provided): too weak filename comparison. + + * eval.c (rb_thread_alloc): avoid recycling still referenced + dvar structures. + + * eval.c (rb_callcc): ditto. + + * eval.c (THREAD_ALLOC): fill dyna_vars field by ruby_dyna_vars. + +Tue Sep 19 17:47:03 2000 Yukihiro Matsumoto + + * stable version 1.6.0 released. + +Tue Sep 19 16:24:52 2000 Yukihiro Matsumoto + + * marshal.c (Init_marshal): provide marshal.so no more. + +Tue Sep 19 14:01:01 2000 WATANABE Hirofumi + + * configure.in, win32/setup.mak: include version number + in RUBY_SO_NAME. + +Tue Sep 19 13:07:47 2000 Yukihiro Matsumoto + + * parse.y (yylex): was confusing $~ and $_. + +Tue Sep 19 13:06:53 2000 GOTOU Yuuzou + + * signal.c (rb_f_kill): signum may be a negative number, should be + treated by signed number. + +Tue Sep 19 01:14:56 2000 Yukihiro Matsumoto + + * eval.c (rb_provide): better feature handling. + + * eval.c (rb_f_require): loading ruby library may be partial + state. checks in rb_thread_loading is integrated. + + * eval.c (rb_provided): better thread awareness. + + * lib/irb/frame.rb: 6 (not 5) parameters for trace_func proc. + + * eval.c (error_print): should print error position even if + get_backtrace() failed. + +Sat Sep 16 03:29:59 2000 Yukihiro Matsumoto + + * eval.c (rb_f_require): rb_provided() was called too early; does + not work well with threads. + + * parse.y (ensure): should distinguish empty ensure and non + existing ensure. + + * file.c (Init_File): extending File by class of FileTest was + serious mistake. + +Thu Sep 14 02:46:54 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_yield): array strip should be done in this + function. + +Wed Sep 13 17:01:03 2000 Yukihiro Matsumoto + + * bignum.c (rb_big_eq): incomplete value comparison of bignums. + +Wed Sep 13 06:39:54 2000 Yukihiro Matsumoto + + * variable.c (rb_mod_class_variables): Module#class_variables added. + +Wed Sep 13 06:09:26 2000 Wakou Aoyama + + * lib/cgi.rb: bug fix: CGI::header(): output status header. + +Wed Sep 13 01:09:12 2000 Yukihiro Matsumoto + + * parse.y (yylex): allow global variables like '$__a'. + +Tue Sep 12 22:28:43 2000 WATANABE Hirofumi + + * ext/socket/extconf.rb: avoid using terrible + on cygwin 1.1.5. + +Tue Sep 12 16:01:58 2000 WATANABE Hirofumi + + * array.c (rb_ary_unshift_m): typo. + +Tue Sep 12 15:37:55 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): stripped array too much, should remove just + for proc_call(). + +Tue Sep 12 07:05:24 2000 Wakou Aoyama + + * lib/cgi.rb: version 2.0.0: require ruby1.5.4 or later. + + * lib/net/telnet.rb: version 1.6.0 + +Tue Sep 12 03:26:07 2000 Yukihiro Matsumoto + + * eval.c (massign): use to_ary to get an array if available. + + * object.c (rb_Array): ditto. + +Mon Sep 11 14:24:47 2000 Yukihiro Matsumoto + + * hash.c (ruby_setenv): should not free the element of + origenvironment. + + * parse.y (command_call): kYIELD moved to this rule to allow + 'a = yield b'. (ruby-bugs-ja:#PR15) + +Mon Sep 11 01:27:54 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): proc#call([]) should pass single value to + the block. + + * eval.c (callargs): reduce array allocation. + + * eval.c (massign): precise check for argument number. + +Fri Sep 8 10:05:17 2000 Yukihiro Matsumoto + + * gc.c (STR_NO_ORIG): should be FL_USER2. + +Thu Sep 7 14:17:51 2000 Yukihiro Matsumoto + + * string.c (rb_str_cat): should work even for concatenating same + string. + +Wed Sep 6 17:06:38 2000 Yukihiro Matsumoto + + * variable.c (rb_cvar_declare): should check superclass's class + variable first. + +Wed Sep 6 10:42:02 2000 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-calculate-indent): shift continuing line + if previous line ends with modifier keyword. + + * misc/ruby-mode.el (ruby-parse-region): should not give up if + modifiers are at the end of line. + + * misc/ruby-mode.el (ruby-expr-beg): indented wrongly if modified + statement was size 1. + +Wed Sep 6 10:41:19 2000 Kenichi Komiya + + * misc/ruby-mode.el (ruby-parse-region): modifier was not handled + well on emacs19. + +Tue Sep 5 17:10:12 2000 Yukihiro Matsumoto + + * time.c (time_to_s): fixed zone string UTC for utc time object. + +Tue Sep 5 00:26:06 2000 Yukihiro Matsumoto + + * regex.c (re_search): range worked wrongly on bm_search(). + +Mon Sep 4 13:40:40 2000 WATANABE Hirofumi + + * configure.in: renamed libruby.a to libruby.{cygwin,mingw32}.a + on cygwin and mingw32. + +Sun Sep 3 23:44:04 2000 Noriaki Harada + + * io.c (NO_SAFE_RENAME): for BeOS too. + +Sun Sep 3 11:31:53 2000 Takaaki Tateishi + + * parse.y (rescue): no assignment was done if rescue body was + empty. + +Sat Sep 2 10:52:21 2000 Yukihiro Matsumoto + + * parse.y (call_args,aref_args): block_call can be the last + argument. + + * parse.y (COND_PUSH,COND_POP): maintain condition stack to allow + kDO2 in parentheses in while/until/for conditions. + + * parse.y (yylex): generate kDO2 for EXPR_ARG outside of + while/until/for condition. + +Fri Sep 1 10:36:29 2000 Yukihiro Matsumoto + + * parse.y (aref_args,opt_call_args): add block_call to allow a + method without parentheses and with block as a last argument. + + * hash.c (rb_hash_sort): should not return nil. + + * re.c (match_aref): should use rb_reg_nth_match(). + + * eval.c (POP_SCOPE): recycled scopes too much + + * eval.c (Init_eval): extend room for stack allowance. + + * eval.c (POP_SCOPE): frees scope too much. + +Thu Aug 31 14:28:39 2000 Yukihiro Matsumoto + + * gc.c (rb_gc_mark): T_SCOPE condition must be more precise. + + * eval.c (scope_dup): should not make all duped scope orphan. + +Thu Aug 31 10:11:47 2000 Yukihiro Matsumoto + + * parse.y (stmt): allow stmt_rhs to be right hand side of multiple + assignment. + + * time.c (rb_time_timeval): type error should not mention the word + 'interval'. + +Wed Aug 30 23:21:20 2000 Yukihiro Matsumoto + + * numeric.c (rb_num2long): use rb_Integer() instead of independent + convert routine. + + * eval.c (rb_rescue2): now takes arbitrary number of exception types. + + * object.c (rb_convert_type): use rb_rescue2 now to handle NameError. + + * object.c (rb_convert_type): better error message. + +Wed Aug 30 17:09:14 2000 WATANABE Hirofumi + + * ext/Win32API/Win32API.c (Win32API_initialize): AlphaNT support. + +Wed Aug 30 14:19:07 2000 Yukihiro Matsumoto + + * parse.y (node_assign): should support NODE_CVASGN2 too. + +Wed Aug 30 11:31:47 2000 Nobuyoshi Nakada + + * ext/Win32API/Win32API.c (Win32API_initialize): add the + arguments checking. + + * ext/Win32API/Win32API.c (Win32API_initialize): add taint + checking. allow String object in the third argument. + +Wed Aug 30 10:29:40 2000 Masahiro Tomita + + * io.c (rb_f_p): flush output buffer. + +Tue Aug 29 16:29:15 2000 Yukihiro Matsumoto + + * parse.y (assignable): remove NODE_CVASGN3. + + * parse.y (gettable): remove NODE_CVAR3. + +Tue Aug 29 02:02:14 2000 Yukihiro Matsumoto + + * lib/mkmf.rb (create_makefile): handles create_makefile("a/b"). + + * ext/extmk.rb.in (create_makefile): ditto + +Mon Aug 28 18:43:54 2000 Yukihiro Matsumoto + + * eval.c (is_defined): now handles class variables. + + * eval.c (rb_eval): class variable behavior revisited. + + * parse.y (assignable): ditto. + + * parse.y (gettable): ditto. + + * regex.c (PUSH_FAILURE_COUNT): push/pop interval count on failure + stack. this fix is inspired by the Emacs21 patch from Stefan + Monnier . + +Fri Aug 25 15:24:39 2000 Yukihiro Matsumoto + + * variable.c (rb_cvar_get): should not follow __attached__. + + * variable.c (rb_cvar_set): ditto. + + * variable.c (rb_cvar_declare): ditto. + + * variable.c (mod_av_set): second class variable assignment at the + toplevel should not give warning. + +Fri Aug 25 01:18:36 2000 Yukihiro Matsumoto + + * io.c (next_argv): prepare path for open file. + + * string.c (rb_str_setter): moved from io.c. + + * io.c (next_argv): filename should be "-" for refreshed ARGF. + +Thu Aug 24 15:27:39 2000 WATANABE Hirofumi + + * ext/socket/socketport.h: use `extern int h_errno' if needed. + +Sat Aug 19 01:34:02 2000 WATANABE Hirofumi + + * ext/sdbm/_sdbm.c (sdbm_prep): flags should be or-ed by O_BINARY on + Win32 too. + + * ext/sdbm/_sdbm.c (makroom): fill hole with 0 on Win32 too. + +Fri Aug 18 13:23:59 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): should preserve and clear $! value before + compilation. + + * eval.c (eval): ditto. + +Fri Aug 18 11:06:19 2000 Shugo Maeda + + * ext/socket/socket.c (s_accept): start GC on EMFILE/ENFILE. + +Thu Aug 17 16:04:48 2000 Yukihiro Matsumoto + + * eval.c (is_defined): should clear ruby_errinfo. + +Thu Aug 17 04:26:31 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.27. + + * lib/net/protocol.rb: writing methods returns written byte size. + + * lib/net/smtp.rb: send_mail accepts many destinations. + +Wed Aug 16 00:43:47 2000 Yukihiro Matsumoto + + * time.c (time_s_times): use CLK_TCK for HZ if it's defined. + +Tue Aug 15 17:30:59 2000 Yukihiro Matsumoto + + * eval.c (frame_dup): should set flag FRAME_MALLOC after + argv allocation. + + * eval.c (blk_free): should not free argv if GC was called before + frame_dup. + +Tue Aug 15 16:08:40 2000 WATANABE Hirofumi + + * configure.in: add ac_cv_func_times=yes for mingw32. + + * win32/win32.c (mytimes): typo. + +Tue Aug 15 01:45:28 2000 Yukihiro Matsumoto + + * io.c (argf_eof): should return true at the end of ARGF without + checking stdout if arguments are given. + +Mon Aug 14 10:34:32 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_status): status should return false for normal + termination, nil for termination by exception. + +Fri Aug 11 15:43:46 2000 Yukihiro Matsumoto + + * eval.c (rb_undef): give warning for undefining __id__, __send__. + +Thu Aug 10 08:05:03 2000 Yukihiro Matsumoto + + * eval.c (rb_callcc): returned current thread instead of + continuation wrongly. + +Thu Aug 10 05:40:28 2000 WATANABE Hirofumi + + * ext/extmk.rb.in: $CPPFLAGS should be initialized. + + * ext/tcltklib/depend: add stubs.o. + + * ext/tcltklib/extconf.rb: use $CPPFLAGS instead of $CFLAGS. + +Wed Aug 9 16:31:48 2000 Yukihiro Matsumoto + + * eval.c (rb_callcc): thread status for continuations must be + THREAD_KILLED, otherwise thread_free() breaks other threads. + +Wed Aug 9 13:24:25 2000 WATANABE Hirofumi + + * win32/win32.[ch]: emulate rename(2). + +Tue Aug 8 14:01:46 2000 WATANABE Hirofumi + + * ext/tcltklib/tcltklib.c: support --enable-tcltk_stubs + + * ext/tcltklib/extconf.rb: ditto. + + * ext/tcltklib/stubs.c: created. examine candidate shared libraries. + +Mon Aug 7 13:59:12 2000 Yukihiro Matsumoto + + * ruby.h (CLONESETUP): should copy flags before any potential + object allocation. + + * regex.c (re_match): check for stack depth was needed. + +Sat Aug 5 16:43:43 2000 WATANABE Hirofumi + + * djgpp/*: convert DOS line endings to UNIX style. + + * djgpp/config.status: rename to config.sed for SFN. + + * lib/ftools.rb (compare, safe_unlink, chmod): avoid warnings. + + * lib/ftools.rb (move): typo. not `tpath', but `to'. + +Fri Aug 4 23:26:48 2000 Yukihiro Matsumoto + + * eval.c (proc_call): gives warning if a block is supplied. + + * eval.c (rb_eval): no warning for discarding if an alias for the + method is already made. + +Fri Aug 4 16:32:29 2000 Yukihiro Matsumoto + + * array.c (rb_ary_reject_bang): returns nil if no element removed. + + * hash.c (rb_hash_reject_bang): returns nil if no element removed. + +Thu Aug 3 19:44:26 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_fd_writable): should return integer value. + + * array.c (rb_ary_assoc): search array element whose length is + longer than 0 (not 1). + +Wed Aug 2 18:27:47 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_wait_fd): prohibit thread context switch + during compilation. + + * eval.c (rb_cont_call): prohibit Continuation#call across threads. + +Wed Aug 2 08:22:04 2000 Yukihiro Matsumoto + + * gc.c (rb_gc): clear malloc_memories to zero, to avoid potential + super frequent GC invocation. (ruby-bugs:#PR48) + + * gc.c (rb_gc): only add_heap() if GC trigger condition is + satisfied. + +Tue Aug 1 16:41:58 2000 Yukihiro Matsumoto + + * ruby.c (proc_options): global load path setting moved from + ruby_prog_init(). + + * ruby.c (incpush): renamed. push path entry at the END of the + load path array. This makes -I directories sorted in order in + the arguments. + +Sat Jul 29 23:42:04 2000 Yukihiro Matsumoto + + * dir.c (dir_each): should check whether dir is closed during the + block execution. (ruby-bugs:#PR47) + +Sat Jul 29 21:57:30 2000 WATANABE Hirofumi + + * ruby.c (rubylib_mangle): provide another buffer for the result. + +Wed Jul 26 10:09:01 2000 WATANABE Hirofumi + + * configure.in: set SOLIBS to LIBS on Cygwin. + + * configure.in: LIBRUBY_SO='$(RUBY_INSTALL_NAME)'.$target_os.dll + on cygwin and mingw32. ruby-cygwin.dll is bad. why? + +Wed Jul 26 10:04:03 2000 Yukihiro Matsumoto + + * gc.c (gc_sweep): avoid full scan during compilation. + + * gc.c (rb_gc): add heap during no gc period (including + compilation). + +Tue Jul 25 19:03:04 2000 WATANABE Hirofumi + + * cygwin/GNUmakefile: use puts instead of print, because + Cygwin DLL's behavior is changed(or bug?). + + * configure.in: LIBRUBY_SO='$(RUBY_INSTALL_NAME)'-$target_os.dll + on cygwin and mingw32. + + * cygwin/GNUmakefile: ditto. + + * Makefile.in: $(SOLIBS) should be put after dmyext.@OBJEXT@. + + * instruby.rb: install $(LIBRUBY) to libdir + if $(LIBRUBY) != $(LIBRUBY_A_). + +Tue Jul 25 15:16:00 2000 Yukihiro Matsumoto + + * io.c (rb_p): redirect to $defout. + +Mon Jul 24 18:52:55 2000 WATANABE Hirofumi + + * win32/win32.c (win32_getenv): should remove `static'. + + * ruby.c (rubylib_mangle): support "/hoge;/foo" + +Mon Jul 24 10:28:55 2000 GOTO Kentaro + + * string.c (rb_str_count): raise exception if no argument is + given. + +Sun Jul 23 12:55:04 2000 Dave Thomas + + * string.c (rb_str_rindex): Support negative end position. + +Fri Jul 21 17:35:01 2000 Yukihiro Matsumoto + + * parse.y (aref_args): command_call now be permitted as + aref_args. + + * process.c (proc_getpriority): getpriority(2) may return valid + negative number. use errno to detect error. + + * marshal.c (dump_ensure): dumped string should be tainted if + any among target objects is tainted. + + * marshal.c (r_regist): restored object should be tainted if and + only if the source is a file or a tainted string. + +Wed Jul 19 15:14:04 2000 Yukihiro Matsumoto + + * bignum.c (bigdivrem): should use rb_int2big(), not rb_uint2big(). + +Tue Jul 18 14:58:30 2000 Yukihiro Matsumoto + + * eval.c (ruby_options): should treat SystemExit etc. properly. + + * parse.y (yycompile): should check compile_for_eval, not + ruby_in_eval. + +Mon Jul 17 04:29:50 2000 Minero Aoki + + * lib/mkmf.rb: converts extension of $objs into $OBJEXT. + +Sun Jul 16 03:02:34 2000 Dave Thomas + + * lib/weakref.rb: Change to use new ObjectSpace calls. + +Sat Jul 15 21:59:58 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): should not redefine __id__ nor __send__. + + * gc.c (define_final): integrate final.rb features into the + interpreter. define_finalizer and undefine_finalizer was + added to ObjectSpace. plus, add_finalizer, remove_finalizer, + and call_finalizer are deprecated now. + +Sat Jul 15 01:32:34 2000 Yukihiro Matsumoto + + * eval.c (rb_mod_method): implements unbound method. + + * eval.c (Init_eval): should prohibit `module_function' for class + Class. + +Fri Jul 14 17:19:59 2000 WATANABE Hirofumi + + * cygwin/GNUmakefile.in: use miniruby instead of sed. + +Fri Jul 14 12:49:50 2000 Yukihiro Matsumoto + + * io.c (argf_eof): need to check stdin, when next_p == -1. + + * io.c (read_all): use io_fread() instead of fread(3). + + * io.c (io_reopen): should clearerr FILE if fd < 3. + + * re.c (rb_reg_match_m): the result is exported, so it should be + declared as busy. + + * eval.c (rb_eval): should preserve errinfo even if return, break, + etc. is called in rescue clause. + + * instruby.rb: install irb too. + +Wed Jul 12 15:32:57 2000 Yukihiro Matsumoto + + * variable.c (rb_const_get): constants for builtin classes must + have higher priority than constants from included modules at + Object class. + + * bignum.c (bigdivrem): small embarrassing typo. + +Wed Jul 12 15:06:28 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): use rb_const_get_at(). + + * variable.c (top_const_get): retrieve toplevel constants only, + not ones of Object (and its included modules) in general. + +Wed Jul 12 15:04:11 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.26. + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: + add module Net::NetPrivate and its inner classes + {Read,Write}Adapter, Command, Socket, + SMTPCommand, POP3Command, APOPCommand, HTTPCommand + +Wed Jul 12 13:10:30 2000 Yukihiro Matsumoto + + * bignum.c (bigdivrem): defer bignorm(). + + * bignum.c (bignorm): accepts accidental fixnums. + +Tue Jul 11 16:54:17 2000 Yukihiro Matsumoto + + * parse.y (yylex): `@' is no longer a valid instance + variable name. + +Tue Jul 11 01:51:50 2000 Yukihiro Matsumoto + + * bignum.c (rb_big_divmod): should not use Integer(float) for + the right operand. + + * bignum.c (rb_big_remainder): ditto. + + * bignum.c (rb_big_modulo): ditto. + +Mon Jul 10 15:27:16 2000 WATANABE Hirofumi + + * io.c (pipe_finalize): should set rb_last_status when pclose(). + +Mon Jul 10 09:07:54 2000 Yukihiro Matsumoto + + * error.c (rb_bug): print version number and such too. + +Sat Jul 8 23:08:40 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_start_0): should copy previous scopes to + prevent rb_gc_force_recycle(). + +Fri Jul 7 23:36:36 2000 Katsuyuki Komatsu + + * ext/socket/addrinfo.h: move IN_EXPERIMENTAL and IN_LOOPBACKNET + definitions to ext/socket/sockport.h. + + * ext/socket/extconf.rb: add getservbyport() and arpa/inet.h check. + + * ext/socket/getaddrinfo.c (getaddrinfo): SOCK_RAW may not be + defined (ex. BeOS, Palm OS 2.x or before). + + * ext/socket/getnameinfo.c (getnameinfo): getservbyport() may not + exist (ex. BeOS, Palm OS). + + * ext/socket/sockport.h: add IN_EXPERIMENTAL, IN_CLASSA_NSHIFT, + IN_LOOPBACKNET, AF_UNSPEC, PF_UNSPEC and PF_INET. + +Fri Jul 7 03:30:00 2000 Yukihiro Matsumoto + + * parse.y (aref_args): should allow Hash[:a=>2] etc. + + * numeric.c (fix_aref): convert index by NUM2INT, not FIX2INT. + (ruby-bugs:#PR37) + + * time.c (time_localtime): should prohibit for frozen time. + + * time.c (time_gmtime): ditto. + +Thu Jul 6 19:12:12 2000 Yukihiro Matsumoto + + * io.c (rb_file_s_open): should not terminate fptr; just clear it. + + * ruby.c (proc_options): should not call require_libraries() + twice. + + * ruby.c (require_libraries): clear req_list_head.next after + execution. + +Thu Jul 6 13:51:57 2000 Nobuyoshi Nakada + + * object.c (rb_to_id): name may not be symbol nor fixnum. + + * struct.c (rb_struct_s_def): name may be nil. + +Thu Jul 6 02:09:06 2000 Yukihiro Matsumoto + + * bignum.c (bigdivrem): new function to return remainder. + + * numeric.c (fixdivmod): now returns modulo, not remainder. + + * numeric.c (flodivmod): ditto. + + * bignum.c (bigdivmod): ditto. + + * numeric.c (num_modulo): new method; alias to '%'. + +Thu Jul 6 00:51:43 2000 WATANABE Hirofumi + + * win32/win32.c (NtCmdGlob): patterns should be separated and + NUL terminated. + +Wed Jul 5 22:27:56 2000 WATANABE Hirofumi + + * cygwin/GNUmakefile: use ruby.def to make rubycw.dll. + + * ext/extmk.rb.in: create target.def. + + * lib/mkmf.rb: ditto. + +Wed Jul 5 09:47:14 2000 Yukihiro Matsumoto + + * time.c (time_arg): Time::local, Time::gm now take 7th optional + argument for usec. + + * numeric.c (num_ceil, etc): default ceil, floor, round, truncate + implementation for Numeric, using `to_f'. + + * io.c (rb_io_reopen): clear fptr->path after free() to prevent + potential GC crash. + + * io.c (rb_file_s_open): terminate fptr unless null. + + * io.c (rb_file_initialize): ditto. + + * lib/tempfile.rb: specify FILE::CREAT|File::EXCL to open for + better security. + + * numeric.c (flo_truncate): new method. + +Wed Jul 5 01:02:53 2000 WATANABE Hirofumi + + * ext/extmk.rb.in: join ' ' -> join(' '). + + * lib/mkmf.rb: ditto. + +Tue Jul 4 13:51:29 2000 Yukihiro Matsumoto + + * ext/dbm/dbm.c: add methods added to Hash in 1.5.x. + + * ext/gdbm/gdbm.c: ditto. + + * ext/sdbm/init.c: ditto. + + * eval.c (proc_call): args may be Qundef (means no argument), do + not call TYPE() for args. + +Tue Jul 4 13:20:56 2000 WATANABE Hirofumi + + * ext/extmk.rb.in: make command line must be single-quoted. + $(RUBY_INSTALL_NAME) is command substitution in the POSIX sh. + +Tue Jul 4 13:16:02 2000 Yukihiro Matsumoto + + * util.c (rb_type): should add T_UNDEF. + +Tue Jul 4 09:30:35 2000 Yukihiro Matsumoto + + * parse.y (here_document): supports EOF right after terminator. + + * random.c (rb_f_rand): argument is now optional (rand(max=0)). + +Tue Jul 4 01:50:49 2000 WATANABE Hirofumi + + * win32/ruby.def: remove ruby_mktemp. + +Tue Jul 4 01:27:13 2000 Yukihiro Matsumoto + + * eval.c (rb_rescue2): new function to rescue arbitrary exception. + + * numeric.c (do_coerce): should catch NameError explicitly. + +Tue Jul 4 00:15:23 2000 Dave Thomas + + * numeric.c (Init_Numeric): forgot to register Numeric#remainder. + +Mon Jul 3 23:46:56 2000 Katsuyuki Komatsu + + * win32/win32.c (myselect, myaccept): disable interrupt while + executing accept() or select() to avoid Ctrl-C causes + "unknown software exception (0xc0000029)". + +Mon Jul 3 18:35:41 2000 WATANABE Hirofumi + + * lib/mkmf.rb: use null device if it exists for cross-compiling. + +Mon Jul 3 18:19:51 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.26. + + * lib/net/protocol.rb (finish): do nothing unless active. + + * lib/net/http.rb: HTTP#{get,post}2 again (for new impl). + +Mon Jul 3 16:47:22 2000 WATANABE Hirofumi + + * cygwin/GNUmakefile: librubys.a -> lib$(RUBY_INSTALL_NAME)s.a + + * configure.in: use AC_CANONICAL_{HOST,TARGET,BUILD}. + +Mon Jul 3 13:15:02 2000 Yukihiro Matsumoto + + * numeric.c (fix_divmod): x * d + m = y where d, m = x.divmod(y). + + * bignum.c (rb_big_divmod): ditto. + + * numeric.c (fixdivmod): does not depend C's undefined % + behavior. adopt to fmod(3m) behavior. + + * numeric.c (flo_mod): modulo now reserves fmod(3m) behavior. + + * numeric.c (num_remainder): 'deprecated' warning. + +Mon Jul 3 10:27:28 2000 WATANABE Hirofumi + + * configure.in: use AC_CANONICAL_SYSTEM. + +Sun Jul 2 21:17:37 2000 WATANABE Hirofumi + + * configure.in: support without --enable-shared for cygwin/mingw32. + + * cygwin/GNUmakefile: ditto. + + * ext/extmk.rb.in: use null device if it exists for cross-compiling. + + * lib/mkmf.rb: ditto. + + * util.c (ruby_mktemp): remove unused ruby_mktemp(). + +Sun Jul 2 14:18:04 2000 Koji Arai + + * eval.c (TMP_PROTECT_END): tmp__protect_tmp may be NULL. + +Sun Jul 2 03:37:50 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.25. + + * lib/net/protocol.rb (each_crlf_line): beg = 0 is needed in adding{} + + * lib/net/smtp.rb: allow String for to_addr of SMTP#sendmail + +Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto + + * numeric.c (fix_rshift): should handle shift value more than + sizeof(long). + +Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): the value from RTEST() is not valid Ruby + object. result should be either true or false. + +Sat Jul 1 09:30:06 2000 Katsuyuki Komatsu + + * re.c (rb_reg_initialize): was freeing invalid pointer. + +Sat Jul 1 03:25:56 2000 Yukihiro Matsumoto + + * parse.y (call_args): command_call can be the last argument of + call_args. It had to be the only argument. + + * re.c (rb_reg_s_quote): should not dump core even for unsane mbc + string. + +Fri Jun 30 01:36:20 2000 Aleksi Niemela + + * parse.y (f_norm_arg): better, nicer error message. + +Thu Jun 29 07:45:33 2000 Yukihiro Matsumoto + + * ext/socket/socket.c (udp_send): destination may be packed + struct sockaddr. + + * object.c (rb_Integer): Integer(nil) should be invalid, on the + other hand, nil.to_i is OK. + +Wed Jun 28 17:26:06 2000 Yukihiro Matsumoto + + * ext/socket/socket.c (ip_recvfrom): udp_recvfrom and tcp_recvfrom + is merged and moved to IPSocket#recvfrom. + + * ext/socket/socket.c (sock_s_getaddrinfo): family can be a + strings such as "AF_INET" etc. + + * ruby.c (require_libraries): . and RUBYLIB added to $load_path + just before -r procedure. + + * ruby.c (proc_options): -e, - did not exec -r. + +Wed Jun 28 14:52:28 2000 Koga Youichirou + + * config.sub: NetBSD/hpcmips support. + +Wed Jun 28 10:11:06 2000 Yukihiro Matsumoto + + * gc.c: gc trigger threshold changed; GC_NEWOBJ_LIMIT removed, + FREE_MIN is increased to 4096. + +Tue Jun 27 22:39:28 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.24. + + * lib/net/protocol.rb: modified each_crlf_line again. + + * lib/net/protocol.rb: do_write_beg,do_write_end -> writing{} + do_write_do -> do_write + + * lib/net/http.rb: can make proxy connection by passing + addresses to HTTP.new, start. + + * lib/net/http.rb: HTTP.new_implementation, old_implementation: + can use 1.2 implementation of head, get, post, put. + (see document) + +Tue Jun 27 12:05:10 2000 Katsuyuki Komatsu + + * win32.c (myfdclr): new function. + + * win32.h: add FD_CLR. + +Mon Jun 26 23:41:41 2000 WATANABE Hirofumi + + * ruby.h: add cast for ANSI style. + + * gc.c (rb_data_object_alloc): use RUBY_DATA_FUNC. + +Mon Jun 26 22:20:03 2000 Katsuyuki Komatsu + + * win32/win32.c (is_socket, extract_file_fd): New function. + + * win32/win32.c (myfdopen): use is_socket(). + + * win32/win32.c (myselect): return non socket files immediately + if file and socket handles are mixed. + +Mon Jun 26 16:21:30 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): wait_for cleared too early. + +Mon Jun 26 09:15:31 2000 Yukihiro Matsumoto + + * pack.c: remove obsolete 'F', 'D' specifiers. + +Sun Jun 25 00:55:03 2000 Katsuyuki Komatsu + + * ext/socket/socket.c (sock_s_getnameinfo): `res' would not + be assigned if TYPE(sa) == T_STRING. + +Sat Jun 24 14:36:29 2000 WATANABE Hirofumi + + * config*.dj, configure.bat, top.sed: move to djgpp/. + +Sat Jun 24 02:34:17 2000 Yukihiro Matsumoto + + * ruby.c (load_file): call require_libraries() here to let + debug.rb work properly. + +Fri Jun 23 22:34:51 2000 Katsuyuki Komatsu + + * bignum.c (rb_big_lshift): reorder xds assignment to avoid + reusing `x' as `len' by VC++ 6.0 SP3 compiler with -Ox switch. + +Fri Jun 23 01:11:27 2000 Yukihiro Matsumoto + + * string.c (rb_str_substr): should return empty string (""), + if beg == str.size and len == zero, mostly for convenience and + backward compatibility. + + * parse.y (new_super): should tweak block_pass node for super too. + + * string.c (rb_str_split_m): last split element should not be nil, + but "" when limit is specified. + +Thu Jun 22 17:27:46 2000 Yukihiro Matsumoto + + * string.c (rb_str_substr): str[n,m] now returns nil when n equals + to str.size. + +Thu Jun 22 13:49:02 2000 Uechi Yasumasa + + * lib/net/ftp.rb: support resuming. + +Thu Jun 22 13:37:19 2000 WATANABE Hirofumi + + * eval.c (rb_thread_sleep_forever): merge pause() macro. + +Wed Jun 21 08:49:04 2000 Yukihiro Matsumoto + + * eval.c (rb_eval): should not raise exception just by defining + singleton class. + +Wed Jun 21 01:18:03 2000 Yukihiro Matsumoto + + * ruby.h: two macros RUBY_DATA_FUNC and RUBY_METHOD_FUNC are added + to make writing C++ extensions easier. + + * array.c (rb_ary_dup): internal classes should not be shared by dup. + + * hash.c (rb_hash_dup): ditto. + + * object.c (rb_obj_dup): ditto. + + * string.c (rb_str_dup): ditto. + + * error.c (Init_Exception): renamed NotImplementError to + NotImplementedError. + +Tue Jun 20 16:22:38 2000 Yukihiro Matsumoto + + * time.c (make_time_t): bug in DST boundary. + +Tue Jun 20 10:54:19 2000 WATANABE Hirofumi + + * configure.in: add eval sitedir. + +Tue Jun 20 06:14:43 2000 Wakou Aoyama + + * lib/cgi.rb: change: version syntax. old: x.yz, now: x.y.z + + * lib/net/telnet.rb: ditto. + +Tue Jun 20 00:37:45 2000 Yukihiro Matsumoto + + * re.c (rb_reg_kcode_m): Regexp#kcode returns nil for code unfixed + regexp object. + + * bignum.c (bigdivmod): bignum zero check was wrong. + +Mon Jun 19 10:48:28 2000 Yukihiro Matsumoto + + * variable.c (rb_cvar_set): forgot to add security check for class + variable assignment. + +Sun Jun 18 22:49:13 2000 WATANABE Hirofumi + + * configure.in: single quoted sitedir. + + * mkconfig.rb: add DESTDIR for cross-compiling. + + * lib/mkmf.rb: add DESTDIR. + + * ruby.c (load_file): force binmode if fname includes ".exe" + on DOSISH. + +Sat Jun 17 23:22:17 2000 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): should ignore negative precision given + by <%.*>. + + * sprintf.c (rb_f_sprintf): should allow zero precision. + +Sat Jun 17 03:13:29 2000 Yukihiro Matsumoto + + * time.c (time_localtime): avoid unnecessary call of localtime. + + * time.c (time_gmtime): avoid unnecessary call of gmtime. + + * process.c (proc_wait2): new method. + + * process.c (proc_waitpid): second argument made optional. + + * process.c (proc_waitpid2): new method. + +Sat Jun 17 00:05:00 2000 Yukihiro Matsumoto + + * re.c (rb_reg_clone): should initialize member fields. + +Fri Jun 16 22:49:34 2000 Yukihiro Matsumoto + + * io.c (rb_io_rewind): set lineno to zero. + +Fri Jun 16 22:47:47 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.23. + + * lib/net/protocol.rb: too many CRLF in last line. + +Fri Jun 16 21:23:59 2000 WATANABE Hirofumi + + * configure.in: add pause(2) checking. + + * eval.c: define pause() if missing. + +Fri Jun 16 18:41:58 2000 Koji Arai + + * process.c (proc_setsid): BSD-style setpgrp() don't return + process group ID, but 0 or -1. + +Fri Jun 16 16:23:35 2000 Koji Arai + + * file.c (rb_stat_inspect): gives detailed information; + compatibility with ruby-1.4.x. + +Fri Jun 16 05:18:45 2000 Yasuhiro Fukuma + + * configure.in: FreeBSD: do not link dummy libxpg4 which was + merged into libc. + +Fri Jun 16 03:17:36 2000 Satoshi Nojo + + * ext/dbm/dbm.c (fdbm_length): use GetDBM. empty?, [] too. + + * ext/gdbm/gdbm.c (fgdbm_length): ditto. + + * ext/sdbm/init.c (fsdbm_length): ditto. + +Fri Jun 16 01:57:31 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_sleep_forever): pause(2) instead of sleep(3). + +Thu Jun 15 10:46:36 2000 Yukihiro Matsumoto + + * string.c (rb_str_sub_bang): should propagate taintness from + replacement string. + +Wed Jun 14 17:01:41 2000 Katsuyuki Komatsu + + * rubytest.rb: add CONFIG['EXEEXT'] to the executable file name. + +Wed Jun 14 14:50:00 2000 Yukihiro Matsumoto + + * string.c (rb_f_sub): assign to $_ only if modification happens. + + * string.c (rb_f_gsub): ditto. + + * string.c (rb_f_chop): ditto. + + * string.c (rb_f_chomp): ditto. + + * io.c (io_reopen): preserve file position by ftell/fseek, if io + is a seekable. + + * eval.c (method_arity): wrong arity number for the methods with + optional arguments. + + * time.c (make_time_t): opposite timezone shift (should be negative). + +Wed Jun 14 14:07:38 2000 WATANABE Hirofumi + + * io.c: typo(ig/if). + + * re.c: typo(re/reg). add rb_reg_check(). + + * time.c: remove unneeded declare(daylight, timezone). + + * configure.in: add include when daylight checking. + +Wed Jun 14 11:36:52 2000 WATANABE Hirofumi + + * marshal.c (r_object): modified for symbols. + + * marshal.c (w_object): ditto. + +Wed Jun 14 10:04:58 2000 Yukihiro Matsumoto + + * re.c (rb_memcmp): should compare according to ruby_ignorecase. + + * string.c (rb_str_cmp): use rb_memcmp. + + * string.c (rb_str_index): ditto. + + * string.c (rb_str_rindex): ditto. + + * string.c (rb_str_each_line): ditto. + +Wed Jun 14 04:58:53 2000 Dave Thomas + + * io.c (rb_io_set_lineno): should have returned VALUE, not + integer. + +Wed Jun 14 09:29:42 2000 Yukihiro Matsumoto + + * string.c (rb_str_dup): dup should always propagate taintness. + +Wed Jun 14 00:50:14 2000 Wakou Aoyama + + * lib/cgi.rb: read_multipart(): if no content body then raise EOFError. + +Tue Jun 13 11:46:17 2000 Yukihiro Matsumoto + + * process.c (proc_setsid): try implement it using setpgrp() and + ioctl(fd, TIOCNOTTY, NULL). + + * re.c (rb_reg_prepare_re): magic variable $= should affect regex + pattern match. + + * time.c (make_time_t): use tm.tm_gmtoff if possible. + + * time.c (time_zone): use tm.tm_zone if available. + +Tue Jun 13 01:50:57 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.22. + + * lib/net/http.rb: HTTPResponse#body returns body. + +Mon Jun 12 23:41:54 2000 WATANABE Hirofumi + + * configure.in (daylight): avoid GCC optimization. + +Mon Jun 12 19:02:27 2000 WATANABE Hirofumi + + * configure.in: cygwin has strange timezone. + + * time.c (time_zone): use tzname and daylight. + +Sat Jun 10 23:10:32 2000 Yukihiro Matsumoto + + * io.c (rb_io_seek): whence is optional, default is SEEK_SET. + +Fri Jun 9 17:00:29 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.21. + + * lib/net/http.rb: exception is raised with response object. + +Fri Jun 9 15:11:35 2000 Yukihiro Matsumoto + + * time.c (make_time_t): supports daylight saving time. + + * eval.c (rb_thread_safe_level): should retrieve current $SAFE + value if a thread is the current thread. + +Thu Jun 8 14:25:45 2000 Hiroshi Igarashi + + * lib/mkmf.rb: add target `distclean' in Makefile for extlib. + target `clean' doesn't remove Makefile. + +Thu Jun 8 13:34:03 2000 Dave Thomas + + * numeric.c: add nan?, infinite?, and finite? to Float + +Thu Jun 8 00:31:04 2000 WATANABE Hirofumi + + * regex.h: export re_mbctab properly on cygwin. + + * dln.c: use dlopen instead of LoadLibrary on cygwin. + +Thu Jun 8 13:41:34 2000 Tadayoshi Funaba + + * file.c (rb_file_s_basename): might dump core. + +Tue Jun 6 03:29:12 2000 Yukihiro Matsumoto + + * dir.c (dir_foreach): now returns nil for consistency. + + * bignum.c (bigdivmod): modulo by small numbers was wrong. + +Mon Jun 5 00:18:08 2000 WATANABE Hirofumi + + * bignum.c: avoid conflict with USHORT on mingw32. + +Mon Jun 5 00:13:35 2000 WATANABE Hirofumi + + * eval.c (rb_thread_schedule): =/== typo. + +Sun Jun 4 03:17:36 2000 Wakou Aoyama + + * lib/cgi.rb: improve: CGI::pretty() + +Sun Jun 4 02:01:10 2000 WATANABE Hirofumi + + * lib/mkmf.rb: do not need to add -L$(topdir) in --enable-shared case. + +Sat Jun 3 13:50:06 2000 Yukihiro Matsumoto + + * parse.y (rb_id2name): should support constant attrset + identifiers. + + * bignum.c (rb_big_eq): Bignum#== should not raise exception. + +Fri Jun 2 11:24:48 2000 Yukihiro Matsumoto + + * io.c (rb_io_popen): open with a block returns the value from the + block. old behavior was back. + +Fri Jun 2 00:42:31 2000 Yukihiro Matsumoto + + + * eval.c (rb_thread_cleanup): should clear priority for thread + termination. + +Thu Jun 1 22:39:41 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.20. + + * lib/net/http.rb: wrongly closed the socket twice + when no Content-Length: was given. + +Thu Jun 1 00:59:15 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): convert Qundef to []. + +Wed May 31 20:45:59 2000 Dave Thomas + + * string.c (rb_str_slice_bang): wrong argument number. + +Wed May 31 12:37:04 2000 Yukihiro Matsumoto + + * eval.c (rb_exec_end_proc): print error message from END procs. + +Wed May 31 04:06:41 2000 Wakou Aoyama + + * lib/cgi.rb: change: CGI#out() if "HEAD" == REQUEST_METHOD then + output only HTTP header. + +Wed May 31 01:54:21 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): set main_thread->status to + THREAD_TO_KILL, before raising deadlock error. + + * eval.c (rb_thread_deadlock): if curr_thread == main_thread, do + not call rb_thread_restore_context() + +Tue May 30 23:33:41 2000 Katsuyuki Komatsu + + * lib/mkmf.rb (create_makefile): add $(TARGET).ilk and *.pdb + to cleanup files for mswin32. + +Mon May 29 10:41:10 2000 Nobuyoshi Nakada + + * file.c (rb_file_s_basename): should propagate taintness. + +Sun May 28 21:37:13 2000 WATANABE Hirofumi + + * eval.c: bug fix: DLEXT2. + +Sun May 28 19:21:43 2000 WATANABE Hirofumi + + * win32/win32.c: use ruby's glob. + + * dir.c: "glob" exported and renamed to "rb_glob". + + * ruby.h: ditto. + + * main.c: turn off command line mingw32's globbing. + +Wed May 25 22:25:13 2000 WATANABE Hirofumi + + * ext/extmk.rb.in: use "ftools" instead of "rm -f". + + * lib/mkmf.rb: ditto. + +Thu May 25 22:01:32 2000 Katsuyuki Komatsu + + * defines.h: mswin32: remove obsolete USHORT definition. + + * re.h: mswin32: use EXTERN instead of extern. + + * regex.h: mswin32: export re_mbctab properly. + + * win32/ruby.def: add ruby_ignorecase and regex.c's exports. + +Thu May 25 21:28:44 2000 Minero Aoki + + * re.c (rb_reg_expr_str): escape un-printable character. + +Thu May 25 01:35:15 2000 Yukihiro Matsumoto + + * parse.y (tokadd_escape): forgot to add `\x' to hexadecimal + escape sequences. + + * object.c (rb_obj_dup): dup for normal object (T_OBJECT) copies + instance variables only. + +Wed May 24 23:49:47 2000 Yukihiro Matsumoto + + * object.c (rb_mod_initialize): should provide initialize. + +Wed May 24 23:17:50 2000 Katsuyuki Komatsu + + * win32/Makefile: remove unnecessary mv and rm command call. + +Wed May 24 21:01:04 2000 Katsuyuki Komatsu + + * ext/pty/pty.c: use "" instead of <> to include ruby.h and rubyio.h + for BeOS (PowerPC). + + * file.c (rb_find_file): should check dln_find_file() result. + + * win32/ruby.def: add rb_block_given_p. + +Wed May 24 16:32:45 2000 Yukihiro Matsumoto + + * io.c (rb_io_popen): popen does not take 3rd argument anymore. + + * re.c (rb_reg_desc): re may be zero, check before dereferencing. + +Wed May 24 16:03:06 2000 Wakou Aoyama + + * lib/cgi.rb: bug fix: CGI::escape(), CGI::Cookie::new() + + * lib/net/telnet.rb: improve: binmode(), telnetmode() interface + +Wed May 24 13:12:31 2000 Yukihiro Matsumoto + + * misc/ruby-mode.el (ruby-parse-region): support `while .. do' + etc. But corresponding keywords must be at the beginning of + line. + +Tue May 23 23:50:12 2000 Yukihiro Matsumoto + + * re.c (rb_reg_initialize_m): wrong kcode value. + + * re.c (rb_reg_s_new): forgot to initialize re->ptr. + +Tue May 23 08:36:24 2000 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): forgot to restore old option + status by (?ix-ix). + + * regex.c (re_compile_fastmap): anychar may match newline if + RE_OPTION_MULTILINE or RE_OPTION_POSIXLINE is set. + +Mon May 22 22:45:06 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.19. + + * lib/net/http.rb: do not use Regexp "p" option. + +Mon May 22 21:56:43 2000 Nobuyoshi Nakada + + * struct.c (rb_struct_getmember): should use ID2SYM, not INT2NUM. + +Mon May 22 15:07:37 2000 Yukihiro Matsumoto + + * file.c (rb_find_file): should check if the file really exists. + +Mon May 22 09:08:12 2000 Yukihiro Matsumoto + + * io.c (rb_io_popen): _exit(0) after processing block under the + child process. + + * io.c (rb_io_popen): flush stdout/stderr before subprocess + termination. + + * eval.c (rb_check_safe_str): insert rb_secure(4); operation + requires untainted string should be prohibited in level 4. + +Sun May 21 21:17:00 2000 WATANABE Hirofumi + + * configure.in: add Setup.dj for djgpp cross-compiling. + + * Setup.dj: add readline. + + * instruby.rb: copy win32/win32.h to archlibdir on mingw32. + +Sun May 21 20:58:08 2000 Katsuyuki Komatsu + + * pack.c: fix OFF16 and OFF32 definitions for Alpha and IRIX64. + +Sun May 21 17:31:37 2000 WATANABE Hirofumi + + * instruby.rb: support "make install" for cross-compiling. + + * ext/extmk.rb.in: ditto. + +Sun May 21 14:22:49 2000 WATANABE Hirofumi + + * Makefile.in: rename prep.rb to fake.rb. + + * configure.in: ditto. + +Sat May 20 23:29:14 2000 Yukihiro Matsumoto + + * dir.c (dir_s_new): does not take block; "open" does. + + * io.c (rb_io_s_new): ditto. + +Fri May 19 07:44:26 2000 Yukihiro Matsumoto + + * dir.c (dir_s_open): Dir#open does not returns closed Dir if a + block is given to the method. + + * re.c (rb_reg_initialize_m): Regexp::new calls initialize now. + + * string.c (Init_String): String#delete_at removed. + + * string.c (rb_str_aset_m): should have checked argc != 2. + + * eval.c (rb_thread_schedule): select(2) was called too many. + + * regex.c (re_compile_pattern): a bug in (?m) support. Pointed + out by Dave Thomas . + +Thu May 18 23:55:26 2000 Katsuyuki Komatsu + + * dln.c (search_undef): st_lookup()'s 3rd parameter should be + a pointer of the variable which has the same size and alignment + as `char *'. + + * marshal.c (w_symbol, w_object): ditto. + + * parse.y (rb_intern): ditto. + +Thu May 18 18:00:35 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.18. + + * lib/net/protocol.rb: Net::Version was removed. + + * lib/net/smtp.rb: use Socket.gethostname to get local host name. + +Thu May 18 13:34:57 2000 Yukihiro Matsumoto + + * ext/socket/socket.c (ruby_connect): should not have replaced + thread_write_select() by rb_thread_fd_writable(). + +Thu May 18 09:01:25 2000 Katsuyuki Komatsu + + * configure.in, ext/extmk.rb.in, lib/mkmf.rb: remove BeOS R3 support. + Make a shared library (libruby.so) only if the --enable-shared + option is specified. + + * instruby.rb: no longer use libruby.so.LIB and import.h. + + * io.c: fix READ_DATA_PENDING definition for BeOS (PowerPC). + +Wed May 17 14:14:23 2000 Yukihiro Matsumoto + + * re.c (rb_reg_new_1): use /m instead of /p. + +Wed May 17 02:22:03 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_polling): wait 0.06 second to let other + processes run. + + * process.c (rb_waitpid): avoid busy wait using rb_thread_polling. + + * file.c (rb_thread_flock): ditto. + + * parse.y (expr): avoid calling value_expr() twice. + +Wed May 17 00:45:57 2000 WATANABE Hirofumi + + * io.c (rb_io_binmode): should check PLATFORMs, not O_BINARY, sigh... + +Wed May 17 00:40:15 2000 Katsuyuki Komatsu + + * win32/config.h: add DLEXT2, now DLEXT on mswin32 is "so". + + * win32/config.status: ditto. + + * win32/ruby.def: add symbol "rb_big_divmod". + +Tue May 16 19:45:32 2000 Katsuyuki Komatsu + + * intern.h: use EXTERN instead of extern. + + * win32/ruby.def: add rb_defout, rb_stdout, ruby_errinfo, + ruby_sourceline, ruby_sourcefile to work with eruby + reported by Hiroshi Saito . + Export both ruby_xmalloc and xmalloc etc. + +Tue May 16 17:00:05 2000 Masaki Fukushima + + * eval.c (rb_thread_select): should check whether fds are null. + +Tue May 16 11:51:31 2000 Yukihiro Matsumoto + + * io.c (pipe_open): synchronize subprocess stdout/stderr. + +Mon May 15 15:38:09 2000 Yukihiro Matsumoto + + * ruby.h: exported symbols should be for xmalloc etc. are now + prefixed by 'ruby_', e.g. ruby_xmalloc(). + + * eval.c (rb_thread_select): remove busy wait for select. + + * dir.c (glob): trailing path may be null, e.g. glob("**"). + +Mon May 15 14:48:41 2000 Nobuyoshi Nakada + + * io.c (rb_io_pid): new method; returns nil if no process attached + to the IO. + +Mon May 15 01:18:20 2000 Yukihiro Matsumoto + + * io.c (rb_io_s_popen): _exit after Proc execution. + +Sun May 14 18:05:59 2000 WATANABE Hirofumi + + * Makefile.in: missing/nt.c -> win32/win32.c + + * configure.in: bug fix; static linking on mingw32. + + * cygwin/GNUmakefile.in: remove VPATH. + + * ext/extmk.rb.in: Makefile set binmode with mingw32 on cygwin32. + + * lib/mkmf.rb: ditto. + + * win32/config.h: undef HAVE_SYS_FILE_H. + +Sun May 14 02:02:48 2000 WATANABE Hirofumi + + * lib/irb/ruby-lex.rb: '/' should be escaped in character class. + +Sun May 14 00:54:43 2000 WATANABE Hirofumi + + * configure.in, ...: support mingw32. + + * defines.h: ditto. undef EXTERN for tcl/tk on cygwin. + + * ext/*/extconf.rb: replace PLATFORM with RUBY_PLATFORM. + + * ext/socket/sockport.h: define IN_MULTICAST for missing IN_MULTICAST. + + * ext/tcltklib/tcltklib.c: remove declaration of rb_argv0. + + * file.c: should check S_IXGRP, S_ISGID, not NT. + + * io.c (rb_io_binmode): should check _IOBIN, O_BINARY, not PLATFORMs. + +Sat May 13 14:21:15 2000 Koji Arai + + * io.c (rb_io_s_popen): should check whether a block is given. + +Fri May 12 17:33:44 2000 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): charset_not should not exclude + newline from matching set. + +Thu May 11 22:51:05 2000 Ryunosuke Ohshima + + * pack.c (pack_pack): Bignum support. + + * pack.c (pack_unpack): ditto. + +Thu May 11 21:19:29 2000 Hiroshi Igarashi + + * intern.h: add missing declarations of ruby API functions. + + * ruby.h: fix function name in declarations. + +Thu May 11 22:29:25 2000 Katsuyuki Komatsu + + * ext/md5/depend: add $(topdir)/config.h dependency to md5c.o. + + * ext/md5/extconf.rb: new file to add -DHAVE_CONFIG_H flag for Alpha. + +Thu May 11 10:55:52 2000 Ryunosuke Ohshima + + * pack.c (pack_pack): packing BER compressed integer by `w'. + + * pack.c (pack_unpack): unpacking BER. + +Thu May 11 00:37:55 2000 Yukihiro Matsumoto + + * parse.y (parse_regx): remove in_brack. + +Wed May 10 12:51:18 2000 Yukihiro Matsumoto + + * ruby.c (proc_options): move adding RUBYLIB and "." to the load + path after #! line parsing. + + * parse.y (parse_regx): should parse backslash escape like `\c[' + here to avoid causing `unterminated regexp' error. + +Wed May 10 00:19:53 2000 Katsuyuki Komatsu + + * MANIFEST, beos/GNUmakefile.in, configure.in: no longer need + beos/GNUmakefile.in to support BeOS R4.5.2 (Intel) as a result + of eban's Makefile.in change. + + * io.c: NOFILE is already defined on BeOS R4.5 (Intel) or later. + + * lib/matrix.rb: remove debug print. + + * regex.c: don't use nested comment. + +Tue May 9 17:08:43 2000 Yukihiro Matsumoto + + * eval.c (massign): no longer convert nil into empty array. + + * io.c (rb_io_s_popen): optional 3rd argument to give proc, which + will be executed in spawned child process. + +Mon May 8 23:47:39 2000 Katsuyuki Komatsu + + * eval.c (rb_callcc): prev & next should be initialized to zero. + +Mon May 8 23:17:36 2000 Yukihiro Matsumoto + + * dln.c (dln_init): remove possible buffer overrun. This is + suggested by Aleksi Niemela . + + * dln.c (init_funcname): ditto. + +Sat May 6 23:35:47 2000 Yukihiro Matsumoto + + * parse.y (lhs): should allow `obj.Attr = 5' type expression. + +Sat May 6 15:46:08 2000 WATANABE Hirofumi + + * ext/socket/extconf.rb: add a new configure option to force use + of the WIDE Project's getaddrinfo(): --enbale-wide-getaddrinfo. + +Fri May 5 21:19:22 2000 MOROHOSHI Akihiko + + * parse.y (yylex): allow '$1foo' and such. + +Fri May 5 17:57:24 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.17. + + * lib/net/http.rb: write also port number in Host: field. + + * lib/net/http.rb: see Proxy-Connection: to decide socket connection. + +Fri May 5 03:25:15 2000 Yukihiro Matsumoto + + * regex.c (re_compile_fastmap): charset_not for multibyte + characters excluded too many characters. + +Tue May 2 13:23:43 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): little bit more impartial context + switching. + +Tue May 2 09:50:03 2000 Katsuyuki Komatsu + + * configure.in: add DLDLIBS to set platform specific library + for extensions. + + * ext/extmk.rb.in: use @DLDLIBS@ instead of RUBY_PLATFORM choice. + + * lib/mkmf.rb: use CONFIG["DLDLIBS"] instead of RUBY_PLATFORM choice. + + * config_s.dj: add @DLDLIBS@. + + * win32/config.status: ditto. + + * win32/ruby.def: regular maintenance. + +Mon May 1 23:42:44 2000 WATANABE Hirofumi + + * configure.in, eval.c: add DLEXT2. now DLEXT on Cygwin is "so". + + * defines.h: use dllimport, dllexport for Cygwin 1.1.x. + + * ruby.h: ditto. + + * cygwin/GNUmakefile.in: ditto. + + * ext/Win32API/Win32API.c: directly "call" in asm statement for + gcc 2.95.x or newer. + +Sat Apr 29 04:58:12 2000 Nobuyoshi Nakada + + * array.c (rb_ary_unshift_m): performance improvement. + +Fri Apr 28 00:19:22 2000 Nobuyoshi Nakada + + * array.c (rb_ary_unshift_m): takes items to push. + +Wed Apr 26 15:23:02 2000 Yukihiro Matsumoto + + * string.c (rb_str_succ): insert carrying character just before + the leftmost alpha numeric character. + + * string.c (rb_str_succ): proper behavior for "".succ and "\377".succ. + + * string.c (rb_str_succ): use realloc and memmove. + +Tue Apr 25 18:28:45 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.16. + + * lib/net/smtp.rb: add SMTP AUTH + +Tue Apr 25 14:30:13 2000 Yukihiro Matsumoto + + * io.c (rb_io_gets_internal): shortcut when rs == rb_default_rs. + +Sat Apr 22 23:14:41 2000 SHIROYAMA Takayuki + + * configure.in: MacOS X support. + +Sat Apr 22 16:37:10 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.15. + + * lib/net/http.rb: closing socket by watching both + user header and server response + +Fri Apr 21 21:44:34 2000 WATANABE Hirofumi + + * io.c (rb_io_s_pipe): should set FMODE_SYNC. + +Thu Apr 20 16:59:22 2000 Nobuyoshi Nakada + + * eval.c (massign): `*lvalue = false' should assign `[false]' to + lvalue. + +Wed Apr 19 08:35:08 2000 Yukihiro Matsumoto + + * class.c (rb_singleton_class): generate singleton class for + special constants: nil, true, false. + +Wed Apr 19 02:09:30 2000 Yukihiro Matsumoto + + * class.c (rb_singleton_class): singleton method for nil, true, + false is possible now. + + * eval.c (rb_eval): ditto. + +Tue Apr 18 18:54:25 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.14. + + * lib/net/http.rb: new method HTTP#head2. + + * lib/net/http.rb: get2/post2 does not raise exceptions. + +Mon Apr 17 15:16:31 2000 Yukihiro Matsumoto + + * io.c (rb_io_close): to detect some exceptional status, writable + IO should be flushed before close; + +Sat Apr 15 18:29:00 2000 Yukihiro Matsumoto + + * array.c (rb_ary_collect_bang): Array#filter renamed. + +Fri Apr 14 19:47:11 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.13. + + * lib/net/pop.rb: accept illegal timestamp + + * lib/net/http.rb: when body was chunked, does not set Content-Length: + +Tue Apr 11 21:14:42 2000 Katsuyuki Komatsu + + * config_s.dj: add @sitedir@. + * configure.in: add --with-sitedir=DIR option. + * instruby.rb: use CONFIG["sitedir"]. + * lib/mkmf.rb: support 'make site-install'. + * win32/config.status: add @sitedir@. + +Tue Apr 11 16:25:15 2000 Yukihiro Matsumoto + + * bignum.c (rb_big_2comp): unnecessary lvalue cast removed. + +Tue Apr 11 02:25:53 2000 Yukihiro Matsumoto + + * hash.c (env_fetch): new method. + + * marshal.c (marshal_dump): accepts depth = nil for unlimited depth. + +Sun Apr 9 20:49:19 2000 Dave Thomas + + * parse.y (str_extend): Allow class variables to be expanded. + +Fri Apr 7 02:03:54 2000 Yukihiro Matsumoto + + * error.c (rb_sys_fail): escape non-printable characters. + +Thu Apr 6 20:10:47 2000 Katsuyuki Komatsu + + * ext/extmk.rb.in (create_makefile): BeOS --program-suffix support. + * lib/mkmf.rb (create_makefile): ditto. + +Thu Apr 6 09:55:26 2000 Katsuyuki Komatsu + + * error.c (rb_sys_fail): need rb_exc_new2() call on BeOS. + +Mon Apr 3 17:22:27 2000 Yukihiro Matsumoto + + * io.c (rb_io_reopen): support tempfile. + + * eval.c (catch_i): should supply argument. + +Sat Apr 1 22:50:28 2000 Yukihiro Matsumoto + + * marshal.c (r_object): wrong symbol restoration. + +Sat Apr 1 21:30:53 2000 WATANABE Hirofumi + + * io.c (rb_io_printf, rb_f_printf): should use rb_io_write. + +Sat Apr 1 00:16:05 2000 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): should be clear flags + before calling finalizers. + + * eval.c (specific_eval): can be called without SecurityError, if + $SAFE >= 4. + + * object.c (sym_inspect): inspect gives ":sym", to_s gives "sym". + +Fri Mar 31 22:07:04 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.12. + + * lib/net/protocol.rb: update Net::Protocol::Proxy#connect + + * lib/net/protocol.rb: ReplyCode is not a class + + * lib/net/http.rb: header value format was change: + values do not include header name + + * lib/net/http.rb: header is not a Hash, but HTTPResponse + +Thu Mar 30 12:19:44 2000 Katsuyuki Komatsu + + * enum.c (enum_find): rb_eval_cmd() should be called with array. + +Tue Mar 28 13:57:05 2000 Clemens Hintze + + * ext/dbm/dbm.c (fdbm_invert): should return new hash. + + * ext/gdbm/gdbm.c (fgdbm_invert): ditto. + +Tue Mar 28 00:58:03 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.11. + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: does not + dispatch any commands while dispatching command. + + * lib/net/protocol.rb: failed to get error class of + inherited ReplyCode + + * lib/net/http.rb: change feature of "get2", "post2" + +Mon Mar 27 01:34:58 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.10. + + * lib/net/http.rb: return value of 'head' was wrong. + +Sun Mar 26 17:47:35 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.9. + + * lib/net/smtp.rb: SMTP#do_ready wrongly took no arguments + +Sat Mar 25 23:21:10 2000 Yukihiro Matsumoto + + * marshal.c (w_object): symbols should be converted to ID before + dumping out. + +Fri Mar 24 18:26:51 2000 Yukihiro Matsumoto + + * file.c (test_check): should have checked exact number of arguments. + +Fri Mar 24 21:02:11 2000 Koji Arai + + * signal.c (trap): should treat some symbols as the signal. + +Fri Mar 24 06:58:03 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.8. + + * lib/net/http.rb: post, get2, post2, get_body + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: separate + Command/Socket documentation. + +Thu Mar 23 02:26:14 2000 Yukihiro Matsumoto + + * io.c (rb_io_fptr_finalize): fptr may be null. + + * io.c (rb_io_s_new): now calls `initialize'. + + * io.c (rb_io_initialize): actual open done in this method. + + * io.c (rb_file_initialize): ditto. + + * eval.c (rb_eval): class variables in singleton class definition + is now handled properly (I hope). + +Wed Mar 22 21:49:36 2000 Minero Aoki + + * st.c (st_delete_safe): skip already deleted entry. + + * hash.c (rb_hash_delete): modify brace miss. + +Wed Mar 22 08:53:58 2000 Yukihiro Matsumoto + + * eval.c (exec_under): do not push cbase if ruby_cbase == under. + + * node.h (NEW_CREF0): preserve cbase nesting. + +Tue Mar 21 12:57:50 2000 Yukihiro Matsumoto + + * object.c (rb_class_s_new): Class::new should call `inherited'. + +Sat Mar 18 12:36:09 2000 Nobuyoshi Nakada + + * eval.c (rb_backtrace, make_backtrace): removed unused variable + `lev'. + + * eval.c (rb_attr): calls `method_added' at attribute definition. + + * eval.c (rb_mod_modfunc): calls `singleton_method_added' while + `module_function'. + + * eval.c (rb_eval): parameter to `method_added' and + `singleton_method_added' is Symbol. + + * eval.c (Init_eval): caches IDs for `method_added' and + `singleton_method_added'. + +Sat Mar 18 11:25:10 2000 Yukihiro Matsumoto + + * parse.y (rescue): allows `rescue Error in foo'. experimental. + which is better this or preparing alias `exception' for `$!'? + +Fri Mar 17 15:02:45 2000 Yukihiro Matsumoto + + * variable.c (rb_autoload_id): defining new autoload should be + prohibited for $SAFE > 4. + + * variable.c (rb_autoload_load): autoload should be possible for + $SAFE > 4. + + * eval.c (call_trace_func): should handle T_ICLASS properly. + +Fri Mar 17 14:34:30 2000 Yukihiro Matsumoto + + * string.c (str_gsub): forgot to initialize str->orig. + +Fri Mar 17 01:24:59 2000 Dave Thomas + + * string.c (rb_str_clone): forgot to copy str->orig if STR_NO_ORIG + is set by Array#pack. + +Wed Mar 15 21:25:04 2000 Minero Aoki + + * array.c (rb_ary_join): 'result' is always duplicated + before concat string. + +Wed Mar 15 17:26:05 2000 Yukihiro Matsumoto + + * hash.c (rb_hash_s_create): unexpected recursive call removed. + this bug was found by Satoshi Nojo . + +Wed Mar 15 13:12:39 2000 Yukihiro Matsumoto + + * eval.c (Init_Thread): Thread.join removed finally. + + * string.c (rb_str_chomp_bang): forgot to call rb_str_modify(). + +Mon Mar 13 16:12:13 2000 Yukihiro Matsumoto + + * eval.c (block_pass): distinguish real orphan block and still + on-stack block passed by block argument. + +Mon Mar 13 00:20:25 2000 Yukihiro Matsumoto + + * parse.y (f_norm_arg): proper error message when constant comes + in formal argument list. this message is suggested by Muvaw + Pnazte . + + * eval.c (rb_f_raise): proper error message when the first + argument is not an exception class/object. + + * string.c (rb_str_dup): dup now postpone buffer copy as long as + possible. performance improved by lazy copying. + +Sun Mar 12 13:58:52 2000 Koji Arai + + * signal.c (rb_f_kill): should treat some symbols as the signal. + +Sat Mar 11 22:03:03 2000 Yukihiro Matsumoto + + * string.c (rb_str_gsub): performance tune by avoiding buffer copy. + + * eval.c (rb_f_missing): check if argv[0] is ID. + +Sat Mar 11 15:49:41 2000 Tadayoshi Funaba + + * struct.c (rb_struct_aref): struct aref by symbol. + +Sat Mar 11 05:07:11 2000 Yukihiro Matsumoto + + * process.c (proc_setpriority): should return 0, not nil. + + * process.c (proc_setpgid): ditto. + +Fri Mar 10 18:14:54 2000 Yukihiro Matsumoto + + * file.c (path_check_1): confusing buf and path. this bug found + by . + +Fri Mar 10 09:37:49 2000 Katsuyuki Komatsu + + * MANIFEST: add beos/GNUmakefile.in. + * configure.in: support BeOS R4.5.2 (Intel). + * beos/GNUmakefile.in: new file to support BeOS R4.5.2 (Intel). + +Thu Mar 9 11:13:32 2000 Yukihiro Matsumoto + + * regex.c (re_compile_fastmap): fixed embarrassing brace bug. + +Thu Mar 9 01:36:32 2000 WATANABE Hirofumi + + * missing/flock.c: emulate missing flock() with fcntl(). + +Thu Mar 9 00:29:35 2000 Yukihiro Matsumoto + + * object.c (sym_to_s): returns ":sym". + + * object.c (sym_id2name): separated from to_s; returns "sym". + +Wed Mar 8 19:16:19 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.7. + + * lib/net/http.rb (connecting): returns header + +Wed Mar 8 02:08:43 2000 Yukihiro Matsumoto + + * parse.y: escape expansion too early. + + * string.c (rb_f_scan): Kernel#scan added. + + * regex.c (re_compile_pattern): support \cX et al. + +Tue Mar 7 01:44:27 2000 Yukihiro Matsumoto + + * io.c (set_stdin): simplified procedure, allows $stdin = DATA; + experimental. + + * io.c (set_outfile): ditto. + + * re.c (Init_Regexp): new method Regexp#last_match added; it's an + alternative for $~. + + * configure.in (DEFAULT_KCODE): KCODE_NONE should be the default. + + * dir.c (dir_s_rmdir): should return 0 on success. + + * signal.c: remove CWGUSI support. + +Mon Mar 6 12:28:37 2000 Yukihiro Matsumoto + + * marshal.c (w_symbol): support symbol object. + + * util.c: make symbol as separated class. + + * error.c (Init_Exception): new exception RangeError. + + * ext/socket/socket.c (ip_addrsetup): should check length of hostname. + + * ext/socket/socket.c (ip_addrsetup): check newline at the end of + hostname. These fixes suggested by Muvaw Pnazte . + +Sun Mar 5 20:35:45 2000 WATANABE Hirofumi + + * ext/Win32API/Win32API.c (Win32API_initialize): should call + LoadLibrary() everytime and should assign the hdll to Win32API + object(protect the hdll from GC). + +Sun Mar 5 18:49:06 2000 Nakada.Nobuyoshi + + * misc/ruby-mode.el (ruby-parse-region): not treat method `begin' + and `end' as reserved words. + + * misc/ruby-mode.el (ruby-font-lock-docs): ignore after `=begin' + and `=end'. + + * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns): + added `yield' to keywords. + + * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns): + matches keywords at end of buffer. + +Sun Mar 5 18:08:53 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.6. + + * lib/net/http.rb: allow to omit 'start' + +Tue Feb 29 01:08:26 2000 Yukihiro Matsumoto + + * range.c (range_initialize): initialization done in `initialize'; + `initialize' should not be called more than once. + + * object.c (Init_Object): default `initialize' should take zero + argument. + + * time.c (time_s_new): call `initialize' in Time::new. + +Sat Feb 26 22:39:31 2000 EGUCHI Osamu + + * string.c (rb_str_times): fix String#* with huge string. + +Sat Feb 26 00:14:59 2000 Yukihiro Matsumoto + + * dir.c (dir_s_new): call `initialize' in Dir::new. + +Fri Feb 25 23:01:49 2000 Katsuyuki Komatsu + + * ruby.h: export ruby_safe_level by EXTERN for mswin32. + * win32/ruby.def: regular maintenance. + +Fri Feb 25 22:12:46 2000 Yukihiro Matsumoto + + * io.c (rb_io_reopen): IO#reopen should accept path as well. + + * string.c (rb_str_s_new): call `initialize' in String::new. + + * hash.c (rb_hash_s_new): call `initialize' in Hash::new. + + * array.c (rb_ary_s_new): call `initialize' in Array::new. + +Fri Feb 25 12:50:20 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_start_timer): interval changed to 10ms from 50ms. + +Fri Feb 25 06:42:26 2000 GOTOU Yuuzou + + * ext/socket/socket.c (ip_addrsetup): hostp should remain NULL if + host is nil. + +Thu Feb 24 16:53:47 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_schedule): priority check for sleep expired + threads needed. + +Wed Feb 23 14:22:32 2000 Yukihiro Matsumoto + + * array.c (rb_ary_join): forgot to initialize a local variable + `taint'. + +Tue Feb 22 07:40:55 2000 Yukihiro Matsumoto + + * re.c (Init_Regexp): renamed to MatchData, old name MatchingData + remain as alias. + +Tue Feb 22 00:20:21 2000 Minero Aoki + + * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.5. + + * lib/net/session.rb: rename to protocol.rb + + * lib/net/protocol.rb: ProtocolSocket -> Net::Socket + + * lib/net/protocol.rb: Net::Socket#write, write_pendstr + can take block + + * lib/net/smtp.rb: new methods SMTP#ready SMTPCommand#write_mail + + * lib/net/pop.rb: POPMail#pop can take block + +Sat Feb 19 23:58:51 2000 Yukihiro Matsumoto + + * regex.c (re_match): pop_loop should not pop at forward jump. + +Fri Feb 18 17:15:40 2000 Yukihiro Matsumoto + + * eval.c (method_clone): method objects are now clonable. + +Fri Feb 18 00:27:34 2000 Yukihiro Matsumoto + + * variable.c (rb_shared_variable_declare): shared variable (aka + class/module variable) introduced. prefix `@@'. experimental. + + * class.c (rb_scan_args): new format char '&'. + +Thu Feb 17 19:09:05 2000 Katsuyuki Komatsu + + * win32/win32.c (mypopen): don't close handle if it is not assigned. + * win32/win32.c (my_open_osfhandle): support O_NOINHERIT flag. + * win32/win32.c (win32_getcwd): rename getcwd to win32_getcwd + in order to avoid using the C/C++ runtime DLL's getcwd. + Use CharNext() to process directory name. + * win32/win32.h: map getcwd to win32_getcwd. + +Wed Feb 16 00:32:49 2000 Yukihiro Matsumoto + + * eval.c (method_arity): nd_rest is -1 for no rest argument. + + * process.c (proc_waitpid): returns nil when waitpid(2) returns 0. + +Tue Feb 15 01:47:00 2000 Yukihiro Matsumoto + + * process.c (rb_f_waitpid): pid_t should be signed. + +Mon Feb 14 13:59:01 2000 Yukihiro Matsumoto + + * parse.y (yylex): yylex yields wrong tokens for `:foo=~expr'. + + * ruby.c (load_file): exit if reading file is empty. + +Mon Feb 14 03:34:52 2000 Yukihiro Matsumoto + + * parse.y (yylex): `foo.bar=1' should be <.><=><1>, + not <.><1>. + + * eval.c (rb_thread_restore_context): process according to + RESTORE_* is moved after longjmp(). + + * eval.c (thread_switch): new function to process RESTORE_*. + +Sun Feb 13 16:19:49 2000 WATANABE Hirofumi + + * ruby.c (require_libraries): don't access freed memory. + + * ruby.c (add_modules): ditto. + +Fri Feb 11 12:06:22 2000 Yukihiro Matsumoto + + * parse.y (parse_quotedwords): %w() need to split not only by mere + spaces, but by all whitespaces. + +Thu Feb 10 02:12:04 2000 Yukihiro Matsumoto + + * string.c (rb_str_index_m): did not support negative offset. + +Wed Feb 9 21:54:26 2000 Katsuyuki Komatsu + + * ext/socket/getaddrinfo.c: gcc --traditional support. + Rearrange headers to work AC_C_CONST. + * ext/socket/getnameinfo.c: ditto. + * ext/socket/socket.c: mswin32: use double instead of long long. + +Wed Feb 9 16:30:41 2000 Yukihiro Matsumoto + + * numeric.c (num_coerce): should return [y, x]. + +Wed Feb 9 11:07:30 2000 Yukihiro Matsumoto + + * ruby.c (ruby_prog_init): loadpath structure changed. + +Tue Feb 8 02:07:33 2000 Yukihiro Matsumoto + + * regex.c (re_search): optimize for \G at top. + + * regex.c (re_compile_pattern): \G introduced. + + * regex.c (re_match): ditto. + + * string.c (str_sub_bang): old behavior restored: bang method + returns nil if string not changed. + + * regex.c (re_compile_pattern): support independent subexpression + `(?>pattern)'. + + * regex.c (re_match): ditto. + +Mon Feb 7 15:51:08 2000 Yukihiro Matsumoto + + * regex.c (re_match): now understands interrupts under Ruby. + +Mon Feb 7 07:51:52 2000 Yukihiro Matsumoto + + * array.c (rb_ary_uniq_bang): always return an Array. + + * array.c (rb_ary_compact_bang): ditto. + + * array.c (rb_ary_flatten_bang): ditto. + + * hash.c (rb_hash_reject): returns a Hash, not an Array. + + * hash.c (env_reject): ditto. + +Fri Feb 4 10:20:25 2000 Yukihiro Matsumoto + + * string.c (scan_once): scan now leaves information about the last + successful pattern match in $&. + + * io.c (rb_io_close): should not check closed IO. + +Fri Feb 4 05:44:01 2000 Kentaro Inagaki + + * ext/socket/socket.c (s_recv): TRAP_BEG after retry entry. + +Wed Feb 2 22:33:45 2000 Nobuyoshi Nakada + + * eval.c (rb_thread_start): receives argument from outside, like + `Thread::start(1,2,3){|a,b,c| ... }'. + +Wed Feb 2 22:14:40 2000 Yukihiro Matsumoto + + * re.c (rb_reg_regsub): should check regs->num_regs. + + * re.c (rb_reg_search): remove matchcache, use static struct + re_register instead. + + * re.c (match_getter): avoid cloning match data. + +Wed Feb 2 17:12:15 2000 Dave Thomas + + * samples/eval.rb: Rescue new ScriptError exception + +Wed Feb 2 02:06:07 2000 Yukihiro Matsumoto + + * string.c (str_gsub_bang): gsub! now leaves information about the + last successful pattern match in $&. + +Mon Jan 31 15:24:58 2000 Yukihiro Matsumoto + + * string.c (str_sub_bang): bang method returns string always. + experimental. + +Sun Jan 30 17:58:09 2000 WATANABE Hirofumi + + * eval.c: arrange to use setitimer(2) for BOW, DJGPP + + * defines.h: ditto. use random(3) on cygwin b20.1. + +Sun Jan 30 17:20:16 2000 WATANABE Hirofumi + + * eval.c: use getrlimit(2) on DJGPP. + +Thu Jan 27 01:27:10 2000 GOTO Kentaro + + * dir.c (glob): glob pattern "/*" did not match. + +Wed Jan 26 22:30:47 2000 Shigeo Kobayashi + + * numeric.c (flo_modulo): wrong result for negative modulo. + +Wed Jan 26 02:01:57 2000 Yukihiro Matsumoto + + * file.c (test_c): should use S_ISCHR. + + * file.c (rb_stat_c): ditto. + + * string.c (rb_str_each_line): should propagate tainting. + +Tue Jan 25 04:01:34 2000 Yukihiro Matsumoto + + * object.c (rb_obj_freeze): all objects made freezable. + +Tue Jan 25 00:37:01 2000 WATANABE Hirofumi + + * configure.in: use AC_CHECK_TOOL for cross compiling. + +Mon Jan 24 19:01:54 2000 Nobuyoshi Nakada + + * array.c (rb_protect_inspect): should be checked by id of + objects; not by object themselves. + +Mon Jan 24 18:48:08 2000 Minero Aoki + + * eval.c (rb_eval): too many warnings; warned on every method + overriding. should be on method discarding. + +Mon Jan 24 02:56:44 2000 Yukihiro Matsumoto + + * parse.y (yylex): -2.abs should be `(-2).abs' to accomplish the + principle of less surprise. `+2' too. + + * eval.c (rb_eval): when defining class is already there, and + superclass differ, throw away the old class. + + * variable.c (rb_const_set): gives warning again on constant + redefinition. + + * error.c (Init_Exception): SyntaxError, NameError, LoadError and + NotImplementError are subclasses of ScriptError + + * parse.y (parse_quotedwords): no longer use `String#split'. + and enable space escape within quoted word list. + e.g. %w(a\ b\ c abc) => ["a b c", "abc"]. + + * string.c (rb_str_slice_bang): new method `slice!'. + +Fri Jan 21 21:56:08 2000 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.4. + + * lib/net/http.rb: can receive messages which have + no Content-Length:. + +Fri Jan 21 16:15:59 2000 Yukihiro Matsumoto + + * eval.c (thgroup_s_new): new class ThreadGroup. + +Tue Jan 18 12:24:28 2000 Yukihiro Matsumoto + + * struct.c (Init_Struct): remove Struct's own hash and eql?. + +Sat Jan 15 22:21:08 2000 Nobuyoshi Nakada + + * eval.c (search_method): argument klass may be 0. + +Sat Jan 15 15:03:46 2000 Yukihiro Matsumoto + + * enum.c (enum_index): remove this method. + + * enum.c: remove use of pointers to local variables. find, + find_all, min, max, index, member?, each_with_index, + + * eval.c (massign): multiple assignment does not use to_a anymore. + experimental. + +Fri Jan 14 12:22:04 2000 Yukihiro Matsumoto + + * string.c (rb_str_replace): use memmove instead of memcpy for + overwrapping strings (e.g. a[1] = a). + +Thu Jan 13 11:12:40 2000 Yukihiro Matsumoto + + * parse.y (arg_add): use new node, ARGSPUSH. + +Mon Jan 10 18:32:28 2000 Koji Arai + + * marshal.c (w_object): forgot an argument to call w_ivar(). + +Sun Jan 9 18:13:51 2000 Katsuyuki Komatsu + + * random.c: first was not defined unless HAVE_RANDOM. + +Sat Jan 8 19:02:49 2000 Yukihiro Matsumoto + + * io.c (rb_io_sysread): raise IOError for buffered IO. + + * ext/socket/socket.c (s_recv): ditto. + +Fri Jan 7 00:59:29 2000 Masahiro Tomita + + * io.c (io_fread): TRAP_BEG/TRAP_END added around getc(). + +Thu Jan 6 00:39:54 2000 Yukihiro Matsumoto + + * random.c (rb_f_rand): should be initialized unless srand is + called before. + +Wed Jan 5 16:59:34 2000 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.3. + + * lib/net/session.rb: Session -> Protocol, ... + + * lib/net/http.rb: HTTPCommand implementation was changed. + +Wed Jan 5 02:14:46 2000 EGUCHI Osamu + + * parse.y: Fix SEGV on empty parens with UMINUS or UPLUS. + +Tue Jan 4 22:25:54 2000 Yukihiro Matsumoto + + * parse.y (stmt): `() while cond' dumped core. + +Tue Jan 4 06:04:14 2000 WATANABE Hirofumi + + * configure.in: modify for cross-compiling. + use target_* instead of host_*. + use AC_CANONICAL_TARGET. + + * Makefile.in: ditto. + + * cygwin/GNUmakefile.in: ditto. + +Sat Jan 1 13:26:14 2000 Yukihiro Matsumoto + + * eval.c (rb_yield_0): force_recycle ruby_dyna_vars to gain + performance. + + * array.c (rb_ary_delete_at_m): takes same argument pattern with + rb_ary_aref. + +Sat Jan 1 10:12:26 2000 Nobuyoshi Nakada + + * ruby.h,util.c (rb_special_const_p): peep hole optimization. + + * ruby.h,util.c (rb_test_false_or_nil): removed. + + * ruby.h (RTEST, SPECIAL_CONST_P): peep hole optimization. + + * ruby.h (FL_ABLE, FL_SET, FL_UNSET, FL_REVERSE): made expressions + not statements. + + * ruby.h (OBJ_INFECT): newly added macro which copies taint from + `s' to `x'. + +Sat Jan 1 02:04:18 2000 Yukihiro Matsumoto + + * eval.c (rb_thread_safe_level): new method. + + * eval.c (rb_yield_0): recycle dyna_var_map to reduce object + allocation. + +Fri Dec 31 00:52:48 1999 Yukihiro Matsumoto + + * eval.c: thread independent trace_func not needed. + +Thu Dec 30 14:47:31 1999 akira yamada + + * configure.in: specifies -soname in LIBRUBY_DLDFLAGS on linux + platforms. + +Thu Dec 30 10:51:27 1999 Yukihiro Matsumoto + + * array.c,io.c,hash,c,re.c,string.c: `_m' suffix instead of + `_method' for wrapper functions to implement method, + e.g. `rb_str_join_m()'. + +Thu Dec 30 02:08:02 1999 Yukihiro Matsumoto + + * bignum.c (rb_cstr2inum): non-numeric format check added. + currently it works only with base == 0 (i.e. Integer()). + + * bignum.c (rb_str2inum): now takes VALUE to 1st argument. null + byte check added. + + * array.c (rb_ary_replace): unless replacement is an array, + replacement shall be converted to array by `[replacement]', not + by `replacement.to_a'. + + * array.c (rb_ary_plus): right operand must be an array. + + * array.c (rb_ary_concat): argument must be an array. + +Mon Dec 27 12:35:47 1999 Katsuyuki Komatsu + + * ext/socket/socket.c (sock_finalize): mswin32: fix socket handle leak. + + * win32/win32.c (myfdclose): ditto. + +Sun Dec 26 23:15:13 1999 Katsuyuki Komatsu + + * win32/win32.c (mypopen): raise catchable error instead of rb_fatal. + * win32/win32.c (mypclose): fix process handle leak. + +Sun Dec 26 16:17:11 1999 Katsuyuki Komatsu + + * ext/Win32API/Win32API.c (Win32API_initialize): use UINT2NUM + instead of INT2NUM to set __dll__ and __proc__. + +Sat Dec 25 00:08:59 1999 KANEKO Naoshi + + * ext/Win32API/Win32API.c (Win32API_Call): remove 'dword ptr' + from _asm. + +Fri Dec 24 10:26:47 1999 Koji Oda + + * win32/win32.h: use "C++" linkage. + +Fri Dec 24 02:00:57 1999 Yukihiro Matsumoto + + * eval.c (THREAD_ALLOC): should initialize th->trace. + +Fri Dec 24 00:43:39 1999 KANEKO Naoshi + + * io.c (pipe_open): check for `fptr->f == NULL'. + * win32/win32.c (mypopen): STDERR does not work during ` function. + +Wed Dec 22 22:50:40 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.2. + + * lib/net/http.rb: HTTP support is enhanced a little + + * lib/net/http.rb: support proxy + +Tue Dec 21 17:21:28 1999 Koji Oda + + * ext/socket/socket.c (sock_finalize): mswin32: fix FILE* leak. + +Tue Dec 21 05:33:56 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.1. + + * lib/net/http.rb: support HTTP chunk + +Mon Dec 20 19:08:12 1999 Nobuyoshi Nakada + + * file.c (rb_file_s_expand_path): handle dir separator correctly. + +Sun Dec 19 22:56:31 1999 KANEKO Naoshi + + * lib/find.rb: support dosish root directory. + * win32/Makefile: ditto. + * win32/config.status: ditto. + * win32/win32.c (opendir): ditto. + * win32/win32.c (opendir): use CharPrev() to get last character + of the directory name. + +Sat Dec 18 03:00:01 1999 Yukihiro Matsumoto + + * file.c (path_check_1): check should be done by absolute path. + + * marshal.c (r_ivar): should restore generic_ivar too. + + * marshal.c (w_ivar): should dump generic_ivar too. + +Fri Dec 17 22:46:46 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.0. + + * lib/net/http.rb: test release + + * lib/net/session.rb: support class swapping + + * lib/net/session.rb: Socket#flush_rbuf + + * lib/net/session.rb: doquote -> Net.quote + +Fri Dec 17 19:27:43 1999 IWAMURO Motonori + + * eval.c (rb_load): should initialize ruby_frame->last_class. + +Wed Dec 15 01:35:29 1999 Yukihiro Matsumoto + + * ruby.c (proc_options): option to change directory changed to + `-C' like tar. + + * ruby.c (proc_options): argv boundary check for `-X'. + +Mon Dec 13 15:15:31 1999 Yukihiro Matsumoto + + * regex.c (re_adjust_startpos): separate startpos adjustment + because of major performance drawback. + + * class.c (rb_singleton_class): tainted status of the singleton + class must be synchronized with the object. + + * eval.c (rb_thread_schedule): implement thread priority. + +Sat Dec 11 03:34:38 1999 Yukihiro Matsumoto + + * gc.c (mark_hashentry): key should be VALUE, not ID. + + * io.c (argf_eof): should check next_p too. + +Thu Dec 9 18:09:13 1999 EGUCHI Osamu + + * error.c (exc_set_backtrace): forgot to declare a VALUE argument. + +Thu Dec 9 14:19:31 1999 Yukihiro Matsumoto + + * object.c (rb_obj_taint): explicit tainting must be prohibited at + level 4 to prevent polluting trusted object by untrusted code. + + * file.c: file operations (stat, lstat, chmod, chown, umask, + truncate, flock) are prohibited in level 2 (was level 4). + +Wed Dec 8 11:48:23 1999 Yukihiro Matsumoto + + * eval.c (rb_f_require): prohibiting require() in the secure mode + cause serious autoloading error. + + * variable.c (rb_obj_instance_variables): don't need to prohibit + to get list of instance variable names of untainted objects. + + * variable.c (rb_ivar_get): don't need to prohibit to get instance + variables of untainted objects. + + * variable.c (rb_mod_remove_const): should prohibit constant + removals too. + +Wed Dec 8 09:23:01 1999 Yukihiro Matsumoto + + * eval.c (rb_eval): should try autoloading before defining + class/module at the toplevel. + +Tue Dec 7 22:15:30 1999 EGUCHI Osamu + + * configure.in: Modified rb_cv_rshift_sign detect routine and + more simple/fast RSHIFT() for hpux-10.x. + +Tue Dec 7 11:16:30 1999 Yukihiro Matsumoto + + * eval.c (Init_eval): calculate stack limit from rlimit where + getrlimit(2) is available. + +Tue Dec 7 09:57:33 1999 Katsuyuki Komatsu + + * file.c (rb_file_ftype): should have removed mode_t. + +Mon Dec 6 15:55:30 1999 EGUCHI Osamu + + * numeric.c (fix_rshift): Fix -1 >> 32 returned 0 (should be -1). + + * numeric.c (fix_rshift): Fix 1 >> -1 returned 0 (should be 2). + +Mon Dec 6 11:47:23 1999 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): formatted string must be tainted if + any of parameters is a tainted string. + + * file.c (rb_file_s_expand_path): expanded file path need not to + be tainted always. + +Sun Dec 5 20:25:29 1999 Katsuhiro Ueno + + * eval.c (Init_Proc): simple typo. + + * gc.c (add_heap): sizeof(RVALUE*), not sizeof(RVALUE). + +Sat Dec 4 01:40:22 1999 Yukihiro Matsumoto + + * regex.c (re_search): adjust startpos for multibyte match unless + the first pattern is forced byte match. + + * bignum.c (rb_big_rand): should not use rand/random where drand48 + may be available. RANDOM_NUMBER should be provided from outside. + +Fri Dec 3 09:54:59 1999 Yukihiro Matsumoto + + * ruby.c (moreswitches): there may be trailing garbage at #! + line. + + * eval.c (rb_f_require): should check require 'feature.o' too. + +Thu Dec 2 11:58:15 1999 Koji Arai + + * eval.c (rb_thread_loading): should maintain loading_tbl. + +Thu Dec 2 10:21:43 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_loading_done): wrong parameter to st_delete(). + +Wed Dec 1 11:24:06 1999 Nobuyoshi Nakada + + * ruby.c (process_sflag): process -s properly (should not force `--'). + +Wed Dec 1 09:47:33 1999 Kazunori NISHI + + * string.c (rb_str_split_method): should increment end too. + +Tue Nov 30 18:00:45 1999 Yukihiro Matsumoto + + * marshal.c: MARSHAL_MINOR incremented; format version is 4.2. + + * marshal.c (w_object): distinguish class and module. + + * marshal.c (w_object): save hash's default value. + + * marshal.c (r_object): restore hash's default value. + +Tue Nov 30 01:46:18 1999 Yukihiro Matsumoto + + * re.c (rb_reg_source): generated source string must be tainted if + regex is tainted. + + * file.c (rb_file_s_basename): basename should not be tainted + unless the original path is tainted. + + * file.c (rb_file_s_dirname): ditto. + +Mon Nov 29 20:42:13 1999 Nobuyoshi Nakada + + * file.c (stat_new): Struct::Stat -> File::Stat; Stat is no longer + a Struct. + +Mon Nov 29 15:28:52 1999 Yukihiro Matsumoto + + * variable.c (rb_path2class): evaluated value from path should be + module or class. + +Fri Nov 26 18:12:49 1999 Yukihiro Matsumoto + + * eval.c (rb_exec_end_proc): should remove only end_procs defined + within load wrapper. + + * eval.c (rb_load): save and restore ruby_wrapper around loading. + + * eval.c (rb_mark_end_proc): mark end procs registered by END{} or + at_exit{}. + + * eval.c (rb_set_end_proc): should not call rb_global_variable() + on heap address; it crashed mod_ruby. + +Mon Nov 22 14:07:24 1999 Koji Arai + + * ruby.c (proc_options): variable e_script should be visited by + garbage collector. + +Sat Nov 20 10:10:41 1999 Yukihiro Matsumoto + + * hash.c (inspect_i): value may be nil, check revised. + +Fri Nov 19 18:06:21 1999 Yukihiro Matsumoto + + * dir.c (glob): recursive wildcard match by `**' ala zsh. + +Fri Nov 19 11:44:26 1999 EGUCHI Osamu + + * variable.c: was returning void value. + +Fri Nov 19 03:57:22 1999 Nobuyoshi Nakada + + * file.c: add methods Stat struct class to reduce stat(2). + +Thu Nov 18 16:18:27 1999 Yukihiro Matsumoto + + * lib/pstore.rb: mutual lock by flock(2). + +Thu Nov 18 11:44:13 1999 Masahiro Tomita + + * io.c (read_all): should check bytes too. + +Wed Nov 17 02:40:40 1999 Yukihiro Matsumoto + + * io.c (Init_IO): $defout (alias of $>) added. + +Tue Nov 16 09:47:14 1999 Yukihiro Matsumoto + + * lib/pstore.rb: add mutual lock using symlink. + +Mon Nov 15 16:50:34 1999 Yukihiro Matsumoto + + * enum.c (enum_grep): non matching grep returns an empty array, no + longer returns nil. + + * enum.c (enum_grep): grep with block returns collection of + evaluated values of block over matched elements. + +Mon Nov 15 04:50:33 1999 Koji Arai + + * re.c (rb_reg_source): should not call rb_reg_expr_str() + everytime. + +Sat Nov 13 07:34:18 1999 Yukihiro Matsumoto + + * variable.c (rb_mod_constants): traverse superclasses to collect + constants. + + * eval.c (assign): modified for shared variables. + + * eval.c (rb_eval): search nested scope, then superclasses to + assign shared variables within methods. + + * eval.c (rb_eval): remove warnings from constants modification, + because they are no longer constants. + + * parse.y (node_assign): modified for shared variables. + + * parse.y (assignable): allow constant assignment in methods; + constants should be called `shared variable'. + +Fri Nov 12 23:52:19 1999 Katsuyuki Komatsu + + * process.c (rb_f_system): argument check for NT, __EMX__, DJGPP. + +Wed Nov 10 21:54:11 1999 EGUCHI Osamu + + * hash.c (rb_any_cmp): Fixed return without value. + +Wed Nov 10 17:57:06 1999 Yukihiro Matsumoto + + * sprintf.c: incorporate 's sprintf patch at + [ruby-dev:7754]. + +Wed Nov 10 08:28:53 1999 Yukihiro Matsumoto + + * eval.c (rb_call0): supply class parameter for each invocation. + +Tue Nov 9 13:21:04 1999 EGUCHI Osamu + + * configure.in: AC_MINIX move to before AC_EXEEXT and AC_OBJEXT. + +Mon Nov 8 19:52:29 1999 EGUCHI Osamu + + * configure.in: Renamed AC_CHAR_UNSIGNED to AC_C_CHAR_UNSIGNED. + + * configure.in: Added default to AC_CHECK_SIZEOF(). + +Mon Nov 8 14:28:18 1999 Yukihiro Matsumoto + + * parse.y (stmt): rescue modifier added to the syntax. + + * keywords: kRESCUE_MOD added. + + * eval.c (rb_f_eval): fake outer scope when eval() called without + bindings. + + * eval.c (rb_f_binding): should copy last_class in the outer frame too. + +Sun Nov 7 18:31:04 1999 Yasuhiro Fukuma + + * eval.c (is_defined): last_class may be 0. + +Sat Nov 6 19:26:55 1999 EGUCHI Osamu + + * Makefile.in: Added depend entry make parse.@OBJEXT@ from parse.c + for UCB make + +Thu Nov 4 17:41:18 1999 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): \< (wordbeg), \> (wordend) disabled. + +Wed Nov 3 08:52:57 1999 Masaki Fukushima + + * io.c (Init_IO): forgot to use INT2FIX() around SEEK_SET, etc. + +Wed Nov 3 00:25:20 1999 Yukihiro Matsumoto + + * string.c (rb_str_split_method): use mbclen2() to handle kcode + option of regexp objects. + +Mon Nov 1 14:22:15 1999 EGUCHI Osamu + + * eval.c (rb_eval): reduce recursive calls to rb_eval() + case of ||= and &&= . + +Sun Oct 31 13:12:42 1999 WATANABE Hirofumi + + * regex.c (re_compile_pattern): wrong [\W] match. + +Fri Oct 29 16:57:30 1999 Yukihiro Matsumoto + + * ext/nkf/lib/kconv.rb: new String methods (kconv, tojis, toeuc, + tosjis). + + * time.c (time_s_at): now accepts optional second argument to + specify micro second. + +Thu Oct 28 13:35:40 1999 Yukihiro Matsumoto + + * string.c (rb_str_split_method): should be mbchar aware with + single char separators. + +Wed Oct 27 12:57:21 1999 Yukihiro Matsumoto + + * random.c (rb_f_srand): random seed should be unsigned. + +Tue Oct 26 23:58:15 1999 Yukihiro Matsumoto + + * array.c (rb_ary_collect): collect for better performance. + +Tue Oct 26 19:20:54 1999 Koji Arai + + * marshal.c (r_object): should register class/module objects. + +Sat Oct 23 15:59:39 1999 Takaaki Tateishi + + * process.c (rb_f_system): should require at least one argument. + +Sat Oct 23 12:42:44 1999 Nobuyoshi Nakada + + * enum.c (enum_collect): collect without block will collect + elements in enumerable. + +Thu Oct 21 16:14:19 1999 Yukihiro Matsumoto + + * ruby.c (moreswitches): function to process string option; + the name is stolen from perl (not implementation). + + * ruby.c (proc_options): use RUBYOPT environment variable to + retrieve the default options. + + * dir.c (fnmatch): use eban's fnmatch; do not depend on system's + fnmatch (which may have portability problem) anymore. + +Wed Oct 20 15:14:24 1999 Yukihiro Matsumoto + + * marshal.c (marshal_load): should protect the generated object + table (arg->data) from GC. + +Mon Oct 18 16:15:52 1999 Yukihiro Matsumoto + + * ext/nkf/nkf.c (rb_nkf_kconv): output should be NUL terminated. + +Mon Oct 18 09:03:01 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb: 1.0.3 + + * lib/net/pop.rb: new methods POP3Command#uidl, POPMail#uidl. + +Sun Oct 17 03:35:33 1999 Masaki Fukushima + + * array.c (rb_ary_pop): forgot some freeze checks. + +Sat Oct 16 12:57:53 1999 EGUCHI Osamu + + * array.c (rb_ary_sort): always returns the copied array. + +Fri Oct 15 22:50:41 1999 WATANABE Hirofumi + + * error.c (sys_nerr): on CYGWIN, it is _sys_nerr. + +Fri Oct 15 01:32:31 1999 WATANABE Hirofumi + + * io.c (rb_io_ctl) :need to use NUM2ULONG, not NUM2INT. + + * ext/Win32API/Win32API.c (Win32API_Call): need to use NUM2ULONG, + not NUM2INT. + +Fri Oct 15 00:22:30 1999 Yukihiro Matsumoto + + * re.c (Init_Regexp): super class of the MatchingData, which was + Data, to be Object. + + * eval.c (ruby_run): evaluate required libraries before load & + compiling the script. + + * parse.y (lex_getline): retrieve a line from the stream, saving + lines in the table in debug mode. + + * eval.c (call_trace_func): treat the case ruby_sourcefile is null. + +Thu Oct 14 02:00:10 1999 Yukihiro Matsumoto + + * parse.y (string): compile time string concatenation. + +Wed Oct 13 07:28:09 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb: 1.0.2 + + * lib/net/session.rb: new method Session#set_pipe. + + * lib/net/session.rb, smtp.rb, pop.rb: add RD documentation. + +Wed Oct 13 02:17:05 1999 EGUCHI Osamu + + * array.c (rb_ary_plus): remove recursion. + + * array.c (rb_ary_sort_bang): detect modify attempt. + +Wed Oct 13 02:17:05 1999 Yukihiro Matsumoto + + * eval.c (block_pass): should copy block to prevent modifications. + tag in the structure should be updated from latest prot_tag. + + * eval.c (proc_s_new): tag in struct BLOCK should not point into + unused stack. + + * dir.c (dir_s_glob): iterate over generated matching filenames if + the block is given to the method. + + * array.c (rb_ary_at): new methods; at, first, last. + + * hash.c (rb_hash_fetch): raises exception unless the default + value is supplied. + + * hash.c (rb_hash_s_create): need not remove nil from value. + + * hash.c (rb_hash_aset): setting value to nil does not remove key + anymore. + +Tue Oct 12 22:29:04 1999 Yukihiro Matsumoto + + * io.c (io_read): length may be 0 or negative. + +Tue Oct 12 13:26:27 1999 Jun-ichiro itojun Hagino + + * signal.c (posix_signal): RETSIGTYPE may be void. + +Tue Oct 12 03:28:03 1999 EGUCHI Osamu + + * array.c (rb_ary_delete_at): allows negative position. + +Mon Oct 11 17:42:25 1999 Nobuyoshi Nakada + + * parse.y (rb_intern): should generate distinct ID_ATTRSET symbols + for the name with multiple `='s at the end. + + * Makefile.in (CPPFLAGS): separate cpp flags from CFLAGS. + +Mon Oct 11 07:27:05 1999 Yukihiro Matsumoto + + * eval.c (rb_eval): should not execute the `else' clause on the + case the exceptions are handled by the `rescue' clause. + + * signal.c (Init_signal): ignore SIGPIPE by default. + +Wed Oct 6 17:13:19 1999 Nobuyoshi Nakada + + * ruby.c (addpath): rubylib_mangled_path() modified. + +Mon Oct 4 12:42:32 1999 Kazuhiko Izawa + + * pack.c (pack_unpack): % in printf format should be %%. + +Mon Oct 4 10:01:40 1999 Yukihiro Matsumoto + + * variable.c (rb_obj_instance_variables): should always return + array for all object can have instance variables now. + +Mon Oct 4 00:08:34 1999 Yukihiro Matsumoto + + * pack.c (OFF16): need to adjust pointer address to pack/unpack on + 64bit machines. + +Sun Oct 3 03:05:59 1999 WATANABE Hirofumi + + * time.c (time_arg): mktime y2k problem. + +Sun Sep 26 16:54:45 1999 WATANABE Hirofumi + + * parse.y (here_document): `\r' handling for here documents. + +Wed Sep 22 09:20:11 1999 Masahiro Tomita + + * ext/socket/socket.c: SOCKS5 support. + +Wed Sep 22 07:33:23 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb: 1.0.1 + + * lib/net/pop.rb: APOP did not work. + + * lib/net/pop.rb: modify the way to make APOP challenge. + +Wed Sep 22 00:35:30 1999 Yukihiro Matsumoto + + * string.c (rb_str_include): should return boolean value. + + * regex.c (re_compile_fastmap): wrong comparison with mbc. + + * eval.c (specific_eval): default sourcefile name should be + "(eval)" for module_eval etc. + +Wed Sep 22 00:06:07 1999 Katsuyuki Komatsu + + * win32/Makefile: update rules. + + * io.c (io_fread): should not assign in char, it maybe -1. + +Tue Sep 21 23:57:54 1999 Yukihiro Matsumoto + + * eval.c (call_trace_func): should not propagate retval in + trace_func. + +Mon Sep 20 21:35:39 1999 Katsuyuki Komatsu + + * win32/win32.c (myselect): assume non socket files are always + readable/writable. + +Mon Sep 20 01:08:02 1999 Yukihiro Matsumoto + + * io.c (io_fread): should not block other threads. + + * io.c (rb_io_synchronized): renamed from rb_io_unbuffered(); do + not call setbuf(NULL) anymore. + +Sat Sep 18 13:45:43 1999 Yukihiro Matsumoto + + * stable version 1.4.2 released. + +Fri Sep 17 23:24:17 1999 Katsuyuki Komatsu + + * eval.c (rb_f_missing): dumped core if no argument given. + +Fri Sep 17 23:21:06 1999 Katsuyuki Komatsu + + * win32/win32.c (myselect): translate WSAEINTR, WSAENOTSOCK into + UNIX errno constants. + +Fri Sep 17 00:52:27 1999 Yukihiro Matsumoto + + * parse.y (arg): assignable() may return 0. + +Thu Sep 16 20:46:23 1999 WATANABE Hirofumi + + * eval.c (rb_eval): was doubly evaluating the return expression. + +Thu Sep 16 18:40:08 1999 Yukihiro Matsumoto + + * stable version 1.4.1 released. + +Thu Sep 16 11:33:22 1999 WATANABE Hirofumi + + * string.c (rb_str_match): should return nil. + +Wed Sep 15 22:46:37 1999 Yukihiro Matsumoto + + * re.c (rb_reg_s_quote): should quote `-' too. + +Tue Sep 14 15:23:22 1999 Nobuyoshi Nakada + + * parse.y (yylex): no need to ignore `\r' here. + + * parse.y (nextc): strip `\r' from text. + + * parse.y (nextc): support `__END__\r\n' type terminator. + +Mon Sep 13 10:49:19 1999 WATANABE Hirofumi + + * eval.c (rb_eval): needless RTEST(ruby_verbose) removed. + +Mon Sep 13 09:10:11 1999 Minero Aoki + + * lib/net/session.rb, smtp.rb, pop.rb: 1.0.0 + +Wed Sep 8 11:37:38 1999 Tadayoshi Funaba + + * time.c (make_time_t): bit more strict comparison. + +Tue Sep 7 00:50:56 1999 Yukihiro Matsumoto + + * range.c (range_each): use rb_str_upto() for strings. + + * string.c (rb_str_upto): set upper limit by comparing curr <= end. + + * range.c (range_each): should check equality to handle magic + increment. + +Mon Sep 6 22:43:33 1999 Yukihiro Matsumoto + + * eval.c (rb_eval): break/next/redo available within -n/-p loop. + +Fri Sep 3 11:14:31 1999 Yukihiro Matsumoto + + * compar.c (cmp_equal): should not raise exception; protect by + rb_rescue(). + +Thu Sep 2 05:23:05 1999 WATANABE Hirofumi + + * file.c (rb_file_s_expand_path): use dirsep, instead of character + literal '/'. + + * file.c (rb_file_s_expand_path): reduce multiple dirsep at the top. + +Wed Sep 1 00:28:27 1999 Yukihiro Matsumoto + + * eval.c (rb_call): call rb_undefined() if a method appears not to + be exist explicitly from cache. + + * eval.c (rb_method_boundp): check method cache before calling + rb_get_method_body(). + + * eval.c (rb_get_method_body): store method non-existence + information in the cache. + + * random.c (rb_f_srand): use getpid(2) to generate seed. + + * regex.c (re_match): do not apply partial mbc match for + charset_not. + + * regex.c (re_compile_pattern): put extended literal prefix (0xff) + only before numeric literals, not before all >0x80 char. + + * regex.c (re_compile_pattern): put numeric literal in extended + charset region, not normal charset bits. + + * regex.c (re_compile_fastmap): calculate fastmap for charset and + charset_not to treat numeric literal (e.g. \246) specially. + +Fri Aug 28 17:32:55 1999 Yasuhiro Fukuma + + * eval.c (rb_eval): should set return value (nil) explicitly if a + value is omitted for return statement. + +Sun Aug 26 20:26:40 2001 Koji Arai + + * ext/readline/readline.c: restore terminal mode + even if readline() interrupted. + + * ext/readline/readline.c: returned string need to + be tainted. + + * ext/readline/readline.c: fixed memory leak. + + * ext/readline/readline.c: allow negative index. + + * ext/readline/readline.c: added Readline::HISTORY.size + same as Readline::HISTORY.length + + * ext/readline/readline.c: allow conditional parsing + of the ~/.inputrc file by `$if Ruby'. + + * ext/readline/extconf.rb: check whether the + libreadline has the variable `rl_completion_append_character' + (this feature was implemented from GNU readline 2.1). + +Thu Aug 26 15:06:11 1999 Masaki Fukushima + + * gc.c (rb_gc): local variables may be placed beyond stack_end, so + use an address from alloca(1) on non C_ALLOCA platforms. + +Thu Aug 26 01:24:17 1999 Yukihiro Matsumoto + + * sprintf.c (rb_f_sprintf): "%%" is legal, but "%3.14%" is not. + +Mon Aug 23 00:00:54 1999 Tsukada Takuya + + * regex.c (re_compile_fastmap): wrong macro caused memory leak. + +Sat Aug 21 11:30:51 1999 Yukihiro Matsumoto + + * eval.c (ADJ): should not adjust addresses to data on heap. + +Fri Aug 20 20:50:58 1999 Kenji Nagasawa + + * defines.h (PATH_SEP): path separator is ";" for OS/2. + +Thu Aug 19 10:50:43 1999 WATANABE Tetsuya + + * gc.c (rb_gc): add volatile to avoid GCC optimize bug(?). + +Wed Aug 18 23:48:10 1999 Yukihiro Matsumoto + + * due to disk trouble, some change records were lost. several + modification made to eval.c, gc.c, io.c, pack.c, + ext/extmk.rb.in, and lib/mkmf.rb. + +Fri Aug 13 15:41:39 1999 Yukihiro Matsumoto + + * stable version 1.4.0 released. + +Fri Aug 13 03:16:07 1999 Yukihiro Matsumoto + + * io.c (argf_forward): since $stdout may be non-IO, ARGF.file is + not guaranteed to be IO. check and forwarding added to every ARGF + method. + + * io.c (set_outfile): $stdout/$stderr may not be IO now. + + * io.c (set_stdin): $stdin may not be IO now. + + * range.c (rb_range_beg_len): round `end' to length as documented. + + * io.c (Init_IO): preserve original stdin/stdout/stderr. + +Thu Aug 12 13:44:33 1999 Yukihiro Matsumoto + + * eval.c (Init_load): require receives 1 argument. + + * eval.c (frame_dup): should clear tmp to avoid dangling + references. + +Wed Aug 11 13:33:13 1999 Katsuyuki Komatsu + + * eval.c (rb_eval): no automatic aggregate initialization. + + * eval.c (module_setup): ditto. + +Wed Aug 11 18:18:41 1999 WATANABE Tetsuya + + * eval.c (yield_under_i): automatic aggregate initialization is an + ANSI feature. + +Wed Aug 11 10:10:02 1999 Yukihiro Matsumoto + + * parse.y (yylex): parse `[].length==0' as `([].length)==0', not + `([].length=)=0' + + * parse.y (yylex): parse `[].length!=0' as `([].length)!=0', not + `([].length!)=0' + + * parse.y (peek): peek-in lexical buffer. + +Wed Aug 11 00:34:05 1999 Yukihiro Matsumoto + + * regex.c (re_match): bug on backward jump adjustment concerning + stop_paren. + +Tue Aug 10 14:54:25 1999 Yukihiro Matsumoto + + * ext/nkf/nkf.c (rb_nkf_guess): binary detection was wrong. + +Tue Aug 10 00:07:36 1999 Yukihiro Matsumoto + + * io.c (rb_io_clone): should use CLONESETUP(). + +Mon Aug 9 23:57:07 1999 Yukihiro Matsumoto + + * ruby.h (CLONESETUP): should have copied generic instance + variables too. + +Mon Aug 9 10:46:54 1999 Katsuyuki Komatsu + + * ext/socket/extconf.rb: add check for and + . + +Sat Aug 7 13:19:06 1999 EGUCHI Osamu + + * numeric.c (flo_cmp): comparing NaN should not return value. + raises FloatDomainError. + +Sat Aug 7 03:09:08 1999 Yukihiro Matsumoto + + * eval.c (blk_free): free copied frames too. + + * eval.c (frame_dup): should copy previous frames from stack to + heap to preserve frame information. + +Fri Aug 6 15:01:07 1999 Yukihiro Matsumoto + + * version 1.3.7 - version 1.4 beta + + * ext/socket/socket.c (s_recv): UDPsocket#recvfrom now returns + IPsocket#addr information. + + * array.c (rb_ary_subary): ary[-3,3] should not return nil. + +Thu Aug 5 10:58:01 1999 Yukihiro Matsumoto + + * eval.c (thread_mark): protect old ruby_frame from GC during it + replaced by eval(). + + * eval.c (eval): do not modify frame.prev; binding should preserve + information about calling() too. + + * eval.c (rb_yield_0): no arity check for mere yield; but only for + Proc#call. + +Tue Aug 3 22:07:13 1999 Kazuhiro HIWADA + + * object.c (rb_mod_clone): should check if iv_tbl, m_tbl are + initialized. + +Tue Aug 3 19:03:02 1999 Yukihiro Matsumoto + + * hash.c (rb_any_cmp): use rb_with_disable_interrupt() to ensure + clearance of rb_prohibit_interrupt even on failure. + + * eval.c (rb_with_disable_interrupt): new function added. + +Sat Jul 31 23:23:44 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_create_0): set THREAD_RAISED flag on thread + termination by exception. + + * eval.c (rb_thread_join): `$!' may not be nil for the threads + created in rescue clause. + + * eval.c (rb_thread_status): ditto. + + * eval.c (rb_thread_join): should re-raise exception for already + dead threads too. + +Fri Jul 30 17:56:54 1999 GOTO Kentaro + + * object.c (rb_mod_ge): wrong comparison. + +Fri Jul 30 12:15:44 1999 Katsuyuki Komatsu + + * ext/tcltklib/extconf.rb: win32 support. + + * lib/mkmf.rb: use append_library(). + + * ext/extmk.rb.in: ditto. + +Fri Jul 30 02:11:48 1999 Yukihiro Matsumoto + + * array.c (rb_ary_delete): should return nil for deleting non + existing item. + + * io.c (rb_io_close): call rb_sys_wait() on explicit close. + + * io.c (rb_io_fptr_close): do not call rb_sys_wait() on finalize. + + * eval.c (yield_under_i): cbase context should be maintained for + Module#module_eval(). suggested by . + +Wed Jul 28 01:18:28 1999 WATANABE Hirofumi + + * Makefile.in: add -I$(hdrdir)/lib to install using ftools. + + * util.c: use HAVE_FCNTL_H, not HAVE_FCNTL + +Wed Jul 28 18:24:45 1999 Yukihiro Matsumoto + + * version 1.3.6 - version 1.4 alpha + +Tue Jul 27 09:38:08 1999 EGUCHI Osamu + + * eval.c (rb_eval): reduce recursive rb_eval() calls by + NODE_BLOCKs. + +Tue Jul 27 01:20:40 1999 WATANABE Hirofumi + + * file.c (rb_file_s_expand_path): drive letter patch. + +Mon Jul 26 02:36:31 1999 Shugo Maeda + + * eval.c (rb_load): should clear ruby_nerr. + + * eval.c (rb_thread_join): oldbt should not be empty to unshift. + +Sun Jul 25 12:09:16 1999 Koji Arai + + * dir.c (push_braces): should treat nested braces. + +Fri Jul 23 02:49:49 1999 Yukihiro Matsumoto + + * hash.c (rb_hash_clear): dummy argument added; suggested by + . thanks. + +Thu Jul 22 19:37:22 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_join): get_backtrace() may return Qnil. + typecheck added. + +Tue Jul 20 14:36:43 1999 WATANABE Hirofumi + + * range.c (range_each): do not treat String specially (for future + override). + +Tue Jul 20 02:28:34 1999 Yukihiro Matsumoto + + * io.c (rb_gets): $_ should be nil, when get returns nil. + + * io.c (rb_f_gets): ditto. + +Mon Jul 19 17:13:09 1999 Yukihiro Matsumoto + + * regex.c (re_compile_fastmap): should continue fastmap compile + for anychar_repeat, for it's repeat anyway. + +Mon Jul 26 13:33:45 1999 WATANABE Hirofumi + + * lib/jcode.rb: replaced by faster code. + +Mon Jul 19 01:57:28 1999 Yukihiro Matsumoto + + * lib/mkmf.rb: no longer use install program. + + * ext/extmk.rb.in: use miniruby to install programs. + +Sat Jul 17 00:06:21 1999 Yukihiro Matsumoto + + * ext/socket/socket.c (ipaddr): don't do reverse lookup if + attribute do_not_reverse_lookup is set for socket classes. + Experimental. Note this is a global attribute. + +Fri Jul 16 22:18:29 1999 Yukihiro Matsumoto + + * io.c (rb_io_eof): use feof() to check EOF already met. + + * io.c (read_all): should return nil at EOF. + +Fri Jul 16 13:39:42 1999 Wakou Aoyama + + * lib/telnet.rb: version 0.231. + +Fri Jul 16 10:58:22 1999 WATANABE Tetsuya + + * regex.c (re_match): debug print removed. + +Fri Jul 16 09:58:15 1999 Katsuyuki Komatsu + + * many files: clean up unused variables found by gcc -Wall. + + * lib/mkmf.rb: better cygwin support etc. + + * ext/extmk.rb.in: ditto. + + * instruby.rb: ditto. + +Fri Jul 16 01:37:50 1999 Koji Arai + + * string.c (rb_str_squeeze_bang): the type of local variable `c' + should be int, not char. + + * string.c (rb_str_reverse): should always return copy. + +Thu Jul 15 23:25:57 1999 NAKAMURA, Hiroshi + + * lib/debug.rb: better display & frame treatment. + +Thu Jul 15 21:16:41 1999 Yukihiro Matsumoto + + * array.c (rb_ary_each): returns self for normal termination; + returns nil for break. + + * string.c: non bang methods (e.g. String#sub) should always + return copy of the receiver. + +Thu Jul 15 21:09:15 1999 Masaki Fukushima + + * eval.c (find_file): do not add empty string to the path. + + * configure.in (with-search-path): should not add empty string if + the option is not supplied. + +Thu Jul 15 17:49:08 1999 Ryo HAYASAKA + + * ext/tcltklib/tcltklib.c: move `#include "ruby.h"' forward. + +Thu Jul 15 16:54:16 1999 Yukihiro Matsumoto + + * version 1.3.5 - version 1.4 alpha + +Wed Jul 14 23:45:33 1999 Katsuyuki Komatsu + + * eval.c (ruby_init): initialize for the first time only. + +Tue Jul 13 00:15:19 1999 Yukihiro Matsumoto + + * hash.c (rb_hash_index): re-defined; method to retrieve a key + from the value. + + * hash.c (Init_Hash): member? should be re-defined for Hash. + +Tue Jul 12 13:54:51 1999 EGUCHI Osamu + + * io.c (rb_file_sysopen): wrong number of argument. + +Mon Jul 12 11:52:35 1999 Yukihiro Matsumoto + + * eval.c (rb_f_missing): class name included in message. + + * eval.c (print_undef): better error message. + +Sun Jul 11 05:36:17 1999 NAKAMURA, Hiroshi + + * lib/debug.rb: patch to show proper position. + +Fri Jul 9 23:56:14 1999 WATANABE Hirofumi + + * dln.c (dln_find_1): path conv. moved to conv_to_posix_path. + + * dln.c (conv_to_posix_path): path conv. should be done. + +Fri Jul 9 10:26:47 1999 WATANABE Hirofumi + + * random.c (RANDOM_NUMBER): should place parentheses. + +Fri Jul 8 11:00:51 1999 Shugo Maeda + + * numeric.c (fix_div): division may be out of fixnum range. + + * bignum.c (bigdivmod): proper sign calculation to result. + +Wed Jul 7 18:27:41 1999 Yukihiro Matsumoto + + * st.c (st_delete_safe): was modifying wrong slot. + +Mon Jul 5 13:17:46 1999 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): close all files at exit. + +Fri Jul 2 18:00:21 1999 Minero Aoki + + * lib/Mail/README: Mail-0.3.0 added to the distribution. + +Fri Jul 2 01:45:32 1999 Yukihiro Matsumoto + + * regex.c (re_compile_fastmap): avoid allocation of register + variables for each invocation of re_match(). Suggested by + Zasukhin Ruslan . Thanks. + +Tue Jun 29 20:39:24 1999 Koji Arai + + * ext/tk/lib/tk.rb (TkVariable): bug fix; should value type check + be added? + + * string.c (rb_str_each_line): a bug in paragraph mode. + + * ruby.c (load_file): shifted too much to skip #!. + +Tue Jun 29 06:50:21 1999 Wakou Aoyama + + * lib/CGI.rb: 0.30 - cleanup release, incompatible. + + * lib/telnet.rb: 0.22 - timeout added. + +Tue Jun 29 10:49:25 1999 SHIROYAMA Takayuki + + * configure.in: better Rhapsody support. + + * lib/mkmf.rb: Rhapsody/NEXTSTEP support. + +Tue Jun 29 01:42:13 1999 Yukihiro Matsumoto + + * ext/pty/pty.c (chld_changed): should use POSIX.1 style wait. + +Mon Jun 28 21:07:36 1999 KIMURA Koichi + + * ext/extmk.rb.nt: wrong result for have_library(). + +Mon Jun 28 15:24:05 1999 Yukihiro Matsumoto + + * missing/isinf.c: OSF/1 raises SIGFPE on one()/zero(). + + * regex.c (re_search): should search til EOS, for patterns may + match beyond the end of range. + +Mon Jun 28 12:49:12 1999 Yukihiro Matsumoto + + * io.c (rb_f_select): should not accept Time objects as an + argument for it is time interval. + + * process.c (rb_f_sleep): ditto. + + * file.c (test_s): should return nil for false condition. + +Mon Jun 28 12:23:52 1999 Katsuyuki Komatsu + + * bignum.c (rb_dbl2big): typo. + + * file.c (rb_f_test): ditto. + + * string.c (rb_str_crypt): wrong message. + +Sun Jun 27 19:50:11 1999 Tadayoshi Funaba + + * eval.c (rb_f_exit): should have treat signed integer status, not + VALUE. + + * process.c (rb_f_exit_bang): should work like exit(). + +Sun Jun 27 16:21:32 1999 WATANABE Hirofumi + + * string.c (rb_str_rindex): wrong position to search. + +Sat Jun 26 04:05:30 1999 Takaaki Tateishi + + * configure.in (configure_args): --with-search-path to specify + additional ruby search path. + + * ruby.c (ruby_prog_init): additional search path. + +Fri Jun 25 13:09:12 1999 Yukihiro Matsumoto + + * pack.c (pack_unpack): needed to initialize natint. + + * regex.c (re_compile_pattern): add start_paren to avoid too much + finalization on maybe_finalize_jump. + +Fri Jun 25 13:07:20 1999 Koji Oda + + * missing/isinf.c: include "config.h" added. + +Fri Jun 25 07:25:05 1999 Katsuyuki Komatsu + + * lib/mkmf.rb: initialize $(topdir). + + * ext/extmk.rb.in (install_rb): install lib/*.rb properly. + + * configure.in (linux): specifies -rpath on --enable-shared. + + * configure.in (aix): ruby.imp must reside in $(topdir). + +Thu Jun 24 19:11:29 1999 Yoshida Masato + + * parse.y (rb_str_extend): multi-byte identifier in expression + interpolation in strings. + + * parse.y (yylex): support multi-byte char identifiers. + +Thu Jun 24 15:27:13 1999 Yukihiro Matsumoto + + * parse.y (f_arg): check duplicate argument names. + + * gc.c (rb_gc_mark): marking wrong member for NODE_ARGS. + + * string.c (rb_str_rindex): POSITION specifies start point, not + end point. + +Thu Jun 24 13:00:17 1999 Yukihiro Matsumoto + + * regex.c (print_mbc): wrong boundary. + + * pack.c (uv_to_utf8): raises ArgError for too big value. + +Thu Jun 24 11:02:51 1999 Yoshida Masato + + * pack.c (uv_to_utf8): mask needed. + +Wed Jun 23 21:03:56 1999 Tadayoshi Funaba + + * ruby.h (struct RFile): remove iv_tbl from struct. instance + variables are handled as generic ivs. + +Wed Jun 23 22:06:26 1999 Tadayoshi Funaba + + * pack.c (utf8_to_uv): pack to 7 bytes sequence. + + * pack.c (uv_to_utf8): wrong boundary. + + * pack.c (pack_unpack): should treat as unsigned long. + +Wed Jun 23 15:10:11 1999 Inaba Hiroto + + * parse.y (parse_string): failed to parse nested braces. + + * parse.y (parse_regx): nested braces within #{} available. + +Wed Jun 23 11:18:38 1999 Yukihiro Matsumoto + + * regex.c (slow_search): wrong shift width for mbcs. + + * eval.c (rb_thread_save_context): should not clear th->locals. + +Wed Jun 23 02:06:14 1999 Yukihiro Matsumoto + + * parse.y (yylex): UMINUS binds too tight with digits. changed so + that -2**2 => -4. + + * parse.y (close_paren): `do' for expr termination now works it + used to be. + +Wed Jun 22 18:26:42 1999 Koji Arai + + * pack.c (pack_pack): should initialize local variable `j'. + +Wed Jun 22 15:24:59 1999 Koji Arai + + * parse.y (here_document): a bug for multiline heredoc. + +Tue Jun 22 15:06:36 1999 WATANABE Hirofumi + + * ext/socket/socket.c (ruby_socket): forgot to return fd + explicitly. + +Tue Jun 22 13:34:12 1999 Yukihiro Matsumoto + + * rubyio.h (MakeOpenFile): should initialize member `iv_tbl'. + +Wed Jun 22 10:35:51 1999 Katsuyuki Komatsu + + * io.c (rb_io_gets_internal): getc(3) may not set errno on + interrupt. + +Mon Jun 21 22:39:28 1999 Yukihiro Matsumoto + + * eval.c (call_required_libraries): ruby_sourceline should be + cleared before loading libraries. + + * io.c (set_stdin): do not use reopen(), so that we don't need to + dup original stdin before assigning $stdin. + +Mon Jun 21 18:04:27 1999 Ryo HAYASAKA + + * ext/dbm/dbm.c: include for solaris 2.6. + +Mon Jun 21 15:59:47 1999 Nobuyoshi Nakada + + * ext/socket/socket.c (ip_addrsetup): forgot to put `else'. + +Mon Jun 21 15:38:37 1999 Yukihiro Matsumoto + + * io.c (fptr_finalize): remove rb_syswait() invocation to avoid + wait4(2) within GC. rb_syswait() moved to rb_io_fptr_close(). + +Mon Jun 21 12:05:59 1999 Tadayoshi Funaba + + * dir.c (dir_s_glob): remove MAXPATHLEN restriction. + + * ext/md5/md5init.c (md5_hexdigest): should have used "%02x". + +Sun Jun 20 19:50:38 1999 Minero Aoki + + * string.c (rb_str_each_line): should have checked string + boundary. + +Sat Jun 19 22:24:12 1999 Kenji Nagasawa + + * OS/2 patch improved. + +Fri Jun 18 08:30:17 1999 Yukihiro Matsumoto + + * marshal.c (r_byte): add data length check. + + * ext/tcltklib/tcltklib.c (_timer_for_tcl): was doing busy-wait. + +Tue Jun 15 10:01:21 1999 Katsuyuki Komatsu + + * configure.in: remove trailing slash from interpreter embedded + shared library path. + + * configure.in (INSTALL_DLLIB): install shared lib with 0555. + + * instruby.rb: changed mode for shared library into 0555. + +Fri Jun 11 23:27:00 1999 Tadayoshi Funaba + + * ext/etc/etc.c (etc_passwd): should return nil, not exception for + call after last passwd entry. + +Fri Jun 11 15:21:21 1999 Yukihiro Matsumoto + + * gc.c (rb_gc_mark_locations): add safety margin 1. + + * eval.c (ruby_run): should protect toplevel node tree. + + * ext/etc/etc.c (etc_group): dumps core if there's no more group. + +Fri Jun 11 01:50:25 1999 Yukihiro Matsumoto + + * eval.c (ruby_run): Init_stack() was called too late; local + variables happened to be higher (or lower) than stack_start. + +Thu Jun 10 16:41:48 1999 Yukihiro Matsumoto + + * io.c: do not call `initialize' for IO objects. So with Array, + Hash, Range, and Time objects. + + * ext/curses/curses.c (curses_getch): made thread aware using + rb_read_check(). + + * ext/curses/curses.c (window_getch): ditto. + + * ext/curses/curses.c (curses_getstr): made (partially) thread + aware using rb_read_check(). + + * ext/curses/curses.c (window_getstr): ditto. + + * io.c (rb_read_check): new function to help making something + (like extension libraries) thread aware. + + * eval.c (is_defined): `defined? super' should be true even for + private superclass methods. + +Fri Jun 10 13:42:10 1999 Koji Arai + + * pack.c (pack_pack): template `Z' should be allowed. + +Wed Jun 9 13:26:38 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_loading): modified to avoid nested race + condition of require(). + + * ext/tcltklib/tcltklib.c (ip_invoke): queue invocation on non + main threads. + + * ext/tcltklib/tcltklib.c (lib_mainloop): flush invocation + queues periodically. + + * version.c (ruby_show_version): now print the message to stdout. + + * version.c (ruby_show_copyright): ditto. + +Tue Jun 8 00:00:34 1999 Yukihiro Matsumoto + + * pack.c (pack_unpack): append sentinel (NUL) to the string. + + * ext/md5/md5init.c (md5_hexdigest): new method to obtain + printable hash string. + + * ext/md5/md5init.c (md5_update): should return self. + + * pack.c (pack_pack): undocumented template 'U' for UTF8. + + * pack.c (pack_unpack): ditto. + + * marshal.c (r_byte): should replace getc() with rb_getc(). + + * io.c (rb_getc): getc() replacement uses READ_DATA_PENDING() and + rb_thread_wait_fd(). + +Mon Jun 7 23:23:38 1999 Yukihiro Matsumoto + + * object.c (rb_mod_clone): should call CLOSESETUP(). + + * eval.c (bind_clone): should call CLONESETUP() for new clone. + +Sat Jun 5 10:32:40 1999 Yukihiro Matsumoto + + * string.c (rb_str_oct): binary (e.g. 0b10111) support. + + * variable.c (rb_const_set): raise warning, not exception. + + * parse.y (yycompile): initialize parser internal variables. + + * parse.y (close_paren): set lex_state to EXPR_PAREN after closing + parenthesis. + + * parse.y (yylex): returns kDO for `do' right after method_call. + +Thu Jun 3 11:05:30 1999 WATANABE Hirofumi + + * regex.c (read_backslash): should decode \b within class. + +Thu Jun 3 01:06:18 1999 Katsuyuki Komatsu + + * dln.c (dln_load): AIX improvement (aix_findmain removed). + +Wed Jun 2 00:41:31 1999 Yukihiro Matsumoto + + * pack.c (pack_unpack): new undocumented template Z which strips + stuff after first null. + + * pack.c (pack_pack): should preserve specified length of the + resulting string. + +Tue Jun 1 15:29:33 1999 Yukihiro Matsumoto + + * ext/socket/socket.c (ruby_socket): retry after GC, if socket(2) + failed on EMFILE or ENFILE. + + * ext/socket/socket.c (sock_s_socketpair): ditto. + + * eval.c (module_setup): need to add PUSH_VAR/POP_VAR to clear + dyna vars link list. + + * version.h (RUBY_RELEASE_CODE): integer macro constant for source + version detection. + +Sun May 30 22:19:12 1999 Kenji Nagasawa + + * ext/socket/socket.c: emx/gcc 0.9d now fixes things about + AF_UNIX. + + * process.c: OS/2 EMX kludge. + + * Makefile.in (strncasecmp.o): added dependency. + +Mon May 31 16:06:28 1999 Yukihiro Matsumoto + + * version 1.3.4 - preliminary release for 1.4 + +Mon May 31 15:57:41 1999 Yukihiro Matsumoto + + * io.c (rb_io_fptr_close): close on IO which main_thread is + waiting cause serious exception, that vanishes the actual fd + closing. Invocation of rb_thread_fd_close() is deferred + a little. + +Sat May 29 18:27:13 1999 Koji Arai + + * regex.c (re_match): stack boundary check needed. + +Sat May 29 12:27:00 1999 Yukihiro Matsumoto + + * ext/tcltklib/tcltklib.c (ip_invoke): proper ref count management + to avoid leak. I HATE REF COUNTING!! + + * eval.c (ruby_run): moved ruby_require_libraries() to handle `-r' + from ruby_options() to avoid stack corruption for threads + created in libraries. + +Sat May 29 02:22:12 1999 Yukihiro Matsumoto + + * eval.c (rb_yield_0): when `for' appeared in blocks, it + introduced new scope for local variables. + +Fri May 28 17:16:49 1999 Yukihiro Matsumoto + + * string.c (rb_str_squeeze_bang): squeeze AND of the arguments. + UNDOCUMENTED. + + * string.c (rb_str_count): new UNDOCUMENTED method. + + * string.c (rb_str_delete_bang): delete AND of the arg ranges. + UNDOCUMENTED FEATURE for 1.3.x. + + * ext/socket/socket.c (setipaddr): re-wrote using ip_addrsetup(). + + * ext/socket/socket.c (ip_addrsetup): decode symbolic address + . + +Thu May 27 12:27:42 1999 Yukihiro Matsumoto + + * string.c (tr_trans): should handle NUL (\0) within strings. + +Tue May 25 16:45:11 1999 Yukihiro Matsumoto + + * io.c (rb_f_syscall): syscall may return values other than zero + on success. + + * regex.c (re_match): handle empty loop properly (hopefully). + + * regex.c (re_match): remove empty group check, because it does + not help non-grouping parentheses (?:..). + + * regex.c (re_compile_fastmap): treating try_next, finalize_push + wrong way. + + * regex.c: remove some obsolete functions such as + group_match_null_string_p(). + +Mon May 24 14:47:54 1999 Yukihiro Matsumoto + + * regex.c (read_backslash): read backslash by regex. + +Sun May 23 19:44:58 1999 WATANABE Hirofumi + + * ext/pty/pty.c (getDevice): portability patch. + +Fri May 21 23:01:26 1999 Katsuyuki Komatsu + + * ext/socket/getaddrinfo.c (GET_AI): should set error code. + +Thu May 20 03:43:44 1999 Jun-ichiro itojun Hagino + + * ext/socket/socket.c: you should use sockaddr_storage to handle + IPv6 addresses. + + * ext/socket/getaddrinfo.c (getaddrinfo): prevent retrieving + AF_INET6 address if hints.ai_flags == AI_PASSIVE. + +Wed May 19 12:27:07 1999 Yukihiro Matsumoto + + * eval.c (exec_end_proc): should protect exceptions. + + * gc.c (run_final): ditto. + + * parse.y (f_rest_arg): allow just * for rest arg. + + * parse.y (mlhs_basic): allow * without formal argument. + + * regex.c (re_match): the variable `part' should be initialized. + +Tue May 18 15:25:45 1999 Yukihiro Matsumoto + + * regex.c (re_search): a bug in range adjustment. + +Tue May 18 11:35:59 1999 WATANABE Hirofumi + + * dln.c (conv_to_posix_path): path_len argument added. + +Mon May 17 12:26:31 1999 Yukihiro Matsumoto + + * numeric.c (fix_rev): should treat Fixnum as signed long. + + * eval.c (massign): add strict number check for yield (and call). + + * eval.c (proc_arity): new method to return number of arguments. + + * eval.c (method_arity): new method to return number of arguments. + + * parse.y (read_escape): char may be unsigned. + + * string.c (rb_str_succ): ditto. + + * string.c (tr_trans): ditto. + + * object.c (Init_Object): methods `&', `|', `^' are added to nil. + + * range.c (rb_range_beg_len): it should be OK for [0..-len-1]. + + * regex.c (re_search): search for byte literal within mbcs. + + * regex.c (is_in_list): parsh + + * regex.c (re_compile_fastmap): should have not alter the loop + variable `j' if TRASLATE_P(). + + * regex.c (re_compile_pattern): escaped characters should be read + by PATFETCH_RAW(c). + +Sat May 15 11:23:51 1999 Yukihiro Matsumoto + + * regex.c (re_match): endline2 (\Z) should not match at the point + between a newline and end-of-line, like endline ($). + + * class.c (include_class_new): should initialize iv_tbl to share + between module and iclass. + +Fri May 14 08:50:27 1999 Akira Endo + + * regex.c (re_compile_fastmap): it should be k != 0 to skip. + +Fri May 14 12:46:56 1999 Yukihiro Matsumoto + + * time.c (time_load): a bug in old marshal format support. + + * instruby.rb: make site_ruby directory. + +Fri May 14 10:18:02 1999 WATANABE Tetsuya + + * regex.c (re_match): a bug in inline `.*' etc. + +Fri May 14 09:58:46 1999 Minero Aoki + + * ruby.c (addpath): should have specified string length. + +Thu May 13 10:40:44 1999 Yukihiro Matsumoto + + * eval.c (rb_eval_string_wrap): new function. + + * regex.c (re_compile_pattern): POSIX line match should alter + behavior for `^' and `$' to begbuf and endbuf2 respectively. + + * ext/pty/pty.c: un-ANSI-fy function arguments. + +Wed May 12 14:19:38 1999 Yukihiro Matsumoto + + * struct.c (iv_get): in case of inheritance of generated struct + class, __member__ and __size__ should also be inherited. + Thanks for Pros Yeboah . + + * io.c (rb_f_gets_internal): should check number of arguments + before checking rb_rs == rb_default_rs. Thanks for Koji Arai + . + +Tue May 11 08:29:28 1999 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): .?, .+ did not work. + +Mon May 10 00:59:33 1999 Yukihiro Matsumoto + + * lib/jcode.rb: forgot to squeeze on reverse (complement) case. + + * string.c (tr_squeeze): should not set modify flag to be honest, + if the string is not modified. + + * signal.c (Init_signal): SIGTERM should not be handled. + + * regex.c (re_match): seeking for longest match is now optional, + which can be set using RE_OPTION_POSIXMATCH. This satisfies + POSIX longest match as much as Emacs's posix-* functions, which + are known to be incomplete. + +Sun May 9 13:04:01 1999 Katsuyuki Komatsu + + * ext/socket/socket.c (sock_s_getaddrinfo): conversion from + Fixnums to C integers needed. + +Sun May 9 11:51:43 1999 Koji Arai + + * range.c (range_eqq): reverse condition. + + * range.c (range_s_new): default should be end inclusive. + +Sat May 8 03:27:51 1999 Yukihiro Matsumoto + + * ext/socket/socket.c (thread_connect): replace nasty + rb_thread_fd_writable() with rb_thread_select(). + +Fri May 7 20:49:00 1999 Katsuyuki Komatsu + + * ext/socket/getaddrinfo.c (inet_pton): wrong parameter to + inet_aton(). + + * ext/socket/addrinfo.h (__P): silly cut and paste typo. + +Fri May 7 17:03:57 1999 Yukihiro Matsumoto + + * dir.c (glob): removed GPL'ed glob.c completely. + +Fri May 7 08:17:19 1999 Yukihiro Matsumoto + + * ext/sdbm/extconf.rb: sdbm extension added to the distribution. + +Fri May 7 01:42:20 1999 Yukihiro Matsumoto + + * ext/socket/socket.c (tcp_s_gethostbyname): avoid using struct + sockaddr_storage. + +Thu May 6 13:21:41 1999 Yukihiro Matsumoto + + * array.c (rb_ary_indexes): should not use rb_ary_concat(). + +Thu May 4 12:34:18 1999 Koji Arai + + * parse.y (parse_string): there should be newline escape by + backslashes in strings. + + * parse.y (parse_qstring): ditto. + +Mon May 3 04:37:20 1999 Koji Arai + + * ext/tcltklib/extconf.rb: better search for libX11. + + * range.c (range_s_new): embarrassing =/== typo. + + * re.c (Init_Regexp): failed to set default kcode. + +Mon May 3 02:39:55 1999 WATANABE Tetsuya + + * ext/socket/socket.c (open_inet): typo (res and res0). + +Tue May 4 02:07:49 1999 Yukihiro Matsumoto + + * mkconfig.rb: leave undefined $(VARIABLE) unexpanded in the + Config::CONFIG hash table. + +Mon May 3 09:37:22 1999 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): expand exactn{n} at compile time. + handles stop_paren specially. + + * regex.c (re_compile_pattern): expand x{n} at compile time. + + * regex.c (re_search): posix line match should be checked. + + * regex.c (re_search): a bug in anchor condition. + +Fri Apr 30 18:57:41 1999 Yukihiro Matsumoto + + * version 1.3.3 + + * string.c (rb_str_rindex): position should be END point, not + START point. + + * re.c (rb_reg_search): pos means end point on reverse now. + + * array.c (rb_ary_s_create): should clear ary->ptr to avoid + potential gc crash. + +Fri Apr 30 15:24:58 1999 Yukihiro Matsumoto + + * ext/socket/addrinfo.h: compatibility hack for ipv4. + + * ext/socket/socket.c: itojun's ipv6 patches applied. + + * ext/socket/extconf.rb: detect ipv6 features based on itojun's + ipv6 patches. + + * ext/extmk.rb.in (enable_config): can handle --enable-xxx now. + + * lib/mkmf.rb (enable_config): ditto. + +Fri Apr 30 05:22:23 1999 Shugo Maeda + + * string.c (rb_str_aset): last index should not append. + +Thu Apr 29 18:55:31 1999 WATANABE Hirofumi + + * dln.c (conv_to_posix_path): remove const from args. + + * ruby.c (rubylib_mangle): remove Fatal(), the obsolete function. + +Tue Apr 27 14:11:45 1999 Yukihiro Matsumoto + + * parse.y (fname): lazy workaround for keywords did not work well. + + * ext/extmk.rb.in: `--with-xxx=yyy' argument configuration. + + * lib/mkmf.rb: ditto. + + * misc/ruby-mode.el: forgot to handle $`. + + * ext/extmk.rb.in: better AIX link support proposed by + . + +Mon Apr 26 16:46:59 1999 Yukihiro Matsumoto + + * ext/extmk.rb.in: AIX shared library support modified. + + * ext/aix_mksym.rb: ditto. + + * configure.in: ditto. + + * sprintf.c (rb_f_sprintf): should allocate proper sized buffer + for float numbers. + +Sat Apr 24 00:00:16 1999 Yukihiro Matsumoto + + * parse.y (operation): syntax like `a.[]=(1,2)' is allowed. + +Fri Apr 23 23:54:09 1999 Yukihiro Matsumoto + + * io.c (argf_binmode): binmode method added to ARGF. + +Fri Apr 23 13:55:22 1999 Yukihiro Matsumoto + + * string.c (rb_f_chomp): should assign the result to $_. or maybe + sub/gsub/chop/chomp should NOT assign $_ altogether. + +Thu Apr 22 16:50:54 1999 Yukihiro Matsumoto + + * eval.c (rb_callcc): call scope_dup() for all scopes in + the interpreter stack. + +Tue Apr 20 11:24:18 1999 Yukihiro Matsumoto + + * string.c (rb_str_dump): `#' should be escaped. + +Tue Apr 20 02:32:42 1999 Yukihiro Matsumoto + + * parse.y (parse_regx): option /p for posix match added. + + * re.c (rb_reg_desc): did not print options properly. + + * io.c (rb_file_s_open): initialize was called twice. + +Mon Apr 19 18:56:21 1999 Yukihiro Matsumoto + + * configure.in (DEFAULT_KCODE): can specify default code for + $KCODE by --with-default-kcode=(euc|sjis|utf8|none). + + * regex.c (IS_A_LETTER): a byte sequence shorter than mbc should + not match with \w etc. + +Mon Apr 19 13:49:11 1999 Yukihiro Matsumoto + + * eval.c (eval): should restore ruby_dyna_vars. + +Fri Apr 16 21:40:43 1999 Nobuyoshi Nakada + + * io.c (f_backquote): pipe_open may return nil. + + * io.c (f_open): rb_io_open may return nil. + + * io.c (io_s_foreach): ditto. + + * io.c (io_s_readlines): ditto. + + * io.c (io_defset): wrong message. + +Fri Apr 16 15:09:20 1999 Yukihiro Matsumoto + + * bignum.c (rb_str2inum): strtoul() returns long, not int. + + * eval.c (rb_load): size of VALUE and ID may be different. + + * util.c (mmprepare): int is too small to cast from pointers. + + * config.guess: avoid 'linux-gnu' for alpha-unknown-linux. + +Thu Apr 15 23:46:20 1999 WATANABE Hirofumi + + * ruby.c (rubylib_mangle): mangle path by RUBYLIB_PREFIX. + +Wed Apr 14 23:52:51 1999 SHIROYAMA Takayuki + + * node.h (NODE_LMASK): should be long to avoid overflow. + +Wed Apr 14 13:14:35 1999 Katsuyuki Komatsu + + * dln.c: AIX dynamic link. + + * ext/aix_ld.rb: ditto. + +Wed Apr 14 12:19:09 1999 Yukihiro Matsumoto + + * lib/thread.rb: Queue#{enq,deq} added. + +Tue Apr 13 17:43:56 1999 Yukihiro Matsumoto + + * hash.c (rb_hash_s_create): Hash::[] acts more like casting. + +Tue Apr 13 00:33:52 1999 Yukihiro Matsumoto + + * io.c (rb_io_stdio_set): warning for assignment to the variables + $std{in,out,err}. + +Mon Apr 12 23:12:32 1999 Yukihiro Matsumoto + + * io.c (rb_io_reopen): check for reopening same IO. + +Fri Apr 9 17:45:11 1999 Yukihiro Matsumoto + + * parse.y (rb_compile_string): bug for nested eval(). + + * regex.c (re_match): should pop non-greedy stack items on + failure, after best_regs are fixed. + +Thu Apr 8 17:30:40 1999 Yukihiro Matsumoto + + * pack.c (PACK_LENGTH_ADJUST): need to adjust for `*' length. + +Tue Apr 6 23:28:44 1999 Yukihiro Matsumoto + + * parse.y (void_check): add void context checks. + +Mon Apr 5 12:23:42 1999 Yukihiro Matsumoto + + * time.c (time_s_at): should copy gmt-mode. + + * eval.c (eval_node): preserve ruby_eval_tree. + +Fri Apr 2 14:00:34 1999 NAKAMURA, Hiroshi + + * lib/debug.rb: wrong command interpreting. + +Fri Apr 2 11:46:22 1999 Yukihiro Matsumoto + + * version 1.3.2 + +Fri Apr 2 10:40:04 1999 Yukihiro Matsumoto + + * io.c (rb_io_s_pipe): forgot to define IO::pipe. + +Thu Apr 1 14:40:46 1999 Yukihiro Matsumoto + + * eval.c (assign): modified for rhs change. + + * parse.y (stmt): unparenthesisized method calls can be right hand + side expression of the assignment. + +Sat Mar 27 22:42:47 1999 Koji Arai + + * ext/nkf/nkf.c (rb_nkf_kconv): check size output_ctr before + decrement. + +Thu Mar 25 09:11:03 1999 Yukihiro Matsumoto + + * time.c (time_s_at): preserve gmt-mode for result. + + * parse.y (rb_compile_string): do not use cur_mid, use + compile_for_eval instead. + + * st.c (PTR_NOT_EQUAL): wrong logical condition. + +Wed Mar 24 13:06:43 1999 Yukihiro Matsumoto + + * parse.y (yycompile): should clear cur_mid after compilation. + + * io.c (next_argv): need to check type for ARGV.shift. + + * eval.c (blk_copy_prev): need to preserve outer scope as well as + outer frames. + + * parse.y (rb_compile_string): return can appear within eval(). + +Tue Mar 23 10:15:07 1999 EGUCHI Osamu + + * configure.in: AC_C_CONST check added. + +Tue Mar 23 02:07:35 1999 Yukihiro Matsumoto + + * time.c (time_plus): preserve gmt-mode for result. + +Mon Mar 22 01:32:37 1999 Yukihiro Matsumoto + + * eval.c (rb_eval): adjust line numbers before expression + interpolation within strings. + + * eval.c (rb_eval): defined? returns nil for false condition. + + * numeric.c (num_nonzero_p): returns nil for false condition. + +Sat Mar 20 13:07:43 1999 Keiju Ishitsuka + + * lib/weakref.rb: avoid leak for two weakrefs for one object. + +Fri Mar 19 11:26:45 1999 WATANABE Hirofumi + + * eval.c (ruby_run): needed to eval END{} on exit. + + * eval.c (rb_exit): ditto. + +Fri Mar 19 02:17:27 1999 Yukihiro Matsumoto + + * signal.c (Init_signal): handles terminating signals HUP, TERM, + QUIT, PIPE, etc. + +Thu Mar 18 15:47:18 1999 Yukihiro Matsumoto + + * bignum.c (rb_big_and): bug in sign calculation. + + * bignum.c (rb_big_or): ditto. + + * io.c (rb_f_select): forgot to use to_io to retrieve IO, after + calling select(2). + +Tue Mar 16 19:54:31 1999 WATANABE Hirofumi + + * ext/extmk.rb.in: static linking cause infinite make loop. + +Tue Mar 16 18:50:04 1999 Yoshida Masato + + * ext/socket/socket.c (tcp_s_gethostbyname): typo, not NUM2INT(), + but INT2NUM(). + + * ext/socket/socket.c (mkhostent): ditto. + +Tue Mar 16 12:31:44 1999 Ryo HAYASAKA + + * file.c (utime_internal): suppress warning by const. + + * time.c (time_gmtime): ditto. + +Tue Mar 16 10:23:05 1999 Yukihiro Matsumoto + + * time.c (time_clone): Time object can be cloned. + +Tue Mar 16 03:13:10 1999 Koji Arai + + * ruby.c (load_file): argv[argc] should be NULL. + +Mon Mar 15 22:12:08 1999 Tadayoshi Funaba + + * sprintf.c (rb_f_sprintf): typo in arg_num check at exit. + +Mon Mar 15 16:42:22 1999 Yukihiro Matsumoto + + * array.c (rb_ary_dup): dup2 should copy class too. + +Mon Mar 15 15:12:53 1999 Yasuhiro Fukuma + + * lib/mkmf.rb: install program relative path check. + +Mon Mar 15 14:05:25 1999 Yukihiro Matsumoto + + * re.c (rb_reg_s_new): 2nd argument is now option. + Regexp::EXTENDED can be specified. + +Fri Mar 12 10:47:49 1999 Yukihiro Matsumoto + + * string.c (rb_str_index): str.index("") should always match at + offset point. + + * string.c (rb_str_upto): can specify end point exclusion. + + * string.c (rb_str_index): negative offset. + + * regex.c (re_match): begline should not match at the point + between a newline and end-of-string. endline neither. + + * regex.c (re_compile_pattern): context_indep_anchors . + + * parse.y (parse_regx): need not to push backslashes before + escaped characters. + + * eval.c (rb_thread_join): re-raises exception within target. + +Fri Mar 12 01:09:36 1999 Koji Arai + + * ext/readline/readline.c (readline_s_vi_editing_mode): wrong + number of arguments. + +Fri Mar 12 02:12:50 1999 Yukihiro Matsumoto + + * pack.c (PACK_ITEM_ADJUST): "a".unpack("C3") => [97, nil, nil] + +Thu Mar 11 18:23:50 1999 WATANABE Tetsuya + + * ext/socket/socket.c (Init_socket): UDPsocket was omitted. + +Thu Mar 11 16:43:30 1999 Yukihiro Matsumoto + + * pack.c (PACK_LENGTH_ADJUST): push fixed number of items per + template to result array. + + * pack.c (pack_unpack): I/N/C etc. push nil in the array for "". + +Tue Mar 9 00:19:21 1999 Yukihiro Matsumoto + + * hash.c (ruby_unsetenv): use ruby_setenv(name, 0). + + * hash.c (env_delete): ditto. + + * string.c (rb_str_upto): do not check `beg + + * string.c (rb_str_index): wrong end point calculation. + +Sat Mar 6 02:19:12 1999 Yukihiro Matsumoto + + * re.c (match_index): MatchingData#index(n) added. + + * array.c (rb_ary_subseq): ary[n..-1] returns an sub-array unless + n is too small negative index. + + * re.c (rb_reg_match_method): Regexp#match(str) added. + + * array.c (rb_ary_indexes): understands ranges as indexes. + + * re.c (match_size): MatchingData#size added. + +Fri Mar 5 01:04:57 1999 Yukihiro Matsumoto + + * array.c (rb_ary_fill): modified for range. + + * array.c (rb_ary_aset): a[n..m] revisited. + +Thu Mar 4 14:23:29 1999 Yukihiro Matsumoto + + * string.c (rb_str_subseq): a[n..m] revisited. + + * parse.y (method_call): allow Const::method{}. + + * array.c (rb_ary_replace_method): should replace original array. + +Thu Mar 4 02:30:22 1999 Yukihiro Matsumoto + + * configure.in: remove --disable-thread, thread feature is no + longer optional. + +Thu Mar 4 00:32:17 1999 Yasuhiro Fukuma + + * parse.y (read_escape): wrong arguments for scan_oct,scan_hex. + +Wed Mar 3 11:51:53 1999 Yukihiro Matsumoto + + * ext/socket/socket.c (Init_socket): rename class names as + TCPsocket -> TCPSocket etc. + +Tue Mar 2 19:46:42 1999 WATANABE Hirofumi + + * configure.in (LDSHARED): use gcc -Wl,-G for solaris with gcc. + +Tue Mar 2 17:04:19 1999 Yukihiro Matsumoto + + * parse.y (yylex): backslashes do not concatenate comment lines + anymore. + +Mon Mar 1 14:05:12 1999 Yukihiro Matsumoto + + * eval.c (rb_call0): adjust argv for optional arguments. super + without arguments emit superclass method with the value from + optional arguments. enabled as experiment. + +Sun Feb 28 14:04:07 1999 WATANABE Hirofumi + + * parse.y (nextc): backslash at the eof cause infinite loop + +Sun Feb 28 11:01:26 1999 Tadayoshi Funaba + + * time.c (make_time_t): month range check added. + +Sat Feb 27 02:36:05 1999 Yukihiro Matsumoto + + * re.c (Init_Regexp): add escape as alias of quote. + + * re.c (rb_reg_s_quote): char-code can be specified now. + +Fri Feb 26 18:45:36 1999 Yasuhiro Fukuma + + * eval.c (error_print): bug for error message with newlines. + +Fri Feb 26 12:00:04 1999 Yukihiro Matsumoto + + * time.c (make_time_t): future check modified to allow 1969-12-31 + at certain timezone. + + * time.c (time_arg): year >= 1000 should be past. + + * version.c (Init_version): constant RELEASE_DATE added. + +Fri Feb 26 01:08:30 1999 Yukihiro Matsumoto + + * string.c (rb_str_substr): returns nil for out-of-range access. + + * array.c (rb_ary_subseq): returns nil for out-of-range access. + + * array.c (rb_ary_store): negative index message has changed. + + * string.c (rb_str_aset): reallocation needed. + + * string.c (rb_str_aset): allow char append to the string. + +Thu Feb 25 23:30:17 1999 Tadayoshi Funaba + + * time.c (time_load): tm_year should be packed in 17 bits, not 18. + +Thu Feb 25 12:50:25 1999 Yukihiro Matsumoto + + * missing/dup2.c: replaced by public domain version. + + * time.c (make_time_t): add `future check' in loops. + + * object.c (rb_num2dbl): forbid implicit conversion from nil, or + strings. thus `Time.now + str' should raise error. + + * object.c (rb_Float): convert nil into 0.0. + + * object.c (rb_Integer): conversion method improved. + +Thu Feb 25 03:27:50 1999 Shugo Maeda + + * eval.c (rb_call): should handle T_ICLASS properly. + +Thu Feb 25 00:04:00 1999 Yukihiro Matsumoto + + * error.c (Init_Exception): global function Exception() removed. + + * variable.c (rb_class2name): returns "nil"/"true"/"false" for them. + + * time.c (time_dump): time marshaling format compressed size from + 11 bytes to 8 bytes. thanx to tadf@kt.rim.or.jp. + + * eval.c (rb_obj_call_init): should specify arguments explicitly. + +Wed Feb 24 15:43:28 1999 Yukihiro Matsumoto + + * parse.y (yylex): comment concatenation requires preceding space + before backslash at the end of line. + + * io.c (rb_f_pipe): global pipe is obsolete now. + + * object.c (Init_Object): remove true.to_i, false.to_i. + +Tue Feb 23 14:21:41 1999 Yukihiro Matsumoto + + * parse.y (yylex): warn if identifier! immediately followed by `='. + +Tue Feb 23 12:32:41 1999 WATANABE Hirofumi + + * eval.c (rb_load): tilde expansion moved to find_file. + + * eval.c (find_file): tilde expansion added. + +Tue Feb 23 10:50:20 1999 Yukihiro Matsumoto + + * eval.c (require_method): require can handle multiple fnames. + + * hash.c (rb_hash_foreach_iter): hash key may be nil. + +Mon Feb 22 17:44:02 1999 Yukihiro Matsumoto + + * regex.c (re_match): should not pop failure point on success for + non-greedy matches. + + * io.c (Init_IO): remove global_functions getc, readchar, ungetc, + seek, tell, rewind. + +Sat Feb 20 22:54:26 1999 Yukihiro Matsumoto + + * numeric.c (rb_num2long): no implicit conversion from boolean. + +Sat Feb 20 09:58:42 1999 EGUCHI Osamu + + * numeric.c (flo_to_s): portable Infinity and NaN support. + +Sat Feb 20 07:13:31 1999 WATANABE Tetsuya + + * io.c (rb_file_sysopen): forgot to initialize a local variable. + +Fri Feb 19 23:05:07 1999 Yukihiro Matsumoto + + * string.c (rb_str_subseq): range check changed. + + * marshal.c: increment MARSHAL_MINOR for Time format change. + + * time.c (time_old_load): support old marshal format. + + * time.c (time_load): changed for new format Y/M/D/h/m/s/usec. + + * time.c (time_dump): marshal dump format has changed. + +Fri Feb 19 00:25:57 1999 Yukihiro Matsumoto + + * time.c (time_arg): should reject "sep\0" and such. + + * time.c (time_plus): Time#+ should not receive Time object + operand. + + * string.c (rb_str_substr): negative length raises exception now. + + * array.c (beg_len): if end == -1, it points end of the array. + + * array.c (rb_ary_subseq): negative length raises exception now. + +Thu Feb 18 20:57:04 1999 Tadayoshi Funaba + + * time.c (rb_strftime): strftime() may return 0 on success too. + + * time.c (time_strftime): `\0' within format string should not be + omitted in the result. + + * time.c (rb_strftime): zero length format. + + * time.c (time_to_a): yday start with 1 now. + + * time.c (time_zone): support for long timezone name. + + * time.c (time_yday): yday start with 1 now. + + * time.c (time_minus): minus calculation was wrong. + + * time.c (time_minus): sec, usec should be at least `long', maybe + they should be `time_t'. + + * time.c (time_plus): addition with float was wrong. + + * time.c (time_to_s): support for long timezone name. + + * time.c (time_gm_or_local): too far future check moved. + + * time.c (time_arg): treat 2 digit year as 69-99 => 1969-1999, + 00-68 => 2000-2068 + +Thu Feb 18 03:56:47 1999 Yukihiro Matsumoto + + * missing/fnmatch.c: moved to missing directory. + +Wed Feb 17 16:22:26 1999 Yukihiro Matsumoto + + * struct.c (rb_struct_alloc): actual initialization now be done in + `initialize'. + +Wed Feb 17 09:47:15 1999 okabe katsuyuki + + * regex.c (re_search): use mbclen() instead of ismbchar(). + + * re.c (rb_reg_s_quote): should handle mbchars properly. + +Wed Feb 17 01:25:26 1999 Yukihiro Matsumoto + + * parse.y (yylex): stop comment concatenation by backslash follows + after >= 0x80 char. may cause problem with Latin chars. + + * eval.c (error_print): exception in rb_obj_as_string() caused + SEGV. protect it by PUSH_TAG/POP_TAG. + + * error.c (exc_exception): `Exception#exception' should return self. + +Wed Feb 17 01:12:22 1999 Hirotaka Ichikawa + + * configure.in: BeOS patch. + +Tue Feb 16 14:25:00 1999 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): should reallocate mbc space for + character class unless current_mbctype is ASCII. + +Mon Feb 15 15:48:30 1999 WATANABE Hirofumi + + * configure.in: specify `-Wl,-E' only for GNU ld. + +Mon Feb 15 11:43:22 1999 GOTO Kentaro + + * array.c (rb_inspecting_p): should return Qfalse. + +Sun Feb 14 22:36:40 1999 EGUCHI Osamu + + * sprintf.c (rb_f_sprintf): `%G' was omitted. + +Sun Feb 14 12:47:48 1999 EGUCHI Osamu + + * numeric.c (Init_Numeric): allow divide by zero on FreeBSD. + + * numeric.c (Init_Numeric): FloatDomainError added. + + * configure.in (AC_REPLACE_FUNCS): add checks for functions + isinf, isnan, and finite. + +Sat Feb 13 01:24:16 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_create_0): should protect th->thread. + +Fri Feb 12 16:16:47 1999 Yasuhiro Fukuma + + * string.c (rb_str_inspect): wrong mbc position. + +Fri Feb 12 16:21:17 1999 Yukihiro Matsumoto + + * eval.c (rb_thread_fd_close): + + * io.c (rb_io_fptr_close): tell scheduler that fd is closed. + + * io.c (rb_io_reopen): ditto. + + * io.c (READ_CHECK): check if closed after thread context switch. + + * ext/socket/socket.c (bsock_close_read): do not check + the return value from shutdown(2). + + * ext/socket/socket.c (bsock_close_write): ditto. + + * ext/socket/socket.c (sock_new): need to dup(fd) for close_read + and close_write. + + * parse.y (here_document): handle newlines within #{}. + + * regex.h: should replace symbols for ruby. + +Fri Feb 12 00:46:28 1999 Shugo Maeda + + * marshal.c (r_object): should update the method name in message. + + * marshal.c (w_object): limit should be converted into Fixnum. + +Wed Feb 10 15:20:03 1999 Yukihiro Matsumoto + + * regex.c (re_match): empty pattern should not cause infinite + pattern match loop. + + * regex.c (re_compile_pattern): RE_OPTIMIZE_ANCHOR for /.*/, not + for /(.|\n)/. + + * numeric.c (fix_pow): `fixnum**nil' should raise TypeError. + + * bignum.c (rb_big_pow): need to normalize results. + +Wed Feb 10 01:42:41 1999 EGUCHI Osamu + + * numeric.c (fix_pow): `(5**1).type' should be Integer. + +Tue Feb 9 01:22:49 1999 Yukihiro Matsumoto + + * parse.y (yylex): do not ignore newlines in mbchars. + + * io.c (rb_file_s_open): mode can be specified by flags like + open(2), e.g. File::open(path, File::CREAT|File::WRONLY). + + * io.c (rb_f_open): bit-wise mode flags for pipes + + * io.c (Init_IO): bit flags for open. + +Sat Feb 6 22:56:21 1999 Yukihiro Matsumoto + + * string.c (rb_str_sub_bang): should not overwrite match data by + regexp match within the block. + + * string.c (rb_str_gsub_bang): ditto. + +Sat Feb 6 03:06:17 1999 Yukihiro Matsumoto + + * re.c (match_getter): accessing $~ without matching caused SEGV. + +Fri Feb 5 22:11:08 1999 EGUCHI Osamu + + * parse.y (yylex): binary literal support, like 0b01001. + + * parse.y (yylex): octal numbers can contain `_'s. + + * parse.y (yylex): warns if non-octal number follows immediately + after octal literal. + + * parse.y (yylex): now need at least one digit after prefix such + as 0x, or 0b. + + * bignum.c (rb_str2inum): recognize binary numbers like 0b0101. + +Fri Feb 5 03:26:56 1999 Yasuhiro Fukuma + + * ruby.c (proc_options): -e without program prints error. + +Fri Feb 5 00:01:50 1999 Yukihiro Matsumoto + + * parse.y (terms): needed to clear heredoc_end. + + * numeric.c (flo_div): allow float division by zero. + +Thu Feb 4 11:56:24 1999 Yukihiro Matsumoto + + * missing/strtod.c: for compatibility. + + * configure.in (strtod): add strtod compatible check. + + * numeric.c (rb_num2long): missing/vsnprintf.c does not support + floating points. + + * numeric.c (flo_to_s): ditto. + +Wed Feb 3 23:02:12 1999 Yoshida Masato + + * regex.c (re_compile_pattern): use ismbchar() to get next char. + + * regex.c (re_search): wrong mbchar shift. + + * re.c (rb_reg_search): needed to reset $KCODE after match. + + * regex.c (re_compile_fastmap): mbchars should match with \w. + +Wed Feb 3 22:35:12 1999 EGUCHI Osamu + + * parse.y (yylex): too big float raise warning, not error. + +Tue Feb 2 23:41:42 1999 Yoshida Masato + + * regex.c (re_match): wrong boundary. + + * regex.c (IS_A_LETTER): re_mbctab[c] may not be 1 for mbc. + + * regex.c (re_search): mbchar support for shifting ranges. + + * regex.c (MBC2WC): wrong conversion. + +Wed Feb 3 15:03:16 1999 Yukihiro Matsumoto + + * parse.y (parse_regx): need to escape parens if terminators are + not any kind of parenthesis. + + * parse.y (parse_qstring): ditto. + + * parse.y (parse_string): ditto. + +Tue Feb 2 17:11:26 1999 WATANABE Tetsuya + + * string.c (rb_str_gsub_bang): too small realloc condition. + +Mon Feb 1 10:01:17 1999 EGUCHI Osamu + + * parse.y (yylex): range check for the float literal. + +Sat Jan 30 18:34:16 1999 Yukihiro Matsumoto + + * ruby.c (usage): -h option to show brief command description. + +Sat Jan 30 08:45:16 1999 IKARASHI Akira + + * lib/cgi-lib.rb: cookie support added. + +Sat Jan 30 13:38:24 1999 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): mbchars should match with \w + within character class. Was matching with \W. + + * regex.c (re_match): \w should match with multi byte characters, + not its first byte. + +Sat Jan 30 10:06:41 1999 Yoshida Masato + + * re.c (rb_reg_s_new): UTF-8 flag handle (/u, /U). + + * re.c (rb_kcode): $KCODE handle for UTF-8. + +Sat Jan 30 01:51:16 1999 Yukihiro Matsumoto + + * array.c (rb_ary_delete_if): RTEST() missing. + + * hash.c (delete_if_i): ditto. + + * enum.c (Init_Enumerable): select (=find_all), detect (=find) + added as aliases. + +Fri Jan 29 21:32:19 1999 WATANABE Tetsuya + + * hash.c (rb_f_setenv): SEGV caused by small typo. + +Fri Jan 29 00:15:58 1999 Yukihiro Matsumoto + + * lib/parsedate.rb (parsedate): support date format like + 23-Feb-93, which is required by HTTP/1.1. + + * variable.c (find_class_path): avoid calling rb_iv_set(). + + * eval.c (backtrace): do not need to modify $SAFE internally. + + * variable.c (classname): inline __classid__ access. + + * eval.c (THREAD_ALLOC): needed to initialize wrapper. + + * lib/ftools.rb (makedirs): allows slash at the end of the path. + + * numeric.c (rb_fix_induced_from): ensure result to be Fixnum. + +Thu Jan 28 17:31:43 1999 Yukihiro Matsumoto + + * numeric.c (flo_to_s): float format changed to "%16.10g". + +Thu Jan 28 02:13:11 1999 Yoshinori Toki + + * array.c (rb_ary_store): expand allocated buffer by 3/2. + +Wed Jan 27 17:50:02 1999 Kazuhiro HIWADA + + * bignum.c (dbl2big): raised error if double is too big to cast + into long. check added. + +Wed Jan 27 03:16:18 1999 Yukihiro Matsumoto + + * variable.c (rb_mod_const_at): can't list constants of the + untainted objects in safe mode. + + * class.c (method_list): can't list methods of untainted objects + in safe mode. + +Tue Jan 26 02:40:41 1999 GOTO Kentaro + + * prec.c: Precision support for numbers. + +Thu Jan 21 19:08:14 1999 Yukihiro Matsumoto + + * eval.c (rb_f_raise): calls `exception' method, not `new'. + + * error.c (exc_exception): renamed from `new'. + +Wed Jan 20 03:39:48 1999 Yukihiro Matsumoto + + * parse.y (yycompile): rb_in_compile renamed to ruby_in_compile. + + * ruby.c (load_file): define DATA if __END__ appeared in script. + +Tue Jan 19 14:57:51 1999 Yukihiro Matsumoto + + * parse.y (here_document): need to protect lex_lastline. + + * parse.y (yylex): disable %//, %'', %``. + +Tue Jan 19 05:01:16 1999 Koji Arai + + * array.c (beg_len): round range value too much. + +Mon Jan 18 13:02:27 1999 Kuroda Jun + + * hash.c (env_keys): strchr() may return NULL. + +Mon Jan 18 17:51:47 1999 Yukihiro Matsumoto + + * instruby.rb (wdir): install libruby.a in archdir. + + * lib/ftools.rb (install): removes file before installing. + +Mon Jan 18 16:55:31 1999 MAEDA shugo + + * eval.c (rb_callcc): experimental continuation support. + +Sun Jan 17 19:45:37 1999 WATANABE Hirofumi + + * pack.c (pack_pack): nil packing caused SEGV. + +Sat Jan 16 13:18:03 1999 Yukihiro Matsumoto + + * string.c (rb_str_concat): character (fixnum) can be append to + strings + + * array.c (rb_ary_unshift): unshift returns array. + +Sat Jan 16 01:39:19 1999 Yoshida Masato + + * string.c (rb_str_split_method): UTF-8 support. + + * regex.c: UTF-8 support. + +Thu Jan 14 00:42:55 1999 Yukihiro Matsumoto + + * string.c (rb_str_gsub_bang): forget to add offset for null match. + + * eval.c (rb_thread_local_aset): can't modify in tainted mode. + + * hash.c (env_each_key): avoid generating temporary array. + +Wed Jan 13 23:58:50 1999 Yukihiro Matsumoto + + * hash.c (rb_f_setenv): name and value can be tainted. + +Wed Jan 6 02:42:08 1999 Yukihiro Matsumoto + + * bignum.c (Init_Bignum): forgot to define Bignum#===. + + * gc.c (gc_sweep): if add_heap() is called during GC, objects on + allocated heap page(s) are not marked, should not be recycled. + + * gc.c (gc_sweep): should refer latest freelist. + + * gc.c (id2ref): modified to support performance patch. + + * object.c (rb_obj_id): performance patch (no bignum for id). + +Tue Jan 5 01:56:18 1999 Yukihiro Matsumoto + + * config.guess: merge up-to-date from autoconf 2.12. + + * array.c (rb_ary_join): avoid calling rb_protect_inspect() till + it is really needed. + + * object.c (rb_obj_inspect): show detailed information for the + instance variables (infinite loop can avoid now). + + * struct.c (rb_struct_inspect): avoid infinite loop. + +Sun Jan 3 01:37:58 1999 Takao KAWAMURA + + * misc/ruby-mode.el (ruby-end-of-defun): moved too much. + + * misc/ruby-mode.el (ruby-mode-variables): set paragraph-separator + for the mode. + + * misc/ruby-mode.el: proper font-lock for `def' and `nil' etc. + +Sat Jan 2 17:09:06 1999 Yukihiro Matsumoto + + * eval.c (rb_jump_tag): new api to invoke JUMP_TAG. tag values + can obtained from rb_eval_string_protect()/rb_load_protect(). + + * eval.c (rb_rescue): now catches all exceptions but SystemExit. + + * eval.c (rb_eval_string_protect): eval string with protection. + + * eval.c (rb_load_protect): load file with protection. + + * io.c (rb_io_puts): avoid infinite loop for cyclic arrays. + + * eval.c (rb_thread_local_aref): thread local hash tables. + + * object.c (rb_equal): check exact equal before calling `=='. + +Thu Dec 31 22:28:53 1998 MAEDA shugo + + * eval.c (rb_f_require): feature names should be provided with + DLEXT extension. + + * marshal.c (Init_marshal): need to provide `marshal.so'. + +Wed Dec 30 02:29:16 1998 Yukihiro Matsumoto + + * variable.c (classname): do not call rb_ivar_set(). + + * eval.c (ruby_run): finalizers were called too early. + +Fri Dec 25 12:19:30 1998 Fukuda Masaki + + * gc.c (rb_gc_mark): should not return on FL_EXIVAR. + +Fri Dec 25 11:56:51 1998 Yukihiro Matsumoto + + * gc.c (gc_mark): proper scanning for temporary region. + + * eval.c (TMP_ALLOC): protection for C_ALLOCA was broken. + +Thu Dec 24 18:26:04 1998 Yukihiro Matsumoto + + * development version 1.3 released. + +Thu Dec 24 00:17:00 1998 Yukihiro Matsumoto + + * eval.c (rb_load): top self should be set properly. + + * variable.c (classname): check __classpath__ if it is defined. + + * variable.c (classname): invalid warning at -v with static linked + ruby interpreter. + + * eval.c (is_defined): modified for expr::Const support. + + * eval.c (rb_eval): invoke method expr::Const if expr is not class + nor module. + + * parse.y (primary): enable expr::identifier as method + invocation. + +Wed Dec 23 03:04:36 1998 Yukihiro Matsumoto + + * regex.c (re_match): avoid too many loop pops for (?:..). + +Tue Dec 22 18:01:08 1998 Yukihiro Matsumoto + + * experimental version 1.1d1 released. + +Mon Dec 21 01:33:03 1998 Yukihiro Matsumoto + + * eval.c (TMP_PROTECT): add volatile to ensure GC protection. + + * string.c (rb_str_gsub_bang): calculate buffer size properly. + + * parse.y (lex_get_str): needed to return Qnil at EOS. + + * eval.c (find_file): check policy modified, raise exception + immediately for tainted load_path. + + * hash.c (rb_f_setenv): do not depend on setenv() nor putenv(). + +Thu Dec 17 06:29:23 1998 Yukihiro Matsumoto + + * ext/tk/tkutil.c (tk_s_new): use rb_obj_instance_eval(), instead + of rb_yield_0(). + + * eval.c (rb_f_require): forgot to call find_file in some cases. + + * eval.c (rb_f_require): `require "feature.so"' to load dynamic + libraries. old `require "feature.o"' is still OK. + + * eval.c (rb_eval): yield without value dumped core. + +Wed Dec 16 16:28:31 1998 Yukihiro Matsumoto + + * experimental version 1.1d0 (pre1.2) released. + +Wed Dec 16 10:43:34 1998 Yukihiro Matsumoto + + * regex.c (re_search): bound check before calling re_match(). + +Tue Dec 15 13:59:01 1998 Yukihiro Matsumoto + + * error.c (exc_to_s): returns class name for unset mesg. + + * error.c (exc_initialize): do not initialize @mesg by "". + + * parse.y (nextc): __END__ should handle CR+LF newlines. + +Wed Dec 9 13:37:12 1998 MAEDA shugo + + * pack.c (encodes): use buffering for B-encoding. + + * pack.c (pack_pack): Q-encoding by 'M'. + +Tue Dec 8 14:10:00 1998 Yukihiro Matsumoto + + * variable.c (generic_ivar_get): any object can have instance + variables now. great improvement. + + * variable.c (rb_name_class): do not set __classpath__ by default, + use __classid__ instead. + +Mon Dec 7 22:08:22 1998 Yukihiro Matsumoto + + * ruby.h (struct RFile): IO objects can have instance variables now. + + * parse.y (primary): allows `def obj::foo; .. end'. + +Mon Dec 7 18:24:50 1998 WATANABE Tetsuya + + * ruby.c (set_arg0): $0 support for HP-UX. + +Mon Dec 7 01:30:28 1998 WATANABE Hirofumi + + * dln.c (dln_strerror): better error messages on win32. + +Sat Dec 5 23:27:23 1998 Yukihiro Matsumoto + + * parse.y (here_document): indentable here-doc delimiter by + `<<-'. Proposed by Clemens . Thanks. + +Thu Dec 3 16:50:17 1998 Yukihiro Matsumoto + + * ext/extmk.rb.in (realclean): trouble on install. + +Sun Nov 29 22:25:39 1998 Takaaki Tateishi + + * process.c (f_exec): check number of argument. + +Thu Nov 26 17:27:30 1998 Yukihiro Matsumoto + + * version 1.1c9 released. + +Wed Nov 25 13:07:12 1998 Yukihiro Matsumoto + + * string.c (rb_str_dup): do not copy additional data (STR_NO_ORIG). + + * parse.y (yycompile): reduce known memory leak (hard to remove). + +Wed Nov 25 03:41:21 1998 Yukihiro Matsumoto + + * st.c (st_init_table_with_size): round size up to prime number. + +Sat Nov 21 23:27:23 1998 Yukihiro Matsumoto + + * hash.c (rb_hash_aset): reduce copying key strings. + + * gc.c (looks_pointerp): declare as inline function if possible. + + * st.c (PTR_NOT_EQUAL): compare hash values first before calling + comparing function. + + * st.c (ADD_DIRECT): save hash value in entries to reduce hash + calculation. + + * string.c (rb_str_gsub_bang): avoid rb_scan_args() to speed-up. + + * string.c (rb_str_sub_bang): ditto. + +Sat Nov 21 18:44:06 1998 Masaki Fukushima + + * time.c (time_s_now): had memory leak. + + * ext/md5/md5init.c (md5_new): had memory leak. + + * ext/md5/md5init.c (md5_clone): ditto. + +Fri Nov 20 23:23:23 1998 Yukihiro Matsumoto + + * lib/delegate.rb: do not propagate hash and eql?. + +Thu Nov 19 01:40:52 1998 Yukihiro Matsumoto + + * sample/ruby-mode.el (ruby-expr-beg): failed to find reserved + word boundary. + + * eval.c (rb_eval): avoid calling `concat' method. calls + rb_ary_concat() directly for efficiency. + + * eval.c (rb_eval): actual rest arguments extended arrays too much. + +Wed Nov 18 14:30:24 1998 Yukihiro Matsumoto + + * class.c (rb_define_global_function): global functions now be + module function of the Kernel. + +Wed Nov 18 10:48:09 1998 Yukihiro Matsumoto + + * io.c (read_all): SEGV on large files. + +Tue Nov 17 18:11:20 1998 Yukihiro Matsumoto + + * version 1.1c8 released. + +Tue Nov 17 16:58:47 1998 Yukihiro Matsumoto + + * parse.y (arg): assignment to attribute name start with capital + should be allowed. + + * eval.c (thread_alloc): needed to mark terminated threads too. + +Tue Nov 17 12:33:48 1998 Motoyuki Kasahara + + * ext/extmk.rb.in (create_makefile): Set `libdir' to `@libdir@', + Set `pkglibdir' to `$libdir/$(RUBY_INSTALL_NAME)'. + +Tue Nov 17 10:30:46 1998 Yukihiro Matsumoto + + * sprintf.c (f_sprintf): %l%%c -> %%l%c + +Tue Nov 17 01:08:50 1998 Yukihiro Matsumoto + + * parse.y (ret_args): distinguish `a' and `*a' for the arguments + of yield and return. + + * eval.c (rb_eval): flip3 should work like sed. + + * eval.c (rb_eval): flip{2,3} now have independent state for each + scope to work fine with thread. + +Mon Nov 16 23:26:29 1998 Yukihiro Matsumoto + + * parse.y (primary): exec else clause if no exception raised. + +Sun Nov 15 15:44:07 1998 Tadayoshi Funaba + + * ext/extmk.rb.in (install): bug in target. + +Sat Nov 14 11:02:05 1998 Motoyuki Kasahara + + * Makefile.in (install): Give the argument `$(DESTDIR)' to + `instruby.rb'. + + * instruby.rb: Recognize ARG[0] as `destdir'. + + * instruby.rb: Give the argument `destdir' to `extmk.rb'. + + * ext/extmk.rb.in: Recognize ARG[1] as `$destdir'. + + * instruby.rb: Create the installation directories (bindir, libdir, + archdir, pkglibdir, archdir, and mandir) under `destdir', and + install all files under there. + + * ext/extmk.rb.in: Likewise. + +Sat Nov 14 10:56:55 1998 Motoyuki Kasahara + + * instruby.rb: Add the variable `pkglibdir'. + + * instruby.rb: Set the variable `libdir' to `$(libdir)', not + `$(libdir)/$(ruby_install_name)'. `libruby.so' and `libruby.so.LIB' + are installed at `libdir'. + + * instruby.rb: Set the variable `archdir' to `$(pkglibdir)/$(arch)'. + +Fri Nov 13 19:43:29 1998 KIMURA Koichi + + * missing/nt.c (SafeFree): wrong free offset. + +Thu Nov 12 20:11:53 1998 Koji Arai + + * sample/ruby-mode.el: wrong highlight. + + * parse.y (parse_regx): newline in regexp was ignored. + +Wed Nov 11 10:54:57 1998 Yukihiro Matsumoto + + * parse.y (here_document): <<'FOO' should not escape anything. + + * parse.y (here_document): bare << here-doc available, even though + it's deprecated. + + * file.c (rb_file_s_readlink): return value should be tainted. + + * ext/etc/etc.c (setup_passwd): information (eg. GCOS name) should + be tainted (modified at Perl Conference). + +Tue Nov 10 00:22:11 1998 EGUCHI Osamu + + * configure.in: elf support for FreeBSD 3.x + +Tue Nov 10 00:05:43 1998 Yukihiro Matsumoto + + * parse.y (yylex): here document available in eval. + +Mon Nov 9 17:55:19 1998 Yukihiro Matsumoto + + * version 1.1c7 released. + +Fri Nov 6 19:25:27 1998 Takao KAWAMURA + + * sample/ruby-mode.el: font-lock patch. + +Thu Nov 5 15:42:22 1998 Yukihiro Matsumoto + + * sample/README, lib/README: simple description for each file. + +Wed Nov 4 18:14:19 1998 Yukihiro Matsumoto + + * eval.c (assign): attribute assignment should be called as public. + +Tue Nov 3 23:36:39 1998 Yukihiro Matsumoto + + * string.c (rb_str_dump): dumps core for negative char value. + + * regex.c (re_compile_pattern): out of boundary access for empty + regexp. + +Mon Nov 2 22:54:01 1998 Yukihiro Matsumoto + + * string.c (rb_str_aset): `str[str]' replaces first match. + +Mon Nov 2 18:24:33 1998 Yukihiro Matsumoto + + * eval.c (thread_create): was accessing modified status. + +Sun Nov 1 01:18:52 1998 EGUCHI Osamu + + * gc.c (xrealloc): size 0 needs round up to 1. + +Sat Oct 31 23:18:34 1998 Yukihiro Matsumoto + + * string.c (rb_str_split_method): negative LIMIT means number of + split fields are unlimited, as in perl. + + * string.c (rb_str_split_method): if LIMIT is unspecified, + trailing null fields are stripped. + +Sat Oct 31 04:16:14 1998 Inaba Hiroto + + * string.c (str_aref): regexp index SEGVed. + +Fri Oct 30 14:33:47 1998 Yukihiro Matsumoto + + * re.c (reg_match): returns nil for unmatch. + + * dir.c (dir_entries): new method. + + * eval.c (block_pass): do not push block, substitute it. + +Fri Oct 30 01:28:52 1998 Yukihiro Matsumoto + + * range.c (range_check): avoid <=> check for Fixnums. + + * array.c (rb_ary_aset): accept negative index. + +Wed Oct 28 22:00:54 1998 Yukihiro Matsumoto + + * regex.c (re_match): access out of boundary fixed. + +Wed Oct 28 11:37:42 1998 TAMITO + + * io.c (f_select): fd number comparison bug. + +Tue Oct 27 23:07:11 1998 Yukihiro Matsumoto + + * sample/ruby-mode.el (ruby-parse-region): forgot to support %w() + style array literal. + + * eval.c (rb_eval): unused block raises warning. + +Mon Oct 26 09:37:53 1998 Yukihiro Matsumoto + + * eval.c (dvar_asgn_push): dvar pushed too many times if + variable-in-block first appear in loops. + +Sun Oct 25 22:59:27 1998 Yukihiro Matsumoto + + * regex.c (set_list_bits): was using wrong offset. + +Thu Oct 22 00:07:11 1998 Yukihiro Matsumoto + + * eval.c (rb_obj_method): method retrieved from tainted object + should be tainted too. + + * eval.c (method_call): safe_level should be restored during + Method#call. + +Wed Oct 21 14:21:06 1998 Yukihiro Matsumoto + + * io.c (Init_IO): new constants IO::SEEK_{SET,CUR,END}. + + * io.c (rb_f_ungetc): ungetc pushes a char back into STDIN. + +Mon Oct 19 11:50:00 1998 Motoyuki Kasahara + + * ext/extmk.rb: Load '@top_srcdir@/lib/find.rb', not + '../lib/find.rb'. + + * ext/extmk.rb: Distinguish between `top_srcdir' and `topdir'. + + * Makefile.in (CFLAGS): Add `-I.'. + + * Makefile.in (lex.c): Give `@srcdir@/keywords' to gperf, not + `keywords'. + + * instruby.rb: Use `CONFIG["bindir"]', instead of `prefix + "/bin"'. + + * instruby.rb: Use `CONFIG["libdir"]', instead of `prefix + "/lib"'. + + * instruby.rb Use `CONFIG["mandir"]', instead of `prefix + "/man"'. + + * instruby.rb (wdir): Add the variable to preserve the current + working directory. + + * instruby.rb: Chdir to wdir before install `config.h' and + `rbconfig.rb'. + +Mon Oct 19 10:07:01 1998 EGUCHI Osamu + + * eval.c (rb_eval): reduce recursive calls to rb_eval(). + +Fri Oct 16 15:31:45 1998 Yukihiro Matsumoto + + * time.c (time_new_internal): timeval must be positive. + +Thu Oct 15 13:54:48 1998 Yukihiro Matsumoto + + * parse.y (arg): local variables can be accessed within right side + expression in assignment, notably in blocks. + +Wed Oct 14 00:18:33 1998 Yukihiro Matsumoto + + * array.c (Init_Array): Array#=== is now for equal check, not + inclusion check. + + * parse.y (when_args): `when a, *b' style new syntax for array + expansion in `case'. + +Tue Oct 13 14:30:32 1998 Yukihiro Matsumoto + + * object.c (rb_obj_untaint): taint marks can be unset. + + * eval.c (rb_eval): taint propagation for embedded strings. + +Mon Oct 12 13:27:15 1998 Yukihiro Matsumoto + + * eval.c (rb_call0): check stack depth more frequently. + +Mon Oct 12 08:08:30 1998 Yukihiro Matsumoto + + * io.c (rb_p): can print even in secure mode. + +Sun Oct 11 22:50:13 1998 Yukihiro Matsumoto + + * variable.c (rb_const_set): taint check for modification. + + * variable.c (rb_ivar_set): taint check for modification. + + * string.c (rb_str_modify): taint check for modification. + + * hash.c (rb_hash_modify): taint check for modification. + + * array.c (rb_ary_modify): taint check for modification. + + * ruby.h (FL_TAINT): taint for all objects, not only strings. + +Fri Oct 9 17:01:14 1998 Yukihiro Matsumoto + + * io.c (read_all): read() returns "" at immediate EOF. + + * io.c (io_read): read(nil) read all until EOF. + +Thu Oct 8 13:32:13 1998 Yukihiro Matsumoto + + * time.c (time_dump): marshal can dump Time object now. + + * marshal.c (Init_marshal): rename marshal methods `_dump_to' to + `_dump', `_load_from' to `_load'. + + * parse.y (rb_intern): "+=".intern generates proper symbol. + +Mon Oct 5 18:31:53 1998 Yukihiro Matsumoto + + * version 1.1c6 released. + +Fri Oct 2 14:22:33 1998 Yukihiro Matsumoto + + * regex.c (re_search): `/\s*(--)$/ =~ "- --"' did not match, + because of wrong optimize condition. + +Mon Oct 1 01:55:16 1998 Yukihiro Matsumoto + + * parse.y (rb_intern): should not raise exceptions. + + * parse.y (yylex): symbol like `:foo?=' should not be allowed. + + * ext/extmk.rb.in: makes *.a for static link modules. + +Wed Sep 30 14:13:06 1998 Yukihiro Matsumoto + + * eval.c (rb_thread_start): supports making a subclass of the + Thread class. + +Tue Sep 29 17:46:01 1998 Yukihiro Matsumoto + + * eval.c (rb_thread_join): join is now an instance method. + +Fri Sep 25 12:01:19 1998 Yukihiro Matsumoto + + * parse.y (yylex): `@foo!' should be an error. + +Thu Sep 24 14:55:06 1998 WATANABE Tetsuya + + * ext/etc/etc.c (Init_etc): wrong field definition. + +Thu Sep 17 17:09:05 1998 Yukihiro Matsumoto + + * io.c (io_reopen): was creating FILE* for wrong fd. + +Tue Sep 15 05:28:11 1998 Koji Arai + + * regex.c (re_compile_pattern): forgot to fixup for the pattern + like (?=(A)|(B)). + +Tue Sep 15 01:06:08 1998 Yukihiro Matsumoto + + * io.c (rb_io_gets_internal): do not set $_ by default, only + gets/readline set the variable. + + * eval.c (rb_f_load): load toplevel class is set to anonymous + module if safe_level >= 5, to encapsulate modification. + + * eval.c (rb_f_load): set frame properly. + + * string.c (rb_str_each_line): do not set $_. + +Mon Sep 14 14:42:27 1998 Yukihiro Matsumoto + + * regex.c (re_match): beginning and end of the string, do not + automatically match `\b'. + + * string.c (scan_once): consume at least on character. + + * regex.c (re_search): wrong behavior for negative range. + +Sat Sep 12 21:21:26 1998 Koji Arai + + * regex.c (re_search): range value should be maintained. + +Thu Sep 10 10:55:00 1998 Yukihiro Matsumoto + + * parse.y (backref_error): yyerror does not understand formats. + +Tue Sep 8 18:05:33 1998 Yukihiro Matsumoto + + * version 1.1c5 released. + +Tue Sep 8 10:03:39 1998 Yukihiro Matsumoto + + * string.c (str_each_line): wrong line splitting with newline at + top of the string. + + * string.c: non bang methods return copied string. + + * eval.c (f_END): needed to initialize frame->argc; + +Fri Sep 4 11:27:40 1998 Yukihiro Matsumoto + + * bignum.c (bigadd): proper sign combination. + + * regex.c (re_search): wrong return value for \A. + +Thu Sep 3 14:08:14 1998 Yukihiro Matsumoto + + * version 1.1c4 released. + +Tue Sep 1 10:47:16 1998 Yukihiro Matsumoto + + * regex.c (slow_search): do not compare llen and blen. llen may + be longer than blen, if little contains 0xff. + + * regex.c (mbctab_euc): set 0x8e as multibyte character. + + * string.c (str_inspect): mask character for octal output. + +Mon Aug 31 15:32:41 1998 Yukihiro Matsumoto + + * regex.c (re_search): use calculated offset if exactn is the + first opcode in the compiled regexp. + + * regex.c (bm_search): use Boyer-Moore search for simple search. + + * regex.c (must_instr): wrong length check if pattern includes + byte escape by 0xff. + + * regex.c (re_compile_pattern): need not to check current_mbctype. + +Sat Aug 29 16:31:40 1998 Yukihiro Matsumoto + + * eval.c (rb_check_safe_str): avoid calling rb_id2name() in normal + cases to speed-up. + + * eval.c (thread_raise): do not save context of terminated thread. + + * regex.c (re_compile_pattern): mask \nnn over 256. + +Sat Aug 29 02:09:46 1998 Koji Arai + + * sprintf.c (f_sprintf): wrong buffer size check. + +Fri Aug 28 01:57:04 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): accepts (?ix-ix) and (?ix-ix:...). + +Fri Aug 28 12:25:33 1998 Hiroshi Igarashi + + * ruby.c (ruby_require_modules): load modules in appearing order. + +Fri Aug 28 01:57:04 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): accepts (?ix-ix) and (?ix-ix:...). + +Thu Aug 27 12:54:28 1998 Yukihiro Matsumoto + + * version 1.1c3 released. + +Wed Aug 26 14:40:56 1998 Yukihiro Matsumoto + + * eval.c (rb_eval): check whether ruby_class is properly set, + before accessing it. + + * eval.c (rb_obj_instance_eval): ruby_class should be Qnil for + special objects like Fixnums. + + * ext/tkutil/tkutil.c (Init_tkutil): removes calls to + rb_yield_0(). used instance_eval() instead in the tk.rb. + +Wed Aug 26 11:47:00 1998 Yukihiro Matsumoto + + * regex.c (re_match): pop non-greedy stack elements on success. + +Wed Aug 26 09:25:35 1998 WATANABE Hirofumi + + * ruby.h: add #define environ for cygwin32. + +Tue Aug 25 08:57:41 1998 Yukihiro Matsumoto + + * array.c (rb_ary_sort_bang): temporarily freeze sorting array. + +Mon Aug 24 18:46:44 1998 WATANABE Hirofumi + + * dln.c (dln_find_1): path check was too strict. + +Mon Aug 24 15:28:11 1998 WATANABE Hirofumi + + * parse.y (f_arglist): opt_nl added after f_args. + +Fri Aug 21 01:06:01 1998 Yukihiro Matsumoto + + * ext/socket/socket.c: grand renaming on socket.c. + + * ext/socket/socket.c (inet_aton): supply inet_aton for those + systems that do not have it. + + * ext/socket/socket.c (setipaddr): use inet_aton instead of + inet_addr. + + * ext/socket/socket.c (tcp_s_gethostbyname): new method: works + like Socket.gethostbyname but returning array contains ip-addrs + as octet decimal string format like "127.0.0.1". + + * ext/socket/socket.c (mkhostent): return format changed to + [host, aliases, type, ipaddr..] as documented. + +Wed Aug 19 00:31:09 1998 Yukihiro Matsumoto + + * io.c (io_ctl): forgot to place TRAP_END at right position. + +Fri Aug 14 11:01:47 1998 Yukihiro Matsumoto + + * eval.c (call_trace_func): save __FILE__, __LINE__ before + executing trace_func, since trace function should not corrupt + line number information. + +Thu Aug 13 15:09:02 1998 Yukihiro Matsumoto + + * array.c (ary_s_new): was marking unallocated region on GC. + +Tue Aug 11 11:57:35 1998 Yukihiro Matsumoto + + * version 1.1c2 released. + +Mon Aug 10 14:05:30 1998 Yukihiro Matsumoto + + * process.c (f_system): removed fflush(stdin). + +Fri Aug 7 17:44:44 1998 Yukihiro Matsumoto + + * error.c (err_snprintf): replace sprintf for fixed sized buffer, + with snprintf to avoid buffer over-run. For systems which does + dot provide snprintf, missing/snprintf.c added. + +Wed Aug 5 00:47:35 1998 Yukihiro Matsumoto + + * re.c (rb_reg_search): recycle match object. + +Mon Aug 3 09:17:55 1998 Yukihiro Matsumoto + + * string.c (rb_str_gsub_bang): do not allocate temporary string. + + * string.c (rb_str_sub_bang): use inline replace. + +Wed Jul 29 00:36:08 1998 Yukihiro Matsumoto + + * hash.c (hash_s_new): the default value can be specified. + + * hash.c (hash_default): method to set the default value. + + * hash.c (hash_aref): now returns the default value. + +Tue Jul 28 13:03:25 1998 Yukihiro Matsumoto + + * array.c (ary_s_new): argument to specify initial value is added. + + * array.c (ary_s_new): specifies size, not capacity. + +Mon Jul 27 12:39:34 1998 Yukihiro Matsumoto + + * string.c (str_replace): zero fill for expansion gap. + + * regex.c (mbctab_euc): set flags on for 0xA1-0xFE. suggested by + . + + * string.c (str_inspect): consider current_mbctype. + +Sun Jul 26 15:37:11 1998 Tadayoshi Funaba + + * array.c (ary_s_new): Array.new(1<<30) dumps core. + +Fri Jul 24 13:40:19 1998 Yukihiro Matsumoto + + * version 1.1c1 released. + +Fri Jul 24 02:10:22 1998 Yukihiro Matsumoto + + * marshal.c (r_bytes2): allocated buffer size was too short. + + * marshal.c (w_object): saves all options, not only casefold flag. + + * re.c (reg_clone): now copies options properly. + + * re.c (reg_get_kcode): code number was wrong. + +Thu Jul 23 13:11:32 1998 Yukihiro Matsumoto + + * eval.c (rb_attr): argument should be symbol or string. + +Wed Jul 22 11:59:34 1998 Yukihiro Matsumoto + + * regex.c (calculate_must_string): wrong offset added. + +Wed Jul 22 11:59:59 1998 Yukihiro Matsumoto + + * st.c (rehash): still had a GC problem. fixed. + +Tue Jul 21 13:19:30 1998 Yukihiro Matsumoto + + * eval.c (gc_mark_threads): crashed on GC before thread allocation. + + * st.c (rehash): GC during rehash caused SEGV. + +Tue Jul 21 01:25:10 1998 Yukihiro Matsumoto + + * sprintf.c (f_sprintf): integer formatter totally re-written. + + * sprintf.c (remove_sign_bits): support uppercase hexadecimal. + +Sat Jul 18 00:14:13 1998 Yukihiro Matsumoto + + * sprintf.c (f_sprintf): proper sign position for %X and %O. + +Fri Jul 17 14:10:20 1998 Yukihiro Matsumoto + + * version 1.1c0 released. + +Fri Jul 17 08:01:49 1998 Tadayoshi Funaba + + * process.c (f_exec): Check_SafeStr() added. + + * process.c (f_system): Check_SafeStr() moved before fork(). + +Thu Jul 16 22:58:48 1998 Yukihiro Matsumoto + + * string.c (scan_once): substrings to the block should not be + tainted. use reg_nth_match(), not str_substr(). + + * string.c (str_substr): needed to transfer taint. + +Thu Jul 16 16:15:57 1998 Yukihiro Matsumoto + + * gc.c (xmalloc): object allocation count added to GC trigger. + + * eval.c (thread_save_context): avoid marking uninitialized stack + in thread_mark. GC may be triggered by REALLOC_N(). + +Wed Jul 15 15:11:57 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_31. + +Wed Jul 15 15:05:27 1998 Yukihiro Matsumoto + + * eval.c (thread_create): exit() and abort() in threads now + forwarded to main_thread. + +Tue Jul 14 14:03:47 1998 Yukihiro Matsumoto + + * variable.c (obj_instance_variables): list names that is not + instance variables. + + * gc.c (GC_MALLOC_LIMIT): choose smaller limit value. + +Mon Jul 13 12:39:38 1998 Yukihiro Matsumoto + + * object.c (str2cstr): should not return NULL. + +Fri Jul 10 11:51:46 1998 Yukihiro Matsumoto + + * parse.y (gettable): needed to add dyna_in_block() check. + +Thu Jul 9 17:38:23 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_30. + +Thu Jul 9 16:01:48 1998 Yukihiro Matsumoto + + * sprintf.c (fmt_setup): format specifier for long needed. + + * sprintf.c (f_sprintf): ditto. + + * numeric.c (fix2str): ditto. + + * eval.c (thread_create): no more ITIMER_REAL. + + * eval.c (thread_create): thread finalization needed before + aborting thread if thread_abort is set. + +Wed Jul 8 18:17:33 1998 Yukihiro Matsumoto + + * bignum.c (big_pow): abandon power by bignum (too big). + +Tue Jul 7 13:58:43 1998 Yukihiro Matsumoto + + * eval.c (rb_catch): add C level catch/throw feature. + +Mon Jul 6 15:18:09 1998 Yukihiro Matsumoto + + * parse.y (arg): proper return values for `||=' and `&&='. + +Fri Jul 3 16:05:11 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_29. + +Fri Jul 3 11:20:46 1998 Yukihiro Matsumoto + + * marshal.c (r_byte): byte should not extend sign bit. + + * numeric.c (fix_mul): use FIX2LONG() instead of FIX2INT() for + 64bit architectures. + + * marshal.c (r_bytes): remove weird casting between pointer and int. + + * process.c (proc_setsid): new method Process#setsid(). + +Thu Jul 2 12:49:21 1998 Yukihiro Matsumoto + + * marshal.c (w_object): remove `write_bignum' label for 64bit + architectures. + + * marshal.c (r_bytes): needs int, not long. + +Wed Jul 1 14:21:06 1998 Yukihiro Matsumoto + + * numeric.c (flo_plus): should not allow addition with strings. + +Wed Jul 1 13:09:01 1998 Keiju ISHITSUKA + + * numeric.c (num_uminus): wrong coerce direction. + +Tue Jun 30 10:13:44 1998 Yukihiro Matsumoto + + * io.c (f_p): accepts arbitrary number of arguments. + + * eval.c (rb_yield_0): there's some case that iterator_p() returns + true even if the_block was not set. check added. + +Tue Jun 30 01:05:20 1998 Yukihiro Matsumoto + + * eval.c (BEGIN_CALLARGS): adjust the_block before evaluating the + receiver's value and the arguments. + +Fri Jun 26 18:02:50 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_28. + +Fri Jun 26 11:01:26 1998 WATANABE Hirofumi + + * string.c (str_aset_method): needed to convert to string. + +Thu Jun 25 02:05:50 1998 Yukihiro Matsumoto + + * regex.c (re_search): optimize for `.*' at beginning of the + pattern. + + * regex.c (re_search): optimize for character class repeat at + beginning of the pattern. + + * regex.c (re_compile_pattern): detect optimization potential for + the compiled patterns. + +Thu Jun 25 00:02:26 1998 WATANABE Hirofumi + + * re.c (reg_s_new): flag value was wrong. + +Wed Jun 24 23:45:06 1998 Yukihiro Matsumoto + + * regex.c (re_search): wrong anchor handling for reverse search. + +Wed Jun 24 02:18:57 1998 Yukihiro Matsumoto + + * parse.y (mlhs): `((a,b)),c = [[1,2]],3' assigns a=1,b=2,c=3. + +Tue Jun 23 11:46:16 1998 Yukihiro Matsumoto + + * parse.y (yylex): `&&=' and `||=' added. + +Sat Jun 20 02:53:50 1998 Yukihiro Matsumoto + + * parse.y (assignable): nesting local variables should have higher + priority than normal local variables for assignment too. + +Fri Jun 19 18:28:19 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_27. + +Fri Jun 19 14:34:49 1998 Yukihiro Matsumoto + + * eval.c (assign): support hack for nested multiple assignment. + + * parse.y (mlhs): nested multiple assignment. + + * eval.c (rb_eval): in-block variables now honors static scope. + + * configure.in: RSHIFT check moved to configure. + +Thu Jun 18 16:46:04 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_26. + +Thu Jun 18 13:37:19 1998 Yukihiro Matsumoto + + * file.c (file_s_ftype): uses lstat(2) instead of stat(2). + + * dir.c (dir_s_glob): there can be buffer overrun, check added. + + * eval.c (f_binding): handles in-block variables declared after + binding's generation. + + * numeric.c (flo_floor): floor, ceil, round added to Float. + +Wed Jun 17 11:20:00 1998 Yukihiro Matsumoto + + * parse.y (gettable): nesting local variables should have higher + priority than normal local variables. + +Tue Jun 16 12:30:46 1998 Yukihiro Matsumoto + + * bignum.c (str2inum): handles `+ddd'. + + * struct.c (make_struct): name parameter can be nil for unnamed + structures. + +Mon Jun 15 16:30:10 1998 Yukihiro Matsumoto + + * object.c (class_s_inherited): prohibiting to make subclass of + class Class. + + * object.c (module_s_new): support for making subclass of Module. + + * parse.y (yycompile): clear eval_tree before compiling. + +Fri Jun 12 17:58:18 1998 Yukihiro Matsumoto + + * eval.c (eval): write back the_dyna_var into the block. + +Thu Jun 11 18:19:18 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_25. + + * eval.c (dvar_add_compiling): register dyna_var at compile time. + + * regex.c (re_compile_pattern): RE_DUP_MAX iteration is too big. + +Wed Jun 10 15:12:04 1998 Yukihiro Matsumoto + + * io.c (io_eof): do not block other threads. + + * signal.c (trap): reserve SIGALRM for thread. + + * eval.c (thread_create): use ITIMER_REAL also to avoid system + call blocking. + + * io.c (f_syscall): add TRAP_BEG, TRAP_END around system calls. + + * io.c (io_ctl): add TRAP_BEG, TRAP_END around system calls. + + * enum.c (enum_collect): did not collect false values. + + * array.c (ary_new2): forgot to initialize capa field. + +Tue Jun 9 18:36:15 1998 WATANABE Hirofumi + + * string.c (str_split_method): split dumped core for "\xff". + +Tue Jun 9 16:22:12 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_24. + +Tue Jun 9 16:04:07 1998 WATANABE Hirofumi + + * ext/kconv/kconv.c (kconv_guess): more precise decision for EUC, + using jless algorithm (3 sequential EUC hiragana characters). + +Tue Jun 9 15:12:44 1998 Yukihiro Matsumoto + + * ext/kconv/kconv.c (kconv_guess): wrong guess for EUC as SJIS in + some cases (0xe0 - 0xef). + + * gc.c (xmalloc): insert size check for big (negative in signed) + allocation size. + +Tue Jun 9 02:54:51 1998 Yukihiro Matsumoto + + * lib/parsedate.rb: wday moved to the last in the return values. + +Mon Jun 8 10:40:16 1998 Yukihiro Matsumoto + + * string.c (str_split_method): split dumped core for "\0". + +Sat Jun 6 22:50:52 1998 Yukihiro Matsumoto + + * regex.c (calculate_must_string): wrong condition for + {start,stop}_nowidth. + + * regex.c (re_match): various features imported from GNU regex.c + 0.12, such as nested grouping, avoiding infinite loop with empty + match, etc. + + * regex.c (register_info_type): now use union. + + * regex.c (re_search): more precise anchor(^) check. + +Wed Jun 3 18:07:54 1998 Yukihiro Matsumoto + + * re.c (reg_raise): check rb_in_compile, not rb_in_eval. + +Mon Jun 1 05:26:06 1998 WATANABE Tetsuya + + * string.c (trnext): casting to signed char* needed. + +Tue Jun 2 16:00:12 1998 Yukihiro Matsumoto + + * ext/socket/socket.c (udp_addrsetup): error check enhanced. + + * ext/socket/socket.c (sock_s_getservbyaname): use strtoul(), if + possible. + +Sat May 30 07:10:02 1998 Yukihiro Matsumoto + + * re.c (reg_prepare_re): no more needless regular expression + recompile on casefold conditions. + +Thu May 28 18:02:55 1998 Yukihiro Matsumoto + + * object.c (nil_plus): no more `+' method for nil. + +Wed May 27 17:33:46 1998 Yukihiro Matsumoto + + * hash.c (hash_fetch): new method. + + * regex.c (re_search): check whether translate table is set. + +Tue May 26 11:39:50 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_23. + + * parse.y (yylex): no UPLUS/UMINUS for 1st argument if + parenthesises are omitted. + +Tue May 26 01:09:55 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): (?XI) for turns off the + corresponding option. + +Mon May 25 12:38:56 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): inline i option (?i). + + * regex.c (re_compile_pattern): inline x option (?x). + + * regex.c (re_compile_pattern): x option for regexp. + + * dir.c (dir_s_open): returns block's evaluated value. + + * io.c (f_open): returns block's evaluated value. + + * ext/curses/curses.c (curses_addstr): nil argument caused SEGV. + +Fri May 22 11:52:45 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): push mark on (?:), so that + laststart check for {a,b} can be done. + +Thu May 21 17:31:16 1998 Yukihiro Matsumoto + + * regex.c (re_match): wrong match (too non-greedy) for `{a,b}?'. + + * io.c (io_lineno): new method IO#lineno, IO#lineno=. + +Wed May 20 06:04:43 1998 MAEDA shugo + + * BeOS patch. + +Wed May 20 16:32:19 1998 Yukihiro Matsumoto + + * bignum.c (BIGDN): use RSHIFT(), instead of mere `>>'. + +Tue May 19 16:36:26 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_22. + +Tue May 19 16:31:57 1998 Yukihiro Matsumoto + + * parse.y (assignable): specification changed for in-block + variable definition. + + * eval.c (dyna_var_asgn): error in in-block variables' compile + time definition. + + * parse.y (str_extend): wrong nesting detection. + +Tue May 19 09:47:55 1998 WATANABE Hirofumi + + * numeric.c (num2int): re-defined (extensions may use this). + +Mon May 18 16:40:50 1998 MAEDA shugo + + * error.c (get_syserr): BeOS support. + + * configure.in: modified for BeOS. + + * string.c (str_dump): do not call isascii(). + + * sprintf.c (remove_sign_bits): forgot to initialize end pointer. + + * glob.c: #include added. + +Mon May 18 14:52:21 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_21. + +Mon May 18 03:27:57 1998 MAEDA shugo + + * file.c (file_s_expand_path): optional second argument + `default_directory' added. + +Sat May 16 22:06:52 1998 WATANABE Hirofumi + + * error.c (RAISE_ERROR): wrong error message + +Fri May 15 14:43:25 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_20. + +Thu May 14 14:44:21 1998 WATANABE Hirofumi + + * sun4 cc patches for intern.h and regex.h. + +Thu May 14 14:03:16 1998 Yukihiro Matsumoto + + * random.c (RANDOM_MAX): guessing proper maximum value for random + numbers. + + * random.c (f_rand): use drand48 if possible. + +Wed May 13 19:05:20 1998 MAEDA shugo + + * BeOS patches for io.c, error.c and config.guess. + +Wed May 13 14:56:23 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_19. + + * most of the Mac and BeOS patches merged, except path separators. + + * error.c (err_append): generated SyntaxError was String. + + * ruby.h: xxx2INT, xxx2UINT checks values as int, not long. + + * ruby.h: remove typedef's. INT, UINT, UCHAR, USHORT. + +Tue May 12 17:38:00 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_18. + +Tue May 12 11:38:08 1998 Yukihiro Matsumoto + + * error.c (syserr_errno): returns errno of the SystemCallError. + + * error.c (rb_sys_fail): saves errno in the Exception. + + * error.c (set_syserr): no need to protect syserr_list. + + * error.c (rb_sys_fail): no more bufsize limit. + + * error.c (set_syserr): integer value of errno can be accessed by + Errno::EXXX::Errno. + +Sun May 10 03:10:33 1998 WATANABE Tetsuya + + * io.c (io_tell etc.): moved from File class to IO class. + +Fri May 8 12:26:37 1998 Yukihiro Matsumoto + + * pack.c (pack_unpack): should be unsigned int (was signed int). + +Thu May 7 16:34:10 1998 Yukihiro Matsumoto + + * pack.c (pack_pack): `V', `N' uses newly created NUM2UINT(). + + * ruby.h (NUM2UINT): new macro. + + * bignum.c (big2uint): try to convert bignum into UINT. + + * re.c (reg_match): needed to return false for match with nil. + + * gc.c (obj_free): wrong condition to free string. + +Wed May 6 21:08:08 1998 WATANABE Hirofumi + + * ruby.c (ruby_process_options): modified for DJGPP. + +Wed May 6 15:48:03 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_17. + +Wed May 6 01:37:39 1998 Yukihiro Matsumoto + + * eval.c: remove global variable `errat'. + + * eval.c (rb_longjmp): embed error position information in the + exception object. + +Sat May 2 12:20:02 1998 Yukihiro Matsumoto + + * re.c (reg_search): supports reverse search. + + * string.c (str_index_method): does update $~ etc. + + * eval.c (f_load): needed to clear the_dyna_vars. + + * eval.c (dyna_var_asgn): do not push dyna_var, which is id == 0. + + * error.c (Init_Exception): NotImplementError is no longer + StandardError, which is not handled by default rescue. + +Fri May 1 00:35:51 1998 Yukihiro Matsumoto + + * ruby.c (proc_options): `-d' turns on verbose flag too. + + * error.c (exception): last argument may be the superclass of the + defining exception(s). + + * io.c (Init_IO): EOFError is now subclass of the IOError. + + * io.c (Init_IO): forgot to define IOError. + + * error.c (Init_Exception): old Exception class renamed to + StandardError. Exception now replaces old GlobalExit. + + * error.c (Init_Exception): Exception is now the root of the + Global Exits. There's no longer GlobalExit class. + + * util.c (ruby_mktemp): check TMP, TMPDIR first. + +Thu Apr 30 01:08:35 1998 Yukihiro Matsumoto + + * lib/tk.rb: call 'unknown', if proc not defined. + + * eval.c (handle_rescue): default rescue handles `Exceptional' not + only the instance of the `Exception's. + + * eval.c (f_raise): exception can be any object. + + * time.c (time_gm_or_local): call time_gmtime or time_localtime. + + * eval.c (f_raise): raises TypeError if the class which is not a + subclass of String is specified (checked in exc_new()). + + * error.c (exc_new): need to check whether invalid class (not a + subclass of String) is specified. + +Wed Apr 29 21:05:44 1998 WATANABE Hirofumi + + * ruby.c (proc_options): option '-e' via tempfile. + +Tue Apr 28 15:27:58 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_16. + +Tue Apr 28 00:07:38 1998 Yukihiro Matsumoto + + * eval.c (obj_is_proc): type check predicate. + + * eval.c (obj_is_block): ditto. + +Mon Apr 27 16:59:17 1998 Yukihiro Matsumoto + + * ext/gtk/gtk.c (Init_gtk): use timeout, not idle to avoid + consuming CPU too much. + + * lib/tk.rb: use tcltklib#_invoke instead of `_eval'. + +Mon Apr 27 16:59:17 1998 Yukihiro Matsumoto + + * array.c (ary_sort): use dup, not clone. + +Mon Apr 27 13:46:27 1998 Tadahiro Maebashi + + * ext/tcltklib/tcltklib.c (ip_invoke): invoke tcl command + directly. need not worry about escaping tcl characters. + +Mon Apr 27 12:04:43 1998 Yukihiro Matsumoto + + * random.c (f_rand): do not call srand() implicitly. + +Fri Apr 24 14:35:45 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_15. + + * parse.y (assignable): dyna_var_asgn actually defines nested + local variables in outer context. + + * random.c (f_rand): call srand(), if it has not called yet. + + * random.c (f_srand): use tv_usec as the default seed. + + * eval.c (rb_eval): values of nested local variables should be + independent. + + * eval.c (rb_yield_0): local variables wrong nested conditions. + +Wed Apr 22 23:27:17 1998 Yukihiro Matsumoto + + * io.c (select_get_io): get IO object by `to_io'. + + * io.c (io_to_io): method to retrieve IO object, from delegating + object for example. + +Wed Apr 22 16:52:37 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_14. + + * string.c (str_modify): check for embedded pointer reference. + + * gc.c (obj_free): ditto. + + * pack.c (pack_pack): p/P template to embed pointers. + +Wed Apr 22 00:07:10 1998 Tadayoshi Funaba + + * array.c (ary_rindex): embarrassing typo. + +Tue Apr 21 12:31:48 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_13. + + * configure.in (RUBY_LIB): supports --program-{prefix,suffix}. + + * array.c (ary_rindex): new method. + + * io.c (io_binmode): should return self. + +Tue Apr 21 08:23:04 1998 Tadayoshi Funaba + + * parse.y (here_document): calling parse_string with wrong + arguments. + + * struct.c (struct_aset): problem member assignment with name. + +Mon Apr 20 14:47:49 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_12. + + * time.c (time_arg): args may be string (support for reduced + implicit type conversion). + + * lib/base64.rb: changed to use pack/unpack with `m' template. + +Mon Apr 20 06:23:20 1998 Yukihiro Matsumoto + + * variable.c (mod_remove_const): new method. + +Sat Apr 18 03:53:27 1998 Yukihiro Matsumoto + + * hash.c (hash_each_with_index): removed. use Enumerable's + each_with_index instead. + + * class.c (rb_include_module): check for super modules, since + module's included modules may be changed. + +Fri Apr 17 21:50:47 1998 WATANABE Hirofumi + + * marshal.c (r_long): r_byte() may return signed byte. + +Fri Apr 17 11:58:30 1998 NAGAI Hidetoshi + + * ext/tcltklib/tcltklib.c (lib_mainloop): thread and interrupt check. + +Fri Apr 17 11:06:30 1998 Yukihiro Matsumoto + + * eval.c (find_file): try to fopen() to check whether file exists. + + * ruby.c (load_file): ditto. + + * struct.c (struct_aset): struct member can be set by member name. + +Fri Apr 17 00:47:19 1998 WATANABE Hirofumi + + * ext/extmk.rb.in: added m68k-human support + + * file.c (LOCK_SH): defines moved. + + * array.c (ary_flatten_bang): simplified loop. + +Thu Apr 16 16:52:01 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_11. + + * lib/tk.rb: thread support (experimental - maybe slow). + + * eval.c (rb_longjmp): trace event on exception in raising + context, just before raising exception. + + * struct.c (struct_s_members): forgot to check singletons. + + * struct.c (struct_aref): members can be accessed by names too. + + * array.c (ary_flatten): new method. + + * eval.c (rb_longjmp): prints exception information with `-d'. + + * object.c (any_to_s): remove class name restriction. + +Thu Apr 16 01:38:02 1998 Yukihiro Matsumoto + + * file.c (thread_flock): do not block other threads. + + * eval.c (thread_trap_eval): signals are now delivered to the + current thread again. In case that the current thread is dead, + signals are forwarded to the main thread. + + * string.c (str_new4): need not to duplicate frozen strings. + +Wed Apr 15 08:33:47 1998 Tadayoshi Funaba + + * struct.c (struct_inspect): remove restriction for struct names. + +Wed Apr 15 02:55:02 1998 Kazuya 'Sharl' Masuda + + * x68 patches to config.sub, ext/extmk.rb.in + +Wed Apr 15 01:22:56 1998 Yukihiro Matsumoto + + * string.c (str_dup_frozen): do not duplicate frozen strings. + + * parse.y (yylex): allow nested parenthesises. + + * io.c (obj_displayln): prints newline after `display'ing the + receiver. + + * io.c (io_puts): avoid generating "\n" each time. use RS_default + instead. + + * io.c (f_p): ditto. + +Tue Apr 14 22:18:17 1998 Tadayoshi Funaba + + * struct.c (struct_aref): should not subtract negative index. + +Tue Apr 14 11:34:50 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_10. + + * parse.y: token names prefixed by `t'. + + * struct.c (struct_s_def): supports subclassing of Struct. + + * io.c (io_s_new): supports subclassing of IO. + +Mon Apr 13 11:07:39 1998 Yukihiro Matsumoto + + * eval.c (f_binding): need to restore method name. + + * eval.c (rb_call0): raises SystemStackError, not Fatal. + + * io.c (obj_display): same as `print self'. + + * io.c (f_p): can now be called in the method form. + + * re.c (reg_regsub): needed to be mbchar aware. + +Mon Apr 13 13:18:32 1998 Yukihiro Matsumoto + + * eval.c (thread_trap_eval): all signals delivered to main_thread. + +Mon Apr 13 12:47:03 1998 TAKAHASHI Masayoshi + + * re.c (kcode_set_option): did not set SJIS on SJIS condition. + +Sun Apr 12 22:14:07 1998 Kazunori NISHI + + * array.c (ary_uniq_bang): should be `==', not `='. embarrassing. + +Sat Apr 11 02:13:30 1998 Yukihiro Matsumoto + + * array.c (ary_subseq): SEGVed for `[][1,1]'. + +Fri Apr 10 21:29:06 1998 Tadayoshi Funaba + + * array.c (ary_subseq): add check for beg larger than array length. + +Wed Apr 8 17:24:11 1998 MAEDA shugo + + * dir.c (dir_s_open): can be called with block (like IO#open). + + * dir.c (dir_s_chdir): print directory path on error. + + * dir.c (dir_s_chroot): ditto + + * dir.c (Init_Dir): needed to override `new'. + +Thu Apr 9 18:24:58 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_09. + + * string.c (str_cmp): do not depend on sentinel at the end of the + strings. + + * string.c (str_chomp_bang): forgot to set the sentinel. + +Wed Apr 8 00:59:13 1998 Yukihiro Matsumoto + + * bignum.c (big2int): converted int may be too big to fit in + signed int. + + * parse.y (arg): `foo += 1' should not cause an error. + + * variable.c (rb_const_defined): returned false even if the + constant is defined at the top level. + + * eval.c (f_local_variables): dyna_var->id may be null. should + have checked before calling str_new2(). + +Tue Apr 7 01:15:15 1998 Kaneko Naoshi + + * re.c (reg_regsub): need to check string boundary. + +Tue Apr 7 19:19:12 1998 Yukihiro Matsumoto + + * string.c (str_cmp): returns either 1, 0, -1. + + * array.c (ary_cmp): should check array length, too + +Tue Apr 7 18:50:16 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_08. + +Tue Apr 7 18:31:27 1998 WATANABE Hirofumi + + * instruby.rb (mandir): dll installation for cygwin32 + +Tue Apr 7 01:16:45 1998 Yukihiro Matsumoto + + * config.sub (maybe_os): TOWNS support? + + * config.guess: too strict check for libc versions on linuxes. + + * experimental release 1.1b9_07. + + * array.c (ary_cmp): compare each element using `<=>'. + + * hash.c (hash_each_with_index): yields [value, key] pair. + + * class.c (class_protected_instance_methods): list protected + method names. + + * class.c (ins_methods_i): exclude protected methods. + + * eval.c (PUSH_BLOCK): dynamic variables can be accessed from + eval() with bindings. + +Mon Apr 6 14:49:06 1998 Yukihiro Matsumoto + + * eval.c (thread_yield): must return evaluated value. + +Fri Apr 3 13:07:29 1998 Yukihiro Matsumoto + + * eval.c (thread_schedule): context switch bypassed on wrong + conditions. + + * variable.c (rb_name_class): set classname by id before String + class is initialized (1.0 behavior restored). + +Fri Apr 3 11:25:45 1998 Yukihiro Matsumoto + + * numeric.c (num2int): no implicit conversion from string. + + * numeric.c (num2int): check whether `to_i' returns an Integer. + + * numeric.c (num_zero_p): new method. + + * numeric.c (num_nonzero_p): new method. returns the receiver if + it's not zero. + + * eval.c (obj_instance_eval): the_class should be the object's + singleton class. + + * error.c (exc_s_new): message is converted into a string. + +Thu Apr 2 18:31:46 1998 Yukihiro Matsumoto + + * eval.c (obj_call_init): every object call `initialize'. + +Wed Apr 1 08:51:53 1998 Tadayoshi Funaba + + * parse.y (stmt): UNTIL_MOD should be for stmt, not only for expr. + +Wed Apr 1 01:20:31 1998 Yukihiro Matsumoto + + * object.c (true_and): boolean operators &, | and ^. + +Tue Mar 31 13:23:58 1998 Yukihiro Matsumoto + + * array.c (ary_compact_bang): returns nil, if it does not modify + the array like String's bang methods. + + * array.c (ary_uniq_bang): new method to remove duplicate items. + + * eval.c (bind_s_new): new method. + + * numeric.c (num2int): raise exception if Fixnums too big to + convert into `int' in case that sizeof(int) < sizeof(INT). + + * string.c (str_center): SEGV on negative width. + + * eval.c (eval): forgot to set sourcefile. + +Mon Mar 30 11:12:29 1998 Yukihiro Matsumoto + + * file.c (f_test): raises exception for unknown command. + + * eval.c (Init_eval): `class_eval': alias to the module_eval. + +Mon Mar 30 18:50:42 1998 Tadayoshi Funaba + + * string.c (str_capitalize_bang): did not check string modification. + + * string.c (str_delete_bang): wrong conversion. + + * string.c (str_intern): typo in error message. + +Mon Mar 30 01:44:13 1998 Yukihiro Matsumoto + + * eval.c (obj_instance_eval): accepts block as evaluation body. + No compilation needed each time. + + * eval.c (mod_module_eval): ditto + + * file.c (file_s_umask): umask did not return old values, if no + argument given. + +Sun Mar 29 00:54:23 1998 Yukihiro Matsumoto + + * eval.c (f_throw): nil returned always. + +Sat Mar 28 20:40:12 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_06. + +Sat Mar 28 16:07:11 1998 WATANABE Hirofumi + + * io.c (io_closed): should not cause exception for closed IO. + + * string.c (str_tr): returned nil for success. + +Sat Mar 28 00:47:19 1998 Yukihiro Matsumoto + + * eval.c (f_local_variables): new method to return an array of + local variable names. + + * variable.c (obj_instance_variables): now returns an array of + variable names, as described in the reference. + + * eval.c (rb_attr): honors default method visibility of the + current scope. + +Fri Mar 27 13:49:27 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_05. + + * ruby.c (ruby_prog_init): `site_ruby' added to load_path. + + * ruby.c (ruby_prog_init): load-path order changed. Paths in + the RUBYLIB environment variable comes first in non-tainted + mode. + +Thu Mar 26 11:51:09 1998 Yukihiro Matsumoto + + * eval.c (rb_call): new feature: `protected' methods. + + * string.c (str_dump): new method. + + * eval.c (block_pass): block argument can be nil, which means no + block is supplied for the method. + +Wed Mar 25 21:20:13 1998 Tadayoshi Funaba + + * string.c (str_reverse_bang): string copied to wrong place. + +Wed Mar 25 08:12:07 1998 Yukihiro Matsumoto + + * numeric.c (flo_modulo): caused SEGV if left operand is not a + float value. + + * eval.c (f_eval): optional third and fourth argument to specify + file-name and line-number. + + * eval.c (eval): file-name and line-number set properly. + + * parse.y (assign_in_cond): literal assignment is now warning, not + compile error. + + * error.c (Warn): Warn() always print message, OTOH Waring() + prints when verbose flag is set. + +Tue Mar 24 12:50:06 1998 Yukihiro Matsumoto + + * ruby.c (ruby_prog_init): `.' should come last in the load-path. + + * eval.c (Init_eval): `__send__', alias for `send'. + +Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto + + * string.c (str_chomp_bang): now takes `rs' as an argument. + + * eval.c (thread_free): main_thread should not be freed. + +Fri Mar 20 16:40:34 1998 Yukihiro Matsumoto + + * string.c (str_chomp_bang): chomp! (and other ! methods) returns + nil if it does not modify the string. + + * string.c (str_sub_iter_s): should check last pattern since it + may be matched to null. + +Thu Mar 19 13:48:55 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_04. + + * parse.y (yylex): `10e0.9' should cause syntax error. + +Wed Mar 18 17:46:31 1998 Yukihiro Matsumoto + + * ruby.c (load_file): new file object constant DATA. Only + available for the script from the file. + + * regex.c (re_match): forwarding failure point popped too much. + +Tue Mar 17 18:23:06 1998 Yukihiro Matsumoto + + * math.c (math_frexp): newly added. + + * math.c (math_ldexp): ditto. + + * bignum.c (bigdivmod): calculates modulo. + + * numeric.c (fix_remainder): returns reminder, formerly introduced + as modulo. + + * numeric.c (fix_modulo): calculates proper `modulo'. + + * bignum.c (bigdivmod): wrong sign for reminder. + +Mon Mar 16 17:07:28 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_03. + +Mon Mar 16 16:33:53 1998 WATANABE Hirofumi + + * io.c (pipe_finalize): needed to add pipe_finalize to pipes on + cygwin32. + +Mon Mar 16 14:11:06 1998 Yukihiro Matsumoto + + * class.c (ins_methods_i): needed to consider NOEX_UNDEF. + +Mon Mar 16 13:23:53 1998 WATANABE Hirofumi + + * io.c (io_check_closed): check for `fptr->f2 == NULL'. + + * io.c (io_fptr_close): ditto. + +Mon Mar 16 11:49:25 1998 Yukihiro Matsumoto + + * io.c (pipe_atexit): free()ing referencing pipe_list. + + * range.c (range_length): returns zero, if the first is greater + than the last. + + * signal.c (trap_restore_mask): restore signal mask before raising + exceptions and throws. + +Fri Mar 13 13:49:24 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_02. + + * object.c (mod_clone): need to dups constants and instance + variables. + + * eval.c (rb_eval): forgot to initialize body for NODE_DEFS. + + * eval.c (rb_eval): retrieve self from calling frame, since self + changes sometimes. + + * env.h (FRAME): need to save self in the calling frame. + + * io.c (f_gets_method): rs should be initialized by RS. + +Thu Mar 12 15:33:57 1998 Yukihiro Matsumoto + + * experimental release 1.1b9_01. + + * range.c (range_s_new): check values by `first <= last'. + + * parse.y (lastline_set): fixed offset for $_ and $~ in the local + variable space. + +Wed Mar 11 02:14:17 1998 Yukihiro Matsumoto + + * io.c (io_gets): handle normal case specially for speed. + + * eval.c (rb_disable_super): function to disable superclass's + method explicitly. + + * eval.c (rb_eval): inherits previous method definition's + NOEX_UNDEF-ness, if exists. + + * class.c (rb_define_method): disables superclass's overriding + method by default. + +Wed Mar 11 01:40:48 1998 MAEDA shugo + + * numeric.c (flo_gt,etc.): do not depend on `<=>', to handle NaN. + +Tue Mar 10 00:03:24 1998 Yukihiro Matsumoto + + * ruby.c (load_file): understands multiple options in #! line. + + * regex.c (re_compile_pattern): support for [:alpha:] etc. + +Mon Mar 9 16:53:51 1998 Yukihiro Matsumoto + + * io.h (GetOpenFile): embed io_check_closed in GetOpenFile. + + * sprintf.c (f_sprintf): zero padding failed for negative + integers. + + * sprintf.c (remove_sign_bits): failed to remove some bits. + +Sat Mar 7 21:51:46 1998 MAEDA shugo + + * class.c (ins_methods_i): body may be NULL for some case. + +Fri Mar 6 17:23:07 1998 Yukihiro Matsumoto + + * regex.c (mbcinit): table driven mbchar detection. + + * object.c (obj_alloc): check for allocating instance for the + primitive classes (mostly perfect). + + * ext/curses/curses.c (curses_finalize): restore original state at + interpreter termination. + + * ext/curses/curses.c (curses_addstr): forgot to check argument + type (caused SEGV). now uses STR2CSTR() macro. + +Thu Mar 5 13:47:39 1998 Yukihiro Matsumoto + + * eval.c (block_pass): accepts method object as block args. + + * eval.c (f_missing): use any_to_s() for stringify. + +Wed Mar 4 01:39:52 1998 Yukihiro Matsumoto + + * parse.y (block_arg): new syntax - block argument in the + calling arglist. + + * eval.c (rb_call): no module search. simplified a lot. + + * eval.c (rb_eval): block arg support. + + * parse.y (f_block_arg): new syntax - block argument in the + formal arglist. + +Tue Mar 3 14:20:15 1998 Yukihiro Matsumoto + + * eval.c (obj_method): returns bound method object. + + * eval.c (rb_call): argument check for empty methods. + + * ruby.h (NUM2CHR): new macro, originally from curses module. + +Tue Mar 3 13:03:35 1998 MAEDA shugo + + * io.c (io_putc): new method. + +Tue Mar 3 11:21:28 1998 Yukihiro Matsumoto + + * string.c (str_inspect): more strict charcode detection. + + * eval.c (thread_stop): stopping only thread raises ThreadError + exception. + +Tue Mar 3 08:04:56 1998 Tadayoshi Funaba + + * struct.c (struct_alloc): incomplete struct initialization made + GC to access unallocated addresses. + +Mon Mar 2 16:28:27 1998 Yukihiro Matsumoto + + * eval.c (thread_stop_method): remove Thread#stop. + +Fri Feb 27 18:16:26 1998 Yukihiro Matsumoto + + * version 1.1b9 released. + +Fri Feb 27 09:36:35 1998 Yukihiro Matsumoto + + * hash.c (hash_delete_nil): needed to compare value to nil, since + nil is the valid key for hashes. + + * hash.c (hash_foreach_iter): rehashing causes IndexError. + + * hash.c (hash_foreach_iter): rehash check by pointer comparison. + +Thu Feb 26 17:22:13 1998 Yukihiro Matsumoto + + * parse.y (fname): convert reswords into symbols. + + * parse.y (reswords): reserved words are now embedded in the + syntax (sigh). + + * parse.y: now reserved words can be method names safely. + +Wed Feb 25 15:50:07 1998 Yukihiro Matsumoto + + * eval.c (mod_module_eval): clear the_scope's PRIVATE flag before + calling eval(). + + * gc.c (gc_call_finalizer_at_exit): run finalizers before any data + object being freed. + + * eval.c (rb_eval): needed to keep prot_tag->retval before + evaluating the ensure clause. + +Tue Feb 24 11:16:32 1998 Yukihiro Matsumoto + + * parse.y (yylex): reserved words can be appear as method names at + right after 'def' and `.'(dot), like foo.next. + + * eval.c (return_check): checks for return out of thread (formerly + done in return_value). + + * eval.c (POP_TAG): copy retval to outer level. + + * eval.c (return_value): just set retval, no check, no unwinding. + + * parse.y (nextc): line continuation by backslash at end of line. + + * regex.c (re_compile_pattern): forgot to clear pending_exact on + closing parentheses. + + * parse.y (assignable): should not assign dyna_var to true, if it + is already defined. + +Mon Feb 23 14:35:03 1998 Yukihiro Matsumoto + + * object.c (obj_is_kind_of): no longer accepts true/false/nil. + + * object.c ({true,false,nil}_to_i): can be converted into integers. + +Mon Feb 23 12:11:51 1998 Yukihiro Matsumoto + + * re.c (reg_s_quote): needed to be mbchar aware. + + * eval.c (proc_s_new): wrong iter mark. + +Sat Feb 21 22:59:30 1998 MAEDA shugo + + * io.c (f_syscall): no argument check. + +Fri Feb 20 10:17:51 1998 Yukihiro Matsumoto + + * version 1.1b8 released. + + * ext/kconv/kconv.c (kconv_kconv): default output code now be + determined according to the value of $KCODE. + + * re.c (rb_get_kcode): can retrieve $KCODE from C code. + + * parse.y (stmt): if/unless modifiers returns nil, if condition is + not established. + +Thu Feb 19 11:06:47 1998 Yukihiro Matsumoto + + * ext/kconv/kconv.c (kconv_kconv): charcode can be specified by + code name (JIS, SJIS, EUC like value of $KCODE). + + * regex.c (re_compile_pattern): forgot to fixup_jump for (?:..). + + * regex.c (re_compile_pattern): needed to clear pending_exact on + non-registering grouping (?:...). + +Wed Feb 18 19:54:21 1998 Yukihiro Matsumoto + + * parse.y (here_document): needed to set lex_state to EXPR_END. + +Wed Feb 18 18:45:10 1998 WATANABE Hirofumi + + * patches for cygwin32 applied. + +Wed Feb 18 00:41:31 1998 Yukihiro Matsumoto + + * string.c (str_sub_s): needed to be mbchar aware to increment one + character. + + * regex.c (re_match): \Z matches newline just before the end of + the string. + +Tue Feb 17 00:04:32 1998 Yukihiro Matsumoto + + * time.c (time_arg): Time.gm and Time.local now understands + Time#to_a format. + + * string.c (str_sub_s): replace happened twice for null pattern. + + * regex.c (re_search): null pattern should not match after newline + at the end of string. + + * time.c (time_isdst): now returns boolean value. + + * error.c (rb_check_type): treat special constants in messages. + + * parse.y (yylex): new form `::Const' to see toplevel constants. + + * parse.y (cond): SEGV on `if ()'. + + * gc.c (obj_free): some data needed explicit free(). + +Mon Feb 16 23:55:40 1998 Yukihiro Matsumoto + + * eval.c (blk_free): release duplicated block informations. + + * eval.c (blk_copy_prev): duplicate outer block information into + the heap, when proc/binding created. + +Mon Feb 16 14:38:25 1998 Yukihiro Matsumoto + + * time.c (time_mon): now 1 for January and so on. + + * time.c (time_year): year in 19xx (no + 1900 needed anymore). + +Mon Feb 16 13:28:33 1998 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): need to fetch mbchar's second byte + without translation. + +Mon Feb 16 12:29:27 1998 MAEDA shugo + + * eval.c (f_pass_block): pass iterator block to other method. + +Fri Feb 13 08:16:11 1998 Yukihiro Matsumoto + + * parse.y (parse_regx): handle \s before read_escape(). + + * parse.y (read_escape): `\s' in strings as space. + +Tue Feb 10 17:29:08 1998 Yukihiro Matsumoto + + * version 1.1b7 released. + + * string.c (str_aset): string insertion by `str[n] = str2'. + + * string.c (str_oct): does recognize `0x'. + + * sprintf.c (f_sprintf): use base 10 for conversion from string to + integer. + +Mon Feb 9 14:51:56 1998 Yukihiro Matsumoto + + * numeric.c (do_coerce): proper error message. + + * string.c (str_sum): bug - masked by wrong value. (sigh..) + +Sat Feb 7 15:11:14 1998 Yukihiro Matsumoto + + * string.c (str_empty): new method + +Fri Feb 6 01:42:15 1998 Yukihiro Matsumoto + + * time.c (time_asctime): use asctime(3), not strftime(3). + +Thu Feb 5 18:58:46 1998 Yukihiro Matsumoto + + * io.c (io_fptr_close): do not free path on close(). + + * array.c (ary_filter): new method. + + * enum.c (enum_each_with_index): new method. + +Thu Feb 5 14:10:35 1998 Yukihiro Matsumoto + + * parse.y (primary): singleton class def can be appeared inside + method bodies. + + * hash.c (hash_replace): replace content. + + * string.c (str_replace_method): replace content. + + * array.c (ary_replace_method): replace elements. + + * string.c (str_succ_bang): String#succ! + +Thu Feb 5 18:20:30 1998 WATANABE Hirofumi + + * string.c (str_upcase_bang): multi byte character support. + +Wed Feb 4 13:55:26 1998 Yukihiro Matsumoto + + * array.c (ary_reverse): SEGV on empty array reverse. + +Tue Feb 3 12:24:07 1998 Yukihiro Matsumoto + + * re.c (match_to_a): non matching element should be nil. + + * ruby.c (ruby_load_script): load script after all initialization. + + * bignum.c (str2inum): need to interpret prefix `0' of `0x'. + +Tue Feb 3 10:00:18 1998 WATANABE Hirofumi + + * numeric.c (fix_rshift): use `sizeof(INT)*8' instead of 32. + +Mon Feb 2 14:09:24 1998 Yukihiro Matsumoto + + * ruby.c (set_arg0): grab environment region too. + +Thu Jan 29 18:36:25 1998 WATANABE Hirofumi + + * process.c (rb_proc_exec): check `sh' to be exist. + +Thu Jan 29 18:18:19 1998 Yukihiro Matsumoto + + * io.c (io_stdio_set): assignment to $stdin or $stdout does + reopen() as well as $stderr. + +Thu Jan 29 14:18:40 1998 Yukihiro Matsumoto + + * class.c (mod_ancestors): should not include singleton classes. + + * object.c (obj_type): should not return internal class. + + * io.c (io_reopen): unwillingly closes stdio streams. + +Thu Jan 29 11:50:35 1998 Toshihiko SHIMOKAWA + + * ext/socket/socket.c (udp_addrsetup): forgot to use htons(). + +Tue Jan 27 23:15:24 1998 Yukihiro Matsumoto + + * keywords: __FILE__, __LINE__ are available again. + +Fri Jan 23 14:19:28 1998 Yukihiro Matsumoto + + * version 1.1b6 released. + + * object.c (mod_to_s): need to duplicate classpath. + + * error.c (exc_inspect): need to duplicate classpath. + +Thu Jan 22 00:37:47 1998 Yukihiro Matsumoto + + * ruby.h (STR2CSTR): new macro to retrieve char*. + + * class.c (rb_define_method): `initialize' should always be + private, even if it defined by C extensions. + + * eval.c (rb_eval): `initialize' should always be private. + +Thu Jan 22 16:21:08 1998 Yukihiro Matsumoto + + * eval.c (rb_eval): some singleton class def cause SEGV. + + * eval.c (TMP_ALLOC): replace ALLOCA_N, where thread context + switch may happen. + +Wed Jan 21 01:43:42 1998 Yukihiro Matsumoto + + * eval.c (PUSH_FRAME): do not use ALLOCA_N(). crash on some + platforms that use missing/alloca.c. + + * regex.c (re_compile_pattern): too many pops for non register + subexpr. + + * parse.y (yylex): open parentheses after identifiers are argument + list, even if whitespaces have seen. + +Tue Jan 20 15:19:59 1998 Yukihiro Matsumoto + + * parse.y (terms): quoted word list by %w(a b c). + + * ext/tcltklib/extconf.rb: more accurate check for tcl/tk libs. + + * file.c (rb_stat): most of the FileTest methods (and function + `test') accept File objects as the argument. + +Tue Jan 19 18:19:24 1998 WATANABE Hirofumi + + * ext/extmk.rb.in (install): there should be no newline after install: + + * re.c (MIN): renamed from min(). there's a local variable named + min in the file, so that some cpp will raise an error. + +Mon Jan 19 16:30:05 1998 Yukihiro Matsumoto + + * version 1.1b5 released. + + * process.c (rb_syswait): no exception raised. + +Fri Jan 16 00:43:43 1998 Yukihiro Matsumoto + + * ruby.h (CLONESETUP): copies its singleton classes too. + + * class.c (singleton_class_attached): saves binded object in the + singleton classes. + + * eval.c (rb_eval): calls singleton_method_added even in the + singleton class clauses. + +Fri Jan 15 23:22:43 1998 WATANABE Hirofumi + + * ruby.c (proc_options): -S does not recognize PATH. + +Thu Jan 15 02:03:12 1998 Yukihiro Matsumoto + + * eval.c (rb_clear_cache_by_id): clear only affected cache + entries. + +Wed Jan 14 02:14:48 1998 Yukihiro Matsumoto + + * ext/socket/socket.c: new UDP/IP socket classes. + +Tue Jan 13 10:00:18 1998 Yukihiro Matsumoto + + * string.c (str_cmp): ignorecase($=) works wrong. + +Fri Jan 9 13:19:55 1998 Yukihiro Matsumoto + + * version 1.1b4 released. + + * eval.c (f_missing): class name omitted from the error message. + + * error.c (exc_inspect): description changed. + + * string.c (Init_String): GlobalExit's superclass did not filled, + since GlobalExit created earlier than String. + +Thu Jan 8 12:10:09 1998 Yukihiro Matsumoto + + * parse.y (aryset): expr in the brackets can be null. + +Wed Jan 7 21:13:56 1998 Yukihiro Matsumoto + + * io.c (io_reopen): keep stderr unclosed. + + * io.c (io_errset): keep stderr unclosed. + +Tue Jan 6 00:27:43 1998 Yukihiro Matsumoto + + * parse.y: syntax modified for `while expr do .. end' etc. + + * process.c (f_exec,f_system): can supply arbitrary name for the + new process. + +Mon Jan 5 16:59:13 1998 WATANABE Hirofumi + + * file.c (file_s_basename): removes any extension by ".*". + +Sun Jan 4 19:36:22 1998 WATANABE Hirofumi + + * parse.y (yylex): needed to update lex_p (reading point). + +Sat Jan 3 19:14:14 1998 WATANABE Hirofumi + + * class.c,object.c: duplicate defines mKernel and cFinxnum. + +Fri Jan 2 20:38:59 1998 Yukihiro Matsumoto + + * ext/curses/curses.c (NUM2CHAR): uses the first character for + string arguments. + + * array.c (ary_fill): did not extend array for ranges. + + * array.c (beg_len): did not return end pos bigger than size. + +Fri Jan 2 02:09:16 1998 WATANABE Hirofumi + + * dir.c (dir_s_chdir): bug in nil check. + + * array.c (ary_fill): bug in nil check. + +Tue Dec 30 11:46:23 1997 Yukihiro Matsumoto + + * hash.c (env_path_tainted): checks directories in PATH + environment variable are not world writable. + + * ruby.c (load_file): invoke specified interpreter if the #! line + does not contain the word `ruby'. + +Fri Dec 26 03:26:41 1997 Yukihiro Matsumoto + + * string.c (uscore_get): type information included in the error + message. + + * variable.c (f_untrace_var): does not free trace-data within + trace procedure. + +Thu Dec 25 02:50:29 1997 Yukihiro Matsumoto + + * version 1.1b3 released. + + * ruby.h: inlining some functions on gcc 2.x + +Tue Dec 23 02:47:33 1997 Yukihiro Matsumoto + + * eval.c (rb_eval): public/private information kept in the current + scope, to remove undesired state from the class/module. + + * time.c (time_strftime): remove hidden limit of 100 bytes of + result string, using malloc'ed buffer. + + * hash.c (hash_update): merges the contents of another hash, + overriding existing keys. + + * regex.c (must_instr): totally re-written. + + * io.c (read_all): try to allocate proper sized buffer using + fstat(2) for speedup. + +Sat Dec 20 00:27:28 1997 Yukihiro Matsumoto + + * regex.c (must_instr): need to skip 2 bytes for mbchars. + +Fri Dec 19 01:18:29 1997 Yukihiro Matsumoto + + * version 1.1b2 released. + + * eval.c (check_errat): check and convert (if necessary) traceback + information before assigning to the variable $@. + + * eval.c (f_raise): optional third argument to specify traceback + information. + + * io.c (f_open): prevent infinite recursive call. + +Thu Dec 18 19:33:47 1997 Yukihiro Matsumoto + + * string.c (str_rindex): now accepts regexp as index. + +Thu Dec 18 18:42:50 1997 WATANABE Hirofumi + + * ext/socket/extconf.rb: modified to detect win32 socket lib. + +Thu Dec 18 00:25:03 1997 Yukihiro Matsumoto + + * re.c (reg_equal): checks for source and casefold and kcode matching. + + * marshal.c: became built-in module. + + * ext/marshal/marshal.c (r_object): displays struct name for + non-compatible struct. + + * string.c (str_index_method): now searches character (fixnum) in + the string. + + * string.c (str_include): redefine `include?'. + + * regex.c (re_match): start_nowidth saves current stack position + to stop_nowidth. + + * regex.c (re_compile_pattern): add space to stop_nowidth to save + runtime stack position. + +Tue Dec 16 14:57:43 1997 Yukihiro Matsumoto + + * string.c (scan_once): wrong exception for regexp that match with + null string (use substr instead of subseq). + +Sat Dec 13 00:13:32 1997 Yukihiro Matsumoto + + * parse.y (expr): remove bare assocs from expr rule. + + * rbconfig.rb: renamed from config.rb (it was too generic name). + +Fri Dec 12 00:50:25 1997 Yukihiro Matsumoto + + * parse.y (expr): warns if BEGIN or END appear in the method + bodies. + + * string.c (str_match): calls y =~ x if y is neither String nor + Regexp so that eregex.rb works. + + * eval.c (f_at_exit): to register end proc. + + * class.c (rb_define_module_function): define 'function' method + for the Module, not private method. + + * class.c (rb_define_function): function to define `function' method. + + * eval.c (rb_eval): inherit visibility from superclass's method + except when it is set to `function' + + * eval.c (rb_eval): new visibility status `function'. + + * parse.y (yycompile): do not clear eval_tree. thus enable multiple + command line script by option `-e'. + + * eval.c (rb_eval): END execute just once. + + * parse.y (expr): BEGIN/END built in the syntax. + +Thu Dec 11 13:14:35 1997 Yukihiro Matsumoto + + * object.c (mod_le): Module (or Class) comparison. + + * eval.c (rb_remove_method): raises NameError if named method does + not exist. + + * ext/curses/curses.c: remove CHECK macro for BSD curses. + +Thu Dec 11 12:44:01 1997 WATANABE Hirofumi + + * pack.c: sun4 cc patch + +Wed Dec 10 15:21:36 1997 Yukihiro Matsumoto + + * ext/marshal/marshal.c (marshal_load): can supply evolution proc + object as optional second argument. + + * re.c (reg_source): get source string of the regular expression. + +Tue Dec 9 10:05:17 1997 Yukihiro Matsumoto + + * version 1.1b1 released. + + * parse.y (tokadd): token buffer overrun. + + * ruby.c (ruby_prog_init): forgot to protect rb_argv0 from gc. + + * eval.c (ruby_run): call finalizers at process termination. + + * gc.c (gc_call_finalizer_at_exit): call free proc for every Data + Wrapper, and finalizer for specified objects at termination. + + * version.c (show_version): version format changed. + + * regex.c (re_match): wrong match with non-greedy if they appear + more than once in regular expressions. + + * sample/ruby-mode.el (ruby-expr-beg): forgot to handle modifiers. + +Mon Dec 8 19:00:15 1997 Yukihiro Matsumoto + + * io.c (io_puts): just put a newline if no argument given. + + * ext/tcltklib/tcltklib.c (lib_mainloop): thread-aware tk handle + when $tk_thread_safe is set. + + * ext/tcltklib/tcltklib.c (lib_mainloop): use Tcl_DoOneEvent() + instead of Tk_MainLoop(). + +Mon Dec 6 07:11:16 1997 MAEDA shugo + + * io.c (io_puts): core dumped without any argument. + +Fri Dec 5 18:17:17 1997 Yukihiro Matsumoto + + * eval.c (mod_remove_method): remove (not undef) a method from the + class/module. + + * variable.c (obj_remove_instance_variable): method to remove + instance variables. + +Thu Dec 4 13:50:29 1997 Yukihiro Matsumoto + + * version 1.1b0 released. + + * string.c (str_aref): called str_index for regexp. + +Mon Dec 1 15:24:41 1997 Yukihiro Matsumoto + + * compar.c (cmp_between): wrong comparison made. + +Wed Nov 26 18:18:05 1997 Yukihiro Matsumoto + + * lib/mkmf.rb: generate Makefile for extension modules out of ruby + source tree. use like `ruby -r mkmf extconf.rb'. + + * numeric.c (fix2str): enlarge buffer to prevent overflow on some + machines. + + * parse.y (here_document): wrong line number generated after here-doc. + +Fri Nov 21 13:17:12 1997 Yukihiro Matsumoto + + * parse.y (yylex): skip multibyte characters in comments. + +Wed Nov 19 17:19:20 1997 Yukihiro Matsumoto + + * object.c (nil_to_a): nil.to_a => []. + + * parse.y (call_args): wrong node generation. + +Tue Nov 18 10:13:08 1997 Yukihiro Matsumoto + + * array.c (Init_Array): Array#=== works as Array#include? + + * regex.c (re_compile_pattern): insert initialize code for jump_n, + before entering loops. + + * re.c (reg_search): does not save registers unless $& etc appear + in the script. + +Mon Nov 17 13:01:43 1997 Yukihiro Matsumoto + + * eval.c (is_defined): add defined? check for receivers and + arguments for calls. + + * re.c (reg_search): cache last match object. + + * re.c (match_aref): $[0] etc. are available. + +Sat Nov 15 00:11:36 1997 WATANABE Hirofumi + + * io.c (io_s_popen): "rb" detection + +Fri Nov 14 18:28:40 1997 Yukihiro Matsumoto + + * string.c (scan_once): returns whole match if the pattern does + not contain any parentheses. + +Thu Nov 13 14:39:06 1997 Yukihiro Matsumoto + + * string.c (str_sub): returns copy of the receiver string, even if + any substitution occurred. + + * regex.c (re_compile_pattern): no-width match by (?=..), (?!..). + +Wed Nov 12 13:44:47 1997 Yukihiro Matsumoto + + * time.c: remove coerce from Time class. + + * regex.c (re_match): non-greedy match by ??, *? +?, {n,m}?. + +Mon Nov 10 11:24:51 1997 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): non-registering parens (?:..). + + * regex.c (re_compile_pattern): new meta character \< (wordbeg) + and \> (wordend). + + * regex.c (re_compile_pattern): embedded comment for regular + expression by (?#...). + +Fri Nov 7 16:58:24 1997 Yukihiro Matsumoto + + * regex.c (re_compile_pattern): perl5 regexp \A and \Z available. + + * regex.c (re_compile_pattern): can expand compile stack dynamically. + + * regex.c (PUSH_FAILURE_POINT): wrong compare condition. + +Wed Nov 2 16:00:00 1997 WATANABE Hirofumi + + * string.c (str_sub_s): "".sub! "", "" => "\000" + +Fri Oct 31 15:52:10 1997 Yukihiro Matsumoto + + * parse.y (assoc): keyword assoc like {fg->"black"}. + +Thu Oct 30 17:33:38 1997 Yukihiro Matsumoto + + * io.c (io_println): print with newline, which is not affected by + the values of $/ and $\. + +Thu Oct 30 16:54:01 1997 WATANABE Hirofumi + + * string.c (str_chop_bang): "".chop caused SEGV. + + * string.c (str_chomp_bang): method to chop out last newline. + +Mon Oct 27 13:49:13 1997 Yukihiro Matsumoto + + * ext/extmk.rb.in: library may have pathname contains `.' + + * eval.c (rb_rescue): should not protect SystemError. + +Fri Oct 24 10:58:53 1997 Yukihiro Matsumoto + + * io.c (io_s_with_open_stream): ensures to close stream. + +Thu Oct 23 11:17:44 1997 Yukihiro Matsumoto + + * io.c (io_errset): value of $stderr can be changed (to any IO + object). + + * io.c (next_argv): $< can be anything that responds to `write'. + + * file.c (file_s_with_open_file): ensures to close file. + + * error.c (exception): create error under the current class/module. + + * range.c (range_eqq): fixnum check for last needed too. + +Wed Oct 22 12:52:30 1997 Yukihiro Matsumoto + + * ext/socket/socket.c: Socket::Constants added. + + * file.c: File::Constants added for inclusion. + + * array.c (ary_join): call ary_join() recursively for the 1st + array element. + +Mon Oct 20 12:18:29 1997 WATANABE Hirofumi + + * ruby.c (load_file): wrong condition for #! check with -x. + + * file.c (file_s_dirname): did return "" for "/a". + +Fri Oct 17 14:29:09 1997 Yukihiro Matsumoto + + * ruby.c: now works on alpha-linux. + + * bignum.c (bigadd): some undefined side effect order assumed. + +Wed Oct 15 17:49:24 1997 Yukihiro Matsumoto + + * intern.h: function prototypes added. + +Mon Oct 13 16:54:18 1997 Yukihiro Matsumoto + + * class.c (rb_define_class_id): call superclass's `inherited' + method when making subclasses. + + * parse.y (nextc): clear lex_lastline at the end of file. + + * object.c (Init_Object): need to undef Class#append_features. + + * eval.c (rb_eval): no warning on extending classes or modules. + +Thu Oct 9 11:17:50 1997 Yukihiro Matsumoto + + * eval.c (error_print): the exception name follows after the error + message. + + * eval.c (compile_error): error message slightly changed. + + * parse.y (nextc): script parsing will be terminated by __END__ at + beginning of line. + + * eval.c (compile_error): `__END__' is no longer a keyword. + + * parse.y (nextc): protect lastline read from script stream. + +Tue Oct 7 14:06:06 1997 Yukihiro Matsumoto + + * version 1.1 alpha9 released. + + * eval.c (mod_append_features): renamed from extend_class. + + * eval.c (rb_eval): defining method calls `method_added'. + + * eval.c (ruby_options): exception while processing options must + terminate the interpreter. + + * error.c (Init_Exception): wrong method configuration. `new' + should have been a singleton method. + +Mon Oct 6 18:55:38 1997 Yukihiro Matsumoto + + * ext/kconv/kconv.c (kconv_guess): code to guess character code + from string. + +Mon Oct 6 18:38:17 1997 WATANABE Hirofumi + + * pack.c: now encode/decode base64 by `m' template. + +Fri Oct 3 10:51:10 1997 Yukihiro Matsumoto + + * MANIFEST: needed to include lex.c in the distribution. + + * eval.c (ruby_options): f_require() called too early. + + * eval.c (rb_provide): module extensions should always be `.o'. + +Thu Oct 2 11:38:31 1997 Yukihiro Matsumoto + + * version 1.1 alpha8 released. + + * ext/marshal/marshal.c (r_object): remove temporal regist for + structs. (caused problem if structs form cycles.) + + * parse.y (match_gen): static binding for match(=~) calls + with regexp literals. + +Wed Oct 1 15:26:55 1997 Yukihiro Matsumoto + + * eval.c: protect retval in struct tag from GC for C_ALLOCA. + + * eval.c: no more pointer value from setjmp/longjmp. + +Wed Oct 1 14:01:49 1997 WATANABE Hirofumi + + * ext/marshal/marshal.c (w_byte): argument must be char. + +Wed Oct 1 10:30:22 1997 Yukihiro Matsumoto + + * variable.c (mod_const_at): global constants now belongs to the + class Object. + + * object.c (Init_Object): new global constant NIL. + + * ext/marshal/marshal.c (marshal_dump): try to set binmode. + + * ext/marshal/marshal.c (r_object): forgot to re-regist structs in + the object table. + + * eval.c (ruby_options): call Init_ext() before any require() + calls by `-r'. + +Fri Sep 30 14:29:22 1997 WATANABE Hirofumi + + * ext/marshal/marshal.c (w_object): marshal dumped core. + +Tue Sep 30 10:27:39 1997 Yukihiro Matsumoto + + * sample/test.rb: bignum test suits added. + + * eval.c (rb_eval): new pseudo variable `true' and `false'. + + * parse.y: new keywords `true' and `false' added. + +Mon Sep 29 13:37:58 1997 Yukihiro Matsumoto + + * ruby.c (forbid_setid): forbid some options in suid mode. + + * ruby.h (NUM2DBL): new macro to convert into doubles. + +Mon Sep 27 09:53:48 1997 EGUCHI Osamu + + * bignum.c: modified for speeding. + +Fri Sep 26 18:27:59 1997 WATANABE Hirofumi + + * sample/from.rb: some extensions. + +Mon Sep 29 13:15:56 1997 Yukihiro Matsumoto + + * parse.y (lhs): no more syntax error on `obj.CONSTANT = value'. + +Fri Sep 26 14:41:46 1997 Yukihiro Matsumoto + + * eval.c (ruby_run): deferred calling Init_ext() just before eval_node. + +Fri Sep 26 13:27:24 1997 WATANABE Hirofumi + + * io.c (io_isatty): forgot to return TRUE value. + +Fri Sep 25 11:10:58 1997 EGUCHI Osamu + + * eval.c: use _setjmp/_longjmp instead of setjmp/longjmp on some + platforms. + +Wed Sep 24 17:43:13 1997 Yukihiro Matsumoto + + * string.c (Init_String): String#taint and String#taint? added. + + * class.c (mod_ancestors): ancestors include the class itself. + +Wed Sep 24 00:57:00 1997 Katsuyuki Okabe + + * X68000 patch. + +Tue Sep 23 20:42:30 1997 EGUCHI Osamu + + * parse.y (node_newnode): SEGV on null node setup. + +Mon Sep 22 11:22:46 1997 Yukihiro Matsumoto + + * ruby.c (ruby_prog_init): wrong safe condition check. + +Sun Sep 21 14:46:02 1997 MAEDA shugo + + * error.c (exc_inspect): garbage added to classpath. + +Fri Sep 19 11:49:23 1997 Yukihiro Matsumoto + + * parse.y (newtok): forgot to adjust buffer size when shrinking + the token buffer. + + * enum.c (enum_find): rb_eval_cmd() does not return value. + + * io.c (pipe_open): close fds on pipe exec. fcntl(fd, F_SETFD, 1) + no longer used. + +Tue Sep 16 17:54:25 1997 Yukihiro Matsumoto + + * file.c (f_test): problem if wrong command specified. + + * ruby.c (ruby_prog_init): close stdaux and stdprn for MSDOS. + + * ruby.c (ruby_prog_init): should not add path from environment + variable, if ruby is running under setuid. + + * process.c (init_ids): check suid check for setuid/seteuid etc. + +Mon Sep 15 00:42:04 1997 WATANABE Hirofumi + + * regex.c (re_compile_pattern): \w{3} and \W{3} did not work. + +Thu Sep 11 10:31:48 1997 Yukihiro Matsumoto + + * version 1.1 alpha7 released. + + * ext/socket/socket.c (sock_new): no setbuf() for NT. + + * io.c (rb_fopen,rb_fdopen): set close-on-exec for every fd. + +Wed Sep 10 15:55:31 1997 Yukihiro Matsumoto + + * ext/marshal/marshal.c (r_bytes0): extra big length check. + +Tue Sep 9 16:27:14 1997 Yukihiro Matsumoto + + * io.c (pipe_fptr_atexit): clean up popen()'ed fptr. + + * error.c (set_syserr): some system has error code that is bigger + than sys_nerr. grrr. + +Mon Sep 8 18:33:33 1997 Yukihiro Matsumoto + + * io.c (io_s_new): dereferenced nil for optional mode. + +Fri Sep 5 10:26:03 1997 Yukihiro Matsumoto + + * class.c (class_instance_methods): do not include methods which + are changed to private in subclasses. + +Thu Sep 4 12:38:53 1997 Yukihiro Matsumoto + + * variable.c (f_global_variables): list name of the global + variables. + + * object.c (obj_id): returns unique integer. + +Wed Sep 3 14:05:16 1997 Yukihiro Matsumoto + + * version 1.1 alpha6 released. + + * eval.c (mod_s_constants): context sensitive constant list. + + * variable.c (mod_constants): no more `all' option. + + * variable.c (mod_const_of): the values for autoload classes are + their name strings. + + * class.c (class_instance_methods): no special treatment for + singleton classes. + + * object.c (obj_singleton_methods): returns list of singleton + method names. + + * parse.y (yylex): no here document after `class' keyword. + + * eval.c (f_load): expand path if fname begins with `~'. + +Tue Sep 2 13:19:48 1997 Yukihiro Matsumoto + + * class.c (ins_methods_i): do not list undef'ed methods. + +Mon Sep 1 13:42:48 1997 Yukihiro Matsumoto + + * version 1.1 alpha5 released. + + * object.c (mod_attr_reader): create methods to define attribute + reader/write/accessor. + + * class.c (rb_define_attr): always defines accessors. + + * eval.c (rb_call): alias occurred in the module body caused SEGV. + + * parse.y: did not generate here document strings properly. + +Mon Sep 1 11:43:57 1997 WATANABE Hirofumi + + * parse.y (yylex): heredoc dropped an extra character. + +Fri Aug 29 11:10:21 1997 Yukihiro Matsumoto + + * class.c (class_instance_methods): same method names should not + appear more than once. + + * parse.y (yylex): spaces can follow =begin/=end. + + * variable.c (find_class_path): look for class_tbl also for + unnamed fundamental classes, such as Object, String, etc. + + * variable.c (rb_name_class): can't name class before String class + is initialized. + + * inits.c (rb_call_inits): unrecognized dependency from GC to + Array. + + * variable.c (find_class_path): could not find class if Object's + iv_tbl is NULL. + +Thu Aug 28 13:12:05 1997 Yukihiro Matsumoto + + * version 1.1 alpha4 released. + + * variable.c (mod_constants): wrong condition for singleton + class. + + * parse.y (yylex): revised `=begin' skip code. + + * parse.y (here_document): forgot to free(eos). + + * parse.y (yylex): spaces after `<<' prohibited for here + documents to avoid confusing with operator `<<'. + + * eval.c (is_defined): separated from rb_eval(). + +Wed Aug 27 11:32:42 1997 Yukihiro Matsumoto + + * version 1.1 alpha3 released. + + * variable.c (mod_name): returns name of the class/module. + + * parse.y (here_document): finally here document available now. + + * variable.c (fc_i): some classes/modules does not have iv_tbl. + + * variable.c (find_class_path): avoid infinite loop. + +Tue Aug 26 13:43:47 1997 Yukihiro Matsumoto + + * eval.c (rb_eval): undef'ing non-existing method will raise + NameError exception. + + * object.c (class_s_new): needed to create metaclass too. + + * eval.c (error_print): no class name print for anonymous class. + + * eval.c (rb_longjmp): proper exception raised if raise() called + without arguments, with $! or $@ set. + + * object.c (Init_Object): superclass()'s method argument setting + was wrong again. + + * class.c (mod_ancestors): list superclasses and included modules + in priority order. + +Mon Aug 25 11:53:11 1997 Yukihiro Matsumoto + + * version 1.1 alpha2 released. + + * sample/ruby-mode.el (ruby-parse-region): auto-indent now + supports "\\" in the strings. + + * struct.c (struct_getmember): new API to get member value from C + language side. + +Sat Aug 23 21:39:05 1997 Yukihiro Matsumoto + + * parse.y (assignable): remove unnecessary local variable + initialize by nil. + +Fri Aug 22 14:26:40 1997 Yukihiro Matsumoto + + * eval.c (error_print): modified exception print format. + +Thu Aug 21 16:10:58 1997 Yukihiro Matsumoto + + * sample/ruby-mode.el (ruby-calculate-indent): wrong indent level + calculated with keyword operators. + +Thu Aug 21 11:36:58 1997 WATANABE Hirofumi + + * parse.y (arg): ary[0] += 1 cause SEGV + +Wed Aug 20 17:28:50 1997 Yukihiro Matsumoto + + * ruby.c (ruby_process_options): require() all modules after + processing all options + + * process.c (rb_proc_exec): more security checks added. + + * process.c (rb_proc_exec): insecure path on exec. + + * hash.c (f_getenv): PATH modification security check. + +Tue Aug 19 00:15:38 1997 Yukihiro Matsumoto + + * version 1.1 alpha1 released. + + * eval.c (mod_eval): work as normal eval() if second binding + argument given. + + * eval.c (rb_call): did not raise ArgumentError if too many + arguments more than optional arguments (without rest arg). + + * eval.c (rb_eval): did not work well for op_asgn2 (attribute + self assignment). + + * eval.c (Init_Thread): returns main thread. + +Mon Aug 18 09:25:56 1997 Yukihiro Matsumoto + + * object.c (inspect_i): did not display T_DATA instance variables. + + * parse.y: provides more accurate line number information. + + * eval.c (thread_value): include value's backtrace information in + the variable `$@'. + + * eval.c (f_abort): print backtrace and exit. + +Sat Aug 16 00:17:44 1997 Yukihiro Matsumoto + + * eval.c (class_new_instance): do not make instance from virtual + classes. + + * object.c (class_s_new): do not make subclass of singleton class. + +Fri Aug 15 15:49:46 1997 Yukihiro Matsumoto + + * eval.c (call_trace_func): block context switch in the trace + function. + + * eval.c (rb_eval): clear method cache at class extension. + + * object.c (obj_type): returns object's class even if it defines + singleton methods. + +Fri Aug 15 19:40:43 1997 WATANABE Hirofumi + + * ext/socket/socket.c (Init_socket): small typo caused SEGV. + +Wed Aug 13 17:51:46 1997 Yukihiro Matsumoto + + * version 1.1 alpha0 released. + +Local variables: +add-log-time-format: (lambda () + (let* ((time (current-time)) + (diff (+ (cadr time) 32400)) + (lo (% diff 65536)) + (hi (+ (car time) (/ diff 65536)))) + (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t))) +indent-tabs-mode: t +tab-width: 8 +end: diff --git a/lib/ruby-1.9.1-rc1/doc/ChangeLog-YARV b/lib/ruby-1.9.1-rc1/doc/ChangeLog-YARV new file mode 100644 index 0000000..c9d3291 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/ChangeLog-YARV @@ -0,0 +1,6917 @@ +# $Id: ChangeLog 590 2006-12-31 09:02:34Z ko1 $ +# +# YARV ChangeLog +# from Mon, 03 May 2004 01:24:19 +0900 +# + +Sun Dec 31 18:01:50 2006 Koichi Sasada + + * bin/* : ruby/trunk/bin 11437 + + +Sun Dec 31 17:42:05 2006 Koichi Sasada + + * eval.c : remove old Kernel#funcall definition + + +2006-12-30(Sat) 07:59:26 +0900 Koichi Sasada + + * catch up ruby/trunk 11437 + + * eval_intern.h : reorder tag initialization + + * eval.c : fix to support __send!, funcall and prohibit funcall as + send + + * eval_error.h, eval_jump.h, eval_safe.h : fix prototypes + + * eval_method.h, vm.c : check re-definition at rb_add_method() + + * yarvcore.h : fix typo + + * compile.c : fix white spaces + + * lib/delegate.rb : fix to support __send, ... + + * lib/getoptlong.rb : fix to work on YARV + + * lib/rss/parser.rb : use __send! instead of __send__ + + * sample/test.rb : comment out codes which use |&b| type block parameter + + * ext/ripper/extconf.rb : turn off + + * test/ripper/test_files.rb, test_parser_events.rb, + test_scanner_events.rb : fix to check it has ripper module + + * vm_dump.c : remove showing file path length limitation + + * yarvtest/test_eval.rb : use __send! instead of __send__ + + +2006-12-19(Tue) 11:46:08 +0900 Koichi Sasada + + * doc/* : added + + * ext/openssl : added + + * ext/ripper : added + + * test/openssl : added + + * test/ripper : added + + * misc : added + + * rb/ -> tool/ : renamed + + * common.mk : fixed for above change + + * ruby_doc/* : move to topdir + + * sample/* : added + + * test2.rb : removed + + +2006-12-15(Fri) 09:42:46 +0900 Koichi Sasada + + * compile.c : remove obsolete codes + + * insns.def : fix a comment of getconstant + + +2006-12-13(Wed) 16:26:06 +0900 Koichi Sasada + + * blockinlining.c, compile.c, compile.h, debug.c, debug.h, + insnhelper.h, insns.def, iseq.c, thread.c, thread_pthread.ci, + thread_pthread.h, thread_win32.ci, thread_win32.h, vm.c, vm.h, + vm_dump.c, vm_evalbody.ci, vm_opts.h.base, yarv.h, + yarv_version.h, yarvcore.c, yarvcore.h : + add a header includes copyright + + +2006-12-12(Tue) 13:13:32 +0900 Koichi Sasada + + * rb/insns2vm.rb : add PREFETCH() statement + + * vm.h : ditto + + * yarvcore.h : fix LIKELY(x) and + remove main_thread_val field from yarv_vm_t + + * yarvcore.c : ditto + + * thread.c : support fork + + * eval_thread.c : ditto + + * process.c : ditto + + * signal.c : ditto + + * test/ruby/test_signal.rb : + + * thread_pthread.ci : rename timer thread functions + + * thread_win32.ci : ditto + + +2006-11-10(Fri) 21:29:13 +0900 Koichi Sasada + + * compile.c : fix to compile arguments + + * insns.def : fix to duplicate first array value on concatarray + instruction + + * yarvtest/test_bin.rb : add a test for above change + + * sample/test.rb : fix to catch up Ruby HEAD (fix to remove test about + module duplicate) + + +2006-11-10(Fri) 12:49:11 +0900 Koichi Sasada + + * vm_macro.def : fix to inherit visibility on + NODE_SUPER method invocation + + +2006-11-10(Fri) 09:13:46 +0900 Koichi Sasada + + * class.c : revert module duplicate inclusion + + * parse.y : catch up current Ruby HEAD + + * node.h : ditto + + * compile.c : ditto + + * gc.c : ditto + + * iseq.c : ditto + + * eval_thread.c : define Continuation (null class) + + * vm_dump.c : fix to output backtrae to stderr + + * yarvtest/test_block.rb : remove unsupported test + + * yarvtest/test_class.rb : add a test about super + + * yarvtest/test_syntax.rb : add a test about case/when + + +2006-11-09(Thu) 10:22:59 +0900 Koichi Sasada + + * call_cfunc.h -> call_cfunc.ci : renamed + + * vm_evalbody.h, vm_evalbody.ci : ditto + + * thread_pthread.h, thread_pthread.ci : separate declaration and + implementation + + * thread_win32.h, thread_win32.ci : ditto + + * thread.c : use *.ci instead of *.c as implementation + + * vm.c : ditto + + * common.mk : fix rules for above changes + + +2006-11-08(Wed) 17:23:23 +0900 Koichi Sasada + + * vm_dump.c : show C level backtrace (pointer only) with + backtrace() function (glibc feature) + + * configure.in : ditto + + * yarvcore.c : add NSDR method (show C level backtrace) + + * error.c : fix indent + + +2006-11-07(Tue) 13:17:10 +0900 Koichi Sasada + + * eval.c (rb_set_errinfo) : added + + * ruby.h : ditto + + * version.h : fix version number + + * lib/webrick/utils.rb : fix to remove Thread.critical + + * ext/dbm, dl, gdbm, iconv, io, pty, sdbm : added + + * test/dbm, gdbm, io, logger, net, readline, sdbm, soap, + webrick, win32ole, wsdl, xsd : added + + +2006-11-06(Mon) 22:32:18 +0900 Koichi Sasada + + * array.c : import Ruby HEAD + + * ext/socket/extconf.rb : ditto + + * ext/socket/socket.c : ditto + + * gc.c : ditto + + * lib/date.rb : ditto + + * lib/net/imap.rb : ditto + + * lib/rss/0.9.rb : ditto + + * lib/set.rb : ditto + + * lib/soap/mapping/rubytypeFactory.rb : ditto + + * lib/soap/mimemessage.rb : ditto + + * lib/soap/property.rb : ditto + + * lib/webrick/httprequest.rb : ditto + + * lib/webrick/httputils.rb : ditto + + * lib/xmlrpc/create.rb : ditto + + * lib/xsd/codegen/gensupport.rb : ditto + + * object.c : ditto + + * ruby.h : ditto + + * string.c : ditto + + * version.h : ditto + + * rb/ir.rb : fix to use "diffs" directory + + * vm_dump.c : add "const" + + +2006-11-06(Mon) 16:36:47 +0900 Koichi Sasada + + * eval_proc.c : remove "static" from external global variables + + * eval_thread.c : ditto + + * array.c : fix indent + + * insns.def : add a suitable cast + + * vm_macro.def : allow scalar value on splat arguments + + * yarvtest/test_block.rb : fix to synchronize Ruby HEAD + + * rb/insns2vm.rb : remove String#each for 1.9 + + * template/vm.inc.tmpl : ditto (remove String#each_with_index) + + +2006-11-06(Mon) 13:22:34 +0900 Koichi Sasada + + * iseq.c : fixed GC debugging outputs + + * rb/parse.rb : fixed output format + + +2006-11-04(Sat) 09:46:50 +0900 Koichi Sasada + + * compile.c : fix to duplicate "#{'foo'}" string + + * yarvtest/test_bin.rb : add a test for above + + * ext/readline/readline.c : import Ruby HEAD + + * keywords : ditto + + * lex.c : ditto + + * parse.y : ditto + + * lib/mkmf.rb : ditto + + * test/ruby/test_hash.rb : fix to current specification + + * test/ruby/test_string.rb : ditto + + +2006-11-03(Fri) 20:58:36 +0900 Koichi Sasada + + * ext/nkf/nkf-utf8/utf8tbl.h : missed to add + + * configure.in : import ruby HEAD + + * test/ruby/test_array.rb : ditto + + * test/ruby/test_assignment.rb : ditto + + * test/ruby/test_clone.rb : ditto + + * test/socket/test_socket.rb : ditto + + * test/socket/test_unix.rb : ditto + + * test/strscan/test_stringscanner.rb : ditto + + * test/testunit/collector/test_dir.rb : ditto + + +2006-11-03(Fri) 20:22:24 +0900 Koichi Sasada + + * array.c : import current ruby HEAD and apply API changes + This version has some known bugs + + * bignum.c : ditto + + * blockinlining.c : ditto + + * class.c : ditto + + * compile.c : ditto + + * dir.c : ditto + + * dln.c : ditto + + * enum.c : ditto + + * enumerator.c : ditto + + * error.c : ditto + + * eval.c : ditto + + * eval_error.h : ditto + + * eval_jump.h : ditto + + * eval_load.c : ditto + + * eval_proc.c : ditto + + * ext/* + + * file.c : ditto + + * gc.c : ditto + + * hash.c : ditto + + * insns.def : ditto + + * instruby.rb : ditto + + * intern.h : ditto + + * io.c : ditto + + * iseq.c : ditto + + * lib/* + + * marshal.c : ditto + + * math.c : ditto + + * missing/vsnprintf.c : ditto + + * mkconfig.rb : ditto + + * node.h : ditto + + * numeric.c : ditto + + * object.c : ditto + + * oniguruma.h : ditto + + * pack.c : ditto + + * parse.y : ditto + + * prec.c : ditto + + * process.c : ditto + + * random.c : ditto + + * range.c : ditto + + * rb/ir.rb : ditto + + * re.c : ditto + + * regcomp.c : ditto + + * regerror.c : ditto + + * regexec.c : ditto + + * regint.h : ditto + + * regparse.c : ditto + + * regparse.h : ditto + + * ruby.c : ditto + + * ruby.h : ditto + + * rubytest.rb : ditto + + * runruby.rb : ditto + + * sample/test.rb : ditto + + * signal.c : ditto + + * sprintf.c : ditto + + * st.c : ditto + + * st.h : ditto + + * string.c : ditto + + * struct.c : ditto + + * test/* + + * thread.c : ditto + + * time.c : ditto + + * util.c : ditto + + * variable.c : ditto + + * version.h : ditto + + * vm.c : ditto + + * vm_dump.c : ditto + + * vm_macro.def : ditto + + * win32/* + + +2006-10-31(Tue) 22:47:50 +0900 Koichi Sasada + + * parse.y : fix NEWHEAP bugs (import HEAD) + + * ruby.c, intern.h, yarvcore.c (rb_load_file) : change to + return parsed node pointer + + * rb/ir.rb : add check mode + + +2006-09-01(Fri) 22:05:28 +0900 Koichi Sasada + + * compile.c : fix a bug of peephole optimization and enable + regexp optimization + + +2006-08-21(Mon) 05:27:48 +0900 Koichi Sasada + + * lib/mathn.rb : remove "remove_method :gcd2" + + * opt_insn_unif.def : unset opt setting + + * opt_operand.def : ditto + + +2006-08-18(Fri) 17:55:31 +0900 Koichi Sasada + + * common.mk : add dependency of yarvcore.h to thread.o + + * gc.c : change comment line + + * thread.c : remove some line break + + * yarvcore.c : reoder initialize sequence to mark main thread + + +2006-08-18(Fri) 16:51:34 +0900 Koichi Sasada + + * yarvcore.h : add a support for cache values per thread + + * yarvcore.c : ditto + + * gc.c : ditto + + * thread.c : move a expression after acquiring lock + + * compile.c : add a cast to remove warning + + +2006-08-18(Fri) 02:07:45 +0900 Koichi Sasada + + * compile.c : fix to return rhs value on ATTRASGIN + + * insns.def (setn) : add insn setn + + * yarvtest/test_bin.rb : add tests for above + + +2006-08-17(Thu) 22:46:08 +0900 Koichi Sasada + + * vm.c : clear callee_id ([yarv-dev:1073]) + + +2006-08-17(Thu) 22:14:15 +0900 Koichi Sasada + + * thread_pthread.h : fix error message + + +2006-08-17(Thu) 12:23:52 +0900 Koichi Sasada + + * eval.c : change initilize routine order ([yarv-dev:1067]) + + * yarvcore.c (Init_yarv) : init th->machine_stack_start + + * thread_pthread.h : add malloc value check ([yarv-dev:1066]) + + * insns.def (opt_eq) : fix typo ([yarv-dev:1072]) + + * yarvtest/test_opts.rb : add a test for above + + * yarvtest/test_class.rb : add a test for last commit + + +2006-08-17(Thu) 11:02:16 +0900 Koichi Sasada + + * class.c (clone_method) : check undef-ed method ([yarv-dev:1068]) + + +2006-08-15(Tue) 15:07:43 +0900 Koichi Sasada + + * insns.def : fix opt_plus routine ([yarv-dev-en:149]) + + * yarvtest/test_opts.rb : add tests for above + + +2006-08-06(Sun) 06:24:51 +0900 Koichi Sasada + + * common.mk : fix build rule (build only ruby binary when benchmark) + + * yarvcore.[ch] : fix and add yarv_iseq_new_with_* API + + * blockinlining.c : ditto + + * compile.c : ditto + + * compile.h : ditto + + * iseq.c : ditto + + * eval_method.h : check redefinition for specialized instruction + + * insnhelper.h : ditto + + * insns.def : ditto + + * vm.c : ditto + + * vm.h : ditto + + * numeric.c : add Fixnum#succ + + * thread.c : remove duplicated method Thread#current + + * yarvcore.c : remove duplicated method Proc#clone + + * yarvtest/test_opts.rb : added + + +2006-07-20(Thu) 04:10:13 +0900 Koichi Sasada + + * compile.c : fix [yarv-dev:1041] problem (raise TypeError) + + * eval.c : rb_funcall2 send as NOEX_PRIVATE and check scope + + +2006-07-20(Thu) 03:38:46 +0900 Koichi Sasada + + * yarvcore.c : fix [yarv-dev:1040] bug + + +2006-07-18(Tue) 18:45:52 +0900 Koichi Sasada + + * some files : set property "svn:eol-style" as native + + +2006-07-18(Tue) 18:35:55 +0900 Koichi Sasada + + * gc.h : fix a static function name + + * vm.c : remove Japanese comments + + * yarvcore.c : add a comment + + * some files : set property "svn:eol-style" as native + + +2006-07-18(Tue) 16:48:01 +0900 Koichi Sasada + + * vm.c : remove unused code + + * compile.c : add checking value + + * iseq.c : ditto + + * yarvcore.c : fix yarv_th_eval prototype declaration + + * yarvtest/yarvtest.rb : use compile instead of parse method + + +2006-07-12(Wed) 15:18:58 +0900 Koichi Sasada + + * yarv_version.h : 0.4.1 + + * Changes : ditto + + +2006-07-12(Wed) 13:38:03 +0900 Koichi Sasada + + * eval.c : fix indent + + * gc.h : fix syntax bug + + * thread_pthread.h : vanish warnning message + + * iseq.c : ditto + + * compile.c : ditto + + * thread.c : ditto + + * vm.c : ditto + + * yarvcore.c : prohibit tail call optimization to mark + iseq object + + * yarvcore.h : add some allocator function declaration + + * yarvtest/test_eval.rb : remove output + + +2006-07-12(Wed) 05:01:23 +0900 Koichi Sasada + + * yarvcore.c : undef alloc funcs + + * eval_proc.c : ditto (use factory faction) + + * thread.c : ditto + + * vm.c : ditto + + * iseq.c : fix compile option creation + + * rb/allload.rb : use compile_file method + + * rb/compile.rb : ditto + + * rb/parse.rb : ditto + + * template/insnstbl.html : hide mail addr + + +2006-07-11(Tue) 21:34:29 +0900 Minero Aoki + + * test/ruby/test_dir.rb: new test test_JVN_13947696. + + +2006-07-11(Tue) 21:26:41 +0900 Minero Aoki + + * test/ruby/test_alias.rb: new test test_JVN_83768862. + + +2006-07-11(Tue) 11:33:49 +0900 Koichi Sasada + + * compile.c : fix compile error on C90 + + +2006-07-11(Tue) 10:40:23 +0900 Koichi Sasada + + * disasm.c : removed + + * iseq.c : added + + * common.mk : ditto + + * blockinlining.c : Get*Val => Get*Ptr + + * eval.c : ditto + + * yarvcore.c : ditto + + * eval_proc.c : ditto + + * vm_dump.c : ditto + + * vm_macro.def : ditto + + * signal.c : ditto + + * vm.c : ditto + + * thread.c : ditto + + * compile.c : rename local variable insnobj => iobj + + * compile.c : support yarv_compile_option_t + + * gc.h : added + + * insns.def : use OPT_CHECKED_RUN instead of IGNORE_OPTIMIZE + + * rb/compile.rb : use compile option + + * template/optinsn.inc.tmpl : fix function name + + * vm_opts.h.base : change macros + + * rb/insns2vm.rb : ditto + + * yarv.h : fix yarvcore_eval_parsed parameter type + + * yarvcore.c : fix some interfaces (functions) + + * yarvcore.h : add a type yarv_compile_option_t + + +2006-07-06(Thu) 13:45:20 +0900 Koichi Sasada + + * lib/yasm.rb : pass builder object if block arity == 1 + + +2006-07-05(Wed) 11:23:50 +0900 Koichi Sasada + + * lib/yasm.rb : fix method name + + * vm.c (th_set_top_stack) : check toplevel or not + + +2006-07-04(Tue) 20:05:38 +0900 Koichi Sasada + + * rb/compile.rb : added + + * yarvtest/yarvtest.rb : disable load/store test + + +2006-07-04(Tue) 18:17:15 +0900 Koichi Sasada + + * compile.c : fix some bugs about load iseq data + + * disasm.c : ditto (store) + + * eval.c (rb_f_local_variables) : fix bugs + + * insns.def : fix otp_ltlt condition bug + + * vm.c : ditto + + * yarvcore.c : rename some functions + + * yarvtest/yarvtest.rb : add iseq load/store tests + (to enable this, remove comment) + + +2006-07-03(Mon) 01:54:23 +0900 Koichi Sasada + + * eval_thread.c : add parameter "th" to thread_set_raised + + * yarvcore.h : ditto + + * eval_intern.h : ditto + + * eval.c : ditto + + * eval_error.h : declare with ANSI style + + * disasm.c : rename iseq_iseq2simpledata() to iseq_data_to_ary + + * lib/yasm.rb : rename Instruction#to_simpledata to + Instruction#to_a + + * yarvcore.c : ditto + + * vm.c : fix bug (Proc.new{|*args| p args}.call(1) #=> 1) + + * yarvtest/test_proc.rb : add a tests for above + + +2006-06-21(Wed) 09:19:06 +0900 Koichi Sasada + + * compile.c : remove yarv_iseq_t#catch_table_ary and + add yarv_iseq_t#compile_data#catch_table_ary + + * compile.h : ditto + + * yarvcore.c : ditto + + * yarvcore.h : ditto + + * eval_thread.c : remove unused code + + * thread.c : add rb_gc_mark_threads() (from eval_thread.c) + + +2006-05-31(Wed) 21:26:38 +0900 Koichi Sasada + + * parse.y : prohibit tail call optimization to mark vparsr + object + + +2006-05-25(Thu) 15:37:11 +0900 Koichi Sasada + + * blockinlining.c : support NEW_ATTRASGN node + + * class.c : skip undefined method to collect ([yarv-dev:999]) + + * yarvtest/test_class.rb : add a test for above + + * compile.c : fix opt_regexpmatch1 condition + + * lib/monitor.rb : fix [yarv-dev:1009] + + * rb/insns2vm.rb : fix typo + + * thread.c : prohibit unlock by not mutex owner thread + + * vm_opts.h.base : change default option + + +2006-05-18(Thu) 16:00:50 +0900 Koichi Sasada + + * intern.h : fix prototype declarations for last re.c change + + +2006-05-18(Thu) 12:12:03 +0900 Koichi Sasada + + * rb/runruby.rb : added + + * thread.c (rb_thread_alone) : check if vm->living_threads + is available + + +2006-05-18(Thu) 12:05:35 +0900 Koichi Sasada + + * signal.c : not mask SIGSEGV + + * thread.c : fix debug output on Win32 + + * thread.c, thread_pthread.h : add some debug prints + + * yarvcore.c : mark machine registers on thread_mark + + +2006-05-17(Wed) 18:09:20 +900 Yukihiro Matsumoto + + * dir.c (sys_warning): should not call a vararg function + rb_sys_warning() indirectly. [ruby-core:07886] + + +2006-05-17(Wed) 16:41:41 +900 Yukihiro Matsumoto + + * re.c (rb_reg_initialize): should not allow modifying literal + regexps. frozen check moved from rb_reg_initialize_m as well. + + * re.c (rb_reg_initialize): should not modify untainted objects in + safe levels higher than 3. + + * re.c (rb_memcmp): type change from char* to const void*. + + * dir.c (dir_close): should not close untainted dir stream. + + * dir.c (GetDIR): add tainted/frozen check for each dir operation. + + +2006-05-07(Sun) 21:06:28 +0900 Koichi Sasada + + * thread.c : remove Mutex#unlock_and_stop and add Mutex#sleep + + * lib/monitor.rb : ditto + + * lib/thread.rb : ditto + + * thread_pthread.h : fix stack size + + * thread_win32.h : fix sleep + + * yarvcore.h : disable to use get/setcontext + + * lib/webrick/server.rb : add experimental implementation + using thraeds pool + + +2006-05-05(Fri) 13:59:00 +0900 Koichi Sasada + + * test/ruby/test_signal.rb : disable a test + + * thread.c : do trylock before lock on mutex_lock + + * thread_win32.h : use CriticalSection instead of Mutex + + +2006-05-05(Fri) 03:03:22 +0900 Koichi Sasada + + * common.mk : vtune rule make run test.rb + + * disasm.c : fix syntax errors (on VC) + + * yarvcore.c : ditto + + * lib/thread.rb : Mutex#synchronize is defined here + + * lib/*.rb : ditto + + * signal.c : separate pthread or not + + * thread.c : support lightweight wakeup + + * thread_pthread.h : ditto + + * thread_win32.h : ditto + + * yarvcore.h : ditto + + * yarvtest/test_thread.rb : restore last change + + +2006-05-04(Thu) 18:11:43 +0900 Koichi Sasada + + * eval_thread.c : remove rb_thread_interrupt + + * intern.h : ditto + + * signal.c : change signal transfer route + + * thread.c : ditto + + * thread_pthread.h : ditto + + * thread_win32.h : ditto + + * yarv.h : support GET_VM() + + * yarvcore.h : change yarv_thread_t/yarv_vm_t structure + + * yarvtest/test_thread.rb : decrease threads to test + + +2006-05-04(Thu) 00:26:18 +0900 Koichi Sasada + + * thread_pthread.h : experimental support of thread cache + + +2006-04-25(Tue) 22:30:14 +0900 Koichi Sasada + + * yarvcore.h : remove struct yarv_cmethod_info, add + data structure for profiling and extend yarv_control_frame_t + + * vm.c : make pop_frame() and apply above change + + * eval.c : ditto + + * vm_dump.c : ditto + + * vm_macro.def : ditto + + * insns.def (leave): use pop_frame() instead of + POP_CONTROL_STACK_FRAME() macro + + * insnhelper.h : remove some macros + + * yarvcore.c : change th_set_top_stack() prototype + + +2006-04-18(Tue) 18:37:08 +0900 Koichi Sasada + + * compile.c, disasm.c : support export/import exception + information + + * yarvcore.h : change "struct catch_table_entry" member variable + order + + +2006-04-13(Thu) 17:11:30 +0900 Koichi Sasada + + * bignum.c : import ruby 1.9 HEAD (Ruby 1.9.0 2006-04-08) + + * dir.c : ditto + + * enumerator.c : ditto + + * ext/.document : ditto + + * ext/extmk.rb : ditto + + * ext/nkf/lib/kconv.rb : ditto + + * ext/nkf/nkf-utf8/nkf.c : ditto + + * ext/nkf/nkf-utf8/utf8tbl.c : ditto + + * ext/nkf/nkf.c : ditto + + * ext/nkf/test.rb : ditto + + * ext/socket/.cvsignore : ditto + + * ext/win32ole/sample/excel2.rb : ditto + + * ext/win32ole/tests/testOLEMETHOD.rb : ditto + + * ext/win32ole/tests/testOLEPARAM.rb : ditto + + * ext/win32ole/tests/testOLETYPE.rb : ditto + + * ext/win32ole/tests/testOLETYPELIB.rb : ditto + + * ext/win32ole/tests/testOLEVARIABLE.rb : ditto + + * ext/win32ole/tests/testOLEVARIANT.rb : ditto + + * ext/win32ole/tests/testWIN32OLE.rb : ditto + + * ext/win32ole/tests/testall.rb : ditto + + * ext/win32ole/win32ole.c : ditto + + * gc.c : ditto + + * instruby.rb : ditto + + * io.c : ditto + + * lib/delegate.rb : ditto + + * lib/fileutils.rb : ditto + + * lib/find.rb : ditto + + * lib/irb/ruby-lex.rb : ditto + + * lib/mkmf.rb : ditto + + * lib/net/http.rb : ditto + + * lib/open-uri.rb : ditto + + * lib/pathname.rb : ditto + + * lib/rational.rb : ditto + + * lib/rdoc/parsers/parse_rb.rb : ditto + + * lib/rdoc/ri/ri_paths.rb : ditto + + * lib/resolv.rb : ditto + + * lib/test/unit/collector/objectspace.rb : ditto + + * lib/webrick/httpservlet/cgihandler.rb : ditto + + * math.c : ditto + + * mkconfig.rb : ditto + + * object.c : ditto + + * oniguruma.h : ditto + + * pack.c : ditto + + * parse.y : ditto + + * re.c : ditto + + * re.h : ditto + + * regcomp.c : ditto + + * regerror.c : ditto + + * regparse.c : ditto + + * ruby.h : ditto + + * rubytest.rb : ditto + + * runruby.rb : ditto + + * string.c : ditto + + * test/digest/test_digest.rb : ditto + + * test/pathname/test_pathname.rb : ditto + + * test/ruby/envutil.rb : ditto + + * test/ruby/test_float.rb : ditto + + * test/ruby/test_pack.rb : ditto + + * time.c : ditto + + * util.c : ditto + + * version.h : ditto + + * win32/mkexports.rb : ditto + + * win32/resource.rb : ditto + + * win32/win32.c : ditto + + +2006-04-11(Tue) 11:26:53 +0900 Koichi Sasada + + * rb/yasm.rb : move to lib/yasm.rb + + +2006-04-09(Sun) 03:04:04 +0900 Koichi Sasada + + * compile.c : change to accept method iseq object when loading from + simple data + + * yarvcore.c : add a debug output + + * rb/yasm.rb : change some interfaces + + +2006-04-07(Fri) 20:25:03 +0900 Koichi Sasada + + * compile.c : fix miss about range of catch "next" + + * eval.c : add braces + + +2006-04-07(Fri) 11:09:43 +0900 Koichi Sasada + + * common.mk : fix some make rules + + * insns.def : rename some instructions name + + * rb/insns2vm.rb : change some operand type name + + * vm_evalbody.h : ditto + + * template/insns.inc.tmpl : add YARV_MAX_INSTRUCTION_SIZE macro + + * compile.c, disasm.c, yarvcore.c : support load/store iseq from/to simple + data structure such as array, literals, and so on + + * rb/yasm.rb : supported + + * vm.c : change interface of eval_define_method + + * yarvcore.h : remove unused externals + + +2006-03-08(Wed) 10:31:29 +0900 Minero Aoki + + * lib/delegate.rb (DelegateClass): do not delegate #send and + #funcall. + + +2006-02-27(Mon) 22:39:17 +0900 Minero Aoki + + * lib/thread.rb: last commit causes busy loop, revert it. [yarv-dev:990] + + * lib/thread.rb: non_block=true wrongly caused ThreadError. + + +2006-02-27(Mon) 21:33:49 +0900 Koichi Sasada + + * common.mk : fix to display command line + + * compile.c : fix comparison between a pointer and 0 + + * debug.c : fix to output stder + + * disasm.c : add debug function + + * vm_dump.c : ditto + + * eval_proc.c : fix to skip class definition + + * ruby.h : fix T_VALUE to T_VALUES + + * gc.c : ditto + + * node.h : fix prototypes + + * vm.c : add VM_DEBUG macro + + * vm.c : fix compile error on VC++ + + * vm.c : fix to inherit last lfp[0] on th_set_finish_env + + * vm.c : fix to add one svar location for any frame + + * vm_macro.def : ditto + + * yarvcore.h : add YARV_CLASS_SPECIAL_P() and YARV_BLOCK_PTR_P() + + * rdoc/ : removed + + * insns.def : fix to propagete throw state + + +2006-02-27(Mon) 13:54:47 +0900 Minero Aoki + + * ext/syslog: imported from Ruby CVS trunk HEAD. + + * ext/racc: ditto. + + +2006-02-27(Mon) 12:47:10 +0900 Minero Aoki + + * parse.y: follow coding style change. + + +2006-02-27(Mon) 11:53:07 +0900 Minero Aoki + + * lib/README: imported from Ruby CVS trunk HEAD. + + * lib/gserver.rb: ditto. + + * lib/readbytes.rb: ditto. + + * lib/parsearg.rb: ditto. + + * lib/racc: ditto. + + * lib/rinda: ditto. + + +2006-02-27(Mon) 11:27:19 +0900 Minero Aoki + + * lib/thread.rb (Queue#pop): faster code. [yarv-dev:973] + + * lib/thread.rb (Queue#pop): avoid to push same thread in to + @waiting. + + +2006-02-23(Thu) 23:32:53 +0900 Minero Aoki + + * lib/open3.rb: imported from Ruby CVS trunk HEAD (rev 1.12). + + +2006-02-23(Thu) 15:10:09 +0900 Koichi Sasada + + * eval.c : support rb_frame_self() + + * eval_intern.h (th_get_ruby_level_cfp) : return 0 if no cfp + + * eval_load.c : comment out scope set + + * yarvcore.c : fix to initialize/free process of iseq + + * vm.c (th_invoke_proc) : fix to set special cref always + + * yarvtest/test_proc.rb : add a test for above + + +2006-02-22(Wed) 23:33:47 +0900 Koichi Sasada + + * common.mk : add rule "runruby" + + * eval_thread.c : remove obsolete comment + + * eval.c : remove unused functions + + * signal.c : ditto + + * gc.c : add rb_register_mark_object() and use it + + * eval_load.c : ditto + + * eval_proc.c : ditto + + * ext/etc/etc.c : ditto + + * ext/win32ole/win32ole.c : ditto + + * ruby.h : ditto + + * yarvcore.h : ditto + + * thread.c : add rb_thread_run_parallel() + + * yarvcore.c : change bootstrap + + +2006-02-22(Wed) 19:27:33 +0900 Koichi Sasada + + * ext/win32ole/.cvsignore : removed + + * ext/win32ole/.document : ditto + + +2006-02-22(Wed) 18:17:06 +0900 Koichi Sasada + + * yarvcore.c : set Binding as YARVCore::VM::Binding + + +2006-02-22(Wed) 12:54:45 +0900 Koichi Sasada + + * ChangeLog : remove needless line + + +2006-02-22(Wed) 12:49:02 +0900 Koichi Sasada + + * rubysig.h : remove CHECK_INTS + + * eval.c : ditto + + * eval_load.c : ditto + + * ext/readline/readline.c : ditto + + * thread.c : ditto + + * win32/win32.c : ditto + + * yarv_version.h : 0.4.0 + + * Changes : ditto + + +2006-02-22(Wed) 11:36:04 +0900 Koichi Sasada + + * test.rb : removed + + +2006-02-22(Wed) 11:12:17 +0900 Koichi Sasada + + * README : renewed + + * version.c : fixed version message + + * yarvext/ : removed + + +2006-02-22(Wed) 10:33:04 +0900 Koichi Sasada + + * lib/.document : imported from Ruby 1.9 HEAD + + * .document : ditto + + * ext/.document : ditto + + * lib/ftools.rb : ditto + + * lib/rdoc/ : ditto + + * eval_thread.c : remove unused functions + + * process.c : ditto + + * rb/insns2vm.rb : compare modified date of vm_opts.h and + vm_opts.h.base + + * ruby.h : rename RValue to RValues + + * gc.c : ditto + + * vm.c : ditto + + +2006-02-22(Wed) 06:32:10 +0900 Koichi Sasada + + * configure.in : remove last commit + + +2006-02-22(Wed) 06:18:53 +0900 Koichi Sasada + + * configure.in : add default program prefix "-yarv" + + +2006-02-22(Wed) 06:11:36 +0900 Koichi Sasada + + * common.mk : change default rule (same as HEAD) + + * configure : removed + + * eval.c : remove last commit + + * vm.c : fix stack traverse + + * yarvcore.c : initialize top of control frame + + * version.c : 2.0 + + * version.h : ditto + + +2006-02-22(Wed) 04:50:42 +0900 Koichi Sasada + + * eval.c : change to rewind C level control frame + + * vm.c : change to initialize cfp#proc and fix comparison of + cfp and limit_cfp + + * yarvcore.c : remove last commit + + +2006-02-22(Wed) 03:25:56 +0900 Koichi Sasada + + * yarvcore.c : initialize each stack of thread + + +2006-02-22(Wed) 00:02:08 +0900 Koichi Sasada + + * thread.c : fix synchornize return value ([yarv-dev:957]) + and some synchornization error + + * thread_pthread.h : add debug helper function + + +2006-02-21(Tue) 20:54:28 +0900 Koichi Sasada + + * eval.c : fix place of rb_thread_terminate_all() + + * eval_thread.c : remove unused functions + + * yarv.h : remove GET_VM() + + * eval_jump.h : ditto + + * insns.def : ditto + + * vm_dump.c : + + * intern.h : change rb_thread_signal_raise/exit interface + + * signal.c : ditto + + * thread.c : ditto + + * test/ruby/test_beginendblock.rb : use block with IO.popen + + * thread_pthread.h : fix interrupt process + + * thread_win32.h : ditto + + * yarvcore.c : fix thread free process + + * yarvcore.h : remove yarv_vm_t#thread_critical, etc + + +2006-02-21(Tue) 12:42:44 +0900 Koichi Sasada + + * eval_thread.c : remove unused function rb_thread_schedule() + + * thread.c : rename yarv_thread_schedule to rb_thread_schedule() + + * thread.c, eval.c : fix to terminate all thread and barrier at + eval.c#ruby_cleanup() + + * thread_win32.h : remove native_thread_cleanup() + + * thread_pthread.h : ditto + + * yarvcore.c : ditto + + * yarvtest/test_thread.rb : separete assersions to tests + + +2006-02-21(Tue) 02:13:33 +900 Yukihiro Matsumoto + + * parse.y (f_arglist): should set command_start = Qtrue for + command body. [ruby-talk:180648] + + +2006-02-20(Mon) 20:41:07 +0900 Koichi Sasada + + * thread.c : fix to synchronize signal_thread_list access + and fix typo + + +2006-02-20(Mon) 17:54:58 +0900 Koichi Sasada + + * eval_proc.c : remove unused Binding functions and + set is_lambda of Proc used define_method + + * yarvcore.c : support Proc#dup/clone, Binding#dup/clone + + * sample/test.rb : remove unsupport features (Proc as Binding) + + +2006-02-20(Mon) 16:28:59 +0900 Koichi Sasada + + * common.mk : add a dependency to vm.c on eval_intern.h + + * eval_intern.h : fix to initialize tag->tag + + * yarvtest/test_jump.rb : add tests for above + + * eval_jump.h : use local variable + + +2006-02-20(Mon) 15:13:24 +0900 Koichi Sasada + + * benchmark/bm_vm3_thread_create_join.rb : added + + * test/yaml/test_yaml.rb : imported from Ruby CVS trunk HEAD + + +2006-02-20(Mon) 14:49:46 +0900 Minero Aoki + + * lib/yaml.rb: imported from Ruby CVS trunk HEAD. + + * lib/yaml: ditto. + + * ext/syck: ditto. + + +2006-02-20(Mon) 13:58:03 +0900 Koichi Sasada + + * compile.c : support block parameter which is NODE_ATTRASGN + + * yarvtest/test_block.rb : add tests for above + + * compile.c : fix NODE_DASGN_CURR level check + + * compile.c : fix "||=" (at firtst, check "defined? val") + + * compile.c : fix NODE_MATCH3 (permute receiver and argument) + + * yarvtest/test_bin.rb : add tests for above + + * eval.c : add rb_each() + + * test/ruby/test_signal.rb : increment a timeout value + + * thread.c, yarvcore.h : fix "join" flow + + * thread_pthread.h : ditto + + * thread_win32.h : ditto + + * yarvtest/test_thread.rb : add a test for above + + * vm.h, vm.c, vm_dump.c, insns.def : add FRAME_MAGIC_LAMBDA and + support return from lambda (especially retrun from method defined + by "define_method") + + * yarvtest/test_method.rb : add a test for above + + * yarvcore.c : remove unused functions + + +2006-02-20(Mon) 11:22:31 +0900 Minero Aoki + + * test/ruby/test_eval.rb: now Object#funcall is defined. + + +2006-02-20(Mon) 11:04:32 +0900 Minero Aoki + + * lib/irb/lc/ja/CVS: removed. + + +2006-02-20(Mon) 10:55:59 +0900 Minero Aoki + + * lib/mutex_m.rb: imported from Ruby CVS trunk HEAD. + + * lib/observer.rb: ditto. + + * lib/wsdl: ditto. + + * lib/monitor.rb: ditto (removing Thread.critical=). + + * lib/xsd: ditto. + + * lib/soap: ditto. + + * lib/drb.rb: ditto. + + * lib/drb: ditto. + + +2006-02-20(Mon) 10:49:31 +0900 Minero Aoki + + * yarvcore.c (Init_yarvcore): fix typo (duo -> dup). + + +2006-02-19(Sun) 01:27:08 +0900 Koichi Sasada + + * vm.c : "return" from lambda{} break block + + * eval.c : Unsupport Proc as Binding + + * test/ruby/test_eval.rb : apply above changes + + * yarvcore.c : remove unused function yarv_yield_values() + + +2006-02-18(Sat) 03:19:36 +0900 Koichi Sasada + + * thread.c, insns.def : fix passing value when thread killed + + * yarvtest/test_thread.rb : add tests for above + + +2006-02-19(Sun) 01:19:42 +0900 Minero Aoki + + * lib/thread.rb (SizedQueue): didn't work. This patch was + contributed by yukimizake. [yarv-dev:916] + + +2006-02-18(Sat) 03:19:36 +0900 Koichi Sasada + + * thread.c, insns.def : fix passing value when thread killed + + * yarvtest/test_thread.rb : add tests for above + + +2006-02-18(Sat) 02:40:18 +0900 Koichi Sasada + + * insns.def, vm.c, vm_macro.def : change BMETHOD algorithm + ([yarv-dev:914]) + + * yarvtest/test_class.rb : add a test for above + + +2006-02-17(Fri) 23:59:51 +0900 Koichi Sasada + + * vm.c, yarv.h : change th_invoke_proc() interface + + * eval_proc.c : ditto + + * signal.c : ditto + + * thread.c : ditto + + * yarvcore.c : ditto + + * vm_macro.def : ditto and fix NODE_BMETHOD call + + * vm.c : change name ("th_set_env()" to "push_frame()") and + change interface + + * insns.def : ditto + + * eval.c : remove proc_jump_error() + + * benchmark/bm_app_answer.rb : added + + * vm_opts.h.base : add optimize option + + +2006-02-17(Fri) 13:37:57 +0900 Koichi Sasada + + * eval.c, ruby.h : add rb_errinfo() + + * eval_error.h (error_pos) : fix process order + + * bin/erb : imported from ruby 1.9 + + * bin/irb : ditto + + * bin/rdoc : ditto + + * bin/ri : ditto + + * bin/testrb : ditto + + * ext/curses/.cvsignore : ditto + + * ext/curses/curses.c : ditto + + * ext/curses/depend : ditto + + * ext/curses/extconf.rb : ditto + + * ext/curses/hello.rb : ditto + + * ext/curses/mouse.rb : ditto + + * ext/curses/rain.rb : ditto + + * ext/curses/view.rb : ditto + + * ext/curses/view2.rb : ditto + + * ext/fcntl/.cvsignore : ditto + + * ext/fcntl/depend : ditto + + * ext/fcntl/extconf.rb : ditto + + * ext/fcntl/fcntl.c : ditto + + * ext/readline/README : ditto + + * ext/readline/README.ja : ditto + + * ext/readline/depend : ditto + + * ext/readline/extconf.rb : ditto + + * ext/readline/readline.c : ditto + + * ext/win32ole/.document : ditto + + * ext/zlib/doc/zlib.rd : ditto + + * ext/zlib/extconf.rb : ditto + + * ext/zlib/zlib.c : ditto + + * lib/cgi/.document : ditto + + * lib/cgi/session.rb : ditto + + * lib/cgi/session/pstore.rb : ditto + + * lib/shell/builtin-command.rb : ditto + + * lib/shell/command-processor.rb : ditto + + * lib/shell/error.rb : ditto + + * lib/shell/filter.rb : ditto + + * lib/shell/process-controller.rb : ditto + + * lib/shell/system-command.rb : ditto + + * lib/shell/version.rb : ditto + + * lib/xmlrpc/.document : ditto + + * lib/xmlrpc/README.rdoc : ditto + + * lib/xmlrpc/README.txt : ditto + + * lib/xmlrpc/base64.rb : ditto + + * lib/xmlrpc/client.rb : ditto + + * lib/xmlrpc/config.rb : ditto + + * lib/xmlrpc/create.rb : ditto + + * lib/xmlrpc/datetime.rb : ditto + + * lib/xmlrpc/httpserver.rb : ditto + + * lib/xmlrpc/marshal.rb : ditto + + * lib/xmlrpc/parser.rb : ditto + + * lib/xmlrpc/server.rb : ditto + + * lib/xmlrpc/utils.rb : ditto + + * rdoc/README : ditto + + * rdoc/code_objects.rb : ditto + + * rdoc/diagram.rb : ditto + + * rdoc/dot/dot.rb : ditto + + * rdoc/generators/chm_generator.rb : ditto + + * rdoc/generators/html_generator.rb : ditto + + * rdoc/generators/ri_generator.rb : ditto + + * rdoc/generators/template/chm/chm.rb : ditto + + * rdoc/generators/template/html/hefss.rb : ditto + + * rdoc/generators/template/html/html.rb : ditto + + * rdoc/generators/template/html/kilmer.rb : ditto + + * rdoc/generators/template/html/old_html.rb : ditto + + * rdoc/generators/template/html/one_page_html.rb : ditto + + * rdoc/generators/template/xml/rdf.rb : ditto + + * rdoc/generators/template/xml/xml.rb : ditto + + * rdoc/generators/xml_generator.rb : ditto + + * rdoc/markup/sample/rdoc2latex.rb : ditto + + * rdoc/markup/sample/sample.rb : ditto + + * rdoc/markup/simple_markup.rb : ditto + + * rdoc/markup/simple_markup/fragments.rb : ditto + + * rdoc/markup/simple_markup/inline.rb : ditto + + * rdoc/markup/simple_markup/lines.rb : ditto + + * rdoc/markup/simple_markup/preprocess.rb : ditto + + * rdoc/markup/simple_markup/to_flow.rb : ditto + + * rdoc/markup/simple_markup/to_html.rb : ditto + + * rdoc/markup/simple_markup/to_latex.rb : ditto + + * rdoc/markup/test/AllTests.rb : ditto + + * rdoc/markup/test/TestInline.rb : ditto + + * rdoc/markup/test/TestParse.rb : ditto + + * rdoc/options.rb : ditto + + * rdoc/parsers/parse_c.rb : ditto + + * rdoc/parsers/parse_f95.rb : ditto + + * rdoc/parsers/parse_rb.rb : ditto + + * rdoc/parsers/parse_simple.rb : ditto + + * rdoc/parsers/parserfactory.rb : ditto + + * rdoc/rdoc.rb : ditto + + * rdoc/ri/ri_cache.rb : ditto + + * rdoc/ri/ri_descriptions.rb : ditto + + * rdoc/ri/ri_display.rb : ditto + + * rdoc/ri/ri_driver.rb : ditto + + * rdoc/ri/ri_formatter.rb : ditto + + * rdoc/ri/ri_options.rb : ditto + + * rdoc/ri/ri_paths.rb : ditto + + * rdoc/ri/ri_reader.rb : ditto + + * rdoc/ri/ri_util.rb : ditto + + * rdoc/ri/ri_writer.rb : ditto + + * rdoc/template.rb : ditto + + * rdoc/tokenstream.rb : ditto + + * rdoc/usage.rb : ditto + + * test/xmlrpc/data/bug_bool.expected : ditto + + * test/xmlrpc/data/bug_bool.xml : ditto + + * test/xmlrpc/data/bug_cdata.expected : ditto + + * test/xmlrpc/data/bug_cdata.xml : ditto + + * test/xmlrpc/data/bug_covert.expected : ditto + + * test/xmlrpc/data/bug_covert.xml : ditto + + * test/xmlrpc/data/datetime_iso8601.xml : ditto + + * test/xmlrpc/data/fault.xml : ditto + + * test/xmlrpc/data/value.expected : ditto + + * test/xmlrpc/data/value.xml : ditto + + * test/xmlrpc/data/xml1.expected : ditto + + * test/xmlrpc/data/xml1.xml : ditto + + * test/xmlrpc/test_datetime.rb : ditto + + * test/xmlrpc/test_features.rb : ditto + + * test/xmlrpc/test_marshal.rb : ditto + + * test/xmlrpc/test_parser.rb : ditto + + * test/xmlrpc/test_webrick_server.rb : ditto + + * test/xmlrpc/webrick_testing.rb : ditto + + * test/zlib/test_zlib.rb : ditto + + +2006-02-17(Fri) 09:41:35 +900 Yukihiro Matsumoto + + * thread.c (sleep_timeval): sleep should always sleep for + specified amount of time. [ruby-talk:180067] + + +2006-02-17(Fri) 02:20:32 +0900 Koichi Sasada + + * eval_safe.h, ruby.h : remove ruby_safe_level and add + rb_safe_level() and rb_set_safe_level_force() + + * eval.c : use above functions + + * eval_jump.h : ditto + + * eval_load.c : ditto + + * eval_method.h : ditto + + * eval_proc.c : ditto + + * eval_thread.c : ditto + + * gc.c : ditto + + * signal.c : ditto + + * variable.c : ditto + + * ext/win32ole/win32ole.c : ditto + + * vm.c (th_invoke_proc) : save and restore safe level + + * yarvtest/test_proc.rb : add tests for above + + * thread.c : remove unused functions + + +2006-02-17(Fri) 01:08:23 +0900 Koichi Sasada + + * compile.c, insns.def : remove a setspecial second unused operand + + * eval_load.c : remove unused variable th + + * eval_proc.c, yarvcore.c : remove some functions from eval_proc.c + and move to yarvcore.c + + * insns.def : fix to delete warnings + + * sample/test.rb : comment out Proc#clone tests + + * version.c : add constant RUBY_VM_DATE + + * vm.c : fix some functions + + +2006-02-16(Thu) 22:58:27 +0900 Koichi Sasada + + * insns.def, vm.c : use th_yield_setup_args at yield and Proc#call + + +2006-02-16(Thu) 19:51:52 +0900 Koichi Sasada + + * compile.c : fix analysis of block parameter + + * disasm.c : remove rb_bug() (temporarily) + + * insns.def, vm.c : fix passing block parameter + + * sample/test.rb : add "Proc = YARVCore::VM::Proc" + + * test/ruby/test_readpartial.rb : disable on mswin32 + + * test/socket/test_tcp.rb : ditto + + * thread.c : fix syntax error (for non GCC) + + +2006-02-15(Wed) 22:34:04 +0900 Koichi Sasada + + * eval_method.h : move rb_clear_cache_by_id position + + * thread.c : fix Thread#kill + + * test/ruby/test_readpartial.rb : enable tests except cygwin version + + * test/ruby/test_signal.rb : ditto and enable timeout + + +2006-02-15(Wed) 22:13:29 +0900 Minero Aoki + + * lib/runit: forgot to commit. + + +2006-02-15(Wed) 22:12:25 +0900 Minero Aoki + + * lib/weakref.rb: do not use Thread.critical=. + + * lib/singleton.rb: ditto. + + * lib/timeout.rb: ditto. + + * lib/thread.rb: ditto. + + * test/inlinetest.rb: forgot to commit. + + +2006-02-15(Wed) 21:34:17 +0900 Minero Aoki + + * test/test_pp.rb: imported from Ruby CVS trunk HEAD. + + * test/test_shellwords.rb: ditto. + + * test/test_set.rb: ditto. + + * test/test_time.rb: ditto. + + * test/test_ipaddr.rb: ditto. + + * test/test_prettyprint.rb: ditto. + + * test/test_tsort.rb: ditto. + + * test/strscan: ditto. + + * test/testunit: ditto. + + +2006-02-15(Wed) 20:03:21 +0900 Koichi Sasada + + * eval_method.h : duplicate NODE_METHOD at make an alias + + * yarvtest/test_method.rb : add a test for above + + +2006-02-15(Wed) 19:48:59 +0900 Minero Aoki + + * test/rss: imported from Ruby CVS trunk HEAD. + + +2006-02-15(Wed) 19:47:51 +0900 Koichi Sasada + + * insns.def, compile.c, vm.c : remove methoddef, singletonmethoddef + instructions and make new insn definemethod + + * yarvcore.c : set toplevel visibility to private + + +2006-02-15(Wed) 17:39:16 +0900 Koichi Sasada + + * eval_intern.h : + + * eval_jump.h, vm.c : localjump_error() and jump_tag_but_local_jump() + move to th_localjump_error and th_jump_tag_but_local_jump at vm.c + + * eval.c : ditto + + * eval_load.c : ditto + + * insns.def : ditto + + * vm.c : ditto + + * vm.c (th_make_jump_tag_but_local_jump) : added + + * opt_insn_unif.def : fix indnet (revert change) + + * opt_operand.def : ditto + + * rb/insns2vm.rb : fix error message + + * thread.c : raise exception at join if illegal local jump + + +2006-02-15(Wed) 14:21:45 +900 Yukihiro Matsumoto + + * ChangeLog: add local variables line to support Emacs. + + * eval.c (rb_obj_instance_exec): add new method from 1.9. + + * eval.c (rb_mod_module_exec): ditto. + + * eval.c (yield_under_i): should not pass self as an argument to + the block for instance_eval. [ruby-core:07364] + + * eval.c (rb_obj_instance_eval): should be no singleton classes for + true, false, and nil. [ruby-dev:28186] + + +2006-02-14(Tue) 19:30:20 +0900 Koichi Sasada + + * array.c : fix indent + + * eval.c : fix block_given + + * gc.c : add STACK_START and use it as a substitute for + rb_gc_stack_start + + * vm.c : fix to raise error if th_yield doesn't have block given + + * yarvcore.c : fix to skip iseq mark array at ObjectSpace.each_object + + +2006-02-14(Tue) 18:15:03 +0900 Koichi Sasada + + * configure.in : enable pthread by deafult + + * ascii.c : import ruby 1.9 HEAD + + * bignum.c : ditto + + * compar.c : ditto + + * configure : ditto + + * defines.h : ditto + + * dln.c : ditto + + * dln.h : ditto + + * enum.c : ditto + + * enumerator.c : ditto + + * euc_jp.c : ditto + + * ext/win32ole/tests/testWIN32OLE.rb : ditto + + * ext/win32ole/win32ole.c : ditto + + * file.c : ditto + + * hash.c : ditto + + * io.c : ditto + + * lex.c : ditto + + * lib/irb/init.rb : ditto + + * lib/rexml/document.rb : ditto + + * main.c : ditto + + * marshal.c : ditto + + * math.c : ditto + + * missing.h : ditto + + * object.c : ditto + + * oniguruma.h : ditto + + * pack.c : ditto + + * process.c : ditto + + * random.c : ditto + + * range.c : ditto + + * rb/ir.rb : ditto + + * re.c : ditto + + * regcomp.c : ditto + + * regenc.c : ditto + + * regenc.h : ditto + + * regerror.c : ditto + + * regexec.c : ditto + + * regint.h : ditto + + * regparse.c : ditto + + * regparse.h : ditto + + * ruby.c : ditto + + * ruby.h : ditto + + * rubyio.h : ditto + + * sjis.c : ditto + + * sprintf.c : ditto + + * st.c : ditto + + * st.h : ditto + + * struct.c : ditto + + * test/ruby/envutil.rb : ditto + + * test/ruby/test_struct.rb : ditto + + * time.c : ditto + + * utf8.c : ditto + + * util.c : ditto + + * util.h : ditto + + * version.h : ditto + + * win32/Makefile.sub : ditto + + * win32/win32.c : ditto + + +2006-02-14(Tue) 16:40:01 +0900 Koichi Sasada + + * yarvcore.c, eval_proc.c : fix rb_proc_arity + + * eval.c : declare funcall same as send (temporarily) + + * lib/thread.rb : added + + * test/pathname/test_pathname.rb : imported from ruby 1.9 + + * test/scanf/data.txt : ditto + + * test/scanf/test_scanf.rb : ditto + + * test/scanf/test_scanfblocks.rb : ditto + + * test/scanf/test_scanfio.rb : ditto + + * test/socket/test_socket.rb : ditto + + * test/socket/test_tcp.rb : ditto + + * test/socket/test_udp.rb : ditto + + * test/socket/test_unix.rb : ditto + + * test/stringio/test_stringio.rb : ditto + + * test/uri/test_common.rb : ditto + + * test/uri/test_ftp.rb : ditto + + * test/uri/test_generic.rb : ditto + + * test/uri/test_http.rb : ditto + + * test/uri/test_ldap.rb : ditto + + * test/uri/test_mailto.rb : ditto + + +2006-02-14(Tue) 15:59:28 +0900 Koichi Sasada + + * thread.c : Change Thread.critical warnning message + + * lib/webrick.rb : imported from ruby 1.9 + + * lib/webrick/accesslog.rb : ditto + + * lib/webrick/cgi.rb : ditto + + * lib/webrick/compat.rb : ditto + + * lib/webrick/config.rb : ditto + + * lib/webrick/cookie.rb : ditto + + * lib/webrick/htmlutils.rb : ditto + + * lib/webrick/httpauth.rb : ditto + + * lib/webrick/httpauth/authenticator.rb : ditto + + * lib/webrick/httpauth/basicauth.rb : ditto + + * lib/webrick/httpauth/digestauth.rb : ditto + + * lib/webrick/httpauth/htdigest.rb : ditto + + * lib/webrick/httpauth/htgroup.rb : ditto + + * lib/webrick/httpauth/htpasswd.rb : ditto + + * lib/webrick/httpauth/userdb.rb : ditto + + * lib/webrick/httpproxy.rb : ditto + + * lib/webrick/httprequest.rb : ditto + + * lib/webrick/httpresponse.rb : ditto + + * lib/webrick/https.rb : ditto + + * lib/webrick/httpserver.rb : ditto + + * lib/webrick/httpservlet.rb : ditto + + * lib/webrick/httpservlet/abstract.rb : ditto + + * lib/webrick/httpservlet/cgi_runner.rb : ditto + + * lib/webrick/httpservlet/cgihandler.rb : ditto + + * lib/webrick/httpservlet/erbhandler.rb : ditto + + * lib/webrick/httpservlet/filehandler.rb : ditto + + * lib/webrick/httpservlet/prochandler.rb : ditto + + * lib/webrick/httpstatus.rb : ditto + + * lib/webrick/httputils.rb : ditto + + * lib/webrick/httpversion.rb : ditto + + * lib/webrick/log.rb : ditto + + * lib/webrick/server.rb : ditto + + * lib/webrick/ssl.rb : ditto + + * lib/webrick/utils.rb : ditto + + * lib/webrick/version.rb : ditto + + +2006-02-14(Tue) 14:55:51 +0900 Koichi Sasada + + * compile.c, insns.def : support "defined?($1)", ... + + * yarvtest/test_syntax.rb : add a test for above + + * rb/makedocs.rb : fix template directory path + + * vm.c : fix to handle break from proc + + +2006-02-14(Tue) 12:42:59 +0900 Koichi Sasada + + * eval.c : fix rb_iterate hook + + * yarvtest/test_block.rb : add a tests for above + + * vm.c : remove unused comment + + +2006-02-14(Tue) 12:01:06 +0900 Koichi Sasada + + * eval.c : fix to check passed block at block_given_p + + * eval_proc.c : fix to pass block at Method#call + + * runruby.rb : fix to apply ruby + + * test/runner.rb : GC.stress (comment out) + + * vm.c : fix indnet + + +2006-02-14(Tue) 08:04:33 +0900 Minero Aoki + + * lib/tempfile.rb: use Mutex instead of Thread.critical. + + * lib/rss/dublincore.rb: |x,| -> |x,_| to avoid YARV bug (tmp). + + * lib/rexml: imported from ruby CVS trunk HEAD. + + * test/digest: ditto. + + * test/fileutils: ditto. + + * test/ostruct: ditto. + + * test/erb: ditto. + + * test/optparse: ditto. + + * test/ruby/test_signal.rb: turn off a test to avoid unknown error + (tmp). + + +2006-02-14(Tue) 07:52:03 +0900 Minero Aoki + + * test/digest: imported from ruby CVS trunk HEAD. + + * test/fileutils: ditto. + + * test/ostruct: ditto. + + * test/erb: ditto. + + * test/optparse: ditto. + + +2006-02-14(Tue) 06:26:21 +0900 Koichi Sasada + + * compile.c, parse.y : support BEGIN{} (remove local scope) + + * test/ruby/beginmainend.rb : fix to apply YARV's specification + + * test/ruby/test_beginendblock.rb : enable BEGIN{} test + + * signal.c : exit at double segv + + * insns.def (preexe) : remove instruction "preexe" + + +2006-02-14(Tue) 05:53:56 +0900 Minero Aoki + + * eval.c (ruby_cleanup): th->errinfo contains a NODE while + break'ing, check it before refering klass. + + +2006-02-14(Tue) 05:45:07 +0900 Koichi Sasada + + * insns.def : fix stack calc of send + + * sample/test.rb : remove SEGV causing code + + +2006-02-14(Tue) 02:24:21 +0900 Minero Aoki + + * test/ruby/test_module.rb: list order is not a matter. + + * test/csv: imported from ruby CVS trunk HEAD. + + +2006-02-14(Tue) 02:06:25 +0900 Minero Aoki + + * test/ruby/test_beginendblock.rb: unlock tests. + + * test/ruby/beginmainend.rb: new file (imported from ruby CVS + trunk HEAD). + + * test/ruby/endblockwarn.rb: new file (imported from ruby CVS + trunk HEAD). + + * test/ruby/test_file.rb: new file (imported from ruby CVS trunk + HEAD). + + +2006-02-14(Tue) 01:42:11 +0900 Koichi Sasada + + * error.c : fix include file positon + + * test/ruby/test_signal.rb : skip test_exit_action on cygwin + + +2006-02-14(Tue) 01:36:57 +0900 Minero Aoki + + * test/ruby/test_class.rb: new file (imported from rubicon). + + +2006-02-14(Tue) 01:32:23 +0900 Minero Aoki + + * test/ruby/test_module.rb: ignore PP mixins. + + +2006-02-14(Tue) 01:24:56 +0900 Minero Aoki + + * test/ruby/test_lambda.rb: removed (->(){...} syntax is + obsolete). + + +2006-02-14(Tue) 01:20:54 +0900 Minero Aoki + + * test/ruby/test_module.rb: import many tests from rubicon. + + +2006-02-14(Tue) 01:06:57 +0900 Koichi Sasada + + * compile.c : fix to avoid stack consistency error + + * yarvtest/test_exception.rb : add a test for above + + +2006-02-14(Tue) 00:42:47 +0900 Koichi Sasada + + * yarvcore.h, vm_macro.def : rename VM_CALL_SUPER to VM_CALL_SUPER_BIT + + * insns.def (send) : set a flag of super as fcall + + * yarvtest/test_class.rb : add a test for above + + +2006-02-14(Tue) 00:31:24 +0900 Minero Aoki + + * test/ruby/test_eval.rb: fix typo. + + * test/ruby/test_signal.rb: unlock tests. + + +2006-02-13(Mon) 23:53:27 +0900 Koichi Sasada + + * insns.def, vm_macro.def : fix NODE_ZSUPER dispatch and + fix error message when super without suitable method ([yarv-dev:846]) + + * yarvcore.h : add VM_CALL_SUPER definition + + * yarvtest/test_method.rb : add a test of Module#private_class_method + + +2006-02-13(Mon) 22:49:42 +0900 Koichi Sasada + + * insns.def : traverse all iseq to find super method ([yarv-dev:859]) + + * yarvtest/test_class.rb : add a test for above + + * yarvcore.c : add clear iseq->defined_method_id + + * signal.c : fix to prohibit double segv handler kicked + + +2006-02-13(Mon) 22:09:12 +0900 Koichi Sasada + + * compile.c : support NODE_DECL, NODE_CLASS with NODE_CLON3 prefix + + * yarvtest/test_class.rb : add tests for above + + +2006-02-13(Mon) 21:20:57 +0900 Koichi Sasada + + * compile.c : fix indent + + * compile.c : fix to prohibit "redo" from eval expression + + +2006-02-13(Mon) 20:36:06 +0900 Koichi Sasada + + * vm.c : fix constant search bug ([yarv-dev:788]) + + * yarvtest/test_class.rb : add a test of [yarv-dev:788] + + +2006-02-13(Mon) 18:09:28 +0900 Koichi Sasada + + * test/ruby/test_clone.rb : enable tests with Class#clone + + * test/ruby/test_marshal.rb : ditto + + +2006-02-13(Mon) 17:42:37 +0900 Koichi Sasada + + * class.c : support Class#clone + + * compile.c, insns.def : remove popcref + + * yarvcore.h, vm.c, insns.def : remove yarv_thread_t#cref_stack + + * eval.c, eval_intern.h, eval_load.c : ditto + + * yarvtest/test_class.rb : add tests for singleton class + + * gc.c : remove "FRAME *" unused variable + + * insnhelper.h : fix COPY_CREF + + * rb/mklog.rb : add default message + + * vm_macro.def : support NODE_ZSUPER as method type + + +2006-02-13(Mon) 00:11:17 +0900 Koichi Sasada + + * blockinlining.c : refoctoring with CFLAGS+=-Wunused + + * eval.c : ditto + + * eval_intern.h : ditto + + * eval_load.c : ditto + + * eval_method.h : ditto + + * eval_proc.c : ditto + + * eval_thread.c : ditto + + * insns.def : ditto + + * parse.y : ditto + + * thread.c : ditto + + * vm.c : ditto + + +2006-02-13(Mon) 02:32:34 +0900 Minero Aoki + + * test/ruby/test_const.rb: show better message. + + * test/ruby/test_eval.rb: ditto. + + * test/ruby/test_module.rb: new file. + + +2006-02-12(Sun) 22:22:35 +0900 Koichi Sasada + + * array.c : revert last commit + + * ascii.c : ditto + + * bignum.c : ditto + + * class.c : ditto + + * compar.c : ditto + + * defines.h : ditto + + * dir.c : ditto + + * dln.c : ditto + + * dln.h : ditto + + * enum.c : ditto + + * enumerator.c : ditto + + * error.c : ditto + + * euc_jp.c : ditto + + * file.c : ditto + + * gc.c : ditto + + * hash.c : ditto + + * intern.h : ditto + + * io.c : ditto + + * lex.c : ditto + + * main.c : ditto + + * marshal.c : ditto + + * math.c : ditto + + * missing.h : ditto + + * node.h : ditto + + * numeric.c : ditto + + * object.c : ditto + + * oniguruma.h : ditto + + * pack.c : ditto + + * prec.c : ditto + + * process.c : ditto + + * random.c : ditto + + * range.c : ditto + + * rb/mklog.rb : ditto + + * re.c : ditto + + * regcomp.c : ditto + + * regenc.c : ditto + + * regenc.h : ditto + + * regerror.c : ditto + + * regex.h : ditto + + * regexec.c : ditto + + * regint.h : ditto + + * regparse.c : ditto + + * regparse.h : ditto + + * ruby.c : ditto + + * ruby.h : ditto + + * rubyio.h : ditto + + * rubysig.h : ditto + + * signal.c : ditto + + * sjis.c : ditto + + * sprintf.c : ditto + + * st.c : ditto + + * st.h : ditto + + * string.c : ditto + + * struct.c : ditto + + * time.c : ditto + + * utf8.c : ditto + + * util.c : ditto + + * util.h : ditto + + * variable.c : ditto + + * version.c : ditto + + +2006-02-12(Sun) 21:33:10 +0900 Koichi Sasada + + * array.c : fix to ruby's indent + + * ascii.c : ditto + + * bignum.c : ditto + + * blockinlining.c : ditto + + * call_cfunc.h : ditto + + * class.c : ditto + + * compar.c : ditto + + * compile.c : ditto + + * compile.h : ditto + + * debug.c : ditto + + * debug.h : ditto + + * defines.h : ditto + + * dir.c : ditto + + * disasm.c : ditto + + * dln.c : ditto + + * dln.h : ditto + + * enum.c : ditto + + * enumerator.c : ditto + + * error.c : ditto + + * euc_jp.c : ditto + + * eval.c : ditto + + * eval_error.h : ditto + + * eval_intern.h : ditto + + * eval_jump.h : ditto + + * eval_load.c : ditto + + * eval_method.h : ditto + + * eval_proc.c : ditto + + * eval_safe.h : ditto + + * eval_thread.c : ditto + + * file.c : ditto + + * gc.c : ditto + + * hash.c : ditto + + * insnhelper.h : ditto + + * insns.def : ditto + + * intern.h : ditto + + * io.c : ditto + + * lex.c : ditto + + * main.c : ditto + + * marshal.c : ditto + + * math.c : ditto + + * missing.h : ditto + + * node.h : ditto + + * numeric.c : ditto + + * object.c : ditto + + * oniguruma.h : ditto + + * opt_insn_unif.def : ditto + + * opt_operand.def : ditto + + * pack.c : ditto + + * prec.c : ditto + + * process.c : ditto + + * random.c : ditto + + * range.c : ditto + + * re.c : ditto + + * re.h : ditto + + * regcomp.c : ditto + + * regenc.c : ditto + + * regenc.h : ditto + + * regerror.c : ditto + + * regex.h : ditto + + * regexec.c : ditto + + * regint.h : ditto + + * regparse.c : ditto + + * regparse.h : ditto + + * ruby.c : ditto + + * ruby.h : ditto + + * rubyio.h : ditto + + * rubysig.h : ditto + + * signal.c : ditto + + * sjis.c : ditto + + * sprintf.c : ditto + + * st.c : ditto + + * st.h : ditto + + * string.c : ditto + + * struct.c : ditto + + * test.rb : ditto + + * thread.c : ditto + + * thread_pthread.h : ditto + + * thread_win32.h : ditto + + * time.c : ditto + + * utf8.c : ditto + + * util.c : ditto + + * util.h : ditto + + * variable.c : ditto + + * version.c : ditto + + * vm.c : ditto + + * vm.h : ditto + + * vm_dump.c : ditto + + * vm_evalbody.h : ditto + + * vm_macro.def : ditto + + * yarv.h : ditto + + * yarv_version.h : ditto + + * yarvcore.c : ditto + + * yarvcore.h : ditto + + +2006-02-12(Sun) 15:53:21 +0900 Koichi Sasada + + * lib/abbrev.rb : added + + * lib/base64.rb : ditto + + * lib/cgi-lib.rb : ditto + + * lib/csv.rb : ditto + + * lib/date2.rb : ditto + + * lib/eregex.rb : ditto + + * lib/ipaddr.rb : ditto + + * lib/irb.rb : ditto + + * lib/irb/cmd/chws.rb : ditto + + * lib/irb/cmd/fork.rb : ditto + + * lib/irb/cmd/help.rb : ditto + + * lib/irb/cmd/load.rb : ditto + + * lib/irb/cmd/nop.rb : ditto + + * lib/irb/cmd/pushws.rb : ditto + + * lib/irb/cmd/subirb.rb : ditto + + * lib/irb/completion.rb : ditto + + * lib/irb/context.rb : ditto + + * lib/irb/ext/change-ws.rb : ditto + + * lib/irb/ext/history.rb : ditto + + * lib/irb/ext/loader.rb : ditto + + * lib/irb/ext/math-mode.rb : ditto + + * lib/irb/ext/multi-irb.rb : ditto + + * lib/irb/ext/save-history.rb : ditto + + * lib/irb/ext/tracer.rb : ditto + + * lib/irb/ext/use-loader.rb : ditto + + * lib/irb/ext/workspaces.rb : ditto + + * lib/irb/extend-command.rb : ditto + + * lib/irb/frame.rb : ditto + + * lib/irb/help.rb : ditto + + * lib/irb/init.rb : ditto + + * lib/irb/input-method.rb : ditto + + * lib/irb/lc/error.rb : ditto + + * lib/irb/lc/help-message : ditto + + * lib/irb/lc/ja/CVS/Entries : ditto + + * lib/irb/lc/ja/CVS/Repository : ditto + + * lib/irb/lc/ja/CVS/Root : ditto + + * lib/irb/lc/ja/error.rb : ditto + + * lib/irb/lc/ja/help-message : ditto + + * lib/irb/locale.rb : ditto + + * lib/irb/notifier.rb : ditto + + * lib/irb/output-method.rb : ditto + + * lib/irb/ruby-lex.rb : ditto + + * lib/irb/ruby-token.rb : ditto + + * lib/irb/slex.rb : ditto + + * lib/irb/version.rb : ditto + + * lib/irb/workspace.rb : ditto + + * lib/irb/ws-for-case-2.rb : ditto + + * lib/irb/xmp.rb : ditto + + * lib/jcode.rb : ditto + + * lib/logger.rb : ditto + + * lib/mailread.rb : ditto + + * lib/mathn.rb : ditto + + * lib/parsedate.rb : ditto + + * lib/pathname.rb : ditto + + * lib/ping.rb : ditto + + * lib/pstore.rb : ditto + + * lib/resolv-replace.rb : ditto + + * lib/resolv.rb : ditto + + * lib/rss.rb : ditto + + * lib/rss/0.9.rb : ditto + + * lib/rss/1.0.rb : ditto + + * lib/rss/2.0.rb : ditto + + * lib/rss/content.rb : ditto + + * lib/rss/converter.rb : ditto + + * lib/rss/dublincore.rb : ditto + + * lib/rss/image.rb : ditto + + * lib/rss/maker.rb : ditto + + * lib/rss/maker/0.9.rb : ditto + + * lib/rss/maker/1.0.rb : ditto + + * lib/rss/maker/2.0.rb : ditto + + * lib/rss/maker/base.rb : ditto + + * lib/rss/maker/content.rb : ditto + + * lib/rss/maker/dublincore.rb : ditto + + * lib/rss/maker/image.rb : ditto + + * lib/rss/maker/syndication.rb : ditto + + * lib/rss/maker/taxonomy.rb : ditto + + * lib/rss/maker/trackback.rb : ditto + + * lib/rss/parser.rb : ditto + + * lib/rss/rexmlparser.rb : ditto + + * lib/rss/rss.rb : ditto + + * lib/rss/syndication.rb : ditto + + * lib/rss/taxonomy.rb : ditto + + * lib/rss/trackback.rb : ditto + + * lib/rss/utils.rb : ditto + + * lib/rss/xml-stylesheet.rb : ditto + + * lib/rss/xmlparser.rb : ditto + + * lib/rss/xmlscanner.rb : ditto + + * lib/rubyunit.rb : ditto + + * lib/scanf.rb : ditto + + * lib/shell.rb : ditto + + * lib/singleton.rb : ditto + + * lib/tsort.rb : ditto + + * lib/weakref.rb : ditto + + * eval_jump.c : removed + + +2006-02-12(Sun) 15:39:09 +0900 Koichi Sasada + + * parse.y : fix to remove including env.h + + * yarvtest/test_exception.rb : fix syntax (add 'end') + + +2006-02-12(Sun) 15:14:44 +0900 Koichi Sasada + + * env.h : removed + + * common.mk : remove env.h dependency + + * compile.c, eval_intern.h : remove include env.h + + * vm.c : ditto + + * ruby.h, gc.c, error.c : remove T_SCOPE, T_VARMAP + + * parse.y, eval.c : use rb_parse_in_eval() instead of ruby_in_eval + + * yarvcore.c, yarvcore.h : add a prase_in_eval member to yarv_thread_t + + * insns.def : add push value to throw instruction + for stack consistency + + * yarvtest/test_exception.rb : add a test for above + + * test/ruby/test_gc.rb : fix typo + + +2006-02-12(Sun) 05:05:02 +0900 Koichi Sasada + + * eval.c, eval_intern.h, eval_load.c, eval_proc.c, node.h, + insnhelper.h, insns.def, vm.c, yarvcore.c, yarvcore.h : + change cref data structure and unify ruby_class and ruby_cbase + and some refoctoring + + +2006-02-11(Sat) 23:41:11 +0900 Koichi Sasada + + * insns.def (methoddef) : fix method declaration in method + + * thread.c : Thread.critical to show warning (no effect) + + +2006-02-11(Sat) 20:20:18 +0900 Koichi Sasada + + * insns.def : fix [yarv-dev:831] + + * yarvtest/test_class.rb : add a test for above + + +2006-02-11(Sat) 14:29:01 +0900 Koichi Sasada + + * rb/mklog.rb : use svk + + * error.c : remove newline + + * eval.c (rb_block_call) : added + + * eval_thread.c : remove some unused functions, comments + + * thread.c : add comments (move from eval_thread.c) and support Mutex + + * thread.c (rb_thread_select) : supported + + * thread_pthread.h (native_mutex_trylock) : added (macro) + + * thread_win32.h (native_mutex_trylock) : added + + * yarvcore.c : remove unused code + + * array.c : import ruby 1.9 + + * compar.c : ditto + + * dln.c : ditto + + * enum.c : ditto + + * enumerator.c : ditto + + * ext/digest/digest.c : ditto + + * ext/digest/digest.h : ditto + + * ext/digest/sha2/sha2.c : ditto + + * ext/etc/etc.c : ditto + + * ext/win32ole/win32ole.c : ditto + + * hash.c : ditto + + * intern.h : ditto + + * io.c : ditto + + * main.c : ditto + + * missing.h : ditto + + * missing/flock.c : ditto + + * missing/isinf.c : ditto + + * missing/vsnprintf.c : ditto + + * lib/cgi.rb : ditto + + * lib/complex.rb : ditto + + * lib/delegate.rb : ditto + + * lib/erb.rb : ditto + + * lib/fileutils.rb : ditto + + * lib/matrix.rb : ditto + + * lib/mkmf.rb : ditto + + * lib/optparse.rb : ditto + + * lib/ostruct.rb : ditto + + * lib/pp.rb : ditto + + * lib/timeout.rb : ditto + + * lib/tmpdir.rb : ditto + + * lib/test/unit/autorunner.rb : ditto + + * node.h : ditto + + * object.c : ditto + + * parse.y : ditto + + * ruby.c : ditto + + * sample/test.rb : ditto + + * sprintf.c : ditto + + * st.c : ditto + + * test/ruby/test_whileuntil.rb : ditto + + * test/runner.rb : ditto + + * time.c : ditto + + * lib/net/.document : added + + * lib/net/ftp.rb : ditto + + * lib/net/http.rb : ditto + + * lib/net/https.rb : ditto + + * lib/net/imap.rb : ditto + + * lib/net/pop.rb : ditto + + * lib/net/protocol.rb : ditto + + * lib/net/smtp.rb : ditto + + * lib/net/telnet.rb : ditto + + * lib/open-uri.rb : ditto + + +2006-02-10(Fri) 08:07:34 +0900 Koichi Sasada + + * compile.c, insns.def, yarvcore.h : support defined?(private_method) and + defined?(protected_method) (separate DEFINE_METHOD / DEFINE_FUNC) + + * yarvtest/test_syntax.rb : add a test for above + + * compile.c (iseq_compile_each) : fix NODE_RETURN bug + (double ensure invoke) + + * yarvtest/test_flow.rb : add a test for above + + * eval.c (get_errinfo) : fix to search $! + + * yarvtest/test_exception.rb : add tests for above + + * eval_safe.h : support $SAFE + + * ext/socket/socket.c : import ruby 1.9 + + * gc.c (gc_mark_children) : fix making T_VALUE + + * test/ruby/test_gc.rb : use GC.stress + + * signal.c (sighandler) : send interrupt signal if thread blocked + + * test/ruby/test_proc.rb : remove assert false + + * test/ruby/test_readpartial.rb : change fail message + + * test/ruby/test_signal.rb : remove assert false + + * thread.c (thread_start_func_2) : set local_lfp/local_svar + at thread creation + + * thread_pthread.h : export native_thread_interrupt + + * thread_win32.h : export native_thread_interrupt + + * version.h : import ruby 1.9 + + * vm.c (lfp_svar), yarvcore.h : fix to use Thread local svar + + * yarvtest/test_thread.rb : add a test for above + + * win32/Makefile.sub : import ruby 1.9 + + * win32/dir.h : ditto + + * win32/setup.mak : ditto + + * win32/win32.c : ditto + + * yarvtest/yarvtest.rb : fix to remove using ARGV + + +2006-02-10(Fri) 01:04:58 +0900 Yukihiro Matsumoto + + * gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while + invoking finalizers. + + * gc.c (rb_gc_finalize_deferred): ditto. + + +2006-02-08(Wed) 23:17:44 +0900 Minero Aoki + + * test/ruby/test_proc.rb: method names were wrongly duplicated. + + +2006-02-08(Wed) 21:30:01 +0900 Minero Aoki + + * ext/nkf: added (imported from ruby CVS trunk HEAD). + + * ext/nkf/depend: new file (rev 1.5). + + * ext/nkf/extconf.rb: new file (rev 1.2). + + * ext/nkf/nkf.c: new file (rev 1.12). + + * ext/nkf/test.rb: new file (rev 1.7). + + * ext/nkf/nkf-utf8/nkf.c: new file (rev 1.17). + + * ext/nkf/nkf-utf8/config.h: new file (rev 1.4). + + * ext/nkf/nkf-utf8/utf8tbl.c: new file (rev 1.6). + + * ext/nkf/lib/kconv.rb: new file (rev 1.13). + + * test/nkf: added (imported from ruby CVS trunk HEAD). + + * test/nkf/test_kconv.rb: new file (rev 1.1). + + * test/nkf/test_nkf.rb: new file (rev 1.1). + + +2006-02-08(Wed) 21:07:36 +0900 Minero Aoki + + * lib/find.rb: new file (imported from ruby CVS trunk HEAD, + rev 1.15). + + +2006-02-07(Tue) 17:58:18 +0900 Koichi Sasada + + * compile.c, insns.def : support BEGIN{} and add preexe instruction + + * insns.def : fix getspecial/setspecial instructions + to catch up svar change + + * test/ruby/test_system.rb : remove stopper + + * thread.c (rb_thread_fd_writable) : add a debug output + + * thread.c (rb_thread_wait_fd) : add a debug output + + * vm.c (lfp_svar) : refactoring and fix some problems + + * vm_dump.c (yarv_bug) : add branch + + * yarv.h : remove unused declarations + + * yarvcore.c (vm_free) : VM object should not free by GC + + +2006-02-07(Tue) 14:42:25 +0900 Koichi Sasada + + * eval.c, eval_load.c : remove rb_thread_start_1() + + * eval.c : fix some prototypes and indents + + * eval_thread.c, thread.c : move some functions + from eval_thread.c to thread.c + + * signal.c (sighandler) : add line braek in error message + + * yarvcore.c, yarvcore.h, thread.c : support ThreadGroup + + * ruby.h, gc.c, vm.c : make new basic type RValue and T_VALUE. + RValue includes three values in itself. RValue is used as + svar + + +2006-02-06(Mon) 23:51:41 +0900 Minero Aoki + + * test/ruby/test_hash.rb: import many tests from rubicon. + + +2006-02-04(Sat) 18:36:41 +0900 Minero Aoki + + * test/ruby/test_array.rb: import many tests from rubicon. + + +2006-02-04(Sat) 17:47:44 +0900 Minero Aoki + + * test/ruby/test_signal.rb (test_exit_action): lib/timeout.rb is + not implemented yet. + + +2006-02-04(Sat) 17:42:31 +0900 Minero Aoki + + * test/ruby/test_readpartial.rb: lib/timeout.rb is not implemented + yet. + + +2006-02-04(Sat) 16:22:38 +0900 Minero Aoki + + * test/ruby/test_pipe.rb: remove useless require. + + * test/ruby/test_signal.rb: turn off the test case which causes + segmentation fault (tmp). + + +2006-02-04(Sat) 08:19:50 +0900 Koichi Sasada + + * common.mk : add dependency to yarvcore.h on signal.o + + * compile.c (iseq_compile_each) : fix [yarv-dev:795] problem + (prohibit "break", "next" jump from eval) + + * eval.c : fix indent + + * eval_thread.c, thread.c : remove some functions and move to thread.c + + * insns.def, vm.c : fix [yarv-dev:799] and [yarv-dev:800] + + * yarvtest/test_class.rb : add a test for above + + * test/ruby/test_gc.rb : remove GC.debug_flag control + + * test/ruby/test_readpartial.rb : disable + + * test/ruby/test_signal.rb : disable + + * thread.c : fix thread_debug() and many bugs + + * thread.c (yarv_thread_s_new) : move living_threads setting + + * thread.c (yarv_thread_join) : fix + + * thread_pthread.h : add type native_thread_data_t (dummy) + and support interrupt blocking thread + + * thread_pthread.h (native_thread_apply_priority) : added + + * thread_win32.h : add type native_thread_data_t (dummy) + and support interrupt blocking thread + + * yarvcore.h : use win32 thread system on cygwin and fix + some struct members + + * yarvtest/test_thread.rb : added + + +2006-02-03(Fri) 00:08:09 +0900 Minero Aoki + + * test/ruby/test_string.rb: import many tests from rubicon. + + +2006-02-02(Thu) 23:20:13 +0900 Minero Aoki + + * test/ruby/envutil.rb: new file (imported from ruby trunk HEAD). + + * test/ruby/marshaltestlib.rb: ditto. + + * test/ruby/test_array.rb: ditto. + + * test/ruby/test_beginendblock.rb: ditto. + + * test/ruby/test_clone.rb: ditto. + + * test/ruby/test_dir.rb: ditto. + + * test/ruby/test_env.rb: ditto. + + * test/ruby/test_file.rb: ditto. + + * test/ruby/test_float.rb: ditto. + + * test/ruby/test_fnmatch.rb: ditto. + + * test/ruby/test_hash.rb: ditto. + + * test/ruby/test_io.rb: ditto. + + * test/ruby/test_marshal.rb: ditto. + + * test/ruby/test_math.rb: ditto. + + * test/ruby/test_pack.rb: ditto. + + * test/ruby/test_path.rb: ditto. + + * test/ruby/test_pipe.rb: ditto. + + * test/ruby/test_rand.rb: ditto. + + * test/ruby/test_range.rb: ditto. + + * test/ruby/test_readpartial.rb: ditto. + + * test/ruby/test_regexp.rb: ditto. + + * test/ruby/test_settracefunc.rb: ditto. + + * test/ruby/test_signal.rb: ditto. + + * test/ruby/test_sprintf.rb: ditto. + + * test/ruby/test_string.rb: ditto. + + * test/ruby/test_stringchar.rb: ditto. + + * test/ruby/test_struct.rb: ditto. + + * test/ruby/test_symbol.rb: ditto. + + * test/ruby/test_system.rb: ditto. + + * test/ruby/test_time.rb: ditto. + + * test/ruby/ut_eof.rb: ditto. + + +2006-02-02(Thu) 22:53:44 +0900 Minero Aoki + + * test/ruby/test_proc.rb: test [yarv-dev:777]. + + +2006-02-01(Wed) 03:51:39 +0900 Koichi Sasada + + * gc.c : add GC.debug_flag= method + + * insns.def : support method definition in method + + * yarvtest/test_method.rb : add tests for above + + +2006-01-29(Sun) 11:40:26 +0900 Koichi Sasada + + * eval_proc.c (proc_alloc) : fix [yarv-dev:777] + + * yarvtest/test_proc.rb : add a test for above + + * insns.def : fix [yarv-dev:782] and add YARV_CHECK_INTS() + + * yarvtest/test_class.rb : add a test for above + + * thread_win32.h : fix [yarv-dev-en:23] + + * vm.c (th_call0) : add YARV_CHECK_INTS() + + +2006-01-09(Mon) 11:56:34 +0900 Minero Aoki + + * yarvcore.h: add prototype (remove warning). + + * vm.c (th_invoke_proc): make save variables volatile. + + * eval.c (eval): initialize local variables (remove warnings). + + * eval_thread.c (rb_exec_recursive): ditto. + + * yarvcore.c (thread_mark): ditto. + + * vm.c (th_invoke_proc): ditto. + + * eval.c: remove useless prototypes. + + +2006-01-09(Mon) 10:25:12 +0900 Minero Aoki + + * eval_thread.c: rb_thread_join is required to build ruby on + Linux. + + * compile.c: unify coding style. + + * yarvcore.c: ditto. + + +2006-01-06(Fri) 09:21:34 +0900 Minero Aoki + + * vm.c: coding style change only. + + +2006-01-04(Wed) 14:12:47 +0900 Koichi Sasada + + * eval.c (ruby_init), eval_intern.h : use POP_TAG_INIT() at bootstrap + + * eval_thread.c : remove unused functions and comments + + * intern.h : expose rb_make_exception() + + * signal.c : support signal + + * thread.c (yarv_thread_execute_interrupts) : added + + * thread_pthread.h (thread_timer) : set interrupt_flag of + current runnning threads + + * vm.c (th_invoke_proc) : jump with JUMP_TAG() if some exception + occurres + + * yarv.h : add yarv_set_current_running_thread_raw() for bootstrap + + * yarvcore.c : add yarv_segv() and segv() method for test + + * yarvcore.c (Init_yarvcore) : set yarv_thread_t#running_thread + + * yarvcore.h : fix yarv_thread_t members + + +2006-01-03(Tue) 22:25:04 +0900 Koichi Sasada + + * disasm.c (insn_operand_intern) : fix to add child iseq + + * eval.c, gc.c : remove obsolete static variables (ruby_scope, + ruby_dyna_vars, ruby_frame) + + * eval.c (rb_mod_s_constants) : use ruby_cref() + + * eval.c (eval) : use th_restore_klass() + + * eval_proc.c (rb_f_binding) : use th_store_klass() + + * insns.def (concatarray) : fix insn ([expr, *nil] => [expr]) + + * vm.c (th_set_env), insnhelper.h : remove macro + + * vm.c (eval_get_cvar_base) : use get_cref + + * vm.c (th_make_proc) : use th_store_klass() + + * vm_macro.def (macro_eval_invoke_func) : fix option args size + + * vm_macro.def (macro_eval_invoke_func) : raise stack overflow error + + * yarvcore.h : add yarv_stored_klass_t type + + * yarvcore.c : fix mark functions around yarv_stored_klass_t + + +2006-01-01(Sun) 05:14:26 +0900 Minero Aoki + + * lib/benchmark.rb: new file (imported from original ruby, rev + 1.10). + + +2006-01-01(Sun) 03:51:10 +0900 Minero Aoki + + * yarvcore.c: add prototype. + + * re.c: remove warning: long -> unsigned long. + + * debug.c: adjust coding style. + + * yarv.h: ditto. + + +2006-01-01(Sun) 03:43:33 +0900 Minero Aoki + + * variable.c: add prototype. + + * eval.c: ditto. + + * eval_load.c: ditto. + + +2006-01-01(Sun) 02:41:21 +0900 Koichi Sasada + + * common.mk : add address analyse to vtune rule + + * rb/vtlh.rb : added for above + + * rb/insns2vm.rb, template/vm.inc.tmpl : insert #line directive + to reference above + + * vm_macro.def (macro_eval_invoke_cfunc) : fix indent + + * yarvtest/test_method.rb : fix indent, spacing + and add a test for alias + + +2005-12-31(Sat) 12:42:05 +0900 Koichi Sasada + + * common.mk : add Intel VTune rule (make vtune) + + * eval.c, yarvcore.h : fix to remove yarv_thread_t#local_* + + * parse.y (top_local_init_gen) : fix a problem ([yarv-dev:765]) + + * yarvtest/test_eval.rb : add a test for above + + * vm.c (thread_eval) :remove unused function + + * yarvcore.c (Init_yarvcore) : remove YARVCore::Thread::eval method + + * yarvcore.c (thread_eval) : remove unused function + + +2005-12-31(Sat) 06:05:00 +0900 Koichi Sasada + + * vm.c (eval_search_super_klass) : pass block to method missing + + * vm_macro.def (macro_eval_invoke_method) : ditto + + * yarvtest/test_method.rb : add a test for above + + +2005-12-31(Sat) 03:11:14 +0900 Koichi Sasada + + * eval.c (eval), eval_proc.c (rb_f_binding) : save klass, etc to + binding and use it at eval + + * eval_intern.h : ditto + + * yarvtest/test_eval.rb : add tests for above + + * yarvcore.c (th_get_special_cref) : added + + * yarvcore.h : add a prototype of above + + * vm.c (th_get_cref) : refactoring + + * vm.c (eval_get_ev_const) : fix SEGV at A::B (A is not class/module) + ([yarv-dev:758]) + + * yarvtest/test_bin.rb : add a test for above + + * rb/mklog.rb : use external diff command and show function name + + +2005-12-30(Fri) 19:07:51 +0900 Koichi Sasada + + * yarvcore.c, yarvcore.h, eval.c, eval_proc.c : support + Ruby's Binding + + * yarvcore.c : support TOPLEVEL_BINDING + + * yarvtest/test_eval.rb : add tests for above + + +2005-12-30(Fri) 13:12:28 +0900 Minero Aoki + + * test/ruby/test_eval.rb: more tests for + module_eval/instance_eval. + + +2005-12-30(Fri) 05:06:49 +0900 Koichi Sasada + + * common.mk : add dependency (yarvcore.h) for gc.c + + * eval.c, eval_intern.h, eval_load.c, eval_method.h, + insns.def, insnhelper.h, vm.c, yarvcore.c, yarvcore.h : + re-write class reference + + * yarvtest/test_eval.rb : added + + * yarvtest/test_proc.rb : + + +2005-12-29(Thu) 12:27:12 +0900 Koichi Sasada + + * compile.c, yarvcore.h : + remvoe needless yarv_iseq_t#rewind_frame_size + + +2005-12-29(Thu) 11:17:58 +0900 Koichi Sasada + + * common.mk : add dependency to test-all rule + + * eval.c (rb_sourceline), vm.c (th_get_sourceline) : + fix to skip process if iseq is ifunc + + * test/ruby/test_lambda.rb : assert(fail, ...) instead of assert_fail + + * test/ruby/test_proc.rb : ditto + + * vm_dump.c : fix stack dump (iseq name) + + * vm_macro.def : store proc (block proc) to cfp#proc for GC mark + + * yarvcore.c : mark above on thread_mark + + * eval.c (exec_under) : replace block#self ([yarv-dev:751]) + + +2005-12-29(Thu) 01:56:46 +0900 Koichi Sasada + + * vm.c : fix setting of Proc cref ([yarv-dev:741]) + + * yarvcore.c : fix indent + + +2005-12-29(Thu) 00:17:03 +0900 Koichi Sasada + + * disasm.c : show (block) local variable simple (not as symbol) + + * gc.c : fix syntax error + + +2005-12-28(Wed) 23:35:06 +0900 Koichi Sasada + + * class.c (method_entry) : fixed for undefed method ([yarv-dev:743]) + + * compile.c : fix errinfo dvar id (#$!) + and fix NODE_ERRINFO compilation + + * eval_proc.c, yarvcore.c : support YARVCore::VM::Proc.new + + * insns.def : remove useless TODO comments + + * insns.def : fix to use strict array conversion on + checkarrayinclude + + * insns.def : fix defined?(yield) ([yarv-dev:744]) + + * yarvcore.h : change yarv_iseq_t layout + + +2005-12-28(Wed) 16:49:55 +0900 Minero Aoki + + * test/ruby/test_eval.rb: add TODO comment. + + * test/ruby/test_iterator.rb: rename YARVCore::VM::Proc -> Proc + (tmp). + + * test/ruby/test_lambda.rb: use assert_fail. + + * test/ruby/test_proc.rb: ditto. + + +2005-12-28(Wed) 16:28:35 +0900 Minero Aoki + + * test/ruby/test_clone.rb: removed (tmp). + + * test/ruby/test_eval.rb: define missing method Object#funcall + (tmp). + + * test/ruby/test_lambda.rb: turn off tests for "->". + + * test/ruby/test_proc.rb: turn off tests for |&b|. + + * test/ruby/test_proc.rb: turn off tests for $SAFE setter. + + +2005-12-28(Wed) 15:31:46 +0900 Koichi Sasada + + * compile.c : fix calculation of stack_max + + * eval.c (rb_iter) : fix block/retry handling + + * yarvtest/test_flow.rb : add tests for above + + * insns.def : fix block passing on super (super(&nil)) + + * vm_macro.def, insns.def : fix convert method of object to array + + * yarvtest/test_method.rb : fix a test for above + + * vm.c : fix backtrace generate algorithm + + +2005-12-28(Wed) 10:36:45 +0900 Koichi Sasada + + * compile.c, compile.h : refactoring (remove self passing, etc) + + * disasm.c : support showing ID of method/dynamic local variables + + * rb/allload.rb : add verbose version (it's enable by $DEBUG) + + * template/insns.inc.tmpl, template/insns_info.inc.tmpl, + template/minsns.inc.tmpl, template/opt_sc.inc.tmpl, + template/optinsn.inc.tmpl, template/optunifs.inc.tmpl, + template/vmtc.inc.tmpl : fix a comment + + * variable.c (mod_av_set) : fix to clear inline cache ([yarv-dev:720]) + + * eval_method.h : fix to clear inline method cache + + * vm.c, rb/insns2vm.rb, template/insns_info.inc.tmpl, compile.c, + insns.def, vm_evalbody.h, vm_macro.def : + fix operands types (ulong -> num_t, ...) + + * vm_macro.def : fix to check SPECIAL_CONST_P() at splat array + ([yarv-dev:722]) + + * yarvcore.c : fix to throw syntax error + + * yarvcore.h, eval.c, eval_error.h, eval_jump.h : + add yarv_vm_t#exit_code to fix problem at cleanup ([yarv-dev:723]) + + * insns.def : fix to invoke zsuper in method defined by define_method + ([yarv-dev:704]) + + * yarvtest/test_class.rb : add tests for above + + * yarvtest/test_method.rb : fix comments + + +2005-12-27(Tue) 01:52:07 +0900 Koichi Sasada + + * array.c, intern.h, insns.def : expose rb_ary_replace and use it + in insns.def + + * eval.c : fix to use SCOPE_* to NOEX_* + + * eval_intern.h : remove SCOPE_* + and fix SCOPE_TEST() and SCOPE_SET(f) + + * eval_load.c : save and store klass and visibility + at require and load + + * eval_method.h : fix undefed method node ([yarv-dev-en:8]) + + * eval_proc.c : fix define_method ([yarv-dev:704]) + + * insnhelper.h, vm.h : remove GET_VM_STATE_VERSION(), + INC_VM_STATE_VERSION() and move these to vm.h + + * insns.def : supportintg visibility + + * node.h : remove NOEX_RECV + + * variable.c, vm.c : add rb_vm_change_state() and use it in + remove_const + + * vm.c, insns.def, yarvcore.h, yarvcore.c : add eval_push_cref(), + eval_pop_cref() and th_cref_init to manage current visibility + + * yarv.h : add a prototype of rb_vm_change_state() + + * yarvcore.h, insns.def : add defined_method_id and support + super in define_method scope + + * yarvtest/test_class.rb : add tests for above + + +2005-12-26(Mon) 20:44:38 +0900 Minero Aoki + + * test/ruby/test_basicinstructions.rb: new file. + + +2005-12-26(Mon) 08:40:02 +0900 Koichi Sasada + + * vm.c (eval_get_ev_const) : fix to skip nil + + +2005-12-26(Mon) 08:27:15 +0900 Koichi Sasada + + * insnhelper.h : fix GET_CVAR_EV_KLASS [yarv-dev:703] + + +2005-12-26(Mon) 07:51:01 +0900 Koichi Sasada + + * compile.c : add emptstack insn for all NODE_RETURN + and optimize it if it's not needed + + * yarvtest/test_flow.rb : add a test for above + + +2005-12-26(Mon) 07:08:22 +0900 Koichi Sasada + + * eval.c, gc.c : add "gc_debug_flag" to debug gc + + * insns.def : add emptstack + + * compile.c, rb/insns2vm.rb, template/insns_info.inc.tmpl : + change interface of insn_stack_increase + + * compile.c : fix return from ensure in method [yarv-dev:702] + + * yarvtest/test_flow.rb : add tests for above + + +2005-12-26(Mon) 02:15:02 +0900 Minero Aoki + + * test/ruby/test_alias.rb: do not use unimplemented defined?. + + +2005-12-26(Mon) 02:00:11 +0900 Minero Aoki + + * test/runner.rb: new file. + + * test/ruby/test_alias.rb: new file. + + * test/ruby/test_clone.rb: new file. + + * test/ruby/test_eval.rb: new file. + + * test/ruby/test_iterator.rb: new file. + + * test/ruby/test_lambda.rb: new file. + + * test/ruby/test_proc.rb: new file. + + * test/ruby/test_super.rb: new file. + + * test/ruby/test_assignment.rb: new file. + + * test/ruby/test_bignum.rb: new file. + + * test/ruby/test_call.rb: new file. + + * test/ruby/test_case.rb: new file. + + * test/ruby/test_condition.rb: new file. + + * test/ruby/test_const.rb: new file. + + * test/ruby/test_defined.rb: new file. + + * test/ruby/test_exception.rb: new file. + + * test/ruby/test_gc.rb: new file. + + * test/ruby/test_ifunless.rb: new file. + + * test/ruby/test_method.rb: new file. + + * test/ruby/test_trace.rb: new file. + + * test/ruby/test_variable.rb: new file. + + * test/ruby/test_whileuntil.rb: new file. + + +2005-12-25(Sun) 07:40:08 +0900 Koichi Sasada + + * blockinlining.c, compile.c : fix block inlining + + * rb/insns2vm.rb : fix to support tracing stack depth + with operands unification + + * vm_dump.c : fix to print Qundef on stack dump + + +2005-12-25(Sun) 01:45:55 +0900 Koichi Sasada + + * insns.def, compile.c, rb/insns2vm.rb, template/insns_info.inc.tmpl : + trace stack depth at compile time + and use it as cont_sp for exception handling + + * yarvtest/test_exception.rb : add tests for above + + * yarvtest/test_flow.rb : ditto + + * Merry Xmas :) + + +2005-12-24(Sat) 19:34:04 +0900 Koichi Sasada + + * compile.c, compile.h : fix ADD_CATCH_ENTRY and add LABEL#sp + + * eval_jump.h : fix catch to remove illegal error + + +2005-12-24(Sat) 09:05:23 +0900 Koichi Sasada + + * eval_method.h : change data structure for RClass#m_tbl + + * class.c, eval.c, eval_proc.c : fix for above changes + + * node.h, gc.c : change NODE_FBODY, NODE_METHOD members + for above changes + + * insns.def : support private/protected visibility + + * vm_macro.def : ditto + + * vm.c : ditto + + * thread.c : fix typo + + * thread_pthread.h : fix typo + + * thread_win32.h : fix typo + + * eval.c, yarvcore.h : add yarv_thread_t#method_missing_reason + to pass method_missing reason and use it to build error message + + * compile.c : use ADD_CALL instead of ADD_SEND for + NODE_X(D)STR, NODE_CONST (func) + + +2005-12-22(Thu) 02:45:27 +0900 Koichi Sasada + + * yarv_version.h, Changes : 0.3.3 + + +2005-12-20(Tue) 04:04:45 +0900 Koichi Sasada + + * compile.c : fix self::Const access + + * yarvtest/test_bin.rb : add a test for above + + +2005-12-20(Tue) 01:52:52 +0900 Koichi Sasada + + * insns.def : fix to expand VALUES value + + * yarvtest/test_massign.rb : add a test for above + + +2005-12-20(Tue) 01:32:35 +0900 Koichi Sasada + + * insns.def, insnhelper.h : fix cvar in singleton method/class + + * yarvtest/test_bin.rb : add tests for above + + +2005-12-20(Tue) 01:03:34 +0900 Koichi Sasada + + * compile.c, yarvcore.h : support all defined?() syntax + + * compile.c : fix NODE_COLON2 + + * yarvtest/test_bin.rb : add or fix tests for above + + * win32/* : update all + + +2005-12-17(Sat) 10:46:08 +0900 Minero Aoki + + * vm_macro.def: fix printf type mismatch for LP64 system (again). + + * parse.y: introduce descriptive macro for special values of + lvtbl->dvars. + + +2005-12-17(Sat) 09:39:27 +0900 Minero Aoki + + * vm_macro.def (macro_eval_invoke_method): fix printf type mismatch + for LP64 system. + + +2005-12-14(Wed) 03:49:40 +0900 Koichi Sasada + + * compile.c : change rescue/ensure iseq name + + * eval.c, intern.h : fix a prototype + + * insns.def, yarvcore.h : add trace_function + + * vm.c : fix deadly bug (illegal pointer cast) + + * vm_dump.c : remove unused local variables + + * vm_macro.def : add parameter size check + + * yarvtest/test_bin.rb : comment out 2 assertions + + +2005-12-13(Tue) 03:55:27 +0900 Koichi Sasada + + * eval_proc.c : fix indent + + * insns.def : fix getspecial instruction to return nil + if no entry + + * yarvtest/test_syntax.rb : add a test for above + + * lib/un.rb : added + + * template/*.tmpl : fix typo + + +2005-12-13(Mon) 01:38:17 +0900 Minero Aoki + + * yarv.h: add prototypes. + + * intern.h: ditto. + + * eval.c: ditto. + + * debug.c: ditto. + + * thread_pthread.h: fix printf type mismatch for LP64 system + (Linux/AMD64). + + * variable.c: ditto. + + * object.c: ditto. + + * gc.c: ditto. + + * process.c: ditto. + + * error.c: ditto. + + * vm.c: ditto. + + * vm.h: ditto. + + * vm_dump.c: ditto. + + * disasm.c: ditto. + + * marshal.c: ditto. + + * eval_thread.c: ditto. + + +2005-12-11(Sun) 22:00:34 +0900 Koichi Sasada + + * insns.def : call "inherited" method when a class is inherited + + * yarvcore.h : fix yarv_iseq_t field layout + + * common.mk : add dependence on yarvcore.h to eval*.o files + + * compile.c : fix NODE_POSTEXE logic + + * insnhelper.h : use GC_GUARDED_PTR_REF instead of magic number + + * eval_proc.c : fix indent + + * configure : re-autoconf + + +2005-12-10(Sat) 03:57:20 +0900 Koichi Sasada + + * common.mk : fix blockinlining.o build rule + + * insns.def : remove logic for zsuper + + * template/optinsn.inc.tmpl : + + * vm.c : remove thread_yield_light_prepare, thread_yield_light_invoke + + * compile.c : support NODE_ZSUPER with optargs, restarg + + * yarvtest/test_class.rb : add tests for above + + +2005-12-09(Fri) 01:13:37 +0900 Koichi Sasada + + * array.c, numeric.c, range.c : add prototype of + block inlining function + + * blockinlining.c, vm_opts.h.base : add block inlining flag + + * common.mk, debug.h, debug.c : add debug_breakpoint() for gdb + + * compile.c : fix to use size_t on compile_data_alloc(), + fix illegal cast, fix to set arg_simple at compiling block, + + * compile.c, vm.c : fix NODE_NEXT, NODE_BREAK logic + + * yarvtest/test_flow.rb : add a test for above + + * yarvcore.c, yarvcore.h, compile.c, eval.c : remove + yarv_iseq_t#root_iseq and add yarv_iseq_t#local_iseq and fix + to use this member field + + * eval_method.h : fix indent + + * gc.c : fix indent + + * insns.def, compile.c : remove "zsuper" instruction (use "super" + instead). This is because NODE_ZSUPER represent with only "super" + instruction + + * yarvcore.c : add proc_arity + + +2005-12-05(Mon) 03:58:30 +0900 Koichi Sasada + + * array.c, blockinlining.c : support block inlining for Array#each + + * disasm.c : fix catch table format + + * insns.def : fix stack consistency error message + + * vm.c : fix to skip pushing value at "next" + + * yarvcore.h : move definision of + "struct iseq_compile_data_ensure_node_stack" to compile.c + + * compile.c : fix ensure catch table creation + + * yarvtest/test_flow.rb : add tests for above + + +2005-12-03(Sat) 22:27:08 +0900 Koichi Sasada + + * blockinlining.c, compile.c, yarvcore.c, yarvcore.h, + numeric.c, range.c : collect block inlining logic to blockinlining.c + + +2005-12-03(Sat) 20:24:07 +0900 Koichi Sasada + + * blockinlining.c, common.mk : add blockinlining.c + + * yarvcore.c, yarvcore.h, blockinlining.c, compile.c, compile.h, + gc.c, node.h, numeric.c, range.c : + support block inlining for Integer#times, Range#each + + * compile.c : fix to set block redo/next point at last, + and fix NODE_OP_ASGN1 + + * compile.c, vm.c : add specialized instruction "opt_le" + + * disasm.c : fix to show block, and to show catch type as string + and change node_name logic + + * eval_thread.c : fix function type declaration + + * insns.def : add instruction "putundef", "opt_checkenv" + to support block inlining and add stack check routine + + * lib/cgi.rb : add global variable $CGI_DONTINPUT + + * opt_operand.def : add some operand unification rules + + * rb/insns2vm.rb : fix operand unification logic for BLOCKISEQ + + * vm.c : fix exception handling routine (collect stack operations) + + * vm_macro.def : fix macro_eval_invoke_bmethod + + * yarvsubst.c : removed + + * yarvtest/test_syn.rb : rename to yarvtest/test_syntax.rb + + * yarvtest/yarvtest.rb : remove tempfile explicitly + + +2005-11-30(Wed) 01:13:57 +0900 Koichi Sasada + + * common.mk : add vm_opts.h rule + + * vm.c, insns.def : fix proc creation under class and block + environment + + +2005-11-29(Tue) 16:39:07 +0900 Koichi Sasada + + * eval.c, eval_proc.c, vm.c, vm_macro.def : + support define_method and invoke NODE_BMETHOD method + + +2005-11-29(Tue) 13:18:06 +0900 Koichi Sasada + + * compile.c : add iseq_add_mark_object, iseq_add_mark_object_compile_time + and use it to mark objects on iseq + + * compile.h, compile.c : remove cast on NEW_CHILD_ISEQVAL, NEW_ISEQVAL + and interface + + * compile.c, disasm.c, insns.def, vm_macro.def, rb/insns2vm.rb : + add BLOCKISEQ parameter type + + * gc.c : fix garbage_collect to return true if only allocate memory + + * vm.c : fix insertion order of proc/env + + * vm_evalbody.h : add typedef yarv_iseq_t *BLOCKISEQ + + * yarvcore.c, yarvcore.c : add idTimes + + * yarvcore.c : fix proc_mark, env_mark around iseq mark + + +2005-11-28(Mon) 09:02:57 +0900 Koichi Sasada + + * compile.c, insns.def, vm_evalbody.h : support super + with splat argument and block (and zsuper with block) + + * yarvtest/test_class.rb : add tests for above + + * compile.c, yarvcore.h, yarvcore.c, insns.def, time.c, string.c : + add opt_succ insn + + * eval_method.h : fix indent + + * eval_thread.c : apply cast to vanish a warning + + * lib/tempfile.rb, lib/tmpdir.rb : added + + * vm.c : eval_method_missing added + + * vm_macro.def : refactoring + + +2005-11-21(Mon) 21:21:33 +0900 Koichi Sasada + + * compile.c, compile.h, yarvcore.c : remove "iseqobj" + variables and rename to "iseq" + + +2005-11-21(Mon) 07:31:50 +0900 Koichi Sasada + + * compile.c : fix block parameter error + + * ext/* : added + + * lib/optparse* : added + + * benchmark/bm_so_sieve.rb : fix parameter + + + +2005-11-21(Mon) 03:47:28 +0900 Koichi Sasada + + * compile.c : optimize condition in literal + + * thread_win32.h : fix win32 thread function prototype + + +2005-11-20(Sun) 17:58:24 +0900 Koichi Sasada + + * compile.c : fix NODE_AND/OR bug + + * eval.c : support rb_frame_this_func() + + +2005-11-20(Sun) 12:32:31 +0900 Koichi Sasada + + * compile.c, yarvcore.c, yarvcore.h : support NODE_OPT_N + + * compile.h : add macro ADD_CALL + + * debug.c : add debug_v() and change to use only printf + on debug_id() + + * sample/test.rb : + + * vm.c : fix make_proc_from_block + + +2005-11-19(Sat) 14:55:17 +0900 Koichi Sasada + + * import ruby 1.9.0 (2005-11-18) + + +2005-11-19(Sat) 06:08:37 +0900 Koichi Sasada + + * lib/test : added + + +2005-11-19(Sat) 05:48:50 +0900 Koichi Sasada + + * compile.c : useless jump elimination (if/unless destination) + + * eval.c : rb_iter_break support, + fix rb_iterate (clear errinfo if break) + + * eval_proc.c : support rb_node_arity (YARV_METHOD_NODE) + + * insns.def : change variable name + + * vm.c : fix th_invoke_yield and add th_iter_break() + + * vm_dump.c : fix yarv_bug() + + * yarvcore.c : fix proc_mark to check IFUNC node and add + global ruby method SDR() for debug + + * yarvtest/test_syn.rb : add a test for all condition combination + + +2005-11-15(Tue) 05:52:58 +0900 Koichi Sasada + + * lib/forwardable.rb : added + + * common.mk : remove "vm.o : CFLAGS += -fno-crossjumping" rule + + * compile.c, yarvcore.h, insns.def : add FCALL/VCALL flag + + * compile.c, insns.def : add onceinlinecache instruction + + * eval.c : support $!, $@, raise (== raise $!) + + * opt_operand.def : add some unification rule (send flags) + + * vm.c : fix return process + + * vm_macro.def : fix option prameters + + * yarvtest/test_method.rb : add tests for above + + +2005-11-15(Tue) 00:42:49 +0900 Koichi Sasada + + * eval.c : support rb_frame_pop() and rb_frame_callee(), + add rb_sourcefile(), rb_souceline(), + + + * compile.c : support postposition while/until, + fix block parameter index + + * yarvtest/test_syn.rb : add tests for above + + * yarvcore.c : fix env_mark + + * vm.h, yarvcore.h : move vm.h#cmethod_info to + yarvcore.h#yarv_cmethod_info + + * vm.c : add th_get_sourceline() + + * eval_intern.h : fix PASS_PASSED_BLOCK() + + * eval_load.c : fix re-enter require (temporalily) + + * insns.def : permit re-open class when superclass is same + + +2005-11-11(Fri) 01:20:15 +0900 Koichi Sasada + + * common.mk : add "allload" rule + + * compile.c, yarvcore.h, insns.def, vm_macro.def, disasm.c : + change arg_rest, arg_block offset (1) + + * insns.def : add postexe instruction + + * insns.def, vm.c : support rest block parameter + + * yarvtest/test_block.rb : add tests for above + + * rb/allload.rb : get path from ARGV + + * vm_opts.h.base : set default off + + +2005-11-01(Tue) 08:28:19 +0900 Koichi Sasada + + * benchmark/other-lang/eval.rb : fix path + + * lib/English.rb, lib/cgi.rb, lib/complex.rb, lib/delegate.rb : + added + + +2005-11-01(Tue) 08:18:33 +0900 Koichi Sasada + + * compile.c : push and pop values after checkincludearray for + stack caching + + +2005-10-31(Mon) 15:37:09 +0900 Koichi Sasada + + * benchmark/bm_app_mandelbrot.rb : added + + * benchmark/bm_app_factorial.rb : fixed parameter + + * benchmark/bm_so_count_words.rb, benchmark/run_rite.rb : use + real file + + * common.mk : add "ext" rule, add some dependencies and add option + to bench-each rule (renamed from bench-item) + + * compile.c : fix get_root_iseq_object (check iseq type), + support splat case/when. support //o (regexp) + + * eval.c : support *_eval, fix rb_obj_call_init to pass block + + * eval_jump.h : support throw/catch + + * eval_load.c : save klass_nest_stack when require + + * eval_method.h : fix ruby_cbase() + + * insnhelper.h : GET_EV_KLASS checks toplevel or not + + * insns.def, yarvcore.c : fix singleton method definition and fix + super class's method + + * lib/shellwords.rb : use String() instead of String.new() + + * vm.c : check class iseq or not when making Proc and + add eval_search_super_klass function + + * vm.h : CMETHOD_INFO_P to yarvcore.h + + * vm_macro.def : splat if object type is T_ARRAY + + * vm_opts.h, vm_opts.h.base : rename to vm_opts.h.base + insns2vm.rb will copy it to build directory + + * yarvcore.c : add Proc#[] + + * yarvcore.h : change INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE + to 512 + + * yarvtest/test_* : invalidate splat non array code (like: "*1") + + * yarvtest/yarvtest.rb : use tempfile instead of popen + + +2005-10-28(Fri) 09:11:53 +0900 Koichi Sasada + + * yarvtest/test_method.rb : fix test + + +2005-10-28(Fri) 08:43:29 +0900 Koichi Sasada + + * benchmark/run_rite.rb : add -I options to run benchmark + + * common.mk : pass options to some rules with RUNOPT + and add -I options + + * compile.c : fix massign with constant + + * yarvtest/test_massign.rb : add tests for above + + * eval_load.c : fix load_wait() + + * eval_method.h : support ruby_cbase() + + * lib/*.rb : add or modify libraries to run on yarv + * parse.y : change to ANSI C style + + * vm.c : fix making proc process under cfunc/ifunc environment + + * vm_macro.def : fix block pass + + * yarvtest/test_method.rb : add tests for above + + * yarvcore.c : add yarv_obj_is_proc() + + * eval.c : fix rb_obj_is_proc to use yarv_obj_is_proc() + + +2005-10-27(Thu) 11:50:15 +0900 Koichi Sasada + + * some files : import from ruby 1.9.0 (2005-10-12) + + +2005-10-16(Sun) 14:50:02 +0900 Koichi Sasada + + * insns.def, compile.c, yarvcore.h, yarvcore.c : add insns "bitblt" and "answer" + + +2005-10-11(Tue) 17:01:13 +0900 Koichi Sasada + + * yarv_version.h, Changes : 0.3.2 + + +2005-10-11(Tue) 13:35:25 +0900 Koichi Sasada + + * insns.def : add YARV_CHECK_INTS() + + * thread.c, thread_pthread.h, thread_win32.h : kick timer thread + when another thread kicked + + * vm.c : remove debug print + + * vm_opts.h : add OPT_CALL_THREADED_CODE + + * yarvtest/yarvtest.rb : remove "\r" from answer + + +2005-10-07(Fri) 09:36:36 +0900 Koichi Sasada + + * yarvcore.h : add member variable "interrupt_flag" to yarv_thread_t + + +2005-10-05(Wed) 21:20:13 +0900 Koichi Sasada + + * eva.c, eval_thread.c, ruby.h, eval_error.h, eval_jump.h, + eval_load.c, thread.c, error.c, compile.h : remove ruby_errinfo + + * thread_win32.h, thread_pthread.h : set stack size to 4KB + + * vm.c : fix making env routine + + * vm_dump.c, vm.h : support frame type "EVAL" and fix magic number + + * yarvcore.c : fix some mark/free routine + + +2005-10-05(Wed) 09:08:11 +0900 Koichi Sasada + + * eval.c, eval_intern.h, vm.c, eval_jump.h, yarvcore.h : + re-define PUSH/POP/EXEC/JUMP_TAG to use thread local tag + + * inits.c, yarvcore.c : fix boostrap + + +2005-10-03(Mon) 22:28:24 +0900 Koichi Sasada + + * compile.c : fix NODE_COLON2 bugs + + * compile.h : fix debug routine + + * disasm.c : add space between insn and operand + + * insns.def : add comment of classdef, singletonclassdef + + * vm.c, yarv.h : fix invoke_light routine + + * yarvcore.c : fix to mark each threads + + +2005-10-02(Sun) 05:55:34 +0900 Koichi Sasada + + * thread_pthread.h : add "system_working" global variable + + +2005-10-02(Sun) 01:23:44 +0900 Koichi Sasada + + * thread.c : add raw gets (for test), and fix indent + + +2005-10-01(Sat) 23:06:21 +0900 Koichi Sasada + + * thread_win32.h, common.mk : add thread_win32.h + + * thread.c : support _WIN32 thread + + * thread.c, thread_pthread.h : fix some interface + + * eval_thread.c : remove debug print + + * gc.c : fix stack region + + * win32/Makefile.sub : add -MD flag to LDFLAGS + + * yarvcore.c : fix mark and sweep debug print + + * yarvcore.h : fix VM#living_threads data type to st_table + + +2005-10-01(Sat) 00:25:28 +0900 Koichi Sasada + + * thread.c, yarvcore.h : rename GIL (Global Interpreter Lock) to + GVL (Global VM Lock) + + * thread_pthread.h : fix pthread mutex initialize + + +2005-09-30(Fri) 20:11:19 +0900 Koichi Sasada + + * thread.c : support join with timeout + + * yarvcore.h : use GET_VM() + + +2005-09-30(Fri) 14:59:29 +0900 Koichi Sasada + + * thread.c, common.mk : add thread.c + + * thread.c, gc.c, eval_thread.c, yarvcore.c, yarvcore.h : + support native thread (on pthread) + + * insns.def : add YARV_CHECK_INTS() check + + * yarv.h : add GET_VM() macro + + +2005-09-29(Thu) 22:43:08 +0900 Koichi Sasada + + * eval_intern.h, eval_thread.c : move thread_status to eval_intern.h + + * yarvcore.c : fix thread/vm value + + * yarvcore.h : add some parameter to yarv_thread_t + + +2005-09-29(Thu) 01:52:33 +0900 Koichi Sasada + + * compile.c, yarvcore.h : add line number on last end instruction + + * vm.c : fix line no detection + + +2005-09-28(Wed) 00:02:10 +0900 Koichi Sasada + + * common.mk, eval_load.c, eval.c, eval_intern.h : add eval_load.c + + * disasm.c : fix around block local variables + + * eval_proc.c : fix typo + + +2005-09-27(Tue) 16:45:20 +0900 Koichi Sasada + + * eval.c : remove debug print + + +2005-09-27(Tue) 16:41:47 +0900 Koichi Sasada + + * eval.c : support Kernel.local_variables + + * parse.y, yarvcore.c : move some functions + (rb_(backref|lastline)_(get|set)) from parse.y to yarvcore.c + + * yarvcore.h : fix typo of YARV_PREVIOUS_CONTROL_FRAME + + +2005-09-26(Mon) 18:51:29 +0900 Koichi Sasada + + * eval.c, compile.c, parse.y, vm.c, yarvcore.h : + eval() works with binding (Env) + + * vm.c : add th_set_eval_stack + + * yarvtest/test_syn.rb : remove an assert "defined?(local_var)" + + +2005-09-25(Sun) 19:30:59 +0900 Koichi Sasada + + * benchmark/bm_vm2_send.rb : added + + * common.mk : add rule "bench-item" + + * eval_intern.h : add PASS_PASSED_BLOCK() + + * eval_proc.c : support some functions + + * rb/mklog.rb : added + + * vm.c : fix prototype style and coding style + + * yarv.h : add some prototypes of functions + + * yarvcore.c, yarvcore.h, eval.c : yarv_thread_t#ifuncnode -> passed_block, + and add yarv_proc_t#safe_level + + +2005-09-25(Sun) 11:01:17 +0900 Koichi Sasada + + * some files : import from ruby 1.9.0 (2005-09-25) + + * eval*, vm.c, vm_macro.def : remove frame, scope, ... + + * yarvcore.c : remove yarv_block_given_p() + + * yarvcore.h, insnhelper.h : move some macro from insnhelper.h to yarvcore.h + to use these in eval.c + + +2005-09-24(Sat) 15:51:42 +0900 Koichi Sasada + + * eval* : remove dependency to ruby_dyna_vars and ruby_class + + +2005-09-23(Fri) 20:39:14 +0900 Koichi Sasada + + * eval_*.[ch] : split eval.c to some files + + * *.[ch] : import ruby 1.9.0 (2004-09-23) + + * parse.y : remove dependency to ruby_dyna_vars and ruby_scope + + +2005-09-15(Thu) 16:51:06 +0900 Koichi Sasada + + * compile.c, yarvcore.h : fix "for" scope + + * yarvtest/test_block.rb : add tests for above + + +2005-09-14(Wed) 06:11:43 +0900 Koichi Sasada + + * yarvcore.h, vm_evalbody.h, vm.h, vm_dump.c, + compile.c, yarvcore.c : use #ifdef insted of #if for recognize + vm options + + * vm_opts.h : fix default options + + +2005-09-10(Sat) 14:10:08 +0900 Koichi Sasada + + * vm_opts.h : added + + * yarvcore.h, rb/insns2vm.h : use vm_opts.h + + +2005-09-10(Sat) 04:53:22 +0900 Koichi Sasada + + * yarvcore.h, insns.def, compile.c : add DEFINED_YIELD + + * yarvtest/test_yield.rb : add test_1_ary_and_1_params + + * insns.def : fix splat and svalue + + * vm.c : fix to perform with proc with ifunc (incomplete) + + * sample/test.rb : added (comment out unsupported features) + + * common.mk : add rule "runtest" + + +2005-09-09(Fri) 19:32:11 +0900 Koichi Sasada + + * insns.def, compile.c : add splatarray + + * yarvtest/test_massign.rb : add tests for above + + +2005-08-31(Wed) 22:55:15 +0900 Koichi Sasada + + * yarvcore.c (yarvcore_eval_parsed): fix to return value + + * yarv_version.h, Changes : 0.3.1 + + +2005-08-20(Sat) 10:19:27 +0900 Koichi Sasada + + * rb/ir.rb : add some check + + * import today's ruby HEAD + + +2005-08-18(Thu) 23:29:52 +0900 Koichi Sasada + + * common.mk : fix object file extension + + * rb/ir.rb : added (import ruby script) + + * rb/diff.rb : removed + + * import today's ruby HEAD + + +2005-08-18(Thu) 12:59:38 +0900 Koichi Sasada + + * common.mk : rule test -> test2, test1 -> test + + * compile.c : fix when clause bug and splat arugment + + +2005-08-17(Wed) 05:22:31 +0900 Koichi Sasada + + * compile.c : fix block local parameter setting routine and support + massign in block parameter initialze + + * yarvtest/test_yield.rb : add tests for above + + * insns.def, compile.c : support array concat (ex: "[x, *y]") + + * yarvtest/test_bin.rb : add tests for above + + +2005-08-16(Tue) 19:51:19 +0900 Koichi Sasada + + * compile.c : support nested massign + + * yarvtest/test_massign.rb : add tests for above + + +2005-08-16(Tue) 10:25:29 +0900 Koichi Sasada + + * eval.c : support rb_yield_0 with 0 args + + +2005-08-16(Tue) 09:09:21 +0900 Koichi Sasada + + * lib/fileutils.rb : imported + + * insns.def : fix yield argument (same as last commit) + + * yarvtest/test_yield.rb : add tests for above + + +2005-08-16(Tue) 08:29:47 +0900 Koichi Sasada + + * eval.c : fix to support rb_yield_0 with multiple values + + * common.mk : add parse, run1p ruelse + + * compile.c : support yield with ARGSCAT/SPLAT + + * vm.c, insns.def : fix yield arguments to do compatible behaviour + + * yarvtest/test_yield.rb : added for above + + +2005-08-16(Tue) 06:00:17 +0900 Koichi Sasada + + * insns.def : fix to set klass_nest_stack on singleton + method definition + + * yarvtest/test_method.rb : add a test for above + + +2005-08-16(Tue) 05:34:48 +0900 Koichi Sasada + + * test1.rb : added. gdb and run1 rule run this script + + * compile.c : fix error handled variable access + + * yarvtest/test_exception.rb : add tests for above + + +2005-08-16(Tue) 04:26:08 +0900 Koichi Sasada + + * base ruby : ruby 1.9.0 (2005-08-15) + + +2005-08-16(Tue) 03:54:17 +0900 Koichi Sasada + + * common.mk, Makefile.in : move some rules to common.mk + + * rb/diff.rb : added + + * yarvtest/yarvtest.rb : fix to compare output last value + + +2005-08-15(Mon) 18:27:58 +0900 Koichi Sasada + + * Changes : 0.3.0 + + +2005-08-15(Mon) 17:56:09 +0900 Koichi Sasada + + * yarvcore.c : fix to add prototype + + * all files : propset svn:eol-style native + + +2005-08-15(Mon) 10:48:53 +0900 Koichi Sasada + + * eval.c : support rb_load + + +2005-08-15(Mon) 09:42:01 +0900 Koichi Sasada + + * yarvcore.h : define SDR() + + * vm_dump.c : stack_dump_raw() -> vm_stack_dump_raw() + + * yarvtest/yarvtest.rb : add rite test scheme + + * benchmark/run_rite.rb : added + + * yarvcore.c, inits.c : add Init_vm() + + * yarv.h : add some prototype declarations, GET_THREAD() + + * eval.c : remove unused functions + + * eval.c : support Kernel.eval, some schemes (same as evalc.patch) + + +2005-08-15(Mon) 00:53:28 +0900 Koichi Sasada + + * yarv_version.h : move configurations to yarvcore.h + + * yarvcore.c : remove VALUE yarv_get_current_running_thread() and + add yarv_thread_t *yarv_get_current_running_thread(), ... + + * yarvcore.h : yarv_thread_t#vm -> vm_value + + * compile.c : fix "break from nested classes" + + * yarvext/extconf.rb : use have_func instead of defined?(YARV_PACHED) + + * depend : fix pass + + * eval.c : change to kick VM + + * version.c : fix to show yarv version + + * common.mk : fix dependent + + * inits.c : fix to kick Init_yarvcore + + +2005-08-14(Sun) 02:05:15 +0900 Koichi Sasada + + * README : add description + + * yarvext/depend : move to topdir/depend + +2005-08-14(Sun) 01:50:43 +0900 Koichi Sasada + + * merge yarv to ruby (prepare) + + * make yarvext/ to build as extension + + +2005-08-13(Sat) 09:36:26 +0900 Koichi Sasada + + * evalc.patch, insns.def, compile.c : fix to support current + ruby HEAD. + + * 0.2.3 + + +2005-08-08(Mon) 19:13:02 +0900 Koichi Sasada + + * version.h, Changes : 0.2.2 + + +2005-08-08(Mon) 17:17:50 +0900 Koichi Sasada + + * vm.h, vm.c, insns.def, yarvcore.h, yarvcore.c : + remove yarv_iseq_t#iseq_dt and add yarv_iseq_t#encoded. + use yarv_iseq_t#encoded anytime + + * vm_evalbody.h, vm.h, extconf.rb, version.h : + support call threaded code (incomplete) + + +2005-08-01(Mon) 05:26:12 +0900 Koichi Sasada + + * yarvcore.c : support yield with multiple values + + * compile.c : fix dynavars + + * yarvcore.h : fix to mark defined method + + +2005-07-31(Sun) 23:27:24 +0900 Koichi Sasada + + * yarvcore.c, vm.c, insns.def : fix search object path + + * compile.c : fix "for" statement + + * vm_macro.def : fix rest, opt arguments + + +2005-07-31(Sun) 14:52:06 +0900 Koichi Sasada + + * vm_macro.def : fix block parameter + + * compile.c : fix to unuse compile_data->in_ensure + + * insns.def : add orphan check when return + + +2005-07-31(Sun) 03:25:05 +0900 Koichi Sasada + + * vm.c, compile.c, yarvcore.h, insns.def : + support jump from rescue/ensure/class/module + + * test/test_flow.rb : add tests for above fix + + +2005-07-30(Sat) 04:44:33 +0900 Koichi Sasada + + * yarvcore.h : struct iseq_compile_data_ensure_node_stack is added + + * compile.c : insert ensure clause before break/next/redo + + * vm.c : fix return/break handling + + * yarv.h, vm.c : fix lightweight yield + + * vm.c, insns.def, vm_macro.def : change arguments of th_set_env (add sp) + + * test/test_flow.rb : added + + * test/yarvtest.rb : add ae_flow + + * compile.c, vm_macro.def : add tail-call/tail-recursion optimization + (experimental) + + +2005-07-29(Fri) 20:14:11 +0900 Koichi Sasada + + * compile.c : make_name_for_block and make_name_with_str + are added + + * insns.def : fix if unmatched size arg size to yield + + * test/test_block.rb : add test for above fix + + * vm.c : add th_backtrace_each and fix backtrace notation + + * yarvcore.c : set top level iseq name to "
" + + +2005-07-29(Fri) 13:20:19 +0900 Koichi Sasada + + * yarvcore.h : fix yarv_iseq_t to pass VC (cl) + + * vm_dump.c : ditto + + * compile.h : ditto + + * insnhelper.h : ditto + + * vm_evalbody.h : include 'math.h' + + * insns.def, vm.c : raise error when yield without block + + * vm.c : implement thread_backtrace + + * vm.c, yarvsubst.c, yarv.h : implement thread_yield_light_prepare and + thread_yield_light_invoke + + * yarvcore.c : Integer#times uses yarv specific version + + +2005-07-28(Thu) 21:35:09 +0900 Koichi Sasada + + * yarvcore.c : add another mark function for thread/stack + + * vm_evalbody.h : fix register allocation for x86_64 + + * vm.h : use asm for tc on x86_64 + + +2005-07-28(Thu) 20:17:09 +0900 Koichi Sasada + + * yarvcore.c : add mark/free message to debug gc + + * insnhelper.h, insns.def, vm_macro.def : remove and + add new RESTORE_REGS + + * vm_evalbody.h : fix register allocation + + +2005-07-28(Thu) 02:00:42 +0900 Koichi Sasada + + * vm.c, etc : change VM stack structure. re-write all + vm functions to do it + + * vm_macro.def : added + + +2005-07-08(Fri) 01:36:49 +0900 Koichi Sasada + + * insns.def : don't use fmod on AMD64 + + +2005-07-08(Fri) 00:14:22 +0900 Koichi Sasada + + * Changes : added + + +2005-07-07(Thu) 23:54:37 +0900 Koichi Sasada + + * version.h : 0.3.0 + + +2005-07-07(Thu) 23:52:03 +0900 Koichi Sasada + + * 0.2.1 : released + + +2005-07-07(Thu) 23:50:22 +0900 Koichi Sasada + + * version.h : 0.2.1 + + +2005-07-07(Thu) 23:47:55 +0900 Koichi Sasada + + * rb/insns2vm.rb, extconf.rb : add --[enable|disable]-opt-unify-all-combination + and --disable-opts + + * vm.h : DISPATCH_ARCH_DEPEND_WAY is only enabled on GCC 3.x + + +2005-07-06(Wed) 13:20:27 +0900 Koichi Sasada + + * depend, rb/eval.rb : add ITEMS option to benchmark rule + + * benchmark/* : changed + + * benchmark/other-lang/* : added + + +2005-07-04(Mon) 04:02:15 +0900 Koichi Sasada + + * yarvcore.h. yarvcore.c : add idDIV, idMOD, idEq, idLength + + * compile.c, insns.def : add specialized insn for above method id + + * test/test_bin.rb : add tests for above + + +2005-07-03(Sun) 20:31:09 +0900 Koichi Sasada + + * yarvcore.c, yarvcore.h : remove cYarvThrowObject (unused) + + * yarvcore.c, yarvcore.h, insns.def : + thread_object#stack_mark_poinetr + + * depend, rb/eval.rb : BOPT, TOPT -> OPT + + +2005-07-03(Sun) 13:53:47 +0900 Koichi Sasada + + * compile.c, compile.h : INSN_OBJECT, LABEL_OBJECT -> INSN, LABEL, + ISEQ_LINK_ELEMENT, ISEQ_LINK_ANCHOR -> LINK_ELEMENT, LINK_ANCHOR, + and some fixes + + * tmpl/optinsn.inc.tmpl : ditto + + * yarvcore.c, yarvcore.h : remove label_object, insn_object + prepare_iseq_build, cleanup_iseq_build are added + + * insns.def : remove unused variable from send + + +2005-07-02(Sat) 04:19:22 +0900 Koichi Sasada + + * insns.def : add GC protect for opt_aset + + +2005-07-02(Sat) 03:49:17 +0900 Koichi Sasada + + * extconf.rb : add option -fno-reorder-blocks to vm.asm rule + + * insns.def : fix opt_aset bugs + + * test/test_bin.rb : add tests for aset, aref + + +2005-07-02(Sat) 03:05:12 +0900 Koichi Sasada + + * benchmark/run.rb : fix output + + * vm_evalbody.h : add register for x86_64 + + * rb/asm_parse.rb : fix to shor size and length + + +2005-07-02(Sat) 02:56:31 +0900 Koichi Sasada + + * compile.c : move specialized instruction point (new_insn_send) + + * insns.def : add opt_aref, opt_aset + + +2005-07-01(Fri) 11:04:11 +0900 Koichi Sasada + + * compile.h : fix to pass VALUE type to new_insn_body + + * insnhelper.h : add cast + + * compile.c : fix getdynamic argument (0 == Qfalse -> I2F(0)) + + +2005-06-30(Thu) 23:34:10 +0900 Koichi Sasada + + * rb/eval.rb : add and fix some rules + + * rb/insns2vm.rb : generate all + + * benchmark/run.rb : add -r (ruby only) option + + +2005-06-30(Thu) 23:25:23 +0900 Koichi Sasada + + * tmpl/vmtc.inc.tmpl : add const prefix + + * /rb/asm_parse.rb, extconf.rb : added and make assembler analised output + + * opt_operand.def : add send operands unification + + * insnhelper.h : add HEAP_CLASS_OF(obj) + + * insns.def : fix opt_plus, opt_ltlt + + * vm_evalbody.h : move _tag + + * benchmark/run.rb : fix file select + + +2005-06-30(Thu) 06:07:04 +0900 Koichi Sasada + + * extconf.rb : add collect-usage-analysis option + + * opt_operand.def, opt_insn_unif.def : add some rules + + +2005-06-29(Wed) 23:28:44 +0900 Koichi Sasada + + * yarvcore.h, extconf.rb, vm.h, compile.c : + DISPATCH_DIRECT_THREADED_CODE, DISPATCH_THREADED_CODE + -> OPT_DIRECT_THREADED_CODE, OPT_INDIRECT_THREADED_CODE. + if at least one of then is defined, OPT_THREADED_CODE is defined + + * benchmark/* : fix name and parameters + + * rb/eval.rb : added for YARV evaluation + + +2005-06-29(Wed) 16:16:52 +0900 Koichi Sasada + + * benchmark/run.rb : fix output format + + * call_cfunc.inc -> call_cfunc.h + + * vm.h : add sign by asm statement + + +2005-06-28(Tue) 22:28:40 +0900 Koichi Sasada + + * vm.c : fix method search + + +2005-06-28(Tue) 22:26:34 +0900 Koichi Sasada + + * extconf.rb : fix options + + +2005-06-28(Tue) 21:50:58 +0900 Koichi Sasada + + * benchmark/run.rb : fix output format + + +2005-06-28(Tue) 21:34:54 +0900 Koichi Sasada + + * depend : add option TOPT to test rules + + * benchmark/run.rb : fix output format + + +2005-06-28(Tue) 21:15:54 +0900 Koichi Sasada + + * compile.c : fix opt_case_dispatch instruction + + * benchmark/run.rb : output all usertimes when exit benchmark + + +2005-06-28(Tue) 20:35:55 +0900 Koichi Sasada + + * extconf.rb, compile.c, tmpl/optinsn.inc.tmpl, vm.c : + change extconf options + +2005-06-28(Tue) 13:20:59 +0900 Koichi Sasada + + * benchmark/run.rb : add -y, --yarv-only option + + * depend : add BOPT to tbench rule + + +2005-06-27(Mon) 23:31:12 +0900 Koichi Sasada + + * depend : add gdb rule + + * vm.h : use inline assembler for x86 (to support gcc 3.4.x) + + +2005-06-27(Mon) 20:04:10 +0900 Koichi Sasada + + * yarvcore.c, compile.c, disasm.c : remove unused variables + + * vm.h, insnhelper.h, debug.h : fix to reduce warning + + * vm.c, vm_dump.c : move VM state dump (debug) functions to vm_dump.c + + * depend : adde reconf rule + + * insnhelper.h : + + * vm_evalbody.inc : rename to vm_evalbody.h + + +2005-06-27(Mon) 16:50:31 +0900 Koichi Sasada + + * insns2vm.rb : fix generating unif insn + + * compile.c : add useless pop/swap insn elimination with stack caching + + * depend : remove compiled.o dependency + + +2005-06-26(Sun) 14:06:22 +0900 Koichi Sasada + + * benchmark/run.rb : use tmpfile instead of popen + + * rb/insns2vm.rb : fix generating insn unification logic + + * opt_insn_unif.def : add some unification rules + + * compile.c : add verify_list function and fix unification logic + + +2005-06-22(Wed) 12:58:26 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c, insns.def, compile.c : add mult optimization + + * test/test_bin.rb : add test_fact + + +2005-06-21(Tue) 22:34:07 +0900 Koichi Sasada + + * yarvcore.h, compile.[ch], tmpl/optinsn.inc.tmpl, rb/insns2vm.rb : + change data structure (don't use Ruby's array to represent a + instruction sequence) + + * disasm.c : add separator + + +2005-06-14(Tue) 07:48:58 +0900 Koichi Sasada + + * compile.c : support "for" statement + + * test/test_block.rb : add test for above + + * yarvcore.[ch] : add global id idEach + + +2005-06-08(Wed) 22:30:44 +0900 Koichi Sasada + + * compile.c : add if/unless(L1) jump (L2) :L1 => unless/if(L2) + optimize (condition reversal) and fix typo + + +2005-06-07(Tue) 08:29:41 +0900 Koichi Sasada + + * yarvcore.c : fix to remove compiler warning + + * version.h : 0.2.1 + + +2005-06-07(Tue) 08:16:22 +0900 Koichi Sasada + + * yarvcore.h : iseq_link_element changed to double linked list + + * disasm.c : support dump struct iseq_link_element + + * compile.c : use double linked list instead of array + for intermediate representation + + +2005-06-06(Mon) 15:38:44 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c : add link structure to insn and label object + + * compile.h, compile.c : remove some variables in function top scope + of iseq_compile_each and some optimization (now working) + + +2005-06-04(Sat) 16:12:59 +0900 Koichi Sasada + + * compile.c : fix previous commit + + +2005-06-04(Sat) 15:56:21 +0900 Koichi Sasada + + * compile.c : fix stack caching (after jump state) + + +2005-06-04(Sat) 09:12:13 +0900 Koichi Sasada + + * compile.c : fix some point for previous commit + + +2005-06-04(Sat) 07:31:21 +0900 Koichi Sasada + + * compile.c, insns.def : optimize case/when statement + (dispatch on constant time) + + * yarvcore.h, disasm.c, rb/insns2vm.rb : fixed for above + (CDHASH) + + * test/test_syn.rb : add test for above + + +2005-06-04(Sat) 03:41:29 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c : add some temporary variable test + (it'll be vanished) + + * compile.c : NODE_CASE optimize (use topn instead of dup/swap) + + +2005-06-03(Fri) 00:54:38 +0900 Koichi Sasada + + * compile.c : apply flow optimization for while/until statement + + +2005-03-04(Fri) 19:34:32 +0900 Koichi Sasada + + * rb/insns2vm.rb : fix category (comment) + + * depend : remove space betweeen target name and colon + + +2005-03-04(Fri) 15:55:51 +0900 Koichi Sasada + + * tmpl/yarvarch.ja : fix typo + + +2005-03-04(Fri) 13:30:19 +0900 Koichi Sasada + + * depend : add a rule for jitcompile.o + + * vm.h : fix a macro argument + + * version.h : 0.2.0 + + +2005-03-03(Thu) 08:35:14 +0900 Koichi Sasada + + * extconf.rb : remove vm_evalbody.inc call_cfunc.inc from clean target + + +2005-03-03(Thu) 00:54:15 +0900 Koichi Sasada + + * tmpl/insns.inc.tmpl : fixed typo + + * insns.def : store th->pc to current pc + + +2005-03-03(Thu) 00:31:47 +0900 Koichi Sasada + + * tmpl/yarvarch.ja, doc/yarv.rb : write current architecture of yarv + + +2005-03-01(Tue) 13:50:04 +0900 Koichi Sasada + + * yarvcore.c (yarvcore_eval_parsed) : added + (separeted from yarvcore_eval) + + * yarvcore.c, compile.c : iseq_translate_direct_threaded_code + is moved to compile.c + + * depend : add rule for yasmdata.rb + + * rb/yasm.rb : support top-level and method-level assemble + + +2005-02-26(Sat) 08:09:57 +0900 Koichi Sasada + + * rb/insns2vm.rb, compile.c, vm.h : change type long to OFFSET + + * tmpl/yasmdata.rb.tmpl : added + + * rb/insns2vm.rb : add yasmdata_rb method + + * rb/yasm.rb : fix some interface (incomplete) + + * compile.c : iseq_setup added + + * yarvcore.c : YARVCore::InstructionSequence::Instruction#make added + + +2005-02-24(Thu) 07:45:37 +0900 Koichi Sasada + + * rb/yasm.rb : added + + +2005-02-24(Thu) 01:13:33 +0900 Koichi Sasada + + * compile.c : remove useless statements + + +2005-02-24(Thu) 00:46:44 +0900 Koichi Sasada + + * rb/insns2vm.rb (InsnInfo) : add @is_sc attr and remove + is_sc method + + * compile.c : fix NODE_CASE/NODE_WHEN bug (cond at 'when' + must not be popped) + + * compile.c : support NODE_OP_ASGN1 to &&= and ||= + + * test/test_bin.rb : add tests for above + + +2005-02-23(Wed) 09:17:01 +0900 Koichi Sasada + + * vm.c, yarvcore.c : thread_svar added and fix svar location + + +2005-02-21(Mon) 08:38:02 +0900 Koichi Sasada + + * yarvcore.h : make type "struct iseq_compile_data" + + * yarvcore.h : iseq_object#insn_info_ary to iseq_object#insn_info_tbl + + +2005-02-21(Mon) 05:24:01 +0900 Koichi Sasada + + * yarvcore.c (compile_string) : remove null check of node + + +2005-02-19(Sat) 03:52:45 +0900 Koichi Sasada + + * version.h : 0.1.1 + + +2005-02-18(Fri) 20:57:18 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c : add idLTLT, idMethodMissing + + * compile.c : suopport lval (or others) block parameter + + * test/test_block.rb : add tests for above + + * insns.def (send) : support method_missing + + * test/test_method.rb : add tests for above + + * insns.def : opt_ltlt and + + +2005-02-18(Fri) 08:54:40 +0900 Koichi Sasada + + * benchmark/runc.rb : added + + * benchmark/contrib/pentomino.rb : added opt_ltlt + and Float, String plus specialization + + +2005-02-18(Fri) 07:49:42 +0900 Koichi Sasada + + * compile.c : remove debug print + + * rb/aotcompile.rb : skip if yarvcore.so is not created + + +2005-02-18(Fri) 06:46:13 +0900 Koichi Sasada + + * compile.c : fix block passing + and block argument + + +2005-02-18(Fri) 05:52:41 +0900 Koichi Sasada + + * vm.c : thread_get_ev_const, thread_get_ev_defined is added + (separated from insns.def) + + * insnhelper.h : GET_EV_KLASS(klass) is added + (separated from insns.def) + + * yarvcore.h, insns.def, compile.c : support defined? expression (limited) + + * test/test_syn.rb : tests for above is added + + * compile.c, insns.def : support block passed method dispatch + + * test/test_method.rb : tests for above is added + + * compile.h : CALL_ARGS_SPLAT is removed + + +2005-02-16(Wed) 13:32:37 +0900 Koichi Sasada + + * disasm.c : fix ID to String method + + * compile.c : NODE_SUPER, NODE_ZSUPER check 'poped' + and NODE_RETURN check outer type + and NODE_DREGX_ONCE supported (temporarily) + + * test/test_syn.rb : add a test + + * test/test_jump.rb : add a test + + +2005-02-16(Wed) 06:07:41 +0900 Koichi Sasada + + * compile.[hc] : use Symbol instead of Fixnum to represent ID + + * rb/insns2vm.rb : add attr_reader :insns, :insn_map + + * vm.h, rb/insns2vm.rb : END_INSN have one arg + + * jitcompile.c : jit compiler framework (experimental) + + * rb/aotcompile.rb : refactoring + + * compiled.c : add constant pool + + * vm_evalbody.inc, call_cfunc.inc, vm.c : separeted from vm.c + + * insns.def : fix return val + + * depend : add rules for compiled.o + + +2005-02-14(Mon) 13:09:01 +0900 Koichi Sasada + + * insnhelper.h, yarvcore.h: move YARV_METHOD_NODE to yarvcore.h + + * yarvcore.h : add 2 members jit_compiled and iseq_orig + to struct iseq_object + + * yarvcore.c : add yarv_jitcompile and global function jitcompile + + * insns.def : insn opt_call_native_compiled added + + * jitcompile.c : added + + +2005-02-12(Sat) 05:38:51 +0900 Koichi Sasada + + * insns.def (putstring) : fixed to duplicate string object + + * rb/insns2vm.rb, tmpl/optunifs.inc.tmpl, compile.c : support + instructions unification (aka super instruction) + + * opt_insn_unif.def : added for above + + * benchmark/bm_unif1.rb : added to measure efficiency of unification + + * depend : fixed for above + + * extconf.rb : add option --(enable|disalbe)-opt-insns-unification + + +2005-02-11(Fri) 12:14:39 +0900 Koichi Sasada + + * yarvcore.c, vm.c, insns.def : permit to access svar from + cfunc environment + + * test/test_method.rb : add tests for above + + +2005-02-09(Wed) 19:31:06 +0900 Koichi Sasada + + * ite.rb : added (ruby -rite [script file]) + + +2005-02-09(Wed) 02:25:43 +0900 Koichi Sasada + + * yarvcore.[hc] : add member compile_data (hash) to iseq_object + + * compile.c, yarvcore.h : check label is already set + + * compile.c, extconf.rb : support __goto__ and __label__ statement + + +2005-01-25(Tue) 12:49:27 +0900 Koichi Sasada + + * test/test_block.rb : add break test to test_times + + +2005-01-25(Tue) 03:34:04 +0900 Koichi Sasada + + * extconf.rb : check ruby version if yarv patch is applied or not + + * evalc.patch : fixed for rb_call_super and above check + + +2005-01-25(Tue) 03:21:48 +0900 Koichi Sasada + + * rb/insns2vm.rb : refactoring (mainly, make InsnsDef::InsnInfo + to represent each instruction information) + + * depend, rb/makedocs.rb : fixed for above + + * yarvcore.c (thread_call_super) : added + + * vm.c (thread_call_super) : added + + * vm.h : add struct cmethod_info + + * insns.def, vm.c : use cmethod_info to represent C method info + + * insns.def : use iseq_object#klass_nest_stack + to search super/zsuper's class + + * prosym.rb : removed + + * ToDo : write todo things on wiki + + + +2005-01-18(Tue) 23:44:47 +0900 Koichi Sasada + + * benchmark/run.rb : check ENV['RUBY'] to use ruby binary + + +2005-01-10(Mon) 08:44:40 +0900 Koichi Sasada + + * version.h : 0.1.0 + + +2005-01-09(Sun) 22:01:29 +0900 Koichi Sasada + + * repository : svn propset svn:eol-style native *.c *.h tmpl/*.tmpl + + +2005-01-09(Sun) 21:48:38 +0900 Koichi Sasada + + * yarvcore.c : FREE_UNLESS_NULL, MARK_UNLESS_NULL macros are added + + * yarvcore.c : some insn/label methods are added + + * yarvcore.h : add structure menber "insns_ary" to iseq_object + + * vm.c, insns.def (thread_eval_body) : return values with throw + + * prosym.rb : added + + * insns.def : add YARV_AOT_COMPILED and some procedure + + * depend : add compiled.c + + * compiled.c : added to build compiled Ruby program (C source) + by AOT compiler + + * rb/aotcompile.rb : AOT compiler + + * aotct.rb, rb/aotctest.rb : test and benchmark AOT compiler + + * rb/allload.rb : added + + +2005-01-09(Sun) 08:30:38 +0900 Koichi Sasada + + * yarvcore.c (yarv_yield_values) : added + + * vm.c (thread_call0) : change interface. substitute rb_call0 in + yarv environment + + * yarvcore.c (yarv_call0) : fix for above + + * yarvcore.c (yarv_call0_cfunc) : removed + + * yarvcore.c : change passing items for yarv_setup + + * evalc.patch : fix for above + + * benchmark/bm_lists.rb : fix (unsupport block passing) + + * benchmark/run.rb : use full path to ruby + + * insns.def (yield): raise error if argc > expected argc + + +2005-01-08(Sat) 16:07:48 +0900 Koichi Sasada + + * extconf.rb : add descrioptions + + * compile.c : fix bugs (getinlinecache operands) + + * yarvcore.c : initial value of yarvGlobalStateVersion + to 1 + + +2005-01-08(Sat) 14:39:04 +0900 Koichi Sasada + + * yarvcore.c, vm.c, evalc.patch : support making backtrace + (incompatible with current ruby interpreter) + + +2005-01-08(Sat) 11:25:46 +0900 Koichi Sasada + + * evalc.patch : commit for previous commit change + + * yarvcore.h, compile.c, insns.def : MC to IC (inline cache), + and changed to using IC by set/getinlinecache + + +2005-01-08(Sat) 10:04:33 +0900 Koichi Sasada + + * yarvcore.c : add global variable sym[IC]FUNC + + * yarvcore.c (yarv_iterate, yarv_call0_cfunc) : added + (each called from rb_iterate, rb_call0 with NODE_CFUNC) + + * vm.c (stack_dump_raw) : fixed to prints more detail + + * vm.c (stack_dump_th, stack_dump_thobj) : added to + dumps thread_object states (for VALUE, struct pointer) + + * vm.c (thread_dump_regs) : added + + * vm.c (thread_call0, thread_call0_cfunc, thread_invoke_yield, + thread_invoke_yield_cfunc), insns.def (yield, send) : + fixed, added to support IFUNC + + * vm.c, yarvcore.c, insns.def : change type purpose + thread_object#block_ptr (it holds IFUNC block information, + so this type was changed to 'NODE *') + + * vm.c (stack_dump_each) : fixed for above + + * test/test_block.rb (test_ifunc) : test for above + + * vm.c (get_block_objec, thread_make_env_object) : fixed bugs + + * test/test_bin.rb (test_xstr) : remove `ls` test + + +2005-01-06(Thu) 21:35:18 +0900 Koichi Sasada + + * yarv : trying to support NODE_IFUNC (rb_iterate) + + +2005-01-05(Wed) 06:50:42 +0900 Koichi Sasada + + * yarvcore.h, insns.def, disasm.c, rb/insns2vm.rb, compile.[ch] : + support inline method cache + + * extconf.rb : add -*-inline-method-cache (default: enable) + + * test/test_method.rb : add a test for above + + * benchmark/bm_poly_method.rb : added + + * yarvcore.c : add option string + + +2005-01-04(Tue) 17:15:41 +0900 Koichi Sasada + + * insns.def, compile.c : add compile_array and duparray insn + to optimize only literal array creation + + * benchmark/bm_array.rb : added + + +2005-01-04(Tue) 10:02:40 +0900 Koichi Sasada + + * README : fix version + + +2005-01-04(Tue) 09:57:25 +0900 Koichi Sasada + + * ToDo : reflect current status + + +2005-01-04(Tue) 09:43:54 +0900 Koichi Sasada + + * compile.c : support NODE_VALUES, NODE_ARGSCAT, NODE_SPLAT + + * test/test_massign.rb : add tests for above + + * benchmark/bm_swap.rb : added + + +2005-01-04(Tue) 06:25:45 +0900 Koichi Sasada + + * compile.h : COMPILE_ERROR break contol (instead of return) + + * compile.c : support NODE_MASGN + + * insns.def : change expandarray for massign and add topn insn + + * test/test_massign.rb : added + + +2005-01-03(Mon) 21:20:28 +0900 Koichi Sasada + + * vm.c : store block when create proc + + * test/test_proc.rb : add a test for above change + + * yarvcore.c : add global function "once" + + +2005-01-02(Sun) 00:40:08 +0900 Koichi Sasada + + * benchmark/bm_super.rb : fix bug (remove infinite loop) + + +2005-01-01(Sat) 23:45:49 +0900 Koichi Sasada + + * benchmark/bm_z?super.rb : added + + +2005-01-01(Sat) 23:37:38 +0900 Koichi Sasada + + * benchmark/bmx_so_object.rb : rename to benchmark/bm_so_object.rb + + +2005-01-01(Sat) 23:19:02 +0900 Koichi Sasada + + * compile.c : support NODE_OP_ASGN2, NODE_OP_ASGN_AND, NODE_OP_ASGN_OR, + NODE_SUPER, NODE_ZSUPER, NODE_MATCH + + * insns.def : support super, zsuper (currently, super can't + handle with block) + + * test/test_bin.rb : add test for op_asgin2, op_assgin_and/or + + * test/test_class.rb : add test for super, zsuper + + +2005-01-01(Sat) 20:39:29 +0900 Koichi Sasada + + * compile.c : support NODE_MATCH + + * yarvcore.c : fix yarv_svar bug (fix condition boundary) + + * insnhelper.h : save cfp/lfp/dfp vars to thread_object (th) + + +2005-01-01(Sat) 20:03:10 +0900 Koichi Sasada + + * version.h : 0.0.1 + + * yarvcore.h : add idIntern declaration + + * insns.def : add getspecial, setspecial. + implement getclassvariable, setclassvariable. + store lfp before reg match (opt_regexpmatch1) + + * compile.c : support ditto, flipflop + + * yarvcore.c : support svar + + * test/test_syn.rb : add test for flipflop + + * test/test_bin.rb : add test for dsym, cvar, backref + + +2005-01-01(Sat) 09:09:32 +0900 Koichi Sasada + + * insns.def : add getspecial insn + + * compile.c : support NODE_NTH_REF, NODE_BACK_REF + + +2005-01-01(Sat) 06:53:38 +0900 Koichi Sasada + + * insns.def, compile.c : support alias, undef + + * test/test_method.rb : test for above + + * rb/insns2vm.rb : fix enbug + + +2005-01-01(Sat) 06:00:32 +0900 Koichi Sasada + + * test/test_jump.rb : add test (next with value) + + * yarvcore.h, yarvcore.c, compile.c, compile.h : + raise compile error exception instead of rb_bug + + * yarvcore.c, evalc.patch : support "require" + + * test.rb : restore $" after evaluation with ruby + + * rb/insns2vm.rb : remove unnecesary each + + +2004-12-17(Fri) 18:56:38 +0900 Koichi Sasada + + * insns.def : fix newhash + + +2004-12-15(Wed) 13:29:27 +0900 Koichi Sasada + + * yarvcore.c : add version string + + * compile.c : fix rescure clause bug + + +2004-12-14(Tue) 22:46:30 +0900 Koichi Sasada + + * insns.def : add reput insn + + * vm.h : show stack cache registers when stack dump + + * rb/insns2vm.rb, compile.c : fix stack caching bugs + + +2004-12-14(Tue) 00:51:58 +0900 Koichi Sasada + + * insns2vm.rb, compile.c, tmpl/opt_sc.inc.tmpl : fix bugs + + * rb/mixc-asm.rb : added + + +2004-12-14(Tue) 00:17:02 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c, compile.c : fix SC bugs + (SC state management) + + * extconf.rb : add option -[enable|disable]-opt-stack-caching + + * insns2vm.rb : accept CPPFLAGS options + + * vm.c : support restrore register for pc + + +2004-12-13(Mon) 16:53:42 +0900 Koichi Sasada + + * rb/insns2vm.rb : add macro INSN_IS_SC() + + +2004-12-11(Sat) 10:51:44 +0900 Koichi Sasada + + * insns.def, compile.c : support singleton method definition + + * test/test_method.rb : add test for above + + +2004-12-11(Sat) 03:17:54 +0900 Koichi Sasada + + * benchmark/*.rb : modify + + * extconf.rb : add $cleanfiles + + +2004-12-08(Wed) 13:01:38 +0900 Koichi Sasada + + * compile.c, insns.def : change to disable stack caching + + +2004-12-07(Tue) 19:37:13 +0900 Koichi Sasada + + * rb/insns2vm.rb : add default after + + * insns.def : fix to work on stack caching + + +2004-12-07(Tue) 15:07:13 +0900 Koichi Sasada + + * depend : add some dependency to *.inc files + + * vm.c : add "register" and asm("regname") descriptor + + * rb/insns2vm.rb, compile.c : add stack caching support + + * tmpl/opt_sc.inc.tmpl : added to above change + + * rb/makedocs.rb : fix file path + + * extconf.rb : fix option selection + + +2004-12-06(Mon) 11:20:11 +0900 Koichi Sasada + + * extconf.rb : add vm.asm target if compiler is gcc + + +2004-12-06(Mon) 09:56:24 +0900 Koichi Sasada + + * vm.h : rename method_frame's member block to block_ptr + + * extconf.rb : add "-fno-crossjumping" option when compiler + is gcc + + * opt_operand.def : add unification insn send + + * rb/insns2vm.rb : define symbol instead of declare const + variable (for more optmize on VC) + + * insns.def : move enter point in send + + +2004-12-06(Mon) 04:53:51 +0900 Koichi Sasada + + * compile.c, opt_operand.def, rb/insns2vm.rb, depend : + support operand unification + + +2004-12-05(Sun) 03:16:10 +0900 Koichi Sasada + + * vm.c, insns.def : speed up throw/catch scheme + + +2004-12-05(Sun) 01:47:05 +0900 Koichi Sasada + + * vm.c : fix catch handler bugs + + * test/test_jump.rb : test_complex_jump added + + +2004-12-03(Fri) 20:39:05 +0900 Koichi Sasada + + * benchmark/contrib/mcq.rb : added + (from URABE Syouhei) + + +2004-12-03(Fri) 20:35:28 +0900 Koichi Sasada + + * vm.c : support break in rb_yield block + + +2004-12-03(Fri) 14:26:35 +0900 Koichi Sasada + + * compile.c : support block local variable in current + ruby specification (patche from Kent Sibilev) + + * insns.def : support attr_* (patch from Kent Sibilev) + + +2004-12-02(Thu) 21:04:27 +0900 Koichi Sasada + + * opt_operand.def : added + + +2004-12-02(Thu) 13:20:41 +0900 Koichi Sasada + + * yarvcore.c, vm.h, vm.c, insns.def, insnhelper.h, yarvutil.rb : + add usage analisys framework + + * disasm.c : insn_operand_intern to separate function + + * benchmark/run.rb : run each benchmark on another process + + +2004-12-01(Wed) 10:26:49 +0900 Koichi Sasada + + * vm.c : yield check block is given + + * benchmark/bm_lists.rb : rename to bmx_lists.rb + (because it's not work ... bug?) + + * insns.def : opt_* support other type calc + + +2004-11-30(Tue) 16:14:54 +0900 Koichi Sasada + + * benchmark/bm_so_array.rb : added + + * benchmark/bm_so_matrix.rb : added + + +2004-11-30(Tue) 14:11:30 +0900 Koichi Sasada + + * rb/getrev.rb : added + + * yarvcore.c : add YARVCore::REV, YARVCore::DATE constant + + +2004-11-30(Tue) 13:05:42 +0900 Koichi Sasada + + * compile.c : support NODE_OP_ASGN1 (incomplete) + + * insns.def : add dupn + + +2004-11-30(Tue) 08:52:01 +0900 Koichi Sasada + + * version.h : 0.0.0.f + + +2004-11-30(Tue) 08:43:59 +0900 Koichi Sasada + + * test/test_class.rb : add test_initialize and test_to_s + + * yarvsubst.c : use rb_funcall instead of yarv_funcall + + * evalc.patch : fix ruby's patch + + * benchmark/bm_so_*.rb : change naming rule. "bm_so_*" from + language shootout + + * depend : tbench target item is ITEM env val (default: bmx_temp) + + * vm.c : show raw address if environment is in heap at dumping stack trace + + * vm.c : thread_call0 added + + * vm.c : fix thread_yield_light_invoke + + * yarv.h, yarvcore.c : remove yarv_funcall + + +2004-11-29(Mon) 11:37:08 +0900 Koichi Sasada + + * test/test/test_proc.rb : add test test_nestproc + + * yarvsubst.c : comment out yarv_Array_each + + * insns.def : restore lfp/dfp after call_cfunc + + * vm.c : fix stack dump routine + + * vm.c : impliment thread_funcall (temporarily) + + * yarv.h : add IS_YARV_WORKING(), SET_YARV_START(), SET_YARV_STOP() + + * yarvcore.c : remove check with yarv_in_work + + * evalc.patch : added + + +2004-11-27(Sat) 00:19:52 +0900 Koichi Sasada + + * yarvcore.c : free -> ruby_xfree + + +2004-11-26(Fri) 02:11:11 +0900 Koichi Sasada + + * vm,c : fix bug + + +2004-11-22(Mon) 11:19:48 +0900 Koichi Sasada + + * benchmark/bm_ackermann.rb, bm_proc.rb, bm_simpleiter.rb, + bm_so_exception.rb, bm_wc.rb, wc.input added + + +2004-11-22(Mon) 02:31:56 +0900 Koichi Sasada + + * test/test_proc.rb : add some test + + * yarvcore.c, vm.c : support yield in C method (as rb_yield) + + * vm.c (thread_yield_light_(prepare|invoke)) : support lightweight + yield + + * yarv.h : added + + * yarvcore.c, yarv.h : support yarv_is_working, yarv_block_given_p, + yarv_yield, yarv_funcall (only dummy function) + + * vm.c : thread_eval_body changed return value + + * yarvsubst.c : added and add yarv_Integer_times, yarv_Array_each + + * yarvcore.h : block_ptr is added to struct thread_object + + * insns.def : pass block when C method call + + * insnhelper.h : add GET_ISEQOBJ(cfp) macro + + +2004-11-21(Sun) 07:25:49 +0900 Koichi Sasada + + * vm.c : support Proc#call + + * test/test_proc.rb : added + + +2004-11-19(Fri) 18:04:10 +0900 Koichi Sasada + + * insns.def, vm.c : support creating Proc object + + +2004-11-15(Mon) 14:19:27 +0900 Koichi Sasada + + * insns.def (send) : use clear_local_size to specify + clear local table vars. + + * insns.def : block represent data shares lfp, dfp with frame data + + +2004-11-13(Sat) 18:19:41 +0900 Koichi Sasada + + * yarvcore.h, insns.def : add VM_CALL_ARGS_SPLAT_BIT and + VM_CALL_ARGS_BLOCKARG_BIT + + * compile.c, compile.h : add ADD_SEND, ADD_SEND_R + + +2004-11-10(Wed) 08:26:25 +0900 Koichi Sasada + + * add "vm_" prefix to (block_object, proc_object, env_object) + + +2004-11-03(Wed) 15:52:14 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c, disasm.c, compile.c, insns.def, vm.c : + fix to move x86_64 (illegal cast, etc) + + +2004-11-01(Mon) 04:45:54 +0900 Koichi Sasada + + * yarvcore.h, compile.c, debug.c, version.h : + redesgin gc debug scheme (GC_CHECK()) + + * yarvcore.c : mark iseqobj->current_block on GC + + * insns.def, compile.c : last "throw" in ensure/rescue block + use operand throwobj and before this insn, use "getdynamic 0, 1" + + * benchmark/bm_temp.rb : move to benchmark bmx_temp.rb + + * depend : change some targets + + +2004-10-25(Mon) 19:57:58 +0900 Koichi Sasada + + * compile.c : push exception iseq to iseqobj->iseq_mark_ary + to mark for GC + + +2004-10-10(Sun) 16:25:03 +0900 Koichi Sasada + + * compile.c : remove $_, $' area from method local frame + and provide that's special method local variables pointer(LFP[-1]) + + * disasm.c : change environment showing format + + * yarvcore.(h|c) : add YarvProc, YarvEnv + + * yarvcore.h : add arg_block field to iseq_object + and init -1 as default value + + +2004-09-30(Thu) 19:50:48 +0900 Koichi Sasada + + * compile.c, insns.def : support passing splat argument + + * compile.c, insns.def : support rest argument + + * compile.c, insns.def : support optional argument initializer + + * test/test_method.rb : add tests for above + + +2004-09-29(Wed) 10:50:03 +0900 Koichi Sasada + + * compile.c : fix rescue clause popped + + * benchmark/bm_random.rb : move to benchmark/bmx_random.rb + + +2004-09-29(Wed) 01:25:35 +0900 Koichi Sasada + + * many many files: change stack frame design + + +2004-09-16(Thu) 08:51:37 +0900 Koichi Sasada + + * compile.c, yarvcore.h : support 'return' from method + in ensure clause + + +2004-09-13(Mon) 21:56:40 +0900 Koichi Sasada + + * compile.c : support inline cache constant access + on NODE_COLON2, NODE_COLON3 + + * depend : add 'vtest' rule(verbose test) + + +2004-09-13(Mon) 10:58:44 +0900 Koichi Sasada + + * compile.c, yarvcore.h : support redo/next/break in + while/until + + +2004-09-13(Mon) 08:50:19 +0900 Koichi Sasada + + * test/test_jump.rb : added(correctly) + + * benchamark/bm_(ensure|rescue|simplereturn).rb added + + +2004-09-12(Sun) 23:30:20 +0900 Koichi Sasada + + * test/test_jump.rb : added + + * insns.def, compile.c : add 'putnil' insn + + * compile.c : use '===' when rescue check + + * insns.def : remove 'rescuecheck' insn + + * compile.c : support retry in begin/rescue clause + + * ToDo : added + + +2004-09-08(Wed) 12:34:04 +0900 Koichi Sasada + + * yarvcore.h, yarvcore.c : add idThrow* + + * insns.def, compile.c, vm.c : support retry, break, + next, redo, return(imcomplete) + + +2004-09-03(Fri) 13:40:08 +0900 Koichi Sasada + + * compile.c : add nop after rescue body + + * insns.def, vm.c : support stack rewind when thrown + + +2004-09-01(Wed) 17:31:01 +0900 Koichi Sasada + + * test/test_exception.rb : added + + +2004-09-01(Wed) 13:15:14 +0900 Koichi Sasada + + * vm.c, insns.def : implementing exception handling + + +2004-09-01(Wed) 00:18:54 +0900 Koichi Sasada + + * insns.def : add 'throw' insn + + * compile.c : support 'rescue' and 'ensure' clause + + * yarvcore.c, yarvcore.h : add 'catch_table' to iseq_struct + + +2004-08-30(Mon) 19:06:12 +0900 Koichi Sasada + + * compile.h : NEW_ISEQOBJ don't pass self as parent + + * compile.c : use NEW_CHILD_ISEQOBJ explicitly + + +2004-08-29(Sun) 21:09:55 +0900 Koichi Sasada + + * compile.c : trying to implement rescue/ensure + + * insns.def : fix yield bug(lfp, dfp link) + + +2004-08-28(Sat) 13:52:15 +0900 Koichi Sasada + + * compile.c : fix dvar bug + + * test/test_block.rb : add test + + * insns.def, insnhelper.h : remove unused source code + + +2004-08-28(Sat) 08:51:26 +0900 Koichi Sasada + + * compile.c : support NODE_DASGN + + * test/test_block.rb : add test + + +2004-08-28(Sat) 08:13:04 +0900 Koichi Sasada + + * compile.c, insns.def : support access to instance variable + + * test/test_class.rb : add test of instance variable + + * benchmark/bm_block.rb : added + + +2004-08-28(Sat) 07:48:43 +0900 Koichi Sasada + + * test/test_block.rb : fix block parameter name + + +2004-08-28(Sat) 07:27:52 +0900 Koichi Sasada + + * compile.c, insns.def : support method call with block + and yield and add some functions + + * compile.c, insns.def : support dynavars accessor + + * test/test_block.rb : added + + * vm.c : fix block parameter stack dump + + +2004-08-27(Fri) 23:56:47 +0900 Koichi Sasada + + * compile.c(iseq_compile) : remove parameter iseqtype + (this information can access via self) + +2004-08-27(Fri) 17:13:35 +0900 Koichi Sasada + + * test/test_bin.rb : add test(absolute path constant) + + * yarvcore.h, compile.c(iseq_compile) : change parameter + + * insns.def(classdef) : fix bug + + +2004-08-27(Fri) 04:53:13 +0900 Koichi Sasada + + * insns.def : support setconstant, getconstant, classdef, + moduledef + + * vm.h : fix debug levels and so on + + * vm.h : foo_WORD -> foo_WC + + * test/test_class.rb : added + + +2004-08-25(Wed) 17:51:50 +0900 Koichi Sasada + + * insns.def : fix getconstant/setconstant/classdef + + +2004-08-25(Wed) 14:27:10 +0900 Koichi Sasada + + * debug.[ch] : added + + * compile.c, disasm.c : use debug interface + + * compile.c : support some nodes + + * compile.c, rb/insns2vm.rb : remove TS_CPATH + + * insns.def : modify classdef/moduledef/singletonclassdef + and add popcref + + * and others... + + +2004-08-18(Wed) 20:16:45 +0900 Koichi Sasada + + * compile.c : fix case/when statement with empty else clause + + * insns.def : enable compile + + * yarvcore.h : add class search path scheme + + * test/test_syn.rb : add switch/case test case + + * tmpl/yarvarch.ja : update documents + + +2004-05-22(Sat) 01:30:44 +0900 Koichi Sasada + + * yarvutil.rb : add eval_in_wrap + + * test/test_*.rb : change to use eval_in_wrap + + +2004-05-20(Thu) 02:50:32 +0900 Koichi Sasada + + * support global variables + + * benchmark/bm_*.rb : add some benchmarks + + * compile.c : support NODE_ATTRASGN + + * compile.c : add debugi(...) + + +2004-05-19(Wed) 23:19:38 +0900 Koichi Sasada + + * test/test_method.rb : added + + +2004-05-19(Wed) 22:56:09 +0900 Koichi Sasada + + * insns.def : fix typo + + * benchmark/run.rb : sort benchmark order by filename + + * extconf.rb : use --enable/disable-xxx + + * version.h : ditto(don't touch to change yarv options) + + +2004-05-19(Wed) 21:18:55 +0900 Koichi Sasada + + * yarvutil.rb : added + + * test.rb, test/*, benchmark/run.rb : use yarvutil.rb + + * version.h : USE_OPTIMIZED_REGEXP_MATCH added + + * yarvcore.h : add idEqTilde + + * yarvcore.c(yarvcore_parse, yarvcore_eval) : require file and line + parameter + + * test/test_bin.rb : add regexp test + + * benchmark/bm_regexp.rb : added + + +2004-05-19(Wed) 13:57:31 +0900 Koichi Sasada + + * compile.c : add compile_dstr(self, node) + + * compile.c : support NODE_MATCH2, NODE_MATCH3, NODE_DXSTR + + * insns.def : add toregexp + + +2004-05-18(Tue) 10:12:20 +0900 Koichi Sasada + + * compile.c : support NODE_XDSTR + + * test/test_bin.rb : add test for above change + + +2004-05-18(Tue) 09:46:33 +0900 Koichi Sasada + + * insns.def(send) : store regs before call_cfunc + + +2004-05-18(Tue) 08:55:17 +0900 Koichi Sasada + + * compile.c : support NODE_DSTR, NODE_EVSTR + + * compile.c : support NODE_XSTR + + * insns.def : add tostring operation + + * rb/makedocs.rb : fix directory path + + * depend : add tbench rule + + * yarvcore.h : add 'exten ID idBackquote' + + +2004-05-18(Tue) 00:09:48 +0900 Koichi Sasada + + * version.h : add USE_OPTIMIZED_BASIC_OPERATION + + * yarvcore.h(struct thread_object) : add 'VALUE stat_insn_usage' + + +2004-05-17(Mon) 11:28:55 +0900 Koichi Sasada + + * version.h, insns.def, yarvcore.c : add FAKE_INLINE_METHOD_CACHE + + +2004-05-17(Mon) 09:05:53 +0900 Koichi Sasada + + * compile.c : fix generating opt_* insn process + + +2004-05-17(Mon) 08:58:49 +0900 Koichi Sasada + + * benchmark/(bm_tarai.rb, bm_fib.rb) : added + + +2004-05-17(Mon) 08:20:12 +0900 Koichi Sasada + + * benchmark/(bm_tak.rb, bm_reccount.rb) : added + + * insns.def : test method cache(incomplete) + + * insns.def : add expandarray insn + + * yarvcore.c(iseq_init) : add parameter 'parent' + + +2004-05-17(Mon) 01:49:48 +0900 Koichi Sasada + + * benchmark/run.rb, bm_factorial.rb, bm_whileloop.rb : added + + * insns.def(send) : set id to ruby_frame->orig_func + + * check behavior on mswin32 and cygwin + + * insns.def(send) : check stack overflow + + +2004-05-16(Sun) 08:00:55 +0900 Koichi Sasada + + * change frame structure(debugging) + + +2004-05-14(Fri) 15:06:02 +0900 Koichi Sasada + + * insns2vm.rb : support file name arguments + + +2004-05-14(Fri) 04:33:09 +0900 Koichi Sasada + + * insns.def : support (easy) constant + + +2004-05-12(Wed) 01:51:48 +0900 Koichi Sasada + + * rb/insns2vm.b : set directory prefix + + * disasm.c : fix bug + + +2004-05-12(Wed) 00:00:17 +0900 Koichi Sasada + + * vm.h, compiler.h, version.h : move *DEBUG defs to version.h + + +2004-05-11(Tue) 23:00:11 +0900 Koichi Sasada + + * vm.h, version.h, yarvcore.h : move gcc ver check to version.h + and include version.h from yarvcore.h + + +2004-05-11(Tue) 19:16:26 +0900 Koichi Sasada + + * 0.0.0.d : imported + + +Local variables: +add-log-time-format: (lambda () + (let* ((time (current-time)) + (diff (+ (cadr time) 32400)) + (lo (% diff 65536)) + (hi (+ (car time) (/ diff 65536)))) + (format-time-string "%Y-%m-%d(%a) %H:%M:%S +900" (list hi lo) t))) +indent-tabs-mode: t +tab-width: 8 +end: diff --git a/lib/ruby-1.9.1-rc1/doc/NEWS-1.8.7 b/lib/ruby-1.9.1-rc1/doc/NEWS-1.8.7 new file mode 100644 index 0000000..6a7a772 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/NEWS-1.8.7 @@ -0,0 +1,635 @@ += NEWS + +This document is a list of user visible feature changes made between +releases except for bug fixes. + +Note that each entry is kept so brief that no reason behind or +reference information is supplied with. For a full list of changes +with all sufficient information, see the ChangeLog file. + +== Changes since the 1.8.6 release + +=== Configuration changes + +* default C flags + + Some C compiler flags may be added by default depending on your + environment. Specify optflags=.. and warnflags=.. as necessary to + override them. + +* vendor_ruby directory + + A new library directory named `vendor_ruby' is introduced in + addition to `site_ruby'. The idea is to separate libraries + installed by the package system (`vendor') from manually (`site') + installed libraries preventing the former from getting overwritten + by the latter, while preserving the user option to override vendor + libraries with site libraries. (`site_ruby' takes precedence over + `vendor_ruby') + + If you are a package maintainer, make each library package configure + the library passing the `--vendor' option to `extconf.rb' so that + the library files will get installed under `vendor_ruby'. + + You can change the directory locations using configure options such + as `--with-sitedir=DIR' and `--with-vendordir=DIR'. + +=== Global constants + +* new constants + + * RUBY_COPYRIGHT + * RUBY_DESCRIPTION + +=== Library updates (outstanding ones only) + +* new library + + * securerandom + +* builtin classes + + * Array#flatten + * Array#flatten! + + Takes an optional argument that determines the level of recursion + to flatten. + + * Array#eql? + * Array#hash + * Array#== + * Array#<=> + + Handle recursive data properly. + + * Array#index + * Array#rindex + + Take a block instead of an argument. + + * Array#collect! + * Array#map! + * Array#each + * Array#each_index + * Array#reverse_each + * Array#reject + * Array#reject! + * Array#delete_if + + Return an enumerator if no block is given. + + Note that #map and #collect still return an array unlike Ruby 1.9 + to keep compatibility. + + * Array#pop + * Array#shift + + Take an optional argument specifying the number of elements to + remove. + + * Array#choice + * Array#combination + * Array#cycle + * Array#drop + * Array#drop_while + * Array#permutation + * Array#product + * Array#shuffle + * Array#shuffle! + * Array#take, + * Array#take_while + + New methods. + + * Binding#eval + + New method. + + * Dir#each + * Dir#foreach + + Return an enumerator if no block is given. + + * Enumerable::Enumerator + + New class for various enumeration defined by the enumerator library. + + * Enumerable#each_slice + * Enumerable#each_cons + * Object#to_enum + * Object#enum_for + + New methods for various enumeration defined by the enumerator library. + + * Enumerable#count + * Enumerable#cycle + * Enumerable#drop + * Enumerable#drop_while + * Enumerable#find_index + * Enumerable#first + * Enumerable#group_by + * Enumerable#max_by + * Enumerable#min_by + * Enumerable#minmax + * Enumerable#minmax_by + * Enumerable#none? + * Enumerable#one? + * Enumerable#take + * Enumerable#take_while + + New methods. + + * Enumerable#find + * Enumerable#find_all + * Enumerable#partition + * Enumerable#reject + * Enumerable#select + * Enumerable#sort_by + + Return an enumerator if no block is given. + + Note that #map and #collect still return an array unlike Ruby 1.9 + to keep compatibility. + + * Enumerable#inject + + Accepts a binary operator instead of a block. + + * Enumerable#reduce + + New alias to #inject. + + * Hash#eql? + * Hash#hash + * Hash#== + + Handle recursive data properly. + + * Hash#delete_if + * Hash#each + * Hash#each_key + * Hash#each_pair + * Hash#each_value + * Hash#reject! + * Hash#select + * ENV.delete_if + * ENV.each + * ENV.each_key + * ENV.each_pair + * ENV.each_value + * ENV.reject! + * ENV.select + + Return an enumerator if no block is given. + + * GC.stress + * GC.stress= + + New methods. + + * Integer#ord + * Integer#odd? + * Integer#even? + * Integer#pred + + New methods. + + * Integer#downto + * Integer#times + * Integer#upto + + Return an enumerator if no block is given. + + * IO#each + * IO#each_line + * IO#each_byte + * IO.foreach + * ARGF.each + * ARGF.each_line + * ARGF.each_byte + + Return an enumerator if no block is given. + + * IO#bytes + * IO#chars + * IO#each_char + * IO#getbyte + * IO#lines + * IO#readbyte + * ARGF.bytes + * ARGF.chars + * ARGF.each_char + * ARGF.getbyte + * ARGF.lines + * ARGF.readbyte + + New methods. + + * Method#name + * Method#owner + * Method#receiver + * UnboundMethod#name + * UnboundMethod#owner + + New methods. + + * Module#class_exec + * Module#module_exec + + New methods. + + * Numeric#step + + Return an enumerator if no block is given. + + * Object#instance_exec + * Object#tap + + New methods. + + * ObjectSpace.each_object + + Return an enumerator if no block is given. + + * Process.exec implemented. + + * Range#each + * Range#step + + Return an enumerator if no block is given. + + * Regexp.union accepts an array of patterns. + + * String#bytesize + + New method, returning the size in bytes. (alias length and size) + + * String#chars + * String#each_char + * String#partition + * String#rpartition + * String#start_with? + * String#end_with? + + New methods. These are $KCODE aware unlike #index, #rindex and + #include?. + + * String#each_byte + * String#each + * String#each_line + * String#gsub(pattern) + + Return an enumerator if no block is given. + + * String#upto + + An optional second argument is added to specify if the last value + should be included. + + * StopIteration + + New exception class that causes Kernel#loop to stop iteration when + raised. + + * Struct#each + * Struct#each_pair + + Return an enumerator if no block is given. + + * Symbol#to_proc + + New method. + + * __method__ + + New global function that returns the name of the current method as + a Symbol. + +* enumerator + + * Enumerator is now a built-in module. The #next and #rewind + methods are implemented using the "generator" library. Use with + care and be aware of the performance loss. + +* ipaddr + + * New methods + * IPAddr#<=> + * IPAddr#succ + + IPAddr objects are now comparable and enumerable having these + methods. This also means that it is possible to have a Range + object between two IPAddr objects. + + * IPAddr#to_range + + A new method to create a Range object for the (network) address. + + * Type coercion support + * IPAddr#& + * IPAddr#| + * IPAddr#== + * IPAddr#include? + + These methods now accept a string or an integer instead of an + IPAddr object as the argument. + +* net/smtp + + * Support SSL/TLS. + +* openssl + + * New classes + * OpenSSL::PKey::EC + * OpenSSL::PKey::EC::Group + * OpenSSL::PKey::EC::Point + * OpenSSL::PKey::PKCS5 + * OpenSSL::SSL::Session + + * Documentation! + + * Various new methods (see documentation). + + * Remove redundant module namespace in Cipher, Digest, PKCS7, PKCS12. + Compatibility classes are provided which will be removed in Ruby 1.9. + +* shellwords + + * Add methods for escaping shell-unsafe characters: + * Shellwords.join + * Shellwords.escape + * Array#shelljoin + * String#shellescape + + * Add shorthand methods: + * Shellwords.split (alias shellwords) + * String#shellsplit + +* stringio + + * StringIO#getbyte + * StringIO#readbyte + + New methods. (aliases for compatibility with 1.9) + + * StringIO#each_char + * StringIO#chars + + New methods. + + * StringIO#each + * StringIO#each_line + * StringIO#each_byte + + Return an enumerator if no block is given. + +* tempfile + + * Tempfile.open and Tempfile.new now accept a suffix for the + temporary file to be created. To specify a suffix, pass an array + of [basename, suffix] as the first argument. + + Tempfile.open(['image', 'jpg']) { |tempfile| ... } + +* tmpdir + + * New method: + + * Dir.mktmpdir + +* uri + + * added LDAPS scheme. + * Change for RFC3986: + * FTP + * URI('ftp://example.com/foo').path #=> 'foo' + * URI('ftp://example.com/%2Ffoo').path #=> '/foo' + * URI::FTP.build([nil, 'example.com', nil, '/foo', 'i').to_s #=> 'ftp://example.com/%2Ffoo;type=i' + * URI merge + * URI('http://a/b/c/d;p?q').merge('?y') == URI('http://a/b/c/d;p?y') + * URI('http://a/b/c/d;p?q').merge('/./g') == URI('http://a/g') + * URI('http://a/b/c/d;p?q').merge('/../g') == URI('http://a/g') + * URI('http://a/b/c/d;p?q').merge('../../../g') == URI('http://a/g') + * URI('http://a/b/c/d;p?q').merge('../../../../g') == URI('http://a/g') + +* rss + + * 0.1.6 -> 0.2.4 + + * Fix image module URI + + * Atom support + + * ITunes module support + + * Slash module support + + * content:encoded with RSS 2.0 support + +=== Interpreter Implementation + +* passing a block to a Proc [experimental] + + This implementation in current shape is known to be buggy/broken, + especially with nested block invocation. Take this as an + experimental feature. + +* stack trace + + On non-SystemStackError exception, full stack trace is shown. + +=== Compatibility issues (excluding feature bug fixes) + +* String#slice! had some unintentional bugs and they have been fixed + because either they disagreed with documentation or their respective + behavior of #slice. Unfortunately, this causes some + incompatibilities in the following (somewhat rare) cases. + + * #slice! no longer expands the array when an out-of-boundary value + is given. + + # Ruby 1.8.6 + a = [1,2] + a.slice!(4,0) #=> nil + a #=> [1,2,nil,nil] + + # Ruby 1.8.7 + a = [1,2] + a.slice!(4,0) #=> nil + a #=> [1,2] + + * #slice! no longer raises an exception but returns nil when a + negative length or out-of-boundary negative position is given. + + # Ruby 1.8.6 + a = [1,2] + a.slice!(1,-1) #=> (raises IndexError) + a.slice!(-5,1) #=> (raises IndexError) + + # Ruby 1.8.7 + a = [1,2] + a.slice!(1,-1) #=> nil + a.slice!(-5,1) #=> nil + +* String#to_i, String#hex and String#oct no longer accept a sequence + of underscores (`__') as part of a number. + + # Ruby 1.8.6 + '1__0'.to_i #=> 10 + '1__0'.to_i(2) #=> 2 # 0b10 + '1__0'.oct #=> 8 # 010 + '1__0'.hex #=> 16 # 0x10 + + # Ruby 1.8.7 + '1__0'.to_i #=> 1 + '1__0'.to_i(2) #=> 1 + '1__0'.oct #=> 1 + '1__0'.hex #=> 1 + + The old behavior was inconsistent with Ruby syntax and considered as + a bug. + +* date + + * Date.parse + + '##.##.##' (where each '#' is a digit) is now taken as 'YY.MM.DD' + instead of 'MM.DD.YY'. While the change may confuse you, you can + always use Date.strptime() when you know what you are dealing + with. + +* stringio + + * StringIO#each_byte + + The return value changed from nil to self. This is what the + document says and the same as each_line() does. + +* tempfile + + * The file name format has changed. No dots are included by default + in temporary file names any more. See above for how to specify a + suffix. + +* uri + + * See above for details. + +== Changes since the 1.8.5 release + +=== New platforms/build tools support + +* IA64 HP-UX + +* Visual C++ 8 SP1 + +* autoconf 2.6x + +=== Global constants + +* RUBY_PATCHLEVEL + + New constant since 1.8.5-p1. + +=== Library updates (outstanding ones only) + +* builtin classes + + * New method: Kernel#instance_variable_defined? + + * New method: Module#class_variable_defined? + + * New feature: Dir::glob() can now take an array of glob patterns. + +* date + + * Updated based on date2 4.0.3. + +* digest + + * New internal APIs for C and Ruby. + + * Support for autoloading. + + require 'digest' + + # autoloads digest/md5 + md = Digest::MD5.digest("string") + + * New digest class methods: file + + * New digest instance methods: clone, reset, new, inspect, + digest_length (alias size or length), block_length() + + * New library: digest/bubblebabble + + * New function: Digest(name) + +* fileutils + + * New option for FileUtils.cp_r(): :remove_destination + +* nkf + + * Updated based on nkf as of 2007-01-28. + +* thread + + * Replaced with much faster mutex implementation in C. The former + implementation, which is slow but considered to be stable, is + available with a configure option `--disable-fastthread'. + +* tk + + * Updated Tile extension support based on Tile 0.7.8. + + * Support --without-X11 configure option for non-X11 versions of + Tcl/Tk (e.g. Tcl/Tk Aqua). + + * New sample script: irbtkw.rbw -- IRB on Ruby/Tk. It has no trouble + about STDIN blocking on Windows. + +* webrick + + * New method: WEBrick::Cookie.parse_set_cookies() + +=== Compatibility issues (excluding feature bug fixes) + +* builtin classes + + * String#intern now raises SecurityError when $SAFE level is greater + than zero. + +* date + + * Time#to_date and Time#to_datetime are added as private methods. + They cause name conflict error in ActiveSupport 1.4.1 and prior, + which comes with Rails 1.2.2 and prior. Updating ActiveSupport + and/or Rails to the latest versions fixes the problem. + +* digest + + * The constructor does no longer take an initial string to feed. + The following examples show how to migrate: + + # Before + md = Digest::MD5.new("string") + # After (works with any version) + md = Digest::MD5.new.update("string") + + # Before + hd = Digest::MD5.new("string").hexdigest + # After (works with any version) + hd = Digest::MD5.hexdigest("string") + +* fileutils + + * A minor implementation change breaks Rake <=0.7.1. + Updating Rake to 0.7.2 or higher fixes the problem. + +* tk + + * Tk::X_Scrollable (Y_Scrollable) is renamed to Tk::XScrollable + (YScrollable). Tk::X_Scrollable (Y_Scrollable) is still available, + but it is an alias name. diff --git a/lib/ruby-1.9.1-rc1/doc/forwardable.rd b/lib/ruby-1.9.1-rc1/doc/forwardable.rd new file mode 100644 index 0000000..0d9dc2f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/forwardable.rd @@ -0,0 +1,83 @@ + -- forwardable.rb + + $Release Version: 1.1 $ + $Revision: 14912 $ + Original version by Tosh + +=begin + += Forwardable + +A Module to define delegations for selected methods to a class. + +== Usage + +Using through extending the class. + + class Foo + extend Forwardable + + def_delegators("@out", "printf", "print") + def_delegators(:@in, :gets) + def_delegator(:@contents, :[], "content_at") + end + f = Foo.new + f.printf ... + f.gets + f.content_at(1) + +== Methods + +--- Forwardable#def_instance_delegators(accessor, *methods) + + adding the delegations for each method of ((|methods|)) to + ((|accessor|)). + +--- Forwardable#def_instance_delegator(accessor, method, ali = method) + + adding the delegation for ((|method|)) to ((|accessor|)). When + you give optional argument ((|ali|)), ((|ali|)) is used as the + name of the delegation method, instead of ((|method|)). + +--- Forwardable#def_delegators(accessor, *methods) + + the alias of ((|Forwardable#def_instance_delegators|)). + +--- Forwardable#def_delegator(accessor, method, ali = method) + + the alias of ((|Forwardable#def_instance_delegator|)). + += SingleForwardable + +a Module to define delegations for selected methods to an object. + +== Usage + +Using through extending the object. + + g = Goo.new + g.extend SingleForwardable + g.def_delegator("@out", :puts) + g.puts ... + +== Methods + +--- SingleForwardable#def_singleton_delegators(accessor, *methods) + + adding the delegations for each method of ((|methods|)) to + ((|accessor|)). + +--- SingleForwardable#def_singleton_delegator(accessor, method, ali = method) + + adding the delegation for ((|method|)) to ((|accessor|)). When + you give optional argument ((|ali|)), ((|ali|)) is used as the + name of the delegation method, instead of ((|method|)). + +--- SingleForwardable#def_delegators(accessor, *methods) + + the alias of ((|SingleForwardable#def_instance_delegators|)). + +--- SingleForwardable#def_delegator(accessor, method, ali = method) + + the alias of ((|SingleForwardable#def_instance_delegator|)). +=end diff --git a/lib/ruby-1.9.1-rc1/doc/forwardable.rd.ja b/lib/ruby-1.9.1-rc1/doc/forwardable.rd.ja new file mode 100644 index 0000000..ffdcd53 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/forwardable.rd.ja @@ -0,0 +1,80 @@ + -- forwatable.rb + $Release Version: 1.1 $ + $Revision: 14912 $ + +=begin += Forwardable + +¥¯¥é¥¹¤ËÂФ·¥á¥½¥Ã¥É¤Î°Ñ¾ùµ¡Ç½¤òÄêµÁ¤·¤Þ¤¹. + +== »È¤¤Êý + +¥¯¥é¥¹¤ËÂФ·¤Æextend¤·¤Æ»È¤¤¤Þ¤¹. + + class Foo + extend Forwardable + + def_delegators("@out", "printf", "print") + def_delegators(:@in, :gets) + def_delegator(:@contents, :[], "content_at") + end + f = Foo.new + f.printf ... + f.gets + f.content_at(1) + +== ¥á¥½¥Ã¥É + +--- Forwardable#def_instance_delegators(accessor, *methods) + + ((|methods|))¤ÇÅϤµ¤ì¤¿¥á¥½¥Ã¥É¤Î¥ê¥¹¥È¤ò((|accessor¤Ë|))°Ñ¾ù¤¹¤ë + ¤è¤¦¤Ë¤·¤Þ¤¹. + +--- Forwardable#def_instance_delegator(accessor, method, ali = method) + + ((||method|))¤ÇÅϤµ¤ì¤¿¥á¥½¥Ã¥É¤ò((|accessor|))¤Ë°Ñ¾ù¤¹¤ë¤è¤¦¤Ë¤· + ¤Þ¤¹. ((|ali|))¤¬°ú¿ô¤È¤·¤ÆÅϤµ¤ì¤¿¤È¤­¤Ï, ¥á¥½¥Ã¥É((|ali|))¤¬¸Æ¤Ð + ¤ì¤¿¤È¤­¤Ë¤Ï, ((|accessor|))¤ËÂФ·((|method|))¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹. + +--- Forwardable#def_delegators(accessor, *methods) + + ((|Forwardable#def_instance_delegators|))¤ÎÊÌ̾¤Ç¤¹. + +--- Forwardable#def_delegator(accessor, method, ali = method) + + ((|Forwardable#def_instance_delegator|))¤ÎÊÌ̾¤Ç¤¹. + += SingleForwardable + +¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ·, ¥á¥½¥Ã¥É¤Î°Ñ¾ùµ¡Ç½¤òÄêµÁ¤·¤Þ¤¹. + +== »È¤¤Êý + +¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ·¤Æ((|extend|))¤·¤Æ»È¤¤¤Þ¤¹. + + g = Goo.new + g.extend SingleForwardable + g.def_delegator("@out", :puts) + g.puts ... + +== ¥á¥½¥Ã¥É + +--- SingleForwardable#def_singleton_delegators(accessor, *methods) + + ((|methods|))¤ÇÅϤµ¤ì¤¿¥á¥½¥Ã¥É¤Î¥ê¥¹¥È¤ò((|accessor|))¤Ë°Ñ¾ù¤¹¤ë + ¤è¤¦¤Ë¤·¤Þ¤¹. + +--- SingleForwardable#def_singleton_delegator(accessor, method, ali = method) + + ((|method|))¤ÇÅϤµ¤ì¤¿¥á¥½¥Ã¥É¤ò((|accessor|))¤Ë°Ñ¾ù¤¹¤ë¤è¤¦¤Ë¤·¤Þ + ¤¹. ((|ali|))¤¬°ú¿ô¤È¤·¤ÆÅϤµ¤ì¤¿¤È¤­¤Ï, ¥á¥½¥Ã¥É((|ali|))¤¬¸Æ¤Ð¤ì + ¤¿¤È¤­¤Ë¤Ï, ((|accessor|))¤ËÂФ·((|method|))¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹. + +--- SingleForwardable#def_delegators(accessor, *methods) + + ((|SingleForwardable#def_singleton_delegators|))¤ÎÊÌ̾¤Ç¤¹. + +--- SingleForwardable#def_delegator(accessor, method, ali = method) + + ((|SingleForwardable#def_singleton_delegator|))¤ÎÊÌ̾¤Ç¤¹. +=end diff --git a/lib/ruby-1.9.1-rc1/doc/irb/irb-tools.rd.ja b/lib/ruby-1.9.1-rc1/doc/irb/irb-tools.rd.ja new file mode 100644 index 0000000..9cfb76e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/irb/irb-tools.rd.ja @@ -0,0 +1,184 @@ +irb´ØÏ¢¤ª¤Þ¤±¥³¥Þ¥ó¥É¤È¥é¥¤¥Ö¥é¥ê + $Release Version: 0.7.1 $ + $Revision: 14912 $ + by Keiju ISHITSUKA(Nihon Rational Co.,Ltd.) + +=begin + +:¥³¥Þ¥ó¥É: +* rtags -- ruby tags command + +:´Ø¿ô¥é¥¤¥Ö¥é¥ê: +* xmp -- irb version of gotoken xmp-function + +:¥¯¥é¥¹¥é¥¤¥Ö¥é¥ê: +* frame.rb -- frame tracer +* completion.rb -- irb completor + += rtags + +rtags¤ÏemacsµÚ¤ÓviÍѤÎ, TAG¥Õ¥¡¥¤¥ë¤ò¤Ä¤¯¤ë¥³¥Þ¥ó¥É¤Ç¤¹. + +== »È¤¤Êý + + rtags [-vi] file.... + +¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ËemacsÍѤÎTAGS¥Õ¥¡¥¤¥ë¤¬¤Ç¤­¤Þ¤¹. -vi¥ª¥×¥·¥ç¥ó¤ò +¤Ä¤±¤¿»þ¤Ë¤ÏviÍѤÎtags¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹. + +emacs¤Î¾ì¹ç, Ä̾ï¤Îetags.el¤¬¤½¤Î¤Þ¤Þ»È¤¨¤Þ¤¹. ¸¡º÷²Äǽ¤Ê¤Î¤Ï, + +* ¥¯¥é¥¹ +* ¥á¥½¥Ã¥É +* Æðۥ᥽¥Ã¥É +* alias +* attr¤ÇÀë¸À¤µ¤ì¤¿¥¢¥¯¥»¥µ(¥Ñ¥é¥á¡¼¥¿¤¬¥·¥ó¥Ü¥ë¤«Ê¸»úÎó¥ê¥Æ¥é¥ë¤Ë¸Â¤ë) +* attr_XXX¤ÇÀë¸À¤µ¤ì¤¿¥¢¥¯¥»¥µ(¥Ñ¥é¥á¡¼¥¿¤¬¥·¥ó¥Ü¥ë¤«Ê¸»úÎó¥ê¥Æ¥é¥ë¤Ë¸Â¤ë) + +¤Ç¤¹. + +C¤Ê¤É¤Ç»È¤Ã¤Æ¤¤¤ë¤Î¤È°ã¤¦¤Î¤Ï, ¥³¥ó¥×¥ê¡¼¥·¥ç¥ó¤Ë´Ø¤¹¤ëÉôʬ¤Ç, + +´Ø¿ô̾¤Ï, + + ´Ø¿ô̾( + +¥¯¥é¥¹¤Ï, + + ::¥¯¥é¥¹Ì¾::....::¥¯¥é¥¹Ì¾ + +¥á¥½¥Ã¥É¤Ï, + + ::¥¯¥é¥¹Ì¾::....::¥¯¥é¥¹Ì¾#¥á¥½¥Ã¥É̾ + +Æðۥ᥽¥Ã¥É(¥¯¥é¥¹¥á¥½¥Ã¥É)¤Ï + + ::¥¯¥é¥¹Ì¾::....::¥¯¥é¥¹Ì¾.¥á¥½¥Ã¥É̾ + +¤Ç¥³¥ó¥×¥ê¡¼¥·¥ç¥ó¤ò¹Ô¤Ê¤¦¤È¤³¤í¤Ç¤¹. + += xmp.rb + +¤´¤È¤±¤óxmp¤Î¾å°Ì¸ß´¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¹. ¤¿¤À, Èó¾ï¤Ë½Å¤¤¤Î¤Ç¤´¤È¤±¤óxmp¤Ç +¤ÏÂбþ¤Ç¤­¤Ê¤¤»þ¤Ë, »ÈÍѤ¹¤ë¤ÈÎɤ¤¤Ç¤·¤ç¤¦. + +== »È¤¤Êý + +=== ´Ø¿ô¤È¤·¤Æ»È¤¦. + + require "irb/xmp" + xmp <1 + foo + ==>1 + +=== XMP¥¤¥ó¥¹¥¿¥ó¥¹¤òÍѤ¤¤ë. + +¤³¤Î¾ì¹ç¤Ï, XMP¤¬¥³¥ó¥Æ¥­¥¹¥È¾ðÊó¤ò»ý¤Ä¤Î¤Ç, ÊÑ¿ô¤ÎÃͤʤɤòÊÝ»ý¤·¤Æ¤¤ +¤Þ¤¹. + + require "irb/xmp" + xmp = XMP.new + xmp.puts <1 + foo + ==>1 + foo + ==>1 + +== ¥³¥ó¥Æ¥­¥¹¥È¤Ë´Ø¤·¤Æ + +XMP¥á¥½¥Ã¥É·²¤Î¥³¥ó¥Æ¥­¥¹¥È¤Ï, ¸Æ¤Ó½Ð¤¹Á°¤Î¥³¥ó¥Æ¥­¥¹¥È¤Çɾ²Á¤µ¤ì¤Þ¤¹. +ÌÀ¼¨Åª¤Ë¥³¥ó¥Æ¥­¥¹¥È¤ò»ØÄꤹ¤ë¤È¤½¤Î¥³¥ó¥Æ¥­¥¹¥È¤Çɾ²Á¤·¤Þ¤¹. + +Îã: + + xmp "foo", an_binding + +:Ãí: +¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Þ¤»¤ó. + += frame.rb +¸½ºß¼Â¹ÔÃæ¤Î¥Õ¥ì¡¼¥à¾ðÊó¤ò¼è¤ê°·¤¦¤¿¤á¤Î¥¯¥é¥¹¤Ç¤¹. + +* IRB::Frame.top(n = 0) + ¾å¤«¤énÈÖÌܤΥ³¥ó¥Æ¥­¥¹¥È¤ò¼è¤ê½Ð¤·¤Þ¤¹. n¤Ï0¤¬ºÇ¾å°Ì¤Ë¤Ê¤ê¤Þ¤¹. +* IRB::Frame.bottom(n = 0) + ²¼¤«¤énÈÖÌܤΥ³¥ó¥Æ¥­¥¹¥È¤ò¼è¤ê½Ð¤·¤Þ¤¹. n¤Ï0¤¬ºÇ²¼°Ì¤Ë¤Ê¤ê¤Þ¤¹. +* IRB::Frame.sender + ¥»¥ó¥À¤Ë¤Ê¤Ã¤Æ¤¤¤ë¥ª¥Ö¥¸¥§¥¯¥È¤ò¼è¤ê½Ð¤·¤Þ¤¹. ¥»¥ó¥À¤È¤Ï, ¤½¤Î¥á¥½¥Ã + ¥É¤ò¸Æ¤Ó½Ð¤·¤¿Â¦¤Îself¤Î¤³¤È¤Ç¤¹. + +:Ãí: +set_trace_func¤òÍѤ¤¤ÆRuby¤Î¼Â¹Ô¤ò¥È¥ì¡¼¥¹¤·¤Æ¤¤¤Þ¤¹. ¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¤Ë +¤ÏÂбþ¤·¤Æ¤¤¤Þ¤»¤ó. + += completion.rb +irb¤Îcompletionµ¡Ç½¤òÄ󶡤¹¤ë¤â¤Î¤Ç¤¹. + +== »È¤¤Êý + + % irb -r irb/completion + +¤È¤¹¤ë¤«, ~/.irbrc Ãæ¤Ë + + require "irb/completion" + +¤òÆþ¤ì¤Æ¤¯¤À¤µ¤¤. irb¼Â¹ÔÃæ¤Ë require "irb/completion" ¤·¤Æ¤â¤è¤¤¤Ç¤¹. + +irb¼Â¹ÔÃæ¤Ë (TAB) ¤ò²¡¤¹¤È¥³¥ó¥×¥ì¡¼¥·¥ç¥ó¤·¤Þ¤¹. + +¥È¥Ã¥×¥ì¥Ù¥ë¤Ç(TAB)¤ò²¡¤¹¤È¤¹¤Ù¤Æ¤Î¹½Ê¸Í×ÁÇ, ¥¯¥é¥¹, ¥á¥½¥Ã¥É¤Î¸õÊ䤬¤Ç +¤Þ¤¹. ¸õÊ䤬ͣ°ì¤Ê¤é¤Ð´°Á´¤ËÊä´°¤·¤Þ¤¹. + + irb(main):001:0> in + in inspect instance_eval + include install_alias_method instance_of? + initialize install_aliases instance_variables + irb(main):001:0> inspect + "main" + irb(main):002:0> foo = Object.new + # + + ((|ÊÑ¿ô̾.|))¤Î¸å¤Ë(TAB)¤ò²¡¤¹¤È, ¤½¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Î¥á¥½¥Ã¥É°ìÍ÷¤¬¤Ç¤Þ + ¤¹. + + irb(main):003:0> foo. + foo.== foo.frozen? foo.protected_methods + foo.=== foo.hash foo.public_methods + foo.=~ foo.id foo.respond_to? + foo.__id__ foo.inspect foo.send + foo.__send__ foo.instance_eval foo.singleton_methods + foo.class foo.instance_of? foo.taint + foo.clone foo.instance_variables foo.tainted? + foo.display foo.is_a? foo.to_a + foo.dup foo.kind_of? foo.to_s + foo.eql? foo.method foo.type + foo.equal? foo.methods foo.untaint + foo.extend foo.nil? + foo.freeze foo.private_methods + +=end + +% Begin Emacs Environment +% Local Variables: +% mode: text +% comment-column: 0 +% comment-start: "%" +% comment-end: "\n" +% End: +% + diff --git a/lib/ruby-1.9.1-rc1/doc/irb/irb.rd b/lib/ruby-1.9.1-rc1/doc/irb/irb.rd new file mode 100644 index 0000000..d25cede --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/irb/irb.rd @@ -0,0 +1,391 @@ +irb -- interactive ruby + $Release Version: 0.9 $ + $Revision: 14912 $ + by Keiju ISHITSUKA(keiju@ishitsuka.com) + by gotoken-san who is original translater from japanese version + +=begin += What is irb? + +irb stands for `interactive ruby'. irb is a tool to execute interactively +ruby expressions read from stdin. + += Invoking + + % irb + += Usage + +Use of irb is easy if you know ruby. Executing irb, prompts are +displayed as follows. Then, enter expression of ruby. A input is +executed when it is syntacticaly completed. + + dim% irb + irb(main):001:0> 1+2 + 3 + irb(main):002:0> class Foo + irb(main):003:1> def foo + irb(main):004:2> print 1 + irb(main):005:2> end + irb(main):006:1> end + nil + irb(main):007:0> + +And, Readline extesion module can be used with irb. Using Readline +is the standard default action if Readline is installed. + += Command line option + + irb.rb [options] file_name opts + options: + -f suppress read ~/.irbrc + -m bc mode (fraction or matrix are available) + -d set $DEBUG to true (same as `ruby -d') + -Kc same as `ruby -Kc' + -r load-module same as `ruby -r' + --verbose command input is echoed(default) + --noverbose command input isn't echoed + --echo commands are echoed immediately before execution(default) + --noecho commands aren't echoed immediately before execution + --inspect uses `inspect' for output (the default except bc mode) + --noinspect doesn't uses inspect for output + --readline uses Readline extension module + --noreadline doesn't use Readline extension module + --prompt prompt-mode + --prompt-mode prompt-mode + switches prompt mode. Pre-defined prompt modes are + `default', `simple', `xmp' and `inf-ruby' + + --inf-ruby-mode uses prompt appreciate for inf-ruby-mode on emacs. + Suppresses --readline. + --simple-prompt simple prompt mode + --noprompt no prompt + --tracer display trace for each execution of commands. + --back-trace-limit n + displayes backtrace top n and tail n. The default + value is 16. + --irb_debug n sets internal debug level to n (It shouldn't be used) + -v, --version prints the version of irb + += Configurations + +irb reads `~/.irbrc' when it is invoked. If `~/.irbrb' doesn't exist +irb try to read in the order `.irbrc', `irb.rc', `_irbrc' then `$irbrc'. + +The following is altanative to the command line option. To use them +type as follows in an irb session. + + IRB.conf[:IRB_NAME]="irb" + IRB.conf[:MATH_MODE]=false + IRB.conf[:USE_TRACER]=false + IRB.conf[:USE_LOADER]=false + IRB.conf[:IGNORE_SIGINT]=true + IRB.conf[:IGNORE_EOF]=false + IRB.conf[:INSPECT_MODE]=nil + IRB.conf[:IRB_RC] = nil + IRB.conf[:BACK_TRACE_LIMIT]=16 + IRB.conf[:USE_LOADER] = false + IRB.conf[:USE_READLINE] = nil + IRB.conf[:USE_TRACER] = false + IRB.conf[:IGNORE_SIGINT] = true + IRB.conf[:IGNORE_EOF] = false + IRB.conf[:PROMPT_MODE] = :DEFALUT + IRB.conf[:PROMPT] = {...} + IRB.conf[:DEBUG_LEVEL]=0 + IRB.conf[:VERBOSE]=true + +== Customizing prompt + +To costomize the prompt you set a variable + + IRB.conf[:PROMPT] + +For example, describe as follows in `.irbrc'. + + IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode + :PROMPT_I => nil, # normal prompt + :PROMPT_S => nil, # prompt for continuated strings + :PROMPT_C => nil, # prompt for continuated statement + :RETURN => " ==>%s\n" # format to return value + } + +Then, invoke irb with the above prompt mode by + + % irb --prompt my-prompt + +Or add the following in `.irbrc'. + + IRB.conf[:PROMPT_MODE] = :MY_PROMPT + +Constants PROMPT_I, PROMPT_S and PROMPT_C specifies the format. +In the prompt specification, some special strings are available. + + %N command name which is running + %m to_s of main object (self) + %M inspect of main object (self) + %l type of string(", ', /, ]), `]' is inner %w[...] + %NNi indent level. NN is degits and means as same as printf("%NNd"). + It can be ommited + %NNn line number. + %% % + +For instance, the default prompt mode is defined as follows: + +IRB.conf[:PROMPT_MODE][:DEFAULT] = { + :PROMPT_I => "%N(%m):%03n:%i> ", + :PROMPT_S => "%N(%m):%03n:%i%l ", + :PROMPT_C => "%N(%m):%03n:%i* ", + :RETURN => "%s\n" +} + +RETURN is used to printf. + +== Configurating subirb + +The command line option or IRB.conf specify the default behavior of +(sub)irb. On the other hand, each conf of in the next sction `6. Command' +is used to individually configurate (sub)irb. + +If proc is set to IRB.conf[:IRB_RC], its subirb will be invoked after +execution of that proc under giving the context of irb as its +aregument. By this mechanism each subirb can be configurated. + += Command + +For irb commands, both simple name and `irb_'-prefixed name are prepared. + +--- exit, quit, irb_exit + Quits (sub)irb. + +--- conf, irb_context + Displays current configuration. Modifing the configuration is + achieved by sending message to `conf'. + +--- conf.eval_history = N + Sets execution result history. + N is a integer or nil. If N > 0, the number of historys is N. + If N == 0, the number of historys is unlimited. If N is nill, + execution result history isn't used(default). + +--- conf.back_trace_limit + Sets display lines of backtrace as top n and tail n. + The default value is 16. + +--- conf.debug_level = N + Sets debug level of irb. + +--- conf.ignore_eof = true/false + Whether ^D (control-d) will be ignored or not. + If false is set, ^D means quit. + +--- conf.ignore_sigint= true/false + Whether ^C (control-c) will be ignored or not. + If false is set, ^D means quit. If true, + during input: cancel inputing then return to top level. + during execute: abondon current execution. + +--- conf.inf_ruby_mode = true/false + Whether inf-ruby-mode or not. The default value is false. + +--- conf.inspect_mode = true/false/nil + Specifies inspect mode. + true: display inspect + false: display to_s + nil: inspect mode in non math mode, + non inspect mode in math mode. + +--- conf.math_mode + Whether bc mode or not. + +--- conf.use_loader = true/false + Whether irb's own file reader method is used when load/require or not. + This mode is globaly affected (irb wide). + +--- conf.prompt_c + prompt for a continuating statement (e.g, immediately after of `if') + +--- conf.prompt_i + standard prompt + +--- conf.prompt_s + prompt for a continuating string + +--- conf.rc + Whether ~/.irbrc is read or not. + +--- conf.use_prompt = true/false + Prompting or not. + +--- conf.use_readline = true/false/nil + Whether readline is used or not. + true: uses + false: doen't use + nil: intends to use readline except for inf-ruby-mode (default) +# +#--- conf.verbose=T/F +# Whether verbose messages are display or not. + +--- cws, chws, irb_change_workspace [obj] + obj will be self. If obj is omitted, self will be home-object, or + the main object of first started irb. + +--- pushws, irb_pushws, irb_push_workspace [obj] + same as UNIX-shell command pushd. + +--- popws, irb_popws, irb_pop_workspace + same as UNIX-shell command popd + +--- irb [obj] + Invoke subirb. If obj is given, obj will be self. + +--- jobs, irb_jobs + List of subirb + +--- fg n, irb_fg n + Switch into specified subirb. The following is candidates of n: + + irb number + thhread + irb object + self(obj which is specified of irb obj) + +--- kill n, irb_kill n + Kill subirb. The means of n is as same as the case of irb_fg. + +--- souce, irb_source path + This is a like UNIX-shell command source. evaluate script in path + on current context. + +--- irb_load path, prev + irb-version of Ruby's load. + += System variable + +--- _ The latest value of evaluation (it is local) +--- __ The history of evaluation values. + __[line_no] return an evaluation value of line number. If + line_no is a negative, return value before - from latest + value. + += Session Example + + dim% ruby irb.rb + irb(main):001:0> irb # invoke subirb + irb#1(main):001:0> jobs # list of subirbs + #0->irb on main (# : stop) + #1->irb#1 on main (# : running) + nil + irb#1(main):002:0> fg 0 # switch job + nil + irb(main):002:0> class Foo;end + nil + irb(main):003:0> irb Foo # invoke subirb which has the + # context of Foo + irb#2(Foo):001:0> def foo # define Foo#foo + irb#2(Foo):002:1> print 1 + irb#2(Foo):003:1> end + nil + irb#2(Foo):004:0> fg 0 # switch job + nil + irb(main):004:0> jobs # list of job + #0->irb on main (# : running) + #1->irb#1 on main (# : stop) + #2->irb#2 on Foo (# : stop) + nil + irb(main):005:0> Foo.instance_methods # Foo#foo is defined asurely + ["foo"] + irb(main):006:0> fg 2 # switch job + nil + irb#2(Foo):005:0> def bar # define Foo#bar + irb#2(Foo):006:1> print "bar" + irb#2(Foo):007:1> end + nil + irb#2(Foo):010:0> Foo.instance_methods + ["bar", "foo"] + irb#2(Foo):011:0> fg 0 + nil + irb(main):007:0> f = Foo.new + # + irb(main):008:0> irb f # invoke subirb which has the + # context of f (instance of Foo) + irb#3(#):001:0> jobs + #0->irb on main (# : stop) + #1->irb#1 on main (# : stop) + #2->irb#2 on Foo (# : stop) + #3->irb#3 on # (# : running) + nil + irb#3(#):002:0> foo # evaluate f.foo + 1nil + irb#3(#):003:0> bar # evaluate f.bar + barnil + irb#3(#):004:0> kill 1, 2, 3# kill job + nil + irb(main):009:0> jobs + #0->irb on main (# : running) + nil + irb(main):010:0> exit # exit + dim% + += Restrictions + +Because irb evaluates the inputs immediately after the imput is +syntactically completed, irb gives slight different result than +directly use ruby. Known difference is pointed out here. + + +== Declaration of the local variable + +The following causes an error in ruby: + + eval "foo = 0" + foo + -- + -:2: undefined local variable or method `foo' for # (NameError) + --- + NameError + +Though, the above will successfully done by irb. + + >> eval "foo = 0" + => 0 + >> foo + => 0 + +Ruby evaluates a code after reading entire of code and determination +of the scope of local variables. On the other hand, irb do +immediately. More precisely, irb evaluate at first + + evel "foo = 0" + +then foo is defined on this timing. It is because of this +incompatibility. + +If you'd like to detect those differences, begin...end can be used: + + >> begin + ?> eval "foo = 0" + >> foo + >> end + NameError: undefined local variable or method `foo' for # + (irb):3 + (irb_local_binding):1:in `eval' + +== Here-document + +Implementation of Here-document is incomplete. + +== Symbol + +Irb can not always recognize a symbol as to be Symbol. Concretely, an +expression have completed, however Irb regard it as continuation line. + +=end + +% Begin Emacs Environment +% Local Variables: +% mode: text +% comment-column: 0 +% comment-start: "%" +% comment-end: "\n" +% End: +% diff --git a/lib/ruby-1.9.1-rc1/doc/irb/irb.rd.ja b/lib/ruby-1.9.1-rc1/doc/irb/irb.rd.ja new file mode 100644 index 0000000..b0c2d9c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/irb/irb.rd.ja @@ -0,0 +1,412 @@ +irb -- interactive ruby + $Release Version: 0.9.5 $ + $Revision: 14912 $ + by Keiju ISHITSUKA(keiju@ruby-lang.org) +=begin += irb¤È¤Ï? + +irb¤Ïinteractive ruby¤Îά¤Ç¤¹. ruby¤Î¼°¤òɸ½àÆþÎϤ«¤é´Êñ¤ËÆþÎÏ/¼Â¹Ô¤¹¤ë +¤¿¤á¤Î¥Ä¡¼¥ë¤Ç¤¹. + += µ¯Æ° + + % irb + +¤Ç¹Ô¤Ê¤¤¤Þ¤¹. + += »È¤¤Êý + +irb¤Î»È¤¤Êý¤Ï, Ruby¤µ¤¨ÃΤäƤ¤¤ì¤Ð¤¤¤¿¤Ã¤Æ´Êñ¤Ç¤¹. ´ðËÜŪ¤Ë¤Ï irb ¤È +¤¤¤¦¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤À¤±¤Ç¤¹. irb¤ò¼Â¹Ô¤¹¤ë¤È, °Ê²¼¤Î¤è¤¦¤Ê¥×¥í¥ó¥× +¥È¤¬É½¤ì¤Æ¤­¤Þ¤¹. ¸å¤Ï, ruby¤Î¼°¤òÆþ¤ì¤Æ²¼¤µ¤¤. ¼°¤¬´°·ë¤·¤¿»þÅÀ¤Ç¼Â¹Ô +¤µ¤ì¤Þ¤¹. + + dim% irb + irb(main):001:0> 1+2 + 3 + irb(main):002:0> class Foo + irb(main):003:1> def foo + irb(main):004:2> print 1 + irb(main):005:2> end + irb(main):006:1> end + nil + irb(main):007:0> + +¤Þ¤¿, irb¤ÏReadline¥â¥¸¥å¡¼¥ë¤Ë¤âÂбþ¤·¤Æ¤¤¤Þ¤¹. Readline¥â¥¸¥å¡¼¥ë¤¬ +¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë»þ¤Ë¤Ï, ¤½¤ì¤ò»È¤¦¤Î¤¬É¸½à¤ÎÆ°ºî¤Ë¤Ê¤ê¤Þ¤¹. + += ¥³¥Þ¥ó¥É¥ª¥×¥·¥ç¥ó + + irb.rb [options] file_name opts + options: + -f ~/.irbrc ¤òÆɤ߹þ¤Þ¤Ê¤¤. + -m bc¥â¡¼¥É(ʬ¿ô, ¹ÔÎó¤Î·×»»¤¬¤Ç¤­¤ë) + -d $DEBUG ¤òtrue¤Ë¤¹¤ë(ruby -d ¤ÈƱ¤¸) + -Kc ruby -Kc¤ÈƱ¤¸ + -r load-module ruby -r ¤ÈƱ¤¸. + --verbose ¤³¤ì¤«¤é¼Â¹Ô¤¹¤ë¹Ô¤òɽ¼¨¤¹¤ë(¥Ç¥Õ¥©¥ë¥È) + --noverbose ¤³¤ì¤«¤é¼Â¹Ô¤¹¤ë¹Ô¤òɽ¼¨¤·¤Ê¤¤ + --echo ¼Â¹Ô·ë²Ì¤òɽ¼¨¤¹¤ë(¥Ç¥Õ¥©¥ë¥È) + --noecho ¼Â¹Ô·ë²Ì¤òɽ¼¨¤·¤Ê¤¤ + --inspect ·ë²Ì½ÐÎϤËinspect¤òÍѤ¤¤ë(bc¥â¡¼¥É°Ê³°¤Ï¥Ç¥Õ¥©¥ë¥È). + --noinspect ·ë²Ì½ÐÎϤËinspect¤òÍѤ¤¤Ê¤¤. + --readline readline¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ¹¤ë. + --noreadline readline¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤Ê¤¤. ¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤Ï, + inf-ruby-mode°Ê³°¤Çreadline¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤è¤¦ + ¤È¤¹¤ë. + --prompt prompt-mode + --prompt-mode prompt-mode + ¥×¥í¥ó¥×¥È¥â¡¼¥É¤òÀÚÂؤ¨¤Þ¤¹. ¸½ºßÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥× + ¥í¥ó¥×¥È¥â¡¼¥É¤Ï, default, simple, xmp, inf-ruby¤¬ + ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹. ¥Ç¥Õ¥©¥ë¥È¤Ïdefault¥×¥í¥ó¥×¥È¥â¡¼ + ¥É¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹. + + --inf-ruby-mode emacs¤Îinf-ruby-modeÍѤΥץí¥ó¥×¥Èɽ¼¨¤ò¹Ô¤Ê¤¦. Æà + ¤Ë»ØÄ꤬¤Ê¤¤¸Â¤ê, readline¥é¥¤¥Ö¥é¥ê¤Ï»È¤ï¤Ê¤¯¤Ê¤ë. + --simple-prompt + Èó¾ï¤Ë¥·¥ó¥×¥ë¤Ê¥×¥í¥ó¥×¥È¤òÍѤ¤¤ë¥â¡¼¥É¤Ç¤¹. + --noprompt ¥×¥í¥ó¥×¥Èɽ¼¨¤ò¹Ô¤Ê¤ï¤Ê¤¤. + --tracer ¥³¥Þ¥ó¥É¼Â¹Ô»þ¤Ë¥È¥ì¡¼¥¹¤ò¹Ô¤Ê¤¦. + --back-trace-limit n + ¥Ð¥Ã¥¯¥È¥ì¡¼¥¹É½¼¨¤ò¥Ð¥Ã¥¯¥È¥ì¡¼¥¹¤ÎƬ¤«¤é n, ¸å¤í + ¤«¤én¤À¤±¹Ô¤Ê¤¦. ¥Ç¥Õ¥©¥ë¥È¤Ï16 + --irb_debug n irb¤Î¥Ç¥Ð¥Ã¥°¥Ç¥Ð¥Ã¥°¥ì¥Ù¥ë¤òn¤ËÀßÄꤹ¤ë(ÍøÍѤ·¤Ê + ¤¤Êý¤¬ÌµÆñ¤Ç¤·¤ç¤¦). + -v, --version irb¤Î¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤¹¤ë + += ¥³¥ó¥Õ¥£¥®¥å¥ì¡¼¥·¥ç¥ó + +irbµ¯Æ°»þ¤Ë``~/.irbrc''¤òÆɤ߹þ¤ß¤Þ¤¹. ¤â¤·Â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï, +``.irbrc'', ``irb.rc'', ``_irbrc'', ``$irbrc''¤Î½ç¤Ëload¤ò»î¤ß¤Þ¤¹. + +¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ëÂå¤ï¤ê¤Ë, °Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç¤â¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤òÀßÄê +¤Ç¤­¤Þ¤¹. + + IRB.conf[:IRB_NAME]="irb" + IRB.conf[:MATH_MODE]=false + IRB.conf[:USE_TRACER]=false + IRB.conf[:USE_LOADER]=false + IRB.conf[:IGNORE_SIGINT]=true + IRB.conf[:IGNORE_EOF]=false + IRB.conf[:INSPECT_MODE]=nil + IRB.conf[:IRB_RC] = nil + IRB.conf[:BACK_TRACE_LIMIT]=16 + IRB.conf[:USE_LOADER] = false + IRB.conf[:USE_READLINE] = nil + IRB.conf[:USE_TRACER] = false + IRB.conf[:IGNORE_SIGINT] = true + IRB.conf[:IGNORE_EOF] = false + IRB.conf[:PROMPT_MODE] = :DEFALUT + IRB.conf[:PROMPT] = {...} + IRB.conf[:DEBUG_LEVEL]=0 + IRB.conf[:VERBOSE]=true + +== ¥×¥í¥ó¥×¥È¤ÎÀßÄê + +¥×¥í¥ó¥×¥È¤ò¥«¥¹¥¿¥Þ¥¤¥º¤·¤¿¤¤»þ¤Ë¤Ï, + + IRB.conf[:PROMPT] + +¤òÍѤ¤¤Þ¤¹. Î㤨¤Ð, .irbrc¤ÎÃæ¤Ç²¼¤Î¤è¤¦¤Ê¼°¤òµ­½Ò¤·¤Þ¤¹: + + IRB.conf[:PROMPT][:MY_PROMPT] = { # ¥×¥í¥ó¥×¥È¥â¡¼¥É¤Î̾Á° + :PROMPT_I => nil, # Ä̾ï¤Î¥×¥í¥ó¥×¥È + :PROMPT_N => nil, # ·Ñ³¹Ô¤Î¥×¥í¥ó¥×¥È + :PROMPT_S => nil, # ʸ»úÎó¤Ê¤É¤Î·Ñ³¹Ô¤Î¥×¥í¥ó¥×¥È + :PROMPT_C => nil, # ¼°¤¬·Ñ³¤·¤Æ¤¤¤ë»þ¤Î¥×¥í¥ó¥×¥È + :RETURN => " ==>%s\n" # ¥ê¥¿¡¼¥ó»þ¤Î¥×¥í¥ó¥×¥È + } + +¥×¥í¥ó¥×¥È¥â¡¼¥É¤ò»ØÄꤷ¤¿¤¤»þ¤Ë¤Ï, + + irb --prompt my-prompt + +¤Ç¤½¤Î¥×¥í¥ó¥×¥È¥â¡¼¥É¤Çµ¯Æ°¤µ¤ì¤Þ¤¹. ¤Þ¤¿¤Ï, .irbrc¤Ë²¼¼°¤òµ­½Ò¤·¤Æ¤â +OK¤Ç¤¹. + + IRB.conf[:PROMPT_MODE] = :MY_PROMPT + +PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_C¤Ï, ¥Õ¥©¡¼¥Þ¥Ã¥È¤ò»ØÄꤷ¤Þ¤¹. + + %N µ¯Æ°¤·¤Æ¤¤¤ë¥³¥Þ¥ó¥É̾¤¬½ÐÎϤµ¤ì¤ë. + %m main¥ª¥Ö¥¸¥§¥¯¥È(self)¤¬to_s¤Ç½ÐÎϤµ¤ì¤ë. + %M main¥ª¥Ö¥¸¥§¥¯¥È(self)¤¬inspect¤µ¤ì¤Æ½ÐÎϤµ¤ì¤ë. + %l ʸ»úÎóÃæ¤Î¥¿¥¤¥×¤òɽ¤¹(", ', /, ], `]'¤Ï%w¤ÎÃæ¤Î»þ) + %NNi ¥¤¥ó¥Ç¥ó¥È¤Î¥ì¥Ù¥ë¤òɽ¤¹. NN¤Ï¿ô»ú¤¬Æþ¤êprintf¤Î%NNd¤ÈƱ¤¸. ¾Ê + ά²Äǽ + %NNn ¹ÔÈÖ¹æ¤òɽ¤·¤Þ¤¹. + %% % + +Î㤨¤Ð, ¥Ç¥Õ¥©¥ë¥È¤Î¥×¥í¥ó¥×¥È¥â¡¼¥É¤Ï: + + IRB.conf[:PROMPT_MODE][:DEFAULT] = { + :PROMPT_I => "%N(%m):%03n:%i> ", + :PROMPT_N => "%N(%m):%03n:%i> ", + :PROMPT_S => "%N(%m):%03n:%i%l ", + :PROMPT_C => "%N(%m):%03n:%i* ", + :RETURN => "%s\n" + } + +¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹. + +RETURN¤Ï, ¸½ºß¤Î¤È¤³¤íprintf·Á¼°¤Ç¤¹. ¾­Íè»ÅÍͤ¬ÊѤï¤ë¤«¤âÃΤì¤Þ¤»¤ó. + +== ¥µ¥Öirb¤ÎÀßÄê + +¥³¥Þ¥ó¥É¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤ª¤è¤ÓIRB.conf¤Ï(¥µ¥Ö)irbµ¯Æ°»þ¤Î¥Ç¥Õ¥©¥ë¥È¤Î +ÀßÄê¤ò·è¤á¤ë¤â¤Î¤Ç, `5. ¥³¥Þ¥ó¥É'¤Ë¤¢¤ëconf¤Ç¸ÄÊ̤Î(¥µ¥Ö)irb¤ÎÀßÄ꤬¤Ç +¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹. + +IRB.conf[:IRB_RC]¤Ëproc¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤È, ¥µ¥Öirb¤òµ¯Æ°¤¹¤ë»þ¤Ë¤½¤Î +proc¤òirb¤Î¥³¥ó¥Æ¥­¥¹¥È¤ò°ú¿ô¤È¤·¤Æ¸Æ¤Ó½Ð¤·¤Þ¤¹. ¤³¤ì¤Ë¤è¤Ã¤Æ¸ÄÊ̤Υµ +¥Öirb¤´¤È¤ËÀßÄê¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹. + + += ¥³¥Þ¥ó¥É + +irb³ÈÄ¥¥³¥Þ¥ó¥É¤Ï, ´Êñ¤Ê̾Á°¤ÈƬ¤Ë`irb_'¤ò¤Ä¤±¤¿Ì¾Á°¤ÈξÊýÄêµÁ¤µ¤ì¤Æ +¤¤¤Þ¤¹. ¤³¤ì¤Ï, ´Êñ¤Ê̾Á°¤¬override¤µ¤ì¤¿»þ¤Î¤¿¤á¤Ç¤¹. + +--- exit, quit, irb_exit + ½ªÎ»¤¹¤ë. + ¥µ¥Öirb¤Î¾ì¹ç, ¤½¤Î¥µ¥Öirb¤ò½ªÎ»¤¹¤ë. + +--- conf, irb_context + irb¤Î¸½ºß¤ÎÀßÄê¤òɽ¼¨¤¹¤ë. ÀßÄê¤ÎÊѹ¹¤Ï, conf¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ë¤³ + ¤È¤Ë¤è¤Ã¤Æ¹Ô¤Ê¤¨¤ë. + +--- conf.eval_history = N + ¼Â¹Ô·ë²Ì¤Î¥Ò¥¹¥È¥êµ¡Ç½¤ÎÀßÄê. + nn¤ÏÀ°¿ô¤«nil¤Ç nn>0 ¤Ç¤¢¤ì¤Ð¤½¤Î¿ô¤À¤±¥Ò¥¹¥È¥ê¤Ë¤¿¤á¤ë¡£nn==0¤Î»þ¤Ï + ̵À©¸Â¤Ëµ­²±¤¹¤ë¡¢nil¤À¤È¥Ò¥¹¥È¥êµ¡Ç½¤Ï¤ä¤á¤ë(¥Ç¥Õ¥©¥ë¥È). + +--- Conf.back_trace_limit + ¥Ð¥Ã¥¯¥È¥ì¡¼¥¹É½¼¨¤ò¥Ð¥Ã¥¯¥È¥ì¡¼¥¹¤ÎƬ¤«¤én, ¸å¤í¤«¤én¤À¤±¹Ô¤Ê¤¦. + ¥Ç¥Õ¥©¥ë¥È¤Ï16 + +--- conf.debug_level = N + irbÍѤΥǥХå°¥ì¥Ù¥ë¤ÎÀßÄê + +--- conf.ignore_eof = true/false + ^D¤¬ÆþÎϤµ¤ì¤¿»þ¤ÎÆ°ºî¤òÀßÄꤹ¤ë. true¤Î»þ¤Ï^D¤ò̵»ë¤¹¤ë, false¤Î + »þ¤Ïirb¤ò½ªÎ»¤¹¤ë. + +--- conf.ignore_sigint= true/false + ^C¤¬ÆþÎϤµ¤ì¤¿»þ¤ÎÆ°ºî¤òÀßÄꤹ¤ë. false»þ¤Ï, irb¤ò½ªÎ»¤¹¤ë. true¤Î + »þ¤ÎÆ°ºî¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë: + ÆþÎÏÃæ: ¤³¤ì¤Þ¤ÇÆþÎϤ·¤¿¤â¤Î¤ò¥­¥ã¥ó¥»¥ë¤·¥È¥Ã¥×¥ì¥Ù¥ë¤ËÌá¤ë. + ¼Â¹ÔÃæ: ¼Â¹Ô¤òÃæ»ß¤¹¤ë. + +--- conf.inf_ruby_mode = true/false + inf-ruby-modeÍѤΥץí¥ó¥×¥Èɽ¼¨¤ò¹Ô¤Ê¤¦. ¥Ç¥Õ¥©¥ë¥È¤Ïfalse. + +--- conf.inspect_mode = true/false/nil + ¥¤¥ó¥¹¥Ú¥¯¥È¥â¡¼¥É¤òÀßÄꤹ¤ë. + true: ¥¤¥ó¥¹¥Ú¥¯¥È¤·¤Æɽ¼¨¤¹¤ë. + false: Ä̾ï¤Îprint¤Çɽ¼¨¤¹¤ë. + nil: Ä̾ï¥â¡¼¥É¤Ç¤¢¤ì¤Ð, inspect mode¤È¤Ê¤ê, math¥â¡¼¥É¤Î»þ¤Ï, non + inspect mode¤È¤Ê¤ë. + +--- conf.math_mode + »²¾È¤Î¤ß. bc¥â¡¼¥É(ʬ¿ô, ¹ÔÎó¤Î·×»»¤¬¤Ç¤­¤Þ¤¹)¤«¤É¤¦¤«? + +--- conf.use_loader = true/false + load/require»þ¤Ëirb¤ÎfileÆɤ߹þ¤ßµ¡Ç½¤òÍѤ¤¤ë¥â¡¼¥É¤Î¥¹¥¤¥Ã¥Á(¥Ç¥Õ¥© + ¥ë¥È¤ÏÍѤ¤¤Ê¤¤). ¤³¤Î¥â¡¼¥É¤ÏIRBÁ´ÂΤËÈ¿±Ç¤µ¤ì¤ë. + +--- conf.prompt_c + if¤Îľ¸å¤Ê¤É, ¹Ô¤¬·Ñ³¤·¤Æ¤¤¤ë»þ¤Î¥×¥í¥ó¥×¥È. + +--- conf.prompt_i + Ä̾ï¤Î¥×¥í¥ó¥×¥È. + +--- conf.prompt_s + ʸ»úÎóÃæ¤Ê¤É¤òɽ¤¹¥×¥í¥ó¥×¥È. + +--- conf.rc + ~/.irbrc¤òÆɤ߹þ¤ó¤À¤«¤É¤¦¤«? + +--- conf.use_prompt = true/false + ¥×¥í¥ó¥×¥Èɽ¼¨¤¹¤ë¤«¤É¤¦¤«? ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥×¥í¥ó¥×¥È¤òɽ¼¨¤¹¤ë. + +--- conf.use_readline = true/false/nil + readline¤ò»È¤¦¤«¤É¤¦¤«? + true: readline¤ò»È¤¦. + false: readline¤ò»È¤ï¤Ê¤¤. + nil: (¥Ç¥Õ¥©¥ë¥È)inf-ruby-mode°Ê³°¤Çreadline¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤è + ¤¦¤È¤¹¤ë. +# +#--- conf.verbose=T/F +# irb¤«¤é¤¤¤í¤¤¤í¤Ê¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ¹¤ë¤«? + +--- cws, chws, irb_cws, irb_chws, irb_change_workspace [obj] + obj¤òself¤È¤¹¤ë. obj¤¬¾Êά¤µ¤ì¤¿¤È¤­¤Ï, home workspace, ¤¹¤Ê¤ï¤Á + irb¤òµ¯Æ°¤·¤¿¤È¤­¤Îmain object¤òself¤È¤¹¤ë. + +--- pushws, irb_pushws, irb_push_workspace [obj] + UNIX¥·¥§¥ë¥³¥Þ¥ó¥É¤Îpushd¤ÈƱÍÍ. + +--- popws, irb_popws, irb_pop_workspace + UNIX¥·¥§¥ë¥³¥Þ¥ó¥É¤Îpopd¤ÈƱÍÍ. + +--- irb [obj] + ¥µ¥Öirb¤òΩ¤Á¤¢¤²¤ë. obj¤¬»ØÄꤵ¤ì¤¿»þ¤Ï, ¤½¤Îobj¤òself¤È¤¹¤ë. + +--- jobs, irb_jobs + ¥µ¥Öirb¤Î¥ê¥¹¥È + +--- fg n, irb_fg n + »ØÄꤷ¤¿¥µ¥Öirb¤Ë¥¹¥¤¥Ã¥Á¤¹¤ë. n¤Ï, ¼¡¤Î¤â¤Î¤ò»ØÄꤹ¤ë. + + irbÈÖ¹æ + ¥¹¥ì¥Ã¥É + irb¥ª¥Ö¥¸¥§¥¯¥È + self(irb obj¤Çµ¯Æ°¤·¤¿»þ¤Îobj) + +--- kill n, irb_kill n + ¥µ¥Öirb¤òkill¤¹¤ë. n¤Ïfg¤ÈƱ¤¸. + +--- souce, irb_source path + UNIX¥·¥§¥ë¥³¥Þ¥ó¥É¤Îsource¤È»÷¤Æ¤¤¤ë. ¸½ºß¤Î´Ä¶­¾å¤ÇpathÆâ¤Î¥¹¥¯¥ê + ¥×¥È¤òɾ²Á¤¹¤ë. + +--- irb_load path, prev + + Ruby¤Îload¤ÎirbÈÇ. + += ¥·¥¹¥Æ¥àÊÑ¿ô + +--- _ + Á°¤Î·×»»¤Î¼Â¹Ô·ë²Ì¤ò³Ð¤¨¤Æ¤¤¤ë(¥í¡¼¥«¥ëÊÑ¿ô). +--- __ + ¼Â¹Ô·ë²Ì¤ÎÍúÎò¤ò³Ð¤¨¤Æ¤¤¤ë. + __[line_no]¤Ç¡¢¤½¤Î¹Ô¤Ç¼Â¹Ô¤·¤¿·ë²Ì¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë. line_no¤¬Éé¤Î + »þ¤Ë¤Ï¡¢ºÇ¿·¤Î·ë²Ì¤«¤é-line_noÁ°¤Î·ë²Ì¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë. + += »ÈÍÑÎã + +°Ê²¼¤Î¤è¤¦¤Ê´¶¤¸¤Ç¤¹. + + dim% ruby irb.rb + irb(main):001:0> irb # ¥µ¥Öirb¤ÎΩ¤Á¤¢¤² + irb#1(main):001:0> jobs # ¥µ¥Öirb¤Î¥ê¥¹¥È + #0->irb on main (# : stop) + #1->irb#1 on main (# : running) + nil + irb#1(main):002:0> fg 0 # job¤Î¥¹¥¤¥Ã¥Á + nil + irb(main):002:0> class Foo;end + nil + irb(main):003:0> irb Foo # Foo¤ò¥³¥ó¥Æ¥­¥¹¥È¤·¤Æirb + # Ω¤Á¤¢¤² + irb#2(Foo):001:0> def foo # Foo#foo¤ÎÄêµÁ + irb#2(Foo):002:1> print 1 + irb#2(Foo):003:1> end + nil + irb#2(Foo):004:0> fg 0 # job¤ò¥¹¥¤¥Ã¥Á + nil + irb(main):004:0> jobs # job¤Î¥ê¥¹¥È + #0->irb on main (# : running) + #1->irb#1 on main (# : stop) + #2->irb#2 on Foo (# : stop) + nil + irb(main):005:0> Foo.instance_methods # Foo#foo¤¬¤Á¤ã¤ó¤ÈÄêµÁ¤µ + # ¤ì¤Æ¤¤¤ë + ["foo"] + irb(main):006:0> fg 2 # job¤ò¥¹¥¤¥Ã¥Á + nil + irb#2(Foo):005:0> def bar # Foo#bar¤òÄêµÁ + irb#2(Foo):006:1> print "bar" + irb#2(Foo):007:1> end + nil + irb#2(Foo):010:0> Foo.instance_methods + ["bar", "foo"] + irb#2(Foo):011:0> fg 0 + nil + irb(main):007:0> f = Foo.new + # + irb(main):008:0> irb f # Foo¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Çirb¤ò + # Ω¤Á¤¢¤²¤ë. + irb#3(#):001:0> jobs + #0->irb on main (# : stop) + #1->irb#1 on main (# : stop) + #2->irb#2 on Foo (# : stop) + #3->irb#3 on # (# : running) + nil + irb#3(#):002:0> foo # f.foo¤Î¼Â¹Ô + nil + irb#3(#):003:0> bar # f.bar¤Î¼Â¹Ô + barnil + irb#3(#):004:0> kill 1, 2, 3# job¤Îkill + nil + irb(main):009:0> jobs + #0->irb on main (# : running) + nil + irb(main):010:0> exit # ½ªÎ» + dim% + += »ÈÍѾå¤ÎÀ©¸Â + +irb¤Ï, ɾ²Á¤Ç¤­¤ë»þÅÀ(¼°¤¬ÊĤ¸¤¿»þÅÀ)¤Ç¤ÎÃ༡¼Â¹Ô¤ò¹Ô¤Ê¤¤¤Þ¤¹. ¤·¤¿¤¬¤Ã +¤Æ, ruby¤òľÀܻȤä¿»þ¤È, ¼ã´³°Û¤Ê¤ëÆ°ºî¤ò¹Ô¤Ê¤¦¾ì¹ç¤¬¤¢¤ê¤Þ¤¹. + +¸½ºßÌÀ¤é¤«¤Ë¤Ê¤Ã¤Æ¤¤¤ëÌäÂêÅÀ¤òÀâÌÀ¤·¤Þ¤¹. + +== ¥í¡¼¥«¥ëÊÑ¿ô¤ÎÀë¸À + +ruby¤Ç¤Ï, °Ê²¼¤Î¥×¥í¥°¥é¥à¤Ï¥¨¥é¡¼¤Ë¤Ê¤ê¤Þ¤¹. + + eval "foo = 0" + foo + -- + -:2: undefined local variable or method `foo' for # (NameError) + --- + NameError + +¤È¤³¤í¤¬, irb¤òÍѤ¤¤ë¤È + + >> eval "foo = 0" + => 0 + >> foo + => 0 + +¤È¤Ê¤ê, ¥¨¥é¡¼¤òµ¯¤³¤·¤Þ¤»¤ó. ¤³¤ì¤Ï, ruby¤¬ºÇ½é¤Ë¥¹¥¯¥ê¥×¥ÈÁ´ÂΤò¥³¥ó +¥Ñ¥¤¥ë¤·¤Æ¥í¡¼¥«¥ëÊÑ¿ô¤ò·èÄꤹ¤ë¤«¤é¤Ç¤¹. ¤½¤ì¤ËÂФ·, irb¤Ï¼Â¹Ô²Äǽ¤Ë +¤Ê¤ë(¼°¤¬ÊĤ¸¤ë)¤È¼«Æ°Åª¤Ëɾ²Á¤·¤Æ¤¤¤ë¤«¤é¤Ç¤¹. ¾åµ­¤ÎÎã¤Ç¤Ï, + + evel "foo = 0" + +¤ò¹Ô¤Ê¤Ã¤¿»þÅÀ¤Çɾ²Á¤ò¹Ô¤Ê¤¤, ¤½¤Î»þÅÀ¤ÇÊÑ¿ô¤¬ÄêµÁ¤µ¤ì¤ë¤¿¤á, ¼¡¼°¤Ç +ÊÑ¿ôfoo¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤«¤é¤Ç¤¹. + +¤³¤Î¤è¤¦¤Êruby¤Èirb¤ÎÆ°ºî¤Î°ã¤¤¤ò²ò·è¤·¤¿¤¤¾ì¹ç¤Ï, begin...end¤Ç³ç¤Ã¤Æ +¥Ð¥Ã¥ÁŪ¤Ë¼Â¹Ô¤·¤Æ²¼¤µ¤¤: + + >> begin + ?> eval "foo = 0" + >> foo + >> end + NameError: undefined local variable or method `foo' for # + (irb):3 + (irb_local_binding):1:in `eval' + +== ¥Ò¥¢¥É¥­¥å¥á¥ó¥È + +¸½ºß¤Î¤È¤³¤í¥Ò¥¢¥É¥­¥å¥á¥ó¥È¤Î¼ÂÁõ¤ÏÉÔ´°Á´¤Ç¤¹. + +== ¥·¥ó¥Ü¥ë + +¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¤«¤É¤¦¤«¤ÎȽÃǤò´Ö°ã¤¨¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹. ¶ñÂÎŪ¤Ë¤Ï¼°¤¬´°Î» +¤·¤Æ¤¤¤ë¤Î¤Ë·Ñ³¹Ô¤È¸«¤Ê¤¹¤³¤È¤¬¤¢¤ê¤Þ¤¹. + +=end + +% Begin Emacs Environment +% Local Variables: +% mode: text +% comment-column: 0 +% comment-start: "%" +% comment-end: "\n" +% End: +% + diff --git a/lib/ruby-1.9.1-rc1/doc/shell.rd b/lib/ruby-1.9.1-rc1/doc/shell.rd new file mode 100644 index 0000000..dd530ed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/doc/shell.rd @@ -0,0 +1,347 @@ + -- shell.rb + $Release Version: 0.6.0 $ + $Revision: 14912 $ + by Keiju ISHITSUKA(keiju@ishitsuka.com) + +=begin + += What's shell.rb? + +It realizes a wish to do execution of commands with filters and pipes +like sh/csh by using just native facilities of ruby. + += Main classes + +== Shell + +Every shell object has its own current working directory, and executes +each command as if it stands in the directory. + +--- Shell#cwd +--- Shell#dir +--- Shell#getwd +--- Shell#pwd + + Returns the current directory + +--- Shell#system_path + + Returns the command search path in an array + +--- Shell#umask + + Returns the umask + +== Filter + +Any result of command exection is a Filter. Filter include +Enumerable, therefore a Filter object can use all Enumerable +facilities. + += Main methods + +== Command definitions + +In order to execute a command on your OS, you need to define it as a +Shell method. + +Alternatively, you can execute any command via Shell#system even if it +is not defined. + +--- Shell.def_system_command(command, path = command) + + Defines a command. Registers as a Shell method + . + + ex) + Shell.def_system_command "ls" + Defines ls. + + Shell.def_system_command "sys_sort", "sort" + Defines sys_sort as sort. + +--- Shell.undef_system_command(command) + + Undefines a commmand + +--- Shell.alias_command(ali, command, *opts) {...} + + Aliases a command. + + ex) + Shell.alias_command "lsC", "ls", "-CBF", "--show-control-chars" + Shell.alias_command("lsC", "ls"){|*opts| ["-CBF", "--show-control-chars", *opts]} + +--- Shell.unalias_command(ali) + + Unaliases a command. + +--- Shell.install_system_commands(pre = "sys_") + + Defines all commands in the default_system_path as Shell method, + all with
 prefixed to their names.
+
+== Creation
+
+--- Shell.new
+
+      Creates a Shell object which current directory is set to the
+      process current directory.
+
+--- Shell.cd(path)
+
+      Creates a Shell object which current directory is set to
+      .
+
+== Process management
+
+--- Shell#jobs
+
+      Returns a list of scheduled jobs.
+
+--- Shell#kill sig, job
+
+      Sends a signal  to .
+
+== Current directory operations
+
+--- Shell#cd(path, &block)
+--- Shell#chdir
+
+      Changes the current directory to .  If a block is given,
+      it restores the current directory when the block ends.
+
+--- Shell#pushd(path = nil, &block)
+--- Shell#pushdir
+
+      Pushes the current directory to the directory stack, changing
+      the current directory to .  If  is omitted, it
+      exchanges its current directory and the top of its directory
+      stack.  If a block is given, it restores the current directory
+      when the block ends.
+
+--- Shell#popd
+--- Shell#popdir
+
+      Pops a directory from the directory stack, and sets the current
+      directory to it.
+
+== File and directory operations
+
+--- Shell#foreach(path = nil, &block)
+
+      Same as:
+        File#foreach (when path is a file)
+        Dir#foreach (when path is a directory)
+
+--- Shell#open(path, mode)
+
+      Same as:
+        File#open (when path is a file)
+        Dir#open (when path is a directory)
+
+--- Shell#unlink(path)
+
+      Same as:
+        Dir#open (when path is a file)
+        Dir#unlink (when path is a directory)
+
+--- Shell#test(command, file1, file2)
+--- Shell#[command, file1, file2]
+
+      Same as test().
+      ex)
+          sh[?e, "foo"]
+          sh[:e, "foo"]
+          sh["e", "foo"]
+          sh[:exists?, "foo"]
+          sh["exists?", "foo"]
+
+--- Shell#mkdir(*path)
+
+      Same as Dir.mkdir (with multiple directories allowed)
+
+--- Shell#rmdir(*path)
+
+      Same as Dir.rmdir (with multiple directories allowed)
+
+== Command execution
+
+--- System#system(command, *opts)
+
+      Executes  with .
+
+      ex)
+        print sh.system("ls", "-l")
+        sh.system("ls", "-l") | sh.head > STDOUT
+
+--- System#rehash
+
+      Does rehash.
+
+--- Shell#transact &block
+
+      Executes a block as self.
+      ex)
+        sh.transact{system("ls", "-l") | head > STDOUT}
+
+--- Shell#out(dev = STDOUT, &block)
+
+      Does transact, with redirecting the result output to .
+
+== Internal commands
+
+--- Shell#echo(*strings)
+--- Shell#cat(*files)
+--- Shell#glob(patten)
+--- Shell#tee(file)
+
+      Return Filter objects, which are results of their execution.
+
+--- Filter#each &block
+
+      Iterates a block for each line of it.
+
+--- Filter#<(src)
+
+      Inputs from , which is either a string of a file name or an
+      IO.
+
+--- Filter#>(to)
+
+      Outputs to , which is either a string of a file name or an
+      IO.
+
+--- Filter#>>(to)
+
+      Appends the ouput to , which is either a string of a file
+      name or an IO.
+
+--- Filter#|(filter)
+
+      Processes a pipeline.
+
+--- Filter#+(filter)
+
+      (filter1 + filter2) outputs filter1, and then outputs filter2.
+
+--- Filter#to_a
+--- Filter#to_s
+
+== Built-in commands
+
+--- Shell#atime(file)
+--- Shell#basename(file, *opt)
+--- Shell#chmod(mode, *files)
+--- Shell#chown(owner, group, *file)
+--- Shell#ctime(file)
+--- Shell#delete(*file)
+--- Shell#dirname(file)
+--- Shell#ftype(file)
+--- Shell#join(*file)
+--- Shell#link(file_from, file_to)
+--- Shell#lstat(file)
+--- Shell#mtime(file)
+--- Shell#readlink(file)
+--- Shell#rename(file_from, file_to)
+--- Shell#split(file)
+--- Shell#stat(file)
+--- Shell#symlink(file_from, file_to)
+--- Shell#truncate(file, length)
+--- Shell#utime(atime, mtime, *file)
+
+      Equivalent to the class methods of File with the same names.
+
+--- Shell#blockdev?(file)
+--- Shell#chardev?(file)
+--- Shell#directory?(file)
+--- Shell#executable?(file)
+--- Shell#executable_real?(file)
+--- Shell#exist?(file)/Shell#exists?(file)
+--- Shell#file?(file)
+--- Shell#grpowned?(file)
+--- Shell#owned?(file)
+--- Shell#pipe?(file)
+--- Shell#readable?(file)
+--- Shell#readable_real?(file)
+--- Shell#setgid?(file)
+--- Shell#setuid?(file)
+--- Shell#size(file)/Shell#size?(file)
+--- Shell#socket?(file)
+--- Shell#sticky?(file)
+--- Shell#symlink?(file)
+--- Shell#writable?(file)
+--- Shell#writable_real?(file)
+--- Shell#zero?(file)
+
+      Equivalent to the class methods of FileTest with the same names.
+
+--- Shell#syscopy(filename_from, filename_to)
+--- Shell#copy(filename_from, filename_to)
+--- Shell#move(filename_from, filename_to)
+--- Shell#compare(filename_from, filename_to)
+--- Shell#safe_unlink(*filenames)
+--- Shell#makedirs(*filenames)
+--- Shell#install(filename_from, filename_to, mode)
+
+      Equivalent to the class methods of FileTools with the same
+      names.
+
+      And also, there are some aliases for convenience:
+
+--- Shell#cmp	<- Shell#compare
+--- Shell#mv	<- Shell#move
+--- Shell#cp	<- Shell#copy
+--- Shell#rm_f	<- Shell#safe_unlink
+--- Shell#mkpath	<- Shell#makedirs
+
+= Samples
+
+== ex1
+
+  sh = Shell.cd("/tmp")
+  sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
+  sh.cd("shell-test-1")
+  for dir in ["dir1", "dir3", "dir5"]
+    if !sh.exists?(dir)
+      sh.mkdir dir
+      sh.cd(dir) do
+	f = sh.open("tmpFile", "w")
+	f.print "TEST\n"
+	f.close
+      end
+      print sh.pwd
+    end
+  end
+
+== ex2
+
+  sh = Shell.cd("/tmp")
+  sh.transact do
+    mkdir "shell-test-1" unless exists?("shell-test-1")
+    cd("shell-test-1")
+    for dir in ["dir1", "dir3", "dir5"]
+      if !exists?(dir)
+	mkdir dir
+	cd(dir) do
+	  f = open("tmpFile", "w")
+	  f.print "TEST\n"
+	  f.close
+	end
+	print pwd
+      end
+    end
+  end
+
+== ex3
+
+  sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
+  (sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
+  sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
+  (sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"
+
+== ex4
+
+  print sh.cat("/etc/passwd").head.collect{|l| l =~ /keiju/}
+
+=end
diff --git a/lib/ruby-1.9.1-rc1/doc/shell.rd.ja b/lib/ruby-1.9.1-rc1/doc/shell.rd.ja
new file mode 100644
index 0000000..16157e4
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/doc/shell.rd.ja
@@ -0,0 +1,335 @@
+ -- shell.rb
+				$Release Version: 0.6.0 $
+			   	$Revision: 14912 $
+			   	by Keiju ISHITSUKA(keiju@ishitsuka.com)
+
+=begin
+
+= ÌÜŪ
+
+ruby¾å¤Çsh/csh¤Î¤è¤¦¤Ë¥³¥Þ¥ó¥É¤Î¼Â¹ÔµÚ¤Ó¥Õ¥£¥ë¥¿¥ê¥ó¥°¤ò¼ê·Ú¤Ë¹Ô¤¦.
+sh/csh¤ÎÀ©¸æʸ¤Ïruby¤Îµ¡Ç½¤òÍѤ¤¤Æ¼Â¸½¤¹¤ë.
+
+= ¼ç¤Ê¥¯¥é¥¹°ìÍ÷
+
+== Shell
+
+Shell¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ò»ý¤Á, ¥³¥Þ¥ó¥É¼Â¹Ô¤Ï¤½¤³¤«¤é¤Î
+ÁêÂХѥ¹¤Ë¤Ê¤ê¤Þ¤¹.
+
+--- Shell#cwd
+--- Shell#dir
+--- Shell#getwd
+--- Shell#pwd
+
+      ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òÊÖ¤¹¡£
+
+--- Shell#system_path
+
+      ¥³¥Þ¥ó¥É¥µ¡¼¥Á¥Ñ¥¹¤ÎÇÛÎó¤òÊÖ¤¹¡£
+
+--- Shell#umask
+
+      umask¤òÊÖ¤¹¡£
+
+== Filter
+
+¥³¥Þ¥ó¥É¤Î¼Â¹Ô·ë²Ì¤Ï¤¹¤Ù¤ÆFilter¤È¤·¤Æ¤«¤¨¤ê¤Þ¤¹. Enumerable¤òinclude¤·
+¤Æ¤¤¤Þ¤¹.
+
+= ¼ç¤Ê¥á¥½¥Ã¥É°ìÍ÷
+
+== ¥³¥Þ¥ó¥ÉÄêµÁ
+
+OS¾å¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤Ë¤Ï¤Þ¤º, Shell¤Î¥á¥½¥Ã¥É¤È¤·¤ÆÄêµÁ¤·¤Þ¤¹.
+
+Ãí) ¥³¥Þ¥ó¥É¤òÄêµÁ¤·¤Ê¤¯¤È¤âľÀܼ¹ԤǤ­¤ëShell#system¥³¥Þ¥ó¥É¤â¤¢¤ê¤Þ¤¹.
+
+--- Shell.def_system_command(command, path = command)
+
+      Shell¤Î¥á¥½¥Ã¥É¤È¤·¤Æcommand¤òÅÐÏ¿¤·¤Þ¤¹. 
+
+      Îã)
+      Shell.def_system_command "ls"
+        ls ¤òÄêµÁ
+
+      Shell.def_system_command "sys_sort", "sort"
+        sort¥³¥Þ¥ó¥É¤òsys_sort¤È¤·¤ÆÄêµÁ
+
+--- Shell.undef_system_command(command)
+
+      command¤òºï½ü¤·¤Þ¤¹.
+
+--- Shell.alias_command(ali, command, *opts) {...}
+
+      command¤Îalias¤ò¤·¤Þ¤¹. 
+
+      Îã)
+        Shell.alias_command "lsC", "ls", "-CBF", "--show-control-chars"
+        Shell.alias_command("lsC", "ls"){|*opts| ["-CBF", "--show-control-chars", *opts]}
+
+--- Shell.unalias_command(ali)
+
+      command¤Îalias¤òºï½ü¤·¤Þ¤¹.
+
+--- Shell.install_system_commands(pre = "sys_")
+
+      system_path¾å¤Ë¤¢¤ëÁ´¤Æ¤Î¼Â¹Ô²Äǽ¥Õ¥¡¥¤¥ë¤òShell¤ËÄêµÁ¤¹¤ë. ¥á¥½¥Ã
+      ¥É̾¤Ï¸µ¤Î¥Õ¥¡¥¤¥ë̾¤ÎƬ¤Ëpre¤ò¤Ä¤±¤¿¤â¤Î¤È¤Ê¤ë.
+
+== À¸À®
+
+--- Shell.new
+
+      ¥×¥í¥»¥¹¤Î¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ò¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤È¤¹¤ëShell¥ª
+      ¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹.
+
+--- Shell.cd(path)
+
+      path¤ò¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤È¤¹¤ëShell¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹.
+
+== ¥×¥í¥»¥¹´ÉÍý
+
+--- Shell#jobs
+
+      ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤µ¤ì¤Æ¤¤¤ëjob¤Î°ìÍ÷¤òÊÖ¤¹.
+
+--- Shell#kill sig, job
+
+      job¤Ë¥·¥°¥Ê¥ësig¤òÁ÷¤ë
+
+== ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥êÁàºî
+
+--- Shell#cd(path, &block)
+--- Shell#chdir
+
+      ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òpath¤Ë¤¹¤ë. ¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ¸Æ¤Ð¤ì¤¿¤È¤­¤Ë¤Ï
+      ¥Ö¥í¥Ã¥¯¼Â¹ÔÃæ¤Î¤ß¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤¹¤ë.
+
+--- Shell#pushd(path = nil, &block)
+--- Shell#pushdir
+
+      ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤ò¥Ç¥£¥ì¥¯¥È¥ê¥¹¥¿¥Ã¥¯¤Ë¤Ä¤ß, ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯
+      ¥È¥ê¤òpath¤Ë¤¹¤ë. path¤¬¾Êά¤µ¤ì¤¿¤È¤­¤Ë¤Ï, ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤È
+      ¥Ç¥£¥ì¥¯¥È¥ê¥¹¥¿¥Ã¥¯¤Î¥È¥Ã¥×¤ò¸ò´¹¤¹¤ë. ¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ¸Æ¤Ð¤ì¤¿¤È
+      ¤­¤Ë¤Ï, ¥Ö¥í¥Ã¥¯¼Â¹ÔÃæ¤Î¤ßpushd¤¹¤ë.
+
+--- Shell#popd
+--- Shell#popdir
+
+      ¥Ç¥£¥ì¥¯¥È¥ê¥¹¥¿¥Ã¥¯¤«¤é¥Ý¥Ã¥×¤·, ¤½¤ì¤ò¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¹¤ë.
+
+== ¥Õ¥¡¥¤¥ë/¥Ç¥£¥ì¥¯¥È¥êÁàºî
+
+--- Shell#foreach(path = nil, &block)
+
+      path¤¬¥Õ¥¡¥¤¥ë¤Ê¤é, File#foreach
+      path¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ê¤é, Dir#foreach
+
+--- Shell#open(path, mode)
+
+      path¤¬¥Õ¥¡¥¤¥ë¤Ê¤é, File#open
+      path¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ê¤é, Dir#open
+
+--- Shell#unlink(path)
+
+      path¤¬¥Õ¥¡¥¤¥ë¤Ê¤é, File#unlink
+      path¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ê¤é, Dir#unlink
+
+--- Shell#test(command, file1, file2)
+--- Shell#[command, file1, file2]
+
+      ¥Õ¥¡¥¤¥ë¥Æ¥¹¥È´Ø¿ôtest¤ÈƱ¤¸. 
+      Îã)
+          sh[?e, "foo"]
+          sh[:e, "foo"]
+          sh["e", "foo"]
+          sh[:exists?, "foo"]
+          sh["exists?", "foo"]
+
+--- Shell#mkdir(*path)
+
+      Dir.mkdir¤ÈƱ¤¸(Ê£¿ô²Ä)
+
+--- Shell#rmdir(*path)
+
+      Dir.rmdir¤ÈƱ¤¸(Ê£¿ô²Ä)
+
+== ¥³¥Þ¥ó¥É¼Â¹Ô
+
+--- System#system(command, *opts)
+
+      command¤ò¼Â¹Ô¤¹¤ë.
+      Îã)
+        print sh.system("ls", "-l")
+        sh.system("ls", "-l") | sh.head > STDOUT
+
+--- System#rehash
+
+      ¥ê¥Ï¥Ã¥·¥å¤¹¤ë
+
+--- Shell#transact &block
+
+      ¥Ö¥í¥Ã¥¯Ãæ¤Ç¤Ïshell¤òself¤È¤·¤Æ¼Â¹Ô¤¹¤ë.
+      Îã)
+        sh.transact{system("ls", "-l") | head > STDOUT}
+
+--- Shell#out(dev = STDOUT, &block)
+
+      transact¤ò¸Æ¤Ó½Ð¤·¤½¤Î·ë²Ì¤òdev¤Ë½ÐÎϤ¹¤ë.
+
+== ÆâÉô¥³¥Þ¥ó¥É
+
+--- Shell#echo(*strings)
+--- Shell#cat(*files)
+--- Shell#glob(patten)
+--- Shell#tee(file)
+
+      ¤³¤ì¤é¤Ï¼Â¹Ô¤¹¤ë¤È, ¤½¤ì¤é¤òÆâÍƤȤ¹¤ëFilter¥ª¥Ö¥¸¥§¥¯¥È¤òÊÖ¤·¤Þ¤¹. 
+
+--- Filter#each &block
+
+      ¥Õ¥£¥ë¥¿¤Î°ì¹Ô¤º¤Ä¤òblock¤ËÅϤ¹.
+
+--- Filter#<(src)
+
+      src¤ò¥Õ¥£¥ë¥¿¤ÎÆþÎϤȤ¹¤ë. src¤¬, ʸ»úÎó¤Ê¤é¤Ð¥Õ¥¡¥¤¥ë¤ò, IO¤Ç¤¢¤ì
+      ¤Ð¤½¤ì¤ò¤½¤Î¤Þ¤ÞÆþÎϤȤ¹¤ë.
+
+--- Filter#>(to)
+
+      src¤ò¥Õ¥£¥ë¥¿¤Î½ÐÎϤȤ¹¤ë. to¤¬, ʸ»úÎó¤Ê¤é¤Ð¥Õ¥¡¥¤¥ë¤Ë, IO¤Ç¤¢¤ì
+      ¤Ð¤½¤ì¤ò¤½¤Î¤Þ¤Þ½ÐÎϤȤ¹¤ë.
+
+--- Filter#>>(to)
+
+      src¤ò¥Õ¥£¥ë¥¿¤ËÄɲ乤ë. to¤¬, ʸ»úÎó¤Ê¤é¤Ð¥Õ¥¡¥¤¥ë¤Ë, IO¤Ç¤¢¤ì¤Ð
+      ¤½¤ì¤ò¤½¤Î¤Þ¤Þ½ÐÎϤȤ¹¤ë.
+
+--- Filter#|(filter)
+
+      ¥Ñ¥¤¥×·ë¹ç
+
+--- Filter#+(filter)
+
+      filter1 + filter2 ¤Ï filter1¤Î½ÐÎϤθå, filter2¤Î½ÐÎϤò¹Ô¤¦.
+
+--- Filter#to_a
+--- Filter#to_s
+
+== Áȹþ¤ß¥³¥Þ¥ó¥É
+
+--- Shell#atime(file)
+--- Shell#basename(file, *opt)
+--- Shell#chmod(mode, *files)
+--- Shell#chown(owner, group, *file)
+--- Shell#ctime(file)
+--- Shell#delete(*file)
+--- Shell#dirname(file)
+--- Shell#ftype(file)
+--- Shell#join(*file)
+--- Shell#link(file_from, file_to)
+--- Shell#lstat(file)
+--- Shell#mtime(file)
+--- Shell#readlink(file)
+--- Shell#rename(file_from, file_to)
+--- Shell#split(file)
+--- Shell#stat(file)
+--- Shell#symlink(file_from, file_to)
+--- Shell#truncate(file, length)
+--- Shell#utime(atime, mtime, *file)
+
+      ¤³¤ì¤é¤ÏFile¥¯¥é¥¹¤Ë¤¢¤ëƱ̾¤Î¥¯¥é¥¹¥á¥½¥Ã¥É¤ÈƱ¤¸¤Ç¤¹.
+
+--- Shell#blockdev?(file)
+--- Shell#chardev?(file)
+--- Shell#directory?(file)
+--- Shell#executable?(file)
+--- Shell#executable_real?(file)
+--- Shell#exist?(file)/Shell#exists?(file)
+--- Shell#file?(file)
+--- Shell#grpowned?(file)
+--- Shell#owned?(file)
+--- Shell#pipe?(file)
+--- Shell#readable?(file)
+--- Shell#readable_real?(file)
+--- Shell#setgid?(file)
+--- Shell#setuid?(file)
+--- Shell#size(file)/Shell#size?(file)
+--- Shell#socket?(file)
+--- Shell#sticky?(file)
+--- Shell#symlink?(file)
+--- Shell#writable?(file)
+--- Shell#writable_real?(file)
+--- Shell#zero?(file)
+
+      ¤³¤ì¤é¤ÏFileTest¥¯¥é¥¹¤Ë¤¢¤ëƱ̾¤Î¥¯¥é¥¹¥á¥½¥Ã¥É¤ÈƱ¤¸¤Ç¤¹.
+
+--- Shell#syscopy(filename_from, filename_to)
+--- Shell#copy(filename_from, filename_to)
+--- Shell#move(filename_from, filename_to)
+--- Shell#compare(filename_from, filename_to)
+--- Shell#safe_unlink(*filenames)
+--- Shell#makedirs(*filenames)
+--- Shell#install(filename_from, filename_to, mode)
+
+      ¤³¤ì¤é¤ÏFileTools¥¯¥é¥¹¤Ë¤¢¤ëƱ̾¤Î¥¯¥é¥¹¥á¥½¥Ã¥É¤ÈƱ¤¸¤Ç¤¹.
+
+      ¤½¤Î¾, °Ê²¼¤Î¤â¤Î¤¬¥¨¥¤¥ê¥¢¥¹¤µ¤ì¤Æ¤¤¤Þ¤¹.
+
+--- Shell#cmp	<- Shell#compare
+--- Shell#mv	<- Shell#move
+--- Shell#cp	<- Shell#copy
+--- Shell#rm_f	<- Shell#safe_unlink
+--- Shell#mkpath	<- Shell#makedirs
+
+= ¥µ¥ó¥×¥ë
+
+== ex1
+
+  sh = Shell.cd("/tmp")
+  sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
+  sh.cd("shell-test-1")
+  for dir in ["dir1", "dir3", "dir5"]
+    if !sh.exists?(dir)
+      sh.mkdir dir
+      sh.cd(dir) do
+	f = sh.open("tmpFile", "w")
+	f.print "TEST\n"
+	f.close
+      end
+      print sh.pwd
+    end
+  end
+
+== ex2
+
+  sh = Shell.cd("/tmp")
+  sh.transact do
+    mkdir "shell-test-1" unless exists?("shell-test-1")
+    cd("shell-test-1")
+    for dir in ["dir1", "dir3", "dir5"]
+      if !exists?(dir)
+	mkdir dir
+	cd(dir) do
+	  f = open("tmpFile", "w")
+	  f.print "TEST\n"
+	  f.close
+	end
+	print pwd
+      end
+    end
+  end
+
+== ex3
+
+  sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
+  (sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
+  sh.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
+  (sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"
+
+== ex4
+
+  print sh.cat("/etc/passwd").head.collect{|l| l =~ /keiju/}
+
+=end
diff --git a/lib/ruby-1.9.1-rc1/enc.mk b/lib/ruby-1.9.1-rc1/enc.mk
new file mode 100644
index 0000000..33ad1cb
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc.mk
@@ -0,0 +1,390 @@
+encsrcdir = ./enc
+topdir = .
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+top_srcdir = $(encsrcdir:/enc=)
+srcdir = $(top_srcdir)
+arch = @arch@
+EXTOUT = tmp
+hdrdir = $(srcdir)/include
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+ENCSODIR =
+TRANSSODIR =
+DLEXT = @DLEXT@
+OBJEXT = o
+
+BUILTIN_ENCS	= ascii.c us_ascii.c\
+		  unicode.c utf_8.c
+
+BUILTIN_TRANSES	= newline.trans
+
+RUBY_SO_NAME = 
+LIBRUBY = liburyb.a
+LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
+LIBRUBYARG_STATIC = $(LIBRUBYARG_SHARED)
+
+empty =
+CC = @CC@
+OUTFLAG = @OUTFLAG@$(empty)
+COUTFLAG = @COUTFLAG@$(empty)
+CFLAGS = $(CCDLFLAGS)  
+cflags = @cflags@
+optflags = @optflags@
+debugflags = @debugflags@
+warnflags = @warnflags@
+CCDLFLAGS = @CCDLFLAGS@
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
+DEFS = @DEFS@
+CPPFLAGS =  -DONIG_ENC_REGISTER=rb_enc_register
+LDFLAGS = 
+LDSHARED = @LDSHARED@
+ldflags  = $(LDFLAGS)
+dldflags = 
+archflag = 
+DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
+RUBY     = $(MINIRUBY)
+
+WORKDIRS = $(ENCSODIR) $(TRANSSODIR) enc enc/trans
+
+RM = rm -f
+MAKEDIRS = @$(MINIRUBY) -run -e mkdir -- -p
+
+.SUFFIXES: .trans
+
+all: make-workdir
+
+make-workdir:
+	$(MAKEDIRS) $(WORKDIRS)
+
+clean:
+
+distclean: clean clean-srcs
+	@$(RM) enc.mk
+
+#### depend ####
+
+.SUFFIXES: .trans .c
+
+
+VPATH = $(arch_hdrdir)/ruby$(hdrdir)/ruby$(srcdir)$(encsrcdir)
+LIBPATH =  -L"." -L"$(topdir)"
+LIBS =   $(EXTLIBS)
+
+ENCOBJS =
+
+ENCSOS =
+
+ENCCLEANLIBS = 
+ENCCLEANOBJS = 
+
+TRANSVPATH = $(srcdir)/enc/trans
+
+TRANSCSRCS = enc/trans/escape.c \
+	     enc/trans/iso2022.c \
+	     enc/trans/japanese.c \
+	     enc/trans/japanese_euc.c \
+	     enc/trans/japanese_sjis.c \
+	     enc/trans/korean.c \
+	     enc/trans/newline.c \
+	     enc/trans/single_byte.c \
+	     enc/trans/utf_16_32.c
+
+TRANSOBJS =
+
+TRANSSOS =
+
+TRANSCLEANLIBS = 
+TRANSCLEANOBJS = 
+
+encs: all
+all: enc trans
+enc: $(ENCSOS)
+trans: $(TRANSSOS)
+
+srcs: $(TRANSCSRCS)
+
+.c.$(OBJEXT):
+	-@$(MAKEDIRS) "$(@D)"
+	$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
+
+
+.trans.c:
+	$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<"
+
+
+$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
+$(TRANSOBJS): ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma.h st.h transcode_data.h
+
+enc/trans/escape.c: enc/trans/escape.trans
+enc/trans/escape.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/iso2022.c: enc/trans/iso2022.trans
+enc/trans/iso2022.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/japanese.c: enc/trans/japanese.trans
+enc/trans/japanese.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/japanese_euc.c: enc/trans/japanese_euc.trans
+enc/trans/japanese_euc.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/japanese_sjis.c: enc/trans/japanese_sjis.trans
+enc/trans/japanese_sjis.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/korean.c: enc/trans/korean.trans
+enc/trans/korean.c: enc/trans/euckr-tbl.rb enc/trans/cp949-tbl.rb $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/newline.c: enc/trans/newline.trans
+enc/trans/newline.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/single_byte.c: enc/trans/single_byte.trans
+enc/trans/single_byte.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+enc/trans/utf_16_32.c: enc/trans/utf_16_32.trans
+enc/trans/utf_16_32.c:  $(srcdir)/tool/transcode-tblgen.rb
+
+$(ENCSODIR)/encdb.$(DLEXT): enc/encdb.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/encdb.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/ascii.$(DLEXT): enc/ascii.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/ascii.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/big5.$(DLEXT): enc/big5.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/big5.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/cp949.$(DLEXT): enc/cp949.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/cp949.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/emacs_mule.$(DLEXT): enc/emacs_mule.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/emacs_mule.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/euc_jp.$(DLEXT): enc/euc_jp.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/euc_jp.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/euc_kr.$(DLEXT): enc/euc_kr.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/euc_kr.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/euc_tw.$(DLEXT): enc/euc_tw.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/euc_tw.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/gb2312.$(DLEXT): enc/gb2312.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/gb2312.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/gb18030.$(DLEXT): enc/gb18030.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/gb18030.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/gbk.$(DLEXT): enc/gbk.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/gbk.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_1.$(DLEXT): enc/iso_8859_1.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_1.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_2.$(DLEXT): enc/iso_8859_2.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_2.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_3.$(DLEXT): enc/iso_8859_3.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_3.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_4.$(DLEXT): enc/iso_8859_4.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_4.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_5.$(DLEXT): enc/iso_8859_5.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_5.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_6.$(DLEXT): enc/iso_8859_6.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_6.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_7.$(DLEXT): enc/iso_8859_7.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_7.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_8.$(DLEXT): enc/iso_8859_8.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_8.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_9.$(DLEXT): enc/iso_8859_9.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_9.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_10.$(DLEXT): enc/iso_8859_10.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_10.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_11.$(DLEXT): enc/iso_8859_11.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_11.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_13.$(DLEXT): enc/iso_8859_13.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_13.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_14.$(DLEXT): enc/iso_8859_14.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_14.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_15.$(DLEXT): enc/iso_8859_15.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_15.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/iso_8859_16.$(DLEXT): enc/iso_8859_16.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/iso_8859_16.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/koi8_r.$(DLEXT): enc/koi8_r.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/koi8_r.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/koi8_u.$(DLEXT): enc/koi8_u.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/koi8_u.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/shift_jis.$(DLEXT): enc/shift_jis.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/shift_jis.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/unicode.$(DLEXT): enc/unicode.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/unicode.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/us_ascii.$(DLEXT): enc/us_ascii.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/us_ascii.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/utf_8.$(DLEXT): enc/utf_8.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/utf_8.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/utf_16be.$(DLEXT): enc/utf_16be.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/utf_16be.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/utf_16le.$(DLEXT): enc/utf_16le.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/utf_16le.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/utf_32be.$(DLEXT): enc/utf_32be.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/utf_32be.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/utf_32le.$(DLEXT): enc/utf_32le.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/utf_32le.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/windows_1251.$(DLEXT): enc/windows_1251.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/windows_1251.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/transdb.$(DLEXT): enc/trans/transdb.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/transdb.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/escape.$(DLEXT): enc/trans/escape.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/escape.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/iso2022.$(DLEXT): enc/trans/iso2022.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/iso2022.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/japanese.$(DLEXT): enc/trans/japanese.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/japanese.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/japanese_euc.$(DLEXT): enc/trans/japanese_euc.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/japanese_euc.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/japanese_sjis.$(DLEXT): enc/trans/japanese_sjis.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/japanese_sjis.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/korean.$(DLEXT): enc/trans/korean.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/korean.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/newline.$(DLEXT): enc/trans/newline.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/newline.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/single_byte.$(DLEXT): enc/trans/single_byte.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/single_byte.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+$(ENCSODIR)/trans/utf_16_32.$(DLEXT): enc/trans/utf_16_32.$(OBJEXT)
+	@$(MAKEDIRS) "$(@D)"
+	$(LDSHARED) $@ enc/trans/utf_16_32.$(OBJEXT) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+enc/encdb.$(OBJEXT): enc/encdb.c
+enc/ascii.$(OBJEXT): enc/ascii.c
+enc/big5.$(OBJEXT): enc/big5.c
+enc/cp949.$(OBJEXT): enc/cp949.c
+enc/emacs_mule.$(OBJEXT): enc/emacs_mule.c
+enc/euc_jp.$(OBJEXT): enc/euc_jp.c
+enc/euc_kr.$(OBJEXT): enc/euc_kr.c
+enc/euc_tw.$(OBJEXT): enc/euc_tw.c
+enc/gb2312.$(OBJEXT): enc/gb2312.c
+enc/gb18030.$(OBJEXT): enc/gb18030.c
+enc/gbk.$(OBJEXT): enc/gbk.c
+enc/iso_8859_1.$(OBJEXT): enc/iso_8859_1.c
+enc/iso_8859_2.$(OBJEXT): enc/iso_8859_2.c
+enc/iso_8859_3.$(OBJEXT): enc/iso_8859_3.c
+enc/iso_8859_4.$(OBJEXT): enc/iso_8859_4.c
+enc/iso_8859_5.$(OBJEXT): enc/iso_8859_5.c
+enc/iso_8859_6.$(OBJEXT): enc/iso_8859_6.c
+enc/iso_8859_7.$(OBJEXT): enc/iso_8859_7.c
+enc/iso_8859_8.$(OBJEXT): enc/iso_8859_8.c
+enc/iso_8859_9.$(OBJEXT): enc/iso_8859_9.c
+enc/iso_8859_10.$(OBJEXT): enc/iso_8859_10.c
+enc/iso_8859_11.$(OBJEXT): enc/iso_8859_11.c
+enc/iso_8859_13.$(OBJEXT): enc/iso_8859_13.c
+enc/iso_8859_14.$(OBJEXT): enc/iso_8859_14.c
+enc/iso_8859_15.$(OBJEXT): enc/iso_8859_15.c
+enc/iso_8859_16.$(OBJEXT): enc/iso_8859_16.c
+enc/koi8_r.$(OBJEXT): enc/koi8_r.c
+enc/koi8_u.$(OBJEXT): enc/koi8_u.c
+enc/shift_jis.$(OBJEXT): enc/shift_jis.c
+enc/unicode.$(OBJEXT): enc/unicode.c
+enc/us_ascii.$(OBJEXT): enc/us_ascii.c
+enc/utf_8.$(OBJEXT): enc/utf_8.c
+enc/utf_16be.$(OBJEXT): enc/utf_16be.c
+enc/utf_16le.$(OBJEXT): enc/utf_16le.c
+enc/utf_32be.$(OBJEXT): enc/utf_32be.c
+enc/utf_32le.$(OBJEXT): enc/utf_32le.c
+enc/windows_1251.$(OBJEXT): enc/windows_1251.c
+enc/trans/transdb.$(OBJEXT): enc/trans/transdb.c
+enc/trans/escape.$(OBJEXT): enc/trans/escape.c
+enc/trans/iso2022.$(OBJEXT): enc/trans/iso2022.c
+enc/trans/japanese.$(OBJEXT): enc/trans/japanese.c
+enc/trans/japanese_euc.$(OBJEXT): enc/trans/japanese_euc.c
+enc/trans/japanese_sjis.$(OBJEXT): enc/trans/japanese_sjis.c
+enc/trans/korean.$(OBJEXT): enc/trans/korean.c
+enc/trans/newline.$(OBJEXT): enc/trans/newline.c
+enc/trans/single_byte.$(OBJEXT): enc/trans/single_byte.c
+enc/trans/utf_16_32.$(OBJEXT): enc/trans/utf_16_32.c
+
+enc/encdb.$(OBJEXT): encdb.h
+enc/trans/transdb.$(OBJEXT): transdb.h
+
+clean:
+
+clean-srcs:
+	@$(RM) $(TRANSCSRCS)
+	@-rmdir enc/trans
+	@-rmdir enc
diff --git a/lib/ruby-1.9.1-rc1/enc/Makefile.in b/lib/ruby-1.9.1-rc1/enc/Makefile.in
new file mode 100644
index 0000000..8ba04f3
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/Makefile.in
@@ -0,0 +1,63 @@
+encsrcdir = @srcdir@
+topdir = .
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+top_srcdir = $(encsrcdir:/enc=)
+srcdir = $(top_srcdir)
+arch = @arch@
+EXTOUT = @EXTOUT@
+hdrdir = $(srcdir)/include
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+ENCSODIR = $(EXTOUT)/$(arch)/enc
+TRANSSODIR = $(ENCSODIR)/trans
+DLEXT = @DLEXT@
+OBJEXT = @OBJEXT@
+
+BUILTIN_ENCS	= ascii.c us_ascii.c\
+		  unicode.c utf_8.c
+
+BUILTIN_TRANSES	= newline.trans
+
+RUBY_SO_NAME = @RUBY_SO_NAME@
+LIBRUBY = @LIBRUBY@
+LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
+LIBRUBYARG_STATIC = $(LIBRUBYARG_SHARED)
+
+empty =
+CC = @CC@
+OUTFLAG = @OUTFLAG@$(empty)
+COUTFLAG = @COUTFLAG@$(empty)
+CFLAGS = $(CCDLFLAGS) @CFLAGS@ @ARCH_FLAG@
+cflags = @cflags@
+optflags = @optflags@
+debugflags = @debugflags@
+warnflags = @warnflags@
+CCDLFLAGS = @CCDLFLAGS@
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@ -DONIG_ENC_REGISTER=rb_enc_register
+LDFLAGS = @LDFLAGS@
+LDSHARED = @LDSHARED@
+ldflags  = $(LDFLAGS)
+dldflags = @DLDFLAGS@
+archflag = @ARCH_FLAG@
+DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
+RUBY     = $(MINIRUBY)
+
+WORKDIRS = $(ENCSODIR) $(TRANSSODIR) enc enc/trans
+
+RM = @RM@
+MAKEDIRS = @MAKEDIRS@
+
+.SUFFIXES: .trans
+
+all: make-workdir
+
+make-workdir:
+	$(MAKEDIRS) $(WORKDIRS)
+
+clean:
+
+distclean: clean clean-srcs
+	@$(RM) enc.mk
diff --git a/lib/ruby-1.9.1-rc1/enc/ascii.c b/lib/ruby-1.9.1-rc1/enc/ascii.c
new file mode 100644
index 0000000..3d62ec9
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/ascii.c
@@ -0,0 +1,93 @@
+/**********************************************************************
+  ascii.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2006  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+OnigEncodingDefine(ascii, ASCII) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ASCII-8BIT",/* name */
+  1,           /* max byte length */
+  1,           /* min byte length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  onigenc_ascii_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  onigenc_ascii_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("BINARY", "ASCII-8BIT")
+ENC_REPLICATE("IBM437", "ASCII-8BIT")
+ENC_ALIAS("CP437", "IBM437")
+ENC_REPLICATE("IBM737", "ASCII-8BIT")
+ENC_ALIAS("CP737", "IBM737")
+ENC_REPLICATE("IBM775", "ASCII-8BIT")
+ENC_ALIAS("CP775", "IBM775")
+ENC_REPLICATE("CP850", "ASCII-8BIT")
+ENC_ALIAS("IBM850", "CP850")
+ENC_REPLICATE("IBM852", "ASCII-8BIT")
+ENC_REPLICATE("CP852", "IBM852")
+ENC_REPLICATE("IBM855", "ASCII-8BIT")
+ENC_REPLICATE("CP855", "IBM855")
+ENC_REPLICATE("IBM857", "ASCII-8BIT")
+ENC_ALIAS("CP857", "IBM857")
+ENC_REPLICATE("IBM860", "ASCII-8BIT")
+ENC_ALIAS("CP860", "IBM860")
+ENC_REPLICATE("IBM861", "ASCII-8BIT")
+ENC_ALIAS("CP861", "IBM861")
+ENC_REPLICATE("IBM862", "ASCII-8BIT")
+ENC_ALIAS("CP862", "IBM862")
+ENC_REPLICATE("IBM863", "ASCII-8BIT")
+ENC_ALIAS("CP863", "IBM863")
+ENC_REPLICATE("IBM864", "ASCII-8BIT")
+ENC_ALIAS("CP864", "IBM864")
+ENC_REPLICATE("IBM865", "ASCII-8BIT")
+ENC_ALIAS("CP865", "IBM865")
+ENC_REPLICATE("IBM866", "ASCII-8BIT")
+ENC_ALIAS("CP866", "IBM866")
+ENC_REPLICATE("IBM869", "ASCII-8BIT")
+ENC_ALIAS("CP869", "IBM869")
+ENC_REPLICATE("Windows-1258", "ASCII-8BIT")
+ENC_ALIAS("CP1258", "Windows-1258")
+ENC_REPLICATE("GB1988", "ASCII-8BIT")
+ENC_REPLICATE("macCentEuro", "ASCII-8BIT")
+ENC_REPLICATE("macCroatian", "ASCII-8BIT")
+ENC_REPLICATE("macCyrillic", "ASCII-8BIT")
+ENC_REPLICATE("macGreek", "ASCII-8BIT")
+ENC_REPLICATE("macIceland", "ASCII-8BIT")
+ENC_REPLICATE("macRoman", "ASCII-8BIT")
+ENC_REPLICATE("macRomania", "ASCII-8BIT")
+ENC_REPLICATE("macThai", "ASCII-8BIT")
+ENC_REPLICATE("macTurkish", "ASCII-8BIT")
+ENC_REPLICATE("macUkraine", "ASCII-8BIT")
diff --git a/lib/ruby-1.9.1-rc1/enc/big5.c b/lib/ruby-1.9.1-rc1/enc/big5.c
new file mode 100644
index 0000000..9993f47
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/big5.c
@@ -0,0 +1,216 @@
+/**********************************************************************
+  big5.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static const int EncLen_BIG5[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+big5_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_BIG5[firstbyte]-1);
+  s = trans[s][*p++];
+  RETURN(2);
+#undef RETURN
+}
+
+static OnigCodePoint
+big5_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_to_code(enc, p, end);
+}
+
+static int
+big5_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb2_code_to_mbc(enc, code, buf);
+}
+
+static int
+big5_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                   UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+big5_is_mbc_ambiguous(OnigCaseFoldType flag,
+		      const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+big5_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb2_is_code_ctype(enc, code, ctype);
+}
+
+static const char BIG5_CAN_BE_TRAIL_TABLE[256] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
+};
+
+#define BIG5_ISMB_FIRST(byte)  (EncLen_BIG5[byte] > 1)
+#define BIG5_ISMB_TRAIL(byte)  BIG5_CAN_BE_TRAIL_TABLE[(byte)]
+
+static UChar*
+big5_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  if (BIG5_ISMB_TRAIL(*p)) {
+    while (p > start) {
+      if (! BIG5_ISMB_FIRST(*--p)) {
+	p++;
+	break;
+      }
+    } 
+  }
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+
+  return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE);
+}
+
+OnigEncodingDefine(big5, BIG5) = {
+  big5_mbc_enc_len,
+  "Big5",     /* name */
+  2,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  big5_mbc_to_code,
+  onigenc_mb2_code_to_mbclen,
+  big5_code_to_mbc,
+  big5_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  big5_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  big5_left_adjust_char_head,
+  big5_is_allowed_reverse_match
+};
+ENC_ALIAS("CP950", "BIG5")
diff --git a/lib/ruby-1.9.1-rc1/enc/cp949.c b/lib/ruby-1.9.1-rc1/enc/cp949.c
new file mode 100644
index 0000000..009443a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/cp949.c
@@ -0,0 +1,219 @@
+/**********************************************************************
+  cp949.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static const int EncLen_CP949[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+static const char CP949_CAN_BE_TRAIL_TABLE[256] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
+};
+
+#define CP949_ISMB_FIRST(byte)  (EncLen_CP949[byte] > 1)
+#define CP949_ISMB_TRAIL(byte)  CP949_CAN_BE_TRAIL_TABLE[(byte)]
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ A, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, F, F, F, F, F,
+    /* 6 */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, F, F, F, F, F,
+    /* 8 */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 9 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+cp949_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_CP949[firstbyte]-1);
+  s = trans[s][*p++];
+  RETURN(2);
+#undef RETURN
+}
+
+static OnigCodePoint
+cp949_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_to_code(enc, p, end);
+}
+
+static int
+cp949_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb2_code_to_mbc(enc, code, buf);
+}
+
+static int
+cp949_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                    UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+cp949_is_mbc_ambiguous(OnigCaseFoldType flag,
+		       const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+cp949_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb2_is_code_ctype(enc, code, ctype);
+}
+
+static UChar*
+cp949_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  if (CP949_ISMB_TRAIL(*p)) {
+    while (p > start) {
+      if (! CP949_ISMB_FIRST(*--p)) {
+	p++;
+	break;
+      }
+    } 
+  }
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+cp949_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  return (CP949_ISMB_TRAIL(c) ? FALSE : TRUE);
+}
+
+OnigEncodingDefine(cp949, CP949) = {
+  cp949_mbc_enc_len,
+  "CP949",      /* name */
+  2,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  cp949_mbc_to_code,
+  onigenc_mb2_code_to_mbclen,
+  cp949_code_to_mbc,
+  cp949_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  cp949_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  cp949_left_adjust_char_head,
+  cp949_is_allowed_reverse_match
+};
+/*
+ * Name: CP949
+ * Link: http://www.microsoft.com/globaldev/reference/dbcs/949.mspx
+ * Link: http://en.wikipedia.org/wiki/EUC-KR#EUC-KR
+ */
diff --git a/lib/ruby-1.9.1-rc1/enc/depend b/lib/ruby-1.9.1-rc1/enc/depend
new file mode 100644
index 0000000..0cc0033
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/depend
@@ -0,0 +1,142 @@
+% enable_shared = CONFIG['ENABLE_SHARED'] == 'yes'
+% deffile = (true if /\$\(DEFFILE\)/ =~ CONFIG["LINK_SO"])
+% encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS
+% encs.each {|e| e.chomp!(".c")}
+% encs.reject! {|e| !ENC_PATTERNS.any? {|p| File.fnmatch?(p, e)}} if !ENC_PATTERNS.empty?
+% encs.reject! {|e| NOENC_PATTERNS.any? {|p| File.fnmatch?(p, e)}}
+% alphanumeric_order = proc {|e| e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten}
+% encs = encs.sort_by(&alphanumeric_order)
+% encs.unshift(encs.delete("encdb"))
+% atrans = []
+% trans = Dir.open($srcdir+"/trans") {|d|
+%   d.select {|e|
+%     if e.chomp!('.trans')
+%       atrans << e
+%       true
+%     elsif e.chomp!('.c')
+%       true
+%     end
+%   }
+% }
+% trans -= BUILTIN_TRANSES
+% atrans -= BUILTIN_TRANSES
+% trans.uniq!
+% atrans = atrans.sort_by(&alphanumeric_order)
+% trans = trans.sort_by(&alphanumeric_order)
+% trans.unshift(trans.delete("transdb"))
+% trans.compact!
+% trans |= atrans
+% trans.map! {|e| "trans/#{e}"}
+% dependencies = encs + trans
+% cleanlibs = Shellwords.shellwords(CONFIG["cleanlibs"] || "")
+% cleanobjs = Shellwords.shellwords(CONFIG["cleanobjs"] || "")
+% rule_subst = CONFIG["RULE_SUBST"] || "%s"
+% transvpath = rule_subst.dup.sub!(/\{[^{}]+\}/, '$(TRANSVPATH)/') || "enc/trans/%s"
+% transvpath_prefix = (rule_subst.dup.sub!(/\{[^{}]+\}/, '{$(TRANSVPATH)}') || "") % ""
+% if File::ALT_SEPARATOR
+%   pathrep = proc {|path| path.gsub('/', File::ALT_SEPARATOR).gsub(/\$\(([@
+LIBPATH = <%=libpathflag($DEFLIBPATH)%>
+LIBS = <%=
+if enable_shared or RbConfig.expand(CONFIG["LIBRUBY"].dup) != RbConfig.expand(CONFIG["LIBRUBY_A"].dup)
+  CONFIG['LIBRUBYARG']
+else
+  ''
+end %> <%=CONFIG['LIBS']%> $(EXTLIBS)
+
+ENCOBJS = <%=encs.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t  ")%><%="\n" if encs.size>1%>
+ENCSOS = <%=encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%><%="\n" if encs.size>1%>
+ENCCLEANLIBS = <%=cleanlibs.map {|clean|
+  clean.gsub(/\$\*(\.\w+)?/) {"$(ENCOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
+}.join(" ")%>
+ENCCLEANOBJS = <%=cleanobjs.map {|clean|
+  clean.gsub(/\$\*(\.\w+)?/) {"$(ENCOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
+}.join(" ")%>
+
+TRANSVPATH = $(srcdir)/enc/trans
+
+TRANSCSRCS = <%=atrans.map {|e| transvpath % "#{e}.c"}.join(" \\\n\t     ")%><%="\n" if trans.size>1%>
+TRANSOBJS = <%=trans.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t    ")%><%="\n" if trans.size>1%>
+TRANSSOS = <%=trans.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t   ")%><%="\n" if trans.size>1%>
+TRANSCLEANLIBS = <%=cleanlibs.map {|clean|
+  clean.gsub(/\$\*(\.\w+)?/) {"$(TRANSOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
+}.join(" ")%>
+TRANSCLEANOBJS = <%=cleanobjs.map {|clean|
+  clean.gsub(/\$\*(\.\w+)?/) {"$(TRANSOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
+}.join(" ")%>
+
+encs: all
+all: enc trans
+enc: $(ENCSOS)
+trans: $(TRANSSOS)
+
+srcs: $(TRANSCSRCS)
+
+% if rule = (compile_rules = COMPILE_RULES).find(&/\$\(srcdir\)/.method(:=~))
+%   compile_rules = [rule.sub(/\$\(srcdir\)/, '\&/enc'), rule.sub(/\$\(srcdir\)/, '\&/enc/trans')] + compile_rules
+% end
+% compile_rules.each do |rule|
+<%=  rule % %w[c $(OBJEXT)] %>
+	-@$(MAKEDIRS) "$(@D)"
+	<%=COMPILE_C%>
+
+% end
+
+<%=transvpath_prefix%>.trans<%=transvpath_prefix%>.c:
+	$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<"
+
+% unless encs.empty? or trans.empty?
+
+%   unless encs.empty?
+$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
+%   end
+%   unless trans.empty?
+$(TRANSOBJS): ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma.h st.h transcode_data.h
+%   end
+%   atrans.each do |e|
+%     src = "#{e}.trans"
+
+<%=transvpath % "#{e}.c"%>: <%= transvpath % "#{e}.trans"%>
+%     src = [*IO.read(File.join($srcdir, "trans", src)).scan(/^\s*require\s+[\'\"]([^\'\"]*)/).flatten.map{|c|c+".rb"}]
+<%=transvpath % "#{e}.c"%>: <%= src.map {|e| transvpath % "#{e}"}.join(" ")%> $(srcdir)/tool/transcode-tblgen.rb
+%   end
+
+% end
+% link_so = LINK_SO.gsub(/\n/, "\n\t")
+% link_so.gsub!(/(-(?:implib|pdb):\S+)-\$\(arch\)\./, '\1.')
+% dependencies.each do |e|
+%   obj = "enc/#{e}.$(OBJEXT)"
+%   df = ("enc/#{e}.def" if deffile)
+$(ENCSODIR)/<%=e%>.$(DLEXT): <%=obj%>
+%   if df
+	echo> <%=df%> EXPORTS
+	echo>> <%=df%> <%=EXPORT_PREFIX%>Init_<%=File.basename(e)%>
+%   end
+	@$(MAKEDIRS) "$(@D)"
+	<%=link_so.sub(/\$\(OBJS\)/) {obj}.sub(/\$\(DEFFILE\)/) {df}.gsub(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}%>
+
+% end
+% dependencies.each do |e|
+<%=rule_subst % "enc/#{e}.$(OBJEXT)"%>: <%=rule_subst % "enc/#{e}.c"%>
+% end
+
+enc/encdb.$(OBJEXT): encdb.h
+enc/trans/transdb.$(OBJEXT): transdb.h
+
+clean:
+% %w[$(ENCSOS) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS)].each do |clean|
+	@$(RM) <%=pathrep[clean]%>
+% end
+% %w[$(TRANSSODIR) $(ENCSODIR)].each do|dir|
+	@-rmdir <%=pathrep[dir]%>
+% end
+
+clean-srcs:
+	@$(RM) <%=pathrep['$(TRANSCSRCS)']%>
+% %w[enc/trans enc].each do|dir|
+	@-rmdir <%=pathrep[dir]%>
+% end
diff --git a/lib/ruby-1.9.1-rc1/enc/emacs_mule.c b/lib/ruby-1.9.1-rc1/enc/emacs_mule.c
new file mode 100644
index 0000000..be7f842
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/emacs_mule.c
@@ -0,0 +1,340 @@
+/**********************************************************************
+  emacs_mule.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regint.h"
+
+
+#define emacsmule_islead(c)    ((UChar )((c) - 0x81) > 0x9d - 0x81)
+
+/*
+    CHARACTER := ASCII_CHAR | MULTIBYTE_CHAR
+    MULTIBYTE_CHAR := PRIMARY_CHAR_1 | PRIMARY_CHAR_2
+                      | SECONDARY_CHAR_1 | SECONDARY_CHAR_2
+    PRIMARY_CHAR_1   := LEADING_CODE_PRI C1
+    PRIMARY_CHAR_2   := LEADING_CODE_PRI C1 C2
+    SECONDARY_CHAR_1 := LEADING_CODE_SEC LEADING_CODE_EXT C1
+    SECONDARY_CHAR_2 := LEADING_CODE_SEC LEADING_CODE_EXT C1 C2
+    ASCII_CHAR := 0 | 1 | ... | 127
+    LEADING_CODE_PRI := 129 | 130 | ... | 153
+    LEADING_CODE_SEC := 154 | 155 | 156 | 157
+    C1, C2, LEADING_CODE_EXT := 160 | 161 | ... | 255
+ */
+
+static const int EncLen_EmacsMule[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1, S2, S3, S4, S5, S6 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 5, 6, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A 
+  },
+  { /* S2   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 
+  },
+  { /* S3   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
+  },
+  { /* S4   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F
+  },
+  { /* S5   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ 2, 2, 2, 2, 2, F, F, F, F, F, F, F, F, F, F, F
+  },
+  { /* S6   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, F
+  },
+
+};
+#undef A
+#undef F
+
+static int
+mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s;
+  s = trans[0][firstbyte];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EmacsMule[firstbyte]-1);
+  s = trans[s][*p++];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EmacsMule[firstbyte]-2);
+  s = trans[s][*p++];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(3) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EmacsMule[firstbyte]-3);
+  s = trans[s][*p++];
+  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4) :
+                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static OnigCodePoint
+mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  int c, i, len;
+  OnigCodePoint n;
+
+  len = enclen(enc, p, end);
+  n = (OnigCodePoint )*p++;
+  if (len == 1) return n;
+
+  for (i = 1; i < len; i++) {
+    if (p >= end) break;
+    c = *p++;
+    n <<= 8;  n += c;
+  }
+  return n;
+}
+
+static int
+code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
+{
+  if (ONIGENC_IS_CODE_ASCII(code)) return 1;
+  else if (code > 0xffffffff) return 0;
+  else if ((code & 0xff000000) >= 0x80000000) return 4;
+  else if ((code &   0xff0000) >= 0x800000) return 3;
+  else if ((code &     0xff00) >= 0x8000) return 2;
+  else
+    return ONIGERR_INVALID_CODE_POINT_VALUE;
+}
+
+static int
+code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  UChar *p = buf;
+
+  if ((code & 0xff000000) != 0) *p++ = (UChar )(((code >> 24) & 0xff));
+  if ((code &   0xff0000) != 0) *p++ = (UChar )(((code >> 16) & 0xff));
+  if ((code &     0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
+  *p++ = (UChar )(code & 0xff);
+
+  if (enclen(enc, buf, p) != (p - buf))
+    return ONIGERR_INVALID_CODE_POINT_VALUE;
+  return p - buf;
+}
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end, UChar* lower,
+	      OnigEncoding enc)
+{
+  int len;
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_MBC_ASCII(p)) {
+    *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    (*pp)++;
+    return 1;
+  }
+  else {
+    int i;
+
+    len = mbc_enc_len(p, end, enc);
+    for (i = 0; i < len; i++) {
+      *lower++ = *p++;
+    }
+    (*pp) += len;
+    return len; /* return byte length of converted char to lower */
+  }
+}
+
+static UChar*
+left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  while (!emacsmule_islead(*p) && p > start) p--;
+  return (UChar* )p;
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 128)
+    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+  else
+    return (code_to_mbclen(code, enc) > 1 ? TRUE : FALSE);
+}
+
+/*
+ * Name: Emacs-Mule
+ * Link: http://www.m17n.org/mule/pricai96/mule.en.html
+ */
+OnigEncodingDefine(emacs_mule, Emacs_Mule) = {
+  mbc_enc_len,
+  "Emacs-Mule",   /* name */
+  4,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  mbc_to_code,
+  code_to_mbclen,
+  code_to_mbc,
+  mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match,
+  0
+};
+
+ENC_REPLICATE("stateless-ISO-2022-JP", "Emacs-Mule")
diff --git a/lib/ruby-1.9.1-rc1/enc/encdb.c b/lib/ruby-1.9.1-rc1/enc/encdb.c
new file mode 100644
index 0000000..cfdbdbb
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/encdb.c
@@ -0,0 +1,25 @@
+/**********************************************************************
+
+  enc/encdb.c -
+
+  $Author: nobu $
+  created at: Mon Apr  7 15:51:31 2008
+
+  Copyright (C) 2008 Yukihiro Matsumoto
+
+**********************************************************************/
+
+int rb_encdb_replicate(const char *alias, const char *orig);
+int rb_encdb_alias(const char *alias, const char *orig);
+int rb_encdb_dummy(const char *name);
+void rb_encdb_declare(const char *name);
+#define ENC_REPLICATE(name, orig) rb_encdb_replicate(name, orig)
+#define ENC_ALIAS(name, orig) rb_encdb_alias(name, orig)
+#define ENC_DUMMY(name) rb_encdb_dummy(name)
+#define ENC_DEFINE(name) rb_encdb_declare(name)
+
+void
+Init_encdb(void)
+{
+#include "encdb.h"
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/euc_jp.c b/lib/ruby-1.9.1-rc1/enc/euc_jp.c
new file mode 100644
index 0000000..21f30ad
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/euc_jp.c
@@ -0,0 +1,388 @@
+/**********************************************************************
+  euc_jp.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regint.h"
+
+
+#define eucjp_islead(c)    ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
+
+static const int EncLen_EUCJP[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1, S2 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, 1, 2,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  },
+  { /* S2   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+
+};
+#undef A
+#undef F
+
+static int
+mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s;
+  s = trans[0][firstbyte];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EUCJP[firstbyte]-1);
+  s = trans[s][*p++];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EUCJP[firstbyte]-2);
+  s = trans[s][*p++];
+  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(3) :
+                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static OnigCodePoint
+mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  int c, i, len;
+  OnigCodePoint n;
+
+  len = enclen(enc, p, end);
+  n = (OnigCodePoint )*p++;
+  if (len == 1) return n;
+
+  for (i = 1; i < len; i++) {
+    if (p >= end) break;
+    c = *p++;
+    n <<= 8;  n += c;
+  }
+  return n;
+}
+
+static int
+code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
+{
+  if (ONIGENC_IS_CODE_ASCII(code)) return 1;
+  else if (code > 0xffffff) return 0;
+  else if ((code & 0xff0000) >= 0x800000) return 3;
+  else if ((code &   0xff00) >= 0x8000) return 2;
+  else
+    return ONIGERR_INVALID_CODE_POINT_VALUE;
+}
+
+#if 0
+static int
+code_to_mbc_first(OnigCodePoint code)
+{
+  int first;
+
+  if ((code & 0xff0000) != 0) {
+    first = (code >> 16) & 0xff;
+  }
+  else if ((code & 0xff00) != 0) {
+    first = (code >> 8) & 0xff;
+  }
+  else {
+    return (int )code;
+  }
+  return first;
+}
+#endif
+
+static int
+code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  UChar *p = buf;
+
+  if ((code & 0xff0000) != 0) *p++ = (UChar )(((code >> 16) & 0xff));
+  if ((code &   0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
+  *p++ = (UChar )(code & 0xff);
+
+#if 1
+  if (enclen(enc, buf, p) != (p - buf))
+    return ONIGERR_INVALID_CODE_POINT_VALUE;
+#endif  
+  return p - buf;
+}
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end, UChar* lower,
+	      OnigEncoding enc)
+{
+  int len;
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_MBC_ASCII(p)) {
+    *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    (*pp)++;
+    return 1;
+  }
+  else {
+    int i;
+
+    len = enclen(enc, p, end);
+    for (i = 0; i < len; i++) {
+      *lower++ = *p++;
+    }
+    (*pp) += len;
+    return len; /* return byte length of converted char to lower */
+  }
+}
+
+static UChar*
+left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  /* In this encoding
+     mb-trail bytes doesn't mix with single bytes.
+  */
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  while (!eucjp_islead(*p) && p > start) p--;
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  if (c <= 0x7e || c == 0x8e || c == 0x8f)
+    return TRUE;
+  else
+    return FALSE;
+}
+
+
+static int PropertyInited = 0;
+static const OnigCodePoint** PropertyList;
+static int PropertyListNum;
+static int PropertyListSize;
+static hash_table_type* PropertyNameTable;
+
+static const OnigCodePoint CR_Hiragana[] = {
+  1,
+  0xa4a1, 0xa4f3
+}; /* CR_Hiragana */
+
+static const OnigCodePoint CR_Katakana[] = {
+  3,
+  0xa5a1, 0xa5f6,
+  0xaaa6, 0xaaaf,
+  0xaab1, 0xaadd
+}; /* CR_Katakana */
+
+static int
+init_property_list(void)
+{
+  int r;
+
+  PROPERTY_LIST_ADD_PROP("Hiragana", CR_Hiragana);
+  PROPERTY_LIST_ADD_PROP("Katakana", CR_Katakana);
+  PropertyInited = 1;
+
+ end:
+  return r;
+}
+
+static int
+property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
+{
+  st_data_t ctype;
+
+  PROPERTY_LIST_INIT_CHECK;
+
+  if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
+    return onigenc_minimum_property_name_to_ctype(enc, p, end);
+  }
+
+  return ctype;
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+    if (code < 128)
+      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+    else {
+      if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+	return (code_to_mbclen(code, enc) > 1 ? TRUE : FALSE);
+      }
+    }
+  }
+  else {
+    PROPERTY_LIST_INIT_CHECK;
+
+    ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+    if (ctype >= (unsigned int )PropertyListNum)
+      return ONIGERR_TYPE_BUG;
+
+    return onig_is_in_code_range((UChar* )PropertyList[ctype], code);
+  }
+
+  return FALSE;
+}
+
+static int
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+		     const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
+{
+  if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+    return ONIG_NO_SUPPORT_CONFIG;
+  }
+  else {
+    *sb_out = 0x80;
+
+    PROPERTY_LIST_INIT_CHECK;
+
+    ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+    if (ctype >= (OnigCtype )PropertyListNum)
+      return ONIGERR_TYPE_BUG;
+
+    *ranges = PropertyList[ctype];
+    return 0;
+  }
+}
+
+
+OnigEncodingDefine(euc_jp, EUC_JP) = {
+  mbc_enc_len,
+  "EUC-JP",   /* name */
+  3,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  mbc_to_code,
+  code_to_mbclen,
+  code_to_mbc,
+  mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  property_name_to_ctype,
+  is_code_ctype,
+  get_ctype_code_range,
+  left_adjust_char_head,
+  is_allowed_reverse_match,
+  0
+};
+/*
+ * Name: EUC-JP
+ * MIBenum: 18
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://home.m05.itscom.net/numa/cde/sjis-euc/sjis-euc.html
+ */
+ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese Environment Version 1.1 */
+
+/*
+ * Name: eucJP-ms
+ * Link: http://home.m05.itscom.net/numa/cde/ucs-conv/ucs-conv.html
+ * Link: http://www2d.biglobe.ne.jp/~msyk/charcode/cp932/eucJP-ms.html
+ * Link: http://ja.wikipedia.org/wiki/EUC-JP
+ */
+ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */
+ENC_ALIAS("euc-jp-ms", "eucJP-ms")
+
+/*
+ * Name: CP51932
+ * Link: http://search.cpan.org/src/NARUSE/Encode-EUCJPMS-0.07/ucm/cp51932.ucm
+ * Link: http://legacy-encoding.sourceforge.jp/wiki/index.php?cp51932
+ * Link: http://msyk.at.webry.info/200511/article_2.html
+ */
+ENC_REPLICATE("CP51932", "EUC-JP")
diff --git a/lib/ruby-1.9.1-rc1/enc/euc_kr.c b/lib/ruby-1.9.1-rc1/enc/euc_kr.c
new file mode 100644
index 0000000..f20a57e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/euc_kr.c
@@ -0,0 +1,192 @@
+/**********************************************************************
+  euc_kr.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static const int EncLen_EUCKR[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+euckr_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EUCKR[firstbyte]-1);
+  s = trans[s][*p++];
+  RETURN(2);
+#undef RETURN
+}
+
+static OnigCodePoint
+euckr_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_to_code(enc, p, end);
+}
+
+static int
+euckr_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb2_code_to_mbc(enc, code, buf);
+}
+
+static int
+euckr_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                    UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+euckr_is_mbc_ambiguous(OnigCaseFoldType flag,
+		       const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+euckr_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb2_is_code_ctype(enc, code, ctype);
+}
+
+#define euckr_islead(c)    ((c) < 0xa1 || (c) == 0xff)
+
+static UChar*
+euckr_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  /* Assumed in this encoding,
+     mb-trail bytes don't mix with single bytes.
+  */
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  while (!euckr_islead(*p) && p > start) p--;
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+euckr_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  if (c <= 0x7e) return TRUE;
+  else           return FALSE;
+}
+
+OnigEncodingDefine(euc_kr, EUC_KR) = {
+  euckr_mbc_enc_len,
+  "EUC-KR",   /* name */
+  2,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  euckr_mbc_to_code,
+  onigenc_mb2_code_to_mbclen,
+  euckr_code_to_mbc,
+  euckr_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  euckr_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  euckr_left_adjust_char_head,
+  euckr_is_allowed_reverse_match
+};
+ENC_ALIAS("eucKR", "EUC-KR")
diff --git a/lib/ruby-1.9.1-rc1/enc/euc_tw.c b/lib/ruby-1.9.1-rc1/enc/euc_tw.c
new file mode 100644
index 0000000..d025a0d
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/euc_tw.c
@@ -0,0 +1,234 @@
+/**********************************************************************
+  euc_tw.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static const int EncLen_EUCTW[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1, S2, S3 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, 2, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  },
+  { /* S2   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* b */ 3, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S3   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+euctw_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_EUCTW[firstbyte]-1);
+  s = trans[s][*p++];
+  if (s < 0) RETURN(2);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(4-2);
+  s = trans[s][*p++];
+  if (s < 0) RETURN(3);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(4-3);
+  s = trans[s][*p++];
+  RETURN(4);
+#undef RETURN
+}
+
+static OnigCodePoint
+euctw_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_mbn_mbc_to_code(enc, p, end);
+}
+
+static int
+euctw_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb4_code_to_mbc(enc, code, buf);
+}
+
+static int
+euctw_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                    UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+euctw_is_mbc_ambiguous(OnigCaseFoldType flag,
+		       const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+euctw_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb4_is_code_ctype(enc, code, ctype);
+}
+
+#define euctw_islead(c)    ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
+
+static UChar*
+euctw_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  /* Assumed in this encoding,
+     mb-trail bytes don't mix with single bytes.
+  */
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  while (!euctw_islead(*p) && p > start) p--;
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+euctw_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  if (c <= 0x7e) return TRUE;
+  else           return FALSE;
+}
+
+OnigEncodingDefine(euc_tw, EUC_TW) = {
+  euctw_mbc_enc_len,
+  "EUC-TW",   /* name */
+  4,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  euctw_mbc_to_code,
+  onigenc_mb4_code_to_mbclen,
+  euctw_code_to_mbc,
+  euctw_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  euctw_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  euctw_left_adjust_char_head,
+  euctw_is_allowed_reverse_match
+};
+ENC_ALIAS("eucTW", "EUC-TW")
diff --git a/lib/ruby-1.9.1-rc1/enc/gb18030.c b/lib/ruby-1.9.1-rc1/enc/gb18030.c
new file mode 100644
index 0000000..16c8c1c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/gb18030.c
@@ -0,0 +1,596 @@
+/**********************************************************************
+  gb18030.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2005-2007  KUBO Takehiro 
+ *                          K.Kosako 
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#if 1
+#define DEBUG_GB18030(arg)
+#else
+#define DEBUG_GB18030(arg) printf arg
+#endif
+
+enum {
+  C1, /* one-byte char */
+  C2, /* one-byte or second of two-byte char */
+  C4, /* one-byte or second or fourth of four-byte char */
+  CM  /* first of two- or four-byte char or second of two-byte char */
+};
+
+static const char GB18030_MAP[] = {
+  C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1,
+  C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1,
+  C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1,
+  C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C1, C1, C1, C1, C1, C1,
+  C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2,
+  C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2,
+  C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2,
+  C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C2, C1,
+  C2, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM,
+  CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, CM, C1
+};
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1, S2, S3 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, F, F, F, F, F, F,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F,
+    /* 8 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 9 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  },
+  { /* S2   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* 9 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* a */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* b */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* c */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* d */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* e */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* f */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, F 
+  },
+  { /* S3   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+gb18030_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(2-1);
+  s = trans[s][*p++];
+  if (s < 0) RETURN(2);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(4-2);
+  s = trans[s][*p++];
+  if (s < 0) RETURN(3);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(4-3);
+  s = trans[s][*p++];
+  RETURN(4);
+#undef RETURN
+}
+
+static OnigCodePoint
+gb18030_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  int c, i, len;
+  OnigCodePoint n;
+
+  len = enclen(enc, p, end);
+  n = (OnigCodePoint )(*p++);
+  if (len == 1) return n;
+
+  for (i = 1; i < len; i++) {
+    if (p >= end) break;
+    c = *p++;
+    n <<= 8;  n += c;
+  }
+  return n;
+}
+
+static int
+gb18030_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb4_code_to_mbc(enc, code, buf);
+}
+
+static int
+gb18030_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                      UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+gb18030_is_mbc_ambiguous(OnigCaseFoldType flag,
+			 const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+gb18030_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb4_is_code_ctype(enc, code, ctype);
+}
+
+enum state {
+  S_START,
+  S_one_C2,
+  S_one_C4,
+  S_one_CM,
+
+  S_odd_CM_one_CX,
+  S_even_CM_one_CX,
+
+  /* CMC4 : pair of "CM C4" */
+  S_one_CMC4,
+  S_odd_CMC4,
+  S_one_C4_odd_CMC4,
+  S_even_CMC4,
+  S_one_C4_even_CMC4,
+
+  S_odd_CM_odd_CMC4,
+  S_even_CM_odd_CMC4,
+
+  S_odd_CM_even_CMC4,
+  S_even_CM_even_CMC4,
+
+  /* C4CM : pair of "C4 CM" */
+  S_odd_C4CM,
+  S_one_CM_odd_C4CM,
+  S_even_C4CM,
+  S_one_CM_even_C4CM,
+
+  S_even_CM_odd_C4CM,
+  S_odd_CM_odd_C4CM,
+  S_even_CM_even_C4CM,
+  S_odd_CM_even_C4CM
+};
+
+static UChar*
+gb18030_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+  enum state state = S_START;
+
+  DEBUG_GB18030(("----------------\n"));
+  for (p = s; p >= start; p--) {
+    DEBUG_GB18030(("state %d --(%02x)-->\n", state, *p));
+    switch (state) {
+    case S_START:
+      switch (GB18030_MAP[*p]) {
+      case C1:
+	return (UChar *)s;
+      case C2:
+	state = S_one_C2; /* C2 */
+	break;
+      case C4:
+	state = S_one_C4; /* C4 */
+	break;
+      case CM:
+	state = S_one_CM; /* CM */
+	break;
+      }
+      break;
+    case S_one_C2: /* C2 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)s;
+      case CM:
+	state = S_odd_CM_one_CX; /* CM C2 */
+	break;
+      }
+      break;
+    case S_one_C4: /* C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)s;
+      case CM:
+	state = S_one_CMC4;
+	break;
+      }
+      break;
+    case S_one_CM: /* CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)s;
+      case C4:
+	state = S_odd_C4CM;
+	break;
+      case CM:
+	state = S_odd_CM_one_CX; /* CM CM */
+	break;
+      }
+      break;
+
+    case S_odd_CM_one_CX: /* CM C2 */ /* CM CM */ /* CM CM CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 1);
+      case CM:
+	state = S_even_CM_one_CX;
+	break;
+      }
+      break;
+    case S_even_CM_one_CX: /* CM CM C2 */ /* CM CM CM */ /* CM CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)s;
+      case CM:
+	state = S_odd_CM_one_CX;
+	break;
+      }
+      break;
+
+    case S_one_CMC4: /* CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)(s - 1);
+      case C4:
+	state = S_one_C4_odd_CMC4; /* C4 CM C4 */
+	break;
+      case CM:
+	state = S_even_CM_one_CX; /* CM CM C4 */
+	break;
+      }
+      break;
+    case S_odd_CMC4: /* CM C4 CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)(s - 1);
+      case C4:
+	state = S_one_C4_odd_CMC4;
+	break;
+      case CM:
+	state = S_odd_CM_odd_CMC4;
+	break;
+      }
+      break;
+    case S_one_C4_odd_CMC4: /* C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 1);
+      case CM:
+	state = S_even_CMC4; /* CM C4 CM C4 */
+	break;
+      }
+      break;
+    case S_even_CMC4: /* CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)(s - 3);
+      case C4:
+	state = S_one_C4_even_CMC4;
+	break;
+      case CM:
+	state = S_odd_CM_even_CMC4;
+	break;
+      }
+      break;
+    case S_one_C4_even_CMC4: /* C4 CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 3);
+      case CM:
+	state = S_odd_CMC4;
+	break;
+      }
+      break;
+
+    case S_odd_CM_odd_CMC4: /* CM CM C4 CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 3);
+      case CM:
+	state = S_even_CM_odd_CMC4;
+	break;
+      }
+      break;
+    case S_even_CM_odd_CMC4: /* CM CM CM C4 CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 1);
+      case CM:
+	state = S_odd_CM_odd_CMC4;
+	break;
+      }
+      break;
+
+    case S_odd_CM_even_CMC4: /* CM CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 1);
+      case CM:
+	state = S_even_CM_even_CMC4;
+	break;
+      }
+      break;
+    case S_even_CM_even_CMC4: /* CM CM CM C4 CM C4 */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 3);
+      case CM:
+	state = S_odd_CM_even_CMC4;
+	break;
+      }
+      break;
+
+    case S_odd_C4CM: /* C4 CM */  /* C4 CM C4 CM C4 CM*/
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)s;
+      case CM:
+	state = S_one_CM_odd_C4CM; /* CM C4 CM */
+	break;
+      }
+      break;
+    case S_one_CM_odd_C4CM: /* CM C4 CM */ /* CM C4 CM C4 CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)(s - 2); /* |CM C4 CM */
+      case C4:
+	state = S_even_C4CM;
+	break;
+      case CM:
+	state = S_even_CM_odd_C4CM;
+	break;
+      }
+      break;
+    case S_even_C4CM: /* C4 CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 2);  /* C4|CM C4 CM */
+      case CM:
+	state = S_one_CM_even_C4CM;
+	break;
+      }
+      break;
+    case S_one_CM_even_C4CM: /* CM C4 CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+	return (UChar *)(s - 0);  /*|CM C4 CM C4|CM */
+      case C4:
+	state = S_odd_C4CM;
+	break;
+      case CM:
+	state = S_even_CM_even_C4CM;
+	break;
+      }
+      break;
+
+    case S_even_CM_odd_C4CM: /* CM CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 0); /* |CM CM|C4|CM */
+      case CM:
+	state = S_odd_CM_odd_C4CM;
+	break;
+      }
+      break;
+    case S_odd_CM_odd_C4CM: /* CM CM CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 2); /* |CM CM|CM C4 CM */
+      case CM:
+	state = S_even_CM_odd_C4CM;
+	break;
+      }
+      break;
+
+    case S_even_CM_even_C4CM: /* CM CM C4 CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 2); /* |CM CM|C4|CM C4 CM */
+      case CM:
+	state = S_odd_CM_even_C4CM;
+	break;
+      }
+      break;
+    case S_odd_CM_even_C4CM: /* CM CM CM C4 CM C4 CM */
+      switch (GB18030_MAP[*p]) {
+      case C1:
+      case C2:
+      case C4:
+	return (UChar *)(s - 0);  /* |CM CM|CM C4 CM C4|CM */
+      case CM:
+	state = S_even_CM_even_C4CM;
+	break;
+      }
+      break;
+    }
+  }
+
+  DEBUG_GB18030(("state %d\n", state));
+  switch (state) {
+  case S_START:             return (UChar *)(s - 0);
+  case S_one_C2:            return (UChar *)(s - 0);
+  case S_one_C4:            return (UChar *)(s - 0);
+  case S_one_CM:            return (UChar *)(s - 0);
+
+  case S_odd_CM_one_CX:     return (UChar *)(s - 1);
+  case S_even_CM_one_CX:    return (UChar *)(s - 0);
+
+  case S_one_CMC4:          return (UChar *)(s - 1);
+  case S_odd_CMC4:          return (UChar *)(s - 1);
+  case S_one_C4_odd_CMC4:   return (UChar *)(s - 1);
+  case S_even_CMC4:         return (UChar *)(s - 3);
+  case S_one_C4_even_CMC4:  return (UChar *)(s - 3);
+
+  case S_odd_CM_odd_CMC4:   return (UChar *)(s - 3);
+  case S_even_CM_odd_CMC4:  return (UChar *)(s - 1);
+
+  case S_odd_CM_even_CMC4:  return (UChar *)(s - 1);
+  case S_even_CM_even_CMC4: return (UChar *)(s - 3);
+
+  case S_odd_C4CM:          return (UChar *)(s - 0);
+  case S_one_CM_odd_C4CM:   return (UChar *)(s - 2);
+  case S_even_C4CM:         return (UChar *)(s - 2);
+  case S_one_CM_even_C4CM:  return (UChar *)(s - 0);
+
+  case S_even_CM_odd_C4CM:  return (UChar *)(s - 0);
+  case S_odd_CM_odd_C4CM:   return (UChar *)(s - 2);
+  case S_even_CM_even_C4CM: return (UChar *)(s - 2);
+  case S_odd_CM_even_C4CM:  return (UChar *)(s - 0);
+  }
+
+  return (UChar* )s;  /* never come here. (escape warning) */
+}
+
+static int
+gb18030_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  return GB18030_MAP[*s] == C1 ? TRUE : FALSE;
+}
+
+OnigEncodingDefine(gb18030, GB18030) = {
+  gb18030_mbc_enc_len,
+  "GB18030",   /* name */
+  4,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  gb18030_mbc_to_code,
+  onigenc_mb4_code_to_mbclen,
+  gb18030_code_to_mbc,
+  gb18030_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  gb18030_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  gb18030_left_adjust_char_head,
+  gb18030_is_allowed_reverse_match
+};
+
diff --git a/lib/ruby-1.9.1-rc1/enc/gb2312.c b/lib/ruby-1.9.1-rc1/enc/gb2312.c
new file mode 100644
index 0000000..6fc1573
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/gb2312.c
@@ -0,0 +1,13 @@
+#include 
+#include 
+#include "regenc.h"
+
+void
+Init_gb2312(void)
+{
+    rb_enc_register("GB2312", rb_enc_find("EUC-KR"));
+}
+
+ENC_ALIAS("EUC-CN", "GB2312")
+ENC_ALIAS("eucCN", "GB2312")
+ENC_REPLICATE("GB12345", "GB2312")
diff --git a/lib/ruby-1.9.1-rc1/enc/gbk.c b/lib/ruby-1.9.1-rc1/enc/gbk.c
new file mode 100644
index 0000000..3efb1bf
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/gbk.c
@@ -0,0 +1,222 @@
+/**********************************************************************
+  gbk.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static const int EncLen_GBK[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+};
+
+static const char GBK_CAN_BE_TRAIL_TABLE[256] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
+};
+
+#define GBK_ISMB_FIRST(byte)  (EncLen_GBK[byte] > 1)
+#define GBK_ISMB_TRAIL(byte)  GBK_CAN_BE_TRAIL_TABLE[(byte)]
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ A, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F,
+    /* 8 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 9 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F 
+  }
+};
+#undef A
+#undef F
+
+static int
+gbk_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s = trans[0][firstbyte];
+#define RETURN(n) \
+    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
+                         ONIGENC_CONSTRUCT_MBCLEN_INVALID()
+  if (s < 0) RETURN(1);
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_GBK[firstbyte]-1);
+  s = trans[s][*p++];
+  RETURN(2);
+#undef RETURN
+}
+
+static OnigCodePoint
+gbk_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_to_code(enc, p, end);
+}
+
+static int
+gbk_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  return onigenc_mb2_code_to_mbc(enc, code, buf);
+}
+
+static int
+gbk_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
+                    UChar* lower, OnigEncoding enc)
+{
+  return onigenc_mbn_mbc_case_fold(enc, flag,
+                                   pp, end, lower);
+}
+
+#if 0
+static int
+gbk_is_mbc_ambiguous(OnigCaseFoldType flag,
+		       const UChar** pp, const UChar* end, OnigEncoding enc)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+}
+#endif
+
+static int
+gbk_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  return onigenc_mb2_is_code_ctype(enc, code, ctype);
+}
+
+static UChar*
+gbk_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  if (GBK_ISMB_TRAIL(*p)) {
+    while (p > start) {
+      if (! GBK_ISMB_FIRST(*--p)) {
+	p++;
+	break;
+      }
+    } 
+  }
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+gbk_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  return (GBK_ISMB_TRAIL(c) ? FALSE : TRUE);
+}
+
+OnigEncodingDefine(gbk, GBK) = {
+  gbk_mbc_enc_len,
+  "GBK",      /* name */
+  2,          /* max enc length */
+  1,          /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  gbk_mbc_to_code,
+  onigenc_mb2_code_to_mbclen,
+  gbk_code_to_mbc,
+  gbk_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  gbk_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  gbk_left_adjust_char_head,
+  gbk_is_allowed_reverse_match
+};
+/*
+ * Name: GBK
+ * MIBenum: 113
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.iana.org/assignments/charset-reg/GBK
+ * Link: http://www.microsoft.com/globaldev/reference/dbcs/936.mspx
+ */
+ENC_ALIAS("CP936", "GBK")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_2022_jp.h b/lib/ruby-1.9.1-rc1/enc/iso_2022_jp.h
new file mode 100644
index 0000000..8155bdc
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_2022_jp.h
@@ -0,0 +1,6 @@
+#include "regenc.h"
+/* dummy for unsupported, statefull encoding */
+ENC_DUMMY("ISO-2022-JP");
+ENC_ALIAS("ISO2022-JP", "ISO-2022-JP");
+ENC_REPLICATE("ISO-2022-JP-2", "ISO-2022-JP");
+ENC_ALIAS("ISO2022-JP2", "ISO-2022-JP-2");
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_1.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_1.c
new file mode 100644
index 0000000..b73f8ca
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_1.c
@@ -0,0 +1,285 @@
+/**********************************************************************
+  iso8859_1.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \
+  ((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const unsigned short EncISO_8859_1_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+  0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+  { 0xc0, 0xe0 },
+  { 0xc1, 0xe1 },
+  { 0xc2, 0xe2 },
+  { 0xc3, 0xe3 },
+  { 0xc4, 0xe4 },
+  { 0xc5, 0xe5 },
+  { 0xc6, 0xe6 },
+  { 0xc7, 0xe7 },
+  { 0xc8, 0xe8 },
+  { 0xc9, 0xe9 },
+  { 0xca, 0xea },
+  { 0xcb, 0xeb },
+  { 0xcc, 0xec },
+  { 0xcd, 0xed },
+  { 0xce, 0xee },
+  { 0xcf, 0xef },
+
+  { 0xd0, 0xf0 },
+  { 0xd1, 0xf1 },
+  { 0xd2, 0xf2 },
+  { 0xd3, 0xf3 },
+  { 0xd4, 0xf4 },
+  { 0xd5, 0xf5 },
+  { 0xd6, 0xf6 },
+  { 0xd8, 0xf8 },
+  { 0xd9, 0xf9 },
+  { 0xda, 0xfa },
+  { 0xdb, 0xfb },
+  { 0xdc, 0xfc },
+  { 0xdd, 0xfd },
+  { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+            sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+            flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  if (0x41 <= *p && *p <= 0x5a) {
+    items[0].byte_len = 1;
+    items[0].code_len = 1;
+    items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+    if (*p == 0x53 && end > p + 1
+	&& (*(p+1) == 0x53 || *(p+1) == 0x73)) { /* SS */
+      items[1].byte_len = 2;
+      items[1].code_len = 1;
+      items[1].code[0] = (OnigCodePoint )0xdf;
+      return 2;
+    }
+    else
+      return 1;
+  }
+  else if (0x61 <= *p && *p <= 0x7a) {
+    items[0].byte_len = 1;
+    items[0].code_len = 1;
+    items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+    if (*p == 0x73 && end > p + 1
+	&& (*(p+1) == 0x73 || *(p+1) == 0x53)) { /* ss */
+      items[1].byte_len = 2;
+      items[1].code_len = 1;
+      items[1].code[0] = (OnigCodePoint )0xdf;
+      return 2;
+    }
+    else
+      return 1;
+  }
+  else if (0xc0 <= *p && *p <= 0xcf) {
+    items[0].byte_len = 1;
+    items[0].code_len = 1;
+    items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+    return 1;
+  }
+  else if (0xd0 <= *p && *p <= 0xdf) {
+    if (*p == 0xdf) {
+      items[0].byte_len = 1;
+      items[0].code_len = 2;
+      items[0].code[0] = (OnigCodePoint )'s';
+      items[0].code[1] = (OnigCodePoint )'s';
+
+      items[1].byte_len = 1;
+      items[1].code_len = 2;
+      items[1].code[0] = (OnigCodePoint )'S';
+      items[1].code[1] = (OnigCodePoint )'S';
+
+      items[2].byte_len = 1;
+      items[2].code_len = 2;
+      items[2].code[0] = (OnigCodePoint )'s';
+      items[2].code[1] = (OnigCodePoint )'S';
+
+      items[3].byte_len = 1;
+      items[3].code_len = 2;
+      items[3].code[0] = (OnigCodePoint )'S';
+      items[3].code[1] = (OnigCodePoint )'s';
+
+      return 4;
+    }
+    else if (*p != 0xd7) {
+      items[0].byte_len = 1;
+      items[0].code_len = 1;
+      items[0].code[0] = (OnigCodePoint )(*p + 0x20);
+      return 1;
+    }
+  }
+  else if (0xe0 <= *p && *p <= 0xef) {
+    items[0].byte_len = 1;
+    items[0].code_len = 1;
+    items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+    return 1;
+  }
+  else if (0xf0 <= *p && *p <= 0xfe) {
+    if (*p != 0xf7) {
+      items[0].byte_len = 1;
+      items[0].code_len = 1;
+      items[0].code[0] = (OnigCodePoint )(*p - 0x20);
+      return 1;
+    }
+  }
+
+  return 0;
+}
+
+static int
+mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end ARG_UNUSED,
+	      UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ONIGENC_ISO_8859_1_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+		 const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_1_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    /* 0xdf, 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+    if (*p >= 0xaa && *p <= 0xba)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_1_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+OnigEncodingDefine(iso_8859_1, ISO_8859_1) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-1",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-1", "ISO-8859-1")
+
+/*
+ * Name: windows-1252
+ * MIBenum: 2252
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1252
+ */
+ENC_REPLICATE("Windows-1252", "ISO-8859-1")
+ENC_ALIAS("CP1252", "Windows-1252")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_10.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_10.c
new file mode 100644
index 0000000..1643278
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_10.c
@@ -0,0 +1,244 @@
+/**********************************************************************
+  iso8859_10.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \
+  ((EncISO_8859_10_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_10_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\261', '\262', '\263', '\264', '\265', '\266', '\247',
+  '\270', '\271', '\272', '\273', '\274', '\255', '\276', '\277',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_10_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+  0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+			  const UChar** pp, const UChar* end ARG_UNUSED,
+			  UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_10_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_10_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_10_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa2, 0xb2 },
+ { 0xa3, 0xb3 },
+ { 0xa4, 0xb4 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa8, 0xb8 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+			       OnigApplyAllCaseFoldFunc f, void* arg,
+			       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				       const OnigUChar* p, const OnigUChar* end,
+				       OnigCaseFoldCodeItem items[],
+				       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_10, ISO_8859_10) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-10", /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-10", "ISO-8859-10")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_11.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_11.c
new file mode 100644
index 0000000..257d9d8
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_11.c
@@ -0,0 +1,111 @@
+/**********************************************************************
+  iso8859_11.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_IS_ISO_8859_11_CTYPE(code,ctype) \
+  ((EncISO_8859_11_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const unsigned short EncISO_8859_11_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000
+};
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_11_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+OnigEncodingDefine(iso_8859_11, ISO_8859_11) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-11",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  onigenc_ascii_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-11", "ISO-8859-11")
+
+/*
+ * Name: TIS-620
+ * MIBenum: 2259
+ * Link: http://en.wikipedia.org/wiki/Thai_Industrial_Standard_620-2533
+ */
+ENC_REPLICATE("TIS-620", "ISO-8859-11")
+
+/*
+ * Name: Windows-874
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/874.mspx
+ */
+ENC_REPLICATE("Windows-874", "ISO-8859-11")
+ENC_ALIAS("CP874", "Windows-874")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_13.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_13.c
new file mode 100644
index 0000000..f29cb2e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_13.c
@@ -0,0 +1,243 @@
+/**********************************************************************
+  iso8859_13.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \
+  ((EncISO_8859_13_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_13_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+  '\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_13_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+  0x34a2, 0x00a0, 0x34a2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x34a2,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x01a0, 0x30e2, 0x00a0, 0x01a0,
+  0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x01a0
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+			  const UChar** pp, const UChar* end ARG_UNUSED,
+			  UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_13_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_13_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    /* 0xdf, 0xb5 are lower case letter, but can't convert. */
+    if (*p == 0xb5)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_13_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+				OnigApplyAllCaseFoldFunc f, void* arg,
+				OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				       const OnigUChar* p, const OnigUChar* end,
+				       OnigCaseFoldCodeItem items[],
+				       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_13, ISO_8859_13) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-13",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-13", "ISO-8859-13")
+
+/*
+ * Name: windows-1257
+ * MIBenum: 2257
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1257.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1257
+ */
+ENC_REPLICATE("Windows-1257", "ISO-8859-13")
+ENC_ALIAS("CP1257", "Windows-1257")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_14.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_14.c
new file mode 100644
index 0000000..be83f93
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_14.c
@@ -0,0 +1,246 @@
+/**********************************************************************
+  iso8859_14.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \
+  ((EncISO_8859_14_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_14_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\242', '\242', '\243', '\245', '\245', '\253', '\247',
+  '\270', '\251', '\272', '\253', '\274', '\255', '\256', '\377',
+  '\261', '\261', '\263', '\263', '\265', '\265', '\266', '\271',
+  '\270', '\271', '\272', '\277', '\274', '\276', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_14_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x30e2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x00a0,
+  0x34a2, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x34a2,
+  0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x00a0, 0x34a2,
+  0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+			  const UChar** pp, const UChar* end ARG_UNUSED,
+			  UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_14_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1; /* return byte length of converted char to lower */
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+		 const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_14_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_14_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xa2 },
+ { 0xa4, 0xa5 },
+ { 0xa6, 0xab },
+ { 0xa8, 0xb8 },
+ { 0xaa, 0xba },
+ { 0xac, 0xbc },
+ { 0xaf, 0xff },
+
+ { 0xb0, 0xb1 },
+ { 0xb2, 0xb3 },
+ { 0xb4, 0xb5 },
+ { 0xb7, 0xb9 },
+ { 0xbb, 0xbf },
+ { 0xbd, 0xbe },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+				OnigApplyAllCaseFoldFunc f, void* arg,
+				OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				       const OnigUChar* p, const OnigUChar* end,
+				       OnigCaseFoldCodeItem items[],
+				       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_14, ISO_8859_14) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-14",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-14", "ISO-8859-14")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_15.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_15.c
new file mode 100644
index 0000000..2ec41b6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_15.c
@@ -0,0 +1,240 @@
+/**********************************************************************
+  iso8859_15.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \
+  ((EncISO_8859_15_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_15_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\250', '\247',
+  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+  '\260', '\261', '\262', '\263', '\270', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\275', '\275', '\377', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_15_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0,
+  0x30e2, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x34a2, 0x30e2, 0x00a0, 0x01a0,
+  0x30e2, 0x10a0, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+			  const UChar** pp, const UChar* end ARG_UNUSED,
+			  UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_15_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1; /* return byte length of converted char to lower */
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+		 const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_15_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    /* 0xdf etc.. are lower case letter, but can't convert. */
+    if (*p == 0xaa || *p == 0xb5 || *p == 0xba)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_15_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa6, 0xa8 },
+
+ { 0xb4, 0xb8 },
+ { 0xbc, 0xbd },
+ { 0xbe, 0xff },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+				OnigApplyAllCaseFoldFunc f, void* arg,
+				OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				       const OnigUChar* p, const OnigUChar* end,
+				       OnigCaseFoldCodeItem items[],
+				       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_15, ISO_8859_15) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-15",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-15", "ISO-8859-15")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_16.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_16.c
new file mode 100644
index 0000000..3ddc1d9
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_16.c
@@ -0,0 +1,242 @@
+/**********************************************************************
+  iso8859_16.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \
+  ((EncISO_8859_16_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_16_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\242', '\242', '\263', '\245', '\245', '\250', '\247',
+  '\250', '\251', '\272', '\253', '\256', '\255', '\256', '\277',
+  '\260', '\261', '\271', '\263', '\270', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\275', '\275', '\377', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_16_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x01a0, 0x34a2, 0x00a0,
+  0x30e2, 0x00a0, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x30e2, 0x34a2,
+  0x00a0, 0x00a0, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x00a0, 0x01a0,
+  0x30e2, 0x30e2, 0x30e2, 0x01a0, 0x34a2, 0x30e2, 0x34a2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+			  const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+			  OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_16_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1; /* return byte length of converted char to lower */
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_16_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_16_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xa2 },
+ { 0xa3, 0xb3 },
+ { 0xa6, 0xa8 },
+ { 0xaa, 0xba },
+ { 0xac, 0xae },
+ { 0xaf, 0xbf },
+
+ { 0xb2, 0xb9 },
+ { 0xb4, 0xb8 },
+ { 0xbc, 0xbd },
+ { 0xbe, 0xff },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+				OnigApplyAllCaseFoldFunc f, void* arg,
+				OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				       const OnigUChar* p, const OnigUChar* end,
+				       OnigCaseFoldCodeItem items[],
+				       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_16, ISO_8859_16) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-16",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-16", "ISO-8859-16")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_2.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_2.c
new file mode 100644
index 0000000..9783f1c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_2.c
@@ -0,0 +1,250 @@
+/**********************************************************************
+  iso8859_2.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \
+  ((EncISO_8859_2_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_2_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\261', '\242', '\263', '\244', '\265', '\266', '\247',
+  '\250', '\271', '\272', '\273', '\274', '\255', '\276', '\277',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_2_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x00a0, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0,
+  0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+  0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0,
+  0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_2_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1; /* return byte length of converted char to lower */
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_2_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa3, 0xb3 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+            sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+            flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_2_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+OnigEncodingDefine(iso_8859_2, ISO_8859_2) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-2",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-2", "ISO-8859-2")
+
+/*
+ * Name: windows-1250
+ * MIBenum: 2250
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1250.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1250
+ */
+ENC_REPLICATE("Windows-1250", "ISO-8859-2")
+ENC_ALIAS("CP1250", "Windows-1250")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_3.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_3.c
new file mode 100644
index 0000000..81c0c74
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_3.c
@@ -0,0 +1,240 @@
+/**********************************************************************
+  iso8859_3.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \
+  ((EncISO_8859_3_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_3_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\261', '\242', '\243', '\244', '\245', '\266', '\247',
+  '\250', '\271', '\272', '\273', '\274', '\255', '\256', '\277',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\340', '\341', '\342', '\303', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\320', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_3_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x0000, 0x34a2, 0x00a0,
+  0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x0000, 0x34a2,
+  0x00a0, 0x30e2, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x30e2, 0x01a0,
+  0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x11a0, 0x0000, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x0000, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_3_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_3_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+    if (*p == 0xb5)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_3_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xaf, 0xbf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_3, ISO_8859_3) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-3",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-3", "ISO-8859-3")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_4.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_4.c
new file mode 100644
index 0000000..ec71c4b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_4.c
@@ -0,0 +1,242 @@
+/**********************************************************************
+  iso8859_4.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \
+  ((EncISO_8859_4_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_4_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\261', '\242', '\263', '\244', '\265', '\266', '\247',
+  '\250', '\271', '\272', '\273', '\274', '\255', '\276', '\257',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\277', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_4_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x30e2, 0x34a2, 0x00a0, 0x34a2, 0x34a2, 0x00a0,
+  0x00a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x00a0,
+  0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x00a0, 0x30e2, 0x30e2, 0x00a0,
+  0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_4_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1; /* return byte length of converted char to lower */
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_4_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    if (*p == 0xa2)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_4_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xb1 },
+ { 0xa3, 0xb3 },
+ { 0xa5, 0xb5 },
+ { 0xa6, 0xb6 },
+ { 0xa9, 0xb9 },
+ { 0xaa, 0xba },
+ { 0xab, 0xbb },
+ { 0xac, 0xbc },
+ { 0xae, 0xbe },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb },
+ { 0xdc, 0xfc },
+ { 0xdd, 0xfd },
+ { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_4, ISO_8859_4) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-4",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-4", "ISO-8859-4")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_5.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_5.c
new file mode 100644
index 0000000..1550763
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_5.c
@@ -0,0 +1,230 @@
+/**********************************************************************
+  iso8859_5.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_5_TO_LOWER_CASE(c) EncISO_8859_5_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_5_CTYPE(code,ctype) \
+  ((EncISO_8859_5_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_5_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\255', '\376', '\377',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_5_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x00a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  (*pp)++;
+  v = (EncISO_8859_5_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_5_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xa1, 0xf1 },
+ { 0xa2, 0xf2 },
+ { 0xa3, 0xf3 },
+ { 0xa4, 0xf4 },
+ { 0xa5, 0xf5 },
+ { 0xa6, 0xf6 },
+ { 0xa7, 0xf7 },
+ { 0xa8, 0xf8 },
+ { 0xa9, 0xf9 },
+ { 0xaa, 0xfa },
+ { 0xab, 0xfb },
+ { 0xac, 0xfc },
+ { 0xae, 0xfe },
+ { 0xaf, 0xff },
+
+ { 0xb0, 0xd0 },
+ { 0xb1, 0xd1 },
+ { 0xb2, 0xd2 },
+ { 0xb3, 0xd3 },
+ { 0xb4, 0xd4 },
+ { 0xb5, 0xd5 },
+ { 0xb6, 0xd6 },
+ { 0xb7, 0xd7 },
+ { 0xb8, 0xd8 },
+ { 0xb9, 0xd9 },
+ { 0xba, 0xda },
+ { 0xbb, 0xdb },
+ { 0xbc, 0xdc },
+ { 0xbd, 0xdd },
+ { 0xbe, 0xde },
+ { 0xbf, 0xdf },
+
+ { 0xc0, 0xe0 },
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_5, ISO_8859_5) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-5",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-5", "ISO-8859-5")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_6.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_6.c
new file mode 100644
index 0000000..7384061
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_6.c
@@ -0,0 +1,107 @@
+/**********************************************************************
+  iso8859_6.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_IS_ISO_8859_6_CTYPE(code,ctype) \
+  ((EncISO_8859_6_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const unsigned short EncISO_8859_6_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x0000, 0x0000, 0x0000, 0x00a0, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x01a0, 0x01a0, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x01a0, 0x0000, 0x0000, 0x0000, 0x01a0,
+  0x0000, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_6_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+OnigEncodingDefine(iso_8859_6, ISO_8859_6) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-6",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  onigenc_ascii_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-6", "ISO-8859-6")
+
+/*
+ * Name: windows-1256
+ * MIBenum: 2256
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1256.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1256
+ */
+ENC_REPLICATE("Windows-1256", "ISO-8859-6")
+ENC_ALIAS("CP1256", "Windows-1256")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_7.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_7.c
new file mode 100644
index 0000000..2f91617
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_7.c
@@ -0,0 +1,237 @@
+/**********************************************************************
+  iso8859_7.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_7_TO_LOWER_CASE(c) EncISO_8859_7_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_7_CTYPE(code,ctype) \
+  ((EncISO_8859_7_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_7_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\334', '\267',
+  '\335', '\336', '\337', '\273', '\374', '\275', '\375', '\376',
+  '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\322', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\334', '\335', '\336', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_7_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x01a0, 0x00a0, 0x0000, 0x0000, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x0000, 0x01a0, 0x00a0, 0x01a0, 0x0000, 0x01a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x00a0, 0x34a2, 0x01a0,
+  0x34a2, 0x34a2, 0x34a2, 0x01a0, 0x34a2, 0x10a0, 0x34a2, 0x34a2,
+  0x30e2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x0000, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x0000
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  *lower = ENC_ISO_8859_7_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+		 const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  (*pp)++;
+  v = (EncISO_8859_7_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    if (*p == 0xc0 || *p == 0xe0)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_7_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+ { 0xb6, 0xdc },
+ { 0xb8, 0xdd },
+ { 0xb9, 0xde },
+ { 0xba, 0xdf },
+ { 0xbc, 0xfc },
+ { 0xbe, 0xfd },
+ { 0xbf, 0xfe },
+
+ { 0xc1, 0xe1 },
+ { 0xc2, 0xe2 },
+ { 0xc3, 0xe3 },
+ { 0xc4, 0xe4 },
+ { 0xc5, 0xe5 },
+ { 0xc6, 0xe6 },
+ { 0xc7, 0xe7 },
+ { 0xc8, 0xe8 },
+ { 0xc9, 0xe9 },
+ { 0xca, 0xea },
+ { 0xcb, 0xeb },
+ { 0xcc, 0xec },
+ { 0xcd, 0xed },
+ { 0xce, 0xee },
+ { 0xcf, 0xef },
+
+ { 0xd0, 0xf0 },
+ { 0xd1, 0xf1 },
+ { 0xd2, 0xf2 },
+ { 0xd3, 0xf3 },
+ { 0xd4, 0xf4 },
+ { 0xd5, 0xf5 },
+ { 0xd6, 0xf6 },
+ { 0xd7, 0xf7 },
+ { 0xd8, 0xf8 },
+ { 0xd9, 0xf9 },
+ { 0xda, 0xfa },
+ { 0xdb, 0xfb }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+		    OnigApplyAllCaseFoldFunc f, void* arg,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+			   const OnigUChar* p, const OnigUChar* end,
+			   OnigCaseFoldCodeItem items[],
+			   OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+	     flag, p, end, items);
+}
+
+
+OnigEncodingDefine(iso_8859_7, ISO_8859_7) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-7",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-7", "ISO-8859-7")
+
+/*
+ * Name: windows-1253
+ * MIBenum: 2253
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1253.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1253
+ */
+ENC_REPLICATE("Windows-1253", "ISO-8859-7")
+ENC_ALIAS("CP1253", "Windows-1253")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_8.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_8.c
new file mode 100644
index 0000000..bd0754c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_8.c
@@ -0,0 +1,107 @@
+/**********************************************************************
+  iso8859_8.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_IS_ISO_8859_8_CTYPE(code,ctype) \
+  ((EncISO_8859_8_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const unsigned short EncISO_8859_8_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x0000, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+  0x00a0, 0x10a0, 0x00a0, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x01a0,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2, 0x30a2,
+  0x30a2, 0x30a2, 0x30a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
+};
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_8_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+OnigEncodingDefine(iso_8859_8, ISO_8859_8) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-8",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  onigenc_ascii_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-8", "ISO-8859-8")
+
+/*
+ * Name: windows-1255
+ * MIBenum: 2255
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1255.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1255
+ */
+ENC_REPLICATE("Windows-1255", "ISO-8859-8")
+ENC_ALIAS("CP1255", "Windows-1255")
diff --git a/lib/ruby-1.9.1-rc1/enc/iso_8859_9.c b/lib/ruby-1.9.1-rc1/enc/iso_8859_9.c
new file mode 100644
index 0000000..4d46e74
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/iso_8859_9.c
@@ -0,0 +1,243 @@
+/**********************************************************************
+  iso8859_9.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c]
+#define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \
+  ((EncISO_8859_9_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncISO_8859_9_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
+  '\370', '\371', '\372', '\373', '\374', '\335', '\376', '\337',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncISO_8859_9_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x01a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+  0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower,
+	      OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    *lower++ = 's';
+    *lower   = 's';
+    (*pp)++;
+    return 2;
+  }
+
+  *lower = ENC_ISO_8859_9_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  int v;
+  const UChar* p = *pp;
+
+  if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    (*pp)++;
+    return TRUE;
+  }
+
+  (*pp)++;
+  v = (EncISO_8859_9_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  if ((v | BIT_CTYPE_LOWER) != 0) {
+    /* 0xdf etc..  are lower case letter, but can't convert. */
+    if (*p >= 0xaa && *p <= 0xba)
+      return FALSE;
+    else
+      return TRUE;
+  }
+
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_ISO_8859_9_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+  { 0xc0, 0xe0 },
+  { 0xc1, 0xe1 },
+  { 0xc2, 0xe2 },
+  { 0xc3, 0xe3 },
+  { 0xc4, 0xe4 },
+  { 0xc5, 0xe5 },
+  { 0xc6, 0xe6 },
+  { 0xc7, 0xe7 },
+  { 0xc8, 0xe8 },
+  { 0xc9, 0xe9 },
+  { 0xca, 0xea },
+  { 0xcb, 0xeb },
+  { 0xcc, 0xec },
+  { 0xcd, 0xed },
+  { 0xce, 0xee },
+  { 0xcf, 0xef },
+
+  { 0xd0, 0xf0 },
+  { 0xd1, 0xf1 },
+  { 0xd2, 0xf2 },
+  { 0xd3, 0xf3 },
+  { 0xd4, 0xf4 },
+  { 0xd5, 0xf5 },
+  { 0xd6, 0xf6 },
+  { 0xd8, 0xf8 },
+  { 0xd9, 0xf9 },
+  { 0xda, 0xfa },
+  { 0xdb, 0xfb },
+  { 0xdc, 0xfc },
+  { 0xdd, 0xfd },
+  { 0xde, 0xfe }
+};
+
+static int
+apply_all_case_fold(OnigCaseFoldType flag,
+			       OnigApplyAllCaseFoldFunc f, void* arg,
+			       OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+             flag, f, arg);
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				      const OnigUChar* p, const OnigUChar* end,
+				      OnigCaseFoldCodeItem items[],
+				      OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(iso_8859_9, ISO_8859_9) = {
+  onigenc_single_byte_mbc_enc_len,
+  "ISO-8859-9",  /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  mbc_case_fold,
+  apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ISO8859-9", "ISO-8859-9")
+
+/*
+ * Name: windows-1254
+ * MIBenum: 2254
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1254.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1254
+ */
+ENC_REPLICATE("Windows-1254", "ISO-8859-9")
+ENC_ALIAS("CP1254", "Windows-1254")
diff --git a/lib/ruby-1.9.1-rc1/enc/koi8_r.c b/lib/ruby-1.9.1-rc1/enc/koi8_r.c
new file mode 100644
index 0000000..fb6e10e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/koi8_r.c
@@ -0,0 +1,219 @@
+/**********************************************************************
+  koi8_r.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_KOI8_R_TO_LOWER_CASE(c) EncKOI8_R_ToLowerCaseTable[c]
+#define ENC_IS_KOI8_R_CTYPE(code,ctype) \
+  ((EncKOI8_R_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncKOI8_R_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+  '\260', '\261', '\262', '\243', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
+  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
+  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
+  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337'
+};
+
+static const unsigned short EncKOI8_R_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x0284, 0x00a0, 0x00a0, 0x10a0, 0x01a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x30e2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2
+};
+
+static int
+koi8_r_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+		     const UChar** pp, const UChar* end ARG_UNUSED,
+		     UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  *lower = ENC_KOI8_R_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
+			const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  int v;
+  const UChar* p = *pp;
+
+  (*pp)++;
+  v = (EncKOI8_R_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+koi8_r_is_code_ctype(OnigCodePoint code, unsigned int ctype,
+		     OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_KOI8_R_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+  { 0xa3, 0xb3 },
+
+  { 0xc0, 0xe0 },
+  { 0xc1, 0xe1 },
+  { 0xc2, 0xe2 },
+  { 0xc3, 0xe3 },
+  { 0xc4, 0xe4 },
+  { 0xc5, 0xe5 },
+  { 0xc6, 0xe6 },
+  { 0xc7, 0xe7 },
+  { 0xc8, 0xe8 },
+  { 0xc9, 0xe9 },
+  { 0xca, 0xea },
+  { 0xcb, 0xeb },
+  { 0xcc, 0xec },
+  { 0xcd, 0xed },
+  { 0xce, 0xee },
+  { 0xcf, 0xef },
+
+  { 0xd0, 0xf0 },
+  { 0xd1, 0xf1 },
+  { 0xd2, 0xf2 },
+  { 0xd3, 0xf3 },
+  { 0xd4, 0xf4 },
+  { 0xd5, 0xf5 },
+  { 0xd6, 0xf6 },
+  { 0xd7, 0xf7 },
+  { 0xd8, 0xf8 },
+  { 0xd9, 0xf9 },
+  { 0xda, 0xfa },
+  { 0xdb, 0xfb },
+  { 0xdc, 0xfc },
+  { 0xdd, 0xfd },
+  { 0xde, 0xfe },
+  { 0xdf, 0xff }
+};
+
+static int
+koi8_r_apply_all_case_fold(OnigCaseFoldType flag,
+			   OnigApplyAllCaseFoldFunc f,
+			   void* arg, OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+             flag, f, arg);
+}
+
+static int
+koi8_r_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+		  const OnigUChar* p, const OnigUChar* end,
+		  OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(koi8_r, KOI8_R) = {
+  onigenc_single_byte_mbc_enc_len,
+  "KOI8-R",       /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  koi8_r_mbc_case_fold,
+  koi8_r_apply_all_case_fold,
+  koi8_r_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  koi8_r_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("CP878", "KOI8-R")
+
diff --git a/lib/ruby-1.9.1-rc1/enc/koi8_u.c b/lib/ruby-1.9.1-rc1/enc/koi8_u.c
new file mode 100644
index 0000000..9bd363d
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/koi8_u.c
@@ -0,0 +1,221 @@
+/**********************************************************************
+  koi8_u.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_KOI8_U_TO_LOWER_CASE(c) EncKOI8_U_ToLowerCaseTable[c]
+#define ENC_IS_KOI8_U_CTYPE(code,ctype) \
+  ((EncKOI8_U_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncKOI8_U_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+  '\260', '\261', '\262', '\243', '\244', '\265', '\246', '\247',
+  '\270', '\271', '\272', '\273', '\274', '\255', '\276', '\277',
+  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
+  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
+  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
+  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
+  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
+  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337'
+};
+
+static const unsigned short EncKOI8_U_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x0284, 0x00a0, 0x00a0, 0x10a0, 0x01a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x30e2, 0x30e2, 0x00a0, 0x30e2, 0x30e2,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x30e2, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x34a2, 0x00a0, 0x34a2, 0x34a2,
+  0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x34a2, 0x00a0, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2
+};
+
+static int
+koi8_u_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+		     const UChar** pp, const UChar* end ARG_UNUSED,
+		     UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  *lower = ENC_KOI8_U_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+#if 0
+static int
+koi8_u_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
+			const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  int v;
+  const UChar* p = *pp;
+
+  (*pp)++;
+  v = (EncKOI8_U_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+  return (v != 0 ? TRUE : FALSE);
+}
+#endif
+
+static int
+koi8_u_is_code_ctype(OnigCodePoint code, unsigned int ctype,
+		     OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_KOI8_U_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+  { 0xa3, 0xb3 },
+  { 0xa4, 0xb4 },
+  { 0xa6, 0xb6 },
+  { 0xa7, 0xb7 },
+  { 0xad, 0xbd },
+
+  { 0xc0, 0xe0 },
+  { 0xc1, 0xe1 },
+  { 0xc2, 0xe2 },
+  { 0xc3, 0xe3 },
+  { 0xc4, 0xe4 },
+  { 0xc5, 0xe5 },
+  { 0xc6, 0xe6 },
+  { 0xc7, 0xe7 },
+  { 0xc8, 0xe8 },
+  { 0xc9, 0xe9 },
+  { 0xca, 0xea },
+  { 0xcb, 0xeb },
+  { 0xcc, 0xec },
+  { 0xcd, 0xed },
+  { 0xce, 0xee },
+  { 0xcf, 0xef },
+
+  { 0xd0, 0xf0 },
+  { 0xd1, 0xf1 },
+  { 0xd2, 0xf2 },
+  { 0xd3, 0xf3 },
+  { 0xd4, 0xf4 },
+  { 0xd5, 0xf5 },
+  { 0xd6, 0xf6 },
+  { 0xd7, 0xf7 },
+  { 0xd8, 0xf8 },
+  { 0xd9, 0xf9 },
+  { 0xda, 0xfa },
+  { 0xdb, 0xfb },
+  { 0xdc, 0xfc },
+  { 0xdd, 0xfd },
+  { 0xde, 0xfe },
+  { 0xdf, 0xff }
+};
+
+static int
+koi8_u_apply_all_case_fold(OnigCaseFoldType flag,
+			   OnigApplyAllCaseFoldFunc f,
+			   void* arg, OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+             flag, f, arg);
+}
+
+static int
+koi8_u_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+		  const OnigUChar* p, const OnigUChar* end,
+		  OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(koi8_u, KOI8_U) = {
+  onigenc_single_byte_mbc_enc_len,
+  "KOI8-U",       /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  koi8_u_mbc_case_fold,
+  koi8_u_apply_all_case_fold,
+  koi8_u_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  koi8_u_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
diff --git a/lib/ruby-1.9.1-rc1/enc/make_encdb.rb b/lib/ruby-1.9.1-rc1/enc/make_encdb.rb
new file mode 100644
index 0000000..5a420ae
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/make_encdb.rb
@@ -0,0 +1,77 @@
+#
+# OnigEncodingDefine(foo, Foo) = {
+#   ..
+#   "Shift_JIS", /* Canonical Name */
+#   ..
+# };
+# ENC_ALIAS("SJIS", "Shift_JIS")
+# ENC_REPLICATE("Windows-31J", "Shift_JIS")
+# ENC_ALIAS("CP932", "Windows-31J")
+#
+
+def check_duplication(defs, name, fn, line)
+  if defs[name]
+    raise ArgumentError, "%s:%d: encoding %s is already registered(%s:%d)" %
+      [fn, line, name, *defs[name]]
+  else
+    defs[name.upcase] = [fn,line]
+  end
+end
+
+count = 0
+lines = []
+encodings = []
+defs = {}
+encdirs = ARGV.dup
+outhdr = encdirs.shift || 'encdb.h'
+encdirs << 'enc' if encdirs.empty?
+files = {}
+encdirs.each do |encdir|
+  next unless File.directory?(encdir)
+  Dir.open(encdir) {|d| d.grep(/.+\.[ch]\z/)}.sort_by {|e|
+    e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten
+  }.each do |fn|
+    next if files[fn]
+    files[fn] = true
+    open(File.join(encdir,fn)) do |f|
+      orig = nil
+      name = nil
+      f.each_line do |line|
+        if (/^OnigEncodingDefine/ =~ line)..(/"(.*?)"/ =~ line)
+          if $1
+            check_duplication(defs, $1, fn, $.)
+            encodings << $1
+            count += 1
+          end
+        else
+          case line
+          when /^\s*rb_enc_register\(\s*"([^"]+)"/
+            count += 1
+            line = nil
+          when /^ENC_REPLICATE\(\s*"([^"]+)"\s*,\s*"([^"]+)"/
+            raise ArgumentError,
+            '%s:%d: ENC_REPLICATE: %s is not defined yet. (replica %s)' %
+              [fn, $., $2, $1] unless defs[$2.upcase]
+            count += 1
+          when /^ENC_ALIAS\(\s*"([^"]+)"\s*,\s*"([^"]+)"/
+            raise ArgumentError,
+            '%s:%d: ENC_ALIAS: %s is not defined yet. (alias %s)' %
+              [fn, $., $2, $1] unless defs[$2.upcase]
+          when /^ENC_DUMMY\(\s*"([^"]+)"/
+            count += 1
+          else
+            next
+          end
+          check_duplication(defs, $1, fn, $.)
+          lines << line.sub(/;.*/m, "").chomp + ";\n" if line
+        end
+      end
+    end
+  end
+end
+
+result = encodings.map {|e| %[ENC_DEFINE("#{e}");\n]}.join + lines.join + 
+  "\n#define ENCODING_COUNT #{count}\n"
+open(outhdr, 'wb') do |f|
+  f.print result
+end
diff --git a/lib/ruby-1.9.1-rc1/enc/make_encmake.rb b/lib/ruby-1.9.1-rc1/enc/make_encmake.rb
new file mode 100644
index 0000000..107a387
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/make_encmake.rb
@@ -0,0 +1,50 @@
+#! ./miniruby
+
+dir = File.expand_path("../..", __FILE__)
+$:.unshift(dir)
+$:.unshift(".")
+if $".grep(/mkmf/).empty?
+  $" << "mkmf.rb"
+  load File.expand_path("lib/mkmf.rb", dir)
+end
+require 'erb'
+
+CONFIG["MAKEDIRS"] ||= '@$(MINIRUBY) -run -e mkdir -- -p'
+
+BUILTIN_ENCS = []
+BUILTIN_TRANSES = []
+ENC_PATTERNS = []
+NOENC_PATTERNS = []
+
+until ARGV.empty?
+  case ARGV[0]
+  when /\A--builtin-encs=/
+    BUILTIN_ENCS.concat $'.split.map {|e| File.basename(e, '.*') << '.c'}
+    ARGV.shift
+  when /\A--builtin-transes=/
+    BUILTIN_TRANSES.concat $'.split.map {|e| File.basename(e, '.*') }
+    ARGV.shift
+  when /\A--encs=/
+    ENC_PATTERNS.concat $'.split
+    ARGV.shift
+  when /\A--no-encs=/
+    NOENC_PATTERNS.concat $'.split
+    ARGV.shift
+  else
+    break
+  end
+end
+
+if File.exist?(depend = File.join($srcdir, "depend"))
+  erb = ERB.new(File.read(depend), nil, '%')
+  erb.filename = depend
+  tmp = erb.result(binding)
+  dep = "\n#### depend ####\n\n" << depend_rules(tmp).join
+else
+  dep = ""
+end
+mkin = File.read(File.join($srcdir, "Makefile.in"))
+mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
+open(ARGV[0], 'wb') {|f|
+  f.puts mkin, dep
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/prelude.rb b/lib/ruby-1.9.1-rc1/enc/prelude.rb
new file mode 100644
index 0000000..a5c78b7
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/prelude.rb
@@ -0,0 +1,6 @@
+%w'enc/encdb enc/trans/transdb'.each do |init|
+  begin
+    require(init)
+  rescue LoadError
+  end
+end
diff --git a/lib/ruby-1.9.1-rc1/enc/shift_jis.c b/lib/ruby-1.9.1-rc1/enc/shift_jis.c
new file mode 100644
index 0000000..b4d8592
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/shift_jis.c
@@ -0,0 +1,399 @@
+/**********************************************************************
+  sjis.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regint.h"
+
+static const int EncLen_SJIS[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1
+};
+
+static const char SJIS_CAN_BE_TRAIL_TABLE[256] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
+};
+
+#define SJIS_ISMB_FIRST(byte)  (EncLen_SJIS[byte] > 1)
+#define SJIS_ISMB_TRAIL(byte)  SJIS_CAN_BE_TRAIL_TABLE[(byte)]
+
+typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ F, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* f */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, F, F, F
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, F,
+    /* 8 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 9 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* d */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* e */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* f */ A, A, A, A, A, A, A, A, A, A, A, A, A, F, F, F
+  }
+};
+#undef A
+#undef F
+
+static int
+mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s;
+  s = trans[0][firstbyte];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_SJIS[firstbyte]-1);
+  s = trans[s][*p++];
+  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2) :
+                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static int
+code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256) {
+    if (EncLen_SJIS[(int )code] == 1)
+      return 1;
+    else
+      return 0;
+  }
+  else if (code <= 0xffff) {
+    return 2;
+  }
+  else
+    return ONIGERR_INVALID_CODE_POINT_VALUE;
+}
+
+static OnigCodePoint
+mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  int c, i, len;
+  OnigCodePoint n;
+
+  len = enclen(enc, p, end);
+  c = *p++;
+  n = c;
+  if (len == 1) return n;
+
+  for (i = 1; i < len; i++) {
+    if (p >= end) break;
+    c = *p++;
+    n <<= 8;  n += c;
+  }
+  return n;
+}
+
+static int
+code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
+{
+  UChar *p = buf;
+
+  if ((code & 0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
+  *p++ = (UChar )(code & 0xff);
+
+#if 0
+  if (enclen(enc, buf) != (p - buf))
+    return REGERR_INVALID_CODE_POINT_VALUE;
+#endif
+  return p - buf;
+}
+
+static int
+mbc_case_fold(OnigCaseFoldType flag,
+	      const UChar** pp, const UChar* end, UChar* lower,
+	      OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_MBC_ASCII(p)) {
+    *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    (*pp)++;
+    return 1;
+  }
+  else {
+    int i;
+    int len = enclen(enc, p, end);
+
+    for (i = 0; i < len; i++) {
+      *lower++ = *p++;
+    }
+    (*pp) += len;
+    return len; /* return byte length of converted char to lower */
+  }
+}
+
+#if 0
+static int
+is_mbc_ambiguous(OnigCaseFoldType flag,
+		 const UChar** pp, const UChar* end)
+{
+  return onigenc_mbn_is_mbc_ambiguous(enc, flag, pp, end);
+                                      
+}
+#endif
+
+#if 0
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype)
+{
+  if (code < 128)
+    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+  else {
+    if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+      return (code_to_mbclen(code) > 1 ? TRUE : FALSE);
+    }
+  }
+
+  return FALSE;
+}
+#endif
+
+static UChar*
+left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc)
+{
+  const UChar *p;
+  int len;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  if (SJIS_ISMB_TRAIL(*p)) {
+    while (p > start) {
+      if (! SJIS_ISMB_FIRST(*--p)) {
+	p++;
+	break;
+      }
+    } 
+  }
+  len = enclen(enc, p, end);
+  if (p + len > s) return (UChar* )p;
+  p += len;
+  return (UChar* )(p + ((s - p) & ~1));
+}
+
+static int
+is_allowed_reverse_match(const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar c = *s;
+  return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
+}
+
+
+static int PropertyInited = 0;
+static const OnigCodePoint** PropertyList;
+static int PropertyListNum;
+static int PropertyListSize;
+static hash_table_type* PropertyNameTable;
+
+static const OnigCodePoint CR_Hiragana[] = {
+  1,
+  0x829f, 0x82f1
+}; /* CR_Hiragana */
+
+static const OnigCodePoint CR_Katakana[] = {
+  4,
+  0x00a6, 0x00af,
+  0x00b1, 0x00dd,
+  0x8340, 0x837e,
+  0x8380, 0x8396,
+}; /* CR_Katakana */
+
+static int
+init_property_list(void)
+{
+  int r;
+
+  PROPERTY_LIST_ADD_PROP("Hiragana", CR_Hiragana);
+  PROPERTY_LIST_ADD_PROP("Katakana", CR_Katakana);
+  PropertyInited = 1;
+
+ end:
+  return r;
+}
+
+static int
+property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
+{
+  st_data_t ctype;
+
+  PROPERTY_LIST_INIT_CHECK;
+
+  if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
+    return onigenc_minimum_property_name_to_ctype(enc, p, end);
+  }
+
+  return ctype;
+}
+
+static int
+is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
+{
+  if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+    if (code < 128)
+      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
+    else {
+      if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) {
+	return TRUE;
+      }
+    }
+  }
+  else {
+    PROPERTY_LIST_INIT_CHECK;
+
+    ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+    if (ctype >= (unsigned int )PropertyListNum)
+      return ONIGERR_TYPE_BUG;
+
+    return onig_is_in_code_range((UChar* )PropertyList[ctype], code);
+  }
+
+  return FALSE;
+}
+
+static int
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+		     const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
+{
+  if (ctype <= ONIGENC_MAX_STD_CTYPE) {
+    return ONIG_NO_SUPPORT_CONFIG;
+  }
+  else {
+    *sb_out = 0x80;
+
+    PROPERTY_LIST_INIT_CHECK;
+
+    ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
+    if (ctype >= (OnigCtype )PropertyListNum)
+      return ONIGERR_TYPE_BUG;
+
+    *ranges = PropertyList[ctype];
+    return 0;
+  }
+}
+
+OnigEncodingDefine(shift_jis, Shift_JIS) = {
+  mbc_enc_len,
+  "Shift_JIS",   /* name */
+  2,             /* max byte length */
+  1,             /* min byte length */
+  onigenc_is_mbc_newline_0x0a,
+  mbc_to_code,
+  code_to_mbclen,
+  code_to_mbc,
+  mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  property_name_to_ctype,
+  is_code_ctype,
+  get_ctype_code_range,
+  left_adjust_char_head,
+  is_allowed_reverse_match,
+  0
+};
+/*
+ * Name: Shift_JIS
+ * MIBenum: 17
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://ja.wikipedia.org/wiki/Shift_JIS
+ */
+ENC_ALIAS("SJIS", "Shift_JIS")
+
+/*
+ * Name: Windows-31J
+ * MIBenum: 2024
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/dbcs/932.mspx
+ * Link: http://ja.wikipedia.org/wiki/Windows-31J
+ * Link: http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/windows-932-2000.ucm
+ */
+ENC_REPLICATE("Windows-31J", "Shift_JIS")
+ENC_ALIAS("CP932", "Windows-31J")
+ENC_ALIAS("csWindows31J", "Windows-31J") /* IANA.  IE6 don't accept Windows-31J but csWindows31J. */
+
+/*
+ * Name: MacJapanese
+ * Link: http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/JAPANESE.TXT
+ * Link: http://ja.wikipedia.org/wiki/MacJapanese
+ */
+ENC_REPLICATE("MacJapanese", "Shift_JIS")
+ENC_ALIAS("MacJapan", "MacJapanese")
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932UDA%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932UDA%UCS.src
new file mode 100644
index 0000000..c490485
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932UDA%UCS.src
@@ -0,0 +1,1912 @@
+# $NetBSD: CP932UDA%UCS.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"CP932UDA/UCS"
+SRC_ZONE	0x7F-0x92 / 0x21-0x7E / 8
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0x7F21 = 0xE000
+0x7F22 = 0xE001
+0x7F23 = 0xE002
+0x7F24 = 0xE003
+0x7F25 = 0xE004
+0x7F26 = 0xE005
+0x7F27 = 0xE006
+0x7F28 = 0xE007
+0x7F29 = 0xE008
+0x7F2A = 0xE009
+0x7F2B = 0xE00A
+0x7F2C = 0xE00B
+0x7F2D = 0xE00C
+0x7F2E = 0xE00D
+0x7F2F = 0xE00E
+0x7F30 = 0xE00F
+0x7F31 = 0xE010
+0x7F32 = 0xE011
+0x7F33 = 0xE012
+0x7F34 = 0xE013
+0x7F35 = 0xE014
+0x7F36 = 0xE015
+0x7F37 = 0xE016
+0x7F38 = 0xE017
+0x7F39 = 0xE018
+0x7F3A = 0xE019
+0x7F3B = 0xE01A
+0x7F3C = 0xE01B
+0x7F3D = 0xE01C
+0x7F3E = 0xE01D
+0x7F3F = 0xE01E
+0x7F40 = 0xE01F
+0x7F41 = 0xE020
+0x7F42 = 0xE021
+0x7F43 = 0xE022
+0x7F44 = 0xE023
+0x7F45 = 0xE024
+0x7F46 = 0xE025
+0x7F47 = 0xE026
+0x7F48 = 0xE027
+0x7F49 = 0xE028
+0x7F4A = 0xE029
+0x7F4B = 0xE02A
+0x7F4C = 0xE02B
+0x7F4D = 0xE02C
+0x7F4E = 0xE02D
+0x7F4F = 0xE02E
+0x7F50 = 0xE02F
+0x7F51 = 0xE030
+0x7F52 = 0xE031
+0x7F53 = 0xE032
+0x7F54 = 0xE033
+0x7F55 = 0xE034
+0x7F56 = 0xE035
+0x7F57 = 0xE036
+0x7F58 = 0xE037
+0x7F59 = 0xE038
+0x7F5A = 0xE039
+0x7F5B = 0xE03A
+0x7F5C = 0xE03B
+0x7F5D = 0xE03C
+0x7F5E = 0xE03D
+0x7F5F = 0xE03E
+0x7F60 = 0xE03F
+0x7F61 = 0xE040
+0x7F62 = 0xE041
+0x7F63 = 0xE042
+0x7F64 = 0xE043
+0x7F65 = 0xE044
+0x7F66 = 0xE045
+0x7F67 = 0xE046
+0x7F68 = 0xE047
+0x7F69 = 0xE048
+0x7F6A = 0xE049
+0x7F6B = 0xE04A
+0x7F6C = 0xE04B
+0x7F6D = 0xE04C
+0x7F6E = 0xE04D
+0x7F6F = 0xE04E
+0x7F70 = 0xE04F
+0x7F71 = 0xE050
+0x7F72 = 0xE051
+0x7F73 = 0xE052
+0x7F74 = 0xE053
+0x7F75 = 0xE054
+0x7F76 = 0xE055
+0x7F77 = 0xE056
+0x7F78 = 0xE057
+0x7F79 = 0xE058
+0x7F7A = 0xE059
+0x7F7B = 0xE05A
+0x7F7C = 0xE05B
+0x7F7D = 0xE05C
+0x7F7E = 0xE05D
+0x8021 = 0xE05E
+0x8022 = 0xE05F
+0x8023 = 0xE060
+0x8024 = 0xE061
+0x8025 = 0xE062
+0x8026 = 0xE063
+0x8027 = 0xE064
+0x8028 = 0xE065
+0x8029 = 0xE066
+0x802A = 0xE067
+0x802B = 0xE068
+0x802C = 0xE069
+0x802D = 0xE06A
+0x802E = 0xE06B
+0x802F = 0xE06C
+0x8030 = 0xE06D
+0x8031 = 0xE06E
+0x8032 = 0xE06F
+0x8033 = 0xE070
+0x8034 = 0xE071
+0x8035 = 0xE072
+0x8036 = 0xE073
+0x8037 = 0xE074
+0x8038 = 0xE075
+0x8039 = 0xE076
+0x803A = 0xE077
+0x803B = 0xE078
+0x803C = 0xE079
+0x803D = 0xE07A
+0x803E = 0xE07B
+0x803F = 0xE07C
+0x8040 = 0xE07D
+0x8041 = 0xE07E
+0x8042 = 0xE07F
+0x8043 = 0xE080
+0x8044 = 0xE081
+0x8045 = 0xE082
+0x8046 = 0xE083
+0x8047 = 0xE084
+0x8048 = 0xE085
+0x8049 = 0xE086
+0x804A = 0xE087
+0x804B = 0xE088
+0x804C = 0xE089
+0x804D = 0xE08A
+0x804E = 0xE08B
+0x804F = 0xE08C
+0x8050 = 0xE08D
+0x8051 = 0xE08E
+0x8052 = 0xE08F
+0x8053 = 0xE090
+0x8054 = 0xE091
+0x8055 = 0xE092
+0x8056 = 0xE093
+0x8057 = 0xE094
+0x8058 = 0xE095
+0x8059 = 0xE096
+0x805A = 0xE097
+0x805B = 0xE098
+0x805C = 0xE099
+0x805D = 0xE09A
+0x805E = 0xE09B
+0x805F = 0xE09C
+0x8060 = 0xE09D
+0x8061 = 0xE09E
+0x8062 = 0xE09F
+0x8063 = 0xE0A0
+0x8064 = 0xE0A1
+0x8065 = 0xE0A2
+0x8066 = 0xE0A3
+0x8067 = 0xE0A4
+0x8068 = 0xE0A5
+0x8069 = 0xE0A6
+0x806A = 0xE0A7
+0x806B = 0xE0A8
+0x806C = 0xE0A9
+0x806D = 0xE0AA
+0x806E = 0xE0AB
+0x806F = 0xE0AC
+0x8070 = 0xE0AD
+0x8071 = 0xE0AE
+0x8072 = 0xE0AF
+0x8073 = 0xE0B0
+0x8074 = 0xE0B1
+0x8075 = 0xE0B2
+0x8076 = 0xE0B3
+0x8077 = 0xE0B4
+0x8078 = 0xE0B5
+0x8079 = 0xE0B6
+0x807A = 0xE0B7
+0x807B = 0xE0B8
+0x807C = 0xE0B9
+0x807D = 0xE0BA
+0x807E = 0xE0BB
+0x8121 = 0xE0BC
+0x8122 = 0xE0BD
+0x8123 = 0xE0BE
+0x8124 = 0xE0BF
+0x8125 = 0xE0C0
+0x8126 = 0xE0C1
+0x8127 = 0xE0C2
+0x8128 = 0xE0C3
+0x8129 = 0xE0C4
+0x812A = 0xE0C5
+0x812B = 0xE0C6
+0x812C = 0xE0C7
+0x812D = 0xE0C8
+0x812E = 0xE0C9
+0x812F = 0xE0CA
+0x8130 = 0xE0CB
+0x8131 = 0xE0CC
+0x8132 = 0xE0CD
+0x8133 = 0xE0CE
+0x8134 = 0xE0CF
+0x8135 = 0xE0D0
+0x8136 = 0xE0D1
+0x8137 = 0xE0D2
+0x8138 = 0xE0D3
+0x8139 = 0xE0D4
+0x813A = 0xE0D5
+0x813B = 0xE0D6
+0x813C = 0xE0D7
+0x813D = 0xE0D8
+0x813E = 0xE0D9
+0x813F = 0xE0DA
+0x8140 = 0xE0DB
+0x8141 = 0xE0DC
+0x8142 = 0xE0DD
+0x8143 = 0xE0DE
+0x8144 = 0xE0DF
+0x8145 = 0xE0E0
+0x8146 = 0xE0E1
+0x8147 = 0xE0E2
+0x8148 = 0xE0E3
+0x8149 = 0xE0E4
+0x814A = 0xE0E5
+0x814B = 0xE0E6
+0x814C = 0xE0E7
+0x814D = 0xE0E8
+0x814E = 0xE0E9
+0x814F = 0xE0EA
+0x8150 = 0xE0EB
+0x8151 = 0xE0EC
+0x8152 = 0xE0ED
+0x8153 = 0xE0EE
+0x8154 = 0xE0EF
+0x8155 = 0xE0F0
+0x8156 = 0xE0F1
+0x8157 = 0xE0F2
+0x8158 = 0xE0F3
+0x8159 = 0xE0F4
+0x815A = 0xE0F5
+0x815B = 0xE0F6
+0x815C = 0xE0F7
+0x815D = 0xE0F8
+0x815E = 0xE0F9
+0x815F = 0xE0FA
+0x8160 = 0xE0FB
+0x8161 = 0xE0FC
+0x8162 = 0xE0FD
+0x8163 = 0xE0FE
+0x8164 = 0xE0FF
+0x8165 = 0xE100
+0x8166 = 0xE101
+0x8167 = 0xE102
+0x8168 = 0xE103
+0x8169 = 0xE104
+0x816A = 0xE105
+0x816B = 0xE106
+0x816C = 0xE107
+0x816D = 0xE108
+0x816E = 0xE109
+0x816F = 0xE10A
+0x8170 = 0xE10B
+0x8171 = 0xE10C
+0x8172 = 0xE10D
+0x8173 = 0xE10E
+0x8174 = 0xE10F
+0x8175 = 0xE110
+0x8176 = 0xE111
+0x8177 = 0xE112
+0x8178 = 0xE113
+0x8179 = 0xE114
+0x817A = 0xE115
+0x817B = 0xE116
+0x817C = 0xE117
+0x817D = 0xE118
+0x817E = 0xE119
+0x8221 = 0xE11A
+0x8222 = 0xE11B
+0x8223 = 0xE11C
+0x8224 = 0xE11D
+0x8225 = 0xE11E
+0x8226 = 0xE11F
+0x8227 = 0xE120
+0x8228 = 0xE121
+0x8229 = 0xE122
+0x822A = 0xE123
+0x822B = 0xE124
+0x822C = 0xE125
+0x822D = 0xE126
+0x822E = 0xE127
+0x822F = 0xE128
+0x8230 = 0xE129
+0x8231 = 0xE12A
+0x8232 = 0xE12B
+0x8233 = 0xE12C
+0x8234 = 0xE12D
+0x8235 = 0xE12E
+0x8236 = 0xE12F
+0x8237 = 0xE130
+0x8238 = 0xE131
+0x8239 = 0xE132
+0x823A = 0xE133
+0x823B = 0xE134
+0x823C = 0xE135
+0x823D = 0xE136
+0x823E = 0xE137
+0x823F = 0xE138
+0x8240 = 0xE139
+0x8241 = 0xE13A
+0x8242 = 0xE13B
+0x8243 = 0xE13C
+0x8244 = 0xE13D
+0x8245 = 0xE13E
+0x8246 = 0xE13F
+0x8247 = 0xE140
+0x8248 = 0xE141
+0x8249 = 0xE142
+0x824A = 0xE143
+0x824B = 0xE144
+0x824C = 0xE145
+0x824D = 0xE146
+0x824E = 0xE147
+0x824F = 0xE148
+0x8250 = 0xE149
+0x8251 = 0xE14A
+0x8252 = 0xE14B
+0x8253 = 0xE14C
+0x8254 = 0xE14D
+0x8255 = 0xE14E
+0x8256 = 0xE14F
+0x8257 = 0xE150
+0x8258 = 0xE151
+0x8259 = 0xE152
+0x825A = 0xE153
+0x825B = 0xE154
+0x825C = 0xE155
+0x825D = 0xE156
+0x825E = 0xE157
+0x825F = 0xE158
+0x8260 = 0xE159
+0x8261 = 0xE15A
+0x8262 = 0xE15B
+0x8263 = 0xE15C
+0x8264 = 0xE15D
+0x8265 = 0xE15E
+0x8266 = 0xE15F
+0x8267 = 0xE160
+0x8268 = 0xE161
+0x8269 = 0xE162
+0x826A = 0xE163
+0x826B = 0xE164
+0x826C = 0xE165
+0x826D = 0xE166
+0x826E = 0xE167
+0x826F = 0xE168
+0x8270 = 0xE169
+0x8271 = 0xE16A
+0x8272 = 0xE16B
+0x8273 = 0xE16C
+0x8274 = 0xE16D
+0x8275 = 0xE16E
+0x8276 = 0xE16F
+0x8277 = 0xE170
+0x8278 = 0xE171
+0x8279 = 0xE172
+0x827A = 0xE173
+0x827B = 0xE174
+0x827C = 0xE175
+0x827D = 0xE176
+0x827E = 0xE177
+0x8321 = 0xE178
+0x8322 = 0xE179
+0x8323 = 0xE17A
+0x8324 = 0xE17B
+0x8325 = 0xE17C
+0x8326 = 0xE17D
+0x8327 = 0xE17E
+0x8328 = 0xE17F
+0x8329 = 0xE180
+0x832A = 0xE181
+0x832B = 0xE182
+0x832C = 0xE183
+0x832D = 0xE184
+0x832E = 0xE185
+0x832F = 0xE186
+0x8330 = 0xE187
+0x8331 = 0xE188
+0x8332 = 0xE189
+0x8333 = 0xE18A
+0x8334 = 0xE18B
+0x8335 = 0xE18C
+0x8336 = 0xE18D
+0x8337 = 0xE18E
+0x8338 = 0xE18F
+0x8339 = 0xE190
+0x833A = 0xE191
+0x833B = 0xE192
+0x833C = 0xE193
+0x833D = 0xE194
+0x833E = 0xE195
+0x833F = 0xE196
+0x8340 = 0xE197
+0x8341 = 0xE198
+0x8342 = 0xE199
+0x8343 = 0xE19A
+0x8344 = 0xE19B
+0x8345 = 0xE19C
+0x8346 = 0xE19D
+0x8347 = 0xE19E
+0x8348 = 0xE19F
+0x8349 = 0xE1A0
+0x834A = 0xE1A1
+0x834B = 0xE1A2
+0x834C = 0xE1A3
+0x834D = 0xE1A4
+0x834E = 0xE1A5
+0x834F = 0xE1A6
+0x8350 = 0xE1A7
+0x8351 = 0xE1A8
+0x8352 = 0xE1A9
+0x8353 = 0xE1AA
+0x8354 = 0xE1AB
+0x8355 = 0xE1AC
+0x8356 = 0xE1AD
+0x8357 = 0xE1AE
+0x8358 = 0xE1AF
+0x8359 = 0xE1B0
+0x835A = 0xE1B1
+0x835B = 0xE1B2
+0x835C = 0xE1B3
+0x835D = 0xE1B4
+0x835E = 0xE1B5
+0x835F = 0xE1B6
+0x8360 = 0xE1B7
+0x8361 = 0xE1B8
+0x8362 = 0xE1B9
+0x8363 = 0xE1BA
+0x8364 = 0xE1BB
+0x8365 = 0xE1BC
+0x8366 = 0xE1BD
+0x8367 = 0xE1BE
+0x8368 = 0xE1BF
+0x8369 = 0xE1C0
+0x836A = 0xE1C1
+0x836B = 0xE1C2
+0x836C = 0xE1C3
+0x836D = 0xE1C4
+0x836E = 0xE1C5
+0x836F = 0xE1C6
+0x8370 = 0xE1C7
+0x8371 = 0xE1C8
+0x8372 = 0xE1C9
+0x8373 = 0xE1CA
+0x8374 = 0xE1CB
+0x8375 = 0xE1CC
+0x8376 = 0xE1CD
+0x8377 = 0xE1CE
+0x8378 = 0xE1CF
+0x8379 = 0xE1D0
+0x837A = 0xE1D1
+0x837B = 0xE1D2
+0x837C = 0xE1D3
+0x837D = 0xE1D4
+0x837E = 0xE1D5
+0x8421 = 0xE1D6
+0x8422 = 0xE1D7
+0x8423 = 0xE1D8
+0x8424 = 0xE1D9
+0x8425 = 0xE1DA
+0x8426 = 0xE1DB
+0x8427 = 0xE1DC
+0x8428 = 0xE1DD
+0x8429 = 0xE1DE
+0x842A = 0xE1DF
+0x842B = 0xE1E0
+0x842C = 0xE1E1
+0x842D = 0xE1E2
+0x842E = 0xE1E3
+0x842F = 0xE1E4
+0x8430 = 0xE1E5
+0x8431 = 0xE1E6
+0x8432 = 0xE1E7
+0x8433 = 0xE1E8
+0x8434 = 0xE1E9
+0x8435 = 0xE1EA
+0x8436 = 0xE1EB
+0x8437 = 0xE1EC
+0x8438 = 0xE1ED
+0x8439 = 0xE1EE
+0x843A = 0xE1EF
+0x843B = 0xE1F0
+0x843C = 0xE1F1
+0x843D = 0xE1F2
+0x843E = 0xE1F3
+0x843F = 0xE1F4
+0x8440 = 0xE1F5
+0x8441 = 0xE1F6
+0x8442 = 0xE1F7
+0x8443 = 0xE1F8
+0x8444 = 0xE1F9
+0x8445 = 0xE1FA
+0x8446 = 0xE1FB
+0x8447 = 0xE1FC
+0x8448 = 0xE1FD
+0x8449 = 0xE1FE
+0x844A = 0xE1FF
+0x844B = 0xE200
+0x844C = 0xE201
+0x844D = 0xE202
+0x844E = 0xE203
+0x844F = 0xE204
+0x8450 = 0xE205
+0x8451 = 0xE206
+0x8452 = 0xE207
+0x8453 = 0xE208
+0x8454 = 0xE209
+0x8455 = 0xE20A
+0x8456 = 0xE20B
+0x8457 = 0xE20C
+0x8458 = 0xE20D
+0x8459 = 0xE20E
+0x845A = 0xE20F
+0x845B = 0xE210
+0x845C = 0xE211
+0x845D = 0xE212
+0x845E = 0xE213
+0x845F = 0xE214
+0x8460 = 0xE215
+0x8461 = 0xE216
+0x8462 = 0xE217
+0x8463 = 0xE218
+0x8464 = 0xE219
+0x8465 = 0xE21A
+0x8466 = 0xE21B
+0x8467 = 0xE21C
+0x8468 = 0xE21D
+0x8469 = 0xE21E
+0x846A = 0xE21F
+0x846B = 0xE220
+0x846C = 0xE221
+0x846D = 0xE222
+0x846E = 0xE223
+0x846F = 0xE224
+0x8470 = 0xE225
+0x8471 = 0xE226
+0x8472 = 0xE227
+0x8473 = 0xE228
+0x8474 = 0xE229
+0x8475 = 0xE22A
+0x8476 = 0xE22B
+0x8477 = 0xE22C
+0x8478 = 0xE22D
+0x8479 = 0xE22E
+0x847A = 0xE22F
+0x847B = 0xE230
+0x847C = 0xE231
+0x847D = 0xE232
+0x847E = 0xE233
+0x8521 = 0xE234
+0x8522 = 0xE235
+0x8523 = 0xE236
+0x8524 = 0xE237
+0x8525 = 0xE238
+0x8526 = 0xE239
+0x8527 = 0xE23A
+0x8528 = 0xE23B
+0x8529 = 0xE23C
+0x852A = 0xE23D
+0x852B = 0xE23E
+0x852C = 0xE23F
+0x852D = 0xE240
+0x852E = 0xE241
+0x852F = 0xE242
+0x8530 = 0xE243
+0x8531 = 0xE244
+0x8532 = 0xE245
+0x8533 = 0xE246
+0x8534 = 0xE247
+0x8535 = 0xE248
+0x8536 = 0xE249
+0x8537 = 0xE24A
+0x8538 = 0xE24B
+0x8539 = 0xE24C
+0x853A = 0xE24D
+0x853B = 0xE24E
+0x853C = 0xE24F
+0x853D = 0xE250
+0x853E = 0xE251
+0x853F = 0xE252
+0x8540 = 0xE253
+0x8541 = 0xE254
+0x8542 = 0xE255
+0x8543 = 0xE256
+0x8544 = 0xE257
+0x8545 = 0xE258
+0x8546 = 0xE259
+0x8547 = 0xE25A
+0x8548 = 0xE25B
+0x8549 = 0xE25C
+0x854A = 0xE25D
+0x854B = 0xE25E
+0x854C = 0xE25F
+0x854D = 0xE260
+0x854E = 0xE261
+0x854F = 0xE262
+0x8550 = 0xE263
+0x8551 = 0xE264
+0x8552 = 0xE265
+0x8553 = 0xE266
+0x8554 = 0xE267
+0x8555 = 0xE268
+0x8556 = 0xE269
+0x8557 = 0xE26A
+0x8558 = 0xE26B
+0x8559 = 0xE26C
+0x855A = 0xE26D
+0x855B = 0xE26E
+0x855C = 0xE26F
+0x855D = 0xE270
+0x855E = 0xE271
+0x855F = 0xE272
+0x8560 = 0xE273
+0x8561 = 0xE274
+0x8562 = 0xE275
+0x8563 = 0xE276
+0x8564 = 0xE277
+0x8565 = 0xE278
+0x8566 = 0xE279
+0x8567 = 0xE27A
+0x8568 = 0xE27B
+0x8569 = 0xE27C
+0x856A = 0xE27D
+0x856B = 0xE27E
+0x856C = 0xE27F
+0x856D = 0xE280
+0x856E = 0xE281
+0x856F = 0xE282
+0x8570 = 0xE283
+0x8571 = 0xE284
+0x8572 = 0xE285
+0x8573 = 0xE286
+0x8574 = 0xE287
+0x8575 = 0xE288
+0x8576 = 0xE289
+0x8577 = 0xE28A
+0x8578 = 0xE28B
+0x8579 = 0xE28C
+0x857A = 0xE28D
+0x857B = 0xE28E
+0x857C = 0xE28F
+0x857D = 0xE290
+0x857E = 0xE291
+0x8621 = 0xE292
+0x8622 = 0xE293
+0x8623 = 0xE294
+0x8624 = 0xE295
+0x8625 = 0xE296
+0x8626 = 0xE297
+0x8627 = 0xE298
+0x8628 = 0xE299
+0x8629 = 0xE29A
+0x862A = 0xE29B
+0x862B = 0xE29C
+0x862C = 0xE29D
+0x862D = 0xE29E
+0x862E = 0xE29F
+0x862F = 0xE2A0
+0x8630 = 0xE2A1
+0x8631 = 0xE2A2
+0x8632 = 0xE2A3
+0x8633 = 0xE2A4
+0x8634 = 0xE2A5
+0x8635 = 0xE2A6
+0x8636 = 0xE2A7
+0x8637 = 0xE2A8
+0x8638 = 0xE2A9
+0x8639 = 0xE2AA
+0x863A = 0xE2AB
+0x863B = 0xE2AC
+0x863C = 0xE2AD
+0x863D = 0xE2AE
+0x863E = 0xE2AF
+0x863F = 0xE2B0
+0x8640 = 0xE2B1
+0x8641 = 0xE2B2
+0x8642 = 0xE2B3
+0x8643 = 0xE2B4
+0x8644 = 0xE2B5
+0x8645 = 0xE2B6
+0x8646 = 0xE2B7
+0x8647 = 0xE2B8
+0x8648 = 0xE2B9
+0x8649 = 0xE2BA
+0x864A = 0xE2BB
+0x864B = 0xE2BC
+0x864C = 0xE2BD
+0x864D = 0xE2BE
+0x864E = 0xE2BF
+0x864F = 0xE2C0
+0x8650 = 0xE2C1
+0x8651 = 0xE2C2
+0x8652 = 0xE2C3
+0x8653 = 0xE2C4
+0x8654 = 0xE2C5
+0x8655 = 0xE2C6
+0x8656 = 0xE2C7
+0x8657 = 0xE2C8
+0x8658 = 0xE2C9
+0x8659 = 0xE2CA
+0x865A = 0xE2CB
+0x865B = 0xE2CC
+0x865C = 0xE2CD
+0x865D = 0xE2CE
+0x865E = 0xE2CF
+0x865F = 0xE2D0
+0x8660 = 0xE2D1
+0x8661 = 0xE2D2
+0x8662 = 0xE2D3
+0x8663 = 0xE2D4
+0x8664 = 0xE2D5
+0x8665 = 0xE2D6
+0x8666 = 0xE2D7
+0x8667 = 0xE2D8
+0x8668 = 0xE2D9
+0x8669 = 0xE2DA
+0x866A = 0xE2DB
+0x866B = 0xE2DC
+0x866C = 0xE2DD
+0x866D = 0xE2DE
+0x866E = 0xE2DF
+0x866F = 0xE2E0
+0x8670 = 0xE2E1
+0x8671 = 0xE2E2
+0x8672 = 0xE2E3
+0x8673 = 0xE2E4
+0x8674 = 0xE2E5
+0x8675 = 0xE2E6
+0x8676 = 0xE2E7
+0x8677 = 0xE2E8
+0x8678 = 0xE2E9
+0x8679 = 0xE2EA
+0x867A = 0xE2EB
+0x867B = 0xE2EC
+0x867C = 0xE2ED
+0x867D = 0xE2EE
+0x867E = 0xE2EF
+0x8721 = 0xE2F0
+0x8722 = 0xE2F1
+0x8723 = 0xE2F2
+0x8724 = 0xE2F3
+0x8725 = 0xE2F4
+0x8726 = 0xE2F5
+0x8727 = 0xE2F6
+0x8728 = 0xE2F7
+0x8729 = 0xE2F8
+0x872A = 0xE2F9
+0x872B = 0xE2FA
+0x872C = 0xE2FB
+0x872D = 0xE2FC
+0x872E = 0xE2FD
+0x872F = 0xE2FE
+0x8730 = 0xE2FF
+0x8731 = 0xE300
+0x8732 = 0xE301
+0x8733 = 0xE302
+0x8734 = 0xE303
+0x8735 = 0xE304
+0x8736 = 0xE305
+0x8737 = 0xE306
+0x8738 = 0xE307
+0x8739 = 0xE308
+0x873A = 0xE309
+0x873B = 0xE30A
+0x873C = 0xE30B
+0x873D = 0xE30C
+0x873E = 0xE30D
+0x873F = 0xE30E
+0x8740 = 0xE30F
+0x8741 = 0xE310
+0x8742 = 0xE311
+0x8743 = 0xE312
+0x8744 = 0xE313
+0x8745 = 0xE314
+0x8746 = 0xE315
+0x8747 = 0xE316
+0x8748 = 0xE317
+0x8749 = 0xE318
+0x874A = 0xE319
+0x874B = 0xE31A
+0x874C = 0xE31B
+0x874D = 0xE31C
+0x874E = 0xE31D
+0x874F = 0xE31E
+0x8750 = 0xE31F
+0x8751 = 0xE320
+0x8752 = 0xE321
+0x8753 = 0xE322
+0x8754 = 0xE323
+0x8755 = 0xE324
+0x8756 = 0xE325
+0x8757 = 0xE326
+0x8758 = 0xE327
+0x8759 = 0xE328
+0x875A = 0xE329
+0x875B = 0xE32A
+0x875C = 0xE32B
+0x875D = 0xE32C
+0x875E = 0xE32D
+0x875F = 0xE32E
+0x8760 = 0xE32F
+0x8761 = 0xE330
+0x8762 = 0xE331
+0x8763 = 0xE332
+0x8764 = 0xE333
+0x8765 = 0xE334
+0x8766 = 0xE335
+0x8767 = 0xE336
+0x8768 = 0xE337
+0x8769 = 0xE338
+0x876A = 0xE339
+0x876B = 0xE33A
+0x876C = 0xE33B
+0x876D = 0xE33C
+0x876E = 0xE33D
+0x876F = 0xE33E
+0x8770 = 0xE33F
+0x8771 = 0xE340
+0x8772 = 0xE341
+0x8773 = 0xE342
+0x8774 = 0xE343
+0x8775 = 0xE344
+0x8776 = 0xE345
+0x8777 = 0xE346
+0x8778 = 0xE347
+0x8779 = 0xE348
+0x877A = 0xE349
+0x877B = 0xE34A
+0x877C = 0xE34B
+0x877D = 0xE34C
+0x877E = 0xE34D
+0x8821 = 0xE34E
+0x8822 = 0xE34F
+0x8823 = 0xE350
+0x8824 = 0xE351
+0x8825 = 0xE352
+0x8826 = 0xE353
+0x8827 = 0xE354
+0x8828 = 0xE355
+0x8829 = 0xE356
+0x882A = 0xE357
+0x882B = 0xE358
+0x882C = 0xE359
+0x882D = 0xE35A
+0x882E = 0xE35B
+0x882F = 0xE35C
+0x8830 = 0xE35D
+0x8831 = 0xE35E
+0x8832 = 0xE35F
+0x8833 = 0xE360
+0x8834 = 0xE361
+0x8835 = 0xE362
+0x8836 = 0xE363
+0x8837 = 0xE364
+0x8838 = 0xE365
+0x8839 = 0xE366
+0x883A = 0xE367
+0x883B = 0xE368
+0x883C = 0xE369
+0x883D = 0xE36A
+0x883E = 0xE36B
+0x883F = 0xE36C
+0x8840 = 0xE36D
+0x8841 = 0xE36E
+0x8842 = 0xE36F
+0x8843 = 0xE370
+0x8844 = 0xE371
+0x8845 = 0xE372
+0x8846 = 0xE373
+0x8847 = 0xE374
+0x8848 = 0xE375
+0x8849 = 0xE376
+0x884A = 0xE377
+0x884B = 0xE378
+0x884C = 0xE379
+0x884D = 0xE37A
+0x884E = 0xE37B
+0x884F = 0xE37C
+0x8850 = 0xE37D
+0x8851 = 0xE37E
+0x8852 = 0xE37F
+0x8853 = 0xE380
+0x8854 = 0xE381
+0x8855 = 0xE382
+0x8856 = 0xE383
+0x8857 = 0xE384
+0x8858 = 0xE385
+0x8859 = 0xE386
+0x885A = 0xE387
+0x885B = 0xE388
+0x885C = 0xE389
+0x885D = 0xE38A
+0x885E = 0xE38B
+0x885F = 0xE38C
+0x8860 = 0xE38D
+0x8861 = 0xE38E
+0x8862 = 0xE38F
+0x8863 = 0xE390
+0x8864 = 0xE391
+0x8865 = 0xE392
+0x8866 = 0xE393
+0x8867 = 0xE394
+0x8868 = 0xE395
+0x8869 = 0xE396
+0x886A = 0xE397
+0x886B = 0xE398
+0x886C = 0xE399
+0x886D = 0xE39A
+0x886E = 0xE39B
+0x886F = 0xE39C
+0x8870 = 0xE39D
+0x8871 = 0xE39E
+0x8872 = 0xE39F
+0x8873 = 0xE3A0
+0x8874 = 0xE3A1
+0x8875 = 0xE3A2
+0x8876 = 0xE3A3
+0x8877 = 0xE3A4
+0x8878 = 0xE3A5
+0x8879 = 0xE3A6
+0x887A = 0xE3A7
+0x887B = 0xE3A8
+0x887C = 0xE3A9
+0x887D = 0xE3AA
+0x887E = 0xE3AB
+0x8921 = 0xE3AC
+0x8922 = 0xE3AD
+0x8923 = 0xE3AE
+0x8924 = 0xE3AF
+0x8925 = 0xE3B0
+0x8926 = 0xE3B1
+0x8927 = 0xE3B2
+0x8928 = 0xE3B3
+0x8929 = 0xE3B4
+0x892A = 0xE3B5
+0x892B = 0xE3B6
+0x892C = 0xE3B7
+0x892D = 0xE3B8
+0x892E = 0xE3B9
+0x892F = 0xE3BA
+0x8930 = 0xE3BB
+0x8931 = 0xE3BC
+0x8932 = 0xE3BD
+0x8933 = 0xE3BE
+0x8934 = 0xE3BF
+0x8935 = 0xE3C0
+0x8936 = 0xE3C1
+0x8937 = 0xE3C2
+0x8938 = 0xE3C3
+0x8939 = 0xE3C4
+0x893A = 0xE3C5
+0x893B = 0xE3C6
+0x893C = 0xE3C7
+0x893D = 0xE3C8
+0x893E = 0xE3C9
+0x893F = 0xE3CA
+0x8940 = 0xE3CB
+0x8941 = 0xE3CC
+0x8942 = 0xE3CD
+0x8943 = 0xE3CE
+0x8944 = 0xE3CF
+0x8945 = 0xE3D0
+0x8946 = 0xE3D1
+0x8947 = 0xE3D2
+0x8948 = 0xE3D3
+0x8949 = 0xE3D4
+0x894A = 0xE3D5
+0x894B = 0xE3D6
+0x894C = 0xE3D7
+0x894D = 0xE3D8
+0x894E = 0xE3D9
+0x894F = 0xE3DA
+0x8950 = 0xE3DB
+0x8951 = 0xE3DC
+0x8952 = 0xE3DD
+0x8953 = 0xE3DE
+0x8954 = 0xE3DF
+0x8955 = 0xE3E0
+0x8956 = 0xE3E1
+0x8957 = 0xE3E2
+0x8958 = 0xE3E3
+0x8959 = 0xE3E4
+0x895A = 0xE3E5
+0x895B = 0xE3E6
+0x895C = 0xE3E7
+0x895D = 0xE3E8
+0x895E = 0xE3E9
+0x895F = 0xE3EA
+0x8960 = 0xE3EB
+0x8961 = 0xE3EC
+0x8962 = 0xE3ED
+0x8963 = 0xE3EE
+0x8964 = 0xE3EF
+0x8965 = 0xE3F0
+0x8966 = 0xE3F1
+0x8967 = 0xE3F2
+0x8968 = 0xE3F3
+0x8969 = 0xE3F4
+0x896A = 0xE3F5
+0x896B = 0xE3F6
+0x896C = 0xE3F7
+0x896D = 0xE3F8
+0x896E = 0xE3F9
+0x896F = 0xE3FA
+0x8970 = 0xE3FB
+0x8971 = 0xE3FC
+0x8972 = 0xE3FD
+0x8973 = 0xE3FE
+0x8974 = 0xE3FF
+0x8975 = 0xE400
+0x8976 = 0xE401
+0x8977 = 0xE402
+0x8978 = 0xE403
+0x8979 = 0xE404
+0x897A = 0xE405
+0x897B = 0xE406
+0x897C = 0xE407
+0x897D = 0xE408
+0x897E = 0xE409
+0x8A21 = 0xE40A
+0x8A22 = 0xE40B
+0x8A23 = 0xE40C
+0x8A24 = 0xE40D
+0x8A25 = 0xE40E
+0x8A26 = 0xE40F
+0x8A27 = 0xE410
+0x8A28 = 0xE411
+0x8A29 = 0xE412
+0x8A2A = 0xE413
+0x8A2B = 0xE414
+0x8A2C = 0xE415
+0x8A2D = 0xE416
+0x8A2E = 0xE417
+0x8A2F = 0xE418
+0x8A30 = 0xE419
+0x8A31 = 0xE41A
+0x8A32 = 0xE41B
+0x8A33 = 0xE41C
+0x8A34 = 0xE41D
+0x8A35 = 0xE41E
+0x8A36 = 0xE41F
+0x8A37 = 0xE420
+0x8A38 = 0xE421
+0x8A39 = 0xE422
+0x8A3A = 0xE423
+0x8A3B = 0xE424
+0x8A3C = 0xE425
+0x8A3D = 0xE426
+0x8A3E = 0xE427
+0x8A3F = 0xE428
+0x8A40 = 0xE429
+0x8A41 = 0xE42A
+0x8A42 = 0xE42B
+0x8A43 = 0xE42C
+0x8A44 = 0xE42D
+0x8A45 = 0xE42E
+0x8A46 = 0xE42F
+0x8A47 = 0xE430
+0x8A48 = 0xE431
+0x8A49 = 0xE432
+0x8A4A = 0xE433
+0x8A4B = 0xE434
+0x8A4C = 0xE435
+0x8A4D = 0xE436
+0x8A4E = 0xE437
+0x8A4F = 0xE438
+0x8A50 = 0xE439
+0x8A51 = 0xE43A
+0x8A52 = 0xE43B
+0x8A53 = 0xE43C
+0x8A54 = 0xE43D
+0x8A55 = 0xE43E
+0x8A56 = 0xE43F
+0x8A57 = 0xE440
+0x8A58 = 0xE441
+0x8A59 = 0xE442
+0x8A5A = 0xE443
+0x8A5B = 0xE444
+0x8A5C = 0xE445
+0x8A5D = 0xE446
+0x8A5E = 0xE447
+0x8A5F = 0xE448
+0x8A60 = 0xE449
+0x8A61 = 0xE44A
+0x8A62 = 0xE44B
+0x8A63 = 0xE44C
+0x8A64 = 0xE44D
+0x8A65 = 0xE44E
+0x8A66 = 0xE44F
+0x8A67 = 0xE450
+0x8A68 = 0xE451
+0x8A69 = 0xE452
+0x8A6A = 0xE453
+0x8A6B = 0xE454
+0x8A6C = 0xE455
+0x8A6D = 0xE456
+0x8A6E = 0xE457
+0x8A6F = 0xE458
+0x8A70 = 0xE459
+0x8A71 = 0xE45A
+0x8A72 = 0xE45B
+0x8A73 = 0xE45C
+0x8A74 = 0xE45D
+0x8A75 = 0xE45E
+0x8A76 = 0xE45F
+0x8A77 = 0xE460
+0x8A78 = 0xE461
+0x8A79 = 0xE462
+0x8A7A = 0xE463
+0x8A7B = 0xE464
+0x8A7C = 0xE465
+0x8A7D = 0xE466
+0x8A7E = 0xE467
+0x8B21 = 0xE468
+0x8B22 = 0xE469
+0x8B23 = 0xE46A
+0x8B24 = 0xE46B
+0x8B25 = 0xE46C
+0x8B26 = 0xE46D
+0x8B27 = 0xE46E
+0x8B28 = 0xE46F
+0x8B29 = 0xE470
+0x8B2A = 0xE471
+0x8B2B = 0xE472
+0x8B2C = 0xE473
+0x8B2D = 0xE474
+0x8B2E = 0xE475
+0x8B2F = 0xE476
+0x8B30 = 0xE477
+0x8B31 = 0xE478
+0x8B32 = 0xE479
+0x8B33 = 0xE47A
+0x8B34 = 0xE47B
+0x8B35 = 0xE47C
+0x8B36 = 0xE47D
+0x8B37 = 0xE47E
+0x8B38 = 0xE47F
+0x8B39 = 0xE480
+0x8B3A = 0xE481
+0x8B3B = 0xE482
+0x8B3C = 0xE483
+0x8B3D = 0xE484
+0x8B3E = 0xE485
+0x8B3F = 0xE486
+0x8B40 = 0xE487
+0x8B41 = 0xE488
+0x8B42 = 0xE489
+0x8B43 = 0xE48A
+0x8B44 = 0xE48B
+0x8B45 = 0xE48C
+0x8B46 = 0xE48D
+0x8B47 = 0xE48E
+0x8B48 = 0xE48F
+0x8B49 = 0xE490
+0x8B4A = 0xE491
+0x8B4B = 0xE492
+0x8B4C = 0xE493
+0x8B4D = 0xE494
+0x8B4E = 0xE495
+0x8B4F = 0xE496
+0x8B50 = 0xE497
+0x8B51 = 0xE498
+0x8B52 = 0xE499
+0x8B53 = 0xE49A
+0x8B54 = 0xE49B
+0x8B55 = 0xE49C
+0x8B56 = 0xE49D
+0x8B57 = 0xE49E
+0x8B58 = 0xE49F
+0x8B59 = 0xE4A0
+0x8B5A = 0xE4A1
+0x8B5B = 0xE4A2
+0x8B5C = 0xE4A3
+0x8B5D = 0xE4A4
+0x8B5E = 0xE4A5
+0x8B5F = 0xE4A6
+0x8B60 = 0xE4A7
+0x8B61 = 0xE4A8
+0x8B62 = 0xE4A9
+0x8B63 = 0xE4AA
+0x8B64 = 0xE4AB
+0x8B65 = 0xE4AC
+0x8B66 = 0xE4AD
+0x8B67 = 0xE4AE
+0x8B68 = 0xE4AF
+0x8B69 = 0xE4B0
+0x8B6A = 0xE4B1
+0x8B6B = 0xE4B2
+0x8B6C = 0xE4B3
+0x8B6D = 0xE4B4
+0x8B6E = 0xE4B5
+0x8B6F = 0xE4B6
+0x8B70 = 0xE4B7
+0x8B71 = 0xE4B8
+0x8B72 = 0xE4B9
+0x8B73 = 0xE4BA
+0x8B74 = 0xE4BB
+0x8B75 = 0xE4BC
+0x8B76 = 0xE4BD
+0x8B77 = 0xE4BE
+0x8B78 = 0xE4BF
+0x8B79 = 0xE4C0
+0x8B7A = 0xE4C1
+0x8B7B = 0xE4C2
+0x8B7C = 0xE4C3
+0x8B7D = 0xE4C4
+0x8B7E = 0xE4C5
+0x8C21 = 0xE4C6
+0x8C22 = 0xE4C7
+0x8C23 = 0xE4C8
+0x8C24 = 0xE4C9
+0x8C25 = 0xE4CA
+0x8C26 = 0xE4CB
+0x8C27 = 0xE4CC
+0x8C28 = 0xE4CD
+0x8C29 = 0xE4CE
+0x8C2A = 0xE4CF
+0x8C2B = 0xE4D0
+0x8C2C = 0xE4D1
+0x8C2D = 0xE4D2
+0x8C2E = 0xE4D3
+0x8C2F = 0xE4D4
+0x8C30 = 0xE4D5
+0x8C31 = 0xE4D6
+0x8C32 = 0xE4D7
+0x8C33 = 0xE4D8
+0x8C34 = 0xE4D9
+0x8C35 = 0xE4DA
+0x8C36 = 0xE4DB
+0x8C37 = 0xE4DC
+0x8C38 = 0xE4DD
+0x8C39 = 0xE4DE
+0x8C3A = 0xE4DF
+0x8C3B = 0xE4E0
+0x8C3C = 0xE4E1
+0x8C3D = 0xE4E2
+0x8C3E = 0xE4E3
+0x8C3F = 0xE4E4
+0x8C40 = 0xE4E5
+0x8C41 = 0xE4E6
+0x8C42 = 0xE4E7
+0x8C43 = 0xE4E8
+0x8C44 = 0xE4E9
+0x8C45 = 0xE4EA
+0x8C46 = 0xE4EB
+0x8C47 = 0xE4EC
+0x8C48 = 0xE4ED
+0x8C49 = 0xE4EE
+0x8C4A = 0xE4EF
+0x8C4B = 0xE4F0
+0x8C4C = 0xE4F1
+0x8C4D = 0xE4F2
+0x8C4E = 0xE4F3
+0x8C4F = 0xE4F4
+0x8C50 = 0xE4F5
+0x8C51 = 0xE4F6
+0x8C52 = 0xE4F7
+0x8C53 = 0xE4F8
+0x8C54 = 0xE4F9
+0x8C55 = 0xE4FA
+0x8C56 = 0xE4FB
+0x8C57 = 0xE4FC
+0x8C58 = 0xE4FD
+0x8C59 = 0xE4FE
+0x8C5A = 0xE4FF
+0x8C5B = 0xE500
+0x8C5C = 0xE501
+0x8C5D = 0xE502
+0x8C5E = 0xE503
+0x8C5F = 0xE504
+0x8C60 = 0xE505
+0x8C61 = 0xE506
+0x8C62 = 0xE507
+0x8C63 = 0xE508
+0x8C64 = 0xE509
+0x8C65 = 0xE50A
+0x8C66 = 0xE50B
+0x8C67 = 0xE50C
+0x8C68 = 0xE50D
+0x8C69 = 0xE50E
+0x8C6A = 0xE50F
+0x8C6B = 0xE510
+0x8C6C = 0xE511
+0x8C6D = 0xE512
+0x8C6E = 0xE513
+0x8C6F = 0xE514
+0x8C70 = 0xE515
+0x8C71 = 0xE516
+0x8C72 = 0xE517
+0x8C73 = 0xE518
+0x8C74 = 0xE519
+0x8C75 = 0xE51A
+0x8C76 = 0xE51B
+0x8C77 = 0xE51C
+0x8C78 = 0xE51D
+0x8C79 = 0xE51E
+0x8C7A = 0xE51F
+0x8C7B = 0xE520
+0x8C7C = 0xE521
+0x8C7D = 0xE522
+0x8C7E = 0xE523
+0x8D21 = 0xE524
+0x8D22 = 0xE525
+0x8D23 = 0xE526
+0x8D24 = 0xE527
+0x8D25 = 0xE528
+0x8D26 = 0xE529
+0x8D27 = 0xE52A
+0x8D28 = 0xE52B
+0x8D29 = 0xE52C
+0x8D2A = 0xE52D
+0x8D2B = 0xE52E
+0x8D2C = 0xE52F
+0x8D2D = 0xE530
+0x8D2E = 0xE531
+0x8D2F = 0xE532
+0x8D30 = 0xE533
+0x8D31 = 0xE534
+0x8D32 = 0xE535
+0x8D33 = 0xE536
+0x8D34 = 0xE537
+0x8D35 = 0xE538
+0x8D36 = 0xE539
+0x8D37 = 0xE53A
+0x8D38 = 0xE53B
+0x8D39 = 0xE53C
+0x8D3A = 0xE53D
+0x8D3B = 0xE53E
+0x8D3C = 0xE53F
+0x8D3D = 0xE540
+0x8D3E = 0xE541
+0x8D3F = 0xE542
+0x8D40 = 0xE543
+0x8D41 = 0xE544
+0x8D42 = 0xE545
+0x8D43 = 0xE546
+0x8D44 = 0xE547
+0x8D45 = 0xE548
+0x8D46 = 0xE549
+0x8D47 = 0xE54A
+0x8D48 = 0xE54B
+0x8D49 = 0xE54C
+0x8D4A = 0xE54D
+0x8D4B = 0xE54E
+0x8D4C = 0xE54F
+0x8D4D = 0xE550
+0x8D4E = 0xE551
+0x8D4F = 0xE552
+0x8D50 = 0xE553
+0x8D51 = 0xE554
+0x8D52 = 0xE555
+0x8D53 = 0xE556
+0x8D54 = 0xE557
+0x8D55 = 0xE558
+0x8D56 = 0xE559
+0x8D57 = 0xE55A
+0x8D58 = 0xE55B
+0x8D59 = 0xE55C
+0x8D5A = 0xE55D
+0x8D5B = 0xE55E
+0x8D5C = 0xE55F
+0x8D5D = 0xE560
+0x8D5E = 0xE561
+0x8D5F = 0xE562
+0x8D60 = 0xE563
+0x8D61 = 0xE564
+0x8D62 = 0xE565
+0x8D63 = 0xE566
+0x8D64 = 0xE567
+0x8D65 = 0xE568
+0x8D66 = 0xE569
+0x8D67 = 0xE56A
+0x8D68 = 0xE56B
+0x8D69 = 0xE56C
+0x8D6A = 0xE56D
+0x8D6B = 0xE56E
+0x8D6C = 0xE56F
+0x8D6D = 0xE570
+0x8D6E = 0xE571
+0x8D6F = 0xE572
+0x8D70 = 0xE573
+0x8D71 = 0xE574
+0x8D72 = 0xE575
+0x8D73 = 0xE576
+0x8D74 = 0xE577
+0x8D75 = 0xE578
+0x8D76 = 0xE579
+0x8D77 = 0xE57A
+0x8D78 = 0xE57B
+0x8D79 = 0xE57C
+0x8D7A = 0xE57D
+0x8D7B = 0xE57E
+0x8D7C = 0xE57F
+0x8D7D = 0xE580
+0x8D7E = 0xE581
+0x8E21 = 0xE582
+0x8E22 = 0xE583
+0x8E23 = 0xE584
+0x8E24 = 0xE585
+0x8E25 = 0xE586
+0x8E26 = 0xE587
+0x8E27 = 0xE588
+0x8E28 = 0xE589
+0x8E29 = 0xE58A
+0x8E2A = 0xE58B
+0x8E2B = 0xE58C
+0x8E2C = 0xE58D
+0x8E2D = 0xE58E
+0x8E2E = 0xE58F
+0x8E2F = 0xE590
+0x8E30 = 0xE591
+0x8E31 = 0xE592
+0x8E32 = 0xE593
+0x8E33 = 0xE594
+0x8E34 = 0xE595
+0x8E35 = 0xE596
+0x8E36 = 0xE597
+0x8E37 = 0xE598
+0x8E38 = 0xE599
+0x8E39 = 0xE59A
+0x8E3A = 0xE59B
+0x8E3B = 0xE59C
+0x8E3C = 0xE59D
+0x8E3D = 0xE59E
+0x8E3E = 0xE59F
+0x8E3F = 0xE5A0
+0x8E40 = 0xE5A1
+0x8E41 = 0xE5A2
+0x8E42 = 0xE5A3
+0x8E43 = 0xE5A4
+0x8E44 = 0xE5A5
+0x8E45 = 0xE5A6
+0x8E46 = 0xE5A7
+0x8E47 = 0xE5A8
+0x8E48 = 0xE5A9
+0x8E49 = 0xE5AA
+0x8E4A = 0xE5AB
+0x8E4B = 0xE5AC
+0x8E4C = 0xE5AD
+0x8E4D = 0xE5AE
+0x8E4E = 0xE5AF
+0x8E4F = 0xE5B0
+0x8E50 = 0xE5B1
+0x8E51 = 0xE5B2
+0x8E52 = 0xE5B3
+0x8E53 = 0xE5B4
+0x8E54 = 0xE5B5
+0x8E55 = 0xE5B6
+0x8E56 = 0xE5B7
+0x8E57 = 0xE5B8
+0x8E58 = 0xE5B9
+0x8E59 = 0xE5BA
+0x8E5A = 0xE5BB
+0x8E5B = 0xE5BC
+0x8E5C = 0xE5BD
+0x8E5D = 0xE5BE
+0x8E5E = 0xE5BF
+0x8E5F = 0xE5C0
+0x8E60 = 0xE5C1
+0x8E61 = 0xE5C2
+0x8E62 = 0xE5C3
+0x8E63 = 0xE5C4
+0x8E64 = 0xE5C5
+0x8E65 = 0xE5C6
+0x8E66 = 0xE5C7
+0x8E67 = 0xE5C8
+0x8E68 = 0xE5C9
+0x8E69 = 0xE5CA
+0x8E6A = 0xE5CB
+0x8E6B = 0xE5CC
+0x8E6C = 0xE5CD
+0x8E6D = 0xE5CE
+0x8E6E = 0xE5CF
+0x8E6F = 0xE5D0
+0x8E70 = 0xE5D1
+0x8E71 = 0xE5D2
+0x8E72 = 0xE5D3
+0x8E73 = 0xE5D4
+0x8E74 = 0xE5D5
+0x8E75 = 0xE5D6
+0x8E76 = 0xE5D7
+0x8E77 = 0xE5D8
+0x8E78 = 0xE5D9
+0x8E79 = 0xE5DA
+0x8E7A = 0xE5DB
+0x8E7B = 0xE5DC
+0x8E7C = 0xE5DD
+0x8E7D = 0xE5DE
+0x8E7E = 0xE5DF
+0x8F21 = 0xE5E0
+0x8F22 = 0xE5E1
+0x8F23 = 0xE5E2
+0x8F24 = 0xE5E3
+0x8F25 = 0xE5E4
+0x8F26 = 0xE5E5
+0x8F27 = 0xE5E6
+0x8F28 = 0xE5E7
+0x8F29 = 0xE5E8
+0x8F2A = 0xE5E9
+0x8F2B = 0xE5EA
+0x8F2C = 0xE5EB
+0x8F2D = 0xE5EC
+0x8F2E = 0xE5ED
+0x8F2F = 0xE5EE
+0x8F30 = 0xE5EF
+0x8F31 = 0xE5F0
+0x8F32 = 0xE5F1
+0x8F33 = 0xE5F2
+0x8F34 = 0xE5F3
+0x8F35 = 0xE5F4
+0x8F36 = 0xE5F5
+0x8F37 = 0xE5F6
+0x8F38 = 0xE5F7
+0x8F39 = 0xE5F8
+0x8F3A = 0xE5F9
+0x8F3B = 0xE5FA
+0x8F3C = 0xE5FB
+0x8F3D = 0xE5FC
+0x8F3E = 0xE5FD
+0x8F3F = 0xE5FE
+0x8F40 = 0xE5FF
+0x8F41 = 0xE600
+0x8F42 = 0xE601
+0x8F43 = 0xE602
+0x8F44 = 0xE603
+0x8F45 = 0xE604
+0x8F46 = 0xE605
+0x8F47 = 0xE606
+0x8F48 = 0xE607
+0x8F49 = 0xE608
+0x8F4A = 0xE609
+0x8F4B = 0xE60A
+0x8F4C = 0xE60B
+0x8F4D = 0xE60C
+0x8F4E = 0xE60D
+0x8F4F = 0xE60E
+0x8F50 = 0xE60F
+0x8F51 = 0xE610
+0x8F52 = 0xE611
+0x8F53 = 0xE612
+0x8F54 = 0xE613
+0x8F55 = 0xE614
+0x8F56 = 0xE615
+0x8F57 = 0xE616
+0x8F58 = 0xE617
+0x8F59 = 0xE618
+0x8F5A = 0xE619
+0x8F5B = 0xE61A
+0x8F5C = 0xE61B
+0x8F5D = 0xE61C
+0x8F5E = 0xE61D
+0x8F5F = 0xE61E
+0x8F60 = 0xE61F
+0x8F61 = 0xE620
+0x8F62 = 0xE621
+0x8F63 = 0xE622
+0x8F64 = 0xE623
+0x8F65 = 0xE624
+0x8F66 = 0xE625
+0x8F67 = 0xE626
+0x8F68 = 0xE627
+0x8F69 = 0xE628
+0x8F6A = 0xE629
+0x8F6B = 0xE62A
+0x8F6C = 0xE62B
+0x8F6D = 0xE62C
+0x8F6E = 0xE62D
+0x8F6F = 0xE62E
+0x8F70 = 0xE62F
+0x8F71 = 0xE630
+0x8F72 = 0xE631
+0x8F73 = 0xE632
+0x8F74 = 0xE633
+0x8F75 = 0xE634
+0x8F76 = 0xE635
+0x8F77 = 0xE636
+0x8F78 = 0xE637
+0x8F79 = 0xE638
+0x8F7A = 0xE639
+0x8F7B = 0xE63A
+0x8F7C = 0xE63B
+0x8F7D = 0xE63C
+0x8F7E = 0xE63D
+0x9021 = 0xE63E
+0x9022 = 0xE63F
+0x9023 = 0xE640
+0x9024 = 0xE641
+0x9025 = 0xE642
+0x9026 = 0xE643
+0x9027 = 0xE644
+0x9028 = 0xE645
+0x9029 = 0xE646
+0x902A = 0xE647
+0x902B = 0xE648
+0x902C = 0xE649
+0x902D = 0xE64A
+0x902E = 0xE64B
+0x902F = 0xE64C
+0x9030 = 0xE64D
+0x9031 = 0xE64E
+0x9032 = 0xE64F
+0x9033 = 0xE650
+0x9034 = 0xE651
+0x9035 = 0xE652
+0x9036 = 0xE653
+0x9037 = 0xE654
+0x9038 = 0xE655
+0x9039 = 0xE656
+0x903A = 0xE657
+0x903B = 0xE658
+0x903C = 0xE659
+0x903D = 0xE65A
+0x903E = 0xE65B
+0x903F = 0xE65C
+0x9040 = 0xE65D
+0x9041 = 0xE65E
+0x9042 = 0xE65F
+0x9043 = 0xE660
+0x9044 = 0xE661
+0x9045 = 0xE662
+0x9046 = 0xE663
+0x9047 = 0xE664
+0x9048 = 0xE665
+0x9049 = 0xE666
+0x904A = 0xE667
+0x904B = 0xE668
+0x904C = 0xE669
+0x904D = 0xE66A
+0x904E = 0xE66B
+0x904F = 0xE66C
+0x9050 = 0xE66D
+0x9051 = 0xE66E
+0x9052 = 0xE66F
+0x9053 = 0xE670
+0x9054 = 0xE671
+0x9055 = 0xE672
+0x9056 = 0xE673
+0x9057 = 0xE674
+0x9058 = 0xE675
+0x9059 = 0xE676
+0x905A = 0xE677
+0x905B = 0xE678
+0x905C = 0xE679
+0x905D = 0xE67A
+0x905E = 0xE67B
+0x905F = 0xE67C
+0x9060 = 0xE67D
+0x9061 = 0xE67E
+0x9062 = 0xE67F
+0x9063 = 0xE680
+0x9064 = 0xE681
+0x9065 = 0xE682
+0x9066 = 0xE683
+0x9067 = 0xE684
+0x9068 = 0xE685
+0x9069 = 0xE686
+0x906A = 0xE687
+0x906B = 0xE688
+0x906C = 0xE689
+0x906D = 0xE68A
+0x906E = 0xE68B
+0x906F = 0xE68C
+0x9070 = 0xE68D
+0x9071 = 0xE68E
+0x9072 = 0xE68F
+0x9073 = 0xE690
+0x9074 = 0xE691
+0x9075 = 0xE692
+0x9076 = 0xE693
+0x9077 = 0xE694
+0x9078 = 0xE695
+0x9079 = 0xE696
+0x907A = 0xE697
+0x907B = 0xE698
+0x907C = 0xE699
+0x907D = 0xE69A
+0x907E = 0xE69B
+0x9121 = 0xE69C
+0x9122 = 0xE69D
+0x9123 = 0xE69E
+0x9124 = 0xE69F
+0x9125 = 0xE6A0
+0x9126 = 0xE6A1
+0x9127 = 0xE6A2
+0x9128 = 0xE6A3
+0x9129 = 0xE6A4
+0x912A = 0xE6A5
+0x912B = 0xE6A6
+0x912C = 0xE6A7
+0x912D = 0xE6A8
+0x912E = 0xE6A9
+0x912F = 0xE6AA
+0x9130 = 0xE6AB
+0x9131 = 0xE6AC
+0x9132 = 0xE6AD
+0x9133 = 0xE6AE
+0x9134 = 0xE6AF
+0x9135 = 0xE6B0
+0x9136 = 0xE6B1
+0x9137 = 0xE6B2
+0x9138 = 0xE6B3
+0x9139 = 0xE6B4
+0x913A = 0xE6B5
+0x913B = 0xE6B6
+0x913C = 0xE6B7
+0x913D = 0xE6B8
+0x913E = 0xE6B9
+0x913F = 0xE6BA
+0x9140 = 0xE6BB
+0x9141 = 0xE6BC
+0x9142 = 0xE6BD
+0x9143 = 0xE6BE
+0x9144 = 0xE6BF
+0x9145 = 0xE6C0
+0x9146 = 0xE6C1
+0x9147 = 0xE6C2
+0x9148 = 0xE6C3
+0x9149 = 0xE6C4
+0x914A = 0xE6C5
+0x914B = 0xE6C6
+0x914C = 0xE6C7
+0x914D = 0xE6C8
+0x914E = 0xE6C9
+0x914F = 0xE6CA
+0x9150 = 0xE6CB
+0x9151 = 0xE6CC
+0x9152 = 0xE6CD
+0x9153 = 0xE6CE
+0x9154 = 0xE6CF
+0x9155 = 0xE6D0
+0x9156 = 0xE6D1
+0x9157 = 0xE6D2
+0x9158 = 0xE6D3
+0x9159 = 0xE6D4
+0x915A = 0xE6D5
+0x915B = 0xE6D6
+0x915C = 0xE6D7
+0x915D = 0xE6D8
+0x915E = 0xE6D9
+0x915F = 0xE6DA
+0x9160 = 0xE6DB
+0x9161 = 0xE6DC
+0x9162 = 0xE6DD
+0x9163 = 0xE6DE
+0x9164 = 0xE6DF
+0x9165 = 0xE6E0
+0x9166 = 0xE6E1
+0x9167 = 0xE6E2
+0x9168 = 0xE6E3
+0x9169 = 0xE6E4
+0x916A = 0xE6E5
+0x916B = 0xE6E6
+0x916C = 0xE6E7
+0x916D = 0xE6E8
+0x916E = 0xE6E9
+0x916F = 0xE6EA
+0x9170 = 0xE6EB
+0x9171 = 0xE6EC
+0x9172 = 0xE6ED
+0x9173 = 0xE6EE
+0x9174 = 0xE6EF
+0x9175 = 0xE6F0
+0x9176 = 0xE6F1
+0x9177 = 0xE6F2
+0x9178 = 0xE6F3
+0x9179 = 0xE6F4
+0x917A = 0xE6F5
+0x917B = 0xE6F6
+0x917C = 0xE6F7
+0x917D = 0xE6F8
+0x917E = 0xE6F9
+0x9221 = 0xE6FA
+0x9222 = 0xE6FB
+0x9223 = 0xE6FC
+0x9224 = 0xE6FD
+0x9225 = 0xE6FE
+0x9226 = 0xE6FF
+0x9227 = 0xE700
+0x9228 = 0xE701
+0x9229 = 0xE702
+0x922A = 0xE703
+0x922B = 0xE704
+0x922C = 0xE705
+0x922D = 0xE706
+0x922E = 0xE707
+0x922F = 0xE708
+0x9230 = 0xE709
+0x9231 = 0xE70A
+0x9232 = 0xE70B
+0x9233 = 0xE70C
+0x9234 = 0xE70D
+0x9235 = 0xE70E
+0x9236 = 0xE70F
+0x9237 = 0xE710
+0x9238 = 0xE711
+0x9239 = 0xE712
+0x923A = 0xE713
+0x923B = 0xE714
+0x923C = 0xE715
+0x923D = 0xE716
+0x923E = 0xE717
+0x923F = 0xE718
+0x9240 = 0xE719
+0x9241 = 0xE71A
+0x9242 = 0xE71B
+0x9243 = 0xE71C
+0x9244 = 0xE71D
+0x9245 = 0xE71E
+0x9246 = 0xE71F
+0x9247 = 0xE720
+0x9248 = 0xE721
+0x9249 = 0xE722
+0x924A = 0xE723
+0x924B = 0xE724
+0x924C = 0xE725
+0x924D = 0xE726
+0x924E = 0xE727
+0x924F = 0xE728
+0x9250 = 0xE729
+0x9251 = 0xE72A
+0x9252 = 0xE72B
+0x9253 = 0xE72C
+0x9254 = 0xE72D
+0x9255 = 0xE72E
+0x9256 = 0xE72F
+0x9257 = 0xE730
+0x9258 = 0xE731
+0x9259 = 0xE732
+0x925A = 0xE733
+0x925B = 0xE734
+0x925C = 0xE735
+0x925D = 0xE736
+0x925E = 0xE737
+0x925F = 0xE738
+0x9260 = 0xE739
+0x9261 = 0xE73A
+0x9262 = 0xE73B
+0x9263 = 0xE73C
+0x9264 = 0xE73D
+0x9265 = 0xE73E
+0x9266 = 0xE73F
+0x9267 = 0xE740
+0x9268 = 0xE741
+0x9269 = 0xE742
+0x926A = 0xE743
+0x926B = 0xE744
+0x926C = 0xE745
+0x926D = 0xE746
+0x926E = 0xE747
+0x926F = 0xE748
+0x9270 = 0xE749
+0x9271 = 0xE74A
+0x9272 = 0xE74B
+0x9273 = 0xE74C
+0x9274 = 0xE74D
+0x9275 = 0xE74E
+0x9276 = 0xE74F
+0x9277 = 0xE750
+0x9278 = 0xE751
+0x9279 = 0xE752
+0x927A = 0xE753
+0x927B = 0xE754
+0x927C = 0xE755
+0x927D = 0xE756
+0x927E = 0xE757
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@IBM%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@IBM%UCS.src
new file mode 100644
index 0000000..3b9b360
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@IBM%UCS.src
@@ -0,0 +1,420 @@
+# $NetBSD: CP932VDC@IBM%UCS.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"CP932VDC:IBM/UCS"
+SRC_ZONE	0x93-0x97 / 0x21-0x7E / 8
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0x9321 = 0x2170
+0x9322 = 0x2171
+0x9323 = 0x2172
+0x9324 = 0x2173
+0x9325 = 0x2174
+0x9326 = 0x2175
+0x9327 = 0x2176
+0x9328 = 0x2177
+0x9329 = 0x2178
+0x932A = 0x2179
+0x932B = 0x2160
+0x932C = 0x2161
+0x932D = 0x2162
+0x932E = 0x2163
+0x932F = 0x2164
+0x9330 = 0x2165
+0x9331 = 0x2166
+0x9332 = 0x2167
+0x9333 = 0x2168
+0x9334 = 0x2169
+0x9335 = 0xFFE2
+0x9336 = 0xFFE4
+0x9337 = 0xFF07
+0x9338 = 0xFF02
+0x9339 = 0x3231
+0x933A = 0x2116
+0x933B = 0x2121
+0x933C = 0x2235
+0x933D = 0x7E8A
+0x933E = 0x891C
+0x933F = 0x9348
+0x9340 = 0x9288
+0x9341 = 0x84DC
+0x9342 = 0x4FC9
+0x9343 = 0x70BB
+0x9344 = 0x6631
+0x9345 = 0x68C8
+0x9346 = 0x92F9
+0x9347 = 0x66FB
+0x9348 = 0x5F45
+0x9349 = 0x4E28
+0x934A = 0x4EE1
+0x934B = 0x4EFC
+0x934C = 0x4F00
+0x934D = 0x4F03
+0x934E = 0x4F39
+0x934F = 0x4F56
+0x9350 = 0x4F92
+0x9351 = 0x4F8A
+0x9352 = 0x4F9A
+0x9353 = 0x4F94
+0x9354 = 0x4FCD
+0x9355 = 0x5040
+0x9356 = 0x5022
+0x9357 = 0x4FFF
+0x9358 = 0x501E
+0x9359 = 0x5046
+0x935A = 0x5070
+0x935B = 0x5042
+0x935C = 0x5094
+0x935D = 0x50F4
+0x935E = 0x50D8
+0x935F = 0x514A
+0x9360 = 0x5164
+0x9361 = 0x519D
+0x9362 = 0x51BE
+0x9363 = 0x51EC
+0x9364 = 0x5215
+0x9365 = 0x529C
+0x9366 = 0x52A6
+0x9367 = 0x52C0
+0x9368 = 0x52DB
+0x9369 = 0x5300
+0x936A = 0x5307
+0x936B = 0x5324
+0x936C = 0x5372
+0x936D = 0x5393
+0x936E = 0x53B2
+0x936F = 0x53DD
+0x9370 = 0xFA0E
+0x9371 = 0x549C
+0x9372 = 0x548A
+0x9373 = 0x54A9
+0x9374 = 0x54FF
+0x9375 = 0x5586
+0x9376 = 0x5759
+0x9377 = 0x5765
+0x9378 = 0x57AC
+0x9379 = 0x57C8
+0x937A = 0x57C7
+0x937B = 0xFA0F
+0x937C = 0xFA10
+0x937D = 0x589E
+0x937E = 0x58B2
+0x9421 = 0x590B
+0x9422 = 0x5953
+0x9423 = 0x595B
+0x9424 = 0x595D
+0x9425 = 0x5963
+0x9426 = 0x59A4
+0x9427 = 0x59BA
+0x9428 = 0x5B56
+0x9429 = 0x5BC0
+0x942A = 0x752F
+0x942B = 0x5BD8
+0x942C = 0x5BEC
+0x942D = 0x5C1E
+0x942E = 0x5CA6
+0x942F = 0x5CBA
+0x9430 = 0x5CF5
+0x9431 = 0x5D27
+0x9432 = 0x5D53
+0x9433 = 0xFA11
+0x9434 = 0x5D42
+0x9435 = 0x5D6D
+0x9436 = 0x5DB8
+0x9437 = 0x5DB9
+0x9438 = 0x5DD0
+0x9439 = 0x5F21
+0x943A = 0x5F34
+0x943B = 0x5F67
+0x943C = 0x5FB7
+0x943D = 0x5FDE
+0x943E = 0x605D
+0x943F = 0x6085
+0x9440 = 0x608A
+0x9441 = 0x60DE
+0x9442 = 0x60D5
+0x9443 = 0x6120
+0x9444 = 0x60F2
+0x9445 = 0x6111
+0x9446 = 0x6137
+0x9447 = 0x6130
+0x9448 = 0x6198
+0x9449 = 0x6213
+0x944A = 0x62A6
+0x944B = 0x63F5
+0x944C = 0x6460
+0x944D = 0x649D
+0x944E = 0x64CE
+0x944F = 0x654E
+0x9450 = 0x6600
+0x9451 = 0x6615
+0x9452 = 0x663B
+0x9453 = 0x6609
+0x9454 = 0x662E
+0x9455 = 0x661E
+0x9456 = 0x6624
+0x9457 = 0x6665
+0x9458 = 0x6657
+0x9459 = 0x6659
+0x945A = 0xFA12
+0x945B = 0x6673
+0x945C = 0x6699
+0x945D = 0x66A0
+0x945E = 0x66B2
+0x945F = 0x66BF
+0x9460 = 0x66FA
+0x9461 = 0x670E
+0x9462 = 0xF929
+0x9463 = 0x6766
+0x9464 = 0x67BB
+0x9465 = 0x6852
+0x9466 = 0x67C0
+0x9467 = 0x6801
+0x9468 = 0x6844
+0x9469 = 0x68CF
+0x946A = 0xFA13
+0x946B = 0x6968
+0x946C = 0xFA14
+0x946D = 0x6998
+0x946E = 0x69E2
+0x946F = 0x6A30
+0x9470 = 0x6A6B
+0x9471 = 0x6A46
+0x9472 = 0x6A73
+0x9473 = 0x6A7E
+0x9474 = 0x6AE2
+0x9475 = 0x6AE4
+0x9476 = 0x6BD6
+0x9477 = 0x6C3F
+0x9478 = 0x6C5C
+0x9479 = 0x6C86
+0x947A = 0x6C6F
+0x947B = 0x6CDA
+0x947C = 0x6D04
+0x947D = 0x6D87
+0x947E = 0x6D6F
+0x9521 = 0x6D96
+0x9522 = 0x6DAC
+0x9523 = 0x6DCF
+0x9524 = 0x6DF8
+0x9525 = 0x6DF2
+0x9526 = 0x6DFC
+0x9527 = 0x6E39
+0x9528 = 0x6E5C
+0x9529 = 0x6E27
+0x952A = 0x6E3C
+0x952B = 0x6EBF
+0x952C = 0x6F88
+0x952D = 0x6FB5
+0x952E = 0x6FF5
+0x952F = 0x7005
+0x9530 = 0x7007
+0x9531 = 0x7028
+0x9532 = 0x7085
+0x9533 = 0x70AB
+0x9534 = 0x710F
+0x9535 = 0x7104
+0x9536 = 0x715C
+0x9537 = 0x7146
+0x9538 = 0x7147
+0x9539 = 0xFA15
+0x953A = 0x71C1
+0x953B = 0x71FE
+0x953C = 0x72B1
+0x953D = 0x72BE
+0x953E = 0x7324
+0x953F = 0xFA16
+0x9540 = 0x7377
+0x9541 = 0x73BD
+0x9542 = 0x73C9
+0x9543 = 0x73D6
+0x9544 = 0x73E3
+0x9545 = 0x73D2
+0x9546 = 0x7407
+0x9547 = 0x73F5
+0x9548 = 0x7426
+0x9549 = 0x742A
+0x954A = 0x7429
+0x954B = 0x742E
+0x954C = 0x7462
+0x954D = 0x7489
+0x954E = 0x749F
+0x954F = 0x7501
+0x9550 = 0x756F
+0x9551 = 0x7682
+0x9552 = 0x769C
+0x9553 = 0x769E
+0x9554 = 0x769B
+0x9555 = 0x76A6
+0x9556 = 0xFA17
+0x9557 = 0x7746
+0x9558 = 0x52AF
+0x9559 = 0x7821
+0x955A = 0x784E
+0x955B = 0x7864
+0x955C = 0x787A
+0x955D = 0x7930
+0x955E = 0xFA18
+0x955F = 0xFA19
+0x9560 = 0xFA1A
+0x9561 = 0x7994
+0x9562 = 0xFA1B
+0x9563 = 0x799B
+0x9564 = 0x7AD1
+0x9565 = 0x7AE7
+0x9566 = 0xFA1C
+0x9567 = 0x7AEB
+0x9568 = 0x7B9E
+0x9569 = 0xFA1D
+0x956A = 0x7D48
+0x956B = 0x7D5C
+0x956C = 0x7DB7
+0x956D = 0x7DA0
+0x956E = 0x7DD6
+0x956F = 0x7E52
+0x9570 = 0x7F47
+0x9571 = 0x7FA1
+0x9572 = 0xFA1E
+0x9573 = 0x8301
+0x9574 = 0x8362
+0x9575 = 0x837F
+0x9576 = 0x83C7
+0x9577 = 0x83F6
+0x9578 = 0x8448
+0x9579 = 0x84B4
+0x957A = 0x8553
+0x957B = 0x8559
+0x957C = 0x856B
+0x957D = 0xFA1F
+0x957E = 0x85B0
+0x9621 = 0xFA20
+0x9622 = 0xFA21
+0x9623 = 0x8807
+0x9624 = 0x88F5
+0x9625 = 0x8A12
+0x9626 = 0x8A37
+0x9627 = 0x8A79
+0x9628 = 0x8AA7
+0x9629 = 0x8ABE
+0x962A = 0x8ADF
+0x962B = 0xFA22
+0x962C = 0x8AF6
+0x962D = 0x8B53
+0x962E = 0x8B7F
+0x962F = 0x8CF0
+0x9630 = 0x8CF4
+0x9631 = 0x8D12
+0x9632 = 0x8D76
+0x9633 = 0xFA23
+0x9634 = 0x8ECF
+0x9635 = 0xFA24
+0x9636 = 0xFA25
+0x9637 = 0x9067
+0x9638 = 0x90DE
+0x9639 = 0xFA26
+0x963A = 0x9115
+0x963B = 0x9127
+0x963C = 0x91DA
+0x963D = 0x91D7
+0x963E = 0x91DE
+0x963F = 0x91ED
+0x9640 = 0x91EE
+0x9641 = 0x91E4
+0x9642 = 0x91E5
+0x9643 = 0x9206
+0x9644 = 0x9210
+0x9645 = 0x920A
+0x9646 = 0x923A
+0x9647 = 0x9240
+0x9648 = 0x923C
+0x9649 = 0x924E
+0x964A = 0x9259
+0x964B = 0x9251
+0x964C = 0x9239
+0x964D = 0x9267
+0x964E = 0x92A7
+0x964F = 0x9277
+0x9650 = 0x9278
+0x9651 = 0x92E7
+0x9652 = 0x92D7
+0x9653 = 0x92D9
+0x9654 = 0x92D0
+0x9655 = 0xFA27
+0x9656 = 0x92D5
+0x9657 = 0x92E0
+0x9658 = 0x92D3
+0x9659 = 0x9325
+0x965A = 0x9321
+0x965B = 0x92FB
+0x965C = 0xFA28
+0x965D = 0x931E
+0x965E = 0x92FF
+0x965F = 0x931D
+0x9660 = 0x9302
+0x9661 = 0x9370
+0x9662 = 0x9357
+0x9663 = 0x93A4
+0x9664 = 0x93C6
+0x9665 = 0x93DE
+0x9666 = 0x93F8
+0x9667 = 0x9431
+0x9668 = 0x9445
+0x9669 = 0x9448
+0x966A = 0x9592
+0x966B = 0xF9DC
+0x966C = 0xFA29
+0x966D = 0x969D
+0x966E = 0x96AF
+0x966F = 0x9733
+0x9670 = 0x973B
+0x9671 = 0x9743
+0x9672 = 0x974D
+0x9673 = 0x974F
+0x9674 = 0x9751
+0x9675 = 0x9755
+0x9676 = 0x9857
+0x9677 = 0x9865
+0x9678 = 0xFA2A
+0x9679 = 0xFA2B
+0x967A = 0x9927
+0x967B = 0xFA2C
+0x967C = 0x999E
+0x967D = 0x9A4E
+0x967E = 0x9AD9
+0x9721 = 0x9ADC
+0x9722 = 0x9B75
+0x9723 = 0x9B72
+0x9724 = 0x9B8F
+0x9725 = 0x9BB1
+0x9726 = 0x9BBB
+0x9727 = 0x9C00
+0x9728 = 0x9D70
+0x9729 = 0x9D6B
+0x972A = 0xFA2D
+0x972B = 0x9E19
+0x972C = 0x9ED1
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@NEC_IBM%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@NEC_IBM%UCS.src
new file mode 100644
index 0000000..7696d90
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/CP932VDC@NEC_IBM%UCS.src
@@ -0,0 +1,406 @@
+# $NetBSD: CP932VDC@NEC_IBM%UCS.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"CP932VDC:NEC_IBM/UCS"
+SRC_ZONE	0x79-0x7C / 0x21-0x7E / 8
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0x7921 = 0x7E8A
+0x7922 = 0x891C
+0x7923 = 0x9348
+0x7924 = 0x9288
+0x7925 = 0x84DC
+0x7926 = 0x4FC9
+0x7927 = 0x70BB
+0x7928 = 0x6631
+0x7929 = 0x68C8
+0x792A = 0x92F9
+0x792B = 0x66FB
+0x792C = 0x5F45
+0x792D = 0x4E28
+0x792E = 0x4EE1
+0x792F = 0x4EFC
+0x7930 = 0x4F00
+0x7931 = 0x4F03
+0x7932 = 0x4F39
+0x7933 = 0x4F56
+0x7934 = 0x4F92
+0x7935 = 0x4F8A
+0x7936 = 0x4F9A
+0x7937 = 0x4F94
+0x7938 = 0x4FCD
+0x7939 = 0x5040
+0x793A = 0x5022
+0x793B = 0x4FFF
+0x793C = 0x501E
+0x793D = 0x5046
+0x793E = 0x5070
+0x793F = 0x5042
+0x7940 = 0x5094
+0x7941 = 0x50F4
+0x7942 = 0x50D8
+0x7943 = 0x514A
+0x7944 = 0x5164
+0x7945 = 0x519D
+0x7946 = 0x51BE
+0x7947 = 0x51EC
+0x7948 = 0x5215
+0x7949 = 0x529C
+0x794A = 0x52A6
+0x794B = 0x52C0
+0x794C = 0x52DB
+0x794D = 0x5300
+0x794E = 0x5307
+0x794F = 0x5324
+0x7950 = 0x5372
+0x7951 = 0x5393
+0x7952 = 0x53B2
+0x7953 = 0x53DD
+0x7954 = 0xFA0E
+0x7955 = 0x549C
+0x7956 = 0x548A
+0x7957 = 0x54A9
+0x7958 = 0x54FF
+0x7959 = 0x5586
+0x795A = 0x5759
+0x795B = 0x5765
+0x795C = 0x57AC
+0x795D = 0x57C8
+0x795E = 0x57C7
+0x795F = 0xFA0F
+0x7960 = 0xFA10
+0x7961 = 0x589E
+0x7962 = 0x58B2
+0x7963 = 0x590B
+0x7964 = 0x5953
+0x7965 = 0x595B
+0x7966 = 0x595D
+0x7967 = 0x5963
+0x7968 = 0x59A4
+0x7969 = 0x59BA
+0x796A = 0x5B56
+0x796B = 0x5BC0
+0x796C = 0x752F
+0x796D = 0x5BD8
+0x796E = 0x5BEC
+0x796F = 0x5C1E
+0x7970 = 0x5CA6
+0x7971 = 0x5CBA
+0x7972 = 0x5CF5
+0x7973 = 0x5D27
+0x7974 = 0x5D53
+0x7975 = 0xFA11
+0x7976 = 0x5D42
+0x7977 = 0x5D6D
+0x7978 = 0x5DB8
+0x7979 = 0x5DB9
+0x797A = 0x5DD0
+0x797B = 0x5F21
+0x797C = 0x5F34
+0x797D = 0x5F67
+0x797E = 0x5FB7
+0x7A21 = 0x5FDE
+0x7A22 = 0x605D
+0x7A23 = 0x6085
+0x7A24 = 0x608A
+0x7A25 = 0x60DE
+0x7A26 = 0x60D5
+0x7A27 = 0x6120
+0x7A28 = 0x60F2
+0x7A29 = 0x6111
+0x7A2A = 0x6137
+0x7A2B = 0x6130
+0x7A2C = 0x6198
+0x7A2D = 0x6213
+0x7A2E = 0x62A6
+0x7A2F = 0x63F5
+0x7A30 = 0x6460
+0x7A31 = 0x649D
+0x7A32 = 0x64CE
+0x7A33 = 0x654E
+0x7A34 = 0x6600
+0x7A35 = 0x6615
+0x7A36 = 0x663B
+0x7A37 = 0x6609
+0x7A38 = 0x662E
+0x7A39 = 0x661E
+0x7A3A = 0x6624
+0x7A3B = 0x6665
+0x7A3C = 0x6657
+0x7A3D = 0x6659
+0x7A3E = 0xFA12
+0x7A3F = 0x6673
+0x7A40 = 0x6699
+0x7A41 = 0x66A0
+0x7A42 = 0x66B2
+0x7A43 = 0x66BF
+0x7A44 = 0x66FA
+0x7A45 = 0x670E
+0x7A46 = 0xF929
+0x7A47 = 0x6766
+0x7A48 = 0x67BB
+0x7A49 = 0x6852
+0x7A4A = 0x67C0
+0x7A4B = 0x6801
+0x7A4C = 0x6844
+0x7A4D = 0x68CF
+0x7A4E = 0xFA13
+0x7A4F = 0x6968
+0x7A50 = 0xFA14
+0x7A51 = 0x6998
+0x7A52 = 0x69E2
+0x7A53 = 0x6A30
+0x7A54 = 0x6A6B
+0x7A55 = 0x6A46
+0x7A56 = 0x6A73
+0x7A57 = 0x6A7E
+0x7A58 = 0x6AE2
+0x7A59 = 0x6AE4
+0x7A5A = 0x6BD6
+0x7A5B = 0x6C3F
+0x7A5C = 0x6C5C
+0x7A5D = 0x6C86
+0x7A5E = 0x6C6F
+0x7A5F = 0x6CDA
+0x7A60 = 0x6D04
+0x7A61 = 0x6D87
+0x7A62 = 0x6D6F
+0x7A63 = 0x6D96
+0x7A64 = 0x6DAC
+0x7A65 = 0x6DCF
+0x7A66 = 0x6DF8
+0x7A67 = 0x6DF2
+0x7A68 = 0x6DFC
+0x7A69 = 0x6E39
+0x7A6A = 0x6E5C
+0x7A6B = 0x6E27
+0x7A6C = 0x6E3C
+0x7A6D = 0x6EBF
+0x7A6E = 0x6F88
+0x7A6F = 0x6FB5
+0x7A70 = 0x6FF5
+0x7A71 = 0x7005
+0x7A72 = 0x7007
+0x7A73 = 0x7028
+0x7A74 = 0x7085
+0x7A75 = 0x70AB
+0x7A76 = 0x710F
+0x7A77 = 0x7104
+0x7A78 = 0x715C
+0x7A79 = 0x7146
+0x7A7A = 0x7147
+0x7A7B = 0xFA15
+0x7A7C = 0x71C1
+0x7A7D = 0x71FE
+0x7A7E = 0x72B1
+0x7B21 = 0x72BE
+0x7B22 = 0x7324
+0x7B23 = 0xFA16
+0x7B24 = 0x7377
+0x7B25 = 0x73BD
+0x7B26 = 0x73C9
+0x7B27 = 0x73D6
+0x7B28 = 0x73E3
+0x7B29 = 0x73D2
+0x7B2A = 0x7407
+0x7B2B = 0x73F5
+0x7B2C = 0x7426
+0x7B2D = 0x742A
+0x7B2E = 0x7429
+0x7B2F = 0x742E
+0x7B30 = 0x7462
+0x7B31 = 0x7489
+0x7B32 = 0x749F
+0x7B33 = 0x7501
+0x7B34 = 0x756F
+0x7B35 = 0x7682
+0x7B36 = 0x769C
+0x7B37 = 0x769E
+0x7B38 = 0x769B
+0x7B39 = 0x76A6
+0x7B3A = 0xFA17
+0x7B3B = 0x7746
+0x7B3C = 0x52AF
+0x7B3D = 0x7821
+0x7B3E = 0x784E
+0x7B3F = 0x7864
+0x7B40 = 0x787A
+0x7B41 = 0x7930
+0x7B42 = 0xFA18
+0x7B43 = 0xFA19
+0x7B44 = 0xFA1A
+0x7B45 = 0x7994
+0x7B46 = 0xFA1B
+0x7B47 = 0x799B
+0x7B48 = 0x7AD1
+0x7B49 = 0x7AE7
+0x7B4A = 0xFA1C
+0x7B4B = 0x7AEB
+0x7B4C = 0x7B9E
+0x7B4D = 0xFA1D
+0x7B4E = 0x7D48
+0x7B4F = 0x7D5C
+0x7B50 = 0x7DB7
+0x7B51 = 0x7DA0
+0x7B52 = 0x7DD6
+0x7B53 = 0x7E52
+0x7B54 = 0x7F47
+0x7B55 = 0x7FA1
+0x7B56 = 0xFA1E
+0x7B57 = 0x8301
+0x7B58 = 0x8362
+0x7B59 = 0x837F
+0x7B5A = 0x83C7
+0x7B5B = 0x83F6
+0x7B5C = 0x8448
+0x7B5D = 0x84B4
+0x7B5E = 0x8553
+0x7B5F = 0x8559
+0x7B60 = 0x856B
+0x7B61 = 0xFA1F
+0x7B62 = 0x85B0
+0x7B63 = 0xFA20
+0x7B64 = 0xFA21
+0x7B65 = 0x8807
+0x7B66 = 0x88F5
+0x7B67 = 0x8A12
+0x7B68 = 0x8A37
+0x7B69 = 0x8A79
+0x7B6A = 0x8AA7
+0x7B6B = 0x8ABE
+0x7B6C = 0x8ADF
+0x7B6D = 0xFA22
+0x7B6E = 0x8AF6
+0x7B6F = 0x8B53
+0x7B70 = 0x8B7F
+0x7B71 = 0x8CF0
+0x7B72 = 0x8CF4
+0x7B73 = 0x8D12
+0x7B74 = 0x8D76
+0x7B75 = 0xFA23
+0x7B76 = 0x8ECF
+0x7B77 = 0xFA24
+0x7B78 = 0xFA25
+0x7B79 = 0x9067
+0x7B7A = 0x90DE
+0x7B7B = 0xFA26
+0x7B7C = 0x9115
+0x7B7D = 0x9127
+0x7B7E = 0x91DA
+0x7C21 = 0x91D7
+0x7C22 = 0x91DE
+0x7C23 = 0x91ED
+0x7C24 = 0x91EE
+0x7C25 = 0x91E4
+0x7C26 = 0x91E5
+0x7C27 = 0x9206
+0x7C28 = 0x9210
+0x7C29 = 0x920A
+0x7C2A = 0x923A
+0x7C2B = 0x9240
+0x7C2C = 0x923C
+0x7C2D = 0x924E
+0x7C2E = 0x9259
+0x7C2F = 0x9251
+0x7C30 = 0x9239
+0x7C31 = 0x9267
+0x7C32 = 0x92A7
+0x7C33 = 0x9277
+0x7C34 = 0x9278
+0x7C35 = 0x92E7
+0x7C36 = 0x92D7
+0x7C37 = 0x92D9
+0x7C38 = 0x92D0
+0x7C39 = 0xFA27
+0x7C3A = 0x92D5
+0x7C3B = 0x92E0
+0x7C3C = 0x92D3
+0x7C3D = 0x9325
+0x7C3E = 0x9321
+0x7C3F = 0x92FB
+0x7C40 = 0xFA28
+0x7C41 = 0x931E
+0x7C42 = 0x92FF
+0x7C43 = 0x931D
+0x7C44 = 0x9302
+0x7C45 = 0x9370
+0x7C46 = 0x9357
+0x7C47 = 0x93A4
+0x7C48 = 0x93C6
+0x7C49 = 0x93DE
+0x7C4A = 0x93F8
+0x7C4B = 0x9431
+0x7C4C = 0x9445
+0x7C4D = 0x9448
+0x7C4E = 0x9592
+0x7C4F = 0xF9DC
+0x7C50 = 0xFA29
+0x7C51 = 0x969D
+0x7C52 = 0x96AF
+0x7C53 = 0x9733
+0x7C54 = 0x973B
+0x7C55 = 0x9743
+0x7C56 = 0x974D
+0x7C57 = 0x974F
+0x7C58 = 0x9751
+0x7C59 = 0x9755
+0x7C5A = 0x9857
+0x7C5B = 0x9865
+0x7C5C = 0xFA2A
+0x7C5D = 0xFA2B
+0x7C5E = 0x9927
+0x7C5F = 0xFA2C
+0x7C60 = 0x999E
+0x7C61 = 0x9A4E
+0x7C62 = 0x9AD9
+0x7C63 = 0x9ADC
+0x7C64 = 0x9B75
+0x7C65 = 0x9B72
+0x7C66 = 0x9B8F
+0x7C67 = 0x9BB1
+0x7C68 = 0x9BBB
+0x7C69 = 0x9C00
+0x7C6A = 0x9D70
+0x7C6B = 0x9D6B
+0x7C6C = 0xFA2D
+0x7C6D = 0x9E19
+0x7C6E = 0x9ED1
+0x7C71 = 0x2170
+0x7C72 = 0x2171
+0x7C73 = 0x2172
+0x7C74 = 0x2173
+0x7C75 = 0x2174
+0x7C76 = 0x2175
+0x7C77 = 0x2176
+0x7C78 = 0x2177
+0x7C79 = 0x2178
+0x7C7A = 0x2179
+0x7C7B = 0xFFE2
+0x7C7C = 0xFFE4
+0x7C7D = 0xFF07
+0x7C7E = 0xFF02
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932UDA.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932UDA.src
new file mode 100644
index 0000000..f34e9ed
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932UDA.src
@@ -0,0 +1,1912 @@
+# $NetBSD: UCS%CP932UDA.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/CP932UDA"
+SRC_ZONE	0xE000-0xE757
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0xE000 = 0x7F21
+0xE001 = 0x7F22
+0xE002 = 0x7F23
+0xE003 = 0x7F24
+0xE004 = 0x7F25
+0xE005 = 0x7F26
+0xE006 = 0x7F27
+0xE007 = 0x7F28
+0xE008 = 0x7F29
+0xE009 = 0x7F2A
+0xE00A = 0x7F2B
+0xE00B = 0x7F2C
+0xE00C = 0x7F2D
+0xE00D = 0x7F2E
+0xE00E = 0x7F2F
+0xE00F = 0x7F30
+0xE010 = 0x7F31
+0xE011 = 0x7F32
+0xE012 = 0x7F33
+0xE013 = 0x7F34
+0xE014 = 0x7F35
+0xE015 = 0x7F36
+0xE016 = 0x7F37
+0xE017 = 0x7F38
+0xE018 = 0x7F39
+0xE019 = 0x7F3A
+0xE01A = 0x7F3B
+0xE01B = 0x7F3C
+0xE01C = 0x7F3D
+0xE01D = 0x7F3E
+0xE01E = 0x7F3F
+0xE01F = 0x7F40
+0xE020 = 0x7F41
+0xE021 = 0x7F42
+0xE022 = 0x7F43
+0xE023 = 0x7F44
+0xE024 = 0x7F45
+0xE025 = 0x7F46
+0xE026 = 0x7F47
+0xE027 = 0x7F48
+0xE028 = 0x7F49
+0xE029 = 0x7F4A
+0xE02A = 0x7F4B
+0xE02B = 0x7F4C
+0xE02C = 0x7F4D
+0xE02D = 0x7F4E
+0xE02E = 0x7F4F
+0xE02F = 0x7F50
+0xE030 = 0x7F51
+0xE031 = 0x7F52
+0xE032 = 0x7F53
+0xE033 = 0x7F54
+0xE034 = 0x7F55
+0xE035 = 0x7F56
+0xE036 = 0x7F57
+0xE037 = 0x7F58
+0xE038 = 0x7F59
+0xE039 = 0x7F5A
+0xE03A = 0x7F5B
+0xE03B = 0x7F5C
+0xE03C = 0x7F5D
+0xE03D = 0x7F5E
+0xE03E = 0x7F5F
+0xE03F = 0x7F60
+0xE040 = 0x7F61
+0xE041 = 0x7F62
+0xE042 = 0x7F63
+0xE043 = 0x7F64
+0xE044 = 0x7F65
+0xE045 = 0x7F66
+0xE046 = 0x7F67
+0xE047 = 0x7F68
+0xE048 = 0x7F69
+0xE049 = 0x7F6A
+0xE04A = 0x7F6B
+0xE04B = 0x7F6C
+0xE04C = 0x7F6D
+0xE04D = 0x7F6E
+0xE04E = 0x7F6F
+0xE04F = 0x7F70
+0xE050 = 0x7F71
+0xE051 = 0x7F72
+0xE052 = 0x7F73
+0xE053 = 0x7F74
+0xE054 = 0x7F75
+0xE055 = 0x7F76
+0xE056 = 0x7F77
+0xE057 = 0x7F78
+0xE058 = 0x7F79
+0xE059 = 0x7F7A
+0xE05A = 0x7F7B
+0xE05B = 0x7F7C
+0xE05C = 0x7F7D
+0xE05D = 0x7F7E
+0xE05E = 0x8021
+0xE05F = 0x8022
+0xE060 = 0x8023
+0xE061 = 0x8024
+0xE062 = 0x8025
+0xE063 = 0x8026
+0xE064 = 0x8027
+0xE065 = 0x8028
+0xE066 = 0x8029
+0xE067 = 0x802A
+0xE068 = 0x802B
+0xE069 = 0x802C
+0xE06A = 0x802D
+0xE06B = 0x802E
+0xE06C = 0x802F
+0xE06D = 0x8030
+0xE06E = 0x8031
+0xE06F = 0x8032
+0xE070 = 0x8033
+0xE071 = 0x8034
+0xE072 = 0x8035
+0xE073 = 0x8036
+0xE074 = 0x8037
+0xE075 = 0x8038
+0xE076 = 0x8039
+0xE077 = 0x803A
+0xE078 = 0x803B
+0xE079 = 0x803C
+0xE07A = 0x803D
+0xE07B = 0x803E
+0xE07C = 0x803F
+0xE07D = 0x8040
+0xE07E = 0x8041
+0xE07F = 0x8042
+0xE080 = 0x8043
+0xE081 = 0x8044
+0xE082 = 0x8045
+0xE083 = 0x8046
+0xE084 = 0x8047
+0xE085 = 0x8048
+0xE086 = 0x8049
+0xE087 = 0x804A
+0xE088 = 0x804B
+0xE089 = 0x804C
+0xE08A = 0x804D
+0xE08B = 0x804E
+0xE08C = 0x804F
+0xE08D = 0x8050
+0xE08E = 0x8051
+0xE08F = 0x8052
+0xE090 = 0x8053
+0xE091 = 0x8054
+0xE092 = 0x8055
+0xE093 = 0x8056
+0xE094 = 0x8057
+0xE095 = 0x8058
+0xE096 = 0x8059
+0xE097 = 0x805A
+0xE098 = 0x805B
+0xE099 = 0x805C
+0xE09A = 0x805D
+0xE09B = 0x805E
+0xE09C = 0x805F
+0xE09D = 0x8060
+0xE09E = 0x8061
+0xE09F = 0x8062
+0xE0A0 = 0x8063
+0xE0A1 = 0x8064
+0xE0A2 = 0x8065
+0xE0A3 = 0x8066
+0xE0A4 = 0x8067
+0xE0A5 = 0x8068
+0xE0A6 = 0x8069
+0xE0A7 = 0x806A
+0xE0A8 = 0x806B
+0xE0A9 = 0x806C
+0xE0AA = 0x806D
+0xE0AB = 0x806E
+0xE0AC = 0x806F
+0xE0AD = 0x8070
+0xE0AE = 0x8071
+0xE0AF = 0x8072
+0xE0B0 = 0x8073
+0xE0B1 = 0x8074
+0xE0B2 = 0x8075
+0xE0B3 = 0x8076
+0xE0B4 = 0x8077
+0xE0B5 = 0x8078
+0xE0B6 = 0x8079
+0xE0B7 = 0x807A
+0xE0B8 = 0x807B
+0xE0B9 = 0x807C
+0xE0BA = 0x807D
+0xE0BB = 0x807E
+0xE0BC = 0x8121
+0xE0BD = 0x8122
+0xE0BE = 0x8123
+0xE0BF = 0x8124
+0xE0C0 = 0x8125
+0xE0C1 = 0x8126
+0xE0C2 = 0x8127
+0xE0C3 = 0x8128
+0xE0C4 = 0x8129
+0xE0C5 = 0x812A
+0xE0C6 = 0x812B
+0xE0C7 = 0x812C
+0xE0C8 = 0x812D
+0xE0C9 = 0x812E
+0xE0CA = 0x812F
+0xE0CB = 0x8130
+0xE0CC = 0x8131
+0xE0CD = 0x8132
+0xE0CE = 0x8133
+0xE0CF = 0x8134
+0xE0D0 = 0x8135
+0xE0D1 = 0x8136
+0xE0D2 = 0x8137
+0xE0D3 = 0x8138
+0xE0D4 = 0x8139
+0xE0D5 = 0x813A
+0xE0D6 = 0x813B
+0xE0D7 = 0x813C
+0xE0D8 = 0x813D
+0xE0D9 = 0x813E
+0xE0DA = 0x813F
+0xE0DB = 0x8140
+0xE0DC = 0x8141
+0xE0DD = 0x8142
+0xE0DE = 0x8143
+0xE0DF = 0x8144
+0xE0E0 = 0x8145
+0xE0E1 = 0x8146
+0xE0E2 = 0x8147
+0xE0E3 = 0x8148
+0xE0E4 = 0x8149
+0xE0E5 = 0x814A
+0xE0E6 = 0x814B
+0xE0E7 = 0x814C
+0xE0E8 = 0x814D
+0xE0E9 = 0x814E
+0xE0EA = 0x814F
+0xE0EB = 0x8150
+0xE0EC = 0x8151
+0xE0ED = 0x8152
+0xE0EE = 0x8153
+0xE0EF = 0x8154
+0xE0F0 = 0x8155
+0xE0F1 = 0x8156
+0xE0F2 = 0x8157
+0xE0F3 = 0x8158
+0xE0F4 = 0x8159
+0xE0F5 = 0x815A
+0xE0F6 = 0x815B
+0xE0F7 = 0x815C
+0xE0F8 = 0x815D
+0xE0F9 = 0x815E
+0xE0FA = 0x815F
+0xE0FB = 0x8160
+0xE0FC = 0x8161
+0xE0FD = 0x8162
+0xE0FE = 0x8163
+0xE0FF = 0x8164
+0xE100 = 0x8165
+0xE101 = 0x8166
+0xE102 = 0x8167
+0xE103 = 0x8168
+0xE104 = 0x8169
+0xE105 = 0x816A
+0xE106 = 0x816B
+0xE107 = 0x816C
+0xE108 = 0x816D
+0xE109 = 0x816E
+0xE10A = 0x816F
+0xE10B = 0x8170
+0xE10C = 0x8171
+0xE10D = 0x8172
+0xE10E = 0x8173
+0xE10F = 0x8174
+0xE110 = 0x8175
+0xE111 = 0x8176
+0xE112 = 0x8177
+0xE113 = 0x8178
+0xE114 = 0x8179
+0xE115 = 0x817A
+0xE116 = 0x817B
+0xE117 = 0x817C
+0xE118 = 0x817D
+0xE119 = 0x817E
+0xE11A = 0x8221
+0xE11B = 0x8222
+0xE11C = 0x8223
+0xE11D = 0x8224
+0xE11E = 0x8225
+0xE11F = 0x8226
+0xE120 = 0x8227
+0xE121 = 0x8228
+0xE122 = 0x8229
+0xE123 = 0x822A
+0xE124 = 0x822B
+0xE125 = 0x822C
+0xE126 = 0x822D
+0xE127 = 0x822E
+0xE128 = 0x822F
+0xE129 = 0x8230
+0xE12A = 0x8231
+0xE12B = 0x8232
+0xE12C = 0x8233
+0xE12D = 0x8234
+0xE12E = 0x8235
+0xE12F = 0x8236
+0xE130 = 0x8237
+0xE131 = 0x8238
+0xE132 = 0x8239
+0xE133 = 0x823A
+0xE134 = 0x823B
+0xE135 = 0x823C
+0xE136 = 0x823D
+0xE137 = 0x823E
+0xE138 = 0x823F
+0xE139 = 0x8240
+0xE13A = 0x8241
+0xE13B = 0x8242
+0xE13C = 0x8243
+0xE13D = 0x8244
+0xE13E = 0x8245
+0xE13F = 0x8246
+0xE140 = 0x8247
+0xE141 = 0x8248
+0xE142 = 0x8249
+0xE143 = 0x824A
+0xE144 = 0x824B
+0xE145 = 0x824C
+0xE146 = 0x824D
+0xE147 = 0x824E
+0xE148 = 0x824F
+0xE149 = 0x8250
+0xE14A = 0x8251
+0xE14B = 0x8252
+0xE14C = 0x8253
+0xE14D = 0x8254
+0xE14E = 0x8255
+0xE14F = 0x8256
+0xE150 = 0x8257
+0xE151 = 0x8258
+0xE152 = 0x8259
+0xE153 = 0x825A
+0xE154 = 0x825B
+0xE155 = 0x825C
+0xE156 = 0x825D
+0xE157 = 0x825E
+0xE158 = 0x825F
+0xE159 = 0x8260
+0xE15A = 0x8261
+0xE15B = 0x8262
+0xE15C = 0x8263
+0xE15D = 0x8264
+0xE15E = 0x8265
+0xE15F = 0x8266
+0xE160 = 0x8267
+0xE161 = 0x8268
+0xE162 = 0x8269
+0xE163 = 0x826A
+0xE164 = 0x826B
+0xE165 = 0x826C
+0xE166 = 0x826D
+0xE167 = 0x826E
+0xE168 = 0x826F
+0xE169 = 0x8270
+0xE16A = 0x8271
+0xE16B = 0x8272
+0xE16C = 0x8273
+0xE16D = 0x8274
+0xE16E = 0x8275
+0xE16F = 0x8276
+0xE170 = 0x8277
+0xE171 = 0x8278
+0xE172 = 0x8279
+0xE173 = 0x827A
+0xE174 = 0x827B
+0xE175 = 0x827C
+0xE176 = 0x827D
+0xE177 = 0x827E
+0xE178 = 0x8321
+0xE179 = 0x8322
+0xE17A = 0x8323
+0xE17B = 0x8324
+0xE17C = 0x8325
+0xE17D = 0x8326
+0xE17E = 0x8327
+0xE17F = 0x8328
+0xE180 = 0x8329
+0xE181 = 0x832A
+0xE182 = 0x832B
+0xE183 = 0x832C
+0xE184 = 0x832D
+0xE185 = 0x832E
+0xE186 = 0x832F
+0xE187 = 0x8330
+0xE188 = 0x8331
+0xE189 = 0x8332
+0xE18A = 0x8333
+0xE18B = 0x8334
+0xE18C = 0x8335
+0xE18D = 0x8336
+0xE18E = 0x8337
+0xE18F = 0x8338
+0xE190 = 0x8339
+0xE191 = 0x833A
+0xE192 = 0x833B
+0xE193 = 0x833C
+0xE194 = 0x833D
+0xE195 = 0x833E
+0xE196 = 0x833F
+0xE197 = 0x8340
+0xE198 = 0x8341
+0xE199 = 0x8342
+0xE19A = 0x8343
+0xE19B = 0x8344
+0xE19C = 0x8345
+0xE19D = 0x8346
+0xE19E = 0x8347
+0xE19F = 0x8348
+0xE1A0 = 0x8349
+0xE1A1 = 0x834A
+0xE1A2 = 0x834B
+0xE1A3 = 0x834C
+0xE1A4 = 0x834D
+0xE1A5 = 0x834E
+0xE1A6 = 0x834F
+0xE1A7 = 0x8350
+0xE1A8 = 0x8351
+0xE1A9 = 0x8352
+0xE1AA = 0x8353
+0xE1AB = 0x8354
+0xE1AC = 0x8355
+0xE1AD = 0x8356
+0xE1AE = 0x8357
+0xE1AF = 0x8358
+0xE1B0 = 0x8359
+0xE1B1 = 0x835A
+0xE1B2 = 0x835B
+0xE1B3 = 0x835C
+0xE1B4 = 0x835D
+0xE1B5 = 0x835E
+0xE1B6 = 0x835F
+0xE1B7 = 0x8360
+0xE1B8 = 0x8361
+0xE1B9 = 0x8362
+0xE1BA = 0x8363
+0xE1BB = 0x8364
+0xE1BC = 0x8365
+0xE1BD = 0x8366
+0xE1BE = 0x8367
+0xE1BF = 0x8368
+0xE1C0 = 0x8369
+0xE1C1 = 0x836A
+0xE1C2 = 0x836B
+0xE1C3 = 0x836C
+0xE1C4 = 0x836D
+0xE1C5 = 0x836E
+0xE1C6 = 0x836F
+0xE1C7 = 0x8370
+0xE1C8 = 0x8371
+0xE1C9 = 0x8372
+0xE1CA = 0x8373
+0xE1CB = 0x8374
+0xE1CC = 0x8375
+0xE1CD = 0x8376
+0xE1CE = 0x8377
+0xE1CF = 0x8378
+0xE1D0 = 0x8379
+0xE1D1 = 0x837A
+0xE1D2 = 0x837B
+0xE1D3 = 0x837C
+0xE1D4 = 0x837D
+0xE1D5 = 0x837E
+0xE1D6 = 0x8421
+0xE1D7 = 0x8422
+0xE1D8 = 0x8423
+0xE1D9 = 0x8424
+0xE1DA = 0x8425
+0xE1DB = 0x8426
+0xE1DC = 0x8427
+0xE1DD = 0x8428
+0xE1DE = 0x8429
+0xE1DF = 0x842A
+0xE1E0 = 0x842B
+0xE1E1 = 0x842C
+0xE1E2 = 0x842D
+0xE1E3 = 0x842E
+0xE1E4 = 0x842F
+0xE1E5 = 0x8430
+0xE1E6 = 0x8431
+0xE1E7 = 0x8432
+0xE1E8 = 0x8433
+0xE1E9 = 0x8434
+0xE1EA = 0x8435
+0xE1EB = 0x8436
+0xE1EC = 0x8437
+0xE1ED = 0x8438
+0xE1EE = 0x8439
+0xE1EF = 0x843A
+0xE1F0 = 0x843B
+0xE1F1 = 0x843C
+0xE1F2 = 0x843D
+0xE1F3 = 0x843E
+0xE1F4 = 0x843F
+0xE1F5 = 0x8440
+0xE1F6 = 0x8441
+0xE1F7 = 0x8442
+0xE1F8 = 0x8443
+0xE1F9 = 0x8444
+0xE1FA = 0x8445
+0xE1FB = 0x8446
+0xE1FC = 0x8447
+0xE1FD = 0x8448
+0xE1FE = 0x8449
+0xE1FF = 0x844A
+0xE200 = 0x844B
+0xE201 = 0x844C
+0xE202 = 0x844D
+0xE203 = 0x844E
+0xE204 = 0x844F
+0xE205 = 0x8450
+0xE206 = 0x8451
+0xE207 = 0x8452
+0xE208 = 0x8453
+0xE209 = 0x8454
+0xE20A = 0x8455
+0xE20B = 0x8456
+0xE20C = 0x8457
+0xE20D = 0x8458
+0xE20E = 0x8459
+0xE20F = 0x845A
+0xE210 = 0x845B
+0xE211 = 0x845C
+0xE212 = 0x845D
+0xE213 = 0x845E
+0xE214 = 0x845F
+0xE215 = 0x8460
+0xE216 = 0x8461
+0xE217 = 0x8462
+0xE218 = 0x8463
+0xE219 = 0x8464
+0xE21A = 0x8465
+0xE21B = 0x8466
+0xE21C = 0x8467
+0xE21D = 0x8468
+0xE21E = 0x8469
+0xE21F = 0x846A
+0xE220 = 0x846B
+0xE221 = 0x846C
+0xE222 = 0x846D
+0xE223 = 0x846E
+0xE224 = 0x846F
+0xE225 = 0x8470
+0xE226 = 0x8471
+0xE227 = 0x8472
+0xE228 = 0x8473
+0xE229 = 0x8474
+0xE22A = 0x8475
+0xE22B = 0x8476
+0xE22C = 0x8477
+0xE22D = 0x8478
+0xE22E = 0x8479
+0xE22F = 0x847A
+0xE230 = 0x847B
+0xE231 = 0x847C
+0xE232 = 0x847D
+0xE233 = 0x847E
+0xE234 = 0x8521
+0xE235 = 0x8522
+0xE236 = 0x8523
+0xE237 = 0x8524
+0xE238 = 0x8525
+0xE239 = 0x8526
+0xE23A = 0x8527
+0xE23B = 0x8528
+0xE23C = 0x8529
+0xE23D = 0x852A
+0xE23E = 0x852B
+0xE23F = 0x852C
+0xE240 = 0x852D
+0xE241 = 0x852E
+0xE242 = 0x852F
+0xE243 = 0x8530
+0xE244 = 0x8531
+0xE245 = 0x8532
+0xE246 = 0x8533
+0xE247 = 0x8534
+0xE248 = 0x8535
+0xE249 = 0x8536
+0xE24A = 0x8537
+0xE24B = 0x8538
+0xE24C = 0x8539
+0xE24D = 0x853A
+0xE24E = 0x853B
+0xE24F = 0x853C
+0xE250 = 0x853D
+0xE251 = 0x853E
+0xE252 = 0x853F
+0xE253 = 0x8540
+0xE254 = 0x8541
+0xE255 = 0x8542
+0xE256 = 0x8543
+0xE257 = 0x8544
+0xE258 = 0x8545
+0xE259 = 0x8546
+0xE25A = 0x8547
+0xE25B = 0x8548
+0xE25C = 0x8549
+0xE25D = 0x854A
+0xE25E = 0x854B
+0xE25F = 0x854C
+0xE260 = 0x854D
+0xE261 = 0x854E
+0xE262 = 0x854F
+0xE263 = 0x8550
+0xE264 = 0x8551
+0xE265 = 0x8552
+0xE266 = 0x8553
+0xE267 = 0x8554
+0xE268 = 0x8555
+0xE269 = 0x8556
+0xE26A = 0x8557
+0xE26B = 0x8558
+0xE26C = 0x8559
+0xE26D = 0x855A
+0xE26E = 0x855B
+0xE26F = 0x855C
+0xE270 = 0x855D
+0xE271 = 0x855E
+0xE272 = 0x855F
+0xE273 = 0x8560
+0xE274 = 0x8561
+0xE275 = 0x8562
+0xE276 = 0x8563
+0xE277 = 0x8564
+0xE278 = 0x8565
+0xE279 = 0x8566
+0xE27A = 0x8567
+0xE27B = 0x8568
+0xE27C = 0x8569
+0xE27D = 0x856A
+0xE27E = 0x856B
+0xE27F = 0x856C
+0xE280 = 0x856D
+0xE281 = 0x856E
+0xE282 = 0x856F
+0xE283 = 0x8570
+0xE284 = 0x8571
+0xE285 = 0x8572
+0xE286 = 0x8573
+0xE287 = 0x8574
+0xE288 = 0x8575
+0xE289 = 0x8576
+0xE28A = 0x8577
+0xE28B = 0x8578
+0xE28C = 0x8579
+0xE28D = 0x857A
+0xE28E = 0x857B
+0xE28F = 0x857C
+0xE290 = 0x857D
+0xE291 = 0x857E
+0xE292 = 0x8621
+0xE293 = 0x8622
+0xE294 = 0x8623
+0xE295 = 0x8624
+0xE296 = 0x8625
+0xE297 = 0x8626
+0xE298 = 0x8627
+0xE299 = 0x8628
+0xE29A = 0x8629
+0xE29B = 0x862A
+0xE29C = 0x862B
+0xE29D = 0x862C
+0xE29E = 0x862D
+0xE29F = 0x862E
+0xE2A0 = 0x862F
+0xE2A1 = 0x8630
+0xE2A2 = 0x8631
+0xE2A3 = 0x8632
+0xE2A4 = 0x8633
+0xE2A5 = 0x8634
+0xE2A6 = 0x8635
+0xE2A7 = 0x8636
+0xE2A8 = 0x8637
+0xE2A9 = 0x8638
+0xE2AA = 0x8639
+0xE2AB = 0x863A
+0xE2AC = 0x863B
+0xE2AD = 0x863C
+0xE2AE = 0x863D
+0xE2AF = 0x863E
+0xE2B0 = 0x863F
+0xE2B1 = 0x8640
+0xE2B2 = 0x8641
+0xE2B3 = 0x8642
+0xE2B4 = 0x8643
+0xE2B5 = 0x8644
+0xE2B6 = 0x8645
+0xE2B7 = 0x8646
+0xE2B8 = 0x8647
+0xE2B9 = 0x8648
+0xE2BA = 0x8649
+0xE2BB = 0x864A
+0xE2BC = 0x864B
+0xE2BD = 0x864C
+0xE2BE = 0x864D
+0xE2BF = 0x864E
+0xE2C0 = 0x864F
+0xE2C1 = 0x8650
+0xE2C2 = 0x8651
+0xE2C3 = 0x8652
+0xE2C4 = 0x8653
+0xE2C5 = 0x8654
+0xE2C6 = 0x8655
+0xE2C7 = 0x8656
+0xE2C8 = 0x8657
+0xE2C9 = 0x8658
+0xE2CA = 0x8659
+0xE2CB = 0x865A
+0xE2CC = 0x865B
+0xE2CD = 0x865C
+0xE2CE = 0x865D
+0xE2CF = 0x865E
+0xE2D0 = 0x865F
+0xE2D1 = 0x8660
+0xE2D2 = 0x8661
+0xE2D3 = 0x8662
+0xE2D4 = 0x8663
+0xE2D5 = 0x8664
+0xE2D6 = 0x8665
+0xE2D7 = 0x8666
+0xE2D8 = 0x8667
+0xE2D9 = 0x8668
+0xE2DA = 0x8669
+0xE2DB = 0x866A
+0xE2DC = 0x866B
+0xE2DD = 0x866C
+0xE2DE = 0x866D
+0xE2DF = 0x866E
+0xE2E0 = 0x866F
+0xE2E1 = 0x8670
+0xE2E2 = 0x8671
+0xE2E3 = 0x8672
+0xE2E4 = 0x8673
+0xE2E5 = 0x8674
+0xE2E6 = 0x8675
+0xE2E7 = 0x8676
+0xE2E8 = 0x8677
+0xE2E9 = 0x8678
+0xE2EA = 0x8679
+0xE2EB = 0x867A
+0xE2EC = 0x867B
+0xE2ED = 0x867C
+0xE2EE = 0x867D
+0xE2EF = 0x867E
+0xE2F0 = 0x8721
+0xE2F1 = 0x8722
+0xE2F2 = 0x8723
+0xE2F3 = 0x8724
+0xE2F4 = 0x8725
+0xE2F5 = 0x8726
+0xE2F6 = 0x8727
+0xE2F7 = 0x8728
+0xE2F8 = 0x8729
+0xE2F9 = 0x872A
+0xE2FA = 0x872B
+0xE2FB = 0x872C
+0xE2FC = 0x872D
+0xE2FD = 0x872E
+0xE2FE = 0x872F
+0xE2FF = 0x8730
+0xE300 = 0x8731
+0xE301 = 0x8732
+0xE302 = 0x8733
+0xE303 = 0x8734
+0xE304 = 0x8735
+0xE305 = 0x8736
+0xE306 = 0x8737
+0xE307 = 0x8738
+0xE308 = 0x8739
+0xE309 = 0x873A
+0xE30A = 0x873B
+0xE30B = 0x873C
+0xE30C = 0x873D
+0xE30D = 0x873E
+0xE30E = 0x873F
+0xE30F = 0x8740
+0xE310 = 0x8741
+0xE311 = 0x8742
+0xE312 = 0x8743
+0xE313 = 0x8744
+0xE314 = 0x8745
+0xE315 = 0x8746
+0xE316 = 0x8747
+0xE317 = 0x8748
+0xE318 = 0x8749
+0xE319 = 0x874A
+0xE31A = 0x874B
+0xE31B = 0x874C
+0xE31C = 0x874D
+0xE31D = 0x874E
+0xE31E = 0x874F
+0xE31F = 0x8750
+0xE320 = 0x8751
+0xE321 = 0x8752
+0xE322 = 0x8753
+0xE323 = 0x8754
+0xE324 = 0x8755
+0xE325 = 0x8756
+0xE326 = 0x8757
+0xE327 = 0x8758
+0xE328 = 0x8759
+0xE329 = 0x875A
+0xE32A = 0x875B
+0xE32B = 0x875C
+0xE32C = 0x875D
+0xE32D = 0x875E
+0xE32E = 0x875F
+0xE32F = 0x8760
+0xE330 = 0x8761
+0xE331 = 0x8762
+0xE332 = 0x8763
+0xE333 = 0x8764
+0xE334 = 0x8765
+0xE335 = 0x8766
+0xE336 = 0x8767
+0xE337 = 0x8768
+0xE338 = 0x8769
+0xE339 = 0x876A
+0xE33A = 0x876B
+0xE33B = 0x876C
+0xE33C = 0x876D
+0xE33D = 0x876E
+0xE33E = 0x876F
+0xE33F = 0x8770
+0xE340 = 0x8771
+0xE341 = 0x8772
+0xE342 = 0x8773
+0xE343 = 0x8774
+0xE344 = 0x8775
+0xE345 = 0x8776
+0xE346 = 0x8777
+0xE347 = 0x8778
+0xE348 = 0x8779
+0xE349 = 0x877A
+0xE34A = 0x877B
+0xE34B = 0x877C
+0xE34C = 0x877D
+0xE34D = 0x877E
+0xE34E = 0x8821
+0xE34F = 0x8822
+0xE350 = 0x8823
+0xE351 = 0x8824
+0xE352 = 0x8825
+0xE353 = 0x8826
+0xE354 = 0x8827
+0xE355 = 0x8828
+0xE356 = 0x8829
+0xE357 = 0x882A
+0xE358 = 0x882B
+0xE359 = 0x882C
+0xE35A = 0x882D
+0xE35B = 0x882E
+0xE35C = 0x882F
+0xE35D = 0x8830
+0xE35E = 0x8831
+0xE35F = 0x8832
+0xE360 = 0x8833
+0xE361 = 0x8834
+0xE362 = 0x8835
+0xE363 = 0x8836
+0xE364 = 0x8837
+0xE365 = 0x8838
+0xE366 = 0x8839
+0xE367 = 0x883A
+0xE368 = 0x883B
+0xE369 = 0x883C
+0xE36A = 0x883D
+0xE36B = 0x883E
+0xE36C = 0x883F
+0xE36D = 0x8840
+0xE36E = 0x8841
+0xE36F = 0x8842
+0xE370 = 0x8843
+0xE371 = 0x8844
+0xE372 = 0x8845
+0xE373 = 0x8846
+0xE374 = 0x8847
+0xE375 = 0x8848
+0xE376 = 0x8849
+0xE377 = 0x884A
+0xE378 = 0x884B
+0xE379 = 0x884C
+0xE37A = 0x884D
+0xE37B = 0x884E
+0xE37C = 0x884F
+0xE37D = 0x8850
+0xE37E = 0x8851
+0xE37F = 0x8852
+0xE380 = 0x8853
+0xE381 = 0x8854
+0xE382 = 0x8855
+0xE383 = 0x8856
+0xE384 = 0x8857
+0xE385 = 0x8858
+0xE386 = 0x8859
+0xE387 = 0x885A
+0xE388 = 0x885B
+0xE389 = 0x885C
+0xE38A = 0x885D
+0xE38B = 0x885E
+0xE38C = 0x885F
+0xE38D = 0x8860
+0xE38E = 0x8861
+0xE38F = 0x8862
+0xE390 = 0x8863
+0xE391 = 0x8864
+0xE392 = 0x8865
+0xE393 = 0x8866
+0xE394 = 0x8867
+0xE395 = 0x8868
+0xE396 = 0x8869
+0xE397 = 0x886A
+0xE398 = 0x886B
+0xE399 = 0x886C
+0xE39A = 0x886D
+0xE39B = 0x886E
+0xE39C = 0x886F
+0xE39D = 0x8870
+0xE39E = 0x8871
+0xE39F = 0x8872
+0xE3A0 = 0x8873
+0xE3A1 = 0x8874
+0xE3A2 = 0x8875
+0xE3A3 = 0x8876
+0xE3A4 = 0x8877
+0xE3A5 = 0x8878
+0xE3A6 = 0x8879
+0xE3A7 = 0x887A
+0xE3A8 = 0x887B
+0xE3A9 = 0x887C
+0xE3AA = 0x887D
+0xE3AB = 0x887E
+0xE3AC = 0x8921
+0xE3AD = 0x8922
+0xE3AE = 0x8923
+0xE3AF = 0x8924
+0xE3B0 = 0x8925
+0xE3B1 = 0x8926
+0xE3B2 = 0x8927
+0xE3B3 = 0x8928
+0xE3B4 = 0x8929
+0xE3B5 = 0x892A
+0xE3B6 = 0x892B
+0xE3B7 = 0x892C
+0xE3B8 = 0x892D
+0xE3B9 = 0x892E
+0xE3BA = 0x892F
+0xE3BB = 0x8930
+0xE3BC = 0x8931
+0xE3BD = 0x8932
+0xE3BE = 0x8933
+0xE3BF = 0x8934
+0xE3C0 = 0x8935
+0xE3C1 = 0x8936
+0xE3C2 = 0x8937
+0xE3C3 = 0x8938
+0xE3C4 = 0x8939
+0xE3C5 = 0x893A
+0xE3C6 = 0x893B
+0xE3C7 = 0x893C
+0xE3C8 = 0x893D
+0xE3C9 = 0x893E
+0xE3CA = 0x893F
+0xE3CB = 0x8940
+0xE3CC = 0x8941
+0xE3CD = 0x8942
+0xE3CE = 0x8943
+0xE3CF = 0x8944
+0xE3D0 = 0x8945
+0xE3D1 = 0x8946
+0xE3D2 = 0x8947
+0xE3D3 = 0x8948
+0xE3D4 = 0x8949
+0xE3D5 = 0x894A
+0xE3D6 = 0x894B
+0xE3D7 = 0x894C
+0xE3D8 = 0x894D
+0xE3D9 = 0x894E
+0xE3DA = 0x894F
+0xE3DB = 0x8950
+0xE3DC = 0x8951
+0xE3DD = 0x8952
+0xE3DE = 0x8953
+0xE3DF = 0x8954
+0xE3E0 = 0x8955
+0xE3E1 = 0x8956
+0xE3E2 = 0x8957
+0xE3E3 = 0x8958
+0xE3E4 = 0x8959
+0xE3E5 = 0x895A
+0xE3E6 = 0x895B
+0xE3E7 = 0x895C
+0xE3E8 = 0x895D
+0xE3E9 = 0x895E
+0xE3EA = 0x895F
+0xE3EB = 0x8960
+0xE3EC = 0x8961
+0xE3ED = 0x8962
+0xE3EE = 0x8963
+0xE3EF = 0x8964
+0xE3F0 = 0x8965
+0xE3F1 = 0x8966
+0xE3F2 = 0x8967
+0xE3F3 = 0x8968
+0xE3F4 = 0x8969
+0xE3F5 = 0x896A
+0xE3F6 = 0x896B
+0xE3F7 = 0x896C
+0xE3F8 = 0x896D
+0xE3F9 = 0x896E
+0xE3FA = 0x896F
+0xE3FB = 0x8970
+0xE3FC = 0x8971
+0xE3FD = 0x8972
+0xE3FE = 0x8973
+0xE3FF = 0x8974
+0xE400 = 0x8975
+0xE401 = 0x8976
+0xE402 = 0x8977
+0xE403 = 0x8978
+0xE404 = 0x8979
+0xE405 = 0x897A
+0xE406 = 0x897B
+0xE407 = 0x897C
+0xE408 = 0x897D
+0xE409 = 0x897E
+0xE40A = 0x8A21
+0xE40B = 0x8A22
+0xE40C = 0x8A23
+0xE40D = 0x8A24
+0xE40E = 0x8A25
+0xE40F = 0x8A26
+0xE410 = 0x8A27
+0xE411 = 0x8A28
+0xE412 = 0x8A29
+0xE413 = 0x8A2A
+0xE414 = 0x8A2B
+0xE415 = 0x8A2C
+0xE416 = 0x8A2D
+0xE417 = 0x8A2E
+0xE418 = 0x8A2F
+0xE419 = 0x8A30
+0xE41A = 0x8A31
+0xE41B = 0x8A32
+0xE41C = 0x8A33
+0xE41D = 0x8A34
+0xE41E = 0x8A35
+0xE41F = 0x8A36
+0xE420 = 0x8A37
+0xE421 = 0x8A38
+0xE422 = 0x8A39
+0xE423 = 0x8A3A
+0xE424 = 0x8A3B
+0xE425 = 0x8A3C
+0xE426 = 0x8A3D
+0xE427 = 0x8A3E
+0xE428 = 0x8A3F
+0xE429 = 0x8A40
+0xE42A = 0x8A41
+0xE42B = 0x8A42
+0xE42C = 0x8A43
+0xE42D = 0x8A44
+0xE42E = 0x8A45
+0xE42F = 0x8A46
+0xE430 = 0x8A47
+0xE431 = 0x8A48
+0xE432 = 0x8A49
+0xE433 = 0x8A4A
+0xE434 = 0x8A4B
+0xE435 = 0x8A4C
+0xE436 = 0x8A4D
+0xE437 = 0x8A4E
+0xE438 = 0x8A4F
+0xE439 = 0x8A50
+0xE43A = 0x8A51
+0xE43B = 0x8A52
+0xE43C = 0x8A53
+0xE43D = 0x8A54
+0xE43E = 0x8A55
+0xE43F = 0x8A56
+0xE440 = 0x8A57
+0xE441 = 0x8A58
+0xE442 = 0x8A59
+0xE443 = 0x8A5A
+0xE444 = 0x8A5B
+0xE445 = 0x8A5C
+0xE446 = 0x8A5D
+0xE447 = 0x8A5E
+0xE448 = 0x8A5F
+0xE449 = 0x8A60
+0xE44A = 0x8A61
+0xE44B = 0x8A62
+0xE44C = 0x8A63
+0xE44D = 0x8A64
+0xE44E = 0x8A65
+0xE44F = 0x8A66
+0xE450 = 0x8A67
+0xE451 = 0x8A68
+0xE452 = 0x8A69
+0xE453 = 0x8A6A
+0xE454 = 0x8A6B
+0xE455 = 0x8A6C
+0xE456 = 0x8A6D
+0xE457 = 0x8A6E
+0xE458 = 0x8A6F
+0xE459 = 0x8A70
+0xE45A = 0x8A71
+0xE45B = 0x8A72
+0xE45C = 0x8A73
+0xE45D = 0x8A74
+0xE45E = 0x8A75
+0xE45F = 0x8A76
+0xE460 = 0x8A77
+0xE461 = 0x8A78
+0xE462 = 0x8A79
+0xE463 = 0x8A7A
+0xE464 = 0x8A7B
+0xE465 = 0x8A7C
+0xE466 = 0x8A7D
+0xE467 = 0x8A7E
+0xE468 = 0x8B21
+0xE469 = 0x8B22
+0xE46A = 0x8B23
+0xE46B = 0x8B24
+0xE46C = 0x8B25
+0xE46D = 0x8B26
+0xE46E = 0x8B27
+0xE46F = 0x8B28
+0xE470 = 0x8B29
+0xE471 = 0x8B2A
+0xE472 = 0x8B2B
+0xE473 = 0x8B2C
+0xE474 = 0x8B2D
+0xE475 = 0x8B2E
+0xE476 = 0x8B2F
+0xE477 = 0x8B30
+0xE478 = 0x8B31
+0xE479 = 0x8B32
+0xE47A = 0x8B33
+0xE47B = 0x8B34
+0xE47C = 0x8B35
+0xE47D = 0x8B36
+0xE47E = 0x8B37
+0xE47F = 0x8B38
+0xE480 = 0x8B39
+0xE481 = 0x8B3A
+0xE482 = 0x8B3B
+0xE483 = 0x8B3C
+0xE484 = 0x8B3D
+0xE485 = 0x8B3E
+0xE486 = 0x8B3F
+0xE487 = 0x8B40
+0xE488 = 0x8B41
+0xE489 = 0x8B42
+0xE48A = 0x8B43
+0xE48B = 0x8B44
+0xE48C = 0x8B45
+0xE48D = 0x8B46
+0xE48E = 0x8B47
+0xE48F = 0x8B48
+0xE490 = 0x8B49
+0xE491 = 0x8B4A
+0xE492 = 0x8B4B
+0xE493 = 0x8B4C
+0xE494 = 0x8B4D
+0xE495 = 0x8B4E
+0xE496 = 0x8B4F
+0xE497 = 0x8B50
+0xE498 = 0x8B51
+0xE499 = 0x8B52
+0xE49A = 0x8B53
+0xE49B = 0x8B54
+0xE49C = 0x8B55
+0xE49D = 0x8B56
+0xE49E = 0x8B57
+0xE49F = 0x8B58
+0xE4A0 = 0x8B59
+0xE4A1 = 0x8B5A
+0xE4A2 = 0x8B5B
+0xE4A3 = 0x8B5C
+0xE4A4 = 0x8B5D
+0xE4A5 = 0x8B5E
+0xE4A6 = 0x8B5F
+0xE4A7 = 0x8B60
+0xE4A8 = 0x8B61
+0xE4A9 = 0x8B62
+0xE4AA = 0x8B63
+0xE4AB = 0x8B64
+0xE4AC = 0x8B65
+0xE4AD = 0x8B66
+0xE4AE = 0x8B67
+0xE4AF = 0x8B68
+0xE4B0 = 0x8B69
+0xE4B1 = 0x8B6A
+0xE4B2 = 0x8B6B
+0xE4B3 = 0x8B6C
+0xE4B4 = 0x8B6D
+0xE4B5 = 0x8B6E
+0xE4B6 = 0x8B6F
+0xE4B7 = 0x8B70
+0xE4B8 = 0x8B71
+0xE4B9 = 0x8B72
+0xE4BA = 0x8B73
+0xE4BB = 0x8B74
+0xE4BC = 0x8B75
+0xE4BD = 0x8B76
+0xE4BE = 0x8B77
+0xE4BF = 0x8B78
+0xE4C0 = 0x8B79
+0xE4C1 = 0x8B7A
+0xE4C2 = 0x8B7B
+0xE4C3 = 0x8B7C
+0xE4C4 = 0x8B7D
+0xE4C5 = 0x8B7E
+0xE4C6 = 0x8C21
+0xE4C7 = 0x8C22
+0xE4C8 = 0x8C23
+0xE4C9 = 0x8C24
+0xE4CA = 0x8C25
+0xE4CB = 0x8C26
+0xE4CC = 0x8C27
+0xE4CD = 0x8C28
+0xE4CE = 0x8C29
+0xE4CF = 0x8C2A
+0xE4D0 = 0x8C2B
+0xE4D1 = 0x8C2C
+0xE4D2 = 0x8C2D
+0xE4D3 = 0x8C2E
+0xE4D4 = 0x8C2F
+0xE4D5 = 0x8C30
+0xE4D6 = 0x8C31
+0xE4D7 = 0x8C32
+0xE4D8 = 0x8C33
+0xE4D9 = 0x8C34
+0xE4DA = 0x8C35
+0xE4DB = 0x8C36
+0xE4DC = 0x8C37
+0xE4DD = 0x8C38
+0xE4DE = 0x8C39
+0xE4DF = 0x8C3A
+0xE4E0 = 0x8C3B
+0xE4E1 = 0x8C3C
+0xE4E2 = 0x8C3D
+0xE4E3 = 0x8C3E
+0xE4E4 = 0x8C3F
+0xE4E5 = 0x8C40
+0xE4E6 = 0x8C41
+0xE4E7 = 0x8C42
+0xE4E8 = 0x8C43
+0xE4E9 = 0x8C44
+0xE4EA = 0x8C45
+0xE4EB = 0x8C46
+0xE4EC = 0x8C47
+0xE4ED = 0x8C48
+0xE4EE = 0x8C49
+0xE4EF = 0x8C4A
+0xE4F0 = 0x8C4B
+0xE4F1 = 0x8C4C
+0xE4F2 = 0x8C4D
+0xE4F3 = 0x8C4E
+0xE4F4 = 0x8C4F
+0xE4F5 = 0x8C50
+0xE4F6 = 0x8C51
+0xE4F7 = 0x8C52
+0xE4F8 = 0x8C53
+0xE4F9 = 0x8C54
+0xE4FA = 0x8C55
+0xE4FB = 0x8C56
+0xE4FC = 0x8C57
+0xE4FD = 0x8C58
+0xE4FE = 0x8C59
+0xE4FF = 0x8C5A
+0xE500 = 0x8C5B
+0xE501 = 0x8C5C
+0xE502 = 0x8C5D
+0xE503 = 0x8C5E
+0xE504 = 0x8C5F
+0xE505 = 0x8C60
+0xE506 = 0x8C61
+0xE507 = 0x8C62
+0xE508 = 0x8C63
+0xE509 = 0x8C64
+0xE50A = 0x8C65
+0xE50B = 0x8C66
+0xE50C = 0x8C67
+0xE50D = 0x8C68
+0xE50E = 0x8C69
+0xE50F = 0x8C6A
+0xE510 = 0x8C6B
+0xE511 = 0x8C6C
+0xE512 = 0x8C6D
+0xE513 = 0x8C6E
+0xE514 = 0x8C6F
+0xE515 = 0x8C70
+0xE516 = 0x8C71
+0xE517 = 0x8C72
+0xE518 = 0x8C73
+0xE519 = 0x8C74
+0xE51A = 0x8C75
+0xE51B = 0x8C76
+0xE51C = 0x8C77
+0xE51D = 0x8C78
+0xE51E = 0x8C79
+0xE51F = 0x8C7A
+0xE520 = 0x8C7B
+0xE521 = 0x8C7C
+0xE522 = 0x8C7D
+0xE523 = 0x8C7E
+0xE524 = 0x8D21
+0xE525 = 0x8D22
+0xE526 = 0x8D23
+0xE527 = 0x8D24
+0xE528 = 0x8D25
+0xE529 = 0x8D26
+0xE52A = 0x8D27
+0xE52B = 0x8D28
+0xE52C = 0x8D29
+0xE52D = 0x8D2A
+0xE52E = 0x8D2B
+0xE52F = 0x8D2C
+0xE530 = 0x8D2D
+0xE531 = 0x8D2E
+0xE532 = 0x8D2F
+0xE533 = 0x8D30
+0xE534 = 0x8D31
+0xE535 = 0x8D32
+0xE536 = 0x8D33
+0xE537 = 0x8D34
+0xE538 = 0x8D35
+0xE539 = 0x8D36
+0xE53A = 0x8D37
+0xE53B = 0x8D38
+0xE53C = 0x8D39
+0xE53D = 0x8D3A
+0xE53E = 0x8D3B
+0xE53F = 0x8D3C
+0xE540 = 0x8D3D
+0xE541 = 0x8D3E
+0xE542 = 0x8D3F
+0xE543 = 0x8D40
+0xE544 = 0x8D41
+0xE545 = 0x8D42
+0xE546 = 0x8D43
+0xE547 = 0x8D44
+0xE548 = 0x8D45
+0xE549 = 0x8D46
+0xE54A = 0x8D47
+0xE54B = 0x8D48
+0xE54C = 0x8D49
+0xE54D = 0x8D4A
+0xE54E = 0x8D4B
+0xE54F = 0x8D4C
+0xE550 = 0x8D4D
+0xE551 = 0x8D4E
+0xE552 = 0x8D4F
+0xE553 = 0x8D50
+0xE554 = 0x8D51
+0xE555 = 0x8D52
+0xE556 = 0x8D53
+0xE557 = 0x8D54
+0xE558 = 0x8D55
+0xE559 = 0x8D56
+0xE55A = 0x8D57
+0xE55B = 0x8D58
+0xE55C = 0x8D59
+0xE55D = 0x8D5A
+0xE55E = 0x8D5B
+0xE55F = 0x8D5C
+0xE560 = 0x8D5D
+0xE561 = 0x8D5E
+0xE562 = 0x8D5F
+0xE563 = 0x8D60
+0xE564 = 0x8D61
+0xE565 = 0x8D62
+0xE566 = 0x8D63
+0xE567 = 0x8D64
+0xE568 = 0x8D65
+0xE569 = 0x8D66
+0xE56A = 0x8D67
+0xE56B = 0x8D68
+0xE56C = 0x8D69
+0xE56D = 0x8D6A
+0xE56E = 0x8D6B
+0xE56F = 0x8D6C
+0xE570 = 0x8D6D
+0xE571 = 0x8D6E
+0xE572 = 0x8D6F
+0xE573 = 0x8D70
+0xE574 = 0x8D71
+0xE575 = 0x8D72
+0xE576 = 0x8D73
+0xE577 = 0x8D74
+0xE578 = 0x8D75
+0xE579 = 0x8D76
+0xE57A = 0x8D77
+0xE57B = 0x8D78
+0xE57C = 0x8D79
+0xE57D = 0x8D7A
+0xE57E = 0x8D7B
+0xE57F = 0x8D7C
+0xE580 = 0x8D7D
+0xE581 = 0x8D7E
+0xE582 = 0x8E21
+0xE583 = 0x8E22
+0xE584 = 0x8E23
+0xE585 = 0x8E24
+0xE586 = 0x8E25
+0xE587 = 0x8E26
+0xE588 = 0x8E27
+0xE589 = 0x8E28
+0xE58A = 0x8E29
+0xE58B = 0x8E2A
+0xE58C = 0x8E2B
+0xE58D = 0x8E2C
+0xE58E = 0x8E2D
+0xE58F = 0x8E2E
+0xE590 = 0x8E2F
+0xE591 = 0x8E30
+0xE592 = 0x8E31
+0xE593 = 0x8E32
+0xE594 = 0x8E33
+0xE595 = 0x8E34
+0xE596 = 0x8E35
+0xE597 = 0x8E36
+0xE598 = 0x8E37
+0xE599 = 0x8E38
+0xE59A = 0x8E39
+0xE59B = 0x8E3A
+0xE59C = 0x8E3B
+0xE59D = 0x8E3C
+0xE59E = 0x8E3D
+0xE59F = 0x8E3E
+0xE5A0 = 0x8E3F
+0xE5A1 = 0x8E40
+0xE5A2 = 0x8E41
+0xE5A3 = 0x8E42
+0xE5A4 = 0x8E43
+0xE5A5 = 0x8E44
+0xE5A6 = 0x8E45
+0xE5A7 = 0x8E46
+0xE5A8 = 0x8E47
+0xE5A9 = 0x8E48
+0xE5AA = 0x8E49
+0xE5AB = 0x8E4A
+0xE5AC = 0x8E4B
+0xE5AD = 0x8E4C
+0xE5AE = 0x8E4D
+0xE5AF = 0x8E4E
+0xE5B0 = 0x8E4F
+0xE5B1 = 0x8E50
+0xE5B2 = 0x8E51
+0xE5B3 = 0x8E52
+0xE5B4 = 0x8E53
+0xE5B5 = 0x8E54
+0xE5B6 = 0x8E55
+0xE5B7 = 0x8E56
+0xE5B8 = 0x8E57
+0xE5B9 = 0x8E58
+0xE5BA = 0x8E59
+0xE5BB = 0x8E5A
+0xE5BC = 0x8E5B
+0xE5BD = 0x8E5C
+0xE5BE = 0x8E5D
+0xE5BF = 0x8E5E
+0xE5C0 = 0x8E5F
+0xE5C1 = 0x8E60
+0xE5C2 = 0x8E61
+0xE5C3 = 0x8E62
+0xE5C4 = 0x8E63
+0xE5C5 = 0x8E64
+0xE5C6 = 0x8E65
+0xE5C7 = 0x8E66
+0xE5C8 = 0x8E67
+0xE5C9 = 0x8E68
+0xE5CA = 0x8E69
+0xE5CB = 0x8E6A
+0xE5CC = 0x8E6B
+0xE5CD = 0x8E6C
+0xE5CE = 0x8E6D
+0xE5CF = 0x8E6E
+0xE5D0 = 0x8E6F
+0xE5D1 = 0x8E70
+0xE5D2 = 0x8E71
+0xE5D3 = 0x8E72
+0xE5D4 = 0x8E73
+0xE5D5 = 0x8E74
+0xE5D6 = 0x8E75
+0xE5D7 = 0x8E76
+0xE5D8 = 0x8E77
+0xE5D9 = 0x8E78
+0xE5DA = 0x8E79
+0xE5DB = 0x8E7A
+0xE5DC = 0x8E7B
+0xE5DD = 0x8E7C
+0xE5DE = 0x8E7D
+0xE5DF = 0x8E7E
+0xE5E0 = 0x8F21
+0xE5E1 = 0x8F22
+0xE5E2 = 0x8F23
+0xE5E3 = 0x8F24
+0xE5E4 = 0x8F25
+0xE5E5 = 0x8F26
+0xE5E6 = 0x8F27
+0xE5E7 = 0x8F28
+0xE5E8 = 0x8F29
+0xE5E9 = 0x8F2A
+0xE5EA = 0x8F2B
+0xE5EB = 0x8F2C
+0xE5EC = 0x8F2D
+0xE5ED = 0x8F2E
+0xE5EE = 0x8F2F
+0xE5EF = 0x8F30
+0xE5F0 = 0x8F31
+0xE5F1 = 0x8F32
+0xE5F2 = 0x8F33
+0xE5F3 = 0x8F34
+0xE5F4 = 0x8F35
+0xE5F5 = 0x8F36
+0xE5F6 = 0x8F37
+0xE5F7 = 0x8F38
+0xE5F8 = 0x8F39
+0xE5F9 = 0x8F3A
+0xE5FA = 0x8F3B
+0xE5FB = 0x8F3C
+0xE5FC = 0x8F3D
+0xE5FD = 0x8F3E
+0xE5FE = 0x8F3F
+0xE5FF = 0x8F40
+0xE600 = 0x8F41
+0xE601 = 0x8F42
+0xE602 = 0x8F43
+0xE603 = 0x8F44
+0xE604 = 0x8F45
+0xE605 = 0x8F46
+0xE606 = 0x8F47
+0xE607 = 0x8F48
+0xE608 = 0x8F49
+0xE609 = 0x8F4A
+0xE60A = 0x8F4B
+0xE60B = 0x8F4C
+0xE60C = 0x8F4D
+0xE60D = 0x8F4E
+0xE60E = 0x8F4F
+0xE60F = 0x8F50
+0xE610 = 0x8F51
+0xE611 = 0x8F52
+0xE612 = 0x8F53
+0xE613 = 0x8F54
+0xE614 = 0x8F55
+0xE615 = 0x8F56
+0xE616 = 0x8F57
+0xE617 = 0x8F58
+0xE618 = 0x8F59
+0xE619 = 0x8F5A
+0xE61A = 0x8F5B
+0xE61B = 0x8F5C
+0xE61C = 0x8F5D
+0xE61D = 0x8F5E
+0xE61E = 0x8F5F
+0xE61F = 0x8F60
+0xE620 = 0x8F61
+0xE621 = 0x8F62
+0xE622 = 0x8F63
+0xE623 = 0x8F64
+0xE624 = 0x8F65
+0xE625 = 0x8F66
+0xE626 = 0x8F67
+0xE627 = 0x8F68
+0xE628 = 0x8F69
+0xE629 = 0x8F6A
+0xE62A = 0x8F6B
+0xE62B = 0x8F6C
+0xE62C = 0x8F6D
+0xE62D = 0x8F6E
+0xE62E = 0x8F6F
+0xE62F = 0x8F70
+0xE630 = 0x8F71
+0xE631 = 0x8F72
+0xE632 = 0x8F73
+0xE633 = 0x8F74
+0xE634 = 0x8F75
+0xE635 = 0x8F76
+0xE636 = 0x8F77
+0xE637 = 0x8F78
+0xE638 = 0x8F79
+0xE639 = 0x8F7A
+0xE63A = 0x8F7B
+0xE63B = 0x8F7C
+0xE63C = 0x8F7D
+0xE63D = 0x8F7E
+0xE63E = 0x9021
+0xE63F = 0x9022
+0xE640 = 0x9023
+0xE641 = 0x9024
+0xE642 = 0x9025
+0xE643 = 0x9026
+0xE644 = 0x9027
+0xE645 = 0x9028
+0xE646 = 0x9029
+0xE647 = 0x902A
+0xE648 = 0x902B
+0xE649 = 0x902C
+0xE64A = 0x902D
+0xE64B = 0x902E
+0xE64C = 0x902F
+0xE64D = 0x9030
+0xE64E = 0x9031
+0xE64F = 0x9032
+0xE650 = 0x9033
+0xE651 = 0x9034
+0xE652 = 0x9035
+0xE653 = 0x9036
+0xE654 = 0x9037
+0xE655 = 0x9038
+0xE656 = 0x9039
+0xE657 = 0x903A
+0xE658 = 0x903B
+0xE659 = 0x903C
+0xE65A = 0x903D
+0xE65B = 0x903E
+0xE65C = 0x903F
+0xE65D = 0x9040
+0xE65E = 0x9041
+0xE65F = 0x9042
+0xE660 = 0x9043
+0xE661 = 0x9044
+0xE662 = 0x9045
+0xE663 = 0x9046
+0xE664 = 0x9047
+0xE665 = 0x9048
+0xE666 = 0x9049
+0xE667 = 0x904A
+0xE668 = 0x904B
+0xE669 = 0x904C
+0xE66A = 0x904D
+0xE66B = 0x904E
+0xE66C = 0x904F
+0xE66D = 0x9050
+0xE66E = 0x9051
+0xE66F = 0x9052
+0xE670 = 0x9053
+0xE671 = 0x9054
+0xE672 = 0x9055
+0xE673 = 0x9056
+0xE674 = 0x9057
+0xE675 = 0x9058
+0xE676 = 0x9059
+0xE677 = 0x905A
+0xE678 = 0x905B
+0xE679 = 0x905C
+0xE67A = 0x905D
+0xE67B = 0x905E
+0xE67C = 0x905F
+0xE67D = 0x9060
+0xE67E = 0x9061
+0xE67F = 0x9062
+0xE680 = 0x9063
+0xE681 = 0x9064
+0xE682 = 0x9065
+0xE683 = 0x9066
+0xE684 = 0x9067
+0xE685 = 0x9068
+0xE686 = 0x9069
+0xE687 = 0x906A
+0xE688 = 0x906B
+0xE689 = 0x906C
+0xE68A = 0x906D
+0xE68B = 0x906E
+0xE68C = 0x906F
+0xE68D = 0x9070
+0xE68E = 0x9071
+0xE68F = 0x9072
+0xE690 = 0x9073
+0xE691 = 0x9074
+0xE692 = 0x9075
+0xE693 = 0x9076
+0xE694 = 0x9077
+0xE695 = 0x9078
+0xE696 = 0x9079
+0xE697 = 0x907A
+0xE698 = 0x907B
+0xE699 = 0x907C
+0xE69A = 0x907D
+0xE69B = 0x907E
+0xE69C = 0x9121
+0xE69D = 0x9122
+0xE69E = 0x9123
+0xE69F = 0x9124
+0xE6A0 = 0x9125
+0xE6A1 = 0x9126
+0xE6A2 = 0x9127
+0xE6A3 = 0x9128
+0xE6A4 = 0x9129
+0xE6A5 = 0x912A
+0xE6A6 = 0x912B
+0xE6A7 = 0x912C
+0xE6A8 = 0x912D
+0xE6A9 = 0x912E
+0xE6AA = 0x912F
+0xE6AB = 0x9130
+0xE6AC = 0x9131
+0xE6AD = 0x9132
+0xE6AE = 0x9133
+0xE6AF = 0x9134
+0xE6B0 = 0x9135
+0xE6B1 = 0x9136
+0xE6B2 = 0x9137
+0xE6B3 = 0x9138
+0xE6B4 = 0x9139
+0xE6B5 = 0x913A
+0xE6B6 = 0x913B
+0xE6B7 = 0x913C
+0xE6B8 = 0x913D
+0xE6B9 = 0x913E
+0xE6BA = 0x913F
+0xE6BB = 0x9140
+0xE6BC = 0x9141
+0xE6BD = 0x9142
+0xE6BE = 0x9143
+0xE6BF = 0x9144
+0xE6C0 = 0x9145
+0xE6C1 = 0x9146
+0xE6C2 = 0x9147
+0xE6C3 = 0x9148
+0xE6C4 = 0x9149
+0xE6C5 = 0x914A
+0xE6C6 = 0x914B
+0xE6C7 = 0x914C
+0xE6C8 = 0x914D
+0xE6C9 = 0x914E
+0xE6CA = 0x914F
+0xE6CB = 0x9150
+0xE6CC = 0x9151
+0xE6CD = 0x9152
+0xE6CE = 0x9153
+0xE6CF = 0x9154
+0xE6D0 = 0x9155
+0xE6D1 = 0x9156
+0xE6D2 = 0x9157
+0xE6D3 = 0x9158
+0xE6D4 = 0x9159
+0xE6D5 = 0x915A
+0xE6D6 = 0x915B
+0xE6D7 = 0x915C
+0xE6D8 = 0x915D
+0xE6D9 = 0x915E
+0xE6DA = 0x915F
+0xE6DB = 0x9160
+0xE6DC = 0x9161
+0xE6DD = 0x9162
+0xE6DE = 0x9163
+0xE6DF = 0x9164
+0xE6E0 = 0x9165
+0xE6E1 = 0x9166
+0xE6E2 = 0x9167
+0xE6E3 = 0x9168
+0xE6E4 = 0x9169
+0xE6E5 = 0x916A
+0xE6E6 = 0x916B
+0xE6E7 = 0x916C
+0xE6E8 = 0x916D
+0xE6E9 = 0x916E
+0xE6EA = 0x916F
+0xE6EB = 0x9170
+0xE6EC = 0x9171
+0xE6ED = 0x9172
+0xE6EE = 0x9173
+0xE6EF = 0x9174
+0xE6F0 = 0x9175
+0xE6F1 = 0x9176
+0xE6F2 = 0x9177
+0xE6F3 = 0x9178
+0xE6F4 = 0x9179
+0xE6F5 = 0x917A
+0xE6F6 = 0x917B
+0xE6F7 = 0x917C
+0xE6F8 = 0x917D
+0xE6F9 = 0x917E
+0xE6FA = 0x9221
+0xE6FB = 0x9222
+0xE6FC = 0x9223
+0xE6FD = 0x9224
+0xE6FE = 0x9225
+0xE6FF = 0x9226
+0xE700 = 0x9227
+0xE701 = 0x9228
+0xE702 = 0x9229
+0xE703 = 0x922A
+0xE704 = 0x922B
+0xE705 = 0x922C
+0xE706 = 0x922D
+0xE707 = 0x922E
+0xE708 = 0x922F
+0xE709 = 0x9230
+0xE70A = 0x9231
+0xE70B = 0x9232
+0xE70C = 0x9233
+0xE70D = 0x9234
+0xE70E = 0x9235
+0xE70F = 0x9236
+0xE710 = 0x9237
+0xE711 = 0x9238
+0xE712 = 0x9239
+0xE713 = 0x923A
+0xE714 = 0x923B
+0xE715 = 0x923C
+0xE716 = 0x923D
+0xE717 = 0x923E
+0xE718 = 0x923F
+0xE719 = 0x9240
+0xE71A = 0x9241
+0xE71B = 0x9242
+0xE71C = 0x9243
+0xE71D = 0x9244
+0xE71E = 0x9245
+0xE71F = 0x9246
+0xE720 = 0x9247
+0xE721 = 0x9248
+0xE722 = 0x9249
+0xE723 = 0x924A
+0xE724 = 0x924B
+0xE725 = 0x924C
+0xE726 = 0x924D
+0xE727 = 0x924E
+0xE728 = 0x924F
+0xE729 = 0x9250
+0xE72A = 0x9251
+0xE72B = 0x9252
+0xE72C = 0x9253
+0xE72D = 0x9254
+0xE72E = 0x9255
+0xE72F = 0x9256
+0xE730 = 0x9257
+0xE731 = 0x9258
+0xE732 = 0x9259
+0xE733 = 0x925A
+0xE734 = 0x925B
+0xE735 = 0x925C
+0xE736 = 0x925D
+0xE737 = 0x925E
+0xE738 = 0x925F
+0xE739 = 0x9260
+0xE73A = 0x9261
+0xE73B = 0x9262
+0xE73C = 0x9263
+0xE73D = 0x9264
+0xE73E = 0x9265
+0xE73F = 0x9266
+0xE740 = 0x9267
+0xE741 = 0x9268
+0xE742 = 0x9269
+0xE743 = 0x926A
+0xE744 = 0x926B
+0xE745 = 0x926C
+0xE746 = 0x926D
+0xE747 = 0x926E
+0xE748 = 0x926F
+0xE749 = 0x9270
+0xE74A = 0x9271
+0xE74B = 0x9272
+0xE74C = 0x9273
+0xE74D = 0x9274
+0xE74E = 0x9275
+0xE74F = 0x9276
+0xE750 = 0x9277
+0xE751 = 0x9278
+0xE752 = 0x9279
+0xE753 = 0x927A
+0xE754 = 0x927B
+0xE755 = 0x927C
+0xE756 = 0x927D
+0xE757 = 0x927E
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@IBM.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@IBM.src
new file mode 100644
index 0000000..78e9b31
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@IBM.src
@@ -0,0 +1,420 @@
+# $NetBSD: UCS%CP932VDC@IBM.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/CP932VDC:IBM"
+SRC_ZONE	0x2116-0xFFE4
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0x2116 = 0x933A
+0x2121 = 0x933B
+0x2160 = 0x932B
+0x2161 = 0x932C
+0x2162 = 0x932D
+0x2163 = 0x932E
+0x2164 = 0x932F
+0x2165 = 0x9330
+0x2166 = 0x9331
+0x2167 = 0x9332
+0x2168 = 0x9333
+0x2169 = 0x9334
+0x2170 = 0x9321
+0x2171 = 0x9322
+0x2172 = 0x9323
+0x2173 = 0x9324
+0x2174 = 0x9325
+0x2175 = 0x9326
+0x2176 = 0x9327
+0x2177 = 0x9328
+0x2178 = 0x9329
+0x2179 = 0x932A
+0x2235 = 0x933C
+0x3231 = 0x9339
+0x4E28 = 0x9349
+0x4EE1 = 0x934A
+0x4EFC = 0x934B
+0x4F00 = 0x934C
+0x4F03 = 0x934D
+0x4F39 = 0x934E
+0x4F56 = 0x934F
+0x4F8A = 0x9351
+0x4F92 = 0x9350
+0x4F94 = 0x9353
+0x4F9A = 0x9352
+0x4FC9 = 0x9342
+0x4FCD = 0x9354
+0x4FFF = 0x9357
+0x501E = 0x9358
+0x5022 = 0x9356
+0x5040 = 0x9355
+0x5042 = 0x935B
+0x5046 = 0x9359
+0x5070 = 0x935A
+0x5094 = 0x935C
+0x50D8 = 0x935E
+0x50F4 = 0x935D
+0x514A = 0x935F
+0x5164 = 0x9360
+0x519D = 0x9361
+0x51BE = 0x9362
+0x51EC = 0x9363
+0x5215 = 0x9364
+0x529C = 0x9365
+0x52A6 = 0x9366
+0x52AF = 0x9558
+0x52C0 = 0x9367
+0x52DB = 0x9368
+0x5300 = 0x9369
+0x5307 = 0x936A
+0x5324 = 0x936B
+0x5372 = 0x936C
+0x5393 = 0x936D
+0x53B2 = 0x936E
+0x53DD = 0x936F
+0x548A = 0x9372
+0x549C = 0x9371
+0x54A9 = 0x9373
+0x54FF = 0x9374
+0x5586 = 0x9375
+0x5759 = 0x9376
+0x5765 = 0x9377
+0x57AC = 0x9378
+0x57C7 = 0x937A
+0x57C8 = 0x9379
+0x589E = 0x937D
+0x58B2 = 0x937E
+0x590B = 0x9421
+0x5953 = 0x9422
+0x595B = 0x9423
+0x595D = 0x9424
+0x5963 = 0x9425
+0x59A4 = 0x9426
+0x59BA = 0x9427
+0x5B56 = 0x9428
+0x5BC0 = 0x9429
+0x5BD8 = 0x942B
+0x5BEC = 0x942C
+0x5C1E = 0x942D
+0x5CA6 = 0x942E
+0x5CBA = 0x942F
+0x5CF5 = 0x9430
+0x5D27 = 0x9431
+0x5D42 = 0x9434
+0x5D53 = 0x9432
+0x5D6D = 0x9435
+0x5DB8 = 0x9436
+0x5DB9 = 0x9437
+0x5DD0 = 0x9438
+0x5F21 = 0x9439
+0x5F34 = 0x943A
+0x5F45 = 0x9348
+0x5F67 = 0x943B
+0x5FB7 = 0x943C
+0x5FDE = 0x943D
+0x605D = 0x943E
+0x6085 = 0x943F
+0x608A = 0x9440
+0x60D5 = 0x9442
+0x60DE = 0x9441
+0x60F2 = 0x9444
+0x6111 = 0x9445
+0x6120 = 0x9443
+0x6130 = 0x9447
+0x6137 = 0x9446
+0x6198 = 0x9448
+0x6213 = 0x9449
+0x62A6 = 0x944A
+0x63F5 = 0x944B
+0x6460 = 0x944C
+0x649D = 0x944D
+0x64CE = 0x944E
+0x654E = 0x944F
+0x6600 = 0x9450
+0x6609 = 0x9453
+0x6615 = 0x9451
+0x661E = 0x9455
+0x6624 = 0x9456
+0x662E = 0x9454
+0x6631 = 0x9344
+0x663B = 0x9452
+0x6657 = 0x9458
+0x6659 = 0x9459
+0x6665 = 0x9457
+0x6673 = 0x945B
+0x6699 = 0x945C
+0x66A0 = 0x945D
+0x66B2 = 0x945E
+0x66BF = 0x945F
+0x66FA = 0x9460
+0x66FB = 0x9347
+0x670E = 0x9461
+0x6766 = 0x9463
+0x67BB = 0x9464
+0x67C0 = 0x9466
+0x6801 = 0x9467
+0x6844 = 0x9468
+0x6852 = 0x9465
+0x68C8 = 0x9345
+0x68CF = 0x9469
+0x6968 = 0x946B
+0x6998 = 0x946D
+0x69E2 = 0x946E
+0x6A30 = 0x946F
+0x6A46 = 0x9471
+0x6A6B = 0x9470
+0x6A73 = 0x9472
+0x6A7E = 0x9473
+0x6AE2 = 0x9474
+0x6AE4 = 0x9475
+0x6BD6 = 0x9476
+0x6C3F = 0x9477
+0x6C5C = 0x9478
+0x6C6F = 0x947A
+0x6C86 = 0x9479
+0x6CDA = 0x947B
+0x6D04 = 0x947C
+0x6D6F = 0x947E
+0x6D87 = 0x947D
+0x6D96 = 0x9521
+0x6DAC = 0x9522
+0x6DCF = 0x9523
+0x6DF2 = 0x9525
+0x6DF8 = 0x9524
+0x6DFC = 0x9526
+0x6E27 = 0x9529
+0x6E39 = 0x9527
+0x6E3C = 0x952A
+0x6E5C = 0x9528
+0x6EBF = 0x952B
+0x6F88 = 0x952C
+0x6FB5 = 0x952D
+0x6FF5 = 0x952E
+0x7005 = 0x952F
+0x7007 = 0x9530
+0x7028 = 0x9531
+0x7085 = 0x9532
+0x70AB = 0x9533
+0x70BB = 0x9343
+0x7104 = 0x9535
+0x710F = 0x9534
+0x7146 = 0x9537
+0x7147 = 0x9538
+0x715C = 0x9536
+0x71C1 = 0x953A
+0x71FE = 0x953B
+0x72B1 = 0x953C
+0x72BE = 0x953D
+0x7324 = 0x953E
+0x7377 = 0x9540
+0x73BD = 0x9541
+0x73C9 = 0x9542
+0x73D2 = 0x9545
+0x73D6 = 0x9543
+0x73E3 = 0x9544
+0x73F5 = 0x9547
+0x7407 = 0x9546
+0x7426 = 0x9548
+0x7429 = 0x954A
+0x742A = 0x9549
+0x742E = 0x954B
+0x7462 = 0x954C
+0x7489 = 0x954D
+0x749F = 0x954E
+0x7501 = 0x954F
+0x752F = 0x942A
+0x756F = 0x9550
+0x7682 = 0x9551
+0x769B = 0x9554
+0x769C = 0x9552
+0x769E = 0x9553
+0x76A6 = 0x9555
+0x7746 = 0x9557
+0x7821 = 0x9559
+0x784E = 0x955A
+0x7864 = 0x955B
+0x787A = 0x955C
+0x7930 = 0x955D
+0x7994 = 0x9561
+0x799B = 0x9563
+0x7AD1 = 0x9564
+0x7AE7 = 0x9565
+0x7AEB = 0x9567
+0x7B9E = 0x9568
+0x7D48 = 0x956A
+0x7D5C = 0x956B
+0x7DA0 = 0x956D
+0x7DB7 = 0x956C
+0x7DD6 = 0x956E
+0x7E52 = 0x956F
+0x7E8A = 0x933D
+0x7F47 = 0x9570
+0x7FA1 = 0x9571
+0x8301 = 0x9573
+0x8362 = 0x9574
+0x837F = 0x9575
+0x83C7 = 0x9576
+0x83F6 = 0x9577
+0x8448 = 0x9578
+0x84B4 = 0x9579
+0x84DC = 0x9341
+0x8553 = 0x957A
+0x8559 = 0x957B
+0x856B = 0x957C
+0x85B0 = 0x957E
+0x8807 = 0x9623
+0x88F5 = 0x9624
+0x891C = 0x933E
+0x8A12 = 0x9625
+0x8A37 = 0x9626
+0x8A79 = 0x9627
+0x8AA7 = 0x9628
+0x8ABE = 0x9629
+0x8ADF = 0x962A
+0x8AF6 = 0x962C
+0x8B53 = 0x962D
+0x8B7F = 0x962E
+0x8CF0 = 0x962F
+0x8CF4 = 0x9630
+0x8D12 = 0x9631
+0x8D76 = 0x9632
+0x8ECF = 0x9634
+0x9067 = 0x9637
+0x90DE = 0x9638
+0x9115 = 0x963A
+0x9127 = 0x963B
+0x91D7 = 0x963D
+0x91DA = 0x963C
+0x91DE = 0x963E
+0x91E4 = 0x9641
+0x91E5 = 0x9642
+0x91ED = 0x963F
+0x91EE = 0x9640
+0x9206 = 0x9643
+0x920A = 0x9645
+0x9210 = 0x9644
+0x9239 = 0x964C
+0x923A = 0x9646
+0x923C = 0x9648
+0x9240 = 0x9647
+0x924E = 0x9649
+0x9251 = 0x964B
+0x9259 = 0x964A
+0x9267 = 0x964D
+0x9277 = 0x964F
+0x9278 = 0x9650
+0x9288 = 0x9340
+0x92A7 = 0x964E
+0x92D0 = 0x9654
+0x92D3 = 0x9658
+0x92D5 = 0x9656
+0x92D7 = 0x9652
+0x92D9 = 0x9653
+0x92E0 = 0x9657
+0x92E7 = 0x9651
+0x92F9 = 0x9346
+0x92FB = 0x965B
+0x92FF = 0x965E
+0x9302 = 0x9660
+0x931D = 0x965F
+0x931E = 0x965D
+0x9321 = 0x965A
+0x9325 = 0x9659
+0x9348 = 0x933F
+0x9357 = 0x9662
+0x9370 = 0x9661
+0x93A4 = 0x9663
+0x93C6 = 0x9664
+0x93DE = 0x9665
+0x93F8 = 0x9666
+0x9431 = 0x9667
+0x9445 = 0x9668
+0x9448 = 0x9669
+0x9592 = 0x966A
+0x969D = 0x966D
+0x96AF = 0x966E
+0x9733 = 0x966F
+0x973B = 0x9670
+0x9743 = 0x9671
+0x974D = 0x9672
+0x974F = 0x9673
+0x9751 = 0x9674
+0x9755 = 0x9675
+0x9857 = 0x9676
+0x9865 = 0x9677
+0x9927 = 0x967A
+0x999E = 0x967C
+0x9A4E = 0x967D
+0x9AD9 = 0x967E
+0x9ADC = 0x9721
+0x9B72 = 0x9723
+0x9B75 = 0x9722
+0x9B8F = 0x9724
+0x9BB1 = 0x9725
+0x9BBB = 0x9726
+0x9C00 = 0x9727
+0x9D6B = 0x9729
+0x9D70 = 0x9728
+0x9E19 = 0x972B
+0x9ED1 = 0x972C
+0xF929 = 0x9462
+0xF9DC = 0x966B
+0xFA0E = 0x9370
+0xFA0F = 0x937B
+0xFA10 = 0x937C
+0xFA11 = 0x9433
+0xFA12 = 0x945A
+0xFA13 = 0x946A
+0xFA14 = 0x946C
+0xFA15 = 0x9539
+0xFA16 = 0x953F
+0xFA17 = 0x9556
+0xFA18 = 0x955E
+0xFA19 = 0x955F
+0xFA1A = 0x9560
+0xFA1B = 0x9562
+0xFA1C = 0x9566
+0xFA1D = 0x9569
+0xFA1E = 0x9572
+0xFA1F = 0x957D
+0xFA20 = 0x9621
+0xFA21 = 0x9622
+0xFA22 = 0x962B
+0xFA23 = 0x9633
+0xFA24 = 0x9635
+0xFA25 = 0x9636
+0xFA26 = 0x9639
+0xFA27 = 0x9655
+0xFA28 = 0x965C
+0xFA29 = 0x966C
+0xFA2A = 0x9678
+0xFA2B = 0x9679
+0xFA2C = 0x967B
+0xFA2D = 0x972A
+0xFF02 = 0x9338
+0xFF07 = 0x9337
+0xFFE2 = 0x9335
+0xFFE4 = 0x9336
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@NEC_IBM.src b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@NEC_IBM.src
new file mode 100644
index 0000000..f94167a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/CP/UCS%CP932VDC@NEC_IBM.src
@@ -0,0 +1,406 @@
+# $NetBSD: UCS%CP932VDC@NEC_IBM.src,v 1.1 2006/11/04 03:46:19 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/CP932VDC:NEC_IBM"
+SRC_ZONE	0x2170-0xFFE4
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#    Name:     cp932 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.01
+#    Table format:  Format A
+#    Date:          04/15/98
+#
+#    Contact:       cpxlate@microsoft.com
+#
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp932 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp932 order
+#
+0x2170 = 0x7C71
+0x2171 = 0x7C72
+0x2172 = 0x7C73
+0x2173 = 0x7C74
+0x2174 = 0x7C75
+0x2175 = 0x7C76
+0x2176 = 0x7C77
+0x2177 = 0x7C78
+0x2178 = 0x7C79
+0x2179 = 0x7C7A
+0x4E28 = 0x792D
+0x4EE1 = 0x792E
+0x4EFC = 0x792F
+0x4F00 = 0x7930
+0x4F03 = 0x7931
+0x4F39 = 0x7932
+0x4F56 = 0x7933
+0x4F8A = 0x7935
+0x4F92 = 0x7934
+0x4F94 = 0x7937
+0x4F9A = 0x7936
+0x4FC9 = 0x7926
+0x4FCD = 0x7938
+0x4FFF = 0x793B
+0x501E = 0x793C
+0x5022 = 0x793A
+0x5040 = 0x7939
+0x5042 = 0x793F
+0x5046 = 0x793D
+0x5070 = 0x793E
+0x5094 = 0x7940
+0x50D8 = 0x7942
+0x50F4 = 0x7941
+0x514A = 0x7943
+0x5164 = 0x7944
+0x519D = 0x7945
+0x51BE = 0x7946
+0x51EC = 0x7947
+0x5215 = 0x7948
+0x529C = 0x7949
+0x52A6 = 0x794A
+0x52AF = 0x7B3C
+0x52C0 = 0x794B
+0x52DB = 0x794C
+0x5300 = 0x794D
+0x5307 = 0x794E
+0x5324 = 0x794F
+0x5372 = 0x7950
+0x5393 = 0x7951
+0x53B2 = 0x7952
+0x53DD = 0x7953
+0x548A = 0x7956
+0x549C = 0x7955
+0x54A9 = 0x7957
+0x54FF = 0x7958
+0x5586 = 0x7959
+0x5759 = 0x795A
+0x5765 = 0x795B
+0x57AC = 0x795C
+0x57C7 = 0x795E
+0x57C8 = 0x795D
+0x589E = 0x7961
+0x58B2 = 0x7962
+0x590B = 0x7963
+0x5953 = 0x7964
+0x595B = 0x7965
+0x595D = 0x7966
+0x5963 = 0x7967
+0x59A4 = 0x7968
+0x59BA = 0x7969
+0x5B56 = 0x796A
+0x5BC0 = 0x796B
+0x5BD8 = 0x796D
+0x5BEC = 0x796E
+0x5C1E = 0x796F
+0x5CA6 = 0x7970
+0x5CBA = 0x7971
+0x5CF5 = 0x7972
+0x5D27 = 0x7973
+0x5D42 = 0x7976
+0x5D53 = 0x7974
+0x5D6D = 0x7977
+0x5DB8 = 0x7978
+0x5DB9 = 0x7979
+0x5DD0 = 0x797A
+0x5F21 = 0x797B
+0x5F34 = 0x797C
+0x5F45 = 0x792C
+0x5F67 = 0x797D
+0x5FB7 = 0x797E
+0x5FDE = 0x7A21
+0x605D = 0x7A22
+0x6085 = 0x7A23
+0x608A = 0x7A24
+0x60D5 = 0x7A26
+0x60DE = 0x7A25
+0x60F2 = 0x7A28
+0x6111 = 0x7A29
+0x6120 = 0x7A27
+0x6130 = 0x7A2B
+0x6137 = 0x7A2A
+0x6198 = 0x7A2C
+0x6213 = 0x7A2D
+0x62A6 = 0x7A2E
+0x63F5 = 0x7A2F
+0x6460 = 0x7A30
+0x649D = 0x7A31
+0x64CE = 0x7A32
+0x654E = 0x7A33
+0x6600 = 0x7A34
+0x6609 = 0x7A37
+0x6615 = 0x7A35
+0x661E = 0x7A39
+0x6624 = 0x7A3A
+0x662E = 0x7A38
+0x6631 = 0x7928
+0x663B = 0x7A36
+0x6657 = 0x7A3C
+0x6659 = 0x7A3D
+0x6665 = 0x7A3B
+0x6673 = 0x7A3F
+0x6699 = 0x7A40
+0x66A0 = 0x7A41
+0x66B2 = 0x7A42
+0x66BF = 0x7A43
+0x66FA = 0x7A44
+0x66FB = 0x792B
+0x670E = 0x7A45
+0x6766 = 0x7A47
+0x67BB = 0x7A48
+0x67C0 = 0x7A4A
+0x6801 = 0x7A4B
+0x6844 = 0x7A4C
+0x6852 = 0x7A49
+0x68C8 = 0x7929
+0x68CF = 0x7A4D
+0x6968 = 0x7A4F
+0x6998 = 0x7A51
+0x69E2 = 0x7A52
+0x6A30 = 0x7A53
+0x6A46 = 0x7A55
+0x6A6B = 0x7A54
+0x6A73 = 0x7A56
+0x6A7E = 0x7A57
+0x6AE2 = 0x7A58
+0x6AE4 = 0x7A59
+0x6BD6 = 0x7A5A
+0x6C3F = 0x7A5B
+0x6C5C = 0x7A5C
+0x6C6F = 0x7A5E
+0x6C86 = 0x7A5D
+0x6CDA = 0x7A5F
+0x6D04 = 0x7A60
+0x6D6F = 0x7A62
+0x6D87 = 0x7A61
+0x6D96 = 0x7A63
+0x6DAC = 0x7A64
+0x6DCF = 0x7A65
+0x6DF2 = 0x7A67
+0x6DF8 = 0x7A66
+0x6DFC = 0x7A68
+0x6E27 = 0x7A6B
+0x6E39 = 0x7A69
+0x6E3C = 0x7A6C
+0x6E5C = 0x7A6A
+0x6EBF = 0x7A6D
+0x6F88 = 0x7A6E
+0x6FB5 = 0x7A6F
+0x6FF5 = 0x7A70
+0x7005 = 0x7A71
+0x7007 = 0x7A72
+0x7028 = 0x7A73
+0x7085 = 0x7A74
+0x70AB = 0x7A75
+0x70BB = 0x7927
+0x7104 = 0x7A77
+0x710F = 0x7A76
+0x7146 = 0x7A79
+0x7147 = 0x7A7A
+0x715C = 0x7A78
+0x71C1 = 0x7A7C
+0x71FE = 0x7A7D
+0x72B1 = 0x7A7E
+0x72BE = 0x7B21
+0x7324 = 0x7B22
+0x7377 = 0x7B24
+0x73BD = 0x7B25
+0x73C9 = 0x7B26
+0x73D2 = 0x7B29
+0x73D6 = 0x7B27
+0x73E3 = 0x7B28
+0x73F5 = 0x7B2B
+0x7407 = 0x7B2A
+0x7426 = 0x7B2C
+0x7429 = 0x7B2E
+0x742A = 0x7B2D
+0x742E = 0x7B2F
+0x7462 = 0x7B30
+0x7489 = 0x7B31
+0x749F = 0x7B32
+0x7501 = 0x7B33
+0x752F = 0x796C
+0x756F = 0x7B34
+0x7682 = 0x7B35
+0x769B = 0x7B38
+0x769C = 0x7B36
+0x769E = 0x7B37
+0x76A6 = 0x7B39
+0x7746 = 0x7B3B
+0x7821 = 0x7B3D
+0x784E = 0x7B3E
+0x7864 = 0x7B3F
+0x787A = 0x7B40
+0x7930 = 0x7B41
+0x7994 = 0x7B45
+0x799B = 0x7B47
+0x7AD1 = 0x7B48
+0x7AE7 = 0x7B49
+0x7AEB = 0x7B4B
+0x7B9E = 0x7B4C
+0x7D48 = 0x7B4E
+0x7D5C = 0x7B4F
+0x7DA0 = 0x7B51
+0x7DB7 = 0x7B50
+0x7DD6 = 0x7B52
+0x7E52 = 0x7B53
+0x7E8A = 0x7921
+0x7F47 = 0x7B54
+0x7FA1 = 0x7B55
+0x8301 = 0x7B57
+0x8362 = 0x7B58
+0x837F = 0x7B59
+0x83C7 = 0x7B5A
+0x83F6 = 0x7B5B
+0x8448 = 0x7B5C
+0x84B4 = 0x7B5D
+0x84DC = 0x7925
+0x8553 = 0x7B5E
+0x8559 = 0x7B5F
+0x856B = 0x7B60
+0x85B0 = 0x7B62
+0x8807 = 0x7B65
+0x88F5 = 0x7B66
+0x891C = 0x7922
+0x8A12 = 0x7B67
+0x8A37 = 0x7B68
+0x8A79 = 0x7B69
+0x8AA7 = 0x7B6A
+0x8ABE = 0x7B6B
+0x8ADF = 0x7B6C
+0x8AF6 = 0x7B6E
+0x8B53 = 0x7B6F
+0x8B7F = 0x7B70
+0x8CF0 = 0x7B71
+0x8CF4 = 0x7B72
+0x8D12 = 0x7B73
+0x8D76 = 0x7B74
+0x8ECF = 0x7B76
+0x9067 = 0x7B79
+0x90DE = 0x7B7A
+0x9115 = 0x7B7C
+0x9127 = 0x7B7D
+0x91D7 = 0x7C21
+0x91DA = 0x7B7E
+0x91DE = 0x7C22
+0x91E4 = 0x7C25
+0x91E5 = 0x7C26
+0x91ED = 0x7C23
+0x91EE = 0x7C24
+0x9206 = 0x7C27
+0x920A = 0x7C29
+0x9210 = 0x7C28
+0x9239 = 0x7C30
+0x923A = 0x7C2A
+0x923C = 0x7C2C
+0x9240 = 0x7C2B
+0x924E = 0x7C2D
+0x9251 = 0x7C2F
+0x9259 = 0x7C2E
+0x9267 = 0x7C31
+0x9277 = 0x7C33
+0x9278 = 0x7C34
+0x9288 = 0x7924
+0x92A7 = 0x7C32
+0x92D0 = 0x7C38
+0x92D3 = 0x7C3C
+0x92D5 = 0x7C3A
+0x92D7 = 0x7C36
+0x92D9 = 0x7C37
+0x92E0 = 0x7C3B
+0x92E7 = 0x7C35
+0x92F9 = 0x792A
+0x92FB = 0x7C3F
+0x92FF = 0x7C42
+0x9302 = 0x7C44
+0x931D = 0x7C43
+0x931E = 0x7C41
+0x9321 = 0x7C3E
+0x9325 = 0x7C3D
+0x9348 = 0x7923
+0x9357 = 0x7C46
+0x9370 = 0x7C45
+0x93A4 = 0x7C47
+0x93C6 = 0x7C48
+0x93DE = 0x7C49
+0x93F8 = 0x7C4A
+0x9431 = 0x7C4B
+0x9445 = 0x7C4C
+0x9448 = 0x7C4D
+0x9592 = 0x7C4E
+0x969D = 0x7C51
+0x96AF = 0x7C52
+0x9733 = 0x7C53
+0x973B = 0x7C54
+0x9743 = 0x7C55
+0x974D = 0x7C56
+0x974F = 0x7C57
+0x9751 = 0x7C58
+0x9755 = 0x7C59
+0x9857 = 0x7C5A
+0x9865 = 0x7C5B
+0x9927 = 0x7C5E
+0x999E = 0x7C60
+0x9A4E = 0x7C61
+0x9AD9 = 0x7C62
+0x9ADC = 0x7C63
+0x9B72 = 0x7C65
+0x9B75 = 0x7C64
+0x9B8F = 0x7C66
+0x9BB1 = 0x7C67
+0x9BBB = 0x7C68
+0x9C00 = 0x7C69
+0x9D6B = 0x7C6B
+0x9D70 = 0x7C6A
+0x9E19 = 0x7C6D
+0x9ED1 = 0x7C6E
+0xF929 = 0x7A46
+0xF9DC = 0x7C4F
+0xFA0E = 0x7954
+0xFA0F = 0x795F
+0xFA10 = 0x7960
+0xFA11 = 0x7975
+0xFA12 = 0x7A3E
+0xFA13 = 0x7A4E
+0xFA14 = 0x7A50
+0xFA15 = 0x7A7B
+0xFA16 = 0x7B23
+0xFA17 = 0x7B3A
+0xFA18 = 0x7B42
+0xFA19 = 0x7B43
+0xFA1A = 0x7B44
+0xFA1B = 0x7B46
+0xFA1C = 0x7B4A
+0xFA1D = 0x7B4D
+0xFA1E = 0x7B56
+0xFA1F = 0x7B61
+0xFA20 = 0x7B63
+0xFA21 = 0x7B64
+0xFA22 = 0x7B6D
+0xFA23 = 0x7B75
+0xFA24 = 0x7B77
+0xFA25 = 0x7B78
+0xFA26 = 0x7B7B
+0xFA27 = 0x7C39
+0xFA28 = 0x7C40
+0xFA29 = 0x7C50
+0xFA2A = 0x7C5C
+0xFA2B = 0x7C5D
+0xFA2C = 0x7C5F
+0xFA2D = 0x7C6C
+0xFF02 = 0x7C7E
+0xFF07 = 0x7C7D
+0xFFE2 = 0x7C7B
+0xFFE4 = 0x7C7C
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0201-KANA%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0201-KANA%UCS.src
new file mode 100644
index 0000000..d25b580
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0201-KANA%UCS.src
@@ -0,0 +1,127 @@
+# $NetBSD: JISX0201-KANA%UCS.src,v 1.3 2006/10/26 16:19:02 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		JISX0201-KANA/UCS
+SRC_ZONE	0x21-0x5F
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0201 (1976) to Unicode 1.1 Table
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0201 into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0201 and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0201 and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0201 and
+# Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Three tab-separated columns
+#		Column #1 is the shift JIS code (in hex as 0xXX)
+#		Column #2 is the Unicode (in hex as 0xXXXX)
+#		Column #3 the Unicode (ISO 10646) name (follows a comment sign)
+#
+#	The entries are in JIS order
+#
+#
+0x21 = 0xFF61
+0x22 = 0xFF62
+0x23 = 0xFF63
+0x24 = 0xFF64
+0x25 = 0xFF65
+0x26 = 0xFF66
+0x27 = 0xFF67
+0x28 = 0xFF68
+0x29 = 0xFF69
+0x2A = 0xFF6A
+0x2B = 0xFF6B
+0x2C = 0xFF6C
+0x2D = 0xFF6D
+0x2E = 0xFF6E
+0x2F = 0xFF6F
+0x30 = 0xFF70
+0x31 = 0xFF71
+0x32 = 0xFF72
+0x33 = 0xFF73
+0x34 = 0xFF74
+0x35 = 0xFF75
+0x36 = 0xFF76
+0x37 = 0xFF77
+0x38 = 0xFF78
+0x39 = 0xFF79
+0x3A = 0xFF7A
+0x3B = 0xFF7B
+0x3C = 0xFF7C
+0x3D = 0xFF7D
+0x3E = 0xFF7E
+0x3F = 0xFF7F
+0x40 = 0xFF80
+0x41 = 0xFF81
+0x42 = 0xFF82
+0x43 = 0xFF83
+0x44 = 0xFF84
+0x45 = 0xFF85
+0x46 = 0xFF86
+0x47 = 0xFF87
+0x48 = 0xFF88
+0x49 = 0xFF89
+0x4A = 0xFF8A
+0x4B = 0xFF8B
+0x4C = 0xFF8C
+0x4D = 0xFF8D
+0x4E = 0xFF8E
+0x4F = 0xFF8F
+0x50 = 0xFF90
+0x51 = 0xFF91
+0x52 = 0xFF92
+0x53 = 0xFF93
+0x54 = 0xFF94
+0x55 = 0xFF95
+0x56 = 0xFF96
+0x57 = 0xFF97
+0x58 = 0xFF98
+0x59 = 0xFF99
+0x5A = 0xFF9A
+0x5B = 0xFF9B
+0x5C = 0xFF9C
+0x5D = 0xFF9D
+0x5E = 0xFF9E
+0x5F = 0xFF9F
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@1990%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@1990%UCS.src
new file mode 100644
index 0000000..c2cacd4
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@1990%UCS.src
@@ -0,0 +1,6972 @@
+# $NetBSD: JISX0208@1990%UCS.src,v 1.5 2006/12/02 14:36:13 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		JISX0208:1990/UCS
+SRC_ZONE	0x21-0x74 / 0x21-0x7E / 8
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0208 (1990) to Unicode
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0208 (1990) into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0208 (1990) and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0208 (1990) and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0208 (1990)
+# and Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Four tab-separated columns
+#		 Column #1 is the shift-JIS code (in hex)
+#		 Column #2 is the JIS X 0208 code (in hex as 0xXXXX)
+#		 Column #3 is the Unicode (in hex as 0xXXXX)
+#		 Column #4 the Unicode name (follows a comment sign, '#')
+#			The official names for Unicode characters U+4E00
+#			to U+9FA5, inclusive, is "CJK UNIFIED IDEOGRAPH-XXXX",
+#			where XXXX is the code point.  Including all these
+#			names in this file increases its size substantially
+#			and needlessly.  The token "" is used for the
+#			name of these characters.  If necessary, it can be
+#			expanded algorithmically by a parser or editor.
+#
+#	The entries are in JIS X 0208 order
+#
+#	The following algorithms can be used to change the hex form
+#		of JIS 0208 to other standard forms:
+#
+#		To change hex to EUC form, add 0x8080
+#		To change hex to kuten form, first subtract 0x2020.  Then
+#			the high and low bytes correspond to the ku and ten of
+#			the kuten form.  For example, 0x2121 -> 0x0101 -> 0101;
+#			0x7426 -> 0x5406 -> 8406
+#
+#   The kanji mappings are a normative part of ISO/IEC 10646.  The
+#       non-kanji mappings are provisional, pending definition of
+#       official mappings by Japanese standards bodies
+#
+#	Any comments or problems, contact 
+#
+#
+# NetBSD specific modification:
+#	2003-08-18 : change the conversion for reverse solidus (0x2140).
+#			Unicode Inc.'s table converts it to U+005C,
+#			but this may conflict in the case of compound encoding,
+#			e.g. EUC-JP.  Instead, we use U+FF3C.
+#
+0x2121 = 0x3000
+0x2122 = 0x3001
+0x2123 = 0x3002
+0x2124 = 0xFF0C
+0x2125 = 0xFF0E
+0x2126 = 0x30FB
+0x2127 = 0xFF1A
+0x2128 = 0xFF1B
+0x2129 = 0xFF1F
+0x212A = 0xFF01
+0x212B = 0x309B
+0x212C = 0x309C
+0x212D = 0x00B4
+0x212E = 0xFF40
+0x212F = 0x00A8
+0x2130 = 0xFF3E
+0x2131 = 0xFFE3
+0x2132 = 0xFF3F
+0x2133 = 0x30FD
+0x2134 = 0x30FE
+0x2135 = 0x309D
+0x2136 = 0x309E
+0x2137 = 0x3003
+0x2138 = 0x4EDD
+0x2139 = 0x3005
+0x213A = 0x3006
+0x213B = 0x3007
+0x213C = 0x30FC
+0x213D = 0x2014
+0x213E = 0x2010
+0x213F = 0xFF0F
+0x2140 = 0xFF3C
+0x2141 = 0x301C
+0x2142 = 0x2016
+0x2143 = 0xFF5C
+0x2144 = 0x2026
+0x2145 = 0x2025
+0x2146 = 0x2018
+0x2147 = 0x2019
+0x2148 = 0x201C
+0x2149 = 0x201D
+0x214A = 0xFF08
+0x214B = 0xFF09
+0x214C = 0x3014
+0x214D = 0x3015
+0x214E = 0xFF3B
+0x214F = 0xFF3D
+0x2150 = 0xFF5B
+0x2151 = 0xFF5D
+0x2152 = 0x3008
+0x2153 = 0x3009
+0x2154 = 0x300A
+0x2155 = 0x300B
+0x2156 = 0x300C
+0x2157 = 0x300D
+0x2158 = 0x300E
+0x2159 = 0x300F
+0x215A = 0x3010
+0x215B = 0x3011
+0x215C = 0xFF0B
+0x215D = 0x2212
+0x215E = 0x00B1
+0x215F = 0x00D7
+0x2160 = 0x00F7
+0x2161 = 0xFF1D
+0x2162 = 0x2260
+0x2163 = 0xFF1C
+0x2164 = 0xFF1E
+0x2165 = 0x2266
+0x2166 = 0x2267
+0x2167 = 0x221E
+0x2168 = 0x2234
+0x2169 = 0x2642
+0x216A = 0x2640
+0x216B = 0x00B0
+0x216C = 0x2032
+0x216D = 0x2033
+0x216E = 0x2103
+0x216F = 0xFFE5
+0x2170 = 0xFF04
+0x2171 = 0x00A2
+0x2172 = 0x00A3
+0x2173 = 0xFF05
+0x2174 = 0xFF03
+0x2175 = 0xFF06
+0x2176 = 0xFF0A
+0x2177 = 0xFF20
+0x2178 = 0x00A7
+0x2179 = 0x2606
+0x217A = 0x2605
+0x217B = 0x25CB
+0x217C = 0x25CF
+0x217D = 0x25CE
+0x217E = 0x25C7
+0x2221 = 0x25C6
+0x2222 = 0x25A1
+0x2223 = 0x25A0
+0x2224 = 0x25B3
+0x2225 = 0x25B2
+0x2226 = 0x25BD
+0x2227 = 0x25BC
+0x2228 = 0x203B
+0x2229 = 0x3012
+0x222A = 0x2192
+0x222B = 0x2190
+0x222C = 0x2191
+0x222D = 0x2193
+0x222E = 0x3013
+0x223A = 0x2208
+0x223B = 0x220B
+0x223C = 0x2286
+0x223D = 0x2287
+0x223E = 0x2282
+0x223F = 0x2283
+0x2240 = 0x222A
+0x2241 = 0x2229
+0x224A = 0x2227
+0x224B = 0x2228
+0x224C = 0x00AC
+0x224D = 0x21D2
+0x224E = 0x21D4
+0x224F = 0x2200
+0x2250 = 0x2203
+0x225C = 0x2220
+0x225D = 0x22A5
+0x225E = 0x2312
+0x225F = 0x2202
+0x2260 = 0x2207
+0x2261 = 0x2261
+0x2262 = 0x2252
+0x2263 = 0x226A
+0x2264 = 0x226B
+0x2265 = 0x221A
+0x2266 = 0x223D
+0x2267 = 0x221D
+0x2268 = 0x2235
+0x2269 = 0x222B
+0x226A = 0x222C
+0x2272 = 0x212B
+0x2273 = 0x2030
+0x2274 = 0x266F
+0x2275 = 0x266D
+0x2276 = 0x266A
+0x2277 = 0x2020
+0x2278 = 0x2021
+0x2279 = 0x00B6
+0x227E = 0x25EF
+0x2330 = 0xFF10
+0x2331 = 0xFF11
+0x2332 = 0xFF12
+0x2333 = 0xFF13
+0x2334 = 0xFF14
+0x2335 = 0xFF15
+0x2336 = 0xFF16
+0x2337 = 0xFF17
+0x2338 = 0xFF18
+0x2339 = 0xFF19
+0x2341 = 0xFF21
+0x2342 = 0xFF22
+0x2343 = 0xFF23
+0x2344 = 0xFF24
+0x2345 = 0xFF25
+0x2346 = 0xFF26
+0x2347 = 0xFF27
+0x2348 = 0xFF28
+0x2349 = 0xFF29
+0x234A = 0xFF2A
+0x234B = 0xFF2B
+0x234C = 0xFF2C
+0x234D = 0xFF2D
+0x234E = 0xFF2E
+0x234F = 0xFF2F
+0x2350 = 0xFF30
+0x2351 = 0xFF31
+0x2352 = 0xFF32
+0x2353 = 0xFF33
+0x2354 = 0xFF34
+0x2355 = 0xFF35
+0x2356 = 0xFF36
+0x2357 = 0xFF37
+0x2358 = 0xFF38
+0x2359 = 0xFF39
+0x235A = 0xFF3A
+0x2361 = 0xFF41
+0x2362 = 0xFF42
+0x2363 = 0xFF43
+0x2364 = 0xFF44
+0x2365 = 0xFF45
+0x2366 = 0xFF46
+0x2367 = 0xFF47
+0x2368 = 0xFF48
+0x2369 = 0xFF49
+0x236A = 0xFF4A
+0x236B = 0xFF4B
+0x236C = 0xFF4C
+0x236D = 0xFF4D
+0x236E = 0xFF4E
+0x236F = 0xFF4F
+0x2370 = 0xFF50
+0x2371 = 0xFF51
+0x2372 = 0xFF52
+0x2373 = 0xFF53
+0x2374 = 0xFF54
+0x2375 = 0xFF55
+0x2376 = 0xFF56
+0x2377 = 0xFF57
+0x2378 = 0xFF58
+0x2379 = 0xFF59
+0x237A = 0xFF5A
+0x2421 = 0x3041
+0x2422 = 0x3042
+0x2423 = 0x3043
+0x2424 = 0x3044
+0x2425 = 0x3045
+0x2426 = 0x3046
+0x2427 = 0x3047
+0x2428 = 0x3048
+0x2429 = 0x3049
+0x242A = 0x304A
+0x242B = 0x304B
+0x242C = 0x304C
+0x242D = 0x304D
+0x242E = 0x304E
+0x242F = 0x304F
+0x2430 = 0x3050
+0x2431 = 0x3051
+0x2432 = 0x3052
+0x2433 = 0x3053
+0x2434 = 0x3054
+0x2435 = 0x3055
+0x2436 = 0x3056
+0x2437 = 0x3057
+0x2438 = 0x3058
+0x2439 = 0x3059
+0x243A = 0x305A
+0x243B = 0x305B
+0x243C = 0x305C
+0x243D = 0x305D
+0x243E = 0x305E
+0x243F = 0x305F
+0x2440 = 0x3060
+0x2441 = 0x3061
+0x2442 = 0x3062
+0x2443 = 0x3063
+0x2444 = 0x3064
+0x2445 = 0x3065
+0x2446 = 0x3066
+0x2447 = 0x3067
+0x2448 = 0x3068
+0x2449 = 0x3069
+0x244A = 0x306A
+0x244B = 0x306B
+0x244C = 0x306C
+0x244D = 0x306D
+0x244E = 0x306E
+0x244F = 0x306F
+0x2450 = 0x3070
+0x2451 = 0x3071
+0x2452 = 0x3072
+0x2453 = 0x3073
+0x2454 = 0x3074
+0x2455 = 0x3075
+0x2456 = 0x3076
+0x2457 = 0x3077
+0x2458 = 0x3078
+0x2459 = 0x3079
+0x245A = 0x307A
+0x245B = 0x307B
+0x245C = 0x307C
+0x245D = 0x307D
+0x245E = 0x307E
+0x245F = 0x307F
+0x2460 = 0x3080
+0x2461 = 0x3081
+0x2462 = 0x3082
+0x2463 = 0x3083
+0x2464 = 0x3084
+0x2465 = 0x3085
+0x2466 = 0x3086
+0x2467 = 0x3087
+0x2468 = 0x3088
+0x2469 = 0x3089
+0x246A = 0x308A
+0x246B = 0x308B
+0x246C = 0x308C
+0x246D = 0x308D
+0x246E = 0x308E
+0x246F = 0x308F
+0x2470 = 0x3090
+0x2471 = 0x3091
+0x2472 = 0x3092
+0x2473 = 0x3093
+0x2521 = 0x30A1
+0x2522 = 0x30A2
+0x2523 = 0x30A3
+0x2524 = 0x30A4
+0x2525 = 0x30A5
+0x2526 = 0x30A6
+0x2527 = 0x30A7
+0x2528 = 0x30A8
+0x2529 = 0x30A9
+0x252A = 0x30AA
+0x252B = 0x30AB
+0x252C = 0x30AC
+0x252D = 0x30AD
+0x252E = 0x30AE
+0x252F = 0x30AF
+0x2530 = 0x30B0
+0x2531 = 0x30B1
+0x2532 = 0x30B2
+0x2533 = 0x30B3
+0x2534 = 0x30B4
+0x2535 = 0x30B5
+0x2536 = 0x30B6
+0x2537 = 0x30B7
+0x2538 = 0x30B8
+0x2539 = 0x30B9
+0x253A = 0x30BA
+0x253B = 0x30BB
+0x253C = 0x30BC
+0x253D = 0x30BD
+0x253E = 0x30BE
+0x253F = 0x30BF
+0x2540 = 0x30C0
+0x2541 = 0x30C1
+0x2542 = 0x30C2
+0x2543 = 0x30C3
+0x2544 = 0x30C4
+0x2545 = 0x30C5
+0x2546 = 0x30C6
+0x2547 = 0x30C7
+0x2548 = 0x30C8
+0x2549 = 0x30C9
+0x254A = 0x30CA
+0x254B = 0x30CB
+0x254C = 0x30CC
+0x254D = 0x30CD
+0x254E = 0x30CE
+0x254F = 0x30CF
+0x2550 = 0x30D0
+0x2551 = 0x30D1
+0x2552 = 0x30D2
+0x2553 = 0x30D3
+0x2554 = 0x30D4
+0x2555 = 0x30D5
+0x2556 = 0x30D6
+0x2557 = 0x30D7
+0x2558 = 0x30D8
+0x2559 = 0x30D9
+0x255A = 0x30DA
+0x255B = 0x30DB
+0x255C = 0x30DC
+0x255D = 0x30DD
+0x255E = 0x30DE
+0x255F = 0x30DF
+0x2560 = 0x30E0
+0x2561 = 0x30E1
+0x2562 = 0x30E2
+0x2563 = 0x30E3
+0x2564 = 0x30E4
+0x2565 = 0x30E5
+0x2566 = 0x30E6
+0x2567 = 0x30E7
+0x2568 = 0x30E8
+0x2569 = 0x30E9
+0x256A = 0x30EA
+0x256B = 0x30EB
+0x256C = 0x30EC
+0x256D = 0x30ED
+0x256E = 0x30EE
+0x256F = 0x30EF
+0x2570 = 0x30F0
+0x2571 = 0x30F1
+0x2572 = 0x30F2
+0x2573 = 0x30F3
+0x2574 = 0x30F4
+0x2575 = 0x30F5
+0x2576 = 0x30F6
+0x2621 = 0x0391
+0x2622 = 0x0392
+0x2623 = 0x0393
+0x2624 = 0x0394
+0x2625 = 0x0395
+0x2626 = 0x0396
+0x2627 = 0x0397
+0x2628 = 0x0398
+0x2629 = 0x0399
+0x262A = 0x039A
+0x262B = 0x039B
+0x262C = 0x039C
+0x262D = 0x039D
+0x262E = 0x039E
+0x262F = 0x039F
+0x2630 = 0x03A0
+0x2631 = 0x03A1
+0x2632 = 0x03A3
+0x2633 = 0x03A4
+0x2634 = 0x03A5
+0x2635 = 0x03A6
+0x2636 = 0x03A7
+0x2637 = 0x03A8
+0x2638 = 0x03A9
+0x2641 = 0x03B1
+0x2642 = 0x03B2
+0x2643 = 0x03B3
+0x2644 = 0x03B4
+0x2645 = 0x03B5
+0x2646 = 0x03B6
+0x2647 = 0x03B7
+0x2648 = 0x03B8
+0x2649 = 0x03B9
+0x264A = 0x03BA
+0x264B = 0x03BB
+0x264C = 0x03BC
+0x264D = 0x03BD
+0x264E = 0x03BE
+0x264F = 0x03BF
+0x2650 = 0x03C0
+0x2651 = 0x03C1
+0x2652 = 0x03C3
+0x2653 = 0x03C4
+0x2654 = 0x03C5
+0x2655 = 0x03C6
+0x2656 = 0x03C7
+0x2657 = 0x03C8
+0x2658 = 0x03C9
+0x2721 = 0x0410
+0x2722 = 0x0411
+0x2723 = 0x0412
+0x2724 = 0x0413
+0x2725 = 0x0414
+0x2726 = 0x0415
+0x2727 = 0x0401
+0x2728 = 0x0416
+0x2729 = 0x0417
+0x272A = 0x0418
+0x272B = 0x0419
+0x272C = 0x041A
+0x272D = 0x041B
+0x272E = 0x041C
+0x272F = 0x041D
+0x2730 = 0x041E
+0x2731 = 0x041F
+0x2732 = 0x0420
+0x2733 = 0x0421
+0x2734 = 0x0422
+0x2735 = 0x0423
+0x2736 = 0x0424
+0x2737 = 0x0425
+0x2738 = 0x0426
+0x2739 = 0x0427
+0x273A = 0x0428
+0x273B = 0x0429
+0x273C = 0x042A
+0x273D = 0x042B
+0x273E = 0x042C
+0x273F = 0x042D
+0x2740 = 0x042E
+0x2741 = 0x042F
+0x2751 = 0x0430
+0x2752 = 0x0431
+0x2753 = 0x0432
+0x2754 = 0x0433
+0x2755 = 0x0434
+0x2756 = 0x0435
+0x2757 = 0x0451
+0x2758 = 0x0436
+0x2759 = 0x0437
+0x275A = 0x0438
+0x275B = 0x0439
+0x275C = 0x043A
+0x275D = 0x043B
+0x275E = 0x043C
+0x275F = 0x043D
+0x2760 = 0x043E
+0x2761 = 0x043F
+0x2762 = 0x0440
+0x2763 = 0x0441
+0x2764 = 0x0442
+0x2765 = 0x0443
+0x2766 = 0x0444
+0x2767 = 0x0445
+0x2768 = 0x0446
+0x2769 = 0x0447
+0x276A = 0x0448
+0x276B = 0x0449
+0x276C = 0x044A
+0x276D = 0x044B
+0x276E = 0x044C
+0x276F = 0x044D
+0x2770 = 0x044E
+0x2771 = 0x044F
+0x2821 = 0x2500
+0x2822 = 0x2502
+0x2823 = 0x250C
+0x2824 = 0x2510
+0x2825 = 0x2518
+0x2826 = 0x2514
+0x2827 = 0x251C
+0x2828 = 0x252C
+0x2829 = 0x2524
+0x282A = 0x2534
+0x282B = 0x253C
+0x282C = 0x2501
+0x282D = 0x2503
+0x282E = 0x250F
+0x282F = 0x2513
+0x2830 = 0x251B
+0x2831 = 0x2517
+0x2832 = 0x2523
+0x2833 = 0x2533
+0x2834 = 0x252B
+0x2835 = 0x253B
+0x2836 = 0x254B
+0x2837 = 0x2520
+0x2838 = 0x252F
+0x2839 = 0x2528
+0x283A = 0x2537
+0x283B = 0x253F
+0x283C = 0x251D
+0x283D = 0x2530
+0x283E = 0x2525
+0x283F = 0x2538
+0x2840 = 0x2542
+0x3021 = 0x4E9C
+0x3022 = 0x5516
+0x3023 = 0x5A03
+0x3024 = 0x963F
+0x3025 = 0x54C0
+0x3026 = 0x611B
+0x3027 = 0x6328
+0x3028 = 0x59F6
+0x3029 = 0x9022
+0x302A = 0x8475
+0x302B = 0x831C
+0x302C = 0x7A50
+0x302D = 0x60AA
+0x302E = 0x63E1
+0x302F = 0x6E25
+0x3030 = 0x65ED
+0x3031 = 0x8466
+0x3032 = 0x82A6
+0x3033 = 0x9BF5
+0x3034 = 0x6893
+0x3035 = 0x5727
+0x3036 = 0x65A1
+0x3037 = 0x6271
+0x3038 = 0x5B9B
+0x3039 = 0x59D0
+0x303A = 0x867B
+0x303B = 0x98F4
+0x303C = 0x7D62
+0x303D = 0x7DBE
+0x303E = 0x9B8E
+0x303F = 0x6216
+0x3040 = 0x7C9F
+0x3041 = 0x88B7
+0x3042 = 0x5B89
+0x3043 = 0x5EB5
+0x3044 = 0x6309
+0x3045 = 0x6697
+0x3046 = 0x6848
+0x3047 = 0x95C7
+0x3048 = 0x978D
+0x3049 = 0x674F
+0x304A = 0x4EE5
+0x304B = 0x4F0A
+0x304C = 0x4F4D
+0x304D = 0x4F9D
+0x304E = 0x5049
+0x304F = 0x56F2
+0x3050 = 0x5937
+0x3051 = 0x59D4
+0x3052 = 0x5A01
+0x3053 = 0x5C09
+0x3054 = 0x60DF
+0x3055 = 0x610F
+0x3056 = 0x6170
+0x3057 = 0x6613
+0x3058 = 0x6905
+0x3059 = 0x70BA
+0x305A = 0x754F
+0x305B = 0x7570
+0x305C = 0x79FB
+0x305D = 0x7DAD
+0x305E = 0x7DEF
+0x305F = 0x80C3
+0x3060 = 0x840E
+0x3061 = 0x8863
+0x3062 = 0x8B02
+0x3063 = 0x9055
+0x3064 = 0x907A
+0x3065 = 0x533B
+0x3066 = 0x4E95
+0x3067 = 0x4EA5
+0x3068 = 0x57DF
+0x3069 = 0x80B2
+0x306A = 0x90C1
+0x306B = 0x78EF
+0x306C = 0x4E00
+0x306D = 0x58F1
+0x306E = 0x6EA2
+0x306F = 0x9038
+0x3070 = 0x7A32
+0x3071 = 0x8328
+0x3072 = 0x828B
+0x3073 = 0x9C2F
+0x3074 = 0x5141
+0x3075 = 0x5370
+0x3076 = 0x54BD
+0x3077 = 0x54E1
+0x3078 = 0x56E0
+0x3079 = 0x59FB
+0x307A = 0x5F15
+0x307B = 0x98F2
+0x307C = 0x6DEB
+0x307D = 0x80E4
+0x307E = 0x852D
+0x3121 = 0x9662
+0x3122 = 0x9670
+0x3123 = 0x96A0
+0x3124 = 0x97FB
+0x3125 = 0x540B
+0x3126 = 0x53F3
+0x3127 = 0x5B87
+0x3128 = 0x70CF
+0x3129 = 0x7FBD
+0x312A = 0x8FC2
+0x312B = 0x96E8
+0x312C = 0x536F
+0x312D = 0x9D5C
+0x312E = 0x7ABA
+0x312F = 0x4E11
+0x3130 = 0x7893
+0x3131 = 0x81FC
+0x3132 = 0x6E26
+0x3133 = 0x5618
+0x3134 = 0x5504
+0x3135 = 0x6B1D
+0x3136 = 0x851A
+0x3137 = 0x9C3B
+0x3138 = 0x59E5
+0x3139 = 0x53A9
+0x313A = 0x6D66
+0x313B = 0x74DC
+0x313C = 0x958F
+0x313D = 0x5642
+0x313E = 0x4E91
+0x313F = 0x904B
+0x3140 = 0x96F2
+0x3141 = 0x834F
+0x3142 = 0x990C
+0x3143 = 0x53E1
+0x3144 = 0x55B6
+0x3145 = 0x5B30
+0x3146 = 0x5F71
+0x3147 = 0x6620
+0x3148 = 0x66F3
+0x3149 = 0x6804
+0x314A = 0x6C38
+0x314B = 0x6CF3
+0x314C = 0x6D29
+0x314D = 0x745B
+0x314E = 0x76C8
+0x314F = 0x7A4E
+0x3150 = 0x9834
+0x3151 = 0x82F1
+0x3152 = 0x885B
+0x3153 = 0x8A60
+0x3154 = 0x92ED
+0x3155 = 0x6DB2
+0x3156 = 0x75AB
+0x3157 = 0x76CA
+0x3158 = 0x99C5
+0x3159 = 0x60A6
+0x315A = 0x8B01
+0x315B = 0x8D8A
+0x315C = 0x95B2
+0x315D = 0x698E
+0x315E = 0x53AD
+0x315F = 0x5186
+0x3160 = 0x5712
+0x3161 = 0x5830
+0x3162 = 0x5944
+0x3163 = 0x5BB4
+0x3164 = 0x5EF6
+0x3165 = 0x6028
+0x3166 = 0x63A9
+0x3167 = 0x63F4
+0x3168 = 0x6CBF
+0x3169 = 0x6F14
+0x316A = 0x708E
+0x316B = 0x7114
+0x316C = 0x7159
+0x316D = 0x71D5
+0x316E = 0x733F
+0x316F = 0x7E01
+0x3170 = 0x8276
+0x3171 = 0x82D1
+0x3172 = 0x8597
+0x3173 = 0x9060
+0x3174 = 0x925B
+0x3175 = 0x9D1B
+0x3176 = 0x5869
+0x3177 = 0x65BC
+0x3178 = 0x6C5A
+0x3179 = 0x7525
+0x317A = 0x51F9
+0x317B = 0x592E
+0x317C = 0x5965
+0x317D = 0x5F80
+0x317E = 0x5FDC
+0x3221 = 0x62BC
+0x3222 = 0x65FA
+0x3223 = 0x6A2A
+0x3224 = 0x6B27
+0x3225 = 0x6BB4
+0x3226 = 0x738B
+0x3227 = 0x7FC1
+0x3228 = 0x8956
+0x3229 = 0x9D2C
+0x322A = 0x9D0E
+0x322B = 0x9EC4
+0x322C = 0x5CA1
+0x322D = 0x6C96
+0x322E = 0x837B
+0x322F = 0x5104
+0x3230 = 0x5C4B
+0x3231 = 0x61B6
+0x3232 = 0x81C6
+0x3233 = 0x6876
+0x3234 = 0x7261
+0x3235 = 0x4E59
+0x3236 = 0x4FFA
+0x3237 = 0x5378
+0x3238 = 0x6069
+0x3239 = 0x6E29
+0x323A = 0x7A4F
+0x323B = 0x97F3
+0x323C = 0x4E0B
+0x323D = 0x5316
+0x323E = 0x4EEE
+0x323F = 0x4F55
+0x3240 = 0x4F3D
+0x3241 = 0x4FA1
+0x3242 = 0x4F73
+0x3243 = 0x52A0
+0x3244 = 0x53EF
+0x3245 = 0x5609
+0x3246 = 0x590F
+0x3247 = 0x5AC1
+0x3248 = 0x5BB6
+0x3249 = 0x5BE1
+0x324A = 0x79D1
+0x324B = 0x6687
+0x324C = 0x679C
+0x324D = 0x67B6
+0x324E = 0x6B4C
+0x324F = 0x6CB3
+0x3250 = 0x706B
+0x3251 = 0x73C2
+0x3252 = 0x798D
+0x3253 = 0x79BE
+0x3254 = 0x7A3C
+0x3255 = 0x7B87
+0x3256 = 0x82B1
+0x3257 = 0x82DB
+0x3258 = 0x8304
+0x3259 = 0x8377
+0x325A = 0x83EF
+0x325B = 0x83D3
+0x325C = 0x8766
+0x325D = 0x8AB2
+0x325E = 0x5629
+0x325F = 0x8CA8
+0x3260 = 0x8FE6
+0x3261 = 0x904E
+0x3262 = 0x971E
+0x3263 = 0x868A
+0x3264 = 0x4FC4
+0x3265 = 0x5CE8
+0x3266 = 0x6211
+0x3267 = 0x7259
+0x3268 = 0x753B
+0x3269 = 0x81E5
+0x326A = 0x82BD
+0x326B = 0x86FE
+0x326C = 0x8CC0
+0x326D = 0x96C5
+0x326E = 0x9913
+0x326F = 0x99D5
+0x3270 = 0x4ECB
+0x3271 = 0x4F1A
+0x3272 = 0x89E3
+0x3273 = 0x56DE
+0x3274 = 0x584A
+0x3275 = 0x58CA
+0x3276 = 0x5EFB
+0x3277 = 0x5FEB
+0x3278 = 0x602A
+0x3279 = 0x6094
+0x327A = 0x6062
+0x327B = 0x61D0
+0x327C = 0x6212
+0x327D = 0x62D0
+0x327E = 0x6539
+0x3321 = 0x9B41
+0x3322 = 0x6666
+0x3323 = 0x68B0
+0x3324 = 0x6D77
+0x3325 = 0x7070
+0x3326 = 0x754C
+0x3327 = 0x7686
+0x3328 = 0x7D75
+0x3329 = 0x82A5
+0x332A = 0x87F9
+0x332B = 0x958B
+0x332C = 0x968E
+0x332D = 0x8C9D
+0x332E = 0x51F1
+0x332F = 0x52BE
+0x3330 = 0x5916
+0x3331 = 0x54B3
+0x3332 = 0x5BB3
+0x3333 = 0x5D16
+0x3334 = 0x6168
+0x3335 = 0x6982
+0x3336 = 0x6DAF
+0x3337 = 0x788D
+0x3338 = 0x84CB
+0x3339 = 0x8857
+0x333A = 0x8A72
+0x333B = 0x93A7
+0x333C = 0x9AB8
+0x333D = 0x6D6C
+0x333E = 0x99A8
+0x333F = 0x86D9
+0x3340 = 0x57A3
+0x3341 = 0x67FF
+0x3342 = 0x86CE
+0x3343 = 0x920E
+0x3344 = 0x5283
+0x3345 = 0x5687
+0x3346 = 0x5404
+0x3347 = 0x5ED3
+0x3348 = 0x62E1
+0x3349 = 0x64B9
+0x334A = 0x683C
+0x334B = 0x6838
+0x334C = 0x6BBB
+0x334D = 0x7372
+0x334E = 0x78BA
+0x334F = 0x7A6B
+0x3350 = 0x899A
+0x3351 = 0x89D2
+0x3352 = 0x8D6B
+0x3353 = 0x8F03
+0x3354 = 0x90ED
+0x3355 = 0x95A3
+0x3356 = 0x9694
+0x3357 = 0x9769
+0x3358 = 0x5B66
+0x3359 = 0x5CB3
+0x335A = 0x697D
+0x335B = 0x984D
+0x335C = 0x984E
+0x335D = 0x639B
+0x335E = 0x7B20
+0x335F = 0x6A2B
+0x3360 = 0x6A7F
+0x3361 = 0x68B6
+0x3362 = 0x9C0D
+0x3363 = 0x6F5F
+0x3364 = 0x5272
+0x3365 = 0x559D
+0x3366 = 0x6070
+0x3367 = 0x62EC
+0x3368 = 0x6D3B
+0x3369 = 0x6E07
+0x336A = 0x6ED1
+0x336B = 0x845B
+0x336C = 0x8910
+0x336D = 0x8F44
+0x336E = 0x4E14
+0x336F = 0x9C39
+0x3370 = 0x53F6
+0x3371 = 0x691B
+0x3372 = 0x6A3A
+0x3373 = 0x9784
+0x3374 = 0x682A
+0x3375 = 0x515C
+0x3376 = 0x7AC3
+0x3377 = 0x84B2
+0x3378 = 0x91DC
+0x3379 = 0x938C
+0x337A = 0x565B
+0x337B = 0x9D28
+0x337C = 0x6822
+0x337D = 0x8305
+0x337E = 0x8431
+0x3421 = 0x7CA5
+0x3422 = 0x5208
+0x3423 = 0x82C5
+0x3424 = 0x74E6
+0x3425 = 0x4E7E
+0x3426 = 0x4F83
+0x3427 = 0x51A0
+0x3428 = 0x5BD2
+0x3429 = 0x520A
+0x342A = 0x52D8
+0x342B = 0x52E7
+0x342C = 0x5DFB
+0x342D = 0x559A
+0x342E = 0x582A
+0x342F = 0x59E6
+0x3430 = 0x5B8C
+0x3431 = 0x5B98
+0x3432 = 0x5BDB
+0x3433 = 0x5E72
+0x3434 = 0x5E79
+0x3435 = 0x60A3
+0x3436 = 0x611F
+0x3437 = 0x6163
+0x3438 = 0x61BE
+0x3439 = 0x63DB
+0x343A = 0x6562
+0x343B = 0x67D1
+0x343C = 0x6853
+0x343D = 0x68FA
+0x343E = 0x6B3E
+0x343F = 0x6B53
+0x3440 = 0x6C57
+0x3441 = 0x6F22
+0x3442 = 0x6F97
+0x3443 = 0x6F45
+0x3444 = 0x74B0
+0x3445 = 0x7518
+0x3446 = 0x76E3
+0x3447 = 0x770B
+0x3448 = 0x7AFF
+0x3449 = 0x7BA1
+0x344A = 0x7C21
+0x344B = 0x7DE9
+0x344C = 0x7F36
+0x344D = 0x7FF0
+0x344E = 0x809D
+0x344F = 0x8266
+0x3450 = 0x839E
+0x3451 = 0x89B3
+0x3452 = 0x8ACC
+0x3453 = 0x8CAB
+0x3454 = 0x9084
+0x3455 = 0x9451
+0x3456 = 0x9593
+0x3457 = 0x9591
+0x3458 = 0x95A2
+0x3459 = 0x9665
+0x345A = 0x97D3
+0x345B = 0x9928
+0x345C = 0x8218
+0x345D = 0x4E38
+0x345E = 0x542B
+0x345F = 0x5CB8
+0x3460 = 0x5DCC
+0x3461 = 0x73A9
+0x3462 = 0x764C
+0x3463 = 0x773C
+0x3464 = 0x5CA9
+0x3465 = 0x7FEB
+0x3466 = 0x8D0B
+0x3467 = 0x96C1
+0x3468 = 0x9811
+0x3469 = 0x9854
+0x346A = 0x9858
+0x346B = 0x4F01
+0x346C = 0x4F0E
+0x346D = 0x5371
+0x346E = 0x559C
+0x346F = 0x5668
+0x3470 = 0x57FA
+0x3471 = 0x5947
+0x3472 = 0x5B09
+0x3473 = 0x5BC4
+0x3474 = 0x5C90
+0x3475 = 0x5E0C
+0x3476 = 0x5E7E
+0x3477 = 0x5FCC
+0x3478 = 0x63EE
+0x3479 = 0x673A
+0x347A = 0x65D7
+0x347B = 0x65E2
+0x347C = 0x671F
+0x347D = 0x68CB
+0x347E = 0x68C4
+0x3521 = 0x6A5F
+0x3522 = 0x5E30
+0x3523 = 0x6BC5
+0x3524 = 0x6C17
+0x3525 = 0x6C7D
+0x3526 = 0x757F
+0x3527 = 0x7948
+0x3528 = 0x5B63
+0x3529 = 0x7A00
+0x352A = 0x7D00
+0x352B = 0x5FBD
+0x352C = 0x898F
+0x352D = 0x8A18
+0x352E = 0x8CB4
+0x352F = 0x8D77
+0x3530 = 0x8ECC
+0x3531 = 0x8F1D
+0x3532 = 0x98E2
+0x3533 = 0x9A0E
+0x3534 = 0x9B3C
+0x3535 = 0x4E80
+0x3536 = 0x507D
+0x3537 = 0x5100
+0x3538 = 0x5993
+0x3539 = 0x5B9C
+0x353A = 0x622F
+0x353B = 0x6280
+0x353C = 0x64EC
+0x353D = 0x6B3A
+0x353E = 0x72A0
+0x353F = 0x7591
+0x3540 = 0x7947
+0x3541 = 0x7FA9
+0x3542 = 0x87FB
+0x3543 = 0x8ABC
+0x3544 = 0x8B70
+0x3545 = 0x63AC
+0x3546 = 0x83CA
+0x3547 = 0x97A0
+0x3548 = 0x5409
+0x3549 = 0x5403
+0x354A = 0x55AB
+0x354B = 0x6854
+0x354C = 0x6A58
+0x354D = 0x8A70
+0x354E = 0x7827
+0x354F = 0x6775
+0x3550 = 0x9ECD
+0x3551 = 0x5374
+0x3552 = 0x5BA2
+0x3553 = 0x811A
+0x3554 = 0x8650
+0x3555 = 0x9006
+0x3556 = 0x4E18
+0x3557 = 0x4E45
+0x3558 = 0x4EC7
+0x3559 = 0x4F11
+0x355A = 0x53CA
+0x355B = 0x5438
+0x355C = 0x5BAE
+0x355D = 0x5F13
+0x355E = 0x6025
+0x355F = 0x6551
+0x3560 = 0x673D
+0x3561 = 0x6C42
+0x3562 = 0x6C72
+0x3563 = 0x6CE3
+0x3564 = 0x7078
+0x3565 = 0x7403
+0x3566 = 0x7A76
+0x3567 = 0x7AAE
+0x3568 = 0x7B08
+0x3569 = 0x7D1A
+0x356A = 0x7CFE
+0x356B = 0x7D66
+0x356C = 0x65E7
+0x356D = 0x725B
+0x356E = 0x53BB
+0x356F = 0x5C45
+0x3570 = 0x5DE8
+0x3571 = 0x62D2
+0x3572 = 0x62E0
+0x3573 = 0x6319
+0x3574 = 0x6E20
+0x3575 = 0x865A
+0x3576 = 0x8A31
+0x3577 = 0x8DDD
+0x3578 = 0x92F8
+0x3579 = 0x6F01
+0x357A = 0x79A6
+0x357B = 0x9B5A
+0x357C = 0x4EA8
+0x357D = 0x4EAB
+0x357E = 0x4EAC
+0x3621 = 0x4F9B
+0x3622 = 0x4FA0
+0x3623 = 0x50D1
+0x3624 = 0x5147
+0x3625 = 0x7AF6
+0x3626 = 0x5171
+0x3627 = 0x51F6
+0x3628 = 0x5354
+0x3629 = 0x5321
+0x362A = 0x537F
+0x362B = 0x53EB
+0x362C = 0x55AC
+0x362D = 0x5883
+0x362E = 0x5CE1
+0x362F = 0x5F37
+0x3630 = 0x5F4A
+0x3631 = 0x602F
+0x3632 = 0x6050
+0x3633 = 0x606D
+0x3634 = 0x631F
+0x3635 = 0x6559
+0x3636 = 0x6A4B
+0x3637 = 0x6CC1
+0x3638 = 0x72C2
+0x3639 = 0x72ED
+0x363A = 0x77EF
+0x363B = 0x80F8
+0x363C = 0x8105
+0x363D = 0x8208
+0x363E = 0x854E
+0x363F = 0x90F7
+0x3640 = 0x93E1
+0x3641 = 0x97FF
+0x3642 = 0x9957
+0x3643 = 0x9A5A
+0x3644 = 0x4EF0
+0x3645 = 0x51DD
+0x3646 = 0x5C2D
+0x3647 = 0x6681
+0x3648 = 0x696D
+0x3649 = 0x5C40
+0x364A = 0x66F2
+0x364B = 0x6975
+0x364C = 0x7389
+0x364D = 0x6850
+0x364E = 0x7C81
+0x364F = 0x50C5
+0x3650 = 0x52E4
+0x3651 = 0x5747
+0x3652 = 0x5DFE
+0x3653 = 0x9326
+0x3654 = 0x65A4
+0x3655 = 0x6B23
+0x3656 = 0x6B3D
+0x3657 = 0x7434
+0x3658 = 0x7981
+0x3659 = 0x79BD
+0x365A = 0x7B4B
+0x365B = 0x7DCA
+0x365C = 0x82B9
+0x365D = 0x83CC
+0x365E = 0x887F
+0x365F = 0x895F
+0x3660 = 0x8B39
+0x3661 = 0x8FD1
+0x3662 = 0x91D1
+0x3663 = 0x541F
+0x3664 = 0x9280
+0x3665 = 0x4E5D
+0x3666 = 0x5036
+0x3667 = 0x53E5
+0x3668 = 0x533A
+0x3669 = 0x72D7
+0x366A = 0x7396
+0x366B = 0x77E9
+0x366C = 0x82E6
+0x366D = 0x8EAF
+0x366E = 0x99C6
+0x366F = 0x99C8
+0x3670 = 0x99D2
+0x3671 = 0x5177
+0x3672 = 0x611A
+0x3673 = 0x865E
+0x3674 = 0x55B0
+0x3675 = 0x7A7A
+0x3676 = 0x5076
+0x3677 = 0x5BD3
+0x3678 = 0x9047
+0x3679 = 0x9685
+0x367A = 0x4E32
+0x367B = 0x6ADB
+0x367C = 0x91E7
+0x367D = 0x5C51
+0x367E = 0x5C48
+0x3721 = 0x6398
+0x3722 = 0x7A9F
+0x3723 = 0x6C93
+0x3724 = 0x9774
+0x3725 = 0x8F61
+0x3726 = 0x7AAA
+0x3727 = 0x718A
+0x3728 = 0x9688
+0x3729 = 0x7C82
+0x372A = 0x6817
+0x372B = 0x7E70
+0x372C = 0x6851
+0x372D = 0x936C
+0x372E = 0x52F2
+0x372F = 0x541B
+0x3730 = 0x85AB
+0x3731 = 0x8A13
+0x3732 = 0x7FA4
+0x3733 = 0x8ECD
+0x3734 = 0x90E1
+0x3735 = 0x5366
+0x3736 = 0x8888
+0x3737 = 0x7941
+0x3738 = 0x4FC2
+0x3739 = 0x50BE
+0x373A = 0x5211
+0x373B = 0x5144
+0x373C = 0x5553
+0x373D = 0x572D
+0x373E = 0x73EA
+0x373F = 0x578B
+0x3740 = 0x5951
+0x3741 = 0x5F62
+0x3742 = 0x5F84
+0x3743 = 0x6075
+0x3744 = 0x6176
+0x3745 = 0x6167
+0x3746 = 0x61A9
+0x3747 = 0x63B2
+0x3748 = 0x643A
+0x3749 = 0x656C
+0x374A = 0x666F
+0x374B = 0x6842
+0x374C = 0x6E13
+0x374D = 0x7566
+0x374E = 0x7A3D
+0x374F = 0x7CFB
+0x3750 = 0x7D4C
+0x3751 = 0x7D99
+0x3752 = 0x7E4B
+0x3753 = 0x7F6B
+0x3754 = 0x830E
+0x3755 = 0x834A
+0x3756 = 0x86CD
+0x3757 = 0x8A08
+0x3758 = 0x8A63
+0x3759 = 0x8B66
+0x375A = 0x8EFD
+0x375B = 0x981A
+0x375C = 0x9D8F
+0x375D = 0x82B8
+0x375E = 0x8FCE
+0x375F = 0x9BE8
+0x3760 = 0x5287
+0x3761 = 0x621F
+0x3762 = 0x6483
+0x3763 = 0x6FC0
+0x3764 = 0x9699
+0x3765 = 0x6841
+0x3766 = 0x5091
+0x3767 = 0x6B20
+0x3768 = 0x6C7A
+0x3769 = 0x6F54
+0x376A = 0x7A74
+0x376B = 0x7D50
+0x376C = 0x8840
+0x376D = 0x8A23
+0x376E = 0x6708
+0x376F = 0x4EF6
+0x3770 = 0x5039
+0x3771 = 0x5026
+0x3772 = 0x5065
+0x3773 = 0x517C
+0x3774 = 0x5238
+0x3775 = 0x5263
+0x3776 = 0x55A7
+0x3777 = 0x570F
+0x3778 = 0x5805
+0x3779 = 0x5ACC
+0x377A = 0x5EFA
+0x377B = 0x61B2
+0x377C = 0x61F8
+0x377D = 0x62F3
+0x377E = 0x6372
+0x3821 = 0x691C
+0x3822 = 0x6A29
+0x3823 = 0x727D
+0x3824 = 0x72AC
+0x3825 = 0x732E
+0x3826 = 0x7814
+0x3827 = 0x786F
+0x3828 = 0x7D79
+0x3829 = 0x770C
+0x382A = 0x80A9
+0x382B = 0x898B
+0x382C = 0x8B19
+0x382D = 0x8CE2
+0x382E = 0x8ED2
+0x382F = 0x9063
+0x3830 = 0x9375
+0x3831 = 0x967A
+0x3832 = 0x9855
+0x3833 = 0x9A13
+0x3834 = 0x9E78
+0x3835 = 0x5143
+0x3836 = 0x539F
+0x3837 = 0x53B3
+0x3838 = 0x5E7B
+0x3839 = 0x5F26
+0x383A = 0x6E1B
+0x383B = 0x6E90
+0x383C = 0x7384
+0x383D = 0x73FE
+0x383E = 0x7D43
+0x383F = 0x8237
+0x3840 = 0x8A00
+0x3841 = 0x8AFA
+0x3842 = 0x9650
+0x3843 = 0x4E4E
+0x3844 = 0x500B
+0x3845 = 0x53E4
+0x3846 = 0x547C
+0x3847 = 0x56FA
+0x3848 = 0x59D1
+0x3849 = 0x5B64
+0x384A = 0x5DF1
+0x384B = 0x5EAB
+0x384C = 0x5F27
+0x384D = 0x6238
+0x384E = 0x6545
+0x384F = 0x67AF
+0x3850 = 0x6E56
+0x3851 = 0x72D0
+0x3852 = 0x7CCA
+0x3853 = 0x88B4
+0x3854 = 0x80A1
+0x3855 = 0x80E1
+0x3856 = 0x83F0
+0x3857 = 0x864E
+0x3858 = 0x8A87
+0x3859 = 0x8DE8
+0x385A = 0x9237
+0x385B = 0x96C7
+0x385C = 0x9867
+0x385D = 0x9F13
+0x385E = 0x4E94
+0x385F = 0x4E92
+0x3860 = 0x4F0D
+0x3861 = 0x5348
+0x3862 = 0x5449
+0x3863 = 0x543E
+0x3864 = 0x5A2F
+0x3865 = 0x5F8C
+0x3866 = 0x5FA1
+0x3867 = 0x609F
+0x3868 = 0x68A7
+0x3869 = 0x6A8E
+0x386A = 0x745A
+0x386B = 0x7881
+0x386C = 0x8A9E
+0x386D = 0x8AA4
+0x386E = 0x8B77
+0x386F = 0x9190
+0x3870 = 0x4E5E
+0x3871 = 0x9BC9
+0x3872 = 0x4EA4
+0x3873 = 0x4F7C
+0x3874 = 0x4FAF
+0x3875 = 0x5019
+0x3876 = 0x5016
+0x3877 = 0x5149
+0x3878 = 0x516C
+0x3879 = 0x529F
+0x387A = 0x52B9
+0x387B = 0x52FE
+0x387C = 0x539A
+0x387D = 0x53E3
+0x387E = 0x5411
+0x3921 = 0x540E
+0x3922 = 0x5589
+0x3923 = 0x5751
+0x3924 = 0x57A2
+0x3925 = 0x597D
+0x3926 = 0x5B54
+0x3927 = 0x5B5D
+0x3928 = 0x5B8F
+0x3929 = 0x5DE5
+0x392A = 0x5DE7
+0x392B = 0x5DF7
+0x392C = 0x5E78
+0x392D = 0x5E83
+0x392E = 0x5E9A
+0x392F = 0x5EB7
+0x3930 = 0x5F18
+0x3931 = 0x6052
+0x3932 = 0x614C
+0x3933 = 0x6297
+0x3934 = 0x62D8
+0x3935 = 0x63A7
+0x3936 = 0x653B
+0x3937 = 0x6602
+0x3938 = 0x6643
+0x3939 = 0x66F4
+0x393A = 0x676D
+0x393B = 0x6821
+0x393C = 0x6897
+0x393D = 0x69CB
+0x393E = 0x6C5F
+0x393F = 0x6D2A
+0x3940 = 0x6D69
+0x3941 = 0x6E2F
+0x3942 = 0x6E9D
+0x3943 = 0x7532
+0x3944 = 0x7687
+0x3945 = 0x786C
+0x3946 = 0x7A3F
+0x3947 = 0x7CE0
+0x3948 = 0x7D05
+0x3949 = 0x7D18
+0x394A = 0x7D5E
+0x394B = 0x7DB1
+0x394C = 0x8015
+0x394D = 0x8003
+0x394E = 0x80AF
+0x394F = 0x80B1
+0x3950 = 0x8154
+0x3951 = 0x818F
+0x3952 = 0x822A
+0x3953 = 0x8352
+0x3954 = 0x884C
+0x3955 = 0x8861
+0x3956 = 0x8B1B
+0x3957 = 0x8CA2
+0x3958 = 0x8CFC
+0x3959 = 0x90CA
+0x395A = 0x9175
+0x395B = 0x9271
+0x395C = 0x783F
+0x395D = 0x92FC
+0x395E = 0x95A4
+0x395F = 0x964D
+0x3960 = 0x9805
+0x3961 = 0x9999
+0x3962 = 0x9AD8
+0x3963 = 0x9D3B
+0x3964 = 0x525B
+0x3965 = 0x52AB
+0x3966 = 0x53F7
+0x3967 = 0x5408
+0x3968 = 0x58D5
+0x3969 = 0x62F7
+0x396A = 0x6FE0
+0x396B = 0x8C6A
+0x396C = 0x8F5F
+0x396D = 0x9EB9
+0x396E = 0x514B
+0x396F = 0x523B
+0x3970 = 0x544A
+0x3971 = 0x56FD
+0x3972 = 0x7A40
+0x3973 = 0x9177
+0x3974 = 0x9D60
+0x3975 = 0x9ED2
+0x3976 = 0x7344
+0x3977 = 0x6F09
+0x3978 = 0x8170
+0x3979 = 0x7511
+0x397A = 0x5FFD
+0x397B = 0x60DA
+0x397C = 0x9AA8
+0x397D = 0x72DB
+0x397E = 0x8FBC
+0x3A21 = 0x6B64
+0x3A22 = 0x9803
+0x3A23 = 0x4ECA
+0x3A24 = 0x56F0
+0x3A25 = 0x5764
+0x3A26 = 0x58BE
+0x3A27 = 0x5A5A
+0x3A28 = 0x6068
+0x3A29 = 0x61C7
+0x3A2A = 0x660F
+0x3A2B = 0x6606
+0x3A2C = 0x6839
+0x3A2D = 0x68B1
+0x3A2E = 0x6DF7
+0x3A2F = 0x75D5
+0x3A30 = 0x7D3A
+0x3A31 = 0x826E
+0x3A32 = 0x9B42
+0x3A33 = 0x4E9B
+0x3A34 = 0x4F50
+0x3A35 = 0x53C9
+0x3A36 = 0x5506
+0x3A37 = 0x5D6F
+0x3A38 = 0x5DE6
+0x3A39 = 0x5DEE
+0x3A3A = 0x67FB
+0x3A3B = 0x6C99
+0x3A3C = 0x7473
+0x3A3D = 0x7802
+0x3A3E = 0x8A50
+0x3A3F = 0x9396
+0x3A40 = 0x88DF
+0x3A41 = 0x5750
+0x3A42 = 0x5EA7
+0x3A43 = 0x632B
+0x3A44 = 0x50B5
+0x3A45 = 0x50AC
+0x3A46 = 0x518D
+0x3A47 = 0x6700
+0x3A48 = 0x54C9
+0x3A49 = 0x585E
+0x3A4A = 0x59BB
+0x3A4B = 0x5BB0
+0x3A4C = 0x5F69
+0x3A4D = 0x624D
+0x3A4E = 0x63A1
+0x3A4F = 0x683D
+0x3A50 = 0x6B73
+0x3A51 = 0x6E08
+0x3A52 = 0x707D
+0x3A53 = 0x91C7
+0x3A54 = 0x7280
+0x3A55 = 0x7815
+0x3A56 = 0x7826
+0x3A57 = 0x796D
+0x3A58 = 0x658E
+0x3A59 = 0x7D30
+0x3A5A = 0x83DC
+0x3A5B = 0x88C1
+0x3A5C = 0x8F09
+0x3A5D = 0x969B
+0x3A5E = 0x5264
+0x3A5F = 0x5728
+0x3A60 = 0x6750
+0x3A61 = 0x7F6A
+0x3A62 = 0x8CA1
+0x3A63 = 0x51B4
+0x3A64 = 0x5742
+0x3A65 = 0x962A
+0x3A66 = 0x583A
+0x3A67 = 0x698A
+0x3A68 = 0x80B4
+0x3A69 = 0x54B2
+0x3A6A = 0x5D0E
+0x3A6B = 0x57FC
+0x3A6C = 0x7895
+0x3A6D = 0x9DFA
+0x3A6E = 0x4F5C
+0x3A6F = 0x524A
+0x3A70 = 0x548B
+0x3A71 = 0x643E
+0x3A72 = 0x6628
+0x3A73 = 0x6714
+0x3A74 = 0x67F5
+0x3A75 = 0x7A84
+0x3A76 = 0x7B56
+0x3A77 = 0x7D22
+0x3A78 = 0x932F
+0x3A79 = 0x685C
+0x3A7A = 0x9BAD
+0x3A7B = 0x7B39
+0x3A7C = 0x5319
+0x3A7D = 0x518A
+0x3A7E = 0x5237
+0x3B21 = 0x5BDF
+0x3B22 = 0x62F6
+0x3B23 = 0x64AE
+0x3B24 = 0x64E6
+0x3B25 = 0x672D
+0x3B26 = 0x6BBA
+0x3B27 = 0x85A9
+0x3B28 = 0x96D1
+0x3B29 = 0x7690
+0x3B2A = 0x9BD6
+0x3B2B = 0x634C
+0x3B2C = 0x9306
+0x3B2D = 0x9BAB
+0x3B2E = 0x76BF
+0x3B2F = 0x6652
+0x3B30 = 0x4E09
+0x3B31 = 0x5098
+0x3B32 = 0x53C2
+0x3B33 = 0x5C71
+0x3B34 = 0x60E8
+0x3B35 = 0x6492
+0x3B36 = 0x6563
+0x3B37 = 0x685F
+0x3B38 = 0x71E6
+0x3B39 = 0x73CA
+0x3B3A = 0x7523
+0x3B3B = 0x7B97
+0x3B3C = 0x7E82
+0x3B3D = 0x8695
+0x3B3E = 0x8B83
+0x3B3F = 0x8CDB
+0x3B40 = 0x9178
+0x3B41 = 0x9910
+0x3B42 = 0x65AC
+0x3B43 = 0x66AB
+0x3B44 = 0x6B8B
+0x3B45 = 0x4ED5
+0x3B46 = 0x4ED4
+0x3B47 = 0x4F3A
+0x3B48 = 0x4F7F
+0x3B49 = 0x523A
+0x3B4A = 0x53F8
+0x3B4B = 0x53F2
+0x3B4C = 0x55E3
+0x3B4D = 0x56DB
+0x3B4E = 0x58EB
+0x3B4F = 0x59CB
+0x3B50 = 0x59C9
+0x3B51 = 0x59FF
+0x3B52 = 0x5B50
+0x3B53 = 0x5C4D
+0x3B54 = 0x5E02
+0x3B55 = 0x5E2B
+0x3B56 = 0x5FD7
+0x3B57 = 0x601D
+0x3B58 = 0x6307
+0x3B59 = 0x652F
+0x3B5A = 0x5B5C
+0x3B5B = 0x65AF
+0x3B5C = 0x65BD
+0x3B5D = 0x65E8
+0x3B5E = 0x679D
+0x3B5F = 0x6B62
+0x3B60 = 0x6B7B
+0x3B61 = 0x6C0F
+0x3B62 = 0x7345
+0x3B63 = 0x7949
+0x3B64 = 0x79C1
+0x3B65 = 0x7CF8
+0x3B66 = 0x7D19
+0x3B67 = 0x7D2B
+0x3B68 = 0x80A2
+0x3B69 = 0x8102
+0x3B6A = 0x81F3
+0x3B6B = 0x8996
+0x3B6C = 0x8A5E
+0x3B6D = 0x8A69
+0x3B6E = 0x8A66
+0x3B6F = 0x8A8C
+0x3B70 = 0x8AEE
+0x3B71 = 0x8CC7
+0x3B72 = 0x8CDC
+0x3B73 = 0x96CC
+0x3B74 = 0x98FC
+0x3B75 = 0x6B6F
+0x3B76 = 0x4E8B
+0x3B77 = 0x4F3C
+0x3B78 = 0x4F8D
+0x3B79 = 0x5150
+0x3B7A = 0x5B57
+0x3B7B = 0x5BFA
+0x3B7C = 0x6148
+0x3B7D = 0x6301
+0x3B7E = 0x6642
+0x3C21 = 0x6B21
+0x3C22 = 0x6ECB
+0x3C23 = 0x6CBB
+0x3C24 = 0x723E
+0x3C25 = 0x74BD
+0x3C26 = 0x75D4
+0x3C27 = 0x78C1
+0x3C28 = 0x793A
+0x3C29 = 0x800C
+0x3C2A = 0x8033
+0x3C2B = 0x81EA
+0x3C2C = 0x8494
+0x3C2D = 0x8F9E
+0x3C2E = 0x6C50
+0x3C2F = 0x9E7F
+0x3C30 = 0x5F0F
+0x3C31 = 0x8B58
+0x3C32 = 0x9D2B
+0x3C33 = 0x7AFA
+0x3C34 = 0x8EF8
+0x3C35 = 0x5B8D
+0x3C36 = 0x96EB
+0x3C37 = 0x4E03
+0x3C38 = 0x53F1
+0x3C39 = 0x57F7
+0x3C3A = 0x5931
+0x3C3B = 0x5AC9
+0x3C3C = 0x5BA4
+0x3C3D = 0x6089
+0x3C3E = 0x6E7F
+0x3C3F = 0x6F06
+0x3C40 = 0x75BE
+0x3C41 = 0x8CEA
+0x3C42 = 0x5B9F
+0x3C43 = 0x8500
+0x3C44 = 0x7BE0
+0x3C45 = 0x5072
+0x3C46 = 0x67F4
+0x3C47 = 0x829D
+0x3C48 = 0x5C61
+0x3C49 = 0x854A
+0x3C4A = 0x7E1E
+0x3C4B = 0x820E
+0x3C4C = 0x5199
+0x3C4D = 0x5C04
+0x3C4E = 0x6368
+0x3C4F = 0x8D66
+0x3C50 = 0x659C
+0x3C51 = 0x716E
+0x3C52 = 0x793E
+0x3C53 = 0x7D17
+0x3C54 = 0x8005
+0x3C55 = 0x8B1D
+0x3C56 = 0x8ECA
+0x3C57 = 0x906E
+0x3C58 = 0x86C7
+0x3C59 = 0x90AA
+0x3C5A = 0x501F
+0x3C5B = 0x52FA
+0x3C5C = 0x5C3A
+0x3C5D = 0x6753
+0x3C5E = 0x707C
+0x3C5F = 0x7235
+0x3C60 = 0x914C
+0x3C61 = 0x91C8
+0x3C62 = 0x932B
+0x3C63 = 0x82E5
+0x3C64 = 0x5BC2
+0x3C65 = 0x5F31
+0x3C66 = 0x60F9
+0x3C67 = 0x4E3B
+0x3C68 = 0x53D6
+0x3C69 = 0x5B88
+0x3C6A = 0x624B
+0x3C6B = 0x6731
+0x3C6C = 0x6B8A
+0x3C6D = 0x72E9
+0x3C6E = 0x73E0
+0x3C6F = 0x7A2E
+0x3C70 = 0x816B
+0x3C71 = 0x8DA3
+0x3C72 = 0x9152
+0x3C73 = 0x9996
+0x3C74 = 0x5112
+0x3C75 = 0x53D7
+0x3C76 = 0x546A
+0x3C77 = 0x5BFF
+0x3C78 = 0x6388
+0x3C79 = 0x6A39
+0x3C7A = 0x7DAC
+0x3C7B = 0x9700
+0x3C7C = 0x56DA
+0x3C7D = 0x53CE
+0x3C7E = 0x5468
+0x3D21 = 0x5B97
+0x3D22 = 0x5C31
+0x3D23 = 0x5DDE
+0x3D24 = 0x4FEE
+0x3D25 = 0x6101
+0x3D26 = 0x62FE
+0x3D27 = 0x6D32
+0x3D28 = 0x79C0
+0x3D29 = 0x79CB
+0x3D2A = 0x7D42
+0x3D2B = 0x7E4D
+0x3D2C = 0x7FD2
+0x3D2D = 0x81ED
+0x3D2E = 0x821F
+0x3D2F = 0x8490
+0x3D30 = 0x8846
+0x3D31 = 0x8972
+0x3D32 = 0x8B90
+0x3D33 = 0x8E74
+0x3D34 = 0x8F2F
+0x3D35 = 0x9031
+0x3D36 = 0x914B
+0x3D37 = 0x916C
+0x3D38 = 0x96C6
+0x3D39 = 0x919C
+0x3D3A = 0x4EC0
+0x3D3B = 0x4F4F
+0x3D3C = 0x5145
+0x3D3D = 0x5341
+0x3D3E = 0x5F93
+0x3D3F = 0x620E
+0x3D40 = 0x67D4
+0x3D41 = 0x6C41
+0x3D42 = 0x6E0B
+0x3D43 = 0x7363
+0x3D44 = 0x7E26
+0x3D45 = 0x91CD
+0x3D46 = 0x9283
+0x3D47 = 0x53D4
+0x3D48 = 0x5919
+0x3D49 = 0x5BBF
+0x3D4A = 0x6DD1
+0x3D4B = 0x795D
+0x3D4C = 0x7E2E
+0x3D4D = 0x7C9B
+0x3D4E = 0x587E
+0x3D4F = 0x719F
+0x3D50 = 0x51FA
+0x3D51 = 0x8853
+0x3D52 = 0x8FF0
+0x3D53 = 0x4FCA
+0x3D54 = 0x5CFB
+0x3D55 = 0x6625
+0x3D56 = 0x77AC
+0x3D57 = 0x7AE3
+0x3D58 = 0x821C
+0x3D59 = 0x99FF
+0x3D5A = 0x51C6
+0x3D5B = 0x5FAA
+0x3D5C = 0x65EC
+0x3D5D = 0x696F
+0x3D5E = 0x6B89
+0x3D5F = 0x6DF3
+0x3D60 = 0x6E96
+0x3D61 = 0x6F64
+0x3D62 = 0x76FE
+0x3D63 = 0x7D14
+0x3D64 = 0x5DE1
+0x3D65 = 0x9075
+0x3D66 = 0x9187
+0x3D67 = 0x9806
+0x3D68 = 0x51E6
+0x3D69 = 0x521D
+0x3D6A = 0x6240
+0x3D6B = 0x6691
+0x3D6C = 0x66D9
+0x3D6D = 0x6E1A
+0x3D6E = 0x5EB6
+0x3D6F = 0x7DD2
+0x3D70 = 0x7F72
+0x3D71 = 0x66F8
+0x3D72 = 0x85AF
+0x3D73 = 0x85F7
+0x3D74 = 0x8AF8
+0x3D75 = 0x52A9
+0x3D76 = 0x53D9
+0x3D77 = 0x5973
+0x3D78 = 0x5E8F
+0x3D79 = 0x5F90
+0x3D7A = 0x6055
+0x3D7B = 0x92E4
+0x3D7C = 0x9664
+0x3D7D = 0x50B7
+0x3D7E = 0x511F
+0x3E21 = 0x52DD
+0x3E22 = 0x5320
+0x3E23 = 0x5347
+0x3E24 = 0x53EC
+0x3E25 = 0x54E8
+0x3E26 = 0x5546
+0x3E27 = 0x5531
+0x3E28 = 0x5617
+0x3E29 = 0x5968
+0x3E2A = 0x59BE
+0x3E2B = 0x5A3C
+0x3E2C = 0x5BB5
+0x3E2D = 0x5C06
+0x3E2E = 0x5C0F
+0x3E2F = 0x5C11
+0x3E30 = 0x5C1A
+0x3E31 = 0x5E84
+0x3E32 = 0x5E8A
+0x3E33 = 0x5EE0
+0x3E34 = 0x5F70
+0x3E35 = 0x627F
+0x3E36 = 0x6284
+0x3E37 = 0x62DB
+0x3E38 = 0x638C
+0x3E39 = 0x6377
+0x3E3A = 0x6607
+0x3E3B = 0x660C
+0x3E3C = 0x662D
+0x3E3D = 0x6676
+0x3E3E = 0x677E
+0x3E3F = 0x68A2
+0x3E40 = 0x6A1F
+0x3E41 = 0x6A35
+0x3E42 = 0x6CBC
+0x3E43 = 0x6D88
+0x3E44 = 0x6E09
+0x3E45 = 0x6E58
+0x3E46 = 0x713C
+0x3E47 = 0x7126
+0x3E48 = 0x7167
+0x3E49 = 0x75C7
+0x3E4A = 0x7701
+0x3E4B = 0x785D
+0x3E4C = 0x7901
+0x3E4D = 0x7965
+0x3E4E = 0x79F0
+0x3E4F = 0x7AE0
+0x3E50 = 0x7B11
+0x3E51 = 0x7CA7
+0x3E52 = 0x7D39
+0x3E53 = 0x8096
+0x3E54 = 0x83D6
+0x3E55 = 0x848B
+0x3E56 = 0x8549
+0x3E57 = 0x885D
+0x3E58 = 0x88F3
+0x3E59 = 0x8A1F
+0x3E5A = 0x8A3C
+0x3E5B = 0x8A54
+0x3E5C = 0x8A73
+0x3E5D = 0x8C61
+0x3E5E = 0x8CDE
+0x3E5F = 0x91A4
+0x3E60 = 0x9266
+0x3E61 = 0x937E
+0x3E62 = 0x9418
+0x3E63 = 0x969C
+0x3E64 = 0x9798
+0x3E65 = 0x4E0A
+0x3E66 = 0x4E08
+0x3E67 = 0x4E1E
+0x3E68 = 0x4E57
+0x3E69 = 0x5197
+0x3E6A = 0x5270
+0x3E6B = 0x57CE
+0x3E6C = 0x5834
+0x3E6D = 0x58CC
+0x3E6E = 0x5B22
+0x3E6F = 0x5E38
+0x3E70 = 0x60C5
+0x3E71 = 0x64FE
+0x3E72 = 0x6761
+0x3E73 = 0x6756
+0x3E74 = 0x6D44
+0x3E75 = 0x72B6
+0x3E76 = 0x7573
+0x3E77 = 0x7A63
+0x3E78 = 0x84B8
+0x3E79 = 0x8B72
+0x3E7A = 0x91B8
+0x3E7B = 0x9320
+0x3E7C = 0x5631
+0x3E7D = 0x57F4
+0x3E7E = 0x98FE
+0x3F21 = 0x62ED
+0x3F22 = 0x690D
+0x3F23 = 0x6B96
+0x3F24 = 0x71ED
+0x3F25 = 0x7E54
+0x3F26 = 0x8077
+0x3F27 = 0x8272
+0x3F28 = 0x89E6
+0x3F29 = 0x98DF
+0x3F2A = 0x8755
+0x3F2B = 0x8FB1
+0x3F2C = 0x5C3B
+0x3F2D = 0x4F38
+0x3F2E = 0x4FE1
+0x3F2F = 0x4FB5
+0x3F30 = 0x5507
+0x3F31 = 0x5A20
+0x3F32 = 0x5BDD
+0x3F33 = 0x5BE9
+0x3F34 = 0x5FC3
+0x3F35 = 0x614E
+0x3F36 = 0x632F
+0x3F37 = 0x65B0
+0x3F38 = 0x664B
+0x3F39 = 0x68EE
+0x3F3A = 0x699B
+0x3F3B = 0x6D78
+0x3F3C = 0x6DF1
+0x3F3D = 0x7533
+0x3F3E = 0x75B9
+0x3F3F = 0x771F
+0x3F40 = 0x795E
+0x3F41 = 0x79E6
+0x3F42 = 0x7D33
+0x3F43 = 0x81E3
+0x3F44 = 0x82AF
+0x3F45 = 0x85AA
+0x3F46 = 0x89AA
+0x3F47 = 0x8A3A
+0x3F48 = 0x8EAB
+0x3F49 = 0x8F9B
+0x3F4A = 0x9032
+0x3F4B = 0x91DD
+0x3F4C = 0x9707
+0x3F4D = 0x4EBA
+0x3F4E = 0x4EC1
+0x3F4F = 0x5203
+0x3F50 = 0x5875
+0x3F51 = 0x58EC
+0x3F52 = 0x5C0B
+0x3F53 = 0x751A
+0x3F54 = 0x5C3D
+0x3F55 = 0x814E
+0x3F56 = 0x8A0A
+0x3F57 = 0x8FC5
+0x3F58 = 0x9663
+0x3F59 = 0x976D
+0x3F5A = 0x7B25
+0x3F5B = 0x8ACF
+0x3F5C = 0x9808
+0x3F5D = 0x9162
+0x3F5E = 0x56F3
+0x3F5F = 0x53A8
+0x3F60 = 0x9017
+0x3F61 = 0x5439
+0x3F62 = 0x5782
+0x3F63 = 0x5E25
+0x3F64 = 0x63A8
+0x3F65 = 0x6C34
+0x3F66 = 0x708A
+0x3F67 = 0x7761
+0x3F68 = 0x7C8B
+0x3F69 = 0x7FE0
+0x3F6A = 0x8870
+0x3F6B = 0x9042
+0x3F6C = 0x9154
+0x3F6D = 0x9310
+0x3F6E = 0x9318
+0x3F6F = 0x968F
+0x3F70 = 0x745E
+0x3F71 = 0x9AC4
+0x3F72 = 0x5D07
+0x3F73 = 0x5D69
+0x3F74 = 0x6570
+0x3F75 = 0x67A2
+0x3F76 = 0x8DA8
+0x3F77 = 0x96DB
+0x3F78 = 0x636E
+0x3F79 = 0x6749
+0x3F7A = 0x6919
+0x3F7B = 0x83C5
+0x3F7C = 0x9817
+0x3F7D = 0x96C0
+0x3F7E = 0x88FE
+0x4021 = 0x6F84
+0x4022 = 0x647A
+0x4023 = 0x5BF8
+0x4024 = 0x4E16
+0x4025 = 0x702C
+0x4026 = 0x755D
+0x4027 = 0x662F
+0x4028 = 0x51C4
+0x4029 = 0x5236
+0x402A = 0x52E2
+0x402B = 0x59D3
+0x402C = 0x5F81
+0x402D = 0x6027
+0x402E = 0x6210
+0x402F = 0x653F
+0x4030 = 0x6574
+0x4031 = 0x661F
+0x4032 = 0x6674
+0x4033 = 0x68F2
+0x4034 = 0x6816
+0x4035 = 0x6B63
+0x4036 = 0x6E05
+0x4037 = 0x7272
+0x4038 = 0x751F
+0x4039 = 0x76DB
+0x403A = 0x7CBE
+0x403B = 0x8056
+0x403C = 0x58F0
+0x403D = 0x88FD
+0x403E = 0x897F
+0x403F = 0x8AA0
+0x4040 = 0x8A93
+0x4041 = 0x8ACB
+0x4042 = 0x901D
+0x4043 = 0x9192
+0x4044 = 0x9752
+0x4045 = 0x9759
+0x4046 = 0x6589
+0x4047 = 0x7A0E
+0x4048 = 0x8106
+0x4049 = 0x96BB
+0x404A = 0x5E2D
+0x404B = 0x60DC
+0x404C = 0x621A
+0x404D = 0x65A5
+0x404E = 0x6614
+0x404F = 0x6790
+0x4050 = 0x77F3
+0x4051 = 0x7A4D
+0x4052 = 0x7C4D
+0x4053 = 0x7E3E
+0x4054 = 0x810A
+0x4055 = 0x8CAC
+0x4056 = 0x8D64
+0x4057 = 0x8DE1
+0x4058 = 0x8E5F
+0x4059 = 0x78A9
+0x405A = 0x5207
+0x405B = 0x62D9
+0x405C = 0x63A5
+0x405D = 0x6442
+0x405E = 0x6298
+0x405F = 0x8A2D
+0x4060 = 0x7A83
+0x4061 = 0x7BC0
+0x4062 = 0x8AAC
+0x4063 = 0x96EA
+0x4064 = 0x7D76
+0x4065 = 0x820C
+0x4066 = 0x8749
+0x4067 = 0x4ED9
+0x4068 = 0x5148
+0x4069 = 0x5343
+0x406A = 0x5360
+0x406B = 0x5BA3
+0x406C = 0x5C02
+0x406D = 0x5C16
+0x406E = 0x5DDD
+0x406F = 0x6226
+0x4070 = 0x6247
+0x4071 = 0x64B0
+0x4072 = 0x6813
+0x4073 = 0x6834
+0x4074 = 0x6CC9
+0x4075 = 0x6D45
+0x4076 = 0x6D17
+0x4077 = 0x67D3
+0x4078 = 0x6F5C
+0x4079 = 0x714E
+0x407A = 0x717D
+0x407B = 0x65CB
+0x407C = 0x7A7F
+0x407D = 0x7BAD
+0x407E = 0x7DDA
+0x4121 = 0x7E4A
+0x4122 = 0x7FA8
+0x4123 = 0x817A
+0x4124 = 0x821B
+0x4125 = 0x8239
+0x4126 = 0x85A6
+0x4127 = 0x8A6E
+0x4128 = 0x8CCE
+0x4129 = 0x8DF5
+0x412A = 0x9078
+0x412B = 0x9077
+0x412C = 0x92AD
+0x412D = 0x9291
+0x412E = 0x9583
+0x412F = 0x9BAE
+0x4130 = 0x524D
+0x4131 = 0x5584
+0x4132 = 0x6F38
+0x4133 = 0x7136
+0x4134 = 0x5168
+0x4135 = 0x7985
+0x4136 = 0x7E55
+0x4137 = 0x81B3
+0x4138 = 0x7CCE
+0x4139 = 0x564C
+0x413A = 0x5851
+0x413B = 0x5CA8
+0x413C = 0x63AA
+0x413D = 0x66FE
+0x413E = 0x66FD
+0x413F = 0x695A
+0x4140 = 0x72D9
+0x4141 = 0x758F
+0x4142 = 0x758E
+0x4143 = 0x790E
+0x4144 = 0x7956
+0x4145 = 0x79DF
+0x4146 = 0x7C97
+0x4147 = 0x7D20
+0x4148 = 0x7D44
+0x4149 = 0x8607
+0x414A = 0x8A34
+0x414B = 0x963B
+0x414C = 0x9061
+0x414D = 0x9F20
+0x414E = 0x50E7
+0x414F = 0x5275
+0x4150 = 0x53CC
+0x4151 = 0x53E2
+0x4152 = 0x5009
+0x4153 = 0x55AA
+0x4154 = 0x58EE
+0x4155 = 0x594F
+0x4156 = 0x723D
+0x4157 = 0x5B8B
+0x4158 = 0x5C64
+0x4159 = 0x531D
+0x415A = 0x60E3
+0x415B = 0x60F3
+0x415C = 0x635C
+0x415D = 0x6383
+0x415E = 0x633F
+0x415F = 0x63BB
+0x4160 = 0x64CD
+0x4161 = 0x65E9
+0x4162 = 0x66F9
+0x4163 = 0x5DE3
+0x4164 = 0x69CD
+0x4165 = 0x69FD
+0x4166 = 0x6F15
+0x4167 = 0x71E5
+0x4168 = 0x4E89
+0x4169 = 0x75E9
+0x416A = 0x76F8
+0x416B = 0x7A93
+0x416C = 0x7CDF
+0x416D = 0x7DCF
+0x416E = 0x7D9C
+0x416F = 0x8061
+0x4170 = 0x8349
+0x4171 = 0x8358
+0x4172 = 0x846C
+0x4173 = 0x84BC
+0x4174 = 0x85FB
+0x4175 = 0x88C5
+0x4176 = 0x8D70
+0x4177 = 0x9001
+0x4178 = 0x906D
+0x4179 = 0x9397
+0x417A = 0x971C
+0x417B = 0x9A12
+0x417C = 0x50CF
+0x417D = 0x5897
+0x417E = 0x618E
+0x4221 = 0x81D3
+0x4222 = 0x8535
+0x4223 = 0x8D08
+0x4224 = 0x9020
+0x4225 = 0x4FC3
+0x4226 = 0x5074
+0x4227 = 0x5247
+0x4228 = 0x5373
+0x4229 = 0x606F
+0x422A = 0x6349
+0x422B = 0x675F
+0x422C = 0x6E2C
+0x422D = 0x8DB3
+0x422E = 0x901F
+0x422F = 0x4FD7
+0x4230 = 0x5C5E
+0x4231 = 0x8CCA
+0x4232 = 0x65CF
+0x4233 = 0x7D9A
+0x4234 = 0x5352
+0x4235 = 0x8896
+0x4236 = 0x5176
+0x4237 = 0x63C3
+0x4238 = 0x5B58
+0x4239 = 0x5B6B
+0x423A = 0x5C0A
+0x423B = 0x640D
+0x423C = 0x6751
+0x423D = 0x905C
+0x423E = 0x4ED6
+0x423F = 0x591A
+0x4240 = 0x592A
+0x4241 = 0x6C70
+0x4242 = 0x8A51
+0x4243 = 0x553E
+0x4244 = 0x5815
+0x4245 = 0x59A5
+0x4246 = 0x60F0
+0x4247 = 0x6253
+0x4248 = 0x67C1
+0x4249 = 0x8235
+0x424A = 0x6955
+0x424B = 0x9640
+0x424C = 0x99C4
+0x424D = 0x9A28
+0x424E = 0x4F53
+0x424F = 0x5806
+0x4250 = 0x5BFE
+0x4251 = 0x8010
+0x4252 = 0x5CB1
+0x4253 = 0x5E2F
+0x4254 = 0x5F85
+0x4255 = 0x6020
+0x4256 = 0x614B
+0x4257 = 0x6234
+0x4258 = 0x66FF
+0x4259 = 0x6CF0
+0x425A = 0x6EDE
+0x425B = 0x80CE
+0x425C = 0x817F
+0x425D = 0x82D4
+0x425E = 0x888B
+0x425F = 0x8CB8
+0x4260 = 0x9000
+0x4261 = 0x902E
+0x4262 = 0x968A
+0x4263 = 0x9EDB
+0x4264 = 0x9BDB
+0x4265 = 0x4EE3
+0x4266 = 0x53F0
+0x4267 = 0x5927
+0x4268 = 0x7B2C
+0x4269 = 0x918D
+0x426A = 0x984C
+0x426B = 0x9DF9
+0x426C = 0x6EDD
+0x426D = 0x7027
+0x426E = 0x5353
+0x426F = 0x5544
+0x4270 = 0x5B85
+0x4271 = 0x6258
+0x4272 = 0x629E
+0x4273 = 0x62D3
+0x4274 = 0x6CA2
+0x4275 = 0x6FEF
+0x4276 = 0x7422
+0x4277 = 0x8A17
+0x4278 = 0x9438
+0x4279 = 0x6FC1
+0x427A = 0x8AFE
+0x427B = 0x8338
+0x427C = 0x51E7
+0x427D = 0x86F8
+0x427E = 0x53EA
+0x4321 = 0x53E9
+0x4322 = 0x4F46
+0x4323 = 0x9054
+0x4324 = 0x8FB0
+0x4325 = 0x596A
+0x4326 = 0x8131
+0x4327 = 0x5DFD
+0x4328 = 0x7AEA
+0x4329 = 0x8FBF
+0x432A = 0x68DA
+0x432B = 0x8C37
+0x432C = 0x72F8
+0x432D = 0x9C48
+0x432E = 0x6A3D
+0x432F = 0x8AB0
+0x4330 = 0x4E39
+0x4331 = 0x5358
+0x4332 = 0x5606
+0x4333 = 0x5766
+0x4334 = 0x62C5
+0x4335 = 0x63A2
+0x4336 = 0x65E6
+0x4337 = 0x6B4E
+0x4338 = 0x6DE1
+0x4339 = 0x6E5B
+0x433A = 0x70AD
+0x433B = 0x77ED
+0x433C = 0x7AEF
+0x433D = 0x7BAA
+0x433E = 0x7DBB
+0x433F = 0x803D
+0x4340 = 0x80C6
+0x4341 = 0x86CB
+0x4342 = 0x8A95
+0x4343 = 0x935B
+0x4344 = 0x56E3
+0x4345 = 0x58C7
+0x4346 = 0x5F3E
+0x4347 = 0x65AD
+0x4348 = 0x6696
+0x4349 = 0x6A80
+0x434A = 0x6BB5
+0x434B = 0x7537
+0x434C = 0x8AC7
+0x434D = 0x5024
+0x434E = 0x77E5
+0x434F = 0x5730
+0x4350 = 0x5F1B
+0x4351 = 0x6065
+0x4352 = 0x667A
+0x4353 = 0x6C60
+0x4354 = 0x75F4
+0x4355 = 0x7A1A
+0x4356 = 0x7F6E
+0x4357 = 0x81F4
+0x4358 = 0x8718
+0x4359 = 0x9045
+0x435A = 0x99B3
+0x435B = 0x7BC9
+0x435C = 0x755C
+0x435D = 0x7AF9
+0x435E = 0x7B51
+0x435F = 0x84C4
+0x4360 = 0x9010
+0x4361 = 0x79E9
+0x4362 = 0x7A92
+0x4363 = 0x8336
+0x4364 = 0x5AE1
+0x4365 = 0x7740
+0x4366 = 0x4E2D
+0x4367 = 0x4EF2
+0x4368 = 0x5B99
+0x4369 = 0x5FE0
+0x436A = 0x62BD
+0x436B = 0x663C
+0x436C = 0x67F1
+0x436D = 0x6CE8
+0x436E = 0x866B
+0x436F = 0x8877
+0x4370 = 0x8A3B
+0x4371 = 0x914E
+0x4372 = 0x92F3
+0x4373 = 0x99D0
+0x4374 = 0x6A17
+0x4375 = 0x7026
+0x4376 = 0x732A
+0x4377 = 0x82E7
+0x4378 = 0x8457
+0x4379 = 0x8CAF
+0x437A = 0x4E01
+0x437B = 0x5146
+0x437C = 0x51CB
+0x437D = 0x558B
+0x437E = 0x5BF5
+0x4421 = 0x5E16
+0x4422 = 0x5E33
+0x4423 = 0x5E81
+0x4424 = 0x5F14
+0x4425 = 0x5F35
+0x4426 = 0x5F6B
+0x4427 = 0x5FB4
+0x4428 = 0x61F2
+0x4429 = 0x6311
+0x442A = 0x66A2
+0x442B = 0x671D
+0x442C = 0x6F6E
+0x442D = 0x7252
+0x442E = 0x753A
+0x442F = 0x773A
+0x4430 = 0x8074
+0x4431 = 0x8139
+0x4432 = 0x8178
+0x4433 = 0x8776
+0x4434 = 0x8ABF
+0x4435 = 0x8ADC
+0x4436 = 0x8D85
+0x4437 = 0x8DF3
+0x4438 = 0x929A
+0x4439 = 0x9577
+0x443A = 0x9802
+0x443B = 0x9CE5
+0x443C = 0x52C5
+0x443D = 0x6357
+0x443E = 0x76F4
+0x443F = 0x6715
+0x4440 = 0x6C88
+0x4441 = 0x73CD
+0x4442 = 0x8CC3
+0x4443 = 0x93AE
+0x4444 = 0x9673
+0x4445 = 0x6D25
+0x4446 = 0x589C
+0x4447 = 0x690E
+0x4448 = 0x69CC
+0x4449 = 0x8FFD
+0x444A = 0x939A
+0x444B = 0x75DB
+0x444C = 0x901A
+0x444D = 0x585A
+0x444E = 0x6802
+0x444F = 0x63B4
+0x4450 = 0x69FB
+0x4451 = 0x4F43
+0x4452 = 0x6F2C
+0x4453 = 0x67D8
+0x4454 = 0x8FBB
+0x4455 = 0x8526
+0x4456 = 0x7DB4
+0x4457 = 0x9354
+0x4458 = 0x693F
+0x4459 = 0x6F70
+0x445A = 0x576A
+0x445B = 0x58F7
+0x445C = 0x5B2C
+0x445D = 0x7D2C
+0x445E = 0x722A
+0x445F = 0x540A
+0x4460 = 0x91E3
+0x4461 = 0x9DB4
+0x4462 = 0x4EAD
+0x4463 = 0x4F4E
+0x4464 = 0x505C
+0x4465 = 0x5075
+0x4466 = 0x5243
+0x4467 = 0x8C9E
+0x4468 = 0x5448
+0x4469 = 0x5824
+0x446A = 0x5B9A
+0x446B = 0x5E1D
+0x446C = 0x5E95
+0x446D = 0x5EAD
+0x446E = 0x5EF7
+0x446F = 0x5F1F
+0x4470 = 0x608C
+0x4471 = 0x62B5
+0x4472 = 0x633A
+0x4473 = 0x63D0
+0x4474 = 0x68AF
+0x4475 = 0x6C40
+0x4476 = 0x7887
+0x4477 = 0x798E
+0x4478 = 0x7A0B
+0x4479 = 0x7DE0
+0x447A = 0x8247
+0x447B = 0x8A02
+0x447C = 0x8AE6
+0x447D = 0x8E44
+0x447E = 0x9013
+0x4521 = 0x90B8
+0x4522 = 0x912D
+0x4523 = 0x91D8
+0x4524 = 0x9F0E
+0x4525 = 0x6CE5
+0x4526 = 0x6458
+0x4527 = 0x64E2
+0x4528 = 0x6575
+0x4529 = 0x6EF4
+0x452A = 0x7684
+0x452B = 0x7B1B
+0x452C = 0x9069
+0x452D = 0x93D1
+0x452E = 0x6EBA
+0x452F = 0x54F2
+0x4530 = 0x5FB9
+0x4531 = 0x64A4
+0x4532 = 0x8F4D
+0x4533 = 0x8FED
+0x4534 = 0x9244
+0x4535 = 0x5178
+0x4536 = 0x586B
+0x4537 = 0x5929
+0x4538 = 0x5C55
+0x4539 = 0x5E97
+0x453A = 0x6DFB
+0x453B = 0x7E8F
+0x453C = 0x751C
+0x453D = 0x8CBC
+0x453E = 0x8EE2
+0x453F = 0x985B
+0x4540 = 0x70B9
+0x4541 = 0x4F1D
+0x4542 = 0x6BBF
+0x4543 = 0x6FB1
+0x4544 = 0x7530
+0x4545 = 0x96FB
+0x4546 = 0x514E
+0x4547 = 0x5410
+0x4548 = 0x5835
+0x4549 = 0x5857
+0x454A = 0x59AC
+0x454B = 0x5C60
+0x454C = 0x5F92
+0x454D = 0x6597
+0x454E = 0x675C
+0x454F = 0x6E21
+0x4550 = 0x767B
+0x4551 = 0x83DF
+0x4552 = 0x8CED
+0x4553 = 0x9014
+0x4554 = 0x90FD
+0x4555 = 0x934D
+0x4556 = 0x7825
+0x4557 = 0x783A
+0x4558 = 0x52AA
+0x4559 = 0x5EA6
+0x455A = 0x571F
+0x455B = 0x5974
+0x455C = 0x6012
+0x455D = 0x5012
+0x455E = 0x515A
+0x455F = 0x51AC
+0x4560 = 0x51CD
+0x4561 = 0x5200
+0x4562 = 0x5510
+0x4563 = 0x5854
+0x4564 = 0x5858
+0x4565 = 0x5957
+0x4566 = 0x5B95
+0x4567 = 0x5CF6
+0x4568 = 0x5D8B
+0x4569 = 0x60BC
+0x456A = 0x6295
+0x456B = 0x642D
+0x456C = 0x6771
+0x456D = 0x6843
+0x456E = 0x68BC
+0x456F = 0x68DF
+0x4570 = 0x76D7
+0x4571 = 0x6DD8
+0x4572 = 0x6E6F
+0x4573 = 0x6D9B
+0x4574 = 0x706F
+0x4575 = 0x71C8
+0x4576 = 0x5F53
+0x4577 = 0x75D8
+0x4578 = 0x7977
+0x4579 = 0x7B49
+0x457A = 0x7B54
+0x457B = 0x7B52
+0x457C = 0x7CD6
+0x457D = 0x7D71
+0x457E = 0x5230
+0x4621 = 0x8463
+0x4622 = 0x8569
+0x4623 = 0x85E4
+0x4624 = 0x8A0E
+0x4625 = 0x8B04
+0x4626 = 0x8C46
+0x4627 = 0x8E0F
+0x4628 = 0x9003
+0x4629 = 0x900F
+0x462A = 0x9419
+0x462B = 0x9676
+0x462C = 0x982D
+0x462D = 0x9A30
+0x462E = 0x95D8
+0x462F = 0x50CD
+0x4630 = 0x52D5
+0x4631 = 0x540C
+0x4632 = 0x5802
+0x4633 = 0x5C0E
+0x4634 = 0x61A7
+0x4635 = 0x649E
+0x4636 = 0x6D1E
+0x4637 = 0x77B3
+0x4638 = 0x7AE5
+0x4639 = 0x80F4
+0x463A = 0x8404
+0x463B = 0x9053
+0x463C = 0x9285
+0x463D = 0x5CE0
+0x463E = 0x9D07
+0x463F = 0x533F
+0x4640 = 0x5F97
+0x4641 = 0x5FB3
+0x4642 = 0x6D9C
+0x4643 = 0x7279
+0x4644 = 0x7763
+0x4645 = 0x79BF
+0x4646 = 0x7BE4
+0x4647 = 0x6BD2
+0x4648 = 0x72EC
+0x4649 = 0x8AAD
+0x464A = 0x6803
+0x464B = 0x6A61
+0x464C = 0x51F8
+0x464D = 0x7A81
+0x464E = 0x6934
+0x464F = 0x5C4A
+0x4650 = 0x9CF6
+0x4651 = 0x82EB
+0x4652 = 0x5BC5
+0x4653 = 0x9149
+0x4654 = 0x701E
+0x4655 = 0x5678
+0x4656 = 0x5C6F
+0x4657 = 0x60C7
+0x4658 = 0x6566
+0x4659 = 0x6C8C
+0x465A = 0x8C5A
+0x465B = 0x9041
+0x465C = 0x9813
+0x465D = 0x5451
+0x465E = 0x66C7
+0x465F = 0x920D
+0x4660 = 0x5948
+0x4661 = 0x90A3
+0x4662 = 0x5185
+0x4663 = 0x4E4D
+0x4664 = 0x51EA
+0x4665 = 0x8599
+0x4666 = 0x8B0E
+0x4667 = 0x7058
+0x4668 = 0x637A
+0x4669 = 0x934B
+0x466A = 0x6962
+0x466B = 0x99B4
+0x466C = 0x7E04
+0x466D = 0x7577
+0x466E = 0x5357
+0x466F = 0x6960
+0x4670 = 0x8EDF
+0x4671 = 0x96E3
+0x4672 = 0x6C5D
+0x4673 = 0x4E8C
+0x4674 = 0x5C3C
+0x4675 = 0x5F10
+0x4676 = 0x8FE9
+0x4677 = 0x5302
+0x4678 = 0x8CD1
+0x4679 = 0x8089
+0x467A = 0x8679
+0x467B = 0x5EFF
+0x467C = 0x65E5
+0x467D = 0x4E73
+0x467E = 0x5165
+0x4721 = 0x5982
+0x4722 = 0x5C3F
+0x4723 = 0x97EE
+0x4724 = 0x4EFB
+0x4725 = 0x598A
+0x4726 = 0x5FCD
+0x4727 = 0x8A8D
+0x4728 = 0x6FE1
+0x4729 = 0x79B0
+0x472A = 0x7962
+0x472B = 0x5BE7
+0x472C = 0x8471
+0x472D = 0x732B
+0x472E = 0x71B1
+0x472F = 0x5E74
+0x4730 = 0x5FF5
+0x4731 = 0x637B
+0x4732 = 0x649A
+0x4733 = 0x71C3
+0x4734 = 0x7C98
+0x4735 = 0x4E43
+0x4736 = 0x5EFC
+0x4737 = 0x4E4B
+0x4738 = 0x57DC
+0x4739 = 0x56A2
+0x473A = 0x60A9
+0x473B = 0x6FC3
+0x473C = 0x7D0D
+0x473D = 0x80FD
+0x473E = 0x8133
+0x473F = 0x81BF
+0x4740 = 0x8FB2
+0x4741 = 0x8997
+0x4742 = 0x86A4
+0x4743 = 0x5DF4
+0x4744 = 0x628A
+0x4745 = 0x64AD
+0x4746 = 0x8987
+0x4747 = 0x6777
+0x4748 = 0x6CE2
+0x4749 = 0x6D3E
+0x474A = 0x7436
+0x474B = 0x7834
+0x474C = 0x5A46
+0x474D = 0x7F75
+0x474E = 0x82AD
+0x474F = 0x99AC
+0x4750 = 0x4FF3
+0x4751 = 0x5EC3
+0x4752 = 0x62DD
+0x4753 = 0x6392
+0x4754 = 0x6557
+0x4755 = 0x676F
+0x4756 = 0x76C3
+0x4757 = 0x724C
+0x4758 = 0x80CC
+0x4759 = 0x80BA
+0x475A = 0x8F29
+0x475B = 0x914D
+0x475C = 0x500D
+0x475D = 0x57F9
+0x475E = 0x5A92
+0x475F = 0x6885
+0x4760 = 0x6973
+0x4761 = 0x7164
+0x4762 = 0x72FD
+0x4763 = 0x8CB7
+0x4764 = 0x58F2
+0x4765 = 0x8CE0
+0x4766 = 0x966A
+0x4767 = 0x9019
+0x4768 = 0x877F
+0x4769 = 0x79E4
+0x476A = 0x77E7
+0x476B = 0x8429
+0x476C = 0x4F2F
+0x476D = 0x5265
+0x476E = 0x535A
+0x476F = 0x62CD
+0x4770 = 0x67CF
+0x4771 = 0x6CCA
+0x4772 = 0x767D
+0x4773 = 0x7B94
+0x4774 = 0x7C95
+0x4775 = 0x8236
+0x4776 = 0x8584
+0x4777 = 0x8FEB
+0x4778 = 0x66DD
+0x4779 = 0x6F20
+0x477A = 0x7206
+0x477B = 0x7E1B
+0x477C = 0x83AB
+0x477D = 0x99C1
+0x477E = 0x9EA6
+0x4821 = 0x51FD
+0x4822 = 0x7BB1
+0x4823 = 0x7872
+0x4824 = 0x7BB8
+0x4825 = 0x8087
+0x4826 = 0x7B48
+0x4827 = 0x6AE8
+0x4828 = 0x5E61
+0x4829 = 0x808C
+0x482A = 0x7551
+0x482B = 0x7560
+0x482C = 0x516B
+0x482D = 0x9262
+0x482E = 0x6E8C
+0x482F = 0x767A
+0x4830 = 0x9197
+0x4831 = 0x9AEA
+0x4832 = 0x4F10
+0x4833 = 0x7F70
+0x4834 = 0x629C
+0x4835 = 0x7B4F
+0x4836 = 0x95A5
+0x4837 = 0x9CE9
+0x4838 = 0x567A
+0x4839 = 0x5859
+0x483A = 0x86E4
+0x483B = 0x96BC
+0x483C = 0x4F34
+0x483D = 0x5224
+0x483E = 0x534A
+0x483F = 0x53CD
+0x4840 = 0x53DB
+0x4841 = 0x5E06
+0x4842 = 0x642C
+0x4843 = 0x6591
+0x4844 = 0x677F
+0x4845 = 0x6C3E
+0x4846 = 0x6C4E
+0x4847 = 0x7248
+0x4848 = 0x72AF
+0x4849 = 0x73ED
+0x484A = 0x7554
+0x484B = 0x7E41
+0x484C = 0x822C
+0x484D = 0x85E9
+0x484E = 0x8CA9
+0x484F = 0x7BC4
+0x4850 = 0x91C6
+0x4851 = 0x7169
+0x4852 = 0x9812
+0x4853 = 0x98EF
+0x4854 = 0x633D
+0x4855 = 0x6669
+0x4856 = 0x756A
+0x4857 = 0x76E4
+0x4858 = 0x78D0
+0x4859 = 0x8543
+0x485A = 0x86EE
+0x485B = 0x532A
+0x485C = 0x5351
+0x485D = 0x5426
+0x485E = 0x5983
+0x485F = 0x5E87
+0x4860 = 0x5F7C
+0x4861 = 0x60B2
+0x4862 = 0x6249
+0x4863 = 0x6279
+0x4864 = 0x62AB
+0x4865 = 0x6590
+0x4866 = 0x6BD4
+0x4867 = 0x6CCC
+0x4868 = 0x75B2
+0x4869 = 0x76AE
+0x486A = 0x7891
+0x486B = 0x79D8
+0x486C = 0x7DCB
+0x486D = 0x7F77
+0x486E = 0x80A5
+0x486F = 0x88AB
+0x4870 = 0x8AB9
+0x4871 = 0x8CBB
+0x4872 = 0x907F
+0x4873 = 0x975E
+0x4874 = 0x98DB
+0x4875 = 0x6A0B
+0x4876 = 0x7C38
+0x4877 = 0x5099
+0x4878 = 0x5C3E
+0x4879 = 0x5FAE
+0x487A = 0x6787
+0x487B = 0x6BD8
+0x487C = 0x7435
+0x487D = 0x7709
+0x487E = 0x7F8E
+0x4921 = 0x9F3B
+0x4922 = 0x67CA
+0x4923 = 0x7A17
+0x4924 = 0x5339
+0x4925 = 0x758B
+0x4926 = 0x9AED
+0x4927 = 0x5F66
+0x4928 = 0x819D
+0x4929 = 0x83F1
+0x492A = 0x8098
+0x492B = 0x5F3C
+0x492C = 0x5FC5
+0x492D = 0x7562
+0x492E = 0x7B46
+0x492F = 0x903C
+0x4930 = 0x6867
+0x4931 = 0x59EB
+0x4932 = 0x5A9B
+0x4933 = 0x7D10
+0x4934 = 0x767E
+0x4935 = 0x8B2C
+0x4936 = 0x4FF5
+0x4937 = 0x5F6A
+0x4938 = 0x6A19
+0x4939 = 0x6C37
+0x493A = 0x6F02
+0x493B = 0x74E2
+0x493C = 0x7968
+0x493D = 0x8868
+0x493E = 0x8A55
+0x493F = 0x8C79
+0x4940 = 0x5EDF
+0x4941 = 0x63CF
+0x4942 = 0x75C5
+0x4943 = 0x79D2
+0x4944 = 0x82D7
+0x4945 = 0x9328
+0x4946 = 0x92F2
+0x4947 = 0x849C
+0x4948 = 0x86ED
+0x4949 = 0x9C2D
+0x494A = 0x54C1
+0x494B = 0x5F6C
+0x494C = 0x658C
+0x494D = 0x6D5C
+0x494E = 0x7015
+0x494F = 0x8CA7
+0x4950 = 0x8CD3
+0x4951 = 0x983B
+0x4952 = 0x654F
+0x4953 = 0x74F6
+0x4954 = 0x4E0D
+0x4955 = 0x4ED8
+0x4956 = 0x57E0
+0x4957 = 0x592B
+0x4958 = 0x5A66
+0x4959 = 0x5BCC
+0x495A = 0x51A8
+0x495B = 0x5E03
+0x495C = 0x5E9C
+0x495D = 0x6016
+0x495E = 0x6276
+0x495F = 0x6577
+0x4960 = 0x65A7
+0x4961 = 0x666E
+0x4962 = 0x6D6E
+0x4963 = 0x7236
+0x4964 = 0x7B26
+0x4965 = 0x8150
+0x4966 = 0x819A
+0x4967 = 0x8299
+0x4968 = 0x8B5C
+0x4969 = 0x8CA0
+0x496A = 0x8CE6
+0x496B = 0x8D74
+0x496C = 0x961C
+0x496D = 0x9644
+0x496E = 0x4FAE
+0x496F = 0x64AB
+0x4970 = 0x6B66
+0x4971 = 0x821E
+0x4972 = 0x8461
+0x4973 = 0x856A
+0x4974 = 0x90E8
+0x4975 = 0x5C01
+0x4976 = 0x6953
+0x4977 = 0x98A8
+0x4978 = 0x847A
+0x4979 = 0x8557
+0x497A = 0x4F0F
+0x497B = 0x526F
+0x497C = 0x5FA9
+0x497D = 0x5E45
+0x497E = 0x670D
+0x4A21 = 0x798F
+0x4A22 = 0x8179
+0x4A23 = 0x8907
+0x4A24 = 0x8986
+0x4A25 = 0x6DF5
+0x4A26 = 0x5F17
+0x4A27 = 0x6255
+0x4A28 = 0x6CB8
+0x4A29 = 0x4ECF
+0x4A2A = 0x7269
+0x4A2B = 0x9B92
+0x4A2C = 0x5206
+0x4A2D = 0x543B
+0x4A2E = 0x5674
+0x4A2F = 0x58B3
+0x4A30 = 0x61A4
+0x4A31 = 0x626E
+0x4A32 = 0x711A
+0x4A33 = 0x596E
+0x4A34 = 0x7C89
+0x4A35 = 0x7CDE
+0x4A36 = 0x7D1B
+0x4A37 = 0x96F0
+0x4A38 = 0x6587
+0x4A39 = 0x805E
+0x4A3A = 0x4E19
+0x4A3B = 0x4F75
+0x4A3C = 0x5175
+0x4A3D = 0x5840
+0x4A3E = 0x5E63
+0x4A3F = 0x5E73
+0x4A40 = 0x5F0A
+0x4A41 = 0x67C4
+0x4A42 = 0x4E26
+0x4A43 = 0x853D
+0x4A44 = 0x9589
+0x4A45 = 0x965B
+0x4A46 = 0x7C73
+0x4A47 = 0x9801
+0x4A48 = 0x50FB
+0x4A49 = 0x58C1
+0x4A4A = 0x7656
+0x4A4B = 0x78A7
+0x4A4C = 0x5225
+0x4A4D = 0x77A5
+0x4A4E = 0x8511
+0x4A4F = 0x7B86
+0x4A50 = 0x504F
+0x4A51 = 0x5909
+0x4A52 = 0x7247
+0x4A53 = 0x7BC7
+0x4A54 = 0x7DE8
+0x4A55 = 0x8FBA
+0x4A56 = 0x8FD4
+0x4A57 = 0x904D
+0x4A58 = 0x4FBF
+0x4A59 = 0x52C9
+0x4A5A = 0x5A29
+0x4A5B = 0x5F01
+0x4A5C = 0x97AD
+0x4A5D = 0x4FDD
+0x4A5E = 0x8217
+0x4A5F = 0x92EA
+0x4A60 = 0x5703
+0x4A61 = 0x6355
+0x4A62 = 0x6B69
+0x4A63 = 0x752B
+0x4A64 = 0x88DC
+0x4A65 = 0x8F14
+0x4A66 = 0x7A42
+0x4A67 = 0x52DF
+0x4A68 = 0x5893
+0x4A69 = 0x6155
+0x4A6A = 0x620A
+0x4A6B = 0x66AE
+0x4A6C = 0x6BCD
+0x4A6D = 0x7C3F
+0x4A6E = 0x83E9
+0x4A6F = 0x5023
+0x4A70 = 0x4FF8
+0x4A71 = 0x5305
+0x4A72 = 0x5446
+0x4A73 = 0x5831
+0x4A74 = 0x5949
+0x4A75 = 0x5B9D
+0x4A76 = 0x5CF0
+0x4A77 = 0x5CEF
+0x4A78 = 0x5D29
+0x4A79 = 0x5E96
+0x4A7A = 0x62B1
+0x4A7B = 0x6367
+0x4A7C = 0x653E
+0x4A7D = 0x65B9
+0x4A7E = 0x670B
+0x4B21 = 0x6CD5
+0x4B22 = 0x6CE1
+0x4B23 = 0x70F9
+0x4B24 = 0x7832
+0x4B25 = 0x7E2B
+0x4B26 = 0x80DE
+0x4B27 = 0x82B3
+0x4B28 = 0x840C
+0x4B29 = 0x84EC
+0x4B2A = 0x8702
+0x4B2B = 0x8912
+0x4B2C = 0x8A2A
+0x4B2D = 0x8C4A
+0x4B2E = 0x90A6
+0x4B2F = 0x92D2
+0x4B30 = 0x98FD
+0x4B31 = 0x9CF3
+0x4B32 = 0x9D6C
+0x4B33 = 0x4E4F
+0x4B34 = 0x4EA1
+0x4B35 = 0x508D
+0x4B36 = 0x5256
+0x4B37 = 0x574A
+0x4B38 = 0x59A8
+0x4B39 = 0x5E3D
+0x4B3A = 0x5FD8
+0x4B3B = 0x5FD9
+0x4B3C = 0x623F
+0x4B3D = 0x66B4
+0x4B3E = 0x671B
+0x4B3F = 0x67D0
+0x4B40 = 0x68D2
+0x4B41 = 0x5192
+0x4B42 = 0x7D21
+0x4B43 = 0x80AA
+0x4B44 = 0x81A8
+0x4B45 = 0x8B00
+0x4B46 = 0x8C8C
+0x4B47 = 0x8CBF
+0x4B48 = 0x927E
+0x4B49 = 0x9632
+0x4B4A = 0x5420
+0x4B4B = 0x982C
+0x4B4C = 0x5317
+0x4B4D = 0x50D5
+0x4B4E = 0x535C
+0x4B4F = 0x58A8
+0x4B50 = 0x64B2
+0x4B51 = 0x6734
+0x4B52 = 0x7267
+0x4B53 = 0x7766
+0x4B54 = 0x7A46
+0x4B55 = 0x91E6
+0x4B56 = 0x52C3
+0x4B57 = 0x6CA1
+0x4B58 = 0x6B86
+0x4B59 = 0x5800
+0x4B5A = 0x5E4C
+0x4B5B = 0x5954
+0x4B5C = 0x672C
+0x4B5D = 0x7FFB
+0x4B5E = 0x51E1
+0x4B5F = 0x76C6
+0x4B60 = 0x6469
+0x4B61 = 0x78E8
+0x4B62 = 0x9B54
+0x4B63 = 0x9EBB
+0x4B64 = 0x57CB
+0x4B65 = 0x59B9
+0x4B66 = 0x6627
+0x4B67 = 0x679A
+0x4B68 = 0x6BCE
+0x4B69 = 0x54E9
+0x4B6A = 0x69D9
+0x4B6B = 0x5E55
+0x4B6C = 0x819C
+0x4B6D = 0x6795
+0x4B6E = 0x9BAA
+0x4B6F = 0x67FE
+0x4B70 = 0x9C52
+0x4B71 = 0x685D
+0x4B72 = 0x4EA6
+0x4B73 = 0x4FE3
+0x4B74 = 0x53C8
+0x4B75 = 0x62B9
+0x4B76 = 0x672B
+0x4B77 = 0x6CAB
+0x4B78 = 0x8FC4
+0x4B79 = 0x4FAD
+0x4B7A = 0x7E6D
+0x4B7B = 0x9EBF
+0x4B7C = 0x4E07
+0x4B7D = 0x6162
+0x4B7E = 0x6E80
+0x4C21 = 0x6F2B
+0x4C22 = 0x8513
+0x4C23 = 0x5473
+0x4C24 = 0x672A
+0x4C25 = 0x9B45
+0x4C26 = 0x5DF3
+0x4C27 = 0x7B95
+0x4C28 = 0x5CAC
+0x4C29 = 0x5BC6
+0x4C2A = 0x871C
+0x4C2B = 0x6E4A
+0x4C2C = 0x84D1
+0x4C2D = 0x7A14
+0x4C2E = 0x8108
+0x4C2F = 0x5999
+0x4C30 = 0x7C8D
+0x4C31 = 0x6C11
+0x4C32 = 0x7720
+0x4C33 = 0x52D9
+0x4C34 = 0x5922
+0x4C35 = 0x7121
+0x4C36 = 0x725F
+0x4C37 = 0x77DB
+0x4C38 = 0x9727
+0x4C39 = 0x9D61
+0x4C3A = 0x690B
+0x4C3B = 0x5A7F
+0x4C3C = 0x5A18
+0x4C3D = 0x51A5
+0x4C3E = 0x540D
+0x4C3F = 0x547D
+0x4C40 = 0x660E
+0x4C41 = 0x76DF
+0x4C42 = 0x8FF7
+0x4C43 = 0x9298
+0x4C44 = 0x9CF4
+0x4C45 = 0x59EA
+0x4C46 = 0x725D
+0x4C47 = 0x6EC5
+0x4C48 = 0x514D
+0x4C49 = 0x68C9
+0x4C4A = 0x7DBF
+0x4C4B = 0x7DEC
+0x4C4C = 0x9762
+0x4C4D = 0x9EBA
+0x4C4E = 0x6478
+0x4C4F = 0x6A21
+0x4C50 = 0x8302
+0x4C51 = 0x5984
+0x4C52 = 0x5B5F
+0x4C53 = 0x6BDB
+0x4C54 = 0x731B
+0x4C55 = 0x76F2
+0x4C56 = 0x7DB2
+0x4C57 = 0x8017
+0x4C58 = 0x8499
+0x4C59 = 0x5132
+0x4C5A = 0x6728
+0x4C5B = 0x9ED9
+0x4C5C = 0x76EE
+0x4C5D = 0x6762
+0x4C5E = 0x52FF
+0x4C5F = 0x9905
+0x4C60 = 0x5C24
+0x4C61 = 0x623B
+0x4C62 = 0x7C7E
+0x4C63 = 0x8CB0
+0x4C64 = 0x554F
+0x4C65 = 0x60B6
+0x4C66 = 0x7D0B
+0x4C67 = 0x9580
+0x4C68 = 0x5301
+0x4C69 = 0x4E5F
+0x4C6A = 0x51B6
+0x4C6B = 0x591C
+0x4C6C = 0x723A
+0x4C6D = 0x8036
+0x4C6E = 0x91CE
+0x4C6F = 0x5F25
+0x4C70 = 0x77E2
+0x4C71 = 0x5384
+0x4C72 = 0x5F79
+0x4C73 = 0x7D04
+0x4C74 = 0x85AC
+0x4C75 = 0x8A33
+0x4C76 = 0x8E8D
+0x4C77 = 0x9756
+0x4C78 = 0x67F3
+0x4C79 = 0x85AE
+0x4C7A = 0x9453
+0x4C7B = 0x6109
+0x4C7C = 0x6108
+0x4C7D = 0x6CB9
+0x4C7E = 0x7652
+0x4D21 = 0x8AED
+0x4D22 = 0x8F38
+0x4D23 = 0x552F
+0x4D24 = 0x4F51
+0x4D25 = 0x512A
+0x4D26 = 0x52C7
+0x4D27 = 0x53CB
+0x4D28 = 0x5BA5
+0x4D29 = 0x5E7D
+0x4D2A = 0x60A0
+0x4D2B = 0x6182
+0x4D2C = 0x63D6
+0x4D2D = 0x6709
+0x4D2E = 0x67DA
+0x4D2F = 0x6E67
+0x4D30 = 0x6D8C
+0x4D31 = 0x7336
+0x4D32 = 0x7337
+0x4D33 = 0x7531
+0x4D34 = 0x7950
+0x4D35 = 0x88D5
+0x4D36 = 0x8A98
+0x4D37 = 0x904A
+0x4D38 = 0x9091
+0x4D39 = 0x90F5
+0x4D3A = 0x96C4
+0x4D3B = 0x878D
+0x4D3C = 0x5915
+0x4D3D = 0x4E88
+0x4D3E = 0x4F59
+0x4D3F = 0x4E0E
+0x4D40 = 0x8A89
+0x4D41 = 0x8F3F
+0x4D42 = 0x9810
+0x4D43 = 0x50AD
+0x4D44 = 0x5E7C
+0x4D45 = 0x5996
+0x4D46 = 0x5BB9
+0x4D47 = 0x5EB8
+0x4D48 = 0x63DA
+0x4D49 = 0x63FA
+0x4D4A = 0x64C1
+0x4D4B = 0x66DC
+0x4D4C = 0x694A
+0x4D4D = 0x69D8
+0x4D4E = 0x6D0B
+0x4D4F = 0x6EB6
+0x4D50 = 0x7194
+0x4D51 = 0x7528
+0x4D52 = 0x7AAF
+0x4D53 = 0x7F8A
+0x4D54 = 0x8000
+0x4D55 = 0x8449
+0x4D56 = 0x84C9
+0x4D57 = 0x8981
+0x4D58 = 0x8B21
+0x4D59 = 0x8E0A
+0x4D5A = 0x9065
+0x4D5B = 0x967D
+0x4D5C = 0x990A
+0x4D5D = 0x617E
+0x4D5E = 0x6291
+0x4D5F = 0x6B32
+0x4D60 = 0x6C83
+0x4D61 = 0x6D74
+0x4D62 = 0x7FCC
+0x4D63 = 0x7FFC
+0x4D64 = 0x6DC0
+0x4D65 = 0x7F85
+0x4D66 = 0x87BA
+0x4D67 = 0x88F8
+0x4D68 = 0x6765
+0x4D69 = 0x83B1
+0x4D6A = 0x983C
+0x4D6B = 0x96F7
+0x4D6C = 0x6D1B
+0x4D6D = 0x7D61
+0x4D6E = 0x843D
+0x4D6F = 0x916A
+0x4D70 = 0x4E71
+0x4D71 = 0x5375
+0x4D72 = 0x5D50
+0x4D73 = 0x6B04
+0x4D74 = 0x6FEB
+0x4D75 = 0x85CD
+0x4D76 = 0x862D
+0x4D77 = 0x89A7
+0x4D78 = 0x5229
+0x4D79 = 0x540F
+0x4D7A = 0x5C65
+0x4D7B = 0x674E
+0x4D7C = 0x68A8
+0x4D7D = 0x7406
+0x4D7E = 0x7483
+0x4E21 = 0x75E2
+0x4E22 = 0x88CF
+0x4E23 = 0x88E1
+0x4E24 = 0x91CC
+0x4E25 = 0x96E2
+0x4E26 = 0x9678
+0x4E27 = 0x5F8B
+0x4E28 = 0x7387
+0x4E29 = 0x7ACB
+0x4E2A = 0x844E
+0x4E2B = 0x63A0
+0x4E2C = 0x7565
+0x4E2D = 0x5289
+0x4E2E = 0x6D41
+0x4E2F = 0x6E9C
+0x4E30 = 0x7409
+0x4E31 = 0x7559
+0x4E32 = 0x786B
+0x4E33 = 0x7C92
+0x4E34 = 0x9686
+0x4E35 = 0x7ADC
+0x4E36 = 0x9F8D
+0x4E37 = 0x4FB6
+0x4E38 = 0x616E
+0x4E39 = 0x65C5
+0x4E3A = 0x865C
+0x4E3B = 0x4E86
+0x4E3C = 0x4EAE
+0x4E3D = 0x50DA
+0x4E3E = 0x4E21
+0x4E3F = 0x51CC
+0x4E40 = 0x5BEE
+0x4E41 = 0x6599
+0x4E42 = 0x6881
+0x4E43 = 0x6DBC
+0x4E44 = 0x731F
+0x4E45 = 0x7642
+0x4E46 = 0x77AD
+0x4E47 = 0x7A1C
+0x4E48 = 0x7CE7
+0x4E49 = 0x826F
+0x4E4A = 0x8AD2
+0x4E4B = 0x907C
+0x4E4C = 0x91CF
+0x4E4D = 0x9675
+0x4E4E = 0x9818
+0x4E4F = 0x529B
+0x4E50 = 0x7DD1
+0x4E51 = 0x502B
+0x4E52 = 0x5398
+0x4E53 = 0x6797
+0x4E54 = 0x6DCB
+0x4E55 = 0x71D0
+0x4E56 = 0x7433
+0x4E57 = 0x81E8
+0x4E58 = 0x8F2A
+0x4E59 = 0x96A3
+0x4E5A = 0x9C57
+0x4E5B = 0x9E9F
+0x4E5C = 0x7460
+0x4E5D = 0x5841
+0x4E5E = 0x6D99
+0x4E5F = 0x7D2F
+0x4E60 = 0x985E
+0x4E61 = 0x4EE4
+0x4E62 = 0x4F36
+0x4E63 = 0x4F8B
+0x4E64 = 0x51B7
+0x4E65 = 0x52B1
+0x4E66 = 0x5DBA
+0x4E67 = 0x601C
+0x4E68 = 0x73B2
+0x4E69 = 0x793C
+0x4E6A = 0x82D3
+0x4E6B = 0x9234
+0x4E6C = 0x96B7
+0x4E6D = 0x96F6
+0x4E6E = 0x970A
+0x4E6F = 0x9E97
+0x4E70 = 0x9F62
+0x4E71 = 0x66A6
+0x4E72 = 0x6B74
+0x4E73 = 0x5217
+0x4E74 = 0x52A3
+0x4E75 = 0x70C8
+0x4E76 = 0x88C2
+0x4E77 = 0x5EC9
+0x4E78 = 0x604B
+0x4E79 = 0x6190
+0x4E7A = 0x6F23
+0x4E7B = 0x7149
+0x4E7C = 0x7C3E
+0x4E7D = 0x7DF4
+0x4E7E = 0x806F
+0x4F21 = 0x84EE
+0x4F22 = 0x9023
+0x4F23 = 0x932C
+0x4F24 = 0x5442
+0x4F25 = 0x9B6F
+0x4F26 = 0x6AD3
+0x4F27 = 0x7089
+0x4F28 = 0x8CC2
+0x4F29 = 0x8DEF
+0x4F2A = 0x9732
+0x4F2B = 0x52B4
+0x4F2C = 0x5A41
+0x4F2D = 0x5ECA
+0x4F2E = 0x5F04
+0x4F2F = 0x6717
+0x4F30 = 0x697C
+0x4F31 = 0x6994
+0x4F32 = 0x6D6A
+0x4F33 = 0x6F0F
+0x4F34 = 0x7262
+0x4F35 = 0x72FC
+0x4F36 = 0x7BED
+0x4F37 = 0x8001
+0x4F38 = 0x807E
+0x4F39 = 0x874B
+0x4F3A = 0x90CE
+0x4F3B = 0x516D
+0x4F3C = 0x9E93
+0x4F3D = 0x7984
+0x4F3E = 0x808B
+0x4F3F = 0x9332
+0x4F40 = 0x8AD6
+0x4F41 = 0x502D
+0x4F42 = 0x548C
+0x4F43 = 0x8A71
+0x4F44 = 0x6B6A
+0x4F45 = 0x8CC4
+0x4F46 = 0x8107
+0x4F47 = 0x60D1
+0x4F48 = 0x67A0
+0x4F49 = 0x9DF2
+0x4F4A = 0x4E99
+0x4F4B = 0x4E98
+0x4F4C = 0x9C10
+0x4F4D = 0x8A6B
+0x4F4E = 0x85C1
+0x4F4F = 0x8568
+0x4F50 = 0x6900
+0x4F51 = 0x6E7E
+0x4F52 = 0x7897
+0x4F53 = 0x8155
+0x5021 = 0x5F0C
+0x5022 = 0x4E10
+0x5023 = 0x4E15
+0x5024 = 0x4E2A
+0x5025 = 0x4E31
+0x5026 = 0x4E36
+0x5027 = 0x4E3C
+0x5028 = 0x4E3F
+0x5029 = 0x4E42
+0x502A = 0x4E56
+0x502B = 0x4E58
+0x502C = 0x4E82
+0x502D = 0x4E85
+0x502E = 0x8C6B
+0x502F = 0x4E8A
+0x5030 = 0x8212
+0x5031 = 0x5F0D
+0x5032 = 0x4E8E
+0x5033 = 0x4E9E
+0x5034 = 0x4E9F
+0x5035 = 0x4EA0
+0x5036 = 0x4EA2
+0x5037 = 0x4EB0
+0x5038 = 0x4EB3
+0x5039 = 0x4EB6
+0x503A = 0x4ECE
+0x503B = 0x4ECD
+0x503C = 0x4EC4
+0x503D = 0x4EC6
+0x503E = 0x4EC2
+0x503F = 0x4ED7
+0x5040 = 0x4EDE
+0x5041 = 0x4EED
+0x5042 = 0x4EDF
+0x5043 = 0x4EF7
+0x5044 = 0x4F09
+0x5045 = 0x4F5A
+0x5046 = 0x4F30
+0x5047 = 0x4F5B
+0x5048 = 0x4F5D
+0x5049 = 0x4F57
+0x504A = 0x4F47
+0x504B = 0x4F76
+0x504C = 0x4F88
+0x504D = 0x4F8F
+0x504E = 0x4F98
+0x504F = 0x4F7B
+0x5050 = 0x4F69
+0x5051 = 0x4F70
+0x5052 = 0x4F91
+0x5053 = 0x4F6F
+0x5054 = 0x4F86
+0x5055 = 0x4F96
+0x5056 = 0x5118
+0x5057 = 0x4FD4
+0x5058 = 0x4FDF
+0x5059 = 0x4FCE
+0x505A = 0x4FD8
+0x505B = 0x4FDB
+0x505C = 0x4FD1
+0x505D = 0x4FDA
+0x505E = 0x4FD0
+0x505F = 0x4FE4
+0x5060 = 0x4FE5
+0x5061 = 0x501A
+0x5062 = 0x5028
+0x5063 = 0x5014
+0x5064 = 0x502A
+0x5065 = 0x5025
+0x5066 = 0x5005
+0x5067 = 0x4F1C
+0x5068 = 0x4FF6
+0x5069 = 0x5021
+0x506A = 0x5029
+0x506B = 0x502C
+0x506C = 0x4FFE
+0x506D = 0x4FEF
+0x506E = 0x5011
+0x506F = 0x5006
+0x5070 = 0x5043
+0x5071 = 0x5047
+0x5072 = 0x6703
+0x5073 = 0x5055
+0x5074 = 0x5050
+0x5075 = 0x5048
+0x5076 = 0x505A
+0x5077 = 0x5056
+0x5078 = 0x506C
+0x5079 = 0x5078
+0x507A = 0x5080
+0x507B = 0x509A
+0x507C = 0x5085
+0x507D = 0x50B4
+0x507E = 0x50B2
+0x5121 = 0x50C9
+0x5122 = 0x50CA
+0x5123 = 0x50B3
+0x5124 = 0x50C2
+0x5125 = 0x50D6
+0x5126 = 0x50DE
+0x5127 = 0x50E5
+0x5128 = 0x50ED
+0x5129 = 0x50E3
+0x512A = 0x50EE
+0x512B = 0x50F9
+0x512C = 0x50F5
+0x512D = 0x5109
+0x512E = 0x5101
+0x512F = 0x5102
+0x5130 = 0x5116
+0x5131 = 0x5115
+0x5132 = 0x5114
+0x5133 = 0x511A
+0x5134 = 0x5121
+0x5135 = 0x513A
+0x5136 = 0x5137
+0x5137 = 0x513C
+0x5138 = 0x513B
+0x5139 = 0x513F
+0x513A = 0x5140
+0x513B = 0x5152
+0x513C = 0x514C
+0x513D = 0x5154
+0x513E = 0x5162
+0x513F = 0x7AF8
+0x5140 = 0x5169
+0x5141 = 0x516A
+0x5142 = 0x516E
+0x5143 = 0x5180
+0x5144 = 0x5182
+0x5145 = 0x56D8
+0x5146 = 0x518C
+0x5147 = 0x5189
+0x5148 = 0x518F
+0x5149 = 0x5191
+0x514A = 0x5193
+0x514B = 0x5195
+0x514C = 0x5196
+0x514D = 0x51A4
+0x514E = 0x51A6
+0x514F = 0x51A2
+0x5150 = 0x51A9
+0x5151 = 0x51AA
+0x5152 = 0x51AB
+0x5153 = 0x51B3
+0x5154 = 0x51B1
+0x5155 = 0x51B2
+0x5156 = 0x51B0
+0x5157 = 0x51B5
+0x5158 = 0x51BD
+0x5159 = 0x51C5
+0x515A = 0x51C9
+0x515B = 0x51DB
+0x515C = 0x51E0
+0x515D = 0x8655
+0x515E = 0x51E9
+0x515F = 0x51ED
+0x5160 = 0x51F0
+0x5161 = 0x51F5
+0x5162 = 0x51FE
+0x5163 = 0x5204
+0x5164 = 0x520B
+0x5165 = 0x5214
+0x5166 = 0x520E
+0x5167 = 0x5227
+0x5168 = 0x522A
+0x5169 = 0x522E
+0x516A = 0x5233
+0x516B = 0x5239
+0x516C = 0x524F
+0x516D = 0x5244
+0x516E = 0x524B
+0x516F = 0x524C
+0x5170 = 0x525E
+0x5171 = 0x5254
+0x5172 = 0x526A
+0x5173 = 0x5274
+0x5174 = 0x5269
+0x5175 = 0x5273
+0x5176 = 0x527F
+0x5177 = 0x527D
+0x5178 = 0x528D
+0x5179 = 0x5294
+0x517A = 0x5292
+0x517B = 0x5271
+0x517C = 0x5288
+0x517D = 0x5291
+0x517E = 0x8FA8
+0x5221 = 0x8FA7
+0x5222 = 0x52AC
+0x5223 = 0x52AD
+0x5224 = 0x52BC
+0x5225 = 0x52B5
+0x5226 = 0x52C1
+0x5227 = 0x52CD
+0x5228 = 0x52D7
+0x5229 = 0x52DE
+0x522A = 0x52E3
+0x522B = 0x52E6
+0x522C = 0x98ED
+0x522D = 0x52E0
+0x522E = 0x52F3
+0x522F = 0x52F5
+0x5230 = 0x52F8
+0x5231 = 0x52F9
+0x5232 = 0x5306
+0x5233 = 0x5308
+0x5234 = 0x7538
+0x5235 = 0x530D
+0x5236 = 0x5310
+0x5237 = 0x530F
+0x5238 = 0x5315
+0x5239 = 0x531A
+0x523A = 0x5323
+0x523B = 0x532F
+0x523C = 0x5331
+0x523D = 0x5333
+0x523E = 0x5338
+0x523F = 0x5340
+0x5240 = 0x5346
+0x5241 = 0x5345
+0x5242 = 0x4E17
+0x5243 = 0x5349
+0x5244 = 0x534D
+0x5245 = 0x51D6
+0x5246 = 0x535E
+0x5247 = 0x5369
+0x5248 = 0x536E
+0x5249 = 0x5918
+0x524A = 0x537B
+0x524B = 0x5377
+0x524C = 0x5382
+0x524D = 0x5396
+0x524E = 0x53A0
+0x524F = 0x53A6
+0x5250 = 0x53A5
+0x5251 = 0x53AE
+0x5252 = 0x53B0
+0x5253 = 0x53B6
+0x5254 = 0x53C3
+0x5255 = 0x7C12
+0x5256 = 0x96D9
+0x5257 = 0x53DF
+0x5258 = 0x66FC
+0x5259 = 0x71EE
+0x525A = 0x53EE
+0x525B = 0x53E8
+0x525C = 0x53ED
+0x525D = 0x53FA
+0x525E = 0x5401
+0x525F = 0x543D
+0x5260 = 0x5440
+0x5261 = 0x542C
+0x5262 = 0x542D
+0x5263 = 0x543C
+0x5264 = 0x542E
+0x5265 = 0x5436
+0x5266 = 0x5429
+0x5267 = 0x541D
+0x5268 = 0x544E
+0x5269 = 0x548F
+0x526A = 0x5475
+0x526B = 0x548E
+0x526C = 0x545F
+0x526D = 0x5471
+0x526E = 0x5477
+0x526F = 0x5470
+0x5270 = 0x5492
+0x5271 = 0x547B
+0x5272 = 0x5480
+0x5273 = 0x5476
+0x5274 = 0x5484
+0x5275 = 0x5490
+0x5276 = 0x5486
+0x5277 = 0x54C7
+0x5278 = 0x54A2
+0x5279 = 0x54B8
+0x527A = 0x54A5
+0x527B = 0x54AC
+0x527C = 0x54C4
+0x527D = 0x54C8
+0x527E = 0x54A8
+0x5321 = 0x54AB
+0x5322 = 0x54C2
+0x5323 = 0x54A4
+0x5324 = 0x54BE
+0x5325 = 0x54BC
+0x5326 = 0x54D8
+0x5327 = 0x54E5
+0x5328 = 0x54E6
+0x5329 = 0x550F
+0x532A = 0x5514
+0x532B = 0x54FD
+0x532C = 0x54EE
+0x532D = 0x54ED
+0x532E = 0x54FA
+0x532F = 0x54E2
+0x5330 = 0x5539
+0x5331 = 0x5540
+0x5332 = 0x5563
+0x5333 = 0x554C
+0x5334 = 0x552E
+0x5335 = 0x555C
+0x5336 = 0x5545
+0x5337 = 0x5556
+0x5338 = 0x5557
+0x5339 = 0x5538
+0x533A = 0x5533
+0x533B = 0x555D
+0x533C = 0x5599
+0x533D = 0x5580
+0x533E = 0x54AF
+0x533F = 0x558A
+0x5340 = 0x559F
+0x5341 = 0x557B
+0x5342 = 0x557E
+0x5343 = 0x5598
+0x5344 = 0x559E
+0x5345 = 0x55AE
+0x5346 = 0x557C
+0x5347 = 0x5583
+0x5348 = 0x55A9
+0x5349 = 0x5587
+0x534A = 0x55A8
+0x534B = 0x55DA
+0x534C = 0x55C5
+0x534D = 0x55DF
+0x534E = 0x55C4
+0x534F = 0x55DC
+0x5350 = 0x55E4
+0x5351 = 0x55D4
+0x5352 = 0x5614
+0x5353 = 0x55F7
+0x5354 = 0x5616
+0x5355 = 0x55FE
+0x5356 = 0x55FD
+0x5357 = 0x561B
+0x5358 = 0x55F9
+0x5359 = 0x564E
+0x535A = 0x5650
+0x535B = 0x71DF
+0x535C = 0x5634
+0x535D = 0x5636
+0x535E = 0x5632
+0x535F = 0x5638
+0x5360 = 0x566B
+0x5361 = 0x5664
+0x5362 = 0x562F
+0x5363 = 0x566C
+0x5364 = 0x566A
+0x5365 = 0x5686
+0x5366 = 0x5680
+0x5367 = 0x568A
+0x5368 = 0x56A0
+0x5369 = 0x5694
+0x536A = 0x568F
+0x536B = 0x56A5
+0x536C = 0x56AE
+0x536D = 0x56B6
+0x536E = 0x56B4
+0x536F = 0x56C2
+0x5370 = 0x56BC
+0x5371 = 0x56C1
+0x5372 = 0x56C3
+0x5373 = 0x56C0
+0x5374 = 0x56C8
+0x5375 = 0x56CE
+0x5376 = 0x56D1
+0x5377 = 0x56D3
+0x5378 = 0x56D7
+0x5379 = 0x56EE
+0x537A = 0x56F9
+0x537B = 0x5700
+0x537C = 0x56FF
+0x537D = 0x5704
+0x537E = 0x5709
+0x5421 = 0x5708
+0x5422 = 0x570B
+0x5423 = 0x570D
+0x5424 = 0x5713
+0x5425 = 0x5718
+0x5426 = 0x5716
+0x5427 = 0x55C7
+0x5428 = 0x571C
+0x5429 = 0x5726
+0x542A = 0x5737
+0x542B = 0x5738
+0x542C = 0x574E
+0x542D = 0x573B
+0x542E = 0x5740
+0x542F = 0x574F
+0x5430 = 0x5769
+0x5431 = 0x57C0
+0x5432 = 0x5788
+0x5433 = 0x5761
+0x5434 = 0x577F
+0x5435 = 0x5789
+0x5436 = 0x5793
+0x5437 = 0x57A0
+0x5438 = 0x57B3
+0x5439 = 0x57A4
+0x543A = 0x57AA
+0x543B = 0x57B0
+0x543C = 0x57C3
+0x543D = 0x57C6
+0x543E = 0x57D4
+0x543F = 0x57D2
+0x5440 = 0x57D3
+0x5441 = 0x580A
+0x5442 = 0x57D6
+0x5443 = 0x57E3
+0x5444 = 0x580B
+0x5445 = 0x5819
+0x5446 = 0x581D
+0x5447 = 0x5872
+0x5448 = 0x5821
+0x5449 = 0x5862
+0x544A = 0x584B
+0x544B = 0x5870
+0x544C = 0x6BC0
+0x544D = 0x5852
+0x544E = 0x583D
+0x544F = 0x5879
+0x5450 = 0x5885
+0x5451 = 0x58B9
+0x5452 = 0x589F
+0x5453 = 0x58AB
+0x5454 = 0x58BA
+0x5455 = 0x58DE
+0x5456 = 0x58BB
+0x5457 = 0x58B8
+0x5458 = 0x58AE
+0x5459 = 0x58C5
+0x545A = 0x58D3
+0x545B = 0x58D1
+0x545C = 0x58D7
+0x545D = 0x58D9
+0x545E = 0x58D8
+0x545F = 0x58E5
+0x5460 = 0x58DC
+0x5461 = 0x58E4
+0x5462 = 0x58DF
+0x5463 = 0x58EF
+0x5464 = 0x58FA
+0x5465 = 0x58F9
+0x5466 = 0x58FB
+0x5467 = 0x58FC
+0x5468 = 0x58FD
+0x5469 = 0x5902
+0x546A = 0x590A
+0x546B = 0x5910
+0x546C = 0x591B
+0x546D = 0x68A6
+0x546E = 0x5925
+0x546F = 0x592C
+0x5470 = 0x592D
+0x5471 = 0x5932
+0x5472 = 0x5938
+0x5473 = 0x593E
+0x5474 = 0x7AD2
+0x5475 = 0x5955
+0x5476 = 0x5950
+0x5477 = 0x594E
+0x5478 = 0x595A
+0x5479 = 0x5958
+0x547A = 0x5962
+0x547B = 0x5960
+0x547C = 0x5967
+0x547D = 0x596C
+0x547E = 0x5969
+0x5521 = 0x5978
+0x5522 = 0x5981
+0x5523 = 0x599D
+0x5524 = 0x4F5E
+0x5525 = 0x4FAB
+0x5526 = 0x59A3
+0x5527 = 0x59B2
+0x5528 = 0x59C6
+0x5529 = 0x59E8
+0x552A = 0x59DC
+0x552B = 0x598D
+0x552C = 0x59D9
+0x552D = 0x59DA
+0x552E = 0x5A25
+0x552F = 0x5A1F
+0x5530 = 0x5A11
+0x5531 = 0x5A1C
+0x5532 = 0x5A09
+0x5533 = 0x5A1A
+0x5534 = 0x5A40
+0x5535 = 0x5A6C
+0x5536 = 0x5A49
+0x5537 = 0x5A35
+0x5538 = 0x5A36
+0x5539 = 0x5A62
+0x553A = 0x5A6A
+0x553B = 0x5A9A
+0x553C = 0x5ABC
+0x553D = 0x5ABE
+0x553E = 0x5ACB
+0x553F = 0x5AC2
+0x5540 = 0x5ABD
+0x5541 = 0x5AE3
+0x5542 = 0x5AD7
+0x5543 = 0x5AE6
+0x5544 = 0x5AE9
+0x5545 = 0x5AD6
+0x5546 = 0x5AFA
+0x5547 = 0x5AFB
+0x5548 = 0x5B0C
+0x5549 = 0x5B0B
+0x554A = 0x5B16
+0x554B = 0x5B32
+0x554C = 0x5AD0
+0x554D = 0x5B2A
+0x554E = 0x5B36
+0x554F = 0x5B3E
+0x5550 = 0x5B43
+0x5551 = 0x5B45
+0x5552 = 0x5B40
+0x5553 = 0x5B51
+0x5554 = 0x5B55
+0x5555 = 0x5B5A
+0x5556 = 0x5B5B
+0x5557 = 0x5B65
+0x5558 = 0x5B69
+0x5559 = 0x5B70
+0x555A = 0x5B73
+0x555B = 0x5B75
+0x555C = 0x5B78
+0x555D = 0x6588
+0x555E = 0x5B7A
+0x555F = 0x5B80
+0x5560 = 0x5B83
+0x5561 = 0x5BA6
+0x5562 = 0x5BB8
+0x5563 = 0x5BC3
+0x5564 = 0x5BC7
+0x5565 = 0x5BC9
+0x5566 = 0x5BD4
+0x5567 = 0x5BD0
+0x5568 = 0x5BE4
+0x5569 = 0x5BE6
+0x556A = 0x5BE2
+0x556B = 0x5BDE
+0x556C = 0x5BE5
+0x556D = 0x5BEB
+0x556E = 0x5BF0
+0x556F = 0x5BF6
+0x5570 = 0x5BF3
+0x5571 = 0x5C05
+0x5572 = 0x5C07
+0x5573 = 0x5C08
+0x5574 = 0x5C0D
+0x5575 = 0x5C13
+0x5576 = 0x5C20
+0x5577 = 0x5C22
+0x5578 = 0x5C28
+0x5579 = 0x5C38
+0x557A = 0x5C39
+0x557B = 0x5C41
+0x557C = 0x5C46
+0x557D = 0x5C4E
+0x557E = 0x5C53
+0x5621 = 0x5C50
+0x5622 = 0x5C4F
+0x5623 = 0x5B71
+0x5624 = 0x5C6C
+0x5625 = 0x5C6E
+0x5626 = 0x4E62
+0x5627 = 0x5C76
+0x5628 = 0x5C79
+0x5629 = 0x5C8C
+0x562A = 0x5C91
+0x562B = 0x5C94
+0x562C = 0x599B
+0x562D = 0x5CAB
+0x562E = 0x5CBB
+0x562F = 0x5CB6
+0x5630 = 0x5CBC
+0x5631 = 0x5CB7
+0x5632 = 0x5CC5
+0x5633 = 0x5CBE
+0x5634 = 0x5CC7
+0x5635 = 0x5CD9
+0x5636 = 0x5CE9
+0x5637 = 0x5CFD
+0x5638 = 0x5CFA
+0x5639 = 0x5CED
+0x563A = 0x5D8C
+0x563B = 0x5CEA
+0x563C = 0x5D0B
+0x563D = 0x5D15
+0x563E = 0x5D17
+0x563F = 0x5D5C
+0x5640 = 0x5D1F
+0x5641 = 0x5D1B
+0x5642 = 0x5D11
+0x5643 = 0x5D14
+0x5644 = 0x5D22
+0x5645 = 0x5D1A
+0x5646 = 0x5D19
+0x5647 = 0x5D18
+0x5648 = 0x5D4C
+0x5649 = 0x5D52
+0x564A = 0x5D4E
+0x564B = 0x5D4B
+0x564C = 0x5D6C
+0x564D = 0x5D73
+0x564E = 0x5D76
+0x564F = 0x5D87
+0x5650 = 0x5D84
+0x5651 = 0x5D82
+0x5652 = 0x5DA2
+0x5653 = 0x5D9D
+0x5654 = 0x5DAC
+0x5655 = 0x5DAE
+0x5656 = 0x5DBD
+0x5657 = 0x5D90
+0x5658 = 0x5DB7
+0x5659 = 0x5DBC
+0x565A = 0x5DC9
+0x565B = 0x5DCD
+0x565C = 0x5DD3
+0x565D = 0x5DD2
+0x565E = 0x5DD6
+0x565F = 0x5DDB
+0x5660 = 0x5DEB
+0x5661 = 0x5DF2
+0x5662 = 0x5DF5
+0x5663 = 0x5E0B
+0x5664 = 0x5E1A
+0x5665 = 0x5E19
+0x5666 = 0x5E11
+0x5667 = 0x5E1B
+0x5668 = 0x5E36
+0x5669 = 0x5E37
+0x566A = 0x5E44
+0x566B = 0x5E43
+0x566C = 0x5E40
+0x566D = 0x5E4E
+0x566E = 0x5E57
+0x566F = 0x5E54
+0x5670 = 0x5E5F
+0x5671 = 0x5E62
+0x5672 = 0x5E64
+0x5673 = 0x5E47
+0x5674 = 0x5E75
+0x5675 = 0x5E76
+0x5676 = 0x5E7A
+0x5677 = 0x9EBC
+0x5678 = 0x5E7F
+0x5679 = 0x5EA0
+0x567A = 0x5EC1
+0x567B = 0x5EC2
+0x567C = 0x5EC8
+0x567D = 0x5ED0
+0x567E = 0x5ECF
+0x5721 = 0x5ED6
+0x5722 = 0x5EE3
+0x5723 = 0x5EDD
+0x5724 = 0x5EDA
+0x5725 = 0x5EDB
+0x5726 = 0x5EE2
+0x5727 = 0x5EE1
+0x5728 = 0x5EE8
+0x5729 = 0x5EE9
+0x572A = 0x5EEC
+0x572B = 0x5EF1
+0x572C = 0x5EF3
+0x572D = 0x5EF0
+0x572E = 0x5EF4
+0x572F = 0x5EF8
+0x5730 = 0x5EFE
+0x5731 = 0x5F03
+0x5732 = 0x5F09
+0x5733 = 0x5F5D
+0x5734 = 0x5F5C
+0x5735 = 0x5F0B
+0x5736 = 0x5F11
+0x5737 = 0x5F16
+0x5738 = 0x5F29
+0x5739 = 0x5F2D
+0x573A = 0x5F38
+0x573B = 0x5F41
+0x573C = 0x5F48
+0x573D = 0x5F4C
+0x573E = 0x5F4E
+0x573F = 0x5F2F
+0x5740 = 0x5F51
+0x5741 = 0x5F56
+0x5742 = 0x5F57
+0x5743 = 0x5F59
+0x5744 = 0x5F61
+0x5745 = 0x5F6D
+0x5746 = 0x5F73
+0x5747 = 0x5F77
+0x5748 = 0x5F83
+0x5749 = 0x5F82
+0x574A = 0x5F7F
+0x574B = 0x5F8A
+0x574C = 0x5F88
+0x574D = 0x5F91
+0x574E = 0x5F87
+0x574F = 0x5F9E
+0x5750 = 0x5F99
+0x5751 = 0x5F98
+0x5752 = 0x5FA0
+0x5753 = 0x5FA8
+0x5754 = 0x5FAD
+0x5755 = 0x5FBC
+0x5756 = 0x5FD6
+0x5757 = 0x5FFB
+0x5758 = 0x5FE4
+0x5759 = 0x5FF8
+0x575A = 0x5FF1
+0x575B = 0x5FDD
+0x575C = 0x60B3
+0x575D = 0x5FFF
+0x575E = 0x6021
+0x575F = 0x6060
+0x5760 = 0x6019
+0x5761 = 0x6010
+0x5762 = 0x6029
+0x5763 = 0x600E
+0x5764 = 0x6031
+0x5765 = 0x601B
+0x5766 = 0x6015
+0x5767 = 0x602B
+0x5768 = 0x6026
+0x5769 = 0x600F
+0x576A = 0x603A
+0x576B = 0x605A
+0x576C = 0x6041
+0x576D = 0x606A
+0x576E = 0x6077
+0x576F = 0x605F
+0x5770 = 0x604A
+0x5771 = 0x6046
+0x5772 = 0x604D
+0x5773 = 0x6063
+0x5774 = 0x6043
+0x5775 = 0x6064
+0x5776 = 0x6042
+0x5777 = 0x606C
+0x5778 = 0x606B
+0x5779 = 0x6059
+0x577A = 0x6081
+0x577B = 0x608D
+0x577C = 0x60E7
+0x577D = 0x6083
+0x577E = 0x609A
+0x5821 = 0x6084
+0x5822 = 0x609B
+0x5823 = 0x6096
+0x5824 = 0x6097
+0x5825 = 0x6092
+0x5826 = 0x60A7
+0x5827 = 0x608B
+0x5828 = 0x60E1
+0x5829 = 0x60B8
+0x582A = 0x60E0
+0x582B = 0x60D3
+0x582C = 0x60B4
+0x582D = 0x5FF0
+0x582E = 0x60BD
+0x582F = 0x60C6
+0x5830 = 0x60B5
+0x5831 = 0x60D8
+0x5832 = 0x614D
+0x5833 = 0x6115
+0x5834 = 0x6106
+0x5835 = 0x60F6
+0x5836 = 0x60F7
+0x5837 = 0x6100
+0x5838 = 0x60F4
+0x5839 = 0x60FA
+0x583A = 0x6103
+0x583B = 0x6121
+0x583C = 0x60FB
+0x583D = 0x60F1
+0x583E = 0x610D
+0x583F = 0x610E
+0x5840 = 0x6147
+0x5841 = 0x613E
+0x5842 = 0x6128
+0x5843 = 0x6127
+0x5844 = 0x614A
+0x5845 = 0x613F
+0x5846 = 0x613C
+0x5847 = 0x612C
+0x5848 = 0x6134
+0x5849 = 0x613D
+0x584A = 0x6142
+0x584B = 0x6144
+0x584C = 0x6173
+0x584D = 0x6177
+0x584E = 0x6158
+0x584F = 0x6159
+0x5850 = 0x615A
+0x5851 = 0x616B
+0x5852 = 0x6174
+0x5853 = 0x616F
+0x5854 = 0x6165
+0x5855 = 0x6171
+0x5856 = 0x615F
+0x5857 = 0x615D
+0x5858 = 0x6153
+0x5859 = 0x6175
+0x585A = 0x6199
+0x585B = 0x6196
+0x585C = 0x6187
+0x585D = 0x61AC
+0x585E = 0x6194
+0x585F = 0x619A
+0x5860 = 0x618A
+0x5861 = 0x6191
+0x5862 = 0x61AB
+0x5863 = 0x61AE
+0x5864 = 0x61CC
+0x5865 = 0x61CA
+0x5866 = 0x61C9
+0x5867 = 0x61F7
+0x5868 = 0x61C8
+0x5869 = 0x61C3
+0x586A = 0x61C6
+0x586B = 0x61BA
+0x586C = 0x61CB
+0x586D = 0x7F79
+0x586E = 0x61CD
+0x586F = 0x61E6
+0x5870 = 0x61E3
+0x5871 = 0x61F6
+0x5872 = 0x61FA
+0x5873 = 0x61F4
+0x5874 = 0x61FF
+0x5875 = 0x61FD
+0x5876 = 0x61FC
+0x5877 = 0x61FE
+0x5878 = 0x6200
+0x5879 = 0x6208
+0x587A = 0x6209
+0x587B = 0x620D
+0x587C = 0x620C
+0x587D = 0x6214
+0x587E = 0x621B
+0x5921 = 0x621E
+0x5922 = 0x6221
+0x5923 = 0x622A
+0x5924 = 0x622E
+0x5925 = 0x6230
+0x5926 = 0x6232
+0x5927 = 0x6233
+0x5928 = 0x6241
+0x5929 = 0x624E
+0x592A = 0x625E
+0x592B = 0x6263
+0x592C = 0x625B
+0x592D = 0x6260
+0x592E = 0x6268
+0x592F = 0x627C
+0x5930 = 0x6282
+0x5931 = 0x6289
+0x5932 = 0x627E
+0x5933 = 0x6292
+0x5934 = 0x6293
+0x5935 = 0x6296
+0x5936 = 0x62D4
+0x5937 = 0x6283
+0x5938 = 0x6294
+0x5939 = 0x62D7
+0x593A = 0x62D1
+0x593B = 0x62BB
+0x593C = 0x62CF
+0x593D = 0x62FF
+0x593E = 0x62C6
+0x593F = 0x64D4
+0x5940 = 0x62C8
+0x5941 = 0x62DC
+0x5942 = 0x62CC
+0x5943 = 0x62CA
+0x5944 = 0x62C2
+0x5945 = 0x62C7
+0x5946 = 0x629B
+0x5947 = 0x62C9
+0x5948 = 0x630C
+0x5949 = 0x62EE
+0x594A = 0x62F1
+0x594B = 0x6327
+0x594C = 0x6302
+0x594D = 0x6308
+0x594E = 0x62EF
+0x594F = 0x62F5
+0x5950 = 0x6350
+0x5951 = 0x633E
+0x5952 = 0x634D
+0x5953 = 0x641C
+0x5954 = 0x634F
+0x5955 = 0x6396
+0x5956 = 0x638E
+0x5957 = 0x6380
+0x5958 = 0x63AB
+0x5959 = 0x6376
+0x595A = 0x63A3
+0x595B = 0x638F
+0x595C = 0x6389
+0x595D = 0x639F
+0x595E = 0x63B5
+0x595F = 0x636B
+0x5960 = 0x6369
+0x5961 = 0x63BE
+0x5962 = 0x63E9
+0x5963 = 0x63C0
+0x5964 = 0x63C6
+0x5965 = 0x63E3
+0x5966 = 0x63C9
+0x5967 = 0x63D2
+0x5968 = 0x63F6
+0x5969 = 0x63C4
+0x596A = 0x6416
+0x596B = 0x6434
+0x596C = 0x6406
+0x596D = 0x6413
+0x596E = 0x6426
+0x596F = 0x6436
+0x5970 = 0x651D
+0x5971 = 0x6417
+0x5972 = 0x6428
+0x5973 = 0x640F
+0x5974 = 0x6467
+0x5975 = 0x646F
+0x5976 = 0x6476
+0x5977 = 0x644E
+0x5978 = 0x652A
+0x5979 = 0x6495
+0x597A = 0x6493
+0x597B = 0x64A5
+0x597C = 0x64A9
+0x597D = 0x6488
+0x597E = 0x64BC
+0x5A21 = 0x64DA
+0x5A22 = 0x64D2
+0x5A23 = 0x64C5
+0x5A24 = 0x64C7
+0x5A25 = 0x64BB
+0x5A26 = 0x64D8
+0x5A27 = 0x64C2
+0x5A28 = 0x64F1
+0x5A29 = 0x64E7
+0x5A2A = 0x8209
+0x5A2B = 0x64E0
+0x5A2C = 0x64E1
+0x5A2D = 0x62AC
+0x5A2E = 0x64E3
+0x5A2F = 0x64EF
+0x5A30 = 0x652C
+0x5A31 = 0x64F6
+0x5A32 = 0x64F4
+0x5A33 = 0x64F2
+0x5A34 = 0x64FA
+0x5A35 = 0x6500
+0x5A36 = 0x64FD
+0x5A37 = 0x6518
+0x5A38 = 0x651C
+0x5A39 = 0x6505
+0x5A3A = 0x6524
+0x5A3B = 0x6523
+0x5A3C = 0x652B
+0x5A3D = 0x6534
+0x5A3E = 0x6535
+0x5A3F = 0x6537
+0x5A40 = 0x6536
+0x5A41 = 0x6538
+0x5A42 = 0x754B
+0x5A43 = 0x6548
+0x5A44 = 0x6556
+0x5A45 = 0x6555
+0x5A46 = 0x654D
+0x5A47 = 0x6558
+0x5A48 = 0x655E
+0x5A49 = 0x655D
+0x5A4A = 0x6572
+0x5A4B = 0x6578
+0x5A4C = 0x6582
+0x5A4D = 0x6583
+0x5A4E = 0x8B8A
+0x5A4F = 0x659B
+0x5A50 = 0x659F
+0x5A51 = 0x65AB
+0x5A52 = 0x65B7
+0x5A53 = 0x65C3
+0x5A54 = 0x65C6
+0x5A55 = 0x65C1
+0x5A56 = 0x65C4
+0x5A57 = 0x65CC
+0x5A58 = 0x65D2
+0x5A59 = 0x65DB
+0x5A5A = 0x65D9
+0x5A5B = 0x65E0
+0x5A5C = 0x65E1
+0x5A5D = 0x65F1
+0x5A5E = 0x6772
+0x5A5F = 0x660A
+0x5A60 = 0x6603
+0x5A61 = 0x65FB
+0x5A62 = 0x6773
+0x5A63 = 0x6635
+0x5A64 = 0x6636
+0x5A65 = 0x6634
+0x5A66 = 0x661C
+0x5A67 = 0x664F
+0x5A68 = 0x6644
+0x5A69 = 0x6649
+0x5A6A = 0x6641
+0x5A6B = 0x665E
+0x5A6C = 0x665D
+0x5A6D = 0x6664
+0x5A6E = 0x6667
+0x5A6F = 0x6668
+0x5A70 = 0x665F
+0x5A71 = 0x6662
+0x5A72 = 0x6670
+0x5A73 = 0x6683
+0x5A74 = 0x6688
+0x5A75 = 0x668E
+0x5A76 = 0x6689
+0x5A77 = 0x6684
+0x5A78 = 0x6698
+0x5A79 = 0x669D
+0x5A7A = 0x66C1
+0x5A7B = 0x66B9
+0x5A7C = 0x66C9
+0x5A7D = 0x66BE
+0x5A7E = 0x66BC
+0x5B21 = 0x66C4
+0x5B22 = 0x66B8
+0x5B23 = 0x66D6
+0x5B24 = 0x66DA
+0x5B25 = 0x66E0
+0x5B26 = 0x663F
+0x5B27 = 0x66E6
+0x5B28 = 0x66E9
+0x5B29 = 0x66F0
+0x5B2A = 0x66F5
+0x5B2B = 0x66F7
+0x5B2C = 0x670F
+0x5B2D = 0x6716
+0x5B2E = 0x671E
+0x5B2F = 0x6726
+0x5B30 = 0x6727
+0x5B31 = 0x9738
+0x5B32 = 0x672E
+0x5B33 = 0x673F
+0x5B34 = 0x6736
+0x5B35 = 0x6741
+0x5B36 = 0x6738
+0x5B37 = 0x6737
+0x5B38 = 0x6746
+0x5B39 = 0x675E
+0x5B3A = 0x6760
+0x5B3B = 0x6759
+0x5B3C = 0x6763
+0x5B3D = 0x6764
+0x5B3E = 0x6789
+0x5B3F = 0x6770
+0x5B40 = 0x67A9
+0x5B41 = 0x677C
+0x5B42 = 0x676A
+0x5B43 = 0x678C
+0x5B44 = 0x678B
+0x5B45 = 0x67A6
+0x5B46 = 0x67A1
+0x5B47 = 0x6785
+0x5B48 = 0x67B7
+0x5B49 = 0x67EF
+0x5B4A = 0x67B4
+0x5B4B = 0x67EC
+0x5B4C = 0x67B3
+0x5B4D = 0x67E9
+0x5B4E = 0x67B8
+0x5B4F = 0x67E4
+0x5B50 = 0x67DE
+0x5B51 = 0x67DD
+0x5B52 = 0x67E2
+0x5B53 = 0x67EE
+0x5B54 = 0x67B9
+0x5B55 = 0x67CE
+0x5B56 = 0x67C6
+0x5B57 = 0x67E7
+0x5B58 = 0x6A9C
+0x5B59 = 0x681E
+0x5B5A = 0x6846
+0x5B5B = 0x6829
+0x5B5C = 0x6840
+0x5B5D = 0x684D
+0x5B5E = 0x6832
+0x5B5F = 0x684E
+0x5B60 = 0x68B3
+0x5B61 = 0x682B
+0x5B62 = 0x6859
+0x5B63 = 0x6863
+0x5B64 = 0x6877
+0x5B65 = 0x687F
+0x5B66 = 0x689F
+0x5B67 = 0x688F
+0x5B68 = 0x68AD
+0x5B69 = 0x6894
+0x5B6A = 0x689D
+0x5B6B = 0x689B
+0x5B6C = 0x6883
+0x5B6D = 0x6AAE
+0x5B6E = 0x68B9
+0x5B6F = 0x6874
+0x5B70 = 0x68B5
+0x5B71 = 0x68A0
+0x5B72 = 0x68BA
+0x5B73 = 0x690F
+0x5B74 = 0x688D
+0x5B75 = 0x687E
+0x5B76 = 0x6901
+0x5B77 = 0x68CA
+0x5B78 = 0x6908
+0x5B79 = 0x68D8
+0x5B7A = 0x6922
+0x5B7B = 0x6926
+0x5B7C = 0x68E1
+0x5B7D = 0x690C
+0x5B7E = 0x68CD
+0x5C21 = 0x68D4
+0x5C22 = 0x68E7
+0x5C23 = 0x68D5
+0x5C24 = 0x6936
+0x5C25 = 0x6912
+0x5C26 = 0x6904
+0x5C27 = 0x68D7
+0x5C28 = 0x68E3
+0x5C29 = 0x6925
+0x5C2A = 0x68F9
+0x5C2B = 0x68E0
+0x5C2C = 0x68EF
+0x5C2D = 0x6928
+0x5C2E = 0x692A
+0x5C2F = 0x691A
+0x5C30 = 0x6923
+0x5C31 = 0x6921
+0x5C32 = 0x68C6
+0x5C33 = 0x6979
+0x5C34 = 0x6977
+0x5C35 = 0x695C
+0x5C36 = 0x6978
+0x5C37 = 0x696B
+0x5C38 = 0x6954
+0x5C39 = 0x697E
+0x5C3A = 0x696E
+0x5C3B = 0x6939
+0x5C3C = 0x6974
+0x5C3D = 0x693D
+0x5C3E = 0x6959
+0x5C3F = 0x6930
+0x5C40 = 0x6961
+0x5C41 = 0x695E
+0x5C42 = 0x695D
+0x5C43 = 0x6981
+0x5C44 = 0x696A
+0x5C45 = 0x69B2
+0x5C46 = 0x69AE
+0x5C47 = 0x69D0
+0x5C48 = 0x69BF
+0x5C49 = 0x69C1
+0x5C4A = 0x69D3
+0x5C4B = 0x69BE
+0x5C4C = 0x69CE
+0x5C4D = 0x5BE8
+0x5C4E = 0x69CA
+0x5C4F = 0x69DD
+0x5C50 = 0x69BB
+0x5C51 = 0x69C3
+0x5C52 = 0x69A7
+0x5C53 = 0x6A2E
+0x5C54 = 0x6991
+0x5C55 = 0x69A0
+0x5C56 = 0x699C
+0x5C57 = 0x6995
+0x5C58 = 0x69B4
+0x5C59 = 0x69DE
+0x5C5A = 0x69E8
+0x5C5B = 0x6A02
+0x5C5C = 0x6A1B
+0x5C5D = 0x69FF
+0x5C5E = 0x6B0A
+0x5C5F = 0x69F9
+0x5C60 = 0x69F2
+0x5C61 = 0x69E7
+0x5C62 = 0x6A05
+0x5C63 = 0x69B1
+0x5C64 = 0x6A1E
+0x5C65 = 0x69ED
+0x5C66 = 0x6A14
+0x5C67 = 0x69EB
+0x5C68 = 0x6A0A
+0x5C69 = 0x6A12
+0x5C6A = 0x6AC1
+0x5C6B = 0x6A23
+0x5C6C = 0x6A13
+0x5C6D = 0x6A44
+0x5C6E = 0x6A0C
+0x5C6F = 0x6A72
+0x5C70 = 0x6A36
+0x5C71 = 0x6A78
+0x5C72 = 0x6A47
+0x5C73 = 0x6A62
+0x5C74 = 0x6A59
+0x5C75 = 0x6A66
+0x5C76 = 0x6A48
+0x5C77 = 0x6A38
+0x5C78 = 0x6A22
+0x5C79 = 0x6A90
+0x5C7A = 0x6A8D
+0x5C7B = 0x6AA0
+0x5C7C = 0x6A84
+0x5C7D = 0x6AA2
+0x5C7E = 0x6AA3
+0x5D21 = 0x6A97
+0x5D22 = 0x8617
+0x5D23 = 0x6ABB
+0x5D24 = 0x6AC3
+0x5D25 = 0x6AC2
+0x5D26 = 0x6AB8
+0x5D27 = 0x6AB3
+0x5D28 = 0x6AAC
+0x5D29 = 0x6ADE
+0x5D2A = 0x6AD1
+0x5D2B = 0x6ADF
+0x5D2C = 0x6AAA
+0x5D2D = 0x6ADA
+0x5D2E = 0x6AEA
+0x5D2F = 0x6AFB
+0x5D30 = 0x6B05
+0x5D31 = 0x8616
+0x5D32 = 0x6AFA
+0x5D33 = 0x6B12
+0x5D34 = 0x6B16
+0x5D35 = 0x9B31
+0x5D36 = 0x6B1F
+0x5D37 = 0x6B38
+0x5D38 = 0x6B37
+0x5D39 = 0x76DC
+0x5D3A = 0x6B39
+0x5D3B = 0x98EE
+0x5D3C = 0x6B47
+0x5D3D = 0x6B43
+0x5D3E = 0x6B49
+0x5D3F = 0x6B50
+0x5D40 = 0x6B59
+0x5D41 = 0x6B54
+0x5D42 = 0x6B5B
+0x5D43 = 0x6B5F
+0x5D44 = 0x6B61
+0x5D45 = 0x6B78
+0x5D46 = 0x6B79
+0x5D47 = 0x6B7F
+0x5D48 = 0x6B80
+0x5D49 = 0x6B84
+0x5D4A = 0x6B83
+0x5D4B = 0x6B8D
+0x5D4C = 0x6B98
+0x5D4D = 0x6B95
+0x5D4E = 0x6B9E
+0x5D4F = 0x6BA4
+0x5D50 = 0x6BAA
+0x5D51 = 0x6BAB
+0x5D52 = 0x6BAF
+0x5D53 = 0x6BB2
+0x5D54 = 0x6BB1
+0x5D55 = 0x6BB3
+0x5D56 = 0x6BB7
+0x5D57 = 0x6BBC
+0x5D58 = 0x6BC6
+0x5D59 = 0x6BCB
+0x5D5A = 0x6BD3
+0x5D5B = 0x6BDF
+0x5D5C = 0x6BEC
+0x5D5D = 0x6BEB
+0x5D5E = 0x6BF3
+0x5D5F = 0x6BEF
+0x5D60 = 0x9EBE
+0x5D61 = 0x6C08
+0x5D62 = 0x6C13
+0x5D63 = 0x6C14
+0x5D64 = 0x6C1B
+0x5D65 = 0x6C24
+0x5D66 = 0x6C23
+0x5D67 = 0x6C5E
+0x5D68 = 0x6C55
+0x5D69 = 0x6C62
+0x5D6A = 0x6C6A
+0x5D6B = 0x6C82
+0x5D6C = 0x6C8D
+0x5D6D = 0x6C9A
+0x5D6E = 0x6C81
+0x5D6F = 0x6C9B
+0x5D70 = 0x6C7E
+0x5D71 = 0x6C68
+0x5D72 = 0x6C73
+0x5D73 = 0x6C92
+0x5D74 = 0x6C90
+0x5D75 = 0x6CC4
+0x5D76 = 0x6CF1
+0x5D77 = 0x6CD3
+0x5D78 = 0x6CBD
+0x5D79 = 0x6CD7
+0x5D7A = 0x6CC5
+0x5D7B = 0x6CDD
+0x5D7C = 0x6CAE
+0x5D7D = 0x6CB1
+0x5D7E = 0x6CBE
+0x5E21 = 0x6CBA
+0x5E22 = 0x6CDB
+0x5E23 = 0x6CEF
+0x5E24 = 0x6CD9
+0x5E25 = 0x6CEA
+0x5E26 = 0x6D1F
+0x5E27 = 0x884D
+0x5E28 = 0x6D36
+0x5E29 = 0x6D2B
+0x5E2A = 0x6D3D
+0x5E2B = 0x6D38
+0x5E2C = 0x6D19
+0x5E2D = 0x6D35
+0x5E2E = 0x6D33
+0x5E2F = 0x6D12
+0x5E30 = 0x6D0C
+0x5E31 = 0x6D63
+0x5E32 = 0x6D93
+0x5E33 = 0x6D64
+0x5E34 = 0x6D5A
+0x5E35 = 0x6D79
+0x5E36 = 0x6D59
+0x5E37 = 0x6D8E
+0x5E38 = 0x6D95
+0x5E39 = 0x6FE4
+0x5E3A = 0x6D85
+0x5E3B = 0x6DF9
+0x5E3C = 0x6E15
+0x5E3D = 0x6E0A
+0x5E3E = 0x6DB5
+0x5E3F = 0x6DC7
+0x5E40 = 0x6DE6
+0x5E41 = 0x6DB8
+0x5E42 = 0x6DC6
+0x5E43 = 0x6DEC
+0x5E44 = 0x6DDE
+0x5E45 = 0x6DCC
+0x5E46 = 0x6DE8
+0x5E47 = 0x6DD2
+0x5E48 = 0x6DC5
+0x5E49 = 0x6DFA
+0x5E4A = 0x6DD9
+0x5E4B = 0x6DE4
+0x5E4C = 0x6DD5
+0x5E4D = 0x6DEA
+0x5E4E = 0x6DEE
+0x5E4F = 0x6E2D
+0x5E50 = 0x6E6E
+0x5E51 = 0x6E2E
+0x5E52 = 0x6E19
+0x5E53 = 0x6E72
+0x5E54 = 0x6E5F
+0x5E55 = 0x6E3E
+0x5E56 = 0x6E23
+0x5E57 = 0x6E6B
+0x5E58 = 0x6E2B
+0x5E59 = 0x6E76
+0x5E5A = 0x6E4D
+0x5E5B = 0x6E1F
+0x5E5C = 0x6E43
+0x5E5D = 0x6E3A
+0x5E5E = 0x6E4E
+0x5E5F = 0x6E24
+0x5E60 = 0x6EFF
+0x5E61 = 0x6E1D
+0x5E62 = 0x6E38
+0x5E63 = 0x6E82
+0x5E64 = 0x6EAA
+0x5E65 = 0x6E98
+0x5E66 = 0x6EC9
+0x5E67 = 0x6EB7
+0x5E68 = 0x6ED3
+0x5E69 = 0x6EBD
+0x5E6A = 0x6EAF
+0x5E6B = 0x6EC4
+0x5E6C = 0x6EB2
+0x5E6D = 0x6ED4
+0x5E6E = 0x6ED5
+0x5E6F = 0x6E8F
+0x5E70 = 0x6EA5
+0x5E71 = 0x6EC2
+0x5E72 = 0x6E9F
+0x5E73 = 0x6F41
+0x5E74 = 0x6F11
+0x5E75 = 0x704C
+0x5E76 = 0x6EEC
+0x5E77 = 0x6EF8
+0x5E78 = 0x6EFE
+0x5E79 = 0x6F3F
+0x5E7A = 0x6EF2
+0x5E7B = 0x6F31
+0x5E7C = 0x6EEF
+0x5E7D = 0x6F32
+0x5E7E = 0x6ECC
+0x5F21 = 0x6F3E
+0x5F22 = 0x6F13
+0x5F23 = 0x6EF7
+0x5F24 = 0x6F86
+0x5F25 = 0x6F7A
+0x5F26 = 0x6F78
+0x5F27 = 0x6F81
+0x5F28 = 0x6F80
+0x5F29 = 0x6F6F
+0x5F2A = 0x6F5B
+0x5F2B = 0x6FF3
+0x5F2C = 0x6F6D
+0x5F2D = 0x6F82
+0x5F2E = 0x6F7C
+0x5F2F = 0x6F58
+0x5F30 = 0x6F8E
+0x5F31 = 0x6F91
+0x5F32 = 0x6FC2
+0x5F33 = 0x6F66
+0x5F34 = 0x6FB3
+0x5F35 = 0x6FA3
+0x5F36 = 0x6FA1
+0x5F37 = 0x6FA4
+0x5F38 = 0x6FB9
+0x5F39 = 0x6FC6
+0x5F3A = 0x6FAA
+0x5F3B = 0x6FDF
+0x5F3C = 0x6FD5
+0x5F3D = 0x6FEC
+0x5F3E = 0x6FD4
+0x5F3F = 0x6FD8
+0x5F40 = 0x6FF1
+0x5F41 = 0x6FEE
+0x5F42 = 0x6FDB
+0x5F43 = 0x7009
+0x5F44 = 0x700B
+0x5F45 = 0x6FFA
+0x5F46 = 0x7011
+0x5F47 = 0x7001
+0x5F48 = 0x700F
+0x5F49 = 0x6FFE
+0x5F4A = 0x701B
+0x5F4B = 0x701A
+0x5F4C = 0x6F74
+0x5F4D = 0x701D
+0x5F4E = 0x7018
+0x5F4F = 0x701F
+0x5F50 = 0x7030
+0x5F51 = 0x703E
+0x5F52 = 0x7032
+0x5F53 = 0x7051
+0x5F54 = 0x7063
+0x5F55 = 0x7099
+0x5F56 = 0x7092
+0x5F57 = 0x70AF
+0x5F58 = 0x70F1
+0x5F59 = 0x70AC
+0x5F5A = 0x70B8
+0x5F5B = 0x70B3
+0x5F5C = 0x70AE
+0x5F5D = 0x70DF
+0x5F5E = 0x70CB
+0x5F5F = 0x70DD
+0x5F60 = 0x70D9
+0x5F61 = 0x7109
+0x5F62 = 0x70FD
+0x5F63 = 0x711C
+0x5F64 = 0x7119
+0x5F65 = 0x7165
+0x5F66 = 0x7155
+0x5F67 = 0x7188
+0x5F68 = 0x7166
+0x5F69 = 0x7162
+0x5F6A = 0x714C
+0x5F6B = 0x7156
+0x5F6C = 0x716C
+0x5F6D = 0x718F
+0x5F6E = 0x71FB
+0x5F6F = 0x7184
+0x5F70 = 0x7195
+0x5F71 = 0x71A8
+0x5F72 = 0x71AC
+0x5F73 = 0x71D7
+0x5F74 = 0x71B9
+0x5F75 = 0x71BE
+0x5F76 = 0x71D2
+0x5F77 = 0x71C9
+0x5F78 = 0x71D4
+0x5F79 = 0x71CE
+0x5F7A = 0x71E0
+0x5F7B = 0x71EC
+0x5F7C = 0x71E7
+0x5F7D = 0x71F5
+0x5F7E = 0x71FC
+0x6021 = 0x71F9
+0x6022 = 0x71FF
+0x6023 = 0x720D
+0x6024 = 0x7210
+0x6025 = 0x721B
+0x6026 = 0x7228
+0x6027 = 0x722D
+0x6028 = 0x722C
+0x6029 = 0x7230
+0x602A = 0x7232
+0x602B = 0x723B
+0x602C = 0x723C
+0x602D = 0x723F
+0x602E = 0x7240
+0x602F = 0x7246
+0x6030 = 0x724B
+0x6031 = 0x7258
+0x6032 = 0x7274
+0x6033 = 0x727E
+0x6034 = 0x7282
+0x6035 = 0x7281
+0x6036 = 0x7287
+0x6037 = 0x7292
+0x6038 = 0x7296
+0x6039 = 0x72A2
+0x603A = 0x72A7
+0x603B = 0x72B9
+0x603C = 0x72B2
+0x603D = 0x72C3
+0x603E = 0x72C6
+0x603F = 0x72C4
+0x6040 = 0x72CE
+0x6041 = 0x72D2
+0x6042 = 0x72E2
+0x6043 = 0x72E0
+0x6044 = 0x72E1
+0x6045 = 0x72F9
+0x6046 = 0x72F7
+0x6047 = 0x500F
+0x6048 = 0x7317
+0x6049 = 0x730A
+0x604A = 0x731C
+0x604B = 0x7316
+0x604C = 0x731D
+0x604D = 0x7334
+0x604E = 0x732F
+0x604F = 0x7329
+0x6050 = 0x7325
+0x6051 = 0x733E
+0x6052 = 0x734E
+0x6053 = 0x734F
+0x6054 = 0x9ED8
+0x6055 = 0x7357
+0x6056 = 0x736A
+0x6057 = 0x7368
+0x6058 = 0x7370
+0x6059 = 0x7378
+0x605A = 0x7375
+0x605B = 0x737B
+0x605C = 0x737A
+0x605D = 0x73C8
+0x605E = 0x73B3
+0x605F = 0x73CE
+0x6060 = 0x73BB
+0x6061 = 0x73C0
+0x6062 = 0x73E5
+0x6063 = 0x73EE
+0x6064 = 0x73DE
+0x6065 = 0x74A2
+0x6066 = 0x7405
+0x6067 = 0x746F
+0x6068 = 0x7425
+0x6069 = 0x73F8
+0x606A = 0x7432
+0x606B = 0x743A
+0x606C = 0x7455
+0x606D = 0x743F
+0x606E = 0x745F
+0x606F = 0x7459
+0x6070 = 0x7441
+0x6071 = 0x745C
+0x6072 = 0x7469
+0x6073 = 0x7470
+0x6074 = 0x7463
+0x6075 = 0x746A
+0x6076 = 0x7476
+0x6077 = 0x747E
+0x6078 = 0x748B
+0x6079 = 0x749E
+0x607A = 0x74A7
+0x607B = 0x74CA
+0x607C = 0x74CF
+0x607D = 0x74D4
+0x607E = 0x73F1
+0x6121 = 0x74E0
+0x6122 = 0x74E3
+0x6123 = 0x74E7
+0x6124 = 0x74E9
+0x6125 = 0x74EE
+0x6126 = 0x74F2
+0x6127 = 0x74F0
+0x6128 = 0x74F1
+0x6129 = 0x74F8
+0x612A = 0x74F7
+0x612B = 0x7504
+0x612C = 0x7503
+0x612D = 0x7505
+0x612E = 0x750C
+0x612F = 0x750E
+0x6130 = 0x750D
+0x6131 = 0x7515
+0x6132 = 0x7513
+0x6133 = 0x751E
+0x6134 = 0x7526
+0x6135 = 0x752C
+0x6136 = 0x753C
+0x6137 = 0x7544
+0x6138 = 0x754D
+0x6139 = 0x754A
+0x613A = 0x7549
+0x613B = 0x755B
+0x613C = 0x7546
+0x613D = 0x755A
+0x613E = 0x7569
+0x613F = 0x7564
+0x6140 = 0x7567
+0x6141 = 0x756B
+0x6142 = 0x756D
+0x6143 = 0x7578
+0x6144 = 0x7576
+0x6145 = 0x7586
+0x6146 = 0x7587
+0x6147 = 0x7574
+0x6148 = 0x758A
+0x6149 = 0x7589
+0x614A = 0x7582
+0x614B = 0x7594
+0x614C = 0x759A
+0x614D = 0x759D
+0x614E = 0x75A5
+0x614F = 0x75A3
+0x6150 = 0x75C2
+0x6151 = 0x75B3
+0x6152 = 0x75C3
+0x6153 = 0x75B5
+0x6154 = 0x75BD
+0x6155 = 0x75B8
+0x6156 = 0x75BC
+0x6157 = 0x75B1
+0x6158 = 0x75CD
+0x6159 = 0x75CA
+0x615A = 0x75D2
+0x615B = 0x75D9
+0x615C = 0x75E3
+0x615D = 0x75DE
+0x615E = 0x75FE
+0x615F = 0x75FF
+0x6160 = 0x75FC
+0x6161 = 0x7601
+0x6162 = 0x75F0
+0x6163 = 0x75FA
+0x6164 = 0x75F2
+0x6165 = 0x75F3
+0x6166 = 0x760B
+0x6167 = 0x760D
+0x6168 = 0x7609
+0x6169 = 0x761F
+0x616A = 0x7627
+0x616B = 0x7620
+0x616C = 0x7621
+0x616D = 0x7622
+0x616E = 0x7624
+0x616F = 0x7634
+0x6170 = 0x7630
+0x6171 = 0x763B
+0x6172 = 0x7647
+0x6173 = 0x7648
+0x6174 = 0x7646
+0x6175 = 0x765C
+0x6176 = 0x7658
+0x6177 = 0x7661
+0x6178 = 0x7662
+0x6179 = 0x7668
+0x617A = 0x7669
+0x617B = 0x766A
+0x617C = 0x7667
+0x617D = 0x766C
+0x617E = 0x7670
+0x6221 = 0x7672
+0x6222 = 0x7676
+0x6223 = 0x7678
+0x6224 = 0x767C
+0x6225 = 0x7680
+0x6226 = 0x7683
+0x6227 = 0x7688
+0x6228 = 0x768B
+0x6229 = 0x768E
+0x622A = 0x7696
+0x622B = 0x7693
+0x622C = 0x7699
+0x622D = 0x769A
+0x622E = 0x76B0
+0x622F = 0x76B4
+0x6230 = 0x76B8
+0x6231 = 0x76B9
+0x6232 = 0x76BA
+0x6233 = 0x76C2
+0x6234 = 0x76CD
+0x6235 = 0x76D6
+0x6236 = 0x76D2
+0x6237 = 0x76DE
+0x6238 = 0x76E1
+0x6239 = 0x76E5
+0x623A = 0x76E7
+0x623B = 0x76EA
+0x623C = 0x862F
+0x623D = 0x76FB
+0x623E = 0x7708
+0x623F = 0x7707
+0x6240 = 0x7704
+0x6241 = 0x7729
+0x6242 = 0x7724
+0x6243 = 0x771E
+0x6244 = 0x7725
+0x6245 = 0x7726
+0x6246 = 0x771B
+0x6247 = 0x7737
+0x6248 = 0x7738
+0x6249 = 0x7747
+0x624A = 0x775A
+0x624B = 0x7768
+0x624C = 0x776B
+0x624D = 0x775B
+0x624E = 0x7765
+0x624F = 0x777F
+0x6250 = 0x777E
+0x6251 = 0x7779
+0x6252 = 0x778E
+0x6253 = 0x778B
+0x6254 = 0x7791
+0x6255 = 0x77A0
+0x6256 = 0x779E
+0x6257 = 0x77B0
+0x6258 = 0x77B6
+0x6259 = 0x77B9
+0x625A = 0x77BF
+0x625B = 0x77BC
+0x625C = 0x77BD
+0x625D = 0x77BB
+0x625E = 0x77C7
+0x625F = 0x77CD
+0x6260 = 0x77D7
+0x6261 = 0x77DA
+0x6262 = 0x77DC
+0x6263 = 0x77E3
+0x6264 = 0x77EE
+0x6265 = 0x77FC
+0x6266 = 0x780C
+0x6267 = 0x7812
+0x6268 = 0x7926
+0x6269 = 0x7820
+0x626A = 0x792A
+0x626B = 0x7845
+0x626C = 0x788E
+0x626D = 0x7874
+0x626E = 0x7886
+0x626F = 0x787C
+0x6270 = 0x789A
+0x6271 = 0x788C
+0x6272 = 0x78A3
+0x6273 = 0x78B5
+0x6274 = 0x78AA
+0x6275 = 0x78AF
+0x6276 = 0x78D1
+0x6277 = 0x78C6
+0x6278 = 0x78CB
+0x6279 = 0x78D4
+0x627A = 0x78BE
+0x627B = 0x78BC
+0x627C = 0x78C5
+0x627D = 0x78CA
+0x627E = 0x78EC
+0x6321 = 0x78E7
+0x6322 = 0x78DA
+0x6323 = 0x78FD
+0x6324 = 0x78F4
+0x6325 = 0x7907
+0x6326 = 0x7912
+0x6327 = 0x7911
+0x6328 = 0x7919
+0x6329 = 0x792C
+0x632A = 0x792B
+0x632B = 0x7940
+0x632C = 0x7960
+0x632D = 0x7957
+0x632E = 0x795F
+0x632F = 0x795A
+0x6330 = 0x7955
+0x6331 = 0x7953
+0x6332 = 0x797A
+0x6333 = 0x797F
+0x6334 = 0x798A
+0x6335 = 0x799D
+0x6336 = 0x79A7
+0x6337 = 0x9F4B
+0x6338 = 0x79AA
+0x6339 = 0x79AE
+0x633A = 0x79B3
+0x633B = 0x79B9
+0x633C = 0x79BA
+0x633D = 0x79C9
+0x633E = 0x79D5
+0x633F = 0x79E7
+0x6340 = 0x79EC
+0x6341 = 0x79E1
+0x6342 = 0x79E3
+0x6343 = 0x7A08
+0x6344 = 0x7A0D
+0x6345 = 0x7A18
+0x6346 = 0x7A19
+0x6347 = 0x7A20
+0x6348 = 0x7A1F
+0x6349 = 0x7980
+0x634A = 0x7A31
+0x634B = 0x7A3B
+0x634C = 0x7A3E
+0x634D = 0x7A37
+0x634E = 0x7A43
+0x634F = 0x7A57
+0x6350 = 0x7A49
+0x6351 = 0x7A61
+0x6352 = 0x7A62
+0x6353 = 0x7A69
+0x6354 = 0x9F9D
+0x6355 = 0x7A70
+0x6356 = 0x7A79
+0x6357 = 0x7A7D
+0x6358 = 0x7A88
+0x6359 = 0x7A97
+0x635A = 0x7A95
+0x635B = 0x7A98
+0x635C = 0x7A96
+0x635D = 0x7AA9
+0x635E = 0x7AC8
+0x635F = 0x7AB0
+0x6360 = 0x7AB6
+0x6361 = 0x7AC5
+0x6362 = 0x7AC4
+0x6363 = 0x7ABF
+0x6364 = 0x9083
+0x6365 = 0x7AC7
+0x6366 = 0x7ACA
+0x6367 = 0x7ACD
+0x6368 = 0x7ACF
+0x6369 = 0x7AD5
+0x636A = 0x7AD3
+0x636B = 0x7AD9
+0x636C = 0x7ADA
+0x636D = 0x7ADD
+0x636E = 0x7AE1
+0x636F = 0x7AE2
+0x6370 = 0x7AE6
+0x6371 = 0x7AED
+0x6372 = 0x7AF0
+0x6373 = 0x7B02
+0x6374 = 0x7B0F
+0x6375 = 0x7B0A
+0x6376 = 0x7B06
+0x6377 = 0x7B33
+0x6378 = 0x7B18
+0x6379 = 0x7B19
+0x637A = 0x7B1E
+0x637B = 0x7B35
+0x637C = 0x7B28
+0x637D = 0x7B36
+0x637E = 0x7B50
+0x6421 = 0x7B7A
+0x6422 = 0x7B04
+0x6423 = 0x7B4D
+0x6424 = 0x7B0B
+0x6425 = 0x7B4C
+0x6426 = 0x7B45
+0x6427 = 0x7B75
+0x6428 = 0x7B65
+0x6429 = 0x7B74
+0x642A = 0x7B67
+0x642B = 0x7B70
+0x642C = 0x7B71
+0x642D = 0x7B6C
+0x642E = 0x7B6E
+0x642F = 0x7B9D
+0x6430 = 0x7B98
+0x6431 = 0x7B9F
+0x6432 = 0x7B8D
+0x6433 = 0x7B9C
+0x6434 = 0x7B9A
+0x6435 = 0x7B8B
+0x6436 = 0x7B92
+0x6437 = 0x7B8F
+0x6438 = 0x7B5D
+0x6439 = 0x7B99
+0x643A = 0x7BCB
+0x643B = 0x7BC1
+0x643C = 0x7BCC
+0x643D = 0x7BCF
+0x643E = 0x7BB4
+0x643F = 0x7BC6
+0x6440 = 0x7BDD
+0x6441 = 0x7BE9
+0x6442 = 0x7C11
+0x6443 = 0x7C14
+0x6444 = 0x7BE6
+0x6445 = 0x7BE5
+0x6446 = 0x7C60
+0x6447 = 0x7C00
+0x6448 = 0x7C07
+0x6449 = 0x7C13
+0x644A = 0x7BF3
+0x644B = 0x7BF7
+0x644C = 0x7C17
+0x644D = 0x7C0D
+0x644E = 0x7BF6
+0x644F = 0x7C23
+0x6450 = 0x7C27
+0x6451 = 0x7C2A
+0x6452 = 0x7C1F
+0x6453 = 0x7C37
+0x6454 = 0x7C2B
+0x6455 = 0x7C3D
+0x6456 = 0x7C4C
+0x6457 = 0x7C43
+0x6458 = 0x7C54
+0x6459 = 0x7C4F
+0x645A = 0x7C40
+0x645B = 0x7C50
+0x645C = 0x7C58
+0x645D = 0x7C5F
+0x645E = 0x7C64
+0x645F = 0x7C56
+0x6460 = 0x7C65
+0x6461 = 0x7C6C
+0x6462 = 0x7C75
+0x6463 = 0x7C83
+0x6464 = 0x7C90
+0x6465 = 0x7CA4
+0x6466 = 0x7CAD
+0x6467 = 0x7CA2
+0x6468 = 0x7CAB
+0x6469 = 0x7CA1
+0x646A = 0x7CA8
+0x646B = 0x7CB3
+0x646C = 0x7CB2
+0x646D = 0x7CB1
+0x646E = 0x7CAE
+0x646F = 0x7CB9
+0x6470 = 0x7CBD
+0x6471 = 0x7CC0
+0x6472 = 0x7CC5
+0x6473 = 0x7CC2
+0x6474 = 0x7CD8
+0x6475 = 0x7CD2
+0x6476 = 0x7CDC
+0x6477 = 0x7CE2
+0x6478 = 0x9B3B
+0x6479 = 0x7CEF
+0x647A = 0x7CF2
+0x647B = 0x7CF4
+0x647C = 0x7CF6
+0x647D = 0x7CFA
+0x647E = 0x7D06
+0x6521 = 0x7D02
+0x6522 = 0x7D1C
+0x6523 = 0x7D15
+0x6524 = 0x7D0A
+0x6525 = 0x7D45
+0x6526 = 0x7D4B
+0x6527 = 0x7D2E
+0x6528 = 0x7D32
+0x6529 = 0x7D3F
+0x652A = 0x7D35
+0x652B = 0x7D46
+0x652C = 0x7D73
+0x652D = 0x7D56
+0x652E = 0x7D4E
+0x652F = 0x7D72
+0x6530 = 0x7D68
+0x6531 = 0x7D6E
+0x6532 = 0x7D4F
+0x6533 = 0x7D63
+0x6534 = 0x7D93
+0x6535 = 0x7D89
+0x6536 = 0x7D5B
+0x6537 = 0x7D8F
+0x6538 = 0x7D7D
+0x6539 = 0x7D9B
+0x653A = 0x7DBA
+0x653B = 0x7DAE
+0x653C = 0x7DA3
+0x653D = 0x7DB5
+0x653E = 0x7DC7
+0x653F = 0x7DBD
+0x6540 = 0x7DAB
+0x6541 = 0x7E3D
+0x6542 = 0x7DA2
+0x6543 = 0x7DAF
+0x6544 = 0x7DDC
+0x6545 = 0x7DB8
+0x6546 = 0x7D9F
+0x6547 = 0x7DB0
+0x6548 = 0x7DD8
+0x6549 = 0x7DDD
+0x654A = 0x7DE4
+0x654B = 0x7DDE
+0x654C = 0x7DFB
+0x654D = 0x7DF2
+0x654E = 0x7DE1
+0x654F = 0x7E05
+0x6550 = 0x7E0A
+0x6551 = 0x7E23
+0x6552 = 0x7E21
+0x6553 = 0x7E12
+0x6554 = 0x7E31
+0x6555 = 0x7E1F
+0x6556 = 0x7E09
+0x6557 = 0x7E0B
+0x6558 = 0x7E22
+0x6559 = 0x7E46
+0x655A = 0x7E66
+0x655B = 0x7E3B
+0x655C = 0x7E35
+0x655D = 0x7E39
+0x655E = 0x7E43
+0x655F = 0x7E37
+0x6560 = 0x7E32
+0x6561 = 0x7E3A
+0x6562 = 0x7E67
+0x6563 = 0x7E5D
+0x6564 = 0x7E56
+0x6565 = 0x7E5E
+0x6566 = 0x7E59
+0x6567 = 0x7E5A
+0x6568 = 0x7E79
+0x6569 = 0x7E6A
+0x656A = 0x7E69
+0x656B = 0x7E7C
+0x656C = 0x7E7B
+0x656D = 0x7E83
+0x656E = 0x7DD5
+0x656F = 0x7E7D
+0x6570 = 0x8FAE
+0x6571 = 0x7E7F
+0x6572 = 0x7E88
+0x6573 = 0x7E89
+0x6574 = 0x7E8C
+0x6575 = 0x7E92
+0x6576 = 0x7E90
+0x6577 = 0x7E93
+0x6578 = 0x7E94
+0x6579 = 0x7E96
+0x657A = 0x7E8E
+0x657B = 0x7E9B
+0x657C = 0x7E9C
+0x657D = 0x7F38
+0x657E = 0x7F3A
+0x6621 = 0x7F45
+0x6622 = 0x7F4C
+0x6623 = 0x7F4D
+0x6624 = 0x7F4E
+0x6625 = 0x7F50
+0x6626 = 0x7F51
+0x6627 = 0x7F55
+0x6628 = 0x7F54
+0x6629 = 0x7F58
+0x662A = 0x7F5F
+0x662B = 0x7F60
+0x662C = 0x7F68
+0x662D = 0x7F69
+0x662E = 0x7F67
+0x662F = 0x7F78
+0x6630 = 0x7F82
+0x6631 = 0x7F86
+0x6632 = 0x7F83
+0x6633 = 0x7F88
+0x6634 = 0x7F87
+0x6635 = 0x7F8C
+0x6636 = 0x7F94
+0x6637 = 0x7F9E
+0x6638 = 0x7F9D
+0x6639 = 0x7F9A
+0x663A = 0x7FA3
+0x663B = 0x7FAF
+0x663C = 0x7FB2
+0x663D = 0x7FB9
+0x663E = 0x7FAE
+0x663F = 0x7FB6
+0x6640 = 0x7FB8
+0x6641 = 0x8B71
+0x6642 = 0x7FC5
+0x6643 = 0x7FC6
+0x6644 = 0x7FCA
+0x6645 = 0x7FD5
+0x6646 = 0x7FD4
+0x6647 = 0x7FE1
+0x6648 = 0x7FE6
+0x6649 = 0x7FE9
+0x664A = 0x7FF3
+0x664B = 0x7FF9
+0x664C = 0x98DC
+0x664D = 0x8006
+0x664E = 0x8004
+0x664F = 0x800B
+0x6650 = 0x8012
+0x6651 = 0x8018
+0x6652 = 0x8019
+0x6653 = 0x801C
+0x6654 = 0x8021
+0x6655 = 0x8028
+0x6656 = 0x803F
+0x6657 = 0x803B
+0x6658 = 0x804A
+0x6659 = 0x8046
+0x665A = 0x8052
+0x665B = 0x8058
+0x665C = 0x805A
+0x665D = 0x805F
+0x665E = 0x8062
+0x665F = 0x8068
+0x6660 = 0x8073
+0x6661 = 0x8072
+0x6662 = 0x8070
+0x6663 = 0x8076
+0x6664 = 0x8079
+0x6665 = 0x807D
+0x6666 = 0x807F
+0x6667 = 0x8084
+0x6668 = 0x8086
+0x6669 = 0x8085
+0x666A = 0x809B
+0x666B = 0x8093
+0x666C = 0x809A
+0x666D = 0x80AD
+0x666E = 0x5190
+0x666F = 0x80AC
+0x6670 = 0x80DB
+0x6671 = 0x80E5
+0x6672 = 0x80D9
+0x6673 = 0x80DD
+0x6674 = 0x80C4
+0x6675 = 0x80DA
+0x6676 = 0x80D6
+0x6677 = 0x8109
+0x6678 = 0x80EF
+0x6679 = 0x80F1
+0x667A = 0x811B
+0x667B = 0x8129
+0x667C = 0x8123
+0x667D = 0x812F
+0x667E = 0x814B
+0x6721 = 0x968B
+0x6722 = 0x8146
+0x6723 = 0x813E
+0x6724 = 0x8153
+0x6725 = 0x8151
+0x6726 = 0x80FC
+0x6727 = 0x8171
+0x6728 = 0x816E
+0x6729 = 0x8165
+0x672A = 0x8166
+0x672B = 0x8174
+0x672C = 0x8183
+0x672D = 0x8188
+0x672E = 0x818A
+0x672F = 0x8180
+0x6730 = 0x8182
+0x6731 = 0x81A0
+0x6732 = 0x8195
+0x6733 = 0x81A4
+0x6734 = 0x81A3
+0x6735 = 0x815F
+0x6736 = 0x8193
+0x6737 = 0x81A9
+0x6738 = 0x81B0
+0x6739 = 0x81B5
+0x673A = 0x81BE
+0x673B = 0x81B8
+0x673C = 0x81BD
+0x673D = 0x81C0
+0x673E = 0x81C2
+0x673F = 0x81BA
+0x6740 = 0x81C9
+0x6741 = 0x81CD
+0x6742 = 0x81D1
+0x6743 = 0x81D9
+0x6744 = 0x81D8
+0x6745 = 0x81C8
+0x6746 = 0x81DA
+0x6747 = 0x81DF
+0x6748 = 0x81E0
+0x6749 = 0x81E7
+0x674A = 0x81FA
+0x674B = 0x81FB
+0x674C = 0x81FE
+0x674D = 0x8201
+0x674E = 0x8202
+0x674F = 0x8205
+0x6750 = 0x8207
+0x6751 = 0x820A
+0x6752 = 0x820D
+0x6753 = 0x8210
+0x6754 = 0x8216
+0x6755 = 0x8229
+0x6756 = 0x822B
+0x6757 = 0x8238
+0x6758 = 0x8233
+0x6759 = 0x8240
+0x675A = 0x8259
+0x675B = 0x8258
+0x675C = 0x825D
+0x675D = 0x825A
+0x675E = 0x825F
+0x675F = 0x8264
+0x6760 = 0x8262
+0x6761 = 0x8268
+0x6762 = 0x826A
+0x6763 = 0x826B
+0x6764 = 0x822E
+0x6765 = 0x8271
+0x6766 = 0x8277
+0x6767 = 0x8278
+0x6768 = 0x827E
+0x6769 = 0x828D
+0x676A = 0x8292
+0x676B = 0x82AB
+0x676C = 0x829F
+0x676D = 0x82BB
+0x676E = 0x82AC
+0x676F = 0x82E1
+0x6770 = 0x82E3
+0x6771 = 0x82DF
+0x6772 = 0x82D2
+0x6773 = 0x82F4
+0x6774 = 0x82F3
+0x6775 = 0x82FA
+0x6776 = 0x8393
+0x6777 = 0x8303
+0x6778 = 0x82FB
+0x6779 = 0x82F9
+0x677A = 0x82DE
+0x677B = 0x8306
+0x677C = 0x82DC
+0x677D = 0x8309
+0x677E = 0x82D9
+0x6821 = 0x8335
+0x6822 = 0x8334
+0x6823 = 0x8316
+0x6824 = 0x8332
+0x6825 = 0x8331
+0x6826 = 0x8340
+0x6827 = 0x8339
+0x6828 = 0x8350
+0x6829 = 0x8345
+0x682A = 0x832F
+0x682B = 0x832B
+0x682C = 0x8317
+0x682D = 0x8318
+0x682E = 0x8385
+0x682F = 0x839A
+0x6830 = 0x83AA
+0x6831 = 0x839F
+0x6832 = 0x83A2
+0x6833 = 0x8396
+0x6834 = 0x8323
+0x6835 = 0x838E
+0x6836 = 0x8387
+0x6837 = 0x838A
+0x6838 = 0x837C
+0x6839 = 0x83B5
+0x683A = 0x8373
+0x683B = 0x8375
+0x683C = 0x83A0
+0x683D = 0x8389
+0x683E = 0x83A8
+0x683F = 0x83F4
+0x6840 = 0x8413
+0x6841 = 0x83EB
+0x6842 = 0x83CE
+0x6843 = 0x83FD
+0x6844 = 0x8403
+0x6845 = 0x83D8
+0x6846 = 0x840B
+0x6847 = 0x83C1
+0x6848 = 0x83F7
+0x6849 = 0x8407
+0x684A = 0x83E0
+0x684B = 0x83F2
+0x684C = 0x840D
+0x684D = 0x8422
+0x684E = 0x8420
+0x684F = 0x83BD
+0x6850 = 0x8438
+0x6851 = 0x8506
+0x6852 = 0x83FB
+0x6853 = 0x846D
+0x6854 = 0x842A
+0x6855 = 0x843C
+0x6856 = 0x855A
+0x6857 = 0x8484
+0x6858 = 0x8477
+0x6859 = 0x846B
+0x685A = 0x84AD
+0x685B = 0x846E
+0x685C = 0x8482
+0x685D = 0x8469
+0x685E = 0x8446
+0x685F = 0x842C
+0x6860 = 0x846F
+0x6861 = 0x8479
+0x6862 = 0x8435
+0x6863 = 0x84CA
+0x6864 = 0x8462
+0x6865 = 0x84B9
+0x6866 = 0x84BF
+0x6867 = 0x849F
+0x6868 = 0x84D9
+0x6869 = 0x84CD
+0x686A = 0x84BB
+0x686B = 0x84DA
+0x686C = 0x84D0
+0x686D = 0x84C1
+0x686E = 0x84C6
+0x686F = 0x84D6
+0x6870 = 0x84A1
+0x6871 = 0x8521
+0x6872 = 0x84FF
+0x6873 = 0x84F4
+0x6874 = 0x8517
+0x6875 = 0x8518
+0x6876 = 0x852C
+0x6877 = 0x851F
+0x6878 = 0x8515
+0x6879 = 0x8514
+0x687A = 0x84FC
+0x687B = 0x8540
+0x687C = 0x8563
+0x687D = 0x8558
+0x687E = 0x8548
+0x6921 = 0x8541
+0x6922 = 0x8602
+0x6923 = 0x854B
+0x6924 = 0x8555
+0x6925 = 0x8580
+0x6926 = 0x85A4
+0x6927 = 0x8588
+0x6928 = 0x8591
+0x6929 = 0x858A
+0x692A = 0x85A8
+0x692B = 0x856D
+0x692C = 0x8594
+0x692D = 0x859B
+0x692E = 0x85EA
+0x692F = 0x8587
+0x6930 = 0x859C
+0x6931 = 0x8577
+0x6932 = 0x857E
+0x6933 = 0x8590
+0x6934 = 0x85C9
+0x6935 = 0x85BA
+0x6936 = 0x85CF
+0x6937 = 0x85B9
+0x6938 = 0x85D0
+0x6939 = 0x85D5
+0x693A = 0x85DD
+0x693B = 0x85E5
+0x693C = 0x85DC
+0x693D = 0x85F9
+0x693E = 0x860A
+0x693F = 0x8613
+0x6940 = 0x860B
+0x6941 = 0x85FE
+0x6942 = 0x85FA
+0x6943 = 0x8606
+0x6944 = 0x8622
+0x6945 = 0x861A
+0x6946 = 0x8630
+0x6947 = 0x863F
+0x6948 = 0x864D
+0x6949 = 0x4E55
+0x694A = 0x8654
+0x694B = 0x865F
+0x694C = 0x8667
+0x694D = 0x8671
+0x694E = 0x8693
+0x694F = 0x86A3
+0x6950 = 0x86A9
+0x6951 = 0x86AA
+0x6952 = 0x868B
+0x6953 = 0x868C
+0x6954 = 0x86B6
+0x6955 = 0x86AF
+0x6956 = 0x86C4
+0x6957 = 0x86C6
+0x6958 = 0x86B0
+0x6959 = 0x86C9
+0x695A = 0x8823
+0x695B = 0x86AB
+0x695C = 0x86D4
+0x695D = 0x86DE
+0x695E = 0x86E9
+0x695F = 0x86EC
+0x6960 = 0x86DF
+0x6961 = 0x86DB
+0x6962 = 0x86EF
+0x6963 = 0x8712
+0x6964 = 0x8706
+0x6965 = 0x8708
+0x6966 = 0x8700
+0x6967 = 0x8703
+0x6968 = 0x86FB
+0x6969 = 0x8711
+0x696A = 0x8709
+0x696B = 0x870D
+0x696C = 0x86F9
+0x696D = 0x870A
+0x696E = 0x8734
+0x696F = 0x873F
+0x6970 = 0x8737
+0x6971 = 0x873B
+0x6972 = 0x8725
+0x6973 = 0x8729
+0x6974 = 0x871A
+0x6975 = 0x8760
+0x6976 = 0x875F
+0x6977 = 0x8778
+0x6978 = 0x874C
+0x6979 = 0x874E
+0x697A = 0x8774
+0x697B = 0x8757
+0x697C = 0x8768
+0x697D = 0x876E
+0x697E = 0x8759
+0x6A21 = 0x8753
+0x6A22 = 0x8763
+0x6A23 = 0x876A
+0x6A24 = 0x8805
+0x6A25 = 0x87A2
+0x6A26 = 0x879F
+0x6A27 = 0x8782
+0x6A28 = 0x87AF
+0x6A29 = 0x87CB
+0x6A2A = 0x87BD
+0x6A2B = 0x87C0
+0x6A2C = 0x87D0
+0x6A2D = 0x96D6
+0x6A2E = 0x87AB
+0x6A2F = 0x87C4
+0x6A30 = 0x87B3
+0x6A31 = 0x87C7
+0x6A32 = 0x87C6
+0x6A33 = 0x87BB
+0x6A34 = 0x87EF
+0x6A35 = 0x87F2
+0x6A36 = 0x87E0
+0x6A37 = 0x880F
+0x6A38 = 0x880D
+0x6A39 = 0x87FE
+0x6A3A = 0x87F6
+0x6A3B = 0x87F7
+0x6A3C = 0x880E
+0x6A3D = 0x87D2
+0x6A3E = 0x8811
+0x6A3F = 0x8816
+0x6A40 = 0x8815
+0x6A41 = 0x8822
+0x6A42 = 0x8821
+0x6A43 = 0x8831
+0x6A44 = 0x8836
+0x6A45 = 0x8839
+0x6A46 = 0x8827
+0x6A47 = 0x883B
+0x6A48 = 0x8844
+0x6A49 = 0x8842
+0x6A4A = 0x8852
+0x6A4B = 0x8859
+0x6A4C = 0x885E
+0x6A4D = 0x8862
+0x6A4E = 0x886B
+0x6A4F = 0x8881
+0x6A50 = 0x887E
+0x6A51 = 0x889E
+0x6A52 = 0x8875
+0x6A53 = 0x887D
+0x6A54 = 0x88B5
+0x6A55 = 0x8872
+0x6A56 = 0x8882
+0x6A57 = 0x8897
+0x6A58 = 0x8892
+0x6A59 = 0x88AE
+0x6A5A = 0x8899
+0x6A5B = 0x88A2
+0x6A5C = 0x888D
+0x6A5D = 0x88A4
+0x6A5E = 0x88B0
+0x6A5F = 0x88BF
+0x6A60 = 0x88B1
+0x6A61 = 0x88C3
+0x6A62 = 0x88C4
+0x6A63 = 0x88D4
+0x6A64 = 0x88D8
+0x6A65 = 0x88D9
+0x6A66 = 0x88DD
+0x6A67 = 0x88F9
+0x6A68 = 0x8902
+0x6A69 = 0x88FC
+0x6A6A = 0x88F4
+0x6A6B = 0x88E8
+0x6A6C = 0x88F2
+0x6A6D = 0x8904
+0x6A6E = 0x890C
+0x6A6F = 0x890A
+0x6A70 = 0x8913
+0x6A71 = 0x8943
+0x6A72 = 0x891E
+0x6A73 = 0x8925
+0x6A74 = 0x892A
+0x6A75 = 0x892B
+0x6A76 = 0x8941
+0x6A77 = 0x8944
+0x6A78 = 0x893B
+0x6A79 = 0x8936
+0x6A7A = 0x8938
+0x6A7B = 0x894C
+0x6A7C = 0x891D
+0x6A7D = 0x8960
+0x6A7E = 0x895E
+0x6B21 = 0x8966
+0x6B22 = 0x8964
+0x6B23 = 0x896D
+0x6B24 = 0x896A
+0x6B25 = 0x896F
+0x6B26 = 0x8974
+0x6B27 = 0x8977
+0x6B28 = 0x897E
+0x6B29 = 0x8983
+0x6B2A = 0x8988
+0x6B2B = 0x898A
+0x6B2C = 0x8993
+0x6B2D = 0x8998
+0x6B2E = 0x89A1
+0x6B2F = 0x89A9
+0x6B30 = 0x89A6
+0x6B31 = 0x89AC
+0x6B32 = 0x89AF
+0x6B33 = 0x89B2
+0x6B34 = 0x89BA
+0x6B35 = 0x89BD
+0x6B36 = 0x89BF
+0x6B37 = 0x89C0
+0x6B38 = 0x89DA
+0x6B39 = 0x89DC
+0x6B3A = 0x89DD
+0x6B3B = 0x89E7
+0x6B3C = 0x89F4
+0x6B3D = 0x89F8
+0x6B3E = 0x8A03
+0x6B3F = 0x8A16
+0x6B40 = 0x8A10
+0x6B41 = 0x8A0C
+0x6B42 = 0x8A1B
+0x6B43 = 0x8A1D
+0x6B44 = 0x8A25
+0x6B45 = 0x8A36
+0x6B46 = 0x8A41
+0x6B47 = 0x8A5B
+0x6B48 = 0x8A52
+0x6B49 = 0x8A46
+0x6B4A = 0x8A48
+0x6B4B = 0x8A7C
+0x6B4C = 0x8A6D
+0x6B4D = 0x8A6C
+0x6B4E = 0x8A62
+0x6B4F = 0x8A85
+0x6B50 = 0x8A82
+0x6B51 = 0x8A84
+0x6B52 = 0x8AA8
+0x6B53 = 0x8AA1
+0x6B54 = 0x8A91
+0x6B55 = 0x8AA5
+0x6B56 = 0x8AA6
+0x6B57 = 0x8A9A
+0x6B58 = 0x8AA3
+0x6B59 = 0x8AC4
+0x6B5A = 0x8ACD
+0x6B5B = 0x8AC2
+0x6B5C = 0x8ADA
+0x6B5D = 0x8AEB
+0x6B5E = 0x8AF3
+0x6B5F = 0x8AE7
+0x6B60 = 0x8AE4
+0x6B61 = 0x8AF1
+0x6B62 = 0x8B14
+0x6B63 = 0x8AE0
+0x6B64 = 0x8AE2
+0x6B65 = 0x8AF7
+0x6B66 = 0x8ADE
+0x6B67 = 0x8ADB
+0x6B68 = 0x8B0C
+0x6B69 = 0x8B07
+0x6B6A = 0x8B1A
+0x6B6B = 0x8AE1
+0x6B6C = 0x8B16
+0x6B6D = 0x8B10
+0x6B6E = 0x8B17
+0x6B6F = 0x8B20
+0x6B70 = 0x8B33
+0x6B71 = 0x97AB
+0x6B72 = 0x8B26
+0x6B73 = 0x8B2B
+0x6B74 = 0x8B3E
+0x6B75 = 0x8B28
+0x6B76 = 0x8B41
+0x6B77 = 0x8B4C
+0x6B78 = 0x8B4F
+0x6B79 = 0x8B4E
+0x6B7A = 0x8B49
+0x6B7B = 0x8B56
+0x6B7C = 0x8B5B
+0x6B7D = 0x8B5A
+0x6B7E = 0x8B6B
+0x6C21 = 0x8B5F
+0x6C22 = 0x8B6C
+0x6C23 = 0x8B6F
+0x6C24 = 0x8B74
+0x6C25 = 0x8B7D
+0x6C26 = 0x8B80
+0x6C27 = 0x8B8C
+0x6C28 = 0x8B8E
+0x6C29 = 0x8B92
+0x6C2A = 0x8B93
+0x6C2B = 0x8B96
+0x6C2C = 0x8B99
+0x6C2D = 0x8B9A
+0x6C2E = 0x8C3A
+0x6C2F = 0x8C41
+0x6C30 = 0x8C3F
+0x6C31 = 0x8C48
+0x6C32 = 0x8C4C
+0x6C33 = 0x8C4E
+0x6C34 = 0x8C50
+0x6C35 = 0x8C55
+0x6C36 = 0x8C62
+0x6C37 = 0x8C6C
+0x6C38 = 0x8C78
+0x6C39 = 0x8C7A
+0x6C3A = 0x8C82
+0x6C3B = 0x8C89
+0x6C3C = 0x8C85
+0x6C3D = 0x8C8A
+0x6C3E = 0x8C8D
+0x6C3F = 0x8C8E
+0x6C40 = 0x8C94
+0x6C41 = 0x8C7C
+0x6C42 = 0x8C98
+0x6C43 = 0x621D
+0x6C44 = 0x8CAD
+0x6C45 = 0x8CAA
+0x6C46 = 0x8CBD
+0x6C47 = 0x8CB2
+0x6C48 = 0x8CB3
+0x6C49 = 0x8CAE
+0x6C4A = 0x8CB6
+0x6C4B = 0x8CC8
+0x6C4C = 0x8CC1
+0x6C4D = 0x8CE4
+0x6C4E = 0x8CE3
+0x6C4F = 0x8CDA
+0x6C50 = 0x8CFD
+0x6C51 = 0x8CFA
+0x6C52 = 0x8CFB
+0x6C53 = 0x8D04
+0x6C54 = 0x8D05
+0x6C55 = 0x8D0A
+0x6C56 = 0x8D07
+0x6C57 = 0x8D0F
+0x6C58 = 0x8D0D
+0x6C59 = 0x8D10
+0x6C5A = 0x9F4E
+0x6C5B = 0x8D13
+0x6C5C = 0x8CCD
+0x6C5D = 0x8D14
+0x6C5E = 0x8D16
+0x6C5F = 0x8D67
+0x6C60 = 0x8D6D
+0x6C61 = 0x8D71
+0x6C62 = 0x8D73
+0x6C63 = 0x8D81
+0x6C64 = 0x8D99
+0x6C65 = 0x8DC2
+0x6C66 = 0x8DBE
+0x6C67 = 0x8DBA
+0x6C68 = 0x8DCF
+0x6C69 = 0x8DDA
+0x6C6A = 0x8DD6
+0x6C6B = 0x8DCC
+0x6C6C = 0x8DDB
+0x6C6D = 0x8DCB
+0x6C6E = 0x8DEA
+0x6C6F = 0x8DEB
+0x6C70 = 0x8DDF
+0x6C71 = 0x8DE3
+0x6C72 = 0x8DFC
+0x6C73 = 0x8E08
+0x6C74 = 0x8E09
+0x6C75 = 0x8DFF
+0x6C76 = 0x8E1D
+0x6C77 = 0x8E1E
+0x6C78 = 0x8E10
+0x6C79 = 0x8E1F
+0x6C7A = 0x8E42
+0x6C7B = 0x8E35
+0x6C7C = 0x8E30
+0x6C7D = 0x8E34
+0x6C7E = 0x8E4A
+0x6D21 = 0x8E47
+0x6D22 = 0x8E49
+0x6D23 = 0x8E4C
+0x6D24 = 0x8E50
+0x6D25 = 0x8E48
+0x6D26 = 0x8E59
+0x6D27 = 0x8E64
+0x6D28 = 0x8E60
+0x6D29 = 0x8E2A
+0x6D2A = 0x8E63
+0x6D2B = 0x8E55
+0x6D2C = 0x8E76
+0x6D2D = 0x8E72
+0x6D2E = 0x8E7C
+0x6D2F = 0x8E81
+0x6D30 = 0x8E87
+0x6D31 = 0x8E85
+0x6D32 = 0x8E84
+0x6D33 = 0x8E8B
+0x6D34 = 0x8E8A
+0x6D35 = 0x8E93
+0x6D36 = 0x8E91
+0x6D37 = 0x8E94
+0x6D38 = 0x8E99
+0x6D39 = 0x8EAA
+0x6D3A = 0x8EA1
+0x6D3B = 0x8EAC
+0x6D3C = 0x8EB0
+0x6D3D = 0x8EC6
+0x6D3E = 0x8EB1
+0x6D3F = 0x8EBE
+0x6D40 = 0x8EC5
+0x6D41 = 0x8EC8
+0x6D42 = 0x8ECB
+0x6D43 = 0x8EDB
+0x6D44 = 0x8EE3
+0x6D45 = 0x8EFC
+0x6D46 = 0x8EFB
+0x6D47 = 0x8EEB
+0x6D48 = 0x8EFE
+0x6D49 = 0x8F0A
+0x6D4A = 0x8F05
+0x6D4B = 0x8F15
+0x6D4C = 0x8F12
+0x6D4D = 0x8F19
+0x6D4E = 0x8F13
+0x6D4F = 0x8F1C
+0x6D50 = 0x8F1F
+0x6D51 = 0x8F1B
+0x6D52 = 0x8F0C
+0x6D53 = 0x8F26
+0x6D54 = 0x8F33
+0x6D55 = 0x8F3B
+0x6D56 = 0x8F39
+0x6D57 = 0x8F45
+0x6D58 = 0x8F42
+0x6D59 = 0x8F3E
+0x6D5A = 0x8F4C
+0x6D5B = 0x8F49
+0x6D5C = 0x8F46
+0x6D5D = 0x8F4E
+0x6D5E = 0x8F57
+0x6D5F = 0x8F5C
+0x6D60 = 0x8F62
+0x6D61 = 0x8F63
+0x6D62 = 0x8F64
+0x6D63 = 0x8F9C
+0x6D64 = 0x8F9F
+0x6D65 = 0x8FA3
+0x6D66 = 0x8FAD
+0x6D67 = 0x8FAF
+0x6D68 = 0x8FB7
+0x6D69 = 0x8FDA
+0x6D6A = 0x8FE5
+0x6D6B = 0x8FE2
+0x6D6C = 0x8FEA
+0x6D6D = 0x8FEF
+0x6D6E = 0x9087
+0x6D6F = 0x8FF4
+0x6D70 = 0x9005
+0x6D71 = 0x8FF9
+0x6D72 = 0x8FFA
+0x6D73 = 0x9011
+0x6D74 = 0x9015
+0x6D75 = 0x9021
+0x6D76 = 0x900D
+0x6D77 = 0x901E
+0x6D78 = 0x9016
+0x6D79 = 0x900B
+0x6D7A = 0x9027
+0x6D7B = 0x9036
+0x6D7C = 0x9035
+0x6D7D = 0x9039
+0x6D7E = 0x8FF8
+0x6E21 = 0x904F
+0x6E22 = 0x9050
+0x6E23 = 0x9051
+0x6E24 = 0x9052
+0x6E25 = 0x900E
+0x6E26 = 0x9049
+0x6E27 = 0x903E
+0x6E28 = 0x9056
+0x6E29 = 0x9058
+0x6E2A = 0x905E
+0x6E2B = 0x9068
+0x6E2C = 0x906F
+0x6E2D = 0x9076
+0x6E2E = 0x96A8
+0x6E2F = 0x9072
+0x6E30 = 0x9082
+0x6E31 = 0x907D
+0x6E32 = 0x9081
+0x6E33 = 0x9080
+0x6E34 = 0x908A
+0x6E35 = 0x9089
+0x6E36 = 0x908F
+0x6E37 = 0x90A8
+0x6E38 = 0x90AF
+0x6E39 = 0x90B1
+0x6E3A = 0x90B5
+0x6E3B = 0x90E2
+0x6E3C = 0x90E4
+0x6E3D = 0x6248
+0x6E3E = 0x90DB
+0x6E3F = 0x9102
+0x6E40 = 0x9112
+0x6E41 = 0x9119
+0x6E42 = 0x9132
+0x6E43 = 0x9130
+0x6E44 = 0x914A
+0x6E45 = 0x9156
+0x6E46 = 0x9158
+0x6E47 = 0x9163
+0x6E48 = 0x9165
+0x6E49 = 0x9169
+0x6E4A = 0x9173
+0x6E4B = 0x9172
+0x6E4C = 0x918B
+0x6E4D = 0x9189
+0x6E4E = 0x9182
+0x6E4F = 0x91A2
+0x6E50 = 0x91AB
+0x6E51 = 0x91AF
+0x6E52 = 0x91AA
+0x6E53 = 0x91B5
+0x6E54 = 0x91B4
+0x6E55 = 0x91BA
+0x6E56 = 0x91C0
+0x6E57 = 0x91C1
+0x6E58 = 0x91C9
+0x6E59 = 0x91CB
+0x6E5A = 0x91D0
+0x6E5B = 0x91D6
+0x6E5C = 0x91DF
+0x6E5D = 0x91E1
+0x6E5E = 0x91DB
+0x6E5F = 0x91FC
+0x6E60 = 0x91F5
+0x6E61 = 0x91F6
+0x6E62 = 0x921E
+0x6E63 = 0x91FF
+0x6E64 = 0x9214
+0x6E65 = 0x922C
+0x6E66 = 0x9215
+0x6E67 = 0x9211
+0x6E68 = 0x925E
+0x6E69 = 0x9257
+0x6E6A = 0x9245
+0x6E6B = 0x9249
+0x6E6C = 0x9264
+0x6E6D = 0x9248
+0x6E6E = 0x9295
+0x6E6F = 0x923F
+0x6E70 = 0x924B
+0x6E71 = 0x9250
+0x6E72 = 0x929C
+0x6E73 = 0x9296
+0x6E74 = 0x9293
+0x6E75 = 0x929B
+0x6E76 = 0x925A
+0x6E77 = 0x92CF
+0x6E78 = 0x92B9
+0x6E79 = 0x92B7
+0x6E7A = 0x92E9
+0x6E7B = 0x930F
+0x6E7C = 0x92FA
+0x6E7D = 0x9344
+0x6E7E = 0x932E
+0x6F21 = 0x9319
+0x6F22 = 0x9322
+0x6F23 = 0x931A
+0x6F24 = 0x9323
+0x6F25 = 0x933A
+0x6F26 = 0x9335
+0x6F27 = 0x933B
+0x6F28 = 0x935C
+0x6F29 = 0x9360
+0x6F2A = 0x937C
+0x6F2B = 0x936E
+0x6F2C = 0x9356
+0x6F2D = 0x93B0
+0x6F2E = 0x93AC
+0x6F2F = 0x93AD
+0x6F30 = 0x9394
+0x6F31 = 0x93B9
+0x6F32 = 0x93D6
+0x6F33 = 0x93D7
+0x6F34 = 0x93E8
+0x6F35 = 0x93E5
+0x6F36 = 0x93D8
+0x6F37 = 0x93C3
+0x6F38 = 0x93DD
+0x6F39 = 0x93D0
+0x6F3A = 0x93C8
+0x6F3B = 0x93E4
+0x6F3C = 0x941A
+0x6F3D = 0x9414
+0x6F3E = 0x9413
+0x6F3F = 0x9403
+0x6F40 = 0x9407
+0x6F41 = 0x9410
+0x6F42 = 0x9436
+0x6F43 = 0x942B
+0x6F44 = 0x9435
+0x6F45 = 0x9421
+0x6F46 = 0x943A
+0x6F47 = 0x9441
+0x6F48 = 0x9452
+0x6F49 = 0x9444
+0x6F4A = 0x945B
+0x6F4B = 0x9460
+0x6F4C = 0x9462
+0x6F4D = 0x945E
+0x6F4E = 0x946A
+0x6F4F = 0x9229
+0x6F50 = 0x9470
+0x6F51 = 0x9475
+0x6F52 = 0x9477
+0x6F53 = 0x947D
+0x6F54 = 0x945A
+0x6F55 = 0x947C
+0x6F56 = 0x947E
+0x6F57 = 0x9481
+0x6F58 = 0x947F
+0x6F59 = 0x9582
+0x6F5A = 0x9587
+0x6F5B = 0x958A
+0x6F5C = 0x9594
+0x6F5D = 0x9596
+0x6F5E = 0x9598
+0x6F5F = 0x9599
+0x6F60 = 0x95A0
+0x6F61 = 0x95A8
+0x6F62 = 0x95A7
+0x6F63 = 0x95AD
+0x6F64 = 0x95BC
+0x6F65 = 0x95BB
+0x6F66 = 0x95B9
+0x6F67 = 0x95BE
+0x6F68 = 0x95CA
+0x6F69 = 0x6FF6
+0x6F6A = 0x95C3
+0x6F6B = 0x95CD
+0x6F6C = 0x95CC
+0x6F6D = 0x95D5
+0x6F6E = 0x95D4
+0x6F6F = 0x95D6
+0x6F70 = 0x95DC
+0x6F71 = 0x95E1
+0x6F72 = 0x95E5
+0x6F73 = 0x95E2
+0x6F74 = 0x9621
+0x6F75 = 0x9628
+0x6F76 = 0x962E
+0x6F77 = 0x962F
+0x6F78 = 0x9642
+0x6F79 = 0x964C
+0x6F7A = 0x964F
+0x6F7B = 0x964B
+0x6F7C = 0x9677
+0x6F7D = 0x965C
+0x6F7E = 0x965E
+0x7021 = 0x965D
+0x7022 = 0x965F
+0x7023 = 0x9666
+0x7024 = 0x9672
+0x7025 = 0x966C
+0x7026 = 0x968D
+0x7027 = 0x9698
+0x7028 = 0x9695
+0x7029 = 0x9697
+0x702A = 0x96AA
+0x702B = 0x96A7
+0x702C = 0x96B1
+0x702D = 0x96B2
+0x702E = 0x96B0
+0x702F = 0x96B4
+0x7030 = 0x96B6
+0x7031 = 0x96B8
+0x7032 = 0x96B9
+0x7033 = 0x96CE
+0x7034 = 0x96CB
+0x7035 = 0x96C9
+0x7036 = 0x96CD
+0x7037 = 0x894D
+0x7038 = 0x96DC
+0x7039 = 0x970D
+0x703A = 0x96D5
+0x703B = 0x96F9
+0x703C = 0x9704
+0x703D = 0x9706
+0x703E = 0x9708
+0x703F = 0x9713
+0x7040 = 0x970E
+0x7041 = 0x9711
+0x7042 = 0x970F
+0x7043 = 0x9716
+0x7044 = 0x9719
+0x7045 = 0x9724
+0x7046 = 0x972A
+0x7047 = 0x9730
+0x7048 = 0x9739
+0x7049 = 0x973D
+0x704A = 0x973E
+0x704B = 0x9744
+0x704C = 0x9746
+0x704D = 0x9748
+0x704E = 0x9742
+0x704F = 0x9749
+0x7050 = 0x975C
+0x7051 = 0x9760
+0x7052 = 0x9764
+0x7053 = 0x9766
+0x7054 = 0x9768
+0x7055 = 0x52D2
+0x7056 = 0x976B
+0x7057 = 0x9771
+0x7058 = 0x9779
+0x7059 = 0x9785
+0x705A = 0x977C
+0x705B = 0x9781
+0x705C = 0x977A
+0x705D = 0x9786
+0x705E = 0x978B
+0x705F = 0x978F
+0x7060 = 0x9790
+0x7061 = 0x979C
+0x7062 = 0x97A8
+0x7063 = 0x97A6
+0x7064 = 0x97A3
+0x7065 = 0x97B3
+0x7066 = 0x97B4
+0x7067 = 0x97C3
+0x7068 = 0x97C6
+0x7069 = 0x97C8
+0x706A = 0x97CB
+0x706B = 0x97DC
+0x706C = 0x97ED
+0x706D = 0x9F4F
+0x706E = 0x97F2
+0x706F = 0x7ADF
+0x7070 = 0x97F6
+0x7071 = 0x97F5
+0x7072 = 0x980F
+0x7073 = 0x980C
+0x7074 = 0x9838
+0x7075 = 0x9824
+0x7076 = 0x9821
+0x7077 = 0x9837
+0x7078 = 0x983D
+0x7079 = 0x9846
+0x707A = 0x984F
+0x707B = 0x984B
+0x707C = 0x986B
+0x707D = 0x986F
+0x707E = 0x9870
+0x7121 = 0x9871
+0x7122 = 0x9874
+0x7123 = 0x9873
+0x7124 = 0x98AA
+0x7125 = 0x98AF
+0x7126 = 0x98B1
+0x7127 = 0x98B6
+0x7128 = 0x98C4
+0x7129 = 0x98C3
+0x712A = 0x98C6
+0x712B = 0x98E9
+0x712C = 0x98EB
+0x712D = 0x9903
+0x712E = 0x9909
+0x712F = 0x9912
+0x7130 = 0x9914
+0x7131 = 0x9918
+0x7132 = 0x9921
+0x7133 = 0x991D
+0x7134 = 0x991E
+0x7135 = 0x9924
+0x7136 = 0x9920
+0x7137 = 0x992C
+0x7138 = 0x992E
+0x7139 = 0x993D
+0x713A = 0x993E
+0x713B = 0x9942
+0x713C = 0x9949
+0x713D = 0x9945
+0x713E = 0x9950
+0x713F = 0x994B
+0x7140 = 0x9951
+0x7141 = 0x9952
+0x7142 = 0x994C
+0x7143 = 0x9955
+0x7144 = 0x9997
+0x7145 = 0x9998
+0x7146 = 0x99A5
+0x7147 = 0x99AD
+0x7148 = 0x99AE
+0x7149 = 0x99BC
+0x714A = 0x99DF
+0x714B = 0x99DB
+0x714C = 0x99DD
+0x714D = 0x99D8
+0x714E = 0x99D1
+0x714F = 0x99ED
+0x7150 = 0x99EE
+0x7151 = 0x99F1
+0x7152 = 0x99F2
+0x7153 = 0x99FB
+0x7154 = 0x99F8
+0x7155 = 0x9A01
+0x7156 = 0x9A0F
+0x7157 = 0x9A05
+0x7158 = 0x99E2
+0x7159 = 0x9A19
+0x715A = 0x9A2B
+0x715B = 0x9A37
+0x715C = 0x9A45
+0x715D = 0x9A42
+0x715E = 0x9A40
+0x715F = 0x9A43
+0x7160 = 0x9A3E
+0x7161 = 0x9A55
+0x7162 = 0x9A4D
+0x7163 = 0x9A5B
+0x7164 = 0x9A57
+0x7165 = 0x9A5F
+0x7166 = 0x9A62
+0x7167 = 0x9A65
+0x7168 = 0x9A64
+0x7169 = 0x9A69
+0x716A = 0x9A6B
+0x716B = 0x9A6A
+0x716C = 0x9AAD
+0x716D = 0x9AB0
+0x716E = 0x9ABC
+0x716F = 0x9AC0
+0x7170 = 0x9ACF
+0x7171 = 0x9AD1
+0x7172 = 0x9AD3
+0x7173 = 0x9AD4
+0x7174 = 0x9ADE
+0x7175 = 0x9ADF
+0x7176 = 0x9AE2
+0x7177 = 0x9AE3
+0x7178 = 0x9AE6
+0x7179 = 0x9AEF
+0x717A = 0x9AEB
+0x717B = 0x9AEE
+0x717C = 0x9AF4
+0x717D = 0x9AF1
+0x717E = 0x9AF7
+0x7221 = 0x9AFB
+0x7222 = 0x9B06
+0x7223 = 0x9B18
+0x7224 = 0x9B1A
+0x7225 = 0x9B1F
+0x7226 = 0x9B22
+0x7227 = 0x9B23
+0x7228 = 0x9B25
+0x7229 = 0x9B27
+0x722A = 0x9B28
+0x722B = 0x9B29
+0x722C = 0x9B2A
+0x722D = 0x9B2E
+0x722E = 0x9B2F
+0x722F = 0x9B32
+0x7230 = 0x9B44
+0x7231 = 0x9B43
+0x7232 = 0x9B4F
+0x7233 = 0x9B4D
+0x7234 = 0x9B4E
+0x7235 = 0x9B51
+0x7236 = 0x9B58
+0x7237 = 0x9B74
+0x7238 = 0x9B93
+0x7239 = 0x9B83
+0x723A = 0x9B91
+0x723B = 0x9B96
+0x723C = 0x9B97
+0x723D = 0x9B9F
+0x723E = 0x9BA0
+0x723F = 0x9BA8
+0x7240 = 0x9BB4
+0x7241 = 0x9BC0
+0x7242 = 0x9BCA
+0x7243 = 0x9BB9
+0x7244 = 0x9BC6
+0x7245 = 0x9BCF
+0x7246 = 0x9BD1
+0x7247 = 0x9BD2
+0x7248 = 0x9BE3
+0x7249 = 0x9BE2
+0x724A = 0x9BE4
+0x724B = 0x9BD4
+0x724C = 0x9BE1
+0x724D = 0x9C3A
+0x724E = 0x9BF2
+0x724F = 0x9BF1
+0x7250 = 0x9BF0
+0x7251 = 0x9C15
+0x7252 = 0x9C14
+0x7253 = 0x9C09
+0x7254 = 0x9C13
+0x7255 = 0x9C0C
+0x7256 = 0x9C06
+0x7257 = 0x9C08
+0x7258 = 0x9C12
+0x7259 = 0x9C0A
+0x725A = 0x9C04
+0x725B = 0x9C2E
+0x725C = 0x9C1B
+0x725D = 0x9C25
+0x725E = 0x9C24
+0x725F = 0x9C21
+0x7260 = 0x9C30
+0x7261 = 0x9C47
+0x7262 = 0x9C32
+0x7263 = 0x9C46
+0x7264 = 0x9C3E
+0x7265 = 0x9C5A
+0x7266 = 0x9C60
+0x7267 = 0x9C67
+0x7268 = 0x9C76
+0x7269 = 0x9C78
+0x726A = 0x9CE7
+0x726B = 0x9CEC
+0x726C = 0x9CF0
+0x726D = 0x9D09
+0x726E = 0x9D08
+0x726F = 0x9CEB
+0x7270 = 0x9D03
+0x7271 = 0x9D06
+0x7272 = 0x9D2A
+0x7273 = 0x9D26
+0x7274 = 0x9DAF
+0x7275 = 0x9D23
+0x7276 = 0x9D1F
+0x7277 = 0x9D44
+0x7278 = 0x9D15
+0x7279 = 0x9D12
+0x727A = 0x9D41
+0x727B = 0x9D3F
+0x727C = 0x9D3E
+0x727D = 0x9D46
+0x727E = 0x9D48
+0x7321 = 0x9D5D
+0x7322 = 0x9D5E
+0x7323 = 0x9D64
+0x7324 = 0x9D51
+0x7325 = 0x9D50
+0x7326 = 0x9D59
+0x7327 = 0x9D72
+0x7328 = 0x9D89
+0x7329 = 0x9D87
+0x732A = 0x9DAB
+0x732B = 0x9D6F
+0x732C = 0x9D7A
+0x732D = 0x9D9A
+0x732E = 0x9DA4
+0x732F = 0x9DA9
+0x7330 = 0x9DB2
+0x7331 = 0x9DC4
+0x7332 = 0x9DC1
+0x7333 = 0x9DBB
+0x7334 = 0x9DB8
+0x7335 = 0x9DBA
+0x7336 = 0x9DC6
+0x7337 = 0x9DCF
+0x7338 = 0x9DC2
+0x7339 = 0x9DD9
+0x733A = 0x9DD3
+0x733B = 0x9DF8
+0x733C = 0x9DE6
+0x733D = 0x9DED
+0x733E = 0x9DEF
+0x733F = 0x9DFD
+0x7340 = 0x9E1A
+0x7341 = 0x9E1B
+0x7342 = 0x9E1E
+0x7343 = 0x9E75
+0x7344 = 0x9E79
+0x7345 = 0x9E7D
+0x7346 = 0x9E81
+0x7347 = 0x9E88
+0x7348 = 0x9E8B
+0x7349 = 0x9E8C
+0x734A = 0x9E92
+0x734B = 0x9E95
+0x734C = 0x9E91
+0x734D = 0x9E9D
+0x734E = 0x9EA5
+0x734F = 0x9EA9
+0x7350 = 0x9EB8
+0x7351 = 0x9EAA
+0x7352 = 0x9EAD
+0x7353 = 0x9761
+0x7354 = 0x9ECC
+0x7355 = 0x9ECE
+0x7356 = 0x9ECF
+0x7357 = 0x9ED0
+0x7358 = 0x9ED4
+0x7359 = 0x9EDC
+0x735A = 0x9EDE
+0x735B = 0x9EDD
+0x735C = 0x9EE0
+0x735D = 0x9EE5
+0x735E = 0x9EE8
+0x735F = 0x9EEF
+0x7360 = 0x9EF4
+0x7361 = 0x9EF6
+0x7362 = 0x9EF7
+0x7363 = 0x9EF9
+0x7364 = 0x9EFB
+0x7365 = 0x9EFC
+0x7366 = 0x9EFD
+0x7367 = 0x9F07
+0x7368 = 0x9F08
+0x7369 = 0x76B7
+0x736A = 0x9F15
+0x736B = 0x9F21
+0x736C = 0x9F2C
+0x736D = 0x9F3E
+0x736E = 0x9F4A
+0x736F = 0x9F52
+0x7370 = 0x9F54
+0x7371 = 0x9F63
+0x7372 = 0x9F5F
+0x7373 = 0x9F60
+0x7374 = 0x9F61
+0x7375 = 0x9F66
+0x7376 = 0x9F67
+0x7377 = 0x9F6C
+0x7378 = 0x9F6A
+0x7379 = 0x9F77
+0x737A = 0x9F72
+0x737B = 0x9F76
+0x737C = 0x9F95
+0x737D = 0x9F9C
+0x737E = 0x9FA0
+0x7421 = 0x582F
+0x7422 = 0x69C7
+0x7423 = 0x9059
+0x7424 = 0x7464
+0x7425 = 0x51DC
+0x7426 = 0x7199
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@MS%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@MS%UCS.src
new file mode 100644
index 0000000..768e037
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208@MS%UCS.src
@@ -0,0 +1,6893 @@
+# $NetBSD: JISX0208@MS%UCS.src,v 1.1 2003/07/19 20:20:40 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0208:MS/UCS"
+SRC_ZONE	0x21-0x7E / 0x21-0x7E / 8
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x2121 = 0x3000
+0x2122 = 0x3001
+0x2123 = 0x3002
+0x2124 = 0xFF0C
+0x2125 = 0xFF0E
+0x2126 = 0x30FB
+0x2127 = 0xFF1A
+0x2128 = 0xFF1B
+0x2129 = 0xFF1F
+0x212A = 0xFF01
+0x212B = 0x309B
+0x212C = 0x309C
+0x212D = 0x00B4
+0x212E = 0xFF40
+0x212F = 0x00A8
+0x2130 = 0xFF3E
+0x2131 = 0xFFE3
+0x2132 = 0xFF3F
+0x2133 = 0x30FD
+0x2134 = 0x30FE
+0x2135 = 0x309D
+0x2136 = 0x309E
+0x2137 = 0x3003
+0x2138 = 0x4EDD
+0x2139 = 0x3005
+0x213A = 0x3006
+0x213B = 0x3007
+0x213C = 0x30FC
+0x213D = 0x2015
+0x213E = 0x2010
+0x213F = 0xFF0F
+0x2140 = 0xFF3C
+0x2141 = 0xFF5E
+0x2142 = 0x2225
+0x2143 = 0xFF5C
+0x2144 = 0x2026
+0x2145 = 0x2025
+0x2146 = 0x2018
+0x2147 = 0x2019
+0x2148 = 0x201C
+0x2149 = 0x201D
+0x214A = 0xFF08
+0x214B = 0xFF09
+0x214C = 0x3014
+0x214D = 0x3015
+0x214E = 0xFF3B
+0x214F = 0xFF3D
+0x2150 = 0xFF5B
+0x2151 = 0xFF5D
+0x2152 = 0x3008
+0x2153 = 0x3009
+0x2154 = 0x300A
+0x2155 = 0x300B
+0x2156 = 0x300C
+0x2157 = 0x300D
+0x2158 = 0x300E
+0x2159 = 0x300F
+0x215A = 0x3010
+0x215B = 0x3011
+0x215C = 0xFF0B
+0x215D = 0xFF0D
+0x215E = 0x00B1
+0x215F = 0x00D7
+0x2160 = 0x00F7
+0x2161 = 0xFF1D
+0x2162 = 0x2260
+0x2163 = 0xFF1C
+0x2164 = 0xFF1E
+0x2165 = 0x2266
+0x2166 = 0x2267
+0x2167 = 0x221E
+0x2168 = 0x2234
+0x2169 = 0x2642
+0x216A = 0x2640
+0x216B = 0x00B0
+0x216C = 0x2032
+0x216D = 0x2033
+0x216E = 0x2103
+0x216F = 0xFFE5
+0x2170 = 0xFF04
+0x2171 = 0xFFE0
+0x2172 = 0xFFE1
+0x2173 = 0xFF05
+0x2174 = 0xFF03
+0x2175 = 0xFF06
+0x2176 = 0xFF0A
+0x2177 = 0xFF20
+0x2178 = 0x00A7
+0x2179 = 0x2606
+0x217A = 0x2605
+0x217B = 0x25CB
+0x217C = 0x25CF
+0x217D = 0x25CE
+0x217E = 0x25C7
+0x2221 = 0x25C6
+0x2222 = 0x25A1
+0x2223 = 0x25A0
+0x2224 = 0x25B3
+0x2225 = 0x25B2
+0x2226 = 0x25BD
+0x2227 = 0x25BC
+0x2228 = 0x203B
+0x2229 = 0x3012
+0x222A = 0x2192
+0x222B = 0x2190
+0x222C = 0x2191
+0x222D = 0x2193
+0x222E = 0x3013
+0x223A = 0x2208
+0x223B = 0x220B
+0x223C = 0x2286
+0x223D = 0x2287
+0x223E = 0x2282
+0x223F = 0x2283
+0x2240 = 0x222A
+0x2241 = 0x2229
+0x224A = 0x2227
+0x224B = 0x2228
+0x224C = 0xFFE2
+0x224D = 0x21D2
+0x224E = 0x21D4
+0x224F = 0x2200
+0x2250 = 0x2203
+0x225C = 0x2220
+0x225D = 0x22A5
+0x225E = 0x2312
+0x225F = 0x2202
+0x2260 = 0x2207
+0x2261 = 0x2261
+0x2262 = 0x2252
+0x2263 = 0x226A
+0x2264 = 0x226B
+0x2265 = 0x221A
+0x2266 = 0x223D
+0x2267 = 0x221D
+0x2268 = 0x2235
+0x2269 = 0x222B
+0x226A = 0x222C
+0x2272 = 0x212B
+0x2273 = 0x2030
+0x2274 = 0x266F
+0x2275 = 0x266D
+0x2276 = 0x266A
+0x2277 = 0x2020
+0x2278 = 0x2021
+0x2279 = 0x00B6
+0x227E = 0x25EF
+0x2330 = 0xFF10
+0x2331 = 0xFF11
+0x2332 = 0xFF12
+0x2333 = 0xFF13
+0x2334 = 0xFF14
+0x2335 = 0xFF15
+0x2336 = 0xFF16
+0x2337 = 0xFF17
+0x2338 = 0xFF18
+0x2339 = 0xFF19
+0x2341 = 0xFF21
+0x2342 = 0xFF22
+0x2343 = 0xFF23
+0x2344 = 0xFF24
+0x2345 = 0xFF25
+0x2346 = 0xFF26
+0x2347 = 0xFF27
+0x2348 = 0xFF28
+0x2349 = 0xFF29
+0x234A = 0xFF2A
+0x234B = 0xFF2B
+0x234C = 0xFF2C
+0x234D = 0xFF2D
+0x234E = 0xFF2E
+0x234F = 0xFF2F
+0x2350 = 0xFF30
+0x2351 = 0xFF31
+0x2352 = 0xFF32
+0x2353 = 0xFF33
+0x2354 = 0xFF34
+0x2355 = 0xFF35
+0x2356 = 0xFF36
+0x2357 = 0xFF37
+0x2358 = 0xFF38
+0x2359 = 0xFF39
+0x235A = 0xFF3A
+0x2361 = 0xFF41
+0x2362 = 0xFF42
+0x2363 = 0xFF43
+0x2364 = 0xFF44
+0x2365 = 0xFF45
+0x2366 = 0xFF46
+0x2367 = 0xFF47
+0x2368 = 0xFF48
+0x2369 = 0xFF49
+0x236A = 0xFF4A
+0x236B = 0xFF4B
+0x236C = 0xFF4C
+0x236D = 0xFF4D
+0x236E = 0xFF4E
+0x236F = 0xFF4F
+0x2370 = 0xFF50
+0x2371 = 0xFF51
+0x2372 = 0xFF52
+0x2373 = 0xFF53
+0x2374 = 0xFF54
+0x2375 = 0xFF55
+0x2376 = 0xFF56
+0x2377 = 0xFF57
+0x2378 = 0xFF58
+0x2379 = 0xFF59
+0x237A = 0xFF5A
+0x2421 = 0x3041
+0x2422 = 0x3042
+0x2423 = 0x3043
+0x2424 = 0x3044
+0x2425 = 0x3045
+0x2426 = 0x3046
+0x2427 = 0x3047
+0x2428 = 0x3048
+0x2429 = 0x3049
+0x242A = 0x304A
+0x242B = 0x304B
+0x242C = 0x304C
+0x242D = 0x304D
+0x242E = 0x304E
+0x242F = 0x304F
+0x2430 = 0x3050
+0x2431 = 0x3051
+0x2432 = 0x3052
+0x2433 = 0x3053
+0x2434 = 0x3054
+0x2435 = 0x3055
+0x2436 = 0x3056
+0x2437 = 0x3057
+0x2438 = 0x3058
+0x2439 = 0x3059
+0x243A = 0x305A
+0x243B = 0x305B
+0x243C = 0x305C
+0x243D = 0x305D
+0x243E = 0x305E
+0x243F = 0x305F
+0x2440 = 0x3060
+0x2441 = 0x3061
+0x2442 = 0x3062
+0x2443 = 0x3063
+0x2444 = 0x3064
+0x2445 = 0x3065
+0x2446 = 0x3066
+0x2447 = 0x3067
+0x2448 = 0x3068
+0x2449 = 0x3069
+0x244A = 0x306A
+0x244B = 0x306B
+0x244C = 0x306C
+0x244D = 0x306D
+0x244E = 0x306E
+0x244F = 0x306F
+0x2450 = 0x3070
+0x2451 = 0x3071
+0x2452 = 0x3072
+0x2453 = 0x3073
+0x2454 = 0x3074
+0x2455 = 0x3075
+0x2456 = 0x3076
+0x2457 = 0x3077
+0x2458 = 0x3078
+0x2459 = 0x3079
+0x245A = 0x307A
+0x245B = 0x307B
+0x245C = 0x307C
+0x245D = 0x307D
+0x245E = 0x307E
+0x245F = 0x307F
+0x2460 = 0x3080
+0x2461 = 0x3081
+0x2462 = 0x3082
+0x2463 = 0x3083
+0x2464 = 0x3084
+0x2465 = 0x3085
+0x2466 = 0x3086
+0x2467 = 0x3087
+0x2468 = 0x3088
+0x2469 = 0x3089
+0x246A = 0x308A
+0x246B = 0x308B
+0x246C = 0x308C
+0x246D = 0x308D
+0x246E = 0x308E
+0x246F = 0x308F
+0x2470 = 0x3090
+0x2471 = 0x3091
+0x2472 = 0x3092
+0x2473 = 0x3093
+0x2521 = 0x30A1
+0x2522 = 0x30A2
+0x2523 = 0x30A3
+0x2524 = 0x30A4
+0x2525 = 0x30A5
+0x2526 = 0x30A6
+0x2527 = 0x30A7
+0x2528 = 0x30A8
+0x2529 = 0x30A9
+0x252A = 0x30AA
+0x252B = 0x30AB
+0x252C = 0x30AC
+0x252D = 0x30AD
+0x252E = 0x30AE
+0x252F = 0x30AF
+0x2530 = 0x30B0
+0x2531 = 0x30B1
+0x2532 = 0x30B2
+0x2533 = 0x30B3
+0x2534 = 0x30B4
+0x2535 = 0x30B5
+0x2536 = 0x30B6
+0x2537 = 0x30B7
+0x2538 = 0x30B8
+0x2539 = 0x30B9
+0x253A = 0x30BA
+0x253B = 0x30BB
+0x253C = 0x30BC
+0x253D = 0x30BD
+0x253E = 0x30BE
+0x253F = 0x30BF
+0x2540 = 0x30C0
+0x2541 = 0x30C1
+0x2542 = 0x30C2
+0x2543 = 0x30C3
+0x2544 = 0x30C4
+0x2545 = 0x30C5
+0x2546 = 0x30C6
+0x2547 = 0x30C7
+0x2548 = 0x30C8
+0x2549 = 0x30C9
+0x254A = 0x30CA
+0x254B = 0x30CB
+0x254C = 0x30CC
+0x254D = 0x30CD
+0x254E = 0x30CE
+0x254F = 0x30CF
+0x2550 = 0x30D0
+0x2551 = 0x30D1
+0x2552 = 0x30D2
+0x2553 = 0x30D3
+0x2554 = 0x30D4
+0x2555 = 0x30D5
+0x2556 = 0x30D6
+0x2557 = 0x30D7
+0x2558 = 0x30D8
+0x2559 = 0x30D9
+0x255A = 0x30DA
+0x255B = 0x30DB
+0x255C = 0x30DC
+0x255D = 0x30DD
+0x255E = 0x30DE
+0x255F = 0x30DF
+0x2560 = 0x30E0
+0x2561 = 0x30E1
+0x2562 = 0x30E2
+0x2563 = 0x30E3
+0x2564 = 0x30E4
+0x2565 = 0x30E5
+0x2566 = 0x30E6
+0x2567 = 0x30E7
+0x2568 = 0x30E8
+0x2569 = 0x30E9
+0x256A = 0x30EA
+0x256B = 0x30EB
+0x256C = 0x30EC
+0x256D = 0x30ED
+0x256E = 0x30EE
+0x256F = 0x30EF
+0x2570 = 0x30F0
+0x2571 = 0x30F1
+0x2572 = 0x30F2
+0x2573 = 0x30F3
+0x2574 = 0x30F4
+0x2575 = 0x30F5
+0x2576 = 0x30F6
+0x2621 = 0x0391
+0x2622 = 0x0392
+0x2623 = 0x0393
+0x2624 = 0x0394
+0x2625 = 0x0395
+0x2626 = 0x0396
+0x2627 = 0x0397
+0x2628 = 0x0398
+0x2629 = 0x0399
+0x262A = 0x039A
+0x262B = 0x039B
+0x262C = 0x039C
+0x262D = 0x039D
+0x262E = 0x039E
+0x262F = 0x039F
+0x2630 = 0x03A0
+0x2631 = 0x03A1
+0x2632 = 0x03A3
+0x2633 = 0x03A4
+0x2634 = 0x03A5
+0x2635 = 0x03A6
+0x2636 = 0x03A7
+0x2637 = 0x03A8
+0x2638 = 0x03A9
+0x2641 = 0x03B1
+0x2642 = 0x03B2
+0x2643 = 0x03B3
+0x2644 = 0x03B4
+0x2645 = 0x03B5
+0x2646 = 0x03B6
+0x2647 = 0x03B7
+0x2648 = 0x03B8
+0x2649 = 0x03B9
+0x264A = 0x03BA
+0x264B = 0x03BB
+0x264C = 0x03BC
+0x264D = 0x03BD
+0x264E = 0x03BE
+0x264F = 0x03BF
+0x2650 = 0x03C0
+0x2651 = 0x03C1
+0x2652 = 0x03C3
+0x2653 = 0x03C4
+0x2654 = 0x03C5
+0x2655 = 0x03C6
+0x2656 = 0x03C7
+0x2657 = 0x03C8
+0x2658 = 0x03C9
+0x2721 = 0x0410
+0x2722 = 0x0411
+0x2723 = 0x0412
+0x2724 = 0x0413
+0x2725 = 0x0414
+0x2726 = 0x0415
+0x2727 = 0x0401
+0x2728 = 0x0416
+0x2729 = 0x0417
+0x272A = 0x0418
+0x272B = 0x0419
+0x272C = 0x041A
+0x272D = 0x041B
+0x272E = 0x041C
+0x272F = 0x041D
+0x2730 = 0x041E
+0x2731 = 0x041F
+0x2732 = 0x0420
+0x2733 = 0x0421
+0x2734 = 0x0422
+0x2735 = 0x0423
+0x2736 = 0x0424
+0x2737 = 0x0425
+0x2738 = 0x0426
+0x2739 = 0x0427
+0x273A = 0x0428
+0x273B = 0x0429
+0x273C = 0x042A
+0x273D = 0x042B
+0x273E = 0x042C
+0x273F = 0x042D
+0x2740 = 0x042E
+0x2741 = 0x042F
+0x2751 = 0x0430
+0x2752 = 0x0431
+0x2753 = 0x0432
+0x2754 = 0x0433
+0x2755 = 0x0434
+0x2756 = 0x0435
+0x2757 = 0x0451
+0x2758 = 0x0436
+0x2759 = 0x0437
+0x275A = 0x0438
+0x275B = 0x0439
+0x275C = 0x043A
+0x275D = 0x043B
+0x275E = 0x043C
+0x275F = 0x043D
+0x2760 = 0x043E
+0x2761 = 0x043F
+0x2762 = 0x0440
+0x2763 = 0x0441
+0x2764 = 0x0442
+0x2765 = 0x0443
+0x2766 = 0x0444
+0x2767 = 0x0445
+0x2768 = 0x0446
+0x2769 = 0x0447
+0x276A = 0x0448
+0x276B = 0x0449
+0x276C = 0x044A
+0x276D = 0x044B
+0x276E = 0x044C
+0x276F = 0x044D
+0x2770 = 0x044E
+0x2771 = 0x044F
+0x2821 = 0x2500
+0x2822 = 0x2502
+0x2823 = 0x250C
+0x2824 = 0x2510
+0x2825 = 0x2518
+0x2826 = 0x2514
+0x2827 = 0x251C
+0x2828 = 0x252C
+0x2829 = 0x2524
+0x282A = 0x2534
+0x282B = 0x253C
+0x282C = 0x2501
+0x282D = 0x2503
+0x282E = 0x250F
+0x282F = 0x2513
+0x2830 = 0x251B
+0x2831 = 0x2517
+0x2832 = 0x2523
+0x2833 = 0x2533
+0x2834 = 0x252B
+0x2835 = 0x253B
+0x2836 = 0x254B
+0x2837 = 0x2520
+0x2838 = 0x252F
+0x2839 = 0x2528
+0x283A = 0x2537
+0x283B = 0x253F
+0x283C = 0x251D
+0x283D = 0x2530
+0x283E = 0x2525
+0x283F = 0x2538
+0x2840 = 0x2542
+0x3021 = 0x4E9C
+0x3022 = 0x5516
+0x3023 = 0x5A03
+0x3024 = 0x963F
+0x3025 = 0x54C0
+0x3026 = 0x611B
+0x3027 = 0x6328
+0x3028 = 0x59F6
+0x3029 = 0x9022
+0x302A = 0x8475
+0x302B = 0x831C
+0x302C = 0x7A50
+0x302D = 0x60AA
+0x302E = 0x63E1
+0x302F = 0x6E25
+0x3030 = 0x65ED
+0x3031 = 0x8466
+0x3032 = 0x82A6
+0x3033 = 0x9BF5
+0x3034 = 0x6893
+0x3035 = 0x5727
+0x3036 = 0x65A1
+0x3037 = 0x6271
+0x3038 = 0x5B9B
+0x3039 = 0x59D0
+0x303A = 0x867B
+0x303B = 0x98F4
+0x303C = 0x7D62
+0x303D = 0x7DBE
+0x303E = 0x9B8E
+0x303F = 0x6216
+0x3040 = 0x7C9F
+0x3041 = 0x88B7
+0x3042 = 0x5B89
+0x3043 = 0x5EB5
+0x3044 = 0x6309
+0x3045 = 0x6697
+0x3046 = 0x6848
+0x3047 = 0x95C7
+0x3048 = 0x978D
+0x3049 = 0x674F
+0x304A = 0x4EE5
+0x304B = 0x4F0A
+0x304C = 0x4F4D
+0x304D = 0x4F9D
+0x304E = 0x5049
+0x304F = 0x56F2
+0x3050 = 0x5937
+0x3051 = 0x59D4
+0x3052 = 0x5A01
+0x3053 = 0x5C09
+0x3054 = 0x60DF
+0x3055 = 0x610F
+0x3056 = 0x6170
+0x3057 = 0x6613
+0x3058 = 0x6905
+0x3059 = 0x70BA
+0x305A = 0x754F
+0x305B = 0x7570
+0x305C = 0x79FB
+0x305D = 0x7DAD
+0x305E = 0x7DEF
+0x305F = 0x80C3
+0x3060 = 0x840E
+0x3061 = 0x8863
+0x3062 = 0x8B02
+0x3063 = 0x9055
+0x3064 = 0x907A
+0x3065 = 0x533B
+0x3066 = 0x4E95
+0x3067 = 0x4EA5
+0x3068 = 0x57DF
+0x3069 = 0x80B2
+0x306A = 0x90C1
+0x306B = 0x78EF
+0x306C = 0x4E00
+0x306D = 0x58F1
+0x306E = 0x6EA2
+0x306F = 0x9038
+0x3070 = 0x7A32
+0x3071 = 0x8328
+0x3072 = 0x828B
+0x3073 = 0x9C2F
+0x3074 = 0x5141
+0x3075 = 0x5370
+0x3076 = 0x54BD
+0x3077 = 0x54E1
+0x3078 = 0x56E0
+0x3079 = 0x59FB
+0x307A = 0x5F15
+0x307B = 0x98F2
+0x307C = 0x6DEB
+0x307D = 0x80E4
+0x307E = 0x852D
+0x3121 = 0x9662
+0x3122 = 0x9670
+0x3123 = 0x96A0
+0x3124 = 0x97FB
+0x3125 = 0x540B
+0x3126 = 0x53F3
+0x3127 = 0x5B87
+0x3128 = 0x70CF
+0x3129 = 0x7FBD
+0x312A = 0x8FC2
+0x312B = 0x96E8
+0x312C = 0x536F
+0x312D = 0x9D5C
+0x312E = 0x7ABA
+0x312F = 0x4E11
+0x3130 = 0x7893
+0x3131 = 0x81FC
+0x3132 = 0x6E26
+0x3133 = 0x5618
+0x3134 = 0x5504
+0x3135 = 0x6B1D
+0x3136 = 0x851A
+0x3137 = 0x9C3B
+0x3138 = 0x59E5
+0x3139 = 0x53A9
+0x313A = 0x6D66
+0x313B = 0x74DC
+0x313C = 0x958F
+0x313D = 0x5642
+0x313E = 0x4E91
+0x313F = 0x904B
+0x3140 = 0x96F2
+0x3141 = 0x834F
+0x3142 = 0x990C
+0x3143 = 0x53E1
+0x3144 = 0x55B6
+0x3145 = 0x5B30
+0x3146 = 0x5F71
+0x3147 = 0x6620
+0x3148 = 0x66F3
+0x3149 = 0x6804
+0x314A = 0x6C38
+0x314B = 0x6CF3
+0x314C = 0x6D29
+0x314D = 0x745B
+0x314E = 0x76C8
+0x314F = 0x7A4E
+0x3150 = 0x9834
+0x3151 = 0x82F1
+0x3152 = 0x885B
+0x3153 = 0x8A60
+0x3154 = 0x92ED
+0x3155 = 0x6DB2
+0x3156 = 0x75AB
+0x3157 = 0x76CA
+0x3158 = 0x99C5
+0x3159 = 0x60A6
+0x315A = 0x8B01
+0x315B = 0x8D8A
+0x315C = 0x95B2
+0x315D = 0x698E
+0x315E = 0x53AD
+0x315F = 0x5186
+0x3160 = 0x5712
+0x3161 = 0x5830
+0x3162 = 0x5944
+0x3163 = 0x5BB4
+0x3164 = 0x5EF6
+0x3165 = 0x6028
+0x3166 = 0x63A9
+0x3167 = 0x63F4
+0x3168 = 0x6CBF
+0x3169 = 0x6F14
+0x316A = 0x708E
+0x316B = 0x7114
+0x316C = 0x7159
+0x316D = 0x71D5
+0x316E = 0x733F
+0x316F = 0x7E01
+0x3170 = 0x8276
+0x3171 = 0x82D1
+0x3172 = 0x8597
+0x3173 = 0x9060
+0x3174 = 0x925B
+0x3175 = 0x9D1B
+0x3176 = 0x5869
+0x3177 = 0x65BC
+0x3178 = 0x6C5A
+0x3179 = 0x7525
+0x317A = 0x51F9
+0x317B = 0x592E
+0x317C = 0x5965
+0x317D = 0x5F80
+0x317E = 0x5FDC
+0x3221 = 0x62BC
+0x3222 = 0x65FA
+0x3223 = 0x6A2A
+0x3224 = 0x6B27
+0x3225 = 0x6BB4
+0x3226 = 0x738B
+0x3227 = 0x7FC1
+0x3228 = 0x8956
+0x3229 = 0x9D2C
+0x322A = 0x9D0E
+0x322B = 0x9EC4
+0x322C = 0x5CA1
+0x322D = 0x6C96
+0x322E = 0x837B
+0x322F = 0x5104
+0x3230 = 0x5C4B
+0x3231 = 0x61B6
+0x3232 = 0x81C6
+0x3233 = 0x6876
+0x3234 = 0x7261
+0x3235 = 0x4E59
+0x3236 = 0x4FFA
+0x3237 = 0x5378
+0x3238 = 0x6069
+0x3239 = 0x6E29
+0x323A = 0x7A4F
+0x323B = 0x97F3
+0x323C = 0x4E0B
+0x323D = 0x5316
+0x323E = 0x4EEE
+0x323F = 0x4F55
+0x3240 = 0x4F3D
+0x3241 = 0x4FA1
+0x3242 = 0x4F73
+0x3243 = 0x52A0
+0x3244 = 0x53EF
+0x3245 = 0x5609
+0x3246 = 0x590F
+0x3247 = 0x5AC1
+0x3248 = 0x5BB6
+0x3249 = 0x5BE1
+0x324A = 0x79D1
+0x324B = 0x6687
+0x324C = 0x679C
+0x324D = 0x67B6
+0x324E = 0x6B4C
+0x324F = 0x6CB3
+0x3250 = 0x706B
+0x3251 = 0x73C2
+0x3252 = 0x798D
+0x3253 = 0x79BE
+0x3254 = 0x7A3C
+0x3255 = 0x7B87
+0x3256 = 0x82B1
+0x3257 = 0x82DB
+0x3258 = 0x8304
+0x3259 = 0x8377
+0x325A = 0x83EF
+0x325B = 0x83D3
+0x325C = 0x8766
+0x325D = 0x8AB2
+0x325E = 0x5629
+0x325F = 0x8CA8
+0x3260 = 0x8FE6
+0x3261 = 0x904E
+0x3262 = 0x971E
+0x3263 = 0x868A
+0x3264 = 0x4FC4
+0x3265 = 0x5CE8
+0x3266 = 0x6211
+0x3267 = 0x7259
+0x3268 = 0x753B
+0x3269 = 0x81E5
+0x326A = 0x82BD
+0x326B = 0x86FE
+0x326C = 0x8CC0
+0x326D = 0x96C5
+0x326E = 0x9913
+0x326F = 0x99D5
+0x3270 = 0x4ECB
+0x3271 = 0x4F1A
+0x3272 = 0x89E3
+0x3273 = 0x56DE
+0x3274 = 0x584A
+0x3275 = 0x58CA
+0x3276 = 0x5EFB
+0x3277 = 0x5FEB
+0x3278 = 0x602A
+0x3279 = 0x6094
+0x327A = 0x6062
+0x327B = 0x61D0
+0x327C = 0x6212
+0x327D = 0x62D0
+0x327E = 0x6539
+0x3321 = 0x9B41
+0x3322 = 0x6666
+0x3323 = 0x68B0
+0x3324 = 0x6D77
+0x3325 = 0x7070
+0x3326 = 0x754C
+0x3327 = 0x7686
+0x3328 = 0x7D75
+0x3329 = 0x82A5
+0x332A = 0x87F9
+0x332B = 0x958B
+0x332C = 0x968E
+0x332D = 0x8C9D
+0x332E = 0x51F1
+0x332F = 0x52BE
+0x3330 = 0x5916
+0x3331 = 0x54B3
+0x3332 = 0x5BB3
+0x3333 = 0x5D16
+0x3334 = 0x6168
+0x3335 = 0x6982
+0x3336 = 0x6DAF
+0x3337 = 0x788D
+0x3338 = 0x84CB
+0x3339 = 0x8857
+0x333A = 0x8A72
+0x333B = 0x93A7
+0x333C = 0x9AB8
+0x333D = 0x6D6C
+0x333E = 0x99A8
+0x333F = 0x86D9
+0x3340 = 0x57A3
+0x3341 = 0x67FF
+0x3342 = 0x86CE
+0x3343 = 0x920E
+0x3344 = 0x5283
+0x3345 = 0x5687
+0x3346 = 0x5404
+0x3347 = 0x5ED3
+0x3348 = 0x62E1
+0x3349 = 0x64B9
+0x334A = 0x683C
+0x334B = 0x6838
+0x334C = 0x6BBB
+0x334D = 0x7372
+0x334E = 0x78BA
+0x334F = 0x7A6B
+0x3350 = 0x899A
+0x3351 = 0x89D2
+0x3352 = 0x8D6B
+0x3353 = 0x8F03
+0x3354 = 0x90ED
+0x3355 = 0x95A3
+0x3356 = 0x9694
+0x3357 = 0x9769
+0x3358 = 0x5B66
+0x3359 = 0x5CB3
+0x335A = 0x697D
+0x335B = 0x984D
+0x335C = 0x984E
+0x335D = 0x639B
+0x335E = 0x7B20
+0x335F = 0x6A2B
+0x3360 = 0x6A7F
+0x3361 = 0x68B6
+0x3362 = 0x9C0D
+0x3363 = 0x6F5F
+0x3364 = 0x5272
+0x3365 = 0x559D
+0x3366 = 0x6070
+0x3367 = 0x62EC
+0x3368 = 0x6D3B
+0x3369 = 0x6E07
+0x336A = 0x6ED1
+0x336B = 0x845B
+0x336C = 0x8910
+0x336D = 0x8F44
+0x336E = 0x4E14
+0x336F = 0x9C39
+0x3370 = 0x53F6
+0x3371 = 0x691B
+0x3372 = 0x6A3A
+0x3373 = 0x9784
+0x3374 = 0x682A
+0x3375 = 0x515C
+0x3376 = 0x7AC3
+0x3377 = 0x84B2
+0x3378 = 0x91DC
+0x3379 = 0x938C
+0x337A = 0x565B
+0x337B = 0x9D28
+0x337C = 0x6822
+0x337D = 0x8305
+0x337E = 0x8431
+0x3421 = 0x7CA5
+0x3422 = 0x5208
+0x3423 = 0x82C5
+0x3424 = 0x74E6
+0x3425 = 0x4E7E
+0x3426 = 0x4F83
+0x3427 = 0x51A0
+0x3428 = 0x5BD2
+0x3429 = 0x520A
+0x342A = 0x52D8
+0x342B = 0x52E7
+0x342C = 0x5DFB
+0x342D = 0x559A
+0x342E = 0x582A
+0x342F = 0x59E6
+0x3430 = 0x5B8C
+0x3431 = 0x5B98
+0x3432 = 0x5BDB
+0x3433 = 0x5E72
+0x3434 = 0x5E79
+0x3435 = 0x60A3
+0x3436 = 0x611F
+0x3437 = 0x6163
+0x3438 = 0x61BE
+0x3439 = 0x63DB
+0x343A = 0x6562
+0x343B = 0x67D1
+0x343C = 0x6853
+0x343D = 0x68FA
+0x343E = 0x6B3E
+0x343F = 0x6B53
+0x3440 = 0x6C57
+0x3441 = 0x6F22
+0x3442 = 0x6F97
+0x3443 = 0x6F45
+0x3444 = 0x74B0
+0x3445 = 0x7518
+0x3446 = 0x76E3
+0x3447 = 0x770B
+0x3448 = 0x7AFF
+0x3449 = 0x7BA1
+0x344A = 0x7C21
+0x344B = 0x7DE9
+0x344C = 0x7F36
+0x344D = 0x7FF0
+0x344E = 0x809D
+0x344F = 0x8266
+0x3450 = 0x839E
+0x3451 = 0x89B3
+0x3452 = 0x8ACC
+0x3453 = 0x8CAB
+0x3454 = 0x9084
+0x3455 = 0x9451
+0x3456 = 0x9593
+0x3457 = 0x9591
+0x3458 = 0x95A2
+0x3459 = 0x9665
+0x345A = 0x97D3
+0x345B = 0x9928
+0x345C = 0x8218
+0x345D = 0x4E38
+0x345E = 0x542B
+0x345F = 0x5CB8
+0x3460 = 0x5DCC
+0x3461 = 0x73A9
+0x3462 = 0x764C
+0x3463 = 0x773C
+0x3464 = 0x5CA9
+0x3465 = 0x7FEB
+0x3466 = 0x8D0B
+0x3467 = 0x96C1
+0x3468 = 0x9811
+0x3469 = 0x9854
+0x346A = 0x9858
+0x346B = 0x4F01
+0x346C = 0x4F0E
+0x346D = 0x5371
+0x346E = 0x559C
+0x346F = 0x5668
+0x3470 = 0x57FA
+0x3471 = 0x5947
+0x3472 = 0x5B09
+0x3473 = 0x5BC4
+0x3474 = 0x5C90
+0x3475 = 0x5E0C
+0x3476 = 0x5E7E
+0x3477 = 0x5FCC
+0x3478 = 0x63EE
+0x3479 = 0x673A
+0x347A = 0x65D7
+0x347B = 0x65E2
+0x347C = 0x671F
+0x347D = 0x68CB
+0x347E = 0x68C4
+0x3521 = 0x6A5F
+0x3522 = 0x5E30
+0x3523 = 0x6BC5
+0x3524 = 0x6C17
+0x3525 = 0x6C7D
+0x3526 = 0x757F
+0x3527 = 0x7948
+0x3528 = 0x5B63
+0x3529 = 0x7A00
+0x352A = 0x7D00
+0x352B = 0x5FBD
+0x352C = 0x898F
+0x352D = 0x8A18
+0x352E = 0x8CB4
+0x352F = 0x8D77
+0x3530 = 0x8ECC
+0x3531 = 0x8F1D
+0x3532 = 0x98E2
+0x3533 = 0x9A0E
+0x3534 = 0x9B3C
+0x3535 = 0x4E80
+0x3536 = 0x507D
+0x3537 = 0x5100
+0x3538 = 0x5993
+0x3539 = 0x5B9C
+0x353A = 0x622F
+0x353B = 0x6280
+0x353C = 0x64EC
+0x353D = 0x6B3A
+0x353E = 0x72A0
+0x353F = 0x7591
+0x3540 = 0x7947
+0x3541 = 0x7FA9
+0x3542 = 0x87FB
+0x3543 = 0x8ABC
+0x3544 = 0x8B70
+0x3545 = 0x63AC
+0x3546 = 0x83CA
+0x3547 = 0x97A0
+0x3548 = 0x5409
+0x3549 = 0x5403
+0x354A = 0x55AB
+0x354B = 0x6854
+0x354C = 0x6A58
+0x354D = 0x8A70
+0x354E = 0x7827
+0x354F = 0x6775
+0x3550 = 0x9ECD
+0x3551 = 0x5374
+0x3552 = 0x5BA2
+0x3553 = 0x811A
+0x3554 = 0x8650
+0x3555 = 0x9006
+0x3556 = 0x4E18
+0x3557 = 0x4E45
+0x3558 = 0x4EC7
+0x3559 = 0x4F11
+0x355A = 0x53CA
+0x355B = 0x5438
+0x355C = 0x5BAE
+0x355D = 0x5F13
+0x355E = 0x6025
+0x355F = 0x6551
+0x3560 = 0x673D
+0x3561 = 0x6C42
+0x3562 = 0x6C72
+0x3563 = 0x6CE3
+0x3564 = 0x7078
+0x3565 = 0x7403
+0x3566 = 0x7A76
+0x3567 = 0x7AAE
+0x3568 = 0x7B08
+0x3569 = 0x7D1A
+0x356A = 0x7CFE
+0x356B = 0x7D66
+0x356C = 0x65E7
+0x356D = 0x725B
+0x356E = 0x53BB
+0x356F = 0x5C45
+0x3570 = 0x5DE8
+0x3571 = 0x62D2
+0x3572 = 0x62E0
+0x3573 = 0x6319
+0x3574 = 0x6E20
+0x3575 = 0x865A
+0x3576 = 0x8A31
+0x3577 = 0x8DDD
+0x3578 = 0x92F8
+0x3579 = 0x6F01
+0x357A = 0x79A6
+0x357B = 0x9B5A
+0x357C = 0x4EA8
+0x357D = 0x4EAB
+0x357E = 0x4EAC
+0x3621 = 0x4F9B
+0x3622 = 0x4FA0
+0x3623 = 0x50D1
+0x3624 = 0x5147
+0x3625 = 0x7AF6
+0x3626 = 0x5171
+0x3627 = 0x51F6
+0x3628 = 0x5354
+0x3629 = 0x5321
+0x362A = 0x537F
+0x362B = 0x53EB
+0x362C = 0x55AC
+0x362D = 0x5883
+0x362E = 0x5CE1
+0x362F = 0x5F37
+0x3630 = 0x5F4A
+0x3631 = 0x602F
+0x3632 = 0x6050
+0x3633 = 0x606D
+0x3634 = 0x631F
+0x3635 = 0x6559
+0x3636 = 0x6A4B
+0x3637 = 0x6CC1
+0x3638 = 0x72C2
+0x3639 = 0x72ED
+0x363A = 0x77EF
+0x363B = 0x80F8
+0x363C = 0x8105
+0x363D = 0x8208
+0x363E = 0x854E
+0x363F = 0x90F7
+0x3640 = 0x93E1
+0x3641 = 0x97FF
+0x3642 = 0x9957
+0x3643 = 0x9A5A
+0x3644 = 0x4EF0
+0x3645 = 0x51DD
+0x3646 = 0x5C2D
+0x3647 = 0x6681
+0x3648 = 0x696D
+0x3649 = 0x5C40
+0x364A = 0x66F2
+0x364B = 0x6975
+0x364C = 0x7389
+0x364D = 0x6850
+0x364E = 0x7C81
+0x364F = 0x50C5
+0x3650 = 0x52E4
+0x3651 = 0x5747
+0x3652 = 0x5DFE
+0x3653 = 0x9326
+0x3654 = 0x65A4
+0x3655 = 0x6B23
+0x3656 = 0x6B3D
+0x3657 = 0x7434
+0x3658 = 0x7981
+0x3659 = 0x79BD
+0x365A = 0x7B4B
+0x365B = 0x7DCA
+0x365C = 0x82B9
+0x365D = 0x83CC
+0x365E = 0x887F
+0x365F = 0x895F
+0x3660 = 0x8B39
+0x3661 = 0x8FD1
+0x3662 = 0x91D1
+0x3663 = 0x541F
+0x3664 = 0x9280
+0x3665 = 0x4E5D
+0x3666 = 0x5036
+0x3667 = 0x53E5
+0x3668 = 0x533A
+0x3669 = 0x72D7
+0x366A = 0x7396
+0x366B = 0x77E9
+0x366C = 0x82E6
+0x366D = 0x8EAF
+0x366E = 0x99C6
+0x366F = 0x99C8
+0x3670 = 0x99D2
+0x3671 = 0x5177
+0x3672 = 0x611A
+0x3673 = 0x865E
+0x3674 = 0x55B0
+0x3675 = 0x7A7A
+0x3676 = 0x5076
+0x3677 = 0x5BD3
+0x3678 = 0x9047
+0x3679 = 0x9685
+0x367A = 0x4E32
+0x367B = 0x6ADB
+0x367C = 0x91E7
+0x367D = 0x5C51
+0x367E = 0x5C48
+0x3721 = 0x6398
+0x3722 = 0x7A9F
+0x3723 = 0x6C93
+0x3724 = 0x9774
+0x3725 = 0x8F61
+0x3726 = 0x7AAA
+0x3727 = 0x718A
+0x3728 = 0x9688
+0x3729 = 0x7C82
+0x372A = 0x6817
+0x372B = 0x7E70
+0x372C = 0x6851
+0x372D = 0x936C
+0x372E = 0x52F2
+0x372F = 0x541B
+0x3730 = 0x85AB
+0x3731 = 0x8A13
+0x3732 = 0x7FA4
+0x3733 = 0x8ECD
+0x3734 = 0x90E1
+0x3735 = 0x5366
+0x3736 = 0x8888
+0x3737 = 0x7941
+0x3738 = 0x4FC2
+0x3739 = 0x50BE
+0x373A = 0x5211
+0x373B = 0x5144
+0x373C = 0x5553
+0x373D = 0x572D
+0x373E = 0x73EA
+0x373F = 0x578B
+0x3740 = 0x5951
+0x3741 = 0x5F62
+0x3742 = 0x5F84
+0x3743 = 0x6075
+0x3744 = 0x6176
+0x3745 = 0x6167
+0x3746 = 0x61A9
+0x3747 = 0x63B2
+0x3748 = 0x643A
+0x3749 = 0x656C
+0x374A = 0x666F
+0x374B = 0x6842
+0x374C = 0x6E13
+0x374D = 0x7566
+0x374E = 0x7A3D
+0x374F = 0x7CFB
+0x3750 = 0x7D4C
+0x3751 = 0x7D99
+0x3752 = 0x7E4B
+0x3753 = 0x7F6B
+0x3754 = 0x830E
+0x3755 = 0x834A
+0x3756 = 0x86CD
+0x3757 = 0x8A08
+0x3758 = 0x8A63
+0x3759 = 0x8B66
+0x375A = 0x8EFD
+0x375B = 0x981A
+0x375C = 0x9D8F
+0x375D = 0x82B8
+0x375E = 0x8FCE
+0x375F = 0x9BE8
+0x3760 = 0x5287
+0x3761 = 0x621F
+0x3762 = 0x6483
+0x3763 = 0x6FC0
+0x3764 = 0x9699
+0x3765 = 0x6841
+0x3766 = 0x5091
+0x3767 = 0x6B20
+0x3768 = 0x6C7A
+0x3769 = 0x6F54
+0x376A = 0x7A74
+0x376B = 0x7D50
+0x376C = 0x8840
+0x376D = 0x8A23
+0x376E = 0x6708
+0x376F = 0x4EF6
+0x3770 = 0x5039
+0x3771 = 0x5026
+0x3772 = 0x5065
+0x3773 = 0x517C
+0x3774 = 0x5238
+0x3775 = 0x5263
+0x3776 = 0x55A7
+0x3777 = 0x570F
+0x3778 = 0x5805
+0x3779 = 0x5ACC
+0x377A = 0x5EFA
+0x377B = 0x61B2
+0x377C = 0x61F8
+0x377D = 0x62F3
+0x377E = 0x6372
+0x3821 = 0x691C
+0x3822 = 0x6A29
+0x3823 = 0x727D
+0x3824 = 0x72AC
+0x3825 = 0x732E
+0x3826 = 0x7814
+0x3827 = 0x786F
+0x3828 = 0x7D79
+0x3829 = 0x770C
+0x382A = 0x80A9
+0x382B = 0x898B
+0x382C = 0x8B19
+0x382D = 0x8CE2
+0x382E = 0x8ED2
+0x382F = 0x9063
+0x3830 = 0x9375
+0x3831 = 0x967A
+0x3832 = 0x9855
+0x3833 = 0x9A13
+0x3834 = 0x9E78
+0x3835 = 0x5143
+0x3836 = 0x539F
+0x3837 = 0x53B3
+0x3838 = 0x5E7B
+0x3839 = 0x5F26
+0x383A = 0x6E1B
+0x383B = 0x6E90
+0x383C = 0x7384
+0x383D = 0x73FE
+0x383E = 0x7D43
+0x383F = 0x8237
+0x3840 = 0x8A00
+0x3841 = 0x8AFA
+0x3842 = 0x9650
+0x3843 = 0x4E4E
+0x3844 = 0x500B
+0x3845 = 0x53E4
+0x3846 = 0x547C
+0x3847 = 0x56FA
+0x3848 = 0x59D1
+0x3849 = 0x5B64
+0x384A = 0x5DF1
+0x384B = 0x5EAB
+0x384C = 0x5F27
+0x384D = 0x6238
+0x384E = 0x6545
+0x384F = 0x67AF
+0x3850 = 0x6E56
+0x3851 = 0x72D0
+0x3852 = 0x7CCA
+0x3853 = 0x88B4
+0x3854 = 0x80A1
+0x3855 = 0x80E1
+0x3856 = 0x83F0
+0x3857 = 0x864E
+0x3858 = 0x8A87
+0x3859 = 0x8DE8
+0x385A = 0x9237
+0x385B = 0x96C7
+0x385C = 0x9867
+0x385D = 0x9F13
+0x385E = 0x4E94
+0x385F = 0x4E92
+0x3860 = 0x4F0D
+0x3861 = 0x5348
+0x3862 = 0x5449
+0x3863 = 0x543E
+0x3864 = 0x5A2F
+0x3865 = 0x5F8C
+0x3866 = 0x5FA1
+0x3867 = 0x609F
+0x3868 = 0x68A7
+0x3869 = 0x6A8E
+0x386A = 0x745A
+0x386B = 0x7881
+0x386C = 0x8A9E
+0x386D = 0x8AA4
+0x386E = 0x8B77
+0x386F = 0x9190
+0x3870 = 0x4E5E
+0x3871 = 0x9BC9
+0x3872 = 0x4EA4
+0x3873 = 0x4F7C
+0x3874 = 0x4FAF
+0x3875 = 0x5019
+0x3876 = 0x5016
+0x3877 = 0x5149
+0x3878 = 0x516C
+0x3879 = 0x529F
+0x387A = 0x52B9
+0x387B = 0x52FE
+0x387C = 0x539A
+0x387D = 0x53E3
+0x387E = 0x5411
+0x3921 = 0x540E
+0x3922 = 0x5589
+0x3923 = 0x5751
+0x3924 = 0x57A2
+0x3925 = 0x597D
+0x3926 = 0x5B54
+0x3927 = 0x5B5D
+0x3928 = 0x5B8F
+0x3929 = 0x5DE5
+0x392A = 0x5DE7
+0x392B = 0x5DF7
+0x392C = 0x5E78
+0x392D = 0x5E83
+0x392E = 0x5E9A
+0x392F = 0x5EB7
+0x3930 = 0x5F18
+0x3931 = 0x6052
+0x3932 = 0x614C
+0x3933 = 0x6297
+0x3934 = 0x62D8
+0x3935 = 0x63A7
+0x3936 = 0x653B
+0x3937 = 0x6602
+0x3938 = 0x6643
+0x3939 = 0x66F4
+0x393A = 0x676D
+0x393B = 0x6821
+0x393C = 0x6897
+0x393D = 0x69CB
+0x393E = 0x6C5F
+0x393F = 0x6D2A
+0x3940 = 0x6D69
+0x3941 = 0x6E2F
+0x3942 = 0x6E9D
+0x3943 = 0x7532
+0x3944 = 0x7687
+0x3945 = 0x786C
+0x3946 = 0x7A3F
+0x3947 = 0x7CE0
+0x3948 = 0x7D05
+0x3949 = 0x7D18
+0x394A = 0x7D5E
+0x394B = 0x7DB1
+0x394C = 0x8015
+0x394D = 0x8003
+0x394E = 0x80AF
+0x394F = 0x80B1
+0x3950 = 0x8154
+0x3951 = 0x818F
+0x3952 = 0x822A
+0x3953 = 0x8352
+0x3954 = 0x884C
+0x3955 = 0x8861
+0x3956 = 0x8B1B
+0x3957 = 0x8CA2
+0x3958 = 0x8CFC
+0x3959 = 0x90CA
+0x395A = 0x9175
+0x395B = 0x9271
+0x395C = 0x783F
+0x395D = 0x92FC
+0x395E = 0x95A4
+0x395F = 0x964D
+0x3960 = 0x9805
+0x3961 = 0x9999
+0x3962 = 0x9AD8
+0x3963 = 0x9D3B
+0x3964 = 0x525B
+0x3965 = 0x52AB
+0x3966 = 0x53F7
+0x3967 = 0x5408
+0x3968 = 0x58D5
+0x3969 = 0x62F7
+0x396A = 0x6FE0
+0x396B = 0x8C6A
+0x396C = 0x8F5F
+0x396D = 0x9EB9
+0x396E = 0x514B
+0x396F = 0x523B
+0x3970 = 0x544A
+0x3971 = 0x56FD
+0x3972 = 0x7A40
+0x3973 = 0x9177
+0x3974 = 0x9D60
+0x3975 = 0x9ED2
+0x3976 = 0x7344
+0x3977 = 0x6F09
+0x3978 = 0x8170
+0x3979 = 0x7511
+0x397A = 0x5FFD
+0x397B = 0x60DA
+0x397C = 0x9AA8
+0x397D = 0x72DB
+0x397E = 0x8FBC
+0x3A21 = 0x6B64
+0x3A22 = 0x9803
+0x3A23 = 0x4ECA
+0x3A24 = 0x56F0
+0x3A25 = 0x5764
+0x3A26 = 0x58BE
+0x3A27 = 0x5A5A
+0x3A28 = 0x6068
+0x3A29 = 0x61C7
+0x3A2A = 0x660F
+0x3A2B = 0x6606
+0x3A2C = 0x6839
+0x3A2D = 0x68B1
+0x3A2E = 0x6DF7
+0x3A2F = 0x75D5
+0x3A30 = 0x7D3A
+0x3A31 = 0x826E
+0x3A32 = 0x9B42
+0x3A33 = 0x4E9B
+0x3A34 = 0x4F50
+0x3A35 = 0x53C9
+0x3A36 = 0x5506
+0x3A37 = 0x5D6F
+0x3A38 = 0x5DE6
+0x3A39 = 0x5DEE
+0x3A3A = 0x67FB
+0x3A3B = 0x6C99
+0x3A3C = 0x7473
+0x3A3D = 0x7802
+0x3A3E = 0x8A50
+0x3A3F = 0x9396
+0x3A40 = 0x88DF
+0x3A41 = 0x5750
+0x3A42 = 0x5EA7
+0x3A43 = 0x632B
+0x3A44 = 0x50B5
+0x3A45 = 0x50AC
+0x3A46 = 0x518D
+0x3A47 = 0x6700
+0x3A48 = 0x54C9
+0x3A49 = 0x585E
+0x3A4A = 0x59BB
+0x3A4B = 0x5BB0
+0x3A4C = 0x5F69
+0x3A4D = 0x624D
+0x3A4E = 0x63A1
+0x3A4F = 0x683D
+0x3A50 = 0x6B73
+0x3A51 = 0x6E08
+0x3A52 = 0x707D
+0x3A53 = 0x91C7
+0x3A54 = 0x7280
+0x3A55 = 0x7815
+0x3A56 = 0x7826
+0x3A57 = 0x796D
+0x3A58 = 0x658E
+0x3A59 = 0x7D30
+0x3A5A = 0x83DC
+0x3A5B = 0x88C1
+0x3A5C = 0x8F09
+0x3A5D = 0x969B
+0x3A5E = 0x5264
+0x3A5F = 0x5728
+0x3A60 = 0x6750
+0x3A61 = 0x7F6A
+0x3A62 = 0x8CA1
+0x3A63 = 0x51B4
+0x3A64 = 0x5742
+0x3A65 = 0x962A
+0x3A66 = 0x583A
+0x3A67 = 0x698A
+0x3A68 = 0x80B4
+0x3A69 = 0x54B2
+0x3A6A = 0x5D0E
+0x3A6B = 0x57FC
+0x3A6C = 0x7895
+0x3A6D = 0x9DFA
+0x3A6E = 0x4F5C
+0x3A6F = 0x524A
+0x3A70 = 0x548B
+0x3A71 = 0x643E
+0x3A72 = 0x6628
+0x3A73 = 0x6714
+0x3A74 = 0x67F5
+0x3A75 = 0x7A84
+0x3A76 = 0x7B56
+0x3A77 = 0x7D22
+0x3A78 = 0x932F
+0x3A79 = 0x685C
+0x3A7A = 0x9BAD
+0x3A7B = 0x7B39
+0x3A7C = 0x5319
+0x3A7D = 0x518A
+0x3A7E = 0x5237
+0x3B21 = 0x5BDF
+0x3B22 = 0x62F6
+0x3B23 = 0x64AE
+0x3B24 = 0x64E6
+0x3B25 = 0x672D
+0x3B26 = 0x6BBA
+0x3B27 = 0x85A9
+0x3B28 = 0x96D1
+0x3B29 = 0x7690
+0x3B2A = 0x9BD6
+0x3B2B = 0x634C
+0x3B2C = 0x9306
+0x3B2D = 0x9BAB
+0x3B2E = 0x76BF
+0x3B2F = 0x6652
+0x3B30 = 0x4E09
+0x3B31 = 0x5098
+0x3B32 = 0x53C2
+0x3B33 = 0x5C71
+0x3B34 = 0x60E8
+0x3B35 = 0x6492
+0x3B36 = 0x6563
+0x3B37 = 0x685F
+0x3B38 = 0x71E6
+0x3B39 = 0x73CA
+0x3B3A = 0x7523
+0x3B3B = 0x7B97
+0x3B3C = 0x7E82
+0x3B3D = 0x8695
+0x3B3E = 0x8B83
+0x3B3F = 0x8CDB
+0x3B40 = 0x9178
+0x3B41 = 0x9910
+0x3B42 = 0x65AC
+0x3B43 = 0x66AB
+0x3B44 = 0x6B8B
+0x3B45 = 0x4ED5
+0x3B46 = 0x4ED4
+0x3B47 = 0x4F3A
+0x3B48 = 0x4F7F
+0x3B49 = 0x523A
+0x3B4A = 0x53F8
+0x3B4B = 0x53F2
+0x3B4C = 0x55E3
+0x3B4D = 0x56DB
+0x3B4E = 0x58EB
+0x3B4F = 0x59CB
+0x3B50 = 0x59C9
+0x3B51 = 0x59FF
+0x3B52 = 0x5B50
+0x3B53 = 0x5C4D
+0x3B54 = 0x5E02
+0x3B55 = 0x5E2B
+0x3B56 = 0x5FD7
+0x3B57 = 0x601D
+0x3B58 = 0x6307
+0x3B59 = 0x652F
+0x3B5A = 0x5B5C
+0x3B5B = 0x65AF
+0x3B5C = 0x65BD
+0x3B5D = 0x65E8
+0x3B5E = 0x679D
+0x3B5F = 0x6B62
+0x3B60 = 0x6B7B
+0x3B61 = 0x6C0F
+0x3B62 = 0x7345
+0x3B63 = 0x7949
+0x3B64 = 0x79C1
+0x3B65 = 0x7CF8
+0x3B66 = 0x7D19
+0x3B67 = 0x7D2B
+0x3B68 = 0x80A2
+0x3B69 = 0x8102
+0x3B6A = 0x81F3
+0x3B6B = 0x8996
+0x3B6C = 0x8A5E
+0x3B6D = 0x8A69
+0x3B6E = 0x8A66
+0x3B6F = 0x8A8C
+0x3B70 = 0x8AEE
+0x3B71 = 0x8CC7
+0x3B72 = 0x8CDC
+0x3B73 = 0x96CC
+0x3B74 = 0x98FC
+0x3B75 = 0x6B6F
+0x3B76 = 0x4E8B
+0x3B77 = 0x4F3C
+0x3B78 = 0x4F8D
+0x3B79 = 0x5150
+0x3B7A = 0x5B57
+0x3B7B = 0x5BFA
+0x3B7C = 0x6148
+0x3B7D = 0x6301
+0x3B7E = 0x6642
+0x3C21 = 0x6B21
+0x3C22 = 0x6ECB
+0x3C23 = 0x6CBB
+0x3C24 = 0x723E
+0x3C25 = 0x74BD
+0x3C26 = 0x75D4
+0x3C27 = 0x78C1
+0x3C28 = 0x793A
+0x3C29 = 0x800C
+0x3C2A = 0x8033
+0x3C2B = 0x81EA
+0x3C2C = 0x8494
+0x3C2D = 0x8F9E
+0x3C2E = 0x6C50
+0x3C2F = 0x9E7F
+0x3C30 = 0x5F0F
+0x3C31 = 0x8B58
+0x3C32 = 0x9D2B
+0x3C33 = 0x7AFA
+0x3C34 = 0x8EF8
+0x3C35 = 0x5B8D
+0x3C36 = 0x96EB
+0x3C37 = 0x4E03
+0x3C38 = 0x53F1
+0x3C39 = 0x57F7
+0x3C3A = 0x5931
+0x3C3B = 0x5AC9
+0x3C3C = 0x5BA4
+0x3C3D = 0x6089
+0x3C3E = 0x6E7F
+0x3C3F = 0x6F06
+0x3C40 = 0x75BE
+0x3C41 = 0x8CEA
+0x3C42 = 0x5B9F
+0x3C43 = 0x8500
+0x3C44 = 0x7BE0
+0x3C45 = 0x5072
+0x3C46 = 0x67F4
+0x3C47 = 0x829D
+0x3C48 = 0x5C61
+0x3C49 = 0x854A
+0x3C4A = 0x7E1E
+0x3C4B = 0x820E
+0x3C4C = 0x5199
+0x3C4D = 0x5C04
+0x3C4E = 0x6368
+0x3C4F = 0x8D66
+0x3C50 = 0x659C
+0x3C51 = 0x716E
+0x3C52 = 0x793E
+0x3C53 = 0x7D17
+0x3C54 = 0x8005
+0x3C55 = 0x8B1D
+0x3C56 = 0x8ECA
+0x3C57 = 0x906E
+0x3C58 = 0x86C7
+0x3C59 = 0x90AA
+0x3C5A = 0x501F
+0x3C5B = 0x52FA
+0x3C5C = 0x5C3A
+0x3C5D = 0x6753
+0x3C5E = 0x707C
+0x3C5F = 0x7235
+0x3C60 = 0x914C
+0x3C61 = 0x91C8
+0x3C62 = 0x932B
+0x3C63 = 0x82E5
+0x3C64 = 0x5BC2
+0x3C65 = 0x5F31
+0x3C66 = 0x60F9
+0x3C67 = 0x4E3B
+0x3C68 = 0x53D6
+0x3C69 = 0x5B88
+0x3C6A = 0x624B
+0x3C6B = 0x6731
+0x3C6C = 0x6B8A
+0x3C6D = 0x72E9
+0x3C6E = 0x73E0
+0x3C6F = 0x7A2E
+0x3C70 = 0x816B
+0x3C71 = 0x8DA3
+0x3C72 = 0x9152
+0x3C73 = 0x9996
+0x3C74 = 0x5112
+0x3C75 = 0x53D7
+0x3C76 = 0x546A
+0x3C77 = 0x5BFF
+0x3C78 = 0x6388
+0x3C79 = 0x6A39
+0x3C7A = 0x7DAC
+0x3C7B = 0x9700
+0x3C7C = 0x56DA
+0x3C7D = 0x53CE
+0x3C7E = 0x5468
+0x3D21 = 0x5B97
+0x3D22 = 0x5C31
+0x3D23 = 0x5DDE
+0x3D24 = 0x4FEE
+0x3D25 = 0x6101
+0x3D26 = 0x62FE
+0x3D27 = 0x6D32
+0x3D28 = 0x79C0
+0x3D29 = 0x79CB
+0x3D2A = 0x7D42
+0x3D2B = 0x7E4D
+0x3D2C = 0x7FD2
+0x3D2D = 0x81ED
+0x3D2E = 0x821F
+0x3D2F = 0x8490
+0x3D30 = 0x8846
+0x3D31 = 0x8972
+0x3D32 = 0x8B90
+0x3D33 = 0x8E74
+0x3D34 = 0x8F2F
+0x3D35 = 0x9031
+0x3D36 = 0x914B
+0x3D37 = 0x916C
+0x3D38 = 0x96C6
+0x3D39 = 0x919C
+0x3D3A = 0x4EC0
+0x3D3B = 0x4F4F
+0x3D3C = 0x5145
+0x3D3D = 0x5341
+0x3D3E = 0x5F93
+0x3D3F = 0x620E
+0x3D40 = 0x67D4
+0x3D41 = 0x6C41
+0x3D42 = 0x6E0B
+0x3D43 = 0x7363
+0x3D44 = 0x7E26
+0x3D45 = 0x91CD
+0x3D46 = 0x9283
+0x3D47 = 0x53D4
+0x3D48 = 0x5919
+0x3D49 = 0x5BBF
+0x3D4A = 0x6DD1
+0x3D4B = 0x795D
+0x3D4C = 0x7E2E
+0x3D4D = 0x7C9B
+0x3D4E = 0x587E
+0x3D4F = 0x719F
+0x3D50 = 0x51FA
+0x3D51 = 0x8853
+0x3D52 = 0x8FF0
+0x3D53 = 0x4FCA
+0x3D54 = 0x5CFB
+0x3D55 = 0x6625
+0x3D56 = 0x77AC
+0x3D57 = 0x7AE3
+0x3D58 = 0x821C
+0x3D59 = 0x99FF
+0x3D5A = 0x51C6
+0x3D5B = 0x5FAA
+0x3D5C = 0x65EC
+0x3D5D = 0x696F
+0x3D5E = 0x6B89
+0x3D5F = 0x6DF3
+0x3D60 = 0x6E96
+0x3D61 = 0x6F64
+0x3D62 = 0x76FE
+0x3D63 = 0x7D14
+0x3D64 = 0x5DE1
+0x3D65 = 0x9075
+0x3D66 = 0x9187
+0x3D67 = 0x9806
+0x3D68 = 0x51E6
+0x3D69 = 0x521D
+0x3D6A = 0x6240
+0x3D6B = 0x6691
+0x3D6C = 0x66D9
+0x3D6D = 0x6E1A
+0x3D6E = 0x5EB6
+0x3D6F = 0x7DD2
+0x3D70 = 0x7F72
+0x3D71 = 0x66F8
+0x3D72 = 0x85AF
+0x3D73 = 0x85F7
+0x3D74 = 0x8AF8
+0x3D75 = 0x52A9
+0x3D76 = 0x53D9
+0x3D77 = 0x5973
+0x3D78 = 0x5E8F
+0x3D79 = 0x5F90
+0x3D7A = 0x6055
+0x3D7B = 0x92E4
+0x3D7C = 0x9664
+0x3D7D = 0x50B7
+0x3D7E = 0x511F
+0x3E21 = 0x52DD
+0x3E22 = 0x5320
+0x3E23 = 0x5347
+0x3E24 = 0x53EC
+0x3E25 = 0x54E8
+0x3E26 = 0x5546
+0x3E27 = 0x5531
+0x3E28 = 0x5617
+0x3E29 = 0x5968
+0x3E2A = 0x59BE
+0x3E2B = 0x5A3C
+0x3E2C = 0x5BB5
+0x3E2D = 0x5C06
+0x3E2E = 0x5C0F
+0x3E2F = 0x5C11
+0x3E30 = 0x5C1A
+0x3E31 = 0x5E84
+0x3E32 = 0x5E8A
+0x3E33 = 0x5EE0
+0x3E34 = 0x5F70
+0x3E35 = 0x627F
+0x3E36 = 0x6284
+0x3E37 = 0x62DB
+0x3E38 = 0x638C
+0x3E39 = 0x6377
+0x3E3A = 0x6607
+0x3E3B = 0x660C
+0x3E3C = 0x662D
+0x3E3D = 0x6676
+0x3E3E = 0x677E
+0x3E3F = 0x68A2
+0x3E40 = 0x6A1F
+0x3E41 = 0x6A35
+0x3E42 = 0x6CBC
+0x3E43 = 0x6D88
+0x3E44 = 0x6E09
+0x3E45 = 0x6E58
+0x3E46 = 0x713C
+0x3E47 = 0x7126
+0x3E48 = 0x7167
+0x3E49 = 0x75C7
+0x3E4A = 0x7701
+0x3E4B = 0x785D
+0x3E4C = 0x7901
+0x3E4D = 0x7965
+0x3E4E = 0x79F0
+0x3E4F = 0x7AE0
+0x3E50 = 0x7B11
+0x3E51 = 0x7CA7
+0x3E52 = 0x7D39
+0x3E53 = 0x8096
+0x3E54 = 0x83D6
+0x3E55 = 0x848B
+0x3E56 = 0x8549
+0x3E57 = 0x885D
+0x3E58 = 0x88F3
+0x3E59 = 0x8A1F
+0x3E5A = 0x8A3C
+0x3E5B = 0x8A54
+0x3E5C = 0x8A73
+0x3E5D = 0x8C61
+0x3E5E = 0x8CDE
+0x3E5F = 0x91A4
+0x3E60 = 0x9266
+0x3E61 = 0x937E
+0x3E62 = 0x9418
+0x3E63 = 0x969C
+0x3E64 = 0x9798
+0x3E65 = 0x4E0A
+0x3E66 = 0x4E08
+0x3E67 = 0x4E1E
+0x3E68 = 0x4E57
+0x3E69 = 0x5197
+0x3E6A = 0x5270
+0x3E6B = 0x57CE
+0x3E6C = 0x5834
+0x3E6D = 0x58CC
+0x3E6E = 0x5B22
+0x3E6F = 0x5E38
+0x3E70 = 0x60C5
+0x3E71 = 0x64FE
+0x3E72 = 0x6761
+0x3E73 = 0x6756
+0x3E74 = 0x6D44
+0x3E75 = 0x72B6
+0x3E76 = 0x7573
+0x3E77 = 0x7A63
+0x3E78 = 0x84B8
+0x3E79 = 0x8B72
+0x3E7A = 0x91B8
+0x3E7B = 0x9320
+0x3E7C = 0x5631
+0x3E7D = 0x57F4
+0x3E7E = 0x98FE
+0x3F21 = 0x62ED
+0x3F22 = 0x690D
+0x3F23 = 0x6B96
+0x3F24 = 0x71ED
+0x3F25 = 0x7E54
+0x3F26 = 0x8077
+0x3F27 = 0x8272
+0x3F28 = 0x89E6
+0x3F29 = 0x98DF
+0x3F2A = 0x8755
+0x3F2B = 0x8FB1
+0x3F2C = 0x5C3B
+0x3F2D = 0x4F38
+0x3F2E = 0x4FE1
+0x3F2F = 0x4FB5
+0x3F30 = 0x5507
+0x3F31 = 0x5A20
+0x3F32 = 0x5BDD
+0x3F33 = 0x5BE9
+0x3F34 = 0x5FC3
+0x3F35 = 0x614E
+0x3F36 = 0x632F
+0x3F37 = 0x65B0
+0x3F38 = 0x664B
+0x3F39 = 0x68EE
+0x3F3A = 0x699B
+0x3F3B = 0x6D78
+0x3F3C = 0x6DF1
+0x3F3D = 0x7533
+0x3F3E = 0x75B9
+0x3F3F = 0x771F
+0x3F40 = 0x795E
+0x3F41 = 0x79E6
+0x3F42 = 0x7D33
+0x3F43 = 0x81E3
+0x3F44 = 0x82AF
+0x3F45 = 0x85AA
+0x3F46 = 0x89AA
+0x3F47 = 0x8A3A
+0x3F48 = 0x8EAB
+0x3F49 = 0x8F9B
+0x3F4A = 0x9032
+0x3F4B = 0x91DD
+0x3F4C = 0x9707
+0x3F4D = 0x4EBA
+0x3F4E = 0x4EC1
+0x3F4F = 0x5203
+0x3F50 = 0x5875
+0x3F51 = 0x58EC
+0x3F52 = 0x5C0B
+0x3F53 = 0x751A
+0x3F54 = 0x5C3D
+0x3F55 = 0x814E
+0x3F56 = 0x8A0A
+0x3F57 = 0x8FC5
+0x3F58 = 0x9663
+0x3F59 = 0x976D
+0x3F5A = 0x7B25
+0x3F5B = 0x8ACF
+0x3F5C = 0x9808
+0x3F5D = 0x9162
+0x3F5E = 0x56F3
+0x3F5F = 0x53A8
+0x3F60 = 0x9017
+0x3F61 = 0x5439
+0x3F62 = 0x5782
+0x3F63 = 0x5E25
+0x3F64 = 0x63A8
+0x3F65 = 0x6C34
+0x3F66 = 0x708A
+0x3F67 = 0x7761
+0x3F68 = 0x7C8B
+0x3F69 = 0x7FE0
+0x3F6A = 0x8870
+0x3F6B = 0x9042
+0x3F6C = 0x9154
+0x3F6D = 0x9310
+0x3F6E = 0x9318
+0x3F6F = 0x968F
+0x3F70 = 0x745E
+0x3F71 = 0x9AC4
+0x3F72 = 0x5D07
+0x3F73 = 0x5D69
+0x3F74 = 0x6570
+0x3F75 = 0x67A2
+0x3F76 = 0x8DA8
+0x3F77 = 0x96DB
+0x3F78 = 0x636E
+0x3F79 = 0x6749
+0x3F7A = 0x6919
+0x3F7B = 0x83C5
+0x3F7C = 0x9817
+0x3F7D = 0x96C0
+0x3F7E = 0x88FE
+0x4021 = 0x6F84
+0x4022 = 0x647A
+0x4023 = 0x5BF8
+0x4024 = 0x4E16
+0x4025 = 0x702C
+0x4026 = 0x755D
+0x4027 = 0x662F
+0x4028 = 0x51C4
+0x4029 = 0x5236
+0x402A = 0x52E2
+0x402B = 0x59D3
+0x402C = 0x5F81
+0x402D = 0x6027
+0x402E = 0x6210
+0x402F = 0x653F
+0x4030 = 0x6574
+0x4031 = 0x661F
+0x4032 = 0x6674
+0x4033 = 0x68F2
+0x4034 = 0x6816
+0x4035 = 0x6B63
+0x4036 = 0x6E05
+0x4037 = 0x7272
+0x4038 = 0x751F
+0x4039 = 0x76DB
+0x403A = 0x7CBE
+0x403B = 0x8056
+0x403C = 0x58F0
+0x403D = 0x88FD
+0x403E = 0x897F
+0x403F = 0x8AA0
+0x4040 = 0x8A93
+0x4041 = 0x8ACB
+0x4042 = 0x901D
+0x4043 = 0x9192
+0x4044 = 0x9752
+0x4045 = 0x9759
+0x4046 = 0x6589
+0x4047 = 0x7A0E
+0x4048 = 0x8106
+0x4049 = 0x96BB
+0x404A = 0x5E2D
+0x404B = 0x60DC
+0x404C = 0x621A
+0x404D = 0x65A5
+0x404E = 0x6614
+0x404F = 0x6790
+0x4050 = 0x77F3
+0x4051 = 0x7A4D
+0x4052 = 0x7C4D
+0x4053 = 0x7E3E
+0x4054 = 0x810A
+0x4055 = 0x8CAC
+0x4056 = 0x8D64
+0x4057 = 0x8DE1
+0x4058 = 0x8E5F
+0x4059 = 0x78A9
+0x405A = 0x5207
+0x405B = 0x62D9
+0x405C = 0x63A5
+0x405D = 0x6442
+0x405E = 0x6298
+0x405F = 0x8A2D
+0x4060 = 0x7A83
+0x4061 = 0x7BC0
+0x4062 = 0x8AAC
+0x4063 = 0x96EA
+0x4064 = 0x7D76
+0x4065 = 0x820C
+0x4066 = 0x8749
+0x4067 = 0x4ED9
+0x4068 = 0x5148
+0x4069 = 0x5343
+0x406A = 0x5360
+0x406B = 0x5BA3
+0x406C = 0x5C02
+0x406D = 0x5C16
+0x406E = 0x5DDD
+0x406F = 0x6226
+0x4070 = 0x6247
+0x4071 = 0x64B0
+0x4072 = 0x6813
+0x4073 = 0x6834
+0x4074 = 0x6CC9
+0x4075 = 0x6D45
+0x4076 = 0x6D17
+0x4077 = 0x67D3
+0x4078 = 0x6F5C
+0x4079 = 0x714E
+0x407A = 0x717D
+0x407B = 0x65CB
+0x407C = 0x7A7F
+0x407D = 0x7BAD
+0x407E = 0x7DDA
+0x4121 = 0x7E4A
+0x4122 = 0x7FA8
+0x4123 = 0x817A
+0x4124 = 0x821B
+0x4125 = 0x8239
+0x4126 = 0x85A6
+0x4127 = 0x8A6E
+0x4128 = 0x8CCE
+0x4129 = 0x8DF5
+0x412A = 0x9078
+0x412B = 0x9077
+0x412C = 0x92AD
+0x412D = 0x9291
+0x412E = 0x9583
+0x412F = 0x9BAE
+0x4130 = 0x524D
+0x4131 = 0x5584
+0x4132 = 0x6F38
+0x4133 = 0x7136
+0x4134 = 0x5168
+0x4135 = 0x7985
+0x4136 = 0x7E55
+0x4137 = 0x81B3
+0x4138 = 0x7CCE
+0x4139 = 0x564C
+0x413A = 0x5851
+0x413B = 0x5CA8
+0x413C = 0x63AA
+0x413D = 0x66FE
+0x413E = 0x66FD
+0x413F = 0x695A
+0x4140 = 0x72D9
+0x4141 = 0x758F
+0x4142 = 0x758E
+0x4143 = 0x790E
+0x4144 = 0x7956
+0x4145 = 0x79DF
+0x4146 = 0x7C97
+0x4147 = 0x7D20
+0x4148 = 0x7D44
+0x4149 = 0x8607
+0x414A = 0x8A34
+0x414B = 0x963B
+0x414C = 0x9061
+0x414D = 0x9F20
+0x414E = 0x50E7
+0x414F = 0x5275
+0x4150 = 0x53CC
+0x4151 = 0x53E2
+0x4152 = 0x5009
+0x4153 = 0x55AA
+0x4154 = 0x58EE
+0x4155 = 0x594F
+0x4156 = 0x723D
+0x4157 = 0x5B8B
+0x4158 = 0x5C64
+0x4159 = 0x531D
+0x415A = 0x60E3
+0x415B = 0x60F3
+0x415C = 0x635C
+0x415D = 0x6383
+0x415E = 0x633F
+0x415F = 0x63BB
+0x4160 = 0x64CD
+0x4161 = 0x65E9
+0x4162 = 0x66F9
+0x4163 = 0x5DE3
+0x4164 = 0x69CD
+0x4165 = 0x69FD
+0x4166 = 0x6F15
+0x4167 = 0x71E5
+0x4168 = 0x4E89
+0x4169 = 0x75E9
+0x416A = 0x76F8
+0x416B = 0x7A93
+0x416C = 0x7CDF
+0x416D = 0x7DCF
+0x416E = 0x7D9C
+0x416F = 0x8061
+0x4170 = 0x8349
+0x4171 = 0x8358
+0x4172 = 0x846C
+0x4173 = 0x84BC
+0x4174 = 0x85FB
+0x4175 = 0x88C5
+0x4176 = 0x8D70
+0x4177 = 0x9001
+0x4178 = 0x906D
+0x4179 = 0x9397
+0x417A = 0x971C
+0x417B = 0x9A12
+0x417C = 0x50CF
+0x417D = 0x5897
+0x417E = 0x618E
+0x4221 = 0x81D3
+0x4222 = 0x8535
+0x4223 = 0x8D08
+0x4224 = 0x9020
+0x4225 = 0x4FC3
+0x4226 = 0x5074
+0x4227 = 0x5247
+0x4228 = 0x5373
+0x4229 = 0x606F
+0x422A = 0x6349
+0x422B = 0x675F
+0x422C = 0x6E2C
+0x422D = 0x8DB3
+0x422E = 0x901F
+0x422F = 0x4FD7
+0x4230 = 0x5C5E
+0x4231 = 0x8CCA
+0x4232 = 0x65CF
+0x4233 = 0x7D9A
+0x4234 = 0x5352
+0x4235 = 0x8896
+0x4236 = 0x5176
+0x4237 = 0x63C3
+0x4238 = 0x5B58
+0x4239 = 0x5B6B
+0x423A = 0x5C0A
+0x423B = 0x640D
+0x423C = 0x6751
+0x423D = 0x905C
+0x423E = 0x4ED6
+0x423F = 0x591A
+0x4240 = 0x592A
+0x4241 = 0x6C70
+0x4242 = 0x8A51
+0x4243 = 0x553E
+0x4244 = 0x5815
+0x4245 = 0x59A5
+0x4246 = 0x60F0
+0x4247 = 0x6253
+0x4248 = 0x67C1
+0x4249 = 0x8235
+0x424A = 0x6955
+0x424B = 0x9640
+0x424C = 0x99C4
+0x424D = 0x9A28
+0x424E = 0x4F53
+0x424F = 0x5806
+0x4250 = 0x5BFE
+0x4251 = 0x8010
+0x4252 = 0x5CB1
+0x4253 = 0x5E2F
+0x4254 = 0x5F85
+0x4255 = 0x6020
+0x4256 = 0x614B
+0x4257 = 0x6234
+0x4258 = 0x66FF
+0x4259 = 0x6CF0
+0x425A = 0x6EDE
+0x425B = 0x80CE
+0x425C = 0x817F
+0x425D = 0x82D4
+0x425E = 0x888B
+0x425F = 0x8CB8
+0x4260 = 0x9000
+0x4261 = 0x902E
+0x4262 = 0x968A
+0x4263 = 0x9EDB
+0x4264 = 0x9BDB
+0x4265 = 0x4EE3
+0x4266 = 0x53F0
+0x4267 = 0x5927
+0x4268 = 0x7B2C
+0x4269 = 0x918D
+0x426A = 0x984C
+0x426B = 0x9DF9
+0x426C = 0x6EDD
+0x426D = 0x7027
+0x426E = 0x5353
+0x426F = 0x5544
+0x4270 = 0x5B85
+0x4271 = 0x6258
+0x4272 = 0x629E
+0x4273 = 0x62D3
+0x4274 = 0x6CA2
+0x4275 = 0x6FEF
+0x4276 = 0x7422
+0x4277 = 0x8A17
+0x4278 = 0x9438
+0x4279 = 0x6FC1
+0x427A = 0x8AFE
+0x427B = 0x8338
+0x427C = 0x51E7
+0x427D = 0x86F8
+0x427E = 0x53EA
+0x4321 = 0x53E9
+0x4322 = 0x4F46
+0x4323 = 0x9054
+0x4324 = 0x8FB0
+0x4325 = 0x596A
+0x4326 = 0x8131
+0x4327 = 0x5DFD
+0x4328 = 0x7AEA
+0x4329 = 0x8FBF
+0x432A = 0x68DA
+0x432B = 0x8C37
+0x432C = 0x72F8
+0x432D = 0x9C48
+0x432E = 0x6A3D
+0x432F = 0x8AB0
+0x4330 = 0x4E39
+0x4331 = 0x5358
+0x4332 = 0x5606
+0x4333 = 0x5766
+0x4334 = 0x62C5
+0x4335 = 0x63A2
+0x4336 = 0x65E6
+0x4337 = 0x6B4E
+0x4338 = 0x6DE1
+0x4339 = 0x6E5B
+0x433A = 0x70AD
+0x433B = 0x77ED
+0x433C = 0x7AEF
+0x433D = 0x7BAA
+0x433E = 0x7DBB
+0x433F = 0x803D
+0x4340 = 0x80C6
+0x4341 = 0x86CB
+0x4342 = 0x8A95
+0x4343 = 0x935B
+0x4344 = 0x56E3
+0x4345 = 0x58C7
+0x4346 = 0x5F3E
+0x4347 = 0x65AD
+0x4348 = 0x6696
+0x4349 = 0x6A80
+0x434A = 0x6BB5
+0x434B = 0x7537
+0x434C = 0x8AC7
+0x434D = 0x5024
+0x434E = 0x77E5
+0x434F = 0x5730
+0x4350 = 0x5F1B
+0x4351 = 0x6065
+0x4352 = 0x667A
+0x4353 = 0x6C60
+0x4354 = 0x75F4
+0x4355 = 0x7A1A
+0x4356 = 0x7F6E
+0x4357 = 0x81F4
+0x4358 = 0x8718
+0x4359 = 0x9045
+0x435A = 0x99B3
+0x435B = 0x7BC9
+0x435C = 0x755C
+0x435D = 0x7AF9
+0x435E = 0x7B51
+0x435F = 0x84C4
+0x4360 = 0x9010
+0x4361 = 0x79E9
+0x4362 = 0x7A92
+0x4363 = 0x8336
+0x4364 = 0x5AE1
+0x4365 = 0x7740
+0x4366 = 0x4E2D
+0x4367 = 0x4EF2
+0x4368 = 0x5B99
+0x4369 = 0x5FE0
+0x436A = 0x62BD
+0x436B = 0x663C
+0x436C = 0x67F1
+0x436D = 0x6CE8
+0x436E = 0x866B
+0x436F = 0x8877
+0x4370 = 0x8A3B
+0x4371 = 0x914E
+0x4372 = 0x92F3
+0x4373 = 0x99D0
+0x4374 = 0x6A17
+0x4375 = 0x7026
+0x4376 = 0x732A
+0x4377 = 0x82E7
+0x4378 = 0x8457
+0x4379 = 0x8CAF
+0x437A = 0x4E01
+0x437B = 0x5146
+0x437C = 0x51CB
+0x437D = 0x558B
+0x437E = 0x5BF5
+0x4421 = 0x5E16
+0x4422 = 0x5E33
+0x4423 = 0x5E81
+0x4424 = 0x5F14
+0x4425 = 0x5F35
+0x4426 = 0x5F6B
+0x4427 = 0x5FB4
+0x4428 = 0x61F2
+0x4429 = 0x6311
+0x442A = 0x66A2
+0x442B = 0x671D
+0x442C = 0x6F6E
+0x442D = 0x7252
+0x442E = 0x753A
+0x442F = 0x773A
+0x4430 = 0x8074
+0x4431 = 0x8139
+0x4432 = 0x8178
+0x4433 = 0x8776
+0x4434 = 0x8ABF
+0x4435 = 0x8ADC
+0x4436 = 0x8D85
+0x4437 = 0x8DF3
+0x4438 = 0x929A
+0x4439 = 0x9577
+0x443A = 0x9802
+0x443B = 0x9CE5
+0x443C = 0x52C5
+0x443D = 0x6357
+0x443E = 0x76F4
+0x443F = 0x6715
+0x4440 = 0x6C88
+0x4441 = 0x73CD
+0x4442 = 0x8CC3
+0x4443 = 0x93AE
+0x4444 = 0x9673
+0x4445 = 0x6D25
+0x4446 = 0x589C
+0x4447 = 0x690E
+0x4448 = 0x69CC
+0x4449 = 0x8FFD
+0x444A = 0x939A
+0x444B = 0x75DB
+0x444C = 0x901A
+0x444D = 0x585A
+0x444E = 0x6802
+0x444F = 0x63B4
+0x4450 = 0x69FB
+0x4451 = 0x4F43
+0x4452 = 0x6F2C
+0x4453 = 0x67D8
+0x4454 = 0x8FBB
+0x4455 = 0x8526
+0x4456 = 0x7DB4
+0x4457 = 0x9354
+0x4458 = 0x693F
+0x4459 = 0x6F70
+0x445A = 0x576A
+0x445B = 0x58F7
+0x445C = 0x5B2C
+0x445D = 0x7D2C
+0x445E = 0x722A
+0x445F = 0x540A
+0x4460 = 0x91E3
+0x4461 = 0x9DB4
+0x4462 = 0x4EAD
+0x4463 = 0x4F4E
+0x4464 = 0x505C
+0x4465 = 0x5075
+0x4466 = 0x5243
+0x4467 = 0x8C9E
+0x4468 = 0x5448
+0x4469 = 0x5824
+0x446A = 0x5B9A
+0x446B = 0x5E1D
+0x446C = 0x5E95
+0x446D = 0x5EAD
+0x446E = 0x5EF7
+0x446F = 0x5F1F
+0x4470 = 0x608C
+0x4471 = 0x62B5
+0x4472 = 0x633A
+0x4473 = 0x63D0
+0x4474 = 0x68AF
+0x4475 = 0x6C40
+0x4476 = 0x7887
+0x4477 = 0x798E
+0x4478 = 0x7A0B
+0x4479 = 0x7DE0
+0x447A = 0x8247
+0x447B = 0x8A02
+0x447C = 0x8AE6
+0x447D = 0x8E44
+0x447E = 0x9013
+0x4521 = 0x90B8
+0x4522 = 0x912D
+0x4523 = 0x91D8
+0x4524 = 0x9F0E
+0x4525 = 0x6CE5
+0x4526 = 0x6458
+0x4527 = 0x64E2
+0x4528 = 0x6575
+0x4529 = 0x6EF4
+0x452A = 0x7684
+0x452B = 0x7B1B
+0x452C = 0x9069
+0x452D = 0x93D1
+0x452E = 0x6EBA
+0x452F = 0x54F2
+0x4530 = 0x5FB9
+0x4531 = 0x64A4
+0x4532 = 0x8F4D
+0x4533 = 0x8FED
+0x4534 = 0x9244
+0x4535 = 0x5178
+0x4536 = 0x586B
+0x4537 = 0x5929
+0x4538 = 0x5C55
+0x4539 = 0x5E97
+0x453A = 0x6DFB
+0x453B = 0x7E8F
+0x453C = 0x751C
+0x453D = 0x8CBC
+0x453E = 0x8EE2
+0x453F = 0x985B
+0x4540 = 0x70B9
+0x4541 = 0x4F1D
+0x4542 = 0x6BBF
+0x4543 = 0x6FB1
+0x4544 = 0x7530
+0x4545 = 0x96FB
+0x4546 = 0x514E
+0x4547 = 0x5410
+0x4548 = 0x5835
+0x4549 = 0x5857
+0x454A = 0x59AC
+0x454B = 0x5C60
+0x454C = 0x5F92
+0x454D = 0x6597
+0x454E = 0x675C
+0x454F = 0x6E21
+0x4550 = 0x767B
+0x4551 = 0x83DF
+0x4552 = 0x8CED
+0x4553 = 0x9014
+0x4554 = 0x90FD
+0x4555 = 0x934D
+0x4556 = 0x7825
+0x4557 = 0x783A
+0x4558 = 0x52AA
+0x4559 = 0x5EA6
+0x455A = 0x571F
+0x455B = 0x5974
+0x455C = 0x6012
+0x455D = 0x5012
+0x455E = 0x515A
+0x455F = 0x51AC
+0x4560 = 0x51CD
+0x4561 = 0x5200
+0x4562 = 0x5510
+0x4563 = 0x5854
+0x4564 = 0x5858
+0x4565 = 0x5957
+0x4566 = 0x5B95
+0x4567 = 0x5CF6
+0x4568 = 0x5D8B
+0x4569 = 0x60BC
+0x456A = 0x6295
+0x456B = 0x642D
+0x456C = 0x6771
+0x456D = 0x6843
+0x456E = 0x68BC
+0x456F = 0x68DF
+0x4570 = 0x76D7
+0x4571 = 0x6DD8
+0x4572 = 0x6E6F
+0x4573 = 0x6D9B
+0x4574 = 0x706F
+0x4575 = 0x71C8
+0x4576 = 0x5F53
+0x4577 = 0x75D8
+0x4578 = 0x7977
+0x4579 = 0x7B49
+0x457A = 0x7B54
+0x457B = 0x7B52
+0x457C = 0x7CD6
+0x457D = 0x7D71
+0x457E = 0x5230
+0x4621 = 0x8463
+0x4622 = 0x8569
+0x4623 = 0x85E4
+0x4624 = 0x8A0E
+0x4625 = 0x8B04
+0x4626 = 0x8C46
+0x4627 = 0x8E0F
+0x4628 = 0x9003
+0x4629 = 0x900F
+0x462A = 0x9419
+0x462B = 0x9676
+0x462C = 0x982D
+0x462D = 0x9A30
+0x462E = 0x95D8
+0x462F = 0x50CD
+0x4630 = 0x52D5
+0x4631 = 0x540C
+0x4632 = 0x5802
+0x4633 = 0x5C0E
+0x4634 = 0x61A7
+0x4635 = 0x649E
+0x4636 = 0x6D1E
+0x4637 = 0x77B3
+0x4638 = 0x7AE5
+0x4639 = 0x80F4
+0x463A = 0x8404
+0x463B = 0x9053
+0x463C = 0x9285
+0x463D = 0x5CE0
+0x463E = 0x9D07
+0x463F = 0x533F
+0x4640 = 0x5F97
+0x4641 = 0x5FB3
+0x4642 = 0x6D9C
+0x4643 = 0x7279
+0x4644 = 0x7763
+0x4645 = 0x79BF
+0x4646 = 0x7BE4
+0x4647 = 0x6BD2
+0x4648 = 0x72EC
+0x4649 = 0x8AAD
+0x464A = 0x6803
+0x464B = 0x6A61
+0x464C = 0x51F8
+0x464D = 0x7A81
+0x464E = 0x6934
+0x464F = 0x5C4A
+0x4650 = 0x9CF6
+0x4651 = 0x82EB
+0x4652 = 0x5BC5
+0x4653 = 0x9149
+0x4654 = 0x701E
+0x4655 = 0x5678
+0x4656 = 0x5C6F
+0x4657 = 0x60C7
+0x4658 = 0x6566
+0x4659 = 0x6C8C
+0x465A = 0x8C5A
+0x465B = 0x9041
+0x465C = 0x9813
+0x465D = 0x5451
+0x465E = 0x66C7
+0x465F = 0x920D
+0x4660 = 0x5948
+0x4661 = 0x90A3
+0x4662 = 0x5185
+0x4663 = 0x4E4D
+0x4664 = 0x51EA
+0x4665 = 0x8599
+0x4666 = 0x8B0E
+0x4667 = 0x7058
+0x4668 = 0x637A
+0x4669 = 0x934B
+0x466A = 0x6962
+0x466B = 0x99B4
+0x466C = 0x7E04
+0x466D = 0x7577
+0x466E = 0x5357
+0x466F = 0x6960
+0x4670 = 0x8EDF
+0x4671 = 0x96E3
+0x4672 = 0x6C5D
+0x4673 = 0x4E8C
+0x4674 = 0x5C3C
+0x4675 = 0x5F10
+0x4676 = 0x8FE9
+0x4677 = 0x5302
+0x4678 = 0x8CD1
+0x4679 = 0x8089
+0x467A = 0x8679
+0x467B = 0x5EFF
+0x467C = 0x65E5
+0x467D = 0x4E73
+0x467E = 0x5165
+0x4721 = 0x5982
+0x4722 = 0x5C3F
+0x4723 = 0x97EE
+0x4724 = 0x4EFB
+0x4725 = 0x598A
+0x4726 = 0x5FCD
+0x4727 = 0x8A8D
+0x4728 = 0x6FE1
+0x4729 = 0x79B0
+0x472A = 0x7962
+0x472B = 0x5BE7
+0x472C = 0x8471
+0x472D = 0x732B
+0x472E = 0x71B1
+0x472F = 0x5E74
+0x4730 = 0x5FF5
+0x4731 = 0x637B
+0x4732 = 0x649A
+0x4733 = 0x71C3
+0x4734 = 0x7C98
+0x4735 = 0x4E43
+0x4736 = 0x5EFC
+0x4737 = 0x4E4B
+0x4738 = 0x57DC
+0x4739 = 0x56A2
+0x473A = 0x60A9
+0x473B = 0x6FC3
+0x473C = 0x7D0D
+0x473D = 0x80FD
+0x473E = 0x8133
+0x473F = 0x81BF
+0x4740 = 0x8FB2
+0x4741 = 0x8997
+0x4742 = 0x86A4
+0x4743 = 0x5DF4
+0x4744 = 0x628A
+0x4745 = 0x64AD
+0x4746 = 0x8987
+0x4747 = 0x6777
+0x4748 = 0x6CE2
+0x4749 = 0x6D3E
+0x474A = 0x7436
+0x474B = 0x7834
+0x474C = 0x5A46
+0x474D = 0x7F75
+0x474E = 0x82AD
+0x474F = 0x99AC
+0x4750 = 0x4FF3
+0x4751 = 0x5EC3
+0x4752 = 0x62DD
+0x4753 = 0x6392
+0x4754 = 0x6557
+0x4755 = 0x676F
+0x4756 = 0x76C3
+0x4757 = 0x724C
+0x4758 = 0x80CC
+0x4759 = 0x80BA
+0x475A = 0x8F29
+0x475B = 0x914D
+0x475C = 0x500D
+0x475D = 0x57F9
+0x475E = 0x5A92
+0x475F = 0x6885
+0x4760 = 0x6973
+0x4761 = 0x7164
+0x4762 = 0x72FD
+0x4763 = 0x8CB7
+0x4764 = 0x58F2
+0x4765 = 0x8CE0
+0x4766 = 0x966A
+0x4767 = 0x9019
+0x4768 = 0x877F
+0x4769 = 0x79E4
+0x476A = 0x77E7
+0x476B = 0x8429
+0x476C = 0x4F2F
+0x476D = 0x5265
+0x476E = 0x535A
+0x476F = 0x62CD
+0x4770 = 0x67CF
+0x4771 = 0x6CCA
+0x4772 = 0x767D
+0x4773 = 0x7B94
+0x4774 = 0x7C95
+0x4775 = 0x8236
+0x4776 = 0x8584
+0x4777 = 0x8FEB
+0x4778 = 0x66DD
+0x4779 = 0x6F20
+0x477A = 0x7206
+0x477B = 0x7E1B
+0x477C = 0x83AB
+0x477D = 0x99C1
+0x477E = 0x9EA6
+0x4821 = 0x51FD
+0x4822 = 0x7BB1
+0x4823 = 0x7872
+0x4824 = 0x7BB8
+0x4825 = 0x8087
+0x4826 = 0x7B48
+0x4827 = 0x6AE8
+0x4828 = 0x5E61
+0x4829 = 0x808C
+0x482A = 0x7551
+0x482B = 0x7560
+0x482C = 0x516B
+0x482D = 0x9262
+0x482E = 0x6E8C
+0x482F = 0x767A
+0x4830 = 0x9197
+0x4831 = 0x9AEA
+0x4832 = 0x4F10
+0x4833 = 0x7F70
+0x4834 = 0x629C
+0x4835 = 0x7B4F
+0x4836 = 0x95A5
+0x4837 = 0x9CE9
+0x4838 = 0x567A
+0x4839 = 0x5859
+0x483A = 0x86E4
+0x483B = 0x96BC
+0x483C = 0x4F34
+0x483D = 0x5224
+0x483E = 0x534A
+0x483F = 0x53CD
+0x4840 = 0x53DB
+0x4841 = 0x5E06
+0x4842 = 0x642C
+0x4843 = 0x6591
+0x4844 = 0x677F
+0x4845 = 0x6C3E
+0x4846 = 0x6C4E
+0x4847 = 0x7248
+0x4848 = 0x72AF
+0x4849 = 0x73ED
+0x484A = 0x7554
+0x484B = 0x7E41
+0x484C = 0x822C
+0x484D = 0x85E9
+0x484E = 0x8CA9
+0x484F = 0x7BC4
+0x4850 = 0x91C6
+0x4851 = 0x7169
+0x4852 = 0x9812
+0x4853 = 0x98EF
+0x4854 = 0x633D
+0x4855 = 0x6669
+0x4856 = 0x756A
+0x4857 = 0x76E4
+0x4858 = 0x78D0
+0x4859 = 0x8543
+0x485A = 0x86EE
+0x485B = 0x532A
+0x485C = 0x5351
+0x485D = 0x5426
+0x485E = 0x5983
+0x485F = 0x5E87
+0x4860 = 0x5F7C
+0x4861 = 0x60B2
+0x4862 = 0x6249
+0x4863 = 0x6279
+0x4864 = 0x62AB
+0x4865 = 0x6590
+0x4866 = 0x6BD4
+0x4867 = 0x6CCC
+0x4868 = 0x75B2
+0x4869 = 0x76AE
+0x486A = 0x7891
+0x486B = 0x79D8
+0x486C = 0x7DCB
+0x486D = 0x7F77
+0x486E = 0x80A5
+0x486F = 0x88AB
+0x4870 = 0x8AB9
+0x4871 = 0x8CBB
+0x4872 = 0x907F
+0x4873 = 0x975E
+0x4874 = 0x98DB
+0x4875 = 0x6A0B
+0x4876 = 0x7C38
+0x4877 = 0x5099
+0x4878 = 0x5C3E
+0x4879 = 0x5FAE
+0x487A = 0x6787
+0x487B = 0x6BD8
+0x487C = 0x7435
+0x487D = 0x7709
+0x487E = 0x7F8E
+0x4921 = 0x9F3B
+0x4922 = 0x67CA
+0x4923 = 0x7A17
+0x4924 = 0x5339
+0x4925 = 0x758B
+0x4926 = 0x9AED
+0x4927 = 0x5F66
+0x4928 = 0x819D
+0x4929 = 0x83F1
+0x492A = 0x8098
+0x492B = 0x5F3C
+0x492C = 0x5FC5
+0x492D = 0x7562
+0x492E = 0x7B46
+0x492F = 0x903C
+0x4930 = 0x6867
+0x4931 = 0x59EB
+0x4932 = 0x5A9B
+0x4933 = 0x7D10
+0x4934 = 0x767E
+0x4935 = 0x8B2C
+0x4936 = 0x4FF5
+0x4937 = 0x5F6A
+0x4938 = 0x6A19
+0x4939 = 0x6C37
+0x493A = 0x6F02
+0x493B = 0x74E2
+0x493C = 0x7968
+0x493D = 0x8868
+0x493E = 0x8A55
+0x493F = 0x8C79
+0x4940 = 0x5EDF
+0x4941 = 0x63CF
+0x4942 = 0x75C5
+0x4943 = 0x79D2
+0x4944 = 0x82D7
+0x4945 = 0x9328
+0x4946 = 0x92F2
+0x4947 = 0x849C
+0x4948 = 0x86ED
+0x4949 = 0x9C2D
+0x494A = 0x54C1
+0x494B = 0x5F6C
+0x494C = 0x658C
+0x494D = 0x6D5C
+0x494E = 0x7015
+0x494F = 0x8CA7
+0x4950 = 0x8CD3
+0x4951 = 0x983B
+0x4952 = 0x654F
+0x4953 = 0x74F6
+0x4954 = 0x4E0D
+0x4955 = 0x4ED8
+0x4956 = 0x57E0
+0x4957 = 0x592B
+0x4958 = 0x5A66
+0x4959 = 0x5BCC
+0x495A = 0x51A8
+0x495B = 0x5E03
+0x495C = 0x5E9C
+0x495D = 0x6016
+0x495E = 0x6276
+0x495F = 0x6577
+0x4960 = 0x65A7
+0x4961 = 0x666E
+0x4962 = 0x6D6E
+0x4963 = 0x7236
+0x4964 = 0x7B26
+0x4965 = 0x8150
+0x4966 = 0x819A
+0x4967 = 0x8299
+0x4968 = 0x8B5C
+0x4969 = 0x8CA0
+0x496A = 0x8CE6
+0x496B = 0x8D74
+0x496C = 0x961C
+0x496D = 0x9644
+0x496E = 0x4FAE
+0x496F = 0x64AB
+0x4970 = 0x6B66
+0x4971 = 0x821E
+0x4972 = 0x8461
+0x4973 = 0x856A
+0x4974 = 0x90E8
+0x4975 = 0x5C01
+0x4976 = 0x6953
+0x4977 = 0x98A8
+0x4978 = 0x847A
+0x4979 = 0x8557
+0x497A = 0x4F0F
+0x497B = 0x526F
+0x497C = 0x5FA9
+0x497D = 0x5E45
+0x497E = 0x670D
+0x4A21 = 0x798F
+0x4A22 = 0x8179
+0x4A23 = 0x8907
+0x4A24 = 0x8986
+0x4A25 = 0x6DF5
+0x4A26 = 0x5F17
+0x4A27 = 0x6255
+0x4A28 = 0x6CB8
+0x4A29 = 0x4ECF
+0x4A2A = 0x7269
+0x4A2B = 0x9B92
+0x4A2C = 0x5206
+0x4A2D = 0x543B
+0x4A2E = 0x5674
+0x4A2F = 0x58B3
+0x4A30 = 0x61A4
+0x4A31 = 0x626E
+0x4A32 = 0x711A
+0x4A33 = 0x596E
+0x4A34 = 0x7C89
+0x4A35 = 0x7CDE
+0x4A36 = 0x7D1B
+0x4A37 = 0x96F0
+0x4A38 = 0x6587
+0x4A39 = 0x805E
+0x4A3A = 0x4E19
+0x4A3B = 0x4F75
+0x4A3C = 0x5175
+0x4A3D = 0x5840
+0x4A3E = 0x5E63
+0x4A3F = 0x5E73
+0x4A40 = 0x5F0A
+0x4A41 = 0x67C4
+0x4A42 = 0x4E26
+0x4A43 = 0x853D
+0x4A44 = 0x9589
+0x4A45 = 0x965B
+0x4A46 = 0x7C73
+0x4A47 = 0x9801
+0x4A48 = 0x50FB
+0x4A49 = 0x58C1
+0x4A4A = 0x7656
+0x4A4B = 0x78A7
+0x4A4C = 0x5225
+0x4A4D = 0x77A5
+0x4A4E = 0x8511
+0x4A4F = 0x7B86
+0x4A50 = 0x504F
+0x4A51 = 0x5909
+0x4A52 = 0x7247
+0x4A53 = 0x7BC7
+0x4A54 = 0x7DE8
+0x4A55 = 0x8FBA
+0x4A56 = 0x8FD4
+0x4A57 = 0x904D
+0x4A58 = 0x4FBF
+0x4A59 = 0x52C9
+0x4A5A = 0x5A29
+0x4A5B = 0x5F01
+0x4A5C = 0x97AD
+0x4A5D = 0x4FDD
+0x4A5E = 0x8217
+0x4A5F = 0x92EA
+0x4A60 = 0x5703
+0x4A61 = 0x6355
+0x4A62 = 0x6B69
+0x4A63 = 0x752B
+0x4A64 = 0x88DC
+0x4A65 = 0x8F14
+0x4A66 = 0x7A42
+0x4A67 = 0x52DF
+0x4A68 = 0x5893
+0x4A69 = 0x6155
+0x4A6A = 0x620A
+0x4A6B = 0x66AE
+0x4A6C = 0x6BCD
+0x4A6D = 0x7C3F
+0x4A6E = 0x83E9
+0x4A6F = 0x5023
+0x4A70 = 0x4FF8
+0x4A71 = 0x5305
+0x4A72 = 0x5446
+0x4A73 = 0x5831
+0x4A74 = 0x5949
+0x4A75 = 0x5B9D
+0x4A76 = 0x5CF0
+0x4A77 = 0x5CEF
+0x4A78 = 0x5D29
+0x4A79 = 0x5E96
+0x4A7A = 0x62B1
+0x4A7B = 0x6367
+0x4A7C = 0x653E
+0x4A7D = 0x65B9
+0x4A7E = 0x670B
+0x4B21 = 0x6CD5
+0x4B22 = 0x6CE1
+0x4B23 = 0x70F9
+0x4B24 = 0x7832
+0x4B25 = 0x7E2B
+0x4B26 = 0x80DE
+0x4B27 = 0x82B3
+0x4B28 = 0x840C
+0x4B29 = 0x84EC
+0x4B2A = 0x8702
+0x4B2B = 0x8912
+0x4B2C = 0x8A2A
+0x4B2D = 0x8C4A
+0x4B2E = 0x90A6
+0x4B2F = 0x92D2
+0x4B30 = 0x98FD
+0x4B31 = 0x9CF3
+0x4B32 = 0x9D6C
+0x4B33 = 0x4E4F
+0x4B34 = 0x4EA1
+0x4B35 = 0x508D
+0x4B36 = 0x5256
+0x4B37 = 0x574A
+0x4B38 = 0x59A8
+0x4B39 = 0x5E3D
+0x4B3A = 0x5FD8
+0x4B3B = 0x5FD9
+0x4B3C = 0x623F
+0x4B3D = 0x66B4
+0x4B3E = 0x671B
+0x4B3F = 0x67D0
+0x4B40 = 0x68D2
+0x4B41 = 0x5192
+0x4B42 = 0x7D21
+0x4B43 = 0x80AA
+0x4B44 = 0x81A8
+0x4B45 = 0x8B00
+0x4B46 = 0x8C8C
+0x4B47 = 0x8CBF
+0x4B48 = 0x927E
+0x4B49 = 0x9632
+0x4B4A = 0x5420
+0x4B4B = 0x982C
+0x4B4C = 0x5317
+0x4B4D = 0x50D5
+0x4B4E = 0x535C
+0x4B4F = 0x58A8
+0x4B50 = 0x64B2
+0x4B51 = 0x6734
+0x4B52 = 0x7267
+0x4B53 = 0x7766
+0x4B54 = 0x7A46
+0x4B55 = 0x91E6
+0x4B56 = 0x52C3
+0x4B57 = 0x6CA1
+0x4B58 = 0x6B86
+0x4B59 = 0x5800
+0x4B5A = 0x5E4C
+0x4B5B = 0x5954
+0x4B5C = 0x672C
+0x4B5D = 0x7FFB
+0x4B5E = 0x51E1
+0x4B5F = 0x76C6
+0x4B60 = 0x6469
+0x4B61 = 0x78E8
+0x4B62 = 0x9B54
+0x4B63 = 0x9EBB
+0x4B64 = 0x57CB
+0x4B65 = 0x59B9
+0x4B66 = 0x6627
+0x4B67 = 0x679A
+0x4B68 = 0x6BCE
+0x4B69 = 0x54E9
+0x4B6A = 0x69D9
+0x4B6B = 0x5E55
+0x4B6C = 0x819C
+0x4B6D = 0x6795
+0x4B6E = 0x9BAA
+0x4B6F = 0x67FE
+0x4B70 = 0x9C52
+0x4B71 = 0x685D
+0x4B72 = 0x4EA6
+0x4B73 = 0x4FE3
+0x4B74 = 0x53C8
+0x4B75 = 0x62B9
+0x4B76 = 0x672B
+0x4B77 = 0x6CAB
+0x4B78 = 0x8FC4
+0x4B79 = 0x4FAD
+0x4B7A = 0x7E6D
+0x4B7B = 0x9EBF
+0x4B7C = 0x4E07
+0x4B7D = 0x6162
+0x4B7E = 0x6E80
+0x4C21 = 0x6F2B
+0x4C22 = 0x8513
+0x4C23 = 0x5473
+0x4C24 = 0x672A
+0x4C25 = 0x9B45
+0x4C26 = 0x5DF3
+0x4C27 = 0x7B95
+0x4C28 = 0x5CAC
+0x4C29 = 0x5BC6
+0x4C2A = 0x871C
+0x4C2B = 0x6E4A
+0x4C2C = 0x84D1
+0x4C2D = 0x7A14
+0x4C2E = 0x8108
+0x4C2F = 0x5999
+0x4C30 = 0x7C8D
+0x4C31 = 0x6C11
+0x4C32 = 0x7720
+0x4C33 = 0x52D9
+0x4C34 = 0x5922
+0x4C35 = 0x7121
+0x4C36 = 0x725F
+0x4C37 = 0x77DB
+0x4C38 = 0x9727
+0x4C39 = 0x9D61
+0x4C3A = 0x690B
+0x4C3B = 0x5A7F
+0x4C3C = 0x5A18
+0x4C3D = 0x51A5
+0x4C3E = 0x540D
+0x4C3F = 0x547D
+0x4C40 = 0x660E
+0x4C41 = 0x76DF
+0x4C42 = 0x8FF7
+0x4C43 = 0x9298
+0x4C44 = 0x9CF4
+0x4C45 = 0x59EA
+0x4C46 = 0x725D
+0x4C47 = 0x6EC5
+0x4C48 = 0x514D
+0x4C49 = 0x68C9
+0x4C4A = 0x7DBF
+0x4C4B = 0x7DEC
+0x4C4C = 0x9762
+0x4C4D = 0x9EBA
+0x4C4E = 0x6478
+0x4C4F = 0x6A21
+0x4C50 = 0x8302
+0x4C51 = 0x5984
+0x4C52 = 0x5B5F
+0x4C53 = 0x6BDB
+0x4C54 = 0x731B
+0x4C55 = 0x76F2
+0x4C56 = 0x7DB2
+0x4C57 = 0x8017
+0x4C58 = 0x8499
+0x4C59 = 0x5132
+0x4C5A = 0x6728
+0x4C5B = 0x9ED9
+0x4C5C = 0x76EE
+0x4C5D = 0x6762
+0x4C5E = 0x52FF
+0x4C5F = 0x9905
+0x4C60 = 0x5C24
+0x4C61 = 0x623B
+0x4C62 = 0x7C7E
+0x4C63 = 0x8CB0
+0x4C64 = 0x554F
+0x4C65 = 0x60B6
+0x4C66 = 0x7D0B
+0x4C67 = 0x9580
+0x4C68 = 0x5301
+0x4C69 = 0x4E5F
+0x4C6A = 0x51B6
+0x4C6B = 0x591C
+0x4C6C = 0x723A
+0x4C6D = 0x8036
+0x4C6E = 0x91CE
+0x4C6F = 0x5F25
+0x4C70 = 0x77E2
+0x4C71 = 0x5384
+0x4C72 = 0x5F79
+0x4C73 = 0x7D04
+0x4C74 = 0x85AC
+0x4C75 = 0x8A33
+0x4C76 = 0x8E8D
+0x4C77 = 0x9756
+0x4C78 = 0x67F3
+0x4C79 = 0x85AE
+0x4C7A = 0x9453
+0x4C7B = 0x6109
+0x4C7C = 0x6108
+0x4C7D = 0x6CB9
+0x4C7E = 0x7652
+0x4D21 = 0x8AED
+0x4D22 = 0x8F38
+0x4D23 = 0x552F
+0x4D24 = 0x4F51
+0x4D25 = 0x512A
+0x4D26 = 0x52C7
+0x4D27 = 0x53CB
+0x4D28 = 0x5BA5
+0x4D29 = 0x5E7D
+0x4D2A = 0x60A0
+0x4D2B = 0x6182
+0x4D2C = 0x63D6
+0x4D2D = 0x6709
+0x4D2E = 0x67DA
+0x4D2F = 0x6E67
+0x4D30 = 0x6D8C
+0x4D31 = 0x7336
+0x4D32 = 0x7337
+0x4D33 = 0x7531
+0x4D34 = 0x7950
+0x4D35 = 0x88D5
+0x4D36 = 0x8A98
+0x4D37 = 0x904A
+0x4D38 = 0x9091
+0x4D39 = 0x90F5
+0x4D3A = 0x96C4
+0x4D3B = 0x878D
+0x4D3C = 0x5915
+0x4D3D = 0x4E88
+0x4D3E = 0x4F59
+0x4D3F = 0x4E0E
+0x4D40 = 0x8A89
+0x4D41 = 0x8F3F
+0x4D42 = 0x9810
+0x4D43 = 0x50AD
+0x4D44 = 0x5E7C
+0x4D45 = 0x5996
+0x4D46 = 0x5BB9
+0x4D47 = 0x5EB8
+0x4D48 = 0x63DA
+0x4D49 = 0x63FA
+0x4D4A = 0x64C1
+0x4D4B = 0x66DC
+0x4D4C = 0x694A
+0x4D4D = 0x69D8
+0x4D4E = 0x6D0B
+0x4D4F = 0x6EB6
+0x4D50 = 0x7194
+0x4D51 = 0x7528
+0x4D52 = 0x7AAF
+0x4D53 = 0x7F8A
+0x4D54 = 0x8000
+0x4D55 = 0x8449
+0x4D56 = 0x84C9
+0x4D57 = 0x8981
+0x4D58 = 0x8B21
+0x4D59 = 0x8E0A
+0x4D5A = 0x9065
+0x4D5B = 0x967D
+0x4D5C = 0x990A
+0x4D5D = 0x617E
+0x4D5E = 0x6291
+0x4D5F = 0x6B32
+0x4D60 = 0x6C83
+0x4D61 = 0x6D74
+0x4D62 = 0x7FCC
+0x4D63 = 0x7FFC
+0x4D64 = 0x6DC0
+0x4D65 = 0x7F85
+0x4D66 = 0x87BA
+0x4D67 = 0x88F8
+0x4D68 = 0x6765
+0x4D69 = 0x83B1
+0x4D6A = 0x983C
+0x4D6B = 0x96F7
+0x4D6C = 0x6D1B
+0x4D6D = 0x7D61
+0x4D6E = 0x843D
+0x4D6F = 0x916A
+0x4D70 = 0x4E71
+0x4D71 = 0x5375
+0x4D72 = 0x5D50
+0x4D73 = 0x6B04
+0x4D74 = 0x6FEB
+0x4D75 = 0x85CD
+0x4D76 = 0x862D
+0x4D77 = 0x89A7
+0x4D78 = 0x5229
+0x4D79 = 0x540F
+0x4D7A = 0x5C65
+0x4D7B = 0x674E
+0x4D7C = 0x68A8
+0x4D7D = 0x7406
+0x4D7E = 0x7483
+0x4E21 = 0x75E2
+0x4E22 = 0x88CF
+0x4E23 = 0x88E1
+0x4E24 = 0x91CC
+0x4E25 = 0x96E2
+0x4E26 = 0x9678
+0x4E27 = 0x5F8B
+0x4E28 = 0x7387
+0x4E29 = 0x7ACB
+0x4E2A = 0x844E
+0x4E2B = 0x63A0
+0x4E2C = 0x7565
+0x4E2D = 0x5289
+0x4E2E = 0x6D41
+0x4E2F = 0x6E9C
+0x4E30 = 0x7409
+0x4E31 = 0x7559
+0x4E32 = 0x786B
+0x4E33 = 0x7C92
+0x4E34 = 0x9686
+0x4E35 = 0x7ADC
+0x4E36 = 0x9F8D
+0x4E37 = 0x4FB6
+0x4E38 = 0x616E
+0x4E39 = 0x65C5
+0x4E3A = 0x865C
+0x4E3B = 0x4E86
+0x4E3C = 0x4EAE
+0x4E3D = 0x50DA
+0x4E3E = 0x4E21
+0x4E3F = 0x51CC
+0x4E40 = 0x5BEE
+0x4E41 = 0x6599
+0x4E42 = 0x6881
+0x4E43 = 0x6DBC
+0x4E44 = 0x731F
+0x4E45 = 0x7642
+0x4E46 = 0x77AD
+0x4E47 = 0x7A1C
+0x4E48 = 0x7CE7
+0x4E49 = 0x826F
+0x4E4A = 0x8AD2
+0x4E4B = 0x907C
+0x4E4C = 0x91CF
+0x4E4D = 0x9675
+0x4E4E = 0x9818
+0x4E4F = 0x529B
+0x4E50 = 0x7DD1
+0x4E51 = 0x502B
+0x4E52 = 0x5398
+0x4E53 = 0x6797
+0x4E54 = 0x6DCB
+0x4E55 = 0x71D0
+0x4E56 = 0x7433
+0x4E57 = 0x81E8
+0x4E58 = 0x8F2A
+0x4E59 = 0x96A3
+0x4E5A = 0x9C57
+0x4E5B = 0x9E9F
+0x4E5C = 0x7460
+0x4E5D = 0x5841
+0x4E5E = 0x6D99
+0x4E5F = 0x7D2F
+0x4E60 = 0x985E
+0x4E61 = 0x4EE4
+0x4E62 = 0x4F36
+0x4E63 = 0x4F8B
+0x4E64 = 0x51B7
+0x4E65 = 0x52B1
+0x4E66 = 0x5DBA
+0x4E67 = 0x601C
+0x4E68 = 0x73B2
+0x4E69 = 0x793C
+0x4E6A = 0x82D3
+0x4E6B = 0x9234
+0x4E6C = 0x96B7
+0x4E6D = 0x96F6
+0x4E6E = 0x970A
+0x4E6F = 0x9E97
+0x4E70 = 0x9F62
+0x4E71 = 0x66A6
+0x4E72 = 0x6B74
+0x4E73 = 0x5217
+0x4E74 = 0x52A3
+0x4E75 = 0x70C8
+0x4E76 = 0x88C2
+0x4E77 = 0x5EC9
+0x4E78 = 0x604B
+0x4E79 = 0x6190
+0x4E7A = 0x6F23
+0x4E7B = 0x7149
+0x4E7C = 0x7C3E
+0x4E7D = 0x7DF4
+0x4E7E = 0x806F
+0x4F21 = 0x84EE
+0x4F22 = 0x9023
+0x4F23 = 0x932C
+0x4F24 = 0x5442
+0x4F25 = 0x9B6F
+0x4F26 = 0x6AD3
+0x4F27 = 0x7089
+0x4F28 = 0x8CC2
+0x4F29 = 0x8DEF
+0x4F2A = 0x9732
+0x4F2B = 0x52B4
+0x4F2C = 0x5A41
+0x4F2D = 0x5ECA
+0x4F2E = 0x5F04
+0x4F2F = 0x6717
+0x4F30 = 0x697C
+0x4F31 = 0x6994
+0x4F32 = 0x6D6A
+0x4F33 = 0x6F0F
+0x4F34 = 0x7262
+0x4F35 = 0x72FC
+0x4F36 = 0x7BED
+0x4F37 = 0x8001
+0x4F38 = 0x807E
+0x4F39 = 0x874B
+0x4F3A = 0x90CE
+0x4F3B = 0x516D
+0x4F3C = 0x9E93
+0x4F3D = 0x7984
+0x4F3E = 0x808B
+0x4F3F = 0x9332
+0x4F40 = 0x8AD6
+0x4F41 = 0x502D
+0x4F42 = 0x548C
+0x4F43 = 0x8A71
+0x4F44 = 0x6B6A
+0x4F45 = 0x8CC4
+0x4F46 = 0x8107
+0x4F47 = 0x60D1
+0x4F48 = 0x67A0
+0x4F49 = 0x9DF2
+0x4F4A = 0x4E99
+0x4F4B = 0x4E98
+0x4F4C = 0x9C10
+0x4F4D = 0x8A6B
+0x4F4E = 0x85C1
+0x4F4F = 0x8568
+0x4F50 = 0x6900
+0x4F51 = 0x6E7E
+0x4F52 = 0x7897
+0x4F53 = 0x8155
+0x5021 = 0x5F0C
+0x5022 = 0x4E10
+0x5023 = 0x4E15
+0x5024 = 0x4E2A
+0x5025 = 0x4E31
+0x5026 = 0x4E36
+0x5027 = 0x4E3C
+0x5028 = 0x4E3F
+0x5029 = 0x4E42
+0x502A = 0x4E56
+0x502B = 0x4E58
+0x502C = 0x4E82
+0x502D = 0x4E85
+0x502E = 0x8C6B
+0x502F = 0x4E8A
+0x5030 = 0x8212
+0x5031 = 0x5F0D
+0x5032 = 0x4E8E
+0x5033 = 0x4E9E
+0x5034 = 0x4E9F
+0x5035 = 0x4EA0
+0x5036 = 0x4EA2
+0x5037 = 0x4EB0
+0x5038 = 0x4EB3
+0x5039 = 0x4EB6
+0x503A = 0x4ECE
+0x503B = 0x4ECD
+0x503C = 0x4EC4
+0x503D = 0x4EC6
+0x503E = 0x4EC2
+0x503F = 0x4ED7
+0x5040 = 0x4EDE
+0x5041 = 0x4EED
+0x5042 = 0x4EDF
+0x5043 = 0x4EF7
+0x5044 = 0x4F09
+0x5045 = 0x4F5A
+0x5046 = 0x4F30
+0x5047 = 0x4F5B
+0x5048 = 0x4F5D
+0x5049 = 0x4F57
+0x504A = 0x4F47
+0x504B = 0x4F76
+0x504C = 0x4F88
+0x504D = 0x4F8F
+0x504E = 0x4F98
+0x504F = 0x4F7B
+0x5050 = 0x4F69
+0x5051 = 0x4F70
+0x5052 = 0x4F91
+0x5053 = 0x4F6F
+0x5054 = 0x4F86
+0x5055 = 0x4F96
+0x5056 = 0x5118
+0x5057 = 0x4FD4
+0x5058 = 0x4FDF
+0x5059 = 0x4FCE
+0x505A = 0x4FD8
+0x505B = 0x4FDB
+0x505C = 0x4FD1
+0x505D = 0x4FDA
+0x505E = 0x4FD0
+0x505F = 0x4FE4
+0x5060 = 0x4FE5
+0x5061 = 0x501A
+0x5062 = 0x5028
+0x5063 = 0x5014
+0x5064 = 0x502A
+0x5065 = 0x5025
+0x5066 = 0x5005
+0x5067 = 0x4F1C
+0x5068 = 0x4FF6
+0x5069 = 0x5021
+0x506A = 0x5029
+0x506B = 0x502C
+0x506C = 0x4FFE
+0x506D = 0x4FEF
+0x506E = 0x5011
+0x506F = 0x5006
+0x5070 = 0x5043
+0x5071 = 0x5047
+0x5072 = 0x6703
+0x5073 = 0x5055
+0x5074 = 0x5050
+0x5075 = 0x5048
+0x5076 = 0x505A
+0x5077 = 0x5056
+0x5078 = 0x506C
+0x5079 = 0x5078
+0x507A = 0x5080
+0x507B = 0x509A
+0x507C = 0x5085
+0x507D = 0x50B4
+0x507E = 0x50B2
+0x5121 = 0x50C9
+0x5122 = 0x50CA
+0x5123 = 0x50B3
+0x5124 = 0x50C2
+0x5125 = 0x50D6
+0x5126 = 0x50DE
+0x5127 = 0x50E5
+0x5128 = 0x50ED
+0x5129 = 0x50E3
+0x512A = 0x50EE
+0x512B = 0x50F9
+0x512C = 0x50F5
+0x512D = 0x5109
+0x512E = 0x5101
+0x512F = 0x5102
+0x5130 = 0x5116
+0x5131 = 0x5115
+0x5132 = 0x5114
+0x5133 = 0x511A
+0x5134 = 0x5121
+0x5135 = 0x513A
+0x5136 = 0x5137
+0x5137 = 0x513C
+0x5138 = 0x513B
+0x5139 = 0x513F
+0x513A = 0x5140
+0x513B = 0x5152
+0x513C = 0x514C
+0x513D = 0x5154
+0x513E = 0x5162
+0x513F = 0x7AF8
+0x5140 = 0x5169
+0x5141 = 0x516A
+0x5142 = 0x516E
+0x5143 = 0x5180
+0x5144 = 0x5182
+0x5145 = 0x56D8
+0x5146 = 0x518C
+0x5147 = 0x5189
+0x5148 = 0x518F
+0x5149 = 0x5191
+0x514A = 0x5193
+0x514B = 0x5195
+0x514C = 0x5196
+0x514D = 0x51A4
+0x514E = 0x51A6
+0x514F = 0x51A2
+0x5150 = 0x51A9
+0x5151 = 0x51AA
+0x5152 = 0x51AB
+0x5153 = 0x51B3
+0x5154 = 0x51B1
+0x5155 = 0x51B2
+0x5156 = 0x51B0
+0x5157 = 0x51B5
+0x5158 = 0x51BD
+0x5159 = 0x51C5
+0x515A = 0x51C9
+0x515B = 0x51DB
+0x515C = 0x51E0
+0x515D = 0x8655
+0x515E = 0x51E9
+0x515F = 0x51ED
+0x5160 = 0x51F0
+0x5161 = 0x51F5
+0x5162 = 0x51FE
+0x5163 = 0x5204
+0x5164 = 0x520B
+0x5165 = 0x5214
+0x5166 = 0x520E
+0x5167 = 0x5227
+0x5168 = 0x522A
+0x5169 = 0x522E
+0x516A = 0x5233
+0x516B = 0x5239
+0x516C = 0x524F
+0x516D = 0x5244
+0x516E = 0x524B
+0x516F = 0x524C
+0x5170 = 0x525E
+0x5171 = 0x5254
+0x5172 = 0x526A
+0x5173 = 0x5274
+0x5174 = 0x5269
+0x5175 = 0x5273
+0x5176 = 0x527F
+0x5177 = 0x527D
+0x5178 = 0x528D
+0x5179 = 0x5294
+0x517A = 0x5292
+0x517B = 0x5271
+0x517C = 0x5288
+0x517D = 0x5291
+0x517E = 0x8FA8
+0x5221 = 0x8FA7
+0x5222 = 0x52AC
+0x5223 = 0x52AD
+0x5224 = 0x52BC
+0x5225 = 0x52B5
+0x5226 = 0x52C1
+0x5227 = 0x52CD
+0x5228 = 0x52D7
+0x5229 = 0x52DE
+0x522A = 0x52E3
+0x522B = 0x52E6
+0x522C = 0x98ED
+0x522D = 0x52E0
+0x522E = 0x52F3
+0x522F = 0x52F5
+0x5230 = 0x52F8
+0x5231 = 0x52F9
+0x5232 = 0x5306
+0x5233 = 0x5308
+0x5234 = 0x7538
+0x5235 = 0x530D
+0x5236 = 0x5310
+0x5237 = 0x530F
+0x5238 = 0x5315
+0x5239 = 0x531A
+0x523A = 0x5323
+0x523B = 0x532F
+0x523C = 0x5331
+0x523D = 0x5333
+0x523E = 0x5338
+0x523F = 0x5340
+0x5240 = 0x5346
+0x5241 = 0x5345
+0x5242 = 0x4E17
+0x5243 = 0x5349
+0x5244 = 0x534D
+0x5245 = 0x51D6
+0x5246 = 0x535E
+0x5247 = 0x5369
+0x5248 = 0x536E
+0x5249 = 0x5918
+0x524A = 0x537B
+0x524B = 0x5377
+0x524C = 0x5382
+0x524D = 0x5396
+0x524E = 0x53A0
+0x524F = 0x53A6
+0x5250 = 0x53A5
+0x5251 = 0x53AE
+0x5252 = 0x53B0
+0x5253 = 0x53B6
+0x5254 = 0x53C3
+0x5255 = 0x7C12
+0x5256 = 0x96D9
+0x5257 = 0x53DF
+0x5258 = 0x66FC
+0x5259 = 0x71EE
+0x525A = 0x53EE
+0x525B = 0x53E8
+0x525C = 0x53ED
+0x525D = 0x53FA
+0x525E = 0x5401
+0x525F = 0x543D
+0x5260 = 0x5440
+0x5261 = 0x542C
+0x5262 = 0x542D
+0x5263 = 0x543C
+0x5264 = 0x542E
+0x5265 = 0x5436
+0x5266 = 0x5429
+0x5267 = 0x541D
+0x5268 = 0x544E
+0x5269 = 0x548F
+0x526A = 0x5475
+0x526B = 0x548E
+0x526C = 0x545F
+0x526D = 0x5471
+0x526E = 0x5477
+0x526F = 0x5470
+0x5270 = 0x5492
+0x5271 = 0x547B
+0x5272 = 0x5480
+0x5273 = 0x5476
+0x5274 = 0x5484
+0x5275 = 0x5490
+0x5276 = 0x5486
+0x5277 = 0x54C7
+0x5278 = 0x54A2
+0x5279 = 0x54B8
+0x527A = 0x54A5
+0x527B = 0x54AC
+0x527C = 0x54C4
+0x527D = 0x54C8
+0x527E = 0x54A8
+0x5321 = 0x54AB
+0x5322 = 0x54C2
+0x5323 = 0x54A4
+0x5324 = 0x54BE
+0x5325 = 0x54BC
+0x5326 = 0x54D8
+0x5327 = 0x54E5
+0x5328 = 0x54E6
+0x5329 = 0x550F
+0x532A = 0x5514
+0x532B = 0x54FD
+0x532C = 0x54EE
+0x532D = 0x54ED
+0x532E = 0x54FA
+0x532F = 0x54E2
+0x5330 = 0x5539
+0x5331 = 0x5540
+0x5332 = 0x5563
+0x5333 = 0x554C
+0x5334 = 0x552E
+0x5335 = 0x555C
+0x5336 = 0x5545
+0x5337 = 0x5556
+0x5338 = 0x5557
+0x5339 = 0x5538
+0x533A = 0x5533
+0x533B = 0x555D
+0x533C = 0x5599
+0x533D = 0x5580
+0x533E = 0x54AF
+0x533F = 0x558A
+0x5340 = 0x559F
+0x5341 = 0x557B
+0x5342 = 0x557E
+0x5343 = 0x5598
+0x5344 = 0x559E
+0x5345 = 0x55AE
+0x5346 = 0x557C
+0x5347 = 0x5583
+0x5348 = 0x55A9
+0x5349 = 0x5587
+0x534A = 0x55A8
+0x534B = 0x55DA
+0x534C = 0x55C5
+0x534D = 0x55DF
+0x534E = 0x55C4
+0x534F = 0x55DC
+0x5350 = 0x55E4
+0x5351 = 0x55D4
+0x5352 = 0x5614
+0x5353 = 0x55F7
+0x5354 = 0x5616
+0x5355 = 0x55FE
+0x5356 = 0x55FD
+0x5357 = 0x561B
+0x5358 = 0x55F9
+0x5359 = 0x564E
+0x535A = 0x5650
+0x535B = 0x71DF
+0x535C = 0x5634
+0x535D = 0x5636
+0x535E = 0x5632
+0x535F = 0x5638
+0x5360 = 0x566B
+0x5361 = 0x5664
+0x5362 = 0x562F
+0x5363 = 0x566C
+0x5364 = 0x566A
+0x5365 = 0x5686
+0x5366 = 0x5680
+0x5367 = 0x568A
+0x5368 = 0x56A0
+0x5369 = 0x5694
+0x536A = 0x568F
+0x536B = 0x56A5
+0x536C = 0x56AE
+0x536D = 0x56B6
+0x536E = 0x56B4
+0x536F = 0x56C2
+0x5370 = 0x56BC
+0x5371 = 0x56C1
+0x5372 = 0x56C3
+0x5373 = 0x56C0
+0x5374 = 0x56C8
+0x5375 = 0x56CE
+0x5376 = 0x56D1
+0x5377 = 0x56D3
+0x5378 = 0x56D7
+0x5379 = 0x56EE
+0x537A = 0x56F9
+0x537B = 0x5700
+0x537C = 0x56FF
+0x537D = 0x5704
+0x537E = 0x5709
+0x5421 = 0x5708
+0x5422 = 0x570B
+0x5423 = 0x570D
+0x5424 = 0x5713
+0x5425 = 0x5718
+0x5426 = 0x5716
+0x5427 = 0x55C7
+0x5428 = 0x571C
+0x5429 = 0x5726
+0x542A = 0x5737
+0x542B = 0x5738
+0x542C = 0x574E
+0x542D = 0x573B
+0x542E = 0x5740
+0x542F = 0x574F
+0x5430 = 0x5769
+0x5431 = 0x57C0
+0x5432 = 0x5788
+0x5433 = 0x5761
+0x5434 = 0x577F
+0x5435 = 0x5789
+0x5436 = 0x5793
+0x5437 = 0x57A0
+0x5438 = 0x57B3
+0x5439 = 0x57A4
+0x543A = 0x57AA
+0x543B = 0x57B0
+0x543C = 0x57C3
+0x543D = 0x57C6
+0x543E = 0x57D4
+0x543F = 0x57D2
+0x5440 = 0x57D3
+0x5441 = 0x580A
+0x5442 = 0x57D6
+0x5443 = 0x57E3
+0x5444 = 0x580B
+0x5445 = 0x5819
+0x5446 = 0x581D
+0x5447 = 0x5872
+0x5448 = 0x5821
+0x5449 = 0x5862
+0x544A = 0x584B
+0x544B = 0x5870
+0x544C = 0x6BC0
+0x544D = 0x5852
+0x544E = 0x583D
+0x544F = 0x5879
+0x5450 = 0x5885
+0x5451 = 0x58B9
+0x5452 = 0x589F
+0x5453 = 0x58AB
+0x5454 = 0x58BA
+0x5455 = 0x58DE
+0x5456 = 0x58BB
+0x5457 = 0x58B8
+0x5458 = 0x58AE
+0x5459 = 0x58C5
+0x545A = 0x58D3
+0x545B = 0x58D1
+0x545C = 0x58D7
+0x545D = 0x58D9
+0x545E = 0x58D8
+0x545F = 0x58E5
+0x5460 = 0x58DC
+0x5461 = 0x58E4
+0x5462 = 0x58DF
+0x5463 = 0x58EF
+0x5464 = 0x58FA
+0x5465 = 0x58F9
+0x5466 = 0x58FB
+0x5467 = 0x58FC
+0x5468 = 0x58FD
+0x5469 = 0x5902
+0x546A = 0x590A
+0x546B = 0x5910
+0x546C = 0x591B
+0x546D = 0x68A6
+0x546E = 0x5925
+0x546F = 0x592C
+0x5470 = 0x592D
+0x5471 = 0x5932
+0x5472 = 0x5938
+0x5473 = 0x593E
+0x5474 = 0x7AD2
+0x5475 = 0x5955
+0x5476 = 0x5950
+0x5477 = 0x594E
+0x5478 = 0x595A
+0x5479 = 0x5958
+0x547A = 0x5962
+0x547B = 0x5960
+0x547C = 0x5967
+0x547D = 0x596C
+0x547E = 0x5969
+0x5521 = 0x5978
+0x5522 = 0x5981
+0x5523 = 0x599D
+0x5524 = 0x4F5E
+0x5525 = 0x4FAB
+0x5526 = 0x59A3
+0x5527 = 0x59B2
+0x5528 = 0x59C6
+0x5529 = 0x59E8
+0x552A = 0x59DC
+0x552B = 0x598D
+0x552C = 0x59D9
+0x552D = 0x59DA
+0x552E = 0x5A25
+0x552F = 0x5A1F
+0x5530 = 0x5A11
+0x5531 = 0x5A1C
+0x5532 = 0x5A09
+0x5533 = 0x5A1A
+0x5534 = 0x5A40
+0x5535 = 0x5A6C
+0x5536 = 0x5A49
+0x5537 = 0x5A35
+0x5538 = 0x5A36
+0x5539 = 0x5A62
+0x553A = 0x5A6A
+0x553B = 0x5A9A
+0x553C = 0x5ABC
+0x553D = 0x5ABE
+0x553E = 0x5ACB
+0x553F = 0x5AC2
+0x5540 = 0x5ABD
+0x5541 = 0x5AE3
+0x5542 = 0x5AD7
+0x5543 = 0x5AE6
+0x5544 = 0x5AE9
+0x5545 = 0x5AD6
+0x5546 = 0x5AFA
+0x5547 = 0x5AFB
+0x5548 = 0x5B0C
+0x5549 = 0x5B0B
+0x554A = 0x5B16
+0x554B = 0x5B32
+0x554C = 0x5AD0
+0x554D = 0x5B2A
+0x554E = 0x5B36
+0x554F = 0x5B3E
+0x5550 = 0x5B43
+0x5551 = 0x5B45
+0x5552 = 0x5B40
+0x5553 = 0x5B51
+0x5554 = 0x5B55
+0x5555 = 0x5B5A
+0x5556 = 0x5B5B
+0x5557 = 0x5B65
+0x5558 = 0x5B69
+0x5559 = 0x5B70
+0x555A = 0x5B73
+0x555B = 0x5B75
+0x555C = 0x5B78
+0x555D = 0x6588
+0x555E = 0x5B7A
+0x555F = 0x5B80
+0x5560 = 0x5B83
+0x5561 = 0x5BA6
+0x5562 = 0x5BB8
+0x5563 = 0x5BC3
+0x5564 = 0x5BC7
+0x5565 = 0x5BC9
+0x5566 = 0x5BD4
+0x5567 = 0x5BD0
+0x5568 = 0x5BE4
+0x5569 = 0x5BE6
+0x556A = 0x5BE2
+0x556B = 0x5BDE
+0x556C = 0x5BE5
+0x556D = 0x5BEB
+0x556E = 0x5BF0
+0x556F = 0x5BF6
+0x5570 = 0x5BF3
+0x5571 = 0x5C05
+0x5572 = 0x5C07
+0x5573 = 0x5C08
+0x5574 = 0x5C0D
+0x5575 = 0x5C13
+0x5576 = 0x5C20
+0x5577 = 0x5C22
+0x5578 = 0x5C28
+0x5579 = 0x5C38
+0x557A = 0x5C39
+0x557B = 0x5C41
+0x557C = 0x5C46
+0x557D = 0x5C4E
+0x557E = 0x5C53
+0x5621 = 0x5C50
+0x5622 = 0x5C4F
+0x5623 = 0x5B71
+0x5624 = 0x5C6C
+0x5625 = 0x5C6E
+0x5626 = 0x4E62
+0x5627 = 0x5C76
+0x5628 = 0x5C79
+0x5629 = 0x5C8C
+0x562A = 0x5C91
+0x562B = 0x5C94
+0x562C = 0x599B
+0x562D = 0x5CAB
+0x562E = 0x5CBB
+0x562F = 0x5CB6
+0x5630 = 0x5CBC
+0x5631 = 0x5CB7
+0x5632 = 0x5CC5
+0x5633 = 0x5CBE
+0x5634 = 0x5CC7
+0x5635 = 0x5CD9
+0x5636 = 0x5CE9
+0x5637 = 0x5CFD
+0x5638 = 0x5CFA
+0x5639 = 0x5CED
+0x563A = 0x5D8C
+0x563B = 0x5CEA
+0x563C = 0x5D0B
+0x563D = 0x5D15
+0x563E = 0x5D17
+0x563F = 0x5D5C
+0x5640 = 0x5D1F
+0x5641 = 0x5D1B
+0x5642 = 0x5D11
+0x5643 = 0x5D14
+0x5644 = 0x5D22
+0x5645 = 0x5D1A
+0x5646 = 0x5D19
+0x5647 = 0x5D18
+0x5648 = 0x5D4C
+0x5649 = 0x5D52
+0x564A = 0x5D4E
+0x564B = 0x5D4B
+0x564C = 0x5D6C
+0x564D = 0x5D73
+0x564E = 0x5D76
+0x564F = 0x5D87
+0x5650 = 0x5D84
+0x5651 = 0x5D82
+0x5652 = 0x5DA2
+0x5653 = 0x5D9D
+0x5654 = 0x5DAC
+0x5655 = 0x5DAE
+0x5656 = 0x5DBD
+0x5657 = 0x5D90
+0x5658 = 0x5DB7
+0x5659 = 0x5DBC
+0x565A = 0x5DC9
+0x565B = 0x5DCD
+0x565C = 0x5DD3
+0x565D = 0x5DD2
+0x565E = 0x5DD6
+0x565F = 0x5DDB
+0x5660 = 0x5DEB
+0x5661 = 0x5DF2
+0x5662 = 0x5DF5
+0x5663 = 0x5E0B
+0x5664 = 0x5E1A
+0x5665 = 0x5E19
+0x5666 = 0x5E11
+0x5667 = 0x5E1B
+0x5668 = 0x5E36
+0x5669 = 0x5E37
+0x566A = 0x5E44
+0x566B = 0x5E43
+0x566C = 0x5E40
+0x566D = 0x5E4E
+0x566E = 0x5E57
+0x566F = 0x5E54
+0x5670 = 0x5E5F
+0x5671 = 0x5E62
+0x5672 = 0x5E64
+0x5673 = 0x5E47
+0x5674 = 0x5E75
+0x5675 = 0x5E76
+0x5676 = 0x5E7A
+0x5677 = 0x9EBC
+0x5678 = 0x5E7F
+0x5679 = 0x5EA0
+0x567A = 0x5EC1
+0x567B = 0x5EC2
+0x567C = 0x5EC8
+0x567D = 0x5ED0
+0x567E = 0x5ECF
+0x5721 = 0x5ED6
+0x5722 = 0x5EE3
+0x5723 = 0x5EDD
+0x5724 = 0x5EDA
+0x5725 = 0x5EDB
+0x5726 = 0x5EE2
+0x5727 = 0x5EE1
+0x5728 = 0x5EE8
+0x5729 = 0x5EE9
+0x572A = 0x5EEC
+0x572B = 0x5EF1
+0x572C = 0x5EF3
+0x572D = 0x5EF0
+0x572E = 0x5EF4
+0x572F = 0x5EF8
+0x5730 = 0x5EFE
+0x5731 = 0x5F03
+0x5732 = 0x5F09
+0x5733 = 0x5F5D
+0x5734 = 0x5F5C
+0x5735 = 0x5F0B
+0x5736 = 0x5F11
+0x5737 = 0x5F16
+0x5738 = 0x5F29
+0x5739 = 0x5F2D
+0x573A = 0x5F38
+0x573B = 0x5F41
+0x573C = 0x5F48
+0x573D = 0x5F4C
+0x573E = 0x5F4E
+0x573F = 0x5F2F
+0x5740 = 0x5F51
+0x5741 = 0x5F56
+0x5742 = 0x5F57
+0x5743 = 0x5F59
+0x5744 = 0x5F61
+0x5745 = 0x5F6D
+0x5746 = 0x5F73
+0x5747 = 0x5F77
+0x5748 = 0x5F83
+0x5749 = 0x5F82
+0x574A = 0x5F7F
+0x574B = 0x5F8A
+0x574C = 0x5F88
+0x574D = 0x5F91
+0x574E = 0x5F87
+0x574F = 0x5F9E
+0x5750 = 0x5F99
+0x5751 = 0x5F98
+0x5752 = 0x5FA0
+0x5753 = 0x5FA8
+0x5754 = 0x5FAD
+0x5755 = 0x5FBC
+0x5756 = 0x5FD6
+0x5757 = 0x5FFB
+0x5758 = 0x5FE4
+0x5759 = 0x5FF8
+0x575A = 0x5FF1
+0x575B = 0x5FDD
+0x575C = 0x60B3
+0x575D = 0x5FFF
+0x575E = 0x6021
+0x575F = 0x6060
+0x5760 = 0x6019
+0x5761 = 0x6010
+0x5762 = 0x6029
+0x5763 = 0x600E
+0x5764 = 0x6031
+0x5765 = 0x601B
+0x5766 = 0x6015
+0x5767 = 0x602B
+0x5768 = 0x6026
+0x5769 = 0x600F
+0x576A = 0x603A
+0x576B = 0x605A
+0x576C = 0x6041
+0x576D = 0x606A
+0x576E = 0x6077
+0x576F = 0x605F
+0x5770 = 0x604A
+0x5771 = 0x6046
+0x5772 = 0x604D
+0x5773 = 0x6063
+0x5774 = 0x6043
+0x5775 = 0x6064
+0x5776 = 0x6042
+0x5777 = 0x606C
+0x5778 = 0x606B
+0x5779 = 0x6059
+0x577A = 0x6081
+0x577B = 0x608D
+0x577C = 0x60E7
+0x577D = 0x6083
+0x577E = 0x609A
+0x5821 = 0x6084
+0x5822 = 0x609B
+0x5823 = 0x6096
+0x5824 = 0x6097
+0x5825 = 0x6092
+0x5826 = 0x60A7
+0x5827 = 0x608B
+0x5828 = 0x60E1
+0x5829 = 0x60B8
+0x582A = 0x60E0
+0x582B = 0x60D3
+0x582C = 0x60B4
+0x582D = 0x5FF0
+0x582E = 0x60BD
+0x582F = 0x60C6
+0x5830 = 0x60B5
+0x5831 = 0x60D8
+0x5832 = 0x614D
+0x5833 = 0x6115
+0x5834 = 0x6106
+0x5835 = 0x60F6
+0x5836 = 0x60F7
+0x5837 = 0x6100
+0x5838 = 0x60F4
+0x5839 = 0x60FA
+0x583A = 0x6103
+0x583B = 0x6121
+0x583C = 0x60FB
+0x583D = 0x60F1
+0x583E = 0x610D
+0x583F = 0x610E
+0x5840 = 0x6147
+0x5841 = 0x613E
+0x5842 = 0x6128
+0x5843 = 0x6127
+0x5844 = 0x614A
+0x5845 = 0x613F
+0x5846 = 0x613C
+0x5847 = 0x612C
+0x5848 = 0x6134
+0x5849 = 0x613D
+0x584A = 0x6142
+0x584B = 0x6144
+0x584C = 0x6173
+0x584D = 0x6177
+0x584E = 0x6158
+0x584F = 0x6159
+0x5850 = 0x615A
+0x5851 = 0x616B
+0x5852 = 0x6174
+0x5853 = 0x616F
+0x5854 = 0x6165
+0x5855 = 0x6171
+0x5856 = 0x615F
+0x5857 = 0x615D
+0x5858 = 0x6153
+0x5859 = 0x6175
+0x585A = 0x6199
+0x585B = 0x6196
+0x585C = 0x6187
+0x585D = 0x61AC
+0x585E = 0x6194
+0x585F = 0x619A
+0x5860 = 0x618A
+0x5861 = 0x6191
+0x5862 = 0x61AB
+0x5863 = 0x61AE
+0x5864 = 0x61CC
+0x5865 = 0x61CA
+0x5866 = 0x61C9
+0x5867 = 0x61F7
+0x5868 = 0x61C8
+0x5869 = 0x61C3
+0x586A = 0x61C6
+0x586B = 0x61BA
+0x586C = 0x61CB
+0x586D = 0x7F79
+0x586E = 0x61CD
+0x586F = 0x61E6
+0x5870 = 0x61E3
+0x5871 = 0x61F6
+0x5872 = 0x61FA
+0x5873 = 0x61F4
+0x5874 = 0x61FF
+0x5875 = 0x61FD
+0x5876 = 0x61FC
+0x5877 = 0x61FE
+0x5878 = 0x6200
+0x5879 = 0x6208
+0x587A = 0x6209
+0x587B = 0x620D
+0x587C = 0x620C
+0x587D = 0x6214
+0x587E = 0x621B
+0x5921 = 0x621E
+0x5922 = 0x6221
+0x5923 = 0x622A
+0x5924 = 0x622E
+0x5925 = 0x6230
+0x5926 = 0x6232
+0x5927 = 0x6233
+0x5928 = 0x6241
+0x5929 = 0x624E
+0x592A = 0x625E
+0x592B = 0x6263
+0x592C = 0x625B
+0x592D = 0x6260
+0x592E = 0x6268
+0x592F = 0x627C
+0x5930 = 0x6282
+0x5931 = 0x6289
+0x5932 = 0x627E
+0x5933 = 0x6292
+0x5934 = 0x6293
+0x5935 = 0x6296
+0x5936 = 0x62D4
+0x5937 = 0x6283
+0x5938 = 0x6294
+0x5939 = 0x62D7
+0x593A = 0x62D1
+0x593B = 0x62BB
+0x593C = 0x62CF
+0x593D = 0x62FF
+0x593E = 0x62C6
+0x593F = 0x64D4
+0x5940 = 0x62C8
+0x5941 = 0x62DC
+0x5942 = 0x62CC
+0x5943 = 0x62CA
+0x5944 = 0x62C2
+0x5945 = 0x62C7
+0x5946 = 0x629B
+0x5947 = 0x62C9
+0x5948 = 0x630C
+0x5949 = 0x62EE
+0x594A = 0x62F1
+0x594B = 0x6327
+0x594C = 0x6302
+0x594D = 0x6308
+0x594E = 0x62EF
+0x594F = 0x62F5
+0x5950 = 0x6350
+0x5951 = 0x633E
+0x5952 = 0x634D
+0x5953 = 0x641C
+0x5954 = 0x634F
+0x5955 = 0x6396
+0x5956 = 0x638E
+0x5957 = 0x6380
+0x5958 = 0x63AB
+0x5959 = 0x6376
+0x595A = 0x63A3
+0x595B = 0x638F
+0x595C = 0x6389
+0x595D = 0x639F
+0x595E = 0x63B5
+0x595F = 0x636B
+0x5960 = 0x6369
+0x5961 = 0x63BE
+0x5962 = 0x63E9
+0x5963 = 0x63C0
+0x5964 = 0x63C6
+0x5965 = 0x63E3
+0x5966 = 0x63C9
+0x5967 = 0x63D2
+0x5968 = 0x63F6
+0x5969 = 0x63C4
+0x596A = 0x6416
+0x596B = 0x6434
+0x596C = 0x6406
+0x596D = 0x6413
+0x596E = 0x6426
+0x596F = 0x6436
+0x5970 = 0x651D
+0x5971 = 0x6417
+0x5972 = 0x6428
+0x5973 = 0x640F
+0x5974 = 0x6467
+0x5975 = 0x646F
+0x5976 = 0x6476
+0x5977 = 0x644E
+0x5978 = 0x652A
+0x5979 = 0x6495
+0x597A = 0x6493
+0x597B = 0x64A5
+0x597C = 0x64A9
+0x597D = 0x6488
+0x597E = 0x64BC
+0x5A21 = 0x64DA
+0x5A22 = 0x64D2
+0x5A23 = 0x64C5
+0x5A24 = 0x64C7
+0x5A25 = 0x64BB
+0x5A26 = 0x64D8
+0x5A27 = 0x64C2
+0x5A28 = 0x64F1
+0x5A29 = 0x64E7
+0x5A2A = 0x8209
+0x5A2B = 0x64E0
+0x5A2C = 0x64E1
+0x5A2D = 0x62AC
+0x5A2E = 0x64E3
+0x5A2F = 0x64EF
+0x5A30 = 0x652C
+0x5A31 = 0x64F6
+0x5A32 = 0x64F4
+0x5A33 = 0x64F2
+0x5A34 = 0x64FA
+0x5A35 = 0x6500
+0x5A36 = 0x64FD
+0x5A37 = 0x6518
+0x5A38 = 0x651C
+0x5A39 = 0x6505
+0x5A3A = 0x6524
+0x5A3B = 0x6523
+0x5A3C = 0x652B
+0x5A3D = 0x6534
+0x5A3E = 0x6535
+0x5A3F = 0x6537
+0x5A40 = 0x6536
+0x5A41 = 0x6538
+0x5A42 = 0x754B
+0x5A43 = 0x6548
+0x5A44 = 0x6556
+0x5A45 = 0x6555
+0x5A46 = 0x654D
+0x5A47 = 0x6558
+0x5A48 = 0x655E
+0x5A49 = 0x655D
+0x5A4A = 0x6572
+0x5A4B = 0x6578
+0x5A4C = 0x6582
+0x5A4D = 0x6583
+0x5A4E = 0x8B8A
+0x5A4F = 0x659B
+0x5A50 = 0x659F
+0x5A51 = 0x65AB
+0x5A52 = 0x65B7
+0x5A53 = 0x65C3
+0x5A54 = 0x65C6
+0x5A55 = 0x65C1
+0x5A56 = 0x65C4
+0x5A57 = 0x65CC
+0x5A58 = 0x65D2
+0x5A59 = 0x65DB
+0x5A5A = 0x65D9
+0x5A5B = 0x65E0
+0x5A5C = 0x65E1
+0x5A5D = 0x65F1
+0x5A5E = 0x6772
+0x5A5F = 0x660A
+0x5A60 = 0x6603
+0x5A61 = 0x65FB
+0x5A62 = 0x6773
+0x5A63 = 0x6635
+0x5A64 = 0x6636
+0x5A65 = 0x6634
+0x5A66 = 0x661C
+0x5A67 = 0x664F
+0x5A68 = 0x6644
+0x5A69 = 0x6649
+0x5A6A = 0x6641
+0x5A6B = 0x665E
+0x5A6C = 0x665D
+0x5A6D = 0x6664
+0x5A6E = 0x6667
+0x5A6F = 0x6668
+0x5A70 = 0x665F
+0x5A71 = 0x6662
+0x5A72 = 0x6670
+0x5A73 = 0x6683
+0x5A74 = 0x6688
+0x5A75 = 0x668E
+0x5A76 = 0x6689
+0x5A77 = 0x6684
+0x5A78 = 0x6698
+0x5A79 = 0x669D
+0x5A7A = 0x66C1
+0x5A7B = 0x66B9
+0x5A7C = 0x66C9
+0x5A7D = 0x66BE
+0x5A7E = 0x66BC
+0x5B21 = 0x66C4
+0x5B22 = 0x66B8
+0x5B23 = 0x66D6
+0x5B24 = 0x66DA
+0x5B25 = 0x66E0
+0x5B26 = 0x663F
+0x5B27 = 0x66E6
+0x5B28 = 0x66E9
+0x5B29 = 0x66F0
+0x5B2A = 0x66F5
+0x5B2B = 0x66F7
+0x5B2C = 0x670F
+0x5B2D = 0x6716
+0x5B2E = 0x671E
+0x5B2F = 0x6726
+0x5B30 = 0x6727
+0x5B31 = 0x9738
+0x5B32 = 0x672E
+0x5B33 = 0x673F
+0x5B34 = 0x6736
+0x5B35 = 0x6741
+0x5B36 = 0x6738
+0x5B37 = 0x6737
+0x5B38 = 0x6746
+0x5B39 = 0x675E
+0x5B3A = 0x6760
+0x5B3B = 0x6759
+0x5B3C = 0x6763
+0x5B3D = 0x6764
+0x5B3E = 0x6789
+0x5B3F = 0x6770
+0x5B40 = 0x67A9
+0x5B41 = 0x677C
+0x5B42 = 0x676A
+0x5B43 = 0x678C
+0x5B44 = 0x678B
+0x5B45 = 0x67A6
+0x5B46 = 0x67A1
+0x5B47 = 0x6785
+0x5B48 = 0x67B7
+0x5B49 = 0x67EF
+0x5B4A = 0x67B4
+0x5B4B = 0x67EC
+0x5B4C = 0x67B3
+0x5B4D = 0x67E9
+0x5B4E = 0x67B8
+0x5B4F = 0x67E4
+0x5B50 = 0x67DE
+0x5B51 = 0x67DD
+0x5B52 = 0x67E2
+0x5B53 = 0x67EE
+0x5B54 = 0x67B9
+0x5B55 = 0x67CE
+0x5B56 = 0x67C6
+0x5B57 = 0x67E7
+0x5B58 = 0x6A9C
+0x5B59 = 0x681E
+0x5B5A = 0x6846
+0x5B5B = 0x6829
+0x5B5C = 0x6840
+0x5B5D = 0x684D
+0x5B5E = 0x6832
+0x5B5F = 0x684E
+0x5B60 = 0x68B3
+0x5B61 = 0x682B
+0x5B62 = 0x6859
+0x5B63 = 0x6863
+0x5B64 = 0x6877
+0x5B65 = 0x687F
+0x5B66 = 0x689F
+0x5B67 = 0x688F
+0x5B68 = 0x68AD
+0x5B69 = 0x6894
+0x5B6A = 0x689D
+0x5B6B = 0x689B
+0x5B6C = 0x6883
+0x5B6D = 0x6AAE
+0x5B6E = 0x68B9
+0x5B6F = 0x6874
+0x5B70 = 0x68B5
+0x5B71 = 0x68A0
+0x5B72 = 0x68BA
+0x5B73 = 0x690F
+0x5B74 = 0x688D
+0x5B75 = 0x687E
+0x5B76 = 0x6901
+0x5B77 = 0x68CA
+0x5B78 = 0x6908
+0x5B79 = 0x68D8
+0x5B7A = 0x6922
+0x5B7B = 0x6926
+0x5B7C = 0x68E1
+0x5B7D = 0x690C
+0x5B7E = 0x68CD
+0x5C21 = 0x68D4
+0x5C22 = 0x68E7
+0x5C23 = 0x68D5
+0x5C24 = 0x6936
+0x5C25 = 0x6912
+0x5C26 = 0x6904
+0x5C27 = 0x68D7
+0x5C28 = 0x68E3
+0x5C29 = 0x6925
+0x5C2A = 0x68F9
+0x5C2B = 0x68E0
+0x5C2C = 0x68EF
+0x5C2D = 0x6928
+0x5C2E = 0x692A
+0x5C2F = 0x691A
+0x5C30 = 0x6923
+0x5C31 = 0x6921
+0x5C32 = 0x68C6
+0x5C33 = 0x6979
+0x5C34 = 0x6977
+0x5C35 = 0x695C
+0x5C36 = 0x6978
+0x5C37 = 0x696B
+0x5C38 = 0x6954
+0x5C39 = 0x697E
+0x5C3A = 0x696E
+0x5C3B = 0x6939
+0x5C3C = 0x6974
+0x5C3D = 0x693D
+0x5C3E = 0x6959
+0x5C3F = 0x6930
+0x5C40 = 0x6961
+0x5C41 = 0x695E
+0x5C42 = 0x695D
+0x5C43 = 0x6981
+0x5C44 = 0x696A
+0x5C45 = 0x69B2
+0x5C46 = 0x69AE
+0x5C47 = 0x69D0
+0x5C48 = 0x69BF
+0x5C49 = 0x69C1
+0x5C4A = 0x69D3
+0x5C4B = 0x69BE
+0x5C4C = 0x69CE
+0x5C4D = 0x5BE8
+0x5C4E = 0x69CA
+0x5C4F = 0x69DD
+0x5C50 = 0x69BB
+0x5C51 = 0x69C3
+0x5C52 = 0x69A7
+0x5C53 = 0x6A2E
+0x5C54 = 0x6991
+0x5C55 = 0x69A0
+0x5C56 = 0x699C
+0x5C57 = 0x6995
+0x5C58 = 0x69B4
+0x5C59 = 0x69DE
+0x5C5A = 0x69E8
+0x5C5B = 0x6A02
+0x5C5C = 0x6A1B
+0x5C5D = 0x69FF
+0x5C5E = 0x6B0A
+0x5C5F = 0x69F9
+0x5C60 = 0x69F2
+0x5C61 = 0x69E7
+0x5C62 = 0x6A05
+0x5C63 = 0x69B1
+0x5C64 = 0x6A1E
+0x5C65 = 0x69ED
+0x5C66 = 0x6A14
+0x5C67 = 0x69EB
+0x5C68 = 0x6A0A
+0x5C69 = 0x6A12
+0x5C6A = 0x6AC1
+0x5C6B = 0x6A23
+0x5C6C = 0x6A13
+0x5C6D = 0x6A44
+0x5C6E = 0x6A0C
+0x5C6F = 0x6A72
+0x5C70 = 0x6A36
+0x5C71 = 0x6A78
+0x5C72 = 0x6A47
+0x5C73 = 0x6A62
+0x5C74 = 0x6A59
+0x5C75 = 0x6A66
+0x5C76 = 0x6A48
+0x5C77 = 0x6A38
+0x5C78 = 0x6A22
+0x5C79 = 0x6A90
+0x5C7A = 0x6A8D
+0x5C7B = 0x6AA0
+0x5C7C = 0x6A84
+0x5C7D = 0x6AA2
+0x5C7E = 0x6AA3
+0x5D21 = 0x6A97
+0x5D22 = 0x8617
+0x5D23 = 0x6ABB
+0x5D24 = 0x6AC3
+0x5D25 = 0x6AC2
+0x5D26 = 0x6AB8
+0x5D27 = 0x6AB3
+0x5D28 = 0x6AAC
+0x5D29 = 0x6ADE
+0x5D2A = 0x6AD1
+0x5D2B = 0x6ADF
+0x5D2C = 0x6AAA
+0x5D2D = 0x6ADA
+0x5D2E = 0x6AEA
+0x5D2F = 0x6AFB
+0x5D30 = 0x6B05
+0x5D31 = 0x8616
+0x5D32 = 0x6AFA
+0x5D33 = 0x6B12
+0x5D34 = 0x6B16
+0x5D35 = 0x9B31
+0x5D36 = 0x6B1F
+0x5D37 = 0x6B38
+0x5D38 = 0x6B37
+0x5D39 = 0x76DC
+0x5D3A = 0x6B39
+0x5D3B = 0x98EE
+0x5D3C = 0x6B47
+0x5D3D = 0x6B43
+0x5D3E = 0x6B49
+0x5D3F = 0x6B50
+0x5D40 = 0x6B59
+0x5D41 = 0x6B54
+0x5D42 = 0x6B5B
+0x5D43 = 0x6B5F
+0x5D44 = 0x6B61
+0x5D45 = 0x6B78
+0x5D46 = 0x6B79
+0x5D47 = 0x6B7F
+0x5D48 = 0x6B80
+0x5D49 = 0x6B84
+0x5D4A = 0x6B83
+0x5D4B = 0x6B8D
+0x5D4C = 0x6B98
+0x5D4D = 0x6B95
+0x5D4E = 0x6B9E
+0x5D4F = 0x6BA4
+0x5D50 = 0x6BAA
+0x5D51 = 0x6BAB
+0x5D52 = 0x6BAF
+0x5D53 = 0x6BB2
+0x5D54 = 0x6BB1
+0x5D55 = 0x6BB3
+0x5D56 = 0x6BB7
+0x5D57 = 0x6BBC
+0x5D58 = 0x6BC6
+0x5D59 = 0x6BCB
+0x5D5A = 0x6BD3
+0x5D5B = 0x6BDF
+0x5D5C = 0x6BEC
+0x5D5D = 0x6BEB
+0x5D5E = 0x6BF3
+0x5D5F = 0x6BEF
+0x5D60 = 0x9EBE
+0x5D61 = 0x6C08
+0x5D62 = 0x6C13
+0x5D63 = 0x6C14
+0x5D64 = 0x6C1B
+0x5D65 = 0x6C24
+0x5D66 = 0x6C23
+0x5D67 = 0x6C5E
+0x5D68 = 0x6C55
+0x5D69 = 0x6C62
+0x5D6A = 0x6C6A
+0x5D6B = 0x6C82
+0x5D6C = 0x6C8D
+0x5D6D = 0x6C9A
+0x5D6E = 0x6C81
+0x5D6F = 0x6C9B
+0x5D70 = 0x6C7E
+0x5D71 = 0x6C68
+0x5D72 = 0x6C73
+0x5D73 = 0x6C92
+0x5D74 = 0x6C90
+0x5D75 = 0x6CC4
+0x5D76 = 0x6CF1
+0x5D77 = 0x6CD3
+0x5D78 = 0x6CBD
+0x5D79 = 0x6CD7
+0x5D7A = 0x6CC5
+0x5D7B = 0x6CDD
+0x5D7C = 0x6CAE
+0x5D7D = 0x6CB1
+0x5D7E = 0x6CBE
+0x5E21 = 0x6CBA
+0x5E22 = 0x6CDB
+0x5E23 = 0x6CEF
+0x5E24 = 0x6CD9
+0x5E25 = 0x6CEA
+0x5E26 = 0x6D1F
+0x5E27 = 0x884D
+0x5E28 = 0x6D36
+0x5E29 = 0x6D2B
+0x5E2A = 0x6D3D
+0x5E2B = 0x6D38
+0x5E2C = 0x6D19
+0x5E2D = 0x6D35
+0x5E2E = 0x6D33
+0x5E2F = 0x6D12
+0x5E30 = 0x6D0C
+0x5E31 = 0x6D63
+0x5E32 = 0x6D93
+0x5E33 = 0x6D64
+0x5E34 = 0x6D5A
+0x5E35 = 0x6D79
+0x5E36 = 0x6D59
+0x5E37 = 0x6D8E
+0x5E38 = 0x6D95
+0x5E39 = 0x6FE4
+0x5E3A = 0x6D85
+0x5E3B = 0x6DF9
+0x5E3C = 0x6E15
+0x5E3D = 0x6E0A
+0x5E3E = 0x6DB5
+0x5E3F = 0x6DC7
+0x5E40 = 0x6DE6
+0x5E41 = 0x6DB8
+0x5E42 = 0x6DC6
+0x5E43 = 0x6DEC
+0x5E44 = 0x6DDE
+0x5E45 = 0x6DCC
+0x5E46 = 0x6DE8
+0x5E47 = 0x6DD2
+0x5E48 = 0x6DC5
+0x5E49 = 0x6DFA
+0x5E4A = 0x6DD9
+0x5E4B = 0x6DE4
+0x5E4C = 0x6DD5
+0x5E4D = 0x6DEA
+0x5E4E = 0x6DEE
+0x5E4F = 0x6E2D
+0x5E50 = 0x6E6E
+0x5E51 = 0x6E2E
+0x5E52 = 0x6E19
+0x5E53 = 0x6E72
+0x5E54 = 0x6E5F
+0x5E55 = 0x6E3E
+0x5E56 = 0x6E23
+0x5E57 = 0x6E6B
+0x5E58 = 0x6E2B
+0x5E59 = 0x6E76
+0x5E5A = 0x6E4D
+0x5E5B = 0x6E1F
+0x5E5C = 0x6E43
+0x5E5D = 0x6E3A
+0x5E5E = 0x6E4E
+0x5E5F = 0x6E24
+0x5E60 = 0x6EFF
+0x5E61 = 0x6E1D
+0x5E62 = 0x6E38
+0x5E63 = 0x6E82
+0x5E64 = 0x6EAA
+0x5E65 = 0x6E98
+0x5E66 = 0x6EC9
+0x5E67 = 0x6EB7
+0x5E68 = 0x6ED3
+0x5E69 = 0x6EBD
+0x5E6A = 0x6EAF
+0x5E6B = 0x6EC4
+0x5E6C = 0x6EB2
+0x5E6D = 0x6ED4
+0x5E6E = 0x6ED5
+0x5E6F = 0x6E8F
+0x5E70 = 0x6EA5
+0x5E71 = 0x6EC2
+0x5E72 = 0x6E9F
+0x5E73 = 0x6F41
+0x5E74 = 0x6F11
+0x5E75 = 0x704C
+0x5E76 = 0x6EEC
+0x5E77 = 0x6EF8
+0x5E78 = 0x6EFE
+0x5E79 = 0x6F3F
+0x5E7A = 0x6EF2
+0x5E7B = 0x6F31
+0x5E7C = 0x6EEF
+0x5E7D = 0x6F32
+0x5E7E = 0x6ECC
+0x5F21 = 0x6F3E
+0x5F22 = 0x6F13
+0x5F23 = 0x6EF7
+0x5F24 = 0x6F86
+0x5F25 = 0x6F7A
+0x5F26 = 0x6F78
+0x5F27 = 0x6F81
+0x5F28 = 0x6F80
+0x5F29 = 0x6F6F
+0x5F2A = 0x6F5B
+0x5F2B = 0x6FF3
+0x5F2C = 0x6F6D
+0x5F2D = 0x6F82
+0x5F2E = 0x6F7C
+0x5F2F = 0x6F58
+0x5F30 = 0x6F8E
+0x5F31 = 0x6F91
+0x5F32 = 0x6FC2
+0x5F33 = 0x6F66
+0x5F34 = 0x6FB3
+0x5F35 = 0x6FA3
+0x5F36 = 0x6FA1
+0x5F37 = 0x6FA4
+0x5F38 = 0x6FB9
+0x5F39 = 0x6FC6
+0x5F3A = 0x6FAA
+0x5F3B = 0x6FDF
+0x5F3C = 0x6FD5
+0x5F3D = 0x6FEC
+0x5F3E = 0x6FD4
+0x5F3F = 0x6FD8
+0x5F40 = 0x6FF1
+0x5F41 = 0x6FEE
+0x5F42 = 0x6FDB
+0x5F43 = 0x7009
+0x5F44 = 0x700B
+0x5F45 = 0x6FFA
+0x5F46 = 0x7011
+0x5F47 = 0x7001
+0x5F48 = 0x700F
+0x5F49 = 0x6FFE
+0x5F4A = 0x701B
+0x5F4B = 0x701A
+0x5F4C = 0x6F74
+0x5F4D = 0x701D
+0x5F4E = 0x7018
+0x5F4F = 0x701F
+0x5F50 = 0x7030
+0x5F51 = 0x703E
+0x5F52 = 0x7032
+0x5F53 = 0x7051
+0x5F54 = 0x7063
+0x5F55 = 0x7099
+0x5F56 = 0x7092
+0x5F57 = 0x70AF
+0x5F58 = 0x70F1
+0x5F59 = 0x70AC
+0x5F5A = 0x70B8
+0x5F5B = 0x70B3
+0x5F5C = 0x70AE
+0x5F5D = 0x70DF
+0x5F5E = 0x70CB
+0x5F5F = 0x70DD
+0x5F60 = 0x70D9
+0x5F61 = 0x7109
+0x5F62 = 0x70FD
+0x5F63 = 0x711C
+0x5F64 = 0x7119
+0x5F65 = 0x7165
+0x5F66 = 0x7155
+0x5F67 = 0x7188
+0x5F68 = 0x7166
+0x5F69 = 0x7162
+0x5F6A = 0x714C
+0x5F6B = 0x7156
+0x5F6C = 0x716C
+0x5F6D = 0x718F
+0x5F6E = 0x71FB
+0x5F6F = 0x7184
+0x5F70 = 0x7195
+0x5F71 = 0x71A8
+0x5F72 = 0x71AC
+0x5F73 = 0x71D7
+0x5F74 = 0x71B9
+0x5F75 = 0x71BE
+0x5F76 = 0x71D2
+0x5F77 = 0x71C9
+0x5F78 = 0x71D4
+0x5F79 = 0x71CE
+0x5F7A = 0x71E0
+0x5F7B = 0x71EC
+0x5F7C = 0x71E7
+0x5F7D = 0x71F5
+0x5F7E = 0x71FC
+0x6021 = 0x71F9
+0x6022 = 0x71FF
+0x6023 = 0x720D
+0x6024 = 0x7210
+0x6025 = 0x721B
+0x6026 = 0x7228
+0x6027 = 0x722D
+0x6028 = 0x722C
+0x6029 = 0x7230
+0x602A = 0x7232
+0x602B = 0x723B
+0x602C = 0x723C
+0x602D = 0x723F
+0x602E = 0x7240
+0x602F = 0x7246
+0x6030 = 0x724B
+0x6031 = 0x7258
+0x6032 = 0x7274
+0x6033 = 0x727E
+0x6034 = 0x7282
+0x6035 = 0x7281
+0x6036 = 0x7287
+0x6037 = 0x7292
+0x6038 = 0x7296
+0x6039 = 0x72A2
+0x603A = 0x72A7
+0x603B = 0x72B9
+0x603C = 0x72B2
+0x603D = 0x72C3
+0x603E = 0x72C6
+0x603F = 0x72C4
+0x6040 = 0x72CE
+0x6041 = 0x72D2
+0x6042 = 0x72E2
+0x6043 = 0x72E0
+0x6044 = 0x72E1
+0x6045 = 0x72F9
+0x6046 = 0x72F7
+0x6047 = 0x500F
+0x6048 = 0x7317
+0x6049 = 0x730A
+0x604A = 0x731C
+0x604B = 0x7316
+0x604C = 0x731D
+0x604D = 0x7334
+0x604E = 0x732F
+0x604F = 0x7329
+0x6050 = 0x7325
+0x6051 = 0x733E
+0x6052 = 0x734E
+0x6053 = 0x734F
+0x6054 = 0x9ED8
+0x6055 = 0x7357
+0x6056 = 0x736A
+0x6057 = 0x7368
+0x6058 = 0x7370
+0x6059 = 0x7378
+0x605A = 0x7375
+0x605B = 0x737B
+0x605C = 0x737A
+0x605D = 0x73C8
+0x605E = 0x73B3
+0x605F = 0x73CE
+0x6060 = 0x73BB
+0x6061 = 0x73C0
+0x6062 = 0x73E5
+0x6063 = 0x73EE
+0x6064 = 0x73DE
+0x6065 = 0x74A2
+0x6066 = 0x7405
+0x6067 = 0x746F
+0x6068 = 0x7425
+0x6069 = 0x73F8
+0x606A = 0x7432
+0x606B = 0x743A
+0x606C = 0x7455
+0x606D = 0x743F
+0x606E = 0x745F
+0x606F = 0x7459
+0x6070 = 0x7441
+0x6071 = 0x745C
+0x6072 = 0x7469
+0x6073 = 0x7470
+0x6074 = 0x7463
+0x6075 = 0x746A
+0x6076 = 0x7476
+0x6077 = 0x747E
+0x6078 = 0x748B
+0x6079 = 0x749E
+0x607A = 0x74A7
+0x607B = 0x74CA
+0x607C = 0x74CF
+0x607D = 0x74D4
+0x607E = 0x73F1
+0x6121 = 0x74E0
+0x6122 = 0x74E3
+0x6123 = 0x74E7
+0x6124 = 0x74E9
+0x6125 = 0x74EE
+0x6126 = 0x74F2
+0x6127 = 0x74F0
+0x6128 = 0x74F1
+0x6129 = 0x74F8
+0x612A = 0x74F7
+0x612B = 0x7504
+0x612C = 0x7503
+0x612D = 0x7505
+0x612E = 0x750C
+0x612F = 0x750E
+0x6130 = 0x750D
+0x6131 = 0x7515
+0x6132 = 0x7513
+0x6133 = 0x751E
+0x6134 = 0x7526
+0x6135 = 0x752C
+0x6136 = 0x753C
+0x6137 = 0x7544
+0x6138 = 0x754D
+0x6139 = 0x754A
+0x613A = 0x7549
+0x613B = 0x755B
+0x613C = 0x7546
+0x613D = 0x755A
+0x613E = 0x7569
+0x613F = 0x7564
+0x6140 = 0x7567
+0x6141 = 0x756B
+0x6142 = 0x756D
+0x6143 = 0x7578
+0x6144 = 0x7576
+0x6145 = 0x7586
+0x6146 = 0x7587
+0x6147 = 0x7574
+0x6148 = 0x758A
+0x6149 = 0x7589
+0x614A = 0x7582
+0x614B = 0x7594
+0x614C = 0x759A
+0x614D = 0x759D
+0x614E = 0x75A5
+0x614F = 0x75A3
+0x6150 = 0x75C2
+0x6151 = 0x75B3
+0x6152 = 0x75C3
+0x6153 = 0x75B5
+0x6154 = 0x75BD
+0x6155 = 0x75B8
+0x6156 = 0x75BC
+0x6157 = 0x75B1
+0x6158 = 0x75CD
+0x6159 = 0x75CA
+0x615A = 0x75D2
+0x615B = 0x75D9
+0x615C = 0x75E3
+0x615D = 0x75DE
+0x615E = 0x75FE
+0x615F = 0x75FF
+0x6160 = 0x75FC
+0x6161 = 0x7601
+0x6162 = 0x75F0
+0x6163 = 0x75FA
+0x6164 = 0x75F2
+0x6165 = 0x75F3
+0x6166 = 0x760B
+0x6167 = 0x760D
+0x6168 = 0x7609
+0x6169 = 0x761F
+0x616A = 0x7627
+0x616B = 0x7620
+0x616C = 0x7621
+0x616D = 0x7622
+0x616E = 0x7624
+0x616F = 0x7634
+0x6170 = 0x7630
+0x6171 = 0x763B
+0x6172 = 0x7647
+0x6173 = 0x7648
+0x6174 = 0x7646
+0x6175 = 0x765C
+0x6176 = 0x7658
+0x6177 = 0x7661
+0x6178 = 0x7662
+0x6179 = 0x7668
+0x617A = 0x7669
+0x617B = 0x766A
+0x617C = 0x7667
+0x617D = 0x766C
+0x617E = 0x7670
+0x6221 = 0x7672
+0x6222 = 0x7676
+0x6223 = 0x7678
+0x6224 = 0x767C
+0x6225 = 0x7680
+0x6226 = 0x7683
+0x6227 = 0x7688
+0x6228 = 0x768B
+0x6229 = 0x768E
+0x622A = 0x7696
+0x622B = 0x7693
+0x622C = 0x7699
+0x622D = 0x769A
+0x622E = 0x76B0
+0x622F = 0x76B4
+0x6230 = 0x76B8
+0x6231 = 0x76B9
+0x6232 = 0x76BA
+0x6233 = 0x76C2
+0x6234 = 0x76CD
+0x6235 = 0x76D6
+0x6236 = 0x76D2
+0x6237 = 0x76DE
+0x6238 = 0x76E1
+0x6239 = 0x76E5
+0x623A = 0x76E7
+0x623B = 0x76EA
+0x623C = 0x862F
+0x623D = 0x76FB
+0x623E = 0x7708
+0x623F = 0x7707
+0x6240 = 0x7704
+0x6241 = 0x7729
+0x6242 = 0x7724
+0x6243 = 0x771E
+0x6244 = 0x7725
+0x6245 = 0x7726
+0x6246 = 0x771B
+0x6247 = 0x7737
+0x6248 = 0x7738
+0x6249 = 0x7747
+0x624A = 0x775A
+0x624B = 0x7768
+0x624C = 0x776B
+0x624D = 0x775B
+0x624E = 0x7765
+0x624F = 0x777F
+0x6250 = 0x777E
+0x6251 = 0x7779
+0x6252 = 0x778E
+0x6253 = 0x778B
+0x6254 = 0x7791
+0x6255 = 0x77A0
+0x6256 = 0x779E
+0x6257 = 0x77B0
+0x6258 = 0x77B6
+0x6259 = 0x77B9
+0x625A = 0x77BF
+0x625B = 0x77BC
+0x625C = 0x77BD
+0x625D = 0x77BB
+0x625E = 0x77C7
+0x625F = 0x77CD
+0x6260 = 0x77D7
+0x6261 = 0x77DA
+0x6262 = 0x77DC
+0x6263 = 0x77E3
+0x6264 = 0x77EE
+0x6265 = 0x77FC
+0x6266 = 0x780C
+0x6267 = 0x7812
+0x6268 = 0x7926
+0x6269 = 0x7820
+0x626A = 0x792A
+0x626B = 0x7845
+0x626C = 0x788E
+0x626D = 0x7874
+0x626E = 0x7886
+0x626F = 0x787C
+0x6270 = 0x789A
+0x6271 = 0x788C
+0x6272 = 0x78A3
+0x6273 = 0x78B5
+0x6274 = 0x78AA
+0x6275 = 0x78AF
+0x6276 = 0x78D1
+0x6277 = 0x78C6
+0x6278 = 0x78CB
+0x6279 = 0x78D4
+0x627A = 0x78BE
+0x627B = 0x78BC
+0x627C = 0x78C5
+0x627D = 0x78CA
+0x627E = 0x78EC
+0x6321 = 0x78E7
+0x6322 = 0x78DA
+0x6323 = 0x78FD
+0x6324 = 0x78F4
+0x6325 = 0x7907
+0x6326 = 0x7912
+0x6327 = 0x7911
+0x6328 = 0x7919
+0x6329 = 0x792C
+0x632A = 0x792B
+0x632B = 0x7940
+0x632C = 0x7960
+0x632D = 0x7957
+0x632E = 0x795F
+0x632F = 0x795A
+0x6330 = 0x7955
+0x6331 = 0x7953
+0x6332 = 0x797A
+0x6333 = 0x797F
+0x6334 = 0x798A
+0x6335 = 0x799D
+0x6336 = 0x79A7
+0x6337 = 0x9F4B
+0x6338 = 0x79AA
+0x6339 = 0x79AE
+0x633A = 0x79B3
+0x633B = 0x79B9
+0x633C = 0x79BA
+0x633D = 0x79C9
+0x633E = 0x79D5
+0x633F = 0x79E7
+0x6340 = 0x79EC
+0x6341 = 0x79E1
+0x6342 = 0x79E3
+0x6343 = 0x7A08
+0x6344 = 0x7A0D
+0x6345 = 0x7A18
+0x6346 = 0x7A19
+0x6347 = 0x7A20
+0x6348 = 0x7A1F
+0x6349 = 0x7980
+0x634A = 0x7A31
+0x634B = 0x7A3B
+0x634C = 0x7A3E
+0x634D = 0x7A37
+0x634E = 0x7A43
+0x634F = 0x7A57
+0x6350 = 0x7A49
+0x6351 = 0x7A61
+0x6352 = 0x7A62
+0x6353 = 0x7A69
+0x6354 = 0x9F9D
+0x6355 = 0x7A70
+0x6356 = 0x7A79
+0x6357 = 0x7A7D
+0x6358 = 0x7A88
+0x6359 = 0x7A97
+0x635A = 0x7A95
+0x635B = 0x7A98
+0x635C = 0x7A96
+0x635D = 0x7AA9
+0x635E = 0x7AC8
+0x635F = 0x7AB0
+0x6360 = 0x7AB6
+0x6361 = 0x7AC5
+0x6362 = 0x7AC4
+0x6363 = 0x7ABF
+0x6364 = 0x9083
+0x6365 = 0x7AC7
+0x6366 = 0x7ACA
+0x6367 = 0x7ACD
+0x6368 = 0x7ACF
+0x6369 = 0x7AD5
+0x636A = 0x7AD3
+0x636B = 0x7AD9
+0x636C = 0x7ADA
+0x636D = 0x7ADD
+0x636E = 0x7AE1
+0x636F = 0x7AE2
+0x6370 = 0x7AE6
+0x6371 = 0x7AED
+0x6372 = 0x7AF0
+0x6373 = 0x7B02
+0x6374 = 0x7B0F
+0x6375 = 0x7B0A
+0x6376 = 0x7B06
+0x6377 = 0x7B33
+0x6378 = 0x7B18
+0x6379 = 0x7B19
+0x637A = 0x7B1E
+0x637B = 0x7B35
+0x637C = 0x7B28
+0x637D = 0x7B36
+0x637E = 0x7B50
+0x6421 = 0x7B7A
+0x6422 = 0x7B04
+0x6423 = 0x7B4D
+0x6424 = 0x7B0B
+0x6425 = 0x7B4C
+0x6426 = 0x7B45
+0x6427 = 0x7B75
+0x6428 = 0x7B65
+0x6429 = 0x7B74
+0x642A = 0x7B67
+0x642B = 0x7B70
+0x642C = 0x7B71
+0x642D = 0x7B6C
+0x642E = 0x7B6E
+0x642F = 0x7B9D
+0x6430 = 0x7B98
+0x6431 = 0x7B9F
+0x6432 = 0x7B8D
+0x6433 = 0x7B9C
+0x6434 = 0x7B9A
+0x6435 = 0x7B8B
+0x6436 = 0x7B92
+0x6437 = 0x7B8F
+0x6438 = 0x7B5D
+0x6439 = 0x7B99
+0x643A = 0x7BCB
+0x643B = 0x7BC1
+0x643C = 0x7BCC
+0x643D = 0x7BCF
+0x643E = 0x7BB4
+0x643F = 0x7BC6
+0x6440 = 0x7BDD
+0x6441 = 0x7BE9
+0x6442 = 0x7C11
+0x6443 = 0x7C14
+0x6444 = 0x7BE6
+0x6445 = 0x7BE5
+0x6446 = 0x7C60
+0x6447 = 0x7C00
+0x6448 = 0x7C07
+0x6449 = 0x7C13
+0x644A = 0x7BF3
+0x644B = 0x7BF7
+0x644C = 0x7C17
+0x644D = 0x7C0D
+0x644E = 0x7BF6
+0x644F = 0x7C23
+0x6450 = 0x7C27
+0x6451 = 0x7C2A
+0x6452 = 0x7C1F
+0x6453 = 0x7C37
+0x6454 = 0x7C2B
+0x6455 = 0x7C3D
+0x6456 = 0x7C4C
+0x6457 = 0x7C43
+0x6458 = 0x7C54
+0x6459 = 0x7C4F
+0x645A = 0x7C40
+0x645B = 0x7C50
+0x645C = 0x7C58
+0x645D = 0x7C5F
+0x645E = 0x7C64
+0x645F = 0x7C56
+0x6460 = 0x7C65
+0x6461 = 0x7C6C
+0x6462 = 0x7C75
+0x6463 = 0x7C83
+0x6464 = 0x7C90
+0x6465 = 0x7CA4
+0x6466 = 0x7CAD
+0x6467 = 0x7CA2
+0x6468 = 0x7CAB
+0x6469 = 0x7CA1
+0x646A = 0x7CA8
+0x646B = 0x7CB3
+0x646C = 0x7CB2
+0x646D = 0x7CB1
+0x646E = 0x7CAE
+0x646F = 0x7CB9
+0x6470 = 0x7CBD
+0x6471 = 0x7CC0
+0x6472 = 0x7CC5
+0x6473 = 0x7CC2
+0x6474 = 0x7CD8
+0x6475 = 0x7CD2
+0x6476 = 0x7CDC
+0x6477 = 0x7CE2
+0x6478 = 0x9B3B
+0x6479 = 0x7CEF
+0x647A = 0x7CF2
+0x647B = 0x7CF4
+0x647C = 0x7CF6
+0x647D = 0x7CFA
+0x647E = 0x7D06
+0x6521 = 0x7D02
+0x6522 = 0x7D1C
+0x6523 = 0x7D15
+0x6524 = 0x7D0A
+0x6525 = 0x7D45
+0x6526 = 0x7D4B
+0x6527 = 0x7D2E
+0x6528 = 0x7D32
+0x6529 = 0x7D3F
+0x652A = 0x7D35
+0x652B = 0x7D46
+0x652C = 0x7D73
+0x652D = 0x7D56
+0x652E = 0x7D4E
+0x652F = 0x7D72
+0x6530 = 0x7D68
+0x6531 = 0x7D6E
+0x6532 = 0x7D4F
+0x6533 = 0x7D63
+0x6534 = 0x7D93
+0x6535 = 0x7D89
+0x6536 = 0x7D5B
+0x6537 = 0x7D8F
+0x6538 = 0x7D7D
+0x6539 = 0x7D9B
+0x653A = 0x7DBA
+0x653B = 0x7DAE
+0x653C = 0x7DA3
+0x653D = 0x7DB5
+0x653E = 0x7DC7
+0x653F = 0x7DBD
+0x6540 = 0x7DAB
+0x6541 = 0x7E3D
+0x6542 = 0x7DA2
+0x6543 = 0x7DAF
+0x6544 = 0x7DDC
+0x6545 = 0x7DB8
+0x6546 = 0x7D9F
+0x6547 = 0x7DB0
+0x6548 = 0x7DD8
+0x6549 = 0x7DDD
+0x654A = 0x7DE4
+0x654B = 0x7DDE
+0x654C = 0x7DFB
+0x654D = 0x7DF2
+0x654E = 0x7DE1
+0x654F = 0x7E05
+0x6550 = 0x7E0A
+0x6551 = 0x7E23
+0x6552 = 0x7E21
+0x6553 = 0x7E12
+0x6554 = 0x7E31
+0x6555 = 0x7E1F
+0x6556 = 0x7E09
+0x6557 = 0x7E0B
+0x6558 = 0x7E22
+0x6559 = 0x7E46
+0x655A = 0x7E66
+0x655B = 0x7E3B
+0x655C = 0x7E35
+0x655D = 0x7E39
+0x655E = 0x7E43
+0x655F = 0x7E37
+0x6560 = 0x7E32
+0x6561 = 0x7E3A
+0x6562 = 0x7E67
+0x6563 = 0x7E5D
+0x6564 = 0x7E56
+0x6565 = 0x7E5E
+0x6566 = 0x7E59
+0x6567 = 0x7E5A
+0x6568 = 0x7E79
+0x6569 = 0x7E6A
+0x656A = 0x7E69
+0x656B = 0x7E7C
+0x656C = 0x7E7B
+0x656D = 0x7E83
+0x656E = 0x7DD5
+0x656F = 0x7E7D
+0x6570 = 0x8FAE
+0x6571 = 0x7E7F
+0x6572 = 0x7E88
+0x6573 = 0x7E89
+0x6574 = 0x7E8C
+0x6575 = 0x7E92
+0x6576 = 0x7E90
+0x6577 = 0x7E93
+0x6578 = 0x7E94
+0x6579 = 0x7E96
+0x657A = 0x7E8E
+0x657B = 0x7E9B
+0x657C = 0x7E9C
+0x657D = 0x7F38
+0x657E = 0x7F3A
+0x6621 = 0x7F45
+0x6622 = 0x7F4C
+0x6623 = 0x7F4D
+0x6624 = 0x7F4E
+0x6625 = 0x7F50
+0x6626 = 0x7F51
+0x6627 = 0x7F55
+0x6628 = 0x7F54
+0x6629 = 0x7F58
+0x662A = 0x7F5F
+0x662B = 0x7F60
+0x662C = 0x7F68
+0x662D = 0x7F69
+0x662E = 0x7F67
+0x662F = 0x7F78
+0x6630 = 0x7F82
+0x6631 = 0x7F86
+0x6632 = 0x7F83
+0x6633 = 0x7F88
+0x6634 = 0x7F87
+0x6635 = 0x7F8C
+0x6636 = 0x7F94
+0x6637 = 0x7F9E
+0x6638 = 0x7F9D
+0x6639 = 0x7F9A
+0x663A = 0x7FA3
+0x663B = 0x7FAF
+0x663C = 0x7FB2
+0x663D = 0x7FB9
+0x663E = 0x7FAE
+0x663F = 0x7FB6
+0x6640 = 0x7FB8
+0x6641 = 0x8B71
+0x6642 = 0x7FC5
+0x6643 = 0x7FC6
+0x6644 = 0x7FCA
+0x6645 = 0x7FD5
+0x6646 = 0x7FD4
+0x6647 = 0x7FE1
+0x6648 = 0x7FE6
+0x6649 = 0x7FE9
+0x664A = 0x7FF3
+0x664B = 0x7FF9
+0x664C = 0x98DC
+0x664D = 0x8006
+0x664E = 0x8004
+0x664F = 0x800B
+0x6650 = 0x8012
+0x6651 = 0x8018
+0x6652 = 0x8019
+0x6653 = 0x801C
+0x6654 = 0x8021
+0x6655 = 0x8028
+0x6656 = 0x803F
+0x6657 = 0x803B
+0x6658 = 0x804A
+0x6659 = 0x8046
+0x665A = 0x8052
+0x665B = 0x8058
+0x665C = 0x805A
+0x665D = 0x805F
+0x665E = 0x8062
+0x665F = 0x8068
+0x6660 = 0x8073
+0x6661 = 0x8072
+0x6662 = 0x8070
+0x6663 = 0x8076
+0x6664 = 0x8079
+0x6665 = 0x807D
+0x6666 = 0x807F
+0x6667 = 0x8084
+0x6668 = 0x8086
+0x6669 = 0x8085
+0x666A = 0x809B
+0x666B = 0x8093
+0x666C = 0x809A
+0x666D = 0x80AD
+0x666E = 0x5190
+0x666F = 0x80AC
+0x6670 = 0x80DB
+0x6671 = 0x80E5
+0x6672 = 0x80D9
+0x6673 = 0x80DD
+0x6674 = 0x80C4
+0x6675 = 0x80DA
+0x6676 = 0x80D6
+0x6677 = 0x8109
+0x6678 = 0x80EF
+0x6679 = 0x80F1
+0x667A = 0x811B
+0x667B = 0x8129
+0x667C = 0x8123
+0x667D = 0x812F
+0x667E = 0x814B
+0x6721 = 0x968B
+0x6722 = 0x8146
+0x6723 = 0x813E
+0x6724 = 0x8153
+0x6725 = 0x8151
+0x6726 = 0x80FC
+0x6727 = 0x8171
+0x6728 = 0x816E
+0x6729 = 0x8165
+0x672A = 0x8166
+0x672B = 0x8174
+0x672C = 0x8183
+0x672D = 0x8188
+0x672E = 0x818A
+0x672F = 0x8180
+0x6730 = 0x8182
+0x6731 = 0x81A0
+0x6732 = 0x8195
+0x6733 = 0x81A4
+0x6734 = 0x81A3
+0x6735 = 0x815F
+0x6736 = 0x8193
+0x6737 = 0x81A9
+0x6738 = 0x81B0
+0x6739 = 0x81B5
+0x673A = 0x81BE
+0x673B = 0x81B8
+0x673C = 0x81BD
+0x673D = 0x81C0
+0x673E = 0x81C2
+0x673F = 0x81BA
+0x6740 = 0x81C9
+0x6741 = 0x81CD
+0x6742 = 0x81D1
+0x6743 = 0x81D9
+0x6744 = 0x81D8
+0x6745 = 0x81C8
+0x6746 = 0x81DA
+0x6747 = 0x81DF
+0x6748 = 0x81E0
+0x6749 = 0x81E7
+0x674A = 0x81FA
+0x674B = 0x81FB
+0x674C = 0x81FE
+0x674D = 0x8201
+0x674E = 0x8202
+0x674F = 0x8205
+0x6750 = 0x8207
+0x6751 = 0x820A
+0x6752 = 0x820D
+0x6753 = 0x8210
+0x6754 = 0x8216
+0x6755 = 0x8229
+0x6756 = 0x822B
+0x6757 = 0x8238
+0x6758 = 0x8233
+0x6759 = 0x8240
+0x675A = 0x8259
+0x675B = 0x8258
+0x675C = 0x825D
+0x675D = 0x825A
+0x675E = 0x825F
+0x675F = 0x8264
+0x6760 = 0x8262
+0x6761 = 0x8268
+0x6762 = 0x826A
+0x6763 = 0x826B
+0x6764 = 0x822E
+0x6765 = 0x8271
+0x6766 = 0x8277
+0x6767 = 0x8278
+0x6768 = 0x827E
+0x6769 = 0x828D
+0x676A = 0x8292
+0x676B = 0x82AB
+0x676C = 0x829F
+0x676D = 0x82BB
+0x676E = 0x82AC
+0x676F = 0x82E1
+0x6770 = 0x82E3
+0x6771 = 0x82DF
+0x6772 = 0x82D2
+0x6773 = 0x82F4
+0x6774 = 0x82F3
+0x6775 = 0x82FA
+0x6776 = 0x8393
+0x6777 = 0x8303
+0x6778 = 0x82FB
+0x6779 = 0x82F9
+0x677A = 0x82DE
+0x677B = 0x8306
+0x677C = 0x82DC
+0x677D = 0x8309
+0x677E = 0x82D9
+0x6821 = 0x8335
+0x6822 = 0x8334
+0x6823 = 0x8316
+0x6824 = 0x8332
+0x6825 = 0x8331
+0x6826 = 0x8340
+0x6827 = 0x8339
+0x6828 = 0x8350
+0x6829 = 0x8345
+0x682A = 0x832F
+0x682B = 0x832B
+0x682C = 0x8317
+0x682D = 0x8318
+0x682E = 0x8385
+0x682F = 0x839A
+0x6830 = 0x83AA
+0x6831 = 0x839F
+0x6832 = 0x83A2
+0x6833 = 0x8396
+0x6834 = 0x8323
+0x6835 = 0x838E
+0x6836 = 0x8387
+0x6837 = 0x838A
+0x6838 = 0x837C
+0x6839 = 0x83B5
+0x683A = 0x8373
+0x683B = 0x8375
+0x683C = 0x83A0
+0x683D = 0x8389
+0x683E = 0x83A8
+0x683F = 0x83F4
+0x6840 = 0x8413
+0x6841 = 0x83EB
+0x6842 = 0x83CE
+0x6843 = 0x83FD
+0x6844 = 0x8403
+0x6845 = 0x83D8
+0x6846 = 0x840B
+0x6847 = 0x83C1
+0x6848 = 0x83F7
+0x6849 = 0x8407
+0x684A = 0x83E0
+0x684B = 0x83F2
+0x684C = 0x840D
+0x684D = 0x8422
+0x684E = 0x8420
+0x684F = 0x83BD
+0x6850 = 0x8438
+0x6851 = 0x8506
+0x6852 = 0x83FB
+0x6853 = 0x846D
+0x6854 = 0x842A
+0x6855 = 0x843C
+0x6856 = 0x855A
+0x6857 = 0x8484
+0x6858 = 0x8477
+0x6859 = 0x846B
+0x685A = 0x84AD
+0x685B = 0x846E
+0x685C = 0x8482
+0x685D = 0x8469
+0x685E = 0x8446
+0x685F = 0x842C
+0x6860 = 0x846F
+0x6861 = 0x8479
+0x6862 = 0x8435
+0x6863 = 0x84CA
+0x6864 = 0x8462
+0x6865 = 0x84B9
+0x6866 = 0x84BF
+0x6867 = 0x849F
+0x6868 = 0x84D9
+0x6869 = 0x84CD
+0x686A = 0x84BB
+0x686B = 0x84DA
+0x686C = 0x84D0
+0x686D = 0x84C1
+0x686E = 0x84C6
+0x686F = 0x84D6
+0x6870 = 0x84A1
+0x6871 = 0x8521
+0x6872 = 0x84FF
+0x6873 = 0x84F4
+0x6874 = 0x8517
+0x6875 = 0x8518
+0x6876 = 0x852C
+0x6877 = 0x851F
+0x6878 = 0x8515
+0x6879 = 0x8514
+0x687A = 0x84FC
+0x687B = 0x8540
+0x687C = 0x8563
+0x687D = 0x8558
+0x687E = 0x8548
+0x6921 = 0x8541
+0x6922 = 0x8602
+0x6923 = 0x854B
+0x6924 = 0x8555
+0x6925 = 0x8580
+0x6926 = 0x85A4
+0x6927 = 0x8588
+0x6928 = 0x8591
+0x6929 = 0x858A
+0x692A = 0x85A8
+0x692B = 0x856D
+0x692C = 0x8594
+0x692D = 0x859B
+0x692E = 0x85EA
+0x692F = 0x8587
+0x6930 = 0x859C
+0x6931 = 0x8577
+0x6932 = 0x857E
+0x6933 = 0x8590
+0x6934 = 0x85C9
+0x6935 = 0x85BA
+0x6936 = 0x85CF
+0x6937 = 0x85B9
+0x6938 = 0x85D0
+0x6939 = 0x85D5
+0x693A = 0x85DD
+0x693B = 0x85E5
+0x693C = 0x85DC
+0x693D = 0x85F9
+0x693E = 0x860A
+0x693F = 0x8613
+0x6940 = 0x860B
+0x6941 = 0x85FE
+0x6942 = 0x85FA
+0x6943 = 0x8606
+0x6944 = 0x8622
+0x6945 = 0x861A
+0x6946 = 0x8630
+0x6947 = 0x863F
+0x6948 = 0x864D
+0x6949 = 0x4E55
+0x694A = 0x8654
+0x694B = 0x865F
+0x694C = 0x8667
+0x694D = 0x8671
+0x694E = 0x8693
+0x694F = 0x86A3
+0x6950 = 0x86A9
+0x6951 = 0x86AA
+0x6952 = 0x868B
+0x6953 = 0x868C
+0x6954 = 0x86B6
+0x6955 = 0x86AF
+0x6956 = 0x86C4
+0x6957 = 0x86C6
+0x6958 = 0x86B0
+0x6959 = 0x86C9
+0x695A = 0x8823
+0x695B = 0x86AB
+0x695C = 0x86D4
+0x695D = 0x86DE
+0x695E = 0x86E9
+0x695F = 0x86EC
+0x6960 = 0x86DF
+0x6961 = 0x86DB
+0x6962 = 0x86EF
+0x6963 = 0x8712
+0x6964 = 0x8706
+0x6965 = 0x8708
+0x6966 = 0x8700
+0x6967 = 0x8703
+0x6968 = 0x86FB
+0x6969 = 0x8711
+0x696A = 0x8709
+0x696B = 0x870D
+0x696C = 0x86F9
+0x696D = 0x870A
+0x696E = 0x8734
+0x696F = 0x873F
+0x6970 = 0x8737
+0x6971 = 0x873B
+0x6972 = 0x8725
+0x6973 = 0x8729
+0x6974 = 0x871A
+0x6975 = 0x8760
+0x6976 = 0x875F
+0x6977 = 0x8778
+0x6978 = 0x874C
+0x6979 = 0x874E
+0x697A = 0x8774
+0x697B = 0x8757
+0x697C = 0x8768
+0x697D = 0x876E
+0x697E = 0x8759
+0x6A21 = 0x8753
+0x6A22 = 0x8763
+0x6A23 = 0x876A
+0x6A24 = 0x8805
+0x6A25 = 0x87A2
+0x6A26 = 0x879F
+0x6A27 = 0x8782
+0x6A28 = 0x87AF
+0x6A29 = 0x87CB
+0x6A2A = 0x87BD
+0x6A2B = 0x87C0
+0x6A2C = 0x87D0
+0x6A2D = 0x96D6
+0x6A2E = 0x87AB
+0x6A2F = 0x87C4
+0x6A30 = 0x87B3
+0x6A31 = 0x87C7
+0x6A32 = 0x87C6
+0x6A33 = 0x87BB
+0x6A34 = 0x87EF
+0x6A35 = 0x87F2
+0x6A36 = 0x87E0
+0x6A37 = 0x880F
+0x6A38 = 0x880D
+0x6A39 = 0x87FE
+0x6A3A = 0x87F6
+0x6A3B = 0x87F7
+0x6A3C = 0x880E
+0x6A3D = 0x87D2
+0x6A3E = 0x8811
+0x6A3F = 0x8816
+0x6A40 = 0x8815
+0x6A41 = 0x8822
+0x6A42 = 0x8821
+0x6A43 = 0x8831
+0x6A44 = 0x8836
+0x6A45 = 0x8839
+0x6A46 = 0x8827
+0x6A47 = 0x883B
+0x6A48 = 0x8844
+0x6A49 = 0x8842
+0x6A4A = 0x8852
+0x6A4B = 0x8859
+0x6A4C = 0x885E
+0x6A4D = 0x8862
+0x6A4E = 0x886B
+0x6A4F = 0x8881
+0x6A50 = 0x887E
+0x6A51 = 0x889E
+0x6A52 = 0x8875
+0x6A53 = 0x887D
+0x6A54 = 0x88B5
+0x6A55 = 0x8872
+0x6A56 = 0x8882
+0x6A57 = 0x8897
+0x6A58 = 0x8892
+0x6A59 = 0x88AE
+0x6A5A = 0x8899
+0x6A5B = 0x88A2
+0x6A5C = 0x888D
+0x6A5D = 0x88A4
+0x6A5E = 0x88B0
+0x6A5F = 0x88BF
+0x6A60 = 0x88B1
+0x6A61 = 0x88C3
+0x6A62 = 0x88C4
+0x6A63 = 0x88D4
+0x6A64 = 0x88D8
+0x6A65 = 0x88D9
+0x6A66 = 0x88DD
+0x6A67 = 0x88F9
+0x6A68 = 0x8902
+0x6A69 = 0x88FC
+0x6A6A = 0x88F4
+0x6A6B = 0x88E8
+0x6A6C = 0x88F2
+0x6A6D = 0x8904
+0x6A6E = 0x890C
+0x6A6F = 0x890A
+0x6A70 = 0x8913
+0x6A71 = 0x8943
+0x6A72 = 0x891E
+0x6A73 = 0x8925
+0x6A74 = 0x892A
+0x6A75 = 0x892B
+0x6A76 = 0x8941
+0x6A77 = 0x8944
+0x6A78 = 0x893B
+0x6A79 = 0x8936
+0x6A7A = 0x8938
+0x6A7B = 0x894C
+0x6A7C = 0x891D
+0x6A7D = 0x8960
+0x6A7E = 0x895E
+0x6B21 = 0x8966
+0x6B22 = 0x8964
+0x6B23 = 0x896D
+0x6B24 = 0x896A
+0x6B25 = 0x896F
+0x6B26 = 0x8974
+0x6B27 = 0x8977
+0x6B28 = 0x897E
+0x6B29 = 0x8983
+0x6B2A = 0x8988
+0x6B2B = 0x898A
+0x6B2C = 0x8993
+0x6B2D = 0x8998
+0x6B2E = 0x89A1
+0x6B2F = 0x89A9
+0x6B30 = 0x89A6
+0x6B31 = 0x89AC
+0x6B32 = 0x89AF
+0x6B33 = 0x89B2
+0x6B34 = 0x89BA
+0x6B35 = 0x89BD
+0x6B36 = 0x89BF
+0x6B37 = 0x89C0
+0x6B38 = 0x89DA
+0x6B39 = 0x89DC
+0x6B3A = 0x89DD
+0x6B3B = 0x89E7
+0x6B3C = 0x89F4
+0x6B3D = 0x89F8
+0x6B3E = 0x8A03
+0x6B3F = 0x8A16
+0x6B40 = 0x8A10
+0x6B41 = 0x8A0C
+0x6B42 = 0x8A1B
+0x6B43 = 0x8A1D
+0x6B44 = 0x8A25
+0x6B45 = 0x8A36
+0x6B46 = 0x8A41
+0x6B47 = 0x8A5B
+0x6B48 = 0x8A52
+0x6B49 = 0x8A46
+0x6B4A = 0x8A48
+0x6B4B = 0x8A7C
+0x6B4C = 0x8A6D
+0x6B4D = 0x8A6C
+0x6B4E = 0x8A62
+0x6B4F = 0x8A85
+0x6B50 = 0x8A82
+0x6B51 = 0x8A84
+0x6B52 = 0x8AA8
+0x6B53 = 0x8AA1
+0x6B54 = 0x8A91
+0x6B55 = 0x8AA5
+0x6B56 = 0x8AA6
+0x6B57 = 0x8A9A
+0x6B58 = 0x8AA3
+0x6B59 = 0x8AC4
+0x6B5A = 0x8ACD
+0x6B5B = 0x8AC2
+0x6B5C = 0x8ADA
+0x6B5D = 0x8AEB
+0x6B5E = 0x8AF3
+0x6B5F = 0x8AE7
+0x6B60 = 0x8AE4
+0x6B61 = 0x8AF1
+0x6B62 = 0x8B14
+0x6B63 = 0x8AE0
+0x6B64 = 0x8AE2
+0x6B65 = 0x8AF7
+0x6B66 = 0x8ADE
+0x6B67 = 0x8ADB
+0x6B68 = 0x8B0C
+0x6B69 = 0x8B07
+0x6B6A = 0x8B1A
+0x6B6B = 0x8AE1
+0x6B6C = 0x8B16
+0x6B6D = 0x8B10
+0x6B6E = 0x8B17
+0x6B6F = 0x8B20
+0x6B70 = 0x8B33
+0x6B71 = 0x97AB
+0x6B72 = 0x8B26
+0x6B73 = 0x8B2B
+0x6B74 = 0x8B3E
+0x6B75 = 0x8B28
+0x6B76 = 0x8B41
+0x6B77 = 0x8B4C
+0x6B78 = 0x8B4F
+0x6B79 = 0x8B4E
+0x6B7A = 0x8B49
+0x6B7B = 0x8B56
+0x6B7C = 0x8B5B
+0x6B7D = 0x8B5A
+0x6B7E = 0x8B6B
+0x6C21 = 0x8B5F
+0x6C22 = 0x8B6C
+0x6C23 = 0x8B6F
+0x6C24 = 0x8B74
+0x6C25 = 0x8B7D
+0x6C26 = 0x8B80
+0x6C27 = 0x8B8C
+0x6C28 = 0x8B8E
+0x6C29 = 0x8B92
+0x6C2A = 0x8B93
+0x6C2B = 0x8B96
+0x6C2C = 0x8B99
+0x6C2D = 0x8B9A
+0x6C2E = 0x8C3A
+0x6C2F = 0x8C41
+0x6C30 = 0x8C3F
+0x6C31 = 0x8C48
+0x6C32 = 0x8C4C
+0x6C33 = 0x8C4E
+0x6C34 = 0x8C50
+0x6C35 = 0x8C55
+0x6C36 = 0x8C62
+0x6C37 = 0x8C6C
+0x6C38 = 0x8C78
+0x6C39 = 0x8C7A
+0x6C3A = 0x8C82
+0x6C3B = 0x8C89
+0x6C3C = 0x8C85
+0x6C3D = 0x8C8A
+0x6C3E = 0x8C8D
+0x6C3F = 0x8C8E
+0x6C40 = 0x8C94
+0x6C41 = 0x8C7C
+0x6C42 = 0x8C98
+0x6C43 = 0x621D
+0x6C44 = 0x8CAD
+0x6C45 = 0x8CAA
+0x6C46 = 0x8CBD
+0x6C47 = 0x8CB2
+0x6C48 = 0x8CB3
+0x6C49 = 0x8CAE
+0x6C4A = 0x8CB6
+0x6C4B = 0x8CC8
+0x6C4C = 0x8CC1
+0x6C4D = 0x8CE4
+0x6C4E = 0x8CE3
+0x6C4F = 0x8CDA
+0x6C50 = 0x8CFD
+0x6C51 = 0x8CFA
+0x6C52 = 0x8CFB
+0x6C53 = 0x8D04
+0x6C54 = 0x8D05
+0x6C55 = 0x8D0A
+0x6C56 = 0x8D07
+0x6C57 = 0x8D0F
+0x6C58 = 0x8D0D
+0x6C59 = 0x8D10
+0x6C5A = 0x9F4E
+0x6C5B = 0x8D13
+0x6C5C = 0x8CCD
+0x6C5D = 0x8D14
+0x6C5E = 0x8D16
+0x6C5F = 0x8D67
+0x6C60 = 0x8D6D
+0x6C61 = 0x8D71
+0x6C62 = 0x8D73
+0x6C63 = 0x8D81
+0x6C64 = 0x8D99
+0x6C65 = 0x8DC2
+0x6C66 = 0x8DBE
+0x6C67 = 0x8DBA
+0x6C68 = 0x8DCF
+0x6C69 = 0x8DDA
+0x6C6A = 0x8DD6
+0x6C6B = 0x8DCC
+0x6C6C = 0x8DDB
+0x6C6D = 0x8DCB
+0x6C6E = 0x8DEA
+0x6C6F = 0x8DEB
+0x6C70 = 0x8DDF
+0x6C71 = 0x8DE3
+0x6C72 = 0x8DFC
+0x6C73 = 0x8E08
+0x6C74 = 0x8E09
+0x6C75 = 0x8DFF
+0x6C76 = 0x8E1D
+0x6C77 = 0x8E1E
+0x6C78 = 0x8E10
+0x6C79 = 0x8E1F
+0x6C7A = 0x8E42
+0x6C7B = 0x8E35
+0x6C7C = 0x8E30
+0x6C7D = 0x8E34
+0x6C7E = 0x8E4A
+0x6D21 = 0x8E47
+0x6D22 = 0x8E49
+0x6D23 = 0x8E4C
+0x6D24 = 0x8E50
+0x6D25 = 0x8E48
+0x6D26 = 0x8E59
+0x6D27 = 0x8E64
+0x6D28 = 0x8E60
+0x6D29 = 0x8E2A
+0x6D2A = 0x8E63
+0x6D2B = 0x8E55
+0x6D2C = 0x8E76
+0x6D2D = 0x8E72
+0x6D2E = 0x8E7C
+0x6D2F = 0x8E81
+0x6D30 = 0x8E87
+0x6D31 = 0x8E85
+0x6D32 = 0x8E84
+0x6D33 = 0x8E8B
+0x6D34 = 0x8E8A
+0x6D35 = 0x8E93
+0x6D36 = 0x8E91
+0x6D37 = 0x8E94
+0x6D38 = 0x8E99
+0x6D39 = 0x8EAA
+0x6D3A = 0x8EA1
+0x6D3B = 0x8EAC
+0x6D3C = 0x8EB0
+0x6D3D = 0x8EC6
+0x6D3E = 0x8EB1
+0x6D3F = 0x8EBE
+0x6D40 = 0x8EC5
+0x6D41 = 0x8EC8
+0x6D42 = 0x8ECB
+0x6D43 = 0x8EDB
+0x6D44 = 0x8EE3
+0x6D45 = 0x8EFC
+0x6D46 = 0x8EFB
+0x6D47 = 0x8EEB
+0x6D48 = 0x8EFE
+0x6D49 = 0x8F0A
+0x6D4A = 0x8F05
+0x6D4B = 0x8F15
+0x6D4C = 0x8F12
+0x6D4D = 0x8F19
+0x6D4E = 0x8F13
+0x6D4F = 0x8F1C
+0x6D50 = 0x8F1F
+0x6D51 = 0x8F1B
+0x6D52 = 0x8F0C
+0x6D53 = 0x8F26
+0x6D54 = 0x8F33
+0x6D55 = 0x8F3B
+0x6D56 = 0x8F39
+0x6D57 = 0x8F45
+0x6D58 = 0x8F42
+0x6D59 = 0x8F3E
+0x6D5A = 0x8F4C
+0x6D5B = 0x8F49
+0x6D5C = 0x8F46
+0x6D5D = 0x8F4E
+0x6D5E = 0x8F57
+0x6D5F = 0x8F5C
+0x6D60 = 0x8F62
+0x6D61 = 0x8F63
+0x6D62 = 0x8F64
+0x6D63 = 0x8F9C
+0x6D64 = 0x8F9F
+0x6D65 = 0x8FA3
+0x6D66 = 0x8FAD
+0x6D67 = 0x8FAF
+0x6D68 = 0x8FB7
+0x6D69 = 0x8FDA
+0x6D6A = 0x8FE5
+0x6D6B = 0x8FE2
+0x6D6C = 0x8FEA
+0x6D6D = 0x8FEF
+0x6D6E = 0x9087
+0x6D6F = 0x8FF4
+0x6D70 = 0x9005
+0x6D71 = 0x8FF9
+0x6D72 = 0x8FFA
+0x6D73 = 0x9011
+0x6D74 = 0x9015
+0x6D75 = 0x9021
+0x6D76 = 0x900D
+0x6D77 = 0x901E
+0x6D78 = 0x9016
+0x6D79 = 0x900B
+0x6D7A = 0x9027
+0x6D7B = 0x9036
+0x6D7C = 0x9035
+0x6D7D = 0x9039
+0x6D7E = 0x8FF8
+0x6E21 = 0x904F
+0x6E22 = 0x9050
+0x6E23 = 0x9051
+0x6E24 = 0x9052
+0x6E25 = 0x900E
+0x6E26 = 0x9049
+0x6E27 = 0x903E
+0x6E28 = 0x9056
+0x6E29 = 0x9058
+0x6E2A = 0x905E
+0x6E2B = 0x9068
+0x6E2C = 0x906F
+0x6E2D = 0x9076
+0x6E2E = 0x96A8
+0x6E2F = 0x9072
+0x6E30 = 0x9082
+0x6E31 = 0x907D
+0x6E32 = 0x9081
+0x6E33 = 0x9080
+0x6E34 = 0x908A
+0x6E35 = 0x9089
+0x6E36 = 0x908F
+0x6E37 = 0x90A8
+0x6E38 = 0x90AF
+0x6E39 = 0x90B1
+0x6E3A = 0x90B5
+0x6E3B = 0x90E2
+0x6E3C = 0x90E4
+0x6E3D = 0x6248
+0x6E3E = 0x90DB
+0x6E3F = 0x9102
+0x6E40 = 0x9112
+0x6E41 = 0x9119
+0x6E42 = 0x9132
+0x6E43 = 0x9130
+0x6E44 = 0x914A
+0x6E45 = 0x9156
+0x6E46 = 0x9158
+0x6E47 = 0x9163
+0x6E48 = 0x9165
+0x6E49 = 0x9169
+0x6E4A = 0x9173
+0x6E4B = 0x9172
+0x6E4C = 0x918B
+0x6E4D = 0x9189
+0x6E4E = 0x9182
+0x6E4F = 0x91A2
+0x6E50 = 0x91AB
+0x6E51 = 0x91AF
+0x6E52 = 0x91AA
+0x6E53 = 0x91B5
+0x6E54 = 0x91B4
+0x6E55 = 0x91BA
+0x6E56 = 0x91C0
+0x6E57 = 0x91C1
+0x6E58 = 0x91C9
+0x6E59 = 0x91CB
+0x6E5A = 0x91D0
+0x6E5B = 0x91D6
+0x6E5C = 0x91DF
+0x6E5D = 0x91E1
+0x6E5E = 0x91DB
+0x6E5F = 0x91FC
+0x6E60 = 0x91F5
+0x6E61 = 0x91F6
+0x6E62 = 0x921E
+0x6E63 = 0x91FF
+0x6E64 = 0x9214
+0x6E65 = 0x922C
+0x6E66 = 0x9215
+0x6E67 = 0x9211
+0x6E68 = 0x925E
+0x6E69 = 0x9257
+0x6E6A = 0x9245
+0x6E6B = 0x9249
+0x6E6C = 0x9264
+0x6E6D = 0x9248
+0x6E6E = 0x9295
+0x6E6F = 0x923F
+0x6E70 = 0x924B
+0x6E71 = 0x9250
+0x6E72 = 0x929C
+0x6E73 = 0x9296
+0x6E74 = 0x9293
+0x6E75 = 0x929B
+0x6E76 = 0x925A
+0x6E77 = 0x92CF
+0x6E78 = 0x92B9
+0x6E79 = 0x92B7
+0x6E7A = 0x92E9
+0x6E7B = 0x930F
+0x6E7C = 0x92FA
+0x6E7D = 0x9344
+0x6E7E = 0x932E
+0x6F21 = 0x9319
+0x6F22 = 0x9322
+0x6F23 = 0x931A
+0x6F24 = 0x9323
+0x6F25 = 0x933A
+0x6F26 = 0x9335
+0x6F27 = 0x933B
+0x6F28 = 0x935C
+0x6F29 = 0x9360
+0x6F2A = 0x937C
+0x6F2B = 0x936E
+0x6F2C = 0x9356
+0x6F2D = 0x93B0
+0x6F2E = 0x93AC
+0x6F2F = 0x93AD
+0x6F30 = 0x9394
+0x6F31 = 0x93B9
+0x6F32 = 0x93D6
+0x6F33 = 0x93D7
+0x6F34 = 0x93E8
+0x6F35 = 0x93E5
+0x6F36 = 0x93D8
+0x6F37 = 0x93C3
+0x6F38 = 0x93DD
+0x6F39 = 0x93D0
+0x6F3A = 0x93C8
+0x6F3B = 0x93E4
+0x6F3C = 0x941A
+0x6F3D = 0x9414
+0x6F3E = 0x9413
+0x6F3F = 0x9403
+0x6F40 = 0x9407
+0x6F41 = 0x9410
+0x6F42 = 0x9436
+0x6F43 = 0x942B
+0x6F44 = 0x9435
+0x6F45 = 0x9421
+0x6F46 = 0x943A
+0x6F47 = 0x9441
+0x6F48 = 0x9452
+0x6F49 = 0x9444
+0x6F4A = 0x945B
+0x6F4B = 0x9460
+0x6F4C = 0x9462
+0x6F4D = 0x945E
+0x6F4E = 0x946A
+0x6F4F = 0x9229
+0x6F50 = 0x9470
+0x6F51 = 0x9475
+0x6F52 = 0x9477
+0x6F53 = 0x947D
+0x6F54 = 0x945A
+0x6F55 = 0x947C
+0x6F56 = 0x947E
+0x6F57 = 0x9481
+0x6F58 = 0x947F
+0x6F59 = 0x9582
+0x6F5A = 0x9587
+0x6F5B = 0x958A
+0x6F5C = 0x9594
+0x6F5D = 0x9596
+0x6F5E = 0x9598
+0x6F5F = 0x9599
+0x6F60 = 0x95A0
+0x6F61 = 0x95A8
+0x6F62 = 0x95A7
+0x6F63 = 0x95AD
+0x6F64 = 0x95BC
+0x6F65 = 0x95BB
+0x6F66 = 0x95B9
+0x6F67 = 0x95BE
+0x6F68 = 0x95CA
+0x6F69 = 0x6FF6
+0x6F6A = 0x95C3
+0x6F6B = 0x95CD
+0x6F6C = 0x95CC
+0x6F6D = 0x95D5
+0x6F6E = 0x95D4
+0x6F6F = 0x95D6
+0x6F70 = 0x95DC
+0x6F71 = 0x95E1
+0x6F72 = 0x95E5
+0x6F73 = 0x95E2
+0x6F74 = 0x9621
+0x6F75 = 0x9628
+0x6F76 = 0x962E
+0x6F77 = 0x962F
+0x6F78 = 0x9642
+0x6F79 = 0x964C
+0x6F7A = 0x964F
+0x6F7B = 0x964B
+0x6F7C = 0x9677
+0x6F7D = 0x965C
+0x6F7E = 0x965E
+0x7021 = 0x965D
+0x7022 = 0x965F
+0x7023 = 0x9666
+0x7024 = 0x9672
+0x7025 = 0x966C
+0x7026 = 0x968D
+0x7027 = 0x9698
+0x7028 = 0x9695
+0x7029 = 0x9697
+0x702A = 0x96AA
+0x702B = 0x96A7
+0x702C = 0x96B1
+0x702D = 0x96B2
+0x702E = 0x96B0
+0x702F = 0x96B4
+0x7030 = 0x96B6
+0x7031 = 0x96B8
+0x7032 = 0x96B9
+0x7033 = 0x96CE
+0x7034 = 0x96CB
+0x7035 = 0x96C9
+0x7036 = 0x96CD
+0x7037 = 0x894D
+0x7038 = 0x96DC
+0x7039 = 0x970D
+0x703A = 0x96D5
+0x703B = 0x96F9
+0x703C = 0x9704
+0x703D = 0x9706
+0x703E = 0x9708
+0x703F = 0x9713
+0x7040 = 0x970E
+0x7041 = 0x9711
+0x7042 = 0x970F
+0x7043 = 0x9716
+0x7044 = 0x9719
+0x7045 = 0x9724
+0x7046 = 0x972A
+0x7047 = 0x9730
+0x7048 = 0x9739
+0x7049 = 0x973D
+0x704A = 0x973E
+0x704B = 0x9744
+0x704C = 0x9746
+0x704D = 0x9748
+0x704E = 0x9742
+0x704F = 0x9749
+0x7050 = 0x975C
+0x7051 = 0x9760
+0x7052 = 0x9764
+0x7053 = 0x9766
+0x7054 = 0x9768
+0x7055 = 0x52D2
+0x7056 = 0x976B
+0x7057 = 0x9771
+0x7058 = 0x9779
+0x7059 = 0x9785
+0x705A = 0x977C
+0x705B = 0x9781
+0x705C = 0x977A
+0x705D = 0x9786
+0x705E = 0x978B
+0x705F = 0x978F
+0x7060 = 0x9790
+0x7061 = 0x979C
+0x7062 = 0x97A8
+0x7063 = 0x97A6
+0x7064 = 0x97A3
+0x7065 = 0x97B3
+0x7066 = 0x97B4
+0x7067 = 0x97C3
+0x7068 = 0x97C6
+0x7069 = 0x97C8
+0x706A = 0x97CB
+0x706B = 0x97DC
+0x706C = 0x97ED
+0x706D = 0x9F4F
+0x706E = 0x97F2
+0x706F = 0x7ADF
+0x7070 = 0x97F6
+0x7071 = 0x97F5
+0x7072 = 0x980F
+0x7073 = 0x980C
+0x7074 = 0x9838
+0x7075 = 0x9824
+0x7076 = 0x9821
+0x7077 = 0x9837
+0x7078 = 0x983D
+0x7079 = 0x9846
+0x707A = 0x984F
+0x707B = 0x984B
+0x707C = 0x986B
+0x707D = 0x986F
+0x707E = 0x9870
+0x7121 = 0x9871
+0x7122 = 0x9874
+0x7123 = 0x9873
+0x7124 = 0x98AA
+0x7125 = 0x98AF
+0x7126 = 0x98B1
+0x7127 = 0x98B6
+0x7128 = 0x98C4
+0x7129 = 0x98C3
+0x712A = 0x98C6
+0x712B = 0x98E9
+0x712C = 0x98EB
+0x712D = 0x9903
+0x712E = 0x9909
+0x712F = 0x9912
+0x7130 = 0x9914
+0x7131 = 0x9918
+0x7132 = 0x9921
+0x7133 = 0x991D
+0x7134 = 0x991E
+0x7135 = 0x9924
+0x7136 = 0x9920
+0x7137 = 0x992C
+0x7138 = 0x992E
+0x7139 = 0x993D
+0x713A = 0x993E
+0x713B = 0x9942
+0x713C = 0x9949
+0x713D = 0x9945
+0x713E = 0x9950
+0x713F = 0x994B
+0x7140 = 0x9951
+0x7141 = 0x9952
+0x7142 = 0x994C
+0x7143 = 0x9955
+0x7144 = 0x9997
+0x7145 = 0x9998
+0x7146 = 0x99A5
+0x7147 = 0x99AD
+0x7148 = 0x99AE
+0x7149 = 0x99BC
+0x714A = 0x99DF
+0x714B = 0x99DB
+0x714C = 0x99DD
+0x714D = 0x99D8
+0x714E = 0x99D1
+0x714F = 0x99ED
+0x7150 = 0x99EE
+0x7151 = 0x99F1
+0x7152 = 0x99F2
+0x7153 = 0x99FB
+0x7154 = 0x99F8
+0x7155 = 0x9A01
+0x7156 = 0x9A0F
+0x7157 = 0x9A05
+0x7158 = 0x99E2
+0x7159 = 0x9A19
+0x715A = 0x9A2B
+0x715B = 0x9A37
+0x715C = 0x9A45
+0x715D = 0x9A42
+0x715E = 0x9A40
+0x715F = 0x9A43
+0x7160 = 0x9A3E
+0x7161 = 0x9A55
+0x7162 = 0x9A4D
+0x7163 = 0x9A5B
+0x7164 = 0x9A57
+0x7165 = 0x9A5F
+0x7166 = 0x9A62
+0x7167 = 0x9A65
+0x7168 = 0x9A64
+0x7169 = 0x9A69
+0x716A = 0x9A6B
+0x716B = 0x9A6A
+0x716C = 0x9AAD
+0x716D = 0x9AB0
+0x716E = 0x9ABC
+0x716F = 0x9AC0
+0x7170 = 0x9ACF
+0x7171 = 0x9AD1
+0x7172 = 0x9AD3
+0x7173 = 0x9AD4
+0x7174 = 0x9ADE
+0x7175 = 0x9ADF
+0x7176 = 0x9AE2
+0x7177 = 0x9AE3
+0x7178 = 0x9AE6
+0x7179 = 0x9AEF
+0x717A = 0x9AEB
+0x717B = 0x9AEE
+0x717C = 0x9AF4
+0x717D = 0x9AF1
+0x717E = 0x9AF7
+0x7221 = 0x9AFB
+0x7222 = 0x9B06
+0x7223 = 0x9B18
+0x7224 = 0x9B1A
+0x7225 = 0x9B1F
+0x7226 = 0x9B22
+0x7227 = 0x9B23
+0x7228 = 0x9B25
+0x7229 = 0x9B27
+0x722A = 0x9B28
+0x722B = 0x9B29
+0x722C = 0x9B2A
+0x722D = 0x9B2E
+0x722E = 0x9B2F
+0x722F = 0x9B32
+0x7230 = 0x9B44
+0x7231 = 0x9B43
+0x7232 = 0x9B4F
+0x7233 = 0x9B4D
+0x7234 = 0x9B4E
+0x7235 = 0x9B51
+0x7236 = 0x9B58
+0x7237 = 0x9B74
+0x7238 = 0x9B93
+0x7239 = 0x9B83
+0x723A = 0x9B91
+0x723B = 0x9B96
+0x723C = 0x9B97
+0x723D = 0x9B9F
+0x723E = 0x9BA0
+0x723F = 0x9BA8
+0x7240 = 0x9BB4
+0x7241 = 0x9BC0
+0x7242 = 0x9BCA
+0x7243 = 0x9BB9
+0x7244 = 0x9BC6
+0x7245 = 0x9BCF
+0x7246 = 0x9BD1
+0x7247 = 0x9BD2
+0x7248 = 0x9BE3
+0x7249 = 0x9BE2
+0x724A = 0x9BE4
+0x724B = 0x9BD4
+0x724C = 0x9BE1
+0x724D = 0x9C3A
+0x724E = 0x9BF2
+0x724F = 0x9BF1
+0x7250 = 0x9BF0
+0x7251 = 0x9C15
+0x7252 = 0x9C14
+0x7253 = 0x9C09
+0x7254 = 0x9C13
+0x7255 = 0x9C0C
+0x7256 = 0x9C06
+0x7257 = 0x9C08
+0x7258 = 0x9C12
+0x7259 = 0x9C0A
+0x725A = 0x9C04
+0x725B = 0x9C2E
+0x725C = 0x9C1B
+0x725D = 0x9C25
+0x725E = 0x9C24
+0x725F = 0x9C21
+0x7260 = 0x9C30
+0x7261 = 0x9C47
+0x7262 = 0x9C32
+0x7263 = 0x9C46
+0x7264 = 0x9C3E
+0x7265 = 0x9C5A
+0x7266 = 0x9C60
+0x7267 = 0x9C67
+0x7268 = 0x9C76
+0x7269 = 0x9C78
+0x726A = 0x9CE7
+0x726B = 0x9CEC
+0x726C = 0x9CF0
+0x726D = 0x9D09
+0x726E = 0x9D08
+0x726F = 0x9CEB
+0x7270 = 0x9D03
+0x7271 = 0x9D06
+0x7272 = 0x9D2A
+0x7273 = 0x9D26
+0x7274 = 0x9DAF
+0x7275 = 0x9D23
+0x7276 = 0x9D1F
+0x7277 = 0x9D44
+0x7278 = 0x9D15
+0x7279 = 0x9D12
+0x727A = 0x9D41
+0x727B = 0x9D3F
+0x727C = 0x9D3E
+0x727D = 0x9D46
+0x727E = 0x9D48
+0x7321 = 0x9D5D
+0x7322 = 0x9D5E
+0x7323 = 0x9D64
+0x7324 = 0x9D51
+0x7325 = 0x9D50
+0x7326 = 0x9D59
+0x7327 = 0x9D72
+0x7328 = 0x9D89
+0x7329 = 0x9D87
+0x732A = 0x9DAB
+0x732B = 0x9D6F
+0x732C = 0x9D7A
+0x732D = 0x9D9A
+0x732E = 0x9DA4
+0x732F = 0x9DA9
+0x7330 = 0x9DB2
+0x7331 = 0x9DC4
+0x7332 = 0x9DC1
+0x7333 = 0x9DBB
+0x7334 = 0x9DB8
+0x7335 = 0x9DBA
+0x7336 = 0x9DC6
+0x7337 = 0x9DCF
+0x7338 = 0x9DC2
+0x7339 = 0x9DD9
+0x733A = 0x9DD3
+0x733B = 0x9DF8
+0x733C = 0x9DE6
+0x733D = 0x9DED
+0x733E = 0x9DEF
+0x733F = 0x9DFD
+0x7340 = 0x9E1A
+0x7341 = 0x9E1B
+0x7342 = 0x9E1E
+0x7343 = 0x9E75
+0x7344 = 0x9E79
+0x7345 = 0x9E7D
+0x7346 = 0x9E81
+0x7347 = 0x9E88
+0x7348 = 0x9E8B
+0x7349 = 0x9E8C
+0x734A = 0x9E92
+0x734B = 0x9E95
+0x734C = 0x9E91
+0x734D = 0x9E9D
+0x734E = 0x9EA5
+0x734F = 0x9EA9
+0x7350 = 0x9EB8
+0x7351 = 0x9EAA
+0x7352 = 0x9EAD
+0x7353 = 0x9761
+0x7354 = 0x9ECC
+0x7355 = 0x9ECE
+0x7356 = 0x9ECF
+0x7357 = 0x9ED0
+0x7358 = 0x9ED4
+0x7359 = 0x9EDC
+0x735A = 0x9EDE
+0x735B = 0x9EDD
+0x735C = 0x9EE0
+0x735D = 0x9EE5
+0x735E = 0x9EE8
+0x735F = 0x9EEF
+0x7360 = 0x9EF4
+0x7361 = 0x9EF6
+0x7362 = 0x9EF7
+0x7363 = 0x9EF9
+0x7364 = 0x9EFB
+0x7365 = 0x9EFC
+0x7366 = 0x9EFD
+0x7367 = 0x9F07
+0x7368 = 0x9F08
+0x7369 = 0x76B7
+0x736A = 0x9F15
+0x736B = 0x9F21
+0x736C = 0x9F2C
+0x736D = 0x9F3E
+0x736E = 0x9F4A
+0x736F = 0x9F52
+0x7370 = 0x9F54
+0x7371 = 0x9F63
+0x7372 = 0x9F5F
+0x7373 = 0x9F60
+0x7374 = 0x9F61
+0x7375 = 0x9F66
+0x7376 = 0x9F67
+0x7377 = 0x9F6C
+0x7378 = 0x9F6A
+0x7379 = 0x9F77
+0x737A = 0x9F72
+0x737B = 0x9F76
+0x737C = 0x9F95
+0x737D = 0x9F9C
+0x737E = 0x9FA0
+0x7421 = 0x582F
+0x7422 = 0x69C7
+0x7423 = 0x9059
+0x7424 = 0x7464
+0x7425 = 0x51DC
+0x7426 = 0x7199
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208UDC%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208UDC%UCS.src
new file mode 100644
index 0000000..9f5dd94
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208UDC%UCS.src
@@ -0,0 +1,954 @@
+# $NetBSD: JISX0208UDC%UCS.src,v 1.1 2003/07/19 20:20:40 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0208UDC/UCS"
+SRC_ZONE	0x75-0x7E / 0x21-0x7E / 8
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x7521 = 0xE000
+0x7522 = 0xE001
+0x7523 = 0xE002
+0x7524 = 0xE003
+0x7525 = 0xE004
+0x7526 = 0xE005
+0x7527 = 0xE006
+0x7528 = 0xE007
+0x7529 = 0xE008
+0x752A = 0xE009
+0x752B = 0xE00A
+0x752C = 0xE00B
+0x752D = 0xE00C
+0x752E = 0xE00D
+0x752F = 0xE00E
+0x7530 = 0xE00F
+0x7531 = 0xE010
+0x7532 = 0xE011
+0x7533 = 0xE012
+0x7534 = 0xE013
+0x7535 = 0xE014
+0x7536 = 0xE015
+0x7537 = 0xE016
+0x7538 = 0xE017
+0x7539 = 0xE018
+0x753A = 0xE019
+0x753B = 0xE01A
+0x753C = 0xE01B
+0x753D = 0xE01C
+0x753E = 0xE01D
+0x753F = 0xE01E
+0x7540 = 0xE01F
+0x7541 = 0xE020
+0x7542 = 0xE021
+0x7543 = 0xE022
+0x7544 = 0xE023
+0x7545 = 0xE024
+0x7546 = 0xE025
+0x7547 = 0xE026
+0x7548 = 0xE027
+0x7549 = 0xE028
+0x754A = 0xE029
+0x754B = 0xE02A
+0x754C = 0xE02B
+0x754D = 0xE02C
+0x754E = 0xE02D
+0x754F = 0xE02E
+0x7550 = 0xE02F
+0x7551 = 0xE030
+0x7552 = 0xE031
+0x7553 = 0xE032
+0x7554 = 0xE033
+0x7555 = 0xE034
+0x7556 = 0xE035
+0x7557 = 0xE036
+0x7558 = 0xE037
+0x7559 = 0xE038
+0x755A = 0xE039
+0x755B = 0xE03A
+0x755C = 0xE03B
+0x755D = 0xE03C
+0x755E = 0xE03D
+0x755F = 0xE03E
+0x7560 = 0xE03F
+0x7561 = 0xE040
+0x7562 = 0xE041
+0x7563 = 0xE042
+0x7564 = 0xE043
+0x7565 = 0xE044
+0x7566 = 0xE045
+0x7567 = 0xE046
+0x7568 = 0xE047
+0x7569 = 0xE048
+0x756A = 0xE049
+0x756B = 0xE04A
+0x756C = 0xE04B
+0x756D = 0xE04C
+0x756E = 0xE04D
+0x756F = 0xE04E
+0x7570 = 0xE04F
+0x7571 = 0xE050
+0x7572 = 0xE051
+0x7573 = 0xE052
+0x7574 = 0xE053
+0x7575 = 0xE054
+0x7576 = 0xE055
+0x7577 = 0xE056
+0x7578 = 0xE057
+0x7579 = 0xE058
+0x757A = 0xE059
+0x757B = 0xE05A
+0x757C = 0xE05B
+0x757D = 0xE05C
+0x757E = 0xE05D
+0x7621 = 0xE05E
+0x7622 = 0xE05F
+0x7623 = 0xE060
+0x7624 = 0xE061
+0x7625 = 0xE062
+0x7626 = 0xE063
+0x7627 = 0xE064
+0x7628 = 0xE065
+0x7629 = 0xE066
+0x762A = 0xE067
+0x762B = 0xE068
+0x762C = 0xE069
+0x762D = 0xE06A
+0x762E = 0xE06B
+0x762F = 0xE06C
+0x7630 = 0xE06D
+0x7631 = 0xE06E
+0x7632 = 0xE06F
+0x7633 = 0xE070
+0x7634 = 0xE071
+0x7635 = 0xE072
+0x7636 = 0xE073
+0x7637 = 0xE074
+0x7638 = 0xE075
+0x7639 = 0xE076
+0x763A = 0xE077
+0x763B = 0xE078
+0x763C = 0xE079
+0x763D = 0xE07A
+0x763E = 0xE07B
+0x763F = 0xE07C
+0x7640 = 0xE07D
+0x7641 = 0xE07E
+0x7642 = 0xE07F
+0x7643 = 0xE080
+0x7644 = 0xE081
+0x7645 = 0xE082
+0x7646 = 0xE083
+0x7647 = 0xE084
+0x7648 = 0xE085
+0x7649 = 0xE086
+0x764A = 0xE087
+0x764B = 0xE088
+0x764C = 0xE089
+0x764D = 0xE08A
+0x764E = 0xE08B
+0x764F = 0xE08C
+0x7650 = 0xE08D
+0x7651 = 0xE08E
+0x7652 = 0xE08F
+0x7653 = 0xE090
+0x7654 = 0xE091
+0x7655 = 0xE092
+0x7656 = 0xE093
+0x7657 = 0xE094
+0x7658 = 0xE095
+0x7659 = 0xE096
+0x765A = 0xE097
+0x765B = 0xE098
+0x765C = 0xE099
+0x765D = 0xE09A
+0x765E = 0xE09B
+0x765F = 0xE09C
+0x7660 = 0xE09D
+0x7661 = 0xE09E
+0x7662 = 0xE09F
+0x7663 = 0xE0A0
+0x7664 = 0xE0A1
+0x7665 = 0xE0A2
+0x7666 = 0xE0A3
+0x7667 = 0xE0A4
+0x7668 = 0xE0A5
+0x7669 = 0xE0A6
+0x766A = 0xE0A7
+0x766B = 0xE0A8
+0x766C = 0xE0A9
+0x766D = 0xE0AA
+0x766E = 0xE0AB
+0x766F = 0xE0AC
+0x7670 = 0xE0AD
+0x7671 = 0xE0AE
+0x7672 = 0xE0AF
+0x7673 = 0xE0B0
+0x7674 = 0xE0B1
+0x7675 = 0xE0B2
+0x7676 = 0xE0B3
+0x7677 = 0xE0B4
+0x7678 = 0xE0B5
+0x7679 = 0xE0B6
+0x767A = 0xE0B7
+0x767B = 0xE0B8
+0x767C = 0xE0B9
+0x767D = 0xE0BA
+0x767E = 0xE0BB
+0x7721 = 0xE0BC
+0x7722 = 0xE0BD
+0x7723 = 0xE0BE
+0x7724 = 0xE0BF
+0x7725 = 0xE0C0
+0x7726 = 0xE0C1
+0x7727 = 0xE0C2
+0x7728 = 0xE0C3
+0x7729 = 0xE0C4
+0x772A = 0xE0C5
+0x772B = 0xE0C6
+0x772C = 0xE0C7
+0x772D = 0xE0C8
+0x772E = 0xE0C9
+0x772F = 0xE0CA
+0x7730 = 0xE0CB
+0x7731 = 0xE0CC
+0x7732 = 0xE0CD
+0x7733 = 0xE0CE
+0x7734 = 0xE0CF
+0x7735 = 0xE0D0
+0x7736 = 0xE0D1
+0x7737 = 0xE0D2
+0x7738 = 0xE0D3
+0x7739 = 0xE0D4
+0x773A = 0xE0D5
+0x773B = 0xE0D6
+0x773C = 0xE0D7
+0x773D = 0xE0D8
+0x773E = 0xE0D9
+0x773F = 0xE0DA
+0x7740 = 0xE0DB
+0x7741 = 0xE0DC
+0x7742 = 0xE0DD
+0x7743 = 0xE0DE
+0x7744 = 0xE0DF
+0x7745 = 0xE0E0
+0x7746 = 0xE0E1
+0x7747 = 0xE0E2
+0x7748 = 0xE0E3
+0x7749 = 0xE0E4
+0x774A = 0xE0E5
+0x774B = 0xE0E6
+0x774C = 0xE0E7
+0x774D = 0xE0E8
+0x774E = 0xE0E9
+0x774F = 0xE0EA
+0x7750 = 0xE0EB
+0x7751 = 0xE0EC
+0x7752 = 0xE0ED
+0x7753 = 0xE0EE
+0x7754 = 0xE0EF
+0x7755 = 0xE0F0
+0x7756 = 0xE0F1
+0x7757 = 0xE0F2
+0x7758 = 0xE0F3
+0x7759 = 0xE0F4
+0x775A = 0xE0F5
+0x775B = 0xE0F6
+0x775C = 0xE0F7
+0x775D = 0xE0F8
+0x775E = 0xE0F9
+0x775F = 0xE0FA
+0x7760 = 0xE0FB
+0x7761 = 0xE0FC
+0x7762 = 0xE0FD
+0x7763 = 0xE0FE
+0x7764 = 0xE0FF
+0x7765 = 0xE100
+0x7766 = 0xE101
+0x7767 = 0xE102
+0x7768 = 0xE103
+0x7769 = 0xE104
+0x776A = 0xE105
+0x776B = 0xE106
+0x776C = 0xE107
+0x776D = 0xE108
+0x776E = 0xE109
+0x776F = 0xE10A
+0x7770 = 0xE10B
+0x7771 = 0xE10C
+0x7772 = 0xE10D
+0x7773 = 0xE10E
+0x7774 = 0xE10F
+0x7775 = 0xE110
+0x7776 = 0xE111
+0x7777 = 0xE112
+0x7778 = 0xE113
+0x7779 = 0xE114
+0x777A = 0xE115
+0x777B = 0xE116
+0x777C = 0xE117
+0x777D = 0xE118
+0x777E = 0xE119
+0x7821 = 0xE11A
+0x7822 = 0xE11B
+0x7823 = 0xE11C
+0x7824 = 0xE11D
+0x7825 = 0xE11E
+0x7826 = 0xE11F
+0x7827 = 0xE120
+0x7828 = 0xE121
+0x7829 = 0xE122
+0x782A = 0xE123
+0x782B = 0xE124
+0x782C = 0xE125
+0x782D = 0xE126
+0x782E = 0xE127
+0x782F = 0xE128
+0x7830 = 0xE129
+0x7831 = 0xE12A
+0x7832 = 0xE12B
+0x7833 = 0xE12C
+0x7834 = 0xE12D
+0x7835 = 0xE12E
+0x7836 = 0xE12F
+0x7837 = 0xE130
+0x7838 = 0xE131
+0x7839 = 0xE132
+0x783A = 0xE133
+0x783B = 0xE134
+0x783C = 0xE135
+0x783D = 0xE136
+0x783E = 0xE137
+0x783F = 0xE138
+0x7840 = 0xE139
+0x7841 = 0xE13A
+0x7842 = 0xE13B
+0x7843 = 0xE13C
+0x7844 = 0xE13D
+0x7845 = 0xE13E
+0x7846 = 0xE13F
+0x7847 = 0xE140
+0x7848 = 0xE141
+0x7849 = 0xE142
+0x784A = 0xE143
+0x784B = 0xE144
+0x784C = 0xE145
+0x784D = 0xE146
+0x784E = 0xE147
+0x784F = 0xE148
+0x7850 = 0xE149
+0x7851 = 0xE14A
+0x7852 = 0xE14B
+0x7853 = 0xE14C
+0x7854 = 0xE14D
+0x7855 = 0xE14E
+0x7856 = 0xE14F
+0x7857 = 0xE150
+0x7858 = 0xE151
+0x7859 = 0xE152
+0x785A = 0xE153
+0x785B = 0xE154
+0x785C = 0xE155
+0x785D = 0xE156
+0x785E = 0xE157
+0x785F = 0xE158
+0x7860 = 0xE159
+0x7861 = 0xE15A
+0x7862 = 0xE15B
+0x7863 = 0xE15C
+0x7864 = 0xE15D
+0x7865 = 0xE15E
+0x7866 = 0xE15F
+0x7867 = 0xE160
+0x7868 = 0xE161
+0x7869 = 0xE162
+0x786A = 0xE163
+0x786B = 0xE164
+0x786C = 0xE165
+0x786D = 0xE166
+0x786E = 0xE167
+0x786F = 0xE168
+0x7870 = 0xE169
+0x7871 = 0xE16A
+0x7872 = 0xE16B
+0x7873 = 0xE16C
+0x7874 = 0xE16D
+0x7875 = 0xE16E
+0x7876 = 0xE16F
+0x7877 = 0xE170
+0x7878 = 0xE171
+0x7879 = 0xE172
+0x787A = 0xE173
+0x787B = 0xE174
+0x787C = 0xE175
+0x787D = 0xE176
+0x787E = 0xE177
+0x7921 = 0xE178
+0x7922 = 0xE179
+0x7923 = 0xE17A
+0x7924 = 0xE17B
+0x7925 = 0xE17C
+0x7926 = 0xE17D
+0x7927 = 0xE17E
+0x7928 = 0xE17F
+0x7929 = 0xE180
+0x792A = 0xE181
+0x792B = 0xE182
+0x792C = 0xE183
+0x792D = 0xE184
+0x792E = 0xE185
+0x792F = 0xE186
+0x7930 = 0xE187
+0x7931 = 0xE188
+0x7932 = 0xE189
+0x7933 = 0xE18A
+0x7934 = 0xE18B
+0x7935 = 0xE18C
+0x7936 = 0xE18D
+0x7937 = 0xE18E
+0x7938 = 0xE18F
+0x7939 = 0xE190
+0x793A = 0xE191
+0x793B = 0xE192
+0x793C = 0xE193
+0x793D = 0xE194
+0x793E = 0xE195
+0x793F = 0xE196
+0x7940 = 0xE197
+0x7941 = 0xE198
+0x7942 = 0xE199
+0x7943 = 0xE19A
+0x7944 = 0xE19B
+0x7945 = 0xE19C
+0x7946 = 0xE19D
+0x7947 = 0xE19E
+0x7948 = 0xE19F
+0x7949 = 0xE1A0
+0x794A = 0xE1A1
+0x794B = 0xE1A2
+0x794C = 0xE1A3
+0x794D = 0xE1A4
+0x794E = 0xE1A5
+0x794F = 0xE1A6
+0x7950 = 0xE1A7
+0x7951 = 0xE1A8
+0x7952 = 0xE1A9
+0x7953 = 0xE1AA
+0x7954 = 0xE1AB
+0x7955 = 0xE1AC
+0x7956 = 0xE1AD
+0x7957 = 0xE1AE
+0x7958 = 0xE1AF
+0x7959 = 0xE1B0
+0x795A = 0xE1B1
+0x795B = 0xE1B2
+0x795C = 0xE1B3
+0x795D = 0xE1B4
+0x795E = 0xE1B5
+0x795F = 0xE1B6
+0x7960 = 0xE1B7
+0x7961 = 0xE1B8
+0x7962 = 0xE1B9
+0x7963 = 0xE1BA
+0x7964 = 0xE1BB
+0x7965 = 0xE1BC
+0x7966 = 0xE1BD
+0x7967 = 0xE1BE
+0x7968 = 0xE1BF
+0x7969 = 0xE1C0
+0x796A = 0xE1C1
+0x796B = 0xE1C2
+0x796C = 0xE1C3
+0x796D = 0xE1C4
+0x796E = 0xE1C5
+0x796F = 0xE1C6
+0x7970 = 0xE1C7
+0x7971 = 0xE1C8
+0x7972 = 0xE1C9
+0x7973 = 0xE1CA
+0x7974 = 0xE1CB
+0x7975 = 0xE1CC
+0x7976 = 0xE1CD
+0x7977 = 0xE1CE
+0x7978 = 0xE1CF
+0x7979 = 0xE1D0
+0x797A = 0xE1D1
+0x797B = 0xE1D2
+0x797C = 0xE1D3
+0x797D = 0xE1D4
+0x797E = 0xE1D5
+0x7A21 = 0xE1D6
+0x7A22 = 0xE1D7
+0x7A23 = 0xE1D8
+0x7A24 = 0xE1D9
+0x7A25 = 0xE1DA
+0x7A26 = 0xE1DB
+0x7A27 = 0xE1DC
+0x7A28 = 0xE1DD
+0x7A29 = 0xE1DE
+0x7A2A = 0xE1DF
+0x7A2B = 0xE1E0
+0x7A2C = 0xE1E1
+0x7A2D = 0xE1E2
+0x7A2E = 0xE1E3
+0x7A2F = 0xE1E4
+0x7A30 = 0xE1E5
+0x7A31 = 0xE1E6
+0x7A32 = 0xE1E7
+0x7A33 = 0xE1E8
+0x7A34 = 0xE1E9
+0x7A35 = 0xE1EA
+0x7A36 = 0xE1EB
+0x7A37 = 0xE1EC
+0x7A38 = 0xE1ED
+0x7A39 = 0xE1EE
+0x7A3A = 0xE1EF
+0x7A3B = 0xE1F0
+0x7A3C = 0xE1F1
+0x7A3D = 0xE1F2
+0x7A3E = 0xE1F3
+0x7A3F = 0xE1F4
+0x7A40 = 0xE1F5
+0x7A41 = 0xE1F6
+0x7A42 = 0xE1F7
+0x7A43 = 0xE1F8
+0x7A44 = 0xE1F9
+0x7A45 = 0xE1FA
+0x7A46 = 0xE1FB
+0x7A47 = 0xE1FC
+0x7A48 = 0xE1FD
+0x7A49 = 0xE1FE
+0x7A4A = 0xE1FF
+0x7A4B = 0xE200
+0x7A4C = 0xE201
+0x7A4D = 0xE202
+0x7A4E = 0xE203
+0x7A4F = 0xE204
+0x7A50 = 0xE205
+0x7A51 = 0xE206
+0x7A52 = 0xE207
+0x7A53 = 0xE208
+0x7A54 = 0xE209
+0x7A55 = 0xE20A
+0x7A56 = 0xE20B
+0x7A57 = 0xE20C
+0x7A58 = 0xE20D
+0x7A59 = 0xE20E
+0x7A5A = 0xE20F
+0x7A5B = 0xE210
+0x7A5C = 0xE211
+0x7A5D = 0xE212
+0x7A5E = 0xE213
+0x7A5F = 0xE214
+0x7A60 = 0xE215
+0x7A61 = 0xE216
+0x7A62 = 0xE217
+0x7A63 = 0xE218
+0x7A64 = 0xE219
+0x7A65 = 0xE21A
+0x7A66 = 0xE21B
+0x7A67 = 0xE21C
+0x7A68 = 0xE21D
+0x7A69 = 0xE21E
+0x7A6A = 0xE21F
+0x7A6B = 0xE220
+0x7A6C = 0xE221
+0x7A6D = 0xE222
+0x7A6E = 0xE223
+0x7A6F = 0xE224
+0x7A70 = 0xE225
+0x7A71 = 0xE226
+0x7A72 = 0xE227
+0x7A73 = 0xE228
+0x7A74 = 0xE229
+0x7A75 = 0xE22A
+0x7A76 = 0xE22B
+0x7A77 = 0xE22C
+0x7A78 = 0xE22D
+0x7A79 = 0xE22E
+0x7A7A = 0xE22F
+0x7A7B = 0xE230
+0x7A7C = 0xE231
+0x7A7D = 0xE232
+0x7A7E = 0xE233
+0x7B21 = 0xE234
+0x7B22 = 0xE235
+0x7B23 = 0xE236
+0x7B24 = 0xE237
+0x7B25 = 0xE238
+0x7B26 = 0xE239
+0x7B27 = 0xE23A
+0x7B28 = 0xE23B
+0x7B29 = 0xE23C
+0x7B2A = 0xE23D
+0x7B2B = 0xE23E
+0x7B2C = 0xE23F
+0x7B2D = 0xE240
+0x7B2E = 0xE241
+0x7B2F = 0xE242
+0x7B30 = 0xE243
+0x7B31 = 0xE244
+0x7B32 = 0xE245
+0x7B33 = 0xE246
+0x7B34 = 0xE247
+0x7B35 = 0xE248
+0x7B36 = 0xE249
+0x7B37 = 0xE24A
+0x7B38 = 0xE24B
+0x7B39 = 0xE24C
+0x7B3A = 0xE24D
+0x7B3B = 0xE24E
+0x7B3C = 0xE24F
+0x7B3D = 0xE250
+0x7B3E = 0xE251
+0x7B3F = 0xE252
+0x7B40 = 0xE253
+0x7B41 = 0xE254
+0x7B42 = 0xE255
+0x7B43 = 0xE256
+0x7B44 = 0xE257
+0x7B45 = 0xE258
+0x7B46 = 0xE259
+0x7B47 = 0xE25A
+0x7B48 = 0xE25B
+0x7B49 = 0xE25C
+0x7B4A = 0xE25D
+0x7B4B = 0xE25E
+0x7B4C = 0xE25F
+0x7B4D = 0xE260
+0x7B4E = 0xE261
+0x7B4F = 0xE262
+0x7B50 = 0xE263
+0x7B51 = 0xE264
+0x7B52 = 0xE265
+0x7B53 = 0xE266
+0x7B54 = 0xE267
+0x7B55 = 0xE268
+0x7B56 = 0xE269
+0x7B57 = 0xE26A
+0x7B58 = 0xE26B
+0x7B59 = 0xE26C
+0x7B5A = 0xE26D
+0x7B5B = 0xE26E
+0x7B5C = 0xE26F
+0x7B5D = 0xE270
+0x7B5E = 0xE271
+0x7B5F = 0xE272
+0x7B60 = 0xE273
+0x7B61 = 0xE274
+0x7B62 = 0xE275
+0x7B63 = 0xE276
+0x7B64 = 0xE277
+0x7B65 = 0xE278
+0x7B66 = 0xE279
+0x7B67 = 0xE27A
+0x7B68 = 0xE27B
+0x7B69 = 0xE27C
+0x7B6A = 0xE27D
+0x7B6B = 0xE27E
+0x7B6C = 0xE27F
+0x7B6D = 0xE280
+0x7B6E = 0xE281
+0x7B6F = 0xE282
+0x7B70 = 0xE283
+0x7B71 = 0xE284
+0x7B72 = 0xE285
+0x7B73 = 0xE286
+0x7B74 = 0xE287
+0x7B75 = 0xE288
+0x7B76 = 0xE289
+0x7B77 = 0xE28A
+0x7B78 = 0xE28B
+0x7B79 = 0xE28C
+0x7B7A = 0xE28D
+0x7B7B = 0xE28E
+0x7B7C = 0xE28F
+0x7B7D = 0xE290
+0x7B7E = 0xE291
+0x7C21 = 0xE292
+0x7C22 = 0xE293
+0x7C23 = 0xE294
+0x7C24 = 0xE295
+0x7C25 = 0xE296
+0x7C26 = 0xE297
+0x7C27 = 0xE298
+0x7C28 = 0xE299
+0x7C29 = 0xE29A
+0x7C2A = 0xE29B
+0x7C2B = 0xE29C
+0x7C2C = 0xE29D
+0x7C2D = 0xE29E
+0x7C2E = 0xE29F
+0x7C2F = 0xE2A0
+0x7C30 = 0xE2A1
+0x7C31 = 0xE2A2
+0x7C32 = 0xE2A3
+0x7C33 = 0xE2A4
+0x7C34 = 0xE2A5
+0x7C35 = 0xE2A6
+0x7C36 = 0xE2A7
+0x7C37 = 0xE2A8
+0x7C38 = 0xE2A9
+0x7C39 = 0xE2AA
+0x7C3A = 0xE2AB
+0x7C3B = 0xE2AC
+0x7C3C = 0xE2AD
+0x7C3D = 0xE2AE
+0x7C3E = 0xE2AF
+0x7C3F = 0xE2B0
+0x7C40 = 0xE2B1
+0x7C41 = 0xE2B2
+0x7C42 = 0xE2B3
+0x7C43 = 0xE2B4
+0x7C44 = 0xE2B5
+0x7C45 = 0xE2B6
+0x7C46 = 0xE2B7
+0x7C47 = 0xE2B8
+0x7C48 = 0xE2B9
+0x7C49 = 0xE2BA
+0x7C4A = 0xE2BB
+0x7C4B = 0xE2BC
+0x7C4C = 0xE2BD
+0x7C4D = 0xE2BE
+0x7C4E = 0xE2BF
+0x7C4F = 0xE2C0
+0x7C50 = 0xE2C1
+0x7C51 = 0xE2C2
+0x7C52 = 0xE2C3
+0x7C53 = 0xE2C4
+0x7C54 = 0xE2C5
+0x7C55 = 0xE2C6
+0x7C56 = 0xE2C7
+0x7C57 = 0xE2C8
+0x7C58 = 0xE2C9
+0x7C59 = 0xE2CA
+0x7C5A = 0xE2CB
+0x7C5B = 0xE2CC
+0x7C5C = 0xE2CD
+0x7C5D = 0xE2CE
+0x7C5E = 0xE2CF
+0x7C5F = 0xE2D0
+0x7C60 = 0xE2D1
+0x7C61 = 0xE2D2
+0x7C62 = 0xE2D3
+0x7C63 = 0xE2D4
+0x7C64 = 0xE2D5
+0x7C65 = 0xE2D6
+0x7C66 = 0xE2D7
+0x7C67 = 0xE2D8
+0x7C68 = 0xE2D9
+0x7C69 = 0xE2DA
+0x7C6A = 0xE2DB
+0x7C6B = 0xE2DC
+0x7C6C = 0xE2DD
+0x7C6D = 0xE2DE
+0x7C6E = 0xE2DF
+0x7C6F = 0xE2E0
+0x7C70 = 0xE2E1
+0x7C71 = 0xE2E2
+0x7C72 = 0xE2E3
+0x7C73 = 0xE2E4
+0x7C74 = 0xE2E5
+0x7C75 = 0xE2E6
+0x7C76 = 0xE2E7
+0x7C77 = 0xE2E8
+0x7C78 = 0xE2E9
+0x7C79 = 0xE2EA
+0x7C7A = 0xE2EB
+0x7C7B = 0xE2EC
+0x7C7C = 0xE2ED
+0x7C7D = 0xE2EE
+0x7C7E = 0xE2EF
+0x7D21 = 0xE2F0
+0x7D22 = 0xE2F1
+0x7D23 = 0xE2F2
+0x7D24 = 0xE2F3
+0x7D25 = 0xE2F4
+0x7D26 = 0xE2F5
+0x7D27 = 0xE2F6
+0x7D28 = 0xE2F7
+0x7D29 = 0xE2F8
+0x7D2A = 0xE2F9
+0x7D2B = 0xE2FA
+0x7D2C = 0xE2FB
+0x7D2D = 0xE2FC
+0x7D2E = 0xE2FD
+0x7D2F = 0xE2FE
+0x7D30 = 0xE2FF
+0x7D31 = 0xE300
+0x7D32 = 0xE301
+0x7D33 = 0xE302
+0x7D34 = 0xE303
+0x7D35 = 0xE304
+0x7D36 = 0xE305
+0x7D37 = 0xE306
+0x7D38 = 0xE307
+0x7D39 = 0xE308
+0x7D3A = 0xE309
+0x7D3B = 0xE30A
+0x7D3C = 0xE30B
+0x7D3D = 0xE30C
+0x7D3E = 0xE30D
+0x7D3F = 0xE30E
+0x7D40 = 0xE30F
+0x7D41 = 0xE310
+0x7D42 = 0xE311
+0x7D43 = 0xE312
+0x7D44 = 0xE313
+0x7D45 = 0xE314
+0x7D46 = 0xE315
+0x7D47 = 0xE316
+0x7D48 = 0xE317
+0x7D49 = 0xE318
+0x7D4A = 0xE319
+0x7D4B = 0xE31A
+0x7D4C = 0xE31B
+0x7D4D = 0xE31C
+0x7D4E = 0xE31D
+0x7D4F = 0xE31E
+0x7D50 = 0xE31F
+0x7D51 = 0xE320
+0x7D52 = 0xE321
+0x7D53 = 0xE322
+0x7D54 = 0xE323
+0x7D55 = 0xE324
+0x7D56 = 0xE325
+0x7D57 = 0xE326
+0x7D58 = 0xE327
+0x7D59 = 0xE328
+0x7D5A = 0xE329
+0x7D5B = 0xE32A
+0x7D5C = 0xE32B
+0x7D5D = 0xE32C
+0x7D5E = 0xE32D
+0x7D5F = 0xE32E
+0x7D60 = 0xE32F
+0x7D61 = 0xE330
+0x7D62 = 0xE331
+0x7D63 = 0xE332
+0x7D64 = 0xE333
+0x7D65 = 0xE334
+0x7D66 = 0xE335
+0x7D67 = 0xE336
+0x7D68 = 0xE337
+0x7D69 = 0xE338
+0x7D6A = 0xE339
+0x7D6B = 0xE33A
+0x7D6C = 0xE33B
+0x7D6D = 0xE33C
+0x7D6E = 0xE33D
+0x7D6F = 0xE33E
+0x7D70 = 0xE33F
+0x7D71 = 0xE340
+0x7D72 = 0xE341
+0x7D73 = 0xE342
+0x7D74 = 0xE343
+0x7D75 = 0xE344
+0x7D76 = 0xE345
+0x7D77 = 0xE346
+0x7D78 = 0xE347
+0x7D79 = 0xE348
+0x7D7A = 0xE349
+0x7D7B = 0xE34A
+0x7D7C = 0xE34B
+0x7D7D = 0xE34C
+0x7D7E = 0xE34D
+0x7E21 = 0xE34E
+0x7E22 = 0xE34F
+0x7E23 = 0xE350
+0x7E24 = 0xE351
+0x7E25 = 0xE352
+0x7E26 = 0xE353
+0x7E27 = 0xE354
+0x7E28 = 0xE355
+0x7E29 = 0xE356
+0x7E2A = 0xE357
+0x7E2B = 0xE358
+0x7E2C = 0xE359
+0x7E2D = 0xE35A
+0x7E2E = 0xE35B
+0x7E2F = 0xE35C
+0x7E30 = 0xE35D
+0x7E31 = 0xE35E
+0x7E32 = 0xE35F
+0x7E33 = 0xE360
+0x7E34 = 0xE361
+0x7E35 = 0xE362
+0x7E36 = 0xE363
+0x7E37 = 0xE364
+0x7E38 = 0xE365
+0x7E39 = 0xE366
+0x7E3A = 0xE367
+0x7E3B = 0xE368
+0x7E3C = 0xE369
+0x7E3D = 0xE36A
+0x7E3E = 0xE36B
+0x7E3F = 0xE36C
+0x7E40 = 0xE36D
+0x7E41 = 0xE36E
+0x7E42 = 0xE36F
+0x7E43 = 0xE370
+0x7E44 = 0xE371
+0x7E45 = 0xE372
+0x7E46 = 0xE373
+0x7E47 = 0xE374
+0x7E48 = 0xE375
+0x7E49 = 0xE376
+0x7E4A = 0xE377
+0x7E4B = 0xE378
+0x7E4C = 0xE379
+0x7E4D = 0xE37A
+0x7E4E = 0xE37B
+0x7E4F = 0xE37C
+0x7E50 = 0xE37D
+0x7E51 = 0xE37E
+0x7E52 = 0xE37F
+0x7E53 = 0xE380
+0x7E54 = 0xE381
+0x7E55 = 0xE382
+0x7E56 = 0xE383
+0x7E57 = 0xE384
+0x7E58 = 0xE385
+0x7E59 = 0xE386
+0x7E5A = 0xE387
+0x7E5B = 0xE388
+0x7E5C = 0xE389
+0x7E5D = 0xE38A
+0x7E5E = 0xE38B
+0x7E5F = 0xE38C
+0x7E60 = 0xE38D
+0x7E61 = 0xE38E
+0x7E62 = 0xE38F
+0x7E63 = 0xE390
+0x7E64 = 0xE391
+0x7E65 = 0xE392
+0x7E66 = 0xE393
+0x7E67 = 0xE394
+0x7E68 = 0xE395
+0x7E69 = 0xE396
+0x7E6A = 0xE397
+0x7E6B = 0xE398
+0x7E6C = 0xE399
+0x7E6D = 0xE39A
+0x7E6E = 0xE39B
+0x7E6F = 0xE39C
+0x7E70 = 0xE39D
+0x7E71 = 0xE39E
+0x7E72 = 0xE39F
+0x7E73 = 0xE3A0
+0x7E74 = 0xE3A1
+0x7E75 = 0xE3A2
+0x7E76 = 0xE3A3
+0x7E77 = 0xE3A4
+0x7E78 = 0xE3A5
+0x7E79 = 0xE3A6
+0x7E7A = 0xE3A7
+0x7E7B = 0xE3A8
+0x7E7C = 0xE3A9
+0x7E7D = 0xE3AA
+0x7E7E = 0xE3AB
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208VDC@NEC%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208VDC@NEC%UCS.src
new file mode 100644
index 0000000..bf7ea7b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0208VDC@NEC%UCS.src
@@ -0,0 +1,97 @@
+# $NetBSD: JISX0208VDC@NEC%UCS.src,v 1.1 2003/07/19 20:20:41 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0208VDC:NEC/UCS"
+SRC_ZONE	0x2D21 - 0x2D7C
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x2D21 = 0x2460
+0x2D22 = 0x2461
+0x2D23 = 0x2462
+0x2D24 = 0x2463
+0x2D25 = 0x2464
+0x2D26 = 0x2465
+0x2D27 = 0x2466
+0x2D28 = 0x2467
+0x2D29 = 0x2468
+0x2D2A = 0x2469
+0x2D2B = 0x246A
+0x2D2C = 0x246B
+0x2D2D = 0x246C
+0x2D2E = 0x246D
+0x2D2F = 0x246E
+0x2D30 = 0x246F
+0x2D31 = 0x2470
+0x2D32 = 0x2471
+0x2D33 = 0x2472
+0x2D34 = 0x2473
+0x2D35 = 0x2160
+0x2D36 = 0x2161
+0x2D37 = 0x2162
+0x2D38 = 0x2163
+0x2D39 = 0x2164
+0x2D3A = 0x2165
+0x2D3B = 0x2166
+0x2D3C = 0x2167
+0x2D3D = 0x2168
+0x2D3E = 0x2169
+0x2D40 = 0x3349
+0x2D41 = 0x3314
+0x2D42 = 0x3322
+0x2D43 = 0x334D
+0x2D44 = 0x3318
+0x2D45 = 0x3327
+0x2D46 = 0x3303
+0x2D47 = 0x3336
+0x2D48 = 0x3351
+0x2D49 = 0x3357
+0x2D4A = 0x330D
+0x2D4B = 0x3326
+0x2D4C = 0x3323
+0x2D4D = 0x332B
+0x2D4E = 0x334A
+0x2D4F = 0x333B
+0x2D50 = 0x339C
+0x2D51 = 0x339D
+0x2D52 = 0x339E
+0x2D53 = 0x338E
+0x2D54 = 0x338F
+0x2D55 = 0x33C4
+0x2D56 = 0x33A1
+0x2D5F = 0x337B
+0x2D60 = 0x301D
+0x2D61 = 0x301F
+0x2D62 = 0x2116
+0x2D63 = 0x33CD
+0x2D64 = 0x2121
+0x2D65 = 0x32A4
+0x2D66 = 0x32A5
+0x2D67 = 0x32A6
+0x2D68 = 0x32A7
+0x2D69 = 0x32A8
+0x2D6A = 0x3231
+0x2D6B = 0x3232
+0x2D6C = 0x3239
+0x2D6D = 0x337E
+0x2D6E = 0x337D
+0x2D6F = 0x337C
+0x2D70 = 0x2252
+0x2D71 = 0x2261
+0x2D72 = 0x222B
+0x2D73 = 0x222E
+0x2D74 = 0x2211
+0x2D75 = 0x221A
+0x2D76 = 0x22A5
+0x2D77 = 0x2220
+0x2D78 = 0x221F
+0x2D79 = 0x22BF
+0x2D7A = 0x2235
+0x2D7B = 0x2229
+0x2D7C = 0x222A
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212%UCS.src
new file mode 100644
index 0000000..cf4e7ec
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212%UCS.src
@@ -0,0 +1,6167 @@
+# $NetBSD: JISX0212%UCS.src,v 1.2 2003/07/12 16:11:10 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		JISX0212/UCS
+SRC_ZONE	0x21-0x7E / 0x21-0x7E / 8
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0212 (1990) to Unicode
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0212 into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0212 and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0212 and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0212 and
+# Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Three tab-separated columns
+#		 Column #1 is the JIS X 0212 code (in hex as 0xXXXX)
+#		 Column #2 is the Unicode (in hex as 0xXXXX)
+#		 Column #3 the Unicode name (follows a comment sign, '#')
+#			The official names for Unicode characters U+4E00
+#			to U+9FA5, inclusive, is "CJK UNIFIED IDEOGRAPH-XXXX",
+#			where XXXX is the code point.  Including all these
+#			names in this file increases its size substantially
+#			and needlessly.  The token "" is used for the
+#			name of these characters.  If necessary, it can be
+#			expanded algorithmically by a parser or editor.
+#
+#	The entries are in JIS X 0212 order
+#
+#	The following algorithms can be used to change the hex form
+#		of JIS 0212 to other standard forms:
+#
+#		To change hex to EUC form, add 0x8080
+#		To change hex to kuten form, first subtract 0x2020.  Then
+#			the high and low bytes correspond to the ku and ten of
+#			the kuten form.  For example, 0x2121 -> 0x0101 -> 0101;
+#			0x6D63 -> 0x4D43 -> 7767
+#
+#   The kanji mappings are a normative part of ISO/IEC 10646.  The
+#       non-kanji mappings are provisional, pending definition of
+#       official mappings by Japanese standards bodies
+#
+#	Any comments or problems, contact 
+#
+#	Notes:
+#
+#	1. JIS X 0212 apparently unified the following two symbols
+#	   into a single character at 0x2922:
+#	
+#	   LATIN CAPITAL LETTER D WITH STROKE
+#	   LATIN CAPITAL LETTER ETH
+#
+#	   However, JIS X 0212 maintains the distinction between
+#	   the lowercase forms of these two elements at 0x2942 and 0x2943.
+#	   Given the structre of these JIS encodings, it is clear that
+#	   0x2922 and 0x2942 are intended to be a capital/small pair.
+#	   Consequently, in the Unicode mapping, 0x2922 is treated as
+#	   LATIN CAPITAL LETTER D WITH STROKE.
+#	  
+0x222F = 0x02D8
+0x2230 = 0x02C7
+0x2231 = 0x00B8
+0x2232 = 0x02D9
+0x2233 = 0x02DD
+0x2234 = 0x00AF
+0x2235 = 0x02DB
+0x2236 = 0x02DA
+0x2237 = 0x007E
+0x2238 = 0x0384
+0x2239 = 0x0385
+0x2242 = 0x00A1
+0x2243 = 0x00A6
+0x2244 = 0x00BF
+0x226B = 0x00BA
+0x226C = 0x00AA
+0x226D = 0x00A9
+0x226E = 0x00AE
+0x226F = 0x2122
+0x2270 = 0x00A4
+0x2271 = 0x2116
+0x2661 = 0x0386
+0x2662 = 0x0388
+0x2663 = 0x0389
+0x2664 = 0x038A
+0x2665 = 0x03AA
+0x2667 = 0x038C
+0x2669 = 0x038E
+0x266A = 0x03AB
+0x266C = 0x038F
+0x2671 = 0x03AC
+0x2672 = 0x03AD
+0x2673 = 0x03AE
+0x2674 = 0x03AF
+0x2675 = 0x03CA
+0x2676 = 0x0390
+0x2677 = 0x03CC
+0x2678 = 0x03C2
+0x2679 = 0x03CD
+0x267A = 0x03CB
+0x267B = 0x03B0
+0x267C = 0x03CE
+0x2742 = 0x0402
+0x2743 = 0x0403
+0x2744 = 0x0404
+0x2745 = 0x0405
+0x2746 = 0x0406
+0x2747 = 0x0407
+0x2748 = 0x0408
+0x2749 = 0x0409
+0x274A = 0x040A
+0x274B = 0x040B
+0x274C = 0x040C
+0x274D = 0x040E
+0x274E = 0x040F
+0x2772 = 0x0452
+0x2773 = 0x0453
+0x2774 = 0x0454
+0x2775 = 0x0455
+0x2776 = 0x0456
+0x2777 = 0x0457
+0x2778 = 0x0458
+0x2779 = 0x0459
+0x277A = 0x045A
+0x277B = 0x045B
+0x277C = 0x045C
+0x277D = 0x045E
+0x277E = 0x045F
+0x2921 = 0x00C6
+0x2922 = 0x0110
+0x2924 = 0x0126
+0x2926 = 0x0132
+0x2928 = 0x0141
+0x2929 = 0x013F
+0x292B = 0x014A
+0x292C = 0x00D8
+0x292D = 0x0152
+0x292F = 0x0166
+0x2930 = 0x00DE
+0x2941 = 0x00E6
+0x2942 = 0x0111
+0x2943 = 0x00F0
+0x2944 = 0x0127
+0x2945 = 0x0131
+0x2946 = 0x0133
+0x2947 = 0x0138
+0x2948 = 0x0142
+0x2949 = 0x0140
+0x294A = 0x0149
+0x294B = 0x014B
+0x294C = 0x00F8
+0x294D = 0x0153
+0x294E = 0x00DF
+0x294F = 0x0167
+0x2950 = 0x00FE
+0x2A21 = 0x00C1
+0x2A22 = 0x00C0
+0x2A23 = 0x00C4
+0x2A24 = 0x00C2
+0x2A25 = 0x0102
+0x2A26 = 0x01CD
+0x2A27 = 0x0100
+0x2A28 = 0x0104
+0x2A29 = 0x00C5
+0x2A2A = 0x00C3
+0x2A2B = 0x0106
+0x2A2C = 0x0108
+0x2A2D = 0x010C
+0x2A2E = 0x00C7
+0x2A2F = 0x010A
+0x2A30 = 0x010E
+0x2A31 = 0x00C9
+0x2A32 = 0x00C8
+0x2A33 = 0x00CB
+0x2A34 = 0x00CA
+0x2A35 = 0x011A
+0x2A36 = 0x0116
+0x2A37 = 0x0112
+0x2A38 = 0x0118
+0x2A3A = 0x011C
+0x2A3B = 0x011E
+0x2A3C = 0x0122
+0x2A3D = 0x0120
+0x2A3E = 0x0124
+0x2A3F = 0x00CD
+0x2A40 = 0x00CC
+0x2A41 = 0x00CF
+0x2A42 = 0x00CE
+0x2A43 = 0x01CF
+0x2A44 = 0x0130
+0x2A45 = 0x012A
+0x2A46 = 0x012E
+0x2A47 = 0x0128
+0x2A48 = 0x0134
+0x2A49 = 0x0136
+0x2A4A = 0x0139
+0x2A4B = 0x013D
+0x2A4C = 0x013B
+0x2A4D = 0x0143
+0x2A4E = 0x0147
+0x2A4F = 0x0145
+0x2A50 = 0x00D1
+0x2A51 = 0x00D3
+0x2A52 = 0x00D2
+0x2A53 = 0x00D6
+0x2A54 = 0x00D4
+0x2A55 = 0x01D1
+0x2A56 = 0x0150
+0x2A57 = 0x014C
+0x2A58 = 0x00D5
+0x2A59 = 0x0154
+0x2A5A = 0x0158
+0x2A5B = 0x0156
+0x2A5C = 0x015A
+0x2A5D = 0x015C
+0x2A5E = 0x0160
+0x2A5F = 0x015E
+0x2A60 = 0x0164
+0x2A61 = 0x0162
+0x2A62 = 0x00DA
+0x2A63 = 0x00D9
+0x2A64 = 0x00DC
+0x2A65 = 0x00DB
+0x2A66 = 0x016C
+0x2A67 = 0x01D3
+0x2A68 = 0x0170
+0x2A69 = 0x016A
+0x2A6A = 0x0172
+0x2A6B = 0x016E
+0x2A6C = 0x0168
+0x2A6D = 0x01D7
+0x2A6E = 0x01DB
+0x2A6F = 0x01D9
+0x2A70 = 0x01D5
+0x2A71 = 0x0174
+0x2A72 = 0x00DD
+0x2A73 = 0x0178
+0x2A74 = 0x0176
+0x2A75 = 0x0179
+0x2A76 = 0x017D
+0x2A77 = 0x017B
+0x2B21 = 0x00E1
+0x2B22 = 0x00E0
+0x2B23 = 0x00E4
+0x2B24 = 0x00E2
+0x2B25 = 0x0103
+0x2B26 = 0x01CE
+0x2B27 = 0x0101
+0x2B28 = 0x0105
+0x2B29 = 0x00E5
+0x2B2A = 0x00E3
+0x2B2B = 0x0107
+0x2B2C = 0x0109
+0x2B2D = 0x010D
+0x2B2E = 0x00E7
+0x2B2F = 0x010B
+0x2B30 = 0x010F
+0x2B31 = 0x00E9
+0x2B32 = 0x00E8
+0x2B33 = 0x00EB
+0x2B34 = 0x00EA
+0x2B35 = 0x011B
+0x2B36 = 0x0117
+0x2B37 = 0x0113
+0x2B38 = 0x0119
+0x2B39 = 0x01F5
+0x2B3A = 0x011D
+0x2B3B = 0x011F
+0x2B3D = 0x0121
+0x2B3E = 0x0125
+0x2B3F = 0x00ED
+0x2B40 = 0x00EC
+0x2B41 = 0x00EF
+0x2B42 = 0x00EE
+0x2B43 = 0x01D0
+0x2B45 = 0x012B
+0x2B46 = 0x012F
+0x2B47 = 0x0129
+0x2B48 = 0x0135
+0x2B49 = 0x0137
+0x2B4A = 0x013A
+0x2B4B = 0x013E
+0x2B4C = 0x013C
+0x2B4D = 0x0144
+0x2B4E = 0x0148
+0x2B4F = 0x0146
+0x2B50 = 0x00F1
+0x2B51 = 0x00F3
+0x2B52 = 0x00F2
+0x2B53 = 0x00F6
+0x2B54 = 0x00F4
+0x2B55 = 0x01D2
+0x2B56 = 0x0151
+0x2B57 = 0x014D
+0x2B58 = 0x00F5
+0x2B59 = 0x0155
+0x2B5A = 0x0159
+0x2B5B = 0x0157
+0x2B5C = 0x015B
+0x2B5D = 0x015D
+0x2B5E = 0x0161
+0x2B5F = 0x015F
+0x2B60 = 0x0165
+0x2B61 = 0x0163
+0x2B62 = 0x00FA
+0x2B63 = 0x00F9
+0x2B64 = 0x00FC
+0x2B65 = 0x00FB
+0x2B66 = 0x016D
+0x2B67 = 0x01D4
+0x2B68 = 0x0171
+0x2B69 = 0x016B
+0x2B6A = 0x0173
+0x2B6B = 0x016F
+0x2B6C = 0x0169
+0x2B6D = 0x01D8
+0x2B6E = 0x01DC
+0x2B6F = 0x01DA
+0x2B70 = 0x01D6
+0x2B71 = 0x0175
+0x2B72 = 0x00FD
+0x2B73 = 0x00FF
+0x2B74 = 0x0177
+0x2B75 = 0x017A
+0x2B76 = 0x017E
+0x2B77 = 0x017C
+0x3021 = 0x4E02
+0x3022 = 0x4E04
+0x3023 = 0x4E05
+0x3024 = 0x4E0C
+0x3025 = 0x4E12
+0x3026 = 0x4E1F
+0x3027 = 0x4E23
+0x3028 = 0x4E24
+0x3029 = 0x4E28
+0x302A = 0x4E2B
+0x302B = 0x4E2E
+0x302C = 0x4E2F
+0x302D = 0x4E30
+0x302E = 0x4E35
+0x302F = 0x4E40
+0x3030 = 0x4E41
+0x3031 = 0x4E44
+0x3032 = 0x4E47
+0x3033 = 0x4E51
+0x3034 = 0x4E5A
+0x3035 = 0x4E5C
+0x3036 = 0x4E63
+0x3037 = 0x4E68
+0x3038 = 0x4E69
+0x3039 = 0x4E74
+0x303A = 0x4E75
+0x303B = 0x4E79
+0x303C = 0x4E7F
+0x303D = 0x4E8D
+0x303E = 0x4E96
+0x303F = 0x4E97
+0x3040 = 0x4E9D
+0x3041 = 0x4EAF
+0x3042 = 0x4EB9
+0x3043 = 0x4EC3
+0x3044 = 0x4ED0
+0x3045 = 0x4EDA
+0x3046 = 0x4EDB
+0x3047 = 0x4EE0
+0x3048 = 0x4EE1
+0x3049 = 0x4EE2
+0x304A = 0x4EE8
+0x304B = 0x4EEF
+0x304C = 0x4EF1
+0x304D = 0x4EF3
+0x304E = 0x4EF5
+0x304F = 0x4EFD
+0x3050 = 0x4EFE
+0x3051 = 0x4EFF
+0x3052 = 0x4F00
+0x3053 = 0x4F02
+0x3054 = 0x4F03
+0x3055 = 0x4F08
+0x3056 = 0x4F0B
+0x3057 = 0x4F0C
+0x3058 = 0x4F12
+0x3059 = 0x4F15
+0x305A = 0x4F16
+0x305B = 0x4F17
+0x305C = 0x4F19
+0x305D = 0x4F2E
+0x305E = 0x4F31
+0x305F = 0x4F60
+0x3060 = 0x4F33
+0x3061 = 0x4F35
+0x3062 = 0x4F37
+0x3063 = 0x4F39
+0x3064 = 0x4F3B
+0x3065 = 0x4F3E
+0x3066 = 0x4F40
+0x3067 = 0x4F42
+0x3068 = 0x4F48
+0x3069 = 0x4F49
+0x306A = 0x4F4B
+0x306B = 0x4F4C
+0x306C = 0x4F52
+0x306D = 0x4F54
+0x306E = 0x4F56
+0x306F = 0x4F58
+0x3070 = 0x4F5F
+0x3071 = 0x4F63
+0x3072 = 0x4F6A
+0x3073 = 0x4F6C
+0x3074 = 0x4F6E
+0x3075 = 0x4F71
+0x3076 = 0x4F77
+0x3077 = 0x4F78
+0x3078 = 0x4F79
+0x3079 = 0x4F7A
+0x307A = 0x4F7D
+0x307B = 0x4F7E
+0x307C = 0x4F81
+0x307D = 0x4F82
+0x307E = 0x4F84
+0x3121 = 0x4F85
+0x3122 = 0x4F89
+0x3123 = 0x4F8A
+0x3124 = 0x4F8C
+0x3125 = 0x4F8E
+0x3126 = 0x4F90
+0x3127 = 0x4F92
+0x3128 = 0x4F93
+0x3129 = 0x4F94
+0x312A = 0x4F97
+0x312B = 0x4F99
+0x312C = 0x4F9A
+0x312D = 0x4F9E
+0x312E = 0x4F9F
+0x312F = 0x4FB2
+0x3130 = 0x4FB7
+0x3131 = 0x4FB9
+0x3132 = 0x4FBB
+0x3133 = 0x4FBC
+0x3134 = 0x4FBD
+0x3135 = 0x4FBE
+0x3136 = 0x4FC0
+0x3137 = 0x4FC1
+0x3138 = 0x4FC5
+0x3139 = 0x4FC6
+0x313A = 0x4FC8
+0x313B = 0x4FC9
+0x313C = 0x4FCB
+0x313D = 0x4FCC
+0x313E = 0x4FCD
+0x313F = 0x4FCF
+0x3140 = 0x4FD2
+0x3141 = 0x4FDC
+0x3142 = 0x4FE0
+0x3143 = 0x4FE2
+0x3144 = 0x4FF0
+0x3145 = 0x4FF2
+0x3146 = 0x4FFC
+0x3147 = 0x4FFD
+0x3148 = 0x4FFF
+0x3149 = 0x5000
+0x314A = 0x5001
+0x314B = 0x5004
+0x314C = 0x5007
+0x314D = 0x500A
+0x314E = 0x500C
+0x314F = 0x500E
+0x3150 = 0x5010
+0x3151 = 0x5013
+0x3152 = 0x5017
+0x3153 = 0x5018
+0x3154 = 0x501B
+0x3155 = 0x501C
+0x3156 = 0x501D
+0x3157 = 0x501E
+0x3158 = 0x5022
+0x3159 = 0x5027
+0x315A = 0x502E
+0x315B = 0x5030
+0x315C = 0x5032
+0x315D = 0x5033
+0x315E = 0x5035
+0x315F = 0x5040
+0x3160 = 0x5041
+0x3161 = 0x5042
+0x3162 = 0x5045
+0x3163 = 0x5046
+0x3164 = 0x504A
+0x3165 = 0x504C
+0x3166 = 0x504E
+0x3167 = 0x5051
+0x3168 = 0x5052
+0x3169 = 0x5053
+0x316A = 0x5057
+0x316B = 0x5059
+0x316C = 0x505F
+0x316D = 0x5060
+0x316E = 0x5062
+0x316F = 0x5063
+0x3170 = 0x5066
+0x3171 = 0x5067
+0x3172 = 0x506A
+0x3173 = 0x506D
+0x3174 = 0x5070
+0x3175 = 0x5071
+0x3176 = 0x503B
+0x3177 = 0x5081
+0x3178 = 0x5083
+0x3179 = 0x5084
+0x317A = 0x5086
+0x317B = 0x508A
+0x317C = 0x508E
+0x317D = 0x508F
+0x317E = 0x5090
+0x3221 = 0x5092
+0x3222 = 0x5093
+0x3223 = 0x5094
+0x3224 = 0x5096
+0x3225 = 0x509B
+0x3226 = 0x509C
+0x3227 = 0x509E
+0x3228 = 0x509F
+0x3229 = 0x50A0
+0x322A = 0x50A1
+0x322B = 0x50A2
+0x322C = 0x50AA
+0x322D = 0x50AF
+0x322E = 0x50B0
+0x322F = 0x50B9
+0x3230 = 0x50BA
+0x3231 = 0x50BD
+0x3232 = 0x50C0
+0x3233 = 0x50C3
+0x3234 = 0x50C4
+0x3235 = 0x50C7
+0x3236 = 0x50CC
+0x3237 = 0x50CE
+0x3238 = 0x50D0
+0x3239 = 0x50D3
+0x323A = 0x50D4
+0x323B = 0x50D8
+0x323C = 0x50DC
+0x323D = 0x50DD
+0x323E = 0x50DF
+0x323F = 0x50E2
+0x3240 = 0x50E4
+0x3241 = 0x50E6
+0x3242 = 0x50E8
+0x3243 = 0x50E9
+0x3244 = 0x50EF
+0x3245 = 0x50F1
+0x3246 = 0x50F6
+0x3247 = 0x50FA
+0x3248 = 0x50FE
+0x3249 = 0x5103
+0x324A = 0x5106
+0x324B = 0x5107
+0x324C = 0x5108
+0x324D = 0x510B
+0x324E = 0x510C
+0x324F = 0x510D
+0x3250 = 0x510E
+0x3251 = 0x50F2
+0x3252 = 0x5110
+0x3253 = 0x5117
+0x3254 = 0x5119
+0x3255 = 0x511B
+0x3256 = 0x511C
+0x3257 = 0x511D
+0x3258 = 0x511E
+0x3259 = 0x5123
+0x325A = 0x5127
+0x325B = 0x5128
+0x325C = 0x512C
+0x325D = 0x512D
+0x325E = 0x512F
+0x325F = 0x5131
+0x3260 = 0x5133
+0x3261 = 0x5134
+0x3262 = 0x5135
+0x3263 = 0x5138
+0x3264 = 0x5139
+0x3265 = 0x5142
+0x3266 = 0x514A
+0x3267 = 0x514F
+0x3268 = 0x5153
+0x3269 = 0x5155
+0x326A = 0x5157
+0x326B = 0x5158
+0x326C = 0x515F
+0x326D = 0x5164
+0x326E = 0x5166
+0x326F = 0x517E
+0x3270 = 0x5183
+0x3271 = 0x5184
+0x3272 = 0x518B
+0x3273 = 0x518E
+0x3274 = 0x5198
+0x3275 = 0x519D
+0x3276 = 0x51A1
+0x3277 = 0x51A3
+0x3278 = 0x51AD
+0x3279 = 0x51B8
+0x327A = 0x51BA
+0x327B = 0x51BC
+0x327C = 0x51BE
+0x327D = 0x51BF
+0x327E = 0x51C2
+0x3321 = 0x51C8
+0x3322 = 0x51CF
+0x3323 = 0x51D1
+0x3324 = 0x51D2
+0x3325 = 0x51D3
+0x3326 = 0x51D5
+0x3327 = 0x51D8
+0x3328 = 0x51DE
+0x3329 = 0x51E2
+0x332A = 0x51E5
+0x332B = 0x51EE
+0x332C = 0x51F2
+0x332D = 0x51F3
+0x332E = 0x51F4
+0x332F = 0x51F7
+0x3330 = 0x5201
+0x3331 = 0x5202
+0x3332 = 0x5205
+0x3333 = 0x5212
+0x3334 = 0x5213
+0x3335 = 0x5215
+0x3336 = 0x5216
+0x3337 = 0x5218
+0x3338 = 0x5222
+0x3339 = 0x5228
+0x333A = 0x5231
+0x333B = 0x5232
+0x333C = 0x5235
+0x333D = 0x523C
+0x333E = 0x5245
+0x333F = 0x5249
+0x3340 = 0x5255
+0x3341 = 0x5257
+0x3342 = 0x5258
+0x3343 = 0x525A
+0x3344 = 0x525C
+0x3345 = 0x525F
+0x3346 = 0x5260
+0x3347 = 0x5261
+0x3348 = 0x5266
+0x3349 = 0x526E
+0x334A = 0x5277
+0x334B = 0x5278
+0x334C = 0x5279
+0x334D = 0x5280
+0x334E = 0x5282
+0x334F = 0x5285
+0x3350 = 0x528A
+0x3351 = 0x528C
+0x3352 = 0x5293
+0x3353 = 0x5295
+0x3354 = 0x5296
+0x3355 = 0x5297
+0x3356 = 0x5298
+0x3357 = 0x529A
+0x3358 = 0x529C
+0x3359 = 0x52A4
+0x335A = 0x52A5
+0x335B = 0x52A6
+0x335C = 0x52A7
+0x335D = 0x52AF
+0x335E = 0x52B0
+0x335F = 0x52B6
+0x3360 = 0x52B7
+0x3361 = 0x52B8
+0x3362 = 0x52BA
+0x3363 = 0x52BB
+0x3364 = 0x52BD
+0x3365 = 0x52C0
+0x3366 = 0x52C4
+0x3367 = 0x52C6
+0x3368 = 0x52C8
+0x3369 = 0x52CC
+0x336A = 0x52CF
+0x336B = 0x52D1
+0x336C = 0x52D4
+0x336D = 0x52D6
+0x336E = 0x52DB
+0x336F = 0x52DC
+0x3370 = 0x52E1
+0x3371 = 0x52E5
+0x3372 = 0x52E8
+0x3373 = 0x52E9
+0x3374 = 0x52EA
+0x3375 = 0x52EC
+0x3376 = 0x52F0
+0x3377 = 0x52F1
+0x3378 = 0x52F4
+0x3379 = 0x52F6
+0x337A = 0x52F7
+0x337B = 0x5300
+0x337C = 0x5303
+0x337D = 0x530A
+0x337E = 0x530B
+0x3421 = 0x530C
+0x3422 = 0x5311
+0x3423 = 0x5313
+0x3424 = 0x5318
+0x3425 = 0x531B
+0x3426 = 0x531C
+0x3427 = 0x531E
+0x3428 = 0x531F
+0x3429 = 0x5325
+0x342A = 0x5327
+0x342B = 0x5328
+0x342C = 0x5329
+0x342D = 0x532B
+0x342E = 0x532C
+0x342F = 0x532D
+0x3430 = 0x5330
+0x3431 = 0x5332
+0x3432 = 0x5335
+0x3433 = 0x533C
+0x3434 = 0x533D
+0x3435 = 0x533E
+0x3436 = 0x5342
+0x3437 = 0x534C
+0x3438 = 0x534B
+0x3439 = 0x5359
+0x343A = 0x535B
+0x343B = 0x5361
+0x343C = 0x5363
+0x343D = 0x5365
+0x343E = 0x536C
+0x343F = 0x536D
+0x3440 = 0x5372
+0x3441 = 0x5379
+0x3442 = 0x537E
+0x3443 = 0x5383
+0x3444 = 0x5387
+0x3445 = 0x5388
+0x3446 = 0x538E
+0x3447 = 0x5393
+0x3448 = 0x5394
+0x3449 = 0x5399
+0x344A = 0x539D
+0x344B = 0x53A1
+0x344C = 0x53A4
+0x344D = 0x53AA
+0x344E = 0x53AB
+0x344F = 0x53AF
+0x3450 = 0x53B2
+0x3451 = 0x53B4
+0x3452 = 0x53B5
+0x3453 = 0x53B7
+0x3454 = 0x53B8
+0x3455 = 0x53BA
+0x3456 = 0x53BD
+0x3457 = 0x53C0
+0x3458 = 0x53C5
+0x3459 = 0x53CF
+0x345A = 0x53D2
+0x345B = 0x53D3
+0x345C = 0x53D5
+0x345D = 0x53DA
+0x345E = 0x53DD
+0x345F = 0x53DE
+0x3460 = 0x53E0
+0x3461 = 0x53E6
+0x3462 = 0x53E7
+0x3463 = 0x53F5
+0x3464 = 0x5402
+0x3465 = 0x5413
+0x3466 = 0x541A
+0x3467 = 0x5421
+0x3468 = 0x5427
+0x3469 = 0x5428
+0x346A = 0x542A
+0x346B = 0x542F
+0x346C = 0x5431
+0x346D = 0x5434
+0x346E = 0x5435
+0x346F = 0x5443
+0x3470 = 0x5444
+0x3471 = 0x5447
+0x3472 = 0x544D
+0x3473 = 0x544F
+0x3474 = 0x545E
+0x3475 = 0x5462
+0x3476 = 0x5464
+0x3477 = 0x5466
+0x3478 = 0x5467
+0x3479 = 0x5469
+0x347A = 0x546B
+0x347B = 0x546D
+0x347C = 0x546E
+0x347D = 0x5474
+0x347E = 0x547F
+0x3521 = 0x5481
+0x3522 = 0x5483
+0x3523 = 0x5485
+0x3524 = 0x5488
+0x3525 = 0x5489
+0x3526 = 0x548D
+0x3527 = 0x5491
+0x3528 = 0x5495
+0x3529 = 0x5496
+0x352A = 0x549C
+0x352B = 0x549F
+0x352C = 0x54A1
+0x352D = 0x54A6
+0x352E = 0x54A7
+0x352F = 0x54A9
+0x3530 = 0x54AA
+0x3531 = 0x54AD
+0x3532 = 0x54AE
+0x3533 = 0x54B1
+0x3534 = 0x54B7
+0x3535 = 0x54B9
+0x3536 = 0x54BA
+0x3537 = 0x54BB
+0x3538 = 0x54BF
+0x3539 = 0x54C6
+0x353A = 0x54CA
+0x353B = 0x54CD
+0x353C = 0x54CE
+0x353D = 0x54E0
+0x353E = 0x54EA
+0x353F = 0x54EC
+0x3540 = 0x54EF
+0x3541 = 0x54F6
+0x3542 = 0x54FC
+0x3543 = 0x54FE
+0x3544 = 0x54FF
+0x3545 = 0x5500
+0x3546 = 0x5501
+0x3547 = 0x5505
+0x3548 = 0x5508
+0x3549 = 0x5509
+0x354A = 0x550C
+0x354B = 0x550D
+0x354C = 0x550E
+0x354D = 0x5515
+0x354E = 0x552A
+0x354F = 0x552B
+0x3550 = 0x5532
+0x3551 = 0x5535
+0x3552 = 0x5536
+0x3553 = 0x553B
+0x3554 = 0x553C
+0x3555 = 0x553D
+0x3556 = 0x5541
+0x3557 = 0x5547
+0x3558 = 0x5549
+0x3559 = 0x554A
+0x355A = 0x554D
+0x355B = 0x5550
+0x355C = 0x5551
+0x355D = 0x5558
+0x355E = 0x555A
+0x355F = 0x555B
+0x3560 = 0x555E
+0x3561 = 0x5560
+0x3562 = 0x5561
+0x3563 = 0x5564
+0x3564 = 0x5566
+0x3565 = 0x557F
+0x3566 = 0x5581
+0x3567 = 0x5582
+0x3568 = 0x5586
+0x3569 = 0x5588
+0x356A = 0x558E
+0x356B = 0x558F
+0x356C = 0x5591
+0x356D = 0x5592
+0x356E = 0x5593
+0x356F = 0x5594
+0x3570 = 0x5597
+0x3571 = 0x55A3
+0x3572 = 0x55A4
+0x3573 = 0x55AD
+0x3574 = 0x55B2
+0x3575 = 0x55BF
+0x3576 = 0x55C1
+0x3577 = 0x55C3
+0x3578 = 0x55C6
+0x3579 = 0x55C9
+0x357A = 0x55CB
+0x357B = 0x55CC
+0x357C = 0x55CE
+0x357D = 0x55D1
+0x357E = 0x55D2
+0x3621 = 0x55D3
+0x3622 = 0x55D7
+0x3623 = 0x55D8
+0x3624 = 0x55DB
+0x3625 = 0x55DE
+0x3626 = 0x55E2
+0x3627 = 0x55E9
+0x3628 = 0x55F6
+0x3629 = 0x55FF
+0x362A = 0x5605
+0x362B = 0x5608
+0x362C = 0x560A
+0x362D = 0x560D
+0x362E = 0x560E
+0x362F = 0x560F
+0x3630 = 0x5610
+0x3631 = 0x5611
+0x3632 = 0x5612
+0x3633 = 0x5619
+0x3634 = 0x562C
+0x3635 = 0x5630
+0x3636 = 0x5633
+0x3637 = 0x5635
+0x3638 = 0x5637
+0x3639 = 0x5639
+0x363A = 0x563B
+0x363B = 0x563C
+0x363C = 0x563D
+0x363D = 0x563F
+0x363E = 0x5640
+0x363F = 0x5641
+0x3640 = 0x5643
+0x3641 = 0x5644
+0x3642 = 0x5646
+0x3643 = 0x5649
+0x3644 = 0x564B
+0x3645 = 0x564D
+0x3646 = 0x564F
+0x3647 = 0x5654
+0x3648 = 0x565E
+0x3649 = 0x5660
+0x364A = 0x5661
+0x364B = 0x5662
+0x364C = 0x5663
+0x364D = 0x5666
+0x364E = 0x5669
+0x364F = 0x566D
+0x3650 = 0x566F
+0x3651 = 0x5671
+0x3652 = 0x5672
+0x3653 = 0x5675
+0x3654 = 0x5684
+0x3655 = 0x5685
+0x3656 = 0x5688
+0x3657 = 0x568B
+0x3658 = 0x568C
+0x3659 = 0x5695
+0x365A = 0x5699
+0x365B = 0x569A
+0x365C = 0x569D
+0x365D = 0x569E
+0x365E = 0x569F
+0x365F = 0x56A6
+0x3660 = 0x56A7
+0x3661 = 0x56A8
+0x3662 = 0x56A9
+0x3663 = 0x56AB
+0x3664 = 0x56AC
+0x3665 = 0x56AD
+0x3666 = 0x56B1
+0x3667 = 0x56B3
+0x3668 = 0x56B7
+0x3669 = 0x56BE
+0x366A = 0x56C5
+0x366B = 0x56C9
+0x366C = 0x56CA
+0x366D = 0x56CB
+0x366E = 0x56CF
+0x366F = 0x56D0
+0x3670 = 0x56CC
+0x3671 = 0x56CD
+0x3672 = 0x56D9
+0x3673 = 0x56DC
+0x3674 = 0x56DD
+0x3675 = 0x56DF
+0x3676 = 0x56E1
+0x3677 = 0x56E4
+0x3678 = 0x56E5
+0x3679 = 0x56E6
+0x367A = 0x56E7
+0x367B = 0x56E8
+0x367C = 0x56F1
+0x367D = 0x56EB
+0x367E = 0x56ED
+0x3721 = 0x56F6
+0x3722 = 0x56F7
+0x3723 = 0x5701
+0x3724 = 0x5702
+0x3725 = 0x5707
+0x3726 = 0x570A
+0x3727 = 0x570C
+0x3728 = 0x5711
+0x3729 = 0x5715
+0x372A = 0x571A
+0x372B = 0x571B
+0x372C = 0x571D
+0x372D = 0x5720
+0x372E = 0x5722
+0x372F = 0x5723
+0x3730 = 0x5724
+0x3731 = 0x5725
+0x3732 = 0x5729
+0x3733 = 0x572A
+0x3734 = 0x572C
+0x3735 = 0x572E
+0x3736 = 0x572F
+0x3737 = 0x5733
+0x3738 = 0x5734
+0x3739 = 0x573D
+0x373A = 0x573E
+0x373B = 0x573F
+0x373C = 0x5745
+0x373D = 0x5746
+0x373E = 0x574C
+0x373F = 0x574D
+0x3740 = 0x5752
+0x3741 = 0x5762
+0x3742 = 0x5765
+0x3743 = 0x5767
+0x3744 = 0x5768
+0x3745 = 0x576B
+0x3746 = 0x576D
+0x3747 = 0x576E
+0x3748 = 0x576F
+0x3749 = 0x5770
+0x374A = 0x5771
+0x374B = 0x5773
+0x374C = 0x5774
+0x374D = 0x5775
+0x374E = 0x5777
+0x374F = 0x5779
+0x3750 = 0x577A
+0x3751 = 0x577B
+0x3752 = 0x577C
+0x3753 = 0x577E
+0x3754 = 0x5781
+0x3755 = 0x5783
+0x3756 = 0x578C
+0x3757 = 0x5794
+0x3758 = 0x5797
+0x3759 = 0x5799
+0x375A = 0x579A
+0x375B = 0x579C
+0x375C = 0x579D
+0x375D = 0x579E
+0x375E = 0x579F
+0x375F = 0x57A1
+0x3760 = 0x5795
+0x3761 = 0x57A7
+0x3762 = 0x57A8
+0x3763 = 0x57A9
+0x3764 = 0x57AC
+0x3765 = 0x57B8
+0x3766 = 0x57BD
+0x3767 = 0x57C7
+0x3768 = 0x57C8
+0x3769 = 0x57CC
+0x376A = 0x57CF
+0x376B = 0x57D5
+0x376C = 0x57DD
+0x376D = 0x57DE
+0x376E = 0x57E4
+0x376F = 0x57E6
+0x3770 = 0x57E7
+0x3771 = 0x57E9
+0x3772 = 0x57ED
+0x3773 = 0x57F0
+0x3774 = 0x57F5
+0x3775 = 0x57F6
+0x3776 = 0x57F8
+0x3777 = 0x57FD
+0x3778 = 0x57FE
+0x3779 = 0x57FF
+0x377A = 0x5803
+0x377B = 0x5804
+0x377C = 0x5808
+0x377D = 0x5809
+0x377E = 0x57E1
+0x3821 = 0x580C
+0x3822 = 0x580D
+0x3823 = 0x581B
+0x3824 = 0x581E
+0x3825 = 0x581F
+0x3826 = 0x5820
+0x3827 = 0x5826
+0x3828 = 0x5827
+0x3829 = 0x582D
+0x382A = 0x5832
+0x382B = 0x5839
+0x382C = 0x583F
+0x382D = 0x5849
+0x382E = 0x584C
+0x382F = 0x584D
+0x3830 = 0x584F
+0x3831 = 0x5850
+0x3832 = 0x5855
+0x3833 = 0x585F
+0x3834 = 0x5861
+0x3835 = 0x5864
+0x3836 = 0x5867
+0x3837 = 0x5868
+0x3838 = 0x5878
+0x3839 = 0x587C
+0x383A = 0x587F
+0x383B = 0x5880
+0x383C = 0x5881
+0x383D = 0x5887
+0x383E = 0x5888
+0x383F = 0x5889
+0x3840 = 0x588A
+0x3841 = 0x588C
+0x3842 = 0x588D
+0x3843 = 0x588F
+0x3844 = 0x5890
+0x3845 = 0x5894
+0x3846 = 0x5896
+0x3847 = 0x589D
+0x3848 = 0x58A0
+0x3849 = 0x58A1
+0x384A = 0x58A2
+0x384B = 0x58A6
+0x384C = 0x58A9
+0x384D = 0x58B1
+0x384E = 0x58B2
+0x384F = 0x58C4
+0x3850 = 0x58BC
+0x3851 = 0x58C2
+0x3852 = 0x58C8
+0x3853 = 0x58CD
+0x3854 = 0x58CE
+0x3855 = 0x58D0
+0x3856 = 0x58D2
+0x3857 = 0x58D4
+0x3858 = 0x58D6
+0x3859 = 0x58DA
+0x385A = 0x58DD
+0x385B = 0x58E1
+0x385C = 0x58E2
+0x385D = 0x58E9
+0x385E = 0x58F3
+0x385F = 0x5905
+0x3860 = 0x5906
+0x3861 = 0x590B
+0x3862 = 0x590C
+0x3863 = 0x5912
+0x3864 = 0x5913
+0x3865 = 0x5914
+0x3866 = 0x8641
+0x3867 = 0x591D
+0x3868 = 0x5921
+0x3869 = 0x5923
+0x386A = 0x5924
+0x386B = 0x5928
+0x386C = 0x592F
+0x386D = 0x5930
+0x386E = 0x5933
+0x386F = 0x5935
+0x3870 = 0x5936
+0x3871 = 0x593F
+0x3872 = 0x5943
+0x3873 = 0x5946
+0x3874 = 0x5952
+0x3875 = 0x5953
+0x3876 = 0x5959
+0x3877 = 0x595B
+0x3878 = 0x595D
+0x3879 = 0x595E
+0x387A = 0x595F
+0x387B = 0x5961
+0x387C = 0x5963
+0x387D = 0x596B
+0x387E = 0x596D
+0x3921 = 0x596F
+0x3922 = 0x5972
+0x3923 = 0x5975
+0x3924 = 0x5976
+0x3925 = 0x5979
+0x3926 = 0x597B
+0x3927 = 0x597C
+0x3928 = 0x598B
+0x3929 = 0x598C
+0x392A = 0x598E
+0x392B = 0x5992
+0x392C = 0x5995
+0x392D = 0x5997
+0x392E = 0x599F
+0x392F = 0x59A4
+0x3930 = 0x59A7
+0x3931 = 0x59AD
+0x3932 = 0x59AE
+0x3933 = 0x59AF
+0x3934 = 0x59B0
+0x3935 = 0x59B3
+0x3936 = 0x59B7
+0x3937 = 0x59BA
+0x3938 = 0x59BC
+0x3939 = 0x59C1
+0x393A = 0x59C3
+0x393B = 0x59C4
+0x393C = 0x59C8
+0x393D = 0x59CA
+0x393E = 0x59CD
+0x393F = 0x59D2
+0x3940 = 0x59DD
+0x3941 = 0x59DE
+0x3942 = 0x59DF
+0x3943 = 0x59E3
+0x3944 = 0x59E4
+0x3945 = 0x59E7
+0x3946 = 0x59EE
+0x3947 = 0x59EF
+0x3948 = 0x59F1
+0x3949 = 0x59F2
+0x394A = 0x59F4
+0x394B = 0x59F7
+0x394C = 0x5A00
+0x394D = 0x5A04
+0x394E = 0x5A0C
+0x394F = 0x5A0D
+0x3950 = 0x5A0E
+0x3951 = 0x5A12
+0x3952 = 0x5A13
+0x3953 = 0x5A1E
+0x3954 = 0x5A23
+0x3955 = 0x5A24
+0x3956 = 0x5A27
+0x3957 = 0x5A28
+0x3958 = 0x5A2A
+0x3959 = 0x5A2D
+0x395A = 0x5A30
+0x395B = 0x5A44
+0x395C = 0x5A45
+0x395D = 0x5A47
+0x395E = 0x5A48
+0x395F = 0x5A4C
+0x3960 = 0x5A50
+0x3961 = 0x5A55
+0x3962 = 0x5A5E
+0x3963 = 0x5A63
+0x3964 = 0x5A65
+0x3965 = 0x5A67
+0x3966 = 0x5A6D
+0x3967 = 0x5A77
+0x3968 = 0x5A7A
+0x3969 = 0x5A7B
+0x396A = 0x5A7E
+0x396B = 0x5A8B
+0x396C = 0x5A90
+0x396D = 0x5A93
+0x396E = 0x5A96
+0x396F = 0x5A99
+0x3970 = 0x5A9C
+0x3971 = 0x5A9E
+0x3972 = 0x5A9F
+0x3973 = 0x5AA0
+0x3974 = 0x5AA2
+0x3975 = 0x5AA7
+0x3976 = 0x5AAC
+0x3977 = 0x5AB1
+0x3978 = 0x5AB2
+0x3979 = 0x5AB3
+0x397A = 0x5AB5
+0x397B = 0x5AB8
+0x397C = 0x5ABA
+0x397D = 0x5ABB
+0x397E = 0x5ABF
+0x3A21 = 0x5AC4
+0x3A22 = 0x5AC6
+0x3A23 = 0x5AC8
+0x3A24 = 0x5ACF
+0x3A25 = 0x5ADA
+0x3A26 = 0x5ADC
+0x3A27 = 0x5AE0
+0x3A28 = 0x5AE5
+0x3A29 = 0x5AEA
+0x3A2A = 0x5AEE
+0x3A2B = 0x5AF5
+0x3A2C = 0x5AF6
+0x3A2D = 0x5AFD
+0x3A2E = 0x5B00
+0x3A2F = 0x5B01
+0x3A30 = 0x5B08
+0x3A31 = 0x5B17
+0x3A32 = 0x5B34
+0x3A33 = 0x5B19
+0x3A34 = 0x5B1B
+0x3A35 = 0x5B1D
+0x3A36 = 0x5B21
+0x3A37 = 0x5B25
+0x3A38 = 0x5B2D
+0x3A39 = 0x5B38
+0x3A3A = 0x5B41
+0x3A3B = 0x5B4B
+0x3A3C = 0x5B4C
+0x3A3D = 0x5B52
+0x3A3E = 0x5B56
+0x3A3F = 0x5B5E
+0x3A40 = 0x5B68
+0x3A41 = 0x5B6E
+0x3A42 = 0x5B6F
+0x3A43 = 0x5B7C
+0x3A44 = 0x5B7D
+0x3A45 = 0x5B7E
+0x3A46 = 0x5B7F
+0x3A47 = 0x5B81
+0x3A48 = 0x5B84
+0x3A49 = 0x5B86
+0x3A4A = 0x5B8A
+0x3A4B = 0x5B8E
+0x3A4C = 0x5B90
+0x3A4D = 0x5B91
+0x3A4E = 0x5B93
+0x3A4F = 0x5B94
+0x3A50 = 0x5B96
+0x3A51 = 0x5BA8
+0x3A52 = 0x5BA9
+0x3A53 = 0x5BAC
+0x3A54 = 0x5BAD
+0x3A55 = 0x5BAF
+0x3A56 = 0x5BB1
+0x3A57 = 0x5BB2
+0x3A58 = 0x5BB7
+0x3A59 = 0x5BBA
+0x3A5A = 0x5BBC
+0x3A5B = 0x5BC0
+0x3A5C = 0x5BC1
+0x3A5D = 0x5BCD
+0x3A5E = 0x5BCF
+0x3A5F = 0x5BD6
+0x3A60 = 0x5BD7
+0x3A61 = 0x5BD8
+0x3A62 = 0x5BD9
+0x3A63 = 0x5BDA
+0x3A64 = 0x5BE0
+0x3A65 = 0x5BEF
+0x3A66 = 0x5BF1
+0x3A67 = 0x5BF4
+0x3A68 = 0x5BFD
+0x3A69 = 0x5C0C
+0x3A6A = 0x5C17
+0x3A6B = 0x5C1E
+0x3A6C = 0x5C1F
+0x3A6D = 0x5C23
+0x3A6E = 0x5C26
+0x3A6F = 0x5C29
+0x3A70 = 0x5C2B
+0x3A71 = 0x5C2C
+0x3A72 = 0x5C2E
+0x3A73 = 0x5C30
+0x3A74 = 0x5C32
+0x3A75 = 0x5C35
+0x3A76 = 0x5C36
+0x3A77 = 0x5C59
+0x3A78 = 0x5C5A
+0x3A79 = 0x5C5C
+0x3A7A = 0x5C62
+0x3A7B = 0x5C63
+0x3A7C = 0x5C67
+0x3A7D = 0x5C68
+0x3A7E = 0x5C69
+0x3B21 = 0x5C6D
+0x3B22 = 0x5C70
+0x3B23 = 0x5C74
+0x3B24 = 0x5C75
+0x3B25 = 0x5C7A
+0x3B26 = 0x5C7B
+0x3B27 = 0x5C7C
+0x3B28 = 0x5C7D
+0x3B29 = 0x5C87
+0x3B2A = 0x5C88
+0x3B2B = 0x5C8A
+0x3B2C = 0x5C8F
+0x3B2D = 0x5C92
+0x3B2E = 0x5C9D
+0x3B2F = 0x5C9F
+0x3B30 = 0x5CA0
+0x3B31 = 0x5CA2
+0x3B32 = 0x5CA3
+0x3B33 = 0x5CA6
+0x3B34 = 0x5CAA
+0x3B35 = 0x5CB2
+0x3B36 = 0x5CB4
+0x3B37 = 0x5CB5
+0x3B38 = 0x5CBA
+0x3B39 = 0x5CC9
+0x3B3A = 0x5CCB
+0x3B3B = 0x5CD2
+0x3B3C = 0x5CDD
+0x3B3D = 0x5CD7
+0x3B3E = 0x5CEE
+0x3B3F = 0x5CF1
+0x3B40 = 0x5CF2
+0x3B41 = 0x5CF4
+0x3B42 = 0x5D01
+0x3B43 = 0x5D06
+0x3B44 = 0x5D0D
+0x3B45 = 0x5D12
+0x3B46 = 0x5D2B
+0x3B47 = 0x5D23
+0x3B48 = 0x5D24
+0x3B49 = 0x5D26
+0x3B4A = 0x5D27
+0x3B4B = 0x5D31
+0x3B4C = 0x5D34
+0x3B4D = 0x5D39
+0x3B4E = 0x5D3D
+0x3B4F = 0x5D3F
+0x3B50 = 0x5D42
+0x3B51 = 0x5D43
+0x3B52 = 0x5D46
+0x3B53 = 0x5D48
+0x3B54 = 0x5D55
+0x3B55 = 0x5D51
+0x3B56 = 0x5D59
+0x3B57 = 0x5D4A
+0x3B58 = 0x5D5F
+0x3B59 = 0x5D60
+0x3B5A = 0x5D61
+0x3B5B = 0x5D62
+0x3B5C = 0x5D64
+0x3B5D = 0x5D6A
+0x3B5E = 0x5D6D
+0x3B5F = 0x5D70
+0x3B60 = 0x5D79
+0x3B61 = 0x5D7A
+0x3B62 = 0x5D7E
+0x3B63 = 0x5D7F
+0x3B64 = 0x5D81
+0x3B65 = 0x5D83
+0x3B66 = 0x5D88
+0x3B67 = 0x5D8A
+0x3B68 = 0x5D92
+0x3B69 = 0x5D93
+0x3B6A = 0x5D94
+0x3B6B = 0x5D95
+0x3B6C = 0x5D99
+0x3B6D = 0x5D9B
+0x3B6E = 0x5D9F
+0x3B6F = 0x5DA0
+0x3B70 = 0x5DA7
+0x3B71 = 0x5DAB
+0x3B72 = 0x5DB0
+0x3B73 = 0x5DB4
+0x3B74 = 0x5DB8
+0x3B75 = 0x5DB9
+0x3B76 = 0x5DC3
+0x3B77 = 0x5DC7
+0x3B78 = 0x5DCB
+0x3B79 = 0x5DD0
+0x3B7A = 0x5DCE
+0x3B7B = 0x5DD8
+0x3B7C = 0x5DD9
+0x3B7D = 0x5DE0
+0x3B7E = 0x5DE4
+0x3C21 = 0x5DE9
+0x3C22 = 0x5DF8
+0x3C23 = 0x5DF9
+0x3C24 = 0x5E00
+0x3C25 = 0x5E07
+0x3C26 = 0x5E0D
+0x3C27 = 0x5E12
+0x3C28 = 0x5E14
+0x3C29 = 0x5E15
+0x3C2A = 0x5E18
+0x3C2B = 0x5E1F
+0x3C2C = 0x5E20
+0x3C2D = 0x5E2E
+0x3C2E = 0x5E28
+0x3C2F = 0x5E32
+0x3C30 = 0x5E35
+0x3C31 = 0x5E3E
+0x3C32 = 0x5E4B
+0x3C33 = 0x5E50
+0x3C34 = 0x5E49
+0x3C35 = 0x5E51
+0x3C36 = 0x5E56
+0x3C37 = 0x5E58
+0x3C38 = 0x5E5B
+0x3C39 = 0x5E5C
+0x3C3A = 0x5E5E
+0x3C3B = 0x5E68
+0x3C3C = 0x5E6A
+0x3C3D = 0x5E6B
+0x3C3E = 0x5E6C
+0x3C3F = 0x5E6D
+0x3C40 = 0x5E6E
+0x3C41 = 0x5E70
+0x3C42 = 0x5E80
+0x3C43 = 0x5E8B
+0x3C44 = 0x5E8E
+0x3C45 = 0x5EA2
+0x3C46 = 0x5EA4
+0x3C47 = 0x5EA5
+0x3C48 = 0x5EA8
+0x3C49 = 0x5EAA
+0x3C4A = 0x5EAC
+0x3C4B = 0x5EB1
+0x3C4C = 0x5EB3
+0x3C4D = 0x5EBD
+0x3C4E = 0x5EBE
+0x3C4F = 0x5EBF
+0x3C50 = 0x5EC6
+0x3C51 = 0x5ECC
+0x3C52 = 0x5ECB
+0x3C53 = 0x5ECE
+0x3C54 = 0x5ED1
+0x3C55 = 0x5ED2
+0x3C56 = 0x5ED4
+0x3C57 = 0x5ED5
+0x3C58 = 0x5EDC
+0x3C59 = 0x5EDE
+0x3C5A = 0x5EE5
+0x3C5B = 0x5EEB
+0x3C5C = 0x5F02
+0x3C5D = 0x5F06
+0x3C5E = 0x5F07
+0x3C5F = 0x5F08
+0x3C60 = 0x5F0E
+0x3C61 = 0x5F19
+0x3C62 = 0x5F1C
+0x3C63 = 0x5F1D
+0x3C64 = 0x5F21
+0x3C65 = 0x5F22
+0x3C66 = 0x5F23
+0x3C67 = 0x5F24
+0x3C68 = 0x5F28
+0x3C69 = 0x5F2B
+0x3C6A = 0x5F2C
+0x3C6B = 0x5F2E
+0x3C6C = 0x5F30
+0x3C6D = 0x5F34
+0x3C6E = 0x5F36
+0x3C6F = 0x5F3B
+0x3C70 = 0x5F3D
+0x3C71 = 0x5F3F
+0x3C72 = 0x5F40
+0x3C73 = 0x5F44
+0x3C74 = 0x5F45
+0x3C75 = 0x5F47
+0x3C76 = 0x5F4D
+0x3C77 = 0x5F50
+0x3C78 = 0x5F54
+0x3C79 = 0x5F58
+0x3C7A = 0x5F5B
+0x3C7B = 0x5F60
+0x3C7C = 0x5F63
+0x3C7D = 0x5F64
+0x3C7E = 0x5F67
+0x3D21 = 0x5F6F
+0x3D22 = 0x5F72
+0x3D23 = 0x5F74
+0x3D24 = 0x5F75
+0x3D25 = 0x5F78
+0x3D26 = 0x5F7A
+0x3D27 = 0x5F7D
+0x3D28 = 0x5F7E
+0x3D29 = 0x5F89
+0x3D2A = 0x5F8D
+0x3D2B = 0x5F8F
+0x3D2C = 0x5F96
+0x3D2D = 0x5F9C
+0x3D2E = 0x5F9D
+0x3D2F = 0x5FA2
+0x3D30 = 0x5FA7
+0x3D31 = 0x5FAB
+0x3D32 = 0x5FA4
+0x3D33 = 0x5FAC
+0x3D34 = 0x5FAF
+0x3D35 = 0x5FB0
+0x3D36 = 0x5FB1
+0x3D37 = 0x5FB8
+0x3D38 = 0x5FC4
+0x3D39 = 0x5FC7
+0x3D3A = 0x5FC8
+0x3D3B = 0x5FC9
+0x3D3C = 0x5FCB
+0x3D3D = 0x5FD0
+0x3D3E = 0x5FD1
+0x3D3F = 0x5FD2
+0x3D40 = 0x5FD3
+0x3D41 = 0x5FD4
+0x3D42 = 0x5FDE
+0x3D43 = 0x5FE1
+0x3D44 = 0x5FE2
+0x3D45 = 0x5FE8
+0x3D46 = 0x5FE9
+0x3D47 = 0x5FEA
+0x3D48 = 0x5FEC
+0x3D49 = 0x5FED
+0x3D4A = 0x5FEE
+0x3D4B = 0x5FEF
+0x3D4C = 0x5FF2
+0x3D4D = 0x5FF3
+0x3D4E = 0x5FF6
+0x3D4F = 0x5FFA
+0x3D50 = 0x5FFC
+0x3D51 = 0x6007
+0x3D52 = 0x600A
+0x3D53 = 0x600D
+0x3D54 = 0x6013
+0x3D55 = 0x6014
+0x3D56 = 0x6017
+0x3D57 = 0x6018
+0x3D58 = 0x601A
+0x3D59 = 0x601F
+0x3D5A = 0x6024
+0x3D5B = 0x602D
+0x3D5C = 0x6033
+0x3D5D = 0x6035
+0x3D5E = 0x6040
+0x3D5F = 0x6047
+0x3D60 = 0x6048
+0x3D61 = 0x6049
+0x3D62 = 0x604C
+0x3D63 = 0x6051
+0x3D64 = 0x6054
+0x3D65 = 0x6056
+0x3D66 = 0x6057
+0x3D67 = 0x605D
+0x3D68 = 0x6061
+0x3D69 = 0x6067
+0x3D6A = 0x6071
+0x3D6B = 0x607E
+0x3D6C = 0x607F
+0x3D6D = 0x6082
+0x3D6E = 0x6086
+0x3D6F = 0x6088
+0x3D70 = 0x608A
+0x3D71 = 0x608E
+0x3D72 = 0x6091
+0x3D73 = 0x6093
+0x3D74 = 0x6095
+0x3D75 = 0x6098
+0x3D76 = 0x609D
+0x3D77 = 0x609E
+0x3D78 = 0x60A2
+0x3D79 = 0x60A4
+0x3D7A = 0x60A5
+0x3D7B = 0x60A8
+0x3D7C = 0x60B0
+0x3D7D = 0x60B1
+0x3D7E = 0x60B7
+0x3E21 = 0x60BB
+0x3E22 = 0x60BE
+0x3E23 = 0x60C2
+0x3E24 = 0x60C4
+0x3E25 = 0x60C8
+0x3E26 = 0x60C9
+0x3E27 = 0x60CA
+0x3E28 = 0x60CB
+0x3E29 = 0x60CE
+0x3E2A = 0x60CF
+0x3E2B = 0x60D4
+0x3E2C = 0x60D5
+0x3E2D = 0x60D9
+0x3E2E = 0x60DB
+0x3E2F = 0x60DD
+0x3E30 = 0x60DE
+0x3E31 = 0x60E2
+0x3E32 = 0x60E5
+0x3E33 = 0x60F2
+0x3E34 = 0x60F5
+0x3E35 = 0x60F8
+0x3E36 = 0x60FC
+0x3E37 = 0x60FD
+0x3E38 = 0x6102
+0x3E39 = 0x6107
+0x3E3A = 0x610A
+0x3E3B = 0x610C
+0x3E3C = 0x6110
+0x3E3D = 0x6111
+0x3E3E = 0x6112
+0x3E3F = 0x6113
+0x3E40 = 0x6114
+0x3E41 = 0x6116
+0x3E42 = 0x6117
+0x3E43 = 0x6119
+0x3E44 = 0x611C
+0x3E45 = 0x611E
+0x3E46 = 0x6122
+0x3E47 = 0x612A
+0x3E48 = 0x612B
+0x3E49 = 0x6130
+0x3E4A = 0x6131
+0x3E4B = 0x6135
+0x3E4C = 0x6136
+0x3E4D = 0x6137
+0x3E4E = 0x6139
+0x3E4F = 0x6141
+0x3E50 = 0x6145
+0x3E51 = 0x6146
+0x3E52 = 0x6149
+0x3E53 = 0x615E
+0x3E54 = 0x6160
+0x3E55 = 0x616C
+0x3E56 = 0x6172
+0x3E57 = 0x6178
+0x3E58 = 0x617B
+0x3E59 = 0x617C
+0x3E5A = 0x617F
+0x3E5B = 0x6180
+0x3E5C = 0x6181
+0x3E5D = 0x6183
+0x3E5E = 0x6184
+0x3E5F = 0x618B
+0x3E60 = 0x618D
+0x3E61 = 0x6192
+0x3E62 = 0x6193
+0x3E63 = 0x6197
+0x3E64 = 0x6198
+0x3E65 = 0x619C
+0x3E66 = 0x619D
+0x3E67 = 0x619F
+0x3E68 = 0x61A0
+0x3E69 = 0x61A5
+0x3E6A = 0x61A8
+0x3E6B = 0x61AA
+0x3E6C = 0x61AD
+0x3E6D = 0x61B8
+0x3E6E = 0x61B9
+0x3E6F = 0x61BC
+0x3E70 = 0x61C0
+0x3E71 = 0x61C1
+0x3E72 = 0x61C2
+0x3E73 = 0x61CE
+0x3E74 = 0x61CF
+0x3E75 = 0x61D5
+0x3E76 = 0x61DC
+0x3E77 = 0x61DD
+0x3E78 = 0x61DE
+0x3E79 = 0x61DF
+0x3E7A = 0x61E1
+0x3E7B = 0x61E2
+0x3E7C = 0x61E7
+0x3E7D = 0x61E9
+0x3E7E = 0x61E5
+0x3F21 = 0x61EC
+0x3F22 = 0x61ED
+0x3F23 = 0x61EF
+0x3F24 = 0x6201
+0x3F25 = 0x6203
+0x3F26 = 0x6204
+0x3F27 = 0x6207
+0x3F28 = 0x6213
+0x3F29 = 0x6215
+0x3F2A = 0x621C
+0x3F2B = 0x6220
+0x3F2C = 0x6222
+0x3F2D = 0x6223
+0x3F2E = 0x6227
+0x3F2F = 0x6229
+0x3F30 = 0x622B
+0x3F31 = 0x6239
+0x3F32 = 0x623D
+0x3F33 = 0x6242
+0x3F34 = 0x6243
+0x3F35 = 0x6244
+0x3F36 = 0x6246
+0x3F37 = 0x624C
+0x3F38 = 0x6250
+0x3F39 = 0x6251
+0x3F3A = 0x6252
+0x3F3B = 0x6254
+0x3F3C = 0x6256
+0x3F3D = 0x625A
+0x3F3E = 0x625C
+0x3F3F = 0x6264
+0x3F40 = 0x626D
+0x3F41 = 0x626F
+0x3F42 = 0x6273
+0x3F43 = 0x627A
+0x3F44 = 0x627D
+0x3F45 = 0x628D
+0x3F46 = 0x628E
+0x3F47 = 0x628F
+0x3F48 = 0x6290
+0x3F49 = 0x62A6
+0x3F4A = 0x62A8
+0x3F4B = 0x62B3
+0x3F4C = 0x62B6
+0x3F4D = 0x62B7
+0x3F4E = 0x62BA
+0x3F4F = 0x62BE
+0x3F50 = 0x62BF
+0x3F51 = 0x62C4
+0x3F52 = 0x62CE
+0x3F53 = 0x62D5
+0x3F54 = 0x62D6
+0x3F55 = 0x62DA
+0x3F56 = 0x62EA
+0x3F57 = 0x62F2
+0x3F58 = 0x62F4
+0x3F59 = 0x62FC
+0x3F5A = 0x62FD
+0x3F5B = 0x6303
+0x3F5C = 0x6304
+0x3F5D = 0x630A
+0x3F5E = 0x630B
+0x3F5F = 0x630D
+0x3F60 = 0x6310
+0x3F61 = 0x6313
+0x3F62 = 0x6316
+0x3F63 = 0x6318
+0x3F64 = 0x6329
+0x3F65 = 0x632A
+0x3F66 = 0x632D
+0x3F67 = 0x6335
+0x3F68 = 0x6336
+0x3F69 = 0x6339
+0x3F6A = 0x633C
+0x3F6B = 0x6341
+0x3F6C = 0x6342
+0x3F6D = 0x6343
+0x3F6E = 0x6344
+0x3F6F = 0x6346
+0x3F70 = 0x634A
+0x3F71 = 0x634B
+0x3F72 = 0x634E
+0x3F73 = 0x6352
+0x3F74 = 0x6353
+0x3F75 = 0x6354
+0x3F76 = 0x6358
+0x3F77 = 0x635B
+0x3F78 = 0x6365
+0x3F79 = 0x6366
+0x3F7A = 0x636C
+0x3F7B = 0x636D
+0x3F7C = 0x6371
+0x3F7D = 0x6374
+0x3F7E = 0x6375
+0x4021 = 0x6378
+0x4022 = 0x637C
+0x4023 = 0x637D
+0x4024 = 0x637F
+0x4025 = 0x6382
+0x4026 = 0x6384
+0x4027 = 0x6387
+0x4028 = 0x638A
+0x4029 = 0x6390
+0x402A = 0x6394
+0x402B = 0x6395
+0x402C = 0x6399
+0x402D = 0x639A
+0x402E = 0x639E
+0x402F = 0x63A4
+0x4030 = 0x63A6
+0x4031 = 0x63AD
+0x4032 = 0x63AE
+0x4033 = 0x63AF
+0x4034 = 0x63BD
+0x4035 = 0x63C1
+0x4036 = 0x63C5
+0x4037 = 0x63C8
+0x4038 = 0x63CE
+0x4039 = 0x63D1
+0x403A = 0x63D3
+0x403B = 0x63D4
+0x403C = 0x63D5
+0x403D = 0x63DC
+0x403E = 0x63E0
+0x403F = 0x63E5
+0x4040 = 0x63EA
+0x4041 = 0x63EC
+0x4042 = 0x63F2
+0x4043 = 0x63F3
+0x4044 = 0x63F5
+0x4045 = 0x63F8
+0x4046 = 0x63F9
+0x4047 = 0x6409
+0x4048 = 0x640A
+0x4049 = 0x6410
+0x404A = 0x6412
+0x404B = 0x6414
+0x404C = 0x6418
+0x404D = 0x641E
+0x404E = 0x6420
+0x404F = 0x6422
+0x4050 = 0x6424
+0x4051 = 0x6425
+0x4052 = 0x6429
+0x4053 = 0x642A
+0x4054 = 0x642F
+0x4055 = 0x6430
+0x4056 = 0x6435
+0x4057 = 0x643D
+0x4058 = 0x643F
+0x4059 = 0x644B
+0x405A = 0x644F
+0x405B = 0x6451
+0x405C = 0x6452
+0x405D = 0x6453
+0x405E = 0x6454
+0x405F = 0x645A
+0x4060 = 0x645B
+0x4061 = 0x645C
+0x4062 = 0x645D
+0x4063 = 0x645F
+0x4064 = 0x6460
+0x4065 = 0x6461
+0x4066 = 0x6463
+0x4067 = 0x646D
+0x4068 = 0x6473
+0x4069 = 0x6474
+0x406A = 0x647B
+0x406B = 0x647D
+0x406C = 0x6485
+0x406D = 0x6487
+0x406E = 0x648F
+0x406F = 0x6490
+0x4070 = 0x6491
+0x4071 = 0x6498
+0x4072 = 0x6499
+0x4073 = 0x649B
+0x4074 = 0x649D
+0x4075 = 0x649F
+0x4076 = 0x64A1
+0x4077 = 0x64A3
+0x4078 = 0x64A6
+0x4079 = 0x64A8
+0x407A = 0x64AC
+0x407B = 0x64B3
+0x407C = 0x64BD
+0x407D = 0x64BE
+0x407E = 0x64BF
+0x4121 = 0x64C4
+0x4122 = 0x64C9
+0x4123 = 0x64CA
+0x4124 = 0x64CB
+0x4125 = 0x64CC
+0x4126 = 0x64CE
+0x4127 = 0x64D0
+0x4128 = 0x64D1
+0x4129 = 0x64D5
+0x412A = 0x64D7
+0x412B = 0x64E4
+0x412C = 0x64E5
+0x412D = 0x64E9
+0x412E = 0x64EA
+0x412F = 0x64ED
+0x4130 = 0x64F0
+0x4131 = 0x64F5
+0x4132 = 0x64F7
+0x4133 = 0x64FB
+0x4134 = 0x64FF
+0x4135 = 0x6501
+0x4136 = 0x6504
+0x4137 = 0x6508
+0x4138 = 0x6509
+0x4139 = 0x650A
+0x413A = 0x650F
+0x413B = 0x6513
+0x413C = 0x6514
+0x413D = 0x6516
+0x413E = 0x6519
+0x413F = 0x651B
+0x4140 = 0x651E
+0x4141 = 0x651F
+0x4142 = 0x6522
+0x4143 = 0x6526
+0x4144 = 0x6529
+0x4145 = 0x652E
+0x4146 = 0x6531
+0x4147 = 0x653A
+0x4148 = 0x653C
+0x4149 = 0x653D
+0x414A = 0x6543
+0x414B = 0x6547
+0x414C = 0x6549
+0x414D = 0x6550
+0x414E = 0x6552
+0x414F = 0x6554
+0x4150 = 0x655F
+0x4151 = 0x6560
+0x4152 = 0x6567
+0x4153 = 0x656B
+0x4154 = 0x657A
+0x4155 = 0x657D
+0x4156 = 0x6581
+0x4157 = 0x6585
+0x4158 = 0x658A
+0x4159 = 0x6592
+0x415A = 0x6595
+0x415B = 0x6598
+0x415C = 0x659D
+0x415D = 0x65A0
+0x415E = 0x65A3
+0x415F = 0x65A6
+0x4160 = 0x65AE
+0x4161 = 0x65B2
+0x4162 = 0x65B3
+0x4163 = 0x65B4
+0x4164 = 0x65BF
+0x4165 = 0x65C2
+0x4166 = 0x65C8
+0x4167 = 0x65C9
+0x4168 = 0x65CE
+0x4169 = 0x65D0
+0x416A = 0x65D4
+0x416B = 0x65D6
+0x416C = 0x65D8
+0x416D = 0x65DF
+0x416E = 0x65F0
+0x416F = 0x65F2
+0x4170 = 0x65F4
+0x4171 = 0x65F5
+0x4172 = 0x65F9
+0x4173 = 0x65FE
+0x4174 = 0x65FF
+0x4175 = 0x6600
+0x4176 = 0x6604
+0x4177 = 0x6608
+0x4178 = 0x6609
+0x4179 = 0x660D
+0x417A = 0x6611
+0x417B = 0x6612
+0x417C = 0x6615
+0x417D = 0x6616
+0x417E = 0x661D
+0x4221 = 0x661E
+0x4222 = 0x6621
+0x4223 = 0x6622
+0x4224 = 0x6623
+0x4225 = 0x6624
+0x4226 = 0x6626
+0x4227 = 0x6629
+0x4228 = 0x662A
+0x4229 = 0x662B
+0x422A = 0x662C
+0x422B = 0x662E
+0x422C = 0x6630
+0x422D = 0x6631
+0x422E = 0x6633
+0x422F = 0x6639
+0x4230 = 0x6637
+0x4231 = 0x6640
+0x4232 = 0x6645
+0x4233 = 0x6646
+0x4234 = 0x664A
+0x4235 = 0x664C
+0x4236 = 0x6651
+0x4237 = 0x664E
+0x4238 = 0x6657
+0x4239 = 0x6658
+0x423A = 0x6659
+0x423B = 0x665B
+0x423C = 0x665C
+0x423D = 0x6660
+0x423E = 0x6661
+0x423F = 0x66FB
+0x4240 = 0x666A
+0x4241 = 0x666B
+0x4242 = 0x666C
+0x4243 = 0x667E
+0x4244 = 0x6673
+0x4245 = 0x6675
+0x4246 = 0x667F
+0x4247 = 0x6677
+0x4248 = 0x6678
+0x4249 = 0x6679
+0x424A = 0x667B
+0x424B = 0x6680
+0x424C = 0x667C
+0x424D = 0x668B
+0x424E = 0x668C
+0x424F = 0x668D
+0x4250 = 0x6690
+0x4251 = 0x6692
+0x4252 = 0x6699
+0x4253 = 0x669A
+0x4254 = 0x669B
+0x4255 = 0x669C
+0x4256 = 0x669F
+0x4257 = 0x66A0
+0x4258 = 0x66A4
+0x4259 = 0x66AD
+0x425A = 0x66B1
+0x425B = 0x66B2
+0x425C = 0x66B5
+0x425D = 0x66BB
+0x425E = 0x66BF
+0x425F = 0x66C0
+0x4260 = 0x66C2
+0x4261 = 0x66C3
+0x4262 = 0x66C8
+0x4263 = 0x66CC
+0x4264 = 0x66CE
+0x4265 = 0x66CF
+0x4266 = 0x66D4
+0x4267 = 0x66DB
+0x4268 = 0x66DF
+0x4269 = 0x66E8
+0x426A = 0x66EB
+0x426B = 0x66EC
+0x426C = 0x66EE
+0x426D = 0x66FA
+0x426E = 0x6705
+0x426F = 0x6707
+0x4270 = 0x670E
+0x4271 = 0x6713
+0x4272 = 0x6719
+0x4273 = 0x671C
+0x4274 = 0x6720
+0x4275 = 0x6722
+0x4276 = 0x6733
+0x4277 = 0x673E
+0x4278 = 0x6745
+0x4279 = 0x6747
+0x427A = 0x6748
+0x427B = 0x674C
+0x427C = 0x6754
+0x427D = 0x6755
+0x427E = 0x675D
+0x4321 = 0x6766
+0x4322 = 0x676C
+0x4323 = 0x676E
+0x4324 = 0x6774
+0x4325 = 0x6776
+0x4326 = 0x677B
+0x4327 = 0x6781
+0x4328 = 0x6784
+0x4329 = 0x678E
+0x432A = 0x678F
+0x432B = 0x6791
+0x432C = 0x6793
+0x432D = 0x6796
+0x432E = 0x6798
+0x432F = 0x6799
+0x4330 = 0x679B
+0x4331 = 0x67B0
+0x4332 = 0x67B1
+0x4333 = 0x67B2
+0x4334 = 0x67B5
+0x4335 = 0x67BB
+0x4336 = 0x67BC
+0x4337 = 0x67BD
+0x4338 = 0x67F9
+0x4339 = 0x67C0
+0x433A = 0x67C2
+0x433B = 0x67C3
+0x433C = 0x67C5
+0x433D = 0x67C8
+0x433E = 0x67C9
+0x433F = 0x67D2
+0x4340 = 0x67D7
+0x4341 = 0x67D9
+0x4342 = 0x67DC
+0x4343 = 0x67E1
+0x4344 = 0x67E6
+0x4345 = 0x67F0
+0x4346 = 0x67F2
+0x4347 = 0x67F6
+0x4348 = 0x67F7
+0x4349 = 0x6852
+0x434A = 0x6814
+0x434B = 0x6819
+0x434C = 0x681D
+0x434D = 0x681F
+0x434E = 0x6828
+0x434F = 0x6827
+0x4350 = 0x682C
+0x4351 = 0x682D
+0x4352 = 0x682F
+0x4353 = 0x6830
+0x4354 = 0x6831
+0x4355 = 0x6833
+0x4356 = 0x683B
+0x4357 = 0x683F
+0x4358 = 0x6844
+0x4359 = 0x6845
+0x435A = 0x684A
+0x435B = 0x684C
+0x435C = 0x6855
+0x435D = 0x6857
+0x435E = 0x6858
+0x435F = 0x685B
+0x4360 = 0x686B
+0x4361 = 0x686E
+0x4362 = 0x686F
+0x4363 = 0x6870
+0x4364 = 0x6871
+0x4365 = 0x6872
+0x4366 = 0x6875
+0x4367 = 0x6879
+0x4368 = 0x687A
+0x4369 = 0x687B
+0x436A = 0x687C
+0x436B = 0x6882
+0x436C = 0x6884
+0x436D = 0x6886
+0x436E = 0x6888
+0x436F = 0x6896
+0x4370 = 0x6898
+0x4371 = 0x689A
+0x4372 = 0x689C
+0x4373 = 0x68A1
+0x4374 = 0x68A3
+0x4375 = 0x68A5
+0x4376 = 0x68A9
+0x4377 = 0x68AA
+0x4378 = 0x68AE
+0x4379 = 0x68B2
+0x437A = 0x68BB
+0x437B = 0x68C5
+0x437C = 0x68C8
+0x437D = 0x68CC
+0x437E = 0x68CF
+0x4421 = 0x68D0
+0x4422 = 0x68D1
+0x4423 = 0x68D3
+0x4424 = 0x68D6
+0x4425 = 0x68D9
+0x4426 = 0x68DC
+0x4427 = 0x68DD
+0x4428 = 0x68E5
+0x4429 = 0x68E8
+0x442A = 0x68EA
+0x442B = 0x68EB
+0x442C = 0x68EC
+0x442D = 0x68ED
+0x442E = 0x68F0
+0x442F = 0x68F1
+0x4430 = 0x68F5
+0x4431 = 0x68F6
+0x4432 = 0x68FB
+0x4433 = 0x68FC
+0x4434 = 0x68FD
+0x4435 = 0x6906
+0x4436 = 0x6909
+0x4437 = 0x690A
+0x4438 = 0x6910
+0x4439 = 0x6911
+0x443A = 0x6913
+0x443B = 0x6916
+0x443C = 0x6917
+0x443D = 0x6931
+0x443E = 0x6933
+0x443F = 0x6935
+0x4440 = 0x6938
+0x4441 = 0x693B
+0x4442 = 0x6942
+0x4443 = 0x6945
+0x4444 = 0x6949
+0x4445 = 0x694E
+0x4446 = 0x6957
+0x4447 = 0x695B
+0x4448 = 0x6963
+0x4449 = 0x6964
+0x444A = 0x6965
+0x444B = 0x6966
+0x444C = 0x6968
+0x444D = 0x6969
+0x444E = 0x696C
+0x444F = 0x6970
+0x4450 = 0x6971
+0x4451 = 0x6972
+0x4452 = 0x697A
+0x4453 = 0x697B
+0x4454 = 0x697F
+0x4455 = 0x6980
+0x4456 = 0x698D
+0x4457 = 0x6992
+0x4458 = 0x6996
+0x4459 = 0x6998
+0x445A = 0x69A1
+0x445B = 0x69A5
+0x445C = 0x69A6
+0x445D = 0x69A8
+0x445E = 0x69AB
+0x445F = 0x69AD
+0x4460 = 0x69AF
+0x4461 = 0x69B7
+0x4462 = 0x69B8
+0x4463 = 0x69BA
+0x4464 = 0x69BC
+0x4465 = 0x69C5
+0x4466 = 0x69C8
+0x4467 = 0x69D1
+0x4468 = 0x69D6
+0x4469 = 0x69D7
+0x446A = 0x69E2
+0x446B = 0x69E5
+0x446C = 0x69EE
+0x446D = 0x69EF
+0x446E = 0x69F1
+0x446F = 0x69F3
+0x4470 = 0x69F5
+0x4471 = 0x69FE
+0x4472 = 0x6A00
+0x4473 = 0x6A01
+0x4474 = 0x6A03
+0x4475 = 0x6A0F
+0x4476 = 0x6A11
+0x4477 = 0x6A15
+0x4478 = 0x6A1A
+0x4479 = 0x6A1D
+0x447A = 0x6A20
+0x447B = 0x6A24
+0x447C = 0x6A28
+0x447D = 0x6A30
+0x447E = 0x6A32
+0x4521 = 0x6A34
+0x4522 = 0x6A37
+0x4523 = 0x6A3B
+0x4524 = 0x6A3E
+0x4525 = 0x6A3F
+0x4526 = 0x6A45
+0x4527 = 0x6A46
+0x4528 = 0x6A49
+0x4529 = 0x6A4A
+0x452A = 0x6A4E
+0x452B = 0x6A50
+0x452C = 0x6A51
+0x452D = 0x6A52
+0x452E = 0x6A55
+0x452F = 0x6A56
+0x4530 = 0x6A5B
+0x4531 = 0x6A64
+0x4532 = 0x6A67
+0x4533 = 0x6A6A
+0x4534 = 0x6A71
+0x4535 = 0x6A73
+0x4536 = 0x6A7E
+0x4537 = 0x6A81
+0x4538 = 0x6A83
+0x4539 = 0x6A86
+0x453A = 0x6A87
+0x453B = 0x6A89
+0x453C = 0x6A8B
+0x453D = 0x6A91
+0x453E = 0x6A9B
+0x453F = 0x6A9D
+0x4540 = 0x6A9E
+0x4541 = 0x6A9F
+0x4542 = 0x6AA5
+0x4543 = 0x6AAB
+0x4544 = 0x6AAF
+0x4545 = 0x6AB0
+0x4546 = 0x6AB1
+0x4547 = 0x6AB4
+0x4548 = 0x6ABD
+0x4549 = 0x6ABE
+0x454A = 0x6ABF
+0x454B = 0x6AC6
+0x454C = 0x6AC9
+0x454D = 0x6AC8
+0x454E = 0x6ACC
+0x454F = 0x6AD0
+0x4550 = 0x6AD4
+0x4551 = 0x6AD5
+0x4552 = 0x6AD6
+0x4553 = 0x6ADC
+0x4554 = 0x6ADD
+0x4555 = 0x6AE4
+0x4556 = 0x6AE7
+0x4557 = 0x6AEC
+0x4558 = 0x6AF0
+0x4559 = 0x6AF1
+0x455A = 0x6AF2
+0x455B = 0x6AFC
+0x455C = 0x6AFD
+0x455D = 0x6B02
+0x455E = 0x6B03
+0x455F = 0x6B06
+0x4560 = 0x6B07
+0x4561 = 0x6B09
+0x4562 = 0x6B0F
+0x4563 = 0x6B10
+0x4564 = 0x6B11
+0x4565 = 0x6B17
+0x4566 = 0x6B1B
+0x4567 = 0x6B1E
+0x4568 = 0x6B24
+0x4569 = 0x6B28
+0x456A = 0x6B2B
+0x456B = 0x6B2C
+0x456C = 0x6B2F
+0x456D = 0x6B35
+0x456E = 0x6B36
+0x456F = 0x6B3B
+0x4570 = 0x6B3F
+0x4571 = 0x6B46
+0x4572 = 0x6B4A
+0x4573 = 0x6B4D
+0x4574 = 0x6B52
+0x4575 = 0x6B56
+0x4576 = 0x6B58
+0x4577 = 0x6B5D
+0x4578 = 0x6B60
+0x4579 = 0x6B67
+0x457A = 0x6B6B
+0x457B = 0x6B6E
+0x457C = 0x6B70
+0x457D = 0x6B75
+0x457E = 0x6B7D
+0x4621 = 0x6B7E
+0x4622 = 0x6B82
+0x4623 = 0x6B85
+0x4624 = 0x6B97
+0x4625 = 0x6B9B
+0x4626 = 0x6B9F
+0x4627 = 0x6BA0
+0x4628 = 0x6BA2
+0x4629 = 0x6BA3
+0x462A = 0x6BA8
+0x462B = 0x6BA9
+0x462C = 0x6BAC
+0x462D = 0x6BAD
+0x462E = 0x6BAE
+0x462F = 0x6BB0
+0x4630 = 0x6BB8
+0x4631 = 0x6BB9
+0x4632 = 0x6BBD
+0x4633 = 0x6BBE
+0x4634 = 0x6BC3
+0x4635 = 0x6BC4
+0x4636 = 0x6BC9
+0x4637 = 0x6BCC
+0x4638 = 0x6BD6
+0x4639 = 0x6BDA
+0x463A = 0x6BE1
+0x463B = 0x6BE3
+0x463C = 0x6BE6
+0x463D = 0x6BE7
+0x463E = 0x6BEE
+0x463F = 0x6BF1
+0x4640 = 0x6BF7
+0x4641 = 0x6BF9
+0x4642 = 0x6BFF
+0x4643 = 0x6C02
+0x4644 = 0x6C04
+0x4645 = 0x6C05
+0x4646 = 0x6C09
+0x4647 = 0x6C0D
+0x4648 = 0x6C0E
+0x4649 = 0x6C10
+0x464A = 0x6C12
+0x464B = 0x6C19
+0x464C = 0x6C1F
+0x464D = 0x6C26
+0x464E = 0x6C27
+0x464F = 0x6C28
+0x4650 = 0x6C2C
+0x4651 = 0x6C2E
+0x4652 = 0x6C33
+0x4653 = 0x6C35
+0x4654 = 0x6C36
+0x4655 = 0x6C3A
+0x4656 = 0x6C3B
+0x4657 = 0x6C3F
+0x4658 = 0x6C4A
+0x4659 = 0x6C4B
+0x465A = 0x6C4D
+0x465B = 0x6C4F
+0x465C = 0x6C52
+0x465D = 0x6C54
+0x465E = 0x6C59
+0x465F = 0x6C5B
+0x4660 = 0x6C5C
+0x4661 = 0x6C6B
+0x4662 = 0x6C6D
+0x4663 = 0x6C6F
+0x4664 = 0x6C74
+0x4665 = 0x6C76
+0x4666 = 0x6C78
+0x4667 = 0x6C79
+0x4668 = 0x6C7B
+0x4669 = 0x6C85
+0x466A = 0x6C86
+0x466B = 0x6C87
+0x466C = 0x6C89
+0x466D = 0x6C94
+0x466E = 0x6C95
+0x466F = 0x6C97
+0x4670 = 0x6C98
+0x4671 = 0x6C9C
+0x4672 = 0x6C9F
+0x4673 = 0x6CB0
+0x4674 = 0x6CB2
+0x4675 = 0x6CB4
+0x4676 = 0x6CC2
+0x4677 = 0x6CC6
+0x4678 = 0x6CCD
+0x4679 = 0x6CCF
+0x467A = 0x6CD0
+0x467B = 0x6CD1
+0x467C = 0x6CD2
+0x467D = 0x6CD4
+0x467E = 0x6CD6
+0x4721 = 0x6CDA
+0x4722 = 0x6CDC
+0x4723 = 0x6CE0
+0x4724 = 0x6CE7
+0x4725 = 0x6CE9
+0x4726 = 0x6CEB
+0x4727 = 0x6CEC
+0x4728 = 0x6CEE
+0x4729 = 0x6CF2
+0x472A = 0x6CF4
+0x472B = 0x6D04
+0x472C = 0x6D07
+0x472D = 0x6D0A
+0x472E = 0x6D0E
+0x472F = 0x6D0F
+0x4730 = 0x6D11
+0x4731 = 0x6D13
+0x4732 = 0x6D1A
+0x4733 = 0x6D26
+0x4734 = 0x6D27
+0x4735 = 0x6D28
+0x4736 = 0x6C67
+0x4737 = 0x6D2E
+0x4738 = 0x6D2F
+0x4739 = 0x6D31
+0x473A = 0x6D39
+0x473B = 0x6D3C
+0x473C = 0x6D3F
+0x473D = 0x6D57
+0x473E = 0x6D5E
+0x473F = 0x6D5F
+0x4740 = 0x6D61
+0x4741 = 0x6D65
+0x4742 = 0x6D67
+0x4743 = 0x6D6F
+0x4744 = 0x6D70
+0x4745 = 0x6D7C
+0x4746 = 0x6D82
+0x4747 = 0x6D87
+0x4748 = 0x6D91
+0x4749 = 0x6D92
+0x474A = 0x6D94
+0x474B = 0x6D96
+0x474C = 0x6D97
+0x474D = 0x6D98
+0x474E = 0x6DAA
+0x474F = 0x6DAC
+0x4750 = 0x6DB4
+0x4751 = 0x6DB7
+0x4752 = 0x6DB9
+0x4753 = 0x6DBD
+0x4754 = 0x6DBF
+0x4755 = 0x6DC4
+0x4756 = 0x6DC8
+0x4757 = 0x6DCA
+0x4758 = 0x6DCE
+0x4759 = 0x6DCF
+0x475A = 0x6DD6
+0x475B = 0x6DDB
+0x475C = 0x6DDD
+0x475D = 0x6DDF
+0x475E = 0x6DE0
+0x475F = 0x6DE2
+0x4760 = 0x6DE5
+0x4761 = 0x6DE9
+0x4762 = 0x6DEF
+0x4763 = 0x6DF0
+0x4764 = 0x6DF4
+0x4765 = 0x6DF6
+0x4766 = 0x6DFC
+0x4767 = 0x6E00
+0x4768 = 0x6E04
+0x4769 = 0x6E1E
+0x476A = 0x6E22
+0x476B = 0x6E27
+0x476C = 0x6E32
+0x476D = 0x6E36
+0x476E = 0x6E39
+0x476F = 0x6E3B
+0x4770 = 0x6E3C
+0x4771 = 0x6E44
+0x4772 = 0x6E45
+0x4773 = 0x6E48
+0x4774 = 0x6E49
+0x4775 = 0x6E4B
+0x4776 = 0x6E4F
+0x4777 = 0x6E51
+0x4778 = 0x6E52
+0x4779 = 0x6E53
+0x477A = 0x6E54
+0x477B = 0x6E57
+0x477C = 0x6E5C
+0x477D = 0x6E5D
+0x477E = 0x6E5E
+0x4821 = 0x6E62
+0x4822 = 0x6E63
+0x4823 = 0x6E68
+0x4824 = 0x6E73
+0x4825 = 0x6E7B
+0x4826 = 0x6E7D
+0x4827 = 0x6E8D
+0x4828 = 0x6E93
+0x4829 = 0x6E99
+0x482A = 0x6EA0
+0x482B = 0x6EA7
+0x482C = 0x6EAD
+0x482D = 0x6EAE
+0x482E = 0x6EB1
+0x482F = 0x6EB3
+0x4830 = 0x6EBB
+0x4831 = 0x6EBF
+0x4832 = 0x6EC0
+0x4833 = 0x6EC1
+0x4834 = 0x6EC3
+0x4835 = 0x6EC7
+0x4836 = 0x6EC8
+0x4837 = 0x6ECA
+0x4838 = 0x6ECD
+0x4839 = 0x6ECE
+0x483A = 0x6ECF
+0x483B = 0x6EEB
+0x483C = 0x6EED
+0x483D = 0x6EEE
+0x483E = 0x6EF9
+0x483F = 0x6EFB
+0x4840 = 0x6EFD
+0x4841 = 0x6F04
+0x4842 = 0x6F08
+0x4843 = 0x6F0A
+0x4844 = 0x6F0C
+0x4845 = 0x6F0D
+0x4846 = 0x6F16
+0x4847 = 0x6F18
+0x4848 = 0x6F1A
+0x4849 = 0x6F1B
+0x484A = 0x6F26
+0x484B = 0x6F29
+0x484C = 0x6F2A
+0x484D = 0x6F2F
+0x484E = 0x6F30
+0x484F = 0x6F33
+0x4850 = 0x6F36
+0x4851 = 0x6F3B
+0x4852 = 0x6F3C
+0x4853 = 0x6F2D
+0x4854 = 0x6F4F
+0x4855 = 0x6F51
+0x4856 = 0x6F52
+0x4857 = 0x6F53
+0x4858 = 0x6F57
+0x4859 = 0x6F59
+0x485A = 0x6F5A
+0x485B = 0x6F5D
+0x485C = 0x6F5E
+0x485D = 0x6F61
+0x485E = 0x6F62
+0x485F = 0x6F68
+0x4860 = 0x6F6C
+0x4861 = 0x6F7D
+0x4862 = 0x6F7E
+0x4863 = 0x6F83
+0x4864 = 0x6F87
+0x4865 = 0x6F88
+0x4866 = 0x6F8B
+0x4867 = 0x6F8C
+0x4868 = 0x6F8D
+0x4869 = 0x6F90
+0x486A = 0x6F92
+0x486B = 0x6F93
+0x486C = 0x6F94
+0x486D = 0x6F96
+0x486E = 0x6F9A
+0x486F = 0x6F9F
+0x4870 = 0x6FA0
+0x4871 = 0x6FA5
+0x4872 = 0x6FA6
+0x4873 = 0x6FA7
+0x4874 = 0x6FA8
+0x4875 = 0x6FAE
+0x4876 = 0x6FAF
+0x4877 = 0x6FB0
+0x4878 = 0x6FB5
+0x4879 = 0x6FB6
+0x487A = 0x6FBC
+0x487B = 0x6FC5
+0x487C = 0x6FC7
+0x487D = 0x6FC8
+0x487E = 0x6FCA
+0x4921 = 0x6FDA
+0x4922 = 0x6FDE
+0x4923 = 0x6FE8
+0x4924 = 0x6FE9
+0x4925 = 0x6FF0
+0x4926 = 0x6FF5
+0x4927 = 0x6FF9
+0x4928 = 0x6FFC
+0x4929 = 0x6FFD
+0x492A = 0x7000
+0x492B = 0x7005
+0x492C = 0x7006
+0x492D = 0x7007
+0x492E = 0x700D
+0x492F = 0x7017
+0x4930 = 0x7020
+0x4931 = 0x7023
+0x4932 = 0x702F
+0x4933 = 0x7034
+0x4934 = 0x7037
+0x4935 = 0x7039
+0x4936 = 0x703C
+0x4937 = 0x7043
+0x4938 = 0x7044
+0x4939 = 0x7048
+0x493A = 0x7049
+0x493B = 0x704A
+0x493C = 0x704B
+0x493D = 0x7054
+0x493E = 0x7055
+0x493F = 0x705D
+0x4940 = 0x705E
+0x4941 = 0x704E
+0x4942 = 0x7064
+0x4943 = 0x7065
+0x4944 = 0x706C
+0x4945 = 0x706E
+0x4946 = 0x7075
+0x4947 = 0x7076
+0x4948 = 0x707E
+0x4949 = 0x7081
+0x494A = 0x7085
+0x494B = 0x7086
+0x494C = 0x7094
+0x494D = 0x7095
+0x494E = 0x7096
+0x494F = 0x7097
+0x4950 = 0x7098
+0x4951 = 0x709B
+0x4952 = 0x70A4
+0x4953 = 0x70AB
+0x4954 = 0x70B0
+0x4955 = 0x70B1
+0x4956 = 0x70B4
+0x4957 = 0x70B7
+0x4958 = 0x70CA
+0x4959 = 0x70D1
+0x495A = 0x70D3
+0x495B = 0x70D4
+0x495C = 0x70D5
+0x495D = 0x70D6
+0x495E = 0x70D8
+0x495F = 0x70DC
+0x4960 = 0x70E4
+0x4961 = 0x70FA
+0x4962 = 0x7103
+0x4963 = 0x7104
+0x4964 = 0x7105
+0x4965 = 0x7106
+0x4966 = 0x7107
+0x4967 = 0x710B
+0x4968 = 0x710C
+0x4969 = 0x710F
+0x496A = 0x711E
+0x496B = 0x7120
+0x496C = 0x712B
+0x496D = 0x712D
+0x496E = 0x712F
+0x496F = 0x7130
+0x4970 = 0x7131
+0x4971 = 0x7138
+0x4972 = 0x7141
+0x4973 = 0x7145
+0x4974 = 0x7146
+0x4975 = 0x7147
+0x4976 = 0x714A
+0x4977 = 0x714B
+0x4978 = 0x7150
+0x4979 = 0x7152
+0x497A = 0x7157
+0x497B = 0x715A
+0x497C = 0x715C
+0x497D = 0x715E
+0x497E = 0x7160
+0x4A21 = 0x7168
+0x4A22 = 0x7179
+0x4A23 = 0x7180
+0x4A24 = 0x7185
+0x4A25 = 0x7187
+0x4A26 = 0x718C
+0x4A27 = 0x7192
+0x4A28 = 0x719A
+0x4A29 = 0x719B
+0x4A2A = 0x71A0
+0x4A2B = 0x71A2
+0x4A2C = 0x71AF
+0x4A2D = 0x71B0
+0x4A2E = 0x71B2
+0x4A2F = 0x71B3
+0x4A30 = 0x71BA
+0x4A31 = 0x71BF
+0x4A32 = 0x71C0
+0x4A33 = 0x71C1
+0x4A34 = 0x71C4
+0x4A35 = 0x71CB
+0x4A36 = 0x71CC
+0x4A37 = 0x71D3
+0x4A38 = 0x71D6
+0x4A39 = 0x71D9
+0x4A3A = 0x71DA
+0x4A3B = 0x71DC
+0x4A3C = 0x71F8
+0x4A3D = 0x71FE
+0x4A3E = 0x7200
+0x4A3F = 0x7207
+0x4A40 = 0x7208
+0x4A41 = 0x7209
+0x4A42 = 0x7213
+0x4A43 = 0x7217
+0x4A44 = 0x721A
+0x4A45 = 0x721D
+0x4A46 = 0x721F
+0x4A47 = 0x7224
+0x4A48 = 0x722B
+0x4A49 = 0x722F
+0x4A4A = 0x7234
+0x4A4B = 0x7238
+0x4A4C = 0x7239
+0x4A4D = 0x7241
+0x4A4E = 0x7242
+0x4A4F = 0x7243
+0x4A50 = 0x7245
+0x4A51 = 0x724E
+0x4A52 = 0x724F
+0x4A53 = 0x7250
+0x4A54 = 0x7253
+0x4A55 = 0x7255
+0x4A56 = 0x7256
+0x4A57 = 0x725A
+0x4A58 = 0x725C
+0x4A59 = 0x725E
+0x4A5A = 0x7260
+0x4A5B = 0x7263
+0x4A5C = 0x7268
+0x4A5D = 0x726B
+0x4A5E = 0x726E
+0x4A5F = 0x726F
+0x4A60 = 0x7271
+0x4A61 = 0x7277
+0x4A62 = 0x7278
+0x4A63 = 0x727B
+0x4A64 = 0x727C
+0x4A65 = 0x727F
+0x4A66 = 0x7284
+0x4A67 = 0x7289
+0x4A68 = 0x728D
+0x4A69 = 0x728E
+0x4A6A = 0x7293
+0x4A6B = 0x729B
+0x4A6C = 0x72A8
+0x4A6D = 0x72AD
+0x4A6E = 0x72AE
+0x4A6F = 0x72B1
+0x4A70 = 0x72B4
+0x4A71 = 0x72BE
+0x4A72 = 0x72C1
+0x4A73 = 0x72C7
+0x4A74 = 0x72C9
+0x4A75 = 0x72CC
+0x4A76 = 0x72D5
+0x4A77 = 0x72D6
+0x4A78 = 0x72D8
+0x4A79 = 0x72DF
+0x4A7A = 0x72E5
+0x4A7B = 0x72F3
+0x4A7C = 0x72F4
+0x4A7D = 0x72FA
+0x4A7E = 0x72FB
+0x4B21 = 0x72FE
+0x4B22 = 0x7302
+0x4B23 = 0x7304
+0x4B24 = 0x7305
+0x4B25 = 0x7307
+0x4B26 = 0x730B
+0x4B27 = 0x730D
+0x4B28 = 0x7312
+0x4B29 = 0x7313
+0x4B2A = 0x7318
+0x4B2B = 0x7319
+0x4B2C = 0x731E
+0x4B2D = 0x7322
+0x4B2E = 0x7324
+0x4B2F = 0x7327
+0x4B30 = 0x7328
+0x4B31 = 0x732C
+0x4B32 = 0x7331
+0x4B33 = 0x7332
+0x4B34 = 0x7335
+0x4B35 = 0x733A
+0x4B36 = 0x733B
+0x4B37 = 0x733D
+0x4B38 = 0x7343
+0x4B39 = 0x734D
+0x4B3A = 0x7350
+0x4B3B = 0x7352
+0x4B3C = 0x7356
+0x4B3D = 0x7358
+0x4B3E = 0x735D
+0x4B3F = 0x735E
+0x4B40 = 0x735F
+0x4B41 = 0x7360
+0x4B42 = 0x7366
+0x4B43 = 0x7367
+0x4B44 = 0x7369
+0x4B45 = 0x736B
+0x4B46 = 0x736C
+0x4B47 = 0x736E
+0x4B48 = 0x736F
+0x4B49 = 0x7371
+0x4B4A = 0x7377
+0x4B4B = 0x7379
+0x4B4C = 0x737C
+0x4B4D = 0x7380
+0x4B4E = 0x7381
+0x4B4F = 0x7383
+0x4B50 = 0x7385
+0x4B51 = 0x7386
+0x4B52 = 0x738E
+0x4B53 = 0x7390
+0x4B54 = 0x7393
+0x4B55 = 0x7395
+0x4B56 = 0x7397
+0x4B57 = 0x7398
+0x4B58 = 0x739C
+0x4B59 = 0x739E
+0x4B5A = 0x739F
+0x4B5B = 0x73A0
+0x4B5C = 0x73A2
+0x4B5D = 0x73A5
+0x4B5E = 0x73A6
+0x4B5F = 0x73AA
+0x4B60 = 0x73AB
+0x4B61 = 0x73AD
+0x4B62 = 0x73B5
+0x4B63 = 0x73B7
+0x4B64 = 0x73B9
+0x4B65 = 0x73BC
+0x4B66 = 0x73BD
+0x4B67 = 0x73BF
+0x4B68 = 0x73C5
+0x4B69 = 0x73C6
+0x4B6A = 0x73C9
+0x4B6B = 0x73CB
+0x4B6C = 0x73CC
+0x4B6D = 0x73CF
+0x4B6E = 0x73D2
+0x4B6F = 0x73D3
+0x4B70 = 0x73D6
+0x4B71 = 0x73D9
+0x4B72 = 0x73DD
+0x4B73 = 0x73E1
+0x4B74 = 0x73E3
+0x4B75 = 0x73E6
+0x4B76 = 0x73E7
+0x4B77 = 0x73E9
+0x4B78 = 0x73F4
+0x4B79 = 0x73F5
+0x4B7A = 0x73F7
+0x4B7B = 0x73F9
+0x4B7C = 0x73FA
+0x4B7D = 0x73FB
+0x4B7E = 0x73FD
+0x4C21 = 0x73FF
+0x4C22 = 0x7400
+0x4C23 = 0x7401
+0x4C24 = 0x7404
+0x4C25 = 0x7407
+0x4C26 = 0x740A
+0x4C27 = 0x7411
+0x4C28 = 0x741A
+0x4C29 = 0x741B
+0x4C2A = 0x7424
+0x4C2B = 0x7426
+0x4C2C = 0x7428
+0x4C2D = 0x7429
+0x4C2E = 0x742A
+0x4C2F = 0x742B
+0x4C30 = 0x742C
+0x4C31 = 0x742D
+0x4C32 = 0x742E
+0x4C33 = 0x742F
+0x4C34 = 0x7430
+0x4C35 = 0x7431
+0x4C36 = 0x7439
+0x4C37 = 0x7440
+0x4C38 = 0x7443
+0x4C39 = 0x7444
+0x4C3A = 0x7446
+0x4C3B = 0x7447
+0x4C3C = 0x744B
+0x4C3D = 0x744D
+0x4C3E = 0x7451
+0x4C3F = 0x7452
+0x4C40 = 0x7457
+0x4C41 = 0x745D
+0x4C42 = 0x7462
+0x4C43 = 0x7466
+0x4C44 = 0x7467
+0x4C45 = 0x7468
+0x4C46 = 0x746B
+0x4C47 = 0x746D
+0x4C48 = 0x746E
+0x4C49 = 0x7471
+0x4C4A = 0x7472
+0x4C4B = 0x7480
+0x4C4C = 0x7481
+0x4C4D = 0x7485
+0x4C4E = 0x7486
+0x4C4F = 0x7487
+0x4C50 = 0x7489
+0x4C51 = 0x748F
+0x4C52 = 0x7490
+0x4C53 = 0x7491
+0x4C54 = 0x7492
+0x4C55 = 0x7498
+0x4C56 = 0x7499
+0x4C57 = 0x749A
+0x4C58 = 0x749C
+0x4C59 = 0x749F
+0x4C5A = 0x74A0
+0x4C5B = 0x74A1
+0x4C5C = 0x74A3
+0x4C5D = 0x74A6
+0x4C5E = 0x74A8
+0x4C5F = 0x74A9
+0x4C60 = 0x74AA
+0x4C61 = 0x74AB
+0x4C62 = 0x74AE
+0x4C63 = 0x74AF
+0x4C64 = 0x74B1
+0x4C65 = 0x74B2
+0x4C66 = 0x74B5
+0x4C67 = 0x74B9
+0x4C68 = 0x74BB
+0x4C69 = 0x74BF
+0x4C6A = 0x74C8
+0x4C6B = 0x74C9
+0x4C6C = 0x74CC
+0x4C6D = 0x74D0
+0x4C6E = 0x74D3
+0x4C6F = 0x74D8
+0x4C70 = 0x74DA
+0x4C71 = 0x74DB
+0x4C72 = 0x74DE
+0x4C73 = 0x74DF
+0x4C74 = 0x74E4
+0x4C75 = 0x74E8
+0x4C76 = 0x74EA
+0x4C77 = 0x74EB
+0x4C78 = 0x74EF
+0x4C79 = 0x74F4
+0x4C7A = 0x74FA
+0x4C7B = 0x74FB
+0x4C7C = 0x74FC
+0x4C7D = 0x74FF
+0x4C7E = 0x7506
+0x4D21 = 0x7512
+0x4D22 = 0x7516
+0x4D23 = 0x7517
+0x4D24 = 0x7520
+0x4D25 = 0x7521
+0x4D26 = 0x7524
+0x4D27 = 0x7527
+0x4D28 = 0x7529
+0x4D29 = 0x752A
+0x4D2A = 0x752F
+0x4D2B = 0x7536
+0x4D2C = 0x7539
+0x4D2D = 0x753D
+0x4D2E = 0x753E
+0x4D2F = 0x753F
+0x4D30 = 0x7540
+0x4D31 = 0x7543
+0x4D32 = 0x7547
+0x4D33 = 0x7548
+0x4D34 = 0x754E
+0x4D35 = 0x7550
+0x4D36 = 0x7552
+0x4D37 = 0x7557
+0x4D38 = 0x755E
+0x4D39 = 0x755F
+0x4D3A = 0x7561
+0x4D3B = 0x756F
+0x4D3C = 0x7571
+0x4D3D = 0x7579
+0x4D3E = 0x757A
+0x4D3F = 0x757B
+0x4D40 = 0x757C
+0x4D41 = 0x757D
+0x4D42 = 0x757E
+0x4D43 = 0x7581
+0x4D44 = 0x7585
+0x4D45 = 0x7590
+0x4D46 = 0x7592
+0x4D47 = 0x7593
+0x4D48 = 0x7595
+0x4D49 = 0x7599
+0x4D4A = 0x759C
+0x4D4B = 0x75A2
+0x4D4C = 0x75A4
+0x4D4D = 0x75B4
+0x4D4E = 0x75BA
+0x4D4F = 0x75BF
+0x4D50 = 0x75C0
+0x4D51 = 0x75C1
+0x4D52 = 0x75C4
+0x4D53 = 0x75C6
+0x4D54 = 0x75CC
+0x4D55 = 0x75CE
+0x4D56 = 0x75CF
+0x4D57 = 0x75D7
+0x4D58 = 0x75DC
+0x4D59 = 0x75DF
+0x4D5A = 0x75E0
+0x4D5B = 0x75E1
+0x4D5C = 0x75E4
+0x4D5D = 0x75E7
+0x4D5E = 0x75EC
+0x4D5F = 0x75EE
+0x4D60 = 0x75EF
+0x4D61 = 0x75F1
+0x4D62 = 0x75F9
+0x4D63 = 0x7600
+0x4D64 = 0x7602
+0x4D65 = 0x7603
+0x4D66 = 0x7604
+0x4D67 = 0x7607
+0x4D68 = 0x7608
+0x4D69 = 0x760A
+0x4D6A = 0x760C
+0x4D6B = 0x760F
+0x4D6C = 0x7612
+0x4D6D = 0x7613
+0x4D6E = 0x7615
+0x4D6F = 0x7616
+0x4D70 = 0x7619
+0x4D71 = 0x761B
+0x4D72 = 0x761C
+0x4D73 = 0x761D
+0x4D74 = 0x761E
+0x4D75 = 0x7623
+0x4D76 = 0x7625
+0x4D77 = 0x7626
+0x4D78 = 0x7629
+0x4D79 = 0x762D
+0x4D7A = 0x7632
+0x4D7B = 0x7633
+0x4D7C = 0x7635
+0x4D7D = 0x7638
+0x4D7E = 0x7639
+0x4E21 = 0x763A
+0x4E22 = 0x763C
+0x4E23 = 0x764A
+0x4E24 = 0x7640
+0x4E25 = 0x7641
+0x4E26 = 0x7643
+0x4E27 = 0x7644
+0x4E28 = 0x7645
+0x4E29 = 0x7649
+0x4E2A = 0x764B
+0x4E2B = 0x7655
+0x4E2C = 0x7659
+0x4E2D = 0x765F
+0x4E2E = 0x7664
+0x4E2F = 0x7665
+0x4E30 = 0x766D
+0x4E31 = 0x766E
+0x4E32 = 0x766F
+0x4E33 = 0x7671
+0x4E34 = 0x7674
+0x4E35 = 0x7681
+0x4E36 = 0x7685
+0x4E37 = 0x768C
+0x4E38 = 0x768D
+0x4E39 = 0x7695
+0x4E3A = 0x769B
+0x4E3B = 0x769C
+0x4E3C = 0x769D
+0x4E3D = 0x769F
+0x4E3E = 0x76A0
+0x4E3F = 0x76A2
+0x4E40 = 0x76A3
+0x4E41 = 0x76A4
+0x4E42 = 0x76A5
+0x4E43 = 0x76A6
+0x4E44 = 0x76A7
+0x4E45 = 0x76A8
+0x4E46 = 0x76AA
+0x4E47 = 0x76AD
+0x4E48 = 0x76BD
+0x4E49 = 0x76C1
+0x4E4A = 0x76C5
+0x4E4B = 0x76C9
+0x4E4C = 0x76CB
+0x4E4D = 0x76CC
+0x4E4E = 0x76CE
+0x4E4F = 0x76D4
+0x4E50 = 0x76D9
+0x4E51 = 0x76E0
+0x4E52 = 0x76E6
+0x4E53 = 0x76E8
+0x4E54 = 0x76EC
+0x4E55 = 0x76F0
+0x4E56 = 0x76F1
+0x4E57 = 0x76F6
+0x4E58 = 0x76F9
+0x4E59 = 0x76FC
+0x4E5A = 0x7700
+0x4E5B = 0x7706
+0x4E5C = 0x770A
+0x4E5D = 0x770E
+0x4E5E = 0x7712
+0x4E5F = 0x7714
+0x4E60 = 0x7715
+0x4E61 = 0x7717
+0x4E62 = 0x7719
+0x4E63 = 0x771A
+0x4E64 = 0x771C
+0x4E65 = 0x7722
+0x4E66 = 0x7728
+0x4E67 = 0x772D
+0x4E68 = 0x772E
+0x4E69 = 0x772F
+0x4E6A = 0x7734
+0x4E6B = 0x7735
+0x4E6C = 0x7736
+0x4E6D = 0x7739
+0x4E6E = 0x773D
+0x4E6F = 0x773E
+0x4E70 = 0x7742
+0x4E71 = 0x7745
+0x4E72 = 0x7746
+0x4E73 = 0x774A
+0x4E74 = 0x774D
+0x4E75 = 0x774E
+0x4E76 = 0x774F
+0x4E77 = 0x7752
+0x4E78 = 0x7756
+0x4E79 = 0x7757
+0x4E7A = 0x775C
+0x4E7B = 0x775E
+0x4E7C = 0x775F
+0x4E7D = 0x7760
+0x4E7E = 0x7762
+0x4F21 = 0x7764
+0x4F22 = 0x7767
+0x4F23 = 0x776A
+0x4F24 = 0x776C
+0x4F25 = 0x7770
+0x4F26 = 0x7772
+0x4F27 = 0x7773
+0x4F28 = 0x7774
+0x4F29 = 0x777A
+0x4F2A = 0x777D
+0x4F2B = 0x7780
+0x4F2C = 0x7784
+0x4F2D = 0x778C
+0x4F2E = 0x778D
+0x4F2F = 0x7794
+0x4F30 = 0x7795
+0x4F31 = 0x7796
+0x4F32 = 0x779A
+0x4F33 = 0x779F
+0x4F34 = 0x77A2
+0x4F35 = 0x77A7
+0x4F36 = 0x77AA
+0x4F37 = 0x77AE
+0x4F38 = 0x77AF
+0x4F39 = 0x77B1
+0x4F3A = 0x77B5
+0x4F3B = 0x77BE
+0x4F3C = 0x77C3
+0x4F3D = 0x77C9
+0x4F3E = 0x77D1
+0x4F3F = 0x77D2
+0x4F40 = 0x77D5
+0x4F41 = 0x77D9
+0x4F42 = 0x77DE
+0x4F43 = 0x77DF
+0x4F44 = 0x77E0
+0x4F45 = 0x77E4
+0x4F46 = 0x77E6
+0x4F47 = 0x77EA
+0x4F48 = 0x77EC
+0x4F49 = 0x77F0
+0x4F4A = 0x77F1
+0x4F4B = 0x77F4
+0x4F4C = 0x77F8
+0x4F4D = 0x77FB
+0x4F4E = 0x7805
+0x4F4F = 0x7806
+0x4F50 = 0x7809
+0x4F51 = 0x780D
+0x4F52 = 0x780E
+0x4F53 = 0x7811
+0x4F54 = 0x781D
+0x4F55 = 0x7821
+0x4F56 = 0x7822
+0x4F57 = 0x7823
+0x4F58 = 0x782D
+0x4F59 = 0x782E
+0x4F5A = 0x7830
+0x4F5B = 0x7835
+0x4F5C = 0x7837
+0x4F5D = 0x7843
+0x4F5E = 0x7844
+0x4F5F = 0x7847
+0x4F60 = 0x7848
+0x4F61 = 0x784C
+0x4F62 = 0x784E
+0x4F63 = 0x7852
+0x4F64 = 0x785C
+0x4F65 = 0x785E
+0x4F66 = 0x7860
+0x4F67 = 0x7861
+0x4F68 = 0x7863
+0x4F69 = 0x7864
+0x4F6A = 0x7868
+0x4F6B = 0x786A
+0x4F6C = 0x786E
+0x4F6D = 0x787A
+0x4F6E = 0x787E
+0x4F6F = 0x788A
+0x4F70 = 0x788F
+0x4F71 = 0x7894
+0x4F72 = 0x7898
+0x4F73 = 0x78A1
+0x4F74 = 0x789D
+0x4F75 = 0x789E
+0x4F76 = 0x789F
+0x4F77 = 0x78A4
+0x4F78 = 0x78A8
+0x4F79 = 0x78AC
+0x4F7A = 0x78AD
+0x4F7B = 0x78B0
+0x4F7C = 0x78B1
+0x4F7D = 0x78B2
+0x4F7E = 0x78B3
+0x5021 = 0x78BB
+0x5022 = 0x78BD
+0x5023 = 0x78BF
+0x5024 = 0x78C7
+0x5025 = 0x78C8
+0x5026 = 0x78C9
+0x5027 = 0x78CC
+0x5028 = 0x78CE
+0x5029 = 0x78D2
+0x502A = 0x78D3
+0x502B = 0x78D5
+0x502C = 0x78D6
+0x502D = 0x78E4
+0x502E = 0x78DB
+0x502F = 0x78DF
+0x5030 = 0x78E0
+0x5031 = 0x78E1
+0x5032 = 0x78E6
+0x5033 = 0x78EA
+0x5034 = 0x78F2
+0x5035 = 0x78F3
+0x5036 = 0x7900
+0x5037 = 0x78F6
+0x5038 = 0x78F7
+0x5039 = 0x78FA
+0x503A = 0x78FB
+0x503B = 0x78FF
+0x503C = 0x7906
+0x503D = 0x790C
+0x503E = 0x7910
+0x503F = 0x791A
+0x5040 = 0x791C
+0x5041 = 0x791E
+0x5042 = 0x791F
+0x5043 = 0x7920
+0x5044 = 0x7925
+0x5045 = 0x7927
+0x5046 = 0x7929
+0x5047 = 0x792D
+0x5048 = 0x7931
+0x5049 = 0x7934
+0x504A = 0x7935
+0x504B = 0x793B
+0x504C = 0x793D
+0x504D = 0x793F
+0x504E = 0x7944
+0x504F = 0x7945
+0x5050 = 0x7946
+0x5051 = 0x794A
+0x5052 = 0x794B
+0x5053 = 0x794F
+0x5054 = 0x7951
+0x5055 = 0x7954
+0x5056 = 0x7958
+0x5057 = 0x795B
+0x5058 = 0x795C
+0x5059 = 0x7967
+0x505A = 0x7969
+0x505B = 0x796B
+0x505C = 0x7972
+0x505D = 0x7979
+0x505E = 0x797B
+0x505F = 0x797C
+0x5060 = 0x797E
+0x5061 = 0x798B
+0x5062 = 0x798C
+0x5063 = 0x7991
+0x5064 = 0x7993
+0x5065 = 0x7994
+0x5066 = 0x7995
+0x5067 = 0x7996
+0x5068 = 0x7998
+0x5069 = 0x799B
+0x506A = 0x799C
+0x506B = 0x79A1
+0x506C = 0x79A8
+0x506D = 0x79A9
+0x506E = 0x79AB
+0x506F = 0x79AF
+0x5070 = 0x79B1
+0x5071 = 0x79B4
+0x5072 = 0x79B8
+0x5073 = 0x79BB
+0x5074 = 0x79C2
+0x5075 = 0x79C4
+0x5076 = 0x79C7
+0x5077 = 0x79C8
+0x5078 = 0x79CA
+0x5079 = 0x79CF
+0x507A = 0x79D4
+0x507B = 0x79D6
+0x507C = 0x79DA
+0x507D = 0x79DD
+0x507E = 0x79DE
+0x5121 = 0x79E0
+0x5122 = 0x79E2
+0x5123 = 0x79E5
+0x5124 = 0x79EA
+0x5125 = 0x79EB
+0x5126 = 0x79ED
+0x5127 = 0x79F1
+0x5128 = 0x79F8
+0x5129 = 0x79FC
+0x512A = 0x7A02
+0x512B = 0x7A03
+0x512C = 0x7A07
+0x512D = 0x7A09
+0x512E = 0x7A0A
+0x512F = 0x7A0C
+0x5130 = 0x7A11
+0x5131 = 0x7A15
+0x5132 = 0x7A1B
+0x5133 = 0x7A1E
+0x5134 = 0x7A21
+0x5135 = 0x7A27
+0x5136 = 0x7A2B
+0x5137 = 0x7A2D
+0x5138 = 0x7A2F
+0x5139 = 0x7A30
+0x513A = 0x7A34
+0x513B = 0x7A35
+0x513C = 0x7A38
+0x513D = 0x7A39
+0x513E = 0x7A3A
+0x513F = 0x7A44
+0x5140 = 0x7A45
+0x5141 = 0x7A47
+0x5142 = 0x7A48
+0x5143 = 0x7A4C
+0x5144 = 0x7A55
+0x5145 = 0x7A56
+0x5146 = 0x7A59
+0x5147 = 0x7A5C
+0x5148 = 0x7A5D
+0x5149 = 0x7A5F
+0x514A = 0x7A60
+0x514B = 0x7A65
+0x514C = 0x7A67
+0x514D = 0x7A6A
+0x514E = 0x7A6D
+0x514F = 0x7A75
+0x5150 = 0x7A78
+0x5151 = 0x7A7E
+0x5152 = 0x7A80
+0x5153 = 0x7A82
+0x5154 = 0x7A85
+0x5155 = 0x7A86
+0x5156 = 0x7A8A
+0x5157 = 0x7A8B
+0x5158 = 0x7A90
+0x5159 = 0x7A91
+0x515A = 0x7A94
+0x515B = 0x7A9E
+0x515C = 0x7AA0
+0x515D = 0x7AA3
+0x515E = 0x7AAC
+0x515F = 0x7AB3
+0x5160 = 0x7AB5
+0x5161 = 0x7AB9
+0x5162 = 0x7ABB
+0x5163 = 0x7ABC
+0x5164 = 0x7AC6
+0x5165 = 0x7AC9
+0x5166 = 0x7ACC
+0x5167 = 0x7ACE
+0x5168 = 0x7AD1
+0x5169 = 0x7ADB
+0x516A = 0x7AE8
+0x516B = 0x7AE9
+0x516C = 0x7AEB
+0x516D = 0x7AEC
+0x516E = 0x7AF1
+0x516F = 0x7AF4
+0x5170 = 0x7AFB
+0x5171 = 0x7AFD
+0x5172 = 0x7AFE
+0x5173 = 0x7B07
+0x5174 = 0x7B14
+0x5175 = 0x7B1F
+0x5176 = 0x7B23
+0x5177 = 0x7B27
+0x5178 = 0x7B29
+0x5179 = 0x7B2A
+0x517A = 0x7B2B
+0x517B = 0x7B2D
+0x517C = 0x7B2E
+0x517D = 0x7B2F
+0x517E = 0x7B30
+0x5221 = 0x7B31
+0x5222 = 0x7B34
+0x5223 = 0x7B3D
+0x5224 = 0x7B3F
+0x5225 = 0x7B40
+0x5226 = 0x7B41
+0x5227 = 0x7B47
+0x5228 = 0x7B4E
+0x5229 = 0x7B55
+0x522A = 0x7B60
+0x522B = 0x7B64
+0x522C = 0x7B66
+0x522D = 0x7B69
+0x522E = 0x7B6A
+0x522F = 0x7B6D
+0x5230 = 0x7B6F
+0x5231 = 0x7B72
+0x5232 = 0x7B73
+0x5233 = 0x7B77
+0x5234 = 0x7B84
+0x5235 = 0x7B89
+0x5236 = 0x7B8E
+0x5237 = 0x7B90
+0x5238 = 0x7B91
+0x5239 = 0x7B96
+0x523A = 0x7B9B
+0x523B = 0x7B9E
+0x523C = 0x7BA0
+0x523D = 0x7BA5
+0x523E = 0x7BAC
+0x523F = 0x7BAF
+0x5240 = 0x7BB0
+0x5241 = 0x7BB2
+0x5242 = 0x7BB5
+0x5243 = 0x7BB6
+0x5244 = 0x7BBA
+0x5245 = 0x7BBB
+0x5246 = 0x7BBC
+0x5247 = 0x7BBD
+0x5248 = 0x7BC2
+0x5249 = 0x7BC5
+0x524A = 0x7BC8
+0x524B = 0x7BCA
+0x524C = 0x7BD4
+0x524D = 0x7BD6
+0x524E = 0x7BD7
+0x524F = 0x7BD9
+0x5250 = 0x7BDA
+0x5251 = 0x7BDB
+0x5252 = 0x7BE8
+0x5253 = 0x7BEA
+0x5254 = 0x7BF2
+0x5255 = 0x7BF4
+0x5256 = 0x7BF5
+0x5257 = 0x7BF8
+0x5258 = 0x7BF9
+0x5259 = 0x7BFA
+0x525A = 0x7BFC
+0x525B = 0x7BFE
+0x525C = 0x7C01
+0x525D = 0x7C02
+0x525E = 0x7C03
+0x525F = 0x7C04
+0x5260 = 0x7C06
+0x5261 = 0x7C09
+0x5262 = 0x7C0B
+0x5263 = 0x7C0C
+0x5264 = 0x7C0E
+0x5265 = 0x7C0F
+0x5266 = 0x7C19
+0x5267 = 0x7C1B
+0x5268 = 0x7C20
+0x5269 = 0x7C25
+0x526A = 0x7C26
+0x526B = 0x7C28
+0x526C = 0x7C2C
+0x526D = 0x7C31
+0x526E = 0x7C33
+0x526F = 0x7C34
+0x5270 = 0x7C36
+0x5271 = 0x7C39
+0x5272 = 0x7C3A
+0x5273 = 0x7C46
+0x5274 = 0x7C4A
+0x5275 = 0x7C55
+0x5276 = 0x7C51
+0x5277 = 0x7C52
+0x5278 = 0x7C53
+0x5279 = 0x7C59
+0x527A = 0x7C5A
+0x527B = 0x7C5B
+0x527C = 0x7C5C
+0x527D = 0x7C5D
+0x527E = 0x7C5E
+0x5321 = 0x7C61
+0x5322 = 0x7C63
+0x5323 = 0x7C67
+0x5324 = 0x7C69
+0x5325 = 0x7C6D
+0x5326 = 0x7C6E
+0x5327 = 0x7C70
+0x5328 = 0x7C72
+0x5329 = 0x7C79
+0x532A = 0x7C7C
+0x532B = 0x7C7D
+0x532C = 0x7C86
+0x532D = 0x7C87
+0x532E = 0x7C8F
+0x532F = 0x7C94
+0x5330 = 0x7C9E
+0x5331 = 0x7CA0
+0x5332 = 0x7CA6
+0x5333 = 0x7CB0
+0x5334 = 0x7CB6
+0x5335 = 0x7CB7
+0x5336 = 0x7CBA
+0x5337 = 0x7CBB
+0x5338 = 0x7CBC
+0x5339 = 0x7CBF
+0x533A = 0x7CC4
+0x533B = 0x7CC7
+0x533C = 0x7CC8
+0x533D = 0x7CC9
+0x533E = 0x7CCD
+0x533F = 0x7CCF
+0x5340 = 0x7CD3
+0x5341 = 0x7CD4
+0x5342 = 0x7CD5
+0x5343 = 0x7CD7
+0x5344 = 0x7CD9
+0x5345 = 0x7CDA
+0x5346 = 0x7CDD
+0x5347 = 0x7CE6
+0x5348 = 0x7CE9
+0x5349 = 0x7CEB
+0x534A = 0x7CF5
+0x534B = 0x7D03
+0x534C = 0x7D07
+0x534D = 0x7D08
+0x534E = 0x7D09
+0x534F = 0x7D0F
+0x5350 = 0x7D11
+0x5351 = 0x7D12
+0x5352 = 0x7D13
+0x5353 = 0x7D16
+0x5354 = 0x7D1D
+0x5355 = 0x7D1E
+0x5356 = 0x7D23
+0x5357 = 0x7D26
+0x5358 = 0x7D2A
+0x5359 = 0x7D2D
+0x535A = 0x7D31
+0x535B = 0x7D3C
+0x535C = 0x7D3D
+0x535D = 0x7D3E
+0x535E = 0x7D40
+0x535F = 0x7D41
+0x5360 = 0x7D47
+0x5361 = 0x7D48
+0x5362 = 0x7D4D
+0x5363 = 0x7D51
+0x5364 = 0x7D53
+0x5365 = 0x7D57
+0x5366 = 0x7D59
+0x5367 = 0x7D5A
+0x5368 = 0x7D5C
+0x5369 = 0x7D5D
+0x536A = 0x7D65
+0x536B = 0x7D67
+0x536C = 0x7D6A
+0x536D = 0x7D70
+0x536E = 0x7D78
+0x536F = 0x7D7A
+0x5370 = 0x7D7B
+0x5371 = 0x7D7F
+0x5372 = 0x7D81
+0x5373 = 0x7D82
+0x5374 = 0x7D83
+0x5375 = 0x7D85
+0x5376 = 0x7D86
+0x5377 = 0x7D88
+0x5378 = 0x7D8B
+0x5379 = 0x7D8C
+0x537A = 0x7D8D
+0x537B = 0x7D91
+0x537C = 0x7D96
+0x537D = 0x7D97
+0x537E = 0x7D9D
+0x5421 = 0x7D9E
+0x5422 = 0x7DA6
+0x5423 = 0x7DA7
+0x5424 = 0x7DAA
+0x5425 = 0x7DB3
+0x5426 = 0x7DB6
+0x5427 = 0x7DB7
+0x5428 = 0x7DB9
+0x5429 = 0x7DC2
+0x542A = 0x7DC3
+0x542B = 0x7DC4
+0x542C = 0x7DC5
+0x542D = 0x7DC6
+0x542E = 0x7DCC
+0x542F = 0x7DCD
+0x5430 = 0x7DCE
+0x5431 = 0x7DD7
+0x5432 = 0x7DD9
+0x5433 = 0x7E00
+0x5434 = 0x7DE2
+0x5435 = 0x7DE5
+0x5436 = 0x7DE6
+0x5437 = 0x7DEA
+0x5438 = 0x7DEB
+0x5439 = 0x7DED
+0x543A = 0x7DF1
+0x543B = 0x7DF5
+0x543C = 0x7DF6
+0x543D = 0x7DF9
+0x543E = 0x7DFA
+0x543F = 0x7E08
+0x5440 = 0x7E10
+0x5441 = 0x7E11
+0x5442 = 0x7E15
+0x5443 = 0x7E17
+0x5444 = 0x7E1C
+0x5445 = 0x7E1D
+0x5446 = 0x7E20
+0x5447 = 0x7E27
+0x5448 = 0x7E28
+0x5449 = 0x7E2C
+0x544A = 0x7E2D
+0x544B = 0x7E2F
+0x544C = 0x7E33
+0x544D = 0x7E36
+0x544E = 0x7E3F
+0x544F = 0x7E44
+0x5450 = 0x7E45
+0x5451 = 0x7E47
+0x5452 = 0x7E4E
+0x5453 = 0x7E50
+0x5454 = 0x7E52
+0x5455 = 0x7E58
+0x5456 = 0x7E5F
+0x5457 = 0x7E61
+0x5458 = 0x7E62
+0x5459 = 0x7E65
+0x545A = 0x7E6B
+0x545B = 0x7E6E
+0x545C = 0x7E6F
+0x545D = 0x7E73
+0x545E = 0x7E78
+0x545F = 0x7E7E
+0x5460 = 0x7E81
+0x5461 = 0x7E86
+0x5462 = 0x7E87
+0x5463 = 0x7E8A
+0x5464 = 0x7E8D
+0x5465 = 0x7E91
+0x5466 = 0x7E95
+0x5467 = 0x7E98
+0x5468 = 0x7E9A
+0x5469 = 0x7E9D
+0x546A = 0x7E9E
+0x546B = 0x7F3C
+0x546C = 0x7F3B
+0x546D = 0x7F3D
+0x546E = 0x7F3E
+0x546F = 0x7F3F
+0x5470 = 0x7F43
+0x5471 = 0x7F44
+0x5472 = 0x7F47
+0x5473 = 0x7F4F
+0x5474 = 0x7F52
+0x5475 = 0x7F53
+0x5476 = 0x7F5B
+0x5477 = 0x7F5C
+0x5478 = 0x7F5D
+0x5479 = 0x7F61
+0x547A = 0x7F63
+0x547B = 0x7F64
+0x547C = 0x7F65
+0x547D = 0x7F66
+0x547E = 0x7F6D
+0x5521 = 0x7F71
+0x5522 = 0x7F7D
+0x5523 = 0x7F7E
+0x5524 = 0x7F7F
+0x5525 = 0x7F80
+0x5526 = 0x7F8B
+0x5527 = 0x7F8D
+0x5528 = 0x7F8F
+0x5529 = 0x7F90
+0x552A = 0x7F91
+0x552B = 0x7F96
+0x552C = 0x7F97
+0x552D = 0x7F9C
+0x552E = 0x7FA1
+0x552F = 0x7FA2
+0x5530 = 0x7FA6
+0x5531 = 0x7FAA
+0x5532 = 0x7FAD
+0x5533 = 0x7FB4
+0x5534 = 0x7FBC
+0x5535 = 0x7FBF
+0x5536 = 0x7FC0
+0x5537 = 0x7FC3
+0x5538 = 0x7FC8
+0x5539 = 0x7FCE
+0x553A = 0x7FCF
+0x553B = 0x7FDB
+0x553C = 0x7FDF
+0x553D = 0x7FE3
+0x553E = 0x7FE5
+0x553F = 0x7FE8
+0x5540 = 0x7FEC
+0x5541 = 0x7FEE
+0x5542 = 0x7FEF
+0x5543 = 0x7FF2
+0x5544 = 0x7FFA
+0x5545 = 0x7FFD
+0x5546 = 0x7FFE
+0x5547 = 0x7FFF
+0x5548 = 0x8007
+0x5549 = 0x8008
+0x554A = 0x800A
+0x554B = 0x800D
+0x554C = 0x800E
+0x554D = 0x800F
+0x554E = 0x8011
+0x554F = 0x8013
+0x5550 = 0x8014
+0x5551 = 0x8016
+0x5552 = 0x801D
+0x5553 = 0x801E
+0x5554 = 0x801F
+0x5555 = 0x8020
+0x5556 = 0x8024
+0x5557 = 0x8026
+0x5558 = 0x802C
+0x5559 = 0x802E
+0x555A = 0x8030
+0x555B = 0x8034
+0x555C = 0x8035
+0x555D = 0x8037
+0x555E = 0x8039
+0x555F = 0x803A
+0x5560 = 0x803C
+0x5561 = 0x803E
+0x5562 = 0x8040
+0x5563 = 0x8044
+0x5564 = 0x8060
+0x5565 = 0x8064
+0x5566 = 0x8066
+0x5567 = 0x806D
+0x5568 = 0x8071
+0x5569 = 0x8075
+0x556A = 0x8081
+0x556B = 0x8088
+0x556C = 0x808E
+0x556D = 0x809C
+0x556E = 0x809E
+0x556F = 0x80A6
+0x5570 = 0x80A7
+0x5571 = 0x80AB
+0x5572 = 0x80B8
+0x5573 = 0x80B9
+0x5574 = 0x80C8
+0x5575 = 0x80CD
+0x5576 = 0x80CF
+0x5577 = 0x80D2
+0x5578 = 0x80D4
+0x5579 = 0x80D5
+0x557A = 0x80D7
+0x557B = 0x80D8
+0x557C = 0x80E0
+0x557D = 0x80ED
+0x557E = 0x80EE
+0x5621 = 0x80F0
+0x5622 = 0x80F2
+0x5623 = 0x80F3
+0x5624 = 0x80F6
+0x5625 = 0x80F9
+0x5626 = 0x80FA
+0x5627 = 0x80FE
+0x5628 = 0x8103
+0x5629 = 0x810B
+0x562A = 0x8116
+0x562B = 0x8117
+0x562C = 0x8118
+0x562D = 0x811C
+0x562E = 0x811E
+0x562F = 0x8120
+0x5630 = 0x8124
+0x5631 = 0x8127
+0x5632 = 0x812C
+0x5633 = 0x8130
+0x5634 = 0x8135
+0x5635 = 0x813A
+0x5636 = 0x813C
+0x5637 = 0x8145
+0x5638 = 0x8147
+0x5639 = 0x814A
+0x563A = 0x814C
+0x563B = 0x8152
+0x563C = 0x8157
+0x563D = 0x8160
+0x563E = 0x8161
+0x563F = 0x8167
+0x5640 = 0x8168
+0x5641 = 0x8169
+0x5642 = 0x816D
+0x5643 = 0x816F
+0x5644 = 0x8177
+0x5645 = 0x8181
+0x5646 = 0x8190
+0x5647 = 0x8184
+0x5648 = 0x8185
+0x5649 = 0x8186
+0x564A = 0x818B
+0x564B = 0x818E
+0x564C = 0x8196
+0x564D = 0x8198
+0x564E = 0x819B
+0x564F = 0x819E
+0x5650 = 0x81A2
+0x5651 = 0x81AE
+0x5652 = 0x81B2
+0x5653 = 0x81B4
+0x5654 = 0x81BB
+0x5655 = 0x81CB
+0x5656 = 0x81C3
+0x5657 = 0x81C5
+0x5658 = 0x81CA
+0x5659 = 0x81CE
+0x565A = 0x81CF
+0x565B = 0x81D5
+0x565C = 0x81D7
+0x565D = 0x81DB
+0x565E = 0x81DD
+0x565F = 0x81DE
+0x5660 = 0x81E1
+0x5661 = 0x81E4
+0x5662 = 0x81EB
+0x5663 = 0x81EC
+0x5664 = 0x81F0
+0x5665 = 0x81F1
+0x5666 = 0x81F2
+0x5667 = 0x81F5
+0x5668 = 0x81F6
+0x5669 = 0x81F8
+0x566A = 0x81F9
+0x566B = 0x81FD
+0x566C = 0x81FF
+0x566D = 0x8200
+0x566E = 0x8203
+0x566F = 0x820F
+0x5670 = 0x8213
+0x5671 = 0x8214
+0x5672 = 0x8219
+0x5673 = 0x821A
+0x5674 = 0x821D
+0x5675 = 0x8221
+0x5676 = 0x8222
+0x5677 = 0x8228
+0x5678 = 0x8232
+0x5679 = 0x8234
+0x567A = 0x823A
+0x567B = 0x8243
+0x567C = 0x8244
+0x567D = 0x8245
+0x567E = 0x8246
+0x5721 = 0x824B
+0x5722 = 0x824E
+0x5723 = 0x824F
+0x5724 = 0x8251
+0x5725 = 0x8256
+0x5726 = 0x825C
+0x5727 = 0x8260
+0x5728 = 0x8263
+0x5729 = 0x8267
+0x572A = 0x826D
+0x572B = 0x8274
+0x572C = 0x827B
+0x572D = 0x827D
+0x572E = 0x827F
+0x572F = 0x8280
+0x5730 = 0x8281
+0x5731 = 0x8283
+0x5732 = 0x8284
+0x5733 = 0x8287
+0x5734 = 0x8289
+0x5735 = 0x828A
+0x5736 = 0x828E
+0x5737 = 0x8291
+0x5738 = 0x8294
+0x5739 = 0x8296
+0x573A = 0x8298
+0x573B = 0x829A
+0x573C = 0x829B
+0x573D = 0x82A0
+0x573E = 0x82A1
+0x573F = 0x82A3
+0x5740 = 0x82A4
+0x5741 = 0x82A7
+0x5742 = 0x82A8
+0x5743 = 0x82A9
+0x5744 = 0x82AA
+0x5745 = 0x82AE
+0x5746 = 0x82B0
+0x5747 = 0x82B2
+0x5748 = 0x82B4
+0x5749 = 0x82B7
+0x574A = 0x82BA
+0x574B = 0x82BC
+0x574C = 0x82BE
+0x574D = 0x82BF
+0x574E = 0x82C6
+0x574F = 0x82D0
+0x5750 = 0x82D5
+0x5751 = 0x82DA
+0x5752 = 0x82E0
+0x5753 = 0x82E2
+0x5754 = 0x82E4
+0x5755 = 0x82E8
+0x5756 = 0x82EA
+0x5757 = 0x82ED
+0x5758 = 0x82EF
+0x5759 = 0x82F6
+0x575A = 0x82F7
+0x575B = 0x82FD
+0x575C = 0x82FE
+0x575D = 0x8300
+0x575E = 0x8301
+0x575F = 0x8307
+0x5760 = 0x8308
+0x5761 = 0x830A
+0x5762 = 0x830B
+0x5763 = 0x8354
+0x5764 = 0x831B
+0x5765 = 0x831D
+0x5766 = 0x831E
+0x5767 = 0x831F
+0x5768 = 0x8321
+0x5769 = 0x8322
+0x576A = 0x832C
+0x576B = 0x832D
+0x576C = 0x832E
+0x576D = 0x8330
+0x576E = 0x8333
+0x576F = 0x8337
+0x5770 = 0x833A
+0x5771 = 0x833C
+0x5772 = 0x833D
+0x5773 = 0x8342
+0x5774 = 0x8343
+0x5775 = 0x8344
+0x5776 = 0x8347
+0x5777 = 0x834D
+0x5778 = 0x834E
+0x5779 = 0x8351
+0x577A = 0x8355
+0x577B = 0x8356
+0x577C = 0x8357
+0x577D = 0x8370
+0x577E = 0x8378
+0x5821 = 0x837D
+0x5822 = 0x837F
+0x5823 = 0x8380
+0x5824 = 0x8382
+0x5825 = 0x8384
+0x5826 = 0x8386
+0x5827 = 0x838D
+0x5828 = 0x8392
+0x5829 = 0x8394
+0x582A = 0x8395
+0x582B = 0x8398
+0x582C = 0x8399
+0x582D = 0x839B
+0x582E = 0x839C
+0x582F = 0x839D
+0x5830 = 0x83A6
+0x5831 = 0x83A7
+0x5832 = 0x83A9
+0x5833 = 0x83AC
+0x5834 = 0x83BE
+0x5835 = 0x83BF
+0x5836 = 0x83C0
+0x5837 = 0x83C7
+0x5838 = 0x83C9
+0x5839 = 0x83CF
+0x583A = 0x83D0
+0x583B = 0x83D1
+0x583C = 0x83D4
+0x583D = 0x83DD
+0x583E = 0x8353
+0x583F = 0x83E8
+0x5840 = 0x83EA
+0x5841 = 0x83F6
+0x5842 = 0x83F8
+0x5843 = 0x83F9
+0x5844 = 0x83FC
+0x5845 = 0x8401
+0x5846 = 0x8406
+0x5847 = 0x840A
+0x5848 = 0x840F
+0x5849 = 0x8411
+0x584A = 0x8415
+0x584B = 0x8419
+0x584C = 0x83AD
+0x584D = 0x842F
+0x584E = 0x8439
+0x584F = 0x8445
+0x5850 = 0x8447
+0x5851 = 0x8448
+0x5852 = 0x844A
+0x5853 = 0x844D
+0x5854 = 0x844F
+0x5855 = 0x8451
+0x5856 = 0x8452
+0x5857 = 0x8456
+0x5858 = 0x8458
+0x5859 = 0x8459
+0x585A = 0x845A
+0x585B = 0x845C
+0x585C = 0x8460
+0x585D = 0x8464
+0x585E = 0x8465
+0x585F = 0x8467
+0x5860 = 0x846A
+0x5861 = 0x8470
+0x5862 = 0x8473
+0x5863 = 0x8474
+0x5864 = 0x8476
+0x5865 = 0x8478
+0x5866 = 0x847C
+0x5867 = 0x847D
+0x5868 = 0x8481
+0x5869 = 0x8485
+0x586A = 0x8492
+0x586B = 0x8493
+0x586C = 0x8495
+0x586D = 0x849E
+0x586E = 0x84A6
+0x586F = 0x84A8
+0x5870 = 0x84A9
+0x5871 = 0x84AA
+0x5872 = 0x84AF
+0x5873 = 0x84B1
+0x5874 = 0x84B4
+0x5875 = 0x84BA
+0x5876 = 0x84BD
+0x5877 = 0x84BE
+0x5878 = 0x84C0
+0x5879 = 0x84C2
+0x587A = 0x84C7
+0x587B = 0x84C8
+0x587C = 0x84CC
+0x587D = 0x84CF
+0x587E = 0x84D3
+0x5921 = 0x84DC
+0x5922 = 0x84E7
+0x5923 = 0x84EA
+0x5924 = 0x84EF
+0x5925 = 0x84F0
+0x5926 = 0x84F1
+0x5927 = 0x84F2
+0x5928 = 0x84F7
+0x5929 = 0x8532
+0x592A = 0x84FA
+0x592B = 0x84FB
+0x592C = 0x84FD
+0x592D = 0x8502
+0x592E = 0x8503
+0x592F = 0x8507
+0x5930 = 0x850C
+0x5931 = 0x850E
+0x5932 = 0x8510
+0x5933 = 0x851C
+0x5934 = 0x851E
+0x5935 = 0x8522
+0x5936 = 0x8523
+0x5937 = 0x8524
+0x5938 = 0x8525
+0x5939 = 0x8527
+0x593A = 0x852A
+0x593B = 0x852B
+0x593C = 0x852F
+0x593D = 0x8533
+0x593E = 0x8534
+0x593F = 0x8536
+0x5940 = 0x853F
+0x5941 = 0x8546
+0x5942 = 0x854F
+0x5943 = 0x8550
+0x5944 = 0x8551
+0x5945 = 0x8552
+0x5946 = 0x8553
+0x5947 = 0x8556
+0x5948 = 0x8559
+0x5949 = 0x855C
+0x594A = 0x855D
+0x594B = 0x855E
+0x594C = 0x855F
+0x594D = 0x8560
+0x594E = 0x8561
+0x594F = 0x8562
+0x5950 = 0x8564
+0x5951 = 0x856B
+0x5952 = 0x856F
+0x5953 = 0x8579
+0x5954 = 0x857A
+0x5955 = 0x857B
+0x5956 = 0x857D
+0x5957 = 0x857F
+0x5958 = 0x8581
+0x5959 = 0x8585
+0x595A = 0x8586
+0x595B = 0x8589
+0x595C = 0x858B
+0x595D = 0x858C
+0x595E = 0x858F
+0x595F = 0x8593
+0x5960 = 0x8598
+0x5961 = 0x859D
+0x5962 = 0x859F
+0x5963 = 0x85A0
+0x5964 = 0x85A2
+0x5965 = 0x85A5
+0x5966 = 0x85A7
+0x5967 = 0x85B4
+0x5968 = 0x85B6
+0x5969 = 0x85B7
+0x596A = 0x85B8
+0x596B = 0x85BC
+0x596C = 0x85BD
+0x596D = 0x85BE
+0x596E = 0x85BF
+0x596F = 0x85C2
+0x5970 = 0x85C7
+0x5971 = 0x85CA
+0x5972 = 0x85CB
+0x5973 = 0x85CE
+0x5974 = 0x85AD
+0x5975 = 0x85D8
+0x5976 = 0x85DA
+0x5977 = 0x85DF
+0x5978 = 0x85E0
+0x5979 = 0x85E6
+0x597A = 0x85E8
+0x597B = 0x85ED
+0x597C = 0x85F3
+0x597D = 0x85F6
+0x597E = 0x85FC
+0x5A21 = 0x85FF
+0x5A22 = 0x8600
+0x5A23 = 0x8604
+0x5A24 = 0x8605
+0x5A25 = 0x860D
+0x5A26 = 0x860E
+0x5A27 = 0x8610
+0x5A28 = 0x8611
+0x5A29 = 0x8612
+0x5A2A = 0x8618
+0x5A2B = 0x8619
+0x5A2C = 0x861B
+0x5A2D = 0x861E
+0x5A2E = 0x8621
+0x5A2F = 0x8627
+0x5A30 = 0x8629
+0x5A31 = 0x8636
+0x5A32 = 0x8638
+0x5A33 = 0x863A
+0x5A34 = 0x863C
+0x5A35 = 0x863D
+0x5A36 = 0x8640
+0x5A37 = 0x8642
+0x5A38 = 0x8646
+0x5A39 = 0x8652
+0x5A3A = 0x8653
+0x5A3B = 0x8656
+0x5A3C = 0x8657
+0x5A3D = 0x8658
+0x5A3E = 0x8659
+0x5A3F = 0x865D
+0x5A40 = 0x8660
+0x5A41 = 0x8661
+0x5A42 = 0x8662
+0x5A43 = 0x8663
+0x5A44 = 0x8664
+0x5A45 = 0x8669
+0x5A46 = 0x866C
+0x5A47 = 0x866F
+0x5A48 = 0x8675
+0x5A49 = 0x8676
+0x5A4A = 0x8677
+0x5A4B = 0x867A
+0x5A4C = 0x868D
+0x5A4D = 0x8691
+0x5A4E = 0x8696
+0x5A4F = 0x8698
+0x5A50 = 0x869A
+0x5A51 = 0x869C
+0x5A52 = 0x86A1
+0x5A53 = 0x86A6
+0x5A54 = 0x86A7
+0x5A55 = 0x86A8
+0x5A56 = 0x86AD
+0x5A57 = 0x86B1
+0x5A58 = 0x86B3
+0x5A59 = 0x86B4
+0x5A5A = 0x86B5
+0x5A5B = 0x86B7
+0x5A5C = 0x86B8
+0x5A5D = 0x86B9
+0x5A5E = 0x86BF
+0x5A5F = 0x86C0
+0x5A60 = 0x86C1
+0x5A61 = 0x86C3
+0x5A62 = 0x86C5
+0x5A63 = 0x86D1
+0x5A64 = 0x86D2
+0x5A65 = 0x86D5
+0x5A66 = 0x86D7
+0x5A67 = 0x86DA
+0x5A68 = 0x86DC
+0x5A69 = 0x86E0
+0x5A6A = 0x86E3
+0x5A6B = 0x86E5
+0x5A6C = 0x86E7
+0x5A6D = 0x8688
+0x5A6E = 0x86FA
+0x5A6F = 0x86FC
+0x5A70 = 0x86FD
+0x5A71 = 0x8704
+0x5A72 = 0x8705
+0x5A73 = 0x8707
+0x5A74 = 0x870B
+0x5A75 = 0x870E
+0x5A76 = 0x870F
+0x5A77 = 0x8710
+0x5A78 = 0x8713
+0x5A79 = 0x8714
+0x5A7A = 0x8719
+0x5A7B = 0x871E
+0x5A7C = 0x871F
+0x5A7D = 0x8721
+0x5A7E = 0x8723
+0x5B21 = 0x8728
+0x5B22 = 0x872E
+0x5B23 = 0x872F
+0x5B24 = 0x8731
+0x5B25 = 0x8732
+0x5B26 = 0x8739
+0x5B27 = 0x873A
+0x5B28 = 0x873C
+0x5B29 = 0x873D
+0x5B2A = 0x873E
+0x5B2B = 0x8740
+0x5B2C = 0x8743
+0x5B2D = 0x8745
+0x5B2E = 0x874D
+0x5B2F = 0x8758
+0x5B30 = 0x875D
+0x5B31 = 0x8761
+0x5B32 = 0x8764
+0x5B33 = 0x8765
+0x5B34 = 0x876F
+0x5B35 = 0x8771
+0x5B36 = 0x8772
+0x5B37 = 0x877B
+0x5B38 = 0x8783
+0x5B39 = 0x8784
+0x5B3A = 0x8785
+0x5B3B = 0x8786
+0x5B3C = 0x8787
+0x5B3D = 0x8788
+0x5B3E = 0x8789
+0x5B3F = 0x878B
+0x5B40 = 0x878C
+0x5B41 = 0x8790
+0x5B42 = 0x8793
+0x5B43 = 0x8795
+0x5B44 = 0x8797
+0x5B45 = 0x8798
+0x5B46 = 0x8799
+0x5B47 = 0x879E
+0x5B48 = 0x87A0
+0x5B49 = 0x87A3
+0x5B4A = 0x87A7
+0x5B4B = 0x87AC
+0x5B4C = 0x87AD
+0x5B4D = 0x87AE
+0x5B4E = 0x87B1
+0x5B4F = 0x87B5
+0x5B50 = 0x87BE
+0x5B51 = 0x87BF
+0x5B52 = 0x87C1
+0x5B53 = 0x87C8
+0x5B54 = 0x87C9
+0x5B55 = 0x87CA
+0x5B56 = 0x87CE
+0x5B57 = 0x87D5
+0x5B58 = 0x87D6
+0x5B59 = 0x87D9
+0x5B5A = 0x87DA
+0x5B5B = 0x87DC
+0x5B5C = 0x87DF
+0x5B5D = 0x87E2
+0x5B5E = 0x87E3
+0x5B5F = 0x87E4
+0x5B60 = 0x87EA
+0x5B61 = 0x87EB
+0x5B62 = 0x87ED
+0x5B63 = 0x87F1
+0x5B64 = 0x87F3
+0x5B65 = 0x87F8
+0x5B66 = 0x87FA
+0x5B67 = 0x87FF
+0x5B68 = 0x8801
+0x5B69 = 0x8803
+0x5B6A = 0x8806
+0x5B6B = 0x8809
+0x5B6C = 0x880A
+0x5B6D = 0x880B
+0x5B6E = 0x8810
+0x5B6F = 0x8819
+0x5B70 = 0x8812
+0x5B71 = 0x8813
+0x5B72 = 0x8814
+0x5B73 = 0x8818
+0x5B74 = 0x881A
+0x5B75 = 0x881B
+0x5B76 = 0x881C
+0x5B77 = 0x881E
+0x5B78 = 0x881F
+0x5B79 = 0x8828
+0x5B7A = 0x882D
+0x5B7B = 0x882E
+0x5B7C = 0x8830
+0x5B7D = 0x8832
+0x5B7E = 0x8835
+0x5C21 = 0x883A
+0x5C22 = 0x883C
+0x5C23 = 0x8841
+0x5C24 = 0x8843
+0x5C25 = 0x8845
+0x5C26 = 0x8848
+0x5C27 = 0x8849
+0x5C28 = 0x884A
+0x5C29 = 0x884B
+0x5C2A = 0x884E
+0x5C2B = 0x8851
+0x5C2C = 0x8855
+0x5C2D = 0x8856
+0x5C2E = 0x8858
+0x5C2F = 0x885A
+0x5C30 = 0x885C
+0x5C31 = 0x885F
+0x5C32 = 0x8860
+0x5C33 = 0x8864
+0x5C34 = 0x8869
+0x5C35 = 0x8871
+0x5C36 = 0x8879
+0x5C37 = 0x887B
+0x5C38 = 0x8880
+0x5C39 = 0x8898
+0x5C3A = 0x889A
+0x5C3B = 0x889B
+0x5C3C = 0x889C
+0x5C3D = 0x889F
+0x5C3E = 0x88A0
+0x5C3F = 0x88A8
+0x5C40 = 0x88AA
+0x5C41 = 0x88BA
+0x5C42 = 0x88BD
+0x5C43 = 0x88BE
+0x5C44 = 0x88C0
+0x5C45 = 0x88CA
+0x5C46 = 0x88CB
+0x5C47 = 0x88CC
+0x5C48 = 0x88CD
+0x5C49 = 0x88CE
+0x5C4A = 0x88D1
+0x5C4B = 0x88D2
+0x5C4C = 0x88D3
+0x5C4D = 0x88DB
+0x5C4E = 0x88DE
+0x5C4F = 0x88E7
+0x5C50 = 0x88EF
+0x5C51 = 0x88F0
+0x5C52 = 0x88F1
+0x5C53 = 0x88F5
+0x5C54 = 0x88F7
+0x5C55 = 0x8901
+0x5C56 = 0x8906
+0x5C57 = 0x890D
+0x5C58 = 0x890E
+0x5C59 = 0x890F
+0x5C5A = 0x8915
+0x5C5B = 0x8916
+0x5C5C = 0x8918
+0x5C5D = 0x8919
+0x5C5E = 0x891A
+0x5C5F = 0x891C
+0x5C60 = 0x8920
+0x5C61 = 0x8926
+0x5C62 = 0x8927
+0x5C63 = 0x8928
+0x5C64 = 0x8930
+0x5C65 = 0x8931
+0x5C66 = 0x8932
+0x5C67 = 0x8935
+0x5C68 = 0x8939
+0x5C69 = 0x893A
+0x5C6A = 0x893E
+0x5C6B = 0x8940
+0x5C6C = 0x8942
+0x5C6D = 0x8945
+0x5C6E = 0x8946
+0x5C6F = 0x8949
+0x5C70 = 0x894F
+0x5C71 = 0x8952
+0x5C72 = 0x8957
+0x5C73 = 0x895A
+0x5C74 = 0x895B
+0x5C75 = 0x895C
+0x5C76 = 0x8961
+0x5C77 = 0x8962
+0x5C78 = 0x8963
+0x5C79 = 0x896B
+0x5C7A = 0x896E
+0x5C7B = 0x8970
+0x5C7C = 0x8973
+0x5C7D = 0x8975
+0x5C7E = 0x897A
+0x5D21 = 0x897B
+0x5D22 = 0x897C
+0x5D23 = 0x897D
+0x5D24 = 0x8989
+0x5D25 = 0x898D
+0x5D26 = 0x8990
+0x5D27 = 0x8994
+0x5D28 = 0x8995
+0x5D29 = 0x899B
+0x5D2A = 0x899C
+0x5D2B = 0x899F
+0x5D2C = 0x89A0
+0x5D2D = 0x89A5
+0x5D2E = 0x89B0
+0x5D2F = 0x89B4
+0x5D30 = 0x89B5
+0x5D31 = 0x89B6
+0x5D32 = 0x89B7
+0x5D33 = 0x89BC
+0x5D34 = 0x89D4
+0x5D35 = 0x89D5
+0x5D36 = 0x89D6
+0x5D37 = 0x89D7
+0x5D38 = 0x89D8
+0x5D39 = 0x89E5
+0x5D3A = 0x89E9
+0x5D3B = 0x89EB
+0x5D3C = 0x89ED
+0x5D3D = 0x89F1
+0x5D3E = 0x89F3
+0x5D3F = 0x89F6
+0x5D40 = 0x89F9
+0x5D41 = 0x89FD
+0x5D42 = 0x89FF
+0x5D43 = 0x8A04
+0x5D44 = 0x8A05
+0x5D45 = 0x8A07
+0x5D46 = 0x8A0F
+0x5D47 = 0x8A11
+0x5D48 = 0x8A12
+0x5D49 = 0x8A14
+0x5D4A = 0x8A15
+0x5D4B = 0x8A1E
+0x5D4C = 0x8A20
+0x5D4D = 0x8A22
+0x5D4E = 0x8A24
+0x5D4F = 0x8A26
+0x5D50 = 0x8A2B
+0x5D51 = 0x8A2C
+0x5D52 = 0x8A2F
+0x5D53 = 0x8A35
+0x5D54 = 0x8A37
+0x5D55 = 0x8A3D
+0x5D56 = 0x8A3E
+0x5D57 = 0x8A40
+0x5D58 = 0x8A43
+0x5D59 = 0x8A45
+0x5D5A = 0x8A47
+0x5D5B = 0x8A49
+0x5D5C = 0x8A4D
+0x5D5D = 0x8A4E
+0x5D5E = 0x8A53
+0x5D5F = 0x8A56
+0x5D60 = 0x8A57
+0x5D61 = 0x8A58
+0x5D62 = 0x8A5C
+0x5D63 = 0x8A5D
+0x5D64 = 0x8A61
+0x5D65 = 0x8A65
+0x5D66 = 0x8A67
+0x5D67 = 0x8A75
+0x5D68 = 0x8A76
+0x5D69 = 0x8A77
+0x5D6A = 0x8A79
+0x5D6B = 0x8A7A
+0x5D6C = 0x8A7B
+0x5D6D = 0x8A7E
+0x5D6E = 0x8A7F
+0x5D6F = 0x8A80
+0x5D70 = 0x8A83
+0x5D71 = 0x8A86
+0x5D72 = 0x8A8B
+0x5D73 = 0x8A8F
+0x5D74 = 0x8A90
+0x5D75 = 0x8A92
+0x5D76 = 0x8A96
+0x5D77 = 0x8A97
+0x5D78 = 0x8A99
+0x5D79 = 0x8A9F
+0x5D7A = 0x8AA7
+0x5D7B = 0x8AA9
+0x5D7C = 0x8AAE
+0x5D7D = 0x8AAF
+0x5D7E = 0x8AB3
+0x5E21 = 0x8AB6
+0x5E22 = 0x8AB7
+0x5E23 = 0x8ABB
+0x5E24 = 0x8ABE
+0x5E25 = 0x8AC3
+0x5E26 = 0x8AC6
+0x5E27 = 0x8AC8
+0x5E28 = 0x8AC9
+0x5E29 = 0x8ACA
+0x5E2A = 0x8AD1
+0x5E2B = 0x8AD3
+0x5E2C = 0x8AD4
+0x5E2D = 0x8AD5
+0x5E2E = 0x8AD7
+0x5E2F = 0x8ADD
+0x5E30 = 0x8ADF
+0x5E31 = 0x8AEC
+0x5E32 = 0x8AF0
+0x5E33 = 0x8AF4
+0x5E34 = 0x8AF5
+0x5E35 = 0x8AF6
+0x5E36 = 0x8AFC
+0x5E37 = 0x8AFF
+0x5E38 = 0x8B05
+0x5E39 = 0x8B06
+0x5E3A = 0x8B0B
+0x5E3B = 0x8B11
+0x5E3C = 0x8B1C
+0x5E3D = 0x8B1E
+0x5E3E = 0x8B1F
+0x5E3F = 0x8B0A
+0x5E40 = 0x8B2D
+0x5E41 = 0x8B30
+0x5E42 = 0x8B37
+0x5E43 = 0x8B3C
+0x5E44 = 0x8B42
+0x5E45 = 0x8B43
+0x5E46 = 0x8B44
+0x5E47 = 0x8B45
+0x5E48 = 0x8B46
+0x5E49 = 0x8B48
+0x5E4A = 0x8B52
+0x5E4B = 0x8B53
+0x5E4C = 0x8B54
+0x5E4D = 0x8B59
+0x5E4E = 0x8B4D
+0x5E4F = 0x8B5E
+0x5E50 = 0x8B63
+0x5E51 = 0x8B6D
+0x5E52 = 0x8B76
+0x5E53 = 0x8B78
+0x5E54 = 0x8B79
+0x5E55 = 0x8B7C
+0x5E56 = 0x8B7E
+0x5E57 = 0x8B81
+0x5E58 = 0x8B84
+0x5E59 = 0x8B85
+0x5E5A = 0x8B8B
+0x5E5B = 0x8B8D
+0x5E5C = 0x8B8F
+0x5E5D = 0x8B94
+0x5E5E = 0x8B95
+0x5E5F = 0x8B9C
+0x5E60 = 0x8B9E
+0x5E61 = 0x8B9F
+0x5E62 = 0x8C38
+0x5E63 = 0x8C39
+0x5E64 = 0x8C3D
+0x5E65 = 0x8C3E
+0x5E66 = 0x8C45
+0x5E67 = 0x8C47
+0x5E68 = 0x8C49
+0x5E69 = 0x8C4B
+0x5E6A = 0x8C4F
+0x5E6B = 0x8C51
+0x5E6C = 0x8C53
+0x5E6D = 0x8C54
+0x5E6E = 0x8C57
+0x5E6F = 0x8C58
+0x5E70 = 0x8C5B
+0x5E71 = 0x8C5D
+0x5E72 = 0x8C59
+0x5E73 = 0x8C63
+0x5E74 = 0x8C64
+0x5E75 = 0x8C66
+0x5E76 = 0x8C68
+0x5E77 = 0x8C69
+0x5E78 = 0x8C6D
+0x5E79 = 0x8C73
+0x5E7A = 0x8C75
+0x5E7B = 0x8C76
+0x5E7C = 0x8C7B
+0x5E7D = 0x8C7E
+0x5E7E = 0x8C86
+0x5F21 = 0x8C87
+0x5F22 = 0x8C8B
+0x5F23 = 0x8C90
+0x5F24 = 0x8C92
+0x5F25 = 0x8C93
+0x5F26 = 0x8C99
+0x5F27 = 0x8C9B
+0x5F28 = 0x8C9C
+0x5F29 = 0x8CA4
+0x5F2A = 0x8CB9
+0x5F2B = 0x8CBA
+0x5F2C = 0x8CC5
+0x5F2D = 0x8CC6
+0x5F2E = 0x8CC9
+0x5F2F = 0x8CCB
+0x5F30 = 0x8CCF
+0x5F31 = 0x8CD6
+0x5F32 = 0x8CD5
+0x5F33 = 0x8CD9
+0x5F34 = 0x8CDD
+0x5F35 = 0x8CE1
+0x5F36 = 0x8CE8
+0x5F37 = 0x8CEC
+0x5F38 = 0x8CEF
+0x5F39 = 0x8CF0
+0x5F3A = 0x8CF2
+0x5F3B = 0x8CF5
+0x5F3C = 0x8CF7
+0x5F3D = 0x8CF8
+0x5F3E = 0x8CFE
+0x5F3F = 0x8CFF
+0x5F40 = 0x8D01
+0x5F41 = 0x8D03
+0x5F42 = 0x8D09
+0x5F43 = 0x8D12
+0x5F44 = 0x8D17
+0x5F45 = 0x8D1B
+0x5F46 = 0x8D65
+0x5F47 = 0x8D69
+0x5F48 = 0x8D6C
+0x5F49 = 0x8D6E
+0x5F4A = 0x8D7F
+0x5F4B = 0x8D82
+0x5F4C = 0x8D84
+0x5F4D = 0x8D88
+0x5F4E = 0x8D8D
+0x5F4F = 0x8D90
+0x5F50 = 0x8D91
+0x5F51 = 0x8D95
+0x5F52 = 0x8D9E
+0x5F53 = 0x8D9F
+0x5F54 = 0x8DA0
+0x5F55 = 0x8DA6
+0x5F56 = 0x8DAB
+0x5F57 = 0x8DAC
+0x5F58 = 0x8DAF
+0x5F59 = 0x8DB2
+0x5F5A = 0x8DB5
+0x5F5B = 0x8DB7
+0x5F5C = 0x8DB9
+0x5F5D = 0x8DBB
+0x5F5E = 0x8DC0
+0x5F5F = 0x8DC5
+0x5F60 = 0x8DC6
+0x5F61 = 0x8DC7
+0x5F62 = 0x8DC8
+0x5F63 = 0x8DCA
+0x5F64 = 0x8DCE
+0x5F65 = 0x8DD1
+0x5F66 = 0x8DD4
+0x5F67 = 0x8DD5
+0x5F68 = 0x8DD7
+0x5F69 = 0x8DD9
+0x5F6A = 0x8DE4
+0x5F6B = 0x8DE5
+0x5F6C = 0x8DE7
+0x5F6D = 0x8DEC
+0x5F6E = 0x8DF0
+0x5F6F = 0x8DBC
+0x5F70 = 0x8DF1
+0x5F71 = 0x8DF2
+0x5F72 = 0x8DF4
+0x5F73 = 0x8DFD
+0x5F74 = 0x8E01
+0x5F75 = 0x8E04
+0x5F76 = 0x8E05
+0x5F77 = 0x8E06
+0x5F78 = 0x8E0B
+0x5F79 = 0x8E11
+0x5F7A = 0x8E14
+0x5F7B = 0x8E16
+0x5F7C = 0x8E20
+0x5F7D = 0x8E21
+0x5F7E = 0x8E22
+0x6021 = 0x8E23
+0x6022 = 0x8E26
+0x6023 = 0x8E27
+0x6024 = 0x8E31
+0x6025 = 0x8E33
+0x6026 = 0x8E36
+0x6027 = 0x8E37
+0x6028 = 0x8E38
+0x6029 = 0x8E39
+0x602A = 0x8E3D
+0x602B = 0x8E40
+0x602C = 0x8E41
+0x602D = 0x8E4B
+0x602E = 0x8E4D
+0x602F = 0x8E4E
+0x6030 = 0x8E4F
+0x6031 = 0x8E54
+0x6032 = 0x8E5B
+0x6033 = 0x8E5C
+0x6034 = 0x8E5D
+0x6035 = 0x8E5E
+0x6036 = 0x8E61
+0x6037 = 0x8E62
+0x6038 = 0x8E69
+0x6039 = 0x8E6C
+0x603A = 0x8E6D
+0x603B = 0x8E6F
+0x603C = 0x8E70
+0x603D = 0x8E71
+0x603E = 0x8E79
+0x603F = 0x8E7A
+0x6040 = 0x8E7B
+0x6041 = 0x8E82
+0x6042 = 0x8E83
+0x6043 = 0x8E89
+0x6044 = 0x8E90
+0x6045 = 0x8E92
+0x6046 = 0x8E95
+0x6047 = 0x8E9A
+0x6048 = 0x8E9B
+0x6049 = 0x8E9D
+0x604A = 0x8E9E
+0x604B = 0x8EA2
+0x604C = 0x8EA7
+0x604D = 0x8EA9
+0x604E = 0x8EAD
+0x604F = 0x8EAE
+0x6050 = 0x8EB3
+0x6051 = 0x8EB5
+0x6052 = 0x8EBA
+0x6053 = 0x8EBB
+0x6054 = 0x8EC0
+0x6055 = 0x8EC1
+0x6056 = 0x8EC3
+0x6057 = 0x8EC4
+0x6058 = 0x8EC7
+0x6059 = 0x8ECF
+0x605A = 0x8ED1
+0x605B = 0x8ED4
+0x605C = 0x8EDC
+0x605D = 0x8EE8
+0x605E = 0x8EEE
+0x605F = 0x8EF0
+0x6060 = 0x8EF1
+0x6061 = 0x8EF7
+0x6062 = 0x8EF9
+0x6063 = 0x8EFA
+0x6064 = 0x8EED
+0x6065 = 0x8F00
+0x6066 = 0x8F02
+0x6067 = 0x8F07
+0x6068 = 0x8F08
+0x6069 = 0x8F0F
+0x606A = 0x8F10
+0x606B = 0x8F16
+0x606C = 0x8F17
+0x606D = 0x8F18
+0x606E = 0x8F1E
+0x606F = 0x8F20
+0x6070 = 0x8F21
+0x6071 = 0x8F23
+0x6072 = 0x8F25
+0x6073 = 0x8F27
+0x6074 = 0x8F28
+0x6075 = 0x8F2C
+0x6076 = 0x8F2D
+0x6077 = 0x8F2E
+0x6078 = 0x8F34
+0x6079 = 0x8F35
+0x607A = 0x8F36
+0x607B = 0x8F37
+0x607C = 0x8F3A
+0x607D = 0x8F40
+0x607E = 0x8F41
+0x6121 = 0x8F43
+0x6122 = 0x8F47
+0x6123 = 0x8F4F
+0x6124 = 0x8F51
+0x6125 = 0x8F52
+0x6126 = 0x8F53
+0x6127 = 0x8F54
+0x6128 = 0x8F55
+0x6129 = 0x8F58
+0x612A = 0x8F5D
+0x612B = 0x8F5E
+0x612C = 0x8F65
+0x612D = 0x8F9D
+0x612E = 0x8FA0
+0x612F = 0x8FA1
+0x6130 = 0x8FA4
+0x6131 = 0x8FA5
+0x6132 = 0x8FA6
+0x6133 = 0x8FB5
+0x6134 = 0x8FB6
+0x6135 = 0x8FB8
+0x6136 = 0x8FBE
+0x6137 = 0x8FC0
+0x6138 = 0x8FC1
+0x6139 = 0x8FC6
+0x613A = 0x8FCA
+0x613B = 0x8FCB
+0x613C = 0x8FCD
+0x613D = 0x8FD0
+0x613E = 0x8FD2
+0x613F = 0x8FD3
+0x6140 = 0x8FD5
+0x6141 = 0x8FE0
+0x6142 = 0x8FE3
+0x6143 = 0x8FE4
+0x6144 = 0x8FE8
+0x6145 = 0x8FEE
+0x6146 = 0x8FF1
+0x6147 = 0x8FF5
+0x6148 = 0x8FF6
+0x6149 = 0x8FFB
+0x614A = 0x8FFE
+0x614B = 0x9002
+0x614C = 0x9004
+0x614D = 0x9008
+0x614E = 0x900C
+0x614F = 0x9018
+0x6150 = 0x901B
+0x6151 = 0x9028
+0x6152 = 0x9029
+0x6153 = 0x902F
+0x6154 = 0x902A
+0x6155 = 0x902C
+0x6156 = 0x902D
+0x6157 = 0x9033
+0x6158 = 0x9034
+0x6159 = 0x9037
+0x615A = 0x903F
+0x615B = 0x9043
+0x615C = 0x9044
+0x615D = 0x904C
+0x615E = 0x905B
+0x615F = 0x905D
+0x6160 = 0x9062
+0x6161 = 0x9066
+0x6162 = 0x9067
+0x6163 = 0x906C
+0x6164 = 0x9070
+0x6165 = 0x9074
+0x6166 = 0x9079
+0x6167 = 0x9085
+0x6168 = 0x9088
+0x6169 = 0x908B
+0x616A = 0x908C
+0x616B = 0x908E
+0x616C = 0x9090
+0x616D = 0x9095
+0x616E = 0x9097
+0x616F = 0x9098
+0x6170 = 0x9099
+0x6171 = 0x909B
+0x6172 = 0x90A0
+0x6173 = 0x90A1
+0x6174 = 0x90A2
+0x6175 = 0x90A5
+0x6176 = 0x90B0
+0x6177 = 0x90B2
+0x6178 = 0x90B3
+0x6179 = 0x90B4
+0x617A = 0x90B6
+0x617B = 0x90BD
+0x617C = 0x90CC
+0x617D = 0x90BE
+0x617E = 0x90C3
+0x6221 = 0x90C4
+0x6222 = 0x90C5
+0x6223 = 0x90C7
+0x6224 = 0x90C8
+0x6225 = 0x90D5
+0x6226 = 0x90D7
+0x6227 = 0x90D8
+0x6228 = 0x90D9
+0x6229 = 0x90DC
+0x622A = 0x90DD
+0x622B = 0x90DF
+0x622C = 0x90E5
+0x622D = 0x90D2
+0x622E = 0x90F6
+0x622F = 0x90EB
+0x6230 = 0x90EF
+0x6231 = 0x90F0
+0x6232 = 0x90F4
+0x6233 = 0x90FE
+0x6234 = 0x90FF
+0x6235 = 0x9100
+0x6236 = 0x9104
+0x6237 = 0x9105
+0x6238 = 0x9106
+0x6239 = 0x9108
+0x623A = 0x910D
+0x623B = 0x9110
+0x623C = 0x9114
+0x623D = 0x9116
+0x623E = 0x9117
+0x623F = 0x9118
+0x6240 = 0x911A
+0x6241 = 0x911C
+0x6242 = 0x911E
+0x6243 = 0x9120
+0x6244 = 0x9125
+0x6245 = 0x9122
+0x6246 = 0x9123
+0x6247 = 0x9127
+0x6248 = 0x9129
+0x6249 = 0x912E
+0x624A = 0x912F
+0x624B = 0x9131
+0x624C = 0x9134
+0x624D = 0x9136
+0x624E = 0x9137
+0x624F = 0x9139
+0x6250 = 0x913A
+0x6251 = 0x913C
+0x6252 = 0x913D
+0x6253 = 0x9143
+0x6254 = 0x9147
+0x6255 = 0x9148
+0x6256 = 0x914F
+0x6257 = 0x9153
+0x6258 = 0x9157
+0x6259 = 0x9159
+0x625A = 0x915A
+0x625B = 0x915B
+0x625C = 0x9161
+0x625D = 0x9164
+0x625E = 0x9167
+0x625F = 0x916D
+0x6260 = 0x9174
+0x6261 = 0x9179
+0x6262 = 0x917A
+0x6263 = 0x917B
+0x6264 = 0x9181
+0x6265 = 0x9183
+0x6266 = 0x9185
+0x6267 = 0x9186
+0x6268 = 0x918A
+0x6269 = 0x918E
+0x626A = 0x9191
+0x626B = 0x9193
+0x626C = 0x9194
+0x626D = 0x9195
+0x626E = 0x9198
+0x626F = 0x919E
+0x6270 = 0x91A1
+0x6271 = 0x91A6
+0x6272 = 0x91A8
+0x6273 = 0x91AC
+0x6274 = 0x91AD
+0x6275 = 0x91AE
+0x6276 = 0x91B0
+0x6277 = 0x91B1
+0x6278 = 0x91B2
+0x6279 = 0x91B3
+0x627A = 0x91B6
+0x627B = 0x91BB
+0x627C = 0x91BC
+0x627D = 0x91BD
+0x627E = 0x91BF
+0x6321 = 0x91C2
+0x6322 = 0x91C3
+0x6323 = 0x91C5
+0x6324 = 0x91D3
+0x6325 = 0x91D4
+0x6326 = 0x91D7
+0x6327 = 0x91D9
+0x6328 = 0x91DA
+0x6329 = 0x91DE
+0x632A = 0x91E4
+0x632B = 0x91E5
+0x632C = 0x91E9
+0x632D = 0x91EA
+0x632E = 0x91EC
+0x632F = 0x91ED
+0x6330 = 0x91EE
+0x6331 = 0x91EF
+0x6332 = 0x91F0
+0x6333 = 0x91F1
+0x6334 = 0x91F7
+0x6335 = 0x91F9
+0x6336 = 0x91FB
+0x6337 = 0x91FD
+0x6338 = 0x9200
+0x6339 = 0x9201
+0x633A = 0x9204
+0x633B = 0x9205
+0x633C = 0x9206
+0x633D = 0x9207
+0x633E = 0x9209
+0x633F = 0x920A
+0x6340 = 0x920C
+0x6341 = 0x9210
+0x6342 = 0x9212
+0x6343 = 0x9213
+0x6344 = 0x9216
+0x6345 = 0x9218
+0x6346 = 0x921C
+0x6347 = 0x921D
+0x6348 = 0x9223
+0x6349 = 0x9224
+0x634A = 0x9225
+0x634B = 0x9226
+0x634C = 0x9228
+0x634D = 0x922E
+0x634E = 0x922F
+0x634F = 0x9230
+0x6350 = 0x9233
+0x6351 = 0x9235
+0x6352 = 0x9236
+0x6353 = 0x9238
+0x6354 = 0x9239
+0x6355 = 0x923A
+0x6356 = 0x923C
+0x6357 = 0x923E
+0x6358 = 0x9240
+0x6359 = 0x9242
+0x635A = 0x9243
+0x635B = 0x9246
+0x635C = 0x9247
+0x635D = 0x924A
+0x635E = 0x924D
+0x635F = 0x924E
+0x6360 = 0x924F
+0x6361 = 0x9251
+0x6362 = 0x9258
+0x6363 = 0x9259
+0x6364 = 0x925C
+0x6365 = 0x925D
+0x6366 = 0x9260
+0x6367 = 0x9261
+0x6368 = 0x9265
+0x6369 = 0x9267
+0x636A = 0x9268
+0x636B = 0x9269
+0x636C = 0x926E
+0x636D = 0x926F
+0x636E = 0x9270
+0x636F = 0x9275
+0x6370 = 0x9276
+0x6371 = 0x9277
+0x6372 = 0x9278
+0x6373 = 0x9279
+0x6374 = 0x927B
+0x6375 = 0x927C
+0x6376 = 0x927D
+0x6377 = 0x927F
+0x6378 = 0x9288
+0x6379 = 0x9289
+0x637A = 0x928A
+0x637B = 0x928D
+0x637C = 0x928E
+0x637D = 0x9292
+0x637E = 0x9297
+0x6421 = 0x9299
+0x6422 = 0x929F
+0x6423 = 0x92A0
+0x6424 = 0x92A4
+0x6425 = 0x92A5
+0x6426 = 0x92A7
+0x6427 = 0x92A8
+0x6428 = 0x92AB
+0x6429 = 0x92AF
+0x642A = 0x92B2
+0x642B = 0x92B6
+0x642C = 0x92B8
+0x642D = 0x92BA
+0x642E = 0x92BB
+0x642F = 0x92BC
+0x6430 = 0x92BD
+0x6431 = 0x92BF
+0x6432 = 0x92C0
+0x6433 = 0x92C1
+0x6434 = 0x92C2
+0x6435 = 0x92C3
+0x6436 = 0x92C5
+0x6437 = 0x92C6
+0x6438 = 0x92C7
+0x6439 = 0x92C8
+0x643A = 0x92CB
+0x643B = 0x92CC
+0x643C = 0x92CD
+0x643D = 0x92CE
+0x643E = 0x92D0
+0x643F = 0x92D3
+0x6440 = 0x92D5
+0x6441 = 0x92D7
+0x6442 = 0x92D8
+0x6443 = 0x92D9
+0x6444 = 0x92DC
+0x6445 = 0x92DD
+0x6446 = 0x92DF
+0x6447 = 0x92E0
+0x6448 = 0x92E1
+0x6449 = 0x92E3
+0x644A = 0x92E5
+0x644B = 0x92E7
+0x644C = 0x92E8
+0x644D = 0x92EC
+0x644E = 0x92EE
+0x644F = 0x92F0
+0x6450 = 0x92F9
+0x6451 = 0x92FB
+0x6452 = 0x92FF
+0x6453 = 0x9300
+0x6454 = 0x9302
+0x6455 = 0x9308
+0x6456 = 0x930D
+0x6457 = 0x9311
+0x6458 = 0x9314
+0x6459 = 0x9315
+0x645A = 0x931C
+0x645B = 0x931D
+0x645C = 0x931E
+0x645D = 0x931F
+0x645E = 0x9321
+0x645F = 0x9324
+0x6460 = 0x9325
+0x6461 = 0x9327
+0x6462 = 0x9329
+0x6463 = 0x932A
+0x6464 = 0x9333
+0x6465 = 0x9334
+0x6466 = 0x9336
+0x6467 = 0x9337
+0x6468 = 0x9347
+0x6469 = 0x9348
+0x646A = 0x9349
+0x646B = 0x9350
+0x646C = 0x9351
+0x646D = 0x9352
+0x646E = 0x9355
+0x646F = 0x9357
+0x6470 = 0x9358
+0x6471 = 0x935A
+0x6472 = 0x935E
+0x6473 = 0x9364
+0x6474 = 0x9365
+0x6475 = 0x9367
+0x6476 = 0x9369
+0x6477 = 0x936A
+0x6478 = 0x936D
+0x6479 = 0x936F
+0x647A = 0x9370
+0x647B = 0x9371
+0x647C = 0x9373
+0x647D = 0x9374
+0x647E = 0x9376
+0x6521 = 0x937A
+0x6522 = 0x937D
+0x6523 = 0x937F
+0x6524 = 0x9380
+0x6525 = 0x9381
+0x6526 = 0x9382
+0x6527 = 0x9388
+0x6528 = 0x938A
+0x6529 = 0x938B
+0x652A = 0x938D
+0x652B = 0x938F
+0x652C = 0x9392
+0x652D = 0x9395
+0x652E = 0x9398
+0x652F = 0x939B
+0x6530 = 0x939E
+0x6531 = 0x93A1
+0x6532 = 0x93A3
+0x6533 = 0x93A4
+0x6534 = 0x93A6
+0x6535 = 0x93A8
+0x6536 = 0x93AB
+0x6537 = 0x93B4
+0x6538 = 0x93B5
+0x6539 = 0x93B6
+0x653A = 0x93BA
+0x653B = 0x93A9
+0x653C = 0x93C1
+0x653D = 0x93C4
+0x653E = 0x93C5
+0x653F = 0x93C6
+0x6540 = 0x93C7
+0x6541 = 0x93C9
+0x6542 = 0x93CA
+0x6543 = 0x93CB
+0x6544 = 0x93CC
+0x6545 = 0x93CD
+0x6546 = 0x93D3
+0x6547 = 0x93D9
+0x6548 = 0x93DC
+0x6549 = 0x93DE
+0x654A = 0x93DF
+0x654B = 0x93E2
+0x654C = 0x93E6
+0x654D = 0x93E7
+0x654E = 0x93F9
+0x654F = 0x93F7
+0x6550 = 0x93F8
+0x6551 = 0x93FA
+0x6552 = 0x93FB
+0x6553 = 0x93FD
+0x6554 = 0x9401
+0x6555 = 0x9402
+0x6556 = 0x9404
+0x6557 = 0x9408
+0x6558 = 0x9409
+0x6559 = 0x940D
+0x655A = 0x940E
+0x655B = 0x940F
+0x655C = 0x9415
+0x655D = 0x9416
+0x655E = 0x9417
+0x655F = 0x941F
+0x6560 = 0x942E
+0x6561 = 0x942F
+0x6562 = 0x9431
+0x6563 = 0x9432
+0x6564 = 0x9433
+0x6565 = 0x9434
+0x6566 = 0x943B
+0x6567 = 0x943F
+0x6568 = 0x943D
+0x6569 = 0x9443
+0x656A = 0x9445
+0x656B = 0x9448
+0x656C = 0x944A
+0x656D = 0x944C
+0x656E = 0x9455
+0x656F = 0x9459
+0x6570 = 0x945C
+0x6571 = 0x945F
+0x6572 = 0x9461
+0x6573 = 0x9463
+0x6574 = 0x9468
+0x6575 = 0x946B
+0x6576 = 0x946D
+0x6577 = 0x946E
+0x6578 = 0x946F
+0x6579 = 0x9471
+0x657A = 0x9472
+0x657B = 0x9484
+0x657C = 0x9483
+0x657D = 0x9578
+0x657E = 0x9579
+0x6621 = 0x957E
+0x6622 = 0x9584
+0x6623 = 0x9588
+0x6624 = 0x958C
+0x6625 = 0x958D
+0x6626 = 0x958E
+0x6627 = 0x959D
+0x6628 = 0x959E
+0x6629 = 0x959F
+0x662A = 0x95A1
+0x662B = 0x95A6
+0x662C = 0x95A9
+0x662D = 0x95AB
+0x662E = 0x95AC
+0x662F = 0x95B4
+0x6630 = 0x95B6
+0x6631 = 0x95BA
+0x6632 = 0x95BD
+0x6633 = 0x95BF
+0x6634 = 0x95C6
+0x6635 = 0x95C8
+0x6636 = 0x95C9
+0x6637 = 0x95CB
+0x6638 = 0x95D0
+0x6639 = 0x95D1
+0x663A = 0x95D2
+0x663B = 0x95D3
+0x663C = 0x95D9
+0x663D = 0x95DA
+0x663E = 0x95DD
+0x663F = 0x95DE
+0x6640 = 0x95DF
+0x6641 = 0x95E0
+0x6642 = 0x95E4
+0x6643 = 0x95E6
+0x6644 = 0x961D
+0x6645 = 0x961E
+0x6646 = 0x9622
+0x6647 = 0x9624
+0x6648 = 0x9625
+0x6649 = 0x9626
+0x664A = 0x962C
+0x664B = 0x9631
+0x664C = 0x9633
+0x664D = 0x9637
+0x664E = 0x9638
+0x664F = 0x9639
+0x6650 = 0x963A
+0x6651 = 0x963C
+0x6652 = 0x963D
+0x6653 = 0x9641
+0x6654 = 0x9652
+0x6655 = 0x9654
+0x6656 = 0x9656
+0x6657 = 0x9657
+0x6658 = 0x9658
+0x6659 = 0x9661
+0x665A = 0x966E
+0x665B = 0x9674
+0x665C = 0x967B
+0x665D = 0x967C
+0x665E = 0x967E
+0x665F = 0x967F
+0x6660 = 0x9681
+0x6661 = 0x9682
+0x6662 = 0x9683
+0x6663 = 0x9684
+0x6664 = 0x9689
+0x6665 = 0x9691
+0x6666 = 0x9696
+0x6667 = 0x969A
+0x6668 = 0x969D
+0x6669 = 0x969F
+0x666A = 0x96A4
+0x666B = 0x96A5
+0x666C = 0x96A6
+0x666D = 0x96A9
+0x666E = 0x96AE
+0x666F = 0x96AF
+0x6670 = 0x96B3
+0x6671 = 0x96BA
+0x6672 = 0x96CA
+0x6673 = 0x96D2
+0x6674 = 0x5DB2
+0x6675 = 0x96D8
+0x6676 = 0x96DA
+0x6677 = 0x96DD
+0x6678 = 0x96DE
+0x6679 = 0x96DF
+0x667A = 0x96E9
+0x667B = 0x96EF
+0x667C = 0x96F1
+0x667D = 0x96FA
+0x667E = 0x9702
+0x6721 = 0x9703
+0x6722 = 0x9705
+0x6723 = 0x9709
+0x6724 = 0x971A
+0x6725 = 0x971B
+0x6726 = 0x971D
+0x6727 = 0x9721
+0x6728 = 0x9722
+0x6729 = 0x9723
+0x672A = 0x9728
+0x672B = 0x9731
+0x672C = 0x9733
+0x672D = 0x9741
+0x672E = 0x9743
+0x672F = 0x974A
+0x6730 = 0x974E
+0x6731 = 0x974F
+0x6732 = 0x9755
+0x6733 = 0x9757
+0x6734 = 0x9758
+0x6735 = 0x975A
+0x6736 = 0x975B
+0x6737 = 0x9763
+0x6738 = 0x9767
+0x6739 = 0x976A
+0x673A = 0x976E
+0x673B = 0x9773
+0x673C = 0x9776
+0x673D = 0x9777
+0x673E = 0x9778
+0x673F = 0x977B
+0x6740 = 0x977D
+0x6741 = 0x977F
+0x6742 = 0x9780
+0x6743 = 0x9789
+0x6744 = 0x9795
+0x6745 = 0x9796
+0x6746 = 0x9797
+0x6747 = 0x9799
+0x6748 = 0x979A
+0x6749 = 0x979E
+0x674A = 0x979F
+0x674B = 0x97A2
+0x674C = 0x97AC
+0x674D = 0x97AE
+0x674E = 0x97B1
+0x674F = 0x97B2
+0x6750 = 0x97B5
+0x6751 = 0x97B6
+0x6752 = 0x97B8
+0x6753 = 0x97B9
+0x6754 = 0x97BA
+0x6755 = 0x97BC
+0x6756 = 0x97BE
+0x6757 = 0x97BF
+0x6758 = 0x97C1
+0x6759 = 0x97C4
+0x675A = 0x97C5
+0x675B = 0x97C7
+0x675C = 0x97C9
+0x675D = 0x97CA
+0x675E = 0x97CC
+0x675F = 0x97CD
+0x6760 = 0x97CE
+0x6761 = 0x97D0
+0x6762 = 0x97D1
+0x6763 = 0x97D4
+0x6764 = 0x97D7
+0x6765 = 0x97D8
+0x6766 = 0x97D9
+0x6767 = 0x97DD
+0x6768 = 0x97DE
+0x6769 = 0x97E0
+0x676A = 0x97DB
+0x676B = 0x97E1
+0x676C = 0x97E4
+0x676D = 0x97EF
+0x676E = 0x97F1
+0x676F = 0x97F4
+0x6770 = 0x97F7
+0x6771 = 0x97F8
+0x6772 = 0x97FA
+0x6773 = 0x9807
+0x6774 = 0x980A
+0x6775 = 0x9819
+0x6776 = 0x980D
+0x6777 = 0x980E
+0x6778 = 0x9814
+0x6779 = 0x9816
+0x677A = 0x981C
+0x677B = 0x981E
+0x677C = 0x9820
+0x677D = 0x9823
+0x677E = 0x9826
+0x6821 = 0x982B
+0x6822 = 0x982E
+0x6823 = 0x982F
+0x6824 = 0x9830
+0x6825 = 0x9832
+0x6826 = 0x9833
+0x6827 = 0x9835
+0x6828 = 0x9825
+0x6829 = 0x983E
+0x682A = 0x9844
+0x682B = 0x9847
+0x682C = 0x984A
+0x682D = 0x9851
+0x682E = 0x9852
+0x682F = 0x9853
+0x6830 = 0x9856
+0x6831 = 0x9857
+0x6832 = 0x9859
+0x6833 = 0x985A
+0x6834 = 0x9862
+0x6835 = 0x9863
+0x6836 = 0x9865
+0x6837 = 0x9866
+0x6838 = 0x986A
+0x6839 = 0x986C
+0x683A = 0x98AB
+0x683B = 0x98AD
+0x683C = 0x98AE
+0x683D = 0x98B0
+0x683E = 0x98B4
+0x683F = 0x98B7
+0x6840 = 0x98B8
+0x6841 = 0x98BA
+0x6842 = 0x98BB
+0x6843 = 0x98BF
+0x6844 = 0x98C2
+0x6845 = 0x98C5
+0x6846 = 0x98C8
+0x6847 = 0x98CC
+0x6848 = 0x98E1
+0x6849 = 0x98E3
+0x684A = 0x98E5
+0x684B = 0x98E6
+0x684C = 0x98E7
+0x684D = 0x98EA
+0x684E = 0x98F3
+0x684F = 0x98F6
+0x6850 = 0x9902
+0x6851 = 0x9907
+0x6852 = 0x9908
+0x6853 = 0x9911
+0x6854 = 0x9915
+0x6855 = 0x9916
+0x6856 = 0x9917
+0x6857 = 0x991A
+0x6858 = 0x991B
+0x6859 = 0x991C
+0x685A = 0x991F
+0x685B = 0x9922
+0x685C = 0x9926
+0x685D = 0x9927
+0x685E = 0x992B
+0x685F = 0x9931
+0x6860 = 0x9932
+0x6861 = 0x9933
+0x6862 = 0x9934
+0x6863 = 0x9935
+0x6864 = 0x9939
+0x6865 = 0x993A
+0x6866 = 0x993B
+0x6867 = 0x993C
+0x6868 = 0x9940
+0x6869 = 0x9941
+0x686A = 0x9946
+0x686B = 0x9947
+0x686C = 0x9948
+0x686D = 0x994D
+0x686E = 0x994E
+0x686F = 0x9954
+0x6870 = 0x9958
+0x6871 = 0x9959
+0x6872 = 0x995B
+0x6873 = 0x995C
+0x6874 = 0x995E
+0x6875 = 0x995F
+0x6876 = 0x9960
+0x6877 = 0x999B
+0x6878 = 0x999D
+0x6879 = 0x999F
+0x687A = 0x99A6
+0x687B = 0x99B0
+0x687C = 0x99B1
+0x687D = 0x99B2
+0x687E = 0x99B5
+0x6921 = 0x99B9
+0x6922 = 0x99BA
+0x6923 = 0x99BD
+0x6924 = 0x99BF
+0x6925 = 0x99C3
+0x6926 = 0x99C9
+0x6927 = 0x99D3
+0x6928 = 0x99D4
+0x6929 = 0x99D9
+0x692A = 0x99DA
+0x692B = 0x99DC
+0x692C = 0x99DE
+0x692D = 0x99E7
+0x692E = 0x99EA
+0x692F = 0x99EB
+0x6930 = 0x99EC
+0x6931 = 0x99F0
+0x6932 = 0x99F4
+0x6933 = 0x99F5
+0x6934 = 0x99F9
+0x6935 = 0x99FD
+0x6936 = 0x99FE
+0x6937 = 0x9A02
+0x6938 = 0x9A03
+0x6939 = 0x9A04
+0x693A = 0x9A0B
+0x693B = 0x9A0C
+0x693C = 0x9A10
+0x693D = 0x9A11
+0x693E = 0x9A16
+0x693F = 0x9A1E
+0x6940 = 0x9A20
+0x6941 = 0x9A22
+0x6942 = 0x9A23
+0x6943 = 0x9A24
+0x6944 = 0x9A27
+0x6945 = 0x9A2D
+0x6946 = 0x9A2E
+0x6947 = 0x9A33
+0x6948 = 0x9A35
+0x6949 = 0x9A36
+0x694A = 0x9A38
+0x694B = 0x9A47
+0x694C = 0x9A41
+0x694D = 0x9A44
+0x694E = 0x9A4A
+0x694F = 0x9A4B
+0x6950 = 0x9A4C
+0x6951 = 0x9A4E
+0x6952 = 0x9A51
+0x6953 = 0x9A54
+0x6954 = 0x9A56
+0x6955 = 0x9A5D
+0x6956 = 0x9AAA
+0x6957 = 0x9AAC
+0x6958 = 0x9AAE
+0x6959 = 0x9AAF
+0x695A = 0x9AB2
+0x695B = 0x9AB4
+0x695C = 0x9AB5
+0x695D = 0x9AB6
+0x695E = 0x9AB9
+0x695F = 0x9ABB
+0x6960 = 0x9ABE
+0x6961 = 0x9ABF
+0x6962 = 0x9AC1
+0x6963 = 0x9AC3
+0x6964 = 0x9AC6
+0x6965 = 0x9AC8
+0x6966 = 0x9ACE
+0x6967 = 0x9AD0
+0x6968 = 0x9AD2
+0x6969 = 0x9AD5
+0x696A = 0x9AD6
+0x696B = 0x9AD7
+0x696C = 0x9ADB
+0x696D = 0x9ADC
+0x696E = 0x9AE0
+0x696F = 0x9AE4
+0x6970 = 0x9AE5
+0x6971 = 0x9AE7
+0x6972 = 0x9AE9
+0x6973 = 0x9AEC
+0x6974 = 0x9AF2
+0x6975 = 0x9AF3
+0x6976 = 0x9AF5
+0x6977 = 0x9AF9
+0x6978 = 0x9AFA
+0x6979 = 0x9AFD
+0x697A = 0x9AFF
+0x697B = 0x9B00
+0x697C = 0x9B01
+0x697D = 0x9B02
+0x697E = 0x9B03
+0x6A21 = 0x9B04
+0x6A22 = 0x9B05
+0x6A23 = 0x9B08
+0x6A24 = 0x9B09
+0x6A25 = 0x9B0B
+0x6A26 = 0x9B0C
+0x6A27 = 0x9B0D
+0x6A28 = 0x9B0E
+0x6A29 = 0x9B10
+0x6A2A = 0x9B12
+0x6A2B = 0x9B16
+0x6A2C = 0x9B19
+0x6A2D = 0x9B1B
+0x6A2E = 0x9B1C
+0x6A2F = 0x9B20
+0x6A30 = 0x9B26
+0x6A31 = 0x9B2B
+0x6A32 = 0x9B2D
+0x6A33 = 0x9B33
+0x6A34 = 0x9B34
+0x6A35 = 0x9B35
+0x6A36 = 0x9B37
+0x6A37 = 0x9B39
+0x6A38 = 0x9B3A
+0x6A39 = 0x9B3D
+0x6A3A = 0x9B48
+0x6A3B = 0x9B4B
+0x6A3C = 0x9B4C
+0x6A3D = 0x9B55
+0x6A3E = 0x9B56
+0x6A3F = 0x9B57
+0x6A40 = 0x9B5B
+0x6A41 = 0x9B5E
+0x6A42 = 0x9B61
+0x6A43 = 0x9B63
+0x6A44 = 0x9B65
+0x6A45 = 0x9B66
+0x6A46 = 0x9B68
+0x6A47 = 0x9B6A
+0x6A48 = 0x9B6B
+0x6A49 = 0x9B6C
+0x6A4A = 0x9B6D
+0x6A4B = 0x9B6E
+0x6A4C = 0x9B73
+0x6A4D = 0x9B75
+0x6A4E = 0x9B77
+0x6A4F = 0x9B78
+0x6A50 = 0x9B79
+0x6A51 = 0x9B7F
+0x6A52 = 0x9B80
+0x6A53 = 0x9B84
+0x6A54 = 0x9B85
+0x6A55 = 0x9B86
+0x6A56 = 0x9B87
+0x6A57 = 0x9B89
+0x6A58 = 0x9B8A
+0x6A59 = 0x9B8B
+0x6A5A = 0x9B8D
+0x6A5B = 0x9B8F
+0x6A5C = 0x9B90
+0x6A5D = 0x9B94
+0x6A5E = 0x9B9A
+0x6A5F = 0x9B9D
+0x6A60 = 0x9B9E
+0x6A61 = 0x9BA6
+0x6A62 = 0x9BA7
+0x6A63 = 0x9BA9
+0x6A64 = 0x9BAC
+0x6A65 = 0x9BB0
+0x6A66 = 0x9BB1
+0x6A67 = 0x9BB2
+0x6A68 = 0x9BB7
+0x6A69 = 0x9BB8
+0x6A6A = 0x9BBB
+0x6A6B = 0x9BBC
+0x6A6C = 0x9BBE
+0x6A6D = 0x9BBF
+0x6A6E = 0x9BC1
+0x6A6F = 0x9BC7
+0x6A70 = 0x9BC8
+0x6A71 = 0x9BCE
+0x6A72 = 0x9BD0
+0x6A73 = 0x9BD7
+0x6A74 = 0x9BD8
+0x6A75 = 0x9BDD
+0x6A76 = 0x9BDF
+0x6A77 = 0x9BE5
+0x6A78 = 0x9BE7
+0x6A79 = 0x9BEA
+0x6A7A = 0x9BEB
+0x6A7B = 0x9BEF
+0x6A7C = 0x9BF3
+0x6A7D = 0x9BF7
+0x6A7E = 0x9BF8
+0x6B21 = 0x9BF9
+0x6B22 = 0x9BFA
+0x6B23 = 0x9BFD
+0x6B24 = 0x9BFF
+0x6B25 = 0x9C00
+0x6B26 = 0x9C02
+0x6B27 = 0x9C0B
+0x6B28 = 0x9C0F
+0x6B29 = 0x9C11
+0x6B2A = 0x9C16
+0x6B2B = 0x9C18
+0x6B2C = 0x9C19
+0x6B2D = 0x9C1A
+0x6B2E = 0x9C1C
+0x6B2F = 0x9C1E
+0x6B30 = 0x9C22
+0x6B31 = 0x9C23
+0x6B32 = 0x9C26
+0x6B33 = 0x9C27
+0x6B34 = 0x9C28
+0x6B35 = 0x9C29
+0x6B36 = 0x9C2A
+0x6B37 = 0x9C31
+0x6B38 = 0x9C35
+0x6B39 = 0x9C36
+0x6B3A = 0x9C37
+0x6B3B = 0x9C3D
+0x6B3C = 0x9C41
+0x6B3D = 0x9C43
+0x6B3E = 0x9C44
+0x6B3F = 0x9C45
+0x6B40 = 0x9C49
+0x6B41 = 0x9C4A
+0x6B42 = 0x9C4E
+0x6B43 = 0x9C4F
+0x6B44 = 0x9C50
+0x6B45 = 0x9C53
+0x6B46 = 0x9C54
+0x6B47 = 0x9C56
+0x6B48 = 0x9C58
+0x6B49 = 0x9C5B
+0x6B4A = 0x9C5D
+0x6B4B = 0x9C5E
+0x6B4C = 0x9C5F
+0x6B4D = 0x9C63
+0x6B4E = 0x9C69
+0x6B4F = 0x9C6A
+0x6B50 = 0x9C5C
+0x6B51 = 0x9C6B
+0x6B52 = 0x9C68
+0x6B53 = 0x9C6E
+0x6B54 = 0x9C70
+0x6B55 = 0x9C72
+0x6B56 = 0x9C75
+0x6B57 = 0x9C77
+0x6B58 = 0x9C7B
+0x6B59 = 0x9CE6
+0x6B5A = 0x9CF2
+0x6B5B = 0x9CF7
+0x6B5C = 0x9CF9
+0x6B5D = 0x9D0B
+0x6B5E = 0x9D02
+0x6B5F = 0x9D11
+0x6B60 = 0x9D17
+0x6B61 = 0x9D18
+0x6B62 = 0x9D1C
+0x6B63 = 0x9D1D
+0x6B64 = 0x9D1E
+0x6B65 = 0x9D2F
+0x6B66 = 0x9D30
+0x6B67 = 0x9D32
+0x6B68 = 0x9D33
+0x6B69 = 0x9D34
+0x6B6A = 0x9D3A
+0x6B6B = 0x9D3C
+0x6B6C = 0x9D45
+0x6B6D = 0x9D3D
+0x6B6E = 0x9D42
+0x6B6F = 0x9D43
+0x6B70 = 0x9D47
+0x6B71 = 0x9D4A
+0x6B72 = 0x9D53
+0x6B73 = 0x9D54
+0x6B74 = 0x9D5F
+0x6B75 = 0x9D63
+0x6B76 = 0x9D62
+0x6B77 = 0x9D65
+0x6B78 = 0x9D69
+0x6B79 = 0x9D6A
+0x6B7A = 0x9D6B
+0x6B7B = 0x9D70
+0x6B7C = 0x9D76
+0x6B7D = 0x9D77
+0x6B7E = 0x9D7B
+0x6C21 = 0x9D7C
+0x6C22 = 0x9D7E
+0x6C23 = 0x9D83
+0x6C24 = 0x9D84
+0x6C25 = 0x9D86
+0x6C26 = 0x9D8A
+0x6C27 = 0x9D8D
+0x6C28 = 0x9D8E
+0x6C29 = 0x9D92
+0x6C2A = 0x9D93
+0x6C2B = 0x9D95
+0x6C2C = 0x9D96
+0x6C2D = 0x9D97
+0x6C2E = 0x9D98
+0x6C2F = 0x9DA1
+0x6C30 = 0x9DAA
+0x6C31 = 0x9DAC
+0x6C32 = 0x9DAE
+0x6C33 = 0x9DB1
+0x6C34 = 0x9DB5
+0x6C35 = 0x9DB9
+0x6C36 = 0x9DBC
+0x6C37 = 0x9DBF
+0x6C38 = 0x9DC3
+0x6C39 = 0x9DC7
+0x6C3A = 0x9DC9
+0x6C3B = 0x9DCA
+0x6C3C = 0x9DD4
+0x6C3D = 0x9DD5
+0x6C3E = 0x9DD6
+0x6C3F = 0x9DD7
+0x6C40 = 0x9DDA
+0x6C41 = 0x9DDE
+0x6C42 = 0x9DDF
+0x6C43 = 0x9DE0
+0x6C44 = 0x9DE5
+0x6C45 = 0x9DE7
+0x6C46 = 0x9DE9
+0x6C47 = 0x9DEB
+0x6C48 = 0x9DEE
+0x6C49 = 0x9DF0
+0x6C4A = 0x9DF3
+0x6C4B = 0x9DF4
+0x6C4C = 0x9DFE
+0x6C4D = 0x9E0A
+0x6C4E = 0x9E02
+0x6C4F = 0x9E07
+0x6C50 = 0x9E0E
+0x6C51 = 0x9E10
+0x6C52 = 0x9E11
+0x6C53 = 0x9E12
+0x6C54 = 0x9E15
+0x6C55 = 0x9E16
+0x6C56 = 0x9E19
+0x6C57 = 0x9E1C
+0x6C58 = 0x9E1D
+0x6C59 = 0x9E7A
+0x6C5A = 0x9E7B
+0x6C5B = 0x9E7C
+0x6C5C = 0x9E80
+0x6C5D = 0x9E82
+0x6C5E = 0x9E83
+0x6C5F = 0x9E84
+0x6C60 = 0x9E85
+0x6C61 = 0x9E87
+0x6C62 = 0x9E8E
+0x6C63 = 0x9E8F
+0x6C64 = 0x9E96
+0x6C65 = 0x9E98
+0x6C66 = 0x9E9B
+0x6C67 = 0x9E9E
+0x6C68 = 0x9EA4
+0x6C69 = 0x9EA8
+0x6C6A = 0x9EAC
+0x6C6B = 0x9EAE
+0x6C6C = 0x9EAF
+0x6C6D = 0x9EB0
+0x6C6E = 0x9EB3
+0x6C6F = 0x9EB4
+0x6C70 = 0x9EB5
+0x6C71 = 0x9EC6
+0x6C72 = 0x9EC8
+0x6C73 = 0x9ECB
+0x6C74 = 0x9ED5
+0x6C75 = 0x9EDF
+0x6C76 = 0x9EE4
+0x6C77 = 0x9EE7
+0x6C78 = 0x9EEC
+0x6C79 = 0x9EED
+0x6C7A = 0x9EEE
+0x6C7B = 0x9EF0
+0x6C7C = 0x9EF1
+0x6C7D = 0x9EF2
+0x6C7E = 0x9EF5
+0x6D21 = 0x9EF8
+0x6D22 = 0x9EFF
+0x6D23 = 0x9F02
+0x6D24 = 0x9F03
+0x6D25 = 0x9F09
+0x6D26 = 0x9F0F
+0x6D27 = 0x9F10
+0x6D28 = 0x9F11
+0x6D29 = 0x9F12
+0x6D2A = 0x9F14
+0x6D2B = 0x9F16
+0x6D2C = 0x9F17
+0x6D2D = 0x9F19
+0x6D2E = 0x9F1A
+0x6D2F = 0x9F1B
+0x6D30 = 0x9F1F
+0x6D31 = 0x9F22
+0x6D32 = 0x9F26
+0x6D33 = 0x9F2A
+0x6D34 = 0x9F2B
+0x6D35 = 0x9F2F
+0x6D36 = 0x9F31
+0x6D37 = 0x9F32
+0x6D38 = 0x9F34
+0x6D39 = 0x9F37
+0x6D3A = 0x9F39
+0x6D3B = 0x9F3A
+0x6D3C = 0x9F3C
+0x6D3D = 0x9F3D
+0x6D3E = 0x9F3F
+0x6D3F = 0x9F41
+0x6D40 = 0x9F43
+0x6D41 = 0x9F44
+0x6D42 = 0x9F45
+0x6D43 = 0x9F46
+0x6D44 = 0x9F47
+0x6D45 = 0x9F53
+0x6D46 = 0x9F55
+0x6D47 = 0x9F56
+0x6D48 = 0x9F57
+0x6D49 = 0x9F58
+0x6D4A = 0x9F5A
+0x6D4B = 0x9F5D
+0x6D4C = 0x9F5E
+0x6D4D = 0x9F68
+0x6D4E = 0x9F69
+0x6D4F = 0x9F6D
+0x6D50 = 0x9F6E
+0x6D51 = 0x9F6F
+0x6D52 = 0x9F70
+0x6D53 = 0x9F71
+0x6D54 = 0x9F73
+0x6D55 = 0x9F75
+0x6D56 = 0x9F7A
+0x6D57 = 0x9F7D
+0x6D58 = 0x9F8F
+0x6D59 = 0x9F90
+0x6D5A = 0x9F91
+0x6D5B = 0x9F92
+0x6D5C = 0x9F94
+0x6D5D = 0x9F96
+0x6D5E = 0x9F97
+0x6D5F = 0x9F9E
+0x6D60 = 0x9FA1
+0x6D61 = 0x9FA2
+0x6D62 = 0x9FA3
+0x6D63 = 0x9FA5
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212@MS%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212@MS%UCS.src
new file mode 100644
index 0000000..cd05e26
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212@MS%UCS.src
@@ -0,0 +1,6081 @@
+# $NetBSD: JISX0212@MS%UCS.src,v 1.1 2003/07/19 20:20:41 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0212:MS/UCS"
+SRC_ZONE	0x21-0x7E / 0x21-0x7E / 8
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x222F = 0x02D8
+0x2230 = 0x02C7
+0x2231 = 0x00B8
+0x2232 = 0x02D9
+0x2233 = 0x02DD
+0x2234 = 0x00AF
+0x2235 = 0x02DB
+0x2236 = 0x02DA
+0x2237 = 0xFF5E
+0x2238 = 0x0384
+0x2239 = 0x0385
+0x2242 = 0x00A1
+0x2243 = 0xFFE4
+0x2244 = 0x00BF
+0x226B = 0x00BA
+0x226C = 0x00AA
+0x226D = 0x00A9
+0x226E = 0x00AE
+0x226F = 0x2122
+0x2270 = 0x00A4
+0x2271 = 0x2116
+0x2661 = 0x0386
+0x2662 = 0x0388
+0x2663 = 0x0389
+0x2664 = 0x038A
+0x2665 = 0x03AA
+0x2667 = 0x038C
+0x2669 = 0x038E
+0x266A = 0x03AB
+0x266C = 0x038F
+0x2671 = 0x03AC
+0x2672 = 0x03AD
+0x2673 = 0x03AE
+0x2674 = 0x03AF
+0x2675 = 0x03CA
+0x2676 = 0x0390
+0x2677 = 0x03CC
+0x2678 = 0x03C2
+0x2679 = 0x03CD
+0x267A = 0x03CB
+0x267B = 0x03B0
+0x267C = 0x03CE
+0x2742 = 0x0402
+0x2743 = 0x0403
+0x2744 = 0x0404
+0x2745 = 0x0405
+0x2746 = 0x0406
+0x2747 = 0x0407
+0x2748 = 0x0408
+0x2749 = 0x0409
+0x274A = 0x040A
+0x274B = 0x040B
+0x274C = 0x040C
+0x274D = 0x040E
+0x274E = 0x040F
+0x2772 = 0x0452
+0x2773 = 0x0453
+0x2774 = 0x0454
+0x2775 = 0x0455
+0x2776 = 0x0456
+0x2777 = 0x0457
+0x2778 = 0x0458
+0x2779 = 0x0459
+0x277A = 0x045A
+0x277B = 0x045B
+0x277C = 0x045C
+0x277D = 0x045E
+0x277E = 0x045F
+0x2921 = 0x00C6
+0x2922 = 0x0110
+0x2924 = 0x0126
+0x2926 = 0x0132
+0x2928 = 0x0141
+0x2929 = 0x013F
+0x292B = 0x014A
+0x292C = 0x00D8
+0x292D = 0x0152
+0x292F = 0x0166
+0x2930 = 0x00DE
+0x2941 = 0x00E6
+0x2942 = 0x0111
+0x2943 = 0x00F0
+0x2944 = 0x0127
+0x2945 = 0x0131
+0x2946 = 0x0133
+0x2947 = 0x0138
+0x2948 = 0x0142
+0x2949 = 0x0140
+0x294A = 0x0149
+0x294B = 0x014B
+0x294C = 0x00F8
+0x294D = 0x0153
+0x294E = 0x00DF
+0x294F = 0x0167
+0x2950 = 0x00FE
+0x2A21 = 0x00C1
+0x2A22 = 0x00C0
+0x2A23 = 0x00C4
+0x2A24 = 0x00C2
+0x2A25 = 0x0102
+0x2A26 = 0x01CD
+0x2A27 = 0x0100
+0x2A28 = 0x0104
+0x2A29 = 0x00C5
+0x2A2A = 0x00C3
+0x2A2B = 0x0106
+0x2A2C = 0x0108
+0x2A2D = 0x010C
+0x2A2E = 0x00C7
+0x2A2F = 0x010A
+0x2A30 = 0x010E
+0x2A31 = 0x00C9
+0x2A32 = 0x00C8
+0x2A33 = 0x00CB
+0x2A34 = 0x00CA
+0x2A35 = 0x011A
+0x2A36 = 0x0116
+0x2A37 = 0x0112
+0x2A38 = 0x0118
+0x2A3A = 0x011C
+0x2A3B = 0x011E
+0x2A3C = 0x0122
+0x2A3D = 0x0120
+0x2A3E = 0x0124
+0x2A3F = 0x00CD
+0x2A40 = 0x00CC
+0x2A41 = 0x00CF
+0x2A42 = 0x00CE
+0x2A43 = 0x01CF
+0x2A44 = 0x0130
+0x2A45 = 0x012A
+0x2A46 = 0x012E
+0x2A47 = 0x0128
+0x2A48 = 0x0134
+0x2A49 = 0x0136
+0x2A4A = 0x0139
+0x2A4B = 0x013D
+0x2A4C = 0x013B
+0x2A4D = 0x0143
+0x2A4E = 0x0147
+0x2A4F = 0x0145
+0x2A50 = 0x00D1
+0x2A51 = 0x00D3
+0x2A52 = 0x00D2
+0x2A53 = 0x00D6
+0x2A54 = 0x00D4
+0x2A55 = 0x01D1
+0x2A56 = 0x0150
+0x2A57 = 0x014C
+0x2A58 = 0x00D5
+0x2A59 = 0x0154
+0x2A5A = 0x0158
+0x2A5B = 0x0156
+0x2A5C = 0x015A
+0x2A5D = 0x015C
+0x2A5E = 0x0160
+0x2A5F = 0x015E
+0x2A60 = 0x0164
+0x2A61 = 0x0162
+0x2A62 = 0x00DA
+0x2A63 = 0x00D9
+0x2A64 = 0x00DC
+0x2A65 = 0x00DB
+0x2A66 = 0x016C
+0x2A67 = 0x01D3
+0x2A68 = 0x0170
+0x2A69 = 0x016A
+0x2A6A = 0x0172
+0x2A6B = 0x016E
+0x2A6C = 0x0168
+0x2A6D = 0x01D7
+0x2A6E = 0x01DB
+0x2A6F = 0x01D9
+0x2A70 = 0x01D5
+0x2A71 = 0x0174
+0x2A72 = 0x00DD
+0x2A73 = 0x0178
+0x2A74 = 0x0176
+0x2A75 = 0x0179
+0x2A76 = 0x017D
+0x2A77 = 0x017B
+0x2B21 = 0x00E1
+0x2B22 = 0x00E0
+0x2B23 = 0x00E4
+0x2B24 = 0x00E2
+0x2B25 = 0x0103
+0x2B26 = 0x01CE
+0x2B27 = 0x0101
+0x2B28 = 0x0105
+0x2B29 = 0x00E5
+0x2B2A = 0x00E3
+0x2B2B = 0x0107
+0x2B2C = 0x0109
+0x2B2D = 0x010D
+0x2B2E = 0x00E7
+0x2B2F = 0x010B
+0x2B30 = 0x010F
+0x2B31 = 0x00E9
+0x2B32 = 0x00E8
+0x2B33 = 0x00EB
+0x2B34 = 0x00EA
+0x2B35 = 0x011B
+0x2B36 = 0x0117
+0x2B37 = 0x0113
+0x2B38 = 0x0119
+0x2B39 = 0x01F5
+0x2B3A = 0x011D
+0x2B3B = 0x011F
+0x2B3D = 0x0121
+0x2B3E = 0x0125
+0x2B3F = 0x00ED
+0x2B40 = 0x00EC
+0x2B41 = 0x00EF
+0x2B42 = 0x00EE
+0x2B43 = 0x01D0
+0x2B45 = 0x012B
+0x2B46 = 0x012F
+0x2B47 = 0x0129
+0x2B48 = 0x0135
+0x2B49 = 0x0137
+0x2B4A = 0x013A
+0x2B4B = 0x013E
+0x2B4C = 0x013C
+0x2B4D = 0x0144
+0x2B4E = 0x0148
+0x2B4F = 0x0146
+0x2B50 = 0x00F1
+0x2B51 = 0x00F3
+0x2B52 = 0x00F2
+0x2B53 = 0x00F6
+0x2B54 = 0x00F4
+0x2B55 = 0x01D2
+0x2B56 = 0x0151
+0x2B57 = 0x014D
+0x2B58 = 0x00F5
+0x2B59 = 0x0155
+0x2B5A = 0x0159
+0x2B5B = 0x0157
+0x2B5C = 0x015B
+0x2B5D = 0x015D
+0x2B5E = 0x0161
+0x2B5F = 0x015F
+0x2B60 = 0x0165
+0x2B61 = 0x0163
+0x2B62 = 0x00FA
+0x2B63 = 0x00F9
+0x2B64 = 0x00FC
+0x2B65 = 0x00FB
+0x2B66 = 0x016D
+0x2B67 = 0x01D4
+0x2B68 = 0x0171
+0x2B69 = 0x016B
+0x2B6A = 0x0173
+0x2B6B = 0x016F
+0x2B6C = 0x0169
+0x2B6D = 0x01D8
+0x2B6E = 0x01DC
+0x2B6F = 0x01DA
+0x2B70 = 0x01D6
+0x2B71 = 0x0175
+0x2B72 = 0x00FD
+0x2B73 = 0x00FF
+0x2B74 = 0x0177
+0x2B75 = 0x017A
+0x2B76 = 0x017E
+0x2B77 = 0x017C
+0x3021 = 0x4E02
+0x3022 = 0x4E04
+0x3023 = 0x4E05
+0x3024 = 0x4E0C
+0x3025 = 0x4E12
+0x3026 = 0x4E1F
+0x3027 = 0x4E23
+0x3028 = 0x4E24
+0x3029 = 0x4E28
+0x302A = 0x4E2B
+0x302B = 0x4E2E
+0x302C = 0x4E2F
+0x302D = 0x4E30
+0x302E = 0x4E35
+0x302F = 0x4E40
+0x3030 = 0x4E41
+0x3031 = 0x4E44
+0x3032 = 0x4E47
+0x3033 = 0x4E51
+0x3034 = 0x4E5A
+0x3035 = 0x4E5C
+0x3036 = 0x4E63
+0x3037 = 0x4E68
+0x3038 = 0x4E69
+0x3039 = 0x4E74
+0x303A = 0x4E75
+0x303B = 0x4E79
+0x303C = 0x4E7F
+0x303D = 0x4E8D
+0x303E = 0x4E96
+0x303F = 0x4E97
+0x3040 = 0x4E9D
+0x3041 = 0x4EAF
+0x3042 = 0x4EB9
+0x3043 = 0x4EC3
+0x3044 = 0x4ED0
+0x3045 = 0x4EDA
+0x3046 = 0x4EDB
+0x3047 = 0x4EE0
+0x3048 = 0x4EE1
+0x3049 = 0x4EE2
+0x304A = 0x4EE8
+0x304B = 0x4EEF
+0x304C = 0x4EF1
+0x304D = 0x4EF3
+0x304E = 0x4EF5
+0x304F = 0x4EFD
+0x3050 = 0x4EFE
+0x3051 = 0x4EFF
+0x3052 = 0x4F00
+0x3053 = 0x4F02
+0x3054 = 0x4F03
+0x3055 = 0x4F08
+0x3056 = 0x4F0B
+0x3057 = 0x4F0C
+0x3058 = 0x4F12
+0x3059 = 0x4F15
+0x305A = 0x4F16
+0x305B = 0x4F17
+0x305C = 0x4F19
+0x305D = 0x4F2E
+0x305E = 0x4F31
+0x305F = 0x4F60
+0x3060 = 0x4F33
+0x3061 = 0x4F35
+0x3062 = 0x4F37
+0x3063 = 0x4F39
+0x3064 = 0x4F3B
+0x3065 = 0x4F3E
+0x3066 = 0x4F40
+0x3067 = 0x4F42
+0x3068 = 0x4F48
+0x3069 = 0x4F49
+0x306A = 0x4F4B
+0x306B = 0x4F4C
+0x306C = 0x4F52
+0x306D = 0x4F54
+0x306E = 0x4F56
+0x306F = 0x4F58
+0x3070 = 0x4F5F
+0x3071 = 0x4F63
+0x3072 = 0x4F6A
+0x3073 = 0x4F6C
+0x3074 = 0x4F6E
+0x3075 = 0x4F71
+0x3076 = 0x4F77
+0x3077 = 0x4F78
+0x3078 = 0x4F79
+0x3079 = 0x4F7A
+0x307A = 0x4F7D
+0x307B = 0x4F7E
+0x307C = 0x4F81
+0x307D = 0x4F82
+0x307E = 0x4F84
+0x3121 = 0x4F85
+0x3122 = 0x4F89
+0x3123 = 0x4F8A
+0x3124 = 0x4F8C
+0x3125 = 0x4F8E
+0x3126 = 0x4F90
+0x3127 = 0x4F92
+0x3128 = 0x4F93
+0x3129 = 0x4F94
+0x312A = 0x4F97
+0x312B = 0x4F99
+0x312C = 0x4F9A
+0x312D = 0x4F9E
+0x312E = 0x4F9F
+0x312F = 0x4FB2
+0x3130 = 0x4FB7
+0x3131 = 0x4FB9
+0x3132 = 0x4FBB
+0x3133 = 0x4FBC
+0x3134 = 0x4FBD
+0x3135 = 0x4FBE
+0x3136 = 0x4FC0
+0x3137 = 0x4FC1
+0x3138 = 0x4FC5
+0x3139 = 0x4FC6
+0x313A = 0x4FC8
+0x313B = 0x4FC9
+0x313C = 0x4FCB
+0x313D = 0x4FCC
+0x313E = 0x4FCD
+0x313F = 0x4FCF
+0x3140 = 0x4FD2
+0x3141 = 0x4FDC
+0x3142 = 0x4FE0
+0x3143 = 0x4FE2
+0x3144 = 0x4FF0
+0x3145 = 0x4FF2
+0x3146 = 0x4FFC
+0x3147 = 0x4FFD
+0x3148 = 0x4FFF
+0x3149 = 0x5000
+0x314A = 0x5001
+0x314B = 0x5004
+0x314C = 0x5007
+0x314D = 0x500A
+0x314E = 0x500C
+0x314F = 0x500E
+0x3150 = 0x5010
+0x3151 = 0x5013
+0x3152 = 0x5017
+0x3153 = 0x5018
+0x3154 = 0x501B
+0x3155 = 0x501C
+0x3156 = 0x501D
+0x3157 = 0x501E
+0x3158 = 0x5022
+0x3159 = 0x5027
+0x315A = 0x502E
+0x315B = 0x5030
+0x315C = 0x5032
+0x315D = 0x5033
+0x315E = 0x5035
+0x315F = 0x5040
+0x3160 = 0x5041
+0x3161 = 0x5042
+0x3162 = 0x5045
+0x3163 = 0x5046
+0x3164 = 0x504A
+0x3165 = 0x504C
+0x3166 = 0x504E
+0x3167 = 0x5051
+0x3168 = 0x5052
+0x3169 = 0x5053
+0x316A = 0x5057
+0x316B = 0x5059
+0x316C = 0x505F
+0x316D = 0x5060
+0x316E = 0x5062
+0x316F = 0x5063
+0x3170 = 0x5066
+0x3171 = 0x5067
+0x3172 = 0x506A
+0x3173 = 0x506D
+0x3174 = 0x5070
+0x3175 = 0x5071
+0x3176 = 0x503B
+0x3177 = 0x5081
+0x3178 = 0x5083
+0x3179 = 0x5084
+0x317A = 0x5086
+0x317B = 0x508A
+0x317C = 0x508E
+0x317D = 0x508F
+0x317E = 0x5090
+0x3221 = 0x5092
+0x3222 = 0x5093
+0x3223 = 0x5094
+0x3224 = 0x5096
+0x3225 = 0x509B
+0x3226 = 0x509C
+0x3227 = 0x509E
+0x3228 = 0x509F
+0x3229 = 0x50A0
+0x322A = 0x50A1
+0x322B = 0x50A2
+0x322C = 0x50AA
+0x322D = 0x50AF
+0x322E = 0x50B0
+0x322F = 0x50B9
+0x3230 = 0x50BA
+0x3231 = 0x50BD
+0x3232 = 0x50C0
+0x3233 = 0x50C3
+0x3234 = 0x50C4
+0x3235 = 0x50C7
+0x3236 = 0x50CC
+0x3237 = 0x50CE
+0x3238 = 0x50D0
+0x3239 = 0x50D3
+0x323A = 0x50D4
+0x323B = 0x50D8
+0x323C = 0x50DC
+0x323D = 0x50DD
+0x323E = 0x50DF
+0x323F = 0x50E2
+0x3240 = 0x50E4
+0x3241 = 0x50E6
+0x3242 = 0x50E8
+0x3243 = 0x50E9
+0x3244 = 0x50EF
+0x3245 = 0x50F1
+0x3246 = 0x50F6
+0x3247 = 0x50FA
+0x3248 = 0x50FE
+0x3249 = 0x5103
+0x324A = 0x5106
+0x324B = 0x5107
+0x324C = 0x5108
+0x324D = 0x510B
+0x324E = 0x510C
+0x324F = 0x510D
+0x3250 = 0x510E
+0x3251 = 0x50F2
+0x3252 = 0x5110
+0x3253 = 0x5117
+0x3254 = 0x5119
+0x3255 = 0x511B
+0x3256 = 0x511C
+0x3257 = 0x511D
+0x3258 = 0x511E
+0x3259 = 0x5123
+0x325A = 0x5127
+0x325B = 0x5128
+0x325C = 0x512C
+0x325D = 0x512D
+0x325E = 0x512F
+0x325F = 0x5131
+0x3260 = 0x5133
+0x3261 = 0x5134
+0x3262 = 0x5135
+0x3263 = 0x5138
+0x3264 = 0x5139
+0x3265 = 0x5142
+0x3266 = 0x514A
+0x3267 = 0x514F
+0x3268 = 0x5153
+0x3269 = 0x5155
+0x326A = 0x5157
+0x326B = 0x5158
+0x326C = 0x515F
+0x326D = 0x5164
+0x326E = 0x5166
+0x326F = 0x517E
+0x3270 = 0x5183
+0x3271 = 0x5184
+0x3272 = 0x518B
+0x3273 = 0x518E
+0x3274 = 0x5198
+0x3275 = 0x519D
+0x3276 = 0x51A1
+0x3277 = 0x51A3
+0x3278 = 0x51AD
+0x3279 = 0x51B8
+0x327A = 0x51BA
+0x327B = 0x51BC
+0x327C = 0x51BE
+0x327D = 0x51BF
+0x327E = 0x51C2
+0x3321 = 0x51C8
+0x3322 = 0x51CF
+0x3323 = 0x51D1
+0x3324 = 0x51D2
+0x3325 = 0x51D3
+0x3326 = 0x51D5
+0x3327 = 0x51D8
+0x3328 = 0x51DE
+0x3329 = 0x51E2
+0x332A = 0x51E5
+0x332B = 0x51EE
+0x332C = 0x51F2
+0x332D = 0x51F3
+0x332E = 0x51F4
+0x332F = 0x51F7
+0x3330 = 0x5201
+0x3331 = 0x5202
+0x3332 = 0x5205
+0x3333 = 0x5212
+0x3334 = 0x5213
+0x3335 = 0x5215
+0x3336 = 0x5216
+0x3337 = 0x5218
+0x3338 = 0x5222
+0x3339 = 0x5228
+0x333A = 0x5231
+0x333B = 0x5232
+0x333C = 0x5235
+0x333D = 0x523C
+0x333E = 0x5245
+0x333F = 0x5249
+0x3340 = 0x5255
+0x3341 = 0x5257
+0x3342 = 0x5258
+0x3343 = 0x525A
+0x3344 = 0x525C
+0x3345 = 0x525F
+0x3346 = 0x5260
+0x3347 = 0x5261
+0x3348 = 0x5266
+0x3349 = 0x526E
+0x334A = 0x5277
+0x334B = 0x5278
+0x334C = 0x5279
+0x334D = 0x5280
+0x334E = 0x5282
+0x334F = 0x5285
+0x3350 = 0x528A
+0x3351 = 0x528C
+0x3352 = 0x5293
+0x3353 = 0x5295
+0x3354 = 0x5296
+0x3355 = 0x5297
+0x3356 = 0x5298
+0x3357 = 0x529A
+0x3358 = 0x529C
+0x3359 = 0x52A4
+0x335A = 0x52A5
+0x335B = 0x52A6
+0x335C = 0x52A7
+0x335D = 0x52AF
+0x335E = 0x52B0
+0x335F = 0x52B6
+0x3360 = 0x52B7
+0x3361 = 0x52B8
+0x3362 = 0x52BA
+0x3363 = 0x52BB
+0x3364 = 0x52BD
+0x3365 = 0x52C0
+0x3366 = 0x52C4
+0x3367 = 0x52C6
+0x3368 = 0x52C8
+0x3369 = 0x52CC
+0x336A = 0x52CF
+0x336B = 0x52D1
+0x336C = 0x52D4
+0x336D = 0x52D6
+0x336E = 0x52DB
+0x336F = 0x52DC
+0x3370 = 0x52E1
+0x3371 = 0x52E5
+0x3372 = 0x52E8
+0x3373 = 0x52E9
+0x3374 = 0x52EA
+0x3375 = 0x52EC
+0x3376 = 0x52F0
+0x3377 = 0x52F1
+0x3378 = 0x52F4
+0x3379 = 0x52F6
+0x337A = 0x52F7
+0x337B = 0x5300
+0x337C = 0x5303
+0x337D = 0x530A
+0x337E = 0x530B
+0x3421 = 0x530C
+0x3422 = 0x5311
+0x3423 = 0x5313
+0x3424 = 0x5318
+0x3425 = 0x531B
+0x3426 = 0x531C
+0x3427 = 0x531E
+0x3428 = 0x531F
+0x3429 = 0x5325
+0x342A = 0x5327
+0x342B = 0x5328
+0x342C = 0x5329
+0x342D = 0x532B
+0x342E = 0x532C
+0x342F = 0x532D
+0x3430 = 0x5330
+0x3431 = 0x5332
+0x3432 = 0x5335
+0x3433 = 0x533C
+0x3434 = 0x533D
+0x3435 = 0x533E
+0x3436 = 0x5342
+0x3437 = 0x534C
+0x3438 = 0x534B
+0x3439 = 0x5359
+0x343A = 0x535B
+0x343B = 0x5361
+0x343C = 0x5363
+0x343D = 0x5365
+0x343E = 0x536C
+0x343F = 0x536D
+0x3440 = 0x5372
+0x3441 = 0x5379
+0x3442 = 0x537E
+0x3443 = 0x5383
+0x3444 = 0x5387
+0x3445 = 0x5388
+0x3446 = 0x538E
+0x3447 = 0x5393
+0x3448 = 0x5394
+0x3449 = 0x5399
+0x344A = 0x539D
+0x344B = 0x53A1
+0x344C = 0x53A4
+0x344D = 0x53AA
+0x344E = 0x53AB
+0x344F = 0x53AF
+0x3450 = 0x53B2
+0x3451 = 0x53B4
+0x3452 = 0x53B5
+0x3453 = 0x53B7
+0x3454 = 0x53B8
+0x3455 = 0x53BA
+0x3456 = 0x53BD
+0x3457 = 0x53C0
+0x3458 = 0x53C5
+0x3459 = 0x53CF
+0x345A = 0x53D2
+0x345B = 0x53D3
+0x345C = 0x53D5
+0x345D = 0x53DA
+0x345E = 0x53DD
+0x345F = 0x53DE
+0x3460 = 0x53E0
+0x3461 = 0x53E6
+0x3462 = 0x53E7
+0x3463 = 0x53F5
+0x3464 = 0x5402
+0x3465 = 0x5413
+0x3466 = 0x541A
+0x3467 = 0x5421
+0x3468 = 0x5427
+0x3469 = 0x5428
+0x346A = 0x542A
+0x346B = 0x542F
+0x346C = 0x5431
+0x346D = 0x5434
+0x346E = 0x5435
+0x346F = 0x5443
+0x3470 = 0x5444
+0x3471 = 0x5447
+0x3472 = 0x544D
+0x3473 = 0x544F
+0x3474 = 0x545E
+0x3475 = 0x5462
+0x3476 = 0x5464
+0x3477 = 0x5466
+0x3478 = 0x5467
+0x3479 = 0x5469
+0x347A = 0x546B
+0x347B = 0x546D
+0x347C = 0x546E
+0x347D = 0x5474
+0x347E = 0x547F
+0x3521 = 0x5481
+0x3522 = 0x5483
+0x3523 = 0x5485
+0x3524 = 0x5488
+0x3525 = 0x5489
+0x3526 = 0x548D
+0x3527 = 0x5491
+0x3528 = 0x5495
+0x3529 = 0x5496
+0x352A = 0x549C
+0x352B = 0x549F
+0x352C = 0x54A1
+0x352D = 0x54A6
+0x352E = 0x54A7
+0x352F = 0x54A9
+0x3530 = 0x54AA
+0x3531 = 0x54AD
+0x3532 = 0x54AE
+0x3533 = 0x54B1
+0x3534 = 0x54B7
+0x3535 = 0x54B9
+0x3536 = 0x54BA
+0x3537 = 0x54BB
+0x3538 = 0x54BF
+0x3539 = 0x54C6
+0x353A = 0x54CA
+0x353B = 0x54CD
+0x353C = 0x54CE
+0x353D = 0x54E0
+0x353E = 0x54EA
+0x353F = 0x54EC
+0x3540 = 0x54EF
+0x3541 = 0x54F6
+0x3542 = 0x54FC
+0x3543 = 0x54FE
+0x3544 = 0x54FF
+0x3545 = 0x5500
+0x3546 = 0x5501
+0x3547 = 0x5505
+0x3548 = 0x5508
+0x3549 = 0x5509
+0x354A = 0x550C
+0x354B = 0x550D
+0x354C = 0x550E
+0x354D = 0x5515
+0x354E = 0x552A
+0x354F = 0x552B
+0x3550 = 0x5532
+0x3551 = 0x5535
+0x3552 = 0x5536
+0x3553 = 0x553B
+0x3554 = 0x553C
+0x3555 = 0x553D
+0x3556 = 0x5541
+0x3557 = 0x5547
+0x3558 = 0x5549
+0x3559 = 0x554A
+0x355A = 0x554D
+0x355B = 0x5550
+0x355C = 0x5551
+0x355D = 0x5558
+0x355E = 0x555A
+0x355F = 0x555B
+0x3560 = 0x555E
+0x3561 = 0x5560
+0x3562 = 0x5561
+0x3563 = 0x5564
+0x3564 = 0x5566
+0x3565 = 0x557F
+0x3566 = 0x5581
+0x3567 = 0x5582
+0x3568 = 0x5586
+0x3569 = 0x5588
+0x356A = 0x558E
+0x356B = 0x558F
+0x356C = 0x5591
+0x356D = 0x5592
+0x356E = 0x5593
+0x356F = 0x5594
+0x3570 = 0x5597
+0x3571 = 0x55A3
+0x3572 = 0x55A4
+0x3573 = 0x55AD
+0x3574 = 0x55B2
+0x3575 = 0x55BF
+0x3576 = 0x55C1
+0x3577 = 0x55C3
+0x3578 = 0x55C6
+0x3579 = 0x55C9
+0x357A = 0x55CB
+0x357B = 0x55CC
+0x357C = 0x55CE
+0x357D = 0x55D1
+0x357E = 0x55D2
+0x3621 = 0x55D3
+0x3622 = 0x55D7
+0x3623 = 0x55D8
+0x3624 = 0x55DB
+0x3625 = 0x55DE
+0x3626 = 0x55E2
+0x3627 = 0x55E9
+0x3628 = 0x55F6
+0x3629 = 0x55FF
+0x362A = 0x5605
+0x362B = 0x5608
+0x362C = 0x560A
+0x362D = 0x560D
+0x362E = 0x560E
+0x362F = 0x560F
+0x3630 = 0x5610
+0x3631 = 0x5611
+0x3632 = 0x5612
+0x3633 = 0x5619
+0x3634 = 0x562C
+0x3635 = 0x5630
+0x3636 = 0x5633
+0x3637 = 0x5635
+0x3638 = 0x5637
+0x3639 = 0x5639
+0x363A = 0x563B
+0x363B = 0x563C
+0x363C = 0x563D
+0x363D = 0x563F
+0x363E = 0x5640
+0x363F = 0x5641
+0x3640 = 0x5643
+0x3641 = 0x5644
+0x3642 = 0x5646
+0x3643 = 0x5649
+0x3644 = 0x564B
+0x3645 = 0x564D
+0x3646 = 0x564F
+0x3647 = 0x5654
+0x3648 = 0x565E
+0x3649 = 0x5660
+0x364A = 0x5661
+0x364B = 0x5662
+0x364C = 0x5663
+0x364D = 0x5666
+0x364E = 0x5669
+0x364F = 0x566D
+0x3650 = 0x566F
+0x3651 = 0x5671
+0x3652 = 0x5672
+0x3653 = 0x5675
+0x3654 = 0x5684
+0x3655 = 0x5685
+0x3656 = 0x5688
+0x3657 = 0x568B
+0x3658 = 0x568C
+0x3659 = 0x5695
+0x365A = 0x5699
+0x365B = 0x569A
+0x365C = 0x569D
+0x365D = 0x569E
+0x365E = 0x569F
+0x365F = 0x56A6
+0x3660 = 0x56A7
+0x3661 = 0x56A8
+0x3662 = 0x56A9
+0x3663 = 0x56AB
+0x3664 = 0x56AC
+0x3665 = 0x56AD
+0x3666 = 0x56B1
+0x3667 = 0x56B3
+0x3668 = 0x56B7
+0x3669 = 0x56BE
+0x366A = 0x56C5
+0x366B = 0x56C9
+0x366C = 0x56CA
+0x366D = 0x56CB
+0x366E = 0x56CF
+0x366F = 0x56D0
+0x3670 = 0x56CC
+0x3671 = 0x56CD
+0x3672 = 0x56D9
+0x3673 = 0x56DC
+0x3674 = 0x56DD
+0x3675 = 0x56DF
+0x3676 = 0x56E1
+0x3677 = 0x56E4
+0x3678 = 0x56E5
+0x3679 = 0x56E6
+0x367A = 0x56E7
+0x367B = 0x56E8
+0x367C = 0x56F1
+0x367D = 0x56EB
+0x367E = 0x56ED
+0x3721 = 0x56F6
+0x3722 = 0x56F7
+0x3723 = 0x5701
+0x3724 = 0x5702
+0x3725 = 0x5707
+0x3726 = 0x570A
+0x3727 = 0x570C
+0x3728 = 0x5711
+0x3729 = 0x5715
+0x372A = 0x571A
+0x372B = 0x571B
+0x372C = 0x571D
+0x372D = 0x5720
+0x372E = 0x5722
+0x372F = 0x5723
+0x3730 = 0x5724
+0x3731 = 0x5725
+0x3732 = 0x5729
+0x3733 = 0x572A
+0x3734 = 0x572C
+0x3735 = 0x572E
+0x3736 = 0x572F
+0x3737 = 0x5733
+0x3738 = 0x5734
+0x3739 = 0x573D
+0x373A = 0x573E
+0x373B = 0x573F
+0x373C = 0x5745
+0x373D = 0x5746
+0x373E = 0x574C
+0x373F = 0x574D
+0x3740 = 0x5752
+0x3741 = 0x5762
+0x3742 = 0x5765
+0x3743 = 0x5767
+0x3744 = 0x5768
+0x3745 = 0x576B
+0x3746 = 0x576D
+0x3747 = 0x576E
+0x3748 = 0x576F
+0x3749 = 0x5770
+0x374A = 0x5771
+0x374B = 0x5773
+0x374C = 0x5774
+0x374D = 0x5775
+0x374E = 0x5777
+0x374F = 0x5779
+0x3750 = 0x577A
+0x3751 = 0x577B
+0x3752 = 0x577C
+0x3753 = 0x577E
+0x3754 = 0x5781
+0x3755 = 0x5783
+0x3756 = 0x578C
+0x3757 = 0x5794
+0x3758 = 0x5797
+0x3759 = 0x5799
+0x375A = 0x579A
+0x375B = 0x579C
+0x375C = 0x579D
+0x375D = 0x579E
+0x375E = 0x579F
+0x375F = 0x57A1
+0x3760 = 0x5795
+0x3761 = 0x57A7
+0x3762 = 0x57A8
+0x3763 = 0x57A9
+0x3764 = 0x57AC
+0x3765 = 0x57B8
+0x3766 = 0x57BD
+0x3767 = 0x57C7
+0x3768 = 0x57C8
+0x3769 = 0x57CC
+0x376A = 0x57CF
+0x376B = 0x57D5
+0x376C = 0x57DD
+0x376D = 0x57DE
+0x376E = 0x57E4
+0x376F = 0x57E6
+0x3770 = 0x57E7
+0x3771 = 0x57E9
+0x3772 = 0x57ED
+0x3773 = 0x57F0
+0x3774 = 0x57F5
+0x3775 = 0x57F6
+0x3776 = 0x57F8
+0x3777 = 0x57FD
+0x3778 = 0x57FE
+0x3779 = 0x57FF
+0x377A = 0x5803
+0x377B = 0x5804
+0x377C = 0x5808
+0x377D = 0x5809
+0x377E = 0x57E1
+0x3821 = 0x580C
+0x3822 = 0x580D
+0x3823 = 0x581B
+0x3824 = 0x581E
+0x3825 = 0x581F
+0x3826 = 0x5820
+0x3827 = 0x5826
+0x3828 = 0x5827
+0x3829 = 0x582D
+0x382A = 0x5832
+0x382B = 0x5839
+0x382C = 0x583F
+0x382D = 0x5849
+0x382E = 0x584C
+0x382F = 0x584D
+0x3830 = 0x584F
+0x3831 = 0x5850
+0x3832 = 0x5855
+0x3833 = 0x585F
+0x3834 = 0x5861
+0x3835 = 0x5864
+0x3836 = 0x5867
+0x3837 = 0x5868
+0x3838 = 0x5878
+0x3839 = 0x587C
+0x383A = 0x587F
+0x383B = 0x5880
+0x383C = 0x5881
+0x383D = 0x5887
+0x383E = 0x5888
+0x383F = 0x5889
+0x3840 = 0x588A
+0x3841 = 0x588C
+0x3842 = 0x588D
+0x3843 = 0x588F
+0x3844 = 0x5890
+0x3845 = 0x5894
+0x3846 = 0x5896
+0x3847 = 0x589D
+0x3848 = 0x58A0
+0x3849 = 0x58A1
+0x384A = 0x58A2
+0x384B = 0x58A6
+0x384C = 0x58A9
+0x384D = 0x58B1
+0x384E = 0x58B2
+0x384F = 0x58C4
+0x3850 = 0x58BC
+0x3851 = 0x58C2
+0x3852 = 0x58C8
+0x3853 = 0x58CD
+0x3854 = 0x58CE
+0x3855 = 0x58D0
+0x3856 = 0x58D2
+0x3857 = 0x58D4
+0x3858 = 0x58D6
+0x3859 = 0x58DA
+0x385A = 0x58DD
+0x385B = 0x58E1
+0x385C = 0x58E2
+0x385D = 0x58E9
+0x385E = 0x58F3
+0x385F = 0x5905
+0x3860 = 0x5906
+0x3861 = 0x590B
+0x3862 = 0x590C
+0x3863 = 0x5912
+0x3864 = 0x5913
+0x3865 = 0x5914
+0x3866 = 0x8641
+0x3867 = 0x591D
+0x3868 = 0x5921
+0x3869 = 0x5923
+0x386A = 0x5924
+0x386B = 0x5928
+0x386C = 0x592F
+0x386D = 0x5930
+0x386E = 0x5933
+0x386F = 0x5935
+0x3870 = 0x5936
+0x3871 = 0x593F
+0x3872 = 0x5943
+0x3873 = 0x5946
+0x3874 = 0x5952
+0x3875 = 0x5953
+0x3876 = 0x5959
+0x3877 = 0x595B
+0x3878 = 0x595D
+0x3879 = 0x595E
+0x387A = 0x595F
+0x387B = 0x5961
+0x387C = 0x5963
+0x387D = 0x596B
+0x387E = 0x596D
+0x3921 = 0x596F
+0x3922 = 0x5972
+0x3923 = 0x5975
+0x3924 = 0x5976
+0x3925 = 0x5979
+0x3926 = 0x597B
+0x3927 = 0x597C
+0x3928 = 0x598B
+0x3929 = 0x598C
+0x392A = 0x598E
+0x392B = 0x5992
+0x392C = 0x5995
+0x392D = 0x5997
+0x392E = 0x599F
+0x392F = 0x59A4
+0x3930 = 0x59A7
+0x3931 = 0x59AD
+0x3932 = 0x59AE
+0x3933 = 0x59AF
+0x3934 = 0x59B0
+0x3935 = 0x59B3
+0x3936 = 0x59B7
+0x3937 = 0x59BA
+0x3938 = 0x59BC
+0x3939 = 0x59C1
+0x393A = 0x59C3
+0x393B = 0x59C4
+0x393C = 0x59C8
+0x393D = 0x59CA
+0x393E = 0x59CD
+0x393F = 0x59D2
+0x3940 = 0x59DD
+0x3941 = 0x59DE
+0x3942 = 0x59DF
+0x3943 = 0x59E3
+0x3944 = 0x59E4
+0x3945 = 0x59E7
+0x3946 = 0x59EE
+0x3947 = 0x59EF
+0x3948 = 0x59F1
+0x3949 = 0x59F2
+0x394A = 0x59F4
+0x394B = 0x59F7
+0x394C = 0x5A00
+0x394D = 0x5A04
+0x394E = 0x5A0C
+0x394F = 0x5A0D
+0x3950 = 0x5A0E
+0x3951 = 0x5A12
+0x3952 = 0x5A13
+0x3953 = 0x5A1E
+0x3954 = 0x5A23
+0x3955 = 0x5A24
+0x3956 = 0x5A27
+0x3957 = 0x5A28
+0x3958 = 0x5A2A
+0x3959 = 0x5A2D
+0x395A = 0x5A30
+0x395B = 0x5A44
+0x395C = 0x5A45
+0x395D = 0x5A47
+0x395E = 0x5A48
+0x395F = 0x5A4C
+0x3960 = 0x5A50
+0x3961 = 0x5A55
+0x3962 = 0x5A5E
+0x3963 = 0x5A63
+0x3964 = 0x5A65
+0x3965 = 0x5A67
+0x3966 = 0x5A6D
+0x3967 = 0x5A77
+0x3968 = 0x5A7A
+0x3969 = 0x5A7B
+0x396A = 0x5A7E
+0x396B = 0x5A8B
+0x396C = 0x5A90
+0x396D = 0x5A93
+0x396E = 0x5A96
+0x396F = 0x5A99
+0x3970 = 0x5A9C
+0x3971 = 0x5A9E
+0x3972 = 0x5A9F
+0x3973 = 0x5AA0
+0x3974 = 0x5AA2
+0x3975 = 0x5AA7
+0x3976 = 0x5AAC
+0x3977 = 0x5AB1
+0x3978 = 0x5AB2
+0x3979 = 0x5AB3
+0x397A = 0x5AB5
+0x397B = 0x5AB8
+0x397C = 0x5ABA
+0x397D = 0x5ABB
+0x397E = 0x5ABF
+0x3A21 = 0x5AC4
+0x3A22 = 0x5AC6
+0x3A23 = 0x5AC8
+0x3A24 = 0x5ACF
+0x3A25 = 0x5ADA
+0x3A26 = 0x5ADC
+0x3A27 = 0x5AE0
+0x3A28 = 0x5AE5
+0x3A29 = 0x5AEA
+0x3A2A = 0x5AEE
+0x3A2B = 0x5AF5
+0x3A2C = 0x5AF6
+0x3A2D = 0x5AFD
+0x3A2E = 0x5B00
+0x3A2F = 0x5B01
+0x3A30 = 0x5B08
+0x3A31 = 0x5B17
+0x3A32 = 0x5B34
+0x3A33 = 0x5B19
+0x3A34 = 0x5B1B
+0x3A35 = 0x5B1D
+0x3A36 = 0x5B21
+0x3A37 = 0x5B25
+0x3A38 = 0x5B2D
+0x3A39 = 0x5B38
+0x3A3A = 0x5B41
+0x3A3B = 0x5B4B
+0x3A3C = 0x5B4C
+0x3A3D = 0x5B52
+0x3A3E = 0x5B56
+0x3A3F = 0x5B5E
+0x3A40 = 0x5B68
+0x3A41 = 0x5B6E
+0x3A42 = 0x5B6F
+0x3A43 = 0x5B7C
+0x3A44 = 0x5B7D
+0x3A45 = 0x5B7E
+0x3A46 = 0x5B7F
+0x3A47 = 0x5B81
+0x3A48 = 0x5B84
+0x3A49 = 0x5B86
+0x3A4A = 0x5B8A
+0x3A4B = 0x5B8E
+0x3A4C = 0x5B90
+0x3A4D = 0x5B91
+0x3A4E = 0x5B93
+0x3A4F = 0x5B94
+0x3A50 = 0x5B96
+0x3A51 = 0x5BA8
+0x3A52 = 0x5BA9
+0x3A53 = 0x5BAC
+0x3A54 = 0x5BAD
+0x3A55 = 0x5BAF
+0x3A56 = 0x5BB1
+0x3A57 = 0x5BB2
+0x3A58 = 0x5BB7
+0x3A59 = 0x5BBA
+0x3A5A = 0x5BBC
+0x3A5B = 0x5BC0
+0x3A5C = 0x5BC1
+0x3A5D = 0x5BCD
+0x3A5E = 0x5BCF
+0x3A5F = 0x5BD6
+0x3A60 = 0x5BD7
+0x3A61 = 0x5BD8
+0x3A62 = 0x5BD9
+0x3A63 = 0x5BDA
+0x3A64 = 0x5BE0
+0x3A65 = 0x5BEF
+0x3A66 = 0x5BF1
+0x3A67 = 0x5BF4
+0x3A68 = 0x5BFD
+0x3A69 = 0x5C0C
+0x3A6A = 0x5C17
+0x3A6B = 0x5C1E
+0x3A6C = 0x5C1F
+0x3A6D = 0x5C23
+0x3A6E = 0x5C26
+0x3A6F = 0x5C29
+0x3A70 = 0x5C2B
+0x3A71 = 0x5C2C
+0x3A72 = 0x5C2E
+0x3A73 = 0x5C30
+0x3A74 = 0x5C32
+0x3A75 = 0x5C35
+0x3A76 = 0x5C36
+0x3A77 = 0x5C59
+0x3A78 = 0x5C5A
+0x3A79 = 0x5C5C
+0x3A7A = 0x5C62
+0x3A7B = 0x5C63
+0x3A7C = 0x5C67
+0x3A7D = 0x5C68
+0x3A7E = 0x5C69
+0x3B21 = 0x5C6D
+0x3B22 = 0x5C70
+0x3B23 = 0x5C74
+0x3B24 = 0x5C75
+0x3B25 = 0x5C7A
+0x3B26 = 0x5C7B
+0x3B27 = 0x5C7C
+0x3B28 = 0x5C7D
+0x3B29 = 0x5C87
+0x3B2A = 0x5C88
+0x3B2B = 0x5C8A
+0x3B2C = 0x5C8F
+0x3B2D = 0x5C92
+0x3B2E = 0x5C9D
+0x3B2F = 0x5C9F
+0x3B30 = 0x5CA0
+0x3B31 = 0x5CA2
+0x3B32 = 0x5CA3
+0x3B33 = 0x5CA6
+0x3B34 = 0x5CAA
+0x3B35 = 0x5CB2
+0x3B36 = 0x5CB4
+0x3B37 = 0x5CB5
+0x3B38 = 0x5CBA
+0x3B39 = 0x5CC9
+0x3B3A = 0x5CCB
+0x3B3B = 0x5CD2
+0x3B3C = 0x5CDD
+0x3B3D = 0x5CD7
+0x3B3E = 0x5CEE
+0x3B3F = 0x5CF1
+0x3B40 = 0x5CF2
+0x3B41 = 0x5CF4
+0x3B42 = 0x5D01
+0x3B43 = 0x5D06
+0x3B44 = 0x5D0D
+0x3B45 = 0x5D12
+0x3B46 = 0x5D2B
+0x3B47 = 0x5D23
+0x3B48 = 0x5D24
+0x3B49 = 0x5D26
+0x3B4A = 0x5D27
+0x3B4B = 0x5D31
+0x3B4C = 0x5D34
+0x3B4D = 0x5D39
+0x3B4E = 0x5D3D
+0x3B4F = 0x5D3F
+0x3B50 = 0x5D42
+0x3B51 = 0x5D43
+0x3B52 = 0x5D46
+0x3B53 = 0x5D48
+0x3B54 = 0x5D55
+0x3B55 = 0x5D51
+0x3B56 = 0x5D59
+0x3B57 = 0x5D4A
+0x3B58 = 0x5D5F
+0x3B59 = 0x5D60
+0x3B5A = 0x5D61
+0x3B5B = 0x5D62
+0x3B5C = 0x5D64
+0x3B5D = 0x5D6A
+0x3B5E = 0x5D6D
+0x3B5F = 0x5D70
+0x3B60 = 0x5D79
+0x3B61 = 0x5D7A
+0x3B62 = 0x5D7E
+0x3B63 = 0x5D7F
+0x3B64 = 0x5D81
+0x3B65 = 0x5D83
+0x3B66 = 0x5D88
+0x3B67 = 0x5D8A
+0x3B68 = 0x5D92
+0x3B69 = 0x5D93
+0x3B6A = 0x5D94
+0x3B6B = 0x5D95
+0x3B6C = 0x5D99
+0x3B6D = 0x5D9B
+0x3B6E = 0x5D9F
+0x3B6F = 0x5DA0
+0x3B70 = 0x5DA7
+0x3B71 = 0x5DAB
+0x3B72 = 0x5DB0
+0x3B73 = 0x5DB4
+0x3B74 = 0x5DB8
+0x3B75 = 0x5DB9
+0x3B76 = 0x5DC3
+0x3B77 = 0x5DC7
+0x3B78 = 0x5DCB
+0x3B79 = 0x5DD0
+0x3B7A = 0x5DCE
+0x3B7B = 0x5DD8
+0x3B7C = 0x5DD9
+0x3B7D = 0x5DE0
+0x3B7E = 0x5DE4
+0x3C21 = 0x5DE9
+0x3C22 = 0x5DF8
+0x3C23 = 0x5DF9
+0x3C24 = 0x5E00
+0x3C25 = 0x5E07
+0x3C26 = 0x5E0D
+0x3C27 = 0x5E12
+0x3C28 = 0x5E14
+0x3C29 = 0x5E15
+0x3C2A = 0x5E18
+0x3C2B = 0x5E1F
+0x3C2C = 0x5E20
+0x3C2D = 0x5E2E
+0x3C2E = 0x5E28
+0x3C2F = 0x5E32
+0x3C30 = 0x5E35
+0x3C31 = 0x5E3E
+0x3C32 = 0x5E4B
+0x3C33 = 0x5E50
+0x3C34 = 0x5E49
+0x3C35 = 0x5E51
+0x3C36 = 0x5E56
+0x3C37 = 0x5E58
+0x3C38 = 0x5E5B
+0x3C39 = 0x5E5C
+0x3C3A = 0x5E5E
+0x3C3B = 0x5E68
+0x3C3C = 0x5E6A
+0x3C3D = 0x5E6B
+0x3C3E = 0x5E6C
+0x3C3F = 0x5E6D
+0x3C40 = 0x5E6E
+0x3C41 = 0x5E70
+0x3C42 = 0x5E80
+0x3C43 = 0x5E8B
+0x3C44 = 0x5E8E
+0x3C45 = 0x5EA2
+0x3C46 = 0x5EA4
+0x3C47 = 0x5EA5
+0x3C48 = 0x5EA8
+0x3C49 = 0x5EAA
+0x3C4A = 0x5EAC
+0x3C4B = 0x5EB1
+0x3C4C = 0x5EB3
+0x3C4D = 0x5EBD
+0x3C4E = 0x5EBE
+0x3C4F = 0x5EBF
+0x3C50 = 0x5EC6
+0x3C51 = 0x5ECC
+0x3C52 = 0x5ECB
+0x3C53 = 0x5ECE
+0x3C54 = 0x5ED1
+0x3C55 = 0x5ED2
+0x3C56 = 0x5ED4
+0x3C57 = 0x5ED5
+0x3C58 = 0x5EDC
+0x3C59 = 0x5EDE
+0x3C5A = 0x5EE5
+0x3C5B = 0x5EEB
+0x3C5C = 0x5F02
+0x3C5D = 0x5F06
+0x3C5E = 0x5F07
+0x3C5F = 0x5F08
+0x3C60 = 0x5F0E
+0x3C61 = 0x5F19
+0x3C62 = 0x5F1C
+0x3C63 = 0x5F1D
+0x3C64 = 0x5F21
+0x3C65 = 0x5F22
+0x3C66 = 0x5F23
+0x3C67 = 0x5F24
+0x3C68 = 0x5F28
+0x3C69 = 0x5F2B
+0x3C6A = 0x5F2C
+0x3C6B = 0x5F2E
+0x3C6C = 0x5F30
+0x3C6D = 0x5F34
+0x3C6E = 0x5F36
+0x3C6F = 0x5F3B
+0x3C70 = 0x5F3D
+0x3C71 = 0x5F3F
+0x3C72 = 0x5F40
+0x3C73 = 0x5F44
+0x3C74 = 0x5F45
+0x3C75 = 0x5F47
+0x3C76 = 0x5F4D
+0x3C77 = 0x5F50
+0x3C78 = 0x5F54
+0x3C79 = 0x5F58
+0x3C7A = 0x5F5B
+0x3C7B = 0x5F60
+0x3C7C = 0x5F63
+0x3C7D = 0x5F64
+0x3C7E = 0x5F67
+0x3D21 = 0x5F6F
+0x3D22 = 0x5F72
+0x3D23 = 0x5F74
+0x3D24 = 0x5F75
+0x3D25 = 0x5F78
+0x3D26 = 0x5F7A
+0x3D27 = 0x5F7D
+0x3D28 = 0x5F7E
+0x3D29 = 0x5F89
+0x3D2A = 0x5F8D
+0x3D2B = 0x5F8F
+0x3D2C = 0x5F96
+0x3D2D = 0x5F9C
+0x3D2E = 0x5F9D
+0x3D2F = 0x5FA2
+0x3D30 = 0x5FA7
+0x3D31 = 0x5FAB
+0x3D32 = 0x5FA4
+0x3D33 = 0x5FAC
+0x3D34 = 0x5FAF
+0x3D35 = 0x5FB0
+0x3D36 = 0x5FB1
+0x3D37 = 0x5FB8
+0x3D38 = 0x5FC4
+0x3D39 = 0x5FC7
+0x3D3A = 0x5FC8
+0x3D3B = 0x5FC9
+0x3D3C = 0x5FCB
+0x3D3D = 0x5FD0
+0x3D3E = 0x5FD1
+0x3D3F = 0x5FD2
+0x3D40 = 0x5FD3
+0x3D41 = 0x5FD4
+0x3D42 = 0x5FDE
+0x3D43 = 0x5FE1
+0x3D44 = 0x5FE2
+0x3D45 = 0x5FE8
+0x3D46 = 0x5FE9
+0x3D47 = 0x5FEA
+0x3D48 = 0x5FEC
+0x3D49 = 0x5FED
+0x3D4A = 0x5FEE
+0x3D4B = 0x5FEF
+0x3D4C = 0x5FF2
+0x3D4D = 0x5FF3
+0x3D4E = 0x5FF6
+0x3D4F = 0x5FFA
+0x3D50 = 0x5FFC
+0x3D51 = 0x6007
+0x3D52 = 0x600A
+0x3D53 = 0x600D
+0x3D54 = 0x6013
+0x3D55 = 0x6014
+0x3D56 = 0x6017
+0x3D57 = 0x6018
+0x3D58 = 0x601A
+0x3D59 = 0x601F
+0x3D5A = 0x6024
+0x3D5B = 0x602D
+0x3D5C = 0x6033
+0x3D5D = 0x6035
+0x3D5E = 0x6040
+0x3D5F = 0x6047
+0x3D60 = 0x6048
+0x3D61 = 0x6049
+0x3D62 = 0x604C
+0x3D63 = 0x6051
+0x3D64 = 0x6054
+0x3D65 = 0x6056
+0x3D66 = 0x6057
+0x3D67 = 0x605D
+0x3D68 = 0x6061
+0x3D69 = 0x6067
+0x3D6A = 0x6071
+0x3D6B = 0x607E
+0x3D6C = 0x607F
+0x3D6D = 0x6082
+0x3D6E = 0x6086
+0x3D6F = 0x6088
+0x3D70 = 0x608A
+0x3D71 = 0x608E
+0x3D72 = 0x6091
+0x3D73 = 0x6093
+0x3D74 = 0x6095
+0x3D75 = 0x6098
+0x3D76 = 0x609D
+0x3D77 = 0x609E
+0x3D78 = 0x60A2
+0x3D79 = 0x60A4
+0x3D7A = 0x60A5
+0x3D7B = 0x60A8
+0x3D7C = 0x60B0
+0x3D7D = 0x60B1
+0x3D7E = 0x60B7
+0x3E21 = 0x60BB
+0x3E22 = 0x60BE
+0x3E23 = 0x60C2
+0x3E24 = 0x60C4
+0x3E25 = 0x60C8
+0x3E26 = 0x60C9
+0x3E27 = 0x60CA
+0x3E28 = 0x60CB
+0x3E29 = 0x60CE
+0x3E2A = 0x60CF
+0x3E2B = 0x60D4
+0x3E2C = 0x60D5
+0x3E2D = 0x60D9
+0x3E2E = 0x60DB
+0x3E2F = 0x60DD
+0x3E30 = 0x60DE
+0x3E31 = 0x60E2
+0x3E32 = 0x60E5
+0x3E33 = 0x60F2
+0x3E34 = 0x60F5
+0x3E35 = 0x60F8
+0x3E36 = 0x60FC
+0x3E37 = 0x60FD
+0x3E38 = 0x6102
+0x3E39 = 0x6107
+0x3E3A = 0x610A
+0x3E3B = 0x610C
+0x3E3C = 0x6110
+0x3E3D = 0x6111
+0x3E3E = 0x6112
+0x3E3F = 0x6113
+0x3E40 = 0x6114
+0x3E41 = 0x6116
+0x3E42 = 0x6117
+0x3E43 = 0x6119
+0x3E44 = 0x611C
+0x3E45 = 0x611E
+0x3E46 = 0x6122
+0x3E47 = 0x612A
+0x3E48 = 0x612B
+0x3E49 = 0x6130
+0x3E4A = 0x6131
+0x3E4B = 0x6135
+0x3E4C = 0x6136
+0x3E4D = 0x6137
+0x3E4E = 0x6139
+0x3E4F = 0x6141
+0x3E50 = 0x6145
+0x3E51 = 0x6146
+0x3E52 = 0x6149
+0x3E53 = 0x615E
+0x3E54 = 0x6160
+0x3E55 = 0x616C
+0x3E56 = 0x6172
+0x3E57 = 0x6178
+0x3E58 = 0x617B
+0x3E59 = 0x617C
+0x3E5A = 0x617F
+0x3E5B = 0x6180
+0x3E5C = 0x6181
+0x3E5D = 0x6183
+0x3E5E = 0x6184
+0x3E5F = 0x618B
+0x3E60 = 0x618D
+0x3E61 = 0x6192
+0x3E62 = 0x6193
+0x3E63 = 0x6197
+0x3E64 = 0x6198
+0x3E65 = 0x619C
+0x3E66 = 0x619D
+0x3E67 = 0x619F
+0x3E68 = 0x61A0
+0x3E69 = 0x61A5
+0x3E6A = 0x61A8
+0x3E6B = 0x61AA
+0x3E6C = 0x61AD
+0x3E6D = 0x61B8
+0x3E6E = 0x61B9
+0x3E6F = 0x61BC
+0x3E70 = 0x61C0
+0x3E71 = 0x61C1
+0x3E72 = 0x61C2
+0x3E73 = 0x61CE
+0x3E74 = 0x61CF
+0x3E75 = 0x61D5
+0x3E76 = 0x61DC
+0x3E77 = 0x61DD
+0x3E78 = 0x61DE
+0x3E79 = 0x61DF
+0x3E7A = 0x61E1
+0x3E7B = 0x61E2
+0x3E7C = 0x61E7
+0x3E7D = 0x61E9
+0x3E7E = 0x61E5
+0x3F21 = 0x61EC
+0x3F22 = 0x61ED
+0x3F23 = 0x61EF
+0x3F24 = 0x6201
+0x3F25 = 0x6203
+0x3F26 = 0x6204
+0x3F27 = 0x6207
+0x3F28 = 0x6213
+0x3F29 = 0x6215
+0x3F2A = 0x621C
+0x3F2B = 0x6220
+0x3F2C = 0x6222
+0x3F2D = 0x6223
+0x3F2E = 0x6227
+0x3F2F = 0x6229
+0x3F30 = 0x622B
+0x3F31 = 0x6239
+0x3F32 = 0x623D
+0x3F33 = 0x6242
+0x3F34 = 0x6243
+0x3F35 = 0x6244
+0x3F36 = 0x6246
+0x3F37 = 0x624C
+0x3F38 = 0x6250
+0x3F39 = 0x6251
+0x3F3A = 0x6252
+0x3F3B = 0x6254
+0x3F3C = 0x6256
+0x3F3D = 0x625A
+0x3F3E = 0x625C
+0x3F3F = 0x6264
+0x3F40 = 0x626D
+0x3F41 = 0x626F
+0x3F42 = 0x6273
+0x3F43 = 0x627A
+0x3F44 = 0x627D
+0x3F45 = 0x628D
+0x3F46 = 0x628E
+0x3F47 = 0x628F
+0x3F48 = 0x6290
+0x3F49 = 0x62A6
+0x3F4A = 0x62A8
+0x3F4B = 0x62B3
+0x3F4C = 0x62B6
+0x3F4D = 0x62B7
+0x3F4E = 0x62BA
+0x3F4F = 0x62BE
+0x3F50 = 0x62BF
+0x3F51 = 0x62C4
+0x3F52 = 0x62CE
+0x3F53 = 0x62D5
+0x3F54 = 0x62D6
+0x3F55 = 0x62DA
+0x3F56 = 0x62EA
+0x3F57 = 0x62F2
+0x3F58 = 0x62F4
+0x3F59 = 0x62FC
+0x3F5A = 0x62FD
+0x3F5B = 0x6303
+0x3F5C = 0x6304
+0x3F5D = 0x630A
+0x3F5E = 0x630B
+0x3F5F = 0x630D
+0x3F60 = 0x6310
+0x3F61 = 0x6313
+0x3F62 = 0x6316
+0x3F63 = 0x6318
+0x3F64 = 0x6329
+0x3F65 = 0x632A
+0x3F66 = 0x632D
+0x3F67 = 0x6335
+0x3F68 = 0x6336
+0x3F69 = 0x6339
+0x3F6A = 0x633C
+0x3F6B = 0x6341
+0x3F6C = 0x6342
+0x3F6D = 0x6343
+0x3F6E = 0x6344
+0x3F6F = 0x6346
+0x3F70 = 0x634A
+0x3F71 = 0x634B
+0x3F72 = 0x634E
+0x3F73 = 0x6352
+0x3F74 = 0x6353
+0x3F75 = 0x6354
+0x3F76 = 0x6358
+0x3F77 = 0x635B
+0x3F78 = 0x6365
+0x3F79 = 0x6366
+0x3F7A = 0x636C
+0x3F7B = 0x636D
+0x3F7C = 0x6371
+0x3F7D = 0x6374
+0x3F7E = 0x6375
+0x4021 = 0x6378
+0x4022 = 0x637C
+0x4023 = 0x637D
+0x4024 = 0x637F
+0x4025 = 0x6382
+0x4026 = 0x6384
+0x4027 = 0x6387
+0x4028 = 0x638A
+0x4029 = 0x6390
+0x402A = 0x6394
+0x402B = 0x6395
+0x402C = 0x6399
+0x402D = 0x639A
+0x402E = 0x639E
+0x402F = 0x63A4
+0x4030 = 0x63A6
+0x4031 = 0x63AD
+0x4032 = 0x63AE
+0x4033 = 0x63AF
+0x4034 = 0x63BD
+0x4035 = 0x63C1
+0x4036 = 0x63C5
+0x4037 = 0x63C8
+0x4038 = 0x63CE
+0x4039 = 0x63D1
+0x403A = 0x63D3
+0x403B = 0x63D4
+0x403C = 0x63D5
+0x403D = 0x63DC
+0x403E = 0x63E0
+0x403F = 0x63E5
+0x4040 = 0x63EA
+0x4041 = 0x63EC
+0x4042 = 0x63F2
+0x4043 = 0x63F3
+0x4044 = 0x63F5
+0x4045 = 0x63F8
+0x4046 = 0x63F9
+0x4047 = 0x6409
+0x4048 = 0x640A
+0x4049 = 0x6410
+0x404A = 0x6412
+0x404B = 0x6414
+0x404C = 0x6418
+0x404D = 0x641E
+0x404E = 0x6420
+0x404F = 0x6422
+0x4050 = 0x6424
+0x4051 = 0x6425
+0x4052 = 0x6429
+0x4053 = 0x642A
+0x4054 = 0x642F
+0x4055 = 0x6430
+0x4056 = 0x6435
+0x4057 = 0x643D
+0x4058 = 0x643F
+0x4059 = 0x644B
+0x405A = 0x644F
+0x405B = 0x6451
+0x405C = 0x6452
+0x405D = 0x6453
+0x405E = 0x6454
+0x405F = 0x645A
+0x4060 = 0x645B
+0x4061 = 0x645C
+0x4062 = 0x645D
+0x4063 = 0x645F
+0x4064 = 0x6460
+0x4065 = 0x6461
+0x4066 = 0x6463
+0x4067 = 0x646D
+0x4068 = 0x6473
+0x4069 = 0x6474
+0x406A = 0x647B
+0x406B = 0x647D
+0x406C = 0x6485
+0x406D = 0x6487
+0x406E = 0x648F
+0x406F = 0x6490
+0x4070 = 0x6491
+0x4071 = 0x6498
+0x4072 = 0x6499
+0x4073 = 0x649B
+0x4074 = 0x649D
+0x4075 = 0x649F
+0x4076 = 0x64A1
+0x4077 = 0x64A3
+0x4078 = 0x64A6
+0x4079 = 0x64A8
+0x407A = 0x64AC
+0x407B = 0x64B3
+0x407C = 0x64BD
+0x407D = 0x64BE
+0x407E = 0x64BF
+0x4121 = 0x64C4
+0x4122 = 0x64C9
+0x4123 = 0x64CA
+0x4124 = 0x64CB
+0x4125 = 0x64CC
+0x4126 = 0x64CE
+0x4127 = 0x64D0
+0x4128 = 0x64D1
+0x4129 = 0x64D5
+0x412A = 0x64D7
+0x412B = 0x64E4
+0x412C = 0x64E5
+0x412D = 0x64E9
+0x412E = 0x64EA
+0x412F = 0x64ED
+0x4130 = 0x64F0
+0x4131 = 0x64F5
+0x4132 = 0x64F7
+0x4133 = 0x64FB
+0x4134 = 0x64FF
+0x4135 = 0x6501
+0x4136 = 0x6504
+0x4137 = 0x6508
+0x4138 = 0x6509
+0x4139 = 0x650A
+0x413A = 0x650F
+0x413B = 0x6513
+0x413C = 0x6514
+0x413D = 0x6516
+0x413E = 0x6519
+0x413F = 0x651B
+0x4140 = 0x651E
+0x4141 = 0x651F
+0x4142 = 0x6522
+0x4143 = 0x6526
+0x4144 = 0x6529
+0x4145 = 0x652E
+0x4146 = 0x6531
+0x4147 = 0x653A
+0x4148 = 0x653C
+0x4149 = 0x653D
+0x414A = 0x6543
+0x414B = 0x6547
+0x414C = 0x6549
+0x414D = 0x6550
+0x414E = 0x6552
+0x414F = 0x6554
+0x4150 = 0x655F
+0x4151 = 0x6560
+0x4152 = 0x6567
+0x4153 = 0x656B
+0x4154 = 0x657A
+0x4155 = 0x657D
+0x4156 = 0x6581
+0x4157 = 0x6585
+0x4158 = 0x658A
+0x4159 = 0x6592
+0x415A = 0x6595
+0x415B = 0x6598
+0x415C = 0x659D
+0x415D = 0x65A0
+0x415E = 0x65A3
+0x415F = 0x65A6
+0x4160 = 0x65AE
+0x4161 = 0x65B2
+0x4162 = 0x65B3
+0x4163 = 0x65B4
+0x4164 = 0x65BF
+0x4165 = 0x65C2
+0x4166 = 0x65C8
+0x4167 = 0x65C9
+0x4168 = 0x65CE
+0x4169 = 0x65D0
+0x416A = 0x65D4
+0x416B = 0x65D6
+0x416C = 0x65D8
+0x416D = 0x65DF
+0x416E = 0x65F0
+0x416F = 0x65F2
+0x4170 = 0x65F4
+0x4171 = 0x65F5
+0x4172 = 0x65F9
+0x4173 = 0x65FE
+0x4174 = 0x65FF
+0x4175 = 0x6600
+0x4176 = 0x6604
+0x4177 = 0x6608
+0x4178 = 0x6609
+0x4179 = 0x660D
+0x417A = 0x6611
+0x417B = 0x6612
+0x417C = 0x6615
+0x417D = 0x6616
+0x417E = 0x661D
+0x4221 = 0x661E
+0x4222 = 0x6621
+0x4223 = 0x6622
+0x4224 = 0x6623
+0x4225 = 0x6624
+0x4226 = 0x6626
+0x4227 = 0x6629
+0x4228 = 0x662A
+0x4229 = 0x662B
+0x422A = 0x662C
+0x422B = 0x662E
+0x422C = 0x6630
+0x422D = 0x6631
+0x422E = 0x6633
+0x422F = 0x6639
+0x4230 = 0x6637
+0x4231 = 0x6640
+0x4232 = 0x6645
+0x4233 = 0x6646
+0x4234 = 0x664A
+0x4235 = 0x664C
+0x4236 = 0x6651
+0x4237 = 0x664E
+0x4238 = 0x6657
+0x4239 = 0x6658
+0x423A = 0x6659
+0x423B = 0x665B
+0x423C = 0x665C
+0x423D = 0x6660
+0x423E = 0x6661
+0x423F = 0x66FB
+0x4240 = 0x666A
+0x4241 = 0x666B
+0x4242 = 0x666C
+0x4243 = 0x667E
+0x4244 = 0x6673
+0x4245 = 0x6675
+0x4246 = 0x667F
+0x4247 = 0x6677
+0x4248 = 0x6678
+0x4249 = 0x6679
+0x424A = 0x667B
+0x424B = 0x6680
+0x424C = 0x667C
+0x424D = 0x668B
+0x424E = 0x668C
+0x424F = 0x668D
+0x4250 = 0x6690
+0x4251 = 0x6692
+0x4252 = 0x6699
+0x4253 = 0x669A
+0x4254 = 0x669B
+0x4255 = 0x669C
+0x4256 = 0x669F
+0x4257 = 0x66A0
+0x4258 = 0x66A4
+0x4259 = 0x66AD
+0x425A = 0x66B1
+0x425B = 0x66B2
+0x425C = 0x66B5
+0x425D = 0x66BB
+0x425E = 0x66BF
+0x425F = 0x66C0
+0x4260 = 0x66C2
+0x4261 = 0x66C3
+0x4262 = 0x66C8
+0x4263 = 0x66CC
+0x4264 = 0x66CE
+0x4265 = 0x66CF
+0x4266 = 0x66D4
+0x4267 = 0x66DB
+0x4268 = 0x66DF
+0x4269 = 0x66E8
+0x426A = 0x66EB
+0x426B = 0x66EC
+0x426C = 0x66EE
+0x426D = 0x66FA
+0x426E = 0x6705
+0x426F = 0x6707
+0x4270 = 0x670E
+0x4271 = 0x6713
+0x4272 = 0x6719
+0x4273 = 0x671C
+0x4274 = 0x6720
+0x4275 = 0x6722
+0x4276 = 0x6733
+0x4277 = 0x673E
+0x4278 = 0x6745
+0x4279 = 0x6747
+0x427A = 0x6748
+0x427B = 0x674C
+0x427C = 0x6754
+0x427D = 0x6755
+0x427E = 0x675D
+0x4321 = 0x6766
+0x4322 = 0x676C
+0x4323 = 0x676E
+0x4324 = 0x6774
+0x4325 = 0x6776
+0x4326 = 0x677B
+0x4327 = 0x6781
+0x4328 = 0x6784
+0x4329 = 0x678E
+0x432A = 0x678F
+0x432B = 0x6791
+0x432C = 0x6793
+0x432D = 0x6796
+0x432E = 0x6798
+0x432F = 0x6799
+0x4330 = 0x679B
+0x4331 = 0x67B0
+0x4332 = 0x67B1
+0x4333 = 0x67B2
+0x4334 = 0x67B5
+0x4335 = 0x67BB
+0x4336 = 0x67BC
+0x4337 = 0x67BD
+0x4338 = 0x67F9
+0x4339 = 0x67C0
+0x433A = 0x67C2
+0x433B = 0x67C3
+0x433C = 0x67C5
+0x433D = 0x67C8
+0x433E = 0x67C9
+0x433F = 0x67D2
+0x4340 = 0x67D7
+0x4341 = 0x67D9
+0x4342 = 0x67DC
+0x4343 = 0x67E1
+0x4344 = 0x67E6
+0x4345 = 0x67F0
+0x4346 = 0x67F2
+0x4347 = 0x67F6
+0x4348 = 0x67F7
+0x4349 = 0x6852
+0x434A = 0x6814
+0x434B = 0x6819
+0x434C = 0x681D
+0x434D = 0x681F
+0x434E = 0x6828
+0x434F = 0x6827
+0x4350 = 0x682C
+0x4351 = 0x682D
+0x4352 = 0x682F
+0x4353 = 0x6830
+0x4354 = 0x6831
+0x4355 = 0x6833
+0x4356 = 0x683B
+0x4357 = 0x683F
+0x4358 = 0x6844
+0x4359 = 0x6845
+0x435A = 0x684A
+0x435B = 0x684C
+0x435C = 0x6855
+0x435D = 0x6857
+0x435E = 0x6858
+0x435F = 0x685B
+0x4360 = 0x686B
+0x4361 = 0x686E
+0x4362 = 0x686F
+0x4363 = 0x6870
+0x4364 = 0x6871
+0x4365 = 0x6872
+0x4366 = 0x6875
+0x4367 = 0x6879
+0x4368 = 0x687A
+0x4369 = 0x687B
+0x436A = 0x687C
+0x436B = 0x6882
+0x436C = 0x6884
+0x436D = 0x6886
+0x436E = 0x6888
+0x436F = 0x6896
+0x4370 = 0x6898
+0x4371 = 0x689A
+0x4372 = 0x689C
+0x4373 = 0x68A1
+0x4374 = 0x68A3
+0x4375 = 0x68A5
+0x4376 = 0x68A9
+0x4377 = 0x68AA
+0x4378 = 0x68AE
+0x4379 = 0x68B2
+0x437A = 0x68BB
+0x437B = 0x68C5
+0x437C = 0x68C8
+0x437D = 0x68CC
+0x437E = 0x68CF
+0x4421 = 0x68D0
+0x4422 = 0x68D1
+0x4423 = 0x68D3
+0x4424 = 0x68D6
+0x4425 = 0x68D9
+0x4426 = 0x68DC
+0x4427 = 0x68DD
+0x4428 = 0x68E5
+0x4429 = 0x68E8
+0x442A = 0x68EA
+0x442B = 0x68EB
+0x442C = 0x68EC
+0x442D = 0x68ED
+0x442E = 0x68F0
+0x442F = 0x68F1
+0x4430 = 0x68F5
+0x4431 = 0x68F6
+0x4432 = 0x68FB
+0x4433 = 0x68FC
+0x4434 = 0x68FD
+0x4435 = 0x6906
+0x4436 = 0x6909
+0x4437 = 0x690A
+0x4438 = 0x6910
+0x4439 = 0x6911
+0x443A = 0x6913
+0x443B = 0x6916
+0x443C = 0x6917
+0x443D = 0x6931
+0x443E = 0x6933
+0x443F = 0x6935
+0x4440 = 0x6938
+0x4441 = 0x693B
+0x4442 = 0x6942
+0x4443 = 0x6945
+0x4444 = 0x6949
+0x4445 = 0x694E
+0x4446 = 0x6957
+0x4447 = 0x695B
+0x4448 = 0x6963
+0x4449 = 0x6964
+0x444A = 0x6965
+0x444B = 0x6966
+0x444C = 0x6968
+0x444D = 0x6969
+0x444E = 0x696C
+0x444F = 0x6970
+0x4450 = 0x6971
+0x4451 = 0x6972
+0x4452 = 0x697A
+0x4453 = 0x697B
+0x4454 = 0x697F
+0x4455 = 0x6980
+0x4456 = 0x698D
+0x4457 = 0x6992
+0x4458 = 0x6996
+0x4459 = 0x6998
+0x445A = 0x69A1
+0x445B = 0x69A5
+0x445C = 0x69A6
+0x445D = 0x69A8
+0x445E = 0x69AB
+0x445F = 0x69AD
+0x4460 = 0x69AF
+0x4461 = 0x69B7
+0x4462 = 0x69B8
+0x4463 = 0x69BA
+0x4464 = 0x69BC
+0x4465 = 0x69C5
+0x4466 = 0x69C8
+0x4467 = 0x69D1
+0x4468 = 0x69D6
+0x4469 = 0x69D7
+0x446A = 0x69E2
+0x446B = 0x69E5
+0x446C = 0x69EE
+0x446D = 0x69EF
+0x446E = 0x69F1
+0x446F = 0x69F3
+0x4470 = 0x69F5
+0x4471 = 0x69FE
+0x4472 = 0x6A00
+0x4473 = 0x6A01
+0x4474 = 0x6A03
+0x4475 = 0x6A0F
+0x4476 = 0x6A11
+0x4477 = 0x6A15
+0x4478 = 0x6A1A
+0x4479 = 0x6A1D
+0x447A = 0x6A20
+0x447B = 0x6A24
+0x447C = 0x6A28
+0x447D = 0x6A30
+0x447E = 0x6A32
+0x4521 = 0x6A34
+0x4522 = 0x6A37
+0x4523 = 0x6A3B
+0x4524 = 0x6A3E
+0x4525 = 0x6A3F
+0x4526 = 0x6A45
+0x4527 = 0x6A46
+0x4528 = 0x6A49
+0x4529 = 0x6A4A
+0x452A = 0x6A4E
+0x452B = 0x6A50
+0x452C = 0x6A51
+0x452D = 0x6A52
+0x452E = 0x6A55
+0x452F = 0x6A56
+0x4530 = 0x6A5B
+0x4531 = 0x6A64
+0x4532 = 0x6A67
+0x4533 = 0x6A6A
+0x4534 = 0x6A71
+0x4535 = 0x6A73
+0x4536 = 0x6A7E
+0x4537 = 0x6A81
+0x4538 = 0x6A83
+0x4539 = 0x6A86
+0x453A = 0x6A87
+0x453B = 0x6A89
+0x453C = 0x6A8B
+0x453D = 0x6A91
+0x453E = 0x6A9B
+0x453F = 0x6A9D
+0x4540 = 0x6A9E
+0x4541 = 0x6A9F
+0x4542 = 0x6AA5
+0x4543 = 0x6AAB
+0x4544 = 0x6AAF
+0x4545 = 0x6AB0
+0x4546 = 0x6AB1
+0x4547 = 0x6AB4
+0x4548 = 0x6ABD
+0x4549 = 0x6ABE
+0x454A = 0x6ABF
+0x454B = 0x6AC6
+0x454C = 0x6AC9
+0x454D = 0x6AC8
+0x454E = 0x6ACC
+0x454F = 0x6AD0
+0x4550 = 0x6AD4
+0x4551 = 0x6AD5
+0x4552 = 0x6AD6
+0x4553 = 0x6ADC
+0x4554 = 0x6ADD
+0x4555 = 0x6AE4
+0x4556 = 0x6AE7
+0x4557 = 0x6AEC
+0x4558 = 0x6AF0
+0x4559 = 0x6AF1
+0x455A = 0x6AF2
+0x455B = 0x6AFC
+0x455C = 0x6AFD
+0x455D = 0x6B02
+0x455E = 0x6B03
+0x455F = 0x6B06
+0x4560 = 0x6B07
+0x4561 = 0x6B09
+0x4562 = 0x6B0F
+0x4563 = 0x6B10
+0x4564 = 0x6B11
+0x4565 = 0x6B17
+0x4566 = 0x6B1B
+0x4567 = 0x6B1E
+0x4568 = 0x6B24
+0x4569 = 0x6B28
+0x456A = 0x6B2B
+0x456B = 0x6B2C
+0x456C = 0x6B2F
+0x456D = 0x6B35
+0x456E = 0x6B36
+0x456F = 0x6B3B
+0x4570 = 0x6B3F
+0x4571 = 0x6B46
+0x4572 = 0x6B4A
+0x4573 = 0x6B4D
+0x4574 = 0x6B52
+0x4575 = 0x6B56
+0x4576 = 0x6B58
+0x4577 = 0x6B5D
+0x4578 = 0x6B60
+0x4579 = 0x6B67
+0x457A = 0x6B6B
+0x457B = 0x6B6E
+0x457C = 0x6B70
+0x457D = 0x6B75
+0x457E = 0x6B7D
+0x4621 = 0x6B7E
+0x4622 = 0x6B82
+0x4623 = 0x6B85
+0x4624 = 0x6B97
+0x4625 = 0x6B9B
+0x4626 = 0x6B9F
+0x4627 = 0x6BA0
+0x4628 = 0x6BA2
+0x4629 = 0x6BA3
+0x462A = 0x6BA8
+0x462B = 0x6BA9
+0x462C = 0x6BAC
+0x462D = 0x6BAD
+0x462E = 0x6BAE
+0x462F = 0x6BB0
+0x4630 = 0x6BB8
+0x4631 = 0x6BB9
+0x4632 = 0x6BBD
+0x4633 = 0x6BBE
+0x4634 = 0x6BC3
+0x4635 = 0x6BC4
+0x4636 = 0x6BC9
+0x4637 = 0x6BCC
+0x4638 = 0x6BD6
+0x4639 = 0x6BDA
+0x463A = 0x6BE1
+0x463B = 0x6BE3
+0x463C = 0x6BE6
+0x463D = 0x6BE7
+0x463E = 0x6BEE
+0x463F = 0x6BF1
+0x4640 = 0x6BF7
+0x4641 = 0x6BF9
+0x4642 = 0x6BFF
+0x4643 = 0x6C02
+0x4644 = 0x6C04
+0x4645 = 0x6C05
+0x4646 = 0x6C09
+0x4647 = 0x6C0D
+0x4648 = 0x6C0E
+0x4649 = 0x6C10
+0x464A = 0x6C12
+0x464B = 0x6C19
+0x464C = 0x6C1F
+0x464D = 0x6C26
+0x464E = 0x6C27
+0x464F = 0x6C28
+0x4650 = 0x6C2C
+0x4651 = 0x6C2E
+0x4652 = 0x6C33
+0x4653 = 0x6C35
+0x4654 = 0x6C36
+0x4655 = 0x6C3A
+0x4656 = 0x6C3B
+0x4657 = 0x6C3F
+0x4658 = 0x6C4A
+0x4659 = 0x6C4B
+0x465A = 0x6C4D
+0x465B = 0x6C4F
+0x465C = 0x6C52
+0x465D = 0x6C54
+0x465E = 0x6C59
+0x465F = 0x6C5B
+0x4660 = 0x6C5C
+0x4661 = 0x6C6B
+0x4662 = 0x6C6D
+0x4663 = 0x6C6F
+0x4664 = 0x6C74
+0x4665 = 0x6C76
+0x4666 = 0x6C78
+0x4667 = 0x6C79
+0x4668 = 0x6C7B
+0x4669 = 0x6C85
+0x466A = 0x6C86
+0x466B = 0x6C87
+0x466C = 0x6C89
+0x466D = 0x6C94
+0x466E = 0x6C95
+0x466F = 0x6C97
+0x4670 = 0x6C98
+0x4671 = 0x6C9C
+0x4672 = 0x6C9F
+0x4673 = 0x6CB0
+0x4674 = 0x6CB2
+0x4675 = 0x6CB4
+0x4676 = 0x6CC2
+0x4677 = 0x6CC6
+0x4678 = 0x6CCD
+0x4679 = 0x6CCF
+0x467A = 0x6CD0
+0x467B = 0x6CD1
+0x467C = 0x6CD2
+0x467D = 0x6CD4
+0x467E = 0x6CD6
+0x4721 = 0x6CDA
+0x4722 = 0x6CDC
+0x4723 = 0x6CE0
+0x4724 = 0x6CE7
+0x4725 = 0x6CE9
+0x4726 = 0x6CEB
+0x4727 = 0x6CEC
+0x4728 = 0x6CEE
+0x4729 = 0x6CF2
+0x472A = 0x6CF4
+0x472B = 0x6D04
+0x472C = 0x6D07
+0x472D = 0x6D0A
+0x472E = 0x6D0E
+0x472F = 0x6D0F
+0x4730 = 0x6D11
+0x4731 = 0x6D13
+0x4732 = 0x6D1A
+0x4733 = 0x6D26
+0x4734 = 0x6D27
+0x4735 = 0x6D28
+0x4736 = 0x6C67
+0x4737 = 0x6D2E
+0x4738 = 0x6D2F
+0x4739 = 0x6D31
+0x473A = 0x6D39
+0x473B = 0x6D3C
+0x473C = 0x6D3F
+0x473D = 0x6D57
+0x473E = 0x6D5E
+0x473F = 0x6D5F
+0x4740 = 0x6D61
+0x4741 = 0x6D65
+0x4742 = 0x6D67
+0x4743 = 0x6D6F
+0x4744 = 0x6D70
+0x4745 = 0x6D7C
+0x4746 = 0x6D82
+0x4747 = 0x6D87
+0x4748 = 0x6D91
+0x4749 = 0x6D92
+0x474A = 0x6D94
+0x474B = 0x6D96
+0x474C = 0x6D97
+0x474D = 0x6D98
+0x474E = 0x6DAA
+0x474F = 0x6DAC
+0x4750 = 0x6DB4
+0x4751 = 0x6DB7
+0x4752 = 0x6DB9
+0x4753 = 0x6DBD
+0x4754 = 0x6DBF
+0x4755 = 0x6DC4
+0x4756 = 0x6DC8
+0x4757 = 0x6DCA
+0x4758 = 0x6DCE
+0x4759 = 0x6DCF
+0x475A = 0x6DD6
+0x475B = 0x6DDB
+0x475C = 0x6DDD
+0x475D = 0x6DDF
+0x475E = 0x6DE0
+0x475F = 0x6DE2
+0x4760 = 0x6DE5
+0x4761 = 0x6DE9
+0x4762 = 0x6DEF
+0x4763 = 0x6DF0
+0x4764 = 0x6DF4
+0x4765 = 0x6DF6
+0x4766 = 0x6DFC
+0x4767 = 0x6E00
+0x4768 = 0x6E04
+0x4769 = 0x6E1E
+0x476A = 0x6E22
+0x476B = 0x6E27
+0x476C = 0x6E32
+0x476D = 0x6E36
+0x476E = 0x6E39
+0x476F = 0x6E3B
+0x4770 = 0x6E3C
+0x4771 = 0x6E44
+0x4772 = 0x6E45
+0x4773 = 0x6E48
+0x4774 = 0x6E49
+0x4775 = 0x6E4B
+0x4776 = 0x6E4F
+0x4777 = 0x6E51
+0x4778 = 0x6E52
+0x4779 = 0x6E53
+0x477A = 0x6E54
+0x477B = 0x6E57
+0x477C = 0x6E5C
+0x477D = 0x6E5D
+0x477E = 0x6E5E
+0x4821 = 0x6E62
+0x4822 = 0x6E63
+0x4823 = 0x6E68
+0x4824 = 0x6E73
+0x4825 = 0x6E7B
+0x4826 = 0x6E7D
+0x4827 = 0x6E8D
+0x4828 = 0x6E93
+0x4829 = 0x6E99
+0x482A = 0x6EA0
+0x482B = 0x6EA7
+0x482C = 0x6EAD
+0x482D = 0x6EAE
+0x482E = 0x6EB1
+0x482F = 0x6EB3
+0x4830 = 0x6EBB
+0x4831 = 0x6EBF
+0x4832 = 0x6EC0
+0x4833 = 0x6EC1
+0x4834 = 0x6EC3
+0x4835 = 0x6EC7
+0x4836 = 0x6EC8
+0x4837 = 0x6ECA
+0x4838 = 0x6ECD
+0x4839 = 0x6ECE
+0x483A = 0x6ECF
+0x483B = 0x6EEB
+0x483C = 0x6EED
+0x483D = 0x6EEE
+0x483E = 0x6EF9
+0x483F = 0x6EFB
+0x4840 = 0x6EFD
+0x4841 = 0x6F04
+0x4842 = 0x6F08
+0x4843 = 0x6F0A
+0x4844 = 0x6F0C
+0x4845 = 0x6F0D
+0x4846 = 0x6F16
+0x4847 = 0x6F18
+0x4848 = 0x6F1A
+0x4849 = 0x6F1B
+0x484A = 0x6F26
+0x484B = 0x6F29
+0x484C = 0x6F2A
+0x484D = 0x6F2F
+0x484E = 0x6F30
+0x484F = 0x6F33
+0x4850 = 0x6F36
+0x4851 = 0x6F3B
+0x4852 = 0x6F3C
+0x4853 = 0x6F2D
+0x4854 = 0x6F4F
+0x4855 = 0x6F51
+0x4856 = 0x6F52
+0x4857 = 0x6F53
+0x4858 = 0x6F57
+0x4859 = 0x6F59
+0x485A = 0x6F5A
+0x485B = 0x6F5D
+0x485C = 0x6F5E
+0x485D = 0x6F61
+0x485E = 0x6F62
+0x485F = 0x6F68
+0x4860 = 0x6F6C
+0x4861 = 0x6F7D
+0x4862 = 0x6F7E
+0x4863 = 0x6F83
+0x4864 = 0x6F87
+0x4865 = 0x6F88
+0x4866 = 0x6F8B
+0x4867 = 0x6F8C
+0x4868 = 0x6F8D
+0x4869 = 0x6F90
+0x486A = 0x6F92
+0x486B = 0x6F93
+0x486C = 0x6F94
+0x486D = 0x6F96
+0x486E = 0x6F9A
+0x486F = 0x6F9F
+0x4870 = 0x6FA0
+0x4871 = 0x6FA5
+0x4872 = 0x6FA6
+0x4873 = 0x6FA7
+0x4874 = 0x6FA8
+0x4875 = 0x6FAE
+0x4876 = 0x6FAF
+0x4877 = 0x6FB0
+0x4878 = 0x6FB5
+0x4879 = 0x6FB6
+0x487A = 0x6FBC
+0x487B = 0x6FC5
+0x487C = 0x6FC7
+0x487D = 0x6FC8
+0x487E = 0x6FCA
+0x4921 = 0x6FDA
+0x4922 = 0x6FDE
+0x4923 = 0x6FE8
+0x4924 = 0x6FE9
+0x4925 = 0x6FF0
+0x4926 = 0x6FF5
+0x4927 = 0x6FF9
+0x4928 = 0x6FFC
+0x4929 = 0x6FFD
+0x492A = 0x7000
+0x492B = 0x7005
+0x492C = 0x7006
+0x492D = 0x7007
+0x492E = 0x700D
+0x492F = 0x7017
+0x4930 = 0x7020
+0x4931 = 0x7023
+0x4932 = 0x702F
+0x4933 = 0x7034
+0x4934 = 0x7037
+0x4935 = 0x7039
+0x4936 = 0x703C
+0x4937 = 0x7043
+0x4938 = 0x7044
+0x4939 = 0x7048
+0x493A = 0x7049
+0x493B = 0x704A
+0x493C = 0x704B
+0x493D = 0x7054
+0x493E = 0x7055
+0x493F = 0x705D
+0x4940 = 0x705E
+0x4941 = 0x704E
+0x4942 = 0x7064
+0x4943 = 0x7065
+0x4944 = 0x706C
+0x4945 = 0x706E
+0x4946 = 0x7075
+0x4947 = 0x7076
+0x4948 = 0x707E
+0x4949 = 0x7081
+0x494A = 0x7085
+0x494B = 0x7086
+0x494C = 0x7094
+0x494D = 0x7095
+0x494E = 0x7096
+0x494F = 0x7097
+0x4950 = 0x7098
+0x4951 = 0x709B
+0x4952 = 0x70A4
+0x4953 = 0x70AB
+0x4954 = 0x70B0
+0x4955 = 0x70B1
+0x4956 = 0x70B4
+0x4957 = 0x70B7
+0x4958 = 0x70CA
+0x4959 = 0x70D1
+0x495A = 0x70D3
+0x495B = 0x70D4
+0x495C = 0x70D5
+0x495D = 0x70D6
+0x495E = 0x70D8
+0x495F = 0x70DC
+0x4960 = 0x70E4
+0x4961 = 0x70FA
+0x4962 = 0x7103
+0x4963 = 0x7104
+0x4964 = 0x7105
+0x4965 = 0x7106
+0x4966 = 0x7107
+0x4967 = 0x710B
+0x4968 = 0x710C
+0x4969 = 0x710F
+0x496A = 0x711E
+0x496B = 0x7120
+0x496C = 0x712B
+0x496D = 0x712D
+0x496E = 0x712F
+0x496F = 0x7130
+0x4970 = 0x7131
+0x4971 = 0x7138
+0x4972 = 0x7141
+0x4973 = 0x7145
+0x4974 = 0x7146
+0x4975 = 0x7147
+0x4976 = 0x714A
+0x4977 = 0x714B
+0x4978 = 0x7150
+0x4979 = 0x7152
+0x497A = 0x7157
+0x497B = 0x715A
+0x497C = 0x715C
+0x497D = 0x715E
+0x497E = 0x7160
+0x4A21 = 0x7168
+0x4A22 = 0x7179
+0x4A23 = 0x7180
+0x4A24 = 0x7185
+0x4A25 = 0x7187
+0x4A26 = 0x718C
+0x4A27 = 0x7192
+0x4A28 = 0x719A
+0x4A29 = 0x719B
+0x4A2A = 0x71A0
+0x4A2B = 0x71A2
+0x4A2C = 0x71AF
+0x4A2D = 0x71B0
+0x4A2E = 0x71B2
+0x4A2F = 0x71B3
+0x4A30 = 0x71BA
+0x4A31 = 0x71BF
+0x4A32 = 0x71C0
+0x4A33 = 0x71C1
+0x4A34 = 0x71C4
+0x4A35 = 0x71CB
+0x4A36 = 0x71CC
+0x4A37 = 0x71D3
+0x4A38 = 0x71D6
+0x4A39 = 0x71D9
+0x4A3A = 0x71DA
+0x4A3B = 0x71DC
+0x4A3C = 0x71F8
+0x4A3D = 0x71FE
+0x4A3E = 0x7200
+0x4A3F = 0x7207
+0x4A40 = 0x7208
+0x4A41 = 0x7209
+0x4A42 = 0x7213
+0x4A43 = 0x7217
+0x4A44 = 0x721A
+0x4A45 = 0x721D
+0x4A46 = 0x721F
+0x4A47 = 0x7224
+0x4A48 = 0x722B
+0x4A49 = 0x722F
+0x4A4A = 0x7234
+0x4A4B = 0x7238
+0x4A4C = 0x7239
+0x4A4D = 0x7241
+0x4A4E = 0x7242
+0x4A4F = 0x7243
+0x4A50 = 0x7245
+0x4A51 = 0x724E
+0x4A52 = 0x724F
+0x4A53 = 0x7250
+0x4A54 = 0x7253
+0x4A55 = 0x7255
+0x4A56 = 0x7256
+0x4A57 = 0x725A
+0x4A58 = 0x725C
+0x4A59 = 0x725E
+0x4A5A = 0x7260
+0x4A5B = 0x7263
+0x4A5C = 0x7268
+0x4A5D = 0x726B
+0x4A5E = 0x726E
+0x4A5F = 0x726F
+0x4A60 = 0x7271
+0x4A61 = 0x7277
+0x4A62 = 0x7278
+0x4A63 = 0x727B
+0x4A64 = 0x727C
+0x4A65 = 0x727F
+0x4A66 = 0x7284
+0x4A67 = 0x7289
+0x4A68 = 0x728D
+0x4A69 = 0x728E
+0x4A6A = 0x7293
+0x4A6B = 0x729B
+0x4A6C = 0x72A8
+0x4A6D = 0x72AD
+0x4A6E = 0x72AE
+0x4A6F = 0x72B1
+0x4A70 = 0x72B4
+0x4A71 = 0x72BE
+0x4A72 = 0x72C1
+0x4A73 = 0x72C7
+0x4A74 = 0x72C9
+0x4A75 = 0x72CC
+0x4A76 = 0x72D5
+0x4A77 = 0x72D6
+0x4A78 = 0x72D8
+0x4A79 = 0x72DF
+0x4A7A = 0x72E5
+0x4A7B = 0x72F3
+0x4A7C = 0x72F4
+0x4A7D = 0x72FA
+0x4A7E = 0x72FB
+0x4B21 = 0x72FE
+0x4B22 = 0x7302
+0x4B23 = 0x7304
+0x4B24 = 0x7305
+0x4B25 = 0x7307
+0x4B26 = 0x730B
+0x4B27 = 0x730D
+0x4B28 = 0x7312
+0x4B29 = 0x7313
+0x4B2A = 0x7318
+0x4B2B = 0x7319
+0x4B2C = 0x731E
+0x4B2D = 0x7322
+0x4B2E = 0x7324
+0x4B2F = 0x7327
+0x4B30 = 0x7328
+0x4B31 = 0x732C
+0x4B32 = 0x7331
+0x4B33 = 0x7332
+0x4B34 = 0x7335
+0x4B35 = 0x733A
+0x4B36 = 0x733B
+0x4B37 = 0x733D
+0x4B38 = 0x7343
+0x4B39 = 0x734D
+0x4B3A = 0x7350
+0x4B3B = 0x7352
+0x4B3C = 0x7356
+0x4B3D = 0x7358
+0x4B3E = 0x735D
+0x4B3F = 0x735E
+0x4B40 = 0x735F
+0x4B41 = 0x7360
+0x4B42 = 0x7366
+0x4B43 = 0x7367
+0x4B44 = 0x7369
+0x4B45 = 0x736B
+0x4B46 = 0x736C
+0x4B47 = 0x736E
+0x4B48 = 0x736F
+0x4B49 = 0x7371
+0x4B4A = 0x7377
+0x4B4B = 0x7379
+0x4B4C = 0x737C
+0x4B4D = 0x7380
+0x4B4E = 0x7381
+0x4B4F = 0x7383
+0x4B50 = 0x7385
+0x4B51 = 0x7386
+0x4B52 = 0x738E
+0x4B53 = 0x7390
+0x4B54 = 0x7393
+0x4B55 = 0x7395
+0x4B56 = 0x7397
+0x4B57 = 0x7398
+0x4B58 = 0x739C
+0x4B59 = 0x739E
+0x4B5A = 0x739F
+0x4B5B = 0x73A0
+0x4B5C = 0x73A2
+0x4B5D = 0x73A5
+0x4B5E = 0x73A6
+0x4B5F = 0x73AA
+0x4B60 = 0x73AB
+0x4B61 = 0x73AD
+0x4B62 = 0x73B5
+0x4B63 = 0x73B7
+0x4B64 = 0x73B9
+0x4B65 = 0x73BC
+0x4B66 = 0x73BD
+0x4B67 = 0x73BF
+0x4B68 = 0x73C5
+0x4B69 = 0x73C6
+0x4B6A = 0x73C9
+0x4B6B = 0x73CB
+0x4B6C = 0x73CC
+0x4B6D = 0x73CF
+0x4B6E = 0x73D2
+0x4B6F = 0x73D3
+0x4B70 = 0x73D6
+0x4B71 = 0x73D9
+0x4B72 = 0x73DD
+0x4B73 = 0x73E1
+0x4B74 = 0x73E3
+0x4B75 = 0x73E6
+0x4B76 = 0x73E7
+0x4B77 = 0x73E9
+0x4B78 = 0x73F4
+0x4B79 = 0x73F5
+0x4B7A = 0x73F7
+0x4B7B = 0x73F9
+0x4B7C = 0x73FA
+0x4B7D = 0x73FB
+0x4B7E = 0x73FD
+0x4C21 = 0x73FF
+0x4C22 = 0x7400
+0x4C23 = 0x7401
+0x4C24 = 0x7404
+0x4C25 = 0x7407
+0x4C26 = 0x740A
+0x4C27 = 0x7411
+0x4C28 = 0x741A
+0x4C29 = 0x741B
+0x4C2A = 0x7424
+0x4C2B = 0x7426
+0x4C2C = 0x7428
+0x4C2D = 0x7429
+0x4C2E = 0x742A
+0x4C2F = 0x742B
+0x4C30 = 0x742C
+0x4C31 = 0x742D
+0x4C32 = 0x742E
+0x4C33 = 0x742F
+0x4C34 = 0x7430
+0x4C35 = 0x7431
+0x4C36 = 0x7439
+0x4C37 = 0x7440
+0x4C38 = 0x7443
+0x4C39 = 0x7444
+0x4C3A = 0x7446
+0x4C3B = 0x7447
+0x4C3C = 0x744B
+0x4C3D = 0x744D
+0x4C3E = 0x7451
+0x4C3F = 0x7452
+0x4C40 = 0x7457
+0x4C41 = 0x745D
+0x4C42 = 0x7462
+0x4C43 = 0x7466
+0x4C44 = 0x7467
+0x4C45 = 0x7468
+0x4C46 = 0x746B
+0x4C47 = 0x746D
+0x4C48 = 0x746E
+0x4C49 = 0x7471
+0x4C4A = 0x7472
+0x4C4B = 0x7480
+0x4C4C = 0x7481
+0x4C4D = 0x7485
+0x4C4E = 0x7486
+0x4C4F = 0x7487
+0x4C50 = 0x7489
+0x4C51 = 0x748F
+0x4C52 = 0x7490
+0x4C53 = 0x7491
+0x4C54 = 0x7492
+0x4C55 = 0x7498
+0x4C56 = 0x7499
+0x4C57 = 0x749A
+0x4C58 = 0x749C
+0x4C59 = 0x749F
+0x4C5A = 0x74A0
+0x4C5B = 0x74A1
+0x4C5C = 0x74A3
+0x4C5D = 0x74A6
+0x4C5E = 0x74A8
+0x4C5F = 0x74A9
+0x4C60 = 0x74AA
+0x4C61 = 0x74AB
+0x4C62 = 0x74AE
+0x4C63 = 0x74AF
+0x4C64 = 0x74B1
+0x4C65 = 0x74B2
+0x4C66 = 0x74B5
+0x4C67 = 0x74B9
+0x4C68 = 0x74BB
+0x4C69 = 0x74BF
+0x4C6A = 0x74C8
+0x4C6B = 0x74C9
+0x4C6C = 0x74CC
+0x4C6D = 0x74D0
+0x4C6E = 0x74D3
+0x4C6F = 0x74D8
+0x4C70 = 0x74DA
+0x4C71 = 0x74DB
+0x4C72 = 0x74DE
+0x4C73 = 0x74DF
+0x4C74 = 0x74E4
+0x4C75 = 0x74E8
+0x4C76 = 0x74EA
+0x4C77 = 0x74EB
+0x4C78 = 0x74EF
+0x4C79 = 0x74F4
+0x4C7A = 0x74FA
+0x4C7B = 0x74FB
+0x4C7C = 0x74FC
+0x4C7D = 0x74FF
+0x4C7E = 0x7506
+0x4D21 = 0x7512
+0x4D22 = 0x7516
+0x4D23 = 0x7517
+0x4D24 = 0x7520
+0x4D25 = 0x7521
+0x4D26 = 0x7524
+0x4D27 = 0x7527
+0x4D28 = 0x7529
+0x4D29 = 0x752A
+0x4D2A = 0x752F
+0x4D2B = 0x7536
+0x4D2C = 0x7539
+0x4D2D = 0x753D
+0x4D2E = 0x753E
+0x4D2F = 0x753F
+0x4D30 = 0x7540
+0x4D31 = 0x7543
+0x4D32 = 0x7547
+0x4D33 = 0x7548
+0x4D34 = 0x754E
+0x4D35 = 0x7550
+0x4D36 = 0x7552
+0x4D37 = 0x7557
+0x4D38 = 0x755E
+0x4D39 = 0x755F
+0x4D3A = 0x7561
+0x4D3B = 0x756F
+0x4D3C = 0x7571
+0x4D3D = 0x7579
+0x4D3E = 0x757A
+0x4D3F = 0x757B
+0x4D40 = 0x757C
+0x4D41 = 0x757D
+0x4D42 = 0x757E
+0x4D43 = 0x7581
+0x4D44 = 0x7585
+0x4D45 = 0x7590
+0x4D46 = 0x7592
+0x4D47 = 0x7593
+0x4D48 = 0x7595
+0x4D49 = 0x7599
+0x4D4A = 0x759C
+0x4D4B = 0x75A2
+0x4D4C = 0x75A4
+0x4D4D = 0x75B4
+0x4D4E = 0x75BA
+0x4D4F = 0x75BF
+0x4D50 = 0x75C0
+0x4D51 = 0x75C1
+0x4D52 = 0x75C4
+0x4D53 = 0x75C6
+0x4D54 = 0x75CC
+0x4D55 = 0x75CE
+0x4D56 = 0x75CF
+0x4D57 = 0x75D7
+0x4D58 = 0x75DC
+0x4D59 = 0x75DF
+0x4D5A = 0x75E0
+0x4D5B = 0x75E1
+0x4D5C = 0x75E4
+0x4D5D = 0x75E7
+0x4D5E = 0x75EC
+0x4D5F = 0x75EE
+0x4D60 = 0x75EF
+0x4D61 = 0x75F1
+0x4D62 = 0x75F9
+0x4D63 = 0x7600
+0x4D64 = 0x7602
+0x4D65 = 0x7603
+0x4D66 = 0x7604
+0x4D67 = 0x7607
+0x4D68 = 0x7608
+0x4D69 = 0x760A
+0x4D6A = 0x760C
+0x4D6B = 0x760F
+0x4D6C = 0x7612
+0x4D6D = 0x7613
+0x4D6E = 0x7615
+0x4D6F = 0x7616
+0x4D70 = 0x7619
+0x4D71 = 0x761B
+0x4D72 = 0x761C
+0x4D73 = 0x761D
+0x4D74 = 0x761E
+0x4D75 = 0x7623
+0x4D76 = 0x7625
+0x4D77 = 0x7626
+0x4D78 = 0x7629
+0x4D79 = 0x762D
+0x4D7A = 0x7632
+0x4D7B = 0x7633
+0x4D7C = 0x7635
+0x4D7D = 0x7638
+0x4D7E = 0x7639
+0x4E21 = 0x763A
+0x4E22 = 0x763C
+0x4E23 = 0x764A
+0x4E24 = 0x7640
+0x4E25 = 0x7641
+0x4E26 = 0x7643
+0x4E27 = 0x7644
+0x4E28 = 0x7645
+0x4E29 = 0x7649
+0x4E2A = 0x764B
+0x4E2B = 0x7655
+0x4E2C = 0x7659
+0x4E2D = 0x765F
+0x4E2E = 0x7664
+0x4E2F = 0x7665
+0x4E30 = 0x766D
+0x4E31 = 0x766E
+0x4E32 = 0x766F
+0x4E33 = 0x7671
+0x4E34 = 0x7674
+0x4E35 = 0x7681
+0x4E36 = 0x7685
+0x4E37 = 0x768C
+0x4E38 = 0x768D
+0x4E39 = 0x7695
+0x4E3A = 0x769B
+0x4E3B = 0x769C
+0x4E3C = 0x769D
+0x4E3D = 0x769F
+0x4E3E = 0x76A0
+0x4E3F = 0x76A2
+0x4E40 = 0x76A3
+0x4E41 = 0x76A4
+0x4E42 = 0x76A5
+0x4E43 = 0x76A6
+0x4E44 = 0x76A7
+0x4E45 = 0x76A8
+0x4E46 = 0x76AA
+0x4E47 = 0x76AD
+0x4E48 = 0x76BD
+0x4E49 = 0x76C1
+0x4E4A = 0x76C5
+0x4E4B = 0x76C9
+0x4E4C = 0x76CB
+0x4E4D = 0x76CC
+0x4E4E = 0x76CE
+0x4E4F = 0x76D4
+0x4E50 = 0x76D9
+0x4E51 = 0x76E0
+0x4E52 = 0x76E6
+0x4E53 = 0x76E8
+0x4E54 = 0x76EC
+0x4E55 = 0x76F0
+0x4E56 = 0x76F1
+0x4E57 = 0x76F6
+0x4E58 = 0x76F9
+0x4E59 = 0x76FC
+0x4E5A = 0x7700
+0x4E5B = 0x7706
+0x4E5C = 0x770A
+0x4E5D = 0x770E
+0x4E5E = 0x7712
+0x4E5F = 0x7714
+0x4E60 = 0x7715
+0x4E61 = 0x7717
+0x4E62 = 0x7719
+0x4E63 = 0x771A
+0x4E64 = 0x771C
+0x4E65 = 0x7722
+0x4E66 = 0x7728
+0x4E67 = 0x772D
+0x4E68 = 0x772E
+0x4E69 = 0x772F
+0x4E6A = 0x7734
+0x4E6B = 0x7735
+0x4E6C = 0x7736
+0x4E6D = 0x7739
+0x4E6E = 0x773D
+0x4E6F = 0x773E
+0x4E70 = 0x7742
+0x4E71 = 0x7745
+0x4E72 = 0x7746
+0x4E73 = 0x774A
+0x4E74 = 0x774D
+0x4E75 = 0x774E
+0x4E76 = 0x774F
+0x4E77 = 0x7752
+0x4E78 = 0x7756
+0x4E79 = 0x7757
+0x4E7A = 0x775C
+0x4E7B = 0x775E
+0x4E7C = 0x775F
+0x4E7D = 0x7760
+0x4E7E = 0x7762
+0x4F21 = 0x7764
+0x4F22 = 0x7767
+0x4F23 = 0x776A
+0x4F24 = 0x776C
+0x4F25 = 0x7770
+0x4F26 = 0x7772
+0x4F27 = 0x7773
+0x4F28 = 0x7774
+0x4F29 = 0x777A
+0x4F2A = 0x777D
+0x4F2B = 0x7780
+0x4F2C = 0x7784
+0x4F2D = 0x778C
+0x4F2E = 0x778D
+0x4F2F = 0x7794
+0x4F30 = 0x7795
+0x4F31 = 0x7796
+0x4F32 = 0x779A
+0x4F33 = 0x779F
+0x4F34 = 0x77A2
+0x4F35 = 0x77A7
+0x4F36 = 0x77AA
+0x4F37 = 0x77AE
+0x4F38 = 0x77AF
+0x4F39 = 0x77B1
+0x4F3A = 0x77B5
+0x4F3B = 0x77BE
+0x4F3C = 0x77C3
+0x4F3D = 0x77C9
+0x4F3E = 0x77D1
+0x4F3F = 0x77D2
+0x4F40 = 0x77D5
+0x4F41 = 0x77D9
+0x4F42 = 0x77DE
+0x4F43 = 0x77DF
+0x4F44 = 0x77E0
+0x4F45 = 0x77E4
+0x4F46 = 0x77E6
+0x4F47 = 0x77EA
+0x4F48 = 0x77EC
+0x4F49 = 0x77F0
+0x4F4A = 0x77F1
+0x4F4B = 0x77F4
+0x4F4C = 0x77F8
+0x4F4D = 0x77FB
+0x4F4E = 0x7805
+0x4F4F = 0x7806
+0x4F50 = 0x7809
+0x4F51 = 0x780D
+0x4F52 = 0x780E
+0x4F53 = 0x7811
+0x4F54 = 0x781D
+0x4F55 = 0x7821
+0x4F56 = 0x7822
+0x4F57 = 0x7823
+0x4F58 = 0x782D
+0x4F59 = 0x782E
+0x4F5A = 0x7830
+0x4F5B = 0x7835
+0x4F5C = 0x7837
+0x4F5D = 0x7843
+0x4F5E = 0x7844
+0x4F5F = 0x7847
+0x4F60 = 0x7848
+0x4F61 = 0x784C
+0x4F62 = 0x784E
+0x4F63 = 0x7852
+0x4F64 = 0x785C
+0x4F65 = 0x785E
+0x4F66 = 0x7860
+0x4F67 = 0x7861
+0x4F68 = 0x7863
+0x4F69 = 0x7864
+0x4F6A = 0x7868
+0x4F6B = 0x786A
+0x4F6C = 0x786E
+0x4F6D = 0x787A
+0x4F6E = 0x787E
+0x4F6F = 0x788A
+0x4F70 = 0x788F
+0x4F71 = 0x7894
+0x4F72 = 0x7898
+0x4F73 = 0x78A1
+0x4F74 = 0x789D
+0x4F75 = 0x789E
+0x4F76 = 0x789F
+0x4F77 = 0x78A4
+0x4F78 = 0x78A8
+0x4F79 = 0x78AC
+0x4F7A = 0x78AD
+0x4F7B = 0x78B0
+0x4F7C = 0x78B1
+0x4F7D = 0x78B2
+0x4F7E = 0x78B3
+0x5021 = 0x78BB
+0x5022 = 0x78BD
+0x5023 = 0x78BF
+0x5024 = 0x78C7
+0x5025 = 0x78C8
+0x5026 = 0x78C9
+0x5027 = 0x78CC
+0x5028 = 0x78CE
+0x5029 = 0x78D2
+0x502A = 0x78D3
+0x502B = 0x78D5
+0x502C = 0x78D6
+0x502D = 0x78E4
+0x502E = 0x78DB
+0x502F = 0x78DF
+0x5030 = 0x78E0
+0x5031 = 0x78E1
+0x5032 = 0x78E6
+0x5033 = 0x78EA
+0x5034 = 0x78F2
+0x5035 = 0x78F3
+0x5036 = 0x7900
+0x5037 = 0x78F6
+0x5038 = 0x78F7
+0x5039 = 0x78FA
+0x503A = 0x78FB
+0x503B = 0x78FF
+0x503C = 0x7906
+0x503D = 0x790C
+0x503E = 0x7910
+0x503F = 0x791A
+0x5040 = 0x791C
+0x5041 = 0x791E
+0x5042 = 0x791F
+0x5043 = 0x7920
+0x5044 = 0x7925
+0x5045 = 0x7927
+0x5046 = 0x7929
+0x5047 = 0x792D
+0x5048 = 0x7931
+0x5049 = 0x7934
+0x504A = 0x7935
+0x504B = 0x793B
+0x504C = 0x793D
+0x504D = 0x793F
+0x504E = 0x7944
+0x504F = 0x7945
+0x5050 = 0x7946
+0x5051 = 0x794A
+0x5052 = 0x794B
+0x5053 = 0x794F
+0x5054 = 0x7951
+0x5055 = 0x7954
+0x5056 = 0x7958
+0x5057 = 0x795B
+0x5058 = 0x795C
+0x5059 = 0x7967
+0x505A = 0x7969
+0x505B = 0x796B
+0x505C = 0x7972
+0x505D = 0x7979
+0x505E = 0x797B
+0x505F = 0x797C
+0x5060 = 0x797E
+0x5061 = 0x798B
+0x5062 = 0x798C
+0x5063 = 0x7991
+0x5064 = 0x7993
+0x5065 = 0x7994
+0x5066 = 0x7995
+0x5067 = 0x7996
+0x5068 = 0x7998
+0x5069 = 0x799B
+0x506A = 0x799C
+0x506B = 0x79A1
+0x506C = 0x79A8
+0x506D = 0x79A9
+0x506E = 0x79AB
+0x506F = 0x79AF
+0x5070 = 0x79B1
+0x5071 = 0x79B4
+0x5072 = 0x79B8
+0x5073 = 0x79BB
+0x5074 = 0x79C2
+0x5075 = 0x79C4
+0x5076 = 0x79C7
+0x5077 = 0x79C8
+0x5078 = 0x79CA
+0x5079 = 0x79CF
+0x507A = 0x79D4
+0x507B = 0x79D6
+0x507C = 0x79DA
+0x507D = 0x79DD
+0x507E = 0x79DE
+0x5121 = 0x79E0
+0x5122 = 0x79E2
+0x5123 = 0x79E5
+0x5124 = 0x79EA
+0x5125 = 0x79EB
+0x5126 = 0x79ED
+0x5127 = 0x79F1
+0x5128 = 0x79F8
+0x5129 = 0x79FC
+0x512A = 0x7A02
+0x512B = 0x7A03
+0x512C = 0x7A07
+0x512D = 0x7A09
+0x512E = 0x7A0A
+0x512F = 0x7A0C
+0x5130 = 0x7A11
+0x5131 = 0x7A15
+0x5132 = 0x7A1B
+0x5133 = 0x7A1E
+0x5134 = 0x7A21
+0x5135 = 0x7A27
+0x5136 = 0x7A2B
+0x5137 = 0x7A2D
+0x5138 = 0x7A2F
+0x5139 = 0x7A30
+0x513A = 0x7A34
+0x513B = 0x7A35
+0x513C = 0x7A38
+0x513D = 0x7A39
+0x513E = 0x7A3A
+0x513F = 0x7A44
+0x5140 = 0x7A45
+0x5141 = 0x7A47
+0x5142 = 0x7A48
+0x5143 = 0x7A4C
+0x5144 = 0x7A55
+0x5145 = 0x7A56
+0x5146 = 0x7A59
+0x5147 = 0x7A5C
+0x5148 = 0x7A5D
+0x5149 = 0x7A5F
+0x514A = 0x7A60
+0x514B = 0x7A65
+0x514C = 0x7A67
+0x514D = 0x7A6A
+0x514E = 0x7A6D
+0x514F = 0x7A75
+0x5150 = 0x7A78
+0x5151 = 0x7A7E
+0x5152 = 0x7A80
+0x5153 = 0x7A82
+0x5154 = 0x7A85
+0x5155 = 0x7A86
+0x5156 = 0x7A8A
+0x5157 = 0x7A8B
+0x5158 = 0x7A90
+0x5159 = 0x7A91
+0x515A = 0x7A94
+0x515B = 0x7A9E
+0x515C = 0x7AA0
+0x515D = 0x7AA3
+0x515E = 0x7AAC
+0x515F = 0x7AB3
+0x5160 = 0x7AB5
+0x5161 = 0x7AB9
+0x5162 = 0x7ABB
+0x5163 = 0x7ABC
+0x5164 = 0x7AC6
+0x5165 = 0x7AC9
+0x5166 = 0x7ACC
+0x5167 = 0x7ACE
+0x5168 = 0x7AD1
+0x5169 = 0x7ADB
+0x516A = 0x7AE8
+0x516B = 0x7AE9
+0x516C = 0x7AEB
+0x516D = 0x7AEC
+0x516E = 0x7AF1
+0x516F = 0x7AF4
+0x5170 = 0x7AFB
+0x5171 = 0x7AFD
+0x5172 = 0x7AFE
+0x5173 = 0x7B07
+0x5174 = 0x7B14
+0x5175 = 0x7B1F
+0x5176 = 0x7B23
+0x5177 = 0x7B27
+0x5178 = 0x7B29
+0x5179 = 0x7B2A
+0x517A = 0x7B2B
+0x517B = 0x7B2D
+0x517C = 0x7B2E
+0x517D = 0x7B2F
+0x517E = 0x7B30
+0x5221 = 0x7B31
+0x5222 = 0x7B34
+0x5223 = 0x7B3D
+0x5224 = 0x7B3F
+0x5225 = 0x7B40
+0x5226 = 0x7B41
+0x5227 = 0x7B47
+0x5228 = 0x7B4E
+0x5229 = 0x7B55
+0x522A = 0x7B60
+0x522B = 0x7B64
+0x522C = 0x7B66
+0x522D = 0x7B69
+0x522E = 0x7B6A
+0x522F = 0x7B6D
+0x5230 = 0x7B6F
+0x5231 = 0x7B72
+0x5232 = 0x7B73
+0x5233 = 0x7B77
+0x5234 = 0x7B84
+0x5235 = 0x7B89
+0x5236 = 0x7B8E
+0x5237 = 0x7B90
+0x5238 = 0x7B91
+0x5239 = 0x7B96
+0x523A = 0x7B9B
+0x523B = 0x7B9E
+0x523C = 0x7BA0
+0x523D = 0x7BA5
+0x523E = 0x7BAC
+0x523F = 0x7BAF
+0x5240 = 0x7BB0
+0x5241 = 0x7BB2
+0x5242 = 0x7BB5
+0x5243 = 0x7BB6
+0x5244 = 0x7BBA
+0x5245 = 0x7BBB
+0x5246 = 0x7BBC
+0x5247 = 0x7BBD
+0x5248 = 0x7BC2
+0x5249 = 0x7BC5
+0x524A = 0x7BC8
+0x524B = 0x7BCA
+0x524C = 0x7BD4
+0x524D = 0x7BD6
+0x524E = 0x7BD7
+0x524F = 0x7BD9
+0x5250 = 0x7BDA
+0x5251 = 0x7BDB
+0x5252 = 0x7BE8
+0x5253 = 0x7BEA
+0x5254 = 0x7BF2
+0x5255 = 0x7BF4
+0x5256 = 0x7BF5
+0x5257 = 0x7BF8
+0x5258 = 0x7BF9
+0x5259 = 0x7BFA
+0x525A = 0x7BFC
+0x525B = 0x7BFE
+0x525C = 0x7C01
+0x525D = 0x7C02
+0x525E = 0x7C03
+0x525F = 0x7C04
+0x5260 = 0x7C06
+0x5261 = 0x7C09
+0x5262 = 0x7C0B
+0x5263 = 0x7C0C
+0x5264 = 0x7C0E
+0x5265 = 0x7C0F
+0x5266 = 0x7C19
+0x5267 = 0x7C1B
+0x5268 = 0x7C20
+0x5269 = 0x7C25
+0x526A = 0x7C26
+0x526B = 0x7C28
+0x526C = 0x7C2C
+0x526D = 0x7C31
+0x526E = 0x7C33
+0x526F = 0x7C34
+0x5270 = 0x7C36
+0x5271 = 0x7C39
+0x5272 = 0x7C3A
+0x5273 = 0x7C46
+0x5274 = 0x7C4A
+0x5275 = 0x7C55
+0x5276 = 0x7C51
+0x5277 = 0x7C52
+0x5278 = 0x7C53
+0x5279 = 0x7C59
+0x527A = 0x7C5A
+0x527B = 0x7C5B
+0x527C = 0x7C5C
+0x527D = 0x7C5D
+0x527E = 0x7C5E
+0x5321 = 0x7C61
+0x5322 = 0x7C63
+0x5323 = 0x7C67
+0x5324 = 0x7C69
+0x5325 = 0x7C6D
+0x5326 = 0x7C6E
+0x5327 = 0x7C70
+0x5328 = 0x7C72
+0x5329 = 0x7C79
+0x532A = 0x7C7C
+0x532B = 0x7C7D
+0x532C = 0x7C86
+0x532D = 0x7C87
+0x532E = 0x7C8F
+0x532F = 0x7C94
+0x5330 = 0x7C9E
+0x5331 = 0x7CA0
+0x5332 = 0x7CA6
+0x5333 = 0x7CB0
+0x5334 = 0x7CB6
+0x5335 = 0x7CB7
+0x5336 = 0x7CBA
+0x5337 = 0x7CBB
+0x5338 = 0x7CBC
+0x5339 = 0x7CBF
+0x533A = 0x7CC4
+0x533B = 0x7CC7
+0x533C = 0x7CC8
+0x533D = 0x7CC9
+0x533E = 0x7CCD
+0x533F = 0x7CCF
+0x5340 = 0x7CD3
+0x5341 = 0x7CD4
+0x5342 = 0x7CD5
+0x5343 = 0x7CD7
+0x5344 = 0x7CD9
+0x5345 = 0x7CDA
+0x5346 = 0x7CDD
+0x5347 = 0x7CE6
+0x5348 = 0x7CE9
+0x5349 = 0x7CEB
+0x534A = 0x7CF5
+0x534B = 0x7D03
+0x534C = 0x7D07
+0x534D = 0x7D08
+0x534E = 0x7D09
+0x534F = 0x7D0F
+0x5350 = 0x7D11
+0x5351 = 0x7D12
+0x5352 = 0x7D13
+0x5353 = 0x7D16
+0x5354 = 0x7D1D
+0x5355 = 0x7D1E
+0x5356 = 0x7D23
+0x5357 = 0x7D26
+0x5358 = 0x7D2A
+0x5359 = 0x7D2D
+0x535A = 0x7D31
+0x535B = 0x7D3C
+0x535C = 0x7D3D
+0x535D = 0x7D3E
+0x535E = 0x7D40
+0x535F = 0x7D41
+0x5360 = 0x7D47
+0x5361 = 0x7D48
+0x5362 = 0x7D4D
+0x5363 = 0x7D51
+0x5364 = 0x7D53
+0x5365 = 0x7D57
+0x5366 = 0x7D59
+0x5367 = 0x7D5A
+0x5368 = 0x7D5C
+0x5369 = 0x7D5D
+0x536A = 0x7D65
+0x536B = 0x7D67
+0x536C = 0x7D6A
+0x536D = 0x7D70
+0x536E = 0x7D78
+0x536F = 0x7D7A
+0x5370 = 0x7D7B
+0x5371 = 0x7D7F
+0x5372 = 0x7D81
+0x5373 = 0x7D82
+0x5374 = 0x7D83
+0x5375 = 0x7D85
+0x5376 = 0x7D86
+0x5377 = 0x7D88
+0x5378 = 0x7D8B
+0x5379 = 0x7D8C
+0x537A = 0x7D8D
+0x537B = 0x7D91
+0x537C = 0x7D96
+0x537D = 0x7D97
+0x537E = 0x7D9D
+0x5421 = 0x7D9E
+0x5422 = 0x7DA6
+0x5423 = 0x7DA7
+0x5424 = 0x7DAA
+0x5425 = 0x7DB3
+0x5426 = 0x7DB6
+0x5427 = 0x7DB7
+0x5428 = 0x7DB9
+0x5429 = 0x7DC2
+0x542A = 0x7DC3
+0x542B = 0x7DC4
+0x542C = 0x7DC5
+0x542D = 0x7DC6
+0x542E = 0x7DCC
+0x542F = 0x7DCD
+0x5430 = 0x7DCE
+0x5431 = 0x7DD7
+0x5432 = 0x7DD9
+0x5433 = 0x7E00
+0x5434 = 0x7DE2
+0x5435 = 0x7DE5
+0x5436 = 0x7DE6
+0x5437 = 0x7DEA
+0x5438 = 0x7DEB
+0x5439 = 0x7DED
+0x543A = 0x7DF1
+0x543B = 0x7DF5
+0x543C = 0x7DF6
+0x543D = 0x7DF9
+0x543E = 0x7DFA
+0x543F = 0x7E08
+0x5440 = 0x7E10
+0x5441 = 0x7E11
+0x5442 = 0x7E15
+0x5443 = 0x7E17
+0x5444 = 0x7E1C
+0x5445 = 0x7E1D
+0x5446 = 0x7E20
+0x5447 = 0x7E27
+0x5448 = 0x7E28
+0x5449 = 0x7E2C
+0x544A = 0x7E2D
+0x544B = 0x7E2F
+0x544C = 0x7E33
+0x544D = 0x7E36
+0x544E = 0x7E3F
+0x544F = 0x7E44
+0x5450 = 0x7E45
+0x5451 = 0x7E47
+0x5452 = 0x7E4E
+0x5453 = 0x7E50
+0x5454 = 0x7E52
+0x5455 = 0x7E58
+0x5456 = 0x7E5F
+0x5457 = 0x7E61
+0x5458 = 0x7E62
+0x5459 = 0x7E65
+0x545A = 0x7E6B
+0x545B = 0x7E6E
+0x545C = 0x7E6F
+0x545D = 0x7E73
+0x545E = 0x7E78
+0x545F = 0x7E7E
+0x5460 = 0x7E81
+0x5461 = 0x7E86
+0x5462 = 0x7E87
+0x5463 = 0x7E8A
+0x5464 = 0x7E8D
+0x5465 = 0x7E91
+0x5466 = 0x7E95
+0x5467 = 0x7E98
+0x5468 = 0x7E9A
+0x5469 = 0x7E9D
+0x546A = 0x7E9E
+0x546B = 0x7F3C
+0x546C = 0x7F3B
+0x546D = 0x7F3D
+0x546E = 0x7F3E
+0x546F = 0x7F3F
+0x5470 = 0x7F43
+0x5471 = 0x7F44
+0x5472 = 0x7F47
+0x5473 = 0x7F4F
+0x5474 = 0x7F52
+0x5475 = 0x7F53
+0x5476 = 0x7F5B
+0x5477 = 0x7F5C
+0x5478 = 0x7F5D
+0x5479 = 0x7F61
+0x547A = 0x7F63
+0x547B = 0x7F64
+0x547C = 0x7F65
+0x547D = 0x7F66
+0x547E = 0x7F6D
+0x5521 = 0x7F71
+0x5522 = 0x7F7D
+0x5523 = 0x7F7E
+0x5524 = 0x7F7F
+0x5525 = 0x7F80
+0x5526 = 0x7F8B
+0x5527 = 0x7F8D
+0x5528 = 0x7F8F
+0x5529 = 0x7F90
+0x552A = 0x7F91
+0x552B = 0x7F96
+0x552C = 0x7F97
+0x552D = 0x7F9C
+0x552E = 0x7FA1
+0x552F = 0x7FA2
+0x5530 = 0x7FA6
+0x5531 = 0x7FAA
+0x5532 = 0x7FAD
+0x5533 = 0x7FB4
+0x5534 = 0x7FBC
+0x5535 = 0x7FBF
+0x5536 = 0x7FC0
+0x5537 = 0x7FC3
+0x5538 = 0x7FC8
+0x5539 = 0x7FCE
+0x553A = 0x7FCF
+0x553B = 0x7FDB
+0x553C = 0x7FDF
+0x553D = 0x7FE3
+0x553E = 0x7FE5
+0x553F = 0x7FE8
+0x5540 = 0x7FEC
+0x5541 = 0x7FEE
+0x5542 = 0x7FEF
+0x5543 = 0x7FF2
+0x5544 = 0x7FFA
+0x5545 = 0x7FFD
+0x5546 = 0x7FFE
+0x5547 = 0x7FFF
+0x5548 = 0x8007
+0x5549 = 0x8008
+0x554A = 0x800A
+0x554B = 0x800D
+0x554C = 0x800E
+0x554D = 0x800F
+0x554E = 0x8011
+0x554F = 0x8013
+0x5550 = 0x8014
+0x5551 = 0x8016
+0x5552 = 0x801D
+0x5553 = 0x801E
+0x5554 = 0x801F
+0x5555 = 0x8020
+0x5556 = 0x8024
+0x5557 = 0x8026
+0x5558 = 0x802C
+0x5559 = 0x802E
+0x555A = 0x8030
+0x555B = 0x8034
+0x555C = 0x8035
+0x555D = 0x8037
+0x555E = 0x8039
+0x555F = 0x803A
+0x5560 = 0x803C
+0x5561 = 0x803E
+0x5562 = 0x8040
+0x5563 = 0x8044
+0x5564 = 0x8060
+0x5565 = 0x8064
+0x5566 = 0x8066
+0x5567 = 0x806D
+0x5568 = 0x8071
+0x5569 = 0x8075
+0x556A = 0x8081
+0x556B = 0x8088
+0x556C = 0x808E
+0x556D = 0x809C
+0x556E = 0x809E
+0x556F = 0x80A6
+0x5570 = 0x80A7
+0x5571 = 0x80AB
+0x5572 = 0x80B8
+0x5573 = 0x80B9
+0x5574 = 0x80C8
+0x5575 = 0x80CD
+0x5576 = 0x80CF
+0x5577 = 0x80D2
+0x5578 = 0x80D4
+0x5579 = 0x80D5
+0x557A = 0x80D7
+0x557B = 0x80D8
+0x557C = 0x80E0
+0x557D = 0x80ED
+0x557E = 0x80EE
+0x5621 = 0x80F0
+0x5622 = 0x80F2
+0x5623 = 0x80F3
+0x5624 = 0x80F6
+0x5625 = 0x80F9
+0x5626 = 0x80FA
+0x5627 = 0x80FE
+0x5628 = 0x8103
+0x5629 = 0x810B
+0x562A = 0x8116
+0x562B = 0x8117
+0x562C = 0x8118
+0x562D = 0x811C
+0x562E = 0x811E
+0x562F = 0x8120
+0x5630 = 0x8124
+0x5631 = 0x8127
+0x5632 = 0x812C
+0x5633 = 0x8130
+0x5634 = 0x8135
+0x5635 = 0x813A
+0x5636 = 0x813C
+0x5637 = 0x8145
+0x5638 = 0x8147
+0x5639 = 0x814A
+0x563A = 0x814C
+0x563B = 0x8152
+0x563C = 0x8157
+0x563D = 0x8160
+0x563E = 0x8161
+0x563F = 0x8167
+0x5640 = 0x8168
+0x5641 = 0x8169
+0x5642 = 0x816D
+0x5643 = 0x816F
+0x5644 = 0x8177
+0x5645 = 0x8181
+0x5646 = 0x8190
+0x5647 = 0x8184
+0x5648 = 0x8185
+0x5649 = 0x8186
+0x564A = 0x818B
+0x564B = 0x818E
+0x564C = 0x8196
+0x564D = 0x8198
+0x564E = 0x819B
+0x564F = 0x819E
+0x5650 = 0x81A2
+0x5651 = 0x81AE
+0x5652 = 0x81B2
+0x5653 = 0x81B4
+0x5654 = 0x81BB
+0x5655 = 0x81CB
+0x5656 = 0x81C3
+0x5657 = 0x81C5
+0x5658 = 0x81CA
+0x5659 = 0x81CE
+0x565A = 0x81CF
+0x565B = 0x81D5
+0x565C = 0x81D7
+0x565D = 0x81DB
+0x565E = 0x81DD
+0x565F = 0x81DE
+0x5660 = 0x81E1
+0x5661 = 0x81E4
+0x5662 = 0x81EB
+0x5663 = 0x81EC
+0x5664 = 0x81F0
+0x5665 = 0x81F1
+0x5666 = 0x81F2
+0x5667 = 0x81F5
+0x5668 = 0x81F6
+0x5669 = 0x81F8
+0x566A = 0x81F9
+0x566B = 0x81FD
+0x566C = 0x81FF
+0x566D = 0x8200
+0x566E = 0x8203
+0x566F = 0x820F
+0x5670 = 0x8213
+0x5671 = 0x8214
+0x5672 = 0x8219
+0x5673 = 0x821A
+0x5674 = 0x821D
+0x5675 = 0x8221
+0x5676 = 0x8222
+0x5677 = 0x8228
+0x5678 = 0x8232
+0x5679 = 0x8234
+0x567A = 0x823A
+0x567B = 0x8243
+0x567C = 0x8244
+0x567D = 0x8245
+0x567E = 0x8246
+0x5721 = 0x824B
+0x5722 = 0x824E
+0x5723 = 0x824F
+0x5724 = 0x8251
+0x5725 = 0x8256
+0x5726 = 0x825C
+0x5727 = 0x8260
+0x5728 = 0x8263
+0x5729 = 0x8267
+0x572A = 0x826D
+0x572B = 0x8274
+0x572C = 0x827B
+0x572D = 0x827D
+0x572E = 0x827F
+0x572F = 0x8280
+0x5730 = 0x8281
+0x5731 = 0x8283
+0x5732 = 0x8284
+0x5733 = 0x8287
+0x5734 = 0x8289
+0x5735 = 0x828A
+0x5736 = 0x828E
+0x5737 = 0x8291
+0x5738 = 0x8294
+0x5739 = 0x8296
+0x573A = 0x8298
+0x573B = 0x829A
+0x573C = 0x829B
+0x573D = 0x82A0
+0x573E = 0x82A1
+0x573F = 0x82A3
+0x5740 = 0x82A4
+0x5741 = 0x82A7
+0x5742 = 0x82A8
+0x5743 = 0x82A9
+0x5744 = 0x82AA
+0x5745 = 0x82AE
+0x5746 = 0x82B0
+0x5747 = 0x82B2
+0x5748 = 0x82B4
+0x5749 = 0x82B7
+0x574A = 0x82BA
+0x574B = 0x82BC
+0x574C = 0x82BE
+0x574D = 0x82BF
+0x574E = 0x82C6
+0x574F = 0x82D0
+0x5750 = 0x82D5
+0x5751 = 0x82DA
+0x5752 = 0x82E0
+0x5753 = 0x82E2
+0x5754 = 0x82E4
+0x5755 = 0x82E8
+0x5756 = 0x82EA
+0x5757 = 0x82ED
+0x5758 = 0x82EF
+0x5759 = 0x82F6
+0x575A = 0x82F7
+0x575B = 0x82FD
+0x575C = 0x82FE
+0x575D = 0x8300
+0x575E = 0x8301
+0x575F = 0x8307
+0x5760 = 0x8308
+0x5761 = 0x830A
+0x5762 = 0x830B
+0x5763 = 0x8354
+0x5764 = 0x831B
+0x5765 = 0x831D
+0x5766 = 0x831E
+0x5767 = 0x831F
+0x5768 = 0x8321
+0x5769 = 0x8322
+0x576A = 0x832C
+0x576B = 0x832D
+0x576C = 0x832E
+0x576D = 0x8330
+0x576E = 0x8333
+0x576F = 0x8337
+0x5770 = 0x833A
+0x5771 = 0x833C
+0x5772 = 0x833D
+0x5773 = 0x8342
+0x5774 = 0x8343
+0x5775 = 0x8344
+0x5776 = 0x8347
+0x5777 = 0x834D
+0x5778 = 0x834E
+0x5779 = 0x8351
+0x577A = 0x8355
+0x577B = 0x8356
+0x577C = 0x8357
+0x577D = 0x8370
+0x577E = 0x8378
+0x5821 = 0x837D
+0x5822 = 0x837F
+0x5823 = 0x8380
+0x5824 = 0x8382
+0x5825 = 0x8384
+0x5826 = 0x8386
+0x5827 = 0x838D
+0x5828 = 0x8392
+0x5829 = 0x8394
+0x582A = 0x8395
+0x582B = 0x8398
+0x582C = 0x8399
+0x582D = 0x839B
+0x582E = 0x839C
+0x582F = 0x839D
+0x5830 = 0x83A6
+0x5831 = 0x83A7
+0x5832 = 0x83A9
+0x5833 = 0x83AC
+0x5834 = 0x83BE
+0x5835 = 0x83BF
+0x5836 = 0x83C0
+0x5837 = 0x83C7
+0x5838 = 0x83C9
+0x5839 = 0x83CF
+0x583A = 0x83D0
+0x583B = 0x83D1
+0x583C = 0x83D4
+0x583D = 0x83DD
+0x583E = 0x8353
+0x583F = 0x83E8
+0x5840 = 0x83EA
+0x5841 = 0x83F6
+0x5842 = 0x83F8
+0x5843 = 0x83F9
+0x5844 = 0x83FC
+0x5845 = 0x8401
+0x5846 = 0x8406
+0x5847 = 0x840A
+0x5848 = 0x840F
+0x5849 = 0x8411
+0x584A = 0x8415
+0x584B = 0x8419
+0x584C = 0x83AD
+0x584D = 0x842F
+0x584E = 0x8439
+0x584F = 0x8445
+0x5850 = 0x8447
+0x5851 = 0x8448
+0x5852 = 0x844A
+0x5853 = 0x844D
+0x5854 = 0x844F
+0x5855 = 0x8451
+0x5856 = 0x8452
+0x5857 = 0x8456
+0x5858 = 0x8458
+0x5859 = 0x8459
+0x585A = 0x845A
+0x585B = 0x845C
+0x585C = 0x8460
+0x585D = 0x8464
+0x585E = 0x8465
+0x585F = 0x8467
+0x5860 = 0x846A
+0x5861 = 0x8470
+0x5862 = 0x8473
+0x5863 = 0x8474
+0x5864 = 0x8476
+0x5865 = 0x8478
+0x5866 = 0x847C
+0x5867 = 0x847D
+0x5868 = 0x8481
+0x5869 = 0x8485
+0x586A = 0x8492
+0x586B = 0x8493
+0x586C = 0x8495
+0x586D = 0x849E
+0x586E = 0x84A6
+0x586F = 0x84A8
+0x5870 = 0x84A9
+0x5871 = 0x84AA
+0x5872 = 0x84AF
+0x5873 = 0x84B1
+0x5874 = 0x84B4
+0x5875 = 0x84BA
+0x5876 = 0x84BD
+0x5877 = 0x84BE
+0x5878 = 0x84C0
+0x5879 = 0x84C2
+0x587A = 0x84C7
+0x587B = 0x84C8
+0x587C = 0x84CC
+0x587D = 0x84CF
+0x587E = 0x84D3
+0x5921 = 0x84DC
+0x5922 = 0x84E7
+0x5923 = 0x84EA
+0x5924 = 0x84EF
+0x5925 = 0x84F0
+0x5926 = 0x84F1
+0x5927 = 0x84F2
+0x5928 = 0x84F7
+0x5929 = 0x8532
+0x592A = 0x84FA
+0x592B = 0x84FB
+0x592C = 0x84FD
+0x592D = 0x8502
+0x592E = 0x8503
+0x592F = 0x8507
+0x5930 = 0x850C
+0x5931 = 0x850E
+0x5932 = 0x8510
+0x5933 = 0x851C
+0x5934 = 0x851E
+0x5935 = 0x8522
+0x5936 = 0x8523
+0x5937 = 0x8524
+0x5938 = 0x8525
+0x5939 = 0x8527
+0x593A = 0x852A
+0x593B = 0x852B
+0x593C = 0x852F
+0x593D = 0x8533
+0x593E = 0x8534
+0x593F = 0x8536
+0x5940 = 0x853F
+0x5941 = 0x8546
+0x5942 = 0x854F
+0x5943 = 0x8550
+0x5944 = 0x8551
+0x5945 = 0x8552
+0x5946 = 0x8553
+0x5947 = 0x8556
+0x5948 = 0x8559
+0x5949 = 0x855C
+0x594A = 0x855D
+0x594B = 0x855E
+0x594C = 0x855F
+0x594D = 0x8560
+0x594E = 0x8561
+0x594F = 0x8562
+0x5950 = 0x8564
+0x5951 = 0x856B
+0x5952 = 0x856F
+0x5953 = 0x8579
+0x5954 = 0x857A
+0x5955 = 0x857B
+0x5956 = 0x857D
+0x5957 = 0x857F
+0x5958 = 0x8581
+0x5959 = 0x8585
+0x595A = 0x8586
+0x595B = 0x8589
+0x595C = 0x858B
+0x595D = 0x858C
+0x595E = 0x858F
+0x595F = 0x8593
+0x5960 = 0x8598
+0x5961 = 0x859D
+0x5962 = 0x859F
+0x5963 = 0x85A0
+0x5964 = 0x85A2
+0x5965 = 0x85A5
+0x5966 = 0x85A7
+0x5967 = 0x85B4
+0x5968 = 0x85B6
+0x5969 = 0x85B7
+0x596A = 0x85B8
+0x596B = 0x85BC
+0x596C = 0x85BD
+0x596D = 0x85BE
+0x596E = 0x85BF
+0x596F = 0x85C2
+0x5970 = 0x85C7
+0x5971 = 0x85CA
+0x5972 = 0x85CB
+0x5973 = 0x85CE
+0x5974 = 0x85AD
+0x5975 = 0x85D8
+0x5976 = 0x85DA
+0x5977 = 0x85DF
+0x5978 = 0x85E0
+0x5979 = 0x85E6
+0x597A = 0x85E8
+0x597B = 0x85ED
+0x597C = 0x85F3
+0x597D = 0x85F6
+0x597E = 0x85FC
+0x5A21 = 0x85FF
+0x5A22 = 0x8600
+0x5A23 = 0x8604
+0x5A24 = 0x8605
+0x5A25 = 0x860D
+0x5A26 = 0x860E
+0x5A27 = 0x8610
+0x5A28 = 0x8611
+0x5A29 = 0x8612
+0x5A2A = 0x8618
+0x5A2B = 0x8619
+0x5A2C = 0x861B
+0x5A2D = 0x861E
+0x5A2E = 0x8621
+0x5A2F = 0x8627
+0x5A30 = 0x8629
+0x5A31 = 0x8636
+0x5A32 = 0x8638
+0x5A33 = 0x863A
+0x5A34 = 0x863C
+0x5A35 = 0x863D
+0x5A36 = 0x8640
+0x5A37 = 0x8642
+0x5A38 = 0x8646
+0x5A39 = 0x8652
+0x5A3A = 0x8653
+0x5A3B = 0x8656
+0x5A3C = 0x8657
+0x5A3D = 0x8658
+0x5A3E = 0x8659
+0x5A3F = 0x865D
+0x5A40 = 0x8660
+0x5A41 = 0x8661
+0x5A42 = 0x8662
+0x5A43 = 0x8663
+0x5A44 = 0x8664
+0x5A45 = 0x8669
+0x5A46 = 0x866C
+0x5A47 = 0x866F
+0x5A48 = 0x8675
+0x5A49 = 0x8676
+0x5A4A = 0x8677
+0x5A4B = 0x867A
+0x5A4C = 0x868D
+0x5A4D = 0x8691
+0x5A4E = 0x8696
+0x5A4F = 0x8698
+0x5A50 = 0x869A
+0x5A51 = 0x869C
+0x5A52 = 0x86A1
+0x5A53 = 0x86A6
+0x5A54 = 0x86A7
+0x5A55 = 0x86A8
+0x5A56 = 0x86AD
+0x5A57 = 0x86B1
+0x5A58 = 0x86B3
+0x5A59 = 0x86B4
+0x5A5A = 0x86B5
+0x5A5B = 0x86B7
+0x5A5C = 0x86B8
+0x5A5D = 0x86B9
+0x5A5E = 0x86BF
+0x5A5F = 0x86C0
+0x5A60 = 0x86C1
+0x5A61 = 0x86C3
+0x5A62 = 0x86C5
+0x5A63 = 0x86D1
+0x5A64 = 0x86D2
+0x5A65 = 0x86D5
+0x5A66 = 0x86D7
+0x5A67 = 0x86DA
+0x5A68 = 0x86DC
+0x5A69 = 0x86E0
+0x5A6A = 0x86E3
+0x5A6B = 0x86E5
+0x5A6C = 0x86E7
+0x5A6D = 0x8688
+0x5A6E = 0x86FA
+0x5A6F = 0x86FC
+0x5A70 = 0x86FD
+0x5A71 = 0x8704
+0x5A72 = 0x8705
+0x5A73 = 0x8707
+0x5A74 = 0x870B
+0x5A75 = 0x870E
+0x5A76 = 0x870F
+0x5A77 = 0x8710
+0x5A78 = 0x8713
+0x5A79 = 0x8714
+0x5A7A = 0x8719
+0x5A7B = 0x871E
+0x5A7C = 0x871F
+0x5A7D = 0x8721
+0x5A7E = 0x8723
+0x5B21 = 0x8728
+0x5B22 = 0x872E
+0x5B23 = 0x872F
+0x5B24 = 0x8731
+0x5B25 = 0x8732
+0x5B26 = 0x8739
+0x5B27 = 0x873A
+0x5B28 = 0x873C
+0x5B29 = 0x873D
+0x5B2A = 0x873E
+0x5B2B = 0x8740
+0x5B2C = 0x8743
+0x5B2D = 0x8745
+0x5B2E = 0x874D
+0x5B2F = 0x8758
+0x5B30 = 0x875D
+0x5B31 = 0x8761
+0x5B32 = 0x8764
+0x5B33 = 0x8765
+0x5B34 = 0x876F
+0x5B35 = 0x8771
+0x5B36 = 0x8772
+0x5B37 = 0x877B
+0x5B38 = 0x8783
+0x5B39 = 0x8784
+0x5B3A = 0x8785
+0x5B3B = 0x8786
+0x5B3C = 0x8787
+0x5B3D = 0x8788
+0x5B3E = 0x8789
+0x5B3F = 0x878B
+0x5B40 = 0x878C
+0x5B41 = 0x8790
+0x5B42 = 0x8793
+0x5B43 = 0x8795
+0x5B44 = 0x8797
+0x5B45 = 0x8798
+0x5B46 = 0x8799
+0x5B47 = 0x879E
+0x5B48 = 0x87A0
+0x5B49 = 0x87A3
+0x5B4A = 0x87A7
+0x5B4B = 0x87AC
+0x5B4C = 0x87AD
+0x5B4D = 0x87AE
+0x5B4E = 0x87B1
+0x5B4F = 0x87B5
+0x5B50 = 0x87BE
+0x5B51 = 0x87BF
+0x5B52 = 0x87C1
+0x5B53 = 0x87C8
+0x5B54 = 0x87C9
+0x5B55 = 0x87CA
+0x5B56 = 0x87CE
+0x5B57 = 0x87D5
+0x5B58 = 0x87D6
+0x5B59 = 0x87D9
+0x5B5A = 0x87DA
+0x5B5B = 0x87DC
+0x5B5C = 0x87DF
+0x5B5D = 0x87E2
+0x5B5E = 0x87E3
+0x5B5F = 0x87E4
+0x5B60 = 0x87EA
+0x5B61 = 0x87EB
+0x5B62 = 0x87ED
+0x5B63 = 0x87F1
+0x5B64 = 0x87F3
+0x5B65 = 0x87F8
+0x5B66 = 0x87FA
+0x5B67 = 0x87FF
+0x5B68 = 0x8801
+0x5B69 = 0x8803
+0x5B6A = 0x8806
+0x5B6B = 0x8809
+0x5B6C = 0x880A
+0x5B6D = 0x880B
+0x5B6E = 0x8810
+0x5B6F = 0x8819
+0x5B70 = 0x8812
+0x5B71 = 0x8813
+0x5B72 = 0x8814
+0x5B73 = 0x8818
+0x5B74 = 0x881A
+0x5B75 = 0x881B
+0x5B76 = 0x881C
+0x5B77 = 0x881E
+0x5B78 = 0x881F
+0x5B79 = 0x8828
+0x5B7A = 0x882D
+0x5B7B = 0x882E
+0x5B7C = 0x8830
+0x5B7D = 0x8832
+0x5B7E = 0x8835
+0x5C21 = 0x883A
+0x5C22 = 0x883C
+0x5C23 = 0x8841
+0x5C24 = 0x8843
+0x5C25 = 0x8845
+0x5C26 = 0x8848
+0x5C27 = 0x8849
+0x5C28 = 0x884A
+0x5C29 = 0x884B
+0x5C2A = 0x884E
+0x5C2B = 0x8851
+0x5C2C = 0x8855
+0x5C2D = 0x8856
+0x5C2E = 0x8858
+0x5C2F = 0x885A
+0x5C30 = 0x885C
+0x5C31 = 0x885F
+0x5C32 = 0x8860
+0x5C33 = 0x8864
+0x5C34 = 0x8869
+0x5C35 = 0x8871
+0x5C36 = 0x8879
+0x5C37 = 0x887B
+0x5C38 = 0x8880
+0x5C39 = 0x8898
+0x5C3A = 0x889A
+0x5C3B = 0x889B
+0x5C3C = 0x889C
+0x5C3D = 0x889F
+0x5C3E = 0x88A0
+0x5C3F = 0x88A8
+0x5C40 = 0x88AA
+0x5C41 = 0x88BA
+0x5C42 = 0x88BD
+0x5C43 = 0x88BE
+0x5C44 = 0x88C0
+0x5C45 = 0x88CA
+0x5C46 = 0x88CB
+0x5C47 = 0x88CC
+0x5C48 = 0x88CD
+0x5C49 = 0x88CE
+0x5C4A = 0x88D1
+0x5C4B = 0x88D2
+0x5C4C = 0x88D3
+0x5C4D = 0x88DB
+0x5C4E = 0x88DE
+0x5C4F = 0x88E7
+0x5C50 = 0x88EF
+0x5C51 = 0x88F0
+0x5C52 = 0x88F1
+0x5C53 = 0x88F5
+0x5C54 = 0x88F7
+0x5C55 = 0x8901
+0x5C56 = 0x8906
+0x5C57 = 0x890D
+0x5C58 = 0x890E
+0x5C59 = 0x890F
+0x5C5A = 0x8915
+0x5C5B = 0x8916
+0x5C5C = 0x8918
+0x5C5D = 0x8919
+0x5C5E = 0x891A
+0x5C5F = 0x891C
+0x5C60 = 0x8920
+0x5C61 = 0x8926
+0x5C62 = 0x8927
+0x5C63 = 0x8928
+0x5C64 = 0x8930
+0x5C65 = 0x8931
+0x5C66 = 0x8932
+0x5C67 = 0x8935
+0x5C68 = 0x8939
+0x5C69 = 0x893A
+0x5C6A = 0x893E
+0x5C6B = 0x8940
+0x5C6C = 0x8942
+0x5C6D = 0x8945
+0x5C6E = 0x8946
+0x5C6F = 0x8949
+0x5C70 = 0x894F
+0x5C71 = 0x8952
+0x5C72 = 0x8957
+0x5C73 = 0x895A
+0x5C74 = 0x895B
+0x5C75 = 0x895C
+0x5C76 = 0x8961
+0x5C77 = 0x8962
+0x5C78 = 0x8963
+0x5C79 = 0x896B
+0x5C7A = 0x896E
+0x5C7B = 0x8970
+0x5C7C = 0x8973
+0x5C7D = 0x8975
+0x5C7E = 0x897A
+0x5D21 = 0x897B
+0x5D22 = 0x897C
+0x5D23 = 0x897D
+0x5D24 = 0x8989
+0x5D25 = 0x898D
+0x5D26 = 0x8990
+0x5D27 = 0x8994
+0x5D28 = 0x8995
+0x5D29 = 0x899B
+0x5D2A = 0x899C
+0x5D2B = 0x899F
+0x5D2C = 0x89A0
+0x5D2D = 0x89A5
+0x5D2E = 0x89B0
+0x5D2F = 0x89B4
+0x5D30 = 0x89B5
+0x5D31 = 0x89B6
+0x5D32 = 0x89B7
+0x5D33 = 0x89BC
+0x5D34 = 0x89D4
+0x5D35 = 0x89D5
+0x5D36 = 0x89D6
+0x5D37 = 0x89D7
+0x5D38 = 0x89D8
+0x5D39 = 0x89E5
+0x5D3A = 0x89E9
+0x5D3B = 0x89EB
+0x5D3C = 0x89ED
+0x5D3D = 0x89F1
+0x5D3E = 0x89F3
+0x5D3F = 0x89F6
+0x5D40 = 0x89F9
+0x5D41 = 0x89FD
+0x5D42 = 0x89FF
+0x5D43 = 0x8A04
+0x5D44 = 0x8A05
+0x5D45 = 0x8A07
+0x5D46 = 0x8A0F
+0x5D47 = 0x8A11
+0x5D48 = 0x8A12
+0x5D49 = 0x8A14
+0x5D4A = 0x8A15
+0x5D4B = 0x8A1E
+0x5D4C = 0x8A20
+0x5D4D = 0x8A22
+0x5D4E = 0x8A24
+0x5D4F = 0x8A26
+0x5D50 = 0x8A2B
+0x5D51 = 0x8A2C
+0x5D52 = 0x8A2F
+0x5D53 = 0x8A35
+0x5D54 = 0x8A37
+0x5D55 = 0x8A3D
+0x5D56 = 0x8A3E
+0x5D57 = 0x8A40
+0x5D58 = 0x8A43
+0x5D59 = 0x8A45
+0x5D5A = 0x8A47
+0x5D5B = 0x8A49
+0x5D5C = 0x8A4D
+0x5D5D = 0x8A4E
+0x5D5E = 0x8A53
+0x5D5F = 0x8A56
+0x5D60 = 0x8A57
+0x5D61 = 0x8A58
+0x5D62 = 0x8A5C
+0x5D63 = 0x8A5D
+0x5D64 = 0x8A61
+0x5D65 = 0x8A65
+0x5D66 = 0x8A67
+0x5D67 = 0x8A75
+0x5D68 = 0x8A76
+0x5D69 = 0x8A77
+0x5D6A = 0x8A79
+0x5D6B = 0x8A7A
+0x5D6C = 0x8A7B
+0x5D6D = 0x8A7E
+0x5D6E = 0x8A7F
+0x5D6F = 0x8A80
+0x5D70 = 0x8A83
+0x5D71 = 0x8A86
+0x5D72 = 0x8A8B
+0x5D73 = 0x8A8F
+0x5D74 = 0x8A90
+0x5D75 = 0x8A92
+0x5D76 = 0x8A96
+0x5D77 = 0x8A97
+0x5D78 = 0x8A99
+0x5D79 = 0x8A9F
+0x5D7A = 0x8AA7
+0x5D7B = 0x8AA9
+0x5D7C = 0x8AAE
+0x5D7D = 0x8AAF
+0x5D7E = 0x8AB3
+0x5E21 = 0x8AB6
+0x5E22 = 0x8AB7
+0x5E23 = 0x8ABB
+0x5E24 = 0x8ABE
+0x5E25 = 0x8AC3
+0x5E26 = 0x8AC6
+0x5E27 = 0x8AC8
+0x5E28 = 0x8AC9
+0x5E29 = 0x8ACA
+0x5E2A = 0x8AD1
+0x5E2B = 0x8AD3
+0x5E2C = 0x8AD4
+0x5E2D = 0x8AD5
+0x5E2E = 0x8AD7
+0x5E2F = 0x8ADD
+0x5E30 = 0x8ADF
+0x5E31 = 0x8AEC
+0x5E32 = 0x8AF0
+0x5E33 = 0x8AF4
+0x5E34 = 0x8AF5
+0x5E35 = 0x8AF6
+0x5E36 = 0x8AFC
+0x5E37 = 0x8AFF
+0x5E38 = 0x8B05
+0x5E39 = 0x8B06
+0x5E3A = 0x8B0B
+0x5E3B = 0x8B11
+0x5E3C = 0x8B1C
+0x5E3D = 0x8B1E
+0x5E3E = 0x8B1F
+0x5E3F = 0x8B0A
+0x5E40 = 0x8B2D
+0x5E41 = 0x8B30
+0x5E42 = 0x8B37
+0x5E43 = 0x8B3C
+0x5E44 = 0x8B42
+0x5E45 = 0x8B43
+0x5E46 = 0x8B44
+0x5E47 = 0x8B45
+0x5E48 = 0x8B46
+0x5E49 = 0x8B48
+0x5E4A = 0x8B52
+0x5E4B = 0x8B53
+0x5E4C = 0x8B54
+0x5E4D = 0x8B59
+0x5E4E = 0x8B4D
+0x5E4F = 0x8B5E
+0x5E50 = 0x8B63
+0x5E51 = 0x8B6D
+0x5E52 = 0x8B76
+0x5E53 = 0x8B78
+0x5E54 = 0x8B79
+0x5E55 = 0x8B7C
+0x5E56 = 0x8B7E
+0x5E57 = 0x8B81
+0x5E58 = 0x8B84
+0x5E59 = 0x8B85
+0x5E5A = 0x8B8B
+0x5E5B = 0x8B8D
+0x5E5C = 0x8B8F
+0x5E5D = 0x8B94
+0x5E5E = 0x8B95
+0x5E5F = 0x8B9C
+0x5E60 = 0x8B9E
+0x5E61 = 0x8B9F
+0x5E62 = 0x8C38
+0x5E63 = 0x8C39
+0x5E64 = 0x8C3D
+0x5E65 = 0x8C3E
+0x5E66 = 0x8C45
+0x5E67 = 0x8C47
+0x5E68 = 0x8C49
+0x5E69 = 0x8C4B
+0x5E6A = 0x8C4F
+0x5E6B = 0x8C51
+0x5E6C = 0x8C53
+0x5E6D = 0x8C54
+0x5E6E = 0x8C57
+0x5E6F = 0x8C58
+0x5E70 = 0x8C5B
+0x5E71 = 0x8C5D
+0x5E72 = 0x8C59
+0x5E73 = 0x8C63
+0x5E74 = 0x8C64
+0x5E75 = 0x8C66
+0x5E76 = 0x8C68
+0x5E77 = 0x8C69
+0x5E78 = 0x8C6D
+0x5E79 = 0x8C73
+0x5E7A = 0x8C75
+0x5E7B = 0x8C76
+0x5E7C = 0x8C7B
+0x5E7D = 0x8C7E
+0x5E7E = 0x8C86
+0x5F21 = 0x8C87
+0x5F22 = 0x8C8B
+0x5F23 = 0x8C90
+0x5F24 = 0x8C92
+0x5F25 = 0x8C93
+0x5F26 = 0x8C99
+0x5F27 = 0x8C9B
+0x5F28 = 0x8C9C
+0x5F29 = 0x8CA4
+0x5F2A = 0x8CB9
+0x5F2B = 0x8CBA
+0x5F2C = 0x8CC5
+0x5F2D = 0x8CC6
+0x5F2E = 0x8CC9
+0x5F2F = 0x8CCB
+0x5F30 = 0x8CCF
+0x5F31 = 0x8CD6
+0x5F32 = 0x8CD5
+0x5F33 = 0x8CD9
+0x5F34 = 0x8CDD
+0x5F35 = 0x8CE1
+0x5F36 = 0x8CE8
+0x5F37 = 0x8CEC
+0x5F38 = 0x8CEF
+0x5F39 = 0x8CF0
+0x5F3A = 0x8CF2
+0x5F3B = 0x8CF5
+0x5F3C = 0x8CF7
+0x5F3D = 0x8CF8
+0x5F3E = 0x8CFE
+0x5F3F = 0x8CFF
+0x5F40 = 0x8D01
+0x5F41 = 0x8D03
+0x5F42 = 0x8D09
+0x5F43 = 0x8D12
+0x5F44 = 0x8D17
+0x5F45 = 0x8D1B
+0x5F46 = 0x8D65
+0x5F47 = 0x8D69
+0x5F48 = 0x8D6C
+0x5F49 = 0x8D6E
+0x5F4A = 0x8D7F
+0x5F4B = 0x8D82
+0x5F4C = 0x8D84
+0x5F4D = 0x8D88
+0x5F4E = 0x8D8D
+0x5F4F = 0x8D90
+0x5F50 = 0x8D91
+0x5F51 = 0x8D95
+0x5F52 = 0x8D9E
+0x5F53 = 0x8D9F
+0x5F54 = 0x8DA0
+0x5F55 = 0x8DA6
+0x5F56 = 0x8DAB
+0x5F57 = 0x8DAC
+0x5F58 = 0x8DAF
+0x5F59 = 0x8DB2
+0x5F5A = 0x8DB5
+0x5F5B = 0x8DB7
+0x5F5C = 0x8DB9
+0x5F5D = 0x8DBB
+0x5F5E = 0x8DC0
+0x5F5F = 0x8DC5
+0x5F60 = 0x8DC6
+0x5F61 = 0x8DC7
+0x5F62 = 0x8DC8
+0x5F63 = 0x8DCA
+0x5F64 = 0x8DCE
+0x5F65 = 0x8DD1
+0x5F66 = 0x8DD4
+0x5F67 = 0x8DD5
+0x5F68 = 0x8DD7
+0x5F69 = 0x8DD9
+0x5F6A = 0x8DE4
+0x5F6B = 0x8DE5
+0x5F6C = 0x8DE7
+0x5F6D = 0x8DEC
+0x5F6E = 0x8DF0
+0x5F6F = 0x8DBC
+0x5F70 = 0x8DF1
+0x5F71 = 0x8DF2
+0x5F72 = 0x8DF4
+0x5F73 = 0x8DFD
+0x5F74 = 0x8E01
+0x5F75 = 0x8E04
+0x5F76 = 0x8E05
+0x5F77 = 0x8E06
+0x5F78 = 0x8E0B
+0x5F79 = 0x8E11
+0x5F7A = 0x8E14
+0x5F7B = 0x8E16
+0x5F7C = 0x8E20
+0x5F7D = 0x8E21
+0x5F7E = 0x8E22
+0x6021 = 0x8E23
+0x6022 = 0x8E26
+0x6023 = 0x8E27
+0x6024 = 0x8E31
+0x6025 = 0x8E33
+0x6026 = 0x8E36
+0x6027 = 0x8E37
+0x6028 = 0x8E38
+0x6029 = 0x8E39
+0x602A = 0x8E3D
+0x602B = 0x8E40
+0x602C = 0x8E41
+0x602D = 0x8E4B
+0x602E = 0x8E4D
+0x602F = 0x8E4E
+0x6030 = 0x8E4F
+0x6031 = 0x8E54
+0x6032 = 0x8E5B
+0x6033 = 0x8E5C
+0x6034 = 0x8E5D
+0x6035 = 0x8E5E
+0x6036 = 0x8E61
+0x6037 = 0x8E62
+0x6038 = 0x8E69
+0x6039 = 0x8E6C
+0x603A = 0x8E6D
+0x603B = 0x8E6F
+0x603C = 0x8E70
+0x603D = 0x8E71
+0x603E = 0x8E79
+0x603F = 0x8E7A
+0x6040 = 0x8E7B
+0x6041 = 0x8E82
+0x6042 = 0x8E83
+0x6043 = 0x8E89
+0x6044 = 0x8E90
+0x6045 = 0x8E92
+0x6046 = 0x8E95
+0x6047 = 0x8E9A
+0x6048 = 0x8E9B
+0x6049 = 0x8E9D
+0x604A = 0x8E9E
+0x604B = 0x8EA2
+0x604C = 0x8EA7
+0x604D = 0x8EA9
+0x604E = 0x8EAD
+0x604F = 0x8EAE
+0x6050 = 0x8EB3
+0x6051 = 0x8EB5
+0x6052 = 0x8EBA
+0x6053 = 0x8EBB
+0x6054 = 0x8EC0
+0x6055 = 0x8EC1
+0x6056 = 0x8EC3
+0x6057 = 0x8EC4
+0x6058 = 0x8EC7
+0x6059 = 0x8ECF
+0x605A = 0x8ED1
+0x605B = 0x8ED4
+0x605C = 0x8EDC
+0x605D = 0x8EE8
+0x605E = 0x8EEE
+0x605F = 0x8EF0
+0x6060 = 0x8EF1
+0x6061 = 0x8EF7
+0x6062 = 0x8EF9
+0x6063 = 0x8EFA
+0x6064 = 0x8EED
+0x6065 = 0x8F00
+0x6066 = 0x8F02
+0x6067 = 0x8F07
+0x6068 = 0x8F08
+0x6069 = 0x8F0F
+0x606A = 0x8F10
+0x606B = 0x8F16
+0x606C = 0x8F17
+0x606D = 0x8F18
+0x606E = 0x8F1E
+0x606F = 0x8F20
+0x6070 = 0x8F21
+0x6071 = 0x8F23
+0x6072 = 0x8F25
+0x6073 = 0x8F27
+0x6074 = 0x8F28
+0x6075 = 0x8F2C
+0x6076 = 0x8F2D
+0x6077 = 0x8F2E
+0x6078 = 0x8F34
+0x6079 = 0x8F35
+0x607A = 0x8F36
+0x607B = 0x8F37
+0x607C = 0x8F3A
+0x607D = 0x8F40
+0x607E = 0x8F41
+0x6121 = 0x8F43
+0x6122 = 0x8F47
+0x6123 = 0x8F4F
+0x6124 = 0x8F51
+0x6125 = 0x8F52
+0x6126 = 0x8F53
+0x6127 = 0x8F54
+0x6128 = 0x8F55
+0x6129 = 0x8F58
+0x612A = 0x8F5D
+0x612B = 0x8F5E
+0x612C = 0x8F65
+0x612D = 0x8F9D
+0x612E = 0x8FA0
+0x612F = 0x8FA1
+0x6130 = 0x8FA4
+0x6131 = 0x8FA5
+0x6132 = 0x8FA6
+0x6133 = 0x8FB5
+0x6134 = 0x8FB6
+0x6135 = 0x8FB8
+0x6136 = 0x8FBE
+0x6137 = 0x8FC0
+0x6138 = 0x8FC1
+0x6139 = 0x8FC6
+0x613A = 0x8FCA
+0x613B = 0x8FCB
+0x613C = 0x8FCD
+0x613D = 0x8FD0
+0x613E = 0x8FD2
+0x613F = 0x8FD3
+0x6140 = 0x8FD5
+0x6141 = 0x8FE0
+0x6142 = 0x8FE3
+0x6143 = 0x8FE4
+0x6144 = 0x8FE8
+0x6145 = 0x8FEE
+0x6146 = 0x8FF1
+0x6147 = 0x8FF5
+0x6148 = 0x8FF6
+0x6149 = 0x8FFB
+0x614A = 0x8FFE
+0x614B = 0x9002
+0x614C = 0x9004
+0x614D = 0x9008
+0x614E = 0x900C
+0x614F = 0x9018
+0x6150 = 0x901B
+0x6151 = 0x9028
+0x6152 = 0x9029
+0x6153 = 0x902F
+0x6154 = 0x902A
+0x6155 = 0x902C
+0x6156 = 0x902D
+0x6157 = 0x9033
+0x6158 = 0x9034
+0x6159 = 0x9037
+0x615A = 0x903F
+0x615B = 0x9043
+0x615C = 0x9044
+0x615D = 0x904C
+0x615E = 0x905B
+0x615F = 0x905D
+0x6160 = 0x9062
+0x6161 = 0x9066
+0x6162 = 0x9067
+0x6163 = 0x906C
+0x6164 = 0x9070
+0x6165 = 0x9074
+0x6166 = 0x9079
+0x6167 = 0x9085
+0x6168 = 0x9088
+0x6169 = 0x908B
+0x616A = 0x908C
+0x616B = 0x908E
+0x616C = 0x9090
+0x616D = 0x9095
+0x616E = 0x9097
+0x616F = 0x9098
+0x6170 = 0x9099
+0x6171 = 0x909B
+0x6172 = 0x90A0
+0x6173 = 0x90A1
+0x6174 = 0x90A2
+0x6175 = 0x90A5
+0x6176 = 0x90B0
+0x6177 = 0x90B2
+0x6178 = 0x90B3
+0x6179 = 0x90B4
+0x617A = 0x90B6
+0x617B = 0x90BD
+0x617C = 0x90CC
+0x617D = 0x90BE
+0x617E = 0x90C3
+0x6221 = 0x90C4
+0x6222 = 0x90C5
+0x6223 = 0x90C7
+0x6224 = 0x90C8
+0x6225 = 0x90D5
+0x6226 = 0x90D7
+0x6227 = 0x90D8
+0x6228 = 0x90D9
+0x6229 = 0x90DC
+0x622A = 0x90DD
+0x622B = 0x90DF
+0x622C = 0x90E5
+0x622D = 0x90D2
+0x622E = 0x90F6
+0x622F = 0x90EB
+0x6230 = 0x90EF
+0x6231 = 0x90F0
+0x6232 = 0x90F4
+0x6233 = 0x90FE
+0x6234 = 0x90FF
+0x6235 = 0x9100
+0x6236 = 0x9104
+0x6237 = 0x9105
+0x6238 = 0x9106
+0x6239 = 0x9108
+0x623A = 0x910D
+0x623B = 0x9110
+0x623C = 0x9114
+0x623D = 0x9116
+0x623E = 0x9117
+0x623F = 0x9118
+0x6240 = 0x911A
+0x6241 = 0x911C
+0x6242 = 0x911E
+0x6243 = 0x9120
+0x6244 = 0x9125
+0x6245 = 0x9122
+0x6246 = 0x9123
+0x6247 = 0x9127
+0x6248 = 0x9129
+0x6249 = 0x912E
+0x624A = 0x912F
+0x624B = 0x9131
+0x624C = 0x9134
+0x624D = 0x9136
+0x624E = 0x9137
+0x624F = 0x9139
+0x6250 = 0x913A
+0x6251 = 0x913C
+0x6252 = 0x913D
+0x6253 = 0x9143
+0x6254 = 0x9147
+0x6255 = 0x9148
+0x6256 = 0x914F
+0x6257 = 0x9153
+0x6258 = 0x9157
+0x6259 = 0x9159
+0x625A = 0x915A
+0x625B = 0x915B
+0x625C = 0x9161
+0x625D = 0x9164
+0x625E = 0x9167
+0x625F = 0x916D
+0x6260 = 0x9174
+0x6261 = 0x9179
+0x6262 = 0x917A
+0x6263 = 0x917B
+0x6264 = 0x9181
+0x6265 = 0x9183
+0x6266 = 0x9185
+0x6267 = 0x9186
+0x6268 = 0x918A
+0x6269 = 0x918E
+0x626A = 0x9191
+0x626B = 0x9193
+0x626C = 0x9194
+0x626D = 0x9195
+0x626E = 0x9198
+0x626F = 0x919E
+0x6270 = 0x91A1
+0x6271 = 0x91A6
+0x6272 = 0x91A8
+0x6273 = 0x91AC
+0x6274 = 0x91AD
+0x6275 = 0x91AE
+0x6276 = 0x91B0
+0x6277 = 0x91B1
+0x6278 = 0x91B2
+0x6279 = 0x91B3
+0x627A = 0x91B6
+0x627B = 0x91BB
+0x627C = 0x91BC
+0x627D = 0x91BD
+0x627E = 0x91BF
+0x6321 = 0x91C2
+0x6322 = 0x91C3
+0x6323 = 0x91C5
+0x6324 = 0x91D3
+0x6325 = 0x91D4
+0x6326 = 0x91D7
+0x6327 = 0x91D9
+0x6328 = 0x91DA
+0x6329 = 0x91DE
+0x632A = 0x91E4
+0x632B = 0x91E5
+0x632C = 0x91E9
+0x632D = 0x91EA
+0x632E = 0x91EC
+0x632F = 0x91ED
+0x6330 = 0x91EE
+0x6331 = 0x91EF
+0x6332 = 0x91F0
+0x6333 = 0x91F1
+0x6334 = 0x91F7
+0x6335 = 0x91F9
+0x6336 = 0x91FB
+0x6337 = 0x91FD
+0x6338 = 0x9200
+0x6339 = 0x9201
+0x633A = 0x9204
+0x633B = 0x9205
+0x633C = 0x9206
+0x633D = 0x9207
+0x633E = 0x9209
+0x633F = 0x920A
+0x6340 = 0x920C
+0x6341 = 0x9210
+0x6342 = 0x9212
+0x6343 = 0x9213
+0x6344 = 0x9216
+0x6345 = 0x9218
+0x6346 = 0x921C
+0x6347 = 0x921D
+0x6348 = 0x9223
+0x6349 = 0x9224
+0x634A = 0x9225
+0x634B = 0x9226
+0x634C = 0x9228
+0x634D = 0x922E
+0x634E = 0x922F
+0x634F = 0x9230
+0x6350 = 0x9233
+0x6351 = 0x9235
+0x6352 = 0x9236
+0x6353 = 0x9238
+0x6354 = 0x9239
+0x6355 = 0x923A
+0x6356 = 0x923C
+0x6357 = 0x923E
+0x6358 = 0x9240
+0x6359 = 0x9242
+0x635A = 0x9243
+0x635B = 0x9246
+0x635C = 0x9247
+0x635D = 0x924A
+0x635E = 0x924D
+0x635F = 0x924E
+0x6360 = 0x924F
+0x6361 = 0x9251
+0x6362 = 0x9258
+0x6363 = 0x9259
+0x6364 = 0x925C
+0x6365 = 0x925D
+0x6366 = 0x9260
+0x6367 = 0x9261
+0x6368 = 0x9265
+0x6369 = 0x9267
+0x636A = 0x9268
+0x636B = 0x9269
+0x636C = 0x926E
+0x636D = 0x926F
+0x636E = 0x9270
+0x636F = 0x9275
+0x6370 = 0x9276
+0x6371 = 0x9277
+0x6372 = 0x9278
+0x6373 = 0x9279
+0x6374 = 0x927B
+0x6375 = 0x927C
+0x6376 = 0x927D
+0x6377 = 0x927F
+0x6378 = 0x9288
+0x6379 = 0x9289
+0x637A = 0x928A
+0x637B = 0x928D
+0x637C = 0x928E
+0x637D = 0x9292
+0x637E = 0x9297
+0x6421 = 0x9299
+0x6422 = 0x929F
+0x6423 = 0x92A0
+0x6424 = 0x92A4
+0x6425 = 0x92A5
+0x6426 = 0x92A7
+0x6427 = 0x92A8
+0x6428 = 0x92AB
+0x6429 = 0x92AF
+0x642A = 0x92B2
+0x642B = 0x92B6
+0x642C = 0x92B8
+0x642D = 0x92BA
+0x642E = 0x92BB
+0x642F = 0x92BC
+0x6430 = 0x92BD
+0x6431 = 0x92BF
+0x6432 = 0x92C0
+0x6433 = 0x92C1
+0x6434 = 0x92C2
+0x6435 = 0x92C3
+0x6436 = 0x92C5
+0x6437 = 0x92C6
+0x6438 = 0x92C7
+0x6439 = 0x92C8
+0x643A = 0x92CB
+0x643B = 0x92CC
+0x643C = 0x92CD
+0x643D = 0x92CE
+0x643E = 0x92D0
+0x643F = 0x92D3
+0x6440 = 0x92D5
+0x6441 = 0x92D7
+0x6442 = 0x92D8
+0x6443 = 0x92D9
+0x6444 = 0x92DC
+0x6445 = 0x92DD
+0x6446 = 0x92DF
+0x6447 = 0x92E0
+0x6448 = 0x92E1
+0x6449 = 0x92E3
+0x644A = 0x92E5
+0x644B = 0x92E7
+0x644C = 0x92E8
+0x644D = 0x92EC
+0x644E = 0x92EE
+0x644F = 0x92F0
+0x6450 = 0x92F9
+0x6451 = 0x92FB
+0x6452 = 0x92FF
+0x6453 = 0x9300
+0x6454 = 0x9302
+0x6455 = 0x9308
+0x6456 = 0x930D
+0x6457 = 0x9311
+0x6458 = 0x9314
+0x6459 = 0x9315
+0x645A = 0x931C
+0x645B = 0x931D
+0x645C = 0x931E
+0x645D = 0x931F
+0x645E = 0x9321
+0x645F = 0x9324
+0x6460 = 0x9325
+0x6461 = 0x9327
+0x6462 = 0x9329
+0x6463 = 0x932A
+0x6464 = 0x9333
+0x6465 = 0x9334
+0x6466 = 0x9336
+0x6467 = 0x9337
+0x6468 = 0x9347
+0x6469 = 0x9348
+0x646A = 0x9349
+0x646B = 0x9350
+0x646C = 0x9351
+0x646D = 0x9352
+0x646E = 0x9355
+0x646F = 0x9357
+0x6470 = 0x9358
+0x6471 = 0x935A
+0x6472 = 0x935E
+0x6473 = 0x9364
+0x6474 = 0x9365
+0x6475 = 0x9367
+0x6476 = 0x9369
+0x6477 = 0x936A
+0x6478 = 0x936D
+0x6479 = 0x936F
+0x647A = 0x9370
+0x647B = 0x9371
+0x647C = 0x9373
+0x647D = 0x9374
+0x647E = 0x9376
+0x6521 = 0x937A
+0x6522 = 0x937D
+0x6523 = 0x937F
+0x6524 = 0x9380
+0x6525 = 0x9381
+0x6526 = 0x9382
+0x6527 = 0x9388
+0x6528 = 0x938A
+0x6529 = 0x938B
+0x652A = 0x938D
+0x652B = 0x938F
+0x652C = 0x9392
+0x652D = 0x9395
+0x652E = 0x9398
+0x652F = 0x939B
+0x6530 = 0x939E
+0x6531 = 0x93A1
+0x6532 = 0x93A3
+0x6533 = 0x93A4
+0x6534 = 0x93A6
+0x6535 = 0x93A8
+0x6536 = 0x93AB
+0x6537 = 0x93B4
+0x6538 = 0x93B5
+0x6539 = 0x93B6
+0x653A = 0x93BA
+0x653B = 0x93A9
+0x653C = 0x93C1
+0x653D = 0x93C4
+0x653E = 0x93C5
+0x653F = 0x93C6
+0x6540 = 0x93C7
+0x6541 = 0x93C9
+0x6542 = 0x93CA
+0x6543 = 0x93CB
+0x6544 = 0x93CC
+0x6545 = 0x93CD
+0x6546 = 0x93D3
+0x6547 = 0x93D9
+0x6548 = 0x93DC
+0x6549 = 0x93DE
+0x654A = 0x93DF
+0x654B = 0x93E2
+0x654C = 0x93E6
+0x654D = 0x93E7
+0x654E = 0x93F9
+0x654F = 0x93F7
+0x6550 = 0x93F8
+0x6551 = 0x93FA
+0x6552 = 0x93FB
+0x6553 = 0x93FD
+0x6554 = 0x9401
+0x6555 = 0x9402
+0x6556 = 0x9404
+0x6557 = 0x9408
+0x6558 = 0x9409
+0x6559 = 0x940D
+0x655A = 0x940E
+0x655B = 0x940F
+0x655C = 0x9415
+0x655D = 0x9416
+0x655E = 0x9417
+0x655F = 0x941F
+0x6560 = 0x942E
+0x6561 = 0x942F
+0x6562 = 0x9431
+0x6563 = 0x9432
+0x6564 = 0x9433
+0x6565 = 0x9434
+0x6566 = 0x943B
+0x6567 = 0x943F
+0x6568 = 0x943D
+0x6569 = 0x9443
+0x656A = 0x9445
+0x656B = 0x9448
+0x656C = 0x944A
+0x656D = 0x944C
+0x656E = 0x9455
+0x656F = 0x9459
+0x6570 = 0x945C
+0x6571 = 0x945F
+0x6572 = 0x9461
+0x6573 = 0x9463
+0x6574 = 0x9468
+0x6575 = 0x946B
+0x6576 = 0x946D
+0x6577 = 0x946E
+0x6578 = 0x946F
+0x6579 = 0x9471
+0x657A = 0x9472
+0x657B = 0x9484
+0x657C = 0x9483
+0x657D = 0x9578
+0x657E = 0x9579
+0x6621 = 0x957E
+0x6622 = 0x9584
+0x6623 = 0x9588
+0x6624 = 0x958C
+0x6625 = 0x958D
+0x6626 = 0x958E
+0x6627 = 0x959D
+0x6628 = 0x959E
+0x6629 = 0x959F
+0x662A = 0x95A1
+0x662B = 0x95A6
+0x662C = 0x95A9
+0x662D = 0x95AB
+0x662E = 0x95AC
+0x662F = 0x95B4
+0x6630 = 0x95B6
+0x6631 = 0x95BA
+0x6632 = 0x95BD
+0x6633 = 0x95BF
+0x6634 = 0x95C6
+0x6635 = 0x95C8
+0x6636 = 0x95C9
+0x6637 = 0x95CB
+0x6638 = 0x95D0
+0x6639 = 0x95D1
+0x663A = 0x95D2
+0x663B = 0x95D3
+0x663C = 0x95D9
+0x663D = 0x95DA
+0x663E = 0x95DD
+0x663F = 0x95DE
+0x6640 = 0x95DF
+0x6641 = 0x95E0
+0x6642 = 0x95E4
+0x6643 = 0x95E6
+0x6644 = 0x961D
+0x6645 = 0x961E
+0x6646 = 0x9622
+0x6647 = 0x9624
+0x6648 = 0x9625
+0x6649 = 0x9626
+0x664A = 0x962C
+0x664B = 0x9631
+0x664C = 0x9633
+0x664D = 0x9637
+0x664E = 0x9638
+0x664F = 0x9639
+0x6650 = 0x963A
+0x6651 = 0x963C
+0x6652 = 0x963D
+0x6653 = 0x9641
+0x6654 = 0x9652
+0x6655 = 0x9654
+0x6656 = 0x9656
+0x6657 = 0x9657
+0x6658 = 0x9658
+0x6659 = 0x9661
+0x665A = 0x966E
+0x665B = 0x9674
+0x665C = 0x967B
+0x665D = 0x967C
+0x665E = 0x967E
+0x665F = 0x967F
+0x6660 = 0x9681
+0x6661 = 0x9682
+0x6662 = 0x9683
+0x6663 = 0x9684
+0x6664 = 0x9689
+0x6665 = 0x9691
+0x6666 = 0x9696
+0x6667 = 0x969A
+0x6668 = 0x969D
+0x6669 = 0x969F
+0x666A = 0x96A4
+0x666B = 0x96A5
+0x666C = 0x96A6
+0x666D = 0x96A9
+0x666E = 0x96AE
+0x666F = 0x96AF
+0x6670 = 0x96B3
+0x6671 = 0x96BA
+0x6672 = 0x96CA
+0x6673 = 0x96D2
+0x6674 = 0x5DB2
+0x6675 = 0x96D8
+0x6676 = 0x96DA
+0x6677 = 0x96DD
+0x6678 = 0x96DE
+0x6679 = 0x96DF
+0x667A = 0x96E9
+0x667B = 0x96EF
+0x667C = 0x96F1
+0x667D = 0x96FA
+0x667E = 0x9702
+0x6721 = 0x9703
+0x6722 = 0x9705
+0x6723 = 0x9709
+0x6724 = 0x971A
+0x6725 = 0x971B
+0x6726 = 0x971D
+0x6727 = 0x9721
+0x6728 = 0x9722
+0x6729 = 0x9723
+0x672A = 0x9728
+0x672B = 0x9731
+0x672C = 0x9733
+0x672D = 0x9741
+0x672E = 0x9743
+0x672F = 0x974A
+0x6730 = 0x974E
+0x6731 = 0x974F
+0x6732 = 0x9755
+0x6733 = 0x9757
+0x6734 = 0x9758
+0x6735 = 0x975A
+0x6736 = 0x975B
+0x6737 = 0x9763
+0x6738 = 0x9767
+0x6739 = 0x976A
+0x673A = 0x976E
+0x673B = 0x9773
+0x673C = 0x9776
+0x673D = 0x9777
+0x673E = 0x9778
+0x673F = 0x977B
+0x6740 = 0x977D
+0x6741 = 0x977F
+0x6742 = 0x9780
+0x6743 = 0x9789
+0x6744 = 0x9795
+0x6745 = 0x9796
+0x6746 = 0x9797
+0x6747 = 0x9799
+0x6748 = 0x979A
+0x6749 = 0x979E
+0x674A = 0x979F
+0x674B = 0x97A2
+0x674C = 0x97AC
+0x674D = 0x97AE
+0x674E = 0x97B1
+0x674F = 0x97B2
+0x6750 = 0x97B5
+0x6751 = 0x97B6
+0x6752 = 0x97B8
+0x6753 = 0x97B9
+0x6754 = 0x97BA
+0x6755 = 0x97BC
+0x6756 = 0x97BE
+0x6757 = 0x97BF
+0x6758 = 0x97C1
+0x6759 = 0x97C4
+0x675A = 0x97C5
+0x675B = 0x97C7
+0x675C = 0x97C9
+0x675D = 0x97CA
+0x675E = 0x97CC
+0x675F = 0x97CD
+0x6760 = 0x97CE
+0x6761 = 0x97D0
+0x6762 = 0x97D1
+0x6763 = 0x97D4
+0x6764 = 0x97D7
+0x6765 = 0x97D8
+0x6766 = 0x97D9
+0x6767 = 0x97DD
+0x6768 = 0x97DE
+0x6769 = 0x97E0
+0x676A = 0x97DB
+0x676B = 0x97E1
+0x676C = 0x97E4
+0x676D = 0x97EF
+0x676E = 0x97F1
+0x676F = 0x97F4
+0x6770 = 0x97F7
+0x6771 = 0x97F8
+0x6772 = 0x97FA
+0x6773 = 0x9807
+0x6774 = 0x980A
+0x6775 = 0x9819
+0x6776 = 0x980D
+0x6777 = 0x980E
+0x6778 = 0x9814
+0x6779 = 0x9816
+0x677A = 0x981C
+0x677B = 0x981E
+0x677C = 0x9820
+0x677D = 0x9823
+0x677E = 0x9826
+0x6821 = 0x982B
+0x6822 = 0x982E
+0x6823 = 0x982F
+0x6824 = 0x9830
+0x6825 = 0x9832
+0x6826 = 0x9833
+0x6827 = 0x9835
+0x6828 = 0x9825
+0x6829 = 0x983E
+0x682A = 0x9844
+0x682B = 0x9847
+0x682C = 0x984A
+0x682D = 0x9851
+0x682E = 0x9852
+0x682F = 0x9853
+0x6830 = 0x9856
+0x6831 = 0x9857
+0x6832 = 0x9859
+0x6833 = 0x985A
+0x6834 = 0x9862
+0x6835 = 0x9863
+0x6836 = 0x9865
+0x6837 = 0x9866
+0x6838 = 0x986A
+0x6839 = 0x986C
+0x683A = 0x98AB
+0x683B = 0x98AD
+0x683C = 0x98AE
+0x683D = 0x98B0
+0x683E = 0x98B4
+0x683F = 0x98B7
+0x6840 = 0x98B8
+0x6841 = 0x98BA
+0x6842 = 0x98BB
+0x6843 = 0x98BF
+0x6844 = 0x98C2
+0x6845 = 0x98C5
+0x6846 = 0x98C8
+0x6847 = 0x98CC
+0x6848 = 0x98E1
+0x6849 = 0x98E3
+0x684A = 0x98E5
+0x684B = 0x98E6
+0x684C = 0x98E7
+0x684D = 0x98EA
+0x684E = 0x98F3
+0x684F = 0x98F6
+0x6850 = 0x9902
+0x6851 = 0x9907
+0x6852 = 0x9908
+0x6853 = 0x9911
+0x6854 = 0x9915
+0x6855 = 0x9916
+0x6856 = 0x9917
+0x6857 = 0x991A
+0x6858 = 0x991B
+0x6859 = 0x991C
+0x685A = 0x991F
+0x685B = 0x9922
+0x685C = 0x9926
+0x685D = 0x9927
+0x685E = 0x992B
+0x685F = 0x9931
+0x6860 = 0x9932
+0x6861 = 0x9933
+0x6862 = 0x9934
+0x6863 = 0x9935
+0x6864 = 0x9939
+0x6865 = 0x993A
+0x6866 = 0x993B
+0x6867 = 0x993C
+0x6868 = 0x9940
+0x6869 = 0x9941
+0x686A = 0x9946
+0x686B = 0x9947
+0x686C = 0x9948
+0x686D = 0x994D
+0x686E = 0x994E
+0x686F = 0x9954
+0x6870 = 0x9958
+0x6871 = 0x9959
+0x6872 = 0x995B
+0x6873 = 0x995C
+0x6874 = 0x995E
+0x6875 = 0x995F
+0x6876 = 0x9960
+0x6877 = 0x999B
+0x6878 = 0x999D
+0x6879 = 0x999F
+0x687A = 0x99A6
+0x687B = 0x99B0
+0x687C = 0x99B1
+0x687D = 0x99B2
+0x687E = 0x99B5
+0x6921 = 0x99B9
+0x6922 = 0x99BA
+0x6923 = 0x99BD
+0x6924 = 0x99BF
+0x6925 = 0x99C3
+0x6926 = 0x99C9
+0x6927 = 0x99D3
+0x6928 = 0x99D4
+0x6929 = 0x99D9
+0x692A = 0x99DA
+0x692B = 0x99DC
+0x692C = 0x99DE
+0x692D = 0x99E7
+0x692E = 0x99EA
+0x692F = 0x99EB
+0x6930 = 0x99EC
+0x6931 = 0x99F0
+0x6932 = 0x99F4
+0x6933 = 0x99F5
+0x6934 = 0x99F9
+0x6935 = 0x99FD
+0x6936 = 0x99FE
+0x6937 = 0x9A02
+0x6938 = 0x9A03
+0x6939 = 0x9A04
+0x693A = 0x9A0B
+0x693B = 0x9A0C
+0x693C = 0x9A10
+0x693D = 0x9A11
+0x693E = 0x9A16
+0x693F = 0x9A1E
+0x6940 = 0x9A20
+0x6941 = 0x9A22
+0x6942 = 0x9A23
+0x6943 = 0x9A24
+0x6944 = 0x9A27
+0x6945 = 0x9A2D
+0x6946 = 0x9A2E
+0x6947 = 0x9A33
+0x6948 = 0x9A35
+0x6949 = 0x9A36
+0x694A = 0x9A38
+0x694B = 0x9A47
+0x694C = 0x9A41
+0x694D = 0x9A44
+0x694E = 0x9A4A
+0x694F = 0x9A4B
+0x6950 = 0x9A4C
+0x6951 = 0x9A4E
+0x6952 = 0x9A51
+0x6953 = 0x9A54
+0x6954 = 0x9A56
+0x6955 = 0x9A5D
+0x6956 = 0x9AAA
+0x6957 = 0x9AAC
+0x6958 = 0x9AAE
+0x6959 = 0x9AAF
+0x695A = 0x9AB2
+0x695B = 0x9AB4
+0x695C = 0x9AB5
+0x695D = 0x9AB6
+0x695E = 0x9AB9
+0x695F = 0x9ABB
+0x6960 = 0x9ABE
+0x6961 = 0x9ABF
+0x6962 = 0x9AC1
+0x6963 = 0x9AC3
+0x6964 = 0x9AC6
+0x6965 = 0x9AC8
+0x6966 = 0x9ACE
+0x6967 = 0x9AD0
+0x6968 = 0x9AD2
+0x6969 = 0x9AD5
+0x696A = 0x9AD6
+0x696B = 0x9AD7
+0x696C = 0x9ADB
+0x696D = 0x9ADC
+0x696E = 0x9AE0
+0x696F = 0x9AE4
+0x6970 = 0x9AE5
+0x6971 = 0x9AE7
+0x6972 = 0x9AE9
+0x6973 = 0x9AEC
+0x6974 = 0x9AF2
+0x6975 = 0x9AF3
+0x6976 = 0x9AF5
+0x6977 = 0x9AF9
+0x6978 = 0x9AFA
+0x6979 = 0x9AFD
+0x697A = 0x9AFF
+0x697B = 0x9B00
+0x697C = 0x9B01
+0x697D = 0x9B02
+0x697E = 0x9B03
+0x6A21 = 0x9B04
+0x6A22 = 0x9B05
+0x6A23 = 0x9B08
+0x6A24 = 0x9B09
+0x6A25 = 0x9B0B
+0x6A26 = 0x9B0C
+0x6A27 = 0x9B0D
+0x6A28 = 0x9B0E
+0x6A29 = 0x9B10
+0x6A2A = 0x9B12
+0x6A2B = 0x9B16
+0x6A2C = 0x9B19
+0x6A2D = 0x9B1B
+0x6A2E = 0x9B1C
+0x6A2F = 0x9B20
+0x6A30 = 0x9B26
+0x6A31 = 0x9B2B
+0x6A32 = 0x9B2D
+0x6A33 = 0x9B33
+0x6A34 = 0x9B34
+0x6A35 = 0x9B35
+0x6A36 = 0x9B37
+0x6A37 = 0x9B39
+0x6A38 = 0x9B3A
+0x6A39 = 0x9B3D
+0x6A3A = 0x9B48
+0x6A3B = 0x9B4B
+0x6A3C = 0x9B4C
+0x6A3D = 0x9B55
+0x6A3E = 0x9B56
+0x6A3F = 0x9B57
+0x6A40 = 0x9B5B
+0x6A41 = 0x9B5E
+0x6A42 = 0x9B61
+0x6A43 = 0x9B63
+0x6A44 = 0x9B65
+0x6A45 = 0x9B66
+0x6A46 = 0x9B68
+0x6A47 = 0x9B6A
+0x6A48 = 0x9B6B
+0x6A49 = 0x9B6C
+0x6A4A = 0x9B6D
+0x6A4B = 0x9B6E
+0x6A4C = 0x9B73
+0x6A4D = 0x9B75
+0x6A4E = 0x9B77
+0x6A4F = 0x9B78
+0x6A50 = 0x9B79
+0x6A51 = 0x9B7F
+0x6A52 = 0x9B80
+0x6A53 = 0x9B84
+0x6A54 = 0x9B85
+0x6A55 = 0x9B86
+0x6A56 = 0x9B87
+0x6A57 = 0x9B89
+0x6A58 = 0x9B8A
+0x6A59 = 0x9B8B
+0x6A5A = 0x9B8D
+0x6A5B = 0x9B8F
+0x6A5C = 0x9B90
+0x6A5D = 0x9B94
+0x6A5E = 0x9B9A
+0x6A5F = 0x9B9D
+0x6A60 = 0x9B9E
+0x6A61 = 0x9BA6
+0x6A62 = 0x9BA7
+0x6A63 = 0x9BA9
+0x6A64 = 0x9BAC
+0x6A65 = 0x9BB0
+0x6A66 = 0x9BB1
+0x6A67 = 0x9BB2
+0x6A68 = 0x9BB7
+0x6A69 = 0x9BB8
+0x6A6A = 0x9BBB
+0x6A6B = 0x9BBC
+0x6A6C = 0x9BBE
+0x6A6D = 0x9BBF
+0x6A6E = 0x9BC1
+0x6A6F = 0x9BC7
+0x6A70 = 0x9BC8
+0x6A71 = 0x9BCE
+0x6A72 = 0x9BD0
+0x6A73 = 0x9BD7
+0x6A74 = 0x9BD8
+0x6A75 = 0x9BDD
+0x6A76 = 0x9BDF
+0x6A77 = 0x9BE5
+0x6A78 = 0x9BE7
+0x6A79 = 0x9BEA
+0x6A7A = 0x9BEB
+0x6A7B = 0x9BEF
+0x6A7C = 0x9BF3
+0x6A7D = 0x9BF7
+0x6A7E = 0x9BF8
+0x6B21 = 0x9BF9
+0x6B22 = 0x9BFA
+0x6B23 = 0x9BFD
+0x6B24 = 0x9BFF
+0x6B25 = 0x9C00
+0x6B26 = 0x9C02
+0x6B27 = 0x9C0B
+0x6B28 = 0x9C0F
+0x6B29 = 0x9C11
+0x6B2A = 0x9C16
+0x6B2B = 0x9C18
+0x6B2C = 0x9C19
+0x6B2D = 0x9C1A
+0x6B2E = 0x9C1C
+0x6B2F = 0x9C1E
+0x6B30 = 0x9C22
+0x6B31 = 0x9C23
+0x6B32 = 0x9C26
+0x6B33 = 0x9C27
+0x6B34 = 0x9C28
+0x6B35 = 0x9C29
+0x6B36 = 0x9C2A
+0x6B37 = 0x9C31
+0x6B38 = 0x9C35
+0x6B39 = 0x9C36
+0x6B3A = 0x9C37
+0x6B3B = 0x9C3D
+0x6B3C = 0x9C41
+0x6B3D = 0x9C43
+0x6B3E = 0x9C44
+0x6B3F = 0x9C45
+0x6B40 = 0x9C49
+0x6B41 = 0x9C4A
+0x6B42 = 0x9C4E
+0x6B43 = 0x9C4F
+0x6B44 = 0x9C50
+0x6B45 = 0x9C53
+0x6B46 = 0x9C54
+0x6B47 = 0x9C56
+0x6B48 = 0x9C58
+0x6B49 = 0x9C5B
+0x6B4A = 0x9C5D
+0x6B4B = 0x9C5E
+0x6B4C = 0x9C5F
+0x6B4D = 0x9C63
+0x6B4E = 0x9C69
+0x6B4F = 0x9C6A
+0x6B50 = 0x9C5C
+0x6B51 = 0x9C6B
+0x6B52 = 0x9C68
+0x6B53 = 0x9C6E
+0x6B54 = 0x9C70
+0x6B55 = 0x9C72
+0x6B56 = 0x9C75
+0x6B57 = 0x9C77
+0x6B58 = 0x9C7B
+0x6B59 = 0x9CE6
+0x6B5A = 0x9CF2
+0x6B5B = 0x9CF7
+0x6B5C = 0x9CF9
+0x6B5D = 0x9D0B
+0x6B5E = 0x9D02
+0x6B5F = 0x9D11
+0x6B60 = 0x9D17
+0x6B61 = 0x9D18
+0x6B62 = 0x9D1C
+0x6B63 = 0x9D1D
+0x6B64 = 0x9D1E
+0x6B65 = 0x9D2F
+0x6B66 = 0x9D30
+0x6B67 = 0x9D32
+0x6B68 = 0x9D33
+0x6B69 = 0x9D34
+0x6B6A = 0x9D3A
+0x6B6B = 0x9D3C
+0x6B6C = 0x9D45
+0x6B6D = 0x9D3D
+0x6B6E = 0x9D42
+0x6B6F = 0x9D43
+0x6B70 = 0x9D47
+0x6B71 = 0x9D4A
+0x6B72 = 0x9D53
+0x6B73 = 0x9D54
+0x6B74 = 0x9D5F
+0x6B75 = 0x9D63
+0x6B76 = 0x9D62
+0x6B77 = 0x9D65
+0x6B78 = 0x9D69
+0x6B79 = 0x9D6A
+0x6B7A = 0x9D6B
+0x6B7B = 0x9D70
+0x6B7C = 0x9D76
+0x6B7D = 0x9D77
+0x6B7E = 0x9D7B
+0x6C21 = 0x9D7C
+0x6C22 = 0x9D7E
+0x6C23 = 0x9D83
+0x6C24 = 0x9D84
+0x6C25 = 0x9D86
+0x6C26 = 0x9D8A
+0x6C27 = 0x9D8D
+0x6C28 = 0x9D8E
+0x6C29 = 0x9D92
+0x6C2A = 0x9D93
+0x6C2B = 0x9D95
+0x6C2C = 0x9D96
+0x6C2D = 0x9D97
+0x6C2E = 0x9D98
+0x6C2F = 0x9DA1
+0x6C30 = 0x9DAA
+0x6C31 = 0x9DAC
+0x6C32 = 0x9DAE
+0x6C33 = 0x9DB1
+0x6C34 = 0x9DB5
+0x6C35 = 0x9DB9
+0x6C36 = 0x9DBC
+0x6C37 = 0x9DBF
+0x6C38 = 0x9DC3
+0x6C39 = 0x9DC7
+0x6C3A = 0x9DC9
+0x6C3B = 0x9DCA
+0x6C3C = 0x9DD4
+0x6C3D = 0x9DD5
+0x6C3E = 0x9DD6
+0x6C3F = 0x9DD7
+0x6C40 = 0x9DDA
+0x6C41 = 0x9DDE
+0x6C42 = 0x9DDF
+0x6C43 = 0x9DE0
+0x6C44 = 0x9DE5
+0x6C45 = 0x9DE7
+0x6C46 = 0x9DE9
+0x6C47 = 0x9DEB
+0x6C48 = 0x9DEE
+0x6C49 = 0x9DF0
+0x6C4A = 0x9DF3
+0x6C4B = 0x9DF4
+0x6C4C = 0x9DFE
+0x6C4D = 0x9E0A
+0x6C4E = 0x9E02
+0x6C4F = 0x9E07
+0x6C50 = 0x9E0E
+0x6C51 = 0x9E10
+0x6C52 = 0x9E11
+0x6C53 = 0x9E12
+0x6C54 = 0x9E15
+0x6C55 = 0x9E16
+0x6C56 = 0x9E19
+0x6C57 = 0x9E1C
+0x6C58 = 0x9E1D
+0x6C59 = 0x9E7A
+0x6C5A = 0x9E7B
+0x6C5B = 0x9E7C
+0x6C5C = 0x9E80
+0x6C5D = 0x9E82
+0x6C5E = 0x9E83
+0x6C5F = 0x9E84
+0x6C60 = 0x9E85
+0x6C61 = 0x9E87
+0x6C62 = 0x9E8E
+0x6C63 = 0x9E8F
+0x6C64 = 0x9E96
+0x6C65 = 0x9E98
+0x6C66 = 0x9E9B
+0x6C67 = 0x9E9E
+0x6C68 = 0x9EA4
+0x6C69 = 0x9EA8
+0x6C6A = 0x9EAC
+0x6C6B = 0x9EAE
+0x6C6C = 0x9EAF
+0x6C6D = 0x9EB0
+0x6C6E = 0x9EB3
+0x6C6F = 0x9EB4
+0x6C70 = 0x9EB5
+0x6C71 = 0x9EC6
+0x6C72 = 0x9EC8
+0x6C73 = 0x9ECB
+0x6C74 = 0x9ED5
+0x6C75 = 0x9EDF
+0x6C76 = 0x9EE4
+0x6C77 = 0x9EE7
+0x6C78 = 0x9EEC
+0x6C79 = 0x9EED
+0x6C7A = 0x9EEE
+0x6C7B = 0x9EF0
+0x6C7C = 0x9EF1
+0x6C7D = 0x9EF2
+0x6C7E = 0x9EF5
+0x6D21 = 0x9EF8
+0x6D22 = 0x9EFF
+0x6D23 = 0x9F02
+0x6D24 = 0x9F03
+0x6D25 = 0x9F09
+0x6D26 = 0x9F0F
+0x6D27 = 0x9F10
+0x6D28 = 0x9F11
+0x6D29 = 0x9F12
+0x6D2A = 0x9F14
+0x6D2B = 0x9F16
+0x6D2C = 0x9F17
+0x6D2D = 0x9F19
+0x6D2E = 0x9F1A
+0x6D2F = 0x9F1B
+0x6D30 = 0x9F1F
+0x6D31 = 0x9F22
+0x6D32 = 0x9F26
+0x6D33 = 0x9F2A
+0x6D34 = 0x9F2B
+0x6D35 = 0x9F2F
+0x6D36 = 0x9F31
+0x6D37 = 0x9F32
+0x6D38 = 0x9F34
+0x6D39 = 0x9F37
+0x6D3A = 0x9F39
+0x6D3B = 0x9F3A
+0x6D3C = 0x9F3C
+0x6D3D = 0x9F3D
+0x6D3E = 0x9F3F
+0x6D3F = 0x9F41
+0x6D40 = 0x9F43
+0x6D41 = 0x9F44
+0x6D42 = 0x9F45
+0x6D43 = 0x9F46
+0x6D44 = 0x9F47
+0x6D45 = 0x9F53
+0x6D46 = 0x9F55
+0x6D47 = 0x9F56
+0x6D48 = 0x9F57
+0x6D49 = 0x9F58
+0x6D4A = 0x9F5A
+0x6D4B = 0x9F5D
+0x6D4C = 0x9F5E
+0x6D4D = 0x9F68
+0x6D4E = 0x9F69
+0x6D4F = 0x9F6D
+0x6D50 = 0x9F6E
+0x6D51 = 0x9F6F
+0x6D52 = 0x9F70
+0x6D53 = 0x9F71
+0x6D54 = 0x9F73
+0x6D55 = 0x9F75
+0x6D56 = 0x9F7A
+0x6D57 = 0x9F7D
+0x6D58 = 0x9F8F
+0x6D59 = 0x9F90
+0x6D5A = 0x9F91
+0x6D5B = 0x9F92
+0x6D5C = 0x9F94
+0x6D5D = 0x9F96
+0x6D5E = 0x9F97
+0x6D5F = 0x9F9E
+0x6D60 = 0x9FA1
+0x6D61 = 0x9FA2
+0x6D62 = 0x9FA3
+0x6D63 = 0x9FA5
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212UDC%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212UDC%UCS.src
new file mode 100644
index 0000000..d9e8cd7
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212UDC%UCS.src
@@ -0,0 +1,954 @@
+# $NetBSD: JISX0212UDC%UCS.src,v 1.1 2003/07/19 20:20:41 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0212UDC/UCS"
+SRC_ZONE	0x75 - 0xFE / 0x21 - 0x7E / 8
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x7521 = 0xE3AC
+0x7522 = 0xE3AD
+0x7523 = 0xE3AE
+0x7524 = 0xE3AF
+0x7525 = 0xE3B0
+0x7526 = 0xE3B1
+0x7527 = 0xE3B2
+0x7528 = 0xE3B3
+0x7529 = 0xE3B4
+0x752A = 0xE3B5
+0x752B = 0xE3B6
+0x752C = 0xE3B7
+0x752D = 0xE3B8
+0x752E = 0xE3B9
+0x752F = 0xE3BA
+0x7530 = 0xE3BB
+0x7531 = 0xE3BC
+0x7532 = 0xE3BD
+0x7533 = 0xE3BE
+0x7534 = 0xE3BF
+0x7535 = 0xE3C0
+0x7536 = 0xE3C1
+0x7537 = 0xE3C2
+0x7538 = 0xE3C3
+0x7539 = 0xE3C4
+0x753A = 0xE3C5
+0x753B = 0xE3C6
+0x753C = 0xE3C7
+0x753D = 0xE3C8
+0x753E = 0xE3C9
+0x753F = 0xE3CA
+0x7540 = 0xE3CB
+0x7541 = 0xE3CC
+0x7542 = 0xE3CD
+0x7543 = 0xE3CE
+0x7544 = 0xE3CF
+0x7545 = 0xE3D0
+0x7546 = 0xE3D1
+0x7547 = 0xE3D2
+0x7548 = 0xE3D3
+0x7549 = 0xE3D4
+0x754A = 0xE3D5
+0x754B = 0xE3D6
+0x754C = 0xE3D7
+0x754D = 0xE3D8
+0x754E = 0xE3D9
+0x754F = 0xE3DA
+0x7550 = 0xE3DB
+0x7551 = 0xE3DC
+0x7552 = 0xE3DD
+0x7553 = 0xE3DE
+0x7554 = 0xE3DF
+0x7555 = 0xE3E0
+0x7556 = 0xE3E1
+0x7557 = 0xE3E2
+0x7558 = 0xE3E3
+0x7559 = 0xE3E4
+0x755A = 0xE3E5
+0x755B = 0xE3E6
+0x755C = 0xE3E7
+0x755D = 0xE3E8
+0x755E = 0xE3E9
+0x755F = 0xE3EA
+0x7560 = 0xE3EB
+0x7561 = 0xE3EC
+0x7562 = 0xE3ED
+0x7563 = 0xE3EE
+0x7564 = 0xE3EF
+0x7565 = 0xE3F0
+0x7566 = 0xE3F1
+0x7567 = 0xE3F2
+0x7568 = 0xE3F3
+0x7569 = 0xE3F4
+0x756A = 0xE3F5
+0x756B = 0xE3F6
+0x756C = 0xE3F7
+0x756D = 0xE3F8
+0x756E = 0xE3F9
+0x756F = 0xE3FA
+0x7570 = 0xE3FB
+0x7571 = 0xE3FC
+0x7572 = 0xE3FD
+0x7573 = 0xE3FE
+0x7574 = 0xE3FF
+0x7575 = 0xE400
+0x7576 = 0xE401
+0x7577 = 0xE402
+0x7578 = 0xE403
+0x7579 = 0xE404
+0x757A = 0xE405
+0x757B = 0xE406
+0x757C = 0xE407
+0x757D = 0xE408
+0x757E = 0xE409
+0x7621 = 0xE40A
+0x7622 = 0xE40B
+0x7623 = 0xE40C
+0x7624 = 0xE40D
+0x7625 = 0xE40E
+0x7626 = 0xE40F
+0x7627 = 0xE410
+0x7628 = 0xE411
+0x7629 = 0xE412
+0x762A = 0xE413
+0x762B = 0xE414
+0x762C = 0xE415
+0x762D = 0xE416
+0x762E = 0xE417
+0x762F = 0xE418
+0x7630 = 0xE419
+0x7631 = 0xE41A
+0x7632 = 0xE41B
+0x7633 = 0xE41C
+0x7634 = 0xE41D
+0x7635 = 0xE41E
+0x7636 = 0xE41F
+0x7637 = 0xE420
+0x7638 = 0xE421
+0x7639 = 0xE422
+0x763A = 0xE423
+0x763B = 0xE424
+0x763C = 0xE425
+0x763D = 0xE426
+0x763E = 0xE427
+0x763F = 0xE428
+0x7640 = 0xE429
+0x7641 = 0xE42A
+0x7642 = 0xE42B
+0x7643 = 0xE42C
+0x7644 = 0xE42D
+0x7645 = 0xE42E
+0x7646 = 0xE42F
+0x7647 = 0xE430
+0x7648 = 0xE431
+0x7649 = 0xE432
+0x764A = 0xE433
+0x764B = 0xE434
+0x764C = 0xE435
+0x764D = 0xE436
+0x764E = 0xE437
+0x764F = 0xE438
+0x7650 = 0xE439
+0x7651 = 0xE43A
+0x7652 = 0xE43B
+0x7653 = 0xE43C
+0x7654 = 0xE43D
+0x7655 = 0xE43E
+0x7656 = 0xE43F
+0x7657 = 0xE440
+0x7658 = 0xE441
+0x7659 = 0xE442
+0x765A = 0xE443
+0x765B = 0xE444
+0x765C = 0xE445
+0x765D = 0xE446
+0x765E = 0xE447
+0x765F = 0xE448
+0x7660 = 0xE449
+0x7661 = 0xE44A
+0x7662 = 0xE44B
+0x7663 = 0xE44C
+0x7664 = 0xE44D
+0x7665 = 0xE44E
+0x7666 = 0xE44F
+0x7667 = 0xE450
+0x7668 = 0xE451
+0x7669 = 0xE452
+0x766A = 0xE453
+0x766B = 0xE454
+0x766C = 0xE455
+0x766D = 0xE456
+0x766E = 0xE457
+0x766F = 0xE458
+0x7670 = 0xE459
+0x7671 = 0xE45A
+0x7672 = 0xE45B
+0x7673 = 0xE45C
+0x7674 = 0xE45D
+0x7675 = 0xE45E
+0x7676 = 0xE45F
+0x7677 = 0xE460
+0x7678 = 0xE461
+0x7679 = 0xE462
+0x767A = 0xE463
+0x767B = 0xE464
+0x767C = 0xE465
+0x767D = 0xE466
+0x767E = 0xE467
+0x7721 = 0xE468
+0x7722 = 0xE469
+0x7723 = 0xE46A
+0x7724 = 0xE46B
+0x7725 = 0xE46C
+0x7726 = 0xE46D
+0x7727 = 0xE46E
+0x7728 = 0xE46F
+0x7729 = 0xE470
+0x772A = 0xE471
+0x772B = 0xE472
+0x772C = 0xE473
+0x772D = 0xE474
+0x772E = 0xE475
+0x772F = 0xE476
+0x7730 = 0xE477
+0x7731 = 0xE478
+0x7732 = 0xE479
+0x7733 = 0xE47A
+0x7734 = 0xE47B
+0x7735 = 0xE47C
+0x7736 = 0xE47D
+0x7737 = 0xE47E
+0x7738 = 0xE47F
+0x7739 = 0xE480
+0x773A = 0xE481
+0x773B = 0xE482
+0x773C = 0xE483
+0x773D = 0xE484
+0x773E = 0xE485
+0x773F = 0xE486
+0x7740 = 0xE487
+0x7741 = 0xE488
+0x7742 = 0xE489
+0x7743 = 0xE48A
+0x7744 = 0xE48B
+0x7745 = 0xE48C
+0x7746 = 0xE48D
+0x7747 = 0xE48E
+0x7748 = 0xE48F
+0x7749 = 0xE490
+0x774A = 0xE491
+0x774B = 0xE492
+0x774C = 0xE493
+0x774D = 0xE494
+0x774E = 0xE495
+0x774F = 0xE496
+0x7750 = 0xE497
+0x7751 = 0xE498
+0x7752 = 0xE499
+0x7753 = 0xE49A
+0x7754 = 0xE49B
+0x7755 = 0xE49C
+0x7756 = 0xE49D
+0x7757 = 0xE49E
+0x7758 = 0xE49F
+0x7759 = 0xE4A0
+0x775A = 0xE4A1
+0x775B = 0xE4A2
+0x775C = 0xE4A3
+0x775D = 0xE4A4
+0x775E = 0xE4A5
+0x775F = 0xE4A6
+0x7760 = 0xE4A7
+0x7761 = 0xE4A8
+0x7762 = 0xE4A9
+0x7763 = 0xE4AA
+0x7764 = 0xE4AB
+0x7765 = 0xE4AC
+0x7766 = 0xE4AD
+0x7767 = 0xE4AE
+0x7768 = 0xE4AF
+0x7769 = 0xE4B0
+0x776A = 0xE4B1
+0x776B = 0xE4B2
+0x776C = 0xE4B3
+0x776D = 0xE4B4
+0x776E = 0xE4B5
+0x776F = 0xE4B6
+0x7770 = 0xE4B7
+0x7771 = 0xE4B8
+0x7772 = 0xE4B9
+0x7773 = 0xE4BA
+0x7774 = 0xE4BB
+0x7775 = 0xE4BC
+0x7776 = 0xE4BD
+0x7777 = 0xE4BE
+0x7778 = 0xE4BF
+0x7779 = 0xE4C0
+0x777A = 0xE4C1
+0x777B = 0xE4C2
+0x777C = 0xE4C3
+0x777D = 0xE4C4
+0x777E = 0xE4C5
+0x7821 = 0xE4C6
+0x7822 = 0xE4C7
+0x7823 = 0xE4C8
+0x7824 = 0xE4C9
+0x7825 = 0xE4CA
+0x7826 = 0xE4CB
+0x7827 = 0xE4CC
+0x7828 = 0xE4CD
+0x7829 = 0xE4CE
+0x782A = 0xE4CF
+0x782B = 0xE4D0
+0x782C = 0xE4D1
+0x782D = 0xE4D2
+0x782E = 0xE4D3
+0x782F = 0xE4D4
+0x7830 = 0xE4D5
+0x7831 = 0xE4D6
+0x7832 = 0xE4D7
+0x7833 = 0xE4D8
+0x7834 = 0xE4D9
+0x7835 = 0xE4DA
+0x7836 = 0xE4DB
+0x7837 = 0xE4DC
+0x7838 = 0xE4DD
+0x7839 = 0xE4DE
+0x783A = 0xE4DF
+0x783B = 0xE4E0
+0x783C = 0xE4E1
+0x783D = 0xE4E2
+0x783E = 0xE4E3
+0x783F = 0xE4E4
+0x7840 = 0xE4E5
+0x7841 = 0xE4E6
+0x7842 = 0xE4E7
+0x7843 = 0xE4E8
+0x7844 = 0xE4E9
+0x7845 = 0xE4EA
+0x7846 = 0xE4EB
+0x7847 = 0xE4EC
+0x7848 = 0xE4ED
+0x7849 = 0xE4EE
+0x784A = 0xE4EF
+0x784B = 0xE4F0
+0x784C = 0xE4F1
+0x784D = 0xE4F2
+0x784E = 0xE4F3
+0x784F = 0xE4F4
+0x7850 = 0xE4F5
+0x7851 = 0xE4F6
+0x7852 = 0xE4F7
+0x7853 = 0xE4F8
+0x7854 = 0xE4F9
+0x7855 = 0xE4FA
+0x7856 = 0xE4FB
+0x7857 = 0xE4FC
+0x7858 = 0xE4FD
+0x7859 = 0xE4FE
+0x785A = 0xE4FF
+0x785B = 0xE500
+0x785C = 0xE501
+0x785D = 0xE502
+0x785E = 0xE503
+0x785F = 0xE504
+0x7860 = 0xE505
+0x7861 = 0xE506
+0x7862 = 0xE507
+0x7863 = 0xE508
+0x7864 = 0xE509
+0x7865 = 0xE50A
+0x7866 = 0xE50B
+0x7867 = 0xE50C
+0x7868 = 0xE50D
+0x7869 = 0xE50E
+0x786A = 0xE50F
+0x786B = 0xE510
+0x786C = 0xE511
+0x786D = 0xE512
+0x786E = 0xE513
+0x786F = 0xE514
+0x7870 = 0xE515
+0x7871 = 0xE516
+0x7872 = 0xE517
+0x7873 = 0xE518
+0x7874 = 0xE519
+0x7875 = 0xE51A
+0x7876 = 0xE51B
+0x7877 = 0xE51C
+0x7878 = 0xE51D
+0x7879 = 0xE51E
+0x787A = 0xE51F
+0x787B = 0xE520
+0x787C = 0xE521
+0x787D = 0xE522
+0x787E = 0xE523
+0x7921 = 0xE524
+0x7922 = 0xE525
+0x7923 = 0xE526
+0x7924 = 0xE527
+0x7925 = 0xE528
+0x7926 = 0xE529
+0x7927 = 0xE52A
+0x7928 = 0xE52B
+0x7929 = 0xE52C
+0x792A = 0xE52D
+0x792B = 0xE52E
+0x792C = 0xE52F
+0x792D = 0xE530
+0x792E = 0xE531
+0x792F = 0xE532
+0x7930 = 0xE533
+0x7931 = 0xE534
+0x7932 = 0xE535
+0x7933 = 0xE536
+0x7934 = 0xE537
+0x7935 = 0xE538
+0x7936 = 0xE539
+0x7937 = 0xE53A
+0x7938 = 0xE53B
+0x7939 = 0xE53C
+0x793A = 0xE53D
+0x793B = 0xE53E
+0x793C = 0xE53F
+0x793D = 0xE540
+0x793E = 0xE541
+0x793F = 0xE542
+0x7940 = 0xE543
+0x7941 = 0xE544
+0x7942 = 0xE545
+0x7943 = 0xE546
+0x7944 = 0xE547
+0x7945 = 0xE548
+0x7946 = 0xE549
+0x7947 = 0xE54A
+0x7948 = 0xE54B
+0x7949 = 0xE54C
+0x794A = 0xE54D
+0x794B = 0xE54E
+0x794C = 0xE54F
+0x794D = 0xE550
+0x794E = 0xE551
+0x794F = 0xE552
+0x7950 = 0xE553
+0x7951 = 0xE554
+0x7952 = 0xE555
+0x7953 = 0xE556
+0x7954 = 0xE557
+0x7955 = 0xE558
+0x7956 = 0xE559
+0x7957 = 0xE55A
+0x7958 = 0xE55B
+0x7959 = 0xE55C
+0x795A = 0xE55D
+0x795B = 0xE55E
+0x795C = 0xE55F
+0x795D = 0xE560
+0x795E = 0xE561
+0x795F = 0xE562
+0x7960 = 0xE563
+0x7961 = 0xE564
+0x7962 = 0xE565
+0x7963 = 0xE566
+0x7964 = 0xE567
+0x7965 = 0xE568
+0x7966 = 0xE569
+0x7967 = 0xE56A
+0x7968 = 0xE56B
+0x7969 = 0xE56C
+0x796A = 0xE56D
+0x796B = 0xE56E
+0x796C = 0xE56F
+0x796D = 0xE570
+0x796E = 0xE571
+0x796F = 0xE572
+0x7970 = 0xE573
+0x7971 = 0xE574
+0x7972 = 0xE575
+0x7973 = 0xE576
+0x7974 = 0xE577
+0x7975 = 0xE578
+0x7976 = 0xE579
+0x7977 = 0xE57A
+0x7978 = 0xE57B
+0x7979 = 0xE57C
+0x797A = 0xE57D
+0x797B = 0xE57E
+0x797C = 0xE57F
+0x797D = 0xE580
+0x797E = 0xE581
+0x7A21 = 0xE582
+0x7A22 = 0xE583
+0x7A23 = 0xE584
+0x7A24 = 0xE585
+0x7A25 = 0xE586
+0x7A26 = 0xE587
+0x7A27 = 0xE588
+0x7A28 = 0xE589
+0x7A29 = 0xE58A
+0x7A2A = 0xE58B
+0x7A2B = 0xE58C
+0x7A2C = 0xE58D
+0x7A2D = 0xE58E
+0x7A2E = 0xE58F
+0x7A2F = 0xE590
+0x7A30 = 0xE591
+0x7A31 = 0xE592
+0x7A32 = 0xE593
+0x7A33 = 0xE594
+0x7A34 = 0xE595
+0x7A35 = 0xE596
+0x7A36 = 0xE597
+0x7A37 = 0xE598
+0x7A38 = 0xE599
+0x7A39 = 0xE59A
+0x7A3A = 0xE59B
+0x7A3B = 0xE59C
+0x7A3C = 0xE59D
+0x7A3D = 0xE59E
+0x7A3E = 0xE59F
+0x7A3F = 0xE5A0
+0x7A40 = 0xE5A1
+0x7A41 = 0xE5A2
+0x7A42 = 0xE5A3
+0x7A43 = 0xE5A4
+0x7A44 = 0xE5A5
+0x7A45 = 0xE5A6
+0x7A46 = 0xE5A7
+0x7A47 = 0xE5A8
+0x7A48 = 0xE5A9
+0x7A49 = 0xE5AA
+0x7A4A = 0xE5AB
+0x7A4B = 0xE5AC
+0x7A4C = 0xE5AD
+0x7A4D = 0xE5AE
+0x7A4E = 0xE5AF
+0x7A4F = 0xE5B0
+0x7A50 = 0xE5B1
+0x7A51 = 0xE5B2
+0x7A52 = 0xE5B3
+0x7A53 = 0xE5B4
+0x7A54 = 0xE5B5
+0x7A55 = 0xE5B6
+0x7A56 = 0xE5B7
+0x7A57 = 0xE5B8
+0x7A58 = 0xE5B9
+0x7A59 = 0xE5BA
+0x7A5A = 0xE5BB
+0x7A5B = 0xE5BC
+0x7A5C = 0xE5BD
+0x7A5D = 0xE5BE
+0x7A5E = 0xE5BF
+0x7A5F = 0xE5C0
+0x7A60 = 0xE5C1
+0x7A61 = 0xE5C2
+0x7A62 = 0xE5C3
+0x7A63 = 0xE5C4
+0x7A64 = 0xE5C5
+0x7A65 = 0xE5C6
+0x7A66 = 0xE5C7
+0x7A67 = 0xE5C8
+0x7A68 = 0xE5C9
+0x7A69 = 0xE5CA
+0x7A6A = 0xE5CB
+0x7A6B = 0xE5CC
+0x7A6C = 0xE5CD
+0x7A6D = 0xE5CE
+0x7A6E = 0xE5CF
+0x7A6F = 0xE5D0
+0x7A70 = 0xE5D1
+0x7A71 = 0xE5D2
+0x7A72 = 0xE5D3
+0x7A73 = 0xE5D4
+0x7A74 = 0xE5D5
+0x7A75 = 0xE5D6
+0x7A76 = 0xE5D7
+0x7A77 = 0xE5D8
+0x7A78 = 0xE5D9
+0x7A79 = 0xE5DA
+0x7A7A = 0xE5DB
+0x7A7B = 0xE5DC
+0x7A7C = 0xE5DD
+0x7A7D = 0xE5DE
+0x7A7E = 0xE5DF
+0x7B21 = 0xE5E0
+0x7B22 = 0xE5E1
+0x7B23 = 0xE5E2
+0x7B24 = 0xE5E3
+0x7B25 = 0xE5E4
+0x7B26 = 0xE5E5
+0x7B27 = 0xE5E6
+0x7B28 = 0xE5E7
+0x7B29 = 0xE5E8
+0x7B2A = 0xE5E9
+0x7B2B = 0xE5EA
+0x7B2C = 0xE5EB
+0x7B2D = 0xE5EC
+0x7B2E = 0xE5ED
+0x7B2F = 0xE5EE
+0x7B30 = 0xE5EF
+0x7B31 = 0xE5F0
+0x7B32 = 0xE5F1
+0x7B33 = 0xE5F2
+0x7B34 = 0xE5F3
+0x7B35 = 0xE5F4
+0x7B36 = 0xE5F5
+0x7B37 = 0xE5F6
+0x7B38 = 0xE5F7
+0x7B39 = 0xE5F8
+0x7B3A = 0xE5F9
+0x7B3B = 0xE5FA
+0x7B3C = 0xE5FB
+0x7B3D = 0xE5FC
+0x7B3E = 0xE5FD
+0x7B3F = 0xE5FE
+0x7B40 = 0xE5FF
+0x7B41 = 0xE600
+0x7B42 = 0xE601
+0x7B43 = 0xE602
+0x7B44 = 0xE603
+0x7B45 = 0xE604
+0x7B46 = 0xE605
+0x7B47 = 0xE606
+0x7B48 = 0xE607
+0x7B49 = 0xE608
+0x7B4A = 0xE609
+0x7B4B = 0xE60A
+0x7B4C = 0xE60B
+0x7B4D = 0xE60C
+0x7B4E = 0xE60D
+0x7B4F = 0xE60E
+0x7B50 = 0xE60F
+0x7B51 = 0xE610
+0x7B52 = 0xE611
+0x7B53 = 0xE612
+0x7B54 = 0xE613
+0x7B55 = 0xE614
+0x7B56 = 0xE615
+0x7B57 = 0xE616
+0x7B58 = 0xE617
+0x7B59 = 0xE618
+0x7B5A = 0xE619
+0x7B5B = 0xE61A
+0x7B5C = 0xE61B
+0x7B5D = 0xE61C
+0x7B5E = 0xE61D
+0x7B5F = 0xE61E
+0x7B60 = 0xE61F
+0x7B61 = 0xE620
+0x7B62 = 0xE621
+0x7B63 = 0xE622
+0x7B64 = 0xE623
+0x7B65 = 0xE624
+0x7B66 = 0xE625
+0x7B67 = 0xE626
+0x7B68 = 0xE627
+0x7B69 = 0xE628
+0x7B6A = 0xE629
+0x7B6B = 0xE62A
+0x7B6C = 0xE62B
+0x7B6D = 0xE62C
+0x7B6E = 0xE62D
+0x7B6F = 0xE62E
+0x7B70 = 0xE62F
+0x7B71 = 0xE630
+0x7B72 = 0xE631
+0x7B73 = 0xE632
+0x7B74 = 0xE633
+0x7B75 = 0xE634
+0x7B76 = 0xE635
+0x7B77 = 0xE636
+0x7B78 = 0xE637
+0x7B79 = 0xE638
+0x7B7A = 0xE639
+0x7B7B = 0xE63A
+0x7B7C = 0xE63B
+0x7B7D = 0xE63C
+0x7B7E = 0xE63D
+0x7C21 = 0xE63E
+0x7C22 = 0xE63F
+0x7C23 = 0xE640
+0x7C24 = 0xE641
+0x7C25 = 0xE642
+0x7C26 = 0xE643
+0x7C27 = 0xE644
+0x7C28 = 0xE645
+0x7C29 = 0xE646
+0x7C2A = 0xE647
+0x7C2B = 0xE648
+0x7C2C = 0xE649
+0x7C2D = 0xE64A
+0x7C2E = 0xE64B
+0x7C2F = 0xE64C
+0x7C30 = 0xE64D
+0x7C31 = 0xE64E
+0x7C32 = 0xE64F
+0x7C33 = 0xE650
+0x7C34 = 0xE651
+0x7C35 = 0xE652
+0x7C36 = 0xE653
+0x7C37 = 0xE654
+0x7C38 = 0xE655
+0x7C39 = 0xE656
+0x7C3A = 0xE657
+0x7C3B = 0xE658
+0x7C3C = 0xE659
+0x7C3D = 0xE65A
+0x7C3E = 0xE65B
+0x7C3F = 0xE65C
+0x7C40 = 0xE65D
+0x7C41 = 0xE65E
+0x7C42 = 0xE65F
+0x7C43 = 0xE660
+0x7C44 = 0xE661
+0x7C45 = 0xE662
+0x7C46 = 0xE663
+0x7C47 = 0xE664
+0x7C48 = 0xE665
+0x7C49 = 0xE666
+0x7C4A = 0xE667
+0x7C4B = 0xE668
+0x7C4C = 0xE669
+0x7C4D = 0xE66A
+0x7C4E = 0xE66B
+0x7C4F = 0xE66C
+0x7C50 = 0xE66D
+0x7C51 = 0xE66E
+0x7C52 = 0xE66F
+0x7C53 = 0xE670
+0x7C54 = 0xE671
+0x7C55 = 0xE672
+0x7C56 = 0xE673
+0x7C57 = 0xE674
+0x7C58 = 0xE675
+0x7C59 = 0xE676
+0x7C5A = 0xE677
+0x7C5B = 0xE678
+0x7C5C = 0xE679
+0x7C5D = 0xE67A
+0x7C5E = 0xE67B
+0x7C5F = 0xE67C
+0x7C60 = 0xE67D
+0x7C61 = 0xE67E
+0x7C62 = 0xE67F
+0x7C63 = 0xE680
+0x7C64 = 0xE681
+0x7C65 = 0xE682
+0x7C66 = 0xE683
+0x7C67 = 0xE684
+0x7C68 = 0xE685
+0x7C69 = 0xE686
+0x7C6A = 0xE687
+0x7C6B = 0xE688
+0x7C6C = 0xE689
+0x7C6D = 0xE68A
+0x7C6E = 0xE68B
+0x7C6F = 0xE68C
+0x7C70 = 0xE68D
+0x7C71 = 0xE68E
+0x7C72 = 0xE68F
+0x7C73 = 0xE690
+0x7C74 = 0xE691
+0x7C75 = 0xE692
+0x7C76 = 0xE693
+0x7C77 = 0xE694
+0x7C78 = 0xE695
+0x7C79 = 0xE696
+0x7C7A = 0xE697
+0x7C7B = 0xE698
+0x7C7C = 0xE699
+0x7C7D = 0xE69A
+0x7C7E = 0xE69B
+0x7D21 = 0xE69C
+0x7D22 = 0xE69D
+0x7D23 = 0xE69E
+0x7D24 = 0xE69F
+0x7D25 = 0xE6A0
+0x7D26 = 0xE6A1
+0x7D27 = 0xE6A2
+0x7D28 = 0xE6A3
+0x7D29 = 0xE6A4
+0x7D2A = 0xE6A5
+0x7D2B = 0xE6A6
+0x7D2C = 0xE6A7
+0x7D2D = 0xE6A8
+0x7D2E = 0xE6A9
+0x7D2F = 0xE6AA
+0x7D30 = 0xE6AB
+0x7D31 = 0xE6AC
+0x7D32 = 0xE6AD
+0x7D33 = 0xE6AE
+0x7D34 = 0xE6AF
+0x7D35 = 0xE6B0
+0x7D36 = 0xE6B1
+0x7D37 = 0xE6B2
+0x7D38 = 0xE6B3
+0x7D39 = 0xE6B4
+0x7D3A = 0xE6B5
+0x7D3B = 0xE6B6
+0x7D3C = 0xE6B7
+0x7D3D = 0xE6B8
+0x7D3E = 0xE6B9
+0x7D3F = 0xE6BA
+0x7D40 = 0xE6BB
+0x7D41 = 0xE6BC
+0x7D42 = 0xE6BD
+0x7D43 = 0xE6BE
+0x7D44 = 0xE6BF
+0x7D45 = 0xE6C0
+0x7D46 = 0xE6C1
+0x7D47 = 0xE6C2
+0x7D48 = 0xE6C3
+0x7D49 = 0xE6C4
+0x7D4A = 0xE6C5
+0x7D4B = 0xE6C6
+0x7D4C = 0xE6C7
+0x7D4D = 0xE6C8
+0x7D4E = 0xE6C9
+0x7D4F = 0xE6CA
+0x7D50 = 0xE6CB
+0x7D51 = 0xE6CC
+0x7D52 = 0xE6CD
+0x7D53 = 0xE6CE
+0x7D54 = 0xE6CF
+0x7D55 = 0xE6D0
+0x7D56 = 0xE6D1
+0x7D57 = 0xE6D2
+0x7D58 = 0xE6D3
+0x7D59 = 0xE6D4
+0x7D5A = 0xE6D5
+0x7D5B = 0xE6D6
+0x7D5C = 0xE6D7
+0x7D5D = 0xE6D8
+0x7D5E = 0xE6D9
+0x7D5F = 0xE6DA
+0x7D60 = 0xE6DB
+0x7D61 = 0xE6DC
+0x7D62 = 0xE6DD
+0x7D63 = 0xE6DE
+0x7D64 = 0xE6DF
+0x7D65 = 0xE6E0
+0x7D66 = 0xE6E1
+0x7D67 = 0xE6E2
+0x7D68 = 0xE6E3
+0x7D69 = 0xE6E4
+0x7D6A = 0xE6E5
+0x7D6B = 0xE6E6
+0x7D6C = 0xE6E7
+0x7D6D = 0xE6E8
+0x7D6E = 0xE6E9
+0x7D6F = 0xE6EA
+0x7D70 = 0xE6EB
+0x7D71 = 0xE6EC
+0x7D72 = 0xE6ED
+0x7D73 = 0xE6EE
+0x7D74 = 0xE6EF
+0x7D75 = 0xE6F0
+0x7D76 = 0xE6F1
+0x7D77 = 0xE6F2
+0x7D78 = 0xE6F3
+0x7D79 = 0xE6F4
+0x7D7A = 0xE6F5
+0x7D7B = 0xE6F6
+0x7D7C = 0xE6F7
+0x7D7D = 0xE6F8
+0x7D7E = 0xE6F9
+0x7E21 = 0xE6FA
+0x7E22 = 0xE6FB
+0x7E23 = 0xE6FC
+0x7E24 = 0xE6FD
+0x7E25 = 0xE6FE
+0x7E26 = 0xE6FF
+0x7E27 = 0xE700
+0x7E28 = 0xE701
+0x7E29 = 0xE702
+0x7E2A = 0xE703
+0x7E2B = 0xE704
+0x7E2C = 0xE705
+0x7E2D = 0xE706
+0x7E2E = 0xE707
+0x7E2F = 0xE708
+0x7E30 = 0xE709
+0x7E31 = 0xE70A
+0x7E32 = 0xE70B
+0x7E33 = 0xE70C
+0x7E34 = 0xE70D
+0x7E35 = 0xE70E
+0x7E36 = 0xE70F
+0x7E37 = 0xE710
+0x7E38 = 0xE711
+0x7E39 = 0xE712
+0x7E3A = 0xE713
+0x7E3B = 0xE714
+0x7E3C = 0xE715
+0x7E3D = 0xE716
+0x7E3E = 0xE717
+0x7E3F = 0xE718
+0x7E40 = 0xE719
+0x7E41 = 0xE71A
+0x7E42 = 0xE71B
+0x7E43 = 0xE71C
+0x7E44 = 0xE71D
+0x7E45 = 0xE71E
+0x7E46 = 0xE71F
+0x7E47 = 0xE720
+0x7E48 = 0xE721
+0x7E49 = 0xE722
+0x7E4A = 0xE723
+0x7E4B = 0xE724
+0x7E4C = 0xE725
+0x7E4D = 0xE726
+0x7E4E = 0xE727
+0x7E4F = 0xE728
+0x7E50 = 0xE729
+0x7E51 = 0xE72A
+0x7E52 = 0xE72B
+0x7E53 = 0xE72C
+0x7E54 = 0xE72D
+0x7E55 = 0xE72E
+0x7E56 = 0xE72F
+0x7E57 = 0xE730
+0x7E58 = 0xE731
+0x7E59 = 0xE732
+0x7E5A = 0xE733
+0x7E5B = 0xE734
+0x7E5C = 0xE735
+0x7E5D = 0xE736
+0x7E5E = 0xE737
+0x7E5F = 0xE738
+0x7E60 = 0xE739
+0x7E61 = 0xE73A
+0x7E62 = 0xE73B
+0x7E63 = 0xE73C
+0x7E64 = 0xE73D
+0x7E65 = 0xE73E
+0x7E66 = 0xE73F
+0x7E67 = 0xE740
+0x7E68 = 0xE741
+0x7E69 = 0xE742
+0x7E6A = 0xE743
+0x7E6B = 0xE744
+0x7E6C = 0xE745
+0x7E6D = 0xE746
+0x7E6E = 0xE747
+0x7E6F = 0xE748
+0x7E70 = 0xE749
+0x7E71 = 0xE74A
+0x7E72 = 0xE74B
+0x7E73 = 0xE74C
+0x7E74 = 0xE74D
+0x7E75 = 0xE74E
+0x7E76 = 0xE74F
+0x7E77 = 0xE750
+0x7E78 = 0xE751
+0x7E79 = 0xE752
+0x7E7A = 0xE753
+0x7E7B = 0xE754
+0x7E7C = 0xE755
+0x7E7D = 0xE756
+0x7E7E = 0xE757
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212VDC@IBM%UCS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212VDC@IBM%UCS.src
new file mode 100644
index 0000000..6f73ed3
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/JISX0212VDC@IBM%UCS.src
@@ -0,0 +1,120 @@
+# $NetBSD: JISX0212VDC@IBM%UCS.src,v 1.1 2003/07/19 20:20:41 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"JISX0212VDC:IBM/UCS"
+SRC_ZONE	0x7321 - 0x747E
+OOB_MODE	INVALID
+DST_INVALID	0xFFFE
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x7373 = 0x2170
+0x7374 = 0x2171
+0x7375 = 0x2172
+0x7376 = 0x2173
+0x7377 = 0x2174
+0x7378 = 0x2175
+0x7379 = 0x2176
+0x737A = 0x2177
+0x737B = 0x2178
+0x737C = 0x2179
+0x737D = 0x2160
+0x737E = 0x2161
+0x7421 = 0x2162
+0x7422 = 0x2163
+0x7423 = 0x2164
+0x7424 = 0x2165
+0x7425 = 0x2166
+0x7426 = 0x2167
+0x7427 = 0x2168
+0x7428 = 0x2169
+0x7429 = 0xFF07
+0x742A = 0xFF02
+0x742B = 0x3231
+0x742C = 0x2116
+0x742D = 0x2121
+0x742E = 0x70BB
+0x742F = 0x4EFC
+0x7430 = 0x50F4
+0x7431 = 0x51EC
+0x7432 = 0x5307
+0x7433 = 0x5324
+0x7434 = 0xFA0E
+0x7435 = 0x548A
+0x7436 = 0x5759
+0x7437 = 0xFA0F
+0x7438 = 0xFA10
+0x7439 = 0x589E
+0x743A = 0x5BEC
+0x743B = 0x5CF5
+0x743C = 0x5D53
+0x743D = 0xFA11
+0x743E = 0x5FB7
+0x743F = 0x6085
+0x7440 = 0x6120
+0x7441 = 0x654E
+0x7442 = 0x663B
+0x7443 = 0x6665
+0x7444 = 0xFA12
+0x7445 = 0xF929
+0x7446 = 0x6801
+0x7447 = 0xFA13
+0x7448 = 0xFA14
+0x7449 = 0x6A6B
+0x744A = 0x6AE2
+0x744B = 0x6DF8
+0x744C = 0x6DF2
+0x744D = 0x7028
+0x744E = 0xFA15
+0x744F = 0xFA16
+0x7450 = 0x7501
+0x7451 = 0x7682
+0x7452 = 0x769E
+0x7453 = 0xFA17
+0x7454 = 0x7930
+0x7455 = 0xFA18
+0x7456 = 0xFA19
+0x7457 = 0xFA1A
+0x7458 = 0xFA1B
+0x7459 = 0x7AE7
+0x745A = 0xFA1C
+0x745B = 0xFA1D
+0x745C = 0x7DA0
+0x745D = 0x7DD6
+0x745E = 0xFA1E
+0x745F = 0x8362
+0x7460 = 0xFA1F
+0x7461 = 0x85B0
+0x7462 = 0xFA20
+0x7463 = 0xFA21
+0x7464 = 0x8807
+0x7465 = 0xFA22
+0x7466 = 0x8B7F
+0x7467 = 0x8CF4
+0x7468 = 0x8D76
+0x7469 = 0xFA23
+0x746A = 0xFA24
+0x746B = 0xFA25
+0x746C = 0x90DE
+0x746D = 0xFA26
+0x746E = 0x9115
+0x746F = 0xFA27
+0x7470 = 0xFA28
+0x7471 = 0x9592
+0x7472 = 0xF9DC
+0x7473 = 0xFA29
+0x7474 = 0x973B
+0x7475 = 0x974D
+0x7476 = 0x9751
+0x7477 = 0xFA2A
+0x7478 = 0xFA2B
+0x7479 = 0xFA2C
+0x747A = 0x999E
+0x747B = 0x9AD9
+0x747C = 0x9B72
+0x747D = 0xFA2D
+0x747E = 0x9ED1
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0201-KANA.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0201-KANA.src
new file mode 100644
index 0000000..57ae00f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0201-KANA.src
@@ -0,0 +1,127 @@
+# $NetBSD: UCS%JISX0201-KANA.src,v 1.5 2006/10/26 16:04:21 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0201-KANA"
+SRC_ZONE	0xFF60 - 0xFF9F
+OOB_MODE	INVALID
+DST_INVALID	0xFF
+DST_UNIT_BITS	8
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0201 (1976) to Unicode 1.1 Table
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0201 into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0201 and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0201 and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0201 and
+# Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Three tab-separated columns
+#		Column #1 is the shift JIS code (in hex as 0xXX)
+#		Column #2 is the Unicode (in hex as 0xXXXX)
+#		Column #3 the Unicode (ISO 10646) name (follows a comment sign)
+#
+#	The entries are in JIS order
+#
+#
+0xFF61 = 0x21
+0xFF62 = 0x22
+0xFF63 = 0x23
+0xFF64 = 0x24
+0xFF65 = 0x25
+0xFF66 = 0x26
+0xFF67 = 0x27
+0xFF68 = 0x28
+0xFF69 = 0x29
+0xFF6A = 0x2A
+0xFF6B = 0x2B
+0xFF6C = 0x2C
+0xFF6D = 0x2D
+0xFF6E = 0x2E
+0xFF6F = 0x2F
+0xFF70 = 0x30
+0xFF71 = 0x31
+0xFF72 = 0x32
+0xFF73 = 0x33
+0xFF74 = 0x34
+0xFF75 = 0x35
+0xFF76 = 0x36
+0xFF77 = 0x37
+0xFF78 = 0x38
+0xFF79 = 0x39
+0xFF7A = 0x3A
+0xFF7B = 0x3B
+0xFF7C = 0x3C
+0xFF7D = 0x3D
+0xFF7E = 0x3E
+0xFF7F = 0x3F
+0xFF80 = 0x40
+0xFF81 = 0x41
+0xFF82 = 0x42
+0xFF83 = 0x43
+0xFF84 = 0x44
+0xFF85 = 0x45
+0xFF86 = 0x46
+0xFF87 = 0x47
+0xFF88 = 0x48
+0xFF89 = 0x49
+0xFF8A = 0x4A
+0xFF8B = 0x4B
+0xFF8C = 0x4C
+0xFF8D = 0x4D
+0xFF8E = 0x4E
+0xFF8F = 0x4F
+0xFF90 = 0x50
+0xFF91 = 0x51
+0xFF92 = 0x52
+0xFF93 = 0x53
+0xFF94 = 0x54
+0xFF95 = 0x55
+0xFF96 = 0x56
+0xFF97 = 0x57
+0xFF98 = 0x58
+0xFF99 = 0x59
+0xFF9A = 0x5A
+0xFF9B = 0x5B
+0xFF9C = 0x5C
+0xFF9D = 0x5D
+0xFF9E = 0x5E
+0xFF9F = 0x5F
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@1990.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@1990.src
new file mode 100644
index 0000000..977171c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@1990.src
@@ -0,0 +1,6974 @@
+# $NetBSD: UCS%JISX0208@1990.src,v 1.7 2006/11/29 15:45:26 tnozaki Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0208:1990"
+SRC_ZONE	0x005C - 0xFFE5
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0208 (1990) to Unicode
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0208 (1990) into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0208 (1990) and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0208 (1990) and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0208 (1990)
+# and Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Four tab-separated columns
+#		 Column #1 is the shift-JIS code (in hex)
+#		 Column #2 is the JIS X 0208 code (in hex as 0xXXXX)
+#		 Column #3 is the Unicode (in hex as 0xXXXX)
+#		 Column #4 the Unicode name (follows a comment sign, '#')
+#			The official names for Unicode characters U+4E00
+#			to U+9FA5, inclusive, is "CJK UNIFIED IDEOGRAPH-XXXX",
+#			where XXXX is the code point.  Including all these
+#			names in this file increases its size substantially
+#			and needlessly.  The token "" is used for the
+#			name of these characters.  If necessary, it can be
+#			expanded algorithmically by a parser or editor.
+#
+#	The entries are in JIS X 0208 order
+#
+#	The following algorithms can be used to change the hex form
+#		of JIS 0208 to other standard forms:
+#
+#		To change hex to EUC form, add 0x8080
+#		To change hex to kuten form, first subtract 0x2020.  Then
+#			the high and low bytes correspond to the ku and ten of
+#			the kuten form.  For example, 0x2121 -> 0x0101 -> 0101;
+#			0x7426 -> 0x5406 -> 8406
+#
+#   The kanji mappings are a normative part of ISO/IEC 10646.  The
+#       non-kanji mappings are provisional, pending definition of
+#       official mappings by Japanese standards bodies
+#
+#	Any comments or problems, contact 
+#
+#
+# NetBSD specific modification:
+#	2003-08-18 : add U+FF3C -> 0x2140 conversion.
+#			see UCS%JISX0208@1990.src.
+#
+# Ruby specific modification:
+#	2008-08-31 : remove U+005C -> 0x2140 conversion.
+#
+0x00A2 = 0x2171
+0x00A3 = 0x2172
+0x00A7 = 0x2178
+0x00A8 = 0x212F
+0x00AC = 0x224C
+0x00B0 = 0x216B
+0x00B1 = 0x215E
+0x00B4 = 0x212D
+0x00B6 = 0x2279
+0x00D7 = 0x215F
+0x00F7 = 0x2160
+0x0391 = 0x2621
+0x0392 = 0x2622
+0x0393 = 0x2623
+0x0394 = 0x2624
+0x0395 = 0x2625
+0x0396 = 0x2626
+0x0397 = 0x2627
+0x0398 = 0x2628
+0x0399 = 0x2629
+0x039A = 0x262A
+0x039B = 0x262B
+0x039C = 0x262C
+0x039D = 0x262D
+0x039E = 0x262E
+0x039F = 0x262F
+0x03A0 = 0x2630
+0x03A1 = 0x2631
+0x03A3 = 0x2632
+0x03A4 = 0x2633
+0x03A5 = 0x2634
+0x03A6 = 0x2635
+0x03A7 = 0x2636
+0x03A8 = 0x2637
+0x03A9 = 0x2638
+0x03B1 = 0x2641
+0x03B2 = 0x2642
+0x03B3 = 0x2643
+0x03B4 = 0x2644
+0x03B5 = 0x2645
+0x03B6 = 0x2646
+0x03B7 = 0x2647
+0x03B8 = 0x2648
+0x03B9 = 0x2649
+0x03BA = 0x264A
+0x03BB = 0x264B
+0x03BC = 0x264C
+0x03BD = 0x264D
+0x03BE = 0x264E
+0x03BF = 0x264F
+0x03C0 = 0x2650
+0x03C1 = 0x2651
+0x03C3 = 0x2652
+0x03C4 = 0x2653
+0x03C5 = 0x2654
+0x03C6 = 0x2655
+0x03C7 = 0x2656
+0x03C8 = 0x2657
+0x03C9 = 0x2658
+0x0401 = 0x2727
+0x0410 = 0x2721
+0x0411 = 0x2722
+0x0412 = 0x2723
+0x0413 = 0x2724
+0x0414 = 0x2725
+0x0415 = 0x2726
+0x0416 = 0x2728
+0x0417 = 0x2729
+0x0418 = 0x272A
+0x0419 = 0x272B
+0x041A = 0x272C
+0x041B = 0x272D
+0x041C = 0x272E
+0x041D = 0x272F
+0x041E = 0x2730
+0x041F = 0x2731
+0x0420 = 0x2732
+0x0421 = 0x2733
+0x0422 = 0x2734
+0x0423 = 0x2735
+0x0424 = 0x2736
+0x0425 = 0x2737
+0x0426 = 0x2738
+0x0427 = 0x2739
+0x0428 = 0x273A
+0x0429 = 0x273B
+0x042A = 0x273C
+0x042B = 0x273D
+0x042C = 0x273E
+0x042D = 0x273F
+0x042E = 0x2740
+0x042F = 0x2741
+0x0430 = 0x2751
+0x0431 = 0x2752
+0x0432 = 0x2753
+0x0433 = 0x2754
+0x0434 = 0x2755
+0x0435 = 0x2756
+0x0436 = 0x2758
+0x0437 = 0x2759
+0x0438 = 0x275A
+0x0439 = 0x275B
+0x043A = 0x275C
+0x043B = 0x275D
+0x043C = 0x275E
+0x043D = 0x275F
+0x043E = 0x2760
+0x043F = 0x2761
+0x0440 = 0x2762
+0x0441 = 0x2763
+0x0442 = 0x2764
+0x0443 = 0x2765
+0x0444 = 0x2766
+0x0445 = 0x2767
+0x0446 = 0x2768
+0x0447 = 0x2769
+0x0448 = 0x276A
+0x0449 = 0x276B
+0x044A = 0x276C
+0x044B = 0x276D
+0x044C = 0x276E
+0x044D = 0x276F
+0x044E = 0x2770
+0x044F = 0x2771
+0x0451 = 0x2757
+0x2010 = 0x213E
+0x2014 = 0x213D
+0x2015 = 0x213D
+0x2016 = 0x2142
+0x2018 = 0x2146
+0x2019 = 0x2147
+0x201C = 0x2148
+0x201D = 0x2149
+0x2020 = 0x2277
+0x2021 = 0x2278
+0x2025 = 0x2145
+0x2026 = 0x2144
+0x2030 = 0x2273
+0x2032 = 0x216C
+0x2033 = 0x216D
+0x203B = 0x2228
+0x2103 = 0x216E
+0x212B = 0x2272
+0x2190 = 0x222B
+0x2191 = 0x222C
+0x2192 = 0x222A
+0x2193 = 0x222D
+0x21D2 = 0x224D
+0x21D4 = 0x224E
+0x2200 = 0x224F
+0x2202 = 0x225F
+0x2203 = 0x2250
+0x2207 = 0x2260
+0x2208 = 0x223A
+0x220B = 0x223B
+0x2212 = 0x215D
+0x221A = 0x2265
+0x221D = 0x2267
+0x221E = 0x2167
+0x2220 = 0x225C
+0x2227 = 0x224A
+0x2228 = 0x224B
+0x2229 = 0x2241
+0x222A = 0x2240
+0x222B = 0x2269
+0x222C = 0x226A
+0x2234 = 0x2168
+0x2235 = 0x2268
+0x223D = 0x2266
+0x2252 = 0x2262
+0x2260 = 0x2162
+0x2261 = 0x2261
+0x2266 = 0x2165
+0x2267 = 0x2166
+0x226A = 0x2263
+0x226B = 0x2264
+0x2282 = 0x223E
+0x2283 = 0x223F
+0x2286 = 0x223C
+0x2287 = 0x223D
+0x22A5 = 0x225D
+0x2312 = 0x225E
+0x2500 = 0x2821
+0x2501 = 0x282C
+0x2502 = 0x2822
+0x2503 = 0x282D
+0x250C = 0x2823
+0x250F = 0x282E
+0x2510 = 0x2824
+0x2513 = 0x282F
+0x2514 = 0x2826
+0x2517 = 0x2831
+0x2518 = 0x2825
+0x251B = 0x2830
+0x251C = 0x2827
+0x251D = 0x283C
+0x2520 = 0x2837
+0x2523 = 0x2832
+0x2524 = 0x2829
+0x2525 = 0x283E
+0x2528 = 0x2839
+0x252B = 0x2834
+0x252C = 0x2828
+0x252F = 0x2838
+0x2530 = 0x283D
+0x2533 = 0x2833
+0x2534 = 0x282A
+0x2537 = 0x283A
+0x2538 = 0x283F
+0x253B = 0x2835
+0x253C = 0x282B
+0x253F = 0x283B
+0x2542 = 0x2840
+0x254B = 0x2836
+0x25A0 = 0x2223
+0x25A1 = 0x2222
+0x25B2 = 0x2225
+0x25B3 = 0x2224
+0x25BC = 0x2227
+0x25BD = 0x2226
+0x25C6 = 0x2221
+0x25C7 = 0x217E
+0x25CB = 0x217B
+0x25CE = 0x217D
+0x25CF = 0x217C
+0x25EF = 0x227E
+0x2605 = 0x217A
+0x2606 = 0x2179
+0x2640 = 0x216A
+0x2642 = 0x2169
+0x266A = 0x2276
+0x266D = 0x2275
+0x266F = 0x2274
+0x3000 = 0x2121
+0x3001 = 0x2122
+0x3002 = 0x2123
+0x3003 = 0x2137
+0x3005 = 0x2139
+0x3006 = 0x213A
+0x3007 = 0x213B
+0x3008 = 0x2152
+0x3009 = 0x2153
+0x300A = 0x2154
+0x300B = 0x2155
+0x300C = 0x2156
+0x300D = 0x2157
+0x300E = 0x2158
+0x300F = 0x2159
+0x3010 = 0x215A
+0x3011 = 0x215B
+0x3012 = 0x2229
+0x3013 = 0x222E
+0x3014 = 0x214C
+0x3015 = 0x214D
+0x301C = 0x2141
+0x3041 = 0x2421
+0x3042 = 0x2422
+0x3043 = 0x2423
+0x3044 = 0x2424
+0x3045 = 0x2425
+0x3046 = 0x2426
+0x3047 = 0x2427
+0x3048 = 0x2428
+0x3049 = 0x2429
+0x304A = 0x242A
+0x304B = 0x242B
+0x304C = 0x242C
+0x304D = 0x242D
+0x304E = 0x242E
+0x304F = 0x242F
+0x3050 = 0x2430
+0x3051 = 0x2431
+0x3052 = 0x2432
+0x3053 = 0x2433
+0x3054 = 0x2434
+0x3055 = 0x2435
+0x3056 = 0x2436
+0x3057 = 0x2437
+0x3058 = 0x2438
+0x3059 = 0x2439
+0x305A = 0x243A
+0x305B = 0x243B
+0x305C = 0x243C
+0x305D = 0x243D
+0x305E = 0x243E
+0x305F = 0x243F
+0x3060 = 0x2440
+0x3061 = 0x2441
+0x3062 = 0x2442
+0x3063 = 0x2443
+0x3064 = 0x2444
+0x3065 = 0x2445
+0x3066 = 0x2446
+0x3067 = 0x2447
+0x3068 = 0x2448
+0x3069 = 0x2449
+0x306A = 0x244A
+0x306B = 0x244B
+0x306C = 0x244C
+0x306D = 0x244D
+0x306E = 0x244E
+0x306F = 0x244F
+0x3070 = 0x2450
+0x3071 = 0x2451
+0x3072 = 0x2452
+0x3073 = 0x2453
+0x3074 = 0x2454
+0x3075 = 0x2455
+0x3076 = 0x2456
+0x3077 = 0x2457
+0x3078 = 0x2458
+0x3079 = 0x2459
+0x307A = 0x245A
+0x307B = 0x245B
+0x307C = 0x245C
+0x307D = 0x245D
+0x307E = 0x245E
+0x307F = 0x245F
+0x3080 = 0x2460
+0x3081 = 0x2461
+0x3082 = 0x2462
+0x3083 = 0x2463
+0x3084 = 0x2464
+0x3085 = 0x2465
+0x3086 = 0x2466
+0x3087 = 0x2467
+0x3088 = 0x2468
+0x3089 = 0x2469
+0x308A = 0x246A
+0x308B = 0x246B
+0x308C = 0x246C
+0x308D = 0x246D
+0x308E = 0x246E
+0x308F = 0x246F
+0x3090 = 0x2470
+0x3091 = 0x2471
+0x3092 = 0x2472
+0x3093 = 0x2473
+0x309B = 0x212B
+0x309C = 0x212C
+0x309D = 0x2135
+0x309E = 0x2136
+0x30A1 = 0x2521
+0x30A2 = 0x2522
+0x30A3 = 0x2523
+0x30A4 = 0x2524
+0x30A5 = 0x2525
+0x30A6 = 0x2526
+0x30A7 = 0x2527
+0x30A8 = 0x2528
+0x30A9 = 0x2529
+0x30AA = 0x252A
+0x30AB = 0x252B
+0x30AC = 0x252C
+0x30AD = 0x252D
+0x30AE = 0x252E
+0x30AF = 0x252F
+0x30B0 = 0x2530
+0x30B1 = 0x2531
+0x30B2 = 0x2532
+0x30B3 = 0x2533
+0x30B4 = 0x2534
+0x30B5 = 0x2535
+0x30B6 = 0x2536
+0x30B7 = 0x2537
+0x30B8 = 0x2538
+0x30B9 = 0x2539
+0x30BA = 0x253A
+0x30BB = 0x253B
+0x30BC = 0x253C
+0x30BD = 0x253D
+0x30BE = 0x253E
+0x30BF = 0x253F
+0x30C0 = 0x2540
+0x30C1 = 0x2541
+0x30C2 = 0x2542
+0x30C3 = 0x2543
+0x30C4 = 0x2544
+0x30C5 = 0x2545
+0x30C6 = 0x2546
+0x30C7 = 0x2547
+0x30C8 = 0x2548
+0x30C9 = 0x2549
+0x30CA = 0x254A
+0x30CB = 0x254B
+0x30CC = 0x254C
+0x30CD = 0x254D
+0x30CE = 0x254E
+0x30CF = 0x254F
+0x30D0 = 0x2550
+0x30D1 = 0x2551
+0x30D2 = 0x2552
+0x30D3 = 0x2553
+0x30D4 = 0x2554
+0x30D5 = 0x2555
+0x30D6 = 0x2556
+0x30D7 = 0x2557
+0x30D8 = 0x2558
+0x30D9 = 0x2559
+0x30DA = 0x255A
+0x30DB = 0x255B
+0x30DC = 0x255C
+0x30DD = 0x255D
+0x30DE = 0x255E
+0x30DF = 0x255F
+0x30E0 = 0x2560
+0x30E1 = 0x2561
+0x30E2 = 0x2562
+0x30E3 = 0x2563
+0x30E4 = 0x2564
+0x30E5 = 0x2565
+0x30E6 = 0x2566
+0x30E7 = 0x2567
+0x30E8 = 0x2568
+0x30E9 = 0x2569
+0x30EA = 0x256A
+0x30EB = 0x256B
+0x30EC = 0x256C
+0x30ED = 0x256D
+0x30EE = 0x256E
+0x30EF = 0x256F
+0x30F0 = 0x2570
+0x30F1 = 0x2571
+0x30F2 = 0x2572
+0x30F3 = 0x2573
+0x30F4 = 0x2574
+0x30F5 = 0x2575
+0x30F6 = 0x2576
+0x30FB = 0x2126
+0x30FC = 0x213C
+0x30FD = 0x2133
+0x30FE = 0x2134
+0x4E00 = 0x306C
+0x4E01 = 0x437A
+0x4E03 = 0x3C37
+0x4E07 = 0x4B7C
+0x4E08 = 0x3E66
+0x4E09 = 0x3B30
+0x4E0A = 0x3E65
+0x4E0B = 0x323C
+0x4E0D = 0x4954
+0x4E0E = 0x4D3F
+0x4E10 = 0x5022
+0x4E11 = 0x312F
+0x4E14 = 0x336E
+0x4E15 = 0x5023
+0x4E16 = 0x4024
+0x4E17 = 0x5242
+0x4E18 = 0x3556
+0x4E19 = 0x4A3A
+0x4E1E = 0x3E67
+0x4E21 = 0x4E3E
+0x4E26 = 0x4A42
+0x4E2A = 0x5024
+0x4E2D = 0x4366
+0x4E31 = 0x5025
+0x4E32 = 0x367A
+0x4E36 = 0x5026
+0x4E38 = 0x345D
+0x4E39 = 0x4330
+0x4E3B = 0x3C67
+0x4E3C = 0x5027
+0x4E3F = 0x5028
+0x4E42 = 0x5029
+0x4E43 = 0x4735
+0x4E45 = 0x3557
+0x4E4B = 0x4737
+0x4E4D = 0x4663
+0x4E4E = 0x3843
+0x4E4F = 0x4B33
+0x4E55 = 0x6949
+0x4E56 = 0x502A
+0x4E57 = 0x3E68
+0x4E58 = 0x502B
+0x4E59 = 0x3235
+0x4E5D = 0x3665
+0x4E5E = 0x3870
+0x4E5F = 0x4C69
+0x4E62 = 0x5626
+0x4E71 = 0x4D70
+0x4E73 = 0x467D
+0x4E7E = 0x3425
+0x4E80 = 0x3535
+0x4E82 = 0x502C
+0x4E85 = 0x502D
+0x4E86 = 0x4E3B
+0x4E88 = 0x4D3D
+0x4E89 = 0x4168
+0x4E8A = 0x502F
+0x4E8B = 0x3B76
+0x4E8C = 0x4673
+0x4E8E = 0x5032
+0x4E91 = 0x313E
+0x4E92 = 0x385F
+0x4E94 = 0x385E
+0x4E95 = 0x3066
+0x4E98 = 0x4F4B
+0x4E99 = 0x4F4A
+0x4E9B = 0x3A33
+0x4E9C = 0x3021
+0x4E9E = 0x5033
+0x4E9F = 0x5034
+0x4EA0 = 0x5035
+0x4EA1 = 0x4B34
+0x4EA2 = 0x5036
+0x4EA4 = 0x3872
+0x4EA5 = 0x3067
+0x4EA6 = 0x4B72
+0x4EA8 = 0x357C
+0x4EAB = 0x357D
+0x4EAC = 0x357E
+0x4EAD = 0x4462
+0x4EAE = 0x4E3C
+0x4EB0 = 0x5037
+0x4EB3 = 0x5038
+0x4EB6 = 0x5039
+0x4EBA = 0x3F4D
+0x4EC0 = 0x3D3A
+0x4EC1 = 0x3F4E
+0x4EC2 = 0x503E
+0x4EC4 = 0x503C
+0x4EC6 = 0x503D
+0x4EC7 = 0x3558
+0x4ECA = 0x3A23
+0x4ECB = 0x3270
+0x4ECD = 0x503B
+0x4ECE = 0x503A
+0x4ECF = 0x4A29
+0x4ED4 = 0x3B46
+0x4ED5 = 0x3B45
+0x4ED6 = 0x423E
+0x4ED7 = 0x503F
+0x4ED8 = 0x4955
+0x4ED9 = 0x4067
+0x4EDD = 0x2138
+0x4EDE = 0x5040
+0x4EDF = 0x5042
+0x4EE3 = 0x4265
+0x4EE4 = 0x4E61
+0x4EE5 = 0x304A
+0x4EED = 0x5041
+0x4EEE = 0x323E
+0x4EF0 = 0x3644
+0x4EF2 = 0x4367
+0x4EF6 = 0x376F
+0x4EF7 = 0x5043
+0x4EFB = 0x4724
+0x4F01 = 0x346B
+0x4F09 = 0x5044
+0x4F0A = 0x304B
+0x4F0D = 0x3860
+0x4F0E = 0x346C
+0x4F0F = 0x497A
+0x4F10 = 0x4832
+0x4F11 = 0x3559
+0x4F1A = 0x3271
+0x4F1C = 0x5067
+0x4F1D = 0x4541
+0x4F2F = 0x476C
+0x4F30 = 0x5046
+0x4F34 = 0x483C
+0x4F36 = 0x4E62
+0x4F38 = 0x3F2D
+0x4F3A = 0x3B47
+0x4F3C = 0x3B77
+0x4F3D = 0x3240
+0x4F43 = 0x4451
+0x4F46 = 0x4322
+0x4F47 = 0x504A
+0x4F4D = 0x304C
+0x4F4E = 0x4463
+0x4F4F = 0x3D3B
+0x4F50 = 0x3A34
+0x4F51 = 0x4D24
+0x4F53 = 0x424E
+0x4F55 = 0x323F
+0x4F57 = 0x5049
+0x4F59 = 0x4D3E
+0x4F5A = 0x5045
+0x4F5B = 0x5047
+0x4F5C = 0x3A6E
+0x4F5D = 0x5048
+0x4F5E = 0x5524
+0x4F69 = 0x5050
+0x4F6F = 0x5053
+0x4F70 = 0x5051
+0x4F73 = 0x3242
+0x4F75 = 0x4A3B
+0x4F76 = 0x504B
+0x4F7B = 0x504F
+0x4F7C = 0x3873
+0x4F7F = 0x3B48
+0x4F83 = 0x3426
+0x4F86 = 0x5054
+0x4F88 = 0x504C
+0x4F8B = 0x4E63
+0x4F8D = 0x3B78
+0x4F8F = 0x504D
+0x4F91 = 0x5052
+0x4F96 = 0x5055
+0x4F98 = 0x504E
+0x4F9B = 0x3621
+0x4F9D = 0x304D
+0x4FA0 = 0x3622
+0x4FA1 = 0x3241
+0x4FAB = 0x5525
+0x4FAD = 0x4B79
+0x4FAE = 0x496E
+0x4FAF = 0x3874
+0x4FB5 = 0x3F2F
+0x4FB6 = 0x4E37
+0x4FBF = 0x4A58
+0x4FC2 = 0x3738
+0x4FC3 = 0x4225
+0x4FC4 = 0x3264
+0x4FCA = 0x3D53
+0x4FCE = 0x5059
+0x4FD0 = 0x505E
+0x4FD1 = 0x505C
+0x4FD4 = 0x5057
+0x4FD7 = 0x422F
+0x4FD8 = 0x505A
+0x4FDA = 0x505D
+0x4FDB = 0x505B
+0x4FDD = 0x4A5D
+0x4FDF = 0x5058
+0x4FE1 = 0x3F2E
+0x4FE3 = 0x4B73
+0x4FE4 = 0x505F
+0x4FE5 = 0x5060
+0x4FEE = 0x3D24
+0x4FEF = 0x506D
+0x4FF3 = 0x4750
+0x4FF5 = 0x4936
+0x4FF6 = 0x5068
+0x4FF8 = 0x4A70
+0x4FFA = 0x3236
+0x4FFE = 0x506C
+0x5005 = 0x5066
+0x5006 = 0x506F
+0x5009 = 0x4152
+0x500B = 0x3844
+0x500D = 0x475C
+0x500F = 0x6047
+0x5011 = 0x506E
+0x5012 = 0x455D
+0x5014 = 0x5063
+0x5016 = 0x3876
+0x5019 = 0x3875
+0x501A = 0x5061
+0x501F = 0x3C5A
+0x5021 = 0x5069
+0x5023 = 0x4A6F
+0x5024 = 0x434D
+0x5025 = 0x5065
+0x5026 = 0x3771
+0x5028 = 0x5062
+0x5029 = 0x506A
+0x502A = 0x5064
+0x502B = 0x4E51
+0x502C = 0x506B
+0x502D = 0x4F41
+0x5036 = 0x3666
+0x5039 = 0x3770
+0x5043 = 0x5070
+0x5047 = 0x5071
+0x5048 = 0x5075
+0x5049 = 0x304E
+0x504F = 0x4A50
+0x5050 = 0x5074
+0x5055 = 0x5073
+0x5056 = 0x5077
+0x505A = 0x5076
+0x505C = 0x4464
+0x5065 = 0x3772
+0x506C = 0x5078
+0x5072 = 0x3C45
+0x5074 = 0x4226
+0x5075 = 0x4465
+0x5076 = 0x3676
+0x5078 = 0x5079
+0x507D = 0x3536
+0x5080 = 0x507A
+0x5085 = 0x507C
+0x508D = 0x4B35
+0x5091 = 0x3766
+0x5098 = 0x3B31
+0x5099 = 0x4877
+0x509A = 0x507B
+0x50AC = 0x3A45
+0x50AD = 0x4D43
+0x50B2 = 0x507E
+0x50B3 = 0x5123
+0x50B4 = 0x507D
+0x50B5 = 0x3A44
+0x50B7 = 0x3D7D
+0x50BE = 0x3739
+0x50C2 = 0x5124
+0x50C5 = 0x364F
+0x50C9 = 0x5121
+0x50CA = 0x5122
+0x50CD = 0x462F
+0x50CF = 0x417C
+0x50D1 = 0x3623
+0x50D5 = 0x4B4D
+0x50D6 = 0x5125
+0x50DA = 0x4E3D
+0x50DE = 0x5126
+0x50E3 = 0x5129
+0x50E5 = 0x5127
+0x50E7 = 0x414E
+0x50ED = 0x5128
+0x50EE = 0x512A
+0x50F5 = 0x512C
+0x50F9 = 0x512B
+0x50FB = 0x4A48
+0x5100 = 0x3537
+0x5101 = 0x512E
+0x5102 = 0x512F
+0x5104 = 0x322F
+0x5109 = 0x512D
+0x5112 = 0x3C74
+0x5114 = 0x5132
+0x5115 = 0x5131
+0x5116 = 0x5130
+0x5118 = 0x5056
+0x511A = 0x5133
+0x511F = 0x3D7E
+0x5121 = 0x5134
+0x512A = 0x4D25
+0x5132 = 0x4C59
+0x5137 = 0x5136
+0x513A = 0x5135
+0x513B = 0x5138
+0x513C = 0x5137
+0x513F = 0x5139
+0x5140 = 0x513A
+0x5141 = 0x3074
+0x5143 = 0x3835
+0x5144 = 0x373B
+0x5145 = 0x3D3C
+0x5146 = 0x437B
+0x5147 = 0x3624
+0x5148 = 0x4068
+0x5149 = 0x3877
+0x514B = 0x396E
+0x514C = 0x513C
+0x514D = 0x4C48
+0x514E = 0x4546
+0x5150 = 0x3B79
+0x5152 = 0x513B
+0x5154 = 0x513D
+0x515A = 0x455E
+0x515C = 0x3375
+0x5162 = 0x513E
+0x5165 = 0x467E
+0x5168 = 0x4134
+0x5169 = 0x5140
+0x516A = 0x5141
+0x516B = 0x482C
+0x516C = 0x3878
+0x516D = 0x4F3B
+0x516E = 0x5142
+0x5171 = 0x3626
+0x5175 = 0x4A3C
+0x5176 = 0x4236
+0x5177 = 0x3671
+0x5178 = 0x4535
+0x517C = 0x3773
+0x5180 = 0x5143
+0x5182 = 0x5144
+0x5185 = 0x4662
+0x5186 = 0x315F
+0x5189 = 0x5147
+0x518A = 0x3A7D
+0x518C = 0x5146
+0x518D = 0x3A46
+0x518F = 0x5148
+0x5190 = 0x666E
+0x5191 = 0x5149
+0x5192 = 0x4B41
+0x5193 = 0x514A
+0x5195 = 0x514B
+0x5196 = 0x514C
+0x5197 = 0x3E69
+0x5199 = 0x3C4C
+0x51A0 = 0x3427
+0x51A2 = 0x514F
+0x51A4 = 0x514D
+0x51A5 = 0x4C3D
+0x51A6 = 0x514E
+0x51A8 = 0x495A
+0x51A9 = 0x5150
+0x51AA = 0x5151
+0x51AB = 0x5152
+0x51AC = 0x455F
+0x51B0 = 0x5156
+0x51B1 = 0x5154
+0x51B2 = 0x5155
+0x51B3 = 0x5153
+0x51B4 = 0x3A63
+0x51B5 = 0x5157
+0x51B6 = 0x4C6A
+0x51B7 = 0x4E64
+0x51BD = 0x5158
+0x51C4 = 0x4028
+0x51C5 = 0x5159
+0x51C6 = 0x3D5A
+0x51C9 = 0x515A
+0x51CB = 0x437C
+0x51CC = 0x4E3F
+0x51CD = 0x4560
+0x51D6 = 0x5245
+0x51DB = 0x515B
+0x51DC = 0x7425
+0x51DD = 0x3645
+0x51E0 = 0x515C
+0x51E1 = 0x4B5E
+0x51E6 = 0x3D68
+0x51E7 = 0x427C
+0x51E9 = 0x515E
+0x51EA = 0x4664
+0x51ED = 0x515F
+0x51F0 = 0x5160
+0x51F1 = 0x332E
+0x51F5 = 0x5161
+0x51F6 = 0x3627
+0x51F8 = 0x464C
+0x51F9 = 0x317A
+0x51FA = 0x3D50
+0x51FD = 0x4821
+0x51FE = 0x5162
+0x5200 = 0x4561
+0x5203 = 0x3F4F
+0x5204 = 0x5163
+0x5206 = 0x4A2C
+0x5207 = 0x405A
+0x5208 = 0x3422
+0x520A = 0x3429
+0x520B = 0x5164
+0x520E = 0x5166
+0x5211 = 0x373A
+0x5214 = 0x5165
+0x5217 = 0x4E73
+0x521D = 0x3D69
+0x5224 = 0x483D
+0x5225 = 0x4A4C
+0x5227 = 0x5167
+0x5229 = 0x4D78
+0x522A = 0x5168
+0x522E = 0x5169
+0x5230 = 0x457E
+0x5233 = 0x516A
+0x5236 = 0x4029
+0x5237 = 0x3A7E
+0x5238 = 0x3774
+0x5239 = 0x516B
+0x523A = 0x3B49
+0x523B = 0x396F
+0x5243 = 0x4466
+0x5244 = 0x516D
+0x5247 = 0x4227
+0x524A = 0x3A6F
+0x524B = 0x516E
+0x524C = 0x516F
+0x524D = 0x4130
+0x524F = 0x516C
+0x5254 = 0x5171
+0x5256 = 0x4B36
+0x525B = 0x3964
+0x525E = 0x5170
+0x5263 = 0x3775
+0x5264 = 0x3A5E
+0x5265 = 0x476D
+0x5269 = 0x5174
+0x526A = 0x5172
+0x526F = 0x497B
+0x5270 = 0x3E6A
+0x5271 = 0x517B
+0x5272 = 0x3364
+0x5273 = 0x5175
+0x5274 = 0x5173
+0x5275 = 0x414F
+0x527D = 0x5177
+0x527F = 0x5176
+0x5283 = 0x3344
+0x5287 = 0x3760
+0x5288 = 0x517C
+0x5289 = 0x4E2D
+0x528D = 0x5178
+0x5291 = 0x517D
+0x5292 = 0x517A
+0x5294 = 0x5179
+0x529B = 0x4E4F
+0x529F = 0x3879
+0x52A0 = 0x3243
+0x52A3 = 0x4E74
+0x52A9 = 0x3D75
+0x52AA = 0x4558
+0x52AB = 0x3965
+0x52AC = 0x5222
+0x52AD = 0x5223
+0x52B1 = 0x4E65
+0x52B4 = 0x4F2B
+0x52B5 = 0x5225
+0x52B9 = 0x387A
+0x52BC = 0x5224
+0x52BE = 0x332F
+0x52C1 = 0x5226
+0x52C3 = 0x4B56
+0x52C5 = 0x443C
+0x52C7 = 0x4D26
+0x52C9 = 0x4A59
+0x52CD = 0x5227
+0x52D2 = 0x7055
+0x52D5 = 0x4630
+0x52D7 = 0x5228
+0x52D8 = 0x342A
+0x52D9 = 0x4C33
+0x52DD = 0x3E21
+0x52DE = 0x5229
+0x52DF = 0x4A67
+0x52E0 = 0x522D
+0x52E2 = 0x402A
+0x52E3 = 0x522A
+0x52E4 = 0x3650
+0x52E6 = 0x522B
+0x52E7 = 0x342B
+0x52F2 = 0x372E
+0x52F3 = 0x522E
+0x52F5 = 0x522F
+0x52F8 = 0x5230
+0x52F9 = 0x5231
+0x52FA = 0x3C5B
+0x52FE = 0x387B
+0x52FF = 0x4C5E
+0x5301 = 0x4C68
+0x5302 = 0x4677
+0x5305 = 0x4A71
+0x5306 = 0x5232
+0x5308 = 0x5233
+0x530D = 0x5235
+0x530F = 0x5237
+0x5310 = 0x5236
+0x5315 = 0x5238
+0x5316 = 0x323D
+0x5317 = 0x4B4C
+0x5319 = 0x3A7C
+0x531A = 0x5239
+0x531D = 0x4159
+0x5320 = 0x3E22
+0x5321 = 0x3629
+0x5323 = 0x523A
+0x532A = 0x485B
+0x532F = 0x523B
+0x5331 = 0x523C
+0x5333 = 0x523D
+0x5338 = 0x523E
+0x5339 = 0x4924
+0x533A = 0x3668
+0x533B = 0x3065
+0x533F = 0x463F
+0x5340 = 0x523F
+0x5341 = 0x3D3D
+0x5343 = 0x4069
+0x5345 = 0x5241
+0x5346 = 0x5240
+0x5347 = 0x3E23
+0x5348 = 0x3861
+0x5349 = 0x5243
+0x534A = 0x483E
+0x534D = 0x5244
+0x5351 = 0x485C
+0x5352 = 0x4234
+0x5353 = 0x426E
+0x5354 = 0x3628
+0x5357 = 0x466E
+0x5358 = 0x4331
+0x535A = 0x476E
+0x535C = 0x4B4E
+0x535E = 0x5246
+0x5360 = 0x406A
+0x5366 = 0x3735
+0x5369 = 0x5247
+0x536E = 0x5248
+0x536F = 0x312C
+0x5370 = 0x3075
+0x5371 = 0x346D
+0x5373 = 0x4228
+0x5374 = 0x3551
+0x5375 = 0x4D71
+0x5377 = 0x524B
+0x5378 = 0x3237
+0x537B = 0x524A
+0x537F = 0x362A
+0x5382 = 0x524C
+0x5384 = 0x4C71
+0x5396 = 0x524D
+0x5398 = 0x4E52
+0x539A = 0x387C
+0x539F = 0x3836
+0x53A0 = 0x524E
+0x53A5 = 0x5250
+0x53A6 = 0x524F
+0x53A8 = 0x3F5F
+0x53A9 = 0x3139
+0x53AD = 0x315E
+0x53AE = 0x5251
+0x53B0 = 0x5252
+0x53B3 = 0x3837
+0x53B6 = 0x5253
+0x53BB = 0x356E
+0x53C2 = 0x3B32
+0x53C3 = 0x5254
+0x53C8 = 0x4B74
+0x53C9 = 0x3A35
+0x53CA = 0x355A
+0x53CB = 0x4D27
+0x53CC = 0x4150
+0x53CD = 0x483F
+0x53CE = 0x3C7D
+0x53D4 = 0x3D47
+0x53D6 = 0x3C68
+0x53D7 = 0x3C75
+0x53D9 = 0x3D76
+0x53DB = 0x4840
+0x53DF = 0x5257
+0x53E1 = 0x3143
+0x53E2 = 0x4151
+0x53E3 = 0x387D
+0x53E4 = 0x3845
+0x53E5 = 0x3667
+0x53E8 = 0x525B
+0x53E9 = 0x4321
+0x53EA = 0x427E
+0x53EB = 0x362B
+0x53EC = 0x3E24
+0x53ED = 0x525C
+0x53EE = 0x525A
+0x53EF = 0x3244
+0x53F0 = 0x4266
+0x53F1 = 0x3C38
+0x53F2 = 0x3B4B
+0x53F3 = 0x3126
+0x53F6 = 0x3370
+0x53F7 = 0x3966
+0x53F8 = 0x3B4A
+0x53FA = 0x525D
+0x5401 = 0x525E
+0x5403 = 0x3549
+0x5404 = 0x3346
+0x5408 = 0x3967
+0x5409 = 0x3548
+0x540A = 0x445F
+0x540B = 0x3125
+0x540C = 0x4631
+0x540D = 0x4C3E
+0x540E = 0x3921
+0x540F = 0x4D79
+0x5410 = 0x4547
+0x5411 = 0x387E
+0x541B = 0x372F
+0x541D = 0x5267
+0x541F = 0x3663
+0x5420 = 0x4B4A
+0x5426 = 0x485D
+0x5429 = 0x5266
+0x542B = 0x345E
+0x542C = 0x5261
+0x542D = 0x5262
+0x542E = 0x5264
+0x5436 = 0x5265
+0x5438 = 0x355B
+0x5439 = 0x3F61
+0x543B = 0x4A2D
+0x543C = 0x5263
+0x543D = 0x525F
+0x543E = 0x3863
+0x5440 = 0x5260
+0x5442 = 0x4F24
+0x5446 = 0x4A72
+0x5448 = 0x4468
+0x5449 = 0x3862
+0x544A = 0x3970
+0x544E = 0x5268
+0x5451 = 0x465D
+0x545F = 0x526C
+0x5468 = 0x3C7E
+0x546A = 0x3C76
+0x5470 = 0x526F
+0x5471 = 0x526D
+0x5473 = 0x4C23
+0x5475 = 0x526A
+0x5476 = 0x5273
+0x5477 = 0x526E
+0x547B = 0x5271
+0x547C = 0x3846
+0x547D = 0x4C3F
+0x5480 = 0x5272
+0x5484 = 0x5274
+0x5486 = 0x5276
+0x548B = 0x3A70
+0x548C = 0x4F42
+0x548E = 0x526B
+0x548F = 0x5269
+0x5490 = 0x5275
+0x5492 = 0x5270
+0x54A2 = 0x5278
+0x54A4 = 0x5323
+0x54A5 = 0x527A
+0x54A8 = 0x527E
+0x54AB = 0x5321
+0x54AC = 0x527B
+0x54AF = 0x533E
+0x54B2 = 0x3A69
+0x54B3 = 0x3331
+0x54B8 = 0x5279
+0x54BC = 0x5325
+0x54BD = 0x3076
+0x54BE = 0x5324
+0x54C0 = 0x3025
+0x54C1 = 0x494A
+0x54C2 = 0x5322
+0x54C4 = 0x527C
+0x54C7 = 0x5277
+0x54C8 = 0x527D
+0x54C9 = 0x3A48
+0x54D8 = 0x5326
+0x54E1 = 0x3077
+0x54E2 = 0x532F
+0x54E5 = 0x5327
+0x54E6 = 0x5328
+0x54E8 = 0x3E25
+0x54E9 = 0x4B69
+0x54ED = 0x532D
+0x54EE = 0x532C
+0x54F2 = 0x452F
+0x54FA = 0x532E
+0x54FD = 0x532B
+0x5504 = 0x3134
+0x5506 = 0x3A36
+0x5507 = 0x3F30
+0x550F = 0x5329
+0x5510 = 0x4562
+0x5514 = 0x532A
+0x5516 = 0x3022
+0x552E = 0x5334
+0x552F = 0x4D23
+0x5531 = 0x3E27
+0x5533 = 0x533A
+0x5538 = 0x5339
+0x5539 = 0x5330
+0x553E = 0x4243
+0x5540 = 0x5331
+0x5544 = 0x426F
+0x5545 = 0x5336
+0x5546 = 0x3E26
+0x554C = 0x5333
+0x554F = 0x4C64
+0x5553 = 0x373C
+0x5556 = 0x5337
+0x5557 = 0x5338
+0x555C = 0x5335
+0x555D = 0x533B
+0x5563 = 0x5332
+0x557B = 0x5341
+0x557C = 0x5346
+0x557E = 0x5342
+0x5580 = 0x533D
+0x5583 = 0x5347
+0x5584 = 0x4131
+0x5587 = 0x5349
+0x5589 = 0x3922
+0x558A = 0x533F
+0x558B = 0x437D
+0x5598 = 0x5343
+0x5599 = 0x533C
+0x559A = 0x342D
+0x559C = 0x346E
+0x559D = 0x3365
+0x559E = 0x5344
+0x559F = 0x5340
+0x55A7 = 0x3776
+0x55A8 = 0x534A
+0x55A9 = 0x5348
+0x55AA = 0x4153
+0x55AB = 0x354A
+0x55AC = 0x362C
+0x55AE = 0x5345
+0x55B0 = 0x3674
+0x55B6 = 0x3144
+0x55C4 = 0x534E
+0x55C5 = 0x534C
+0x55C7 = 0x5427
+0x55D4 = 0x5351
+0x55DA = 0x534B
+0x55DC = 0x534F
+0x55DF = 0x534D
+0x55E3 = 0x3B4C
+0x55E4 = 0x5350
+0x55F7 = 0x5353
+0x55F9 = 0x5358
+0x55FD = 0x5356
+0x55FE = 0x5355
+0x5606 = 0x4332
+0x5609 = 0x3245
+0x5614 = 0x5352
+0x5616 = 0x5354
+0x5617 = 0x3E28
+0x5618 = 0x3133
+0x561B = 0x5357
+0x5629 = 0x325E
+0x562F = 0x5362
+0x5631 = 0x3E7C
+0x5632 = 0x535E
+0x5634 = 0x535C
+0x5636 = 0x535D
+0x5638 = 0x535F
+0x5642 = 0x313D
+0x564C = 0x4139
+0x564E = 0x5359
+0x5650 = 0x535A
+0x565B = 0x337A
+0x5664 = 0x5361
+0x5668 = 0x346F
+0x566A = 0x5364
+0x566B = 0x5360
+0x566C = 0x5363
+0x5674 = 0x4A2E
+0x5678 = 0x4655
+0x567A = 0x4838
+0x5680 = 0x5366
+0x5686 = 0x5365
+0x5687 = 0x3345
+0x568A = 0x5367
+0x568F = 0x536A
+0x5694 = 0x5369
+0x56A0 = 0x5368
+0x56A2 = 0x4739
+0x56A5 = 0x536B
+0x56AE = 0x536C
+0x56B4 = 0x536E
+0x56B6 = 0x536D
+0x56BC = 0x5370
+0x56C0 = 0x5373
+0x56C1 = 0x5371
+0x56C2 = 0x536F
+0x56C3 = 0x5372
+0x56C8 = 0x5374
+0x56CE = 0x5375
+0x56D1 = 0x5376
+0x56D3 = 0x5377
+0x56D7 = 0x5378
+0x56D8 = 0x5145
+0x56DA = 0x3C7C
+0x56DB = 0x3B4D
+0x56DE = 0x3273
+0x56E0 = 0x3078
+0x56E3 = 0x4344
+0x56EE = 0x5379
+0x56F0 = 0x3A24
+0x56F2 = 0x304F
+0x56F3 = 0x3F5E
+0x56F9 = 0x537A
+0x56FA = 0x3847
+0x56FD = 0x3971
+0x56FF = 0x537C
+0x5700 = 0x537B
+0x5703 = 0x4A60
+0x5704 = 0x537D
+0x5708 = 0x5421
+0x5709 = 0x537E
+0x570B = 0x5422
+0x570D = 0x5423
+0x570F = 0x3777
+0x5712 = 0x3160
+0x5713 = 0x5424
+0x5716 = 0x5426
+0x5718 = 0x5425
+0x571C = 0x5428
+0x571F = 0x455A
+0x5726 = 0x5429
+0x5727 = 0x3035
+0x5728 = 0x3A5F
+0x572D = 0x373D
+0x5730 = 0x434F
+0x5737 = 0x542A
+0x5738 = 0x542B
+0x573B = 0x542D
+0x5740 = 0x542E
+0x5742 = 0x3A64
+0x5747 = 0x3651
+0x574A = 0x4B37
+0x574E = 0x542C
+0x574F = 0x542F
+0x5750 = 0x3A41
+0x5751 = 0x3923
+0x5761 = 0x5433
+0x5764 = 0x3A25
+0x5766 = 0x4333
+0x5769 = 0x5430
+0x576A = 0x445A
+0x577F = 0x5434
+0x5782 = 0x3F62
+0x5788 = 0x5432
+0x5789 = 0x5435
+0x578B = 0x373F
+0x5793 = 0x5436
+0x57A0 = 0x5437
+0x57A2 = 0x3924
+0x57A3 = 0x3340
+0x57A4 = 0x5439
+0x57AA = 0x543A
+0x57B0 = 0x543B
+0x57B3 = 0x5438
+0x57C0 = 0x5431
+0x57C3 = 0x543C
+0x57C6 = 0x543D
+0x57CB = 0x4B64
+0x57CE = 0x3E6B
+0x57D2 = 0x543F
+0x57D3 = 0x5440
+0x57D4 = 0x543E
+0x57D6 = 0x5442
+0x57DC = 0x4738
+0x57DF = 0x3068
+0x57E0 = 0x4956
+0x57E3 = 0x5443
+0x57F4 = 0x3E7D
+0x57F7 = 0x3C39
+0x57F9 = 0x475D
+0x57FA = 0x3470
+0x57FC = 0x3A6B
+0x5800 = 0x4B59
+0x5802 = 0x4632
+0x5805 = 0x3778
+0x5806 = 0x424F
+0x580A = 0x5441
+0x580B = 0x5444
+0x5815 = 0x4244
+0x5819 = 0x5445
+0x581D = 0x5446
+0x5821 = 0x5448
+0x5824 = 0x4469
+0x582A = 0x342E
+0x582F = 0x7421
+0x5830 = 0x3161
+0x5831 = 0x4A73
+0x5834 = 0x3E6C
+0x5835 = 0x4548
+0x583A = 0x3A66
+0x583D = 0x544E
+0x5840 = 0x4A3D
+0x5841 = 0x4E5D
+0x584A = 0x3274
+0x584B = 0x544A
+0x5851 = 0x413A
+0x5852 = 0x544D
+0x5854 = 0x4563
+0x5857 = 0x4549
+0x5858 = 0x4564
+0x5859 = 0x4839
+0x585A = 0x444D
+0x585E = 0x3A49
+0x5862 = 0x5449
+0x5869 = 0x3176
+0x586B = 0x4536
+0x5870 = 0x544B
+0x5872 = 0x5447
+0x5875 = 0x3F50
+0x5879 = 0x544F
+0x587E = 0x3D4E
+0x5883 = 0x362D
+0x5885 = 0x5450
+0x5893 = 0x4A68
+0x5897 = 0x417D
+0x589C = 0x4446
+0x589F = 0x5452
+0x58A8 = 0x4B4F
+0x58AB = 0x5453
+0x58AE = 0x5458
+0x58B3 = 0x4A2F
+0x58B8 = 0x5457
+0x58B9 = 0x5451
+0x58BA = 0x5454
+0x58BB = 0x5456
+0x58BE = 0x3A26
+0x58C1 = 0x4A49
+0x58C5 = 0x5459
+0x58C7 = 0x4345
+0x58CA = 0x3275
+0x58CC = 0x3E6D
+0x58D1 = 0x545B
+0x58D3 = 0x545A
+0x58D5 = 0x3968
+0x58D7 = 0x545C
+0x58D8 = 0x545E
+0x58D9 = 0x545D
+0x58DC = 0x5460
+0x58DE = 0x5455
+0x58DF = 0x5462
+0x58E4 = 0x5461
+0x58E5 = 0x545F
+0x58EB = 0x3B4E
+0x58EC = 0x3F51
+0x58EE = 0x4154
+0x58EF = 0x5463
+0x58F0 = 0x403C
+0x58F1 = 0x306D
+0x58F2 = 0x4764
+0x58F7 = 0x445B
+0x58F9 = 0x5465
+0x58FA = 0x5464
+0x58FB = 0x5466
+0x58FC = 0x5467
+0x58FD = 0x5468
+0x5902 = 0x5469
+0x5909 = 0x4A51
+0x590A = 0x546A
+0x590F = 0x3246
+0x5910 = 0x546B
+0x5915 = 0x4D3C
+0x5916 = 0x3330
+0x5918 = 0x5249
+0x5919 = 0x3D48
+0x591A = 0x423F
+0x591B = 0x546C
+0x591C = 0x4C6B
+0x5922 = 0x4C34
+0x5925 = 0x546E
+0x5927 = 0x4267
+0x5929 = 0x4537
+0x592A = 0x4240
+0x592B = 0x4957
+0x592C = 0x546F
+0x592D = 0x5470
+0x592E = 0x317B
+0x5931 = 0x3C3A
+0x5932 = 0x5471
+0x5937 = 0x3050
+0x5938 = 0x5472
+0x593E = 0x5473
+0x5944 = 0x3162
+0x5947 = 0x3471
+0x5948 = 0x4660
+0x5949 = 0x4A74
+0x594E = 0x5477
+0x594F = 0x4155
+0x5950 = 0x5476
+0x5951 = 0x3740
+0x5954 = 0x4B5B
+0x5955 = 0x5475
+0x5957 = 0x4565
+0x5958 = 0x5479
+0x595A = 0x5478
+0x5960 = 0x547B
+0x5962 = 0x547A
+0x5965 = 0x317C
+0x5967 = 0x547C
+0x5968 = 0x3E29
+0x5969 = 0x547E
+0x596A = 0x4325
+0x596C = 0x547D
+0x596E = 0x4A33
+0x5973 = 0x3D77
+0x5974 = 0x455B
+0x5978 = 0x5521
+0x597D = 0x3925
+0x5981 = 0x5522
+0x5982 = 0x4721
+0x5983 = 0x485E
+0x5984 = 0x4C51
+0x598A = 0x4725
+0x598D = 0x552B
+0x5993 = 0x3538
+0x5996 = 0x4D45
+0x5999 = 0x4C2F
+0x599B = 0x562C
+0x599D = 0x5523
+0x59A3 = 0x5526
+0x59A5 = 0x4245
+0x59A8 = 0x4B38
+0x59AC = 0x454A
+0x59B2 = 0x5527
+0x59B9 = 0x4B65
+0x59BB = 0x3A4A
+0x59BE = 0x3E2A
+0x59C6 = 0x5528
+0x59C9 = 0x3B50
+0x59CB = 0x3B4F
+0x59D0 = 0x3039
+0x59D1 = 0x3848
+0x59D3 = 0x402B
+0x59D4 = 0x3051
+0x59D9 = 0x552C
+0x59DA = 0x552D
+0x59DC = 0x552A
+0x59E5 = 0x3138
+0x59E6 = 0x342F
+0x59E8 = 0x5529
+0x59EA = 0x4C45
+0x59EB = 0x4931
+0x59F6 = 0x3028
+0x59FB = 0x3079
+0x59FF = 0x3B51
+0x5A01 = 0x3052
+0x5A03 = 0x3023
+0x5A09 = 0x5532
+0x5A11 = 0x5530
+0x5A18 = 0x4C3C
+0x5A1A = 0x5533
+0x5A1C = 0x5531
+0x5A1F = 0x552F
+0x5A20 = 0x3F31
+0x5A25 = 0x552E
+0x5A29 = 0x4A5A
+0x5A2F = 0x3864
+0x5A35 = 0x5537
+0x5A36 = 0x5538
+0x5A3C = 0x3E2B
+0x5A40 = 0x5534
+0x5A41 = 0x4F2C
+0x5A46 = 0x474C
+0x5A49 = 0x5536
+0x5A5A = 0x3A27
+0x5A62 = 0x5539
+0x5A66 = 0x4958
+0x5A6A = 0x553A
+0x5A6C = 0x5535
+0x5A7F = 0x4C3B
+0x5A92 = 0x475E
+0x5A9A = 0x553B
+0x5A9B = 0x4932
+0x5ABC = 0x553C
+0x5ABD = 0x5540
+0x5ABE = 0x553D
+0x5AC1 = 0x3247
+0x5AC2 = 0x553F
+0x5AC9 = 0x3C3B
+0x5ACB = 0x553E
+0x5ACC = 0x3779
+0x5AD0 = 0x554C
+0x5AD6 = 0x5545
+0x5AD7 = 0x5542
+0x5AE1 = 0x4364
+0x5AE3 = 0x5541
+0x5AE6 = 0x5543
+0x5AE9 = 0x5544
+0x5AFA = 0x5546
+0x5AFB = 0x5547
+0x5B09 = 0x3472
+0x5B0B = 0x5549
+0x5B0C = 0x5548
+0x5B16 = 0x554A
+0x5B22 = 0x3E6E
+0x5B2A = 0x554D
+0x5B2C = 0x445C
+0x5B30 = 0x3145
+0x5B32 = 0x554B
+0x5B36 = 0x554E
+0x5B3E = 0x554F
+0x5B40 = 0x5552
+0x5B43 = 0x5550
+0x5B45 = 0x5551
+0x5B50 = 0x3B52
+0x5B51 = 0x5553
+0x5B54 = 0x3926
+0x5B55 = 0x5554
+0x5B57 = 0x3B7A
+0x5B58 = 0x4238
+0x5B5A = 0x5555
+0x5B5B = 0x5556
+0x5B5C = 0x3B5A
+0x5B5D = 0x3927
+0x5B5F = 0x4C52
+0x5B63 = 0x3528
+0x5B64 = 0x3849
+0x5B65 = 0x5557
+0x5B66 = 0x3358
+0x5B69 = 0x5558
+0x5B6B = 0x4239
+0x5B70 = 0x5559
+0x5B71 = 0x5623
+0x5B73 = 0x555A
+0x5B75 = 0x555B
+0x5B78 = 0x555C
+0x5B7A = 0x555E
+0x5B80 = 0x555F
+0x5B83 = 0x5560
+0x5B85 = 0x4270
+0x5B87 = 0x3127
+0x5B88 = 0x3C69
+0x5B89 = 0x3042
+0x5B8B = 0x4157
+0x5B8C = 0x3430
+0x5B8D = 0x3C35
+0x5B8F = 0x3928
+0x5B95 = 0x4566
+0x5B97 = 0x3D21
+0x5B98 = 0x3431
+0x5B99 = 0x4368
+0x5B9A = 0x446A
+0x5B9B = 0x3038
+0x5B9C = 0x3539
+0x5B9D = 0x4A75
+0x5B9F = 0x3C42
+0x5BA2 = 0x3552
+0x5BA3 = 0x406B
+0x5BA4 = 0x3C3C
+0x5BA5 = 0x4D28
+0x5BA6 = 0x5561
+0x5BAE = 0x355C
+0x5BB0 = 0x3A4B
+0x5BB3 = 0x3332
+0x5BB4 = 0x3163
+0x5BB5 = 0x3E2C
+0x5BB6 = 0x3248
+0x5BB8 = 0x5562
+0x5BB9 = 0x4D46
+0x5BBF = 0x3D49
+0x5BC2 = 0x3C64
+0x5BC3 = 0x5563
+0x5BC4 = 0x3473
+0x5BC5 = 0x4652
+0x5BC6 = 0x4C29
+0x5BC7 = 0x5564
+0x5BC9 = 0x5565
+0x5BCC = 0x4959
+0x5BD0 = 0x5567
+0x5BD2 = 0x3428
+0x5BD3 = 0x3677
+0x5BD4 = 0x5566
+0x5BDB = 0x3432
+0x5BDD = 0x3F32
+0x5BDE = 0x556B
+0x5BDF = 0x3B21
+0x5BE1 = 0x3249
+0x5BE2 = 0x556A
+0x5BE4 = 0x5568
+0x5BE5 = 0x556C
+0x5BE6 = 0x5569
+0x5BE7 = 0x472B
+0x5BE8 = 0x5C4D
+0x5BE9 = 0x3F33
+0x5BEB = 0x556D
+0x5BEE = 0x4E40
+0x5BF0 = 0x556E
+0x5BF3 = 0x5570
+0x5BF5 = 0x437E
+0x5BF6 = 0x556F
+0x5BF8 = 0x4023
+0x5BFA = 0x3B7B
+0x5BFE = 0x4250
+0x5BFF = 0x3C77
+0x5C01 = 0x4975
+0x5C02 = 0x406C
+0x5C04 = 0x3C4D
+0x5C05 = 0x5571
+0x5C06 = 0x3E2D
+0x5C07 = 0x5572
+0x5C08 = 0x5573
+0x5C09 = 0x3053
+0x5C0A = 0x423A
+0x5C0B = 0x3F52
+0x5C0D = 0x5574
+0x5C0E = 0x4633
+0x5C0F = 0x3E2E
+0x5C11 = 0x3E2F
+0x5C13 = 0x5575
+0x5C16 = 0x406D
+0x5C1A = 0x3E30
+0x5C20 = 0x5576
+0x5C22 = 0x5577
+0x5C24 = 0x4C60
+0x5C28 = 0x5578
+0x5C2D = 0x3646
+0x5C31 = 0x3D22
+0x5C38 = 0x5579
+0x5C39 = 0x557A
+0x5C3A = 0x3C5C
+0x5C3B = 0x3F2C
+0x5C3C = 0x4674
+0x5C3D = 0x3F54
+0x5C3E = 0x4878
+0x5C3F = 0x4722
+0x5C40 = 0x3649
+0x5C41 = 0x557B
+0x5C45 = 0x356F
+0x5C46 = 0x557C
+0x5C48 = 0x367E
+0x5C4A = 0x464F
+0x5C4B = 0x3230
+0x5C4D = 0x3B53
+0x5C4E = 0x557D
+0x5C4F = 0x5622
+0x5C50 = 0x5621
+0x5C51 = 0x367D
+0x5C53 = 0x557E
+0x5C55 = 0x4538
+0x5C5E = 0x4230
+0x5C60 = 0x454B
+0x5C61 = 0x3C48
+0x5C64 = 0x4158
+0x5C65 = 0x4D7A
+0x5C6C = 0x5624
+0x5C6E = 0x5625
+0x5C6F = 0x4656
+0x5C71 = 0x3B33
+0x5C76 = 0x5627
+0x5C79 = 0x5628
+0x5C8C = 0x5629
+0x5C90 = 0x3474
+0x5C91 = 0x562A
+0x5C94 = 0x562B
+0x5CA1 = 0x322C
+0x5CA8 = 0x413B
+0x5CA9 = 0x3464
+0x5CAB = 0x562D
+0x5CAC = 0x4C28
+0x5CB1 = 0x4252
+0x5CB3 = 0x3359
+0x5CB6 = 0x562F
+0x5CB7 = 0x5631
+0x5CB8 = 0x345F
+0x5CBB = 0x562E
+0x5CBC = 0x5630
+0x5CBE = 0x5633
+0x5CC5 = 0x5632
+0x5CC7 = 0x5634
+0x5CD9 = 0x5635
+0x5CE0 = 0x463D
+0x5CE1 = 0x362E
+0x5CE8 = 0x3265
+0x5CE9 = 0x5636
+0x5CEA = 0x563B
+0x5CED = 0x5639
+0x5CEF = 0x4A77
+0x5CF0 = 0x4A76
+0x5CF6 = 0x4567
+0x5CFA = 0x5638
+0x5CFB = 0x3D54
+0x5CFD = 0x5637
+0x5D07 = 0x3F72
+0x5D0B = 0x563C
+0x5D0E = 0x3A6A
+0x5D11 = 0x5642
+0x5D14 = 0x5643
+0x5D15 = 0x563D
+0x5D16 = 0x3333
+0x5D17 = 0x563E
+0x5D18 = 0x5647
+0x5D19 = 0x5646
+0x5D1A = 0x5645
+0x5D1B = 0x5641
+0x5D1F = 0x5640
+0x5D22 = 0x5644
+0x5D29 = 0x4A78
+0x5D4B = 0x564B
+0x5D4C = 0x5648
+0x5D4E = 0x564A
+0x5D50 = 0x4D72
+0x5D52 = 0x5649
+0x5D5C = 0x563F
+0x5D69 = 0x3F73
+0x5D6C = 0x564C
+0x5D6F = 0x3A37
+0x5D73 = 0x564D
+0x5D76 = 0x564E
+0x5D82 = 0x5651
+0x5D84 = 0x5650
+0x5D87 = 0x564F
+0x5D8B = 0x4568
+0x5D8C = 0x563A
+0x5D90 = 0x5657
+0x5D9D = 0x5653
+0x5DA2 = 0x5652
+0x5DAC = 0x5654
+0x5DAE = 0x5655
+0x5DB7 = 0x5658
+0x5DBA = 0x4E66
+0x5DBC = 0x5659
+0x5DBD = 0x5656
+0x5DC9 = 0x565A
+0x5DCC = 0x3460
+0x5DCD = 0x565B
+0x5DD2 = 0x565D
+0x5DD3 = 0x565C
+0x5DD6 = 0x565E
+0x5DDB = 0x565F
+0x5DDD = 0x406E
+0x5DDE = 0x3D23
+0x5DE1 = 0x3D64
+0x5DE3 = 0x4163
+0x5DE5 = 0x3929
+0x5DE6 = 0x3A38
+0x5DE7 = 0x392A
+0x5DE8 = 0x3570
+0x5DEB = 0x5660
+0x5DEE = 0x3A39
+0x5DF1 = 0x384A
+0x5DF2 = 0x5661
+0x5DF3 = 0x4C26
+0x5DF4 = 0x4743
+0x5DF5 = 0x5662
+0x5DF7 = 0x392B
+0x5DFB = 0x342C
+0x5DFD = 0x4327
+0x5DFE = 0x3652
+0x5E02 = 0x3B54
+0x5E03 = 0x495B
+0x5E06 = 0x4841
+0x5E0B = 0x5663
+0x5E0C = 0x3475
+0x5E11 = 0x5666
+0x5E16 = 0x4421
+0x5E19 = 0x5665
+0x5E1A = 0x5664
+0x5E1B = 0x5667
+0x5E1D = 0x446B
+0x5E25 = 0x3F63
+0x5E2B = 0x3B55
+0x5E2D = 0x404A
+0x5E2F = 0x4253
+0x5E30 = 0x3522
+0x5E33 = 0x4422
+0x5E36 = 0x5668
+0x5E37 = 0x5669
+0x5E38 = 0x3E6F
+0x5E3D = 0x4B39
+0x5E40 = 0x566C
+0x5E43 = 0x566B
+0x5E44 = 0x566A
+0x5E45 = 0x497D
+0x5E47 = 0x5673
+0x5E4C = 0x4B5A
+0x5E4E = 0x566D
+0x5E54 = 0x566F
+0x5E55 = 0x4B6B
+0x5E57 = 0x566E
+0x5E5F = 0x5670
+0x5E61 = 0x4828
+0x5E62 = 0x5671
+0x5E63 = 0x4A3E
+0x5E64 = 0x5672
+0x5E72 = 0x3433
+0x5E73 = 0x4A3F
+0x5E74 = 0x472F
+0x5E75 = 0x5674
+0x5E76 = 0x5675
+0x5E78 = 0x392C
+0x5E79 = 0x3434
+0x5E7A = 0x5676
+0x5E7B = 0x3838
+0x5E7C = 0x4D44
+0x5E7D = 0x4D29
+0x5E7E = 0x3476
+0x5E7F = 0x5678
+0x5E81 = 0x4423
+0x5E83 = 0x392D
+0x5E84 = 0x3E31
+0x5E87 = 0x485F
+0x5E8A = 0x3E32
+0x5E8F = 0x3D78
+0x5E95 = 0x446C
+0x5E96 = 0x4A79
+0x5E97 = 0x4539
+0x5E9A = 0x392E
+0x5E9C = 0x495C
+0x5EA0 = 0x5679
+0x5EA6 = 0x4559
+0x5EA7 = 0x3A42
+0x5EAB = 0x384B
+0x5EAD = 0x446D
+0x5EB5 = 0x3043
+0x5EB6 = 0x3D6E
+0x5EB7 = 0x392F
+0x5EB8 = 0x4D47
+0x5EC1 = 0x567A
+0x5EC2 = 0x567B
+0x5EC3 = 0x4751
+0x5EC8 = 0x567C
+0x5EC9 = 0x4E77
+0x5ECA = 0x4F2D
+0x5ECF = 0x567E
+0x5ED0 = 0x567D
+0x5ED3 = 0x3347
+0x5ED6 = 0x5721
+0x5EDA = 0x5724
+0x5EDB = 0x5725
+0x5EDD = 0x5723
+0x5EDF = 0x4940
+0x5EE0 = 0x3E33
+0x5EE1 = 0x5727
+0x5EE2 = 0x5726
+0x5EE3 = 0x5722
+0x5EE8 = 0x5728
+0x5EE9 = 0x5729
+0x5EEC = 0x572A
+0x5EF0 = 0x572D
+0x5EF1 = 0x572B
+0x5EF3 = 0x572C
+0x5EF4 = 0x572E
+0x5EF6 = 0x3164
+0x5EF7 = 0x446E
+0x5EF8 = 0x572F
+0x5EFA = 0x377A
+0x5EFB = 0x3276
+0x5EFC = 0x4736
+0x5EFE = 0x5730
+0x5EFF = 0x467B
+0x5F01 = 0x4A5B
+0x5F03 = 0x5731
+0x5F04 = 0x4F2E
+0x5F09 = 0x5732
+0x5F0A = 0x4A40
+0x5F0B = 0x5735
+0x5F0C = 0x5021
+0x5F0D = 0x5031
+0x5F0F = 0x3C30
+0x5F10 = 0x4675
+0x5F11 = 0x5736
+0x5F13 = 0x355D
+0x5F14 = 0x4424
+0x5F15 = 0x307A
+0x5F16 = 0x5737
+0x5F17 = 0x4A26
+0x5F18 = 0x3930
+0x5F1B = 0x4350
+0x5F1F = 0x446F
+0x5F25 = 0x4C6F
+0x5F26 = 0x3839
+0x5F27 = 0x384C
+0x5F29 = 0x5738
+0x5F2D = 0x5739
+0x5F2F = 0x573F
+0x5F31 = 0x3C65
+0x5F35 = 0x4425
+0x5F37 = 0x362F
+0x5F38 = 0x573A
+0x5F3C = 0x492B
+0x5F3E = 0x4346
+0x5F41 = 0x573B
+0x5F48 = 0x573C
+0x5F4A = 0x3630
+0x5F4C = 0x573D
+0x5F4E = 0x573E
+0x5F51 = 0x5740
+0x5F53 = 0x4576
+0x5F56 = 0x5741
+0x5F57 = 0x5742
+0x5F59 = 0x5743
+0x5F5C = 0x5734
+0x5F5D = 0x5733
+0x5F61 = 0x5744
+0x5F62 = 0x3741
+0x5F66 = 0x4927
+0x5F69 = 0x3A4C
+0x5F6A = 0x4937
+0x5F6B = 0x4426
+0x5F6C = 0x494B
+0x5F6D = 0x5745
+0x5F70 = 0x3E34
+0x5F71 = 0x3146
+0x5F73 = 0x5746
+0x5F77 = 0x5747
+0x5F79 = 0x4C72
+0x5F7C = 0x4860
+0x5F7F = 0x574A
+0x5F80 = 0x317D
+0x5F81 = 0x402C
+0x5F82 = 0x5749
+0x5F83 = 0x5748
+0x5F84 = 0x3742
+0x5F85 = 0x4254
+0x5F87 = 0x574E
+0x5F88 = 0x574C
+0x5F8A = 0x574B
+0x5F8B = 0x4E27
+0x5F8C = 0x3865
+0x5F90 = 0x3D79
+0x5F91 = 0x574D
+0x5F92 = 0x454C
+0x5F93 = 0x3D3E
+0x5F97 = 0x4640
+0x5F98 = 0x5751
+0x5F99 = 0x5750
+0x5F9E = 0x574F
+0x5FA0 = 0x5752
+0x5FA1 = 0x3866
+0x5FA8 = 0x5753
+0x5FA9 = 0x497C
+0x5FAA = 0x3D5B
+0x5FAD = 0x5754
+0x5FAE = 0x4879
+0x5FB3 = 0x4641
+0x5FB4 = 0x4427
+0x5FB9 = 0x4530
+0x5FBC = 0x5755
+0x5FBD = 0x352B
+0x5FC3 = 0x3F34
+0x5FC5 = 0x492C
+0x5FCC = 0x3477
+0x5FCD = 0x4726
+0x5FD6 = 0x5756
+0x5FD7 = 0x3B56
+0x5FD8 = 0x4B3A
+0x5FD9 = 0x4B3B
+0x5FDC = 0x317E
+0x5FDD = 0x575B
+0x5FE0 = 0x4369
+0x5FE4 = 0x5758
+0x5FEB = 0x3277
+0x5FF0 = 0x582D
+0x5FF1 = 0x575A
+0x5FF5 = 0x4730
+0x5FF8 = 0x5759
+0x5FFB = 0x5757
+0x5FFD = 0x397A
+0x5FFF = 0x575D
+0x600E = 0x5763
+0x600F = 0x5769
+0x6010 = 0x5761
+0x6012 = 0x455C
+0x6015 = 0x5766
+0x6016 = 0x495D
+0x6019 = 0x5760
+0x601B = 0x5765
+0x601C = 0x4E67
+0x601D = 0x3B57
+0x6020 = 0x4255
+0x6021 = 0x575E
+0x6025 = 0x355E
+0x6026 = 0x5768
+0x6027 = 0x402D
+0x6028 = 0x3165
+0x6029 = 0x5762
+0x602A = 0x3278
+0x602B = 0x5767
+0x602F = 0x3631
+0x6031 = 0x5764
+0x603A = 0x576A
+0x6041 = 0x576C
+0x6042 = 0x5776
+0x6043 = 0x5774
+0x6046 = 0x5771
+0x604A = 0x5770
+0x604B = 0x4E78
+0x604D = 0x5772
+0x6050 = 0x3632
+0x6052 = 0x3931
+0x6055 = 0x3D7A
+0x6059 = 0x5779
+0x605A = 0x576B
+0x605F = 0x576F
+0x6060 = 0x575F
+0x6062 = 0x327A
+0x6063 = 0x5773
+0x6064 = 0x5775
+0x6065 = 0x4351
+0x6068 = 0x3A28
+0x6069 = 0x3238
+0x606A = 0x576D
+0x606B = 0x5778
+0x606C = 0x5777
+0x606D = 0x3633
+0x606F = 0x4229
+0x6070 = 0x3366
+0x6075 = 0x3743
+0x6077 = 0x576E
+0x6081 = 0x577A
+0x6083 = 0x577D
+0x6084 = 0x5821
+0x6089 = 0x3C3D
+0x608B = 0x5827
+0x608C = 0x4470
+0x608D = 0x577B
+0x6092 = 0x5825
+0x6094 = 0x3279
+0x6096 = 0x5823
+0x6097 = 0x5824
+0x609A = 0x577E
+0x609B = 0x5822
+0x609F = 0x3867
+0x60A0 = 0x4D2A
+0x60A3 = 0x3435
+0x60A6 = 0x3159
+0x60A7 = 0x5826
+0x60A9 = 0x473A
+0x60AA = 0x302D
+0x60B2 = 0x4861
+0x60B3 = 0x575C
+0x60B4 = 0x582C
+0x60B5 = 0x5830
+0x60B6 = 0x4C65
+0x60B8 = 0x5829
+0x60BC = 0x4569
+0x60BD = 0x582E
+0x60C5 = 0x3E70
+0x60C6 = 0x582F
+0x60C7 = 0x4657
+0x60D1 = 0x4F47
+0x60D3 = 0x582B
+0x60D8 = 0x5831
+0x60DA = 0x397B
+0x60DC = 0x404B
+0x60DF = 0x3054
+0x60E0 = 0x582A
+0x60E1 = 0x5828
+0x60E3 = 0x415A
+0x60E7 = 0x577C
+0x60E8 = 0x3B34
+0x60F0 = 0x4246
+0x60F1 = 0x583D
+0x60F3 = 0x415B
+0x60F4 = 0x5838
+0x60F6 = 0x5835
+0x60F7 = 0x5836
+0x60F9 = 0x3C66
+0x60FA = 0x5839
+0x60FB = 0x583C
+0x6100 = 0x5837
+0x6101 = 0x3D25
+0x6103 = 0x583A
+0x6106 = 0x5834
+0x6108 = 0x4C7C
+0x6109 = 0x4C7B
+0x610D = 0x583E
+0x610E = 0x583F
+0x610F = 0x3055
+0x6115 = 0x5833
+0x611A = 0x3672
+0x611B = 0x3026
+0x611F = 0x3436
+0x6121 = 0x583B
+0x6127 = 0x5843
+0x6128 = 0x5842
+0x612C = 0x5847
+0x6134 = 0x5848
+0x613C = 0x5846
+0x613D = 0x5849
+0x613E = 0x5841
+0x613F = 0x5845
+0x6142 = 0x584A
+0x6144 = 0x584B
+0x6147 = 0x5840
+0x6148 = 0x3B7C
+0x614A = 0x5844
+0x614B = 0x4256
+0x614C = 0x3932
+0x614D = 0x5832
+0x614E = 0x3F35
+0x6153 = 0x5858
+0x6155 = 0x4A69
+0x6158 = 0x584E
+0x6159 = 0x584F
+0x615A = 0x5850
+0x615D = 0x5857
+0x615F = 0x5856
+0x6162 = 0x4B7D
+0x6163 = 0x3437
+0x6165 = 0x5854
+0x6167 = 0x3745
+0x6168 = 0x3334
+0x616B = 0x5851
+0x616E = 0x4E38
+0x616F = 0x5853
+0x6170 = 0x3056
+0x6171 = 0x5855
+0x6173 = 0x584C
+0x6174 = 0x5852
+0x6175 = 0x5859
+0x6176 = 0x3744
+0x6177 = 0x584D
+0x617E = 0x4D5D
+0x6182 = 0x4D2B
+0x6187 = 0x585C
+0x618A = 0x5860
+0x618E = 0x417E
+0x6190 = 0x4E79
+0x6191 = 0x5861
+0x6194 = 0x585E
+0x6196 = 0x585B
+0x6199 = 0x585A
+0x619A = 0x585F
+0x61A4 = 0x4A30
+0x61A7 = 0x4634
+0x61A9 = 0x3746
+0x61AB = 0x5862
+0x61AC = 0x585D
+0x61AE = 0x5863
+0x61B2 = 0x377B
+0x61B6 = 0x3231
+0x61BA = 0x586B
+0x61BE = 0x3438
+0x61C3 = 0x5869
+0x61C6 = 0x586A
+0x61C7 = 0x3A29
+0x61C8 = 0x5868
+0x61C9 = 0x5866
+0x61CA = 0x5865
+0x61CB = 0x586C
+0x61CC = 0x5864
+0x61CD = 0x586E
+0x61D0 = 0x327B
+0x61E3 = 0x5870
+0x61E6 = 0x586F
+0x61F2 = 0x4428
+0x61F4 = 0x5873
+0x61F6 = 0x5871
+0x61F7 = 0x5867
+0x61F8 = 0x377C
+0x61FA = 0x5872
+0x61FC = 0x5876
+0x61FD = 0x5875
+0x61FE = 0x5877
+0x61FF = 0x5874
+0x6200 = 0x5878
+0x6208 = 0x5879
+0x6209 = 0x587A
+0x620A = 0x4A6A
+0x620C = 0x587C
+0x620D = 0x587B
+0x620E = 0x3D3F
+0x6210 = 0x402E
+0x6211 = 0x3266
+0x6212 = 0x327C
+0x6214 = 0x587D
+0x6216 = 0x303F
+0x621A = 0x404C
+0x621B = 0x587E
+0x621D = 0x6C43
+0x621E = 0x5921
+0x621F = 0x3761
+0x6221 = 0x5922
+0x6226 = 0x406F
+0x622A = 0x5923
+0x622E = 0x5924
+0x622F = 0x353A
+0x6230 = 0x5925
+0x6232 = 0x5926
+0x6233 = 0x5927
+0x6234 = 0x4257
+0x6238 = 0x384D
+0x623B = 0x4C61
+0x623F = 0x4B3C
+0x6240 = 0x3D6A
+0x6241 = 0x5928
+0x6247 = 0x4070
+0x6248 = 0x6E3D
+0x6249 = 0x4862
+0x624B = 0x3C6A
+0x624D = 0x3A4D
+0x624E = 0x5929
+0x6253 = 0x4247
+0x6255 = 0x4A27
+0x6258 = 0x4271
+0x625B = 0x592C
+0x625E = 0x592A
+0x6260 = 0x592D
+0x6263 = 0x592B
+0x6268 = 0x592E
+0x626E = 0x4A31
+0x6271 = 0x3037
+0x6276 = 0x495E
+0x6279 = 0x4863
+0x627C = 0x592F
+0x627E = 0x5932
+0x627F = 0x3E35
+0x6280 = 0x353B
+0x6282 = 0x5930
+0x6283 = 0x5937
+0x6284 = 0x3E36
+0x6289 = 0x5931
+0x628A = 0x4744
+0x6291 = 0x4D5E
+0x6292 = 0x5933
+0x6293 = 0x5934
+0x6294 = 0x5938
+0x6295 = 0x456A
+0x6296 = 0x5935
+0x6297 = 0x3933
+0x6298 = 0x405E
+0x629B = 0x5946
+0x629C = 0x4834
+0x629E = 0x4272
+0x62AB = 0x4864
+0x62AC = 0x5A2D
+0x62B1 = 0x4A7A
+0x62B5 = 0x4471
+0x62B9 = 0x4B75
+0x62BB = 0x593B
+0x62BC = 0x3221
+0x62BD = 0x436A
+0x62C2 = 0x5944
+0x62C5 = 0x4334
+0x62C6 = 0x593E
+0x62C7 = 0x5945
+0x62C8 = 0x5940
+0x62C9 = 0x5947
+0x62CA = 0x5943
+0x62CC = 0x5942
+0x62CD = 0x476F
+0x62CF = 0x593C
+0x62D0 = 0x327D
+0x62D1 = 0x593A
+0x62D2 = 0x3571
+0x62D3 = 0x4273
+0x62D4 = 0x5936
+0x62D7 = 0x5939
+0x62D8 = 0x3934
+0x62D9 = 0x405B
+0x62DB = 0x3E37
+0x62DC = 0x5941
+0x62DD = 0x4752
+0x62E0 = 0x3572
+0x62E1 = 0x3348
+0x62EC = 0x3367
+0x62ED = 0x3F21
+0x62EE = 0x5949
+0x62EF = 0x594E
+0x62F1 = 0x594A
+0x62F3 = 0x377D
+0x62F5 = 0x594F
+0x62F6 = 0x3B22
+0x62F7 = 0x3969
+0x62FE = 0x3D26
+0x62FF = 0x593D
+0x6301 = 0x3B7D
+0x6302 = 0x594C
+0x6307 = 0x3B58
+0x6308 = 0x594D
+0x6309 = 0x3044
+0x630C = 0x5948
+0x6311 = 0x4429
+0x6319 = 0x3573
+0x631F = 0x3634
+0x6327 = 0x594B
+0x6328 = 0x3027
+0x632B = 0x3A43
+0x632F = 0x3F36
+0x633A = 0x4472
+0x633D = 0x4854
+0x633E = 0x5951
+0x633F = 0x415E
+0x6349 = 0x422A
+0x634C = 0x3B2B
+0x634D = 0x5952
+0x634F = 0x5954
+0x6350 = 0x5950
+0x6355 = 0x4A61
+0x6357 = 0x443D
+0x635C = 0x415C
+0x6367 = 0x4A7B
+0x6368 = 0x3C4E
+0x6369 = 0x5960
+0x636B = 0x595F
+0x636E = 0x3F78
+0x6372 = 0x377E
+0x6376 = 0x5959
+0x6377 = 0x3E39
+0x637A = 0x4668
+0x637B = 0x4731
+0x6380 = 0x5957
+0x6383 = 0x415D
+0x6388 = 0x3C78
+0x6389 = 0x595C
+0x638C = 0x3E38
+0x638E = 0x5956
+0x638F = 0x595B
+0x6392 = 0x4753
+0x6396 = 0x5955
+0x6398 = 0x3721
+0x639B = 0x335D
+0x639F = 0x595D
+0x63A0 = 0x4E2B
+0x63A1 = 0x3A4E
+0x63A2 = 0x4335
+0x63A3 = 0x595A
+0x63A5 = 0x405C
+0x63A7 = 0x3935
+0x63A8 = 0x3F64
+0x63A9 = 0x3166
+0x63AA = 0x413C
+0x63AB = 0x5958
+0x63AC = 0x3545
+0x63B2 = 0x3747
+0x63B4 = 0x444F
+0x63B5 = 0x595E
+0x63BB = 0x415F
+0x63BE = 0x5961
+0x63C0 = 0x5963
+0x63C3 = 0x4237
+0x63C4 = 0x5969
+0x63C6 = 0x5964
+0x63C9 = 0x5966
+0x63CF = 0x4941
+0x63D0 = 0x4473
+0x63D2 = 0x5967
+0x63D6 = 0x4D2C
+0x63DA = 0x4D48
+0x63DB = 0x3439
+0x63E1 = 0x302E
+0x63E3 = 0x5965
+0x63E9 = 0x5962
+0x63EE = 0x3478
+0x63F4 = 0x3167
+0x63F6 = 0x5968
+0x63FA = 0x4D49
+0x6406 = 0x596C
+0x640D = 0x423B
+0x640F = 0x5973
+0x6413 = 0x596D
+0x6416 = 0x596A
+0x6417 = 0x5971
+0x641C = 0x5953
+0x6426 = 0x596E
+0x6428 = 0x5972
+0x642C = 0x4842
+0x642D = 0x456B
+0x6434 = 0x596B
+0x6436 = 0x596F
+0x643A = 0x3748
+0x643E = 0x3A71
+0x6442 = 0x405D
+0x644E = 0x5977
+0x6458 = 0x4526
+0x6467 = 0x5974
+0x6469 = 0x4B60
+0x646F = 0x5975
+0x6476 = 0x5976
+0x6478 = 0x4C4E
+0x647A = 0x4022
+0x6483 = 0x3762
+0x6488 = 0x597D
+0x6492 = 0x3B35
+0x6493 = 0x597A
+0x6495 = 0x5979
+0x649A = 0x4732
+0x649E = 0x4635
+0x64A4 = 0x4531
+0x64A5 = 0x597B
+0x64A9 = 0x597C
+0x64AB = 0x496F
+0x64AD = 0x4745
+0x64AE = 0x3B23
+0x64B0 = 0x4071
+0x64B2 = 0x4B50
+0x64B9 = 0x3349
+0x64BB = 0x5A25
+0x64BC = 0x597E
+0x64C1 = 0x4D4A
+0x64C2 = 0x5A27
+0x64C5 = 0x5A23
+0x64C7 = 0x5A24
+0x64CD = 0x4160
+0x64D2 = 0x5A22
+0x64D4 = 0x593F
+0x64D8 = 0x5A26
+0x64DA = 0x5A21
+0x64E0 = 0x5A2B
+0x64E1 = 0x5A2C
+0x64E2 = 0x4527
+0x64E3 = 0x5A2E
+0x64E6 = 0x3B24
+0x64E7 = 0x5A29
+0x64EC = 0x353C
+0x64EF = 0x5A2F
+0x64F1 = 0x5A28
+0x64F2 = 0x5A33
+0x64F4 = 0x5A32
+0x64F6 = 0x5A31
+0x64FA = 0x5A34
+0x64FD = 0x5A36
+0x64FE = 0x3E71
+0x6500 = 0x5A35
+0x6505 = 0x5A39
+0x6518 = 0x5A37
+0x651C = 0x5A38
+0x651D = 0x5970
+0x6523 = 0x5A3B
+0x6524 = 0x5A3A
+0x652A = 0x5978
+0x652B = 0x5A3C
+0x652C = 0x5A30
+0x652F = 0x3B59
+0x6534 = 0x5A3D
+0x6535 = 0x5A3E
+0x6536 = 0x5A40
+0x6537 = 0x5A3F
+0x6538 = 0x5A41
+0x6539 = 0x327E
+0x653B = 0x3936
+0x653E = 0x4A7C
+0x653F = 0x402F
+0x6545 = 0x384E
+0x6548 = 0x5A43
+0x654D = 0x5A46
+0x654F = 0x4952
+0x6551 = 0x355F
+0x6555 = 0x5A45
+0x6556 = 0x5A44
+0x6557 = 0x4754
+0x6558 = 0x5A47
+0x6559 = 0x3635
+0x655D = 0x5A49
+0x655E = 0x5A48
+0x6562 = 0x343A
+0x6563 = 0x3B36
+0x6566 = 0x4658
+0x656C = 0x3749
+0x6570 = 0x3F74
+0x6572 = 0x5A4A
+0x6574 = 0x4030
+0x6575 = 0x4528
+0x6577 = 0x495F
+0x6578 = 0x5A4B
+0x6582 = 0x5A4C
+0x6583 = 0x5A4D
+0x6587 = 0x4A38
+0x6588 = 0x555D
+0x6589 = 0x4046
+0x658C = 0x494C
+0x658E = 0x3A58
+0x6590 = 0x4865
+0x6591 = 0x4843
+0x6597 = 0x454D
+0x6599 = 0x4E41
+0x659B = 0x5A4F
+0x659C = 0x3C50
+0x659F = 0x5A50
+0x65A1 = 0x3036
+0x65A4 = 0x3654
+0x65A5 = 0x404D
+0x65A7 = 0x4960
+0x65AB = 0x5A51
+0x65AC = 0x3B42
+0x65AD = 0x4347
+0x65AF = 0x3B5B
+0x65B0 = 0x3F37
+0x65B7 = 0x5A52
+0x65B9 = 0x4A7D
+0x65BC = 0x3177
+0x65BD = 0x3B5C
+0x65C1 = 0x5A55
+0x65C3 = 0x5A53
+0x65C4 = 0x5A56
+0x65C5 = 0x4E39
+0x65C6 = 0x5A54
+0x65CB = 0x407B
+0x65CC = 0x5A57
+0x65CF = 0x4232
+0x65D2 = 0x5A58
+0x65D7 = 0x347A
+0x65D9 = 0x5A5A
+0x65DB = 0x5A59
+0x65E0 = 0x5A5B
+0x65E1 = 0x5A5C
+0x65E2 = 0x347B
+0x65E5 = 0x467C
+0x65E6 = 0x4336
+0x65E7 = 0x356C
+0x65E8 = 0x3B5D
+0x65E9 = 0x4161
+0x65EC = 0x3D5C
+0x65ED = 0x3030
+0x65F1 = 0x5A5D
+0x65FA = 0x3222
+0x65FB = 0x5A61
+0x6602 = 0x3937
+0x6603 = 0x5A60
+0x6606 = 0x3A2B
+0x6607 = 0x3E3A
+0x660A = 0x5A5F
+0x660C = 0x3E3B
+0x660E = 0x4C40
+0x660F = 0x3A2A
+0x6613 = 0x3057
+0x6614 = 0x404E
+0x661C = 0x5A66
+0x661F = 0x4031
+0x6620 = 0x3147
+0x6625 = 0x3D55
+0x6627 = 0x4B66
+0x6628 = 0x3A72
+0x662D = 0x3E3C
+0x662F = 0x4027
+0x6634 = 0x5A65
+0x6635 = 0x5A63
+0x6636 = 0x5A64
+0x663C = 0x436B
+0x663F = 0x5B26
+0x6641 = 0x5A6A
+0x6642 = 0x3B7E
+0x6643 = 0x3938
+0x6644 = 0x5A68
+0x6649 = 0x5A69
+0x664B = 0x3F38
+0x664F = 0x5A67
+0x6652 = 0x3B2F
+0x665D = 0x5A6C
+0x665E = 0x5A6B
+0x665F = 0x5A70
+0x6662 = 0x5A71
+0x6664 = 0x5A6D
+0x6666 = 0x3322
+0x6667 = 0x5A6E
+0x6668 = 0x5A6F
+0x6669 = 0x4855
+0x666E = 0x4961
+0x666F = 0x374A
+0x6670 = 0x5A72
+0x6674 = 0x4032
+0x6676 = 0x3E3D
+0x667A = 0x4352
+0x6681 = 0x3647
+0x6683 = 0x5A73
+0x6684 = 0x5A77
+0x6687 = 0x324B
+0x6688 = 0x5A74
+0x6689 = 0x5A76
+0x668E = 0x5A75
+0x6691 = 0x3D6B
+0x6696 = 0x4348
+0x6697 = 0x3045
+0x6698 = 0x5A78
+0x669D = 0x5A79
+0x66A2 = 0x442A
+0x66A6 = 0x4E71
+0x66AB = 0x3B43
+0x66AE = 0x4A6B
+0x66B4 = 0x4B3D
+0x66B8 = 0x5B22
+0x66B9 = 0x5A7B
+0x66BC = 0x5A7E
+0x66BE = 0x5A7D
+0x66C1 = 0x5A7A
+0x66C4 = 0x5B21
+0x66C7 = 0x465E
+0x66C9 = 0x5A7C
+0x66D6 = 0x5B23
+0x66D9 = 0x3D6C
+0x66DA = 0x5B24
+0x66DC = 0x4D4B
+0x66DD = 0x4778
+0x66E0 = 0x5B25
+0x66E6 = 0x5B27
+0x66E9 = 0x5B28
+0x66F0 = 0x5B29
+0x66F2 = 0x364A
+0x66F3 = 0x3148
+0x66F4 = 0x3939
+0x66F5 = 0x5B2A
+0x66F7 = 0x5B2B
+0x66F8 = 0x3D71
+0x66F9 = 0x4162
+0x66FC = 0x5258
+0x66FD = 0x413E
+0x66FE = 0x413D
+0x66FF = 0x4258
+0x6700 = 0x3A47
+0x6703 = 0x5072
+0x6708 = 0x376E
+0x6709 = 0x4D2D
+0x670B = 0x4A7E
+0x670D = 0x497E
+0x670F = 0x5B2C
+0x6714 = 0x3A73
+0x6715 = 0x443F
+0x6716 = 0x5B2D
+0x6717 = 0x4F2F
+0x671B = 0x4B3E
+0x671D = 0x442B
+0x671E = 0x5B2E
+0x671F = 0x347C
+0x6726 = 0x5B2F
+0x6727 = 0x5B30
+0x6728 = 0x4C5A
+0x672A = 0x4C24
+0x672B = 0x4B76
+0x672C = 0x4B5C
+0x672D = 0x3B25
+0x672E = 0x5B32
+0x6731 = 0x3C6B
+0x6734 = 0x4B51
+0x6736 = 0x5B34
+0x6737 = 0x5B37
+0x6738 = 0x5B36
+0x673A = 0x3479
+0x673D = 0x3560
+0x673F = 0x5B33
+0x6741 = 0x5B35
+0x6746 = 0x5B38
+0x6749 = 0x3F79
+0x674E = 0x4D7B
+0x674F = 0x3049
+0x6750 = 0x3A60
+0x6751 = 0x423C
+0x6753 = 0x3C5D
+0x6756 = 0x3E73
+0x6759 = 0x5B3B
+0x675C = 0x454E
+0x675E = 0x5B39
+0x675F = 0x422B
+0x6760 = 0x5B3A
+0x6761 = 0x3E72
+0x6762 = 0x4C5D
+0x6763 = 0x5B3C
+0x6764 = 0x5B3D
+0x6765 = 0x4D68
+0x676A = 0x5B42
+0x676D = 0x393A
+0x676F = 0x4755
+0x6770 = 0x5B3F
+0x6771 = 0x456C
+0x6772 = 0x5A5E
+0x6773 = 0x5A62
+0x6775 = 0x354F
+0x6777 = 0x4747
+0x677C = 0x5B41
+0x677E = 0x3E3E
+0x677F = 0x4844
+0x6785 = 0x5B47
+0x6787 = 0x487A
+0x6789 = 0x5B3E
+0x678B = 0x5B44
+0x678C = 0x5B43
+0x6790 = 0x404F
+0x6795 = 0x4B6D
+0x6797 = 0x4E53
+0x679A = 0x4B67
+0x679C = 0x324C
+0x679D = 0x3B5E
+0x67A0 = 0x4F48
+0x67A1 = 0x5B46
+0x67A2 = 0x3F75
+0x67A6 = 0x5B45
+0x67A9 = 0x5B40
+0x67AF = 0x384F
+0x67B3 = 0x5B4C
+0x67B4 = 0x5B4A
+0x67B6 = 0x324D
+0x67B7 = 0x5B48
+0x67B8 = 0x5B4E
+0x67B9 = 0x5B54
+0x67C1 = 0x4248
+0x67C4 = 0x4A41
+0x67C6 = 0x5B56
+0x67CA = 0x4922
+0x67CE = 0x5B55
+0x67CF = 0x4770
+0x67D0 = 0x4B3F
+0x67D1 = 0x343B
+0x67D3 = 0x4077
+0x67D4 = 0x3D40
+0x67D8 = 0x4453
+0x67DA = 0x4D2E
+0x67DD = 0x5B51
+0x67DE = 0x5B50
+0x67E2 = 0x5B52
+0x67E4 = 0x5B4F
+0x67E7 = 0x5B57
+0x67E9 = 0x5B4D
+0x67EC = 0x5B4B
+0x67EE = 0x5B53
+0x67EF = 0x5B49
+0x67F1 = 0x436C
+0x67F3 = 0x4C78
+0x67F4 = 0x3C46
+0x67F5 = 0x3A74
+0x67FB = 0x3A3A
+0x67FE = 0x4B6F
+0x67FF = 0x3341
+0x6802 = 0x444E
+0x6803 = 0x464A
+0x6804 = 0x3149
+0x6813 = 0x4072
+0x6816 = 0x4034
+0x6817 = 0x372A
+0x681E = 0x5B59
+0x6821 = 0x393B
+0x6822 = 0x337C
+0x6829 = 0x5B5B
+0x682A = 0x3374
+0x682B = 0x5B61
+0x6832 = 0x5B5E
+0x6834 = 0x4073
+0x6838 = 0x334B
+0x6839 = 0x3A2C
+0x683C = 0x334A
+0x683D = 0x3A4F
+0x6840 = 0x5B5C
+0x6841 = 0x3765
+0x6842 = 0x374B
+0x6843 = 0x456D
+0x6846 = 0x5B5A
+0x6848 = 0x3046
+0x684D = 0x5B5D
+0x684E = 0x5B5F
+0x6850 = 0x364D
+0x6851 = 0x372C
+0x6853 = 0x343C
+0x6854 = 0x354B
+0x6859 = 0x5B62
+0x685C = 0x3A79
+0x685D = 0x4B71
+0x685F = 0x3B37
+0x6863 = 0x5B63
+0x6867 = 0x4930
+0x6874 = 0x5B6F
+0x6876 = 0x3233
+0x6877 = 0x5B64
+0x687E = 0x5B75
+0x687F = 0x5B65
+0x6881 = 0x4E42
+0x6883 = 0x5B6C
+0x6885 = 0x475F
+0x688D = 0x5B74
+0x688F = 0x5B67
+0x6893 = 0x3034
+0x6894 = 0x5B69
+0x6897 = 0x393C
+0x689B = 0x5B6B
+0x689D = 0x5B6A
+0x689F = 0x5B66
+0x68A0 = 0x5B71
+0x68A2 = 0x3E3F
+0x68A6 = 0x546D
+0x68A7 = 0x3868
+0x68A8 = 0x4D7C
+0x68AD = 0x5B68
+0x68AF = 0x4474
+0x68B0 = 0x3323
+0x68B1 = 0x3A2D
+0x68B3 = 0x5B60
+0x68B5 = 0x5B70
+0x68B6 = 0x3361
+0x68B9 = 0x5B6E
+0x68BA = 0x5B72
+0x68BC = 0x456E
+0x68C4 = 0x347E
+0x68C6 = 0x5C32
+0x68C9 = 0x4C49
+0x68CA = 0x5B77
+0x68CB = 0x347D
+0x68CD = 0x5B7E
+0x68D2 = 0x4B40
+0x68D4 = 0x5C21
+0x68D5 = 0x5C23
+0x68D7 = 0x5C27
+0x68D8 = 0x5B79
+0x68DA = 0x432A
+0x68DF = 0x456F
+0x68E0 = 0x5C2B
+0x68E1 = 0x5B7C
+0x68E3 = 0x5C28
+0x68E7 = 0x5C22
+0x68EE = 0x3F39
+0x68EF = 0x5C2C
+0x68F2 = 0x4033
+0x68F9 = 0x5C2A
+0x68FA = 0x343D
+0x6900 = 0x4F50
+0x6901 = 0x5B76
+0x6904 = 0x5C26
+0x6905 = 0x3058
+0x6908 = 0x5B78
+0x690B = 0x4C3A
+0x690C = 0x5B7D
+0x690D = 0x3F22
+0x690E = 0x4447
+0x690F = 0x5B73
+0x6912 = 0x5C25
+0x6919 = 0x3F7A
+0x691A = 0x5C2F
+0x691B = 0x3371
+0x691C = 0x3821
+0x6921 = 0x5C31
+0x6922 = 0x5B7A
+0x6923 = 0x5C30
+0x6925 = 0x5C29
+0x6926 = 0x5B7B
+0x6928 = 0x5C2D
+0x692A = 0x5C2E
+0x6930 = 0x5C3F
+0x6934 = 0x464E
+0x6936 = 0x5C24
+0x6939 = 0x5C3B
+0x693D = 0x5C3D
+0x693F = 0x4458
+0x694A = 0x4D4C
+0x6953 = 0x4976
+0x6954 = 0x5C38
+0x6955 = 0x424A
+0x6959 = 0x5C3E
+0x695A = 0x413F
+0x695C = 0x5C35
+0x695D = 0x5C42
+0x695E = 0x5C41
+0x6960 = 0x466F
+0x6961 = 0x5C40
+0x6962 = 0x466A
+0x696A = 0x5C44
+0x696B = 0x5C37
+0x696D = 0x3648
+0x696E = 0x5C3A
+0x696F = 0x3D5D
+0x6973 = 0x4760
+0x6974 = 0x5C3C
+0x6975 = 0x364B
+0x6977 = 0x5C34
+0x6978 = 0x5C36
+0x6979 = 0x5C33
+0x697C = 0x4F30
+0x697D = 0x335A
+0x697E = 0x5C39
+0x6981 = 0x5C43
+0x6982 = 0x3335
+0x698A = 0x3A67
+0x698E = 0x315D
+0x6991 = 0x5C54
+0x6994 = 0x4F31
+0x6995 = 0x5C57
+0x699B = 0x3F3A
+0x699C = 0x5C56
+0x69A0 = 0x5C55
+0x69A7 = 0x5C52
+0x69AE = 0x5C46
+0x69B1 = 0x5C63
+0x69B2 = 0x5C45
+0x69B4 = 0x5C58
+0x69BB = 0x5C50
+0x69BE = 0x5C4B
+0x69BF = 0x5C48
+0x69C1 = 0x5C49
+0x69C3 = 0x5C51
+0x69C7 = 0x7422
+0x69CA = 0x5C4E
+0x69CB = 0x393D
+0x69CC = 0x4448
+0x69CD = 0x4164
+0x69CE = 0x5C4C
+0x69D0 = 0x5C47
+0x69D3 = 0x5C4A
+0x69D8 = 0x4D4D
+0x69D9 = 0x4B6A
+0x69DD = 0x5C4F
+0x69DE = 0x5C59
+0x69E7 = 0x5C61
+0x69E8 = 0x5C5A
+0x69EB = 0x5C67
+0x69ED = 0x5C65
+0x69F2 = 0x5C60
+0x69F9 = 0x5C5F
+0x69FB = 0x4450
+0x69FD = 0x4165
+0x69FF = 0x5C5D
+0x6A02 = 0x5C5B
+0x6A05 = 0x5C62
+0x6A0A = 0x5C68
+0x6A0B = 0x4875
+0x6A0C = 0x5C6E
+0x6A12 = 0x5C69
+0x6A13 = 0x5C6C
+0x6A14 = 0x5C66
+0x6A17 = 0x4374
+0x6A19 = 0x4938
+0x6A1B = 0x5C5C
+0x6A1E = 0x5C64
+0x6A1F = 0x3E40
+0x6A21 = 0x4C4F
+0x6A22 = 0x5C78
+0x6A23 = 0x5C6B
+0x6A29 = 0x3822
+0x6A2A = 0x3223
+0x6A2B = 0x335F
+0x6A2E = 0x5C53
+0x6A35 = 0x3E41
+0x6A36 = 0x5C70
+0x6A38 = 0x5C77
+0x6A39 = 0x3C79
+0x6A3A = 0x3372
+0x6A3D = 0x432E
+0x6A44 = 0x5C6D
+0x6A47 = 0x5C72
+0x6A48 = 0x5C76
+0x6A4B = 0x3636
+0x6A58 = 0x354C
+0x6A59 = 0x5C74
+0x6A5F = 0x3521
+0x6A61 = 0x464B
+0x6A62 = 0x5C73
+0x6A66 = 0x5C75
+0x6A72 = 0x5C6F
+0x6A78 = 0x5C71
+0x6A7F = 0x3360
+0x6A80 = 0x4349
+0x6A84 = 0x5C7C
+0x6A8D = 0x5C7A
+0x6A8E = 0x3869
+0x6A90 = 0x5C79
+0x6A97 = 0x5D21
+0x6A9C = 0x5B58
+0x6AA0 = 0x5C7B
+0x6AA2 = 0x5C7D
+0x6AA3 = 0x5C7E
+0x6AAA = 0x5D2C
+0x6AAC = 0x5D28
+0x6AAE = 0x5B6D
+0x6AB3 = 0x5D27
+0x6AB8 = 0x5D26
+0x6ABB = 0x5D23
+0x6AC1 = 0x5C6A
+0x6AC2 = 0x5D25
+0x6AC3 = 0x5D24
+0x6AD1 = 0x5D2A
+0x6AD3 = 0x4F26
+0x6ADA = 0x5D2D
+0x6ADB = 0x367B
+0x6ADE = 0x5D29
+0x6ADF = 0x5D2B
+0x6AE8 = 0x4827
+0x6AEA = 0x5D2E
+0x6AFA = 0x5D32
+0x6AFB = 0x5D2F
+0x6B04 = 0x4D73
+0x6B05 = 0x5D30
+0x6B0A = 0x5C5E
+0x6B12 = 0x5D33
+0x6B16 = 0x5D34
+0x6B1D = 0x3135
+0x6B1F = 0x5D36
+0x6B20 = 0x3767
+0x6B21 = 0x3C21
+0x6B23 = 0x3655
+0x6B27 = 0x3224
+0x6B32 = 0x4D5F
+0x6B37 = 0x5D38
+0x6B38 = 0x5D37
+0x6B39 = 0x5D3A
+0x6B3A = 0x353D
+0x6B3D = 0x3656
+0x6B3E = 0x343E
+0x6B43 = 0x5D3D
+0x6B47 = 0x5D3C
+0x6B49 = 0x5D3E
+0x6B4C = 0x324E
+0x6B4E = 0x4337
+0x6B50 = 0x5D3F
+0x6B53 = 0x343F
+0x6B54 = 0x5D41
+0x6B59 = 0x5D40
+0x6B5B = 0x5D42
+0x6B5F = 0x5D43
+0x6B61 = 0x5D44
+0x6B62 = 0x3B5F
+0x6B63 = 0x4035
+0x6B64 = 0x3A21
+0x6B66 = 0x4970
+0x6B69 = 0x4A62
+0x6B6A = 0x4F44
+0x6B6F = 0x3B75
+0x6B73 = 0x3A50
+0x6B74 = 0x4E72
+0x6B78 = 0x5D45
+0x6B79 = 0x5D46
+0x6B7B = 0x3B60
+0x6B7F = 0x5D47
+0x6B80 = 0x5D48
+0x6B83 = 0x5D4A
+0x6B84 = 0x5D49
+0x6B86 = 0x4B58
+0x6B89 = 0x3D5E
+0x6B8A = 0x3C6C
+0x6B8B = 0x3B44
+0x6B8D = 0x5D4B
+0x6B95 = 0x5D4D
+0x6B96 = 0x3F23
+0x6B98 = 0x5D4C
+0x6B9E = 0x5D4E
+0x6BA4 = 0x5D4F
+0x6BAA = 0x5D50
+0x6BAB = 0x5D51
+0x6BAF = 0x5D52
+0x6BB1 = 0x5D54
+0x6BB2 = 0x5D53
+0x6BB3 = 0x5D55
+0x6BB4 = 0x3225
+0x6BB5 = 0x434A
+0x6BB7 = 0x5D56
+0x6BBA = 0x3B26
+0x6BBB = 0x334C
+0x6BBC = 0x5D57
+0x6BBF = 0x4542
+0x6BC0 = 0x544C
+0x6BC5 = 0x3523
+0x6BC6 = 0x5D58
+0x6BCB = 0x5D59
+0x6BCD = 0x4A6C
+0x6BCE = 0x4B68
+0x6BD2 = 0x4647
+0x6BD3 = 0x5D5A
+0x6BD4 = 0x4866
+0x6BD8 = 0x487B
+0x6BDB = 0x4C53
+0x6BDF = 0x5D5B
+0x6BEB = 0x5D5D
+0x6BEC = 0x5D5C
+0x6BEF = 0x5D5F
+0x6BF3 = 0x5D5E
+0x6C08 = 0x5D61
+0x6C0F = 0x3B61
+0x6C11 = 0x4C31
+0x6C13 = 0x5D62
+0x6C14 = 0x5D63
+0x6C17 = 0x3524
+0x6C1B = 0x5D64
+0x6C23 = 0x5D66
+0x6C24 = 0x5D65
+0x6C34 = 0x3F65
+0x6C37 = 0x4939
+0x6C38 = 0x314A
+0x6C3E = 0x4845
+0x6C40 = 0x4475
+0x6C41 = 0x3D41
+0x6C42 = 0x3561
+0x6C4E = 0x4846
+0x6C50 = 0x3C2E
+0x6C55 = 0x5D68
+0x6C57 = 0x3440
+0x6C5A = 0x3178
+0x6C5D = 0x4672
+0x6C5E = 0x5D67
+0x6C5F = 0x393E
+0x6C60 = 0x4353
+0x6C62 = 0x5D69
+0x6C68 = 0x5D71
+0x6C6A = 0x5D6A
+0x6C70 = 0x4241
+0x6C72 = 0x3562
+0x6C73 = 0x5D72
+0x6C7A = 0x3768
+0x6C7D = 0x3525
+0x6C7E = 0x5D70
+0x6C81 = 0x5D6E
+0x6C82 = 0x5D6B
+0x6C83 = 0x4D60
+0x6C88 = 0x4440
+0x6C8C = 0x4659
+0x6C8D = 0x5D6C
+0x6C90 = 0x5D74
+0x6C92 = 0x5D73
+0x6C93 = 0x3723
+0x6C96 = 0x322D
+0x6C99 = 0x3A3B
+0x6C9A = 0x5D6D
+0x6C9B = 0x5D6F
+0x6CA1 = 0x4B57
+0x6CA2 = 0x4274
+0x6CAB = 0x4B77
+0x6CAE = 0x5D7C
+0x6CB1 = 0x5D7D
+0x6CB3 = 0x324F
+0x6CB8 = 0x4A28
+0x6CB9 = 0x4C7D
+0x6CBA = 0x5E21
+0x6CBB = 0x3C23
+0x6CBC = 0x3E42
+0x6CBD = 0x5D78
+0x6CBE = 0x5D7E
+0x6CBF = 0x3168
+0x6CC1 = 0x3637
+0x6CC4 = 0x5D75
+0x6CC5 = 0x5D7A
+0x6CC9 = 0x4074
+0x6CCA = 0x4771
+0x6CCC = 0x4867
+0x6CD3 = 0x5D77
+0x6CD5 = 0x4B21
+0x6CD7 = 0x5D79
+0x6CD9 = 0x5E24
+0x6CDB = 0x5E22
+0x6CDD = 0x5D7B
+0x6CE1 = 0x4B22
+0x6CE2 = 0x4748
+0x6CE3 = 0x3563
+0x6CE5 = 0x4525
+0x6CE8 = 0x436D
+0x6CEA = 0x5E25
+0x6CEF = 0x5E23
+0x6CF0 = 0x4259
+0x6CF1 = 0x5D76
+0x6CF3 = 0x314B
+0x6D0B = 0x4D4E
+0x6D0C = 0x5E30
+0x6D12 = 0x5E2F
+0x6D17 = 0x4076
+0x6D19 = 0x5E2C
+0x6D1B = 0x4D6C
+0x6D1E = 0x4636
+0x6D1F = 0x5E26
+0x6D25 = 0x4445
+0x6D29 = 0x314C
+0x6D2A = 0x393F
+0x6D2B = 0x5E29
+0x6D32 = 0x3D27
+0x6D33 = 0x5E2E
+0x6D35 = 0x5E2D
+0x6D36 = 0x5E28
+0x6D38 = 0x5E2B
+0x6D3B = 0x3368
+0x6D3D = 0x5E2A
+0x6D3E = 0x4749
+0x6D41 = 0x4E2E
+0x6D44 = 0x3E74
+0x6D45 = 0x4075
+0x6D59 = 0x5E36
+0x6D5A = 0x5E34
+0x6D5C = 0x494D
+0x6D63 = 0x5E31
+0x6D64 = 0x5E33
+0x6D66 = 0x313A
+0x6D69 = 0x3940
+0x6D6A = 0x4F32
+0x6D6C = 0x333D
+0x6D6E = 0x4962
+0x6D74 = 0x4D61
+0x6D77 = 0x3324
+0x6D78 = 0x3F3B
+0x6D79 = 0x5E35
+0x6D85 = 0x5E3A
+0x6D88 = 0x3E43
+0x6D8C = 0x4D30
+0x6D8E = 0x5E37
+0x6D93 = 0x5E32
+0x6D95 = 0x5E38
+0x6D99 = 0x4E5E
+0x6D9B = 0x4573
+0x6D9C = 0x4642
+0x6DAF = 0x3336
+0x6DB2 = 0x3155
+0x6DB5 = 0x5E3E
+0x6DB8 = 0x5E41
+0x6DBC = 0x4E43
+0x6DC0 = 0x4D64
+0x6DC5 = 0x5E48
+0x6DC6 = 0x5E42
+0x6DC7 = 0x5E3F
+0x6DCB = 0x4E54
+0x6DCC = 0x5E45
+0x6DD1 = 0x3D4A
+0x6DD2 = 0x5E47
+0x6DD5 = 0x5E4C
+0x6DD8 = 0x4571
+0x6DD9 = 0x5E4A
+0x6DDE = 0x5E44
+0x6DE1 = 0x4338
+0x6DE4 = 0x5E4B
+0x6DE6 = 0x5E40
+0x6DE8 = 0x5E46
+0x6DEA = 0x5E4D
+0x6DEB = 0x307C
+0x6DEC = 0x5E43
+0x6DEE = 0x5E4E
+0x6DF1 = 0x3F3C
+0x6DF3 = 0x3D5F
+0x6DF5 = 0x4A25
+0x6DF7 = 0x3A2E
+0x6DF9 = 0x5E3B
+0x6DFA = 0x5E49
+0x6DFB = 0x453A
+0x6E05 = 0x4036
+0x6E07 = 0x3369
+0x6E08 = 0x3A51
+0x6E09 = 0x3E44
+0x6E0A = 0x5E3D
+0x6E0B = 0x3D42
+0x6E13 = 0x374C
+0x6E15 = 0x5E3C
+0x6E19 = 0x5E52
+0x6E1A = 0x3D6D
+0x6E1B = 0x383A
+0x6E1D = 0x5E61
+0x6E1F = 0x5E5B
+0x6E20 = 0x3574
+0x6E21 = 0x454F
+0x6E23 = 0x5E56
+0x6E24 = 0x5E5F
+0x6E25 = 0x302F
+0x6E26 = 0x3132
+0x6E29 = 0x3239
+0x6E2B = 0x5E58
+0x6E2C = 0x422C
+0x6E2D = 0x5E4F
+0x6E2E = 0x5E51
+0x6E2F = 0x3941
+0x6E38 = 0x5E62
+0x6E3A = 0x5E5D
+0x6E3E = 0x5E55
+0x6E43 = 0x5E5C
+0x6E4A = 0x4C2B
+0x6E4D = 0x5E5A
+0x6E4E = 0x5E5E
+0x6E56 = 0x3850
+0x6E58 = 0x3E45
+0x6E5B = 0x4339
+0x6E5F = 0x5E54
+0x6E67 = 0x4D2F
+0x6E6B = 0x5E57
+0x6E6E = 0x5E50
+0x6E6F = 0x4572
+0x6E72 = 0x5E53
+0x6E76 = 0x5E59
+0x6E7E = 0x4F51
+0x6E7F = 0x3C3E
+0x6E80 = 0x4B7E
+0x6E82 = 0x5E63
+0x6E8C = 0x482E
+0x6E8F = 0x5E6F
+0x6E90 = 0x383B
+0x6E96 = 0x3D60
+0x6E98 = 0x5E65
+0x6E9C = 0x4E2F
+0x6E9D = 0x3942
+0x6E9F = 0x5E72
+0x6EA2 = 0x306E
+0x6EA5 = 0x5E70
+0x6EAA = 0x5E64
+0x6EAF = 0x5E6A
+0x6EB2 = 0x5E6C
+0x6EB6 = 0x4D4F
+0x6EB7 = 0x5E67
+0x6EBA = 0x452E
+0x6EBD = 0x5E69
+0x6EC2 = 0x5E71
+0x6EC4 = 0x5E6B
+0x6EC5 = 0x4C47
+0x6EC9 = 0x5E66
+0x6ECB = 0x3C22
+0x6ECC = 0x5E7E
+0x6ED1 = 0x336A
+0x6ED3 = 0x5E68
+0x6ED4 = 0x5E6D
+0x6ED5 = 0x5E6E
+0x6EDD = 0x426C
+0x6EDE = 0x425A
+0x6EEC = 0x5E76
+0x6EEF = 0x5E7C
+0x6EF2 = 0x5E7A
+0x6EF4 = 0x4529
+0x6EF7 = 0x5F23
+0x6EF8 = 0x5E77
+0x6EFE = 0x5E78
+0x6EFF = 0x5E60
+0x6F01 = 0x3579
+0x6F02 = 0x493A
+0x6F06 = 0x3C3F
+0x6F09 = 0x3977
+0x6F0F = 0x4F33
+0x6F11 = 0x5E74
+0x6F13 = 0x5F22
+0x6F14 = 0x3169
+0x6F15 = 0x4166
+0x6F20 = 0x4779
+0x6F22 = 0x3441
+0x6F23 = 0x4E7A
+0x6F2B = 0x4C21
+0x6F2C = 0x4452
+0x6F31 = 0x5E7B
+0x6F32 = 0x5E7D
+0x6F38 = 0x4132
+0x6F3E = 0x5F21
+0x6F3F = 0x5E79
+0x6F41 = 0x5E73
+0x6F45 = 0x3443
+0x6F54 = 0x3769
+0x6F58 = 0x5F2F
+0x6F5B = 0x5F2A
+0x6F5C = 0x4078
+0x6F5F = 0x3363
+0x6F64 = 0x3D61
+0x6F66 = 0x5F33
+0x6F6D = 0x5F2C
+0x6F6E = 0x442C
+0x6F6F = 0x5F29
+0x6F70 = 0x4459
+0x6F74 = 0x5F4C
+0x6F78 = 0x5F26
+0x6F7A = 0x5F25
+0x6F7C = 0x5F2E
+0x6F80 = 0x5F28
+0x6F81 = 0x5F27
+0x6F82 = 0x5F2D
+0x6F84 = 0x4021
+0x6F86 = 0x5F24
+0x6F8E = 0x5F30
+0x6F91 = 0x5F31
+0x6F97 = 0x3442
+0x6FA1 = 0x5F36
+0x6FA3 = 0x5F35
+0x6FA4 = 0x5F37
+0x6FAA = 0x5F3A
+0x6FB1 = 0x4543
+0x6FB3 = 0x5F34
+0x6FB9 = 0x5F38
+0x6FC0 = 0x3763
+0x6FC1 = 0x4279
+0x6FC2 = 0x5F32
+0x6FC3 = 0x473B
+0x6FC6 = 0x5F39
+0x6FD4 = 0x5F3E
+0x6FD5 = 0x5F3C
+0x6FD8 = 0x5F3F
+0x6FDB = 0x5F42
+0x6FDF = 0x5F3B
+0x6FE0 = 0x396A
+0x6FE1 = 0x4728
+0x6FE4 = 0x5E39
+0x6FEB = 0x4D74
+0x6FEC = 0x5F3D
+0x6FEE = 0x5F41
+0x6FEF = 0x4275
+0x6FF1 = 0x5F40
+0x6FF3 = 0x5F2B
+0x6FF6 = 0x6F69
+0x6FFA = 0x5F45
+0x6FFE = 0x5F49
+0x7001 = 0x5F47
+0x7009 = 0x5F43
+0x700B = 0x5F44
+0x700F = 0x5F48
+0x7011 = 0x5F46
+0x7015 = 0x494E
+0x7018 = 0x5F4E
+0x701A = 0x5F4B
+0x701B = 0x5F4A
+0x701D = 0x5F4D
+0x701E = 0x4654
+0x701F = 0x5F4F
+0x7026 = 0x4375
+0x7027 = 0x426D
+0x702C = 0x4025
+0x7030 = 0x5F50
+0x7032 = 0x5F52
+0x703E = 0x5F51
+0x704C = 0x5E75
+0x7051 = 0x5F53
+0x7058 = 0x4667
+0x7063 = 0x5F54
+0x706B = 0x3250
+0x706F = 0x4574
+0x7070 = 0x3325
+0x7078 = 0x3564
+0x707C = 0x3C5E
+0x707D = 0x3A52
+0x7089 = 0x4F27
+0x708A = 0x3F66
+0x708E = 0x316A
+0x7092 = 0x5F56
+0x7099 = 0x5F55
+0x70AC = 0x5F59
+0x70AD = 0x433A
+0x70AE = 0x5F5C
+0x70AF = 0x5F57
+0x70B3 = 0x5F5B
+0x70B8 = 0x5F5A
+0x70B9 = 0x4540
+0x70BA = 0x3059
+0x70C8 = 0x4E75
+0x70CB = 0x5F5E
+0x70CF = 0x3128
+0x70D9 = 0x5F60
+0x70DD = 0x5F5F
+0x70DF = 0x5F5D
+0x70F1 = 0x5F58
+0x70F9 = 0x4B23
+0x70FD = 0x5F62
+0x7109 = 0x5F61
+0x7114 = 0x316B
+0x7119 = 0x5F64
+0x711A = 0x4A32
+0x711C = 0x5F63
+0x7121 = 0x4C35
+0x7126 = 0x3E47
+0x7136 = 0x4133
+0x713C = 0x3E46
+0x7149 = 0x4E7B
+0x714C = 0x5F6A
+0x714E = 0x4079
+0x7155 = 0x5F66
+0x7156 = 0x5F6B
+0x7159 = 0x316C
+0x7162 = 0x5F69
+0x7164 = 0x4761
+0x7165 = 0x5F65
+0x7166 = 0x5F68
+0x7167 = 0x3E48
+0x7169 = 0x4851
+0x716C = 0x5F6C
+0x716E = 0x3C51
+0x717D = 0x407A
+0x7184 = 0x5F6F
+0x7188 = 0x5F67
+0x718A = 0x3727
+0x718F = 0x5F6D
+0x7194 = 0x4D50
+0x7195 = 0x5F70
+0x7199 = 0x7426
+0x719F = 0x3D4F
+0x71A8 = 0x5F71
+0x71AC = 0x5F72
+0x71B1 = 0x472E
+0x71B9 = 0x5F74
+0x71BE = 0x5F75
+0x71C3 = 0x4733
+0x71C8 = 0x4575
+0x71C9 = 0x5F77
+0x71CE = 0x5F79
+0x71D0 = 0x4E55
+0x71D2 = 0x5F76
+0x71D4 = 0x5F78
+0x71D5 = 0x316D
+0x71D7 = 0x5F73
+0x71DF = 0x535B
+0x71E0 = 0x5F7A
+0x71E5 = 0x4167
+0x71E6 = 0x3B38
+0x71E7 = 0x5F7C
+0x71EC = 0x5F7B
+0x71ED = 0x3F24
+0x71EE = 0x5259
+0x71F5 = 0x5F7D
+0x71F9 = 0x6021
+0x71FB = 0x5F6E
+0x71FC = 0x5F7E
+0x71FF = 0x6022
+0x7206 = 0x477A
+0x720D = 0x6023
+0x7210 = 0x6024
+0x721B = 0x6025
+0x7228 = 0x6026
+0x722A = 0x445E
+0x722C = 0x6028
+0x722D = 0x6027
+0x7230 = 0x6029
+0x7232 = 0x602A
+0x7235 = 0x3C5F
+0x7236 = 0x4963
+0x723A = 0x4C6C
+0x723B = 0x602B
+0x723C = 0x602C
+0x723D = 0x4156
+0x723E = 0x3C24
+0x723F = 0x602D
+0x7240 = 0x602E
+0x7246 = 0x602F
+0x7247 = 0x4A52
+0x7248 = 0x4847
+0x724B = 0x6030
+0x724C = 0x4757
+0x7252 = 0x442D
+0x7258 = 0x6031
+0x7259 = 0x3267
+0x725B = 0x356D
+0x725D = 0x4C46
+0x725F = 0x4C36
+0x7261 = 0x3234
+0x7262 = 0x4F34
+0x7267 = 0x4B52
+0x7269 = 0x4A2A
+0x7272 = 0x4037
+0x7274 = 0x6032
+0x7279 = 0x4643
+0x727D = 0x3823
+0x727E = 0x6033
+0x7280 = 0x3A54
+0x7281 = 0x6035
+0x7282 = 0x6034
+0x7287 = 0x6036
+0x7292 = 0x6037
+0x7296 = 0x6038
+0x72A0 = 0x353E
+0x72A2 = 0x6039
+0x72A7 = 0x603A
+0x72AC = 0x3824
+0x72AF = 0x4848
+0x72B2 = 0x603C
+0x72B6 = 0x3E75
+0x72B9 = 0x603B
+0x72C2 = 0x3638
+0x72C3 = 0x603D
+0x72C4 = 0x603F
+0x72C6 = 0x603E
+0x72CE = 0x6040
+0x72D0 = 0x3851
+0x72D2 = 0x6041
+0x72D7 = 0x3669
+0x72D9 = 0x4140
+0x72DB = 0x397D
+0x72E0 = 0x6043
+0x72E1 = 0x6044
+0x72E2 = 0x6042
+0x72E9 = 0x3C6D
+0x72EC = 0x4648
+0x72ED = 0x3639
+0x72F7 = 0x6046
+0x72F8 = 0x432C
+0x72F9 = 0x6045
+0x72FC = 0x4F35
+0x72FD = 0x4762
+0x730A = 0x6049
+0x7316 = 0x604B
+0x7317 = 0x6048
+0x731B = 0x4C54
+0x731C = 0x604A
+0x731D = 0x604C
+0x731F = 0x4E44
+0x7325 = 0x6050
+0x7329 = 0x604F
+0x732A = 0x4376
+0x732B = 0x472D
+0x732E = 0x3825
+0x732F = 0x604E
+0x7334 = 0x604D
+0x7336 = 0x4D31
+0x7337 = 0x4D32
+0x733E = 0x6051
+0x733F = 0x316E
+0x7344 = 0x3976
+0x7345 = 0x3B62
+0x734E = 0x6052
+0x734F = 0x6053
+0x7357 = 0x6055
+0x7363 = 0x3D43
+0x7368 = 0x6057
+0x736A = 0x6056
+0x7370 = 0x6058
+0x7372 = 0x334D
+0x7375 = 0x605A
+0x7378 = 0x6059
+0x737A = 0x605C
+0x737B = 0x605B
+0x7384 = 0x383C
+0x7387 = 0x4E28
+0x7389 = 0x364C
+0x738B = 0x3226
+0x7396 = 0x366A
+0x73A9 = 0x3461
+0x73B2 = 0x4E68
+0x73B3 = 0x605E
+0x73BB = 0x6060
+0x73C0 = 0x6061
+0x73C2 = 0x3251
+0x73C8 = 0x605D
+0x73CA = 0x3B39
+0x73CD = 0x4441
+0x73CE = 0x605F
+0x73DE = 0x6064
+0x73E0 = 0x3C6E
+0x73E5 = 0x6062
+0x73EA = 0x373E
+0x73ED = 0x4849
+0x73EE = 0x6063
+0x73F1 = 0x607E
+0x73F8 = 0x6069
+0x73FE = 0x383D
+0x7403 = 0x3565
+0x7405 = 0x6066
+0x7406 = 0x4D7D
+0x7409 = 0x4E30
+0x7422 = 0x4276
+0x7425 = 0x6068
+0x7432 = 0x606A
+0x7433 = 0x4E56
+0x7434 = 0x3657
+0x7435 = 0x487C
+0x7436 = 0x474A
+0x743A = 0x606B
+0x743F = 0x606D
+0x7441 = 0x6070
+0x7455 = 0x606C
+0x7459 = 0x606F
+0x745A = 0x386A
+0x745B = 0x314D
+0x745C = 0x6071
+0x745E = 0x3F70
+0x745F = 0x606E
+0x7460 = 0x4E5C
+0x7463 = 0x6074
+0x7464 = 0x7424
+0x7469 = 0x6072
+0x746A = 0x6075
+0x746F = 0x6067
+0x7470 = 0x6073
+0x7473 = 0x3A3C
+0x7476 = 0x6076
+0x747E = 0x6077
+0x7483 = 0x4D7E
+0x748B = 0x6078
+0x749E = 0x6079
+0x74A2 = 0x6065
+0x74A7 = 0x607A
+0x74B0 = 0x3444
+0x74BD = 0x3C25
+0x74CA = 0x607B
+0x74CF = 0x607C
+0x74D4 = 0x607D
+0x74DC = 0x313B
+0x74E0 = 0x6121
+0x74E2 = 0x493B
+0x74E3 = 0x6122
+0x74E6 = 0x3424
+0x74E7 = 0x6123
+0x74E9 = 0x6124
+0x74EE = 0x6125
+0x74F0 = 0x6127
+0x74F1 = 0x6128
+0x74F2 = 0x6126
+0x74F6 = 0x4953
+0x74F7 = 0x612A
+0x74F8 = 0x6129
+0x7503 = 0x612C
+0x7504 = 0x612B
+0x7505 = 0x612D
+0x750C = 0x612E
+0x750D = 0x6130
+0x750E = 0x612F
+0x7511 = 0x3979
+0x7513 = 0x6132
+0x7515 = 0x6131
+0x7518 = 0x3445
+0x751A = 0x3F53
+0x751C = 0x453C
+0x751E = 0x6133
+0x751F = 0x4038
+0x7523 = 0x3B3A
+0x7525 = 0x3179
+0x7526 = 0x6134
+0x7528 = 0x4D51
+0x752B = 0x4A63
+0x752C = 0x6135
+0x7530 = 0x4544
+0x7531 = 0x4D33
+0x7532 = 0x3943
+0x7533 = 0x3F3D
+0x7537 = 0x434B
+0x7538 = 0x5234
+0x753A = 0x442E
+0x753B = 0x3268
+0x753C = 0x6136
+0x7544 = 0x6137
+0x7546 = 0x613C
+0x7549 = 0x613A
+0x754A = 0x6139
+0x754B = 0x5A42
+0x754C = 0x3326
+0x754D = 0x6138
+0x754F = 0x305A
+0x7551 = 0x482A
+0x7554 = 0x484A
+0x7559 = 0x4E31
+0x755A = 0x613D
+0x755B = 0x613B
+0x755C = 0x435C
+0x755D = 0x4026
+0x7560 = 0x482B
+0x7562 = 0x492D
+0x7564 = 0x613F
+0x7565 = 0x4E2C
+0x7566 = 0x374D
+0x7567 = 0x6140
+0x7569 = 0x613E
+0x756A = 0x4856
+0x756B = 0x6141
+0x756D = 0x6142
+0x7570 = 0x305B
+0x7573 = 0x3E76
+0x7574 = 0x6147
+0x7576 = 0x6144
+0x7577 = 0x466D
+0x7578 = 0x6143
+0x757F = 0x3526
+0x7582 = 0x614A
+0x7586 = 0x6145
+0x7587 = 0x6146
+0x7589 = 0x6149
+0x758A = 0x6148
+0x758B = 0x4925
+0x758E = 0x4142
+0x758F = 0x4141
+0x7591 = 0x353F
+0x7594 = 0x614B
+0x759A = 0x614C
+0x759D = 0x614D
+0x75A3 = 0x614F
+0x75A5 = 0x614E
+0x75AB = 0x3156
+0x75B1 = 0x6157
+0x75B2 = 0x4868
+0x75B3 = 0x6151
+0x75B5 = 0x6153
+0x75B8 = 0x6155
+0x75B9 = 0x3F3E
+0x75BC = 0x6156
+0x75BD = 0x6154
+0x75BE = 0x3C40
+0x75C2 = 0x6150
+0x75C3 = 0x6152
+0x75C5 = 0x4942
+0x75C7 = 0x3E49
+0x75CA = 0x6159
+0x75CD = 0x6158
+0x75D2 = 0x615A
+0x75D4 = 0x3C26
+0x75D5 = 0x3A2F
+0x75D8 = 0x4577
+0x75D9 = 0x615B
+0x75DB = 0x444B
+0x75DE = 0x615D
+0x75E2 = 0x4E21
+0x75E3 = 0x615C
+0x75E9 = 0x4169
+0x75F0 = 0x6162
+0x75F2 = 0x6164
+0x75F3 = 0x6165
+0x75F4 = 0x4354
+0x75FA = 0x6163
+0x75FC = 0x6160
+0x75FE = 0x615E
+0x75FF = 0x615F
+0x7601 = 0x6161
+0x7609 = 0x6168
+0x760B = 0x6166
+0x760D = 0x6167
+0x761F = 0x6169
+0x7620 = 0x616B
+0x7621 = 0x616C
+0x7622 = 0x616D
+0x7624 = 0x616E
+0x7627 = 0x616A
+0x7630 = 0x6170
+0x7634 = 0x616F
+0x763B = 0x6171
+0x7642 = 0x4E45
+0x7646 = 0x6174
+0x7647 = 0x6172
+0x7648 = 0x6173
+0x764C = 0x3462
+0x7652 = 0x4C7E
+0x7656 = 0x4A4A
+0x7658 = 0x6176
+0x765C = 0x6175
+0x7661 = 0x6177
+0x7662 = 0x6178
+0x7667 = 0x617C
+0x7668 = 0x6179
+0x7669 = 0x617A
+0x766A = 0x617B
+0x766C = 0x617D
+0x7670 = 0x617E
+0x7672 = 0x6221
+0x7676 = 0x6222
+0x7678 = 0x6223
+0x767A = 0x482F
+0x767B = 0x4550
+0x767C = 0x6224
+0x767D = 0x4772
+0x767E = 0x4934
+0x7680 = 0x6225
+0x7683 = 0x6226
+0x7684 = 0x452A
+0x7686 = 0x3327
+0x7687 = 0x3944
+0x7688 = 0x6227
+0x768B = 0x6228
+0x768E = 0x6229
+0x7690 = 0x3B29
+0x7693 = 0x622B
+0x7696 = 0x622A
+0x7699 = 0x622C
+0x769A = 0x622D
+0x76AE = 0x4869
+0x76B0 = 0x622E
+0x76B4 = 0x622F
+0x76B7 = 0x7369
+0x76B8 = 0x6230
+0x76B9 = 0x6231
+0x76BA = 0x6232
+0x76BF = 0x3B2E
+0x76C2 = 0x6233
+0x76C3 = 0x4756
+0x76C6 = 0x4B5F
+0x76C8 = 0x314E
+0x76CA = 0x3157
+0x76CD = 0x6234
+0x76D2 = 0x6236
+0x76D6 = 0x6235
+0x76D7 = 0x4570
+0x76DB = 0x4039
+0x76DC = 0x5D39
+0x76DE = 0x6237
+0x76DF = 0x4C41
+0x76E1 = 0x6238
+0x76E3 = 0x3446
+0x76E4 = 0x4857
+0x76E5 = 0x6239
+0x76E7 = 0x623A
+0x76EA = 0x623B
+0x76EE = 0x4C5C
+0x76F2 = 0x4C55
+0x76F4 = 0x443E
+0x76F8 = 0x416A
+0x76FB = 0x623D
+0x76FE = 0x3D62
+0x7701 = 0x3E4A
+0x7704 = 0x6240
+0x7707 = 0x623F
+0x7708 = 0x623E
+0x7709 = 0x487D
+0x770B = 0x3447
+0x770C = 0x3829
+0x771B = 0x6246
+0x771E = 0x6243
+0x771F = 0x3F3F
+0x7720 = 0x4C32
+0x7724 = 0x6242
+0x7725 = 0x6244
+0x7726 = 0x6245
+0x7729 = 0x6241
+0x7737 = 0x6247
+0x7738 = 0x6248
+0x773A = 0x442F
+0x773C = 0x3463
+0x7740 = 0x4365
+0x7747 = 0x6249
+0x775A = 0x624A
+0x775B = 0x624D
+0x7761 = 0x3F67
+0x7763 = 0x4644
+0x7765 = 0x624E
+0x7766 = 0x4B53
+0x7768 = 0x624B
+0x776B = 0x624C
+0x7779 = 0x6251
+0x777E = 0x6250
+0x777F = 0x624F
+0x778B = 0x6253
+0x778E = 0x6252
+0x7791 = 0x6254
+0x779E = 0x6256
+0x77A0 = 0x6255
+0x77A5 = 0x4A4D
+0x77AC = 0x3D56
+0x77AD = 0x4E46
+0x77B0 = 0x6257
+0x77B3 = 0x4637
+0x77B6 = 0x6258
+0x77B9 = 0x6259
+0x77BB = 0x625D
+0x77BC = 0x625B
+0x77BD = 0x625C
+0x77BF = 0x625A
+0x77C7 = 0x625E
+0x77CD = 0x625F
+0x77D7 = 0x6260
+0x77DA = 0x6261
+0x77DB = 0x4C37
+0x77DC = 0x6262
+0x77E2 = 0x4C70
+0x77E3 = 0x6263
+0x77E5 = 0x434E
+0x77E7 = 0x476A
+0x77E9 = 0x366B
+0x77ED = 0x433B
+0x77EE = 0x6264
+0x77EF = 0x363A
+0x77F3 = 0x4050
+0x77FC = 0x6265
+0x7802 = 0x3A3D
+0x780C = 0x6266
+0x7812 = 0x6267
+0x7814 = 0x3826
+0x7815 = 0x3A55
+0x7820 = 0x6269
+0x7825 = 0x4556
+0x7826 = 0x3A56
+0x7827 = 0x354E
+0x7832 = 0x4B24
+0x7834 = 0x474B
+0x783A = 0x4557
+0x783F = 0x395C
+0x7845 = 0x626B
+0x785D = 0x3E4B
+0x786B = 0x4E32
+0x786C = 0x3945
+0x786F = 0x3827
+0x7872 = 0x4823
+0x7874 = 0x626D
+0x787C = 0x626F
+0x7881 = 0x386B
+0x7886 = 0x626E
+0x7887 = 0x4476
+0x788C = 0x6271
+0x788D = 0x3337
+0x788E = 0x626C
+0x7891 = 0x486A
+0x7893 = 0x3130
+0x7895 = 0x3A6C
+0x7897 = 0x4F52
+0x789A = 0x6270
+0x78A3 = 0x6272
+0x78A7 = 0x4A4B
+0x78A9 = 0x4059
+0x78AA = 0x6274
+0x78AF = 0x6275
+0x78B5 = 0x6273
+0x78BA = 0x334E
+0x78BC = 0x627B
+0x78BE = 0x627A
+0x78C1 = 0x3C27
+0x78C5 = 0x627C
+0x78C6 = 0x6277
+0x78CA = 0x627D
+0x78CB = 0x6278
+0x78D0 = 0x4858
+0x78D1 = 0x6276
+0x78D4 = 0x6279
+0x78DA = 0x6322
+0x78E7 = 0x6321
+0x78E8 = 0x4B61
+0x78EC = 0x627E
+0x78EF = 0x306B
+0x78F4 = 0x6324
+0x78FD = 0x6323
+0x7901 = 0x3E4C
+0x7907 = 0x6325
+0x790E = 0x4143
+0x7911 = 0x6327
+0x7912 = 0x6326
+0x7919 = 0x6328
+0x7926 = 0x6268
+0x792A = 0x626A
+0x792B = 0x632A
+0x792C = 0x6329
+0x793A = 0x3C28
+0x793C = 0x4E69
+0x793E = 0x3C52
+0x7940 = 0x632B
+0x7941 = 0x3737
+0x7947 = 0x3540
+0x7948 = 0x3527
+0x7949 = 0x3B63
+0x7950 = 0x4D34
+0x7953 = 0x6331
+0x7955 = 0x6330
+0x7956 = 0x4144
+0x7957 = 0x632D
+0x795A = 0x632F
+0x795D = 0x3D4B
+0x795E = 0x3F40
+0x795F = 0x632E
+0x7960 = 0x632C
+0x7962 = 0x472A
+0x7965 = 0x3E4D
+0x7968 = 0x493C
+0x796D = 0x3A57
+0x7977 = 0x4578
+0x797A = 0x6332
+0x797F = 0x6333
+0x7980 = 0x6349
+0x7981 = 0x3658
+0x7984 = 0x4F3D
+0x7985 = 0x4135
+0x798A = 0x6334
+0x798D = 0x3252
+0x798E = 0x4477
+0x798F = 0x4A21
+0x799D = 0x6335
+0x79A6 = 0x357A
+0x79A7 = 0x6336
+0x79AA = 0x6338
+0x79AE = 0x6339
+0x79B0 = 0x4729
+0x79B3 = 0x633A
+0x79B9 = 0x633B
+0x79BA = 0x633C
+0x79BD = 0x3659
+0x79BE = 0x3253
+0x79BF = 0x4645
+0x79C0 = 0x3D28
+0x79C1 = 0x3B64
+0x79C9 = 0x633D
+0x79CB = 0x3D29
+0x79D1 = 0x324A
+0x79D2 = 0x4943
+0x79D5 = 0x633E
+0x79D8 = 0x486B
+0x79DF = 0x4145
+0x79E1 = 0x6341
+0x79E3 = 0x6342
+0x79E4 = 0x4769
+0x79E6 = 0x3F41
+0x79E7 = 0x633F
+0x79E9 = 0x4361
+0x79EC = 0x6340
+0x79F0 = 0x3E4E
+0x79FB = 0x305C
+0x7A00 = 0x3529
+0x7A08 = 0x6343
+0x7A0B = 0x4478
+0x7A0D = 0x6344
+0x7A0E = 0x4047
+0x7A14 = 0x4C2D
+0x7A17 = 0x4923
+0x7A18 = 0x6345
+0x7A19 = 0x6346
+0x7A1A = 0x4355
+0x7A1C = 0x4E47
+0x7A1F = 0x6348
+0x7A20 = 0x6347
+0x7A2E = 0x3C6F
+0x7A31 = 0x634A
+0x7A32 = 0x3070
+0x7A37 = 0x634D
+0x7A3B = 0x634B
+0x7A3C = 0x3254
+0x7A3D = 0x374E
+0x7A3E = 0x634C
+0x7A3F = 0x3946
+0x7A40 = 0x3972
+0x7A42 = 0x4A66
+0x7A43 = 0x634E
+0x7A46 = 0x4B54
+0x7A49 = 0x6350
+0x7A4D = 0x4051
+0x7A4E = 0x314F
+0x7A4F = 0x323A
+0x7A50 = 0x302C
+0x7A57 = 0x634F
+0x7A61 = 0x6351
+0x7A62 = 0x6352
+0x7A63 = 0x3E77
+0x7A69 = 0x6353
+0x7A6B = 0x334F
+0x7A70 = 0x6355
+0x7A74 = 0x376A
+0x7A76 = 0x3566
+0x7A79 = 0x6356
+0x7A7A = 0x3675
+0x7A7D = 0x6357
+0x7A7F = 0x407C
+0x7A81 = 0x464D
+0x7A83 = 0x4060
+0x7A84 = 0x3A75
+0x7A88 = 0x6358
+0x7A92 = 0x4362
+0x7A93 = 0x416B
+0x7A95 = 0x635A
+0x7A96 = 0x635C
+0x7A97 = 0x6359
+0x7A98 = 0x635B
+0x7A9F = 0x3722
+0x7AA9 = 0x635D
+0x7AAA = 0x3726
+0x7AAE = 0x3567
+0x7AAF = 0x4D52
+0x7AB0 = 0x635F
+0x7AB6 = 0x6360
+0x7ABA = 0x312E
+0x7ABF = 0x6363
+0x7AC3 = 0x3376
+0x7AC4 = 0x6362
+0x7AC5 = 0x6361
+0x7AC7 = 0x6365
+0x7AC8 = 0x635E
+0x7ACA = 0x6366
+0x7ACB = 0x4E29
+0x7ACD = 0x6367
+0x7ACF = 0x6368
+0x7AD2 = 0x5474
+0x7AD3 = 0x636A
+0x7AD5 = 0x6369
+0x7AD9 = 0x636B
+0x7ADA = 0x636C
+0x7ADC = 0x4E35
+0x7ADD = 0x636D
+0x7ADF = 0x706F
+0x7AE0 = 0x3E4F
+0x7AE1 = 0x636E
+0x7AE2 = 0x636F
+0x7AE3 = 0x3D57
+0x7AE5 = 0x4638
+0x7AE6 = 0x6370
+0x7AEA = 0x4328
+0x7AED = 0x6371
+0x7AEF = 0x433C
+0x7AF0 = 0x6372
+0x7AF6 = 0x3625
+0x7AF8 = 0x513F
+0x7AF9 = 0x435D
+0x7AFA = 0x3C33
+0x7AFF = 0x3448
+0x7B02 = 0x6373
+0x7B04 = 0x6422
+0x7B06 = 0x6376
+0x7B08 = 0x3568
+0x7B0A = 0x6375
+0x7B0B = 0x6424
+0x7B0F = 0x6374
+0x7B11 = 0x3E50
+0x7B18 = 0x6378
+0x7B19 = 0x6379
+0x7B1B = 0x452B
+0x7B1E = 0x637A
+0x7B20 = 0x335E
+0x7B25 = 0x3F5A
+0x7B26 = 0x4964
+0x7B28 = 0x637C
+0x7B2C = 0x4268
+0x7B33 = 0x6377
+0x7B35 = 0x637B
+0x7B36 = 0x637D
+0x7B39 = 0x3A7B
+0x7B45 = 0x6426
+0x7B46 = 0x492E
+0x7B48 = 0x4826
+0x7B49 = 0x4579
+0x7B4B = 0x365A
+0x7B4C = 0x6425
+0x7B4D = 0x6423
+0x7B4F = 0x4835
+0x7B50 = 0x637E
+0x7B51 = 0x435E
+0x7B52 = 0x457B
+0x7B54 = 0x457A
+0x7B56 = 0x3A76
+0x7B5D = 0x6438
+0x7B65 = 0x6428
+0x7B67 = 0x642A
+0x7B6C = 0x642D
+0x7B6E = 0x642E
+0x7B70 = 0x642B
+0x7B71 = 0x642C
+0x7B74 = 0x6429
+0x7B75 = 0x6427
+0x7B7A = 0x6421
+0x7B86 = 0x4A4F
+0x7B87 = 0x3255
+0x7B8B = 0x6435
+0x7B8D = 0x6432
+0x7B8F = 0x6437
+0x7B92 = 0x6436
+0x7B94 = 0x4773
+0x7B95 = 0x4C27
+0x7B97 = 0x3B3B
+0x7B98 = 0x6430
+0x7B99 = 0x6439
+0x7B9A = 0x6434
+0x7B9C = 0x6433
+0x7B9D = 0x642F
+0x7B9F = 0x6431
+0x7BA1 = 0x3449
+0x7BAA = 0x433D
+0x7BAD = 0x407D
+0x7BB1 = 0x4822
+0x7BB4 = 0x643E
+0x7BB8 = 0x4824
+0x7BC0 = 0x4061
+0x7BC1 = 0x643B
+0x7BC4 = 0x484F
+0x7BC6 = 0x643F
+0x7BC7 = 0x4A53
+0x7BC9 = 0x435B
+0x7BCB = 0x643A
+0x7BCC = 0x643C
+0x7BCF = 0x643D
+0x7BDD = 0x6440
+0x7BE0 = 0x3C44
+0x7BE4 = 0x4646
+0x7BE5 = 0x6445
+0x7BE6 = 0x6444
+0x7BE9 = 0x6441
+0x7BED = 0x4F36
+0x7BF3 = 0x644A
+0x7BF6 = 0x644E
+0x7BF7 = 0x644B
+0x7C00 = 0x6447
+0x7C07 = 0x6448
+0x7C0D = 0x644D
+0x7C11 = 0x6442
+0x7C12 = 0x5255
+0x7C13 = 0x6449
+0x7C14 = 0x6443
+0x7C17 = 0x644C
+0x7C1F = 0x6452
+0x7C21 = 0x344A
+0x7C23 = 0x644F
+0x7C27 = 0x6450
+0x7C2A = 0x6451
+0x7C2B = 0x6454
+0x7C37 = 0x6453
+0x7C38 = 0x4876
+0x7C3D = 0x6455
+0x7C3E = 0x4E7C
+0x7C3F = 0x4A6D
+0x7C40 = 0x645A
+0x7C43 = 0x6457
+0x7C4C = 0x6456
+0x7C4D = 0x4052
+0x7C4F = 0x6459
+0x7C50 = 0x645B
+0x7C54 = 0x6458
+0x7C56 = 0x645F
+0x7C58 = 0x645C
+0x7C5F = 0x645D
+0x7C60 = 0x6446
+0x7C64 = 0x645E
+0x7C65 = 0x6460
+0x7C6C = 0x6461
+0x7C73 = 0x4A46
+0x7C75 = 0x6462
+0x7C7E = 0x4C62
+0x7C81 = 0x364E
+0x7C82 = 0x3729
+0x7C83 = 0x6463
+0x7C89 = 0x4A34
+0x7C8B = 0x3F68
+0x7C8D = 0x4C30
+0x7C90 = 0x6464
+0x7C92 = 0x4E33
+0x7C95 = 0x4774
+0x7C97 = 0x4146
+0x7C98 = 0x4734
+0x7C9B = 0x3D4D
+0x7C9F = 0x3040
+0x7CA1 = 0x6469
+0x7CA2 = 0x6467
+0x7CA4 = 0x6465
+0x7CA5 = 0x3421
+0x7CA7 = 0x3E51
+0x7CA8 = 0x646A
+0x7CAB = 0x6468
+0x7CAD = 0x6466
+0x7CAE = 0x646E
+0x7CB1 = 0x646D
+0x7CB2 = 0x646C
+0x7CB3 = 0x646B
+0x7CB9 = 0x646F
+0x7CBD = 0x6470
+0x7CBE = 0x403A
+0x7CC0 = 0x6471
+0x7CC2 = 0x6473
+0x7CC5 = 0x6472
+0x7CCA = 0x3852
+0x7CCE = 0x4138
+0x7CD2 = 0x6475
+0x7CD6 = 0x457C
+0x7CD8 = 0x6474
+0x7CDC = 0x6476
+0x7CDE = 0x4A35
+0x7CDF = 0x416C
+0x7CE0 = 0x3947
+0x7CE2 = 0x6477
+0x7CE7 = 0x4E48
+0x7CEF = 0x6479
+0x7CF2 = 0x647A
+0x7CF4 = 0x647B
+0x7CF6 = 0x647C
+0x7CF8 = 0x3B65
+0x7CFA = 0x647D
+0x7CFB = 0x374F
+0x7CFE = 0x356A
+0x7D00 = 0x352A
+0x7D02 = 0x6521
+0x7D04 = 0x4C73
+0x7D05 = 0x3948
+0x7D06 = 0x647E
+0x7D0A = 0x6524
+0x7D0B = 0x4C66
+0x7D0D = 0x473C
+0x7D10 = 0x4933
+0x7D14 = 0x3D63
+0x7D15 = 0x6523
+0x7D17 = 0x3C53
+0x7D18 = 0x3949
+0x7D19 = 0x3B66
+0x7D1A = 0x3569
+0x7D1B = 0x4A36
+0x7D1C = 0x6522
+0x7D20 = 0x4147
+0x7D21 = 0x4B42
+0x7D22 = 0x3A77
+0x7D2B = 0x3B67
+0x7D2C = 0x445D
+0x7D2E = 0x6527
+0x7D2F = 0x4E5F
+0x7D30 = 0x3A59
+0x7D32 = 0x6528
+0x7D33 = 0x3F42
+0x7D35 = 0x652A
+0x7D39 = 0x3E52
+0x7D3A = 0x3A30
+0x7D3F = 0x6529
+0x7D42 = 0x3D2A
+0x7D43 = 0x383E
+0x7D44 = 0x4148
+0x7D45 = 0x6525
+0x7D46 = 0x652B
+0x7D4B = 0x6526
+0x7D4C = 0x3750
+0x7D4E = 0x652E
+0x7D4F = 0x6532
+0x7D50 = 0x376B
+0x7D56 = 0x652D
+0x7D5B = 0x6536
+0x7D5E = 0x394A
+0x7D61 = 0x4D6D
+0x7D62 = 0x303C
+0x7D63 = 0x6533
+0x7D66 = 0x356B
+0x7D68 = 0x6530
+0x7D6E = 0x6531
+0x7D71 = 0x457D
+0x7D72 = 0x652F
+0x7D73 = 0x652C
+0x7D75 = 0x3328
+0x7D76 = 0x4064
+0x7D79 = 0x3828
+0x7D7D = 0x6538
+0x7D89 = 0x6535
+0x7D8F = 0x6537
+0x7D93 = 0x6534
+0x7D99 = 0x3751
+0x7D9A = 0x4233
+0x7D9B = 0x6539
+0x7D9C = 0x416E
+0x7D9F = 0x6546
+0x7DA2 = 0x6542
+0x7DA3 = 0x653C
+0x7DAB = 0x6540
+0x7DAC = 0x3C7A
+0x7DAD = 0x305D
+0x7DAE = 0x653B
+0x7DAF = 0x6543
+0x7DB0 = 0x6547
+0x7DB1 = 0x394B
+0x7DB2 = 0x4C56
+0x7DB4 = 0x4456
+0x7DB5 = 0x653D
+0x7DB8 = 0x6545
+0x7DBA = 0x653A
+0x7DBB = 0x433E
+0x7DBD = 0x653F
+0x7DBE = 0x303D
+0x7DBF = 0x4C4A
+0x7DC7 = 0x653E
+0x7DCA = 0x365B
+0x7DCB = 0x486C
+0x7DCF = 0x416D
+0x7DD1 = 0x4E50
+0x7DD2 = 0x3D6F
+0x7DD5 = 0x656E
+0x7DD8 = 0x6548
+0x7DDA = 0x407E
+0x7DDC = 0x6544
+0x7DDD = 0x6549
+0x7DDE = 0x654B
+0x7DE0 = 0x4479
+0x7DE1 = 0x654E
+0x7DE4 = 0x654A
+0x7DE8 = 0x4A54
+0x7DE9 = 0x344B
+0x7DEC = 0x4C4B
+0x7DEF = 0x305E
+0x7DF2 = 0x654D
+0x7DF4 = 0x4E7D
+0x7DFB = 0x654C
+0x7E01 = 0x316F
+0x7E04 = 0x466C
+0x7E05 = 0x654F
+0x7E09 = 0x6556
+0x7E0A = 0x6550
+0x7E0B = 0x6557
+0x7E12 = 0x6553
+0x7E1B = 0x477B
+0x7E1E = 0x3C4A
+0x7E1F = 0x6555
+0x7E21 = 0x6552
+0x7E22 = 0x6558
+0x7E23 = 0x6551
+0x7E26 = 0x3D44
+0x7E2B = 0x4B25
+0x7E2E = 0x3D4C
+0x7E31 = 0x6554
+0x7E32 = 0x6560
+0x7E35 = 0x655C
+0x7E37 = 0x655F
+0x7E39 = 0x655D
+0x7E3A = 0x6561
+0x7E3B = 0x655B
+0x7E3D = 0x6541
+0x7E3E = 0x4053
+0x7E41 = 0x484B
+0x7E43 = 0x655E
+0x7E46 = 0x6559
+0x7E4A = 0x4121
+0x7E4B = 0x3752
+0x7E4D = 0x3D2B
+0x7E54 = 0x3F25
+0x7E55 = 0x4136
+0x7E56 = 0x6564
+0x7E59 = 0x6566
+0x7E5A = 0x6567
+0x7E5D = 0x6563
+0x7E5E = 0x6565
+0x7E66 = 0x655A
+0x7E67 = 0x6562
+0x7E69 = 0x656A
+0x7E6A = 0x6569
+0x7E6D = 0x4B7A
+0x7E70 = 0x372B
+0x7E79 = 0x6568
+0x7E7B = 0x656C
+0x7E7C = 0x656B
+0x7E7D = 0x656F
+0x7E7F = 0x6571
+0x7E82 = 0x3B3C
+0x7E83 = 0x656D
+0x7E88 = 0x6572
+0x7E89 = 0x6573
+0x7E8C = 0x6574
+0x7E8E = 0x657A
+0x7E8F = 0x453B
+0x7E90 = 0x6576
+0x7E92 = 0x6575
+0x7E93 = 0x6577
+0x7E94 = 0x6578
+0x7E96 = 0x6579
+0x7E9B = 0x657B
+0x7E9C = 0x657C
+0x7F36 = 0x344C
+0x7F38 = 0x657D
+0x7F3A = 0x657E
+0x7F45 = 0x6621
+0x7F4C = 0x6622
+0x7F4D = 0x6623
+0x7F4E = 0x6624
+0x7F50 = 0x6625
+0x7F51 = 0x6626
+0x7F54 = 0x6628
+0x7F55 = 0x6627
+0x7F58 = 0x6629
+0x7F5F = 0x662A
+0x7F60 = 0x662B
+0x7F67 = 0x662E
+0x7F68 = 0x662C
+0x7F69 = 0x662D
+0x7F6A = 0x3A61
+0x7F6B = 0x3753
+0x7F6E = 0x4356
+0x7F70 = 0x4833
+0x7F72 = 0x3D70
+0x7F75 = 0x474D
+0x7F77 = 0x486D
+0x7F78 = 0x662F
+0x7F79 = 0x586D
+0x7F82 = 0x6630
+0x7F83 = 0x6632
+0x7F85 = 0x4D65
+0x7F86 = 0x6631
+0x7F87 = 0x6634
+0x7F88 = 0x6633
+0x7F8A = 0x4D53
+0x7F8C = 0x6635
+0x7F8E = 0x487E
+0x7F94 = 0x6636
+0x7F9A = 0x6639
+0x7F9D = 0x6638
+0x7F9E = 0x6637
+0x7FA3 = 0x663A
+0x7FA4 = 0x3732
+0x7FA8 = 0x4122
+0x7FA9 = 0x3541
+0x7FAE = 0x663E
+0x7FAF = 0x663B
+0x7FB2 = 0x663C
+0x7FB6 = 0x663F
+0x7FB8 = 0x6640
+0x7FB9 = 0x663D
+0x7FBD = 0x3129
+0x7FC1 = 0x3227
+0x7FC5 = 0x6642
+0x7FC6 = 0x6643
+0x7FCA = 0x6644
+0x7FCC = 0x4D62
+0x7FD2 = 0x3D2C
+0x7FD4 = 0x6646
+0x7FD5 = 0x6645
+0x7FE0 = 0x3F69
+0x7FE1 = 0x6647
+0x7FE6 = 0x6648
+0x7FE9 = 0x6649
+0x7FEB = 0x3465
+0x7FF0 = 0x344D
+0x7FF3 = 0x664A
+0x7FF9 = 0x664B
+0x7FFB = 0x4B5D
+0x7FFC = 0x4D63
+0x8000 = 0x4D54
+0x8001 = 0x4F37
+0x8003 = 0x394D
+0x8004 = 0x664E
+0x8005 = 0x3C54
+0x8006 = 0x664D
+0x800B = 0x664F
+0x800C = 0x3C29
+0x8010 = 0x4251
+0x8012 = 0x6650
+0x8015 = 0x394C
+0x8017 = 0x4C57
+0x8018 = 0x6651
+0x8019 = 0x6652
+0x801C = 0x6653
+0x8021 = 0x6654
+0x8028 = 0x6655
+0x8033 = 0x3C2A
+0x8036 = 0x4C6D
+0x803B = 0x6657
+0x803D = 0x433F
+0x803F = 0x6656
+0x8046 = 0x6659
+0x804A = 0x6658
+0x8052 = 0x665A
+0x8056 = 0x403B
+0x8058 = 0x665B
+0x805A = 0x665C
+0x805E = 0x4A39
+0x805F = 0x665D
+0x8061 = 0x416F
+0x8062 = 0x665E
+0x8068 = 0x665F
+0x806F = 0x4E7E
+0x8070 = 0x6662
+0x8072 = 0x6661
+0x8073 = 0x6660
+0x8074 = 0x4430
+0x8076 = 0x6663
+0x8077 = 0x3F26
+0x8079 = 0x6664
+0x807D = 0x6665
+0x807E = 0x4F38
+0x807F = 0x6666
+0x8084 = 0x6667
+0x8085 = 0x6669
+0x8086 = 0x6668
+0x8087 = 0x4825
+0x8089 = 0x4679
+0x808B = 0x4F3E
+0x808C = 0x4829
+0x8093 = 0x666B
+0x8096 = 0x3E53
+0x8098 = 0x492A
+0x809A = 0x666C
+0x809B = 0x666A
+0x809D = 0x344E
+0x80A1 = 0x3854
+0x80A2 = 0x3B68
+0x80A5 = 0x486E
+0x80A9 = 0x382A
+0x80AA = 0x4B43
+0x80AC = 0x666F
+0x80AD = 0x666D
+0x80AF = 0x394E
+0x80B1 = 0x394F
+0x80B2 = 0x3069
+0x80B4 = 0x3A68
+0x80BA = 0x4759
+0x80C3 = 0x305F
+0x80C4 = 0x6674
+0x80C6 = 0x4340
+0x80CC = 0x4758
+0x80CE = 0x425B
+0x80D6 = 0x6676
+0x80D9 = 0x6672
+0x80DA = 0x6675
+0x80DB = 0x6670
+0x80DD = 0x6673
+0x80DE = 0x4B26
+0x80E1 = 0x3855
+0x80E4 = 0x307D
+0x80E5 = 0x6671
+0x80EF = 0x6678
+0x80F1 = 0x6679
+0x80F4 = 0x4639
+0x80F8 = 0x363B
+0x80FC = 0x6726
+0x80FD = 0x473D
+0x8102 = 0x3B69
+0x8105 = 0x363C
+0x8106 = 0x4048
+0x8107 = 0x4F46
+0x8108 = 0x4C2E
+0x8109 = 0x6677
+0x810A = 0x4054
+0x811A = 0x3553
+0x811B = 0x667A
+0x8123 = 0x667C
+0x8129 = 0x667B
+0x812F = 0x667D
+0x8131 = 0x4326
+0x8133 = 0x473E
+0x8139 = 0x4431
+0x813E = 0x6723
+0x8146 = 0x6722
+0x814B = 0x667E
+0x814E = 0x3F55
+0x8150 = 0x4965
+0x8151 = 0x6725
+0x8153 = 0x6724
+0x8154 = 0x3950
+0x8155 = 0x4F53
+0x815F = 0x6735
+0x8165 = 0x6729
+0x8166 = 0x672A
+0x816B = 0x3C70
+0x816E = 0x6728
+0x8170 = 0x3978
+0x8171 = 0x6727
+0x8174 = 0x672B
+0x8178 = 0x4432
+0x8179 = 0x4A22
+0x817A = 0x4123
+0x817F = 0x425C
+0x8180 = 0x672F
+0x8182 = 0x6730
+0x8183 = 0x672C
+0x8188 = 0x672D
+0x818A = 0x672E
+0x818F = 0x3951
+0x8193 = 0x6736
+0x8195 = 0x6732
+0x819A = 0x4966
+0x819C = 0x4B6C
+0x819D = 0x4928
+0x81A0 = 0x6731
+0x81A3 = 0x6734
+0x81A4 = 0x6733
+0x81A8 = 0x4B44
+0x81A9 = 0x6737
+0x81B0 = 0x6738
+0x81B3 = 0x4137
+0x81B5 = 0x6739
+0x81B8 = 0x673B
+0x81BA = 0x673F
+0x81BD = 0x673C
+0x81BE = 0x673A
+0x81BF = 0x473F
+0x81C0 = 0x673D
+0x81C2 = 0x673E
+0x81C6 = 0x3232
+0x81C8 = 0x6745
+0x81C9 = 0x6740
+0x81CD = 0x6741
+0x81D1 = 0x6742
+0x81D3 = 0x4221
+0x81D8 = 0x6744
+0x81D9 = 0x6743
+0x81DA = 0x6746
+0x81DF = 0x6747
+0x81E0 = 0x6748
+0x81E3 = 0x3F43
+0x81E5 = 0x3269
+0x81E7 = 0x6749
+0x81E8 = 0x4E57
+0x81EA = 0x3C2B
+0x81ED = 0x3D2D
+0x81F3 = 0x3B6A
+0x81F4 = 0x4357
+0x81FA = 0x674A
+0x81FB = 0x674B
+0x81FC = 0x3131
+0x81FE = 0x674C
+0x8201 = 0x674D
+0x8202 = 0x674E
+0x8205 = 0x674F
+0x8207 = 0x6750
+0x8208 = 0x363D
+0x8209 = 0x5A2A
+0x820A = 0x6751
+0x820C = 0x4065
+0x820D = 0x6752
+0x820E = 0x3C4B
+0x8210 = 0x6753
+0x8212 = 0x5030
+0x8216 = 0x6754
+0x8217 = 0x4A5E
+0x8218 = 0x345C
+0x821B = 0x4124
+0x821C = 0x3D58
+0x821E = 0x4971
+0x821F = 0x3D2E
+0x8229 = 0x6755
+0x822A = 0x3952
+0x822B = 0x6756
+0x822C = 0x484C
+0x822E = 0x6764
+0x8233 = 0x6758
+0x8235 = 0x4249
+0x8236 = 0x4775
+0x8237 = 0x383F
+0x8238 = 0x6757
+0x8239 = 0x4125
+0x8240 = 0x6759
+0x8247 = 0x447A
+0x8258 = 0x675B
+0x8259 = 0x675A
+0x825A = 0x675D
+0x825D = 0x675C
+0x825F = 0x675E
+0x8262 = 0x6760
+0x8264 = 0x675F
+0x8266 = 0x344F
+0x8268 = 0x6761
+0x826A = 0x6762
+0x826B = 0x6763
+0x826E = 0x3A31
+0x826F = 0x4E49
+0x8271 = 0x6765
+0x8272 = 0x3F27
+0x8276 = 0x3170
+0x8277 = 0x6766
+0x8278 = 0x6767
+0x827E = 0x6768
+0x828B = 0x3072
+0x828D = 0x6769
+0x8292 = 0x676A
+0x8299 = 0x4967
+0x829D = 0x3C47
+0x829F = 0x676C
+0x82A5 = 0x3329
+0x82A6 = 0x3032
+0x82AB = 0x676B
+0x82AC = 0x676E
+0x82AD = 0x474E
+0x82AF = 0x3F44
+0x82B1 = 0x3256
+0x82B3 = 0x4B27
+0x82B8 = 0x375D
+0x82B9 = 0x365C
+0x82BB = 0x676D
+0x82BD = 0x326A
+0x82C5 = 0x3423
+0x82D1 = 0x3171
+0x82D2 = 0x6772
+0x82D3 = 0x4E6A
+0x82D4 = 0x425D
+0x82D7 = 0x4944
+0x82D9 = 0x677E
+0x82DB = 0x3257
+0x82DC = 0x677C
+0x82DE = 0x677A
+0x82DF = 0x6771
+0x82E1 = 0x676F
+0x82E3 = 0x6770
+0x82E5 = 0x3C63
+0x82E6 = 0x366C
+0x82E7 = 0x4377
+0x82EB = 0x4651
+0x82F1 = 0x3151
+0x82F3 = 0x6774
+0x82F4 = 0x6773
+0x82F9 = 0x6779
+0x82FA = 0x6775
+0x82FB = 0x6778
+0x8302 = 0x4C50
+0x8303 = 0x6777
+0x8304 = 0x3258
+0x8305 = 0x337D
+0x8306 = 0x677B
+0x8309 = 0x677D
+0x830E = 0x3754
+0x8316 = 0x6823
+0x8317 = 0x682C
+0x8318 = 0x682D
+0x831C = 0x302B
+0x8323 = 0x6834
+0x8328 = 0x3071
+0x832B = 0x682B
+0x832F = 0x682A
+0x8331 = 0x6825
+0x8332 = 0x6824
+0x8334 = 0x6822
+0x8335 = 0x6821
+0x8336 = 0x4363
+0x8338 = 0x427B
+0x8339 = 0x6827
+0x8340 = 0x6826
+0x8345 = 0x6829
+0x8349 = 0x4170
+0x834A = 0x3755
+0x834F = 0x3141
+0x8350 = 0x6828
+0x8352 = 0x3953
+0x8358 = 0x4171
+0x8373 = 0x683A
+0x8375 = 0x683B
+0x8377 = 0x3259
+0x837B = 0x322E
+0x837C = 0x6838
+0x8385 = 0x682E
+0x8387 = 0x6836
+0x8389 = 0x683D
+0x838A = 0x6837
+0x838E = 0x6835
+0x8393 = 0x6776
+0x8396 = 0x6833
+0x839A = 0x682F
+0x839E = 0x3450
+0x839F = 0x6831
+0x83A0 = 0x683C
+0x83A2 = 0x6832
+0x83A8 = 0x683E
+0x83AA = 0x6830
+0x83AB = 0x477C
+0x83B1 = 0x4D69
+0x83B5 = 0x6839
+0x83BD = 0x684F
+0x83C1 = 0x6847
+0x83C5 = 0x3F7B
+0x83CA = 0x3546
+0x83CC = 0x365D
+0x83CE = 0x6842
+0x83D3 = 0x325B
+0x83D6 = 0x3E54
+0x83D8 = 0x6845
+0x83DC = 0x3A5A
+0x83DF = 0x4551
+0x83E0 = 0x684A
+0x83E9 = 0x4A6E
+0x83EB = 0x6841
+0x83EF = 0x325A
+0x83F0 = 0x3856
+0x83F1 = 0x4929
+0x83F2 = 0x684B
+0x83F4 = 0x683F
+0x83F7 = 0x6848
+0x83FB = 0x6852
+0x83FD = 0x6843
+0x8403 = 0x6844
+0x8404 = 0x463A
+0x8407 = 0x6849
+0x840B = 0x6846
+0x840C = 0x4B28
+0x840D = 0x684C
+0x840E = 0x3060
+0x8413 = 0x6840
+0x8420 = 0x684E
+0x8422 = 0x684D
+0x8429 = 0x476B
+0x842A = 0x6854
+0x842C = 0x685F
+0x8431 = 0x337E
+0x8435 = 0x6862
+0x8438 = 0x6850
+0x843C = 0x6855
+0x843D = 0x4D6E
+0x8446 = 0x685E
+0x8449 = 0x4D55
+0x844E = 0x4E2A
+0x8457 = 0x4378
+0x845B = 0x336B
+0x8461 = 0x4972
+0x8462 = 0x6864
+0x8463 = 0x4621
+0x8466 = 0x3031
+0x8469 = 0x685D
+0x846B = 0x6859
+0x846C = 0x4172
+0x846D = 0x6853
+0x846E = 0x685B
+0x846F = 0x6860
+0x8471 = 0x472C
+0x8475 = 0x302A
+0x8477 = 0x6858
+0x8479 = 0x6861
+0x847A = 0x4978
+0x8482 = 0x685C
+0x8484 = 0x6857
+0x848B = 0x3E55
+0x8490 = 0x3D2F
+0x8494 = 0x3C2C
+0x8499 = 0x4C58
+0x849C = 0x4947
+0x849F = 0x6867
+0x84A1 = 0x6870
+0x84AD = 0x685A
+0x84B2 = 0x3377
+0x84B8 = 0x3E78
+0x84B9 = 0x6865
+0x84BB = 0x686A
+0x84BC = 0x4173
+0x84BF = 0x6866
+0x84C1 = 0x686D
+0x84C4 = 0x435F
+0x84C6 = 0x686E
+0x84C9 = 0x4D56
+0x84CA = 0x6863
+0x84CB = 0x3338
+0x84CD = 0x6869
+0x84D0 = 0x686C
+0x84D1 = 0x4C2C
+0x84D6 = 0x686F
+0x84D9 = 0x6868
+0x84DA = 0x686B
+0x84EC = 0x4B29
+0x84EE = 0x4F21
+0x84F4 = 0x6873
+0x84FC = 0x687A
+0x84FF = 0x6872
+0x8500 = 0x3C43
+0x8506 = 0x6851
+0x8511 = 0x4A4E
+0x8513 = 0x4C22
+0x8514 = 0x6879
+0x8515 = 0x6878
+0x8517 = 0x6874
+0x8518 = 0x6875
+0x851A = 0x3136
+0x851F = 0x6877
+0x8521 = 0x6871
+0x8526 = 0x4455
+0x852C = 0x6876
+0x852D = 0x307E
+0x8535 = 0x4222
+0x853D = 0x4A43
+0x8540 = 0x687B
+0x8541 = 0x6921
+0x8543 = 0x4859
+0x8548 = 0x687E
+0x8549 = 0x3E56
+0x854A = 0x3C49
+0x854B = 0x6923
+0x854E = 0x363E
+0x8555 = 0x6924
+0x8557 = 0x4979
+0x8558 = 0x687D
+0x855A = 0x6856
+0x8563 = 0x687C
+0x8568 = 0x4F4F
+0x8569 = 0x4622
+0x856A = 0x4973
+0x856D = 0x692B
+0x8577 = 0x6931
+0x857E = 0x6932
+0x8580 = 0x6925
+0x8584 = 0x4776
+0x8587 = 0x692F
+0x8588 = 0x6927
+0x858A = 0x6929
+0x8590 = 0x6933
+0x8591 = 0x6928
+0x8594 = 0x692C
+0x8597 = 0x3172
+0x8599 = 0x4665
+0x859B = 0x692D
+0x859C = 0x6930
+0x85A4 = 0x6926
+0x85A6 = 0x4126
+0x85A8 = 0x692A
+0x85A9 = 0x3B27
+0x85AA = 0x3F45
+0x85AB = 0x3730
+0x85AC = 0x4C74
+0x85AE = 0x4C79
+0x85AF = 0x3D72
+0x85B9 = 0x6937
+0x85BA = 0x6935
+0x85C1 = 0x4F4E
+0x85C9 = 0x6934
+0x85CD = 0x4D75
+0x85CF = 0x6936
+0x85D0 = 0x6938
+0x85D5 = 0x6939
+0x85DC = 0x693C
+0x85DD = 0x693A
+0x85E4 = 0x4623
+0x85E5 = 0x693B
+0x85E9 = 0x484D
+0x85EA = 0x692E
+0x85F7 = 0x3D73
+0x85F9 = 0x693D
+0x85FA = 0x6942
+0x85FB = 0x4174
+0x85FE = 0x6941
+0x8602 = 0x6922
+0x8606 = 0x6943
+0x8607 = 0x4149
+0x860A = 0x693E
+0x860B = 0x6940
+0x8613 = 0x693F
+0x8616 = 0x5D31
+0x8617 = 0x5D22
+0x861A = 0x6945
+0x8622 = 0x6944
+0x862D = 0x4D76
+0x862F = 0x623C
+0x8630 = 0x6946
+0x863F = 0x6947
+0x864D = 0x6948
+0x864E = 0x3857
+0x8650 = 0x3554
+0x8654 = 0x694A
+0x8655 = 0x515D
+0x865A = 0x3575
+0x865C = 0x4E3A
+0x865E = 0x3673
+0x865F = 0x694B
+0x8667 = 0x694C
+0x866B = 0x436E
+0x8671 = 0x694D
+0x8679 = 0x467A
+0x867B = 0x303A
+0x868A = 0x3263
+0x868B = 0x6952
+0x868C = 0x6953
+0x8693 = 0x694E
+0x8695 = 0x3B3D
+0x86A3 = 0x694F
+0x86A4 = 0x4742
+0x86A9 = 0x6950
+0x86AA = 0x6951
+0x86AB = 0x695B
+0x86AF = 0x6955
+0x86B0 = 0x6958
+0x86B6 = 0x6954
+0x86C4 = 0x6956
+0x86C6 = 0x6957
+0x86C7 = 0x3C58
+0x86C9 = 0x6959
+0x86CB = 0x4341
+0x86CD = 0x3756
+0x86CE = 0x3342
+0x86D4 = 0x695C
+0x86D9 = 0x333F
+0x86DB = 0x6961
+0x86DE = 0x695D
+0x86DF = 0x6960
+0x86E4 = 0x483A
+0x86E9 = 0x695E
+0x86EC = 0x695F
+0x86ED = 0x4948
+0x86EE = 0x485A
+0x86EF = 0x6962
+0x86F8 = 0x427D
+0x86F9 = 0x696C
+0x86FB = 0x6968
+0x86FE = 0x326B
+0x8700 = 0x6966
+0x8702 = 0x4B2A
+0x8703 = 0x6967
+0x8706 = 0x6964
+0x8708 = 0x6965
+0x8709 = 0x696A
+0x870A = 0x696D
+0x870D = 0x696B
+0x8711 = 0x6969
+0x8712 = 0x6963
+0x8718 = 0x4358
+0x871A = 0x6974
+0x871C = 0x4C2A
+0x8725 = 0x6972
+0x8729 = 0x6973
+0x8734 = 0x696E
+0x8737 = 0x6970
+0x873B = 0x6971
+0x873F = 0x696F
+0x8749 = 0x4066
+0x874B = 0x4F39
+0x874C = 0x6978
+0x874E = 0x6979
+0x8753 = 0x6A21
+0x8755 = 0x3F2A
+0x8757 = 0x697B
+0x8759 = 0x697E
+0x875F = 0x6976
+0x8760 = 0x6975
+0x8763 = 0x6A22
+0x8766 = 0x325C
+0x8768 = 0x697C
+0x876A = 0x6A23
+0x876E = 0x697D
+0x8774 = 0x697A
+0x8776 = 0x4433
+0x8778 = 0x6977
+0x877F = 0x4768
+0x8782 = 0x6A27
+0x878D = 0x4D3B
+0x879F = 0x6A26
+0x87A2 = 0x6A25
+0x87AB = 0x6A2E
+0x87AF = 0x6A28
+0x87B3 = 0x6A30
+0x87BA = 0x4D66
+0x87BB = 0x6A33
+0x87BD = 0x6A2A
+0x87C0 = 0x6A2B
+0x87C4 = 0x6A2F
+0x87C6 = 0x6A32
+0x87C7 = 0x6A31
+0x87CB = 0x6A29
+0x87D0 = 0x6A2C
+0x87D2 = 0x6A3D
+0x87E0 = 0x6A36
+0x87EF = 0x6A34
+0x87F2 = 0x6A35
+0x87F6 = 0x6A3A
+0x87F7 = 0x6A3B
+0x87F9 = 0x332A
+0x87FB = 0x3542
+0x87FE = 0x6A39
+0x8805 = 0x6A24
+0x880D = 0x6A38
+0x880E = 0x6A3C
+0x880F = 0x6A37
+0x8811 = 0x6A3E
+0x8815 = 0x6A40
+0x8816 = 0x6A3F
+0x8821 = 0x6A42
+0x8822 = 0x6A41
+0x8823 = 0x695A
+0x8827 = 0x6A46
+0x8831 = 0x6A43
+0x8836 = 0x6A44
+0x8839 = 0x6A45
+0x883B = 0x6A47
+0x8840 = 0x376C
+0x8842 = 0x6A49
+0x8844 = 0x6A48
+0x8846 = 0x3D30
+0x884C = 0x3954
+0x884D = 0x5E27
+0x8852 = 0x6A4A
+0x8853 = 0x3D51
+0x8857 = 0x3339
+0x8859 = 0x6A4B
+0x885B = 0x3152
+0x885D = 0x3E57
+0x885E = 0x6A4C
+0x8861 = 0x3955
+0x8862 = 0x6A4D
+0x8863 = 0x3061
+0x8868 = 0x493D
+0x886B = 0x6A4E
+0x8870 = 0x3F6A
+0x8872 = 0x6A55
+0x8875 = 0x6A52
+0x8877 = 0x436F
+0x887D = 0x6A53
+0x887E = 0x6A50
+0x887F = 0x365E
+0x8881 = 0x6A4F
+0x8882 = 0x6A56
+0x8888 = 0x3736
+0x888B = 0x425E
+0x888D = 0x6A5C
+0x8892 = 0x6A58
+0x8896 = 0x4235
+0x8897 = 0x6A57
+0x8899 = 0x6A5A
+0x889E = 0x6A51
+0x88A2 = 0x6A5B
+0x88A4 = 0x6A5D
+0x88AB = 0x486F
+0x88AE = 0x6A59
+0x88B0 = 0x6A5E
+0x88B1 = 0x6A60
+0x88B4 = 0x3853
+0x88B5 = 0x6A54
+0x88B7 = 0x3041
+0x88BF = 0x6A5F
+0x88C1 = 0x3A5B
+0x88C2 = 0x4E76
+0x88C3 = 0x6A61
+0x88C4 = 0x6A62
+0x88C5 = 0x4175
+0x88CF = 0x4E22
+0x88D4 = 0x6A63
+0x88D5 = 0x4D35
+0x88D8 = 0x6A64
+0x88D9 = 0x6A65
+0x88DC = 0x4A64
+0x88DD = 0x6A66
+0x88DF = 0x3A40
+0x88E1 = 0x4E23
+0x88E8 = 0x6A6B
+0x88F2 = 0x6A6C
+0x88F3 = 0x3E58
+0x88F4 = 0x6A6A
+0x88F8 = 0x4D67
+0x88F9 = 0x6A67
+0x88FC = 0x6A69
+0x88FD = 0x403D
+0x88FE = 0x3F7E
+0x8902 = 0x6A68
+0x8904 = 0x6A6D
+0x8907 = 0x4A23
+0x890A = 0x6A6F
+0x890C = 0x6A6E
+0x8910 = 0x336C
+0x8912 = 0x4B2B
+0x8913 = 0x6A70
+0x891D = 0x6A7C
+0x891E = 0x6A72
+0x8925 = 0x6A73
+0x892A = 0x6A74
+0x892B = 0x6A75
+0x8936 = 0x6A79
+0x8938 = 0x6A7A
+0x893B = 0x6A78
+0x8941 = 0x6A76
+0x8943 = 0x6A71
+0x8944 = 0x6A77
+0x894C = 0x6A7B
+0x894D = 0x7037
+0x8956 = 0x3228
+0x895E = 0x6A7E
+0x895F = 0x365F
+0x8960 = 0x6A7D
+0x8964 = 0x6B22
+0x8966 = 0x6B21
+0x896A = 0x6B24
+0x896D = 0x6B23
+0x896F = 0x6B25
+0x8972 = 0x3D31
+0x8974 = 0x6B26
+0x8977 = 0x6B27
+0x897E = 0x6B28
+0x897F = 0x403E
+0x8981 = 0x4D57
+0x8983 = 0x6B29
+0x8986 = 0x4A24
+0x8987 = 0x4746
+0x8988 = 0x6B2A
+0x898A = 0x6B2B
+0x898B = 0x382B
+0x898F = 0x352C
+0x8993 = 0x6B2C
+0x8996 = 0x3B6B
+0x8997 = 0x4741
+0x8998 = 0x6B2D
+0x899A = 0x3350
+0x89A1 = 0x6B2E
+0x89A6 = 0x6B30
+0x89A7 = 0x4D77
+0x89A9 = 0x6B2F
+0x89AA = 0x3F46
+0x89AC = 0x6B31
+0x89AF = 0x6B32
+0x89B2 = 0x6B33
+0x89B3 = 0x3451
+0x89BA = 0x6B34
+0x89BD = 0x6B35
+0x89BF = 0x6B36
+0x89C0 = 0x6B37
+0x89D2 = 0x3351
+0x89DA = 0x6B38
+0x89DC = 0x6B39
+0x89DD = 0x6B3A
+0x89E3 = 0x3272
+0x89E6 = 0x3F28
+0x89E7 = 0x6B3B
+0x89F4 = 0x6B3C
+0x89F8 = 0x6B3D
+0x8A00 = 0x3840
+0x8A02 = 0x447B
+0x8A03 = 0x6B3E
+0x8A08 = 0x3757
+0x8A0A = 0x3F56
+0x8A0C = 0x6B41
+0x8A0E = 0x4624
+0x8A10 = 0x6B40
+0x8A13 = 0x3731
+0x8A16 = 0x6B3F
+0x8A17 = 0x4277
+0x8A18 = 0x352D
+0x8A1B = 0x6B42
+0x8A1D = 0x6B43
+0x8A1F = 0x3E59
+0x8A23 = 0x376D
+0x8A25 = 0x6B44
+0x8A2A = 0x4B2C
+0x8A2D = 0x405F
+0x8A31 = 0x3576
+0x8A33 = 0x4C75
+0x8A34 = 0x414A
+0x8A36 = 0x6B45
+0x8A3A = 0x3F47
+0x8A3B = 0x4370
+0x8A3C = 0x3E5A
+0x8A41 = 0x6B46
+0x8A46 = 0x6B49
+0x8A48 = 0x6B4A
+0x8A50 = 0x3A3E
+0x8A51 = 0x4242
+0x8A52 = 0x6B48
+0x8A54 = 0x3E5B
+0x8A55 = 0x493E
+0x8A5B = 0x6B47
+0x8A5E = 0x3B6C
+0x8A60 = 0x3153
+0x8A62 = 0x6B4E
+0x8A63 = 0x3758
+0x8A66 = 0x3B6E
+0x8A69 = 0x3B6D
+0x8A6B = 0x4F4D
+0x8A6C = 0x6B4D
+0x8A6D = 0x6B4C
+0x8A6E = 0x4127
+0x8A70 = 0x354D
+0x8A71 = 0x4F43
+0x8A72 = 0x333A
+0x8A73 = 0x3E5C
+0x8A7C = 0x6B4B
+0x8A82 = 0x6B50
+0x8A84 = 0x6B51
+0x8A85 = 0x6B4F
+0x8A87 = 0x3858
+0x8A89 = 0x4D40
+0x8A8C = 0x3B6F
+0x8A8D = 0x4727
+0x8A91 = 0x6B54
+0x8A93 = 0x4040
+0x8A95 = 0x4342
+0x8A98 = 0x4D36
+0x8A9A = 0x6B57
+0x8A9E = 0x386C
+0x8AA0 = 0x403F
+0x8AA1 = 0x6B53
+0x8AA3 = 0x6B58
+0x8AA4 = 0x386D
+0x8AA5 = 0x6B55
+0x8AA6 = 0x6B56
+0x8AA8 = 0x6B52
+0x8AAC = 0x4062
+0x8AAD = 0x4649
+0x8AB0 = 0x432F
+0x8AB2 = 0x325D
+0x8AB9 = 0x4870
+0x8ABC = 0x3543
+0x8ABF = 0x4434
+0x8AC2 = 0x6B5B
+0x8AC4 = 0x6B59
+0x8AC7 = 0x434C
+0x8ACB = 0x4041
+0x8ACC = 0x3452
+0x8ACD = 0x6B5A
+0x8ACF = 0x3F5B
+0x8AD2 = 0x4E4A
+0x8AD6 = 0x4F40
+0x8ADA = 0x6B5C
+0x8ADB = 0x6B67
+0x8ADC = 0x4435
+0x8ADE = 0x6B66
+0x8AE0 = 0x6B63
+0x8AE1 = 0x6B6B
+0x8AE2 = 0x6B64
+0x8AE4 = 0x6B60
+0x8AE6 = 0x447C
+0x8AE7 = 0x6B5F
+0x8AEB = 0x6B5D
+0x8AED = 0x4D21
+0x8AEE = 0x3B70
+0x8AF1 = 0x6B61
+0x8AF3 = 0x6B5E
+0x8AF7 = 0x6B65
+0x8AF8 = 0x3D74
+0x8AFA = 0x3841
+0x8AFE = 0x427A
+0x8B00 = 0x4B45
+0x8B01 = 0x315A
+0x8B02 = 0x3062
+0x8B04 = 0x4625
+0x8B07 = 0x6B69
+0x8B0C = 0x6B68
+0x8B0E = 0x4666
+0x8B10 = 0x6B6D
+0x8B14 = 0x6B62
+0x8B16 = 0x6B6C
+0x8B17 = 0x6B6E
+0x8B19 = 0x382C
+0x8B1A = 0x6B6A
+0x8B1B = 0x3956
+0x8B1D = 0x3C55
+0x8B20 = 0x6B6F
+0x8B21 = 0x4D58
+0x8B26 = 0x6B72
+0x8B28 = 0x6B75
+0x8B2B = 0x6B73
+0x8B2C = 0x4935
+0x8B33 = 0x6B70
+0x8B39 = 0x3660
+0x8B3E = 0x6B74
+0x8B41 = 0x6B76
+0x8B49 = 0x6B7A
+0x8B4C = 0x6B77
+0x8B4E = 0x6B79
+0x8B4F = 0x6B78
+0x8B56 = 0x6B7B
+0x8B58 = 0x3C31
+0x8B5A = 0x6B7D
+0x8B5B = 0x6B7C
+0x8B5C = 0x4968
+0x8B5F = 0x6C21
+0x8B66 = 0x3759
+0x8B6B = 0x6B7E
+0x8B6C = 0x6C22
+0x8B6F = 0x6C23
+0x8B70 = 0x3544
+0x8B71 = 0x6641
+0x8B72 = 0x3E79
+0x8B74 = 0x6C24
+0x8B77 = 0x386E
+0x8B7D = 0x6C25
+0x8B80 = 0x6C26
+0x8B83 = 0x3B3E
+0x8B8A = 0x5A4E
+0x8B8C = 0x6C27
+0x8B8E = 0x6C28
+0x8B90 = 0x3D32
+0x8B92 = 0x6C29
+0x8B93 = 0x6C2A
+0x8B96 = 0x6C2B
+0x8B99 = 0x6C2C
+0x8B9A = 0x6C2D
+0x8C37 = 0x432B
+0x8C3A = 0x6C2E
+0x8C3F = 0x6C30
+0x8C41 = 0x6C2F
+0x8C46 = 0x4626
+0x8C48 = 0x6C31
+0x8C4A = 0x4B2D
+0x8C4C = 0x6C32
+0x8C4E = 0x6C33
+0x8C50 = 0x6C34
+0x8C55 = 0x6C35
+0x8C5A = 0x465A
+0x8C61 = 0x3E5D
+0x8C62 = 0x6C36
+0x8C6A = 0x396B
+0x8C6B = 0x502E
+0x8C6C = 0x6C37
+0x8C78 = 0x6C38
+0x8C79 = 0x493F
+0x8C7A = 0x6C39
+0x8C7C = 0x6C41
+0x8C82 = 0x6C3A
+0x8C85 = 0x6C3C
+0x8C89 = 0x6C3B
+0x8C8A = 0x6C3D
+0x8C8C = 0x4B46
+0x8C8D = 0x6C3E
+0x8C8E = 0x6C3F
+0x8C94 = 0x6C40
+0x8C98 = 0x6C42
+0x8C9D = 0x332D
+0x8C9E = 0x4467
+0x8CA0 = 0x4969
+0x8CA1 = 0x3A62
+0x8CA2 = 0x3957
+0x8CA7 = 0x494F
+0x8CA8 = 0x325F
+0x8CA9 = 0x484E
+0x8CAA = 0x6C45
+0x8CAB = 0x3453
+0x8CAC = 0x4055
+0x8CAD = 0x6C44
+0x8CAE = 0x6C49
+0x8CAF = 0x4379
+0x8CB0 = 0x4C63
+0x8CB2 = 0x6C47
+0x8CB3 = 0x6C48
+0x8CB4 = 0x352E
+0x8CB6 = 0x6C4A
+0x8CB7 = 0x4763
+0x8CB8 = 0x425F
+0x8CBB = 0x4871
+0x8CBC = 0x453D
+0x8CBD = 0x6C46
+0x8CBF = 0x4B47
+0x8CC0 = 0x326C
+0x8CC1 = 0x6C4C
+0x8CC2 = 0x4F28
+0x8CC3 = 0x4442
+0x8CC4 = 0x4F45
+0x8CC7 = 0x3B71
+0x8CC8 = 0x6C4B
+0x8CCA = 0x4231
+0x8CCD = 0x6C5C
+0x8CCE = 0x4128
+0x8CD1 = 0x4678
+0x8CD3 = 0x4950
+0x8CDA = 0x6C4F
+0x8CDB = 0x3B3F
+0x8CDC = 0x3B72
+0x8CDE = 0x3E5E
+0x8CE0 = 0x4765
+0x8CE2 = 0x382D
+0x8CE3 = 0x6C4E
+0x8CE4 = 0x6C4D
+0x8CE6 = 0x496A
+0x8CEA = 0x3C41
+0x8CED = 0x4552
+0x8CFA = 0x6C51
+0x8CFB = 0x6C52
+0x8CFC = 0x3958
+0x8CFD = 0x6C50
+0x8D04 = 0x6C53
+0x8D05 = 0x6C54
+0x8D07 = 0x6C56
+0x8D08 = 0x4223
+0x8D0A = 0x6C55
+0x8D0B = 0x3466
+0x8D0D = 0x6C58
+0x8D0F = 0x6C57
+0x8D10 = 0x6C59
+0x8D13 = 0x6C5B
+0x8D14 = 0x6C5D
+0x8D16 = 0x6C5E
+0x8D64 = 0x4056
+0x8D66 = 0x3C4F
+0x8D67 = 0x6C5F
+0x8D6B = 0x3352
+0x8D6D = 0x6C60
+0x8D70 = 0x4176
+0x8D71 = 0x6C61
+0x8D73 = 0x6C62
+0x8D74 = 0x496B
+0x8D77 = 0x352F
+0x8D81 = 0x6C63
+0x8D85 = 0x4436
+0x8D8A = 0x315B
+0x8D99 = 0x6C64
+0x8DA3 = 0x3C71
+0x8DA8 = 0x3F76
+0x8DB3 = 0x422D
+0x8DBA = 0x6C67
+0x8DBE = 0x6C66
+0x8DC2 = 0x6C65
+0x8DCB = 0x6C6D
+0x8DCC = 0x6C6B
+0x8DCF = 0x6C68
+0x8DD6 = 0x6C6A
+0x8DDA = 0x6C69
+0x8DDB = 0x6C6C
+0x8DDD = 0x3577
+0x8DDF = 0x6C70
+0x8DE1 = 0x4057
+0x8DE3 = 0x6C71
+0x8DE8 = 0x3859
+0x8DEA = 0x6C6E
+0x8DEB = 0x6C6F
+0x8DEF = 0x4F29
+0x8DF3 = 0x4437
+0x8DF5 = 0x4129
+0x8DFC = 0x6C72
+0x8DFF = 0x6C75
+0x8E08 = 0x6C73
+0x8E09 = 0x6C74
+0x8E0A = 0x4D59
+0x8E0F = 0x4627
+0x8E10 = 0x6C78
+0x8E1D = 0x6C76
+0x8E1E = 0x6C77
+0x8E1F = 0x6C79
+0x8E2A = 0x6D29
+0x8E30 = 0x6C7C
+0x8E34 = 0x6C7D
+0x8E35 = 0x6C7B
+0x8E42 = 0x6C7A
+0x8E44 = 0x447D
+0x8E47 = 0x6D21
+0x8E48 = 0x6D25
+0x8E49 = 0x6D22
+0x8E4A = 0x6C7E
+0x8E4C = 0x6D23
+0x8E50 = 0x6D24
+0x8E55 = 0x6D2B
+0x8E59 = 0x6D26
+0x8E5F = 0x4058
+0x8E60 = 0x6D28
+0x8E63 = 0x6D2A
+0x8E64 = 0x6D27
+0x8E72 = 0x6D2D
+0x8E74 = 0x3D33
+0x8E76 = 0x6D2C
+0x8E7C = 0x6D2E
+0x8E81 = 0x6D2F
+0x8E84 = 0x6D32
+0x8E85 = 0x6D31
+0x8E87 = 0x6D30
+0x8E8A = 0x6D34
+0x8E8B = 0x6D33
+0x8E8D = 0x4C76
+0x8E91 = 0x6D36
+0x8E93 = 0x6D35
+0x8E94 = 0x6D37
+0x8E99 = 0x6D38
+0x8EA1 = 0x6D3A
+0x8EAA = 0x6D39
+0x8EAB = 0x3F48
+0x8EAC = 0x6D3B
+0x8EAF = 0x366D
+0x8EB0 = 0x6D3C
+0x8EB1 = 0x6D3E
+0x8EBE = 0x6D3F
+0x8EC5 = 0x6D40
+0x8EC6 = 0x6D3D
+0x8EC8 = 0x6D41
+0x8ECA = 0x3C56
+0x8ECB = 0x6D42
+0x8ECC = 0x3530
+0x8ECD = 0x3733
+0x8ED2 = 0x382E
+0x8EDB = 0x6D43
+0x8EDF = 0x4670
+0x8EE2 = 0x453E
+0x8EE3 = 0x6D44
+0x8EEB = 0x6D47
+0x8EF8 = 0x3C34
+0x8EFB = 0x6D46
+0x8EFC = 0x6D45
+0x8EFD = 0x375A
+0x8EFE = 0x6D48
+0x8F03 = 0x3353
+0x8F05 = 0x6D4A
+0x8F09 = 0x3A5C
+0x8F0A = 0x6D49
+0x8F0C = 0x6D52
+0x8F12 = 0x6D4C
+0x8F13 = 0x6D4E
+0x8F14 = 0x4A65
+0x8F15 = 0x6D4B
+0x8F19 = 0x6D4D
+0x8F1B = 0x6D51
+0x8F1C = 0x6D4F
+0x8F1D = 0x3531
+0x8F1F = 0x6D50
+0x8F26 = 0x6D53
+0x8F29 = 0x475A
+0x8F2A = 0x4E58
+0x8F2F = 0x3D34
+0x8F33 = 0x6D54
+0x8F38 = 0x4D22
+0x8F39 = 0x6D56
+0x8F3B = 0x6D55
+0x8F3E = 0x6D59
+0x8F3F = 0x4D41
+0x8F42 = 0x6D58
+0x8F44 = 0x336D
+0x8F45 = 0x6D57
+0x8F46 = 0x6D5C
+0x8F49 = 0x6D5B
+0x8F4C = 0x6D5A
+0x8F4D = 0x4532
+0x8F4E = 0x6D5D
+0x8F57 = 0x6D5E
+0x8F5C = 0x6D5F
+0x8F5F = 0x396C
+0x8F61 = 0x3725
+0x8F62 = 0x6D60
+0x8F63 = 0x6D61
+0x8F64 = 0x6D62
+0x8F9B = 0x3F49
+0x8F9C = 0x6D63
+0x8F9E = 0x3C2D
+0x8F9F = 0x6D64
+0x8FA3 = 0x6D65
+0x8FA7 = 0x5221
+0x8FA8 = 0x517E
+0x8FAD = 0x6D66
+0x8FAE = 0x6570
+0x8FAF = 0x6D67
+0x8FB0 = 0x4324
+0x8FB1 = 0x3F2B
+0x8FB2 = 0x4740
+0x8FB7 = 0x6D68
+0x8FBA = 0x4A55
+0x8FBB = 0x4454
+0x8FBC = 0x397E
+0x8FBF = 0x4329
+0x8FC2 = 0x312A
+0x8FC4 = 0x4B78
+0x8FC5 = 0x3F57
+0x8FCE = 0x375E
+0x8FD1 = 0x3661
+0x8FD4 = 0x4A56
+0x8FDA = 0x6D69
+0x8FE2 = 0x6D6B
+0x8FE5 = 0x6D6A
+0x8FE6 = 0x3260
+0x8FE9 = 0x4676
+0x8FEA = 0x6D6C
+0x8FEB = 0x4777
+0x8FED = 0x4533
+0x8FEF = 0x6D6D
+0x8FF0 = 0x3D52
+0x8FF4 = 0x6D6F
+0x8FF7 = 0x4C42
+0x8FF8 = 0x6D7E
+0x8FF9 = 0x6D71
+0x8FFA = 0x6D72
+0x8FFD = 0x4449
+0x9000 = 0x4260
+0x9001 = 0x4177
+0x9003 = 0x4628
+0x9005 = 0x6D70
+0x9006 = 0x3555
+0x900B = 0x6D79
+0x900D = 0x6D76
+0x900E = 0x6E25
+0x900F = 0x4629
+0x9010 = 0x4360
+0x9011 = 0x6D73
+0x9013 = 0x447E
+0x9014 = 0x4553
+0x9015 = 0x6D74
+0x9016 = 0x6D78
+0x9017 = 0x3F60
+0x9019 = 0x4767
+0x901A = 0x444C
+0x901D = 0x4042
+0x901E = 0x6D77
+0x901F = 0x422E
+0x9020 = 0x4224
+0x9021 = 0x6D75
+0x9022 = 0x3029
+0x9023 = 0x4F22
+0x9027 = 0x6D7A
+0x902E = 0x4261
+0x9031 = 0x3D35
+0x9032 = 0x3F4A
+0x9035 = 0x6D7C
+0x9036 = 0x6D7B
+0x9038 = 0x306F
+0x9039 = 0x6D7D
+0x903C = 0x492F
+0x903E = 0x6E27
+0x9041 = 0x465B
+0x9042 = 0x3F6B
+0x9045 = 0x4359
+0x9047 = 0x3678
+0x9049 = 0x6E26
+0x904A = 0x4D37
+0x904B = 0x313F
+0x904D = 0x4A57
+0x904E = 0x3261
+0x904F = 0x6E21
+0x9050 = 0x6E22
+0x9051 = 0x6E23
+0x9052 = 0x6E24
+0x9053 = 0x463B
+0x9054 = 0x4323
+0x9055 = 0x3063
+0x9056 = 0x6E28
+0x9058 = 0x6E29
+0x9059 = 0x7423
+0x905C = 0x423D
+0x905E = 0x6E2A
+0x9060 = 0x3173
+0x9061 = 0x414C
+0x9063 = 0x382F
+0x9065 = 0x4D5A
+0x9068 = 0x6E2B
+0x9069 = 0x452C
+0x906D = 0x4178
+0x906E = 0x3C57
+0x906F = 0x6E2C
+0x9072 = 0x6E2F
+0x9075 = 0x3D65
+0x9076 = 0x6E2D
+0x9077 = 0x412B
+0x9078 = 0x412A
+0x907A = 0x3064
+0x907C = 0x4E4B
+0x907D = 0x6E31
+0x907F = 0x4872
+0x9080 = 0x6E33
+0x9081 = 0x6E32
+0x9082 = 0x6E30
+0x9083 = 0x6364
+0x9084 = 0x3454
+0x9087 = 0x6D6E
+0x9089 = 0x6E35
+0x908A = 0x6E34
+0x908F = 0x6E36
+0x9091 = 0x4D38
+0x90A3 = 0x4661
+0x90A6 = 0x4B2E
+0x90A8 = 0x6E37
+0x90AA = 0x3C59
+0x90AF = 0x6E38
+0x90B1 = 0x6E39
+0x90B5 = 0x6E3A
+0x90B8 = 0x4521
+0x90C1 = 0x306A
+0x90CA = 0x3959
+0x90CE = 0x4F3A
+0x90DB = 0x6E3E
+0x90E1 = 0x3734
+0x90E2 = 0x6E3B
+0x90E4 = 0x6E3C
+0x90E8 = 0x4974
+0x90ED = 0x3354
+0x90F5 = 0x4D39
+0x90F7 = 0x363F
+0x90FD = 0x4554
+0x9102 = 0x6E3F
+0x9112 = 0x6E40
+0x9119 = 0x6E41
+0x912D = 0x4522
+0x9130 = 0x6E43
+0x9132 = 0x6E42
+0x9149 = 0x4653
+0x914A = 0x6E44
+0x914B = 0x3D36
+0x914C = 0x3C60
+0x914D = 0x475B
+0x914E = 0x4371
+0x9152 = 0x3C72
+0x9154 = 0x3F6C
+0x9156 = 0x6E45
+0x9158 = 0x6E46
+0x9162 = 0x3F5D
+0x9163 = 0x6E47
+0x9165 = 0x6E48
+0x9169 = 0x6E49
+0x916A = 0x4D6F
+0x916C = 0x3D37
+0x9172 = 0x6E4B
+0x9173 = 0x6E4A
+0x9175 = 0x395A
+0x9177 = 0x3973
+0x9178 = 0x3B40
+0x9182 = 0x6E4E
+0x9187 = 0x3D66
+0x9189 = 0x6E4D
+0x918B = 0x6E4C
+0x918D = 0x4269
+0x9190 = 0x386F
+0x9192 = 0x4043
+0x9197 = 0x4830
+0x919C = 0x3D39
+0x91A2 = 0x6E4F
+0x91A4 = 0x3E5F
+0x91AA = 0x6E52
+0x91AB = 0x6E50
+0x91AF = 0x6E51
+0x91B4 = 0x6E54
+0x91B5 = 0x6E53
+0x91B8 = 0x3E7A
+0x91BA = 0x6E55
+0x91C0 = 0x6E56
+0x91C1 = 0x6E57
+0x91C6 = 0x4850
+0x91C7 = 0x3A53
+0x91C8 = 0x3C61
+0x91C9 = 0x6E58
+0x91CB = 0x6E59
+0x91CC = 0x4E24
+0x91CD = 0x3D45
+0x91CE = 0x4C6E
+0x91CF = 0x4E4C
+0x91D0 = 0x6E5A
+0x91D1 = 0x3662
+0x91D6 = 0x6E5B
+0x91D8 = 0x4523
+0x91DB = 0x6E5E
+0x91DC = 0x3378
+0x91DD = 0x3F4B
+0x91DF = 0x6E5C
+0x91E1 = 0x6E5D
+0x91E3 = 0x4460
+0x91E6 = 0x4B55
+0x91E7 = 0x367C
+0x91F5 = 0x6E60
+0x91F6 = 0x6E61
+0x91FC = 0x6E5F
+0x91FF = 0x6E63
+0x920D = 0x465F
+0x920E = 0x3343
+0x9211 = 0x6E67
+0x9214 = 0x6E64
+0x9215 = 0x6E66
+0x921E = 0x6E62
+0x9229 = 0x6F4F
+0x922C = 0x6E65
+0x9234 = 0x4E6B
+0x9237 = 0x385A
+0x923F = 0x6E6F
+0x9244 = 0x4534
+0x9245 = 0x6E6A
+0x9248 = 0x6E6D
+0x9249 = 0x6E6B
+0x924B = 0x6E70
+0x9250 = 0x6E71
+0x9257 = 0x6E69
+0x925A = 0x6E76
+0x925B = 0x3174
+0x925E = 0x6E68
+0x9262 = 0x482D
+0x9264 = 0x6E6C
+0x9266 = 0x3E60
+0x9271 = 0x395B
+0x927E = 0x4B48
+0x9280 = 0x3664
+0x9283 = 0x3D46
+0x9285 = 0x463C
+0x9291 = 0x412D
+0x9293 = 0x6E74
+0x9295 = 0x6E6E
+0x9296 = 0x6E73
+0x9298 = 0x4C43
+0x929A = 0x4438
+0x929B = 0x6E75
+0x929C = 0x6E72
+0x92AD = 0x412C
+0x92B7 = 0x6E79
+0x92B9 = 0x6E78
+0x92CF = 0x6E77
+0x92D2 = 0x4B2F
+0x92E4 = 0x3D7B
+0x92E9 = 0x6E7A
+0x92EA = 0x4A5F
+0x92ED = 0x3154
+0x92F2 = 0x4946
+0x92F3 = 0x4372
+0x92F8 = 0x3578
+0x92FA = 0x6E7C
+0x92FC = 0x395D
+0x9306 = 0x3B2C
+0x930F = 0x6E7B
+0x9310 = 0x3F6D
+0x9318 = 0x3F6E
+0x9319 = 0x6F21
+0x931A = 0x6F23
+0x9320 = 0x3E7B
+0x9322 = 0x6F22
+0x9323 = 0x6F24
+0x9326 = 0x3653
+0x9328 = 0x4945
+0x932B = 0x3C62
+0x932C = 0x4F23
+0x932E = 0x6E7E
+0x932F = 0x3A78
+0x9332 = 0x4F3F
+0x9335 = 0x6F26
+0x933A = 0x6F25
+0x933B = 0x6F27
+0x9344 = 0x6E7D
+0x934B = 0x4669
+0x934D = 0x4555
+0x9354 = 0x4457
+0x9356 = 0x6F2C
+0x935B = 0x4343
+0x935C = 0x6F28
+0x9360 = 0x6F29
+0x936C = 0x372D
+0x936E = 0x6F2B
+0x9375 = 0x3830
+0x937C = 0x6F2A
+0x937E = 0x3E61
+0x938C = 0x3379
+0x9394 = 0x6F30
+0x9396 = 0x3A3F
+0x9397 = 0x4179
+0x939A = 0x444A
+0x93A7 = 0x333B
+0x93AC = 0x6F2E
+0x93AD = 0x6F2F
+0x93AE = 0x4443
+0x93B0 = 0x6F2D
+0x93B9 = 0x6F31
+0x93C3 = 0x6F37
+0x93C8 = 0x6F3A
+0x93D0 = 0x6F39
+0x93D1 = 0x452D
+0x93D6 = 0x6F32
+0x93D7 = 0x6F33
+0x93D8 = 0x6F36
+0x93DD = 0x6F38
+0x93E1 = 0x3640
+0x93E4 = 0x6F3B
+0x93E5 = 0x6F35
+0x93E8 = 0x6F34
+0x9403 = 0x6F3F
+0x9407 = 0x6F40
+0x9410 = 0x6F41
+0x9413 = 0x6F3E
+0x9414 = 0x6F3D
+0x9418 = 0x3E62
+0x9419 = 0x462A
+0x941A = 0x6F3C
+0x9421 = 0x6F45
+0x942B = 0x6F43
+0x9435 = 0x6F44
+0x9436 = 0x6F42
+0x9438 = 0x4278
+0x943A = 0x6F46
+0x9441 = 0x6F47
+0x9444 = 0x6F49
+0x9451 = 0x3455
+0x9452 = 0x6F48
+0x9453 = 0x4C7A
+0x945A = 0x6F54
+0x945B = 0x6F4A
+0x945E = 0x6F4D
+0x9460 = 0x6F4B
+0x9462 = 0x6F4C
+0x946A = 0x6F4E
+0x9470 = 0x6F50
+0x9475 = 0x6F51
+0x9477 = 0x6F52
+0x947C = 0x6F55
+0x947D = 0x6F53
+0x947E = 0x6F56
+0x947F = 0x6F58
+0x9481 = 0x6F57
+0x9577 = 0x4439
+0x9580 = 0x4C67
+0x9582 = 0x6F59
+0x9583 = 0x412E
+0x9587 = 0x6F5A
+0x9589 = 0x4A44
+0x958A = 0x6F5B
+0x958B = 0x332B
+0x958F = 0x313C
+0x9591 = 0x3457
+0x9593 = 0x3456
+0x9594 = 0x6F5C
+0x9596 = 0x6F5D
+0x9598 = 0x6F5E
+0x9599 = 0x6F5F
+0x95A0 = 0x6F60
+0x95A2 = 0x3458
+0x95A3 = 0x3355
+0x95A4 = 0x395E
+0x95A5 = 0x4836
+0x95A7 = 0x6F62
+0x95A8 = 0x6F61
+0x95AD = 0x6F63
+0x95B2 = 0x315C
+0x95B9 = 0x6F66
+0x95BB = 0x6F65
+0x95BC = 0x6F64
+0x95BE = 0x6F67
+0x95C3 = 0x6F6A
+0x95C7 = 0x3047
+0x95CA = 0x6F68
+0x95CC = 0x6F6C
+0x95CD = 0x6F6B
+0x95D4 = 0x6F6E
+0x95D5 = 0x6F6D
+0x95D6 = 0x6F6F
+0x95D8 = 0x462E
+0x95DC = 0x6F70
+0x95E1 = 0x6F71
+0x95E2 = 0x6F73
+0x95E5 = 0x6F72
+0x961C = 0x496C
+0x9621 = 0x6F74
+0x9628 = 0x6F75
+0x962A = 0x3A65
+0x962E = 0x6F76
+0x962F = 0x6F77
+0x9632 = 0x4B49
+0x963B = 0x414B
+0x963F = 0x3024
+0x9640 = 0x424B
+0x9642 = 0x6F78
+0x9644 = 0x496D
+0x964B = 0x6F7B
+0x964C = 0x6F79
+0x964D = 0x395F
+0x964F = 0x6F7A
+0x9650 = 0x3842
+0x965B = 0x4A45
+0x965C = 0x6F7D
+0x965D = 0x7021
+0x965E = 0x6F7E
+0x965F = 0x7022
+0x9662 = 0x3121
+0x9663 = 0x3F58
+0x9664 = 0x3D7C
+0x9665 = 0x3459
+0x9666 = 0x7023
+0x966A = 0x4766
+0x966C = 0x7025
+0x9670 = 0x3122
+0x9672 = 0x7024
+0x9673 = 0x4444
+0x9675 = 0x4E4D
+0x9676 = 0x462B
+0x9677 = 0x6F7C
+0x9678 = 0x4E26
+0x967A = 0x3831
+0x967D = 0x4D5B
+0x9685 = 0x3679
+0x9686 = 0x4E34
+0x9688 = 0x3728
+0x968A = 0x4262
+0x968B = 0x6721
+0x968D = 0x7026
+0x968E = 0x332C
+0x968F = 0x3F6F
+0x9694 = 0x3356
+0x9695 = 0x7028
+0x9697 = 0x7029
+0x9698 = 0x7027
+0x9699 = 0x3764
+0x969B = 0x3A5D
+0x969C = 0x3E63
+0x96A0 = 0x3123
+0x96A3 = 0x4E59
+0x96A7 = 0x702B
+0x96A8 = 0x6E2E
+0x96AA = 0x702A
+0x96B0 = 0x702E
+0x96B1 = 0x702C
+0x96B2 = 0x702D
+0x96B4 = 0x702F
+0x96B6 = 0x7030
+0x96B7 = 0x4E6C
+0x96B8 = 0x7031
+0x96B9 = 0x7032
+0x96BB = 0x4049
+0x96BC = 0x483B
+0x96C0 = 0x3F7D
+0x96C1 = 0x3467
+0x96C4 = 0x4D3A
+0x96C5 = 0x326D
+0x96C6 = 0x3D38
+0x96C7 = 0x385B
+0x96C9 = 0x7035
+0x96CB = 0x7034
+0x96CC = 0x3B73
+0x96CD = 0x7036
+0x96CE = 0x7033
+0x96D1 = 0x3B28
+0x96D5 = 0x703A
+0x96D6 = 0x6A2D
+0x96D9 = 0x5256
+0x96DB = 0x3F77
+0x96DC = 0x7038
+0x96E2 = 0x4E25
+0x96E3 = 0x4671
+0x96E8 = 0x312B
+0x96EA = 0x4063
+0x96EB = 0x3C36
+0x96F0 = 0x4A37
+0x96F2 = 0x3140
+0x96F6 = 0x4E6D
+0x96F7 = 0x4D6B
+0x96F9 = 0x703B
+0x96FB = 0x4545
+0x9700 = 0x3C7B
+0x9704 = 0x703C
+0x9706 = 0x703D
+0x9707 = 0x3F4C
+0x9708 = 0x703E
+0x970A = 0x4E6E
+0x970D = 0x7039
+0x970E = 0x7040
+0x970F = 0x7042
+0x9711 = 0x7041
+0x9713 = 0x703F
+0x9716 = 0x7043
+0x9719 = 0x7044
+0x971C = 0x417A
+0x971E = 0x3262
+0x9724 = 0x7045
+0x9727 = 0x4C38
+0x972A = 0x7046
+0x9730 = 0x7047
+0x9732 = 0x4F2A
+0x9738 = 0x5B31
+0x9739 = 0x7048
+0x973D = 0x7049
+0x973E = 0x704A
+0x9742 = 0x704E
+0x9744 = 0x704B
+0x9746 = 0x704C
+0x9748 = 0x704D
+0x9749 = 0x704F
+0x9752 = 0x4044
+0x9756 = 0x4C77
+0x9759 = 0x4045
+0x975C = 0x7050
+0x975E = 0x4873
+0x9760 = 0x7051
+0x9761 = 0x7353
+0x9762 = 0x4C4C
+0x9764 = 0x7052
+0x9766 = 0x7053
+0x9768 = 0x7054
+0x9769 = 0x3357
+0x976B = 0x7056
+0x976D = 0x3F59
+0x9771 = 0x7057
+0x9774 = 0x3724
+0x9779 = 0x7058
+0x977A = 0x705C
+0x977C = 0x705A
+0x9781 = 0x705B
+0x9784 = 0x3373
+0x9785 = 0x7059
+0x9786 = 0x705D
+0x978B = 0x705E
+0x978D = 0x3048
+0x978F = 0x705F
+0x9790 = 0x7060
+0x9798 = 0x3E64
+0x979C = 0x7061
+0x97A0 = 0x3547
+0x97A3 = 0x7064
+0x97A6 = 0x7063
+0x97A8 = 0x7062
+0x97AB = 0x6B71
+0x97AD = 0x4A5C
+0x97B3 = 0x7065
+0x97B4 = 0x7066
+0x97C3 = 0x7067
+0x97C6 = 0x7068
+0x97C8 = 0x7069
+0x97CB = 0x706A
+0x97D3 = 0x345A
+0x97DC = 0x706B
+0x97ED = 0x706C
+0x97EE = 0x4723
+0x97F2 = 0x706E
+0x97F3 = 0x323B
+0x97F5 = 0x7071
+0x97F6 = 0x7070
+0x97FB = 0x3124
+0x97FF = 0x3641
+0x9801 = 0x4A47
+0x9802 = 0x443A
+0x9803 = 0x3A22
+0x9805 = 0x3960
+0x9806 = 0x3D67
+0x9808 = 0x3F5C
+0x980C = 0x7073
+0x980F = 0x7072
+0x9810 = 0x4D42
+0x9811 = 0x3468
+0x9812 = 0x4852
+0x9813 = 0x465C
+0x9817 = 0x3F7C
+0x9818 = 0x4E4E
+0x981A = 0x375B
+0x9821 = 0x7076
+0x9824 = 0x7075
+0x982C = 0x4B4B
+0x982D = 0x462C
+0x9834 = 0x3150
+0x9837 = 0x7077
+0x9838 = 0x7074
+0x983B = 0x4951
+0x983C = 0x4D6A
+0x983D = 0x7078
+0x9846 = 0x7079
+0x984B = 0x707B
+0x984C = 0x426A
+0x984D = 0x335B
+0x984E = 0x335C
+0x984F = 0x707A
+0x9854 = 0x3469
+0x9855 = 0x3832
+0x9858 = 0x346A
+0x985B = 0x453F
+0x985E = 0x4E60
+0x9867 = 0x385C
+0x986B = 0x707C
+0x986F = 0x707D
+0x9870 = 0x707E
+0x9871 = 0x7121
+0x9873 = 0x7123
+0x9874 = 0x7122
+0x98A8 = 0x4977
+0x98AA = 0x7124
+0x98AF = 0x7125
+0x98B1 = 0x7126
+0x98B6 = 0x7127
+0x98C3 = 0x7129
+0x98C4 = 0x7128
+0x98C6 = 0x712A
+0x98DB = 0x4874
+0x98DC = 0x664C
+0x98DF = 0x3F29
+0x98E2 = 0x3532
+0x98E9 = 0x712B
+0x98EB = 0x712C
+0x98ED = 0x522C
+0x98EE = 0x5D3B
+0x98EF = 0x4853
+0x98F2 = 0x307B
+0x98F4 = 0x303B
+0x98FC = 0x3B74
+0x98FD = 0x4B30
+0x98FE = 0x3E7E
+0x9903 = 0x712D
+0x9905 = 0x4C5F
+0x9909 = 0x712E
+0x990A = 0x4D5C
+0x990C = 0x3142
+0x9910 = 0x3B41
+0x9912 = 0x712F
+0x9913 = 0x326E
+0x9914 = 0x7130
+0x9918 = 0x7131
+0x991D = 0x7133
+0x991E = 0x7134
+0x9920 = 0x7136
+0x9921 = 0x7132
+0x9924 = 0x7135
+0x9928 = 0x345B
+0x992C = 0x7137
+0x992E = 0x7138
+0x993D = 0x7139
+0x993E = 0x713A
+0x9942 = 0x713B
+0x9945 = 0x713D
+0x9949 = 0x713C
+0x994B = 0x713F
+0x994C = 0x7142
+0x9950 = 0x713E
+0x9951 = 0x7140
+0x9952 = 0x7141
+0x9955 = 0x7143
+0x9957 = 0x3642
+0x9996 = 0x3C73
+0x9997 = 0x7144
+0x9998 = 0x7145
+0x9999 = 0x3961
+0x99A5 = 0x7146
+0x99A8 = 0x333E
+0x99AC = 0x474F
+0x99AD = 0x7147
+0x99AE = 0x7148
+0x99B3 = 0x435A
+0x99B4 = 0x466B
+0x99BC = 0x7149
+0x99C1 = 0x477D
+0x99C4 = 0x424C
+0x99C5 = 0x3158
+0x99C6 = 0x366E
+0x99C8 = 0x366F
+0x99D0 = 0x4373
+0x99D1 = 0x714E
+0x99D2 = 0x3670
+0x99D5 = 0x326F
+0x99D8 = 0x714D
+0x99DB = 0x714B
+0x99DD = 0x714C
+0x99DF = 0x714A
+0x99E2 = 0x7158
+0x99ED = 0x714F
+0x99EE = 0x7150
+0x99F1 = 0x7151
+0x99F2 = 0x7152
+0x99F8 = 0x7154
+0x99FB = 0x7153
+0x99FF = 0x3D59
+0x9A01 = 0x7155
+0x9A05 = 0x7157
+0x9A0E = 0x3533
+0x9A0F = 0x7156
+0x9A12 = 0x417B
+0x9A13 = 0x3833
+0x9A19 = 0x7159
+0x9A28 = 0x424D
+0x9A2B = 0x715A
+0x9A30 = 0x462D
+0x9A37 = 0x715B
+0x9A3E = 0x7160
+0x9A40 = 0x715E
+0x9A42 = 0x715D
+0x9A43 = 0x715F
+0x9A45 = 0x715C
+0x9A4D = 0x7162
+0x9A55 = 0x7161
+0x9A57 = 0x7164
+0x9A5A = 0x3643
+0x9A5B = 0x7163
+0x9A5F = 0x7165
+0x9A62 = 0x7166
+0x9A64 = 0x7168
+0x9A65 = 0x7167
+0x9A69 = 0x7169
+0x9A6A = 0x716B
+0x9A6B = 0x716A
+0x9AA8 = 0x397C
+0x9AAD = 0x716C
+0x9AB0 = 0x716D
+0x9AB8 = 0x333C
+0x9ABC = 0x716E
+0x9AC0 = 0x716F
+0x9AC4 = 0x3F71
+0x9ACF = 0x7170
+0x9AD1 = 0x7171
+0x9AD3 = 0x7172
+0x9AD4 = 0x7173
+0x9AD8 = 0x3962
+0x9ADE = 0x7174
+0x9ADF = 0x7175
+0x9AE2 = 0x7176
+0x9AE3 = 0x7177
+0x9AE6 = 0x7178
+0x9AEA = 0x4831
+0x9AEB = 0x717A
+0x9AED = 0x4926
+0x9AEE = 0x717B
+0x9AEF = 0x7179
+0x9AF1 = 0x717D
+0x9AF4 = 0x717C
+0x9AF7 = 0x717E
+0x9AFB = 0x7221
+0x9B06 = 0x7222
+0x9B18 = 0x7223
+0x9B1A = 0x7224
+0x9B1F = 0x7225
+0x9B22 = 0x7226
+0x9B23 = 0x7227
+0x9B25 = 0x7228
+0x9B27 = 0x7229
+0x9B28 = 0x722A
+0x9B29 = 0x722B
+0x9B2A = 0x722C
+0x9B2E = 0x722D
+0x9B2F = 0x722E
+0x9B31 = 0x5D35
+0x9B32 = 0x722F
+0x9B3B = 0x6478
+0x9B3C = 0x3534
+0x9B41 = 0x3321
+0x9B42 = 0x3A32
+0x9B43 = 0x7231
+0x9B44 = 0x7230
+0x9B45 = 0x4C25
+0x9B4D = 0x7233
+0x9B4E = 0x7234
+0x9B4F = 0x7232
+0x9B51 = 0x7235
+0x9B54 = 0x4B62
+0x9B58 = 0x7236
+0x9B5A = 0x357B
+0x9B6F = 0x4F25
+0x9B74 = 0x7237
+0x9B83 = 0x7239
+0x9B8E = 0x303E
+0x9B91 = 0x723A
+0x9B92 = 0x4A2B
+0x9B93 = 0x7238
+0x9B96 = 0x723B
+0x9B97 = 0x723C
+0x9B9F = 0x723D
+0x9BA0 = 0x723E
+0x9BA8 = 0x723F
+0x9BAA = 0x4B6E
+0x9BAB = 0x3B2D
+0x9BAD = 0x3A7A
+0x9BAE = 0x412F
+0x9BB4 = 0x7240
+0x9BB9 = 0x7243
+0x9BC0 = 0x7241
+0x9BC6 = 0x7244
+0x9BC9 = 0x3871
+0x9BCA = 0x7242
+0x9BCF = 0x7245
+0x9BD1 = 0x7246
+0x9BD2 = 0x7247
+0x9BD4 = 0x724B
+0x9BD6 = 0x3B2A
+0x9BDB = 0x4264
+0x9BE1 = 0x724C
+0x9BE2 = 0x7249
+0x9BE3 = 0x7248
+0x9BE4 = 0x724A
+0x9BE8 = 0x375F
+0x9BF0 = 0x7250
+0x9BF1 = 0x724F
+0x9BF2 = 0x724E
+0x9BF5 = 0x3033
+0x9C04 = 0x725A
+0x9C06 = 0x7256
+0x9C08 = 0x7257
+0x9C09 = 0x7253
+0x9C0A = 0x7259
+0x9C0C = 0x7255
+0x9C0D = 0x3362
+0x9C10 = 0x4F4C
+0x9C12 = 0x7258
+0x9C13 = 0x7254
+0x9C14 = 0x7252
+0x9C15 = 0x7251
+0x9C1B = 0x725C
+0x9C21 = 0x725F
+0x9C24 = 0x725E
+0x9C25 = 0x725D
+0x9C2D = 0x4949
+0x9C2E = 0x725B
+0x9C2F = 0x3073
+0x9C30 = 0x7260
+0x9C32 = 0x7262
+0x9C39 = 0x336F
+0x9C3A = 0x724D
+0x9C3B = 0x3137
+0x9C3E = 0x7264
+0x9C46 = 0x7263
+0x9C47 = 0x7261
+0x9C48 = 0x432D
+0x9C52 = 0x4B70
+0x9C57 = 0x4E5A
+0x9C5A = 0x7265
+0x9C60 = 0x7266
+0x9C67 = 0x7267
+0x9C76 = 0x7268
+0x9C78 = 0x7269
+0x9CE5 = 0x443B
+0x9CE7 = 0x726A
+0x9CE9 = 0x4837
+0x9CEB = 0x726F
+0x9CEC = 0x726B
+0x9CF0 = 0x726C
+0x9CF3 = 0x4B31
+0x9CF4 = 0x4C44
+0x9CF6 = 0x4650
+0x9D03 = 0x7270
+0x9D06 = 0x7271
+0x9D07 = 0x463E
+0x9D08 = 0x726E
+0x9D09 = 0x726D
+0x9D0E = 0x322A
+0x9D12 = 0x7279
+0x9D15 = 0x7278
+0x9D1B = 0x3175
+0x9D1F = 0x7276
+0x9D23 = 0x7275
+0x9D26 = 0x7273
+0x9D28 = 0x337B
+0x9D2A = 0x7272
+0x9D2B = 0x3C32
+0x9D2C = 0x3229
+0x9D3B = 0x3963
+0x9D3E = 0x727C
+0x9D3F = 0x727B
+0x9D41 = 0x727A
+0x9D44 = 0x7277
+0x9D46 = 0x727D
+0x9D48 = 0x727E
+0x9D50 = 0x7325
+0x9D51 = 0x7324
+0x9D59 = 0x7326
+0x9D5C = 0x312D
+0x9D5D = 0x7321
+0x9D5E = 0x7322
+0x9D60 = 0x3974
+0x9D61 = 0x4C39
+0x9D64 = 0x7323
+0x9D6C = 0x4B32
+0x9D6F = 0x732B
+0x9D72 = 0x7327
+0x9D7A = 0x732C
+0x9D87 = 0x7329
+0x9D89 = 0x7328
+0x9D8F = 0x375C
+0x9D9A = 0x732D
+0x9DA4 = 0x732E
+0x9DA9 = 0x732F
+0x9DAB = 0x732A
+0x9DAF = 0x7274
+0x9DB2 = 0x7330
+0x9DB4 = 0x4461
+0x9DB8 = 0x7334
+0x9DBA = 0x7335
+0x9DBB = 0x7333
+0x9DC1 = 0x7332
+0x9DC2 = 0x7338
+0x9DC4 = 0x7331
+0x9DC6 = 0x7336
+0x9DCF = 0x7337
+0x9DD3 = 0x733A
+0x9DD9 = 0x7339
+0x9DE6 = 0x733C
+0x9DED = 0x733D
+0x9DEF = 0x733E
+0x9DF2 = 0x4F49
+0x9DF8 = 0x733B
+0x9DF9 = 0x426B
+0x9DFA = 0x3A6D
+0x9DFD = 0x733F
+0x9E1A = 0x7340
+0x9E1B = 0x7341
+0x9E1E = 0x7342
+0x9E75 = 0x7343
+0x9E78 = 0x3834
+0x9E79 = 0x7344
+0x9E7D = 0x7345
+0x9E7F = 0x3C2F
+0x9E81 = 0x7346
+0x9E88 = 0x7347
+0x9E8B = 0x7348
+0x9E8C = 0x7349
+0x9E91 = 0x734C
+0x9E92 = 0x734A
+0x9E93 = 0x4F3C
+0x9E95 = 0x734B
+0x9E97 = 0x4E6F
+0x9E9D = 0x734D
+0x9E9F = 0x4E5B
+0x9EA5 = 0x734E
+0x9EA6 = 0x477E
+0x9EA9 = 0x734F
+0x9EAA = 0x7351
+0x9EAD = 0x7352
+0x9EB8 = 0x7350
+0x9EB9 = 0x396D
+0x9EBA = 0x4C4D
+0x9EBB = 0x4B63
+0x9EBC = 0x5677
+0x9EBE = 0x5D60
+0x9EBF = 0x4B7B
+0x9EC4 = 0x322B
+0x9ECC = 0x7354
+0x9ECD = 0x3550
+0x9ECE = 0x7355
+0x9ECF = 0x7356
+0x9ED0 = 0x7357
+0x9ED2 = 0x3975
+0x9ED4 = 0x7358
+0x9ED8 = 0x6054
+0x9ED9 = 0x4C5B
+0x9EDB = 0x4263
+0x9EDC = 0x7359
+0x9EDD = 0x735B
+0x9EDE = 0x735A
+0x9EE0 = 0x735C
+0x9EE5 = 0x735D
+0x9EE8 = 0x735E
+0x9EEF = 0x735F
+0x9EF4 = 0x7360
+0x9EF6 = 0x7361
+0x9EF7 = 0x7362
+0x9EF9 = 0x7363
+0x9EFB = 0x7364
+0x9EFC = 0x7365
+0x9EFD = 0x7366
+0x9F07 = 0x7367
+0x9F08 = 0x7368
+0x9F0E = 0x4524
+0x9F13 = 0x385D
+0x9F15 = 0x736A
+0x9F20 = 0x414D
+0x9F21 = 0x736B
+0x9F2C = 0x736C
+0x9F3B = 0x4921
+0x9F3E = 0x736D
+0x9F4A = 0x736E
+0x9F4B = 0x6337
+0x9F4E = 0x6C5A
+0x9F4F = 0x706D
+0x9F52 = 0x736F
+0x9F54 = 0x7370
+0x9F5F = 0x7372
+0x9F60 = 0x7373
+0x9F61 = 0x7374
+0x9F62 = 0x4E70
+0x9F63 = 0x7371
+0x9F66 = 0x7375
+0x9F67 = 0x7376
+0x9F6A = 0x7378
+0x9F6C = 0x7377
+0x9F72 = 0x737A
+0x9F76 = 0x737B
+0x9F77 = 0x7379
+0x9F8D = 0x4E36
+0x9F95 = 0x737C
+0x9F9C = 0x737D
+0x9F9D = 0x6354
+0x9FA0 = 0x737E
+0xFF01 = 0x212A
+0xFF03 = 0x2174
+0xFF04 = 0x2170
+0xFF05 = 0x2173
+0xFF06 = 0x2175
+0xFF08 = 0x214A
+0xFF09 = 0x214B
+0xFF0A = 0x2176
+0xFF0B = 0x215C
+0xFF0C = 0x2124
+0xFF0E = 0x2125
+0xFF0F = 0x213F
+0xFF10 = 0x2330
+0xFF11 = 0x2331
+0xFF12 = 0x2332
+0xFF13 = 0x2333
+0xFF14 = 0x2334
+0xFF15 = 0x2335
+0xFF16 = 0x2336
+0xFF17 = 0x2337
+0xFF18 = 0x2338
+0xFF19 = 0x2339
+0xFF1A = 0x2127
+0xFF1B = 0x2128
+0xFF1C = 0x2163
+0xFF1D = 0x2161
+0xFF1E = 0x2164
+0xFF1F = 0x2129
+0xFF20 = 0x2177
+0xFF21 = 0x2341
+0xFF22 = 0x2342
+0xFF23 = 0x2343
+0xFF24 = 0x2344
+0xFF25 = 0x2345
+0xFF26 = 0x2346
+0xFF27 = 0x2347
+0xFF28 = 0x2348
+0xFF29 = 0x2349
+0xFF2A = 0x234A
+0xFF2B = 0x234B
+0xFF2C = 0x234C
+0xFF2D = 0x234D
+0xFF2E = 0x234E
+0xFF2F = 0x234F
+0xFF30 = 0x2350
+0xFF31 = 0x2351
+0xFF32 = 0x2352
+0xFF33 = 0x2353
+0xFF34 = 0x2354
+0xFF35 = 0x2355
+0xFF36 = 0x2356
+0xFF37 = 0x2357
+0xFF38 = 0x2358
+0xFF39 = 0x2359
+0xFF3A = 0x235A
+0xFF3B = 0x214E
+0xFF3C = 0x2140
+0xFF3D = 0x214F
+0xFF3E = 0x2130
+0xFF3F = 0x2132
+0xFF40 = 0x212E
+0xFF41 = 0x2361
+0xFF42 = 0x2362
+0xFF43 = 0x2363
+0xFF44 = 0x2364
+0xFF45 = 0x2365
+0xFF46 = 0x2366
+0xFF47 = 0x2367
+0xFF48 = 0x2368
+0xFF49 = 0x2369
+0xFF4A = 0x236A
+0xFF4B = 0x236B
+0xFF4C = 0x236C
+0xFF4D = 0x236D
+0xFF4E = 0x236E
+0xFF4F = 0x236F
+0xFF50 = 0x2370
+0xFF51 = 0x2371
+0xFF52 = 0x2372
+0xFF53 = 0x2373
+0xFF54 = 0x2374
+0xFF55 = 0x2375
+0xFF56 = 0x2376
+0xFF57 = 0x2377
+0xFF58 = 0x2378
+0xFF59 = 0x2379
+0xFF5A = 0x237A
+0xFF5B = 0x2150
+0xFF5C = 0x2143
+0xFF5D = 0x2151
+0xFFE3 = 0x2131
+0xFFE5 = 0x216F
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@MS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@MS.src
new file mode 100644
index 0000000..7fa662e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208@MS.src
@@ -0,0 +1,6894 @@
+# $NetBSD: UCS%JISX0208@MS.src,v 1.1 2003/07/19 20:20:42 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0208:MS"
+SRC_ZONE	0x0000 - 0xFFFF
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0x0000 - 0xFFFF		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x00A7 = 0x2178
+0x00A8 = 0x212F
+0x00B0 = 0x216B
+0x00B1 = 0x215E
+0x00B4 = 0x212D
+0x00B6 = 0x2279
+0x00D7 = 0x215F
+0x00F7 = 0x2160
+0x0391 = 0x2621
+0x0392 = 0x2622
+0x0393 = 0x2623
+0x0394 = 0x2624
+0x0395 = 0x2625
+0x0396 = 0x2626
+0x0397 = 0x2627
+0x0398 = 0x2628
+0x0399 = 0x2629
+0x039A = 0x262A
+0x039B = 0x262B
+0x039C = 0x262C
+0x039D = 0x262D
+0x039E = 0x262E
+0x039F = 0x262F
+0x03A0 = 0x2630
+0x03A1 = 0x2631
+0x03A3 = 0x2632
+0x03A4 = 0x2633
+0x03A5 = 0x2634
+0x03A6 = 0x2635
+0x03A7 = 0x2636
+0x03A8 = 0x2637
+0x03A9 = 0x2638
+0x03B1 = 0x2641
+0x03B2 = 0x2642
+0x03B3 = 0x2643
+0x03B4 = 0x2644
+0x03B5 = 0x2645
+0x03B6 = 0x2646
+0x03B7 = 0x2647
+0x03B8 = 0x2648
+0x03B9 = 0x2649
+0x03BA = 0x264A
+0x03BB = 0x264B
+0x03BC = 0x264C
+0x03BD = 0x264D
+0x03BE = 0x264E
+0x03BF = 0x264F
+0x03C0 = 0x2650
+0x03C1 = 0x2651
+0x03C3 = 0x2652
+0x03C4 = 0x2653
+0x03C5 = 0x2654
+0x03C6 = 0x2655
+0x03C7 = 0x2656
+0x03C8 = 0x2657
+0x03C9 = 0x2658
+0x0401 = 0x2727
+0x0410 = 0x2721
+0x0411 = 0x2722
+0x0412 = 0x2723
+0x0413 = 0x2724
+0x0414 = 0x2725
+0x0415 = 0x2726
+0x0416 = 0x2728
+0x0417 = 0x2729
+0x0418 = 0x272A
+0x0419 = 0x272B
+0x041A = 0x272C
+0x041B = 0x272D
+0x041C = 0x272E
+0x041D = 0x272F
+0x041E = 0x2730
+0x041F = 0x2731
+0x0420 = 0x2732
+0x0421 = 0x2733
+0x0422 = 0x2734
+0x0423 = 0x2735
+0x0424 = 0x2736
+0x0425 = 0x2737
+0x0426 = 0x2738
+0x0427 = 0x2739
+0x0428 = 0x273A
+0x0429 = 0x273B
+0x042A = 0x273C
+0x042B = 0x273D
+0x042C = 0x273E
+0x042D = 0x273F
+0x042E = 0x2740
+0x042F = 0x2741
+0x0430 = 0x2751
+0x0431 = 0x2752
+0x0432 = 0x2753
+0x0433 = 0x2754
+0x0434 = 0x2755
+0x0435 = 0x2756
+0x0436 = 0x2758
+0x0437 = 0x2759
+0x0438 = 0x275A
+0x0439 = 0x275B
+0x043A = 0x275C
+0x043B = 0x275D
+0x043C = 0x275E
+0x043D = 0x275F
+0x043E = 0x2760
+0x043F = 0x2761
+0x0440 = 0x2762
+0x0441 = 0x2763
+0x0442 = 0x2764
+0x0443 = 0x2765
+0x0444 = 0x2766
+0x0445 = 0x2767
+0x0446 = 0x2768
+0x0447 = 0x2769
+0x0448 = 0x276A
+0x0449 = 0x276B
+0x044A = 0x276C
+0x044B = 0x276D
+0x044C = 0x276E
+0x044D = 0x276F
+0x044E = 0x2770
+0x044F = 0x2771
+0x0451 = 0x2757
+0x2010 = 0x213E
+0x2015 = 0x213D
+0x2018 = 0x2146
+0x2019 = 0x2147
+0x201C = 0x2148
+0x201D = 0x2149
+0x2020 = 0x2277
+0x2021 = 0x2278
+0x2025 = 0x2145
+0x2026 = 0x2144
+0x2030 = 0x2273
+0x2032 = 0x216C
+0x2033 = 0x216D
+0x203B = 0x2228
+0x2103 = 0x216E
+0x212B = 0x2272
+0x2190 = 0x222B
+0x2191 = 0x222C
+0x2192 = 0x222A
+0x2193 = 0x222D
+0x21D2 = 0x224D
+0x21D4 = 0x224E
+0x2200 = 0x224F
+0x2202 = 0x225F
+0x2203 = 0x2250
+0x2207 = 0x2260
+0x2208 = 0x223A
+0x220B = 0x223B
+0x221A = 0x2265
+0x221D = 0x2267
+0x221E = 0x2167
+0x2220 = 0x225C
+0x2225 = 0x2142
+0x2227 = 0x224A
+0x2228 = 0x224B
+0x2229 = 0x2241
+0x222A = 0x2240
+0x222B = 0x2269
+0x222C = 0x226A
+0x2234 = 0x2168
+0x2235 = 0x2268
+0x223D = 0x2266
+0x2252 = 0x2262
+0x2260 = 0x2162
+0x2261 = 0x2261
+0x2266 = 0x2165
+0x2267 = 0x2166
+0x226A = 0x2263
+0x226B = 0x2264
+0x2282 = 0x223E
+0x2283 = 0x223F
+0x2286 = 0x223C
+0x2287 = 0x223D
+0x22A5 = 0x225D
+0x2312 = 0x225E
+0x2500 = 0x2821
+0x2501 = 0x282C
+0x2502 = 0x2822
+0x2503 = 0x282D
+0x250C = 0x2823
+0x250F = 0x282E
+0x2510 = 0x2824
+0x2513 = 0x282F
+0x2514 = 0x2826
+0x2517 = 0x2831
+0x2518 = 0x2825
+0x251B = 0x2830
+0x251C = 0x2827
+0x251D = 0x283C
+0x2520 = 0x2837
+0x2523 = 0x2832
+0x2524 = 0x2829
+0x2525 = 0x283E
+0x2528 = 0x2839
+0x252B = 0x2834
+0x252C = 0x2828
+0x252F = 0x2838
+0x2530 = 0x283D
+0x2533 = 0x2833
+0x2534 = 0x282A
+0x2537 = 0x283A
+0x2538 = 0x283F
+0x253B = 0x2835
+0x253C = 0x282B
+0x253F = 0x283B
+0x2542 = 0x2840
+0x254B = 0x2836
+0x25A0 = 0x2223
+0x25A1 = 0x2222
+0x25B2 = 0x2225
+0x25B3 = 0x2224
+0x25BC = 0x2227
+0x25BD = 0x2226
+0x25C6 = 0x2221
+0x25C7 = 0x217E
+0x25CB = 0x217B
+0x25CE = 0x217D
+0x25CF = 0x217C
+0x25EF = 0x227E
+0x2605 = 0x217A
+0x2606 = 0x2179
+0x2640 = 0x216A
+0x2642 = 0x2169
+0x266A = 0x2276
+0x266D = 0x2275
+0x266F = 0x2274
+0x3000 = 0x2121
+0x3001 = 0x2122
+0x3002 = 0x2123
+0x3003 = 0x2137
+0x3005 = 0x2139
+0x3006 = 0x213A
+0x3007 = 0x213B
+0x3008 = 0x2152
+0x3009 = 0x2153
+0x300A = 0x2154
+0x300B = 0x2155
+0x300C = 0x2156
+0x300D = 0x2157
+0x300E = 0x2158
+0x300F = 0x2159
+0x3010 = 0x215A
+0x3011 = 0x215B
+0x3012 = 0x2229
+0x3013 = 0x222E
+0x3014 = 0x214C
+0x3015 = 0x214D
+0x3041 = 0x2421
+0x3042 = 0x2422
+0x3043 = 0x2423
+0x3044 = 0x2424
+0x3045 = 0x2425
+0x3046 = 0x2426
+0x3047 = 0x2427
+0x3048 = 0x2428
+0x3049 = 0x2429
+0x304A = 0x242A
+0x304B = 0x242B
+0x304C = 0x242C
+0x304D = 0x242D
+0x304E = 0x242E
+0x304F = 0x242F
+0x3050 = 0x2430
+0x3051 = 0x2431
+0x3052 = 0x2432
+0x3053 = 0x2433
+0x3054 = 0x2434
+0x3055 = 0x2435
+0x3056 = 0x2436
+0x3057 = 0x2437
+0x3058 = 0x2438
+0x3059 = 0x2439
+0x305A = 0x243A
+0x305B = 0x243B
+0x305C = 0x243C
+0x305D = 0x243D
+0x305E = 0x243E
+0x305F = 0x243F
+0x3060 = 0x2440
+0x3061 = 0x2441
+0x3062 = 0x2442
+0x3063 = 0x2443
+0x3064 = 0x2444
+0x3065 = 0x2445
+0x3066 = 0x2446
+0x3067 = 0x2447
+0x3068 = 0x2448
+0x3069 = 0x2449
+0x306A = 0x244A
+0x306B = 0x244B
+0x306C = 0x244C
+0x306D = 0x244D
+0x306E = 0x244E
+0x306F = 0x244F
+0x3070 = 0x2450
+0x3071 = 0x2451
+0x3072 = 0x2452
+0x3073 = 0x2453
+0x3074 = 0x2454
+0x3075 = 0x2455
+0x3076 = 0x2456
+0x3077 = 0x2457
+0x3078 = 0x2458
+0x3079 = 0x2459
+0x307A = 0x245A
+0x307B = 0x245B
+0x307C = 0x245C
+0x307D = 0x245D
+0x307E = 0x245E
+0x307F = 0x245F
+0x3080 = 0x2460
+0x3081 = 0x2461
+0x3082 = 0x2462
+0x3083 = 0x2463
+0x3084 = 0x2464
+0x3085 = 0x2465
+0x3086 = 0x2466
+0x3087 = 0x2467
+0x3088 = 0x2468
+0x3089 = 0x2469
+0x308A = 0x246A
+0x308B = 0x246B
+0x308C = 0x246C
+0x308D = 0x246D
+0x308E = 0x246E
+0x308F = 0x246F
+0x3090 = 0x2470
+0x3091 = 0x2471
+0x3092 = 0x2472
+0x3093 = 0x2473
+0x309B = 0x212B
+0x309C = 0x212C
+0x309D = 0x2135
+0x309E = 0x2136
+0x30A1 = 0x2521
+0x30A2 = 0x2522
+0x30A3 = 0x2523
+0x30A4 = 0x2524
+0x30A5 = 0x2525
+0x30A6 = 0x2526
+0x30A7 = 0x2527
+0x30A8 = 0x2528
+0x30A9 = 0x2529
+0x30AA = 0x252A
+0x30AB = 0x252B
+0x30AC = 0x252C
+0x30AD = 0x252D
+0x30AE = 0x252E
+0x30AF = 0x252F
+0x30B0 = 0x2530
+0x30B1 = 0x2531
+0x30B2 = 0x2532
+0x30B3 = 0x2533
+0x30B4 = 0x2534
+0x30B5 = 0x2535
+0x30B6 = 0x2536
+0x30B7 = 0x2537
+0x30B8 = 0x2538
+0x30B9 = 0x2539
+0x30BA = 0x253A
+0x30BB = 0x253B
+0x30BC = 0x253C
+0x30BD = 0x253D
+0x30BE = 0x253E
+0x30BF = 0x253F
+0x30C0 = 0x2540
+0x30C1 = 0x2541
+0x30C2 = 0x2542
+0x30C3 = 0x2543
+0x30C4 = 0x2544
+0x30C5 = 0x2545
+0x30C6 = 0x2546
+0x30C7 = 0x2547
+0x30C8 = 0x2548
+0x30C9 = 0x2549
+0x30CA = 0x254A
+0x30CB = 0x254B
+0x30CC = 0x254C
+0x30CD = 0x254D
+0x30CE = 0x254E
+0x30CF = 0x254F
+0x30D0 = 0x2550
+0x30D1 = 0x2551
+0x30D2 = 0x2552
+0x30D3 = 0x2553
+0x30D4 = 0x2554
+0x30D5 = 0x2555
+0x30D6 = 0x2556
+0x30D7 = 0x2557
+0x30D8 = 0x2558
+0x30D9 = 0x2559
+0x30DA = 0x255A
+0x30DB = 0x255B
+0x30DC = 0x255C
+0x30DD = 0x255D
+0x30DE = 0x255E
+0x30DF = 0x255F
+0x30E0 = 0x2560
+0x30E1 = 0x2561
+0x30E2 = 0x2562
+0x30E3 = 0x2563
+0x30E4 = 0x2564
+0x30E5 = 0x2565
+0x30E6 = 0x2566
+0x30E7 = 0x2567
+0x30E8 = 0x2568
+0x30E9 = 0x2569
+0x30EA = 0x256A
+0x30EB = 0x256B
+0x30EC = 0x256C
+0x30ED = 0x256D
+0x30EE = 0x256E
+0x30EF = 0x256F
+0x30F0 = 0x2570
+0x30F1 = 0x2571
+0x30F2 = 0x2572
+0x30F3 = 0x2573
+0x30F4 = 0x2574
+0x30F5 = 0x2575
+0x30F6 = 0x2576
+0x30FB = 0x2126
+0x30FC = 0x213C
+0x30FD = 0x2133
+0x30FE = 0x2134
+0x4E00 = 0x306C
+0x4E01 = 0x437A
+0x4E03 = 0x3C37
+0x4E07 = 0x4B7C
+0x4E08 = 0x3E66
+0x4E09 = 0x3B30
+0x4E0A = 0x3E65
+0x4E0B = 0x323C
+0x4E0D = 0x4954
+0x4E0E = 0x4D3F
+0x4E10 = 0x5022
+0x4E11 = 0x312F
+0x4E14 = 0x336E
+0x4E15 = 0x5023
+0x4E16 = 0x4024
+0x4E17 = 0x5242
+0x4E18 = 0x3556
+0x4E19 = 0x4A3A
+0x4E1E = 0x3E67
+0x4E21 = 0x4E3E
+0x4E26 = 0x4A42
+0x4E2A = 0x5024
+0x4E2D = 0x4366
+0x4E31 = 0x5025
+0x4E32 = 0x367A
+0x4E36 = 0x5026
+0x4E38 = 0x345D
+0x4E39 = 0x4330
+0x4E3B = 0x3C67
+0x4E3C = 0x5027
+0x4E3F = 0x5028
+0x4E42 = 0x5029
+0x4E43 = 0x4735
+0x4E45 = 0x3557
+0x4E4B = 0x4737
+0x4E4D = 0x4663
+0x4E4E = 0x3843
+0x4E4F = 0x4B33
+0x4E55 = 0x6949
+0x4E56 = 0x502A
+0x4E57 = 0x3E68
+0x4E58 = 0x502B
+0x4E59 = 0x3235
+0x4E5D = 0x3665
+0x4E5E = 0x3870
+0x4E5F = 0x4C69
+0x4E62 = 0x5626
+0x4E71 = 0x4D70
+0x4E73 = 0x467D
+0x4E7E = 0x3425
+0x4E80 = 0x3535
+0x4E82 = 0x502C
+0x4E85 = 0x502D
+0x4E86 = 0x4E3B
+0x4E88 = 0x4D3D
+0x4E89 = 0x4168
+0x4E8A = 0x502F
+0x4E8B = 0x3B76
+0x4E8C = 0x4673
+0x4E8E = 0x5032
+0x4E91 = 0x313E
+0x4E92 = 0x385F
+0x4E94 = 0x385E
+0x4E95 = 0x3066
+0x4E98 = 0x4F4B
+0x4E99 = 0x4F4A
+0x4E9B = 0x3A33
+0x4E9C = 0x3021
+0x4E9E = 0x5033
+0x4E9F = 0x5034
+0x4EA0 = 0x5035
+0x4EA1 = 0x4B34
+0x4EA2 = 0x5036
+0x4EA4 = 0x3872
+0x4EA5 = 0x3067
+0x4EA6 = 0x4B72
+0x4EA8 = 0x357C
+0x4EAB = 0x357D
+0x4EAC = 0x357E
+0x4EAD = 0x4462
+0x4EAE = 0x4E3C
+0x4EB0 = 0x5037
+0x4EB3 = 0x5038
+0x4EB6 = 0x5039
+0x4EBA = 0x3F4D
+0x4EC0 = 0x3D3A
+0x4EC1 = 0x3F4E
+0x4EC2 = 0x503E
+0x4EC4 = 0x503C
+0x4EC6 = 0x503D
+0x4EC7 = 0x3558
+0x4ECA = 0x3A23
+0x4ECB = 0x3270
+0x4ECD = 0x503B
+0x4ECE = 0x503A
+0x4ECF = 0x4A29
+0x4ED4 = 0x3B46
+0x4ED5 = 0x3B45
+0x4ED6 = 0x423E
+0x4ED7 = 0x503F
+0x4ED8 = 0x4955
+0x4ED9 = 0x4067
+0x4EDD = 0x2138
+0x4EDE = 0x5040
+0x4EDF = 0x5042
+0x4EE3 = 0x4265
+0x4EE4 = 0x4E61
+0x4EE5 = 0x304A
+0x4EED = 0x5041
+0x4EEE = 0x323E
+0x4EF0 = 0x3644
+0x4EF2 = 0x4367
+0x4EF6 = 0x376F
+0x4EF7 = 0x5043
+0x4EFB = 0x4724
+0x4F01 = 0x346B
+0x4F09 = 0x5044
+0x4F0A = 0x304B
+0x4F0D = 0x3860
+0x4F0E = 0x346C
+0x4F0F = 0x497A
+0x4F10 = 0x4832
+0x4F11 = 0x3559
+0x4F1A = 0x3271
+0x4F1C = 0x5067
+0x4F1D = 0x4541
+0x4F2F = 0x476C
+0x4F30 = 0x5046
+0x4F34 = 0x483C
+0x4F36 = 0x4E62
+0x4F38 = 0x3F2D
+0x4F3A = 0x3B47
+0x4F3C = 0x3B77
+0x4F3D = 0x3240
+0x4F43 = 0x4451
+0x4F46 = 0x4322
+0x4F47 = 0x504A
+0x4F4D = 0x304C
+0x4F4E = 0x4463
+0x4F4F = 0x3D3B
+0x4F50 = 0x3A34
+0x4F51 = 0x4D24
+0x4F53 = 0x424E
+0x4F55 = 0x323F
+0x4F57 = 0x5049
+0x4F59 = 0x4D3E
+0x4F5A = 0x5045
+0x4F5B = 0x5047
+0x4F5C = 0x3A6E
+0x4F5D = 0x5048
+0x4F5E = 0x5524
+0x4F69 = 0x5050
+0x4F6F = 0x5053
+0x4F70 = 0x5051
+0x4F73 = 0x3242
+0x4F75 = 0x4A3B
+0x4F76 = 0x504B
+0x4F7B = 0x504F
+0x4F7C = 0x3873
+0x4F7F = 0x3B48
+0x4F83 = 0x3426
+0x4F86 = 0x5054
+0x4F88 = 0x504C
+0x4F8B = 0x4E63
+0x4F8D = 0x3B78
+0x4F8F = 0x504D
+0x4F91 = 0x5052
+0x4F96 = 0x5055
+0x4F98 = 0x504E
+0x4F9B = 0x3621
+0x4F9D = 0x304D
+0x4FA0 = 0x3622
+0x4FA1 = 0x3241
+0x4FAB = 0x5525
+0x4FAD = 0x4B79
+0x4FAE = 0x496E
+0x4FAF = 0x3874
+0x4FB5 = 0x3F2F
+0x4FB6 = 0x4E37
+0x4FBF = 0x4A58
+0x4FC2 = 0x3738
+0x4FC3 = 0x4225
+0x4FC4 = 0x3264
+0x4FCA = 0x3D53
+0x4FCE = 0x5059
+0x4FD0 = 0x505E
+0x4FD1 = 0x505C
+0x4FD4 = 0x5057
+0x4FD7 = 0x422F
+0x4FD8 = 0x505A
+0x4FDA = 0x505D
+0x4FDB = 0x505B
+0x4FDD = 0x4A5D
+0x4FDF = 0x5058
+0x4FE1 = 0x3F2E
+0x4FE3 = 0x4B73
+0x4FE4 = 0x505F
+0x4FE5 = 0x5060
+0x4FEE = 0x3D24
+0x4FEF = 0x506D
+0x4FF3 = 0x4750
+0x4FF5 = 0x4936
+0x4FF6 = 0x5068
+0x4FF8 = 0x4A70
+0x4FFA = 0x3236
+0x4FFE = 0x506C
+0x5005 = 0x5066
+0x5006 = 0x506F
+0x5009 = 0x4152
+0x500B = 0x3844
+0x500D = 0x475C
+0x500F = 0x6047
+0x5011 = 0x506E
+0x5012 = 0x455D
+0x5014 = 0x5063
+0x5016 = 0x3876
+0x5019 = 0x3875
+0x501A = 0x5061
+0x501F = 0x3C5A
+0x5021 = 0x5069
+0x5023 = 0x4A6F
+0x5024 = 0x434D
+0x5025 = 0x5065
+0x5026 = 0x3771
+0x5028 = 0x5062
+0x5029 = 0x506A
+0x502A = 0x5064
+0x502B = 0x4E51
+0x502C = 0x506B
+0x502D = 0x4F41
+0x5036 = 0x3666
+0x5039 = 0x3770
+0x5043 = 0x5070
+0x5047 = 0x5071
+0x5048 = 0x5075
+0x5049 = 0x304E
+0x504F = 0x4A50
+0x5050 = 0x5074
+0x5055 = 0x5073
+0x5056 = 0x5077
+0x505A = 0x5076
+0x505C = 0x4464
+0x5065 = 0x3772
+0x506C = 0x5078
+0x5072 = 0x3C45
+0x5074 = 0x4226
+0x5075 = 0x4465
+0x5076 = 0x3676
+0x5078 = 0x5079
+0x507D = 0x3536
+0x5080 = 0x507A
+0x5085 = 0x507C
+0x508D = 0x4B35
+0x5091 = 0x3766
+0x5098 = 0x3B31
+0x5099 = 0x4877
+0x509A = 0x507B
+0x50AC = 0x3A45
+0x50AD = 0x4D43
+0x50B2 = 0x507E
+0x50B3 = 0x5123
+0x50B4 = 0x507D
+0x50B5 = 0x3A44
+0x50B7 = 0x3D7D
+0x50BE = 0x3739
+0x50C2 = 0x5124
+0x50C5 = 0x364F
+0x50C9 = 0x5121
+0x50CA = 0x5122
+0x50CD = 0x462F
+0x50CF = 0x417C
+0x50D1 = 0x3623
+0x50D5 = 0x4B4D
+0x50D6 = 0x5125
+0x50DA = 0x4E3D
+0x50DE = 0x5126
+0x50E3 = 0x5129
+0x50E5 = 0x5127
+0x50E7 = 0x414E
+0x50ED = 0x5128
+0x50EE = 0x512A
+0x50F5 = 0x512C
+0x50F9 = 0x512B
+0x50FB = 0x4A48
+0x5100 = 0x3537
+0x5101 = 0x512E
+0x5102 = 0x512F
+0x5104 = 0x322F
+0x5109 = 0x512D
+0x5112 = 0x3C74
+0x5114 = 0x5132
+0x5115 = 0x5131
+0x5116 = 0x5130
+0x5118 = 0x5056
+0x511A = 0x5133
+0x511F = 0x3D7E
+0x5121 = 0x5134
+0x512A = 0x4D25
+0x5132 = 0x4C59
+0x5137 = 0x5136
+0x513A = 0x5135
+0x513B = 0x5138
+0x513C = 0x5137
+0x513F = 0x5139
+0x5140 = 0x513A
+0x5141 = 0x3074
+0x5143 = 0x3835
+0x5144 = 0x373B
+0x5145 = 0x3D3C
+0x5146 = 0x437B
+0x5147 = 0x3624
+0x5148 = 0x4068
+0x5149 = 0x3877
+0x514B = 0x396E
+0x514C = 0x513C
+0x514D = 0x4C48
+0x514E = 0x4546
+0x5150 = 0x3B79
+0x5152 = 0x513B
+0x5154 = 0x513D
+0x515A = 0x455E
+0x515C = 0x3375
+0x5162 = 0x513E
+0x5165 = 0x467E
+0x5168 = 0x4134
+0x5169 = 0x5140
+0x516A = 0x5141
+0x516B = 0x482C
+0x516C = 0x3878
+0x516D = 0x4F3B
+0x516E = 0x5142
+0x5171 = 0x3626
+0x5175 = 0x4A3C
+0x5176 = 0x4236
+0x5177 = 0x3671
+0x5178 = 0x4535
+0x517C = 0x3773
+0x5180 = 0x5143
+0x5182 = 0x5144
+0x5185 = 0x4662
+0x5186 = 0x315F
+0x5189 = 0x5147
+0x518A = 0x3A7D
+0x518C = 0x5146
+0x518D = 0x3A46
+0x518F = 0x5148
+0x5190 = 0x666E
+0x5191 = 0x5149
+0x5192 = 0x4B41
+0x5193 = 0x514A
+0x5195 = 0x514B
+0x5196 = 0x514C
+0x5197 = 0x3E69
+0x5199 = 0x3C4C
+0x51A0 = 0x3427
+0x51A2 = 0x514F
+0x51A4 = 0x514D
+0x51A5 = 0x4C3D
+0x51A6 = 0x514E
+0x51A8 = 0x495A
+0x51A9 = 0x5150
+0x51AA = 0x5151
+0x51AB = 0x5152
+0x51AC = 0x455F
+0x51B0 = 0x5156
+0x51B1 = 0x5154
+0x51B2 = 0x5155
+0x51B3 = 0x5153
+0x51B4 = 0x3A63
+0x51B5 = 0x5157
+0x51B6 = 0x4C6A
+0x51B7 = 0x4E64
+0x51BD = 0x5158
+0x51C4 = 0x4028
+0x51C5 = 0x5159
+0x51C6 = 0x3D5A
+0x51C9 = 0x515A
+0x51CB = 0x437C
+0x51CC = 0x4E3F
+0x51CD = 0x4560
+0x51D6 = 0x5245
+0x51DB = 0x515B
+0x51DC = 0x7425
+0x51DD = 0x3645
+0x51E0 = 0x515C
+0x51E1 = 0x4B5E
+0x51E6 = 0x3D68
+0x51E7 = 0x427C
+0x51E9 = 0x515E
+0x51EA = 0x4664
+0x51ED = 0x515F
+0x51F0 = 0x5160
+0x51F1 = 0x332E
+0x51F5 = 0x5161
+0x51F6 = 0x3627
+0x51F8 = 0x464C
+0x51F9 = 0x317A
+0x51FA = 0x3D50
+0x51FD = 0x4821
+0x51FE = 0x5162
+0x5200 = 0x4561
+0x5203 = 0x3F4F
+0x5204 = 0x5163
+0x5206 = 0x4A2C
+0x5207 = 0x405A
+0x5208 = 0x3422
+0x520A = 0x3429
+0x520B = 0x5164
+0x520E = 0x5166
+0x5211 = 0x373A
+0x5214 = 0x5165
+0x5217 = 0x4E73
+0x521D = 0x3D69
+0x5224 = 0x483D
+0x5225 = 0x4A4C
+0x5227 = 0x5167
+0x5229 = 0x4D78
+0x522A = 0x5168
+0x522E = 0x5169
+0x5230 = 0x457E
+0x5233 = 0x516A
+0x5236 = 0x4029
+0x5237 = 0x3A7E
+0x5238 = 0x3774
+0x5239 = 0x516B
+0x523A = 0x3B49
+0x523B = 0x396F
+0x5243 = 0x4466
+0x5244 = 0x516D
+0x5247 = 0x4227
+0x524A = 0x3A6F
+0x524B = 0x516E
+0x524C = 0x516F
+0x524D = 0x4130
+0x524F = 0x516C
+0x5254 = 0x5171
+0x5256 = 0x4B36
+0x525B = 0x3964
+0x525E = 0x5170
+0x5263 = 0x3775
+0x5264 = 0x3A5E
+0x5265 = 0x476D
+0x5269 = 0x5174
+0x526A = 0x5172
+0x526F = 0x497B
+0x5270 = 0x3E6A
+0x5271 = 0x517B
+0x5272 = 0x3364
+0x5273 = 0x5175
+0x5274 = 0x5173
+0x5275 = 0x414F
+0x527D = 0x5177
+0x527F = 0x5176
+0x5283 = 0x3344
+0x5287 = 0x3760
+0x5288 = 0x517C
+0x5289 = 0x4E2D
+0x528D = 0x5178
+0x5291 = 0x517D
+0x5292 = 0x517A
+0x5294 = 0x5179
+0x529B = 0x4E4F
+0x529F = 0x3879
+0x52A0 = 0x3243
+0x52A3 = 0x4E74
+0x52A9 = 0x3D75
+0x52AA = 0x4558
+0x52AB = 0x3965
+0x52AC = 0x5222
+0x52AD = 0x5223
+0x52B1 = 0x4E65
+0x52B4 = 0x4F2B
+0x52B5 = 0x5225
+0x52B9 = 0x387A
+0x52BC = 0x5224
+0x52BE = 0x332F
+0x52C1 = 0x5226
+0x52C3 = 0x4B56
+0x52C5 = 0x443C
+0x52C7 = 0x4D26
+0x52C9 = 0x4A59
+0x52CD = 0x5227
+0x52D2 = 0x7055
+0x52D5 = 0x4630
+0x52D7 = 0x5228
+0x52D8 = 0x342A
+0x52D9 = 0x4C33
+0x52DD = 0x3E21
+0x52DE = 0x5229
+0x52DF = 0x4A67
+0x52E0 = 0x522D
+0x52E2 = 0x402A
+0x52E3 = 0x522A
+0x52E4 = 0x3650
+0x52E6 = 0x522B
+0x52E7 = 0x342B
+0x52F2 = 0x372E
+0x52F3 = 0x522E
+0x52F5 = 0x522F
+0x52F8 = 0x5230
+0x52F9 = 0x5231
+0x52FA = 0x3C5B
+0x52FE = 0x387B
+0x52FF = 0x4C5E
+0x5301 = 0x4C68
+0x5302 = 0x4677
+0x5305 = 0x4A71
+0x5306 = 0x5232
+0x5308 = 0x5233
+0x530D = 0x5235
+0x530F = 0x5237
+0x5310 = 0x5236
+0x5315 = 0x5238
+0x5316 = 0x323D
+0x5317 = 0x4B4C
+0x5319 = 0x3A7C
+0x531A = 0x5239
+0x531D = 0x4159
+0x5320 = 0x3E22
+0x5321 = 0x3629
+0x5323 = 0x523A
+0x532A = 0x485B
+0x532F = 0x523B
+0x5331 = 0x523C
+0x5333 = 0x523D
+0x5338 = 0x523E
+0x5339 = 0x4924
+0x533A = 0x3668
+0x533B = 0x3065
+0x533F = 0x463F
+0x5340 = 0x523F
+0x5341 = 0x3D3D
+0x5343 = 0x4069
+0x5345 = 0x5241
+0x5346 = 0x5240
+0x5347 = 0x3E23
+0x5348 = 0x3861
+0x5349 = 0x5243
+0x534A = 0x483E
+0x534D = 0x5244
+0x5351 = 0x485C
+0x5352 = 0x4234
+0x5353 = 0x426E
+0x5354 = 0x3628
+0x5357 = 0x466E
+0x5358 = 0x4331
+0x535A = 0x476E
+0x535C = 0x4B4E
+0x535E = 0x5246
+0x5360 = 0x406A
+0x5366 = 0x3735
+0x5369 = 0x5247
+0x536E = 0x5248
+0x536F = 0x312C
+0x5370 = 0x3075
+0x5371 = 0x346D
+0x5373 = 0x4228
+0x5374 = 0x3551
+0x5375 = 0x4D71
+0x5377 = 0x524B
+0x5378 = 0x3237
+0x537B = 0x524A
+0x537F = 0x362A
+0x5382 = 0x524C
+0x5384 = 0x4C71
+0x5396 = 0x524D
+0x5398 = 0x4E52
+0x539A = 0x387C
+0x539F = 0x3836
+0x53A0 = 0x524E
+0x53A5 = 0x5250
+0x53A6 = 0x524F
+0x53A8 = 0x3F5F
+0x53A9 = 0x3139
+0x53AD = 0x315E
+0x53AE = 0x5251
+0x53B0 = 0x5252
+0x53B3 = 0x3837
+0x53B6 = 0x5253
+0x53BB = 0x356E
+0x53C2 = 0x3B32
+0x53C3 = 0x5254
+0x53C8 = 0x4B74
+0x53C9 = 0x3A35
+0x53CA = 0x355A
+0x53CB = 0x4D27
+0x53CC = 0x4150
+0x53CD = 0x483F
+0x53CE = 0x3C7D
+0x53D4 = 0x3D47
+0x53D6 = 0x3C68
+0x53D7 = 0x3C75
+0x53D9 = 0x3D76
+0x53DB = 0x4840
+0x53DF = 0x5257
+0x53E1 = 0x3143
+0x53E2 = 0x4151
+0x53E3 = 0x387D
+0x53E4 = 0x3845
+0x53E5 = 0x3667
+0x53E8 = 0x525B
+0x53E9 = 0x4321
+0x53EA = 0x427E
+0x53EB = 0x362B
+0x53EC = 0x3E24
+0x53ED = 0x525C
+0x53EE = 0x525A
+0x53EF = 0x3244
+0x53F0 = 0x4266
+0x53F1 = 0x3C38
+0x53F2 = 0x3B4B
+0x53F3 = 0x3126
+0x53F6 = 0x3370
+0x53F7 = 0x3966
+0x53F8 = 0x3B4A
+0x53FA = 0x525D
+0x5401 = 0x525E
+0x5403 = 0x3549
+0x5404 = 0x3346
+0x5408 = 0x3967
+0x5409 = 0x3548
+0x540A = 0x445F
+0x540B = 0x3125
+0x540C = 0x4631
+0x540D = 0x4C3E
+0x540E = 0x3921
+0x540F = 0x4D79
+0x5410 = 0x4547
+0x5411 = 0x387E
+0x541B = 0x372F
+0x541D = 0x5267
+0x541F = 0x3663
+0x5420 = 0x4B4A
+0x5426 = 0x485D
+0x5429 = 0x5266
+0x542B = 0x345E
+0x542C = 0x5261
+0x542D = 0x5262
+0x542E = 0x5264
+0x5436 = 0x5265
+0x5438 = 0x355B
+0x5439 = 0x3F61
+0x543B = 0x4A2D
+0x543C = 0x5263
+0x543D = 0x525F
+0x543E = 0x3863
+0x5440 = 0x5260
+0x5442 = 0x4F24
+0x5446 = 0x4A72
+0x5448 = 0x4468
+0x5449 = 0x3862
+0x544A = 0x3970
+0x544E = 0x5268
+0x5451 = 0x465D
+0x545F = 0x526C
+0x5468 = 0x3C7E
+0x546A = 0x3C76
+0x5470 = 0x526F
+0x5471 = 0x526D
+0x5473 = 0x4C23
+0x5475 = 0x526A
+0x5476 = 0x5273
+0x5477 = 0x526E
+0x547B = 0x5271
+0x547C = 0x3846
+0x547D = 0x4C3F
+0x5480 = 0x5272
+0x5484 = 0x5274
+0x5486 = 0x5276
+0x548B = 0x3A70
+0x548C = 0x4F42
+0x548E = 0x526B
+0x548F = 0x5269
+0x5490 = 0x5275
+0x5492 = 0x5270
+0x54A2 = 0x5278
+0x54A4 = 0x5323
+0x54A5 = 0x527A
+0x54A8 = 0x527E
+0x54AB = 0x5321
+0x54AC = 0x527B
+0x54AF = 0x533E
+0x54B2 = 0x3A69
+0x54B3 = 0x3331
+0x54B8 = 0x5279
+0x54BC = 0x5325
+0x54BD = 0x3076
+0x54BE = 0x5324
+0x54C0 = 0x3025
+0x54C1 = 0x494A
+0x54C2 = 0x5322
+0x54C4 = 0x527C
+0x54C7 = 0x5277
+0x54C8 = 0x527D
+0x54C9 = 0x3A48
+0x54D8 = 0x5326
+0x54E1 = 0x3077
+0x54E2 = 0x532F
+0x54E5 = 0x5327
+0x54E6 = 0x5328
+0x54E8 = 0x3E25
+0x54E9 = 0x4B69
+0x54ED = 0x532D
+0x54EE = 0x532C
+0x54F2 = 0x452F
+0x54FA = 0x532E
+0x54FD = 0x532B
+0x5504 = 0x3134
+0x5506 = 0x3A36
+0x5507 = 0x3F30
+0x550F = 0x5329
+0x5510 = 0x4562
+0x5514 = 0x532A
+0x5516 = 0x3022
+0x552E = 0x5334
+0x552F = 0x4D23
+0x5531 = 0x3E27
+0x5533 = 0x533A
+0x5538 = 0x5339
+0x5539 = 0x5330
+0x553E = 0x4243
+0x5540 = 0x5331
+0x5544 = 0x426F
+0x5545 = 0x5336
+0x5546 = 0x3E26
+0x554C = 0x5333
+0x554F = 0x4C64
+0x5553 = 0x373C
+0x5556 = 0x5337
+0x5557 = 0x5338
+0x555C = 0x5335
+0x555D = 0x533B
+0x5563 = 0x5332
+0x557B = 0x5341
+0x557C = 0x5346
+0x557E = 0x5342
+0x5580 = 0x533D
+0x5583 = 0x5347
+0x5584 = 0x4131
+0x5587 = 0x5349
+0x5589 = 0x3922
+0x558A = 0x533F
+0x558B = 0x437D
+0x5598 = 0x5343
+0x5599 = 0x533C
+0x559A = 0x342D
+0x559C = 0x346E
+0x559D = 0x3365
+0x559E = 0x5344
+0x559F = 0x5340
+0x55A7 = 0x3776
+0x55A8 = 0x534A
+0x55A9 = 0x5348
+0x55AA = 0x4153
+0x55AB = 0x354A
+0x55AC = 0x362C
+0x55AE = 0x5345
+0x55B0 = 0x3674
+0x55B6 = 0x3144
+0x55C4 = 0x534E
+0x55C5 = 0x534C
+0x55C7 = 0x5427
+0x55D4 = 0x5351
+0x55DA = 0x534B
+0x55DC = 0x534F
+0x55DF = 0x534D
+0x55E3 = 0x3B4C
+0x55E4 = 0x5350
+0x55F7 = 0x5353
+0x55F9 = 0x5358
+0x55FD = 0x5356
+0x55FE = 0x5355
+0x5606 = 0x4332
+0x5609 = 0x3245
+0x5614 = 0x5352
+0x5616 = 0x5354
+0x5617 = 0x3E28
+0x5618 = 0x3133
+0x561B = 0x5357
+0x5629 = 0x325E
+0x562F = 0x5362
+0x5631 = 0x3E7C
+0x5632 = 0x535E
+0x5634 = 0x535C
+0x5636 = 0x535D
+0x5638 = 0x535F
+0x5642 = 0x313D
+0x564C = 0x4139
+0x564E = 0x5359
+0x5650 = 0x535A
+0x565B = 0x337A
+0x5664 = 0x5361
+0x5668 = 0x346F
+0x566A = 0x5364
+0x566B = 0x5360
+0x566C = 0x5363
+0x5674 = 0x4A2E
+0x5678 = 0x4655
+0x567A = 0x4838
+0x5680 = 0x5366
+0x5686 = 0x5365
+0x5687 = 0x3345
+0x568A = 0x5367
+0x568F = 0x536A
+0x5694 = 0x5369
+0x56A0 = 0x5368
+0x56A2 = 0x4739
+0x56A5 = 0x536B
+0x56AE = 0x536C
+0x56B4 = 0x536E
+0x56B6 = 0x536D
+0x56BC = 0x5370
+0x56C0 = 0x5373
+0x56C1 = 0x5371
+0x56C2 = 0x536F
+0x56C3 = 0x5372
+0x56C8 = 0x5374
+0x56CE = 0x5375
+0x56D1 = 0x5376
+0x56D3 = 0x5377
+0x56D7 = 0x5378
+0x56D8 = 0x5145
+0x56DA = 0x3C7C
+0x56DB = 0x3B4D
+0x56DE = 0x3273
+0x56E0 = 0x3078
+0x56E3 = 0x4344
+0x56EE = 0x5379
+0x56F0 = 0x3A24
+0x56F2 = 0x304F
+0x56F3 = 0x3F5E
+0x56F9 = 0x537A
+0x56FA = 0x3847
+0x56FD = 0x3971
+0x56FF = 0x537C
+0x5700 = 0x537B
+0x5703 = 0x4A60
+0x5704 = 0x537D
+0x5708 = 0x5421
+0x5709 = 0x537E
+0x570B = 0x5422
+0x570D = 0x5423
+0x570F = 0x3777
+0x5712 = 0x3160
+0x5713 = 0x5424
+0x5716 = 0x5426
+0x5718 = 0x5425
+0x571C = 0x5428
+0x571F = 0x455A
+0x5726 = 0x5429
+0x5727 = 0x3035
+0x5728 = 0x3A5F
+0x572D = 0x373D
+0x5730 = 0x434F
+0x5737 = 0x542A
+0x5738 = 0x542B
+0x573B = 0x542D
+0x5740 = 0x542E
+0x5742 = 0x3A64
+0x5747 = 0x3651
+0x574A = 0x4B37
+0x574E = 0x542C
+0x574F = 0x542F
+0x5750 = 0x3A41
+0x5751 = 0x3923
+0x5761 = 0x5433
+0x5764 = 0x3A25
+0x5766 = 0x4333
+0x5769 = 0x5430
+0x576A = 0x445A
+0x577F = 0x5434
+0x5782 = 0x3F62
+0x5788 = 0x5432
+0x5789 = 0x5435
+0x578B = 0x373F
+0x5793 = 0x5436
+0x57A0 = 0x5437
+0x57A2 = 0x3924
+0x57A3 = 0x3340
+0x57A4 = 0x5439
+0x57AA = 0x543A
+0x57B0 = 0x543B
+0x57B3 = 0x5438
+0x57C0 = 0x5431
+0x57C3 = 0x543C
+0x57C6 = 0x543D
+0x57CB = 0x4B64
+0x57CE = 0x3E6B
+0x57D2 = 0x543F
+0x57D3 = 0x5440
+0x57D4 = 0x543E
+0x57D6 = 0x5442
+0x57DC = 0x4738
+0x57DF = 0x3068
+0x57E0 = 0x4956
+0x57E3 = 0x5443
+0x57F4 = 0x3E7D
+0x57F7 = 0x3C39
+0x57F9 = 0x475D
+0x57FA = 0x3470
+0x57FC = 0x3A6B
+0x5800 = 0x4B59
+0x5802 = 0x4632
+0x5805 = 0x3778
+0x5806 = 0x424F
+0x580A = 0x5441
+0x580B = 0x5444
+0x5815 = 0x4244
+0x5819 = 0x5445
+0x581D = 0x5446
+0x5821 = 0x5448
+0x5824 = 0x4469
+0x582A = 0x342E
+0x582F = 0x7421
+0x5830 = 0x3161
+0x5831 = 0x4A73
+0x5834 = 0x3E6C
+0x5835 = 0x4548
+0x583A = 0x3A66
+0x583D = 0x544E
+0x5840 = 0x4A3D
+0x5841 = 0x4E5D
+0x584A = 0x3274
+0x584B = 0x544A
+0x5851 = 0x413A
+0x5852 = 0x544D
+0x5854 = 0x4563
+0x5857 = 0x4549
+0x5858 = 0x4564
+0x5859 = 0x4839
+0x585A = 0x444D
+0x585E = 0x3A49
+0x5862 = 0x5449
+0x5869 = 0x3176
+0x586B = 0x4536
+0x5870 = 0x544B
+0x5872 = 0x5447
+0x5875 = 0x3F50
+0x5879 = 0x544F
+0x587E = 0x3D4E
+0x5883 = 0x362D
+0x5885 = 0x5450
+0x5893 = 0x4A68
+0x5897 = 0x417D
+0x589C = 0x4446
+0x589F = 0x5452
+0x58A8 = 0x4B4F
+0x58AB = 0x5453
+0x58AE = 0x5458
+0x58B3 = 0x4A2F
+0x58B8 = 0x5457
+0x58B9 = 0x5451
+0x58BA = 0x5454
+0x58BB = 0x5456
+0x58BE = 0x3A26
+0x58C1 = 0x4A49
+0x58C5 = 0x5459
+0x58C7 = 0x4345
+0x58CA = 0x3275
+0x58CC = 0x3E6D
+0x58D1 = 0x545B
+0x58D3 = 0x545A
+0x58D5 = 0x3968
+0x58D7 = 0x545C
+0x58D8 = 0x545E
+0x58D9 = 0x545D
+0x58DC = 0x5460
+0x58DE = 0x5455
+0x58DF = 0x5462
+0x58E4 = 0x5461
+0x58E5 = 0x545F
+0x58EB = 0x3B4E
+0x58EC = 0x3F51
+0x58EE = 0x4154
+0x58EF = 0x5463
+0x58F0 = 0x403C
+0x58F1 = 0x306D
+0x58F2 = 0x4764
+0x58F7 = 0x445B
+0x58F9 = 0x5465
+0x58FA = 0x5464
+0x58FB = 0x5466
+0x58FC = 0x5467
+0x58FD = 0x5468
+0x5902 = 0x5469
+0x5909 = 0x4A51
+0x590A = 0x546A
+0x590F = 0x3246
+0x5910 = 0x546B
+0x5915 = 0x4D3C
+0x5916 = 0x3330
+0x5918 = 0x5249
+0x5919 = 0x3D48
+0x591A = 0x423F
+0x591B = 0x546C
+0x591C = 0x4C6B
+0x5922 = 0x4C34
+0x5925 = 0x546E
+0x5927 = 0x4267
+0x5929 = 0x4537
+0x592A = 0x4240
+0x592B = 0x4957
+0x592C = 0x546F
+0x592D = 0x5470
+0x592E = 0x317B
+0x5931 = 0x3C3A
+0x5932 = 0x5471
+0x5937 = 0x3050
+0x5938 = 0x5472
+0x593E = 0x5473
+0x5944 = 0x3162
+0x5947 = 0x3471
+0x5948 = 0x4660
+0x5949 = 0x4A74
+0x594E = 0x5477
+0x594F = 0x4155
+0x5950 = 0x5476
+0x5951 = 0x3740
+0x5954 = 0x4B5B
+0x5955 = 0x5475
+0x5957 = 0x4565
+0x5958 = 0x5479
+0x595A = 0x5478
+0x5960 = 0x547B
+0x5962 = 0x547A
+0x5965 = 0x317C
+0x5967 = 0x547C
+0x5968 = 0x3E29
+0x5969 = 0x547E
+0x596A = 0x4325
+0x596C = 0x547D
+0x596E = 0x4A33
+0x5973 = 0x3D77
+0x5974 = 0x455B
+0x5978 = 0x5521
+0x597D = 0x3925
+0x5981 = 0x5522
+0x5982 = 0x4721
+0x5983 = 0x485E
+0x5984 = 0x4C51
+0x598A = 0x4725
+0x598D = 0x552B
+0x5993 = 0x3538
+0x5996 = 0x4D45
+0x5999 = 0x4C2F
+0x599B = 0x562C
+0x599D = 0x5523
+0x59A3 = 0x5526
+0x59A5 = 0x4245
+0x59A8 = 0x4B38
+0x59AC = 0x454A
+0x59B2 = 0x5527
+0x59B9 = 0x4B65
+0x59BB = 0x3A4A
+0x59BE = 0x3E2A
+0x59C6 = 0x5528
+0x59C9 = 0x3B50
+0x59CB = 0x3B4F
+0x59D0 = 0x3039
+0x59D1 = 0x3848
+0x59D3 = 0x402B
+0x59D4 = 0x3051
+0x59D9 = 0x552C
+0x59DA = 0x552D
+0x59DC = 0x552A
+0x59E5 = 0x3138
+0x59E6 = 0x342F
+0x59E8 = 0x5529
+0x59EA = 0x4C45
+0x59EB = 0x4931
+0x59F6 = 0x3028
+0x59FB = 0x3079
+0x59FF = 0x3B51
+0x5A01 = 0x3052
+0x5A03 = 0x3023
+0x5A09 = 0x5532
+0x5A11 = 0x5530
+0x5A18 = 0x4C3C
+0x5A1A = 0x5533
+0x5A1C = 0x5531
+0x5A1F = 0x552F
+0x5A20 = 0x3F31
+0x5A25 = 0x552E
+0x5A29 = 0x4A5A
+0x5A2F = 0x3864
+0x5A35 = 0x5537
+0x5A36 = 0x5538
+0x5A3C = 0x3E2B
+0x5A40 = 0x5534
+0x5A41 = 0x4F2C
+0x5A46 = 0x474C
+0x5A49 = 0x5536
+0x5A5A = 0x3A27
+0x5A62 = 0x5539
+0x5A66 = 0x4958
+0x5A6A = 0x553A
+0x5A6C = 0x5535
+0x5A7F = 0x4C3B
+0x5A92 = 0x475E
+0x5A9A = 0x553B
+0x5A9B = 0x4932
+0x5ABC = 0x553C
+0x5ABD = 0x5540
+0x5ABE = 0x553D
+0x5AC1 = 0x3247
+0x5AC2 = 0x553F
+0x5AC9 = 0x3C3B
+0x5ACB = 0x553E
+0x5ACC = 0x3779
+0x5AD0 = 0x554C
+0x5AD6 = 0x5545
+0x5AD7 = 0x5542
+0x5AE1 = 0x4364
+0x5AE3 = 0x5541
+0x5AE6 = 0x5543
+0x5AE9 = 0x5544
+0x5AFA = 0x5546
+0x5AFB = 0x5547
+0x5B09 = 0x3472
+0x5B0B = 0x5549
+0x5B0C = 0x5548
+0x5B16 = 0x554A
+0x5B22 = 0x3E6E
+0x5B2A = 0x554D
+0x5B2C = 0x445C
+0x5B30 = 0x3145
+0x5B32 = 0x554B
+0x5B36 = 0x554E
+0x5B3E = 0x554F
+0x5B40 = 0x5552
+0x5B43 = 0x5550
+0x5B45 = 0x5551
+0x5B50 = 0x3B52
+0x5B51 = 0x5553
+0x5B54 = 0x3926
+0x5B55 = 0x5554
+0x5B57 = 0x3B7A
+0x5B58 = 0x4238
+0x5B5A = 0x5555
+0x5B5B = 0x5556
+0x5B5C = 0x3B5A
+0x5B5D = 0x3927
+0x5B5F = 0x4C52
+0x5B63 = 0x3528
+0x5B64 = 0x3849
+0x5B65 = 0x5557
+0x5B66 = 0x3358
+0x5B69 = 0x5558
+0x5B6B = 0x4239
+0x5B70 = 0x5559
+0x5B71 = 0x5623
+0x5B73 = 0x555A
+0x5B75 = 0x555B
+0x5B78 = 0x555C
+0x5B7A = 0x555E
+0x5B80 = 0x555F
+0x5B83 = 0x5560
+0x5B85 = 0x4270
+0x5B87 = 0x3127
+0x5B88 = 0x3C69
+0x5B89 = 0x3042
+0x5B8B = 0x4157
+0x5B8C = 0x3430
+0x5B8D = 0x3C35
+0x5B8F = 0x3928
+0x5B95 = 0x4566
+0x5B97 = 0x3D21
+0x5B98 = 0x3431
+0x5B99 = 0x4368
+0x5B9A = 0x446A
+0x5B9B = 0x3038
+0x5B9C = 0x3539
+0x5B9D = 0x4A75
+0x5B9F = 0x3C42
+0x5BA2 = 0x3552
+0x5BA3 = 0x406B
+0x5BA4 = 0x3C3C
+0x5BA5 = 0x4D28
+0x5BA6 = 0x5561
+0x5BAE = 0x355C
+0x5BB0 = 0x3A4B
+0x5BB3 = 0x3332
+0x5BB4 = 0x3163
+0x5BB5 = 0x3E2C
+0x5BB6 = 0x3248
+0x5BB8 = 0x5562
+0x5BB9 = 0x4D46
+0x5BBF = 0x3D49
+0x5BC2 = 0x3C64
+0x5BC3 = 0x5563
+0x5BC4 = 0x3473
+0x5BC5 = 0x4652
+0x5BC6 = 0x4C29
+0x5BC7 = 0x5564
+0x5BC9 = 0x5565
+0x5BCC = 0x4959
+0x5BD0 = 0x5567
+0x5BD2 = 0x3428
+0x5BD3 = 0x3677
+0x5BD4 = 0x5566
+0x5BDB = 0x3432
+0x5BDD = 0x3F32
+0x5BDE = 0x556B
+0x5BDF = 0x3B21
+0x5BE1 = 0x3249
+0x5BE2 = 0x556A
+0x5BE4 = 0x5568
+0x5BE5 = 0x556C
+0x5BE6 = 0x5569
+0x5BE7 = 0x472B
+0x5BE8 = 0x5C4D
+0x5BE9 = 0x3F33
+0x5BEB = 0x556D
+0x5BEE = 0x4E40
+0x5BF0 = 0x556E
+0x5BF3 = 0x5570
+0x5BF5 = 0x437E
+0x5BF6 = 0x556F
+0x5BF8 = 0x4023
+0x5BFA = 0x3B7B
+0x5BFE = 0x4250
+0x5BFF = 0x3C77
+0x5C01 = 0x4975
+0x5C02 = 0x406C
+0x5C04 = 0x3C4D
+0x5C05 = 0x5571
+0x5C06 = 0x3E2D
+0x5C07 = 0x5572
+0x5C08 = 0x5573
+0x5C09 = 0x3053
+0x5C0A = 0x423A
+0x5C0B = 0x3F52
+0x5C0D = 0x5574
+0x5C0E = 0x4633
+0x5C0F = 0x3E2E
+0x5C11 = 0x3E2F
+0x5C13 = 0x5575
+0x5C16 = 0x406D
+0x5C1A = 0x3E30
+0x5C20 = 0x5576
+0x5C22 = 0x5577
+0x5C24 = 0x4C60
+0x5C28 = 0x5578
+0x5C2D = 0x3646
+0x5C31 = 0x3D22
+0x5C38 = 0x5579
+0x5C39 = 0x557A
+0x5C3A = 0x3C5C
+0x5C3B = 0x3F2C
+0x5C3C = 0x4674
+0x5C3D = 0x3F54
+0x5C3E = 0x4878
+0x5C3F = 0x4722
+0x5C40 = 0x3649
+0x5C41 = 0x557B
+0x5C45 = 0x356F
+0x5C46 = 0x557C
+0x5C48 = 0x367E
+0x5C4A = 0x464F
+0x5C4B = 0x3230
+0x5C4D = 0x3B53
+0x5C4E = 0x557D
+0x5C4F = 0x5622
+0x5C50 = 0x5621
+0x5C51 = 0x367D
+0x5C53 = 0x557E
+0x5C55 = 0x4538
+0x5C5E = 0x4230
+0x5C60 = 0x454B
+0x5C61 = 0x3C48
+0x5C64 = 0x4158
+0x5C65 = 0x4D7A
+0x5C6C = 0x5624
+0x5C6E = 0x5625
+0x5C6F = 0x4656
+0x5C71 = 0x3B33
+0x5C76 = 0x5627
+0x5C79 = 0x5628
+0x5C8C = 0x5629
+0x5C90 = 0x3474
+0x5C91 = 0x562A
+0x5C94 = 0x562B
+0x5CA1 = 0x322C
+0x5CA8 = 0x413B
+0x5CA9 = 0x3464
+0x5CAB = 0x562D
+0x5CAC = 0x4C28
+0x5CB1 = 0x4252
+0x5CB3 = 0x3359
+0x5CB6 = 0x562F
+0x5CB7 = 0x5631
+0x5CB8 = 0x345F
+0x5CBB = 0x562E
+0x5CBC = 0x5630
+0x5CBE = 0x5633
+0x5CC5 = 0x5632
+0x5CC7 = 0x5634
+0x5CD9 = 0x5635
+0x5CE0 = 0x463D
+0x5CE1 = 0x362E
+0x5CE8 = 0x3265
+0x5CE9 = 0x5636
+0x5CEA = 0x563B
+0x5CED = 0x5639
+0x5CEF = 0x4A77
+0x5CF0 = 0x4A76
+0x5CF6 = 0x4567
+0x5CFA = 0x5638
+0x5CFB = 0x3D54
+0x5CFD = 0x5637
+0x5D07 = 0x3F72
+0x5D0B = 0x563C
+0x5D0E = 0x3A6A
+0x5D11 = 0x5642
+0x5D14 = 0x5643
+0x5D15 = 0x563D
+0x5D16 = 0x3333
+0x5D17 = 0x563E
+0x5D18 = 0x5647
+0x5D19 = 0x5646
+0x5D1A = 0x5645
+0x5D1B = 0x5641
+0x5D1F = 0x5640
+0x5D22 = 0x5644
+0x5D29 = 0x4A78
+0x5D4B = 0x564B
+0x5D4C = 0x5648
+0x5D4E = 0x564A
+0x5D50 = 0x4D72
+0x5D52 = 0x5649
+0x5D5C = 0x563F
+0x5D69 = 0x3F73
+0x5D6C = 0x564C
+0x5D6F = 0x3A37
+0x5D73 = 0x564D
+0x5D76 = 0x564E
+0x5D82 = 0x5651
+0x5D84 = 0x5650
+0x5D87 = 0x564F
+0x5D8B = 0x4568
+0x5D8C = 0x563A
+0x5D90 = 0x5657
+0x5D9D = 0x5653
+0x5DA2 = 0x5652
+0x5DAC = 0x5654
+0x5DAE = 0x5655
+0x5DB7 = 0x5658
+0x5DBA = 0x4E66
+0x5DBC = 0x5659
+0x5DBD = 0x5656
+0x5DC9 = 0x565A
+0x5DCC = 0x3460
+0x5DCD = 0x565B
+0x5DD2 = 0x565D
+0x5DD3 = 0x565C
+0x5DD6 = 0x565E
+0x5DDB = 0x565F
+0x5DDD = 0x406E
+0x5DDE = 0x3D23
+0x5DE1 = 0x3D64
+0x5DE3 = 0x4163
+0x5DE5 = 0x3929
+0x5DE6 = 0x3A38
+0x5DE7 = 0x392A
+0x5DE8 = 0x3570
+0x5DEB = 0x5660
+0x5DEE = 0x3A39
+0x5DF1 = 0x384A
+0x5DF2 = 0x5661
+0x5DF3 = 0x4C26
+0x5DF4 = 0x4743
+0x5DF5 = 0x5662
+0x5DF7 = 0x392B
+0x5DFB = 0x342C
+0x5DFD = 0x4327
+0x5DFE = 0x3652
+0x5E02 = 0x3B54
+0x5E03 = 0x495B
+0x5E06 = 0x4841
+0x5E0B = 0x5663
+0x5E0C = 0x3475
+0x5E11 = 0x5666
+0x5E16 = 0x4421
+0x5E19 = 0x5665
+0x5E1A = 0x5664
+0x5E1B = 0x5667
+0x5E1D = 0x446B
+0x5E25 = 0x3F63
+0x5E2B = 0x3B55
+0x5E2D = 0x404A
+0x5E2F = 0x4253
+0x5E30 = 0x3522
+0x5E33 = 0x4422
+0x5E36 = 0x5668
+0x5E37 = 0x5669
+0x5E38 = 0x3E6F
+0x5E3D = 0x4B39
+0x5E40 = 0x566C
+0x5E43 = 0x566B
+0x5E44 = 0x566A
+0x5E45 = 0x497D
+0x5E47 = 0x5673
+0x5E4C = 0x4B5A
+0x5E4E = 0x566D
+0x5E54 = 0x566F
+0x5E55 = 0x4B6B
+0x5E57 = 0x566E
+0x5E5F = 0x5670
+0x5E61 = 0x4828
+0x5E62 = 0x5671
+0x5E63 = 0x4A3E
+0x5E64 = 0x5672
+0x5E72 = 0x3433
+0x5E73 = 0x4A3F
+0x5E74 = 0x472F
+0x5E75 = 0x5674
+0x5E76 = 0x5675
+0x5E78 = 0x392C
+0x5E79 = 0x3434
+0x5E7A = 0x5676
+0x5E7B = 0x3838
+0x5E7C = 0x4D44
+0x5E7D = 0x4D29
+0x5E7E = 0x3476
+0x5E7F = 0x5678
+0x5E81 = 0x4423
+0x5E83 = 0x392D
+0x5E84 = 0x3E31
+0x5E87 = 0x485F
+0x5E8A = 0x3E32
+0x5E8F = 0x3D78
+0x5E95 = 0x446C
+0x5E96 = 0x4A79
+0x5E97 = 0x4539
+0x5E9A = 0x392E
+0x5E9C = 0x495C
+0x5EA0 = 0x5679
+0x5EA6 = 0x4559
+0x5EA7 = 0x3A42
+0x5EAB = 0x384B
+0x5EAD = 0x446D
+0x5EB5 = 0x3043
+0x5EB6 = 0x3D6E
+0x5EB7 = 0x392F
+0x5EB8 = 0x4D47
+0x5EC1 = 0x567A
+0x5EC2 = 0x567B
+0x5EC3 = 0x4751
+0x5EC8 = 0x567C
+0x5EC9 = 0x4E77
+0x5ECA = 0x4F2D
+0x5ECF = 0x567E
+0x5ED0 = 0x567D
+0x5ED3 = 0x3347
+0x5ED6 = 0x5721
+0x5EDA = 0x5724
+0x5EDB = 0x5725
+0x5EDD = 0x5723
+0x5EDF = 0x4940
+0x5EE0 = 0x3E33
+0x5EE1 = 0x5727
+0x5EE2 = 0x5726
+0x5EE3 = 0x5722
+0x5EE8 = 0x5728
+0x5EE9 = 0x5729
+0x5EEC = 0x572A
+0x5EF0 = 0x572D
+0x5EF1 = 0x572B
+0x5EF3 = 0x572C
+0x5EF4 = 0x572E
+0x5EF6 = 0x3164
+0x5EF7 = 0x446E
+0x5EF8 = 0x572F
+0x5EFA = 0x377A
+0x5EFB = 0x3276
+0x5EFC = 0x4736
+0x5EFE = 0x5730
+0x5EFF = 0x467B
+0x5F01 = 0x4A5B
+0x5F03 = 0x5731
+0x5F04 = 0x4F2E
+0x5F09 = 0x5732
+0x5F0A = 0x4A40
+0x5F0B = 0x5735
+0x5F0C = 0x5021
+0x5F0D = 0x5031
+0x5F0F = 0x3C30
+0x5F10 = 0x4675
+0x5F11 = 0x5736
+0x5F13 = 0x355D
+0x5F14 = 0x4424
+0x5F15 = 0x307A
+0x5F16 = 0x5737
+0x5F17 = 0x4A26
+0x5F18 = 0x3930
+0x5F1B = 0x4350
+0x5F1F = 0x446F
+0x5F25 = 0x4C6F
+0x5F26 = 0x3839
+0x5F27 = 0x384C
+0x5F29 = 0x5738
+0x5F2D = 0x5739
+0x5F2F = 0x573F
+0x5F31 = 0x3C65
+0x5F35 = 0x4425
+0x5F37 = 0x362F
+0x5F38 = 0x573A
+0x5F3C = 0x492B
+0x5F3E = 0x4346
+0x5F41 = 0x573B
+0x5F48 = 0x573C
+0x5F4A = 0x3630
+0x5F4C = 0x573D
+0x5F4E = 0x573E
+0x5F51 = 0x5740
+0x5F53 = 0x4576
+0x5F56 = 0x5741
+0x5F57 = 0x5742
+0x5F59 = 0x5743
+0x5F5C = 0x5734
+0x5F5D = 0x5733
+0x5F61 = 0x5744
+0x5F62 = 0x3741
+0x5F66 = 0x4927
+0x5F69 = 0x3A4C
+0x5F6A = 0x4937
+0x5F6B = 0x4426
+0x5F6C = 0x494B
+0x5F6D = 0x5745
+0x5F70 = 0x3E34
+0x5F71 = 0x3146
+0x5F73 = 0x5746
+0x5F77 = 0x5747
+0x5F79 = 0x4C72
+0x5F7C = 0x4860
+0x5F7F = 0x574A
+0x5F80 = 0x317D
+0x5F81 = 0x402C
+0x5F82 = 0x5749
+0x5F83 = 0x5748
+0x5F84 = 0x3742
+0x5F85 = 0x4254
+0x5F87 = 0x574E
+0x5F88 = 0x574C
+0x5F8A = 0x574B
+0x5F8B = 0x4E27
+0x5F8C = 0x3865
+0x5F90 = 0x3D79
+0x5F91 = 0x574D
+0x5F92 = 0x454C
+0x5F93 = 0x3D3E
+0x5F97 = 0x4640
+0x5F98 = 0x5751
+0x5F99 = 0x5750
+0x5F9E = 0x574F
+0x5FA0 = 0x5752
+0x5FA1 = 0x3866
+0x5FA8 = 0x5753
+0x5FA9 = 0x497C
+0x5FAA = 0x3D5B
+0x5FAD = 0x5754
+0x5FAE = 0x4879
+0x5FB3 = 0x4641
+0x5FB4 = 0x4427
+0x5FB9 = 0x4530
+0x5FBC = 0x5755
+0x5FBD = 0x352B
+0x5FC3 = 0x3F34
+0x5FC5 = 0x492C
+0x5FCC = 0x3477
+0x5FCD = 0x4726
+0x5FD6 = 0x5756
+0x5FD7 = 0x3B56
+0x5FD8 = 0x4B3A
+0x5FD9 = 0x4B3B
+0x5FDC = 0x317E
+0x5FDD = 0x575B
+0x5FE0 = 0x4369
+0x5FE4 = 0x5758
+0x5FEB = 0x3277
+0x5FF0 = 0x582D
+0x5FF1 = 0x575A
+0x5FF5 = 0x4730
+0x5FF8 = 0x5759
+0x5FFB = 0x5757
+0x5FFD = 0x397A
+0x5FFF = 0x575D
+0x600E = 0x5763
+0x600F = 0x5769
+0x6010 = 0x5761
+0x6012 = 0x455C
+0x6015 = 0x5766
+0x6016 = 0x495D
+0x6019 = 0x5760
+0x601B = 0x5765
+0x601C = 0x4E67
+0x601D = 0x3B57
+0x6020 = 0x4255
+0x6021 = 0x575E
+0x6025 = 0x355E
+0x6026 = 0x5768
+0x6027 = 0x402D
+0x6028 = 0x3165
+0x6029 = 0x5762
+0x602A = 0x3278
+0x602B = 0x5767
+0x602F = 0x3631
+0x6031 = 0x5764
+0x603A = 0x576A
+0x6041 = 0x576C
+0x6042 = 0x5776
+0x6043 = 0x5774
+0x6046 = 0x5771
+0x604A = 0x5770
+0x604B = 0x4E78
+0x604D = 0x5772
+0x6050 = 0x3632
+0x6052 = 0x3931
+0x6055 = 0x3D7A
+0x6059 = 0x5779
+0x605A = 0x576B
+0x605F = 0x576F
+0x6060 = 0x575F
+0x6062 = 0x327A
+0x6063 = 0x5773
+0x6064 = 0x5775
+0x6065 = 0x4351
+0x6068 = 0x3A28
+0x6069 = 0x3238
+0x606A = 0x576D
+0x606B = 0x5778
+0x606C = 0x5777
+0x606D = 0x3633
+0x606F = 0x4229
+0x6070 = 0x3366
+0x6075 = 0x3743
+0x6077 = 0x576E
+0x6081 = 0x577A
+0x6083 = 0x577D
+0x6084 = 0x5821
+0x6089 = 0x3C3D
+0x608B = 0x5827
+0x608C = 0x4470
+0x608D = 0x577B
+0x6092 = 0x5825
+0x6094 = 0x3279
+0x6096 = 0x5823
+0x6097 = 0x5824
+0x609A = 0x577E
+0x609B = 0x5822
+0x609F = 0x3867
+0x60A0 = 0x4D2A
+0x60A3 = 0x3435
+0x60A6 = 0x3159
+0x60A7 = 0x5826
+0x60A9 = 0x473A
+0x60AA = 0x302D
+0x60B2 = 0x4861
+0x60B3 = 0x575C
+0x60B4 = 0x582C
+0x60B5 = 0x5830
+0x60B6 = 0x4C65
+0x60B8 = 0x5829
+0x60BC = 0x4569
+0x60BD = 0x582E
+0x60C5 = 0x3E70
+0x60C6 = 0x582F
+0x60C7 = 0x4657
+0x60D1 = 0x4F47
+0x60D3 = 0x582B
+0x60D8 = 0x5831
+0x60DA = 0x397B
+0x60DC = 0x404B
+0x60DF = 0x3054
+0x60E0 = 0x582A
+0x60E1 = 0x5828
+0x60E3 = 0x415A
+0x60E7 = 0x577C
+0x60E8 = 0x3B34
+0x60F0 = 0x4246
+0x60F1 = 0x583D
+0x60F3 = 0x415B
+0x60F4 = 0x5838
+0x60F6 = 0x5835
+0x60F7 = 0x5836
+0x60F9 = 0x3C66
+0x60FA = 0x5839
+0x60FB = 0x583C
+0x6100 = 0x5837
+0x6101 = 0x3D25
+0x6103 = 0x583A
+0x6106 = 0x5834
+0x6108 = 0x4C7C
+0x6109 = 0x4C7B
+0x610D = 0x583E
+0x610E = 0x583F
+0x610F = 0x3055
+0x6115 = 0x5833
+0x611A = 0x3672
+0x611B = 0x3026
+0x611F = 0x3436
+0x6121 = 0x583B
+0x6127 = 0x5843
+0x6128 = 0x5842
+0x612C = 0x5847
+0x6134 = 0x5848
+0x613C = 0x5846
+0x613D = 0x5849
+0x613E = 0x5841
+0x613F = 0x5845
+0x6142 = 0x584A
+0x6144 = 0x584B
+0x6147 = 0x5840
+0x6148 = 0x3B7C
+0x614A = 0x5844
+0x614B = 0x4256
+0x614C = 0x3932
+0x614D = 0x5832
+0x614E = 0x3F35
+0x6153 = 0x5858
+0x6155 = 0x4A69
+0x6158 = 0x584E
+0x6159 = 0x584F
+0x615A = 0x5850
+0x615D = 0x5857
+0x615F = 0x5856
+0x6162 = 0x4B7D
+0x6163 = 0x3437
+0x6165 = 0x5854
+0x6167 = 0x3745
+0x6168 = 0x3334
+0x616B = 0x5851
+0x616E = 0x4E38
+0x616F = 0x5853
+0x6170 = 0x3056
+0x6171 = 0x5855
+0x6173 = 0x584C
+0x6174 = 0x5852
+0x6175 = 0x5859
+0x6176 = 0x3744
+0x6177 = 0x584D
+0x617E = 0x4D5D
+0x6182 = 0x4D2B
+0x6187 = 0x585C
+0x618A = 0x5860
+0x618E = 0x417E
+0x6190 = 0x4E79
+0x6191 = 0x5861
+0x6194 = 0x585E
+0x6196 = 0x585B
+0x6199 = 0x585A
+0x619A = 0x585F
+0x61A4 = 0x4A30
+0x61A7 = 0x4634
+0x61A9 = 0x3746
+0x61AB = 0x5862
+0x61AC = 0x585D
+0x61AE = 0x5863
+0x61B2 = 0x377B
+0x61B6 = 0x3231
+0x61BA = 0x586B
+0x61BE = 0x3438
+0x61C3 = 0x5869
+0x61C6 = 0x586A
+0x61C7 = 0x3A29
+0x61C8 = 0x5868
+0x61C9 = 0x5866
+0x61CA = 0x5865
+0x61CB = 0x586C
+0x61CC = 0x5864
+0x61CD = 0x586E
+0x61D0 = 0x327B
+0x61E3 = 0x5870
+0x61E6 = 0x586F
+0x61F2 = 0x4428
+0x61F4 = 0x5873
+0x61F6 = 0x5871
+0x61F7 = 0x5867
+0x61F8 = 0x377C
+0x61FA = 0x5872
+0x61FC = 0x5876
+0x61FD = 0x5875
+0x61FE = 0x5877
+0x61FF = 0x5874
+0x6200 = 0x5878
+0x6208 = 0x5879
+0x6209 = 0x587A
+0x620A = 0x4A6A
+0x620C = 0x587C
+0x620D = 0x587B
+0x620E = 0x3D3F
+0x6210 = 0x402E
+0x6211 = 0x3266
+0x6212 = 0x327C
+0x6214 = 0x587D
+0x6216 = 0x303F
+0x621A = 0x404C
+0x621B = 0x587E
+0x621D = 0x6C43
+0x621E = 0x5921
+0x621F = 0x3761
+0x6221 = 0x5922
+0x6226 = 0x406F
+0x622A = 0x5923
+0x622E = 0x5924
+0x622F = 0x353A
+0x6230 = 0x5925
+0x6232 = 0x5926
+0x6233 = 0x5927
+0x6234 = 0x4257
+0x6238 = 0x384D
+0x623B = 0x4C61
+0x623F = 0x4B3C
+0x6240 = 0x3D6A
+0x6241 = 0x5928
+0x6247 = 0x4070
+0x6248 = 0x6E3D
+0x6249 = 0x4862
+0x624B = 0x3C6A
+0x624D = 0x3A4D
+0x624E = 0x5929
+0x6253 = 0x4247
+0x6255 = 0x4A27
+0x6258 = 0x4271
+0x625B = 0x592C
+0x625E = 0x592A
+0x6260 = 0x592D
+0x6263 = 0x592B
+0x6268 = 0x592E
+0x626E = 0x4A31
+0x6271 = 0x3037
+0x6276 = 0x495E
+0x6279 = 0x4863
+0x627C = 0x592F
+0x627E = 0x5932
+0x627F = 0x3E35
+0x6280 = 0x353B
+0x6282 = 0x5930
+0x6283 = 0x5937
+0x6284 = 0x3E36
+0x6289 = 0x5931
+0x628A = 0x4744
+0x6291 = 0x4D5E
+0x6292 = 0x5933
+0x6293 = 0x5934
+0x6294 = 0x5938
+0x6295 = 0x456A
+0x6296 = 0x5935
+0x6297 = 0x3933
+0x6298 = 0x405E
+0x629B = 0x5946
+0x629C = 0x4834
+0x629E = 0x4272
+0x62AB = 0x4864
+0x62AC = 0x5A2D
+0x62B1 = 0x4A7A
+0x62B5 = 0x4471
+0x62B9 = 0x4B75
+0x62BB = 0x593B
+0x62BC = 0x3221
+0x62BD = 0x436A
+0x62C2 = 0x5944
+0x62C5 = 0x4334
+0x62C6 = 0x593E
+0x62C7 = 0x5945
+0x62C8 = 0x5940
+0x62C9 = 0x5947
+0x62CA = 0x5943
+0x62CC = 0x5942
+0x62CD = 0x476F
+0x62CF = 0x593C
+0x62D0 = 0x327D
+0x62D1 = 0x593A
+0x62D2 = 0x3571
+0x62D3 = 0x4273
+0x62D4 = 0x5936
+0x62D7 = 0x5939
+0x62D8 = 0x3934
+0x62D9 = 0x405B
+0x62DB = 0x3E37
+0x62DC = 0x5941
+0x62DD = 0x4752
+0x62E0 = 0x3572
+0x62E1 = 0x3348
+0x62EC = 0x3367
+0x62ED = 0x3F21
+0x62EE = 0x5949
+0x62EF = 0x594E
+0x62F1 = 0x594A
+0x62F3 = 0x377D
+0x62F5 = 0x594F
+0x62F6 = 0x3B22
+0x62F7 = 0x3969
+0x62FE = 0x3D26
+0x62FF = 0x593D
+0x6301 = 0x3B7D
+0x6302 = 0x594C
+0x6307 = 0x3B58
+0x6308 = 0x594D
+0x6309 = 0x3044
+0x630C = 0x5948
+0x6311 = 0x4429
+0x6319 = 0x3573
+0x631F = 0x3634
+0x6327 = 0x594B
+0x6328 = 0x3027
+0x632B = 0x3A43
+0x632F = 0x3F36
+0x633A = 0x4472
+0x633D = 0x4854
+0x633E = 0x5951
+0x633F = 0x415E
+0x6349 = 0x422A
+0x634C = 0x3B2B
+0x634D = 0x5952
+0x634F = 0x5954
+0x6350 = 0x5950
+0x6355 = 0x4A61
+0x6357 = 0x443D
+0x635C = 0x415C
+0x6367 = 0x4A7B
+0x6368 = 0x3C4E
+0x6369 = 0x5960
+0x636B = 0x595F
+0x636E = 0x3F78
+0x6372 = 0x377E
+0x6376 = 0x5959
+0x6377 = 0x3E39
+0x637A = 0x4668
+0x637B = 0x4731
+0x6380 = 0x5957
+0x6383 = 0x415D
+0x6388 = 0x3C78
+0x6389 = 0x595C
+0x638C = 0x3E38
+0x638E = 0x5956
+0x638F = 0x595B
+0x6392 = 0x4753
+0x6396 = 0x5955
+0x6398 = 0x3721
+0x639B = 0x335D
+0x639F = 0x595D
+0x63A0 = 0x4E2B
+0x63A1 = 0x3A4E
+0x63A2 = 0x4335
+0x63A3 = 0x595A
+0x63A5 = 0x405C
+0x63A7 = 0x3935
+0x63A8 = 0x3F64
+0x63A9 = 0x3166
+0x63AA = 0x413C
+0x63AB = 0x5958
+0x63AC = 0x3545
+0x63B2 = 0x3747
+0x63B4 = 0x444F
+0x63B5 = 0x595E
+0x63BB = 0x415F
+0x63BE = 0x5961
+0x63C0 = 0x5963
+0x63C3 = 0x4237
+0x63C4 = 0x5969
+0x63C6 = 0x5964
+0x63C9 = 0x5966
+0x63CF = 0x4941
+0x63D0 = 0x4473
+0x63D2 = 0x5967
+0x63D6 = 0x4D2C
+0x63DA = 0x4D48
+0x63DB = 0x3439
+0x63E1 = 0x302E
+0x63E3 = 0x5965
+0x63E9 = 0x5962
+0x63EE = 0x3478
+0x63F4 = 0x3167
+0x63F6 = 0x5968
+0x63FA = 0x4D49
+0x6406 = 0x596C
+0x640D = 0x423B
+0x640F = 0x5973
+0x6413 = 0x596D
+0x6416 = 0x596A
+0x6417 = 0x5971
+0x641C = 0x5953
+0x6426 = 0x596E
+0x6428 = 0x5972
+0x642C = 0x4842
+0x642D = 0x456B
+0x6434 = 0x596B
+0x6436 = 0x596F
+0x643A = 0x3748
+0x643E = 0x3A71
+0x6442 = 0x405D
+0x644E = 0x5977
+0x6458 = 0x4526
+0x6467 = 0x5974
+0x6469 = 0x4B60
+0x646F = 0x5975
+0x6476 = 0x5976
+0x6478 = 0x4C4E
+0x647A = 0x4022
+0x6483 = 0x3762
+0x6488 = 0x597D
+0x6492 = 0x3B35
+0x6493 = 0x597A
+0x6495 = 0x5979
+0x649A = 0x4732
+0x649E = 0x4635
+0x64A4 = 0x4531
+0x64A5 = 0x597B
+0x64A9 = 0x597C
+0x64AB = 0x496F
+0x64AD = 0x4745
+0x64AE = 0x3B23
+0x64B0 = 0x4071
+0x64B2 = 0x4B50
+0x64B9 = 0x3349
+0x64BB = 0x5A25
+0x64BC = 0x597E
+0x64C1 = 0x4D4A
+0x64C2 = 0x5A27
+0x64C5 = 0x5A23
+0x64C7 = 0x5A24
+0x64CD = 0x4160
+0x64D2 = 0x5A22
+0x64D4 = 0x593F
+0x64D8 = 0x5A26
+0x64DA = 0x5A21
+0x64E0 = 0x5A2B
+0x64E1 = 0x5A2C
+0x64E2 = 0x4527
+0x64E3 = 0x5A2E
+0x64E6 = 0x3B24
+0x64E7 = 0x5A29
+0x64EC = 0x353C
+0x64EF = 0x5A2F
+0x64F1 = 0x5A28
+0x64F2 = 0x5A33
+0x64F4 = 0x5A32
+0x64F6 = 0x5A31
+0x64FA = 0x5A34
+0x64FD = 0x5A36
+0x64FE = 0x3E71
+0x6500 = 0x5A35
+0x6505 = 0x5A39
+0x6518 = 0x5A37
+0x651C = 0x5A38
+0x651D = 0x5970
+0x6523 = 0x5A3B
+0x6524 = 0x5A3A
+0x652A = 0x5978
+0x652B = 0x5A3C
+0x652C = 0x5A30
+0x652F = 0x3B59
+0x6534 = 0x5A3D
+0x6535 = 0x5A3E
+0x6536 = 0x5A40
+0x6537 = 0x5A3F
+0x6538 = 0x5A41
+0x6539 = 0x327E
+0x653B = 0x3936
+0x653E = 0x4A7C
+0x653F = 0x402F
+0x6545 = 0x384E
+0x6548 = 0x5A43
+0x654D = 0x5A46
+0x654F = 0x4952
+0x6551 = 0x355F
+0x6555 = 0x5A45
+0x6556 = 0x5A44
+0x6557 = 0x4754
+0x6558 = 0x5A47
+0x6559 = 0x3635
+0x655D = 0x5A49
+0x655E = 0x5A48
+0x6562 = 0x343A
+0x6563 = 0x3B36
+0x6566 = 0x4658
+0x656C = 0x3749
+0x6570 = 0x3F74
+0x6572 = 0x5A4A
+0x6574 = 0x4030
+0x6575 = 0x4528
+0x6577 = 0x495F
+0x6578 = 0x5A4B
+0x6582 = 0x5A4C
+0x6583 = 0x5A4D
+0x6587 = 0x4A38
+0x6588 = 0x555D
+0x6589 = 0x4046
+0x658C = 0x494C
+0x658E = 0x3A58
+0x6590 = 0x4865
+0x6591 = 0x4843
+0x6597 = 0x454D
+0x6599 = 0x4E41
+0x659B = 0x5A4F
+0x659C = 0x3C50
+0x659F = 0x5A50
+0x65A1 = 0x3036
+0x65A4 = 0x3654
+0x65A5 = 0x404D
+0x65A7 = 0x4960
+0x65AB = 0x5A51
+0x65AC = 0x3B42
+0x65AD = 0x4347
+0x65AF = 0x3B5B
+0x65B0 = 0x3F37
+0x65B7 = 0x5A52
+0x65B9 = 0x4A7D
+0x65BC = 0x3177
+0x65BD = 0x3B5C
+0x65C1 = 0x5A55
+0x65C3 = 0x5A53
+0x65C4 = 0x5A56
+0x65C5 = 0x4E39
+0x65C6 = 0x5A54
+0x65CB = 0x407B
+0x65CC = 0x5A57
+0x65CF = 0x4232
+0x65D2 = 0x5A58
+0x65D7 = 0x347A
+0x65D9 = 0x5A5A
+0x65DB = 0x5A59
+0x65E0 = 0x5A5B
+0x65E1 = 0x5A5C
+0x65E2 = 0x347B
+0x65E5 = 0x467C
+0x65E6 = 0x4336
+0x65E7 = 0x356C
+0x65E8 = 0x3B5D
+0x65E9 = 0x4161
+0x65EC = 0x3D5C
+0x65ED = 0x3030
+0x65F1 = 0x5A5D
+0x65FA = 0x3222
+0x65FB = 0x5A61
+0x6602 = 0x3937
+0x6603 = 0x5A60
+0x6606 = 0x3A2B
+0x6607 = 0x3E3A
+0x660A = 0x5A5F
+0x660C = 0x3E3B
+0x660E = 0x4C40
+0x660F = 0x3A2A
+0x6613 = 0x3057
+0x6614 = 0x404E
+0x661C = 0x5A66
+0x661F = 0x4031
+0x6620 = 0x3147
+0x6625 = 0x3D55
+0x6627 = 0x4B66
+0x6628 = 0x3A72
+0x662D = 0x3E3C
+0x662F = 0x4027
+0x6634 = 0x5A65
+0x6635 = 0x5A63
+0x6636 = 0x5A64
+0x663C = 0x436B
+0x663F = 0x5B26
+0x6641 = 0x5A6A
+0x6642 = 0x3B7E
+0x6643 = 0x3938
+0x6644 = 0x5A68
+0x6649 = 0x5A69
+0x664B = 0x3F38
+0x664F = 0x5A67
+0x6652 = 0x3B2F
+0x665D = 0x5A6C
+0x665E = 0x5A6B
+0x665F = 0x5A70
+0x6662 = 0x5A71
+0x6664 = 0x5A6D
+0x6666 = 0x3322
+0x6667 = 0x5A6E
+0x6668 = 0x5A6F
+0x6669 = 0x4855
+0x666E = 0x4961
+0x666F = 0x374A
+0x6670 = 0x5A72
+0x6674 = 0x4032
+0x6676 = 0x3E3D
+0x667A = 0x4352
+0x6681 = 0x3647
+0x6683 = 0x5A73
+0x6684 = 0x5A77
+0x6687 = 0x324B
+0x6688 = 0x5A74
+0x6689 = 0x5A76
+0x668E = 0x5A75
+0x6691 = 0x3D6B
+0x6696 = 0x4348
+0x6697 = 0x3045
+0x6698 = 0x5A78
+0x669D = 0x5A79
+0x66A2 = 0x442A
+0x66A6 = 0x4E71
+0x66AB = 0x3B43
+0x66AE = 0x4A6B
+0x66B4 = 0x4B3D
+0x66B8 = 0x5B22
+0x66B9 = 0x5A7B
+0x66BC = 0x5A7E
+0x66BE = 0x5A7D
+0x66C1 = 0x5A7A
+0x66C4 = 0x5B21
+0x66C7 = 0x465E
+0x66C9 = 0x5A7C
+0x66D6 = 0x5B23
+0x66D9 = 0x3D6C
+0x66DA = 0x5B24
+0x66DC = 0x4D4B
+0x66DD = 0x4778
+0x66E0 = 0x5B25
+0x66E6 = 0x5B27
+0x66E9 = 0x5B28
+0x66F0 = 0x5B29
+0x66F2 = 0x364A
+0x66F3 = 0x3148
+0x66F4 = 0x3939
+0x66F5 = 0x5B2A
+0x66F7 = 0x5B2B
+0x66F8 = 0x3D71
+0x66F9 = 0x4162
+0x66FC = 0x5258
+0x66FD = 0x413E
+0x66FE = 0x413D
+0x66FF = 0x4258
+0x6700 = 0x3A47
+0x6703 = 0x5072
+0x6708 = 0x376E
+0x6709 = 0x4D2D
+0x670B = 0x4A7E
+0x670D = 0x497E
+0x670F = 0x5B2C
+0x6714 = 0x3A73
+0x6715 = 0x443F
+0x6716 = 0x5B2D
+0x6717 = 0x4F2F
+0x671B = 0x4B3E
+0x671D = 0x442B
+0x671E = 0x5B2E
+0x671F = 0x347C
+0x6726 = 0x5B2F
+0x6727 = 0x5B30
+0x6728 = 0x4C5A
+0x672A = 0x4C24
+0x672B = 0x4B76
+0x672C = 0x4B5C
+0x672D = 0x3B25
+0x672E = 0x5B32
+0x6731 = 0x3C6B
+0x6734 = 0x4B51
+0x6736 = 0x5B34
+0x6737 = 0x5B37
+0x6738 = 0x5B36
+0x673A = 0x3479
+0x673D = 0x3560
+0x673F = 0x5B33
+0x6741 = 0x5B35
+0x6746 = 0x5B38
+0x6749 = 0x3F79
+0x674E = 0x4D7B
+0x674F = 0x3049
+0x6750 = 0x3A60
+0x6751 = 0x423C
+0x6753 = 0x3C5D
+0x6756 = 0x3E73
+0x6759 = 0x5B3B
+0x675C = 0x454E
+0x675E = 0x5B39
+0x675F = 0x422B
+0x6760 = 0x5B3A
+0x6761 = 0x3E72
+0x6762 = 0x4C5D
+0x6763 = 0x5B3C
+0x6764 = 0x5B3D
+0x6765 = 0x4D68
+0x676A = 0x5B42
+0x676D = 0x393A
+0x676F = 0x4755
+0x6770 = 0x5B3F
+0x6771 = 0x456C
+0x6772 = 0x5A5E
+0x6773 = 0x5A62
+0x6775 = 0x354F
+0x6777 = 0x4747
+0x677C = 0x5B41
+0x677E = 0x3E3E
+0x677F = 0x4844
+0x6785 = 0x5B47
+0x6787 = 0x487A
+0x6789 = 0x5B3E
+0x678B = 0x5B44
+0x678C = 0x5B43
+0x6790 = 0x404F
+0x6795 = 0x4B6D
+0x6797 = 0x4E53
+0x679A = 0x4B67
+0x679C = 0x324C
+0x679D = 0x3B5E
+0x67A0 = 0x4F48
+0x67A1 = 0x5B46
+0x67A2 = 0x3F75
+0x67A6 = 0x5B45
+0x67A9 = 0x5B40
+0x67AF = 0x384F
+0x67B3 = 0x5B4C
+0x67B4 = 0x5B4A
+0x67B6 = 0x324D
+0x67B7 = 0x5B48
+0x67B8 = 0x5B4E
+0x67B9 = 0x5B54
+0x67C1 = 0x4248
+0x67C4 = 0x4A41
+0x67C6 = 0x5B56
+0x67CA = 0x4922
+0x67CE = 0x5B55
+0x67CF = 0x4770
+0x67D0 = 0x4B3F
+0x67D1 = 0x343B
+0x67D3 = 0x4077
+0x67D4 = 0x3D40
+0x67D8 = 0x4453
+0x67DA = 0x4D2E
+0x67DD = 0x5B51
+0x67DE = 0x5B50
+0x67E2 = 0x5B52
+0x67E4 = 0x5B4F
+0x67E7 = 0x5B57
+0x67E9 = 0x5B4D
+0x67EC = 0x5B4B
+0x67EE = 0x5B53
+0x67EF = 0x5B49
+0x67F1 = 0x436C
+0x67F3 = 0x4C78
+0x67F4 = 0x3C46
+0x67F5 = 0x3A74
+0x67FB = 0x3A3A
+0x67FE = 0x4B6F
+0x67FF = 0x3341
+0x6802 = 0x444E
+0x6803 = 0x464A
+0x6804 = 0x3149
+0x6813 = 0x4072
+0x6816 = 0x4034
+0x6817 = 0x372A
+0x681E = 0x5B59
+0x6821 = 0x393B
+0x6822 = 0x337C
+0x6829 = 0x5B5B
+0x682A = 0x3374
+0x682B = 0x5B61
+0x6832 = 0x5B5E
+0x6834 = 0x4073
+0x6838 = 0x334B
+0x6839 = 0x3A2C
+0x683C = 0x334A
+0x683D = 0x3A4F
+0x6840 = 0x5B5C
+0x6841 = 0x3765
+0x6842 = 0x374B
+0x6843 = 0x456D
+0x6846 = 0x5B5A
+0x6848 = 0x3046
+0x684D = 0x5B5D
+0x684E = 0x5B5F
+0x6850 = 0x364D
+0x6851 = 0x372C
+0x6853 = 0x343C
+0x6854 = 0x354B
+0x6859 = 0x5B62
+0x685C = 0x3A79
+0x685D = 0x4B71
+0x685F = 0x3B37
+0x6863 = 0x5B63
+0x6867 = 0x4930
+0x6874 = 0x5B6F
+0x6876 = 0x3233
+0x6877 = 0x5B64
+0x687E = 0x5B75
+0x687F = 0x5B65
+0x6881 = 0x4E42
+0x6883 = 0x5B6C
+0x6885 = 0x475F
+0x688D = 0x5B74
+0x688F = 0x5B67
+0x6893 = 0x3034
+0x6894 = 0x5B69
+0x6897 = 0x393C
+0x689B = 0x5B6B
+0x689D = 0x5B6A
+0x689F = 0x5B66
+0x68A0 = 0x5B71
+0x68A2 = 0x3E3F
+0x68A6 = 0x546D
+0x68A7 = 0x3868
+0x68A8 = 0x4D7C
+0x68AD = 0x5B68
+0x68AF = 0x4474
+0x68B0 = 0x3323
+0x68B1 = 0x3A2D
+0x68B3 = 0x5B60
+0x68B5 = 0x5B70
+0x68B6 = 0x3361
+0x68B9 = 0x5B6E
+0x68BA = 0x5B72
+0x68BC = 0x456E
+0x68C4 = 0x347E
+0x68C6 = 0x5C32
+0x68C9 = 0x4C49
+0x68CA = 0x5B77
+0x68CB = 0x347D
+0x68CD = 0x5B7E
+0x68D2 = 0x4B40
+0x68D4 = 0x5C21
+0x68D5 = 0x5C23
+0x68D7 = 0x5C27
+0x68D8 = 0x5B79
+0x68DA = 0x432A
+0x68DF = 0x456F
+0x68E0 = 0x5C2B
+0x68E1 = 0x5B7C
+0x68E3 = 0x5C28
+0x68E7 = 0x5C22
+0x68EE = 0x3F39
+0x68EF = 0x5C2C
+0x68F2 = 0x4033
+0x68F9 = 0x5C2A
+0x68FA = 0x343D
+0x6900 = 0x4F50
+0x6901 = 0x5B76
+0x6904 = 0x5C26
+0x6905 = 0x3058
+0x6908 = 0x5B78
+0x690B = 0x4C3A
+0x690C = 0x5B7D
+0x690D = 0x3F22
+0x690E = 0x4447
+0x690F = 0x5B73
+0x6912 = 0x5C25
+0x6919 = 0x3F7A
+0x691A = 0x5C2F
+0x691B = 0x3371
+0x691C = 0x3821
+0x6921 = 0x5C31
+0x6922 = 0x5B7A
+0x6923 = 0x5C30
+0x6925 = 0x5C29
+0x6926 = 0x5B7B
+0x6928 = 0x5C2D
+0x692A = 0x5C2E
+0x6930 = 0x5C3F
+0x6934 = 0x464E
+0x6936 = 0x5C24
+0x6939 = 0x5C3B
+0x693D = 0x5C3D
+0x693F = 0x4458
+0x694A = 0x4D4C
+0x6953 = 0x4976
+0x6954 = 0x5C38
+0x6955 = 0x424A
+0x6959 = 0x5C3E
+0x695A = 0x413F
+0x695C = 0x5C35
+0x695D = 0x5C42
+0x695E = 0x5C41
+0x6960 = 0x466F
+0x6961 = 0x5C40
+0x6962 = 0x466A
+0x696A = 0x5C44
+0x696B = 0x5C37
+0x696D = 0x3648
+0x696E = 0x5C3A
+0x696F = 0x3D5D
+0x6973 = 0x4760
+0x6974 = 0x5C3C
+0x6975 = 0x364B
+0x6977 = 0x5C34
+0x6978 = 0x5C36
+0x6979 = 0x5C33
+0x697C = 0x4F30
+0x697D = 0x335A
+0x697E = 0x5C39
+0x6981 = 0x5C43
+0x6982 = 0x3335
+0x698A = 0x3A67
+0x698E = 0x315D
+0x6991 = 0x5C54
+0x6994 = 0x4F31
+0x6995 = 0x5C57
+0x699B = 0x3F3A
+0x699C = 0x5C56
+0x69A0 = 0x5C55
+0x69A7 = 0x5C52
+0x69AE = 0x5C46
+0x69B1 = 0x5C63
+0x69B2 = 0x5C45
+0x69B4 = 0x5C58
+0x69BB = 0x5C50
+0x69BE = 0x5C4B
+0x69BF = 0x5C48
+0x69C1 = 0x5C49
+0x69C3 = 0x5C51
+0x69C7 = 0x7422
+0x69CA = 0x5C4E
+0x69CB = 0x393D
+0x69CC = 0x4448
+0x69CD = 0x4164
+0x69CE = 0x5C4C
+0x69D0 = 0x5C47
+0x69D3 = 0x5C4A
+0x69D8 = 0x4D4D
+0x69D9 = 0x4B6A
+0x69DD = 0x5C4F
+0x69DE = 0x5C59
+0x69E7 = 0x5C61
+0x69E8 = 0x5C5A
+0x69EB = 0x5C67
+0x69ED = 0x5C65
+0x69F2 = 0x5C60
+0x69F9 = 0x5C5F
+0x69FB = 0x4450
+0x69FD = 0x4165
+0x69FF = 0x5C5D
+0x6A02 = 0x5C5B
+0x6A05 = 0x5C62
+0x6A0A = 0x5C68
+0x6A0B = 0x4875
+0x6A0C = 0x5C6E
+0x6A12 = 0x5C69
+0x6A13 = 0x5C6C
+0x6A14 = 0x5C66
+0x6A17 = 0x4374
+0x6A19 = 0x4938
+0x6A1B = 0x5C5C
+0x6A1E = 0x5C64
+0x6A1F = 0x3E40
+0x6A21 = 0x4C4F
+0x6A22 = 0x5C78
+0x6A23 = 0x5C6B
+0x6A29 = 0x3822
+0x6A2A = 0x3223
+0x6A2B = 0x335F
+0x6A2E = 0x5C53
+0x6A35 = 0x3E41
+0x6A36 = 0x5C70
+0x6A38 = 0x5C77
+0x6A39 = 0x3C79
+0x6A3A = 0x3372
+0x6A3D = 0x432E
+0x6A44 = 0x5C6D
+0x6A47 = 0x5C72
+0x6A48 = 0x5C76
+0x6A4B = 0x3636
+0x6A58 = 0x354C
+0x6A59 = 0x5C74
+0x6A5F = 0x3521
+0x6A61 = 0x464B
+0x6A62 = 0x5C73
+0x6A66 = 0x5C75
+0x6A72 = 0x5C6F
+0x6A78 = 0x5C71
+0x6A7F = 0x3360
+0x6A80 = 0x4349
+0x6A84 = 0x5C7C
+0x6A8D = 0x5C7A
+0x6A8E = 0x3869
+0x6A90 = 0x5C79
+0x6A97 = 0x5D21
+0x6A9C = 0x5B58
+0x6AA0 = 0x5C7B
+0x6AA2 = 0x5C7D
+0x6AA3 = 0x5C7E
+0x6AAA = 0x5D2C
+0x6AAC = 0x5D28
+0x6AAE = 0x5B6D
+0x6AB3 = 0x5D27
+0x6AB8 = 0x5D26
+0x6ABB = 0x5D23
+0x6AC1 = 0x5C6A
+0x6AC2 = 0x5D25
+0x6AC3 = 0x5D24
+0x6AD1 = 0x5D2A
+0x6AD3 = 0x4F26
+0x6ADA = 0x5D2D
+0x6ADB = 0x367B
+0x6ADE = 0x5D29
+0x6ADF = 0x5D2B
+0x6AE8 = 0x4827
+0x6AEA = 0x5D2E
+0x6AFA = 0x5D32
+0x6AFB = 0x5D2F
+0x6B04 = 0x4D73
+0x6B05 = 0x5D30
+0x6B0A = 0x5C5E
+0x6B12 = 0x5D33
+0x6B16 = 0x5D34
+0x6B1D = 0x3135
+0x6B1F = 0x5D36
+0x6B20 = 0x3767
+0x6B21 = 0x3C21
+0x6B23 = 0x3655
+0x6B27 = 0x3224
+0x6B32 = 0x4D5F
+0x6B37 = 0x5D38
+0x6B38 = 0x5D37
+0x6B39 = 0x5D3A
+0x6B3A = 0x353D
+0x6B3D = 0x3656
+0x6B3E = 0x343E
+0x6B43 = 0x5D3D
+0x6B47 = 0x5D3C
+0x6B49 = 0x5D3E
+0x6B4C = 0x324E
+0x6B4E = 0x4337
+0x6B50 = 0x5D3F
+0x6B53 = 0x343F
+0x6B54 = 0x5D41
+0x6B59 = 0x5D40
+0x6B5B = 0x5D42
+0x6B5F = 0x5D43
+0x6B61 = 0x5D44
+0x6B62 = 0x3B5F
+0x6B63 = 0x4035
+0x6B64 = 0x3A21
+0x6B66 = 0x4970
+0x6B69 = 0x4A62
+0x6B6A = 0x4F44
+0x6B6F = 0x3B75
+0x6B73 = 0x3A50
+0x6B74 = 0x4E72
+0x6B78 = 0x5D45
+0x6B79 = 0x5D46
+0x6B7B = 0x3B60
+0x6B7F = 0x5D47
+0x6B80 = 0x5D48
+0x6B83 = 0x5D4A
+0x6B84 = 0x5D49
+0x6B86 = 0x4B58
+0x6B89 = 0x3D5E
+0x6B8A = 0x3C6C
+0x6B8B = 0x3B44
+0x6B8D = 0x5D4B
+0x6B95 = 0x5D4D
+0x6B96 = 0x3F23
+0x6B98 = 0x5D4C
+0x6B9E = 0x5D4E
+0x6BA4 = 0x5D4F
+0x6BAA = 0x5D50
+0x6BAB = 0x5D51
+0x6BAF = 0x5D52
+0x6BB1 = 0x5D54
+0x6BB2 = 0x5D53
+0x6BB3 = 0x5D55
+0x6BB4 = 0x3225
+0x6BB5 = 0x434A
+0x6BB7 = 0x5D56
+0x6BBA = 0x3B26
+0x6BBB = 0x334C
+0x6BBC = 0x5D57
+0x6BBF = 0x4542
+0x6BC0 = 0x544C
+0x6BC5 = 0x3523
+0x6BC6 = 0x5D58
+0x6BCB = 0x5D59
+0x6BCD = 0x4A6C
+0x6BCE = 0x4B68
+0x6BD2 = 0x4647
+0x6BD3 = 0x5D5A
+0x6BD4 = 0x4866
+0x6BD8 = 0x487B
+0x6BDB = 0x4C53
+0x6BDF = 0x5D5B
+0x6BEB = 0x5D5D
+0x6BEC = 0x5D5C
+0x6BEF = 0x5D5F
+0x6BF3 = 0x5D5E
+0x6C08 = 0x5D61
+0x6C0F = 0x3B61
+0x6C11 = 0x4C31
+0x6C13 = 0x5D62
+0x6C14 = 0x5D63
+0x6C17 = 0x3524
+0x6C1B = 0x5D64
+0x6C23 = 0x5D66
+0x6C24 = 0x5D65
+0x6C34 = 0x3F65
+0x6C37 = 0x4939
+0x6C38 = 0x314A
+0x6C3E = 0x4845
+0x6C40 = 0x4475
+0x6C41 = 0x3D41
+0x6C42 = 0x3561
+0x6C4E = 0x4846
+0x6C50 = 0x3C2E
+0x6C55 = 0x5D68
+0x6C57 = 0x3440
+0x6C5A = 0x3178
+0x6C5D = 0x4672
+0x6C5E = 0x5D67
+0x6C5F = 0x393E
+0x6C60 = 0x4353
+0x6C62 = 0x5D69
+0x6C68 = 0x5D71
+0x6C6A = 0x5D6A
+0x6C70 = 0x4241
+0x6C72 = 0x3562
+0x6C73 = 0x5D72
+0x6C7A = 0x3768
+0x6C7D = 0x3525
+0x6C7E = 0x5D70
+0x6C81 = 0x5D6E
+0x6C82 = 0x5D6B
+0x6C83 = 0x4D60
+0x6C88 = 0x4440
+0x6C8C = 0x4659
+0x6C8D = 0x5D6C
+0x6C90 = 0x5D74
+0x6C92 = 0x5D73
+0x6C93 = 0x3723
+0x6C96 = 0x322D
+0x6C99 = 0x3A3B
+0x6C9A = 0x5D6D
+0x6C9B = 0x5D6F
+0x6CA1 = 0x4B57
+0x6CA2 = 0x4274
+0x6CAB = 0x4B77
+0x6CAE = 0x5D7C
+0x6CB1 = 0x5D7D
+0x6CB3 = 0x324F
+0x6CB8 = 0x4A28
+0x6CB9 = 0x4C7D
+0x6CBA = 0x5E21
+0x6CBB = 0x3C23
+0x6CBC = 0x3E42
+0x6CBD = 0x5D78
+0x6CBE = 0x5D7E
+0x6CBF = 0x3168
+0x6CC1 = 0x3637
+0x6CC4 = 0x5D75
+0x6CC5 = 0x5D7A
+0x6CC9 = 0x4074
+0x6CCA = 0x4771
+0x6CCC = 0x4867
+0x6CD3 = 0x5D77
+0x6CD5 = 0x4B21
+0x6CD7 = 0x5D79
+0x6CD9 = 0x5E24
+0x6CDB = 0x5E22
+0x6CDD = 0x5D7B
+0x6CE1 = 0x4B22
+0x6CE2 = 0x4748
+0x6CE3 = 0x3563
+0x6CE5 = 0x4525
+0x6CE8 = 0x436D
+0x6CEA = 0x5E25
+0x6CEF = 0x5E23
+0x6CF0 = 0x4259
+0x6CF1 = 0x5D76
+0x6CF3 = 0x314B
+0x6D0B = 0x4D4E
+0x6D0C = 0x5E30
+0x6D12 = 0x5E2F
+0x6D17 = 0x4076
+0x6D19 = 0x5E2C
+0x6D1B = 0x4D6C
+0x6D1E = 0x4636
+0x6D1F = 0x5E26
+0x6D25 = 0x4445
+0x6D29 = 0x314C
+0x6D2A = 0x393F
+0x6D2B = 0x5E29
+0x6D32 = 0x3D27
+0x6D33 = 0x5E2E
+0x6D35 = 0x5E2D
+0x6D36 = 0x5E28
+0x6D38 = 0x5E2B
+0x6D3B = 0x3368
+0x6D3D = 0x5E2A
+0x6D3E = 0x4749
+0x6D41 = 0x4E2E
+0x6D44 = 0x3E74
+0x6D45 = 0x4075
+0x6D59 = 0x5E36
+0x6D5A = 0x5E34
+0x6D5C = 0x494D
+0x6D63 = 0x5E31
+0x6D64 = 0x5E33
+0x6D66 = 0x313A
+0x6D69 = 0x3940
+0x6D6A = 0x4F32
+0x6D6C = 0x333D
+0x6D6E = 0x4962
+0x6D74 = 0x4D61
+0x6D77 = 0x3324
+0x6D78 = 0x3F3B
+0x6D79 = 0x5E35
+0x6D85 = 0x5E3A
+0x6D88 = 0x3E43
+0x6D8C = 0x4D30
+0x6D8E = 0x5E37
+0x6D93 = 0x5E32
+0x6D95 = 0x5E38
+0x6D99 = 0x4E5E
+0x6D9B = 0x4573
+0x6D9C = 0x4642
+0x6DAF = 0x3336
+0x6DB2 = 0x3155
+0x6DB5 = 0x5E3E
+0x6DB8 = 0x5E41
+0x6DBC = 0x4E43
+0x6DC0 = 0x4D64
+0x6DC5 = 0x5E48
+0x6DC6 = 0x5E42
+0x6DC7 = 0x5E3F
+0x6DCB = 0x4E54
+0x6DCC = 0x5E45
+0x6DD1 = 0x3D4A
+0x6DD2 = 0x5E47
+0x6DD5 = 0x5E4C
+0x6DD8 = 0x4571
+0x6DD9 = 0x5E4A
+0x6DDE = 0x5E44
+0x6DE1 = 0x4338
+0x6DE4 = 0x5E4B
+0x6DE6 = 0x5E40
+0x6DE8 = 0x5E46
+0x6DEA = 0x5E4D
+0x6DEB = 0x307C
+0x6DEC = 0x5E43
+0x6DEE = 0x5E4E
+0x6DF1 = 0x3F3C
+0x6DF3 = 0x3D5F
+0x6DF5 = 0x4A25
+0x6DF7 = 0x3A2E
+0x6DF9 = 0x5E3B
+0x6DFA = 0x5E49
+0x6DFB = 0x453A
+0x6E05 = 0x4036
+0x6E07 = 0x3369
+0x6E08 = 0x3A51
+0x6E09 = 0x3E44
+0x6E0A = 0x5E3D
+0x6E0B = 0x3D42
+0x6E13 = 0x374C
+0x6E15 = 0x5E3C
+0x6E19 = 0x5E52
+0x6E1A = 0x3D6D
+0x6E1B = 0x383A
+0x6E1D = 0x5E61
+0x6E1F = 0x5E5B
+0x6E20 = 0x3574
+0x6E21 = 0x454F
+0x6E23 = 0x5E56
+0x6E24 = 0x5E5F
+0x6E25 = 0x302F
+0x6E26 = 0x3132
+0x6E29 = 0x3239
+0x6E2B = 0x5E58
+0x6E2C = 0x422C
+0x6E2D = 0x5E4F
+0x6E2E = 0x5E51
+0x6E2F = 0x3941
+0x6E38 = 0x5E62
+0x6E3A = 0x5E5D
+0x6E3E = 0x5E55
+0x6E43 = 0x5E5C
+0x6E4A = 0x4C2B
+0x6E4D = 0x5E5A
+0x6E4E = 0x5E5E
+0x6E56 = 0x3850
+0x6E58 = 0x3E45
+0x6E5B = 0x4339
+0x6E5F = 0x5E54
+0x6E67 = 0x4D2F
+0x6E6B = 0x5E57
+0x6E6E = 0x5E50
+0x6E6F = 0x4572
+0x6E72 = 0x5E53
+0x6E76 = 0x5E59
+0x6E7E = 0x4F51
+0x6E7F = 0x3C3E
+0x6E80 = 0x4B7E
+0x6E82 = 0x5E63
+0x6E8C = 0x482E
+0x6E8F = 0x5E6F
+0x6E90 = 0x383B
+0x6E96 = 0x3D60
+0x6E98 = 0x5E65
+0x6E9C = 0x4E2F
+0x6E9D = 0x3942
+0x6E9F = 0x5E72
+0x6EA2 = 0x306E
+0x6EA5 = 0x5E70
+0x6EAA = 0x5E64
+0x6EAF = 0x5E6A
+0x6EB2 = 0x5E6C
+0x6EB6 = 0x4D4F
+0x6EB7 = 0x5E67
+0x6EBA = 0x452E
+0x6EBD = 0x5E69
+0x6EC2 = 0x5E71
+0x6EC4 = 0x5E6B
+0x6EC5 = 0x4C47
+0x6EC9 = 0x5E66
+0x6ECB = 0x3C22
+0x6ECC = 0x5E7E
+0x6ED1 = 0x336A
+0x6ED3 = 0x5E68
+0x6ED4 = 0x5E6D
+0x6ED5 = 0x5E6E
+0x6EDD = 0x426C
+0x6EDE = 0x425A
+0x6EEC = 0x5E76
+0x6EEF = 0x5E7C
+0x6EF2 = 0x5E7A
+0x6EF4 = 0x4529
+0x6EF7 = 0x5F23
+0x6EF8 = 0x5E77
+0x6EFE = 0x5E78
+0x6EFF = 0x5E60
+0x6F01 = 0x3579
+0x6F02 = 0x493A
+0x6F06 = 0x3C3F
+0x6F09 = 0x3977
+0x6F0F = 0x4F33
+0x6F11 = 0x5E74
+0x6F13 = 0x5F22
+0x6F14 = 0x3169
+0x6F15 = 0x4166
+0x6F20 = 0x4779
+0x6F22 = 0x3441
+0x6F23 = 0x4E7A
+0x6F2B = 0x4C21
+0x6F2C = 0x4452
+0x6F31 = 0x5E7B
+0x6F32 = 0x5E7D
+0x6F38 = 0x4132
+0x6F3E = 0x5F21
+0x6F3F = 0x5E79
+0x6F41 = 0x5E73
+0x6F45 = 0x3443
+0x6F54 = 0x3769
+0x6F58 = 0x5F2F
+0x6F5B = 0x5F2A
+0x6F5C = 0x4078
+0x6F5F = 0x3363
+0x6F64 = 0x3D61
+0x6F66 = 0x5F33
+0x6F6D = 0x5F2C
+0x6F6E = 0x442C
+0x6F6F = 0x5F29
+0x6F70 = 0x4459
+0x6F74 = 0x5F4C
+0x6F78 = 0x5F26
+0x6F7A = 0x5F25
+0x6F7C = 0x5F2E
+0x6F80 = 0x5F28
+0x6F81 = 0x5F27
+0x6F82 = 0x5F2D
+0x6F84 = 0x4021
+0x6F86 = 0x5F24
+0x6F8E = 0x5F30
+0x6F91 = 0x5F31
+0x6F97 = 0x3442
+0x6FA1 = 0x5F36
+0x6FA3 = 0x5F35
+0x6FA4 = 0x5F37
+0x6FAA = 0x5F3A
+0x6FB1 = 0x4543
+0x6FB3 = 0x5F34
+0x6FB9 = 0x5F38
+0x6FC0 = 0x3763
+0x6FC1 = 0x4279
+0x6FC2 = 0x5F32
+0x6FC3 = 0x473B
+0x6FC6 = 0x5F39
+0x6FD4 = 0x5F3E
+0x6FD5 = 0x5F3C
+0x6FD8 = 0x5F3F
+0x6FDB = 0x5F42
+0x6FDF = 0x5F3B
+0x6FE0 = 0x396A
+0x6FE1 = 0x4728
+0x6FE4 = 0x5E39
+0x6FEB = 0x4D74
+0x6FEC = 0x5F3D
+0x6FEE = 0x5F41
+0x6FEF = 0x4275
+0x6FF1 = 0x5F40
+0x6FF3 = 0x5F2B
+0x6FF6 = 0x6F69
+0x6FFA = 0x5F45
+0x6FFE = 0x5F49
+0x7001 = 0x5F47
+0x7009 = 0x5F43
+0x700B = 0x5F44
+0x700F = 0x5F48
+0x7011 = 0x5F46
+0x7015 = 0x494E
+0x7018 = 0x5F4E
+0x701A = 0x5F4B
+0x701B = 0x5F4A
+0x701D = 0x5F4D
+0x701E = 0x4654
+0x701F = 0x5F4F
+0x7026 = 0x4375
+0x7027 = 0x426D
+0x702C = 0x4025
+0x7030 = 0x5F50
+0x7032 = 0x5F52
+0x703E = 0x5F51
+0x704C = 0x5E75
+0x7051 = 0x5F53
+0x7058 = 0x4667
+0x7063 = 0x5F54
+0x706B = 0x3250
+0x706F = 0x4574
+0x7070 = 0x3325
+0x7078 = 0x3564
+0x707C = 0x3C5E
+0x707D = 0x3A52
+0x7089 = 0x4F27
+0x708A = 0x3F66
+0x708E = 0x316A
+0x7092 = 0x5F56
+0x7099 = 0x5F55
+0x70AC = 0x5F59
+0x70AD = 0x433A
+0x70AE = 0x5F5C
+0x70AF = 0x5F57
+0x70B3 = 0x5F5B
+0x70B8 = 0x5F5A
+0x70B9 = 0x4540
+0x70BA = 0x3059
+0x70C8 = 0x4E75
+0x70CB = 0x5F5E
+0x70CF = 0x3128
+0x70D9 = 0x5F60
+0x70DD = 0x5F5F
+0x70DF = 0x5F5D
+0x70F1 = 0x5F58
+0x70F9 = 0x4B23
+0x70FD = 0x5F62
+0x7109 = 0x5F61
+0x7114 = 0x316B
+0x7119 = 0x5F64
+0x711A = 0x4A32
+0x711C = 0x5F63
+0x7121 = 0x4C35
+0x7126 = 0x3E47
+0x7136 = 0x4133
+0x713C = 0x3E46
+0x7149 = 0x4E7B
+0x714C = 0x5F6A
+0x714E = 0x4079
+0x7155 = 0x5F66
+0x7156 = 0x5F6B
+0x7159 = 0x316C
+0x7162 = 0x5F69
+0x7164 = 0x4761
+0x7165 = 0x5F65
+0x7166 = 0x5F68
+0x7167 = 0x3E48
+0x7169 = 0x4851
+0x716C = 0x5F6C
+0x716E = 0x3C51
+0x717D = 0x407A
+0x7184 = 0x5F6F
+0x7188 = 0x5F67
+0x718A = 0x3727
+0x718F = 0x5F6D
+0x7194 = 0x4D50
+0x7195 = 0x5F70
+0x7199 = 0x7426
+0x719F = 0x3D4F
+0x71A8 = 0x5F71
+0x71AC = 0x5F72
+0x71B1 = 0x472E
+0x71B9 = 0x5F74
+0x71BE = 0x5F75
+0x71C3 = 0x4733
+0x71C8 = 0x4575
+0x71C9 = 0x5F77
+0x71CE = 0x5F79
+0x71D0 = 0x4E55
+0x71D2 = 0x5F76
+0x71D4 = 0x5F78
+0x71D5 = 0x316D
+0x71D7 = 0x5F73
+0x71DF = 0x535B
+0x71E0 = 0x5F7A
+0x71E5 = 0x4167
+0x71E6 = 0x3B38
+0x71E7 = 0x5F7C
+0x71EC = 0x5F7B
+0x71ED = 0x3F24
+0x71EE = 0x5259
+0x71F5 = 0x5F7D
+0x71F9 = 0x6021
+0x71FB = 0x5F6E
+0x71FC = 0x5F7E
+0x71FF = 0x6022
+0x7206 = 0x477A
+0x720D = 0x6023
+0x7210 = 0x6024
+0x721B = 0x6025
+0x7228 = 0x6026
+0x722A = 0x445E
+0x722C = 0x6028
+0x722D = 0x6027
+0x7230 = 0x6029
+0x7232 = 0x602A
+0x7235 = 0x3C5F
+0x7236 = 0x4963
+0x723A = 0x4C6C
+0x723B = 0x602B
+0x723C = 0x602C
+0x723D = 0x4156
+0x723E = 0x3C24
+0x723F = 0x602D
+0x7240 = 0x602E
+0x7246 = 0x602F
+0x7247 = 0x4A52
+0x7248 = 0x4847
+0x724B = 0x6030
+0x724C = 0x4757
+0x7252 = 0x442D
+0x7258 = 0x6031
+0x7259 = 0x3267
+0x725B = 0x356D
+0x725D = 0x4C46
+0x725F = 0x4C36
+0x7261 = 0x3234
+0x7262 = 0x4F34
+0x7267 = 0x4B52
+0x7269 = 0x4A2A
+0x7272 = 0x4037
+0x7274 = 0x6032
+0x7279 = 0x4643
+0x727D = 0x3823
+0x727E = 0x6033
+0x7280 = 0x3A54
+0x7281 = 0x6035
+0x7282 = 0x6034
+0x7287 = 0x6036
+0x7292 = 0x6037
+0x7296 = 0x6038
+0x72A0 = 0x353E
+0x72A2 = 0x6039
+0x72A7 = 0x603A
+0x72AC = 0x3824
+0x72AF = 0x4848
+0x72B2 = 0x603C
+0x72B6 = 0x3E75
+0x72B9 = 0x603B
+0x72C2 = 0x3638
+0x72C3 = 0x603D
+0x72C4 = 0x603F
+0x72C6 = 0x603E
+0x72CE = 0x6040
+0x72D0 = 0x3851
+0x72D2 = 0x6041
+0x72D7 = 0x3669
+0x72D9 = 0x4140
+0x72DB = 0x397D
+0x72E0 = 0x6043
+0x72E1 = 0x6044
+0x72E2 = 0x6042
+0x72E9 = 0x3C6D
+0x72EC = 0x4648
+0x72ED = 0x3639
+0x72F7 = 0x6046
+0x72F8 = 0x432C
+0x72F9 = 0x6045
+0x72FC = 0x4F35
+0x72FD = 0x4762
+0x730A = 0x6049
+0x7316 = 0x604B
+0x7317 = 0x6048
+0x731B = 0x4C54
+0x731C = 0x604A
+0x731D = 0x604C
+0x731F = 0x4E44
+0x7325 = 0x6050
+0x7329 = 0x604F
+0x732A = 0x4376
+0x732B = 0x472D
+0x732E = 0x3825
+0x732F = 0x604E
+0x7334 = 0x604D
+0x7336 = 0x4D31
+0x7337 = 0x4D32
+0x733E = 0x6051
+0x733F = 0x316E
+0x7344 = 0x3976
+0x7345 = 0x3B62
+0x734E = 0x6052
+0x734F = 0x6053
+0x7357 = 0x6055
+0x7363 = 0x3D43
+0x7368 = 0x6057
+0x736A = 0x6056
+0x7370 = 0x6058
+0x7372 = 0x334D
+0x7375 = 0x605A
+0x7378 = 0x6059
+0x737A = 0x605C
+0x737B = 0x605B
+0x7384 = 0x383C
+0x7387 = 0x4E28
+0x7389 = 0x364C
+0x738B = 0x3226
+0x7396 = 0x366A
+0x73A9 = 0x3461
+0x73B2 = 0x4E68
+0x73B3 = 0x605E
+0x73BB = 0x6060
+0x73C0 = 0x6061
+0x73C2 = 0x3251
+0x73C8 = 0x605D
+0x73CA = 0x3B39
+0x73CD = 0x4441
+0x73CE = 0x605F
+0x73DE = 0x6064
+0x73E0 = 0x3C6E
+0x73E5 = 0x6062
+0x73EA = 0x373E
+0x73ED = 0x4849
+0x73EE = 0x6063
+0x73F1 = 0x607E
+0x73F8 = 0x6069
+0x73FE = 0x383D
+0x7403 = 0x3565
+0x7405 = 0x6066
+0x7406 = 0x4D7D
+0x7409 = 0x4E30
+0x7422 = 0x4276
+0x7425 = 0x6068
+0x7432 = 0x606A
+0x7433 = 0x4E56
+0x7434 = 0x3657
+0x7435 = 0x487C
+0x7436 = 0x474A
+0x743A = 0x606B
+0x743F = 0x606D
+0x7441 = 0x6070
+0x7455 = 0x606C
+0x7459 = 0x606F
+0x745A = 0x386A
+0x745B = 0x314D
+0x745C = 0x6071
+0x745E = 0x3F70
+0x745F = 0x606E
+0x7460 = 0x4E5C
+0x7463 = 0x6074
+0x7464 = 0x7424
+0x7469 = 0x6072
+0x746A = 0x6075
+0x746F = 0x6067
+0x7470 = 0x6073
+0x7473 = 0x3A3C
+0x7476 = 0x6076
+0x747E = 0x6077
+0x7483 = 0x4D7E
+0x748B = 0x6078
+0x749E = 0x6079
+0x74A2 = 0x6065
+0x74A7 = 0x607A
+0x74B0 = 0x3444
+0x74BD = 0x3C25
+0x74CA = 0x607B
+0x74CF = 0x607C
+0x74D4 = 0x607D
+0x74DC = 0x313B
+0x74E0 = 0x6121
+0x74E2 = 0x493B
+0x74E3 = 0x6122
+0x74E6 = 0x3424
+0x74E7 = 0x6123
+0x74E9 = 0x6124
+0x74EE = 0x6125
+0x74F0 = 0x6127
+0x74F1 = 0x6128
+0x74F2 = 0x6126
+0x74F6 = 0x4953
+0x74F7 = 0x612A
+0x74F8 = 0x6129
+0x7503 = 0x612C
+0x7504 = 0x612B
+0x7505 = 0x612D
+0x750C = 0x612E
+0x750D = 0x6130
+0x750E = 0x612F
+0x7511 = 0x3979
+0x7513 = 0x6132
+0x7515 = 0x6131
+0x7518 = 0x3445
+0x751A = 0x3F53
+0x751C = 0x453C
+0x751E = 0x6133
+0x751F = 0x4038
+0x7523 = 0x3B3A
+0x7525 = 0x3179
+0x7526 = 0x6134
+0x7528 = 0x4D51
+0x752B = 0x4A63
+0x752C = 0x6135
+0x7530 = 0x4544
+0x7531 = 0x4D33
+0x7532 = 0x3943
+0x7533 = 0x3F3D
+0x7537 = 0x434B
+0x7538 = 0x5234
+0x753A = 0x442E
+0x753B = 0x3268
+0x753C = 0x6136
+0x7544 = 0x6137
+0x7546 = 0x613C
+0x7549 = 0x613A
+0x754A = 0x6139
+0x754B = 0x5A42
+0x754C = 0x3326
+0x754D = 0x6138
+0x754F = 0x305A
+0x7551 = 0x482A
+0x7554 = 0x484A
+0x7559 = 0x4E31
+0x755A = 0x613D
+0x755B = 0x613B
+0x755C = 0x435C
+0x755D = 0x4026
+0x7560 = 0x482B
+0x7562 = 0x492D
+0x7564 = 0x613F
+0x7565 = 0x4E2C
+0x7566 = 0x374D
+0x7567 = 0x6140
+0x7569 = 0x613E
+0x756A = 0x4856
+0x756B = 0x6141
+0x756D = 0x6142
+0x7570 = 0x305B
+0x7573 = 0x3E76
+0x7574 = 0x6147
+0x7576 = 0x6144
+0x7577 = 0x466D
+0x7578 = 0x6143
+0x757F = 0x3526
+0x7582 = 0x614A
+0x7586 = 0x6145
+0x7587 = 0x6146
+0x7589 = 0x6149
+0x758A = 0x6148
+0x758B = 0x4925
+0x758E = 0x4142
+0x758F = 0x4141
+0x7591 = 0x353F
+0x7594 = 0x614B
+0x759A = 0x614C
+0x759D = 0x614D
+0x75A3 = 0x614F
+0x75A5 = 0x614E
+0x75AB = 0x3156
+0x75B1 = 0x6157
+0x75B2 = 0x4868
+0x75B3 = 0x6151
+0x75B5 = 0x6153
+0x75B8 = 0x6155
+0x75B9 = 0x3F3E
+0x75BC = 0x6156
+0x75BD = 0x6154
+0x75BE = 0x3C40
+0x75C2 = 0x6150
+0x75C3 = 0x6152
+0x75C5 = 0x4942
+0x75C7 = 0x3E49
+0x75CA = 0x6159
+0x75CD = 0x6158
+0x75D2 = 0x615A
+0x75D4 = 0x3C26
+0x75D5 = 0x3A2F
+0x75D8 = 0x4577
+0x75D9 = 0x615B
+0x75DB = 0x444B
+0x75DE = 0x615D
+0x75E2 = 0x4E21
+0x75E3 = 0x615C
+0x75E9 = 0x4169
+0x75F0 = 0x6162
+0x75F2 = 0x6164
+0x75F3 = 0x6165
+0x75F4 = 0x4354
+0x75FA = 0x6163
+0x75FC = 0x6160
+0x75FE = 0x615E
+0x75FF = 0x615F
+0x7601 = 0x6161
+0x7609 = 0x6168
+0x760B = 0x6166
+0x760D = 0x6167
+0x761F = 0x6169
+0x7620 = 0x616B
+0x7621 = 0x616C
+0x7622 = 0x616D
+0x7624 = 0x616E
+0x7627 = 0x616A
+0x7630 = 0x6170
+0x7634 = 0x616F
+0x763B = 0x6171
+0x7642 = 0x4E45
+0x7646 = 0x6174
+0x7647 = 0x6172
+0x7648 = 0x6173
+0x764C = 0x3462
+0x7652 = 0x4C7E
+0x7656 = 0x4A4A
+0x7658 = 0x6176
+0x765C = 0x6175
+0x7661 = 0x6177
+0x7662 = 0x6178
+0x7667 = 0x617C
+0x7668 = 0x6179
+0x7669 = 0x617A
+0x766A = 0x617B
+0x766C = 0x617D
+0x7670 = 0x617E
+0x7672 = 0x6221
+0x7676 = 0x6222
+0x7678 = 0x6223
+0x767A = 0x482F
+0x767B = 0x4550
+0x767C = 0x6224
+0x767D = 0x4772
+0x767E = 0x4934
+0x7680 = 0x6225
+0x7683 = 0x6226
+0x7684 = 0x452A
+0x7686 = 0x3327
+0x7687 = 0x3944
+0x7688 = 0x6227
+0x768B = 0x6228
+0x768E = 0x6229
+0x7690 = 0x3B29
+0x7693 = 0x622B
+0x7696 = 0x622A
+0x7699 = 0x622C
+0x769A = 0x622D
+0x76AE = 0x4869
+0x76B0 = 0x622E
+0x76B4 = 0x622F
+0x76B7 = 0x7369
+0x76B8 = 0x6230
+0x76B9 = 0x6231
+0x76BA = 0x6232
+0x76BF = 0x3B2E
+0x76C2 = 0x6233
+0x76C3 = 0x4756
+0x76C6 = 0x4B5F
+0x76C8 = 0x314E
+0x76CA = 0x3157
+0x76CD = 0x6234
+0x76D2 = 0x6236
+0x76D6 = 0x6235
+0x76D7 = 0x4570
+0x76DB = 0x4039
+0x76DC = 0x5D39
+0x76DE = 0x6237
+0x76DF = 0x4C41
+0x76E1 = 0x6238
+0x76E3 = 0x3446
+0x76E4 = 0x4857
+0x76E5 = 0x6239
+0x76E7 = 0x623A
+0x76EA = 0x623B
+0x76EE = 0x4C5C
+0x76F2 = 0x4C55
+0x76F4 = 0x443E
+0x76F8 = 0x416A
+0x76FB = 0x623D
+0x76FE = 0x3D62
+0x7701 = 0x3E4A
+0x7704 = 0x6240
+0x7707 = 0x623F
+0x7708 = 0x623E
+0x7709 = 0x487D
+0x770B = 0x3447
+0x770C = 0x3829
+0x771B = 0x6246
+0x771E = 0x6243
+0x771F = 0x3F3F
+0x7720 = 0x4C32
+0x7724 = 0x6242
+0x7725 = 0x6244
+0x7726 = 0x6245
+0x7729 = 0x6241
+0x7737 = 0x6247
+0x7738 = 0x6248
+0x773A = 0x442F
+0x773C = 0x3463
+0x7740 = 0x4365
+0x7747 = 0x6249
+0x775A = 0x624A
+0x775B = 0x624D
+0x7761 = 0x3F67
+0x7763 = 0x4644
+0x7765 = 0x624E
+0x7766 = 0x4B53
+0x7768 = 0x624B
+0x776B = 0x624C
+0x7779 = 0x6251
+0x777E = 0x6250
+0x777F = 0x624F
+0x778B = 0x6253
+0x778E = 0x6252
+0x7791 = 0x6254
+0x779E = 0x6256
+0x77A0 = 0x6255
+0x77A5 = 0x4A4D
+0x77AC = 0x3D56
+0x77AD = 0x4E46
+0x77B0 = 0x6257
+0x77B3 = 0x4637
+0x77B6 = 0x6258
+0x77B9 = 0x6259
+0x77BB = 0x625D
+0x77BC = 0x625B
+0x77BD = 0x625C
+0x77BF = 0x625A
+0x77C7 = 0x625E
+0x77CD = 0x625F
+0x77D7 = 0x6260
+0x77DA = 0x6261
+0x77DB = 0x4C37
+0x77DC = 0x6262
+0x77E2 = 0x4C70
+0x77E3 = 0x6263
+0x77E5 = 0x434E
+0x77E7 = 0x476A
+0x77E9 = 0x366B
+0x77ED = 0x433B
+0x77EE = 0x6264
+0x77EF = 0x363A
+0x77F3 = 0x4050
+0x77FC = 0x6265
+0x7802 = 0x3A3D
+0x780C = 0x6266
+0x7812 = 0x6267
+0x7814 = 0x3826
+0x7815 = 0x3A55
+0x7820 = 0x6269
+0x7825 = 0x4556
+0x7826 = 0x3A56
+0x7827 = 0x354E
+0x7832 = 0x4B24
+0x7834 = 0x474B
+0x783A = 0x4557
+0x783F = 0x395C
+0x7845 = 0x626B
+0x785D = 0x3E4B
+0x786B = 0x4E32
+0x786C = 0x3945
+0x786F = 0x3827
+0x7872 = 0x4823
+0x7874 = 0x626D
+0x787C = 0x626F
+0x7881 = 0x386B
+0x7886 = 0x626E
+0x7887 = 0x4476
+0x788C = 0x6271
+0x788D = 0x3337
+0x788E = 0x626C
+0x7891 = 0x486A
+0x7893 = 0x3130
+0x7895 = 0x3A6C
+0x7897 = 0x4F52
+0x789A = 0x6270
+0x78A3 = 0x6272
+0x78A7 = 0x4A4B
+0x78A9 = 0x4059
+0x78AA = 0x6274
+0x78AF = 0x6275
+0x78B5 = 0x6273
+0x78BA = 0x334E
+0x78BC = 0x627B
+0x78BE = 0x627A
+0x78C1 = 0x3C27
+0x78C5 = 0x627C
+0x78C6 = 0x6277
+0x78CA = 0x627D
+0x78CB = 0x6278
+0x78D0 = 0x4858
+0x78D1 = 0x6276
+0x78D4 = 0x6279
+0x78DA = 0x6322
+0x78E7 = 0x6321
+0x78E8 = 0x4B61
+0x78EC = 0x627E
+0x78EF = 0x306B
+0x78F4 = 0x6324
+0x78FD = 0x6323
+0x7901 = 0x3E4C
+0x7907 = 0x6325
+0x790E = 0x4143
+0x7911 = 0x6327
+0x7912 = 0x6326
+0x7919 = 0x6328
+0x7926 = 0x6268
+0x792A = 0x626A
+0x792B = 0x632A
+0x792C = 0x6329
+0x793A = 0x3C28
+0x793C = 0x4E69
+0x793E = 0x3C52
+0x7940 = 0x632B
+0x7941 = 0x3737
+0x7947 = 0x3540
+0x7948 = 0x3527
+0x7949 = 0x3B63
+0x7950 = 0x4D34
+0x7953 = 0x6331
+0x7955 = 0x6330
+0x7956 = 0x4144
+0x7957 = 0x632D
+0x795A = 0x632F
+0x795D = 0x3D4B
+0x795E = 0x3F40
+0x795F = 0x632E
+0x7960 = 0x632C
+0x7962 = 0x472A
+0x7965 = 0x3E4D
+0x7968 = 0x493C
+0x796D = 0x3A57
+0x7977 = 0x4578
+0x797A = 0x6332
+0x797F = 0x6333
+0x7980 = 0x6349
+0x7981 = 0x3658
+0x7984 = 0x4F3D
+0x7985 = 0x4135
+0x798A = 0x6334
+0x798D = 0x3252
+0x798E = 0x4477
+0x798F = 0x4A21
+0x799D = 0x6335
+0x79A6 = 0x357A
+0x79A7 = 0x6336
+0x79AA = 0x6338
+0x79AE = 0x6339
+0x79B0 = 0x4729
+0x79B3 = 0x633A
+0x79B9 = 0x633B
+0x79BA = 0x633C
+0x79BD = 0x3659
+0x79BE = 0x3253
+0x79BF = 0x4645
+0x79C0 = 0x3D28
+0x79C1 = 0x3B64
+0x79C9 = 0x633D
+0x79CB = 0x3D29
+0x79D1 = 0x324A
+0x79D2 = 0x4943
+0x79D5 = 0x633E
+0x79D8 = 0x486B
+0x79DF = 0x4145
+0x79E1 = 0x6341
+0x79E3 = 0x6342
+0x79E4 = 0x4769
+0x79E6 = 0x3F41
+0x79E7 = 0x633F
+0x79E9 = 0x4361
+0x79EC = 0x6340
+0x79F0 = 0x3E4E
+0x79FB = 0x305C
+0x7A00 = 0x3529
+0x7A08 = 0x6343
+0x7A0B = 0x4478
+0x7A0D = 0x6344
+0x7A0E = 0x4047
+0x7A14 = 0x4C2D
+0x7A17 = 0x4923
+0x7A18 = 0x6345
+0x7A19 = 0x6346
+0x7A1A = 0x4355
+0x7A1C = 0x4E47
+0x7A1F = 0x6348
+0x7A20 = 0x6347
+0x7A2E = 0x3C6F
+0x7A31 = 0x634A
+0x7A32 = 0x3070
+0x7A37 = 0x634D
+0x7A3B = 0x634B
+0x7A3C = 0x3254
+0x7A3D = 0x374E
+0x7A3E = 0x634C
+0x7A3F = 0x3946
+0x7A40 = 0x3972
+0x7A42 = 0x4A66
+0x7A43 = 0x634E
+0x7A46 = 0x4B54
+0x7A49 = 0x6350
+0x7A4D = 0x4051
+0x7A4E = 0x314F
+0x7A4F = 0x323A
+0x7A50 = 0x302C
+0x7A57 = 0x634F
+0x7A61 = 0x6351
+0x7A62 = 0x6352
+0x7A63 = 0x3E77
+0x7A69 = 0x6353
+0x7A6B = 0x334F
+0x7A70 = 0x6355
+0x7A74 = 0x376A
+0x7A76 = 0x3566
+0x7A79 = 0x6356
+0x7A7A = 0x3675
+0x7A7D = 0x6357
+0x7A7F = 0x407C
+0x7A81 = 0x464D
+0x7A83 = 0x4060
+0x7A84 = 0x3A75
+0x7A88 = 0x6358
+0x7A92 = 0x4362
+0x7A93 = 0x416B
+0x7A95 = 0x635A
+0x7A96 = 0x635C
+0x7A97 = 0x6359
+0x7A98 = 0x635B
+0x7A9F = 0x3722
+0x7AA9 = 0x635D
+0x7AAA = 0x3726
+0x7AAE = 0x3567
+0x7AAF = 0x4D52
+0x7AB0 = 0x635F
+0x7AB6 = 0x6360
+0x7ABA = 0x312E
+0x7ABF = 0x6363
+0x7AC3 = 0x3376
+0x7AC4 = 0x6362
+0x7AC5 = 0x6361
+0x7AC7 = 0x6365
+0x7AC8 = 0x635E
+0x7ACA = 0x6366
+0x7ACB = 0x4E29
+0x7ACD = 0x6367
+0x7ACF = 0x6368
+0x7AD2 = 0x5474
+0x7AD3 = 0x636A
+0x7AD5 = 0x6369
+0x7AD9 = 0x636B
+0x7ADA = 0x636C
+0x7ADC = 0x4E35
+0x7ADD = 0x636D
+0x7ADF = 0x706F
+0x7AE0 = 0x3E4F
+0x7AE1 = 0x636E
+0x7AE2 = 0x636F
+0x7AE3 = 0x3D57
+0x7AE5 = 0x4638
+0x7AE6 = 0x6370
+0x7AEA = 0x4328
+0x7AED = 0x6371
+0x7AEF = 0x433C
+0x7AF0 = 0x6372
+0x7AF6 = 0x3625
+0x7AF8 = 0x513F
+0x7AF9 = 0x435D
+0x7AFA = 0x3C33
+0x7AFF = 0x3448
+0x7B02 = 0x6373
+0x7B04 = 0x6422
+0x7B06 = 0x6376
+0x7B08 = 0x3568
+0x7B0A = 0x6375
+0x7B0B = 0x6424
+0x7B0F = 0x6374
+0x7B11 = 0x3E50
+0x7B18 = 0x6378
+0x7B19 = 0x6379
+0x7B1B = 0x452B
+0x7B1E = 0x637A
+0x7B20 = 0x335E
+0x7B25 = 0x3F5A
+0x7B26 = 0x4964
+0x7B28 = 0x637C
+0x7B2C = 0x4268
+0x7B33 = 0x6377
+0x7B35 = 0x637B
+0x7B36 = 0x637D
+0x7B39 = 0x3A7B
+0x7B45 = 0x6426
+0x7B46 = 0x492E
+0x7B48 = 0x4826
+0x7B49 = 0x4579
+0x7B4B = 0x365A
+0x7B4C = 0x6425
+0x7B4D = 0x6423
+0x7B4F = 0x4835
+0x7B50 = 0x637E
+0x7B51 = 0x435E
+0x7B52 = 0x457B
+0x7B54 = 0x457A
+0x7B56 = 0x3A76
+0x7B5D = 0x6438
+0x7B65 = 0x6428
+0x7B67 = 0x642A
+0x7B6C = 0x642D
+0x7B6E = 0x642E
+0x7B70 = 0x642B
+0x7B71 = 0x642C
+0x7B74 = 0x6429
+0x7B75 = 0x6427
+0x7B7A = 0x6421
+0x7B86 = 0x4A4F
+0x7B87 = 0x3255
+0x7B8B = 0x6435
+0x7B8D = 0x6432
+0x7B8F = 0x6437
+0x7B92 = 0x6436
+0x7B94 = 0x4773
+0x7B95 = 0x4C27
+0x7B97 = 0x3B3B
+0x7B98 = 0x6430
+0x7B99 = 0x6439
+0x7B9A = 0x6434
+0x7B9C = 0x6433
+0x7B9D = 0x642F
+0x7B9F = 0x6431
+0x7BA1 = 0x3449
+0x7BAA = 0x433D
+0x7BAD = 0x407D
+0x7BB1 = 0x4822
+0x7BB4 = 0x643E
+0x7BB8 = 0x4824
+0x7BC0 = 0x4061
+0x7BC1 = 0x643B
+0x7BC4 = 0x484F
+0x7BC6 = 0x643F
+0x7BC7 = 0x4A53
+0x7BC9 = 0x435B
+0x7BCB = 0x643A
+0x7BCC = 0x643C
+0x7BCF = 0x643D
+0x7BDD = 0x6440
+0x7BE0 = 0x3C44
+0x7BE4 = 0x4646
+0x7BE5 = 0x6445
+0x7BE6 = 0x6444
+0x7BE9 = 0x6441
+0x7BED = 0x4F36
+0x7BF3 = 0x644A
+0x7BF6 = 0x644E
+0x7BF7 = 0x644B
+0x7C00 = 0x6447
+0x7C07 = 0x6448
+0x7C0D = 0x644D
+0x7C11 = 0x6442
+0x7C12 = 0x5255
+0x7C13 = 0x6449
+0x7C14 = 0x6443
+0x7C17 = 0x644C
+0x7C1F = 0x6452
+0x7C21 = 0x344A
+0x7C23 = 0x644F
+0x7C27 = 0x6450
+0x7C2A = 0x6451
+0x7C2B = 0x6454
+0x7C37 = 0x6453
+0x7C38 = 0x4876
+0x7C3D = 0x6455
+0x7C3E = 0x4E7C
+0x7C3F = 0x4A6D
+0x7C40 = 0x645A
+0x7C43 = 0x6457
+0x7C4C = 0x6456
+0x7C4D = 0x4052
+0x7C4F = 0x6459
+0x7C50 = 0x645B
+0x7C54 = 0x6458
+0x7C56 = 0x645F
+0x7C58 = 0x645C
+0x7C5F = 0x645D
+0x7C60 = 0x6446
+0x7C64 = 0x645E
+0x7C65 = 0x6460
+0x7C6C = 0x6461
+0x7C73 = 0x4A46
+0x7C75 = 0x6462
+0x7C7E = 0x4C62
+0x7C81 = 0x364E
+0x7C82 = 0x3729
+0x7C83 = 0x6463
+0x7C89 = 0x4A34
+0x7C8B = 0x3F68
+0x7C8D = 0x4C30
+0x7C90 = 0x6464
+0x7C92 = 0x4E33
+0x7C95 = 0x4774
+0x7C97 = 0x4146
+0x7C98 = 0x4734
+0x7C9B = 0x3D4D
+0x7C9F = 0x3040
+0x7CA1 = 0x6469
+0x7CA2 = 0x6467
+0x7CA4 = 0x6465
+0x7CA5 = 0x3421
+0x7CA7 = 0x3E51
+0x7CA8 = 0x646A
+0x7CAB = 0x6468
+0x7CAD = 0x6466
+0x7CAE = 0x646E
+0x7CB1 = 0x646D
+0x7CB2 = 0x646C
+0x7CB3 = 0x646B
+0x7CB9 = 0x646F
+0x7CBD = 0x6470
+0x7CBE = 0x403A
+0x7CC0 = 0x6471
+0x7CC2 = 0x6473
+0x7CC5 = 0x6472
+0x7CCA = 0x3852
+0x7CCE = 0x4138
+0x7CD2 = 0x6475
+0x7CD6 = 0x457C
+0x7CD8 = 0x6474
+0x7CDC = 0x6476
+0x7CDE = 0x4A35
+0x7CDF = 0x416C
+0x7CE0 = 0x3947
+0x7CE2 = 0x6477
+0x7CE7 = 0x4E48
+0x7CEF = 0x6479
+0x7CF2 = 0x647A
+0x7CF4 = 0x647B
+0x7CF6 = 0x647C
+0x7CF8 = 0x3B65
+0x7CFA = 0x647D
+0x7CFB = 0x374F
+0x7CFE = 0x356A
+0x7D00 = 0x352A
+0x7D02 = 0x6521
+0x7D04 = 0x4C73
+0x7D05 = 0x3948
+0x7D06 = 0x647E
+0x7D0A = 0x6524
+0x7D0B = 0x4C66
+0x7D0D = 0x473C
+0x7D10 = 0x4933
+0x7D14 = 0x3D63
+0x7D15 = 0x6523
+0x7D17 = 0x3C53
+0x7D18 = 0x3949
+0x7D19 = 0x3B66
+0x7D1A = 0x3569
+0x7D1B = 0x4A36
+0x7D1C = 0x6522
+0x7D20 = 0x4147
+0x7D21 = 0x4B42
+0x7D22 = 0x3A77
+0x7D2B = 0x3B67
+0x7D2C = 0x445D
+0x7D2E = 0x6527
+0x7D2F = 0x4E5F
+0x7D30 = 0x3A59
+0x7D32 = 0x6528
+0x7D33 = 0x3F42
+0x7D35 = 0x652A
+0x7D39 = 0x3E52
+0x7D3A = 0x3A30
+0x7D3F = 0x6529
+0x7D42 = 0x3D2A
+0x7D43 = 0x383E
+0x7D44 = 0x4148
+0x7D45 = 0x6525
+0x7D46 = 0x652B
+0x7D4B = 0x6526
+0x7D4C = 0x3750
+0x7D4E = 0x652E
+0x7D4F = 0x6532
+0x7D50 = 0x376B
+0x7D56 = 0x652D
+0x7D5B = 0x6536
+0x7D5E = 0x394A
+0x7D61 = 0x4D6D
+0x7D62 = 0x303C
+0x7D63 = 0x6533
+0x7D66 = 0x356B
+0x7D68 = 0x6530
+0x7D6E = 0x6531
+0x7D71 = 0x457D
+0x7D72 = 0x652F
+0x7D73 = 0x652C
+0x7D75 = 0x3328
+0x7D76 = 0x4064
+0x7D79 = 0x3828
+0x7D7D = 0x6538
+0x7D89 = 0x6535
+0x7D8F = 0x6537
+0x7D93 = 0x6534
+0x7D99 = 0x3751
+0x7D9A = 0x4233
+0x7D9B = 0x6539
+0x7D9C = 0x416E
+0x7D9F = 0x6546
+0x7DA2 = 0x6542
+0x7DA3 = 0x653C
+0x7DAB = 0x6540
+0x7DAC = 0x3C7A
+0x7DAD = 0x305D
+0x7DAE = 0x653B
+0x7DAF = 0x6543
+0x7DB0 = 0x6547
+0x7DB1 = 0x394B
+0x7DB2 = 0x4C56
+0x7DB4 = 0x4456
+0x7DB5 = 0x653D
+0x7DB8 = 0x6545
+0x7DBA = 0x653A
+0x7DBB = 0x433E
+0x7DBD = 0x653F
+0x7DBE = 0x303D
+0x7DBF = 0x4C4A
+0x7DC7 = 0x653E
+0x7DCA = 0x365B
+0x7DCB = 0x486C
+0x7DCF = 0x416D
+0x7DD1 = 0x4E50
+0x7DD2 = 0x3D6F
+0x7DD5 = 0x656E
+0x7DD8 = 0x6548
+0x7DDA = 0x407E
+0x7DDC = 0x6544
+0x7DDD = 0x6549
+0x7DDE = 0x654B
+0x7DE0 = 0x4479
+0x7DE1 = 0x654E
+0x7DE4 = 0x654A
+0x7DE8 = 0x4A54
+0x7DE9 = 0x344B
+0x7DEC = 0x4C4B
+0x7DEF = 0x305E
+0x7DF2 = 0x654D
+0x7DF4 = 0x4E7D
+0x7DFB = 0x654C
+0x7E01 = 0x316F
+0x7E04 = 0x466C
+0x7E05 = 0x654F
+0x7E09 = 0x6556
+0x7E0A = 0x6550
+0x7E0B = 0x6557
+0x7E12 = 0x6553
+0x7E1B = 0x477B
+0x7E1E = 0x3C4A
+0x7E1F = 0x6555
+0x7E21 = 0x6552
+0x7E22 = 0x6558
+0x7E23 = 0x6551
+0x7E26 = 0x3D44
+0x7E2B = 0x4B25
+0x7E2E = 0x3D4C
+0x7E31 = 0x6554
+0x7E32 = 0x6560
+0x7E35 = 0x655C
+0x7E37 = 0x655F
+0x7E39 = 0x655D
+0x7E3A = 0x6561
+0x7E3B = 0x655B
+0x7E3D = 0x6541
+0x7E3E = 0x4053
+0x7E41 = 0x484B
+0x7E43 = 0x655E
+0x7E46 = 0x6559
+0x7E4A = 0x4121
+0x7E4B = 0x3752
+0x7E4D = 0x3D2B
+0x7E54 = 0x3F25
+0x7E55 = 0x4136
+0x7E56 = 0x6564
+0x7E59 = 0x6566
+0x7E5A = 0x6567
+0x7E5D = 0x6563
+0x7E5E = 0x6565
+0x7E66 = 0x655A
+0x7E67 = 0x6562
+0x7E69 = 0x656A
+0x7E6A = 0x6569
+0x7E6D = 0x4B7A
+0x7E70 = 0x372B
+0x7E79 = 0x6568
+0x7E7B = 0x656C
+0x7E7C = 0x656B
+0x7E7D = 0x656F
+0x7E7F = 0x6571
+0x7E82 = 0x3B3C
+0x7E83 = 0x656D
+0x7E88 = 0x6572
+0x7E89 = 0x6573
+0x7E8C = 0x6574
+0x7E8E = 0x657A
+0x7E8F = 0x453B
+0x7E90 = 0x6576
+0x7E92 = 0x6575
+0x7E93 = 0x6577
+0x7E94 = 0x6578
+0x7E96 = 0x6579
+0x7E9B = 0x657B
+0x7E9C = 0x657C
+0x7F36 = 0x344C
+0x7F38 = 0x657D
+0x7F3A = 0x657E
+0x7F45 = 0x6621
+0x7F4C = 0x6622
+0x7F4D = 0x6623
+0x7F4E = 0x6624
+0x7F50 = 0x6625
+0x7F51 = 0x6626
+0x7F54 = 0x6628
+0x7F55 = 0x6627
+0x7F58 = 0x6629
+0x7F5F = 0x662A
+0x7F60 = 0x662B
+0x7F67 = 0x662E
+0x7F68 = 0x662C
+0x7F69 = 0x662D
+0x7F6A = 0x3A61
+0x7F6B = 0x3753
+0x7F6E = 0x4356
+0x7F70 = 0x4833
+0x7F72 = 0x3D70
+0x7F75 = 0x474D
+0x7F77 = 0x486D
+0x7F78 = 0x662F
+0x7F79 = 0x586D
+0x7F82 = 0x6630
+0x7F83 = 0x6632
+0x7F85 = 0x4D65
+0x7F86 = 0x6631
+0x7F87 = 0x6634
+0x7F88 = 0x6633
+0x7F8A = 0x4D53
+0x7F8C = 0x6635
+0x7F8E = 0x487E
+0x7F94 = 0x6636
+0x7F9A = 0x6639
+0x7F9D = 0x6638
+0x7F9E = 0x6637
+0x7FA3 = 0x663A
+0x7FA4 = 0x3732
+0x7FA8 = 0x4122
+0x7FA9 = 0x3541
+0x7FAE = 0x663E
+0x7FAF = 0x663B
+0x7FB2 = 0x663C
+0x7FB6 = 0x663F
+0x7FB8 = 0x6640
+0x7FB9 = 0x663D
+0x7FBD = 0x3129
+0x7FC1 = 0x3227
+0x7FC5 = 0x6642
+0x7FC6 = 0x6643
+0x7FCA = 0x6644
+0x7FCC = 0x4D62
+0x7FD2 = 0x3D2C
+0x7FD4 = 0x6646
+0x7FD5 = 0x6645
+0x7FE0 = 0x3F69
+0x7FE1 = 0x6647
+0x7FE6 = 0x6648
+0x7FE9 = 0x6649
+0x7FEB = 0x3465
+0x7FF0 = 0x344D
+0x7FF3 = 0x664A
+0x7FF9 = 0x664B
+0x7FFB = 0x4B5D
+0x7FFC = 0x4D63
+0x8000 = 0x4D54
+0x8001 = 0x4F37
+0x8003 = 0x394D
+0x8004 = 0x664E
+0x8005 = 0x3C54
+0x8006 = 0x664D
+0x800B = 0x664F
+0x800C = 0x3C29
+0x8010 = 0x4251
+0x8012 = 0x6650
+0x8015 = 0x394C
+0x8017 = 0x4C57
+0x8018 = 0x6651
+0x8019 = 0x6652
+0x801C = 0x6653
+0x8021 = 0x6654
+0x8028 = 0x6655
+0x8033 = 0x3C2A
+0x8036 = 0x4C6D
+0x803B = 0x6657
+0x803D = 0x433F
+0x803F = 0x6656
+0x8046 = 0x6659
+0x804A = 0x6658
+0x8052 = 0x665A
+0x8056 = 0x403B
+0x8058 = 0x665B
+0x805A = 0x665C
+0x805E = 0x4A39
+0x805F = 0x665D
+0x8061 = 0x416F
+0x8062 = 0x665E
+0x8068 = 0x665F
+0x806F = 0x4E7E
+0x8070 = 0x6662
+0x8072 = 0x6661
+0x8073 = 0x6660
+0x8074 = 0x4430
+0x8076 = 0x6663
+0x8077 = 0x3F26
+0x8079 = 0x6664
+0x807D = 0x6665
+0x807E = 0x4F38
+0x807F = 0x6666
+0x8084 = 0x6667
+0x8085 = 0x6669
+0x8086 = 0x6668
+0x8087 = 0x4825
+0x8089 = 0x4679
+0x808B = 0x4F3E
+0x808C = 0x4829
+0x8093 = 0x666B
+0x8096 = 0x3E53
+0x8098 = 0x492A
+0x809A = 0x666C
+0x809B = 0x666A
+0x809D = 0x344E
+0x80A1 = 0x3854
+0x80A2 = 0x3B68
+0x80A5 = 0x486E
+0x80A9 = 0x382A
+0x80AA = 0x4B43
+0x80AC = 0x666F
+0x80AD = 0x666D
+0x80AF = 0x394E
+0x80B1 = 0x394F
+0x80B2 = 0x3069
+0x80B4 = 0x3A68
+0x80BA = 0x4759
+0x80C3 = 0x305F
+0x80C4 = 0x6674
+0x80C6 = 0x4340
+0x80CC = 0x4758
+0x80CE = 0x425B
+0x80D6 = 0x6676
+0x80D9 = 0x6672
+0x80DA = 0x6675
+0x80DB = 0x6670
+0x80DD = 0x6673
+0x80DE = 0x4B26
+0x80E1 = 0x3855
+0x80E4 = 0x307D
+0x80E5 = 0x6671
+0x80EF = 0x6678
+0x80F1 = 0x6679
+0x80F4 = 0x4639
+0x80F8 = 0x363B
+0x80FC = 0x6726
+0x80FD = 0x473D
+0x8102 = 0x3B69
+0x8105 = 0x363C
+0x8106 = 0x4048
+0x8107 = 0x4F46
+0x8108 = 0x4C2E
+0x8109 = 0x6677
+0x810A = 0x4054
+0x811A = 0x3553
+0x811B = 0x667A
+0x8123 = 0x667C
+0x8129 = 0x667B
+0x812F = 0x667D
+0x8131 = 0x4326
+0x8133 = 0x473E
+0x8139 = 0x4431
+0x813E = 0x6723
+0x8146 = 0x6722
+0x814B = 0x667E
+0x814E = 0x3F55
+0x8150 = 0x4965
+0x8151 = 0x6725
+0x8153 = 0x6724
+0x8154 = 0x3950
+0x8155 = 0x4F53
+0x815F = 0x6735
+0x8165 = 0x6729
+0x8166 = 0x672A
+0x816B = 0x3C70
+0x816E = 0x6728
+0x8170 = 0x3978
+0x8171 = 0x6727
+0x8174 = 0x672B
+0x8178 = 0x4432
+0x8179 = 0x4A22
+0x817A = 0x4123
+0x817F = 0x425C
+0x8180 = 0x672F
+0x8182 = 0x6730
+0x8183 = 0x672C
+0x8188 = 0x672D
+0x818A = 0x672E
+0x818F = 0x3951
+0x8193 = 0x6736
+0x8195 = 0x6732
+0x819A = 0x4966
+0x819C = 0x4B6C
+0x819D = 0x4928
+0x81A0 = 0x6731
+0x81A3 = 0x6734
+0x81A4 = 0x6733
+0x81A8 = 0x4B44
+0x81A9 = 0x6737
+0x81B0 = 0x6738
+0x81B3 = 0x4137
+0x81B5 = 0x6739
+0x81B8 = 0x673B
+0x81BA = 0x673F
+0x81BD = 0x673C
+0x81BE = 0x673A
+0x81BF = 0x473F
+0x81C0 = 0x673D
+0x81C2 = 0x673E
+0x81C6 = 0x3232
+0x81C8 = 0x6745
+0x81C9 = 0x6740
+0x81CD = 0x6741
+0x81D1 = 0x6742
+0x81D3 = 0x4221
+0x81D8 = 0x6744
+0x81D9 = 0x6743
+0x81DA = 0x6746
+0x81DF = 0x6747
+0x81E0 = 0x6748
+0x81E3 = 0x3F43
+0x81E5 = 0x3269
+0x81E7 = 0x6749
+0x81E8 = 0x4E57
+0x81EA = 0x3C2B
+0x81ED = 0x3D2D
+0x81F3 = 0x3B6A
+0x81F4 = 0x4357
+0x81FA = 0x674A
+0x81FB = 0x674B
+0x81FC = 0x3131
+0x81FE = 0x674C
+0x8201 = 0x674D
+0x8202 = 0x674E
+0x8205 = 0x674F
+0x8207 = 0x6750
+0x8208 = 0x363D
+0x8209 = 0x5A2A
+0x820A = 0x6751
+0x820C = 0x4065
+0x820D = 0x6752
+0x820E = 0x3C4B
+0x8210 = 0x6753
+0x8212 = 0x5030
+0x8216 = 0x6754
+0x8217 = 0x4A5E
+0x8218 = 0x345C
+0x821B = 0x4124
+0x821C = 0x3D58
+0x821E = 0x4971
+0x821F = 0x3D2E
+0x8229 = 0x6755
+0x822A = 0x3952
+0x822B = 0x6756
+0x822C = 0x484C
+0x822E = 0x6764
+0x8233 = 0x6758
+0x8235 = 0x4249
+0x8236 = 0x4775
+0x8237 = 0x383F
+0x8238 = 0x6757
+0x8239 = 0x4125
+0x8240 = 0x6759
+0x8247 = 0x447A
+0x8258 = 0x675B
+0x8259 = 0x675A
+0x825A = 0x675D
+0x825D = 0x675C
+0x825F = 0x675E
+0x8262 = 0x6760
+0x8264 = 0x675F
+0x8266 = 0x344F
+0x8268 = 0x6761
+0x826A = 0x6762
+0x826B = 0x6763
+0x826E = 0x3A31
+0x826F = 0x4E49
+0x8271 = 0x6765
+0x8272 = 0x3F27
+0x8276 = 0x3170
+0x8277 = 0x6766
+0x8278 = 0x6767
+0x827E = 0x6768
+0x828B = 0x3072
+0x828D = 0x6769
+0x8292 = 0x676A
+0x8299 = 0x4967
+0x829D = 0x3C47
+0x829F = 0x676C
+0x82A5 = 0x3329
+0x82A6 = 0x3032
+0x82AB = 0x676B
+0x82AC = 0x676E
+0x82AD = 0x474E
+0x82AF = 0x3F44
+0x82B1 = 0x3256
+0x82B3 = 0x4B27
+0x82B8 = 0x375D
+0x82B9 = 0x365C
+0x82BB = 0x676D
+0x82BD = 0x326A
+0x82C5 = 0x3423
+0x82D1 = 0x3171
+0x82D2 = 0x6772
+0x82D3 = 0x4E6A
+0x82D4 = 0x425D
+0x82D7 = 0x4944
+0x82D9 = 0x677E
+0x82DB = 0x3257
+0x82DC = 0x677C
+0x82DE = 0x677A
+0x82DF = 0x6771
+0x82E1 = 0x676F
+0x82E3 = 0x6770
+0x82E5 = 0x3C63
+0x82E6 = 0x366C
+0x82E7 = 0x4377
+0x82EB = 0x4651
+0x82F1 = 0x3151
+0x82F3 = 0x6774
+0x82F4 = 0x6773
+0x82F9 = 0x6779
+0x82FA = 0x6775
+0x82FB = 0x6778
+0x8302 = 0x4C50
+0x8303 = 0x6777
+0x8304 = 0x3258
+0x8305 = 0x337D
+0x8306 = 0x677B
+0x8309 = 0x677D
+0x830E = 0x3754
+0x8316 = 0x6823
+0x8317 = 0x682C
+0x8318 = 0x682D
+0x831C = 0x302B
+0x8323 = 0x6834
+0x8328 = 0x3071
+0x832B = 0x682B
+0x832F = 0x682A
+0x8331 = 0x6825
+0x8332 = 0x6824
+0x8334 = 0x6822
+0x8335 = 0x6821
+0x8336 = 0x4363
+0x8338 = 0x427B
+0x8339 = 0x6827
+0x8340 = 0x6826
+0x8345 = 0x6829
+0x8349 = 0x4170
+0x834A = 0x3755
+0x834F = 0x3141
+0x8350 = 0x6828
+0x8352 = 0x3953
+0x8358 = 0x4171
+0x8373 = 0x683A
+0x8375 = 0x683B
+0x8377 = 0x3259
+0x837B = 0x322E
+0x837C = 0x6838
+0x8385 = 0x682E
+0x8387 = 0x6836
+0x8389 = 0x683D
+0x838A = 0x6837
+0x838E = 0x6835
+0x8393 = 0x6776
+0x8396 = 0x6833
+0x839A = 0x682F
+0x839E = 0x3450
+0x839F = 0x6831
+0x83A0 = 0x683C
+0x83A2 = 0x6832
+0x83A8 = 0x683E
+0x83AA = 0x6830
+0x83AB = 0x477C
+0x83B1 = 0x4D69
+0x83B5 = 0x6839
+0x83BD = 0x684F
+0x83C1 = 0x6847
+0x83C5 = 0x3F7B
+0x83CA = 0x3546
+0x83CC = 0x365D
+0x83CE = 0x6842
+0x83D3 = 0x325B
+0x83D6 = 0x3E54
+0x83D8 = 0x6845
+0x83DC = 0x3A5A
+0x83DF = 0x4551
+0x83E0 = 0x684A
+0x83E9 = 0x4A6E
+0x83EB = 0x6841
+0x83EF = 0x325A
+0x83F0 = 0x3856
+0x83F1 = 0x4929
+0x83F2 = 0x684B
+0x83F4 = 0x683F
+0x83F7 = 0x6848
+0x83FB = 0x6852
+0x83FD = 0x6843
+0x8403 = 0x6844
+0x8404 = 0x463A
+0x8407 = 0x6849
+0x840B = 0x6846
+0x840C = 0x4B28
+0x840D = 0x684C
+0x840E = 0x3060
+0x8413 = 0x6840
+0x8420 = 0x684E
+0x8422 = 0x684D
+0x8429 = 0x476B
+0x842A = 0x6854
+0x842C = 0x685F
+0x8431 = 0x337E
+0x8435 = 0x6862
+0x8438 = 0x6850
+0x843C = 0x6855
+0x843D = 0x4D6E
+0x8446 = 0x685E
+0x8449 = 0x4D55
+0x844E = 0x4E2A
+0x8457 = 0x4378
+0x845B = 0x336B
+0x8461 = 0x4972
+0x8462 = 0x6864
+0x8463 = 0x4621
+0x8466 = 0x3031
+0x8469 = 0x685D
+0x846B = 0x6859
+0x846C = 0x4172
+0x846D = 0x6853
+0x846E = 0x685B
+0x846F = 0x6860
+0x8471 = 0x472C
+0x8475 = 0x302A
+0x8477 = 0x6858
+0x8479 = 0x6861
+0x847A = 0x4978
+0x8482 = 0x685C
+0x8484 = 0x6857
+0x848B = 0x3E55
+0x8490 = 0x3D2F
+0x8494 = 0x3C2C
+0x8499 = 0x4C58
+0x849C = 0x4947
+0x849F = 0x6867
+0x84A1 = 0x6870
+0x84AD = 0x685A
+0x84B2 = 0x3377
+0x84B8 = 0x3E78
+0x84B9 = 0x6865
+0x84BB = 0x686A
+0x84BC = 0x4173
+0x84BF = 0x6866
+0x84C1 = 0x686D
+0x84C4 = 0x435F
+0x84C6 = 0x686E
+0x84C9 = 0x4D56
+0x84CA = 0x6863
+0x84CB = 0x3338
+0x84CD = 0x6869
+0x84D0 = 0x686C
+0x84D1 = 0x4C2C
+0x84D6 = 0x686F
+0x84D9 = 0x6868
+0x84DA = 0x686B
+0x84EC = 0x4B29
+0x84EE = 0x4F21
+0x84F4 = 0x6873
+0x84FC = 0x687A
+0x84FF = 0x6872
+0x8500 = 0x3C43
+0x8506 = 0x6851
+0x8511 = 0x4A4E
+0x8513 = 0x4C22
+0x8514 = 0x6879
+0x8515 = 0x6878
+0x8517 = 0x6874
+0x8518 = 0x6875
+0x851A = 0x3136
+0x851F = 0x6877
+0x8521 = 0x6871
+0x8526 = 0x4455
+0x852C = 0x6876
+0x852D = 0x307E
+0x8535 = 0x4222
+0x853D = 0x4A43
+0x8540 = 0x687B
+0x8541 = 0x6921
+0x8543 = 0x4859
+0x8548 = 0x687E
+0x8549 = 0x3E56
+0x854A = 0x3C49
+0x854B = 0x6923
+0x854E = 0x363E
+0x8555 = 0x6924
+0x8557 = 0x4979
+0x8558 = 0x687D
+0x855A = 0x6856
+0x8563 = 0x687C
+0x8568 = 0x4F4F
+0x8569 = 0x4622
+0x856A = 0x4973
+0x856D = 0x692B
+0x8577 = 0x6931
+0x857E = 0x6932
+0x8580 = 0x6925
+0x8584 = 0x4776
+0x8587 = 0x692F
+0x8588 = 0x6927
+0x858A = 0x6929
+0x8590 = 0x6933
+0x8591 = 0x6928
+0x8594 = 0x692C
+0x8597 = 0x3172
+0x8599 = 0x4665
+0x859B = 0x692D
+0x859C = 0x6930
+0x85A4 = 0x6926
+0x85A6 = 0x4126
+0x85A8 = 0x692A
+0x85A9 = 0x3B27
+0x85AA = 0x3F45
+0x85AB = 0x3730
+0x85AC = 0x4C74
+0x85AE = 0x4C79
+0x85AF = 0x3D72
+0x85B9 = 0x6937
+0x85BA = 0x6935
+0x85C1 = 0x4F4E
+0x85C9 = 0x6934
+0x85CD = 0x4D75
+0x85CF = 0x6936
+0x85D0 = 0x6938
+0x85D5 = 0x6939
+0x85DC = 0x693C
+0x85DD = 0x693A
+0x85E4 = 0x4623
+0x85E5 = 0x693B
+0x85E9 = 0x484D
+0x85EA = 0x692E
+0x85F7 = 0x3D73
+0x85F9 = 0x693D
+0x85FA = 0x6942
+0x85FB = 0x4174
+0x85FE = 0x6941
+0x8602 = 0x6922
+0x8606 = 0x6943
+0x8607 = 0x4149
+0x860A = 0x693E
+0x860B = 0x6940
+0x8613 = 0x693F
+0x8616 = 0x5D31
+0x8617 = 0x5D22
+0x861A = 0x6945
+0x8622 = 0x6944
+0x862D = 0x4D76
+0x862F = 0x623C
+0x8630 = 0x6946
+0x863F = 0x6947
+0x864D = 0x6948
+0x864E = 0x3857
+0x8650 = 0x3554
+0x8654 = 0x694A
+0x8655 = 0x515D
+0x865A = 0x3575
+0x865C = 0x4E3A
+0x865E = 0x3673
+0x865F = 0x694B
+0x8667 = 0x694C
+0x866B = 0x436E
+0x8671 = 0x694D
+0x8679 = 0x467A
+0x867B = 0x303A
+0x868A = 0x3263
+0x868B = 0x6952
+0x868C = 0x6953
+0x8693 = 0x694E
+0x8695 = 0x3B3D
+0x86A3 = 0x694F
+0x86A4 = 0x4742
+0x86A9 = 0x6950
+0x86AA = 0x6951
+0x86AB = 0x695B
+0x86AF = 0x6955
+0x86B0 = 0x6958
+0x86B6 = 0x6954
+0x86C4 = 0x6956
+0x86C6 = 0x6957
+0x86C7 = 0x3C58
+0x86C9 = 0x6959
+0x86CB = 0x4341
+0x86CD = 0x3756
+0x86CE = 0x3342
+0x86D4 = 0x695C
+0x86D9 = 0x333F
+0x86DB = 0x6961
+0x86DE = 0x695D
+0x86DF = 0x6960
+0x86E4 = 0x483A
+0x86E9 = 0x695E
+0x86EC = 0x695F
+0x86ED = 0x4948
+0x86EE = 0x485A
+0x86EF = 0x6962
+0x86F8 = 0x427D
+0x86F9 = 0x696C
+0x86FB = 0x6968
+0x86FE = 0x326B
+0x8700 = 0x6966
+0x8702 = 0x4B2A
+0x8703 = 0x6967
+0x8706 = 0x6964
+0x8708 = 0x6965
+0x8709 = 0x696A
+0x870A = 0x696D
+0x870D = 0x696B
+0x8711 = 0x6969
+0x8712 = 0x6963
+0x8718 = 0x4358
+0x871A = 0x6974
+0x871C = 0x4C2A
+0x8725 = 0x6972
+0x8729 = 0x6973
+0x8734 = 0x696E
+0x8737 = 0x6970
+0x873B = 0x6971
+0x873F = 0x696F
+0x8749 = 0x4066
+0x874B = 0x4F39
+0x874C = 0x6978
+0x874E = 0x6979
+0x8753 = 0x6A21
+0x8755 = 0x3F2A
+0x8757 = 0x697B
+0x8759 = 0x697E
+0x875F = 0x6976
+0x8760 = 0x6975
+0x8763 = 0x6A22
+0x8766 = 0x325C
+0x8768 = 0x697C
+0x876A = 0x6A23
+0x876E = 0x697D
+0x8774 = 0x697A
+0x8776 = 0x4433
+0x8778 = 0x6977
+0x877F = 0x4768
+0x8782 = 0x6A27
+0x878D = 0x4D3B
+0x879F = 0x6A26
+0x87A2 = 0x6A25
+0x87AB = 0x6A2E
+0x87AF = 0x6A28
+0x87B3 = 0x6A30
+0x87BA = 0x4D66
+0x87BB = 0x6A33
+0x87BD = 0x6A2A
+0x87C0 = 0x6A2B
+0x87C4 = 0x6A2F
+0x87C6 = 0x6A32
+0x87C7 = 0x6A31
+0x87CB = 0x6A29
+0x87D0 = 0x6A2C
+0x87D2 = 0x6A3D
+0x87E0 = 0x6A36
+0x87EF = 0x6A34
+0x87F2 = 0x6A35
+0x87F6 = 0x6A3A
+0x87F7 = 0x6A3B
+0x87F9 = 0x332A
+0x87FB = 0x3542
+0x87FE = 0x6A39
+0x8805 = 0x6A24
+0x880D = 0x6A38
+0x880E = 0x6A3C
+0x880F = 0x6A37
+0x8811 = 0x6A3E
+0x8815 = 0x6A40
+0x8816 = 0x6A3F
+0x8821 = 0x6A42
+0x8822 = 0x6A41
+0x8823 = 0x695A
+0x8827 = 0x6A46
+0x8831 = 0x6A43
+0x8836 = 0x6A44
+0x8839 = 0x6A45
+0x883B = 0x6A47
+0x8840 = 0x376C
+0x8842 = 0x6A49
+0x8844 = 0x6A48
+0x8846 = 0x3D30
+0x884C = 0x3954
+0x884D = 0x5E27
+0x8852 = 0x6A4A
+0x8853 = 0x3D51
+0x8857 = 0x3339
+0x8859 = 0x6A4B
+0x885B = 0x3152
+0x885D = 0x3E57
+0x885E = 0x6A4C
+0x8861 = 0x3955
+0x8862 = 0x6A4D
+0x8863 = 0x3061
+0x8868 = 0x493D
+0x886B = 0x6A4E
+0x8870 = 0x3F6A
+0x8872 = 0x6A55
+0x8875 = 0x6A52
+0x8877 = 0x436F
+0x887D = 0x6A53
+0x887E = 0x6A50
+0x887F = 0x365E
+0x8881 = 0x6A4F
+0x8882 = 0x6A56
+0x8888 = 0x3736
+0x888B = 0x425E
+0x888D = 0x6A5C
+0x8892 = 0x6A58
+0x8896 = 0x4235
+0x8897 = 0x6A57
+0x8899 = 0x6A5A
+0x889E = 0x6A51
+0x88A2 = 0x6A5B
+0x88A4 = 0x6A5D
+0x88AB = 0x486F
+0x88AE = 0x6A59
+0x88B0 = 0x6A5E
+0x88B1 = 0x6A60
+0x88B4 = 0x3853
+0x88B5 = 0x6A54
+0x88B7 = 0x3041
+0x88BF = 0x6A5F
+0x88C1 = 0x3A5B
+0x88C2 = 0x4E76
+0x88C3 = 0x6A61
+0x88C4 = 0x6A62
+0x88C5 = 0x4175
+0x88CF = 0x4E22
+0x88D4 = 0x6A63
+0x88D5 = 0x4D35
+0x88D8 = 0x6A64
+0x88D9 = 0x6A65
+0x88DC = 0x4A64
+0x88DD = 0x6A66
+0x88DF = 0x3A40
+0x88E1 = 0x4E23
+0x88E8 = 0x6A6B
+0x88F2 = 0x6A6C
+0x88F3 = 0x3E58
+0x88F4 = 0x6A6A
+0x88F8 = 0x4D67
+0x88F9 = 0x6A67
+0x88FC = 0x6A69
+0x88FD = 0x403D
+0x88FE = 0x3F7E
+0x8902 = 0x6A68
+0x8904 = 0x6A6D
+0x8907 = 0x4A23
+0x890A = 0x6A6F
+0x890C = 0x6A6E
+0x8910 = 0x336C
+0x8912 = 0x4B2B
+0x8913 = 0x6A70
+0x891D = 0x6A7C
+0x891E = 0x6A72
+0x8925 = 0x6A73
+0x892A = 0x6A74
+0x892B = 0x6A75
+0x8936 = 0x6A79
+0x8938 = 0x6A7A
+0x893B = 0x6A78
+0x8941 = 0x6A76
+0x8943 = 0x6A71
+0x8944 = 0x6A77
+0x894C = 0x6A7B
+0x894D = 0x7037
+0x8956 = 0x3228
+0x895E = 0x6A7E
+0x895F = 0x365F
+0x8960 = 0x6A7D
+0x8964 = 0x6B22
+0x8966 = 0x6B21
+0x896A = 0x6B24
+0x896D = 0x6B23
+0x896F = 0x6B25
+0x8972 = 0x3D31
+0x8974 = 0x6B26
+0x8977 = 0x6B27
+0x897E = 0x6B28
+0x897F = 0x403E
+0x8981 = 0x4D57
+0x8983 = 0x6B29
+0x8986 = 0x4A24
+0x8987 = 0x4746
+0x8988 = 0x6B2A
+0x898A = 0x6B2B
+0x898B = 0x382B
+0x898F = 0x352C
+0x8993 = 0x6B2C
+0x8996 = 0x3B6B
+0x8997 = 0x4741
+0x8998 = 0x6B2D
+0x899A = 0x3350
+0x89A1 = 0x6B2E
+0x89A6 = 0x6B30
+0x89A7 = 0x4D77
+0x89A9 = 0x6B2F
+0x89AA = 0x3F46
+0x89AC = 0x6B31
+0x89AF = 0x6B32
+0x89B2 = 0x6B33
+0x89B3 = 0x3451
+0x89BA = 0x6B34
+0x89BD = 0x6B35
+0x89BF = 0x6B36
+0x89C0 = 0x6B37
+0x89D2 = 0x3351
+0x89DA = 0x6B38
+0x89DC = 0x6B39
+0x89DD = 0x6B3A
+0x89E3 = 0x3272
+0x89E6 = 0x3F28
+0x89E7 = 0x6B3B
+0x89F4 = 0x6B3C
+0x89F8 = 0x6B3D
+0x8A00 = 0x3840
+0x8A02 = 0x447B
+0x8A03 = 0x6B3E
+0x8A08 = 0x3757
+0x8A0A = 0x3F56
+0x8A0C = 0x6B41
+0x8A0E = 0x4624
+0x8A10 = 0x6B40
+0x8A13 = 0x3731
+0x8A16 = 0x6B3F
+0x8A17 = 0x4277
+0x8A18 = 0x352D
+0x8A1B = 0x6B42
+0x8A1D = 0x6B43
+0x8A1F = 0x3E59
+0x8A23 = 0x376D
+0x8A25 = 0x6B44
+0x8A2A = 0x4B2C
+0x8A2D = 0x405F
+0x8A31 = 0x3576
+0x8A33 = 0x4C75
+0x8A34 = 0x414A
+0x8A36 = 0x6B45
+0x8A3A = 0x3F47
+0x8A3B = 0x4370
+0x8A3C = 0x3E5A
+0x8A41 = 0x6B46
+0x8A46 = 0x6B49
+0x8A48 = 0x6B4A
+0x8A50 = 0x3A3E
+0x8A51 = 0x4242
+0x8A52 = 0x6B48
+0x8A54 = 0x3E5B
+0x8A55 = 0x493E
+0x8A5B = 0x6B47
+0x8A5E = 0x3B6C
+0x8A60 = 0x3153
+0x8A62 = 0x6B4E
+0x8A63 = 0x3758
+0x8A66 = 0x3B6E
+0x8A69 = 0x3B6D
+0x8A6B = 0x4F4D
+0x8A6C = 0x6B4D
+0x8A6D = 0x6B4C
+0x8A6E = 0x4127
+0x8A70 = 0x354D
+0x8A71 = 0x4F43
+0x8A72 = 0x333A
+0x8A73 = 0x3E5C
+0x8A7C = 0x6B4B
+0x8A82 = 0x6B50
+0x8A84 = 0x6B51
+0x8A85 = 0x6B4F
+0x8A87 = 0x3858
+0x8A89 = 0x4D40
+0x8A8C = 0x3B6F
+0x8A8D = 0x4727
+0x8A91 = 0x6B54
+0x8A93 = 0x4040
+0x8A95 = 0x4342
+0x8A98 = 0x4D36
+0x8A9A = 0x6B57
+0x8A9E = 0x386C
+0x8AA0 = 0x403F
+0x8AA1 = 0x6B53
+0x8AA3 = 0x6B58
+0x8AA4 = 0x386D
+0x8AA5 = 0x6B55
+0x8AA6 = 0x6B56
+0x8AA8 = 0x6B52
+0x8AAC = 0x4062
+0x8AAD = 0x4649
+0x8AB0 = 0x432F
+0x8AB2 = 0x325D
+0x8AB9 = 0x4870
+0x8ABC = 0x3543
+0x8ABF = 0x4434
+0x8AC2 = 0x6B5B
+0x8AC4 = 0x6B59
+0x8AC7 = 0x434C
+0x8ACB = 0x4041
+0x8ACC = 0x3452
+0x8ACD = 0x6B5A
+0x8ACF = 0x3F5B
+0x8AD2 = 0x4E4A
+0x8AD6 = 0x4F40
+0x8ADA = 0x6B5C
+0x8ADB = 0x6B67
+0x8ADC = 0x4435
+0x8ADE = 0x6B66
+0x8AE0 = 0x6B63
+0x8AE1 = 0x6B6B
+0x8AE2 = 0x6B64
+0x8AE4 = 0x6B60
+0x8AE6 = 0x447C
+0x8AE7 = 0x6B5F
+0x8AEB = 0x6B5D
+0x8AED = 0x4D21
+0x8AEE = 0x3B70
+0x8AF1 = 0x6B61
+0x8AF3 = 0x6B5E
+0x8AF7 = 0x6B65
+0x8AF8 = 0x3D74
+0x8AFA = 0x3841
+0x8AFE = 0x427A
+0x8B00 = 0x4B45
+0x8B01 = 0x315A
+0x8B02 = 0x3062
+0x8B04 = 0x4625
+0x8B07 = 0x6B69
+0x8B0C = 0x6B68
+0x8B0E = 0x4666
+0x8B10 = 0x6B6D
+0x8B14 = 0x6B62
+0x8B16 = 0x6B6C
+0x8B17 = 0x6B6E
+0x8B19 = 0x382C
+0x8B1A = 0x6B6A
+0x8B1B = 0x3956
+0x8B1D = 0x3C55
+0x8B20 = 0x6B6F
+0x8B21 = 0x4D58
+0x8B26 = 0x6B72
+0x8B28 = 0x6B75
+0x8B2B = 0x6B73
+0x8B2C = 0x4935
+0x8B33 = 0x6B70
+0x8B39 = 0x3660
+0x8B3E = 0x6B74
+0x8B41 = 0x6B76
+0x8B49 = 0x6B7A
+0x8B4C = 0x6B77
+0x8B4E = 0x6B79
+0x8B4F = 0x6B78
+0x8B56 = 0x6B7B
+0x8B58 = 0x3C31
+0x8B5A = 0x6B7D
+0x8B5B = 0x6B7C
+0x8B5C = 0x4968
+0x8B5F = 0x6C21
+0x8B66 = 0x3759
+0x8B6B = 0x6B7E
+0x8B6C = 0x6C22
+0x8B6F = 0x6C23
+0x8B70 = 0x3544
+0x8B71 = 0x6641
+0x8B72 = 0x3E79
+0x8B74 = 0x6C24
+0x8B77 = 0x386E
+0x8B7D = 0x6C25
+0x8B80 = 0x6C26
+0x8B83 = 0x3B3E
+0x8B8A = 0x5A4E
+0x8B8C = 0x6C27
+0x8B8E = 0x6C28
+0x8B90 = 0x3D32
+0x8B92 = 0x6C29
+0x8B93 = 0x6C2A
+0x8B96 = 0x6C2B
+0x8B99 = 0x6C2C
+0x8B9A = 0x6C2D
+0x8C37 = 0x432B
+0x8C3A = 0x6C2E
+0x8C3F = 0x6C30
+0x8C41 = 0x6C2F
+0x8C46 = 0x4626
+0x8C48 = 0x6C31
+0x8C4A = 0x4B2D
+0x8C4C = 0x6C32
+0x8C4E = 0x6C33
+0x8C50 = 0x6C34
+0x8C55 = 0x6C35
+0x8C5A = 0x465A
+0x8C61 = 0x3E5D
+0x8C62 = 0x6C36
+0x8C6A = 0x396B
+0x8C6B = 0x502E
+0x8C6C = 0x6C37
+0x8C78 = 0x6C38
+0x8C79 = 0x493F
+0x8C7A = 0x6C39
+0x8C7C = 0x6C41
+0x8C82 = 0x6C3A
+0x8C85 = 0x6C3C
+0x8C89 = 0x6C3B
+0x8C8A = 0x6C3D
+0x8C8C = 0x4B46
+0x8C8D = 0x6C3E
+0x8C8E = 0x6C3F
+0x8C94 = 0x6C40
+0x8C98 = 0x6C42
+0x8C9D = 0x332D
+0x8C9E = 0x4467
+0x8CA0 = 0x4969
+0x8CA1 = 0x3A62
+0x8CA2 = 0x3957
+0x8CA7 = 0x494F
+0x8CA8 = 0x325F
+0x8CA9 = 0x484E
+0x8CAA = 0x6C45
+0x8CAB = 0x3453
+0x8CAC = 0x4055
+0x8CAD = 0x6C44
+0x8CAE = 0x6C49
+0x8CAF = 0x4379
+0x8CB0 = 0x4C63
+0x8CB2 = 0x6C47
+0x8CB3 = 0x6C48
+0x8CB4 = 0x352E
+0x8CB6 = 0x6C4A
+0x8CB7 = 0x4763
+0x8CB8 = 0x425F
+0x8CBB = 0x4871
+0x8CBC = 0x453D
+0x8CBD = 0x6C46
+0x8CBF = 0x4B47
+0x8CC0 = 0x326C
+0x8CC1 = 0x6C4C
+0x8CC2 = 0x4F28
+0x8CC3 = 0x4442
+0x8CC4 = 0x4F45
+0x8CC7 = 0x3B71
+0x8CC8 = 0x6C4B
+0x8CCA = 0x4231
+0x8CCD = 0x6C5C
+0x8CCE = 0x4128
+0x8CD1 = 0x4678
+0x8CD3 = 0x4950
+0x8CDA = 0x6C4F
+0x8CDB = 0x3B3F
+0x8CDC = 0x3B72
+0x8CDE = 0x3E5E
+0x8CE0 = 0x4765
+0x8CE2 = 0x382D
+0x8CE3 = 0x6C4E
+0x8CE4 = 0x6C4D
+0x8CE6 = 0x496A
+0x8CEA = 0x3C41
+0x8CED = 0x4552
+0x8CFA = 0x6C51
+0x8CFB = 0x6C52
+0x8CFC = 0x3958
+0x8CFD = 0x6C50
+0x8D04 = 0x6C53
+0x8D05 = 0x6C54
+0x8D07 = 0x6C56
+0x8D08 = 0x4223
+0x8D0A = 0x6C55
+0x8D0B = 0x3466
+0x8D0D = 0x6C58
+0x8D0F = 0x6C57
+0x8D10 = 0x6C59
+0x8D13 = 0x6C5B
+0x8D14 = 0x6C5D
+0x8D16 = 0x6C5E
+0x8D64 = 0x4056
+0x8D66 = 0x3C4F
+0x8D67 = 0x6C5F
+0x8D6B = 0x3352
+0x8D6D = 0x6C60
+0x8D70 = 0x4176
+0x8D71 = 0x6C61
+0x8D73 = 0x6C62
+0x8D74 = 0x496B
+0x8D77 = 0x352F
+0x8D81 = 0x6C63
+0x8D85 = 0x4436
+0x8D8A = 0x315B
+0x8D99 = 0x6C64
+0x8DA3 = 0x3C71
+0x8DA8 = 0x3F76
+0x8DB3 = 0x422D
+0x8DBA = 0x6C67
+0x8DBE = 0x6C66
+0x8DC2 = 0x6C65
+0x8DCB = 0x6C6D
+0x8DCC = 0x6C6B
+0x8DCF = 0x6C68
+0x8DD6 = 0x6C6A
+0x8DDA = 0x6C69
+0x8DDB = 0x6C6C
+0x8DDD = 0x3577
+0x8DDF = 0x6C70
+0x8DE1 = 0x4057
+0x8DE3 = 0x6C71
+0x8DE8 = 0x3859
+0x8DEA = 0x6C6E
+0x8DEB = 0x6C6F
+0x8DEF = 0x4F29
+0x8DF3 = 0x4437
+0x8DF5 = 0x4129
+0x8DFC = 0x6C72
+0x8DFF = 0x6C75
+0x8E08 = 0x6C73
+0x8E09 = 0x6C74
+0x8E0A = 0x4D59
+0x8E0F = 0x4627
+0x8E10 = 0x6C78
+0x8E1D = 0x6C76
+0x8E1E = 0x6C77
+0x8E1F = 0x6C79
+0x8E2A = 0x6D29
+0x8E30 = 0x6C7C
+0x8E34 = 0x6C7D
+0x8E35 = 0x6C7B
+0x8E42 = 0x6C7A
+0x8E44 = 0x447D
+0x8E47 = 0x6D21
+0x8E48 = 0x6D25
+0x8E49 = 0x6D22
+0x8E4A = 0x6C7E
+0x8E4C = 0x6D23
+0x8E50 = 0x6D24
+0x8E55 = 0x6D2B
+0x8E59 = 0x6D26
+0x8E5F = 0x4058
+0x8E60 = 0x6D28
+0x8E63 = 0x6D2A
+0x8E64 = 0x6D27
+0x8E72 = 0x6D2D
+0x8E74 = 0x3D33
+0x8E76 = 0x6D2C
+0x8E7C = 0x6D2E
+0x8E81 = 0x6D2F
+0x8E84 = 0x6D32
+0x8E85 = 0x6D31
+0x8E87 = 0x6D30
+0x8E8A = 0x6D34
+0x8E8B = 0x6D33
+0x8E8D = 0x4C76
+0x8E91 = 0x6D36
+0x8E93 = 0x6D35
+0x8E94 = 0x6D37
+0x8E99 = 0x6D38
+0x8EA1 = 0x6D3A
+0x8EAA = 0x6D39
+0x8EAB = 0x3F48
+0x8EAC = 0x6D3B
+0x8EAF = 0x366D
+0x8EB0 = 0x6D3C
+0x8EB1 = 0x6D3E
+0x8EBE = 0x6D3F
+0x8EC5 = 0x6D40
+0x8EC6 = 0x6D3D
+0x8EC8 = 0x6D41
+0x8ECA = 0x3C56
+0x8ECB = 0x6D42
+0x8ECC = 0x3530
+0x8ECD = 0x3733
+0x8ED2 = 0x382E
+0x8EDB = 0x6D43
+0x8EDF = 0x4670
+0x8EE2 = 0x453E
+0x8EE3 = 0x6D44
+0x8EEB = 0x6D47
+0x8EF8 = 0x3C34
+0x8EFB = 0x6D46
+0x8EFC = 0x6D45
+0x8EFD = 0x375A
+0x8EFE = 0x6D48
+0x8F03 = 0x3353
+0x8F05 = 0x6D4A
+0x8F09 = 0x3A5C
+0x8F0A = 0x6D49
+0x8F0C = 0x6D52
+0x8F12 = 0x6D4C
+0x8F13 = 0x6D4E
+0x8F14 = 0x4A65
+0x8F15 = 0x6D4B
+0x8F19 = 0x6D4D
+0x8F1B = 0x6D51
+0x8F1C = 0x6D4F
+0x8F1D = 0x3531
+0x8F1F = 0x6D50
+0x8F26 = 0x6D53
+0x8F29 = 0x475A
+0x8F2A = 0x4E58
+0x8F2F = 0x3D34
+0x8F33 = 0x6D54
+0x8F38 = 0x4D22
+0x8F39 = 0x6D56
+0x8F3B = 0x6D55
+0x8F3E = 0x6D59
+0x8F3F = 0x4D41
+0x8F42 = 0x6D58
+0x8F44 = 0x336D
+0x8F45 = 0x6D57
+0x8F46 = 0x6D5C
+0x8F49 = 0x6D5B
+0x8F4C = 0x6D5A
+0x8F4D = 0x4532
+0x8F4E = 0x6D5D
+0x8F57 = 0x6D5E
+0x8F5C = 0x6D5F
+0x8F5F = 0x396C
+0x8F61 = 0x3725
+0x8F62 = 0x6D60
+0x8F63 = 0x6D61
+0x8F64 = 0x6D62
+0x8F9B = 0x3F49
+0x8F9C = 0x6D63
+0x8F9E = 0x3C2D
+0x8F9F = 0x6D64
+0x8FA3 = 0x6D65
+0x8FA7 = 0x5221
+0x8FA8 = 0x517E
+0x8FAD = 0x6D66
+0x8FAE = 0x6570
+0x8FAF = 0x6D67
+0x8FB0 = 0x4324
+0x8FB1 = 0x3F2B
+0x8FB2 = 0x4740
+0x8FB7 = 0x6D68
+0x8FBA = 0x4A55
+0x8FBB = 0x4454
+0x8FBC = 0x397E
+0x8FBF = 0x4329
+0x8FC2 = 0x312A
+0x8FC4 = 0x4B78
+0x8FC5 = 0x3F57
+0x8FCE = 0x375E
+0x8FD1 = 0x3661
+0x8FD4 = 0x4A56
+0x8FDA = 0x6D69
+0x8FE2 = 0x6D6B
+0x8FE5 = 0x6D6A
+0x8FE6 = 0x3260
+0x8FE9 = 0x4676
+0x8FEA = 0x6D6C
+0x8FEB = 0x4777
+0x8FED = 0x4533
+0x8FEF = 0x6D6D
+0x8FF0 = 0x3D52
+0x8FF4 = 0x6D6F
+0x8FF7 = 0x4C42
+0x8FF8 = 0x6D7E
+0x8FF9 = 0x6D71
+0x8FFA = 0x6D72
+0x8FFD = 0x4449
+0x9000 = 0x4260
+0x9001 = 0x4177
+0x9003 = 0x4628
+0x9005 = 0x6D70
+0x9006 = 0x3555
+0x900B = 0x6D79
+0x900D = 0x6D76
+0x900E = 0x6E25
+0x900F = 0x4629
+0x9010 = 0x4360
+0x9011 = 0x6D73
+0x9013 = 0x447E
+0x9014 = 0x4553
+0x9015 = 0x6D74
+0x9016 = 0x6D78
+0x9017 = 0x3F60
+0x9019 = 0x4767
+0x901A = 0x444C
+0x901D = 0x4042
+0x901E = 0x6D77
+0x901F = 0x422E
+0x9020 = 0x4224
+0x9021 = 0x6D75
+0x9022 = 0x3029
+0x9023 = 0x4F22
+0x9027 = 0x6D7A
+0x902E = 0x4261
+0x9031 = 0x3D35
+0x9032 = 0x3F4A
+0x9035 = 0x6D7C
+0x9036 = 0x6D7B
+0x9038 = 0x306F
+0x9039 = 0x6D7D
+0x903C = 0x492F
+0x903E = 0x6E27
+0x9041 = 0x465B
+0x9042 = 0x3F6B
+0x9045 = 0x4359
+0x9047 = 0x3678
+0x9049 = 0x6E26
+0x904A = 0x4D37
+0x904B = 0x313F
+0x904D = 0x4A57
+0x904E = 0x3261
+0x904F = 0x6E21
+0x9050 = 0x6E22
+0x9051 = 0x6E23
+0x9052 = 0x6E24
+0x9053 = 0x463B
+0x9054 = 0x4323
+0x9055 = 0x3063
+0x9056 = 0x6E28
+0x9058 = 0x6E29
+0x9059 = 0x7423
+0x905C = 0x423D
+0x905E = 0x6E2A
+0x9060 = 0x3173
+0x9061 = 0x414C
+0x9063 = 0x382F
+0x9065 = 0x4D5A
+0x9068 = 0x6E2B
+0x9069 = 0x452C
+0x906D = 0x4178
+0x906E = 0x3C57
+0x906F = 0x6E2C
+0x9072 = 0x6E2F
+0x9075 = 0x3D65
+0x9076 = 0x6E2D
+0x9077 = 0x412B
+0x9078 = 0x412A
+0x907A = 0x3064
+0x907C = 0x4E4B
+0x907D = 0x6E31
+0x907F = 0x4872
+0x9080 = 0x6E33
+0x9081 = 0x6E32
+0x9082 = 0x6E30
+0x9083 = 0x6364
+0x9084 = 0x3454
+0x9087 = 0x6D6E
+0x9089 = 0x6E35
+0x908A = 0x6E34
+0x908F = 0x6E36
+0x9091 = 0x4D38
+0x90A3 = 0x4661
+0x90A6 = 0x4B2E
+0x90A8 = 0x6E37
+0x90AA = 0x3C59
+0x90AF = 0x6E38
+0x90B1 = 0x6E39
+0x90B5 = 0x6E3A
+0x90B8 = 0x4521
+0x90C1 = 0x306A
+0x90CA = 0x3959
+0x90CE = 0x4F3A
+0x90DB = 0x6E3E
+0x90E1 = 0x3734
+0x90E2 = 0x6E3B
+0x90E4 = 0x6E3C
+0x90E8 = 0x4974
+0x90ED = 0x3354
+0x90F5 = 0x4D39
+0x90F7 = 0x363F
+0x90FD = 0x4554
+0x9102 = 0x6E3F
+0x9112 = 0x6E40
+0x9119 = 0x6E41
+0x912D = 0x4522
+0x9130 = 0x6E43
+0x9132 = 0x6E42
+0x9149 = 0x4653
+0x914A = 0x6E44
+0x914B = 0x3D36
+0x914C = 0x3C60
+0x914D = 0x475B
+0x914E = 0x4371
+0x9152 = 0x3C72
+0x9154 = 0x3F6C
+0x9156 = 0x6E45
+0x9158 = 0x6E46
+0x9162 = 0x3F5D
+0x9163 = 0x6E47
+0x9165 = 0x6E48
+0x9169 = 0x6E49
+0x916A = 0x4D6F
+0x916C = 0x3D37
+0x9172 = 0x6E4B
+0x9173 = 0x6E4A
+0x9175 = 0x395A
+0x9177 = 0x3973
+0x9178 = 0x3B40
+0x9182 = 0x6E4E
+0x9187 = 0x3D66
+0x9189 = 0x6E4D
+0x918B = 0x6E4C
+0x918D = 0x4269
+0x9190 = 0x386F
+0x9192 = 0x4043
+0x9197 = 0x4830
+0x919C = 0x3D39
+0x91A2 = 0x6E4F
+0x91A4 = 0x3E5F
+0x91AA = 0x6E52
+0x91AB = 0x6E50
+0x91AF = 0x6E51
+0x91B4 = 0x6E54
+0x91B5 = 0x6E53
+0x91B8 = 0x3E7A
+0x91BA = 0x6E55
+0x91C0 = 0x6E56
+0x91C1 = 0x6E57
+0x91C6 = 0x4850
+0x91C7 = 0x3A53
+0x91C8 = 0x3C61
+0x91C9 = 0x6E58
+0x91CB = 0x6E59
+0x91CC = 0x4E24
+0x91CD = 0x3D45
+0x91CE = 0x4C6E
+0x91CF = 0x4E4C
+0x91D0 = 0x6E5A
+0x91D1 = 0x3662
+0x91D6 = 0x6E5B
+0x91D8 = 0x4523
+0x91DB = 0x6E5E
+0x91DC = 0x3378
+0x91DD = 0x3F4B
+0x91DF = 0x6E5C
+0x91E1 = 0x6E5D
+0x91E3 = 0x4460
+0x91E6 = 0x4B55
+0x91E7 = 0x367C
+0x91F5 = 0x6E60
+0x91F6 = 0x6E61
+0x91FC = 0x6E5F
+0x91FF = 0x6E63
+0x920D = 0x465F
+0x920E = 0x3343
+0x9211 = 0x6E67
+0x9214 = 0x6E64
+0x9215 = 0x6E66
+0x921E = 0x6E62
+0x9229 = 0x6F4F
+0x922C = 0x6E65
+0x9234 = 0x4E6B
+0x9237 = 0x385A
+0x923F = 0x6E6F
+0x9244 = 0x4534
+0x9245 = 0x6E6A
+0x9248 = 0x6E6D
+0x9249 = 0x6E6B
+0x924B = 0x6E70
+0x9250 = 0x6E71
+0x9257 = 0x6E69
+0x925A = 0x6E76
+0x925B = 0x3174
+0x925E = 0x6E68
+0x9262 = 0x482D
+0x9264 = 0x6E6C
+0x9266 = 0x3E60
+0x9271 = 0x395B
+0x927E = 0x4B48
+0x9280 = 0x3664
+0x9283 = 0x3D46
+0x9285 = 0x463C
+0x9291 = 0x412D
+0x9293 = 0x6E74
+0x9295 = 0x6E6E
+0x9296 = 0x6E73
+0x9298 = 0x4C43
+0x929A = 0x4438
+0x929B = 0x6E75
+0x929C = 0x6E72
+0x92AD = 0x412C
+0x92B7 = 0x6E79
+0x92B9 = 0x6E78
+0x92CF = 0x6E77
+0x92D2 = 0x4B2F
+0x92E4 = 0x3D7B
+0x92E9 = 0x6E7A
+0x92EA = 0x4A5F
+0x92ED = 0x3154
+0x92F2 = 0x4946
+0x92F3 = 0x4372
+0x92F8 = 0x3578
+0x92FA = 0x6E7C
+0x92FC = 0x395D
+0x9306 = 0x3B2C
+0x930F = 0x6E7B
+0x9310 = 0x3F6D
+0x9318 = 0x3F6E
+0x9319 = 0x6F21
+0x931A = 0x6F23
+0x9320 = 0x3E7B
+0x9322 = 0x6F22
+0x9323 = 0x6F24
+0x9326 = 0x3653
+0x9328 = 0x4945
+0x932B = 0x3C62
+0x932C = 0x4F23
+0x932E = 0x6E7E
+0x932F = 0x3A78
+0x9332 = 0x4F3F
+0x9335 = 0x6F26
+0x933A = 0x6F25
+0x933B = 0x6F27
+0x9344 = 0x6E7D
+0x934B = 0x4669
+0x934D = 0x4555
+0x9354 = 0x4457
+0x9356 = 0x6F2C
+0x935B = 0x4343
+0x935C = 0x6F28
+0x9360 = 0x6F29
+0x936C = 0x372D
+0x936E = 0x6F2B
+0x9375 = 0x3830
+0x937C = 0x6F2A
+0x937E = 0x3E61
+0x938C = 0x3379
+0x9394 = 0x6F30
+0x9396 = 0x3A3F
+0x9397 = 0x4179
+0x939A = 0x444A
+0x93A7 = 0x333B
+0x93AC = 0x6F2E
+0x93AD = 0x6F2F
+0x93AE = 0x4443
+0x93B0 = 0x6F2D
+0x93B9 = 0x6F31
+0x93C3 = 0x6F37
+0x93C8 = 0x6F3A
+0x93D0 = 0x6F39
+0x93D1 = 0x452D
+0x93D6 = 0x6F32
+0x93D7 = 0x6F33
+0x93D8 = 0x6F36
+0x93DD = 0x6F38
+0x93E1 = 0x3640
+0x93E4 = 0x6F3B
+0x93E5 = 0x6F35
+0x93E8 = 0x6F34
+0x9403 = 0x6F3F
+0x9407 = 0x6F40
+0x9410 = 0x6F41
+0x9413 = 0x6F3E
+0x9414 = 0x6F3D
+0x9418 = 0x3E62
+0x9419 = 0x462A
+0x941A = 0x6F3C
+0x9421 = 0x6F45
+0x942B = 0x6F43
+0x9435 = 0x6F44
+0x9436 = 0x6F42
+0x9438 = 0x4278
+0x943A = 0x6F46
+0x9441 = 0x6F47
+0x9444 = 0x6F49
+0x9451 = 0x3455
+0x9452 = 0x6F48
+0x9453 = 0x4C7A
+0x945A = 0x6F54
+0x945B = 0x6F4A
+0x945E = 0x6F4D
+0x9460 = 0x6F4B
+0x9462 = 0x6F4C
+0x946A = 0x6F4E
+0x9470 = 0x6F50
+0x9475 = 0x6F51
+0x9477 = 0x6F52
+0x947C = 0x6F55
+0x947D = 0x6F53
+0x947E = 0x6F56
+0x947F = 0x6F58
+0x9481 = 0x6F57
+0x9577 = 0x4439
+0x9580 = 0x4C67
+0x9582 = 0x6F59
+0x9583 = 0x412E
+0x9587 = 0x6F5A
+0x9589 = 0x4A44
+0x958A = 0x6F5B
+0x958B = 0x332B
+0x958F = 0x313C
+0x9591 = 0x3457
+0x9593 = 0x3456
+0x9594 = 0x6F5C
+0x9596 = 0x6F5D
+0x9598 = 0x6F5E
+0x9599 = 0x6F5F
+0x95A0 = 0x6F60
+0x95A2 = 0x3458
+0x95A3 = 0x3355
+0x95A4 = 0x395E
+0x95A5 = 0x4836
+0x95A7 = 0x6F62
+0x95A8 = 0x6F61
+0x95AD = 0x6F63
+0x95B2 = 0x315C
+0x95B9 = 0x6F66
+0x95BB = 0x6F65
+0x95BC = 0x6F64
+0x95BE = 0x6F67
+0x95C3 = 0x6F6A
+0x95C7 = 0x3047
+0x95CA = 0x6F68
+0x95CC = 0x6F6C
+0x95CD = 0x6F6B
+0x95D4 = 0x6F6E
+0x95D5 = 0x6F6D
+0x95D6 = 0x6F6F
+0x95D8 = 0x462E
+0x95DC = 0x6F70
+0x95E1 = 0x6F71
+0x95E2 = 0x6F73
+0x95E5 = 0x6F72
+0x961C = 0x496C
+0x9621 = 0x6F74
+0x9628 = 0x6F75
+0x962A = 0x3A65
+0x962E = 0x6F76
+0x962F = 0x6F77
+0x9632 = 0x4B49
+0x963B = 0x414B
+0x963F = 0x3024
+0x9640 = 0x424B
+0x9642 = 0x6F78
+0x9644 = 0x496D
+0x964B = 0x6F7B
+0x964C = 0x6F79
+0x964D = 0x395F
+0x964F = 0x6F7A
+0x9650 = 0x3842
+0x965B = 0x4A45
+0x965C = 0x6F7D
+0x965D = 0x7021
+0x965E = 0x6F7E
+0x965F = 0x7022
+0x9662 = 0x3121
+0x9663 = 0x3F58
+0x9664 = 0x3D7C
+0x9665 = 0x3459
+0x9666 = 0x7023
+0x966A = 0x4766
+0x966C = 0x7025
+0x9670 = 0x3122
+0x9672 = 0x7024
+0x9673 = 0x4444
+0x9675 = 0x4E4D
+0x9676 = 0x462B
+0x9677 = 0x6F7C
+0x9678 = 0x4E26
+0x967A = 0x3831
+0x967D = 0x4D5B
+0x9685 = 0x3679
+0x9686 = 0x4E34
+0x9688 = 0x3728
+0x968A = 0x4262
+0x968B = 0x6721
+0x968D = 0x7026
+0x968E = 0x332C
+0x968F = 0x3F6F
+0x9694 = 0x3356
+0x9695 = 0x7028
+0x9697 = 0x7029
+0x9698 = 0x7027
+0x9699 = 0x3764
+0x969B = 0x3A5D
+0x969C = 0x3E63
+0x96A0 = 0x3123
+0x96A3 = 0x4E59
+0x96A7 = 0x702B
+0x96A8 = 0x6E2E
+0x96AA = 0x702A
+0x96B0 = 0x702E
+0x96B1 = 0x702C
+0x96B2 = 0x702D
+0x96B4 = 0x702F
+0x96B6 = 0x7030
+0x96B7 = 0x4E6C
+0x96B8 = 0x7031
+0x96B9 = 0x7032
+0x96BB = 0x4049
+0x96BC = 0x483B
+0x96C0 = 0x3F7D
+0x96C1 = 0x3467
+0x96C4 = 0x4D3A
+0x96C5 = 0x326D
+0x96C6 = 0x3D38
+0x96C7 = 0x385B
+0x96C9 = 0x7035
+0x96CB = 0x7034
+0x96CC = 0x3B73
+0x96CD = 0x7036
+0x96CE = 0x7033
+0x96D1 = 0x3B28
+0x96D5 = 0x703A
+0x96D6 = 0x6A2D
+0x96D9 = 0x5256
+0x96DB = 0x3F77
+0x96DC = 0x7038
+0x96E2 = 0x4E25
+0x96E3 = 0x4671
+0x96E8 = 0x312B
+0x96EA = 0x4063
+0x96EB = 0x3C36
+0x96F0 = 0x4A37
+0x96F2 = 0x3140
+0x96F6 = 0x4E6D
+0x96F7 = 0x4D6B
+0x96F9 = 0x703B
+0x96FB = 0x4545
+0x9700 = 0x3C7B
+0x9704 = 0x703C
+0x9706 = 0x703D
+0x9707 = 0x3F4C
+0x9708 = 0x703E
+0x970A = 0x4E6E
+0x970D = 0x7039
+0x970E = 0x7040
+0x970F = 0x7042
+0x9711 = 0x7041
+0x9713 = 0x703F
+0x9716 = 0x7043
+0x9719 = 0x7044
+0x971C = 0x417A
+0x971E = 0x3262
+0x9724 = 0x7045
+0x9727 = 0x4C38
+0x972A = 0x7046
+0x9730 = 0x7047
+0x9732 = 0x4F2A
+0x9738 = 0x5B31
+0x9739 = 0x7048
+0x973D = 0x7049
+0x973E = 0x704A
+0x9742 = 0x704E
+0x9744 = 0x704B
+0x9746 = 0x704C
+0x9748 = 0x704D
+0x9749 = 0x704F
+0x9752 = 0x4044
+0x9756 = 0x4C77
+0x9759 = 0x4045
+0x975C = 0x7050
+0x975E = 0x4873
+0x9760 = 0x7051
+0x9761 = 0x7353
+0x9762 = 0x4C4C
+0x9764 = 0x7052
+0x9766 = 0x7053
+0x9768 = 0x7054
+0x9769 = 0x3357
+0x976B = 0x7056
+0x976D = 0x3F59
+0x9771 = 0x7057
+0x9774 = 0x3724
+0x9779 = 0x7058
+0x977A = 0x705C
+0x977C = 0x705A
+0x9781 = 0x705B
+0x9784 = 0x3373
+0x9785 = 0x7059
+0x9786 = 0x705D
+0x978B = 0x705E
+0x978D = 0x3048
+0x978F = 0x705F
+0x9790 = 0x7060
+0x9798 = 0x3E64
+0x979C = 0x7061
+0x97A0 = 0x3547
+0x97A3 = 0x7064
+0x97A6 = 0x7063
+0x97A8 = 0x7062
+0x97AB = 0x6B71
+0x97AD = 0x4A5C
+0x97B3 = 0x7065
+0x97B4 = 0x7066
+0x97C3 = 0x7067
+0x97C6 = 0x7068
+0x97C8 = 0x7069
+0x97CB = 0x706A
+0x97D3 = 0x345A
+0x97DC = 0x706B
+0x97ED = 0x706C
+0x97EE = 0x4723
+0x97F2 = 0x706E
+0x97F3 = 0x323B
+0x97F5 = 0x7071
+0x97F6 = 0x7070
+0x97FB = 0x3124
+0x97FF = 0x3641
+0x9801 = 0x4A47
+0x9802 = 0x443A
+0x9803 = 0x3A22
+0x9805 = 0x3960
+0x9806 = 0x3D67
+0x9808 = 0x3F5C
+0x980C = 0x7073
+0x980F = 0x7072
+0x9810 = 0x4D42
+0x9811 = 0x3468
+0x9812 = 0x4852
+0x9813 = 0x465C
+0x9817 = 0x3F7C
+0x9818 = 0x4E4E
+0x981A = 0x375B
+0x9821 = 0x7076
+0x9824 = 0x7075
+0x982C = 0x4B4B
+0x982D = 0x462C
+0x9834 = 0x3150
+0x9837 = 0x7077
+0x9838 = 0x7074
+0x983B = 0x4951
+0x983C = 0x4D6A
+0x983D = 0x7078
+0x9846 = 0x7079
+0x984B = 0x707B
+0x984C = 0x426A
+0x984D = 0x335B
+0x984E = 0x335C
+0x984F = 0x707A
+0x9854 = 0x3469
+0x9855 = 0x3832
+0x9858 = 0x346A
+0x985B = 0x453F
+0x985E = 0x4E60
+0x9867 = 0x385C
+0x986B = 0x707C
+0x986F = 0x707D
+0x9870 = 0x707E
+0x9871 = 0x7121
+0x9873 = 0x7123
+0x9874 = 0x7122
+0x98A8 = 0x4977
+0x98AA = 0x7124
+0x98AF = 0x7125
+0x98B1 = 0x7126
+0x98B6 = 0x7127
+0x98C3 = 0x7129
+0x98C4 = 0x7128
+0x98C6 = 0x712A
+0x98DB = 0x4874
+0x98DC = 0x664C
+0x98DF = 0x3F29
+0x98E2 = 0x3532
+0x98E9 = 0x712B
+0x98EB = 0x712C
+0x98ED = 0x522C
+0x98EE = 0x5D3B
+0x98EF = 0x4853
+0x98F2 = 0x307B
+0x98F4 = 0x303B
+0x98FC = 0x3B74
+0x98FD = 0x4B30
+0x98FE = 0x3E7E
+0x9903 = 0x712D
+0x9905 = 0x4C5F
+0x9909 = 0x712E
+0x990A = 0x4D5C
+0x990C = 0x3142
+0x9910 = 0x3B41
+0x9912 = 0x712F
+0x9913 = 0x326E
+0x9914 = 0x7130
+0x9918 = 0x7131
+0x991D = 0x7133
+0x991E = 0x7134
+0x9920 = 0x7136
+0x9921 = 0x7132
+0x9924 = 0x7135
+0x9928 = 0x345B
+0x992C = 0x7137
+0x992E = 0x7138
+0x993D = 0x7139
+0x993E = 0x713A
+0x9942 = 0x713B
+0x9945 = 0x713D
+0x9949 = 0x713C
+0x994B = 0x713F
+0x994C = 0x7142
+0x9950 = 0x713E
+0x9951 = 0x7140
+0x9952 = 0x7141
+0x9955 = 0x7143
+0x9957 = 0x3642
+0x9996 = 0x3C73
+0x9997 = 0x7144
+0x9998 = 0x7145
+0x9999 = 0x3961
+0x99A5 = 0x7146
+0x99A8 = 0x333E
+0x99AC = 0x474F
+0x99AD = 0x7147
+0x99AE = 0x7148
+0x99B3 = 0x435A
+0x99B4 = 0x466B
+0x99BC = 0x7149
+0x99C1 = 0x477D
+0x99C4 = 0x424C
+0x99C5 = 0x3158
+0x99C6 = 0x366E
+0x99C8 = 0x366F
+0x99D0 = 0x4373
+0x99D1 = 0x714E
+0x99D2 = 0x3670
+0x99D5 = 0x326F
+0x99D8 = 0x714D
+0x99DB = 0x714B
+0x99DD = 0x714C
+0x99DF = 0x714A
+0x99E2 = 0x7158
+0x99ED = 0x714F
+0x99EE = 0x7150
+0x99F1 = 0x7151
+0x99F2 = 0x7152
+0x99F8 = 0x7154
+0x99FB = 0x7153
+0x99FF = 0x3D59
+0x9A01 = 0x7155
+0x9A05 = 0x7157
+0x9A0E = 0x3533
+0x9A0F = 0x7156
+0x9A12 = 0x417B
+0x9A13 = 0x3833
+0x9A19 = 0x7159
+0x9A28 = 0x424D
+0x9A2B = 0x715A
+0x9A30 = 0x462D
+0x9A37 = 0x715B
+0x9A3E = 0x7160
+0x9A40 = 0x715E
+0x9A42 = 0x715D
+0x9A43 = 0x715F
+0x9A45 = 0x715C
+0x9A4D = 0x7162
+0x9A55 = 0x7161
+0x9A57 = 0x7164
+0x9A5A = 0x3643
+0x9A5B = 0x7163
+0x9A5F = 0x7165
+0x9A62 = 0x7166
+0x9A64 = 0x7168
+0x9A65 = 0x7167
+0x9A69 = 0x7169
+0x9A6A = 0x716B
+0x9A6B = 0x716A
+0x9AA8 = 0x397C
+0x9AAD = 0x716C
+0x9AB0 = 0x716D
+0x9AB8 = 0x333C
+0x9ABC = 0x716E
+0x9AC0 = 0x716F
+0x9AC4 = 0x3F71
+0x9ACF = 0x7170
+0x9AD1 = 0x7171
+0x9AD3 = 0x7172
+0x9AD4 = 0x7173
+0x9AD8 = 0x3962
+0x9ADE = 0x7174
+0x9ADF = 0x7175
+0x9AE2 = 0x7176
+0x9AE3 = 0x7177
+0x9AE6 = 0x7178
+0x9AEA = 0x4831
+0x9AEB = 0x717A
+0x9AED = 0x4926
+0x9AEE = 0x717B
+0x9AEF = 0x7179
+0x9AF1 = 0x717D
+0x9AF4 = 0x717C
+0x9AF7 = 0x717E
+0x9AFB = 0x7221
+0x9B06 = 0x7222
+0x9B18 = 0x7223
+0x9B1A = 0x7224
+0x9B1F = 0x7225
+0x9B22 = 0x7226
+0x9B23 = 0x7227
+0x9B25 = 0x7228
+0x9B27 = 0x7229
+0x9B28 = 0x722A
+0x9B29 = 0x722B
+0x9B2A = 0x722C
+0x9B2E = 0x722D
+0x9B2F = 0x722E
+0x9B31 = 0x5D35
+0x9B32 = 0x722F
+0x9B3B = 0x6478
+0x9B3C = 0x3534
+0x9B41 = 0x3321
+0x9B42 = 0x3A32
+0x9B43 = 0x7231
+0x9B44 = 0x7230
+0x9B45 = 0x4C25
+0x9B4D = 0x7233
+0x9B4E = 0x7234
+0x9B4F = 0x7232
+0x9B51 = 0x7235
+0x9B54 = 0x4B62
+0x9B58 = 0x7236
+0x9B5A = 0x357B
+0x9B6F = 0x4F25
+0x9B74 = 0x7237
+0x9B83 = 0x7239
+0x9B8E = 0x303E
+0x9B91 = 0x723A
+0x9B92 = 0x4A2B
+0x9B93 = 0x7238
+0x9B96 = 0x723B
+0x9B97 = 0x723C
+0x9B9F = 0x723D
+0x9BA0 = 0x723E
+0x9BA8 = 0x723F
+0x9BAA = 0x4B6E
+0x9BAB = 0x3B2D
+0x9BAD = 0x3A7A
+0x9BAE = 0x412F
+0x9BB4 = 0x7240
+0x9BB9 = 0x7243
+0x9BC0 = 0x7241
+0x9BC6 = 0x7244
+0x9BC9 = 0x3871
+0x9BCA = 0x7242
+0x9BCF = 0x7245
+0x9BD1 = 0x7246
+0x9BD2 = 0x7247
+0x9BD4 = 0x724B
+0x9BD6 = 0x3B2A
+0x9BDB = 0x4264
+0x9BE1 = 0x724C
+0x9BE2 = 0x7249
+0x9BE3 = 0x7248
+0x9BE4 = 0x724A
+0x9BE8 = 0x375F
+0x9BF0 = 0x7250
+0x9BF1 = 0x724F
+0x9BF2 = 0x724E
+0x9BF5 = 0x3033
+0x9C04 = 0x725A
+0x9C06 = 0x7256
+0x9C08 = 0x7257
+0x9C09 = 0x7253
+0x9C0A = 0x7259
+0x9C0C = 0x7255
+0x9C0D = 0x3362
+0x9C10 = 0x4F4C
+0x9C12 = 0x7258
+0x9C13 = 0x7254
+0x9C14 = 0x7252
+0x9C15 = 0x7251
+0x9C1B = 0x725C
+0x9C21 = 0x725F
+0x9C24 = 0x725E
+0x9C25 = 0x725D
+0x9C2D = 0x4949
+0x9C2E = 0x725B
+0x9C2F = 0x3073
+0x9C30 = 0x7260
+0x9C32 = 0x7262
+0x9C39 = 0x336F
+0x9C3A = 0x724D
+0x9C3B = 0x3137
+0x9C3E = 0x7264
+0x9C46 = 0x7263
+0x9C47 = 0x7261
+0x9C48 = 0x432D
+0x9C52 = 0x4B70
+0x9C57 = 0x4E5A
+0x9C5A = 0x7265
+0x9C60 = 0x7266
+0x9C67 = 0x7267
+0x9C76 = 0x7268
+0x9C78 = 0x7269
+0x9CE5 = 0x443B
+0x9CE7 = 0x726A
+0x9CE9 = 0x4837
+0x9CEB = 0x726F
+0x9CEC = 0x726B
+0x9CF0 = 0x726C
+0x9CF3 = 0x4B31
+0x9CF4 = 0x4C44
+0x9CF6 = 0x4650
+0x9D03 = 0x7270
+0x9D06 = 0x7271
+0x9D07 = 0x463E
+0x9D08 = 0x726E
+0x9D09 = 0x726D
+0x9D0E = 0x322A
+0x9D12 = 0x7279
+0x9D15 = 0x7278
+0x9D1B = 0x3175
+0x9D1F = 0x7276
+0x9D23 = 0x7275
+0x9D26 = 0x7273
+0x9D28 = 0x337B
+0x9D2A = 0x7272
+0x9D2B = 0x3C32
+0x9D2C = 0x3229
+0x9D3B = 0x3963
+0x9D3E = 0x727C
+0x9D3F = 0x727B
+0x9D41 = 0x727A
+0x9D44 = 0x7277
+0x9D46 = 0x727D
+0x9D48 = 0x727E
+0x9D50 = 0x7325
+0x9D51 = 0x7324
+0x9D59 = 0x7326
+0x9D5C = 0x312D
+0x9D5D = 0x7321
+0x9D5E = 0x7322
+0x9D60 = 0x3974
+0x9D61 = 0x4C39
+0x9D64 = 0x7323
+0x9D6C = 0x4B32
+0x9D6F = 0x732B
+0x9D72 = 0x7327
+0x9D7A = 0x732C
+0x9D87 = 0x7329
+0x9D89 = 0x7328
+0x9D8F = 0x375C
+0x9D9A = 0x732D
+0x9DA4 = 0x732E
+0x9DA9 = 0x732F
+0x9DAB = 0x732A
+0x9DAF = 0x7274
+0x9DB2 = 0x7330
+0x9DB4 = 0x4461
+0x9DB8 = 0x7334
+0x9DBA = 0x7335
+0x9DBB = 0x7333
+0x9DC1 = 0x7332
+0x9DC2 = 0x7338
+0x9DC4 = 0x7331
+0x9DC6 = 0x7336
+0x9DCF = 0x7337
+0x9DD3 = 0x733A
+0x9DD9 = 0x7339
+0x9DE6 = 0x733C
+0x9DED = 0x733D
+0x9DEF = 0x733E
+0x9DF2 = 0x4F49
+0x9DF8 = 0x733B
+0x9DF9 = 0x426B
+0x9DFA = 0x3A6D
+0x9DFD = 0x733F
+0x9E1A = 0x7340
+0x9E1B = 0x7341
+0x9E1E = 0x7342
+0x9E75 = 0x7343
+0x9E78 = 0x3834
+0x9E79 = 0x7344
+0x9E7D = 0x7345
+0x9E7F = 0x3C2F
+0x9E81 = 0x7346
+0x9E88 = 0x7347
+0x9E8B = 0x7348
+0x9E8C = 0x7349
+0x9E91 = 0x734C
+0x9E92 = 0x734A
+0x9E93 = 0x4F3C
+0x9E95 = 0x734B
+0x9E97 = 0x4E6F
+0x9E9D = 0x734D
+0x9E9F = 0x4E5B
+0x9EA5 = 0x734E
+0x9EA6 = 0x477E
+0x9EA9 = 0x734F
+0x9EAA = 0x7351
+0x9EAD = 0x7352
+0x9EB8 = 0x7350
+0x9EB9 = 0x396D
+0x9EBA = 0x4C4D
+0x9EBB = 0x4B63
+0x9EBC = 0x5677
+0x9EBE = 0x5D60
+0x9EBF = 0x4B7B
+0x9EC4 = 0x322B
+0x9ECC = 0x7354
+0x9ECD = 0x3550
+0x9ECE = 0x7355
+0x9ECF = 0x7356
+0x9ED0 = 0x7357
+0x9ED2 = 0x3975
+0x9ED4 = 0x7358
+0x9ED8 = 0x6054
+0x9ED9 = 0x4C5B
+0x9EDB = 0x4263
+0x9EDC = 0x7359
+0x9EDD = 0x735B
+0x9EDE = 0x735A
+0x9EE0 = 0x735C
+0x9EE5 = 0x735D
+0x9EE8 = 0x735E
+0x9EEF = 0x735F
+0x9EF4 = 0x7360
+0x9EF6 = 0x7361
+0x9EF7 = 0x7362
+0x9EF9 = 0x7363
+0x9EFB = 0x7364
+0x9EFC = 0x7365
+0x9EFD = 0x7366
+0x9F07 = 0x7367
+0x9F08 = 0x7368
+0x9F0E = 0x4524
+0x9F13 = 0x385D
+0x9F15 = 0x736A
+0x9F20 = 0x414D
+0x9F21 = 0x736B
+0x9F2C = 0x736C
+0x9F3B = 0x4921
+0x9F3E = 0x736D
+0x9F4A = 0x736E
+0x9F4B = 0x6337
+0x9F4E = 0x6C5A
+0x9F4F = 0x706D
+0x9F52 = 0x736F
+0x9F54 = 0x7370
+0x9F5F = 0x7372
+0x9F60 = 0x7373
+0x9F61 = 0x7374
+0x9F62 = 0x4E70
+0x9F63 = 0x7371
+0x9F66 = 0x7375
+0x9F67 = 0x7376
+0x9F6A = 0x7378
+0x9F6C = 0x7377
+0x9F72 = 0x737A
+0x9F76 = 0x737B
+0x9F77 = 0x7379
+0x9F8D = 0x4E36
+0x9F95 = 0x737C
+0x9F9C = 0x737D
+0x9F9D = 0x6354
+0x9FA0 = 0x737E
+0xFF01 = 0x212A
+0xFF03 = 0x2174
+0xFF04 = 0x2170
+0xFF05 = 0x2173
+0xFF06 = 0x2175
+0xFF08 = 0x214A
+0xFF09 = 0x214B
+0xFF0A = 0x2176
+0xFF0B = 0x215C
+0xFF0C = 0x2124
+0xFF0D = 0x215D
+0xFF0E = 0x2125
+0xFF0F = 0x213F
+0xFF10 = 0x2330
+0xFF11 = 0x2331
+0xFF12 = 0x2332
+0xFF13 = 0x2333
+0xFF14 = 0x2334
+0xFF15 = 0x2335
+0xFF16 = 0x2336
+0xFF17 = 0x2337
+0xFF18 = 0x2338
+0xFF19 = 0x2339
+0xFF1A = 0x2127
+0xFF1B = 0x2128
+0xFF1C = 0x2163
+0xFF1D = 0x2161
+0xFF1E = 0x2164
+0xFF1F = 0x2129
+0xFF20 = 0x2177
+0xFF21 = 0x2341
+0xFF22 = 0x2342
+0xFF23 = 0x2343
+0xFF24 = 0x2344
+0xFF25 = 0x2345
+0xFF26 = 0x2346
+0xFF27 = 0x2347
+0xFF28 = 0x2348
+0xFF29 = 0x2349
+0xFF2A = 0x234A
+0xFF2B = 0x234B
+0xFF2C = 0x234C
+0xFF2D = 0x234D
+0xFF2E = 0x234E
+0xFF2F = 0x234F
+0xFF30 = 0x2350
+0xFF31 = 0x2351
+0xFF32 = 0x2352
+0xFF33 = 0x2353
+0xFF34 = 0x2354
+0xFF35 = 0x2355
+0xFF36 = 0x2356
+0xFF37 = 0x2357
+0xFF38 = 0x2358
+0xFF39 = 0x2359
+0xFF3A = 0x235A
+0xFF3B = 0x214E
+0xFF3C = 0x2140
+0xFF3D = 0x214F
+0xFF3E = 0x2130
+0xFF3F = 0x2132
+0xFF40 = 0x212E
+0xFF41 = 0x2361
+0xFF42 = 0x2362
+0xFF43 = 0x2363
+0xFF44 = 0x2364
+0xFF45 = 0x2365
+0xFF46 = 0x2366
+0xFF47 = 0x2367
+0xFF48 = 0x2368
+0xFF49 = 0x2369
+0xFF4A = 0x236A
+0xFF4B = 0x236B
+0xFF4C = 0x236C
+0xFF4D = 0x236D
+0xFF4E = 0x236E
+0xFF4F = 0x236F
+0xFF50 = 0x2370
+0xFF51 = 0x2371
+0xFF52 = 0x2372
+0xFF53 = 0x2373
+0xFF54 = 0x2374
+0xFF55 = 0x2375
+0xFF56 = 0x2376
+0xFF57 = 0x2377
+0xFF58 = 0x2378
+0xFF59 = 0x2379
+0xFF5A = 0x237A
+0xFF5B = 0x2150
+0xFF5C = 0x2143
+0xFF5D = 0x2151
+0xFF5E = 0x2141
+0xFFE0 = 0x2171
+0xFFE1 = 0x2172
+0xFFE2 = 0x224C
+0xFFE3 = 0x2131
+0xFFE5 = 0x216F
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208UDC.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208UDC.src
new file mode 100644
index 0000000..0604f6e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208UDC.src
@@ -0,0 +1,955 @@
+# $NetBSD: UCS%JISX0208UDC.src,v 1.1 2003/07/19 20:20:42 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0208UDC"
+SRC_ZONE	0xE000 - 0xE3AB
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0xE000 - 0xE3AB		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0xE000 = 0x7521
+0xE001 = 0x7522
+0xE002 = 0x7523
+0xE003 = 0x7524
+0xE004 = 0x7525
+0xE005 = 0x7526
+0xE006 = 0x7527
+0xE007 = 0x7528
+0xE008 = 0x7529
+0xE009 = 0x752A
+0xE00A = 0x752B
+0xE00B = 0x752C
+0xE00C = 0x752D
+0xE00D = 0x752E
+0xE00E = 0x752F
+0xE00F = 0x7530
+0xE010 = 0x7531
+0xE011 = 0x7532
+0xE012 = 0x7533
+0xE013 = 0x7534
+0xE014 = 0x7535
+0xE015 = 0x7536
+0xE016 = 0x7537
+0xE017 = 0x7538
+0xE018 = 0x7539
+0xE019 = 0x753A
+0xE01A = 0x753B
+0xE01B = 0x753C
+0xE01C = 0x753D
+0xE01D = 0x753E
+0xE01E = 0x753F
+0xE01F = 0x7540
+0xE020 = 0x7541
+0xE021 = 0x7542
+0xE022 = 0x7543
+0xE023 = 0x7544
+0xE024 = 0x7545
+0xE025 = 0x7546
+0xE026 = 0x7547
+0xE027 = 0x7548
+0xE028 = 0x7549
+0xE029 = 0x754A
+0xE02A = 0x754B
+0xE02B = 0x754C
+0xE02C = 0x754D
+0xE02D = 0x754E
+0xE02E = 0x754F
+0xE02F = 0x7550
+0xE030 = 0x7551
+0xE031 = 0x7552
+0xE032 = 0x7553
+0xE033 = 0x7554
+0xE034 = 0x7555
+0xE035 = 0x7556
+0xE036 = 0x7557
+0xE037 = 0x7558
+0xE038 = 0x7559
+0xE039 = 0x755A
+0xE03A = 0x755B
+0xE03B = 0x755C
+0xE03C = 0x755D
+0xE03D = 0x755E
+0xE03E = 0x755F
+0xE03F = 0x7560
+0xE040 = 0x7561
+0xE041 = 0x7562
+0xE042 = 0x7563
+0xE043 = 0x7564
+0xE044 = 0x7565
+0xE045 = 0x7566
+0xE046 = 0x7567
+0xE047 = 0x7568
+0xE048 = 0x7569
+0xE049 = 0x756A
+0xE04A = 0x756B
+0xE04B = 0x756C
+0xE04C = 0x756D
+0xE04D = 0x756E
+0xE04E = 0x756F
+0xE04F = 0x7570
+0xE050 = 0x7571
+0xE051 = 0x7572
+0xE052 = 0x7573
+0xE053 = 0x7574
+0xE054 = 0x7575
+0xE055 = 0x7576
+0xE056 = 0x7577
+0xE057 = 0x7578
+0xE058 = 0x7579
+0xE059 = 0x757A
+0xE05A = 0x757B
+0xE05B = 0x757C
+0xE05C = 0x757D
+0xE05D = 0x757E
+0xE05E = 0x7621
+0xE05F = 0x7622
+0xE060 = 0x7623
+0xE061 = 0x7624
+0xE062 = 0x7625
+0xE063 = 0x7626
+0xE064 = 0x7627
+0xE065 = 0x7628
+0xE066 = 0x7629
+0xE067 = 0x762A
+0xE068 = 0x762B
+0xE069 = 0x762C
+0xE06A = 0x762D
+0xE06B = 0x762E
+0xE06C = 0x762F
+0xE06D = 0x7630
+0xE06E = 0x7631
+0xE06F = 0x7632
+0xE070 = 0x7633
+0xE071 = 0x7634
+0xE072 = 0x7635
+0xE073 = 0x7636
+0xE074 = 0x7637
+0xE075 = 0x7638
+0xE076 = 0x7639
+0xE077 = 0x763A
+0xE078 = 0x763B
+0xE079 = 0x763C
+0xE07A = 0x763D
+0xE07B = 0x763E
+0xE07C = 0x763F
+0xE07D = 0x7640
+0xE07E = 0x7641
+0xE07F = 0x7642
+0xE080 = 0x7643
+0xE081 = 0x7644
+0xE082 = 0x7645
+0xE083 = 0x7646
+0xE084 = 0x7647
+0xE085 = 0x7648
+0xE086 = 0x7649
+0xE087 = 0x764A
+0xE088 = 0x764B
+0xE089 = 0x764C
+0xE08A = 0x764D
+0xE08B = 0x764E
+0xE08C = 0x764F
+0xE08D = 0x7650
+0xE08E = 0x7651
+0xE08F = 0x7652
+0xE090 = 0x7653
+0xE091 = 0x7654
+0xE092 = 0x7655
+0xE093 = 0x7656
+0xE094 = 0x7657
+0xE095 = 0x7658
+0xE096 = 0x7659
+0xE097 = 0x765A
+0xE098 = 0x765B
+0xE099 = 0x765C
+0xE09A = 0x765D
+0xE09B = 0x765E
+0xE09C = 0x765F
+0xE09D = 0x7660
+0xE09E = 0x7661
+0xE09F = 0x7662
+0xE0A0 = 0x7663
+0xE0A1 = 0x7664
+0xE0A2 = 0x7665
+0xE0A3 = 0x7666
+0xE0A4 = 0x7667
+0xE0A5 = 0x7668
+0xE0A6 = 0x7669
+0xE0A7 = 0x766A
+0xE0A8 = 0x766B
+0xE0A9 = 0x766C
+0xE0AA = 0x766D
+0xE0AB = 0x766E
+0xE0AC = 0x766F
+0xE0AD = 0x7670
+0xE0AE = 0x7671
+0xE0AF = 0x7672
+0xE0B0 = 0x7673
+0xE0B1 = 0x7674
+0xE0B2 = 0x7675
+0xE0B3 = 0x7676
+0xE0B4 = 0x7677
+0xE0B5 = 0x7678
+0xE0B6 = 0x7679
+0xE0B7 = 0x767A
+0xE0B8 = 0x767B
+0xE0B9 = 0x767C
+0xE0BA = 0x767D
+0xE0BB = 0x767E
+0xE0BC = 0x7721
+0xE0BD = 0x7722
+0xE0BE = 0x7723
+0xE0BF = 0x7724
+0xE0C0 = 0x7725
+0xE0C1 = 0x7726
+0xE0C2 = 0x7727
+0xE0C3 = 0x7728
+0xE0C4 = 0x7729
+0xE0C5 = 0x772A
+0xE0C6 = 0x772B
+0xE0C7 = 0x772C
+0xE0C8 = 0x772D
+0xE0C9 = 0x772E
+0xE0CA = 0x772F
+0xE0CB = 0x7730
+0xE0CC = 0x7731
+0xE0CD = 0x7732
+0xE0CE = 0x7733
+0xE0CF = 0x7734
+0xE0D0 = 0x7735
+0xE0D1 = 0x7736
+0xE0D2 = 0x7737
+0xE0D3 = 0x7738
+0xE0D4 = 0x7739
+0xE0D5 = 0x773A
+0xE0D6 = 0x773B
+0xE0D7 = 0x773C
+0xE0D8 = 0x773D
+0xE0D9 = 0x773E
+0xE0DA = 0x773F
+0xE0DB = 0x7740
+0xE0DC = 0x7741
+0xE0DD = 0x7742
+0xE0DE = 0x7743
+0xE0DF = 0x7744
+0xE0E0 = 0x7745
+0xE0E1 = 0x7746
+0xE0E2 = 0x7747
+0xE0E3 = 0x7748
+0xE0E4 = 0x7749
+0xE0E5 = 0x774A
+0xE0E6 = 0x774B
+0xE0E7 = 0x774C
+0xE0E8 = 0x774D
+0xE0E9 = 0x774E
+0xE0EA = 0x774F
+0xE0EB = 0x7750
+0xE0EC = 0x7751
+0xE0ED = 0x7752
+0xE0EE = 0x7753
+0xE0EF = 0x7754
+0xE0F0 = 0x7755
+0xE0F1 = 0x7756
+0xE0F2 = 0x7757
+0xE0F3 = 0x7758
+0xE0F4 = 0x7759
+0xE0F5 = 0x775A
+0xE0F6 = 0x775B
+0xE0F7 = 0x775C
+0xE0F8 = 0x775D
+0xE0F9 = 0x775E
+0xE0FA = 0x775F
+0xE0FB = 0x7760
+0xE0FC = 0x7761
+0xE0FD = 0x7762
+0xE0FE = 0x7763
+0xE0FF = 0x7764
+0xE100 = 0x7765
+0xE101 = 0x7766
+0xE102 = 0x7767
+0xE103 = 0x7768
+0xE104 = 0x7769
+0xE105 = 0x776A
+0xE106 = 0x776B
+0xE107 = 0x776C
+0xE108 = 0x776D
+0xE109 = 0x776E
+0xE10A = 0x776F
+0xE10B = 0x7770
+0xE10C = 0x7771
+0xE10D = 0x7772
+0xE10E = 0x7773
+0xE10F = 0x7774
+0xE110 = 0x7775
+0xE111 = 0x7776
+0xE112 = 0x7777
+0xE113 = 0x7778
+0xE114 = 0x7779
+0xE115 = 0x777A
+0xE116 = 0x777B
+0xE117 = 0x777C
+0xE118 = 0x777D
+0xE119 = 0x777E
+0xE11A = 0x7821
+0xE11B = 0x7822
+0xE11C = 0x7823
+0xE11D = 0x7824
+0xE11E = 0x7825
+0xE11F = 0x7826
+0xE120 = 0x7827
+0xE121 = 0x7828
+0xE122 = 0x7829
+0xE123 = 0x782A
+0xE124 = 0x782B
+0xE125 = 0x782C
+0xE126 = 0x782D
+0xE127 = 0x782E
+0xE128 = 0x782F
+0xE129 = 0x7830
+0xE12A = 0x7831
+0xE12B = 0x7832
+0xE12C = 0x7833
+0xE12D = 0x7834
+0xE12E = 0x7835
+0xE12F = 0x7836
+0xE130 = 0x7837
+0xE131 = 0x7838
+0xE132 = 0x7839
+0xE133 = 0x783A
+0xE134 = 0x783B
+0xE135 = 0x783C
+0xE136 = 0x783D
+0xE137 = 0x783E
+0xE138 = 0x783F
+0xE139 = 0x7840
+0xE13A = 0x7841
+0xE13B = 0x7842
+0xE13C = 0x7843
+0xE13D = 0x7844
+0xE13E = 0x7845
+0xE13F = 0x7846
+0xE140 = 0x7847
+0xE141 = 0x7848
+0xE142 = 0x7849
+0xE143 = 0x784A
+0xE144 = 0x784B
+0xE145 = 0x784C
+0xE146 = 0x784D
+0xE147 = 0x784E
+0xE148 = 0x784F
+0xE149 = 0x7850
+0xE14A = 0x7851
+0xE14B = 0x7852
+0xE14C = 0x7853
+0xE14D = 0x7854
+0xE14E = 0x7855
+0xE14F = 0x7856
+0xE150 = 0x7857
+0xE151 = 0x7858
+0xE152 = 0x7859
+0xE153 = 0x785A
+0xE154 = 0x785B
+0xE155 = 0x785C
+0xE156 = 0x785D
+0xE157 = 0x785E
+0xE158 = 0x785F
+0xE159 = 0x7860
+0xE15A = 0x7861
+0xE15B = 0x7862
+0xE15C = 0x7863
+0xE15D = 0x7864
+0xE15E = 0x7865
+0xE15F = 0x7866
+0xE160 = 0x7867
+0xE161 = 0x7868
+0xE162 = 0x7869
+0xE163 = 0x786A
+0xE164 = 0x786B
+0xE165 = 0x786C
+0xE166 = 0x786D
+0xE167 = 0x786E
+0xE168 = 0x786F
+0xE169 = 0x7870
+0xE16A = 0x7871
+0xE16B = 0x7872
+0xE16C = 0x7873
+0xE16D = 0x7874
+0xE16E = 0x7875
+0xE16F = 0x7876
+0xE170 = 0x7877
+0xE171 = 0x7878
+0xE172 = 0x7879
+0xE173 = 0x787A
+0xE174 = 0x787B
+0xE175 = 0x787C
+0xE176 = 0x787D
+0xE177 = 0x787E
+0xE178 = 0x7921
+0xE179 = 0x7922
+0xE17A = 0x7923
+0xE17B = 0x7924
+0xE17C = 0x7925
+0xE17D = 0x7926
+0xE17E = 0x7927
+0xE17F = 0x7928
+0xE180 = 0x7929
+0xE181 = 0x792A
+0xE182 = 0x792B
+0xE183 = 0x792C
+0xE184 = 0x792D
+0xE185 = 0x792E
+0xE186 = 0x792F
+0xE187 = 0x7930
+0xE188 = 0x7931
+0xE189 = 0x7932
+0xE18A = 0x7933
+0xE18B = 0x7934
+0xE18C = 0x7935
+0xE18D = 0x7936
+0xE18E = 0x7937
+0xE18F = 0x7938
+0xE190 = 0x7939
+0xE191 = 0x793A
+0xE192 = 0x793B
+0xE193 = 0x793C
+0xE194 = 0x793D
+0xE195 = 0x793E
+0xE196 = 0x793F
+0xE197 = 0x7940
+0xE198 = 0x7941
+0xE199 = 0x7942
+0xE19A = 0x7943
+0xE19B = 0x7944
+0xE19C = 0x7945
+0xE19D = 0x7946
+0xE19E = 0x7947
+0xE19F = 0x7948
+0xE1A0 = 0x7949
+0xE1A1 = 0x794A
+0xE1A2 = 0x794B
+0xE1A3 = 0x794C
+0xE1A4 = 0x794D
+0xE1A5 = 0x794E
+0xE1A6 = 0x794F
+0xE1A7 = 0x7950
+0xE1A8 = 0x7951
+0xE1A9 = 0x7952
+0xE1AA = 0x7953
+0xE1AB = 0x7954
+0xE1AC = 0x7955
+0xE1AD = 0x7956
+0xE1AE = 0x7957
+0xE1AF = 0x7958
+0xE1B0 = 0x7959
+0xE1B1 = 0x795A
+0xE1B2 = 0x795B
+0xE1B3 = 0x795C
+0xE1B4 = 0x795D
+0xE1B5 = 0x795E
+0xE1B6 = 0x795F
+0xE1B7 = 0x7960
+0xE1B8 = 0x7961
+0xE1B9 = 0x7962
+0xE1BA = 0x7963
+0xE1BB = 0x7964
+0xE1BC = 0x7965
+0xE1BD = 0x7966
+0xE1BE = 0x7967
+0xE1BF = 0x7968
+0xE1C0 = 0x7969
+0xE1C1 = 0x796A
+0xE1C2 = 0x796B
+0xE1C3 = 0x796C
+0xE1C4 = 0x796D
+0xE1C5 = 0x796E
+0xE1C6 = 0x796F
+0xE1C7 = 0x7970
+0xE1C8 = 0x7971
+0xE1C9 = 0x7972
+0xE1CA = 0x7973
+0xE1CB = 0x7974
+0xE1CC = 0x7975
+0xE1CD = 0x7976
+0xE1CE = 0x7977
+0xE1CF = 0x7978
+0xE1D0 = 0x7979
+0xE1D1 = 0x797A
+0xE1D2 = 0x797B
+0xE1D3 = 0x797C
+0xE1D4 = 0x797D
+0xE1D5 = 0x797E
+0xE1D6 = 0x7A21
+0xE1D7 = 0x7A22
+0xE1D8 = 0x7A23
+0xE1D9 = 0x7A24
+0xE1DA = 0x7A25
+0xE1DB = 0x7A26
+0xE1DC = 0x7A27
+0xE1DD = 0x7A28
+0xE1DE = 0x7A29
+0xE1DF = 0x7A2A
+0xE1E0 = 0x7A2B
+0xE1E1 = 0x7A2C
+0xE1E2 = 0x7A2D
+0xE1E3 = 0x7A2E
+0xE1E4 = 0x7A2F
+0xE1E5 = 0x7A30
+0xE1E6 = 0x7A31
+0xE1E7 = 0x7A32
+0xE1E8 = 0x7A33
+0xE1E9 = 0x7A34
+0xE1EA = 0x7A35
+0xE1EB = 0x7A36
+0xE1EC = 0x7A37
+0xE1ED = 0x7A38
+0xE1EE = 0x7A39
+0xE1EF = 0x7A3A
+0xE1F0 = 0x7A3B
+0xE1F1 = 0x7A3C
+0xE1F2 = 0x7A3D
+0xE1F3 = 0x7A3E
+0xE1F4 = 0x7A3F
+0xE1F5 = 0x7A40
+0xE1F6 = 0x7A41
+0xE1F7 = 0x7A42
+0xE1F8 = 0x7A43
+0xE1F9 = 0x7A44
+0xE1FA = 0x7A45
+0xE1FB = 0x7A46
+0xE1FC = 0x7A47
+0xE1FD = 0x7A48
+0xE1FE = 0x7A49
+0xE1FF = 0x7A4A
+0xE200 = 0x7A4B
+0xE201 = 0x7A4C
+0xE202 = 0x7A4D
+0xE203 = 0x7A4E
+0xE204 = 0x7A4F
+0xE205 = 0x7A50
+0xE206 = 0x7A51
+0xE207 = 0x7A52
+0xE208 = 0x7A53
+0xE209 = 0x7A54
+0xE20A = 0x7A55
+0xE20B = 0x7A56
+0xE20C = 0x7A57
+0xE20D = 0x7A58
+0xE20E = 0x7A59
+0xE20F = 0x7A5A
+0xE210 = 0x7A5B
+0xE211 = 0x7A5C
+0xE212 = 0x7A5D
+0xE213 = 0x7A5E
+0xE214 = 0x7A5F
+0xE215 = 0x7A60
+0xE216 = 0x7A61
+0xE217 = 0x7A62
+0xE218 = 0x7A63
+0xE219 = 0x7A64
+0xE21A = 0x7A65
+0xE21B = 0x7A66
+0xE21C = 0x7A67
+0xE21D = 0x7A68
+0xE21E = 0x7A69
+0xE21F = 0x7A6A
+0xE220 = 0x7A6B
+0xE221 = 0x7A6C
+0xE222 = 0x7A6D
+0xE223 = 0x7A6E
+0xE224 = 0x7A6F
+0xE225 = 0x7A70
+0xE226 = 0x7A71
+0xE227 = 0x7A72
+0xE228 = 0x7A73
+0xE229 = 0x7A74
+0xE22A = 0x7A75
+0xE22B = 0x7A76
+0xE22C = 0x7A77
+0xE22D = 0x7A78
+0xE22E = 0x7A79
+0xE22F = 0x7A7A
+0xE230 = 0x7A7B
+0xE231 = 0x7A7C
+0xE232 = 0x7A7D
+0xE233 = 0x7A7E
+0xE234 = 0x7B21
+0xE235 = 0x7B22
+0xE236 = 0x7B23
+0xE237 = 0x7B24
+0xE238 = 0x7B25
+0xE239 = 0x7B26
+0xE23A = 0x7B27
+0xE23B = 0x7B28
+0xE23C = 0x7B29
+0xE23D = 0x7B2A
+0xE23E = 0x7B2B
+0xE23F = 0x7B2C
+0xE240 = 0x7B2D
+0xE241 = 0x7B2E
+0xE242 = 0x7B2F
+0xE243 = 0x7B30
+0xE244 = 0x7B31
+0xE245 = 0x7B32
+0xE246 = 0x7B33
+0xE247 = 0x7B34
+0xE248 = 0x7B35
+0xE249 = 0x7B36
+0xE24A = 0x7B37
+0xE24B = 0x7B38
+0xE24C = 0x7B39
+0xE24D = 0x7B3A
+0xE24E = 0x7B3B
+0xE24F = 0x7B3C
+0xE250 = 0x7B3D
+0xE251 = 0x7B3E
+0xE252 = 0x7B3F
+0xE253 = 0x7B40
+0xE254 = 0x7B41
+0xE255 = 0x7B42
+0xE256 = 0x7B43
+0xE257 = 0x7B44
+0xE258 = 0x7B45
+0xE259 = 0x7B46
+0xE25A = 0x7B47
+0xE25B = 0x7B48
+0xE25C = 0x7B49
+0xE25D = 0x7B4A
+0xE25E = 0x7B4B
+0xE25F = 0x7B4C
+0xE260 = 0x7B4D
+0xE261 = 0x7B4E
+0xE262 = 0x7B4F
+0xE263 = 0x7B50
+0xE264 = 0x7B51
+0xE265 = 0x7B52
+0xE266 = 0x7B53
+0xE267 = 0x7B54
+0xE268 = 0x7B55
+0xE269 = 0x7B56
+0xE26A = 0x7B57
+0xE26B = 0x7B58
+0xE26C = 0x7B59
+0xE26D = 0x7B5A
+0xE26E = 0x7B5B
+0xE26F = 0x7B5C
+0xE270 = 0x7B5D
+0xE271 = 0x7B5E
+0xE272 = 0x7B5F
+0xE273 = 0x7B60
+0xE274 = 0x7B61
+0xE275 = 0x7B62
+0xE276 = 0x7B63
+0xE277 = 0x7B64
+0xE278 = 0x7B65
+0xE279 = 0x7B66
+0xE27A = 0x7B67
+0xE27B = 0x7B68
+0xE27C = 0x7B69
+0xE27D = 0x7B6A
+0xE27E = 0x7B6B
+0xE27F = 0x7B6C
+0xE280 = 0x7B6D
+0xE281 = 0x7B6E
+0xE282 = 0x7B6F
+0xE283 = 0x7B70
+0xE284 = 0x7B71
+0xE285 = 0x7B72
+0xE286 = 0x7B73
+0xE287 = 0x7B74
+0xE288 = 0x7B75
+0xE289 = 0x7B76
+0xE28A = 0x7B77
+0xE28B = 0x7B78
+0xE28C = 0x7B79
+0xE28D = 0x7B7A
+0xE28E = 0x7B7B
+0xE28F = 0x7B7C
+0xE290 = 0x7B7D
+0xE291 = 0x7B7E
+0xE292 = 0x7C21
+0xE293 = 0x7C22
+0xE294 = 0x7C23
+0xE295 = 0x7C24
+0xE296 = 0x7C25
+0xE297 = 0x7C26
+0xE298 = 0x7C27
+0xE299 = 0x7C28
+0xE29A = 0x7C29
+0xE29B = 0x7C2A
+0xE29C = 0x7C2B
+0xE29D = 0x7C2C
+0xE29E = 0x7C2D
+0xE29F = 0x7C2E
+0xE2A0 = 0x7C2F
+0xE2A1 = 0x7C30
+0xE2A2 = 0x7C31
+0xE2A3 = 0x7C32
+0xE2A4 = 0x7C33
+0xE2A5 = 0x7C34
+0xE2A6 = 0x7C35
+0xE2A7 = 0x7C36
+0xE2A8 = 0x7C37
+0xE2A9 = 0x7C38
+0xE2AA = 0x7C39
+0xE2AB = 0x7C3A
+0xE2AC = 0x7C3B
+0xE2AD = 0x7C3C
+0xE2AE = 0x7C3D
+0xE2AF = 0x7C3E
+0xE2B0 = 0x7C3F
+0xE2B1 = 0x7C40
+0xE2B2 = 0x7C41
+0xE2B3 = 0x7C42
+0xE2B4 = 0x7C43
+0xE2B5 = 0x7C44
+0xE2B6 = 0x7C45
+0xE2B7 = 0x7C46
+0xE2B8 = 0x7C47
+0xE2B9 = 0x7C48
+0xE2BA = 0x7C49
+0xE2BB = 0x7C4A
+0xE2BC = 0x7C4B
+0xE2BD = 0x7C4C
+0xE2BE = 0x7C4D
+0xE2BF = 0x7C4E
+0xE2C0 = 0x7C4F
+0xE2C1 = 0x7C50
+0xE2C2 = 0x7C51
+0xE2C3 = 0x7C52
+0xE2C4 = 0x7C53
+0xE2C5 = 0x7C54
+0xE2C6 = 0x7C55
+0xE2C7 = 0x7C56
+0xE2C8 = 0x7C57
+0xE2C9 = 0x7C58
+0xE2CA = 0x7C59
+0xE2CB = 0x7C5A
+0xE2CC = 0x7C5B
+0xE2CD = 0x7C5C
+0xE2CE = 0x7C5D
+0xE2CF = 0x7C5E
+0xE2D0 = 0x7C5F
+0xE2D1 = 0x7C60
+0xE2D2 = 0x7C61
+0xE2D3 = 0x7C62
+0xE2D4 = 0x7C63
+0xE2D5 = 0x7C64
+0xE2D6 = 0x7C65
+0xE2D7 = 0x7C66
+0xE2D8 = 0x7C67
+0xE2D9 = 0x7C68
+0xE2DA = 0x7C69
+0xE2DB = 0x7C6A
+0xE2DC = 0x7C6B
+0xE2DD = 0x7C6C
+0xE2DE = 0x7C6D
+0xE2DF = 0x7C6E
+0xE2E0 = 0x7C6F
+0xE2E1 = 0x7C70
+0xE2E2 = 0x7C71
+0xE2E3 = 0x7C72
+0xE2E4 = 0x7C73
+0xE2E5 = 0x7C74
+0xE2E6 = 0x7C75
+0xE2E7 = 0x7C76
+0xE2E8 = 0x7C77
+0xE2E9 = 0x7C78
+0xE2EA = 0x7C79
+0xE2EB = 0x7C7A
+0xE2EC = 0x7C7B
+0xE2ED = 0x7C7C
+0xE2EE = 0x7C7D
+0xE2EF = 0x7C7E
+0xE2F0 = 0x7D21
+0xE2F1 = 0x7D22
+0xE2F2 = 0x7D23
+0xE2F3 = 0x7D24
+0xE2F4 = 0x7D25
+0xE2F5 = 0x7D26
+0xE2F6 = 0x7D27
+0xE2F7 = 0x7D28
+0xE2F8 = 0x7D29
+0xE2F9 = 0x7D2A
+0xE2FA = 0x7D2B
+0xE2FB = 0x7D2C
+0xE2FC = 0x7D2D
+0xE2FD = 0x7D2E
+0xE2FE = 0x7D2F
+0xE2FF = 0x7D30
+0xE300 = 0x7D31
+0xE301 = 0x7D32
+0xE302 = 0x7D33
+0xE303 = 0x7D34
+0xE304 = 0x7D35
+0xE305 = 0x7D36
+0xE306 = 0x7D37
+0xE307 = 0x7D38
+0xE308 = 0x7D39
+0xE309 = 0x7D3A
+0xE30A = 0x7D3B
+0xE30B = 0x7D3C
+0xE30C = 0x7D3D
+0xE30D = 0x7D3E
+0xE30E = 0x7D3F
+0xE30F = 0x7D40
+0xE310 = 0x7D41
+0xE311 = 0x7D42
+0xE312 = 0x7D43
+0xE313 = 0x7D44
+0xE314 = 0x7D45
+0xE315 = 0x7D46
+0xE316 = 0x7D47
+0xE317 = 0x7D48
+0xE318 = 0x7D49
+0xE319 = 0x7D4A
+0xE31A = 0x7D4B
+0xE31B = 0x7D4C
+0xE31C = 0x7D4D
+0xE31D = 0x7D4E
+0xE31E = 0x7D4F
+0xE31F = 0x7D50
+0xE320 = 0x7D51
+0xE321 = 0x7D52
+0xE322 = 0x7D53
+0xE323 = 0x7D54
+0xE324 = 0x7D55
+0xE325 = 0x7D56
+0xE326 = 0x7D57
+0xE327 = 0x7D58
+0xE328 = 0x7D59
+0xE329 = 0x7D5A
+0xE32A = 0x7D5B
+0xE32B = 0x7D5C
+0xE32C = 0x7D5D
+0xE32D = 0x7D5E
+0xE32E = 0x7D5F
+0xE32F = 0x7D60
+0xE330 = 0x7D61
+0xE331 = 0x7D62
+0xE332 = 0x7D63
+0xE333 = 0x7D64
+0xE334 = 0x7D65
+0xE335 = 0x7D66
+0xE336 = 0x7D67
+0xE337 = 0x7D68
+0xE338 = 0x7D69
+0xE339 = 0x7D6A
+0xE33A = 0x7D6B
+0xE33B = 0x7D6C
+0xE33C = 0x7D6D
+0xE33D = 0x7D6E
+0xE33E = 0x7D6F
+0xE33F = 0x7D70
+0xE340 = 0x7D71
+0xE341 = 0x7D72
+0xE342 = 0x7D73
+0xE343 = 0x7D74
+0xE344 = 0x7D75
+0xE345 = 0x7D76
+0xE346 = 0x7D77
+0xE347 = 0x7D78
+0xE348 = 0x7D79
+0xE349 = 0x7D7A
+0xE34A = 0x7D7B
+0xE34B = 0x7D7C
+0xE34C = 0x7D7D
+0xE34D = 0x7D7E
+0xE34E = 0x7E21
+0xE34F = 0x7E22
+0xE350 = 0x7E23
+0xE351 = 0x7E24
+0xE352 = 0x7E25
+0xE353 = 0x7E26
+0xE354 = 0x7E27
+0xE355 = 0x7E28
+0xE356 = 0x7E29
+0xE357 = 0x7E2A
+0xE358 = 0x7E2B
+0xE359 = 0x7E2C
+0xE35A = 0x7E2D
+0xE35B = 0x7E2E
+0xE35C = 0x7E2F
+0xE35D = 0x7E30
+0xE35E = 0x7E31
+0xE35F = 0x7E32
+0xE360 = 0x7E33
+0xE361 = 0x7E34
+0xE362 = 0x7E35
+0xE363 = 0x7E36
+0xE364 = 0x7E37
+0xE365 = 0x7E38
+0xE366 = 0x7E39
+0xE367 = 0x7E3A
+0xE368 = 0x7E3B
+0xE369 = 0x7E3C
+0xE36A = 0x7E3D
+0xE36B = 0x7E3E
+0xE36C = 0x7E3F
+0xE36D = 0x7E40
+0xE36E = 0x7E41
+0xE36F = 0x7E42
+0xE370 = 0x7E43
+0xE371 = 0x7E44
+0xE372 = 0x7E45
+0xE373 = 0x7E46
+0xE374 = 0x7E47
+0xE375 = 0x7E48
+0xE376 = 0x7E49
+0xE377 = 0x7E4A
+0xE378 = 0x7E4B
+0xE379 = 0x7E4C
+0xE37A = 0x7E4D
+0xE37B = 0x7E4E
+0xE37C = 0x7E4F
+0xE37D = 0x7E50
+0xE37E = 0x7E51
+0xE37F = 0x7E52
+0xE380 = 0x7E53
+0xE381 = 0x7E54
+0xE382 = 0x7E55
+0xE383 = 0x7E56
+0xE384 = 0x7E57
+0xE385 = 0x7E58
+0xE386 = 0x7E59
+0xE387 = 0x7E5A
+0xE388 = 0x7E5B
+0xE389 = 0x7E5C
+0xE38A = 0x7E5D
+0xE38B = 0x7E5E
+0xE38C = 0x7E5F
+0xE38D = 0x7E60
+0xE38E = 0x7E61
+0xE38F = 0x7E62
+0xE390 = 0x7E63
+0xE391 = 0x7E64
+0xE392 = 0x7E65
+0xE393 = 0x7E66
+0xE394 = 0x7E67
+0xE395 = 0x7E68
+0xE396 = 0x7E69
+0xE397 = 0x7E6A
+0xE398 = 0x7E6B
+0xE399 = 0x7E6C
+0xE39A = 0x7E6D
+0xE39B = 0x7E6E
+0xE39C = 0x7E6F
+0xE39D = 0x7E70
+0xE39E = 0x7E71
+0xE39F = 0x7E72
+0xE3A0 = 0x7E73
+0xE3A1 = 0x7E74
+0xE3A2 = 0x7E75
+0xE3A3 = 0x7E76
+0xE3A4 = 0x7E77
+0xE3A5 = 0x7E78
+0xE3A6 = 0x7E79
+0xE3A7 = 0x7E7A
+0xE3A8 = 0x7E7B
+0xE3A9 = 0x7E7C
+0xE3AA = 0x7E7D
+0xE3AB = 0x7E7E
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208VDC@NEC.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208VDC@NEC.src
new file mode 100644
index 0000000..d91f0bd
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0208VDC@NEC.src
@@ -0,0 +1,98 @@
+# $NetBSD: UCS%JISX0208VDC@NEC.src,v 1.1 2003/07/19 20:20:42 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0208VDC:NEC"
+SRC_ZONE	0x2116 - 0x33CD
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0x2116 - 0x33CD		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x2116 = 0x2D62
+0x2121 = 0x2D64
+0x2160 = 0x2D35
+0x2161 = 0x2D36
+0x2162 = 0x2D37
+0x2163 = 0x2D38
+0x2164 = 0x2D39
+0x2165 = 0x2D3A
+0x2166 = 0x2D3B
+0x2167 = 0x2D3C
+0x2168 = 0x2D3D
+0x2169 = 0x2D3E
+0x2211 = 0x2D74
+0x221A = 0x2D75
+0x221F = 0x2D78
+0x2220 = 0x2D77
+0x2229 = 0x2D7B
+0x222A = 0x2D7C
+0x222B = 0x2D72
+0x222E = 0x2D73
+0x2235 = 0x2D7A
+0x2252 = 0x2D70
+0x2261 = 0x2D71
+0x22A5 = 0x2D76
+0x22BF = 0x2D79
+0x2460 = 0x2D21
+0x2461 = 0x2D22
+0x2462 = 0x2D23
+0x2463 = 0x2D24
+0x2464 = 0x2D25
+0x2465 = 0x2D26
+0x2466 = 0x2D27
+0x2467 = 0x2D28
+0x2468 = 0x2D29
+0x2469 = 0x2D2A
+0x246A = 0x2D2B
+0x246B = 0x2D2C
+0x246C = 0x2D2D
+0x246D = 0x2D2E
+0x246E = 0x2D2F
+0x246F = 0x2D30
+0x2470 = 0x2D31
+0x2471 = 0x2D32
+0x2472 = 0x2D33
+0x2473 = 0x2D34
+0x301D = 0x2D60
+0x301F = 0x2D61
+0x3231 = 0x2D6A
+0x3232 = 0x2D6B
+0x3239 = 0x2D6C
+0x32A4 = 0x2D65
+0x32A5 = 0x2D66
+0x32A6 = 0x2D67
+0x32A7 = 0x2D68
+0x32A8 = 0x2D69
+0x3303 = 0x2D46
+0x330D = 0x2D4A
+0x3314 = 0x2D41
+0x3318 = 0x2D44
+0x3322 = 0x2D42
+0x3323 = 0x2D4C
+0x3326 = 0x2D4B
+0x3327 = 0x2D45
+0x332B = 0x2D4D
+0x3336 = 0x2D47
+0x333B = 0x2D4F
+0x3349 = 0x2D40
+0x334A = 0x2D4E
+0x334D = 0x2D43
+0x3351 = 0x2D48
+0x3357 = 0x2D49
+0x337B = 0x2D5F
+0x337C = 0x2D6F
+0x337D = 0x2D6E
+0x337E = 0x2D6D
+0x338E = 0x2D53
+0x338F = 0x2D54
+0x339C = 0x2D50
+0x339D = 0x2D51
+0x339E = 0x2D52
+0x33A1 = 0x2D56
+0x33C4 = 0x2D55
+0x33CD = 0x2D63
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212.src
new file mode 100644
index 0000000..f3b2e70
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212.src
@@ -0,0 +1,6170 @@
+# $NetBSD: UCS%JISX0212.src,v 1.3 2003/07/14 06:03:43 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0212"
+SRC_ZONE	0x0000 - 0x9FFF
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+#
+# This mapping data is made from the mapping data provided by Unicode, Inc.
+# Original notice:
+#
+#	Name:             JIS X 0212 (1990) to Unicode
+#	Unicode version:  1.1
+#	Table version:    0.9
+#	Table format:     Format A
+#	Date:             8 March 1994
+#
+#	Copyright (c) 1991-1994 Unicode, Inc.  All Rights reserved.
+#
+#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#	No claims are made as to fitness for any particular purpose.  No
+#	warranties of any kind are expressed or implied.  The recipient
+#	agrees to determine applicability of information provided.  If this
+#	file has been provided on magnetic media by Unicode, Inc., the sole
+#	remedy for any claim will be exchange of defective media within 90
+#	days of receipt.
+#
+#	Recipient is granted the right to make copies in any form for
+#	internal distribution and to freely use the information supplied
+#	in the creation of products supporting Unicode.  Unicode, Inc.
+#	specifically excludes the right to re-distribute this file directly
+#	to third parties or other organizations whether for profit or not.
+#
+#	General notes:
+#
+#
+# This table contains one set of mappings from JIS X 0212 into Unicode.
+# Note that these data are *possible* mappings only and may not be the
+# same as those used by actual products, nor may they be the best suited
+# for all uses.  For more information on the mappings between various code
+# pages incorporating the repertoire of JIS X 0212 and Unicode, consult the
+# VENDORS mapping data.  Normative information on the mapping between
+# JIS X 0212 and Unicode may be found in the Unihan.txt file in the
+# latest Unicode Character Database.
+#
+# If you have carefully considered the fact that the mappings in
+# this table are only one possible set of mappings between JIS X 0212 and
+# Unicode and have no normative status, but still feel that you
+# have located an error in the table that requires fixing, you may
+# report any such error to errata@unicode.org.
+#
+#
+#	Format:  Three tab-separated columns
+#		 Column #1 is the JIS X 0212 code (in hex as 0xXXXX)
+#		 Column #2 is the Unicode (in hex as 0xXXXX)
+#		 Column #3 the Unicode name (follows a comment sign, '#')
+#			The official names for Unicode characters U+4E00
+#			to U+9FA5, inclusive, is "CJK UNIFIED IDEOGRAPH-XXXX",
+#			where XXXX is the code point.  Including all these
+#			names in this file increases its size substantially
+#			and needlessly.  The token "" is used for the
+#			name of these characters.  If necessary, it can be
+#			expanded algorithmically by a parser or editor.
+#
+#	The entries are in JIS X 0212 order
+#
+#	The following algorithms can be used to change the hex form
+#		of JIS 0212 to other standard forms:
+#
+#		To change hex to EUC form, add 0x8080
+#		To change hex to kuten form, first subtract 0x2020.  Then
+#			the high and low bytes correspond to the ku and ten of
+#			the kuten form.  For example, 0x2121 -> 0x0101 -> 0101;
+#			0x6D63 -> 0x4D43 -> 7767
+#
+#   The kanji mappings are a normative part of ISO/IEC 10646.  The
+#       non-kanji mappings are provisional, pending definition of
+#       official mappings by Japanese standards bodies
+#
+#	Any comments or problems, contact 
+#
+#	Notes:
+#
+#	1. JIS X 0212 apparently unified the following two symbols
+#	   into a single character at 0x2922:
+#	
+#	   LATIN CAPITAL LETTER D WITH STROKE
+#	   LATIN CAPITAL LETTER ETH
+#
+#	   However, JIS X 0212 maintains the distinction between
+#	   the lowercase forms of these two elements at 0x2942 and 0x2943.
+#	   Given the structre of these JIS encodings, it is clear that
+#	   0x2922 and 0x2942 are intended to be a capital/small pair.
+#	   Consequently, in the Unicode mapping, 0x2922 is treated as
+#	   LATIN CAPITAL LETTER D WITH STROKE.
+#
+# Ruby specific modification:
+#     remove 0x007E to 0x2237 conversion.
+#
+# 0x007E = 0x2237
+0x00A1 = 0x2242
+0x00A4 = 0x2270
+0x00A6 = 0x2243
+0x00A9 = 0x226D
+0x00AA = 0x226C
+0x00AE = 0x226E
+0x00AF = 0x2234
+0x00B8 = 0x2231
+0x00BA = 0x226B
+0x00BF = 0x2244
+0x00C0 = 0x2A22
+0x00C1 = 0x2A21
+0x00C2 = 0x2A24
+0x00C3 = 0x2A2A
+0x00C4 = 0x2A23
+0x00C5 = 0x2A29
+0x00C6 = 0x2921
+0x00C7 = 0x2A2E
+0x00C8 = 0x2A32
+0x00C9 = 0x2A31
+0x00CA = 0x2A34
+0x00CB = 0x2A33
+0x00CC = 0x2A40
+0x00CD = 0x2A3F
+0x00CE = 0x2A42
+0x00CF = 0x2A41
+0x00D1 = 0x2A50
+0x00D2 = 0x2A52
+0x00D3 = 0x2A51
+0x00D4 = 0x2A54
+0x00D5 = 0x2A58
+0x00D6 = 0x2A53
+0x00D8 = 0x292C
+0x00D9 = 0x2A63
+0x00DA = 0x2A62
+0x00DB = 0x2A65
+0x00DC = 0x2A64
+0x00DD = 0x2A72
+0x00DE = 0x2930
+0x00DF = 0x294E
+0x00E0 = 0x2B22
+0x00E1 = 0x2B21
+0x00E2 = 0x2B24
+0x00E3 = 0x2B2A
+0x00E4 = 0x2B23
+0x00E5 = 0x2B29
+0x00E6 = 0x2941
+0x00E7 = 0x2B2E
+0x00E8 = 0x2B32
+0x00E9 = 0x2B31
+0x00EA = 0x2B34
+0x00EB = 0x2B33
+0x00EC = 0x2B40
+0x00ED = 0x2B3F
+0x00EE = 0x2B42
+0x00EF = 0x2B41
+0x00F0 = 0x2943
+0x00F1 = 0x2B50
+0x00F2 = 0x2B52
+0x00F3 = 0x2B51
+0x00F4 = 0x2B54
+0x00F5 = 0x2B58
+0x00F6 = 0x2B53
+0x00F8 = 0x294C
+0x00F9 = 0x2B63
+0x00FA = 0x2B62
+0x00FB = 0x2B65
+0x00FC = 0x2B64
+0x00FD = 0x2B72
+0x00FE = 0x2950
+0x00FF = 0x2B73
+0x0100 = 0x2A27
+0x0101 = 0x2B27
+0x0102 = 0x2A25
+0x0103 = 0x2B25
+0x0104 = 0x2A28
+0x0105 = 0x2B28
+0x0106 = 0x2A2B
+0x0107 = 0x2B2B
+0x0108 = 0x2A2C
+0x0109 = 0x2B2C
+0x010A = 0x2A2F
+0x010B = 0x2B2F
+0x010C = 0x2A2D
+0x010D = 0x2B2D
+0x010E = 0x2A30
+0x010F = 0x2B30
+0x0110 = 0x2922
+0x0111 = 0x2942
+0x0112 = 0x2A37
+0x0113 = 0x2B37
+0x0116 = 0x2A36
+0x0117 = 0x2B36
+0x0118 = 0x2A38
+0x0119 = 0x2B38
+0x011A = 0x2A35
+0x011B = 0x2B35
+0x011C = 0x2A3A
+0x011D = 0x2B3A
+0x011E = 0x2A3B
+0x011F = 0x2B3B
+0x0120 = 0x2A3D
+0x0121 = 0x2B3D
+0x0122 = 0x2A3C
+0x0124 = 0x2A3E
+0x0125 = 0x2B3E
+0x0126 = 0x2924
+0x0127 = 0x2944
+0x0128 = 0x2A47
+0x0129 = 0x2B47
+0x012A = 0x2A45
+0x012B = 0x2B45
+0x012E = 0x2A46
+0x012F = 0x2B46
+0x0130 = 0x2A44
+0x0131 = 0x2945
+0x0132 = 0x2926
+0x0133 = 0x2946
+0x0134 = 0x2A48
+0x0135 = 0x2B48
+0x0136 = 0x2A49
+0x0137 = 0x2B49
+0x0138 = 0x2947
+0x0139 = 0x2A4A
+0x013A = 0x2B4A
+0x013B = 0x2A4C
+0x013C = 0x2B4C
+0x013D = 0x2A4B
+0x013E = 0x2B4B
+0x013F = 0x2929
+0x0140 = 0x2949
+0x0141 = 0x2928
+0x0142 = 0x2948
+0x0143 = 0x2A4D
+0x0144 = 0x2B4D
+0x0145 = 0x2A4F
+0x0146 = 0x2B4F
+0x0147 = 0x2A4E
+0x0148 = 0x2B4E
+0x0149 = 0x294A
+0x014A = 0x292B
+0x014B = 0x294B
+0x014C = 0x2A57
+0x014D = 0x2B57
+0x0150 = 0x2A56
+0x0151 = 0x2B56
+0x0152 = 0x292D
+0x0153 = 0x294D
+0x0154 = 0x2A59
+0x0155 = 0x2B59
+0x0156 = 0x2A5B
+0x0157 = 0x2B5B
+0x0158 = 0x2A5A
+0x0159 = 0x2B5A
+0x015A = 0x2A5C
+0x015B = 0x2B5C
+0x015C = 0x2A5D
+0x015D = 0x2B5D
+0x015E = 0x2A5F
+0x015F = 0x2B5F
+0x0160 = 0x2A5E
+0x0161 = 0x2B5E
+0x0162 = 0x2A61
+0x0163 = 0x2B61
+0x0164 = 0x2A60
+0x0165 = 0x2B60
+0x0166 = 0x292F
+0x0167 = 0x294F
+0x0168 = 0x2A6C
+0x0169 = 0x2B6C
+0x016A = 0x2A69
+0x016B = 0x2B69
+0x016C = 0x2A66
+0x016D = 0x2B66
+0x016E = 0x2A6B
+0x016F = 0x2B6B
+0x0170 = 0x2A68
+0x0171 = 0x2B68
+0x0172 = 0x2A6A
+0x0173 = 0x2B6A
+0x0174 = 0x2A71
+0x0175 = 0x2B71
+0x0176 = 0x2A74
+0x0177 = 0x2B74
+0x0178 = 0x2A73
+0x0179 = 0x2A75
+0x017A = 0x2B75
+0x017B = 0x2A77
+0x017C = 0x2B77
+0x017D = 0x2A76
+0x017E = 0x2B76
+0x01CD = 0x2A26
+0x01CE = 0x2B26
+0x01CF = 0x2A43
+0x01D0 = 0x2B43
+0x01D1 = 0x2A55
+0x01D2 = 0x2B55
+0x01D3 = 0x2A67
+0x01D4 = 0x2B67
+0x01D5 = 0x2A70
+0x01D6 = 0x2B70
+0x01D7 = 0x2A6D
+0x01D8 = 0x2B6D
+0x01D9 = 0x2A6F
+0x01DA = 0x2B6F
+0x01DB = 0x2A6E
+0x01DC = 0x2B6E
+0x01F5 = 0x2B39
+0x02C7 = 0x2230
+0x02D8 = 0x222F
+0x02D9 = 0x2232
+0x02DA = 0x2236
+0x02DB = 0x2235
+0x02DD = 0x2233
+0x0384 = 0x2238
+0x0385 = 0x2239
+0x0386 = 0x2661
+0x0388 = 0x2662
+0x0389 = 0x2663
+0x038A = 0x2664
+0x038C = 0x2667
+0x038E = 0x2669
+0x038F = 0x266C
+0x0390 = 0x2676
+0x03AA = 0x2665
+0x03AB = 0x266A
+0x03AC = 0x2671
+0x03AD = 0x2672
+0x03AE = 0x2673
+0x03AF = 0x2674
+0x03B0 = 0x267B
+0x03C2 = 0x2678
+0x03CA = 0x2675
+0x03CB = 0x267A
+0x03CC = 0x2677
+0x03CD = 0x2679
+0x03CE = 0x267C
+0x0402 = 0x2742
+0x0403 = 0x2743
+0x0404 = 0x2744
+0x0405 = 0x2745
+0x0406 = 0x2746
+0x0407 = 0x2747
+0x0408 = 0x2748
+0x0409 = 0x2749
+0x040A = 0x274A
+0x040B = 0x274B
+0x040C = 0x274C
+0x040E = 0x274D
+0x040F = 0x274E
+0x0452 = 0x2772
+0x0453 = 0x2773
+0x0454 = 0x2774
+0x0455 = 0x2775
+0x0456 = 0x2776
+0x0457 = 0x2777
+0x0458 = 0x2778
+0x0459 = 0x2779
+0x045A = 0x277A
+0x045B = 0x277B
+0x045C = 0x277C
+0x045E = 0x277D
+0x045F = 0x277E
+0x2116 = 0x2271
+0x2122 = 0x226F
+0x4E02 = 0x3021
+0x4E04 = 0x3022
+0x4E05 = 0x3023
+0x4E0C = 0x3024
+0x4E12 = 0x3025
+0x4E1F = 0x3026
+0x4E23 = 0x3027
+0x4E24 = 0x3028
+0x4E28 = 0x3029
+0x4E2B = 0x302A
+0x4E2E = 0x302B
+0x4E2F = 0x302C
+0x4E30 = 0x302D
+0x4E35 = 0x302E
+0x4E40 = 0x302F
+0x4E41 = 0x3030
+0x4E44 = 0x3031
+0x4E47 = 0x3032
+0x4E51 = 0x3033
+0x4E5A = 0x3034
+0x4E5C = 0x3035
+0x4E63 = 0x3036
+0x4E68 = 0x3037
+0x4E69 = 0x3038
+0x4E74 = 0x3039
+0x4E75 = 0x303A
+0x4E79 = 0x303B
+0x4E7F = 0x303C
+0x4E8D = 0x303D
+0x4E96 = 0x303E
+0x4E97 = 0x303F
+0x4E9D = 0x3040
+0x4EAF = 0x3041
+0x4EB9 = 0x3042
+0x4EC3 = 0x3043
+0x4ED0 = 0x3044
+0x4EDA = 0x3045
+0x4EDB = 0x3046
+0x4EE0 = 0x3047
+0x4EE1 = 0x3048
+0x4EE2 = 0x3049
+0x4EE8 = 0x304A
+0x4EEF = 0x304B
+0x4EF1 = 0x304C
+0x4EF3 = 0x304D
+0x4EF5 = 0x304E
+0x4EFD = 0x304F
+0x4EFE = 0x3050
+0x4EFF = 0x3051
+0x4F00 = 0x3052
+0x4F02 = 0x3053
+0x4F03 = 0x3054
+0x4F08 = 0x3055
+0x4F0B = 0x3056
+0x4F0C = 0x3057
+0x4F12 = 0x3058
+0x4F15 = 0x3059
+0x4F16 = 0x305A
+0x4F17 = 0x305B
+0x4F19 = 0x305C
+0x4F2E = 0x305D
+0x4F31 = 0x305E
+0x4F33 = 0x3060
+0x4F35 = 0x3061
+0x4F37 = 0x3062
+0x4F39 = 0x3063
+0x4F3B = 0x3064
+0x4F3E = 0x3065
+0x4F40 = 0x3066
+0x4F42 = 0x3067
+0x4F48 = 0x3068
+0x4F49 = 0x3069
+0x4F4B = 0x306A
+0x4F4C = 0x306B
+0x4F52 = 0x306C
+0x4F54 = 0x306D
+0x4F56 = 0x306E
+0x4F58 = 0x306F
+0x4F5F = 0x3070
+0x4F60 = 0x305F
+0x4F63 = 0x3071
+0x4F6A = 0x3072
+0x4F6C = 0x3073
+0x4F6E = 0x3074
+0x4F71 = 0x3075
+0x4F77 = 0x3076
+0x4F78 = 0x3077
+0x4F79 = 0x3078
+0x4F7A = 0x3079
+0x4F7D = 0x307A
+0x4F7E = 0x307B
+0x4F81 = 0x307C
+0x4F82 = 0x307D
+0x4F84 = 0x307E
+0x4F85 = 0x3121
+0x4F89 = 0x3122
+0x4F8A = 0x3123
+0x4F8C = 0x3124
+0x4F8E = 0x3125
+0x4F90 = 0x3126
+0x4F92 = 0x3127
+0x4F93 = 0x3128
+0x4F94 = 0x3129
+0x4F97 = 0x312A
+0x4F99 = 0x312B
+0x4F9A = 0x312C
+0x4F9E = 0x312D
+0x4F9F = 0x312E
+0x4FB2 = 0x312F
+0x4FB7 = 0x3130
+0x4FB9 = 0x3131
+0x4FBB = 0x3132
+0x4FBC = 0x3133
+0x4FBD = 0x3134
+0x4FBE = 0x3135
+0x4FC0 = 0x3136
+0x4FC1 = 0x3137
+0x4FC5 = 0x3138
+0x4FC6 = 0x3139
+0x4FC8 = 0x313A
+0x4FC9 = 0x313B
+0x4FCB = 0x313C
+0x4FCC = 0x313D
+0x4FCD = 0x313E
+0x4FCF = 0x313F
+0x4FD2 = 0x3140
+0x4FDC = 0x3141
+0x4FE0 = 0x3142
+0x4FE2 = 0x3143
+0x4FF0 = 0x3144
+0x4FF2 = 0x3145
+0x4FFC = 0x3146
+0x4FFD = 0x3147
+0x4FFF = 0x3148
+0x5000 = 0x3149
+0x5001 = 0x314A
+0x5004 = 0x314B
+0x5007 = 0x314C
+0x500A = 0x314D
+0x500C = 0x314E
+0x500E = 0x314F
+0x5010 = 0x3150
+0x5013 = 0x3151
+0x5017 = 0x3152
+0x5018 = 0x3153
+0x501B = 0x3154
+0x501C = 0x3155
+0x501D = 0x3156
+0x501E = 0x3157
+0x5022 = 0x3158
+0x5027 = 0x3159
+0x502E = 0x315A
+0x5030 = 0x315B
+0x5032 = 0x315C
+0x5033 = 0x315D
+0x5035 = 0x315E
+0x503B = 0x3176
+0x5040 = 0x315F
+0x5041 = 0x3160
+0x5042 = 0x3161
+0x5045 = 0x3162
+0x5046 = 0x3163
+0x504A = 0x3164
+0x504C = 0x3165
+0x504E = 0x3166
+0x5051 = 0x3167
+0x5052 = 0x3168
+0x5053 = 0x3169
+0x5057 = 0x316A
+0x5059 = 0x316B
+0x505F = 0x316C
+0x5060 = 0x316D
+0x5062 = 0x316E
+0x5063 = 0x316F
+0x5066 = 0x3170
+0x5067 = 0x3171
+0x506A = 0x3172
+0x506D = 0x3173
+0x5070 = 0x3174
+0x5071 = 0x3175
+0x5081 = 0x3177
+0x5083 = 0x3178
+0x5084 = 0x3179
+0x5086 = 0x317A
+0x508A = 0x317B
+0x508E = 0x317C
+0x508F = 0x317D
+0x5090 = 0x317E
+0x5092 = 0x3221
+0x5093 = 0x3222
+0x5094 = 0x3223
+0x5096 = 0x3224
+0x509B = 0x3225
+0x509C = 0x3226
+0x509E = 0x3227
+0x509F = 0x3228
+0x50A0 = 0x3229
+0x50A1 = 0x322A
+0x50A2 = 0x322B
+0x50AA = 0x322C
+0x50AF = 0x322D
+0x50B0 = 0x322E
+0x50B9 = 0x322F
+0x50BA = 0x3230
+0x50BD = 0x3231
+0x50C0 = 0x3232
+0x50C3 = 0x3233
+0x50C4 = 0x3234
+0x50C7 = 0x3235
+0x50CC = 0x3236
+0x50CE = 0x3237
+0x50D0 = 0x3238
+0x50D3 = 0x3239
+0x50D4 = 0x323A
+0x50D8 = 0x323B
+0x50DC = 0x323C
+0x50DD = 0x323D
+0x50DF = 0x323E
+0x50E2 = 0x323F
+0x50E4 = 0x3240
+0x50E6 = 0x3241
+0x50E8 = 0x3242
+0x50E9 = 0x3243
+0x50EF = 0x3244
+0x50F1 = 0x3245
+0x50F2 = 0x3251
+0x50F6 = 0x3246
+0x50FA = 0x3247
+0x50FE = 0x3248
+0x5103 = 0x3249
+0x5106 = 0x324A
+0x5107 = 0x324B
+0x5108 = 0x324C
+0x510B = 0x324D
+0x510C = 0x324E
+0x510D = 0x324F
+0x510E = 0x3250
+0x5110 = 0x3252
+0x5117 = 0x3253
+0x5119 = 0x3254
+0x511B = 0x3255
+0x511C = 0x3256
+0x511D = 0x3257
+0x511E = 0x3258
+0x5123 = 0x3259
+0x5127 = 0x325A
+0x5128 = 0x325B
+0x512C = 0x325C
+0x512D = 0x325D
+0x512F = 0x325E
+0x5131 = 0x325F
+0x5133 = 0x3260
+0x5134 = 0x3261
+0x5135 = 0x3262
+0x5138 = 0x3263
+0x5139 = 0x3264
+0x5142 = 0x3265
+0x514A = 0x3266
+0x514F = 0x3267
+0x5153 = 0x3268
+0x5155 = 0x3269
+0x5157 = 0x326A
+0x5158 = 0x326B
+0x515F = 0x326C
+0x5164 = 0x326D
+0x5166 = 0x326E
+0x517E = 0x326F
+0x5183 = 0x3270
+0x5184 = 0x3271
+0x518B = 0x3272
+0x518E = 0x3273
+0x5198 = 0x3274
+0x519D = 0x3275
+0x51A1 = 0x3276
+0x51A3 = 0x3277
+0x51AD = 0x3278
+0x51B8 = 0x3279
+0x51BA = 0x327A
+0x51BC = 0x327B
+0x51BE = 0x327C
+0x51BF = 0x327D
+0x51C2 = 0x327E
+0x51C8 = 0x3321
+0x51CF = 0x3322
+0x51D1 = 0x3323
+0x51D2 = 0x3324
+0x51D3 = 0x3325
+0x51D5 = 0x3326
+0x51D8 = 0x3327
+0x51DE = 0x3328
+0x51E2 = 0x3329
+0x51E5 = 0x332A
+0x51EE = 0x332B
+0x51F2 = 0x332C
+0x51F3 = 0x332D
+0x51F4 = 0x332E
+0x51F7 = 0x332F
+0x5201 = 0x3330
+0x5202 = 0x3331
+0x5205 = 0x3332
+0x5212 = 0x3333
+0x5213 = 0x3334
+0x5215 = 0x3335
+0x5216 = 0x3336
+0x5218 = 0x3337
+0x5222 = 0x3338
+0x5228 = 0x3339
+0x5231 = 0x333A
+0x5232 = 0x333B
+0x5235 = 0x333C
+0x523C = 0x333D
+0x5245 = 0x333E
+0x5249 = 0x333F
+0x5255 = 0x3340
+0x5257 = 0x3341
+0x5258 = 0x3342
+0x525A = 0x3343
+0x525C = 0x3344
+0x525F = 0x3345
+0x5260 = 0x3346
+0x5261 = 0x3347
+0x5266 = 0x3348
+0x526E = 0x3349
+0x5277 = 0x334A
+0x5278 = 0x334B
+0x5279 = 0x334C
+0x5280 = 0x334D
+0x5282 = 0x334E
+0x5285 = 0x334F
+0x528A = 0x3350
+0x528C = 0x3351
+0x5293 = 0x3352
+0x5295 = 0x3353
+0x5296 = 0x3354
+0x5297 = 0x3355
+0x5298 = 0x3356
+0x529A = 0x3357
+0x529C = 0x3358
+0x52A4 = 0x3359
+0x52A5 = 0x335A
+0x52A6 = 0x335B
+0x52A7 = 0x335C
+0x52AF = 0x335D
+0x52B0 = 0x335E
+0x52B6 = 0x335F
+0x52B7 = 0x3360
+0x52B8 = 0x3361
+0x52BA = 0x3362
+0x52BB = 0x3363
+0x52BD = 0x3364
+0x52C0 = 0x3365
+0x52C4 = 0x3366
+0x52C6 = 0x3367
+0x52C8 = 0x3368
+0x52CC = 0x3369
+0x52CF = 0x336A
+0x52D1 = 0x336B
+0x52D4 = 0x336C
+0x52D6 = 0x336D
+0x52DB = 0x336E
+0x52DC = 0x336F
+0x52E1 = 0x3370
+0x52E5 = 0x3371
+0x52E8 = 0x3372
+0x52E9 = 0x3373
+0x52EA = 0x3374
+0x52EC = 0x3375
+0x52F0 = 0x3376
+0x52F1 = 0x3377
+0x52F4 = 0x3378
+0x52F6 = 0x3379
+0x52F7 = 0x337A
+0x5300 = 0x337B
+0x5303 = 0x337C
+0x530A = 0x337D
+0x530B = 0x337E
+0x530C = 0x3421
+0x5311 = 0x3422
+0x5313 = 0x3423
+0x5318 = 0x3424
+0x531B = 0x3425
+0x531C = 0x3426
+0x531E = 0x3427
+0x531F = 0x3428
+0x5325 = 0x3429
+0x5327 = 0x342A
+0x5328 = 0x342B
+0x5329 = 0x342C
+0x532B = 0x342D
+0x532C = 0x342E
+0x532D = 0x342F
+0x5330 = 0x3430
+0x5332 = 0x3431
+0x5335 = 0x3432
+0x533C = 0x3433
+0x533D = 0x3434
+0x533E = 0x3435
+0x5342 = 0x3436
+0x534B = 0x3438
+0x534C = 0x3437
+0x5359 = 0x3439
+0x535B = 0x343A
+0x5361 = 0x343B
+0x5363 = 0x343C
+0x5365 = 0x343D
+0x536C = 0x343E
+0x536D = 0x343F
+0x5372 = 0x3440
+0x5379 = 0x3441
+0x537E = 0x3442
+0x5383 = 0x3443
+0x5387 = 0x3444
+0x5388 = 0x3445
+0x538E = 0x3446
+0x5393 = 0x3447
+0x5394 = 0x3448
+0x5399 = 0x3449
+0x539D = 0x344A
+0x53A1 = 0x344B
+0x53A4 = 0x344C
+0x53AA = 0x344D
+0x53AB = 0x344E
+0x53AF = 0x344F
+0x53B2 = 0x3450
+0x53B4 = 0x3451
+0x53B5 = 0x3452
+0x53B7 = 0x3453
+0x53B8 = 0x3454
+0x53BA = 0x3455
+0x53BD = 0x3456
+0x53C0 = 0x3457
+0x53C5 = 0x3458
+0x53CF = 0x3459
+0x53D2 = 0x345A
+0x53D3 = 0x345B
+0x53D5 = 0x345C
+0x53DA = 0x345D
+0x53DD = 0x345E
+0x53DE = 0x345F
+0x53E0 = 0x3460
+0x53E6 = 0x3461
+0x53E7 = 0x3462
+0x53F5 = 0x3463
+0x5402 = 0x3464
+0x5413 = 0x3465
+0x541A = 0x3466
+0x5421 = 0x3467
+0x5427 = 0x3468
+0x5428 = 0x3469
+0x542A = 0x346A
+0x542F = 0x346B
+0x5431 = 0x346C
+0x5434 = 0x346D
+0x5435 = 0x346E
+0x5443 = 0x346F
+0x5444 = 0x3470
+0x5447 = 0x3471
+0x544D = 0x3472
+0x544F = 0x3473
+0x545E = 0x3474
+0x5462 = 0x3475
+0x5464 = 0x3476
+0x5466 = 0x3477
+0x5467 = 0x3478
+0x5469 = 0x3479
+0x546B = 0x347A
+0x546D = 0x347B
+0x546E = 0x347C
+0x5474 = 0x347D
+0x547F = 0x347E
+0x5481 = 0x3521
+0x5483 = 0x3522
+0x5485 = 0x3523
+0x5488 = 0x3524
+0x5489 = 0x3525
+0x548D = 0x3526
+0x5491 = 0x3527
+0x5495 = 0x3528
+0x5496 = 0x3529
+0x549C = 0x352A
+0x549F = 0x352B
+0x54A1 = 0x352C
+0x54A6 = 0x352D
+0x54A7 = 0x352E
+0x54A9 = 0x352F
+0x54AA = 0x3530
+0x54AD = 0x3531
+0x54AE = 0x3532
+0x54B1 = 0x3533
+0x54B7 = 0x3534
+0x54B9 = 0x3535
+0x54BA = 0x3536
+0x54BB = 0x3537
+0x54BF = 0x3538
+0x54C6 = 0x3539
+0x54CA = 0x353A
+0x54CD = 0x353B
+0x54CE = 0x353C
+0x54E0 = 0x353D
+0x54EA = 0x353E
+0x54EC = 0x353F
+0x54EF = 0x3540
+0x54F6 = 0x3541
+0x54FC = 0x3542
+0x54FE = 0x3543
+0x54FF = 0x3544
+0x5500 = 0x3545
+0x5501 = 0x3546
+0x5505 = 0x3547
+0x5508 = 0x3548
+0x5509 = 0x3549
+0x550C = 0x354A
+0x550D = 0x354B
+0x550E = 0x354C
+0x5515 = 0x354D
+0x552A = 0x354E
+0x552B = 0x354F
+0x5532 = 0x3550
+0x5535 = 0x3551
+0x5536 = 0x3552
+0x553B = 0x3553
+0x553C = 0x3554
+0x553D = 0x3555
+0x5541 = 0x3556
+0x5547 = 0x3557
+0x5549 = 0x3558
+0x554A = 0x3559
+0x554D = 0x355A
+0x5550 = 0x355B
+0x5551 = 0x355C
+0x5558 = 0x355D
+0x555A = 0x355E
+0x555B = 0x355F
+0x555E = 0x3560
+0x5560 = 0x3561
+0x5561 = 0x3562
+0x5564 = 0x3563
+0x5566 = 0x3564
+0x557F = 0x3565
+0x5581 = 0x3566
+0x5582 = 0x3567
+0x5586 = 0x3568
+0x5588 = 0x3569
+0x558E = 0x356A
+0x558F = 0x356B
+0x5591 = 0x356C
+0x5592 = 0x356D
+0x5593 = 0x356E
+0x5594 = 0x356F
+0x5597 = 0x3570
+0x55A3 = 0x3571
+0x55A4 = 0x3572
+0x55AD = 0x3573
+0x55B2 = 0x3574
+0x55BF = 0x3575
+0x55C1 = 0x3576
+0x55C3 = 0x3577
+0x55C6 = 0x3578
+0x55C9 = 0x3579
+0x55CB = 0x357A
+0x55CC = 0x357B
+0x55CE = 0x357C
+0x55D1 = 0x357D
+0x55D2 = 0x357E
+0x55D3 = 0x3621
+0x55D7 = 0x3622
+0x55D8 = 0x3623
+0x55DB = 0x3624
+0x55DE = 0x3625
+0x55E2 = 0x3626
+0x55E9 = 0x3627
+0x55F6 = 0x3628
+0x55FF = 0x3629
+0x5605 = 0x362A
+0x5608 = 0x362B
+0x560A = 0x362C
+0x560D = 0x362D
+0x560E = 0x362E
+0x560F = 0x362F
+0x5610 = 0x3630
+0x5611 = 0x3631
+0x5612 = 0x3632
+0x5619 = 0x3633
+0x562C = 0x3634
+0x5630 = 0x3635
+0x5633 = 0x3636
+0x5635 = 0x3637
+0x5637 = 0x3638
+0x5639 = 0x3639
+0x563B = 0x363A
+0x563C = 0x363B
+0x563D = 0x363C
+0x563F = 0x363D
+0x5640 = 0x363E
+0x5641 = 0x363F
+0x5643 = 0x3640
+0x5644 = 0x3641
+0x5646 = 0x3642
+0x5649 = 0x3643
+0x564B = 0x3644
+0x564D = 0x3645
+0x564F = 0x3646
+0x5654 = 0x3647
+0x565E = 0x3648
+0x5660 = 0x3649
+0x5661 = 0x364A
+0x5662 = 0x364B
+0x5663 = 0x364C
+0x5666 = 0x364D
+0x5669 = 0x364E
+0x566D = 0x364F
+0x566F = 0x3650
+0x5671 = 0x3651
+0x5672 = 0x3652
+0x5675 = 0x3653
+0x5684 = 0x3654
+0x5685 = 0x3655
+0x5688 = 0x3656
+0x568B = 0x3657
+0x568C = 0x3658
+0x5695 = 0x3659
+0x5699 = 0x365A
+0x569A = 0x365B
+0x569D = 0x365C
+0x569E = 0x365D
+0x569F = 0x365E
+0x56A6 = 0x365F
+0x56A7 = 0x3660
+0x56A8 = 0x3661
+0x56A9 = 0x3662
+0x56AB = 0x3663
+0x56AC = 0x3664
+0x56AD = 0x3665
+0x56B1 = 0x3666
+0x56B3 = 0x3667
+0x56B7 = 0x3668
+0x56BE = 0x3669
+0x56C5 = 0x366A
+0x56C9 = 0x366B
+0x56CA = 0x366C
+0x56CB = 0x366D
+0x56CC = 0x3670
+0x56CD = 0x3671
+0x56CF = 0x366E
+0x56D0 = 0x366F
+0x56D9 = 0x3672
+0x56DC = 0x3673
+0x56DD = 0x3674
+0x56DF = 0x3675
+0x56E1 = 0x3676
+0x56E4 = 0x3677
+0x56E5 = 0x3678
+0x56E6 = 0x3679
+0x56E7 = 0x367A
+0x56E8 = 0x367B
+0x56EB = 0x367D
+0x56ED = 0x367E
+0x56F1 = 0x367C
+0x56F6 = 0x3721
+0x56F7 = 0x3722
+0x5701 = 0x3723
+0x5702 = 0x3724
+0x5707 = 0x3725
+0x570A = 0x3726
+0x570C = 0x3727
+0x5711 = 0x3728
+0x5715 = 0x3729
+0x571A = 0x372A
+0x571B = 0x372B
+0x571D = 0x372C
+0x5720 = 0x372D
+0x5722 = 0x372E
+0x5723 = 0x372F
+0x5724 = 0x3730
+0x5725 = 0x3731
+0x5729 = 0x3732
+0x572A = 0x3733
+0x572C = 0x3734
+0x572E = 0x3735
+0x572F = 0x3736
+0x5733 = 0x3737
+0x5734 = 0x3738
+0x573D = 0x3739
+0x573E = 0x373A
+0x573F = 0x373B
+0x5745 = 0x373C
+0x5746 = 0x373D
+0x574C = 0x373E
+0x574D = 0x373F
+0x5752 = 0x3740
+0x5762 = 0x3741
+0x5765 = 0x3742
+0x5767 = 0x3743
+0x5768 = 0x3744
+0x576B = 0x3745
+0x576D = 0x3746
+0x576E = 0x3747
+0x576F = 0x3748
+0x5770 = 0x3749
+0x5771 = 0x374A
+0x5773 = 0x374B
+0x5774 = 0x374C
+0x5775 = 0x374D
+0x5777 = 0x374E
+0x5779 = 0x374F
+0x577A = 0x3750
+0x577B = 0x3751
+0x577C = 0x3752
+0x577E = 0x3753
+0x5781 = 0x3754
+0x5783 = 0x3755
+0x578C = 0x3756
+0x5794 = 0x3757
+0x5795 = 0x3760
+0x5797 = 0x3758
+0x5799 = 0x3759
+0x579A = 0x375A
+0x579C = 0x375B
+0x579D = 0x375C
+0x579E = 0x375D
+0x579F = 0x375E
+0x57A1 = 0x375F
+0x57A7 = 0x3761
+0x57A8 = 0x3762
+0x57A9 = 0x3763
+0x57AC = 0x3764
+0x57B8 = 0x3765
+0x57BD = 0x3766
+0x57C7 = 0x3767
+0x57C8 = 0x3768
+0x57CC = 0x3769
+0x57CF = 0x376A
+0x57D5 = 0x376B
+0x57DD = 0x376C
+0x57DE = 0x376D
+0x57E1 = 0x377E
+0x57E4 = 0x376E
+0x57E6 = 0x376F
+0x57E7 = 0x3770
+0x57E9 = 0x3771
+0x57ED = 0x3772
+0x57F0 = 0x3773
+0x57F5 = 0x3774
+0x57F6 = 0x3775
+0x57F8 = 0x3776
+0x57FD = 0x3777
+0x57FE = 0x3778
+0x57FF = 0x3779
+0x5803 = 0x377A
+0x5804 = 0x377B
+0x5808 = 0x377C
+0x5809 = 0x377D
+0x580C = 0x3821
+0x580D = 0x3822
+0x581B = 0x3823
+0x581E = 0x3824
+0x581F = 0x3825
+0x5820 = 0x3826
+0x5826 = 0x3827
+0x5827 = 0x3828
+0x582D = 0x3829
+0x5832 = 0x382A
+0x5839 = 0x382B
+0x583F = 0x382C
+0x5849 = 0x382D
+0x584C = 0x382E
+0x584D = 0x382F
+0x584F = 0x3830
+0x5850 = 0x3831
+0x5855 = 0x3832
+0x585F = 0x3833
+0x5861 = 0x3834
+0x5864 = 0x3835
+0x5867 = 0x3836
+0x5868 = 0x3837
+0x5878 = 0x3838
+0x587C = 0x3839
+0x587F = 0x383A
+0x5880 = 0x383B
+0x5881 = 0x383C
+0x5887 = 0x383D
+0x5888 = 0x383E
+0x5889 = 0x383F
+0x588A = 0x3840
+0x588C = 0x3841
+0x588D = 0x3842
+0x588F = 0x3843
+0x5890 = 0x3844
+0x5894 = 0x3845
+0x5896 = 0x3846
+0x589D = 0x3847
+0x58A0 = 0x3848
+0x58A1 = 0x3849
+0x58A2 = 0x384A
+0x58A6 = 0x384B
+0x58A9 = 0x384C
+0x58B1 = 0x384D
+0x58B2 = 0x384E
+0x58BC = 0x3850
+0x58C2 = 0x3851
+0x58C4 = 0x384F
+0x58C8 = 0x3852
+0x58CD = 0x3853
+0x58CE = 0x3854
+0x58D0 = 0x3855
+0x58D2 = 0x3856
+0x58D4 = 0x3857
+0x58D6 = 0x3858
+0x58DA = 0x3859
+0x58DD = 0x385A
+0x58E1 = 0x385B
+0x58E2 = 0x385C
+0x58E9 = 0x385D
+0x58F3 = 0x385E
+0x5905 = 0x385F
+0x5906 = 0x3860
+0x590B = 0x3861
+0x590C = 0x3862
+0x5912 = 0x3863
+0x5913 = 0x3864
+0x5914 = 0x3865
+0x591D = 0x3867
+0x5921 = 0x3868
+0x5923 = 0x3869
+0x5924 = 0x386A
+0x5928 = 0x386B
+0x592F = 0x386C
+0x5930 = 0x386D
+0x5933 = 0x386E
+0x5935 = 0x386F
+0x5936 = 0x3870
+0x593F = 0x3871
+0x5943 = 0x3872
+0x5946 = 0x3873
+0x5952 = 0x3874
+0x5953 = 0x3875
+0x5959 = 0x3876
+0x595B = 0x3877
+0x595D = 0x3878
+0x595E = 0x3879
+0x595F = 0x387A
+0x5961 = 0x387B
+0x5963 = 0x387C
+0x596B = 0x387D
+0x596D = 0x387E
+0x596F = 0x3921
+0x5972 = 0x3922
+0x5975 = 0x3923
+0x5976 = 0x3924
+0x5979 = 0x3925
+0x597B = 0x3926
+0x597C = 0x3927
+0x598B = 0x3928
+0x598C = 0x3929
+0x598E = 0x392A
+0x5992 = 0x392B
+0x5995 = 0x392C
+0x5997 = 0x392D
+0x599F = 0x392E
+0x59A4 = 0x392F
+0x59A7 = 0x3930
+0x59AD = 0x3931
+0x59AE = 0x3932
+0x59AF = 0x3933
+0x59B0 = 0x3934
+0x59B3 = 0x3935
+0x59B7 = 0x3936
+0x59BA = 0x3937
+0x59BC = 0x3938
+0x59C1 = 0x3939
+0x59C3 = 0x393A
+0x59C4 = 0x393B
+0x59C8 = 0x393C
+0x59CA = 0x393D
+0x59CD = 0x393E
+0x59D2 = 0x393F
+0x59DD = 0x3940
+0x59DE = 0x3941
+0x59DF = 0x3942
+0x59E3 = 0x3943
+0x59E4 = 0x3944
+0x59E7 = 0x3945
+0x59EE = 0x3946
+0x59EF = 0x3947
+0x59F1 = 0x3948
+0x59F2 = 0x3949
+0x59F4 = 0x394A
+0x59F7 = 0x394B
+0x5A00 = 0x394C
+0x5A04 = 0x394D
+0x5A0C = 0x394E
+0x5A0D = 0x394F
+0x5A0E = 0x3950
+0x5A12 = 0x3951
+0x5A13 = 0x3952
+0x5A1E = 0x3953
+0x5A23 = 0x3954
+0x5A24 = 0x3955
+0x5A27 = 0x3956
+0x5A28 = 0x3957
+0x5A2A = 0x3958
+0x5A2D = 0x3959
+0x5A30 = 0x395A
+0x5A44 = 0x395B
+0x5A45 = 0x395C
+0x5A47 = 0x395D
+0x5A48 = 0x395E
+0x5A4C = 0x395F
+0x5A50 = 0x3960
+0x5A55 = 0x3961
+0x5A5E = 0x3962
+0x5A63 = 0x3963
+0x5A65 = 0x3964
+0x5A67 = 0x3965
+0x5A6D = 0x3966
+0x5A77 = 0x3967
+0x5A7A = 0x3968
+0x5A7B = 0x3969
+0x5A7E = 0x396A
+0x5A8B = 0x396B
+0x5A90 = 0x396C
+0x5A93 = 0x396D
+0x5A96 = 0x396E
+0x5A99 = 0x396F
+0x5A9C = 0x3970
+0x5A9E = 0x3971
+0x5A9F = 0x3972
+0x5AA0 = 0x3973
+0x5AA2 = 0x3974
+0x5AA7 = 0x3975
+0x5AAC = 0x3976
+0x5AB1 = 0x3977
+0x5AB2 = 0x3978
+0x5AB3 = 0x3979
+0x5AB5 = 0x397A
+0x5AB8 = 0x397B
+0x5ABA = 0x397C
+0x5ABB = 0x397D
+0x5ABF = 0x397E
+0x5AC4 = 0x3A21
+0x5AC6 = 0x3A22
+0x5AC8 = 0x3A23
+0x5ACF = 0x3A24
+0x5ADA = 0x3A25
+0x5ADC = 0x3A26
+0x5AE0 = 0x3A27
+0x5AE5 = 0x3A28
+0x5AEA = 0x3A29
+0x5AEE = 0x3A2A
+0x5AF5 = 0x3A2B
+0x5AF6 = 0x3A2C
+0x5AFD = 0x3A2D
+0x5B00 = 0x3A2E
+0x5B01 = 0x3A2F
+0x5B08 = 0x3A30
+0x5B17 = 0x3A31
+0x5B19 = 0x3A33
+0x5B1B = 0x3A34
+0x5B1D = 0x3A35
+0x5B21 = 0x3A36
+0x5B25 = 0x3A37
+0x5B2D = 0x3A38
+0x5B34 = 0x3A32
+0x5B38 = 0x3A39
+0x5B41 = 0x3A3A
+0x5B4B = 0x3A3B
+0x5B4C = 0x3A3C
+0x5B52 = 0x3A3D
+0x5B56 = 0x3A3E
+0x5B5E = 0x3A3F
+0x5B68 = 0x3A40
+0x5B6E = 0x3A41
+0x5B6F = 0x3A42
+0x5B7C = 0x3A43
+0x5B7D = 0x3A44
+0x5B7E = 0x3A45
+0x5B7F = 0x3A46
+0x5B81 = 0x3A47
+0x5B84 = 0x3A48
+0x5B86 = 0x3A49
+0x5B8A = 0x3A4A
+0x5B8E = 0x3A4B
+0x5B90 = 0x3A4C
+0x5B91 = 0x3A4D
+0x5B93 = 0x3A4E
+0x5B94 = 0x3A4F
+0x5B96 = 0x3A50
+0x5BA8 = 0x3A51
+0x5BA9 = 0x3A52
+0x5BAC = 0x3A53
+0x5BAD = 0x3A54
+0x5BAF = 0x3A55
+0x5BB1 = 0x3A56
+0x5BB2 = 0x3A57
+0x5BB7 = 0x3A58
+0x5BBA = 0x3A59
+0x5BBC = 0x3A5A
+0x5BC0 = 0x3A5B
+0x5BC1 = 0x3A5C
+0x5BCD = 0x3A5D
+0x5BCF = 0x3A5E
+0x5BD6 = 0x3A5F
+0x5BD7 = 0x3A60
+0x5BD8 = 0x3A61
+0x5BD9 = 0x3A62
+0x5BDA = 0x3A63
+0x5BE0 = 0x3A64
+0x5BEF = 0x3A65
+0x5BF1 = 0x3A66
+0x5BF4 = 0x3A67
+0x5BFD = 0x3A68
+0x5C0C = 0x3A69
+0x5C17 = 0x3A6A
+0x5C1E = 0x3A6B
+0x5C1F = 0x3A6C
+0x5C23 = 0x3A6D
+0x5C26 = 0x3A6E
+0x5C29 = 0x3A6F
+0x5C2B = 0x3A70
+0x5C2C = 0x3A71
+0x5C2E = 0x3A72
+0x5C30 = 0x3A73
+0x5C32 = 0x3A74
+0x5C35 = 0x3A75
+0x5C36 = 0x3A76
+0x5C59 = 0x3A77
+0x5C5A = 0x3A78
+0x5C5C = 0x3A79
+0x5C62 = 0x3A7A
+0x5C63 = 0x3A7B
+0x5C67 = 0x3A7C
+0x5C68 = 0x3A7D
+0x5C69 = 0x3A7E
+0x5C6D = 0x3B21
+0x5C70 = 0x3B22
+0x5C74 = 0x3B23
+0x5C75 = 0x3B24
+0x5C7A = 0x3B25
+0x5C7B = 0x3B26
+0x5C7C = 0x3B27
+0x5C7D = 0x3B28
+0x5C87 = 0x3B29
+0x5C88 = 0x3B2A
+0x5C8A = 0x3B2B
+0x5C8F = 0x3B2C
+0x5C92 = 0x3B2D
+0x5C9D = 0x3B2E
+0x5C9F = 0x3B2F
+0x5CA0 = 0x3B30
+0x5CA2 = 0x3B31
+0x5CA3 = 0x3B32
+0x5CA6 = 0x3B33
+0x5CAA = 0x3B34
+0x5CB2 = 0x3B35
+0x5CB4 = 0x3B36
+0x5CB5 = 0x3B37
+0x5CBA = 0x3B38
+0x5CC9 = 0x3B39
+0x5CCB = 0x3B3A
+0x5CD2 = 0x3B3B
+0x5CD7 = 0x3B3D
+0x5CDD = 0x3B3C
+0x5CEE = 0x3B3E
+0x5CF1 = 0x3B3F
+0x5CF2 = 0x3B40
+0x5CF4 = 0x3B41
+0x5D01 = 0x3B42
+0x5D06 = 0x3B43
+0x5D0D = 0x3B44
+0x5D12 = 0x3B45
+0x5D23 = 0x3B47
+0x5D24 = 0x3B48
+0x5D26 = 0x3B49
+0x5D27 = 0x3B4A
+0x5D2B = 0x3B46
+0x5D31 = 0x3B4B
+0x5D34 = 0x3B4C
+0x5D39 = 0x3B4D
+0x5D3D = 0x3B4E
+0x5D3F = 0x3B4F
+0x5D42 = 0x3B50
+0x5D43 = 0x3B51
+0x5D46 = 0x3B52
+0x5D48 = 0x3B53
+0x5D4A = 0x3B57
+0x5D51 = 0x3B55
+0x5D55 = 0x3B54
+0x5D59 = 0x3B56
+0x5D5F = 0x3B58
+0x5D60 = 0x3B59
+0x5D61 = 0x3B5A
+0x5D62 = 0x3B5B
+0x5D64 = 0x3B5C
+0x5D6A = 0x3B5D
+0x5D6D = 0x3B5E
+0x5D70 = 0x3B5F
+0x5D79 = 0x3B60
+0x5D7A = 0x3B61
+0x5D7E = 0x3B62
+0x5D7F = 0x3B63
+0x5D81 = 0x3B64
+0x5D83 = 0x3B65
+0x5D88 = 0x3B66
+0x5D8A = 0x3B67
+0x5D92 = 0x3B68
+0x5D93 = 0x3B69
+0x5D94 = 0x3B6A
+0x5D95 = 0x3B6B
+0x5D99 = 0x3B6C
+0x5D9B = 0x3B6D
+0x5D9F = 0x3B6E
+0x5DA0 = 0x3B6F
+0x5DA7 = 0x3B70
+0x5DAB = 0x3B71
+0x5DB0 = 0x3B72
+0x5DB2 = 0x6674
+0x5DB4 = 0x3B73
+0x5DB8 = 0x3B74
+0x5DB9 = 0x3B75
+0x5DC3 = 0x3B76
+0x5DC7 = 0x3B77
+0x5DCB = 0x3B78
+0x5DCE = 0x3B7A
+0x5DD0 = 0x3B79
+0x5DD8 = 0x3B7B
+0x5DD9 = 0x3B7C
+0x5DE0 = 0x3B7D
+0x5DE4 = 0x3B7E
+0x5DE9 = 0x3C21
+0x5DF8 = 0x3C22
+0x5DF9 = 0x3C23
+0x5E00 = 0x3C24
+0x5E07 = 0x3C25
+0x5E0D = 0x3C26
+0x5E12 = 0x3C27
+0x5E14 = 0x3C28
+0x5E15 = 0x3C29
+0x5E18 = 0x3C2A
+0x5E1F = 0x3C2B
+0x5E20 = 0x3C2C
+0x5E28 = 0x3C2E
+0x5E2E = 0x3C2D
+0x5E32 = 0x3C2F
+0x5E35 = 0x3C30
+0x5E3E = 0x3C31
+0x5E49 = 0x3C34
+0x5E4B = 0x3C32
+0x5E50 = 0x3C33
+0x5E51 = 0x3C35
+0x5E56 = 0x3C36
+0x5E58 = 0x3C37
+0x5E5B = 0x3C38
+0x5E5C = 0x3C39
+0x5E5E = 0x3C3A
+0x5E68 = 0x3C3B
+0x5E6A = 0x3C3C
+0x5E6B = 0x3C3D
+0x5E6C = 0x3C3E
+0x5E6D = 0x3C3F
+0x5E6E = 0x3C40
+0x5E70 = 0x3C41
+0x5E80 = 0x3C42
+0x5E8B = 0x3C43
+0x5E8E = 0x3C44
+0x5EA2 = 0x3C45
+0x5EA4 = 0x3C46
+0x5EA5 = 0x3C47
+0x5EA8 = 0x3C48
+0x5EAA = 0x3C49
+0x5EAC = 0x3C4A
+0x5EB1 = 0x3C4B
+0x5EB3 = 0x3C4C
+0x5EBD = 0x3C4D
+0x5EBE = 0x3C4E
+0x5EBF = 0x3C4F
+0x5EC6 = 0x3C50
+0x5ECB = 0x3C52
+0x5ECC = 0x3C51
+0x5ECE = 0x3C53
+0x5ED1 = 0x3C54
+0x5ED2 = 0x3C55
+0x5ED4 = 0x3C56
+0x5ED5 = 0x3C57
+0x5EDC = 0x3C58
+0x5EDE = 0x3C59
+0x5EE5 = 0x3C5A
+0x5EEB = 0x3C5B
+0x5F02 = 0x3C5C
+0x5F06 = 0x3C5D
+0x5F07 = 0x3C5E
+0x5F08 = 0x3C5F
+0x5F0E = 0x3C60
+0x5F19 = 0x3C61
+0x5F1C = 0x3C62
+0x5F1D = 0x3C63
+0x5F21 = 0x3C64
+0x5F22 = 0x3C65
+0x5F23 = 0x3C66
+0x5F24 = 0x3C67
+0x5F28 = 0x3C68
+0x5F2B = 0x3C69
+0x5F2C = 0x3C6A
+0x5F2E = 0x3C6B
+0x5F30 = 0x3C6C
+0x5F34 = 0x3C6D
+0x5F36 = 0x3C6E
+0x5F3B = 0x3C6F
+0x5F3D = 0x3C70
+0x5F3F = 0x3C71
+0x5F40 = 0x3C72
+0x5F44 = 0x3C73
+0x5F45 = 0x3C74
+0x5F47 = 0x3C75
+0x5F4D = 0x3C76
+0x5F50 = 0x3C77
+0x5F54 = 0x3C78
+0x5F58 = 0x3C79
+0x5F5B = 0x3C7A
+0x5F60 = 0x3C7B
+0x5F63 = 0x3C7C
+0x5F64 = 0x3C7D
+0x5F67 = 0x3C7E
+0x5F6F = 0x3D21
+0x5F72 = 0x3D22
+0x5F74 = 0x3D23
+0x5F75 = 0x3D24
+0x5F78 = 0x3D25
+0x5F7A = 0x3D26
+0x5F7D = 0x3D27
+0x5F7E = 0x3D28
+0x5F89 = 0x3D29
+0x5F8D = 0x3D2A
+0x5F8F = 0x3D2B
+0x5F96 = 0x3D2C
+0x5F9C = 0x3D2D
+0x5F9D = 0x3D2E
+0x5FA2 = 0x3D2F
+0x5FA4 = 0x3D32
+0x5FA7 = 0x3D30
+0x5FAB = 0x3D31
+0x5FAC = 0x3D33
+0x5FAF = 0x3D34
+0x5FB0 = 0x3D35
+0x5FB1 = 0x3D36
+0x5FB8 = 0x3D37
+0x5FC4 = 0x3D38
+0x5FC7 = 0x3D39
+0x5FC8 = 0x3D3A
+0x5FC9 = 0x3D3B
+0x5FCB = 0x3D3C
+0x5FD0 = 0x3D3D
+0x5FD1 = 0x3D3E
+0x5FD2 = 0x3D3F
+0x5FD3 = 0x3D40
+0x5FD4 = 0x3D41
+0x5FDE = 0x3D42
+0x5FE1 = 0x3D43
+0x5FE2 = 0x3D44
+0x5FE8 = 0x3D45
+0x5FE9 = 0x3D46
+0x5FEA = 0x3D47
+0x5FEC = 0x3D48
+0x5FED = 0x3D49
+0x5FEE = 0x3D4A
+0x5FEF = 0x3D4B
+0x5FF2 = 0x3D4C
+0x5FF3 = 0x3D4D
+0x5FF6 = 0x3D4E
+0x5FFA = 0x3D4F
+0x5FFC = 0x3D50
+0x6007 = 0x3D51
+0x600A = 0x3D52
+0x600D = 0x3D53
+0x6013 = 0x3D54
+0x6014 = 0x3D55
+0x6017 = 0x3D56
+0x6018 = 0x3D57
+0x601A = 0x3D58
+0x601F = 0x3D59
+0x6024 = 0x3D5A
+0x602D = 0x3D5B
+0x6033 = 0x3D5C
+0x6035 = 0x3D5D
+0x6040 = 0x3D5E
+0x6047 = 0x3D5F
+0x6048 = 0x3D60
+0x6049 = 0x3D61
+0x604C = 0x3D62
+0x6051 = 0x3D63
+0x6054 = 0x3D64
+0x6056 = 0x3D65
+0x6057 = 0x3D66
+0x605D = 0x3D67
+0x6061 = 0x3D68
+0x6067 = 0x3D69
+0x6071 = 0x3D6A
+0x607E = 0x3D6B
+0x607F = 0x3D6C
+0x6082 = 0x3D6D
+0x6086 = 0x3D6E
+0x6088 = 0x3D6F
+0x608A = 0x3D70
+0x608E = 0x3D71
+0x6091 = 0x3D72
+0x6093 = 0x3D73
+0x6095 = 0x3D74
+0x6098 = 0x3D75
+0x609D = 0x3D76
+0x609E = 0x3D77
+0x60A2 = 0x3D78
+0x60A4 = 0x3D79
+0x60A5 = 0x3D7A
+0x60A8 = 0x3D7B
+0x60B0 = 0x3D7C
+0x60B1 = 0x3D7D
+0x60B7 = 0x3D7E
+0x60BB = 0x3E21
+0x60BE = 0x3E22
+0x60C2 = 0x3E23
+0x60C4 = 0x3E24
+0x60C8 = 0x3E25
+0x60C9 = 0x3E26
+0x60CA = 0x3E27
+0x60CB = 0x3E28
+0x60CE = 0x3E29
+0x60CF = 0x3E2A
+0x60D4 = 0x3E2B
+0x60D5 = 0x3E2C
+0x60D9 = 0x3E2D
+0x60DB = 0x3E2E
+0x60DD = 0x3E2F
+0x60DE = 0x3E30
+0x60E2 = 0x3E31
+0x60E5 = 0x3E32
+0x60F2 = 0x3E33
+0x60F5 = 0x3E34
+0x60F8 = 0x3E35
+0x60FC = 0x3E36
+0x60FD = 0x3E37
+0x6102 = 0x3E38
+0x6107 = 0x3E39
+0x610A = 0x3E3A
+0x610C = 0x3E3B
+0x6110 = 0x3E3C
+0x6111 = 0x3E3D
+0x6112 = 0x3E3E
+0x6113 = 0x3E3F
+0x6114 = 0x3E40
+0x6116 = 0x3E41
+0x6117 = 0x3E42
+0x6119 = 0x3E43
+0x611C = 0x3E44
+0x611E = 0x3E45
+0x6122 = 0x3E46
+0x612A = 0x3E47
+0x612B = 0x3E48
+0x6130 = 0x3E49
+0x6131 = 0x3E4A
+0x6135 = 0x3E4B
+0x6136 = 0x3E4C
+0x6137 = 0x3E4D
+0x6139 = 0x3E4E
+0x6141 = 0x3E4F
+0x6145 = 0x3E50
+0x6146 = 0x3E51
+0x6149 = 0x3E52
+0x615E = 0x3E53
+0x6160 = 0x3E54
+0x616C = 0x3E55
+0x6172 = 0x3E56
+0x6178 = 0x3E57
+0x617B = 0x3E58
+0x617C = 0x3E59
+0x617F = 0x3E5A
+0x6180 = 0x3E5B
+0x6181 = 0x3E5C
+0x6183 = 0x3E5D
+0x6184 = 0x3E5E
+0x618B = 0x3E5F
+0x618D = 0x3E60
+0x6192 = 0x3E61
+0x6193 = 0x3E62
+0x6197 = 0x3E63
+0x6198 = 0x3E64
+0x619C = 0x3E65
+0x619D = 0x3E66
+0x619F = 0x3E67
+0x61A0 = 0x3E68
+0x61A5 = 0x3E69
+0x61A8 = 0x3E6A
+0x61AA = 0x3E6B
+0x61AD = 0x3E6C
+0x61B8 = 0x3E6D
+0x61B9 = 0x3E6E
+0x61BC = 0x3E6F
+0x61C0 = 0x3E70
+0x61C1 = 0x3E71
+0x61C2 = 0x3E72
+0x61CE = 0x3E73
+0x61CF = 0x3E74
+0x61D5 = 0x3E75
+0x61DC = 0x3E76
+0x61DD = 0x3E77
+0x61DE = 0x3E78
+0x61DF = 0x3E79
+0x61E1 = 0x3E7A
+0x61E2 = 0x3E7B
+0x61E5 = 0x3E7E
+0x61E7 = 0x3E7C
+0x61E9 = 0x3E7D
+0x61EC = 0x3F21
+0x61ED = 0x3F22
+0x61EF = 0x3F23
+0x6201 = 0x3F24
+0x6203 = 0x3F25
+0x6204 = 0x3F26
+0x6207 = 0x3F27
+0x6213 = 0x3F28
+0x6215 = 0x3F29
+0x621C = 0x3F2A
+0x6220 = 0x3F2B
+0x6222 = 0x3F2C
+0x6223 = 0x3F2D
+0x6227 = 0x3F2E
+0x6229 = 0x3F2F
+0x622B = 0x3F30
+0x6239 = 0x3F31
+0x623D = 0x3F32
+0x6242 = 0x3F33
+0x6243 = 0x3F34
+0x6244 = 0x3F35
+0x6246 = 0x3F36
+0x624C = 0x3F37
+0x6250 = 0x3F38
+0x6251 = 0x3F39
+0x6252 = 0x3F3A
+0x6254 = 0x3F3B
+0x6256 = 0x3F3C
+0x625A = 0x3F3D
+0x625C = 0x3F3E
+0x6264 = 0x3F3F
+0x626D = 0x3F40
+0x626F = 0x3F41
+0x6273 = 0x3F42
+0x627A = 0x3F43
+0x627D = 0x3F44
+0x628D = 0x3F45
+0x628E = 0x3F46
+0x628F = 0x3F47
+0x6290 = 0x3F48
+0x62A6 = 0x3F49
+0x62A8 = 0x3F4A
+0x62B3 = 0x3F4B
+0x62B6 = 0x3F4C
+0x62B7 = 0x3F4D
+0x62BA = 0x3F4E
+0x62BE = 0x3F4F
+0x62BF = 0x3F50
+0x62C4 = 0x3F51
+0x62CE = 0x3F52
+0x62D5 = 0x3F53
+0x62D6 = 0x3F54
+0x62DA = 0x3F55
+0x62EA = 0x3F56
+0x62F2 = 0x3F57
+0x62F4 = 0x3F58
+0x62FC = 0x3F59
+0x62FD = 0x3F5A
+0x6303 = 0x3F5B
+0x6304 = 0x3F5C
+0x630A = 0x3F5D
+0x630B = 0x3F5E
+0x630D = 0x3F5F
+0x6310 = 0x3F60
+0x6313 = 0x3F61
+0x6316 = 0x3F62
+0x6318 = 0x3F63
+0x6329 = 0x3F64
+0x632A = 0x3F65
+0x632D = 0x3F66
+0x6335 = 0x3F67
+0x6336 = 0x3F68
+0x6339 = 0x3F69
+0x633C = 0x3F6A
+0x6341 = 0x3F6B
+0x6342 = 0x3F6C
+0x6343 = 0x3F6D
+0x6344 = 0x3F6E
+0x6346 = 0x3F6F
+0x634A = 0x3F70
+0x634B = 0x3F71
+0x634E = 0x3F72
+0x6352 = 0x3F73
+0x6353 = 0x3F74
+0x6354 = 0x3F75
+0x6358 = 0x3F76
+0x635B = 0x3F77
+0x6365 = 0x3F78
+0x6366 = 0x3F79
+0x636C = 0x3F7A
+0x636D = 0x3F7B
+0x6371 = 0x3F7C
+0x6374 = 0x3F7D
+0x6375 = 0x3F7E
+0x6378 = 0x4021
+0x637C = 0x4022
+0x637D = 0x4023
+0x637F = 0x4024
+0x6382 = 0x4025
+0x6384 = 0x4026
+0x6387 = 0x4027
+0x638A = 0x4028
+0x6390 = 0x4029
+0x6394 = 0x402A
+0x6395 = 0x402B
+0x6399 = 0x402C
+0x639A = 0x402D
+0x639E = 0x402E
+0x63A4 = 0x402F
+0x63A6 = 0x4030
+0x63AD = 0x4031
+0x63AE = 0x4032
+0x63AF = 0x4033
+0x63BD = 0x4034
+0x63C1 = 0x4035
+0x63C5 = 0x4036
+0x63C8 = 0x4037
+0x63CE = 0x4038
+0x63D1 = 0x4039
+0x63D3 = 0x403A
+0x63D4 = 0x403B
+0x63D5 = 0x403C
+0x63DC = 0x403D
+0x63E0 = 0x403E
+0x63E5 = 0x403F
+0x63EA = 0x4040
+0x63EC = 0x4041
+0x63F2 = 0x4042
+0x63F3 = 0x4043
+0x63F5 = 0x4044
+0x63F8 = 0x4045
+0x63F9 = 0x4046
+0x6409 = 0x4047
+0x640A = 0x4048
+0x6410 = 0x4049
+0x6412 = 0x404A
+0x6414 = 0x404B
+0x6418 = 0x404C
+0x641E = 0x404D
+0x6420 = 0x404E
+0x6422 = 0x404F
+0x6424 = 0x4050
+0x6425 = 0x4051
+0x6429 = 0x4052
+0x642A = 0x4053
+0x642F = 0x4054
+0x6430 = 0x4055
+0x6435 = 0x4056
+0x643D = 0x4057
+0x643F = 0x4058
+0x644B = 0x4059
+0x644F = 0x405A
+0x6451 = 0x405B
+0x6452 = 0x405C
+0x6453 = 0x405D
+0x6454 = 0x405E
+0x645A = 0x405F
+0x645B = 0x4060
+0x645C = 0x4061
+0x645D = 0x4062
+0x645F = 0x4063
+0x6460 = 0x4064
+0x6461 = 0x4065
+0x6463 = 0x4066
+0x646D = 0x4067
+0x6473 = 0x4068
+0x6474 = 0x4069
+0x647B = 0x406A
+0x647D = 0x406B
+0x6485 = 0x406C
+0x6487 = 0x406D
+0x648F = 0x406E
+0x6490 = 0x406F
+0x6491 = 0x4070
+0x6498 = 0x4071
+0x6499 = 0x4072
+0x649B = 0x4073
+0x649D = 0x4074
+0x649F = 0x4075
+0x64A1 = 0x4076
+0x64A3 = 0x4077
+0x64A6 = 0x4078
+0x64A8 = 0x4079
+0x64AC = 0x407A
+0x64B3 = 0x407B
+0x64BD = 0x407C
+0x64BE = 0x407D
+0x64BF = 0x407E
+0x64C4 = 0x4121
+0x64C9 = 0x4122
+0x64CA = 0x4123
+0x64CB = 0x4124
+0x64CC = 0x4125
+0x64CE = 0x4126
+0x64D0 = 0x4127
+0x64D1 = 0x4128
+0x64D5 = 0x4129
+0x64D7 = 0x412A
+0x64E4 = 0x412B
+0x64E5 = 0x412C
+0x64E9 = 0x412D
+0x64EA = 0x412E
+0x64ED = 0x412F
+0x64F0 = 0x4130
+0x64F5 = 0x4131
+0x64F7 = 0x4132
+0x64FB = 0x4133
+0x64FF = 0x4134
+0x6501 = 0x4135
+0x6504 = 0x4136
+0x6508 = 0x4137
+0x6509 = 0x4138
+0x650A = 0x4139
+0x650F = 0x413A
+0x6513 = 0x413B
+0x6514 = 0x413C
+0x6516 = 0x413D
+0x6519 = 0x413E
+0x651B = 0x413F
+0x651E = 0x4140
+0x651F = 0x4141
+0x6522 = 0x4142
+0x6526 = 0x4143
+0x6529 = 0x4144
+0x652E = 0x4145
+0x6531 = 0x4146
+0x653A = 0x4147
+0x653C = 0x4148
+0x653D = 0x4149
+0x6543 = 0x414A
+0x6547 = 0x414B
+0x6549 = 0x414C
+0x6550 = 0x414D
+0x6552 = 0x414E
+0x6554 = 0x414F
+0x655F = 0x4150
+0x6560 = 0x4151
+0x6567 = 0x4152
+0x656B = 0x4153
+0x657A = 0x4154
+0x657D = 0x4155
+0x6581 = 0x4156
+0x6585 = 0x4157
+0x658A = 0x4158
+0x6592 = 0x4159
+0x6595 = 0x415A
+0x6598 = 0x415B
+0x659D = 0x415C
+0x65A0 = 0x415D
+0x65A3 = 0x415E
+0x65A6 = 0x415F
+0x65AE = 0x4160
+0x65B2 = 0x4161
+0x65B3 = 0x4162
+0x65B4 = 0x4163
+0x65BF = 0x4164
+0x65C2 = 0x4165
+0x65C8 = 0x4166
+0x65C9 = 0x4167
+0x65CE = 0x4168
+0x65D0 = 0x4169
+0x65D4 = 0x416A
+0x65D6 = 0x416B
+0x65D8 = 0x416C
+0x65DF = 0x416D
+0x65F0 = 0x416E
+0x65F2 = 0x416F
+0x65F4 = 0x4170
+0x65F5 = 0x4171
+0x65F9 = 0x4172
+0x65FE = 0x4173
+0x65FF = 0x4174
+0x6600 = 0x4175
+0x6604 = 0x4176
+0x6608 = 0x4177
+0x6609 = 0x4178
+0x660D = 0x4179
+0x6611 = 0x417A
+0x6612 = 0x417B
+0x6615 = 0x417C
+0x6616 = 0x417D
+0x661D = 0x417E
+0x661E = 0x4221
+0x6621 = 0x4222
+0x6622 = 0x4223
+0x6623 = 0x4224
+0x6624 = 0x4225
+0x6626 = 0x4226
+0x6629 = 0x4227
+0x662A = 0x4228
+0x662B = 0x4229
+0x662C = 0x422A
+0x662E = 0x422B
+0x6630 = 0x422C
+0x6631 = 0x422D
+0x6633 = 0x422E
+0x6637 = 0x4230
+0x6639 = 0x422F
+0x6640 = 0x4231
+0x6645 = 0x4232
+0x6646 = 0x4233
+0x664A = 0x4234
+0x664C = 0x4235
+0x664E = 0x4237
+0x6651 = 0x4236
+0x6657 = 0x4238
+0x6658 = 0x4239
+0x6659 = 0x423A
+0x665B = 0x423B
+0x665C = 0x423C
+0x6660 = 0x423D
+0x6661 = 0x423E
+0x666A = 0x4240
+0x666B = 0x4241
+0x666C = 0x4242
+0x6673 = 0x4244
+0x6675 = 0x4245
+0x6677 = 0x4247
+0x6678 = 0x4248
+0x6679 = 0x4249
+0x667B = 0x424A
+0x667C = 0x424C
+0x667E = 0x4243
+0x667F = 0x4246
+0x6680 = 0x424B
+0x668B = 0x424D
+0x668C = 0x424E
+0x668D = 0x424F
+0x6690 = 0x4250
+0x6692 = 0x4251
+0x6699 = 0x4252
+0x669A = 0x4253
+0x669B = 0x4254
+0x669C = 0x4255
+0x669F = 0x4256
+0x66A0 = 0x4257
+0x66A4 = 0x4258
+0x66AD = 0x4259
+0x66B1 = 0x425A
+0x66B2 = 0x425B
+0x66B5 = 0x425C
+0x66BB = 0x425D
+0x66BF = 0x425E
+0x66C0 = 0x425F
+0x66C2 = 0x4260
+0x66C3 = 0x4261
+0x66C8 = 0x4262
+0x66CC = 0x4263
+0x66CE = 0x4264
+0x66CF = 0x4265
+0x66D4 = 0x4266
+0x66DB = 0x4267
+0x66DF = 0x4268
+0x66E8 = 0x4269
+0x66EB = 0x426A
+0x66EC = 0x426B
+0x66EE = 0x426C
+0x66FA = 0x426D
+0x66FB = 0x423F
+0x6705 = 0x426E
+0x6707 = 0x426F
+0x670E = 0x4270
+0x6713 = 0x4271
+0x6719 = 0x4272
+0x671C = 0x4273
+0x6720 = 0x4274
+0x6722 = 0x4275
+0x6733 = 0x4276
+0x673E = 0x4277
+0x6745 = 0x4278
+0x6747 = 0x4279
+0x6748 = 0x427A
+0x674C = 0x427B
+0x6754 = 0x427C
+0x6755 = 0x427D
+0x675D = 0x427E
+0x6766 = 0x4321
+0x676C = 0x4322
+0x676E = 0x4323
+0x6774 = 0x4324
+0x6776 = 0x4325
+0x677B = 0x4326
+0x6781 = 0x4327
+0x6784 = 0x4328
+0x678E = 0x4329
+0x678F = 0x432A
+0x6791 = 0x432B
+0x6793 = 0x432C
+0x6796 = 0x432D
+0x6798 = 0x432E
+0x6799 = 0x432F
+0x679B = 0x4330
+0x67B0 = 0x4331
+0x67B1 = 0x4332
+0x67B2 = 0x4333
+0x67B5 = 0x4334
+0x67BB = 0x4335
+0x67BC = 0x4336
+0x67BD = 0x4337
+0x67C0 = 0x4339
+0x67C2 = 0x433A
+0x67C3 = 0x433B
+0x67C5 = 0x433C
+0x67C8 = 0x433D
+0x67C9 = 0x433E
+0x67D2 = 0x433F
+0x67D7 = 0x4340
+0x67D9 = 0x4341
+0x67DC = 0x4342
+0x67E1 = 0x4343
+0x67E6 = 0x4344
+0x67F0 = 0x4345
+0x67F2 = 0x4346
+0x67F6 = 0x4347
+0x67F7 = 0x4348
+0x67F9 = 0x4338
+0x6814 = 0x434A
+0x6819 = 0x434B
+0x681D = 0x434C
+0x681F = 0x434D
+0x6827 = 0x434F
+0x6828 = 0x434E
+0x682C = 0x4350
+0x682D = 0x4351
+0x682F = 0x4352
+0x6830 = 0x4353
+0x6831 = 0x4354
+0x6833 = 0x4355
+0x683B = 0x4356
+0x683F = 0x4357
+0x6844 = 0x4358
+0x6845 = 0x4359
+0x684A = 0x435A
+0x684C = 0x435B
+0x6852 = 0x4349
+0x6855 = 0x435C
+0x6857 = 0x435D
+0x6858 = 0x435E
+0x685B = 0x435F
+0x686B = 0x4360
+0x686E = 0x4361
+0x686F = 0x4362
+0x6870 = 0x4363
+0x6871 = 0x4364
+0x6872 = 0x4365
+0x6875 = 0x4366
+0x6879 = 0x4367
+0x687A = 0x4368
+0x687B = 0x4369
+0x687C = 0x436A
+0x6882 = 0x436B
+0x6884 = 0x436C
+0x6886 = 0x436D
+0x6888 = 0x436E
+0x6896 = 0x436F
+0x6898 = 0x4370
+0x689A = 0x4371
+0x689C = 0x4372
+0x68A1 = 0x4373
+0x68A3 = 0x4374
+0x68A5 = 0x4375
+0x68A9 = 0x4376
+0x68AA = 0x4377
+0x68AE = 0x4378
+0x68B2 = 0x4379
+0x68BB = 0x437A
+0x68C5 = 0x437B
+0x68C8 = 0x437C
+0x68CC = 0x437D
+0x68CF = 0x437E
+0x68D0 = 0x4421
+0x68D1 = 0x4422
+0x68D3 = 0x4423
+0x68D6 = 0x4424
+0x68D9 = 0x4425
+0x68DC = 0x4426
+0x68DD = 0x4427
+0x68E5 = 0x4428
+0x68E8 = 0x4429
+0x68EA = 0x442A
+0x68EB = 0x442B
+0x68EC = 0x442C
+0x68ED = 0x442D
+0x68F0 = 0x442E
+0x68F1 = 0x442F
+0x68F5 = 0x4430
+0x68F6 = 0x4431
+0x68FB = 0x4432
+0x68FC = 0x4433
+0x68FD = 0x4434
+0x6906 = 0x4435
+0x6909 = 0x4436
+0x690A = 0x4437
+0x6910 = 0x4438
+0x6911 = 0x4439
+0x6913 = 0x443A
+0x6916 = 0x443B
+0x6917 = 0x443C
+0x6931 = 0x443D
+0x6933 = 0x443E
+0x6935 = 0x443F
+0x6938 = 0x4440
+0x693B = 0x4441
+0x6942 = 0x4442
+0x6945 = 0x4443
+0x6949 = 0x4444
+0x694E = 0x4445
+0x6957 = 0x4446
+0x695B = 0x4447
+0x6963 = 0x4448
+0x6964 = 0x4449
+0x6965 = 0x444A
+0x6966 = 0x444B
+0x6968 = 0x444C
+0x6969 = 0x444D
+0x696C = 0x444E
+0x6970 = 0x444F
+0x6971 = 0x4450
+0x6972 = 0x4451
+0x697A = 0x4452
+0x697B = 0x4453
+0x697F = 0x4454
+0x6980 = 0x4455
+0x698D = 0x4456
+0x6992 = 0x4457
+0x6996 = 0x4458
+0x6998 = 0x4459
+0x69A1 = 0x445A
+0x69A5 = 0x445B
+0x69A6 = 0x445C
+0x69A8 = 0x445D
+0x69AB = 0x445E
+0x69AD = 0x445F
+0x69AF = 0x4460
+0x69B7 = 0x4461
+0x69B8 = 0x4462
+0x69BA = 0x4463
+0x69BC = 0x4464
+0x69C5 = 0x4465
+0x69C8 = 0x4466
+0x69D1 = 0x4467
+0x69D6 = 0x4468
+0x69D7 = 0x4469
+0x69E2 = 0x446A
+0x69E5 = 0x446B
+0x69EE = 0x446C
+0x69EF = 0x446D
+0x69F1 = 0x446E
+0x69F3 = 0x446F
+0x69F5 = 0x4470
+0x69FE = 0x4471
+0x6A00 = 0x4472
+0x6A01 = 0x4473
+0x6A03 = 0x4474
+0x6A0F = 0x4475
+0x6A11 = 0x4476
+0x6A15 = 0x4477
+0x6A1A = 0x4478
+0x6A1D = 0x4479
+0x6A20 = 0x447A
+0x6A24 = 0x447B
+0x6A28 = 0x447C
+0x6A30 = 0x447D
+0x6A32 = 0x447E
+0x6A34 = 0x4521
+0x6A37 = 0x4522
+0x6A3B = 0x4523
+0x6A3E = 0x4524
+0x6A3F = 0x4525
+0x6A45 = 0x4526
+0x6A46 = 0x4527
+0x6A49 = 0x4528
+0x6A4A = 0x4529
+0x6A4E = 0x452A
+0x6A50 = 0x452B
+0x6A51 = 0x452C
+0x6A52 = 0x452D
+0x6A55 = 0x452E
+0x6A56 = 0x452F
+0x6A5B = 0x4530
+0x6A64 = 0x4531
+0x6A67 = 0x4532
+0x6A6A = 0x4533
+0x6A71 = 0x4534
+0x6A73 = 0x4535
+0x6A7E = 0x4536
+0x6A81 = 0x4537
+0x6A83 = 0x4538
+0x6A86 = 0x4539
+0x6A87 = 0x453A
+0x6A89 = 0x453B
+0x6A8B = 0x453C
+0x6A91 = 0x453D
+0x6A9B = 0x453E
+0x6A9D = 0x453F
+0x6A9E = 0x4540
+0x6A9F = 0x4541
+0x6AA5 = 0x4542
+0x6AAB = 0x4543
+0x6AAF = 0x4544
+0x6AB0 = 0x4545
+0x6AB1 = 0x4546
+0x6AB4 = 0x4547
+0x6ABD = 0x4548
+0x6ABE = 0x4549
+0x6ABF = 0x454A
+0x6AC6 = 0x454B
+0x6AC8 = 0x454D
+0x6AC9 = 0x454C
+0x6ACC = 0x454E
+0x6AD0 = 0x454F
+0x6AD4 = 0x4550
+0x6AD5 = 0x4551
+0x6AD6 = 0x4552
+0x6ADC = 0x4553
+0x6ADD = 0x4554
+0x6AE4 = 0x4555
+0x6AE7 = 0x4556
+0x6AEC = 0x4557
+0x6AF0 = 0x4558
+0x6AF1 = 0x4559
+0x6AF2 = 0x455A
+0x6AFC = 0x455B
+0x6AFD = 0x455C
+0x6B02 = 0x455D
+0x6B03 = 0x455E
+0x6B06 = 0x455F
+0x6B07 = 0x4560
+0x6B09 = 0x4561
+0x6B0F = 0x4562
+0x6B10 = 0x4563
+0x6B11 = 0x4564
+0x6B17 = 0x4565
+0x6B1B = 0x4566
+0x6B1E = 0x4567
+0x6B24 = 0x4568
+0x6B28 = 0x4569
+0x6B2B = 0x456A
+0x6B2C = 0x456B
+0x6B2F = 0x456C
+0x6B35 = 0x456D
+0x6B36 = 0x456E
+0x6B3B = 0x456F
+0x6B3F = 0x4570
+0x6B46 = 0x4571
+0x6B4A = 0x4572
+0x6B4D = 0x4573
+0x6B52 = 0x4574
+0x6B56 = 0x4575
+0x6B58 = 0x4576
+0x6B5D = 0x4577
+0x6B60 = 0x4578
+0x6B67 = 0x4579
+0x6B6B = 0x457A
+0x6B6E = 0x457B
+0x6B70 = 0x457C
+0x6B75 = 0x457D
+0x6B7D = 0x457E
+0x6B7E = 0x4621
+0x6B82 = 0x4622
+0x6B85 = 0x4623
+0x6B97 = 0x4624
+0x6B9B = 0x4625
+0x6B9F = 0x4626
+0x6BA0 = 0x4627
+0x6BA2 = 0x4628
+0x6BA3 = 0x4629
+0x6BA8 = 0x462A
+0x6BA9 = 0x462B
+0x6BAC = 0x462C
+0x6BAD = 0x462D
+0x6BAE = 0x462E
+0x6BB0 = 0x462F
+0x6BB8 = 0x4630
+0x6BB9 = 0x4631
+0x6BBD = 0x4632
+0x6BBE = 0x4633
+0x6BC3 = 0x4634
+0x6BC4 = 0x4635
+0x6BC9 = 0x4636
+0x6BCC = 0x4637
+0x6BD6 = 0x4638
+0x6BDA = 0x4639
+0x6BE1 = 0x463A
+0x6BE3 = 0x463B
+0x6BE6 = 0x463C
+0x6BE7 = 0x463D
+0x6BEE = 0x463E
+0x6BF1 = 0x463F
+0x6BF7 = 0x4640
+0x6BF9 = 0x4641
+0x6BFF = 0x4642
+0x6C02 = 0x4643
+0x6C04 = 0x4644
+0x6C05 = 0x4645
+0x6C09 = 0x4646
+0x6C0D = 0x4647
+0x6C0E = 0x4648
+0x6C10 = 0x4649
+0x6C12 = 0x464A
+0x6C19 = 0x464B
+0x6C1F = 0x464C
+0x6C26 = 0x464D
+0x6C27 = 0x464E
+0x6C28 = 0x464F
+0x6C2C = 0x4650
+0x6C2E = 0x4651
+0x6C33 = 0x4652
+0x6C35 = 0x4653
+0x6C36 = 0x4654
+0x6C3A = 0x4655
+0x6C3B = 0x4656
+0x6C3F = 0x4657
+0x6C4A = 0x4658
+0x6C4B = 0x4659
+0x6C4D = 0x465A
+0x6C4F = 0x465B
+0x6C52 = 0x465C
+0x6C54 = 0x465D
+0x6C59 = 0x465E
+0x6C5B = 0x465F
+0x6C5C = 0x4660
+0x6C67 = 0x4736
+0x6C6B = 0x4661
+0x6C6D = 0x4662
+0x6C6F = 0x4663
+0x6C74 = 0x4664
+0x6C76 = 0x4665
+0x6C78 = 0x4666
+0x6C79 = 0x4667
+0x6C7B = 0x4668
+0x6C85 = 0x4669
+0x6C86 = 0x466A
+0x6C87 = 0x466B
+0x6C89 = 0x466C
+0x6C94 = 0x466D
+0x6C95 = 0x466E
+0x6C97 = 0x466F
+0x6C98 = 0x4670
+0x6C9C = 0x4671
+0x6C9F = 0x4672
+0x6CB0 = 0x4673
+0x6CB2 = 0x4674
+0x6CB4 = 0x4675
+0x6CC2 = 0x4676
+0x6CC6 = 0x4677
+0x6CCD = 0x4678
+0x6CCF = 0x4679
+0x6CD0 = 0x467A
+0x6CD1 = 0x467B
+0x6CD2 = 0x467C
+0x6CD4 = 0x467D
+0x6CD6 = 0x467E
+0x6CDA = 0x4721
+0x6CDC = 0x4722
+0x6CE0 = 0x4723
+0x6CE7 = 0x4724
+0x6CE9 = 0x4725
+0x6CEB = 0x4726
+0x6CEC = 0x4727
+0x6CEE = 0x4728
+0x6CF2 = 0x4729
+0x6CF4 = 0x472A
+0x6D04 = 0x472B
+0x6D07 = 0x472C
+0x6D0A = 0x472D
+0x6D0E = 0x472E
+0x6D0F = 0x472F
+0x6D11 = 0x4730
+0x6D13 = 0x4731
+0x6D1A = 0x4732
+0x6D26 = 0x4733
+0x6D27 = 0x4734
+0x6D28 = 0x4735
+0x6D2E = 0x4737
+0x6D2F = 0x4738
+0x6D31 = 0x4739
+0x6D39 = 0x473A
+0x6D3C = 0x473B
+0x6D3F = 0x473C
+0x6D57 = 0x473D
+0x6D5E = 0x473E
+0x6D5F = 0x473F
+0x6D61 = 0x4740
+0x6D65 = 0x4741
+0x6D67 = 0x4742
+0x6D6F = 0x4743
+0x6D70 = 0x4744
+0x6D7C = 0x4745
+0x6D82 = 0x4746
+0x6D87 = 0x4747
+0x6D91 = 0x4748
+0x6D92 = 0x4749
+0x6D94 = 0x474A
+0x6D96 = 0x474B
+0x6D97 = 0x474C
+0x6D98 = 0x474D
+0x6DAA = 0x474E
+0x6DAC = 0x474F
+0x6DB4 = 0x4750
+0x6DB7 = 0x4751
+0x6DB9 = 0x4752
+0x6DBD = 0x4753
+0x6DBF = 0x4754
+0x6DC4 = 0x4755
+0x6DC8 = 0x4756
+0x6DCA = 0x4757
+0x6DCE = 0x4758
+0x6DCF = 0x4759
+0x6DD6 = 0x475A
+0x6DDB = 0x475B
+0x6DDD = 0x475C
+0x6DDF = 0x475D
+0x6DE0 = 0x475E
+0x6DE2 = 0x475F
+0x6DE5 = 0x4760
+0x6DE9 = 0x4761
+0x6DEF = 0x4762
+0x6DF0 = 0x4763
+0x6DF4 = 0x4764
+0x6DF6 = 0x4765
+0x6DFC = 0x4766
+0x6E00 = 0x4767
+0x6E04 = 0x4768
+0x6E1E = 0x4769
+0x6E22 = 0x476A
+0x6E27 = 0x476B
+0x6E32 = 0x476C
+0x6E36 = 0x476D
+0x6E39 = 0x476E
+0x6E3B = 0x476F
+0x6E3C = 0x4770
+0x6E44 = 0x4771
+0x6E45 = 0x4772
+0x6E48 = 0x4773
+0x6E49 = 0x4774
+0x6E4B = 0x4775
+0x6E4F = 0x4776
+0x6E51 = 0x4777
+0x6E52 = 0x4778
+0x6E53 = 0x4779
+0x6E54 = 0x477A
+0x6E57 = 0x477B
+0x6E5C = 0x477C
+0x6E5D = 0x477D
+0x6E5E = 0x477E
+0x6E62 = 0x4821
+0x6E63 = 0x4822
+0x6E68 = 0x4823
+0x6E73 = 0x4824
+0x6E7B = 0x4825
+0x6E7D = 0x4826
+0x6E8D = 0x4827
+0x6E93 = 0x4828
+0x6E99 = 0x4829
+0x6EA0 = 0x482A
+0x6EA7 = 0x482B
+0x6EAD = 0x482C
+0x6EAE = 0x482D
+0x6EB1 = 0x482E
+0x6EB3 = 0x482F
+0x6EBB = 0x4830
+0x6EBF = 0x4831
+0x6EC0 = 0x4832
+0x6EC1 = 0x4833
+0x6EC3 = 0x4834
+0x6EC7 = 0x4835
+0x6EC8 = 0x4836
+0x6ECA = 0x4837
+0x6ECD = 0x4838
+0x6ECE = 0x4839
+0x6ECF = 0x483A
+0x6EEB = 0x483B
+0x6EED = 0x483C
+0x6EEE = 0x483D
+0x6EF9 = 0x483E
+0x6EFB = 0x483F
+0x6EFD = 0x4840
+0x6F04 = 0x4841
+0x6F08 = 0x4842
+0x6F0A = 0x4843
+0x6F0C = 0x4844
+0x6F0D = 0x4845
+0x6F16 = 0x4846
+0x6F18 = 0x4847
+0x6F1A = 0x4848
+0x6F1B = 0x4849
+0x6F26 = 0x484A
+0x6F29 = 0x484B
+0x6F2A = 0x484C
+0x6F2D = 0x4853
+0x6F2F = 0x484D
+0x6F30 = 0x484E
+0x6F33 = 0x484F
+0x6F36 = 0x4850
+0x6F3B = 0x4851
+0x6F3C = 0x4852
+0x6F4F = 0x4854
+0x6F51 = 0x4855
+0x6F52 = 0x4856
+0x6F53 = 0x4857
+0x6F57 = 0x4858
+0x6F59 = 0x4859
+0x6F5A = 0x485A
+0x6F5D = 0x485B
+0x6F5E = 0x485C
+0x6F61 = 0x485D
+0x6F62 = 0x485E
+0x6F68 = 0x485F
+0x6F6C = 0x4860
+0x6F7D = 0x4861
+0x6F7E = 0x4862
+0x6F83 = 0x4863
+0x6F87 = 0x4864
+0x6F88 = 0x4865
+0x6F8B = 0x4866
+0x6F8C = 0x4867
+0x6F8D = 0x4868
+0x6F90 = 0x4869
+0x6F92 = 0x486A
+0x6F93 = 0x486B
+0x6F94 = 0x486C
+0x6F96 = 0x486D
+0x6F9A = 0x486E
+0x6F9F = 0x486F
+0x6FA0 = 0x4870
+0x6FA5 = 0x4871
+0x6FA6 = 0x4872
+0x6FA7 = 0x4873
+0x6FA8 = 0x4874
+0x6FAE = 0x4875
+0x6FAF = 0x4876
+0x6FB0 = 0x4877
+0x6FB5 = 0x4878
+0x6FB6 = 0x4879
+0x6FBC = 0x487A
+0x6FC5 = 0x487B
+0x6FC7 = 0x487C
+0x6FC8 = 0x487D
+0x6FCA = 0x487E
+0x6FDA = 0x4921
+0x6FDE = 0x4922
+0x6FE8 = 0x4923
+0x6FE9 = 0x4924
+0x6FF0 = 0x4925
+0x6FF5 = 0x4926
+0x6FF9 = 0x4927
+0x6FFC = 0x4928
+0x6FFD = 0x4929
+0x7000 = 0x492A
+0x7005 = 0x492B
+0x7006 = 0x492C
+0x7007 = 0x492D
+0x700D = 0x492E
+0x7017 = 0x492F
+0x7020 = 0x4930
+0x7023 = 0x4931
+0x702F = 0x4932
+0x7034 = 0x4933
+0x7037 = 0x4934
+0x7039 = 0x4935
+0x703C = 0x4936
+0x7043 = 0x4937
+0x7044 = 0x4938
+0x7048 = 0x4939
+0x7049 = 0x493A
+0x704A = 0x493B
+0x704B = 0x493C
+0x704E = 0x4941
+0x7054 = 0x493D
+0x7055 = 0x493E
+0x705D = 0x493F
+0x705E = 0x4940
+0x7064 = 0x4942
+0x7065 = 0x4943
+0x706C = 0x4944
+0x706E = 0x4945
+0x7075 = 0x4946
+0x7076 = 0x4947
+0x707E = 0x4948
+0x7081 = 0x4949
+0x7085 = 0x494A
+0x7086 = 0x494B
+0x7094 = 0x494C
+0x7095 = 0x494D
+0x7096 = 0x494E
+0x7097 = 0x494F
+0x7098 = 0x4950
+0x709B = 0x4951
+0x70A4 = 0x4952
+0x70AB = 0x4953
+0x70B0 = 0x4954
+0x70B1 = 0x4955
+0x70B4 = 0x4956
+0x70B7 = 0x4957
+0x70CA = 0x4958
+0x70D1 = 0x4959
+0x70D3 = 0x495A
+0x70D4 = 0x495B
+0x70D5 = 0x495C
+0x70D6 = 0x495D
+0x70D8 = 0x495E
+0x70DC = 0x495F
+0x70E4 = 0x4960
+0x70FA = 0x4961
+0x7103 = 0x4962
+0x7104 = 0x4963
+0x7105 = 0x4964
+0x7106 = 0x4965
+0x7107 = 0x4966
+0x710B = 0x4967
+0x710C = 0x4968
+0x710F = 0x4969
+0x711E = 0x496A
+0x7120 = 0x496B
+0x712B = 0x496C
+0x712D = 0x496D
+0x712F = 0x496E
+0x7130 = 0x496F
+0x7131 = 0x4970
+0x7138 = 0x4971
+0x7141 = 0x4972
+0x7145 = 0x4973
+0x7146 = 0x4974
+0x7147 = 0x4975
+0x714A = 0x4976
+0x714B = 0x4977
+0x7150 = 0x4978
+0x7152 = 0x4979
+0x7157 = 0x497A
+0x715A = 0x497B
+0x715C = 0x497C
+0x715E = 0x497D
+0x7160 = 0x497E
+0x7168 = 0x4A21
+0x7179 = 0x4A22
+0x7180 = 0x4A23
+0x7185 = 0x4A24
+0x7187 = 0x4A25
+0x718C = 0x4A26
+0x7192 = 0x4A27
+0x719A = 0x4A28
+0x719B = 0x4A29
+0x71A0 = 0x4A2A
+0x71A2 = 0x4A2B
+0x71AF = 0x4A2C
+0x71B0 = 0x4A2D
+0x71B2 = 0x4A2E
+0x71B3 = 0x4A2F
+0x71BA = 0x4A30
+0x71BF = 0x4A31
+0x71C0 = 0x4A32
+0x71C1 = 0x4A33
+0x71C4 = 0x4A34
+0x71CB = 0x4A35
+0x71CC = 0x4A36
+0x71D3 = 0x4A37
+0x71D6 = 0x4A38
+0x71D9 = 0x4A39
+0x71DA = 0x4A3A
+0x71DC = 0x4A3B
+0x71F8 = 0x4A3C
+0x71FE = 0x4A3D
+0x7200 = 0x4A3E
+0x7207 = 0x4A3F
+0x7208 = 0x4A40
+0x7209 = 0x4A41
+0x7213 = 0x4A42
+0x7217 = 0x4A43
+0x721A = 0x4A44
+0x721D = 0x4A45
+0x721F = 0x4A46
+0x7224 = 0x4A47
+0x722B = 0x4A48
+0x722F = 0x4A49
+0x7234 = 0x4A4A
+0x7238 = 0x4A4B
+0x7239 = 0x4A4C
+0x7241 = 0x4A4D
+0x7242 = 0x4A4E
+0x7243 = 0x4A4F
+0x7245 = 0x4A50
+0x724E = 0x4A51
+0x724F = 0x4A52
+0x7250 = 0x4A53
+0x7253 = 0x4A54
+0x7255 = 0x4A55
+0x7256 = 0x4A56
+0x725A = 0x4A57
+0x725C = 0x4A58
+0x725E = 0x4A59
+0x7260 = 0x4A5A
+0x7263 = 0x4A5B
+0x7268 = 0x4A5C
+0x726B = 0x4A5D
+0x726E = 0x4A5E
+0x726F = 0x4A5F
+0x7271 = 0x4A60
+0x7277 = 0x4A61
+0x7278 = 0x4A62
+0x727B = 0x4A63
+0x727C = 0x4A64
+0x727F = 0x4A65
+0x7284 = 0x4A66
+0x7289 = 0x4A67
+0x728D = 0x4A68
+0x728E = 0x4A69
+0x7293 = 0x4A6A
+0x729B = 0x4A6B
+0x72A8 = 0x4A6C
+0x72AD = 0x4A6D
+0x72AE = 0x4A6E
+0x72B1 = 0x4A6F
+0x72B4 = 0x4A70
+0x72BE = 0x4A71
+0x72C1 = 0x4A72
+0x72C7 = 0x4A73
+0x72C9 = 0x4A74
+0x72CC = 0x4A75
+0x72D5 = 0x4A76
+0x72D6 = 0x4A77
+0x72D8 = 0x4A78
+0x72DF = 0x4A79
+0x72E5 = 0x4A7A
+0x72F3 = 0x4A7B
+0x72F4 = 0x4A7C
+0x72FA = 0x4A7D
+0x72FB = 0x4A7E
+0x72FE = 0x4B21
+0x7302 = 0x4B22
+0x7304 = 0x4B23
+0x7305 = 0x4B24
+0x7307 = 0x4B25
+0x730B = 0x4B26
+0x730D = 0x4B27
+0x7312 = 0x4B28
+0x7313 = 0x4B29
+0x7318 = 0x4B2A
+0x7319 = 0x4B2B
+0x731E = 0x4B2C
+0x7322 = 0x4B2D
+0x7324 = 0x4B2E
+0x7327 = 0x4B2F
+0x7328 = 0x4B30
+0x732C = 0x4B31
+0x7331 = 0x4B32
+0x7332 = 0x4B33
+0x7335 = 0x4B34
+0x733A = 0x4B35
+0x733B = 0x4B36
+0x733D = 0x4B37
+0x7343 = 0x4B38
+0x734D = 0x4B39
+0x7350 = 0x4B3A
+0x7352 = 0x4B3B
+0x7356 = 0x4B3C
+0x7358 = 0x4B3D
+0x735D = 0x4B3E
+0x735E = 0x4B3F
+0x735F = 0x4B40
+0x7360 = 0x4B41
+0x7366 = 0x4B42
+0x7367 = 0x4B43
+0x7369 = 0x4B44
+0x736B = 0x4B45
+0x736C = 0x4B46
+0x736E = 0x4B47
+0x736F = 0x4B48
+0x7371 = 0x4B49
+0x7377 = 0x4B4A
+0x7379 = 0x4B4B
+0x737C = 0x4B4C
+0x7380 = 0x4B4D
+0x7381 = 0x4B4E
+0x7383 = 0x4B4F
+0x7385 = 0x4B50
+0x7386 = 0x4B51
+0x738E = 0x4B52
+0x7390 = 0x4B53
+0x7393 = 0x4B54
+0x7395 = 0x4B55
+0x7397 = 0x4B56
+0x7398 = 0x4B57
+0x739C = 0x4B58
+0x739E = 0x4B59
+0x739F = 0x4B5A
+0x73A0 = 0x4B5B
+0x73A2 = 0x4B5C
+0x73A5 = 0x4B5D
+0x73A6 = 0x4B5E
+0x73AA = 0x4B5F
+0x73AB = 0x4B60
+0x73AD = 0x4B61
+0x73B5 = 0x4B62
+0x73B7 = 0x4B63
+0x73B9 = 0x4B64
+0x73BC = 0x4B65
+0x73BD = 0x4B66
+0x73BF = 0x4B67
+0x73C5 = 0x4B68
+0x73C6 = 0x4B69
+0x73C9 = 0x4B6A
+0x73CB = 0x4B6B
+0x73CC = 0x4B6C
+0x73CF = 0x4B6D
+0x73D2 = 0x4B6E
+0x73D3 = 0x4B6F
+0x73D6 = 0x4B70
+0x73D9 = 0x4B71
+0x73DD = 0x4B72
+0x73E1 = 0x4B73
+0x73E3 = 0x4B74
+0x73E6 = 0x4B75
+0x73E7 = 0x4B76
+0x73E9 = 0x4B77
+0x73F4 = 0x4B78
+0x73F5 = 0x4B79
+0x73F7 = 0x4B7A
+0x73F9 = 0x4B7B
+0x73FA = 0x4B7C
+0x73FB = 0x4B7D
+0x73FD = 0x4B7E
+0x73FF = 0x4C21
+0x7400 = 0x4C22
+0x7401 = 0x4C23
+0x7404 = 0x4C24
+0x7407 = 0x4C25
+0x740A = 0x4C26
+0x7411 = 0x4C27
+0x741A = 0x4C28
+0x741B = 0x4C29
+0x7424 = 0x4C2A
+0x7426 = 0x4C2B
+0x7428 = 0x4C2C
+0x7429 = 0x4C2D
+0x742A = 0x4C2E
+0x742B = 0x4C2F
+0x742C = 0x4C30
+0x742D = 0x4C31
+0x742E = 0x4C32
+0x742F = 0x4C33
+0x7430 = 0x4C34
+0x7431 = 0x4C35
+0x7439 = 0x4C36
+0x7440 = 0x4C37
+0x7443 = 0x4C38
+0x7444 = 0x4C39
+0x7446 = 0x4C3A
+0x7447 = 0x4C3B
+0x744B = 0x4C3C
+0x744D = 0x4C3D
+0x7451 = 0x4C3E
+0x7452 = 0x4C3F
+0x7457 = 0x4C40
+0x745D = 0x4C41
+0x7462 = 0x4C42
+0x7466 = 0x4C43
+0x7467 = 0x4C44
+0x7468 = 0x4C45
+0x746B = 0x4C46
+0x746D = 0x4C47
+0x746E = 0x4C48
+0x7471 = 0x4C49
+0x7472 = 0x4C4A
+0x7480 = 0x4C4B
+0x7481 = 0x4C4C
+0x7485 = 0x4C4D
+0x7486 = 0x4C4E
+0x7487 = 0x4C4F
+0x7489 = 0x4C50
+0x748F = 0x4C51
+0x7490 = 0x4C52
+0x7491 = 0x4C53
+0x7492 = 0x4C54
+0x7498 = 0x4C55
+0x7499 = 0x4C56
+0x749A = 0x4C57
+0x749C = 0x4C58
+0x749F = 0x4C59
+0x74A0 = 0x4C5A
+0x74A1 = 0x4C5B
+0x74A3 = 0x4C5C
+0x74A6 = 0x4C5D
+0x74A8 = 0x4C5E
+0x74A9 = 0x4C5F
+0x74AA = 0x4C60
+0x74AB = 0x4C61
+0x74AE = 0x4C62
+0x74AF = 0x4C63
+0x74B1 = 0x4C64
+0x74B2 = 0x4C65
+0x74B5 = 0x4C66
+0x74B9 = 0x4C67
+0x74BB = 0x4C68
+0x74BF = 0x4C69
+0x74C8 = 0x4C6A
+0x74C9 = 0x4C6B
+0x74CC = 0x4C6C
+0x74D0 = 0x4C6D
+0x74D3 = 0x4C6E
+0x74D8 = 0x4C6F
+0x74DA = 0x4C70
+0x74DB = 0x4C71
+0x74DE = 0x4C72
+0x74DF = 0x4C73
+0x74E4 = 0x4C74
+0x74E8 = 0x4C75
+0x74EA = 0x4C76
+0x74EB = 0x4C77
+0x74EF = 0x4C78
+0x74F4 = 0x4C79
+0x74FA = 0x4C7A
+0x74FB = 0x4C7B
+0x74FC = 0x4C7C
+0x74FF = 0x4C7D
+0x7506 = 0x4C7E
+0x7512 = 0x4D21
+0x7516 = 0x4D22
+0x7517 = 0x4D23
+0x7520 = 0x4D24
+0x7521 = 0x4D25
+0x7524 = 0x4D26
+0x7527 = 0x4D27
+0x7529 = 0x4D28
+0x752A = 0x4D29
+0x752F = 0x4D2A
+0x7536 = 0x4D2B
+0x7539 = 0x4D2C
+0x753D = 0x4D2D
+0x753E = 0x4D2E
+0x753F = 0x4D2F
+0x7540 = 0x4D30
+0x7543 = 0x4D31
+0x7547 = 0x4D32
+0x7548 = 0x4D33
+0x754E = 0x4D34
+0x7550 = 0x4D35
+0x7552 = 0x4D36
+0x7557 = 0x4D37
+0x755E = 0x4D38
+0x755F = 0x4D39
+0x7561 = 0x4D3A
+0x756F = 0x4D3B
+0x7571 = 0x4D3C
+0x7579 = 0x4D3D
+0x757A = 0x4D3E
+0x757B = 0x4D3F
+0x757C = 0x4D40
+0x757D = 0x4D41
+0x757E = 0x4D42
+0x7581 = 0x4D43
+0x7585 = 0x4D44
+0x7590 = 0x4D45
+0x7592 = 0x4D46
+0x7593 = 0x4D47
+0x7595 = 0x4D48
+0x7599 = 0x4D49
+0x759C = 0x4D4A
+0x75A2 = 0x4D4B
+0x75A4 = 0x4D4C
+0x75B4 = 0x4D4D
+0x75BA = 0x4D4E
+0x75BF = 0x4D4F
+0x75C0 = 0x4D50
+0x75C1 = 0x4D51
+0x75C4 = 0x4D52
+0x75C6 = 0x4D53
+0x75CC = 0x4D54
+0x75CE = 0x4D55
+0x75CF = 0x4D56
+0x75D7 = 0x4D57
+0x75DC = 0x4D58
+0x75DF = 0x4D59
+0x75E0 = 0x4D5A
+0x75E1 = 0x4D5B
+0x75E4 = 0x4D5C
+0x75E7 = 0x4D5D
+0x75EC = 0x4D5E
+0x75EE = 0x4D5F
+0x75EF = 0x4D60
+0x75F1 = 0x4D61
+0x75F9 = 0x4D62
+0x7600 = 0x4D63
+0x7602 = 0x4D64
+0x7603 = 0x4D65
+0x7604 = 0x4D66
+0x7607 = 0x4D67
+0x7608 = 0x4D68
+0x760A = 0x4D69
+0x760C = 0x4D6A
+0x760F = 0x4D6B
+0x7612 = 0x4D6C
+0x7613 = 0x4D6D
+0x7615 = 0x4D6E
+0x7616 = 0x4D6F
+0x7619 = 0x4D70
+0x761B = 0x4D71
+0x761C = 0x4D72
+0x761D = 0x4D73
+0x761E = 0x4D74
+0x7623 = 0x4D75
+0x7625 = 0x4D76
+0x7626 = 0x4D77
+0x7629 = 0x4D78
+0x762D = 0x4D79
+0x7632 = 0x4D7A
+0x7633 = 0x4D7B
+0x7635 = 0x4D7C
+0x7638 = 0x4D7D
+0x7639 = 0x4D7E
+0x763A = 0x4E21
+0x763C = 0x4E22
+0x7640 = 0x4E24
+0x7641 = 0x4E25
+0x7643 = 0x4E26
+0x7644 = 0x4E27
+0x7645 = 0x4E28
+0x7649 = 0x4E29
+0x764A = 0x4E23
+0x764B = 0x4E2A
+0x7655 = 0x4E2B
+0x7659 = 0x4E2C
+0x765F = 0x4E2D
+0x7664 = 0x4E2E
+0x7665 = 0x4E2F
+0x766D = 0x4E30
+0x766E = 0x4E31
+0x766F = 0x4E32
+0x7671 = 0x4E33
+0x7674 = 0x4E34
+0x7681 = 0x4E35
+0x7685 = 0x4E36
+0x768C = 0x4E37
+0x768D = 0x4E38
+0x7695 = 0x4E39
+0x769B = 0x4E3A
+0x769C = 0x4E3B
+0x769D = 0x4E3C
+0x769F = 0x4E3D
+0x76A0 = 0x4E3E
+0x76A2 = 0x4E3F
+0x76A3 = 0x4E40
+0x76A4 = 0x4E41
+0x76A5 = 0x4E42
+0x76A6 = 0x4E43
+0x76A7 = 0x4E44
+0x76A8 = 0x4E45
+0x76AA = 0x4E46
+0x76AD = 0x4E47
+0x76BD = 0x4E48
+0x76C1 = 0x4E49
+0x76C5 = 0x4E4A
+0x76C9 = 0x4E4B
+0x76CB = 0x4E4C
+0x76CC = 0x4E4D
+0x76CE = 0x4E4E
+0x76D4 = 0x4E4F
+0x76D9 = 0x4E50
+0x76E0 = 0x4E51
+0x76E6 = 0x4E52
+0x76E8 = 0x4E53
+0x76EC = 0x4E54
+0x76F0 = 0x4E55
+0x76F1 = 0x4E56
+0x76F6 = 0x4E57
+0x76F9 = 0x4E58
+0x76FC = 0x4E59
+0x7700 = 0x4E5A
+0x7706 = 0x4E5B
+0x770A = 0x4E5C
+0x770E = 0x4E5D
+0x7712 = 0x4E5E
+0x7714 = 0x4E5F
+0x7715 = 0x4E60
+0x7717 = 0x4E61
+0x7719 = 0x4E62
+0x771A = 0x4E63
+0x771C = 0x4E64
+0x7722 = 0x4E65
+0x7728 = 0x4E66
+0x772D = 0x4E67
+0x772E = 0x4E68
+0x772F = 0x4E69
+0x7734 = 0x4E6A
+0x7735 = 0x4E6B
+0x7736 = 0x4E6C
+0x7739 = 0x4E6D
+0x773D = 0x4E6E
+0x773E = 0x4E6F
+0x7742 = 0x4E70
+0x7745 = 0x4E71
+0x7746 = 0x4E72
+0x774A = 0x4E73
+0x774D = 0x4E74
+0x774E = 0x4E75
+0x774F = 0x4E76
+0x7752 = 0x4E77
+0x7756 = 0x4E78
+0x7757 = 0x4E79
+0x775C = 0x4E7A
+0x775E = 0x4E7B
+0x775F = 0x4E7C
+0x7760 = 0x4E7D
+0x7762 = 0x4E7E
+0x7764 = 0x4F21
+0x7767 = 0x4F22
+0x776A = 0x4F23
+0x776C = 0x4F24
+0x7770 = 0x4F25
+0x7772 = 0x4F26
+0x7773 = 0x4F27
+0x7774 = 0x4F28
+0x777A = 0x4F29
+0x777D = 0x4F2A
+0x7780 = 0x4F2B
+0x7784 = 0x4F2C
+0x778C = 0x4F2D
+0x778D = 0x4F2E
+0x7794 = 0x4F2F
+0x7795 = 0x4F30
+0x7796 = 0x4F31
+0x779A = 0x4F32
+0x779F = 0x4F33
+0x77A2 = 0x4F34
+0x77A7 = 0x4F35
+0x77AA = 0x4F36
+0x77AE = 0x4F37
+0x77AF = 0x4F38
+0x77B1 = 0x4F39
+0x77B5 = 0x4F3A
+0x77BE = 0x4F3B
+0x77C3 = 0x4F3C
+0x77C9 = 0x4F3D
+0x77D1 = 0x4F3E
+0x77D2 = 0x4F3F
+0x77D5 = 0x4F40
+0x77D9 = 0x4F41
+0x77DE = 0x4F42
+0x77DF = 0x4F43
+0x77E0 = 0x4F44
+0x77E4 = 0x4F45
+0x77E6 = 0x4F46
+0x77EA = 0x4F47
+0x77EC = 0x4F48
+0x77F0 = 0x4F49
+0x77F1 = 0x4F4A
+0x77F4 = 0x4F4B
+0x77F8 = 0x4F4C
+0x77FB = 0x4F4D
+0x7805 = 0x4F4E
+0x7806 = 0x4F4F
+0x7809 = 0x4F50
+0x780D = 0x4F51
+0x780E = 0x4F52
+0x7811 = 0x4F53
+0x781D = 0x4F54
+0x7821 = 0x4F55
+0x7822 = 0x4F56
+0x7823 = 0x4F57
+0x782D = 0x4F58
+0x782E = 0x4F59
+0x7830 = 0x4F5A
+0x7835 = 0x4F5B
+0x7837 = 0x4F5C
+0x7843 = 0x4F5D
+0x7844 = 0x4F5E
+0x7847 = 0x4F5F
+0x7848 = 0x4F60
+0x784C = 0x4F61
+0x784E = 0x4F62
+0x7852 = 0x4F63
+0x785C = 0x4F64
+0x785E = 0x4F65
+0x7860 = 0x4F66
+0x7861 = 0x4F67
+0x7863 = 0x4F68
+0x7864 = 0x4F69
+0x7868 = 0x4F6A
+0x786A = 0x4F6B
+0x786E = 0x4F6C
+0x787A = 0x4F6D
+0x787E = 0x4F6E
+0x788A = 0x4F6F
+0x788F = 0x4F70
+0x7894 = 0x4F71
+0x7898 = 0x4F72
+0x789D = 0x4F74
+0x789E = 0x4F75
+0x789F = 0x4F76
+0x78A1 = 0x4F73
+0x78A4 = 0x4F77
+0x78A8 = 0x4F78
+0x78AC = 0x4F79
+0x78AD = 0x4F7A
+0x78B0 = 0x4F7B
+0x78B1 = 0x4F7C
+0x78B2 = 0x4F7D
+0x78B3 = 0x4F7E
+0x78BB = 0x5021
+0x78BD = 0x5022
+0x78BF = 0x5023
+0x78C7 = 0x5024
+0x78C8 = 0x5025
+0x78C9 = 0x5026
+0x78CC = 0x5027
+0x78CE = 0x5028
+0x78D2 = 0x5029
+0x78D3 = 0x502A
+0x78D5 = 0x502B
+0x78D6 = 0x502C
+0x78DB = 0x502E
+0x78DF = 0x502F
+0x78E0 = 0x5030
+0x78E1 = 0x5031
+0x78E4 = 0x502D
+0x78E6 = 0x5032
+0x78EA = 0x5033
+0x78F2 = 0x5034
+0x78F3 = 0x5035
+0x78F6 = 0x5037
+0x78F7 = 0x5038
+0x78FA = 0x5039
+0x78FB = 0x503A
+0x78FF = 0x503B
+0x7900 = 0x5036
+0x7906 = 0x503C
+0x790C = 0x503D
+0x7910 = 0x503E
+0x791A = 0x503F
+0x791C = 0x5040
+0x791E = 0x5041
+0x791F = 0x5042
+0x7920 = 0x5043
+0x7925 = 0x5044
+0x7927 = 0x5045
+0x7929 = 0x5046
+0x792D = 0x5047
+0x7931 = 0x5048
+0x7934 = 0x5049
+0x7935 = 0x504A
+0x793B = 0x504B
+0x793D = 0x504C
+0x793F = 0x504D
+0x7944 = 0x504E
+0x7945 = 0x504F
+0x7946 = 0x5050
+0x794A = 0x5051
+0x794B = 0x5052
+0x794F = 0x5053
+0x7951 = 0x5054
+0x7954 = 0x5055
+0x7958 = 0x5056
+0x795B = 0x5057
+0x795C = 0x5058
+0x7967 = 0x5059
+0x7969 = 0x505A
+0x796B = 0x505B
+0x7972 = 0x505C
+0x7979 = 0x505D
+0x797B = 0x505E
+0x797C = 0x505F
+0x797E = 0x5060
+0x798B = 0x5061
+0x798C = 0x5062
+0x7991 = 0x5063
+0x7993 = 0x5064
+0x7994 = 0x5065
+0x7995 = 0x5066
+0x7996 = 0x5067
+0x7998 = 0x5068
+0x799B = 0x5069
+0x799C = 0x506A
+0x79A1 = 0x506B
+0x79A8 = 0x506C
+0x79A9 = 0x506D
+0x79AB = 0x506E
+0x79AF = 0x506F
+0x79B1 = 0x5070
+0x79B4 = 0x5071
+0x79B8 = 0x5072
+0x79BB = 0x5073
+0x79C2 = 0x5074
+0x79C4 = 0x5075
+0x79C7 = 0x5076
+0x79C8 = 0x5077
+0x79CA = 0x5078
+0x79CF = 0x5079
+0x79D4 = 0x507A
+0x79D6 = 0x507B
+0x79DA = 0x507C
+0x79DD = 0x507D
+0x79DE = 0x507E
+0x79E0 = 0x5121
+0x79E2 = 0x5122
+0x79E5 = 0x5123
+0x79EA = 0x5124
+0x79EB = 0x5125
+0x79ED = 0x5126
+0x79F1 = 0x5127
+0x79F8 = 0x5128
+0x79FC = 0x5129
+0x7A02 = 0x512A
+0x7A03 = 0x512B
+0x7A07 = 0x512C
+0x7A09 = 0x512D
+0x7A0A = 0x512E
+0x7A0C = 0x512F
+0x7A11 = 0x5130
+0x7A15 = 0x5131
+0x7A1B = 0x5132
+0x7A1E = 0x5133
+0x7A21 = 0x5134
+0x7A27 = 0x5135
+0x7A2B = 0x5136
+0x7A2D = 0x5137
+0x7A2F = 0x5138
+0x7A30 = 0x5139
+0x7A34 = 0x513A
+0x7A35 = 0x513B
+0x7A38 = 0x513C
+0x7A39 = 0x513D
+0x7A3A = 0x513E
+0x7A44 = 0x513F
+0x7A45 = 0x5140
+0x7A47 = 0x5141
+0x7A48 = 0x5142
+0x7A4C = 0x5143
+0x7A55 = 0x5144
+0x7A56 = 0x5145
+0x7A59 = 0x5146
+0x7A5C = 0x5147
+0x7A5D = 0x5148
+0x7A5F = 0x5149
+0x7A60 = 0x514A
+0x7A65 = 0x514B
+0x7A67 = 0x514C
+0x7A6A = 0x514D
+0x7A6D = 0x514E
+0x7A75 = 0x514F
+0x7A78 = 0x5150
+0x7A7E = 0x5151
+0x7A80 = 0x5152
+0x7A82 = 0x5153
+0x7A85 = 0x5154
+0x7A86 = 0x5155
+0x7A8A = 0x5156
+0x7A8B = 0x5157
+0x7A90 = 0x5158
+0x7A91 = 0x5159
+0x7A94 = 0x515A
+0x7A9E = 0x515B
+0x7AA0 = 0x515C
+0x7AA3 = 0x515D
+0x7AAC = 0x515E
+0x7AB3 = 0x515F
+0x7AB5 = 0x5160
+0x7AB9 = 0x5161
+0x7ABB = 0x5162
+0x7ABC = 0x5163
+0x7AC6 = 0x5164
+0x7AC9 = 0x5165
+0x7ACC = 0x5166
+0x7ACE = 0x5167
+0x7AD1 = 0x5168
+0x7ADB = 0x5169
+0x7AE8 = 0x516A
+0x7AE9 = 0x516B
+0x7AEB = 0x516C
+0x7AEC = 0x516D
+0x7AF1 = 0x516E
+0x7AF4 = 0x516F
+0x7AFB = 0x5170
+0x7AFD = 0x5171
+0x7AFE = 0x5172
+0x7B07 = 0x5173
+0x7B14 = 0x5174
+0x7B1F = 0x5175
+0x7B23 = 0x5176
+0x7B27 = 0x5177
+0x7B29 = 0x5178
+0x7B2A = 0x5179
+0x7B2B = 0x517A
+0x7B2D = 0x517B
+0x7B2E = 0x517C
+0x7B2F = 0x517D
+0x7B30 = 0x517E
+0x7B31 = 0x5221
+0x7B34 = 0x5222
+0x7B3D = 0x5223
+0x7B3F = 0x5224
+0x7B40 = 0x5225
+0x7B41 = 0x5226
+0x7B47 = 0x5227
+0x7B4E = 0x5228
+0x7B55 = 0x5229
+0x7B60 = 0x522A
+0x7B64 = 0x522B
+0x7B66 = 0x522C
+0x7B69 = 0x522D
+0x7B6A = 0x522E
+0x7B6D = 0x522F
+0x7B6F = 0x5230
+0x7B72 = 0x5231
+0x7B73 = 0x5232
+0x7B77 = 0x5233
+0x7B84 = 0x5234
+0x7B89 = 0x5235
+0x7B8E = 0x5236
+0x7B90 = 0x5237
+0x7B91 = 0x5238
+0x7B96 = 0x5239
+0x7B9B = 0x523A
+0x7B9E = 0x523B
+0x7BA0 = 0x523C
+0x7BA5 = 0x523D
+0x7BAC = 0x523E
+0x7BAF = 0x523F
+0x7BB0 = 0x5240
+0x7BB2 = 0x5241
+0x7BB5 = 0x5242
+0x7BB6 = 0x5243
+0x7BBA = 0x5244
+0x7BBB = 0x5245
+0x7BBC = 0x5246
+0x7BBD = 0x5247
+0x7BC2 = 0x5248
+0x7BC5 = 0x5249
+0x7BC8 = 0x524A
+0x7BCA = 0x524B
+0x7BD4 = 0x524C
+0x7BD6 = 0x524D
+0x7BD7 = 0x524E
+0x7BD9 = 0x524F
+0x7BDA = 0x5250
+0x7BDB = 0x5251
+0x7BE8 = 0x5252
+0x7BEA = 0x5253
+0x7BF2 = 0x5254
+0x7BF4 = 0x5255
+0x7BF5 = 0x5256
+0x7BF8 = 0x5257
+0x7BF9 = 0x5258
+0x7BFA = 0x5259
+0x7BFC = 0x525A
+0x7BFE = 0x525B
+0x7C01 = 0x525C
+0x7C02 = 0x525D
+0x7C03 = 0x525E
+0x7C04 = 0x525F
+0x7C06 = 0x5260
+0x7C09 = 0x5261
+0x7C0B = 0x5262
+0x7C0C = 0x5263
+0x7C0E = 0x5264
+0x7C0F = 0x5265
+0x7C19 = 0x5266
+0x7C1B = 0x5267
+0x7C20 = 0x5268
+0x7C25 = 0x5269
+0x7C26 = 0x526A
+0x7C28 = 0x526B
+0x7C2C = 0x526C
+0x7C31 = 0x526D
+0x7C33 = 0x526E
+0x7C34 = 0x526F
+0x7C36 = 0x5270
+0x7C39 = 0x5271
+0x7C3A = 0x5272
+0x7C46 = 0x5273
+0x7C4A = 0x5274
+0x7C51 = 0x5276
+0x7C52 = 0x5277
+0x7C53 = 0x5278
+0x7C55 = 0x5275
+0x7C59 = 0x5279
+0x7C5A = 0x527A
+0x7C5B = 0x527B
+0x7C5C = 0x527C
+0x7C5D = 0x527D
+0x7C5E = 0x527E
+0x7C61 = 0x5321
+0x7C63 = 0x5322
+0x7C67 = 0x5323
+0x7C69 = 0x5324
+0x7C6D = 0x5325
+0x7C6E = 0x5326
+0x7C70 = 0x5327
+0x7C72 = 0x5328
+0x7C79 = 0x5329
+0x7C7C = 0x532A
+0x7C7D = 0x532B
+0x7C86 = 0x532C
+0x7C87 = 0x532D
+0x7C8F = 0x532E
+0x7C94 = 0x532F
+0x7C9E = 0x5330
+0x7CA0 = 0x5331
+0x7CA6 = 0x5332
+0x7CB0 = 0x5333
+0x7CB6 = 0x5334
+0x7CB7 = 0x5335
+0x7CBA = 0x5336
+0x7CBB = 0x5337
+0x7CBC = 0x5338
+0x7CBF = 0x5339
+0x7CC4 = 0x533A
+0x7CC7 = 0x533B
+0x7CC8 = 0x533C
+0x7CC9 = 0x533D
+0x7CCD = 0x533E
+0x7CCF = 0x533F
+0x7CD3 = 0x5340
+0x7CD4 = 0x5341
+0x7CD5 = 0x5342
+0x7CD7 = 0x5343
+0x7CD9 = 0x5344
+0x7CDA = 0x5345
+0x7CDD = 0x5346
+0x7CE6 = 0x5347
+0x7CE9 = 0x5348
+0x7CEB = 0x5349
+0x7CF5 = 0x534A
+0x7D03 = 0x534B
+0x7D07 = 0x534C
+0x7D08 = 0x534D
+0x7D09 = 0x534E
+0x7D0F = 0x534F
+0x7D11 = 0x5350
+0x7D12 = 0x5351
+0x7D13 = 0x5352
+0x7D16 = 0x5353
+0x7D1D = 0x5354
+0x7D1E = 0x5355
+0x7D23 = 0x5356
+0x7D26 = 0x5357
+0x7D2A = 0x5358
+0x7D2D = 0x5359
+0x7D31 = 0x535A
+0x7D3C = 0x535B
+0x7D3D = 0x535C
+0x7D3E = 0x535D
+0x7D40 = 0x535E
+0x7D41 = 0x535F
+0x7D47 = 0x5360
+0x7D48 = 0x5361
+0x7D4D = 0x5362
+0x7D51 = 0x5363
+0x7D53 = 0x5364
+0x7D57 = 0x5365
+0x7D59 = 0x5366
+0x7D5A = 0x5367
+0x7D5C = 0x5368
+0x7D5D = 0x5369
+0x7D65 = 0x536A
+0x7D67 = 0x536B
+0x7D6A = 0x536C
+0x7D70 = 0x536D
+0x7D78 = 0x536E
+0x7D7A = 0x536F
+0x7D7B = 0x5370
+0x7D7F = 0x5371
+0x7D81 = 0x5372
+0x7D82 = 0x5373
+0x7D83 = 0x5374
+0x7D85 = 0x5375
+0x7D86 = 0x5376
+0x7D88 = 0x5377
+0x7D8B = 0x5378
+0x7D8C = 0x5379
+0x7D8D = 0x537A
+0x7D91 = 0x537B
+0x7D96 = 0x537C
+0x7D97 = 0x537D
+0x7D9D = 0x537E
+0x7D9E = 0x5421
+0x7DA6 = 0x5422
+0x7DA7 = 0x5423
+0x7DAA = 0x5424
+0x7DB3 = 0x5425
+0x7DB6 = 0x5426
+0x7DB7 = 0x5427
+0x7DB9 = 0x5428
+0x7DC2 = 0x5429
+0x7DC3 = 0x542A
+0x7DC4 = 0x542B
+0x7DC5 = 0x542C
+0x7DC6 = 0x542D
+0x7DCC = 0x542E
+0x7DCD = 0x542F
+0x7DCE = 0x5430
+0x7DD7 = 0x5431
+0x7DD9 = 0x5432
+0x7DE2 = 0x5434
+0x7DE5 = 0x5435
+0x7DE6 = 0x5436
+0x7DEA = 0x5437
+0x7DEB = 0x5438
+0x7DED = 0x5439
+0x7DF1 = 0x543A
+0x7DF5 = 0x543B
+0x7DF6 = 0x543C
+0x7DF9 = 0x543D
+0x7DFA = 0x543E
+0x7E00 = 0x5433
+0x7E08 = 0x543F
+0x7E10 = 0x5440
+0x7E11 = 0x5441
+0x7E15 = 0x5442
+0x7E17 = 0x5443
+0x7E1C = 0x5444
+0x7E1D = 0x5445
+0x7E20 = 0x5446
+0x7E27 = 0x5447
+0x7E28 = 0x5448
+0x7E2C = 0x5449
+0x7E2D = 0x544A
+0x7E2F = 0x544B
+0x7E33 = 0x544C
+0x7E36 = 0x544D
+0x7E3F = 0x544E
+0x7E44 = 0x544F
+0x7E45 = 0x5450
+0x7E47 = 0x5451
+0x7E4E = 0x5452
+0x7E50 = 0x5453
+0x7E52 = 0x5454
+0x7E58 = 0x5455
+0x7E5F = 0x5456
+0x7E61 = 0x5457
+0x7E62 = 0x5458
+0x7E65 = 0x5459
+0x7E6B = 0x545A
+0x7E6E = 0x545B
+0x7E6F = 0x545C
+0x7E73 = 0x545D
+0x7E78 = 0x545E
+0x7E7E = 0x545F
+0x7E81 = 0x5460
+0x7E86 = 0x5461
+0x7E87 = 0x5462
+0x7E8A = 0x5463
+0x7E8D = 0x5464
+0x7E91 = 0x5465
+0x7E95 = 0x5466
+0x7E98 = 0x5467
+0x7E9A = 0x5468
+0x7E9D = 0x5469
+0x7E9E = 0x546A
+0x7F3B = 0x546C
+0x7F3C = 0x546B
+0x7F3D = 0x546D
+0x7F3E = 0x546E
+0x7F3F = 0x546F
+0x7F43 = 0x5470
+0x7F44 = 0x5471
+0x7F47 = 0x5472
+0x7F4F = 0x5473
+0x7F52 = 0x5474
+0x7F53 = 0x5475
+0x7F5B = 0x5476
+0x7F5C = 0x5477
+0x7F5D = 0x5478
+0x7F61 = 0x5479
+0x7F63 = 0x547A
+0x7F64 = 0x547B
+0x7F65 = 0x547C
+0x7F66 = 0x547D
+0x7F6D = 0x547E
+0x7F71 = 0x5521
+0x7F7D = 0x5522
+0x7F7E = 0x5523
+0x7F7F = 0x5524
+0x7F80 = 0x5525
+0x7F8B = 0x5526
+0x7F8D = 0x5527
+0x7F8F = 0x5528
+0x7F90 = 0x5529
+0x7F91 = 0x552A
+0x7F96 = 0x552B
+0x7F97 = 0x552C
+0x7F9C = 0x552D
+0x7FA1 = 0x552E
+0x7FA2 = 0x552F
+0x7FA6 = 0x5530
+0x7FAA = 0x5531
+0x7FAD = 0x5532
+0x7FB4 = 0x5533
+0x7FBC = 0x5534
+0x7FBF = 0x5535
+0x7FC0 = 0x5536
+0x7FC3 = 0x5537
+0x7FC8 = 0x5538
+0x7FCE = 0x5539
+0x7FCF = 0x553A
+0x7FDB = 0x553B
+0x7FDF = 0x553C
+0x7FE3 = 0x553D
+0x7FE5 = 0x553E
+0x7FE8 = 0x553F
+0x7FEC = 0x5540
+0x7FEE = 0x5541
+0x7FEF = 0x5542
+0x7FF2 = 0x5543
+0x7FFA = 0x5544
+0x7FFD = 0x5545
+0x7FFE = 0x5546
+0x7FFF = 0x5547
+0x8007 = 0x5548
+0x8008 = 0x5549
+0x800A = 0x554A
+0x800D = 0x554B
+0x800E = 0x554C
+0x800F = 0x554D
+0x8011 = 0x554E
+0x8013 = 0x554F
+0x8014 = 0x5550
+0x8016 = 0x5551
+0x801D = 0x5552
+0x801E = 0x5553
+0x801F = 0x5554
+0x8020 = 0x5555
+0x8024 = 0x5556
+0x8026 = 0x5557
+0x802C = 0x5558
+0x802E = 0x5559
+0x8030 = 0x555A
+0x8034 = 0x555B
+0x8035 = 0x555C
+0x8037 = 0x555D
+0x8039 = 0x555E
+0x803A = 0x555F
+0x803C = 0x5560
+0x803E = 0x5561
+0x8040 = 0x5562
+0x8044 = 0x5563
+0x8060 = 0x5564
+0x8064 = 0x5565
+0x8066 = 0x5566
+0x806D = 0x5567
+0x8071 = 0x5568
+0x8075 = 0x5569
+0x8081 = 0x556A
+0x8088 = 0x556B
+0x808E = 0x556C
+0x809C = 0x556D
+0x809E = 0x556E
+0x80A6 = 0x556F
+0x80A7 = 0x5570
+0x80AB = 0x5571
+0x80B8 = 0x5572
+0x80B9 = 0x5573
+0x80C8 = 0x5574
+0x80CD = 0x5575
+0x80CF = 0x5576
+0x80D2 = 0x5577
+0x80D4 = 0x5578
+0x80D5 = 0x5579
+0x80D7 = 0x557A
+0x80D8 = 0x557B
+0x80E0 = 0x557C
+0x80ED = 0x557D
+0x80EE = 0x557E
+0x80F0 = 0x5621
+0x80F2 = 0x5622
+0x80F3 = 0x5623
+0x80F6 = 0x5624
+0x80F9 = 0x5625
+0x80FA = 0x5626
+0x80FE = 0x5627
+0x8103 = 0x5628
+0x810B = 0x5629
+0x8116 = 0x562A
+0x8117 = 0x562B
+0x8118 = 0x562C
+0x811C = 0x562D
+0x811E = 0x562E
+0x8120 = 0x562F
+0x8124 = 0x5630
+0x8127 = 0x5631
+0x812C = 0x5632
+0x8130 = 0x5633
+0x8135 = 0x5634
+0x813A = 0x5635
+0x813C = 0x5636
+0x8145 = 0x5637
+0x8147 = 0x5638
+0x814A = 0x5639
+0x814C = 0x563A
+0x8152 = 0x563B
+0x8157 = 0x563C
+0x8160 = 0x563D
+0x8161 = 0x563E
+0x8167 = 0x563F
+0x8168 = 0x5640
+0x8169 = 0x5641
+0x816D = 0x5642
+0x816F = 0x5643
+0x8177 = 0x5644
+0x8181 = 0x5645
+0x8184 = 0x5647
+0x8185 = 0x5648
+0x8186 = 0x5649
+0x818B = 0x564A
+0x818E = 0x564B
+0x8190 = 0x5646
+0x8196 = 0x564C
+0x8198 = 0x564D
+0x819B = 0x564E
+0x819E = 0x564F
+0x81A2 = 0x5650
+0x81AE = 0x5651
+0x81B2 = 0x5652
+0x81B4 = 0x5653
+0x81BB = 0x5654
+0x81C3 = 0x5656
+0x81C5 = 0x5657
+0x81CA = 0x5658
+0x81CB = 0x5655
+0x81CE = 0x5659
+0x81CF = 0x565A
+0x81D5 = 0x565B
+0x81D7 = 0x565C
+0x81DB = 0x565D
+0x81DD = 0x565E
+0x81DE = 0x565F
+0x81E1 = 0x5660
+0x81E4 = 0x5661
+0x81EB = 0x5662
+0x81EC = 0x5663
+0x81F0 = 0x5664
+0x81F1 = 0x5665
+0x81F2 = 0x5666
+0x81F5 = 0x5667
+0x81F6 = 0x5668
+0x81F8 = 0x5669
+0x81F9 = 0x566A
+0x81FD = 0x566B
+0x81FF = 0x566C
+0x8200 = 0x566D
+0x8203 = 0x566E
+0x820F = 0x566F
+0x8213 = 0x5670
+0x8214 = 0x5671
+0x8219 = 0x5672
+0x821A = 0x5673
+0x821D = 0x5674
+0x8221 = 0x5675
+0x8222 = 0x5676
+0x8228 = 0x5677
+0x8232 = 0x5678
+0x8234 = 0x5679
+0x823A = 0x567A
+0x8243 = 0x567B
+0x8244 = 0x567C
+0x8245 = 0x567D
+0x8246 = 0x567E
+0x824B = 0x5721
+0x824E = 0x5722
+0x824F = 0x5723
+0x8251 = 0x5724
+0x8256 = 0x5725
+0x825C = 0x5726
+0x8260 = 0x5727
+0x8263 = 0x5728
+0x8267 = 0x5729
+0x826D = 0x572A
+0x8274 = 0x572B
+0x827B = 0x572C
+0x827D = 0x572D
+0x827F = 0x572E
+0x8280 = 0x572F
+0x8281 = 0x5730
+0x8283 = 0x5731
+0x8284 = 0x5732
+0x8287 = 0x5733
+0x8289 = 0x5734
+0x828A = 0x5735
+0x828E = 0x5736
+0x8291 = 0x5737
+0x8294 = 0x5738
+0x8296 = 0x5739
+0x8298 = 0x573A
+0x829A = 0x573B
+0x829B = 0x573C
+0x82A0 = 0x573D
+0x82A1 = 0x573E
+0x82A3 = 0x573F
+0x82A4 = 0x5740
+0x82A7 = 0x5741
+0x82A8 = 0x5742
+0x82A9 = 0x5743
+0x82AA = 0x5744
+0x82AE = 0x5745
+0x82B0 = 0x5746
+0x82B2 = 0x5747
+0x82B4 = 0x5748
+0x82B7 = 0x5749
+0x82BA = 0x574A
+0x82BC = 0x574B
+0x82BE = 0x574C
+0x82BF = 0x574D
+0x82C6 = 0x574E
+0x82D0 = 0x574F
+0x82D5 = 0x5750
+0x82DA = 0x5751
+0x82E0 = 0x5752
+0x82E2 = 0x5753
+0x82E4 = 0x5754
+0x82E8 = 0x5755
+0x82EA = 0x5756
+0x82ED = 0x5757
+0x82EF = 0x5758
+0x82F6 = 0x5759
+0x82F7 = 0x575A
+0x82FD = 0x575B
+0x82FE = 0x575C
+0x8300 = 0x575D
+0x8301 = 0x575E
+0x8307 = 0x575F
+0x8308 = 0x5760
+0x830A = 0x5761
+0x830B = 0x5762
+0x831B = 0x5764
+0x831D = 0x5765
+0x831E = 0x5766
+0x831F = 0x5767
+0x8321 = 0x5768
+0x8322 = 0x5769
+0x832C = 0x576A
+0x832D = 0x576B
+0x832E = 0x576C
+0x8330 = 0x576D
+0x8333 = 0x576E
+0x8337 = 0x576F
+0x833A = 0x5770
+0x833C = 0x5771
+0x833D = 0x5772
+0x8342 = 0x5773
+0x8343 = 0x5774
+0x8344 = 0x5775
+0x8347 = 0x5776
+0x834D = 0x5777
+0x834E = 0x5778
+0x8351 = 0x5779
+0x8353 = 0x583E
+0x8354 = 0x5763
+0x8355 = 0x577A
+0x8356 = 0x577B
+0x8357 = 0x577C
+0x8370 = 0x577D
+0x8378 = 0x577E
+0x837D = 0x5821
+0x837F = 0x5822
+0x8380 = 0x5823
+0x8382 = 0x5824
+0x8384 = 0x5825
+0x8386 = 0x5826
+0x838D = 0x5827
+0x8392 = 0x5828
+0x8394 = 0x5829
+0x8395 = 0x582A
+0x8398 = 0x582B
+0x8399 = 0x582C
+0x839B = 0x582D
+0x839C = 0x582E
+0x839D = 0x582F
+0x83A6 = 0x5830
+0x83A7 = 0x5831
+0x83A9 = 0x5832
+0x83AC = 0x5833
+0x83AD = 0x584C
+0x83BE = 0x5834
+0x83BF = 0x5835
+0x83C0 = 0x5836
+0x83C7 = 0x5837
+0x83C9 = 0x5838
+0x83CF = 0x5839
+0x83D0 = 0x583A
+0x83D1 = 0x583B
+0x83D4 = 0x583C
+0x83DD = 0x583D
+0x83E8 = 0x583F
+0x83EA = 0x5840
+0x83F6 = 0x5841
+0x83F8 = 0x5842
+0x83F9 = 0x5843
+0x83FC = 0x5844
+0x8401 = 0x5845
+0x8406 = 0x5846
+0x840A = 0x5847
+0x840F = 0x5848
+0x8411 = 0x5849
+0x8415 = 0x584A
+0x8419 = 0x584B
+0x842F = 0x584D
+0x8439 = 0x584E
+0x8445 = 0x584F
+0x8447 = 0x5850
+0x8448 = 0x5851
+0x844A = 0x5852
+0x844D = 0x5853
+0x844F = 0x5854
+0x8451 = 0x5855
+0x8452 = 0x5856
+0x8456 = 0x5857
+0x8458 = 0x5858
+0x8459 = 0x5859
+0x845A = 0x585A
+0x845C = 0x585B
+0x8460 = 0x585C
+0x8464 = 0x585D
+0x8465 = 0x585E
+0x8467 = 0x585F
+0x846A = 0x5860
+0x8470 = 0x5861
+0x8473 = 0x5862
+0x8474 = 0x5863
+0x8476 = 0x5864
+0x8478 = 0x5865
+0x847C = 0x5866
+0x847D = 0x5867
+0x8481 = 0x5868
+0x8485 = 0x5869
+0x8492 = 0x586A
+0x8493 = 0x586B
+0x8495 = 0x586C
+0x849E = 0x586D
+0x84A6 = 0x586E
+0x84A8 = 0x586F
+0x84A9 = 0x5870
+0x84AA = 0x5871
+0x84AF = 0x5872
+0x84B1 = 0x5873
+0x84B4 = 0x5874
+0x84BA = 0x5875
+0x84BD = 0x5876
+0x84BE = 0x5877
+0x84C0 = 0x5878
+0x84C2 = 0x5879
+0x84C7 = 0x587A
+0x84C8 = 0x587B
+0x84CC = 0x587C
+0x84CF = 0x587D
+0x84D3 = 0x587E
+0x84DC = 0x5921
+0x84E7 = 0x5922
+0x84EA = 0x5923
+0x84EF = 0x5924
+0x84F0 = 0x5925
+0x84F1 = 0x5926
+0x84F2 = 0x5927
+0x84F7 = 0x5928
+0x84FA = 0x592A
+0x84FB = 0x592B
+0x84FD = 0x592C
+0x8502 = 0x592D
+0x8503 = 0x592E
+0x8507 = 0x592F
+0x850C = 0x5930
+0x850E = 0x5931
+0x8510 = 0x5932
+0x851C = 0x5933
+0x851E = 0x5934
+0x8522 = 0x5935
+0x8523 = 0x5936
+0x8524 = 0x5937
+0x8525 = 0x5938
+0x8527 = 0x5939
+0x852A = 0x593A
+0x852B = 0x593B
+0x852F = 0x593C
+0x8532 = 0x5929
+0x8533 = 0x593D
+0x8534 = 0x593E
+0x8536 = 0x593F
+0x853F = 0x5940
+0x8546 = 0x5941
+0x854F = 0x5942
+0x8550 = 0x5943
+0x8551 = 0x5944
+0x8552 = 0x5945
+0x8553 = 0x5946
+0x8556 = 0x5947
+0x8559 = 0x5948
+0x855C = 0x5949
+0x855D = 0x594A
+0x855E = 0x594B
+0x855F = 0x594C
+0x8560 = 0x594D
+0x8561 = 0x594E
+0x8562 = 0x594F
+0x8564 = 0x5950
+0x856B = 0x5951
+0x856F = 0x5952
+0x8579 = 0x5953
+0x857A = 0x5954
+0x857B = 0x5955
+0x857D = 0x5956
+0x857F = 0x5957
+0x8581 = 0x5958
+0x8585 = 0x5959
+0x8586 = 0x595A
+0x8589 = 0x595B
+0x858B = 0x595C
+0x858C = 0x595D
+0x858F = 0x595E
+0x8593 = 0x595F
+0x8598 = 0x5960
+0x859D = 0x5961
+0x859F = 0x5962
+0x85A0 = 0x5963
+0x85A2 = 0x5964
+0x85A5 = 0x5965
+0x85A7 = 0x5966
+0x85AD = 0x5974
+0x85B4 = 0x5967
+0x85B6 = 0x5968
+0x85B7 = 0x5969
+0x85B8 = 0x596A
+0x85BC = 0x596B
+0x85BD = 0x596C
+0x85BE = 0x596D
+0x85BF = 0x596E
+0x85C2 = 0x596F
+0x85C7 = 0x5970
+0x85CA = 0x5971
+0x85CB = 0x5972
+0x85CE = 0x5973
+0x85D8 = 0x5975
+0x85DA = 0x5976
+0x85DF = 0x5977
+0x85E0 = 0x5978
+0x85E6 = 0x5979
+0x85E8 = 0x597A
+0x85ED = 0x597B
+0x85F3 = 0x597C
+0x85F6 = 0x597D
+0x85FC = 0x597E
+0x85FF = 0x5A21
+0x8600 = 0x5A22
+0x8604 = 0x5A23
+0x8605 = 0x5A24
+0x860D = 0x5A25
+0x860E = 0x5A26
+0x8610 = 0x5A27
+0x8611 = 0x5A28
+0x8612 = 0x5A29
+0x8618 = 0x5A2A
+0x8619 = 0x5A2B
+0x861B = 0x5A2C
+0x861E = 0x5A2D
+0x8621 = 0x5A2E
+0x8627 = 0x5A2F
+0x8629 = 0x5A30
+0x8636 = 0x5A31
+0x8638 = 0x5A32
+0x863A = 0x5A33
+0x863C = 0x5A34
+0x863D = 0x5A35
+0x8640 = 0x5A36
+0x8641 = 0x3866
+0x8642 = 0x5A37
+0x8646 = 0x5A38
+0x8652 = 0x5A39
+0x8653 = 0x5A3A
+0x8656 = 0x5A3B
+0x8657 = 0x5A3C
+0x8658 = 0x5A3D
+0x8659 = 0x5A3E
+0x865D = 0x5A3F
+0x8660 = 0x5A40
+0x8661 = 0x5A41
+0x8662 = 0x5A42
+0x8663 = 0x5A43
+0x8664 = 0x5A44
+0x8669 = 0x5A45
+0x866C = 0x5A46
+0x866F = 0x5A47
+0x8675 = 0x5A48
+0x8676 = 0x5A49
+0x8677 = 0x5A4A
+0x867A = 0x5A4B
+0x8688 = 0x5A6D
+0x868D = 0x5A4C
+0x8691 = 0x5A4D
+0x8696 = 0x5A4E
+0x8698 = 0x5A4F
+0x869A = 0x5A50
+0x869C = 0x5A51
+0x86A1 = 0x5A52
+0x86A6 = 0x5A53
+0x86A7 = 0x5A54
+0x86A8 = 0x5A55
+0x86AD = 0x5A56
+0x86B1 = 0x5A57
+0x86B3 = 0x5A58
+0x86B4 = 0x5A59
+0x86B5 = 0x5A5A
+0x86B7 = 0x5A5B
+0x86B8 = 0x5A5C
+0x86B9 = 0x5A5D
+0x86BF = 0x5A5E
+0x86C0 = 0x5A5F
+0x86C1 = 0x5A60
+0x86C3 = 0x5A61
+0x86C5 = 0x5A62
+0x86D1 = 0x5A63
+0x86D2 = 0x5A64
+0x86D5 = 0x5A65
+0x86D7 = 0x5A66
+0x86DA = 0x5A67
+0x86DC = 0x5A68
+0x86E0 = 0x5A69
+0x86E3 = 0x5A6A
+0x86E5 = 0x5A6B
+0x86E7 = 0x5A6C
+0x86FA = 0x5A6E
+0x86FC = 0x5A6F
+0x86FD = 0x5A70
+0x8704 = 0x5A71
+0x8705 = 0x5A72
+0x8707 = 0x5A73
+0x870B = 0x5A74
+0x870E = 0x5A75
+0x870F = 0x5A76
+0x8710 = 0x5A77
+0x8713 = 0x5A78
+0x8714 = 0x5A79
+0x8719 = 0x5A7A
+0x871E = 0x5A7B
+0x871F = 0x5A7C
+0x8721 = 0x5A7D
+0x8723 = 0x5A7E
+0x8728 = 0x5B21
+0x872E = 0x5B22
+0x872F = 0x5B23
+0x8731 = 0x5B24
+0x8732 = 0x5B25
+0x8739 = 0x5B26
+0x873A = 0x5B27
+0x873C = 0x5B28
+0x873D = 0x5B29
+0x873E = 0x5B2A
+0x8740 = 0x5B2B
+0x8743 = 0x5B2C
+0x8745 = 0x5B2D
+0x874D = 0x5B2E
+0x8758 = 0x5B2F
+0x875D = 0x5B30
+0x8761 = 0x5B31
+0x8764 = 0x5B32
+0x8765 = 0x5B33
+0x876F = 0x5B34
+0x8771 = 0x5B35
+0x8772 = 0x5B36
+0x877B = 0x5B37
+0x8783 = 0x5B38
+0x8784 = 0x5B39
+0x8785 = 0x5B3A
+0x8786 = 0x5B3B
+0x8787 = 0x5B3C
+0x8788 = 0x5B3D
+0x8789 = 0x5B3E
+0x878B = 0x5B3F
+0x878C = 0x5B40
+0x8790 = 0x5B41
+0x8793 = 0x5B42
+0x8795 = 0x5B43
+0x8797 = 0x5B44
+0x8798 = 0x5B45
+0x8799 = 0x5B46
+0x879E = 0x5B47
+0x87A0 = 0x5B48
+0x87A3 = 0x5B49
+0x87A7 = 0x5B4A
+0x87AC = 0x5B4B
+0x87AD = 0x5B4C
+0x87AE = 0x5B4D
+0x87B1 = 0x5B4E
+0x87B5 = 0x5B4F
+0x87BE = 0x5B50
+0x87BF = 0x5B51
+0x87C1 = 0x5B52
+0x87C8 = 0x5B53
+0x87C9 = 0x5B54
+0x87CA = 0x5B55
+0x87CE = 0x5B56
+0x87D5 = 0x5B57
+0x87D6 = 0x5B58
+0x87D9 = 0x5B59
+0x87DA = 0x5B5A
+0x87DC = 0x5B5B
+0x87DF = 0x5B5C
+0x87E2 = 0x5B5D
+0x87E3 = 0x5B5E
+0x87E4 = 0x5B5F
+0x87EA = 0x5B60
+0x87EB = 0x5B61
+0x87ED = 0x5B62
+0x87F1 = 0x5B63
+0x87F3 = 0x5B64
+0x87F8 = 0x5B65
+0x87FA = 0x5B66
+0x87FF = 0x5B67
+0x8801 = 0x5B68
+0x8803 = 0x5B69
+0x8806 = 0x5B6A
+0x8809 = 0x5B6B
+0x880A = 0x5B6C
+0x880B = 0x5B6D
+0x8810 = 0x5B6E
+0x8812 = 0x5B70
+0x8813 = 0x5B71
+0x8814 = 0x5B72
+0x8818 = 0x5B73
+0x8819 = 0x5B6F
+0x881A = 0x5B74
+0x881B = 0x5B75
+0x881C = 0x5B76
+0x881E = 0x5B77
+0x881F = 0x5B78
+0x8828 = 0x5B79
+0x882D = 0x5B7A
+0x882E = 0x5B7B
+0x8830 = 0x5B7C
+0x8832 = 0x5B7D
+0x8835 = 0x5B7E
+0x883A = 0x5C21
+0x883C = 0x5C22
+0x8841 = 0x5C23
+0x8843 = 0x5C24
+0x8845 = 0x5C25
+0x8848 = 0x5C26
+0x8849 = 0x5C27
+0x884A = 0x5C28
+0x884B = 0x5C29
+0x884E = 0x5C2A
+0x8851 = 0x5C2B
+0x8855 = 0x5C2C
+0x8856 = 0x5C2D
+0x8858 = 0x5C2E
+0x885A = 0x5C2F
+0x885C = 0x5C30
+0x885F = 0x5C31
+0x8860 = 0x5C32
+0x8864 = 0x5C33
+0x8869 = 0x5C34
+0x8871 = 0x5C35
+0x8879 = 0x5C36
+0x887B = 0x5C37
+0x8880 = 0x5C38
+0x8898 = 0x5C39
+0x889A = 0x5C3A
+0x889B = 0x5C3B
+0x889C = 0x5C3C
+0x889F = 0x5C3D
+0x88A0 = 0x5C3E
+0x88A8 = 0x5C3F
+0x88AA = 0x5C40
+0x88BA = 0x5C41
+0x88BD = 0x5C42
+0x88BE = 0x5C43
+0x88C0 = 0x5C44
+0x88CA = 0x5C45
+0x88CB = 0x5C46
+0x88CC = 0x5C47
+0x88CD = 0x5C48
+0x88CE = 0x5C49
+0x88D1 = 0x5C4A
+0x88D2 = 0x5C4B
+0x88D3 = 0x5C4C
+0x88DB = 0x5C4D
+0x88DE = 0x5C4E
+0x88E7 = 0x5C4F
+0x88EF = 0x5C50
+0x88F0 = 0x5C51
+0x88F1 = 0x5C52
+0x88F5 = 0x5C53
+0x88F7 = 0x5C54
+0x8901 = 0x5C55
+0x8906 = 0x5C56
+0x890D = 0x5C57
+0x890E = 0x5C58
+0x890F = 0x5C59
+0x8915 = 0x5C5A
+0x8916 = 0x5C5B
+0x8918 = 0x5C5C
+0x8919 = 0x5C5D
+0x891A = 0x5C5E
+0x891C = 0x5C5F
+0x8920 = 0x5C60
+0x8926 = 0x5C61
+0x8927 = 0x5C62
+0x8928 = 0x5C63
+0x8930 = 0x5C64
+0x8931 = 0x5C65
+0x8932 = 0x5C66
+0x8935 = 0x5C67
+0x8939 = 0x5C68
+0x893A = 0x5C69
+0x893E = 0x5C6A
+0x8940 = 0x5C6B
+0x8942 = 0x5C6C
+0x8945 = 0x5C6D
+0x8946 = 0x5C6E
+0x8949 = 0x5C6F
+0x894F = 0x5C70
+0x8952 = 0x5C71
+0x8957 = 0x5C72
+0x895A = 0x5C73
+0x895B = 0x5C74
+0x895C = 0x5C75
+0x8961 = 0x5C76
+0x8962 = 0x5C77
+0x8963 = 0x5C78
+0x896B = 0x5C79
+0x896E = 0x5C7A
+0x8970 = 0x5C7B
+0x8973 = 0x5C7C
+0x8975 = 0x5C7D
+0x897A = 0x5C7E
+0x897B = 0x5D21
+0x897C = 0x5D22
+0x897D = 0x5D23
+0x8989 = 0x5D24
+0x898D = 0x5D25
+0x8990 = 0x5D26
+0x8994 = 0x5D27
+0x8995 = 0x5D28
+0x899B = 0x5D29
+0x899C = 0x5D2A
+0x899F = 0x5D2B
+0x89A0 = 0x5D2C
+0x89A5 = 0x5D2D
+0x89B0 = 0x5D2E
+0x89B4 = 0x5D2F
+0x89B5 = 0x5D30
+0x89B6 = 0x5D31
+0x89B7 = 0x5D32
+0x89BC = 0x5D33
+0x89D4 = 0x5D34
+0x89D5 = 0x5D35
+0x89D6 = 0x5D36
+0x89D7 = 0x5D37
+0x89D8 = 0x5D38
+0x89E5 = 0x5D39
+0x89E9 = 0x5D3A
+0x89EB = 0x5D3B
+0x89ED = 0x5D3C
+0x89F1 = 0x5D3D
+0x89F3 = 0x5D3E
+0x89F6 = 0x5D3F
+0x89F9 = 0x5D40
+0x89FD = 0x5D41
+0x89FF = 0x5D42
+0x8A04 = 0x5D43
+0x8A05 = 0x5D44
+0x8A07 = 0x5D45
+0x8A0F = 0x5D46
+0x8A11 = 0x5D47
+0x8A12 = 0x5D48
+0x8A14 = 0x5D49
+0x8A15 = 0x5D4A
+0x8A1E = 0x5D4B
+0x8A20 = 0x5D4C
+0x8A22 = 0x5D4D
+0x8A24 = 0x5D4E
+0x8A26 = 0x5D4F
+0x8A2B = 0x5D50
+0x8A2C = 0x5D51
+0x8A2F = 0x5D52
+0x8A35 = 0x5D53
+0x8A37 = 0x5D54
+0x8A3D = 0x5D55
+0x8A3E = 0x5D56
+0x8A40 = 0x5D57
+0x8A43 = 0x5D58
+0x8A45 = 0x5D59
+0x8A47 = 0x5D5A
+0x8A49 = 0x5D5B
+0x8A4D = 0x5D5C
+0x8A4E = 0x5D5D
+0x8A53 = 0x5D5E
+0x8A56 = 0x5D5F
+0x8A57 = 0x5D60
+0x8A58 = 0x5D61
+0x8A5C = 0x5D62
+0x8A5D = 0x5D63
+0x8A61 = 0x5D64
+0x8A65 = 0x5D65
+0x8A67 = 0x5D66
+0x8A75 = 0x5D67
+0x8A76 = 0x5D68
+0x8A77 = 0x5D69
+0x8A79 = 0x5D6A
+0x8A7A = 0x5D6B
+0x8A7B = 0x5D6C
+0x8A7E = 0x5D6D
+0x8A7F = 0x5D6E
+0x8A80 = 0x5D6F
+0x8A83 = 0x5D70
+0x8A86 = 0x5D71
+0x8A8B = 0x5D72
+0x8A8F = 0x5D73
+0x8A90 = 0x5D74
+0x8A92 = 0x5D75
+0x8A96 = 0x5D76
+0x8A97 = 0x5D77
+0x8A99 = 0x5D78
+0x8A9F = 0x5D79
+0x8AA7 = 0x5D7A
+0x8AA9 = 0x5D7B
+0x8AAE = 0x5D7C
+0x8AAF = 0x5D7D
+0x8AB3 = 0x5D7E
+0x8AB6 = 0x5E21
+0x8AB7 = 0x5E22
+0x8ABB = 0x5E23
+0x8ABE = 0x5E24
+0x8AC3 = 0x5E25
+0x8AC6 = 0x5E26
+0x8AC8 = 0x5E27
+0x8AC9 = 0x5E28
+0x8ACA = 0x5E29
+0x8AD1 = 0x5E2A
+0x8AD3 = 0x5E2B
+0x8AD4 = 0x5E2C
+0x8AD5 = 0x5E2D
+0x8AD7 = 0x5E2E
+0x8ADD = 0x5E2F
+0x8ADF = 0x5E30
+0x8AEC = 0x5E31
+0x8AF0 = 0x5E32
+0x8AF4 = 0x5E33
+0x8AF5 = 0x5E34
+0x8AF6 = 0x5E35
+0x8AFC = 0x5E36
+0x8AFF = 0x5E37
+0x8B05 = 0x5E38
+0x8B06 = 0x5E39
+0x8B0A = 0x5E3F
+0x8B0B = 0x5E3A
+0x8B11 = 0x5E3B
+0x8B1C = 0x5E3C
+0x8B1E = 0x5E3D
+0x8B1F = 0x5E3E
+0x8B2D = 0x5E40
+0x8B30 = 0x5E41
+0x8B37 = 0x5E42
+0x8B3C = 0x5E43
+0x8B42 = 0x5E44
+0x8B43 = 0x5E45
+0x8B44 = 0x5E46
+0x8B45 = 0x5E47
+0x8B46 = 0x5E48
+0x8B48 = 0x5E49
+0x8B4D = 0x5E4E
+0x8B52 = 0x5E4A
+0x8B53 = 0x5E4B
+0x8B54 = 0x5E4C
+0x8B59 = 0x5E4D
+0x8B5E = 0x5E4F
+0x8B63 = 0x5E50
+0x8B6D = 0x5E51
+0x8B76 = 0x5E52
+0x8B78 = 0x5E53
+0x8B79 = 0x5E54
+0x8B7C = 0x5E55
+0x8B7E = 0x5E56
+0x8B81 = 0x5E57
+0x8B84 = 0x5E58
+0x8B85 = 0x5E59
+0x8B8B = 0x5E5A
+0x8B8D = 0x5E5B
+0x8B8F = 0x5E5C
+0x8B94 = 0x5E5D
+0x8B95 = 0x5E5E
+0x8B9C = 0x5E5F
+0x8B9E = 0x5E60
+0x8B9F = 0x5E61
+0x8C38 = 0x5E62
+0x8C39 = 0x5E63
+0x8C3D = 0x5E64
+0x8C3E = 0x5E65
+0x8C45 = 0x5E66
+0x8C47 = 0x5E67
+0x8C49 = 0x5E68
+0x8C4B = 0x5E69
+0x8C4F = 0x5E6A
+0x8C51 = 0x5E6B
+0x8C53 = 0x5E6C
+0x8C54 = 0x5E6D
+0x8C57 = 0x5E6E
+0x8C58 = 0x5E6F
+0x8C59 = 0x5E72
+0x8C5B = 0x5E70
+0x8C5D = 0x5E71
+0x8C63 = 0x5E73
+0x8C64 = 0x5E74
+0x8C66 = 0x5E75
+0x8C68 = 0x5E76
+0x8C69 = 0x5E77
+0x8C6D = 0x5E78
+0x8C73 = 0x5E79
+0x8C75 = 0x5E7A
+0x8C76 = 0x5E7B
+0x8C7B = 0x5E7C
+0x8C7E = 0x5E7D
+0x8C86 = 0x5E7E
+0x8C87 = 0x5F21
+0x8C8B = 0x5F22
+0x8C90 = 0x5F23
+0x8C92 = 0x5F24
+0x8C93 = 0x5F25
+0x8C99 = 0x5F26
+0x8C9B = 0x5F27
+0x8C9C = 0x5F28
+0x8CA4 = 0x5F29
+0x8CB9 = 0x5F2A
+0x8CBA = 0x5F2B
+0x8CC5 = 0x5F2C
+0x8CC6 = 0x5F2D
+0x8CC9 = 0x5F2E
+0x8CCB = 0x5F2F
+0x8CCF = 0x5F30
+0x8CD5 = 0x5F32
+0x8CD6 = 0x5F31
+0x8CD9 = 0x5F33
+0x8CDD = 0x5F34
+0x8CE1 = 0x5F35
+0x8CE8 = 0x5F36
+0x8CEC = 0x5F37
+0x8CEF = 0x5F38
+0x8CF0 = 0x5F39
+0x8CF2 = 0x5F3A
+0x8CF5 = 0x5F3B
+0x8CF7 = 0x5F3C
+0x8CF8 = 0x5F3D
+0x8CFE = 0x5F3E
+0x8CFF = 0x5F3F
+0x8D01 = 0x5F40
+0x8D03 = 0x5F41
+0x8D09 = 0x5F42
+0x8D12 = 0x5F43
+0x8D17 = 0x5F44
+0x8D1B = 0x5F45
+0x8D65 = 0x5F46
+0x8D69 = 0x5F47
+0x8D6C = 0x5F48
+0x8D6E = 0x5F49
+0x8D7F = 0x5F4A
+0x8D82 = 0x5F4B
+0x8D84 = 0x5F4C
+0x8D88 = 0x5F4D
+0x8D8D = 0x5F4E
+0x8D90 = 0x5F4F
+0x8D91 = 0x5F50
+0x8D95 = 0x5F51
+0x8D9E = 0x5F52
+0x8D9F = 0x5F53
+0x8DA0 = 0x5F54
+0x8DA6 = 0x5F55
+0x8DAB = 0x5F56
+0x8DAC = 0x5F57
+0x8DAF = 0x5F58
+0x8DB2 = 0x5F59
+0x8DB5 = 0x5F5A
+0x8DB7 = 0x5F5B
+0x8DB9 = 0x5F5C
+0x8DBB = 0x5F5D
+0x8DBC = 0x5F6F
+0x8DC0 = 0x5F5E
+0x8DC5 = 0x5F5F
+0x8DC6 = 0x5F60
+0x8DC7 = 0x5F61
+0x8DC8 = 0x5F62
+0x8DCA = 0x5F63
+0x8DCE = 0x5F64
+0x8DD1 = 0x5F65
+0x8DD4 = 0x5F66
+0x8DD5 = 0x5F67
+0x8DD7 = 0x5F68
+0x8DD9 = 0x5F69
+0x8DE4 = 0x5F6A
+0x8DE5 = 0x5F6B
+0x8DE7 = 0x5F6C
+0x8DEC = 0x5F6D
+0x8DF0 = 0x5F6E
+0x8DF1 = 0x5F70
+0x8DF2 = 0x5F71
+0x8DF4 = 0x5F72
+0x8DFD = 0x5F73
+0x8E01 = 0x5F74
+0x8E04 = 0x5F75
+0x8E05 = 0x5F76
+0x8E06 = 0x5F77
+0x8E0B = 0x5F78
+0x8E11 = 0x5F79
+0x8E14 = 0x5F7A
+0x8E16 = 0x5F7B
+0x8E20 = 0x5F7C
+0x8E21 = 0x5F7D
+0x8E22 = 0x5F7E
+0x8E23 = 0x6021
+0x8E26 = 0x6022
+0x8E27 = 0x6023
+0x8E31 = 0x6024
+0x8E33 = 0x6025
+0x8E36 = 0x6026
+0x8E37 = 0x6027
+0x8E38 = 0x6028
+0x8E39 = 0x6029
+0x8E3D = 0x602A
+0x8E40 = 0x602B
+0x8E41 = 0x602C
+0x8E4B = 0x602D
+0x8E4D = 0x602E
+0x8E4E = 0x602F
+0x8E4F = 0x6030
+0x8E54 = 0x6031
+0x8E5B = 0x6032
+0x8E5C = 0x6033
+0x8E5D = 0x6034
+0x8E5E = 0x6035
+0x8E61 = 0x6036
+0x8E62 = 0x6037
+0x8E69 = 0x6038
+0x8E6C = 0x6039
+0x8E6D = 0x603A
+0x8E6F = 0x603B
+0x8E70 = 0x603C
+0x8E71 = 0x603D
+0x8E79 = 0x603E
+0x8E7A = 0x603F
+0x8E7B = 0x6040
+0x8E82 = 0x6041
+0x8E83 = 0x6042
+0x8E89 = 0x6043
+0x8E90 = 0x6044
+0x8E92 = 0x6045
+0x8E95 = 0x6046
+0x8E9A = 0x6047
+0x8E9B = 0x6048
+0x8E9D = 0x6049
+0x8E9E = 0x604A
+0x8EA2 = 0x604B
+0x8EA7 = 0x604C
+0x8EA9 = 0x604D
+0x8EAD = 0x604E
+0x8EAE = 0x604F
+0x8EB3 = 0x6050
+0x8EB5 = 0x6051
+0x8EBA = 0x6052
+0x8EBB = 0x6053
+0x8EC0 = 0x6054
+0x8EC1 = 0x6055
+0x8EC3 = 0x6056
+0x8EC4 = 0x6057
+0x8EC7 = 0x6058
+0x8ECF = 0x6059
+0x8ED1 = 0x605A
+0x8ED4 = 0x605B
+0x8EDC = 0x605C
+0x8EE8 = 0x605D
+0x8EED = 0x6064
+0x8EEE = 0x605E
+0x8EF0 = 0x605F
+0x8EF1 = 0x6060
+0x8EF7 = 0x6061
+0x8EF9 = 0x6062
+0x8EFA = 0x6063
+0x8F00 = 0x6065
+0x8F02 = 0x6066
+0x8F07 = 0x6067
+0x8F08 = 0x6068
+0x8F0F = 0x6069
+0x8F10 = 0x606A
+0x8F16 = 0x606B
+0x8F17 = 0x606C
+0x8F18 = 0x606D
+0x8F1E = 0x606E
+0x8F20 = 0x606F
+0x8F21 = 0x6070
+0x8F23 = 0x6071
+0x8F25 = 0x6072
+0x8F27 = 0x6073
+0x8F28 = 0x6074
+0x8F2C = 0x6075
+0x8F2D = 0x6076
+0x8F2E = 0x6077
+0x8F34 = 0x6078
+0x8F35 = 0x6079
+0x8F36 = 0x607A
+0x8F37 = 0x607B
+0x8F3A = 0x607C
+0x8F40 = 0x607D
+0x8F41 = 0x607E
+0x8F43 = 0x6121
+0x8F47 = 0x6122
+0x8F4F = 0x6123
+0x8F51 = 0x6124
+0x8F52 = 0x6125
+0x8F53 = 0x6126
+0x8F54 = 0x6127
+0x8F55 = 0x6128
+0x8F58 = 0x6129
+0x8F5D = 0x612A
+0x8F5E = 0x612B
+0x8F65 = 0x612C
+0x8F9D = 0x612D
+0x8FA0 = 0x612E
+0x8FA1 = 0x612F
+0x8FA4 = 0x6130
+0x8FA5 = 0x6131
+0x8FA6 = 0x6132
+0x8FB5 = 0x6133
+0x8FB6 = 0x6134
+0x8FB8 = 0x6135
+0x8FBE = 0x6136
+0x8FC0 = 0x6137
+0x8FC1 = 0x6138
+0x8FC6 = 0x6139
+0x8FCA = 0x613A
+0x8FCB = 0x613B
+0x8FCD = 0x613C
+0x8FD0 = 0x613D
+0x8FD2 = 0x613E
+0x8FD3 = 0x613F
+0x8FD5 = 0x6140
+0x8FE0 = 0x6141
+0x8FE3 = 0x6142
+0x8FE4 = 0x6143
+0x8FE8 = 0x6144
+0x8FEE = 0x6145
+0x8FF1 = 0x6146
+0x8FF5 = 0x6147
+0x8FF6 = 0x6148
+0x8FFB = 0x6149
+0x8FFE = 0x614A
+0x9002 = 0x614B
+0x9004 = 0x614C
+0x9008 = 0x614D
+0x900C = 0x614E
+0x9018 = 0x614F
+0x901B = 0x6150
+0x9028 = 0x6151
+0x9029 = 0x6152
+0x902A = 0x6154
+0x902C = 0x6155
+0x902D = 0x6156
+0x902F = 0x6153
+0x9033 = 0x6157
+0x9034 = 0x6158
+0x9037 = 0x6159
+0x903F = 0x615A
+0x9043 = 0x615B
+0x9044 = 0x615C
+0x904C = 0x615D
+0x905B = 0x615E
+0x905D = 0x615F
+0x9062 = 0x6160
+0x9066 = 0x6161
+0x9067 = 0x6162
+0x906C = 0x6163
+0x9070 = 0x6164
+0x9074 = 0x6165
+0x9079 = 0x6166
+0x9085 = 0x6167
+0x9088 = 0x6168
+0x908B = 0x6169
+0x908C = 0x616A
+0x908E = 0x616B
+0x9090 = 0x616C
+0x9095 = 0x616D
+0x9097 = 0x616E
+0x9098 = 0x616F
+0x9099 = 0x6170
+0x909B = 0x6171
+0x90A0 = 0x6172
+0x90A1 = 0x6173
+0x90A2 = 0x6174
+0x90A5 = 0x6175
+0x90B0 = 0x6176
+0x90B2 = 0x6177
+0x90B3 = 0x6178
+0x90B4 = 0x6179
+0x90B6 = 0x617A
+0x90BD = 0x617B
+0x90BE = 0x617D
+0x90C3 = 0x617E
+0x90C4 = 0x6221
+0x90C5 = 0x6222
+0x90C7 = 0x6223
+0x90C8 = 0x6224
+0x90CC = 0x617C
+0x90D2 = 0x622D
+0x90D5 = 0x6225
+0x90D7 = 0x6226
+0x90D8 = 0x6227
+0x90D9 = 0x6228
+0x90DC = 0x6229
+0x90DD = 0x622A
+0x90DF = 0x622B
+0x90E5 = 0x622C
+0x90EB = 0x622F
+0x90EF = 0x6230
+0x90F0 = 0x6231
+0x90F4 = 0x6232
+0x90F6 = 0x622E
+0x90FE = 0x6233
+0x90FF = 0x6234
+0x9100 = 0x6235
+0x9104 = 0x6236
+0x9105 = 0x6237
+0x9106 = 0x6238
+0x9108 = 0x6239
+0x910D = 0x623A
+0x9110 = 0x623B
+0x9114 = 0x623C
+0x9116 = 0x623D
+0x9117 = 0x623E
+0x9118 = 0x623F
+0x911A = 0x6240
+0x911C = 0x6241
+0x911E = 0x6242
+0x9120 = 0x6243
+0x9122 = 0x6245
+0x9123 = 0x6246
+0x9125 = 0x6244
+0x9127 = 0x6247
+0x9129 = 0x6248
+0x912E = 0x6249
+0x912F = 0x624A
+0x9131 = 0x624B
+0x9134 = 0x624C
+0x9136 = 0x624D
+0x9137 = 0x624E
+0x9139 = 0x624F
+0x913A = 0x6250
+0x913C = 0x6251
+0x913D = 0x6252
+0x9143 = 0x6253
+0x9147 = 0x6254
+0x9148 = 0x6255
+0x914F = 0x6256
+0x9153 = 0x6257
+0x9157 = 0x6258
+0x9159 = 0x6259
+0x915A = 0x625A
+0x915B = 0x625B
+0x9161 = 0x625C
+0x9164 = 0x625D
+0x9167 = 0x625E
+0x916D = 0x625F
+0x9174 = 0x6260
+0x9179 = 0x6261
+0x917A = 0x6262
+0x917B = 0x6263
+0x9181 = 0x6264
+0x9183 = 0x6265
+0x9185 = 0x6266
+0x9186 = 0x6267
+0x918A = 0x6268
+0x918E = 0x6269
+0x9191 = 0x626A
+0x9193 = 0x626B
+0x9194 = 0x626C
+0x9195 = 0x626D
+0x9198 = 0x626E
+0x919E = 0x626F
+0x91A1 = 0x6270
+0x91A6 = 0x6271
+0x91A8 = 0x6272
+0x91AC = 0x6273
+0x91AD = 0x6274
+0x91AE = 0x6275
+0x91B0 = 0x6276
+0x91B1 = 0x6277
+0x91B2 = 0x6278
+0x91B3 = 0x6279
+0x91B6 = 0x627A
+0x91BB = 0x627B
+0x91BC = 0x627C
+0x91BD = 0x627D
+0x91BF = 0x627E
+0x91C2 = 0x6321
+0x91C3 = 0x6322
+0x91C5 = 0x6323
+0x91D3 = 0x6324
+0x91D4 = 0x6325
+0x91D7 = 0x6326
+0x91D9 = 0x6327
+0x91DA = 0x6328
+0x91DE = 0x6329
+0x91E4 = 0x632A
+0x91E5 = 0x632B
+0x91E9 = 0x632C
+0x91EA = 0x632D
+0x91EC = 0x632E
+0x91ED = 0x632F
+0x91EE = 0x6330
+0x91EF = 0x6331
+0x91F0 = 0x6332
+0x91F1 = 0x6333
+0x91F7 = 0x6334
+0x91F9 = 0x6335
+0x91FB = 0x6336
+0x91FD = 0x6337
+0x9200 = 0x6338
+0x9201 = 0x6339
+0x9204 = 0x633A
+0x9205 = 0x633B
+0x9206 = 0x633C
+0x9207 = 0x633D
+0x9209 = 0x633E
+0x920A = 0x633F
+0x920C = 0x6340
+0x9210 = 0x6341
+0x9212 = 0x6342
+0x9213 = 0x6343
+0x9216 = 0x6344
+0x9218 = 0x6345
+0x921C = 0x6346
+0x921D = 0x6347
+0x9223 = 0x6348
+0x9224 = 0x6349
+0x9225 = 0x634A
+0x9226 = 0x634B
+0x9228 = 0x634C
+0x922E = 0x634D
+0x922F = 0x634E
+0x9230 = 0x634F
+0x9233 = 0x6350
+0x9235 = 0x6351
+0x9236 = 0x6352
+0x9238 = 0x6353
+0x9239 = 0x6354
+0x923A = 0x6355
+0x923C = 0x6356
+0x923E = 0x6357
+0x9240 = 0x6358
+0x9242 = 0x6359
+0x9243 = 0x635A
+0x9246 = 0x635B
+0x9247 = 0x635C
+0x924A = 0x635D
+0x924D = 0x635E
+0x924E = 0x635F
+0x924F = 0x6360
+0x9251 = 0x6361
+0x9258 = 0x6362
+0x9259 = 0x6363
+0x925C = 0x6364
+0x925D = 0x6365
+0x9260 = 0x6366
+0x9261 = 0x6367
+0x9265 = 0x6368
+0x9267 = 0x6369
+0x9268 = 0x636A
+0x9269 = 0x636B
+0x926E = 0x636C
+0x926F = 0x636D
+0x9270 = 0x636E
+0x9275 = 0x636F
+0x9276 = 0x6370
+0x9277 = 0x6371
+0x9278 = 0x6372
+0x9279 = 0x6373
+0x927B = 0x6374
+0x927C = 0x6375
+0x927D = 0x6376
+0x927F = 0x6377
+0x9288 = 0x6378
+0x9289 = 0x6379
+0x928A = 0x637A
+0x928D = 0x637B
+0x928E = 0x637C
+0x9292 = 0x637D
+0x9297 = 0x637E
+0x9299 = 0x6421
+0x929F = 0x6422
+0x92A0 = 0x6423
+0x92A4 = 0x6424
+0x92A5 = 0x6425
+0x92A7 = 0x6426
+0x92A8 = 0x6427
+0x92AB = 0x6428
+0x92AF = 0x6429
+0x92B2 = 0x642A
+0x92B6 = 0x642B
+0x92B8 = 0x642C
+0x92BA = 0x642D
+0x92BB = 0x642E
+0x92BC = 0x642F
+0x92BD = 0x6430
+0x92BF = 0x6431
+0x92C0 = 0x6432
+0x92C1 = 0x6433
+0x92C2 = 0x6434
+0x92C3 = 0x6435
+0x92C5 = 0x6436
+0x92C6 = 0x6437
+0x92C7 = 0x6438
+0x92C8 = 0x6439
+0x92CB = 0x643A
+0x92CC = 0x643B
+0x92CD = 0x643C
+0x92CE = 0x643D
+0x92D0 = 0x643E
+0x92D3 = 0x643F
+0x92D5 = 0x6440
+0x92D7 = 0x6441
+0x92D8 = 0x6442
+0x92D9 = 0x6443
+0x92DC = 0x6444
+0x92DD = 0x6445
+0x92DF = 0x6446
+0x92E0 = 0x6447
+0x92E1 = 0x6448
+0x92E3 = 0x6449
+0x92E5 = 0x644A
+0x92E7 = 0x644B
+0x92E8 = 0x644C
+0x92EC = 0x644D
+0x92EE = 0x644E
+0x92F0 = 0x644F
+0x92F9 = 0x6450
+0x92FB = 0x6451
+0x92FF = 0x6452
+0x9300 = 0x6453
+0x9302 = 0x6454
+0x9308 = 0x6455
+0x930D = 0x6456
+0x9311 = 0x6457
+0x9314 = 0x6458
+0x9315 = 0x6459
+0x931C = 0x645A
+0x931D = 0x645B
+0x931E = 0x645C
+0x931F = 0x645D
+0x9321 = 0x645E
+0x9324 = 0x645F
+0x9325 = 0x6460
+0x9327 = 0x6461
+0x9329 = 0x6462
+0x932A = 0x6463
+0x9333 = 0x6464
+0x9334 = 0x6465
+0x9336 = 0x6466
+0x9337 = 0x6467
+0x9347 = 0x6468
+0x9348 = 0x6469
+0x9349 = 0x646A
+0x9350 = 0x646B
+0x9351 = 0x646C
+0x9352 = 0x646D
+0x9355 = 0x646E
+0x9357 = 0x646F
+0x9358 = 0x6470
+0x935A = 0x6471
+0x935E = 0x6472
+0x9364 = 0x6473
+0x9365 = 0x6474
+0x9367 = 0x6475
+0x9369 = 0x6476
+0x936A = 0x6477
+0x936D = 0x6478
+0x936F = 0x6479
+0x9370 = 0x647A
+0x9371 = 0x647B
+0x9373 = 0x647C
+0x9374 = 0x647D
+0x9376 = 0x647E
+0x937A = 0x6521
+0x937D = 0x6522
+0x937F = 0x6523
+0x9380 = 0x6524
+0x9381 = 0x6525
+0x9382 = 0x6526
+0x9388 = 0x6527
+0x938A = 0x6528
+0x938B = 0x6529
+0x938D = 0x652A
+0x938F = 0x652B
+0x9392 = 0x652C
+0x9395 = 0x652D
+0x9398 = 0x652E
+0x939B = 0x652F
+0x939E = 0x6530
+0x93A1 = 0x6531
+0x93A3 = 0x6532
+0x93A4 = 0x6533
+0x93A6 = 0x6534
+0x93A8 = 0x6535
+0x93A9 = 0x653B
+0x93AB = 0x6536
+0x93B4 = 0x6537
+0x93B5 = 0x6538
+0x93B6 = 0x6539
+0x93BA = 0x653A
+0x93C1 = 0x653C
+0x93C4 = 0x653D
+0x93C5 = 0x653E
+0x93C6 = 0x653F
+0x93C7 = 0x6540
+0x93C9 = 0x6541
+0x93CA = 0x6542
+0x93CB = 0x6543
+0x93CC = 0x6544
+0x93CD = 0x6545
+0x93D3 = 0x6546
+0x93D9 = 0x6547
+0x93DC = 0x6548
+0x93DE = 0x6549
+0x93DF = 0x654A
+0x93E2 = 0x654B
+0x93E6 = 0x654C
+0x93E7 = 0x654D
+0x93F7 = 0x654F
+0x93F8 = 0x6550
+0x93F9 = 0x654E
+0x93FA = 0x6551
+0x93FB = 0x6552
+0x93FD = 0x6553
+0x9401 = 0x6554
+0x9402 = 0x6555
+0x9404 = 0x6556
+0x9408 = 0x6557
+0x9409 = 0x6558
+0x940D = 0x6559
+0x940E = 0x655A
+0x940F = 0x655B
+0x9415 = 0x655C
+0x9416 = 0x655D
+0x9417 = 0x655E
+0x941F = 0x655F
+0x942E = 0x6560
+0x942F = 0x6561
+0x9431 = 0x6562
+0x9432 = 0x6563
+0x9433 = 0x6564
+0x9434 = 0x6565
+0x943B = 0x6566
+0x943D = 0x6568
+0x943F = 0x6567
+0x9443 = 0x6569
+0x9445 = 0x656A
+0x9448 = 0x656B
+0x944A = 0x656C
+0x944C = 0x656D
+0x9455 = 0x656E
+0x9459 = 0x656F
+0x945C = 0x6570
+0x945F = 0x6571
+0x9461 = 0x6572
+0x9463 = 0x6573
+0x9468 = 0x6574
+0x946B = 0x6575
+0x946D = 0x6576
+0x946E = 0x6577
+0x946F = 0x6578
+0x9471 = 0x6579
+0x9472 = 0x657A
+0x9483 = 0x657C
+0x9484 = 0x657B
+0x9578 = 0x657D
+0x9579 = 0x657E
+0x957E = 0x6621
+0x9584 = 0x6622
+0x9588 = 0x6623
+0x958C = 0x6624
+0x958D = 0x6625
+0x958E = 0x6626
+0x959D = 0x6627
+0x959E = 0x6628
+0x959F = 0x6629
+0x95A1 = 0x662A
+0x95A6 = 0x662B
+0x95A9 = 0x662C
+0x95AB = 0x662D
+0x95AC = 0x662E
+0x95B4 = 0x662F
+0x95B6 = 0x6630
+0x95BA = 0x6631
+0x95BD = 0x6632
+0x95BF = 0x6633
+0x95C6 = 0x6634
+0x95C8 = 0x6635
+0x95C9 = 0x6636
+0x95CB = 0x6637
+0x95D0 = 0x6638
+0x95D1 = 0x6639
+0x95D2 = 0x663A
+0x95D3 = 0x663B
+0x95D9 = 0x663C
+0x95DA = 0x663D
+0x95DD = 0x663E
+0x95DE = 0x663F
+0x95DF = 0x6640
+0x95E0 = 0x6641
+0x95E4 = 0x6642
+0x95E6 = 0x6643
+0x961D = 0x6644
+0x961E = 0x6645
+0x9622 = 0x6646
+0x9624 = 0x6647
+0x9625 = 0x6648
+0x9626 = 0x6649
+0x962C = 0x664A
+0x9631 = 0x664B
+0x9633 = 0x664C
+0x9637 = 0x664D
+0x9638 = 0x664E
+0x9639 = 0x664F
+0x963A = 0x6650
+0x963C = 0x6651
+0x963D = 0x6652
+0x9641 = 0x6653
+0x9652 = 0x6654
+0x9654 = 0x6655
+0x9656 = 0x6656
+0x9657 = 0x6657
+0x9658 = 0x6658
+0x9661 = 0x6659
+0x966E = 0x665A
+0x9674 = 0x665B
+0x967B = 0x665C
+0x967C = 0x665D
+0x967E = 0x665E
+0x967F = 0x665F
+0x9681 = 0x6660
+0x9682 = 0x6661
+0x9683 = 0x6662
+0x9684 = 0x6663
+0x9689 = 0x6664
+0x9691 = 0x6665
+0x9696 = 0x6666
+0x969A = 0x6667
+0x969D = 0x6668
+0x969F = 0x6669
+0x96A4 = 0x666A
+0x96A5 = 0x666B
+0x96A6 = 0x666C
+0x96A9 = 0x666D
+0x96AE = 0x666E
+0x96AF = 0x666F
+0x96B3 = 0x6670
+0x96BA = 0x6671
+0x96CA = 0x6672
+0x96D2 = 0x6673
+0x96D8 = 0x6675
+0x96DA = 0x6676
+0x96DD = 0x6677
+0x96DE = 0x6678
+0x96DF = 0x6679
+0x96E9 = 0x667A
+0x96EF = 0x667B
+0x96F1 = 0x667C
+0x96FA = 0x667D
+0x9702 = 0x667E
+0x9703 = 0x6721
+0x9705 = 0x6722
+0x9709 = 0x6723
+0x971A = 0x6724
+0x971B = 0x6725
+0x971D = 0x6726
+0x9721 = 0x6727
+0x9722 = 0x6728
+0x9723 = 0x6729
+0x9728 = 0x672A
+0x9731 = 0x672B
+0x9733 = 0x672C
+0x9741 = 0x672D
+0x9743 = 0x672E
+0x974A = 0x672F
+0x974E = 0x6730
+0x974F = 0x6731
+0x9755 = 0x6732
+0x9757 = 0x6733
+0x9758 = 0x6734
+0x975A = 0x6735
+0x975B = 0x6736
+0x9763 = 0x6737
+0x9767 = 0x6738
+0x976A = 0x6739
+0x976E = 0x673A
+0x9773 = 0x673B
+0x9776 = 0x673C
+0x9777 = 0x673D
+0x9778 = 0x673E
+0x977B = 0x673F
+0x977D = 0x6740
+0x977F = 0x6741
+0x9780 = 0x6742
+0x9789 = 0x6743
+0x9795 = 0x6744
+0x9796 = 0x6745
+0x9797 = 0x6746
+0x9799 = 0x6747
+0x979A = 0x6748
+0x979E = 0x6749
+0x979F = 0x674A
+0x97A2 = 0x674B
+0x97AC = 0x674C
+0x97AE = 0x674D
+0x97B1 = 0x674E
+0x97B2 = 0x674F
+0x97B5 = 0x6750
+0x97B6 = 0x6751
+0x97B8 = 0x6752
+0x97B9 = 0x6753
+0x97BA = 0x6754
+0x97BC = 0x6755
+0x97BE = 0x6756
+0x97BF = 0x6757
+0x97C1 = 0x6758
+0x97C4 = 0x6759
+0x97C5 = 0x675A
+0x97C7 = 0x675B
+0x97C9 = 0x675C
+0x97CA = 0x675D
+0x97CC = 0x675E
+0x97CD = 0x675F
+0x97CE = 0x6760
+0x97D0 = 0x6761
+0x97D1 = 0x6762
+0x97D4 = 0x6763
+0x97D7 = 0x6764
+0x97D8 = 0x6765
+0x97D9 = 0x6766
+0x97DB = 0x676A
+0x97DD = 0x6767
+0x97DE = 0x6768
+0x97E0 = 0x6769
+0x97E1 = 0x676B
+0x97E4 = 0x676C
+0x97EF = 0x676D
+0x97F1 = 0x676E
+0x97F4 = 0x676F
+0x97F7 = 0x6770
+0x97F8 = 0x6771
+0x97FA = 0x6772
+0x9807 = 0x6773
+0x980A = 0x6774
+0x980D = 0x6776
+0x980E = 0x6777
+0x9814 = 0x6778
+0x9816 = 0x6779
+0x9819 = 0x6775
+0x981C = 0x677A
+0x981E = 0x677B
+0x9820 = 0x677C
+0x9823 = 0x677D
+0x9825 = 0x6828
+0x9826 = 0x677E
+0x982B = 0x6821
+0x982E = 0x6822
+0x982F = 0x6823
+0x9830 = 0x6824
+0x9832 = 0x6825
+0x9833 = 0x6826
+0x9835 = 0x6827
+0x983E = 0x6829
+0x9844 = 0x682A
+0x9847 = 0x682B
+0x984A = 0x682C
+0x9851 = 0x682D
+0x9852 = 0x682E
+0x9853 = 0x682F
+0x9856 = 0x6830
+0x9857 = 0x6831
+0x9859 = 0x6832
+0x985A = 0x6833
+0x9862 = 0x6834
+0x9863 = 0x6835
+0x9865 = 0x6836
+0x9866 = 0x6837
+0x986A = 0x6838
+0x986C = 0x6839
+0x98AB = 0x683A
+0x98AD = 0x683B
+0x98AE = 0x683C
+0x98B0 = 0x683D
+0x98B4 = 0x683E
+0x98B7 = 0x683F
+0x98B8 = 0x6840
+0x98BA = 0x6841
+0x98BB = 0x6842
+0x98BF = 0x6843
+0x98C2 = 0x6844
+0x98C5 = 0x6845
+0x98C8 = 0x6846
+0x98CC = 0x6847
+0x98E1 = 0x6848
+0x98E3 = 0x6849
+0x98E5 = 0x684A
+0x98E6 = 0x684B
+0x98E7 = 0x684C
+0x98EA = 0x684D
+0x98F3 = 0x684E
+0x98F6 = 0x684F
+0x9902 = 0x6850
+0x9907 = 0x6851
+0x9908 = 0x6852
+0x9911 = 0x6853
+0x9915 = 0x6854
+0x9916 = 0x6855
+0x9917 = 0x6856
+0x991A = 0x6857
+0x991B = 0x6858
+0x991C = 0x6859
+0x991F = 0x685A
+0x9922 = 0x685B
+0x9926 = 0x685C
+0x9927 = 0x685D
+0x992B = 0x685E
+0x9931 = 0x685F
+0x9932 = 0x6860
+0x9933 = 0x6861
+0x9934 = 0x6862
+0x9935 = 0x6863
+0x9939 = 0x6864
+0x993A = 0x6865
+0x993B = 0x6866
+0x993C = 0x6867
+0x9940 = 0x6868
+0x9941 = 0x6869
+0x9946 = 0x686A
+0x9947 = 0x686B
+0x9948 = 0x686C
+0x994D = 0x686D
+0x994E = 0x686E
+0x9954 = 0x686F
+0x9958 = 0x6870
+0x9959 = 0x6871
+0x995B = 0x6872
+0x995C = 0x6873
+0x995E = 0x6874
+0x995F = 0x6875
+0x9960 = 0x6876
+0x999B = 0x6877
+0x999D = 0x6878
+0x999F = 0x6879
+0x99A6 = 0x687A
+0x99B0 = 0x687B
+0x99B1 = 0x687C
+0x99B2 = 0x687D
+0x99B5 = 0x687E
+0x99B9 = 0x6921
+0x99BA = 0x6922
+0x99BD = 0x6923
+0x99BF = 0x6924
+0x99C3 = 0x6925
+0x99C9 = 0x6926
+0x99D3 = 0x6927
+0x99D4 = 0x6928
+0x99D9 = 0x6929
+0x99DA = 0x692A
+0x99DC = 0x692B
+0x99DE = 0x692C
+0x99E7 = 0x692D
+0x99EA = 0x692E
+0x99EB = 0x692F
+0x99EC = 0x6930
+0x99F0 = 0x6931
+0x99F4 = 0x6932
+0x99F5 = 0x6933
+0x99F9 = 0x6934
+0x99FD = 0x6935
+0x99FE = 0x6936
+0x9A02 = 0x6937
+0x9A03 = 0x6938
+0x9A04 = 0x6939
+0x9A0B = 0x693A
+0x9A0C = 0x693B
+0x9A10 = 0x693C
+0x9A11 = 0x693D
+0x9A16 = 0x693E
+0x9A1E = 0x693F
+0x9A20 = 0x6940
+0x9A22 = 0x6941
+0x9A23 = 0x6942
+0x9A24 = 0x6943
+0x9A27 = 0x6944
+0x9A2D = 0x6945
+0x9A2E = 0x6946
+0x9A33 = 0x6947
+0x9A35 = 0x6948
+0x9A36 = 0x6949
+0x9A38 = 0x694A
+0x9A41 = 0x694C
+0x9A44 = 0x694D
+0x9A47 = 0x694B
+0x9A4A = 0x694E
+0x9A4B = 0x694F
+0x9A4C = 0x6950
+0x9A4E = 0x6951
+0x9A51 = 0x6952
+0x9A54 = 0x6953
+0x9A56 = 0x6954
+0x9A5D = 0x6955
+0x9AAA = 0x6956
+0x9AAC = 0x6957
+0x9AAE = 0x6958
+0x9AAF = 0x6959
+0x9AB2 = 0x695A
+0x9AB4 = 0x695B
+0x9AB5 = 0x695C
+0x9AB6 = 0x695D
+0x9AB9 = 0x695E
+0x9ABB = 0x695F
+0x9ABE = 0x6960
+0x9ABF = 0x6961
+0x9AC1 = 0x6962
+0x9AC3 = 0x6963
+0x9AC6 = 0x6964
+0x9AC8 = 0x6965
+0x9ACE = 0x6966
+0x9AD0 = 0x6967
+0x9AD2 = 0x6968
+0x9AD5 = 0x6969
+0x9AD6 = 0x696A
+0x9AD7 = 0x696B
+0x9ADB = 0x696C
+0x9ADC = 0x696D
+0x9AE0 = 0x696E
+0x9AE4 = 0x696F
+0x9AE5 = 0x6970
+0x9AE7 = 0x6971
+0x9AE9 = 0x6972
+0x9AEC = 0x6973
+0x9AF2 = 0x6974
+0x9AF3 = 0x6975
+0x9AF5 = 0x6976
+0x9AF9 = 0x6977
+0x9AFA = 0x6978
+0x9AFD = 0x6979
+0x9AFF = 0x697A
+0x9B00 = 0x697B
+0x9B01 = 0x697C
+0x9B02 = 0x697D
+0x9B03 = 0x697E
+0x9B04 = 0x6A21
+0x9B05 = 0x6A22
+0x9B08 = 0x6A23
+0x9B09 = 0x6A24
+0x9B0B = 0x6A25
+0x9B0C = 0x6A26
+0x9B0D = 0x6A27
+0x9B0E = 0x6A28
+0x9B10 = 0x6A29
+0x9B12 = 0x6A2A
+0x9B16 = 0x6A2B
+0x9B19 = 0x6A2C
+0x9B1B = 0x6A2D
+0x9B1C = 0x6A2E
+0x9B20 = 0x6A2F
+0x9B26 = 0x6A30
+0x9B2B = 0x6A31
+0x9B2D = 0x6A32
+0x9B33 = 0x6A33
+0x9B34 = 0x6A34
+0x9B35 = 0x6A35
+0x9B37 = 0x6A36
+0x9B39 = 0x6A37
+0x9B3A = 0x6A38
+0x9B3D = 0x6A39
+0x9B48 = 0x6A3A
+0x9B4B = 0x6A3B
+0x9B4C = 0x6A3C
+0x9B55 = 0x6A3D
+0x9B56 = 0x6A3E
+0x9B57 = 0x6A3F
+0x9B5B = 0x6A40
+0x9B5E = 0x6A41
+0x9B61 = 0x6A42
+0x9B63 = 0x6A43
+0x9B65 = 0x6A44
+0x9B66 = 0x6A45
+0x9B68 = 0x6A46
+0x9B6A = 0x6A47
+0x9B6B = 0x6A48
+0x9B6C = 0x6A49
+0x9B6D = 0x6A4A
+0x9B6E = 0x6A4B
+0x9B73 = 0x6A4C
+0x9B75 = 0x6A4D
+0x9B77 = 0x6A4E
+0x9B78 = 0x6A4F
+0x9B79 = 0x6A50
+0x9B7F = 0x6A51
+0x9B80 = 0x6A52
+0x9B84 = 0x6A53
+0x9B85 = 0x6A54
+0x9B86 = 0x6A55
+0x9B87 = 0x6A56
+0x9B89 = 0x6A57
+0x9B8A = 0x6A58
+0x9B8B = 0x6A59
+0x9B8D = 0x6A5A
+0x9B8F = 0x6A5B
+0x9B90 = 0x6A5C
+0x9B94 = 0x6A5D
+0x9B9A = 0x6A5E
+0x9B9D = 0x6A5F
+0x9B9E = 0x6A60
+0x9BA6 = 0x6A61
+0x9BA7 = 0x6A62
+0x9BA9 = 0x6A63
+0x9BAC = 0x6A64
+0x9BB0 = 0x6A65
+0x9BB1 = 0x6A66
+0x9BB2 = 0x6A67
+0x9BB7 = 0x6A68
+0x9BB8 = 0x6A69
+0x9BBB = 0x6A6A
+0x9BBC = 0x6A6B
+0x9BBE = 0x6A6C
+0x9BBF = 0x6A6D
+0x9BC1 = 0x6A6E
+0x9BC7 = 0x6A6F
+0x9BC8 = 0x6A70
+0x9BCE = 0x6A71
+0x9BD0 = 0x6A72
+0x9BD7 = 0x6A73
+0x9BD8 = 0x6A74
+0x9BDD = 0x6A75
+0x9BDF = 0x6A76
+0x9BE5 = 0x6A77
+0x9BE7 = 0x6A78
+0x9BEA = 0x6A79
+0x9BEB = 0x6A7A
+0x9BEF = 0x6A7B
+0x9BF3 = 0x6A7C
+0x9BF7 = 0x6A7D
+0x9BF8 = 0x6A7E
+0x9BF9 = 0x6B21
+0x9BFA = 0x6B22
+0x9BFD = 0x6B23
+0x9BFF = 0x6B24
+0x9C00 = 0x6B25
+0x9C02 = 0x6B26
+0x9C0B = 0x6B27
+0x9C0F = 0x6B28
+0x9C11 = 0x6B29
+0x9C16 = 0x6B2A
+0x9C18 = 0x6B2B
+0x9C19 = 0x6B2C
+0x9C1A = 0x6B2D
+0x9C1C = 0x6B2E
+0x9C1E = 0x6B2F
+0x9C22 = 0x6B30
+0x9C23 = 0x6B31
+0x9C26 = 0x6B32
+0x9C27 = 0x6B33
+0x9C28 = 0x6B34
+0x9C29 = 0x6B35
+0x9C2A = 0x6B36
+0x9C31 = 0x6B37
+0x9C35 = 0x6B38
+0x9C36 = 0x6B39
+0x9C37 = 0x6B3A
+0x9C3D = 0x6B3B
+0x9C41 = 0x6B3C
+0x9C43 = 0x6B3D
+0x9C44 = 0x6B3E
+0x9C45 = 0x6B3F
+0x9C49 = 0x6B40
+0x9C4A = 0x6B41
+0x9C4E = 0x6B42
+0x9C4F = 0x6B43
+0x9C50 = 0x6B44
+0x9C53 = 0x6B45
+0x9C54 = 0x6B46
+0x9C56 = 0x6B47
+0x9C58 = 0x6B48
+0x9C5B = 0x6B49
+0x9C5C = 0x6B50
+0x9C5D = 0x6B4A
+0x9C5E = 0x6B4B
+0x9C5F = 0x6B4C
+0x9C63 = 0x6B4D
+0x9C68 = 0x6B52
+0x9C69 = 0x6B4E
+0x9C6A = 0x6B4F
+0x9C6B = 0x6B51
+0x9C6E = 0x6B53
+0x9C70 = 0x6B54
+0x9C72 = 0x6B55
+0x9C75 = 0x6B56
+0x9C77 = 0x6B57
+0x9C7B = 0x6B58
+0x9CE6 = 0x6B59
+0x9CF2 = 0x6B5A
+0x9CF7 = 0x6B5B
+0x9CF9 = 0x6B5C
+0x9D02 = 0x6B5E
+0x9D0B = 0x6B5D
+0x9D11 = 0x6B5F
+0x9D17 = 0x6B60
+0x9D18 = 0x6B61
+0x9D1C = 0x6B62
+0x9D1D = 0x6B63
+0x9D1E = 0x6B64
+0x9D2F = 0x6B65
+0x9D30 = 0x6B66
+0x9D32 = 0x6B67
+0x9D33 = 0x6B68
+0x9D34 = 0x6B69
+0x9D3A = 0x6B6A
+0x9D3C = 0x6B6B
+0x9D3D = 0x6B6D
+0x9D42 = 0x6B6E
+0x9D43 = 0x6B6F
+0x9D45 = 0x6B6C
+0x9D47 = 0x6B70
+0x9D4A = 0x6B71
+0x9D53 = 0x6B72
+0x9D54 = 0x6B73
+0x9D5F = 0x6B74
+0x9D62 = 0x6B76
+0x9D63 = 0x6B75
+0x9D65 = 0x6B77
+0x9D69 = 0x6B78
+0x9D6A = 0x6B79
+0x9D6B = 0x6B7A
+0x9D70 = 0x6B7B
+0x9D76 = 0x6B7C
+0x9D77 = 0x6B7D
+0x9D7B = 0x6B7E
+0x9D7C = 0x6C21
+0x9D7E = 0x6C22
+0x9D83 = 0x6C23
+0x9D84 = 0x6C24
+0x9D86 = 0x6C25
+0x9D8A = 0x6C26
+0x9D8D = 0x6C27
+0x9D8E = 0x6C28
+0x9D92 = 0x6C29
+0x9D93 = 0x6C2A
+0x9D95 = 0x6C2B
+0x9D96 = 0x6C2C
+0x9D97 = 0x6C2D
+0x9D98 = 0x6C2E
+0x9DA1 = 0x6C2F
+0x9DAA = 0x6C30
+0x9DAC = 0x6C31
+0x9DAE = 0x6C32
+0x9DB1 = 0x6C33
+0x9DB5 = 0x6C34
+0x9DB9 = 0x6C35
+0x9DBC = 0x6C36
+0x9DBF = 0x6C37
+0x9DC3 = 0x6C38
+0x9DC7 = 0x6C39
+0x9DC9 = 0x6C3A
+0x9DCA = 0x6C3B
+0x9DD4 = 0x6C3C
+0x9DD5 = 0x6C3D
+0x9DD6 = 0x6C3E
+0x9DD7 = 0x6C3F
+0x9DDA = 0x6C40
+0x9DDE = 0x6C41
+0x9DDF = 0x6C42
+0x9DE0 = 0x6C43
+0x9DE5 = 0x6C44
+0x9DE7 = 0x6C45
+0x9DE9 = 0x6C46
+0x9DEB = 0x6C47
+0x9DEE = 0x6C48
+0x9DF0 = 0x6C49
+0x9DF3 = 0x6C4A
+0x9DF4 = 0x6C4B
+0x9DFE = 0x6C4C
+0x9E02 = 0x6C4E
+0x9E07 = 0x6C4F
+0x9E0A = 0x6C4D
+0x9E0E = 0x6C50
+0x9E10 = 0x6C51
+0x9E11 = 0x6C52
+0x9E12 = 0x6C53
+0x9E15 = 0x6C54
+0x9E16 = 0x6C55
+0x9E19 = 0x6C56
+0x9E1C = 0x6C57
+0x9E1D = 0x6C58
+0x9E7A = 0x6C59
+0x9E7B = 0x6C5A
+0x9E7C = 0x6C5B
+0x9E80 = 0x6C5C
+0x9E82 = 0x6C5D
+0x9E83 = 0x6C5E
+0x9E84 = 0x6C5F
+0x9E85 = 0x6C60
+0x9E87 = 0x6C61
+0x9E8E = 0x6C62
+0x9E8F = 0x6C63
+0x9E96 = 0x6C64
+0x9E98 = 0x6C65
+0x9E9B = 0x6C66
+0x9E9E = 0x6C67
+0x9EA4 = 0x6C68
+0x9EA8 = 0x6C69
+0x9EAC = 0x6C6A
+0x9EAE = 0x6C6B
+0x9EAF = 0x6C6C
+0x9EB0 = 0x6C6D
+0x9EB3 = 0x6C6E
+0x9EB4 = 0x6C6F
+0x9EB5 = 0x6C70
+0x9EC6 = 0x6C71
+0x9EC8 = 0x6C72
+0x9ECB = 0x6C73
+0x9ED5 = 0x6C74
+0x9EDF = 0x6C75
+0x9EE4 = 0x6C76
+0x9EE7 = 0x6C77
+0x9EEC = 0x6C78
+0x9EED = 0x6C79
+0x9EEE = 0x6C7A
+0x9EF0 = 0x6C7B
+0x9EF1 = 0x6C7C
+0x9EF2 = 0x6C7D
+0x9EF5 = 0x6C7E
+0x9EF8 = 0x6D21
+0x9EFF = 0x6D22
+0x9F02 = 0x6D23
+0x9F03 = 0x6D24
+0x9F09 = 0x6D25
+0x9F0F = 0x6D26
+0x9F10 = 0x6D27
+0x9F11 = 0x6D28
+0x9F12 = 0x6D29
+0x9F14 = 0x6D2A
+0x9F16 = 0x6D2B
+0x9F17 = 0x6D2C
+0x9F19 = 0x6D2D
+0x9F1A = 0x6D2E
+0x9F1B = 0x6D2F
+0x9F1F = 0x6D30
+0x9F22 = 0x6D31
+0x9F26 = 0x6D32
+0x9F2A = 0x6D33
+0x9F2B = 0x6D34
+0x9F2F = 0x6D35
+0x9F31 = 0x6D36
+0x9F32 = 0x6D37
+0x9F34 = 0x6D38
+0x9F37 = 0x6D39
+0x9F39 = 0x6D3A
+0x9F3A = 0x6D3B
+0x9F3C = 0x6D3C
+0x9F3D = 0x6D3D
+0x9F3F = 0x6D3E
+0x9F41 = 0x6D3F
+0x9F43 = 0x6D40
+0x9F44 = 0x6D41
+0x9F45 = 0x6D42
+0x9F46 = 0x6D43
+0x9F47 = 0x6D44
+0x9F53 = 0x6D45
+0x9F55 = 0x6D46
+0x9F56 = 0x6D47
+0x9F57 = 0x6D48
+0x9F58 = 0x6D49
+0x9F5A = 0x6D4A
+0x9F5D = 0x6D4B
+0x9F5E = 0x6D4C
+0x9F68 = 0x6D4D
+0x9F69 = 0x6D4E
+0x9F6D = 0x6D4F
+0x9F6E = 0x6D50
+0x9F6F = 0x6D51
+0x9F70 = 0x6D52
+0x9F71 = 0x6D53
+0x9F73 = 0x6D54
+0x9F75 = 0x6D55
+0x9F7A = 0x6D56
+0x9F7D = 0x6D57
+0x9F8F = 0x6D58
+0x9F90 = 0x6D59
+0x9F91 = 0x6D5A
+0x9F92 = 0x6D5B
+0x9F94 = 0x6D5C
+0x9F96 = 0x6D5D
+0x9F97 = 0x6D5E
+0x9F9E = 0x6D5F
+0x9FA1 = 0x6D60
+0x9FA2 = 0x6D61
+0x9FA3 = 0x6D62
+0x9FA5 = 0x6D63
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212@MS.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212@MS.src
new file mode 100644
index 0000000..1f0c3c3
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212@MS.src
@@ -0,0 +1,6082 @@
+# $NetBSD: UCS%JISX0212@MS.src,v 1.1 2003/07/19 20:20:42 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0212:MS"
+SRC_ZONE	0x0000 - 0xFFFF
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0x0000 - 0xFFFF		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x00A1 = 0x2242
+0x00A4 = 0x2270
+0x00A9 = 0x226D
+0x00AA = 0x226C
+0x00AE = 0x226E
+0x00AF = 0x2234
+0x00B8 = 0x2231
+0x00BA = 0x226B
+0x00BF = 0x2244
+0x00C0 = 0x2A22
+0x00C1 = 0x2A21
+0x00C2 = 0x2A24
+0x00C3 = 0x2A2A
+0x00C4 = 0x2A23
+0x00C5 = 0x2A29
+0x00C6 = 0x2921
+0x00C7 = 0x2A2E
+0x00C8 = 0x2A32
+0x00C9 = 0x2A31
+0x00CA = 0x2A34
+0x00CB = 0x2A33
+0x00CC = 0x2A40
+0x00CD = 0x2A3F
+0x00CE = 0x2A42
+0x00CF = 0x2A41
+0x00D1 = 0x2A50
+0x00D2 = 0x2A52
+0x00D3 = 0x2A51
+0x00D4 = 0x2A54
+0x00D5 = 0x2A58
+0x00D6 = 0x2A53
+0x00D8 = 0x292C
+0x00D9 = 0x2A63
+0x00DA = 0x2A62
+0x00DB = 0x2A65
+0x00DC = 0x2A64
+0x00DD = 0x2A72
+0x00DE = 0x2930
+0x00DF = 0x294E
+0x00E0 = 0x2B22
+0x00E1 = 0x2B21
+0x00E2 = 0x2B24
+0x00E3 = 0x2B2A
+0x00E4 = 0x2B23
+0x00E5 = 0x2B29
+0x00E6 = 0x2941
+0x00E7 = 0x2B2E
+0x00E8 = 0x2B32
+0x00E9 = 0x2B31
+0x00EA = 0x2B34
+0x00EB = 0x2B33
+0x00EC = 0x2B40
+0x00ED = 0x2B3F
+0x00EE = 0x2B42
+0x00EF = 0x2B41
+0x00F0 = 0x2943
+0x00F1 = 0x2B50
+0x00F2 = 0x2B52
+0x00F3 = 0x2B51
+0x00F4 = 0x2B54
+0x00F5 = 0x2B58
+0x00F6 = 0x2B53
+0x00F8 = 0x294C
+0x00F9 = 0x2B63
+0x00FA = 0x2B62
+0x00FB = 0x2B65
+0x00FC = 0x2B64
+0x00FD = 0x2B72
+0x00FE = 0x2950
+0x00FF = 0x2B73
+0x0100 = 0x2A27
+0x0101 = 0x2B27
+0x0102 = 0x2A25
+0x0103 = 0x2B25
+0x0104 = 0x2A28
+0x0105 = 0x2B28
+0x0106 = 0x2A2B
+0x0107 = 0x2B2B
+0x0108 = 0x2A2C
+0x0109 = 0x2B2C
+0x010A = 0x2A2F
+0x010B = 0x2B2F
+0x010C = 0x2A2D
+0x010D = 0x2B2D
+0x010E = 0x2A30
+0x010F = 0x2B30
+0x0110 = 0x2922
+0x0111 = 0x2942
+0x0112 = 0x2A37
+0x0113 = 0x2B37
+0x0116 = 0x2A36
+0x0117 = 0x2B36
+0x0118 = 0x2A38
+0x0119 = 0x2B38
+0x011A = 0x2A35
+0x011B = 0x2B35
+0x011C = 0x2A3A
+0x011D = 0x2B3A
+0x011E = 0x2A3B
+0x011F = 0x2B3B
+0x0120 = 0x2A3D
+0x0121 = 0x2B3D
+0x0122 = 0x2A3C
+0x0124 = 0x2A3E
+0x0125 = 0x2B3E
+0x0126 = 0x2924
+0x0127 = 0x2944
+0x0128 = 0x2A47
+0x0129 = 0x2B47
+0x012A = 0x2A45
+0x012B = 0x2B45
+0x012E = 0x2A46
+0x012F = 0x2B46
+0x0130 = 0x2A44
+0x0131 = 0x2945
+0x0132 = 0x2926
+0x0133 = 0x2946
+0x0134 = 0x2A48
+0x0135 = 0x2B48
+0x0136 = 0x2A49
+0x0137 = 0x2B49
+0x0138 = 0x2947
+0x0139 = 0x2A4A
+0x013A = 0x2B4A
+0x013B = 0x2A4C
+0x013C = 0x2B4C
+0x013D = 0x2A4B
+0x013E = 0x2B4B
+0x013F = 0x2929
+0x0140 = 0x2949
+0x0141 = 0x2928
+0x0142 = 0x2948
+0x0143 = 0x2A4D
+0x0144 = 0x2B4D
+0x0145 = 0x2A4F
+0x0146 = 0x2B4F
+0x0147 = 0x2A4E
+0x0148 = 0x2B4E
+0x0149 = 0x294A
+0x014A = 0x292B
+0x014B = 0x294B
+0x014C = 0x2A57
+0x014D = 0x2B57
+0x0150 = 0x2A56
+0x0151 = 0x2B56
+0x0152 = 0x292D
+0x0153 = 0x294D
+0x0154 = 0x2A59
+0x0155 = 0x2B59
+0x0156 = 0x2A5B
+0x0157 = 0x2B5B
+0x0158 = 0x2A5A
+0x0159 = 0x2B5A
+0x015A = 0x2A5C
+0x015B = 0x2B5C
+0x015C = 0x2A5D
+0x015D = 0x2B5D
+0x015E = 0x2A5F
+0x015F = 0x2B5F
+0x0160 = 0x2A5E
+0x0161 = 0x2B5E
+0x0162 = 0x2A61
+0x0163 = 0x2B61
+0x0164 = 0x2A60
+0x0165 = 0x2B60
+0x0166 = 0x292F
+0x0167 = 0x294F
+0x0168 = 0x2A6C
+0x0169 = 0x2B6C
+0x016A = 0x2A69
+0x016B = 0x2B69
+0x016C = 0x2A66
+0x016D = 0x2B66
+0x016E = 0x2A6B
+0x016F = 0x2B6B
+0x0170 = 0x2A68
+0x0171 = 0x2B68
+0x0172 = 0x2A6A
+0x0173 = 0x2B6A
+0x0174 = 0x2A71
+0x0175 = 0x2B71
+0x0176 = 0x2A74
+0x0177 = 0x2B74
+0x0178 = 0x2A73
+0x0179 = 0x2A75
+0x017A = 0x2B75
+0x017B = 0x2A77
+0x017C = 0x2B77
+0x017D = 0x2A76
+0x017E = 0x2B76
+0x01CD = 0x2A26
+0x01CE = 0x2B26
+0x01CF = 0x2A43
+0x01D0 = 0x2B43
+0x01D1 = 0x2A55
+0x01D2 = 0x2B55
+0x01D3 = 0x2A67
+0x01D4 = 0x2B67
+0x01D5 = 0x2A70
+0x01D6 = 0x2B70
+0x01D7 = 0x2A6D
+0x01D8 = 0x2B6D
+0x01D9 = 0x2A6F
+0x01DA = 0x2B6F
+0x01DB = 0x2A6E
+0x01DC = 0x2B6E
+0x01F5 = 0x2B39
+0x02C7 = 0x2230
+0x02D8 = 0x222F
+0x02D9 = 0x2232
+0x02DA = 0x2236
+0x02DB = 0x2235
+0x02DD = 0x2233
+0x0384 = 0x2238
+0x0385 = 0x2239
+0x0386 = 0x2661
+0x0388 = 0x2662
+0x0389 = 0x2663
+0x038A = 0x2664
+0x038C = 0x2667
+0x038E = 0x2669
+0x038F = 0x266C
+0x0390 = 0x2676
+0x03AA = 0x2665
+0x03AB = 0x266A
+0x03AC = 0x2671
+0x03AD = 0x2672
+0x03AE = 0x2673
+0x03AF = 0x2674
+0x03B0 = 0x267B
+0x03C2 = 0x2678
+0x03CA = 0x2675
+0x03CB = 0x267A
+0x03CC = 0x2677
+0x03CD = 0x2679
+0x03CE = 0x267C
+0x0402 = 0x2742
+0x0403 = 0x2743
+0x0404 = 0x2744
+0x0405 = 0x2745
+0x0406 = 0x2746
+0x0407 = 0x2747
+0x0408 = 0x2748
+0x0409 = 0x2749
+0x040A = 0x274A
+0x040B = 0x274B
+0x040C = 0x274C
+0x040E = 0x274D
+0x040F = 0x274E
+0x0452 = 0x2772
+0x0453 = 0x2773
+0x0454 = 0x2774
+0x0455 = 0x2775
+0x0456 = 0x2776
+0x0457 = 0x2777
+0x0458 = 0x2778
+0x0459 = 0x2779
+0x045A = 0x277A
+0x045B = 0x277B
+0x045C = 0x277C
+0x045E = 0x277D
+0x045F = 0x277E
+0x2116 = 0x2271
+0x2122 = 0x226F
+0x4E02 = 0x3021
+0x4E04 = 0x3022
+0x4E05 = 0x3023
+0x4E0C = 0x3024
+0x4E12 = 0x3025
+0x4E1F = 0x3026
+0x4E23 = 0x3027
+0x4E24 = 0x3028
+0x4E28 = 0x3029
+0x4E2B = 0x302A
+0x4E2E = 0x302B
+0x4E2F = 0x302C
+0x4E30 = 0x302D
+0x4E35 = 0x302E
+0x4E40 = 0x302F
+0x4E41 = 0x3030
+0x4E44 = 0x3031
+0x4E47 = 0x3032
+0x4E51 = 0x3033
+0x4E5A = 0x3034
+0x4E5C = 0x3035
+0x4E63 = 0x3036
+0x4E68 = 0x3037
+0x4E69 = 0x3038
+0x4E74 = 0x3039
+0x4E75 = 0x303A
+0x4E79 = 0x303B
+0x4E7F = 0x303C
+0x4E8D = 0x303D
+0x4E96 = 0x303E
+0x4E97 = 0x303F
+0x4E9D = 0x3040
+0x4EAF = 0x3041
+0x4EB9 = 0x3042
+0x4EC3 = 0x3043
+0x4ED0 = 0x3044
+0x4EDA = 0x3045
+0x4EDB = 0x3046
+0x4EE0 = 0x3047
+0x4EE1 = 0x3048
+0x4EE2 = 0x3049
+0x4EE8 = 0x304A
+0x4EEF = 0x304B
+0x4EF1 = 0x304C
+0x4EF3 = 0x304D
+0x4EF5 = 0x304E
+0x4EFD = 0x304F
+0x4EFE = 0x3050
+0x4EFF = 0x3051
+0x4F00 = 0x3052
+0x4F02 = 0x3053
+0x4F03 = 0x3054
+0x4F08 = 0x3055
+0x4F0B = 0x3056
+0x4F0C = 0x3057
+0x4F12 = 0x3058
+0x4F15 = 0x3059
+0x4F16 = 0x305A
+0x4F17 = 0x305B
+0x4F19 = 0x305C
+0x4F2E = 0x305D
+0x4F31 = 0x305E
+0x4F33 = 0x3060
+0x4F35 = 0x3061
+0x4F37 = 0x3062
+0x4F39 = 0x3063
+0x4F3B = 0x3064
+0x4F3E = 0x3065
+0x4F40 = 0x3066
+0x4F42 = 0x3067
+0x4F48 = 0x3068
+0x4F49 = 0x3069
+0x4F4B = 0x306A
+0x4F4C = 0x306B
+0x4F52 = 0x306C
+0x4F54 = 0x306D
+0x4F56 = 0x306E
+0x4F58 = 0x306F
+0x4F5F = 0x3070
+0x4F60 = 0x305F
+0x4F63 = 0x3071
+0x4F6A = 0x3072
+0x4F6C = 0x3073
+0x4F6E = 0x3074
+0x4F71 = 0x3075
+0x4F77 = 0x3076
+0x4F78 = 0x3077
+0x4F79 = 0x3078
+0x4F7A = 0x3079
+0x4F7D = 0x307A
+0x4F7E = 0x307B
+0x4F81 = 0x307C
+0x4F82 = 0x307D
+0x4F84 = 0x307E
+0x4F85 = 0x3121
+0x4F89 = 0x3122
+0x4F8A = 0x3123
+0x4F8C = 0x3124
+0x4F8E = 0x3125
+0x4F90 = 0x3126
+0x4F92 = 0x3127
+0x4F93 = 0x3128
+0x4F94 = 0x3129
+0x4F97 = 0x312A
+0x4F99 = 0x312B
+0x4F9A = 0x312C
+0x4F9E = 0x312D
+0x4F9F = 0x312E
+0x4FB2 = 0x312F
+0x4FB7 = 0x3130
+0x4FB9 = 0x3131
+0x4FBB = 0x3132
+0x4FBC = 0x3133
+0x4FBD = 0x3134
+0x4FBE = 0x3135
+0x4FC0 = 0x3136
+0x4FC1 = 0x3137
+0x4FC5 = 0x3138
+0x4FC6 = 0x3139
+0x4FC8 = 0x313A
+0x4FC9 = 0x313B
+0x4FCB = 0x313C
+0x4FCC = 0x313D
+0x4FCD = 0x313E
+0x4FCF = 0x313F
+0x4FD2 = 0x3140
+0x4FDC = 0x3141
+0x4FE0 = 0x3142
+0x4FE2 = 0x3143
+0x4FF0 = 0x3144
+0x4FF2 = 0x3145
+0x4FFC = 0x3146
+0x4FFD = 0x3147
+0x4FFF = 0x3148
+0x5000 = 0x3149
+0x5001 = 0x314A
+0x5004 = 0x314B
+0x5007 = 0x314C
+0x500A = 0x314D
+0x500C = 0x314E
+0x500E = 0x314F
+0x5010 = 0x3150
+0x5013 = 0x3151
+0x5017 = 0x3152
+0x5018 = 0x3153
+0x501B = 0x3154
+0x501C = 0x3155
+0x501D = 0x3156
+0x501E = 0x3157
+0x5022 = 0x3158
+0x5027 = 0x3159
+0x502E = 0x315A
+0x5030 = 0x315B
+0x5032 = 0x315C
+0x5033 = 0x315D
+0x5035 = 0x315E
+0x503B = 0x3176
+0x5040 = 0x315F
+0x5041 = 0x3160
+0x5042 = 0x3161
+0x5045 = 0x3162
+0x5046 = 0x3163
+0x504A = 0x3164
+0x504C = 0x3165
+0x504E = 0x3166
+0x5051 = 0x3167
+0x5052 = 0x3168
+0x5053 = 0x3169
+0x5057 = 0x316A
+0x5059 = 0x316B
+0x505F = 0x316C
+0x5060 = 0x316D
+0x5062 = 0x316E
+0x5063 = 0x316F
+0x5066 = 0x3170
+0x5067 = 0x3171
+0x506A = 0x3172
+0x506D = 0x3173
+0x5070 = 0x3174
+0x5071 = 0x3175
+0x5081 = 0x3177
+0x5083 = 0x3178
+0x5084 = 0x3179
+0x5086 = 0x317A
+0x508A = 0x317B
+0x508E = 0x317C
+0x508F = 0x317D
+0x5090 = 0x317E
+0x5092 = 0x3221
+0x5093 = 0x3222
+0x5094 = 0x3223
+0x5096 = 0x3224
+0x509B = 0x3225
+0x509C = 0x3226
+0x509E = 0x3227
+0x509F = 0x3228
+0x50A0 = 0x3229
+0x50A1 = 0x322A
+0x50A2 = 0x322B
+0x50AA = 0x322C
+0x50AF = 0x322D
+0x50B0 = 0x322E
+0x50B9 = 0x322F
+0x50BA = 0x3230
+0x50BD = 0x3231
+0x50C0 = 0x3232
+0x50C3 = 0x3233
+0x50C4 = 0x3234
+0x50C7 = 0x3235
+0x50CC = 0x3236
+0x50CE = 0x3237
+0x50D0 = 0x3238
+0x50D3 = 0x3239
+0x50D4 = 0x323A
+0x50D8 = 0x323B
+0x50DC = 0x323C
+0x50DD = 0x323D
+0x50DF = 0x323E
+0x50E2 = 0x323F
+0x50E4 = 0x3240
+0x50E6 = 0x3241
+0x50E8 = 0x3242
+0x50E9 = 0x3243
+0x50EF = 0x3244
+0x50F1 = 0x3245
+0x50F2 = 0x3251
+0x50F6 = 0x3246
+0x50FA = 0x3247
+0x50FE = 0x3248
+0x5103 = 0x3249
+0x5106 = 0x324A
+0x5107 = 0x324B
+0x5108 = 0x324C
+0x510B = 0x324D
+0x510C = 0x324E
+0x510D = 0x324F
+0x510E = 0x3250
+0x5110 = 0x3252
+0x5117 = 0x3253
+0x5119 = 0x3254
+0x511B = 0x3255
+0x511C = 0x3256
+0x511D = 0x3257
+0x511E = 0x3258
+0x5123 = 0x3259
+0x5127 = 0x325A
+0x5128 = 0x325B
+0x512C = 0x325C
+0x512D = 0x325D
+0x512F = 0x325E
+0x5131 = 0x325F
+0x5133 = 0x3260
+0x5134 = 0x3261
+0x5135 = 0x3262
+0x5138 = 0x3263
+0x5139 = 0x3264
+0x5142 = 0x3265
+0x514A = 0x3266
+0x514F = 0x3267
+0x5153 = 0x3268
+0x5155 = 0x3269
+0x5157 = 0x326A
+0x5158 = 0x326B
+0x515F = 0x326C
+0x5164 = 0x326D
+0x5166 = 0x326E
+0x517E = 0x326F
+0x5183 = 0x3270
+0x5184 = 0x3271
+0x518B = 0x3272
+0x518E = 0x3273
+0x5198 = 0x3274
+0x519D = 0x3275
+0x51A1 = 0x3276
+0x51A3 = 0x3277
+0x51AD = 0x3278
+0x51B8 = 0x3279
+0x51BA = 0x327A
+0x51BC = 0x327B
+0x51BE = 0x327C
+0x51BF = 0x327D
+0x51C2 = 0x327E
+0x51C8 = 0x3321
+0x51CF = 0x3322
+0x51D1 = 0x3323
+0x51D2 = 0x3324
+0x51D3 = 0x3325
+0x51D5 = 0x3326
+0x51D8 = 0x3327
+0x51DE = 0x3328
+0x51E2 = 0x3329
+0x51E5 = 0x332A
+0x51EE = 0x332B
+0x51F2 = 0x332C
+0x51F3 = 0x332D
+0x51F4 = 0x332E
+0x51F7 = 0x332F
+0x5201 = 0x3330
+0x5202 = 0x3331
+0x5205 = 0x3332
+0x5212 = 0x3333
+0x5213 = 0x3334
+0x5215 = 0x3335
+0x5216 = 0x3336
+0x5218 = 0x3337
+0x5222 = 0x3338
+0x5228 = 0x3339
+0x5231 = 0x333A
+0x5232 = 0x333B
+0x5235 = 0x333C
+0x523C = 0x333D
+0x5245 = 0x333E
+0x5249 = 0x333F
+0x5255 = 0x3340
+0x5257 = 0x3341
+0x5258 = 0x3342
+0x525A = 0x3343
+0x525C = 0x3344
+0x525F = 0x3345
+0x5260 = 0x3346
+0x5261 = 0x3347
+0x5266 = 0x3348
+0x526E = 0x3349
+0x5277 = 0x334A
+0x5278 = 0x334B
+0x5279 = 0x334C
+0x5280 = 0x334D
+0x5282 = 0x334E
+0x5285 = 0x334F
+0x528A = 0x3350
+0x528C = 0x3351
+0x5293 = 0x3352
+0x5295 = 0x3353
+0x5296 = 0x3354
+0x5297 = 0x3355
+0x5298 = 0x3356
+0x529A = 0x3357
+0x529C = 0x3358
+0x52A4 = 0x3359
+0x52A5 = 0x335A
+0x52A6 = 0x335B
+0x52A7 = 0x335C
+0x52AF = 0x335D
+0x52B0 = 0x335E
+0x52B6 = 0x335F
+0x52B7 = 0x3360
+0x52B8 = 0x3361
+0x52BA = 0x3362
+0x52BB = 0x3363
+0x52BD = 0x3364
+0x52C0 = 0x3365
+0x52C4 = 0x3366
+0x52C6 = 0x3367
+0x52C8 = 0x3368
+0x52CC = 0x3369
+0x52CF = 0x336A
+0x52D1 = 0x336B
+0x52D4 = 0x336C
+0x52D6 = 0x336D
+0x52DB = 0x336E
+0x52DC = 0x336F
+0x52E1 = 0x3370
+0x52E5 = 0x3371
+0x52E8 = 0x3372
+0x52E9 = 0x3373
+0x52EA = 0x3374
+0x52EC = 0x3375
+0x52F0 = 0x3376
+0x52F1 = 0x3377
+0x52F4 = 0x3378
+0x52F6 = 0x3379
+0x52F7 = 0x337A
+0x5300 = 0x337B
+0x5303 = 0x337C
+0x530A = 0x337D
+0x530B = 0x337E
+0x530C = 0x3421
+0x5311 = 0x3422
+0x5313 = 0x3423
+0x5318 = 0x3424
+0x531B = 0x3425
+0x531C = 0x3426
+0x531E = 0x3427
+0x531F = 0x3428
+0x5325 = 0x3429
+0x5327 = 0x342A
+0x5328 = 0x342B
+0x5329 = 0x342C
+0x532B = 0x342D
+0x532C = 0x342E
+0x532D = 0x342F
+0x5330 = 0x3430
+0x5332 = 0x3431
+0x5335 = 0x3432
+0x533C = 0x3433
+0x533D = 0x3434
+0x533E = 0x3435
+0x5342 = 0x3436
+0x534B = 0x3438
+0x534C = 0x3437
+0x5359 = 0x3439
+0x535B = 0x343A
+0x5361 = 0x343B
+0x5363 = 0x343C
+0x5365 = 0x343D
+0x536C = 0x343E
+0x536D = 0x343F
+0x5372 = 0x3440
+0x5379 = 0x3441
+0x537E = 0x3442
+0x5383 = 0x3443
+0x5387 = 0x3444
+0x5388 = 0x3445
+0x538E = 0x3446
+0x5393 = 0x3447
+0x5394 = 0x3448
+0x5399 = 0x3449
+0x539D = 0x344A
+0x53A1 = 0x344B
+0x53A4 = 0x344C
+0x53AA = 0x344D
+0x53AB = 0x344E
+0x53AF = 0x344F
+0x53B2 = 0x3450
+0x53B4 = 0x3451
+0x53B5 = 0x3452
+0x53B7 = 0x3453
+0x53B8 = 0x3454
+0x53BA = 0x3455
+0x53BD = 0x3456
+0x53C0 = 0x3457
+0x53C5 = 0x3458
+0x53CF = 0x3459
+0x53D2 = 0x345A
+0x53D3 = 0x345B
+0x53D5 = 0x345C
+0x53DA = 0x345D
+0x53DD = 0x345E
+0x53DE = 0x345F
+0x53E0 = 0x3460
+0x53E6 = 0x3461
+0x53E7 = 0x3462
+0x53F5 = 0x3463
+0x5402 = 0x3464
+0x5413 = 0x3465
+0x541A = 0x3466
+0x5421 = 0x3467
+0x5427 = 0x3468
+0x5428 = 0x3469
+0x542A = 0x346A
+0x542F = 0x346B
+0x5431 = 0x346C
+0x5434 = 0x346D
+0x5435 = 0x346E
+0x5443 = 0x346F
+0x5444 = 0x3470
+0x5447 = 0x3471
+0x544D = 0x3472
+0x544F = 0x3473
+0x545E = 0x3474
+0x5462 = 0x3475
+0x5464 = 0x3476
+0x5466 = 0x3477
+0x5467 = 0x3478
+0x5469 = 0x3479
+0x546B = 0x347A
+0x546D = 0x347B
+0x546E = 0x347C
+0x5474 = 0x347D
+0x547F = 0x347E
+0x5481 = 0x3521
+0x5483 = 0x3522
+0x5485 = 0x3523
+0x5488 = 0x3524
+0x5489 = 0x3525
+0x548D = 0x3526
+0x5491 = 0x3527
+0x5495 = 0x3528
+0x5496 = 0x3529
+0x549C = 0x352A
+0x549F = 0x352B
+0x54A1 = 0x352C
+0x54A6 = 0x352D
+0x54A7 = 0x352E
+0x54A9 = 0x352F
+0x54AA = 0x3530
+0x54AD = 0x3531
+0x54AE = 0x3532
+0x54B1 = 0x3533
+0x54B7 = 0x3534
+0x54B9 = 0x3535
+0x54BA = 0x3536
+0x54BB = 0x3537
+0x54BF = 0x3538
+0x54C6 = 0x3539
+0x54CA = 0x353A
+0x54CD = 0x353B
+0x54CE = 0x353C
+0x54E0 = 0x353D
+0x54EA = 0x353E
+0x54EC = 0x353F
+0x54EF = 0x3540
+0x54F6 = 0x3541
+0x54FC = 0x3542
+0x54FE = 0x3543
+0x54FF = 0x3544
+0x5500 = 0x3545
+0x5501 = 0x3546
+0x5505 = 0x3547
+0x5508 = 0x3548
+0x5509 = 0x3549
+0x550C = 0x354A
+0x550D = 0x354B
+0x550E = 0x354C
+0x5515 = 0x354D
+0x552A = 0x354E
+0x552B = 0x354F
+0x5532 = 0x3550
+0x5535 = 0x3551
+0x5536 = 0x3552
+0x553B = 0x3553
+0x553C = 0x3554
+0x553D = 0x3555
+0x5541 = 0x3556
+0x5547 = 0x3557
+0x5549 = 0x3558
+0x554A = 0x3559
+0x554D = 0x355A
+0x5550 = 0x355B
+0x5551 = 0x355C
+0x5558 = 0x355D
+0x555A = 0x355E
+0x555B = 0x355F
+0x555E = 0x3560
+0x5560 = 0x3561
+0x5561 = 0x3562
+0x5564 = 0x3563
+0x5566 = 0x3564
+0x557F = 0x3565
+0x5581 = 0x3566
+0x5582 = 0x3567
+0x5586 = 0x3568
+0x5588 = 0x3569
+0x558E = 0x356A
+0x558F = 0x356B
+0x5591 = 0x356C
+0x5592 = 0x356D
+0x5593 = 0x356E
+0x5594 = 0x356F
+0x5597 = 0x3570
+0x55A3 = 0x3571
+0x55A4 = 0x3572
+0x55AD = 0x3573
+0x55B2 = 0x3574
+0x55BF = 0x3575
+0x55C1 = 0x3576
+0x55C3 = 0x3577
+0x55C6 = 0x3578
+0x55C9 = 0x3579
+0x55CB = 0x357A
+0x55CC = 0x357B
+0x55CE = 0x357C
+0x55D1 = 0x357D
+0x55D2 = 0x357E
+0x55D3 = 0x3621
+0x55D7 = 0x3622
+0x55D8 = 0x3623
+0x55DB = 0x3624
+0x55DE = 0x3625
+0x55E2 = 0x3626
+0x55E9 = 0x3627
+0x55F6 = 0x3628
+0x55FF = 0x3629
+0x5605 = 0x362A
+0x5608 = 0x362B
+0x560A = 0x362C
+0x560D = 0x362D
+0x560E = 0x362E
+0x560F = 0x362F
+0x5610 = 0x3630
+0x5611 = 0x3631
+0x5612 = 0x3632
+0x5619 = 0x3633
+0x562C = 0x3634
+0x5630 = 0x3635
+0x5633 = 0x3636
+0x5635 = 0x3637
+0x5637 = 0x3638
+0x5639 = 0x3639
+0x563B = 0x363A
+0x563C = 0x363B
+0x563D = 0x363C
+0x563F = 0x363D
+0x5640 = 0x363E
+0x5641 = 0x363F
+0x5643 = 0x3640
+0x5644 = 0x3641
+0x5646 = 0x3642
+0x5649 = 0x3643
+0x564B = 0x3644
+0x564D = 0x3645
+0x564F = 0x3646
+0x5654 = 0x3647
+0x565E = 0x3648
+0x5660 = 0x3649
+0x5661 = 0x364A
+0x5662 = 0x364B
+0x5663 = 0x364C
+0x5666 = 0x364D
+0x5669 = 0x364E
+0x566D = 0x364F
+0x566F = 0x3650
+0x5671 = 0x3651
+0x5672 = 0x3652
+0x5675 = 0x3653
+0x5684 = 0x3654
+0x5685 = 0x3655
+0x5688 = 0x3656
+0x568B = 0x3657
+0x568C = 0x3658
+0x5695 = 0x3659
+0x5699 = 0x365A
+0x569A = 0x365B
+0x569D = 0x365C
+0x569E = 0x365D
+0x569F = 0x365E
+0x56A6 = 0x365F
+0x56A7 = 0x3660
+0x56A8 = 0x3661
+0x56A9 = 0x3662
+0x56AB = 0x3663
+0x56AC = 0x3664
+0x56AD = 0x3665
+0x56B1 = 0x3666
+0x56B3 = 0x3667
+0x56B7 = 0x3668
+0x56BE = 0x3669
+0x56C5 = 0x366A
+0x56C9 = 0x366B
+0x56CA = 0x366C
+0x56CB = 0x366D
+0x56CC = 0x3670
+0x56CD = 0x3671
+0x56CF = 0x366E
+0x56D0 = 0x366F
+0x56D9 = 0x3672
+0x56DC = 0x3673
+0x56DD = 0x3674
+0x56DF = 0x3675
+0x56E1 = 0x3676
+0x56E4 = 0x3677
+0x56E5 = 0x3678
+0x56E6 = 0x3679
+0x56E7 = 0x367A
+0x56E8 = 0x367B
+0x56EB = 0x367D
+0x56ED = 0x367E
+0x56F1 = 0x367C
+0x56F6 = 0x3721
+0x56F7 = 0x3722
+0x5701 = 0x3723
+0x5702 = 0x3724
+0x5707 = 0x3725
+0x570A = 0x3726
+0x570C = 0x3727
+0x5711 = 0x3728
+0x5715 = 0x3729
+0x571A = 0x372A
+0x571B = 0x372B
+0x571D = 0x372C
+0x5720 = 0x372D
+0x5722 = 0x372E
+0x5723 = 0x372F
+0x5724 = 0x3730
+0x5725 = 0x3731
+0x5729 = 0x3732
+0x572A = 0x3733
+0x572C = 0x3734
+0x572E = 0x3735
+0x572F = 0x3736
+0x5733 = 0x3737
+0x5734 = 0x3738
+0x573D = 0x3739
+0x573E = 0x373A
+0x573F = 0x373B
+0x5745 = 0x373C
+0x5746 = 0x373D
+0x574C = 0x373E
+0x574D = 0x373F
+0x5752 = 0x3740
+0x5762 = 0x3741
+0x5765 = 0x3742
+0x5767 = 0x3743
+0x5768 = 0x3744
+0x576B = 0x3745
+0x576D = 0x3746
+0x576E = 0x3747
+0x576F = 0x3748
+0x5770 = 0x3749
+0x5771 = 0x374A
+0x5773 = 0x374B
+0x5774 = 0x374C
+0x5775 = 0x374D
+0x5777 = 0x374E
+0x5779 = 0x374F
+0x577A = 0x3750
+0x577B = 0x3751
+0x577C = 0x3752
+0x577E = 0x3753
+0x5781 = 0x3754
+0x5783 = 0x3755
+0x578C = 0x3756
+0x5794 = 0x3757
+0x5795 = 0x3760
+0x5797 = 0x3758
+0x5799 = 0x3759
+0x579A = 0x375A
+0x579C = 0x375B
+0x579D = 0x375C
+0x579E = 0x375D
+0x579F = 0x375E
+0x57A1 = 0x375F
+0x57A7 = 0x3761
+0x57A8 = 0x3762
+0x57A9 = 0x3763
+0x57AC = 0x3764
+0x57B8 = 0x3765
+0x57BD = 0x3766
+0x57C7 = 0x3767
+0x57C8 = 0x3768
+0x57CC = 0x3769
+0x57CF = 0x376A
+0x57D5 = 0x376B
+0x57DD = 0x376C
+0x57DE = 0x376D
+0x57E1 = 0x377E
+0x57E4 = 0x376E
+0x57E6 = 0x376F
+0x57E7 = 0x3770
+0x57E9 = 0x3771
+0x57ED = 0x3772
+0x57F0 = 0x3773
+0x57F5 = 0x3774
+0x57F6 = 0x3775
+0x57F8 = 0x3776
+0x57FD = 0x3777
+0x57FE = 0x3778
+0x57FF = 0x3779
+0x5803 = 0x377A
+0x5804 = 0x377B
+0x5808 = 0x377C
+0x5809 = 0x377D
+0x580C = 0x3821
+0x580D = 0x3822
+0x581B = 0x3823
+0x581E = 0x3824
+0x581F = 0x3825
+0x5820 = 0x3826
+0x5826 = 0x3827
+0x5827 = 0x3828
+0x582D = 0x3829
+0x5832 = 0x382A
+0x5839 = 0x382B
+0x583F = 0x382C
+0x5849 = 0x382D
+0x584C = 0x382E
+0x584D = 0x382F
+0x584F = 0x3830
+0x5850 = 0x3831
+0x5855 = 0x3832
+0x585F = 0x3833
+0x5861 = 0x3834
+0x5864 = 0x3835
+0x5867 = 0x3836
+0x5868 = 0x3837
+0x5878 = 0x3838
+0x587C = 0x3839
+0x587F = 0x383A
+0x5880 = 0x383B
+0x5881 = 0x383C
+0x5887 = 0x383D
+0x5888 = 0x383E
+0x5889 = 0x383F
+0x588A = 0x3840
+0x588C = 0x3841
+0x588D = 0x3842
+0x588F = 0x3843
+0x5890 = 0x3844
+0x5894 = 0x3845
+0x5896 = 0x3846
+0x589D = 0x3847
+0x58A0 = 0x3848
+0x58A1 = 0x3849
+0x58A2 = 0x384A
+0x58A6 = 0x384B
+0x58A9 = 0x384C
+0x58B1 = 0x384D
+0x58B2 = 0x384E
+0x58BC = 0x3850
+0x58C2 = 0x3851
+0x58C4 = 0x384F
+0x58C8 = 0x3852
+0x58CD = 0x3853
+0x58CE = 0x3854
+0x58D0 = 0x3855
+0x58D2 = 0x3856
+0x58D4 = 0x3857
+0x58D6 = 0x3858
+0x58DA = 0x3859
+0x58DD = 0x385A
+0x58E1 = 0x385B
+0x58E2 = 0x385C
+0x58E9 = 0x385D
+0x58F3 = 0x385E
+0x5905 = 0x385F
+0x5906 = 0x3860
+0x590B = 0x3861
+0x590C = 0x3862
+0x5912 = 0x3863
+0x5913 = 0x3864
+0x5914 = 0x3865
+0x591D = 0x3867
+0x5921 = 0x3868
+0x5923 = 0x3869
+0x5924 = 0x386A
+0x5928 = 0x386B
+0x592F = 0x386C
+0x5930 = 0x386D
+0x5933 = 0x386E
+0x5935 = 0x386F
+0x5936 = 0x3870
+0x593F = 0x3871
+0x5943 = 0x3872
+0x5946 = 0x3873
+0x5952 = 0x3874
+0x5953 = 0x3875
+0x5959 = 0x3876
+0x595B = 0x3877
+0x595D = 0x3878
+0x595E = 0x3879
+0x595F = 0x387A
+0x5961 = 0x387B
+0x5963 = 0x387C
+0x596B = 0x387D
+0x596D = 0x387E
+0x596F = 0x3921
+0x5972 = 0x3922
+0x5975 = 0x3923
+0x5976 = 0x3924
+0x5979 = 0x3925
+0x597B = 0x3926
+0x597C = 0x3927
+0x598B = 0x3928
+0x598C = 0x3929
+0x598E = 0x392A
+0x5992 = 0x392B
+0x5995 = 0x392C
+0x5997 = 0x392D
+0x599F = 0x392E
+0x59A4 = 0x392F
+0x59A7 = 0x3930
+0x59AD = 0x3931
+0x59AE = 0x3932
+0x59AF = 0x3933
+0x59B0 = 0x3934
+0x59B3 = 0x3935
+0x59B7 = 0x3936
+0x59BA = 0x3937
+0x59BC = 0x3938
+0x59C1 = 0x3939
+0x59C3 = 0x393A
+0x59C4 = 0x393B
+0x59C8 = 0x393C
+0x59CA = 0x393D
+0x59CD = 0x393E
+0x59D2 = 0x393F
+0x59DD = 0x3940
+0x59DE = 0x3941
+0x59DF = 0x3942
+0x59E3 = 0x3943
+0x59E4 = 0x3944
+0x59E7 = 0x3945
+0x59EE = 0x3946
+0x59EF = 0x3947
+0x59F1 = 0x3948
+0x59F2 = 0x3949
+0x59F4 = 0x394A
+0x59F7 = 0x394B
+0x5A00 = 0x394C
+0x5A04 = 0x394D
+0x5A0C = 0x394E
+0x5A0D = 0x394F
+0x5A0E = 0x3950
+0x5A12 = 0x3951
+0x5A13 = 0x3952
+0x5A1E = 0x3953
+0x5A23 = 0x3954
+0x5A24 = 0x3955
+0x5A27 = 0x3956
+0x5A28 = 0x3957
+0x5A2A = 0x3958
+0x5A2D = 0x3959
+0x5A30 = 0x395A
+0x5A44 = 0x395B
+0x5A45 = 0x395C
+0x5A47 = 0x395D
+0x5A48 = 0x395E
+0x5A4C = 0x395F
+0x5A50 = 0x3960
+0x5A55 = 0x3961
+0x5A5E = 0x3962
+0x5A63 = 0x3963
+0x5A65 = 0x3964
+0x5A67 = 0x3965
+0x5A6D = 0x3966
+0x5A77 = 0x3967
+0x5A7A = 0x3968
+0x5A7B = 0x3969
+0x5A7E = 0x396A
+0x5A8B = 0x396B
+0x5A90 = 0x396C
+0x5A93 = 0x396D
+0x5A96 = 0x396E
+0x5A99 = 0x396F
+0x5A9C = 0x3970
+0x5A9E = 0x3971
+0x5A9F = 0x3972
+0x5AA0 = 0x3973
+0x5AA2 = 0x3974
+0x5AA7 = 0x3975
+0x5AAC = 0x3976
+0x5AB1 = 0x3977
+0x5AB2 = 0x3978
+0x5AB3 = 0x3979
+0x5AB5 = 0x397A
+0x5AB8 = 0x397B
+0x5ABA = 0x397C
+0x5ABB = 0x397D
+0x5ABF = 0x397E
+0x5AC4 = 0x3A21
+0x5AC6 = 0x3A22
+0x5AC8 = 0x3A23
+0x5ACF = 0x3A24
+0x5ADA = 0x3A25
+0x5ADC = 0x3A26
+0x5AE0 = 0x3A27
+0x5AE5 = 0x3A28
+0x5AEA = 0x3A29
+0x5AEE = 0x3A2A
+0x5AF5 = 0x3A2B
+0x5AF6 = 0x3A2C
+0x5AFD = 0x3A2D
+0x5B00 = 0x3A2E
+0x5B01 = 0x3A2F
+0x5B08 = 0x3A30
+0x5B17 = 0x3A31
+0x5B19 = 0x3A33
+0x5B1B = 0x3A34
+0x5B1D = 0x3A35
+0x5B21 = 0x3A36
+0x5B25 = 0x3A37
+0x5B2D = 0x3A38
+0x5B34 = 0x3A32
+0x5B38 = 0x3A39
+0x5B41 = 0x3A3A
+0x5B4B = 0x3A3B
+0x5B4C = 0x3A3C
+0x5B52 = 0x3A3D
+0x5B56 = 0x3A3E
+0x5B5E = 0x3A3F
+0x5B68 = 0x3A40
+0x5B6E = 0x3A41
+0x5B6F = 0x3A42
+0x5B7C = 0x3A43
+0x5B7D = 0x3A44
+0x5B7E = 0x3A45
+0x5B7F = 0x3A46
+0x5B81 = 0x3A47
+0x5B84 = 0x3A48
+0x5B86 = 0x3A49
+0x5B8A = 0x3A4A
+0x5B8E = 0x3A4B
+0x5B90 = 0x3A4C
+0x5B91 = 0x3A4D
+0x5B93 = 0x3A4E
+0x5B94 = 0x3A4F
+0x5B96 = 0x3A50
+0x5BA8 = 0x3A51
+0x5BA9 = 0x3A52
+0x5BAC = 0x3A53
+0x5BAD = 0x3A54
+0x5BAF = 0x3A55
+0x5BB1 = 0x3A56
+0x5BB2 = 0x3A57
+0x5BB7 = 0x3A58
+0x5BBA = 0x3A59
+0x5BBC = 0x3A5A
+0x5BC0 = 0x3A5B
+0x5BC1 = 0x3A5C
+0x5BCD = 0x3A5D
+0x5BCF = 0x3A5E
+0x5BD6 = 0x3A5F
+0x5BD7 = 0x3A60
+0x5BD8 = 0x3A61
+0x5BD9 = 0x3A62
+0x5BDA = 0x3A63
+0x5BE0 = 0x3A64
+0x5BEF = 0x3A65
+0x5BF1 = 0x3A66
+0x5BF4 = 0x3A67
+0x5BFD = 0x3A68
+0x5C0C = 0x3A69
+0x5C17 = 0x3A6A
+0x5C1E = 0x3A6B
+0x5C1F = 0x3A6C
+0x5C23 = 0x3A6D
+0x5C26 = 0x3A6E
+0x5C29 = 0x3A6F
+0x5C2B = 0x3A70
+0x5C2C = 0x3A71
+0x5C2E = 0x3A72
+0x5C30 = 0x3A73
+0x5C32 = 0x3A74
+0x5C35 = 0x3A75
+0x5C36 = 0x3A76
+0x5C59 = 0x3A77
+0x5C5A = 0x3A78
+0x5C5C = 0x3A79
+0x5C62 = 0x3A7A
+0x5C63 = 0x3A7B
+0x5C67 = 0x3A7C
+0x5C68 = 0x3A7D
+0x5C69 = 0x3A7E
+0x5C6D = 0x3B21
+0x5C70 = 0x3B22
+0x5C74 = 0x3B23
+0x5C75 = 0x3B24
+0x5C7A = 0x3B25
+0x5C7B = 0x3B26
+0x5C7C = 0x3B27
+0x5C7D = 0x3B28
+0x5C87 = 0x3B29
+0x5C88 = 0x3B2A
+0x5C8A = 0x3B2B
+0x5C8F = 0x3B2C
+0x5C92 = 0x3B2D
+0x5C9D = 0x3B2E
+0x5C9F = 0x3B2F
+0x5CA0 = 0x3B30
+0x5CA2 = 0x3B31
+0x5CA3 = 0x3B32
+0x5CA6 = 0x3B33
+0x5CAA = 0x3B34
+0x5CB2 = 0x3B35
+0x5CB4 = 0x3B36
+0x5CB5 = 0x3B37
+0x5CBA = 0x3B38
+0x5CC9 = 0x3B39
+0x5CCB = 0x3B3A
+0x5CD2 = 0x3B3B
+0x5CD7 = 0x3B3D
+0x5CDD = 0x3B3C
+0x5CEE = 0x3B3E
+0x5CF1 = 0x3B3F
+0x5CF2 = 0x3B40
+0x5CF4 = 0x3B41
+0x5D01 = 0x3B42
+0x5D06 = 0x3B43
+0x5D0D = 0x3B44
+0x5D12 = 0x3B45
+0x5D23 = 0x3B47
+0x5D24 = 0x3B48
+0x5D26 = 0x3B49
+0x5D27 = 0x3B4A
+0x5D2B = 0x3B46
+0x5D31 = 0x3B4B
+0x5D34 = 0x3B4C
+0x5D39 = 0x3B4D
+0x5D3D = 0x3B4E
+0x5D3F = 0x3B4F
+0x5D42 = 0x3B50
+0x5D43 = 0x3B51
+0x5D46 = 0x3B52
+0x5D48 = 0x3B53
+0x5D4A = 0x3B57
+0x5D51 = 0x3B55
+0x5D55 = 0x3B54
+0x5D59 = 0x3B56
+0x5D5F = 0x3B58
+0x5D60 = 0x3B59
+0x5D61 = 0x3B5A
+0x5D62 = 0x3B5B
+0x5D64 = 0x3B5C
+0x5D6A = 0x3B5D
+0x5D6D = 0x3B5E
+0x5D70 = 0x3B5F
+0x5D79 = 0x3B60
+0x5D7A = 0x3B61
+0x5D7E = 0x3B62
+0x5D7F = 0x3B63
+0x5D81 = 0x3B64
+0x5D83 = 0x3B65
+0x5D88 = 0x3B66
+0x5D8A = 0x3B67
+0x5D92 = 0x3B68
+0x5D93 = 0x3B69
+0x5D94 = 0x3B6A
+0x5D95 = 0x3B6B
+0x5D99 = 0x3B6C
+0x5D9B = 0x3B6D
+0x5D9F = 0x3B6E
+0x5DA0 = 0x3B6F
+0x5DA7 = 0x3B70
+0x5DAB = 0x3B71
+0x5DB0 = 0x3B72
+0x5DB2 = 0x6674
+0x5DB4 = 0x3B73
+0x5DB8 = 0x3B74
+0x5DB9 = 0x3B75
+0x5DC3 = 0x3B76
+0x5DC7 = 0x3B77
+0x5DCB = 0x3B78
+0x5DCE = 0x3B7A
+0x5DD0 = 0x3B79
+0x5DD8 = 0x3B7B
+0x5DD9 = 0x3B7C
+0x5DE0 = 0x3B7D
+0x5DE4 = 0x3B7E
+0x5DE9 = 0x3C21
+0x5DF8 = 0x3C22
+0x5DF9 = 0x3C23
+0x5E00 = 0x3C24
+0x5E07 = 0x3C25
+0x5E0D = 0x3C26
+0x5E12 = 0x3C27
+0x5E14 = 0x3C28
+0x5E15 = 0x3C29
+0x5E18 = 0x3C2A
+0x5E1F = 0x3C2B
+0x5E20 = 0x3C2C
+0x5E28 = 0x3C2E
+0x5E2E = 0x3C2D
+0x5E32 = 0x3C2F
+0x5E35 = 0x3C30
+0x5E3E = 0x3C31
+0x5E49 = 0x3C34
+0x5E4B = 0x3C32
+0x5E50 = 0x3C33
+0x5E51 = 0x3C35
+0x5E56 = 0x3C36
+0x5E58 = 0x3C37
+0x5E5B = 0x3C38
+0x5E5C = 0x3C39
+0x5E5E = 0x3C3A
+0x5E68 = 0x3C3B
+0x5E6A = 0x3C3C
+0x5E6B = 0x3C3D
+0x5E6C = 0x3C3E
+0x5E6D = 0x3C3F
+0x5E6E = 0x3C40
+0x5E70 = 0x3C41
+0x5E80 = 0x3C42
+0x5E8B = 0x3C43
+0x5E8E = 0x3C44
+0x5EA2 = 0x3C45
+0x5EA4 = 0x3C46
+0x5EA5 = 0x3C47
+0x5EA8 = 0x3C48
+0x5EAA = 0x3C49
+0x5EAC = 0x3C4A
+0x5EB1 = 0x3C4B
+0x5EB3 = 0x3C4C
+0x5EBD = 0x3C4D
+0x5EBE = 0x3C4E
+0x5EBF = 0x3C4F
+0x5EC6 = 0x3C50
+0x5ECB = 0x3C52
+0x5ECC = 0x3C51
+0x5ECE = 0x3C53
+0x5ED1 = 0x3C54
+0x5ED2 = 0x3C55
+0x5ED4 = 0x3C56
+0x5ED5 = 0x3C57
+0x5EDC = 0x3C58
+0x5EDE = 0x3C59
+0x5EE5 = 0x3C5A
+0x5EEB = 0x3C5B
+0x5F02 = 0x3C5C
+0x5F06 = 0x3C5D
+0x5F07 = 0x3C5E
+0x5F08 = 0x3C5F
+0x5F0E = 0x3C60
+0x5F19 = 0x3C61
+0x5F1C = 0x3C62
+0x5F1D = 0x3C63
+0x5F21 = 0x3C64
+0x5F22 = 0x3C65
+0x5F23 = 0x3C66
+0x5F24 = 0x3C67
+0x5F28 = 0x3C68
+0x5F2B = 0x3C69
+0x5F2C = 0x3C6A
+0x5F2E = 0x3C6B
+0x5F30 = 0x3C6C
+0x5F34 = 0x3C6D
+0x5F36 = 0x3C6E
+0x5F3B = 0x3C6F
+0x5F3D = 0x3C70
+0x5F3F = 0x3C71
+0x5F40 = 0x3C72
+0x5F44 = 0x3C73
+0x5F45 = 0x3C74
+0x5F47 = 0x3C75
+0x5F4D = 0x3C76
+0x5F50 = 0x3C77
+0x5F54 = 0x3C78
+0x5F58 = 0x3C79
+0x5F5B = 0x3C7A
+0x5F60 = 0x3C7B
+0x5F63 = 0x3C7C
+0x5F64 = 0x3C7D
+0x5F67 = 0x3C7E
+0x5F6F = 0x3D21
+0x5F72 = 0x3D22
+0x5F74 = 0x3D23
+0x5F75 = 0x3D24
+0x5F78 = 0x3D25
+0x5F7A = 0x3D26
+0x5F7D = 0x3D27
+0x5F7E = 0x3D28
+0x5F89 = 0x3D29
+0x5F8D = 0x3D2A
+0x5F8F = 0x3D2B
+0x5F96 = 0x3D2C
+0x5F9C = 0x3D2D
+0x5F9D = 0x3D2E
+0x5FA2 = 0x3D2F
+0x5FA4 = 0x3D32
+0x5FA7 = 0x3D30
+0x5FAB = 0x3D31
+0x5FAC = 0x3D33
+0x5FAF = 0x3D34
+0x5FB0 = 0x3D35
+0x5FB1 = 0x3D36
+0x5FB8 = 0x3D37
+0x5FC4 = 0x3D38
+0x5FC7 = 0x3D39
+0x5FC8 = 0x3D3A
+0x5FC9 = 0x3D3B
+0x5FCB = 0x3D3C
+0x5FD0 = 0x3D3D
+0x5FD1 = 0x3D3E
+0x5FD2 = 0x3D3F
+0x5FD3 = 0x3D40
+0x5FD4 = 0x3D41
+0x5FDE = 0x3D42
+0x5FE1 = 0x3D43
+0x5FE2 = 0x3D44
+0x5FE8 = 0x3D45
+0x5FE9 = 0x3D46
+0x5FEA = 0x3D47
+0x5FEC = 0x3D48
+0x5FED = 0x3D49
+0x5FEE = 0x3D4A
+0x5FEF = 0x3D4B
+0x5FF2 = 0x3D4C
+0x5FF3 = 0x3D4D
+0x5FF6 = 0x3D4E
+0x5FFA = 0x3D4F
+0x5FFC = 0x3D50
+0x6007 = 0x3D51
+0x600A = 0x3D52
+0x600D = 0x3D53
+0x6013 = 0x3D54
+0x6014 = 0x3D55
+0x6017 = 0x3D56
+0x6018 = 0x3D57
+0x601A = 0x3D58
+0x601F = 0x3D59
+0x6024 = 0x3D5A
+0x602D = 0x3D5B
+0x6033 = 0x3D5C
+0x6035 = 0x3D5D
+0x6040 = 0x3D5E
+0x6047 = 0x3D5F
+0x6048 = 0x3D60
+0x6049 = 0x3D61
+0x604C = 0x3D62
+0x6051 = 0x3D63
+0x6054 = 0x3D64
+0x6056 = 0x3D65
+0x6057 = 0x3D66
+0x605D = 0x3D67
+0x6061 = 0x3D68
+0x6067 = 0x3D69
+0x6071 = 0x3D6A
+0x607E = 0x3D6B
+0x607F = 0x3D6C
+0x6082 = 0x3D6D
+0x6086 = 0x3D6E
+0x6088 = 0x3D6F
+0x608A = 0x3D70
+0x608E = 0x3D71
+0x6091 = 0x3D72
+0x6093 = 0x3D73
+0x6095 = 0x3D74
+0x6098 = 0x3D75
+0x609D = 0x3D76
+0x609E = 0x3D77
+0x60A2 = 0x3D78
+0x60A4 = 0x3D79
+0x60A5 = 0x3D7A
+0x60A8 = 0x3D7B
+0x60B0 = 0x3D7C
+0x60B1 = 0x3D7D
+0x60B7 = 0x3D7E
+0x60BB = 0x3E21
+0x60BE = 0x3E22
+0x60C2 = 0x3E23
+0x60C4 = 0x3E24
+0x60C8 = 0x3E25
+0x60C9 = 0x3E26
+0x60CA = 0x3E27
+0x60CB = 0x3E28
+0x60CE = 0x3E29
+0x60CF = 0x3E2A
+0x60D4 = 0x3E2B
+0x60D5 = 0x3E2C
+0x60D9 = 0x3E2D
+0x60DB = 0x3E2E
+0x60DD = 0x3E2F
+0x60DE = 0x3E30
+0x60E2 = 0x3E31
+0x60E5 = 0x3E32
+0x60F2 = 0x3E33
+0x60F5 = 0x3E34
+0x60F8 = 0x3E35
+0x60FC = 0x3E36
+0x60FD = 0x3E37
+0x6102 = 0x3E38
+0x6107 = 0x3E39
+0x610A = 0x3E3A
+0x610C = 0x3E3B
+0x6110 = 0x3E3C
+0x6111 = 0x3E3D
+0x6112 = 0x3E3E
+0x6113 = 0x3E3F
+0x6114 = 0x3E40
+0x6116 = 0x3E41
+0x6117 = 0x3E42
+0x6119 = 0x3E43
+0x611C = 0x3E44
+0x611E = 0x3E45
+0x6122 = 0x3E46
+0x612A = 0x3E47
+0x612B = 0x3E48
+0x6130 = 0x3E49
+0x6131 = 0x3E4A
+0x6135 = 0x3E4B
+0x6136 = 0x3E4C
+0x6137 = 0x3E4D
+0x6139 = 0x3E4E
+0x6141 = 0x3E4F
+0x6145 = 0x3E50
+0x6146 = 0x3E51
+0x6149 = 0x3E52
+0x615E = 0x3E53
+0x6160 = 0x3E54
+0x616C = 0x3E55
+0x6172 = 0x3E56
+0x6178 = 0x3E57
+0x617B = 0x3E58
+0x617C = 0x3E59
+0x617F = 0x3E5A
+0x6180 = 0x3E5B
+0x6181 = 0x3E5C
+0x6183 = 0x3E5D
+0x6184 = 0x3E5E
+0x618B = 0x3E5F
+0x618D = 0x3E60
+0x6192 = 0x3E61
+0x6193 = 0x3E62
+0x6197 = 0x3E63
+0x6198 = 0x3E64
+0x619C = 0x3E65
+0x619D = 0x3E66
+0x619F = 0x3E67
+0x61A0 = 0x3E68
+0x61A5 = 0x3E69
+0x61A8 = 0x3E6A
+0x61AA = 0x3E6B
+0x61AD = 0x3E6C
+0x61B8 = 0x3E6D
+0x61B9 = 0x3E6E
+0x61BC = 0x3E6F
+0x61C0 = 0x3E70
+0x61C1 = 0x3E71
+0x61C2 = 0x3E72
+0x61CE = 0x3E73
+0x61CF = 0x3E74
+0x61D5 = 0x3E75
+0x61DC = 0x3E76
+0x61DD = 0x3E77
+0x61DE = 0x3E78
+0x61DF = 0x3E79
+0x61E1 = 0x3E7A
+0x61E2 = 0x3E7B
+0x61E5 = 0x3E7E
+0x61E7 = 0x3E7C
+0x61E9 = 0x3E7D
+0x61EC = 0x3F21
+0x61ED = 0x3F22
+0x61EF = 0x3F23
+0x6201 = 0x3F24
+0x6203 = 0x3F25
+0x6204 = 0x3F26
+0x6207 = 0x3F27
+0x6213 = 0x3F28
+0x6215 = 0x3F29
+0x621C = 0x3F2A
+0x6220 = 0x3F2B
+0x6222 = 0x3F2C
+0x6223 = 0x3F2D
+0x6227 = 0x3F2E
+0x6229 = 0x3F2F
+0x622B = 0x3F30
+0x6239 = 0x3F31
+0x623D = 0x3F32
+0x6242 = 0x3F33
+0x6243 = 0x3F34
+0x6244 = 0x3F35
+0x6246 = 0x3F36
+0x624C = 0x3F37
+0x6250 = 0x3F38
+0x6251 = 0x3F39
+0x6252 = 0x3F3A
+0x6254 = 0x3F3B
+0x6256 = 0x3F3C
+0x625A = 0x3F3D
+0x625C = 0x3F3E
+0x6264 = 0x3F3F
+0x626D = 0x3F40
+0x626F = 0x3F41
+0x6273 = 0x3F42
+0x627A = 0x3F43
+0x627D = 0x3F44
+0x628D = 0x3F45
+0x628E = 0x3F46
+0x628F = 0x3F47
+0x6290 = 0x3F48
+0x62A6 = 0x3F49
+0x62A8 = 0x3F4A
+0x62B3 = 0x3F4B
+0x62B6 = 0x3F4C
+0x62B7 = 0x3F4D
+0x62BA = 0x3F4E
+0x62BE = 0x3F4F
+0x62BF = 0x3F50
+0x62C4 = 0x3F51
+0x62CE = 0x3F52
+0x62D5 = 0x3F53
+0x62D6 = 0x3F54
+0x62DA = 0x3F55
+0x62EA = 0x3F56
+0x62F2 = 0x3F57
+0x62F4 = 0x3F58
+0x62FC = 0x3F59
+0x62FD = 0x3F5A
+0x6303 = 0x3F5B
+0x6304 = 0x3F5C
+0x630A = 0x3F5D
+0x630B = 0x3F5E
+0x630D = 0x3F5F
+0x6310 = 0x3F60
+0x6313 = 0x3F61
+0x6316 = 0x3F62
+0x6318 = 0x3F63
+0x6329 = 0x3F64
+0x632A = 0x3F65
+0x632D = 0x3F66
+0x6335 = 0x3F67
+0x6336 = 0x3F68
+0x6339 = 0x3F69
+0x633C = 0x3F6A
+0x6341 = 0x3F6B
+0x6342 = 0x3F6C
+0x6343 = 0x3F6D
+0x6344 = 0x3F6E
+0x6346 = 0x3F6F
+0x634A = 0x3F70
+0x634B = 0x3F71
+0x634E = 0x3F72
+0x6352 = 0x3F73
+0x6353 = 0x3F74
+0x6354 = 0x3F75
+0x6358 = 0x3F76
+0x635B = 0x3F77
+0x6365 = 0x3F78
+0x6366 = 0x3F79
+0x636C = 0x3F7A
+0x636D = 0x3F7B
+0x6371 = 0x3F7C
+0x6374 = 0x3F7D
+0x6375 = 0x3F7E
+0x6378 = 0x4021
+0x637C = 0x4022
+0x637D = 0x4023
+0x637F = 0x4024
+0x6382 = 0x4025
+0x6384 = 0x4026
+0x6387 = 0x4027
+0x638A = 0x4028
+0x6390 = 0x4029
+0x6394 = 0x402A
+0x6395 = 0x402B
+0x6399 = 0x402C
+0x639A = 0x402D
+0x639E = 0x402E
+0x63A4 = 0x402F
+0x63A6 = 0x4030
+0x63AD = 0x4031
+0x63AE = 0x4032
+0x63AF = 0x4033
+0x63BD = 0x4034
+0x63C1 = 0x4035
+0x63C5 = 0x4036
+0x63C8 = 0x4037
+0x63CE = 0x4038
+0x63D1 = 0x4039
+0x63D3 = 0x403A
+0x63D4 = 0x403B
+0x63D5 = 0x403C
+0x63DC = 0x403D
+0x63E0 = 0x403E
+0x63E5 = 0x403F
+0x63EA = 0x4040
+0x63EC = 0x4041
+0x63F2 = 0x4042
+0x63F3 = 0x4043
+0x63F5 = 0x4044
+0x63F8 = 0x4045
+0x63F9 = 0x4046
+0x6409 = 0x4047
+0x640A = 0x4048
+0x6410 = 0x4049
+0x6412 = 0x404A
+0x6414 = 0x404B
+0x6418 = 0x404C
+0x641E = 0x404D
+0x6420 = 0x404E
+0x6422 = 0x404F
+0x6424 = 0x4050
+0x6425 = 0x4051
+0x6429 = 0x4052
+0x642A = 0x4053
+0x642F = 0x4054
+0x6430 = 0x4055
+0x6435 = 0x4056
+0x643D = 0x4057
+0x643F = 0x4058
+0x644B = 0x4059
+0x644F = 0x405A
+0x6451 = 0x405B
+0x6452 = 0x405C
+0x6453 = 0x405D
+0x6454 = 0x405E
+0x645A = 0x405F
+0x645B = 0x4060
+0x645C = 0x4061
+0x645D = 0x4062
+0x645F = 0x4063
+0x6460 = 0x4064
+0x6461 = 0x4065
+0x6463 = 0x4066
+0x646D = 0x4067
+0x6473 = 0x4068
+0x6474 = 0x4069
+0x647B = 0x406A
+0x647D = 0x406B
+0x6485 = 0x406C
+0x6487 = 0x406D
+0x648F = 0x406E
+0x6490 = 0x406F
+0x6491 = 0x4070
+0x6498 = 0x4071
+0x6499 = 0x4072
+0x649B = 0x4073
+0x649D = 0x4074
+0x649F = 0x4075
+0x64A1 = 0x4076
+0x64A3 = 0x4077
+0x64A6 = 0x4078
+0x64A8 = 0x4079
+0x64AC = 0x407A
+0x64B3 = 0x407B
+0x64BD = 0x407C
+0x64BE = 0x407D
+0x64BF = 0x407E
+0x64C4 = 0x4121
+0x64C9 = 0x4122
+0x64CA = 0x4123
+0x64CB = 0x4124
+0x64CC = 0x4125
+0x64CE = 0x4126
+0x64D0 = 0x4127
+0x64D1 = 0x4128
+0x64D5 = 0x4129
+0x64D7 = 0x412A
+0x64E4 = 0x412B
+0x64E5 = 0x412C
+0x64E9 = 0x412D
+0x64EA = 0x412E
+0x64ED = 0x412F
+0x64F0 = 0x4130
+0x64F5 = 0x4131
+0x64F7 = 0x4132
+0x64FB = 0x4133
+0x64FF = 0x4134
+0x6501 = 0x4135
+0x6504 = 0x4136
+0x6508 = 0x4137
+0x6509 = 0x4138
+0x650A = 0x4139
+0x650F = 0x413A
+0x6513 = 0x413B
+0x6514 = 0x413C
+0x6516 = 0x413D
+0x6519 = 0x413E
+0x651B = 0x413F
+0x651E = 0x4140
+0x651F = 0x4141
+0x6522 = 0x4142
+0x6526 = 0x4143
+0x6529 = 0x4144
+0x652E = 0x4145
+0x6531 = 0x4146
+0x653A = 0x4147
+0x653C = 0x4148
+0x653D = 0x4149
+0x6543 = 0x414A
+0x6547 = 0x414B
+0x6549 = 0x414C
+0x6550 = 0x414D
+0x6552 = 0x414E
+0x6554 = 0x414F
+0x655F = 0x4150
+0x6560 = 0x4151
+0x6567 = 0x4152
+0x656B = 0x4153
+0x657A = 0x4154
+0x657D = 0x4155
+0x6581 = 0x4156
+0x6585 = 0x4157
+0x658A = 0x4158
+0x6592 = 0x4159
+0x6595 = 0x415A
+0x6598 = 0x415B
+0x659D = 0x415C
+0x65A0 = 0x415D
+0x65A3 = 0x415E
+0x65A6 = 0x415F
+0x65AE = 0x4160
+0x65B2 = 0x4161
+0x65B3 = 0x4162
+0x65B4 = 0x4163
+0x65BF = 0x4164
+0x65C2 = 0x4165
+0x65C8 = 0x4166
+0x65C9 = 0x4167
+0x65CE = 0x4168
+0x65D0 = 0x4169
+0x65D4 = 0x416A
+0x65D6 = 0x416B
+0x65D8 = 0x416C
+0x65DF = 0x416D
+0x65F0 = 0x416E
+0x65F2 = 0x416F
+0x65F4 = 0x4170
+0x65F5 = 0x4171
+0x65F9 = 0x4172
+0x65FE = 0x4173
+0x65FF = 0x4174
+0x6600 = 0x4175
+0x6604 = 0x4176
+0x6608 = 0x4177
+0x6609 = 0x4178
+0x660D = 0x4179
+0x6611 = 0x417A
+0x6612 = 0x417B
+0x6615 = 0x417C
+0x6616 = 0x417D
+0x661D = 0x417E
+0x661E = 0x4221
+0x6621 = 0x4222
+0x6622 = 0x4223
+0x6623 = 0x4224
+0x6624 = 0x4225
+0x6626 = 0x4226
+0x6629 = 0x4227
+0x662A = 0x4228
+0x662B = 0x4229
+0x662C = 0x422A
+0x662E = 0x422B
+0x6630 = 0x422C
+0x6631 = 0x422D
+0x6633 = 0x422E
+0x6637 = 0x4230
+0x6639 = 0x422F
+0x6640 = 0x4231
+0x6645 = 0x4232
+0x6646 = 0x4233
+0x664A = 0x4234
+0x664C = 0x4235
+0x664E = 0x4237
+0x6651 = 0x4236
+0x6657 = 0x4238
+0x6658 = 0x4239
+0x6659 = 0x423A
+0x665B = 0x423B
+0x665C = 0x423C
+0x6660 = 0x423D
+0x6661 = 0x423E
+0x666A = 0x4240
+0x666B = 0x4241
+0x666C = 0x4242
+0x6673 = 0x4244
+0x6675 = 0x4245
+0x6677 = 0x4247
+0x6678 = 0x4248
+0x6679 = 0x4249
+0x667B = 0x424A
+0x667C = 0x424C
+0x667E = 0x4243
+0x667F = 0x4246
+0x6680 = 0x424B
+0x668B = 0x424D
+0x668C = 0x424E
+0x668D = 0x424F
+0x6690 = 0x4250
+0x6692 = 0x4251
+0x6699 = 0x4252
+0x669A = 0x4253
+0x669B = 0x4254
+0x669C = 0x4255
+0x669F = 0x4256
+0x66A0 = 0x4257
+0x66A4 = 0x4258
+0x66AD = 0x4259
+0x66B1 = 0x425A
+0x66B2 = 0x425B
+0x66B5 = 0x425C
+0x66BB = 0x425D
+0x66BF = 0x425E
+0x66C0 = 0x425F
+0x66C2 = 0x4260
+0x66C3 = 0x4261
+0x66C8 = 0x4262
+0x66CC = 0x4263
+0x66CE = 0x4264
+0x66CF = 0x4265
+0x66D4 = 0x4266
+0x66DB = 0x4267
+0x66DF = 0x4268
+0x66E8 = 0x4269
+0x66EB = 0x426A
+0x66EC = 0x426B
+0x66EE = 0x426C
+0x66FA = 0x426D
+0x66FB = 0x423F
+0x6705 = 0x426E
+0x6707 = 0x426F
+0x670E = 0x4270
+0x6713 = 0x4271
+0x6719 = 0x4272
+0x671C = 0x4273
+0x6720 = 0x4274
+0x6722 = 0x4275
+0x6733 = 0x4276
+0x673E = 0x4277
+0x6745 = 0x4278
+0x6747 = 0x4279
+0x6748 = 0x427A
+0x674C = 0x427B
+0x6754 = 0x427C
+0x6755 = 0x427D
+0x675D = 0x427E
+0x6766 = 0x4321
+0x676C = 0x4322
+0x676E = 0x4323
+0x6774 = 0x4324
+0x6776 = 0x4325
+0x677B = 0x4326
+0x6781 = 0x4327
+0x6784 = 0x4328
+0x678E = 0x4329
+0x678F = 0x432A
+0x6791 = 0x432B
+0x6793 = 0x432C
+0x6796 = 0x432D
+0x6798 = 0x432E
+0x6799 = 0x432F
+0x679B = 0x4330
+0x67B0 = 0x4331
+0x67B1 = 0x4332
+0x67B2 = 0x4333
+0x67B5 = 0x4334
+0x67BB = 0x4335
+0x67BC = 0x4336
+0x67BD = 0x4337
+0x67C0 = 0x4339
+0x67C2 = 0x433A
+0x67C3 = 0x433B
+0x67C5 = 0x433C
+0x67C8 = 0x433D
+0x67C9 = 0x433E
+0x67D2 = 0x433F
+0x67D7 = 0x4340
+0x67D9 = 0x4341
+0x67DC = 0x4342
+0x67E1 = 0x4343
+0x67E6 = 0x4344
+0x67F0 = 0x4345
+0x67F2 = 0x4346
+0x67F6 = 0x4347
+0x67F7 = 0x4348
+0x67F9 = 0x4338
+0x6814 = 0x434A
+0x6819 = 0x434B
+0x681D = 0x434C
+0x681F = 0x434D
+0x6827 = 0x434F
+0x6828 = 0x434E
+0x682C = 0x4350
+0x682D = 0x4351
+0x682F = 0x4352
+0x6830 = 0x4353
+0x6831 = 0x4354
+0x6833 = 0x4355
+0x683B = 0x4356
+0x683F = 0x4357
+0x6844 = 0x4358
+0x6845 = 0x4359
+0x684A = 0x435A
+0x684C = 0x435B
+0x6852 = 0x4349
+0x6855 = 0x435C
+0x6857 = 0x435D
+0x6858 = 0x435E
+0x685B = 0x435F
+0x686B = 0x4360
+0x686E = 0x4361
+0x686F = 0x4362
+0x6870 = 0x4363
+0x6871 = 0x4364
+0x6872 = 0x4365
+0x6875 = 0x4366
+0x6879 = 0x4367
+0x687A = 0x4368
+0x687B = 0x4369
+0x687C = 0x436A
+0x6882 = 0x436B
+0x6884 = 0x436C
+0x6886 = 0x436D
+0x6888 = 0x436E
+0x6896 = 0x436F
+0x6898 = 0x4370
+0x689A = 0x4371
+0x689C = 0x4372
+0x68A1 = 0x4373
+0x68A3 = 0x4374
+0x68A5 = 0x4375
+0x68A9 = 0x4376
+0x68AA = 0x4377
+0x68AE = 0x4378
+0x68B2 = 0x4379
+0x68BB = 0x437A
+0x68C5 = 0x437B
+0x68C8 = 0x437C
+0x68CC = 0x437D
+0x68CF = 0x437E
+0x68D0 = 0x4421
+0x68D1 = 0x4422
+0x68D3 = 0x4423
+0x68D6 = 0x4424
+0x68D9 = 0x4425
+0x68DC = 0x4426
+0x68DD = 0x4427
+0x68E5 = 0x4428
+0x68E8 = 0x4429
+0x68EA = 0x442A
+0x68EB = 0x442B
+0x68EC = 0x442C
+0x68ED = 0x442D
+0x68F0 = 0x442E
+0x68F1 = 0x442F
+0x68F5 = 0x4430
+0x68F6 = 0x4431
+0x68FB = 0x4432
+0x68FC = 0x4433
+0x68FD = 0x4434
+0x6906 = 0x4435
+0x6909 = 0x4436
+0x690A = 0x4437
+0x6910 = 0x4438
+0x6911 = 0x4439
+0x6913 = 0x443A
+0x6916 = 0x443B
+0x6917 = 0x443C
+0x6931 = 0x443D
+0x6933 = 0x443E
+0x6935 = 0x443F
+0x6938 = 0x4440
+0x693B = 0x4441
+0x6942 = 0x4442
+0x6945 = 0x4443
+0x6949 = 0x4444
+0x694E = 0x4445
+0x6957 = 0x4446
+0x695B = 0x4447
+0x6963 = 0x4448
+0x6964 = 0x4449
+0x6965 = 0x444A
+0x6966 = 0x444B
+0x6968 = 0x444C
+0x6969 = 0x444D
+0x696C = 0x444E
+0x6970 = 0x444F
+0x6971 = 0x4450
+0x6972 = 0x4451
+0x697A = 0x4452
+0x697B = 0x4453
+0x697F = 0x4454
+0x6980 = 0x4455
+0x698D = 0x4456
+0x6992 = 0x4457
+0x6996 = 0x4458
+0x6998 = 0x4459
+0x69A1 = 0x445A
+0x69A5 = 0x445B
+0x69A6 = 0x445C
+0x69A8 = 0x445D
+0x69AB = 0x445E
+0x69AD = 0x445F
+0x69AF = 0x4460
+0x69B7 = 0x4461
+0x69B8 = 0x4462
+0x69BA = 0x4463
+0x69BC = 0x4464
+0x69C5 = 0x4465
+0x69C8 = 0x4466
+0x69D1 = 0x4467
+0x69D6 = 0x4468
+0x69D7 = 0x4469
+0x69E2 = 0x446A
+0x69E5 = 0x446B
+0x69EE = 0x446C
+0x69EF = 0x446D
+0x69F1 = 0x446E
+0x69F3 = 0x446F
+0x69F5 = 0x4470
+0x69FE = 0x4471
+0x6A00 = 0x4472
+0x6A01 = 0x4473
+0x6A03 = 0x4474
+0x6A0F = 0x4475
+0x6A11 = 0x4476
+0x6A15 = 0x4477
+0x6A1A = 0x4478
+0x6A1D = 0x4479
+0x6A20 = 0x447A
+0x6A24 = 0x447B
+0x6A28 = 0x447C
+0x6A30 = 0x447D
+0x6A32 = 0x447E
+0x6A34 = 0x4521
+0x6A37 = 0x4522
+0x6A3B = 0x4523
+0x6A3E = 0x4524
+0x6A3F = 0x4525
+0x6A45 = 0x4526
+0x6A46 = 0x4527
+0x6A49 = 0x4528
+0x6A4A = 0x4529
+0x6A4E = 0x452A
+0x6A50 = 0x452B
+0x6A51 = 0x452C
+0x6A52 = 0x452D
+0x6A55 = 0x452E
+0x6A56 = 0x452F
+0x6A5B = 0x4530
+0x6A64 = 0x4531
+0x6A67 = 0x4532
+0x6A6A = 0x4533
+0x6A71 = 0x4534
+0x6A73 = 0x4535
+0x6A7E = 0x4536
+0x6A81 = 0x4537
+0x6A83 = 0x4538
+0x6A86 = 0x4539
+0x6A87 = 0x453A
+0x6A89 = 0x453B
+0x6A8B = 0x453C
+0x6A91 = 0x453D
+0x6A9B = 0x453E
+0x6A9D = 0x453F
+0x6A9E = 0x4540
+0x6A9F = 0x4541
+0x6AA5 = 0x4542
+0x6AAB = 0x4543
+0x6AAF = 0x4544
+0x6AB0 = 0x4545
+0x6AB1 = 0x4546
+0x6AB4 = 0x4547
+0x6ABD = 0x4548
+0x6ABE = 0x4549
+0x6ABF = 0x454A
+0x6AC6 = 0x454B
+0x6AC8 = 0x454D
+0x6AC9 = 0x454C
+0x6ACC = 0x454E
+0x6AD0 = 0x454F
+0x6AD4 = 0x4550
+0x6AD5 = 0x4551
+0x6AD6 = 0x4552
+0x6ADC = 0x4553
+0x6ADD = 0x4554
+0x6AE4 = 0x4555
+0x6AE7 = 0x4556
+0x6AEC = 0x4557
+0x6AF0 = 0x4558
+0x6AF1 = 0x4559
+0x6AF2 = 0x455A
+0x6AFC = 0x455B
+0x6AFD = 0x455C
+0x6B02 = 0x455D
+0x6B03 = 0x455E
+0x6B06 = 0x455F
+0x6B07 = 0x4560
+0x6B09 = 0x4561
+0x6B0F = 0x4562
+0x6B10 = 0x4563
+0x6B11 = 0x4564
+0x6B17 = 0x4565
+0x6B1B = 0x4566
+0x6B1E = 0x4567
+0x6B24 = 0x4568
+0x6B28 = 0x4569
+0x6B2B = 0x456A
+0x6B2C = 0x456B
+0x6B2F = 0x456C
+0x6B35 = 0x456D
+0x6B36 = 0x456E
+0x6B3B = 0x456F
+0x6B3F = 0x4570
+0x6B46 = 0x4571
+0x6B4A = 0x4572
+0x6B4D = 0x4573
+0x6B52 = 0x4574
+0x6B56 = 0x4575
+0x6B58 = 0x4576
+0x6B5D = 0x4577
+0x6B60 = 0x4578
+0x6B67 = 0x4579
+0x6B6B = 0x457A
+0x6B6E = 0x457B
+0x6B70 = 0x457C
+0x6B75 = 0x457D
+0x6B7D = 0x457E
+0x6B7E = 0x4621
+0x6B82 = 0x4622
+0x6B85 = 0x4623
+0x6B97 = 0x4624
+0x6B9B = 0x4625
+0x6B9F = 0x4626
+0x6BA0 = 0x4627
+0x6BA2 = 0x4628
+0x6BA3 = 0x4629
+0x6BA8 = 0x462A
+0x6BA9 = 0x462B
+0x6BAC = 0x462C
+0x6BAD = 0x462D
+0x6BAE = 0x462E
+0x6BB0 = 0x462F
+0x6BB8 = 0x4630
+0x6BB9 = 0x4631
+0x6BBD = 0x4632
+0x6BBE = 0x4633
+0x6BC3 = 0x4634
+0x6BC4 = 0x4635
+0x6BC9 = 0x4636
+0x6BCC = 0x4637
+0x6BD6 = 0x4638
+0x6BDA = 0x4639
+0x6BE1 = 0x463A
+0x6BE3 = 0x463B
+0x6BE6 = 0x463C
+0x6BE7 = 0x463D
+0x6BEE = 0x463E
+0x6BF1 = 0x463F
+0x6BF7 = 0x4640
+0x6BF9 = 0x4641
+0x6BFF = 0x4642
+0x6C02 = 0x4643
+0x6C04 = 0x4644
+0x6C05 = 0x4645
+0x6C09 = 0x4646
+0x6C0D = 0x4647
+0x6C0E = 0x4648
+0x6C10 = 0x4649
+0x6C12 = 0x464A
+0x6C19 = 0x464B
+0x6C1F = 0x464C
+0x6C26 = 0x464D
+0x6C27 = 0x464E
+0x6C28 = 0x464F
+0x6C2C = 0x4650
+0x6C2E = 0x4651
+0x6C33 = 0x4652
+0x6C35 = 0x4653
+0x6C36 = 0x4654
+0x6C3A = 0x4655
+0x6C3B = 0x4656
+0x6C3F = 0x4657
+0x6C4A = 0x4658
+0x6C4B = 0x4659
+0x6C4D = 0x465A
+0x6C4F = 0x465B
+0x6C52 = 0x465C
+0x6C54 = 0x465D
+0x6C59 = 0x465E
+0x6C5B = 0x465F
+0x6C5C = 0x4660
+0x6C67 = 0x4736
+0x6C6B = 0x4661
+0x6C6D = 0x4662
+0x6C6F = 0x4663
+0x6C74 = 0x4664
+0x6C76 = 0x4665
+0x6C78 = 0x4666
+0x6C79 = 0x4667
+0x6C7B = 0x4668
+0x6C85 = 0x4669
+0x6C86 = 0x466A
+0x6C87 = 0x466B
+0x6C89 = 0x466C
+0x6C94 = 0x466D
+0x6C95 = 0x466E
+0x6C97 = 0x466F
+0x6C98 = 0x4670
+0x6C9C = 0x4671
+0x6C9F = 0x4672
+0x6CB0 = 0x4673
+0x6CB2 = 0x4674
+0x6CB4 = 0x4675
+0x6CC2 = 0x4676
+0x6CC6 = 0x4677
+0x6CCD = 0x4678
+0x6CCF = 0x4679
+0x6CD0 = 0x467A
+0x6CD1 = 0x467B
+0x6CD2 = 0x467C
+0x6CD4 = 0x467D
+0x6CD6 = 0x467E
+0x6CDA = 0x4721
+0x6CDC = 0x4722
+0x6CE0 = 0x4723
+0x6CE7 = 0x4724
+0x6CE9 = 0x4725
+0x6CEB = 0x4726
+0x6CEC = 0x4727
+0x6CEE = 0x4728
+0x6CF2 = 0x4729
+0x6CF4 = 0x472A
+0x6D04 = 0x472B
+0x6D07 = 0x472C
+0x6D0A = 0x472D
+0x6D0E = 0x472E
+0x6D0F = 0x472F
+0x6D11 = 0x4730
+0x6D13 = 0x4731
+0x6D1A = 0x4732
+0x6D26 = 0x4733
+0x6D27 = 0x4734
+0x6D28 = 0x4735
+0x6D2E = 0x4737
+0x6D2F = 0x4738
+0x6D31 = 0x4739
+0x6D39 = 0x473A
+0x6D3C = 0x473B
+0x6D3F = 0x473C
+0x6D57 = 0x473D
+0x6D5E = 0x473E
+0x6D5F = 0x473F
+0x6D61 = 0x4740
+0x6D65 = 0x4741
+0x6D67 = 0x4742
+0x6D6F = 0x4743
+0x6D70 = 0x4744
+0x6D7C = 0x4745
+0x6D82 = 0x4746
+0x6D87 = 0x4747
+0x6D91 = 0x4748
+0x6D92 = 0x4749
+0x6D94 = 0x474A
+0x6D96 = 0x474B
+0x6D97 = 0x474C
+0x6D98 = 0x474D
+0x6DAA = 0x474E
+0x6DAC = 0x474F
+0x6DB4 = 0x4750
+0x6DB7 = 0x4751
+0x6DB9 = 0x4752
+0x6DBD = 0x4753
+0x6DBF = 0x4754
+0x6DC4 = 0x4755
+0x6DC8 = 0x4756
+0x6DCA = 0x4757
+0x6DCE = 0x4758
+0x6DCF = 0x4759
+0x6DD6 = 0x475A
+0x6DDB = 0x475B
+0x6DDD = 0x475C
+0x6DDF = 0x475D
+0x6DE0 = 0x475E
+0x6DE2 = 0x475F
+0x6DE5 = 0x4760
+0x6DE9 = 0x4761
+0x6DEF = 0x4762
+0x6DF0 = 0x4763
+0x6DF4 = 0x4764
+0x6DF6 = 0x4765
+0x6DFC = 0x4766
+0x6E00 = 0x4767
+0x6E04 = 0x4768
+0x6E1E = 0x4769
+0x6E22 = 0x476A
+0x6E27 = 0x476B
+0x6E32 = 0x476C
+0x6E36 = 0x476D
+0x6E39 = 0x476E
+0x6E3B = 0x476F
+0x6E3C = 0x4770
+0x6E44 = 0x4771
+0x6E45 = 0x4772
+0x6E48 = 0x4773
+0x6E49 = 0x4774
+0x6E4B = 0x4775
+0x6E4F = 0x4776
+0x6E51 = 0x4777
+0x6E52 = 0x4778
+0x6E53 = 0x4779
+0x6E54 = 0x477A
+0x6E57 = 0x477B
+0x6E5C = 0x477C
+0x6E5D = 0x477D
+0x6E5E = 0x477E
+0x6E62 = 0x4821
+0x6E63 = 0x4822
+0x6E68 = 0x4823
+0x6E73 = 0x4824
+0x6E7B = 0x4825
+0x6E7D = 0x4826
+0x6E8D = 0x4827
+0x6E93 = 0x4828
+0x6E99 = 0x4829
+0x6EA0 = 0x482A
+0x6EA7 = 0x482B
+0x6EAD = 0x482C
+0x6EAE = 0x482D
+0x6EB1 = 0x482E
+0x6EB3 = 0x482F
+0x6EBB = 0x4830
+0x6EBF = 0x4831
+0x6EC0 = 0x4832
+0x6EC1 = 0x4833
+0x6EC3 = 0x4834
+0x6EC7 = 0x4835
+0x6EC8 = 0x4836
+0x6ECA = 0x4837
+0x6ECD = 0x4838
+0x6ECE = 0x4839
+0x6ECF = 0x483A
+0x6EEB = 0x483B
+0x6EED = 0x483C
+0x6EEE = 0x483D
+0x6EF9 = 0x483E
+0x6EFB = 0x483F
+0x6EFD = 0x4840
+0x6F04 = 0x4841
+0x6F08 = 0x4842
+0x6F0A = 0x4843
+0x6F0C = 0x4844
+0x6F0D = 0x4845
+0x6F16 = 0x4846
+0x6F18 = 0x4847
+0x6F1A = 0x4848
+0x6F1B = 0x4849
+0x6F26 = 0x484A
+0x6F29 = 0x484B
+0x6F2A = 0x484C
+0x6F2D = 0x4853
+0x6F2F = 0x484D
+0x6F30 = 0x484E
+0x6F33 = 0x484F
+0x6F36 = 0x4850
+0x6F3B = 0x4851
+0x6F3C = 0x4852
+0x6F4F = 0x4854
+0x6F51 = 0x4855
+0x6F52 = 0x4856
+0x6F53 = 0x4857
+0x6F57 = 0x4858
+0x6F59 = 0x4859
+0x6F5A = 0x485A
+0x6F5D = 0x485B
+0x6F5E = 0x485C
+0x6F61 = 0x485D
+0x6F62 = 0x485E
+0x6F68 = 0x485F
+0x6F6C = 0x4860
+0x6F7D = 0x4861
+0x6F7E = 0x4862
+0x6F83 = 0x4863
+0x6F87 = 0x4864
+0x6F88 = 0x4865
+0x6F8B = 0x4866
+0x6F8C = 0x4867
+0x6F8D = 0x4868
+0x6F90 = 0x4869
+0x6F92 = 0x486A
+0x6F93 = 0x486B
+0x6F94 = 0x486C
+0x6F96 = 0x486D
+0x6F9A = 0x486E
+0x6F9F = 0x486F
+0x6FA0 = 0x4870
+0x6FA5 = 0x4871
+0x6FA6 = 0x4872
+0x6FA7 = 0x4873
+0x6FA8 = 0x4874
+0x6FAE = 0x4875
+0x6FAF = 0x4876
+0x6FB0 = 0x4877
+0x6FB5 = 0x4878
+0x6FB6 = 0x4879
+0x6FBC = 0x487A
+0x6FC5 = 0x487B
+0x6FC7 = 0x487C
+0x6FC8 = 0x487D
+0x6FCA = 0x487E
+0x6FDA = 0x4921
+0x6FDE = 0x4922
+0x6FE8 = 0x4923
+0x6FE9 = 0x4924
+0x6FF0 = 0x4925
+0x6FF5 = 0x4926
+0x6FF9 = 0x4927
+0x6FFC = 0x4928
+0x6FFD = 0x4929
+0x7000 = 0x492A
+0x7005 = 0x492B
+0x7006 = 0x492C
+0x7007 = 0x492D
+0x700D = 0x492E
+0x7017 = 0x492F
+0x7020 = 0x4930
+0x7023 = 0x4931
+0x702F = 0x4932
+0x7034 = 0x4933
+0x7037 = 0x4934
+0x7039 = 0x4935
+0x703C = 0x4936
+0x7043 = 0x4937
+0x7044 = 0x4938
+0x7048 = 0x4939
+0x7049 = 0x493A
+0x704A = 0x493B
+0x704B = 0x493C
+0x704E = 0x4941
+0x7054 = 0x493D
+0x7055 = 0x493E
+0x705D = 0x493F
+0x705E = 0x4940
+0x7064 = 0x4942
+0x7065 = 0x4943
+0x706C = 0x4944
+0x706E = 0x4945
+0x7075 = 0x4946
+0x7076 = 0x4947
+0x707E = 0x4948
+0x7081 = 0x4949
+0x7085 = 0x494A
+0x7086 = 0x494B
+0x7094 = 0x494C
+0x7095 = 0x494D
+0x7096 = 0x494E
+0x7097 = 0x494F
+0x7098 = 0x4950
+0x709B = 0x4951
+0x70A4 = 0x4952
+0x70AB = 0x4953
+0x70B0 = 0x4954
+0x70B1 = 0x4955
+0x70B4 = 0x4956
+0x70B7 = 0x4957
+0x70CA = 0x4958
+0x70D1 = 0x4959
+0x70D3 = 0x495A
+0x70D4 = 0x495B
+0x70D5 = 0x495C
+0x70D6 = 0x495D
+0x70D8 = 0x495E
+0x70DC = 0x495F
+0x70E4 = 0x4960
+0x70FA = 0x4961
+0x7103 = 0x4962
+0x7104 = 0x4963
+0x7105 = 0x4964
+0x7106 = 0x4965
+0x7107 = 0x4966
+0x710B = 0x4967
+0x710C = 0x4968
+0x710F = 0x4969
+0x711E = 0x496A
+0x7120 = 0x496B
+0x712B = 0x496C
+0x712D = 0x496D
+0x712F = 0x496E
+0x7130 = 0x496F
+0x7131 = 0x4970
+0x7138 = 0x4971
+0x7141 = 0x4972
+0x7145 = 0x4973
+0x7146 = 0x4974
+0x7147 = 0x4975
+0x714A = 0x4976
+0x714B = 0x4977
+0x7150 = 0x4978
+0x7152 = 0x4979
+0x7157 = 0x497A
+0x715A = 0x497B
+0x715C = 0x497C
+0x715E = 0x497D
+0x7160 = 0x497E
+0x7168 = 0x4A21
+0x7179 = 0x4A22
+0x7180 = 0x4A23
+0x7185 = 0x4A24
+0x7187 = 0x4A25
+0x718C = 0x4A26
+0x7192 = 0x4A27
+0x719A = 0x4A28
+0x719B = 0x4A29
+0x71A0 = 0x4A2A
+0x71A2 = 0x4A2B
+0x71AF = 0x4A2C
+0x71B0 = 0x4A2D
+0x71B2 = 0x4A2E
+0x71B3 = 0x4A2F
+0x71BA = 0x4A30
+0x71BF = 0x4A31
+0x71C0 = 0x4A32
+0x71C1 = 0x4A33
+0x71C4 = 0x4A34
+0x71CB = 0x4A35
+0x71CC = 0x4A36
+0x71D3 = 0x4A37
+0x71D6 = 0x4A38
+0x71D9 = 0x4A39
+0x71DA = 0x4A3A
+0x71DC = 0x4A3B
+0x71F8 = 0x4A3C
+0x71FE = 0x4A3D
+0x7200 = 0x4A3E
+0x7207 = 0x4A3F
+0x7208 = 0x4A40
+0x7209 = 0x4A41
+0x7213 = 0x4A42
+0x7217 = 0x4A43
+0x721A = 0x4A44
+0x721D = 0x4A45
+0x721F = 0x4A46
+0x7224 = 0x4A47
+0x722B = 0x4A48
+0x722F = 0x4A49
+0x7234 = 0x4A4A
+0x7238 = 0x4A4B
+0x7239 = 0x4A4C
+0x7241 = 0x4A4D
+0x7242 = 0x4A4E
+0x7243 = 0x4A4F
+0x7245 = 0x4A50
+0x724E = 0x4A51
+0x724F = 0x4A52
+0x7250 = 0x4A53
+0x7253 = 0x4A54
+0x7255 = 0x4A55
+0x7256 = 0x4A56
+0x725A = 0x4A57
+0x725C = 0x4A58
+0x725E = 0x4A59
+0x7260 = 0x4A5A
+0x7263 = 0x4A5B
+0x7268 = 0x4A5C
+0x726B = 0x4A5D
+0x726E = 0x4A5E
+0x726F = 0x4A5F
+0x7271 = 0x4A60
+0x7277 = 0x4A61
+0x7278 = 0x4A62
+0x727B = 0x4A63
+0x727C = 0x4A64
+0x727F = 0x4A65
+0x7284 = 0x4A66
+0x7289 = 0x4A67
+0x728D = 0x4A68
+0x728E = 0x4A69
+0x7293 = 0x4A6A
+0x729B = 0x4A6B
+0x72A8 = 0x4A6C
+0x72AD = 0x4A6D
+0x72AE = 0x4A6E
+0x72B1 = 0x4A6F
+0x72B4 = 0x4A70
+0x72BE = 0x4A71
+0x72C1 = 0x4A72
+0x72C7 = 0x4A73
+0x72C9 = 0x4A74
+0x72CC = 0x4A75
+0x72D5 = 0x4A76
+0x72D6 = 0x4A77
+0x72D8 = 0x4A78
+0x72DF = 0x4A79
+0x72E5 = 0x4A7A
+0x72F3 = 0x4A7B
+0x72F4 = 0x4A7C
+0x72FA = 0x4A7D
+0x72FB = 0x4A7E
+0x72FE = 0x4B21
+0x7302 = 0x4B22
+0x7304 = 0x4B23
+0x7305 = 0x4B24
+0x7307 = 0x4B25
+0x730B = 0x4B26
+0x730D = 0x4B27
+0x7312 = 0x4B28
+0x7313 = 0x4B29
+0x7318 = 0x4B2A
+0x7319 = 0x4B2B
+0x731E = 0x4B2C
+0x7322 = 0x4B2D
+0x7324 = 0x4B2E
+0x7327 = 0x4B2F
+0x7328 = 0x4B30
+0x732C = 0x4B31
+0x7331 = 0x4B32
+0x7332 = 0x4B33
+0x7335 = 0x4B34
+0x733A = 0x4B35
+0x733B = 0x4B36
+0x733D = 0x4B37
+0x7343 = 0x4B38
+0x734D = 0x4B39
+0x7350 = 0x4B3A
+0x7352 = 0x4B3B
+0x7356 = 0x4B3C
+0x7358 = 0x4B3D
+0x735D = 0x4B3E
+0x735E = 0x4B3F
+0x735F = 0x4B40
+0x7360 = 0x4B41
+0x7366 = 0x4B42
+0x7367 = 0x4B43
+0x7369 = 0x4B44
+0x736B = 0x4B45
+0x736C = 0x4B46
+0x736E = 0x4B47
+0x736F = 0x4B48
+0x7371 = 0x4B49
+0x7377 = 0x4B4A
+0x7379 = 0x4B4B
+0x737C = 0x4B4C
+0x7380 = 0x4B4D
+0x7381 = 0x4B4E
+0x7383 = 0x4B4F
+0x7385 = 0x4B50
+0x7386 = 0x4B51
+0x738E = 0x4B52
+0x7390 = 0x4B53
+0x7393 = 0x4B54
+0x7395 = 0x4B55
+0x7397 = 0x4B56
+0x7398 = 0x4B57
+0x739C = 0x4B58
+0x739E = 0x4B59
+0x739F = 0x4B5A
+0x73A0 = 0x4B5B
+0x73A2 = 0x4B5C
+0x73A5 = 0x4B5D
+0x73A6 = 0x4B5E
+0x73AA = 0x4B5F
+0x73AB = 0x4B60
+0x73AD = 0x4B61
+0x73B5 = 0x4B62
+0x73B7 = 0x4B63
+0x73B9 = 0x4B64
+0x73BC = 0x4B65
+0x73BD = 0x4B66
+0x73BF = 0x4B67
+0x73C5 = 0x4B68
+0x73C6 = 0x4B69
+0x73C9 = 0x4B6A
+0x73CB = 0x4B6B
+0x73CC = 0x4B6C
+0x73CF = 0x4B6D
+0x73D2 = 0x4B6E
+0x73D3 = 0x4B6F
+0x73D6 = 0x4B70
+0x73D9 = 0x4B71
+0x73DD = 0x4B72
+0x73E1 = 0x4B73
+0x73E3 = 0x4B74
+0x73E6 = 0x4B75
+0x73E7 = 0x4B76
+0x73E9 = 0x4B77
+0x73F4 = 0x4B78
+0x73F5 = 0x4B79
+0x73F7 = 0x4B7A
+0x73F9 = 0x4B7B
+0x73FA = 0x4B7C
+0x73FB = 0x4B7D
+0x73FD = 0x4B7E
+0x73FF = 0x4C21
+0x7400 = 0x4C22
+0x7401 = 0x4C23
+0x7404 = 0x4C24
+0x7407 = 0x4C25
+0x740A = 0x4C26
+0x7411 = 0x4C27
+0x741A = 0x4C28
+0x741B = 0x4C29
+0x7424 = 0x4C2A
+0x7426 = 0x4C2B
+0x7428 = 0x4C2C
+0x7429 = 0x4C2D
+0x742A = 0x4C2E
+0x742B = 0x4C2F
+0x742C = 0x4C30
+0x742D = 0x4C31
+0x742E = 0x4C32
+0x742F = 0x4C33
+0x7430 = 0x4C34
+0x7431 = 0x4C35
+0x7439 = 0x4C36
+0x7440 = 0x4C37
+0x7443 = 0x4C38
+0x7444 = 0x4C39
+0x7446 = 0x4C3A
+0x7447 = 0x4C3B
+0x744B = 0x4C3C
+0x744D = 0x4C3D
+0x7451 = 0x4C3E
+0x7452 = 0x4C3F
+0x7457 = 0x4C40
+0x745D = 0x4C41
+0x7462 = 0x4C42
+0x7466 = 0x4C43
+0x7467 = 0x4C44
+0x7468 = 0x4C45
+0x746B = 0x4C46
+0x746D = 0x4C47
+0x746E = 0x4C48
+0x7471 = 0x4C49
+0x7472 = 0x4C4A
+0x7480 = 0x4C4B
+0x7481 = 0x4C4C
+0x7485 = 0x4C4D
+0x7486 = 0x4C4E
+0x7487 = 0x4C4F
+0x7489 = 0x4C50
+0x748F = 0x4C51
+0x7490 = 0x4C52
+0x7491 = 0x4C53
+0x7492 = 0x4C54
+0x7498 = 0x4C55
+0x7499 = 0x4C56
+0x749A = 0x4C57
+0x749C = 0x4C58
+0x749F = 0x4C59
+0x74A0 = 0x4C5A
+0x74A1 = 0x4C5B
+0x74A3 = 0x4C5C
+0x74A6 = 0x4C5D
+0x74A8 = 0x4C5E
+0x74A9 = 0x4C5F
+0x74AA = 0x4C60
+0x74AB = 0x4C61
+0x74AE = 0x4C62
+0x74AF = 0x4C63
+0x74B1 = 0x4C64
+0x74B2 = 0x4C65
+0x74B5 = 0x4C66
+0x74B9 = 0x4C67
+0x74BB = 0x4C68
+0x74BF = 0x4C69
+0x74C8 = 0x4C6A
+0x74C9 = 0x4C6B
+0x74CC = 0x4C6C
+0x74D0 = 0x4C6D
+0x74D3 = 0x4C6E
+0x74D8 = 0x4C6F
+0x74DA = 0x4C70
+0x74DB = 0x4C71
+0x74DE = 0x4C72
+0x74DF = 0x4C73
+0x74E4 = 0x4C74
+0x74E8 = 0x4C75
+0x74EA = 0x4C76
+0x74EB = 0x4C77
+0x74EF = 0x4C78
+0x74F4 = 0x4C79
+0x74FA = 0x4C7A
+0x74FB = 0x4C7B
+0x74FC = 0x4C7C
+0x74FF = 0x4C7D
+0x7506 = 0x4C7E
+0x7512 = 0x4D21
+0x7516 = 0x4D22
+0x7517 = 0x4D23
+0x7520 = 0x4D24
+0x7521 = 0x4D25
+0x7524 = 0x4D26
+0x7527 = 0x4D27
+0x7529 = 0x4D28
+0x752A = 0x4D29
+0x752F = 0x4D2A
+0x7536 = 0x4D2B
+0x7539 = 0x4D2C
+0x753D = 0x4D2D
+0x753E = 0x4D2E
+0x753F = 0x4D2F
+0x7540 = 0x4D30
+0x7543 = 0x4D31
+0x7547 = 0x4D32
+0x7548 = 0x4D33
+0x754E = 0x4D34
+0x7550 = 0x4D35
+0x7552 = 0x4D36
+0x7557 = 0x4D37
+0x755E = 0x4D38
+0x755F = 0x4D39
+0x7561 = 0x4D3A
+0x756F = 0x4D3B
+0x7571 = 0x4D3C
+0x7579 = 0x4D3D
+0x757A = 0x4D3E
+0x757B = 0x4D3F
+0x757C = 0x4D40
+0x757D = 0x4D41
+0x757E = 0x4D42
+0x7581 = 0x4D43
+0x7585 = 0x4D44
+0x7590 = 0x4D45
+0x7592 = 0x4D46
+0x7593 = 0x4D47
+0x7595 = 0x4D48
+0x7599 = 0x4D49
+0x759C = 0x4D4A
+0x75A2 = 0x4D4B
+0x75A4 = 0x4D4C
+0x75B4 = 0x4D4D
+0x75BA = 0x4D4E
+0x75BF = 0x4D4F
+0x75C0 = 0x4D50
+0x75C1 = 0x4D51
+0x75C4 = 0x4D52
+0x75C6 = 0x4D53
+0x75CC = 0x4D54
+0x75CE = 0x4D55
+0x75CF = 0x4D56
+0x75D7 = 0x4D57
+0x75DC = 0x4D58
+0x75DF = 0x4D59
+0x75E0 = 0x4D5A
+0x75E1 = 0x4D5B
+0x75E4 = 0x4D5C
+0x75E7 = 0x4D5D
+0x75EC = 0x4D5E
+0x75EE = 0x4D5F
+0x75EF = 0x4D60
+0x75F1 = 0x4D61
+0x75F9 = 0x4D62
+0x7600 = 0x4D63
+0x7602 = 0x4D64
+0x7603 = 0x4D65
+0x7604 = 0x4D66
+0x7607 = 0x4D67
+0x7608 = 0x4D68
+0x760A = 0x4D69
+0x760C = 0x4D6A
+0x760F = 0x4D6B
+0x7612 = 0x4D6C
+0x7613 = 0x4D6D
+0x7615 = 0x4D6E
+0x7616 = 0x4D6F
+0x7619 = 0x4D70
+0x761B = 0x4D71
+0x761C = 0x4D72
+0x761D = 0x4D73
+0x761E = 0x4D74
+0x7623 = 0x4D75
+0x7625 = 0x4D76
+0x7626 = 0x4D77
+0x7629 = 0x4D78
+0x762D = 0x4D79
+0x7632 = 0x4D7A
+0x7633 = 0x4D7B
+0x7635 = 0x4D7C
+0x7638 = 0x4D7D
+0x7639 = 0x4D7E
+0x763A = 0x4E21
+0x763C = 0x4E22
+0x7640 = 0x4E24
+0x7641 = 0x4E25
+0x7643 = 0x4E26
+0x7644 = 0x4E27
+0x7645 = 0x4E28
+0x7649 = 0x4E29
+0x764A = 0x4E23
+0x764B = 0x4E2A
+0x7655 = 0x4E2B
+0x7659 = 0x4E2C
+0x765F = 0x4E2D
+0x7664 = 0x4E2E
+0x7665 = 0x4E2F
+0x766D = 0x4E30
+0x766E = 0x4E31
+0x766F = 0x4E32
+0x7671 = 0x4E33
+0x7674 = 0x4E34
+0x7681 = 0x4E35
+0x7685 = 0x4E36
+0x768C = 0x4E37
+0x768D = 0x4E38
+0x7695 = 0x4E39
+0x769B = 0x4E3A
+0x769C = 0x4E3B
+0x769D = 0x4E3C
+0x769F = 0x4E3D
+0x76A0 = 0x4E3E
+0x76A2 = 0x4E3F
+0x76A3 = 0x4E40
+0x76A4 = 0x4E41
+0x76A5 = 0x4E42
+0x76A6 = 0x4E43
+0x76A7 = 0x4E44
+0x76A8 = 0x4E45
+0x76AA = 0x4E46
+0x76AD = 0x4E47
+0x76BD = 0x4E48
+0x76C1 = 0x4E49
+0x76C5 = 0x4E4A
+0x76C9 = 0x4E4B
+0x76CB = 0x4E4C
+0x76CC = 0x4E4D
+0x76CE = 0x4E4E
+0x76D4 = 0x4E4F
+0x76D9 = 0x4E50
+0x76E0 = 0x4E51
+0x76E6 = 0x4E52
+0x76E8 = 0x4E53
+0x76EC = 0x4E54
+0x76F0 = 0x4E55
+0x76F1 = 0x4E56
+0x76F6 = 0x4E57
+0x76F9 = 0x4E58
+0x76FC = 0x4E59
+0x7700 = 0x4E5A
+0x7706 = 0x4E5B
+0x770A = 0x4E5C
+0x770E = 0x4E5D
+0x7712 = 0x4E5E
+0x7714 = 0x4E5F
+0x7715 = 0x4E60
+0x7717 = 0x4E61
+0x7719 = 0x4E62
+0x771A = 0x4E63
+0x771C = 0x4E64
+0x7722 = 0x4E65
+0x7728 = 0x4E66
+0x772D = 0x4E67
+0x772E = 0x4E68
+0x772F = 0x4E69
+0x7734 = 0x4E6A
+0x7735 = 0x4E6B
+0x7736 = 0x4E6C
+0x7739 = 0x4E6D
+0x773D = 0x4E6E
+0x773E = 0x4E6F
+0x7742 = 0x4E70
+0x7745 = 0x4E71
+0x7746 = 0x4E72
+0x774A = 0x4E73
+0x774D = 0x4E74
+0x774E = 0x4E75
+0x774F = 0x4E76
+0x7752 = 0x4E77
+0x7756 = 0x4E78
+0x7757 = 0x4E79
+0x775C = 0x4E7A
+0x775E = 0x4E7B
+0x775F = 0x4E7C
+0x7760 = 0x4E7D
+0x7762 = 0x4E7E
+0x7764 = 0x4F21
+0x7767 = 0x4F22
+0x776A = 0x4F23
+0x776C = 0x4F24
+0x7770 = 0x4F25
+0x7772 = 0x4F26
+0x7773 = 0x4F27
+0x7774 = 0x4F28
+0x777A = 0x4F29
+0x777D = 0x4F2A
+0x7780 = 0x4F2B
+0x7784 = 0x4F2C
+0x778C = 0x4F2D
+0x778D = 0x4F2E
+0x7794 = 0x4F2F
+0x7795 = 0x4F30
+0x7796 = 0x4F31
+0x779A = 0x4F32
+0x779F = 0x4F33
+0x77A2 = 0x4F34
+0x77A7 = 0x4F35
+0x77AA = 0x4F36
+0x77AE = 0x4F37
+0x77AF = 0x4F38
+0x77B1 = 0x4F39
+0x77B5 = 0x4F3A
+0x77BE = 0x4F3B
+0x77C3 = 0x4F3C
+0x77C9 = 0x4F3D
+0x77D1 = 0x4F3E
+0x77D2 = 0x4F3F
+0x77D5 = 0x4F40
+0x77D9 = 0x4F41
+0x77DE = 0x4F42
+0x77DF = 0x4F43
+0x77E0 = 0x4F44
+0x77E4 = 0x4F45
+0x77E6 = 0x4F46
+0x77EA = 0x4F47
+0x77EC = 0x4F48
+0x77F0 = 0x4F49
+0x77F1 = 0x4F4A
+0x77F4 = 0x4F4B
+0x77F8 = 0x4F4C
+0x77FB = 0x4F4D
+0x7805 = 0x4F4E
+0x7806 = 0x4F4F
+0x7809 = 0x4F50
+0x780D = 0x4F51
+0x780E = 0x4F52
+0x7811 = 0x4F53
+0x781D = 0x4F54
+0x7821 = 0x4F55
+0x7822 = 0x4F56
+0x7823 = 0x4F57
+0x782D = 0x4F58
+0x782E = 0x4F59
+0x7830 = 0x4F5A
+0x7835 = 0x4F5B
+0x7837 = 0x4F5C
+0x7843 = 0x4F5D
+0x7844 = 0x4F5E
+0x7847 = 0x4F5F
+0x7848 = 0x4F60
+0x784C = 0x4F61
+0x784E = 0x4F62
+0x7852 = 0x4F63
+0x785C = 0x4F64
+0x785E = 0x4F65
+0x7860 = 0x4F66
+0x7861 = 0x4F67
+0x7863 = 0x4F68
+0x7864 = 0x4F69
+0x7868 = 0x4F6A
+0x786A = 0x4F6B
+0x786E = 0x4F6C
+0x787A = 0x4F6D
+0x787E = 0x4F6E
+0x788A = 0x4F6F
+0x788F = 0x4F70
+0x7894 = 0x4F71
+0x7898 = 0x4F72
+0x789D = 0x4F74
+0x789E = 0x4F75
+0x789F = 0x4F76
+0x78A1 = 0x4F73
+0x78A4 = 0x4F77
+0x78A8 = 0x4F78
+0x78AC = 0x4F79
+0x78AD = 0x4F7A
+0x78B0 = 0x4F7B
+0x78B1 = 0x4F7C
+0x78B2 = 0x4F7D
+0x78B3 = 0x4F7E
+0x78BB = 0x5021
+0x78BD = 0x5022
+0x78BF = 0x5023
+0x78C7 = 0x5024
+0x78C8 = 0x5025
+0x78C9 = 0x5026
+0x78CC = 0x5027
+0x78CE = 0x5028
+0x78D2 = 0x5029
+0x78D3 = 0x502A
+0x78D5 = 0x502B
+0x78D6 = 0x502C
+0x78DB = 0x502E
+0x78DF = 0x502F
+0x78E0 = 0x5030
+0x78E1 = 0x5031
+0x78E4 = 0x502D
+0x78E6 = 0x5032
+0x78EA = 0x5033
+0x78F2 = 0x5034
+0x78F3 = 0x5035
+0x78F6 = 0x5037
+0x78F7 = 0x5038
+0x78FA = 0x5039
+0x78FB = 0x503A
+0x78FF = 0x503B
+0x7900 = 0x5036
+0x7906 = 0x503C
+0x790C = 0x503D
+0x7910 = 0x503E
+0x791A = 0x503F
+0x791C = 0x5040
+0x791E = 0x5041
+0x791F = 0x5042
+0x7920 = 0x5043
+0x7925 = 0x5044
+0x7927 = 0x5045
+0x7929 = 0x5046
+0x792D = 0x5047
+0x7931 = 0x5048
+0x7934 = 0x5049
+0x7935 = 0x504A
+0x793B = 0x504B
+0x793D = 0x504C
+0x793F = 0x504D
+0x7944 = 0x504E
+0x7945 = 0x504F
+0x7946 = 0x5050
+0x794A = 0x5051
+0x794B = 0x5052
+0x794F = 0x5053
+0x7951 = 0x5054
+0x7954 = 0x5055
+0x7958 = 0x5056
+0x795B = 0x5057
+0x795C = 0x5058
+0x7967 = 0x5059
+0x7969 = 0x505A
+0x796B = 0x505B
+0x7972 = 0x505C
+0x7979 = 0x505D
+0x797B = 0x505E
+0x797C = 0x505F
+0x797E = 0x5060
+0x798B = 0x5061
+0x798C = 0x5062
+0x7991 = 0x5063
+0x7993 = 0x5064
+0x7994 = 0x5065
+0x7995 = 0x5066
+0x7996 = 0x5067
+0x7998 = 0x5068
+0x799B = 0x5069
+0x799C = 0x506A
+0x79A1 = 0x506B
+0x79A8 = 0x506C
+0x79A9 = 0x506D
+0x79AB = 0x506E
+0x79AF = 0x506F
+0x79B1 = 0x5070
+0x79B4 = 0x5071
+0x79B8 = 0x5072
+0x79BB = 0x5073
+0x79C2 = 0x5074
+0x79C4 = 0x5075
+0x79C7 = 0x5076
+0x79C8 = 0x5077
+0x79CA = 0x5078
+0x79CF = 0x5079
+0x79D4 = 0x507A
+0x79D6 = 0x507B
+0x79DA = 0x507C
+0x79DD = 0x507D
+0x79DE = 0x507E
+0x79E0 = 0x5121
+0x79E2 = 0x5122
+0x79E5 = 0x5123
+0x79EA = 0x5124
+0x79EB = 0x5125
+0x79ED = 0x5126
+0x79F1 = 0x5127
+0x79F8 = 0x5128
+0x79FC = 0x5129
+0x7A02 = 0x512A
+0x7A03 = 0x512B
+0x7A07 = 0x512C
+0x7A09 = 0x512D
+0x7A0A = 0x512E
+0x7A0C = 0x512F
+0x7A11 = 0x5130
+0x7A15 = 0x5131
+0x7A1B = 0x5132
+0x7A1E = 0x5133
+0x7A21 = 0x5134
+0x7A27 = 0x5135
+0x7A2B = 0x5136
+0x7A2D = 0x5137
+0x7A2F = 0x5138
+0x7A30 = 0x5139
+0x7A34 = 0x513A
+0x7A35 = 0x513B
+0x7A38 = 0x513C
+0x7A39 = 0x513D
+0x7A3A = 0x513E
+0x7A44 = 0x513F
+0x7A45 = 0x5140
+0x7A47 = 0x5141
+0x7A48 = 0x5142
+0x7A4C = 0x5143
+0x7A55 = 0x5144
+0x7A56 = 0x5145
+0x7A59 = 0x5146
+0x7A5C = 0x5147
+0x7A5D = 0x5148
+0x7A5F = 0x5149
+0x7A60 = 0x514A
+0x7A65 = 0x514B
+0x7A67 = 0x514C
+0x7A6A = 0x514D
+0x7A6D = 0x514E
+0x7A75 = 0x514F
+0x7A78 = 0x5150
+0x7A7E = 0x5151
+0x7A80 = 0x5152
+0x7A82 = 0x5153
+0x7A85 = 0x5154
+0x7A86 = 0x5155
+0x7A8A = 0x5156
+0x7A8B = 0x5157
+0x7A90 = 0x5158
+0x7A91 = 0x5159
+0x7A94 = 0x515A
+0x7A9E = 0x515B
+0x7AA0 = 0x515C
+0x7AA3 = 0x515D
+0x7AAC = 0x515E
+0x7AB3 = 0x515F
+0x7AB5 = 0x5160
+0x7AB9 = 0x5161
+0x7ABB = 0x5162
+0x7ABC = 0x5163
+0x7AC6 = 0x5164
+0x7AC9 = 0x5165
+0x7ACC = 0x5166
+0x7ACE = 0x5167
+0x7AD1 = 0x5168
+0x7ADB = 0x5169
+0x7AE8 = 0x516A
+0x7AE9 = 0x516B
+0x7AEB = 0x516C
+0x7AEC = 0x516D
+0x7AF1 = 0x516E
+0x7AF4 = 0x516F
+0x7AFB = 0x5170
+0x7AFD = 0x5171
+0x7AFE = 0x5172
+0x7B07 = 0x5173
+0x7B14 = 0x5174
+0x7B1F = 0x5175
+0x7B23 = 0x5176
+0x7B27 = 0x5177
+0x7B29 = 0x5178
+0x7B2A = 0x5179
+0x7B2B = 0x517A
+0x7B2D = 0x517B
+0x7B2E = 0x517C
+0x7B2F = 0x517D
+0x7B30 = 0x517E
+0x7B31 = 0x5221
+0x7B34 = 0x5222
+0x7B3D = 0x5223
+0x7B3F = 0x5224
+0x7B40 = 0x5225
+0x7B41 = 0x5226
+0x7B47 = 0x5227
+0x7B4E = 0x5228
+0x7B55 = 0x5229
+0x7B60 = 0x522A
+0x7B64 = 0x522B
+0x7B66 = 0x522C
+0x7B69 = 0x522D
+0x7B6A = 0x522E
+0x7B6D = 0x522F
+0x7B6F = 0x5230
+0x7B72 = 0x5231
+0x7B73 = 0x5232
+0x7B77 = 0x5233
+0x7B84 = 0x5234
+0x7B89 = 0x5235
+0x7B8E = 0x5236
+0x7B90 = 0x5237
+0x7B91 = 0x5238
+0x7B96 = 0x5239
+0x7B9B = 0x523A
+0x7B9E = 0x523B
+0x7BA0 = 0x523C
+0x7BA5 = 0x523D
+0x7BAC = 0x523E
+0x7BAF = 0x523F
+0x7BB0 = 0x5240
+0x7BB2 = 0x5241
+0x7BB5 = 0x5242
+0x7BB6 = 0x5243
+0x7BBA = 0x5244
+0x7BBB = 0x5245
+0x7BBC = 0x5246
+0x7BBD = 0x5247
+0x7BC2 = 0x5248
+0x7BC5 = 0x5249
+0x7BC8 = 0x524A
+0x7BCA = 0x524B
+0x7BD4 = 0x524C
+0x7BD6 = 0x524D
+0x7BD7 = 0x524E
+0x7BD9 = 0x524F
+0x7BDA = 0x5250
+0x7BDB = 0x5251
+0x7BE8 = 0x5252
+0x7BEA = 0x5253
+0x7BF2 = 0x5254
+0x7BF4 = 0x5255
+0x7BF5 = 0x5256
+0x7BF8 = 0x5257
+0x7BF9 = 0x5258
+0x7BFA = 0x5259
+0x7BFC = 0x525A
+0x7BFE = 0x525B
+0x7C01 = 0x525C
+0x7C02 = 0x525D
+0x7C03 = 0x525E
+0x7C04 = 0x525F
+0x7C06 = 0x5260
+0x7C09 = 0x5261
+0x7C0B = 0x5262
+0x7C0C = 0x5263
+0x7C0E = 0x5264
+0x7C0F = 0x5265
+0x7C19 = 0x5266
+0x7C1B = 0x5267
+0x7C20 = 0x5268
+0x7C25 = 0x5269
+0x7C26 = 0x526A
+0x7C28 = 0x526B
+0x7C2C = 0x526C
+0x7C31 = 0x526D
+0x7C33 = 0x526E
+0x7C34 = 0x526F
+0x7C36 = 0x5270
+0x7C39 = 0x5271
+0x7C3A = 0x5272
+0x7C46 = 0x5273
+0x7C4A = 0x5274
+0x7C51 = 0x5276
+0x7C52 = 0x5277
+0x7C53 = 0x5278
+0x7C55 = 0x5275
+0x7C59 = 0x5279
+0x7C5A = 0x527A
+0x7C5B = 0x527B
+0x7C5C = 0x527C
+0x7C5D = 0x527D
+0x7C5E = 0x527E
+0x7C61 = 0x5321
+0x7C63 = 0x5322
+0x7C67 = 0x5323
+0x7C69 = 0x5324
+0x7C6D = 0x5325
+0x7C6E = 0x5326
+0x7C70 = 0x5327
+0x7C72 = 0x5328
+0x7C79 = 0x5329
+0x7C7C = 0x532A
+0x7C7D = 0x532B
+0x7C86 = 0x532C
+0x7C87 = 0x532D
+0x7C8F = 0x532E
+0x7C94 = 0x532F
+0x7C9E = 0x5330
+0x7CA0 = 0x5331
+0x7CA6 = 0x5332
+0x7CB0 = 0x5333
+0x7CB6 = 0x5334
+0x7CB7 = 0x5335
+0x7CBA = 0x5336
+0x7CBB = 0x5337
+0x7CBC = 0x5338
+0x7CBF = 0x5339
+0x7CC4 = 0x533A
+0x7CC7 = 0x533B
+0x7CC8 = 0x533C
+0x7CC9 = 0x533D
+0x7CCD = 0x533E
+0x7CCF = 0x533F
+0x7CD3 = 0x5340
+0x7CD4 = 0x5341
+0x7CD5 = 0x5342
+0x7CD7 = 0x5343
+0x7CD9 = 0x5344
+0x7CDA = 0x5345
+0x7CDD = 0x5346
+0x7CE6 = 0x5347
+0x7CE9 = 0x5348
+0x7CEB = 0x5349
+0x7CF5 = 0x534A
+0x7D03 = 0x534B
+0x7D07 = 0x534C
+0x7D08 = 0x534D
+0x7D09 = 0x534E
+0x7D0F = 0x534F
+0x7D11 = 0x5350
+0x7D12 = 0x5351
+0x7D13 = 0x5352
+0x7D16 = 0x5353
+0x7D1D = 0x5354
+0x7D1E = 0x5355
+0x7D23 = 0x5356
+0x7D26 = 0x5357
+0x7D2A = 0x5358
+0x7D2D = 0x5359
+0x7D31 = 0x535A
+0x7D3C = 0x535B
+0x7D3D = 0x535C
+0x7D3E = 0x535D
+0x7D40 = 0x535E
+0x7D41 = 0x535F
+0x7D47 = 0x5360
+0x7D48 = 0x5361
+0x7D4D = 0x5362
+0x7D51 = 0x5363
+0x7D53 = 0x5364
+0x7D57 = 0x5365
+0x7D59 = 0x5366
+0x7D5A = 0x5367
+0x7D5C = 0x5368
+0x7D5D = 0x5369
+0x7D65 = 0x536A
+0x7D67 = 0x536B
+0x7D6A = 0x536C
+0x7D70 = 0x536D
+0x7D78 = 0x536E
+0x7D7A = 0x536F
+0x7D7B = 0x5370
+0x7D7F = 0x5371
+0x7D81 = 0x5372
+0x7D82 = 0x5373
+0x7D83 = 0x5374
+0x7D85 = 0x5375
+0x7D86 = 0x5376
+0x7D88 = 0x5377
+0x7D8B = 0x5378
+0x7D8C = 0x5379
+0x7D8D = 0x537A
+0x7D91 = 0x537B
+0x7D96 = 0x537C
+0x7D97 = 0x537D
+0x7D9D = 0x537E
+0x7D9E = 0x5421
+0x7DA6 = 0x5422
+0x7DA7 = 0x5423
+0x7DAA = 0x5424
+0x7DB3 = 0x5425
+0x7DB6 = 0x5426
+0x7DB7 = 0x5427
+0x7DB9 = 0x5428
+0x7DC2 = 0x5429
+0x7DC3 = 0x542A
+0x7DC4 = 0x542B
+0x7DC5 = 0x542C
+0x7DC6 = 0x542D
+0x7DCC = 0x542E
+0x7DCD = 0x542F
+0x7DCE = 0x5430
+0x7DD7 = 0x5431
+0x7DD9 = 0x5432
+0x7DE2 = 0x5434
+0x7DE5 = 0x5435
+0x7DE6 = 0x5436
+0x7DEA = 0x5437
+0x7DEB = 0x5438
+0x7DED = 0x5439
+0x7DF1 = 0x543A
+0x7DF5 = 0x543B
+0x7DF6 = 0x543C
+0x7DF9 = 0x543D
+0x7DFA = 0x543E
+0x7E00 = 0x5433
+0x7E08 = 0x543F
+0x7E10 = 0x5440
+0x7E11 = 0x5441
+0x7E15 = 0x5442
+0x7E17 = 0x5443
+0x7E1C = 0x5444
+0x7E1D = 0x5445
+0x7E20 = 0x5446
+0x7E27 = 0x5447
+0x7E28 = 0x5448
+0x7E2C = 0x5449
+0x7E2D = 0x544A
+0x7E2F = 0x544B
+0x7E33 = 0x544C
+0x7E36 = 0x544D
+0x7E3F = 0x544E
+0x7E44 = 0x544F
+0x7E45 = 0x5450
+0x7E47 = 0x5451
+0x7E4E = 0x5452
+0x7E50 = 0x5453
+0x7E52 = 0x5454
+0x7E58 = 0x5455
+0x7E5F = 0x5456
+0x7E61 = 0x5457
+0x7E62 = 0x5458
+0x7E65 = 0x5459
+0x7E6B = 0x545A
+0x7E6E = 0x545B
+0x7E6F = 0x545C
+0x7E73 = 0x545D
+0x7E78 = 0x545E
+0x7E7E = 0x545F
+0x7E81 = 0x5460
+0x7E86 = 0x5461
+0x7E87 = 0x5462
+0x7E8A = 0x5463
+0x7E8D = 0x5464
+0x7E91 = 0x5465
+0x7E95 = 0x5466
+0x7E98 = 0x5467
+0x7E9A = 0x5468
+0x7E9D = 0x5469
+0x7E9E = 0x546A
+0x7F3B = 0x546C
+0x7F3C = 0x546B
+0x7F3D = 0x546D
+0x7F3E = 0x546E
+0x7F3F = 0x546F
+0x7F43 = 0x5470
+0x7F44 = 0x5471
+0x7F47 = 0x5472
+0x7F4F = 0x5473
+0x7F52 = 0x5474
+0x7F53 = 0x5475
+0x7F5B = 0x5476
+0x7F5C = 0x5477
+0x7F5D = 0x5478
+0x7F61 = 0x5479
+0x7F63 = 0x547A
+0x7F64 = 0x547B
+0x7F65 = 0x547C
+0x7F66 = 0x547D
+0x7F6D = 0x547E
+0x7F71 = 0x5521
+0x7F7D = 0x5522
+0x7F7E = 0x5523
+0x7F7F = 0x5524
+0x7F80 = 0x5525
+0x7F8B = 0x5526
+0x7F8D = 0x5527
+0x7F8F = 0x5528
+0x7F90 = 0x5529
+0x7F91 = 0x552A
+0x7F96 = 0x552B
+0x7F97 = 0x552C
+0x7F9C = 0x552D
+0x7FA1 = 0x552E
+0x7FA2 = 0x552F
+0x7FA6 = 0x5530
+0x7FAA = 0x5531
+0x7FAD = 0x5532
+0x7FB4 = 0x5533
+0x7FBC = 0x5534
+0x7FBF = 0x5535
+0x7FC0 = 0x5536
+0x7FC3 = 0x5537
+0x7FC8 = 0x5538
+0x7FCE = 0x5539
+0x7FCF = 0x553A
+0x7FDB = 0x553B
+0x7FDF = 0x553C
+0x7FE3 = 0x553D
+0x7FE5 = 0x553E
+0x7FE8 = 0x553F
+0x7FEC = 0x5540
+0x7FEE = 0x5541
+0x7FEF = 0x5542
+0x7FF2 = 0x5543
+0x7FFA = 0x5544
+0x7FFD = 0x5545
+0x7FFE = 0x5546
+0x7FFF = 0x5547
+0x8007 = 0x5548
+0x8008 = 0x5549
+0x800A = 0x554A
+0x800D = 0x554B
+0x800E = 0x554C
+0x800F = 0x554D
+0x8011 = 0x554E
+0x8013 = 0x554F
+0x8014 = 0x5550
+0x8016 = 0x5551
+0x801D = 0x5552
+0x801E = 0x5553
+0x801F = 0x5554
+0x8020 = 0x5555
+0x8024 = 0x5556
+0x8026 = 0x5557
+0x802C = 0x5558
+0x802E = 0x5559
+0x8030 = 0x555A
+0x8034 = 0x555B
+0x8035 = 0x555C
+0x8037 = 0x555D
+0x8039 = 0x555E
+0x803A = 0x555F
+0x803C = 0x5560
+0x803E = 0x5561
+0x8040 = 0x5562
+0x8044 = 0x5563
+0x8060 = 0x5564
+0x8064 = 0x5565
+0x8066 = 0x5566
+0x806D = 0x5567
+0x8071 = 0x5568
+0x8075 = 0x5569
+0x8081 = 0x556A
+0x8088 = 0x556B
+0x808E = 0x556C
+0x809C = 0x556D
+0x809E = 0x556E
+0x80A6 = 0x556F
+0x80A7 = 0x5570
+0x80AB = 0x5571
+0x80B8 = 0x5572
+0x80B9 = 0x5573
+0x80C8 = 0x5574
+0x80CD = 0x5575
+0x80CF = 0x5576
+0x80D2 = 0x5577
+0x80D4 = 0x5578
+0x80D5 = 0x5579
+0x80D7 = 0x557A
+0x80D8 = 0x557B
+0x80E0 = 0x557C
+0x80ED = 0x557D
+0x80EE = 0x557E
+0x80F0 = 0x5621
+0x80F2 = 0x5622
+0x80F3 = 0x5623
+0x80F6 = 0x5624
+0x80F9 = 0x5625
+0x80FA = 0x5626
+0x80FE = 0x5627
+0x8103 = 0x5628
+0x810B = 0x5629
+0x8116 = 0x562A
+0x8117 = 0x562B
+0x8118 = 0x562C
+0x811C = 0x562D
+0x811E = 0x562E
+0x8120 = 0x562F
+0x8124 = 0x5630
+0x8127 = 0x5631
+0x812C = 0x5632
+0x8130 = 0x5633
+0x8135 = 0x5634
+0x813A = 0x5635
+0x813C = 0x5636
+0x8145 = 0x5637
+0x8147 = 0x5638
+0x814A = 0x5639
+0x814C = 0x563A
+0x8152 = 0x563B
+0x8157 = 0x563C
+0x8160 = 0x563D
+0x8161 = 0x563E
+0x8167 = 0x563F
+0x8168 = 0x5640
+0x8169 = 0x5641
+0x816D = 0x5642
+0x816F = 0x5643
+0x8177 = 0x5644
+0x8181 = 0x5645
+0x8184 = 0x5647
+0x8185 = 0x5648
+0x8186 = 0x5649
+0x818B = 0x564A
+0x818E = 0x564B
+0x8190 = 0x5646
+0x8196 = 0x564C
+0x8198 = 0x564D
+0x819B = 0x564E
+0x819E = 0x564F
+0x81A2 = 0x5650
+0x81AE = 0x5651
+0x81B2 = 0x5652
+0x81B4 = 0x5653
+0x81BB = 0x5654
+0x81C3 = 0x5656
+0x81C5 = 0x5657
+0x81CA = 0x5658
+0x81CB = 0x5655
+0x81CE = 0x5659
+0x81CF = 0x565A
+0x81D5 = 0x565B
+0x81D7 = 0x565C
+0x81DB = 0x565D
+0x81DD = 0x565E
+0x81DE = 0x565F
+0x81E1 = 0x5660
+0x81E4 = 0x5661
+0x81EB = 0x5662
+0x81EC = 0x5663
+0x81F0 = 0x5664
+0x81F1 = 0x5665
+0x81F2 = 0x5666
+0x81F5 = 0x5667
+0x81F6 = 0x5668
+0x81F8 = 0x5669
+0x81F9 = 0x566A
+0x81FD = 0x566B
+0x81FF = 0x566C
+0x8200 = 0x566D
+0x8203 = 0x566E
+0x820F = 0x566F
+0x8213 = 0x5670
+0x8214 = 0x5671
+0x8219 = 0x5672
+0x821A = 0x5673
+0x821D = 0x5674
+0x8221 = 0x5675
+0x8222 = 0x5676
+0x8228 = 0x5677
+0x8232 = 0x5678
+0x8234 = 0x5679
+0x823A = 0x567A
+0x8243 = 0x567B
+0x8244 = 0x567C
+0x8245 = 0x567D
+0x8246 = 0x567E
+0x824B = 0x5721
+0x824E = 0x5722
+0x824F = 0x5723
+0x8251 = 0x5724
+0x8256 = 0x5725
+0x825C = 0x5726
+0x8260 = 0x5727
+0x8263 = 0x5728
+0x8267 = 0x5729
+0x826D = 0x572A
+0x8274 = 0x572B
+0x827B = 0x572C
+0x827D = 0x572D
+0x827F = 0x572E
+0x8280 = 0x572F
+0x8281 = 0x5730
+0x8283 = 0x5731
+0x8284 = 0x5732
+0x8287 = 0x5733
+0x8289 = 0x5734
+0x828A = 0x5735
+0x828E = 0x5736
+0x8291 = 0x5737
+0x8294 = 0x5738
+0x8296 = 0x5739
+0x8298 = 0x573A
+0x829A = 0x573B
+0x829B = 0x573C
+0x82A0 = 0x573D
+0x82A1 = 0x573E
+0x82A3 = 0x573F
+0x82A4 = 0x5740
+0x82A7 = 0x5741
+0x82A8 = 0x5742
+0x82A9 = 0x5743
+0x82AA = 0x5744
+0x82AE = 0x5745
+0x82B0 = 0x5746
+0x82B2 = 0x5747
+0x82B4 = 0x5748
+0x82B7 = 0x5749
+0x82BA = 0x574A
+0x82BC = 0x574B
+0x82BE = 0x574C
+0x82BF = 0x574D
+0x82C6 = 0x574E
+0x82D0 = 0x574F
+0x82D5 = 0x5750
+0x82DA = 0x5751
+0x82E0 = 0x5752
+0x82E2 = 0x5753
+0x82E4 = 0x5754
+0x82E8 = 0x5755
+0x82EA = 0x5756
+0x82ED = 0x5757
+0x82EF = 0x5758
+0x82F6 = 0x5759
+0x82F7 = 0x575A
+0x82FD = 0x575B
+0x82FE = 0x575C
+0x8300 = 0x575D
+0x8301 = 0x575E
+0x8307 = 0x575F
+0x8308 = 0x5760
+0x830A = 0x5761
+0x830B = 0x5762
+0x831B = 0x5764
+0x831D = 0x5765
+0x831E = 0x5766
+0x831F = 0x5767
+0x8321 = 0x5768
+0x8322 = 0x5769
+0x832C = 0x576A
+0x832D = 0x576B
+0x832E = 0x576C
+0x8330 = 0x576D
+0x8333 = 0x576E
+0x8337 = 0x576F
+0x833A = 0x5770
+0x833C = 0x5771
+0x833D = 0x5772
+0x8342 = 0x5773
+0x8343 = 0x5774
+0x8344 = 0x5775
+0x8347 = 0x5776
+0x834D = 0x5777
+0x834E = 0x5778
+0x8351 = 0x5779
+0x8353 = 0x583E
+0x8354 = 0x5763
+0x8355 = 0x577A
+0x8356 = 0x577B
+0x8357 = 0x577C
+0x8370 = 0x577D
+0x8378 = 0x577E
+0x837D = 0x5821
+0x837F = 0x5822
+0x8380 = 0x5823
+0x8382 = 0x5824
+0x8384 = 0x5825
+0x8386 = 0x5826
+0x838D = 0x5827
+0x8392 = 0x5828
+0x8394 = 0x5829
+0x8395 = 0x582A
+0x8398 = 0x582B
+0x8399 = 0x582C
+0x839B = 0x582D
+0x839C = 0x582E
+0x839D = 0x582F
+0x83A6 = 0x5830
+0x83A7 = 0x5831
+0x83A9 = 0x5832
+0x83AC = 0x5833
+0x83AD = 0x584C
+0x83BE = 0x5834
+0x83BF = 0x5835
+0x83C0 = 0x5836
+0x83C7 = 0x5837
+0x83C9 = 0x5838
+0x83CF = 0x5839
+0x83D0 = 0x583A
+0x83D1 = 0x583B
+0x83D4 = 0x583C
+0x83DD = 0x583D
+0x83E8 = 0x583F
+0x83EA = 0x5840
+0x83F6 = 0x5841
+0x83F8 = 0x5842
+0x83F9 = 0x5843
+0x83FC = 0x5844
+0x8401 = 0x5845
+0x8406 = 0x5846
+0x840A = 0x5847
+0x840F = 0x5848
+0x8411 = 0x5849
+0x8415 = 0x584A
+0x8419 = 0x584B
+0x842F = 0x584D
+0x8439 = 0x584E
+0x8445 = 0x584F
+0x8447 = 0x5850
+0x8448 = 0x5851
+0x844A = 0x5852
+0x844D = 0x5853
+0x844F = 0x5854
+0x8451 = 0x5855
+0x8452 = 0x5856
+0x8456 = 0x5857
+0x8458 = 0x5858
+0x8459 = 0x5859
+0x845A = 0x585A
+0x845C = 0x585B
+0x8460 = 0x585C
+0x8464 = 0x585D
+0x8465 = 0x585E
+0x8467 = 0x585F
+0x846A = 0x5860
+0x8470 = 0x5861
+0x8473 = 0x5862
+0x8474 = 0x5863
+0x8476 = 0x5864
+0x8478 = 0x5865
+0x847C = 0x5866
+0x847D = 0x5867
+0x8481 = 0x5868
+0x8485 = 0x5869
+0x8492 = 0x586A
+0x8493 = 0x586B
+0x8495 = 0x586C
+0x849E = 0x586D
+0x84A6 = 0x586E
+0x84A8 = 0x586F
+0x84A9 = 0x5870
+0x84AA = 0x5871
+0x84AF = 0x5872
+0x84B1 = 0x5873
+0x84B4 = 0x5874
+0x84BA = 0x5875
+0x84BD = 0x5876
+0x84BE = 0x5877
+0x84C0 = 0x5878
+0x84C2 = 0x5879
+0x84C7 = 0x587A
+0x84C8 = 0x587B
+0x84CC = 0x587C
+0x84CF = 0x587D
+0x84D3 = 0x587E
+0x84DC = 0x5921
+0x84E7 = 0x5922
+0x84EA = 0x5923
+0x84EF = 0x5924
+0x84F0 = 0x5925
+0x84F1 = 0x5926
+0x84F2 = 0x5927
+0x84F7 = 0x5928
+0x84FA = 0x592A
+0x84FB = 0x592B
+0x84FD = 0x592C
+0x8502 = 0x592D
+0x8503 = 0x592E
+0x8507 = 0x592F
+0x850C = 0x5930
+0x850E = 0x5931
+0x8510 = 0x5932
+0x851C = 0x5933
+0x851E = 0x5934
+0x8522 = 0x5935
+0x8523 = 0x5936
+0x8524 = 0x5937
+0x8525 = 0x5938
+0x8527 = 0x5939
+0x852A = 0x593A
+0x852B = 0x593B
+0x852F = 0x593C
+0x8532 = 0x5929
+0x8533 = 0x593D
+0x8534 = 0x593E
+0x8536 = 0x593F
+0x853F = 0x5940
+0x8546 = 0x5941
+0x854F = 0x5942
+0x8550 = 0x5943
+0x8551 = 0x5944
+0x8552 = 0x5945
+0x8553 = 0x5946
+0x8556 = 0x5947
+0x8559 = 0x5948
+0x855C = 0x5949
+0x855D = 0x594A
+0x855E = 0x594B
+0x855F = 0x594C
+0x8560 = 0x594D
+0x8561 = 0x594E
+0x8562 = 0x594F
+0x8564 = 0x5950
+0x856B = 0x5951
+0x856F = 0x5952
+0x8579 = 0x5953
+0x857A = 0x5954
+0x857B = 0x5955
+0x857D = 0x5956
+0x857F = 0x5957
+0x8581 = 0x5958
+0x8585 = 0x5959
+0x8586 = 0x595A
+0x8589 = 0x595B
+0x858B = 0x595C
+0x858C = 0x595D
+0x858F = 0x595E
+0x8593 = 0x595F
+0x8598 = 0x5960
+0x859D = 0x5961
+0x859F = 0x5962
+0x85A0 = 0x5963
+0x85A2 = 0x5964
+0x85A5 = 0x5965
+0x85A7 = 0x5966
+0x85AD = 0x5974
+0x85B4 = 0x5967
+0x85B6 = 0x5968
+0x85B7 = 0x5969
+0x85B8 = 0x596A
+0x85BC = 0x596B
+0x85BD = 0x596C
+0x85BE = 0x596D
+0x85BF = 0x596E
+0x85C2 = 0x596F
+0x85C7 = 0x5970
+0x85CA = 0x5971
+0x85CB = 0x5972
+0x85CE = 0x5973
+0x85D8 = 0x5975
+0x85DA = 0x5976
+0x85DF = 0x5977
+0x85E0 = 0x5978
+0x85E6 = 0x5979
+0x85E8 = 0x597A
+0x85ED = 0x597B
+0x85F3 = 0x597C
+0x85F6 = 0x597D
+0x85FC = 0x597E
+0x85FF = 0x5A21
+0x8600 = 0x5A22
+0x8604 = 0x5A23
+0x8605 = 0x5A24
+0x860D = 0x5A25
+0x860E = 0x5A26
+0x8610 = 0x5A27
+0x8611 = 0x5A28
+0x8612 = 0x5A29
+0x8618 = 0x5A2A
+0x8619 = 0x5A2B
+0x861B = 0x5A2C
+0x861E = 0x5A2D
+0x8621 = 0x5A2E
+0x8627 = 0x5A2F
+0x8629 = 0x5A30
+0x8636 = 0x5A31
+0x8638 = 0x5A32
+0x863A = 0x5A33
+0x863C = 0x5A34
+0x863D = 0x5A35
+0x8640 = 0x5A36
+0x8641 = 0x3866
+0x8642 = 0x5A37
+0x8646 = 0x5A38
+0x8652 = 0x5A39
+0x8653 = 0x5A3A
+0x8656 = 0x5A3B
+0x8657 = 0x5A3C
+0x8658 = 0x5A3D
+0x8659 = 0x5A3E
+0x865D = 0x5A3F
+0x8660 = 0x5A40
+0x8661 = 0x5A41
+0x8662 = 0x5A42
+0x8663 = 0x5A43
+0x8664 = 0x5A44
+0x8669 = 0x5A45
+0x866C = 0x5A46
+0x866F = 0x5A47
+0x8675 = 0x5A48
+0x8676 = 0x5A49
+0x8677 = 0x5A4A
+0x867A = 0x5A4B
+0x8688 = 0x5A6D
+0x868D = 0x5A4C
+0x8691 = 0x5A4D
+0x8696 = 0x5A4E
+0x8698 = 0x5A4F
+0x869A = 0x5A50
+0x869C = 0x5A51
+0x86A1 = 0x5A52
+0x86A6 = 0x5A53
+0x86A7 = 0x5A54
+0x86A8 = 0x5A55
+0x86AD = 0x5A56
+0x86B1 = 0x5A57
+0x86B3 = 0x5A58
+0x86B4 = 0x5A59
+0x86B5 = 0x5A5A
+0x86B7 = 0x5A5B
+0x86B8 = 0x5A5C
+0x86B9 = 0x5A5D
+0x86BF = 0x5A5E
+0x86C0 = 0x5A5F
+0x86C1 = 0x5A60
+0x86C3 = 0x5A61
+0x86C5 = 0x5A62
+0x86D1 = 0x5A63
+0x86D2 = 0x5A64
+0x86D5 = 0x5A65
+0x86D7 = 0x5A66
+0x86DA = 0x5A67
+0x86DC = 0x5A68
+0x86E0 = 0x5A69
+0x86E3 = 0x5A6A
+0x86E5 = 0x5A6B
+0x86E7 = 0x5A6C
+0x86FA = 0x5A6E
+0x86FC = 0x5A6F
+0x86FD = 0x5A70
+0x8704 = 0x5A71
+0x8705 = 0x5A72
+0x8707 = 0x5A73
+0x870B = 0x5A74
+0x870E = 0x5A75
+0x870F = 0x5A76
+0x8710 = 0x5A77
+0x8713 = 0x5A78
+0x8714 = 0x5A79
+0x8719 = 0x5A7A
+0x871E = 0x5A7B
+0x871F = 0x5A7C
+0x8721 = 0x5A7D
+0x8723 = 0x5A7E
+0x8728 = 0x5B21
+0x872E = 0x5B22
+0x872F = 0x5B23
+0x8731 = 0x5B24
+0x8732 = 0x5B25
+0x8739 = 0x5B26
+0x873A = 0x5B27
+0x873C = 0x5B28
+0x873D = 0x5B29
+0x873E = 0x5B2A
+0x8740 = 0x5B2B
+0x8743 = 0x5B2C
+0x8745 = 0x5B2D
+0x874D = 0x5B2E
+0x8758 = 0x5B2F
+0x875D = 0x5B30
+0x8761 = 0x5B31
+0x8764 = 0x5B32
+0x8765 = 0x5B33
+0x876F = 0x5B34
+0x8771 = 0x5B35
+0x8772 = 0x5B36
+0x877B = 0x5B37
+0x8783 = 0x5B38
+0x8784 = 0x5B39
+0x8785 = 0x5B3A
+0x8786 = 0x5B3B
+0x8787 = 0x5B3C
+0x8788 = 0x5B3D
+0x8789 = 0x5B3E
+0x878B = 0x5B3F
+0x878C = 0x5B40
+0x8790 = 0x5B41
+0x8793 = 0x5B42
+0x8795 = 0x5B43
+0x8797 = 0x5B44
+0x8798 = 0x5B45
+0x8799 = 0x5B46
+0x879E = 0x5B47
+0x87A0 = 0x5B48
+0x87A3 = 0x5B49
+0x87A7 = 0x5B4A
+0x87AC = 0x5B4B
+0x87AD = 0x5B4C
+0x87AE = 0x5B4D
+0x87B1 = 0x5B4E
+0x87B5 = 0x5B4F
+0x87BE = 0x5B50
+0x87BF = 0x5B51
+0x87C1 = 0x5B52
+0x87C8 = 0x5B53
+0x87C9 = 0x5B54
+0x87CA = 0x5B55
+0x87CE = 0x5B56
+0x87D5 = 0x5B57
+0x87D6 = 0x5B58
+0x87D9 = 0x5B59
+0x87DA = 0x5B5A
+0x87DC = 0x5B5B
+0x87DF = 0x5B5C
+0x87E2 = 0x5B5D
+0x87E3 = 0x5B5E
+0x87E4 = 0x5B5F
+0x87EA = 0x5B60
+0x87EB = 0x5B61
+0x87ED = 0x5B62
+0x87F1 = 0x5B63
+0x87F3 = 0x5B64
+0x87F8 = 0x5B65
+0x87FA = 0x5B66
+0x87FF = 0x5B67
+0x8801 = 0x5B68
+0x8803 = 0x5B69
+0x8806 = 0x5B6A
+0x8809 = 0x5B6B
+0x880A = 0x5B6C
+0x880B = 0x5B6D
+0x8810 = 0x5B6E
+0x8812 = 0x5B70
+0x8813 = 0x5B71
+0x8814 = 0x5B72
+0x8818 = 0x5B73
+0x8819 = 0x5B6F
+0x881A = 0x5B74
+0x881B = 0x5B75
+0x881C = 0x5B76
+0x881E = 0x5B77
+0x881F = 0x5B78
+0x8828 = 0x5B79
+0x882D = 0x5B7A
+0x882E = 0x5B7B
+0x8830 = 0x5B7C
+0x8832 = 0x5B7D
+0x8835 = 0x5B7E
+0x883A = 0x5C21
+0x883C = 0x5C22
+0x8841 = 0x5C23
+0x8843 = 0x5C24
+0x8845 = 0x5C25
+0x8848 = 0x5C26
+0x8849 = 0x5C27
+0x884A = 0x5C28
+0x884B = 0x5C29
+0x884E = 0x5C2A
+0x8851 = 0x5C2B
+0x8855 = 0x5C2C
+0x8856 = 0x5C2D
+0x8858 = 0x5C2E
+0x885A = 0x5C2F
+0x885C = 0x5C30
+0x885F = 0x5C31
+0x8860 = 0x5C32
+0x8864 = 0x5C33
+0x8869 = 0x5C34
+0x8871 = 0x5C35
+0x8879 = 0x5C36
+0x887B = 0x5C37
+0x8880 = 0x5C38
+0x8898 = 0x5C39
+0x889A = 0x5C3A
+0x889B = 0x5C3B
+0x889C = 0x5C3C
+0x889F = 0x5C3D
+0x88A0 = 0x5C3E
+0x88A8 = 0x5C3F
+0x88AA = 0x5C40
+0x88BA = 0x5C41
+0x88BD = 0x5C42
+0x88BE = 0x5C43
+0x88C0 = 0x5C44
+0x88CA = 0x5C45
+0x88CB = 0x5C46
+0x88CC = 0x5C47
+0x88CD = 0x5C48
+0x88CE = 0x5C49
+0x88D1 = 0x5C4A
+0x88D2 = 0x5C4B
+0x88D3 = 0x5C4C
+0x88DB = 0x5C4D
+0x88DE = 0x5C4E
+0x88E7 = 0x5C4F
+0x88EF = 0x5C50
+0x88F0 = 0x5C51
+0x88F1 = 0x5C52
+0x88F5 = 0x5C53
+0x88F7 = 0x5C54
+0x8901 = 0x5C55
+0x8906 = 0x5C56
+0x890D = 0x5C57
+0x890E = 0x5C58
+0x890F = 0x5C59
+0x8915 = 0x5C5A
+0x8916 = 0x5C5B
+0x8918 = 0x5C5C
+0x8919 = 0x5C5D
+0x891A = 0x5C5E
+0x891C = 0x5C5F
+0x8920 = 0x5C60
+0x8926 = 0x5C61
+0x8927 = 0x5C62
+0x8928 = 0x5C63
+0x8930 = 0x5C64
+0x8931 = 0x5C65
+0x8932 = 0x5C66
+0x8935 = 0x5C67
+0x8939 = 0x5C68
+0x893A = 0x5C69
+0x893E = 0x5C6A
+0x8940 = 0x5C6B
+0x8942 = 0x5C6C
+0x8945 = 0x5C6D
+0x8946 = 0x5C6E
+0x8949 = 0x5C6F
+0x894F = 0x5C70
+0x8952 = 0x5C71
+0x8957 = 0x5C72
+0x895A = 0x5C73
+0x895B = 0x5C74
+0x895C = 0x5C75
+0x8961 = 0x5C76
+0x8962 = 0x5C77
+0x8963 = 0x5C78
+0x896B = 0x5C79
+0x896E = 0x5C7A
+0x8970 = 0x5C7B
+0x8973 = 0x5C7C
+0x8975 = 0x5C7D
+0x897A = 0x5C7E
+0x897B = 0x5D21
+0x897C = 0x5D22
+0x897D = 0x5D23
+0x8989 = 0x5D24
+0x898D = 0x5D25
+0x8990 = 0x5D26
+0x8994 = 0x5D27
+0x8995 = 0x5D28
+0x899B = 0x5D29
+0x899C = 0x5D2A
+0x899F = 0x5D2B
+0x89A0 = 0x5D2C
+0x89A5 = 0x5D2D
+0x89B0 = 0x5D2E
+0x89B4 = 0x5D2F
+0x89B5 = 0x5D30
+0x89B6 = 0x5D31
+0x89B7 = 0x5D32
+0x89BC = 0x5D33
+0x89D4 = 0x5D34
+0x89D5 = 0x5D35
+0x89D6 = 0x5D36
+0x89D7 = 0x5D37
+0x89D8 = 0x5D38
+0x89E5 = 0x5D39
+0x89E9 = 0x5D3A
+0x89EB = 0x5D3B
+0x89ED = 0x5D3C
+0x89F1 = 0x5D3D
+0x89F3 = 0x5D3E
+0x89F6 = 0x5D3F
+0x89F9 = 0x5D40
+0x89FD = 0x5D41
+0x89FF = 0x5D42
+0x8A04 = 0x5D43
+0x8A05 = 0x5D44
+0x8A07 = 0x5D45
+0x8A0F = 0x5D46
+0x8A11 = 0x5D47
+0x8A12 = 0x5D48
+0x8A14 = 0x5D49
+0x8A15 = 0x5D4A
+0x8A1E = 0x5D4B
+0x8A20 = 0x5D4C
+0x8A22 = 0x5D4D
+0x8A24 = 0x5D4E
+0x8A26 = 0x5D4F
+0x8A2B = 0x5D50
+0x8A2C = 0x5D51
+0x8A2F = 0x5D52
+0x8A35 = 0x5D53
+0x8A37 = 0x5D54
+0x8A3D = 0x5D55
+0x8A3E = 0x5D56
+0x8A40 = 0x5D57
+0x8A43 = 0x5D58
+0x8A45 = 0x5D59
+0x8A47 = 0x5D5A
+0x8A49 = 0x5D5B
+0x8A4D = 0x5D5C
+0x8A4E = 0x5D5D
+0x8A53 = 0x5D5E
+0x8A56 = 0x5D5F
+0x8A57 = 0x5D60
+0x8A58 = 0x5D61
+0x8A5C = 0x5D62
+0x8A5D = 0x5D63
+0x8A61 = 0x5D64
+0x8A65 = 0x5D65
+0x8A67 = 0x5D66
+0x8A75 = 0x5D67
+0x8A76 = 0x5D68
+0x8A77 = 0x5D69
+0x8A79 = 0x5D6A
+0x8A7A = 0x5D6B
+0x8A7B = 0x5D6C
+0x8A7E = 0x5D6D
+0x8A7F = 0x5D6E
+0x8A80 = 0x5D6F
+0x8A83 = 0x5D70
+0x8A86 = 0x5D71
+0x8A8B = 0x5D72
+0x8A8F = 0x5D73
+0x8A90 = 0x5D74
+0x8A92 = 0x5D75
+0x8A96 = 0x5D76
+0x8A97 = 0x5D77
+0x8A99 = 0x5D78
+0x8A9F = 0x5D79
+0x8AA7 = 0x5D7A
+0x8AA9 = 0x5D7B
+0x8AAE = 0x5D7C
+0x8AAF = 0x5D7D
+0x8AB3 = 0x5D7E
+0x8AB6 = 0x5E21
+0x8AB7 = 0x5E22
+0x8ABB = 0x5E23
+0x8ABE = 0x5E24
+0x8AC3 = 0x5E25
+0x8AC6 = 0x5E26
+0x8AC8 = 0x5E27
+0x8AC9 = 0x5E28
+0x8ACA = 0x5E29
+0x8AD1 = 0x5E2A
+0x8AD3 = 0x5E2B
+0x8AD4 = 0x5E2C
+0x8AD5 = 0x5E2D
+0x8AD7 = 0x5E2E
+0x8ADD = 0x5E2F
+0x8ADF = 0x5E30
+0x8AEC = 0x5E31
+0x8AF0 = 0x5E32
+0x8AF4 = 0x5E33
+0x8AF5 = 0x5E34
+0x8AF6 = 0x5E35
+0x8AFC = 0x5E36
+0x8AFF = 0x5E37
+0x8B05 = 0x5E38
+0x8B06 = 0x5E39
+0x8B0A = 0x5E3F
+0x8B0B = 0x5E3A
+0x8B11 = 0x5E3B
+0x8B1C = 0x5E3C
+0x8B1E = 0x5E3D
+0x8B1F = 0x5E3E
+0x8B2D = 0x5E40
+0x8B30 = 0x5E41
+0x8B37 = 0x5E42
+0x8B3C = 0x5E43
+0x8B42 = 0x5E44
+0x8B43 = 0x5E45
+0x8B44 = 0x5E46
+0x8B45 = 0x5E47
+0x8B46 = 0x5E48
+0x8B48 = 0x5E49
+0x8B4D = 0x5E4E
+0x8B52 = 0x5E4A
+0x8B53 = 0x5E4B
+0x8B54 = 0x5E4C
+0x8B59 = 0x5E4D
+0x8B5E = 0x5E4F
+0x8B63 = 0x5E50
+0x8B6D = 0x5E51
+0x8B76 = 0x5E52
+0x8B78 = 0x5E53
+0x8B79 = 0x5E54
+0x8B7C = 0x5E55
+0x8B7E = 0x5E56
+0x8B81 = 0x5E57
+0x8B84 = 0x5E58
+0x8B85 = 0x5E59
+0x8B8B = 0x5E5A
+0x8B8D = 0x5E5B
+0x8B8F = 0x5E5C
+0x8B94 = 0x5E5D
+0x8B95 = 0x5E5E
+0x8B9C = 0x5E5F
+0x8B9E = 0x5E60
+0x8B9F = 0x5E61
+0x8C38 = 0x5E62
+0x8C39 = 0x5E63
+0x8C3D = 0x5E64
+0x8C3E = 0x5E65
+0x8C45 = 0x5E66
+0x8C47 = 0x5E67
+0x8C49 = 0x5E68
+0x8C4B = 0x5E69
+0x8C4F = 0x5E6A
+0x8C51 = 0x5E6B
+0x8C53 = 0x5E6C
+0x8C54 = 0x5E6D
+0x8C57 = 0x5E6E
+0x8C58 = 0x5E6F
+0x8C59 = 0x5E72
+0x8C5B = 0x5E70
+0x8C5D = 0x5E71
+0x8C63 = 0x5E73
+0x8C64 = 0x5E74
+0x8C66 = 0x5E75
+0x8C68 = 0x5E76
+0x8C69 = 0x5E77
+0x8C6D = 0x5E78
+0x8C73 = 0x5E79
+0x8C75 = 0x5E7A
+0x8C76 = 0x5E7B
+0x8C7B = 0x5E7C
+0x8C7E = 0x5E7D
+0x8C86 = 0x5E7E
+0x8C87 = 0x5F21
+0x8C8B = 0x5F22
+0x8C90 = 0x5F23
+0x8C92 = 0x5F24
+0x8C93 = 0x5F25
+0x8C99 = 0x5F26
+0x8C9B = 0x5F27
+0x8C9C = 0x5F28
+0x8CA4 = 0x5F29
+0x8CB9 = 0x5F2A
+0x8CBA = 0x5F2B
+0x8CC5 = 0x5F2C
+0x8CC6 = 0x5F2D
+0x8CC9 = 0x5F2E
+0x8CCB = 0x5F2F
+0x8CCF = 0x5F30
+0x8CD5 = 0x5F32
+0x8CD6 = 0x5F31
+0x8CD9 = 0x5F33
+0x8CDD = 0x5F34
+0x8CE1 = 0x5F35
+0x8CE8 = 0x5F36
+0x8CEC = 0x5F37
+0x8CEF = 0x5F38
+0x8CF0 = 0x5F39
+0x8CF2 = 0x5F3A
+0x8CF5 = 0x5F3B
+0x8CF7 = 0x5F3C
+0x8CF8 = 0x5F3D
+0x8CFE = 0x5F3E
+0x8CFF = 0x5F3F
+0x8D01 = 0x5F40
+0x8D03 = 0x5F41
+0x8D09 = 0x5F42
+0x8D12 = 0x5F43
+0x8D17 = 0x5F44
+0x8D1B = 0x5F45
+0x8D65 = 0x5F46
+0x8D69 = 0x5F47
+0x8D6C = 0x5F48
+0x8D6E = 0x5F49
+0x8D7F = 0x5F4A
+0x8D82 = 0x5F4B
+0x8D84 = 0x5F4C
+0x8D88 = 0x5F4D
+0x8D8D = 0x5F4E
+0x8D90 = 0x5F4F
+0x8D91 = 0x5F50
+0x8D95 = 0x5F51
+0x8D9E = 0x5F52
+0x8D9F = 0x5F53
+0x8DA0 = 0x5F54
+0x8DA6 = 0x5F55
+0x8DAB = 0x5F56
+0x8DAC = 0x5F57
+0x8DAF = 0x5F58
+0x8DB2 = 0x5F59
+0x8DB5 = 0x5F5A
+0x8DB7 = 0x5F5B
+0x8DB9 = 0x5F5C
+0x8DBB = 0x5F5D
+0x8DBC = 0x5F6F
+0x8DC0 = 0x5F5E
+0x8DC5 = 0x5F5F
+0x8DC6 = 0x5F60
+0x8DC7 = 0x5F61
+0x8DC8 = 0x5F62
+0x8DCA = 0x5F63
+0x8DCE = 0x5F64
+0x8DD1 = 0x5F65
+0x8DD4 = 0x5F66
+0x8DD5 = 0x5F67
+0x8DD7 = 0x5F68
+0x8DD9 = 0x5F69
+0x8DE4 = 0x5F6A
+0x8DE5 = 0x5F6B
+0x8DE7 = 0x5F6C
+0x8DEC = 0x5F6D
+0x8DF0 = 0x5F6E
+0x8DF1 = 0x5F70
+0x8DF2 = 0x5F71
+0x8DF4 = 0x5F72
+0x8DFD = 0x5F73
+0x8E01 = 0x5F74
+0x8E04 = 0x5F75
+0x8E05 = 0x5F76
+0x8E06 = 0x5F77
+0x8E0B = 0x5F78
+0x8E11 = 0x5F79
+0x8E14 = 0x5F7A
+0x8E16 = 0x5F7B
+0x8E20 = 0x5F7C
+0x8E21 = 0x5F7D
+0x8E22 = 0x5F7E
+0x8E23 = 0x6021
+0x8E26 = 0x6022
+0x8E27 = 0x6023
+0x8E31 = 0x6024
+0x8E33 = 0x6025
+0x8E36 = 0x6026
+0x8E37 = 0x6027
+0x8E38 = 0x6028
+0x8E39 = 0x6029
+0x8E3D = 0x602A
+0x8E40 = 0x602B
+0x8E41 = 0x602C
+0x8E4B = 0x602D
+0x8E4D = 0x602E
+0x8E4E = 0x602F
+0x8E4F = 0x6030
+0x8E54 = 0x6031
+0x8E5B = 0x6032
+0x8E5C = 0x6033
+0x8E5D = 0x6034
+0x8E5E = 0x6035
+0x8E61 = 0x6036
+0x8E62 = 0x6037
+0x8E69 = 0x6038
+0x8E6C = 0x6039
+0x8E6D = 0x603A
+0x8E6F = 0x603B
+0x8E70 = 0x603C
+0x8E71 = 0x603D
+0x8E79 = 0x603E
+0x8E7A = 0x603F
+0x8E7B = 0x6040
+0x8E82 = 0x6041
+0x8E83 = 0x6042
+0x8E89 = 0x6043
+0x8E90 = 0x6044
+0x8E92 = 0x6045
+0x8E95 = 0x6046
+0x8E9A = 0x6047
+0x8E9B = 0x6048
+0x8E9D = 0x6049
+0x8E9E = 0x604A
+0x8EA2 = 0x604B
+0x8EA7 = 0x604C
+0x8EA9 = 0x604D
+0x8EAD = 0x604E
+0x8EAE = 0x604F
+0x8EB3 = 0x6050
+0x8EB5 = 0x6051
+0x8EBA = 0x6052
+0x8EBB = 0x6053
+0x8EC0 = 0x6054
+0x8EC1 = 0x6055
+0x8EC3 = 0x6056
+0x8EC4 = 0x6057
+0x8EC7 = 0x6058
+0x8ECF = 0x6059
+0x8ED1 = 0x605A
+0x8ED4 = 0x605B
+0x8EDC = 0x605C
+0x8EE8 = 0x605D
+0x8EED = 0x6064
+0x8EEE = 0x605E
+0x8EF0 = 0x605F
+0x8EF1 = 0x6060
+0x8EF7 = 0x6061
+0x8EF9 = 0x6062
+0x8EFA = 0x6063
+0x8F00 = 0x6065
+0x8F02 = 0x6066
+0x8F07 = 0x6067
+0x8F08 = 0x6068
+0x8F0F = 0x6069
+0x8F10 = 0x606A
+0x8F16 = 0x606B
+0x8F17 = 0x606C
+0x8F18 = 0x606D
+0x8F1E = 0x606E
+0x8F20 = 0x606F
+0x8F21 = 0x6070
+0x8F23 = 0x6071
+0x8F25 = 0x6072
+0x8F27 = 0x6073
+0x8F28 = 0x6074
+0x8F2C = 0x6075
+0x8F2D = 0x6076
+0x8F2E = 0x6077
+0x8F34 = 0x6078
+0x8F35 = 0x6079
+0x8F36 = 0x607A
+0x8F37 = 0x607B
+0x8F3A = 0x607C
+0x8F40 = 0x607D
+0x8F41 = 0x607E
+0x8F43 = 0x6121
+0x8F47 = 0x6122
+0x8F4F = 0x6123
+0x8F51 = 0x6124
+0x8F52 = 0x6125
+0x8F53 = 0x6126
+0x8F54 = 0x6127
+0x8F55 = 0x6128
+0x8F58 = 0x6129
+0x8F5D = 0x612A
+0x8F5E = 0x612B
+0x8F65 = 0x612C
+0x8F9D = 0x612D
+0x8FA0 = 0x612E
+0x8FA1 = 0x612F
+0x8FA4 = 0x6130
+0x8FA5 = 0x6131
+0x8FA6 = 0x6132
+0x8FB5 = 0x6133
+0x8FB6 = 0x6134
+0x8FB8 = 0x6135
+0x8FBE = 0x6136
+0x8FC0 = 0x6137
+0x8FC1 = 0x6138
+0x8FC6 = 0x6139
+0x8FCA = 0x613A
+0x8FCB = 0x613B
+0x8FCD = 0x613C
+0x8FD0 = 0x613D
+0x8FD2 = 0x613E
+0x8FD3 = 0x613F
+0x8FD5 = 0x6140
+0x8FE0 = 0x6141
+0x8FE3 = 0x6142
+0x8FE4 = 0x6143
+0x8FE8 = 0x6144
+0x8FEE = 0x6145
+0x8FF1 = 0x6146
+0x8FF5 = 0x6147
+0x8FF6 = 0x6148
+0x8FFB = 0x6149
+0x8FFE = 0x614A
+0x9002 = 0x614B
+0x9004 = 0x614C
+0x9008 = 0x614D
+0x900C = 0x614E
+0x9018 = 0x614F
+0x901B = 0x6150
+0x9028 = 0x6151
+0x9029 = 0x6152
+0x902A = 0x6154
+0x902C = 0x6155
+0x902D = 0x6156
+0x902F = 0x6153
+0x9033 = 0x6157
+0x9034 = 0x6158
+0x9037 = 0x6159
+0x903F = 0x615A
+0x9043 = 0x615B
+0x9044 = 0x615C
+0x904C = 0x615D
+0x905B = 0x615E
+0x905D = 0x615F
+0x9062 = 0x6160
+0x9066 = 0x6161
+0x9067 = 0x6162
+0x906C = 0x6163
+0x9070 = 0x6164
+0x9074 = 0x6165
+0x9079 = 0x6166
+0x9085 = 0x6167
+0x9088 = 0x6168
+0x908B = 0x6169
+0x908C = 0x616A
+0x908E = 0x616B
+0x9090 = 0x616C
+0x9095 = 0x616D
+0x9097 = 0x616E
+0x9098 = 0x616F
+0x9099 = 0x6170
+0x909B = 0x6171
+0x90A0 = 0x6172
+0x90A1 = 0x6173
+0x90A2 = 0x6174
+0x90A5 = 0x6175
+0x90B0 = 0x6176
+0x90B2 = 0x6177
+0x90B3 = 0x6178
+0x90B4 = 0x6179
+0x90B6 = 0x617A
+0x90BD = 0x617B
+0x90BE = 0x617D
+0x90C3 = 0x617E
+0x90C4 = 0x6221
+0x90C5 = 0x6222
+0x90C7 = 0x6223
+0x90C8 = 0x6224
+0x90CC = 0x617C
+0x90D2 = 0x622D
+0x90D5 = 0x6225
+0x90D7 = 0x6226
+0x90D8 = 0x6227
+0x90D9 = 0x6228
+0x90DC = 0x6229
+0x90DD = 0x622A
+0x90DF = 0x622B
+0x90E5 = 0x622C
+0x90EB = 0x622F
+0x90EF = 0x6230
+0x90F0 = 0x6231
+0x90F4 = 0x6232
+0x90F6 = 0x622E
+0x90FE = 0x6233
+0x90FF = 0x6234
+0x9100 = 0x6235
+0x9104 = 0x6236
+0x9105 = 0x6237
+0x9106 = 0x6238
+0x9108 = 0x6239
+0x910D = 0x623A
+0x9110 = 0x623B
+0x9114 = 0x623C
+0x9116 = 0x623D
+0x9117 = 0x623E
+0x9118 = 0x623F
+0x911A = 0x6240
+0x911C = 0x6241
+0x911E = 0x6242
+0x9120 = 0x6243
+0x9122 = 0x6245
+0x9123 = 0x6246
+0x9125 = 0x6244
+0x9127 = 0x6247
+0x9129 = 0x6248
+0x912E = 0x6249
+0x912F = 0x624A
+0x9131 = 0x624B
+0x9134 = 0x624C
+0x9136 = 0x624D
+0x9137 = 0x624E
+0x9139 = 0x624F
+0x913A = 0x6250
+0x913C = 0x6251
+0x913D = 0x6252
+0x9143 = 0x6253
+0x9147 = 0x6254
+0x9148 = 0x6255
+0x914F = 0x6256
+0x9153 = 0x6257
+0x9157 = 0x6258
+0x9159 = 0x6259
+0x915A = 0x625A
+0x915B = 0x625B
+0x9161 = 0x625C
+0x9164 = 0x625D
+0x9167 = 0x625E
+0x916D = 0x625F
+0x9174 = 0x6260
+0x9179 = 0x6261
+0x917A = 0x6262
+0x917B = 0x6263
+0x9181 = 0x6264
+0x9183 = 0x6265
+0x9185 = 0x6266
+0x9186 = 0x6267
+0x918A = 0x6268
+0x918E = 0x6269
+0x9191 = 0x626A
+0x9193 = 0x626B
+0x9194 = 0x626C
+0x9195 = 0x626D
+0x9198 = 0x626E
+0x919E = 0x626F
+0x91A1 = 0x6270
+0x91A6 = 0x6271
+0x91A8 = 0x6272
+0x91AC = 0x6273
+0x91AD = 0x6274
+0x91AE = 0x6275
+0x91B0 = 0x6276
+0x91B1 = 0x6277
+0x91B2 = 0x6278
+0x91B3 = 0x6279
+0x91B6 = 0x627A
+0x91BB = 0x627B
+0x91BC = 0x627C
+0x91BD = 0x627D
+0x91BF = 0x627E
+0x91C2 = 0x6321
+0x91C3 = 0x6322
+0x91C5 = 0x6323
+0x91D3 = 0x6324
+0x91D4 = 0x6325
+0x91D7 = 0x6326
+0x91D9 = 0x6327
+0x91DA = 0x6328
+0x91DE = 0x6329
+0x91E4 = 0x632A
+0x91E5 = 0x632B
+0x91E9 = 0x632C
+0x91EA = 0x632D
+0x91EC = 0x632E
+0x91ED = 0x632F
+0x91EE = 0x6330
+0x91EF = 0x6331
+0x91F0 = 0x6332
+0x91F1 = 0x6333
+0x91F7 = 0x6334
+0x91F9 = 0x6335
+0x91FB = 0x6336
+0x91FD = 0x6337
+0x9200 = 0x6338
+0x9201 = 0x6339
+0x9204 = 0x633A
+0x9205 = 0x633B
+0x9206 = 0x633C
+0x9207 = 0x633D
+0x9209 = 0x633E
+0x920A = 0x633F
+0x920C = 0x6340
+0x9210 = 0x6341
+0x9212 = 0x6342
+0x9213 = 0x6343
+0x9216 = 0x6344
+0x9218 = 0x6345
+0x921C = 0x6346
+0x921D = 0x6347
+0x9223 = 0x6348
+0x9224 = 0x6349
+0x9225 = 0x634A
+0x9226 = 0x634B
+0x9228 = 0x634C
+0x922E = 0x634D
+0x922F = 0x634E
+0x9230 = 0x634F
+0x9233 = 0x6350
+0x9235 = 0x6351
+0x9236 = 0x6352
+0x9238 = 0x6353
+0x9239 = 0x6354
+0x923A = 0x6355
+0x923C = 0x6356
+0x923E = 0x6357
+0x9240 = 0x6358
+0x9242 = 0x6359
+0x9243 = 0x635A
+0x9246 = 0x635B
+0x9247 = 0x635C
+0x924A = 0x635D
+0x924D = 0x635E
+0x924E = 0x635F
+0x924F = 0x6360
+0x9251 = 0x6361
+0x9258 = 0x6362
+0x9259 = 0x6363
+0x925C = 0x6364
+0x925D = 0x6365
+0x9260 = 0x6366
+0x9261 = 0x6367
+0x9265 = 0x6368
+0x9267 = 0x6369
+0x9268 = 0x636A
+0x9269 = 0x636B
+0x926E = 0x636C
+0x926F = 0x636D
+0x9270 = 0x636E
+0x9275 = 0x636F
+0x9276 = 0x6370
+0x9277 = 0x6371
+0x9278 = 0x6372
+0x9279 = 0x6373
+0x927B = 0x6374
+0x927C = 0x6375
+0x927D = 0x6376
+0x927F = 0x6377
+0x9288 = 0x6378
+0x9289 = 0x6379
+0x928A = 0x637A
+0x928D = 0x637B
+0x928E = 0x637C
+0x9292 = 0x637D
+0x9297 = 0x637E
+0x9299 = 0x6421
+0x929F = 0x6422
+0x92A0 = 0x6423
+0x92A4 = 0x6424
+0x92A5 = 0x6425
+0x92A7 = 0x6426
+0x92A8 = 0x6427
+0x92AB = 0x6428
+0x92AF = 0x6429
+0x92B2 = 0x642A
+0x92B6 = 0x642B
+0x92B8 = 0x642C
+0x92BA = 0x642D
+0x92BB = 0x642E
+0x92BC = 0x642F
+0x92BD = 0x6430
+0x92BF = 0x6431
+0x92C0 = 0x6432
+0x92C1 = 0x6433
+0x92C2 = 0x6434
+0x92C3 = 0x6435
+0x92C5 = 0x6436
+0x92C6 = 0x6437
+0x92C7 = 0x6438
+0x92C8 = 0x6439
+0x92CB = 0x643A
+0x92CC = 0x643B
+0x92CD = 0x643C
+0x92CE = 0x643D
+0x92D0 = 0x643E
+0x92D3 = 0x643F
+0x92D5 = 0x6440
+0x92D7 = 0x6441
+0x92D8 = 0x6442
+0x92D9 = 0x6443
+0x92DC = 0x6444
+0x92DD = 0x6445
+0x92DF = 0x6446
+0x92E0 = 0x6447
+0x92E1 = 0x6448
+0x92E3 = 0x6449
+0x92E5 = 0x644A
+0x92E7 = 0x644B
+0x92E8 = 0x644C
+0x92EC = 0x644D
+0x92EE = 0x644E
+0x92F0 = 0x644F
+0x92F9 = 0x6450
+0x92FB = 0x6451
+0x92FF = 0x6452
+0x9300 = 0x6453
+0x9302 = 0x6454
+0x9308 = 0x6455
+0x930D = 0x6456
+0x9311 = 0x6457
+0x9314 = 0x6458
+0x9315 = 0x6459
+0x931C = 0x645A
+0x931D = 0x645B
+0x931E = 0x645C
+0x931F = 0x645D
+0x9321 = 0x645E
+0x9324 = 0x645F
+0x9325 = 0x6460
+0x9327 = 0x6461
+0x9329 = 0x6462
+0x932A = 0x6463
+0x9333 = 0x6464
+0x9334 = 0x6465
+0x9336 = 0x6466
+0x9337 = 0x6467
+0x9347 = 0x6468
+0x9348 = 0x6469
+0x9349 = 0x646A
+0x9350 = 0x646B
+0x9351 = 0x646C
+0x9352 = 0x646D
+0x9355 = 0x646E
+0x9357 = 0x646F
+0x9358 = 0x6470
+0x935A = 0x6471
+0x935E = 0x6472
+0x9364 = 0x6473
+0x9365 = 0x6474
+0x9367 = 0x6475
+0x9369 = 0x6476
+0x936A = 0x6477
+0x936D = 0x6478
+0x936F = 0x6479
+0x9370 = 0x647A
+0x9371 = 0x647B
+0x9373 = 0x647C
+0x9374 = 0x647D
+0x9376 = 0x647E
+0x937A = 0x6521
+0x937D = 0x6522
+0x937F = 0x6523
+0x9380 = 0x6524
+0x9381 = 0x6525
+0x9382 = 0x6526
+0x9388 = 0x6527
+0x938A = 0x6528
+0x938B = 0x6529
+0x938D = 0x652A
+0x938F = 0x652B
+0x9392 = 0x652C
+0x9395 = 0x652D
+0x9398 = 0x652E
+0x939B = 0x652F
+0x939E = 0x6530
+0x93A1 = 0x6531
+0x93A3 = 0x6532
+0x93A4 = 0x6533
+0x93A6 = 0x6534
+0x93A8 = 0x6535
+0x93A9 = 0x653B
+0x93AB = 0x6536
+0x93B4 = 0x6537
+0x93B5 = 0x6538
+0x93B6 = 0x6539
+0x93BA = 0x653A
+0x93C1 = 0x653C
+0x93C4 = 0x653D
+0x93C5 = 0x653E
+0x93C6 = 0x653F
+0x93C7 = 0x6540
+0x93C9 = 0x6541
+0x93CA = 0x6542
+0x93CB = 0x6543
+0x93CC = 0x6544
+0x93CD = 0x6545
+0x93D3 = 0x6546
+0x93D9 = 0x6547
+0x93DC = 0x6548
+0x93DE = 0x6549
+0x93DF = 0x654A
+0x93E2 = 0x654B
+0x93E6 = 0x654C
+0x93E7 = 0x654D
+0x93F7 = 0x654F
+0x93F8 = 0x6550
+0x93F9 = 0x654E
+0x93FA = 0x6551
+0x93FB = 0x6552
+0x93FD = 0x6553
+0x9401 = 0x6554
+0x9402 = 0x6555
+0x9404 = 0x6556
+0x9408 = 0x6557
+0x9409 = 0x6558
+0x940D = 0x6559
+0x940E = 0x655A
+0x940F = 0x655B
+0x9415 = 0x655C
+0x9416 = 0x655D
+0x9417 = 0x655E
+0x941F = 0x655F
+0x942E = 0x6560
+0x942F = 0x6561
+0x9431 = 0x6562
+0x9432 = 0x6563
+0x9433 = 0x6564
+0x9434 = 0x6565
+0x943B = 0x6566
+0x943D = 0x6568
+0x943F = 0x6567
+0x9443 = 0x6569
+0x9445 = 0x656A
+0x9448 = 0x656B
+0x944A = 0x656C
+0x944C = 0x656D
+0x9455 = 0x656E
+0x9459 = 0x656F
+0x945C = 0x6570
+0x945F = 0x6571
+0x9461 = 0x6572
+0x9463 = 0x6573
+0x9468 = 0x6574
+0x946B = 0x6575
+0x946D = 0x6576
+0x946E = 0x6577
+0x946F = 0x6578
+0x9471 = 0x6579
+0x9472 = 0x657A
+0x9483 = 0x657C
+0x9484 = 0x657B
+0x9578 = 0x657D
+0x9579 = 0x657E
+0x957E = 0x6621
+0x9584 = 0x6622
+0x9588 = 0x6623
+0x958C = 0x6624
+0x958D = 0x6625
+0x958E = 0x6626
+0x959D = 0x6627
+0x959E = 0x6628
+0x959F = 0x6629
+0x95A1 = 0x662A
+0x95A6 = 0x662B
+0x95A9 = 0x662C
+0x95AB = 0x662D
+0x95AC = 0x662E
+0x95B4 = 0x662F
+0x95B6 = 0x6630
+0x95BA = 0x6631
+0x95BD = 0x6632
+0x95BF = 0x6633
+0x95C6 = 0x6634
+0x95C8 = 0x6635
+0x95C9 = 0x6636
+0x95CB = 0x6637
+0x95D0 = 0x6638
+0x95D1 = 0x6639
+0x95D2 = 0x663A
+0x95D3 = 0x663B
+0x95D9 = 0x663C
+0x95DA = 0x663D
+0x95DD = 0x663E
+0x95DE = 0x663F
+0x95DF = 0x6640
+0x95E0 = 0x6641
+0x95E4 = 0x6642
+0x95E6 = 0x6643
+0x961D = 0x6644
+0x961E = 0x6645
+0x9622 = 0x6646
+0x9624 = 0x6647
+0x9625 = 0x6648
+0x9626 = 0x6649
+0x962C = 0x664A
+0x9631 = 0x664B
+0x9633 = 0x664C
+0x9637 = 0x664D
+0x9638 = 0x664E
+0x9639 = 0x664F
+0x963A = 0x6650
+0x963C = 0x6651
+0x963D = 0x6652
+0x9641 = 0x6653
+0x9652 = 0x6654
+0x9654 = 0x6655
+0x9656 = 0x6656
+0x9657 = 0x6657
+0x9658 = 0x6658
+0x9661 = 0x6659
+0x966E = 0x665A
+0x9674 = 0x665B
+0x967B = 0x665C
+0x967C = 0x665D
+0x967E = 0x665E
+0x967F = 0x665F
+0x9681 = 0x6660
+0x9682 = 0x6661
+0x9683 = 0x6662
+0x9684 = 0x6663
+0x9689 = 0x6664
+0x9691 = 0x6665
+0x9696 = 0x6666
+0x969A = 0x6667
+0x969D = 0x6668
+0x969F = 0x6669
+0x96A4 = 0x666A
+0x96A5 = 0x666B
+0x96A6 = 0x666C
+0x96A9 = 0x666D
+0x96AE = 0x666E
+0x96AF = 0x666F
+0x96B3 = 0x6670
+0x96BA = 0x6671
+0x96CA = 0x6672
+0x96D2 = 0x6673
+0x96D8 = 0x6675
+0x96DA = 0x6676
+0x96DD = 0x6677
+0x96DE = 0x6678
+0x96DF = 0x6679
+0x96E9 = 0x667A
+0x96EF = 0x667B
+0x96F1 = 0x667C
+0x96FA = 0x667D
+0x9702 = 0x667E
+0x9703 = 0x6721
+0x9705 = 0x6722
+0x9709 = 0x6723
+0x971A = 0x6724
+0x971B = 0x6725
+0x971D = 0x6726
+0x9721 = 0x6727
+0x9722 = 0x6728
+0x9723 = 0x6729
+0x9728 = 0x672A
+0x9731 = 0x672B
+0x9733 = 0x672C
+0x9741 = 0x672D
+0x9743 = 0x672E
+0x974A = 0x672F
+0x974E = 0x6730
+0x974F = 0x6731
+0x9755 = 0x6732
+0x9757 = 0x6733
+0x9758 = 0x6734
+0x975A = 0x6735
+0x975B = 0x6736
+0x9763 = 0x6737
+0x9767 = 0x6738
+0x976A = 0x6739
+0x976E = 0x673A
+0x9773 = 0x673B
+0x9776 = 0x673C
+0x9777 = 0x673D
+0x9778 = 0x673E
+0x977B = 0x673F
+0x977D = 0x6740
+0x977F = 0x6741
+0x9780 = 0x6742
+0x9789 = 0x6743
+0x9795 = 0x6744
+0x9796 = 0x6745
+0x9797 = 0x6746
+0x9799 = 0x6747
+0x979A = 0x6748
+0x979E = 0x6749
+0x979F = 0x674A
+0x97A2 = 0x674B
+0x97AC = 0x674C
+0x97AE = 0x674D
+0x97B1 = 0x674E
+0x97B2 = 0x674F
+0x97B5 = 0x6750
+0x97B6 = 0x6751
+0x97B8 = 0x6752
+0x97B9 = 0x6753
+0x97BA = 0x6754
+0x97BC = 0x6755
+0x97BE = 0x6756
+0x97BF = 0x6757
+0x97C1 = 0x6758
+0x97C4 = 0x6759
+0x97C5 = 0x675A
+0x97C7 = 0x675B
+0x97C9 = 0x675C
+0x97CA = 0x675D
+0x97CC = 0x675E
+0x97CD = 0x675F
+0x97CE = 0x6760
+0x97D0 = 0x6761
+0x97D1 = 0x6762
+0x97D4 = 0x6763
+0x97D7 = 0x6764
+0x97D8 = 0x6765
+0x97D9 = 0x6766
+0x97DB = 0x676A
+0x97DD = 0x6767
+0x97DE = 0x6768
+0x97E0 = 0x6769
+0x97E1 = 0x676B
+0x97E4 = 0x676C
+0x97EF = 0x676D
+0x97F1 = 0x676E
+0x97F4 = 0x676F
+0x97F7 = 0x6770
+0x97F8 = 0x6771
+0x97FA = 0x6772
+0x9807 = 0x6773
+0x980A = 0x6774
+0x980D = 0x6776
+0x980E = 0x6777
+0x9814 = 0x6778
+0x9816 = 0x6779
+0x9819 = 0x6775
+0x981C = 0x677A
+0x981E = 0x677B
+0x9820 = 0x677C
+0x9823 = 0x677D
+0x9825 = 0x6828
+0x9826 = 0x677E
+0x982B = 0x6821
+0x982E = 0x6822
+0x982F = 0x6823
+0x9830 = 0x6824
+0x9832 = 0x6825
+0x9833 = 0x6826
+0x9835 = 0x6827
+0x983E = 0x6829
+0x9844 = 0x682A
+0x9847 = 0x682B
+0x984A = 0x682C
+0x9851 = 0x682D
+0x9852 = 0x682E
+0x9853 = 0x682F
+0x9856 = 0x6830
+0x9857 = 0x6831
+0x9859 = 0x6832
+0x985A = 0x6833
+0x9862 = 0x6834
+0x9863 = 0x6835
+0x9865 = 0x6836
+0x9866 = 0x6837
+0x986A = 0x6838
+0x986C = 0x6839
+0x98AB = 0x683A
+0x98AD = 0x683B
+0x98AE = 0x683C
+0x98B0 = 0x683D
+0x98B4 = 0x683E
+0x98B7 = 0x683F
+0x98B8 = 0x6840
+0x98BA = 0x6841
+0x98BB = 0x6842
+0x98BF = 0x6843
+0x98C2 = 0x6844
+0x98C5 = 0x6845
+0x98C8 = 0x6846
+0x98CC = 0x6847
+0x98E1 = 0x6848
+0x98E3 = 0x6849
+0x98E5 = 0x684A
+0x98E6 = 0x684B
+0x98E7 = 0x684C
+0x98EA = 0x684D
+0x98F3 = 0x684E
+0x98F6 = 0x684F
+0x9902 = 0x6850
+0x9907 = 0x6851
+0x9908 = 0x6852
+0x9911 = 0x6853
+0x9915 = 0x6854
+0x9916 = 0x6855
+0x9917 = 0x6856
+0x991A = 0x6857
+0x991B = 0x6858
+0x991C = 0x6859
+0x991F = 0x685A
+0x9922 = 0x685B
+0x9926 = 0x685C
+0x9927 = 0x685D
+0x992B = 0x685E
+0x9931 = 0x685F
+0x9932 = 0x6860
+0x9933 = 0x6861
+0x9934 = 0x6862
+0x9935 = 0x6863
+0x9939 = 0x6864
+0x993A = 0x6865
+0x993B = 0x6866
+0x993C = 0x6867
+0x9940 = 0x6868
+0x9941 = 0x6869
+0x9946 = 0x686A
+0x9947 = 0x686B
+0x9948 = 0x686C
+0x994D = 0x686D
+0x994E = 0x686E
+0x9954 = 0x686F
+0x9958 = 0x6870
+0x9959 = 0x6871
+0x995B = 0x6872
+0x995C = 0x6873
+0x995E = 0x6874
+0x995F = 0x6875
+0x9960 = 0x6876
+0x999B = 0x6877
+0x999D = 0x6878
+0x999F = 0x6879
+0x99A6 = 0x687A
+0x99B0 = 0x687B
+0x99B1 = 0x687C
+0x99B2 = 0x687D
+0x99B5 = 0x687E
+0x99B9 = 0x6921
+0x99BA = 0x6922
+0x99BD = 0x6923
+0x99BF = 0x6924
+0x99C3 = 0x6925
+0x99C9 = 0x6926
+0x99D3 = 0x6927
+0x99D4 = 0x6928
+0x99D9 = 0x6929
+0x99DA = 0x692A
+0x99DC = 0x692B
+0x99DE = 0x692C
+0x99E7 = 0x692D
+0x99EA = 0x692E
+0x99EB = 0x692F
+0x99EC = 0x6930
+0x99F0 = 0x6931
+0x99F4 = 0x6932
+0x99F5 = 0x6933
+0x99F9 = 0x6934
+0x99FD = 0x6935
+0x99FE = 0x6936
+0x9A02 = 0x6937
+0x9A03 = 0x6938
+0x9A04 = 0x6939
+0x9A0B = 0x693A
+0x9A0C = 0x693B
+0x9A10 = 0x693C
+0x9A11 = 0x693D
+0x9A16 = 0x693E
+0x9A1E = 0x693F
+0x9A20 = 0x6940
+0x9A22 = 0x6941
+0x9A23 = 0x6942
+0x9A24 = 0x6943
+0x9A27 = 0x6944
+0x9A2D = 0x6945
+0x9A2E = 0x6946
+0x9A33 = 0x6947
+0x9A35 = 0x6948
+0x9A36 = 0x6949
+0x9A38 = 0x694A
+0x9A41 = 0x694C
+0x9A44 = 0x694D
+0x9A47 = 0x694B
+0x9A4A = 0x694E
+0x9A4B = 0x694F
+0x9A4C = 0x6950
+0x9A4E = 0x6951
+0x9A51 = 0x6952
+0x9A54 = 0x6953
+0x9A56 = 0x6954
+0x9A5D = 0x6955
+0x9AAA = 0x6956
+0x9AAC = 0x6957
+0x9AAE = 0x6958
+0x9AAF = 0x6959
+0x9AB2 = 0x695A
+0x9AB4 = 0x695B
+0x9AB5 = 0x695C
+0x9AB6 = 0x695D
+0x9AB9 = 0x695E
+0x9ABB = 0x695F
+0x9ABE = 0x6960
+0x9ABF = 0x6961
+0x9AC1 = 0x6962
+0x9AC3 = 0x6963
+0x9AC6 = 0x6964
+0x9AC8 = 0x6965
+0x9ACE = 0x6966
+0x9AD0 = 0x6967
+0x9AD2 = 0x6968
+0x9AD5 = 0x6969
+0x9AD6 = 0x696A
+0x9AD7 = 0x696B
+0x9ADB = 0x696C
+0x9ADC = 0x696D
+0x9AE0 = 0x696E
+0x9AE4 = 0x696F
+0x9AE5 = 0x6970
+0x9AE7 = 0x6971
+0x9AE9 = 0x6972
+0x9AEC = 0x6973
+0x9AF2 = 0x6974
+0x9AF3 = 0x6975
+0x9AF5 = 0x6976
+0x9AF9 = 0x6977
+0x9AFA = 0x6978
+0x9AFD = 0x6979
+0x9AFF = 0x697A
+0x9B00 = 0x697B
+0x9B01 = 0x697C
+0x9B02 = 0x697D
+0x9B03 = 0x697E
+0x9B04 = 0x6A21
+0x9B05 = 0x6A22
+0x9B08 = 0x6A23
+0x9B09 = 0x6A24
+0x9B0B = 0x6A25
+0x9B0C = 0x6A26
+0x9B0D = 0x6A27
+0x9B0E = 0x6A28
+0x9B10 = 0x6A29
+0x9B12 = 0x6A2A
+0x9B16 = 0x6A2B
+0x9B19 = 0x6A2C
+0x9B1B = 0x6A2D
+0x9B1C = 0x6A2E
+0x9B20 = 0x6A2F
+0x9B26 = 0x6A30
+0x9B2B = 0x6A31
+0x9B2D = 0x6A32
+0x9B33 = 0x6A33
+0x9B34 = 0x6A34
+0x9B35 = 0x6A35
+0x9B37 = 0x6A36
+0x9B39 = 0x6A37
+0x9B3A = 0x6A38
+0x9B3D = 0x6A39
+0x9B48 = 0x6A3A
+0x9B4B = 0x6A3B
+0x9B4C = 0x6A3C
+0x9B55 = 0x6A3D
+0x9B56 = 0x6A3E
+0x9B57 = 0x6A3F
+0x9B5B = 0x6A40
+0x9B5E = 0x6A41
+0x9B61 = 0x6A42
+0x9B63 = 0x6A43
+0x9B65 = 0x6A44
+0x9B66 = 0x6A45
+0x9B68 = 0x6A46
+0x9B6A = 0x6A47
+0x9B6B = 0x6A48
+0x9B6C = 0x6A49
+0x9B6D = 0x6A4A
+0x9B6E = 0x6A4B
+0x9B73 = 0x6A4C
+0x9B75 = 0x6A4D
+0x9B77 = 0x6A4E
+0x9B78 = 0x6A4F
+0x9B79 = 0x6A50
+0x9B7F = 0x6A51
+0x9B80 = 0x6A52
+0x9B84 = 0x6A53
+0x9B85 = 0x6A54
+0x9B86 = 0x6A55
+0x9B87 = 0x6A56
+0x9B89 = 0x6A57
+0x9B8A = 0x6A58
+0x9B8B = 0x6A59
+0x9B8D = 0x6A5A
+0x9B8F = 0x6A5B
+0x9B90 = 0x6A5C
+0x9B94 = 0x6A5D
+0x9B9A = 0x6A5E
+0x9B9D = 0x6A5F
+0x9B9E = 0x6A60
+0x9BA6 = 0x6A61
+0x9BA7 = 0x6A62
+0x9BA9 = 0x6A63
+0x9BAC = 0x6A64
+0x9BB0 = 0x6A65
+0x9BB1 = 0x6A66
+0x9BB2 = 0x6A67
+0x9BB7 = 0x6A68
+0x9BB8 = 0x6A69
+0x9BBB = 0x6A6A
+0x9BBC = 0x6A6B
+0x9BBE = 0x6A6C
+0x9BBF = 0x6A6D
+0x9BC1 = 0x6A6E
+0x9BC7 = 0x6A6F
+0x9BC8 = 0x6A70
+0x9BCE = 0x6A71
+0x9BD0 = 0x6A72
+0x9BD7 = 0x6A73
+0x9BD8 = 0x6A74
+0x9BDD = 0x6A75
+0x9BDF = 0x6A76
+0x9BE5 = 0x6A77
+0x9BE7 = 0x6A78
+0x9BEA = 0x6A79
+0x9BEB = 0x6A7A
+0x9BEF = 0x6A7B
+0x9BF3 = 0x6A7C
+0x9BF7 = 0x6A7D
+0x9BF8 = 0x6A7E
+0x9BF9 = 0x6B21
+0x9BFA = 0x6B22
+0x9BFD = 0x6B23
+0x9BFF = 0x6B24
+0x9C00 = 0x6B25
+0x9C02 = 0x6B26
+0x9C0B = 0x6B27
+0x9C0F = 0x6B28
+0x9C11 = 0x6B29
+0x9C16 = 0x6B2A
+0x9C18 = 0x6B2B
+0x9C19 = 0x6B2C
+0x9C1A = 0x6B2D
+0x9C1C = 0x6B2E
+0x9C1E = 0x6B2F
+0x9C22 = 0x6B30
+0x9C23 = 0x6B31
+0x9C26 = 0x6B32
+0x9C27 = 0x6B33
+0x9C28 = 0x6B34
+0x9C29 = 0x6B35
+0x9C2A = 0x6B36
+0x9C31 = 0x6B37
+0x9C35 = 0x6B38
+0x9C36 = 0x6B39
+0x9C37 = 0x6B3A
+0x9C3D = 0x6B3B
+0x9C41 = 0x6B3C
+0x9C43 = 0x6B3D
+0x9C44 = 0x6B3E
+0x9C45 = 0x6B3F
+0x9C49 = 0x6B40
+0x9C4A = 0x6B41
+0x9C4E = 0x6B42
+0x9C4F = 0x6B43
+0x9C50 = 0x6B44
+0x9C53 = 0x6B45
+0x9C54 = 0x6B46
+0x9C56 = 0x6B47
+0x9C58 = 0x6B48
+0x9C5B = 0x6B49
+0x9C5C = 0x6B50
+0x9C5D = 0x6B4A
+0x9C5E = 0x6B4B
+0x9C5F = 0x6B4C
+0x9C63 = 0x6B4D
+0x9C68 = 0x6B52
+0x9C69 = 0x6B4E
+0x9C6A = 0x6B4F
+0x9C6B = 0x6B51
+0x9C6E = 0x6B53
+0x9C70 = 0x6B54
+0x9C72 = 0x6B55
+0x9C75 = 0x6B56
+0x9C77 = 0x6B57
+0x9C7B = 0x6B58
+0x9CE6 = 0x6B59
+0x9CF2 = 0x6B5A
+0x9CF7 = 0x6B5B
+0x9CF9 = 0x6B5C
+0x9D02 = 0x6B5E
+0x9D0B = 0x6B5D
+0x9D11 = 0x6B5F
+0x9D17 = 0x6B60
+0x9D18 = 0x6B61
+0x9D1C = 0x6B62
+0x9D1D = 0x6B63
+0x9D1E = 0x6B64
+0x9D2F = 0x6B65
+0x9D30 = 0x6B66
+0x9D32 = 0x6B67
+0x9D33 = 0x6B68
+0x9D34 = 0x6B69
+0x9D3A = 0x6B6A
+0x9D3C = 0x6B6B
+0x9D3D = 0x6B6D
+0x9D42 = 0x6B6E
+0x9D43 = 0x6B6F
+0x9D45 = 0x6B6C
+0x9D47 = 0x6B70
+0x9D4A = 0x6B71
+0x9D53 = 0x6B72
+0x9D54 = 0x6B73
+0x9D5F = 0x6B74
+0x9D62 = 0x6B76
+0x9D63 = 0x6B75
+0x9D65 = 0x6B77
+0x9D69 = 0x6B78
+0x9D6A = 0x6B79
+0x9D6B = 0x6B7A
+0x9D70 = 0x6B7B
+0x9D76 = 0x6B7C
+0x9D77 = 0x6B7D
+0x9D7B = 0x6B7E
+0x9D7C = 0x6C21
+0x9D7E = 0x6C22
+0x9D83 = 0x6C23
+0x9D84 = 0x6C24
+0x9D86 = 0x6C25
+0x9D8A = 0x6C26
+0x9D8D = 0x6C27
+0x9D8E = 0x6C28
+0x9D92 = 0x6C29
+0x9D93 = 0x6C2A
+0x9D95 = 0x6C2B
+0x9D96 = 0x6C2C
+0x9D97 = 0x6C2D
+0x9D98 = 0x6C2E
+0x9DA1 = 0x6C2F
+0x9DAA = 0x6C30
+0x9DAC = 0x6C31
+0x9DAE = 0x6C32
+0x9DB1 = 0x6C33
+0x9DB5 = 0x6C34
+0x9DB9 = 0x6C35
+0x9DBC = 0x6C36
+0x9DBF = 0x6C37
+0x9DC3 = 0x6C38
+0x9DC7 = 0x6C39
+0x9DC9 = 0x6C3A
+0x9DCA = 0x6C3B
+0x9DD4 = 0x6C3C
+0x9DD5 = 0x6C3D
+0x9DD6 = 0x6C3E
+0x9DD7 = 0x6C3F
+0x9DDA = 0x6C40
+0x9DDE = 0x6C41
+0x9DDF = 0x6C42
+0x9DE0 = 0x6C43
+0x9DE5 = 0x6C44
+0x9DE7 = 0x6C45
+0x9DE9 = 0x6C46
+0x9DEB = 0x6C47
+0x9DEE = 0x6C48
+0x9DF0 = 0x6C49
+0x9DF3 = 0x6C4A
+0x9DF4 = 0x6C4B
+0x9DFE = 0x6C4C
+0x9E02 = 0x6C4E
+0x9E07 = 0x6C4F
+0x9E0A = 0x6C4D
+0x9E0E = 0x6C50
+0x9E10 = 0x6C51
+0x9E11 = 0x6C52
+0x9E12 = 0x6C53
+0x9E15 = 0x6C54
+0x9E16 = 0x6C55
+0x9E19 = 0x6C56
+0x9E1C = 0x6C57
+0x9E1D = 0x6C58
+0x9E7A = 0x6C59
+0x9E7B = 0x6C5A
+0x9E7C = 0x6C5B
+0x9E80 = 0x6C5C
+0x9E82 = 0x6C5D
+0x9E83 = 0x6C5E
+0x9E84 = 0x6C5F
+0x9E85 = 0x6C60
+0x9E87 = 0x6C61
+0x9E8E = 0x6C62
+0x9E8F = 0x6C63
+0x9E96 = 0x6C64
+0x9E98 = 0x6C65
+0x9E9B = 0x6C66
+0x9E9E = 0x6C67
+0x9EA4 = 0x6C68
+0x9EA8 = 0x6C69
+0x9EAC = 0x6C6A
+0x9EAE = 0x6C6B
+0x9EAF = 0x6C6C
+0x9EB0 = 0x6C6D
+0x9EB3 = 0x6C6E
+0x9EB4 = 0x6C6F
+0x9EB5 = 0x6C70
+0x9EC6 = 0x6C71
+0x9EC8 = 0x6C72
+0x9ECB = 0x6C73
+0x9ED5 = 0x6C74
+0x9EDF = 0x6C75
+0x9EE4 = 0x6C76
+0x9EE7 = 0x6C77
+0x9EEC = 0x6C78
+0x9EED = 0x6C79
+0x9EEE = 0x6C7A
+0x9EF0 = 0x6C7B
+0x9EF1 = 0x6C7C
+0x9EF2 = 0x6C7D
+0x9EF5 = 0x6C7E
+0x9EF8 = 0x6D21
+0x9EFF = 0x6D22
+0x9F02 = 0x6D23
+0x9F03 = 0x6D24
+0x9F09 = 0x6D25
+0x9F0F = 0x6D26
+0x9F10 = 0x6D27
+0x9F11 = 0x6D28
+0x9F12 = 0x6D29
+0x9F14 = 0x6D2A
+0x9F16 = 0x6D2B
+0x9F17 = 0x6D2C
+0x9F19 = 0x6D2D
+0x9F1A = 0x6D2E
+0x9F1B = 0x6D2F
+0x9F1F = 0x6D30
+0x9F22 = 0x6D31
+0x9F26 = 0x6D32
+0x9F2A = 0x6D33
+0x9F2B = 0x6D34
+0x9F2F = 0x6D35
+0x9F31 = 0x6D36
+0x9F32 = 0x6D37
+0x9F34 = 0x6D38
+0x9F37 = 0x6D39
+0x9F39 = 0x6D3A
+0x9F3A = 0x6D3B
+0x9F3C = 0x6D3C
+0x9F3D = 0x6D3D
+0x9F3F = 0x6D3E
+0x9F41 = 0x6D3F
+0x9F43 = 0x6D40
+0x9F44 = 0x6D41
+0x9F45 = 0x6D42
+0x9F46 = 0x6D43
+0x9F47 = 0x6D44
+0x9F53 = 0x6D45
+0x9F55 = 0x6D46
+0x9F56 = 0x6D47
+0x9F57 = 0x6D48
+0x9F58 = 0x6D49
+0x9F5A = 0x6D4A
+0x9F5D = 0x6D4B
+0x9F5E = 0x6D4C
+0x9F68 = 0x6D4D
+0x9F69 = 0x6D4E
+0x9F6D = 0x6D4F
+0x9F6E = 0x6D50
+0x9F6F = 0x6D51
+0x9F70 = 0x6D52
+0x9F71 = 0x6D53
+0x9F73 = 0x6D54
+0x9F75 = 0x6D55
+0x9F7A = 0x6D56
+0x9F7D = 0x6D57
+0x9F8F = 0x6D58
+0x9F90 = 0x6D59
+0x9F91 = 0x6D5A
+0x9F92 = 0x6D5B
+0x9F94 = 0x6D5C
+0x9F96 = 0x6D5D
+0x9F97 = 0x6D5E
+0x9F9E = 0x6D5F
+0x9FA1 = 0x6D60
+0x9FA2 = 0x6D61
+0x9FA3 = 0x6D62
+0x9FA5 = 0x6D63
+0xFF5E = 0x2237
+0xFFE4 = 0x2243
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212UDC.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212UDC.src
new file mode 100644
index 0000000..3f7d397
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212UDC.src
@@ -0,0 +1,955 @@
+# $NetBSD: UCS%JISX0212UDC.src,v 1.1 2003/07/19 20:20:43 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0212UDC"
+SRC_ZONE	0xE3AC - 0xE757
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0xE3AC - 0xE757		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0xE3AC = 0x7521
+0xE3AD = 0x7522
+0xE3AE = 0x7523
+0xE3AF = 0x7524
+0xE3B0 = 0x7525
+0xE3B1 = 0x7526
+0xE3B2 = 0x7527
+0xE3B3 = 0x7528
+0xE3B4 = 0x7529
+0xE3B5 = 0x752A
+0xE3B6 = 0x752B
+0xE3B7 = 0x752C
+0xE3B8 = 0x752D
+0xE3B9 = 0x752E
+0xE3BA = 0x752F
+0xE3BB = 0x7530
+0xE3BC = 0x7531
+0xE3BD = 0x7532
+0xE3BE = 0x7533
+0xE3BF = 0x7534
+0xE3C0 = 0x7535
+0xE3C1 = 0x7536
+0xE3C2 = 0x7537
+0xE3C3 = 0x7538
+0xE3C4 = 0x7539
+0xE3C5 = 0x753A
+0xE3C6 = 0x753B
+0xE3C7 = 0x753C
+0xE3C8 = 0x753D
+0xE3C9 = 0x753E
+0xE3CA = 0x753F
+0xE3CB = 0x7540
+0xE3CC = 0x7541
+0xE3CD = 0x7542
+0xE3CE = 0x7543
+0xE3CF = 0x7544
+0xE3D0 = 0x7545
+0xE3D1 = 0x7546
+0xE3D2 = 0x7547
+0xE3D3 = 0x7548
+0xE3D4 = 0x7549
+0xE3D5 = 0x754A
+0xE3D6 = 0x754B
+0xE3D7 = 0x754C
+0xE3D8 = 0x754D
+0xE3D9 = 0x754E
+0xE3DA = 0x754F
+0xE3DB = 0x7550
+0xE3DC = 0x7551
+0xE3DD = 0x7552
+0xE3DE = 0x7553
+0xE3DF = 0x7554
+0xE3E0 = 0x7555
+0xE3E1 = 0x7556
+0xE3E2 = 0x7557
+0xE3E3 = 0x7558
+0xE3E4 = 0x7559
+0xE3E5 = 0x755A
+0xE3E6 = 0x755B
+0xE3E7 = 0x755C
+0xE3E8 = 0x755D
+0xE3E9 = 0x755E
+0xE3EA = 0x755F
+0xE3EB = 0x7560
+0xE3EC = 0x7561
+0xE3ED = 0x7562
+0xE3EE = 0x7563
+0xE3EF = 0x7564
+0xE3F0 = 0x7565
+0xE3F1 = 0x7566
+0xE3F2 = 0x7567
+0xE3F3 = 0x7568
+0xE3F4 = 0x7569
+0xE3F5 = 0x756A
+0xE3F6 = 0x756B
+0xE3F7 = 0x756C
+0xE3F8 = 0x756D
+0xE3F9 = 0x756E
+0xE3FA = 0x756F
+0xE3FB = 0x7570
+0xE3FC = 0x7571
+0xE3FD = 0x7572
+0xE3FE = 0x7573
+0xE3FF = 0x7574
+0xE400 = 0x7575
+0xE401 = 0x7576
+0xE402 = 0x7577
+0xE403 = 0x7578
+0xE404 = 0x7579
+0xE405 = 0x757A
+0xE406 = 0x757B
+0xE407 = 0x757C
+0xE408 = 0x757D
+0xE409 = 0x757E
+0xE40A = 0x7621
+0xE40B = 0x7622
+0xE40C = 0x7623
+0xE40D = 0x7624
+0xE40E = 0x7625
+0xE40F = 0x7626
+0xE410 = 0x7627
+0xE411 = 0x7628
+0xE412 = 0x7629
+0xE413 = 0x762A
+0xE414 = 0x762B
+0xE415 = 0x762C
+0xE416 = 0x762D
+0xE417 = 0x762E
+0xE418 = 0x762F
+0xE419 = 0x7630
+0xE41A = 0x7631
+0xE41B = 0x7632
+0xE41C = 0x7633
+0xE41D = 0x7634
+0xE41E = 0x7635
+0xE41F = 0x7636
+0xE420 = 0x7637
+0xE421 = 0x7638
+0xE422 = 0x7639
+0xE423 = 0x763A
+0xE424 = 0x763B
+0xE425 = 0x763C
+0xE426 = 0x763D
+0xE427 = 0x763E
+0xE428 = 0x763F
+0xE429 = 0x7640
+0xE42A = 0x7641
+0xE42B = 0x7642
+0xE42C = 0x7643
+0xE42D = 0x7644
+0xE42E = 0x7645
+0xE42F = 0x7646
+0xE430 = 0x7647
+0xE431 = 0x7648
+0xE432 = 0x7649
+0xE433 = 0x764A
+0xE434 = 0x764B
+0xE435 = 0x764C
+0xE436 = 0x764D
+0xE437 = 0x764E
+0xE438 = 0x764F
+0xE439 = 0x7650
+0xE43A = 0x7651
+0xE43B = 0x7652
+0xE43C = 0x7653
+0xE43D = 0x7654
+0xE43E = 0x7655
+0xE43F = 0x7656
+0xE440 = 0x7657
+0xE441 = 0x7658
+0xE442 = 0x7659
+0xE443 = 0x765A
+0xE444 = 0x765B
+0xE445 = 0x765C
+0xE446 = 0x765D
+0xE447 = 0x765E
+0xE448 = 0x765F
+0xE449 = 0x7660
+0xE44A = 0x7661
+0xE44B = 0x7662
+0xE44C = 0x7663
+0xE44D = 0x7664
+0xE44E = 0x7665
+0xE44F = 0x7666
+0xE450 = 0x7667
+0xE451 = 0x7668
+0xE452 = 0x7669
+0xE453 = 0x766A
+0xE454 = 0x766B
+0xE455 = 0x766C
+0xE456 = 0x766D
+0xE457 = 0x766E
+0xE458 = 0x766F
+0xE459 = 0x7670
+0xE45A = 0x7671
+0xE45B = 0x7672
+0xE45C = 0x7673
+0xE45D = 0x7674
+0xE45E = 0x7675
+0xE45F = 0x7676
+0xE460 = 0x7677
+0xE461 = 0x7678
+0xE462 = 0x7679
+0xE463 = 0x767A
+0xE464 = 0x767B
+0xE465 = 0x767C
+0xE466 = 0x767D
+0xE467 = 0x767E
+0xE468 = 0x7721
+0xE469 = 0x7722
+0xE46A = 0x7723
+0xE46B = 0x7724
+0xE46C = 0x7725
+0xE46D = 0x7726
+0xE46E = 0x7727
+0xE46F = 0x7728
+0xE470 = 0x7729
+0xE471 = 0x772A
+0xE472 = 0x772B
+0xE473 = 0x772C
+0xE474 = 0x772D
+0xE475 = 0x772E
+0xE476 = 0x772F
+0xE477 = 0x7730
+0xE478 = 0x7731
+0xE479 = 0x7732
+0xE47A = 0x7733
+0xE47B = 0x7734
+0xE47C = 0x7735
+0xE47D = 0x7736
+0xE47E = 0x7737
+0xE47F = 0x7738
+0xE480 = 0x7739
+0xE481 = 0x773A
+0xE482 = 0x773B
+0xE483 = 0x773C
+0xE484 = 0x773D
+0xE485 = 0x773E
+0xE486 = 0x773F
+0xE487 = 0x7740
+0xE488 = 0x7741
+0xE489 = 0x7742
+0xE48A = 0x7743
+0xE48B = 0x7744
+0xE48C = 0x7745
+0xE48D = 0x7746
+0xE48E = 0x7747
+0xE48F = 0x7748
+0xE490 = 0x7749
+0xE491 = 0x774A
+0xE492 = 0x774B
+0xE493 = 0x774C
+0xE494 = 0x774D
+0xE495 = 0x774E
+0xE496 = 0x774F
+0xE497 = 0x7750
+0xE498 = 0x7751
+0xE499 = 0x7752
+0xE49A = 0x7753
+0xE49B = 0x7754
+0xE49C = 0x7755
+0xE49D = 0x7756
+0xE49E = 0x7757
+0xE49F = 0x7758
+0xE4A0 = 0x7759
+0xE4A1 = 0x775A
+0xE4A2 = 0x775B
+0xE4A3 = 0x775C
+0xE4A4 = 0x775D
+0xE4A5 = 0x775E
+0xE4A6 = 0x775F
+0xE4A7 = 0x7760
+0xE4A8 = 0x7761
+0xE4A9 = 0x7762
+0xE4AA = 0x7763
+0xE4AB = 0x7764
+0xE4AC = 0x7765
+0xE4AD = 0x7766
+0xE4AE = 0x7767
+0xE4AF = 0x7768
+0xE4B0 = 0x7769
+0xE4B1 = 0x776A
+0xE4B2 = 0x776B
+0xE4B3 = 0x776C
+0xE4B4 = 0x776D
+0xE4B5 = 0x776E
+0xE4B6 = 0x776F
+0xE4B7 = 0x7770
+0xE4B8 = 0x7771
+0xE4B9 = 0x7772
+0xE4BA = 0x7773
+0xE4BB = 0x7774
+0xE4BC = 0x7775
+0xE4BD = 0x7776
+0xE4BE = 0x7777
+0xE4BF = 0x7778
+0xE4C0 = 0x7779
+0xE4C1 = 0x777A
+0xE4C2 = 0x777B
+0xE4C3 = 0x777C
+0xE4C4 = 0x777D
+0xE4C5 = 0x777E
+0xE4C6 = 0x7821
+0xE4C7 = 0x7822
+0xE4C8 = 0x7823
+0xE4C9 = 0x7824
+0xE4CA = 0x7825
+0xE4CB = 0x7826
+0xE4CC = 0x7827
+0xE4CD = 0x7828
+0xE4CE = 0x7829
+0xE4CF = 0x782A
+0xE4D0 = 0x782B
+0xE4D1 = 0x782C
+0xE4D2 = 0x782D
+0xE4D3 = 0x782E
+0xE4D4 = 0x782F
+0xE4D5 = 0x7830
+0xE4D6 = 0x7831
+0xE4D7 = 0x7832
+0xE4D8 = 0x7833
+0xE4D9 = 0x7834
+0xE4DA = 0x7835
+0xE4DB = 0x7836
+0xE4DC = 0x7837
+0xE4DD = 0x7838
+0xE4DE = 0x7839
+0xE4DF = 0x783A
+0xE4E0 = 0x783B
+0xE4E1 = 0x783C
+0xE4E2 = 0x783D
+0xE4E3 = 0x783E
+0xE4E4 = 0x783F
+0xE4E5 = 0x7840
+0xE4E6 = 0x7841
+0xE4E7 = 0x7842
+0xE4E8 = 0x7843
+0xE4E9 = 0x7844
+0xE4EA = 0x7845
+0xE4EB = 0x7846
+0xE4EC = 0x7847
+0xE4ED = 0x7848
+0xE4EE = 0x7849
+0xE4EF = 0x784A
+0xE4F0 = 0x784B
+0xE4F1 = 0x784C
+0xE4F2 = 0x784D
+0xE4F3 = 0x784E
+0xE4F4 = 0x784F
+0xE4F5 = 0x7850
+0xE4F6 = 0x7851
+0xE4F7 = 0x7852
+0xE4F8 = 0x7853
+0xE4F9 = 0x7854
+0xE4FA = 0x7855
+0xE4FB = 0x7856
+0xE4FC = 0x7857
+0xE4FD = 0x7858
+0xE4FE = 0x7859
+0xE4FF = 0x785A
+0xE500 = 0x785B
+0xE501 = 0x785C
+0xE502 = 0x785D
+0xE503 = 0x785E
+0xE504 = 0x785F
+0xE505 = 0x7860
+0xE506 = 0x7861
+0xE507 = 0x7862
+0xE508 = 0x7863
+0xE509 = 0x7864
+0xE50A = 0x7865
+0xE50B = 0x7866
+0xE50C = 0x7867
+0xE50D = 0x7868
+0xE50E = 0x7869
+0xE50F = 0x786A
+0xE510 = 0x786B
+0xE511 = 0x786C
+0xE512 = 0x786D
+0xE513 = 0x786E
+0xE514 = 0x786F
+0xE515 = 0x7870
+0xE516 = 0x7871
+0xE517 = 0x7872
+0xE518 = 0x7873
+0xE519 = 0x7874
+0xE51A = 0x7875
+0xE51B = 0x7876
+0xE51C = 0x7877
+0xE51D = 0x7878
+0xE51E = 0x7879
+0xE51F = 0x787A
+0xE520 = 0x787B
+0xE521 = 0x787C
+0xE522 = 0x787D
+0xE523 = 0x787E
+0xE524 = 0x7921
+0xE525 = 0x7922
+0xE526 = 0x7923
+0xE527 = 0x7924
+0xE528 = 0x7925
+0xE529 = 0x7926
+0xE52A = 0x7927
+0xE52B = 0x7928
+0xE52C = 0x7929
+0xE52D = 0x792A
+0xE52E = 0x792B
+0xE52F = 0x792C
+0xE530 = 0x792D
+0xE531 = 0x792E
+0xE532 = 0x792F
+0xE533 = 0x7930
+0xE534 = 0x7931
+0xE535 = 0x7932
+0xE536 = 0x7933
+0xE537 = 0x7934
+0xE538 = 0x7935
+0xE539 = 0x7936
+0xE53A = 0x7937
+0xE53B = 0x7938
+0xE53C = 0x7939
+0xE53D = 0x793A
+0xE53E = 0x793B
+0xE53F = 0x793C
+0xE540 = 0x793D
+0xE541 = 0x793E
+0xE542 = 0x793F
+0xE543 = 0x7940
+0xE544 = 0x7941
+0xE545 = 0x7942
+0xE546 = 0x7943
+0xE547 = 0x7944
+0xE548 = 0x7945
+0xE549 = 0x7946
+0xE54A = 0x7947
+0xE54B = 0x7948
+0xE54C = 0x7949
+0xE54D = 0x794A
+0xE54E = 0x794B
+0xE54F = 0x794C
+0xE550 = 0x794D
+0xE551 = 0x794E
+0xE552 = 0x794F
+0xE553 = 0x7950
+0xE554 = 0x7951
+0xE555 = 0x7952
+0xE556 = 0x7953
+0xE557 = 0x7954
+0xE558 = 0x7955
+0xE559 = 0x7956
+0xE55A = 0x7957
+0xE55B = 0x7958
+0xE55C = 0x7959
+0xE55D = 0x795A
+0xE55E = 0x795B
+0xE55F = 0x795C
+0xE560 = 0x795D
+0xE561 = 0x795E
+0xE562 = 0x795F
+0xE563 = 0x7960
+0xE564 = 0x7961
+0xE565 = 0x7962
+0xE566 = 0x7963
+0xE567 = 0x7964
+0xE568 = 0x7965
+0xE569 = 0x7966
+0xE56A = 0x7967
+0xE56B = 0x7968
+0xE56C = 0x7969
+0xE56D = 0x796A
+0xE56E = 0x796B
+0xE56F = 0x796C
+0xE570 = 0x796D
+0xE571 = 0x796E
+0xE572 = 0x796F
+0xE573 = 0x7970
+0xE574 = 0x7971
+0xE575 = 0x7972
+0xE576 = 0x7973
+0xE577 = 0x7974
+0xE578 = 0x7975
+0xE579 = 0x7976
+0xE57A = 0x7977
+0xE57B = 0x7978
+0xE57C = 0x7979
+0xE57D = 0x797A
+0xE57E = 0x797B
+0xE57F = 0x797C
+0xE580 = 0x797D
+0xE581 = 0x797E
+0xE582 = 0x7A21
+0xE583 = 0x7A22
+0xE584 = 0x7A23
+0xE585 = 0x7A24
+0xE586 = 0x7A25
+0xE587 = 0x7A26
+0xE588 = 0x7A27
+0xE589 = 0x7A28
+0xE58A = 0x7A29
+0xE58B = 0x7A2A
+0xE58C = 0x7A2B
+0xE58D = 0x7A2C
+0xE58E = 0x7A2D
+0xE58F = 0x7A2E
+0xE590 = 0x7A2F
+0xE591 = 0x7A30
+0xE592 = 0x7A31
+0xE593 = 0x7A32
+0xE594 = 0x7A33
+0xE595 = 0x7A34
+0xE596 = 0x7A35
+0xE597 = 0x7A36
+0xE598 = 0x7A37
+0xE599 = 0x7A38
+0xE59A = 0x7A39
+0xE59B = 0x7A3A
+0xE59C = 0x7A3B
+0xE59D = 0x7A3C
+0xE59E = 0x7A3D
+0xE59F = 0x7A3E
+0xE5A0 = 0x7A3F
+0xE5A1 = 0x7A40
+0xE5A2 = 0x7A41
+0xE5A3 = 0x7A42
+0xE5A4 = 0x7A43
+0xE5A5 = 0x7A44
+0xE5A6 = 0x7A45
+0xE5A7 = 0x7A46
+0xE5A8 = 0x7A47
+0xE5A9 = 0x7A48
+0xE5AA = 0x7A49
+0xE5AB = 0x7A4A
+0xE5AC = 0x7A4B
+0xE5AD = 0x7A4C
+0xE5AE = 0x7A4D
+0xE5AF = 0x7A4E
+0xE5B0 = 0x7A4F
+0xE5B1 = 0x7A50
+0xE5B2 = 0x7A51
+0xE5B3 = 0x7A52
+0xE5B4 = 0x7A53
+0xE5B5 = 0x7A54
+0xE5B6 = 0x7A55
+0xE5B7 = 0x7A56
+0xE5B8 = 0x7A57
+0xE5B9 = 0x7A58
+0xE5BA = 0x7A59
+0xE5BB = 0x7A5A
+0xE5BC = 0x7A5B
+0xE5BD = 0x7A5C
+0xE5BE = 0x7A5D
+0xE5BF = 0x7A5E
+0xE5C0 = 0x7A5F
+0xE5C1 = 0x7A60
+0xE5C2 = 0x7A61
+0xE5C3 = 0x7A62
+0xE5C4 = 0x7A63
+0xE5C5 = 0x7A64
+0xE5C6 = 0x7A65
+0xE5C7 = 0x7A66
+0xE5C8 = 0x7A67
+0xE5C9 = 0x7A68
+0xE5CA = 0x7A69
+0xE5CB = 0x7A6A
+0xE5CC = 0x7A6B
+0xE5CD = 0x7A6C
+0xE5CE = 0x7A6D
+0xE5CF = 0x7A6E
+0xE5D0 = 0x7A6F
+0xE5D1 = 0x7A70
+0xE5D2 = 0x7A71
+0xE5D3 = 0x7A72
+0xE5D4 = 0x7A73
+0xE5D5 = 0x7A74
+0xE5D6 = 0x7A75
+0xE5D7 = 0x7A76
+0xE5D8 = 0x7A77
+0xE5D9 = 0x7A78
+0xE5DA = 0x7A79
+0xE5DB = 0x7A7A
+0xE5DC = 0x7A7B
+0xE5DD = 0x7A7C
+0xE5DE = 0x7A7D
+0xE5DF = 0x7A7E
+0xE5E0 = 0x7B21
+0xE5E1 = 0x7B22
+0xE5E2 = 0x7B23
+0xE5E3 = 0x7B24
+0xE5E4 = 0x7B25
+0xE5E5 = 0x7B26
+0xE5E6 = 0x7B27
+0xE5E7 = 0x7B28
+0xE5E8 = 0x7B29
+0xE5E9 = 0x7B2A
+0xE5EA = 0x7B2B
+0xE5EB = 0x7B2C
+0xE5EC = 0x7B2D
+0xE5ED = 0x7B2E
+0xE5EE = 0x7B2F
+0xE5EF = 0x7B30
+0xE5F0 = 0x7B31
+0xE5F1 = 0x7B32
+0xE5F2 = 0x7B33
+0xE5F3 = 0x7B34
+0xE5F4 = 0x7B35
+0xE5F5 = 0x7B36
+0xE5F6 = 0x7B37
+0xE5F7 = 0x7B38
+0xE5F8 = 0x7B39
+0xE5F9 = 0x7B3A
+0xE5FA = 0x7B3B
+0xE5FB = 0x7B3C
+0xE5FC = 0x7B3D
+0xE5FD = 0x7B3E
+0xE5FE = 0x7B3F
+0xE5FF = 0x7B40
+0xE600 = 0x7B41
+0xE601 = 0x7B42
+0xE602 = 0x7B43
+0xE603 = 0x7B44
+0xE604 = 0x7B45
+0xE605 = 0x7B46
+0xE606 = 0x7B47
+0xE607 = 0x7B48
+0xE608 = 0x7B49
+0xE609 = 0x7B4A
+0xE60A = 0x7B4B
+0xE60B = 0x7B4C
+0xE60C = 0x7B4D
+0xE60D = 0x7B4E
+0xE60E = 0x7B4F
+0xE60F = 0x7B50
+0xE610 = 0x7B51
+0xE611 = 0x7B52
+0xE612 = 0x7B53
+0xE613 = 0x7B54
+0xE614 = 0x7B55
+0xE615 = 0x7B56
+0xE616 = 0x7B57
+0xE617 = 0x7B58
+0xE618 = 0x7B59
+0xE619 = 0x7B5A
+0xE61A = 0x7B5B
+0xE61B = 0x7B5C
+0xE61C = 0x7B5D
+0xE61D = 0x7B5E
+0xE61E = 0x7B5F
+0xE61F = 0x7B60
+0xE620 = 0x7B61
+0xE621 = 0x7B62
+0xE622 = 0x7B63
+0xE623 = 0x7B64
+0xE624 = 0x7B65
+0xE625 = 0x7B66
+0xE626 = 0x7B67
+0xE627 = 0x7B68
+0xE628 = 0x7B69
+0xE629 = 0x7B6A
+0xE62A = 0x7B6B
+0xE62B = 0x7B6C
+0xE62C = 0x7B6D
+0xE62D = 0x7B6E
+0xE62E = 0x7B6F
+0xE62F = 0x7B70
+0xE630 = 0x7B71
+0xE631 = 0x7B72
+0xE632 = 0x7B73
+0xE633 = 0x7B74
+0xE634 = 0x7B75
+0xE635 = 0x7B76
+0xE636 = 0x7B77
+0xE637 = 0x7B78
+0xE638 = 0x7B79
+0xE639 = 0x7B7A
+0xE63A = 0x7B7B
+0xE63B = 0x7B7C
+0xE63C = 0x7B7D
+0xE63D = 0x7B7E
+0xE63E = 0x7C21
+0xE63F = 0x7C22
+0xE640 = 0x7C23
+0xE641 = 0x7C24
+0xE642 = 0x7C25
+0xE643 = 0x7C26
+0xE644 = 0x7C27
+0xE645 = 0x7C28
+0xE646 = 0x7C29
+0xE647 = 0x7C2A
+0xE648 = 0x7C2B
+0xE649 = 0x7C2C
+0xE64A = 0x7C2D
+0xE64B = 0x7C2E
+0xE64C = 0x7C2F
+0xE64D = 0x7C30
+0xE64E = 0x7C31
+0xE64F = 0x7C32
+0xE650 = 0x7C33
+0xE651 = 0x7C34
+0xE652 = 0x7C35
+0xE653 = 0x7C36
+0xE654 = 0x7C37
+0xE655 = 0x7C38
+0xE656 = 0x7C39
+0xE657 = 0x7C3A
+0xE658 = 0x7C3B
+0xE659 = 0x7C3C
+0xE65A = 0x7C3D
+0xE65B = 0x7C3E
+0xE65C = 0x7C3F
+0xE65D = 0x7C40
+0xE65E = 0x7C41
+0xE65F = 0x7C42
+0xE660 = 0x7C43
+0xE661 = 0x7C44
+0xE662 = 0x7C45
+0xE663 = 0x7C46
+0xE664 = 0x7C47
+0xE665 = 0x7C48
+0xE666 = 0x7C49
+0xE667 = 0x7C4A
+0xE668 = 0x7C4B
+0xE669 = 0x7C4C
+0xE66A = 0x7C4D
+0xE66B = 0x7C4E
+0xE66C = 0x7C4F
+0xE66D = 0x7C50
+0xE66E = 0x7C51
+0xE66F = 0x7C52
+0xE670 = 0x7C53
+0xE671 = 0x7C54
+0xE672 = 0x7C55
+0xE673 = 0x7C56
+0xE674 = 0x7C57
+0xE675 = 0x7C58
+0xE676 = 0x7C59
+0xE677 = 0x7C5A
+0xE678 = 0x7C5B
+0xE679 = 0x7C5C
+0xE67A = 0x7C5D
+0xE67B = 0x7C5E
+0xE67C = 0x7C5F
+0xE67D = 0x7C60
+0xE67E = 0x7C61
+0xE67F = 0x7C62
+0xE680 = 0x7C63
+0xE681 = 0x7C64
+0xE682 = 0x7C65
+0xE683 = 0x7C66
+0xE684 = 0x7C67
+0xE685 = 0x7C68
+0xE686 = 0x7C69
+0xE687 = 0x7C6A
+0xE688 = 0x7C6B
+0xE689 = 0x7C6C
+0xE68A = 0x7C6D
+0xE68B = 0x7C6E
+0xE68C = 0x7C6F
+0xE68D = 0x7C70
+0xE68E = 0x7C71
+0xE68F = 0x7C72
+0xE690 = 0x7C73
+0xE691 = 0x7C74
+0xE692 = 0x7C75
+0xE693 = 0x7C76
+0xE694 = 0x7C77
+0xE695 = 0x7C78
+0xE696 = 0x7C79
+0xE697 = 0x7C7A
+0xE698 = 0x7C7B
+0xE699 = 0x7C7C
+0xE69A = 0x7C7D
+0xE69B = 0x7C7E
+0xE69C = 0x7D21
+0xE69D = 0x7D22
+0xE69E = 0x7D23
+0xE69F = 0x7D24
+0xE6A0 = 0x7D25
+0xE6A1 = 0x7D26
+0xE6A2 = 0x7D27
+0xE6A3 = 0x7D28
+0xE6A4 = 0x7D29
+0xE6A5 = 0x7D2A
+0xE6A6 = 0x7D2B
+0xE6A7 = 0x7D2C
+0xE6A8 = 0x7D2D
+0xE6A9 = 0x7D2E
+0xE6AA = 0x7D2F
+0xE6AB = 0x7D30
+0xE6AC = 0x7D31
+0xE6AD = 0x7D32
+0xE6AE = 0x7D33
+0xE6AF = 0x7D34
+0xE6B0 = 0x7D35
+0xE6B1 = 0x7D36
+0xE6B2 = 0x7D37
+0xE6B3 = 0x7D38
+0xE6B4 = 0x7D39
+0xE6B5 = 0x7D3A
+0xE6B6 = 0x7D3B
+0xE6B7 = 0x7D3C
+0xE6B8 = 0x7D3D
+0xE6B9 = 0x7D3E
+0xE6BA = 0x7D3F
+0xE6BB = 0x7D40
+0xE6BC = 0x7D41
+0xE6BD = 0x7D42
+0xE6BE = 0x7D43
+0xE6BF = 0x7D44
+0xE6C0 = 0x7D45
+0xE6C1 = 0x7D46
+0xE6C2 = 0x7D47
+0xE6C3 = 0x7D48
+0xE6C4 = 0x7D49
+0xE6C5 = 0x7D4A
+0xE6C6 = 0x7D4B
+0xE6C7 = 0x7D4C
+0xE6C8 = 0x7D4D
+0xE6C9 = 0x7D4E
+0xE6CA = 0x7D4F
+0xE6CB = 0x7D50
+0xE6CC = 0x7D51
+0xE6CD = 0x7D52
+0xE6CE = 0x7D53
+0xE6CF = 0x7D54
+0xE6D0 = 0x7D55
+0xE6D1 = 0x7D56
+0xE6D2 = 0x7D57
+0xE6D3 = 0x7D58
+0xE6D4 = 0x7D59
+0xE6D5 = 0x7D5A
+0xE6D6 = 0x7D5B
+0xE6D7 = 0x7D5C
+0xE6D8 = 0x7D5D
+0xE6D9 = 0x7D5E
+0xE6DA = 0x7D5F
+0xE6DB = 0x7D60
+0xE6DC = 0x7D61
+0xE6DD = 0x7D62
+0xE6DE = 0x7D63
+0xE6DF = 0x7D64
+0xE6E0 = 0x7D65
+0xE6E1 = 0x7D66
+0xE6E2 = 0x7D67
+0xE6E3 = 0x7D68
+0xE6E4 = 0x7D69
+0xE6E5 = 0x7D6A
+0xE6E6 = 0x7D6B
+0xE6E7 = 0x7D6C
+0xE6E8 = 0x7D6D
+0xE6E9 = 0x7D6E
+0xE6EA = 0x7D6F
+0xE6EB = 0x7D70
+0xE6EC = 0x7D71
+0xE6ED = 0x7D72
+0xE6EE = 0x7D73
+0xE6EF = 0x7D74
+0xE6F0 = 0x7D75
+0xE6F1 = 0x7D76
+0xE6F2 = 0x7D77
+0xE6F3 = 0x7D78
+0xE6F4 = 0x7D79
+0xE6F5 = 0x7D7A
+0xE6F6 = 0x7D7B
+0xE6F7 = 0x7D7C
+0xE6F8 = 0x7D7D
+0xE6F9 = 0x7D7E
+0xE6FA = 0x7E21
+0xE6FB = 0x7E22
+0xE6FC = 0x7E23
+0xE6FD = 0x7E24
+0xE6FE = 0x7E25
+0xE6FF = 0x7E26
+0xE700 = 0x7E27
+0xE701 = 0x7E28
+0xE702 = 0x7E29
+0xE703 = 0x7E2A
+0xE704 = 0x7E2B
+0xE705 = 0x7E2C
+0xE706 = 0x7E2D
+0xE707 = 0x7E2E
+0xE708 = 0x7E2F
+0xE709 = 0x7E30
+0xE70A = 0x7E31
+0xE70B = 0x7E32
+0xE70C = 0x7E33
+0xE70D = 0x7E34
+0xE70E = 0x7E35
+0xE70F = 0x7E36
+0xE710 = 0x7E37
+0xE711 = 0x7E38
+0xE712 = 0x7E39
+0xE713 = 0x7E3A
+0xE714 = 0x7E3B
+0xE715 = 0x7E3C
+0xE716 = 0x7E3D
+0xE717 = 0x7E3E
+0xE718 = 0x7E3F
+0xE719 = 0x7E40
+0xE71A = 0x7E41
+0xE71B = 0x7E42
+0xE71C = 0x7E43
+0xE71D = 0x7E44
+0xE71E = 0x7E45
+0xE71F = 0x7E46
+0xE720 = 0x7E47
+0xE721 = 0x7E48
+0xE722 = 0x7E49
+0xE723 = 0x7E4A
+0xE724 = 0x7E4B
+0xE725 = 0x7E4C
+0xE726 = 0x7E4D
+0xE727 = 0x7E4E
+0xE728 = 0x7E4F
+0xE729 = 0x7E50
+0xE72A = 0x7E51
+0xE72B = 0x7E52
+0xE72C = 0x7E53
+0xE72D = 0x7E54
+0xE72E = 0x7E55
+0xE72F = 0x7E56
+0xE730 = 0x7E57
+0xE731 = 0x7E58
+0xE732 = 0x7E59
+0xE733 = 0x7E5A
+0xE734 = 0x7E5B
+0xE735 = 0x7E5C
+0xE736 = 0x7E5D
+0xE737 = 0x7E5E
+0xE738 = 0x7E5F
+0xE739 = 0x7E60
+0xE73A = 0x7E61
+0xE73B = 0x7E62
+0xE73C = 0x7E63
+0xE73D = 0x7E64
+0xE73E = 0x7E65
+0xE73F = 0x7E66
+0xE740 = 0x7E67
+0xE741 = 0x7E68
+0xE742 = 0x7E69
+0xE743 = 0x7E6A
+0xE744 = 0x7E6B
+0xE745 = 0x7E6C
+0xE746 = 0x7E6D
+0xE747 = 0x7E6E
+0xE748 = 0x7E6F
+0xE749 = 0x7E70
+0xE74A = 0x7E71
+0xE74B = 0x7E72
+0xE74C = 0x7E73
+0xE74D = 0x7E74
+0xE74E = 0x7E75
+0xE74F = 0x7E76
+0xE750 = 0x7E77
+0xE751 = 0x7E78
+0xE752 = 0x7E79
+0xE753 = 0x7E7A
+0xE754 = 0x7E7B
+0xE755 = 0x7E7C
+0xE756 = 0x7E7D
+0xE757 = 0x7E7E
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212VDC@IBM.src b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212VDC@IBM.src
new file mode 100644
index 0000000..0863140
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/JIS/UCS%JISX0212VDC@IBM.src
@@ -0,0 +1,121 @@
+# $NetBSD: UCS%JISX0212VDC@IBM.src,v 1.1 2003/07/19 20:20:43 tshiozak Exp $
+
+TYPE		ROWCOL
+NAME		"UCS/JISX0212VDC:IBM"
+SRC_ZONE	0x2116 - 0xFF07
+OOB_MODE	INVALID
+DST_INVALID	0xFFFF
+DST_UNIT_BITS	16
+
+BEGIN_MAP
+0x2116 - 0xFF07		= INVALID
+#
+# This data is derived from http://www.opengroup.or.jp/jvc/cde/
+#
+0x2116 = 0x742C
+0x2121 = 0x742D
+0x2160 = 0x737D
+0x2161 = 0x737E
+0x2162 = 0x7421
+0x2163 = 0x7422
+0x2164 = 0x7423
+0x2165 = 0x7424
+0x2166 = 0x7425
+0x2167 = 0x7426
+0x2168 = 0x7427
+0x2169 = 0x7428
+0x2170 = 0x7373
+0x2171 = 0x7374
+0x2172 = 0x7375
+0x2173 = 0x7376
+0x2174 = 0x7377
+0x2175 = 0x7378
+0x2176 = 0x7379
+0x2177 = 0x737A
+0x2178 = 0x737B
+0x2179 = 0x737C
+0x3231 = 0x742B
+0x4EFC = 0x742F
+0x50F4 = 0x7430
+0x51EC = 0x7431
+0x5307 = 0x7432
+0x5324 = 0x7433
+0x548A = 0x7435
+0x5759 = 0x7436
+0x589E = 0x7439
+0x5BEC = 0x743A
+0x5CF5 = 0x743B
+0x5D53 = 0x743C
+0x5FB7 = 0x743E
+0x6085 = 0x743F
+0x6120 = 0x7440
+0x654E = 0x7441
+0x663B = 0x7442
+0x6665 = 0x7443
+0x6801 = 0x7446
+0x6A6B = 0x7449
+0x6AE2 = 0x744A
+0x6DF2 = 0x744C
+0x6DF8 = 0x744B
+0x7028 = 0x744D
+0x70BB = 0x742E
+0x7501 = 0x7450
+0x7682 = 0x7451
+0x769E = 0x7452
+0x7930 = 0x7454
+0x7AE7 = 0x7459
+0x7DA0 = 0x745C
+0x7DD6 = 0x745D
+0x8362 = 0x745F
+0x85B0 = 0x7461
+0x8807 = 0x7464
+0x8B7F = 0x7466
+0x8CF4 = 0x7467
+0x8D76 = 0x7468
+0x90DE = 0x746C
+0x9115 = 0x746E
+0x9592 = 0x7471
+0x973B = 0x7474
+0x974D = 0x7475
+0x9751 = 0x7476
+0x999E = 0x747A
+0x9AD9 = 0x747B
+0x9B72 = 0x747C
+0x9ED1 = 0x747E
+0xF929 = 0x7445
+0xF9DC = 0x7472
+0xFA0E = 0x7434
+0xFA0F = 0x7437
+0xFA10 = 0x7438
+0xFA11 = 0x743D
+0xFA12 = 0x7444
+0xFA13 = 0x7447
+0xFA14 = 0x7448
+0xFA15 = 0x744E
+0xFA16 = 0x744F
+0xFA17 = 0x7453
+0xFA18 = 0x7455
+0xFA19 = 0x7456
+0xFA1A = 0x7457
+0xFA1B = 0x7458
+0xFA1C = 0x745A
+0xFA1D = 0x745B
+0xFA1E = 0x745E
+0xFA1F = 0x7460
+0xFA20 = 0x7462
+0xFA21 = 0x7463
+0xFA22 = 0x7465
+0xFA23 = 0x7469
+0xFA24 = 0x746A
+0xFA25 = 0x746B
+0xFA26 = 0x746D
+0xFA27 = 0x746F
+0xFA28 = 0x7470
+0xFA29 = 0x7473
+0xFA2A = 0x7477
+0xFA2B = 0x7478
+0xFA2C = 0x7479
+0xFA2D = 0x747D
+0xFF02 = 0x742A
+0xFF07 = 0x7429
+END_MAP
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/cp850-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/cp850-tbl.rb
new file mode 100644
index 0000000..615d3b2
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/cp850-tbl.rb
@@ -0,0 +1,130 @@
+CP850_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["BD",0xA2],
+  ["9C",0xA3],
+  ["CF",0xA4],
+  ["BE",0xA5],
+  ["DD",0xA6],
+  ["F5",0xA7],
+  ["F9",0xA8],
+  ["B8",0xA9],
+  ["A6",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F0",0xAD],
+  ["A9",0xAE],
+  ["EE",0xAF],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["FC",0xB3],
+  ["EF",0xB4],
+  ["E6",0xB5],
+  ["F4",0xB6],
+  ["FA",0xB7],
+  ["F7",0xB8],
+  ["FB",0xB9],
+  ["A7",0xBA],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["F3",0xBE],
+  ["A8",0xBF],
+  ["B7",0xC0],
+  ["B5",0xC1],
+  ["B6",0xC2],
+  ["C7",0xC3],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["80",0xC7],
+  ["D4",0xC8],
+  ["90",0xC9],
+  ["D2",0xCA],
+  ["D3",0xCB],
+  ["DE",0xCC],
+  ["D6",0xCD],
+  ["D7",0xCE],
+  ["D8",0xCF],
+  ["D1",0xD0],
+  ["A5",0xD1],
+  ["E3",0xD2],
+  ["E0",0xD3],
+  ["E2",0xD4],
+  ["E5",0xD5],
+  ["99",0xD6],
+  ["9E",0xD7],
+  ["9D",0xD8],
+  ["EB",0xD9],
+  ["E9",0xDA],
+  ["EA",0xDB],
+  ["9A",0xDC],
+  ["ED",0xDD],
+  ["E8",0xDE],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["C6",0xE3],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["8D",0xEC],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["8B",0xEF],
+  ["D0",0xF0],
+  ["A4",0xF1],
+  ["95",0xF2],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["E4",0xF5],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["9B",0xF8],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["EC",0xFD],
+  ["E7",0xFE],
+  ["98",0xFF],
+  ["D5",0x131],
+  ["9F",0x192],
+  ["F2",0x2017],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/cp852-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/cp852-tbl.rb
new file mode 100644
index 0000000..6763bfa
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/cp852-tbl.rb
@@ -0,0 +1,130 @@
+CP852_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["CF",0xA4],
+  ["F5",0xA7],
+  ["F9",0xA8],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F0",0xAD],
+  ["F8",0xB0],
+  ["EF",0xB4],
+  ["F7",0xB8],
+  ["AF",0xBB],
+  ["B5",0xC1],
+  ["B6",0xC2],
+  ["8E",0xC4],
+  ["80",0xC7],
+  ["90",0xC9],
+  ["D3",0xCB],
+  ["D6",0xCD],
+  ["D7",0xCE],
+  ["E0",0xD3],
+  ["E2",0xD4],
+  ["99",0xD6],
+  ["9E",0xD7],
+  ["E9",0xDA],
+  ["9A",0xDC],
+  ["ED",0xDD],
+  ["E1",0xDF],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE4],
+  ["87",0xE7],
+  ["82",0xE9],
+  ["89",0xEB],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["A3",0xFA],
+  ["81",0xFC],
+  ["EC",0xFD],
+  ["C6",0x102],
+  ["C7",0x103],
+  ["A4",0x104],
+  ["A5",0x105],
+  ["8F",0x106],
+  ["86",0x107],
+  ["AC",0x10C],
+  ["9F",0x10D],
+  ["D2",0x10E],
+  ["D4",0x10F],
+  ["D1",0x110],
+  ["D0",0x111],
+  ["A8",0x118],
+  ["A9",0x119],
+  ["B7",0x11A],
+  ["D8",0x11B],
+  ["91",0x139],
+  ["92",0x13A],
+  ["95",0x13D],
+  ["96",0x13E],
+  ["9D",0x141],
+  ["88",0x142],
+  ["E3",0x143],
+  ["E4",0x144],
+  ["D5",0x147],
+  ["E5",0x148],
+  ["8A",0x150],
+  ["8B",0x151],
+  ["E8",0x154],
+  ["EA",0x155],
+  ["FC",0x158],
+  ["FD",0x159],
+  ["97",0x15A],
+  ["98",0x15B],
+  ["B8",0x15E],
+  ["AD",0x15F],
+  ["E6",0x160],
+  ["E7",0x161],
+  ["DD",0x162],
+  ["EE",0x163],
+  ["9B",0x164],
+  ["9C",0x165],
+  ["DE",0x16E],
+  ["85",0x16F],
+  ["EB",0x170],
+  ["FB",0x171],
+  ["8D",0x179],
+  ["AB",0x17A],
+  ["BD",0x17B],
+  ["BE",0x17C],
+  ["A6",0x17D],
+  ["A7",0x17E],
+  ["F3",0x2C7],
+  ["F4",0x2D8],
+  ["FA",0x2D9],
+  ["F2",0x2DB],
+  ["F1",0x2DD],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/cp855-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/cp855-tbl.rb
new file mode 100644
index 0000000..72e548b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/cp855-tbl.rb
@@ -0,0 +1,130 @@
+CP855_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["CF",0xA4],
+  ["FD",0xA7],
+  ["AE",0xAB],
+  ["F0",0xAD],
+  ["AF",0xBB],
+  ["85",0x401],
+  ["81",0x402],
+  ["83",0x403],
+  ["87",0x404],
+  ["89",0x405],
+  ["8B",0x406],
+  ["8D",0x407],
+  ["8F",0x408],
+  ["91",0x409],
+  ["93",0x40A],
+  ["95",0x40B],
+  ["97",0x40C],
+  ["99",0x40E],
+  ["9B",0x40F],
+  ["A1",0x410],
+  ["A3",0x411],
+  ["EC",0x412],
+  ["AD",0x413],
+  ["A7",0x414],
+  ["A9",0x415],
+  ["EA",0x416],
+  ["F4",0x417],
+  ["B8",0x418],
+  ["BE",0x419],
+  ["C7",0x41A],
+  ["D1",0x41B],
+  ["D3",0x41C],
+  ["D5",0x41D],
+  ["D7",0x41E],
+  ["DD",0x41F],
+  ["E2",0x420],
+  ["E4",0x421],
+  ["E6",0x422],
+  ["E8",0x423],
+  ["AB",0x424],
+  ["B6",0x425],
+  ["A5",0x426],
+  ["FC",0x427],
+  ["F6",0x428],
+  ["FA",0x429],
+  ["9F",0x42A],
+  ["F2",0x42B],
+  ["EE",0x42C],
+  ["F8",0x42D],
+  ["9D",0x42E],
+  ["E0",0x42F],
+  ["A0",0x430],
+  ["A2",0x431],
+  ["EB",0x432],
+  ["AC",0x433],
+  ["A6",0x434],
+  ["A8",0x435],
+  ["E9",0x436],
+  ["F3",0x437],
+  ["B7",0x438],
+  ["BD",0x439],
+  ["C6",0x43A],
+  ["D0",0x43B],
+  ["D2",0x43C],
+  ["D4",0x43D],
+  ["D6",0x43E],
+  ["D8",0x43F],
+  ["E1",0x440],
+  ["E3",0x441],
+  ["E5",0x442],
+  ["E7",0x443],
+  ["AA",0x444],
+  ["B5",0x445],
+  ["A4",0x446],
+  ["FB",0x447],
+  ["F5",0x448],
+  ["F9",0x449],
+  ["9E",0x44A],
+  ["F1",0x44B],
+  ["ED",0x44C],
+  ["F7",0x44D],
+  ["9C",0x44E],
+  ["DE",0x44F],
+  ["84",0x451],
+  ["80",0x452],
+  ["82",0x453],
+  ["86",0x454],
+  ["88",0x455],
+  ["8A",0x456],
+  ["8C",0x457],
+  ["8E",0x458],
+  ["90",0x459],
+  ["92",0x45A],
+  ["94",0x45B],
+  ["96",0x45C],
+  ["98",0x45E],
+  ["9A",0x45F],
+  ["EF",0x2116],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/cp949-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/cp949-tbl.rb
new file mode 100644
index 0000000..0e47353
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/cp949-tbl.rb
@@ -0,0 +1,8831 @@
+require 'euckr-tbl'
+
+CP949_TO_UCS_ADDITIONAL_TBL = [
+  ["8141",0xAC02],
+  ["8142",0xAC03],
+  ["8143",0xAC05],
+  ["8144",0xAC06],
+  ["8145",0xAC0B],
+  ["8146",0xAC0C],
+  ["8147",0xAC0D],
+  ["8148",0xAC0E],
+  ["8149",0xAC0F],
+  ["814A",0xAC18],
+  ["814B",0xAC1E],
+  ["814C",0xAC1F],
+  ["814D",0xAC21],
+  ["814E",0xAC22],
+  ["814F",0xAC23],
+  ["8150",0xAC25],
+  ["8151",0xAC26],
+  ["8152",0xAC27],
+  ["8153",0xAC28],
+  ["8154",0xAC29],
+  ["8155",0xAC2A],
+  ["8156",0xAC2B],
+  ["8157",0xAC2E],
+  ["8158",0xAC32],
+  ["8159",0xAC33],
+  ["815A",0xAC34],
+  ["8161",0xAC35],
+  ["8162",0xAC36],
+  ["8163",0xAC37],
+  ["8164",0xAC3A],
+  ["8165",0xAC3B],
+  ["8166",0xAC3D],
+  ["8167",0xAC3E],
+  ["8168",0xAC3F],
+  ["8169",0xAC41],
+  ["816A",0xAC42],
+  ["816B",0xAC43],
+  ["816C",0xAC44],
+  ["816D",0xAC45],
+  ["816E",0xAC46],
+  ["816F",0xAC47],
+  ["8170",0xAC48],
+  ["8171",0xAC49],
+  ["8172",0xAC4A],
+  ["8173",0xAC4C],
+  ["8174",0xAC4E],
+  ["8175",0xAC4F],
+  ["8176",0xAC50],
+  ["8177",0xAC51],
+  ["8178",0xAC52],
+  ["8179",0xAC53],
+  ["817A",0xAC55],
+  ["8181",0xAC56],
+  ["8182",0xAC57],
+  ["8183",0xAC59],
+  ["8184",0xAC5A],
+  ["8185",0xAC5B],
+  ["8186",0xAC5D],
+  ["8187",0xAC5E],
+  ["8188",0xAC5F],
+  ["8189",0xAC60],
+  ["818A",0xAC61],
+  ["818B",0xAC62],
+  ["818C",0xAC63],
+  ["818D",0xAC64],
+  ["818E",0xAC65],
+  ["818F",0xAC66],
+  ["8190",0xAC67],
+  ["8191",0xAC68],
+  ["8192",0xAC69],
+  ["8193",0xAC6A],
+  ["8194",0xAC6B],
+  ["8195",0xAC6C],
+  ["8196",0xAC6D],
+  ["8197",0xAC6E],
+  ["8198",0xAC6F],
+  ["8199",0xAC72],
+  ["819A",0xAC73],
+  ["819B",0xAC75],
+  ["819C",0xAC76],
+  ["819D",0xAC79],
+  ["819E",0xAC7B],
+  ["819F",0xAC7C],
+  ["81A0",0xAC7D],
+  ["81A1",0xAC7E],
+  ["81A2",0xAC7F],
+  ["81A3",0xAC82],
+  ["81A4",0xAC87],
+  ["81A5",0xAC88],
+  ["81A6",0xAC8D],
+  ["81A7",0xAC8E],
+  ["81A8",0xAC8F],
+  ["81A9",0xAC91],
+  ["81AA",0xAC92],
+  ["81AB",0xAC93],
+  ["81AC",0xAC95],
+  ["81AD",0xAC96],
+  ["81AE",0xAC97],
+  ["81AF",0xAC98],
+  ["81B0",0xAC99],
+  ["81B1",0xAC9A],
+  ["81B2",0xAC9B],
+  ["81B3",0xAC9E],
+  ["81B4",0xACA2],
+  ["81B5",0xACA3],
+  ["81B6",0xACA4],
+  ["81B7",0xACA5],
+  ["81B8",0xACA6],
+  ["81B9",0xACA7],
+  ["81BA",0xACAB],
+  ["81BB",0xACAD],
+  ["81BC",0xACAE],
+  ["81BD",0xACB1],
+  ["81BE",0xACB2],
+  ["81BF",0xACB3],
+  ["81C0",0xACB4],
+  ["81C1",0xACB5],
+  ["81C2",0xACB6],
+  ["81C3",0xACB7],
+  ["81C4",0xACBA],
+  ["81C5",0xACBE],
+  ["81C6",0xACBF],
+  ["81C7",0xACC0],
+  ["81C8",0xACC2],
+  ["81C9",0xACC3],
+  ["81CA",0xACC5],
+  ["81CB",0xACC6],
+  ["81CC",0xACC7],
+  ["81CD",0xACC9],
+  ["81CE",0xACCA],
+  ["81CF",0xACCB],
+  ["81D0",0xACCD],
+  ["81D1",0xACCE],
+  ["81D2",0xACCF],
+  ["81D3",0xACD0],
+  ["81D4",0xACD1],
+  ["81D5",0xACD2],
+  ["81D6",0xACD3],
+  ["81D7",0xACD4],
+  ["81D8",0xACD6],
+  ["81D9",0xACD8],
+  ["81DA",0xACD9],
+  ["81DB",0xACDA],
+  ["81DC",0xACDB],
+  ["81DD",0xACDC],
+  ["81DE",0xACDD],
+  ["81DF",0xACDE],
+  ["81E0",0xACDF],
+  ["81E1",0xACE2],
+  ["81E2",0xACE3],
+  ["81E3",0xACE5],
+  ["81E4",0xACE6],
+  ["81E5",0xACE9],
+  ["81E6",0xACEB],
+  ["81E7",0xACED],
+  ["81E8",0xACEE],
+  ["81E9",0xACF2],
+  ["81EA",0xACF4],
+  ["81EB",0xACF7],
+  ["81EC",0xACF8],
+  ["81ED",0xACF9],
+  ["81EE",0xACFA],
+  ["81EF",0xACFB],
+  ["81F0",0xACFE],
+  ["81F1",0xACFF],
+  ["81F2",0xAD01],
+  ["81F3",0xAD02],
+  ["81F4",0xAD03],
+  ["81F5",0xAD05],
+  ["81F6",0xAD07],
+  ["81F7",0xAD08],
+  ["81F8",0xAD09],
+  ["81F9",0xAD0A],
+  ["81FA",0xAD0B],
+  ["81FB",0xAD0E],
+  ["81FC",0xAD10],
+  ["81FD",0xAD12],
+  ["81FE",0xAD13],
+  ["8241",0xAD14],
+  ["8242",0xAD15],
+  ["8243",0xAD16],
+  ["8244",0xAD17],
+  ["8245",0xAD19],
+  ["8246",0xAD1A],
+  ["8247",0xAD1B],
+  ["8248",0xAD1D],
+  ["8249",0xAD1E],
+  ["824A",0xAD1F],
+  ["824B",0xAD21],
+  ["824C",0xAD22],
+  ["824D",0xAD23],
+  ["824E",0xAD24],
+  ["824F",0xAD25],
+  ["8250",0xAD26],
+  ["8251",0xAD27],
+  ["8252",0xAD28],
+  ["8253",0xAD2A],
+  ["8254",0xAD2B],
+  ["8255",0xAD2E],
+  ["8256",0xAD2F],
+  ["8257",0xAD30],
+  ["8258",0xAD31],
+  ["8259",0xAD32],
+  ["825A",0xAD33],
+  ["8261",0xAD36],
+  ["8262",0xAD37],
+  ["8263",0xAD39],
+  ["8264",0xAD3A],
+  ["8265",0xAD3B],
+  ["8266",0xAD3D],
+  ["8267",0xAD3E],
+  ["8268",0xAD3F],
+  ["8269",0xAD40],
+  ["826A",0xAD41],
+  ["826B",0xAD42],
+  ["826C",0xAD43],
+  ["826D",0xAD46],
+  ["826E",0xAD48],
+  ["826F",0xAD4A],
+  ["8270",0xAD4B],
+  ["8271",0xAD4C],
+  ["8272",0xAD4D],
+  ["8273",0xAD4E],
+  ["8274",0xAD4F],
+  ["8275",0xAD51],
+  ["8276",0xAD52],
+  ["8277",0xAD53],
+  ["8278",0xAD55],
+  ["8279",0xAD56],
+  ["827A",0xAD57],
+  ["8281",0xAD59],
+  ["8282",0xAD5A],
+  ["8283",0xAD5B],
+  ["8284",0xAD5C],
+  ["8285",0xAD5D],
+  ["8286",0xAD5E],
+  ["8287",0xAD5F],
+  ["8288",0xAD60],
+  ["8289",0xAD62],
+  ["828A",0xAD64],
+  ["828B",0xAD65],
+  ["828C",0xAD66],
+  ["828D",0xAD67],
+  ["828E",0xAD68],
+  ["828F",0xAD69],
+  ["8290",0xAD6A],
+  ["8291",0xAD6B],
+  ["8292",0xAD6E],
+  ["8293",0xAD6F],
+  ["8294",0xAD71],
+  ["8295",0xAD72],
+  ["8296",0xAD77],
+  ["8297",0xAD78],
+  ["8298",0xAD79],
+  ["8299",0xAD7A],
+  ["829A",0xAD7E],
+  ["829B",0xAD80],
+  ["829C",0xAD83],
+  ["829D",0xAD84],
+  ["829E",0xAD85],
+  ["829F",0xAD86],
+  ["82A0",0xAD87],
+  ["82A1",0xAD8A],
+  ["82A2",0xAD8B],
+  ["82A3",0xAD8D],
+  ["82A4",0xAD8E],
+  ["82A5",0xAD8F],
+  ["82A6",0xAD91],
+  ["82A7",0xAD92],
+  ["82A8",0xAD93],
+  ["82A9",0xAD94],
+  ["82AA",0xAD95],
+  ["82AB",0xAD96],
+  ["82AC",0xAD97],
+  ["82AD",0xAD98],
+  ["82AE",0xAD99],
+  ["82AF",0xAD9A],
+  ["82B0",0xAD9B],
+  ["82B1",0xAD9E],
+  ["82B2",0xAD9F],
+  ["82B3",0xADA0],
+  ["82B4",0xADA1],
+  ["82B5",0xADA2],
+  ["82B6",0xADA3],
+  ["82B7",0xADA5],
+  ["82B8",0xADA6],
+  ["82B9",0xADA7],
+  ["82BA",0xADA8],
+  ["82BB",0xADA9],
+  ["82BC",0xADAA],
+  ["82BD",0xADAB],
+  ["82BE",0xADAC],
+  ["82BF",0xADAD],
+  ["82C0",0xADAE],
+  ["82C1",0xADAF],
+  ["82C2",0xADB0],
+  ["82C3",0xADB1],
+  ["82C4",0xADB2],
+  ["82C5",0xADB3],
+  ["82C6",0xADB4],
+  ["82C7",0xADB5],
+  ["82C8",0xADB6],
+  ["82C9",0xADB8],
+  ["82CA",0xADB9],
+  ["82CB",0xADBA],
+  ["82CC",0xADBB],
+  ["82CD",0xADBC],
+  ["82CE",0xADBD],
+  ["82CF",0xADBE],
+  ["82D0",0xADBF],
+  ["82D1",0xADC2],
+  ["82D2",0xADC3],
+  ["82D3",0xADC5],
+  ["82D4",0xADC6],
+  ["82D5",0xADC7],
+  ["82D6",0xADC9],
+  ["82D7",0xADCA],
+  ["82D8",0xADCB],
+  ["82D9",0xADCC],
+  ["82DA",0xADCD],
+  ["82DB",0xADCE],
+  ["82DC",0xADCF],
+  ["82DD",0xADD2],
+  ["82DE",0xADD4],
+  ["82DF",0xADD5],
+  ["82E0",0xADD6],
+  ["82E1",0xADD7],
+  ["82E2",0xADD8],
+  ["82E3",0xADD9],
+  ["82E4",0xADDA],
+  ["82E5",0xADDB],
+  ["82E6",0xADDD],
+  ["82E7",0xADDE],
+  ["82E8",0xADDF],
+  ["82E9",0xADE1],
+  ["82EA",0xADE2],
+  ["82EB",0xADE3],
+  ["82EC",0xADE5],
+  ["82ED",0xADE6],
+  ["82EE",0xADE7],
+  ["82EF",0xADE8],
+  ["82F0",0xADE9],
+  ["82F1",0xADEA],
+  ["82F2",0xADEB],
+  ["82F3",0xADEC],
+  ["82F4",0xADED],
+  ["82F5",0xADEE],
+  ["82F6",0xADEF],
+  ["82F7",0xADF0],
+  ["82F8",0xADF1],
+  ["82F9",0xADF2],
+  ["82FA",0xADF3],
+  ["82FB",0xADF4],
+  ["82FC",0xADF5],
+  ["82FD",0xADF6],
+  ["82FE",0xADF7],
+  ["8341",0xADFA],
+  ["8342",0xADFB],
+  ["8343",0xADFD],
+  ["8344",0xADFE],
+  ["8345",0xAE02],
+  ["8346",0xAE03],
+  ["8347",0xAE04],
+  ["8348",0xAE05],
+  ["8349",0xAE06],
+  ["834A",0xAE07],
+  ["834B",0xAE0A],
+  ["834C",0xAE0C],
+  ["834D",0xAE0E],
+  ["834E",0xAE0F],
+  ["834F",0xAE10],
+  ["8350",0xAE11],
+  ["8351",0xAE12],
+  ["8352",0xAE13],
+  ["8353",0xAE15],
+  ["8354",0xAE16],
+  ["8355",0xAE17],
+  ["8356",0xAE18],
+  ["8357",0xAE19],
+  ["8358",0xAE1A],
+  ["8359",0xAE1B],
+  ["835A",0xAE1C],
+  ["8361",0xAE1D],
+  ["8362",0xAE1E],
+  ["8363",0xAE1F],
+  ["8364",0xAE20],
+  ["8365",0xAE21],
+  ["8366",0xAE22],
+  ["8367",0xAE23],
+  ["8368",0xAE24],
+  ["8369",0xAE25],
+  ["836A",0xAE26],
+  ["836B",0xAE27],
+  ["836C",0xAE28],
+  ["836D",0xAE29],
+  ["836E",0xAE2A],
+  ["836F",0xAE2B],
+  ["8370",0xAE2C],
+  ["8371",0xAE2D],
+  ["8372",0xAE2E],
+  ["8373",0xAE2F],
+  ["8374",0xAE32],
+  ["8375",0xAE33],
+  ["8376",0xAE35],
+  ["8377",0xAE36],
+  ["8378",0xAE39],
+  ["8379",0xAE3B],
+  ["837A",0xAE3C],
+  ["8381",0xAE3D],
+  ["8382",0xAE3E],
+  ["8383",0xAE3F],
+  ["8384",0xAE42],
+  ["8385",0xAE44],
+  ["8386",0xAE47],
+  ["8387",0xAE48],
+  ["8388",0xAE49],
+  ["8389",0xAE4B],
+  ["838A",0xAE4F],
+  ["838B",0xAE51],
+  ["838C",0xAE52],
+  ["838D",0xAE53],
+  ["838E",0xAE55],
+  ["838F",0xAE57],
+  ["8390",0xAE58],
+  ["8391",0xAE59],
+  ["8392",0xAE5A],
+  ["8393",0xAE5B],
+  ["8394",0xAE5E],
+  ["8395",0xAE62],
+  ["8396",0xAE63],
+  ["8397",0xAE64],
+  ["8398",0xAE66],
+  ["8399",0xAE67],
+  ["839A",0xAE6A],
+  ["839B",0xAE6B],
+  ["839C",0xAE6D],
+  ["839D",0xAE6E],
+  ["839E",0xAE6F],
+  ["839F",0xAE71],
+  ["83A0",0xAE72],
+  ["83A1",0xAE73],
+  ["83A2",0xAE74],
+  ["83A3",0xAE75],
+  ["83A4",0xAE76],
+  ["83A5",0xAE77],
+  ["83A6",0xAE7A],
+  ["83A7",0xAE7E],
+  ["83A8",0xAE7F],
+  ["83A9",0xAE80],
+  ["83AA",0xAE81],
+  ["83AB",0xAE82],
+  ["83AC",0xAE83],
+  ["83AD",0xAE86],
+  ["83AE",0xAE87],
+  ["83AF",0xAE88],
+  ["83B0",0xAE89],
+  ["83B1",0xAE8A],
+  ["83B2",0xAE8B],
+  ["83B3",0xAE8D],
+  ["83B4",0xAE8E],
+  ["83B5",0xAE8F],
+  ["83B6",0xAE90],
+  ["83B7",0xAE91],
+  ["83B8",0xAE92],
+  ["83B9",0xAE93],
+  ["83BA",0xAE94],
+  ["83BB",0xAE95],
+  ["83BC",0xAE96],
+  ["83BD",0xAE97],
+  ["83BE",0xAE98],
+  ["83BF",0xAE99],
+  ["83C0",0xAE9A],
+  ["83C1",0xAE9B],
+  ["83C2",0xAE9C],
+  ["83C3",0xAE9D],
+  ["83C4",0xAE9E],
+  ["83C5",0xAE9F],
+  ["83C6",0xAEA0],
+  ["83C7",0xAEA1],
+  ["83C8",0xAEA2],
+  ["83C9",0xAEA3],
+  ["83CA",0xAEA4],
+  ["83CB",0xAEA5],
+  ["83CC",0xAEA6],
+  ["83CD",0xAEA7],
+  ["83CE",0xAEA8],
+  ["83CF",0xAEA9],
+  ["83D0",0xAEAA],
+  ["83D1",0xAEAB],
+  ["83D2",0xAEAC],
+  ["83D3",0xAEAD],
+  ["83D4",0xAEAE],
+  ["83D5",0xAEAF],
+  ["83D6",0xAEB0],
+  ["83D7",0xAEB1],
+  ["83D8",0xAEB2],
+  ["83D9",0xAEB3],
+  ["83DA",0xAEB4],
+  ["83DB",0xAEB5],
+  ["83DC",0xAEB6],
+  ["83DD",0xAEB7],
+  ["83DE",0xAEB8],
+  ["83DF",0xAEB9],
+  ["83E0",0xAEBA],
+  ["83E1",0xAEBB],
+  ["83E2",0xAEBF],
+  ["83E3",0xAEC1],
+  ["83E4",0xAEC2],
+  ["83E5",0xAEC3],
+  ["83E6",0xAEC5],
+  ["83E7",0xAEC6],
+  ["83E8",0xAEC7],
+  ["83E9",0xAEC8],
+  ["83EA",0xAEC9],
+  ["83EB",0xAECA],
+  ["83EC",0xAECB],
+  ["83ED",0xAECE],
+  ["83EE",0xAED2],
+  ["83EF",0xAED3],
+  ["83F0",0xAED4],
+  ["83F1",0xAED5],
+  ["83F2",0xAED6],
+  ["83F3",0xAED7],
+  ["83F4",0xAEDA],
+  ["83F5",0xAEDB],
+  ["83F6",0xAEDD],
+  ["83F7",0xAEDE],
+  ["83F8",0xAEDF],
+  ["83F9",0xAEE0],
+  ["83FA",0xAEE1],
+  ["83FB",0xAEE2],
+  ["83FC",0xAEE3],
+  ["83FD",0xAEE4],
+  ["83FE",0xAEE5],
+  ["8441",0xAEE6],
+  ["8442",0xAEE7],
+  ["8443",0xAEE9],
+  ["8444",0xAEEA],
+  ["8445",0xAEEC],
+  ["8446",0xAEEE],
+  ["8447",0xAEEF],
+  ["8448",0xAEF0],
+  ["8449",0xAEF1],
+  ["844A",0xAEF2],
+  ["844B",0xAEF3],
+  ["844C",0xAEF5],
+  ["844D",0xAEF6],
+  ["844E",0xAEF7],
+  ["844F",0xAEF9],
+  ["8450",0xAEFA],
+  ["8451",0xAEFB],
+  ["8452",0xAEFD],
+  ["8453",0xAEFE],
+  ["8454",0xAEFF],
+  ["8455",0xAF00],
+  ["8456",0xAF01],
+  ["8457",0xAF02],
+  ["8458",0xAF03],
+  ["8459",0xAF04],
+  ["845A",0xAF05],
+  ["8461",0xAF06],
+  ["8462",0xAF09],
+  ["8463",0xAF0A],
+  ["8464",0xAF0B],
+  ["8465",0xAF0C],
+  ["8466",0xAF0E],
+  ["8467",0xAF0F],
+  ["8468",0xAF11],
+  ["8469",0xAF12],
+  ["846A",0xAF13],
+  ["846B",0xAF14],
+  ["846C",0xAF15],
+  ["846D",0xAF16],
+  ["846E",0xAF17],
+  ["846F",0xAF18],
+  ["8470",0xAF19],
+  ["8471",0xAF1A],
+  ["8472",0xAF1B],
+  ["8473",0xAF1C],
+  ["8474",0xAF1D],
+  ["8475",0xAF1E],
+  ["8476",0xAF1F],
+  ["8477",0xAF20],
+  ["8478",0xAF21],
+  ["8479",0xAF22],
+  ["847A",0xAF23],
+  ["8481",0xAF24],
+  ["8482",0xAF25],
+  ["8483",0xAF26],
+  ["8484",0xAF27],
+  ["8485",0xAF28],
+  ["8486",0xAF29],
+  ["8487",0xAF2A],
+  ["8488",0xAF2B],
+  ["8489",0xAF2E],
+  ["848A",0xAF2F],
+  ["848B",0xAF31],
+  ["848C",0xAF33],
+  ["848D",0xAF35],
+  ["848E",0xAF36],
+  ["848F",0xAF37],
+  ["8490",0xAF38],
+  ["8491",0xAF39],
+  ["8492",0xAF3A],
+  ["8493",0xAF3B],
+  ["8494",0xAF3E],
+  ["8495",0xAF40],
+  ["8496",0xAF44],
+  ["8497",0xAF45],
+  ["8498",0xAF46],
+  ["8499",0xAF47],
+  ["849A",0xAF4A],
+  ["849B",0xAF4B],
+  ["849C",0xAF4C],
+  ["849D",0xAF4D],
+  ["849E",0xAF4E],
+  ["849F",0xAF4F],
+  ["84A0",0xAF51],
+  ["84A1",0xAF52],
+  ["84A2",0xAF53],
+  ["84A3",0xAF54],
+  ["84A4",0xAF55],
+  ["84A5",0xAF56],
+  ["84A6",0xAF57],
+  ["84A7",0xAF58],
+  ["84A8",0xAF59],
+  ["84A9",0xAF5A],
+  ["84AA",0xAF5B],
+  ["84AB",0xAF5E],
+  ["84AC",0xAF5F],
+  ["84AD",0xAF60],
+  ["84AE",0xAF61],
+  ["84AF",0xAF62],
+  ["84B0",0xAF63],
+  ["84B1",0xAF66],
+  ["84B2",0xAF67],
+  ["84B3",0xAF68],
+  ["84B4",0xAF69],
+  ["84B5",0xAF6A],
+  ["84B6",0xAF6B],
+  ["84B7",0xAF6C],
+  ["84B8",0xAF6D],
+  ["84B9",0xAF6E],
+  ["84BA",0xAF6F],
+  ["84BB",0xAF70],
+  ["84BC",0xAF71],
+  ["84BD",0xAF72],
+  ["84BE",0xAF73],
+  ["84BF",0xAF74],
+  ["84C0",0xAF75],
+  ["84C1",0xAF76],
+  ["84C2",0xAF77],
+  ["84C3",0xAF78],
+  ["84C4",0xAF7A],
+  ["84C5",0xAF7B],
+  ["84C6",0xAF7C],
+  ["84C7",0xAF7D],
+  ["84C8",0xAF7E],
+  ["84C9",0xAF7F],
+  ["84CA",0xAF81],
+  ["84CB",0xAF82],
+  ["84CC",0xAF83],
+  ["84CD",0xAF85],
+  ["84CE",0xAF86],
+  ["84CF",0xAF87],
+  ["84D0",0xAF89],
+  ["84D1",0xAF8A],
+  ["84D2",0xAF8B],
+  ["84D3",0xAF8C],
+  ["84D4",0xAF8D],
+  ["84D5",0xAF8E],
+  ["84D6",0xAF8F],
+  ["84D7",0xAF92],
+  ["84D8",0xAF93],
+  ["84D9",0xAF94],
+  ["84DA",0xAF96],
+  ["84DB",0xAF97],
+  ["84DC",0xAF98],
+  ["84DD",0xAF99],
+  ["84DE",0xAF9A],
+  ["84DF",0xAF9B],
+  ["84E0",0xAF9D],
+  ["84E1",0xAF9E],
+  ["84E2",0xAF9F],
+  ["84E3",0xAFA0],
+  ["84E4",0xAFA1],
+  ["84E5",0xAFA2],
+  ["84E6",0xAFA3],
+  ["84E7",0xAFA4],
+  ["84E8",0xAFA5],
+  ["84E9",0xAFA6],
+  ["84EA",0xAFA7],
+  ["84EB",0xAFA8],
+  ["84EC",0xAFA9],
+  ["84ED",0xAFAA],
+  ["84EE",0xAFAB],
+  ["84EF",0xAFAC],
+  ["84F0",0xAFAD],
+  ["84F1",0xAFAE],
+  ["84F2",0xAFAF],
+  ["84F3",0xAFB0],
+  ["84F4",0xAFB1],
+  ["84F5",0xAFB2],
+  ["84F6",0xAFB3],
+  ["84F7",0xAFB4],
+  ["84F8",0xAFB5],
+  ["84F9",0xAFB6],
+  ["84FA",0xAFB7],
+  ["84FB",0xAFBA],
+  ["84FC",0xAFBB],
+  ["84FD",0xAFBD],
+  ["84FE",0xAFBE],
+  ["8541",0xAFBF],
+  ["8542",0xAFC1],
+  ["8543",0xAFC2],
+  ["8544",0xAFC3],
+  ["8545",0xAFC4],
+  ["8546",0xAFC5],
+  ["8547",0xAFC6],
+  ["8548",0xAFCA],
+  ["8549",0xAFCC],
+  ["854A",0xAFCF],
+  ["854B",0xAFD0],
+  ["854C",0xAFD1],
+  ["854D",0xAFD2],
+  ["854E",0xAFD3],
+  ["854F",0xAFD5],
+  ["8550",0xAFD6],
+  ["8551",0xAFD7],
+  ["8552",0xAFD8],
+  ["8553",0xAFD9],
+  ["8554",0xAFDA],
+  ["8555",0xAFDB],
+  ["8556",0xAFDD],
+  ["8557",0xAFDE],
+  ["8558",0xAFDF],
+  ["8559",0xAFE0],
+  ["855A",0xAFE1],
+  ["8561",0xAFE2],
+  ["8562",0xAFE3],
+  ["8563",0xAFE4],
+  ["8564",0xAFE5],
+  ["8565",0xAFE6],
+  ["8566",0xAFE7],
+  ["8567",0xAFEA],
+  ["8568",0xAFEB],
+  ["8569",0xAFEC],
+  ["856A",0xAFED],
+  ["856B",0xAFEE],
+  ["856C",0xAFEF],
+  ["856D",0xAFF2],
+  ["856E",0xAFF3],
+  ["856F",0xAFF5],
+  ["8570",0xAFF6],
+  ["8571",0xAFF7],
+  ["8572",0xAFF9],
+  ["8573",0xAFFA],
+  ["8574",0xAFFB],
+  ["8575",0xAFFC],
+  ["8576",0xAFFD],
+  ["8577",0xAFFE],
+  ["8578",0xAFFF],
+  ["8579",0xB002],
+  ["857A",0xB003],
+  ["8581",0xB005],
+  ["8582",0xB006],
+  ["8583",0xB007],
+  ["8584",0xB008],
+  ["8585",0xB009],
+  ["8586",0xB00A],
+  ["8587",0xB00B],
+  ["8588",0xB00D],
+  ["8589",0xB00E],
+  ["858A",0xB00F],
+  ["858B",0xB011],
+  ["858C",0xB012],
+  ["858D",0xB013],
+  ["858E",0xB015],
+  ["858F",0xB016],
+  ["8590",0xB017],
+  ["8591",0xB018],
+  ["8592",0xB019],
+  ["8593",0xB01A],
+  ["8594",0xB01B],
+  ["8595",0xB01E],
+  ["8596",0xB01F],
+  ["8597",0xB020],
+  ["8598",0xB021],
+  ["8599",0xB022],
+  ["859A",0xB023],
+  ["859B",0xB024],
+  ["859C",0xB025],
+  ["859D",0xB026],
+  ["859E",0xB027],
+  ["859F",0xB029],
+  ["85A0",0xB02A],
+  ["85A1",0xB02B],
+  ["85A2",0xB02C],
+  ["85A3",0xB02D],
+  ["85A4",0xB02E],
+  ["85A5",0xB02F],
+  ["85A6",0xB030],
+  ["85A7",0xB031],
+  ["85A8",0xB032],
+  ["85A9",0xB033],
+  ["85AA",0xB034],
+  ["85AB",0xB035],
+  ["85AC",0xB036],
+  ["85AD",0xB037],
+  ["85AE",0xB038],
+  ["85AF",0xB039],
+  ["85B0",0xB03A],
+  ["85B1",0xB03B],
+  ["85B2",0xB03C],
+  ["85B3",0xB03D],
+  ["85B4",0xB03E],
+  ["85B5",0xB03F],
+  ["85B6",0xB040],
+  ["85B7",0xB041],
+  ["85B8",0xB042],
+  ["85B9",0xB043],
+  ["85BA",0xB046],
+  ["85BB",0xB047],
+  ["85BC",0xB049],
+  ["85BD",0xB04B],
+  ["85BE",0xB04D],
+  ["85BF",0xB04F],
+  ["85C0",0xB050],
+  ["85C1",0xB051],
+  ["85C2",0xB052],
+  ["85C3",0xB056],
+  ["85C4",0xB058],
+  ["85C5",0xB05A],
+  ["85C6",0xB05B],
+  ["85C7",0xB05C],
+  ["85C8",0xB05E],
+  ["85C9",0xB05F],
+  ["85CA",0xB060],
+  ["85CB",0xB061],
+  ["85CC",0xB062],
+  ["85CD",0xB063],
+  ["85CE",0xB064],
+  ["85CF",0xB065],
+  ["85D0",0xB066],
+  ["85D1",0xB067],
+  ["85D2",0xB068],
+  ["85D3",0xB069],
+  ["85D4",0xB06A],
+  ["85D5",0xB06B],
+  ["85D6",0xB06C],
+  ["85D7",0xB06D],
+  ["85D8",0xB06E],
+  ["85D9",0xB06F],
+  ["85DA",0xB070],
+  ["85DB",0xB071],
+  ["85DC",0xB072],
+  ["85DD",0xB073],
+  ["85DE",0xB074],
+  ["85DF",0xB075],
+  ["85E0",0xB076],
+  ["85E1",0xB077],
+  ["85E2",0xB078],
+  ["85E3",0xB079],
+  ["85E4",0xB07A],
+  ["85E5",0xB07B],
+  ["85E6",0xB07E],
+  ["85E7",0xB07F],
+  ["85E8",0xB081],
+  ["85E9",0xB082],
+  ["85EA",0xB083],
+  ["85EB",0xB085],
+  ["85EC",0xB086],
+  ["85ED",0xB087],
+  ["85EE",0xB088],
+  ["85EF",0xB089],
+  ["85F0",0xB08A],
+  ["85F1",0xB08B],
+  ["85F2",0xB08E],
+  ["85F3",0xB090],
+  ["85F4",0xB092],
+  ["85F5",0xB093],
+  ["85F6",0xB094],
+  ["85F7",0xB095],
+  ["85F8",0xB096],
+  ["85F9",0xB097],
+  ["85FA",0xB09B],
+  ["85FB",0xB09D],
+  ["85FC",0xB09E],
+  ["85FD",0xB0A3],
+  ["85FE",0xB0A4],
+  ["8641",0xB0A5],
+  ["8642",0xB0A6],
+  ["8643",0xB0A7],
+  ["8644",0xB0AA],
+  ["8645",0xB0B0],
+  ["8646",0xB0B2],
+  ["8647",0xB0B6],
+  ["8648",0xB0B7],
+  ["8649",0xB0B9],
+  ["864A",0xB0BA],
+  ["864B",0xB0BB],
+  ["864C",0xB0BD],
+  ["864D",0xB0BE],
+  ["864E",0xB0BF],
+  ["864F",0xB0C0],
+  ["8650",0xB0C1],
+  ["8651",0xB0C2],
+  ["8652",0xB0C3],
+  ["8653",0xB0C6],
+  ["8654",0xB0CA],
+  ["8655",0xB0CB],
+  ["8656",0xB0CC],
+  ["8657",0xB0CD],
+  ["8658",0xB0CE],
+  ["8659",0xB0CF],
+  ["865A",0xB0D2],
+  ["8661",0xB0D3],
+  ["8662",0xB0D5],
+  ["8663",0xB0D6],
+  ["8664",0xB0D7],
+  ["8665",0xB0D9],
+  ["8666",0xB0DA],
+  ["8667",0xB0DB],
+  ["8668",0xB0DC],
+  ["8669",0xB0DD],
+  ["866A",0xB0DE],
+  ["866B",0xB0DF],
+  ["866C",0xB0E1],
+  ["866D",0xB0E2],
+  ["866E",0xB0E3],
+  ["866F",0xB0E4],
+  ["8670",0xB0E6],
+  ["8671",0xB0E7],
+  ["8672",0xB0E8],
+  ["8673",0xB0E9],
+  ["8674",0xB0EA],
+  ["8675",0xB0EB],
+  ["8676",0xB0EC],
+  ["8677",0xB0ED],
+  ["8678",0xB0EE],
+  ["8679",0xB0EF],
+  ["867A",0xB0F0],
+  ["8681",0xB0F1],
+  ["8682",0xB0F2],
+  ["8683",0xB0F3],
+  ["8684",0xB0F4],
+  ["8685",0xB0F5],
+  ["8686",0xB0F6],
+  ["8687",0xB0F7],
+  ["8688",0xB0F8],
+  ["8689",0xB0F9],
+  ["868A",0xB0FA],
+  ["868B",0xB0FB],
+  ["868C",0xB0FC],
+  ["868D",0xB0FD],
+  ["868E",0xB0FE],
+  ["868F",0xB0FF],
+  ["8690",0xB100],
+  ["8691",0xB101],
+  ["8692",0xB102],
+  ["8693",0xB103],
+  ["8694",0xB104],
+  ["8695",0xB105],
+  ["8696",0xB106],
+  ["8697",0xB107],
+  ["8698",0xB10A],
+  ["8699",0xB10D],
+  ["869A",0xB10E],
+  ["869B",0xB10F],
+  ["869C",0xB111],
+  ["869D",0xB114],
+  ["869E",0xB115],
+  ["869F",0xB116],
+  ["86A0",0xB117],
+  ["86A1",0xB11A],
+  ["86A2",0xB11E],
+  ["86A3",0xB11F],
+  ["86A4",0xB120],
+  ["86A5",0xB121],
+  ["86A6",0xB122],
+  ["86A7",0xB126],
+  ["86A8",0xB127],
+  ["86A9",0xB129],
+  ["86AA",0xB12A],
+  ["86AB",0xB12B],
+  ["86AC",0xB12D],
+  ["86AD",0xB12E],
+  ["86AE",0xB12F],
+  ["86AF",0xB130],
+  ["86B0",0xB131],
+  ["86B1",0xB132],
+  ["86B2",0xB133],
+  ["86B3",0xB136],
+  ["86B4",0xB13A],
+  ["86B5",0xB13B],
+  ["86B6",0xB13C],
+  ["86B7",0xB13D],
+  ["86B8",0xB13E],
+  ["86B9",0xB13F],
+  ["86BA",0xB142],
+  ["86BB",0xB143],
+  ["86BC",0xB145],
+  ["86BD",0xB146],
+  ["86BE",0xB147],
+  ["86BF",0xB149],
+  ["86C0",0xB14A],
+  ["86C1",0xB14B],
+  ["86C2",0xB14C],
+  ["86C3",0xB14D],
+  ["86C4",0xB14E],
+  ["86C5",0xB14F],
+  ["86C6",0xB152],
+  ["86C7",0xB153],
+  ["86C8",0xB156],
+  ["86C9",0xB157],
+  ["86CA",0xB159],
+  ["86CB",0xB15A],
+  ["86CC",0xB15B],
+  ["86CD",0xB15D],
+  ["86CE",0xB15E],
+  ["86CF",0xB15F],
+  ["86D0",0xB161],
+  ["86D1",0xB162],
+  ["86D2",0xB163],
+  ["86D3",0xB164],
+  ["86D4",0xB165],
+  ["86D5",0xB166],
+  ["86D6",0xB167],
+  ["86D7",0xB168],
+  ["86D8",0xB169],
+  ["86D9",0xB16A],
+  ["86DA",0xB16B],
+  ["86DB",0xB16C],
+  ["86DC",0xB16D],
+  ["86DD",0xB16E],
+  ["86DE",0xB16F],
+  ["86DF",0xB170],
+  ["86E0",0xB171],
+  ["86E1",0xB172],
+  ["86E2",0xB173],
+  ["86E3",0xB174],
+  ["86E4",0xB175],
+  ["86E5",0xB176],
+  ["86E6",0xB177],
+  ["86E7",0xB17A],
+  ["86E8",0xB17B],
+  ["86E9",0xB17D],
+  ["86EA",0xB17E],
+  ["86EB",0xB17F],
+  ["86EC",0xB181],
+  ["86ED",0xB183],
+  ["86EE",0xB184],
+  ["86EF",0xB185],
+  ["86F0",0xB186],
+  ["86F1",0xB187],
+  ["86F2",0xB18A],
+  ["86F3",0xB18C],
+  ["86F4",0xB18E],
+  ["86F5",0xB18F],
+  ["86F6",0xB190],
+  ["86F7",0xB191],
+  ["86F8",0xB195],
+  ["86F9",0xB196],
+  ["86FA",0xB197],
+  ["86FB",0xB199],
+  ["86FC",0xB19A],
+  ["86FD",0xB19B],
+  ["86FE",0xB19D],
+  ["8741",0xB19E],
+  ["8742",0xB19F],
+  ["8743",0xB1A0],
+  ["8744",0xB1A1],
+  ["8745",0xB1A2],
+  ["8746",0xB1A3],
+  ["8747",0xB1A4],
+  ["8748",0xB1A5],
+  ["8749",0xB1A6],
+  ["874A",0xB1A7],
+  ["874B",0xB1A9],
+  ["874C",0xB1AA],
+  ["874D",0xB1AB],
+  ["874E",0xB1AC],
+  ["874F",0xB1AD],
+  ["8750",0xB1AE],
+  ["8751",0xB1AF],
+  ["8752",0xB1B0],
+  ["8753",0xB1B1],
+  ["8754",0xB1B2],
+  ["8755",0xB1B3],
+  ["8756",0xB1B4],
+  ["8757",0xB1B5],
+  ["8758",0xB1B6],
+  ["8759",0xB1B7],
+  ["875A",0xB1B8],
+  ["8761",0xB1B9],
+  ["8762",0xB1BA],
+  ["8763",0xB1BB],
+  ["8764",0xB1BC],
+  ["8765",0xB1BD],
+  ["8766",0xB1BE],
+  ["8767",0xB1BF],
+  ["8768",0xB1C0],
+  ["8769",0xB1C1],
+  ["876A",0xB1C2],
+  ["876B",0xB1C3],
+  ["876C",0xB1C4],
+  ["876D",0xB1C5],
+  ["876E",0xB1C6],
+  ["876F",0xB1C7],
+  ["8770",0xB1C8],
+  ["8771",0xB1C9],
+  ["8772",0xB1CA],
+  ["8773",0xB1CB],
+  ["8774",0xB1CD],
+  ["8775",0xB1CE],
+  ["8776",0xB1CF],
+  ["8777",0xB1D1],
+  ["8778",0xB1D2],
+  ["8779",0xB1D3],
+  ["877A",0xB1D5],
+  ["8781",0xB1D6],
+  ["8782",0xB1D7],
+  ["8783",0xB1D8],
+  ["8784",0xB1D9],
+  ["8785",0xB1DA],
+  ["8786",0xB1DB],
+  ["8787",0xB1DE],
+  ["8788",0xB1E0],
+  ["8789",0xB1E1],
+  ["878A",0xB1E2],
+  ["878B",0xB1E3],
+  ["878C",0xB1E4],
+  ["878D",0xB1E5],
+  ["878E",0xB1E6],
+  ["878F",0xB1E7],
+  ["8790",0xB1EA],
+  ["8791",0xB1EB],
+  ["8792",0xB1ED],
+  ["8793",0xB1EE],
+  ["8794",0xB1EF],
+  ["8795",0xB1F1],
+  ["8796",0xB1F2],
+  ["8797",0xB1F3],
+  ["8798",0xB1F4],
+  ["8799",0xB1F5],
+  ["879A",0xB1F6],
+  ["879B",0xB1F7],
+  ["879C",0xB1F8],
+  ["879D",0xB1FA],
+  ["879E",0xB1FC],
+  ["879F",0xB1FE],
+  ["87A0",0xB1FF],
+  ["87A1",0xB200],
+  ["87A2",0xB201],
+  ["87A3",0xB202],
+  ["87A4",0xB203],
+  ["87A5",0xB206],
+  ["87A6",0xB207],
+  ["87A7",0xB209],
+  ["87A8",0xB20A],
+  ["87A9",0xB20D],
+  ["87AA",0xB20E],
+  ["87AB",0xB20F],
+  ["87AC",0xB210],
+  ["87AD",0xB211],
+  ["87AE",0xB212],
+  ["87AF",0xB213],
+  ["87B0",0xB216],
+  ["87B1",0xB218],
+  ["87B2",0xB21A],
+  ["87B3",0xB21B],
+  ["87B4",0xB21C],
+  ["87B5",0xB21D],
+  ["87B6",0xB21E],
+  ["87B7",0xB21F],
+  ["87B8",0xB221],
+  ["87B9",0xB222],
+  ["87BA",0xB223],
+  ["87BB",0xB224],
+  ["87BC",0xB225],
+  ["87BD",0xB226],
+  ["87BE",0xB227],
+  ["87BF",0xB228],
+  ["87C0",0xB229],
+  ["87C1",0xB22A],
+  ["87C2",0xB22B],
+  ["87C3",0xB22C],
+  ["87C4",0xB22D],
+  ["87C5",0xB22E],
+  ["87C6",0xB22F],
+  ["87C7",0xB230],
+  ["87C8",0xB231],
+  ["87C9",0xB232],
+  ["87CA",0xB233],
+  ["87CB",0xB235],
+  ["87CC",0xB236],
+  ["87CD",0xB237],
+  ["87CE",0xB238],
+  ["87CF",0xB239],
+  ["87D0",0xB23A],
+  ["87D1",0xB23B],
+  ["87D2",0xB23D],
+  ["87D3",0xB23E],
+  ["87D4",0xB23F],
+  ["87D5",0xB240],
+  ["87D6",0xB241],
+  ["87D7",0xB242],
+  ["87D8",0xB243],
+  ["87D9",0xB244],
+  ["87DA",0xB245],
+  ["87DB",0xB246],
+  ["87DC",0xB247],
+  ["87DD",0xB248],
+  ["87DE",0xB249],
+  ["87DF",0xB24A],
+  ["87E0",0xB24B],
+  ["87E1",0xB24C],
+  ["87E2",0xB24D],
+  ["87E3",0xB24E],
+  ["87E4",0xB24F],
+  ["87E5",0xB250],
+  ["87E6",0xB251],
+  ["87E7",0xB252],
+  ["87E8",0xB253],
+  ["87E9",0xB254],
+  ["87EA",0xB255],
+  ["87EB",0xB256],
+  ["87EC",0xB257],
+  ["87ED",0xB259],
+  ["87EE",0xB25A],
+  ["87EF",0xB25B],
+  ["87F0",0xB25D],
+  ["87F1",0xB25E],
+  ["87F2",0xB25F],
+  ["87F3",0xB261],
+  ["87F4",0xB262],
+  ["87F5",0xB263],
+  ["87F6",0xB264],
+  ["87F7",0xB265],
+  ["87F8",0xB266],
+  ["87F9",0xB267],
+  ["87FA",0xB26A],
+  ["87FB",0xB26B],
+  ["87FC",0xB26C],
+  ["87FD",0xB26D],
+  ["87FE",0xB26E],
+  ["8841",0xB26F],
+  ["8842",0xB270],
+  ["8843",0xB271],
+  ["8844",0xB272],
+  ["8845",0xB273],
+  ["8846",0xB276],
+  ["8847",0xB277],
+  ["8848",0xB278],
+  ["8849",0xB279],
+  ["884A",0xB27A],
+  ["884B",0xB27B],
+  ["884C",0xB27D],
+  ["884D",0xB27E],
+  ["884E",0xB27F],
+  ["884F",0xB280],
+  ["8850",0xB281],
+  ["8851",0xB282],
+  ["8852",0xB283],
+  ["8853",0xB286],
+  ["8854",0xB287],
+  ["8855",0xB288],
+  ["8856",0xB28A],
+  ["8857",0xB28B],
+  ["8858",0xB28C],
+  ["8859",0xB28D],
+  ["885A",0xB28E],
+  ["8861",0xB28F],
+  ["8862",0xB292],
+  ["8863",0xB293],
+  ["8864",0xB295],
+  ["8865",0xB296],
+  ["8866",0xB297],
+  ["8867",0xB29B],
+  ["8868",0xB29C],
+  ["8869",0xB29D],
+  ["886A",0xB29E],
+  ["886B",0xB29F],
+  ["886C",0xB2A2],
+  ["886D",0xB2A4],
+  ["886E",0xB2A7],
+  ["886F",0xB2A8],
+  ["8870",0xB2A9],
+  ["8871",0xB2AB],
+  ["8872",0xB2AD],
+  ["8873",0xB2AE],
+  ["8874",0xB2AF],
+  ["8875",0xB2B1],
+  ["8876",0xB2B2],
+  ["8877",0xB2B3],
+  ["8878",0xB2B5],
+  ["8879",0xB2B6],
+  ["887A",0xB2B7],
+  ["8881",0xB2B8],
+  ["8882",0xB2B9],
+  ["8883",0xB2BA],
+  ["8884",0xB2BB],
+  ["8885",0xB2BC],
+  ["8886",0xB2BD],
+  ["8887",0xB2BE],
+  ["8888",0xB2BF],
+  ["8889",0xB2C0],
+  ["888A",0xB2C1],
+  ["888B",0xB2C2],
+  ["888C",0xB2C3],
+  ["888D",0xB2C4],
+  ["888E",0xB2C5],
+  ["888F",0xB2C6],
+  ["8890",0xB2C7],
+  ["8891",0xB2CA],
+  ["8892",0xB2CB],
+  ["8893",0xB2CD],
+  ["8894",0xB2CE],
+  ["8895",0xB2CF],
+  ["8896",0xB2D1],
+  ["8897",0xB2D3],
+  ["8898",0xB2D4],
+  ["8899",0xB2D5],
+  ["889A",0xB2D6],
+  ["889B",0xB2D7],
+  ["889C",0xB2DA],
+  ["889D",0xB2DC],
+  ["889E",0xB2DE],
+  ["889F",0xB2DF],
+  ["88A0",0xB2E0],
+  ["88A1",0xB2E1],
+  ["88A2",0xB2E3],
+  ["88A3",0xB2E7],
+  ["88A4",0xB2E9],
+  ["88A5",0xB2EA],
+  ["88A6",0xB2F0],
+  ["88A7",0xB2F1],
+  ["88A8",0xB2F2],
+  ["88A9",0xB2F6],
+  ["88AA",0xB2FC],
+  ["88AB",0xB2FD],
+  ["88AC",0xB2FE],
+  ["88AD",0xB302],
+  ["88AE",0xB303],
+  ["88AF",0xB305],
+  ["88B0",0xB306],
+  ["88B1",0xB307],
+  ["88B2",0xB309],
+  ["88B3",0xB30A],
+  ["88B4",0xB30B],
+  ["88B5",0xB30C],
+  ["88B6",0xB30D],
+  ["88B7",0xB30E],
+  ["88B8",0xB30F],
+  ["88B9",0xB312],
+  ["88BA",0xB316],
+  ["88BB",0xB317],
+  ["88BC",0xB318],
+  ["88BD",0xB319],
+  ["88BE",0xB31A],
+  ["88BF",0xB31B],
+  ["88C0",0xB31D],
+  ["88C1",0xB31E],
+  ["88C2",0xB31F],
+  ["88C3",0xB320],
+  ["88C4",0xB321],
+  ["88C5",0xB322],
+  ["88C6",0xB323],
+  ["88C7",0xB324],
+  ["88C8",0xB325],
+  ["88C9",0xB326],
+  ["88CA",0xB327],
+  ["88CB",0xB328],
+  ["88CC",0xB329],
+  ["88CD",0xB32A],
+  ["88CE",0xB32B],
+  ["88CF",0xB32C],
+  ["88D0",0xB32D],
+  ["88D1",0xB32E],
+  ["88D2",0xB32F],
+  ["88D3",0xB330],
+  ["88D4",0xB331],
+  ["88D5",0xB332],
+  ["88D6",0xB333],
+  ["88D7",0xB334],
+  ["88D8",0xB335],
+  ["88D9",0xB336],
+  ["88DA",0xB337],
+  ["88DB",0xB338],
+  ["88DC",0xB339],
+  ["88DD",0xB33A],
+  ["88DE",0xB33B],
+  ["88DF",0xB33C],
+  ["88E0",0xB33D],
+  ["88E1",0xB33E],
+  ["88E2",0xB33F],
+  ["88E3",0xB340],
+  ["88E4",0xB341],
+  ["88E5",0xB342],
+  ["88E6",0xB343],
+  ["88E7",0xB344],
+  ["88E8",0xB345],
+  ["88E9",0xB346],
+  ["88EA",0xB347],
+  ["88EB",0xB348],
+  ["88EC",0xB349],
+  ["88ED",0xB34A],
+  ["88EE",0xB34B],
+  ["88EF",0xB34C],
+  ["88F0",0xB34D],
+  ["88F1",0xB34E],
+  ["88F2",0xB34F],
+  ["88F3",0xB350],
+  ["88F4",0xB351],
+  ["88F5",0xB352],
+  ["88F6",0xB353],
+  ["88F7",0xB357],
+  ["88F8",0xB359],
+  ["88F9",0xB35A],
+  ["88FA",0xB35D],
+  ["88FB",0xB360],
+  ["88FC",0xB361],
+  ["88FD",0xB362],
+  ["88FE",0xB363],
+  ["8941",0xB366],
+  ["8942",0xB368],
+  ["8943",0xB36A],
+  ["8944",0xB36C],
+  ["8945",0xB36D],
+  ["8946",0xB36F],
+  ["8947",0xB372],
+  ["8948",0xB373],
+  ["8949",0xB375],
+  ["894A",0xB376],
+  ["894B",0xB377],
+  ["894C",0xB379],
+  ["894D",0xB37A],
+  ["894E",0xB37B],
+  ["894F",0xB37C],
+  ["8950",0xB37D],
+  ["8951",0xB37E],
+  ["8952",0xB37F],
+  ["8953",0xB382],
+  ["8954",0xB386],
+  ["8955",0xB387],
+  ["8956",0xB388],
+  ["8957",0xB389],
+  ["8958",0xB38A],
+  ["8959",0xB38B],
+  ["895A",0xB38D],
+  ["8961",0xB38E],
+  ["8962",0xB38F],
+  ["8963",0xB391],
+  ["8964",0xB392],
+  ["8965",0xB393],
+  ["8966",0xB395],
+  ["8967",0xB396],
+  ["8968",0xB397],
+  ["8969",0xB398],
+  ["896A",0xB399],
+  ["896B",0xB39A],
+  ["896C",0xB39B],
+  ["896D",0xB39C],
+  ["896E",0xB39D],
+  ["896F",0xB39E],
+  ["8970",0xB39F],
+  ["8971",0xB3A2],
+  ["8972",0xB3A3],
+  ["8973",0xB3A4],
+  ["8974",0xB3A5],
+  ["8975",0xB3A6],
+  ["8976",0xB3A7],
+  ["8977",0xB3A9],
+  ["8978",0xB3AA],
+  ["8979",0xB3AB],
+  ["897A",0xB3AD],
+  ["8981",0xB3AE],
+  ["8982",0xB3AF],
+  ["8983",0xB3B0],
+  ["8984",0xB3B1],
+  ["8985",0xB3B2],
+  ["8986",0xB3B3],
+  ["8987",0xB3B4],
+  ["8988",0xB3B5],
+  ["8989",0xB3B6],
+  ["898A",0xB3B7],
+  ["898B",0xB3B8],
+  ["898C",0xB3B9],
+  ["898D",0xB3BA],
+  ["898E",0xB3BB],
+  ["898F",0xB3BC],
+  ["8990",0xB3BD],
+  ["8991",0xB3BE],
+  ["8992",0xB3BF],
+  ["8993",0xB3C0],
+  ["8994",0xB3C1],
+  ["8995",0xB3C2],
+  ["8996",0xB3C3],
+  ["8997",0xB3C6],
+  ["8998",0xB3C7],
+  ["8999",0xB3C9],
+  ["899A",0xB3CA],
+  ["899B",0xB3CD],
+  ["899C",0xB3CF],
+  ["899D",0xB3D1],
+  ["899E",0xB3D2],
+  ["899F",0xB3D3],
+  ["89A0",0xB3D6],
+  ["89A1",0xB3D8],
+  ["89A2",0xB3DA],
+  ["89A3",0xB3DC],
+  ["89A4",0xB3DE],
+  ["89A5",0xB3DF],
+  ["89A6",0xB3E1],
+  ["89A7",0xB3E2],
+  ["89A8",0xB3E3],
+  ["89A9",0xB3E5],
+  ["89AA",0xB3E6],
+  ["89AB",0xB3E7],
+  ["89AC",0xB3E9],
+  ["89AD",0xB3EA],
+  ["89AE",0xB3EB],
+  ["89AF",0xB3EC],
+  ["89B0",0xB3ED],
+  ["89B1",0xB3EE],
+  ["89B2",0xB3EF],
+  ["89B3",0xB3F0],
+  ["89B4",0xB3F1],
+  ["89B5",0xB3F2],
+  ["89B6",0xB3F3],
+  ["89B7",0xB3F4],
+  ["89B8",0xB3F5],
+  ["89B9",0xB3F6],
+  ["89BA",0xB3F7],
+  ["89BB",0xB3F8],
+  ["89BC",0xB3F9],
+  ["89BD",0xB3FA],
+  ["89BE",0xB3FB],
+  ["89BF",0xB3FD],
+  ["89C0",0xB3FE],
+  ["89C1",0xB3FF],
+  ["89C2",0xB400],
+  ["89C3",0xB401],
+  ["89C4",0xB402],
+  ["89C5",0xB403],
+  ["89C6",0xB404],
+  ["89C7",0xB405],
+  ["89C8",0xB406],
+  ["89C9",0xB407],
+  ["89CA",0xB408],
+  ["89CB",0xB409],
+  ["89CC",0xB40A],
+  ["89CD",0xB40B],
+  ["89CE",0xB40C],
+  ["89CF",0xB40D],
+  ["89D0",0xB40E],
+  ["89D1",0xB40F],
+  ["89D2",0xB411],
+  ["89D3",0xB412],
+  ["89D4",0xB413],
+  ["89D5",0xB414],
+  ["89D6",0xB415],
+  ["89D7",0xB416],
+  ["89D8",0xB417],
+  ["89D9",0xB419],
+  ["89DA",0xB41A],
+  ["89DB",0xB41B],
+  ["89DC",0xB41D],
+  ["89DD",0xB41E],
+  ["89DE",0xB41F],
+  ["89DF",0xB421],
+  ["89E0",0xB422],
+  ["89E1",0xB423],
+  ["89E2",0xB424],
+  ["89E3",0xB425],
+  ["89E4",0xB426],
+  ["89E5",0xB427],
+  ["89E6",0xB42A],
+  ["89E7",0xB42C],
+  ["89E8",0xB42D],
+  ["89E9",0xB42E],
+  ["89EA",0xB42F],
+  ["89EB",0xB430],
+  ["89EC",0xB431],
+  ["89ED",0xB432],
+  ["89EE",0xB433],
+  ["89EF",0xB435],
+  ["89F0",0xB436],
+  ["89F1",0xB437],
+  ["89F2",0xB438],
+  ["89F3",0xB439],
+  ["89F4",0xB43A],
+  ["89F5",0xB43B],
+  ["89F6",0xB43C],
+  ["89F7",0xB43D],
+  ["89F8",0xB43E],
+  ["89F9",0xB43F],
+  ["89FA",0xB440],
+  ["89FB",0xB441],
+  ["89FC",0xB442],
+  ["89FD",0xB443],
+  ["89FE",0xB444],
+  ["8A41",0xB445],
+  ["8A42",0xB446],
+  ["8A43",0xB447],
+  ["8A44",0xB448],
+  ["8A45",0xB449],
+  ["8A46",0xB44A],
+  ["8A47",0xB44B],
+  ["8A48",0xB44C],
+  ["8A49",0xB44D],
+  ["8A4A",0xB44E],
+  ["8A4B",0xB44F],
+  ["8A4C",0xB452],
+  ["8A4D",0xB453],
+  ["8A4E",0xB455],
+  ["8A4F",0xB456],
+  ["8A50",0xB457],
+  ["8A51",0xB459],
+  ["8A52",0xB45A],
+  ["8A53",0xB45B],
+  ["8A54",0xB45C],
+  ["8A55",0xB45D],
+  ["8A56",0xB45E],
+  ["8A57",0xB45F],
+  ["8A58",0xB462],
+  ["8A59",0xB464],
+  ["8A5A",0xB466],
+  ["8A61",0xB467],
+  ["8A62",0xB468],
+  ["8A63",0xB469],
+  ["8A64",0xB46A],
+  ["8A65",0xB46B],
+  ["8A66",0xB46D],
+  ["8A67",0xB46E],
+  ["8A68",0xB46F],
+  ["8A69",0xB470],
+  ["8A6A",0xB471],
+  ["8A6B",0xB472],
+  ["8A6C",0xB473],
+  ["8A6D",0xB474],
+  ["8A6E",0xB475],
+  ["8A6F",0xB476],
+  ["8A70",0xB477],
+  ["8A71",0xB478],
+  ["8A72",0xB479],
+  ["8A73",0xB47A],
+  ["8A74",0xB47B],
+  ["8A75",0xB47C],
+  ["8A76",0xB47D],
+  ["8A77",0xB47E],
+  ["8A78",0xB47F],
+  ["8A79",0xB481],
+  ["8A7A",0xB482],
+  ["8A81",0xB483],
+  ["8A82",0xB484],
+  ["8A83",0xB485],
+  ["8A84",0xB486],
+  ["8A85",0xB487],
+  ["8A86",0xB489],
+  ["8A87",0xB48A],
+  ["8A88",0xB48B],
+  ["8A89",0xB48C],
+  ["8A8A",0xB48D],
+  ["8A8B",0xB48E],
+  ["8A8C",0xB48F],
+  ["8A8D",0xB490],
+  ["8A8E",0xB491],
+  ["8A8F",0xB492],
+  ["8A90",0xB493],
+  ["8A91",0xB494],
+  ["8A92",0xB495],
+  ["8A93",0xB496],
+  ["8A94",0xB497],
+  ["8A95",0xB498],
+  ["8A96",0xB499],
+  ["8A97",0xB49A],
+  ["8A98",0xB49B],
+  ["8A99",0xB49C],
+  ["8A9A",0xB49E],
+  ["8A9B",0xB49F],
+  ["8A9C",0xB4A0],
+  ["8A9D",0xB4A1],
+  ["8A9E",0xB4A2],
+  ["8A9F",0xB4A3],
+  ["8AA0",0xB4A5],
+  ["8AA1",0xB4A6],
+  ["8AA2",0xB4A7],
+  ["8AA3",0xB4A9],
+  ["8AA4",0xB4AA],
+  ["8AA5",0xB4AB],
+  ["8AA6",0xB4AD],
+  ["8AA7",0xB4AE],
+  ["8AA8",0xB4AF],
+  ["8AA9",0xB4B0],
+  ["8AAA",0xB4B1],
+  ["8AAB",0xB4B2],
+  ["8AAC",0xB4B3],
+  ["8AAD",0xB4B4],
+  ["8AAE",0xB4B6],
+  ["8AAF",0xB4B8],
+  ["8AB0",0xB4BA],
+  ["8AB1",0xB4BB],
+  ["8AB2",0xB4BC],
+  ["8AB3",0xB4BD],
+  ["8AB4",0xB4BE],
+  ["8AB5",0xB4BF],
+  ["8AB6",0xB4C1],
+  ["8AB7",0xB4C2],
+  ["8AB8",0xB4C3],
+  ["8AB9",0xB4C5],
+  ["8ABA",0xB4C6],
+  ["8ABB",0xB4C7],
+  ["8ABC",0xB4C9],
+  ["8ABD",0xB4CA],
+  ["8ABE",0xB4CB],
+  ["8ABF",0xB4CC],
+  ["8AC0",0xB4CD],
+  ["8AC1",0xB4CE],
+  ["8AC2",0xB4CF],
+  ["8AC3",0xB4D1],
+  ["8AC4",0xB4D2],
+  ["8AC5",0xB4D3],
+  ["8AC6",0xB4D4],
+  ["8AC7",0xB4D6],
+  ["8AC8",0xB4D7],
+  ["8AC9",0xB4D8],
+  ["8ACA",0xB4D9],
+  ["8ACB",0xB4DA],
+  ["8ACC",0xB4DB],
+  ["8ACD",0xB4DE],
+  ["8ACE",0xB4DF],
+  ["8ACF",0xB4E1],
+  ["8AD0",0xB4E2],
+  ["8AD1",0xB4E5],
+  ["8AD2",0xB4E7],
+  ["8AD3",0xB4E8],
+  ["8AD4",0xB4E9],
+  ["8AD5",0xB4EA],
+  ["8AD6",0xB4EB],
+  ["8AD7",0xB4EE],
+  ["8AD8",0xB4F0],
+  ["8AD9",0xB4F2],
+  ["8ADA",0xB4F3],
+  ["8ADB",0xB4F4],
+  ["8ADC",0xB4F5],
+  ["8ADD",0xB4F6],
+  ["8ADE",0xB4F7],
+  ["8ADF",0xB4F9],
+  ["8AE0",0xB4FA],
+  ["8AE1",0xB4FB],
+  ["8AE2",0xB4FC],
+  ["8AE3",0xB4FD],
+  ["8AE4",0xB4FE],
+  ["8AE5",0xB4FF],
+  ["8AE6",0xB500],
+  ["8AE7",0xB501],
+  ["8AE8",0xB502],
+  ["8AE9",0xB503],
+  ["8AEA",0xB504],
+  ["8AEB",0xB505],
+  ["8AEC",0xB506],
+  ["8AED",0xB507],
+  ["8AEE",0xB508],
+  ["8AEF",0xB509],
+  ["8AF0",0xB50A],
+  ["8AF1",0xB50B],
+  ["8AF2",0xB50C],
+  ["8AF3",0xB50D],
+  ["8AF4",0xB50E],
+  ["8AF5",0xB50F],
+  ["8AF6",0xB510],
+  ["8AF7",0xB511],
+  ["8AF8",0xB512],
+  ["8AF9",0xB513],
+  ["8AFA",0xB516],
+  ["8AFB",0xB517],
+  ["8AFC",0xB519],
+  ["8AFD",0xB51A],
+  ["8AFE",0xB51D],
+  ["8B41",0xB51E],
+  ["8B42",0xB51F],
+  ["8B43",0xB520],
+  ["8B44",0xB521],
+  ["8B45",0xB522],
+  ["8B46",0xB523],
+  ["8B47",0xB526],
+  ["8B48",0xB52B],
+  ["8B49",0xB52C],
+  ["8B4A",0xB52D],
+  ["8B4B",0xB52E],
+  ["8B4C",0xB52F],
+  ["8B4D",0xB532],
+  ["8B4E",0xB533],
+  ["8B4F",0xB535],
+  ["8B50",0xB536],
+  ["8B51",0xB537],
+  ["8B52",0xB539],
+  ["8B53",0xB53A],
+  ["8B54",0xB53B],
+  ["8B55",0xB53C],
+  ["8B56",0xB53D],
+  ["8B57",0xB53E],
+  ["8B58",0xB53F],
+  ["8B59",0xB542],
+  ["8B5A",0xB546],
+  ["8B61",0xB547],
+  ["8B62",0xB548],
+  ["8B63",0xB549],
+  ["8B64",0xB54A],
+  ["8B65",0xB54E],
+  ["8B66",0xB54F],
+  ["8B67",0xB551],
+  ["8B68",0xB552],
+  ["8B69",0xB553],
+  ["8B6A",0xB555],
+  ["8B6B",0xB556],
+  ["8B6C",0xB557],
+  ["8B6D",0xB558],
+  ["8B6E",0xB559],
+  ["8B6F",0xB55A],
+  ["8B70",0xB55B],
+  ["8B71",0xB55E],
+  ["8B72",0xB562],
+  ["8B73",0xB563],
+  ["8B74",0xB564],
+  ["8B75",0xB565],
+  ["8B76",0xB566],
+  ["8B77",0xB567],
+  ["8B78",0xB568],
+  ["8B79",0xB569],
+  ["8B7A",0xB56A],
+  ["8B81",0xB56B],
+  ["8B82",0xB56C],
+  ["8B83",0xB56D],
+  ["8B84",0xB56E],
+  ["8B85",0xB56F],
+  ["8B86",0xB570],
+  ["8B87",0xB571],
+  ["8B88",0xB572],
+  ["8B89",0xB573],
+  ["8B8A",0xB574],
+  ["8B8B",0xB575],
+  ["8B8C",0xB576],
+  ["8B8D",0xB577],
+  ["8B8E",0xB578],
+  ["8B8F",0xB579],
+  ["8B90",0xB57A],
+  ["8B91",0xB57B],
+  ["8B92",0xB57C],
+  ["8B93",0xB57D],
+  ["8B94",0xB57E],
+  ["8B95",0xB57F],
+  ["8B96",0xB580],
+  ["8B97",0xB581],
+  ["8B98",0xB582],
+  ["8B99",0xB583],
+  ["8B9A",0xB584],
+  ["8B9B",0xB585],
+  ["8B9C",0xB586],
+  ["8B9D",0xB587],
+  ["8B9E",0xB588],
+  ["8B9F",0xB589],
+  ["8BA0",0xB58A],
+  ["8BA1",0xB58B],
+  ["8BA2",0xB58C],
+  ["8BA3",0xB58D],
+  ["8BA4",0xB58E],
+  ["8BA5",0xB58F],
+  ["8BA6",0xB590],
+  ["8BA7",0xB591],
+  ["8BA8",0xB592],
+  ["8BA9",0xB593],
+  ["8BAA",0xB594],
+  ["8BAB",0xB595],
+  ["8BAC",0xB596],
+  ["8BAD",0xB597],
+  ["8BAE",0xB598],
+  ["8BAF",0xB599],
+  ["8BB0",0xB59A],
+  ["8BB1",0xB59B],
+  ["8BB2",0xB59C],
+  ["8BB3",0xB59D],
+  ["8BB4",0xB59E],
+  ["8BB5",0xB59F],
+  ["8BB6",0xB5A2],
+  ["8BB7",0xB5A3],
+  ["8BB8",0xB5A5],
+  ["8BB9",0xB5A6],
+  ["8BBA",0xB5A7],
+  ["8BBB",0xB5A9],
+  ["8BBC",0xB5AC],
+  ["8BBD",0xB5AD],
+  ["8BBE",0xB5AE],
+  ["8BBF",0xB5AF],
+  ["8BC0",0xB5B2],
+  ["8BC1",0xB5B6],
+  ["8BC2",0xB5B7],
+  ["8BC3",0xB5B8],
+  ["8BC4",0xB5B9],
+  ["8BC5",0xB5BA],
+  ["8BC6",0xB5BE],
+  ["8BC7",0xB5BF],
+  ["8BC8",0xB5C1],
+  ["8BC9",0xB5C2],
+  ["8BCA",0xB5C3],
+  ["8BCB",0xB5C5],
+  ["8BCC",0xB5C6],
+  ["8BCD",0xB5C7],
+  ["8BCE",0xB5C8],
+  ["8BCF",0xB5C9],
+  ["8BD0",0xB5CA],
+  ["8BD1",0xB5CB],
+  ["8BD2",0xB5CE],
+  ["8BD3",0xB5D2],
+  ["8BD4",0xB5D3],
+  ["8BD5",0xB5D4],
+  ["8BD6",0xB5D5],
+  ["8BD7",0xB5D6],
+  ["8BD8",0xB5D7],
+  ["8BD9",0xB5D9],
+  ["8BDA",0xB5DA],
+  ["8BDB",0xB5DB],
+  ["8BDC",0xB5DC],
+  ["8BDD",0xB5DD],
+  ["8BDE",0xB5DE],
+  ["8BDF",0xB5DF],
+  ["8BE0",0xB5E0],
+  ["8BE1",0xB5E1],
+  ["8BE2",0xB5E2],
+  ["8BE3",0xB5E3],
+  ["8BE4",0xB5E4],
+  ["8BE5",0xB5E5],
+  ["8BE6",0xB5E6],
+  ["8BE7",0xB5E7],
+  ["8BE8",0xB5E8],
+  ["8BE9",0xB5E9],
+  ["8BEA",0xB5EA],
+  ["8BEB",0xB5EB],
+  ["8BEC",0xB5ED],
+  ["8BED",0xB5EE],
+  ["8BEE",0xB5EF],
+  ["8BEF",0xB5F0],
+  ["8BF0",0xB5F1],
+  ["8BF1",0xB5F2],
+  ["8BF2",0xB5F3],
+  ["8BF3",0xB5F4],
+  ["8BF4",0xB5F5],
+  ["8BF5",0xB5F6],
+  ["8BF6",0xB5F7],
+  ["8BF7",0xB5F8],
+  ["8BF8",0xB5F9],
+  ["8BF9",0xB5FA],
+  ["8BFA",0xB5FB],
+  ["8BFB",0xB5FC],
+  ["8BFC",0xB5FD],
+  ["8BFD",0xB5FE],
+  ["8BFE",0xB5FF],
+  ["8C41",0xB600],
+  ["8C42",0xB601],
+  ["8C43",0xB602],
+  ["8C44",0xB603],
+  ["8C45",0xB604],
+  ["8C46",0xB605],
+  ["8C47",0xB606],
+  ["8C48",0xB607],
+  ["8C49",0xB608],
+  ["8C4A",0xB609],
+  ["8C4B",0xB60A],
+  ["8C4C",0xB60B],
+  ["8C4D",0xB60C],
+  ["8C4E",0xB60D],
+  ["8C4F",0xB60E],
+  ["8C50",0xB60F],
+  ["8C51",0xB612],
+  ["8C52",0xB613],
+  ["8C53",0xB615],
+  ["8C54",0xB616],
+  ["8C55",0xB617],
+  ["8C56",0xB619],
+  ["8C57",0xB61A],
+  ["8C58",0xB61B],
+  ["8C59",0xB61C],
+  ["8C5A",0xB61D],
+  ["8C61",0xB61E],
+  ["8C62",0xB61F],
+  ["8C63",0xB620],
+  ["8C64",0xB621],
+  ["8C65",0xB622],
+  ["8C66",0xB623],
+  ["8C67",0xB624],
+  ["8C68",0xB626],
+  ["8C69",0xB627],
+  ["8C6A",0xB628],
+  ["8C6B",0xB629],
+  ["8C6C",0xB62A],
+  ["8C6D",0xB62B],
+  ["8C6E",0xB62D],
+  ["8C6F",0xB62E],
+  ["8C70",0xB62F],
+  ["8C71",0xB630],
+  ["8C72",0xB631],
+  ["8C73",0xB632],
+  ["8C74",0xB633],
+  ["8C75",0xB635],
+  ["8C76",0xB636],
+  ["8C77",0xB637],
+  ["8C78",0xB638],
+  ["8C79",0xB639],
+  ["8C7A",0xB63A],
+  ["8C81",0xB63B],
+  ["8C82",0xB63C],
+  ["8C83",0xB63D],
+  ["8C84",0xB63E],
+  ["8C85",0xB63F],
+  ["8C86",0xB640],
+  ["8C87",0xB641],
+  ["8C88",0xB642],
+  ["8C89",0xB643],
+  ["8C8A",0xB644],
+  ["8C8B",0xB645],
+  ["8C8C",0xB646],
+  ["8C8D",0xB647],
+  ["8C8E",0xB649],
+  ["8C8F",0xB64A],
+  ["8C90",0xB64B],
+  ["8C91",0xB64C],
+  ["8C92",0xB64D],
+  ["8C93",0xB64E],
+  ["8C94",0xB64F],
+  ["8C95",0xB650],
+  ["8C96",0xB651],
+  ["8C97",0xB652],
+  ["8C98",0xB653],
+  ["8C99",0xB654],
+  ["8C9A",0xB655],
+  ["8C9B",0xB656],
+  ["8C9C",0xB657],
+  ["8C9D",0xB658],
+  ["8C9E",0xB659],
+  ["8C9F",0xB65A],
+  ["8CA0",0xB65B],
+  ["8CA1",0xB65C],
+  ["8CA2",0xB65D],
+  ["8CA3",0xB65E],
+  ["8CA4",0xB65F],
+  ["8CA5",0xB660],
+  ["8CA6",0xB661],
+  ["8CA7",0xB662],
+  ["8CA8",0xB663],
+  ["8CA9",0xB665],
+  ["8CAA",0xB666],
+  ["8CAB",0xB667],
+  ["8CAC",0xB669],
+  ["8CAD",0xB66A],
+  ["8CAE",0xB66B],
+  ["8CAF",0xB66C],
+  ["8CB0",0xB66D],
+  ["8CB1",0xB66E],
+  ["8CB2",0xB66F],
+  ["8CB3",0xB670],
+  ["8CB4",0xB671],
+  ["8CB5",0xB672],
+  ["8CB6",0xB673],
+  ["8CB7",0xB674],
+  ["8CB8",0xB675],
+  ["8CB9",0xB676],
+  ["8CBA",0xB677],
+  ["8CBB",0xB678],
+  ["8CBC",0xB679],
+  ["8CBD",0xB67A],
+  ["8CBE",0xB67B],
+  ["8CBF",0xB67C],
+  ["8CC0",0xB67D],
+  ["8CC1",0xB67E],
+  ["8CC2",0xB67F],
+  ["8CC3",0xB680],
+  ["8CC4",0xB681],
+  ["8CC5",0xB682],
+  ["8CC6",0xB683],
+  ["8CC7",0xB684],
+  ["8CC8",0xB685],
+  ["8CC9",0xB686],
+  ["8CCA",0xB687],
+  ["8CCB",0xB688],
+  ["8CCC",0xB689],
+  ["8CCD",0xB68A],
+  ["8CCE",0xB68B],
+  ["8CCF",0xB68C],
+  ["8CD0",0xB68D],
+  ["8CD1",0xB68E],
+  ["8CD2",0xB68F],
+  ["8CD3",0xB690],
+  ["8CD4",0xB691],
+  ["8CD5",0xB692],
+  ["8CD6",0xB693],
+  ["8CD7",0xB694],
+  ["8CD8",0xB695],
+  ["8CD9",0xB696],
+  ["8CDA",0xB697],
+  ["8CDB",0xB698],
+  ["8CDC",0xB699],
+  ["8CDD",0xB69A],
+  ["8CDE",0xB69B],
+  ["8CDF",0xB69E],
+  ["8CE0",0xB69F],
+  ["8CE1",0xB6A1],
+  ["8CE2",0xB6A2],
+  ["8CE3",0xB6A3],
+  ["8CE4",0xB6A5],
+  ["8CE5",0xB6A6],
+  ["8CE6",0xB6A7],
+  ["8CE7",0xB6A8],
+  ["8CE8",0xB6A9],
+  ["8CE9",0xB6AA],
+  ["8CEA",0xB6AD],
+  ["8CEB",0xB6AE],
+  ["8CEC",0xB6AF],
+  ["8CED",0xB6B0],
+  ["8CEE",0xB6B2],
+  ["8CEF",0xB6B3],
+  ["8CF0",0xB6B4],
+  ["8CF1",0xB6B5],
+  ["8CF2",0xB6B6],
+  ["8CF3",0xB6B7],
+  ["8CF4",0xB6B8],
+  ["8CF5",0xB6B9],
+  ["8CF6",0xB6BA],
+  ["8CF7",0xB6BB],
+  ["8CF8",0xB6BC],
+  ["8CF9",0xB6BD],
+  ["8CFA",0xB6BE],
+  ["8CFB",0xB6BF],
+  ["8CFC",0xB6C0],
+  ["8CFD",0xB6C1],
+  ["8CFE",0xB6C2],
+  ["8D41",0xB6C3],
+  ["8D42",0xB6C4],
+  ["8D43",0xB6C5],
+  ["8D44",0xB6C6],
+  ["8D45",0xB6C7],
+  ["8D46",0xB6C8],
+  ["8D47",0xB6C9],
+  ["8D48",0xB6CA],
+  ["8D49",0xB6CB],
+  ["8D4A",0xB6CC],
+  ["8D4B",0xB6CD],
+  ["8D4C",0xB6CE],
+  ["8D4D",0xB6CF],
+  ["8D4E",0xB6D0],
+  ["8D4F",0xB6D1],
+  ["8D50",0xB6D2],
+  ["8D51",0xB6D3],
+  ["8D52",0xB6D5],
+  ["8D53",0xB6D6],
+  ["8D54",0xB6D7],
+  ["8D55",0xB6D8],
+  ["8D56",0xB6D9],
+  ["8D57",0xB6DA],
+  ["8D58",0xB6DB],
+  ["8D59",0xB6DC],
+  ["8D5A",0xB6DD],
+  ["8D61",0xB6DE],
+  ["8D62",0xB6DF],
+  ["8D63",0xB6E0],
+  ["8D64",0xB6E1],
+  ["8D65",0xB6E2],
+  ["8D66",0xB6E3],
+  ["8D67",0xB6E4],
+  ["8D68",0xB6E5],
+  ["8D69",0xB6E6],
+  ["8D6A",0xB6E7],
+  ["8D6B",0xB6E8],
+  ["8D6C",0xB6E9],
+  ["8D6D",0xB6EA],
+  ["8D6E",0xB6EB],
+  ["8D6F",0xB6EC],
+  ["8D70",0xB6ED],
+  ["8D71",0xB6EE],
+  ["8D72",0xB6EF],
+  ["8D73",0xB6F1],
+  ["8D74",0xB6F2],
+  ["8D75",0xB6F3],
+  ["8D76",0xB6F5],
+  ["8D77",0xB6F6],
+  ["8D78",0xB6F7],
+  ["8D79",0xB6F9],
+  ["8D7A",0xB6FA],
+  ["8D81",0xB6FB],
+  ["8D82",0xB6FC],
+  ["8D83",0xB6FD],
+  ["8D84",0xB6FE],
+  ["8D85",0xB6FF],
+  ["8D86",0xB702],
+  ["8D87",0xB703],
+  ["8D88",0xB704],
+  ["8D89",0xB706],
+  ["8D8A",0xB707],
+  ["8D8B",0xB708],
+  ["8D8C",0xB709],
+  ["8D8D",0xB70A],
+  ["8D8E",0xB70B],
+  ["8D8F",0xB70C],
+  ["8D90",0xB70D],
+  ["8D91",0xB70E],
+  ["8D92",0xB70F],
+  ["8D93",0xB710],
+  ["8D94",0xB711],
+  ["8D95",0xB712],
+  ["8D96",0xB713],
+  ["8D97",0xB714],
+  ["8D98",0xB715],
+  ["8D99",0xB716],
+  ["8D9A",0xB717],
+  ["8D9B",0xB718],
+  ["8D9C",0xB719],
+  ["8D9D",0xB71A],
+  ["8D9E",0xB71B],
+  ["8D9F",0xB71C],
+  ["8DA0",0xB71D],
+  ["8DA1",0xB71E],
+  ["8DA2",0xB71F],
+  ["8DA3",0xB720],
+  ["8DA4",0xB721],
+  ["8DA5",0xB722],
+  ["8DA6",0xB723],
+  ["8DA7",0xB724],
+  ["8DA8",0xB725],
+  ["8DA9",0xB726],
+  ["8DAA",0xB727],
+  ["8DAB",0xB72A],
+  ["8DAC",0xB72B],
+  ["8DAD",0xB72D],
+  ["8DAE",0xB72E],
+  ["8DAF",0xB731],
+  ["8DB0",0xB732],
+  ["8DB1",0xB733],
+  ["8DB2",0xB734],
+  ["8DB3",0xB735],
+  ["8DB4",0xB736],
+  ["8DB5",0xB737],
+  ["8DB6",0xB73A],
+  ["8DB7",0xB73C],
+  ["8DB8",0xB73D],
+  ["8DB9",0xB73E],
+  ["8DBA",0xB73F],
+  ["8DBB",0xB740],
+  ["8DBC",0xB741],
+  ["8DBD",0xB742],
+  ["8DBE",0xB743],
+  ["8DBF",0xB745],
+  ["8DC0",0xB746],
+  ["8DC1",0xB747],
+  ["8DC2",0xB749],
+  ["8DC3",0xB74A],
+  ["8DC4",0xB74B],
+  ["8DC5",0xB74D],
+  ["8DC6",0xB74E],
+  ["8DC7",0xB74F],
+  ["8DC8",0xB750],
+  ["8DC9",0xB751],
+  ["8DCA",0xB752],
+  ["8DCB",0xB753],
+  ["8DCC",0xB756],
+  ["8DCD",0xB757],
+  ["8DCE",0xB758],
+  ["8DCF",0xB759],
+  ["8DD0",0xB75A],
+  ["8DD1",0xB75B],
+  ["8DD2",0xB75C],
+  ["8DD3",0xB75D],
+  ["8DD4",0xB75E],
+  ["8DD5",0xB75F],
+  ["8DD6",0xB761],
+  ["8DD7",0xB762],
+  ["8DD8",0xB763],
+  ["8DD9",0xB765],
+  ["8DDA",0xB766],
+  ["8DDB",0xB767],
+  ["8DDC",0xB769],
+  ["8DDD",0xB76A],
+  ["8DDE",0xB76B],
+  ["8DDF",0xB76C],
+  ["8DE0",0xB76D],
+  ["8DE1",0xB76E],
+  ["8DE2",0xB76F],
+  ["8DE3",0xB772],
+  ["8DE4",0xB774],
+  ["8DE5",0xB776],
+  ["8DE6",0xB777],
+  ["8DE7",0xB778],
+  ["8DE8",0xB779],
+  ["8DE9",0xB77A],
+  ["8DEA",0xB77B],
+  ["8DEB",0xB77E],
+  ["8DEC",0xB77F],
+  ["8DED",0xB781],
+  ["8DEE",0xB782],
+  ["8DEF",0xB783],
+  ["8DF0",0xB785],
+  ["8DF1",0xB786],
+  ["8DF2",0xB787],
+  ["8DF3",0xB788],
+  ["8DF4",0xB789],
+  ["8DF5",0xB78A],
+  ["8DF6",0xB78B],
+  ["8DF7",0xB78E],
+  ["8DF8",0xB793],
+  ["8DF9",0xB794],
+  ["8DFA",0xB795],
+  ["8DFB",0xB79A],
+  ["8DFC",0xB79B],
+  ["8DFD",0xB79D],
+  ["8DFE",0xB79E],
+  ["8E41",0xB79F],
+  ["8E42",0xB7A1],
+  ["8E43",0xB7A2],
+  ["8E44",0xB7A3],
+  ["8E45",0xB7A4],
+  ["8E46",0xB7A5],
+  ["8E47",0xB7A6],
+  ["8E48",0xB7A7],
+  ["8E49",0xB7AA],
+  ["8E4A",0xB7AE],
+  ["8E4B",0xB7AF],
+  ["8E4C",0xB7B0],
+  ["8E4D",0xB7B1],
+  ["8E4E",0xB7B2],
+  ["8E4F",0xB7B3],
+  ["8E50",0xB7B6],
+  ["8E51",0xB7B7],
+  ["8E52",0xB7B9],
+  ["8E53",0xB7BA],
+  ["8E54",0xB7BB],
+  ["8E55",0xB7BC],
+  ["8E56",0xB7BD],
+  ["8E57",0xB7BE],
+  ["8E58",0xB7BF],
+  ["8E59",0xB7C0],
+  ["8E5A",0xB7C1],
+  ["8E61",0xB7C2],
+  ["8E62",0xB7C3],
+  ["8E63",0xB7C4],
+  ["8E64",0xB7C5],
+  ["8E65",0xB7C6],
+  ["8E66",0xB7C8],
+  ["8E67",0xB7CA],
+  ["8E68",0xB7CB],
+  ["8E69",0xB7CC],
+  ["8E6A",0xB7CD],
+  ["8E6B",0xB7CE],
+  ["8E6C",0xB7CF],
+  ["8E6D",0xB7D0],
+  ["8E6E",0xB7D1],
+  ["8E6F",0xB7D2],
+  ["8E70",0xB7D3],
+  ["8E71",0xB7D4],
+  ["8E72",0xB7D5],
+  ["8E73",0xB7D6],
+  ["8E74",0xB7D7],
+  ["8E75",0xB7D8],
+  ["8E76",0xB7D9],
+  ["8E77",0xB7DA],
+  ["8E78",0xB7DB],
+  ["8E79",0xB7DC],
+  ["8E7A",0xB7DD],
+  ["8E81",0xB7DE],
+  ["8E82",0xB7DF],
+  ["8E83",0xB7E0],
+  ["8E84",0xB7E1],
+  ["8E85",0xB7E2],
+  ["8E86",0xB7E3],
+  ["8E87",0xB7E4],
+  ["8E88",0xB7E5],
+  ["8E89",0xB7E6],
+  ["8E8A",0xB7E7],
+  ["8E8B",0xB7E8],
+  ["8E8C",0xB7E9],
+  ["8E8D",0xB7EA],
+  ["8E8E",0xB7EB],
+  ["8E8F",0xB7EE],
+  ["8E90",0xB7EF],
+  ["8E91",0xB7F1],
+  ["8E92",0xB7F2],
+  ["8E93",0xB7F3],
+  ["8E94",0xB7F5],
+  ["8E95",0xB7F6],
+  ["8E96",0xB7F7],
+  ["8E97",0xB7F8],
+  ["8E98",0xB7F9],
+  ["8E99",0xB7FA],
+  ["8E9A",0xB7FB],
+  ["8E9B",0xB7FE],
+  ["8E9C",0xB802],
+  ["8E9D",0xB803],
+  ["8E9E",0xB804],
+  ["8E9F",0xB805],
+  ["8EA0",0xB806],
+  ["8EA1",0xB80A],
+  ["8EA2",0xB80B],
+  ["8EA3",0xB80D],
+  ["8EA4",0xB80E],
+  ["8EA5",0xB80F],
+  ["8EA6",0xB811],
+  ["8EA7",0xB812],
+  ["8EA8",0xB813],
+  ["8EA9",0xB814],
+  ["8EAA",0xB815],
+  ["8EAB",0xB816],
+  ["8EAC",0xB817],
+  ["8EAD",0xB81A],
+  ["8EAE",0xB81C],
+  ["8EAF",0xB81E],
+  ["8EB0",0xB81F],
+  ["8EB1",0xB820],
+  ["8EB2",0xB821],
+  ["8EB3",0xB822],
+  ["8EB4",0xB823],
+  ["8EB5",0xB826],
+  ["8EB6",0xB827],
+  ["8EB7",0xB829],
+  ["8EB8",0xB82A],
+  ["8EB9",0xB82B],
+  ["8EBA",0xB82D],
+  ["8EBB",0xB82E],
+  ["8EBC",0xB82F],
+  ["8EBD",0xB830],
+  ["8EBE",0xB831],
+  ["8EBF",0xB832],
+  ["8EC0",0xB833],
+  ["8EC1",0xB836],
+  ["8EC2",0xB83A],
+  ["8EC3",0xB83B],
+  ["8EC4",0xB83C],
+  ["8EC5",0xB83D],
+  ["8EC6",0xB83E],
+  ["8EC7",0xB83F],
+  ["8EC8",0xB841],
+  ["8EC9",0xB842],
+  ["8ECA",0xB843],
+  ["8ECB",0xB845],
+  ["8ECC",0xB846],
+  ["8ECD",0xB847],
+  ["8ECE",0xB848],
+  ["8ECF",0xB849],
+  ["8ED0",0xB84A],
+  ["8ED1",0xB84B],
+  ["8ED2",0xB84C],
+  ["8ED3",0xB84D],
+  ["8ED4",0xB84E],
+  ["8ED5",0xB84F],
+  ["8ED6",0xB850],
+  ["8ED7",0xB852],
+  ["8ED8",0xB854],
+  ["8ED9",0xB855],
+  ["8EDA",0xB856],
+  ["8EDB",0xB857],
+  ["8EDC",0xB858],
+  ["8EDD",0xB859],
+  ["8EDE",0xB85A],
+  ["8EDF",0xB85B],
+  ["8EE0",0xB85E],
+  ["8EE1",0xB85F],
+  ["8EE2",0xB861],
+  ["8EE3",0xB862],
+  ["8EE4",0xB863],
+  ["8EE5",0xB865],
+  ["8EE6",0xB866],
+  ["8EE7",0xB867],
+  ["8EE8",0xB868],
+  ["8EE9",0xB869],
+  ["8EEA",0xB86A],
+  ["8EEB",0xB86B],
+  ["8EEC",0xB86E],
+  ["8EED",0xB870],
+  ["8EEE",0xB872],
+  ["8EEF",0xB873],
+  ["8EF0",0xB874],
+  ["8EF1",0xB875],
+  ["8EF2",0xB876],
+  ["8EF3",0xB877],
+  ["8EF4",0xB879],
+  ["8EF5",0xB87A],
+  ["8EF6",0xB87B],
+  ["8EF7",0xB87D],
+  ["8EF8",0xB87E],
+  ["8EF9",0xB87F],
+  ["8EFA",0xB880],
+  ["8EFB",0xB881],
+  ["8EFC",0xB882],
+  ["8EFD",0xB883],
+  ["8EFE",0xB884],
+  ["8F41",0xB885],
+  ["8F42",0xB886],
+  ["8F43",0xB887],
+  ["8F44",0xB888],
+  ["8F45",0xB889],
+  ["8F46",0xB88A],
+  ["8F47",0xB88B],
+  ["8F48",0xB88C],
+  ["8F49",0xB88E],
+  ["8F4A",0xB88F],
+  ["8F4B",0xB890],
+  ["8F4C",0xB891],
+  ["8F4D",0xB892],
+  ["8F4E",0xB893],
+  ["8F4F",0xB894],
+  ["8F50",0xB895],
+  ["8F51",0xB896],
+  ["8F52",0xB897],
+  ["8F53",0xB898],
+  ["8F54",0xB899],
+  ["8F55",0xB89A],
+  ["8F56",0xB89B],
+  ["8F57",0xB89C],
+  ["8F58",0xB89D],
+  ["8F59",0xB89E],
+  ["8F5A",0xB89F],
+  ["8F61",0xB8A0],
+  ["8F62",0xB8A1],
+  ["8F63",0xB8A2],
+  ["8F64",0xB8A3],
+  ["8F65",0xB8A4],
+  ["8F66",0xB8A5],
+  ["8F67",0xB8A6],
+  ["8F68",0xB8A7],
+  ["8F69",0xB8A9],
+  ["8F6A",0xB8AA],
+  ["8F6B",0xB8AB],
+  ["8F6C",0xB8AC],
+  ["8F6D",0xB8AD],
+  ["8F6E",0xB8AE],
+  ["8F6F",0xB8AF],
+  ["8F70",0xB8B1],
+  ["8F71",0xB8B2],
+  ["8F72",0xB8B3],
+  ["8F73",0xB8B5],
+  ["8F74",0xB8B6],
+  ["8F75",0xB8B7],
+  ["8F76",0xB8B9],
+  ["8F77",0xB8BA],
+  ["8F78",0xB8BB],
+  ["8F79",0xB8BC],
+  ["8F7A",0xB8BD],
+  ["8F81",0xB8BE],
+  ["8F82",0xB8BF],
+  ["8F83",0xB8C2],
+  ["8F84",0xB8C4],
+  ["8F85",0xB8C6],
+  ["8F86",0xB8C7],
+  ["8F87",0xB8C8],
+  ["8F88",0xB8C9],
+  ["8F89",0xB8CA],
+  ["8F8A",0xB8CB],
+  ["8F8B",0xB8CD],
+  ["8F8C",0xB8CE],
+  ["8F8D",0xB8CF],
+  ["8F8E",0xB8D1],
+  ["8F8F",0xB8D2],
+  ["8F90",0xB8D3],
+  ["8F91",0xB8D5],
+  ["8F92",0xB8D6],
+  ["8F93",0xB8D7],
+  ["8F94",0xB8D8],
+  ["8F95",0xB8D9],
+  ["8F96",0xB8DA],
+  ["8F97",0xB8DB],
+  ["8F98",0xB8DC],
+  ["8F99",0xB8DE],
+  ["8F9A",0xB8E0],
+  ["8F9B",0xB8E2],
+  ["8F9C",0xB8E3],
+  ["8F9D",0xB8E4],
+  ["8F9E",0xB8E5],
+  ["8F9F",0xB8E6],
+  ["8FA0",0xB8E7],
+  ["8FA1",0xB8EA],
+  ["8FA2",0xB8EB],
+  ["8FA3",0xB8ED],
+  ["8FA4",0xB8EE],
+  ["8FA5",0xB8EF],
+  ["8FA6",0xB8F1],
+  ["8FA7",0xB8F2],
+  ["8FA8",0xB8F3],
+  ["8FA9",0xB8F4],
+  ["8FAA",0xB8F5],
+  ["8FAB",0xB8F6],
+  ["8FAC",0xB8F7],
+  ["8FAD",0xB8FA],
+  ["8FAE",0xB8FC],
+  ["8FAF",0xB8FE],
+  ["8FB0",0xB8FF],
+  ["8FB1",0xB900],
+  ["8FB2",0xB901],
+  ["8FB3",0xB902],
+  ["8FB4",0xB903],
+  ["8FB5",0xB905],
+  ["8FB6",0xB906],
+  ["8FB7",0xB907],
+  ["8FB8",0xB908],
+  ["8FB9",0xB909],
+  ["8FBA",0xB90A],
+  ["8FBB",0xB90B],
+  ["8FBC",0xB90C],
+  ["8FBD",0xB90D],
+  ["8FBE",0xB90E],
+  ["8FBF",0xB90F],
+  ["8FC0",0xB910],
+  ["8FC1",0xB911],
+  ["8FC2",0xB912],
+  ["8FC3",0xB913],
+  ["8FC4",0xB914],
+  ["8FC5",0xB915],
+  ["8FC6",0xB916],
+  ["8FC7",0xB917],
+  ["8FC8",0xB919],
+  ["8FC9",0xB91A],
+  ["8FCA",0xB91B],
+  ["8FCB",0xB91C],
+  ["8FCC",0xB91D],
+  ["8FCD",0xB91E],
+  ["8FCE",0xB91F],
+  ["8FCF",0xB921],
+  ["8FD0",0xB922],
+  ["8FD1",0xB923],
+  ["8FD2",0xB924],
+  ["8FD3",0xB925],
+  ["8FD4",0xB926],
+  ["8FD5",0xB927],
+  ["8FD6",0xB928],
+  ["8FD7",0xB929],
+  ["8FD8",0xB92A],
+  ["8FD9",0xB92B],
+  ["8FDA",0xB92C],
+  ["8FDB",0xB92D],
+  ["8FDC",0xB92E],
+  ["8FDD",0xB92F],
+  ["8FDE",0xB930],
+  ["8FDF",0xB931],
+  ["8FE0",0xB932],
+  ["8FE1",0xB933],
+  ["8FE2",0xB934],
+  ["8FE3",0xB935],
+  ["8FE4",0xB936],
+  ["8FE5",0xB937],
+  ["8FE6",0xB938],
+  ["8FE7",0xB939],
+  ["8FE8",0xB93A],
+  ["8FE9",0xB93B],
+  ["8FEA",0xB93E],
+  ["8FEB",0xB93F],
+  ["8FEC",0xB941],
+  ["8FED",0xB942],
+  ["8FEE",0xB943],
+  ["8FEF",0xB945],
+  ["8FF0",0xB946],
+  ["8FF1",0xB947],
+  ["8FF2",0xB948],
+  ["8FF3",0xB949],
+  ["8FF4",0xB94A],
+  ["8FF5",0xB94B],
+  ["8FF6",0xB94D],
+  ["8FF7",0xB94E],
+  ["8FF8",0xB950],
+  ["8FF9",0xB952],
+  ["8FFA",0xB953],
+  ["8FFB",0xB954],
+  ["8FFC",0xB955],
+  ["8FFD",0xB956],
+  ["8FFE",0xB957],
+  ["9041",0xB95A],
+  ["9042",0xB95B],
+  ["9043",0xB95D],
+  ["9044",0xB95E],
+  ["9045",0xB95F],
+  ["9046",0xB961],
+  ["9047",0xB962],
+  ["9048",0xB963],
+  ["9049",0xB964],
+  ["904A",0xB965],
+  ["904B",0xB966],
+  ["904C",0xB967],
+  ["904D",0xB96A],
+  ["904E",0xB96C],
+  ["904F",0xB96E],
+  ["9050",0xB96F],
+  ["9051",0xB970],
+  ["9052",0xB971],
+  ["9053",0xB972],
+  ["9054",0xB973],
+  ["9055",0xB976],
+  ["9056",0xB977],
+  ["9057",0xB979],
+  ["9058",0xB97A],
+  ["9059",0xB97B],
+  ["905A",0xB97D],
+  ["9061",0xB97E],
+  ["9062",0xB97F],
+  ["9063",0xB980],
+  ["9064",0xB981],
+  ["9065",0xB982],
+  ["9066",0xB983],
+  ["9067",0xB986],
+  ["9068",0xB988],
+  ["9069",0xB98B],
+  ["906A",0xB98C],
+  ["906B",0xB98F],
+  ["906C",0xB990],
+  ["906D",0xB991],
+  ["906E",0xB992],
+  ["906F",0xB993],
+  ["9070",0xB994],
+  ["9071",0xB995],
+  ["9072",0xB996],
+  ["9073",0xB997],
+  ["9074",0xB998],
+  ["9075",0xB999],
+  ["9076",0xB99A],
+  ["9077",0xB99B],
+  ["9078",0xB99C],
+  ["9079",0xB99D],
+  ["907A",0xB99E],
+  ["9081",0xB99F],
+  ["9082",0xB9A0],
+  ["9083",0xB9A1],
+  ["9084",0xB9A2],
+  ["9085",0xB9A3],
+  ["9086",0xB9A4],
+  ["9087",0xB9A5],
+  ["9088",0xB9A6],
+  ["9089",0xB9A7],
+  ["908A",0xB9A8],
+  ["908B",0xB9A9],
+  ["908C",0xB9AA],
+  ["908D",0xB9AB],
+  ["908E",0xB9AE],
+  ["908F",0xB9AF],
+  ["9090",0xB9B1],
+  ["9091",0xB9B2],
+  ["9092",0xB9B3],
+  ["9093",0xB9B5],
+  ["9094",0xB9B6],
+  ["9095",0xB9B7],
+  ["9096",0xB9B8],
+  ["9097",0xB9B9],
+  ["9098",0xB9BA],
+  ["9099",0xB9BB],
+  ["909A",0xB9BE],
+  ["909B",0xB9C0],
+  ["909C",0xB9C2],
+  ["909D",0xB9C3],
+  ["909E",0xB9C4],
+  ["909F",0xB9C5],
+  ["90A0",0xB9C6],
+  ["90A1",0xB9C7],
+  ["90A2",0xB9CA],
+  ["90A3",0xB9CB],
+  ["90A4",0xB9CD],
+  ["90A5",0xB9D3],
+  ["90A6",0xB9D4],
+  ["90A7",0xB9D5],
+  ["90A8",0xB9D6],
+  ["90A9",0xB9D7],
+  ["90AA",0xB9DA],
+  ["90AB",0xB9DC],
+  ["90AC",0xB9DF],
+  ["90AD",0xB9E0],
+  ["90AE",0xB9E2],
+  ["90AF",0xB9E6],
+  ["90B0",0xB9E7],
+  ["90B1",0xB9E9],
+  ["90B2",0xB9EA],
+  ["90B3",0xB9EB],
+  ["90B4",0xB9ED],
+  ["90B5",0xB9EE],
+  ["90B6",0xB9EF],
+  ["90B7",0xB9F0],
+  ["90B8",0xB9F1],
+  ["90B9",0xB9F2],
+  ["90BA",0xB9F3],
+  ["90BB",0xB9F6],
+  ["90BC",0xB9FB],
+  ["90BD",0xB9FC],
+  ["90BE",0xB9FD],
+  ["90BF",0xB9FE],
+  ["90C0",0xB9FF],
+  ["90C1",0xBA02],
+  ["90C2",0xBA03],
+  ["90C3",0xBA04],
+  ["90C4",0xBA05],
+  ["90C5",0xBA06],
+  ["90C6",0xBA07],
+  ["90C7",0xBA09],
+  ["90C8",0xBA0A],
+  ["90C9",0xBA0B],
+  ["90CA",0xBA0C],
+  ["90CB",0xBA0D],
+  ["90CC",0xBA0E],
+  ["90CD",0xBA0F],
+  ["90CE",0xBA10],
+  ["90CF",0xBA11],
+  ["90D0",0xBA12],
+  ["90D1",0xBA13],
+  ["90D2",0xBA14],
+  ["90D3",0xBA16],
+  ["90D4",0xBA17],
+  ["90D5",0xBA18],
+  ["90D6",0xBA19],
+  ["90D7",0xBA1A],
+  ["90D8",0xBA1B],
+  ["90D9",0xBA1C],
+  ["90DA",0xBA1D],
+  ["90DB",0xBA1E],
+  ["90DC",0xBA1F],
+  ["90DD",0xBA20],
+  ["90DE",0xBA21],
+  ["90DF",0xBA22],
+  ["90E0",0xBA23],
+  ["90E1",0xBA24],
+  ["90E2",0xBA25],
+  ["90E3",0xBA26],
+  ["90E4",0xBA27],
+  ["90E5",0xBA28],
+  ["90E6",0xBA29],
+  ["90E7",0xBA2A],
+  ["90E8",0xBA2B],
+  ["90E9",0xBA2C],
+  ["90EA",0xBA2D],
+  ["90EB",0xBA2E],
+  ["90EC",0xBA2F],
+  ["90ED",0xBA30],
+  ["90EE",0xBA31],
+  ["90EF",0xBA32],
+  ["90F0",0xBA33],
+  ["90F1",0xBA34],
+  ["90F2",0xBA35],
+  ["90F3",0xBA36],
+  ["90F4",0xBA37],
+  ["90F5",0xBA3A],
+  ["90F6",0xBA3B],
+  ["90F7",0xBA3D],
+  ["90F8",0xBA3E],
+  ["90F9",0xBA3F],
+  ["90FA",0xBA41],
+  ["90FB",0xBA43],
+  ["90FC",0xBA44],
+  ["90FD",0xBA45],
+  ["90FE",0xBA46],
+  ["9141",0xBA47],
+  ["9142",0xBA4A],
+  ["9143",0xBA4C],
+  ["9144",0xBA4F],
+  ["9145",0xBA50],
+  ["9146",0xBA51],
+  ["9147",0xBA52],
+  ["9148",0xBA56],
+  ["9149",0xBA57],
+  ["914A",0xBA59],
+  ["914B",0xBA5A],
+  ["914C",0xBA5B],
+  ["914D",0xBA5D],
+  ["914E",0xBA5E],
+  ["914F",0xBA5F],
+  ["9150",0xBA60],
+  ["9151",0xBA61],
+  ["9152",0xBA62],
+  ["9153",0xBA63],
+  ["9154",0xBA66],
+  ["9155",0xBA6A],
+  ["9156",0xBA6B],
+  ["9157",0xBA6C],
+  ["9158",0xBA6D],
+  ["9159",0xBA6E],
+  ["915A",0xBA6F],
+  ["9161",0xBA72],
+  ["9162",0xBA73],
+  ["9163",0xBA75],
+  ["9164",0xBA76],
+  ["9165",0xBA77],
+  ["9166",0xBA79],
+  ["9167",0xBA7A],
+  ["9168",0xBA7B],
+  ["9169",0xBA7C],
+  ["916A",0xBA7D],
+  ["916B",0xBA7E],
+  ["916C",0xBA7F],
+  ["916D",0xBA80],
+  ["916E",0xBA81],
+  ["916F",0xBA82],
+  ["9170",0xBA86],
+  ["9171",0xBA88],
+  ["9172",0xBA89],
+  ["9173",0xBA8A],
+  ["9174",0xBA8B],
+  ["9175",0xBA8D],
+  ["9176",0xBA8E],
+  ["9177",0xBA8F],
+  ["9178",0xBA90],
+  ["9179",0xBA91],
+  ["917A",0xBA92],
+  ["9181",0xBA93],
+  ["9182",0xBA94],
+  ["9183",0xBA95],
+  ["9184",0xBA96],
+  ["9185",0xBA97],
+  ["9186",0xBA98],
+  ["9187",0xBA99],
+  ["9188",0xBA9A],
+  ["9189",0xBA9B],
+  ["918A",0xBA9C],
+  ["918B",0xBA9D],
+  ["918C",0xBA9E],
+  ["918D",0xBA9F],
+  ["918E",0xBAA0],
+  ["918F",0xBAA1],
+  ["9190",0xBAA2],
+  ["9191",0xBAA3],
+  ["9192",0xBAA4],
+  ["9193",0xBAA5],
+  ["9194",0xBAA6],
+  ["9195",0xBAA7],
+  ["9196",0xBAAA],
+  ["9197",0xBAAD],
+  ["9198",0xBAAE],
+  ["9199",0xBAAF],
+  ["919A",0xBAB1],
+  ["919B",0xBAB3],
+  ["919C",0xBAB4],
+  ["919D",0xBAB5],
+  ["919E",0xBAB6],
+  ["919F",0xBAB7],
+  ["91A0",0xBABA],
+  ["91A1",0xBABC],
+  ["91A2",0xBABE],
+  ["91A3",0xBABF],
+  ["91A4",0xBAC0],
+  ["91A5",0xBAC1],
+  ["91A6",0xBAC2],
+  ["91A7",0xBAC3],
+  ["91A8",0xBAC5],
+  ["91A9",0xBAC6],
+  ["91AA",0xBAC7],
+  ["91AB",0xBAC9],
+  ["91AC",0xBACA],
+  ["91AD",0xBACB],
+  ["91AE",0xBACC],
+  ["91AF",0xBACD],
+  ["91B0",0xBACE],
+  ["91B1",0xBACF],
+  ["91B2",0xBAD0],
+  ["91B3",0xBAD1],
+  ["91B4",0xBAD2],
+  ["91B5",0xBAD3],
+  ["91B6",0xBAD4],
+  ["91B7",0xBAD5],
+  ["91B8",0xBAD6],
+  ["91B9",0xBAD7],
+  ["91BA",0xBADA],
+  ["91BB",0xBADB],
+  ["91BC",0xBADC],
+  ["91BD",0xBADD],
+  ["91BE",0xBADE],
+  ["91BF",0xBADF],
+  ["91C0",0xBAE0],
+  ["91C1",0xBAE1],
+  ["91C2",0xBAE2],
+  ["91C3",0xBAE3],
+  ["91C4",0xBAE4],
+  ["91C5",0xBAE5],
+  ["91C6",0xBAE6],
+  ["91C7",0xBAE7],
+  ["91C8",0xBAE8],
+  ["91C9",0xBAE9],
+  ["91CA",0xBAEA],
+  ["91CB",0xBAEB],
+  ["91CC",0xBAEC],
+  ["91CD",0xBAED],
+  ["91CE",0xBAEE],
+  ["91CF",0xBAEF],
+  ["91D0",0xBAF0],
+  ["91D1",0xBAF1],
+  ["91D2",0xBAF2],
+  ["91D3",0xBAF3],
+  ["91D4",0xBAF4],
+  ["91D5",0xBAF5],
+  ["91D6",0xBAF6],
+  ["91D7",0xBAF7],
+  ["91D8",0xBAF8],
+  ["91D9",0xBAF9],
+  ["91DA",0xBAFA],
+  ["91DB",0xBAFB],
+  ["91DC",0xBAFD],
+  ["91DD",0xBAFE],
+  ["91DE",0xBAFF],
+  ["91DF",0xBB01],
+  ["91E0",0xBB02],
+  ["91E1",0xBB03],
+  ["91E2",0xBB05],
+  ["91E3",0xBB06],
+  ["91E4",0xBB07],
+  ["91E5",0xBB08],
+  ["91E6",0xBB09],
+  ["91E7",0xBB0A],
+  ["91E8",0xBB0B],
+  ["91E9",0xBB0C],
+  ["91EA",0xBB0E],
+  ["91EB",0xBB10],
+  ["91EC",0xBB12],
+  ["91ED",0xBB13],
+  ["91EE",0xBB14],
+  ["91EF",0xBB15],
+  ["91F0",0xBB16],
+  ["91F1",0xBB17],
+  ["91F2",0xBB19],
+  ["91F3",0xBB1A],
+  ["91F4",0xBB1B],
+  ["91F5",0xBB1D],
+  ["91F6",0xBB1E],
+  ["91F7",0xBB1F],
+  ["91F8",0xBB21],
+  ["91F9",0xBB22],
+  ["91FA",0xBB23],
+  ["91FB",0xBB24],
+  ["91FC",0xBB25],
+  ["91FD",0xBB26],
+  ["91FE",0xBB27],
+  ["9241",0xBB28],
+  ["9242",0xBB2A],
+  ["9243",0xBB2C],
+  ["9244",0xBB2D],
+  ["9245",0xBB2E],
+  ["9246",0xBB2F],
+  ["9247",0xBB30],
+  ["9248",0xBB31],
+  ["9249",0xBB32],
+  ["924A",0xBB33],
+  ["924B",0xBB37],
+  ["924C",0xBB39],
+  ["924D",0xBB3A],
+  ["924E",0xBB3F],
+  ["924F",0xBB40],
+  ["9250",0xBB41],
+  ["9251",0xBB42],
+  ["9252",0xBB43],
+  ["9253",0xBB46],
+  ["9254",0xBB48],
+  ["9255",0xBB4A],
+  ["9256",0xBB4B],
+  ["9257",0xBB4C],
+  ["9258",0xBB4E],
+  ["9259",0xBB51],
+  ["925A",0xBB52],
+  ["9261",0xBB53],
+  ["9262",0xBB55],
+  ["9263",0xBB56],
+  ["9264",0xBB57],
+  ["9265",0xBB59],
+  ["9266",0xBB5A],
+  ["9267",0xBB5B],
+  ["9268",0xBB5C],
+  ["9269",0xBB5D],
+  ["926A",0xBB5E],
+  ["926B",0xBB5F],
+  ["926C",0xBB60],
+  ["926D",0xBB62],
+  ["926E",0xBB64],
+  ["926F",0xBB65],
+  ["9270",0xBB66],
+  ["9271",0xBB67],
+  ["9272",0xBB68],
+  ["9273",0xBB69],
+  ["9274",0xBB6A],
+  ["9275",0xBB6B],
+  ["9276",0xBB6D],
+  ["9277",0xBB6E],
+  ["9278",0xBB6F],
+  ["9279",0xBB70],
+  ["927A",0xBB71],
+  ["9281",0xBB72],
+  ["9282",0xBB73],
+  ["9283",0xBB74],
+  ["9284",0xBB75],
+  ["9285",0xBB76],
+  ["9286",0xBB77],
+  ["9287",0xBB78],
+  ["9288",0xBB79],
+  ["9289",0xBB7A],
+  ["928A",0xBB7B],
+  ["928B",0xBB7C],
+  ["928C",0xBB7D],
+  ["928D",0xBB7E],
+  ["928E",0xBB7F],
+  ["928F",0xBB80],
+  ["9290",0xBB81],
+  ["9291",0xBB82],
+  ["9292",0xBB83],
+  ["9293",0xBB84],
+  ["9294",0xBB85],
+  ["9295",0xBB86],
+  ["9296",0xBB87],
+  ["9297",0xBB89],
+  ["9298",0xBB8A],
+  ["9299",0xBB8B],
+  ["929A",0xBB8D],
+  ["929B",0xBB8E],
+  ["929C",0xBB8F],
+  ["929D",0xBB91],
+  ["929E",0xBB92],
+  ["929F",0xBB93],
+  ["92A0",0xBB94],
+  ["92A1",0xBB95],
+  ["92A2",0xBB96],
+  ["92A3",0xBB97],
+  ["92A4",0xBB98],
+  ["92A5",0xBB99],
+  ["92A6",0xBB9A],
+  ["92A7",0xBB9B],
+  ["92A8",0xBB9C],
+  ["92A9",0xBB9D],
+  ["92AA",0xBB9E],
+  ["92AB",0xBB9F],
+  ["92AC",0xBBA0],
+  ["92AD",0xBBA1],
+  ["92AE",0xBBA2],
+  ["92AF",0xBBA3],
+  ["92B0",0xBBA5],
+  ["92B1",0xBBA6],
+  ["92B2",0xBBA7],
+  ["92B3",0xBBA9],
+  ["92B4",0xBBAA],
+  ["92B5",0xBBAB],
+  ["92B6",0xBBAD],
+  ["92B7",0xBBAE],
+  ["92B8",0xBBAF],
+  ["92B9",0xBBB0],
+  ["92BA",0xBBB1],
+  ["92BB",0xBBB2],
+  ["92BC",0xBBB3],
+  ["92BD",0xBBB5],
+  ["92BE",0xBBB6],
+  ["92BF",0xBBB8],
+  ["92C0",0xBBB9],
+  ["92C1",0xBBBA],
+  ["92C2",0xBBBB],
+  ["92C3",0xBBBC],
+  ["92C4",0xBBBD],
+  ["92C5",0xBBBE],
+  ["92C6",0xBBBF],
+  ["92C7",0xBBC1],
+  ["92C8",0xBBC2],
+  ["92C9",0xBBC3],
+  ["92CA",0xBBC5],
+  ["92CB",0xBBC6],
+  ["92CC",0xBBC7],
+  ["92CD",0xBBC9],
+  ["92CE",0xBBCA],
+  ["92CF",0xBBCB],
+  ["92D0",0xBBCC],
+  ["92D1",0xBBCD],
+  ["92D2",0xBBCE],
+  ["92D3",0xBBCF],
+  ["92D4",0xBBD1],
+  ["92D5",0xBBD2],
+  ["92D6",0xBBD4],
+  ["92D7",0xBBD5],
+  ["92D8",0xBBD6],
+  ["92D9",0xBBD7],
+  ["92DA",0xBBD8],
+  ["92DB",0xBBD9],
+  ["92DC",0xBBDA],
+  ["92DD",0xBBDB],
+  ["92DE",0xBBDC],
+  ["92DF",0xBBDD],
+  ["92E0",0xBBDE],
+  ["92E1",0xBBDF],
+  ["92E2",0xBBE0],
+  ["92E3",0xBBE1],
+  ["92E4",0xBBE2],
+  ["92E5",0xBBE3],
+  ["92E6",0xBBE4],
+  ["92E7",0xBBE5],
+  ["92E8",0xBBE6],
+  ["92E9",0xBBE7],
+  ["92EA",0xBBE8],
+  ["92EB",0xBBE9],
+  ["92EC",0xBBEA],
+  ["92ED",0xBBEB],
+  ["92EE",0xBBEC],
+  ["92EF",0xBBED],
+  ["92F0",0xBBEE],
+  ["92F1",0xBBEF],
+  ["92F2",0xBBF0],
+  ["92F3",0xBBF1],
+  ["92F4",0xBBF2],
+  ["92F5",0xBBF3],
+  ["92F6",0xBBF4],
+  ["92F7",0xBBF5],
+  ["92F8",0xBBF6],
+  ["92F9",0xBBF7],
+  ["92FA",0xBBFA],
+  ["92FB",0xBBFB],
+  ["92FC",0xBBFD],
+  ["92FD",0xBBFE],
+  ["92FE",0xBC01],
+  ["9341",0xBC03],
+  ["9342",0xBC04],
+  ["9343",0xBC05],
+  ["9344",0xBC06],
+  ["9345",0xBC07],
+  ["9346",0xBC0A],
+  ["9347",0xBC0E],
+  ["9348",0xBC10],
+  ["9349",0xBC12],
+  ["934A",0xBC13],
+  ["934B",0xBC19],
+  ["934C",0xBC1A],
+  ["934D",0xBC20],
+  ["934E",0xBC21],
+  ["934F",0xBC22],
+  ["9350",0xBC23],
+  ["9351",0xBC26],
+  ["9352",0xBC28],
+  ["9353",0xBC2A],
+  ["9354",0xBC2B],
+  ["9355",0xBC2C],
+  ["9356",0xBC2E],
+  ["9357",0xBC2F],
+  ["9358",0xBC32],
+  ["9359",0xBC33],
+  ["935A",0xBC35],
+  ["9361",0xBC36],
+  ["9362",0xBC37],
+  ["9363",0xBC39],
+  ["9364",0xBC3A],
+  ["9365",0xBC3B],
+  ["9366",0xBC3C],
+  ["9367",0xBC3D],
+  ["9368",0xBC3E],
+  ["9369",0xBC3F],
+  ["936A",0xBC42],
+  ["936B",0xBC46],
+  ["936C",0xBC47],
+  ["936D",0xBC48],
+  ["936E",0xBC4A],
+  ["936F",0xBC4B],
+  ["9370",0xBC4E],
+  ["9371",0xBC4F],
+  ["9372",0xBC51],
+  ["9373",0xBC52],
+  ["9374",0xBC53],
+  ["9375",0xBC54],
+  ["9376",0xBC55],
+  ["9377",0xBC56],
+  ["9378",0xBC57],
+  ["9379",0xBC58],
+  ["937A",0xBC59],
+  ["9381",0xBC5A],
+  ["9382",0xBC5B],
+  ["9383",0xBC5C],
+  ["9384",0xBC5E],
+  ["9385",0xBC5F],
+  ["9386",0xBC60],
+  ["9387",0xBC61],
+  ["9388",0xBC62],
+  ["9389",0xBC63],
+  ["938A",0xBC64],
+  ["938B",0xBC65],
+  ["938C",0xBC66],
+  ["938D",0xBC67],
+  ["938E",0xBC68],
+  ["938F",0xBC69],
+  ["9390",0xBC6A],
+  ["9391",0xBC6B],
+  ["9392",0xBC6C],
+  ["9393",0xBC6D],
+  ["9394",0xBC6E],
+  ["9395",0xBC6F],
+  ["9396",0xBC70],
+  ["9397",0xBC71],
+  ["9398",0xBC72],
+  ["9399",0xBC73],
+  ["939A",0xBC74],
+  ["939B",0xBC75],
+  ["939C",0xBC76],
+  ["939D",0xBC77],
+  ["939E",0xBC78],
+  ["939F",0xBC79],
+  ["93A0",0xBC7A],
+  ["93A1",0xBC7B],
+  ["93A2",0xBC7C],
+  ["93A3",0xBC7D],
+  ["93A4",0xBC7E],
+  ["93A5",0xBC7F],
+  ["93A6",0xBC80],
+  ["93A7",0xBC81],
+  ["93A8",0xBC82],
+  ["93A9",0xBC83],
+  ["93AA",0xBC86],
+  ["93AB",0xBC87],
+  ["93AC",0xBC89],
+  ["93AD",0xBC8A],
+  ["93AE",0xBC8D],
+  ["93AF",0xBC8F],
+  ["93B0",0xBC90],
+  ["93B1",0xBC91],
+  ["93B2",0xBC92],
+  ["93B3",0xBC93],
+  ["93B4",0xBC96],
+  ["93B5",0xBC98],
+  ["93B6",0xBC9B],
+  ["93B7",0xBC9C],
+  ["93B8",0xBC9D],
+  ["93B9",0xBC9E],
+  ["93BA",0xBC9F],
+  ["93BB",0xBCA2],
+  ["93BC",0xBCA3],
+  ["93BD",0xBCA5],
+  ["93BE",0xBCA6],
+  ["93BF",0xBCA9],
+  ["93C0",0xBCAA],
+  ["93C1",0xBCAB],
+  ["93C2",0xBCAC],
+  ["93C3",0xBCAD],
+  ["93C4",0xBCAE],
+  ["93C5",0xBCAF],
+  ["93C6",0xBCB2],
+  ["93C7",0xBCB6],
+  ["93C8",0xBCB7],
+  ["93C9",0xBCB8],
+  ["93CA",0xBCB9],
+  ["93CB",0xBCBA],
+  ["93CC",0xBCBB],
+  ["93CD",0xBCBE],
+  ["93CE",0xBCBF],
+  ["93CF",0xBCC1],
+  ["93D0",0xBCC2],
+  ["93D1",0xBCC3],
+  ["93D2",0xBCC5],
+  ["93D3",0xBCC6],
+  ["93D4",0xBCC7],
+  ["93D5",0xBCC8],
+  ["93D6",0xBCC9],
+  ["93D7",0xBCCA],
+  ["93D8",0xBCCB],
+  ["93D9",0xBCCC],
+  ["93DA",0xBCCE],
+  ["93DB",0xBCD2],
+  ["93DC",0xBCD3],
+  ["93DD",0xBCD4],
+  ["93DE",0xBCD6],
+  ["93DF",0xBCD7],
+  ["93E0",0xBCD9],
+  ["93E1",0xBCDA],
+  ["93E2",0xBCDB],
+  ["93E3",0xBCDD],
+  ["93E4",0xBCDE],
+  ["93E5",0xBCDF],
+  ["93E6",0xBCE0],
+  ["93E7",0xBCE1],
+  ["93E8",0xBCE2],
+  ["93E9",0xBCE3],
+  ["93EA",0xBCE4],
+  ["93EB",0xBCE5],
+  ["93EC",0xBCE6],
+  ["93ED",0xBCE7],
+  ["93EE",0xBCE8],
+  ["93EF",0xBCE9],
+  ["93F0",0xBCEA],
+  ["93F1",0xBCEB],
+  ["93F2",0xBCEC],
+  ["93F3",0xBCED],
+  ["93F4",0xBCEE],
+  ["93F5",0xBCEF],
+  ["93F6",0xBCF0],
+  ["93F7",0xBCF1],
+  ["93F8",0xBCF2],
+  ["93F9",0xBCF3],
+  ["93FA",0xBCF7],
+  ["93FB",0xBCF9],
+  ["93FC",0xBCFA],
+  ["93FD",0xBCFB],
+  ["93FE",0xBCFD],
+  ["9441",0xBCFE],
+  ["9442",0xBCFF],
+  ["9443",0xBD00],
+  ["9444",0xBD01],
+  ["9445",0xBD02],
+  ["9446",0xBD03],
+  ["9447",0xBD06],
+  ["9448",0xBD08],
+  ["9449",0xBD0A],
+  ["944A",0xBD0B],
+  ["944B",0xBD0C],
+  ["944C",0xBD0D],
+  ["944D",0xBD0E],
+  ["944E",0xBD0F],
+  ["944F",0xBD11],
+  ["9450",0xBD12],
+  ["9451",0xBD13],
+  ["9452",0xBD15],
+  ["9453",0xBD16],
+  ["9454",0xBD17],
+  ["9455",0xBD18],
+  ["9456",0xBD19],
+  ["9457",0xBD1A],
+  ["9458",0xBD1B],
+  ["9459",0xBD1C],
+  ["945A",0xBD1D],
+  ["9461",0xBD1E],
+  ["9462",0xBD1F],
+  ["9463",0xBD20],
+  ["9464",0xBD21],
+  ["9465",0xBD22],
+  ["9466",0xBD23],
+  ["9467",0xBD25],
+  ["9468",0xBD26],
+  ["9469",0xBD27],
+  ["946A",0xBD28],
+  ["946B",0xBD29],
+  ["946C",0xBD2A],
+  ["946D",0xBD2B],
+  ["946E",0xBD2D],
+  ["946F",0xBD2E],
+  ["9470",0xBD2F],
+  ["9471",0xBD30],
+  ["9472",0xBD31],
+  ["9473",0xBD32],
+  ["9474",0xBD33],
+  ["9475",0xBD34],
+  ["9476",0xBD35],
+  ["9477",0xBD36],
+  ["9478",0xBD37],
+  ["9479",0xBD38],
+  ["947A",0xBD39],
+  ["9481",0xBD3A],
+  ["9482",0xBD3B],
+  ["9483",0xBD3C],
+  ["9484",0xBD3D],
+  ["9485",0xBD3E],
+  ["9486",0xBD3F],
+  ["9487",0xBD41],
+  ["9488",0xBD42],
+  ["9489",0xBD43],
+  ["948A",0xBD44],
+  ["948B",0xBD45],
+  ["948C",0xBD46],
+  ["948D",0xBD47],
+  ["948E",0xBD4A],
+  ["948F",0xBD4B],
+  ["9490",0xBD4D],
+  ["9491",0xBD4E],
+  ["9492",0xBD4F],
+  ["9493",0xBD51],
+  ["9494",0xBD52],
+  ["9495",0xBD53],
+  ["9496",0xBD54],
+  ["9497",0xBD55],
+  ["9498",0xBD56],
+  ["9499",0xBD57],
+  ["949A",0xBD5A],
+  ["949B",0xBD5B],
+  ["949C",0xBD5C],
+  ["949D",0xBD5D],
+  ["949E",0xBD5E],
+  ["949F",0xBD5F],
+  ["94A0",0xBD60],
+  ["94A1",0xBD61],
+  ["94A2",0xBD62],
+  ["94A3",0xBD63],
+  ["94A4",0xBD65],
+  ["94A5",0xBD66],
+  ["94A6",0xBD67],
+  ["94A7",0xBD69],
+  ["94A8",0xBD6A],
+  ["94A9",0xBD6B],
+  ["94AA",0xBD6C],
+  ["94AB",0xBD6D],
+  ["94AC",0xBD6E],
+  ["94AD",0xBD6F],
+  ["94AE",0xBD70],
+  ["94AF",0xBD71],
+  ["94B0",0xBD72],
+  ["94B1",0xBD73],
+  ["94B2",0xBD74],
+  ["94B3",0xBD75],
+  ["94B4",0xBD76],
+  ["94B5",0xBD77],
+  ["94B6",0xBD78],
+  ["94B7",0xBD79],
+  ["94B8",0xBD7A],
+  ["94B9",0xBD7B],
+  ["94BA",0xBD7C],
+  ["94BB",0xBD7D],
+  ["94BC",0xBD7E],
+  ["94BD",0xBD7F],
+  ["94BE",0xBD82],
+  ["94BF",0xBD83],
+  ["94C0",0xBD85],
+  ["94C1",0xBD86],
+  ["94C2",0xBD8B],
+  ["94C3",0xBD8C],
+  ["94C4",0xBD8D],
+  ["94C5",0xBD8E],
+  ["94C6",0xBD8F],
+  ["94C7",0xBD92],
+  ["94C8",0xBD94],
+  ["94C9",0xBD96],
+  ["94CA",0xBD97],
+  ["94CB",0xBD98],
+  ["94CC",0xBD9B],
+  ["94CD",0xBD9D],
+  ["94CE",0xBD9E],
+  ["94CF",0xBD9F],
+  ["94D0",0xBDA0],
+  ["94D1",0xBDA1],
+  ["94D2",0xBDA2],
+  ["94D3",0xBDA3],
+  ["94D4",0xBDA5],
+  ["94D5",0xBDA6],
+  ["94D6",0xBDA7],
+  ["94D7",0xBDA8],
+  ["94D8",0xBDA9],
+  ["94D9",0xBDAA],
+  ["94DA",0xBDAB],
+  ["94DB",0xBDAC],
+  ["94DC",0xBDAD],
+  ["94DD",0xBDAE],
+  ["94DE",0xBDAF],
+  ["94DF",0xBDB1],
+  ["94E0",0xBDB2],
+  ["94E1",0xBDB3],
+  ["94E2",0xBDB4],
+  ["94E3",0xBDB5],
+  ["94E4",0xBDB6],
+  ["94E5",0xBDB7],
+  ["94E6",0xBDB9],
+  ["94E7",0xBDBA],
+  ["94E8",0xBDBB],
+  ["94E9",0xBDBC],
+  ["94EA",0xBDBD],
+  ["94EB",0xBDBE],
+  ["94EC",0xBDBF],
+  ["94ED",0xBDC0],
+  ["94EE",0xBDC1],
+  ["94EF",0xBDC2],
+  ["94F0",0xBDC3],
+  ["94F1",0xBDC4],
+  ["94F2",0xBDC5],
+  ["94F3",0xBDC6],
+  ["94F4",0xBDC7],
+  ["94F5",0xBDC8],
+  ["94F6",0xBDC9],
+  ["94F7",0xBDCA],
+  ["94F8",0xBDCB],
+  ["94F9",0xBDCC],
+  ["94FA",0xBDCD],
+  ["94FB",0xBDCE],
+  ["94FC",0xBDCF],
+  ["94FD",0xBDD0],
+  ["94FE",0xBDD1],
+  ["9541",0xBDD2],
+  ["9542",0xBDD3],
+  ["9543",0xBDD6],
+  ["9544",0xBDD7],
+  ["9545",0xBDD9],
+  ["9546",0xBDDA],
+  ["9547",0xBDDB],
+  ["9548",0xBDDD],
+  ["9549",0xBDDE],
+  ["954A",0xBDDF],
+  ["954B",0xBDE0],
+  ["954C",0xBDE1],
+  ["954D",0xBDE2],
+  ["954E",0xBDE3],
+  ["954F",0xBDE4],
+  ["9550",0xBDE5],
+  ["9551",0xBDE6],
+  ["9552",0xBDE7],
+  ["9553",0xBDE8],
+  ["9554",0xBDEA],
+  ["9555",0xBDEB],
+  ["9556",0xBDEC],
+  ["9557",0xBDED],
+  ["9558",0xBDEE],
+  ["9559",0xBDEF],
+  ["955A",0xBDF1],
+  ["9561",0xBDF2],
+  ["9562",0xBDF3],
+  ["9563",0xBDF5],
+  ["9564",0xBDF6],
+  ["9565",0xBDF7],
+  ["9566",0xBDF9],
+  ["9567",0xBDFA],
+  ["9568",0xBDFB],
+  ["9569",0xBDFC],
+  ["956A",0xBDFD],
+  ["956B",0xBDFE],
+  ["956C",0xBDFF],
+  ["956D",0xBE01],
+  ["956E",0xBE02],
+  ["956F",0xBE04],
+  ["9570",0xBE06],
+  ["9571",0xBE07],
+  ["9572",0xBE08],
+  ["9573",0xBE09],
+  ["9574",0xBE0A],
+  ["9575",0xBE0B],
+  ["9576",0xBE0E],
+  ["9577",0xBE0F],
+  ["9578",0xBE11],
+  ["9579",0xBE12],
+  ["957A",0xBE13],
+  ["9581",0xBE15],
+  ["9582",0xBE16],
+  ["9583",0xBE17],
+  ["9584",0xBE18],
+  ["9585",0xBE19],
+  ["9586",0xBE1A],
+  ["9587",0xBE1B],
+  ["9588",0xBE1E],
+  ["9589",0xBE20],
+  ["958A",0xBE21],
+  ["958B",0xBE22],
+  ["958C",0xBE23],
+  ["958D",0xBE24],
+  ["958E",0xBE25],
+  ["958F",0xBE26],
+  ["9590",0xBE27],
+  ["9591",0xBE28],
+  ["9592",0xBE29],
+  ["9593",0xBE2A],
+  ["9594",0xBE2B],
+  ["9595",0xBE2C],
+  ["9596",0xBE2D],
+  ["9597",0xBE2E],
+  ["9598",0xBE2F],
+  ["9599",0xBE30],
+  ["959A",0xBE31],
+  ["959B",0xBE32],
+  ["959C",0xBE33],
+  ["959D",0xBE34],
+  ["959E",0xBE35],
+  ["959F",0xBE36],
+  ["95A0",0xBE37],
+  ["95A1",0xBE38],
+  ["95A2",0xBE39],
+  ["95A3",0xBE3A],
+  ["95A4",0xBE3B],
+  ["95A5",0xBE3C],
+  ["95A6",0xBE3D],
+  ["95A7",0xBE3E],
+  ["95A8",0xBE3F],
+  ["95A9",0xBE40],
+  ["95AA",0xBE41],
+  ["95AB",0xBE42],
+  ["95AC",0xBE43],
+  ["95AD",0xBE46],
+  ["95AE",0xBE47],
+  ["95AF",0xBE49],
+  ["95B0",0xBE4A],
+  ["95B1",0xBE4B],
+  ["95B2",0xBE4D],
+  ["95B3",0xBE4F],
+  ["95B4",0xBE50],
+  ["95B5",0xBE51],
+  ["95B6",0xBE52],
+  ["95B7",0xBE53],
+  ["95B8",0xBE56],
+  ["95B9",0xBE58],
+  ["95BA",0xBE5C],
+  ["95BB",0xBE5D],
+  ["95BC",0xBE5E],
+  ["95BD",0xBE5F],
+  ["95BE",0xBE62],
+  ["95BF",0xBE63],
+  ["95C0",0xBE65],
+  ["95C1",0xBE66],
+  ["95C2",0xBE67],
+  ["95C3",0xBE69],
+  ["95C4",0xBE6B],
+  ["95C5",0xBE6C],
+  ["95C6",0xBE6D],
+  ["95C7",0xBE6E],
+  ["95C8",0xBE6F],
+  ["95C9",0xBE72],
+  ["95CA",0xBE76],
+  ["95CB",0xBE77],
+  ["95CC",0xBE78],
+  ["95CD",0xBE79],
+  ["95CE",0xBE7A],
+  ["95CF",0xBE7E],
+  ["95D0",0xBE7F],
+  ["95D1",0xBE81],
+  ["95D2",0xBE82],
+  ["95D3",0xBE83],
+  ["95D4",0xBE85],
+  ["95D5",0xBE86],
+  ["95D6",0xBE87],
+  ["95D7",0xBE88],
+  ["95D8",0xBE89],
+  ["95D9",0xBE8A],
+  ["95DA",0xBE8B],
+  ["95DB",0xBE8E],
+  ["95DC",0xBE92],
+  ["95DD",0xBE93],
+  ["95DE",0xBE94],
+  ["95DF",0xBE95],
+  ["95E0",0xBE96],
+  ["95E1",0xBE97],
+  ["95E2",0xBE9A],
+  ["95E3",0xBE9B],
+  ["95E4",0xBE9C],
+  ["95E5",0xBE9D],
+  ["95E6",0xBE9E],
+  ["95E7",0xBE9F],
+  ["95E8",0xBEA0],
+  ["95E9",0xBEA1],
+  ["95EA",0xBEA2],
+  ["95EB",0xBEA3],
+  ["95EC",0xBEA4],
+  ["95ED",0xBEA5],
+  ["95EE",0xBEA6],
+  ["95EF",0xBEA7],
+  ["95F0",0xBEA9],
+  ["95F1",0xBEAA],
+  ["95F2",0xBEAB],
+  ["95F3",0xBEAC],
+  ["95F4",0xBEAD],
+  ["95F5",0xBEAE],
+  ["95F6",0xBEAF],
+  ["95F7",0xBEB0],
+  ["95F8",0xBEB1],
+  ["95F9",0xBEB2],
+  ["95FA",0xBEB3],
+  ["95FB",0xBEB4],
+  ["95FC",0xBEB5],
+  ["95FD",0xBEB6],
+  ["95FE",0xBEB7],
+  ["9641",0xBEB8],
+  ["9642",0xBEB9],
+  ["9643",0xBEBA],
+  ["9644",0xBEBB],
+  ["9645",0xBEBC],
+  ["9646",0xBEBD],
+  ["9647",0xBEBE],
+  ["9648",0xBEBF],
+  ["9649",0xBEC0],
+  ["964A",0xBEC1],
+  ["964B",0xBEC2],
+  ["964C",0xBEC3],
+  ["964D",0xBEC4],
+  ["964E",0xBEC5],
+  ["964F",0xBEC6],
+  ["9650",0xBEC7],
+  ["9651",0xBEC8],
+  ["9652",0xBEC9],
+  ["9653",0xBECA],
+  ["9654",0xBECB],
+  ["9655",0xBECC],
+  ["9656",0xBECD],
+  ["9657",0xBECE],
+  ["9658",0xBECF],
+  ["9659",0xBED2],
+  ["965A",0xBED3],
+  ["9661",0xBED5],
+  ["9662",0xBED6],
+  ["9663",0xBED9],
+  ["9664",0xBEDA],
+  ["9665",0xBEDB],
+  ["9666",0xBEDC],
+  ["9667",0xBEDD],
+  ["9668",0xBEDE],
+  ["9669",0xBEDF],
+  ["966A",0xBEE1],
+  ["966B",0xBEE2],
+  ["966C",0xBEE6],
+  ["966D",0xBEE7],
+  ["966E",0xBEE8],
+  ["966F",0xBEE9],
+  ["9670",0xBEEA],
+  ["9671",0xBEEB],
+  ["9672",0xBEED],
+  ["9673",0xBEEE],
+  ["9674",0xBEEF],
+  ["9675",0xBEF0],
+  ["9676",0xBEF1],
+  ["9677",0xBEF2],
+  ["9678",0xBEF3],
+  ["9679",0xBEF4],
+  ["967A",0xBEF5],
+  ["9681",0xBEF6],
+  ["9682",0xBEF7],
+  ["9683",0xBEF8],
+  ["9684",0xBEF9],
+  ["9685",0xBEFA],
+  ["9686",0xBEFB],
+  ["9687",0xBEFC],
+  ["9688",0xBEFD],
+  ["9689",0xBEFE],
+  ["968A",0xBEFF],
+  ["968B",0xBF00],
+  ["968C",0xBF02],
+  ["968D",0xBF03],
+  ["968E",0xBF04],
+  ["968F",0xBF05],
+  ["9690",0xBF06],
+  ["9691",0xBF07],
+  ["9692",0xBF0A],
+  ["9693",0xBF0B],
+  ["9694",0xBF0C],
+  ["9695",0xBF0D],
+  ["9696",0xBF0E],
+  ["9697",0xBF0F],
+  ["9698",0xBF10],
+  ["9699",0xBF11],
+  ["969A",0xBF12],
+  ["969B",0xBF13],
+  ["969C",0xBF14],
+  ["969D",0xBF15],
+  ["969E",0xBF16],
+  ["969F",0xBF17],
+  ["96A0",0xBF1A],
+  ["96A1",0xBF1E],
+  ["96A2",0xBF1F],
+  ["96A3",0xBF20],
+  ["96A4",0xBF21],
+  ["96A5",0xBF22],
+  ["96A6",0xBF23],
+  ["96A7",0xBF24],
+  ["96A8",0xBF25],
+  ["96A9",0xBF26],
+  ["96AA",0xBF27],
+  ["96AB",0xBF28],
+  ["96AC",0xBF29],
+  ["96AD",0xBF2A],
+  ["96AE",0xBF2B],
+  ["96AF",0xBF2C],
+  ["96B0",0xBF2D],
+  ["96B1",0xBF2E],
+  ["96B2",0xBF2F],
+  ["96B3",0xBF30],
+  ["96B4",0xBF31],
+  ["96B5",0xBF32],
+  ["96B6",0xBF33],
+  ["96B7",0xBF34],
+  ["96B8",0xBF35],
+  ["96B9",0xBF36],
+  ["96BA",0xBF37],
+  ["96BB",0xBF38],
+  ["96BC",0xBF39],
+  ["96BD",0xBF3A],
+  ["96BE",0xBF3B],
+  ["96BF",0xBF3C],
+  ["96C0",0xBF3D],
+  ["96C1",0xBF3E],
+  ["96C2",0xBF3F],
+  ["96C3",0xBF42],
+  ["96C4",0xBF43],
+  ["96C5",0xBF45],
+  ["96C6",0xBF46],
+  ["96C7",0xBF47],
+  ["96C8",0xBF49],
+  ["96C9",0xBF4A],
+  ["96CA",0xBF4B],
+  ["96CB",0xBF4C],
+  ["96CC",0xBF4D],
+  ["96CD",0xBF4E],
+  ["96CE",0xBF4F],
+  ["96CF",0xBF52],
+  ["96D0",0xBF53],
+  ["96D1",0xBF54],
+  ["96D2",0xBF56],
+  ["96D3",0xBF57],
+  ["96D4",0xBF58],
+  ["96D5",0xBF59],
+  ["96D6",0xBF5A],
+  ["96D7",0xBF5B],
+  ["96D8",0xBF5C],
+  ["96D9",0xBF5D],
+  ["96DA",0xBF5E],
+  ["96DB",0xBF5F],
+  ["96DC",0xBF60],
+  ["96DD",0xBF61],
+  ["96DE",0xBF62],
+  ["96DF",0xBF63],
+  ["96E0",0xBF64],
+  ["96E1",0xBF65],
+  ["96E2",0xBF66],
+  ["96E3",0xBF67],
+  ["96E4",0xBF68],
+  ["96E5",0xBF69],
+  ["96E6",0xBF6A],
+  ["96E7",0xBF6B],
+  ["96E8",0xBF6C],
+  ["96E9",0xBF6D],
+  ["96EA",0xBF6E],
+  ["96EB",0xBF6F],
+  ["96EC",0xBF70],
+  ["96ED",0xBF71],
+  ["96EE",0xBF72],
+  ["96EF",0xBF73],
+  ["96F0",0xBF74],
+  ["96F1",0xBF75],
+  ["96F2",0xBF76],
+  ["96F3",0xBF77],
+  ["96F4",0xBF78],
+  ["96F5",0xBF79],
+  ["96F6",0xBF7A],
+  ["96F7",0xBF7B],
+  ["96F8",0xBF7C],
+  ["96F9",0xBF7D],
+  ["96FA",0xBF7E],
+  ["96FB",0xBF7F],
+  ["96FC",0xBF80],
+  ["96FD",0xBF81],
+  ["96FE",0xBF82],
+  ["9741",0xBF83],
+  ["9742",0xBF84],
+  ["9743",0xBF85],
+  ["9744",0xBF86],
+  ["9745",0xBF87],
+  ["9746",0xBF88],
+  ["9747",0xBF89],
+  ["9748",0xBF8A],
+  ["9749",0xBF8B],
+  ["974A",0xBF8C],
+  ["974B",0xBF8D],
+  ["974C",0xBF8E],
+  ["974D",0xBF8F],
+  ["974E",0xBF90],
+  ["974F",0xBF91],
+  ["9750",0xBF92],
+  ["9751",0xBF93],
+  ["9752",0xBF95],
+  ["9753",0xBF96],
+  ["9754",0xBF97],
+  ["9755",0xBF98],
+  ["9756",0xBF99],
+  ["9757",0xBF9A],
+  ["9758",0xBF9B],
+  ["9759",0xBF9C],
+  ["975A",0xBF9D],
+  ["9761",0xBF9E],
+  ["9762",0xBF9F],
+  ["9763",0xBFA0],
+  ["9764",0xBFA1],
+  ["9765",0xBFA2],
+  ["9766",0xBFA3],
+  ["9767",0xBFA4],
+  ["9768",0xBFA5],
+  ["9769",0xBFA6],
+  ["976A",0xBFA7],
+  ["976B",0xBFA8],
+  ["976C",0xBFA9],
+  ["976D",0xBFAA],
+  ["976E",0xBFAB],
+  ["976F",0xBFAC],
+  ["9770",0xBFAD],
+  ["9771",0xBFAE],
+  ["9772",0xBFAF],
+  ["9773",0xBFB1],
+  ["9774",0xBFB2],
+  ["9775",0xBFB3],
+  ["9776",0xBFB4],
+  ["9777",0xBFB5],
+  ["9778",0xBFB6],
+  ["9779",0xBFB7],
+  ["977A",0xBFB8],
+  ["9781",0xBFB9],
+  ["9782",0xBFBA],
+  ["9783",0xBFBB],
+  ["9784",0xBFBC],
+  ["9785",0xBFBD],
+  ["9786",0xBFBE],
+  ["9787",0xBFBF],
+  ["9788",0xBFC0],
+  ["9789",0xBFC1],
+  ["978A",0xBFC2],
+  ["978B",0xBFC3],
+  ["978C",0xBFC4],
+  ["978D",0xBFC6],
+  ["978E",0xBFC7],
+  ["978F",0xBFC8],
+  ["9790",0xBFC9],
+  ["9791",0xBFCA],
+  ["9792",0xBFCB],
+  ["9793",0xBFCE],
+  ["9794",0xBFCF],
+  ["9795",0xBFD1],
+  ["9796",0xBFD2],
+  ["9797",0xBFD3],
+  ["9798",0xBFD5],
+  ["9799",0xBFD6],
+  ["979A",0xBFD7],
+  ["979B",0xBFD8],
+  ["979C",0xBFD9],
+  ["979D",0xBFDA],
+  ["979E",0xBFDB],
+  ["979F",0xBFDD],
+  ["97A0",0xBFDE],
+  ["97A1",0xBFE0],
+  ["97A2",0xBFE2],
+  ["97A3",0xBFE3],
+  ["97A4",0xBFE4],
+  ["97A5",0xBFE5],
+  ["97A6",0xBFE6],
+  ["97A7",0xBFE7],
+  ["97A8",0xBFE8],
+  ["97A9",0xBFE9],
+  ["97AA",0xBFEA],
+  ["97AB",0xBFEB],
+  ["97AC",0xBFEC],
+  ["97AD",0xBFED],
+  ["97AE",0xBFEE],
+  ["97AF",0xBFEF],
+  ["97B0",0xBFF0],
+  ["97B1",0xBFF1],
+  ["97B2",0xBFF2],
+  ["97B3",0xBFF3],
+  ["97B4",0xBFF4],
+  ["97B5",0xBFF5],
+  ["97B6",0xBFF6],
+  ["97B7",0xBFF7],
+  ["97B8",0xBFF8],
+  ["97B9",0xBFF9],
+  ["97BA",0xBFFA],
+  ["97BB",0xBFFB],
+  ["97BC",0xBFFC],
+  ["97BD",0xBFFD],
+  ["97BE",0xBFFE],
+  ["97BF",0xBFFF],
+  ["97C0",0xC000],
+  ["97C1",0xC001],
+  ["97C2",0xC002],
+  ["97C3",0xC003],
+  ["97C4",0xC004],
+  ["97C5",0xC005],
+  ["97C6",0xC006],
+  ["97C7",0xC007],
+  ["97C8",0xC008],
+  ["97C9",0xC009],
+  ["97CA",0xC00A],
+  ["97CB",0xC00B],
+  ["97CC",0xC00C],
+  ["97CD",0xC00D],
+  ["97CE",0xC00E],
+  ["97CF",0xC00F],
+  ["97D0",0xC010],
+  ["97D1",0xC011],
+  ["97D2",0xC012],
+  ["97D3",0xC013],
+  ["97D4",0xC014],
+  ["97D5",0xC015],
+  ["97D6",0xC016],
+  ["97D7",0xC017],
+  ["97D8",0xC018],
+  ["97D9",0xC019],
+  ["97DA",0xC01A],
+  ["97DB",0xC01B],
+  ["97DC",0xC01C],
+  ["97DD",0xC01D],
+  ["97DE",0xC01E],
+  ["97DF",0xC01F],
+  ["97E0",0xC020],
+  ["97E1",0xC021],
+  ["97E2",0xC022],
+  ["97E3",0xC023],
+  ["97E4",0xC024],
+  ["97E5",0xC025],
+  ["97E6",0xC026],
+  ["97E7",0xC027],
+  ["97E8",0xC028],
+  ["97E9",0xC029],
+  ["97EA",0xC02A],
+  ["97EB",0xC02B],
+  ["97EC",0xC02C],
+  ["97ED",0xC02D],
+  ["97EE",0xC02E],
+  ["97EF",0xC02F],
+  ["97F0",0xC030],
+  ["97F1",0xC031],
+  ["97F2",0xC032],
+  ["97F3",0xC033],
+  ["97F4",0xC034],
+  ["97F5",0xC035],
+  ["97F6",0xC036],
+  ["97F7",0xC037],
+  ["97F8",0xC038],
+  ["97F9",0xC039],
+  ["97FA",0xC03A],
+  ["97FB",0xC03B],
+  ["97FC",0xC03D],
+  ["97FD",0xC03E],
+  ["97FE",0xC03F],
+  ["9841",0xC040],
+  ["9842",0xC041],
+  ["9843",0xC042],
+  ["9844",0xC043],
+  ["9845",0xC044],
+  ["9846",0xC045],
+  ["9847",0xC046],
+  ["9848",0xC047],
+  ["9849",0xC048],
+  ["984A",0xC049],
+  ["984B",0xC04A],
+  ["984C",0xC04B],
+  ["984D",0xC04C],
+  ["984E",0xC04D],
+  ["984F",0xC04E],
+  ["9850",0xC04F],
+  ["9851",0xC050],
+  ["9852",0xC052],
+  ["9853",0xC053],
+  ["9854",0xC054],
+  ["9855",0xC055],
+  ["9856",0xC056],
+  ["9857",0xC057],
+  ["9858",0xC059],
+  ["9859",0xC05A],
+  ["985A",0xC05B],
+  ["9861",0xC05D],
+  ["9862",0xC05E],
+  ["9863",0xC05F],
+  ["9864",0xC061],
+  ["9865",0xC062],
+  ["9866",0xC063],
+  ["9867",0xC064],
+  ["9868",0xC065],
+  ["9869",0xC066],
+  ["986A",0xC067],
+  ["986B",0xC06A],
+  ["986C",0xC06B],
+  ["986D",0xC06C],
+  ["986E",0xC06D],
+  ["986F",0xC06E],
+  ["9870",0xC06F],
+  ["9871",0xC070],
+  ["9872",0xC071],
+  ["9873",0xC072],
+  ["9874",0xC073],
+  ["9875",0xC074],
+  ["9876",0xC075],
+  ["9877",0xC076],
+  ["9878",0xC077],
+  ["9879",0xC078],
+  ["987A",0xC079],
+  ["9881",0xC07A],
+  ["9882",0xC07B],
+  ["9883",0xC07C],
+  ["9884",0xC07D],
+  ["9885",0xC07E],
+  ["9886",0xC07F],
+  ["9887",0xC080],
+  ["9888",0xC081],
+  ["9889",0xC082],
+  ["988A",0xC083],
+  ["988B",0xC084],
+  ["988C",0xC085],
+  ["988D",0xC086],
+  ["988E",0xC087],
+  ["988F",0xC088],
+  ["9890",0xC089],
+  ["9891",0xC08A],
+  ["9892",0xC08B],
+  ["9893",0xC08C],
+  ["9894",0xC08D],
+  ["9895",0xC08E],
+  ["9896",0xC08F],
+  ["9897",0xC092],
+  ["9898",0xC093],
+  ["9899",0xC095],
+  ["989A",0xC096],
+  ["989B",0xC097],
+  ["989C",0xC099],
+  ["989D",0xC09A],
+  ["989E",0xC09B],
+  ["989F",0xC09C],
+  ["98A0",0xC09D],
+  ["98A1",0xC09E],
+  ["98A2",0xC09F],
+  ["98A3",0xC0A2],
+  ["98A4",0xC0A4],
+  ["98A5",0xC0A6],
+  ["98A6",0xC0A7],
+  ["98A7",0xC0A8],
+  ["98A8",0xC0A9],
+  ["98A9",0xC0AA],
+  ["98AA",0xC0AB],
+  ["98AB",0xC0AE],
+  ["98AC",0xC0B1],
+  ["98AD",0xC0B2],
+  ["98AE",0xC0B7],
+  ["98AF",0xC0B8],
+  ["98B0",0xC0B9],
+  ["98B1",0xC0BA],
+  ["98B2",0xC0BB],
+  ["98B3",0xC0BE],
+  ["98B4",0xC0C2],
+  ["98B5",0xC0C3],
+  ["98B6",0xC0C4],
+  ["98B7",0xC0C6],
+  ["98B8",0xC0C7],
+  ["98B9",0xC0CA],
+  ["98BA",0xC0CB],
+  ["98BB",0xC0CD],
+  ["98BC",0xC0CE],
+  ["98BD",0xC0CF],
+  ["98BE",0xC0D1],
+  ["98BF",0xC0D2],
+  ["98C0",0xC0D3],
+  ["98C1",0xC0D4],
+  ["98C2",0xC0D5],
+  ["98C3",0xC0D6],
+  ["98C4",0xC0D7],
+  ["98C5",0xC0DA],
+  ["98C6",0xC0DE],
+  ["98C7",0xC0DF],
+  ["98C8",0xC0E0],
+  ["98C9",0xC0E1],
+  ["98CA",0xC0E2],
+  ["98CB",0xC0E3],
+  ["98CC",0xC0E6],
+  ["98CD",0xC0E7],
+  ["98CE",0xC0E9],
+  ["98CF",0xC0EA],
+  ["98D0",0xC0EB],
+  ["98D1",0xC0ED],
+  ["98D2",0xC0EE],
+  ["98D3",0xC0EF],
+  ["98D4",0xC0F0],
+  ["98D5",0xC0F1],
+  ["98D6",0xC0F2],
+  ["98D7",0xC0F3],
+  ["98D8",0xC0F6],
+  ["98D9",0xC0F8],
+  ["98DA",0xC0FA],
+  ["98DB",0xC0FB],
+  ["98DC",0xC0FC],
+  ["98DD",0xC0FD],
+  ["98DE",0xC0FE],
+  ["98DF",0xC0FF],
+  ["98E0",0xC101],
+  ["98E1",0xC102],
+  ["98E2",0xC103],
+  ["98E3",0xC105],
+  ["98E4",0xC106],
+  ["98E5",0xC107],
+  ["98E6",0xC109],
+  ["98E7",0xC10A],
+  ["98E8",0xC10B],
+  ["98E9",0xC10C],
+  ["98EA",0xC10D],
+  ["98EB",0xC10E],
+  ["98EC",0xC10F],
+  ["98ED",0xC111],
+  ["98EE",0xC112],
+  ["98EF",0xC113],
+  ["98F0",0xC114],
+  ["98F1",0xC116],
+  ["98F2",0xC117],
+  ["98F3",0xC118],
+  ["98F4",0xC119],
+  ["98F5",0xC11A],
+  ["98F6",0xC11B],
+  ["98F7",0xC121],
+  ["98F8",0xC122],
+  ["98F9",0xC125],
+  ["98FA",0xC128],
+  ["98FB",0xC129],
+  ["98FC",0xC12A],
+  ["98FD",0xC12B],
+  ["98FE",0xC12E],
+  ["9941",0xC132],
+  ["9942",0xC133],
+  ["9943",0xC134],
+  ["9944",0xC135],
+  ["9945",0xC137],
+  ["9946",0xC13A],
+  ["9947",0xC13B],
+  ["9948",0xC13D],
+  ["9949",0xC13E],
+  ["994A",0xC13F],
+  ["994B",0xC141],
+  ["994C",0xC142],
+  ["994D",0xC143],
+  ["994E",0xC144],
+  ["994F",0xC145],
+  ["9950",0xC146],
+  ["9951",0xC147],
+  ["9952",0xC14A],
+  ["9953",0xC14E],
+  ["9954",0xC14F],
+  ["9955",0xC150],
+  ["9956",0xC151],
+  ["9957",0xC152],
+  ["9958",0xC153],
+  ["9959",0xC156],
+  ["995A",0xC157],
+  ["9961",0xC159],
+  ["9962",0xC15A],
+  ["9963",0xC15B],
+  ["9964",0xC15D],
+  ["9965",0xC15E],
+  ["9966",0xC15F],
+  ["9967",0xC160],
+  ["9968",0xC161],
+  ["9969",0xC162],
+  ["996A",0xC163],
+  ["996B",0xC166],
+  ["996C",0xC16A],
+  ["996D",0xC16B],
+  ["996E",0xC16C],
+  ["996F",0xC16D],
+  ["9970",0xC16E],
+  ["9971",0xC16F],
+  ["9972",0xC171],
+  ["9973",0xC172],
+  ["9974",0xC173],
+  ["9975",0xC175],
+  ["9976",0xC176],
+  ["9977",0xC177],
+  ["9978",0xC179],
+  ["9979",0xC17A],
+  ["997A",0xC17B],
+  ["9981",0xC17C],
+  ["9982",0xC17D],
+  ["9983",0xC17E],
+  ["9984",0xC17F],
+  ["9985",0xC180],
+  ["9986",0xC181],
+  ["9987",0xC182],
+  ["9988",0xC183],
+  ["9989",0xC184],
+  ["998A",0xC186],
+  ["998B",0xC187],
+  ["998C",0xC188],
+  ["998D",0xC189],
+  ["998E",0xC18A],
+  ["998F",0xC18B],
+  ["9990",0xC18F],
+  ["9991",0xC191],
+  ["9992",0xC192],
+  ["9993",0xC193],
+  ["9994",0xC195],
+  ["9995",0xC197],
+  ["9996",0xC198],
+  ["9997",0xC199],
+  ["9998",0xC19A],
+  ["9999",0xC19B],
+  ["999A",0xC19E],
+  ["999B",0xC1A0],
+  ["999C",0xC1A2],
+  ["999D",0xC1A3],
+  ["999E",0xC1A4],
+  ["999F",0xC1A6],
+  ["99A0",0xC1A7],
+  ["99A1",0xC1AA],
+  ["99A2",0xC1AB],
+  ["99A3",0xC1AD],
+  ["99A4",0xC1AE],
+  ["99A5",0xC1AF],
+  ["99A6",0xC1B1],
+  ["99A7",0xC1B2],
+  ["99A8",0xC1B3],
+  ["99A9",0xC1B4],
+  ["99AA",0xC1B5],
+  ["99AB",0xC1B6],
+  ["99AC",0xC1B7],
+  ["99AD",0xC1B8],
+  ["99AE",0xC1B9],
+  ["99AF",0xC1BA],
+  ["99B0",0xC1BB],
+  ["99B1",0xC1BC],
+  ["99B2",0xC1BE],
+  ["99B3",0xC1BF],
+  ["99B4",0xC1C0],
+  ["99B5",0xC1C1],
+  ["99B6",0xC1C2],
+  ["99B7",0xC1C3],
+  ["99B8",0xC1C5],
+  ["99B9",0xC1C6],
+  ["99BA",0xC1C7],
+  ["99BB",0xC1C9],
+  ["99BC",0xC1CA],
+  ["99BD",0xC1CB],
+  ["99BE",0xC1CD],
+  ["99BF",0xC1CE],
+  ["99C0",0xC1CF],
+  ["99C1",0xC1D0],
+  ["99C2",0xC1D1],
+  ["99C3",0xC1D2],
+  ["99C4",0xC1D3],
+  ["99C5",0xC1D5],
+  ["99C6",0xC1D6],
+  ["99C7",0xC1D9],
+  ["99C8",0xC1DA],
+  ["99C9",0xC1DB],
+  ["99CA",0xC1DC],
+  ["99CB",0xC1DD],
+  ["99CC",0xC1DE],
+  ["99CD",0xC1DF],
+  ["99CE",0xC1E1],
+  ["99CF",0xC1E2],
+  ["99D0",0xC1E3],
+  ["99D1",0xC1E5],
+  ["99D2",0xC1E6],
+  ["99D3",0xC1E7],
+  ["99D4",0xC1E9],
+  ["99D5",0xC1EA],
+  ["99D6",0xC1EB],
+  ["99D7",0xC1EC],
+  ["99D8",0xC1ED],
+  ["99D9",0xC1EE],
+  ["99DA",0xC1EF],
+  ["99DB",0xC1F2],
+  ["99DC",0xC1F4],
+  ["99DD",0xC1F5],
+  ["99DE",0xC1F6],
+  ["99DF",0xC1F7],
+  ["99E0",0xC1F8],
+  ["99E1",0xC1F9],
+  ["99E2",0xC1FA],
+  ["99E3",0xC1FB],
+  ["99E4",0xC1FE],
+  ["99E5",0xC1FF],
+  ["99E6",0xC201],
+  ["99E7",0xC202],
+  ["99E8",0xC203],
+  ["99E9",0xC205],
+  ["99EA",0xC206],
+  ["99EB",0xC207],
+  ["99EC",0xC208],
+  ["99ED",0xC209],
+  ["99EE",0xC20A],
+  ["99EF",0xC20B],
+  ["99F0",0xC20E],
+  ["99F1",0xC210],
+  ["99F2",0xC212],
+  ["99F3",0xC213],
+  ["99F4",0xC214],
+  ["99F5",0xC215],
+  ["99F6",0xC216],
+  ["99F7",0xC217],
+  ["99F8",0xC21A],
+  ["99F9",0xC21B],
+  ["99FA",0xC21D],
+  ["99FB",0xC21E],
+  ["99FC",0xC221],
+  ["99FD",0xC222],
+  ["99FE",0xC223],
+  ["9A41",0xC224],
+  ["9A42",0xC225],
+  ["9A43",0xC226],
+  ["9A44",0xC227],
+  ["9A45",0xC22A],
+  ["9A46",0xC22C],
+  ["9A47",0xC22E],
+  ["9A48",0xC230],
+  ["9A49",0xC233],
+  ["9A4A",0xC235],
+  ["9A4B",0xC236],
+  ["9A4C",0xC237],
+  ["9A4D",0xC238],
+  ["9A4E",0xC239],
+  ["9A4F",0xC23A],
+  ["9A50",0xC23B],
+  ["9A51",0xC23C],
+  ["9A52",0xC23D],
+  ["9A53",0xC23E],
+  ["9A54",0xC23F],
+  ["9A55",0xC240],
+  ["9A56",0xC241],
+  ["9A57",0xC242],
+  ["9A58",0xC243],
+  ["9A59",0xC244],
+  ["9A5A",0xC245],
+  ["9A61",0xC246],
+  ["9A62",0xC247],
+  ["9A63",0xC249],
+  ["9A64",0xC24A],
+  ["9A65",0xC24B],
+  ["9A66",0xC24C],
+  ["9A67",0xC24D],
+  ["9A68",0xC24E],
+  ["9A69",0xC24F],
+  ["9A6A",0xC252],
+  ["9A6B",0xC253],
+  ["9A6C",0xC255],
+  ["9A6D",0xC256],
+  ["9A6E",0xC257],
+  ["9A6F",0xC259],
+  ["9A70",0xC25A],
+  ["9A71",0xC25B],
+  ["9A72",0xC25C],
+  ["9A73",0xC25D],
+  ["9A74",0xC25E],
+  ["9A75",0xC25F],
+  ["9A76",0xC261],
+  ["9A77",0xC262],
+  ["9A78",0xC263],
+  ["9A79",0xC264],
+  ["9A7A",0xC266],
+  ["9A81",0xC267],
+  ["9A82",0xC268],
+  ["9A83",0xC269],
+  ["9A84",0xC26A],
+  ["9A85",0xC26B],
+  ["9A86",0xC26E],
+  ["9A87",0xC26F],
+  ["9A88",0xC271],
+  ["9A89",0xC272],
+  ["9A8A",0xC273],
+  ["9A8B",0xC275],
+  ["9A8C",0xC276],
+  ["9A8D",0xC277],
+  ["9A8E",0xC278],
+  ["9A8F",0xC279],
+  ["9A90",0xC27A],
+  ["9A91",0xC27B],
+  ["9A92",0xC27E],
+  ["9A93",0xC280],
+  ["9A94",0xC282],
+  ["9A95",0xC283],
+  ["9A96",0xC284],
+  ["9A97",0xC285],
+  ["9A98",0xC286],
+  ["9A99",0xC287],
+  ["9A9A",0xC28A],
+  ["9A9B",0xC28B],
+  ["9A9C",0xC28C],
+  ["9A9D",0xC28D],
+  ["9A9E",0xC28E],
+  ["9A9F",0xC28F],
+  ["9AA0",0xC291],
+  ["9AA1",0xC292],
+  ["9AA2",0xC293],
+  ["9AA3",0xC294],
+  ["9AA4",0xC295],
+  ["9AA5",0xC296],
+  ["9AA6",0xC297],
+  ["9AA7",0xC299],
+  ["9AA8",0xC29A],
+  ["9AA9",0xC29C],
+  ["9AAA",0xC29E],
+  ["9AAB",0xC29F],
+  ["9AAC",0xC2A0],
+  ["9AAD",0xC2A1],
+  ["9AAE",0xC2A2],
+  ["9AAF",0xC2A3],
+  ["9AB0",0xC2A6],
+  ["9AB1",0xC2A7],
+  ["9AB2",0xC2A9],
+  ["9AB3",0xC2AA],
+  ["9AB4",0xC2AB],
+  ["9AB5",0xC2AE],
+  ["9AB6",0xC2AF],
+  ["9AB7",0xC2B0],
+  ["9AB8",0xC2B1],
+  ["9AB9",0xC2B2],
+  ["9ABA",0xC2B3],
+  ["9ABB",0xC2B6],
+  ["9ABC",0xC2B8],
+  ["9ABD",0xC2BA],
+  ["9ABE",0xC2BB],
+  ["9ABF",0xC2BC],
+  ["9AC0",0xC2BD],
+  ["9AC1",0xC2BE],
+  ["9AC2",0xC2BF],
+  ["9AC3",0xC2C0],
+  ["9AC4",0xC2C1],
+  ["9AC5",0xC2C2],
+  ["9AC6",0xC2C3],
+  ["9AC7",0xC2C4],
+  ["9AC8",0xC2C5],
+  ["9AC9",0xC2C6],
+  ["9ACA",0xC2C7],
+  ["9ACB",0xC2C8],
+  ["9ACC",0xC2C9],
+  ["9ACD",0xC2CA],
+  ["9ACE",0xC2CB],
+  ["9ACF",0xC2CC],
+  ["9AD0",0xC2CD],
+  ["9AD1",0xC2CE],
+  ["9AD2",0xC2CF],
+  ["9AD3",0xC2D0],
+  ["9AD4",0xC2D1],
+  ["9AD5",0xC2D2],
+  ["9AD6",0xC2D3],
+  ["9AD7",0xC2D4],
+  ["9AD8",0xC2D5],
+  ["9AD9",0xC2D6],
+  ["9ADA",0xC2D7],
+  ["9ADB",0xC2D8],
+  ["9ADC",0xC2D9],
+  ["9ADD",0xC2DA],
+  ["9ADE",0xC2DB],
+  ["9ADF",0xC2DE],
+  ["9AE0",0xC2DF],
+  ["9AE1",0xC2E1],
+  ["9AE2",0xC2E2],
+  ["9AE3",0xC2E5],
+  ["9AE4",0xC2E6],
+  ["9AE5",0xC2E7],
+  ["9AE6",0xC2E8],
+  ["9AE7",0xC2E9],
+  ["9AE8",0xC2EA],
+  ["9AE9",0xC2EE],
+  ["9AEA",0xC2F0],
+  ["9AEB",0xC2F2],
+  ["9AEC",0xC2F3],
+  ["9AED",0xC2F4],
+  ["9AEE",0xC2F5],
+  ["9AEF",0xC2F7],
+  ["9AF0",0xC2FA],
+  ["9AF1",0xC2FD],
+  ["9AF2",0xC2FE],
+  ["9AF3",0xC2FF],
+  ["9AF4",0xC301],
+  ["9AF5",0xC302],
+  ["9AF6",0xC303],
+  ["9AF7",0xC304],
+  ["9AF8",0xC305],
+  ["9AF9",0xC306],
+  ["9AFA",0xC307],
+  ["9AFB",0xC30A],
+  ["9AFC",0xC30B],
+  ["9AFD",0xC30E],
+  ["9AFE",0xC30F],
+  ["9B41",0xC310],
+  ["9B42",0xC311],
+  ["9B43",0xC312],
+  ["9B44",0xC316],
+  ["9B45",0xC317],
+  ["9B46",0xC319],
+  ["9B47",0xC31A],
+  ["9B48",0xC31B],
+  ["9B49",0xC31D],
+  ["9B4A",0xC31E],
+  ["9B4B",0xC31F],
+  ["9B4C",0xC320],
+  ["9B4D",0xC321],
+  ["9B4E",0xC322],
+  ["9B4F",0xC323],
+  ["9B50",0xC326],
+  ["9B51",0xC327],
+  ["9B52",0xC32A],
+  ["9B53",0xC32B],
+  ["9B54",0xC32C],
+  ["9B55",0xC32D],
+  ["9B56",0xC32E],
+  ["9B57",0xC32F],
+  ["9B58",0xC330],
+  ["9B59",0xC331],
+  ["9B5A",0xC332],
+  ["9B61",0xC333],
+  ["9B62",0xC334],
+  ["9B63",0xC335],
+  ["9B64",0xC336],
+  ["9B65",0xC337],
+  ["9B66",0xC338],
+  ["9B67",0xC339],
+  ["9B68",0xC33A],
+  ["9B69",0xC33B],
+  ["9B6A",0xC33C],
+  ["9B6B",0xC33D],
+  ["9B6C",0xC33E],
+  ["9B6D",0xC33F],
+  ["9B6E",0xC340],
+  ["9B6F",0xC341],
+  ["9B70",0xC342],
+  ["9B71",0xC343],
+  ["9B72",0xC344],
+  ["9B73",0xC346],
+  ["9B74",0xC347],
+  ["9B75",0xC348],
+  ["9B76",0xC349],
+  ["9B77",0xC34A],
+  ["9B78",0xC34B],
+  ["9B79",0xC34C],
+  ["9B7A",0xC34D],
+  ["9B81",0xC34E],
+  ["9B82",0xC34F],
+  ["9B83",0xC350],
+  ["9B84",0xC351],
+  ["9B85",0xC352],
+  ["9B86",0xC353],
+  ["9B87",0xC354],
+  ["9B88",0xC355],
+  ["9B89",0xC356],
+  ["9B8A",0xC357],
+  ["9B8B",0xC358],
+  ["9B8C",0xC359],
+  ["9B8D",0xC35A],
+  ["9B8E",0xC35B],
+  ["9B8F",0xC35C],
+  ["9B90",0xC35D],
+  ["9B91",0xC35E],
+  ["9B92",0xC35F],
+  ["9B93",0xC360],
+  ["9B94",0xC361],
+  ["9B95",0xC362],
+  ["9B96",0xC363],
+  ["9B97",0xC364],
+  ["9B98",0xC365],
+  ["9B99",0xC366],
+  ["9B9A",0xC367],
+  ["9B9B",0xC36A],
+  ["9B9C",0xC36B],
+  ["9B9D",0xC36D],
+  ["9B9E",0xC36E],
+  ["9B9F",0xC36F],
+  ["9BA0",0xC371],
+  ["9BA1",0xC373],
+  ["9BA2",0xC374],
+  ["9BA3",0xC375],
+  ["9BA4",0xC376],
+  ["9BA5",0xC377],
+  ["9BA6",0xC37A],
+  ["9BA7",0xC37B],
+  ["9BA8",0xC37E],
+  ["9BA9",0xC37F],
+  ["9BAA",0xC380],
+  ["9BAB",0xC381],
+  ["9BAC",0xC382],
+  ["9BAD",0xC383],
+  ["9BAE",0xC385],
+  ["9BAF",0xC386],
+  ["9BB0",0xC387],
+  ["9BB1",0xC389],
+  ["9BB2",0xC38A],
+  ["9BB3",0xC38B],
+  ["9BB4",0xC38D],
+  ["9BB5",0xC38E],
+  ["9BB6",0xC38F],
+  ["9BB7",0xC390],
+  ["9BB8",0xC391],
+  ["9BB9",0xC392],
+  ["9BBA",0xC393],
+  ["9BBB",0xC394],
+  ["9BBC",0xC395],
+  ["9BBD",0xC396],
+  ["9BBE",0xC397],
+  ["9BBF",0xC398],
+  ["9BC0",0xC399],
+  ["9BC1",0xC39A],
+  ["9BC2",0xC39B],
+  ["9BC3",0xC39C],
+  ["9BC4",0xC39D],
+  ["9BC5",0xC39E],
+  ["9BC6",0xC39F],
+  ["9BC7",0xC3A0],
+  ["9BC8",0xC3A1],
+  ["9BC9",0xC3A2],
+  ["9BCA",0xC3A3],
+  ["9BCB",0xC3A4],
+  ["9BCC",0xC3A5],
+  ["9BCD",0xC3A6],
+  ["9BCE",0xC3A7],
+  ["9BCF",0xC3A8],
+  ["9BD0",0xC3A9],
+  ["9BD1",0xC3AA],
+  ["9BD2",0xC3AB],
+  ["9BD3",0xC3AC],
+  ["9BD4",0xC3AD],
+  ["9BD5",0xC3AE],
+  ["9BD6",0xC3AF],
+  ["9BD7",0xC3B0],
+  ["9BD8",0xC3B1],
+  ["9BD9",0xC3B2],
+  ["9BDA",0xC3B3],
+  ["9BDB",0xC3B4],
+  ["9BDC",0xC3B5],
+  ["9BDD",0xC3B6],
+  ["9BDE",0xC3B7],
+  ["9BDF",0xC3B8],
+  ["9BE0",0xC3B9],
+  ["9BE1",0xC3BA],
+  ["9BE2",0xC3BB],
+  ["9BE3",0xC3BC],
+  ["9BE4",0xC3BD],
+  ["9BE5",0xC3BE],
+  ["9BE6",0xC3BF],
+  ["9BE7",0xC3C1],
+  ["9BE8",0xC3C2],
+  ["9BE9",0xC3C3],
+  ["9BEA",0xC3C4],
+  ["9BEB",0xC3C5],
+  ["9BEC",0xC3C6],
+  ["9BED",0xC3C7],
+  ["9BEE",0xC3C8],
+  ["9BEF",0xC3C9],
+  ["9BF0",0xC3CA],
+  ["9BF1",0xC3CB],
+  ["9BF2",0xC3CC],
+  ["9BF3",0xC3CD],
+  ["9BF4",0xC3CE],
+  ["9BF5",0xC3CF],
+  ["9BF6",0xC3D0],
+  ["9BF7",0xC3D1],
+  ["9BF8",0xC3D2],
+  ["9BF9",0xC3D3],
+  ["9BFA",0xC3D4],
+  ["9BFB",0xC3D5],
+  ["9BFC",0xC3D6],
+  ["9BFD",0xC3D7],
+  ["9BFE",0xC3DA],
+  ["9C41",0xC3DB],
+  ["9C42",0xC3DD],
+  ["9C43",0xC3DE],
+  ["9C44",0xC3E1],
+  ["9C45",0xC3E3],
+  ["9C46",0xC3E4],
+  ["9C47",0xC3E5],
+  ["9C48",0xC3E6],
+  ["9C49",0xC3E7],
+  ["9C4A",0xC3EA],
+  ["9C4B",0xC3EB],
+  ["9C4C",0xC3EC],
+  ["9C4D",0xC3EE],
+  ["9C4E",0xC3EF],
+  ["9C4F",0xC3F0],
+  ["9C50",0xC3F1],
+  ["9C51",0xC3F2],
+  ["9C52",0xC3F3],
+  ["9C53",0xC3F6],
+  ["9C54",0xC3F7],
+  ["9C55",0xC3F9],
+  ["9C56",0xC3FA],
+  ["9C57",0xC3FB],
+  ["9C58",0xC3FC],
+  ["9C59",0xC3FD],
+  ["9C5A",0xC3FE],
+  ["9C61",0xC3FF],
+  ["9C62",0xC400],
+  ["9C63",0xC401],
+  ["9C64",0xC402],
+  ["9C65",0xC403],
+  ["9C66",0xC404],
+  ["9C67",0xC405],
+  ["9C68",0xC406],
+  ["9C69",0xC407],
+  ["9C6A",0xC409],
+  ["9C6B",0xC40A],
+  ["9C6C",0xC40B],
+  ["9C6D",0xC40C],
+  ["9C6E",0xC40D],
+  ["9C6F",0xC40E],
+  ["9C70",0xC40F],
+  ["9C71",0xC411],
+  ["9C72",0xC412],
+  ["9C73",0xC413],
+  ["9C74",0xC414],
+  ["9C75",0xC415],
+  ["9C76",0xC416],
+  ["9C77",0xC417],
+  ["9C78",0xC418],
+  ["9C79",0xC419],
+  ["9C7A",0xC41A],
+  ["9C81",0xC41B],
+  ["9C82",0xC41C],
+  ["9C83",0xC41D],
+  ["9C84",0xC41E],
+  ["9C85",0xC41F],
+  ["9C86",0xC420],
+  ["9C87",0xC421],
+  ["9C88",0xC422],
+  ["9C89",0xC423],
+  ["9C8A",0xC425],
+  ["9C8B",0xC426],
+  ["9C8C",0xC427],
+  ["9C8D",0xC428],
+  ["9C8E",0xC429],
+  ["9C8F",0xC42A],
+  ["9C90",0xC42B],
+  ["9C91",0xC42D],
+  ["9C92",0xC42E],
+  ["9C93",0xC42F],
+  ["9C94",0xC431],
+  ["9C95",0xC432],
+  ["9C96",0xC433],
+  ["9C97",0xC435],
+  ["9C98",0xC436],
+  ["9C99",0xC437],
+  ["9C9A",0xC438],
+  ["9C9B",0xC439],
+  ["9C9C",0xC43A],
+  ["9C9D",0xC43B],
+  ["9C9E",0xC43E],
+  ["9C9F",0xC43F],
+  ["9CA0",0xC440],
+  ["9CA1",0xC441],
+  ["9CA2",0xC442],
+  ["9CA3",0xC443],
+  ["9CA4",0xC444],
+  ["9CA5",0xC445],
+  ["9CA6",0xC446],
+  ["9CA7",0xC447],
+  ["9CA8",0xC449],
+  ["9CA9",0xC44A],
+  ["9CAA",0xC44B],
+  ["9CAB",0xC44C],
+  ["9CAC",0xC44D],
+  ["9CAD",0xC44E],
+  ["9CAE",0xC44F],
+  ["9CAF",0xC450],
+  ["9CB0",0xC451],
+  ["9CB1",0xC452],
+  ["9CB2",0xC453],
+  ["9CB3",0xC454],
+  ["9CB4",0xC455],
+  ["9CB5",0xC456],
+  ["9CB6",0xC457],
+  ["9CB7",0xC458],
+  ["9CB8",0xC459],
+  ["9CB9",0xC45A],
+  ["9CBA",0xC45B],
+  ["9CBB",0xC45C],
+  ["9CBC",0xC45D],
+  ["9CBD",0xC45E],
+  ["9CBE",0xC45F],
+  ["9CBF",0xC460],
+  ["9CC0",0xC461],
+  ["9CC1",0xC462],
+  ["9CC2",0xC463],
+  ["9CC3",0xC466],
+  ["9CC4",0xC467],
+  ["9CC5",0xC469],
+  ["9CC6",0xC46A],
+  ["9CC7",0xC46B],
+  ["9CC8",0xC46D],
+  ["9CC9",0xC46E],
+  ["9CCA",0xC46F],
+  ["9CCB",0xC470],
+  ["9CCC",0xC471],
+  ["9CCD",0xC472],
+  ["9CCE",0xC473],
+  ["9CCF",0xC476],
+  ["9CD0",0xC477],
+  ["9CD1",0xC478],
+  ["9CD2",0xC47A],
+  ["9CD3",0xC47B],
+  ["9CD4",0xC47C],
+  ["9CD5",0xC47D],
+  ["9CD6",0xC47E],
+  ["9CD7",0xC47F],
+  ["9CD8",0xC481],
+  ["9CD9",0xC482],
+  ["9CDA",0xC483],
+  ["9CDB",0xC484],
+  ["9CDC",0xC485],
+  ["9CDD",0xC486],
+  ["9CDE",0xC487],
+  ["9CDF",0xC488],
+  ["9CE0",0xC489],
+  ["9CE1",0xC48A],
+  ["9CE2",0xC48B],
+  ["9CE3",0xC48C],
+  ["9CE4",0xC48D],
+  ["9CE5",0xC48E],
+  ["9CE6",0xC48F],
+  ["9CE7",0xC490],
+  ["9CE8",0xC491],
+  ["9CE9",0xC492],
+  ["9CEA",0xC493],
+  ["9CEB",0xC495],
+  ["9CEC",0xC496],
+  ["9CED",0xC497],
+  ["9CEE",0xC498],
+  ["9CEF",0xC499],
+  ["9CF0",0xC49A],
+  ["9CF1",0xC49B],
+  ["9CF2",0xC49D],
+  ["9CF3",0xC49E],
+  ["9CF4",0xC49F],
+  ["9CF5",0xC4A0],
+  ["9CF6",0xC4A1],
+  ["9CF7",0xC4A2],
+  ["9CF8",0xC4A3],
+  ["9CF9",0xC4A4],
+  ["9CFA",0xC4A5],
+  ["9CFB",0xC4A6],
+  ["9CFC",0xC4A7],
+  ["9CFD",0xC4A8],
+  ["9CFE",0xC4A9],
+  ["9D41",0xC4AA],
+  ["9D42",0xC4AB],
+  ["9D43",0xC4AC],
+  ["9D44",0xC4AD],
+  ["9D45",0xC4AE],
+  ["9D46",0xC4AF],
+  ["9D47",0xC4B0],
+  ["9D48",0xC4B1],
+  ["9D49",0xC4B2],
+  ["9D4A",0xC4B3],
+  ["9D4B",0xC4B4],
+  ["9D4C",0xC4B5],
+  ["9D4D",0xC4B6],
+  ["9D4E",0xC4B7],
+  ["9D4F",0xC4B9],
+  ["9D50",0xC4BA],
+  ["9D51",0xC4BB],
+  ["9D52",0xC4BD],
+  ["9D53",0xC4BE],
+  ["9D54",0xC4BF],
+  ["9D55",0xC4C0],
+  ["9D56",0xC4C1],
+  ["9D57",0xC4C2],
+  ["9D58",0xC4C3],
+  ["9D59",0xC4C4],
+  ["9D5A",0xC4C5],
+  ["9D61",0xC4C6],
+  ["9D62",0xC4C7],
+  ["9D63",0xC4C8],
+  ["9D64",0xC4C9],
+  ["9D65",0xC4CA],
+  ["9D66",0xC4CB],
+  ["9D67",0xC4CC],
+  ["9D68",0xC4CD],
+  ["9D69",0xC4CE],
+  ["9D6A",0xC4CF],
+  ["9D6B",0xC4D0],
+  ["9D6C",0xC4D1],
+  ["9D6D",0xC4D2],
+  ["9D6E",0xC4D3],
+  ["9D6F",0xC4D4],
+  ["9D70",0xC4D5],
+  ["9D71",0xC4D6],
+  ["9D72",0xC4D7],
+  ["9D73",0xC4D8],
+  ["9D74",0xC4D9],
+  ["9D75",0xC4DA],
+  ["9D76",0xC4DB],
+  ["9D77",0xC4DC],
+  ["9D78",0xC4DD],
+  ["9D79",0xC4DE],
+  ["9D7A",0xC4DF],
+  ["9D81",0xC4E0],
+  ["9D82",0xC4E1],
+  ["9D83",0xC4E2],
+  ["9D84",0xC4E3],
+  ["9D85",0xC4E4],
+  ["9D86",0xC4E5],
+  ["9D87",0xC4E6],
+  ["9D88",0xC4E7],
+  ["9D89",0xC4E8],
+  ["9D8A",0xC4EA],
+  ["9D8B",0xC4EB],
+  ["9D8C",0xC4EC],
+  ["9D8D",0xC4ED],
+  ["9D8E",0xC4EE],
+  ["9D8F",0xC4EF],
+  ["9D90",0xC4F2],
+  ["9D91",0xC4F3],
+  ["9D92",0xC4F5],
+  ["9D93",0xC4F6],
+  ["9D94",0xC4F7],
+  ["9D95",0xC4F9],
+  ["9D96",0xC4FB],
+  ["9D97",0xC4FC],
+  ["9D98",0xC4FD],
+  ["9D99",0xC4FE],
+  ["9D9A",0xC502],
+  ["9D9B",0xC503],
+  ["9D9C",0xC504],
+  ["9D9D",0xC505],
+  ["9D9E",0xC506],
+  ["9D9F",0xC507],
+  ["9DA0",0xC508],
+  ["9DA1",0xC509],
+  ["9DA2",0xC50A],
+  ["9DA3",0xC50B],
+  ["9DA4",0xC50D],
+  ["9DA5",0xC50E],
+  ["9DA6",0xC50F],
+  ["9DA7",0xC511],
+  ["9DA8",0xC512],
+  ["9DA9",0xC513],
+  ["9DAA",0xC515],
+  ["9DAB",0xC516],
+  ["9DAC",0xC517],
+  ["9DAD",0xC518],
+  ["9DAE",0xC519],
+  ["9DAF",0xC51A],
+  ["9DB0",0xC51B],
+  ["9DB1",0xC51D],
+  ["9DB2",0xC51E],
+  ["9DB3",0xC51F],
+  ["9DB4",0xC520],
+  ["9DB5",0xC521],
+  ["9DB6",0xC522],
+  ["9DB7",0xC523],
+  ["9DB8",0xC524],
+  ["9DB9",0xC525],
+  ["9DBA",0xC526],
+  ["9DBB",0xC527],
+  ["9DBC",0xC52A],
+  ["9DBD",0xC52B],
+  ["9DBE",0xC52D],
+  ["9DBF",0xC52E],
+  ["9DC0",0xC52F],
+  ["9DC1",0xC531],
+  ["9DC2",0xC532],
+  ["9DC3",0xC533],
+  ["9DC4",0xC534],
+  ["9DC5",0xC535],
+  ["9DC6",0xC536],
+  ["9DC7",0xC537],
+  ["9DC8",0xC53A],
+  ["9DC9",0xC53C],
+  ["9DCA",0xC53E],
+  ["9DCB",0xC53F],
+  ["9DCC",0xC540],
+  ["9DCD",0xC541],
+  ["9DCE",0xC542],
+  ["9DCF",0xC543],
+  ["9DD0",0xC546],
+  ["9DD1",0xC547],
+  ["9DD2",0xC54B],
+  ["9DD3",0xC54F],
+  ["9DD4",0xC550],
+  ["9DD5",0xC551],
+  ["9DD6",0xC552],
+  ["9DD7",0xC556],
+  ["9DD8",0xC55A],
+  ["9DD9",0xC55B],
+  ["9DDA",0xC55C],
+  ["9DDB",0xC55F],
+  ["9DDC",0xC562],
+  ["9DDD",0xC563],
+  ["9DDE",0xC565],
+  ["9DDF",0xC566],
+  ["9DE0",0xC567],
+  ["9DE1",0xC569],
+  ["9DE2",0xC56A],
+  ["9DE3",0xC56B],
+  ["9DE4",0xC56C],
+  ["9DE5",0xC56D],
+  ["9DE6",0xC56E],
+  ["9DE7",0xC56F],
+  ["9DE8",0xC572],
+  ["9DE9",0xC576],
+  ["9DEA",0xC577],
+  ["9DEB",0xC578],
+  ["9DEC",0xC579],
+  ["9DED",0xC57A],
+  ["9DEE",0xC57B],
+  ["9DEF",0xC57E],
+  ["9DF0",0xC57F],
+  ["9DF1",0xC581],
+  ["9DF2",0xC582],
+  ["9DF3",0xC583],
+  ["9DF4",0xC585],
+  ["9DF5",0xC586],
+  ["9DF6",0xC588],
+  ["9DF7",0xC589],
+  ["9DF8",0xC58A],
+  ["9DF9",0xC58B],
+  ["9DFA",0xC58E],
+  ["9DFB",0xC590],
+  ["9DFC",0xC592],
+  ["9DFD",0xC593],
+  ["9DFE",0xC594],
+  ["9E41",0xC596],
+  ["9E42",0xC599],
+  ["9E43",0xC59A],
+  ["9E44",0xC59B],
+  ["9E45",0xC59D],
+  ["9E46",0xC59E],
+  ["9E47",0xC59F],
+  ["9E48",0xC5A1],
+  ["9E49",0xC5A2],
+  ["9E4A",0xC5A3],
+  ["9E4B",0xC5A4],
+  ["9E4C",0xC5A5],
+  ["9E4D",0xC5A6],
+  ["9E4E",0xC5A7],
+  ["9E4F",0xC5A8],
+  ["9E50",0xC5AA],
+  ["9E51",0xC5AB],
+  ["9E52",0xC5AC],
+  ["9E53",0xC5AD],
+  ["9E54",0xC5AE],
+  ["9E55",0xC5AF],
+  ["9E56",0xC5B0],
+  ["9E57",0xC5B1],
+  ["9E58",0xC5B2],
+  ["9E59",0xC5B3],
+  ["9E5A",0xC5B6],
+  ["9E61",0xC5B7],
+  ["9E62",0xC5BA],
+  ["9E63",0xC5BF],
+  ["9E64",0xC5C0],
+  ["9E65",0xC5C1],
+  ["9E66",0xC5C2],
+  ["9E67",0xC5C3],
+  ["9E68",0xC5CB],
+  ["9E69",0xC5CD],
+  ["9E6A",0xC5CF],
+  ["9E6B",0xC5D2],
+  ["9E6C",0xC5D3],
+  ["9E6D",0xC5D5],
+  ["9E6E",0xC5D6],
+  ["9E6F",0xC5D7],
+  ["9E70",0xC5D9],
+  ["9E71",0xC5DA],
+  ["9E72",0xC5DB],
+  ["9E73",0xC5DC],
+  ["9E74",0xC5DD],
+  ["9E75",0xC5DE],
+  ["9E76",0xC5DF],
+  ["9E77",0xC5E2],
+  ["9E78",0xC5E4],
+  ["9E79",0xC5E6],
+  ["9E7A",0xC5E7],
+  ["9E81",0xC5E8],
+  ["9E82",0xC5E9],
+  ["9E83",0xC5EA],
+  ["9E84",0xC5EB],
+  ["9E85",0xC5EF],
+  ["9E86",0xC5F1],
+  ["9E87",0xC5F2],
+  ["9E88",0xC5F3],
+  ["9E89",0xC5F5],
+  ["9E8A",0xC5F8],
+  ["9E8B",0xC5F9],
+  ["9E8C",0xC5FA],
+  ["9E8D",0xC5FB],
+  ["9E8E",0xC602],
+  ["9E8F",0xC603],
+  ["9E90",0xC604],
+  ["9E91",0xC609],
+  ["9E92",0xC60A],
+  ["9E93",0xC60B],
+  ["9E94",0xC60D],
+  ["9E95",0xC60E],
+  ["9E96",0xC60F],
+  ["9E97",0xC611],
+  ["9E98",0xC612],
+  ["9E99",0xC613],
+  ["9E9A",0xC614],
+  ["9E9B",0xC615],
+  ["9E9C",0xC616],
+  ["9E9D",0xC617],
+  ["9E9E",0xC61A],
+  ["9E9F",0xC61D],
+  ["9EA0",0xC61E],
+  ["9EA1",0xC61F],
+  ["9EA2",0xC620],
+  ["9EA3",0xC621],
+  ["9EA4",0xC622],
+  ["9EA5",0xC623],
+  ["9EA6",0xC626],
+  ["9EA7",0xC627],
+  ["9EA8",0xC629],
+  ["9EA9",0xC62A],
+  ["9EAA",0xC62B],
+  ["9EAB",0xC62F],
+  ["9EAC",0xC631],
+  ["9EAD",0xC632],
+  ["9EAE",0xC636],
+  ["9EAF",0xC638],
+  ["9EB0",0xC63A],
+  ["9EB1",0xC63C],
+  ["9EB2",0xC63D],
+  ["9EB3",0xC63E],
+  ["9EB4",0xC63F],
+  ["9EB5",0xC642],
+  ["9EB6",0xC643],
+  ["9EB7",0xC645],
+  ["9EB8",0xC646],
+  ["9EB9",0xC647],
+  ["9EBA",0xC649],
+  ["9EBB",0xC64A],
+  ["9EBC",0xC64B],
+  ["9EBD",0xC64C],
+  ["9EBE",0xC64D],
+  ["9EBF",0xC64E],
+  ["9EC0",0xC64F],
+  ["9EC1",0xC652],
+  ["9EC2",0xC656],
+  ["9EC3",0xC657],
+  ["9EC4",0xC658],
+  ["9EC5",0xC659],
+  ["9EC6",0xC65A],
+  ["9EC7",0xC65B],
+  ["9EC8",0xC65E],
+  ["9EC9",0xC65F],
+  ["9ECA",0xC661],
+  ["9ECB",0xC662],
+  ["9ECC",0xC663],
+  ["9ECD",0xC664],
+  ["9ECE",0xC665],
+  ["9ECF",0xC666],
+  ["9ED0",0xC667],
+  ["9ED1",0xC668],
+  ["9ED2",0xC669],
+  ["9ED3",0xC66A],
+  ["9ED4",0xC66B],
+  ["9ED5",0xC66D],
+  ["9ED6",0xC66E],
+  ["9ED7",0xC670],
+  ["9ED8",0xC672],
+  ["9ED9",0xC673],
+  ["9EDA",0xC674],
+  ["9EDB",0xC675],
+  ["9EDC",0xC676],
+  ["9EDD",0xC677],
+  ["9EDE",0xC67A],
+  ["9EDF",0xC67B],
+  ["9EE0",0xC67D],
+  ["9EE1",0xC67E],
+  ["9EE2",0xC67F],
+  ["9EE3",0xC681],
+  ["9EE4",0xC682],
+  ["9EE5",0xC683],
+  ["9EE6",0xC684],
+  ["9EE7",0xC685],
+  ["9EE8",0xC686],
+  ["9EE9",0xC687],
+  ["9EEA",0xC68A],
+  ["9EEB",0xC68C],
+  ["9EEC",0xC68E],
+  ["9EED",0xC68F],
+  ["9EEE",0xC690],
+  ["9EEF",0xC691],
+  ["9EF0",0xC692],
+  ["9EF1",0xC693],
+  ["9EF2",0xC696],
+  ["9EF3",0xC697],
+  ["9EF4",0xC699],
+  ["9EF5",0xC69A],
+  ["9EF6",0xC69B],
+  ["9EF7",0xC69D],
+  ["9EF8",0xC69E],
+  ["9EF9",0xC69F],
+  ["9EFA",0xC6A0],
+  ["9EFB",0xC6A1],
+  ["9EFC",0xC6A2],
+  ["9EFD",0xC6A3],
+  ["9EFE",0xC6A6],
+  ["9F41",0xC6A8],
+  ["9F42",0xC6AA],
+  ["9F43",0xC6AB],
+  ["9F44",0xC6AC],
+  ["9F45",0xC6AD],
+  ["9F46",0xC6AE],
+  ["9F47",0xC6AF],
+  ["9F48",0xC6B2],
+  ["9F49",0xC6B3],
+  ["9F4A",0xC6B5],
+  ["9F4B",0xC6B6],
+  ["9F4C",0xC6B7],
+  ["9F4D",0xC6BB],
+  ["9F4E",0xC6BC],
+  ["9F4F",0xC6BD],
+  ["9F50",0xC6BE],
+  ["9F51",0xC6BF],
+  ["9F52",0xC6C2],
+  ["9F53",0xC6C4],
+  ["9F54",0xC6C6],
+  ["9F55",0xC6C7],
+  ["9F56",0xC6C8],
+  ["9F57",0xC6C9],
+  ["9F58",0xC6CA],
+  ["9F59",0xC6CB],
+  ["9F5A",0xC6CE],
+  ["9F61",0xC6CF],
+  ["9F62",0xC6D1],
+  ["9F63",0xC6D2],
+  ["9F64",0xC6D3],
+  ["9F65",0xC6D5],
+  ["9F66",0xC6D6],
+  ["9F67",0xC6D7],
+  ["9F68",0xC6D8],
+  ["9F69",0xC6D9],
+  ["9F6A",0xC6DA],
+  ["9F6B",0xC6DB],
+  ["9F6C",0xC6DE],
+  ["9F6D",0xC6DF],
+  ["9F6E",0xC6E2],
+  ["9F6F",0xC6E3],
+  ["9F70",0xC6E4],
+  ["9F71",0xC6E5],
+  ["9F72",0xC6E6],
+  ["9F73",0xC6E7],
+  ["9F74",0xC6EA],
+  ["9F75",0xC6EB],
+  ["9F76",0xC6ED],
+  ["9F77",0xC6EE],
+  ["9F78",0xC6EF],
+  ["9F79",0xC6F1],
+  ["9F7A",0xC6F2],
+  ["9F81",0xC6F3],
+  ["9F82",0xC6F4],
+  ["9F83",0xC6F5],
+  ["9F84",0xC6F6],
+  ["9F85",0xC6F7],
+  ["9F86",0xC6FA],
+  ["9F87",0xC6FB],
+  ["9F88",0xC6FC],
+  ["9F89",0xC6FE],
+  ["9F8A",0xC6FF],
+  ["9F8B",0xC700],
+  ["9F8C",0xC701],
+  ["9F8D",0xC702],
+  ["9F8E",0xC703],
+  ["9F8F",0xC706],
+  ["9F90",0xC707],
+  ["9F91",0xC709],
+  ["9F92",0xC70A],
+  ["9F93",0xC70B],
+  ["9F94",0xC70D],
+  ["9F95",0xC70E],
+  ["9F96",0xC70F],
+  ["9F97",0xC710],
+  ["9F98",0xC711],
+  ["9F99",0xC712],
+  ["9F9A",0xC713],
+  ["9F9B",0xC716],
+  ["9F9C",0xC718],
+  ["9F9D",0xC71A],
+  ["9F9E",0xC71B],
+  ["9F9F",0xC71C],
+  ["9FA0",0xC71D],
+  ["9FA1",0xC71E],
+  ["9FA2",0xC71F],
+  ["9FA3",0xC722],
+  ["9FA4",0xC723],
+  ["9FA5",0xC725],
+  ["9FA6",0xC726],
+  ["9FA7",0xC727],
+  ["9FA8",0xC729],
+  ["9FA9",0xC72A],
+  ["9FAA",0xC72B],
+  ["9FAB",0xC72C],
+  ["9FAC",0xC72D],
+  ["9FAD",0xC72E],
+  ["9FAE",0xC72F],
+  ["9FAF",0xC732],
+  ["9FB0",0xC734],
+  ["9FB1",0xC736],
+  ["9FB2",0xC738],
+  ["9FB3",0xC739],
+  ["9FB4",0xC73A],
+  ["9FB5",0xC73B],
+  ["9FB6",0xC73E],
+  ["9FB7",0xC73F],
+  ["9FB8",0xC741],
+  ["9FB9",0xC742],
+  ["9FBA",0xC743],
+  ["9FBB",0xC745],
+  ["9FBC",0xC746],
+  ["9FBD",0xC747],
+  ["9FBE",0xC748],
+  ["9FBF",0xC749],
+  ["9FC0",0xC74B],
+  ["9FC1",0xC74E],
+  ["9FC2",0xC750],
+  ["9FC3",0xC759],
+  ["9FC4",0xC75A],
+  ["9FC5",0xC75B],
+  ["9FC6",0xC75D],
+  ["9FC7",0xC75E],
+  ["9FC8",0xC75F],
+  ["9FC9",0xC761],
+  ["9FCA",0xC762],
+  ["9FCB",0xC763],
+  ["9FCC",0xC764],
+  ["9FCD",0xC765],
+  ["9FCE",0xC766],
+  ["9FCF",0xC767],
+  ["9FD0",0xC769],
+  ["9FD1",0xC76A],
+  ["9FD2",0xC76C],
+  ["9FD3",0xC76D],
+  ["9FD4",0xC76E],
+  ["9FD5",0xC76F],
+  ["9FD6",0xC770],
+  ["9FD7",0xC771],
+  ["9FD8",0xC772],
+  ["9FD9",0xC773],
+  ["9FDA",0xC776],
+  ["9FDB",0xC777],
+  ["9FDC",0xC779],
+  ["9FDD",0xC77A],
+  ["9FDE",0xC77B],
+  ["9FDF",0xC77F],
+  ["9FE0",0xC780],
+  ["9FE1",0xC781],
+  ["9FE2",0xC782],
+  ["9FE3",0xC786],
+  ["9FE4",0xC78B],
+  ["9FE5",0xC78C],
+  ["9FE6",0xC78D],
+  ["9FE7",0xC78F],
+  ["9FE8",0xC792],
+  ["9FE9",0xC793],
+  ["9FEA",0xC795],
+  ["9FEB",0xC799],
+  ["9FEC",0xC79B],
+  ["9FED",0xC79C],
+  ["9FEE",0xC79D],
+  ["9FEF",0xC79E],
+  ["9FF0",0xC79F],
+  ["9FF1",0xC7A2],
+  ["9FF2",0xC7A7],
+  ["9FF3",0xC7A8],
+  ["9FF4",0xC7A9],
+  ["9FF5",0xC7AA],
+  ["9FF6",0xC7AB],
+  ["9FF7",0xC7AE],
+  ["9FF8",0xC7AF],
+  ["9FF9",0xC7B1],
+  ["9FFA",0xC7B2],
+  ["9FFB",0xC7B3],
+  ["9FFC",0xC7B5],
+  ["9FFD",0xC7B6],
+  ["9FFE",0xC7B7],
+  ["A041",0xC7B8],
+  ["A042",0xC7B9],
+  ["A043",0xC7BA],
+  ["A044",0xC7BB],
+  ["A045",0xC7BE],
+  ["A046",0xC7C2],
+  ["A047",0xC7C3],
+  ["A048",0xC7C4],
+  ["A049",0xC7C5],
+  ["A04A",0xC7C6],
+  ["A04B",0xC7C7],
+  ["A04C",0xC7CA],
+  ["A04D",0xC7CB],
+  ["A04E",0xC7CD],
+  ["A04F",0xC7CF],
+  ["A050",0xC7D1],
+  ["A051",0xC7D2],
+  ["A052",0xC7D3],
+  ["A053",0xC7D4],
+  ["A054",0xC7D5],
+  ["A055",0xC7D6],
+  ["A056",0xC7D7],
+  ["A057",0xC7D9],
+  ["A058",0xC7DA],
+  ["A059",0xC7DB],
+  ["A05A",0xC7DC],
+  ["A061",0xC7DE],
+  ["A062",0xC7DF],
+  ["A063",0xC7E0],
+  ["A064",0xC7E1],
+  ["A065",0xC7E2],
+  ["A066",0xC7E3],
+  ["A067",0xC7E5],
+  ["A068",0xC7E6],
+  ["A069",0xC7E7],
+  ["A06A",0xC7E9],
+  ["A06B",0xC7EA],
+  ["A06C",0xC7EB],
+  ["A06D",0xC7ED],
+  ["A06E",0xC7EE],
+  ["A06F",0xC7EF],
+  ["A070",0xC7F0],
+  ["A071",0xC7F1],
+  ["A072",0xC7F2],
+  ["A073",0xC7F3],
+  ["A074",0xC7F4],
+  ["A075",0xC7F5],
+  ["A076",0xC7F6],
+  ["A077",0xC7F7],
+  ["A078",0xC7F8],
+  ["A079",0xC7F9],
+  ["A07A",0xC7FA],
+  ["A081",0xC7FB],
+  ["A082",0xC7FC],
+  ["A083",0xC7FD],
+  ["A084",0xC7FE],
+  ["A085",0xC7FF],
+  ["A086",0xC802],
+  ["A087",0xC803],
+  ["A088",0xC805],
+  ["A089",0xC806],
+  ["A08A",0xC807],
+  ["A08B",0xC809],
+  ["A08C",0xC80B],
+  ["A08D",0xC80C],
+  ["A08E",0xC80D],
+  ["A08F",0xC80E],
+  ["A090",0xC80F],
+  ["A091",0xC812],
+  ["A092",0xC814],
+  ["A093",0xC817],
+  ["A094",0xC818],
+  ["A095",0xC819],
+  ["A096",0xC81A],
+  ["A097",0xC81B],
+  ["A098",0xC81E],
+  ["A099",0xC81F],
+  ["A09A",0xC821],
+  ["A09B",0xC822],
+  ["A09C",0xC823],
+  ["A09D",0xC825],
+  ["A09E",0xC826],
+  ["A09F",0xC827],
+  ["A0A0",0xC828],
+  ["A0A1",0xC829],
+  ["A0A2",0xC82A],
+  ["A0A3",0xC82B],
+  ["A0A4",0xC82E],
+  ["A0A5",0xC830],
+  ["A0A6",0xC832],
+  ["A0A7",0xC833],
+  ["A0A8",0xC834],
+  ["A0A9",0xC835],
+  ["A0AA",0xC836],
+  ["A0AB",0xC837],
+  ["A0AC",0xC839],
+  ["A0AD",0xC83A],
+  ["A0AE",0xC83B],
+  ["A0AF",0xC83D],
+  ["A0B0",0xC83E],
+  ["A0B1",0xC83F],
+  ["A0B2",0xC841],
+  ["A0B3",0xC842],
+  ["A0B4",0xC843],
+  ["A0B5",0xC844],
+  ["A0B6",0xC845],
+  ["A0B7",0xC846],
+  ["A0B8",0xC847],
+  ["A0B9",0xC84A],
+  ["A0BA",0xC84B],
+  ["A0BB",0xC84E],
+  ["A0BC",0xC84F],
+  ["A0BD",0xC850],
+  ["A0BE",0xC851],
+  ["A0BF",0xC852],
+  ["A0C0",0xC853],
+  ["A0C1",0xC855],
+  ["A0C2",0xC856],
+  ["A0C3",0xC857],
+  ["A0C4",0xC858],
+  ["A0C5",0xC859],
+  ["A0C6",0xC85A],
+  ["A0C7",0xC85B],
+  ["A0C8",0xC85C],
+  ["A0C9",0xC85D],
+  ["A0CA",0xC85E],
+  ["A0CB",0xC85F],
+  ["A0CC",0xC860],
+  ["A0CD",0xC861],
+  ["A0CE",0xC862],
+  ["A0CF",0xC863],
+  ["A0D0",0xC864],
+  ["A0D1",0xC865],
+  ["A0D2",0xC866],
+  ["A0D3",0xC867],
+  ["A0D4",0xC868],
+  ["A0D5",0xC869],
+  ["A0D6",0xC86A],
+  ["A0D7",0xC86B],
+  ["A0D8",0xC86C],
+  ["A0D9",0xC86D],
+  ["A0DA",0xC86E],
+  ["A0DB",0xC86F],
+  ["A0DC",0xC872],
+  ["A0DD",0xC873],
+  ["A0DE",0xC875],
+  ["A0DF",0xC876],
+  ["A0E0",0xC877],
+  ["A0E1",0xC879],
+  ["A0E2",0xC87B],
+  ["A0E3",0xC87C],
+  ["A0E4",0xC87D],
+  ["A0E5",0xC87E],
+  ["A0E6",0xC87F],
+  ["A0E7",0xC882],
+  ["A0E8",0xC884],
+  ["A0E9",0xC888],
+  ["A0EA",0xC889],
+  ["A0EB",0xC88A],
+  ["A0EC",0xC88E],
+  ["A0ED",0xC88F],
+  ["A0EE",0xC890],
+  ["A0EF",0xC891],
+  ["A0F0",0xC892],
+  ["A0F1",0xC893],
+  ["A0F2",0xC895],
+  ["A0F3",0xC896],
+  ["A0F4",0xC897],
+  ["A0F5",0xC898],
+  ["A0F6",0xC899],
+  ["A0F7",0xC89A],
+  ["A0F8",0xC89B],
+  ["A0F9",0xC89C],
+  ["A0FA",0xC89E],
+  ["A0FB",0xC8A0],
+  ["A0FC",0xC8A2],
+  ["A0FD",0xC8A3],
+  ["A0FE",0xC8A4],
+  ["A141",0xC8A5],
+  ["A142",0xC8A6],
+  ["A143",0xC8A7],
+  ["A144",0xC8A9],
+  ["A145",0xC8AA],
+  ["A146",0xC8AB],
+  ["A147",0xC8AC],
+  ["A148",0xC8AD],
+  ["A149",0xC8AE],
+  ["A14A",0xC8AF],
+  ["A14B",0xC8B0],
+  ["A14C",0xC8B1],
+  ["A14D",0xC8B2],
+  ["A14E",0xC8B3],
+  ["A14F",0xC8B4],
+  ["A150",0xC8B5],
+  ["A151",0xC8B6],
+  ["A152",0xC8B7],
+  ["A153",0xC8B8],
+  ["A154",0xC8B9],
+  ["A155",0xC8BA],
+  ["A156",0xC8BB],
+  ["A157",0xC8BE],
+  ["A158",0xC8BF],
+  ["A159",0xC8C0],
+  ["A15A",0xC8C1],
+  ["A161",0xC8C2],
+  ["A162",0xC8C3],
+  ["A163",0xC8C5],
+  ["A164",0xC8C6],
+  ["A165",0xC8C7],
+  ["A166",0xC8C9],
+  ["A167",0xC8CA],
+  ["A168",0xC8CB],
+  ["A169",0xC8CD],
+  ["A16A",0xC8CE],
+  ["A16B",0xC8CF],
+  ["A16C",0xC8D0],
+  ["A16D",0xC8D1],
+  ["A16E",0xC8D2],
+  ["A16F",0xC8D3],
+  ["A170",0xC8D6],
+  ["A171",0xC8D8],
+  ["A172",0xC8DA],
+  ["A173",0xC8DB],
+  ["A174",0xC8DC],
+  ["A175",0xC8DD],
+  ["A176",0xC8DE],
+  ["A177",0xC8DF],
+  ["A178",0xC8E2],
+  ["A179",0xC8E3],
+  ["A17A",0xC8E5],
+  ["A181",0xC8E6],
+  ["A182",0xC8E7],
+  ["A183",0xC8E8],
+  ["A184",0xC8E9],
+  ["A185",0xC8EA],
+  ["A186",0xC8EB],
+  ["A187",0xC8EC],
+  ["A188",0xC8ED],
+  ["A189",0xC8EE],
+  ["A18A",0xC8EF],
+  ["A18B",0xC8F0],
+  ["A18C",0xC8F1],
+  ["A18D",0xC8F2],
+  ["A18E",0xC8F3],
+  ["A18F",0xC8F4],
+  ["A190",0xC8F6],
+  ["A191",0xC8F7],
+  ["A192",0xC8F8],
+  ["A193",0xC8F9],
+  ["A194",0xC8FA],
+  ["A195",0xC8FB],
+  ["A196",0xC8FE],
+  ["A197",0xC8FF],
+  ["A198",0xC901],
+  ["A199",0xC902],
+  ["A19A",0xC903],
+  ["A19B",0xC907],
+  ["A19C",0xC908],
+  ["A19D",0xC909],
+  ["A19E",0xC90A],
+  ["A19F",0xC90B],
+  ["A1A0",0xC90E],
+  ["A241",0xC910],
+  ["A242",0xC912],
+  ["A243",0xC913],
+  ["A244",0xC914],
+  ["A245",0xC915],
+  ["A246",0xC916],
+  ["A247",0xC917],
+  ["A248",0xC919],
+  ["A249",0xC91A],
+  ["A24A",0xC91B],
+  ["A24B",0xC91C],
+  ["A24C",0xC91D],
+  ["A24D",0xC91E],
+  ["A24E",0xC91F],
+  ["A24F",0xC920],
+  ["A250",0xC921],
+  ["A251",0xC922],
+  ["A252",0xC923],
+  ["A253",0xC924],
+  ["A254",0xC925],
+  ["A255",0xC926],
+  ["A256",0xC927],
+  ["A257",0xC928],
+  ["A258",0xC929],
+  ["A259",0xC92A],
+  ["A25A",0xC92B],
+  ["A261",0xC92D],
+  ["A262",0xC92E],
+  ["A263",0xC92F],
+  ["A264",0xC930],
+  ["A265",0xC931],
+  ["A266",0xC932],
+  ["A267",0xC933],
+  ["A268",0xC935],
+  ["A269",0xC936],
+  ["A26A",0xC937],
+  ["A26B",0xC938],
+  ["A26C",0xC939],
+  ["A26D",0xC93A],
+  ["A26E",0xC93B],
+  ["A26F",0xC93C],
+  ["A270",0xC93D],
+  ["A271",0xC93E],
+  ["A272",0xC93F],
+  ["A273",0xC940],
+  ["A274",0xC941],
+  ["A275",0xC942],
+  ["A276",0xC943],
+  ["A277",0xC944],
+  ["A278",0xC945],
+  ["A279",0xC946],
+  ["A27A",0xC947],
+  ["A281",0xC948],
+  ["A282",0xC949],
+  ["A283",0xC94A],
+  ["A284",0xC94B],
+  ["A285",0xC94C],
+  ["A286",0xC94D],
+  ["A287",0xC94E],
+  ["A288",0xC94F],
+  ["A289",0xC952],
+  ["A28A",0xC953],
+  ["A28B",0xC955],
+  ["A28C",0xC956],
+  ["A28D",0xC957],
+  ["A28E",0xC959],
+  ["A28F",0xC95A],
+  ["A290",0xC95B],
+  ["A291",0xC95C],
+  ["A292",0xC95D],
+  ["A293",0xC95E],
+  ["A294",0xC95F],
+  ["A295",0xC962],
+  ["A296",0xC964],
+  ["A297",0xC965],
+  ["A298",0xC966],
+  ["A299",0xC967],
+  ["A29A",0xC968],
+  ["A29B",0xC969],
+  ["A29C",0xC96A],
+  ["A29D",0xC96B],
+  ["A29E",0xC96D],
+  ["A29F",0xC96E],
+  ["A2A0",0xC96F],
+  ["A2E6",0x20AC],
+  ["A2E7",0xAE],
+  ["A341",0xC971],
+  ["A342",0xC972],
+  ["A343",0xC973],
+  ["A344",0xC975],
+  ["A345",0xC976],
+  ["A346",0xC977],
+  ["A347",0xC978],
+  ["A348",0xC979],
+  ["A349",0xC97A],
+  ["A34A",0xC97B],
+  ["A34B",0xC97D],
+  ["A34C",0xC97E],
+  ["A34D",0xC97F],
+  ["A34E",0xC980],
+  ["A34F",0xC981],
+  ["A350",0xC982],
+  ["A351",0xC983],
+  ["A352",0xC984],
+  ["A353",0xC985],
+  ["A354",0xC986],
+  ["A355",0xC987],
+  ["A356",0xC98A],
+  ["A357",0xC98B],
+  ["A358",0xC98D],
+  ["A359",0xC98E],
+  ["A35A",0xC98F],
+  ["A361",0xC991],
+  ["A362",0xC992],
+  ["A363",0xC993],
+  ["A364",0xC994],
+  ["A365",0xC995],
+  ["A366",0xC996],
+  ["A367",0xC997],
+  ["A368",0xC99A],
+  ["A369",0xC99C],
+  ["A36A",0xC99E],
+  ["A36B",0xC99F],
+  ["A36C",0xC9A0],
+  ["A36D",0xC9A1],
+  ["A36E",0xC9A2],
+  ["A36F",0xC9A3],
+  ["A370",0xC9A4],
+  ["A371",0xC9A5],
+  ["A372",0xC9A6],
+  ["A373",0xC9A7],
+  ["A374",0xC9A8],
+  ["A375",0xC9A9],
+  ["A376",0xC9AA],
+  ["A377",0xC9AB],
+  ["A378",0xC9AC],
+  ["A379",0xC9AD],
+  ["A37A",0xC9AE],
+  ["A381",0xC9AF],
+  ["A382",0xC9B0],
+  ["A383",0xC9B1],
+  ["A384",0xC9B2],
+  ["A385",0xC9B3],
+  ["A386",0xC9B4],
+  ["A387",0xC9B5],
+  ["A388",0xC9B6],
+  ["A389",0xC9B7],
+  ["A38A",0xC9B8],
+  ["A38B",0xC9B9],
+  ["A38C",0xC9BA],
+  ["A38D",0xC9BB],
+  ["A38E",0xC9BC],
+  ["A38F",0xC9BD],
+  ["A390",0xC9BE],
+  ["A391",0xC9BF],
+  ["A392",0xC9C2],
+  ["A393",0xC9C3],
+  ["A394",0xC9C5],
+  ["A395",0xC9C6],
+  ["A396",0xC9C9],
+  ["A397",0xC9CB],
+  ["A398",0xC9CC],
+  ["A399",0xC9CD],
+  ["A39A",0xC9CE],
+  ["A39B",0xC9CF],
+  ["A39C",0xC9D2],
+  ["A39D",0xC9D4],
+  ["A39E",0xC9D7],
+  ["A39F",0xC9D8],
+  ["A3A0",0xC9DB],
+  ["A441",0xC9DE],
+  ["A442",0xC9DF],
+  ["A443",0xC9E1],
+  ["A444",0xC9E3],
+  ["A445",0xC9E5],
+  ["A446",0xC9E6],
+  ["A447",0xC9E8],
+  ["A448",0xC9E9],
+  ["A449",0xC9EA],
+  ["A44A",0xC9EB],
+  ["A44B",0xC9EE],
+  ["A44C",0xC9F2],
+  ["A44D",0xC9F3],
+  ["A44E",0xC9F4],
+  ["A44F",0xC9F5],
+  ["A450",0xC9F6],
+  ["A451",0xC9F7],
+  ["A452",0xC9FA],
+  ["A453",0xC9FB],
+  ["A454",0xC9FD],
+  ["A455",0xC9FE],
+  ["A456",0xC9FF],
+  ["A457",0xCA01],
+  ["A458",0xCA02],
+  ["A459",0xCA03],
+  ["A45A",0xCA04],
+  ["A461",0xCA05],
+  ["A462",0xCA06],
+  ["A463",0xCA07],
+  ["A464",0xCA0A],
+  ["A465",0xCA0E],
+  ["A466",0xCA0F],
+  ["A467",0xCA10],
+  ["A468",0xCA11],
+  ["A469",0xCA12],
+  ["A46A",0xCA13],
+  ["A46B",0xCA15],
+  ["A46C",0xCA16],
+  ["A46D",0xCA17],
+  ["A46E",0xCA19],
+  ["A46F",0xCA1A],
+  ["A470",0xCA1B],
+  ["A471",0xCA1C],
+  ["A472",0xCA1D],
+  ["A473",0xCA1E],
+  ["A474",0xCA1F],
+  ["A475",0xCA20],
+  ["A476",0xCA21],
+  ["A477",0xCA22],
+  ["A478",0xCA23],
+  ["A479",0xCA24],
+  ["A47A",0xCA25],
+  ["A481",0xCA26],
+  ["A482",0xCA27],
+  ["A483",0xCA28],
+  ["A484",0xCA2A],
+  ["A485",0xCA2B],
+  ["A486",0xCA2C],
+  ["A487",0xCA2D],
+  ["A488",0xCA2E],
+  ["A489",0xCA2F],
+  ["A48A",0xCA30],
+  ["A48B",0xCA31],
+  ["A48C",0xCA32],
+  ["A48D",0xCA33],
+  ["A48E",0xCA34],
+  ["A48F",0xCA35],
+  ["A490",0xCA36],
+  ["A491",0xCA37],
+  ["A492",0xCA38],
+  ["A493",0xCA39],
+  ["A494",0xCA3A],
+  ["A495",0xCA3B],
+  ["A496",0xCA3C],
+  ["A497",0xCA3D],
+  ["A498",0xCA3E],
+  ["A499",0xCA3F],
+  ["A49A",0xCA40],
+  ["A49B",0xCA41],
+  ["A49C",0xCA42],
+  ["A49D",0xCA43],
+  ["A49E",0xCA44],
+  ["A49F",0xCA45],
+  ["A4A0",0xCA46],
+  ["A541",0xCA47],
+  ["A542",0xCA48],
+  ["A543",0xCA49],
+  ["A544",0xCA4A],
+  ["A545",0xCA4B],
+  ["A546",0xCA4E],
+  ["A547",0xCA4F],
+  ["A548",0xCA51],
+  ["A549",0xCA52],
+  ["A54A",0xCA53],
+  ["A54B",0xCA55],
+  ["A54C",0xCA56],
+  ["A54D",0xCA57],
+  ["A54E",0xCA58],
+  ["A54F",0xCA59],
+  ["A550",0xCA5A],
+  ["A551",0xCA5B],
+  ["A552",0xCA5E],
+  ["A553",0xCA62],
+  ["A554",0xCA63],
+  ["A555",0xCA64],
+  ["A556",0xCA65],
+  ["A557",0xCA66],
+  ["A558",0xCA67],
+  ["A559",0xCA69],
+  ["A55A",0xCA6A],
+  ["A561",0xCA6B],
+  ["A562",0xCA6C],
+  ["A563",0xCA6D],
+  ["A564",0xCA6E],
+  ["A565",0xCA6F],
+  ["A566",0xCA70],
+  ["A567",0xCA71],
+  ["A568",0xCA72],
+  ["A569",0xCA73],
+  ["A56A",0xCA74],
+  ["A56B",0xCA75],
+  ["A56C",0xCA76],
+  ["A56D",0xCA77],
+  ["A56E",0xCA78],
+  ["A56F",0xCA79],
+  ["A570",0xCA7A],
+  ["A571",0xCA7B],
+  ["A572",0xCA7C],
+  ["A573",0xCA7E],
+  ["A574",0xCA7F],
+  ["A575",0xCA80],
+  ["A576",0xCA81],
+  ["A577",0xCA82],
+  ["A578",0xCA83],
+  ["A579",0xCA85],
+  ["A57A",0xCA86],
+  ["A581",0xCA87],
+  ["A582",0xCA88],
+  ["A583",0xCA89],
+  ["A584",0xCA8A],
+  ["A585",0xCA8B],
+  ["A586",0xCA8C],
+  ["A587",0xCA8D],
+  ["A588",0xCA8E],
+  ["A589",0xCA8F],
+  ["A58A",0xCA90],
+  ["A58B",0xCA91],
+  ["A58C",0xCA92],
+  ["A58D",0xCA93],
+  ["A58E",0xCA94],
+  ["A58F",0xCA95],
+  ["A590",0xCA96],
+  ["A591",0xCA97],
+  ["A592",0xCA99],
+  ["A593",0xCA9A],
+  ["A594",0xCA9B],
+  ["A595",0xCA9C],
+  ["A596",0xCA9D],
+  ["A597",0xCA9E],
+  ["A598",0xCA9F],
+  ["A599",0xCAA0],
+  ["A59A",0xCAA1],
+  ["A59B",0xCAA2],
+  ["A59C",0xCAA3],
+  ["A59D",0xCAA4],
+  ["A59E",0xCAA5],
+  ["A59F",0xCAA6],
+  ["A5A0",0xCAA7],
+  ["A641",0xCAA8],
+  ["A642",0xCAA9],
+  ["A643",0xCAAA],
+  ["A644",0xCAAB],
+  ["A645",0xCAAC],
+  ["A646",0xCAAD],
+  ["A647",0xCAAE],
+  ["A648",0xCAAF],
+  ["A649",0xCAB0],
+  ["A64A",0xCAB1],
+  ["A64B",0xCAB2],
+  ["A64C",0xCAB3],
+  ["A64D",0xCAB4],
+  ["A64E",0xCAB5],
+  ["A64F",0xCAB6],
+  ["A650",0xCAB7],
+  ["A651",0xCAB8],
+  ["A652",0xCAB9],
+  ["A653",0xCABA],
+  ["A654",0xCABB],
+  ["A655",0xCABE],
+  ["A656",0xCABF],
+  ["A657",0xCAC1],
+  ["A658",0xCAC2],
+  ["A659",0xCAC3],
+  ["A65A",0xCAC5],
+  ["A661",0xCAC6],
+  ["A662",0xCAC7],
+  ["A663",0xCAC8],
+  ["A664",0xCAC9],
+  ["A665",0xCACA],
+  ["A666",0xCACB],
+  ["A667",0xCACE],
+  ["A668",0xCAD0],
+  ["A669",0xCAD2],
+  ["A66A",0xCAD4],
+  ["A66B",0xCAD5],
+  ["A66C",0xCAD6],
+  ["A66D",0xCAD7],
+  ["A66E",0xCADA],
+  ["A66F",0xCADB],
+  ["A670",0xCADC],
+  ["A671",0xCADD],
+  ["A672",0xCADE],
+  ["A673",0xCADF],
+  ["A674",0xCAE1],
+  ["A675",0xCAE2],
+  ["A676",0xCAE3],
+  ["A677",0xCAE4],
+  ["A678",0xCAE5],
+  ["A679",0xCAE6],
+  ["A67A",0xCAE7],
+  ["A681",0xCAE8],
+  ["A682",0xCAE9],
+  ["A683",0xCAEA],
+  ["A684",0xCAEB],
+  ["A685",0xCAED],
+  ["A686",0xCAEE],
+  ["A687",0xCAEF],
+  ["A688",0xCAF0],
+  ["A689",0xCAF1],
+  ["A68A",0xCAF2],
+  ["A68B",0xCAF3],
+  ["A68C",0xCAF5],
+  ["A68D",0xCAF6],
+  ["A68E",0xCAF7],
+  ["A68F",0xCAF8],
+  ["A690",0xCAF9],
+  ["A691",0xCAFA],
+  ["A692",0xCAFB],
+  ["A693",0xCAFC],
+  ["A694",0xCAFD],
+  ["A695",0xCAFE],
+  ["A696",0xCAFF],
+  ["A697",0xCB00],
+  ["A698",0xCB01],
+  ["A699",0xCB02],
+  ["A69A",0xCB03],
+  ["A69B",0xCB04],
+  ["A69C",0xCB05],
+  ["A69D",0xCB06],
+  ["A69E",0xCB07],
+  ["A69F",0xCB09],
+  ["A6A0",0xCB0A],
+  ["A741",0xCB0B],
+  ["A742",0xCB0C],
+  ["A743",0xCB0D],
+  ["A744",0xCB0E],
+  ["A745",0xCB0F],
+  ["A746",0xCB11],
+  ["A747",0xCB12],
+  ["A748",0xCB13],
+  ["A749",0xCB15],
+  ["A74A",0xCB16],
+  ["A74B",0xCB17],
+  ["A74C",0xCB19],
+  ["A74D",0xCB1A],
+  ["A74E",0xCB1B],
+  ["A74F",0xCB1C],
+  ["A750",0xCB1D],
+  ["A751",0xCB1E],
+  ["A752",0xCB1F],
+  ["A753",0xCB22],
+  ["A754",0xCB23],
+  ["A755",0xCB24],
+  ["A756",0xCB25],
+  ["A757",0xCB26],
+  ["A758",0xCB27],
+  ["A759",0xCB28],
+  ["A75A",0xCB29],
+  ["A761",0xCB2A],
+  ["A762",0xCB2B],
+  ["A763",0xCB2C],
+  ["A764",0xCB2D],
+  ["A765",0xCB2E],
+  ["A766",0xCB2F],
+  ["A767",0xCB30],
+  ["A768",0xCB31],
+  ["A769",0xCB32],
+  ["A76A",0xCB33],
+  ["A76B",0xCB34],
+  ["A76C",0xCB35],
+  ["A76D",0xCB36],
+  ["A76E",0xCB37],
+  ["A76F",0xCB38],
+  ["A770",0xCB39],
+  ["A771",0xCB3A],
+  ["A772",0xCB3B],
+  ["A773",0xCB3C],
+  ["A774",0xCB3D],
+  ["A775",0xCB3E],
+  ["A776",0xCB3F],
+  ["A777",0xCB40],
+  ["A778",0xCB42],
+  ["A779",0xCB43],
+  ["A77A",0xCB44],
+  ["A781",0xCB45],
+  ["A782",0xCB46],
+  ["A783",0xCB47],
+  ["A784",0xCB4A],
+  ["A785",0xCB4B],
+  ["A786",0xCB4D],
+  ["A787",0xCB4E],
+  ["A788",0xCB4F],
+  ["A789",0xCB51],
+  ["A78A",0xCB52],
+  ["A78B",0xCB53],
+  ["A78C",0xCB54],
+  ["A78D",0xCB55],
+  ["A78E",0xCB56],
+  ["A78F",0xCB57],
+  ["A790",0xCB5A],
+  ["A791",0xCB5B],
+  ["A792",0xCB5C],
+  ["A793",0xCB5E],
+  ["A794",0xCB5F],
+  ["A795",0xCB60],
+  ["A796",0xCB61],
+  ["A797",0xCB62],
+  ["A798",0xCB63],
+  ["A799",0xCB65],
+  ["A79A",0xCB66],
+  ["A79B",0xCB67],
+  ["A79C",0xCB68],
+  ["A79D",0xCB69],
+  ["A79E",0xCB6A],
+  ["A79F",0xCB6B],
+  ["A7A0",0xCB6C],
+  ["A841",0xCB6D],
+  ["A842",0xCB6E],
+  ["A843",0xCB6F],
+  ["A844",0xCB70],
+  ["A845",0xCB71],
+  ["A846",0xCB72],
+  ["A847",0xCB73],
+  ["A848",0xCB74],
+  ["A849",0xCB75],
+  ["A84A",0xCB76],
+  ["A84B",0xCB77],
+  ["A84C",0xCB7A],
+  ["A84D",0xCB7B],
+  ["A84E",0xCB7C],
+  ["A84F",0xCB7D],
+  ["A850",0xCB7E],
+  ["A851",0xCB7F],
+  ["A852",0xCB80],
+  ["A853",0xCB81],
+  ["A854",0xCB82],
+  ["A855",0xCB83],
+  ["A856",0xCB84],
+  ["A857",0xCB85],
+  ["A858",0xCB86],
+  ["A859",0xCB87],
+  ["A85A",0xCB88],
+  ["A861",0xCB89],
+  ["A862",0xCB8A],
+  ["A863",0xCB8B],
+  ["A864",0xCB8C],
+  ["A865",0xCB8D],
+  ["A866",0xCB8E],
+  ["A867",0xCB8F],
+  ["A868",0xCB90],
+  ["A869",0xCB91],
+  ["A86A",0xCB92],
+  ["A86B",0xCB93],
+  ["A86C",0xCB94],
+  ["A86D",0xCB95],
+  ["A86E",0xCB96],
+  ["A86F",0xCB97],
+  ["A870",0xCB98],
+  ["A871",0xCB99],
+  ["A872",0xCB9A],
+  ["A873",0xCB9B],
+  ["A874",0xCB9D],
+  ["A875",0xCB9E],
+  ["A876",0xCB9F],
+  ["A877",0xCBA0],
+  ["A878",0xCBA1],
+  ["A879",0xCBA2],
+  ["A87A",0xCBA3],
+  ["A881",0xCBA4],
+  ["A882",0xCBA5],
+  ["A883",0xCBA6],
+  ["A884",0xCBA7],
+  ["A885",0xCBA8],
+  ["A886",0xCBA9],
+  ["A887",0xCBAA],
+  ["A888",0xCBAB],
+  ["A889",0xCBAC],
+  ["A88A",0xCBAD],
+  ["A88B",0xCBAE],
+  ["A88C",0xCBAF],
+  ["A88D",0xCBB0],
+  ["A88E",0xCBB1],
+  ["A88F",0xCBB2],
+  ["A890",0xCBB3],
+  ["A891",0xCBB4],
+  ["A892",0xCBB5],
+  ["A893",0xCBB6],
+  ["A894",0xCBB7],
+  ["A895",0xCBB9],
+  ["A896",0xCBBA],
+  ["A897",0xCBBB],
+  ["A898",0xCBBC],
+  ["A899",0xCBBD],
+  ["A89A",0xCBBE],
+  ["A89B",0xCBBF],
+  ["A89C",0xCBC0],
+  ["A89D",0xCBC1],
+  ["A89E",0xCBC2],
+  ["A89F",0xCBC3],
+  ["A8A0",0xCBC4],
+  ["A941",0xCBC5],
+  ["A942",0xCBC6],
+  ["A943",0xCBC7],
+  ["A944",0xCBC8],
+  ["A945",0xCBC9],
+  ["A946",0xCBCA],
+  ["A947",0xCBCB],
+  ["A948",0xCBCC],
+  ["A949",0xCBCD],
+  ["A94A",0xCBCE],
+  ["A94B",0xCBCF],
+  ["A94C",0xCBD0],
+  ["A94D",0xCBD1],
+  ["A94E",0xCBD2],
+  ["A94F",0xCBD3],
+  ["A950",0xCBD5],
+  ["A951",0xCBD6],
+  ["A952",0xCBD7],
+  ["A953",0xCBD8],
+  ["A954",0xCBD9],
+  ["A955",0xCBDA],
+  ["A956",0xCBDB],
+  ["A957",0xCBDC],
+  ["A958",0xCBDD],
+  ["A959",0xCBDE],
+  ["A95A",0xCBDF],
+  ["A961",0xCBE0],
+  ["A962",0xCBE1],
+  ["A963",0xCBE2],
+  ["A964",0xCBE3],
+  ["A965",0xCBE5],
+  ["A966",0xCBE6],
+  ["A967",0xCBE8],
+  ["A968",0xCBEA],
+  ["A969",0xCBEB],
+  ["A96A",0xCBEC],
+  ["A96B",0xCBED],
+  ["A96C",0xCBEE],
+  ["A96D",0xCBEF],
+  ["A96E",0xCBF0],
+  ["A96F",0xCBF1],
+  ["A970",0xCBF2],
+  ["A971",0xCBF3],
+  ["A972",0xCBF4],
+  ["A973",0xCBF5],
+  ["A974",0xCBF6],
+  ["A975",0xCBF7],
+  ["A976",0xCBF8],
+  ["A977",0xCBF9],
+  ["A978",0xCBFA],
+  ["A979",0xCBFB],
+  ["A97A",0xCBFC],
+  ["A981",0xCBFD],
+  ["A982",0xCBFE],
+  ["A983",0xCBFF],
+  ["A984",0xCC00],
+  ["A985",0xCC01],
+  ["A986",0xCC02],
+  ["A987",0xCC03],
+  ["A988",0xCC04],
+  ["A989",0xCC05],
+  ["A98A",0xCC06],
+  ["A98B",0xCC07],
+  ["A98C",0xCC08],
+  ["A98D",0xCC09],
+  ["A98E",0xCC0A],
+  ["A98F",0xCC0B],
+  ["A990",0xCC0E],
+  ["A991",0xCC0F],
+  ["A992",0xCC11],
+  ["A993",0xCC12],
+  ["A994",0xCC13],
+  ["A995",0xCC15],
+  ["A996",0xCC16],
+  ["A997",0xCC17],
+  ["A998",0xCC18],
+  ["A999",0xCC19],
+  ["A99A",0xCC1A],
+  ["A99B",0xCC1B],
+  ["A99C",0xCC1E],
+  ["A99D",0xCC1F],
+  ["A99E",0xCC20],
+  ["A99F",0xCC23],
+  ["A9A0",0xCC24],
+  ["AA41",0xCC25],
+  ["AA42",0xCC26],
+  ["AA43",0xCC2A],
+  ["AA44",0xCC2B],
+  ["AA45",0xCC2D],
+  ["AA46",0xCC2F],
+  ["AA47",0xCC31],
+  ["AA48",0xCC32],
+  ["AA49",0xCC33],
+  ["AA4A",0xCC34],
+  ["AA4B",0xCC35],
+  ["AA4C",0xCC36],
+  ["AA4D",0xCC37],
+  ["AA4E",0xCC3A],
+  ["AA4F",0xCC3F],
+  ["AA50",0xCC40],
+  ["AA51",0xCC41],
+  ["AA52",0xCC42],
+  ["AA53",0xCC43],
+  ["AA54",0xCC46],
+  ["AA55",0xCC47],
+  ["AA56",0xCC49],
+  ["AA57",0xCC4A],
+  ["AA58",0xCC4B],
+  ["AA59",0xCC4D],
+  ["AA5A",0xCC4E],
+  ["AA61",0xCC4F],
+  ["AA62",0xCC50],
+  ["AA63",0xCC51],
+  ["AA64",0xCC52],
+  ["AA65",0xCC53],
+  ["AA66",0xCC56],
+  ["AA67",0xCC5A],
+  ["AA68",0xCC5B],
+  ["AA69",0xCC5C],
+  ["AA6A",0xCC5D],
+  ["AA6B",0xCC5E],
+  ["AA6C",0xCC5F],
+  ["AA6D",0xCC61],
+  ["AA6E",0xCC62],
+  ["AA6F",0xCC63],
+  ["AA70",0xCC65],
+  ["AA71",0xCC67],
+  ["AA72",0xCC69],
+  ["AA73",0xCC6A],
+  ["AA74",0xCC6B],
+  ["AA75",0xCC6C],
+  ["AA76",0xCC6D],
+  ["AA77",0xCC6E],
+  ["AA78",0xCC6F],
+  ["AA79",0xCC71],
+  ["AA7A",0xCC72],
+  ["AA81",0xCC73],
+  ["AA82",0xCC74],
+  ["AA83",0xCC76],
+  ["AA84",0xCC77],
+  ["AA85",0xCC78],
+  ["AA86",0xCC79],
+  ["AA87",0xCC7A],
+  ["AA88",0xCC7B],
+  ["AA89",0xCC7C],
+  ["AA8A",0xCC7D],
+  ["AA8B",0xCC7E],
+  ["AA8C",0xCC7F],
+  ["AA8D",0xCC80],
+  ["AA8E",0xCC81],
+  ["AA8F",0xCC82],
+  ["AA90",0xCC83],
+  ["AA91",0xCC84],
+  ["AA92",0xCC85],
+  ["AA93",0xCC86],
+  ["AA94",0xCC87],
+  ["AA95",0xCC88],
+  ["AA96",0xCC89],
+  ["AA97",0xCC8A],
+  ["AA98",0xCC8B],
+  ["AA99",0xCC8C],
+  ["AA9A",0xCC8D],
+  ["AA9B",0xCC8E],
+  ["AA9C",0xCC8F],
+  ["AA9D",0xCC90],
+  ["AA9E",0xCC91],
+  ["AA9F",0xCC92],
+  ["AAA0",0xCC93],
+  ["AB41",0xCC94],
+  ["AB42",0xCC95],
+  ["AB43",0xCC96],
+  ["AB44",0xCC97],
+  ["AB45",0xCC9A],
+  ["AB46",0xCC9B],
+  ["AB47",0xCC9D],
+  ["AB48",0xCC9E],
+  ["AB49",0xCC9F],
+  ["AB4A",0xCCA1],
+  ["AB4B",0xCCA2],
+  ["AB4C",0xCCA3],
+  ["AB4D",0xCCA4],
+  ["AB4E",0xCCA5],
+  ["AB4F",0xCCA6],
+  ["AB50",0xCCA7],
+  ["AB51",0xCCAA],
+  ["AB52",0xCCAE],
+  ["AB53",0xCCAF],
+  ["AB54",0xCCB0],
+  ["AB55",0xCCB1],
+  ["AB56",0xCCB2],
+  ["AB57",0xCCB3],
+  ["AB58",0xCCB6],
+  ["AB59",0xCCB7],
+  ["AB5A",0xCCB9],
+  ["AB61",0xCCBA],
+  ["AB62",0xCCBB],
+  ["AB63",0xCCBD],
+  ["AB64",0xCCBE],
+  ["AB65",0xCCBF],
+  ["AB66",0xCCC0],
+  ["AB67",0xCCC1],
+  ["AB68",0xCCC2],
+  ["AB69",0xCCC3],
+  ["AB6A",0xCCC6],
+  ["AB6B",0xCCC8],
+  ["AB6C",0xCCCA],
+  ["AB6D",0xCCCB],
+  ["AB6E",0xCCCC],
+  ["AB6F",0xCCCD],
+  ["AB70",0xCCCE],
+  ["AB71",0xCCCF],
+  ["AB72",0xCCD1],
+  ["AB73",0xCCD2],
+  ["AB74",0xCCD3],
+  ["AB75",0xCCD5],
+  ["AB76",0xCCD6],
+  ["AB77",0xCCD7],
+  ["AB78",0xCCD8],
+  ["AB79",0xCCD9],
+  ["AB7A",0xCCDA],
+  ["AB81",0xCCDB],
+  ["AB82",0xCCDC],
+  ["AB83",0xCCDD],
+  ["AB84",0xCCDE],
+  ["AB85",0xCCDF],
+  ["AB86",0xCCE0],
+  ["AB87",0xCCE1],
+  ["AB88",0xCCE2],
+  ["AB89",0xCCE3],
+  ["AB8A",0xCCE5],
+  ["AB8B",0xCCE6],
+  ["AB8C",0xCCE7],
+  ["AB8D",0xCCE8],
+  ["AB8E",0xCCE9],
+  ["AB8F",0xCCEA],
+  ["AB90",0xCCEB],
+  ["AB91",0xCCED],
+  ["AB92",0xCCEE],
+  ["AB93",0xCCEF],
+  ["AB94",0xCCF1],
+  ["AB95",0xCCF2],
+  ["AB96",0xCCF3],
+  ["AB97",0xCCF4],
+  ["AB98",0xCCF5],
+  ["AB99",0xCCF6],
+  ["AB9A",0xCCF7],
+  ["AB9B",0xCCF8],
+  ["AB9C",0xCCF9],
+  ["AB9D",0xCCFA],
+  ["AB9E",0xCCFB],
+  ["AB9F",0xCCFC],
+  ["ABA0",0xCCFD],
+  ["AC41",0xCCFE],
+  ["AC42",0xCCFF],
+  ["AC43",0xCD00],
+  ["AC44",0xCD02],
+  ["AC45",0xCD03],
+  ["AC46",0xCD04],
+  ["AC47",0xCD05],
+  ["AC48",0xCD06],
+  ["AC49",0xCD07],
+  ["AC4A",0xCD0A],
+  ["AC4B",0xCD0B],
+  ["AC4C",0xCD0D],
+  ["AC4D",0xCD0E],
+  ["AC4E",0xCD0F],
+  ["AC4F",0xCD11],
+  ["AC50",0xCD12],
+  ["AC51",0xCD13],
+  ["AC52",0xCD14],
+  ["AC53",0xCD15],
+  ["AC54",0xCD16],
+  ["AC55",0xCD17],
+  ["AC56",0xCD1A],
+  ["AC57",0xCD1C],
+  ["AC58",0xCD1E],
+  ["AC59",0xCD1F],
+  ["AC5A",0xCD20],
+  ["AC61",0xCD21],
+  ["AC62",0xCD22],
+  ["AC63",0xCD23],
+  ["AC64",0xCD25],
+  ["AC65",0xCD26],
+  ["AC66",0xCD27],
+  ["AC67",0xCD29],
+  ["AC68",0xCD2A],
+  ["AC69",0xCD2B],
+  ["AC6A",0xCD2D],
+  ["AC6B",0xCD2E],
+  ["AC6C",0xCD2F],
+  ["AC6D",0xCD30],
+  ["AC6E",0xCD31],
+  ["AC6F",0xCD32],
+  ["AC70",0xCD33],
+  ["AC71",0xCD34],
+  ["AC72",0xCD35],
+  ["AC73",0xCD36],
+  ["AC74",0xCD37],
+  ["AC75",0xCD38],
+  ["AC76",0xCD3A],
+  ["AC77",0xCD3B],
+  ["AC78",0xCD3C],
+  ["AC79",0xCD3D],
+  ["AC7A",0xCD3E],
+  ["AC81",0xCD3F],
+  ["AC82",0xCD40],
+  ["AC83",0xCD41],
+  ["AC84",0xCD42],
+  ["AC85",0xCD43],
+  ["AC86",0xCD44],
+  ["AC87",0xCD45],
+  ["AC88",0xCD46],
+  ["AC89",0xCD47],
+  ["AC8A",0xCD48],
+  ["AC8B",0xCD49],
+  ["AC8C",0xCD4A],
+  ["AC8D",0xCD4B],
+  ["AC8E",0xCD4C],
+  ["AC8F",0xCD4D],
+  ["AC90",0xCD4E],
+  ["AC91",0xCD4F],
+  ["AC92",0xCD50],
+  ["AC93",0xCD51],
+  ["AC94",0xCD52],
+  ["AC95",0xCD53],
+  ["AC96",0xCD54],
+  ["AC97",0xCD55],
+  ["AC98",0xCD56],
+  ["AC99",0xCD57],
+  ["AC9A",0xCD58],
+  ["AC9B",0xCD59],
+  ["AC9C",0xCD5A],
+  ["AC9D",0xCD5B],
+  ["AC9E",0xCD5D],
+  ["AC9F",0xCD5E],
+  ["ACA0",0xCD5F],
+  ["AD41",0xCD61],
+  ["AD42",0xCD62],
+  ["AD43",0xCD63],
+  ["AD44",0xCD65],
+  ["AD45",0xCD66],
+  ["AD46",0xCD67],
+  ["AD47",0xCD68],
+  ["AD48",0xCD69],
+  ["AD49",0xCD6A],
+  ["AD4A",0xCD6B],
+  ["AD4B",0xCD6E],
+  ["AD4C",0xCD70],
+  ["AD4D",0xCD72],
+  ["AD4E",0xCD73],
+  ["AD4F",0xCD74],
+  ["AD50",0xCD75],
+  ["AD51",0xCD76],
+  ["AD52",0xCD77],
+  ["AD53",0xCD79],
+  ["AD54",0xCD7A],
+  ["AD55",0xCD7B],
+  ["AD56",0xCD7C],
+  ["AD57",0xCD7D],
+  ["AD58",0xCD7E],
+  ["AD59",0xCD7F],
+  ["AD5A",0xCD80],
+  ["AD61",0xCD81],
+  ["AD62",0xCD82],
+  ["AD63",0xCD83],
+  ["AD64",0xCD84],
+  ["AD65",0xCD85],
+  ["AD66",0xCD86],
+  ["AD67",0xCD87],
+  ["AD68",0xCD89],
+  ["AD69",0xCD8A],
+  ["AD6A",0xCD8B],
+  ["AD6B",0xCD8C],
+  ["AD6C",0xCD8D],
+  ["AD6D",0xCD8E],
+  ["AD6E",0xCD8F],
+  ["AD6F",0xCD90],
+  ["AD70",0xCD91],
+  ["AD71",0xCD92],
+  ["AD72",0xCD93],
+  ["AD73",0xCD96],
+  ["AD74",0xCD97],
+  ["AD75",0xCD99],
+  ["AD76",0xCD9A],
+  ["AD77",0xCD9B],
+  ["AD78",0xCD9D],
+  ["AD79",0xCD9E],
+  ["AD7A",0xCD9F],
+  ["AD81",0xCDA0],
+  ["AD82",0xCDA1],
+  ["AD83",0xCDA2],
+  ["AD84",0xCDA3],
+  ["AD85",0xCDA6],
+  ["AD86",0xCDA8],
+  ["AD87",0xCDAA],
+  ["AD88",0xCDAB],
+  ["AD89",0xCDAC],
+  ["AD8A",0xCDAD],
+  ["AD8B",0xCDAE],
+  ["AD8C",0xCDAF],
+  ["AD8D",0xCDB1],
+  ["AD8E",0xCDB2],
+  ["AD8F",0xCDB3],
+  ["AD90",0xCDB4],
+  ["AD91",0xCDB5],
+  ["AD92",0xCDB6],
+  ["AD93",0xCDB7],
+  ["AD94",0xCDB8],
+  ["AD95",0xCDB9],
+  ["AD96",0xCDBA],
+  ["AD97",0xCDBB],
+  ["AD98",0xCDBC],
+  ["AD99",0xCDBD],
+  ["AD9A",0xCDBE],
+  ["AD9B",0xCDBF],
+  ["AD9C",0xCDC0],
+  ["AD9D",0xCDC1],
+  ["AD9E",0xCDC2],
+  ["AD9F",0xCDC3],
+  ["ADA0",0xCDC5],
+  ["AE41",0xCDC6],
+  ["AE42",0xCDC7],
+  ["AE43",0xCDC8],
+  ["AE44",0xCDC9],
+  ["AE45",0xCDCA],
+  ["AE46",0xCDCB],
+  ["AE47",0xCDCD],
+  ["AE48",0xCDCE],
+  ["AE49",0xCDCF],
+  ["AE4A",0xCDD1],
+  ["AE4B",0xCDD2],
+  ["AE4C",0xCDD3],
+  ["AE4D",0xCDD4],
+  ["AE4E",0xCDD5],
+  ["AE4F",0xCDD6],
+  ["AE50",0xCDD7],
+  ["AE51",0xCDD8],
+  ["AE52",0xCDD9],
+  ["AE53",0xCDDA],
+  ["AE54",0xCDDB],
+  ["AE55",0xCDDC],
+  ["AE56",0xCDDD],
+  ["AE57",0xCDDE],
+  ["AE58",0xCDDF],
+  ["AE59",0xCDE0],
+  ["AE5A",0xCDE1],
+  ["AE61",0xCDE2],
+  ["AE62",0xCDE3],
+  ["AE63",0xCDE4],
+  ["AE64",0xCDE5],
+  ["AE65",0xCDE6],
+  ["AE66",0xCDE7],
+  ["AE67",0xCDE9],
+  ["AE68",0xCDEA],
+  ["AE69",0xCDEB],
+  ["AE6A",0xCDED],
+  ["AE6B",0xCDEE],
+  ["AE6C",0xCDEF],
+  ["AE6D",0xCDF1],
+  ["AE6E",0xCDF2],
+  ["AE6F",0xCDF3],
+  ["AE70",0xCDF4],
+  ["AE71",0xCDF5],
+  ["AE72",0xCDF6],
+  ["AE73",0xCDF7],
+  ["AE74",0xCDFA],
+  ["AE75",0xCDFC],
+  ["AE76",0xCDFE],
+  ["AE77",0xCDFF],
+  ["AE78",0xCE00],
+  ["AE79",0xCE01],
+  ["AE7A",0xCE02],
+  ["AE81",0xCE03],
+  ["AE82",0xCE05],
+  ["AE83",0xCE06],
+  ["AE84",0xCE07],
+  ["AE85",0xCE09],
+  ["AE86",0xCE0A],
+  ["AE87",0xCE0B],
+  ["AE88",0xCE0D],
+  ["AE89",0xCE0E],
+  ["AE8A",0xCE0F],
+  ["AE8B",0xCE10],
+  ["AE8C",0xCE11],
+  ["AE8D",0xCE12],
+  ["AE8E",0xCE13],
+  ["AE8F",0xCE15],
+  ["AE90",0xCE16],
+  ["AE91",0xCE17],
+  ["AE92",0xCE18],
+  ["AE93",0xCE1A],
+  ["AE94",0xCE1B],
+  ["AE95",0xCE1C],
+  ["AE96",0xCE1D],
+  ["AE97",0xCE1E],
+  ["AE98",0xCE1F],
+  ["AE99",0xCE22],
+  ["AE9A",0xCE23],
+  ["AE9B",0xCE25],
+  ["AE9C",0xCE26],
+  ["AE9D",0xCE27],
+  ["AE9E",0xCE29],
+  ["AE9F",0xCE2A],
+  ["AEA0",0xCE2B],
+  ["AF41",0xCE2C],
+  ["AF42",0xCE2D],
+  ["AF43",0xCE2E],
+  ["AF44",0xCE2F],
+  ["AF45",0xCE32],
+  ["AF46",0xCE34],
+  ["AF47",0xCE36],
+  ["AF48",0xCE37],
+  ["AF49",0xCE38],
+  ["AF4A",0xCE39],
+  ["AF4B",0xCE3A],
+  ["AF4C",0xCE3B],
+  ["AF4D",0xCE3C],
+  ["AF4E",0xCE3D],
+  ["AF4F",0xCE3E],
+  ["AF50",0xCE3F],
+  ["AF51",0xCE40],
+  ["AF52",0xCE41],
+  ["AF53",0xCE42],
+  ["AF54",0xCE43],
+  ["AF55",0xCE44],
+  ["AF56",0xCE45],
+  ["AF57",0xCE46],
+  ["AF58",0xCE47],
+  ["AF59",0xCE48],
+  ["AF5A",0xCE49],
+  ["AF61",0xCE4A],
+  ["AF62",0xCE4B],
+  ["AF63",0xCE4C],
+  ["AF64",0xCE4D],
+  ["AF65",0xCE4E],
+  ["AF66",0xCE4F],
+  ["AF67",0xCE50],
+  ["AF68",0xCE51],
+  ["AF69",0xCE52],
+  ["AF6A",0xCE53],
+  ["AF6B",0xCE54],
+  ["AF6C",0xCE55],
+  ["AF6D",0xCE56],
+  ["AF6E",0xCE57],
+  ["AF6F",0xCE5A],
+  ["AF70",0xCE5B],
+  ["AF71",0xCE5D],
+  ["AF72",0xCE5E],
+  ["AF73",0xCE62],
+  ["AF74",0xCE63],
+  ["AF75",0xCE64],
+  ["AF76",0xCE65],
+  ["AF77",0xCE66],
+  ["AF78",0xCE67],
+  ["AF79",0xCE6A],
+  ["AF7A",0xCE6C],
+  ["AF81",0xCE6E],
+  ["AF82",0xCE6F],
+  ["AF83",0xCE70],
+  ["AF84",0xCE71],
+  ["AF85",0xCE72],
+  ["AF86",0xCE73],
+  ["AF87",0xCE76],
+  ["AF88",0xCE77],
+  ["AF89",0xCE79],
+  ["AF8A",0xCE7A],
+  ["AF8B",0xCE7B],
+  ["AF8C",0xCE7D],
+  ["AF8D",0xCE7E],
+  ["AF8E",0xCE7F],
+  ["AF8F",0xCE80],
+  ["AF90",0xCE81],
+  ["AF91",0xCE82],
+  ["AF92",0xCE83],
+  ["AF93",0xCE86],
+  ["AF94",0xCE88],
+  ["AF95",0xCE8A],
+  ["AF96",0xCE8B],
+  ["AF97",0xCE8C],
+  ["AF98",0xCE8D],
+  ["AF99",0xCE8E],
+  ["AF9A",0xCE8F],
+  ["AF9B",0xCE92],
+  ["AF9C",0xCE93],
+  ["AF9D",0xCE95],
+  ["AF9E",0xCE96],
+  ["AF9F",0xCE97],
+  ["AFA0",0xCE99],
+  ["B041",0xCE9A],
+  ["B042",0xCE9B],
+  ["B043",0xCE9C],
+  ["B044",0xCE9D],
+  ["B045",0xCE9E],
+  ["B046",0xCE9F],
+  ["B047",0xCEA2],
+  ["B048",0xCEA6],
+  ["B049",0xCEA7],
+  ["B04A",0xCEA8],
+  ["B04B",0xCEA9],
+  ["B04C",0xCEAA],
+  ["B04D",0xCEAB],
+  ["B04E",0xCEAE],
+  ["B04F",0xCEAF],
+  ["B050",0xCEB0],
+  ["B051",0xCEB1],
+  ["B052",0xCEB2],
+  ["B053",0xCEB3],
+  ["B054",0xCEB4],
+  ["B055",0xCEB5],
+  ["B056",0xCEB6],
+  ["B057",0xCEB7],
+  ["B058",0xCEB8],
+  ["B059",0xCEB9],
+  ["B05A",0xCEBA],
+  ["B061",0xCEBB],
+  ["B062",0xCEBC],
+  ["B063",0xCEBD],
+  ["B064",0xCEBE],
+  ["B065",0xCEBF],
+  ["B066",0xCEC0],
+  ["B067",0xCEC2],
+  ["B068",0xCEC3],
+  ["B069",0xCEC4],
+  ["B06A",0xCEC5],
+  ["B06B",0xCEC6],
+  ["B06C",0xCEC7],
+  ["B06D",0xCEC8],
+  ["B06E",0xCEC9],
+  ["B06F",0xCECA],
+  ["B070",0xCECB],
+  ["B071",0xCECC],
+  ["B072",0xCECD],
+  ["B073",0xCECE],
+  ["B074",0xCECF],
+  ["B075",0xCED0],
+  ["B076",0xCED1],
+  ["B077",0xCED2],
+  ["B078",0xCED3],
+  ["B079",0xCED4],
+  ["B07A",0xCED5],
+  ["B081",0xCED6],
+  ["B082",0xCED7],
+  ["B083",0xCED8],
+  ["B084",0xCED9],
+  ["B085",0xCEDA],
+  ["B086",0xCEDB],
+  ["B087",0xCEDC],
+  ["B088",0xCEDD],
+  ["B089",0xCEDE],
+  ["B08A",0xCEDF],
+  ["B08B",0xCEE0],
+  ["B08C",0xCEE1],
+  ["B08D",0xCEE2],
+  ["B08E",0xCEE3],
+  ["B08F",0xCEE6],
+  ["B090",0xCEE7],
+  ["B091",0xCEE9],
+  ["B092",0xCEEA],
+  ["B093",0xCEED],
+  ["B094",0xCEEE],
+  ["B095",0xCEEF],
+  ["B096",0xCEF0],
+  ["B097",0xCEF1],
+  ["B098",0xCEF2],
+  ["B099",0xCEF3],
+  ["B09A",0xCEF6],
+  ["B09B",0xCEFA],
+  ["B09C",0xCEFB],
+  ["B09D",0xCEFC],
+  ["B09E",0xCEFD],
+  ["B09F",0xCEFE],
+  ["B0A0",0xCEFF],
+  ["B141",0xCF02],
+  ["B142",0xCF03],
+  ["B143",0xCF05],
+  ["B144",0xCF06],
+  ["B145",0xCF07],
+  ["B146",0xCF09],
+  ["B147",0xCF0A],
+  ["B148",0xCF0B],
+  ["B149",0xCF0C],
+  ["B14A",0xCF0D],
+  ["B14B",0xCF0E],
+  ["B14C",0xCF0F],
+  ["B14D",0xCF12],
+  ["B14E",0xCF14],
+  ["B14F",0xCF16],
+  ["B150",0xCF17],
+  ["B151",0xCF18],
+  ["B152",0xCF19],
+  ["B153",0xCF1A],
+  ["B154",0xCF1B],
+  ["B155",0xCF1D],
+  ["B156",0xCF1E],
+  ["B157",0xCF1F],
+  ["B158",0xCF21],
+  ["B159",0xCF22],
+  ["B15A",0xCF23],
+  ["B161",0xCF25],
+  ["B162",0xCF26],
+  ["B163",0xCF27],
+  ["B164",0xCF28],
+  ["B165",0xCF29],
+  ["B166",0xCF2A],
+  ["B167",0xCF2B],
+  ["B168",0xCF2E],
+  ["B169",0xCF32],
+  ["B16A",0xCF33],
+  ["B16B",0xCF34],
+  ["B16C",0xCF35],
+  ["B16D",0xCF36],
+  ["B16E",0xCF37],
+  ["B16F",0xCF39],
+  ["B170",0xCF3A],
+  ["B171",0xCF3B],
+  ["B172",0xCF3C],
+  ["B173",0xCF3D],
+  ["B174",0xCF3E],
+  ["B175",0xCF3F],
+  ["B176",0xCF40],
+  ["B177",0xCF41],
+  ["B178",0xCF42],
+  ["B179",0xCF43],
+  ["B17A",0xCF44],
+  ["B181",0xCF45],
+  ["B182",0xCF46],
+  ["B183",0xCF47],
+  ["B184",0xCF48],
+  ["B185",0xCF49],
+  ["B186",0xCF4A],
+  ["B187",0xCF4B],
+  ["B188",0xCF4C],
+  ["B189",0xCF4D],
+  ["B18A",0xCF4E],
+  ["B18B",0xCF4F],
+  ["B18C",0xCF50],
+  ["B18D",0xCF51],
+  ["B18E",0xCF52],
+  ["B18F",0xCF53],
+  ["B190",0xCF56],
+  ["B191",0xCF57],
+  ["B192",0xCF59],
+  ["B193",0xCF5A],
+  ["B194",0xCF5B],
+  ["B195",0xCF5D],
+  ["B196",0xCF5E],
+  ["B197",0xCF5F],
+  ["B198",0xCF60],
+  ["B199",0xCF61],
+  ["B19A",0xCF62],
+  ["B19B",0xCF63],
+  ["B19C",0xCF66],
+  ["B19D",0xCF68],
+  ["B19E",0xCF6A],
+  ["B19F",0xCF6B],
+  ["B1A0",0xCF6C],
+  ["B241",0xCF6D],
+  ["B242",0xCF6E],
+  ["B243",0xCF6F],
+  ["B244",0xCF72],
+  ["B245",0xCF73],
+  ["B246",0xCF75],
+  ["B247",0xCF76],
+  ["B248",0xCF77],
+  ["B249",0xCF79],
+  ["B24A",0xCF7A],
+  ["B24B",0xCF7B],
+  ["B24C",0xCF7C],
+  ["B24D",0xCF7D],
+  ["B24E",0xCF7E],
+  ["B24F",0xCF7F],
+  ["B250",0xCF81],
+  ["B251",0xCF82],
+  ["B252",0xCF83],
+  ["B253",0xCF84],
+  ["B254",0xCF86],
+  ["B255",0xCF87],
+  ["B256",0xCF88],
+  ["B257",0xCF89],
+  ["B258",0xCF8A],
+  ["B259",0xCF8B],
+  ["B25A",0xCF8D],
+  ["B261",0xCF8E],
+  ["B262",0xCF8F],
+  ["B263",0xCF90],
+  ["B264",0xCF91],
+  ["B265",0xCF92],
+  ["B266",0xCF93],
+  ["B267",0xCF94],
+  ["B268",0xCF95],
+  ["B269",0xCF96],
+  ["B26A",0xCF97],
+  ["B26B",0xCF98],
+  ["B26C",0xCF99],
+  ["B26D",0xCF9A],
+  ["B26E",0xCF9B],
+  ["B26F",0xCF9C],
+  ["B270",0xCF9D],
+  ["B271",0xCF9E],
+  ["B272",0xCF9F],
+  ["B273",0xCFA0],
+  ["B274",0xCFA2],
+  ["B275",0xCFA3],
+  ["B276",0xCFA4],
+  ["B277",0xCFA5],
+  ["B278",0xCFA6],
+  ["B279",0xCFA7],
+  ["B27A",0xCFA9],
+  ["B281",0xCFAA],
+  ["B282",0xCFAB],
+  ["B283",0xCFAC],
+  ["B284",0xCFAD],
+  ["B285",0xCFAE],
+  ["B286",0xCFAF],
+  ["B287",0xCFB1],
+  ["B288",0xCFB2],
+  ["B289",0xCFB3],
+  ["B28A",0xCFB4],
+  ["B28B",0xCFB5],
+  ["B28C",0xCFB6],
+  ["B28D",0xCFB7],
+  ["B28E",0xCFB8],
+  ["B28F",0xCFB9],
+  ["B290",0xCFBA],
+  ["B291",0xCFBB],
+  ["B292",0xCFBC],
+  ["B293",0xCFBD],
+  ["B294",0xCFBE],
+  ["B295",0xCFBF],
+  ["B296",0xCFC0],
+  ["B297",0xCFC1],
+  ["B298",0xCFC2],
+  ["B299",0xCFC3],
+  ["B29A",0xCFC5],
+  ["B29B",0xCFC6],
+  ["B29C",0xCFC7],
+  ["B29D",0xCFC8],
+  ["B29E",0xCFC9],
+  ["B29F",0xCFCA],
+  ["B2A0",0xCFCB],
+  ["B341",0xCFCC],
+  ["B342",0xCFCD],
+  ["B343",0xCFCE],
+  ["B344",0xCFCF],
+  ["B345",0xCFD0],
+  ["B346",0xCFD1],
+  ["B347",0xCFD2],
+  ["B348",0xCFD3],
+  ["B349",0xCFD4],
+  ["B34A",0xCFD5],
+  ["B34B",0xCFD6],
+  ["B34C",0xCFD7],
+  ["B34D",0xCFD8],
+  ["B34E",0xCFD9],
+  ["B34F",0xCFDA],
+  ["B350",0xCFDB],
+  ["B351",0xCFDC],
+  ["B352",0xCFDD],
+  ["B353",0xCFDE],
+  ["B354",0xCFDF],
+  ["B355",0xCFE2],
+  ["B356",0xCFE3],
+  ["B357",0xCFE5],
+  ["B358",0xCFE6],
+  ["B359",0xCFE7],
+  ["B35A",0xCFE9],
+  ["B361",0xCFEA],
+  ["B362",0xCFEB],
+  ["B363",0xCFEC],
+  ["B364",0xCFED],
+  ["B365",0xCFEE],
+  ["B366",0xCFEF],
+  ["B367",0xCFF2],
+  ["B368",0xCFF4],
+  ["B369",0xCFF6],
+  ["B36A",0xCFF7],
+  ["B36B",0xCFF8],
+  ["B36C",0xCFF9],
+  ["B36D",0xCFFA],
+  ["B36E",0xCFFB],
+  ["B36F",0xCFFD],
+  ["B370",0xCFFE],
+  ["B371",0xCFFF],
+  ["B372",0xD001],
+  ["B373",0xD002],
+  ["B374",0xD003],
+  ["B375",0xD005],
+  ["B376",0xD006],
+  ["B377",0xD007],
+  ["B378",0xD008],
+  ["B379",0xD009],
+  ["B37A",0xD00A],
+  ["B381",0xD00B],
+  ["B382",0xD00C],
+  ["B383",0xD00D],
+  ["B384",0xD00E],
+  ["B385",0xD00F],
+  ["B386",0xD010],
+  ["B387",0xD012],
+  ["B388",0xD013],
+  ["B389",0xD014],
+  ["B38A",0xD015],
+  ["B38B",0xD016],
+  ["B38C",0xD017],
+  ["B38D",0xD019],
+  ["B38E",0xD01A],
+  ["B38F",0xD01B],
+  ["B390",0xD01C],
+  ["B391",0xD01D],
+  ["B392",0xD01E],
+  ["B393",0xD01F],
+  ["B394",0xD020],
+  ["B395",0xD021],
+  ["B396",0xD022],
+  ["B397",0xD023],
+  ["B398",0xD024],
+  ["B399",0xD025],
+  ["B39A",0xD026],
+  ["B39B",0xD027],
+  ["B39C",0xD028],
+  ["B39D",0xD029],
+  ["B39E",0xD02A],
+  ["B39F",0xD02B],
+  ["B3A0",0xD02C],
+  ["B441",0xD02E],
+  ["B442",0xD02F],
+  ["B443",0xD030],
+  ["B444",0xD031],
+  ["B445",0xD032],
+  ["B446",0xD033],
+  ["B447",0xD036],
+  ["B448",0xD037],
+  ["B449",0xD039],
+  ["B44A",0xD03A],
+  ["B44B",0xD03B],
+  ["B44C",0xD03D],
+  ["B44D",0xD03E],
+  ["B44E",0xD03F],
+  ["B44F",0xD040],
+  ["B450",0xD041],
+  ["B451",0xD042],
+  ["B452",0xD043],
+  ["B453",0xD046],
+  ["B454",0xD048],
+  ["B455",0xD04A],
+  ["B456",0xD04B],
+  ["B457",0xD04C],
+  ["B458",0xD04D],
+  ["B459",0xD04E],
+  ["B45A",0xD04F],
+  ["B461",0xD051],
+  ["B462",0xD052],
+  ["B463",0xD053],
+  ["B464",0xD055],
+  ["B465",0xD056],
+  ["B466",0xD057],
+  ["B467",0xD059],
+  ["B468",0xD05A],
+  ["B469",0xD05B],
+  ["B46A",0xD05C],
+  ["B46B",0xD05D],
+  ["B46C",0xD05E],
+  ["B46D",0xD05F],
+  ["B46E",0xD061],
+  ["B46F",0xD062],
+  ["B470",0xD063],
+  ["B471",0xD064],
+  ["B472",0xD065],
+  ["B473",0xD066],
+  ["B474",0xD067],
+  ["B475",0xD068],
+  ["B476",0xD069],
+  ["B477",0xD06A],
+  ["B478",0xD06B],
+  ["B479",0xD06E],
+  ["B47A",0xD06F],
+  ["B481",0xD071],
+  ["B482",0xD072],
+  ["B483",0xD073],
+  ["B484",0xD075],
+  ["B485",0xD076],
+  ["B486",0xD077],
+  ["B487",0xD078],
+  ["B488",0xD079],
+  ["B489",0xD07A],
+  ["B48A",0xD07B],
+  ["B48B",0xD07E],
+  ["B48C",0xD07F],
+  ["B48D",0xD080],
+  ["B48E",0xD082],
+  ["B48F",0xD083],
+  ["B490",0xD084],
+  ["B491",0xD085],
+  ["B492",0xD086],
+  ["B493",0xD087],
+  ["B494",0xD088],
+  ["B495",0xD089],
+  ["B496",0xD08A],
+  ["B497",0xD08B],
+  ["B498",0xD08C],
+  ["B499",0xD08D],
+  ["B49A",0xD08E],
+  ["B49B",0xD08F],
+  ["B49C",0xD090],
+  ["B49D",0xD091],
+  ["B49E",0xD092],
+  ["B49F",0xD093],
+  ["B4A0",0xD094],
+  ["B541",0xD095],
+  ["B542",0xD096],
+  ["B543",0xD097],
+  ["B544",0xD098],
+  ["B545",0xD099],
+  ["B546",0xD09A],
+  ["B547",0xD09B],
+  ["B548",0xD09C],
+  ["B549",0xD09D],
+  ["B54A",0xD09E],
+  ["B54B",0xD09F],
+  ["B54C",0xD0A0],
+  ["B54D",0xD0A1],
+  ["B54E",0xD0A2],
+  ["B54F",0xD0A3],
+  ["B550",0xD0A6],
+  ["B551",0xD0A7],
+  ["B552",0xD0A9],
+  ["B553",0xD0AA],
+  ["B554",0xD0AB],
+  ["B555",0xD0AD],
+  ["B556",0xD0AE],
+  ["B557",0xD0AF],
+  ["B558",0xD0B0],
+  ["B559",0xD0B1],
+  ["B55A",0xD0B2],
+  ["B561",0xD0B3],
+  ["B562",0xD0B6],
+  ["B563",0xD0B8],
+  ["B564",0xD0BA],
+  ["B565",0xD0BB],
+  ["B566",0xD0BC],
+  ["B567",0xD0BD],
+  ["B568",0xD0BE],
+  ["B569",0xD0BF],
+  ["B56A",0xD0C2],
+  ["B56B",0xD0C3],
+  ["B56C",0xD0C5],
+  ["B56D",0xD0C6],
+  ["B56E",0xD0C7],
+  ["B56F",0xD0CA],
+  ["B570",0xD0CB],
+  ["B571",0xD0CC],
+  ["B572",0xD0CD],
+  ["B573",0xD0CE],
+  ["B574",0xD0CF],
+  ["B575",0xD0D2],
+  ["B576",0xD0D6],
+  ["B577",0xD0D7],
+  ["B578",0xD0D8],
+  ["B579",0xD0D9],
+  ["B57A",0xD0DA],
+  ["B581",0xD0DB],
+  ["B582",0xD0DE],
+  ["B583",0xD0DF],
+  ["B584",0xD0E1],
+  ["B585",0xD0E2],
+  ["B586",0xD0E3],
+  ["B587",0xD0E5],
+  ["B588",0xD0E6],
+  ["B589",0xD0E7],
+  ["B58A",0xD0E8],
+  ["B58B",0xD0E9],
+  ["B58C",0xD0EA],
+  ["B58D",0xD0EB],
+  ["B58E",0xD0EE],
+  ["B58F",0xD0F2],
+  ["B590",0xD0F3],
+  ["B591",0xD0F4],
+  ["B592",0xD0F5],
+  ["B593",0xD0F6],
+  ["B594",0xD0F7],
+  ["B595",0xD0F9],
+  ["B596",0xD0FA],
+  ["B597",0xD0FB],
+  ["B598",0xD0FC],
+  ["B599",0xD0FD],
+  ["B59A",0xD0FE],
+  ["B59B",0xD0FF],
+  ["B59C",0xD100],
+  ["B59D",0xD101],
+  ["B59E",0xD102],
+  ["B59F",0xD103],
+  ["B5A0",0xD104],
+  ["B641",0xD105],
+  ["B642",0xD106],
+  ["B643",0xD107],
+  ["B644",0xD108],
+  ["B645",0xD109],
+  ["B646",0xD10A],
+  ["B647",0xD10B],
+  ["B648",0xD10C],
+  ["B649",0xD10E],
+  ["B64A",0xD10F],
+  ["B64B",0xD110],
+  ["B64C",0xD111],
+  ["B64D",0xD112],
+  ["B64E",0xD113],
+  ["B64F",0xD114],
+  ["B650",0xD115],
+  ["B651",0xD116],
+  ["B652",0xD117],
+  ["B653",0xD118],
+  ["B654",0xD119],
+  ["B655",0xD11A],
+  ["B656",0xD11B],
+  ["B657",0xD11C],
+  ["B658",0xD11D],
+  ["B659",0xD11E],
+  ["B65A",0xD11F],
+  ["B661",0xD120],
+  ["B662",0xD121],
+  ["B663",0xD122],
+  ["B664",0xD123],
+  ["B665",0xD124],
+  ["B666",0xD125],
+  ["B667",0xD126],
+  ["B668",0xD127],
+  ["B669",0xD128],
+  ["B66A",0xD129],
+  ["B66B",0xD12A],
+  ["B66C",0xD12B],
+  ["B66D",0xD12C],
+  ["B66E",0xD12D],
+  ["B66F",0xD12E],
+  ["B670",0xD12F],
+  ["B671",0xD132],
+  ["B672",0xD133],
+  ["B673",0xD135],
+  ["B674",0xD136],
+  ["B675",0xD137],
+  ["B676",0xD139],
+  ["B677",0xD13B],
+  ["B678",0xD13C],
+  ["B679",0xD13D],
+  ["B67A",0xD13E],
+  ["B681",0xD13F],
+  ["B682",0xD142],
+  ["B683",0xD146],
+  ["B684",0xD147],
+  ["B685",0xD148],
+  ["B686",0xD149],
+  ["B687",0xD14A],
+  ["B688",0xD14B],
+  ["B689",0xD14E],
+  ["B68A",0xD14F],
+  ["B68B",0xD151],
+  ["B68C",0xD152],
+  ["B68D",0xD153],
+  ["B68E",0xD155],
+  ["B68F",0xD156],
+  ["B690",0xD157],
+  ["B691",0xD158],
+  ["B692",0xD159],
+  ["B693",0xD15A],
+  ["B694",0xD15B],
+  ["B695",0xD15E],
+  ["B696",0xD160],
+  ["B697",0xD162],
+  ["B698",0xD163],
+  ["B699",0xD164],
+  ["B69A",0xD165],
+  ["B69B",0xD166],
+  ["B69C",0xD167],
+  ["B69D",0xD169],
+  ["B69E",0xD16A],
+  ["B69F",0xD16B],
+  ["B6A0",0xD16D],
+  ["B741",0xD16E],
+  ["B742",0xD16F],
+  ["B743",0xD170],
+  ["B744",0xD171],
+  ["B745",0xD172],
+  ["B746",0xD173],
+  ["B747",0xD174],
+  ["B748",0xD175],
+  ["B749",0xD176],
+  ["B74A",0xD177],
+  ["B74B",0xD178],
+  ["B74C",0xD179],
+  ["B74D",0xD17A],
+  ["B74E",0xD17B],
+  ["B74F",0xD17D],
+  ["B750",0xD17E],
+  ["B751",0xD17F],
+  ["B752",0xD180],
+  ["B753",0xD181],
+  ["B754",0xD182],
+  ["B755",0xD183],
+  ["B756",0xD185],
+  ["B757",0xD186],
+  ["B758",0xD187],
+  ["B759",0xD189],
+  ["B75A",0xD18A],
+  ["B761",0xD18B],
+  ["B762",0xD18C],
+  ["B763",0xD18D],
+  ["B764",0xD18E],
+  ["B765",0xD18F],
+  ["B766",0xD190],
+  ["B767",0xD191],
+  ["B768",0xD192],
+  ["B769",0xD193],
+  ["B76A",0xD194],
+  ["B76B",0xD195],
+  ["B76C",0xD196],
+  ["B76D",0xD197],
+  ["B76E",0xD198],
+  ["B76F",0xD199],
+  ["B770",0xD19A],
+  ["B771",0xD19B],
+  ["B772",0xD19C],
+  ["B773",0xD19D],
+  ["B774",0xD19E],
+  ["B775",0xD19F],
+  ["B776",0xD1A2],
+  ["B777",0xD1A3],
+  ["B778",0xD1A5],
+  ["B779",0xD1A6],
+  ["B77A",0xD1A7],
+  ["B781",0xD1A9],
+  ["B782",0xD1AA],
+  ["B783",0xD1AB],
+  ["B784",0xD1AC],
+  ["B785",0xD1AD],
+  ["B786",0xD1AE],
+  ["B787",0xD1AF],
+  ["B788",0xD1B2],
+  ["B789",0xD1B4],
+  ["B78A",0xD1B6],
+  ["B78B",0xD1B7],
+  ["B78C",0xD1B8],
+  ["B78D",0xD1B9],
+  ["B78E",0xD1BB],
+  ["B78F",0xD1BD],
+  ["B790",0xD1BE],
+  ["B791",0xD1BF],
+  ["B792",0xD1C1],
+  ["B793",0xD1C2],
+  ["B794",0xD1C3],
+  ["B795",0xD1C4],
+  ["B796",0xD1C5],
+  ["B797",0xD1C6],
+  ["B798",0xD1C7],
+  ["B799",0xD1C8],
+  ["B79A",0xD1C9],
+  ["B79B",0xD1CA],
+  ["B79C",0xD1CB],
+  ["B79D",0xD1CC],
+  ["B79E",0xD1CD],
+  ["B79F",0xD1CE],
+  ["B7A0",0xD1CF],
+  ["B841",0xD1D0],
+  ["B842",0xD1D1],
+  ["B843",0xD1D2],
+  ["B844",0xD1D3],
+  ["B845",0xD1D4],
+  ["B846",0xD1D5],
+  ["B847",0xD1D6],
+  ["B848",0xD1D7],
+  ["B849",0xD1D9],
+  ["B84A",0xD1DA],
+  ["B84B",0xD1DB],
+  ["B84C",0xD1DC],
+  ["B84D",0xD1DD],
+  ["B84E",0xD1DE],
+  ["B84F",0xD1DF],
+  ["B850",0xD1E0],
+  ["B851",0xD1E1],
+  ["B852",0xD1E2],
+  ["B853",0xD1E3],
+  ["B854",0xD1E4],
+  ["B855",0xD1E5],
+  ["B856",0xD1E6],
+  ["B857",0xD1E7],
+  ["B858",0xD1E8],
+  ["B859",0xD1E9],
+  ["B85A",0xD1EA],
+  ["B861",0xD1EB],
+  ["B862",0xD1EC],
+  ["B863",0xD1ED],
+  ["B864",0xD1EE],
+  ["B865",0xD1EF],
+  ["B866",0xD1F0],
+  ["B867",0xD1F1],
+  ["B868",0xD1F2],
+  ["B869",0xD1F3],
+  ["B86A",0xD1F5],
+  ["B86B",0xD1F6],
+  ["B86C",0xD1F7],
+  ["B86D",0xD1F9],
+  ["B86E",0xD1FA],
+  ["B86F",0xD1FB],
+  ["B870",0xD1FC],
+  ["B871",0xD1FD],
+  ["B872",0xD1FE],
+  ["B873",0xD1FF],
+  ["B874",0xD200],
+  ["B875",0xD201],
+  ["B876",0xD202],
+  ["B877",0xD203],
+  ["B878",0xD204],
+  ["B879",0xD205],
+  ["B87A",0xD206],
+  ["B881",0xD208],
+  ["B882",0xD20A],
+  ["B883",0xD20B],
+  ["B884",0xD20C],
+  ["B885",0xD20D],
+  ["B886",0xD20E],
+  ["B887",0xD20F],
+  ["B888",0xD211],
+  ["B889",0xD212],
+  ["B88A",0xD213],
+  ["B88B",0xD214],
+  ["B88C",0xD215],
+  ["B88D",0xD216],
+  ["B88E",0xD217],
+  ["B88F",0xD218],
+  ["B890",0xD219],
+  ["B891",0xD21A],
+  ["B892",0xD21B],
+  ["B893",0xD21C],
+  ["B894",0xD21D],
+  ["B895",0xD21E],
+  ["B896",0xD21F],
+  ["B897",0xD220],
+  ["B898",0xD221],
+  ["B899",0xD222],
+  ["B89A",0xD223],
+  ["B89B",0xD224],
+  ["B89C",0xD225],
+  ["B89D",0xD226],
+  ["B89E",0xD227],
+  ["B89F",0xD228],
+  ["B8A0",0xD229],
+  ["B941",0xD22A],
+  ["B942",0xD22B],
+  ["B943",0xD22E],
+  ["B944",0xD22F],
+  ["B945",0xD231],
+  ["B946",0xD232],
+  ["B947",0xD233],
+  ["B948",0xD235],
+  ["B949",0xD236],
+  ["B94A",0xD237],
+  ["B94B",0xD238],
+  ["B94C",0xD239],
+  ["B94D",0xD23A],
+  ["B94E",0xD23B],
+  ["B94F",0xD23E],
+  ["B950",0xD240],
+  ["B951",0xD242],
+  ["B952",0xD243],
+  ["B953",0xD244],
+  ["B954",0xD245],
+  ["B955",0xD246],
+  ["B956",0xD247],
+  ["B957",0xD249],
+  ["B958",0xD24A],
+  ["B959",0xD24B],
+  ["B95A",0xD24C],
+  ["B961",0xD24D],
+  ["B962",0xD24E],
+  ["B963",0xD24F],
+  ["B964",0xD250],
+  ["B965",0xD251],
+  ["B966",0xD252],
+  ["B967",0xD253],
+  ["B968",0xD254],
+  ["B969",0xD255],
+  ["B96A",0xD256],
+  ["B96B",0xD257],
+  ["B96C",0xD258],
+  ["B96D",0xD259],
+  ["B96E",0xD25A],
+  ["B96F",0xD25B],
+  ["B970",0xD25D],
+  ["B971",0xD25E],
+  ["B972",0xD25F],
+  ["B973",0xD260],
+  ["B974",0xD261],
+  ["B975",0xD262],
+  ["B976",0xD263],
+  ["B977",0xD265],
+  ["B978",0xD266],
+  ["B979",0xD267],
+  ["B97A",0xD268],
+  ["B981",0xD269],
+  ["B982",0xD26A],
+  ["B983",0xD26B],
+  ["B984",0xD26C],
+  ["B985",0xD26D],
+  ["B986",0xD26E],
+  ["B987",0xD26F],
+  ["B988",0xD270],
+  ["B989",0xD271],
+  ["B98A",0xD272],
+  ["B98B",0xD273],
+  ["B98C",0xD274],
+  ["B98D",0xD275],
+  ["B98E",0xD276],
+  ["B98F",0xD277],
+  ["B990",0xD278],
+  ["B991",0xD279],
+  ["B992",0xD27A],
+  ["B993",0xD27B],
+  ["B994",0xD27C],
+  ["B995",0xD27D],
+  ["B996",0xD27E],
+  ["B997",0xD27F],
+  ["B998",0xD282],
+  ["B999",0xD283],
+  ["B99A",0xD285],
+  ["B99B",0xD286],
+  ["B99C",0xD287],
+  ["B99D",0xD289],
+  ["B99E",0xD28A],
+  ["B99F",0xD28B],
+  ["B9A0",0xD28C],
+  ["BA41",0xD28D],
+  ["BA42",0xD28E],
+  ["BA43",0xD28F],
+  ["BA44",0xD292],
+  ["BA45",0xD293],
+  ["BA46",0xD294],
+  ["BA47",0xD296],
+  ["BA48",0xD297],
+  ["BA49",0xD298],
+  ["BA4A",0xD299],
+  ["BA4B",0xD29A],
+  ["BA4C",0xD29B],
+  ["BA4D",0xD29D],
+  ["BA4E",0xD29E],
+  ["BA4F",0xD29F],
+  ["BA50",0xD2A1],
+  ["BA51",0xD2A2],
+  ["BA52",0xD2A3],
+  ["BA53",0xD2A5],
+  ["BA54",0xD2A6],
+  ["BA55",0xD2A7],
+  ["BA56",0xD2A8],
+  ["BA57",0xD2A9],
+  ["BA58",0xD2AA],
+  ["BA59",0xD2AB],
+  ["BA5A",0xD2AD],
+  ["BA61",0xD2AE],
+  ["BA62",0xD2AF],
+  ["BA63",0xD2B0],
+  ["BA64",0xD2B2],
+  ["BA65",0xD2B3],
+  ["BA66",0xD2B4],
+  ["BA67",0xD2B5],
+  ["BA68",0xD2B6],
+  ["BA69",0xD2B7],
+  ["BA6A",0xD2BA],
+  ["BA6B",0xD2BB],
+  ["BA6C",0xD2BD],
+  ["BA6D",0xD2BE],
+  ["BA6E",0xD2C1],
+  ["BA6F",0xD2C3],
+  ["BA70",0xD2C4],
+  ["BA71",0xD2C5],
+  ["BA72",0xD2C6],
+  ["BA73",0xD2C7],
+  ["BA74",0xD2CA],
+  ["BA75",0xD2CC],
+  ["BA76",0xD2CD],
+  ["BA77",0xD2CE],
+  ["BA78",0xD2CF],
+  ["BA79",0xD2D0],
+  ["BA7A",0xD2D1],
+  ["BA81",0xD2D2],
+  ["BA82",0xD2D3],
+  ["BA83",0xD2D5],
+  ["BA84",0xD2D6],
+  ["BA85",0xD2D7],
+  ["BA86",0xD2D9],
+  ["BA87",0xD2DA],
+  ["BA88",0xD2DB],
+  ["BA89",0xD2DD],
+  ["BA8A",0xD2DE],
+  ["BA8B",0xD2DF],
+  ["BA8C",0xD2E0],
+  ["BA8D",0xD2E1],
+  ["BA8E",0xD2E2],
+  ["BA8F",0xD2E3],
+  ["BA90",0xD2E6],
+  ["BA91",0xD2E7],
+  ["BA92",0xD2E8],
+  ["BA93",0xD2E9],
+  ["BA94",0xD2EA],
+  ["BA95",0xD2EB],
+  ["BA96",0xD2EC],
+  ["BA97",0xD2ED],
+  ["BA98",0xD2EE],
+  ["BA99",0xD2EF],
+  ["BA9A",0xD2F2],
+  ["BA9B",0xD2F3],
+  ["BA9C",0xD2F5],
+  ["BA9D",0xD2F6],
+  ["BA9E",0xD2F7],
+  ["BA9F",0xD2F9],
+  ["BAA0",0xD2FA],
+  ["BB41",0xD2FB],
+  ["BB42",0xD2FC],
+  ["BB43",0xD2FD],
+  ["BB44",0xD2FE],
+  ["BB45",0xD2FF],
+  ["BB46",0xD302],
+  ["BB47",0xD304],
+  ["BB48",0xD306],
+  ["BB49",0xD307],
+  ["BB4A",0xD308],
+  ["BB4B",0xD309],
+  ["BB4C",0xD30A],
+  ["BB4D",0xD30B],
+  ["BB4E",0xD30F],
+  ["BB4F",0xD311],
+  ["BB50",0xD312],
+  ["BB51",0xD313],
+  ["BB52",0xD315],
+  ["BB53",0xD317],
+  ["BB54",0xD318],
+  ["BB55",0xD319],
+  ["BB56",0xD31A],
+  ["BB57",0xD31B],
+  ["BB58",0xD31E],
+  ["BB59",0xD322],
+  ["BB5A",0xD323],
+  ["BB61",0xD324],
+  ["BB62",0xD326],
+  ["BB63",0xD327],
+  ["BB64",0xD32A],
+  ["BB65",0xD32B],
+  ["BB66",0xD32D],
+  ["BB67",0xD32E],
+  ["BB68",0xD32F],
+  ["BB69",0xD331],
+  ["BB6A",0xD332],
+  ["BB6B",0xD333],
+  ["BB6C",0xD334],
+  ["BB6D",0xD335],
+  ["BB6E",0xD336],
+  ["BB6F",0xD337],
+  ["BB70",0xD33A],
+  ["BB71",0xD33E],
+  ["BB72",0xD33F],
+  ["BB73",0xD340],
+  ["BB74",0xD341],
+  ["BB75",0xD342],
+  ["BB76",0xD343],
+  ["BB77",0xD346],
+  ["BB78",0xD347],
+  ["BB79",0xD348],
+  ["BB7A",0xD349],
+  ["BB81",0xD34A],
+  ["BB82",0xD34B],
+  ["BB83",0xD34C],
+  ["BB84",0xD34D],
+  ["BB85",0xD34E],
+  ["BB86",0xD34F],
+  ["BB87",0xD350],
+  ["BB88",0xD351],
+  ["BB89",0xD352],
+  ["BB8A",0xD353],
+  ["BB8B",0xD354],
+  ["BB8C",0xD355],
+  ["BB8D",0xD356],
+  ["BB8E",0xD357],
+  ["BB8F",0xD358],
+  ["BB90",0xD359],
+  ["BB91",0xD35A],
+  ["BB92",0xD35B],
+  ["BB93",0xD35C],
+  ["BB94",0xD35D],
+  ["BB95",0xD35E],
+  ["BB96",0xD35F],
+  ["BB97",0xD360],
+  ["BB98",0xD361],
+  ["BB99",0xD362],
+  ["BB9A",0xD363],
+  ["BB9B",0xD364],
+  ["BB9C",0xD365],
+  ["BB9D",0xD366],
+  ["BB9E",0xD367],
+  ["BB9F",0xD368],
+  ["BBA0",0xD369],
+  ["BC41",0xD36A],
+  ["BC42",0xD36B],
+  ["BC43",0xD36C],
+  ["BC44",0xD36D],
+  ["BC45",0xD36E],
+  ["BC46",0xD36F],
+  ["BC47",0xD370],
+  ["BC48",0xD371],
+  ["BC49",0xD372],
+  ["BC4A",0xD373],
+  ["BC4B",0xD374],
+  ["BC4C",0xD375],
+  ["BC4D",0xD376],
+  ["BC4E",0xD377],
+  ["BC4F",0xD378],
+  ["BC50",0xD379],
+  ["BC51",0xD37A],
+  ["BC52",0xD37B],
+  ["BC53",0xD37E],
+  ["BC54",0xD37F],
+  ["BC55",0xD381],
+  ["BC56",0xD382],
+  ["BC57",0xD383],
+  ["BC58",0xD385],
+  ["BC59",0xD386],
+  ["BC5A",0xD387],
+  ["BC61",0xD388],
+  ["BC62",0xD389],
+  ["BC63",0xD38A],
+  ["BC64",0xD38B],
+  ["BC65",0xD38E],
+  ["BC66",0xD392],
+  ["BC67",0xD393],
+  ["BC68",0xD394],
+  ["BC69",0xD395],
+  ["BC6A",0xD396],
+  ["BC6B",0xD397],
+  ["BC6C",0xD39A],
+  ["BC6D",0xD39B],
+  ["BC6E",0xD39D],
+  ["BC6F",0xD39E],
+  ["BC70",0xD39F],
+  ["BC71",0xD3A1],
+  ["BC72",0xD3A2],
+  ["BC73",0xD3A3],
+  ["BC74",0xD3A4],
+  ["BC75",0xD3A5],
+  ["BC76",0xD3A6],
+  ["BC77",0xD3A7],
+  ["BC78",0xD3AA],
+  ["BC79",0xD3AC],
+  ["BC7A",0xD3AE],
+  ["BC81",0xD3AF],
+  ["BC82",0xD3B0],
+  ["BC83",0xD3B1],
+  ["BC84",0xD3B2],
+  ["BC85",0xD3B3],
+  ["BC86",0xD3B5],
+  ["BC87",0xD3B6],
+  ["BC88",0xD3B7],
+  ["BC89",0xD3B9],
+  ["BC8A",0xD3BA],
+  ["BC8B",0xD3BB],
+  ["BC8C",0xD3BD],
+  ["BC8D",0xD3BE],
+  ["BC8E",0xD3BF],
+  ["BC8F",0xD3C0],
+  ["BC90",0xD3C1],
+  ["BC91",0xD3C2],
+  ["BC92",0xD3C3],
+  ["BC93",0xD3C6],
+  ["BC94",0xD3C7],
+  ["BC95",0xD3CA],
+  ["BC96",0xD3CB],
+  ["BC97",0xD3CC],
+  ["BC98",0xD3CD],
+  ["BC99",0xD3CE],
+  ["BC9A",0xD3CF],
+  ["BC9B",0xD3D1],
+  ["BC9C",0xD3D2],
+  ["BC9D",0xD3D3],
+  ["BC9E",0xD3D4],
+  ["BC9F",0xD3D5],
+  ["BCA0",0xD3D6],
+  ["BD41",0xD3D7],
+  ["BD42",0xD3D9],
+  ["BD43",0xD3DA],
+  ["BD44",0xD3DB],
+  ["BD45",0xD3DC],
+  ["BD46",0xD3DD],
+  ["BD47",0xD3DE],
+  ["BD48",0xD3DF],
+  ["BD49",0xD3E0],
+  ["BD4A",0xD3E2],
+  ["BD4B",0xD3E4],
+  ["BD4C",0xD3E5],
+  ["BD4D",0xD3E6],
+  ["BD4E",0xD3E7],
+  ["BD4F",0xD3E8],
+  ["BD50",0xD3E9],
+  ["BD51",0xD3EA],
+  ["BD52",0xD3EB],
+  ["BD53",0xD3EE],
+  ["BD54",0xD3EF],
+  ["BD55",0xD3F1],
+  ["BD56",0xD3F2],
+  ["BD57",0xD3F3],
+  ["BD58",0xD3F5],
+  ["BD59",0xD3F6],
+  ["BD5A",0xD3F7],
+  ["BD61",0xD3F8],
+  ["BD62",0xD3F9],
+  ["BD63",0xD3FA],
+  ["BD64",0xD3FB],
+  ["BD65",0xD3FE],
+  ["BD66",0xD400],
+  ["BD67",0xD402],
+  ["BD68",0xD403],
+  ["BD69",0xD404],
+  ["BD6A",0xD405],
+  ["BD6B",0xD406],
+  ["BD6C",0xD407],
+  ["BD6D",0xD409],
+  ["BD6E",0xD40A],
+  ["BD6F",0xD40B],
+  ["BD70",0xD40C],
+  ["BD71",0xD40D],
+  ["BD72",0xD40E],
+  ["BD73",0xD40F],
+  ["BD74",0xD410],
+  ["BD75",0xD411],
+  ["BD76",0xD412],
+  ["BD77",0xD413],
+  ["BD78",0xD414],
+  ["BD79",0xD415],
+  ["BD7A",0xD416],
+  ["BD81",0xD417],
+  ["BD82",0xD418],
+  ["BD83",0xD419],
+  ["BD84",0xD41A],
+  ["BD85",0xD41B],
+  ["BD86",0xD41C],
+  ["BD87",0xD41E],
+  ["BD88",0xD41F],
+  ["BD89",0xD420],
+  ["BD8A",0xD421],
+  ["BD8B",0xD422],
+  ["BD8C",0xD423],
+  ["BD8D",0xD424],
+  ["BD8E",0xD425],
+  ["BD8F",0xD426],
+  ["BD90",0xD427],
+  ["BD91",0xD428],
+  ["BD92",0xD429],
+  ["BD93",0xD42A],
+  ["BD94",0xD42B],
+  ["BD95",0xD42C],
+  ["BD96",0xD42D],
+  ["BD97",0xD42E],
+  ["BD98",0xD42F],
+  ["BD99",0xD430],
+  ["BD9A",0xD431],
+  ["BD9B",0xD432],
+  ["BD9C",0xD433],
+  ["BD9D",0xD434],
+  ["BD9E",0xD435],
+  ["BD9F",0xD436],
+  ["BDA0",0xD437],
+  ["BE41",0xD438],
+  ["BE42",0xD439],
+  ["BE43",0xD43A],
+  ["BE44",0xD43B],
+  ["BE45",0xD43C],
+  ["BE46",0xD43D],
+  ["BE47",0xD43E],
+  ["BE48",0xD43F],
+  ["BE49",0xD441],
+  ["BE4A",0xD442],
+  ["BE4B",0xD443],
+  ["BE4C",0xD445],
+  ["BE4D",0xD446],
+  ["BE4E",0xD447],
+  ["BE4F",0xD448],
+  ["BE50",0xD449],
+  ["BE51",0xD44A],
+  ["BE52",0xD44B],
+  ["BE53",0xD44C],
+  ["BE54",0xD44D],
+  ["BE55",0xD44E],
+  ["BE56",0xD44F],
+  ["BE57",0xD450],
+  ["BE58",0xD451],
+  ["BE59",0xD452],
+  ["BE5A",0xD453],
+  ["BE61",0xD454],
+  ["BE62",0xD455],
+  ["BE63",0xD456],
+  ["BE64",0xD457],
+  ["BE65",0xD458],
+  ["BE66",0xD459],
+  ["BE67",0xD45A],
+  ["BE68",0xD45B],
+  ["BE69",0xD45D],
+  ["BE6A",0xD45E],
+  ["BE6B",0xD45F],
+  ["BE6C",0xD461],
+  ["BE6D",0xD462],
+  ["BE6E",0xD463],
+  ["BE6F",0xD465],
+  ["BE70",0xD466],
+  ["BE71",0xD467],
+  ["BE72",0xD468],
+  ["BE73",0xD469],
+  ["BE74",0xD46A],
+  ["BE75",0xD46B],
+  ["BE76",0xD46C],
+  ["BE77",0xD46E],
+  ["BE78",0xD470],
+  ["BE79",0xD471],
+  ["BE7A",0xD472],
+  ["BE81",0xD473],
+  ["BE82",0xD474],
+  ["BE83",0xD475],
+  ["BE84",0xD476],
+  ["BE85",0xD477],
+  ["BE86",0xD47A],
+  ["BE87",0xD47B],
+  ["BE88",0xD47D],
+  ["BE89",0xD47E],
+  ["BE8A",0xD481],
+  ["BE8B",0xD483],
+  ["BE8C",0xD484],
+  ["BE8D",0xD485],
+  ["BE8E",0xD486],
+  ["BE8F",0xD487],
+  ["BE90",0xD48A],
+  ["BE91",0xD48C],
+  ["BE92",0xD48E],
+  ["BE93",0xD48F],
+  ["BE94",0xD490],
+  ["BE95",0xD491],
+  ["BE96",0xD492],
+  ["BE97",0xD493],
+  ["BE98",0xD495],
+  ["BE99",0xD496],
+  ["BE9A",0xD497],
+  ["BE9B",0xD498],
+  ["BE9C",0xD499],
+  ["BE9D",0xD49A],
+  ["BE9E",0xD49B],
+  ["BE9F",0xD49C],
+  ["BEA0",0xD49D],
+  ["BF41",0xD49E],
+  ["BF42",0xD49F],
+  ["BF43",0xD4A0],
+  ["BF44",0xD4A1],
+  ["BF45",0xD4A2],
+  ["BF46",0xD4A3],
+  ["BF47",0xD4A4],
+  ["BF48",0xD4A5],
+  ["BF49",0xD4A6],
+  ["BF4A",0xD4A7],
+  ["BF4B",0xD4A8],
+  ["BF4C",0xD4AA],
+  ["BF4D",0xD4AB],
+  ["BF4E",0xD4AC],
+  ["BF4F",0xD4AD],
+  ["BF50",0xD4AE],
+  ["BF51",0xD4AF],
+  ["BF52",0xD4B0],
+  ["BF53",0xD4B1],
+  ["BF54",0xD4B2],
+  ["BF55",0xD4B3],
+  ["BF56",0xD4B4],
+  ["BF57",0xD4B5],
+  ["BF58",0xD4B6],
+  ["BF59",0xD4B7],
+  ["BF5A",0xD4B8],
+  ["BF61",0xD4B9],
+  ["BF62",0xD4BA],
+  ["BF63",0xD4BB],
+  ["BF64",0xD4BC],
+  ["BF65",0xD4BD],
+  ["BF66",0xD4BE],
+  ["BF67",0xD4BF],
+  ["BF68",0xD4C0],
+  ["BF69",0xD4C1],
+  ["BF6A",0xD4C2],
+  ["BF6B",0xD4C3],
+  ["BF6C",0xD4C4],
+  ["BF6D",0xD4C5],
+  ["BF6E",0xD4C6],
+  ["BF6F",0xD4C7],
+  ["BF70",0xD4C8],
+  ["BF71",0xD4C9],
+  ["BF72",0xD4CA],
+  ["BF73",0xD4CB],
+  ["BF74",0xD4CD],
+  ["BF75",0xD4CE],
+  ["BF76",0xD4CF],
+  ["BF77",0xD4D1],
+  ["BF78",0xD4D2],
+  ["BF79",0xD4D3],
+  ["BF7A",0xD4D5],
+  ["BF81",0xD4D6],
+  ["BF82",0xD4D7],
+  ["BF83",0xD4D8],
+  ["BF84",0xD4D9],
+  ["BF85",0xD4DA],
+  ["BF86",0xD4DB],
+  ["BF87",0xD4DD],
+  ["BF88",0xD4DE],
+  ["BF89",0xD4E0],
+  ["BF8A",0xD4E1],
+  ["BF8B",0xD4E2],
+  ["BF8C",0xD4E3],
+  ["BF8D",0xD4E4],
+  ["BF8E",0xD4E5],
+  ["BF8F",0xD4E6],
+  ["BF90",0xD4E7],
+  ["BF91",0xD4E9],
+  ["BF92",0xD4EA],
+  ["BF93",0xD4EB],
+  ["BF94",0xD4ED],
+  ["BF95",0xD4EE],
+  ["BF96",0xD4EF],
+  ["BF97",0xD4F1],
+  ["BF98",0xD4F2],
+  ["BF99",0xD4F3],
+  ["BF9A",0xD4F4],
+  ["BF9B",0xD4F5],
+  ["BF9C",0xD4F6],
+  ["BF9D",0xD4F7],
+  ["BF9E",0xD4F9],
+  ["BF9F",0xD4FA],
+  ["BFA0",0xD4FC],
+  ["C041",0xD4FE],
+  ["C042",0xD4FF],
+  ["C043",0xD500],
+  ["C044",0xD501],
+  ["C045",0xD502],
+  ["C046",0xD503],
+  ["C047",0xD505],
+  ["C048",0xD506],
+  ["C049",0xD507],
+  ["C04A",0xD509],
+  ["C04B",0xD50A],
+  ["C04C",0xD50B],
+  ["C04D",0xD50D],
+  ["C04E",0xD50E],
+  ["C04F",0xD50F],
+  ["C050",0xD510],
+  ["C051",0xD511],
+  ["C052",0xD512],
+  ["C053",0xD513],
+  ["C054",0xD516],
+  ["C055",0xD518],
+  ["C056",0xD519],
+  ["C057",0xD51A],
+  ["C058",0xD51B],
+  ["C059",0xD51C],
+  ["C05A",0xD51D],
+  ["C061",0xD51E],
+  ["C062",0xD51F],
+  ["C063",0xD520],
+  ["C064",0xD521],
+  ["C065",0xD522],
+  ["C066",0xD523],
+  ["C067",0xD524],
+  ["C068",0xD525],
+  ["C069",0xD526],
+  ["C06A",0xD527],
+  ["C06B",0xD528],
+  ["C06C",0xD529],
+  ["C06D",0xD52A],
+  ["C06E",0xD52B],
+  ["C06F",0xD52C],
+  ["C070",0xD52D],
+  ["C071",0xD52E],
+  ["C072",0xD52F],
+  ["C073",0xD530],
+  ["C074",0xD531],
+  ["C075",0xD532],
+  ["C076",0xD533],
+  ["C077",0xD534],
+  ["C078",0xD535],
+  ["C079",0xD536],
+  ["C07A",0xD537],
+  ["C081",0xD538],
+  ["C082",0xD539],
+  ["C083",0xD53A],
+  ["C084",0xD53B],
+  ["C085",0xD53E],
+  ["C086",0xD53F],
+  ["C087",0xD541],
+  ["C088",0xD542],
+  ["C089",0xD543],
+  ["C08A",0xD545],
+  ["C08B",0xD546],
+  ["C08C",0xD547],
+  ["C08D",0xD548],
+  ["C08E",0xD549],
+  ["C08F",0xD54A],
+  ["C090",0xD54B],
+  ["C091",0xD54E],
+  ["C092",0xD550],
+  ["C093",0xD552],
+  ["C094",0xD553],
+  ["C095",0xD554],
+  ["C096",0xD555],
+  ["C097",0xD556],
+  ["C098",0xD557],
+  ["C099",0xD55A],
+  ["C09A",0xD55B],
+  ["C09B",0xD55D],
+  ["C09C",0xD55E],
+  ["C09D",0xD55F],
+  ["C09E",0xD561],
+  ["C09F",0xD562],
+  ["C0A0",0xD563],
+  ["C141",0xD564],
+  ["C142",0xD566],
+  ["C143",0xD567],
+  ["C144",0xD56A],
+  ["C145",0xD56C],
+  ["C146",0xD56E],
+  ["C147",0xD56F],
+  ["C148",0xD570],
+  ["C149",0xD571],
+  ["C14A",0xD572],
+  ["C14B",0xD573],
+  ["C14C",0xD576],
+  ["C14D",0xD577],
+  ["C14E",0xD579],
+  ["C14F",0xD57A],
+  ["C150",0xD57B],
+  ["C151",0xD57D],
+  ["C152",0xD57E],
+  ["C153",0xD57F],
+  ["C154",0xD580],
+  ["C155",0xD581],
+  ["C156",0xD582],
+  ["C157",0xD583],
+  ["C158",0xD586],
+  ["C159",0xD58A],
+  ["C15A",0xD58B],
+  ["C161",0xD58C],
+  ["C162",0xD58D],
+  ["C163",0xD58E],
+  ["C164",0xD58F],
+  ["C165",0xD591],
+  ["C166",0xD592],
+  ["C167",0xD593],
+  ["C168",0xD594],
+  ["C169",0xD595],
+  ["C16A",0xD596],
+  ["C16B",0xD597],
+  ["C16C",0xD598],
+  ["C16D",0xD599],
+  ["C16E",0xD59A],
+  ["C16F",0xD59B],
+  ["C170",0xD59C],
+  ["C171",0xD59D],
+  ["C172",0xD59E],
+  ["C173",0xD59F],
+  ["C174",0xD5A0],
+  ["C175",0xD5A1],
+  ["C176",0xD5A2],
+  ["C177",0xD5A3],
+  ["C178",0xD5A4],
+  ["C179",0xD5A6],
+  ["C17A",0xD5A7],
+  ["C181",0xD5A8],
+  ["C182",0xD5A9],
+  ["C183",0xD5AA],
+  ["C184",0xD5AB],
+  ["C185",0xD5AC],
+  ["C186",0xD5AD],
+  ["C187",0xD5AE],
+  ["C188",0xD5AF],
+  ["C189",0xD5B0],
+  ["C18A",0xD5B1],
+  ["C18B",0xD5B2],
+  ["C18C",0xD5B3],
+  ["C18D",0xD5B4],
+  ["C18E",0xD5B5],
+  ["C18F",0xD5B6],
+  ["C190",0xD5B7],
+  ["C191",0xD5B8],
+  ["C192",0xD5B9],
+  ["C193",0xD5BA],
+  ["C194",0xD5BB],
+  ["C195",0xD5BC],
+  ["C196",0xD5BD],
+  ["C197",0xD5BE],
+  ["C198",0xD5BF],
+  ["C199",0xD5C0],
+  ["C19A",0xD5C1],
+  ["C19B",0xD5C2],
+  ["C19C",0xD5C3],
+  ["C19D",0xD5C4],
+  ["C19E",0xD5C5],
+  ["C19F",0xD5C6],
+  ["C1A0",0xD5C7],
+  ["C241",0xD5CA],
+  ["C242",0xD5CB],
+  ["C243",0xD5CD],
+  ["C244",0xD5CE],
+  ["C245",0xD5CF],
+  ["C246",0xD5D1],
+  ["C247",0xD5D3],
+  ["C248",0xD5D4],
+  ["C249",0xD5D5],
+  ["C24A",0xD5D6],
+  ["C24B",0xD5D7],
+  ["C24C",0xD5DA],
+  ["C24D",0xD5DC],
+  ["C24E",0xD5DE],
+  ["C24F",0xD5DF],
+  ["C250",0xD5E0],
+  ["C251",0xD5E1],
+  ["C252",0xD5E2],
+  ["C253",0xD5E3],
+  ["C254",0xD5E6],
+  ["C255",0xD5E7],
+  ["C256",0xD5E9],
+  ["C257",0xD5EA],
+  ["C258",0xD5EB],
+  ["C259",0xD5ED],
+  ["C25A",0xD5EE],
+  ["C261",0xD5EF],
+  ["C262",0xD5F0],
+  ["C263",0xD5F1],
+  ["C264",0xD5F2],
+  ["C265",0xD5F3],
+  ["C266",0xD5F6],
+  ["C267",0xD5F8],
+  ["C268",0xD5FA],
+  ["C269",0xD5FB],
+  ["C26A",0xD5FC],
+  ["C26B",0xD5FD],
+  ["C26C",0xD5FE],
+  ["C26D",0xD5FF],
+  ["C26E",0xD602],
+  ["C26F",0xD603],
+  ["C270",0xD605],
+  ["C271",0xD606],
+  ["C272",0xD607],
+  ["C273",0xD609],
+  ["C274",0xD60A],
+  ["C275",0xD60B],
+  ["C276",0xD60C],
+  ["C277",0xD60D],
+  ["C278",0xD60E],
+  ["C279",0xD60F],
+  ["C27A",0xD612],
+  ["C281",0xD616],
+  ["C282",0xD617],
+  ["C283",0xD618],
+  ["C284",0xD619],
+  ["C285",0xD61A],
+  ["C286",0xD61B],
+  ["C287",0xD61D],
+  ["C288",0xD61E],
+  ["C289",0xD61F],
+  ["C28A",0xD621],
+  ["C28B",0xD622],
+  ["C28C",0xD623],
+  ["C28D",0xD625],
+  ["C28E",0xD626],
+  ["C28F",0xD627],
+  ["C290",0xD628],
+  ["C291",0xD629],
+  ["C292",0xD62A],
+  ["C293",0xD62B],
+  ["C294",0xD62C],
+  ["C295",0xD62E],
+  ["C296",0xD62F],
+  ["C297",0xD630],
+  ["C298",0xD631],
+  ["C299",0xD632],
+  ["C29A",0xD633],
+  ["C29B",0xD634],
+  ["C29C",0xD635],
+  ["C29D",0xD636],
+  ["C29E",0xD637],
+  ["C29F",0xD63A],
+  ["C2A0",0xD63B],
+  ["C341",0xD63D],
+  ["C342",0xD63E],
+  ["C343",0xD63F],
+  ["C344",0xD641],
+  ["C345",0xD642],
+  ["C346",0xD643],
+  ["C347",0xD644],
+  ["C348",0xD646],
+  ["C349",0xD647],
+  ["C34A",0xD64A],
+  ["C34B",0xD64C],
+  ["C34C",0xD64E],
+  ["C34D",0xD64F],
+  ["C34E",0xD650],
+  ["C34F",0xD652],
+  ["C350",0xD653],
+  ["C351",0xD656],
+  ["C352",0xD657],
+  ["C353",0xD659],
+  ["C354",0xD65A],
+  ["C355",0xD65B],
+  ["C356",0xD65D],
+  ["C357",0xD65E],
+  ["C358",0xD65F],
+  ["C359",0xD660],
+  ["C35A",0xD661],
+  ["C361",0xD662],
+  ["C362",0xD663],
+  ["C363",0xD664],
+  ["C364",0xD665],
+  ["C365",0xD666],
+  ["C366",0xD668],
+  ["C367",0xD66A],
+  ["C368",0xD66B],
+  ["C369",0xD66C],
+  ["C36A",0xD66D],
+  ["C36B",0xD66E],
+  ["C36C",0xD66F],
+  ["C36D",0xD672],
+  ["C36E",0xD673],
+  ["C36F",0xD675],
+  ["C370",0xD676],
+  ["C371",0xD677],
+  ["C372",0xD678],
+  ["C373",0xD679],
+  ["C374",0xD67A],
+  ["C375",0xD67B],
+  ["C376",0xD67C],
+  ["C377",0xD67D],
+  ["C378",0xD67E],
+  ["C379",0xD67F],
+  ["C37A",0xD680],
+  ["C381",0xD681],
+  ["C382",0xD682],
+  ["C383",0xD684],
+  ["C384",0xD686],
+  ["C385",0xD687],
+  ["C386",0xD688],
+  ["C387",0xD689],
+  ["C388",0xD68A],
+  ["C389",0xD68B],
+  ["C38A",0xD68E],
+  ["C38B",0xD68F],
+  ["C38C",0xD691],
+  ["C38D",0xD692],
+  ["C38E",0xD693],
+  ["C38F",0xD695],
+  ["C390",0xD696],
+  ["C391",0xD697],
+  ["C392",0xD698],
+  ["C393",0xD699],
+  ["C394",0xD69A],
+  ["C395",0xD69B],
+  ["C396",0xD69C],
+  ["C397",0xD69E],
+  ["C398",0xD6A0],
+  ["C399",0xD6A2],
+  ["C39A",0xD6A3],
+  ["C39B",0xD6A4],
+  ["C39C",0xD6A5],
+  ["C39D",0xD6A6],
+  ["C39E",0xD6A7],
+  ["C39F",0xD6A9],
+  ["C3A0",0xD6AA],
+  ["C441",0xD6AB],
+  ["C442",0xD6AD],
+  ["C443",0xD6AE],
+  ["C444",0xD6AF],
+  ["C445",0xD6B1],
+  ["C446",0xD6B2],
+  ["C447",0xD6B3],
+  ["C448",0xD6B4],
+  ["C449",0xD6B5],
+  ["C44A",0xD6B6],
+  ["C44B",0xD6B7],
+  ["C44C",0xD6B8],
+  ["C44D",0xD6BA],
+  ["C44E",0xD6BC],
+  ["C44F",0xD6BD],
+  ["C450",0xD6BE],
+  ["C451",0xD6BF],
+  ["C452",0xD6C0],
+  ["C453",0xD6C1],
+  ["C454",0xD6C2],
+  ["C455",0xD6C3],
+  ["C456",0xD6C6],
+  ["C457",0xD6C7],
+  ["C458",0xD6C9],
+  ["C459",0xD6CA],
+  ["C45A",0xD6CB],
+  ["C461",0xD6CD],
+  ["C462",0xD6CE],
+  ["C463",0xD6CF],
+  ["C464",0xD6D0],
+  ["C465",0xD6D2],
+  ["C466",0xD6D3],
+  ["C467",0xD6D5],
+  ["C468",0xD6D6],
+  ["C469",0xD6D8],
+  ["C46A",0xD6DA],
+  ["C46B",0xD6DB],
+  ["C46C",0xD6DC],
+  ["C46D",0xD6DD],
+  ["C46E",0xD6DE],
+  ["C46F",0xD6DF],
+  ["C470",0xD6E1],
+  ["C471",0xD6E2],
+  ["C472",0xD6E3],
+  ["C473",0xD6E5],
+  ["C474",0xD6E6],
+  ["C475",0xD6E7],
+  ["C476",0xD6E9],
+  ["C477",0xD6EA],
+  ["C478",0xD6EB],
+  ["C479",0xD6EC],
+  ["C47A",0xD6ED],
+  ["C481",0xD6EE],
+  ["C482",0xD6EF],
+  ["C483",0xD6F1],
+  ["C484",0xD6F2],
+  ["C485",0xD6F3],
+  ["C486",0xD6F4],
+  ["C487",0xD6F6],
+  ["C488",0xD6F7],
+  ["C489",0xD6F8],
+  ["C48A",0xD6F9],
+  ["C48B",0xD6FA],
+  ["C48C",0xD6FB],
+  ["C48D",0xD6FE],
+  ["C48E",0xD6FF],
+  ["C48F",0xD701],
+  ["C490",0xD702],
+  ["C491",0xD703],
+  ["C492",0xD705],
+  ["C493",0xD706],
+  ["C494",0xD707],
+  ["C495",0xD708],
+  ["C496",0xD709],
+  ["C497",0xD70A],
+  ["C498",0xD70B],
+  ["C499",0xD70C],
+  ["C49A",0xD70D],
+  ["C49B",0xD70E],
+  ["C49C",0xD70F],
+  ["C49D",0xD710],
+  ["C49E",0xD712],
+  ["C49F",0xD713],
+  ["C4A0",0xD714],
+  ["C541",0xD715],
+  ["C542",0xD716],
+  ["C543",0xD717],
+  ["C544",0xD71A],
+  ["C545",0xD71B],
+  ["C546",0xD71D],
+  ["C547",0xD71E],
+  ["C548",0xD71F],
+  ["C549",0xD721],
+  ["C54A",0xD722],
+  ["C54B",0xD723],
+  ["C54C",0xD724],
+  ["C54D",0xD725],
+  ["C54E",0xD726],
+  ["C54F",0xD727],
+  ["C550",0xD72A],
+  ["C551",0xD72C],
+  ["C552",0xD72E],
+  ["C553",0xD72F],
+  ["C554",0xD730],
+  ["C555",0xD731],
+  ["C556",0xD732],
+  ["C557",0xD733],
+  ["C558",0xD736],
+  ["C559",0xD737],
+  ["C55A",0xD739],
+  ["C561",0xD73A],
+  ["C562",0xD73B],
+  ["C563",0xD73D],
+  ["C564",0xD73E],
+  ["C565",0xD73F],
+  ["C566",0xD740],
+  ["C567",0xD741],
+  ["C568",0xD742],
+  ["C569",0xD743],
+  ["C56A",0xD745],
+  ["C56B",0xD746],
+  ["C56C",0xD748],
+  ["C56D",0xD74A],
+  ["C56E",0xD74B],
+  ["C56F",0xD74C],
+  ["C570",0xD74D],
+  ["C571",0xD74E],
+  ["C572",0xD74F],
+  ["C573",0xD752],
+  ["C574",0xD753],
+  ["C575",0xD755],
+  ["C576",0xD75A],
+  ["C577",0xD75B],
+  ["C578",0xD75C],
+  ["C579",0xD75D],
+  ["C57A",0xD75E],
+  ["C581",0xD75F],
+  ["C582",0xD762],
+  ["C583",0xD764],
+  ["C584",0xD766],
+  ["C585",0xD767],
+  ["C586",0xD768],
+  ["C587",0xD76A],
+  ["C588",0xD76B],
+  ["C589",0xD76D],
+  ["C58A",0xD76E],
+  ["C58B",0xD76F],
+  ["C58C",0xD771],
+  ["C58D",0xD772],
+  ["C58E",0xD773],
+  ["C58F",0xD775],
+  ["C590",0xD776],
+  ["C591",0xD777],
+  ["C592",0xD778],
+  ["C593",0xD779],
+  ["C594",0xD77A],
+  ["C595",0xD77B],
+  ["C596",0xD77E],
+  ["C597",0xD77F],
+  ["C598",0xD780],
+  ["C599",0xD782],
+  ["C59A",0xD783],
+  ["C59B",0xD784],
+  ["C59C",0xD785],
+  ["C59D",0xD786],
+  ["C59E",0xD787],
+  ["C59F",0xD78A],
+  ["C5A0",0xD78B],
+  ["C641",0xD78D],
+  ["C642",0xD78E],
+  ["C643",0xD78F],
+  ["C644",0xD791],
+  ["C645",0xD792],
+  ["C646",0xD793],
+  ["C647",0xD794],
+  ["C648",0xD795],
+  ["C649",0xD796],
+  ["C64A",0xD797],
+  ["C64B",0xD79A],
+  ["C64C",0xD79C],
+  ["C64D",0xD79E],
+  ["C64E",0xD79F],
+  ["C64F",0xD7A0],
+  ["C650",0xD7A1],
+  ["C651",0xD7A2],
+  ["C652",0xD7A3],
+]
+
+CP949_TO_UCS_TBL = EUCKR_TO_UCS_TBL + CP949_TO_UCS_ADDITIONAL_TBL
+UCS_TO_CP949_TBL = CP949_TO_UCS_TBL.map {|a,b| [b,a]}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/escape.c b/lib/ruby-1.9.1-rc1/enc/trans/escape.c
new file mode 100644
index 0000000..675c35e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/escape.c
@@ -0,0 +1,234 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="escape.trans", len=1971, checksum=22479 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+escape_byte_array[1055] = {
+#define from__to_amp_escape_offsets 0
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  1,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define str1_amp makeSTR1(258)
+    makeSTR1LEN(5), 0x26, 0x61, 0x6D, 0x70, 0x3B,
+
+#define from__to_xml_text_escape_offsets 264
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  1,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  2,  0,  3,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define str1_lt makeSTR1(522)
+    makeSTR1LEN(4), 0x26, 0x6C, 0x74, 0x3B,
+
+#define str1_gt makeSTR1(527)
+    makeSTR1LEN(4), 0x26, 0x67, 0x74, 0x3B,
+
+#define from__to_xml_attr_content_escape_offsets 532
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  1,  0,  0,  0,  2,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  3,  0,  4,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define str1_quot makeSTR1(790)
+    makeSTR1LEN(6), 0x26, 0x71, 0x75, 0x6F, 0x74, 0x3B,
+
+#define escape_xml_attr_quote_offsets 797
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+};
+static const unsigned int
+escape_word_array[20] = {
+#define from__to_amp_escape_infos WORDINDEX2INFO(0)
+        NOMAP, str1_amp,
+
+#define from__to_amp_escape WORDINDEX2INFO(2)
+    from__to_amp_escape_offsets,
+    from__to_amp_escape_infos,
+
+#define from__to_xml_text_escape_infos WORDINDEX2INFO(4)
+        NOMAP, str1_amp,  str1_lt,  str1_gt,
+
+#define from__to_xml_text_escape WORDINDEX2INFO(8)
+    from__to_xml_text_escape_offsets,
+    from__to_xml_text_escape_infos,
+
+#define from__to_xml_attr_content_escape_infos WORDINDEX2INFO(10)
+         NOMAP, str1_quot,  str1_amp,   str1_lt,
+       str1_gt,
+
+#define from__to_xml_attr_content_escape WORDINDEX2INFO(15)
+    from__to_xml_attr_content_escape_offsets,
+    from__to_xml_attr_content_escape_infos,
+
+#define escape_xml_attr_quote_infos WORDINDEX2INFO(17)
+     FUNso,
+
+#define escape_xml_attr_quote WORDINDEX2INFO(18)
+    escape_xml_attr_quote_offsets,
+    escape_xml_attr_quote_infos,
+
+};
+#define TRANSCODE_TABLE_INFO escape_byte_array, 1055, escape_word_array, 20, sizeof(unsigned int)
+static const rb_transcoder
+rb_from__to_amp_escape = {
+    "", "amp_escape", from__to_amp_escape,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    5, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from__to_xml_text_escape = {
+    "", "xml_text_escape", from__to_xml_text_escape,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    5, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from__to_xml_attr_content_escape = {
+    "", "xml_attr_content_escape", from__to_xml_attr_content_escape,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    6, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+
+
+#define END 0
+#define NORMAL  1
+
+static int
+escape_xml_attr_quote_init(void *statep)
+{
+    unsigned char *sp = statep;
+    *sp = END;
+    return 0;
+}
+
+static ssize_t
+fun_so_escape_xml_attr_quote(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int n = 0;
+    if (*sp == END) {
+        *sp = NORMAL;
+        o[n++] = '"';
+    }
+    o[n++] = s[0];
+    return n;
+}
+
+static ssize_t
+escape_xml_attr_quote_finish(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int n = 0;
+
+    if (*sp == END) {
+        o[n++] = '"';
+    }
+
+    o[n++] = '"';
+    *sp = END;
+
+    return n;
+}
+
+static const rb_transcoder
+rb_escape_xml_attr_quote = {
+    "", "xml_attr_quote", escape_xml_attr_quote,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    7, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    1, escape_xml_attr_quote_init, escape_xml_attr_quote_init,
+    NULL, NULL, NULL, fun_so_escape_xml_attr_quote,
+    escape_xml_attr_quote_finish
+};
+
+void
+Init_escape(void)
+{
+    rb_register_transcoder(&rb_from__to_amp_escape);
+    rb_register_transcoder(&rb_from__to_xml_text_escape);
+    rb_register_transcoder(&rb_from__to_xml_attr_content_escape);
+
+    rb_register_transcoder(&rb_escape_xml_attr_quote);
+}
+
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/escape.trans b/lib/ruby-1.9.1-rc1/enc/trans/escape.trans
new file mode 100644
index 0000000..f45f27b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/escape.trans
@@ -0,0 +1,94 @@
+#include "transcode_data.h"
+
+<%
+  def hexstr(str)
+    str.unpack("H*")[0]
+  end
+
+  transcode_tblgen("", "amp_escape", [
+    ["{00-25,27-FF}", :nomap], 
+    ["26", hexstr("&")]
+  ])
+
+  transcode_tblgen("", "xml_text_escape", [
+    ["{00-25,27-3B,3D,3F-FF}", :nomap], 
+    ["26", hexstr("&")],
+    ["3C", hexstr("<")],
+    ["3E", hexstr(">")]
+  ])
+
+  transcode_tblgen("", "xml_attr_content_escape", [
+    ["{00-21,23-25,27-3B,3D,3F-FF}", :nomap], 
+    ["22", hexstr(""")],
+    ["26", hexstr("&")],
+    ["3C", hexstr("<")],
+    ["3E", hexstr(">")]
+  ])
+
+  map_xml_attr_quote = {}
+  map_xml_attr_quote["{00-FF}"] = :func_so
+  transcode_generate_node(ActionMap.parse(map_xml_attr_quote), "escape_xml_attr_quote")
+%>
+
+<%= transcode_generated_code %>
+
+#define END 0
+#define NORMAL  1
+
+static int
+escape_xml_attr_quote_init(void *statep)
+{
+    unsigned char *sp = statep;
+    *sp = END;
+    return 0;
+}
+
+static ssize_t
+fun_so_escape_xml_attr_quote(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int n = 0;
+    if (*sp == END) {
+        *sp = NORMAL;
+        o[n++] = '"';
+    }
+    o[n++] = s[0];
+    return n;
+}
+
+static ssize_t
+escape_xml_attr_quote_finish(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int n = 0;
+
+    if (*sp == END) {
+        o[n++] = '"';
+    }
+
+    o[n++] = '"';
+    *sp = END;
+
+    return n;
+}
+
+static const rb_transcoder
+rb_escape_xml_attr_quote = {
+    "", "xml_attr_quote", escape_xml_attr_quote,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    7, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    1, escape_xml_attr_quote_init, escape_xml_attr_quote_init,
+    NULL, NULL, NULL, fun_so_escape_xml_attr_quote,
+    escape_xml_attr_quote_finish
+};
+
+void
+Init_escape(void)
+{
+<%= transcode_register_code %>
+    rb_register_transcoder(&rb_escape_xml_attr_quote);
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/euckr-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/euckr-tbl.rb
new file mode 100644
index 0000000..773cd90
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/euckr-tbl.rb
@@ -0,0 +1,8228 @@
+EUCKR_TO_UCS_TBL = [
+  ["A1A1",0x3000],
+  ["A1A2",0x3001],
+  ["A1A3",0x3002],
+  ["A1A4",0xB7],
+  ["A1A5",0x2025],
+  ["A1A6",0x2026],
+  ["A1A7",0xA8],
+  ["A1A8",0x3003],
+  ["A1A9",0xAD],
+  ["A1AA",0x2015],
+  ["A1AB",0x2225],
+  ["A1AC",0xFF3C],
+  ["A1AD",0x223C],
+  ["A1AE",0x2018],
+  ["A1AF",0x2019],
+  ["A1B0",0x201C],
+  ["A1B1",0x201D],
+  ["A1B2",0x3014],
+  ["A1B3",0x3015],
+  ["A1B4",0x3008],
+  ["A1B5",0x3009],
+  ["A1B6",0x300A],
+  ["A1B7",0x300B],
+  ["A1B8",0x300C],
+  ["A1B9",0x300D],
+  ["A1BA",0x300E],
+  ["A1BB",0x300F],
+  ["A1BC",0x3010],
+  ["A1BD",0x3011],
+  ["A1BE",0xB1],
+  ["A1BF",0xD7],
+  ["A1C0",0xF7],
+  ["A1C1",0x2260],
+  ["A1C2",0x2264],
+  ["A1C3",0x2265],
+  ["A1C4",0x221E],
+  ["A1C5",0x2234],
+  ["A1C6",0xB0],
+  ["A1C7",0x2032],
+  ["A1C8",0x2033],
+  ["A1C9",0x2103],
+  ["A1CA",0x212B],
+  ["A1CB",0xFFE0],
+  ["A1CC",0xFFE1],
+  ["A1CD",0xFFE5],
+  ["A1CE",0x2642],
+  ["A1CF",0x2640],
+  ["A1D0",0x2220],
+  ["A1D1",0x22A5],
+  ["A1D2",0x2312],
+  ["A1D3",0x2202],
+  ["A1D4",0x2207],
+  ["A1D5",0x2261],
+  ["A1D6",0x2252],
+  ["A1D7",0xA7],
+  ["A1D8",0x203B],
+  ["A1D9",0x2606],
+  ["A1DA",0x2605],
+  ["A1DB",0x25CB],
+  ["A1DC",0x25CF],
+  ["A1DD",0x25CE],
+  ["A1DE",0x25C7],
+  ["A1DF",0x25C6],
+  ["A1E0",0x25A1],
+  ["A1E1",0x25A0],
+  ["A1E2",0x25B3],
+  ["A1E3",0x25B2],
+  ["A1E4",0x25BD],
+  ["A1E5",0x25BC],
+  ["A1E6",0x2192],
+  ["A1E7",0x2190],
+  ["A1E8",0x2191],
+  ["A1E9",0x2193],
+  ["A1EA",0x2194],
+  ["A1EB",0x3013],
+  ["A1EC",0x226A],
+  ["A1ED",0x226B],
+  ["A1EE",0x221A],
+  ["A1EF",0x223D],
+  ["A1F0",0x221D],
+  ["A1F1",0x2235],
+  ["A1F2",0x222B],
+  ["A1F3",0x222C],
+  ["A1F4",0x2208],
+  ["A1F5",0x220B],
+  ["A1F6",0x2286],
+  ["A1F7",0x2287],
+  ["A1F8",0x2282],
+  ["A1F9",0x2283],
+  ["A1FA",0x222A],
+  ["A1FB",0x2229],
+  ["A1FC",0x2227],
+  ["A1FD",0x2228],
+  ["A1FE",0xFFE2],
+  ["A2A1",0x21D2],
+  ["A2A2",0x21D4],
+  ["A2A3",0x2200],
+  ["A2A4",0x2203],
+  ["A2A5",0xB4],
+  ["A2A6",0xFF5E],
+  ["A2A7",0x2C7],
+  ["A2A8",0x2D8],
+  ["A2A9",0x2DD],
+  ["A2AA",0x2DA],
+  ["A2AB",0x2D9],
+  ["A2AC",0xB8],
+  ["A2AD",0x2DB],
+  ["A2AE",0xA1],
+  ["A2AF",0xBF],
+  ["A2B0",0x2D0],
+  ["A2B1",0x222E],
+  ["A2B2",0x2211],
+  ["A2B3",0x220F],
+  ["A2B4",0xA4],
+  ["A2B5",0x2109],
+  ["A2B6",0x2030],
+  ["A2B7",0x25C1],
+  ["A2B8",0x25C0],
+  ["A2B9",0x25B7],
+  ["A2BA",0x25B6],
+  ["A2BB",0x2664],
+  ["A2BC",0x2660],
+  ["A2BD",0x2661],
+  ["A2BE",0x2665],
+  ["A2BF",0x2667],
+  ["A2C0",0x2663],
+  ["A2C1",0x2299],
+  ["A2C2",0x25C8],
+  ["A2C3",0x25A3],
+  ["A2C4",0x25D0],
+  ["A2C5",0x25D1],
+  ["A2C6",0x2592],
+  ["A2C7",0x25A4],
+  ["A2C8",0x25A5],
+  ["A2C9",0x25A8],
+  ["A2CA",0x25A7],
+  ["A2CB",0x25A6],
+  ["A2CC",0x25A9],
+  ["A2CD",0x2668],
+  ["A2CE",0x260F],
+  ["A2CF",0x260E],
+  ["A2D0",0x261C],
+  ["A2D1",0x261E],
+  ["A2D2",0xB6],
+  ["A2D3",0x2020],
+  ["A2D4",0x2021],
+  ["A2D5",0x2195],
+  ["A2D6",0x2197],
+  ["A2D7",0x2199],
+  ["A2D8",0x2196],
+  ["A2D9",0x2198],
+  ["A2DA",0x266D],
+  ["A2DB",0x2669],
+  ["A2DC",0x266A],
+  ["A2DD",0x266C],
+  ["A2DE",0x327F],
+  ["A2DF",0x321C],
+  ["A2E0",0x2116],
+  ["A2E1",0x33C7],
+  ["A2E2",0x2122],
+  ["A2E3",0x33C2],
+  ["A2E4",0x33D8],
+  ["A2E5",0x2121],
+  ["A3A1",0xFF01],
+  ["A3A2",0xFF02],
+  ["A3A3",0xFF03],
+  ["A3A4",0xFF04],
+  ["A3A5",0xFF05],
+  ["A3A6",0xFF06],
+  ["A3A7",0xFF07],
+  ["A3A8",0xFF08],
+  ["A3A9",0xFF09],
+  ["A3AA",0xFF0A],
+  ["A3AB",0xFF0B],
+  ["A3AC",0xFF0C],
+  ["A3AD",0xFF0D],
+  ["A3AE",0xFF0E],
+  ["A3AF",0xFF0F],
+  ["A3B0",0xFF10],
+  ["A3B1",0xFF11],
+  ["A3B2",0xFF12],
+  ["A3B3",0xFF13],
+  ["A3B4",0xFF14],
+  ["A3B5",0xFF15],
+  ["A3B6",0xFF16],
+  ["A3B7",0xFF17],
+  ["A3B8",0xFF18],
+  ["A3B9",0xFF19],
+  ["A3BA",0xFF1A],
+  ["A3BB",0xFF1B],
+  ["A3BC",0xFF1C],
+  ["A3BD",0xFF1D],
+  ["A3BE",0xFF1E],
+  ["A3BF",0xFF1F],
+  ["A3C0",0xFF20],
+  ["A3C1",0xFF21],
+  ["A3C2",0xFF22],
+  ["A3C3",0xFF23],
+  ["A3C4",0xFF24],
+  ["A3C5",0xFF25],
+  ["A3C6",0xFF26],
+  ["A3C7",0xFF27],
+  ["A3C8",0xFF28],
+  ["A3C9",0xFF29],
+  ["A3CA",0xFF2A],
+  ["A3CB",0xFF2B],
+  ["A3CC",0xFF2C],
+  ["A3CD",0xFF2D],
+  ["A3CE",0xFF2E],
+  ["A3CF",0xFF2F],
+  ["A3D0",0xFF30],
+  ["A3D1",0xFF31],
+  ["A3D2",0xFF32],
+  ["A3D3",0xFF33],
+  ["A3D4",0xFF34],
+  ["A3D5",0xFF35],
+  ["A3D6",0xFF36],
+  ["A3D7",0xFF37],
+  ["A3D8",0xFF38],
+  ["A3D9",0xFF39],
+  ["A3DA",0xFF3A],
+  ["A3DB",0xFF3B],
+  ["A3DC",0xFFE6],
+  ["A3DD",0xFF3D],
+  ["A3DE",0xFF3E],
+  ["A3DF",0xFF3F],
+  ["A3E0",0xFF40],
+  ["A3E1",0xFF41],
+  ["A3E2",0xFF42],
+  ["A3E3",0xFF43],
+  ["A3E4",0xFF44],
+  ["A3E5",0xFF45],
+  ["A3E6",0xFF46],
+  ["A3E7",0xFF47],
+  ["A3E8",0xFF48],
+  ["A3E9",0xFF49],
+  ["A3EA",0xFF4A],
+  ["A3EB",0xFF4B],
+  ["A3EC",0xFF4C],
+  ["A3ED",0xFF4D],
+  ["A3EE",0xFF4E],
+  ["A3EF",0xFF4F],
+  ["A3F0",0xFF50],
+  ["A3F1",0xFF51],
+  ["A3F2",0xFF52],
+  ["A3F3",0xFF53],
+  ["A3F4",0xFF54],
+  ["A3F5",0xFF55],
+  ["A3F6",0xFF56],
+  ["A3F7",0xFF57],
+  ["A3F8",0xFF58],
+  ["A3F9",0xFF59],
+  ["A3FA",0xFF5A],
+  ["A3FB",0xFF5B],
+  ["A3FC",0xFF5C],
+  ["A3FD",0xFF5D],
+  ["A3FE",0xFFE3],
+  ["A4A1",0x3131],
+  ["A4A2",0x3132],
+  ["A4A3",0x3133],
+  ["A4A4",0x3134],
+  ["A4A5",0x3135],
+  ["A4A6",0x3136],
+  ["A4A7",0x3137],
+  ["A4A8",0x3138],
+  ["A4A9",0x3139],
+  ["A4AA",0x313A],
+  ["A4AB",0x313B],
+  ["A4AC",0x313C],
+  ["A4AD",0x313D],
+  ["A4AE",0x313E],
+  ["A4AF",0x313F],
+  ["A4B0",0x3140],
+  ["A4B1",0x3141],
+  ["A4B2",0x3142],
+  ["A4B3",0x3143],
+  ["A4B4",0x3144],
+  ["A4B5",0x3145],
+  ["A4B6",0x3146],
+  ["A4B7",0x3147],
+  ["A4B8",0x3148],
+  ["A4B9",0x3149],
+  ["A4BA",0x314A],
+  ["A4BB",0x314B],
+  ["A4BC",0x314C],
+  ["A4BD",0x314D],
+  ["A4BE",0x314E],
+  ["A4BF",0x314F],
+  ["A4C0",0x3150],
+  ["A4C1",0x3151],
+  ["A4C2",0x3152],
+  ["A4C3",0x3153],
+  ["A4C4",0x3154],
+  ["A4C5",0x3155],
+  ["A4C6",0x3156],
+  ["A4C7",0x3157],
+  ["A4C8",0x3158],
+  ["A4C9",0x3159],
+  ["A4CA",0x315A],
+  ["A4CB",0x315B],
+  ["A4CC",0x315C],
+  ["A4CD",0x315D],
+  ["A4CE",0x315E],
+  ["A4CF",0x315F],
+  ["A4D0",0x3160],
+  ["A4D1",0x3161],
+  ["A4D2",0x3162],
+  ["A4D3",0x3163],
+  ["A4D4",0x3164],
+  ["A4D5",0x3165],
+  ["A4D6",0x3166],
+  ["A4D7",0x3167],
+  ["A4D8",0x3168],
+  ["A4D9",0x3169],
+  ["A4DA",0x316A],
+  ["A4DB",0x316B],
+  ["A4DC",0x316C],
+  ["A4DD",0x316D],
+  ["A4DE",0x316E],
+  ["A4DF",0x316F],
+  ["A4E0",0x3170],
+  ["A4E1",0x3171],
+  ["A4E2",0x3172],
+  ["A4E3",0x3173],
+  ["A4E4",0x3174],
+  ["A4E5",0x3175],
+  ["A4E6",0x3176],
+  ["A4E7",0x3177],
+  ["A4E8",0x3178],
+  ["A4E9",0x3179],
+  ["A4EA",0x317A],
+  ["A4EB",0x317B],
+  ["A4EC",0x317C],
+  ["A4ED",0x317D],
+  ["A4EE",0x317E],
+  ["A4EF",0x317F],
+  ["A4F0",0x3180],
+  ["A4F1",0x3181],
+  ["A4F2",0x3182],
+  ["A4F3",0x3183],
+  ["A4F4",0x3184],
+  ["A4F5",0x3185],
+  ["A4F6",0x3186],
+  ["A4F7",0x3187],
+  ["A4F8",0x3188],
+  ["A4F9",0x3189],
+  ["A4FA",0x318A],
+  ["A4FB",0x318B],
+  ["A4FC",0x318C],
+  ["A4FD",0x318D],
+  ["A4FE",0x318E],
+  ["A5A1",0x2170],
+  ["A5A2",0x2171],
+  ["A5A3",0x2172],
+  ["A5A4",0x2173],
+  ["A5A5",0x2174],
+  ["A5A6",0x2175],
+  ["A5A7",0x2176],
+  ["A5A8",0x2177],
+  ["A5A9",0x2178],
+  ["A5AA",0x2179],
+  ["A5B0",0x2160],
+  ["A5B1",0x2161],
+  ["A5B2",0x2162],
+  ["A5B3",0x2163],
+  ["A5B4",0x2164],
+  ["A5B5",0x2165],
+  ["A5B6",0x2166],
+  ["A5B7",0x2167],
+  ["A5B8",0x2168],
+  ["A5B9",0x2169],
+  ["A5C1",0x391],
+  ["A5C2",0x392],
+  ["A5C3",0x393],
+  ["A5C4",0x394],
+  ["A5C5",0x395],
+  ["A5C6",0x396],
+  ["A5C7",0x397],
+  ["A5C8",0x398],
+  ["A5C9",0x399],
+  ["A5CA",0x39A],
+  ["A5CB",0x39B],
+  ["A5CC",0x39C],
+  ["A5CD",0x39D],
+  ["A5CE",0x39E],
+  ["A5CF",0x39F],
+  ["A5D0",0x3A0],
+  ["A5D1",0x3A1],
+  ["A5D2",0x3A3],
+  ["A5D3",0x3A4],
+  ["A5D4",0x3A5],
+  ["A5D5",0x3A6],
+  ["A5D6",0x3A7],
+  ["A5D7",0x3A8],
+  ["A5D8",0x3A9],
+  ["A5E1",0x3B1],
+  ["A5E2",0x3B2],
+  ["A5E3",0x3B3],
+  ["A5E4",0x3B4],
+  ["A5E5",0x3B5],
+  ["A5E6",0x3B6],
+  ["A5E7",0x3B7],
+  ["A5E8",0x3B8],
+  ["A5E9",0x3B9],
+  ["A5EA",0x3BA],
+  ["A5EB",0x3BB],
+  ["A5EC",0x3BC],
+  ["A5ED",0x3BD],
+  ["A5EE",0x3BE],
+  ["A5EF",0x3BF],
+  ["A5F0",0x3C0],
+  ["A5F1",0x3C1],
+  ["A5F2",0x3C3],
+  ["A5F3",0x3C4],
+  ["A5F4",0x3C5],
+  ["A5F5",0x3C6],
+  ["A5F6",0x3C7],
+  ["A5F7",0x3C8],
+  ["A5F8",0x3C9],
+  ["A6A1",0x2500],
+  ["A6A2",0x2502],
+  ["A6A3",0x250C],
+  ["A6A4",0x2510],
+  ["A6A5",0x2518],
+  ["A6A6",0x2514],
+  ["A6A7",0x251C],
+  ["A6A8",0x252C],
+  ["A6A9",0x2524],
+  ["A6AA",0x2534],
+  ["A6AB",0x253C],
+  ["A6AC",0x2501],
+  ["A6AD",0x2503],
+  ["A6AE",0x250F],
+  ["A6AF",0x2513],
+  ["A6B0",0x251B],
+  ["A6B1",0x2517],
+  ["A6B2",0x2523],
+  ["A6B3",0x2533],
+  ["A6B4",0x252B],
+  ["A6B5",0x253B],
+  ["A6B6",0x254B],
+  ["A6B7",0x2520],
+  ["A6B8",0x252F],
+  ["A6B9",0x2528],
+  ["A6BA",0x2537],
+  ["A6BB",0x253F],
+  ["A6BC",0x251D],
+  ["A6BD",0x2530],
+  ["A6BE",0x2525],
+  ["A6BF",0x2538],
+  ["A6C0",0x2542],
+  ["A6C1",0x2512],
+  ["A6C2",0x2511],
+  ["A6C3",0x251A],
+  ["A6C4",0x2519],
+  ["A6C5",0x2516],
+  ["A6C6",0x2515],
+  ["A6C7",0x250E],
+  ["A6C8",0x250D],
+  ["A6C9",0x251E],
+  ["A6CA",0x251F],
+  ["A6CB",0x2521],
+  ["A6CC",0x2522],
+  ["A6CD",0x2526],
+  ["A6CE",0x2527],
+  ["A6CF",0x2529],
+  ["A6D0",0x252A],
+  ["A6D1",0x252D],
+  ["A6D2",0x252E],
+  ["A6D3",0x2531],
+  ["A6D4",0x2532],
+  ["A6D5",0x2535],
+  ["A6D6",0x2536],
+  ["A6D7",0x2539],
+  ["A6D8",0x253A],
+  ["A6D9",0x253D],
+  ["A6DA",0x253E],
+  ["A6DB",0x2540],
+  ["A6DC",0x2541],
+  ["A6DD",0x2543],
+  ["A6DE",0x2544],
+  ["A6DF",0x2545],
+  ["A6E0",0x2546],
+  ["A6E1",0x2547],
+  ["A6E2",0x2548],
+  ["A6E3",0x2549],
+  ["A6E4",0x254A],
+  ["A7A1",0x3395],
+  ["A7A2",0x3396],
+  ["A7A3",0x3397],
+  ["A7A4",0x2113],
+  ["A7A5",0x3398],
+  ["A7A6",0x33C4],
+  ["A7A7",0x33A3],
+  ["A7A8",0x33A4],
+  ["A7A9",0x33A5],
+  ["A7AA",0x33A6],
+  ["A7AB",0x3399],
+  ["A7AC",0x339A],
+  ["A7AD",0x339B],
+  ["A7AE",0x339C],
+  ["A7AF",0x339D],
+  ["A7B0",0x339E],
+  ["A7B1",0x339F],
+  ["A7B2",0x33A0],
+  ["A7B3",0x33A1],
+  ["A7B4",0x33A2],
+  ["A7B5",0x33CA],
+  ["A7B6",0x338D],
+  ["A7B7",0x338E],
+  ["A7B8",0x338F],
+  ["A7B9",0x33CF],
+  ["A7BA",0x3388],
+  ["A7BB",0x3389],
+  ["A7BC",0x33C8],
+  ["A7BD",0x33A7],
+  ["A7BE",0x33A8],
+  ["A7BF",0x33B0],
+  ["A7C0",0x33B1],
+  ["A7C1",0x33B2],
+  ["A7C2",0x33B3],
+  ["A7C3",0x33B4],
+  ["A7C4",0x33B5],
+  ["A7C5",0x33B6],
+  ["A7C6",0x33B7],
+  ["A7C7",0x33B8],
+  ["A7C8",0x33B9],
+  ["A7C9",0x3380],
+  ["A7CA",0x3381],
+  ["A7CB",0x3382],
+  ["A7CC",0x3383],
+  ["A7CD",0x3384],
+  ["A7CE",0x33BA],
+  ["A7CF",0x33BB],
+  ["A7D0",0x33BC],
+  ["A7D1",0x33BD],
+  ["A7D2",0x33BE],
+  ["A7D3",0x33BF],
+  ["A7D4",0x3390],
+  ["A7D5",0x3391],
+  ["A7D6",0x3392],
+  ["A7D7",0x3393],
+  ["A7D8",0x3394],
+  ["A7D9",0x2126],
+  ["A7DA",0x33C0],
+  ["A7DB",0x33C1],
+  ["A7DC",0x338A],
+  ["A7DD",0x338B],
+  ["A7DE",0x338C],
+  ["A7DF",0x33D6],
+  ["A7E0",0x33C5],
+  ["A7E1",0x33AD],
+  ["A7E2",0x33AE],
+  ["A7E3",0x33AF],
+  ["A7E4",0x33DB],
+  ["A7E5",0x33A9],
+  ["A7E6",0x33AA],
+  ["A7E7",0x33AB],
+  ["A7E8",0x33AC],
+  ["A7E9",0x33DD],
+  ["A7EA",0x33D0],
+  ["A7EB",0x33D3],
+  ["A7EC",0x33C3],
+  ["A7ED",0x33C9],
+  ["A7EE",0x33DC],
+  ["A7EF",0x33C6],
+  ["A8A1",0xC6],
+  ["A8A2",0xD0],
+  ["A8A3",0xAA],
+  ["A8A4",0x126],
+  ["A8A6",0x132],
+  ["A8A8",0x13F],
+  ["A8A9",0x141],
+  ["A8AA",0xD8],
+  ["A8AB",0x152],
+  ["A8AC",0xBA],
+  ["A8AD",0xDE],
+  ["A8AE",0x166],
+  ["A8AF",0x14A],
+  ["A8B1",0x3260],
+  ["A8B2",0x3261],
+  ["A8B3",0x3262],
+  ["A8B4",0x3263],
+  ["A8B5",0x3264],
+  ["A8B6",0x3265],
+  ["A8B7",0x3266],
+  ["A8B8",0x3267],
+  ["A8B9",0x3268],
+  ["A8BA",0x3269],
+  ["A8BB",0x326A],
+  ["A8BC",0x326B],
+  ["A8BD",0x326C],
+  ["A8BE",0x326D],
+  ["A8BF",0x326E],
+  ["A8C0",0x326F],
+  ["A8C1",0x3270],
+  ["A8C2",0x3271],
+  ["A8C3",0x3272],
+  ["A8C4",0x3273],
+  ["A8C5",0x3274],
+  ["A8C6",0x3275],
+  ["A8C7",0x3276],
+  ["A8C8",0x3277],
+  ["A8C9",0x3278],
+  ["A8CA",0x3279],
+  ["A8CB",0x327A],
+  ["A8CC",0x327B],
+  ["A8CD",0x24D0],
+  ["A8CE",0x24D1],
+  ["A8CF",0x24D2],
+  ["A8D0",0x24D3],
+  ["A8D1",0x24D4],
+  ["A8D2",0x24D5],
+  ["A8D3",0x24D6],
+  ["A8D4",0x24D7],
+  ["A8D5",0x24D8],
+  ["A8D6",0x24D9],
+  ["A8D7",0x24DA],
+  ["A8D8",0x24DB],
+  ["A8D9",0x24DC],
+  ["A8DA",0x24DD],
+  ["A8DB",0x24DE],
+  ["A8DC",0x24DF],
+  ["A8DD",0x24E0],
+  ["A8DE",0x24E1],
+  ["A8DF",0x24E2],
+  ["A8E0",0x24E3],
+  ["A8E1",0x24E4],
+  ["A8E2",0x24E5],
+  ["A8E3",0x24E6],
+  ["A8E4",0x24E7],
+  ["A8E5",0x24E8],
+  ["A8E6",0x24E9],
+  ["A8E7",0x2460],
+  ["A8E8",0x2461],
+  ["A8E9",0x2462],
+  ["A8EA",0x2463],
+  ["A8EB",0x2464],
+  ["A8EC",0x2465],
+  ["A8ED",0x2466],
+  ["A8EE",0x2467],
+  ["A8EF",0x2468],
+  ["A8F0",0x2469],
+  ["A8F1",0x246A],
+  ["A8F2",0x246B],
+  ["A8F3",0x246C],
+  ["A8F4",0x246D],
+  ["A8F5",0x246E],
+  ["A8F6",0xBD],
+  ["A8F7",0x2153],
+  ["A8F8",0x2154],
+  ["A8F9",0xBC],
+  ["A8FA",0xBE],
+  ["A8FB",0x215B],
+  ["A8FC",0x215C],
+  ["A8FD",0x215D],
+  ["A8FE",0x215E],
+  ["A9A1",0xE6],
+  ["A9A2",0x111],
+  ["A9A3",0xF0],
+  ["A9A4",0x127],
+  ["A9A5",0x131],
+  ["A9A6",0x133],
+  ["A9A7",0x138],
+  ["A9A8",0x140],
+  ["A9A9",0x142],
+  ["A9AA",0xF8],
+  ["A9AB",0x153],
+  ["A9AC",0xDF],
+  ["A9AD",0xFE],
+  ["A9AE",0x167],
+  ["A9AF",0x14B],
+  ["A9B0",0x149],
+  ["A9B1",0x3200],
+  ["A9B2",0x3201],
+  ["A9B3",0x3202],
+  ["A9B4",0x3203],
+  ["A9B5",0x3204],
+  ["A9B6",0x3205],
+  ["A9B7",0x3206],
+  ["A9B8",0x3207],
+  ["A9B9",0x3208],
+  ["A9BA",0x3209],
+  ["A9BB",0x320A],
+  ["A9BC",0x320B],
+  ["A9BD",0x320C],
+  ["A9BE",0x320D],
+  ["A9BF",0x320E],
+  ["A9C0",0x320F],
+  ["A9C1",0x3210],
+  ["A9C2",0x3211],
+  ["A9C3",0x3212],
+  ["A9C4",0x3213],
+  ["A9C5",0x3214],
+  ["A9C6",0x3215],
+  ["A9C7",0x3216],
+  ["A9C8",0x3217],
+  ["A9C9",0x3218],
+  ["A9CA",0x3219],
+  ["A9CB",0x321A],
+  ["A9CC",0x321B],
+  ["A9CD",0x249C],
+  ["A9CE",0x249D],
+  ["A9CF",0x249E],
+  ["A9D0",0x249F],
+  ["A9D1",0x24A0],
+  ["A9D2",0x24A1],
+  ["A9D3",0x24A2],
+  ["A9D4",0x24A3],
+  ["A9D5",0x24A4],
+  ["A9D6",0x24A5],
+  ["A9D7",0x24A6],
+  ["A9D8",0x24A7],
+  ["A9D9",0x24A8],
+  ["A9DA",0x24A9],
+  ["A9DB",0x24AA],
+  ["A9DC",0x24AB],
+  ["A9DD",0x24AC],
+  ["A9DE",0x24AD],
+  ["A9DF",0x24AE],
+  ["A9E0",0x24AF],
+  ["A9E1",0x24B0],
+  ["A9E2",0x24B1],
+  ["A9E3",0x24B2],
+  ["A9E4",0x24B3],
+  ["A9E5",0x24B4],
+  ["A9E6",0x24B5],
+  ["A9E7",0x2474],
+  ["A9E8",0x2475],
+  ["A9E9",0x2476],
+  ["A9EA",0x2477],
+  ["A9EB",0x2478],
+  ["A9EC",0x2479],
+  ["A9ED",0x247A],
+  ["A9EE",0x247B],
+  ["A9EF",0x247C],
+  ["A9F0",0x247D],
+  ["A9F1",0x247E],
+  ["A9F2",0x247F],
+  ["A9F3",0x2480],
+  ["A9F4",0x2481],
+  ["A9F5",0x2482],
+  ["A9F6",0xB9],
+  ["A9F7",0xB2],
+  ["A9F8",0xB3],
+  ["A9F9",0x2074],
+  ["A9FA",0x207F],
+  ["A9FB",0x2081],
+  ["A9FC",0x2082],
+  ["A9FD",0x2083],
+  ["A9FE",0x2084],
+  ["AAA1",0x3041],
+  ["AAA2",0x3042],
+  ["AAA3",0x3043],
+  ["AAA4",0x3044],
+  ["AAA5",0x3045],
+  ["AAA6",0x3046],
+  ["AAA7",0x3047],
+  ["AAA8",0x3048],
+  ["AAA9",0x3049],
+  ["AAAA",0x304A],
+  ["AAAB",0x304B],
+  ["AAAC",0x304C],
+  ["AAAD",0x304D],
+  ["AAAE",0x304E],
+  ["AAAF",0x304F],
+  ["AAB0",0x3050],
+  ["AAB1",0x3051],
+  ["AAB2",0x3052],
+  ["AAB3",0x3053],
+  ["AAB4",0x3054],
+  ["AAB5",0x3055],
+  ["AAB6",0x3056],
+  ["AAB7",0x3057],
+  ["AAB8",0x3058],
+  ["AAB9",0x3059],
+  ["AABA",0x305A],
+  ["AABB",0x305B],
+  ["AABC",0x305C],
+  ["AABD",0x305D],
+  ["AABE",0x305E],
+  ["AABF",0x305F],
+  ["AAC0",0x3060],
+  ["AAC1",0x3061],
+  ["AAC2",0x3062],
+  ["AAC3",0x3063],
+  ["AAC4",0x3064],
+  ["AAC5",0x3065],
+  ["AAC6",0x3066],
+  ["AAC7",0x3067],
+  ["AAC8",0x3068],
+  ["AAC9",0x3069],
+  ["AACA",0x306A],
+  ["AACB",0x306B],
+  ["AACC",0x306C],
+  ["AACD",0x306D],
+  ["AACE",0x306E],
+  ["AACF",0x306F],
+  ["AAD0",0x3070],
+  ["AAD1",0x3071],
+  ["AAD2",0x3072],
+  ["AAD3",0x3073],
+  ["AAD4",0x3074],
+  ["AAD5",0x3075],
+  ["AAD6",0x3076],
+  ["AAD7",0x3077],
+  ["AAD8",0x3078],
+  ["AAD9",0x3079],
+  ["AADA",0x307A],
+  ["AADB",0x307B],
+  ["AADC",0x307C],
+  ["AADD",0x307D],
+  ["AADE",0x307E],
+  ["AADF",0x307F],
+  ["AAE0",0x3080],
+  ["AAE1",0x3081],
+  ["AAE2",0x3082],
+  ["AAE3",0x3083],
+  ["AAE4",0x3084],
+  ["AAE5",0x3085],
+  ["AAE6",0x3086],
+  ["AAE7",0x3087],
+  ["AAE8",0x3088],
+  ["AAE9",0x3089],
+  ["AAEA",0x308A],
+  ["AAEB",0x308B],
+  ["AAEC",0x308C],
+  ["AAED",0x308D],
+  ["AAEE",0x308E],
+  ["AAEF",0x308F],
+  ["AAF0",0x3090],
+  ["AAF1",0x3091],
+  ["AAF2",0x3092],
+  ["AAF3",0x3093],
+  ["ABA1",0x30A1],
+  ["ABA2",0x30A2],
+  ["ABA3",0x30A3],
+  ["ABA4",0x30A4],
+  ["ABA5",0x30A5],
+  ["ABA6",0x30A6],
+  ["ABA7",0x30A7],
+  ["ABA8",0x30A8],
+  ["ABA9",0x30A9],
+  ["ABAA",0x30AA],
+  ["ABAB",0x30AB],
+  ["ABAC",0x30AC],
+  ["ABAD",0x30AD],
+  ["ABAE",0x30AE],
+  ["ABAF",0x30AF],
+  ["ABB0",0x30B0],
+  ["ABB1",0x30B1],
+  ["ABB2",0x30B2],
+  ["ABB3",0x30B3],
+  ["ABB4",0x30B4],
+  ["ABB5",0x30B5],
+  ["ABB6",0x30B6],
+  ["ABB7",0x30B7],
+  ["ABB8",0x30B8],
+  ["ABB9",0x30B9],
+  ["ABBA",0x30BA],
+  ["ABBB",0x30BB],
+  ["ABBC",0x30BC],
+  ["ABBD",0x30BD],
+  ["ABBE",0x30BE],
+  ["ABBF",0x30BF],
+  ["ABC0",0x30C0],
+  ["ABC1",0x30C1],
+  ["ABC2",0x30C2],
+  ["ABC3",0x30C3],
+  ["ABC4",0x30C4],
+  ["ABC5",0x30C5],
+  ["ABC6",0x30C6],
+  ["ABC7",0x30C7],
+  ["ABC8",0x30C8],
+  ["ABC9",0x30C9],
+  ["ABCA",0x30CA],
+  ["ABCB",0x30CB],
+  ["ABCC",0x30CC],
+  ["ABCD",0x30CD],
+  ["ABCE",0x30CE],
+  ["ABCF",0x30CF],
+  ["ABD0",0x30D0],
+  ["ABD1",0x30D1],
+  ["ABD2",0x30D2],
+  ["ABD3",0x30D3],
+  ["ABD4",0x30D4],
+  ["ABD5",0x30D5],
+  ["ABD6",0x30D6],
+  ["ABD7",0x30D7],
+  ["ABD8",0x30D8],
+  ["ABD9",0x30D9],
+  ["ABDA",0x30DA],
+  ["ABDB",0x30DB],
+  ["ABDC",0x30DC],
+  ["ABDD",0x30DD],
+  ["ABDE",0x30DE],
+  ["ABDF",0x30DF],
+  ["ABE0",0x30E0],
+  ["ABE1",0x30E1],
+  ["ABE2",0x30E2],
+  ["ABE3",0x30E3],
+  ["ABE4",0x30E4],
+  ["ABE5",0x30E5],
+  ["ABE6",0x30E6],
+  ["ABE7",0x30E7],
+  ["ABE8",0x30E8],
+  ["ABE9",0x30E9],
+  ["ABEA",0x30EA],
+  ["ABEB",0x30EB],
+  ["ABEC",0x30EC],
+  ["ABED",0x30ED],
+  ["ABEE",0x30EE],
+  ["ABEF",0x30EF],
+  ["ABF0",0x30F0],
+  ["ABF1",0x30F1],
+  ["ABF2",0x30F2],
+  ["ABF3",0x30F3],
+  ["ABF4",0x30F4],
+  ["ABF5",0x30F5],
+  ["ABF6",0x30F6],
+  ["ACA1",0x410],
+  ["ACA2",0x411],
+  ["ACA3",0x412],
+  ["ACA4",0x413],
+  ["ACA5",0x414],
+  ["ACA6",0x415],
+  ["ACA7",0x401],
+  ["ACA8",0x416],
+  ["ACA9",0x417],
+  ["ACAA",0x418],
+  ["ACAB",0x419],
+  ["ACAC",0x41A],
+  ["ACAD",0x41B],
+  ["ACAE",0x41C],
+  ["ACAF",0x41D],
+  ["ACB0",0x41E],
+  ["ACB1",0x41F],
+  ["ACB2",0x420],
+  ["ACB3",0x421],
+  ["ACB4",0x422],
+  ["ACB5",0x423],
+  ["ACB6",0x424],
+  ["ACB7",0x425],
+  ["ACB8",0x426],
+  ["ACB9",0x427],
+  ["ACBA",0x428],
+  ["ACBB",0x429],
+  ["ACBC",0x42A],
+  ["ACBD",0x42B],
+  ["ACBE",0x42C],
+  ["ACBF",0x42D],
+  ["ACC0",0x42E],
+  ["ACC1",0x42F],
+  ["ACD1",0x430],
+  ["ACD2",0x431],
+  ["ACD3",0x432],
+  ["ACD4",0x433],
+  ["ACD5",0x434],
+  ["ACD6",0x435],
+  ["ACD7",0x451],
+  ["ACD8",0x436],
+  ["ACD9",0x437],
+  ["ACDA",0x438],
+  ["ACDB",0x439],
+  ["ACDC",0x43A],
+  ["ACDD",0x43B],
+  ["ACDE",0x43C],
+  ["ACDF",0x43D],
+  ["ACE0",0x43E],
+  ["ACE1",0x43F],
+  ["ACE2",0x440],
+  ["ACE3",0x441],
+  ["ACE4",0x442],
+  ["ACE5",0x443],
+  ["ACE6",0x444],
+  ["ACE7",0x445],
+  ["ACE8",0x446],
+  ["ACE9",0x447],
+  ["ACEA",0x448],
+  ["ACEB",0x449],
+  ["ACEC",0x44A],
+  ["ACED",0x44B],
+  ["ACEE",0x44C],
+  ["ACEF",0x44D],
+  ["ACF0",0x44E],
+  ["ACF1",0x44F],
+  ["B0A1",0xAC00],
+  ["B0A2",0xAC01],
+  ["B0A3",0xAC04],
+  ["B0A4",0xAC07],
+  ["B0A5",0xAC08],
+  ["B0A6",0xAC09],
+  ["B0A7",0xAC0A],
+  ["B0A8",0xAC10],
+  ["B0A9",0xAC11],
+  ["B0AA",0xAC12],
+  ["B0AB",0xAC13],
+  ["B0AC",0xAC14],
+  ["B0AD",0xAC15],
+  ["B0AE",0xAC16],
+  ["B0AF",0xAC17],
+  ["B0B0",0xAC19],
+  ["B0B1",0xAC1A],
+  ["B0B2",0xAC1B],
+  ["B0B3",0xAC1C],
+  ["B0B4",0xAC1D],
+  ["B0B5",0xAC20],
+  ["B0B6",0xAC24],
+  ["B0B7",0xAC2C],
+  ["B0B8",0xAC2D],
+  ["B0B9",0xAC2F],
+  ["B0BA",0xAC30],
+  ["B0BB",0xAC31],
+  ["B0BC",0xAC38],
+  ["B0BD",0xAC39],
+  ["B0BE",0xAC3C],
+  ["B0BF",0xAC40],
+  ["B0C0",0xAC4B],
+  ["B0C1",0xAC4D],
+  ["B0C2",0xAC54],
+  ["B0C3",0xAC58],
+  ["B0C4",0xAC5C],
+  ["B0C5",0xAC70],
+  ["B0C6",0xAC71],
+  ["B0C7",0xAC74],
+  ["B0C8",0xAC77],
+  ["B0C9",0xAC78],
+  ["B0CA",0xAC7A],
+  ["B0CB",0xAC80],
+  ["B0CC",0xAC81],
+  ["B0CD",0xAC83],
+  ["B0CE",0xAC84],
+  ["B0CF",0xAC85],
+  ["B0D0",0xAC86],
+  ["B0D1",0xAC89],
+  ["B0D2",0xAC8A],
+  ["B0D3",0xAC8B],
+  ["B0D4",0xAC8C],
+  ["B0D5",0xAC90],
+  ["B0D6",0xAC94],
+  ["B0D7",0xAC9C],
+  ["B0D8",0xAC9D],
+  ["B0D9",0xAC9F],
+  ["B0DA",0xACA0],
+  ["B0DB",0xACA1],
+  ["B0DC",0xACA8],
+  ["B0DD",0xACA9],
+  ["B0DE",0xACAA],
+  ["B0DF",0xACAC],
+  ["B0E0",0xACAF],
+  ["B0E1",0xACB0],
+  ["B0E2",0xACB8],
+  ["B0E3",0xACB9],
+  ["B0E4",0xACBB],
+  ["B0E5",0xACBC],
+  ["B0E6",0xACBD],
+  ["B0E7",0xACC1],
+  ["B0E8",0xACC4],
+  ["B0E9",0xACC8],
+  ["B0EA",0xACCC],
+  ["B0EB",0xACD5],
+  ["B0EC",0xACD7],
+  ["B0ED",0xACE0],
+  ["B0EE",0xACE1],
+  ["B0EF",0xACE4],
+  ["B0F0",0xACE7],
+  ["B0F1",0xACE8],
+  ["B0F2",0xACEA],
+  ["B0F3",0xACEC],
+  ["B0F4",0xACEF],
+  ["B0F5",0xACF0],
+  ["B0F6",0xACF1],
+  ["B0F7",0xACF3],
+  ["B0F8",0xACF5],
+  ["B0F9",0xACF6],
+  ["B0FA",0xACFC],
+  ["B0FB",0xACFD],
+  ["B0FC",0xAD00],
+  ["B0FD",0xAD04],
+  ["B0FE",0xAD06],
+  ["B1A1",0xAD0C],
+  ["B1A2",0xAD0D],
+  ["B1A3",0xAD0F],
+  ["B1A4",0xAD11],
+  ["B1A5",0xAD18],
+  ["B1A6",0xAD1C],
+  ["B1A7",0xAD20],
+  ["B1A8",0xAD29],
+  ["B1A9",0xAD2C],
+  ["B1AA",0xAD2D],
+  ["B1AB",0xAD34],
+  ["B1AC",0xAD35],
+  ["B1AD",0xAD38],
+  ["B1AE",0xAD3C],
+  ["B1AF",0xAD44],
+  ["B1B0",0xAD45],
+  ["B1B1",0xAD47],
+  ["B1B2",0xAD49],
+  ["B1B3",0xAD50],
+  ["B1B4",0xAD54],
+  ["B1B5",0xAD58],
+  ["B1B6",0xAD61],
+  ["B1B7",0xAD63],
+  ["B1B8",0xAD6C],
+  ["B1B9",0xAD6D],
+  ["B1BA",0xAD70],
+  ["B1BB",0xAD73],
+  ["B1BC",0xAD74],
+  ["B1BD",0xAD75],
+  ["B1BE",0xAD76],
+  ["B1BF",0xAD7B],
+  ["B1C0",0xAD7C],
+  ["B1C1",0xAD7D],
+  ["B1C2",0xAD7F],
+  ["B1C3",0xAD81],
+  ["B1C4",0xAD82],
+  ["B1C5",0xAD88],
+  ["B1C6",0xAD89],
+  ["B1C7",0xAD8C],
+  ["B1C8",0xAD90],
+  ["B1C9",0xAD9C],
+  ["B1CA",0xAD9D],
+  ["B1CB",0xADA4],
+  ["B1CC",0xADB7],
+  ["B1CD",0xADC0],
+  ["B1CE",0xADC1],
+  ["B1CF",0xADC4],
+  ["B1D0",0xADC8],
+  ["B1D1",0xADD0],
+  ["B1D2",0xADD1],
+  ["B1D3",0xADD3],
+  ["B1D4",0xADDC],
+  ["B1D5",0xADE0],
+  ["B1D6",0xADE4],
+  ["B1D7",0xADF8],
+  ["B1D8",0xADF9],
+  ["B1D9",0xADFC],
+  ["B1DA",0xADFF],
+  ["B1DB",0xAE00],
+  ["B1DC",0xAE01],
+  ["B1DD",0xAE08],
+  ["B1DE",0xAE09],
+  ["B1DF",0xAE0B],
+  ["B1E0",0xAE0D],
+  ["B1E1",0xAE14],
+  ["B1E2",0xAE30],
+  ["B1E3",0xAE31],
+  ["B1E4",0xAE34],
+  ["B1E5",0xAE37],
+  ["B1E6",0xAE38],
+  ["B1E7",0xAE3A],
+  ["B1E8",0xAE40],
+  ["B1E9",0xAE41],
+  ["B1EA",0xAE43],
+  ["B1EB",0xAE45],
+  ["B1EC",0xAE46],
+  ["B1ED",0xAE4A],
+  ["B1EE",0xAE4C],
+  ["B1EF",0xAE4D],
+  ["B1F0",0xAE4E],
+  ["B1F1",0xAE50],
+  ["B1F2",0xAE54],
+  ["B1F3",0xAE56],
+  ["B1F4",0xAE5C],
+  ["B1F5",0xAE5D],
+  ["B1F6",0xAE5F],
+  ["B1F7",0xAE60],
+  ["B1F8",0xAE61],
+  ["B1F9",0xAE65],
+  ["B1FA",0xAE68],
+  ["B1FB",0xAE69],
+  ["B1FC",0xAE6C],
+  ["B1FD",0xAE70],
+  ["B1FE",0xAE78],
+  ["B2A1",0xAE79],
+  ["B2A2",0xAE7B],
+  ["B2A3",0xAE7C],
+  ["B2A4",0xAE7D],
+  ["B2A5",0xAE84],
+  ["B2A6",0xAE85],
+  ["B2A7",0xAE8C],
+  ["B2A8",0xAEBC],
+  ["B2A9",0xAEBD],
+  ["B2AA",0xAEBE],
+  ["B2AB",0xAEC0],
+  ["B2AC",0xAEC4],
+  ["B2AD",0xAECC],
+  ["B2AE",0xAECD],
+  ["B2AF",0xAECF],
+  ["B2B0",0xAED0],
+  ["B2B1",0xAED1],
+  ["B2B2",0xAED8],
+  ["B2B3",0xAED9],
+  ["B2B4",0xAEDC],
+  ["B2B5",0xAEE8],
+  ["B2B6",0xAEEB],
+  ["B2B7",0xAEED],
+  ["B2B8",0xAEF4],
+  ["B2B9",0xAEF8],
+  ["B2BA",0xAEFC],
+  ["B2BB",0xAF07],
+  ["B2BC",0xAF08],
+  ["B2BD",0xAF0D],
+  ["B2BE",0xAF10],
+  ["B2BF",0xAF2C],
+  ["B2C0",0xAF2D],
+  ["B2C1",0xAF30],
+  ["B2C2",0xAF32],
+  ["B2C3",0xAF34],
+  ["B2C4",0xAF3C],
+  ["B2C5",0xAF3D],
+  ["B2C6",0xAF3F],
+  ["B2C7",0xAF41],
+  ["B2C8",0xAF42],
+  ["B2C9",0xAF43],
+  ["B2CA",0xAF48],
+  ["B2CB",0xAF49],
+  ["B2CC",0xAF50],
+  ["B2CD",0xAF5C],
+  ["B2CE",0xAF5D],
+  ["B2CF",0xAF64],
+  ["B2D0",0xAF65],
+  ["B2D1",0xAF79],
+  ["B2D2",0xAF80],
+  ["B2D3",0xAF84],
+  ["B2D4",0xAF88],
+  ["B2D5",0xAF90],
+  ["B2D6",0xAF91],
+  ["B2D7",0xAF95],
+  ["B2D8",0xAF9C],
+  ["B2D9",0xAFB8],
+  ["B2DA",0xAFB9],
+  ["B2DB",0xAFBC],
+  ["B2DC",0xAFC0],
+  ["B2DD",0xAFC7],
+  ["B2DE",0xAFC8],
+  ["B2DF",0xAFC9],
+  ["B2E0",0xAFCB],
+  ["B2E1",0xAFCD],
+  ["B2E2",0xAFCE],
+  ["B2E3",0xAFD4],
+  ["B2E4",0xAFDC],
+  ["B2E5",0xAFE8],
+  ["B2E6",0xAFE9],
+  ["B2E7",0xAFF0],
+  ["B2E8",0xAFF1],
+  ["B2E9",0xAFF4],
+  ["B2EA",0xAFF8],
+  ["B2EB",0xB000],
+  ["B2EC",0xB001],
+  ["B2ED",0xB004],
+  ["B2EE",0xB00C],
+  ["B2EF",0xB010],
+  ["B2F0",0xB014],
+  ["B2F1",0xB01C],
+  ["B2F2",0xB01D],
+  ["B2F3",0xB028],
+  ["B2F4",0xB044],
+  ["B2F5",0xB045],
+  ["B2F6",0xB048],
+  ["B2F7",0xB04A],
+  ["B2F8",0xB04C],
+  ["B2F9",0xB04E],
+  ["B2FA",0xB053],
+  ["B2FB",0xB054],
+  ["B2FC",0xB055],
+  ["B2FD",0xB057],
+  ["B2FE",0xB059],
+  ["B3A1",0xB05D],
+  ["B3A2",0xB07C],
+  ["B3A3",0xB07D],
+  ["B3A4",0xB080],
+  ["B3A5",0xB084],
+  ["B3A6",0xB08C],
+  ["B3A7",0xB08D],
+  ["B3A8",0xB08F],
+  ["B3A9",0xB091],
+  ["B3AA",0xB098],
+  ["B3AB",0xB099],
+  ["B3AC",0xB09A],
+  ["B3AD",0xB09C],
+  ["B3AE",0xB09F],
+  ["B3AF",0xB0A0],
+  ["B3B0",0xB0A1],
+  ["B3B1",0xB0A2],
+  ["B3B2",0xB0A8],
+  ["B3B3",0xB0A9],
+  ["B3B4",0xB0AB],
+  ["B3B5",0xB0AC],
+  ["B3B6",0xB0AD],
+  ["B3B7",0xB0AE],
+  ["B3B8",0xB0AF],
+  ["B3B9",0xB0B1],
+  ["B3BA",0xB0B3],
+  ["B3BB",0xB0B4],
+  ["B3BC",0xB0B5],
+  ["B3BD",0xB0B8],
+  ["B3BE",0xB0BC],
+  ["B3BF",0xB0C4],
+  ["B3C0",0xB0C5],
+  ["B3C1",0xB0C7],
+  ["B3C2",0xB0C8],
+  ["B3C3",0xB0C9],
+  ["B3C4",0xB0D0],
+  ["B3C5",0xB0D1],
+  ["B3C6",0xB0D4],
+  ["B3C7",0xB0D8],
+  ["B3C8",0xB0E0],
+  ["B3C9",0xB0E5],
+  ["B3CA",0xB108],
+  ["B3CB",0xB109],
+  ["B3CC",0xB10B],
+  ["B3CD",0xB10C],
+  ["B3CE",0xB110],
+  ["B3CF",0xB112],
+  ["B3D0",0xB113],
+  ["B3D1",0xB118],
+  ["B3D2",0xB119],
+  ["B3D3",0xB11B],
+  ["B3D4",0xB11C],
+  ["B3D5",0xB11D],
+  ["B3D6",0xB123],
+  ["B3D7",0xB124],
+  ["B3D8",0xB125],
+  ["B3D9",0xB128],
+  ["B3DA",0xB12C],
+  ["B3DB",0xB134],
+  ["B3DC",0xB135],
+  ["B3DD",0xB137],
+  ["B3DE",0xB138],
+  ["B3DF",0xB139],
+  ["B3E0",0xB140],
+  ["B3E1",0xB141],
+  ["B3E2",0xB144],
+  ["B3E3",0xB148],
+  ["B3E4",0xB150],
+  ["B3E5",0xB151],
+  ["B3E6",0xB154],
+  ["B3E7",0xB155],
+  ["B3E8",0xB158],
+  ["B3E9",0xB15C],
+  ["B3EA",0xB160],
+  ["B3EB",0xB178],
+  ["B3EC",0xB179],
+  ["B3ED",0xB17C],
+  ["B3EE",0xB180],
+  ["B3EF",0xB182],
+  ["B3F0",0xB188],
+  ["B3F1",0xB189],
+  ["B3F2",0xB18B],
+  ["B3F3",0xB18D],
+  ["B3F4",0xB192],
+  ["B3F5",0xB193],
+  ["B3F6",0xB194],
+  ["B3F7",0xB198],
+  ["B3F8",0xB19C],
+  ["B3F9",0xB1A8],
+  ["B3FA",0xB1CC],
+  ["B3FB",0xB1D0],
+  ["B3FC",0xB1D4],
+  ["B3FD",0xB1DC],
+  ["B3FE",0xB1DD],
+  ["B4A1",0xB1DF],
+  ["B4A2",0xB1E8],
+  ["B4A3",0xB1E9],
+  ["B4A4",0xB1EC],
+  ["B4A5",0xB1F0],
+  ["B4A6",0xB1F9],
+  ["B4A7",0xB1FB],
+  ["B4A8",0xB1FD],
+  ["B4A9",0xB204],
+  ["B4AA",0xB205],
+  ["B4AB",0xB208],
+  ["B4AC",0xB20B],
+  ["B4AD",0xB20C],
+  ["B4AE",0xB214],
+  ["B4AF",0xB215],
+  ["B4B0",0xB217],
+  ["B4B1",0xB219],
+  ["B4B2",0xB220],
+  ["B4B3",0xB234],
+  ["B4B4",0xB23C],
+  ["B4B5",0xB258],
+  ["B4B6",0xB25C],
+  ["B4B7",0xB260],
+  ["B4B8",0xB268],
+  ["B4B9",0xB269],
+  ["B4BA",0xB274],
+  ["B4BB",0xB275],
+  ["B4BC",0xB27C],
+  ["B4BD",0xB284],
+  ["B4BE",0xB285],
+  ["B4BF",0xB289],
+  ["B4C0",0xB290],
+  ["B4C1",0xB291],
+  ["B4C2",0xB294],
+  ["B4C3",0xB298],
+  ["B4C4",0xB299],
+  ["B4C5",0xB29A],
+  ["B4C6",0xB2A0],
+  ["B4C7",0xB2A1],
+  ["B4C8",0xB2A3],
+  ["B4C9",0xB2A5],
+  ["B4CA",0xB2A6],
+  ["B4CB",0xB2AA],
+  ["B4CC",0xB2AC],
+  ["B4CD",0xB2B0],
+  ["B4CE",0xB2B4],
+  ["B4CF",0xB2C8],
+  ["B4D0",0xB2C9],
+  ["B4D1",0xB2CC],
+  ["B4D2",0xB2D0],
+  ["B4D3",0xB2D2],
+  ["B4D4",0xB2D8],
+  ["B4D5",0xB2D9],
+  ["B4D6",0xB2DB],
+  ["B4D7",0xB2DD],
+  ["B4D8",0xB2E2],
+  ["B4D9",0xB2E4],
+  ["B4DA",0xB2E5],
+  ["B4DB",0xB2E6],
+  ["B4DC",0xB2E8],
+  ["B4DD",0xB2EB],
+  ["B4DE",0xB2EC],
+  ["B4DF",0xB2ED],
+  ["B4E0",0xB2EE],
+  ["B4E1",0xB2EF],
+  ["B4E2",0xB2F3],
+  ["B4E3",0xB2F4],
+  ["B4E4",0xB2F5],
+  ["B4E5",0xB2F7],
+  ["B4E6",0xB2F8],
+  ["B4E7",0xB2F9],
+  ["B4E8",0xB2FA],
+  ["B4E9",0xB2FB],
+  ["B4EA",0xB2FF],
+  ["B4EB",0xB300],
+  ["B4EC",0xB301],
+  ["B4ED",0xB304],
+  ["B4EE",0xB308],
+  ["B4EF",0xB310],
+  ["B4F0",0xB311],
+  ["B4F1",0xB313],
+  ["B4F2",0xB314],
+  ["B4F3",0xB315],
+  ["B4F4",0xB31C],
+  ["B4F5",0xB354],
+  ["B4F6",0xB355],
+  ["B4F7",0xB356],
+  ["B4F8",0xB358],
+  ["B4F9",0xB35B],
+  ["B4FA",0xB35C],
+  ["B4FB",0xB35E],
+  ["B4FC",0xB35F],
+  ["B4FD",0xB364],
+  ["B4FE",0xB365],
+  ["B5A1",0xB367],
+  ["B5A2",0xB369],
+  ["B5A3",0xB36B],
+  ["B5A4",0xB36E],
+  ["B5A5",0xB370],
+  ["B5A6",0xB371],
+  ["B5A7",0xB374],
+  ["B5A8",0xB378],
+  ["B5A9",0xB380],
+  ["B5AA",0xB381],
+  ["B5AB",0xB383],
+  ["B5AC",0xB384],
+  ["B5AD",0xB385],
+  ["B5AE",0xB38C],
+  ["B5AF",0xB390],
+  ["B5B0",0xB394],
+  ["B5B1",0xB3A0],
+  ["B5B2",0xB3A1],
+  ["B5B3",0xB3A8],
+  ["B5B4",0xB3AC],
+  ["B5B5",0xB3C4],
+  ["B5B6",0xB3C5],
+  ["B5B7",0xB3C8],
+  ["B5B8",0xB3CB],
+  ["B5B9",0xB3CC],
+  ["B5BA",0xB3CE],
+  ["B5BB",0xB3D0],
+  ["B5BC",0xB3D4],
+  ["B5BD",0xB3D5],
+  ["B5BE",0xB3D7],
+  ["B5BF",0xB3D9],
+  ["B5C0",0xB3DB],
+  ["B5C1",0xB3DD],
+  ["B5C2",0xB3E0],
+  ["B5C3",0xB3E4],
+  ["B5C4",0xB3E8],
+  ["B5C5",0xB3FC],
+  ["B5C6",0xB410],
+  ["B5C7",0xB418],
+  ["B5C8",0xB41C],
+  ["B5C9",0xB420],
+  ["B5CA",0xB428],
+  ["B5CB",0xB429],
+  ["B5CC",0xB42B],
+  ["B5CD",0xB434],
+  ["B5CE",0xB450],
+  ["B5CF",0xB451],
+  ["B5D0",0xB454],
+  ["B5D1",0xB458],
+  ["B5D2",0xB460],
+  ["B5D3",0xB461],
+  ["B5D4",0xB463],
+  ["B5D5",0xB465],
+  ["B5D6",0xB46C],
+  ["B5D7",0xB480],
+  ["B5D8",0xB488],
+  ["B5D9",0xB49D],
+  ["B5DA",0xB4A4],
+  ["B5DB",0xB4A8],
+  ["B5DC",0xB4AC],
+  ["B5DD",0xB4B5],
+  ["B5DE",0xB4B7],
+  ["B5DF",0xB4B9],
+  ["B5E0",0xB4C0],
+  ["B5E1",0xB4C4],
+  ["B5E2",0xB4C8],
+  ["B5E3",0xB4D0],
+  ["B5E4",0xB4D5],
+  ["B5E5",0xB4DC],
+  ["B5E6",0xB4DD],
+  ["B5E7",0xB4E0],
+  ["B5E8",0xB4E3],
+  ["B5E9",0xB4E4],
+  ["B5EA",0xB4E6],
+  ["B5EB",0xB4EC],
+  ["B5EC",0xB4ED],
+  ["B5ED",0xB4EF],
+  ["B5EE",0xB4F1],
+  ["B5EF",0xB4F8],
+  ["B5F0",0xB514],
+  ["B5F1",0xB515],
+  ["B5F2",0xB518],
+  ["B5F3",0xB51B],
+  ["B5F4",0xB51C],
+  ["B5F5",0xB524],
+  ["B5F6",0xB525],
+  ["B5F7",0xB527],
+  ["B5F8",0xB528],
+  ["B5F9",0xB529],
+  ["B5FA",0xB52A],
+  ["B5FB",0xB530],
+  ["B5FC",0xB531],
+  ["B5FD",0xB534],
+  ["B5FE",0xB538],
+  ["B6A1",0xB540],
+  ["B6A2",0xB541],
+  ["B6A3",0xB543],
+  ["B6A4",0xB544],
+  ["B6A5",0xB545],
+  ["B6A6",0xB54B],
+  ["B6A7",0xB54C],
+  ["B6A8",0xB54D],
+  ["B6A9",0xB550],
+  ["B6AA",0xB554],
+  ["B6AB",0xB55C],
+  ["B6AC",0xB55D],
+  ["B6AD",0xB55F],
+  ["B6AE",0xB560],
+  ["B6AF",0xB561],
+  ["B6B0",0xB5A0],
+  ["B6B1",0xB5A1],
+  ["B6B2",0xB5A4],
+  ["B6B3",0xB5A8],
+  ["B6B4",0xB5AA],
+  ["B6B5",0xB5AB],
+  ["B6B6",0xB5B0],
+  ["B6B7",0xB5B1],
+  ["B6B8",0xB5B3],
+  ["B6B9",0xB5B4],
+  ["B6BA",0xB5B5],
+  ["B6BB",0xB5BB],
+  ["B6BC",0xB5BC],
+  ["B6BD",0xB5BD],
+  ["B6BE",0xB5C0],
+  ["B6BF",0xB5C4],
+  ["B6C0",0xB5CC],
+  ["B6C1",0xB5CD],
+  ["B6C2",0xB5CF],
+  ["B6C3",0xB5D0],
+  ["B6C4",0xB5D1],
+  ["B6C5",0xB5D8],
+  ["B6C6",0xB5EC],
+  ["B6C7",0xB610],
+  ["B6C8",0xB611],
+  ["B6C9",0xB614],
+  ["B6CA",0xB618],
+  ["B6CB",0xB625],
+  ["B6CC",0xB62C],
+  ["B6CD",0xB634],
+  ["B6CE",0xB648],
+  ["B6CF",0xB664],
+  ["B6D0",0xB668],
+  ["B6D1",0xB69C],
+  ["B6D2",0xB69D],
+  ["B6D3",0xB6A0],
+  ["B6D4",0xB6A4],
+  ["B6D5",0xB6AB],
+  ["B6D6",0xB6AC],
+  ["B6D7",0xB6B1],
+  ["B6D8",0xB6D4],
+  ["B6D9",0xB6F0],
+  ["B6DA",0xB6F4],
+  ["B6DB",0xB6F8],
+  ["B6DC",0xB700],
+  ["B6DD",0xB701],
+  ["B6DE",0xB705],
+  ["B6DF",0xB728],
+  ["B6E0",0xB729],
+  ["B6E1",0xB72C],
+  ["B6E2",0xB72F],
+  ["B6E3",0xB730],
+  ["B6E4",0xB738],
+  ["B6E5",0xB739],
+  ["B6E6",0xB73B],
+  ["B6E7",0xB744],
+  ["B6E8",0xB748],
+  ["B6E9",0xB74C],
+  ["B6EA",0xB754],
+  ["B6EB",0xB755],
+  ["B6EC",0xB760],
+  ["B6ED",0xB764],
+  ["B6EE",0xB768],
+  ["B6EF",0xB770],
+  ["B6F0",0xB771],
+  ["B6F1",0xB773],
+  ["B6F2",0xB775],
+  ["B6F3",0xB77C],
+  ["B6F4",0xB77D],
+  ["B6F5",0xB780],
+  ["B6F6",0xB784],
+  ["B6F7",0xB78C],
+  ["B6F8",0xB78D],
+  ["B6F9",0xB78F],
+  ["B6FA",0xB790],
+  ["B6FB",0xB791],
+  ["B6FC",0xB792],
+  ["B6FD",0xB796],
+  ["B6FE",0xB797],
+  ["B7A1",0xB798],
+  ["B7A2",0xB799],
+  ["B7A3",0xB79C],
+  ["B7A4",0xB7A0],
+  ["B7A5",0xB7A8],
+  ["B7A6",0xB7A9],
+  ["B7A7",0xB7AB],
+  ["B7A8",0xB7AC],
+  ["B7A9",0xB7AD],
+  ["B7AA",0xB7B4],
+  ["B7AB",0xB7B5],
+  ["B7AC",0xB7B8],
+  ["B7AD",0xB7C7],
+  ["B7AE",0xB7C9],
+  ["B7AF",0xB7EC],
+  ["B7B0",0xB7ED],
+  ["B7B1",0xB7F0],
+  ["B7B2",0xB7F4],
+  ["B7B3",0xB7FC],
+  ["B7B4",0xB7FD],
+  ["B7B5",0xB7FF],
+  ["B7B6",0xB800],
+  ["B7B7",0xB801],
+  ["B7B8",0xB807],
+  ["B7B9",0xB808],
+  ["B7BA",0xB809],
+  ["B7BB",0xB80C],
+  ["B7BC",0xB810],
+  ["B7BD",0xB818],
+  ["B7BE",0xB819],
+  ["B7BF",0xB81B],
+  ["B7C0",0xB81D],
+  ["B7C1",0xB824],
+  ["B7C2",0xB825],
+  ["B7C3",0xB828],
+  ["B7C4",0xB82C],
+  ["B7C5",0xB834],
+  ["B7C6",0xB835],
+  ["B7C7",0xB837],
+  ["B7C8",0xB838],
+  ["B7C9",0xB839],
+  ["B7CA",0xB840],
+  ["B7CB",0xB844],
+  ["B7CC",0xB851],
+  ["B7CD",0xB853],
+  ["B7CE",0xB85C],
+  ["B7CF",0xB85D],
+  ["B7D0",0xB860],
+  ["B7D1",0xB864],
+  ["B7D2",0xB86C],
+  ["B7D3",0xB86D],
+  ["B7D4",0xB86F],
+  ["B7D5",0xB871],
+  ["B7D6",0xB878],
+  ["B7D7",0xB87C],
+  ["B7D8",0xB88D],
+  ["B7D9",0xB8A8],
+  ["B7DA",0xB8B0],
+  ["B7DB",0xB8B4],
+  ["B7DC",0xB8B8],
+  ["B7DD",0xB8C0],
+  ["B7DE",0xB8C1],
+  ["B7DF",0xB8C3],
+  ["B7E0",0xB8C5],
+  ["B7E1",0xB8CC],
+  ["B7E2",0xB8D0],
+  ["B7E3",0xB8D4],
+  ["B7E4",0xB8DD],
+  ["B7E5",0xB8DF],
+  ["B7E6",0xB8E1],
+  ["B7E7",0xB8E8],
+  ["B7E8",0xB8E9],
+  ["B7E9",0xB8EC],
+  ["B7EA",0xB8F0],
+  ["B7EB",0xB8F8],
+  ["B7EC",0xB8F9],
+  ["B7ED",0xB8FB],
+  ["B7EE",0xB8FD],
+  ["B7EF",0xB904],
+  ["B7F0",0xB918],
+  ["B7F1",0xB920],
+  ["B7F2",0xB93C],
+  ["B7F3",0xB93D],
+  ["B7F4",0xB940],
+  ["B7F5",0xB944],
+  ["B7F6",0xB94C],
+  ["B7F7",0xB94F],
+  ["B7F8",0xB951],
+  ["B7F9",0xB958],
+  ["B7FA",0xB959],
+  ["B7FB",0xB95C],
+  ["B7FC",0xB960],
+  ["B7FD",0xB968],
+  ["B7FE",0xB969],
+  ["B8A1",0xB96B],
+  ["B8A2",0xB96D],
+  ["B8A3",0xB974],
+  ["B8A4",0xB975],
+  ["B8A5",0xB978],
+  ["B8A6",0xB97C],
+  ["B8A7",0xB984],
+  ["B8A8",0xB985],
+  ["B8A9",0xB987],
+  ["B8AA",0xB989],
+  ["B8AB",0xB98A],
+  ["B8AC",0xB98D],
+  ["B8AD",0xB98E],
+  ["B8AE",0xB9AC],
+  ["B8AF",0xB9AD],
+  ["B8B0",0xB9B0],
+  ["B8B1",0xB9B4],
+  ["B8B2",0xB9BC],
+  ["B8B3",0xB9BD],
+  ["B8B4",0xB9BF],
+  ["B8B5",0xB9C1],
+  ["B8B6",0xB9C8],
+  ["B8B7",0xB9C9],
+  ["B8B8",0xB9CC],
+  ["B8B9",0xB9CE],
+  ["B8BA",0xB9CF],
+  ["B8BB",0xB9D0],
+  ["B8BC",0xB9D1],
+  ["B8BD",0xB9D2],
+  ["B8BE",0xB9D8],
+  ["B8BF",0xB9D9],
+  ["B8C0",0xB9DB],
+  ["B8C1",0xB9DD],
+  ["B8C2",0xB9DE],
+  ["B8C3",0xB9E1],
+  ["B8C4",0xB9E3],
+  ["B8C5",0xB9E4],
+  ["B8C6",0xB9E5],
+  ["B8C7",0xB9E8],
+  ["B8C8",0xB9EC],
+  ["B8C9",0xB9F4],
+  ["B8CA",0xB9F5],
+  ["B8CB",0xB9F7],
+  ["B8CC",0xB9F8],
+  ["B8CD",0xB9F9],
+  ["B8CE",0xB9FA],
+  ["B8CF",0xBA00],
+  ["B8D0",0xBA01],
+  ["B8D1",0xBA08],
+  ["B8D2",0xBA15],
+  ["B8D3",0xBA38],
+  ["B8D4",0xBA39],
+  ["B8D5",0xBA3C],
+  ["B8D6",0xBA40],
+  ["B8D7",0xBA42],
+  ["B8D8",0xBA48],
+  ["B8D9",0xBA49],
+  ["B8DA",0xBA4B],
+  ["B8DB",0xBA4D],
+  ["B8DC",0xBA4E],
+  ["B8DD",0xBA53],
+  ["B8DE",0xBA54],
+  ["B8DF",0xBA55],
+  ["B8E0",0xBA58],
+  ["B8E1",0xBA5C],
+  ["B8E2",0xBA64],
+  ["B8E3",0xBA65],
+  ["B8E4",0xBA67],
+  ["B8E5",0xBA68],
+  ["B8E6",0xBA69],
+  ["B8E7",0xBA70],
+  ["B8E8",0xBA71],
+  ["B8E9",0xBA74],
+  ["B8EA",0xBA78],
+  ["B8EB",0xBA83],
+  ["B8EC",0xBA84],
+  ["B8ED",0xBA85],
+  ["B8EE",0xBA87],
+  ["B8EF",0xBA8C],
+  ["B8F0",0xBAA8],
+  ["B8F1",0xBAA9],
+  ["B8F2",0xBAAB],
+  ["B8F3",0xBAAC],
+  ["B8F4",0xBAB0],
+  ["B8F5",0xBAB2],
+  ["B8F6",0xBAB8],
+  ["B8F7",0xBAB9],
+  ["B8F8",0xBABB],
+  ["B8F9",0xBABD],
+  ["B8FA",0xBAC4],
+  ["B8FB",0xBAC8],
+  ["B8FC",0xBAD8],
+  ["B8FD",0xBAD9],
+  ["B8FE",0xBAFC],
+  ["B9A1",0xBB00],
+  ["B9A2",0xBB04],
+  ["B9A3",0xBB0D],
+  ["B9A4",0xBB0F],
+  ["B9A5",0xBB11],
+  ["B9A6",0xBB18],
+  ["B9A7",0xBB1C],
+  ["B9A8",0xBB20],
+  ["B9A9",0xBB29],
+  ["B9AA",0xBB2B],
+  ["B9AB",0xBB34],
+  ["B9AC",0xBB35],
+  ["B9AD",0xBB36],
+  ["B9AE",0xBB38],
+  ["B9AF",0xBB3B],
+  ["B9B0",0xBB3C],
+  ["B9B1",0xBB3D],
+  ["B9B2",0xBB3E],
+  ["B9B3",0xBB44],
+  ["B9B4",0xBB45],
+  ["B9B5",0xBB47],
+  ["B9B6",0xBB49],
+  ["B9B7",0xBB4D],
+  ["B9B8",0xBB4F],
+  ["B9B9",0xBB50],
+  ["B9BA",0xBB54],
+  ["B9BB",0xBB58],
+  ["B9BC",0xBB61],
+  ["B9BD",0xBB63],
+  ["B9BE",0xBB6C],
+  ["B9BF",0xBB88],
+  ["B9C0",0xBB8C],
+  ["B9C1",0xBB90],
+  ["B9C2",0xBBA4],
+  ["B9C3",0xBBA8],
+  ["B9C4",0xBBAC],
+  ["B9C5",0xBBB4],
+  ["B9C6",0xBBB7],
+  ["B9C7",0xBBC0],
+  ["B9C8",0xBBC4],
+  ["B9C9",0xBBC8],
+  ["B9CA",0xBBD0],
+  ["B9CB",0xBBD3],
+  ["B9CC",0xBBF8],
+  ["B9CD",0xBBF9],
+  ["B9CE",0xBBFC],
+  ["B9CF",0xBBFF],
+  ["B9D0",0xBC00],
+  ["B9D1",0xBC02],
+  ["B9D2",0xBC08],
+  ["B9D3",0xBC09],
+  ["B9D4",0xBC0B],
+  ["B9D5",0xBC0C],
+  ["B9D6",0xBC0D],
+  ["B9D7",0xBC0F],
+  ["B9D8",0xBC11],
+  ["B9D9",0xBC14],
+  ["B9DA",0xBC15],
+  ["B9DB",0xBC16],
+  ["B9DC",0xBC17],
+  ["B9DD",0xBC18],
+  ["B9DE",0xBC1B],
+  ["B9DF",0xBC1C],
+  ["B9E0",0xBC1D],
+  ["B9E1",0xBC1E],
+  ["B9E2",0xBC1F],
+  ["B9E3",0xBC24],
+  ["B9E4",0xBC25],
+  ["B9E5",0xBC27],
+  ["B9E6",0xBC29],
+  ["B9E7",0xBC2D],
+  ["B9E8",0xBC30],
+  ["B9E9",0xBC31],
+  ["B9EA",0xBC34],
+  ["B9EB",0xBC38],
+  ["B9EC",0xBC40],
+  ["B9ED",0xBC41],
+  ["B9EE",0xBC43],
+  ["B9EF",0xBC44],
+  ["B9F0",0xBC45],
+  ["B9F1",0xBC49],
+  ["B9F2",0xBC4C],
+  ["B9F3",0xBC4D],
+  ["B9F4",0xBC50],
+  ["B9F5",0xBC5D],
+  ["B9F6",0xBC84],
+  ["B9F7",0xBC85],
+  ["B9F8",0xBC88],
+  ["B9F9",0xBC8B],
+  ["B9FA",0xBC8C],
+  ["B9FB",0xBC8E],
+  ["B9FC",0xBC94],
+  ["B9FD",0xBC95],
+  ["B9FE",0xBC97],
+  ["BAA1",0xBC99],
+  ["BAA2",0xBC9A],
+  ["BAA3",0xBCA0],
+  ["BAA4",0xBCA1],
+  ["BAA5",0xBCA4],
+  ["BAA6",0xBCA7],
+  ["BAA7",0xBCA8],
+  ["BAA8",0xBCB0],
+  ["BAA9",0xBCB1],
+  ["BAAA",0xBCB3],
+  ["BAAB",0xBCB4],
+  ["BAAC",0xBCB5],
+  ["BAAD",0xBCBC],
+  ["BAAE",0xBCBD],
+  ["BAAF",0xBCC0],
+  ["BAB0",0xBCC4],
+  ["BAB1",0xBCCD],
+  ["BAB2",0xBCCF],
+  ["BAB3",0xBCD0],
+  ["BAB4",0xBCD1],
+  ["BAB5",0xBCD5],
+  ["BAB6",0xBCD8],
+  ["BAB7",0xBCDC],
+  ["BAB8",0xBCF4],
+  ["BAB9",0xBCF5],
+  ["BABA",0xBCF6],
+  ["BABB",0xBCF8],
+  ["BABC",0xBCFC],
+  ["BABD",0xBD04],
+  ["BABE",0xBD05],
+  ["BABF",0xBD07],
+  ["BAC0",0xBD09],
+  ["BAC1",0xBD10],
+  ["BAC2",0xBD14],
+  ["BAC3",0xBD24],
+  ["BAC4",0xBD2C],
+  ["BAC5",0xBD40],
+  ["BAC6",0xBD48],
+  ["BAC7",0xBD49],
+  ["BAC8",0xBD4C],
+  ["BAC9",0xBD50],
+  ["BACA",0xBD58],
+  ["BACB",0xBD59],
+  ["BACC",0xBD64],
+  ["BACD",0xBD68],
+  ["BACE",0xBD80],
+  ["BACF",0xBD81],
+  ["BAD0",0xBD84],
+  ["BAD1",0xBD87],
+  ["BAD2",0xBD88],
+  ["BAD3",0xBD89],
+  ["BAD4",0xBD8A],
+  ["BAD5",0xBD90],
+  ["BAD6",0xBD91],
+  ["BAD7",0xBD93],
+  ["BAD8",0xBD95],
+  ["BAD9",0xBD99],
+  ["BADA",0xBD9A],
+  ["BADB",0xBD9C],
+  ["BADC",0xBDA4],
+  ["BADD",0xBDB0],
+  ["BADE",0xBDB8],
+  ["BADF",0xBDD4],
+  ["BAE0",0xBDD5],
+  ["BAE1",0xBDD8],
+  ["BAE2",0xBDDC],
+  ["BAE3",0xBDE9],
+  ["BAE4",0xBDF0],
+  ["BAE5",0xBDF4],
+  ["BAE6",0xBDF8],
+  ["BAE7",0xBE00],
+  ["BAE8",0xBE03],
+  ["BAE9",0xBE05],
+  ["BAEA",0xBE0C],
+  ["BAEB",0xBE0D],
+  ["BAEC",0xBE10],
+  ["BAED",0xBE14],
+  ["BAEE",0xBE1C],
+  ["BAEF",0xBE1D],
+  ["BAF0",0xBE1F],
+  ["BAF1",0xBE44],
+  ["BAF2",0xBE45],
+  ["BAF3",0xBE48],
+  ["BAF4",0xBE4C],
+  ["BAF5",0xBE4E],
+  ["BAF6",0xBE54],
+  ["BAF7",0xBE55],
+  ["BAF8",0xBE57],
+  ["BAF9",0xBE59],
+  ["BAFA",0xBE5A],
+  ["BAFB",0xBE5B],
+  ["BAFC",0xBE60],
+  ["BAFD",0xBE61],
+  ["BAFE",0xBE64],
+  ["BBA1",0xBE68],
+  ["BBA2",0xBE6A],
+  ["BBA3",0xBE70],
+  ["BBA4",0xBE71],
+  ["BBA5",0xBE73],
+  ["BBA6",0xBE74],
+  ["BBA7",0xBE75],
+  ["BBA8",0xBE7B],
+  ["BBA9",0xBE7C],
+  ["BBAA",0xBE7D],
+  ["BBAB",0xBE80],
+  ["BBAC",0xBE84],
+  ["BBAD",0xBE8C],
+  ["BBAE",0xBE8D],
+  ["BBAF",0xBE8F],
+  ["BBB0",0xBE90],
+  ["BBB1",0xBE91],
+  ["BBB2",0xBE98],
+  ["BBB3",0xBE99],
+  ["BBB4",0xBEA8],
+  ["BBB5",0xBED0],
+  ["BBB6",0xBED1],
+  ["BBB7",0xBED4],
+  ["BBB8",0xBED7],
+  ["BBB9",0xBED8],
+  ["BBBA",0xBEE0],
+  ["BBBB",0xBEE3],
+  ["BBBC",0xBEE4],
+  ["BBBD",0xBEE5],
+  ["BBBE",0xBEEC],
+  ["BBBF",0xBF01],
+  ["BBC0",0xBF08],
+  ["BBC1",0xBF09],
+  ["BBC2",0xBF18],
+  ["BBC3",0xBF19],
+  ["BBC4",0xBF1B],
+  ["BBC5",0xBF1C],
+  ["BBC6",0xBF1D],
+  ["BBC7",0xBF40],
+  ["BBC8",0xBF41],
+  ["BBC9",0xBF44],
+  ["BBCA",0xBF48],
+  ["BBCB",0xBF50],
+  ["BBCC",0xBF51],
+  ["BBCD",0xBF55],
+  ["BBCE",0xBF94],
+  ["BBCF",0xBFB0],
+  ["BBD0",0xBFC5],
+  ["BBD1",0xBFCC],
+  ["BBD2",0xBFCD],
+  ["BBD3",0xBFD0],
+  ["BBD4",0xBFD4],
+  ["BBD5",0xBFDC],
+  ["BBD6",0xBFDF],
+  ["BBD7",0xBFE1],
+  ["BBD8",0xC03C],
+  ["BBD9",0xC051],
+  ["BBDA",0xC058],
+  ["BBDB",0xC05C],
+  ["BBDC",0xC060],
+  ["BBDD",0xC068],
+  ["BBDE",0xC069],
+  ["BBDF",0xC090],
+  ["BBE0",0xC091],
+  ["BBE1",0xC094],
+  ["BBE2",0xC098],
+  ["BBE3",0xC0A0],
+  ["BBE4",0xC0A1],
+  ["BBE5",0xC0A3],
+  ["BBE6",0xC0A5],
+  ["BBE7",0xC0AC],
+  ["BBE8",0xC0AD],
+  ["BBE9",0xC0AF],
+  ["BBEA",0xC0B0],
+  ["BBEB",0xC0B3],
+  ["BBEC",0xC0B4],
+  ["BBED",0xC0B5],
+  ["BBEE",0xC0B6],
+  ["BBEF",0xC0BC],
+  ["BBF0",0xC0BD],
+  ["BBF1",0xC0BF],
+  ["BBF2",0xC0C0],
+  ["BBF3",0xC0C1],
+  ["BBF4",0xC0C5],
+  ["BBF5",0xC0C8],
+  ["BBF6",0xC0C9],
+  ["BBF7",0xC0CC],
+  ["BBF8",0xC0D0],
+  ["BBF9",0xC0D8],
+  ["BBFA",0xC0D9],
+  ["BBFB",0xC0DB],
+  ["BBFC",0xC0DC],
+  ["BBFD",0xC0DD],
+  ["BBFE",0xC0E4],
+  ["BCA1",0xC0E5],
+  ["BCA2",0xC0E8],
+  ["BCA3",0xC0EC],
+  ["BCA4",0xC0F4],
+  ["BCA5",0xC0F5],
+  ["BCA6",0xC0F7],
+  ["BCA7",0xC0F9],
+  ["BCA8",0xC100],
+  ["BCA9",0xC104],
+  ["BCAA",0xC108],
+  ["BCAB",0xC110],
+  ["BCAC",0xC115],
+  ["BCAD",0xC11C],
+  ["BCAE",0xC11D],
+  ["BCAF",0xC11E],
+  ["BCB0",0xC11F],
+  ["BCB1",0xC120],
+  ["BCB2",0xC123],
+  ["BCB3",0xC124],
+  ["BCB4",0xC126],
+  ["BCB5",0xC127],
+  ["BCB6",0xC12C],
+  ["BCB7",0xC12D],
+  ["BCB8",0xC12F],
+  ["BCB9",0xC130],
+  ["BCBA",0xC131],
+  ["BCBB",0xC136],
+  ["BCBC",0xC138],
+  ["BCBD",0xC139],
+  ["BCBE",0xC13C],
+  ["BCBF",0xC140],
+  ["BCC0",0xC148],
+  ["BCC1",0xC149],
+  ["BCC2",0xC14B],
+  ["BCC3",0xC14C],
+  ["BCC4",0xC14D],
+  ["BCC5",0xC154],
+  ["BCC6",0xC155],
+  ["BCC7",0xC158],
+  ["BCC8",0xC15C],
+  ["BCC9",0xC164],
+  ["BCCA",0xC165],
+  ["BCCB",0xC167],
+  ["BCCC",0xC168],
+  ["BCCD",0xC169],
+  ["BCCE",0xC170],
+  ["BCCF",0xC174],
+  ["BCD0",0xC178],
+  ["BCD1",0xC185],
+  ["BCD2",0xC18C],
+  ["BCD3",0xC18D],
+  ["BCD4",0xC18E],
+  ["BCD5",0xC190],
+  ["BCD6",0xC194],
+  ["BCD7",0xC196],
+  ["BCD8",0xC19C],
+  ["BCD9",0xC19D],
+  ["BCDA",0xC19F],
+  ["BCDB",0xC1A1],
+  ["BCDC",0xC1A5],
+  ["BCDD",0xC1A8],
+  ["BCDE",0xC1A9],
+  ["BCDF",0xC1AC],
+  ["BCE0",0xC1B0],
+  ["BCE1",0xC1BD],
+  ["BCE2",0xC1C4],
+  ["BCE3",0xC1C8],
+  ["BCE4",0xC1CC],
+  ["BCE5",0xC1D4],
+  ["BCE6",0xC1D7],
+  ["BCE7",0xC1D8],
+  ["BCE8",0xC1E0],
+  ["BCE9",0xC1E4],
+  ["BCEA",0xC1E8],
+  ["BCEB",0xC1F0],
+  ["BCEC",0xC1F1],
+  ["BCED",0xC1F3],
+  ["BCEE",0xC1FC],
+  ["BCEF",0xC1FD],
+  ["BCF0",0xC200],
+  ["BCF1",0xC204],
+  ["BCF2",0xC20C],
+  ["BCF3",0xC20D],
+  ["BCF4",0xC20F],
+  ["BCF5",0xC211],
+  ["BCF6",0xC218],
+  ["BCF7",0xC219],
+  ["BCF8",0xC21C],
+  ["BCF9",0xC21F],
+  ["BCFA",0xC220],
+  ["BCFB",0xC228],
+  ["BCFC",0xC229],
+  ["BCFD",0xC22B],
+  ["BCFE",0xC22D],
+  ["BDA1",0xC22F],
+  ["BDA2",0xC231],
+  ["BDA3",0xC232],
+  ["BDA4",0xC234],
+  ["BDA5",0xC248],
+  ["BDA6",0xC250],
+  ["BDA7",0xC251],
+  ["BDA8",0xC254],
+  ["BDA9",0xC258],
+  ["BDAA",0xC260],
+  ["BDAB",0xC265],
+  ["BDAC",0xC26C],
+  ["BDAD",0xC26D],
+  ["BDAE",0xC270],
+  ["BDAF",0xC274],
+  ["BDB0",0xC27C],
+  ["BDB1",0xC27D],
+  ["BDB2",0xC27F],
+  ["BDB3",0xC281],
+  ["BDB4",0xC288],
+  ["BDB5",0xC289],
+  ["BDB6",0xC290],
+  ["BDB7",0xC298],
+  ["BDB8",0xC29B],
+  ["BDB9",0xC29D],
+  ["BDBA",0xC2A4],
+  ["BDBB",0xC2A5],
+  ["BDBC",0xC2A8],
+  ["BDBD",0xC2AC],
+  ["BDBE",0xC2AD],
+  ["BDBF",0xC2B4],
+  ["BDC0",0xC2B5],
+  ["BDC1",0xC2B7],
+  ["BDC2",0xC2B9],
+  ["BDC3",0xC2DC],
+  ["BDC4",0xC2DD],
+  ["BDC5",0xC2E0],
+  ["BDC6",0xC2E3],
+  ["BDC7",0xC2E4],
+  ["BDC8",0xC2EB],
+  ["BDC9",0xC2EC],
+  ["BDCA",0xC2ED],
+  ["BDCB",0xC2EF],
+  ["BDCC",0xC2F1],
+  ["BDCD",0xC2F6],
+  ["BDCE",0xC2F8],
+  ["BDCF",0xC2F9],
+  ["BDD0",0xC2FB],
+  ["BDD1",0xC2FC],
+  ["BDD2",0xC300],
+  ["BDD3",0xC308],
+  ["BDD4",0xC309],
+  ["BDD5",0xC30C],
+  ["BDD6",0xC30D],
+  ["BDD7",0xC313],
+  ["BDD8",0xC314],
+  ["BDD9",0xC315],
+  ["BDDA",0xC318],
+  ["BDDB",0xC31C],
+  ["BDDC",0xC324],
+  ["BDDD",0xC325],
+  ["BDDE",0xC328],
+  ["BDDF",0xC329],
+  ["BDE0",0xC345],
+  ["BDE1",0xC368],
+  ["BDE2",0xC369],
+  ["BDE3",0xC36C],
+  ["BDE4",0xC370],
+  ["BDE5",0xC372],
+  ["BDE6",0xC378],
+  ["BDE7",0xC379],
+  ["BDE8",0xC37C],
+  ["BDE9",0xC37D],
+  ["BDEA",0xC384],
+  ["BDEB",0xC388],
+  ["BDEC",0xC38C],
+  ["BDED",0xC3C0],
+  ["BDEE",0xC3D8],
+  ["BDEF",0xC3D9],
+  ["BDF0",0xC3DC],
+  ["BDF1",0xC3DF],
+  ["BDF2",0xC3E0],
+  ["BDF3",0xC3E2],
+  ["BDF4",0xC3E8],
+  ["BDF5",0xC3E9],
+  ["BDF6",0xC3ED],
+  ["BDF7",0xC3F4],
+  ["BDF8",0xC3F5],
+  ["BDF9",0xC3F8],
+  ["BDFA",0xC408],
+  ["BDFB",0xC410],
+  ["BDFC",0xC424],
+  ["BDFD",0xC42C],
+  ["BDFE",0xC430],
+  ["BEA1",0xC434],
+  ["BEA2",0xC43C],
+  ["BEA3",0xC43D],
+  ["BEA4",0xC448],
+  ["BEA5",0xC464],
+  ["BEA6",0xC465],
+  ["BEA7",0xC468],
+  ["BEA8",0xC46C],
+  ["BEA9",0xC474],
+  ["BEAA",0xC475],
+  ["BEAB",0xC479],
+  ["BEAC",0xC480],
+  ["BEAD",0xC494],
+  ["BEAE",0xC49C],
+  ["BEAF",0xC4B8],
+  ["BEB0",0xC4BC],
+  ["BEB1",0xC4E9],
+  ["BEB2",0xC4F0],
+  ["BEB3",0xC4F1],
+  ["BEB4",0xC4F4],
+  ["BEB5",0xC4F8],
+  ["BEB6",0xC4FA],
+  ["BEB7",0xC4FF],
+  ["BEB8",0xC500],
+  ["BEB9",0xC501],
+  ["BEBA",0xC50C],
+  ["BEBB",0xC510],
+  ["BEBC",0xC514],
+  ["BEBD",0xC51C],
+  ["BEBE",0xC528],
+  ["BEBF",0xC529],
+  ["BEC0",0xC52C],
+  ["BEC1",0xC530],
+  ["BEC2",0xC538],
+  ["BEC3",0xC539],
+  ["BEC4",0xC53B],
+  ["BEC5",0xC53D],
+  ["BEC6",0xC544],
+  ["BEC7",0xC545],
+  ["BEC8",0xC548],
+  ["BEC9",0xC549],
+  ["BECA",0xC54A],
+  ["BECB",0xC54C],
+  ["BECC",0xC54D],
+  ["BECD",0xC54E],
+  ["BECE",0xC553],
+  ["BECF",0xC554],
+  ["BED0",0xC555],
+  ["BED1",0xC557],
+  ["BED2",0xC558],
+  ["BED3",0xC559],
+  ["BED4",0xC55D],
+  ["BED5",0xC55E],
+  ["BED6",0xC560],
+  ["BED7",0xC561],
+  ["BED8",0xC564],
+  ["BED9",0xC568],
+  ["BEDA",0xC570],
+  ["BEDB",0xC571],
+  ["BEDC",0xC573],
+  ["BEDD",0xC574],
+  ["BEDE",0xC575],
+  ["BEDF",0xC57C],
+  ["BEE0",0xC57D],
+  ["BEE1",0xC580],
+  ["BEE2",0xC584],
+  ["BEE3",0xC587],
+  ["BEE4",0xC58C],
+  ["BEE5",0xC58D],
+  ["BEE6",0xC58F],
+  ["BEE7",0xC591],
+  ["BEE8",0xC595],
+  ["BEE9",0xC597],
+  ["BEEA",0xC598],
+  ["BEEB",0xC59C],
+  ["BEEC",0xC5A0],
+  ["BEED",0xC5A9],
+  ["BEEE",0xC5B4],
+  ["BEEF",0xC5B5],
+  ["BEF0",0xC5B8],
+  ["BEF1",0xC5B9],
+  ["BEF2",0xC5BB],
+  ["BEF3",0xC5BC],
+  ["BEF4",0xC5BD],
+  ["BEF5",0xC5BE],
+  ["BEF6",0xC5C4],
+  ["BEF7",0xC5C5],
+  ["BEF8",0xC5C6],
+  ["BEF9",0xC5C7],
+  ["BEFA",0xC5C8],
+  ["BEFB",0xC5C9],
+  ["BEFC",0xC5CA],
+  ["BEFD",0xC5CC],
+  ["BEFE",0xC5CE],
+  ["BFA1",0xC5D0],
+  ["BFA2",0xC5D1],
+  ["BFA3",0xC5D4],
+  ["BFA4",0xC5D8],
+  ["BFA5",0xC5E0],
+  ["BFA6",0xC5E1],
+  ["BFA7",0xC5E3],
+  ["BFA8",0xC5E5],
+  ["BFA9",0xC5EC],
+  ["BFAA",0xC5ED],
+  ["BFAB",0xC5EE],
+  ["BFAC",0xC5F0],
+  ["BFAD",0xC5F4],
+  ["BFAE",0xC5F6],
+  ["BFAF",0xC5F7],
+  ["BFB0",0xC5FC],
+  ["BFB1",0xC5FD],
+  ["BFB2",0xC5FE],
+  ["BFB3",0xC5FF],
+  ["BFB4",0xC600],
+  ["BFB5",0xC601],
+  ["BFB6",0xC605],
+  ["BFB7",0xC606],
+  ["BFB8",0xC607],
+  ["BFB9",0xC608],
+  ["BFBA",0xC60C],
+  ["BFBB",0xC610],
+  ["BFBC",0xC618],
+  ["BFBD",0xC619],
+  ["BFBE",0xC61B],
+  ["BFBF",0xC61C],
+  ["BFC0",0xC624],
+  ["BFC1",0xC625],
+  ["BFC2",0xC628],
+  ["BFC3",0xC62C],
+  ["BFC4",0xC62D],
+  ["BFC5",0xC62E],
+  ["BFC6",0xC630],
+  ["BFC7",0xC633],
+  ["BFC8",0xC634],
+  ["BFC9",0xC635],
+  ["BFCA",0xC637],
+  ["BFCB",0xC639],
+  ["BFCC",0xC63B],
+  ["BFCD",0xC640],
+  ["BFCE",0xC641],
+  ["BFCF",0xC644],
+  ["BFD0",0xC648],
+  ["BFD1",0xC650],
+  ["BFD2",0xC651],
+  ["BFD3",0xC653],
+  ["BFD4",0xC654],
+  ["BFD5",0xC655],
+  ["BFD6",0xC65C],
+  ["BFD7",0xC65D],
+  ["BFD8",0xC660],
+  ["BFD9",0xC66C],
+  ["BFDA",0xC66F],
+  ["BFDB",0xC671],
+  ["BFDC",0xC678],
+  ["BFDD",0xC679],
+  ["BFDE",0xC67C],
+  ["BFDF",0xC680],
+  ["BFE0",0xC688],
+  ["BFE1",0xC689],
+  ["BFE2",0xC68B],
+  ["BFE3",0xC68D],
+  ["BFE4",0xC694],
+  ["BFE5",0xC695],
+  ["BFE6",0xC698],
+  ["BFE7",0xC69C],
+  ["BFE8",0xC6A4],
+  ["BFE9",0xC6A5],
+  ["BFEA",0xC6A7],
+  ["BFEB",0xC6A9],
+  ["BFEC",0xC6B0],
+  ["BFED",0xC6B1],
+  ["BFEE",0xC6B4],
+  ["BFEF",0xC6B8],
+  ["BFF0",0xC6B9],
+  ["BFF1",0xC6BA],
+  ["BFF2",0xC6C0],
+  ["BFF3",0xC6C1],
+  ["BFF4",0xC6C3],
+  ["BFF5",0xC6C5],
+  ["BFF6",0xC6CC],
+  ["BFF7",0xC6CD],
+  ["BFF8",0xC6D0],
+  ["BFF9",0xC6D4],
+  ["BFFA",0xC6DC],
+  ["BFFB",0xC6DD],
+  ["BFFC",0xC6E0],
+  ["BFFD",0xC6E1],
+  ["BFFE",0xC6E8],
+  ["C0A1",0xC6E9],
+  ["C0A2",0xC6EC],
+  ["C0A3",0xC6F0],
+  ["C0A4",0xC6F8],
+  ["C0A5",0xC6F9],
+  ["C0A6",0xC6FD],
+  ["C0A7",0xC704],
+  ["C0A8",0xC705],
+  ["C0A9",0xC708],
+  ["C0AA",0xC70C],
+  ["C0AB",0xC714],
+  ["C0AC",0xC715],
+  ["C0AD",0xC717],
+  ["C0AE",0xC719],
+  ["C0AF",0xC720],
+  ["C0B0",0xC721],
+  ["C0B1",0xC724],
+  ["C0B2",0xC728],
+  ["C0B3",0xC730],
+  ["C0B4",0xC731],
+  ["C0B5",0xC733],
+  ["C0B6",0xC735],
+  ["C0B7",0xC737],
+  ["C0B8",0xC73C],
+  ["C0B9",0xC73D],
+  ["C0BA",0xC740],
+  ["C0BB",0xC744],
+  ["C0BC",0xC74A],
+  ["C0BD",0xC74C],
+  ["C0BE",0xC74D],
+  ["C0BF",0xC74F],
+  ["C0C0",0xC751],
+  ["C0C1",0xC752],
+  ["C0C2",0xC753],
+  ["C0C3",0xC754],
+  ["C0C4",0xC755],
+  ["C0C5",0xC756],
+  ["C0C6",0xC757],
+  ["C0C7",0xC758],
+  ["C0C8",0xC75C],
+  ["C0C9",0xC760],
+  ["C0CA",0xC768],
+  ["C0CB",0xC76B],
+  ["C0CC",0xC774],
+  ["C0CD",0xC775],
+  ["C0CE",0xC778],
+  ["C0CF",0xC77C],
+  ["C0D0",0xC77D],
+  ["C0D1",0xC77E],
+  ["C0D2",0xC783],
+  ["C0D3",0xC784],
+  ["C0D4",0xC785],
+  ["C0D5",0xC787],
+  ["C0D6",0xC788],
+  ["C0D7",0xC789],
+  ["C0D8",0xC78A],
+  ["C0D9",0xC78E],
+  ["C0DA",0xC790],
+  ["C0DB",0xC791],
+  ["C0DC",0xC794],
+  ["C0DD",0xC796],
+  ["C0DE",0xC797],
+  ["C0DF",0xC798],
+  ["C0E0",0xC79A],
+  ["C0E1",0xC7A0],
+  ["C0E2",0xC7A1],
+  ["C0E3",0xC7A3],
+  ["C0E4",0xC7A4],
+  ["C0E5",0xC7A5],
+  ["C0E6",0xC7A6],
+  ["C0E7",0xC7AC],
+  ["C0E8",0xC7AD],
+  ["C0E9",0xC7B0],
+  ["C0EA",0xC7B4],
+  ["C0EB",0xC7BC],
+  ["C0EC",0xC7BD],
+  ["C0ED",0xC7BF],
+  ["C0EE",0xC7C0],
+  ["C0EF",0xC7C1],
+  ["C0F0",0xC7C8],
+  ["C0F1",0xC7C9],
+  ["C0F2",0xC7CC],
+  ["C0F3",0xC7CE],
+  ["C0F4",0xC7D0],
+  ["C0F5",0xC7D8],
+  ["C0F6",0xC7DD],
+  ["C0F7",0xC7E4],
+  ["C0F8",0xC7E8],
+  ["C0F9",0xC7EC],
+  ["C0FA",0xC800],
+  ["C0FB",0xC801],
+  ["C0FC",0xC804],
+  ["C0FD",0xC808],
+  ["C0FE",0xC80A],
+  ["C1A1",0xC810],
+  ["C1A2",0xC811],
+  ["C1A3",0xC813],
+  ["C1A4",0xC815],
+  ["C1A5",0xC816],
+  ["C1A6",0xC81C],
+  ["C1A7",0xC81D],
+  ["C1A8",0xC820],
+  ["C1A9",0xC824],
+  ["C1AA",0xC82C],
+  ["C1AB",0xC82D],
+  ["C1AC",0xC82F],
+  ["C1AD",0xC831],
+  ["C1AE",0xC838],
+  ["C1AF",0xC83C],
+  ["C1B0",0xC840],
+  ["C1B1",0xC848],
+  ["C1B2",0xC849],
+  ["C1B3",0xC84C],
+  ["C1B4",0xC84D],
+  ["C1B5",0xC854],
+  ["C1B6",0xC870],
+  ["C1B7",0xC871],
+  ["C1B8",0xC874],
+  ["C1B9",0xC878],
+  ["C1BA",0xC87A],
+  ["C1BB",0xC880],
+  ["C1BC",0xC881],
+  ["C1BD",0xC883],
+  ["C1BE",0xC885],
+  ["C1BF",0xC886],
+  ["C1C0",0xC887],
+  ["C1C1",0xC88B],
+  ["C1C2",0xC88C],
+  ["C1C3",0xC88D],
+  ["C1C4",0xC894],
+  ["C1C5",0xC89D],
+  ["C1C6",0xC89F],
+  ["C1C7",0xC8A1],
+  ["C1C8",0xC8A8],
+  ["C1C9",0xC8BC],
+  ["C1CA",0xC8BD],
+  ["C1CB",0xC8C4],
+  ["C1CC",0xC8C8],
+  ["C1CD",0xC8CC],
+  ["C1CE",0xC8D4],
+  ["C1CF",0xC8D5],
+  ["C1D0",0xC8D7],
+  ["C1D1",0xC8D9],
+  ["C1D2",0xC8E0],
+  ["C1D3",0xC8E1],
+  ["C1D4",0xC8E4],
+  ["C1D5",0xC8F5],
+  ["C1D6",0xC8FC],
+  ["C1D7",0xC8FD],
+  ["C1D8",0xC900],
+  ["C1D9",0xC904],
+  ["C1DA",0xC905],
+  ["C1DB",0xC906],
+  ["C1DC",0xC90C],
+  ["C1DD",0xC90D],
+  ["C1DE",0xC90F],
+  ["C1DF",0xC911],
+  ["C1E0",0xC918],
+  ["C1E1",0xC92C],
+  ["C1E2",0xC934],
+  ["C1E3",0xC950],
+  ["C1E4",0xC951],
+  ["C1E5",0xC954],
+  ["C1E6",0xC958],
+  ["C1E7",0xC960],
+  ["C1E8",0xC961],
+  ["C1E9",0xC963],
+  ["C1EA",0xC96C],
+  ["C1EB",0xC970],
+  ["C1EC",0xC974],
+  ["C1ED",0xC97C],
+  ["C1EE",0xC988],
+  ["C1EF",0xC989],
+  ["C1F0",0xC98C],
+  ["C1F1",0xC990],
+  ["C1F2",0xC998],
+  ["C1F3",0xC999],
+  ["C1F4",0xC99B],
+  ["C1F5",0xC99D],
+  ["C1F6",0xC9C0],
+  ["C1F7",0xC9C1],
+  ["C1F8",0xC9C4],
+  ["C1F9",0xC9C7],
+  ["C1FA",0xC9C8],
+  ["C1FB",0xC9CA],
+  ["C1FC",0xC9D0],
+  ["C1FD",0xC9D1],
+  ["C1FE",0xC9D3],
+  ["C2A1",0xC9D5],
+  ["C2A2",0xC9D6],
+  ["C2A3",0xC9D9],
+  ["C2A4",0xC9DA],
+  ["C2A5",0xC9DC],
+  ["C2A6",0xC9DD],
+  ["C2A7",0xC9E0],
+  ["C2A8",0xC9E2],
+  ["C2A9",0xC9E4],
+  ["C2AA",0xC9E7],
+  ["C2AB",0xC9EC],
+  ["C2AC",0xC9ED],
+  ["C2AD",0xC9EF],
+  ["C2AE",0xC9F0],
+  ["C2AF",0xC9F1],
+  ["C2B0",0xC9F8],
+  ["C2B1",0xC9F9],
+  ["C2B2",0xC9FC],
+  ["C2B3",0xCA00],
+  ["C2B4",0xCA08],
+  ["C2B5",0xCA09],
+  ["C2B6",0xCA0B],
+  ["C2B7",0xCA0C],
+  ["C2B8",0xCA0D],
+  ["C2B9",0xCA14],
+  ["C2BA",0xCA18],
+  ["C2BB",0xCA29],
+  ["C2BC",0xCA4C],
+  ["C2BD",0xCA4D],
+  ["C2BE",0xCA50],
+  ["C2BF",0xCA54],
+  ["C2C0",0xCA5C],
+  ["C2C1",0xCA5D],
+  ["C2C2",0xCA5F],
+  ["C2C3",0xCA60],
+  ["C2C4",0xCA61],
+  ["C2C5",0xCA68],
+  ["C2C6",0xCA7D],
+  ["C2C7",0xCA84],
+  ["C2C8",0xCA98],
+  ["C2C9",0xCABC],
+  ["C2CA",0xCABD],
+  ["C2CB",0xCAC0],
+  ["C2CC",0xCAC4],
+  ["C2CD",0xCACC],
+  ["C2CE",0xCACD],
+  ["C2CF",0xCACF],
+  ["C2D0",0xCAD1],
+  ["C2D1",0xCAD3],
+  ["C2D2",0xCAD8],
+  ["C2D3",0xCAD9],
+  ["C2D4",0xCAE0],
+  ["C2D5",0xCAEC],
+  ["C2D6",0xCAF4],
+  ["C2D7",0xCB08],
+  ["C2D8",0xCB10],
+  ["C2D9",0xCB14],
+  ["C2DA",0xCB18],
+  ["C2DB",0xCB20],
+  ["C2DC",0xCB21],
+  ["C2DD",0xCB41],
+  ["C2DE",0xCB48],
+  ["C2DF",0xCB49],
+  ["C2E0",0xCB4C],
+  ["C2E1",0xCB50],
+  ["C2E2",0xCB58],
+  ["C2E3",0xCB59],
+  ["C2E4",0xCB5D],
+  ["C2E5",0xCB64],
+  ["C2E6",0xCB78],
+  ["C2E7",0xCB79],
+  ["C2E8",0xCB9C],
+  ["C2E9",0xCBB8],
+  ["C2EA",0xCBD4],
+  ["C2EB",0xCBE4],
+  ["C2EC",0xCBE7],
+  ["C2ED",0xCBE9],
+  ["C2EE",0xCC0C],
+  ["C2EF",0xCC0D],
+  ["C2F0",0xCC10],
+  ["C2F1",0xCC14],
+  ["C2F2",0xCC1C],
+  ["C2F3",0xCC1D],
+  ["C2F4",0xCC21],
+  ["C2F5",0xCC22],
+  ["C2F6",0xCC27],
+  ["C2F7",0xCC28],
+  ["C2F8",0xCC29],
+  ["C2F9",0xCC2C],
+  ["C2FA",0xCC2E],
+  ["C2FB",0xCC30],
+  ["C2FC",0xCC38],
+  ["C2FD",0xCC39],
+  ["C2FE",0xCC3B],
+  ["C3A1",0xCC3C],
+  ["C3A2",0xCC3D],
+  ["C3A3",0xCC3E],
+  ["C3A4",0xCC44],
+  ["C3A5",0xCC45],
+  ["C3A6",0xCC48],
+  ["C3A7",0xCC4C],
+  ["C3A8",0xCC54],
+  ["C3A9",0xCC55],
+  ["C3AA",0xCC57],
+  ["C3AB",0xCC58],
+  ["C3AC",0xCC59],
+  ["C3AD",0xCC60],
+  ["C3AE",0xCC64],
+  ["C3AF",0xCC66],
+  ["C3B0",0xCC68],
+  ["C3B1",0xCC70],
+  ["C3B2",0xCC75],
+  ["C3B3",0xCC98],
+  ["C3B4",0xCC99],
+  ["C3B5",0xCC9C],
+  ["C3B6",0xCCA0],
+  ["C3B7",0xCCA8],
+  ["C3B8",0xCCA9],
+  ["C3B9",0xCCAB],
+  ["C3BA",0xCCAC],
+  ["C3BB",0xCCAD],
+  ["C3BC",0xCCB4],
+  ["C3BD",0xCCB5],
+  ["C3BE",0xCCB8],
+  ["C3BF",0xCCBC],
+  ["C3C0",0xCCC4],
+  ["C3C1",0xCCC5],
+  ["C3C2",0xCCC7],
+  ["C3C3",0xCCC9],
+  ["C3C4",0xCCD0],
+  ["C3C5",0xCCD4],
+  ["C3C6",0xCCE4],
+  ["C3C7",0xCCEC],
+  ["C3C8",0xCCF0],
+  ["C3C9",0xCD01],
+  ["C3CA",0xCD08],
+  ["C3CB",0xCD09],
+  ["C3CC",0xCD0C],
+  ["C3CD",0xCD10],
+  ["C3CE",0xCD18],
+  ["C3CF",0xCD19],
+  ["C3D0",0xCD1B],
+  ["C3D1",0xCD1D],
+  ["C3D2",0xCD24],
+  ["C3D3",0xCD28],
+  ["C3D4",0xCD2C],
+  ["C3D5",0xCD39],
+  ["C3D6",0xCD5C],
+  ["C3D7",0xCD60],
+  ["C3D8",0xCD64],
+  ["C3D9",0xCD6C],
+  ["C3DA",0xCD6D],
+  ["C3DB",0xCD6F],
+  ["C3DC",0xCD71],
+  ["C3DD",0xCD78],
+  ["C3DE",0xCD88],
+  ["C3DF",0xCD94],
+  ["C3E0",0xCD95],
+  ["C3E1",0xCD98],
+  ["C3E2",0xCD9C],
+  ["C3E3",0xCDA4],
+  ["C3E4",0xCDA5],
+  ["C3E5",0xCDA7],
+  ["C3E6",0xCDA9],
+  ["C3E7",0xCDB0],
+  ["C3E8",0xCDC4],
+  ["C3E9",0xCDCC],
+  ["C3EA",0xCDD0],
+  ["C3EB",0xCDE8],
+  ["C3EC",0xCDEC],
+  ["C3ED",0xCDF0],
+  ["C3EE",0xCDF8],
+  ["C3EF",0xCDF9],
+  ["C3F0",0xCDFB],
+  ["C3F1",0xCDFD],
+  ["C3F2",0xCE04],
+  ["C3F3",0xCE08],
+  ["C3F4",0xCE0C],
+  ["C3F5",0xCE14],
+  ["C3F6",0xCE19],
+  ["C3F7",0xCE20],
+  ["C3F8",0xCE21],
+  ["C3F9",0xCE24],
+  ["C3FA",0xCE28],
+  ["C3FB",0xCE30],
+  ["C3FC",0xCE31],
+  ["C3FD",0xCE33],
+  ["C3FE",0xCE35],
+  ["C4A1",0xCE58],
+  ["C4A2",0xCE59],
+  ["C4A3",0xCE5C],
+  ["C4A4",0xCE5F],
+  ["C4A5",0xCE60],
+  ["C4A6",0xCE61],
+  ["C4A7",0xCE68],
+  ["C4A8",0xCE69],
+  ["C4A9",0xCE6B],
+  ["C4AA",0xCE6D],
+  ["C4AB",0xCE74],
+  ["C4AC",0xCE75],
+  ["C4AD",0xCE78],
+  ["C4AE",0xCE7C],
+  ["C4AF",0xCE84],
+  ["C4B0",0xCE85],
+  ["C4B1",0xCE87],
+  ["C4B2",0xCE89],
+  ["C4B3",0xCE90],
+  ["C4B4",0xCE91],
+  ["C4B5",0xCE94],
+  ["C4B6",0xCE98],
+  ["C4B7",0xCEA0],
+  ["C4B8",0xCEA1],
+  ["C4B9",0xCEA3],
+  ["C4BA",0xCEA4],
+  ["C4BB",0xCEA5],
+  ["C4BC",0xCEAC],
+  ["C4BD",0xCEAD],
+  ["C4BE",0xCEC1],
+  ["C4BF",0xCEE4],
+  ["C4C0",0xCEE5],
+  ["C4C1",0xCEE8],
+  ["C4C2",0xCEEB],
+  ["C4C3",0xCEEC],
+  ["C4C4",0xCEF4],
+  ["C4C5",0xCEF5],
+  ["C4C6",0xCEF7],
+  ["C4C7",0xCEF8],
+  ["C4C8",0xCEF9],
+  ["C4C9",0xCF00],
+  ["C4CA",0xCF01],
+  ["C4CB",0xCF04],
+  ["C4CC",0xCF08],
+  ["C4CD",0xCF10],
+  ["C4CE",0xCF11],
+  ["C4CF",0xCF13],
+  ["C4D0",0xCF15],
+  ["C4D1",0xCF1C],
+  ["C4D2",0xCF20],
+  ["C4D3",0xCF24],
+  ["C4D4",0xCF2C],
+  ["C4D5",0xCF2D],
+  ["C4D6",0xCF2F],
+  ["C4D7",0xCF30],
+  ["C4D8",0xCF31],
+  ["C4D9",0xCF38],
+  ["C4DA",0xCF54],
+  ["C4DB",0xCF55],
+  ["C4DC",0xCF58],
+  ["C4DD",0xCF5C],
+  ["C4DE",0xCF64],
+  ["C4DF",0xCF65],
+  ["C4E0",0xCF67],
+  ["C4E1",0xCF69],
+  ["C4E2",0xCF70],
+  ["C4E3",0xCF71],
+  ["C4E4",0xCF74],
+  ["C4E5",0xCF78],
+  ["C4E6",0xCF80],
+  ["C4E7",0xCF85],
+  ["C4E8",0xCF8C],
+  ["C4E9",0xCFA1],
+  ["C4EA",0xCFA8],
+  ["C4EB",0xCFB0],
+  ["C4EC",0xCFC4],
+  ["C4ED",0xCFE0],
+  ["C4EE",0xCFE1],
+  ["C4EF",0xCFE4],
+  ["C4F0",0xCFE8],
+  ["C4F1",0xCFF0],
+  ["C4F2",0xCFF1],
+  ["C4F3",0xCFF3],
+  ["C4F4",0xCFF5],
+  ["C4F5",0xCFFC],
+  ["C4F6",0xD000],
+  ["C4F7",0xD004],
+  ["C4F8",0xD011],
+  ["C4F9",0xD018],
+  ["C4FA",0xD02D],
+  ["C4FB",0xD034],
+  ["C4FC",0xD035],
+  ["C4FD",0xD038],
+  ["C4FE",0xD03C],
+  ["C5A1",0xD044],
+  ["C5A2",0xD045],
+  ["C5A3",0xD047],
+  ["C5A4",0xD049],
+  ["C5A5",0xD050],
+  ["C5A6",0xD054],
+  ["C5A7",0xD058],
+  ["C5A8",0xD060],
+  ["C5A9",0xD06C],
+  ["C5AA",0xD06D],
+  ["C5AB",0xD070],
+  ["C5AC",0xD074],
+  ["C5AD",0xD07C],
+  ["C5AE",0xD07D],
+  ["C5AF",0xD081],
+  ["C5B0",0xD0A4],
+  ["C5B1",0xD0A5],
+  ["C5B2",0xD0A8],
+  ["C5B3",0xD0AC],
+  ["C5B4",0xD0B4],
+  ["C5B5",0xD0B5],
+  ["C5B6",0xD0B7],
+  ["C5B7",0xD0B9],
+  ["C5B8",0xD0C0],
+  ["C5B9",0xD0C1],
+  ["C5BA",0xD0C4],
+  ["C5BB",0xD0C8],
+  ["C5BC",0xD0C9],
+  ["C5BD",0xD0D0],
+  ["C5BE",0xD0D1],
+  ["C5BF",0xD0D3],
+  ["C5C0",0xD0D4],
+  ["C5C1",0xD0D5],
+  ["C5C2",0xD0DC],
+  ["C5C3",0xD0DD],
+  ["C5C4",0xD0E0],
+  ["C5C5",0xD0E4],
+  ["C5C6",0xD0EC],
+  ["C5C7",0xD0ED],
+  ["C5C8",0xD0EF],
+  ["C5C9",0xD0F0],
+  ["C5CA",0xD0F1],
+  ["C5CB",0xD0F8],
+  ["C5CC",0xD10D],
+  ["C5CD",0xD130],
+  ["C5CE",0xD131],
+  ["C5CF",0xD134],
+  ["C5D0",0xD138],
+  ["C5D1",0xD13A],
+  ["C5D2",0xD140],
+  ["C5D3",0xD141],
+  ["C5D4",0xD143],
+  ["C5D5",0xD144],
+  ["C5D6",0xD145],
+  ["C5D7",0xD14C],
+  ["C5D8",0xD14D],
+  ["C5D9",0xD150],
+  ["C5DA",0xD154],
+  ["C5DB",0xD15C],
+  ["C5DC",0xD15D],
+  ["C5DD",0xD15F],
+  ["C5DE",0xD161],
+  ["C5DF",0xD168],
+  ["C5E0",0xD16C],
+  ["C5E1",0xD17C],
+  ["C5E2",0xD184],
+  ["C5E3",0xD188],
+  ["C5E4",0xD1A0],
+  ["C5E5",0xD1A1],
+  ["C5E6",0xD1A4],
+  ["C5E7",0xD1A8],
+  ["C5E8",0xD1B0],
+  ["C5E9",0xD1B1],
+  ["C5EA",0xD1B3],
+  ["C5EB",0xD1B5],
+  ["C5EC",0xD1BA],
+  ["C5ED",0xD1BC],
+  ["C5EE",0xD1C0],
+  ["C5EF",0xD1D8],
+  ["C5F0",0xD1F4],
+  ["C5F1",0xD1F8],
+  ["C5F2",0xD207],
+  ["C5F3",0xD209],
+  ["C5F4",0xD210],
+  ["C5F5",0xD22C],
+  ["C5F6",0xD22D],
+  ["C5F7",0xD230],
+  ["C5F8",0xD234],
+  ["C5F9",0xD23C],
+  ["C5FA",0xD23D],
+  ["C5FB",0xD23F],
+  ["C5FC",0xD241],
+  ["C5FD",0xD248],
+  ["C5FE",0xD25C],
+  ["C6A1",0xD264],
+  ["C6A2",0xD280],
+  ["C6A3",0xD281],
+  ["C6A4",0xD284],
+  ["C6A5",0xD288],
+  ["C6A6",0xD290],
+  ["C6A7",0xD291],
+  ["C6A8",0xD295],
+  ["C6A9",0xD29C],
+  ["C6AA",0xD2A0],
+  ["C6AB",0xD2A4],
+  ["C6AC",0xD2AC],
+  ["C6AD",0xD2B1],
+  ["C6AE",0xD2B8],
+  ["C6AF",0xD2B9],
+  ["C6B0",0xD2BC],
+  ["C6B1",0xD2BF],
+  ["C6B2",0xD2C0],
+  ["C6B3",0xD2C2],
+  ["C6B4",0xD2C8],
+  ["C6B5",0xD2C9],
+  ["C6B6",0xD2CB],
+  ["C6B7",0xD2D4],
+  ["C6B8",0xD2D8],
+  ["C6B9",0xD2DC],
+  ["C6BA",0xD2E4],
+  ["C6BB",0xD2E5],
+  ["C6BC",0xD2F0],
+  ["C6BD",0xD2F1],
+  ["C6BE",0xD2F4],
+  ["C6BF",0xD2F8],
+  ["C6C0",0xD300],
+  ["C6C1",0xD301],
+  ["C6C2",0xD303],
+  ["C6C3",0xD305],
+  ["C6C4",0xD30C],
+  ["C6C5",0xD30D],
+  ["C6C6",0xD30E],
+  ["C6C7",0xD310],
+  ["C6C8",0xD314],
+  ["C6C9",0xD316],
+  ["C6CA",0xD31C],
+  ["C6CB",0xD31D],
+  ["C6CC",0xD31F],
+  ["C6CD",0xD320],
+  ["C6CE",0xD321],
+  ["C6CF",0xD325],
+  ["C6D0",0xD328],
+  ["C6D1",0xD329],
+  ["C6D2",0xD32C],
+  ["C6D3",0xD330],
+  ["C6D4",0xD338],
+  ["C6D5",0xD339],
+  ["C6D6",0xD33B],
+  ["C6D7",0xD33C],
+  ["C6D8",0xD33D],
+  ["C6D9",0xD344],
+  ["C6DA",0xD345],
+  ["C6DB",0xD37C],
+  ["C6DC",0xD37D],
+  ["C6DD",0xD380],
+  ["C6DE",0xD384],
+  ["C6DF",0xD38C],
+  ["C6E0",0xD38D],
+  ["C6E1",0xD38F],
+  ["C6E2",0xD390],
+  ["C6E3",0xD391],
+  ["C6E4",0xD398],
+  ["C6E5",0xD399],
+  ["C6E6",0xD39C],
+  ["C6E7",0xD3A0],
+  ["C6E8",0xD3A8],
+  ["C6E9",0xD3A9],
+  ["C6EA",0xD3AB],
+  ["C6EB",0xD3AD],
+  ["C6EC",0xD3B4],
+  ["C6ED",0xD3B8],
+  ["C6EE",0xD3BC],
+  ["C6EF",0xD3C4],
+  ["C6F0",0xD3C5],
+  ["C6F1",0xD3C8],
+  ["C6F2",0xD3C9],
+  ["C6F3",0xD3D0],
+  ["C6F4",0xD3D8],
+  ["C6F5",0xD3E1],
+  ["C6F6",0xD3E3],
+  ["C6F7",0xD3EC],
+  ["C6F8",0xD3ED],
+  ["C6F9",0xD3F0],
+  ["C6FA",0xD3F4],
+  ["C6FB",0xD3FC],
+  ["C6FC",0xD3FD],
+  ["C6FD",0xD3FF],
+  ["C6FE",0xD401],
+  ["C7A1",0xD408],
+  ["C7A2",0xD41D],
+  ["C7A3",0xD440],
+  ["C7A4",0xD444],
+  ["C7A5",0xD45C],
+  ["C7A6",0xD460],
+  ["C7A7",0xD464],
+  ["C7A8",0xD46D],
+  ["C7A9",0xD46F],
+  ["C7AA",0xD478],
+  ["C7AB",0xD479],
+  ["C7AC",0xD47C],
+  ["C7AD",0xD47F],
+  ["C7AE",0xD480],
+  ["C7AF",0xD482],
+  ["C7B0",0xD488],
+  ["C7B1",0xD489],
+  ["C7B2",0xD48B],
+  ["C7B3",0xD48D],
+  ["C7B4",0xD494],
+  ["C7B5",0xD4A9],
+  ["C7B6",0xD4CC],
+  ["C7B7",0xD4D0],
+  ["C7B8",0xD4D4],
+  ["C7B9",0xD4DC],
+  ["C7BA",0xD4DF],
+  ["C7BB",0xD4E8],
+  ["C7BC",0xD4EC],
+  ["C7BD",0xD4F0],
+  ["C7BE",0xD4F8],
+  ["C7BF",0xD4FB],
+  ["C7C0",0xD4FD],
+  ["C7C1",0xD504],
+  ["C7C2",0xD508],
+  ["C7C3",0xD50C],
+  ["C7C4",0xD514],
+  ["C7C5",0xD515],
+  ["C7C6",0xD517],
+  ["C7C7",0xD53C],
+  ["C7C8",0xD53D],
+  ["C7C9",0xD540],
+  ["C7CA",0xD544],
+  ["C7CB",0xD54C],
+  ["C7CC",0xD54D],
+  ["C7CD",0xD54F],
+  ["C7CE",0xD551],
+  ["C7CF",0xD558],
+  ["C7D0",0xD559],
+  ["C7D1",0xD55C],
+  ["C7D2",0xD560],
+  ["C7D3",0xD565],
+  ["C7D4",0xD568],
+  ["C7D5",0xD569],
+  ["C7D6",0xD56B],
+  ["C7D7",0xD56D],
+  ["C7D8",0xD574],
+  ["C7D9",0xD575],
+  ["C7DA",0xD578],
+  ["C7DB",0xD57C],
+  ["C7DC",0xD584],
+  ["C7DD",0xD585],
+  ["C7DE",0xD587],
+  ["C7DF",0xD588],
+  ["C7E0",0xD589],
+  ["C7E1",0xD590],
+  ["C7E2",0xD5A5],
+  ["C7E3",0xD5C8],
+  ["C7E4",0xD5C9],
+  ["C7E5",0xD5CC],
+  ["C7E6",0xD5D0],
+  ["C7E7",0xD5D2],
+  ["C7E8",0xD5D8],
+  ["C7E9",0xD5D9],
+  ["C7EA",0xD5DB],
+  ["C7EB",0xD5DD],
+  ["C7EC",0xD5E4],
+  ["C7ED",0xD5E5],
+  ["C7EE",0xD5E8],
+  ["C7EF",0xD5EC],
+  ["C7F0",0xD5F4],
+  ["C7F1",0xD5F5],
+  ["C7F2",0xD5F7],
+  ["C7F3",0xD5F9],
+  ["C7F4",0xD600],
+  ["C7F5",0xD601],
+  ["C7F6",0xD604],
+  ["C7F7",0xD608],
+  ["C7F8",0xD610],
+  ["C7F9",0xD611],
+  ["C7FA",0xD613],
+  ["C7FB",0xD614],
+  ["C7FC",0xD615],
+  ["C7FD",0xD61C],
+  ["C7FE",0xD620],
+  ["C8A1",0xD624],
+  ["C8A2",0xD62D],
+  ["C8A3",0xD638],
+  ["C8A4",0xD639],
+  ["C8A5",0xD63C],
+  ["C8A6",0xD640],
+  ["C8A7",0xD645],
+  ["C8A8",0xD648],
+  ["C8A9",0xD649],
+  ["C8AA",0xD64B],
+  ["C8AB",0xD64D],
+  ["C8AC",0xD651],
+  ["C8AD",0xD654],
+  ["C8AE",0xD655],
+  ["C8AF",0xD658],
+  ["C8B0",0xD65C],
+  ["C8B1",0xD667],
+  ["C8B2",0xD669],
+  ["C8B3",0xD670],
+  ["C8B4",0xD671],
+  ["C8B5",0xD674],
+  ["C8B6",0xD683],
+  ["C8B7",0xD685],
+  ["C8B8",0xD68C],
+  ["C8B9",0xD68D],
+  ["C8BA",0xD690],
+  ["C8BB",0xD694],
+  ["C8BC",0xD69D],
+  ["C8BD",0xD69F],
+  ["C8BE",0xD6A1],
+  ["C8BF",0xD6A8],
+  ["C8C0",0xD6AC],
+  ["C8C1",0xD6B0],
+  ["C8C2",0xD6B9],
+  ["C8C3",0xD6BB],
+  ["C8C4",0xD6C4],
+  ["C8C5",0xD6C5],
+  ["C8C6",0xD6C8],
+  ["C8C7",0xD6CC],
+  ["C8C8",0xD6D1],
+  ["C8C9",0xD6D4],
+  ["C8CA",0xD6D7],
+  ["C8CB",0xD6D9],
+  ["C8CC",0xD6E0],
+  ["C8CD",0xD6E4],
+  ["C8CE",0xD6E8],
+  ["C8CF",0xD6F0],
+  ["C8D0",0xD6F5],
+  ["C8D1",0xD6FC],
+  ["C8D2",0xD6FD],
+  ["C8D3",0xD700],
+  ["C8D4",0xD704],
+  ["C8D5",0xD711],
+  ["C8D6",0xD718],
+  ["C8D7",0xD719],
+  ["C8D8",0xD71C],
+  ["C8D9",0xD720],
+  ["C8DA",0xD728],
+  ["C8DB",0xD729],
+  ["C8DC",0xD72B],
+  ["C8DD",0xD72D],
+  ["C8DE",0xD734],
+  ["C8DF",0xD735],
+  ["C8E0",0xD738],
+  ["C8E1",0xD73C],
+  ["C8E2",0xD744],
+  ["C8E3",0xD747],
+  ["C8E4",0xD749],
+  ["C8E5",0xD750],
+  ["C8E6",0xD751],
+  ["C8E7",0xD754],
+  ["C8E8",0xD756],
+  ["C8E9",0xD757],
+  ["C8EA",0xD758],
+  ["C8EB",0xD759],
+  ["C8EC",0xD760],
+  ["C8ED",0xD761],
+  ["C8EE",0xD763],
+  ["C8EF",0xD765],
+  ["C8F0",0xD769],
+  ["C8F1",0xD76C],
+  ["C8F2",0xD770],
+  ["C8F3",0xD774],
+  ["C8F4",0xD77C],
+  ["C8F5",0xD77D],
+  ["C8F6",0xD781],
+  ["C8F7",0xD788],
+  ["C8F8",0xD789],
+  ["C8F9",0xD78C],
+  ["C8FA",0xD790],
+  ["C8FB",0xD798],
+  ["C8FC",0xD799],
+  ["C8FD",0xD79B],
+  ["C8FE",0xD79D],
+  ["CAA1",0x4F3D],
+  ["CAA2",0x4F73],
+  ["CAA3",0x5047],
+  ["CAA4",0x50F9],
+  ["CAA5",0x52A0],
+  ["CAA6",0x53EF],
+  ["CAA7",0x5475],
+  ["CAA8",0x54E5],
+  ["CAA9",0x5609],
+  ["CAAA",0x5AC1],
+  ["CAAB",0x5BB6],
+  ["CAAC",0x6687],
+  ["CAAD",0x67B6],
+  ["CAAE",0x67B7],
+  ["CAAF",0x67EF],
+  ["CAB0",0x6B4C],
+  ["CAB1",0x73C2],
+  ["CAB2",0x75C2],
+  ["CAB3",0x7A3C],
+  ["CAB4",0x82DB],
+  ["CAB5",0x8304],
+  ["CAB6",0x8857],
+  ["CAB7",0x8888],
+  ["CAB8",0x8A36],
+  ["CAB9",0x8CC8],
+  ["CABA",0x8DCF],
+  ["CABB",0x8EFB],
+  ["CABC",0x8FE6],
+  ["CABD",0x99D5],
+  ["CABE",0x523B],
+  ["CABF",0x5374],
+  ["CAC0",0x5404],
+  ["CAC1",0x606A],
+  ["CAC2",0x6164],
+  ["CAC3",0x6BBC],
+  ["CAC4",0x73CF],
+  ["CAC5",0x811A],
+  ["CAC6",0x89BA],
+  ["CAC7",0x89D2],
+  ["CAC8",0x95A3],
+  ["CAC9",0x4F83],
+  ["CACA",0x520A],
+  ["CACB",0x58BE],
+  ["CACC",0x5978],
+  ["CACD",0x59E6],
+  ["CACE",0x5E72],
+  ["CACF",0x5E79],
+  ["CAD0",0x61C7],
+  ["CAD1",0x63C0],
+  ["CAD2",0x6746],
+  ["CAD3",0x67EC],
+  ["CAD4",0x687F],
+  ["CAD5",0x6F97],
+  ["CAD6",0x764E],
+  ["CAD7",0x770B],
+  ["CAD8",0x78F5],
+  ["CAD9",0x7A08],
+  ["CADA",0x7AFF],
+  ["CADB",0x7C21],
+  ["CADC",0x809D],
+  ["CADD",0x826E],
+  ["CADE",0x8271],
+  ["CADF",0x8AEB],
+  ["CAE0",0x9593],
+  ["CAE1",0x4E6B],
+  ["CAE2",0x559D],
+  ["CAE3",0x66F7],
+  ["CAE4",0x6E34],
+  ["CAE5",0x78A3],
+  ["CAE6",0x7AED],
+  ["CAE7",0x845B],
+  ["CAE8",0x8910],
+  ["CAE9",0x874E],
+  ["CAEA",0x97A8],
+  ["CAEB",0x52D8],
+  ["CAEC",0x574E],
+  ["CAED",0x582A],
+  ["CAEE",0x5D4C],
+  ["CAEF",0x611F],
+  ["CAF0",0x61BE],
+  ["CAF1",0x6221],
+  ["CAF2",0x6562],
+  ["CAF3",0x67D1],
+  ["CAF4",0x6A44],
+  ["CAF5",0x6E1B],
+  ["CAF6",0x7518],
+  ["CAF7",0x75B3],
+  ["CAF8",0x76E3],
+  ["CAF9",0x77B0],
+  ["CAFA",0x7D3A],
+  ["CAFB",0x90AF],
+  ["CAFC",0x9451],
+  ["CAFD",0x9452],
+  ["CAFE",0x9F95],
+  ["CBA1",0x5323],
+  ["CBA2",0x5CAC],
+  ["CBA3",0x7532],
+  ["CBA4",0x80DB],
+  ["CBA5",0x9240],
+  ["CBA6",0x9598],
+  ["CBA7",0x525B],
+  ["CBA8",0x5808],
+  ["CBA9",0x59DC],
+  ["CBAA",0x5CA1],
+  ["CBAB",0x5D17],
+  ["CBAC",0x5EB7],
+  ["CBAD",0x5F3A],
+  ["CBAE",0x5F4A],
+  ["CBAF",0x6177],
+  ["CBB0",0x6C5F],
+  ["CBB1",0x757A],
+  ["CBB2",0x7586],
+  ["CBB3",0x7CE0],
+  ["CBB4",0x7D73],
+  ["CBB5",0x7DB1],
+  ["CBB6",0x7F8C],
+  ["CBB7",0x8154],
+  ["CBB8",0x8221],
+  ["CBB9",0x8591],
+  ["CBBA",0x8941],
+  ["CBBB",0x8B1B],
+  ["CBBC",0x92FC],
+  ["CBBD",0x964D],
+  ["CBBE",0x9C47],
+  ["CBBF",0x4ECB],
+  ["CBC0",0x4EF7],
+  ["CBC1",0x500B],
+  ["CBC2",0x51F1],
+  ["CBC3",0x584F],
+  ["CBC4",0x6137],
+  ["CBC5",0x613E],
+  ["CBC6",0x6168],
+  ["CBC7",0x6539],
+  ["CBC8",0x69EA],
+  ["CBC9",0x6F11],
+  ["CBCA",0x75A5],
+  ["CBCB",0x7686],
+  ["CBCC",0x76D6],
+  ["CBCD",0x7B87],
+  ["CBCE",0x82A5],
+  ["CBCF",0x84CB],
+  ["CBD0",0xF900],
+  ["CBD1",0x93A7],
+  ["CBD2",0x958B],
+  ["CBD3",0x5580],
+  ["CBD4",0x5BA2],
+  ["CBD5",0x5751],
+  ["CBD6",0xF901],
+  ["CBD7",0x7CB3],
+  ["CBD8",0x7FB9],
+  ["CBD9",0x91B5],
+  ["CBDA",0x5028],
+  ["CBDB",0x53BB],
+  ["CBDC",0x5C45],
+  ["CBDD",0x5DE8],
+  ["CBDE",0x62D2],
+  ["CBDF",0x636E],
+  ["CBE0",0x64DA],
+  ["CBE1",0x64E7],
+  ["CBE2",0x6E20],
+  ["CBE3",0x70AC],
+  ["CBE4",0x795B],
+  ["CBE5",0x8DDD],
+  ["CBE6",0x8E1E],
+  ["CBE7",0xF902],
+  ["CBE8",0x907D],
+  ["CBE9",0x9245],
+  ["CBEA",0x92F8],
+  ["CBEB",0x4E7E],
+  ["CBEC",0x4EF6],
+  ["CBED",0x5065],
+  ["CBEE",0x5DFE],
+  ["CBEF",0x5EFA],
+  ["CBF0",0x6106],
+  ["CBF1",0x6957],
+  ["CBF2",0x8171],
+  ["CBF3",0x8654],
+  ["CBF4",0x8E47],
+  ["CBF5",0x9375],
+  ["CBF6",0x9A2B],
+  ["CBF7",0x4E5E],
+  ["CBF8",0x5091],
+  ["CBF9",0x6770],
+  ["CBFA",0x6840],
+  ["CBFB",0x5109],
+  ["CBFC",0x528D],
+  ["CBFD",0x5292],
+  ["CBFE",0x6AA2],
+  ["CCA1",0x77BC],
+  ["CCA2",0x9210],
+  ["CCA3",0x9ED4],
+  ["CCA4",0x52AB],
+  ["CCA5",0x602F],
+  ["CCA6",0x8FF2],
+  ["CCA7",0x5048],
+  ["CCA8",0x61A9],
+  ["CCA9",0x63ED],
+  ["CCAA",0x64CA],
+  ["CCAB",0x683C],
+  ["CCAC",0x6A84],
+  ["CCAD",0x6FC0],
+  ["CCAE",0x8188],
+  ["CCAF",0x89A1],
+  ["CCB0",0x9694],
+  ["CCB1",0x5805],
+  ["CCB2",0x727D],
+  ["CCB3",0x72AC],
+  ["CCB4",0x7504],
+  ["CCB5",0x7D79],
+  ["CCB6",0x7E6D],
+  ["CCB7",0x80A9],
+  ["CCB8",0x898B],
+  ["CCB9",0x8B74],
+  ["CCBA",0x9063],
+  ["CCBB",0x9D51],
+  ["CCBC",0x6289],
+  ["CCBD",0x6C7A],
+  ["CCBE",0x6F54],
+  ["CCBF",0x7D50],
+  ["CCC0",0x7F3A],
+  ["CCC1",0x8A23],
+  ["CCC2",0x517C],
+  ["CCC3",0x614A],
+  ["CCC4",0x7B9D],
+  ["CCC5",0x8B19],
+  ["CCC6",0x9257],
+  ["CCC7",0x938C],
+  ["CCC8",0x4EAC],
+  ["CCC9",0x4FD3],
+  ["CCCA",0x501E],
+  ["CCCB",0x50BE],
+  ["CCCC",0x5106],
+  ["CCCD",0x52C1],
+  ["CCCE",0x52CD],
+  ["CCCF",0x537F],
+  ["CCD0",0x5770],
+  ["CCD1",0x5883],
+  ["CCD2",0x5E9A],
+  ["CCD3",0x5F91],
+  ["CCD4",0x6176],
+  ["CCD5",0x61AC],
+  ["CCD6",0x64CE],
+  ["CCD7",0x656C],
+  ["CCD8",0x666F],
+  ["CCD9",0x66BB],
+  ["CCDA",0x66F4],
+  ["CCDB",0x6897],
+  ["CCDC",0x6D87],
+  ["CCDD",0x7085],
+  ["CCDE",0x70F1],
+  ["CCDF",0x749F],
+  ["CCE0",0x74A5],
+  ["CCE1",0x74CA],
+  ["CCE2",0x75D9],
+  ["CCE3",0x786C],
+  ["CCE4",0x78EC],
+  ["CCE5",0x7ADF],
+  ["CCE6",0x7AF6],
+  ["CCE7",0x7D45],
+  ["CCE8",0x7D93],
+  ["CCE9",0x8015],
+  ["CCEA",0x803F],
+  ["CCEB",0x811B],
+  ["CCEC",0x8396],
+  ["CCED",0x8B66],
+  ["CCEE",0x8F15],
+  ["CCEF",0x9015],
+  ["CCF0",0x93E1],
+  ["CCF1",0x9803],
+  ["CCF2",0x9838],
+  ["CCF3",0x9A5A],
+  ["CCF4",0x9BE8],
+  ["CCF5",0x4FC2],
+  ["CCF6",0x5553],
+  ["CCF7",0x583A],
+  ["CCF8",0x5951],
+  ["CCF9",0x5B63],
+  ["CCFA",0x5C46],
+  ["CCFB",0x60B8],
+  ["CCFC",0x6212],
+  ["CCFD",0x6842],
+  ["CCFE",0x68B0],
+  ["CDA1",0x68E8],
+  ["CDA2",0x6EAA],
+  ["CDA3",0x754C],
+  ["CDA4",0x7678],
+  ["CDA5",0x78CE],
+  ["CDA6",0x7A3D],
+  ["CDA7",0x7CFB],
+  ["CDA8",0x7E6B],
+  ["CDA9",0x7E7C],
+  ["CDAA",0x8A08],
+  ["CDAB",0x8AA1],
+  ["CDAC",0x8C3F],
+  ["CDAD",0x968E],
+  ["CDAE",0x9DC4],
+  ["CDAF",0x53E4],
+  ["CDB0",0x53E9],
+  ["CDB1",0x544A],
+  ["CDB2",0x5471],
+  ["CDB3",0x56FA],
+  ["CDB4",0x59D1],
+  ["CDB5",0x5B64],
+  ["CDB6",0x5C3B],
+  ["CDB7",0x5EAB],
+  ["CDB8",0x62F7],
+  ["CDB9",0x6537],
+  ["CDBA",0x6545],
+  ["CDBB",0x6572],
+  ["CDBC",0x66A0],
+  ["CDBD",0x67AF],
+  ["CDBE",0x69C1],
+  ["CDBF",0x6CBD],
+  ["CDC0",0x75FC],
+  ["CDC1",0x7690],
+  ["CDC2",0x777E],
+  ["CDC3",0x7A3F],
+  ["CDC4",0x7F94],
+  ["CDC5",0x8003],
+  ["CDC6",0x80A1],
+  ["CDC7",0x818F],
+  ["CDC8",0x82E6],
+  ["CDC9",0x82FD],
+  ["CDCA",0x83F0],
+  ["CDCB",0x85C1],
+  ["CDCC",0x8831],
+  ["CDCD",0x88B4],
+  ["CDCE",0x8AA5],
+  ["CDCF",0xF903],
+  ["CDD0",0x8F9C],
+  ["CDD1",0x932E],
+  ["CDD2",0x96C7],
+  ["CDD3",0x9867],
+  ["CDD4",0x9AD8],
+  ["CDD5",0x9F13],
+  ["CDD6",0x54ED],
+  ["CDD7",0x659B],
+  ["CDD8",0x66F2],
+  ["CDD9",0x688F],
+  ["CDDA",0x7A40],
+  ["CDDB",0x8C37],
+  ["CDDC",0x9D60],
+  ["CDDD",0x56F0],
+  ["CDDE",0x5764],
+  ["CDDF",0x5D11],
+  ["CDE0",0x6606],
+  ["CDE1",0x68B1],
+  ["CDE2",0x68CD],
+  ["CDE3",0x6EFE],
+  ["CDE4",0x7428],
+  ["CDE5",0x889E],
+  ["CDE6",0x9BE4],
+  ["CDE7",0x6C68],
+  ["CDE8",0xF904],
+  ["CDE9",0x9AA8],
+  ["CDEA",0x4F9B],
+  ["CDEB",0x516C],
+  ["CDEC",0x5171],
+  ["CDED",0x529F],
+  ["CDEE",0x5B54],
+  ["CDEF",0x5DE5],
+  ["CDF0",0x6050],
+  ["CDF1",0x606D],
+  ["CDF2",0x62F1],
+  ["CDF3",0x63A7],
+  ["CDF4",0x653B],
+  ["CDF5",0x73D9],
+  ["CDF6",0x7A7A],
+  ["CDF7",0x86A3],
+  ["CDF8",0x8CA2],
+  ["CDF9",0x978F],
+  ["CDFA",0x4E32],
+  ["CDFB",0x5BE1],
+  ["CDFC",0x6208],
+  ["CDFD",0x679C],
+  ["CDFE",0x74DC],
+  ["CEA1",0x79D1],
+  ["CEA2",0x83D3],
+  ["CEA3",0x8A87],
+  ["CEA4",0x8AB2],
+  ["CEA5",0x8DE8],
+  ["CEA6",0x904E],
+  ["CEA7",0x934B],
+  ["CEA8",0x9846],
+  ["CEA9",0x5ED3],
+  ["CEAA",0x69E8],
+  ["CEAB",0x85FF],
+  ["CEAC",0x90ED],
+  ["CEAD",0xF905],
+  ["CEAE",0x51A0],
+  ["CEAF",0x5B98],
+  ["CEB0",0x5BEC],
+  ["CEB1",0x6163],
+  ["CEB2",0x68FA],
+  ["CEB3",0x6B3E],
+  ["CEB4",0x704C],
+  ["CEB5",0x742F],
+  ["CEB6",0x74D8],
+  ["CEB7",0x7BA1],
+  ["CEB8",0x7F50],
+  ["CEB9",0x83C5],
+  ["CEBA",0x89C0],
+  ["CEBB",0x8CAB],
+  ["CEBC",0x95DC],
+  ["CEBD",0x9928],
+  ["CEBE",0x522E],
+  ["CEBF",0x605D],
+  ["CEC0",0x62EC],
+  ["CEC1",0x9002],
+  ["CEC2",0x4F8A],
+  ["CEC3",0x5149],
+  ["CEC4",0x5321],
+  ["CEC5",0x58D9],
+  ["CEC6",0x5EE3],
+  ["CEC7",0x66E0],
+  ["CEC8",0x6D38],
+  ["CEC9",0x709A],
+  ["CECA",0x72C2],
+  ["CECB",0x73D6],
+  ["CECC",0x7B50],
+  ["CECD",0x80F1],
+  ["CECE",0x945B],
+  ["CECF",0x5366],
+  ["CED0",0x639B],
+  ["CED1",0x7F6B],
+  ["CED2",0x4E56],
+  ["CED3",0x5080],
+  ["CED4",0x584A],
+  ["CED5",0x58DE],
+  ["CED6",0x602A],
+  ["CED7",0x6127],
+  ["CED8",0x62D0],
+  ["CED9",0x69D0],
+  ["CEDA",0x9B41],
+  ["CEDB",0x5B8F],
+  ["CEDC",0x7D18],
+  ["CEDD",0x80B1],
+  ["CEDE",0x8F5F],
+  ["CEDF",0x4EA4],
+  ["CEE0",0x50D1],
+  ["CEE1",0x54AC],
+  ["CEE2",0x55AC],
+  ["CEE3",0x5B0C],
+  ["CEE4",0x5DA0],
+  ["CEE5",0x5DE7],
+  ["CEE6",0x652A],
+  ["CEE7",0x654E],
+  ["CEE8",0x6821],
+  ["CEE9",0x6A4B],
+  ["CEEA",0x72E1],
+  ["CEEB",0x768E],
+  ["CEEC",0x77EF],
+  ["CEED",0x7D5E],
+  ["CEEE",0x7FF9],
+  ["CEEF",0x81A0],
+  ["CEF0",0x854E],
+  ["CEF1",0x86DF],
+  ["CEF2",0x8F03],
+  ["CEF3",0x8F4E],
+  ["CEF4",0x90CA],
+  ["CEF5",0x9903],
+  ["CEF6",0x9A55],
+  ["CEF7",0x9BAB],
+  ["CEF8",0x4E18],
+  ["CEF9",0x4E45],
+  ["CEFA",0x4E5D],
+  ["CEFB",0x4EC7],
+  ["CEFC",0x4FF1],
+  ["CEFD",0x5177],
+  ["CEFE",0x52FE],
+  ["CFA1",0x5340],
+  ["CFA2",0x53E3],
+  ["CFA3",0x53E5],
+  ["CFA4",0x548E],
+  ["CFA5",0x5614],
+  ["CFA6",0x5775],
+  ["CFA7",0x57A2],
+  ["CFA8",0x5BC7],
+  ["CFA9",0x5D87],
+  ["CFAA",0x5ED0],
+  ["CFAB",0x61FC],
+  ["CFAC",0x62D8],
+  ["CFAD",0x6551],
+  ["CFAE",0x67B8],
+  ["CFAF",0x67E9],
+  ["CFB0",0x69CB],
+  ["CFB1",0x6B50],
+  ["CFB2",0x6BC6],
+  ["CFB3",0x6BEC],
+  ["CFB4",0x6C42],
+  ["CFB5",0x6E9D],
+  ["CFB6",0x7078],
+  ["CFB7",0x72D7],
+  ["CFB8",0x7396],
+  ["CFB9",0x7403],
+  ["CFBA",0x77BF],
+  ["CFBB",0x77E9],
+  ["CFBC",0x7A76],
+  ["CFBD",0x7D7F],
+  ["CFBE",0x8009],
+  ["CFBF",0x81FC],
+  ["CFC0",0x8205],
+  ["CFC1",0x820A],
+  ["CFC2",0x82DF],
+  ["CFC3",0x8862],
+  ["CFC4",0x8B33],
+  ["CFC5",0x8CFC],
+  ["CFC6",0x8EC0],
+  ["CFC7",0x9011],
+  ["CFC8",0x90B1],
+  ["CFC9",0x9264],
+  ["CFCA",0x92B6],
+  ["CFCB",0x99D2],
+  ["CFCC",0x9A45],
+  ["CFCD",0x9CE9],
+  ["CFCE",0x9DD7],
+  ["CFCF",0x9F9C],
+  ["CFD0",0x570B],
+  ["CFD1",0x5C40],
+  ["CFD2",0x83CA],
+  ["CFD3",0x97A0],
+  ["CFD4",0x97AB],
+  ["CFD5",0x9EB4],
+  ["CFD6",0x541B],
+  ["CFD7",0x7A98],
+  ["CFD8",0x7FA4],
+  ["CFD9",0x88D9],
+  ["CFDA",0x8ECD],
+  ["CFDB",0x90E1],
+  ["CFDC",0x5800],
+  ["CFDD",0x5C48],
+  ["CFDE",0x6398],
+  ["CFDF",0x7A9F],
+  ["CFE0",0x5BAE],
+  ["CFE1",0x5F13],
+  ["CFE2",0x7A79],
+  ["CFE3",0x7AAE],
+  ["CFE4",0x828E],
+  ["CFE5",0x8EAC],
+  ["CFE6",0x5026],
+  ["CFE7",0x5238],
+  ["CFE8",0x52F8],
+  ["CFE9",0x5377],
+  ["CFEA",0x5708],
+  ["CFEB",0x62F3],
+  ["CFEC",0x6372],
+  ["CFED",0x6B0A],
+  ["CFEE",0x6DC3],
+  ["CFEF",0x7737],
+  ["CFF0",0x53A5],
+  ["CFF1",0x7357],
+  ["CFF2",0x8568],
+  ["CFF3",0x8E76],
+  ["CFF4",0x95D5],
+  ["CFF5",0x673A],
+  ["CFF6",0x6AC3],
+  ["CFF7",0x6F70],
+  ["CFF8",0x8A6D],
+  ["CFF9",0x8ECC],
+  ["CFFA",0x994B],
+  ["CFFB",0xF906],
+  ["CFFC",0x6677],
+  ["CFFD",0x6B78],
+  ["CFFE",0x8CB4],
+  ["D0A1",0x9B3C],
+  ["D0A2",0xF907],
+  ["D0A3",0x53EB],
+  ["D0A4",0x572D],
+  ["D0A5",0x594E],
+  ["D0A6",0x63C6],
+  ["D0A7",0x69FB],
+  ["D0A8",0x73EA],
+  ["D0A9",0x7845],
+  ["D0AA",0x7ABA],
+  ["D0AB",0x7AC5],
+  ["D0AC",0x7CFE],
+  ["D0AD",0x8475],
+  ["D0AE",0x898F],
+  ["D0AF",0x8D73],
+  ["D0B0",0x9035],
+  ["D0B1",0x95A8],
+  ["D0B2",0x52FB],
+  ["D0B3",0x5747],
+  ["D0B4",0x7547],
+  ["D0B5",0x7B60],
+  ["D0B6",0x83CC],
+  ["D0B7",0x921E],
+  ["D0B8",0xF908],
+  ["D0B9",0x6A58],
+  ["D0BA",0x514B],
+  ["D0BB",0x524B],
+  ["D0BC",0x5287],
+  ["D0BD",0x621F],
+  ["D0BE",0x68D8],
+  ["D0BF",0x6975],
+  ["D0C0",0x9699],
+  ["D0C1",0x50C5],
+  ["D0C2",0x52A4],
+  ["D0C3",0x52E4],
+  ["D0C4",0x61C3],
+  ["D0C5",0x65A4],
+  ["D0C6",0x6839],
+  ["D0C7",0x69FF],
+  ["D0C8",0x747E],
+  ["D0C9",0x7B4B],
+  ["D0CA",0x82B9],
+  ["D0CB",0x83EB],
+  ["D0CC",0x89B2],
+  ["D0CD",0x8B39],
+  ["D0CE",0x8FD1],
+  ["D0CF",0x9949],
+  ["D0D0",0xF909],
+  ["D0D1",0x4ECA],
+  ["D0D2",0x5997],
+  ["D0D3",0x64D2],
+  ["D0D4",0x6611],
+  ["D0D5",0x6A8E],
+  ["D0D6",0x7434],
+  ["D0D7",0x7981],
+  ["D0D8",0x79BD],
+  ["D0D9",0x82A9],
+  ["D0DA",0x887E],
+  ["D0DB",0x887F],
+  ["D0DC",0x895F],
+  ["D0DD",0xF90A],
+  ["D0DE",0x9326],
+  ["D0DF",0x4F0B],
+  ["D0E0",0x53CA],
+  ["D0E1",0x6025],
+  ["D0E2",0x6271],
+  ["D0E3",0x6C72],
+  ["D0E4",0x7D1A],
+  ["D0E5",0x7D66],
+  ["D0E6",0x4E98],
+  ["D0E7",0x5162],
+  ["D0E8",0x77DC],
+  ["D0E9",0x80AF],
+  ["D0EA",0x4F01],
+  ["D0EB",0x4F0E],
+  ["D0EC",0x5176],
+  ["D0ED",0x5180],
+  ["D0EE",0x55DC],
+  ["D0EF",0x5668],
+  ["D0F0",0x573B],
+  ["D0F1",0x57FA],
+  ["D0F2",0x57FC],
+  ["D0F3",0x5914],
+  ["D0F4",0x5947],
+  ["D0F5",0x5993],
+  ["D0F6",0x5BC4],
+  ["D0F7",0x5C90],
+  ["D0F8",0x5D0E],
+  ["D0F9",0x5DF1],
+  ["D0FA",0x5E7E],
+  ["D0FB",0x5FCC],
+  ["D0FC",0x6280],
+  ["D0FD",0x65D7],
+  ["D0FE",0x65E3],
+  ["D1A1",0x671E],
+  ["D1A2",0x671F],
+  ["D1A3",0x675E],
+  ["D1A4",0x68CB],
+  ["D1A5",0x68C4],
+  ["D1A6",0x6A5F],
+  ["D1A7",0x6B3A],
+  ["D1A8",0x6C23],
+  ["D1A9",0x6C7D],
+  ["D1AA",0x6C82],
+  ["D1AB",0x6DC7],
+  ["D1AC",0x7398],
+  ["D1AD",0x7426],
+  ["D1AE",0x742A],
+  ["D1AF",0x7482],
+  ["D1B0",0x74A3],
+  ["D1B1",0x7578],
+  ["D1B2",0x757F],
+  ["D1B3",0x7881],
+  ["D1B4",0x78EF],
+  ["D1B5",0x7941],
+  ["D1B6",0x7947],
+  ["D1B7",0x7948],
+  ["D1B8",0x797A],
+  ["D1B9",0x7B95],
+  ["D1BA",0x7D00],
+  ["D1BB",0x7DBA],
+  ["D1BC",0x7F88],
+  ["D1BD",0x8006],
+  ["D1BE",0x802D],
+  ["D1BF",0x808C],
+  ["D1C0",0x8A18],
+  ["D1C1",0x8B4F],
+  ["D1C2",0x8C48],
+  ["D1C3",0x8D77],
+  ["D1C4",0x9321],
+  ["D1C5",0x9324],
+  ["D1C6",0x98E2],
+  ["D1C7",0x9951],
+  ["D1C8",0x9A0E],
+  ["D1C9",0x9A0F],
+  ["D1CA",0x9A65],
+  ["D1CB",0x9E92],
+  ["D1CC",0x7DCA],
+  ["D1CD",0x4F76],
+  ["D1CE",0x5409],
+  ["D1CF",0x62EE],
+  ["D1D0",0x6854],
+  ["D1D1",0x91D1],
+  ["D1D2",0x55AB],
+  ["D1D3",0x513A],
+  ["D1D4",0xF90B],
+  ["D1D5",0xF90C],
+  ["D1D6",0x5A1C],
+  ["D1D7",0x61E6],
+  ["D1D8",0xF90D],
+  ["D1D9",0x62CF],
+  ["D1DA",0x62FF],
+  ["D1DB",0xF90E],
+  ["D1DC",0xF90F],
+  ["D1DD",0xF910],
+  ["D1DE",0xF911],
+  ["D1DF",0xF912],
+  ["D1E0",0xF913],
+  ["D1E1",0x90A3],
+  ["D1E2",0xF914],
+  ["D1E3",0xF915],
+  ["D1E4",0xF916],
+  ["D1E5",0xF917],
+  ["D1E6",0xF918],
+  ["D1E7",0x8AFE],
+  ["D1E8",0xF919],
+  ["D1E9",0xF91A],
+  ["D1EA",0xF91B],
+  ["D1EB",0xF91C],
+  ["D1EC",0x6696],
+  ["D1ED",0xF91D],
+  ["D1EE",0x7156],
+  ["D1EF",0xF91E],
+  ["D1F0",0xF91F],
+  ["D1F1",0x96E3],
+  ["D1F2",0xF920],
+  ["D1F3",0x634F],
+  ["D1F4",0x637A],
+  ["D1F5",0x5357],
+  ["D1F6",0xF921],
+  ["D1F7",0x678F],
+  ["D1F8",0x6960],
+  ["D1F9",0x6E73],
+  ["D1FA",0xF922],
+  ["D1FB",0x7537],
+  ["D1FC",0xF923],
+  ["D1FD",0xF924],
+  ["D1FE",0xF925],
+  ["D2A1",0x7D0D],
+  ["D2A2",0xF926],
+  ["D2A3",0xF927],
+  ["D2A4",0x8872],
+  ["D2A5",0x56CA],
+  ["D2A6",0x5A18],
+  ["D2A7",0xF928],
+  ["D2A8",0xF929],
+  ["D2A9",0xF92A],
+  ["D2AA",0xF92B],
+  ["D2AB",0xF92C],
+  ["D2AC",0x4E43],
+  ["D2AD",0xF92D],
+  ["D2AE",0x5167],
+  ["D2AF",0x5948],
+  ["D2B0",0x67F0],
+  ["D2B1",0x8010],
+  ["D2B2",0xF92E],
+  ["D2B3",0x5973],
+  ["D2B4",0x5E74],
+  ["D2B5",0x649A],
+  ["D2B6",0x79CA],
+  ["D2B7",0x5FF5],
+  ["D2B8",0x606C],
+  ["D2B9",0x62C8],
+  ["D2BA",0x637B],
+  ["D2BB",0x5BE7],
+  ["D2BC",0x5BD7],
+  ["D2BD",0x52AA],
+  ["D2BE",0xF92F],
+  ["D2BF",0x5974],
+  ["D2C0",0x5F29],
+  ["D2C1",0x6012],
+  ["D2C2",0xF930],
+  ["D2C3",0xF931],
+  ["D2C4",0xF932],
+  ["D2C5",0x7459],
+  ["D2C6",0xF933],
+  ["D2C7",0xF934],
+  ["D2C8",0xF935],
+  ["D2C9",0xF936],
+  ["D2CA",0xF937],
+  ["D2CB",0xF938],
+  ["D2CC",0x99D1],
+  ["D2CD",0xF939],
+  ["D2CE",0xF93A],
+  ["D2CF",0xF93B],
+  ["D2D0",0xF93C],
+  ["D2D1",0xF93D],
+  ["D2D2",0xF93E],
+  ["D2D3",0xF93F],
+  ["D2D4",0xF940],
+  ["D2D5",0xF941],
+  ["D2D6",0xF942],
+  ["D2D7",0xF943],
+  ["D2D8",0x6FC3],
+  ["D2D9",0xF944],
+  ["D2DA",0xF945],
+  ["D2DB",0x81BF],
+  ["D2DC",0x8FB2],
+  ["D2DD",0x60F1],
+  ["D2DE",0xF946],
+  ["D2DF",0xF947],
+  ["D2E0",0x8166],
+  ["D2E1",0xF948],
+  ["D2E2",0xF949],
+  ["D2E3",0x5C3F],
+  ["D2E4",0xF94A],
+  ["D2E5",0xF94B],
+  ["D2E6",0xF94C],
+  ["D2E7",0xF94D],
+  ["D2E8",0xF94E],
+  ["D2E9",0xF94F],
+  ["D2EA",0xF950],
+  ["D2EB",0xF951],
+  ["D2EC",0x5AE9],
+  ["D2ED",0x8A25],
+  ["D2EE",0x677B],
+  ["D2EF",0x7D10],
+  ["D2F0",0xF952],
+  ["D2F1",0xF953],
+  ["D2F2",0xF954],
+  ["D2F3",0xF955],
+  ["D2F4",0xF956],
+  ["D2F5",0xF957],
+  ["D2F6",0x80FD],
+  ["D2F7",0xF958],
+  ["D2F8",0xF959],
+  ["D2F9",0x5C3C],
+  ["D2FA",0x6CE5],
+  ["D2FB",0x533F],
+  ["D2FC",0x6EBA],
+  ["D2FD",0x591A],
+  ["D2FE",0x8336],
+  ["D3A1",0x4E39],
+  ["D3A2",0x4EB6],
+  ["D3A3",0x4F46],
+  ["D3A4",0x55AE],
+  ["D3A5",0x5718],
+  ["D3A6",0x58C7],
+  ["D3A7",0x5F56],
+  ["D3A8",0x65B7],
+  ["D3A9",0x65E6],
+  ["D3AA",0x6A80],
+  ["D3AB",0x6BB5],
+  ["D3AC",0x6E4D],
+  ["D3AD",0x77ED],
+  ["D3AE",0x7AEF],
+  ["D3AF",0x7C1E],
+  ["D3B0",0x7DDE],
+  ["D3B1",0x86CB],
+  ["D3B2",0x8892],
+  ["D3B3",0x9132],
+  ["D3B4",0x935B],
+  ["D3B5",0x64BB],
+  ["D3B6",0x6FBE],
+  ["D3B7",0x737A],
+  ["D3B8",0x75B8],
+  ["D3B9",0x9054],
+  ["D3BA",0x5556],
+  ["D3BB",0x574D],
+  ["D3BC",0x61BA],
+  ["D3BD",0x64D4],
+  ["D3BE",0x66C7],
+  ["D3BF",0x6DE1],
+  ["D3C0",0x6E5B],
+  ["D3C1",0x6F6D],
+  ["D3C2",0x6FB9],
+  ["D3C3",0x75F0],
+  ["D3C4",0x8043],
+  ["D3C5",0x81BD],
+  ["D3C6",0x8541],
+  ["D3C7",0x8983],
+  ["D3C8",0x8AC7],
+  ["D3C9",0x8B5A],
+  ["D3CA",0x931F],
+  ["D3CB",0x6C93],
+  ["D3CC",0x7553],
+  ["D3CD",0x7B54],
+  ["D3CE",0x8E0F],
+  ["D3CF",0x905D],
+  ["D3D0",0x5510],
+  ["D3D1",0x5802],
+  ["D3D2",0x5858],
+  ["D3D3",0x5E62],
+  ["D3D4",0x6207],
+  ["D3D5",0x649E],
+  ["D3D6",0x68E0],
+  ["D3D7",0x7576],
+  ["D3D8",0x7CD6],
+  ["D3D9",0x87B3],
+  ["D3DA",0x9EE8],
+  ["D3DB",0x4EE3],
+  ["D3DC",0x5788],
+  ["D3DD",0x576E],
+  ["D3DE",0x5927],
+  ["D3DF",0x5C0D],
+  ["D3E0",0x5CB1],
+  ["D3E1",0x5E36],
+  ["D3E2",0x5F85],
+  ["D3E3",0x6234],
+  ["D3E4",0x64E1],
+  ["D3E5",0x73B3],
+  ["D3E6",0x81FA],
+  ["D3E7",0x888B],
+  ["D3E8",0x8CB8],
+  ["D3E9",0x968A],
+  ["D3EA",0x9EDB],
+  ["D3EB",0x5B85],
+  ["D3EC",0x5FB7],
+  ["D3ED",0x60B3],
+  ["D3EE",0x5012],
+  ["D3EF",0x5200],
+  ["D3F0",0x5230],
+  ["D3F1",0x5716],
+  ["D3F2",0x5835],
+  ["D3F3",0x5857],
+  ["D3F4",0x5C0E],
+  ["D3F5",0x5C60],
+  ["D3F6",0x5CF6],
+  ["D3F7",0x5D8B],
+  ["D3F8",0x5EA6],
+  ["D3F9",0x5F92],
+  ["D3FA",0x60BC],
+  ["D3FB",0x6311],
+  ["D3FC",0x6389],
+  ["D3FD",0x6417],
+  ["D3FE",0x6843],
+  ["D4A1",0x68F9],
+  ["D4A2",0x6AC2],
+  ["D4A3",0x6DD8],
+  ["D4A4",0x6E21],
+  ["D4A5",0x6ED4],
+  ["D4A6",0x6FE4],
+  ["D4A7",0x71FE],
+  ["D4A8",0x76DC],
+  ["D4A9",0x7779],
+  ["D4AA",0x79B1],
+  ["D4AB",0x7A3B],
+  ["D4AC",0x8404],
+  ["D4AD",0x89A9],
+  ["D4AE",0x8CED],
+  ["D4AF",0x8DF3],
+  ["D4B0",0x8E48],
+  ["D4B1",0x9003],
+  ["D4B2",0x9014],
+  ["D4B3",0x9053],
+  ["D4B4",0x90FD],
+  ["D4B5",0x934D],
+  ["D4B6",0x9676],
+  ["D4B7",0x97DC],
+  ["D4B8",0x6BD2],
+  ["D4B9",0x7006],
+  ["D4BA",0x7258],
+  ["D4BB",0x72A2],
+  ["D4BC",0x7368],
+  ["D4BD",0x7763],
+  ["D4BE",0x79BF],
+  ["D4BF",0x7BE4],
+  ["D4C0",0x7E9B],
+  ["D4C1",0x8B80],
+  ["D4C2",0x58A9],
+  ["D4C3",0x60C7],
+  ["D4C4",0x6566],
+  ["D4C5",0x65FD],
+  ["D4C6",0x66BE],
+  ["D4C7",0x6C8C],
+  ["D4C8",0x711E],
+  ["D4C9",0x71C9],
+  ["D4CA",0x8C5A],
+  ["D4CB",0x9813],
+  ["D4CC",0x4E6D],
+  ["D4CD",0x7A81],
+  ["D4CE",0x4EDD],
+  ["D4CF",0x51AC],
+  ["D4D0",0x51CD],
+  ["D4D1",0x52D5],
+  ["D4D2",0x540C],
+  ["D4D3",0x61A7],
+  ["D4D4",0x6771],
+  ["D4D5",0x6850],
+  ["D4D6",0x68DF],
+  ["D4D7",0x6D1E],
+  ["D4D8",0x6F7C],
+  ["D4D9",0x75BC],
+  ["D4DA",0x77B3],
+  ["D4DB",0x7AE5],
+  ["D4DC",0x80F4],
+  ["D4DD",0x8463],
+  ["D4DE",0x9285],
+  ["D4DF",0x515C],
+  ["D4E0",0x6597],
+  ["D4E1",0x675C],
+  ["D4E2",0x6793],
+  ["D4E3",0x75D8],
+  ["D4E4",0x7AC7],
+  ["D4E5",0x8373],
+  ["D4E6",0xF95A],
+  ["D4E7",0x8C46],
+  ["D4E8",0x9017],
+  ["D4E9",0x982D],
+  ["D4EA",0x5C6F],
+  ["D4EB",0x81C0],
+  ["D4EC",0x829A],
+  ["D4ED",0x9041],
+  ["D4EE",0x906F],
+  ["D4EF",0x920D],
+  ["D4F0",0x5F97],
+  ["D4F1",0x5D9D],
+  ["D4F2",0x6A59],
+  ["D4F3",0x71C8],
+  ["D4F4",0x767B],
+  ["D4F5",0x7B49],
+  ["D4F6",0x85E4],
+  ["D4F7",0x8B04],
+  ["D4F8",0x9127],
+  ["D4F9",0x9A30],
+  ["D4FA",0x5587],
+  ["D4FB",0x61F6],
+  ["D4FC",0xF95B],
+  ["D4FD",0x7669],
+  ["D4FE",0x7F85],
+  ["D5A1",0x863F],
+  ["D5A2",0x87BA],
+  ["D5A3",0x88F8],
+  ["D5A4",0x908F],
+  ["D5A5",0xF95C],
+  ["D5A6",0x6D1B],
+  ["D5A7",0x70D9],
+  ["D5A8",0x73DE],
+  ["D5A9",0x7D61],
+  ["D5AA",0x843D],
+  ["D5AB",0xF95D],
+  ["D5AC",0x916A],
+  ["D5AD",0x99F1],
+  ["D5AE",0xF95E],
+  ["D5AF",0x4E82],
+  ["D5B0",0x5375],
+  ["D5B1",0x6B04],
+  ["D5B2",0x6B12],
+  ["D5B3",0x703E],
+  ["D5B4",0x721B],
+  ["D5B5",0x862D],
+  ["D5B6",0x9E1E],
+  ["D5B7",0x524C],
+  ["D5B8",0x8FA3],
+  ["D5B9",0x5D50],
+  ["D5BA",0x64E5],
+  ["D5BB",0x652C],
+  ["D5BC",0x6B16],
+  ["D5BD",0x6FEB],
+  ["D5BE",0x7C43],
+  ["D5BF",0x7E9C],
+  ["D5C0",0x85CD],
+  ["D5C1",0x8964],
+  ["D5C2",0x89BD],
+  ["D5C3",0x62C9],
+  ["D5C4",0x81D8],
+  ["D5C5",0x881F],
+  ["D5C6",0x5ECA],
+  ["D5C7",0x6717],
+  ["D5C8",0x6D6A],
+  ["D5C9",0x72FC],
+  ["D5CA",0x7405],
+  ["D5CB",0x746F],
+  ["D5CC",0x8782],
+  ["D5CD",0x90DE],
+  ["D5CE",0x4F86],
+  ["D5CF",0x5D0D],
+  ["D5D0",0x5FA0],
+  ["D5D1",0x840A],
+  ["D5D2",0x51B7],
+  ["D5D3",0x63A0],
+  ["D5D4",0x7565],
+  ["D5D5",0x4EAE],
+  ["D5D6",0x5006],
+  ["D5D7",0x5169],
+  ["D5D8",0x51C9],
+  ["D5D9",0x6881],
+  ["D5DA",0x6A11],
+  ["D5DB",0x7CAE],
+  ["D5DC",0x7CB1],
+  ["D5DD",0x7CE7],
+  ["D5DE",0x826F],
+  ["D5DF",0x8AD2],
+  ["D5E0",0x8F1B],
+  ["D5E1",0x91CF],
+  ["D5E2",0x4FB6],
+  ["D5E3",0x5137],
+  ["D5E4",0x52F5],
+  ["D5E5",0x5442],
+  ["D5E6",0x5EEC],
+  ["D5E7",0x616E],
+  ["D5E8",0x623E],
+  ["D5E9",0x65C5],
+  ["D5EA",0x6ADA],
+  ["D5EB",0x6FFE],
+  ["D5EC",0x792A],
+  ["D5ED",0x85DC],
+  ["D5EE",0x8823],
+  ["D5EF",0x95AD],
+  ["D5F0",0x9A62],
+  ["D5F1",0x9A6A],
+  ["D5F2",0x9E97],
+  ["D5F3",0x9ECE],
+  ["D5F4",0x529B],
+  ["D5F5",0x66C6],
+  ["D5F6",0x6B77],
+  ["D5F7",0x701D],
+  ["D5F8",0x792B],
+  ["D5F9",0x8F62],
+  ["D5FA",0x9742],
+  ["D5FB",0x6190],
+  ["D5FC",0x6200],
+  ["D5FD",0x6523],
+  ["D5FE",0x6F23],
+  ["D6A1",0x7149],
+  ["D6A2",0x7489],
+  ["D6A3",0x7DF4],
+  ["D6A4",0x806F],
+  ["D6A5",0x84EE],
+  ["D6A6",0x8F26],
+  ["D6A7",0x9023],
+  ["D6A8",0x934A],
+  ["D6A9",0x51BD],
+  ["D6AA",0x5217],
+  ["D6AB",0x52A3],
+  ["D6AC",0x6D0C],
+  ["D6AD",0x70C8],
+  ["D6AE",0x88C2],
+  ["D6AF",0x5EC9],
+  ["D6B0",0x6582],
+  ["D6B1",0x6BAE],
+  ["D6B2",0x6FC2],
+  ["D6B3",0x7C3E],
+  ["D6B4",0x7375],
+  ["D6B5",0x4EE4],
+  ["D6B6",0x4F36],
+  ["D6B7",0x56F9],
+  ["D6B8",0xF95F],
+  ["D6B9",0x5CBA],
+  ["D6BA",0x5DBA],
+  ["D6BB",0x601C],
+  ["D6BC",0x73B2],
+  ["D6BD",0x7B2D],
+  ["D6BE",0x7F9A],
+  ["D6BF",0x7FCE],
+  ["D6C0",0x8046],
+  ["D6C1",0x901E],
+  ["D6C2",0x9234],
+  ["D6C3",0x96F6],
+  ["D6C4",0x9748],
+  ["D6C5",0x9818],
+  ["D6C6",0x9F61],
+  ["D6C7",0x4F8B],
+  ["D6C8",0x6FA7],
+  ["D6C9",0x79AE],
+  ["D6CA",0x91B4],
+  ["D6CB",0x96B7],
+  ["D6CC",0x52DE],
+  ["D6CD",0xF960],
+  ["D6CE",0x6488],
+  ["D6CF",0x64C4],
+  ["D6D0",0x6AD3],
+  ["D6D1",0x6F5E],
+  ["D6D2",0x7018],
+  ["D6D3",0x7210],
+  ["D6D4",0x76E7],
+  ["D6D5",0x8001],
+  ["D6D6",0x8606],
+  ["D6D7",0x865C],
+  ["D6D8",0x8DEF],
+  ["D6D9",0x8F05],
+  ["D6DA",0x9732],
+  ["D6DB",0x9B6F],
+  ["D6DC",0x9DFA],
+  ["D6DD",0x9E75],
+  ["D6DE",0x788C],
+  ["D6DF",0x797F],
+  ["D6E0",0x7DA0],
+  ["D6E1",0x83C9],
+  ["D6E2",0x9304],
+  ["D6E3",0x9E7F],
+  ["D6E4",0x9E93],
+  ["D6E5",0x8AD6],
+  ["D6E6",0x58DF],
+  ["D6E7",0x5F04],
+  ["D6E8",0x6727],
+  ["D6E9",0x7027],
+  ["D6EA",0x74CF],
+  ["D6EB",0x7C60],
+  ["D6EC",0x807E],
+  ["D6ED",0x5121],
+  ["D6EE",0x7028],
+  ["D6EF",0x7262],
+  ["D6F0",0x78CA],
+  ["D6F1",0x8CC2],
+  ["D6F2",0x8CDA],
+  ["D6F3",0x8CF4],
+  ["D6F4",0x96F7],
+  ["D6F5",0x4E86],
+  ["D6F6",0x50DA],
+  ["D6F7",0x5BEE],
+  ["D6F8",0x5ED6],
+  ["D6F9",0x6599],
+  ["D6FA",0x71CE],
+  ["D6FB",0x7642],
+  ["D6FC",0x77AD],
+  ["D6FD",0x804A],
+  ["D6FE",0x84FC],
+  ["D7A1",0x907C],
+  ["D7A2",0x9B27],
+  ["D7A3",0x9F8D],
+  ["D7A4",0x58D8],
+  ["D7A5",0x5A41],
+  ["D7A6",0x5C62],
+  ["D7A7",0x6A13],
+  ["D7A8",0x6DDA],
+  ["D7A9",0x6F0F],
+  ["D7AA",0x763B],
+  ["D7AB",0x7D2F],
+  ["D7AC",0x7E37],
+  ["D7AD",0x851E],
+  ["D7AE",0x8938],
+  ["D7AF",0x93E4],
+  ["D7B0",0x964B],
+  ["D7B1",0x5289],
+  ["D7B2",0x65D2],
+  ["D7B3",0x67F3],
+  ["D7B4",0x69B4],
+  ["D7B5",0x6D41],
+  ["D7B6",0x6E9C],
+  ["D7B7",0x700F],
+  ["D7B8",0x7409],
+  ["D7B9",0x7460],
+  ["D7BA",0x7559],
+  ["D7BB",0x7624],
+  ["D7BC",0x786B],
+  ["D7BD",0x8B2C],
+  ["D7BE",0x985E],
+  ["D7BF",0x516D],
+  ["D7C0",0x622E],
+  ["D7C1",0x9678],
+  ["D7C2",0x4F96],
+  ["D7C3",0x502B],
+  ["D7C4",0x5D19],
+  ["D7C5",0x6DEA],
+  ["D7C6",0x7DB8],
+  ["D7C7",0x8F2A],
+  ["D7C8",0x5F8B],
+  ["D7C9",0x6144],
+  ["D7CA",0x6817],
+  ["D7CB",0xF961],
+  ["D7CC",0x9686],
+  ["D7CD",0x52D2],
+  ["D7CE",0x808B],
+  ["D7CF",0x51DC],
+  ["D7D0",0x51CC],
+  ["D7D1",0x695E],
+  ["D7D2",0x7A1C],
+  ["D7D3",0x7DBE],
+  ["D7D4",0x83F1],
+  ["D7D5",0x9675],
+  ["D7D6",0x4FDA],
+  ["D7D7",0x5229],
+  ["D7D8",0x5398],
+  ["D7D9",0x540F],
+  ["D7DA",0x550E],
+  ["D7DB",0x5C65],
+  ["D7DC",0x60A7],
+  ["D7DD",0x674E],
+  ["D7DE",0x68A8],
+  ["D7DF",0x6D6C],
+  ["D7E0",0x7281],
+  ["D7E1",0x72F8],
+  ["D7E2",0x7406],
+  ["D7E3",0x7483],
+  ["D7E4",0xF962],
+  ["D7E5",0x75E2],
+  ["D7E6",0x7C6C],
+  ["D7E7",0x7F79],
+  ["D7E8",0x7FB8],
+  ["D7E9",0x8389],
+  ["D7EA",0x88CF],
+  ["D7EB",0x88E1],
+  ["D7EC",0x91CC],
+  ["D7ED",0x91D0],
+  ["D7EE",0x96E2],
+  ["D7EF",0x9BC9],
+  ["D7F0",0x541D],
+  ["D7F1",0x6F7E],
+  ["D7F2",0x71D0],
+  ["D7F3",0x7498],
+  ["D7F4",0x85FA],
+  ["D7F5",0x8EAA],
+  ["D7F6",0x96A3],
+  ["D7F7",0x9C57],
+  ["D7F8",0x9E9F],
+  ["D7F9",0x6797],
+  ["D7FA",0x6DCB],
+  ["D7FB",0x7433],
+  ["D7FC",0x81E8],
+  ["D7FD",0x9716],
+  ["D7FE",0x782C],
+  ["D8A1",0x7ACB],
+  ["D8A2",0x7B20],
+  ["D8A3",0x7C92],
+  ["D8A4",0x6469],
+  ["D8A5",0x746A],
+  ["D8A6",0x75F2],
+  ["D8A7",0x78BC],
+  ["D8A8",0x78E8],
+  ["D8A9",0x99AC],
+  ["D8AA",0x9B54],
+  ["D8AB",0x9EBB],
+  ["D8AC",0x5BDE],
+  ["D8AD",0x5E55],
+  ["D8AE",0x6F20],
+  ["D8AF",0x819C],
+  ["D8B0",0x83AB],
+  ["D8B1",0x9088],
+  ["D8B2",0x4E07],
+  ["D8B3",0x534D],
+  ["D8B4",0x5A29],
+  ["D8B5",0x5DD2],
+  ["D8B6",0x5F4E],
+  ["D8B7",0x6162],
+  ["D8B8",0x633D],
+  ["D8B9",0x6669],
+  ["D8BA",0x66FC],
+  ["D8BB",0x6EFF],
+  ["D8BC",0x6F2B],
+  ["D8BD",0x7063],
+  ["D8BE",0x779E],
+  ["D8BF",0x842C],
+  ["D8C0",0x8513],
+  ["D8C1",0x883B],
+  ["D8C2",0x8F13],
+  ["D8C3",0x9945],
+  ["D8C4",0x9C3B],
+  ["D8C5",0x551C],
+  ["D8C6",0x62B9],
+  ["D8C7",0x672B],
+  ["D8C8",0x6CAB],
+  ["D8C9",0x8309],
+  ["D8CA",0x896A],
+  ["D8CB",0x977A],
+  ["D8CC",0x4EA1],
+  ["D8CD",0x5984],
+  ["D8CE",0x5FD8],
+  ["D8CF",0x5FD9],
+  ["D8D0",0x671B],
+  ["D8D1",0x7DB2],
+  ["D8D2",0x7F54],
+  ["D8D3",0x8292],
+  ["D8D4",0x832B],
+  ["D8D5",0x83BD],
+  ["D8D6",0x8F1E],
+  ["D8D7",0x9099],
+  ["D8D8",0x57CB],
+  ["D8D9",0x59B9],
+  ["D8DA",0x5A92],
+  ["D8DB",0x5BD0],
+  ["D8DC",0x6627],
+  ["D8DD",0x679A],
+  ["D8DE",0x6885],
+  ["D8DF",0x6BCF],
+  ["D8E0",0x7164],
+  ["D8E1",0x7F75],
+  ["D8E2",0x8CB7],
+  ["D8E3",0x8CE3],
+  ["D8E4",0x9081],
+  ["D8E5",0x9B45],
+  ["D8E6",0x8108],
+  ["D8E7",0x8C8A],
+  ["D8E8",0x964C],
+  ["D8E9",0x9A40],
+  ["D8EA",0x9EA5],
+  ["D8EB",0x5B5F],
+  ["D8EC",0x6C13],
+  ["D8ED",0x731B],
+  ["D8EE",0x76F2],
+  ["D8EF",0x76DF],
+  ["D8F0",0x840C],
+  ["D8F1",0x51AA],
+  ["D8F2",0x8993],
+  ["D8F3",0x514D],
+  ["D8F4",0x5195],
+  ["D8F5",0x52C9],
+  ["D8F6",0x68C9],
+  ["D8F7",0x6C94],
+  ["D8F8",0x7704],
+  ["D8F9",0x7720],
+  ["D8FA",0x7DBF],
+  ["D8FB",0x7DEC],
+  ["D8FC",0x9762],
+  ["D8FD",0x9EB5],
+  ["D8FE",0x6EC5],
+  ["D9A1",0x8511],
+  ["D9A2",0x51A5],
+  ["D9A3",0x540D],
+  ["D9A4",0x547D],
+  ["D9A5",0x660E],
+  ["D9A6",0x669D],
+  ["D9A7",0x6927],
+  ["D9A8",0x6E9F],
+  ["D9A9",0x76BF],
+  ["D9AA",0x7791],
+  ["D9AB",0x8317],
+  ["D9AC",0x84C2],
+  ["D9AD",0x879F],
+  ["D9AE",0x9169],
+  ["D9AF",0x9298],
+  ["D9B0",0x9CF4],
+  ["D9B1",0x8882],
+  ["D9B2",0x4FAE],
+  ["D9B3",0x5192],
+  ["D9B4",0x52DF],
+  ["D9B5",0x59C6],
+  ["D9B6",0x5E3D],
+  ["D9B7",0x6155],
+  ["D9B8",0x6478],
+  ["D9B9",0x6479],
+  ["D9BA",0x66AE],
+  ["D9BB",0x67D0],
+  ["D9BC",0x6A21],
+  ["D9BD",0x6BCD],
+  ["D9BE",0x6BDB],
+  ["D9BF",0x725F],
+  ["D9C0",0x7261],
+  ["D9C1",0x7441],
+  ["D9C2",0x7738],
+  ["D9C3",0x77DB],
+  ["D9C4",0x8017],
+  ["D9C5",0x82BC],
+  ["D9C6",0x8305],
+  ["D9C7",0x8B00],
+  ["D9C8",0x8B28],
+  ["D9C9",0x8C8C],
+  ["D9CA",0x6728],
+  ["D9CB",0x6C90],
+  ["D9CC",0x7267],
+  ["D9CD",0x76EE],
+  ["D9CE",0x7766],
+  ["D9CF",0x7A46],
+  ["D9D0",0x9DA9],
+  ["D9D1",0x6B7F],
+  ["D9D2",0x6C92],
+  ["D9D3",0x5922],
+  ["D9D4",0x6726],
+  ["D9D5",0x8499],
+  ["D9D6",0x536F],
+  ["D9D7",0x5893],
+  ["D9D8",0x5999],
+  ["D9D9",0x5EDF],
+  ["D9DA",0x63CF],
+  ["D9DB",0x6634],
+  ["D9DC",0x6773],
+  ["D9DD",0x6E3A],
+  ["D9DE",0x732B],
+  ["D9DF",0x7AD7],
+  ["D9E0",0x82D7],
+  ["D9E1",0x9328],
+  ["D9E2",0x52D9],
+  ["D9E3",0x5DEB],
+  ["D9E4",0x61AE],
+  ["D9E5",0x61CB],
+  ["D9E6",0x620A],
+  ["D9E7",0x62C7],
+  ["D9E8",0x64AB],
+  ["D9E9",0x65E0],
+  ["D9EA",0x6959],
+  ["D9EB",0x6B66],
+  ["D9EC",0x6BCB],
+  ["D9ED",0x7121],
+  ["D9EE",0x73F7],
+  ["D9EF",0x755D],
+  ["D9F0",0x7E46],
+  ["D9F1",0x821E],
+  ["D9F2",0x8302],
+  ["D9F3",0x856A],
+  ["D9F4",0x8AA3],
+  ["D9F5",0x8CBF],
+  ["D9F6",0x9727],
+  ["D9F7",0x9D61],
+  ["D9F8",0x58A8],
+  ["D9F9",0x9ED8],
+  ["D9FA",0x5011],
+  ["D9FB",0x520E],
+  ["D9FC",0x543B],
+  ["D9FD",0x554F],
+  ["D9FE",0x6587],
+  ["DAA1",0x6C76],
+  ["DAA2",0x7D0A],
+  ["DAA3",0x7D0B],
+  ["DAA4",0x805E],
+  ["DAA5",0x868A],
+  ["DAA6",0x9580],
+  ["DAA7",0x96EF],
+  ["DAA8",0x52FF],
+  ["DAA9",0x6C95],
+  ["DAAA",0x7269],
+  ["DAAB",0x5473],
+  ["DAAC",0x5A9A],
+  ["DAAD",0x5C3E],
+  ["DAAE",0x5D4B],
+  ["DAAF",0x5F4C],
+  ["DAB0",0x5FAE],
+  ["DAB1",0x672A],
+  ["DAB2",0x68B6],
+  ["DAB3",0x6963],
+  ["DAB4",0x6E3C],
+  ["DAB5",0x6E44],
+  ["DAB6",0x7709],
+  ["DAB7",0x7C73],
+  ["DAB8",0x7F8E],
+  ["DAB9",0x8587],
+  ["DABA",0x8B0E],
+  ["DABB",0x8FF7],
+  ["DABC",0x9761],
+  ["DABD",0x9EF4],
+  ["DABE",0x5CB7],
+  ["DABF",0x60B6],
+  ["DAC0",0x610D],
+  ["DAC1",0x61AB],
+  ["DAC2",0x654F],
+  ["DAC3",0x65FB],
+  ["DAC4",0x65FC],
+  ["DAC5",0x6C11],
+  ["DAC6",0x6CEF],
+  ["DAC7",0x739F],
+  ["DAC8",0x73C9],
+  ["DAC9",0x7DE1],
+  ["DACA",0x9594],
+  ["DACB",0x5BC6],
+  ["DACC",0x871C],
+  ["DACD",0x8B10],
+  ["DACE",0x525D],
+  ["DACF",0x535A],
+  ["DAD0",0x62CD],
+  ["DAD1",0x640F],
+  ["DAD2",0x64B2],
+  ["DAD3",0x6734],
+  ["DAD4",0x6A38],
+  ["DAD5",0x6CCA],
+  ["DAD6",0x73C0],
+  ["DAD7",0x749E],
+  ["DAD8",0x7B94],
+  ["DAD9",0x7C95],
+  ["DADA",0x7E1B],
+  ["DADB",0x818A],
+  ["DADC",0x8236],
+  ["DADD",0x8584],
+  ["DADE",0x8FEB],
+  ["DADF",0x96F9],
+  ["DAE0",0x99C1],
+  ["DAE1",0x4F34],
+  ["DAE2",0x534A],
+  ["DAE3",0x53CD],
+  ["DAE4",0x53DB],
+  ["DAE5",0x62CC],
+  ["DAE6",0x642C],
+  ["DAE7",0x6500],
+  ["DAE8",0x6591],
+  ["DAE9",0x69C3],
+  ["DAEA",0x6CEE],
+  ["DAEB",0x6F58],
+  ["DAEC",0x73ED],
+  ["DAED",0x7554],
+  ["DAEE",0x7622],
+  ["DAEF",0x76E4],
+  ["DAF0",0x76FC],
+  ["DAF1",0x78D0],
+  ["DAF2",0x78FB],
+  ["DAF3",0x792C],
+  ["DAF4",0x7D46],
+  ["DAF5",0x822C],
+  ["DAF6",0x87E0],
+  ["DAF7",0x8FD4],
+  ["DAF8",0x9812],
+  ["DAF9",0x98EF],
+  ["DAFA",0x52C3],
+  ["DAFB",0x62D4],
+  ["DAFC",0x64A5],
+  ["DAFD",0x6E24],
+  ["DAFE",0x6F51],
+  ["DBA1",0x767C],
+  ["DBA2",0x8DCB],
+  ["DBA3",0x91B1],
+  ["DBA4",0x9262],
+  ["DBA5",0x9AEE],
+  ["DBA6",0x9B43],
+  ["DBA7",0x5023],
+  ["DBA8",0x508D],
+  ["DBA9",0x574A],
+  ["DBAA",0x59A8],
+  ["DBAB",0x5C28],
+  ["DBAC",0x5E47],
+  ["DBAD",0x5F77],
+  ["DBAE",0x623F],
+  ["DBAF",0x653E],
+  ["DBB0",0x65B9],
+  ["DBB1",0x65C1],
+  ["DBB2",0x6609],
+  ["DBB3",0x678B],
+  ["DBB4",0x699C],
+  ["DBB5",0x6EC2],
+  ["DBB6",0x78C5],
+  ["DBB7",0x7D21],
+  ["DBB8",0x80AA],
+  ["DBB9",0x8180],
+  ["DBBA",0x822B],
+  ["DBBB",0x82B3],
+  ["DBBC",0x84A1],
+  ["DBBD",0x868C],
+  ["DBBE",0x8A2A],
+  ["DBBF",0x8B17],
+  ["DBC0",0x90A6],
+  ["DBC1",0x9632],
+  ["DBC2",0x9F90],
+  ["DBC3",0x500D],
+  ["DBC4",0x4FF3],
+  ["DBC5",0xF963],
+  ["DBC6",0x57F9],
+  ["DBC7",0x5F98],
+  ["DBC8",0x62DC],
+  ["DBC9",0x6392],
+  ["DBCA",0x676F],
+  ["DBCB",0x6E43],
+  ["DBCC",0x7119],
+  ["DBCD",0x76C3],
+  ["DBCE",0x80CC],
+  ["DBCF",0x80DA],
+  ["DBD0",0x88F4],
+  ["DBD1",0x88F5],
+  ["DBD2",0x8919],
+  ["DBD3",0x8CE0],
+  ["DBD4",0x8F29],
+  ["DBD5",0x914D],
+  ["DBD6",0x966A],
+  ["DBD7",0x4F2F],
+  ["DBD8",0x4F70],
+  ["DBD9",0x5E1B],
+  ["DBDA",0x67CF],
+  ["DBDB",0x6822],
+  ["DBDC",0x767D],
+  ["DBDD",0x767E],
+  ["DBDE",0x9B44],
+  ["DBDF",0x5E61],
+  ["DBE0",0x6A0A],
+  ["DBE1",0x7169],
+  ["DBE2",0x71D4],
+  ["DBE3",0x756A],
+  ["DBE4",0xF964],
+  ["DBE5",0x7E41],
+  ["DBE6",0x8543],
+  ["DBE7",0x85E9],
+  ["DBE8",0x98DC],
+  ["DBE9",0x4F10],
+  ["DBEA",0x7B4F],
+  ["DBEB",0x7F70],
+  ["DBEC",0x95A5],
+  ["DBED",0x51E1],
+  ["DBEE",0x5E06],
+  ["DBEF",0x68B5],
+  ["DBF0",0x6C3E],
+  ["DBF1",0x6C4E],
+  ["DBF2",0x6CDB],
+  ["DBF3",0x72AF],
+  ["DBF4",0x7BC4],
+  ["DBF5",0x8303],
+  ["DBF6",0x6CD5],
+  ["DBF7",0x743A],
+  ["DBF8",0x50FB],
+  ["DBF9",0x5288],
+  ["DBFA",0x58C1],
+  ["DBFB",0x64D8],
+  ["DBFC",0x6A97],
+  ["DBFD",0x74A7],
+  ["DBFE",0x7656],
+  ["DCA1",0x78A7],
+  ["DCA2",0x8617],
+  ["DCA3",0x95E2],
+  ["DCA4",0x9739],
+  ["DCA5",0xF965],
+  ["DCA6",0x535E],
+  ["DCA7",0x5F01],
+  ["DCA8",0x8B8A],
+  ["DCA9",0x8FA8],
+  ["DCAA",0x8FAF],
+  ["DCAB",0x908A],
+  ["DCAC",0x5225],
+  ["DCAD",0x77A5],
+  ["DCAE",0x9C49],
+  ["DCAF",0x9F08],
+  ["DCB0",0x4E19],
+  ["DCB1",0x5002],
+  ["DCB2",0x5175],
+  ["DCB3",0x5C5B],
+  ["DCB4",0x5E77],
+  ["DCB5",0x661E],
+  ["DCB6",0x663A],
+  ["DCB7",0x67C4],
+  ["DCB8",0x68C5],
+  ["DCB9",0x70B3],
+  ["DCBA",0x7501],
+  ["DCBB",0x75C5],
+  ["DCBC",0x79C9],
+  ["DCBD",0x7ADD],
+  ["DCBE",0x8F27],
+  ["DCBF",0x9920],
+  ["DCC0",0x9A08],
+  ["DCC1",0x4FDD],
+  ["DCC2",0x5821],
+  ["DCC3",0x5831],
+  ["DCC4",0x5BF6],
+  ["DCC5",0x666E],
+  ["DCC6",0x6B65],
+  ["DCC7",0x6D11],
+  ["DCC8",0x6E7A],
+  ["DCC9",0x6F7D],
+  ["DCCA",0x73E4],
+  ["DCCB",0x752B],
+  ["DCCC",0x83E9],
+  ["DCCD",0x88DC],
+  ["DCCE",0x8913],
+  ["DCCF",0x8B5C],
+  ["DCD0",0x8F14],
+  ["DCD1",0x4F0F],
+  ["DCD2",0x50D5],
+  ["DCD3",0x5310],
+  ["DCD4",0x535C],
+  ["DCD5",0x5B93],
+  ["DCD6",0x5FA9],
+  ["DCD7",0x670D],
+  ["DCD8",0x798F],
+  ["DCD9",0x8179],
+  ["DCDA",0x832F],
+  ["DCDB",0x8514],
+  ["DCDC",0x8907],
+  ["DCDD",0x8986],
+  ["DCDE",0x8F39],
+  ["DCDF",0x8F3B],
+  ["DCE0",0x99A5],
+  ["DCE1",0x9C12],
+  ["DCE2",0x672C],
+  ["DCE3",0x4E76],
+  ["DCE4",0x4FF8],
+  ["DCE5",0x5949],
+  ["DCE6",0x5C01],
+  ["DCE7",0x5CEF],
+  ["DCE8",0x5CF0],
+  ["DCE9",0x6367],
+  ["DCEA",0x68D2],
+  ["DCEB",0x70FD],
+  ["DCEC",0x71A2],
+  ["DCED",0x742B],
+  ["DCEE",0x7E2B],
+  ["DCEF",0x84EC],
+  ["DCF0",0x8702],
+  ["DCF1",0x9022],
+  ["DCF2",0x92D2],
+  ["DCF3",0x9CF3],
+  ["DCF4",0x4E0D],
+  ["DCF5",0x4ED8],
+  ["DCF6",0x4FEF],
+  ["DCF7",0x5085],
+  ["DCF8",0x5256],
+  ["DCF9",0x526F],
+  ["DCFA",0x5426],
+  ["DCFB",0x5490],
+  ["DCFC",0x57E0],
+  ["DCFD",0x592B],
+  ["DCFE",0x5A66],
+  ["DDA1",0x5B5A],
+  ["DDA2",0x5B75],
+  ["DDA3",0x5BCC],
+  ["DDA4",0x5E9C],
+  ["DDA5",0xF966],
+  ["DDA6",0x6276],
+  ["DDA7",0x6577],
+  ["DDA8",0x65A7],
+  ["DDA9",0x6D6E],
+  ["DDAA",0x6EA5],
+  ["DDAB",0x7236],
+  ["DDAC",0x7B26],
+  ["DDAD",0x7C3F],
+  ["DDAE",0x7F36],
+  ["DDAF",0x8150],
+  ["DDB0",0x8151],
+  ["DDB1",0x819A],
+  ["DDB2",0x8240],
+  ["DDB3",0x8299],
+  ["DDB4",0x83A9],
+  ["DDB5",0x8A03],
+  ["DDB6",0x8CA0],
+  ["DDB7",0x8CE6],
+  ["DDB8",0x8CFB],
+  ["DDB9",0x8D74],
+  ["DDBA",0x8DBA],
+  ["DDBB",0x90E8],
+  ["DDBC",0x91DC],
+  ["DDBD",0x961C],
+  ["DDBE",0x9644],
+  ["DDBF",0x99D9],
+  ["DDC0",0x9CE7],
+  ["DDC1",0x5317],
+  ["DDC2",0x5206],
+  ["DDC3",0x5429],
+  ["DDC4",0x5674],
+  ["DDC5",0x58B3],
+  ["DDC6",0x5954],
+  ["DDC7",0x596E],
+  ["DDC8",0x5FFF],
+  ["DDC9",0x61A4],
+  ["DDCA",0x626E],
+  ["DDCB",0x6610],
+  ["DDCC",0x6C7E],
+  ["DDCD",0x711A],
+  ["DDCE",0x76C6],
+  ["DDCF",0x7C89],
+  ["DDD0",0x7CDE],
+  ["DDD1",0x7D1B],
+  ["DDD2",0x82AC],
+  ["DDD3",0x8CC1],
+  ["DDD4",0x96F0],
+  ["DDD5",0xF967],
+  ["DDD6",0x4F5B],
+  ["DDD7",0x5F17],
+  ["DDD8",0x5F7F],
+  ["DDD9",0x62C2],
+  ["DDDA",0x5D29],
+  ["DDDB",0x670B],
+  ["DDDC",0x68DA],
+  ["DDDD",0x787C],
+  ["DDDE",0x7E43],
+  ["DDDF",0x9D6C],
+  ["DDE0",0x4E15],
+  ["DDE1",0x5099],
+  ["DDE2",0x5315],
+  ["DDE3",0x532A],
+  ["DDE4",0x5351],
+  ["DDE5",0x5983],
+  ["DDE6",0x5A62],
+  ["DDE7",0x5E87],
+  ["DDE8",0x60B2],
+  ["DDE9",0x618A],
+  ["DDEA",0x6249],
+  ["DDEB",0x6279],
+  ["DDEC",0x6590],
+  ["DDED",0x6787],
+  ["DDEE",0x69A7],
+  ["DDEF",0x6BD4],
+  ["DDF0",0x6BD6],
+  ["DDF1",0x6BD7],
+  ["DDF2",0x6BD8],
+  ["DDF3",0x6CB8],
+  ["DDF4",0xF968],
+  ["DDF5",0x7435],
+  ["DDF6",0x75FA],
+  ["DDF7",0x7812],
+  ["DDF8",0x7891],
+  ["DDF9",0x79D5],
+  ["DDFA",0x79D8],
+  ["DDFB",0x7C83],
+  ["DDFC",0x7DCB],
+  ["DDFD",0x7FE1],
+  ["DDFE",0x80A5],
+  ["DEA1",0x813E],
+  ["DEA2",0x81C2],
+  ["DEA3",0x83F2],
+  ["DEA4",0x871A],
+  ["DEA5",0x88E8],
+  ["DEA6",0x8AB9],
+  ["DEA7",0x8B6C],
+  ["DEA8",0x8CBB],
+  ["DEA9",0x9119],
+  ["DEAA",0x975E],
+  ["DEAB",0x98DB],
+  ["DEAC",0x9F3B],
+  ["DEAD",0x56AC],
+  ["DEAE",0x5B2A],
+  ["DEAF",0x5F6C],
+  ["DEB0",0x658C],
+  ["DEB1",0x6AB3],
+  ["DEB2",0x6BAF],
+  ["DEB3",0x6D5C],
+  ["DEB4",0x6FF1],
+  ["DEB5",0x7015],
+  ["DEB6",0x725D],
+  ["DEB7",0x73AD],
+  ["DEB8",0x8CA7],
+  ["DEB9",0x8CD3],
+  ["DEBA",0x983B],
+  ["DEBB",0x6191],
+  ["DEBC",0x6C37],
+  ["DEBD",0x8058],
+  ["DEBE",0x9A01],
+  ["DEBF",0x4E4D],
+  ["DEC0",0x4E8B],
+  ["DEC1",0x4E9B],
+  ["DEC2",0x4ED5],
+  ["DEC3",0x4F3A],
+  ["DEC4",0x4F3C],
+  ["DEC5",0x4F7F],
+  ["DEC6",0x4FDF],
+  ["DEC7",0x50FF],
+  ["DEC8",0x53F2],
+  ["DEC9",0x53F8],
+  ["DECA",0x5506],
+  ["DECB",0x55E3],
+  ["DECC",0x56DB],
+  ["DECD",0x58EB],
+  ["DECE",0x5962],
+  ["DECF",0x5A11],
+  ["DED0",0x5BEB],
+  ["DED1",0x5BFA],
+  ["DED2",0x5C04],
+  ["DED3",0x5DF3],
+  ["DED4",0x5E2B],
+  ["DED5",0x5F99],
+  ["DED6",0x601D],
+  ["DED7",0x6368],
+  ["DED8",0x659C],
+  ["DED9",0x65AF],
+  ["DEDA",0x67F6],
+  ["DEDB",0x67FB],
+  ["DEDC",0x68AD],
+  ["DEDD",0x6B7B],
+  ["DEDE",0x6C99],
+  ["DEDF",0x6CD7],
+  ["DEE0",0x6E23],
+  ["DEE1",0x7009],
+  ["DEE2",0x7345],
+  ["DEE3",0x7802],
+  ["DEE4",0x793E],
+  ["DEE5",0x7940],
+  ["DEE6",0x7960],
+  ["DEE7",0x79C1],
+  ["DEE8",0x7BE9],
+  ["DEE9",0x7D17],
+  ["DEEA",0x7D72],
+  ["DEEB",0x8086],
+  ["DEEC",0x820D],
+  ["DEED",0x838E],
+  ["DEEE",0x84D1],
+  ["DEEF",0x86C7],
+  ["DEF0",0x88DF],
+  ["DEF1",0x8A50],
+  ["DEF2",0x8A5E],
+  ["DEF3",0x8B1D],
+  ["DEF4",0x8CDC],
+  ["DEF5",0x8D66],
+  ["DEF6",0x8FAD],
+  ["DEF7",0x90AA],
+  ["DEF8",0x98FC],
+  ["DEF9",0x99DF],
+  ["DEFA",0x9E9D],
+  ["DEFB",0x524A],
+  ["DEFC",0xF969],
+  ["DEFD",0x6714],
+  ["DEFE",0xF96A],
+  ["DFA1",0x5098],
+  ["DFA2",0x522A],
+  ["DFA3",0x5C71],
+  ["DFA4",0x6563],
+  ["DFA5",0x6C55],
+  ["DFA6",0x73CA],
+  ["DFA7",0x7523],
+  ["DFA8",0x759D],
+  ["DFA9",0x7B97],
+  ["DFAA",0x849C],
+  ["DFAB",0x9178],
+  ["DFAC",0x9730],
+  ["DFAD",0x4E77],
+  ["DFAE",0x6492],
+  ["DFAF",0x6BBA],
+  ["DFB0",0x715E],
+  ["DFB1",0x85A9],
+  ["DFB2",0x4E09],
+  ["DFB3",0xF96B],
+  ["DFB4",0x6749],
+  ["DFB5",0x68EE],
+  ["DFB6",0x6E17],
+  ["DFB7",0x829F],
+  ["DFB8",0x8518],
+  ["DFB9",0x886B],
+  ["DFBA",0x63F7],
+  ["DFBB",0x6F81],
+  ["DFBC",0x9212],
+  ["DFBD",0x98AF],
+  ["DFBE",0x4E0A],
+  ["DFBF",0x50B7],
+  ["DFC0",0x50CF],
+  ["DFC1",0x511F],
+  ["DFC2",0x5546],
+  ["DFC3",0x55AA],
+  ["DFC4",0x5617],
+  ["DFC5",0x5B40],
+  ["DFC6",0x5C19],
+  ["DFC7",0x5CE0],
+  ["DFC8",0x5E38],
+  ["DFC9",0x5E8A],
+  ["DFCA",0x5EA0],
+  ["DFCB",0x5EC2],
+  ["DFCC",0x60F3],
+  ["DFCD",0x6851],
+  ["DFCE",0x6A61],
+  ["DFCF",0x6E58],
+  ["DFD0",0x723D],
+  ["DFD1",0x7240],
+  ["DFD2",0x72C0],
+  ["DFD3",0x76F8],
+  ["DFD4",0x7965],
+  ["DFD5",0x7BB1],
+  ["DFD6",0x7FD4],
+  ["DFD7",0x88F3],
+  ["DFD8",0x89F4],
+  ["DFD9",0x8A73],
+  ["DFDA",0x8C61],
+  ["DFDB",0x8CDE],
+  ["DFDC",0x971C],
+  ["DFDD",0x585E],
+  ["DFDE",0x74BD],
+  ["DFDF",0x8CFD],
+  ["DFE0",0x55C7],
+  ["DFE1",0xF96C],
+  ["DFE2",0x7A61],
+  ["DFE3",0x7D22],
+  ["DFE4",0x8272],
+  ["DFE5",0x7272],
+  ["DFE6",0x751F],
+  ["DFE7",0x7525],
+  ["DFE8",0xF96D],
+  ["DFE9",0x7B19],
+  ["DFEA",0x5885],
+  ["DFEB",0x58FB],
+  ["DFEC",0x5DBC],
+  ["DFED",0x5E8F],
+  ["DFEE",0x5EB6],
+  ["DFEF",0x5F90],
+  ["DFF0",0x6055],
+  ["DFF1",0x6292],
+  ["DFF2",0x637F],
+  ["DFF3",0x654D],
+  ["DFF4",0x6691],
+  ["DFF5",0x66D9],
+  ["DFF6",0x66F8],
+  ["DFF7",0x6816],
+  ["DFF8",0x68F2],
+  ["DFF9",0x7280],
+  ["DFFA",0x745E],
+  ["DFFB",0x7B6E],
+  ["DFFC",0x7D6E],
+  ["DFFD",0x7DD6],
+  ["DFFE",0x7F72],
+  ["E0A1",0x80E5],
+  ["E0A2",0x8212],
+  ["E0A3",0x85AF],
+  ["E0A4",0x897F],
+  ["E0A5",0x8A93],
+  ["E0A6",0x901D],
+  ["E0A7",0x92E4],
+  ["E0A8",0x9ECD],
+  ["E0A9",0x9F20],
+  ["E0AA",0x5915],
+  ["E0AB",0x596D],
+  ["E0AC",0x5E2D],
+  ["E0AD",0x60DC],
+  ["E0AE",0x6614],
+  ["E0AF",0x6673],
+  ["E0B0",0x6790],
+  ["E0B1",0x6C50],
+  ["E0B2",0x6DC5],
+  ["E0B3",0x6F5F],
+  ["E0B4",0x77F3],
+  ["E0B5",0x78A9],
+  ["E0B6",0x84C6],
+  ["E0B7",0x91CB],
+  ["E0B8",0x932B],
+  ["E0B9",0x4ED9],
+  ["E0BA",0x50CA],
+  ["E0BB",0x5148],
+  ["E0BC",0x5584],
+  ["E0BD",0x5B0B],
+  ["E0BE",0x5BA3],
+  ["E0BF",0x6247],
+  ["E0C0",0x657E],
+  ["E0C1",0x65CB],
+  ["E0C2",0x6E32],
+  ["E0C3",0x717D],
+  ["E0C4",0x7401],
+  ["E0C5",0x7444],
+  ["E0C6",0x7487],
+  ["E0C7",0x74BF],
+  ["E0C8",0x766C],
+  ["E0C9",0x79AA],
+  ["E0CA",0x7DDA],
+  ["E0CB",0x7E55],
+  ["E0CC",0x7FA8],
+  ["E0CD",0x817A],
+  ["E0CE",0x81B3],
+  ["E0CF",0x8239],
+  ["E0D0",0x861A],
+  ["E0D1",0x87EC],
+  ["E0D2",0x8A75],
+  ["E0D3",0x8DE3],
+  ["E0D4",0x9078],
+  ["E0D5",0x9291],
+  ["E0D6",0x9425],
+  ["E0D7",0x994D],
+  ["E0D8",0x9BAE],
+  ["E0D9",0x5368],
+  ["E0DA",0x5C51],
+  ["E0DB",0x6954],
+  ["E0DC",0x6CC4],
+  ["E0DD",0x6D29],
+  ["E0DE",0x6E2B],
+  ["E0DF",0x820C],
+  ["E0E0",0x859B],
+  ["E0E1",0x893B],
+  ["E0E2",0x8A2D],
+  ["E0E3",0x8AAA],
+  ["E0E4",0x96EA],
+  ["E0E5",0x9F67],
+  ["E0E6",0x5261],
+  ["E0E7",0x66B9],
+  ["E0E8",0x6BB2],
+  ["E0E9",0x7E96],
+  ["E0EA",0x87FE],
+  ["E0EB",0x8D0D],
+  ["E0EC",0x9583],
+  ["E0ED",0x965D],
+  ["E0EE",0x651D],
+  ["E0EF",0x6D89],
+  ["E0F0",0x71EE],
+  ["E0F1",0xF96E],
+  ["E0F2",0x57CE],
+  ["E0F3",0x59D3],
+  ["E0F4",0x5BAC],
+  ["E0F5",0x6027],
+  ["E0F6",0x60FA],
+  ["E0F7",0x6210],
+  ["E0F8",0x661F],
+  ["E0F9",0x665F],
+  ["E0FA",0x7329],
+  ["E0FB",0x73F9],
+  ["E0FC",0x76DB],
+  ["E0FD",0x7701],
+  ["E0FE",0x7B6C],
+  ["E1A1",0x8056],
+  ["E1A2",0x8072],
+  ["E1A3",0x8165],
+  ["E1A4",0x8AA0],
+  ["E1A5",0x9192],
+  ["E1A6",0x4E16],
+  ["E1A7",0x52E2],
+  ["E1A8",0x6B72],
+  ["E1A9",0x6D17],
+  ["E1AA",0x7A05],
+  ["E1AB",0x7B39],
+  ["E1AC",0x7D30],
+  ["E1AD",0xF96F],
+  ["E1AE",0x8CB0],
+  ["E1AF",0x53EC],
+  ["E1B0",0x562F],
+  ["E1B1",0x5851],
+  ["E1B2",0x5BB5],
+  ["E1B3",0x5C0F],
+  ["E1B4",0x5C11],
+  ["E1B5",0x5DE2],
+  ["E1B6",0x6240],
+  ["E1B7",0x6383],
+  ["E1B8",0x6414],
+  ["E1B9",0x662D],
+  ["E1BA",0x68B3],
+  ["E1BB",0x6CBC],
+  ["E1BC",0x6D88],
+  ["E1BD",0x6EAF],
+  ["E1BE",0x701F],
+  ["E1BF",0x70A4],
+  ["E1C0",0x71D2],
+  ["E1C1",0x7526],
+  ["E1C2",0x758F],
+  ["E1C3",0x758E],
+  ["E1C4",0x7619],
+  ["E1C5",0x7B11],
+  ["E1C6",0x7BE0],
+  ["E1C7",0x7C2B],
+  ["E1C8",0x7D20],
+  ["E1C9",0x7D39],
+  ["E1CA",0x852C],
+  ["E1CB",0x856D],
+  ["E1CC",0x8607],
+  ["E1CD",0x8A34],
+  ["E1CE",0x900D],
+  ["E1CF",0x9061],
+  ["E1D0",0x90B5],
+  ["E1D1",0x92B7],
+  ["E1D2",0x97F6],
+  ["E1D3",0x9A37],
+  ["E1D4",0x4FD7],
+  ["E1D5",0x5C6C],
+  ["E1D6",0x675F],
+  ["E1D7",0x6D91],
+  ["E1D8",0x7C9F],
+  ["E1D9",0x7E8C],
+  ["E1DA",0x8B16],
+  ["E1DB",0x8D16],
+  ["E1DC",0x901F],
+  ["E1DD",0x5B6B],
+  ["E1DE",0x5DFD],
+  ["E1DF",0x640D],
+  ["E1E0",0x84C0],
+  ["E1E1",0x905C],
+  ["E1E2",0x98E1],
+  ["E1E3",0x7387],
+  ["E1E4",0x5B8B],
+  ["E1E5",0x609A],
+  ["E1E6",0x677E],
+  ["E1E7",0x6DDE],
+  ["E1E8",0x8A1F],
+  ["E1E9",0x8AA6],
+  ["E1EA",0x9001],
+  ["E1EB",0x980C],
+  ["E1EC",0x5237],
+  ["E1ED",0xF970],
+  ["E1EE",0x7051],
+  ["E1EF",0x788E],
+  ["E1F0",0x9396],
+  ["E1F1",0x8870],
+  ["E1F2",0x91D7],
+  ["E1F3",0x4FEE],
+  ["E1F4",0x53D7],
+  ["E1F5",0x55FD],
+  ["E1F6",0x56DA],
+  ["E1F7",0x5782],
+  ["E1F8",0x58FD],
+  ["E1F9",0x5AC2],
+  ["E1FA",0x5B88],
+  ["E1FB",0x5CAB],
+  ["E1FC",0x5CC0],
+  ["E1FD",0x5E25],
+  ["E1FE",0x6101],
+  ["E2A1",0x620D],
+  ["E2A2",0x624B],
+  ["E2A3",0x6388],
+  ["E2A4",0x641C],
+  ["E2A5",0x6536],
+  ["E2A6",0x6578],
+  ["E2A7",0x6A39],
+  ["E2A8",0x6B8A],
+  ["E2A9",0x6C34],
+  ["E2AA",0x6D19],
+  ["E2AB",0x6F31],
+  ["E2AC",0x71E7],
+  ["E2AD",0x72E9],
+  ["E2AE",0x7378],
+  ["E2AF",0x7407],
+  ["E2B0",0x74B2],
+  ["E2B1",0x7626],
+  ["E2B2",0x7761],
+  ["E2B3",0x79C0],
+  ["E2B4",0x7A57],
+  ["E2B5",0x7AEA],
+  ["E2B6",0x7CB9],
+  ["E2B7",0x7D8F],
+  ["E2B8",0x7DAC],
+  ["E2B9",0x7E61],
+  ["E2BA",0x7F9E],
+  ["E2BB",0x8129],
+  ["E2BC",0x8331],
+  ["E2BD",0x8490],
+  ["E2BE",0x84DA],
+  ["E2BF",0x85EA],
+  ["E2C0",0x8896],
+  ["E2C1",0x8AB0],
+  ["E2C2",0x8B90],
+  ["E2C3",0x8F38],
+  ["E2C4",0x9042],
+  ["E2C5",0x9083],
+  ["E2C6",0x916C],
+  ["E2C7",0x9296],
+  ["E2C8",0x92B9],
+  ["E2C9",0x968B],
+  ["E2CA",0x96A7],
+  ["E2CB",0x96A8],
+  ["E2CC",0x96D6],
+  ["E2CD",0x9700],
+  ["E2CE",0x9808],
+  ["E2CF",0x9996],
+  ["E2D0",0x9AD3],
+  ["E2D1",0x9B1A],
+  ["E2D2",0x53D4],
+  ["E2D3",0x587E],
+  ["E2D4",0x5919],
+  ["E2D5",0x5B70],
+  ["E2D6",0x5BBF],
+  ["E2D7",0x6DD1],
+  ["E2D8",0x6F5A],
+  ["E2D9",0x719F],
+  ["E2DA",0x7421],
+  ["E2DB",0x74B9],
+  ["E2DC",0x8085],
+  ["E2DD",0x83FD],
+  ["E2DE",0x5DE1],
+  ["E2DF",0x5F87],
+  ["E2E0",0x5FAA],
+  ["E2E1",0x6042],
+  ["E2E2",0x65EC],
+  ["E2E3",0x6812],
+  ["E2E4",0x696F],
+  ["E2E5",0x6A53],
+  ["E2E6",0x6B89],
+  ["E2E7",0x6D35],
+  ["E2E8",0x6DF3],
+  ["E2E9",0x73E3],
+  ["E2EA",0x76FE],
+  ["E2EB",0x77AC],
+  ["E2EC",0x7B4D],
+  ["E2ED",0x7D14],
+  ["E2EE",0x8123],
+  ["E2EF",0x821C],
+  ["E2F0",0x8340],
+  ["E2F1",0x84F4],
+  ["E2F2",0x8563],
+  ["E2F3",0x8A62],
+  ["E2F4",0x8AC4],
+  ["E2F5",0x9187],
+  ["E2F6",0x931E],
+  ["E2F7",0x9806],
+  ["E2F8",0x99B4],
+  ["E2F9",0x620C],
+  ["E2FA",0x8853],
+  ["E2FB",0x8FF0],
+  ["E2FC",0x9265],
+  ["E2FD",0x5D07],
+  ["E2FE",0x5D27],
+  ["E3A1",0x5D69],
+  ["E3A2",0x745F],
+  ["E3A3",0x819D],
+  ["E3A4",0x8768],
+  ["E3A5",0x6FD5],
+  ["E3A6",0x62FE],
+  ["E3A7",0x7FD2],
+  ["E3A8",0x8936],
+  ["E3A9",0x8972],
+  ["E3AA",0x4E1E],
+  ["E3AB",0x4E58],
+  ["E3AC",0x50E7],
+  ["E3AD",0x52DD],
+  ["E3AE",0x5347],
+  ["E3AF",0x627F],
+  ["E3B0",0x6607],
+  ["E3B1",0x7E69],
+  ["E3B2",0x8805],
+  ["E3B3",0x965E],
+  ["E3B4",0x4F8D],
+  ["E3B5",0x5319],
+  ["E3B6",0x5636],
+  ["E3B7",0x59CB],
+  ["E3B8",0x5AA4],
+  ["E3B9",0x5C38],
+  ["E3BA",0x5C4E],
+  ["E3BB",0x5C4D],
+  ["E3BC",0x5E02],
+  ["E3BD",0x5F11],
+  ["E3BE",0x6043],
+  ["E3BF",0x65BD],
+  ["E3C0",0x662F],
+  ["E3C1",0x6642],
+  ["E3C2",0x67BE],
+  ["E3C3",0x67F4],
+  ["E3C4",0x731C],
+  ["E3C5",0x77E2],
+  ["E3C6",0x793A],
+  ["E3C7",0x7FC5],
+  ["E3C8",0x8494],
+  ["E3C9",0x84CD],
+  ["E3CA",0x8996],
+  ["E3CB",0x8A66],
+  ["E3CC",0x8A69],
+  ["E3CD",0x8AE1],
+  ["E3CE",0x8C55],
+  ["E3CF",0x8C7A],
+  ["E3D0",0x57F4],
+  ["E3D1",0x5BD4],
+  ["E3D2",0x5F0F],
+  ["E3D3",0x606F],
+  ["E3D4",0x62ED],
+  ["E3D5",0x690D],
+  ["E3D6",0x6B96],
+  ["E3D7",0x6E5C],
+  ["E3D8",0x7184],
+  ["E3D9",0x7BD2],
+  ["E3DA",0x8755],
+  ["E3DB",0x8B58],
+  ["E3DC",0x8EFE],
+  ["E3DD",0x98DF],
+  ["E3DE",0x98FE],
+  ["E3DF",0x4F38],
+  ["E3E0",0x4F81],
+  ["E3E1",0x4FE1],
+  ["E3E2",0x547B],
+  ["E3E3",0x5A20],
+  ["E3E4",0x5BB8],
+  ["E3E5",0x613C],
+  ["E3E6",0x65B0],
+  ["E3E7",0x6668],
+  ["E3E8",0x71FC],
+  ["E3E9",0x7533],
+  ["E3EA",0x795E],
+  ["E3EB",0x7D33],
+  ["E3EC",0x814E],
+  ["E3ED",0x81E3],
+  ["E3EE",0x8398],
+  ["E3EF",0x85AA],
+  ["E3F0",0x85CE],
+  ["E3F1",0x8703],
+  ["E3F2",0x8A0A],
+  ["E3F3",0x8EAB],
+  ["E3F4",0x8F9B],
+  ["E3F5",0xF971],
+  ["E3F6",0x8FC5],
+  ["E3F7",0x5931],
+  ["E3F8",0x5BA4],
+  ["E3F9",0x5BE6],
+  ["E3FA",0x6089],
+  ["E3FB",0x5BE9],
+  ["E3FC",0x5C0B],
+  ["E3FD",0x5FC3],
+  ["E3FE",0x6C81],
+  ["E4A1",0xF972],
+  ["E4A2",0x6DF1],
+  ["E4A3",0x700B],
+  ["E4A4",0x751A],
+  ["E4A5",0x82AF],
+  ["E4A6",0x8AF6],
+  ["E4A7",0x4EC0],
+  ["E4A8",0x5341],
+  ["E4A9",0xF973],
+  ["E4AA",0x96D9],
+  ["E4AB",0x6C0F],
+  ["E4AC",0x4E9E],
+  ["E4AD",0x4FC4],
+  ["E4AE",0x5152],
+  ["E4AF",0x555E],
+  ["E4B0",0x5A25],
+  ["E4B1",0x5CE8],
+  ["E4B2",0x6211],
+  ["E4B3",0x7259],
+  ["E4B4",0x82BD],
+  ["E4B5",0x83AA],
+  ["E4B6",0x86FE],
+  ["E4B7",0x8859],
+  ["E4B8",0x8A1D],
+  ["E4B9",0x963F],
+  ["E4BA",0x96C5],
+  ["E4BB",0x9913],
+  ["E4BC",0x9D09],
+  ["E4BD",0x9D5D],
+  ["E4BE",0x580A],
+  ["E4BF",0x5CB3],
+  ["E4C0",0x5DBD],
+  ["E4C1",0x5E44],
+  ["E4C2",0x60E1],
+  ["E4C3",0x6115],
+  ["E4C4",0x63E1],
+  ["E4C5",0x6A02],
+  ["E4C6",0x6E25],
+  ["E4C7",0x9102],
+  ["E4C8",0x9354],
+  ["E4C9",0x984E],
+  ["E4CA",0x9C10],
+  ["E4CB",0x9F77],
+  ["E4CC",0x5B89],
+  ["E4CD",0x5CB8],
+  ["E4CE",0x6309],
+  ["E4CF",0x664F],
+  ["E4D0",0x6848],
+  ["E4D1",0x773C],
+  ["E4D2",0x96C1],
+  ["E4D3",0x978D],
+  ["E4D4",0x9854],
+  ["E4D5",0x9B9F],
+  ["E4D6",0x65A1],
+  ["E4D7",0x8B01],
+  ["E4D8",0x8ECB],
+  ["E4D9",0x95BC],
+  ["E4DA",0x5535],
+  ["E4DB",0x5CA9],
+  ["E4DC",0x5DD6],
+  ["E4DD",0x5EB5],
+  ["E4DE",0x6697],
+  ["E4DF",0x764C],
+  ["E4E0",0x83F4],
+  ["E4E1",0x95C7],
+  ["E4E2",0x58D3],
+  ["E4E3",0x62BC],
+  ["E4E4",0x72CE],
+  ["E4E5",0x9D28],
+  ["E4E6",0x4EF0],
+  ["E4E7",0x592E],
+  ["E4E8",0x600F],
+  ["E4E9",0x663B],
+  ["E4EA",0x6B83],
+  ["E4EB",0x79E7],
+  ["E4EC",0x9D26],
+  ["E4ED",0x5393],
+  ["E4EE",0x54C0],
+  ["E4EF",0x57C3],
+  ["E4F0",0x5D16],
+  ["E4F1",0x611B],
+  ["E4F2",0x66D6],
+  ["E4F3",0x6DAF],
+  ["E4F4",0x788D],
+  ["E4F5",0x827E],
+  ["E4F6",0x9698],
+  ["E4F7",0x9744],
+  ["E4F8",0x5384],
+  ["E4F9",0x627C],
+  ["E4FA",0x6396],
+  ["E4FB",0x6DB2],
+  ["E4FC",0x7E0A],
+  ["E4FD",0x814B],
+  ["E4FE",0x984D],
+  ["E5A1",0x6AFB],
+  ["E5A2",0x7F4C],
+  ["E5A3",0x9DAF],
+  ["E5A4",0x9E1A],
+  ["E5A5",0x4E5F],
+  ["E5A6",0x503B],
+  ["E5A7",0x51B6],
+  ["E5A8",0x591C],
+  ["E5A9",0x60F9],
+  ["E5AA",0x63F6],
+  ["E5AB",0x6930],
+  ["E5AC",0x723A],
+  ["E5AD",0x8036],
+  ["E5AE",0xF974],
+  ["E5AF",0x91CE],
+  ["E5B0",0x5F31],
+  ["E5B1",0xF975],
+  ["E5B2",0xF976],
+  ["E5B3",0x7D04],
+  ["E5B4",0x82E5],
+  ["E5B5",0x846F],
+  ["E5B6",0x84BB],
+  ["E5B7",0x85E5],
+  ["E5B8",0x8E8D],
+  ["E5B9",0xF977],
+  ["E5BA",0x4F6F],
+  ["E5BB",0xF978],
+  ["E5BC",0xF979],
+  ["E5BD",0x58E4],
+  ["E5BE",0x5B43],
+  ["E5BF",0x6059],
+  ["E5C0",0x63DA],
+  ["E5C1",0x6518],
+  ["E5C2",0x656D],
+  ["E5C3",0x6698],
+  ["E5C4",0xF97A],
+  ["E5C5",0x694A],
+  ["E5C6",0x6A23],
+  ["E5C7",0x6D0B],
+  ["E5C8",0x7001],
+  ["E5C9",0x716C],
+  ["E5CA",0x75D2],
+  ["E5CB",0x760D],
+  ["E5CC",0x79B3],
+  ["E5CD",0x7A70],
+  ["E5CE",0xF97B],
+  ["E5CF",0x7F8A],
+  ["E5D0",0xF97C],
+  ["E5D1",0x8944],
+  ["E5D2",0xF97D],
+  ["E5D3",0x8B93],
+  ["E5D4",0x91C0],
+  ["E5D5",0x967D],
+  ["E5D6",0xF97E],
+  ["E5D7",0x990A],
+  ["E5D8",0x5704],
+  ["E5D9",0x5FA1],
+  ["E5DA",0x65BC],
+  ["E5DB",0x6F01],
+  ["E5DC",0x7600],
+  ["E5DD",0x79A6],
+  ["E5DE",0x8A9E],
+  ["E5DF",0x99AD],
+  ["E5E0",0x9B5A],
+  ["E5E1",0x9F6C],
+  ["E5E2",0x5104],
+  ["E5E3",0x61B6],
+  ["E5E4",0x6291],
+  ["E5E5",0x6A8D],
+  ["E5E6",0x81C6],
+  ["E5E7",0x5043],
+  ["E5E8",0x5830],
+  ["E5E9",0x5F66],
+  ["E5EA",0x7109],
+  ["E5EB",0x8A00],
+  ["E5EC",0x8AFA],
+  ["E5ED",0x5B7C],
+  ["E5EE",0x8616],
+  ["E5EF",0x4FFA],
+  ["E5F0",0x513C],
+  ["E5F1",0x56B4],
+  ["E5F2",0x5944],
+  ["E5F3",0x63A9],
+  ["E5F4",0x6DF9],
+  ["E5F5",0x5DAA],
+  ["E5F6",0x696D],
+  ["E5F7",0x5186],
+  ["E5F8",0x4E88],
+  ["E5F9",0x4F59],
+  ["E5FA",0xF97F],
+  ["E5FB",0xF980],
+  ["E5FC",0xF981],
+  ["E5FD",0x5982],
+  ["E5FE",0xF982],
+  ["E6A1",0xF983],
+  ["E6A2",0x6B5F],
+  ["E6A3",0x6C5D],
+  ["E6A4",0xF984],
+  ["E6A5",0x74B5],
+  ["E6A6",0x7916],
+  ["E6A7",0xF985],
+  ["E6A8",0x8207],
+  ["E6A9",0x8245],
+  ["E6AA",0x8339],
+  ["E6AB",0x8F3F],
+  ["E6AC",0x8F5D],
+  ["E6AD",0xF986],
+  ["E6AE",0x9918],
+  ["E6AF",0xF987],
+  ["E6B0",0xF988],
+  ["E6B1",0xF989],
+  ["E6B2",0x4EA6],
+  ["E6B3",0xF98A],
+  ["E6B4",0x57DF],
+  ["E6B5",0x5F79],
+  ["E6B6",0x6613],
+  ["E6B7",0xF98B],
+  ["E6B8",0xF98C],
+  ["E6B9",0x75AB],
+  ["E6BA",0x7E79],
+  ["E6BB",0x8B6F],
+  ["E6BC",0xF98D],
+  ["E6BD",0x9006],
+  ["E6BE",0x9A5B],
+  ["E6BF",0x56A5],
+  ["E6C0",0x5827],
+  ["E6C1",0x59F8],
+  ["E6C2",0x5A1F],
+  ["E6C3",0x5BB4],
+  ["E6C4",0xF98E],
+  ["E6C5",0x5EF6],
+  ["E6C6",0xF98F],
+  ["E6C7",0xF990],
+  ["E6C8",0x6350],
+  ["E6C9",0x633B],
+  ["E6CA",0xF991],
+  ["E6CB",0x693D],
+  ["E6CC",0x6C87],
+  ["E6CD",0x6CBF],
+  ["E6CE",0x6D8E],
+  ["E6CF",0x6D93],
+  ["E6D0",0x6DF5],
+  ["E6D1",0x6F14],
+  ["E6D2",0xF992],
+  ["E6D3",0x70DF],
+  ["E6D4",0x7136],
+  ["E6D5",0x7159],
+  ["E6D6",0xF993],
+  ["E6D7",0x71C3],
+  ["E6D8",0x71D5],
+  ["E6D9",0xF994],
+  ["E6DA",0x784F],
+  ["E6DB",0x786F],
+  ["E6DC",0xF995],
+  ["E6DD",0x7B75],
+  ["E6DE",0x7DE3],
+  ["E6DF",0xF996],
+  ["E6E0",0x7E2F],
+  ["E6E1",0xF997],
+  ["E6E2",0x884D],
+  ["E6E3",0x8EDF],
+  ["E6E4",0xF998],
+  ["E6E5",0xF999],
+  ["E6E6",0xF99A],
+  ["E6E7",0x925B],
+  ["E6E8",0xF99B],
+  ["E6E9",0x9CF6],
+  ["E6EA",0xF99C],
+  ["E6EB",0xF99D],
+  ["E6EC",0xF99E],
+  ["E6ED",0x6085],
+  ["E6EE",0x6D85],
+  ["E6EF",0xF99F],
+  ["E6F0",0x71B1],
+  ["E6F1",0xF9A0],
+  ["E6F2",0xF9A1],
+  ["E6F3",0x95B1],
+  ["E6F4",0x53AD],
+  ["E6F5",0xF9A2],
+  ["E6F6",0xF9A3],
+  ["E6F7",0xF9A4],
+  ["E6F8",0x67D3],
+  ["E6F9",0xF9A5],
+  ["E6FA",0x708E],
+  ["E6FB",0x7130],
+  ["E6FC",0x7430],
+  ["E6FD",0x8276],
+  ["E6FE",0x82D2],
+  ["E7A1",0xF9A6],
+  ["E7A2",0x95BB],
+  ["E7A3",0x9AE5],
+  ["E7A4",0x9E7D],
+  ["E7A5",0x66C4],
+  ["E7A6",0xF9A7],
+  ["E7A7",0x71C1],
+  ["E7A8",0x8449],
+  ["E7A9",0xF9A8],
+  ["E7AA",0xF9A9],
+  ["E7AB",0x584B],
+  ["E7AC",0xF9AA],
+  ["E7AD",0xF9AB],
+  ["E7AE",0x5DB8],
+  ["E7AF",0x5F71],
+  ["E7B0",0xF9AC],
+  ["E7B1",0x6620],
+  ["E7B2",0x668E],
+  ["E7B3",0x6979],
+  ["E7B4",0x69AE],
+  ["E7B5",0x6C38],
+  ["E7B6",0x6CF3],
+  ["E7B7",0x6E36],
+  ["E7B8",0x6F41],
+  ["E7B9",0x6FDA],
+  ["E7BA",0x701B],
+  ["E7BB",0x702F],
+  ["E7BC",0x7150],
+  ["E7BD",0x71DF],
+  ["E7BE",0x7370],
+  ["E7BF",0xF9AD],
+  ["E7C0",0x745B],
+  ["E7C1",0xF9AE],
+  ["E7C2",0x74D4],
+  ["E7C3",0x76C8],
+  ["E7C4",0x7A4E],
+  ["E7C5",0x7E93],
+  ["E7C6",0xF9AF],
+  ["E7C7",0xF9B0],
+  ["E7C8",0x82F1],
+  ["E7C9",0x8A60],
+  ["E7CA",0x8FCE],
+  ["E7CB",0xF9B1],
+  ["E7CC",0x9348],
+  ["E7CD",0xF9B2],
+  ["E7CE",0x9719],
+  ["E7CF",0xF9B3],
+  ["E7D0",0xF9B4],
+  ["E7D1",0x4E42],
+  ["E7D2",0x502A],
+  ["E7D3",0xF9B5],
+  ["E7D4",0x5208],
+  ["E7D5",0x53E1],
+  ["E7D6",0x66F3],
+  ["E7D7",0x6C6D],
+  ["E7D8",0x6FCA],
+  ["E7D9",0x730A],
+  ["E7DA",0x777F],
+  ["E7DB",0x7A62],
+  ["E7DC",0x82AE],
+  ["E7DD",0x85DD],
+  ["E7DE",0x8602],
+  ["E7DF",0xF9B6],
+  ["E7E0",0x88D4],
+  ["E7E1",0x8A63],
+  ["E7E2",0x8B7D],
+  ["E7E3",0x8C6B],
+  ["E7E4",0xF9B7],
+  ["E7E5",0x92B3],
+  ["E7E6",0xF9B8],
+  ["E7E7",0x9713],
+  ["E7E8",0x9810],
+  ["E7E9",0x4E94],
+  ["E7EA",0x4F0D],
+  ["E7EB",0x4FC9],
+  ["E7EC",0x50B2],
+  ["E7ED",0x5348],
+  ["E7EE",0x543E],
+  ["E7EF",0x5433],
+  ["E7F0",0x55DA],
+  ["E7F1",0x5862],
+  ["E7F2",0x58BA],
+  ["E7F3",0x5967],
+  ["E7F4",0x5A1B],
+  ["E7F5",0x5BE4],
+  ["E7F6",0x609F],
+  ["E7F7",0xF9B9],
+  ["E7F8",0x61CA],
+  ["E7F9",0x6556],
+  ["E7FA",0x65FF],
+  ["E7FB",0x6664],
+  ["E7FC",0x68A7],
+  ["E7FD",0x6C5A],
+  ["E7FE",0x6FB3],
+  ["E8A1",0x70CF],
+  ["E8A2",0x71AC],
+  ["E8A3",0x7352],
+  ["E8A4",0x7B7D],
+  ["E8A5",0x8708],
+  ["E8A6",0x8AA4],
+  ["E8A7",0x9C32],
+  ["E8A8",0x9F07],
+  ["E8A9",0x5C4B],
+  ["E8AA",0x6C83],
+  ["E8AB",0x7344],
+  ["E8AC",0x7389],
+  ["E8AD",0x923A],
+  ["E8AE",0x6EAB],
+  ["E8AF",0x7465],
+  ["E8B0",0x761F],
+  ["E8B1",0x7A69],
+  ["E8B2",0x7E15],
+  ["E8B3",0x860A],
+  ["E8B4",0x5140],
+  ["E8B5",0x58C5],
+  ["E8B6",0x64C1],
+  ["E8B7",0x74EE],
+  ["E8B8",0x7515],
+  ["E8B9",0x7670],
+  ["E8BA",0x7FC1],
+  ["E8BB",0x9095],
+  ["E8BC",0x96CD],
+  ["E8BD",0x9954],
+  ["E8BE",0x6E26],
+  ["E8BF",0x74E6],
+  ["E8C0",0x7AA9],
+  ["E8C1",0x7AAA],
+  ["E8C2",0x81E5],
+  ["E8C3",0x86D9],
+  ["E8C4",0x8778],
+  ["E8C5",0x8A1B],
+  ["E8C6",0x5A49],
+  ["E8C7",0x5B8C],
+  ["E8C8",0x5B9B],
+  ["E8C9",0x68A1],
+  ["E8CA",0x6900],
+  ["E8CB",0x6D63],
+  ["E8CC",0x73A9],
+  ["E8CD",0x7413],
+  ["E8CE",0x742C],
+  ["E8CF",0x7897],
+  ["E8D0",0x7DE9],
+  ["E8D1",0x7FEB],
+  ["E8D2",0x8118],
+  ["E8D3",0x8155],
+  ["E8D4",0x839E],
+  ["E8D5",0x8C4C],
+  ["E8D6",0x962E],
+  ["E8D7",0x9811],
+  ["E8D8",0x66F0],
+  ["E8D9",0x5F80],
+  ["E8DA",0x65FA],
+  ["E8DB",0x6789],
+  ["E8DC",0x6C6A],
+  ["E8DD",0x738B],
+  ["E8DE",0x502D],
+  ["E8DF",0x5A03],
+  ["E8E0",0x6B6A],
+  ["E8E1",0x77EE],
+  ["E8E2",0x5916],
+  ["E8E3",0x5D6C],
+  ["E8E4",0x5DCD],
+  ["E8E5",0x7325],
+  ["E8E6",0x754F],
+  ["E8E7",0xF9BA],
+  ["E8E8",0xF9BB],
+  ["E8E9",0x50E5],
+  ["E8EA",0x51F9],
+  ["E8EB",0x582F],
+  ["E8EC",0x592D],
+  ["E8ED",0x5996],
+  ["E8EE",0x59DA],
+  ["E8EF",0x5BE5],
+  ["E8F0",0xF9BC],
+  ["E8F1",0xF9BD],
+  ["E8F2",0x5DA2],
+  ["E8F3",0x62D7],
+  ["E8F4",0x6416],
+  ["E8F5",0x6493],
+  ["E8F6",0x64FE],
+  ["E8F7",0xF9BE],
+  ["E8F8",0x66DC],
+  ["E8F9",0xF9BF],
+  ["E8FA",0x6A48],
+  ["E8FB",0xF9C0],
+  ["E8FC",0x71FF],
+  ["E8FD",0x7464],
+  ["E8FE",0xF9C1],
+  ["E9A1",0x7A88],
+  ["E9A2",0x7AAF],
+  ["E9A3",0x7E47],
+  ["E9A4",0x7E5E],
+  ["E9A5",0x8000],
+  ["E9A6",0x8170],
+  ["E9A7",0xF9C2],
+  ["E9A8",0x87EF],
+  ["E9A9",0x8981],
+  ["E9AA",0x8B20],
+  ["E9AB",0x9059],
+  ["E9AC",0xF9C3],
+  ["E9AD",0x9080],
+  ["E9AE",0x9952],
+  ["E9AF",0x617E],
+  ["E9B0",0x6B32],
+  ["E9B1",0x6D74],
+  ["E9B2",0x7E1F],
+  ["E9B3",0x8925],
+  ["E9B4",0x8FB1],
+  ["E9B5",0x4FD1],
+  ["E9B6",0x50AD],
+  ["E9B7",0x5197],
+  ["E9B8",0x52C7],
+  ["E9B9",0x57C7],
+  ["E9BA",0x5889],
+  ["E9BB",0x5BB9],
+  ["E9BC",0x5EB8],
+  ["E9BD",0x6142],
+  ["E9BE",0x6995],
+  ["E9BF",0x6D8C],
+  ["E9C0",0x6E67],
+  ["E9C1",0x6EB6],
+  ["E9C2",0x7194],
+  ["E9C3",0x7462],
+  ["E9C4",0x7528],
+  ["E9C5",0x752C],
+  ["E9C6",0x8073],
+  ["E9C7",0x8338],
+  ["E9C8",0x84C9],
+  ["E9C9",0x8E0A],
+  ["E9CA",0x9394],
+  ["E9CB",0x93DE],
+  ["E9CC",0xF9C4],
+  ["E9CD",0x4E8E],
+  ["E9CE",0x4F51],
+  ["E9CF",0x5076],
+  ["E9D0",0x512A],
+  ["E9D1",0x53C8],
+  ["E9D2",0x53CB],
+  ["E9D3",0x53F3],
+  ["E9D4",0x5B87],
+  ["E9D5",0x5BD3],
+  ["E9D6",0x5C24],
+  ["E9D7",0x611A],
+  ["E9D8",0x6182],
+  ["E9D9",0x65F4],
+  ["E9DA",0x725B],
+  ["E9DB",0x7397],
+  ["E9DC",0x7440],
+  ["E9DD",0x76C2],
+  ["E9DE",0x7950],
+  ["E9DF",0x7991],
+  ["E9E0",0x79B9],
+  ["E9E1",0x7D06],
+  ["E9E2",0x7FBD],
+  ["E9E3",0x828B],
+  ["E9E4",0x85D5],
+  ["E9E5",0x865E],
+  ["E9E6",0x8FC2],
+  ["E9E7",0x9047],
+  ["E9E8",0x90F5],
+  ["E9E9",0x91EA],
+  ["E9EA",0x9685],
+  ["E9EB",0x96E8],
+  ["E9EC",0x96E9],
+  ["E9ED",0x52D6],
+  ["E9EE",0x5F67],
+  ["E9EF",0x65ED],
+  ["E9F0",0x6631],
+  ["E9F1",0x682F],
+  ["E9F2",0x715C],
+  ["E9F3",0x7A36],
+  ["E9F4",0x90C1],
+  ["E9F5",0x980A],
+  ["E9F6",0x4E91],
+  ["E9F7",0xF9C5],
+  ["E9F8",0x6A52],
+  ["E9F9",0x6B9E],
+  ["E9FA",0x6F90],
+  ["E9FB",0x7189],
+  ["E9FC",0x8018],
+  ["E9FD",0x82B8],
+  ["E9FE",0x8553],
+  ["EAA1",0x904B],
+  ["EAA2",0x9695],
+  ["EAA3",0x96F2],
+  ["EAA4",0x97FB],
+  ["EAA5",0x851A],
+  ["EAA6",0x9B31],
+  ["EAA7",0x4E90],
+  ["EAA8",0x718A],
+  ["EAA9",0x96C4],
+  ["EAAA",0x5143],
+  ["EAAB",0x539F],
+  ["EAAC",0x54E1],
+  ["EAAD",0x5713],
+  ["EAAE",0x5712],
+  ["EAAF",0x57A3],
+  ["EAB0",0x5A9B],
+  ["EAB1",0x5AC4],
+  ["EAB2",0x5BC3],
+  ["EAB3",0x6028],
+  ["EAB4",0x613F],
+  ["EAB5",0x63F4],
+  ["EAB6",0x6C85],
+  ["EAB7",0x6D39],
+  ["EAB8",0x6E72],
+  ["EAB9",0x6E90],
+  ["EABA",0x7230],
+  ["EABB",0x733F],
+  ["EABC",0x7457],
+  ["EABD",0x82D1],
+  ["EABE",0x8881],
+  ["EABF",0x8F45],
+  ["EAC0",0x9060],
+  ["EAC1",0xF9C6],
+  ["EAC2",0x9662],
+  ["EAC3",0x9858],
+  ["EAC4",0x9D1B],
+  ["EAC5",0x6708],
+  ["EAC6",0x8D8A],
+  ["EAC7",0x925E],
+  ["EAC8",0x4F4D],
+  ["EAC9",0x5049],
+  ["EACA",0x50DE],
+  ["EACB",0x5371],
+  ["EACC",0x570D],
+  ["EACD",0x59D4],
+  ["EACE",0x5A01],
+  ["EACF",0x5C09],
+  ["EAD0",0x6170],
+  ["EAD1",0x6690],
+  ["EAD2",0x6E2D],
+  ["EAD3",0x7232],
+  ["EAD4",0x744B],
+  ["EAD5",0x7DEF],
+  ["EAD6",0x80C3],
+  ["EAD7",0x840E],
+  ["EAD8",0x8466],
+  ["EAD9",0x853F],
+  ["EADA",0x875F],
+  ["EADB",0x885B],
+  ["EADC",0x8918],
+  ["EADD",0x8B02],
+  ["EADE",0x9055],
+  ["EADF",0x97CB],
+  ["EAE0",0x9B4F],
+  ["EAE1",0x4E73],
+  ["EAE2",0x4F91],
+  ["EAE3",0x5112],
+  ["EAE4",0x516A],
+  ["EAE5",0xF9C7],
+  ["EAE6",0x552F],
+  ["EAE7",0x55A9],
+  ["EAE8",0x5B7A],
+  ["EAE9",0x5BA5],
+  ["EAEA",0x5E7C],
+  ["EAEB",0x5E7D],
+  ["EAEC",0x5EBE],
+  ["EAED",0x60A0],
+  ["EAEE",0x60DF],
+  ["EAEF",0x6108],
+  ["EAF0",0x6109],
+  ["EAF1",0x63C4],
+  ["EAF2",0x6538],
+  ["EAF3",0x6709],
+  ["EAF4",0xF9C8],
+  ["EAF5",0x67D4],
+  ["EAF6",0x67DA],
+  ["EAF7",0xF9C9],
+  ["EAF8",0x6961],
+  ["EAF9",0x6962],
+  ["EAFA",0x6CB9],
+  ["EAFB",0x6D27],
+  ["EAFC",0xF9CA],
+  ["EAFD",0x6E38],
+  ["EAFE",0xF9CB],
+  ["EBA1",0x6FE1],
+  ["EBA2",0x7336],
+  ["EBA3",0x7337],
+  ["EBA4",0xF9CC],
+  ["EBA5",0x745C],
+  ["EBA6",0x7531],
+  ["EBA7",0xF9CD],
+  ["EBA8",0x7652],
+  ["EBA9",0xF9CE],
+  ["EBAA",0xF9CF],
+  ["EBAB",0x7DAD],
+  ["EBAC",0x81FE],
+  ["EBAD",0x8438],
+  ["EBAE",0x88D5],
+  ["EBAF",0x8A98],
+  ["EBB0",0x8ADB],
+  ["EBB1",0x8AED],
+  ["EBB2",0x8E30],
+  ["EBB3",0x8E42],
+  ["EBB4",0x904A],
+  ["EBB5",0x903E],
+  ["EBB6",0x907A],
+  ["EBB7",0x9149],
+  ["EBB8",0x91C9],
+  ["EBB9",0x936E],
+  ["EBBA",0xF9D0],
+  ["EBBB",0xF9D1],
+  ["EBBC",0x5809],
+  ["EBBD",0xF9D2],
+  ["EBBE",0x6BD3],
+  ["EBBF",0x8089],
+  ["EBC0",0x80B2],
+  ["EBC1",0xF9D3],
+  ["EBC2",0xF9D4],
+  ["EBC3",0x5141],
+  ["EBC4",0x596B],
+  ["EBC5",0x5C39],
+  ["EBC6",0xF9D5],
+  ["EBC7",0xF9D6],
+  ["EBC8",0x6F64],
+  ["EBC9",0x73A7],
+  ["EBCA",0x80E4],
+  ["EBCB",0x8D07],
+  ["EBCC",0xF9D7],
+  ["EBCD",0x9217],
+  ["EBCE",0x958F],
+  ["EBCF",0xF9D8],
+  ["EBD0",0xF9D9],
+  ["EBD1",0xF9DA],
+  ["EBD2",0xF9DB],
+  ["EBD3",0x807F],
+  ["EBD4",0x620E],
+  ["EBD5",0x701C],
+  ["EBD6",0x7D68],
+  ["EBD7",0x878D],
+  ["EBD8",0xF9DC],
+  ["EBD9",0x57A0],
+  ["EBDA",0x6069],
+  ["EBDB",0x6147],
+  ["EBDC",0x6BB7],
+  ["EBDD",0x8ABE],
+  ["EBDE",0x9280],
+  ["EBDF",0x96B1],
+  ["EBE0",0x4E59],
+  ["EBE1",0x541F],
+  ["EBE2",0x6DEB],
+  ["EBE3",0x852D],
+  ["EBE4",0x9670],
+  ["EBE5",0x97F3],
+  ["EBE6",0x98EE],
+  ["EBE7",0x63D6],
+  ["EBE8",0x6CE3],
+  ["EBE9",0x9091],
+  ["EBEA",0x51DD],
+  ["EBEB",0x61C9],
+  ["EBEC",0x81BA],
+  ["EBED",0x9DF9],
+  ["EBEE",0x4F9D],
+  ["EBEF",0x501A],
+  ["EBF0",0x5100],
+  ["EBF1",0x5B9C],
+  ["EBF2",0x610F],
+  ["EBF3",0x61FF],
+  ["EBF4",0x64EC],
+  ["EBF5",0x6905],
+  ["EBF6",0x6BC5],
+  ["EBF7",0x7591],
+  ["EBF8",0x77E3],
+  ["EBF9",0x7FA9],
+  ["EBFA",0x8264],
+  ["EBFB",0x858F],
+  ["EBFC",0x87FB],
+  ["EBFD",0x8863],
+  ["EBFE",0x8ABC],
+  ["ECA1",0x8B70],
+  ["ECA2",0x91AB],
+  ["ECA3",0x4E8C],
+  ["ECA4",0x4EE5],
+  ["ECA5",0x4F0A],
+  ["ECA6",0xF9DD],
+  ["ECA7",0xF9DE],
+  ["ECA8",0x5937],
+  ["ECA9",0x59E8],
+  ["ECAA",0xF9DF],
+  ["ECAB",0x5DF2],
+  ["ECAC",0x5F1B],
+  ["ECAD",0x5F5B],
+  ["ECAE",0x6021],
+  ["ECAF",0xF9E0],
+  ["ECB0",0xF9E1],
+  ["ECB1",0xF9E2],
+  ["ECB2",0xF9E3],
+  ["ECB3",0x723E],
+  ["ECB4",0x73E5],
+  ["ECB5",0xF9E4],
+  ["ECB6",0x7570],
+  ["ECB7",0x75CD],
+  ["ECB8",0xF9E5],
+  ["ECB9",0x79FB],
+  ["ECBA",0xF9E6],
+  ["ECBB",0x800C],
+  ["ECBC",0x8033],
+  ["ECBD",0x8084],
+  ["ECBE",0x82E1],
+  ["ECBF",0x8351],
+  ["ECC0",0xF9E7],
+  ["ECC1",0xF9E8],
+  ["ECC2",0x8CBD],
+  ["ECC3",0x8CB3],
+  ["ECC4",0x9087],
+  ["ECC5",0xF9E9],
+  ["ECC6",0xF9EA],
+  ["ECC7",0x98F4],
+  ["ECC8",0x990C],
+  ["ECC9",0xF9EB],
+  ["ECCA",0xF9EC],
+  ["ECCB",0x7037],
+  ["ECCC",0x76CA],
+  ["ECCD",0x7FCA],
+  ["ECCE",0x7FCC],
+  ["ECCF",0x7FFC],
+  ["ECD0",0x8B1A],
+  ["ECD1",0x4EBA],
+  ["ECD2",0x4EC1],
+  ["ECD3",0x5203],
+  ["ECD4",0x5370],
+  ["ECD5",0xF9ED],
+  ["ECD6",0x54BD],
+  ["ECD7",0x56E0],
+  ["ECD8",0x59FB],
+  ["ECD9",0x5BC5],
+  ["ECDA",0x5F15],
+  ["ECDB",0x5FCD],
+  ["ECDC",0x6E6E],
+  ["ECDD",0xF9EE],
+  ["ECDE",0xF9EF],
+  ["ECDF",0x7D6A],
+  ["ECE0",0x8335],
+  ["ECE1",0xF9F0],
+  ["ECE2",0x8693],
+  ["ECE3",0x8A8D],
+  ["ECE4",0xF9F1],
+  ["ECE5",0x976D],
+  ["ECE6",0x9777],
+  ["ECE7",0xF9F2],
+  ["ECE8",0xF9F3],
+  ["ECE9",0x4E00],
+  ["ECEA",0x4F5A],
+  ["ECEB",0x4F7E],
+  ["ECEC",0x58F9],
+  ["ECED",0x65E5],
+  ["ECEE",0x6EA2],
+  ["ECEF",0x9038],
+  ["ECF0",0x93B0],
+  ["ECF1",0x99B9],
+  ["ECF2",0x4EFB],
+  ["ECF3",0x58EC],
+  ["ECF4",0x598A],
+  ["ECF5",0x59D9],
+  ["ECF6",0x6041],
+  ["ECF7",0xF9F4],
+  ["ECF8",0xF9F5],
+  ["ECF9",0x7A14],
+  ["ECFA",0xF9F6],
+  ["ECFB",0x834F],
+  ["ECFC",0x8CC3],
+  ["ECFD",0x5165],
+  ["ECFE",0x5344],
+  ["EDA1",0xF9F7],
+  ["EDA2",0xF9F8],
+  ["EDA3",0xF9F9],
+  ["EDA4",0x4ECD],
+  ["EDA5",0x5269],
+  ["EDA6",0x5B55],
+  ["EDA7",0x82BF],
+  ["EDA8",0x4ED4],
+  ["EDA9",0x523A],
+  ["EDAA",0x54A8],
+  ["EDAB",0x59C9],
+  ["EDAC",0x59FF],
+  ["EDAD",0x5B50],
+  ["EDAE",0x5B57],
+  ["EDAF",0x5B5C],
+  ["EDB0",0x6063],
+  ["EDB1",0x6148],
+  ["EDB2",0x6ECB],
+  ["EDB3",0x7099],
+  ["EDB4",0x716E],
+  ["EDB5",0x7386],
+  ["EDB6",0x74F7],
+  ["EDB7",0x75B5],
+  ["EDB8",0x78C1],
+  ["EDB9",0x7D2B],
+  ["EDBA",0x8005],
+  ["EDBB",0x81EA],
+  ["EDBC",0x8328],
+  ["EDBD",0x8517],
+  ["EDBE",0x85C9],
+  ["EDBF",0x8AEE],
+  ["EDC0",0x8CC7],
+  ["EDC1",0x96CC],
+  ["EDC2",0x4F5C],
+  ["EDC3",0x52FA],
+  ["EDC4",0x56BC],
+  ["EDC5",0x65AB],
+  ["EDC6",0x6628],
+  ["EDC7",0x707C],
+  ["EDC8",0x70B8],
+  ["EDC9",0x7235],
+  ["EDCA",0x7DBD],
+  ["EDCB",0x828D],
+  ["EDCC",0x914C],
+  ["EDCD",0x96C0],
+  ["EDCE",0x9D72],
+  ["EDCF",0x5B71],
+  ["EDD0",0x68E7],
+  ["EDD1",0x6B98],
+  ["EDD2",0x6F7A],
+  ["EDD3",0x76DE],
+  ["EDD4",0x5C91],
+  ["EDD5",0x66AB],
+  ["EDD6",0x6F5B],
+  ["EDD7",0x7BB4],
+  ["EDD8",0x7C2A],
+  ["EDD9",0x8836],
+  ["EDDA",0x96DC],
+  ["EDDB",0x4E08],
+  ["EDDC",0x4ED7],
+  ["EDDD",0x5320],
+  ["EDDE",0x5834],
+  ["EDDF",0x58BB],
+  ["EDE0",0x58EF],
+  ["EDE1",0x596C],
+  ["EDE2",0x5C07],
+  ["EDE3",0x5E33],
+  ["EDE4",0x5E84],
+  ["EDE5",0x5F35],
+  ["EDE6",0x638C],
+  ["EDE7",0x66B2],
+  ["EDE8",0x6756],
+  ["EDE9",0x6A1F],
+  ["EDEA",0x6AA3],
+  ["EDEB",0x6B0C],
+  ["EDEC",0x6F3F],
+  ["EDED",0x7246],
+  ["EDEE",0xF9FA],
+  ["EDEF",0x7350],
+  ["EDF0",0x748B],
+  ["EDF1",0x7AE0],
+  ["EDF2",0x7CA7],
+  ["EDF3",0x8178],
+  ["EDF4",0x81DF],
+  ["EDF5",0x81E7],
+  ["EDF6",0x838A],
+  ["EDF7",0x846C],
+  ["EDF8",0x8523],
+  ["EDF9",0x8594],
+  ["EDFA",0x85CF],
+  ["EDFB",0x88DD],
+  ["EDFC",0x8D13],
+  ["EDFD",0x91AC],
+  ["EDFE",0x9577],
+  ["EEA1",0x969C],
+  ["EEA2",0x518D],
+  ["EEA3",0x54C9],
+  ["EEA4",0x5728],
+  ["EEA5",0x5BB0],
+  ["EEA6",0x624D],
+  ["EEA7",0x6750],
+  ["EEA8",0x683D],
+  ["EEA9",0x6893],
+  ["EEAA",0x6E3D],
+  ["EEAB",0x6ED3],
+  ["EEAC",0x707D],
+  ["EEAD",0x7E21],
+  ["EEAE",0x88C1],
+  ["EEAF",0x8CA1],
+  ["EEB0",0x8F09],
+  ["EEB1",0x9F4B],
+  ["EEB2",0x9F4E],
+  ["EEB3",0x722D],
+  ["EEB4",0x7B8F],
+  ["EEB5",0x8ACD],
+  ["EEB6",0x931A],
+  ["EEB7",0x4F47],
+  ["EEB8",0x4F4E],
+  ["EEB9",0x5132],
+  ["EEBA",0x5480],
+  ["EEBB",0x59D0],
+  ["EEBC",0x5E95],
+  ["EEBD",0x62B5],
+  ["EEBE",0x6775],
+  ["EEBF",0x696E],
+  ["EEC0",0x6A17],
+  ["EEC1",0x6CAE],
+  ["EEC2",0x6E1A],
+  ["EEC3",0x72D9],
+  ["EEC4",0x732A],
+  ["EEC5",0x75BD],
+  ["EEC6",0x7BB8],
+  ["EEC7",0x7D35],
+  ["EEC8",0x82E7],
+  ["EEC9",0x83F9],
+  ["EECA",0x8457],
+  ["EECB",0x85F7],
+  ["EECC",0x8A5B],
+  ["EECD",0x8CAF],
+  ["EECE",0x8E87],
+  ["EECF",0x9019],
+  ["EED0",0x90B8],
+  ["EED1",0x96CE],
+  ["EED2",0x9F5F],
+  ["EED3",0x52E3],
+  ["EED4",0x540A],
+  ["EED5",0x5AE1],
+  ["EED6",0x5BC2],
+  ["EED7",0x6458],
+  ["EED8",0x6575],
+  ["EED9",0x6EF4],
+  ["EEDA",0x72C4],
+  ["EEDB",0xF9FB],
+  ["EEDC",0x7684],
+  ["EEDD",0x7A4D],
+  ["EEDE",0x7B1B],
+  ["EEDF",0x7C4D],
+  ["EEE0",0x7E3E],
+  ["EEE1",0x7FDF],
+  ["EEE2",0x837B],
+  ["EEE3",0x8B2B],
+  ["EEE4",0x8CCA],
+  ["EEE5",0x8D64],
+  ["EEE6",0x8DE1],
+  ["EEE7",0x8E5F],
+  ["EEE8",0x8FEA],
+  ["EEE9",0x8FF9],
+  ["EEEA",0x9069],
+  ["EEEB",0x93D1],
+  ["EEEC",0x4F43],
+  ["EEED",0x4F7A],
+  ["EEEE",0x50B3],
+  ["EEEF",0x5168],
+  ["EEF0",0x5178],
+  ["EEF1",0x524D],
+  ["EEF2",0x526A],
+  ["EEF3",0x5861],
+  ["EEF4",0x587C],
+  ["EEF5",0x5960],
+  ["EEF6",0x5C08],
+  ["EEF7",0x5C55],
+  ["EEF8",0x5EDB],
+  ["EEF9",0x609B],
+  ["EEFA",0x6230],
+  ["EEFB",0x6813],
+  ["EEFC",0x6BBF],
+  ["EEFD",0x6C08],
+  ["EEFE",0x6FB1],
+  ["EFA1",0x714E],
+  ["EFA2",0x7420],
+  ["EFA3",0x7530],
+  ["EFA4",0x7538],
+  ["EFA5",0x7551],
+  ["EFA6",0x7672],
+  ["EFA7",0x7B4C],
+  ["EFA8",0x7B8B],
+  ["EFA9",0x7BAD],
+  ["EFAA",0x7BC6],
+  ["EFAB",0x7E8F],
+  ["EFAC",0x8A6E],
+  ["EFAD",0x8F3E],
+  ["EFAE",0x8F49],
+  ["EFAF",0x923F],
+  ["EFB0",0x9293],
+  ["EFB1",0x9322],
+  ["EFB2",0x942B],
+  ["EFB3",0x96FB],
+  ["EFB4",0x985A],
+  ["EFB5",0x986B],
+  ["EFB6",0x991E],
+  ["EFB7",0x5207],
+  ["EFB8",0x622A],
+  ["EFB9",0x6298],
+  ["EFBA",0x6D59],
+  ["EFBB",0x7664],
+  ["EFBC",0x7ACA],
+  ["EFBD",0x7BC0],
+  ["EFBE",0x7D76],
+  ["EFBF",0x5360],
+  ["EFC0",0x5CBE],
+  ["EFC1",0x5E97],
+  ["EFC2",0x6F38],
+  ["EFC3",0x70B9],
+  ["EFC4",0x7C98],
+  ["EFC5",0x9711],
+  ["EFC6",0x9B8E],
+  ["EFC7",0x9EDE],
+  ["EFC8",0x63A5],
+  ["EFC9",0x647A],
+  ["EFCA",0x8776],
+  ["EFCB",0x4E01],
+  ["EFCC",0x4E95],
+  ["EFCD",0x4EAD],
+  ["EFCE",0x505C],
+  ["EFCF",0x5075],
+  ["EFD0",0x5448],
+  ["EFD1",0x59C3],
+  ["EFD2",0x5B9A],
+  ["EFD3",0x5E40],
+  ["EFD4",0x5EAD],
+  ["EFD5",0x5EF7],
+  ["EFD6",0x5F81],
+  ["EFD7",0x60C5],
+  ["EFD8",0x633A],
+  ["EFD9",0x653F],
+  ["EFDA",0x6574],
+  ["EFDB",0x65CC],
+  ["EFDC",0x6676],
+  ["EFDD",0x6678],
+  ["EFDE",0x67FE],
+  ["EFDF",0x6968],
+  ["EFE0",0x6A89],
+  ["EFE1",0x6B63],
+  ["EFE2",0x6C40],
+  ["EFE3",0x6DC0],
+  ["EFE4",0x6DE8],
+  ["EFE5",0x6E1F],
+  ["EFE6",0x6E5E],
+  ["EFE7",0x701E],
+  ["EFE8",0x70A1],
+  ["EFE9",0x738E],
+  ["EFEA",0x73FD],
+  ["EFEB",0x753A],
+  ["EFEC",0x775B],
+  ["EFED",0x7887],
+  ["EFEE",0x798E],
+  ["EFEF",0x7A0B],
+  ["EFF0",0x7A7D],
+  ["EFF1",0x7CBE],
+  ["EFF2",0x7D8E],
+  ["EFF3",0x8247],
+  ["EFF4",0x8A02],
+  ["EFF5",0x8AEA],
+  ["EFF6",0x8C9E],
+  ["EFF7",0x912D],
+  ["EFF8",0x914A],
+  ["EFF9",0x91D8],
+  ["EFFA",0x9266],
+  ["EFFB",0x92CC],
+  ["EFFC",0x9320],
+  ["EFFD",0x9706],
+  ["EFFE",0x9756],
+  ["F0A1",0x975C],
+  ["F0A2",0x9802],
+  ["F0A3",0x9F0E],
+  ["F0A4",0x5236],
+  ["F0A5",0x5291],
+  ["F0A6",0x557C],
+  ["F0A7",0x5824],
+  ["F0A8",0x5E1D],
+  ["F0A9",0x5F1F],
+  ["F0AA",0x608C],
+  ["F0AB",0x63D0],
+  ["F0AC",0x68AF],
+  ["F0AD",0x6FDF],
+  ["F0AE",0x796D],
+  ["F0AF",0x7B2C],
+  ["F0B0",0x81CD],
+  ["F0B1",0x85BA],
+  ["F0B2",0x88FD],
+  ["F0B3",0x8AF8],
+  ["F0B4",0x8E44],
+  ["F0B5",0x918D],
+  ["F0B6",0x9664],
+  ["F0B7",0x969B],
+  ["F0B8",0x973D],
+  ["F0B9",0x984C],
+  ["F0BA",0x9F4A],
+  ["F0BB",0x4FCE],
+  ["F0BC",0x5146],
+  ["F0BD",0x51CB],
+  ["F0BE",0x52A9],
+  ["F0BF",0x5632],
+  ["F0C0",0x5F14],
+  ["F0C1",0x5F6B],
+  ["F0C2",0x63AA],
+  ["F0C3",0x64CD],
+  ["F0C4",0x65E9],
+  ["F0C5",0x6641],
+  ["F0C6",0x66FA],
+  ["F0C7",0x66F9],
+  ["F0C8",0x671D],
+  ["F0C9",0x689D],
+  ["F0CA",0x68D7],
+  ["F0CB",0x69FD],
+  ["F0CC",0x6F15],
+  ["F0CD",0x6F6E],
+  ["F0CE",0x7167],
+  ["F0CF",0x71E5],
+  ["F0D0",0x722A],
+  ["F0D1",0x74AA],
+  ["F0D2",0x773A],
+  ["F0D3",0x7956],
+  ["F0D4",0x795A],
+  ["F0D5",0x79DF],
+  ["F0D6",0x7A20],
+  ["F0D7",0x7A95],
+  ["F0D8",0x7C97],
+  ["F0D9",0x7CDF],
+  ["F0DA",0x7D44],
+  ["F0DB",0x7E70],
+  ["F0DC",0x8087],
+  ["F0DD",0x85FB],
+  ["F0DE",0x86A4],
+  ["F0DF",0x8A54],
+  ["F0E0",0x8ABF],
+  ["F0E1",0x8D99],
+  ["F0E2",0x8E81],
+  ["F0E3",0x9020],
+  ["F0E4",0x906D],
+  ["F0E5",0x91E3],
+  ["F0E6",0x963B],
+  ["F0E7",0x96D5],
+  ["F0E8",0x9CE5],
+  ["F0E9",0x65CF],
+  ["F0EA",0x7C07],
+  ["F0EB",0x8DB3],
+  ["F0EC",0x93C3],
+  ["F0ED",0x5B58],
+  ["F0EE",0x5C0A],
+  ["F0EF",0x5352],
+  ["F0F0",0x62D9],
+  ["F0F1",0x731D],
+  ["F0F2",0x5027],
+  ["F0F3",0x5B97],
+  ["F0F4",0x5F9E],
+  ["F0F5",0x60B0],
+  ["F0F6",0x616B],
+  ["F0F7",0x68D5],
+  ["F0F8",0x6DD9],
+  ["F0F9",0x742E],
+  ["F0FA",0x7A2E],
+  ["F0FB",0x7D42],
+  ["F0FC",0x7D9C],
+  ["F0FD",0x7E31],
+  ["F0FE",0x816B],
+  ["F1A1",0x8E2A],
+  ["F1A2",0x8E35],
+  ["F1A3",0x937E],
+  ["F1A4",0x9418],
+  ["F1A5",0x4F50],
+  ["F1A6",0x5750],
+  ["F1A7",0x5DE6],
+  ["F1A8",0x5EA7],
+  ["F1A9",0x632B],
+  ["F1AA",0x7F6A],
+  ["F1AB",0x4E3B],
+  ["F1AC",0x4F4F],
+  ["F1AD",0x4F8F],
+  ["F1AE",0x505A],
+  ["F1AF",0x59DD],
+  ["F1B0",0x80C4],
+  ["F1B1",0x546A],
+  ["F1B2",0x5468],
+  ["F1B3",0x55FE],
+  ["F1B4",0x594F],
+  ["F1B5",0x5B99],
+  ["F1B6",0x5DDE],
+  ["F1B7",0x5EDA],
+  ["F1B8",0x665D],
+  ["F1B9",0x6731],
+  ["F1BA",0x67F1],
+  ["F1BB",0x682A],
+  ["F1BC",0x6CE8],
+  ["F1BD",0x6D32],
+  ["F1BE",0x6E4A],
+  ["F1BF",0x6F8D],
+  ["F1C0",0x70B7],
+  ["F1C1",0x73E0],
+  ["F1C2",0x7587],
+  ["F1C3",0x7C4C],
+  ["F1C4",0x7D02],
+  ["F1C5",0x7D2C],
+  ["F1C6",0x7DA2],
+  ["F1C7",0x821F],
+  ["F1C8",0x86DB],
+  ["F1C9",0x8A3B],
+  ["F1CA",0x8A85],
+  ["F1CB",0x8D70],
+  ["F1CC",0x8E8A],
+  ["F1CD",0x8F33],
+  ["F1CE",0x9031],
+  ["F1CF",0x914E],
+  ["F1D0",0x9152],
+  ["F1D1",0x9444],
+  ["F1D2",0x99D0],
+  ["F1D3",0x7AF9],
+  ["F1D4",0x7CA5],
+  ["F1D5",0x4FCA],
+  ["F1D6",0x5101],
+  ["F1D7",0x51C6],
+  ["F1D8",0x57C8],
+  ["F1D9",0x5BEF],
+  ["F1DA",0x5CFB],
+  ["F1DB",0x6659],
+  ["F1DC",0x6A3D],
+  ["F1DD",0x6D5A],
+  ["F1DE",0x6E96],
+  ["F1DF",0x6FEC],
+  ["F1E0",0x710C],
+  ["F1E1",0x756F],
+  ["F1E2",0x7AE3],
+  ["F1E3",0x8822],
+  ["F1E4",0x9021],
+  ["F1E5",0x9075],
+  ["F1E6",0x96CB],
+  ["F1E7",0x99FF],
+  ["F1E8",0x8301],
+  ["F1E9",0x4E2D],
+  ["F1EA",0x4EF2],
+  ["F1EB",0x8846],
+  ["F1EC",0x91CD],
+  ["F1ED",0x537D],
+  ["F1EE",0x6ADB],
+  ["F1EF",0x696B],
+  ["F1F0",0x6C41],
+  ["F1F1",0x847A],
+  ["F1F2",0x589E],
+  ["F1F3",0x618E],
+  ["F1F4",0x66FE],
+  ["F1F5",0x62EF],
+  ["F1F6",0x70DD],
+  ["F1F7",0x7511],
+  ["F1F8",0x75C7],
+  ["F1F9",0x7E52],
+  ["F1FA",0x84B8],
+  ["F1FB",0x8B49],
+  ["F1FC",0x8D08],
+  ["F1FD",0x4E4B],
+  ["F1FE",0x53EA],
+  ["F2A1",0x54AB],
+  ["F2A2",0x5730],
+  ["F2A3",0x5740],
+  ["F2A4",0x5FD7],
+  ["F2A5",0x6301],
+  ["F2A6",0x6307],
+  ["F2A7",0x646F],
+  ["F2A8",0x652F],
+  ["F2A9",0x65E8],
+  ["F2AA",0x667A],
+  ["F2AB",0x679D],
+  ["F2AC",0x67B3],
+  ["F2AD",0x6B62],
+  ["F2AE",0x6C60],
+  ["F2AF",0x6C9A],
+  ["F2B0",0x6F2C],
+  ["F2B1",0x77E5],
+  ["F2B2",0x7825],
+  ["F2B3",0x7949],
+  ["F2B4",0x7957],
+  ["F2B5",0x7D19],
+  ["F2B6",0x80A2],
+  ["F2B7",0x8102],
+  ["F2B8",0x81F3],
+  ["F2B9",0x829D],
+  ["F2BA",0x82B7],
+  ["F2BB",0x8718],
+  ["F2BC",0x8A8C],
+  ["F2BD",0xF9FC],
+  ["F2BE",0x8D04],
+  ["F2BF",0x8DBE],
+  ["F2C0",0x9072],
+  ["F2C1",0x76F4],
+  ["F2C2",0x7A19],
+  ["F2C3",0x7A37],
+  ["F2C4",0x7E54],
+  ["F2C5",0x8077],
+  ["F2C6",0x5507],
+  ["F2C7",0x55D4],
+  ["F2C8",0x5875],
+  ["F2C9",0x632F],
+  ["F2CA",0x6422],
+  ["F2CB",0x6649],
+  ["F2CC",0x664B],
+  ["F2CD",0x686D],
+  ["F2CE",0x699B],
+  ["F2CF",0x6B84],
+  ["F2D0",0x6D25],
+  ["F2D1",0x6EB1],
+  ["F2D2",0x73CD],
+  ["F2D3",0x7468],
+  ["F2D4",0x74A1],
+  ["F2D5",0x755B],
+  ["F2D6",0x75B9],
+  ["F2D7",0x76E1],
+  ["F2D8",0x771E],
+  ["F2D9",0x778B],
+  ["F2DA",0x79E6],
+  ["F2DB",0x7E09],
+  ["F2DC",0x7E1D],
+  ["F2DD",0x81FB],
+  ["F2DE",0x852F],
+  ["F2DF",0x8897],
+  ["F2E0",0x8A3A],
+  ["F2E1",0x8CD1],
+  ["F2E2",0x8EEB],
+  ["F2E3",0x8FB0],
+  ["F2E4",0x9032],
+  ["F2E5",0x93AD],
+  ["F2E6",0x9663],
+  ["F2E7",0x9673],
+  ["F2E8",0x9707],
+  ["F2E9",0x4F84],
+  ["F2EA",0x53F1],
+  ["F2EB",0x59EA],
+  ["F2EC",0x5AC9],
+  ["F2ED",0x5E19],
+  ["F2EE",0x684E],
+  ["F2EF",0x74C6],
+  ["F2F0",0x75BE],
+  ["F2F1",0x79E9],
+  ["F2F2",0x7A92],
+  ["F2F3",0x81A3],
+  ["F2F4",0x86ED],
+  ["F2F5",0x8CEA],
+  ["F2F6",0x8DCC],
+  ["F2F7",0x8FED],
+  ["F2F8",0x659F],
+  ["F2F9",0x6715],
+  ["F2FA",0xF9FD],
+  ["F2FB",0x57F7],
+  ["F2FC",0x6F57],
+  ["F2FD",0x7DDD],
+  ["F2FE",0x8F2F],
+  ["F3A1",0x93F6],
+  ["F3A2",0x96C6],
+  ["F3A3",0x5FB5],
+  ["F3A4",0x61F2],
+  ["F3A5",0x6F84],
+  ["F3A6",0x4E14],
+  ["F3A7",0x4F98],
+  ["F3A8",0x501F],
+  ["F3A9",0x53C9],
+  ["F3AA",0x55DF],
+  ["F3AB",0x5D6F],
+  ["F3AC",0x5DEE],
+  ["F3AD",0x6B21],
+  ["F3AE",0x6B64],
+  ["F3AF",0x78CB],
+  ["F3B0",0x7B9A],
+  ["F3B1",0xF9FE],
+  ["F3B2",0x8E49],
+  ["F3B3",0x8ECA],
+  ["F3B4",0x906E],
+  ["F3B5",0x6349],
+  ["F3B6",0x643E],
+  ["F3B7",0x7740],
+  ["F3B8",0x7A84],
+  ["F3B9",0x932F],
+  ["F3BA",0x947F],
+  ["F3BB",0x9F6A],
+  ["F3BC",0x64B0],
+  ["F3BD",0x6FAF],
+  ["F3BE",0x71E6],
+  ["F3BF",0x74A8],
+  ["F3C0",0x74DA],
+  ["F3C1",0x7AC4],
+  ["F3C2",0x7C12],
+  ["F3C3",0x7E82],
+  ["F3C4",0x7CB2],
+  ["F3C5",0x7E98],
+  ["F3C6",0x8B9A],
+  ["F3C7",0x8D0A],
+  ["F3C8",0x947D],
+  ["F3C9",0x9910],
+  ["F3CA",0x994C],
+  ["F3CB",0x5239],
+  ["F3CC",0x5BDF],
+  ["F3CD",0x64E6],
+  ["F3CE",0x672D],
+  ["F3CF",0x7D2E],
+  ["F3D0",0x50ED],
+  ["F3D1",0x53C3],
+  ["F3D2",0x5879],
+  ["F3D3",0x6158],
+  ["F3D4",0x6159],
+  ["F3D5",0x61FA],
+  ["F3D6",0x65AC],
+  ["F3D7",0x7AD9],
+  ["F3D8",0x8B92],
+  ["F3D9",0x8B96],
+  ["F3DA",0x5009],
+  ["F3DB",0x5021],
+  ["F3DC",0x5275],
+  ["F3DD",0x5531],
+  ["F3DE",0x5A3C],
+  ["F3DF",0x5EE0],
+  ["F3E0",0x5F70],
+  ["F3E1",0x6134],
+  ["F3E2",0x655E],
+  ["F3E3",0x660C],
+  ["F3E4",0x6636],
+  ["F3E5",0x66A2],
+  ["F3E6",0x69CD],
+  ["F3E7",0x6EC4],
+  ["F3E8",0x6F32],
+  ["F3E9",0x7316],
+  ["F3EA",0x7621],
+  ["F3EB",0x7A93],
+  ["F3EC",0x8139],
+  ["F3ED",0x8259],
+  ["F3EE",0x83D6],
+  ["F3EF",0x84BC],
+  ["F3F0",0x50B5],
+  ["F3F1",0x57F0],
+  ["F3F2",0x5BC0],
+  ["F3F3",0x5BE8],
+  ["F3F4",0x5F69],
+  ["F3F5",0x63A1],
+  ["F3F6",0x7826],
+  ["F3F7",0x7DB5],
+  ["F3F8",0x83DC],
+  ["F3F9",0x8521],
+  ["F3FA",0x91C7],
+  ["F3FB",0x91F5],
+  ["F3FC",0x518A],
+  ["F3FD",0x67F5],
+  ["F3FE",0x7B56],
+  ["F4A1",0x8CAC],
+  ["F4A2",0x51C4],
+  ["F4A3",0x59BB],
+  ["F4A4",0x60BD],
+  ["F4A5",0x8655],
+  ["F4A6",0x501C],
+  ["F4A7",0xF9FF],
+  ["F4A8",0x5254],
+  ["F4A9",0x5C3A],
+  ["F4AA",0x617D],
+  ["F4AB",0x621A],
+  ["F4AC",0x62D3],
+  ["F4AD",0x64F2],
+  ["F4AE",0x65A5],
+  ["F4AF",0x6ECC],
+  ["F4B0",0x7620],
+  ["F4B1",0x810A],
+  ["F4B2",0x8E60],
+  ["F4B3",0x965F],
+  ["F4B4",0x96BB],
+  ["F4B5",0x4EDF],
+  ["F4B6",0x5343],
+  ["F4B7",0x5598],
+  ["F4B8",0x5929],
+  ["F4B9",0x5DDD],
+  ["F4BA",0x64C5],
+  ["F4BB",0x6CC9],
+  ["F4BC",0x6DFA],
+  ["F4BD",0x7394],
+  ["F4BE",0x7A7F],
+  ["F4BF",0x821B],
+  ["F4C0",0x85A6],
+  ["F4C1",0x8CE4],
+  ["F4C2",0x8E10],
+  ["F4C3",0x9077],
+  ["F4C4",0x91E7],
+  ["F4C5",0x95E1],
+  ["F4C6",0x9621],
+  ["F4C7",0x97C6],
+  ["F4C8",0x51F8],
+  ["F4C9",0x54F2],
+  ["F4CA",0x5586],
+  ["F4CB",0x5FB9],
+  ["F4CC",0x64A4],
+  ["F4CD",0x6F88],
+  ["F4CE",0x7DB4],
+  ["F4CF",0x8F1F],
+  ["F4D0",0x8F4D],
+  ["F4D1",0x9435],
+  ["F4D2",0x50C9],
+  ["F4D3",0x5C16],
+  ["F4D4",0x6CBE],
+  ["F4D5",0x6DFB],
+  ["F4D6",0x751B],
+  ["F4D7",0x77BB],
+  ["F4D8",0x7C3D],
+  ["F4D9",0x7C64],
+  ["F4DA",0x8A79],
+  ["F4DB",0x8AC2],
+  ["F4DC",0x581E],
+  ["F4DD",0x59BE],
+  ["F4DE",0x5E16],
+  ["F4DF",0x6377],
+  ["F4E0",0x7252],
+  ["F4E1",0x758A],
+  ["F4E2",0x776B],
+  ["F4E3",0x8ADC],
+  ["F4E4",0x8CBC],
+  ["F4E5",0x8F12],
+  ["F4E6",0x5EF3],
+  ["F4E7",0x6674],
+  ["F4E8",0x6DF8],
+  ["F4E9",0x807D],
+  ["F4EA",0x83C1],
+  ["F4EB",0x8ACB],
+  ["F4EC",0x9751],
+  ["F4ED",0x9BD6],
+  ["F4EE",0xFA00],
+  ["F4EF",0x5243],
+  ["F4F0",0x66FF],
+  ["F4F1",0x6D95],
+  ["F4F2",0x6EEF],
+  ["F4F3",0x7DE0],
+  ["F4F4",0x8AE6],
+  ["F4F5",0x902E],
+  ["F4F6",0x905E],
+  ["F4F7",0x9AD4],
+  ["F4F8",0x521D],
+  ["F4F9",0x527F],
+  ["F4FA",0x54E8],
+  ["F4FB",0x6194],
+  ["F4FC",0x6284],
+  ["F4FD",0x62DB],
+  ["F4FE",0x68A2],
+  ["F5A1",0x6912],
+  ["F5A2",0x695A],
+  ["F5A3",0x6A35],
+  ["F5A4",0x7092],
+  ["F5A5",0x7126],
+  ["F5A6",0x785D],
+  ["F5A7",0x7901],
+  ["F5A8",0x790E],
+  ["F5A9",0x79D2],
+  ["F5AA",0x7A0D],
+  ["F5AB",0x8096],
+  ["F5AC",0x8278],
+  ["F5AD",0x82D5],
+  ["F5AE",0x8349],
+  ["F5AF",0x8549],
+  ["F5B0",0x8C82],
+  ["F5B1",0x8D85],
+  ["F5B2",0x9162],
+  ["F5B3",0x918B],
+  ["F5B4",0x91AE],
+  ["F5B5",0x4FC3],
+  ["F5B6",0x56D1],
+  ["F5B7",0x71ED],
+  ["F5B8",0x77D7],
+  ["F5B9",0x8700],
+  ["F5BA",0x89F8],
+  ["F5BB",0x5BF8],
+  ["F5BC",0x5FD6],
+  ["F5BD",0x6751],
+  ["F5BE",0x90A8],
+  ["F5BF",0x53E2],
+  ["F5C0",0x585A],
+  ["F5C1",0x5BF5],
+  ["F5C2",0x60A4],
+  ["F5C3",0x6181],
+  ["F5C4",0x6460],
+  ["F5C5",0x7E3D],
+  ["F5C6",0x8070],
+  ["F5C7",0x8525],
+  ["F5C8",0x9283],
+  ["F5C9",0x64AE],
+  ["F5CA",0x50AC],
+  ["F5CB",0x5D14],
+  ["F5CC",0x6700],
+  ["F5CD",0x589C],
+  ["F5CE",0x62BD],
+  ["F5CF",0x63A8],
+  ["F5D0",0x690E],
+  ["F5D1",0x6978],
+  ["F5D2",0x6A1E],
+  ["F5D3",0x6E6B],
+  ["F5D4",0x76BA],
+  ["F5D5",0x79CB],
+  ["F5D6",0x82BB],
+  ["F5D7",0x8429],
+  ["F5D8",0x8ACF],
+  ["F5D9",0x8DA8],
+  ["F5DA",0x8FFD],
+  ["F5DB",0x9112],
+  ["F5DC",0x914B],
+  ["F5DD",0x919C],
+  ["F5DE",0x9310],
+  ["F5DF",0x9318],
+  ["F5E0",0x939A],
+  ["F5E1",0x96DB],
+  ["F5E2",0x9A36],
+  ["F5E3",0x9C0D],
+  ["F5E4",0x4E11],
+  ["F5E5",0x755C],
+  ["F5E6",0x795D],
+  ["F5E7",0x7AFA],
+  ["F5E8",0x7B51],
+  ["F5E9",0x7BC9],
+  ["F5EA",0x7E2E],
+  ["F5EB",0x84C4],
+  ["F5EC",0x8E59],
+  ["F5ED",0x8E74],
+  ["F5EE",0x8EF8],
+  ["F5EF",0x9010],
+  ["F5F0",0x6625],
+  ["F5F1",0x693F],
+  ["F5F2",0x7443],
+  ["F5F3",0x51FA],
+  ["F5F4",0x672E],
+  ["F5F5",0x9EDC],
+  ["F5F6",0x5145],
+  ["F5F7",0x5FE0],
+  ["F5F8",0x6C96],
+  ["F5F9",0x87F2],
+  ["F5FA",0x885D],
+  ["F5FB",0x8877],
+  ["F5FC",0x60B4],
+  ["F5FD",0x81B5],
+  ["F5FE",0x8403],
+  ["F6A1",0x8D05],
+  ["F6A2",0x53D6],
+  ["F6A3",0x5439],
+  ["F6A4",0x5634],
+  ["F6A5",0x5A36],
+  ["F6A6",0x5C31],
+  ["F6A7",0x708A],
+  ["F6A8",0x7FE0],
+  ["F6A9",0x805A],
+  ["F6AA",0x8106],
+  ["F6AB",0x81ED],
+  ["F6AC",0x8DA3],
+  ["F6AD",0x9189],
+  ["F6AE",0x9A5F],
+  ["F6AF",0x9DF2],
+  ["F6B0",0x5074],
+  ["F6B1",0x4EC4],
+  ["F6B2",0x53A0],
+  ["F6B3",0x60FB],
+  ["F6B4",0x6E2C],
+  ["F6B5",0x5C64],
+  ["F6B6",0x4F88],
+  ["F6B7",0x5024],
+  ["F6B8",0x55E4],
+  ["F6B9",0x5CD9],
+  ["F6BA",0x5E5F],
+  ["F6BB",0x6065],
+  ["F6BC",0x6894],
+  ["F6BD",0x6CBB],
+  ["F6BE",0x6DC4],
+  ["F6BF",0x71BE],
+  ["F6C0",0x75D4],
+  ["F6C1",0x75F4],
+  ["F6C2",0x7661],
+  ["F6C3",0x7A1A],
+  ["F6C4",0x7A49],
+  ["F6C5",0x7DC7],
+  ["F6C6",0x7DFB],
+  ["F6C7",0x7F6E],
+  ["F6C8",0x81F4],
+  ["F6C9",0x86A9],
+  ["F6CA",0x8F1C],
+  ["F6CB",0x96C9],
+  ["F6CC",0x99B3],
+  ["F6CD",0x9F52],
+  ["F6CE",0x5247],
+  ["F6CF",0x52C5],
+  ["F6D0",0x98ED],
+  ["F6D1",0x89AA],
+  ["F6D2",0x4E03],
+  ["F6D3",0x67D2],
+  ["F6D4",0x6F06],
+  ["F6D5",0x4FB5],
+  ["F6D6",0x5BE2],
+  ["F6D7",0x6795],
+  ["F6D8",0x6C88],
+  ["F6D9",0x6D78],
+  ["F6DA",0x741B],
+  ["F6DB",0x7827],
+  ["F6DC",0x91DD],
+  ["F6DD",0x937C],
+  ["F6DE",0x87C4],
+  ["F6DF",0x79E4],
+  ["F6E0",0x7A31],
+  ["F6E1",0x5FEB],
+  ["F6E2",0x4ED6],
+  ["F6E3",0x54A4],
+  ["F6E4",0x553E],
+  ["F6E5",0x58AE],
+  ["F6E6",0x59A5],
+  ["F6E7",0x60F0],
+  ["F6E8",0x6253],
+  ["F6E9",0x62D6],
+  ["F6EA",0x6736],
+  ["F6EB",0x6955],
+  ["F6EC",0x8235],
+  ["F6ED",0x9640],
+  ["F6EE",0x99B1],
+  ["F6EF",0x99DD],
+  ["F6F0",0x502C],
+  ["F6F1",0x5353],
+  ["F6F2",0x5544],
+  ["F6F3",0x577C],
+  ["F6F4",0xFA01],
+  ["F6F5",0x6258],
+  ["F6F6",0xFA02],
+  ["F6F7",0x64E2],
+  ["F6F8",0x666B],
+  ["F6F9",0x67DD],
+  ["F6FA",0x6FC1],
+  ["F6FB",0x6FEF],
+  ["F6FC",0x7422],
+  ["F6FD",0x7438],
+  ["F6FE",0x8A17],
+  ["F7A1",0x9438],
+  ["F7A2",0x5451],
+  ["F7A3",0x5606],
+  ["F7A4",0x5766],
+  ["F7A5",0x5F48],
+  ["F7A6",0x619A],
+  ["F7A7",0x6B4E],
+  ["F7A8",0x7058],
+  ["F7A9",0x70AD],
+  ["F7AA",0x7DBB],
+  ["F7AB",0x8A95],
+  ["F7AC",0x596A],
+  ["F7AD",0x812B],
+  ["F7AE",0x63A2],
+  ["F7AF",0x7708],
+  ["F7B0",0x803D],
+  ["F7B1",0x8CAA],
+  ["F7B2",0x5854],
+  ["F7B3",0x642D],
+  ["F7B4",0x69BB],
+  ["F7B5",0x5B95],
+  ["F7B6",0x5E11],
+  ["F7B7",0x6E6F],
+  ["F7B8",0xFA03],
+  ["F7B9",0x8569],
+  ["F7BA",0x514C],
+  ["F7BB",0x53F0],
+  ["F7BC",0x592A],
+  ["F7BD",0x6020],
+  ["F7BE",0x614B],
+  ["F7BF",0x6B86],
+  ["F7C0",0x6C70],
+  ["F7C1",0x6CF0],
+  ["F7C2",0x7B1E],
+  ["F7C3",0x80CE],
+  ["F7C4",0x82D4],
+  ["F7C5",0x8DC6],
+  ["F7C6",0x90B0],
+  ["F7C7",0x98B1],
+  ["F7C8",0xFA04],
+  ["F7C9",0x64C7],
+  ["F7CA",0x6FA4],
+  ["F7CB",0x6491],
+  ["F7CC",0x6504],
+  ["F7CD",0x514E],
+  ["F7CE",0x5410],
+  ["F7CF",0x571F],
+  ["F7D0",0x8A0E],
+  ["F7D1",0x615F],
+  ["F7D2",0x6876],
+  ["F7D3",0xFA05],
+  ["F7D4",0x75DB],
+  ["F7D5",0x7B52],
+  ["F7D6",0x7D71],
+  ["F7D7",0x901A],
+  ["F7D8",0x5806],
+  ["F7D9",0x69CC],
+  ["F7DA",0x817F],
+  ["F7DB",0x892A],
+  ["F7DC",0x9000],
+  ["F7DD",0x9839],
+  ["F7DE",0x5078],
+  ["F7DF",0x5957],
+  ["F7E0",0x59AC],
+  ["F7E1",0x6295],
+  ["F7E2",0x900F],
+  ["F7E3",0x9B2A],
+  ["F7E4",0x615D],
+  ["F7E5",0x7279],
+  ["F7E6",0x95D6],
+  ["F7E7",0x5761],
+  ["F7E8",0x5A46],
+  ["F7E9",0x5DF4],
+  ["F7EA",0x628A],
+  ["F7EB",0x64AD],
+  ["F7EC",0x64FA],
+  ["F7ED",0x6777],
+  ["F7EE",0x6CE2],
+  ["F7EF",0x6D3E],
+  ["F7F0",0x722C],
+  ["F7F1",0x7436],
+  ["F7F2",0x7834],
+  ["F7F3",0x7F77],
+  ["F7F4",0x82AD],
+  ["F7F5",0x8DDB],
+  ["F7F6",0x9817],
+  ["F7F7",0x5224],
+  ["F7F8",0x5742],
+  ["F7F9",0x677F],
+  ["F7FA",0x7248],
+  ["F7FB",0x74E3],
+  ["F7FC",0x8CA9],
+  ["F7FD",0x8FA6],
+  ["F7FE",0x9211],
+  ["F8A1",0x962A],
+  ["F8A2",0x516B],
+  ["F8A3",0x53ED],
+  ["F8A4",0x634C],
+  ["F8A5",0x4F69],
+  ["F8A6",0x5504],
+  ["F8A7",0x6096],
+  ["F8A8",0x6557],
+  ["F8A9",0x6C9B],
+  ["F8AA",0x6D7F],
+  ["F8AB",0x724C],
+  ["F8AC",0x72FD],
+  ["F8AD",0x7A17],
+  ["F8AE",0x8987],
+  ["F8AF",0x8C9D],
+  ["F8B0",0x5F6D],
+  ["F8B1",0x6F8E],
+  ["F8B2",0x70F9],
+  ["F8B3",0x81A8],
+  ["F8B4",0x610E],
+  ["F8B5",0x4FBF],
+  ["F8B6",0x504F],
+  ["F8B7",0x6241],
+  ["F8B8",0x7247],
+  ["F8B9",0x7BC7],
+  ["F8BA",0x7DE8],
+  ["F8BB",0x7FE9],
+  ["F8BC",0x904D],
+  ["F8BD",0x97AD],
+  ["F8BE",0x9A19],
+  ["F8BF",0x8CB6],
+  ["F8C0",0x576A],
+  ["F8C1",0x5E73],
+  ["F8C2",0x67B0],
+  ["F8C3",0x840D],
+  ["F8C4",0x8A55],
+  ["F8C5",0x5420],
+  ["F8C6",0x5B16],
+  ["F8C7",0x5E63],
+  ["F8C8",0x5EE2],
+  ["F8C9",0x5F0A],
+  ["F8CA",0x6583],
+  ["F8CB",0x80BA],
+  ["F8CC",0x853D],
+  ["F8CD",0x9589],
+  ["F8CE",0x965B],
+  ["F8CF",0x4F48],
+  ["F8D0",0x5305],
+  ["F8D1",0x530D],
+  ["F8D2",0x530F],
+  ["F8D3",0x5486],
+  ["F8D4",0x54FA],
+  ["F8D5",0x5703],
+  ["F8D6",0x5E03],
+  ["F8D7",0x6016],
+  ["F8D8",0x629B],
+  ["F8D9",0x62B1],
+  ["F8DA",0x6355],
+  ["F8DB",0xFA06],
+  ["F8DC",0x6CE1],
+  ["F8DD",0x6D66],
+  ["F8DE",0x75B1],
+  ["F8DF",0x7832],
+  ["F8E0",0x80DE],
+  ["F8E1",0x812F],
+  ["F8E2",0x82DE],
+  ["F8E3",0x8461],
+  ["F8E4",0x84B2],
+  ["F8E5",0x888D],
+  ["F8E6",0x8912],
+  ["F8E7",0x900B],
+  ["F8E8",0x92EA],
+  ["F8E9",0x98FD],
+  ["F8EA",0x9B91],
+  ["F8EB",0x5E45],
+  ["F8EC",0x66B4],
+  ["F8ED",0x66DD],
+  ["F8EE",0x7011],
+  ["F8EF",0x7206],
+  ["F8F0",0xFA07],
+  ["F8F1",0x4FF5],
+  ["F8F2",0x527D],
+  ["F8F3",0x5F6A],
+  ["F8F4",0x6153],
+  ["F8F5",0x6753],
+  ["F8F6",0x6A19],
+  ["F8F7",0x6F02],
+  ["F8F8",0x74E2],
+  ["F8F9",0x7968],
+  ["F8FA",0x8868],
+  ["F8FB",0x8C79],
+  ["F8FC",0x98C7],
+  ["F8FD",0x98C4],
+  ["F8FE",0x9A43],
+  ["F9A1",0x54C1],
+  ["F9A2",0x7A1F],
+  ["F9A3",0x6953],
+  ["F9A4",0x8AF7],
+  ["F9A5",0x8C4A],
+  ["F9A6",0x98A8],
+  ["F9A7",0x99AE],
+  ["F9A8",0x5F7C],
+  ["F9A9",0x62AB],
+  ["F9AA",0x75B2],
+  ["F9AB",0x76AE],
+  ["F9AC",0x88AB],
+  ["F9AD",0x907F],
+  ["F9AE",0x9642],
+  ["F9AF",0x5339],
+  ["F9B0",0x5F3C],
+  ["F9B1",0x5FC5],
+  ["F9B2",0x6CCC],
+  ["F9B3",0x73CC],
+  ["F9B4",0x7562],
+  ["F9B5",0x758B],
+  ["F9B6",0x7B46],
+  ["F9B7",0x82FE],
+  ["F9B8",0x999D],
+  ["F9B9",0x4E4F],
+  ["F9BA",0x903C],
+  ["F9BB",0x4E0B],
+  ["F9BC",0x4F55],
+  ["F9BD",0x53A6],
+  ["F9BE",0x590F],
+  ["F9BF",0x5EC8],
+  ["F9C0",0x6630],
+  ["F9C1",0x6CB3],
+  ["F9C2",0x7455],
+  ["F9C3",0x8377],
+  ["F9C4",0x8766],
+  ["F9C5",0x8CC0],
+  ["F9C6",0x9050],
+  ["F9C7",0x971E],
+  ["F9C8",0x9C15],
+  ["F9C9",0x58D1],
+  ["F9CA",0x5B78],
+  ["F9CB",0x8650],
+  ["F9CC",0x8B14],
+  ["F9CD",0x9DB4],
+  ["F9CE",0x5BD2],
+  ["F9CF",0x6068],
+  ["F9D0",0x608D],
+  ["F9D1",0x65F1],
+  ["F9D2",0x6C57],
+  ["F9D3",0x6F22],
+  ["F9D4",0x6FA3],
+  ["F9D5",0x701A],
+  ["F9D6",0x7F55],
+  ["F9D7",0x7FF0],
+  ["F9D8",0x9591],
+  ["F9D9",0x9592],
+  ["F9DA",0x9650],
+  ["F9DB",0x97D3],
+  ["F9DC",0x5272],
+  ["F9DD",0x8F44],
+  ["F9DE",0x51FD],
+  ["F9DF",0x542B],
+  ["F9E0",0x54B8],
+  ["F9E1",0x5563],
+  ["F9E2",0x558A],
+  ["F9E3",0x6ABB],
+  ["F9E4",0x6DB5],
+  ["F9E5",0x7DD8],
+  ["F9E6",0x8266],
+  ["F9E7",0x929C],
+  ["F9E8",0x9677],
+  ["F9E9",0x9E79],
+  ["F9EA",0x5408],
+  ["F9EB",0x54C8],
+  ["F9EC",0x76D2],
+  ["F9ED",0x86E4],
+  ["F9EE",0x95A4],
+  ["F9EF",0x95D4],
+  ["F9F0",0x965C],
+  ["F9F1",0x4EA2],
+  ["F9F2",0x4F09],
+  ["F9F3",0x59EE],
+  ["F9F4",0x5AE6],
+  ["F9F5",0x5DF7],
+  ["F9F6",0x6052],
+  ["F9F7",0x6297],
+  ["F9F8",0x676D],
+  ["F9F9",0x6841],
+  ["F9FA",0x6C86],
+  ["F9FB",0x6E2F],
+  ["F9FC",0x7F38],
+  ["F9FD",0x809B],
+  ["F9FE",0x822A],
+  ["FAA1",0xFA08],
+  ["FAA2",0xFA09],
+  ["FAA3",0x9805],
+  ["FAA4",0x4EA5],
+  ["FAA5",0x5055],
+  ["FAA6",0x54B3],
+  ["FAA7",0x5793],
+  ["FAA8",0x595A],
+  ["FAA9",0x5B69],
+  ["FAAA",0x5BB3],
+  ["FAAB",0x61C8],
+  ["FAAC",0x6977],
+  ["FAAD",0x6D77],
+  ["FAAE",0x7023],
+  ["FAAF",0x87F9],
+  ["FAB0",0x89E3],
+  ["FAB1",0x8A72],
+  ["FAB2",0x8AE7],
+  ["FAB3",0x9082],
+  ["FAB4",0x99ED],
+  ["FAB5",0x9AB8],
+  ["FAB6",0x52BE],
+  ["FAB7",0x6838],
+  ["FAB8",0x5016],
+  ["FAB9",0x5E78],
+  ["FABA",0x674F],
+  ["FABB",0x8347],
+  ["FABC",0x884C],
+  ["FABD",0x4EAB],
+  ["FABE",0x5411],
+  ["FABF",0x56AE],
+  ["FAC0",0x73E6],
+  ["FAC1",0x9115],
+  ["FAC2",0x97FF],
+  ["FAC3",0x9909],
+  ["FAC4",0x9957],
+  ["FAC5",0x9999],
+  ["FAC6",0x5653],
+  ["FAC7",0x589F],
+  ["FAC8",0x865B],
+  ["FAC9",0x8A31],
+  ["FACA",0x61B2],
+  ["FACB",0x6AF6],
+  ["FACC",0x737B],
+  ["FACD",0x8ED2],
+  ["FACE",0x6B47],
+  ["FACF",0x96AA],
+  ["FAD0",0x9A57],
+  ["FAD1",0x5955],
+  ["FAD2",0x7200],
+  ["FAD3",0x8D6B],
+  ["FAD4",0x9769],
+  ["FAD5",0x4FD4],
+  ["FAD6",0x5CF4],
+  ["FAD7",0x5F26],
+  ["FAD8",0x61F8],
+  ["FAD9",0x665B],
+  ["FADA",0x6CEB],
+  ["FADB",0x70AB],
+  ["FADC",0x7384],
+  ["FADD",0x73B9],
+  ["FADE",0x73FE],
+  ["FADF",0x7729],
+  ["FAE0",0x774D],
+  ["FAE1",0x7D43],
+  ["FAE2",0x7D62],
+  ["FAE3",0x7E23],
+  ["FAE4",0x8237],
+  ["FAE5",0x8852],
+  ["FAE6",0xFA0A],
+  ["FAE7",0x8CE2],
+  ["FAE8",0x9249],
+  ["FAE9",0x986F],
+  ["FAEA",0x5B51],
+  ["FAEB",0x7A74],
+  ["FAEC",0x8840],
+  ["FAED",0x9801],
+  ["FAEE",0x5ACC],
+  ["FAEF",0x4FE0],
+  ["FAF0",0x5354],
+  ["FAF1",0x593E],
+  ["FAF2",0x5CFD],
+  ["FAF3",0x633E],
+  ["FAF4",0x6D79],
+  ["FAF5",0x72F9],
+  ["FAF6",0x8105],
+  ["FAF7",0x8107],
+  ["FAF8",0x83A2],
+  ["FAF9",0x92CF],
+  ["FAFA",0x9830],
+  ["FAFB",0x4EA8],
+  ["FAFC",0x5144],
+  ["FAFD",0x5211],
+  ["FAFE",0x578B],
+  ["FBA1",0x5F62],
+  ["FBA2",0x6CC2],
+  ["FBA3",0x6ECE],
+  ["FBA4",0x7005],
+  ["FBA5",0x7050],
+  ["FBA6",0x70AF],
+  ["FBA7",0x7192],
+  ["FBA8",0x73E9],
+  ["FBA9",0x7469],
+  ["FBAA",0x834A],
+  ["FBAB",0x87A2],
+  ["FBAC",0x8861],
+  ["FBAD",0x9008],
+  ["FBAE",0x90A2],
+  ["FBAF",0x93A3],
+  ["FBB0",0x99A8],
+  ["FBB1",0x516E],
+  ["FBB2",0x5F57],
+  ["FBB3",0x60E0],
+  ["FBB4",0x6167],
+  ["FBB5",0x66B3],
+  ["FBB6",0x8559],
+  ["FBB7",0x8E4A],
+  ["FBB8",0x91AF],
+  ["FBB9",0x978B],
+  ["FBBA",0x4E4E],
+  ["FBBB",0x4E92],
+  ["FBBC",0x547C],
+  ["FBBD",0x58D5],
+  ["FBBE",0x58FA],
+  ["FBBF",0x597D],
+  ["FBC0",0x5CB5],
+  ["FBC1",0x5F27],
+  ["FBC2",0x6236],
+  ["FBC3",0x6248],
+  ["FBC4",0x660A],
+  ["FBC5",0x6667],
+  ["FBC6",0x6BEB],
+  ["FBC7",0x6D69],
+  ["FBC8",0x6DCF],
+  ["FBC9",0x6E56],
+  ["FBCA",0x6EF8],
+  ["FBCB",0x6F94],
+  ["FBCC",0x6FE0],
+  ["FBCD",0x6FE9],
+  ["FBCE",0x705D],
+  ["FBCF",0x72D0],
+  ["FBD0",0x7425],
+  ["FBD1",0x745A],
+  ["FBD2",0x74E0],
+  ["FBD3",0x7693],
+  ["FBD4",0x795C],
+  ["FBD5",0x7CCA],
+  ["FBD6",0x7E1E],
+  ["FBD7",0x80E1],
+  ["FBD8",0x82A6],
+  ["FBD9",0x846B],
+  ["FBDA",0x84BF],
+  ["FBDB",0x864E],
+  ["FBDC",0x865F],
+  ["FBDD",0x8774],
+  ["FBDE",0x8B77],
+  ["FBDF",0x8C6A],
+  ["FBE0",0x93AC],
+  ["FBE1",0x9800],
+  ["FBE2",0x9865],
+  ["FBE3",0x60D1],
+  ["FBE4",0x6216],
+  ["FBE5",0x9177],
+  ["FBE6",0x5A5A],
+  ["FBE7",0x660F],
+  ["FBE8",0x6DF7],
+  ["FBE9",0x6E3E],
+  ["FBEA",0x743F],
+  ["FBEB",0x9B42],
+  ["FBEC",0x5FFD],
+  ["FBED",0x60DA],
+  ["FBEE",0x7B0F],
+  ["FBEF",0x54C4],
+  ["FBF0",0x5F18],
+  ["FBF1",0x6C5E],
+  ["FBF2",0x6CD3],
+  ["FBF3",0x6D2A],
+  ["FBF4",0x70D8],
+  ["FBF5",0x7D05],
+  ["FBF6",0x8679],
+  ["FBF7",0x8A0C],
+  ["FBF8",0x9D3B],
+  ["FBF9",0x5316],
+  ["FBFA",0x548C],
+  ["FBFB",0x5B05],
+  ["FBFC",0x6A3A],
+  ["FBFD",0x706B],
+  ["FBFE",0x7575],
+  ["FCA1",0x798D],
+  ["FCA2",0x79BE],
+  ["FCA3",0x82B1],
+  ["FCA4",0x83EF],
+  ["FCA5",0x8A71],
+  ["FCA6",0x8B41],
+  ["FCA7",0x8CA8],
+  ["FCA8",0x9774],
+  ["FCA9",0xFA0B],
+  ["FCAA",0x64F4],
+  ["FCAB",0x652B],
+  ["FCAC",0x78BA],
+  ["FCAD",0x78BB],
+  ["FCAE",0x7A6B],
+  ["FCAF",0x4E38],
+  ["FCB0",0x559A],
+  ["FCB1",0x5950],
+  ["FCB2",0x5BA6],
+  ["FCB3",0x5E7B],
+  ["FCB4",0x60A3],
+  ["FCB5",0x63DB],
+  ["FCB6",0x6B61],
+  ["FCB7",0x6665],
+  ["FCB8",0x6853],
+  ["FCB9",0x6E19],
+  ["FCBA",0x7165],
+  ["FCBB",0x74B0],
+  ["FCBC",0x7D08],
+  ["FCBD",0x9084],
+  ["FCBE",0x9A69],
+  ["FCBF",0x9C25],
+  ["FCC0",0x6D3B],
+  ["FCC1",0x6ED1],
+  ["FCC2",0x733E],
+  ["FCC3",0x8C41],
+  ["FCC4",0x95CA],
+  ["FCC5",0x51F0],
+  ["FCC6",0x5E4C],
+  ["FCC7",0x5FA8],
+  ["FCC8",0x604D],
+  ["FCC9",0x60F6],
+  ["FCCA",0x6130],
+  ["FCCB",0x614C],
+  ["FCCC",0x6643],
+  ["FCCD",0x6644],
+  ["FCCE",0x69A5],
+  ["FCCF",0x6CC1],
+  ["FCD0",0x6E5F],
+  ["FCD1",0x6EC9],
+  ["FCD2",0x6F62],
+  ["FCD3",0x714C],
+  ["FCD4",0x749C],
+  ["FCD5",0x7687],
+  ["FCD6",0x7BC1],
+  ["FCD7",0x7C27],
+  ["FCD8",0x8352],
+  ["FCD9",0x8757],
+  ["FCDA",0x9051],
+  ["FCDB",0x968D],
+  ["FCDC",0x9EC3],
+  ["FCDD",0x532F],
+  ["FCDE",0x56DE],
+  ["FCDF",0x5EFB],
+  ["FCE0",0x5F8A],
+  ["FCE1",0x6062],
+  ["FCE2",0x6094],
+  ["FCE3",0x61F7],
+  ["FCE4",0x6666],
+  ["FCE5",0x6703],
+  ["FCE6",0x6A9C],
+  ["FCE7",0x6DEE],
+  ["FCE8",0x6FAE],
+  ["FCE9",0x7070],
+  ["FCEA",0x736A],
+  ["FCEB",0x7E6A],
+  ["FCEC",0x81BE],
+  ["FCED",0x8334],
+  ["FCEE",0x86D4],
+  ["FCEF",0x8AA8],
+  ["FCF0",0x8CC4],
+  ["FCF1",0x5283],
+  ["FCF2",0x7372],
+  ["FCF3",0x5B96],
+  ["FCF4",0x6A6B],
+  ["FCF5",0x9404],
+  ["FCF6",0x54EE],
+  ["FCF7",0x5686],
+  ["FCF8",0x5B5D],
+  ["FCF9",0x6548],
+  ["FCFA",0x6585],
+  ["FCFB",0x66C9],
+  ["FCFC",0x689F],
+  ["FCFD",0x6D8D],
+  ["FCFE",0x6DC6],
+  ["FDA1",0x723B],
+  ["FDA2",0x80B4],
+  ["FDA3",0x9175],
+  ["FDA4",0x9A4D],
+  ["FDA5",0x4FAF],
+  ["FDA6",0x5019],
+  ["FDA7",0x539A],
+  ["FDA8",0x540E],
+  ["FDA9",0x543C],
+  ["FDAA",0x5589],
+  ["FDAB",0x55C5],
+  ["FDAC",0x5E3F],
+  ["FDAD",0x5F8C],
+  ["FDAE",0x673D],
+  ["FDAF",0x7166],
+  ["FDB0",0x73DD],
+  ["FDB1",0x9005],
+  ["FDB2",0x52DB],
+  ["FDB3",0x52F3],
+  ["FDB4",0x5864],
+  ["FDB5",0x58CE],
+  ["FDB6",0x7104],
+  ["FDB7",0x718F],
+  ["FDB8",0x71FB],
+  ["FDB9",0x85B0],
+  ["FDBA",0x8A13],
+  ["FDBB",0x6688],
+  ["FDBC",0x85A8],
+  ["FDBD",0x55A7],
+  ["FDBE",0x6684],
+  ["FDBF",0x714A],
+  ["FDC0",0x8431],
+  ["FDC1",0x5349],
+  ["FDC2",0x5599],
+  ["FDC3",0x6BC1],
+  ["FDC4",0x5F59],
+  ["FDC5",0x5FBD],
+  ["FDC6",0x63EE],
+  ["FDC7",0x6689],
+  ["FDC8",0x7147],
+  ["FDC9",0x8AF1],
+  ["FDCA",0x8F1D],
+  ["FDCB",0x9EBE],
+  ["FDCC",0x4F11],
+  ["FDCD",0x643A],
+  ["FDCE",0x70CB],
+  ["FDCF",0x7566],
+  ["FDD0",0x8667],
+  ["FDD1",0x6064],
+  ["FDD2",0x8B4E],
+  ["FDD3",0x9DF8],
+  ["FDD4",0x5147],
+  ["FDD5",0x51F6],
+  ["FDD6",0x5308],
+  ["FDD7",0x6D36],
+  ["FDD8",0x80F8],
+  ["FDD9",0x9ED1],
+  ["FDDA",0x6615],
+  ["FDDB",0x6B23],
+  ["FDDC",0x7098],
+  ["FDDD",0x75D5],
+  ["FDDE",0x5403],
+  ["FDDF",0x5C79],
+  ["FDE0",0x7D07],
+  ["FDE1",0x8A16],
+  ["FDE2",0x6B20],
+  ["FDE3",0x6B3D],
+  ["FDE4",0x6B46],
+  ["FDE5",0x5438],
+  ["FDE6",0x6070],
+  ["FDE7",0x6D3D],
+  ["FDE8",0x7FD5],
+  ["FDE9",0x8208],
+  ["FDEA",0x50D6],
+  ["FDEB",0x51DE],
+  ["FDEC",0x559C],
+  ["FDED",0x566B],
+  ["FDEE",0x56CD],
+  ["FDEF",0x59EC],
+  ["FDF0",0x5B09],
+  ["FDF1",0x5E0C],
+  ["FDF2",0x6199],
+  ["FDF3",0x6198],
+  ["FDF4",0x6231],
+  ["FDF5",0x665E],
+  ["FDF6",0x66E6],
+  ["FDF7",0x7199],
+  ["FDF8",0x71B9],
+  ["FDF9",0x71BA],
+  ["FDFA",0x72A7],
+  ["FDFB",0x79A7],
+  ["FDFC",0x7A00],
+  ["FDFD",0x7FB2],
+  ["FDFE",0x8A70],
+]
+
+UCS_TO_EUCKR_TBL = EUCKR_TO_UCS_TBL.map {|a,b| [b,a] }
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm437-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm437-tbl.rb
new file mode 100644
index 0000000..5ae64d6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm437-tbl.rb
@@ -0,0 +1,130 @@
+IBM437_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["9B",0xA2],
+  ["9C",0xA3],
+  ["9D",0xA5],
+  ["A6",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["E6",0xB5],
+  ["FA",0xB7],
+  ["A7",0xBA],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["A8",0xBF],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["80",0xC7],
+  ["90",0xC9],
+  ["A5",0xD1],
+  ["99",0xD6],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["8D",0xEC],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["8B",0xEF],
+  ["A4",0xF1],
+  ["95",0xF2],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["98",0xFF],
+  ["9F",0x192],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["FC",0x207F],
+  ["9E",0x20A7],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["A9",0x2310],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm775-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm775-tbl.rb
new file mode 100644
index 0000000..f55679f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm775-tbl.rb
@@ -0,0 +1,130 @@
+IBM775_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["96",0xA2],
+  ["9C",0xA3],
+  ["9F",0xA4],
+  ["A7",0xA6],
+  ["F5",0xA7],
+  ["A8",0xA9],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F0",0xAD],
+  ["A9",0xAE],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["FC",0xB3],
+  ["E6",0xB5],
+  ["F4",0xB6],
+  ["FA",0xB7],
+  ["FB",0xB9],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["F3",0xBE],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["90",0xC9],
+  ["E0",0xD3],
+  ["E5",0xD5],
+  ["99",0xD6],
+  ["9E",0xD7],
+  ["9D",0xD8],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["82",0xE9],
+  ["A2",0xF3],
+  ["E4",0xF5],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["9B",0xF8],
+  ["81",0xFC],
+  ["A0",0x100],
+  ["83",0x101],
+  ["B5",0x104],
+  ["D0",0x105],
+  ["80",0x106],
+  ["87",0x107],
+  ["B6",0x10C],
+  ["D1",0x10D],
+  ["ED",0x112],
+  ["89",0x113],
+  ["B8",0x116],
+  ["D3",0x117],
+  ["B7",0x118],
+  ["D2",0x119],
+  ["95",0x122],
+  ["85",0x123],
+  ["A1",0x12A],
+  ["8C",0x12B],
+  ["BD",0x12E],
+  ["D4",0x12F],
+  ["E8",0x136],
+  ["E9",0x137],
+  ["EA",0x13B],
+  ["EB",0x13C],
+  ["AD",0x141],
+  ["88",0x142],
+  ["E3",0x143],
+  ["E7",0x144],
+  ["EE",0x145],
+  ["EC",0x146],
+  ["E2",0x14C],
+  ["93",0x14D],
+  ["8A",0x156],
+  ["8B",0x157],
+  ["97",0x15A],
+  ["98",0x15B],
+  ["BE",0x160],
+  ["D5",0x161],
+  ["C7",0x16A],
+  ["D7",0x16B],
+  ["C6",0x172],
+  ["D6",0x173],
+  ["8D",0x179],
+  ["A5",0x17A],
+  ["A3",0x17B],
+  ["A4",0x17C],
+  ["CF",0x17D],
+  ["D8",0x17E],
+  ["EF",0x2019],
+  ["F2",0x201C],
+  ["A6",0x201D],
+  ["F7",0x201E],
+  ["F9",0x2219],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm852-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm852-tbl.rb
new file mode 100644
index 0000000..6cec51c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm852-tbl.rb
@@ -0,0 +1,130 @@
+IBM852_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["CF",0xA4],
+  ["F5",0xA7],
+  ["F9",0xA8],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F0",0xAD],
+  ["F8",0xB0],
+  ["EF",0xB4],
+  ["F7",0xB8],
+  ["AF",0xBB],
+  ["B5",0xC1],
+  ["B6",0xC2],
+  ["8E",0xC4],
+  ["80",0xC7],
+  ["90",0xC9],
+  ["D3",0xCB],
+  ["D6",0xCD],
+  ["D7",0xCE],
+  ["E0",0xD3],
+  ["E2",0xD4],
+  ["99",0xD6],
+  ["9E",0xD7],
+  ["E9",0xDA],
+  ["9A",0xDC],
+  ["ED",0xDD],
+  ["E1",0xDF],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE4],
+  ["87",0xE7],
+  ["82",0xE9],
+  ["89",0xEB],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["A3",0xFA],
+  ["81",0xFC],
+  ["EC",0xFD],
+  ["C6",0x102],
+  ["C7",0x103],
+  ["A4",0x104],
+  ["A5",0x105],
+  ["8F",0x106],
+  ["86",0x107],
+  ["AC",0x10C],
+  ["9F",0x10D],
+  ["D2",0x10E],
+  ["D4",0x10F],
+  ["D1",0x110],
+  ["D0",0x111],
+  ["A8",0x118],
+  ["A9",0x119],
+  ["B7",0x11A],
+  ["D8",0x11B],
+  ["91",0x139],
+  ["92",0x13A],
+  ["95",0x13D],
+  ["96",0x13E],
+  ["9D",0x141],
+  ["88",0x142],
+  ["E3",0x143],
+  ["E4",0x144],
+  ["D5",0x147],
+  ["E5",0x148],
+  ["8A",0x150],
+  ["8B",0x151],
+  ["E8",0x154],
+  ["EA",0x155],
+  ["FC",0x158],
+  ["FD",0x159],
+  ["97",0x15A],
+  ["98",0x15B],
+  ["B8",0x15E],
+  ["AD",0x15F],
+  ["E6",0x160],
+  ["E7",0x161],
+  ["DD",0x162],
+  ["EE",0x163],
+  ["9B",0x164],
+  ["9C",0x165],
+  ["DE",0x16E],
+  ["85",0x16F],
+  ["EB",0x170],
+  ["FB",0x171],
+  ["8D",0x179],
+  ["AB",0x17A],
+  ["BD",0x17B],
+  ["BE",0x17C],
+  ["A6",0x17D],
+  ["A7",0x17E],
+  ["F3",0x2C7],
+  ["F4",0x2D8],
+  ["FA",0x2D9],
+  ["F2",0x2DB],
+  ["F1",0x2DD],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm855-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm855-tbl.rb
new file mode 100644
index 0000000..7e0cc50
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm855-tbl.rb
@@ -0,0 +1,130 @@
+IBM855_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["CF",0xA4],
+  ["FD",0xA7],
+  ["AE",0xAB],
+  ["F0",0xAD],
+  ["AF",0xBB],
+  ["85",0x401],
+  ["81",0x402],
+  ["83",0x403],
+  ["87",0x404],
+  ["89",0x405],
+  ["8B",0x406],
+  ["8D",0x407],
+  ["8F",0x408],
+  ["91",0x409],
+  ["93",0x40A],
+  ["95",0x40B],
+  ["97",0x40C],
+  ["99",0x40E],
+  ["9B",0x40F],
+  ["A1",0x410],
+  ["A3",0x411],
+  ["EC",0x412],
+  ["AD",0x413],
+  ["A7",0x414],
+  ["A9",0x415],
+  ["EA",0x416],
+  ["F4",0x417],
+  ["B8",0x418],
+  ["BE",0x419],
+  ["C7",0x41A],
+  ["D1",0x41B],
+  ["D3",0x41C],
+  ["D5",0x41D],
+  ["D7",0x41E],
+  ["DD",0x41F],
+  ["E2",0x420],
+  ["E4",0x421],
+  ["E6",0x422],
+  ["E8",0x423],
+  ["AB",0x424],
+  ["B6",0x425],
+  ["A5",0x426],
+  ["FC",0x427],
+  ["F6",0x428],
+  ["FA",0x429],
+  ["9F",0x42A],
+  ["F2",0x42B],
+  ["EE",0x42C],
+  ["F8",0x42D],
+  ["9D",0x42E],
+  ["E0",0x42F],
+  ["A0",0x430],
+  ["A2",0x431],
+  ["EB",0x432],
+  ["AC",0x433],
+  ["A6",0x434],
+  ["A8",0x435],
+  ["E9",0x436],
+  ["F3",0x437],
+  ["B7",0x438],
+  ["BD",0x439],
+  ["C6",0x43A],
+  ["D0",0x43B],
+  ["D2",0x43C],
+  ["D4",0x43D],
+  ["D6",0x43E],
+  ["D8",0x43F],
+  ["E1",0x440],
+  ["E3",0x441],
+  ["E5",0x442],
+  ["E7",0x443],
+  ["AA",0x444],
+  ["B5",0x445],
+  ["A4",0x446],
+  ["FB",0x447],
+  ["F5",0x448],
+  ["F9",0x449],
+  ["9E",0x44A],
+  ["F1",0x44B],
+  ["ED",0x44C],
+  ["F7",0x44D],
+  ["9C",0x44E],
+  ["DE",0x44F],
+  ["84",0x451],
+  ["80",0x452],
+  ["82",0x453],
+  ["86",0x454],
+  ["88",0x455],
+  ["8A",0x456],
+  ["8C",0x457],
+  ["8E",0x458],
+  ["90",0x459],
+  ["92",0x45A],
+  ["94",0x45B],
+  ["96",0x45C],
+  ["98",0x45E],
+  ["9A",0x45F],
+  ["EF",0x2116],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm857-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm857-tbl.rb
new file mode 100644
index 0000000..5b20d38
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm857-tbl.rb
@@ -0,0 +1,127 @@
+IBM857_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["BD",0xA2],
+  ["9C",0xA3],
+  ["CF",0xA4],
+  ["BE",0xA5],
+  ["DD",0xA6],
+  ["F5",0xA7],
+  ["F9",0xA8],
+  ["B8",0xA9],
+  ["D1",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F0",0xAD],
+  ["A9",0xAE],
+  ["EE",0xAF],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["FC",0xB3],
+  ["EF",0xB4],
+  ["E6",0xB5],
+  ["F4",0xB6],
+  ["FA",0xB7],
+  ["F7",0xB8],
+  ["FB",0xB9],
+  ["D0",0xBA],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["F3",0xBE],
+  ["A8",0xBF],
+  ["B7",0xC0],
+  ["B5",0xC1],
+  ["B6",0xC2],
+  ["C7",0xC3],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["80",0xC7],
+  ["D4",0xC8],
+  ["90",0xC9],
+  ["D2",0xCA],
+  ["D3",0xCB],
+  ["DE",0xCC],
+  ["D6",0xCD],
+  ["D7",0xCE],
+  ["D8",0xCF],
+  ["A5",0xD1],
+  ["E3",0xD2],
+  ["E0",0xD3],
+  ["E2",0xD4],
+  ["E5",0xD5],
+  ["99",0xD6],
+  ["E8",0xD7],
+  ["9D",0xD8],
+  ["EB",0xD9],
+  ["E9",0xDA],
+  ["EA",0xDB],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["C6",0xE3],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["EC",0xEC],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["8B",0xEF],
+  ["A4",0xF1],
+  ["95",0xF2],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["E4",0xF5],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["9B",0xF8],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["ED",0xFF],
+  ["A6",0x11E],
+  ["A7",0x11F],
+  ["98",0x130],
+  ["8D",0x131],
+  ["9E",0x15E],
+  ["9F",0x15F],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm860-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm860-tbl.rb
new file mode 100644
index 0000000..ae218a1
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm860-tbl.rb
@@ -0,0 +1,130 @@
+IBM860_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["9B",0xA2],
+  ["9C",0xA3],
+  ["A6",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["E6",0xB5],
+  ["FA",0xB7],
+  ["A7",0xBA],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["A8",0xBF],
+  ["91",0xC0],
+  ["86",0xC1],
+  ["8F",0xC2],
+  ["8E",0xC3],
+  ["80",0xC7],
+  ["92",0xC8],
+  ["90",0xC9],
+  ["89",0xCA],
+  ["98",0xCC],
+  ["8B",0xCD],
+  ["A5",0xD1],
+  ["A9",0xD2],
+  ["9F",0xD3],
+  ["8C",0xD4],
+  ["99",0xD5],
+  ["9D",0xD9],
+  ["96",0xDA],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE3],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["8D",0xEC],
+  ["A1",0xED],
+  ["A4",0xF1],
+  ["95",0xF2],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF5],
+  ["F6",0xF7],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["81",0xFC],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["FC",0x207F],
+  ["9E",0x20A7],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm861-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm861-tbl.rb
new file mode 100644
index 0000000..c24042a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm861-tbl.rb
@@ -0,0 +1,130 @@
+IBM861_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["9C",0xA3],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["E6",0xB5],
+  ["FA",0xB7],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["A8",0xBF],
+  ["A4",0xC1],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["80",0xC7],
+  ["90",0xC9],
+  ["A5",0xCD],
+  ["8B",0xD0],
+  ["A6",0xD3],
+  ["99",0xD6],
+  ["9D",0xD8],
+  ["A7",0xDA],
+  ["9A",0xDC],
+  ["97",0xDD],
+  ["8D",0xDE],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["A1",0xED],
+  ["8C",0xF0],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["9B",0xF8],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["98",0xFD],
+  ["95",0xFE],
+  ["9F",0x192],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["FC",0x207F],
+  ["9E",0x20A7],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["A9",0x2310],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm862-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm862-tbl.rb
new file mode 100644
index 0000000..31d6fb0
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm862-tbl.rb
@@ -0,0 +1,130 @@
+IBM862_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["9B",0xA2],
+  ["9C",0xA3],
+  ["9D",0xA5],
+  ["A6",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["E6",0xB5],
+  ["FA",0xB7],
+  ["A7",0xBA],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["A8",0xBF],
+  ["A5",0xD1],
+  ["E1",0xDF],
+  ["A0",0xE1],
+  ["A1",0xED],
+  ["A4",0xF1],
+  ["A2",0xF3],
+  ["F6",0xF7],
+  ["A3",0xFA],
+  ["9F",0x192],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["80",0x5D0],
+  ["81",0x5D1],
+  ["82",0x5D2],
+  ["83",0x5D3],
+  ["84",0x5D4],
+  ["85",0x5D5],
+  ["86",0x5D6],
+  ["87",0x5D7],
+  ["88",0x5D8],
+  ["89",0x5D9],
+  ["8A",0x5DA],
+  ["8B",0x5DB],
+  ["8C",0x5DC],
+  ["8D",0x5DD],
+  ["8E",0x5DE],
+  ["8F",0x5DF],
+  ["90",0x5E0],
+  ["91",0x5E1],
+  ["92",0x5E2],
+  ["93",0x5E3],
+  ["94",0x5E4],
+  ["95",0x5E5],
+  ["96",0x5E6],
+  ["97",0x5E7],
+  ["98",0x5E8],
+  ["99",0x5E9],
+  ["9A",0x5EA],
+  ["FC",0x207F],
+  ["9E",0x20A7],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["A9",0x2310],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm863-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm863-tbl.rb
new file mode 100644
index 0000000..db110cf
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm863-tbl.rb
@@ -0,0 +1,130 @@
+IBM863_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["9B",0xA2],
+  ["9C",0xA3],
+  ["98",0xA4],
+  ["A0",0xA6],
+  ["8F",0xA7],
+  ["A4",0xA8],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["A7",0xAF],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["A6",0xB3],
+  ["A1",0xB4],
+  ["E6",0xB5],
+  ["86",0xB6],
+  ["FA",0xB7],
+  ["A5",0xB8],
+  ["AF",0xBB],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["AD",0xBE],
+  ["8E",0xC0],
+  ["84",0xC2],
+  ["80",0xC7],
+  ["91",0xC8],
+  ["90",0xC9],
+  ["92",0xCA],
+  ["94",0xCB],
+  ["A8",0xCE],
+  ["95",0xCF],
+  ["99",0xD4],
+  ["9D",0xD9],
+  ["9E",0xDB],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["83",0xE2],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["8C",0xEE],
+  ["8B",0xEF],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["F6",0xF7],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["9F",0x192],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["8D",0x2017],
+  ["FC",0x207F],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["A9",0x2310],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm865-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm865-tbl.rb
new file mode 100644
index 0000000..22e322f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm865-tbl.rb
@@ -0,0 +1,130 @@
+IBM865_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["AD",0xA1],
+  ["9C",0xA3],
+  ["AF",0xA4],
+  ["A6",0xAA],
+  ["AE",0xAB],
+  ["AA",0xAC],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["FD",0xB2],
+  ["E6",0xB5],
+  ["FA",0xB7],
+  ["A7",0xBA],
+  ["AC",0xBC],
+  ["AB",0xBD],
+  ["A8",0xBF],
+  ["8E",0xC4],
+  ["8F",0xC5],
+  ["92",0xC6],
+  ["80",0xC7],
+  ["90",0xC9],
+  ["A5",0xD1],
+  ["99",0xD6],
+  ["9D",0xD8],
+  ["9A",0xDC],
+  ["E1",0xDF],
+  ["85",0xE0],
+  ["A0",0xE1],
+  ["83",0xE2],
+  ["84",0xE4],
+  ["86",0xE5],
+  ["91",0xE6],
+  ["87",0xE7],
+  ["8A",0xE8],
+  ["82",0xE9],
+  ["88",0xEA],
+  ["89",0xEB],
+  ["8D",0xEC],
+  ["A1",0xED],
+  ["8C",0xEE],
+  ["8B",0xEF],
+  ["A4",0xF1],
+  ["95",0xF2],
+  ["A2",0xF3],
+  ["93",0xF4],
+  ["94",0xF6],
+  ["F6",0xF7],
+  ["9B",0xF8],
+  ["97",0xF9],
+  ["A3",0xFA],
+  ["96",0xFB],
+  ["81",0xFC],
+  ["98",0xFF],
+  ["9F",0x192],
+  ["E2",0x393],
+  ["E9",0x398],
+  ["E4",0x3A3],
+  ["E8",0x3A6],
+  ["EA",0x3A9],
+  ["E0",0x3B1],
+  ["EB",0x3B4],
+  ["EE",0x3B5],
+  ["E3",0x3C0],
+  ["E5",0x3C3],
+  ["E7",0x3C4],
+  ["ED",0x3C6],
+  ["FC",0x207F],
+  ["9E",0x20A7],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["EC",0x221E],
+  ["EF",0x2229],
+  ["F7",0x2248],
+  ["F0",0x2261],
+  ["F3",0x2264],
+  ["F2",0x2265],
+  ["A9",0x2310],
+  ["F4",0x2320],
+  ["F5",0x2321],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm866-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm866-tbl.rb
new file mode 100644
index 0000000..95b9ee7
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm866-tbl.rb
@@ -0,0 +1,130 @@
+IBM866_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["FD",0xA4],
+  ["F8",0xB0],
+  ["FA",0xB7],
+  ["F0",0x401],
+  ["F2",0x404],
+  ["F4",0x407],
+  ["F6",0x40E],
+  ["80",0x410],
+  ["81",0x411],
+  ["82",0x412],
+  ["83",0x413],
+  ["84",0x414],
+  ["85",0x415],
+  ["86",0x416],
+  ["87",0x417],
+  ["88",0x418],
+  ["89",0x419],
+  ["8A",0x41A],
+  ["8B",0x41B],
+  ["8C",0x41C],
+  ["8D",0x41D],
+  ["8E",0x41E],
+  ["8F",0x41F],
+  ["90",0x420],
+  ["91",0x421],
+  ["92",0x422],
+  ["93",0x423],
+  ["94",0x424],
+  ["95",0x425],
+  ["96",0x426],
+  ["97",0x427],
+  ["98",0x428],
+  ["99",0x429],
+  ["9A",0x42A],
+  ["9B",0x42B],
+  ["9C",0x42C],
+  ["9D",0x42D],
+  ["9E",0x42E],
+  ["9F",0x42F],
+  ["A0",0x430],
+  ["A1",0x431],
+  ["A2",0x432],
+  ["A3",0x433],
+  ["A4",0x434],
+  ["A5",0x435],
+  ["A6",0x436],
+  ["A7",0x437],
+  ["A8",0x438],
+  ["A9",0x439],
+  ["AA",0x43A],
+  ["AB",0x43B],
+  ["AC",0x43C],
+  ["AD",0x43D],
+  ["AE",0x43E],
+  ["AF",0x43F],
+  ["E0",0x440],
+  ["E1",0x441],
+  ["E2",0x442],
+  ["E3",0x443],
+  ["E4",0x444],
+  ["E5",0x445],
+  ["E6",0x446],
+  ["E7",0x447],
+  ["E8",0x448],
+  ["E9",0x449],
+  ["EA",0x44A],
+  ["EB",0x44B],
+  ["EC",0x44C],
+  ["ED",0x44D],
+  ["EE",0x44E],
+  ["EF",0x44F],
+  ["F1",0x451],
+  ["F3",0x454],
+  ["F5",0x457],
+  ["F7",0x45E],
+  ["FC",0x2116],
+  ["F9",0x2219],
+  ["FB",0x221A],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["D5",0x2552],
+  ["D6",0x2553],
+  ["C9",0x2554],
+  ["B8",0x2555],
+  ["B7",0x2556],
+  ["BB",0x2557],
+  ["D4",0x2558],
+  ["D3",0x2559],
+  ["C8",0x255A],
+  ["BE",0x255B],
+  ["BD",0x255C],
+  ["BC",0x255D],
+  ["C6",0x255E],
+  ["C7",0x255F],
+  ["CC",0x2560],
+  ["B5",0x2561],
+  ["B6",0x2562],
+  ["B9",0x2563],
+  ["D1",0x2564],
+  ["D2",0x2565],
+  ["CB",0x2566],
+  ["CF",0x2567],
+  ["D0",0x2568],
+  ["CA",0x2569],
+  ["D8",0x256A],
+  ["D7",0x256B],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["DD",0x258C],
+  ["DE",0x2590],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/ibm869-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/ibm869-tbl.rb
new file mode 100644
index 0000000..437e41a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/ibm869-tbl.rb
@@ -0,0 +1,121 @@
+IBM869_TO_UCS_TBL = [
+  ["FF",0xA0],
+  ["9C",0xA3],
+  ["8A",0xA6],
+  ["F5",0xA7],
+  ["F9",0xA8],
+  ["97",0xA9],
+  ["AE",0xAB],
+  ["89",0xAC],
+  ["F0",0xAD],
+  ["F8",0xB0],
+  ["F1",0xB1],
+  ["99",0xB2],
+  ["9A",0xB3],
+  ["88",0xB7],
+  ["AF",0xBB],
+  ["AB",0xBD],
+  ["EF",0x384],
+  ["F7",0x385],
+  ["86",0x386],
+  ["8D",0x388],
+  ["8F",0x389],
+  ["90",0x38A],
+  ["92",0x38C],
+  ["95",0x38E],
+  ["98",0x38F],
+  ["A1",0x390],
+  ["A4",0x391],
+  ["A5",0x392],
+  ["A6",0x393],
+  ["A7",0x394],
+  ["A8",0x395],
+  ["A9",0x396],
+  ["AA",0x397],
+  ["AC",0x398],
+  ["AD",0x399],
+  ["B5",0x39A],
+  ["B6",0x39B],
+  ["B7",0x39C],
+  ["B8",0x39D],
+  ["BD",0x39E],
+  ["BE",0x39F],
+  ["C6",0x3A0],
+  ["C7",0x3A1],
+  ["CF",0x3A3],
+  ["D0",0x3A4],
+  ["D1",0x3A5],
+  ["D2",0x3A6],
+  ["D3",0x3A7],
+  ["D4",0x3A8],
+  ["D5",0x3A9],
+  ["91",0x3AA],
+  ["96",0x3AB],
+  ["9B",0x3AC],
+  ["9D",0x3AD],
+  ["9E",0x3AE],
+  ["9F",0x3AF],
+  ["FC",0x3B0],
+  ["D6",0x3B1],
+  ["D7",0x3B2],
+  ["D8",0x3B3],
+  ["DD",0x3B4],
+  ["DE",0x3B5],
+  ["E0",0x3B6],
+  ["E1",0x3B7],
+  ["E2",0x3B8],
+  ["E3",0x3B9],
+  ["E4",0x3BA],
+  ["E5",0x3BB],
+  ["E6",0x3BC],
+  ["E7",0x3BD],
+  ["E8",0x3BE],
+  ["E9",0x3BF],
+  ["EA",0x3C0],
+  ["EB",0x3C1],
+  ["ED",0x3C2],
+  ["EC",0x3C3],
+  ["EE",0x3C4],
+  ["F2",0x3C5],
+  ["F3",0x3C6],
+  ["F4",0x3C7],
+  ["F6",0x3C8],
+  ["FA",0x3C9],
+  ["A0",0x3CA],
+  ["FB",0x3CB],
+  ["A2",0x3CC],
+  ["A3",0x3CD],
+  ["FD",0x3CE],
+  ["8E",0x2015],
+  ["8B",0x2018],
+  ["8C",0x2019],
+  ["C4",0x2500],
+  ["B3",0x2502],
+  ["DA",0x250C],
+  ["BF",0x2510],
+  ["C0",0x2514],
+  ["D9",0x2518],
+  ["C3",0x251C],
+  ["B4",0x2524],
+  ["C2",0x252C],
+  ["C1",0x2534],
+  ["C5",0x253C],
+  ["CD",0x2550],
+  ["BA",0x2551],
+  ["C9",0x2554],
+  ["BB",0x2557],
+  ["C8",0x255A],
+  ["BC",0x255D],
+  ["CC",0x2560],
+  ["B9",0x2563],
+  ["CB",0x2566],
+  ["CA",0x2569],
+  ["CE",0x256C],
+  ["DF",0x2580],
+  ["DC",0x2584],
+  ["DB",0x2588],
+  ["B0",0x2591],
+  ["B1",0x2592],
+  ["B2",0x2593],
+  ["FE",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-1-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-1-tbl.rb
new file mode 100644
index 0000000..05397e6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-1-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_1_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0xAA],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BA",0xBA],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xBF],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0xD0],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0xDE],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0xF0],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0xFE],
+  ["FF",0xFF],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-10-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-10-tbl.rb
new file mode 100644
index 0000000..8104f52
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-10-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_10_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x104],
+  ["A2",0x112],
+  ["A3",0x122],
+  ["A4",0x12A],
+  ["A5",0x128],
+  ["A6",0x136],
+  ["A7",0xA7],
+  ["A8",0x13B],
+  ["A9",0x110],
+  ["AA",0x160],
+  ["AB",0x166],
+  ["AC",0x17D],
+  ["AD",0xAD],
+  ["AE",0x16A],
+  ["AF",0x14A],
+  ["B0",0xB0],
+  ["B1",0x105],
+  ["B2",0x113],
+  ["B3",0x123],
+  ["B4",0x12B],
+  ["B5",0x129],
+  ["B6",0x137],
+  ["B7",0xB7],
+  ["B8",0x13C],
+  ["B9",0x111],
+  ["BA",0x161],
+  ["BB",0x167],
+  ["BC",0x17E],
+  ["BD",0x2015],
+  ["BE",0x16B],
+  ["BF",0x14B],
+  ["C0",0x100],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0x12E],
+  ["C8",0x10C],
+  ["C9",0xC9],
+  ["CA",0x118],
+  ["CB",0xCB],
+  ["CC",0x116],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0xD0],
+  ["D1",0x145],
+  ["D2",0x14C],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0x168],
+  ["D8",0xD8],
+  ["D9",0x172],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0xDE],
+  ["DF",0xDF],
+  ["E0",0x101],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0x12F],
+  ["E8",0x10D],
+  ["E9",0xE9],
+  ["EA",0x119],
+  ["EB",0xEB],
+  ["EC",0x117],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0xF0],
+  ["F1",0x146],
+  ["F2",0x14D],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0x169],
+  ["F8",0xF8],
+  ["F9",0x173],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0xFE],
+  ["FF",0x138],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-11-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-11-tbl.rb
new file mode 100644
index 0000000..686631c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-11-tbl.rb
@@ -0,0 +1,90 @@
+ISO_8859_11_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xE01],
+  ["A2",0xE02],
+  ["A3",0xE03],
+  ["A4",0xE04],
+  ["A5",0xE05],
+  ["A6",0xE06],
+  ["A7",0xE07],
+  ["A8",0xE08],
+  ["A9",0xE09],
+  ["AA",0xE0A],
+  ["AB",0xE0B],
+  ["AC",0xE0C],
+  ["AD",0xE0D],
+  ["AE",0xE0E],
+  ["AF",0xE0F],
+  ["B0",0xE10],
+  ["B1",0xE11],
+  ["B2",0xE12],
+  ["B3",0xE13],
+  ["B4",0xE14],
+  ["B5",0xE15],
+  ["B6",0xE16],
+  ["B7",0xE17],
+  ["B8",0xE18],
+  ["B9",0xE19],
+  ["BA",0xE1A],
+  ["BB",0xE1B],
+  ["BC",0xE1C],
+  ["BD",0xE1D],
+  ["BE",0xE1E],
+  ["BF",0xE1F],
+  ["C0",0xE20],
+  ["C1",0xE21],
+  ["C2",0xE22],
+  ["C3",0xE23],
+  ["C4",0xE24],
+  ["C5",0xE25],
+  ["C6",0xE26],
+  ["C7",0xE27],
+  ["C8",0xE28],
+  ["C9",0xE29],
+  ["CA",0xE2A],
+  ["CB",0xE2B],
+  ["CC",0xE2C],
+  ["CD",0xE2D],
+  ["CE",0xE2E],
+  ["CF",0xE2F],
+  ["D0",0xE30],
+  ["D1",0xE31],
+  ["D2",0xE32],
+  ["D3",0xE33],
+  ["D4",0xE34],
+  ["D5",0xE35],
+  ["D6",0xE36],
+  ["D7",0xE37],
+  ["D8",0xE38],
+  ["D9",0xE39],
+  ["DA",0xE3A],
+  ["DF",0xE3F],
+  ["E0",0xE40],
+  ["E1",0xE41],
+  ["E2",0xE42],
+  ["E3",0xE43],
+  ["E4",0xE44],
+  ["E5",0xE45],
+  ["E6",0xE46],
+  ["E7",0xE47],
+  ["E8",0xE48],
+  ["E9",0xE49],
+  ["EA",0xE4A],
+  ["EB",0xE4B],
+  ["EC",0xE4C],
+  ["ED",0xE4D],
+  ["EE",0xE4E],
+  ["EF",0xE4F],
+  ["F0",0xE50],
+  ["F1",0xE51],
+  ["F2",0xE52],
+  ["F3",0xE53],
+  ["F4",0xE54],
+  ["F5",0xE55],
+  ["F6",0xE56],
+  ["F7",0xE57],
+  ["F8",0xE58],
+  ["F9",0xE59],
+  ["FA",0xE5A],
+  ["FB",0xE5B],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-13-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-13-tbl.rb
new file mode 100644
index 0000000..832d012
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-13-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_13_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x201D],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0x201E],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xD8],
+  ["A9",0xA9],
+  ["AA",0x156],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xC6],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0x201C],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xF8],
+  ["B9",0xB9],
+  ["BA",0x157],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xE6],
+  ["C0",0x104],
+  ["C1",0x12E],
+  ["C2",0x100],
+  ["C3",0x106],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0x118],
+  ["C7",0x112],
+  ["C8",0x10C],
+  ["C9",0xC9],
+  ["CA",0x179],
+  ["CB",0x116],
+  ["CC",0x122],
+  ["CD",0x136],
+  ["CE",0x12A],
+  ["CF",0x13B],
+  ["D0",0x160],
+  ["D1",0x143],
+  ["D2",0x145],
+  ["D3",0xD3],
+  ["D4",0x14C],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0x172],
+  ["D9",0x141],
+  ["DA",0x15A],
+  ["DB",0x16A],
+  ["DC",0xDC],
+  ["DD",0x17B],
+  ["DE",0x17D],
+  ["DF",0xDF],
+  ["E0",0x105],
+  ["E1",0x12F],
+  ["E2",0x101],
+  ["E3",0x107],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0x119],
+  ["E7",0x113],
+  ["E8",0x10D],
+  ["E9",0xE9],
+  ["EA",0x17A],
+  ["EB",0x117],
+  ["EC",0x123],
+  ["ED",0x137],
+  ["EE",0x12B],
+  ["EF",0x13C],
+  ["F0",0x161],
+  ["F1",0x144],
+  ["F2",0x146],
+  ["F3",0xF3],
+  ["F4",0x14D],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0x173],
+  ["F9",0x142],
+  ["FA",0x15B],
+  ["FB",0x16B],
+  ["FC",0xFC],
+  ["FD",0x17C],
+  ["FE",0x17E],
+  ["FF",0x2019],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-14-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-14-tbl.rb
new file mode 100644
index 0000000..db5c139
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-14-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_14_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x1E02],
+  ["A2",0x1E03],
+  ["A3",0xA3],
+  ["A4",0x10A],
+  ["A5",0x10B],
+  ["A6",0x1E0A],
+  ["A7",0xA7],
+  ["A8",0x1E80],
+  ["A9",0xA9],
+  ["AA",0x1E82],
+  ["AB",0x1E0B],
+  ["AC",0x1EF2],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0x178],
+  ["B0",0x1E1E],
+  ["B1",0x1E1F],
+  ["B2",0x120],
+  ["B3",0x121],
+  ["B4",0x1E40],
+  ["B5",0x1E41],
+  ["B6",0xB6],
+  ["B7",0x1E56],
+  ["B8",0x1E81],
+  ["B9",0x1E57],
+  ["BA",0x1E83],
+  ["BB",0x1E60],
+  ["BC",0x1EF3],
+  ["BD",0x1E84],
+  ["BE",0x1E85],
+  ["BF",0x1E61],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0x174],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0x1E6A],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0x176],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0x175],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0x1E6B],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0x177],
+  ["FF",0xFF],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-15-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-15-tbl.rb
new file mode 100644
index 0000000..54d952a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-15-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_15_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0x20AC],
+  ["A5",0xA5],
+  ["A6",0x160],
+  ["A7",0xA7],
+  ["A8",0x161],
+  ["A9",0xA9],
+  ["AA",0xAA],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0x17D],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0x17E],
+  ["B9",0xB9],
+  ["BA",0xBA],
+  ["BB",0xBB],
+  ["BC",0x152],
+  ["BD",0x153],
+  ["BE",0x178],
+  ["BF",0xBF],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0xD0],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0xDE],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0xF0],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0xFE],
+  ["FF",0xFF],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-2-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-2-tbl.rb
new file mode 100644
index 0000000..adf2bb1
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-2-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_2_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x104],
+  ["A2",0x2D8],
+  ["A3",0x141],
+  ["A4",0xA4],
+  ["A5",0x13D],
+  ["A6",0x15A],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0x160],
+  ["AA",0x15E],
+  ["AB",0x164],
+  ["AC",0x179],
+  ["AD",0xAD],
+  ["AE",0x17D],
+  ["AF",0x17B],
+  ["B0",0xB0],
+  ["B1",0x105],
+  ["B2",0x2DB],
+  ["B3",0x142],
+  ["B4",0xB4],
+  ["B5",0x13E],
+  ["B6",0x15B],
+  ["B7",0x2C7],
+  ["B8",0xB8],
+  ["B9",0x161],
+  ["BA",0x15F],
+  ["BB",0x165],
+  ["BC",0x17A],
+  ["BD",0x2DD],
+  ["BE",0x17E],
+  ["BF",0x17C],
+  ["C0",0x154],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0x102],
+  ["C4",0xC4],
+  ["C5",0x139],
+  ["C6",0x106],
+  ["C7",0xC7],
+  ["C8",0x10C],
+  ["C9",0xC9],
+  ["CA",0x118],
+  ["CB",0xCB],
+  ["CC",0x11A],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0x10E],
+  ["D0",0x110],
+  ["D1",0x143],
+  ["D2",0x147],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0x150],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0x158],
+  ["D9",0x16E],
+  ["DA",0xDA],
+  ["DB",0x170],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0x162],
+  ["DF",0xDF],
+  ["E0",0x155],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0x103],
+  ["E4",0xE4],
+  ["E5",0x13A],
+  ["E6",0x107],
+  ["E7",0xE7],
+  ["E8",0x10D],
+  ["E9",0xE9],
+  ["EA",0x119],
+  ["EB",0xEB],
+  ["EC",0x11B],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0x10F],
+  ["F0",0x111],
+  ["F1",0x144],
+  ["F2",0x148],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0x151],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0x159],
+  ["F9",0x16F],
+  ["FA",0xFA],
+  ["FB",0x171],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0x163],
+  ["FF",0x2D9],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-3-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-3-tbl.rb
new file mode 100644
index 0000000..4751ee0
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-3-tbl.rb
@@ -0,0 +1,91 @@
+ISO_8859_3_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x126],
+  ["A2",0x2D8],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A6",0x124],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0x130],
+  ["AA",0x15E],
+  ["AB",0x11E],
+  ["AC",0x134],
+  ["AD",0xAD],
+  ["AF",0x17B],
+  ["B0",0xB0],
+  ["B1",0x127],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0x125],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0x131],
+  ["BA",0x15F],
+  ["BB",0x11F],
+  ["BC",0x135],
+  ["BD",0xBD],
+  ["BF",0x17C],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C4",0xC4],
+  ["C5",0x10A],
+  ["C6",0x108],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0x120],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0x11C],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0x16C],
+  ["DE",0x15C],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E4",0xE4],
+  ["E5",0x10B],
+  ["E6",0x109],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0x121],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0x11D],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0x16D],
+  ["FE",0x15D],
+  ["FF",0x2D9],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-4-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-4-tbl.rb
new file mode 100644
index 0000000..ff13883
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-4-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_4_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x104],
+  ["A2",0x138],
+  ["A3",0x156],
+  ["A4",0xA4],
+  ["A5",0x128],
+  ["A6",0x13B],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0x160],
+  ["AA",0x112],
+  ["AB",0x122],
+  ["AC",0x166],
+  ["AD",0xAD],
+  ["AE",0x17D],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0x105],
+  ["B2",0x2DB],
+  ["B3",0x157],
+  ["B4",0xB4],
+  ["B5",0x129],
+  ["B6",0x13C],
+  ["B7",0x2C7],
+  ["B8",0xB8],
+  ["B9",0x161],
+  ["BA",0x113],
+  ["BB",0x123],
+  ["BC",0x167],
+  ["BD",0x14A],
+  ["BE",0x17E],
+  ["BF",0x14B],
+  ["C0",0x100],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0x12E],
+  ["C8",0x10C],
+  ["C9",0xC9],
+  ["CA",0x118],
+  ["CB",0xCB],
+  ["CC",0x116],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0x12A],
+  ["D0",0x110],
+  ["D1",0x145],
+  ["D2",0x14C],
+  ["D3",0x136],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0x172],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0x168],
+  ["DE",0x16A],
+  ["DF",0xDF],
+  ["E0",0x101],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0x12F],
+  ["E8",0x10D],
+  ["E9",0xE9],
+  ["EA",0x119],
+  ["EB",0xEB],
+  ["EC",0x117],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0x12B],
+  ["F0",0x111],
+  ["F1",0x146],
+  ["F2",0x14D],
+  ["F3",0x137],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0x173],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0x169],
+  ["FE",0x16B],
+  ["FF",0x2D9],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-5-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-5-tbl.rb
new file mode 100644
index 0000000..b0ef366
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-5-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_5_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x401],
+  ["A2",0x402],
+  ["A3",0x403],
+  ["A4",0x404],
+  ["A5",0x405],
+  ["A6",0x406],
+  ["A7",0x407],
+  ["A8",0x408],
+  ["A9",0x409],
+  ["AA",0x40A],
+  ["AB",0x40B],
+  ["AC",0x40C],
+  ["AD",0xAD],
+  ["AE",0x40E],
+  ["AF",0x40F],
+  ["B0",0x410],
+  ["B1",0x411],
+  ["B2",0x412],
+  ["B3",0x413],
+  ["B4",0x414],
+  ["B5",0x415],
+  ["B6",0x416],
+  ["B7",0x417],
+  ["B8",0x418],
+  ["B9",0x419],
+  ["BA",0x41A],
+  ["BB",0x41B],
+  ["BC",0x41C],
+  ["BD",0x41D],
+  ["BE",0x41E],
+  ["BF",0x41F],
+  ["C0",0x420],
+  ["C1",0x421],
+  ["C2",0x422],
+  ["C3",0x423],
+  ["C4",0x424],
+  ["C5",0x425],
+  ["C6",0x426],
+  ["C7",0x427],
+  ["C8",0x428],
+  ["C9",0x429],
+  ["CA",0x42A],
+  ["CB",0x42B],
+  ["CC",0x42C],
+  ["CD",0x42D],
+  ["CE",0x42E],
+  ["CF",0x42F],
+  ["D0",0x430],
+  ["D1",0x431],
+  ["D2",0x432],
+  ["D3",0x433],
+  ["D4",0x434],
+  ["D5",0x435],
+  ["D6",0x436],
+  ["D7",0x437],
+  ["D8",0x438],
+  ["D9",0x439],
+  ["DA",0x43A],
+  ["DB",0x43B],
+  ["DC",0x43C],
+  ["DD",0x43D],
+  ["DE",0x43E],
+  ["DF",0x43F],
+  ["E0",0x440],
+  ["E1",0x441],
+  ["E2",0x442],
+  ["E3",0x443],
+  ["E4",0x444],
+  ["E5",0x445],
+  ["E6",0x446],
+  ["E7",0x447],
+  ["E8",0x448],
+  ["E9",0x449],
+  ["EA",0x44A],
+  ["EB",0x44B],
+  ["EC",0x44C],
+  ["ED",0x44D],
+  ["EE",0x44E],
+  ["EF",0x44F],
+  ["F0",0x2116],
+  ["F1",0x451],
+  ["F2",0x452],
+  ["F3",0x453],
+  ["F4",0x454],
+  ["F5",0x455],
+  ["F6",0x456],
+  ["F7",0x457],
+  ["F8",0x458],
+  ["F9",0x459],
+  ["FA",0x45A],
+  ["FB",0x45B],
+  ["FC",0x45C],
+  ["FD",0xA7],
+  ["FE",0x45E],
+  ["FF",0x45F],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-6-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-6-tbl.rb
new file mode 100644
index 0000000..d387372
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-6-tbl.rb
@@ -0,0 +1,53 @@
+ISO_8859_6_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A4",0xA4],
+  ["AC",0x60C],
+  ["AD",0xAD],
+  ["BB",0x61B],
+  ["BF",0x61F],
+  ["C1",0x621],
+  ["C2",0x622],
+  ["C3",0x623],
+  ["C4",0x624],
+  ["C5",0x625],
+  ["C6",0x626],
+  ["C7",0x627],
+  ["C8",0x628],
+  ["C9",0x629],
+  ["CA",0x62A],
+  ["CB",0x62B],
+  ["CC",0x62C],
+  ["CD",0x62D],
+  ["CE",0x62E],
+  ["CF",0x62F],
+  ["D0",0x630],
+  ["D1",0x631],
+  ["D2",0x632],
+  ["D3",0x633],
+  ["D4",0x634],
+  ["D5",0x635],
+  ["D6",0x636],
+  ["D7",0x637],
+  ["D8",0x638],
+  ["D9",0x639],
+  ["DA",0x63A],
+  ["E0",0x640],
+  ["E1",0x641],
+  ["E2",0x642],
+  ["E3",0x643],
+  ["E4",0x644],
+  ["E5",0x645],
+  ["E6",0x646],
+  ["E7",0x647],
+  ["E8",0x648],
+  ["E9",0x649],
+  ["EA",0x64A],
+  ["EB",0x64B],
+  ["EC",0x64C],
+  ["ED",0x64D],
+  ["EE",0x64E],
+  ["EF",0x64F],
+  ["F0",0x650],
+  ["F1",0x651],
+  ["F2",0x652],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-7-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-7-tbl.rb
new file mode 100644
index 0000000..4ebce5c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-7-tbl.rb
@@ -0,0 +1,95 @@
+ISO_8859_7_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0x2018],
+  ["A2",0x2019],
+  ["A3",0xA3],
+  ["A4",0x20AC],
+  ["A5",0x20AF],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0x37A],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AF",0x2015],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0x384],
+  ["B5",0x385],
+  ["B6",0x386],
+  ["B7",0xB7],
+  ["B8",0x388],
+  ["B9",0x389],
+  ["BA",0x38A],
+  ["BB",0xBB],
+  ["BC",0x38C],
+  ["BD",0xBD],
+  ["BE",0x38E],
+  ["BF",0x38F],
+  ["C0",0x390],
+  ["C1",0x391],
+  ["C2",0x392],
+  ["C3",0x393],
+  ["C4",0x394],
+  ["C5",0x395],
+  ["C6",0x396],
+  ["C7",0x397],
+  ["C8",0x398],
+  ["C9",0x399],
+  ["CA",0x39A],
+  ["CB",0x39B],
+  ["CC",0x39C],
+  ["CD",0x39D],
+  ["CE",0x39E],
+  ["CF",0x39F],
+  ["D0",0x3A0],
+  ["D1",0x3A1],
+  ["D3",0x3A3],
+  ["D4",0x3A4],
+  ["D5",0x3A5],
+  ["D6",0x3A6],
+  ["D7",0x3A7],
+  ["D8",0x3A8],
+  ["D9",0x3A9],
+  ["DA",0x3AA],
+  ["DB",0x3AB],
+  ["DC",0x3AC],
+  ["DD",0x3AD],
+  ["DE",0x3AE],
+  ["DF",0x3AF],
+  ["E0",0x3B0],
+  ["E1",0x3B1],
+  ["E2",0x3B2],
+  ["E3",0x3B3],
+  ["E4",0x3B4],
+  ["E5",0x3B5],
+  ["E6",0x3B6],
+  ["E7",0x3B7],
+  ["E8",0x3B8],
+  ["E9",0x3B9],
+  ["EA",0x3BA],
+  ["EB",0x3BB],
+  ["EC",0x3BC],
+  ["ED",0x3BD],
+  ["EE",0x3BE],
+  ["EF",0x3BF],
+  ["F0",0x3C0],
+  ["F1",0x3C1],
+  ["F2",0x3C2],
+  ["F3",0x3C3],
+  ["F4",0x3C4],
+  ["F5",0x3C5],
+  ["F6",0x3C6],
+  ["F7",0x3C7],
+  ["F8",0x3C8],
+  ["F9",0x3C9],
+  ["FA",0x3CA],
+  ["FB",0x3CB],
+  ["FC",0x3CC],
+  ["FD",0x3CD],
+  ["FE",0x3CE],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-8-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-8-tbl.rb
new file mode 100644
index 0000000..d0806f4
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-8-tbl.rb
@@ -0,0 +1,62 @@
+ISO_8859_8_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0xD7],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BA",0xF7],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["DF",0x2017],
+  ["E0",0x5D0],
+  ["E1",0x5D1],
+  ["E2",0x5D2],
+  ["E3",0x5D3],
+  ["E4",0x5D4],
+  ["E5",0x5D5],
+  ["E6",0x5D6],
+  ["E7",0x5D7],
+  ["E8",0x5D8],
+  ["E9",0x5D9],
+  ["EA",0x5DA],
+  ["EB",0x5DB],
+  ["EC",0x5DC],
+  ["ED",0x5DD],
+  ["EE",0x5DE],
+  ["EF",0x5DF],
+  ["F0",0x5E0],
+  ["F1",0x5E1],
+  ["F2",0x5E2],
+  ["F3",0x5E3],
+  ["F4",0x5E4],
+  ["F5",0x5E5],
+  ["F6",0x5E6],
+  ["F7",0x5E7],
+  ["F8",0x5E8],
+  ["F9",0x5E9],
+  ["FA",0x5EA],
+  ["FD",0x200E],
+  ["FE",0x200F],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-9-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-9-tbl.rb
new file mode 100644
index 0000000..0cd92d6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso-8859-9-tbl.rb
@@ -0,0 +1,98 @@
+ISO_8859_9_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0xAA],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BA",0xBA],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xBF],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0x11E],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0x130],
+  ["DE",0x15E],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0x11F],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0x131],
+  ["FE",0x15F],
+  ["FF",0xFF],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso2022.c b/lib/ruby-1.9.1-rc1/enc/trans/iso2022.c
new file mode 100644
index 0000000..60411e5
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso2022.c
@@ -0,0 +1,383 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="iso2022.trans", len=6668, checksum=25414 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+iso2022_byte_array[751] = {
+#define iso2022jp_decoder_1B_24_offsets 0
+64, 66,
+      1,  0,  1,
+
+#define iso2022jp_decoder_1B_28_offsets 5
+66, 74,
+      1,  0,  0,  0,  0,  0,  0,  0,    1,
+
+#define iso2022jp_decoder_1B_offsets 16
+36, 40,
+      1,  0,  0,  0,  2,
+
+#define iso2022jp_decoder_offsets 23
+0, 127,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  1,  1,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  2,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define iso2022jp_decoder_jisx0208_rest_offsets 153
+33, 126,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define iso2022jp_encoder_90_A1_offsets 249
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define iso2022jp_encoder_offsets 345
+0, 146,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  1,  1,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  1,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  2,
+
+#define eucjp_to_stateless_iso2022jp_offsets 494
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  1,  1,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  1,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  3,  4,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,
+
+};
+static const unsigned int
+iso2022_word_array[50] = {
+#define iso2022jp_decoder_1B_24_infos WORDINDEX2INFO(0)
+     INVALID,   FUNso,
+
+#define iso2022jp_decoder_1B_24 WORDINDEX2INFO(2)
+    iso2022jp_decoder_1B_24_offsets,
+    iso2022jp_decoder_1B_24_infos,
+
+#define iso2022jp_decoder_1B_28 WORDINDEX2INFO(4)
+    iso2022jp_decoder_1B_28_offsets,
+    iso2022jp_decoder_1B_24_infos,
+
+#define iso2022jp_decoder_1B_infos WORDINDEX2INFO(6)
+                     INVALID, iso2022jp_decoder_1B_24,
+     iso2022jp_decoder_1B_28,
+
+#define iso2022jp_decoder_1B WORDINDEX2INFO(9)
+    iso2022jp_decoder_1B_offsets,
+    iso2022jp_decoder_1B_infos,
+
+#define iso2022jp_decoder_infos WORDINDEX2INFO(11)
+                    FUNsi,              INVALID,
+     iso2022jp_decoder_1B,
+
+#define iso2022jp_decoder WORDINDEX2INFO(14)
+    iso2022jp_decoder_offsets,
+    iso2022jp_decoder_infos,
+
+#define iso2022jp_decoder_jisx0208_rest WORDINDEX2INFO(16)
+    iso2022jp_decoder_jisx0208_rest_offsets,
+    iso2022jp_decoder_1B_24_infos,
+
+#define iso2022jp_encoder_90_A1 WORDINDEX2INFO(18)
+    iso2022jp_encoder_90_A1_offsets,
+    iso2022jp_decoder_1B_24_infos,
+
+#define iso2022jp_encoder_90_infos WORDINDEX2INFO(20)
+                     INVALID, iso2022jp_encoder_90_A1,
+
+#define iso2022jp_encoder_90 WORDINDEX2INFO(22)
+    iso2022jp_encoder_90_A1_offsets,
+    iso2022jp_encoder_90_infos,
+
+#define iso2022jp_encoder_infos WORDINDEX2INFO(24)
+                    FUNso,              INVALID,
+     iso2022jp_encoder_90,
+
+#define iso2022jp_encoder WORDINDEX2INFO(27)
+    iso2022jp_encoder_offsets,
+    iso2022jp_encoder_infos,
+
+#define stateless_iso2022jp_to_eucjp_infos WORDINDEX2INFO(29)
+                    NOMAP,              INVALID,
+     iso2022jp_encoder_90,
+
+#define stateless_iso2022jp_to_eucjp WORDINDEX2INFO(32)
+    iso2022jp_encoder_offsets,
+    stateless_iso2022jp_to_eucjp_infos,
+
+#define eucjp_to_stateless_iso2022jp_8E_infos WORDINDEX2INFO(34)
+     INVALID,   UNDEF,
+
+#define eucjp_to_stateless_iso2022jp_8E WORDINDEX2INFO(36)
+    iso2022jp_encoder_90_A1_offsets,
+    eucjp_to_stateless_iso2022jp_8E_infos,
+
+#define eucjp_to_stateless_iso2022jp_8F_infos WORDINDEX2INFO(38)
+                             INVALID, eucjp_to_stateless_iso2022jp_8E,
+
+#define eucjp_to_stateless_iso2022jp_8F WORDINDEX2INFO(40)
+    iso2022jp_encoder_90_A1_offsets,
+    eucjp_to_stateless_iso2022jp_8F_infos,
+
+#define eucjp_to_stateless_iso2022jp_infos WORDINDEX2INFO(42)
+                               NOMAP,                           UNDEF,
+                             INVALID, eucjp_to_stateless_iso2022jp_8E,
+     eucjp_to_stateless_iso2022jp_8F,         iso2022jp_encoder_90_A1,
+
+#define eucjp_to_stateless_iso2022jp WORDINDEX2INFO(48)
+    eucjp_to_stateless_iso2022jp_offsets,
+    eucjp_to_stateless_iso2022jp_infos,
+
+};
+#define TRANSCODE_TABLE_INFO iso2022_byte_array, 751, iso2022_word_array, 50, sizeof(unsigned int)
+
+
+#define G0_ASCII 0
+/* ignore JIS X 0201 latin */
+#define G0_JISX0208_1978 1
+#define G0_JISX0208_1983 2
+
+#define EMACS_MULE_LEADING_CODE_JISX0208_1978   0220
+#define EMACS_MULE_LEADING_CODE_JISX0208_1983   0222
+
+static int
+iso2022jp_init(void *statep)
+{
+    unsigned char *sp = statep;
+    *sp = G0_ASCII;
+    return 0;
+}
+
+static VALUE
+fun_si_iso2022jp_decoder(void *statep, const unsigned char *s, size_t l)
+{
+    unsigned char *sp = statep;
+    if (*sp == G0_ASCII)
+        return (VALUE)NOMAP;
+    else if (0x21 <= s[0] && s[0] <= 0x7e)
+        return (VALUE)iso2022jp_decoder_jisx0208_rest;
+    else
+        return (VALUE)INVALID;
+}
+
+static ssize_t
+fun_so_iso2022jp_decoder(void *statep, const unsigned char *s, size_t l, unsigned char* o, size_t osize)
+{
+    unsigned char *sp = statep;
+    if (s[0] == 0x1b) {
+        if (s[1] == '(') {
+            switch (s[l-1]) {
+              case 'B':
+              case 'J':
+                *sp = G0_ASCII;
+                break;
+            }
+        }
+        else {
+            switch (s[l-1]) {
+              case '@':
+                *sp = G0_JISX0208_1978;
+                break;
+
+              case 'B':
+                *sp = G0_JISX0208_1983;
+                break;
+            }
+        }
+        return 0;
+    }
+    else {
+        if (*sp == G0_JISX0208_1978)
+            o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1978;
+        else
+            o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1983;
+        o[1] = s[0] | 0x80;
+        o[2] = s[1] | 0x80;
+        return 3;
+    }
+}
+
+static const rb_transcoder
+rb_iso2022jp_decoder = {
+    "ISO-2022-JP", "stateless-ISO-2022-JP", iso2022jp_decoder,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */
+    NULL, fun_si_iso2022jp_decoder, NULL, fun_so_iso2022jp_decoder
+};
+
+static ssize_t
+fun_so_iso2022jp_encoder(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    unsigned char *output0 = o;
+    int newstate;
+
+    if (l == 1)
+        newstate = G0_ASCII;
+    else if (s[0] == EMACS_MULE_LEADING_CODE_JISX0208_1978)
+        newstate = G0_JISX0208_1978;
+    else
+        newstate = G0_JISX0208_1983;
+
+    if (*sp != newstate) {
+        if (newstate == G0_ASCII) {
+            *o++ = 0x1b;
+            *o++ = '(';
+            *o++ = 'B';
+        }
+        else if (newstate == G0_JISX0208_1978) {
+            *o++ = 0x1b;
+            *o++ = '$';
+            *o++ = '@';
+        }
+        else {
+            *o++ = 0x1b;
+            *o++ = '$';
+            *o++ = 'B';
+        }
+        *sp = newstate;
+    }
+
+    if (l == 1) {
+        *o++ = s[0] & 0x7f;
+    }
+    else {
+        *o++ = s[1] & 0x7f;
+        *o++ = s[2] & 0x7f;
+    }
+
+    return o - output0;
+}
+
+static ssize_t
+iso2022jp_encoder_reset_sequence_size(void *statep)
+{
+    unsigned char *sp = statep;
+    if (*sp != G0_ASCII)
+        return 3;
+    return 0;
+}
+
+static ssize_t
+finish_iso2022jp_encoder(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    unsigned char *output0 = o;
+
+    if (*sp == G0_ASCII)
+        return 0;
+
+    *o++ = 0x1b;
+    *o++ = '(';
+    *o++ = 'B';
+    *sp = G0_ASCII;
+
+    return o - output0;
+}
+
+static const rb_transcoder
+rb_iso2022jp_encoder = {
+    "stateless-ISO-2022-JP", "ISO-2022-JP", iso2022jp_encoder,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    5, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_iso2022jp_encoder,
+    finish_iso2022jp_encoder,
+    iso2022jp_encoder_reset_sequence_size, finish_iso2022jp_encoder
+};
+
+static ssize_t
+fun_so_stateless_iso2022jp_to_eucjp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = s[1];
+    o[1] = s[2];
+    return 2;
+}
+
+static const rb_transcoder
+rb_stateless_iso2022jp_to_eucjp = {
+    "stateless-ISO-2022-JP", "EUC-JP", stateless_iso2022jp_to_eucjp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_stateless_iso2022jp_to_eucjp,
+};
+
+static ssize_t
+fun_so_eucjp_to_stateless_iso2022jp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1983;
+    o[1] = s[0];
+    o[2] = s[1];
+    return 3;
+}
+
+static const rb_transcoder
+rb_eucjp_to_stateless_iso2022jp = {
+    "EUC-JP", "stateless-ISO-2022-JP", eucjp_to_stateless_iso2022jp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_eucjp_to_stateless_iso2022jp,
+};
+
+void
+Init_iso2022(void)
+{
+    rb_register_transcoder(&rb_iso2022jp_decoder);
+    rb_register_transcoder(&rb_iso2022jp_encoder);
+    rb_register_transcoder(&rb_stateless_iso2022jp_to_eucjp);
+    rb_register_transcoder(&rb_eucjp_to_stateless_iso2022jp);
+}
+
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/iso2022.trans b/lib/ruby-1.9.1-rc1/enc/trans/iso2022.trans
new file mode 100644
index 0000000..7dc2c19
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/iso2022.trans
@@ -0,0 +1,255 @@
+#include "transcode_data.h"
+
+<%
+  map = {
+    "1b2842" => :func_so,       # designate US-ASCII to G0.             "ESC ( B"
+    "1b284a" => :func_so,       # designate JIS X 0201 latin to G0.     "ESC ( J"
+    "1b2440" => :func_so,       # designate JIS X 0208 1978 to G0.      "ESC $ @"
+    "1b2442" => :func_so,       # designate JIS X 0208 1983 to G0.      "ESC $ B"
+    "{00-0d,10-1a,1c-7f}" => :func_si,
+  }
+  transcode_generate_node(ActionMap.parse(map), "iso2022jp_decoder")
+
+  map_jisx0208_rest = {
+    "{21-7e}" => :func_so
+  }
+  transcode_generate_node(ActionMap.parse(map_jisx0208_rest), "iso2022jp_decoder_jisx0208_rest")
+
+  map = {
+    "{00-0d,10-1a,1c-7f}" => :func_so,
+    "90{a1-fe}{a1-fe}" => :func_so,
+    "92{a1-fe}{a1-fe}" => :func_so,
+  }
+  transcode_generate_node(ActionMap.parse(map), "iso2022jp_encoder")
+
+  map = {
+    "{00-0d,10-1a,1c-7f}" => :nomap,
+    "90{a1-fe}{a1-fe}" => :func_so,
+    "92{a1-fe}{a1-fe}" => :func_so,
+  }
+  transcode_generate_node(ActionMap.parse(map), "stateless_iso2022jp_to_eucjp")
+
+  map = {
+    "{0e,0f,1b}" => :undef,
+    "{00-0d,10-1a,1c-7f}" => :nomap,
+    "{a1-fe}{a1-fe}" => :func_so,
+    "8e{a1-fe}" => :undef,
+    "8f{a1-fe}{a1-fe}" => :undef,
+  }
+  transcode_generate_node(ActionMap.parse(map), "eucjp_to_stateless_iso2022jp")
+
+%>
+
+<%= transcode_generated_code %>
+
+#define G0_ASCII 0
+/* ignore JIS X 0201 latin */
+#define G0_JISX0208_1978 1
+#define G0_JISX0208_1983 2
+
+#define EMACS_MULE_LEADING_CODE_JISX0208_1978   0220
+#define EMACS_MULE_LEADING_CODE_JISX0208_1983   0222
+
+static int
+iso2022jp_init(void *statep)
+{
+    unsigned char *sp = statep;
+    *sp = G0_ASCII;
+    return 0;
+}
+
+static VALUE
+fun_si_iso2022jp_decoder(void *statep, const unsigned char *s, size_t l)
+{
+    unsigned char *sp = statep;
+    if (*sp == G0_ASCII)
+        return (VALUE)NOMAP;
+    else if (0x21 <= s[0] && s[0] <= 0x7e)
+        return (VALUE)iso2022jp_decoder_jisx0208_rest;
+    else
+        return (VALUE)INVALID;
+}
+
+static ssize_t
+fun_so_iso2022jp_decoder(void *statep, const unsigned char *s, size_t l, unsigned char* o, size_t osize)
+{
+    unsigned char *sp = statep;
+    if (s[0] == 0x1b) {
+        if (s[1] == '(') {
+            switch (s[l-1]) {
+              case 'B':
+              case 'J':
+                *sp = G0_ASCII;
+                break;
+            }
+        }
+        else {
+            switch (s[l-1]) {
+              case '@':
+                *sp = G0_JISX0208_1978;
+                break;
+
+              case 'B':
+                *sp = G0_JISX0208_1983;
+                break;
+            }
+        }
+        return 0;
+    }
+    else {
+        if (*sp == G0_JISX0208_1978)
+            o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1978;
+        else
+            o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1983;
+        o[1] = s[0] | 0x80;
+        o[2] = s[1] | 0x80;
+        return 3;
+    }
+}
+
+static const rb_transcoder
+rb_iso2022jp_decoder = {
+    "ISO-2022-JP", "stateless-ISO-2022-JP", iso2022jp_decoder,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */
+    NULL, fun_si_iso2022jp_decoder, NULL, fun_so_iso2022jp_decoder
+};
+
+static ssize_t
+fun_so_iso2022jp_encoder(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    unsigned char *output0 = o;
+    int newstate;
+
+    if (l == 1)
+        newstate = G0_ASCII;
+    else if (s[0] == EMACS_MULE_LEADING_CODE_JISX0208_1978)
+        newstate = G0_JISX0208_1978;
+    else
+        newstate = G0_JISX0208_1983;
+
+    if (*sp != newstate) {
+        if (newstate == G0_ASCII) {
+            *o++ = 0x1b;
+            *o++ = '(';
+            *o++ = 'B';
+        }
+        else if (newstate == G0_JISX0208_1978) {
+            *o++ = 0x1b;
+            *o++ = '$';
+            *o++ = '@';
+        }
+        else {
+            *o++ = 0x1b;
+            *o++ = '$';
+            *o++ = 'B';
+        }
+        *sp = newstate;
+    }
+
+    if (l == 1) {
+        *o++ = s[0] & 0x7f;
+    }
+    else {
+        *o++ = s[1] & 0x7f;
+        *o++ = s[2] & 0x7f;
+    }
+
+    return o - output0;
+}
+
+static ssize_t
+iso2022jp_encoder_reset_sequence_size(void *statep)
+{
+    unsigned char *sp = statep;
+    if (*sp != G0_ASCII)
+        return 3;
+    return 0;
+}
+
+static ssize_t
+finish_iso2022jp_encoder(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    unsigned char *output0 = o;
+
+    if (*sp == G0_ASCII)
+        return 0;
+
+    *o++ = 0x1b;
+    *o++ = '(';
+    *o++ = 'B';
+    *sp = G0_ASCII;
+
+    return o - output0;
+}
+
+static const rb_transcoder
+rb_iso2022jp_encoder = {
+    "stateless-ISO-2022-JP", "ISO-2022-JP", iso2022jp_encoder,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    5, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    1, iso2022jp_init, iso2022jp_init, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_iso2022jp_encoder,
+    finish_iso2022jp_encoder,
+    iso2022jp_encoder_reset_sequence_size, finish_iso2022jp_encoder
+};
+
+static ssize_t
+fun_so_stateless_iso2022jp_to_eucjp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = s[1];
+    o[1] = s[2];
+    return 2;
+}
+
+static const rb_transcoder
+rb_stateless_iso2022jp_to_eucjp = {
+    "stateless-ISO-2022-JP", "EUC-JP", stateless_iso2022jp_to_eucjp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_stateless_iso2022jp_to_eucjp,
+};
+
+static ssize_t
+fun_so_eucjp_to_stateless_iso2022jp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = EMACS_MULE_LEADING_CODE_JISX0208_1983;
+    o[1] = s[0];
+    o[2] = s[1];
+    return 3;
+}
+
+static const rb_transcoder
+rb_eucjp_to_stateless_iso2022jp = {
+    "EUC-JP", "stateless-ISO-2022-JP", eucjp_to_stateless_iso2022jp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_eucjp_to_stateless_iso2022jp,
+};
+
+void
+Init_iso2022(void)
+{
+    rb_register_transcoder(&rb_iso2022jp_decoder);
+    rb_register_transcoder(&rb_iso2022jp_encoder);
+    rb_register_transcoder(&rb_stateless_iso2022jp_to_eucjp);
+    rb_register_transcoder(&rb_eucjp_to_stateless_iso2022jp);
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese.c b/lib/ruby-1.9.1-rc1/enc/trans/japanese.c
new file mode 100644
index 0000000..350b1f8
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese.c
@@ -0,0 +1,218 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="japanese.trans", len=2261, checksum=31681 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+japanese_byte_array[895] = {
+#define eucjp2sjis_8E_offsets 0
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,
+
+#define eucjp2sjis_8F_A1_offsets 96
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define eucjp2sjis_offsets 192
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,
+
+#define sjis2eucjp_81_offsets 449
+64, 252,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,
+
+#define sjis2eucjp_offsets 640
+0, 252,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      1,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,
+
+};
+static const unsigned int
+japanese_word_array[35] = {
+#define eucjp2sjis_8E_infos WORDINDEX2INFO(0)
+     INVALID,   FUNso,   UNDEF,
+
+#define eucjp2sjis_8E WORDINDEX2INFO(3)
+    eucjp2sjis_8E_offsets,
+    eucjp2sjis_8E_infos,
+
+#define eucjp2sjis_8F_A1_infos WORDINDEX2INFO(5)
+     INVALID,   UNDEF,
+
+#define eucjp2sjis_8F_A1 WORDINDEX2INFO(7)
+    eucjp2sjis_8F_A1_offsets,
+    eucjp2sjis_8F_A1_infos,
+
+#define eucjp2sjis_8F_infos WORDINDEX2INFO(9)
+              INVALID, eucjp2sjis_8F_A1,
+
+#define eucjp2sjis_8F WORDINDEX2INFO(11)
+    eucjp2sjis_8F_A1_offsets,
+    eucjp2sjis_8F_infos,
+
+#define eucjp2sjis_A1_infos WORDINDEX2INFO(13)
+     INVALID,   FUNso,
+
+#define eucjp2sjis_A1 WORDINDEX2INFO(15)
+    eucjp2sjis_8F_A1_offsets,
+    eucjp2sjis_A1_infos,
+
+#define eucjp2sjis_infos WORDINDEX2INFO(17)
+             NOMAP,       INVALID, eucjp2sjis_8E, eucjp2sjis_8F,
+     eucjp2sjis_A1,
+
+#define eucjp2sjis WORDINDEX2INFO(22)
+    eucjp2sjis_offsets,
+    eucjp2sjis_infos,
+
+#define sjis2eucjp_81 WORDINDEX2INFO(24)
+    sjis2eucjp_81_offsets,
+    eucjp2sjis_A1_infos,
+
+#define sjis2eucjp_F0 WORDINDEX2INFO(26)
+    sjis2eucjp_81_offsets,
+    eucjp2sjis_8F_A1_infos,
+
+#define sjis2eucjp_infos WORDINDEX2INFO(28)
+             NOMAP,       INVALID, sjis2eucjp_81,         FUNso,
+     sjis2eucjp_F0,
+
+#define sjis2eucjp WORDINDEX2INFO(33)
+    sjis2eucjp_offsets,
+    sjis2eucjp_infos,
+
+};
+#define TRANSCODE_TABLE_INFO japanese_byte_array, 895, japanese_word_array, 35, sizeof(unsigned int)
+
+
+static ssize_t
+fun_so_eucjp2sjis(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (s[0] == 0x8e) {
+        o[0] = s[1];
+        return 1;
+    }
+    else {
+        int h, m, l;
+        m = s[0] & 1;
+        h = (s[0]+m) >> 1;
+        h += s[0] < 0xdf ? 0x30 : 0x70;
+        l = s[1] - m * 94 - 3;
+        if (0x7f <= l)
+            l++;
+        o[0] = h;
+        o[1] = l;
+        return 2;
+    }
+}
+
+static ssize_t
+fun_so_sjis2eucjp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (l == 1) {
+        o[0] = '\x8e';
+        o[1] = s[0];
+        return 2;
+    }
+    else {
+        int h, l;
+        h = s[0];
+        l = s[1];
+        if (0xe0 <= h)
+            h -= 64;
+        l += l < 0x80 ? 0x61 : 0x60;
+        h = h * 2 - 0x61;
+        if (0xfe < l) {
+            l -= 94;
+            h += 1;
+        }
+        o[0] = h;
+        o[1] = l;
+        return 2;
+    }
+}
+
+static const rb_transcoder
+rb_eucjp2sjis = {
+    "EUC-JP", "Shift_JIS", eucjp2sjis,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_eucjp2sjis
+};
+
+static const rb_transcoder
+rb_sjis2eucjp = {
+    "Shift_JIS", "EUC-JP", sjis2eucjp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_sjis2eucjp
+};
+
+void
+Init_japanese(void)
+{
+    rb_register_transcoder(&rb_eucjp2sjis);
+    rb_register_transcoder(&rb_sjis2eucjp);
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese.trans b/lib/ruby-1.9.1-rc1/enc/trans/japanese.trans
new file mode 100644
index 0000000..ce5d0bb
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese.trans
@@ -0,0 +1,98 @@
+#include "transcode_data.h"
+
+<%
+  map = {}
+  map["{00-7f}"] = :nomap
+  map["{a1-fe}{a1-fe}"] = :func_so
+  map["8e{a1-df}"] = :func_so
+  map["8e{e0-fe}"] = :undef
+  map["8f{a1-fe}{a1-fe}"] = :undef
+  transcode_generate_node(ActionMap.parse(map), "eucjp2sjis")
+
+  map = {}
+  map["{00-7f}"] = :nomap
+  map["{81-9f,e0-ef}{40-7e,80-fc}"] = :func_so
+  map["{f0-fc}{40-7e,80-fc}"] = :undef
+  map["{a1-df}"] = :func_so
+  transcode_generate_node(ActionMap.parse(map), "sjis2eucjp")
+%>
+
+<%= transcode_generated_code %>
+
+static ssize_t
+fun_so_eucjp2sjis(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (s[0] == 0x8e) {
+        o[0] = s[1];
+        return 1;
+    }
+    else {
+        int h, m, l;
+        m = s[0] & 1;
+        h = (s[0]+m) >> 1;
+        h += s[0] < 0xdf ? 0x30 : 0x70;
+        l = s[1] - m * 94 - 3;
+        if (0x7f <= l)
+            l++;
+        o[0] = h;
+        o[1] = l;
+        return 2;
+    }
+}
+
+static ssize_t
+fun_so_sjis2eucjp(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (l == 1) {
+        o[0] = '\x8e';
+        o[1] = s[0];
+        return 2;
+    }
+    else {
+        int h, l;
+        h = s[0];
+        l = s[1];
+        if (0xe0 <= h)
+            h -= 64;
+        l += l < 0x80 ? 0x61 : 0x60;
+        h = h * 2 - 0x61;
+        if (0xfe < l) {
+            l -= 94;
+            h += 1;
+        }
+        o[0] = h;
+        o[1] = l;
+        return 2;
+    }
+}
+
+static const rb_transcoder
+rb_eucjp2sjis = {
+    "EUC-JP", "Shift_JIS", eucjp2sjis,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_eucjp2sjis
+};
+
+static const rb_transcoder
+rb_sjis2eucjp = {
+    "Shift_JIS", "EUC-JP", sjis2eucjp,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_sjis2eucjp
+};
+
+void
+Init_japanese(void)
+{
+    rb_register_transcoder(&rb_eucjp2sjis);
+    rb_register_transcoder(&rb_sjis2eucjp);
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.c b/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.c
new file mode 100644
index 0000000..84e4cd2
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.c
@@ -0,0 +1,30915 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="japanese_euc.trans", len=1697, checksum=58602 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+japanese_euc_byte_array[53782] = {
+#define from_EUC_JP_8E_offsets 0
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     64, 64, 64, 64, 64, 64, 64, 64,   64, 64, 64, 64, 64, 64, 64, 64,
+     64, 64, 64, 64, 64, 64, 64, 64,   64, 64, 64, 64, 64, 64,
+
+#define from_EUC_JP_8F_A1_offsets 96
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define from_EUC_JP_8F_A2_offsets 192
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      4,  5,  6,  7,  8,  9, 10, 11,   12,  1,  1,  1,  1,  1,  1,  1,
+      1, 13, 14, 15,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 16, 17, 18, 19, 20, 21,
+     22,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define from_EUC_JP_8F_A6_offsets 288
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  1,  7,  1,    8,  9,  1, 10,  1,  1,  1,  1,
+     11, 12, 13, 14, 15, 16, 17, 18,   19, 20, 21, 22,  1,  1,
+
+#define from_EUC_JP_8F_A7_offsets 384
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27,
+
+#define from_EUC_JP_8F_A9_offsets 480
+161, 254,
+      1,  2,  3,  4,  3,  5,  3,  6,    7,  3,  8,  9, 10,  3, 11, 12,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,
+
+#define from_EUC_JP_8F_AA_offsets 576
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 25,   25, 25, 25, 25, 25, 25,
+
+#define from_EUC_JP_8F_AB_offsets 672
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 28, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 63,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 28,   28, 28, 28, 28, 28, 28,
+
+#define from_EUC_JP_8F_B0_offsets 768
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94,
+
+#define from_EUC_JP_8F_ED_offsets 864
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 68, 68, 68, 68,   68, 68, 68, 68, 68, 68, 68, 68,
+     68, 68, 68, 68, 68, 68, 68, 68,   68, 68, 68, 68, 68, 68,
+
+#define from_EUC_JP_8F_offsets 960
+161, 254,
+      1,  2,  1,  1,  1,  3,  4,  1,    5,  6,  7,  1,  1,  1,  1,  8,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44, 45, 46, 47, 48,   49, 50, 51, 52, 53, 54, 55, 56,
+     57, 58, 59, 60, 61, 62, 63, 64,   65, 66, 67, 68, 69,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define from_EUC_JP_A2_offsets 1056
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 15,
+     15, 15, 15, 15, 15, 15, 15, 15,   15, 16, 17, 18, 19, 20, 21, 22,
+     23, 15, 15, 15, 15, 15, 15, 15,   15, 24, 25, 26, 27, 28, 29, 30,
+     15, 15, 15, 15, 15, 15, 15, 15,   15, 15, 15, 31, 32, 33, 34, 35,
+     36, 37, 38, 39, 40, 41, 42, 43,   44, 45, 15, 15, 15, 15, 15, 15,
+     15, 46, 47, 48, 49, 50, 51, 52,   53, 15, 15, 15, 15, 54,
+
+#define from_EUC_JP_A3_offsets 1152
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      3,  4,  5,  6,  7,  8,  9, 10,   11,  1,  1,  1,  1,  1,  1,  1,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+     28, 29, 30, 31, 32, 33, 34, 35,   36, 37,  1,  1,  1,  1,  1,  1,
+     38, 39, 40, 41, 42, 43, 44, 45,   46, 47, 48, 49, 50, 51, 52, 53,
+     54, 55, 56, 57, 58, 59, 60, 61,   62, 63,  1,  1,  1,  1,
+
+#define from_EUC_JP_A4_offsets 1248
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 84, 84, 84, 84,   84, 84, 84, 84, 84, 84,
+
+#define from_EUC_JP_A5_offsets 1344
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 87,   87, 87, 87, 87, 87, 87,
+
+#define from_EUC_JP_A6_offsets 1440
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 25, 25, 25, 25, 25, 25, 25,
+     26, 27, 28, 29, 30, 31, 32, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+     42, 43, 44, 45, 46, 47, 48, 49,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25,
+
+#define from_EUC_JP_A7_offsets 1536
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+     51, 52, 53, 54, 55, 56, 57, 58,   59, 60, 61, 62, 63, 64, 65, 66,
+     67, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34,
+
+#define from_EUC_JP_A8_offsets 1632
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33,
+
+#define from_EUC_JP_CF_offsets 1728
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52, 52, 52,
+     52, 52, 52, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52, 52, 52,
+     52, 52, 52, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52,
+
+#define from_EUC_JP_F4_offsets 1824
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,
+
+#define from_EUC_JP_offsets 1920
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  5,  6,  7,  8,  9, 10,   11, 12, 12, 12, 12, 12, 12, 12,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+     29, 30, 31, 32, 33, 34, 35, 36,   37, 38, 39, 40, 41, 42, 43, 44,
+     45, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 58, 59, 60,
+     61, 62, 63, 64, 65, 66, 67, 68,   69, 70, 71, 72, 73, 74, 75, 76,
+     77, 78, 79, 80, 81, 12, 12, 12,   12, 12, 12, 12, 12, 12, 12,
+
+#define from_eucJP_ms_8F_F3_offsets 2177
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    8,  9, 10, 11, 12, 13,
+
+#define from_eucJP_ms_8F_offsets 2273
+161, 254,
+      1,  2,  1,  1,  1,  3,  4,  1,    5,  6,  7,  1,  1,  1,  1,  8,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44, 45, 46, 47, 48,   49, 50, 51, 52, 53, 54, 55, 56,
+     57, 58, 59, 60, 61, 62, 63, 64,   65, 66, 67, 68, 69,  1,  1,  1,
+      1,  1, 70, 71, 72, 73, 74, 75,   76, 77, 78, 79, 80, 81,
+
+#define from_eucJP_ms_AD_offsets 2369
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 31, 31,   31, 31, 31, 31, 31, 31, 55, 56,
+     57, 58, 59, 60, 61, 62, 63, 64,   65, 66, 67, 68, 69, 70, 71, 72,
+     73, 74, 75, 76, 77, 78, 79, 80,   81, 82, 83, 84, 31, 31,
+
+#define from_eucJP_ms_offsets 2465
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  5,  6,  7,  8,  9, 10,   11, 12, 12, 12, 12, 13, 12, 12,
+     14, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+     62, 63, 64, 65, 66, 67, 68, 69,   70, 71, 72, 73, 74, 75, 76, 77,
+     78, 79, 80, 81, 82, 83, 84, 85,   86, 87, 88, 89, 90, 91, 92,
+
+#define from_CP51932_FC_offsets 2722
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93,
+
+#define from_CP51932_offsets 2818
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  4,  5,  6,  7,  8,  9,   10, 11, 11, 11, 11, 12, 11, 11,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+     29, 30, 31, 32, 33, 34, 35, 36,   37, 38, 39, 40, 41, 42, 43, 44,
+     45, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 58, 59, 60,
+     61, 62, 63, 64, 65, 66, 67, 68,   69, 70, 71, 72, 73, 74, 75, 76,
+     77, 78, 79, 80, 81, 11, 11, 11,   11, 82, 83, 84, 85, 11, 11,
+
+#define to_EUC_JP_C2_offsets 3075
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  1,  6,  7,    8,  9, 10,  1, 11,  1, 12, 13,
+     14, 15,  1,  1, 16,  1, 17,  1,   18,  1, 19,  1,  1,  1,  1, 20,
+
+#define to_EUC_JP_C3_offsets 3141
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+
+#define to_EUC_JP_C4_offsets 3207
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 21, 35, 36, 37, 38,   39, 40, 41, 42, 21, 21, 43, 44,
+     45, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 58, 59, 60,
+
+#define to_EUC_JP_C5_offsets 3273
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 15,
+
+#define to_EUC_JP_C6_offsets 3339
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_C7_offsets 3405
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  3,  4,
+      5,  6,  7,  8,  9, 10, 11, 12,   13, 14, 15, 16, 17,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 18,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_CB_offsets 3471
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  4,  5,  6,  1,  7,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_CE_offsets 3537
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    5,  6,  7,  1,  8,  1,  9, 10,
+     11, 12, 13, 14, 15, 16, 17, 18,   19, 20, 21, 22, 23, 24, 25, 26,
+     27, 28,  1, 29, 30, 31, 32, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+     42, 43, 44, 45, 46, 47, 48, 49,   50, 51, 52, 53, 54, 55, 56, 57,
+
+#define to_EUC_JP_CF_offsets 3603
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+
+#define to_EUC_JP_D0_offsets 3669
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  1, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 63,
+
+#define to_EUC_JP_D1_offsets 3735
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 17, 30, 31,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_EUC_JP_E0_offsets 3801
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_80_offsets 3835
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  3,  4,  1,    5,  6,  1,  1,  7,  8,  1,  1,
+      9, 10,  1,  1,  1, 11, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     13,  1, 14, 15,  1,  1,  1,  1,    1,  1,  1, 16,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_84_offsets 3901
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_86_offsets 3967
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_87_offsets 4033
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_88_offsets 4099
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  2,  2,  7,  2,  2,  2,  2,
+      2,  2,  8,  2,  2,  2,  2,  2,    2,  2,  9,  2,  2, 10, 11,  2,
+     12,  2,  2,  2,  2,  2,  2, 13,   14, 15, 16, 17, 18,  2,  2,  2,
+      2,  2,  2,  2, 19, 20,  2,  2,    2,  2,  2,  2,  2, 21,  2,  2,
+
+#define to_EUC_JP_E2_89_offsets 4165
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  1,  1,  5,  6,    1,  1,  7,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_8A_offsets 4231
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_8C_offsets 4297
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_94_offsets 4363
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  6,  5,  5,  7,
+      8,  5,  5,  9, 10,  5,  5, 11,   12,  5,  5, 13, 14, 15,  5,  5,
+     16,  5,  5, 17, 18, 19,  5,  5,   20,  5,  5, 21, 22,  5,  5, 23,
+     24,  5,  5, 25, 26,  5,  5, 27,   28,  5,  5, 29, 30,  5,  5, 31,
+
+#define to_EUC_JP_E2_95_offsets 4429
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_96_offsets 4495
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  5,  1,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+
+#define to_EUC_JP_E2_97_offsets 4561
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  4,  1,  1,  5,  6,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_98_offsets 4627
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E2_99_offsets 4693
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  4,  2,  2,  5,  2,  6,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_JP_E2_offsets 4759
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    6,  7,  8,  2,  9,  2,  2,  2,
+      2,  2,  2,  2, 10, 11, 12, 13,   14, 15,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_JP_E3_80_offsets 4825
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22,  5,  5,    5,  5,  5,  5, 23,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_EUC_JP_E3_82_offsets 4891
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 21, 21, 21,   21, 21, 21, 22, 23, 24, 25, 21,
+     21, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44, 45, 46, 47, 48,   49, 50, 51, 52, 53, 54, 55, 56,
+
+#define to_EUC_JP_E3_83_offsets 4957
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   56, 56, 56, 57, 58, 59, 60, 56,
+
+#define to_EUC_JP_E3_offsets 5023
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_EUC_JP_E4_B8_offsets 5089
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15,  7,
+     16, 17, 18,  7, 19, 20, 21, 22,   23, 24,  7,  7,  7,  7, 25, 26,
+      7, 27,  7, 28, 29,  7, 30,  7,   31,  7, 32, 33,  7, 34, 35, 36,
+     37, 38, 39,  7,  7, 40, 41,  7,   42, 43,  7, 44, 45,  7,  7, 46,
+
+#define to_EUC_JP_E4_B9_offsets 5155
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    7,  7,  7,  9,  7, 10, 11, 12,
+      7, 13,  7,  7,  7, 14, 15, 16,   17, 18, 19,  7, 20, 21, 22, 23,
+      7,  7, 24, 25,  7,  7,  7,  7,   26, 27,  7,  7,  7,  7,  7,  7,
+      7, 28,  7, 29, 30, 31,  7,  7,    7, 32,  7,  7,  7,  7, 33, 34,
+
+#define to_EUC_JP_E4_BA_offsets 5221
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    6,  7,  8,  9, 10, 11, 12,  2,
+      2, 13, 14,  2, 15, 16, 17, 18,   19, 20,  2, 21, 22, 23, 24, 25,
+     26, 27, 28,  2, 29, 30, 31,  2,   32,  2,  2, 33, 34, 35, 36, 37,
+     38,  2,  2, 39,  2,  2, 40,  2,    2, 41, 42,  2,  2,  2,  2,  2,
+
+#define to_EUC_JP_E4_BB_offsets 5287
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    6,  6,  9, 10,  6, 11, 12, 13,
+     14,  6,  6,  6, 15, 16, 17, 18,   19, 20, 21, 22,  6, 23, 24, 25,
+     26, 27, 28, 29, 30, 31,  6,  6,   32,  6,  6,  6,  6, 33, 34, 35,
+     36, 37, 38, 39,  6, 40, 41, 42,    6,  6,  6, 43,  6, 44, 45, 46,
+
+#define to_EUC_JP_E4_BC_offsets 5353
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  7,  8,  9, 10, 11, 12, 13,
+     14, 15, 16,  5,  5, 17, 18, 19,    5, 20, 21,  5, 22, 23,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5, 24, 25,
+     26, 27,  5, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39,  5,
+
+#define to_EUC_JP_E4_BD_offsets 5419
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    7,  8,  2,  9, 10, 11, 12, 13,
+     14, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30,  2,  2, 31,  2,  2,  2,  2,    2, 32, 33,  2, 34,  2, 35, 36,
+     37, 38,  2, 39,  2, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_EUC_JP_E4_BE_offsets 5485
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9, 10, 11, 12, 13, 14, 15,
+     16, 17, 18, 19, 20,  1, 21, 22,   23, 24, 25, 26,  1, 27, 28, 29,
+     30, 31,  1,  1,  1,  1,  1,  1,    1,  1,  1, 32,  1, 33, 34, 35,
+      1,  1, 36,  1,  1, 37, 38, 39,    1, 40,  1, 41, 42, 43, 44, 45,
+
+#define to_EUC_JP_E4_BF_offsets 5551
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19,  8, 20,  8,  8, 21,   22,  8, 23, 24, 25, 26,  8, 27,
+     28, 29, 30, 31, 32, 33,  8,  8,    8,  8,  8,  8,  8,  8, 34, 35,
+     36,  8, 37, 38,  8, 39, 40,  8,   41,  8, 42,  8, 43, 44, 45, 46,
+
+#define to_EUC_JP_E4_offsets 5617
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  5,  6,  7,  8,  9,
+
+#define to_EUC_JP_E5_80_offsets 5683
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18, 19,  3, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+      3, 30, 31, 32, 33, 34, 35, 36,   37, 38, 39, 40, 41, 42, 43,  3,
+     44,  3, 45, 46,  3, 47, 48,  3,    3, 49,  3, 50,  3,  3,  3,  3,
+
+#define to_EUC_JP_E5_81_offsets 5749
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11,  5, 12,  5, 13, 14,
+     15, 16, 17, 18,  5, 19, 20, 21,    5, 22, 23,  5, 24,  5,  5, 25,
+     26,  5, 27, 28,  5, 29, 30, 31,    5,  5, 32,  5, 33, 34,  5,  5,
+     35, 36, 37,  5, 38, 39, 40,  5,   41,  5,  5,  5,  5, 42,  5,  5,
+
+#define to_EUC_JP_E5_82_offsets 5815
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    3,  3,  8,  3,  3,  9, 10, 11,
+     12, 13, 14, 15, 16,  3, 17,  3,   18, 19, 20, 21, 22,  3, 23, 24,
+     25, 26, 27,  3,  3,  3,  3,  3,    3,  3, 28,  3, 29, 30,  3, 31,
+     32,  3, 33, 34, 35, 36,  3, 37,    3, 38, 39,  3,  3, 40, 41,  3,
+
+#define to_EUC_JP_E5_83_offsets 5881
+128, 191,
+      1,  2,  3,  4,  5,  6,  2,  7,    2,  8,  9,  2, 10, 11, 12, 13,
+     14, 15,  2, 16, 17, 18, 19,  2,   20,  2, 21,  2, 22, 23, 24, 25,
+      2,  2, 26, 27, 28, 29, 30, 31,   32, 33,  2,  2,  2, 34, 35, 36,
+      2, 37, 38,  2,  2, 39, 40,  2,    2, 41, 42, 43,  2,  2, 44,  2,
+
+#define to_EUC_JP_E5_84_offsets 5947
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  6, 11, 12, 13, 14,  6,
+     15,  6, 16,  6, 17, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+      6, 29,  6, 30,  6,  6,  6, 31,   32,  6, 33,  6, 34, 35,  6, 36,
+      6, 37, 38, 39, 40, 41,  6, 42,   43, 44, 45, 46, 47,  6,  6, 48,
+
+#define to_EUC_JP_E5_85_offsets 6013
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 18, 23,   24, 18, 25, 18, 26, 18, 18, 27,
+     18, 18, 28, 18, 29, 30, 31, 18,   32, 33, 34, 35, 36, 37, 38, 18,
+     18, 39, 18, 18, 18, 40, 41, 42,   43, 18, 18, 18, 44, 18, 45, 18,
+
+#define to_EUC_JP_E5_86_offsets 6079
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  2,    2,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18,  2, 19, 20, 21,   22, 23,  2,  2,  2, 24,  2,  2,
+     25, 26, 27, 28, 29, 30, 31,  2,   32, 33, 34, 35, 36, 37,  2,  2,
+     38, 39, 40, 41, 42, 43, 44, 45,   46,  2, 47,  2, 48, 49, 50, 51,
+
+#define to_EUC_JP_E5_87_offsets 6145
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  1,    6,  7,  1,  8,  9, 10,  1, 11,
+      1, 12, 13, 14,  1, 15, 16,  1,   17,  1,  1, 18, 19, 20, 21,  1,
+     22, 23, 24,  1,  1, 25, 26, 27,    1, 28, 29,  1,  1, 30, 31,  1,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42,  1,  1, 43, 44,  1,
+
+#define to_EUC_JP_E5_88_offsets 6211
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 10, 10, 13, 10,
+     10, 14, 15, 16, 17, 18, 19, 20,   21, 10, 10, 10, 10, 22, 10, 10,
+     10, 10, 23, 10, 24, 25, 10, 26,   27, 28, 29, 10, 10, 10, 30, 10,
+     31, 32, 33, 34, 10, 35, 36, 37,   38, 39, 40, 41, 42, 10, 10, 10,
+
+#define to_EUC_JP_E5_89_offsets 6277
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    1,  6,  7,  8,  9, 10,  1, 11,
+      1,  1,  1,  1, 12, 13, 14, 15,   16,  1, 17, 18, 19,  1, 20, 21,
+     22, 23,  1, 24, 25, 26, 27,  1,    1, 28, 29,  1,  1,  1, 30, 31,
+     32, 33, 34, 35, 36, 37,  1, 38,   39, 40,  1,  1,  1, 41,  1, 42,
+
+#define to_EUC_JP_E5_8A_offsets 6343
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  6,    7,  8,  9,  2, 10, 11,  2,  2,
+      2, 12, 13, 14, 15, 16, 17, 18,   19,  2, 20, 21, 22,  2,  2, 23,
+     24,  2,  2, 25, 26, 27, 28, 29,    2, 30, 31, 32, 33, 34,  2, 35,
+     36, 37,  2,  2, 38, 39, 40, 41,   42, 43, 44, 45, 46, 47, 48,  2,
+
+#define to_EUC_JP_E5_8B_offsets 6409
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3,  3, 11, 12,  3, 13,
+      3, 14, 15,  3, 16, 17, 18, 19,   20, 21,  3, 22, 23, 24, 25, 26,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37,  3, 38,  3,  3,  3,
+     39, 40, 41, 42, 43, 44, 45, 46,   47, 48, 49,  3,  3,  3, 50, 51,
+
+#define to_EUC_JP_E5_8C_offsets 6475
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  5,    8,  5,  9, 10, 11, 12,  5, 13,
+     14, 15,  5, 16,  5, 17, 18, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+     28, 29,  5, 30,  5, 31,  5, 32,   33, 34, 35, 36, 37, 38,  5, 39,
+     40, 41, 42, 43,  5, 44,  5,  5,   45, 46, 47, 48, 49, 50, 51, 52,
+
+#define to_EUC_JP_E5_8D_offsets 6541
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14,  5,  5,
+      5, 15, 16, 17, 18,  5,  5, 19,   20, 21, 22, 23, 24,  5, 25,  5,
+     26, 27,  5, 28,  5, 29, 30,  5,    5, 31,  5,  5, 32, 33, 34, 35,
+     36, 37, 38, 39, 40, 41,  5, 42,   43, 44,  5, 45,  5,  5, 46, 47,
+
+#define to_EUC_JP_E5_8E_offsets 6607
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  5,    6,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  1,  8,  9,  1, 10,  1,   11, 12, 13,  1,  1, 14,  1, 15,
+     16, 17,  1,  1, 18, 19, 20,  1,   21, 22, 23, 24,  1, 25, 26, 27,
+     28,  1, 29, 30, 31, 32, 33, 34,   35,  1, 36, 37,  1, 38,  1,  1,
+
+#define to_EUC_JP_E5_8F_offsets 6673
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  2,    6,  7,  8,  9, 10, 11, 12, 13,
+      2,  2, 14, 15, 16, 17, 18, 19,    2, 20, 21, 22,  2, 23, 24, 25,
+     26, 27, 28, 29, 30, 31, 32, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+     42, 43, 44, 45,  2, 46, 47, 48,   49,  2, 50,  2,  2,  2,  2,  2,
+
+#define to_EUC_JP_E5_90_offsets 6739
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    6,  7,  8,  9, 10, 11, 12, 13,
+     14, 15,  1, 16,  1,  1,  1,  1,    1,  1, 17, 18,  1, 19,  1, 20,
+     21, 22,  1,  1,  1,  1, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+      1, 33,  1,  1, 34, 35, 36,  1,   37, 38,  1, 39, 40, 41, 42,  1,
+
+#define to_EUC_JP_E5_91_offsets 6805
+128, 191,
+      1,  2,  3,  4,  5,  2,  6,  7,    8,  9, 10,  2,  2, 11, 12, 13,
+      2, 14,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2, 15, 16,
+      2,  2, 17,  2, 18,  2, 19, 20,   21, 22, 23, 24,  2, 25, 26,  2,
+     27, 28,  2, 29, 30, 31, 32, 33,    2,  2,  2, 34, 35, 36,  2, 37,
+
+#define to_EUC_JP_E5_92_offsets 6871
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    8,  9,  3, 10, 11, 12, 13, 14,
+     15, 16, 17,  3,  3, 18, 19,  3,    3,  3,  3,  3, 20,  3,  3, 21,
+      3, 22, 23,  3, 24, 25, 26, 27,   28, 29, 30, 31, 32, 33, 34, 35,
+      3, 36, 37, 38,  3,  3,  3, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+
+#define to_EUC_JP_E5_93_offsets 6937
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  7,    8,  9, 10,  4,  4, 11, 12,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,   13,  4,  4,  4,  4,  4,  4,  4,
+     14, 15, 16,  4,  4, 17, 18,  4,   19, 20, 21,  4, 22, 23, 24, 25,
+      4,  4, 26,  4,  4,  4, 27,  4,    4,  4, 28,  4, 29, 30, 31, 32,
+
+#define to_EUC_JP_E5_94_offsets 7003
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    8,  9,  3,  3, 10, 11, 12, 13,
+     14,  3,  3,  3, 15, 16, 17,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3, 18, 19,  3,  3, 20, 21,
+      3, 22, 23, 24,  3, 25, 26,  3,   27, 28,  3, 29, 30, 31, 32,  3,
+
+#define to_EUC_JP_E5_95_offsets 7069
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  9,  3, 10, 11,  3, 12,
+     13, 14,  3, 15,  3,  3, 16, 17,   18,  3, 19, 20, 21, 22, 23,  3,
+     24, 25,  3, 26, 27,  3, 28,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3, 29, 30,  3, 31, 32,
+
+#define to_EUC_JP_E5_96_offsets 7135
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12,  6,  6, 13, 14,
+      6, 15, 16, 17, 18,  6,  6, 19,   20, 21, 22,  6, 23, 24, 25, 26,
+      6,  6,  6, 27, 28,  6,  6, 29,   30, 31, 32, 33, 34, 35, 36,  6,
+     37,  6, 38,  6,  6,  6, 39,  6,    6,  6,  6,  6,  6,  6,  6, 40,
+
+#define to_EUC_JP_E5_97_offsets 7201
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    1,  8,  1,  9, 10,  1, 11,  1,
+      1, 12, 13, 14, 15,  1,  1, 16,   17,  1, 18, 19, 20,  1, 21, 22,
+      1,  1, 23, 24, 25,  1,  1,  1,    1, 26,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 27, 28,    1, 29,  1,  1,  1, 30, 31, 32,
+
+#define to_EUC_JP_E5_98_offsets 7267
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  5,  6,  1,  1,  7,  8,  9,
+     10, 11, 12,  1, 13,  1, 14, 15,   16, 17,  1, 18,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 19,  1,  1, 20,  1,  1, 21,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31,  1, 32, 33, 34,  1, 35,
+
+#define to_EUC_JP_E5_99_offsets 7333
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  6,    6,  8,  6,  9, 10, 11, 12, 13,
+     14,  6,  6,  6, 15,  6,  6,  6,    6,  6,  6, 16,  6,  6, 17,  6,
+     18, 19, 20, 21, 22,  6, 23,  6,   24, 25, 26, 27, 28, 29,  6, 30,
+      6, 31, 32,  6, 33, 34,  6,  6,   35,  6, 36,  6,  6,  6,  6,  6,
+
+#define to_EUC_JP_E5_9A_offsets 7399
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  6,    7,  2,  8,  9, 10,  2,  2, 11,
+      2,  2,  2,  2, 12, 13,  2,  2,    2, 14, 15,  2,  2, 16, 17, 18,
+     19,  2, 20,  2,  2, 21, 22, 23,   24, 25,  2, 26, 27, 28, 29,  2,
+      2, 30,  2, 31, 32,  2, 33, 34,    2,  2,  2,  2, 35,  2, 36,  2,
+
+#define to_EUC_JP_E5_9B_offsets 7465
+128, 191,
+      1,  2,  3,  4,  5,  6,  5,  5,    7,  8,  9, 10, 11, 12, 13, 14,
+     15, 16,  5, 17,  5,  5,  5, 18,   19, 20, 21, 22, 23, 24, 25, 26,
+     27, 28,  5, 29, 30, 31, 32, 33,   34,  5,  5, 35,  5, 36, 37,  5,
+     38, 39, 40, 41,  5,  5, 42, 43,    5, 44, 45,  5,  5, 46,  5, 47,
+
+#define to_EUC_JP_E5_9C_offsets 7531
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  9, 10, 11, 12, 13,  6, 14,
+      6, 15, 16, 17,  6, 18, 19,  6,   20,  6, 21, 22, 23, 24,  6, 25,
+     26,  6, 27, 28, 29, 30, 31, 32,   33, 34, 35,  6, 36, 37, 38, 39,
+     40,  6,  6, 41, 42,  6,  6, 43,   44,  6,  6, 45,  6, 46, 47, 48,
+
+#define to_EUC_JP_E5_9D_offsets 7597
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  6,    2,  2,  7,  2,  8,  9, 10, 11,
+     12, 13, 14,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 15, 16,  2, 17, 18, 19, 20,   21, 22, 23, 24,  2, 25, 26, 27,
+     28, 29,  2, 30, 31, 32,  2, 33,    2, 34, 35, 36, 37,  2, 38, 39,
+
+#define to_EUC_JP_E5_9E_offsets 7663
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    5,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  9, 10, 11,  1, 12,    1, 13, 14,  1, 15, 16, 17, 18,
+     19, 20, 21, 22, 23,  1,  1, 24,   25, 26, 27,  1, 28,  1,  1,  1,
+     29,  1,  1, 30,  1,  1,  1,  1,   31,  1,  1,  1,  1, 32,  1,  1,
+
+#define to_EUC_JP_E5_9F_offsets 7729
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  5,    6,  2,  2,  7,  8,  2,  9, 10,
+      2,  2, 11, 12, 13, 14, 15,  2,    2,  2,  2,  2, 16, 17, 18, 19,
+     20, 21,  2, 22, 23,  2, 24, 25,    2, 26,  2,  2,  2, 27,  2,  2,
+     28,  2,  2,  2, 29, 30, 31, 32,   33, 34, 35,  2, 36, 37, 38, 39,
+
+#define to_EUC_JP_E5_A0_offsets 7795
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  2,    8,  9, 10, 11, 12, 13,  2,  2,
+      2,  2,  2,  2,  2, 14,  2,  2,    2, 15,  2, 16,  2, 17, 18, 19,
+     20, 21,  2,  2, 22,  2, 23, 24,    2,  2, 25,  2,  2, 26,  2, 27,
+     28, 29, 30,  2, 31, 32,  2,  2,    2, 33, 34,  2,  2, 35,  2, 36,
+
+#define to_EUC_JP_E5_A1_offsets 7861
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  4,  5,  6,  7,  8,  3,  9,
+     10, 11, 12,  3, 13, 14,  3, 15,   16, 17, 18,  3,  3,  3, 19, 20,
+      3, 21, 22,  3, 23,  3,  3, 24,   25, 26,  3, 27,  3,  3,  3,  3,
+     28,  3, 29,  3,  3, 30,  3,  3,   31, 32,  3,  3, 33,  3, 34, 35,
+
+#define to_EUC_JP_E5_A2_offsets 7927
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  6,    7,  8,  9,  3, 10, 11,  3, 12,
+     13,  3,  3, 14, 15,  3, 16, 17,    3,  3,  3,  3, 18, 19,  3, 20,
+     21, 22, 23,  3,  3,  3, 24,  3,   25, 26,  3, 27,  3,  3, 28,  3,
+      3, 29, 30, 31,  3,  3,  3,  3,   32, 33, 34, 35, 36,  3, 37,  3,
+
+#define to_EUC_JP_E5_A3_offsets 7993
+128, 191,
+      1,  2,  3,  1,  4,  5,  1,  6,    7,  1,  8,  1,  9, 10, 11,  1,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22,  1, 23, 24, 25, 26,
+      1, 27, 28,  1, 29, 30,  1,  1,    1, 31,  1, 32, 33,  1, 34, 35,
+     36, 37, 38, 39,  1,  1,  1, 40,    1, 41, 42, 43, 44, 45,  1,  1,
+
+#define to_EUC_JP_E5_A4_offsets 8059
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  1,    1,  5,  6,  7,  8,  1,  1,  9,
+     10,  1, 11, 12, 13, 14, 15,  1,   16, 17, 18, 19, 20, 21,  1,  1,
+      1, 22, 23, 24, 25, 26,  1, 27,   28, 29, 30, 31, 32, 33, 34, 35,
+     36, 37, 38, 39,  1, 40, 41, 42,   43,  1,  1,  1,  1,  1, 44, 45,
+
+#define to_EUC_JP_E5_A5_offsets 8125
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  5,    6,  7,  1,  1,  1,  1,  8,  9,
+     10, 11, 12, 13, 14, 15,  1, 16,   17, 18, 19, 20,  1, 21, 22, 23,
+     24, 25, 26, 27,  1, 28,  1, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+      1,  1, 38, 39, 40, 41, 42,  1,   43, 44,  1, 45, 46, 47,  1,  1,
+
+#define to_EUC_JP_E5_A6_offsets 8191
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  6,  7,  8,  9, 10,  1,
+      1,  1, 11, 12,  1, 13, 14, 15,    1, 16,  1, 17,  1, 18,  1, 19,
+      1,  1,  1, 20, 21, 22,  1, 23,   24,  1,  1,  1, 25, 26, 27, 28,
+     29,  1, 30, 31,  1,  1,  1, 32,    1, 33, 34, 35, 36,  1, 37,  1,
+
+#define to_EUC_JP_E5_A7_offsets 8257
+128, 191,
+      1,  2,  1,  3,  4,  1,  5,  1,    6,  7,  8,  9,  1, 10,  1,  1,
+     11, 12, 13, 14, 15,  1,  1,  1,    1, 16, 17,  1, 18, 19, 20, 21,
+      1,  1,  1, 22, 23, 24, 25, 26,   27,  1, 28, 29,  1,  1, 30, 31,
+      1, 32, 33,  1, 34,  1, 35, 36,    1,  1,  1, 37,  1,  1,  1, 38,
+
+#define to_EUC_JP_E5_A8_offsets 8323
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  3,    3,  6,  3,  3,  7,  8,  9,  3,
+      3, 10, 11, 12,  3,  3,  3,  3,   13,  3, 14,  3, 15,  3, 16, 17,
+     18,  3,  3, 19, 20, 21,  3, 22,   23, 24, 25,  3,  3, 26,  3, 27,
+     28,  3,  3,  3,  3, 29, 30,  3,    3,  3,  3,  3, 31,  3,  3,  3,
+
+#define to_EUC_JP_E5_A9_offsets 8389
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    8,  9,  3,  3, 10,  3,  3,  3,
+     11,  3,  3,  3,  3, 12,  3,  3,    3,  3, 13,  3,  3,  3, 14,  3,
+      3,  3, 15, 16,  3, 17, 18, 19,    3,  3, 20,  3, 21, 22,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 23,    3,  3, 24, 25,  3,  3, 26, 27,
+
+#define to_EUC_JP_E5_AA_offsets 8455
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  1,  1,  1,
+      3,  1,  4,  5,  1,  1,  6,  1,    1,  7,  8,  9, 10,  1, 11, 12,
+     13,  1, 14,  1,  1,  1,  1, 15,    1,  1,  1,  1, 16,  1,  1,  1,
+      1, 17, 18, 19,  1, 20,  1,  1,   21,  1, 22, 23, 24, 25, 26, 27,
+
+#define to_EUC_JP_E5_AB_offsets 8521
+128, 191,
+      1,  2,  3,  1,  4,  1,  5,  1,    6,  7,  1,  8,  9,  1,  1, 10,
+     11,  1,  1,  1,  1,  1, 12, 13,    1,  1, 14,  1, 15,  1,  1,  1,
+     16, 17,  1, 18,  1, 19, 20,  1,    1, 21, 22,  1,  1,  1, 23,  1,
+      1,  1,  1,  1,  1, 24, 25,  1,    1,  1, 26, 27,  1, 28,  1,  1,
+
+#define to_EUC_JP_E5_AC_offsets 8587
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    4,  5,  3,  6,  7,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  8,  9,    3, 10,  3, 11,  3, 12,  3,  3,
+      3, 13, 14,  3,  3, 15,  3,  3,    3,  3, 16,  3, 17, 18,  3,  3,
+     19,  3, 20,  3, 21,  3, 22,  3,   23,  3,  3,  3,  3,  3, 24,  3,
+
+#define to_EUC_JP_E5_AD_offsets 8653
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  3,    3,  3,  3,  6,  7,  3,  3,  3,
+      8,  9, 10,  3, 11, 12, 13, 14,   15,  3, 16, 17, 18, 19, 20, 21,
+      3,  3,  3, 22, 23, 24, 25,  3,   26, 27,  3, 28,  3,  3, 29, 30,
+     31, 32,  3, 33,  3, 34,  3,  3,   35,  3, 36,  3, 37, 38, 39, 40,
+
+#define to_EUC_JP_E5_AE_offsets 8719
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18,  3, 19, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29,  3, 30,
+      3,  3, 31, 32, 33, 34, 35,  3,   36, 37,  3,  3, 38, 39, 40, 41,
+     42, 43, 44, 45, 46, 47, 48, 49,   50, 51, 52,  3, 53,  3,  3, 54,
+
+#define to_EUC_JP_E5_AF_offsets 8785
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  9,  9, 11, 12,  9, 13,
+     14,  9, 15, 16, 17,  9, 18, 19,   20, 21, 22, 23,  9, 24, 25, 26,
+     27, 28, 29,  9, 30, 31, 32, 33,   34, 35,  9, 36,  9,  9, 37, 38,
+     39, 40,  9, 41, 42, 43, 44,  9,   45,  9, 46,  9,  9, 47, 48, 49,
+
+#define to_EUC_JP_E5_B0_offsets 8851
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  7,    8,  9, 10, 11, 12, 13, 14, 15,
+      1, 16,  1, 17,  1,  1, 18, 19,    1,  1, 20,  1,  1,  1, 21, 22,
+     23,  1, 24, 25, 26,  1, 27,  1,   28, 29,  1, 30, 31, 32, 33,  1,
+     34, 35, 36,  1,  1, 37, 38,  1,   39, 40, 41, 42, 43, 44, 45, 46,
+
+#define to_EUC_JP_E5_B1_offsets 8917
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  3,    6,  3,  7,  8,  3,  9, 10, 11,
+     12, 13,  3, 14,  3, 15,  3,  3,    3, 16, 17,  3, 18,  3, 19,  3,
+     20, 21, 22, 23, 24, 25,  3, 26,   27, 28,  3,  3, 29, 30, 31, 32,
+     33, 34,  3,  3, 35, 36, 37,  3,    3, 38, 39, 40, 41, 42,  3,  3,
+
+#define to_EUC_JP_E5_B2_offsets 8983
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  4,  1,  5,  1,  1,  6,
+      7,  8,  9,  1, 10,  1,  1,  1,    1,  1,  1,  1,  1, 11,  1, 12,
+     13, 14, 15, 16,  1,  1, 17,  1,   18, 19, 20, 21, 22,  1,  1,  1,
+      1, 23, 24, 25, 26, 27, 28, 29,   30,  1, 31, 32, 33,  1, 34,  1,
+
+#define to_EUC_JP_E5_B3_offsets 9049
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  1,  7,    1,  8,  1,  1,  1,  9,  1,  1,
+     10, 11,  1,  1,  1,  1,  1,  1,   12, 13, 14,  1,  1, 15, 16, 17,
+     18, 19, 20,  1, 21,  1, 22,  1,    1,  1, 23, 24,  1, 25,  1,  1,
+
+#define to_EUC_JP_E5_B4_offsets 9115
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  4,    1,  1,  1,  5,  1,  6,  7,  1,
+      1,  8,  9,  1, 10, 11, 12, 13,   14, 15, 16, 17,  1,  1,  1, 18,
+      1,  1, 19, 20, 21,  1, 22, 23,    1, 24,  1, 25,  1,  1,  1,  1,
+      1, 26,  1,  1, 27,  1,  1,  1,    1, 28,  1,  1,  1, 29,  1, 30,
+
+#define to_EUC_JP_E5_B5_offsets 9181
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    5,  1,  6,  7,  8,  1,  9,  1,
+     10, 11, 12,  1,  1, 13,  1,  1,    1, 14,  1,  1, 15,  1,  1, 16,
+     17, 18, 19,  1, 20,  1,  1,  1,    1, 21, 22,  1, 23, 24,  1, 25,
+     26,  1,  1, 27,  1,  1, 28,  1,    1, 29, 30,  1,  1,  1, 31, 32,
+
+#define to_EUC_JP_E5_B6_offsets 9247
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  6,    7,  1,  8,  9, 10,  1,  1,  1,
+     11,  1, 12, 13, 14, 15,  1,  1,    1, 16,  1, 17,  1, 18,  1, 19,
+     20,  1, 21,  1,  1,  1,  1, 22,    1,  1,  1, 23, 24,  1, 25,  1,
+     26,  1, 27,  1, 28,  1,  1, 29,   30, 31, 32,  1, 33, 34,  1,  1,
+
+#define to_EUC_JP_E5_B7_offsets 9313
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  4,  1,  5,  6,  7,  8,  1,
+      9,  1, 10, 11,  1,  1, 12,  1,   13, 14,  1, 15,  1, 16, 17,  1,
+     18, 19,  1, 20, 21, 22, 23, 24,   25, 26,  1, 27,  1,  1, 28,  1,
+      1, 29, 30, 31, 32, 33,  1, 34,   35, 36,  1, 37,  1, 38, 39,  1,
+
+#define to_EUC_JP_E5_B8_offsets 9379
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    2,  2,  2,  7,  8,  9,  2,  2,
+      2, 10, 11,  2, 12, 13, 14,  2,   15, 16, 17, 18,  2, 19,  2, 20,
+     21,  2,  2,  2,  2, 22,  2,  2,   23,  2,  2, 24,  2, 25, 26, 27,
+     28,  2, 29, 30,  2, 31, 32, 33,   34,  2,  2,  2,  2, 35, 36,  2,
+
+#define to_EUC_JP_E5_B9_offsets 9445
+128, 191,
+      1,  2,  2,  3,  4,  5,  2,  6,    2,  7,  2,  8,  9,  2, 10,  2,
+     11, 12,  2,  2, 13, 14, 15, 16,   17,  2,  2, 18, 19,  2, 20, 21,
+      2, 22, 23, 24, 25,  2,  2,  2,   26,  2, 27, 28, 29, 30, 31,  2,
+     32,  2, 33, 34, 35, 36, 37,  2,   38, 39, 40, 41, 42, 43, 44, 45,
+
+#define to_EUC_JP_E5_BA_offsets 9511
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  6,    3,  3,  7,  8,  3,  3,  9, 10,
+      3,  3,  3,  3,  3, 11, 12, 13,    3,  3, 14,  3, 15,  3,  3,  3,
+     16,  3, 17,  3, 18, 19, 20, 21,   22,  3, 23, 24, 25, 26,  3,  3,
+      3, 27,  3, 28,  3, 29, 30, 31,   32,  3,  3,  3,  3, 33, 34, 35,
+
+#define to_EUC_JP_E5_BB_offsets 9577
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    6,  7,  8,  9, 10,  1, 11, 12,
+     13, 14, 15, 16, 17, 18, 19,  1,    1,  1, 20, 21, 22, 23, 24, 25,
+     26, 27, 28, 29,  1, 30,  1,  1,   31, 32,  1, 33, 34,  1,  1,  1,
+     35, 36,  1, 37, 38,  1, 39, 40,   41,  1, 42, 43, 44,  1, 45, 46,
+
+#define to_EUC_JP_E5_BC_offsets 9643
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  7,    8,  9, 10, 11, 12, 13, 14, 15,
+     16, 17,  1, 18, 19, 20, 21, 22,   23, 24,  1, 25, 26, 27,  1, 28,
+      1, 29, 30, 31, 32, 33, 34, 35,   36, 37,  1, 38, 39, 40, 41, 42,
+     43, 44,  1,  1, 45, 46, 47, 48,   49,  1,  1, 50, 51, 52, 53, 54,
+
+#define to_EUC_JP_E5_BD_offsets 9709
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  6,    7,  3,  8,  3,  9, 10, 11,  3,
+     12, 13,  3, 14, 15,  3, 16, 17,   18, 19,  3, 20, 21, 22,  3,  3,
+     23, 24, 25, 26, 27,  3, 28, 29,    3, 30, 31, 32, 33, 34,  3, 35,
+     36, 37, 38, 39, 40, 41,  3, 42,   43, 44, 45,  3, 46, 47, 48, 49,
+
+#define to_EUC_JP_E5_BE_offsets 9775
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14,  7, 15,
+     16, 17, 18, 19,  7,  7, 20, 21,   22, 23,  7,  7, 24, 25, 26,  7,
+     27, 28, 29,  7, 30,  7,  7, 31,   32, 33, 34, 35, 36, 37, 38, 39,
+     40, 41,  7, 42, 43,  7,  7,  7,   44, 45,  7,  7, 46, 47,  7,  7,
+
+#define to_EUC_JP_E5_BF_offsets 9841
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  7,  1,  8,  9, 10,  1,  1,
+     11, 12, 13, 14, 15,  1, 16, 17,   18, 19,  1,  1, 20, 21, 22,  1,
+     23, 24, 25,  1, 26,  1,  1,  1,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38,  1, 39, 40,  1,   41,  1, 42, 43, 44, 45,  1, 46,
+
+#define to_EUC_JP_E6_80_offsets 9907
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  1,  1,  4,  5,  6,
+      7,  1,  8,  9, 10, 11, 12, 13,   14, 15, 16, 17, 18, 19,  1, 20,
+     21, 22,  1,  1, 23, 24, 25, 26,   27, 28, 29, 30,  1, 31,  1, 32,
+      1, 33,  1, 34,  1, 35,  1,  1,    1,  1, 36,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E6_81_offsets 9973
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  7,    8,  9, 10, 11, 12, 13,  5,  5,
+     14, 15, 16,  5, 17, 18, 19, 20,    5, 21, 22,  5,  5, 23,  5, 24,
+     25, 26, 27, 28, 29, 30,  5, 31,   32, 33, 34, 35, 36, 37,  5, 38,
+     39, 40,  5,  5,  5, 41,  5, 42,    5,  5,  5,  5,  5,  5, 43, 44,
+
+#define to_EUC_JP_E6_82_offsets 10039
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  1,    7,  8,  9, 10, 11, 12, 13,  1,
+      1, 14, 15, 16, 17, 18, 19, 20,   21,  1, 22, 23,  1, 24, 25, 26,
+     27,  1, 28, 29, 30, 31, 32, 33,   34, 35, 36,  1,  1,  1,  1,  1,
+     37, 38, 39, 40, 41, 42, 43, 44,   45,  1,  1, 46, 47, 48, 49,  1,
+
+#define to_EUC_JP_E6_83_offsets 10105
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  6,    7,  8,  9, 10,  1,  1, 11, 12,
+      1, 13,  1, 14, 15, 16,  1,  1,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26, 27, 28,  1, 29,  1, 30,   31,  1,  1,  1,  1,  1,  1,  1,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45,  1,  1,
+
+#define to_EUC_JP_E6_84_offsets 10171
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  7,    8,  9, 10,  5, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,    5, 23, 24, 25, 26,  5, 27, 28,
+      5, 29, 30,  5,  5,  5,  5, 31,   32,  5, 33, 34, 35,  5,  5,  5,
+     36, 37,  5,  5, 38, 39, 40, 41,    5, 42,  5,  5, 43, 44, 45, 46,
+
+#define to_EUC_JP_E6_85_offsets 10237
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  7,    8,  9, 10, 11, 12, 13, 14,  1,
+      1,  1,  1, 15,  1, 16,  1,  1,   17, 18, 19,  1,  1, 20, 21, 22,
+     23,  1, 24, 25,  1, 26,  1, 27,   28,  1,  1, 29, 30,  1, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41,  1,  1, 42, 43,  1, 44, 45,
+
+#define to_EUC_JP_E6_86_offsets 10303
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    6,  6,  8,  9,  6, 10, 11,  6,
+     12, 13, 14, 15, 16,  6, 17, 18,   19, 20, 21,  6, 22, 23,  6, 24,
+     25,  6,  6,  6, 26, 27,  6, 28,   29, 30, 31, 32, 33, 34, 35,  6,
+      6,  6, 36,  6,  6,  6, 37,  6,   38, 39, 40,  6, 41,  6, 42,  6,
+
+#define to_EUC_JP_E6_87_offsets 10369
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  7,    8,  9, 10, 11, 12, 13, 14, 15,
+     16,  5,  5,  5,  5, 17,  5,  5,    5,  5,  5,  5, 18, 19, 20, 21,
+      5, 22, 23, 24,  5, 25, 26, 27,    5, 28,  5,  5, 29, 30,  5, 31,
+      5,  5, 32,  5, 33,  5, 34, 35,   36,  5, 37,  5, 38, 39, 40, 41,
+
+#define to_EUC_JP_E6_88_offsets 10435
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  6,    7,  8,  9,  3, 10, 11, 12,  3,
+     13, 14, 15, 16, 17, 18, 19,  3,    3,  3, 20, 21, 22, 23, 24, 25,
+     26, 27, 28, 29,  3,  3, 30, 31,    3, 32, 33, 34,  3,  3, 35, 36,
+     37,  3, 38, 39, 40,  3,  3,  3,   41, 42,  3, 43,  3, 44,  3, 45,
+
+#define to_EUC_JP_E6_89_offsets 10501
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  6, 11, 12, 13, 14,  6,
+     15, 16, 17, 18, 19, 20, 21,  6,   22,  6, 23, 24, 25,  6, 26,  6,
+     27,  6,  6, 28, 29,  6,  6,  6,   30,  6,  6,  6,  6, 31, 32, 33,
+      6, 34,  6, 35,  6,  6, 36,  6,    6, 37, 38,  6, 39, 40, 41, 42,
+
+#define to_EUC_JP_E6_8A_offsets 10567
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  2,    2,  6,  7,  2,  2,  8,  9, 10,
+     11, 12, 13, 14, 15, 16, 17, 18,   19,  2,  2, 20, 21,  2, 22,  2,
+      2,  2,  2,  2,  2,  2, 23,  2,   24,  2,  2, 25, 26,  2,  2,  2,
+      2, 27,  2, 28,  2, 29, 30, 31,    2, 32, 33, 34, 35, 36, 37, 38,
+
+#define to_EUC_JP_E6_8B_offsets 10633
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  6,    7,  8,  9,  1, 10, 11, 12, 13,
+     14, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27,  1,  1,
+     28, 29,  1,  1,  1,  1,  1,  1,    1,  1, 30,  1, 31, 32, 33, 34,
+      1, 35, 36, 37, 38, 39, 40, 41,    1,  1,  1,  1, 42, 43, 44, 45,
+
+#define to_EUC_JP_E6_8C_offsets 10699
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  6,    7,  8,  9, 10, 11, 12,  1,  1,
+     13, 14,  1, 15,  1,  1, 16,  1,   17, 18,  1,  1,  1,  1,  1, 19,
+      1,  1,  1,  1,  1,  1,  1, 20,   21, 22, 23, 24,  1, 25,  1, 26,
+      1,  1,  1,  1,  1, 27, 28,  1,    1, 29, 30,  1, 31, 32, 33, 34,
+
+#define to_EUC_JP_E6_8D_offsets 10765
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  1,    1,  7,  8,  9, 10, 11, 12, 13,
+     14,  1, 15, 16, 17, 18,  1, 19,   20,  1,  1, 21, 22,  1,  1,  1,
+      1,  1,  1,  1,  1, 23, 24, 25,   26, 27,  1, 28, 29, 30, 31,  1,
+      1, 32, 33,  1, 34, 35, 36, 37,   38,  1, 39, 40, 41, 42,  1, 43,
+
+#define to_EUC_JP_E6_8E_offsets 10831
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  6,    7,  8,  9,  2, 10,  2, 11, 12,
+     13,  2, 14,  2, 15, 16, 17,  2,   18, 19, 20, 21,  2,  2, 22, 23,
+     24, 25, 26, 27, 28, 29, 30, 31,   32, 33, 34, 35, 36, 37, 38, 39,
+      2,  2, 40,  2, 41, 42,  2,  2,    2,  2,  2, 43,  2, 44, 45,  2,
+
+#define to_EUC_JP_E6_8F_offsets 10897
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    8,  9,  3,  3,  3,  3, 10, 11,
+     12, 13, 14, 15, 16, 17, 18,  3,    3,  3, 19, 20, 21,  3,  3,  3,
+     22, 23,  3, 24,  3, 25,  3,  3,    3, 26, 27,  3, 28,  3, 29,  3,
+      3,  3, 30, 31, 32, 33, 34,  3,   35, 36, 37,  3,  3,  3,  3,  3,
+
+#define to_EUC_JP_E6_90_offsets 10963
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  4,  1,  1,  5,  1,  6,
+      7,  1,  8,  9, 10,  1, 11, 12,   13,  1,  1,  1, 14,  1, 15,  1,
+     16,  1, 17,  1, 18, 19, 20,  1,   21, 22, 23,  1, 24, 25,  1, 26,
+     27,  1,  1,  1, 28, 29, 30,  1,    1,  1, 31,  1,  1, 32, 33, 34,
+
+#define to_EUC_JP_E6_91_offsets 11029
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  4,  5,
+      1,  6,  7,  8,  9,  1,  1,  1,   10,  1, 11, 12, 13, 14,  1, 15,
+     16, 17,  1, 18,  1,  1,  1, 19,    1, 20,  1,  1,  1, 21,  1, 22,
+      1,  1,  1, 23, 24,  1, 25,  1,   26,  1, 27, 28,  1, 29,  1,  1,
+
+#define to_EUC_JP_E6_92_offsets 11095
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  4,    5,  1,  1,  1,  1,  1,  1,  6,
+      7,  8,  9, 10,  1, 11,  1,  1,   12, 13, 14, 15,  1, 16, 17, 18,
+      1, 19,  1, 20, 21, 22, 23,  1,   24, 25,  1, 26, 27, 28, 29,  1,
+     30,  1, 31, 32,  1,  1,  1,  1,    1, 33,  1, 34, 35, 36, 37, 38,
+
+#define to_EUC_JP_E6_93_offsets 11161
+128, 191,
+      1,  2,  3,  1,  4,  5,  1,  6,    1,  7,  8,  9, 10, 11, 12,  1,
+     13, 14, 15,  1, 16, 17,  1, 18,   19,  1, 20,  1,  1,  1,  1,  1,
+     21, 22, 23, 24, 25, 26, 27, 28,    1, 29, 30,  1, 31, 32,  1, 33,
+     34, 35, 36,  1, 37, 38, 39, 40,    1,  1, 41, 42,  1, 43, 44, 45,
+
+#define to_EUC_JP_E6_94_offsets 11227
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    6,  7,  8,  3,  3,  3,  3,  9,
+      3,  3,  3, 10, 11,  3, 12,  3,   13, 14,  3, 15, 16, 17, 18, 19,
+      3,  3, 20, 21, 22,  3, 23,  3,    3, 24, 25, 26, 27,  3, 28, 29,
+      3, 30,  3,  3, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+
+#define to_EUC_JP_E6_95_offsets 11293
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  4,    5,  6,  1,  1,  1,  7,  1,  8,
+      9, 10, 11,  1, 12, 13, 14, 15,   16, 17,  1,  1,  1, 18, 19, 20,
+     21,  1, 22, 23,  1,  1, 24, 25,    1,  1,  1, 26, 27,  1,  1,  1,
+     28,  1, 29,  1, 30, 31,  1, 32,   33,  1, 34,  1,  1, 35,  1,  1,
+
+#define to_EUC_JP_E6_96_offsets 11359
+128, 191,
+      1,  2,  3,  4,  1,  5,  1,  6,    7,  8,  9,  1, 10,  1, 11,  1,
+     12, 13, 14,  1,  1, 15,  1, 16,   17, 18,  1, 19, 20, 21,  1, 22,
+     23, 24,  1, 25, 26, 27, 28, 29,    1,  1,  1, 30, 31, 32, 33, 34,
+     35,  1, 36, 37, 38,  1,  1, 39,    1, 40,  1,  1, 41, 42,  1, 43,
+
+#define to_EUC_JP_E6_97_offsets 11425
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9,  1, 10, 11,  1, 12, 13,
+     14,  1, 15,  1, 16,  1, 17, 18,   19, 20,  1, 21,  1,  1,  1, 22,
+     23, 24, 25,  1,  1, 26, 27, 28,   29, 30,  1,  1, 31, 32,  1,  1,
+     33, 34, 35,  1, 36, 37,  1,  1,    1, 38, 39, 40,  1,  1, 41, 42,
+
+#define to_EUC_JP_E6_98_offsets 11491
+128, 191,
+      1,  2,  3,  4,  5,  2,  6,  7,    8,  9, 10,  2, 11, 12, 13, 14,
+      2, 15, 16, 17, 18, 19, 20,  2,    2,  2,  2,  2, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42,  2, 43, 44, 45, 46, 47,    2, 48,  2,  2, 49,  2,  2, 50,
+
+#define to_EUC_JP_E6_99_offsets 11557
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    8,  9, 10, 11, 12,  8, 13, 14,
+      8, 15, 16,  8,  8,  8,  8, 17,   18, 19,  8, 20, 21, 22, 23, 24,
+     25, 26, 27,  8, 28,  8, 29, 30,   31, 32, 33, 34, 35,  8, 36, 37,
+     38,  8,  8, 39, 40, 41, 42, 43,   44, 45, 46, 47, 48,  8, 49, 50,
+
+#define to_EUC_JP_E6_9A_offsets 11623
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  6,    7,  8,  3,  9, 10, 11, 12,  3,
+     13, 14, 15,  3,  3,  3, 16, 17,   18, 19, 20, 21, 22, 23,  3, 24,
+     25,  3, 26,  3, 27,  3, 28,  3,    3,  3,  3, 29,  3, 30, 31,  3,
+      3, 32, 33,  3, 34, 35,  3,  3,   36, 37,  3, 38, 39,  3, 40, 41,
+
+#define to_EUC_JP_E6_9B_offsets 11689
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  9,  6,  6, 10,  6, 11, 12,
+      6,  6,  6,  6, 13,  6, 14,  6,    6, 15, 16, 17, 18, 19,  6, 20,
+     21,  6,  6,  6,  6,  6, 22,  6,   23, 24,  6, 25, 26,  6, 27,  6,
+     28,  6, 29, 30, 31, 32,  6, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+
+#define to_EUC_JP_E6_9C_offsets 11755
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  5,    6,  7,  2,  8,  2,  9, 10, 11,
+      2,  2,  2, 12, 13, 14, 15, 16,    2, 17,  2, 18, 19, 20, 21, 22,
+     23,  2, 24,  2,  2,  2, 25, 26,   27,  2, 28, 29, 30, 31, 32,  2,
+      2, 33,  2, 34, 35,  2, 36, 37,   38,  2, 39,  2,  2, 40, 41, 42,
+
+#define to_EUC_JP_E6_9D_offsets 11821
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  5,    6,  7,  1,  1,  8,  1,  9, 10,
+     11, 12,  1, 13, 14, 15, 16,  1,    1, 17,  1,  1, 18, 19, 20, 21,
+     22, 23, 24, 25, 26, 27, 28,  1,    1,  1, 29,  1, 30, 31, 32, 33,
+     34, 35, 36, 37, 38, 39, 40, 41,    1,  1,  1, 42, 43,  1, 44, 45,
+
+#define to_EUC_JP_E6_9E_offsets 11887
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  5,    1,  6,  1,  7,  8,  1,  9, 10,
+     11, 12,  1, 13,  1, 14, 15, 16,   17, 18, 19, 20, 21, 22,  1,  1,
+     23, 24, 25,  1,  1,  1, 26,  1,    1, 27,  1,  1,  1,  1,  1, 28,
+     29, 30, 31, 32, 33, 34, 35, 36,   37, 38,  1, 39, 40, 41,  1,  1,
+
+#define to_EUC_JP_E6_9F_offsets 11953
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11,  8,  8,  8, 12, 13,
+     14, 15, 16, 17, 18,  8,  8, 19,   20, 21, 22,  8, 23, 24, 25,  8,
+      8, 26, 27,  8, 28,  8, 29, 30,    8, 31,  8,  8, 32,  8, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,    8, 43,  8, 44,  8,  8, 45, 46,
+
+#define to_EUC_JP_E6_A0_offsets 12019
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  6,  1,  7,  8,    1,  9,  1,  1,  1, 10, 11, 12,
+      1, 13, 14,  1,  1,  1,  1, 15,   16, 17, 18, 19, 20, 21,  1, 22,
+     23, 24, 25, 26, 27,  1,  1,  1,   28, 29,  1, 30, 31, 32,  1, 33,
+
+#define to_EUC_JP_E6_A1_offsets 12085
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  8, 10,  8, 11, 12, 13,  8,
+     14, 15, 16, 17, 18, 19,  8, 20,   21, 22,  8, 23, 24, 25,  8, 26,
+      8,  8,  8, 27,  8,  8,  8, 28,    8,  8,  8, 29,  8,  8, 30, 31,
+     32, 33, 34,  8, 35, 36, 37, 38,    8, 39, 40, 41, 42,  8, 43, 44,
+
+#define to_EUC_JP_E6_A2_offsets 12151
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  1,  1,  1,  1,  9,  1, 10,
+      1,  1,  1, 11, 12,  1, 13, 14,   15,  1, 16, 17, 18, 19,  1, 20,
+     21, 22, 23, 24,  1, 25, 26, 27,   28, 29, 30,  1,  1, 31, 32, 33,
+     34, 35, 36, 37,  1, 38, 39,  1,    1, 40, 41, 42, 43,  1,  1,  1,
+
+#define to_EUC_JP_E6_A3_offsets 12217
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    5,  6,  7,  8,  9, 10,  1, 11,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22,  1, 23, 24,  1, 25,
+     26, 27,  1, 28,  1, 29,  1, 30,   31,  1, 32, 33, 34, 35, 36, 37,
+     38, 39, 40,  1,  1, 41, 42,  1,    1, 43, 44, 45, 46, 47,  1,  1,
+
+#define to_EUC_JP_E6_A4_offsets 12283
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  3,    7,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18,  3,  3, 19, 20,    3, 21, 22, 23, 24,  3,  3,  3,
+      3, 25, 26, 27,  3, 28, 29,  3,   30,  3, 31,  3,  3,  3,  3,  3,
+     32, 33,  3, 34, 35, 36, 37,  3,   38, 39,  3, 40,  3, 41,  3, 42,
+
+#define to_EUC_JP_E6_A5_offsets 12349
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  1,  1,  6,  1,
+      1,  1,  1,  7,  8,  9,  1, 10,    1, 11, 12, 13, 14, 15, 16,  1,
+     17, 18, 19, 20, 21, 22, 23,  1,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37,  1, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+
+#define to_EUC_JP_E6_A6_offsets 12415
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  5,  4,  4,  6,  7,  4,
+      4,  8,  9,  4, 10, 11, 12,  4,   13,  4,  4, 14, 15,  4,  4,  4,
+     16, 17,  4,  4,  4, 18, 19, 20,   21,  4,  4, 22,  4, 23, 24, 25,
+      4, 26, 27,  4, 28,  4,  4, 29,   30,  4, 31, 32, 33,  4, 34, 35,
+
+#define to_EUC_JP_E6_A7_offsets 12481
+128, 191,
+      1,  2,  1,  3,  1,  4,  1,  5,    6,  1,  7,  8,  9, 10, 11,  1,
+     12, 13,  1, 14,  1,  1, 15, 16,   17, 18,  1,  1,  1, 19, 20,  1,
+      1,  1, 21,  1,  1, 22,  1, 23,   24,  1,  1, 25,  1, 26, 27, 28,
+      1, 29, 30, 31,  1, 32,  1,  1,    1, 33,  1, 34,  1, 35, 36, 37,
+
+#define to_EUC_JP_E6_A8_offsets 12547
+128, 191,
+      1,  2,  3,  4,  5,  6,  5,  5,    5,  5,  7,  8,  9,  5,  5, 10,
+      5, 11, 12, 13, 14, 15,  5, 16,    5, 17, 18, 19,  5, 20, 21, 22,
+     23, 24, 25, 26, 27,  5,  5,  5,   28, 29, 30, 31,  5,  5, 32,  5,
+     33,  5, 34,  5, 35, 36, 37, 38,   39, 40, 41, 42,  5, 43, 44, 45,
+
+#define to_EUC_JP_E6_A9_offsets 12613
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  7,  8,  9,  1,  1, 10,  1,
+     11, 12, 13,  1,  1, 14, 15,  1,   16, 17,  1, 18,  1,  1,  1, 19,
+      1, 20, 21,  1, 22,  1, 23, 24,    1,  1, 25,  1,  1,  1,  1,  1,
+      1, 26, 27, 28,  1,  1,  1,  1,   29,  1,  1,  1,  1,  1, 30, 31,
+
+#define to_EUC_JP_E6_AA_offsets 12679
+128, 191,
+      1,  2,  3,  4,  5,  3,  6,  7,    3,  8,  3,  9,  3, 10, 11,  3,
+     12, 13,  3,  3,  3,  3,  3, 14,    3,  3,  3, 15, 16, 17, 18, 19,
+     20,  3, 21, 22,  3, 23,  3,  3,    3,  3, 24, 25, 26,  3, 27, 28,
+     29, 30,  3, 31, 32,  3,  3,  3,   33,  3,  3, 34,  3, 35, 36, 37,
+
+#define to_EUC_JP_E6_AB_offsets 12745
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    6,  7,  1,  1,  8,  1,  1,  1,
+      9, 10,  1, 11, 12, 13, 14,  1,    1,  1, 15, 16, 17, 18, 19, 20,
+      1,  1,  1,  1, 21,  1,  1, 22,   23,  1, 24,  1, 25,  1,  1,  1,
+     26, 27, 28,  1,  1,  1,  1,  1,    1,  1, 29, 30, 31, 32,  1,  1,
+
+#define to_EUC_JP_E6_AC_offsets 12811
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    1,  8,  9,  1,  1,  1,  1, 10,
+     11, 12, 13,  1,  1,  1, 14, 15,    1,  1,  1, 16,  1, 17, 18, 19,
+     20, 21,  1, 22, 23,  1,  1, 24,   25,  1,  1, 26, 27,  1,  1, 28,
+      1,  1, 29,  1,  1, 30, 31, 32,   33, 34, 35, 36,  1, 37, 38, 39,
+
+#define to_EUC_JP_E6_AD_offsets 12877
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    1,  5,  6,  1,  7,  8,  9,  1,
+     10,  1, 11, 12, 13,  1, 14,  1,   15, 16,  1, 17,  1, 18,  1, 19,
+     20, 21, 22, 23, 24,  1, 25, 26,    1, 27, 28, 29,  1,  1, 30, 31,
+     32,  1,  1, 33, 34, 35,  1,  1,   36, 37,  1, 38,  1, 39, 40, 41,
+
+#define to_EUC_JP_E6_AE_offsets 12943
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  2,    2,  8,  9, 10,  2, 11,  2,  2,
+      2,  2,  2,  2,  2, 12, 13, 14,   15,  2,  2, 16,  2,  2, 17, 18,
+     19,  2, 20, 21, 22,  2,  2,  2,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34, 35, 36,  2, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+
+#define to_EUC_JP_E6_AF_offsets 13009
+128, 191,
+      1,  2,  2,  3,  4,  5,  6,  2,    2,  7,  2,  8,  9, 10, 11,  2,
+      2,  2, 12, 13, 14,  2, 15,  2,   16,  2, 17, 18,  2,  2,  2, 19,
+      2, 20,  2, 21,  2,  2, 22, 23,    2,  2,  2, 24, 25,  2, 26, 27,
+      2, 28,  2, 29,  2,  2,  2, 30,    2, 31,  2,  2,  2,  2,  2, 32,
+
+#define to_EUC_JP_E6_B0_offsets 13075
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    5,  6,  1,  1,  1,  7,  8,  9,
+     10, 11, 12, 13, 14,  1,  1, 15,    1, 16,  1, 17,  1,  1,  1, 18,
+      1,  1,  1, 19, 20,  1, 21, 22,   23,  1,  1,  1, 24,  1, 25,  1,
+      1,  1,  1, 26, 27, 28, 29, 30,   31,  1, 32, 33,  1,  1, 34, 35,
+
+#define to_EUC_JP_E6_B1_offsets 13141
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  5,  6,  4,  7,  8,  9,
+     10,  4, 11,  4, 12, 13,  4, 14,    4, 15, 16, 17, 18, 19, 20, 21,
+     22,  4, 23,  4,  4,  4,  4, 24,   25,  4, 26, 27,  4, 28,  4, 29,
+     30,  4, 31, 32, 33,  4, 34,  4,   35, 36, 37, 38,  4, 39, 40,  4,
+
+#define to_EUC_JP_E6_B2_offsets 13207
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  7,    8,  9,  1,  1, 10, 11,  1,  1,
+     12,  1, 13, 14, 15, 16, 17, 18,   19, 20, 21, 22, 23,  1,  1, 24,
+      1, 25, 26,  1,  1,  1,  1,  1,    1,  1,  1, 27,  1,  1, 28,  1,
+     29, 30, 31, 32, 33,  1,  1,  1,   34, 35, 36, 37, 38, 39, 40, 41,
+
+#define to_EUC_JP_E6_B3_offsets 13273
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  1,    1,  7,  8,  1,  9, 10,  1, 11,
+     12, 13, 14, 15, 16, 17, 18, 19,    1, 20, 21, 22, 23, 24,  1,  1,
+     25, 26, 27, 28,  1, 29,  1, 30,   31, 32, 33, 34, 35,  1, 36, 37,
+     38, 39, 40, 41, 42,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E6_B4_offsets 13339
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  1,  4,  5,  6,  1,  7,  8,
+      1,  9, 10, 11,  1,  1,  1, 12,    1, 13, 14, 15,  1,  1, 16, 17,
+      1,  1,  1,  1,  1, 18, 19, 20,   21, 22, 23, 24,  1,  1, 25, 26,
+      1, 27, 28, 29,  1, 30, 31,  1,   32, 33,  1, 34, 35, 36, 37, 38,
+
+#define to_EUC_JP_E6_B5_offsets 13405
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  5,    1,  6,  7,  1,  8,  1,  9, 10,
+      1, 11,  1, 12, 13, 14, 15, 16,    1, 17, 18,  1, 19,  1, 20, 21,
+     22,  1,  1,  1, 23,  1,  1, 24,   25, 26,  1,  1, 27,  1,  1,  1,
+
+#define to_EUC_JP_E6_B6_offsets 13471
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  4,    5,  1,  1,  1,  6,  1,  7,  1,
+      1,  8,  9, 10, 11, 12, 13, 14,   15, 16,  1, 17, 18,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 19,  1, 20,  1,  1, 21,
+      1,  1, 22,  1, 23, 24,  1, 25,   26, 27,  1,  1, 28, 29,  1, 30,
+
+#define to_EUC_JP_E6_B7_offsets 13537
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  6,    7,  2,  8,  9, 10,  2, 11, 12,
+      2, 13, 14,  2,  2, 15, 16,  2,   17, 18,  2, 19,  2, 20, 21, 22,
+     23, 24, 25,  2, 26, 27, 28,  2,   29, 30, 31, 32, 33,  2, 34, 35,
+     36, 37,  2, 38, 39, 40, 41, 42,    2, 43, 44, 45, 46,  2,  2,  2,
+
+#define to_EUC_JP_E6_B8_offsets 13603
+128, 191,
+      1,  2,  2,  2,  3,  4,  2,  5,    6,  7,  8,  9,  2,  2,  2,  2,
+      2,  2,  2, 10,  2, 11,  2,  2,    2, 12, 13, 14,  2, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,    2, 26,  2, 27, 28, 29, 30, 31,
+      2,  2, 32,  2,  2,  2, 33,  2,   34, 35, 36, 37, 38,  2, 39,  2,
+
+#define to_EUC_JP_E6_B9_offsets 13669
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  1,    5,  6,  7,  8,  1,  9, 10, 11,
+      1, 12, 13, 14, 15,  1, 16, 17,   18,  1,  1, 19, 20, 21, 22, 23,
+      1,  1, 24, 25,  1,  1,  1, 26,   27,  1,  1, 28,  1,  1, 29, 30,
+      1,  1, 31, 32,  1,  1, 33,  1,    1,  1,  1, 34,  1, 35, 36, 37,
+
+#define to_EUC_JP_E6_BA_offsets 13735
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  2,  2,  8,  2,  2,  9,  2,   10, 11,  2,  2, 12, 13,  2, 14,
+     15,  2, 16,  2,  2, 17,  2, 18,    2,  2, 19,  2,  2, 20, 21, 22,
+      2, 23, 24, 25,  2,  2, 26, 27,    2,  2, 28, 29,  2, 30,  2, 31,
+
+#define to_EUC_JP_E6_BB_offsets 13801
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+      7, 17,  7, 18, 19, 20,  7,  7,    7,  7,  7,  7,  7, 21, 22,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7, 23, 24, 25, 26, 27,
+      7,  7, 28,  7, 29,  7,  7, 30,   31, 32,  7, 33,  7, 34, 35, 36,
+
+#define to_EUC_JP_E6_BC_offsets 13867
+128, 191,
+      1,  2,  3,  1,  4,  1,  5,  1,    6,  7,  8,  1,  9, 10,  1, 11,
+      1, 12,  1, 13, 14, 15, 16,  1,   17,  1, 18, 19,  1,  1,  1,  1,
+     20,  1, 21, 22,  1,  1, 23,  1,    1, 24, 25, 26, 27, 28,  1, 29,
+     30, 31, 32, 33,  1,  1, 34,  1,   35,  1,  1, 36, 37,  1, 38, 39,
+
+#define to_EUC_JP_E6_BD_offsets 13933
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  5,  6,  7,  8,  1,  1,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+      1, 18, 19,  1, 20,  1, 21,  1,   22,  1,  1,  1, 23, 24, 25, 26,
+     27,  1,  1,  1, 28,  1,  1,  1,   29,  1, 30,  1, 31, 32, 33,  1,
+
+#define to_EUC_JP_E6_BE_offsets 13999
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  6,  6, 10, 11, 12, 13,  6,
+     14, 15, 16, 17, 18,  6, 19, 20,    6,  6, 21,  6,  6,  6,  6, 22,
+     23, 24,  6, 25, 26, 27, 28, 29,   30,  6, 31,  6,  6,  6, 32, 33,
+     34, 35,  6, 36,  6, 37, 38,  6,    6, 39,  6,  6, 40,  6,  6,  6,
+
+#define to_EUC_JP_E6_BF_offsets 14065
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  5, 10,  5,  5,  5,  5,  5,
+      5,  5,  5,  5, 11, 12,  5,  5,   13,  5, 14, 15,  5,  5, 16, 17,
+     18, 19,  5,  5, 20,  5,  5,  5,   21, 22,  5, 23, 24,  5, 25, 26,
+     27, 28,  5, 29,  5, 30, 31,  5,    5, 32, 33,  5, 34, 35, 36,  5,
+
+#define to_EUC_JP_E7_80_offsets 14131
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  6,    3,  7,  3,  8,  3,  9,  3, 10,
+      3, 11,  3,  3,  3, 12,  3, 13,   14,  3, 15, 16,  3, 17, 18, 19,
+     20,  3,  3, 21,  3,  3, 22, 23,    3,  3,  3,  3, 24,  3,  3, 25,
+     26,  3, 27,  3, 28,  3,  3, 29,    3, 30,  3,  3, 31,  3, 32,  3,
+
+#define to_EUC_JP_E7_81_offsets 14197
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  7,  8,  1,  9,  1,
+      1, 10,  1,  1, 11, 12,  1,  1,   13,  1,  1,  1,  1, 14, 15,  1,
+      1,  1,  1, 16, 17, 18,  1,  1,    1,  1,  1, 19, 20,  1, 21, 22,
+     23,  1,  1,  1,  1, 24, 25,  1,   26,  1,  1,  1, 27, 28, 29,  1,
+
+#define to_EUC_JP_E7_82_offsets 14263
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  5,  6,  1,  1,  1,  7,  1,
+      1,  1,  8,  1,  9, 10, 11, 12,   13, 14,  1, 15,  1,  1,  1,  1,
+      1,  1,  1,  1, 16,  1,  1,  1,    1,  1,  1, 17, 18, 19, 20, 21,
+     22, 23,  1, 24, 25,  1,  1, 26,   27, 28, 29,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E7_83_offsets 14329
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  4,  1,  1,  1,  5,
+      1,  6,  1,  7,  8,  9, 10,  1,   11, 12,  1,  1, 13, 14,  1, 15,
+      1,  1,  1,  1, 16,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 17,  1,  1,  1,  1,  1,  1,    1, 18, 19,  1,  1, 20,  1,  1,
+
+#define to_EUC_JP_E7_84_offsets 14395
+128, 191,
+      1,  1,  1,  2,  3,  4,  5,  6,    1,  7,  1,  8,  9,  1,  1, 10,
+      1,  1,  1,  1, 11,  1,  1,  1,    1, 12, 13,  1, 14,  1, 15,  1,
+     16, 17,  1,  1,  1,  1, 18,  1,    1,  1,  1, 19,  1, 20,  1, 21,
+     22, 23,  1,  1,  1,  1, 24,  1,   25,  1,  1,  1, 26,  1,  1,  1,
+
+#define to_EUC_JP_E7_85_offsets 14461
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  5,    1,  6,  7,  8,  9,  1, 10,  1,
+     11,  1, 12,  1,  1, 13, 14, 15,    1, 16, 17,  1, 18,  1, 19,  1,
+     20,  1, 21,  1, 22, 23, 24, 25,   26, 27,  1,  1, 28,  1, 29,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 30,  1,  1,  1, 31,  1,  1,
+
+#define to_EUC_JP_E7_86_offsets 14527
+128, 191,
+      1,  2,  2,  2,  3,  4,  2,  5,    6,  2,  7,  2,  8,  2,  2,  9,
+      2,  2, 10,  2, 11, 12,  2,  2,    2, 13, 14, 15,  2,  2,  2, 16,
+     17,  2, 18,  2,  2,  2,  2,  2,   19,  2,  2,  2, 20,  2,  2, 21,
+     22, 23, 24, 25,  2,  2,  2,  2,    2, 26, 27,  2,  2,  2, 28, 29,
+
+#define to_EUC_JP_E7_87_offsets 14593
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  3,    6,  7,  3,  8,  9,  3, 10,  3,
+     11,  3, 12, 13, 14, 15, 16, 17,    3, 18, 19,  3, 20,  3,  3, 21,
+     22,  3,  3,  3,  3, 23, 24, 25,    3,  3,  3,  3, 26, 27, 28,  3,
+      3,  3,  3,  3,  3, 29,  3,  3,   30, 31,  3, 32, 33,  3, 34, 35,
+
+#define to_EUC_JP_E7_88_offsets 14659
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    5,  6,  2,  2,  2,  7,  2,  2,
+      8,  2,  2,  9,  2,  2,  2, 10,    2,  2, 11, 12,  2, 13,  2, 14,
+      2,  2,  2,  2, 15,  2,  2,  2,   16,  2, 17, 18, 19, 20,  2, 21,
+     22,  2, 23,  2, 24, 25, 26,  2,   27, 28, 29, 30, 31, 32, 33, 34,
+
+#define to_EUC_JP_E7_89_offsets 14725
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  5,  5, 10, 11,  5, 12, 13,
+     14,  5, 15, 16,  5, 17, 18,  5,   19, 20, 21, 22, 23, 24, 25, 26,
+     27, 28, 29, 30,  5,  5,  5, 31,   32, 33,  5, 34,  5,  5, 35, 36,
+      5, 37, 38,  5, 39,  5,  5, 40,   41, 42,  5, 43, 44, 45, 46, 47,
+
+#define to_EUC_JP_E7_8A_offsets 14791
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    4,  7,  4,  4,  4,  8,  9,  4,
+      4,  4, 10, 11,  4,  4, 12,  4,    4,  4,  4, 13,  4,  4,  4,  4,
+     14,  4, 15,  4,  4,  4,  4, 16,   17,  4,  4,  4, 18, 19, 20, 21,
+      4, 22, 23,  4, 24,  4, 25,  4,    4, 26,  4,  4,  4,  4, 27,  4,
+
+#define to_EUC_JP_E7_8B_offsets 14857
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  7,    1,  8,  1,  1,  9,  1, 10,  1,
+     11,  1, 12,  1,  1, 13, 14, 15,   16, 17,  1, 18,  1,  1,  1, 19,
+     20, 21, 22,  1,  1, 23,  1,  1,    1, 24,  1,  1, 25, 26,  1,  1,
+      1,  1,  1, 27, 28,  1,  1, 29,   30, 31, 32, 33, 34, 35, 36,  1,
+
+#define to_EUC_JP_E7_8C_offsets 14923
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  5,    1,  1,  6,  7,  1,  8,  1,  1,
+      1,  1,  9, 10,  1,  1, 11, 12,   13, 14,  1, 15, 16, 17, 18, 19,
+      1,  1, 20,  1, 21, 22,  1, 23,   24, 25, 26, 27, 28,  1, 29, 30,
+      1, 31, 32,  1, 33, 34, 35, 36,    1,  1, 37, 38,  1, 39, 40, 41,
+
+#define to_EUC_JP_E7_8D_offsets 14989
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  1,    1,  1,  1,  1,  1,  5,  6,  7,
+      8,  1,  9,  1,  1,  1, 10, 11,   12,  1,  1,  1,  1, 13, 14, 15,
+     16,  1,  1, 17,  1,  1, 18, 19,   20, 21, 22, 23, 24,  1, 25, 26,
+     27, 28, 29,  1,  1, 30,  1, 31,   32, 33, 34, 35, 36,  1,  1,  1,
+
+#define to_EUC_JP_E7_8E_offsets 15055
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    3,  9,  3, 10,  3,  3, 11,  3,
+     12,  3,  3, 13,  3, 14, 15, 16,   17,  3,  3,  3, 18,  3, 19, 20,
+     21,  3, 22,  3,  3, 23, 24,  3,    3, 25, 26, 27,  3, 28,  3,  3,
+      3,  3, 29, 30,  3, 31,  3, 32,    3, 33,  3, 34, 35, 36,  3, 37,
+
+#define to_EUC_JP_E7_8F_offsets 15121
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    6,  7,  8,  9, 10, 11, 12, 13,
+      2,  2, 14, 15,  2,  2, 16,  2,    2, 17,  2,  2,  2, 18, 19,  2,
+     20, 21,  2, 22,  2, 23, 24, 25,    2, 26, 27,  2,  2, 28, 29,  2,
+      2, 30,  2,  2, 31, 32,  2, 33,   34, 35, 36, 37,  2, 38, 39, 40,
+
+#define to_EUC_JP_E7_90_offsets 15187
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    3,  9, 10,  3,  3,  3,  3,  3,
+      3, 11,  3,  3,  3,  3,  3,  3,    3,  3, 12, 13,  3,  3,  3,  3,
+      3,  3, 14,  3, 15, 16, 17,  3,   18, 19, 20, 21, 22, 23, 24, 25,
+     26, 27, 28, 29, 30, 31, 32,  3,    3, 33, 34,  3,  3,  3,  3, 35,
+
+#define to_EUC_JP_E7_91_offsets 15253
+128, 191,
+      1,  2,  3,  4,  5,  3,  6,  7,    3,  3,  3,  8,  3,  9,  3,  3,
+      3, 10, 11,  3,  3, 12,  3, 13,    3, 14, 15, 16, 17, 18, 19, 20,
+     21,  3, 22, 23, 24,  3, 25, 26,   27, 28, 29, 30,  3, 31, 32, 33,
+     34, 35, 36, 37,  3,  3, 38,  3,    3,  3,  3,  3,  3,  3, 39,  3,
+
+#define to_EUC_JP_E7_92_offsets 15319
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    3,  8,  3,  9,  3,  3,  3, 10,
+     11, 12, 13,  3,  3,  3,  3,  3,   14, 15, 16,  3, 17,  3, 18, 19,
+     20, 21, 22, 23,  3,  3, 24, 25,   26, 27, 28, 29,  3,  3, 30, 31,
+     32, 33, 34,  3,  3, 35,  3,  3,    3, 36,  3, 37,  3, 38,  3, 39,
+
+#define to_EUC_JP_E7_93_offsets 15385
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  1,  5,  1,  1,  6,
+      7,  1,  1,  8,  9,  1,  1,  1,   10,  1, 11, 12, 13,  1, 14, 15,
+     16,  1, 17, 18, 19,  1, 20, 21,   22, 23, 24, 25,  1,  1, 26, 27,
+     28, 29, 30,  1, 31,  1, 32, 33,   34,  1, 35, 36, 37,  1,  1, 38,
+
+#define to_EUC_JP_E7_94_offsets 15451
+128, 191,
+      1,  1,  1,  2,  3,  4,  5,  1,    1,  1,  1,  1,  6,  7,  8,  1,
+      1,  9, 10, 11,  1, 12, 13, 14,   15,  1, 16,  1, 17,  1, 18, 19,
+     20, 21,  1, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31,  1,  1, 32,
+     33, 34, 35, 36,  1,  1, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+
+#define to_EUC_JP_E7_95_offsets 15517
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17,  2, 18,  2,  2, 19,    2, 20, 21, 22, 23, 24, 25, 26,
+     27, 28, 29,  2, 30, 31, 32, 33,    2, 34, 35, 36,  2, 37,  2, 38,
+     39, 40,  2, 41, 42,  2, 43, 44,   45, 46, 47, 48, 49, 50, 51, 52,
+
+#define to_EUC_JP_E7_96_offsets 15583
+128, 191,
+      1,  2,  3,  1,  1,  4,  5,  6,    1,  7,  8,  9,  1,  1, 10, 11,
+     12, 13, 14, 15, 16, 17,  1,  1,    1, 18, 19,  1, 20, 21,  1,  1,
+      1,  1, 22, 23, 24, 25,  1,  1,    1,  1,  1, 26,  1,  1,  1,  1,
+      1, 27, 28, 29, 30, 31,  1,  1,   32, 33, 34,  1, 35, 36, 37, 38,
+
+#define to_EUC_JP_E7_97_offsets 15649
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  9, 10,  9, 11, 12, 13, 14,
+      9,  9, 15,  9, 16, 17,  9, 18,   19, 20,  9, 21, 22,  9, 23, 24,
+     25, 26, 27, 28, 29,  9,  9, 30,    9, 31,  9,  9, 32,  9, 33, 34,
+     35, 36, 37, 38, 39,  9,  9,  9,    9, 40, 41,  9, 42,  9, 43, 44,
+
+#define to_EUC_JP_E7_98_offsets 15715
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  9, 10, 11, 12, 13,  6, 14,
+      6,  6, 15, 16,  6, 17, 18,  6,    6, 19,  6, 20, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,    6, 33,  6,  6,  6, 34,  6,  6,
+     35,  6, 36, 37, 38, 39,  6,  6,   40, 41, 42, 43, 44,  6,  6,  6,
+
+#define to_EUC_JP_E7_99_offsets 15781
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 14, 14,
+     14, 14, 15, 14, 14, 16, 17, 14,   18, 19, 14, 14, 20, 14, 14, 21,
+     14, 22, 23, 14, 24, 25, 14, 26,   27, 28, 29, 14, 30, 31, 32, 33,
+     34, 35, 36, 14, 37, 14, 38, 14,   39, 14, 40, 41, 42, 43, 44, 14,
+
+#define to_EUC_JP_E7_9A_offsets 15847
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  3,  3, 10, 11, 12, 13,  3,
+     14,  3,  3, 15,  3, 16, 17,  3,    3, 18, 19, 20, 21, 22,  3, 23,
+     24,  3, 25, 26, 27, 28, 29, 30,   31,  3, 32,  3,  3, 33, 34,  3,
+     35,  3,  3,  3, 36,  3,  3, 37,   38, 39, 40,  3,  3, 41,  3, 42,
+
+#define to_EUC_JP_E7_9B_offsets 15913
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  1,    7,  8,  9, 10, 11, 12, 13,  1,
+      1,  1, 14,  1, 15,  1, 16, 17,    1, 18,  1, 19, 20,  1, 21, 22,
+     23, 24,  1, 25, 26, 27, 28, 29,   30,  1, 31,  1, 32,  1, 33,  1,
+     34, 35, 36,  1, 37,  1, 38,  1,   39, 40,  1, 41, 42,  1, 43,  1,
+
+#define to_EUC_JP_E7_9C_offsets 15979
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  6,    7,  8,  9, 10, 11,  3, 12,  3,
+      3,  3, 13,  3, 14, 15,  3, 16,    3, 17, 18, 19, 20,  3, 21, 22,
+     23,  3, 24,  3, 25, 26, 27,  3,   28, 29,  3,  3,  3, 30, 31, 32,
+      3,  3,  3,  3, 33, 34, 35, 36,   37, 38, 39,  3, 40, 41, 42,  3,
+
+#define to_EUC_JP_E7_9D_offsets 16045
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  6,    2,  2,  7,  2,  2,  8,  9, 10,
+      2,  2, 11,  2,  2,  2, 12, 13,    2,  2, 14, 15, 16,  2, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27,  2, 28, 29, 30,  2,  2,  2,
+     31,  2, 32, 33, 34,  2,  2,  2,    2, 35, 36,  2,  2, 37, 38, 39,
+
+#define to_EUC_JP_E7_9E_offsets 16111
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  4,  5,  6,  7,  2,
+      2,  8,  2,  2,  9, 10, 11,  2,    2,  2, 12,  2,  2,  2, 13, 14,
+     15,  2, 16,  2,  2, 17,  2, 18,    2,  2, 19,  2, 20, 21, 22, 23,
+     24, 25,  2, 26,  2, 27, 28,  2,    2, 29,  2, 30, 31, 32, 33, 34,
+
+#define to_EUC_JP_E7_9F_offsets 16177
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  4,  1,  1,  1,  5,  1,  1,
+      1,  6,  7,  1,  1,  8,  1,  9,    1, 10, 11, 12, 13,  1, 14, 15,
+     16,  1, 17, 18, 19, 20, 21, 22,    1, 23, 24,  1, 25, 26, 27, 28,
+     29, 30,  1, 31, 32,  1,  1,  1,   33,  1,  1, 34, 35,  1,  1,  1,
+
+#define to_EUC_JP_E7_A0_offsets 16243
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  1,    1,  5,  1,  1,  6,  7,  8,  1,
+      1,  9, 10,  1, 11, 12,  1,  1,    1,  1,  1,  1,  1, 13,  1,  1,
+     14, 15, 16, 17,  1, 18, 19, 20,    1,  1,  1,  1,  1, 21, 22,  1,
+     23,  1, 24,  1, 25, 26,  1, 27,    1,  1, 28,  1,  1,  1,  1, 29,
+
+#define to_EUC_JP_E7_A1_offsets 16309
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  1,  1,  1,  7,  1,  8,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10, 11, 12,  1,
+     13, 14,  1, 15, 16,  1,  1,  1,   17,  1, 18, 19, 20,  1, 21, 22,
+      1,  1, 23,  1, 24,  1,  1,  1,    1,  1, 25,  1, 26,  1, 27,  1,
+
+#define to_EUC_JP_E7_A2_offsets 16375
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  4,    1,  1,  5,  1,  6,  7,  8,  9,
+      1, 10,  1, 11, 12, 13,  1, 14,   15,  1, 16,  1,  1, 17, 18, 19,
+      1, 20,  1, 21, 22,  1,  1, 23,   24, 25, 26,  1, 27, 28,  1, 29,
+     30, 31, 32, 33,  1, 34,  1,  1,    1,  1, 35, 36, 37, 38, 39, 40,
+
+#define to_EUC_JP_E7_A3_offsets 16441
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  5,    6,  7,  8,  9, 10,  1, 11,  1,
+     12, 13, 14, 15, 16, 17, 18,  1,    1,  1, 19, 20,  1,  1,  1, 21,
+     22, 23,  1,  1, 24,  1, 25, 26,   27,  1, 28,  1, 29,  1,  1, 30,
+      1,  1, 31, 32, 33,  1, 34, 35,    1,  1, 36, 37,  1, 38,  1, 39,
+
+#define to_EUC_JP_E7_A4_offsets 16507
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    3,  3,  3,  3,  6,  3,  7,  3,
+      8,  9, 10,  3,  3,  3,  3,  3,    3, 11, 12,  3, 13,  3, 14, 15,
+     16,  3,  3,  3,  3, 17, 18, 19,    3, 20, 21, 22, 23, 24,  3,  3,
+      3, 25,  3,  3, 26, 27,  3,  3,    3,  3, 28, 29, 30, 31, 32, 33,
+
+#define to_EUC_JP_E7_A5_offsets 16573
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    8,  9, 10, 11,  3,  3,  3, 12,
+     13, 14,  3, 15, 16, 17, 18, 19,   20,  3, 21, 22, 23, 24, 25, 26,
+     27,  3, 28,  3,  3, 29,  3, 30,   31, 32,  3, 33,  3, 34,  3,  3,
+      3,  3, 35,  3,  3,  3,  3, 36,    3, 37, 38, 39, 40,  3, 41, 42,
+
+#define to_EUC_JP_E7_A6_offsets 16639
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    3,  3,  6,  7,  8,  9, 10, 11,
+      3, 12,  3, 13, 14, 15, 16,  3,   17,  3,  3, 18, 19, 20,  3,  3,
+      3, 21,  3,  3,  3,  3, 22, 23,   24, 25, 26, 27,  3,  3, 28, 29,
+     30, 31,  3, 32, 33,  3,  3,  3,   34, 35, 36, 37,  3, 38, 39, 40,
+
+#define to_EUC_JP_E7_A7_offsets 16705
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  9, 10,  4,  4,  4, 11,
+      4, 12, 13,  4, 14, 15, 16,  4,   17,  4, 18,  4,  4, 19, 20, 21,
+     22, 23, 24, 25, 26, 27, 28, 29,    4, 30, 31, 32, 33, 34,  4,  4,
+     35, 36,  4,  4,  4,  4,  4,  4,   37,  4,  4, 38, 39,  4,  4,  4,
+
+#define to_EUC_JP_E7_A8_offsets 16771
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  7,  8,  9, 10, 11, 12,  2,
+      2, 13,  2,  2, 14, 15,  2, 16,   17, 18, 19, 20, 21,  2, 22, 23,
+     24, 25,  2,  2,  2,  2,  2, 26,    2,  2,  2, 27,  2, 28, 29, 30,
+     31, 32, 33,  2, 34, 35,  2, 36,   37, 38, 39, 40, 41, 42, 43, 44,
+
+#define to_EUC_JP_E7_A9_offsets 16837
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  2,  2, 11, 12, 13, 14,
+     15,  2,  2,  2,  2, 16, 17, 18,    2, 19,  2,  2, 20, 21,  2, 22,
+     23, 24, 25, 26,  2, 27,  2, 28,    2, 29, 30, 31,  2, 32,  2,  2,
+     33,  2,  2,  2, 34, 35, 36,  2,   37, 38, 39,  2,  2, 40, 41, 42,
+
+#define to_EUC_JP_E7_AA_offsets 16903
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  8, 10, 11,  8,  8,  8,  8,
+     12, 13, 14, 15, 16, 17, 18, 19,   20,  8,  8,  8,  8,  8, 21, 22,
+     23,  8,  8, 24,  8,  8,  8,  8,    8, 25, 26,  8, 27,  8, 28, 29,
+     30,  8,  8, 31,  8, 32, 33,  8,    8, 34, 35, 36, 37,  8,  8, 38,
+
+#define to_EUC_JP_E7_AB_offsets 16969
+128, 191,
+      1,  1,  1,  2,  3,  4,  5,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+      1, 15, 16, 17,  1, 18,  1,  1,    1, 19, 20, 21, 22, 23,  1, 24,
+     25, 26, 27, 28,  1, 29, 30,  1,   31, 32, 33, 34, 35, 36,  1, 37,
+     38, 39,  1,  1, 40,  1, 41,  1,   42, 43, 44, 45,  1, 46, 47, 48,
+
+#define to_EUC_JP_E7_AC_offsets 17035
+128, 191,
+      1,  1,  2,  1,  3,  1,  4,  5,    6,  1,  7,  8,  1,  1,  1,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,   12, 13,  1, 14,  1,  1, 15, 16,
+     17,  1,  1, 18,  1, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31,  1, 32, 33, 34, 35,  1,    1, 36,  1,  1,  1, 37,  1, 38,
+
+#define to_EUC_JP_E7_AD_offsets 17101
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  6,    7,  8,  3,  9, 10, 11, 12, 13,
+     14, 15, 16,  3, 17, 18, 19,  3,    3,  3,  3,  3,  3, 20,  3,  3,
+     21,  3,  3,  3, 22, 23, 24, 25,    3, 26, 27,  3, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37,  3, 38,    3,  3, 39,  3,  3,  3,  3,  3,
+
+#define to_EUC_JP_E7_AE_offsets 17167
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  5,  1,  6,  1,  7,  8,  9,
+     10, 11, 12,  1, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26,  1,  1,  1, 27,  1,  1,    1,  1, 28,  1, 29, 30,  1, 31,
+     32, 33, 34,  1, 35, 36, 37,  1,   38,  1, 39, 40, 41, 42,  1,  1,
+
+#define to_EUC_JP_E7_AF_offsets 17233
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  4,  4, 14,
+      4,  4,  4,  4, 15,  4, 16, 17,    4, 18, 19, 20,  4, 21,  4,  4,
+     22,  4,  4,  4, 23, 24, 25,  4,   26, 27, 28,  4,  4, 29,  4,  4,
+      4,  4, 30, 31, 32, 33, 34, 35,   36, 37, 38,  4, 39,  4, 40,  4,
+
+#define to_EUC_JP_E7_B0_offsets 17299
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    6,  9,  6, 10, 11, 12, 13, 14,
+      6, 15, 16, 17, 18,  6,  6, 19,    6, 20,  6, 21,  6,  6,  6, 22,
+     23, 24,  6, 25,  6, 26, 27, 28,   29,  6, 30, 31, 32,  6,  6,  6,
+      6, 33,  6, 34, 35,  6, 36, 37,   38, 39, 40,  6,  6, 41, 42, 43,
+
+#define to_EUC_JP_E7_B1_offsets 17365
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  2,    2,  2,  5,  2,  6,  7,  2,  8,
+      9, 10, 11, 12, 13, 14, 15,  2,   16, 17, 18, 19, 20, 21, 22, 23,
+     24, 25,  2, 26, 27, 28,  2, 29,    2, 30,  2,  2, 31, 32, 33,  2,
+     34,  2, 35, 36,  2, 37,  2,  2,    2, 38,  2,  2, 39, 40, 41,  2,
+
+#define to_EUC_JP_E7_B2_offsets 17431
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  6,    1,  7,  1,  8,  1,  9,  1, 10,
+     11,  1, 12,  1, 13, 14,  1, 15,   16,  1,  1, 17,  1,  1, 18, 19,
+     20, 21, 22,  1, 23, 24, 25, 26,   27,  1,  1, 28,  1, 29, 30,  1,
+     31, 32, 33, 34,  1,  1, 35, 36,    1, 37, 38, 39, 40, 41, 42, 43,
+
+#define to_EUC_JP_E7_B3_offsets 17497
+128, 191,
+      1,  2,  3,  2,  4,  5,  2,  6,    7,  8,  9,  2,  2, 10, 11, 12,
+      2,  2, 13, 14, 15, 16, 17, 18,   19, 20, 21,  2, 22, 23, 24, 25,
+     26,  2, 27,  2,  2,  2, 28, 29,    2, 30,  2, 31,  2,  2,  2, 32,
+      2,  2, 33,  2, 34, 35, 36,  2,   37,  2, 38, 39,  2,  2, 40,  2,
+
+#define to_EUC_JP_E7_B4_offsets 17563
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12,  2, 13,  2, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29,  2,
+     30, 31, 32, 33,  2,  2, 34,  2,    2,  2, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44,  2, 45,  2,  2,    2, 46, 47,  2, 48, 49, 50, 51,
+
+#define to_EUC_JP_E7_B5_offsets 17629
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 10, 11, 12, 13, 14, 15,
+     16, 17, 10, 18, 10, 10, 19, 20,   10, 21, 22, 23, 24, 25, 26, 10,
+     10, 27, 28, 29, 10, 30, 31, 32,   33, 10, 34, 10, 10, 10, 35, 10,
+     36, 37, 38, 39, 10, 40, 41, 10,   42, 43, 44, 45, 10, 46, 10, 47,
+
+#define to_EUC_JP_E7_B6_offsets 17695
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  1,    7,  8,  1,  9, 10, 11,  1, 12,
+      1, 13,  1, 14,  1,  1, 15, 16,    1, 17, 18, 19, 20, 21, 22, 23,
+      1,  1, 24, 25,  1,  1, 26, 27,    1,  1, 28, 29, 30, 31, 32, 33,
+     34, 35, 36, 37, 38, 39, 40, 41,   42, 43, 44, 45,  1, 46, 47, 48,
+
+#define to_EUC_JP_E7_B7_offsets 17761
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    1,  1,  8,  9, 10, 11, 12, 13,
+      1, 14, 15,  1,  1, 16,  1, 17,   18, 19, 20,  1, 21, 22, 23,  1,
+     24, 25, 26,  1, 27, 28, 29,  1,   30, 31, 32, 33, 34, 35,  1, 36,
+      1, 37, 38,  1, 39, 40, 41,  1,    1, 42, 43, 44,  1,  1,  1,  1,
+
+#define to_EUC_JP_E7_B8_offsets 17827
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    6,  7,  8,  9,  3,  3,  3,  3,
+     10, 11, 12,  3,  3, 13,  3, 14,    3,  3,  3, 15, 16, 17, 18, 19,
+     20, 21, 22, 23,  3,  3, 24, 25,   26,  3,  3, 27, 28, 29, 30, 31,
+      3, 32, 33, 34,  3, 35, 36, 37,    3, 38, 39, 40,  3, 41, 42, 43,
+
+#define to_EUC_JP_E7_B9_offsets 17893
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    1,  1,  8,  9,  1, 10, 11,  1,
+     12,  1, 13,  1, 14, 15, 16,  1,   17, 18, 19,  1,  1, 20, 21, 22,
+      1, 23, 24,  1,  1, 25, 26, 27,    1, 28, 29, 30,  1, 31, 32, 33,
+     34,  1,  1, 35,  1,  1,  1,  1,   36, 37,  1, 38, 39, 40, 41, 42,
+
+#define to_EUC_JP_E7_BA_offsets 17959
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  6,    7,  8,  9,  1, 10, 11, 12, 13,
+     14, 15, 16, 17, 18, 19, 20,  1,   21,  1, 22, 23, 24, 25, 26,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E7_BC_offsets 18025
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  1,  4,  5,  6,  7,  8,  9,
+
+#define to_EUC_JP_E7_BD_offsets 18091
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    1,  1,  1,  1,  6,  7,  8,  9,
+     10, 11, 12, 13, 14, 15,  1,  1,   16,  1,  1, 17, 18, 19,  1, 20,
+     21, 22,  1, 23, 24, 25, 26, 27,   28, 29, 30, 31,  1, 32, 33,  1,
+     34, 35, 36,  1,  1, 37,  1, 38,   39, 40,  1,  1,  1, 41, 42, 43,
+
+#define to_EUC_JP_E7_BE_offsets 18157
+128, 191,
+      1,  2,  3,  4,  2,  5,  6,  7,    8,  2,  9, 10, 11, 12, 13, 14,
+     15, 16,  2,  2, 17,  2, 18, 19,    2,  2, 20,  2, 21, 22, 23,  2,
+      2, 24, 25, 26, 27,  2, 28,  2,   29, 30, 31,  2,  2, 32, 33, 34,
+      2,  2, 35,  2, 36,  2, 37,  2,   38, 39,  2,  2, 40, 41,  2, 42,
+
+#define to_EUC_JP_E7_BF_offsets 18223
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  3,    7,  3,  8,  3,  9,  3, 10, 11,
+      3,  3, 12,  3, 13, 14,  3,  3,    3,  3,  3, 15,  3,  3,  3, 16,
+     17, 18,  3, 19,  3, 20, 21,  3,   22, 23,  3, 24, 25,  3, 26, 27,
+     28,  3, 29, 30,  3,  3,  3,  3,    3, 31, 32, 33, 34, 35, 36, 37,
+
+#define to_EUC_JP_E8_80_offsets 18289
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  3, 10, 11, 12, 13, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25,  3,  3, 26, 27, 28, 29,
+     30, 31,  3,  3, 32,  3, 33,  3,   34,  3,  3,  3, 35,  3, 36,  3,
+     37,  3,  3, 38, 39, 40, 41, 42,    3, 43, 44, 45, 46, 47, 48, 49,
+
+#define to_EUC_JP_E8_81_offsets 18355
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  5,  2,  2,  2,  2,  2,
+      2,  2,  6,  2,  2,  2,  7,  2,    8,  2,  9,  2,  2,  2, 10, 11,
+     12, 13, 14,  2, 15,  2, 16,  2,   17,  2,  2,  2,  2, 18,  2, 19,
+     20, 21, 22, 23, 24, 25, 26, 27,    2, 28,  2,  2,  2, 29, 30, 31,
+
+#define to_EUC_JP_E8_82_offsets 18421
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  6,    7,  8,  1,  9, 10,  1, 11,  1,
+      1,  1,  1, 12,  1,  1, 13,  1,   14,  1, 15, 16, 17, 18, 19,  1,
+      1, 20, 21,  1,  1, 22, 23, 24,    1, 25, 26, 27, 28, 29,  1, 30,
+      1, 31, 32,  1, 33,  1,  1,  1,   34, 35, 36,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E8_83_offsets 18487
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    5,  1,  1,  1,  6,  7,  8,  9,
+      1,  1, 10,  1, 11, 12, 13, 14,   15, 16, 17, 18,  1, 19, 20,  1,
+     21, 22,  1,  1, 23, 24,  1,  1,    1,  1,  1,  1,  1, 25, 26, 27,
+     28, 29, 30, 31, 32,  1, 33,  1,   34, 35, 36,  1, 37, 38, 39,  1,
+
+#define to_EUC_JP_E8_84_offsets 18553
+128, 191,
+      1,  1,  2,  3,  1,  4,  5,  6,    7,  8,  9, 10,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11, 12,   13,  1, 14, 15, 16,  1, 17,  1,
+     18,  1,  1, 19, 20,  1,  1, 21,    1, 22,  1,  1, 23,  1,  1, 24,
+     25, 26,  1, 27,  1, 28,  1,  1,    1, 29, 30,  1, 31,  1, 32,  1,
+
+#define to_EUC_JP_E8_85_offsets 18619
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  4,    1,  1,  5,  6,  7,  1,  8,  1,
+      9, 10, 11, 12, 13, 14,  1, 15,    1,  1,  1,  1,  1,  1,  1, 16,
+     17, 18,  1,  1,  1, 19, 20, 21,   22, 23,  1, 24,  1, 25, 26, 27,
+     28, 29,  1,  1, 30,  1,  1, 31,   32, 33, 34,  1,  1,  1,  1, 35,
+
+#define to_EUC_JP_E8_86_offsets 18685
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  8, 10, 11,  8,  8, 12, 13,
+     14,  8,  8, 15,  8, 16, 17,  8,   18,  8, 19, 20, 21, 22, 23,  8,
+     24,  8, 25, 26, 27,  8,  8,  8,   28, 29,  8,  8,  8,  8, 30,  8,
+     31,  8, 32, 33, 34, 35,  8,  8,   36,  8, 37, 38,  8, 39, 40, 41,
+
+#define to_EUC_JP_E8_87_offsets 18751
+128, 191,
+      1,  2,  3,  4,  2,  5,  6,  2,    7,  8,  9, 10,  2, 11, 12, 13,
+      2, 14,  2, 15,  2, 16,  2, 17,   18, 19, 20, 21,  2, 22, 23, 24,
+     25, 26,  2, 27, 28, 29,  2, 30,   31,  2, 32, 33, 34, 35,  2,  2,
+     36, 37, 38, 39, 40, 41, 42,  2,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_EUC_JP_E8_88_offsets 18817
+128, 191,
+      1,  2,  3,  4,  5,  6,  5,  7,    8,  9, 10,  5, 11, 12, 13, 14,
+     15,  5, 16, 17, 18,  5, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+      5, 29, 30,  5,  5,  5,  5,  5,   31, 32, 33, 34, 35,  5, 36,  5,
+      5,  5, 37, 38, 39, 40, 41, 42,   43, 44, 45,  5,  5,  5,  5,  5,
+
+#define to_EUC_JP_E8_89_offsets 18883
+128, 191,
+      1,  2,  2,  3,  4,  5,  6,  7,    2,  2,  2,  8,  2,  2,  9, 10,
+      2, 11,  2,  2,  2,  2, 12,  2,   13, 14, 15,  2, 16, 17,  2, 18,
+     19,  2, 20, 21, 22,  2, 23, 24,   25,  2, 26, 27,  2, 28, 29, 30,
+      2, 31, 32,  2, 33,  2, 34, 35,   36,  2,  2, 37,  2, 38, 39, 40,
+
+#define to_EUC_JP_E8_8A_offsets 18949
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  6,    3,  7,  8,  9,  3, 10, 11,  3,
+      3, 12, 13,  3, 14,  3, 15,  3,   16, 17, 18, 19,  3, 20,  3, 21,
+     22, 23,  3, 24, 25, 26, 27, 28,   29, 30, 31, 32, 33, 34, 35, 36,
+     37, 38, 39, 40, 41,  3,  3, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_EUC_JP_E8_8B_offsets 19015
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  6,  7,  8,  9,  1, 10,    1, 11, 12, 13, 14,  1, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25,  1, 26, 27,  1, 28,  1, 29,
+      1, 30,  1, 31, 32,  1, 33, 34,    1, 35, 36, 37,  1, 38, 39,  1,
+
+#define to_EUC_JP_E8_8C_offsets 19081
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 13, 14, 13,
+     13, 13, 13, 13, 13, 13, 15, 16,   17, 13, 13, 18, 19, 20, 21, 22,
+     13, 23, 24, 25, 13, 13, 13, 13,   26, 13, 13, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 13, 43, 44, 13, 13,
+
+#define to_EUC_JP_E8_8D_offsets 19147
+128, 191,
+      1,  2,  3,  4,  5,  6,  2,  7,    2,  8,  9,  2,  2, 10, 11, 12,
+     13, 14, 15, 16, 17, 18, 19, 20,   21,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+     22,  2,  2, 23,  2, 24,  2, 25,   26,  2,  2, 27, 28, 29,  2, 30,
+
+#define to_EUC_JP_E8_8E_offsets 19213
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  7,    2,  8,  9,  2,  2, 10, 11,  2,
+      2,  2, 12, 13, 14, 15, 16,  2,   17, 18, 19, 20, 21, 22, 23, 24,
+     25,  2, 26,  2,  2,  2, 27, 28,   29, 30, 31, 32, 33, 34,  2,  2,
+      2, 35,  2,  2,  2, 36,  2,  2,    2,  2,  2,  2,  2, 37, 38, 39,
+
+#define to_EUC_JP_E8_8F_offsets 19279
+128, 191,
+      1,  2,  3,  3,  3,  4,  3,  5,    3,  6,  7,  3,  8,  3,  9, 10,
+     11, 12,  3, 13, 14,  3, 15,  3,   16,  3,  3,  3, 17, 18,  3, 19,
+     20,  3,  3,  3,  3,  3,  3,  3,   21, 22, 23, 24,  3,  3,  3, 25,
+     26, 27, 28,  3, 29,  3, 30, 31,   32, 33,  3, 34, 35, 36,  3,  3,
+
+#define to_EUC_JP_E8_90_offsets 19345
+128, 191,
+      1,  2,  1,  3,  4,  1,  5,  6,    1,  1,  7,  8,  9, 10, 11, 12,
+      1, 13,  1, 14,  1, 15,  1,  1,    1, 16,  1,  1,  1,  1,  1,  1,
+     17,  1, 18,  1,  1,  1,  1,  1,    1, 19, 20,  1, 21,  1,  1, 22,
+      1, 23,  1,  1,  1, 24,  1,  1,   25, 26,  1,  1, 27, 28,  1,  1,
+
+#define to_EUC_JP_E8_91_offsets 19411
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  4,    5,  6,  7,  1,  1,  8,  9, 10,
+      1, 11, 12,  1,  1,  1, 13, 14,   15, 16, 17, 18, 19,  1,  1,  1,
+     20, 21, 22, 23, 24, 25, 26, 27,    1, 28, 29, 30, 31, 32, 33, 34,
+     35, 36,  1, 37, 38, 39, 40, 41,   42, 43, 44,  1, 45, 46,  1,  1,
+
+#define to_EUC_JP_E8_92_offsets 19477
+128, 191,
+      1,  2,  3,  1,  4,  5,  1,  1,    1,  1,  1,  6,  1,  1,  1,  1,
+      7,  1,  8,  9, 10, 11,  1,  1,    1, 12,  1,  1, 13,  1, 14, 15,
+      1, 16,  1,  1,  1,  1, 17,  1,   18, 19, 20,  1,  1, 21,  1, 22,
+      1, 23, 24,  1, 25,  1,  1,  1,   26, 27, 28, 29, 30, 31, 32, 33,
+
+#define to_EUC_JP_E8_93_offsets 19543
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  7,    8,  9, 10, 11, 12, 13,  4, 14,
+     15, 16,  4, 17,  4,  4, 18,  4,    4, 19, 20,  4, 21,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4, 22,    4,  4, 23,  4, 24,  4, 25, 26,
+     27, 28, 29,  4, 30,  4,  4, 31,    4,  4, 32, 33, 34, 35,  4, 36,
+
+#define to_EUC_JP_E8_94_offsets 19609
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    2,  2,  2,  2,  7,  2,  8,  2,
+      9, 10,  2, 11, 12, 13,  2, 14,   15,  2, 16,  2, 17,  2, 18, 19,
+      2, 20, 21, 22, 23, 24, 25, 26,    2,  2, 27, 28, 29, 30,  2, 31,
+      2,  2, 32, 33, 34, 35, 36,  2,    2,  2,  2,  2,  2, 37,  2, 38,
+
+#define to_EUC_JP_E8_95_offsets 19675
+128, 191,
+      1,  2,  3,  4,  3,  3,  5,  3,    6,  7,  8,  9,  3,  3, 10, 11,
+     12, 13, 14, 15,  3, 16, 17, 18,   19, 20, 21,  3, 22, 23, 24, 25,
+     26, 27, 28, 29, 30,  3,  3,  3,   31, 32, 33, 34,  3, 35,  3, 36,
+      3,  3,  3,  3,  3,  3,  3, 37,    3, 38, 39, 40,  3, 41, 42, 43,
+
+#define to_EUC_JP_E8_96_offsets 19741
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    8,  9, 10, 11, 12,  3,  3, 13,
+     14, 15,  3, 16, 17,  3,  3, 18,   19, 20,  3, 21, 22, 23,  3, 24,
+     25,  3, 26,  3, 27, 28, 29, 30,   31, 32, 33, 34, 35, 36, 37, 38,
+      3,  3,  3,  3, 39,  3, 40, 41,   42, 43, 44,  3, 45, 46, 47, 48,
+
+#define to_EUC_JP_E8_97_offsets 19807
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  4,    1,  5,  6,  7,  1,  8,  9, 10,
+     11,  1,  1,  1,  1, 12,  1,  1,   13,  1, 14,  1, 15, 16,  1, 17,
+     18,  1,  1,  1, 19, 20, 21,  1,   22, 23, 24,  1,  1, 25,  1,  1,
+      1,  1,  1, 26,  1,  1, 27, 28,    1, 29, 30, 31, 32,  1, 33, 34,
+
+#define to_EUC_JP_E8_98_offsets 19873
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  7,    2,  2,  8,  9,  2, 10, 11,  2,
+     12, 13, 14, 15,  2,  2, 16, 17,   18, 19, 20, 21,  2,  2, 22,  2,
+      2, 23, 24,  2,  2,  2,  2, 25,    2, 26,  2,  2,  2, 27,  2, 28,
+     29,  2,  2,  2,  2,  2, 30,  2,   31,  2, 32,  2, 33, 34,  2, 35,
+
+#define to_EUC_JP_E8_99_offsets 19939
+128, 191,
+      1,  2,  3,  4,  4,  4,  5,  4,    4,  4,  4,  4,  4,  6,  7,  4,
+      8,  4,  9, 10, 11, 12, 13, 14,   15, 16, 17,  4, 18, 19, 20, 21,
+     22, 23, 24, 25, 26,  4,  4, 27,    4, 28,  4, 29, 30,  4,  4, 31,
+      4, 32,  4,  4,  4, 33, 34, 35,    4, 36, 37, 38,  4,  4,  4,  4,
+
+#define to_EUC_JP_E8_9A_offsets 20005
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  4,  5,  6,  1,  1,
+      1,  7,  1,  8,  1,  9, 10,  1,   11,  1, 12,  1, 13,  1,  1,  1,
+      1, 14,  1, 15, 16,  1, 17, 18,   19, 20, 21, 22,  1, 23,  1, 24,
+     25, 26,  1, 27, 28, 29, 30, 31,   32, 33,  1,  1,  1,  1,  1, 34,
+
+#define to_EUC_JP_E8_9B_offsets 20071
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    3,  9,  3, 10,  3, 11, 12,  3,
+      3, 13, 14,  3, 15, 16,  3, 17,    3, 18, 19, 20, 21,  3, 22, 23,
+     24,  3,  3, 25, 26, 27,  3, 28,    3, 29,  3,  3, 30, 31, 32, 33,
+      3,  3,  3,  3,  3,  3,  3,  3,   34, 35, 36, 37, 38, 39, 40,  3,
+
+#define to_EUC_JP_E8_9C_offsets 20137
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12,  2, 13, 14, 15,
+     16, 17, 18, 19, 20,  2,  2,  2,   21, 22, 23,  2, 24,  2, 25, 26,
+      2, 27,  2, 28,  2, 29,  2,  2,   30, 31,  2,  2,  2,  2, 32, 33,
+      2, 34, 35,  2, 36,  2,  2, 37,    2, 38, 39, 40, 41, 42, 43, 44,
+
+#define to_EUC_JP_E8_9D_offsets 20203
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  5,  2,  6,  7,  8,  9,  2,
+      2,  2,  2, 10,  2, 11,  2, 12,   13, 14,  2,  2,  2, 15,  2, 16,
+     17, 18,  2, 19, 20, 21, 22,  2,   23,  2, 24,  2,  2,  2, 25, 26,
+      2, 27, 28,  2, 29,  2, 30,  2,   31,  2,  2, 32,  2,  2,  2, 33,
+
+#define to_EUC_JP_E8_9E_offsets 20269
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    8,  9,  1, 10, 11, 12,  1,  1,
+     13,  1,  1, 14,  1, 15,  1, 16,   17, 18,  1,  1,  1,  1, 19, 20,
+     21,  1, 22, 23,  1,  1,  1, 24,    1,  1,  1, 25, 26, 27, 28, 29,
+      1, 30,  1, 31,  1, 32,  1,  1,    1,  1, 33, 34,  1, 35, 36, 37,
+
+#define to_EUC_JP_E8_9F_offsets 20335
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  6,    7,  8,  9, 10,  3,  3, 11,  3,
+     12,  3, 13,  3,  3, 14, 15,  3,    3, 16, 17,  3, 18,  3,  3, 19,
+     20,  3, 21, 22, 23,  3,  3,  3,    3,  3, 24, 25,  3, 26,  3, 27,
+      3, 28, 29, 30,  3,  3, 31, 32,   33, 34, 35, 36,  3,  3, 37, 38,
+
+#define to_EUC_JP_E8_A0_offsets 20401
+128, 191,
+      1,  2,  1,  3,  1,  4,  5,  1,    1,  6,  7,  8,  1,  9, 10, 11,
+     12, 13, 14, 15, 16, 17, 18,  1,   19, 20, 21, 22, 23,  1, 24, 25,
+      1, 26, 27, 28,  1,  1,  1, 29,   30,  1,  1,  1,  1, 31, 32,  1,
+     33, 34, 35,  1,  1, 36, 37,  1,    1, 38, 39, 40, 41,  1,  1,  1,
+
+#define to_EUC_JP_E8_A1_offsets 20467
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15,  8,
+      8, 16, 17, 18,  8, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31, 32, 33, 34,  8,  8,  8,   35, 36,  8, 37,  8,  8,  8,  8,
+     38, 39, 40,  8,  8, 41,  8, 42,    8, 43,  8, 44,  8, 45, 46, 47,
+
+#define to_EUC_JP_E8_A2_offsets 20533
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    5,  4,  4,  6,  4,  7,  4,  4,
+      4,  4,  8,  4,  4,  4,  9, 10,   11, 12, 13, 14, 15,  4, 16, 17,
+     18,  4, 19,  4, 20,  4,  4,  4,   21,  4, 22, 23,  4,  4, 24,  4,
+     25, 26,  4,  4, 27, 28,  4, 29,    4,  4, 30,  4,  4, 31, 32, 33,
+
+#define to_EUC_JP_E8_A3_offsets 20599
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  7,    7,  7,  8,  9, 10, 11, 12, 13,
+      7, 14, 15, 16, 17, 18,  7,  7,   19, 20,  7, 21, 22, 23, 24, 25,
+      7, 26,  7,  7,  7,  7,  7, 27,   28,  7,  7,  7,  7,  7,  7, 29,
+     30, 31, 32, 33, 34, 35,  7, 36,   37, 38,  7,  7, 39, 40, 41,  7,
+
+#define to_EUC_JP_E8_A4_offsets 20665
+128, 191,
+      1,  2,  3,  1,  4,  1,  5,  6,    1,  1,  7,  1,  8,  9, 10, 11,
+     12,  1, 13, 14,  1, 15, 16,  1,   17, 18, 19,  1, 20, 21, 22,  1,
+     23,  1,  1,  1,  1, 24, 25, 26,   27,  1, 28, 29,  1,  1,  1,  1,
+     30, 31, 32,  1,  1, 33, 34,  1,   35, 36, 37, 38,  1,  1, 39,  1,
+
+#define to_EUC_JP_E8_A5_offsets 20731
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    8,  9,  8,  8, 10, 11,  8, 12,
+      8,  8, 13,  8,  8,  8, 14, 15,    8,  8, 16, 17, 18,  8, 19, 20,
+     21, 22, 23, 24, 25,  8, 26,  8,    8,  8, 27, 28,  8, 29, 30, 31,
+     32,  8, 33, 34, 35, 36,  8, 37,    8,  8, 38, 39, 40, 41, 42, 43,
+
+#define to_EUC_JP_E8_A6_offsets 20797
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  5,    6,  7,  8,  9,  1, 10,  1, 11,
+     12,  1,  1, 13, 14, 15, 16, 17,   18,  1, 19, 20, 21,  1,  1, 22,
+     23, 24,  1,  1,  1, 25, 26, 27,    1, 28, 29,  1, 30,  1,  1, 31,
+     32,  1, 33, 34, 35, 36, 37, 38,    1,  1, 39,  1, 40, 41,  1, 42,
+
+#define to_EUC_JP_E8_A7_offsets 20863
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  3,  2,  4,  5,  6,  7,    8,  2,  9,  2, 10, 11,  2,  2,
+      2,  2,  2, 12,  2, 13, 14, 15,    2, 16,  2, 17,  2, 18,  2,  2,
+      2, 19,  2, 20, 21,  2, 22,  2,   23, 24,  2,  2,  2, 25,  2, 26,
+
+#define to_EUC_JP_E8_A8_offsets 20929
+128, 191,
+      1,  2,  3,  4,  5,  6,  2,  7,    8,  2,  9,  2, 10,  2, 11, 12,
+     13, 14, 15, 16, 17, 18, 19, 20,   21,  2,  2, 22,  2, 23, 24, 25,
+     26,  2, 27, 28, 29, 30, 31,  2,    2,  2, 32, 33, 34, 35,  2, 36,
+      2, 37,  2, 38, 39, 40, 41, 42,    2,  2, 43, 44, 45, 46, 47,  2,
+
+#define to_EUC_JP_E8_A9_offsets 20995
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    8,  9,  3,  3,  3, 10, 11,  3,
+     12, 13, 14, 15, 16, 17, 18, 19,   20,  3,  3, 21, 22, 23, 24,  3,
+     25, 26, 27, 28,  3, 29, 30, 31,    3, 32,  3, 33, 34, 35, 36,  3,
+     37, 38, 39, 40,  3, 41, 42, 43,    3, 44, 45, 46, 47,  3, 48, 49,
+
+#define to_EUC_JP_E8_AA_offsets 21061
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    2,  9,  2, 10, 11, 12,  2, 13,
+     14, 15, 16, 17,  2, 18, 19, 20,   21, 22, 23,  2,  2,  2, 24, 25,
+     26, 27,  2, 28, 29, 30, 31, 32,   33, 34,  2,  2, 35, 36, 37, 38,
+     39,  2, 40, 41,  2,  2, 42, 43,    2, 44,  2, 45, 46,  2, 47, 48,
+
+#define to_EUC_JP_E8_AB_offsets 21127
+128, 191,
+      1,  1,  2,  3,  4,  1,  5,  6,    7,  8,  9, 10, 11, 12,  1, 13,
+      1, 14, 15, 16, 17, 18, 19, 20,    1,  1, 21, 22, 23, 24, 25, 26,
+     27, 28, 29,  1, 30,  1, 31, 32,    1,  1,  1, 33, 34, 35, 36,  1,
+     37, 38,  1, 39, 40, 41, 42, 43,   44,  1, 45,  1, 46,  1, 47, 48,
+
+#define to_EUC_JP_E8_AC_offsets 21193
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    4,  4,  9, 10, 11,  4, 12,  4,
+     13, 14,  4,  4, 15,  4, 16, 17,    4, 18, 19, 20, 21, 22, 23, 24,
+     25, 26,  4,  4,  4,  4, 27,  4,   28,  4,  4, 29, 30, 31,  4,  4,
+     32,  4,  4, 33,  4,  4,  4, 34,    4, 35,  4,  4, 36,  4, 37,  4,
+
+#define to_EUC_JP_E8_AD_offsets 21259
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9,  1,  1, 10, 11, 12, 13,
+      1,  1, 14, 15, 16,  1, 17,  1,   18, 19, 20, 21, 22,  1, 23, 24,
+      1,  1,  1, 25,  1,  1, 26,  1,    1,  1,  1, 27, 28, 29,  1, 30,
+     31, 32, 33,  1, 34,  1, 35, 36,   37, 38,  1,  1, 39, 40, 41,  1,
+
+#define to_EUC_JP_E8_AE_offsets 21325
+128, 191,
+      1,  2,  3,  4,  5,  6,  3,  3,    3,  3,  7,  8,  9, 10, 11, 12,
+     13,  3, 14, 15, 16, 17, 18,  3,    3, 19, 20,  3, 21,  3, 22, 23,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_JP_E8_B0_offsets 21391
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  4,  5,  1,  1,  6,  7,  8,
+
+#define to_EUC_JP_E8_B1_offsets 21457
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  5,    6,  7,  8,  9, 10,  1, 11, 12,
+     13, 14,  1, 15, 16, 17,  1, 18,   19, 20, 21, 22,  1, 23,  1,  1,
+      1, 24, 25, 26, 27,  1, 28,  1,   29, 30, 31, 32, 33, 34,  1,  1,
+      1,  1,  1, 35,  1, 36, 37,  1,   38, 39, 40, 41, 42,  1, 43,  1,
+
+#define to_EUC_JP_E8_B2_offsets 21523
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    1,  6,  7,  8,  9, 10, 11,  1,
+     12,  1, 13, 14, 15,  1,  1,  1,   16, 17,  1, 18, 19, 20, 21,  1,
+     22, 23, 24,  1, 25,  1,  1, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35,  1, 36, 37, 38,  1, 39, 40,   41, 42, 43, 44, 45, 46,  1, 47,
+
+#define to_EUC_JP_E8_B3_offsets 21589
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     13, 17, 13, 18, 13, 19, 20, 13,   13, 21, 22, 23, 24, 25, 26, 13,
+     27, 28, 29, 30, 31, 13, 32, 13,   33, 13, 34, 13, 35, 36, 13, 37,
+     38, 13, 39, 13, 13, 40, 13, 41,   42, 13, 43, 44, 45, 46, 47, 48,
+
+#define to_EUC_JP_E8_B4_offsets 21655
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  6,    7,  8,  9, 10,  1, 11,  1, 12,
+     13,  1, 14, 15, 16,  1, 17, 18,    1,  1,  1, 19,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E8_B5_offsets 21721
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  7,  8,  9, 10,  1,
+     11, 12,  1, 13, 14,  1,  1, 15,    1,  1,  1,  1,  1,  1,  1, 16,
+
+#define to_EUC_JP_E8_B6_offsets 21787
+128, 191,
+      1,  2,  3,  1,  4,  5,  1,  1,    6,  1,  7,  1,  1,  8,  1,  1,
+      9, 10,  1,  1,  1, 11,  1,  1,    1, 12,  1,  1,  1,  1, 13, 14,
+     15,  1,  1, 16,  1,  1, 17,  1,   18,  1,  1, 19, 20,  1,  1, 21,
+      1,  1, 22, 23,  1, 24,  1, 25,    1, 26, 27, 28, 29,  1, 30,  1,
+
+#define to_EUC_JP_E8_B7_offsets 21853
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  6,    7,  2,  8,  9, 10,  2, 11, 12,
+      2, 13,  2,  2, 14, 15, 16, 17,    2, 18, 19, 20,  2, 21,  2, 22,
+      2, 23,  2, 24, 25, 26,  2, 27,   28,  2, 29, 30, 31,  2,  2, 32,
+     33, 34, 35, 36, 37, 38,  2,  2,    2,  2,  2,  2, 39, 40,  2, 41,
+
+#define to_EUC_JP_E8_B8_offsets 21919
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  1,    6,  7,  8,  9,  1,  1,  1, 10,
+     11, 12,  1,  1, 13,  1, 14,  1,    1,  1,  1,  1,  1, 15, 16, 17,
+     18, 19, 20, 21,  1,  1, 22, 23,    1,  1, 24,  1,  1,  1,  1,  1,
+     25, 26,  1, 27, 28, 29, 30, 31,   32, 33,  1,  1,  1, 34,  1,  1,
+
+#define to_EUC_JP_E8_B9_offsets 21985
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+     15,  4,  4,  4, 16, 17,  4,  4,    4, 18,  4, 19, 20, 21, 22, 23,
+     24, 25, 26, 27, 28,  4,  4,  4,    4, 29,  4,  4, 30, 31,  4, 32,
+     33, 34, 35,  4, 36,  4, 37,  4,    4, 38, 39, 40, 41,  4,  4,  4,
+
+#define to_EUC_JP_E8_BA_offsets 22051
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  7,    1,  8,  9, 10,  1, 11,  1,  1,
+     12, 13, 14, 15, 16, 17,  1,  1,    1, 18, 19, 20,  1, 21, 22,  1,
+      1, 23, 24,  1,  1,  1,  1, 25,    1, 26, 27, 28, 29, 30, 31, 32,
+     33, 34,  1, 35,  1, 36,  1,  1,    1,  1, 37, 38,  1,  1, 39,  1,
+
+#define to_EUC_JP_E8_BB_offsets 22117
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  3, 10, 11, 12, 13,  3, 14,
+      3, 15, 16,  3, 17,  3,  3,  3,    3,  3,  3, 18, 19,  3,  3, 20,
+      3,  3, 21, 22,  3,  3,  3,  3,   23,  3,  3, 24,  3, 25, 26,  3,
+     27, 28,  3,  3,  3,  3,  3, 29,   30, 31, 32, 33, 34, 35, 36,  3,
+
+#define to_EUC_JP_E8_BC_offsets 22183
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  6,    7,  8,  9,  2, 10,  2,  2, 11,
+     12,  2, 13, 14, 15, 16, 17, 18,   19, 20,  2, 21, 22, 23, 24, 25,
+     26, 27,  2, 28,  2, 29, 30, 31,   32, 33, 34,  2, 35, 36, 37, 38,
+      2,  2,  2, 39, 40, 41, 42, 43,   44, 45, 46, 47,  2,  2, 48, 49,
+
+#define to_EUC_JP_E8_BD_offsets 22249
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  9,  9, 11, 12, 13, 14,
+      9, 15, 16, 17, 18, 19,  9, 20,   21,  9,  9,  9, 22, 23, 24, 25,
+      9, 26, 27, 28, 29, 30,  9,  9,    9,  9,  9,  9,  9,  9,  9,  9,
+      9,  9,  9,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9,  9,  9,  9,
+
+#define to_EUC_JP_E8_BE_offsets 22315
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  4,  5,  6,
+      7,  8,  1,  9, 10, 11, 12, 13,   14,  1,  1,  1,  1, 15, 16, 17,
+     18, 19, 20,  1,  1, 21, 22, 23,   24,  1, 25, 26, 27,  1, 28, 29,
+
+#define to_EUC_JP_E8_BF_offsets 22381
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  4,    4,  4,  8,  9,  4, 10, 11,  4,
+     12, 13, 14, 15, 16, 17,  4,  4,    4,  4, 18,  4,  4,  4,  4,  4,
+     19,  4, 20, 21, 22, 23, 24,  4,   25, 26, 27, 28,  4, 29, 30, 31,
+     32, 33,  4,  4, 34, 35, 36, 37,   38, 39, 40, 41,  4, 42, 43,  4,
+
+#define to_EUC_JP_E9_80_offsets 22447
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  8,  8, 10, 11, 12, 13, 14,
+     15, 16,  8, 17, 18, 19, 20, 21,   22, 23, 24, 25,  8, 26, 27, 28,
+     29, 30, 31, 32,  8,  8,  8, 33,   34, 35, 36,  8, 37, 38, 39, 40,
+      8, 41, 42, 43, 44, 45, 46, 47,   48, 49,  8,  8, 50,  8, 51, 52,
+
+#define to_EUC_JP_E9_81_offsets 22513
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  7,    1,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21,  1,   22, 23,  1, 24, 25, 26, 27,  1,
+     28, 29, 30, 31,  1, 32, 33, 34,   35, 36,  1,  1, 37, 38, 39, 40,
+     41,  1, 42,  1, 43, 44, 45, 46,   47, 48, 49,  1, 50, 51,  1, 52,
+
+#define to_EUC_JP_E9_82_offsets 22579
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  7, 14, 15,
+     16, 17,  7,  7,  7, 18,  7, 19,   20, 21,  7, 22,  7,  7,  7,  7,
+     23, 24, 25, 26,  7, 27, 28,  7,   29,  7, 30,  7,  7,  7,  7, 31,
+     32, 33, 34, 35, 36, 37, 38,  7,   39,  7,  7,  7,  7, 40, 41,  7,
+
+#define to_EUC_JP_E9_83_offsets 22645
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  6,    7,  1,  8,  1,  9,  1, 10,  1,
+      1,  1, 11,  1,  1, 12,  1, 13,   14, 15,  1, 16, 17, 18,  1, 19,
+      1, 20, 21,  1, 22, 23,  1,  1,   24,  1,  1, 25,  1, 26,  1, 27,
+     28,  1,  1,  1, 29, 30, 31, 32,    1,  1,  1,  1,  1, 33, 34, 35,
+
+#define to_EUC_JP_E9_84_offsets 22711
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  2,    7,  2,  2,  2,  2,  8,  2,  2,
+      9,  2, 10,  2, 11,  2, 12, 13,   14, 15, 16,  2, 17,  2, 18,  2,
+     19,  2, 20, 21,  2, 22,  2, 23,    2, 24,  2,  2,  2, 25, 26, 27,
+     28, 29, 30,  2, 31,  2, 32, 33,    2, 34, 35,  2, 36, 37,  2,  2,
+
+#define to_EUC_JP_E9_85_offsets 22777
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  6,  7,  8,  9, 10, 11,
+      1,  1, 12, 13, 14,  1, 15, 16,   17, 18, 19, 20,  1,  1,  1,  1,
+      1, 21, 22, 23, 24, 25,  1, 26,    1, 27, 28,  1, 29, 30,  1,  1,
+      1,  1, 31, 32, 33, 34,  1, 35,   36, 37, 38, 39,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_86_offsets 22843
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  7,    1,  8,  9, 10,  1, 11, 12,  1,
+     13, 14, 15, 16, 17, 18,  1, 19,   20,  1,  1,  1, 21,  1, 22,  1,
+      1, 23, 24,  1, 25,  1, 26,  1,   27,  1, 28, 29, 30, 31, 32, 33,
+     34, 35, 36, 37, 38, 39, 40,  1,   41,  1, 42, 43, 44, 45,  1, 46,
+
+#define to_EUC_JP_E9_87_offsets 22909
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  5, 11, 12, 13, 14, 15,
+     16, 17,  5, 18, 19,  5, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+      5, 30,  5, 31, 32, 33, 34, 35,    5, 36, 37,  5, 38, 39, 40, 41,
+     42, 43,  5,  5,  5, 44, 45, 46,    5, 47,  5, 48, 49, 50,  5, 51,
+
+#define to_EUC_JP_E9_88_offsets 22975
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  9,  3, 10, 11, 12,  3,
+     13, 14, 15, 16, 17, 18, 19,  3,   20,  3,  3,  3, 21, 22, 23,  3,
+      3,  3,  3, 24, 25, 26, 27,  3,   28, 29,  3,  3, 30,  3, 31, 32,
+     33,  3,  3, 34, 35, 36, 37, 38,   39, 40, 41,  3, 42,  3, 43, 44,
+
+#define to_EUC_JP_E9_89_offsets 23041
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12,  2, 13, 14, 15,
+     16, 17,  2,  2,  2,  2,  2, 18,   19, 20, 21, 22, 23, 24, 25,  2,
+     26, 27, 28,  2, 29, 30, 31, 32,   33, 34,  2,  2,  2,  2, 35, 36,
+     37, 38,  2,  2,  2, 39, 40, 41,   42, 43,  2, 44, 45, 46, 47, 48,
+
+#define to_EUC_JP_E9_8A_offsets 23107
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    5,  6,  7,  2,  2,  8,  9,  2,
+      2, 10, 11, 12,  2, 13, 14, 15,   16, 17, 18, 19, 20,  2,  2, 21,
+     22,  2,  2,  2, 23, 24,  2, 25,   26,  2,  2, 27,  2, 28,  2, 29,
+      2,  2, 30,  2,  2,  2, 31, 32,   33, 34, 35, 36, 37, 38,  2, 39,
+
+#define to_EUC_JP_E9_8B_offsets 23173
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  5,  5, 10, 11, 12, 13, 14,
+     15,  5, 16, 17,  5, 18,  5, 19,   20, 21,  5,  5, 22, 23,  5, 24,
+     25, 26,  5, 27, 28, 29,  5, 30,   31, 32, 33,  5, 34, 35, 36,  5,
+     37,  5, 38, 39,  5,  5,  5,  5,   40, 41, 42, 43, 44,  5,  5, 45,
+
+#define to_EUC_JP_E9_8C_offsets 23239
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    5,  2,  2,  2,  2,  6,  2,  7,
+      8,  9,  2,  2, 10, 11,  2,  2,   12, 13, 14,  2, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31,  2, 32, 33,
+      2,  2, 34, 35, 36, 37, 38, 39,    2,  2, 40, 41,  2,  2,  2,  2,
+
+#define to_EUC_JP_E9_8D_offsets 23305
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  6,  1,  7,  1,  1,
+      8,  9, 10,  1, 11, 12, 13, 14,   15,  1, 16, 17, 18,  1, 19,  1,
+     20,  1,  1,  1, 21, 22,  1, 23,    1, 24, 25,  1, 26, 27, 28, 29,
+     30, 31,  1, 32, 33, 34, 35,  1,    1,  1, 36,  1, 37, 38, 39, 40,
+
+#define to_EUC_JP_E9_8E_offsets 23371
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    5,  4,  6,  7,  8,  9,  4, 10,
+      4,  4, 11,  4, 12, 13, 14, 15,   16,  4, 17, 18,  4,  4, 19,  4,
+      4, 20,  4, 21, 22,  4, 23, 24,   25, 26,  4, 27, 28, 29, 30,  4,
+     31,  4,  4,  4, 32, 33, 34,  4,    4, 35, 36,  4,  4,  4,  4,  4,
+
+#define to_EUC_JP_E9_8F_offsets 23437
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    8,  9, 10, 11, 12, 13,  1,  1,
+     14, 15,  1, 16,  1,  1, 17, 18,   19, 20,  1,  1, 21, 22, 23, 24,
+      1, 25, 26,  1, 27, 28, 29, 30,   31,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 32,   33, 34, 35, 36,  1, 37,  1,  1,
+
+#define to_EUC_JP_E9_90_offsets 23503
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  6,    7,  8,  1,  1,  1,  9, 10, 11,
+     12,  1,  1, 13, 14, 15, 16, 17,   18, 19, 20,  1,  1,  1,  1, 21,
+      1, 22,  1,  1,  1,  1,  1,  1,    1,  1,  1, 23,  1,  1, 24, 25,
+      1, 26, 27, 28, 29, 30, 31,  1,   32,  1, 33, 34,  1, 35,  1, 36,
+
+#define to_EUC_JP_E9_91_offsets 23569
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  1,    6,  1,  7,  1,  8,  1,  1,  1,
+      1,  9, 10, 11,  1, 12,  1,  1,    1, 13, 14, 15, 16,  1, 17, 18,
+     19, 20, 21, 22,  1,  1,  1,  1,   23,  1, 24, 25,  1, 26, 27, 28,
+     29, 30, 31,  1,  1, 32,  1, 33,    1,  1,  1,  1, 34, 35, 36, 37,
+
+#define to_EUC_JP_E9_92_offsets 23635
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_95_offsets 23701
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  4,  1,  1,  1,  1,  5,  1,
+
+#define to_EUC_JP_E9_96_offsets 23767
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+      2, 15,  2, 16, 17,  2, 18,  2,   19, 20,  2,  2,  2, 21, 22, 23,
+     24, 25, 26, 27, 28, 29, 30, 31,   32, 33,  2, 34, 35, 36,  2,  2,
+      2,  2, 37,  2, 38,  2, 39,  2,    2, 40, 41, 42, 43, 44, 45, 46,
+
+#define to_EUC_JP_E9_97_offsets 23833
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  6,  7,  8,  9, 10,  1,  1,
+     11, 12, 13, 14, 15, 16, 17,  1,   18, 19, 20,  1, 21, 22, 23, 24,
+     25, 26, 27,  1, 28, 29, 30,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_98_offsets 23899
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  4,  1,
+      1,  5,  6,  1,  7,  8,  9,  1,   10,  1, 11,  1, 12,  1, 13, 14,
+      1, 15, 16, 17,  1,  1,  1, 18,   19, 20, 21, 22, 23, 24,  1, 25,
+
+#define to_EUC_JP_E9_99_offsets 23965
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  4,    4,  4,  4,  6,  7,  8,  4,  9,
+     10,  4, 11,  4, 12,  4, 13, 14,   15,  4,  4, 16, 17, 18, 19, 20,
+      4, 21, 22, 23, 24, 25, 26,  4,    4,  4, 27,  4, 28,  4, 29,  4,
+     30,  4, 31, 32, 33, 34, 35, 36,   37,  4, 38, 39, 40, 41, 42, 43,
+
+#define to_EUC_JP_E9_9A_offsets 24031
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9, 10, 11,  1, 12, 13, 14,
+      1, 15,  1,  1, 16, 17, 18, 19,   20, 21, 22, 23, 24, 25,  1, 26,
+     27,  1,  1, 28, 29, 30, 31, 32,   33, 34, 35,  1,  1,  1, 36, 37,
+     38, 39, 40, 41, 42,  1, 43, 44,   45, 46, 47, 48, 49,  1,  1,  1,
+
+#define to_EUC_JP_E9_9B_offsets 24097
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  9, 10, 11, 12, 13,  3,
+      3, 14, 15,  3,  3, 16, 17,  3,   18, 19, 20, 21, 22, 23, 24, 25,
+      3,  3, 26, 27,  3,  3,  3,  3,   28, 29, 30, 31,  3,  3,  3, 32,
+     33, 34, 35,  3,  3,  3, 36, 37,    3, 38, 39, 40,  3,  3,  3,  3,
+
+#define to_EUC_JP_E9_9C_offsets 24163
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11,  2,  2, 12, 13, 14,
+      2, 15,  2, 16,  2,  2, 17,  2,    2, 18, 19, 20, 21, 22, 23,  2,
+      2, 24, 25, 26, 27,  2,  2, 28,   29,  2, 30,  2,  2,  2,  2,  2,
+     31, 32, 33, 34,  2,  2,  2,  2,   35, 36,  2,  2,  2, 37, 38,  2,
+
+#define to_EUC_JP_E9_9D_offsets 24229
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  1,    7,  8,  9,  1,  1,  1, 10, 11,
+      1,  1, 12,  1,  1, 13, 14, 15,   16, 17, 18, 19, 20,  1, 21,  1,
+     22, 23, 24, 25, 26,  1, 27, 28,   29, 30, 31, 32,  1, 33, 34,  1,
+      1, 35,  1, 36, 37,  1, 38, 39,   40, 41, 42, 43, 44, 45,  1, 46,
+
+#define to_EUC_JP_E9_9E_offsets 24295
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  3,    3,  7,  3,  8,  3,  9,  3, 10,
+     11,  3,  3,  3,  3, 12, 13, 14,   15, 16, 17,  3, 18,  3, 19, 20,
+     21,  3, 22, 23,  3,  3, 24,  3,   25,  3,  3, 26, 27, 28, 29,  3,
+      3, 30, 31, 32, 33, 34, 35,  3,   36, 37, 38,  3, 39,  3, 40, 41,
+
+#define to_EUC_JP_E9_9F_offsets 24361
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    8,  9, 10, 11, 12, 13, 14,  1,
+     15, 16,  1, 17, 18,  1,  1, 19,   20, 21,  1, 22, 23, 24, 25,  1,
+     26, 27,  1,  1, 28,  1,  1,  1,    1,  1,  1,  1,  1, 29, 30, 31,
+      1, 32, 33, 34, 35, 36, 37, 38,   39,  1, 40, 41,  1,  1,  1, 42,
+
+#define to_EUC_JP_E9_A0_offsets 24427
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  7,    8,  1,  9,  1, 10, 11, 12, 13,
+     14, 15, 16, 17, 18,  1, 19, 20,   21, 22, 23,  1, 24,  1, 25,  1,
+     26, 27,  1, 28, 29, 30, 31,  1,    1,  1,  1, 32, 33, 34, 35, 36,
+     37,  1, 38, 39, 40, 41,  1, 42,   43,  1,  1, 44, 45, 46, 47,  1,
+
+#define to_EUC_JP_E9_A1_offsets 24493
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  5,  6,  7,  8,  9, 10,
+      1, 11, 12, 13, 14, 15, 16, 17,   18, 19, 20, 21,  1,  1, 22,  1,
+      1,  1, 23, 24,  1, 25, 26, 27,    1,  1, 28, 29, 30,  1,  1, 31,
+     32, 33,  1, 34, 35,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_A2_offsets 24559
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  4,  1,  5,  6,  7,
+      8,  9,  1,  1, 10,  1, 11, 12,   13,  1, 14, 15,  1,  1,  1, 16,
+
+#define to_EUC_JP_E9_A3_offsets 24625
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    7,  1,  1,  1,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  9, 10,  1,  1, 11,
+      1, 12, 13, 14,  1, 15, 16, 17,    1, 18, 19, 20,  1, 21, 22, 23,
+      1,  1, 24, 25, 26,  1, 27,  1,    1,  1,  1,  1, 28, 29, 30,  1,
+
+#define to_EUC_JP_E9_A4_offsets 24691
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  5,    6,  7,  8,  1,  9,  1,  1,  1,
+     10, 11, 12, 13, 14, 15, 16, 17,   18,  1, 19, 20, 21, 22, 23, 24,
+     25, 26, 27,  1, 28,  1, 29, 30,   31,  1,  1, 32, 33,  1, 34,  1,
+      1, 35, 36, 37, 38, 39,  1,  1,    1, 40, 41, 42, 43, 44, 45,  1,
+
+#define to_EUC_JP_E9_A5_offsets 24757
+128, 191,
+      1,  2,  3,  4,  4,  5,  6,  7,    8,  9,  4, 10, 11, 12, 13,  4,
+     14, 15, 16,  4, 17, 18,  4, 19,   20, 21,  4, 22, 23,  4, 24, 25,
+     26,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+
+#define to_EUC_JP_E9_A6_offsets 24823
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  5,  1,  6,  1,  7,  1,  8,
+      1,  1,  1,  1,  1,  9, 10,  1,   11,  1,  1,  1, 12, 13, 14,  1,
+     15, 16, 17, 18, 19, 20,  1,  1,    1, 21, 22,  1, 23, 24,  1, 25,
+
+#define to_EUC_JP_E9_A7_offsets 24889
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    7,  8,  1,  1,  1,  1,  1,  1,
+      9, 10, 11, 12, 13, 14,  1,  1,   15, 16, 17, 18, 19, 20, 21, 22,
+      1,  1, 23,  1,  1,  1,  1, 24,    1,  1, 25, 26, 27, 28, 29,  1,
+     30, 31, 32,  1, 33, 34,  1,  1,   35, 36,  1, 37,  1, 38, 39, 40,
+
+#define to_EUC_JP_E9_A8_offsets 24955
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  7,  8,  1,  9, 10,
+     11, 12, 13, 14,  1,  1, 15,  1,    1, 16,  1,  1,  1,  1, 17,  1,
+     18,  1, 19, 20, 21,  1,  1, 22,   23,  1,  1, 24,  1, 25, 26,  1,
+     27,  1,  1, 28,  1, 29, 30, 31,   32,  1,  1,  1,  1,  1, 33,  1,
+
+#define to_EUC_JP_E9_A9_offsets 25021
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    7,  7,  9, 10, 11, 12, 13,  7,
+      7, 14,  7,  7, 15, 16, 17, 18,    7,  7, 19, 20,  7, 21,  7, 22,
+      7,  7, 23,  7, 24, 25,  7,  7,    7, 26, 27, 28,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+
+#define to_EUC_JP_E9_AA_offsets 25087
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  1,  4,  5,  6,  7,
+      8,  1,  9,  1, 10, 11, 12,  1,   13, 14,  1, 15, 16,  1, 17, 18,
+
+#define to_EUC_JP_E9_AB_offsets 25153
+128, 191,
+      1,  2,  3,  4,  5,  3,  6,  3,    7,  3,  3,  3,  3,  3,  8,  9,
+     10, 11, 12, 13, 14, 15, 16, 17,   18,  3,  3, 19, 20,  3, 21, 22,
+     23,  3, 24, 25, 26, 27, 28, 29,    3, 30, 31, 32, 33, 34, 35, 36,
+      3, 37, 38, 39, 40, 41,  3, 42,    3, 43, 44, 45,  3, 46,  3, 47,
+
+#define to_EUC_JP_E9_AC_offsets 25219
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  8, 11, 12, 13, 14,  8,
+     15,  8, 16,  8,  8,  8, 17,  8,   18, 19, 20, 21, 22,  8,  8, 23,
+     24,  8, 25, 26,  8, 27, 28, 29,   30, 31, 32, 33,  8, 34, 35, 36,
+      8, 37, 38, 39, 40, 41,  8, 42,    8, 43, 44, 45, 46, 47,  8,  8,
+
+#define to_EUC_JP_E9_AD_offsets 25285
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    7,  1,  1,  8,  9, 10, 11, 12,
+      1, 13,  1,  1, 14, 15, 16, 17,   18,  1, 19, 20,  1,  1, 21,  1,
+      1, 22,  1, 23,  1, 24, 25,  1,   26,  1, 27, 28, 29, 30, 31, 32,
+      1,  1,  1, 33, 34, 35,  1, 36,   37, 38,  1,  1,  1,  1,  1, 39,
+
+#define to_EUC_JP_E9_AE_offsets 25351
+128, 191,
+      1,  2,  2,  3,  4,  5,  6,  7,    2,  8,  9, 10,  2, 11, 12, 13,
+     14, 15, 16, 17, 18,  2, 19, 20,    2,  2, 21,  2,  2, 22, 23, 24,
+     25,  2,  2,  2,  2,  2, 26, 27,   28, 29, 30, 31, 32, 33, 34,  2,
+     35, 36, 37,  2, 38,  2,  2, 39,   40, 41,  2, 42, 43,  2, 44, 45,
+
+#define to_EUC_JP_E9_AF_offsets 25417
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    6,  7,  8,  3,  3,  3,  9, 10,
+     11, 12, 13,  3, 14,  3, 15, 16,   17,  3,  3, 18,  3, 19,  3, 20,
+      3, 21, 22, 23, 24, 25,  3, 26,   27,  3, 28, 29,  3,  3,  3, 30,
+     31, 32, 33, 34,  3, 35,  3, 36,   37, 38, 39,  3,  3, 40,  3, 41,
+
+#define to_EUC_JP_E9_B0_offsets 25483
+128, 191,
+      1,  2,  3,  2,  4,  2,  5,  2,    6,  7,  8,  9, 10, 11,  2, 12,
+     13, 14, 15, 16, 17, 18, 19,  2,   20, 21, 22, 23, 24,  2, 25,  2,
+      2, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35,  2,  2, 36, 37, 38,
+     39, 40, 41,  2,  2, 42, 43, 44,    2, 45, 46, 47,  2, 48, 49,  2,
+
+#define to_EUC_JP_E9_B1_offsets 25549
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    8,  9, 10,  1,  1,  1, 11, 12,
+     13,  1, 14, 15, 16,  1, 17, 18,   19,  1, 20, 21, 22, 23, 24, 25,
+     26,  1,  1, 27,  1,  1,  1, 28,   29, 30, 31, 32,  1,  1, 33,  1,
+     34,  1, 35,  1,  1, 36, 37, 38,   39,  1,  1, 40,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_B3_offsets 25615
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  3,  4,    1,  5,  1,  6,  7,  1,  1,  1,
+      8,  1,  9, 10, 11,  1, 12, 13,    1, 14,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_B4_offsets 25681
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    6,  7,  1,  8,  1,  1,  9,  1,
+      1, 10, 11,  1,  1, 12,  1, 13,   14,  1,  1, 15, 16, 17, 18, 19,
+      1,  1,  1, 20,  1,  1, 21,  1,   22,  1, 23, 24, 25,  1,  1, 26,
+     27,  1, 28, 29, 30,  1,  1,  1,    1,  1, 31, 32, 33, 34, 35, 36,
+
+#define to_EUC_JP_E9_B5_offsets 25747
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  1, 10,  1,  1,  1,  1,  1,
+     11, 12,  1, 13, 14,  1,  1,  1,    1, 15,  1,  1, 16, 17, 18, 19,
+     20, 21, 22, 23, 24, 25,  1,  1,    1, 26, 27, 28, 29,  1,  1, 30,
+     31,  1, 32,  1,  1,  1, 33, 34,    1,  1, 35, 36, 37,  1, 38,  1,
+
+#define to_EUC_JP_E9_B6_offsets 25813
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  5,    1,  6,  7,  1,  1,  8,  9, 10,
+      1,  1, 11, 12,  1, 13, 14, 15,   16,  1, 17,  1,  1,  1,  1,  1,
+      1, 18,  1,  1, 19,  1,  1,  1,    1, 20, 21, 22, 23,  1, 24, 25,
+      1, 26, 27,  1, 28, 29,  1,  1,   30, 31, 32, 33, 34,  1,  1, 35,
+
+#define to_EUC_JP_E9_B7_offsets 25879
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  7,    1,  8,  9,  1,  1,  1,  1, 10,
+      1,  1,  1, 11, 12, 13, 14, 15,    1, 16, 17,  1,  1,  1, 18, 19,
+     20,  1,  1,  1,  1, 21, 22, 23,    1, 24,  1, 25,  1, 26, 27, 28,
+     29,  1, 30, 31, 32,  1,  1,  1,   33, 34, 35,  1,  1, 36, 37,  1,
+
+#define to_EUC_JP_E9_B8_offsets 25945
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  1,  5,  1,
+      6,  7,  8,  1,  1,  9, 10,  1,    1, 11, 12, 13, 14, 15, 16,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_B9_offsets 26011
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  4,  5,  6,  7,  8,  1,  9,
+
+#define to_EUC_JP_E9_BA_offsets 26077
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  7,  7, 10, 11,  7, 12, 13,
+      7, 14, 15, 16,  7, 17, 18, 19,   20,  7,  7, 21,  7, 22, 23, 24,
+      7,  7,  7,  7, 25, 26, 27,  7,   28, 29, 30,  7, 31, 32, 33, 34,
+     35,  7,  7, 36, 37, 38,  7,  7,   39, 40, 41, 42, 43,  7, 44, 45,
+
+#define to_EUC_JP_E9_BB_offsets 26143
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    4,  1,  1,  5,  6,  7,  8,  9,
+     10,  1, 11,  1, 12, 13,  1,  1,   14, 15,  1, 16, 17, 18, 19, 20,
+     21,  1,  1,  1, 22, 23,  1, 24,   25,  1,  1,  1, 26, 27, 28, 29,
+     30, 31, 32,  1, 33, 34, 35, 36,   37, 38,  1, 39, 40, 41,  1, 42,
+
+#define to_EUC_JP_E9_BC_offsets 26209
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  4,    5,  6,  1,  1,  1,  1,  7,  8,
+      9, 10, 11, 12, 13, 14, 15, 16,    1, 17, 18, 19,  1,  1,  1, 20,
+     21, 22, 23,  1,  1,  1, 24,  1,    1,  1, 25, 26, 27,  1,  1, 28,
+      1, 29, 30,  1, 31,  1,  1, 32,    1, 33, 34, 35, 36, 37, 38, 39,
+
+#define to_EUC_JP_E9_BD_offsets 26275
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  7,    1,  1,  8,  9,  1,  1, 10, 11,
+      1,  1, 12, 13, 14, 15, 16, 17,   18,  1, 19,  1,  1, 20, 21, 22,
+     23, 24, 25, 26,  1,  1, 27, 28,   29, 30, 31,  1, 32, 33, 34, 35,
+     36, 37, 38, 39,  1, 40, 41, 42,    1,  1, 43,  1,  1, 44,  1,  1,
+
+#define to_EUC_JP_E9_BE_offsets 26341
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  3,
+      4,  5,  6,  1,  7,  8,  9, 10,    1,  1,  1,  1, 11, 12, 13,  1,
+     14, 15, 16, 17,  1, 18,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_E9_offsets 26407
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 20, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 20,
+
+#define to_EUC_JP_ED_offsets 26473
+128, 159,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_EF_BC_offsets 26507
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    7,  8,  9, 10, 11,  1, 12, 13,
+     14, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+
+#define to_EUC_JP_EF_BD_offsets 26573
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 31,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 62,
+
+#define to_EUC_JP_EF_BE_offsets 26639
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+
+#define to_EUC_JP_EF_BF_offsets 26705
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_EF_offsets 26771
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  4,  5,
+
+#define to_EUC_JP_F0_offsets 26837
+144, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_F4_offsets 26887
+128, 143,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_JP_offsets 26905
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    6,  6,  6,  8,  6,  6,  9, 10,
+     11, 12,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 22, 14, 14, 14, 23, 14, 24,
+     25, 26, 26, 26, 27,
+
+#define to_eucJP_ms_C2_offsets 27152
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  6,  7,  1,  1,  1,  8,  9,
+     10, 11,  1,  1, 12,  1, 13,  1,   14,  1, 15,  1,  1,  1,  1, 16,
+
+#define to_eucJP_ms_E2_80_offsets 27218
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  3,  1,  1,    4,  5,  1,  1,  6,  7,  1,  1,
+      8,  9,  1,  1,  1, 10, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1, 13, 14,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E2_84_offsets 27284
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  5,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E2_85_offsets 27350
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11,  1,  1,  1,  1,  1,  1,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E2_88_offsets 27416
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  2,  2,  7,  2,  2,  2,  2,
+      2,  8,  2,  2,  2,  2,  2,  2,    2,  2,  9,  2,  2, 10, 11, 12,
+     13,  2,  2,  2,  2, 14,  2, 15,   16, 17, 18, 19, 20,  2, 21,  2,
+      2,  2,  2,  2, 22, 23,  2,  2,    2,  2,  2,  2,  2, 24,  2,  2,
+
+#define to_eucJP_ms_E2_8A_offsets 27482
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+
+#define to_eucJP_ms_E2_91_offsets 27548
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E2_offsets 27614
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  6,    7,  8,  9,  2, 10,  2,  2,  2,
+      2, 11,  2,  2, 12, 13, 14, 15,   16, 17,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_eucJP_ms_E3_80_offsets 27680
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22,  5,  5,    5,  5,  5,  5,  5, 23,  5, 24,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_eucJP_ms_E3_88_offsets 27746
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E3_8A_offsets 27812
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E3_8C_offsets 27878
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  7,  1,  1,  8,  9,    1,  1,  1, 10,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1, 12,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E3_8D_offsets 27944
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  4,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  7,  8,  9, 10,  1,
+
+#define to_eucJP_ms_E3_8E_offsets 28010
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  5,  6,  1,
+      1,  7,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E3_8F_offsets 28076
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E3_offsets 28142
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  5,  7,  5,  8,  9, 10, 11,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_eucJP_ms_E4_BB_offsets 28208
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    6,  6,  9, 10,  6, 11, 12, 13,
+     14,  6,  6,  6, 15, 16, 17, 18,   19, 20, 21, 22,  6, 23, 24, 25,
+     26, 27, 28, 29, 30, 31,  6,  6,   32,  6,  6,  6,  6, 33, 34, 35,
+     36, 37, 38, 39,  6, 40, 41, 42,    6,  6,  6, 43, 44, 45, 46, 47,
+
+#define to_eucJP_ms_E5_83_offsets 28274
+128, 191,
+      1,  2,  3,  4,  5,  6,  2,  7,    2,  8,  9,  2, 10, 11, 12, 13,
+     14, 15,  2, 16, 17, 18, 19,  2,   20,  2, 21,  2, 22, 23, 24, 25,
+      2,  2, 26, 27, 28, 29, 30, 31,   32, 33,  2,  2,  2, 34, 35, 36,
+      2, 37, 38,  2, 39, 40, 41,  2,    2, 42, 43, 44,  2,  2, 45,  2,
+
+#define to_eucJP_ms_E5_87_offsets 28340
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  1,    6,  7,  1,  8,  9, 10,  1, 11,
+      1, 12, 13, 14,  1, 15, 16,  1,   17,  1,  1, 18, 19, 20, 21,  1,
+     22, 23, 24,  1,  1, 25, 26, 27,    1, 28, 29,  1, 30, 31, 32,  1,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43,  1,  1, 44, 45,  1,
+
+#define to_eucJP_ms_E5_8C_offsets 28406
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  5, 10, 11, 12, 13,  5, 14,
+     15, 16,  5, 17,  5, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+     29, 30,  5, 31, 32, 33,  5, 34,   35, 36, 37, 38, 39, 40,  5, 41,
+     42, 43, 44, 45,  5, 46,  5,  5,   47, 48, 49, 50, 51, 52, 53, 54,
+
+#define to_eucJP_ms_E5_92_offsets 28472
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    8,  9, 10, 11, 12, 13, 14, 15,
+     16, 17, 18,  3,  3, 19, 20,  3,    3,  3,  3,  3, 21,  3,  3, 22,
+      3, 23, 24,  3, 25, 26, 27, 28,   29, 30, 31, 32, 33, 34, 35, 36,
+      3, 37, 38, 39,  3,  3,  3, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+
+#define to_eucJP_ms_E5_9D_offsets 28538
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  6,    2,  2,  7,  2,  8,  9, 10, 11,
+     12, 13, 14,  2,  2,  2,  2,  2,    2, 15,  2,  2,  2,  2,  2,  2,
+      2, 16, 17,  2, 18, 19, 20, 21,   22, 23, 24, 25,  2, 26, 27, 28,
+     29, 30,  2, 31, 32, 33,  2, 34,    2, 35, 36, 37, 38,  2, 39, 40,
+
+#define to_eucJP_ms_E5_A2_offsets 28604
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  6,    7,  8,  9,  3, 10, 11,  3, 12,
+     13,  3,  3, 14, 15,  3, 16, 17,    3,  3,  3,  3, 18, 19, 20, 21,
+     22, 23, 24,  3,  3,  3, 25,  3,   26, 27,  3, 28,  3,  3, 29,  3,
+      3, 30, 31, 32,  3,  3,  3,  3,   33, 34, 35, 36, 37,  3, 38,  3,
+
+#define to_eucJP_ms_E5_AF_offsets 28670
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  9,  9, 11, 12,  9, 13,
+     14,  9, 15, 16, 17,  9, 18, 19,   20, 21, 22, 23,  9, 24, 25, 26,
+     27, 28, 29,  9, 30, 31, 32, 33,   34, 35,  9, 36, 37,  9, 38, 39,
+     40, 41,  9, 42, 43, 44, 45,  9,   46,  9, 47,  9,  9, 48, 49, 50,
+
+#define to_eucJP_ms_E5_B3_offsets 28736
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  1,  7,    1,  8,  1,  1,  1,  9,  1,  1,
+     10, 11,  1,  1,  1,  1,  1,  1,   12, 13, 14,  1,  1, 15, 16, 17,
+     18, 19, 20,  1, 21, 22, 23,  1,    1,  1, 24, 25,  1, 26,  1,  1,
+
+#define to_eucJP_ms_E5_B5_offsets 28802
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    5,  1,  6,  7,  8,  1,  9,  1,
+     10, 11, 12, 13,  1, 14,  1,  1,    1, 15,  1,  1, 16,  1,  1, 17,
+     18, 19, 20,  1, 21,  1,  1,  1,    1, 22, 23,  1, 24, 25,  1, 26,
+     27,  1,  1, 28,  1,  1, 29,  1,    1, 30, 31,  1,  1,  1, 32, 33,
+
+#define to_eucJP_ms_E5_BE_offsets 28868
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14,  7, 15,
+     16, 17, 18, 19,  7,  7, 20, 21,   22, 23,  7,  7, 24, 25, 26,  7,
+     27, 28, 29,  7, 30,  7,  7, 31,   32, 33, 34, 35, 36, 37, 38, 39,
+     40, 41,  7, 42, 43,  7,  7, 44,   45, 46,  7,  7, 47, 48,  7,  7,
+
+#define to_eucJP_ms_E6_82_offsets 28934
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9, 10, 11, 12, 13, 14,  1,
+      1, 15, 16, 17, 18, 19, 20, 21,   22,  1, 23, 24,  1, 25, 26, 27,
+     28,  1, 29, 30, 31, 32, 33, 34,   35, 36, 37,  1,  1,  1,  1,  1,
+     38, 39, 40, 41, 42, 43, 44, 45,   46,  1,  1, 47, 48, 49, 50,  1,
+
+#define to_eucJP_ms_E6_84_offsets 29000
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  7,    8,  9, 10,  5, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,    5, 23, 24, 25, 26,  5, 27, 28,
+     29, 30, 31,  5,  5,  5,  5, 32,   33,  5, 34, 35, 36,  5,  5,  5,
+     37, 38,  5,  5, 39, 40, 41, 42,    5, 43,  5,  5, 44, 45, 46, 47,
+
+#define to_eucJP_ms_E6_95_offsets 29066
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  4,    5,  6,  1,  1,  1,  7,  8,  9,
+     10, 11, 12,  1, 13, 14, 15, 16,   17, 18,  1,  1,  1, 19, 20, 21,
+     22,  1, 23, 24,  1,  1, 25, 26,    1,  1,  1, 27, 28,  1,  1,  1,
+     29,  1, 30,  1, 31, 32,  1, 33,   34,  1, 35,  1,  1, 36,  1,  1,
+
+#define to_eucJP_ms_E6_98_offsets 29132
+128, 191,
+      1,  2,  3,  4,  5,  2,  6,  7,    8,  9, 10,  2, 11, 12, 13, 14,
+      2, 15, 16, 17, 18, 19, 20,  2,    2,  2,  2,  2, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42,  2, 43, 44, 45, 46, 47,    2, 48,  2, 49, 50,  2,  2, 51,
+
+#define to_eucJP_ms_E6_99_offsets 29198
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    8,  9, 10, 11, 12,  8, 13, 14,
+      8, 15, 16,  8,  8,  8,  8, 17,   18, 19,  8, 20, 21, 22, 23, 24,
+     25, 26, 27,  8, 28, 29, 30, 31,   32, 33, 34, 35, 36,  8, 37, 38,
+     39,  8,  8, 40, 41, 42, 43, 44,   45, 46, 47, 48, 49,  8, 50, 51,
+
+#define to_eucJP_ms_E6_A0_offsets 29264
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  7,  1,  8,  9,    1, 10,  1,  1,  1, 11, 12, 13,
+      1, 14, 15,  1,  1,  1,  1, 16,   17, 18, 19, 20, 21, 22,  1, 23,
+     24, 25, 26, 27, 28,  1,  1,  1,   29, 30,  1, 31, 32, 33,  1, 34,
+
+#define to_eucJP_ms_E6_A9_offsets 29330
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  7,  8,  9,  1,  1, 10,  1,
+     11, 12, 13,  1,  1, 14, 15,  1,   16, 17,  1, 18,  1,  1,  1, 19,
+      1, 20, 21,  1, 22,  1, 23, 24,    1,  1, 25, 26,  1,  1,  1,  1,
+      1, 27, 28, 29,  1,  1,  1,  1,   30,  1,  1,  1,  1,  1, 31, 32,
+
+#define to_eucJP_ms_E6_AB_offsets 29396
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    6,  7,  1,  1,  8,  1,  1,  1,
+      9, 10,  1, 11, 12, 13, 14,  1,    1,  1, 15, 16, 17, 18, 19, 20,
+      1,  1, 21,  1, 22,  1,  1, 23,   24,  1, 25,  1, 26,  1,  1,  1,
+     27, 28, 29,  1,  1,  1,  1,  1,    1,  1, 30, 31, 32, 33,  1,  1,
+
+#define to_eucJP_ms_E6_B7_offsets 29462
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  6,    7,  2,  8,  9, 10,  2, 11, 12,
+      2, 13, 14,  2,  2, 15, 16,  2,   17, 18,  2, 19,  2, 20, 21, 22,
+     23, 24, 25,  2, 26, 27, 28,  2,   29, 30, 31, 32, 33,  2, 34, 35,
+     36, 37, 38, 39, 40, 41, 42, 43,   44, 45, 46, 47, 48,  2,  2,  2,
+
+#define to_eucJP_ms_E7_80_offsets 29528
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  6,    3,  7,  3,  8,  3,  9,  3, 10,
+      3, 11,  3,  3,  3, 12,  3, 13,   14,  3, 15, 16,  3, 17, 18, 19,
+     20,  3,  3, 21,  3,  3, 22, 23,   24,  3,  3,  3, 25,  3,  3, 26,
+     27,  3, 28,  3, 29,  3,  3, 30,    3, 31,  3,  3, 32,  3, 33,  3,
+
+#define to_eucJP_ms_E7_82_offsets 29594
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  5,  6,  1,  1,  1,  7,  1,
+      1,  1,  8,  1,  9, 10, 11, 12,   13, 14,  1, 15,  1,  1,  1,  1,
+      1,  1,  1,  1, 16,  1,  1,  1,    1,  1,  1, 17, 18, 19, 20, 21,
+     22, 23,  1, 24, 25,  1,  1, 26,   27, 28, 29, 30,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E7_94_offsets 29660
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    1,  1,  1,  1,  7,  8,  9,  1,
+      1, 10, 11, 12,  1, 13, 14, 15,   16,  1, 17,  1, 18,  1, 19, 20,
+     21, 22,  1, 23, 24, 25, 26, 27,   28, 29, 30, 31, 32,  1,  1, 33,
+     34, 35, 36, 37,  1,  1, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+
+#define to_eucJP_ms_E7_9A_offsets 29726
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 10, 11, 12, 13, 14, 10,
+     15, 10, 10, 16, 10, 17, 18, 10,   10, 19, 20, 21, 22, 23, 24, 25,
+     26, 10, 27, 28, 29, 30, 31, 32,   33, 10, 34, 10, 10, 35, 36, 10,
+     37, 10, 10, 10, 38, 10, 10, 39,   40, 41, 42, 10, 10, 43, 10, 44,
+
+#define to_eucJP_ms_E7_A4_offsets 29792
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    3,  3,  3,  3,  6,  3,  7,  3,
+      8,  9, 10,  3,  3,  3,  3,  3,    3, 11, 12,  3, 13,  3, 14, 15,
+     16,  3,  3,  3,  3, 17, 18, 19,    3, 20, 21, 22, 23, 24,  3,  3,
+     25, 26,  3,  3, 27, 28,  3,  3,    3,  3, 29, 30, 31, 32, 33, 34,
+
+#define to_eucJP_ms_E7_AB_offsets 29858
+128, 191,
+      1,  1,  1,  2,  3,  4,  5,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+      1, 15, 16, 17,  1, 18,  1,  1,    1, 19, 20, 21, 22, 23,  1, 24,
+     25, 26, 27, 28,  1, 29, 30, 31,   32, 33, 34, 35, 36, 37,  1, 38,
+     39, 40,  1,  1, 41,  1, 42,  1,   43, 44, 45, 46,  1, 47, 48, 49,
+
+#define to_eucJP_ms_E7_B6_offsets 29924
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  1,    7,  8,  1,  9, 10, 11,  1, 12,
+      1, 13,  1, 14,  1,  1, 15, 16,    1, 17, 18, 19, 20, 21, 22, 23,
+     24,  1, 25, 26,  1,  1, 27, 28,    1,  1, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46,  1, 47, 48, 49,
+
+#define to_eucJP_ms_E7_B7_offsets 29990
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    1,  1,  8,  9, 10, 11, 12, 13,
+      1, 14, 15,  1,  1, 16, 17, 18,   19, 20, 21,  1, 22, 23, 24,  1,
+     25, 26, 27,  1, 28, 29, 30,  1,   31, 32, 33, 34, 35, 36,  1, 37,
+      1, 38, 39,  1, 40, 41, 42,  1,    1, 43, 44, 45,  1,  1,  1,  1,
+
+#define to_eucJP_ms_E8_8D_offsets 30056
+128, 191,
+      1,  2,  3,  4,  5,  6,  2,  7,    2,  8,  9,  2,  2, 10, 11, 12,
+     13, 14, 15, 16, 17, 18, 19, 20,   21,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 22,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+     23,  2,  2, 24,  2, 25,  2, 26,   27,  2,  2, 28, 29, 30,  2, 31,
+
+#define to_eucJP_ms_E8_96_offsets 30122
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    8,  9, 10, 11, 12,  3,  3, 13,
+     14, 15,  3, 16, 17,  3,  3, 18,   19, 20,  3, 21, 22, 23,  3, 24,
+     25,  3, 26,  3, 27, 28, 29, 30,   31, 32, 33, 34, 35, 36, 37, 38,
+     39,  3,  3,  3, 40,  3, 41, 42,   43, 44, 45,  3, 46, 47, 48, 49,
+
+#define to_eucJP_ms_E8_A0_offsets 30188
+128, 191,
+      1,  2,  1,  3,  1,  4,  5,  6,    1,  7,  8,  9,  1, 10, 11, 12,
+     13, 14, 15, 16, 17, 18, 19,  1,   20, 21, 22, 23, 24,  1, 25, 26,
+      1, 27, 28, 29,  1,  1,  1, 30,   31,  1,  1,  1,  1, 32, 33,  1,
+     34, 35, 36,  1,  1, 37, 38,  1,    1, 39, 40, 41, 42,  1,  1,  1,
+
+#define to_eucJP_ms_E8_AD_offsets 30254
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    8,  9,  1,  1, 10, 11, 12, 13,
+      1,  1, 14, 15, 16,  1, 17,  1,   18, 19, 20, 21, 22,  1, 23, 24,
+      1,  1,  1, 25,  1,  1, 26,  1,    1,  1,  1, 27, 28, 29,  1, 30,
+     31, 32, 33,  1, 34,  1, 35, 36,   37, 38,  1,  1, 39, 40, 41, 42,
+
+#define to_eucJP_ms_E8_B3_offsets 30320
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     13, 17, 13, 18, 13, 19, 20, 13,   13, 21, 22, 23, 24, 25, 26, 13,
+     27, 28, 29, 30, 31, 13, 32, 13,   33, 13, 34, 13, 35, 36, 13, 37,
+     38, 13, 39, 13, 40, 41, 13, 42,   43, 13, 44, 45, 46, 47, 48, 49,
+
+#define to_eucJP_ms_E8_B5_offsets 30386
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  7,  8,  9, 10,  1,
+     11, 12,  1, 13, 14,  1, 15, 16,    1,  1,  1,  1,  1,  1,  1, 17,
+
+#define to_eucJP_ms_E9_83_offsets 30452
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  6,    7,  1,  8,  1,  9,  1, 10,  1,
+      1,  1, 11,  1,  1, 12,  1, 13,   14, 15,  1, 16, 17, 18, 19, 20,
+      1, 21, 22,  1, 23, 24,  1,  1,   25,  1,  1, 26,  1, 27,  1, 28,
+     29,  1,  1,  1, 30, 31, 32, 33,    1,  1,  1,  1,  1, 34, 35, 36,
+
+#define to_eucJP_ms_E9_84_offsets 30518
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  2,    7,  2,  2,  2,  2,  8,  2,  2,
+      9,  2, 10,  2, 11, 12, 13, 14,   15, 16, 17,  2, 18,  2, 19,  2,
+     20,  2, 21, 22,  2, 23,  2, 24,    2, 25,  2,  2,  2, 26, 27, 28,
+     29, 30, 31,  2, 32,  2, 33, 34,    2, 35, 36,  2, 37, 38,  2,  2,
+
+#define to_eucJP_ms_E9_96_offsets 30584
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+      2, 15, 16, 17, 18,  2, 19,  2,   20, 21,  2,  2,  2, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34,  2, 35, 36, 37,  2,  2,
+      2,  2, 38,  2, 39,  2, 40,  2,    2, 41, 42, 43, 44, 45, 46, 47,
+
+#define to_eucJP_ms_E9_9C_offsets 30650
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11,  2,  2, 12, 13, 14,
+      2, 15,  2, 16,  2,  2, 17,  2,    2, 18, 19, 20, 21, 22, 23,  2,
+      2, 24, 25, 26, 27,  2,  2, 28,   29,  2, 30,  2,  2,  2,  2,  2,
+     31, 32, 33, 34,  2,  2,  2,  2,   35, 36,  2, 37,  2, 38, 39,  2,
+
+#define to_eucJP_ms_E9_9D_offsets 30716
+128, 191,
+      1,  2,  3,  4,  5,  1,  6,  1,    7,  8,  9,  1,  1, 10, 11, 12,
+      1, 13, 14,  1,  1, 15, 16, 17,   18, 19, 20, 21, 22,  1, 23,  1,
+     24, 25, 26, 27, 28,  1, 29, 30,   31, 32, 33, 34,  1, 35, 36,  1,
+      1, 37,  1, 38, 39,  1, 40, 41,   42, 43, 44, 45, 46, 47,  1, 48,
+
+#define to_eucJP_ms_E9_A6_offsets 30782
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  5,  1,  6,  1,  7,  8,  9,
+      1,  1,  1,  1,  1, 10, 11,  1,   12,  1,  1,  1, 13, 14, 15,  1,
+     16, 17, 18, 19, 20, 21,  1,  1,    1, 22, 23,  1, 24, 25,  1, 26,
+
+#define to_eucJP_ms_E9_AB_offsets 30848
+128, 191,
+      1,  2,  3,  4,  5,  3,  6,  3,    7,  3,  3,  3,  3,  3,  8,  9,
+     10, 11, 12, 13, 14, 15, 16, 17,   18, 19,  3, 20, 21,  3, 22, 23,
+     24,  3, 25, 26, 27, 28, 29, 30,    3, 31, 32, 33, 34, 35, 36, 37,
+      3, 38, 39, 40, 41, 42,  3, 43,    3, 44, 45, 46,  3, 47,  3, 48,
+
+#define to_eucJP_ms_E9_AD_offsets 30914
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    7,  1,  1,  8,  9, 10, 11, 12,
+      1, 13,  1,  1, 14, 15, 16, 17,   18,  1, 19, 20,  1,  1, 21,  1,
+      1, 22,  1, 23,  1, 24, 25,  1,   26,  1, 27, 28, 29, 30, 31, 32,
+      1,  1, 33, 34, 35, 36,  1, 37,   38, 39,  1,  1,  1,  1,  1, 40,
+
+#define to_eucJP_ms_E9_BB_offsets 30980
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    4,  1,  1,  5,  6,  7,  8,  9,
+     10, 11, 12,  1, 13, 14,  1,  1,   15, 16,  1, 17, 18, 19, 20, 21,
+     22,  1,  1,  1, 23, 24,  1, 25,   26,  1,  1,  1, 27, 28, 29, 30,
+     31, 32, 33,  1, 34, 35, 36, 37,   38, 39,  1, 40, 41, 42,  1, 43,
+
+#define to_eucJP_ms_EE_9D_offsets 31046
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25, 25, 25,
+
+#define to_eucJP_ms_EE_offsets 31112
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+
+#define to_eucJP_ms_EF_A4_offsets 31178
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_EF_A7_offsets 31244
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_EF_A8_offsets 31310
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      4,  5,  6,  7,  8,  9, 10, 11,   12, 13, 14, 15, 16, 17, 18, 19,
+     20, 21, 22, 23, 24, 25, 26, 27,   28, 29, 30, 31, 32, 33,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_EF_BD_offsets 31376
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 63,
+
+#define to_eucJP_ms_EF_BF_offsets 31442
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_eucJP_ms_EF_offsets 31508
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  7,  8,
+
+#define to_eucJP_ms_offsets 31574
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    6,  6,  6,  8,  6,  6,  9, 10,
+     11, 12,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 22, 14, 14, 14, 23, 24, 25,
+     26, 27, 27, 27, 28,
+
+#define to_CP51932_C2_offsets 31821
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  6,  1,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_C3_offsets 31887
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_CE_offsets 31953
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18,  1, 19, 20, 21, 22, 23,   24, 25,  1,  1,  1,  1,  1,  1,
+      1, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+
+#define to_CP51932_CF_offsets 32019
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_CP51932_D0_offsets 32085
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  5,  6,  7,  8,  9, 10,   11, 12, 13, 14, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_CP51932_D1_offsets 32151
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_CP51932_E2_84_offsets 32217
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E4_B8_offsets 32283
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  5,    6,  7,  8,  9,  3, 10, 11,  3,
+     12, 13,  3,  3, 14, 15, 16, 17,   18, 19,  3,  3,  3,  3, 20,  3,
+      3, 21,  3,  3,  3,  3, 22,  3,   23,  3, 24,  3,  3, 25,  3,  3,
+      3, 26, 27,  3,  3,  3, 28,  3,   29, 30,  3, 31, 32,  3,  3, 33,
+
+#define to_CP51932_E4_B9_offsets 32349
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  1,    1,  1,  1,  5,  1,  6,  7,  8,
+      1,  1,  1,  1,  1,  9, 10, 11,   12, 13,  1,  1,  1, 14, 15, 16,
+      1,  1, 17,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 18,  1, 19,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_CP51932_E4_BA_offsets 32415
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    6,  7,  8,  9, 10,  2, 11,  2,
+      2, 12, 13,  2, 14, 15,  2,  2,   16, 17,  2, 18, 19,  2, 20, 21,
+     22, 23, 24,  2, 25, 26, 27,  2,   28,  2,  2, 29, 30, 31, 32,  2,
+     33,  2,  2, 34,  2,  2, 35,  2,    2,  2, 36,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E4_BB_offsets 32481
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  7,    4,  4,  8,  9,  4, 10, 11, 12,
+      4,  4,  4,  4, 13, 14, 15, 16,   17, 18,  4,  4,  4, 19, 20, 21,
+      4, 22,  4, 23, 24, 25,  4,  4,    4,  4,  4,  4,  4, 26, 27,  4,
+     28,  4, 29,  4,  4,  4, 30, 31,    4,  4,  4, 32, 33,  4,  4,  4,
+
+#define to_CP51932_E4_BC_offsets 32547
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  3,    3,  5,  6,  3,  3,  7,  8,  9,
+     10, 11,  3,  3,  3,  3,  3,  3,    3,  3, 12,  3, 13, 14,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3, 15,
+     16,  3,  3,  3, 17,  3, 18,  3,   19, 20, 21,  3, 22, 23,  3,  3,
+
+#define to_CP51932_E4_BD_offsets 32613
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    1,  1,  1,  1,  1,  5,  6,  7,
+      8,  9,  1, 10,  1, 11, 12, 13,    1, 14, 15, 16, 17, 18, 19,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 20,  1,  1,  1,  1,  1, 21,
+     22,  1,  1, 23,  1, 24, 25,  1,    1,  1,  1, 26, 27,  1,  1, 28,
+
+#define to_CP51932_E4_BE_offsets 32679
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  5,  6,  1,  7,  1,  8,
+      1,  9, 10,  1, 11,  1, 12,  1,   13,  1, 14, 15,  1, 16,  1,  1,
+     17, 18,  1,  1,  1,  1,  1,  1,    1,  1,  1, 19,  1, 20, 21, 22,
+      1,  1,  1,  1,  1, 23, 24,  1,    1,  1,  1,  1,  1,  1,  1, 25,
+
+#define to_CP51932_E4_BF_offsets 32745
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  5,  6,  1,  1,  7,  8,  1,
+      9, 10,  1,  1, 11,  1,  1, 12,   13,  1, 14, 15,  1, 16,  1, 17,
+      1, 18,  1, 19, 20, 21,  1,  1,    1,  1,  1,  1,  1,  1, 22, 23,
+      1,  1,  1, 24,  1, 25, 26,  1,   27,  1, 28,  1,  1,  1, 29, 30,
+
+#define to_CP51932_E5_80_offsets 32811
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  4,  1,  5,  1,  6,  1,  7,
+      1,  8,  9,  1, 10,  1, 11,  1,    1, 12, 13,  1,  1,  1, 14, 15,
+      1, 16, 17, 18, 19, 20, 21,  1,   22, 23, 24, 25, 26, 27,  1,  1,
+      1,  1,  1,  1,  1,  1, 28,  1,    1, 29,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_81_offsets 32877
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    7,  8,  2,  2,  2,  2,  2,  9,
+     10,  2,  2,  2,  2, 11, 12,  2,    2,  2, 13,  2, 14,  2,  2,  2,
+      2,  2,  2,  2,  2, 15,  2,  2,    2,  2,  2,  2, 16,  2,  2,  2,
+     17,  2, 18,  2, 19, 20, 21,  2,   22,  2,  2,  2,  2, 23,  2,  2,
+
+#define to_CP51932_E5_82_offsets 32943
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  2,  2,  6,  2,  2,  2,    7,  8,  9,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 10, 11,  2,  2,
+      2,  2, 12, 13, 14, 15,  2, 16,    2,  2,  2,  2,  2,  2, 17,  2,
+
+#define to_CP51932_E5_83_offsets 33009
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  1,  6,  1,  7,
+      1,  8,  1,  1,  1,  9, 10,  1,   11,  1, 12,  1,  1,  1, 13,  1,
+      1,  1,  1, 14,  1, 15,  1, 16,    1,  1,  1,  1,  1, 17, 18,  1,
+      1,  1,  1,  1, 19, 20,  1,  1,    1, 21,  1, 22,  1,  1,  1,  1,
+
+#define to_CP51932_E5_84_offsets 33075
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  4,    4,  6,  4,  4,  4,  4,  4,  4,
+      4,  4,  7,  4,  8,  9, 10,  4,   11,  4, 12,  4,  4,  4,  4, 13,
+      4, 14,  4,  4,  4,  4,  4,  4,    4,  4, 15,  4,  4,  4,  4,  4,
+      4,  4, 16,  4,  4,  4,  4, 17,    4,  4, 18, 19, 20,  4,  4, 21,
+
+#define to_CP51932_E5_85_offsets 33141
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15,  3,
+     16,  3, 17,  3, 18,  3,  3,  3,    3,  3, 19,  3, 20,  3,  3,  3,
+      3,  3, 21,  3, 22, 23,  3,  3,   24, 25, 26, 27, 28, 29, 30,  3,
+      3, 31,  3,  3,  3, 32, 33, 34,   35,  3,  3,  3, 36,  3,  3,  3,
+
+#define to_CP51932_E5_86_offsets 33207
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    2,  6,  7,  2,  8,  9,  2, 10,
+     11, 12, 13, 14,  2, 15, 16, 17,    2, 18,  2,  2,  2, 19,  2,  2,
+     20,  2, 21,  2, 22, 23, 24,  2,   25, 26, 27, 28, 29,  2,  2,  2,
+     30, 31, 32, 33, 34, 35, 36, 37,    2,  2,  2,  2,  2, 38, 39,  2,
+
+#define to_CP51932_E5_87_offsets 33273
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    1,  5,  1,  6,  7,  8,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1, 10, 11, 12,  1,  1,
+     13, 14,  1,  1,  1,  1, 15, 16,    1, 17, 18,  1, 19, 20,  1,  1,
+     21, 22,  1,  1,  1, 23, 24,  1,   25, 26, 27,  1,  1, 28, 29,  1,
+
+#define to_CP51932_E5_88_offsets 33339
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    7,  2,  8,  9,  2,  2, 10,  2,
+      2, 11,  2,  2, 12, 13,  2, 14,    2,  2,  2,  2,  2, 15,  2,  2,
+      2,  2,  2,  2, 16, 17,  2, 18,    2, 19, 20,  2,  2,  2, 21,  2,
+     22,  2,  2, 23,  2,  2, 24, 25,   26, 27, 28, 29,  2,  2,  2,  2,
+
+#define to_CP51932_E5_89_offsets 33405
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  4,    1,  1,  5,  6,  7,  8,  1,  9,
+      1,  1,  1,  1, 10,  1, 11,  1,    1,  1,  1, 12,  1,  1, 13,  1,
+      1,  1,  1, 14, 15, 16,  1,  1,    1, 17, 18,  1,  1,  1,  1, 19,
+     20, 21, 22, 23, 24, 25,  1,  1,    1,  1,  1,  1,  1, 26,  1, 27,
+
+#define to_CP51932_E5_8A_offsets 33471
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  6,  1,  1,
+      1,  7,  8,  1,  9,  1,  1,  1,    1,  1,  1, 10, 11,  1,  1, 12,
+     13,  1,  1, 14,  1,  1, 15,  1,    1, 16, 17, 18, 19, 20,  1, 21,
+      1, 22,  1,  1, 23, 24,  1,  1,    1, 25,  1,  1, 26,  1, 27,  1,
+
+#define to_CP51932_E5_8B_offsets 33537
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  6,    3,  7,  3,  3,  3,  8,  3,  3,
+      3,  3,  9,  3,  3, 10,  3, 11,   12, 13,  3, 14,  3, 15, 16, 17,
+     18,  3, 19, 20, 21,  3, 22, 23,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3, 24, 25,  3, 26,  3,  3,   27, 28, 29,  3,  3,  3, 30, 31,
+
+#define to_CP51932_E5_8C_offsets 33603
+128, 191,
+      1,  2,  3,  4,  4,  5,  6,  7,    8,  4,  4,  4,  4,  9,  4, 10,
+     11,  4,  4,  4,  4, 12, 13, 14,    4, 15, 16,  4,  4, 17,  4,  4,
+     18, 19,  4, 20, 21,  4,  4,  4,    4,  4, 22,  4,  4,  4,  4, 23,
+      4, 24,  4, 25,  4,  4,  4,  4,   26, 27, 28, 29,  4,  4,  4, 30,
+
+#define to_CP51932_E5_8D_offsets 33669
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    8,  9, 10,  3,  3, 11,  3,  3,
+      3, 12, 13, 14, 15,  3,  3, 16,   17,  3, 18,  3, 19,  3, 20,  3,
+     21,  3,  3,  3,  3,  3, 22,  3,    3, 23,  3,  3,  3,  3, 24, 25,
+     26, 27, 28, 29, 30, 31,  3, 32,   33,  3,  3, 34,  3,  3,  3, 35,
+
+#define to_CP51932_E5_8E_offsets 33735
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  5,  1,    6,  1,  7,  1,  1,  1,  1,  8,
+      9,  1,  1,  1,  1, 10, 11,  1,   12, 13,  1,  1,  1, 14, 15,  1,
+     16,  1, 17, 18,  1,  1, 19,  1,    1,  1,  1, 20,  1,  1,  1,  1,
+
+#define to_CP51932_E5_8F_offsets 33801
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  6,  7,  8,  9, 10,  1,
+      1,  1,  1,  1, 11,  1, 12, 13,    1, 14,  1, 15,  1, 16,  1, 17,
+      1, 18, 19, 20, 21, 22,  1,  1,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34,  1,  1, 35, 36,   37,  1, 38,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_90_offsets 33867
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    5,  6,  7,  8,  9, 10, 11, 12,
+     13, 14,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1, 16,  1, 17,
+     18,  1,  1,  1,  1,  1, 19,  1,    1, 20,  1, 21, 22, 23, 24,  1,
+      1,  1,  1,  1,  1,  1, 25,  1,   26, 27,  1, 28, 29, 30, 31,  1,
+
+#define to_CP51932_E5_91_offsets 33933
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    5,  6,  7,  2,  2,  2,  8,  2,
+      2,  9,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 10,
+      2,  2,  2,  2,  2,  2,  2,  2,   11,  2, 12,  2,  2,  2,  2,  2,
+     13, 14,  2, 15,  2, 16, 17, 18,    2,  2,  2, 19, 20, 21,  2,  2,
+
+#define to_CP51932_E5_92_offsets 33999
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  5,  6,  7,  2,  8,  9,
+     10,  2, 11,  2,  2,  2,  2,  2,    2,  2,  2,  2, 12,  2,  2,  2,
+      2,  2, 13,  2, 14, 15,  2,  2,   16, 17,  2, 18, 19,  2,  2, 20,
+      2,  2, 21, 22,  2,  2,  2,  2,   23,  2,  2,  2, 24, 25, 26,  2,
+
+#define to_CP51932_E5_93_offsets 34065
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    9,  4,  4,  4,  4,  4,  4,  4,
+      4, 10, 11,  4,  4, 12, 13,  4,   14, 15,  4,  4,  4, 16, 17,  4,
+      4,  4, 18,  4,  4,  4,  4,  4,    4,  4, 19,  4,  4, 20,  4, 21,
+
+#define to_CP51932_E5_94_offsets 34131
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  1,  1,  1,  1,  5,
+      6,  1,  1,  1,  7,  1,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  9, 10,
+      1, 11,  1, 12,  1,  1,  1,  1,   13, 14,  1,  1,  1,  1, 15,  1,
+
+#define to_CP51932_E5_95_offsets 34197
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  2,    2,  2,  2,  2,  6,  2,  2,  7,
+      2,  2,  2,  8,  2,  2,  9, 10,    2,  2,  2,  2, 11, 12,  2,  2,
+      2,  2,  2, 13,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 14, 15,  2, 16,  2,
+
+#define to_CP51932_E5_96_offsets 34263
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    2,  7,  8,  9,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   10, 11, 12,  2, 13, 14, 15, 16,
+      2,  2,  2,  2,  2,  2,  2, 17,   18, 19, 20, 21, 22,  2, 23,  2,
+     24,  2,  2,  2,  2,  2, 25,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E5_97_offsets 34329
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  6,  1,  7,  1,  1,  8,
+      1,  1,  1,  9, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,    1, 12,  1,  1,  1, 13, 14,  1,
+
+#define to_CP51932_E5_98_offsets 34395
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  5,  6,    7,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1,  1,  1, 10,
+      1, 11, 12,  1, 13,  1, 14,  1,   15,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_99_offsets 34461
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  4,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  1,  1,  1,    8,  1,  9, 10, 11,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1,  1,   13,  1, 14,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_9A_offsets 34527
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    2,  2,  5,  2,  2,  2,  2,  6,
+      2,  2,  2,  2,  7,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  2,  9,  2,  2, 10,  2,  2,    2,  2,  2,  2,  2,  2, 11,  2,
+      2,  2,  2,  2, 12,  2, 13,  2,    2,  2,  2,  2, 14,  2,  2,  2,
+
+#define to_CP51932_E5_9B_offsets 34593
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  5,  5,  5,  5,  5,  7,  5,
+      5,  8,  5,  9,  5,  5,  5, 10,   11,  5, 12, 13,  5,  5, 14,  5,
+     15,  5,  5, 16,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5, 17,  5,
+     18,  5, 19, 20,  5,  5,  5,  5,    5, 21, 22,  5,  5, 23,  5, 24,
+
+#define to_CP51932_E5_9C_offsets 34659
+128, 191,
+      1,  2,  2,  3,  4,  2,  2,  2,    5,  6,  2,  7,  2,  8,  2,  9,
+      2,  2, 10, 11,  2,  2, 12,  2,   13,  2,  2,  2, 14,  2,  2, 15,
+      2,  2,  2,  2,  2,  2, 16, 17,   18,  2,  2,  2,  2, 19,  2,  2,
+     20,  2,  2,  2,  2,  2,  2, 21,   22,  2,  2, 23,  2,  2,  2,  2,
+
+#define to_CP51932_E5_9D_offsets 34725
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  4,    2,  2,  5,  2,  2,  2,  6,  7,
+      8,  9,  2,  2,  2,  2,  2,  2,    2, 10,  2,  2,  2,  2,  2,  2,
+      2, 11,  2,  2, 12, 13, 14,  2,    2, 15, 16,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 17,
+
+#define to_CP51932_E5_9E_offsets 34791
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,    1,  1, 11,  1, 12,  1,  1,  1,
+     13,  1,  1, 14,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_9F_offsets 34857
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  5,    6,  2,  2,  7,  2,  2,  8,  2,
+      2,  2,  9, 10, 11,  2, 12,  2,    2,  2,  2,  2, 13,  2,  2, 14,
+     15,  2,  2, 16,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2, 19, 20,  2, 21,  2,  2,  2,
+
+#define to_CP51932_E5_A0_offsets 34923
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    2,  2,  6,  7,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  8,  2,  2,    2,  9,  2,  2,  2, 10,  2,  2,
+      2, 11,  2,  2, 12,  2,  2,  2,    2,  2, 13,  2,  2,  2,  2, 14,
+     15, 16,  2,  2, 17, 18,  2,  2,    2,  2, 19,  2,  2, 20,  2,  2,
+
+#define to_CP51932_E5_A1_offsets 34989
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  3,  4,  5,  3,  3,  3,  3,
+      3,  6,  7,  3,  8,  3,  3,  9,   10, 11, 12,  3,  3,  3, 13,  3,
+      3,  3, 14,  3,  3,  3,  3,  3,    3, 15,  3, 16,  3,  3,  3,  3,
+     17,  3, 18,  3,  3, 19,  3,  3,    3, 20,  3,  3,  3,  3, 21,  3,
+
+#define to_CP51932_E5_A2_offsets 35055
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  5,    1,  1,  1,  1,  6,  1,  7,  8,
+      1,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1, 10,  1,  1, 11,  1,
+      1,  1, 12, 13,  1,  1,  1,  1,   14, 15, 16, 17,  1,  1, 18,  1,
+
+#define to_CP51932_E5_A3_offsets 35121
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  1,  5,  1,  6,  1,  1,  1,
+      1,  7,  1,  8,  1,  9,  1, 10,   11, 12,  1,  1, 13,  1, 14, 15,
+      1,  1,  1,  1, 16, 17,  1,  1,    1,  1,  1, 18, 19,  1, 20, 21,
+     22, 23, 24,  1,  1,  1,  1, 25,    1, 26, 27, 28, 29, 30,  1,  1,
+
+#define to_CP51932_E5_A4_offsets 35187
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  3,  4,  5,  1,  1,  1,  6,
+      7,  1,  1,  1,  1,  8,  9,  1,   10, 11, 12, 13, 14,  1,  1,  1,
+      1,  1, 15,  1,  1, 16,  1, 17,    1, 18, 19, 20, 21, 22, 23,  1,
+      1, 24, 25,  1,  1,  1,  1, 26,   27,  1,  1,  1,  1,  1, 28,  1,
+
+#define to_CP51932_E5_A5_offsets 35253
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  1,  1,  1,  6,  7,
+      8,  9,  1, 10, 11, 12,  1, 13,   14,  1, 15, 16,  1, 17,  1,  1,
+     18,  1, 19, 20,  1, 21,  1, 22,   23, 24, 25,  1, 26,  1, 27,  1,
+      1,  1,  1, 28, 29,  1,  1,  1,   30,  1,  1,  1,  1, 31,  1,  1,
+
+#define to_CP51932_E5_A6_offsets 35319
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,    1, 10,  1, 11,  1, 12,  1,  1,
+      1,  1,  1, 13, 14, 15,  1,  1,   16,  1,  1,  1, 17,  1,  1,  1,
+      1,  1, 18,  1,  1,  1,  1,  1,    1, 19, 20, 21,  1,  1, 22,  1,
+
+#define to_CP51932_E5_A7_offsets 35385
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  4,  1,  1,  1,  1,
+      5,  6,  1,  7,  8,  1,  1,  1,    1,  9, 10,  1, 11,  1,  1,  1,
+      1,  1,  1,  1,  1, 12, 13,  1,   14,  1, 15, 16,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 17,  1,    1,  1,  1, 18,  1,  1,  1, 19,
+
+#define to_CP51932_E5_A8_offsets 35451
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  8,  1,  1,  9,
+     10,  1,  1,  1,  1, 11,  1,  1,    1, 12,  1,  1,  1,  1,  1, 13,
+      1,  1,  1,  1,  1, 14, 15,  1,    1,  1,  1,  1, 16,  1,  1,  1,
+
+#define to_CP51932_E5_A9_offsets 35517
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  3,    3,  5,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  6,  3,  3,  3,  3,  3,
+      3,  3,  7,  3,  3,  3,  8,  3,    3,  3,  9,  3, 10,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3, 11,
+
+#define to_CP51932_E5_AA_offsets 35583
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  3,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  7,  1,
+
+#define to_CP51932_E5_AB_offsets 35649
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 10,  1, 11,  1,  1, 12,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 14, 15,  1,  1,  1,  1,
+
+#define to_CP51932_E5_AC_offsets 35715
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  3,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  5,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  1,  7,  1,  8,  1,  1,  1,
+      9,  1, 10,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1, 12,  1,
+
+#define to_CP51932_E5_AD_offsets 35781
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      5,  6,  2,  2,  7,  8,  9, 10,   11,  2, 12, 13, 14, 15,  2, 16,
+      2,  2,  2, 17, 18, 19, 20,  2,    2, 21,  2, 22,  2,  2,  2,  2,
+     23, 24,  2, 25,  2, 26,  2,  2,   27,  2, 28,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E5_AE_offsets 35847
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  5,    6,  7,  2,  8,  9, 10,  2, 11,
+      2,  2,  2,  2,  2, 12,  2, 13,   14, 15, 16, 17, 18, 19,  2, 20,
+      2,  2, 21, 22, 23, 24, 25,  2,    2,  2,  2,  2,  2,  2, 26,  2,
+     27,  2,  2, 28, 29, 30, 31,  2,   32, 33,  2,  2,  2,  2,  2, 34,
+
+#define to_CP51932_E5_AF_offsets 35913
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    2,  9,  2,  2, 10,  2,  2,  2,
+     11,  2, 12, 13, 14,  2,  2,  2,   15,  2,  2, 16,  2, 17, 18, 19,
+      2, 20, 21,  2, 22, 23, 24, 25,   26, 27,  2, 28, 29,  2, 30,  2,
+     31,  2,  2, 32,  2, 33, 34,  2,   35,  2, 36,  2,  2,  2, 37, 38,
+
+#define to_CP51932_E5_B0_offsets 35979
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  7,    8,  9, 10, 11,  1, 12, 13, 14,
+      1, 15,  1, 16,  1,  1, 17,  1,    1,  1, 18,  1,  1,  1, 19,  1,
+     20,  1, 21,  1, 22,  1,  1,  1,   23,  1,  1,  1,  1, 24,  1,  1,
+      1, 25,  1,  1,  1,  1,  1,  1,   26, 27, 28, 29, 30, 31, 32, 33,
+
+#define to_CP51932_E5_B1_offsets 36045
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  3,    6,  3,  7,  8,  3,  9, 10, 11,
+     12, 13,  3, 14,  3, 15,  3,  3,    3,  3,  3,  3,  3,  3, 16,  3,
+     17, 18,  3,  3, 19, 20,  3,  3,    3,  3,  3,  3, 21,  3, 22, 23,
+      3, 24,  3,  3,  3,  3, 25,  3,    3, 26,  3,  3,  3,  3,  3,  3,
+
+#define to_CP51932_E5_B2_offsets 36111
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  7,  1,    8,  9,  1, 10, 11,  1,  1,  1,
+      1, 12,  1, 13,  1,  1, 14, 15,   16,  1, 17, 18, 19,  1, 20,  1,
+
+#define to_CP51932_E5_B3_offsets 36177
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  1,  1,  1,  1,    7,  8,  9,  1,  1, 10,  1, 11,
+     12,  1,  1,  1,  1, 13, 14,  1,    1,  1, 15, 16,  1, 17,  1,  1,
+
+#define to_CP51932_E5_B4_offsets 36243
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  4,  1,
+      1,  5,  1,  1,  6,  7,  8,  9,   10, 11, 12, 13,  1,  1,  1, 14,
+      1,  1, 15,  1,  1,  1,  1, 16,    1, 17,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_B5_offsets 36309
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  4,  1,  5,  1,
+      6,  1,  7,  8,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 10,  1,  1, 11, 12,  1, 13,
+      1,  1,  1, 14,  1,  1, 15,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_B6_offsets 36375
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  1,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10,  1, 11,  1,
+      1,  1,  1,  1,  1,  1,  1, 12,   13, 14, 15,  1, 16, 17,  1,  1,
+
+#define to_CP51932_E5_B7_offsets 36441
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  1,  1,
+      5,  1,  6,  7,  1,  1,  8,  1,    1,  1,  1,  9,  1, 10, 11,  1,
+      1, 12,  1, 13,  1, 14, 15, 16,   17,  1,  1, 18,  1,  1, 19,  1,
+      1, 20, 21, 22, 23, 24,  1, 25,    1,  1,  1, 26,  1, 27, 28,  1,
+
+#define to_CP51932_E5_B8_offsets 36507
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    1,  1,  1,  5,  6,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    1,  9, 10, 11,  1, 12,  1,  1,
+      1,  1,  1,  1,  1, 13,  1,  1,    1,  1,  1, 14,  1, 15,  1, 16,
+     17,  1,  1, 18,  1,  1, 19, 20,   21,  1,  1,  1,  1, 22,  1,  1,
+
+#define to_CP51932_E5_B9_offsets 36573
+128, 191,
+      1,  2,  2,  3,  4,  5,  2,  6,    2,  2,  2,  2,  7,  2,  8,  2,
+      2,  2,  2,  2,  9, 10,  2, 11,    2,  2,  2,  2,  2,  2,  2, 12,
+      2, 13, 14, 15, 16,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 17, 18, 19, 20, 21,  2,   22, 23, 24, 25, 26, 27, 28, 29,
+
+#define to_CP51932_E5_BA_offsets 36639
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  5,    1,  1,  6,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  8,  9, 10,    1,  1, 11,  1, 12,  1,  1,  1,
+     13,  1,  1,  1,  1,  1, 14, 15,    1,  1,  1, 16,  1, 17,  1,  1,
+      1,  1,  1,  1,  1, 18, 19, 20,   21,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E5_BB_offsets 36705
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    5,  6,  7,  1,  1,  1,  1,  8,
+      9,  1,  1, 10,  1,  1, 11,  1,    1,  1, 12, 13,  1, 14,  1, 15,
+     16, 17, 18, 19,  1,  1,  1,  1,   20, 21,  1,  1, 22,  1,  1,  1,
+     23, 24,  1, 25, 26,  1, 27, 28,   29,  1, 30, 31, 32,  1, 33, 34,
+
+#define to_CP51932_E5_BC_offsets 36771
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  5,  6,  7,  8,  9,  1, 10,
+     11, 12,  1, 13, 14, 15, 16, 17,   18,  1,  1, 19,  1,  1,  1, 20,
+      1, 21,  1,  1,  1, 22, 23, 24,    1, 25,  1,  1,  1, 26,  1, 27,
+      1, 28,  1,  1, 29, 30,  1, 31,   32,  1,  1,  1, 33,  1, 34,  1,
+
+#define to_CP51932_E5_BD_offsets 36837
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    4,  1,  5,  1,  6,  1,  7,  1,
+      1,  8,  1,  9,  1,  1, 10, 11,    1, 12,  1,  1, 13, 14,  1,  1,
+      1, 15, 16,  1,  1,  1, 17, 18,    1, 19, 20, 21, 22, 23,  1,  1,
+     24, 25,  1, 26,  1,  1,  1, 27,    1, 28,  1,  1, 29,  1,  1, 30,
+
+#define to_CP51932_E5_BE_offsets 36903
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  7, 10, 11, 12,  7,  7,  7,
+     13, 14, 15, 16,  7,  7,  7, 17,   18, 19,  7,  7,  7,  7, 20,  7,
+     21, 22,  7,  7,  7,  7,  7,  7,   23, 24, 25,  7,  7, 26, 27,  7,
+      7,  7,  7, 28, 29,  7,  7, 30,    7, 31,  7,  7, 32, 33,  7,  7,
+
+#define to_CP51932_E5_BF_offsets 36969
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    8,  9,  1,  1, 10, 11, 12,  1,
+     13,  1,  1,  1, 14,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+     16, 17,  1,  1,  1, 18,  1,  1,   19,  1,  1, 20,  1, 21,  1, 22,
+
+#define to_CP51932_E6_80_offsets 37035
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      4,  1,  5,  1,  1,  6,  7,  1,    1,  8,  1,  9, 10, 11,  1,  1,
+     12, 13,  1,  1,  1, 14, 15, 16,   17, 18, 19, 20,  1,  1,  1, 21,
+      1, 22,  1,  1,  1,  1,  1,  1,    1,  1, 23,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_81_offsets 37101
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    1,  1,  6,  7,  1,  8,  1,  1,
+      9,  1, 10,  1,  1, 11,  1,  1,    1, 12, 13,  1,  1, 14,  1, 15,
+     16,  1, 17, 18, 19, 20,  1,  1,   21, 22, 23, 24, 25, 26,  1, 27,
+     28,  1,  1,  1,  1, 29,  1, 30,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_82_offsets 37167
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  1,    1,  6,  7,  8,  9, 10,  1,  1,
+      1,  1, 11,  1, 12,  1, 13, 14,    1,  1, 15, 16,  1,  1,  1, 17,
+     18,  1,  1, 19,  1,  1, 20, 21,    1, 22, 23,  1,  1,  1,  1,  1,
+      1,  1, 24, 25, 26, 27, 28,  1,   29,  1,  1,  1, 30, 31,  1,  1,
+
+#define to_CP51932_E6_83_offsets 37233
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  7,  1,  1,    8,  1,  9,  1, 10,  1, 11, 12,
+     13, 14,  1, 15,  1,  1,  1, 16,   17,  1,  1,  1,  1,  1,  1,  1,
+     18, 19, 20, 21, 22,  1, 23, 24,    1, 25, 26, 27,  1,  1,  1,  1,
+
+#define to_CP51932_E6_84_offsets 37299
+128, 191,
+      1,  2,  3,  4,  3,  3,  5,  3,    6,  7,  3,  3,  3,  8,  9, 10,
+      3, 11,  3,  3,  3, 12,  3,  3,    3,  3, 13, 14,  3,  3,  3, 15,
+     16, 17,  3,  3,  3,  3,  3, 18,   19,  3,  3,  3, 20,  3,  3,  3,
+     21,  3,  3,  3, 22,  3,  3, 23,    3,  3,  3,  3, 24, 25, 26, 27,
+
+#define to_CP51932_E6_85_offsets 37365
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  1,  6,  7,  8,  9, 10,  1,
+      1,  1,  1, 11,  1, 12,  1,  1,   13, 14, 15,  1,  1, 16,  1, 17,
+      1,  1, 18, 19,  1, 20,  1, 21,   22,  1,  1, 23,  1,  1, 24, 25,
+     26, 27,  1, 28, 29, 30, 31, 32,    1,  1,  1,  1,  1,  1, 33,  1,
+
+#define to_CP51932_E6_86_offsets 37431
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  1,  5,  1,
+      6,  7,  1,  1,  8,  1,  9,  1,   10, 11, 12,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 13,  1,  1, 14,    1, 15,  1, 16, 17,  1, 18,  1,
+      1,  1, 19,  1,  1,  1, 20,  1,    1,  1, 21,  1,  1,  1, 22,  1,
+
+#define to_CP51932_E6_87_offsets 37497
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  6,  7,  8,  9, 10,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 12,  1,  1, 13,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 14,  1, 15,  1, 16, 17,   18,  1, 19,  1, 20, 21, 22, 23,
+
+#define to_CP51932_E6_88_offsets 37563
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  5,  2,  6,  7,  8,  2,
+      9, 10, 11, 12, 13,  2, 14,  2,    2,  2, 15, 16,  2, 17, 18, 19,
+      2, 20,  2,  2,  2,  2, 21,  2,    2,  2, 22,  2,  2,  2, 23, 24,
+     25,  2, 26, 27, 28,  2,  2,  2,   29,  2,  2, 30,  2,  2,  2, 31,
+
+#define to_CP51932_E6_89_offsets 37629
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  7,  3,  8,  9,  3,
+      3,  3,  3, 10,  3, 11,  3,  3,   12,  3,  3, 13,  3,  3, 14,  3,
+     15,  3,  3, 16,  3,  3,  3,  3,   17,  3,  3,  3,  3,  3, 18,  3,
+      3, 19,  3,  3,  3,  3, 20,  3,    3, 21,  3,  3, 22,  3, 23, 24,
+
+#define to_CP51932_E6_8A_offsets 37695
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  2,    2,  6,  7,  2,  2,  2,  2,  2,
+      2,  8,  9, 10, 11, 12, 13, 14,   15,  2,  2, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2, 19,  2,    2,  2,  2, 20, 21,  2,  2,  2,
+      2, 22,  2,  2,  2, 23,  2,  2,    2, 24,  2, 25, 26, 27,  2,  2,
+
+#define to_CP51932_E6_8B_offsets 37761
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    6,  7,  8,  1,  9, 10,  1, 11,
+     12, 13, 14, 15, 16,  1,  1, 17,   18, 19,  1, 20, 21, 22,  1,  1,
+     23, 24,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 25, 26, 27, 28,
+      1, 29,  1, 30,  1, 31, 32, 33,    1,  1,  1,  1,  1,  1, 34, 35,
+
+#define to_CP51932_E6_8C_offsets 37827
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  4,    5,  6,  1,  1,  7,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1,  1,  1, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,   12,  1,  1, 13,  1,  1,  1, 14,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 15,  1,  1, 16, 17, 18,
+
+#define to_CP51932_E6_8D_offsets 37893
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  1,  5,
+      6,  1,  1,  1,  1,  7,  1,  8,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,   11, 12,  1, 13,  1,  1, 14,  1,
+      1,  1, 15,  1,  1,  1, 16, 17,    1,  1, 18, 19,  1,  1,  1,  1,
+
+#define to_CP51932_E6_8E_offsets 37959
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  2,  6,  2,  7,  8,
+      2,  2,  9,  2,  2,  2, 10,  2,   11,  2,  2, 12,  2,  2,  2, 13,
+     14, 15, 16, 17,  2, 18,  2, 19,   20, 21, 22, 23, 24,  2,  2,  2,
+      2,  2, 25,  2, 26, 27,  2,  2,    2,  2,  2, 28,  2,  2, 29,  2,
+
+#define to_CP51932_E6_8F_offsets 38025
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  6,  2,  2,  2,  2,  2,  7,
+      8,  2,  9,  2,  2,  2, 10,  2,    2,  2, 11, 12,  2,  2,  2,  2,
+      2, 13,  2, 14,  2,  2,  2,  2,    2, 15,  2,  2,  2,  2, 16,  2,
+      2,  2,  2,  2, 17, 18, 19,  2,    2,  2, 20,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E6_90_offsets 38091
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  3,  1,  4,
+      1,  1,  1,  5,  1,  1,  6,  7,    1,  1,  1,  1,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,   10,  1,  1,  1, 11, 12,  1,  1,
+      1,  1,  1,  1, 13,  1, 14,  1,    1,  1, 15,  1,  1,  1, 16,  1,
+
+#define to_CP51932_E6_91_offsets 38157
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  6,    1,  7,  1,  1,  1,  1,  1,  8,
+      1,  1,  1,  1,  1,  1,  9,  1,   10,  1, 11,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_92_offsets 38223
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  5,  1,  6,  1,  1,    1,  1,  7,  1,  1,  8,  9,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1, 12,  1, 13,  1, 14, 15,  1,
+     16,  1, 17,  1,  1,  1,  1,  1,    1, 18,  1, 19, 20,  1,  1,  1,
+
+#define to_CP51932_E6_93_offsets 38289
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  1,  1,  1,  1,  6,  7,  1,
+      1,  1,  8,  1,  9,  1,  1,  1,   10,  1, 11,  1,  1,  1,  1,  1,
+     12, 13, 14, 15,  1,  1, 16, 17,    1,  1,  1,  1, 18,  1,  1, 19,
+      1, 20, 21,  1, 22,  1, 23,  1,    1,  1, 24,  1,  1, 25, 26,  1,
+
+#define to_CP51932_E6_94_offsets 38355
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    4,  2,  2,  2,  5,  6,  2,  2,
+      2,  2,  2,  7,  8,  2,  2,  2,    2,  2,  9, 10, 11,  2,  2, 12,
+      2,  2,  2,  2, 13, 14, 15, 16,   17, 18,  2, 19,  2,  2, 20, 21,
+
+#define to_CP51932_E6_95_offsets 38421
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  1,  4,  5,  6,
+      1,  7,  1,  1,  1,  8,  9, 10,   11, 12,  1,  1,  1, 13, 14,  1,
+      1,  1, 15, 16,  1,  1, 17,  1,    1,  1,  1,  1, 18,  1,  1,  1,
+     19,  1, 20,  1, 21, 22,  1, 23,   24,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_96_offsets 38487
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  4,    5,  6,  1,  1,  7,  1,  8,  1,
+      9, 10,  1,  1,  1,  1,  1, 11,    1, 12,  1, 13, 14,  1,  1, 15,
+      1, 16,  1,  1, 17, 18,  1, 19,    1,  1,  1, 20, 21, 22,  1, 23,
+     24,  1,  1,  1,  1,  1,  1, 25,    1, 26,  1,  1, 27, 28,  1,  1,
+
+#define to_CP51932_E6_97_offsets 38553
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    1,  1,  1,  7,  8,  1,  1,  9,
+      1,  1, 10,  1,  1,  1,  1, 11,    1, 12,  1, 13,  1,  1,  1,  1,
+     14, 15, 16,  1,  1, 17, 18, 19,   20, 21,  1,  1, 22, 23,  1,  1,
+      1, 24,  1,  1,  1,  1,  1,  1,    1,  1, 25, 26,  1,  1,  1,  1,
+
+#define to_CP51932_E6_98_offsets 38619
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    2,  7,  8,  2,  9,  2, 10, 11,
+      2,  2,  2, 12, 13, 14,  2,  2,    2,  2,  2,  2, 15,  2, 16, 17,
+     18,  2,  2,  2, 19, 20,  2, 21,   22,  2,  2,  2,  2, 23, 24, 25,
+      2, 26,  2,  2, 27, 28, 29,  2,    2,  2,  2, 30, 31,  2,  2, 32,
+
+#define to_CP51932_E6_99_offsets 38685
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  6,  1,  7,  1,  1,  1,  8,
+      1,  1,  9,  1,  1,  1,  1, 10,    1, 11,  1,  1,  1, 12, 13, 14,
+      1,  1, 15,  1, 16, 17, 18, 19,   20, 21,  1,  1,  1,  1, 22, 23,
+     24,  1,  1, 25, 26,  1, 27,  1,    1,  1, 28,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_9A_offsets 38751
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  5,    6,  7,  1,  1,  1,  1,  8,  1,
+      1,  9,  1,  1,  1,  1, 10, 11,   12, 13,  1,  1,  1, 14,  1,  1,
+     15,  1, 16,  1,  1,  1, 17,  1,    1,  1,  1, 18,  1,  1, 19,  1,
+      1,  1, 20,  1, 21,  1,  1,  1,   22, 23,  1,  1, 24,  1, 25, 26,
+
+#define to_CP51932_E6_9B_offsets 38817
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  7,  8,  1,  9, 10,  1,  1,
+     11,  1,  1,  1,  1,  1, 12,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+     14,  1, 15, 16, 17, 18,  1, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+
+#define to_CP51932_E6_9C_offsets 38883
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  8,  9,
+      2,  2,  2,  2, 10, 11, 12, 13,    2,  2,  2, 14,  2, 15, 16, 17,
+      2,  2,  2,  2,  2,  2, 18, 19,   20,  2, 21, 22, 23, 24, 25,  2,
+      2, 26,  2,  2, 27,  2, 28, 29,   30,  2, 31,  2,  2, 32,  2, 33,
+
+#define to_CP51932_E6_9D_offsets 38949
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    1,  4,  1,  1,  1,  1,  5,  6,
+      7,  8,  1,  9,  1,  1, 10,  1,    1, 11,  1,  1, 12,  1, 13, 14,
+     15, 16, 17, 18, 19, 20, 21,  1,    1,  1, 22,  1,  1, 23,  1, 24,
+     25, 26, 27, 28,  1, 29,  1, 30,    1,  1,  1,  1, 31,  1, 32, 33,
+
+#define to_CP51932_E6_9E_offsets 39015
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  1,  9,    1,  1, 10,  1, 11, 12,  1,  1,
+     13, 14, 15,  1,  1,  1, 16,  1,    1, 17,  1,  1,  1,  1,  1, 18,
+      1,  1,  1, 19, 20,  1, 21, 22,   23, 24,  1, 25,  1,  1,  1,  1,
+
+#define to_CP51932_E6_9F_offsets 39081
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  3,    3,  3,  6,  3,  3,  3,  7,  8,
+      9, 10,  3, 11, 12,  3,  3,  3,   13,  3, 14,  3,  3, 15, 16,  3,
+      3,  3, 17,  3, 18,  3,  3, 19,    3, 20,  3,  3, 21,  3, 22, 23,
+      3, 24,  3, 25, 26, 27,  3,  3,    3,  3,  3, 28,  3,  3, 29, 30,
+
+#define to_CP51932_E6_A0_offsets 39147
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  7,  8,    1,  1,  1,  1,  1,  1,  9,  1,
+      1, 10, 11,  1,  1,  1,  1,  1,    1, 12, 13, 14,  1,  1,  1,  1,
+      1,  1, 15,  1, 16,  1,  1,  1,   17, 18,  1,  1, 19, 20,  1,  1,
+
+#define to_CP51932_E6_A1_offsets 39213
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  6,    8,  6,  6,  6,  6,  9, 10,  6,
+     11, 12, 13, 14, 15,  6,  6,  6,    6, 16,  6,  6, 17, 18,  6, 19,
+      6,  6,  6, 20,  6,  6,  6, 21,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6,  6, 22,  6, 23, 24,    6,  6,  6,  6,  6,  6, 25, 26,
+
+#define to_CP51932_E6_A2_offsets 39279
+128, 191,
+      1,  2,  1,  3,  1,  4,  1,  1,    1,  1,  1,  1,  1,  5,  1,  6,
+      1,  1,  1,  7,  8,  1,  1,  9,    1,  1,  1, 10,  1, 11,  1, 12,
+     13,  1, 14,  1,  1,  1, 15, 16,   17,  1,  1,  1,  1, 18,  1, 19,
+     20, 21,  1, 22,  1, 23, 24,  1,    1, 25, 26,  1, 27,  1,  1,  1,
+
+#define to_CP51932_E6_A3_offsets 39345
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    4,  5,  6,  7,  1,  8,  1,  9,
+      1,  1, 10,  1, 11, 12,  1, 13,   14,  1, 15,  1,  1,  1,  1, 16,
+     17, 18,  1, 19,  1,  1,  1, 20,    1,  1,  1,  1,  1,  1, 21, 22,
+      1,  1, 23,  1,  1,  1,  1,  1,    1, 24, 25,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_A4_offsets 39411
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    6,  3,  3,  7,  8,  9, 10, 11,
+      3,  3, 12,  3,  3,  3,  3,  3,    3, 13, 14, 15, 16,  3,  3,  3,
+      3, 17, 18, 19,  3, 20, 21,  3,   22,  3, 23,  3,  3,  3,  3,  3,
+     24,  3,  3,  3, 25,  3, 26,  3,    3, 27,  3,  3,  3, 28,  3, 29,
+
+#define to_CP51932_E6_A5_offsets 39477
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  3,  4,  5,  1,  1,    1,  6,  7,  1,  8,  9, 10,  1,
+     11, 12, 13,  1,  1,  1,  1,  1,   14,  1, 15, 16,  1, 17, 18, 19,
+      1,  1,  1, 20, 21, 22,  1, 23,   24, 25,  1,  1, 26, 27, 28,  1,
+
+#define to_CP51932_E6_A6_offsets 39543
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      1,  6,  1,  1,  7,  8,  1,  1,    9,  1,  1, 10, 11,  1,  1,  1,
+     12,  1,  1,  1,  1,  1,  1, 13,    1,  1,  1,  1,  1,  1, 14,  1,
+      1, 15, 16,  1, 17,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19, 20,
+
+#define to_CP51932_E6_A7_offsets 39609
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  4,    1,  1,  5,  6,  7,  8,  9,  1,
+     10,  1,  1, 11,  1,  1,  1,  1,   12, 13,  1,  1,  1, 14, 15,  1,
+      1,  1, 16,  1,  1,  1,  1, 17,   18,  1,  1, 19,  1, 20,  1,  1,
+      1,  1, 21,  1,  1,  1,  1,  1,    1, 22,  1, 23,  1, 24,  1, 25,
+
+#define to_CP51932_E6_A8_offsets 39675
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  1,  4,  5,  6,  1,  1,  1,
+      1,  1,  7,  8,  9,  1,  1, 10,    1, 11,  1, 12,  1,  1, 13, 14,
+      1, 15, 16, 17,  1,  1,  1,  1,    1, 18, 19, 20,  1,  1, 21,  1,
+     22,  1,  1,  1,  1, 23, 24,  1,   25, 26, 27,  1,  1, 28,  1,  1,
+
+#define to_CP51932_E6_A9_offsets 39741
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    5,  1,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  1,  1,  1,  1,  9,
+      1, 10, 11,  1,  1,  1, 12,  1,    1,  1,  1, 13,  1,  1,  1,  1,
+      1,  1, 14, 15,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1, 17, 18,
+
+#define to_CP51932_E6_AA_offsets 39807
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  4,  5,  2,
+      6,  2,  2,  2,  2,  2,  2,  7,    2,  2,  2,  2,  8,  2,  2,  2,
+      9,  2, 10, 11,  2,  2,  2,  2,    2,  2, 12,  2, 13,  2, 14,  2,
+      2,  2,  2, 15,  2,  2,  2,  2,   16,  2,  2, 17,  2,  2,  2,  2,
+
+#define to_CP51932_E6_AB_offsets 39873
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  1,  1,  1,    1,  1,  7,  8,  1,  1,  9, 10,
+      1,  1, 11,  1, 12,  1,  1,  1,   13,  1, 14,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 15, 16,  1,  1,  1,  1,
+
+#define to_CP51932_E6_AC_offsets 39939
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  7,  1,  8,
+      9, 10,  1, 11,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 13,  1,  1,  1,  1, 14,   15, 16, 17,  1,  1, 18, 19,  1,
+
+#define to_CP51932_E6_AD_offsets 40005
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  4,  1,  1,  5,  1,  6,  1,
+      7,  1,  1,  8,  9,  1,  1,  1,    1, 10,  1, 11,  1,  1,  1, 12,
+      1, 13, 14, 15, 16,  1, 17,  1,    1, 18, 19,  1,  1,  1,  1, 20,
+      1,  1,  1, 21, 22,  1,  1,  1,   23, 24,  1, 25,  1,  1,  1, 26,
+
+#define to_CP51932_E6_AE_offsets 40071
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  6,  7,  8,  2,  9,  2,  2,
+      2,  2,  2,  2,  2, 10, 11,  2,   12,  2,  2,  2,  2,  2, 13,  2,
+      2,  2,  2,  2, 14,  2,  2,  2,    2,  2, 15, 16,  2,  2,  2, 17,
+      2, 18, 19, 20, 21, 22,  2, 23,    2,  2, 24, 25, 26,  2,  2, 27,
+
+#define to_CP51932_E6_AF_offsets 40137
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  2,    2,  2,  2,  5,  2,  6,  7,  2,
+      2,  2,  8,  9, 10,  2, 11,  2,   12,  2,  2, 13,  2,  2,  2, 14,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 15, 16,  2,  2, 17,
+      2,  2,  2, 18,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E6_B0_offsets 40203
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  5,  6,  1,  1,  7,    1,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  9, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 11,  1,  1, 12,   13,  1,  1,  1,  1,  1, 14, 15,
+
+#define to_CP51932_E6_B1_offsets 40269
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  4,
+      6,  4,  4,  4,  4,  7,  4,  8,    4,  4,  9,  4, 10, 11, 12, 13,
+     14,  4, 15,  4,  4,  4,  4,  4,   16,  4, 17,  4,  4,  4,  4, 18,
+     19,  4, 20, 21,  4,  4,  4,  4,    4,  4, 22,  4,  4, 23, 24,  4,
+
+#define to_CP51932_E6_B2_offsets 40335
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    6,  1,  1,  1,  7,  8,  1,  1,
+      9,  1, 10, 11,  1,  1, 12,  1,    1, 13, 14, 15,  1,  1,  1,  1,
+      1, 16, 17,  1,  1,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19,  1,
+      1, 20,  1, 21,  1,  1,  1,  1,   22, 23, 24, 25, 26, 27, 28, 29,
+
+#define to_CP51932_E6_B3_offsets 40401
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1, 10,    1, 11, 12, 13,  1, 14,  1,  1,
+      1, 15, 16, 17,  1, 18,  1,  1,   19,  1, 20,  1,  1,  1,  1, 21,
+     22, 23,  1, 24,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_B4_offsets 40467
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  3,  4,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  1,  6,    1,  7,  1,  8,  1,  1,  9, 10,
+      1,  1,  1,  1,  1, 11,  1,  1,    1, 12, 13, 14,  1,  1,  1,  1,
+      1,  1, 15, 16,  1, 17, 18,  1,   19,  1,  1, 20,  1, 21, 22,  1,
+
+#define to_CP51932_E6_B5_offsets 40533
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  9,  1, 10,  1,    1, 11, 12,  1, 13,  1, 14, 15,
+      1,  1,  1,  1, 16,  1,  1, 17,   18, 19,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E6_B6_offsets 40599
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  1,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  7,  1,  8,  9,  1,    1, 10,  1, 11, 12,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 13,  1,  1, 14,
+      1,  1, 15,  1,  1, 16,  1,  1,   17,  1,  1,  1, 18,  1,  1,  1,
+
+#define to_CP51932_E6_B7_offsets 40665
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  5,    2,  2,  2,  6,  7,  2,  2,  8,
+      2,  9, 10,  2,  2, 11,  2,  2,   12, 13,  2,  2,  2,  2, 14,  2,
+      2, 15,  2,  2, 16,  2, 17,  2,   18,  2, 19, 20, 21,  2, 22,  2,
+      2, 23, 24, 25,  2, 26,  2, 27,   28, 29, 30, 31, 32,  2,  2,  2,
+
+#define to_CP51932_E6_B8_offsets 40731
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1,  1,    1, 10, 11, 12,  1, 13,  1, 14,
+     15, 16,  1, 17, 18, 19, 20, 21,    1, 22,  1, 23, 24, 25, 26, 27,
+      1,  1,  1,  1,  1,  1,  1,  1,   28, 29, 30,  1, 31,  1, 32,  1,
+
+#define to_CP51932_E6_B9_offsets 40797
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  3,  1,  1,  4,  5,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    7,  1,  1,  8,  9,  1,  1, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1, 12,  1,  1, 13, 14,
+      1,  1, 15,  1,  1,  1, 16,  1,    1,  1,  1,  1,  1,  1, 17, 18,
+
+#define to_CP51932_E6_BA_offsets 40863
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  5,
+      6,  2,  2,  2,  2,  2,  7,  2,    8,  2,  2,  2,  9, 10,  2, 11,
+      2,  2, 12,  2,  2, 13,  2,  2,    2,  2, 14,  2,  2,  2,  2, 15,
+      2,  2, 16,  2,  2,  2, 17, 18,    2,  2, 19,  2,  2, 20,  2, 21,
+
+#define to_CP51932_E6_BB_offsets 40929
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    1,  5,  1,  6,  7,  1,  1,  1,
+      1,  8,  1,  9, 10, 11,  1,  1,    1,  1,  1,  1,  1, 12, 13,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 14,  1,  1, 15,
+      1,  1, 16,  1, 17,  1,  1, 18,   19,  1,  1,  1,  1,  1, 20, 21,
+
+#define to_CP51932_E6_BC_offsets 40995
+128, 191,
+      1,  2,  3,  1,  1,  1,  4,  1,    1,  5,  1,  1,  1,  1,  1,  6,
+      1,  7,  1,  8,  9, 10,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     11,  1, 12, 13,  1,  1,  1,  1,    1,  1,  1, 14, 15,  1,  1,  1,
+      1, 16, 17,  1,  1,  1,  1,  1,   18,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_CP51932_E6_BD_offsets 41061
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  6,  7,  1,  1,  8,
+      1,  1,  1,  1,  9,  1, 10,  1,    1,  1,  1,  1,  1, 11, 12, 13,
+     14,  1,  1,  1, 15,  1,  1,  1,   16,  1, 17,  1, 18,  1,  1,  1,
+
+#define to_CP51932_E6_BE_offsets 41127
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  4,    7,  4,  4,  4,  4,  4,  8,  4,
+      4,  9,  4,  4,  4,  4,  4, 10,    4,  4,  4,  4,  4,  4,  4,  4,
+      4, 11,  4, 12, 13,  4,  4,  4,    4,  4, 14,  4,  4,  4,  4,  4,
+      4, 15,  4, 16,  4, 17,  4,  4,    4, 18,  4,  4,  4,  4,  4,  4,
+
+#define to_CP51932_E6_BF_offsets 41193
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  7,  8,  5,  5,    9,  5,  5, 10,  5,  5,  5, 11,
+     12, 13,  5,  5, 14,  5,  5,  5,    5,  5,  5, 15, 16,  5, 17, 18,
+      5, 19,  5, 20,  5, 21, 22,  5,    5,  5, 23,  5,  5,  5, 24,  5,
+
+#define to_CP51932_E7_80_offsets 41259
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  5,  1,  6,  1,  1,  1,  7,
+      1,  8,  1,  1,  1,  9,  1,  1,   10,  1, 11, 12,  1, 13, 14, 15,
+      1,  1,  1,  1,  1,  1, 16, 17,   18,  1,  1,  1, 19,  1,  1,  1,
+     20,  1, 21,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 22,  1,
+
+#define to_CP51932_E7_81_offsets 41325
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  7,
+      8,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1,  1, 10, 11,  1,  1,
+
+#define to_CP51932_E7_82_offsets 41391
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  4,  1,  1,  1,  5,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  9, 10, 11, 12,
+      1,  1,  1, 13,  1,  1,  1,  1,   14, 15, 16, 17,  1,  1,  1,  1,
+
+#define to_CP51932_E7_83_offsets 41457
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  3,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  6,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1, 10,  1,  1,
+
+#define to_CP51932_E7_84_offsets 41523
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  6,  7,  1,  8,  1,  1,  1,
+      1,  9,  1,  1,  1,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1,  1, 12,  1,  1,  1,
+
+#define to_CP51932_E7_85_offsets 41589
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  4,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  1,  7,  8,  1,    1,  9,  1,  1, 10,  1,  1,  1,
+      1,  1, 11,  1, 12, 13, 14, 15,    1, 16,  1,  1, 17,  1, 18,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_CP51932_E7_86_offsets 41655
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  4,  1,  1,  1,  1,  5,
+      1,  1,  1,  1,  6,  7,  1,  1,    1,  8,  1,  1,  1,  1,  1,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+      1, 12,  1,  1,  1,  1,  1,  1,    1, 13,  1,  1,  1,  1, 14,  1,
+
+#define to_CP51932_E7_87_offsets 41721
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    4,  5,  1,  1,  1,  1,  6,  1,
+      7,  1,  8,  1,  9, 10,  1, 11,    1,  1,  1,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1, 14, 15, 16,    1,  1,  1,  1, 17, 18, 19,  1,
+      1,  1,  1,  1,  1, 20,  1,  1,    1, 21,  1, 22, 23,  1, 24, 25,
+
+#define to_CP51932_E7_88_offsets 41787
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  8,  9,  1,  1,
+     10,  1, 11,  1,  1, 12, 13,  1,    1,  1, 14, 15, 16, 17, 18, 19,
+
+#define to_CP51932_E7_89_offsets 41853
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    5,  2,  2,  6,  7,  2,  2,  2,
+      2,  2,  8,  2,  2,  2,  2,  2,    9, 10,  2, 11,  2, 12,  2, 13,
+      2, 14, 15,  2,  2,  2,  2, 16,    2, 17,  2,  2,  2,  2,  2,  2,
+      2,  2, 18,  2, 19,  2,  2,  2,    2, 20,  2,  2,  2, 21, 22,  2,
+
+#define to_CP51932_E7_8A_offsets 41919
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  5,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  6,  4,  4,  4,  7,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  4,  9,  4,  4,  4,  4, 10,    4,  4,  4,  4, 11,  4,  4, 12,
+      4, 13, 14,  4,  4,  4, 15,  4,    4, 16,  4,  4,  4,  4, 17,  4,
+
+#define to_CP51932_E7_8B_offsets 41985
+128, 191,
+      1,  1,  2,  3,  4,  1,  5,  1,    1,  1,  1,  1,  1,  1,  6,  1,
+      7,  1,  8,  1,  1,  1,  1,  9,    1, 10,  1, 11,  1,  1,  1,  1,
+     12, 13, 14,  1,  1,  1,  1,  1,    1, 15,  1,  1, 16, 17,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 18,   19, 20,  1,  1, 21, 22,  1,  1,
+
+#define to_CP51932_E7_8C_offsets 42051
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  1,  1,  9, 10,  1,  1,    1, 11, 12, 13,  1,  1, 14, 15,
+      1,  1,  1,  1, 16,  1, 17, 18,    1,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_CP51932_E7_8D_offsets 42117
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  1,  1,    8,  1,  9,  1,  1,  1,  1,  1,
+     10,  1, 11,  1,  1, 12,  1, 13,   14,  1, 15, 16,  1,  1,  1,  1,
+
+#define to_CP51932_E7_8E_offsets 42183
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1, 10,  1, 11,  1,  1,
+
+#define to_CP51932_E7_8F_offsets 42249
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  6,  2,  2,  7,  8,  2,
+      2,  2,  9,  2,  2,  2, 10,  2,    2,  2,  2,  2,  2,  2, 11,  2,
+     12,  2,  2, 13,  2, 14,  2,  2,    2,  2, 15,  2,  2, 16, 17,  2,
+      2, 18,  2,  2,  2, 19,  2,  2,   20,  2,  2,  2,  2,  2, 21,  2,
+
+#define to_CP51932_E7_90_offsets 42315
+128, 191,
+      1,  1,  1,  2,  1,  3,  4,  5,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  8,  9,  1,    1, 10, 11,  1,  1,  1, 12,  1,
+      1,  1, 13, 14, 15, 16, 17,  1,    1,  1, 18,  1,  1,  1,  1, 19,
+
+#define to_CP51932_E7_91_offsets 42381
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  4,  5,  6,  7,  1,  8,  9,
+     10,  1, 11, 12, 13,  1,  1,  1,    1, 14, 15,  1,  1,  1,  1, 16,
+     17,  1,  1, 18,  1,  1, 19,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_CP51932_E7_92_offsets 42447
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  3,  1,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  5,  6,
+      1,  1,  7,  1,  1,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10,  1,  1,
+
+#define to_CP51932_E7_93_offsets 42513
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  3,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      6,  1,  7,  8,  1,  1,  9, 10,    1, 11,  1,  1,  1,  1, 12,  1,
+     13, 14, 15,  1,  1,  1, 16, 17,   18,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_94_offsets 42579
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  1,    1,  1,  1,  1,  6,  7,  8,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,   12,  1, 13,  1, 14,  1, 15, 16,
+      1,  1,  1, 17,  1, 18, 19,  1,   20,  1,  1, 21, 22,  1,  1, 23,
+     24, 25, 26, 27,  1,  1,  1, 28,   29,  1, 30, 31, 32,  1,  1,  1,
+
+#define to_CP51932_E7_95_offsets 42645
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  4,  5,  6,  7,  8,  1,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,    1, 12, 13, 14, 15, 16,  1,  1,
+     17,  1, 18,  1, 19, 20, 21, 22,    1, 23, 24, 25,  1, 26,  1, 27,
+     28,  1,  1, 29, 30,  1, 31, 32,   33,  1,  1,  1,  1,  1,  1, 34,
+
+#define to_CP51932_E7_96_offsets 42711
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    1,  5,  6,  7,  1,  1,  8,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,    1,  1, 12,  1,  1, 13,  1,  1,
+      1,  1,  1, 14,  1, 15,  1,  1,    1,  1,  1, 16,  1,  1,  1,  1,
+      1, 17, 18, 19,  1, 20,  1,  1,   21, 22,  1,  1, 23, 24, 25,  1,
+
+#define to_CP51932_E7_97_offsets 42777
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  5,    1,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  9, 10,  1,  1,   11, 12,  1, 13,  1,  1, 14,  1,
+      1,  1, 15, 16,  1,  1,  1,  1,    1, 17,  1,  1,  1,  1,  1,  1,
+     18,  1, 19, 20, 21,  1,  1,  1,    1,  1, 22,  1, 23,  1, 24, 25,
+
+#define to_CP51932_E7_98_offsets 42843
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  4,  1,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      7,  8,  9,  1, 10,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+
+#define to_CP51932_E7_99_offsets 42909
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    5,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  1,    9,  1,  1,  1, 10,  1,  1,  1,
+      1, 11, 12,  1,  1,  1,  1, 13,   14, 15, 16,  1, 17,  1,  1,  1,
+     18,  1, 19,  1,  1,  1, 20,  1,   21,  1, 22, 23, 24, 25, 26,  1,
+
+#define to_CP51932_E7_9A_offsets 42975
+128, 191,
+      1,  2,  3,  4,  5,  2,  6,  7,    8,  2,  2,  9,  2,  2, 10,  2,
+     11,  2,  2, 12,  2,  2, 13,  2,    2, 14, 15, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2, 19,  2,    2,  2,  2,  2,  2,  2, 20,  2,
+     21,  2,  2,  2, 22,  2,  2, 23,   24, 25, 26,  2,  2,  2,  2, 27,
+
+#define to_CP51932_E7_9B_offsets 43041
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    5,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  1,  1,  9, 10,    1,  1,  1, 11, 12,  1, 13, 14,
+      1, 15,  1, 16, 17, 18,  1, 19,    1,  1, 20,  1,  1,  1, 21,  1,
+      1,  1, 22,  1, 23,  1,  1,  1,   24,  1,  1, 25,  1,  1, 26,  1,
+
+#define to_CP51932_E7_9C_offsets 43107
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1, 10, 11,
+     12,  1,  1,  1, 13, 14, 15,  1,    1, 16,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 17,   18,  1, 19,  1, 20,  1,  1,  1,
+
+#define to_CP51932_E7_9D_offsets 43173
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  5,  6,  2,  2,  2,  2,
+      2,  7,  2,  8,  2,  9, 10,  2,   11,  2,  2, 12,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2, 13,  2,  2,  2,  2, 14, 15,
+
+#define to_CP51932_E7_9E_offsets 43239
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  1,  3,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  5,  1,
+      6,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+     10,  1,  1, 11,  1,  1, 12,  1,    1, 13,  1, 14, 15, 16,  1, 17,
+
+#define to_CP51932_E7_9F_offsets 43305
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  4,    1,  1,  5,  6,  7,  1,  1,  1,
+      1,  1,  8,  9,  1, 10,  1, 11,    1, 12,  1,  1,  1, 13, 14, 15,
+      1,  1,  1, 16,  1,  1,  1,  1,    1,  1,  1,  1, 17,  1,  1,  1,
+
+#define to_CP51932_E7_A0_offsets 43371
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  1,
+      1,  1,  4,  1,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  1,  9, 10, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1, 15,
+
+#define to_CP51932_E7_A1_offsets 43437
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  4,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  6,  7,  1,  1,  8,
+      1,  1,  9,  1, 10,  1,  1,  1,    1,  1, 11,  1, 12,  1,  1,  1,
+
+#define to_CP51932_E7_A2_offsets 43503
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  4,    1,  1,  1,  1,  5,  6,  7,  1,
+      1,  8,  1,  9,  1, 10,  1, 11,    1,  1, 12,  1,  1,  1,  1,  1,
+      1,  1,  1, 13,  1,  1,  1, 14,    1, 15, 16,  1,  1,  1,  1, 17,
+      1,  1,  1,  1,  1, 18,  1,  1,    1,  1, 19,  1, 20,  1, 21,  1,
+
+#define to_CP51932_E7_A3_offsets 43569
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  1,  5,  6,  1,  1,  1,  1,
+      7,  8,  1,  1,  9,  1,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,   12,  1,  1,  1, 13,  1,  1, 14,
+      1,  1,  1,  1, 15,  1,  1,  1,    1,  1,  1,  1,  1, 16,  1,  1,
+
+#define to_CP51932_E7_A4_offsets 43635
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  6,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  1,    1,  1,  9, 10, 11,  1,  1,  1,
+     12,  1,  1,  1,  1,  1,  1,  1,    1,  1, 13,  1, 14,  1, 15,  1,
+
+#define to_CP51932_E7_A5_offsets 43701
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  3,  3,  3,  3,  3,
+      7,  3,  3,  8,  3,  9, 10, 11,    3,  3, 12,  3,  3, 13, 14, 15,
+     16,  3, 17,  3,  3, 18,  3,  3,   19,  3,  3,  3,  3, 20,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 21,    3,  3, 22,  3,  3,  3,  3, 23,
+
+#define to_CP51932_E7_A6_offsets 43767
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    3,  3,  6,  3,  3,  7,  8,  9,
+      3,  3,  3,  3, 10,  3,  3,  3,    3,  3,  3, 11,  3, 12,  3,  3,
+      3,  3,  3,  3,  3,  3, 13, 14,    3,  3, 15,  3,  3,  3, 16,  3,
+     17,  3,  3, 18,  3,  3,  3,  3,    3, 19, 20,  3,  3, 21, 22, 23,
+
+#define to_CP51932_E7_A7_offsets 43833
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  4,  3,  5,  3,  3,  3,  3,
+      3,  6,  7,  3,  3,  8,  3,  3,    9,  3,  3,  3,  3,  3,  3, 10,
+      3, 11,  3, 12, 13,  3, 14, 15,    3, 16,  3,  3, 17,  3,  3,  3,
+     18,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3, 19,  3,  3,  3,  3,
+
+#define to_CP51932_E7_A8_offsets 43899
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  2,  2,  4,  2,  5,  6,  2,
+      2,  2,  2,  2,  7,  2,  2,  8,    9, 10, 11,  2, 12,  2,  2, 13,
+     14,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2, 15,  2,
+      2, 16, 17,  2,  2,  2,  2, 18,    2,  2,  2, 19, 20, 21, 22, 23,
+
+#define to_CP51932_E7_A9_offsets 43965
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  2,    2,  6,  2,  2,  2,  7,  8,  9,
+     10,  2,  2,  2,  2,  2,  2, 11,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 12, 13, 14,  2,  2,  2,  2,    2, 15,  2, 16,  2,  2,  2,  2,
+     17,  2,  2,  2, 18,  2, 19,  2,    2, 20, 21,  2,  2, 22,  2, 23,
+
+#define to_CP51932_E7_AA_offsets 44031
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  7,  1,  8,  9, 10,   11,  1,  1,  1,  1,  1,  1, 12,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 13, 14,  1,  1,  1, 15, 16,
+     17,  1,  1,  1,  1,  1, 18,  1,    1,  1, 19,  1,  1,  1,  1, 20,
+
+#define to_CP51932_E7_AB_offsets 44097
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  1,  7,  8,  1,  9,  1, 10,
+      1, 11, 12, 13,  1, 14,  1,  1,    1, 15, 16,  1, 17, 18,  1, 19,
+     20, 21, 22, 23,  1, 24, 25, 26,    1,  1, 27, 28,  1, 29,  1, 30,
+     31,  1,  1,  1,  1,  1, 32,  1,   33, 34, 35,  1,  1,  1,  1, 36,
+
+#define to_CP51932_E7_AC_offsets 44163
+128, 191,
+      1,  1,  2,  1,  3,  1,  4,  1,    5,  1,  6,  7,  1,  1,  1,  8,
+      1,  9,  1,  1,  1,  1,  1,  1,   10, 11,  1, 12,  1,  1, 13,  1,
+     14,  1,  1,  1,  1, 15, 16,  1,   17,  1,  1,  1, 18,  1,  1,  1,
+      1,  1,  1, 19,  1, 20, 21,  1,    1, 22,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_AD_offsets 44229
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  5,  1,  6,  7,  8,  1,  9,
+     10, 11, 12,  1, 13,  1, 14,  1,    1,  1,  1,  1,  1, 15,  1,  1,
+      1,  1,  1,  1,  1, 16,  1, 17,    1,  1,  1,  1, 18,  1, 19,  1,
+     20, 21,  1,  1, 22, 23,  1,  1,    1,  1, 24,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_AE_offsets 44295
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  4,  1,  5,  1,  6,
+      1,  1,  7,  1,  8,  9,  1, 10,   11, 12, 13,  1, 14, 15, 16, 17,
+      1, 18,  1,  1,  1,  1,  1,  1,    1,  1, 19,  1,  1, 20,  1,  1,
+      1, 21,  1,  1, 22,  1,  1,  1,   23,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_AF_offsets 44361
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  6,    3,  7,  3,  8,  9,  3,  3, 10,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 11,  3,  3,
+     12,  3,  3,  3, 13, 14, 15,  3,    3, 16,  3,  3,  3, 17,  3,  3,
+      3,  3,  3, 18,  3,  3, 19, 20,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_CP51932_E7_B0_offsets 44427
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  6,  7,  8,  2,  2,  9,    2,  2,  2,  2,  2,  2,  2, 10,
+      2, 11,  2, 12,  2,  2,  2, 13,    2,  2, 14, 15,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 16,   17,  2,  2,  2,  2, 18, 19, 20,
+
+#define to_CP51932_E7_B1_offsets 44493
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  2,  2,  2,  8,  2,  9,  2,   10,  2,  2,  2,  2,  2,  2, 11,
+     12,  2,  2,  2, 13, 14,  2,  2,    2,  2,  2,  2, 15,  2,  2,  2,
+      2,  2,  2, 16,  2, 17,  2,  2,    2,  2,  2,  2,  2,  2, 18,  2,
+
+#define to_CP51932_E7_B2_offsets 44559
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  5,  1,  6,  1,  7,  1,  1,
+      8,  1,  9,  1,  1, 10,  1, 11,   12,  1,  1, 13,  1,  1,  1, 14,
+      1, 15, 16,  1, 17, 18,  1, 19,   20,  1,  1, 21,  1, 22, 23,  1,
+      1, 24, 25, 26,  1,  1,  1,  1,    1, 27,  1,  1,  1, 28, 29,  1,
+
+#define to_CP51932_E7_B3_offsets 44625
+128, 191,
+      1,  2,  3,  2,  2,  4,  2,  2,    2,  2,  5,  2,  2,  2,  6,  2,
+      2,  2,  7,  2,  2,  2,  8,  2,    9,  2,  2,  2, 10,  2, 11, 12,
+     13,  2, 14,  2,  2,  2,  2, 15,    2,  2,  2,  2,  2,  2,  2, 16,
+      2,  2, 17,  2, 18,  2, 19,  2,   20,  2, 21, 22,  2,  2, 23,  2,
+
+#define to_CP51932_E7_B4_offsets 44691
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  2,    2,  2,  7,  8,  2,  9,  2,  2,
+     10,  2,  2,  2, 11, 12,  2, 13,   14, 15, 16, 17, 18,  2,  2,  2,
+     19, 20, 21,  2,  2,  2,  2,  2,    2,  2,  2, 22, 23,  2, 24, 25,
+     26,  2, 27, 28,  2, 29,  2,  2,    2, 30, 31,  2,  2,  2,  2, 32,
+
+#define to_CP51932_E7_B5_offsets 44757
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    7,  1,  1,  8,  9,  1, 10, 11,
+     12,  1,  1,  1,  1,  1, 13,  1,    1,  1,  1, 14, 15,  1, 16,  1,
+      1, 17, 18, 19,  1,  1, 20,  1,   21,  1,  1,  1,  1,  1, 22,  1,
+      1, 23, 24, 25,  1, 26, 27,  1,    1, 28,  1,  1,  1, 29,  1,  1,
+
+#define to_CP51932_E7_B6_offsets 44823
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  3,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  5,  6,  7,  8,  1,  1,  9,
+     10,  1, 11, 12,  1,  1,  1,  1,    1,  1,  1, 13, 14, 15, 16, 17,
+     18, 19, 20,  1, 21, 22,  1, 23,   24,  1, 25, 26,  1, 27, 28, 29,
+
+#define to_CP51932_E7_B7_offsets 44889
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  4,  1,  1,  1,  5,
+      1,  6,  7,  1,  1,  8,  9,  1,   10,  1, 11,  1, 12, 13, 14,  1,
+     15, 16,  1,  1, 17,  1,  1,  1,   18, 19,  1,  1, 20,  1,  1, 21,
+      1,  1, 22,  1, 23,  1,  1,  1,    1,  1,  1, 24,  1,  1,  1,  1,
+
+#define to_CP51932_E7_B8_offsets 44955
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1, 10, 11,
+      1, 12, 13, 14,  1,  1, 15,  1,    1,  1,  1, 16,  1,  1, 17,  1,
+      1, 18, 19,  1,  1, 20,  1, 21,    1, 22, 23, 24,  1, 25, 26,  1,
+
+#define to_CP51932_E7_B9_offsets 45021
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  1,    1,  1,  5,  6,  1,  7,  1,  1,
+      1,  1,  8,  1,  9, 10, 11,  1,    1, 12, 13,  1,  1, 14, 15,  1,
+      1,  1,  1,  1,  1,  1, 16, 17,    1, 18, 19,  1,  1, 20,  1,  1,
+     21,  1,  1,  1,  1,  1,  1,  1,    1, 22,  1, 23, 24, 25,  1, 26,
+
+#define to_CP51932_E7_BA_offsets 45087
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  6,  1,  7,  1,  8,  9,
+     10,  1, 11, 12, 13,  1, 14,  1,    1,  1,  1, 15, 16,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_BC_offsets 45153
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  1,  4,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_BD_offsets 45219
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  4,  5,  6,  1,
+      7,  8,  1,  1,  9, 10,  1,  1,   11,  1,  1,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1, 14,   15, 16, 17, 18,  1,  1, 19,  1,
+     20,  1, 21,  1,  1, 22,  1, 23,   24, 25,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E7_BE_offsets 45285
+128, 191,
+      1,  1,  2,  3,  1,  4,  5,  6,    7,  1,  8,  1,  9,  1, 10,  1,
+      1,  1,  1,  1, 11,  1,  1,  1,    1,  1, 12,  1,  1, 13, 14,  1,
+      1, 15,  1, 16, 17,  1,  1,  1,   18, 19,  1,  1,  1,  1, 20, 21,
+      1,  1, 22,  1,  1,  1, 23,  1,   24, 25,  1,  1,  1, 26,  1,  1,
+
+#define to_CP51932_E7_BF_offsets 45351
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  1,  5,  1,  6,  1,  1,  1,
+      1,  1,  7,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1,  1,  1,  1, 12,  1,    1, 13,  1, 14,  1,  1,  1,  1,
+     15,  1,  1, 16,  1,  1,  1,  1,    1, 17,  1, 18, 19,  1,  1,  1,
+
+#define to_CP51932_E8_80_offsets 45417
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    3,  3,  3,  8,  9,  3,  3,  3,
+     10,  3, 11,  3,  3, 12,  3, 13,   14, 15,  3,  3, 16,  3,  3,  3,
+      3, 17,  3,  3,  3,  3,  3,  3,   18,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3, 19,  3,  3, 20,  3,    3,  3,  3, 21,  3, 22,  3, 23,
+
+#define to_CP51932_E8_81_offsets 45483
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  1,  4,  1,  1,  1,  5,  1,    6,  1,  7,  1,  1,  1,  8,  9,
+      1, 10, 11,  1,  1,  1,  1,  1,   12,  1,  1,  1,  1,  1,  1, 13,
+     14,  1, 15, 16, 17,  1, 18, 19,    1, 20,  1,  1,  1, 21, 22, 23,
+
+#define to_CP51932_E8_82_offsets 45549
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  9,  1,  1, 10,  1,   11,  1, 12, 13,  1, 14,  1,  1,
+      1, 15, 16,  1,  1, 17,  1,  1,    1, 18, 19,  1, 20, 21,  1, 22,
+      1, 23, 24,  1, 25,  1,  1,  1,    1,  1, 26,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_83_offsets 45615
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    1,  1,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  8,  9, 10,  1, 11, 12,  1,
+      1, 13,  1,  1, 14, 15,  1,  1,    1,  1,  1,  1,  1,  1,  1, 16,
+      1, 17,  1,  1, 18,  1,  1,  1,   19,  1,  1,  1, 20, 21,  1,  1,
+
+#define to_CP51932_E8_84_offsets 45681
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    6,  7,  8,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  9, 10,  1,  1,  1,  1,
+      1,  1,  1, 11,  1,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1, 13,
+      1, 14,  1, 15,  1,  1,  1,  1,    1, 16,  1,  1,  1,  1, 17,  1,
+
+#define to_CP51932_E8_85_offsets 45747
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  1,  1,  4,  1,
+      5,  6,  1,  7,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1, 10,
+      1,  1,  1,  1,  1, 11, 12,  1,    1,  1,  1, 13,  1,  1, 14,  1,
+     15, 16,  1,  1, 17,  1,  1,  1,   18, 19, 20,  1,  1,  1,  1, 21,
+
+#define to_CP51932_E8_86_offsets 45813
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  2,  2,  2,  7,
+      2,  2,  2,  8,  2,  9,  2,  2,    2,  2, 10,  2, 11, 12,  2,  2,
+     13,  2,  2, 14, 15,  2,  2,  2,   16, 17,  2,  2,  2,  2,  2,  2,
+     18,  2,  2, 19,  2, 20,  2,  2,   21,  2, 22,  2,  2, 23, 24, 25,
+
+#define to_CP51932_E8_87_offsets 45879
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    5,  6,  2,  2,  2,  7,  2,  2,
+      2,  8,  2,  9,  2,  2,  2,  2,   10, 11, 12,  2,  2,  2,  2, 13,
+     14,  2,  2, 15,  2, 16,  2, 17,   18,  2, 19,  2,  2, 20,  2,  2,
+      2,  2,  2, 21, 22,  2,  2,  2,    2,  2, 23, 24, 25,  2, 26,  2,
+
+#define to_CP51932_E8_88_offsets 45945
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    6,  7,  8,  1,  9, 10, 11,  1,
+     12,  1, 13,  1,  1,  1, 14, 15,   16,  1,  1, 17, 18,  1, 19, 20,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 21, 22, 23, 24,  1, 25,  1,
+      1,  1,  1, 26,  1, 27, 28, 29,   30, 31,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_89_offsets 46011
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    4,  5,  6,  2,  2,  7,  2,  8,
+      2,  2,  9,  2, 10,  2, 11,  2,   12,  2, 13, 14,  2,  2, 15, 16,
+      2, 17, 18,  2,  2,  2, 19, 20,   21,  2,  2,  2,  2,  2, 22,  2,
+
+#define to_CP51932_E8_8A_offsets 46077
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  3,  1,  1,
+      1,  1,  4,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  6,  1,  7,
+      1,  1,  1,  1,  1,  8,  9,  1,    1,  1,  1, 10, 11, 12,  1, 13,
+      1, 14,  1, 15,  1,  1,  1,  1,   16, 17,  1, 18,  1, 19,  1,  1,
+
+#define to_CP51932_E8_8B_offsets 46143
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  4,  5,  6,  1,  1,  7,    1,  8,  1,  9, 10,  1, 11, 12,
+      1, 13,  1, 14,  1, 15, 16, 17,    1,  1,  1, 18,  1,  1,  1,  1,
+      1, 19,  1, 20, 21,  1,  1,  1,    1, 22, 23, 24,  1,  1,  1,  1,
+
+#define to_CP51932_E8_8C_offsets 46209
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    1,  8,  1,  1,  1,  1,  9,  1,
+      1,  1,  1,  1,  1,  1, 10, 11,   12,  1,  1,  1, 13,  1,  1,  1,
+      1,  1,  1, 14,  1,  1,  1,  1,   15,  1,  1, 16,  1,  1,  1, 17,
+      1, 18, 19,  1, 20, 21, 22,  1,   23, 24,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_8D_offsets 46275
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  4,  5,  2,  2,  2,  2,  6,
+      7,  2,  8,  2,  2,  2,  2,  2,    9,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 10,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 11,  2, 12,  2, 13,    2,  2,  2, 14, 15,  2,  2, 16,
+
+#define to_CP51932_E8_8E_offsets 46341
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  5,  1,  1,  1,  6,  1,
+      1,  1,  1,  7,  1,  1,  8,  1,    1,  1,  9,  1,  1,  1, 10, 11,
+     12,  1, 13,  1,  1,  1,  1,  1,   14,  1, 15, 16,  1,  1,  1,  1,
+      1, 17,  1,  1,  1, 18,  1,  1,    1,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_CP51932_E8_8F_offsets 46407
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  1,  5,  1,  6,  1,  7,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,   10,  1,  1,  1, 11,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1, 16,
+     17, 18, 19,  1, 20,  1, 21, 22,    1,  1,  1, 23,  1, 24,  1,  1,
+
+#define to_CP51932_E8_90_offsets 46473
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  4,    1,  1,  1,  5,  6,  7,  8,  1,
+      1,  1,  1,  9,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10,  1, 11,  1,  1,  1,  1,  1,    1, 12, 13,  1, 14,  1,  1,  1,
+      1, 15,  1,  1,  1, 16,  1,  1,   17,  1,  1,  1, 18, 19,  1,  1,
+
+#define to_CP51932_E8_91_offsets 46539
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  4,  1,  1,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  7,  1,  1,  1,  1,
+      1,  8,  9, 10,  1,  1, 11,  1,    1, 12,  1, 13, 14, 15, 16, 17,
+      1, 18,  1,  1,  1, 19,  1, 20,    1, 21, 22,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_92_offsets 46605
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  4,  1,  1,  1,  1,
+      5,  1,  1,  1,  6,  1,  1,  1,    1,  7,  1,  1,  8,  1,  1,  9,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 11,  1,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,   14, 15,  1, 16, 17,  1,  1, 18,
+
+#define to_CP51932_E8_93_offsets 46671
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    1,  5,  6,  7,  1,  8,  1,  1,
+      9, 10,  1,  1,  1,  1, 11,  1,    1, 12, 13,  1, 14,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 15,  1, 16,  1,
+      1,  1,  1,  1, 17,  1,  1,  1,    1,  1,  1,  1, 18,  1,  1, 19,
+
+#define to_CP51932_E8_94_offsets 46737
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  2,  5,  6,  7,  2,  8,    9,  2, 10,  2,  2,  2,  2, 11,
+      2, 12,  2,  2,  2,  2, 13,  2,    2,  2,  2,  2, 14, 15,  2,  2,
+      2,  2,  2,  2,  2, 16,  2,  2,    2,  2,  2,  2,  2, 17,  2,  2,
+
+#define to_CP51932_E8_95_offsets 46803
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  3,    5,  6,  7,  8,  3,  3,  9,  3,
+      3,  3,  3, 10,  3, 11,  3, 12,   13, 14, 15,  3,  3,  3,  3,  3,
+      3,  3,  3, 16,  3,  3,  3,  3,   17, 18, 19, 20,  3, 21,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 22,    3,  3,  3,  3,  3,  3, 23,  3,
+
+#define to_CP51932_E8_96_offsets 46869
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  4,    5,  2,  6,  2,  2,  2,  2,  2,
+      7,  8,  2,  2,  9,  2,  2, 10,    2, 11,  2, 12, 13,  2,  2,  2,
+      2,  2,  2,  2, 14,  2, 15,  2,   16, 17, 18, 19, 20,  2, 21, 22,
+     23,  2,  2,  2,  2,  2,  2,  2,    2, 24, 25,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E8_97_offsets 46935
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  1,  4,  1,  5,
+      6,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1, 12, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 14,    1, 15, 16, 17,  1,  1, 18,  1,
+
+#define to_CP51932_E8_98_offsets 47001
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    1,  1,  5,  6,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  8,  9,    1,  1, 10,  1,  1,  1,  1,  1,
+      1,  1, 11,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 12,  1, 13,
+     14,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 15,
+
+#define to_CP51932_E8_99_offsets 47067
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  3,  1,
+      4,  1,  1,  1,  5,  6,  1,  1,    1,  1,  7,  1,  8,  1,  9, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1, 12,  1,  1,  1,  1,
+      1, 13,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1,  1,
+
+#define to_CP51932_E8_9A_offsets 47133
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  4,  1,  1,  1,
+      1,  1,  1,  5,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  8,  1,  1,  1,    1,  9, 10, 11,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_9B_offsets 47199
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  5,  1,  6,  1,  7,  8,  1,
+      1,  1,  1,  1,  9,  1,  1,  1,    1, 10,  1, 11,  1,  1, 12, 13,
+      1,  1,  1,  1, 14,  1,  1,  1,    1, 15,  1,  1, 16, 17, 18, 19,
+      1,  1,  1,  1,  1,  1,  1,  1,   20, 21,  1, 22,  1,  1, 23,  1,
+
+#define to_CP51932_E8_9C_offsets 47265
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  2,    6,  7,  8,  2,  2,  9,  2,  2,
+      2, 10, 11,  2,  2,  2,  2,  2,   12,  2, 13,  2, 14,  2,  2,  2,
+      2,  2,  2,  2,  2, 15,  2,  2,    2, 16,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2,  2,  2, 19,  2,  2,  2, 20,
+
+#define to_CP51932_E8_9D_offsets 47331
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  3,  4,  1,  5,  1,
+      1,  1,  1,  6,  1,  7,  1,  8,    1,  9,  1,  1,  1,  1,  1, 10,
+     11,  1,  1, 12,  1,  1, 13,  1,   14,  1, 15,  1,  1,  1, 16,  1,
+      1,  1,  1,  1, 17,  1, 18,  1,   19,  1,  1,  1,  1,  1,  1, 20,
+
+#define to_CP51932_E8_9E_offsets 47397
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  7,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  9, 10,  1, 11,  1,  1,
+
+#define to_CP51932_E8_9F_offsets 47463
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    2,  2,  2,  6,  2,  2,  2,  2,
+      7,  2,  8,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      9,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 10,
+      2,  2, 11,  2,  2,  2, 12, 13,    2, 14,  2, 15,  2,  2, 16,  2,
+
+#define to_CP51932_E8_A0_offsets 47529
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  4,  5,  6,
+      1,  7,  1,  1,  1,  8,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 10, 11, 12,  1,  1,  1, 13,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 14,  1,  1,  1,  1, 15,  1,    1, 16,  1, 17,  1,  1,  1,  1,
+
+#define to_CP51932_E8_A1_offsets 47595
+128, 191,
+      1,  2,  3,  2,  4,  2,  5,  2,    2,  2,  2,  2,  6,  7,  2,  2,
+      2,  2,  8,  9,  2,  2,  2, 10,    2, 11,  2, 12,  2, 13, 14,  2,
+      2, 15, 16, 17,  2,  2,  2,  2,   18,  2,  2, 19,  2,  2,  2,  2,
+     20,  2, 21,  2,  2, 22,  2, 23,    2,  2,  2,  2,  2, 24, 25, 26,
+
+#define to_CP51932_E8_A2_offsets 47661
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    4,  1,  1,  5,  1,  6,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  9,    1, 10,  1,  1,  1,  1, 11,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,    1,  1,  1, 14,  1,  1, 15,  1,
+     16, 17,  1,  1, 18, 19,  1, 20,    1,  1,  1,  1,  1,  1,  1, 21,
+
+#define to_CP51932_E8_A3_offsets 47727
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  8,  9,  1,  1,   10, 11,  1,  1, 12, 13,  1, 14,
+      1, 15,  1,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 17, 18, 19, 20,  1,  1,   21, 22,  1,  1, 23, 24, 25,  1,
+
+#define to_CP51932_E8_A4_offsets 47793
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1,  1, 10, 11, 12,  1,
+      1,  1,  1,  1,  1, 13,  1,  1,    1,  1, 14, 15,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 16,  1,   17,  1,  1, 18,  1,  1,  1,  1,
+
+#define to_CP51932_E8_A5_offsets 47859
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  1,  1,  1,  1,  1,  8,  9,
+     10,  1,  1,  1, 11,  1, 12,  1,    1,  1, 13,  1,  1, 14,  1, 15,
+      1,  1, 16,  1, 17,  1,  1, 18,    1,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_CP51932_E8_A6_offsets 47925
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  5,    6,  1,  7,  8,  1,  1,  1,  9,
+      1,  1,  1, 10,  1,  1, 11, 12,   13,  1, 14,  1,  1,  1,  1,  1,
+      1, 15,  1,  1,  1,  1, 16, 17,    1, 18, 19,  1, 20,  1,  1, 21,
+      1,  1, 22, 23,  1,  1,  1,  1,    1,  1, 24,  1,  1, 25,  1, 26,
+
+#define to_CP51932_E8_A7_offsets 47991
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  3,  2,  2,  2,  2,  2,    2,  2,  4,  2,  5,  6,  2,  2,
+      2,  2,  2,  7,  2,  2,  8,  9,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 10,  2,  2,  2,   11,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E8_A8_offsets 48057
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  7,  2,  8,  2,
+      9,  2, 10, 11,  2,  2, 12, 13,   14,  2,  2, 15,  2, 16,  2, 17,
+      2,  2,  2, 18,  2, 19,  2,  2,    2,  2, 20,  2,  2, 21,  2,  2,
+      2, 22,  2, 23, 24,  2, 25, 26,    2,  2, 27, 28, 29,  2,  2,  2,
+
+#define to_CP51932_E8_A9_offsets 48123
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  6,  7,  1,  8,  9,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+     12,  1, 13, 14,  1,  1, 15,  1,    1, 16,  1, 17, 18, 19, 20,  1,
+     21, 22, 23, 24,  1,  1,  1,  1,    1, 25,  1,  1, 26,  1,  1,  1,
+
+#define to_CP51932_E8_AA_offsets 48189
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  5,    1,  6,  1,  1,  7,  8,  1,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,   12,  1, 13,  1,  1,  1, 14,  1,
+     15, 16,  1, 17, 18, 19, 20, 21,   22,  1,  1,  1, 23, 24,  1,  1,
+     25,  1, 26,  1,  1,  1,  1,  1,    1, 27,  1,  1, 28,  1, 29, 30,
+
+#define to_CP51932_E8_AB_offsets 48255
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  9,  1,  1,  1, 10,  1,    1,  1, 11, 12, 13,  1, 14, 15,
+     16, 17, 18,  1, 19,  1, 20, 21,    1,  1,  1, 22,  1, 23, 24,  1,
+      1, 25,  1, 26,  1,  1, 27, 28,   29,  1, 30,  1,  1,  1, 31,  1,
+
+#define to_CP51932_E8_AC_offsets 48321
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    4,  4,  4,  4,  7,  4,  8,  4,
+      9,  4,  4,  4, 10,  4, 11, 12,    4, 13, 14, 15,  4, 16,  4,  4,
+     17, 18,  4,  4,  4,  4, 19,  4,   20,  4,  4, 21, 22,  4,  4,  4,
+      4,  4,  4, 23,  4,  4,  4,  4,    4, 24,  4,  4,  4,  4, 25,  4,
+
+#define to_CP51932_E8_AD_offsets 48387
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  4,  1,  5,  6,
+      1,  1,  1,  7,  1,  1,  8,  1,    9,  1, 10, 11, 12,  1,  1, 13,
+      1,  1,  1,  1,  1,  1, 14,  1,    1,  1,  1, 15, 16,  1,  1, 17,
+     18, 19, 20,  1, 21,  1,  1, 22,    1,  1,  1,  1,  1, 23,  1, 24,
+
+#define to_CP51932_E8_AE_offsets 48453
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  2,  4,  2,  5,  2,  6,  2,
+      7,  2,  8,  9,  2,  2, 10,  2,    2, 11, 12,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E8_B0_offsets 48519
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  1,  1,  1,  1,  4,
+
+#define to_CP51932_E8_B1_offsets 48585
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  5,  1,  6,  1,  7,  1,
+      8,  1,  1,  1,  1,  9,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+      1, 11, 12,  1,  1,  1,  1,  1,    1,  1, 13, 14, 15,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16, 17, 18,  1, 19,  1,  1,  1,
+
+#define to_CP51932_E8_B2_offsets 48651
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  6,  7,  8,  1,
+      1,  1,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1, 11, 12,  1,
+     13, 14, 15,  1,  1,  1,  1, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25,  1, 26, 27, 28,  1, 29, 30,   31,  1,  1, 32, 33, 34,  1, 35,
+
+#define to_CP51932_E8_B3_offsets 48717
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  6,  9,  6,  6, 10, 11,  6,
+      6, 12,  6, 13,  6,  6,  6,  6,    6,  6, 14, 15, 16,  6, 17,  6,
+     18,  6, 19, 20, 21,  6, 22,  6,    6,  6, 23,  6,  6, 24,  6,  6,
+     25,  6,  6,  6, 26,  6,  6,  6,    6,  6, 27, 28, 29, 30,  6,  6,
+
+#define to_CP51932_E8_B4_offsets 48783
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  1,  6,  7,  1,  8,  1,  9,
+     10,  1, 11, 12, 13,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_B5_offsets 48849
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  5,  1,  6,  1,  1,
+      7,  8,  1,  9, 10,  1, 11, 12,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_B6_offsets 48915
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  9,  1,  1,  1, 10,  1,
+
+#define to_CP51932_E8_B7_offsets 48981
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  4,  1,  1,  5,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  7,  8,  1,  9,  1, 10,
+      1, 11,  1, 12,  1,  1,  1,  1,   13,  1, 14, 15,  1,  1,  1, 16,
+      1,  1,  1, 17,  1, 18,  1,  1,    1,  1,  1,  1, 19,  1,  1, 20,
+
+#define to_CP51932_E8_B8_offsets 49047
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  1,  1,  1,  1,  5,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  7,  8,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+     11,  1,  1,  1, 12, 13,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_B9_offsets 49113
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  6,  7,  1,  8,  1,  1,  1,
+      9,  1,  1,  1,  1, 10,  1,  1,    1, 11,  1,  1,  1,  1,  1, 12,
+     13,  1,  1, 14, 15,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 16,  1, 17,  1, 18,  1,    1,  1,  1,  1, 19,  1,  1,  1,
+
+#define to_CP51932_E8_BA_offsets 49179
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  5,    1,  1,  6,  7,  1,  8,  1,  1,
+      1,  9,  1, 10, 11,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1,  1,
+      1, 13,  1,  1,  1,  1,  1,  1,    1,  1, 14, 15, 16,  1,  1, 17,
+     18, 19,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_CP51932_E8_BB_offsets 49245
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  7,  8,  1,  9,
+      1,  1, 10,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1, 12,
+      1,  1, 13, 14,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16,  1,  1, 17, 18, 19, 20,  1,
+
+#define to_CP51932_E8_BC_offsets 49311
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      1,  1,  7,  8,  9, 10,  1,  1,    1, 11,  1, 12, 13, 14,  1, 15,
+      1,  1,  1,  1,  1,  1, 16,  1,    1, 17, 18,  1,  1,  1,  1, 19,
+      1,  1,  1, 20,  1,  1,  1,  1,   21, 22,  1, 23,  1,  1, 24, 25,
+
+#define to_CP51932_E8_BD_offsets 49377
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  1,    1,  6,  1,  1,  7,  8,  9,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,    1,  1,  1,  1, 11,  1,  1, 12,
+      1, 13, 14, 15, 16,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E8_BE_offsets 49443
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  4,  5,
+      1,  1,  1,  6,  1,  1,  1,  7,    8,  1,  1,  1,  1,  9, 10, 11,
+     12, 13, 14,  1,  1,  1,  1, 15,    1,  1, 16, 17, 18,  1,  1, 19,
+
+#define to_CP51932_E8_BF_offsets 49509
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  5,  1,
+      1,  6,  1,  1,  7,  1,  1,  1,    1,  1,  8,  1,  1,  1,  1,  1,
+      1,  1,  9,  1,  1, 10, 11,  1,    1, 12, 13, 14,  1, 15,  1, 16,
+     17,  1,  1,  1, 18,  1,  1, 19,   20, 21, 22,  1,  1, 23,  1,  1,
+
+#define to_CP51932_E9_80_offsets 49575
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  3,    3,  3,  3,  7,  3,  8,  9, 10,
+     11, 12,  3, 13, 14, 15, 16, 17,    3, 18, 19,  3,  3, 20, 21, 22,
+     23, 24, 25, 26,  3,  3,  3, 27,    3,  3,  3,  3,  3,  3, 28,  3,
+      3, 29, 30,  3,  3, 31, 32,  3,   33, 34,  3,  3, 35,  3, 36,  3,
+
+#define to_CP51932_E9_81_offsets 49641
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  6,  7,  8,  1,  9, 10, 11,
+     12, 13, 14, 15, 16, 17, 18,  1,   19, 20,  1,  1, 21,  1, 22,  1,
+     23, 24,  1, 25,  1, 26,  1, 27,   28, 29,  1,  1,  1, 30, 31, 32,
+      1,  1, 33,  1,  1, 34, 35, 36,   37,  1, 38,  1, 39, 40,  1, 41,
+
+#define to_CP51932_E9_82_offsets 49707
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    6,  8,  9,  6,  6,  6,  6, 10,
+      6, 11,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6, 12,  6,  6, 13,  6,   14,  6, 15,  6,  6,  6,  6, 16,
+      6, 17,  6,  6,  6, 18,  6,  6,   19,  6,  6,  6,  6,  6,  6,  6,
+
+#define to_CP51932_E9_83_offsets 49773
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  6,  1,
+      1,  7,  8,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1, 11,  1,  1,
+      1,  1,  1,  1,  1, 12,  1, 13,    1,  1,  1,  1,  1, 14,  1,  1,
+
+#define to_CP51932_E9_84_offsets 49839
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  4,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  7,  1,  1,
+      8,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_85_offsets 49905
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  4,  5,  6,  7,  1,
+      1,  1,  8,  1,  9,  1, 10,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 12, 13,  1, 14,  1,  1,    1, 15, 16,  1, 17,  1,  1,  1,
+      1,  1, 18, 19,  1, 20,  1, 21,   22,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_86_offsets 49971
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  4,  1,  5,  1,  6,  1,  1,
+      7,  1,  8,  1,  1,  1,  1,  9,    1,  1,  1,  1, 10,  1,  1,  1,
+      1,  1, 11,  1, 12,  1,  1,  1,    1,  1, 13, 14,  1,  1,  1, 15,
+      1,  1,  1,  1, 16, 17,  1,  1,   18,  1, 19,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_87_offsets 50037
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    6,  7,  3,  8,  9, 10, 11, 12,
+     13, 14,  3,  3,  3,  3, 15, 16,   17,  3, 18, 19, 20, 21, 22, 23,
+      3, 24,  3, 25, 26, 27, 28, 29,    3,  3,  3,  3,  3, 30, 31,  3,
+      3,  3,  3,  3,  3, 32, 33,  3,    3,  3,  3,  3, 34,  3,  3, 35,
+
+#define to_CP51932_E9_88_offsets 50103
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  3,  1,  1,  4,  5,  1,
+      6,  7,  1,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1, 10,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 11,  1,  1, 12,  1,  1,  1,
+      1,  1,  1,  1, 13,  1,  1, 14,    1, 15, 16,  1, 17,  1,  1, 18,
+
+#define to_CP51932_E9_89_offsets 50169
+128, 191,
+      1,  2,  2,  2,  3,  4,  2,  2,    5,  6,  2,  7,  2,  2,  8,  2,
+      9, 10,  2,  2,  2,  2,  2, 11,    2, 12, 13, 14,  2,  2, 15,  2,
+      2,  2, 16,  2, 17,  2, 18, 19,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 20,  2,  2,  2,  2,  2, 21,   22,  2,  2,  2,  2,  2, 23,  2,
+
+#define to_CP51932_E9_8A_offsets 50235
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    5,  2,  2,  2,  2,  2,  2,  2,
+      2,  6,  2,  7,  2,  8,  9,  2,   10,  2, 11, 12, 13,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 14,    2,  2,  2,  2,  2, 15,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 16,    2, 17,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E9_8B_offsets 50301
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      3,  1,  4,  5,  1,  6,  1,  7,    1,  8,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1, 10,  1,  1, 11,    1, 12, 13,  1,  1, 14,  1,  1,
+      1,  1, 15, 16,  1,  1,  1,  1,   17, 18, 19, 20, 21,  1,  1, 22,
+
+#define to_CP51932_E9_8C_offsets 50367
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  8,  1,  1,  9, 10,  1,
+     11, 12, 13, 14,  1, 15, 16,  1,   17,  1,  1, 18, 19,  1, 20, 21,
+      1,  1, 22,  1,  1, 23,  1,  1,    1,  1, 24, 25,  1,  1,  1,  1,
+
+#define to_CP51932_E9_8D_offsets 50433
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  4,  1,  5,  1,  1,
+      1,  1,  1,  1,  6,  1,  7,  8,    1,  1,  1,  9, 10,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 12,  1, 13,  1,
+     14,  1,  1,  1,  1, 15,  1,  1,    1,  1,  1,  1, 16,  1, 17,  1,
+
+#define to_CP51932_E9_8E_offsets 50499
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  4,  5,    1,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  1,  1,  8,    1,  1,  1,  1,  9, 10, 11,  1,
+     12,  1,  1,  1,  1,  1,  1,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_8F_offsets 50565
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  1,  1,  7,  8,    9,  1,  1,  1,  1, 10, 11,  1,
+      1, 12,  1,  1, 13, 14,  1,  1,   15,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_90_offsets 50631
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  5,  6,  1,  1,  1,    7,  8,  9,  1,  1,  1,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1, 12,  1,  1,  1, 13, 14,  1,   15,  1, 16,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_91_offsets 50697
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  7,  8,  1,  1,  1,  1,    1,  1,  9, 10,  1,  1, 11,  1,
+     12,  1, 13,  1,  1,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+     15,  1,  1,  1,  1, 16,  1, 17,    1,  1,  1,  1, 18, 19, 20, 21,
+
+#define to_CP51932_E9_92_offsets 50763
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_95_offsets 50829
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_96_offsets 50895
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    2,  6,  7,  8,  2,  2,  2,  9,
+      2, 10, 11, 12, 13,  2, 14,  2,   15, 16,  2,  2,  2,  2,  2,  2,
+     17,  2, 18, 19, 20, 21,  2, 22,   23,  2,  2,  2,  2, 24,  2,  2,
+      2,  2, 25,  2,  2,  2,  2,  2,    2, 26,  2, 27, 28,  2, 29,  2,
+
+#define to_CP51932_E9_97_offsets 50961
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  4,  1,  5,  6,  1,  1,
+      1,  1,  1,  1,  7,  8,  9,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+      1, 12, 13,  1,  1, 14,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_98_offsets 51027
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    4,  1,  5,  1,  1,  1,  6,  7,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1,  1, 10,
+
+#define to_CP51932_E9_99_offsets 51093
+128, 191,
+      1,  2,  3,  2,  4,  2,  2,  2,    2,  2,  2,  5,  6,  7,  2,  8,
+      9,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 10, 11, 12, 13, 14,
+      2,  2, 15, 16, 17, 18, 19,  2,    2,  2, 20,  2, 21,  2,  2,  2,
+     22,  2, 23, 24,  2, 25, 26, 27,   28,  2, 29,  2,  2, 30,  2,  2,
+
+#define to_CP51932_E9_9A_offsets 51159
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  1,  7,  8,  9,
+      1,  1,  1,  1, 10, 11,  1, 12,   13, 14,  1, 15, 16, 17,  1,  1,
+     18,  1,  1, 19,  1,  1,  1, 20,   21,  1, 22,  1,  1,  1,  1, 23,
+     24, 25, 26,  1, 27,  1, 28, 29,   30, 31,  1, 32, 33,  1,  1,  1,
+
+#define to_CP51932_E9_9B_offsets 51225
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  3,  9, 10, 11, 12,  3,
+      3, 13,  3,  3,  3, 14, 15,  3,    3, 16,  3, 17, 18,  3,  3,  3,
+      3,  3, 19, 20,  3,  3,  3,  3,   21,  3, 22, 23,  3,  3,  3,  3,
+     24,  3, 25,  3,  3,  3, 26, 27,    3, 28,  3, 29,  3,  3,  3,  3,
+
+#define to_CP51932_E9_9C_offsets 51291
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    6,  2,  7,  2,  2,  8,  9, 10,
+      2, 11,  2, 12,  2,  2, 13,  2,    2, 14,  2,  2, 15,  2, 16,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2,  2, 19,  2,  2,  2,  2,  2,
+     20,  2, 21, 22,  2,  2,  2,  2,   23, 24,  2, 25,  2, 26, 27,  2,
+
+#define to_CP51932_E9_9D_offsets 51357
+128, 191,
+      1,  1,  2,  3,  4,  1,  5,  1,    6,  7,  1,  1,  1,  8,  1,  9,
+      1, 10, 11,  1,  1, 12, 13,  1,    1, 14,  1,  1, 15,  1, 16,  1,
+     17, 18, 19,  1, 20,  1, 21,  1,   22, 23,  1, 24,  1, 25,  1,  1,
+      1, 26,  1,  1, 27,  1,  1,  1,    1, 28, 29,  1, 30,  1,  1,  1,
+
+#define to_CP51932_E9_9E_offsets 51423
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  1,    1,  1,  1,  6,  1,  7,  1,  8,
+      9,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+     12,  1,  1, 13,  1,  1, 14,  1,   15,  1,  1, 16,  1, 17,  1,  1,
+      1,  1,  1, 18, 19,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_9F_offsets 51489
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  9,  1,
+      1,  1, 10, 11,  1, 12, 13,  1,    1,  1,  1, 14,  1,  1,  1, 15,
+
+#define to_CP51932_E9_A0_offsets 51555
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  1,    7,  1,  1,  1,  8,  1,  1,  9,
+     10, 11, 12, 13,  1,  1,  1, 14,   15,  1, 16,  1,  1,  1,  1,  1,
+      1, 17,  1,  1, 18,  1,  1,  1,    1,  1,  1,  1, 19, 20,  1,  1,
+      1,  1,  1,  1, 21,  1,  1, 22,   23,  1,  1, 24, 25, 26,  1,  1,
+
+#define to_CP51932_E9_A1_offsets 51621
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  4,  5,  6,  7,
+      1,  1,  1,  1,  8,  9,  1, 10,   11,  1,  1, 12,  1,  1, 13,  1,
+      1,  1,  1,  1,  1, 14,  1, 15,    1,  1,  1, 16,  1,  1,  1, 17,
+     18, 19,  1, 20, 21,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_A2_offsets 51687
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  1,  1,  1,  1,  4,
+      1,  5,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_A3_offsets 51753
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  6,  1,  1,  7,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  9,  1, 10,  1, 11, 12, 13,
+      1,  1, 14,  1, 15,  1,  1,  1,    1,  1,  1,  1, 16, 17, 18,  1,
+
+#define to_CP51932_E9_A4_offsets 51819
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,   11,  1,  1,  1,  1, 12, 13,  1,
+     14, 15,  1,  1, 16,  1,  1, 17,   18,  1,  1,  1, 19,  1, 20,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 21, 22,  1,
+
+#define to_CP51932_E9_A5_offsets 51885
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  8,  9,  1,  1, 10,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_A6_offsets 51951
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  5,  1,  1,  1,  1,  6,  1,
+      1,  1,  1,  1,  1,  7,  1,  1,    8,  1,  1,  1,  9, 10, 11,  1,
+      1,  1,  1, 12, 13,  1,  1,  1,    1,  1,  1,  1, 14,  1,  1,  1,
+
+#define to_CP51932_E9_A7_offsets 52017
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  9,  1,  1, 10,  1,  1,   11,  1,  1, 12,  1, 13,  1, 14,
+      1,  1, 15,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 16, 17,  1,
+      1, 18, 19,  1,  1,  1,  1,  1,   20,  1,  1, 21,  1,  1,  1, 22,
+
+#define to_CP51932_E9_A8_offsets 52083
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  6,  7,  1,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1, 10,  1,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1, 13,  1,
+
+#define to_CP51932_E9_A9_offsets 52149
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  2,    2,  2,  2,  2,  2,  6,  7,  2,
+      2,  2,  2,  2,  2,  8,  2,  9,    2,  2, 10, 11,  2,  2,  2, 12,
+      2,  2, 13,  2, 14, 15,  2,  2,    2, 16, 17, 18,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E9_AA_offsets 52215
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  3,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+
+#define to_CP51932_E9_AB_offsets 52281
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  4,
+      2,  5,  2,  6,  7,  2,  2,  2,    8,  9,  2,  2, 10,  2, 11, 12,
+      2,  2, 13, 14,  2,  2, 15,  2,    2,  2, 16, 17,  2, 18, 19, 20,
+      2, 21,  2,  2, 22,  2,  2, 23,    2,  2,  2, 24,  2,  2,  2,  2,
+
+#define to_CP51932_E9_AC_offsets 52347
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  4,  1,  1,  1,  1,  5,
+      1,  1,  6,  7,  1,  8,  1,  9,   10, 11, 12,  1,  1,  1, 13, 14,
+      1, 15, 16,  1,  1,  1,  1,  1,    1,  1,  1, 17, 18,  1,  1,  1,
+
+#define to_CP51932_E9_AD_offsets 52413
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  7,  8,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,   12,  1, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 14,
+      1,  1, 15,  1, 16, 17,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_AE_offsets 52479
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  4,
+      1,  5,  6,  7,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1,  1, 10,
+     11,  1,  1,  1,  1,  1,  1,  1,   12,  1, 13, 14,  1, 15, 16,  1,
+      1, 17,  1,  1, 18,  1,  1,  1,    1, 19,  1, 20,  1,  1,  1,  1,
+
+#define to_CP51932_E9_AF_offsets 52545
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  4,  5,  2,  2,  2,  2,  6,
+      2,  7,  8,  2,  9,  2, 10,  2,    2,  2,  2, 11,  2,  2,  2,  2,
+      2, 12, 13, 14, 15,  2,  2,  2,   16,  2,  2,  2,  2,  2,  2,  2,
+     17, 18, 19,  2,  2, 20,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_CP51932_E9_B0_offsets 52611
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    5,  6,  7,  2,  8,  9,  2,  2,
+     10,  2, 11, 12, 13, 14,  2,  2,    2,  2,  2, 15,  2,  2,  2,  2,
+      2, 16,  2,  2, 17, 18,  2,  2,    2,  2,  2,  2,  2, 19, 20, 21,
+     22,  2, 23,  2,  2,  2,  2,  2,    2, 24, 25, 26,  2,  2, 27,  2,
+
+#define to_CP51932_E9_B1_offsets 52677
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  1,  6,    1,  1,  7,  1,  1,  1,  1,  1,
+      8,  1,  1,  1,  1,  1,  1,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 10,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_B3_offsets 52743
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  8,  9,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_B4_offsets 52809
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  6,  1,  1,  1,  1,  7,  1,
+      1,  1,  8,  1,  1,  9,  1,  1,    1,  1,  1, 10,  1,  1,  1, 11,
+      1,  1,  1, 12,  1,  1, 13,  1,   14,  1, 15, 16, 17,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19, 20,
+
+#define to_CP51932_E9_B5_offsets 52875
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9, 10, 11,  1,
+     12, 13,  1,  1, 14,  1,  1,  1,    1,  1,  1, 15, 16,  1,  1, 17,
+     18,  1, 19,  1,  1,  1,  1,  1,    1,  1, 20,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_B6_offsets 52941
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  6,  1,  1,  1,    1,  7,  1,  8,  1,  1,  1,  9,
+      1,  1, 10,  1, 11,  1,  1,  1,   12,  1, 13, 14,  1,  1,  1,  1,
+
+#define to_CP51932_E9_B7_offsets 53007
+128, 191,
+      1,  2,  3,  1,  4,  1,  5,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      1,  1,  1,  7,  1,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1,  1,  1, 10,  1, 11,
+      1,  1, 12,  1,  1,  1,  1,  1,   13, 14, 15,  1,  1, 16,  1,  1,
+
+#define to_CP51932_E9_B8_offsets 53073
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  4,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_B9_offsets 53139
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  4,  1,  1,  1,  5,  1,  6,
+
+#define to_CP51932_E9_BA_offsets 53205
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  4,  5,  1,  1,  1,
+      1,  6,  7,  8,  1,  9,  1, 10,    1,  1,  1,  1,  1, 11,  1, 12,
+      1,  1,  1,  1,  1, 13, 14,  1,    1, 15, 16,  1,  1, 17,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   18, 19, 20, 21, 22,  1, 23, 24,
+
+#define to_CP51932_E9_BB_offsets 53271
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  3,  4,  5,  6,
+      7,  8,  9,  1, 10,  1,  1,  1,   11, 12,  1, 13, 14, 15, 16,  1,
+     17,  1,  1,  1,  1, 18,  1,  1,   19,  1,  1,  1,  1,  1,  1, 20,
+      1,  1,  1,  1, 21,  1, 22, 23,    1, 24,  1, 25, 26, 27,  1,  1,
+
+#define to_CP51932_E9_BC_offsets 53337
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  1,  4,  1,
+      1,  1,  1,  5,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+
+#define to_CP51932_E9_BD_offsets 53403
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  4,  5,
+      1,  1,  6,  1,  7,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  8,
+      9, 10, 11, 12,  1,  1, 13, 14,    1,  1, 15,  1, 16,  1,  1,  1,
+      1,  1, 17,  1,  1,  1, 18, 19,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_E9_BE_offsets 53469
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP51932_offsets 53535
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  6,
+      7,  8,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 10, 10, 10, 19, 10, 20,
+     21, 22, 22, 22, 23,
+
+};
+static const unsigned int
+japanese_euc_word_array[44862] = {
+#define from_EUC_JP_8E_infos WORDINDEX2INFO(0)
+                INVALID, o3(0xEF,0xBD,0xA1),
+     o3(0xEF,0xBD,0xA2), o3(0xEF,0xBD,0xA3),
+     o3(0xEF,0xBD,0xA4), o3(0xEF,0xBD,0xA5),
+     o3(0xEF,0xBD,0xA6), o3(0xEF,0xBD,0xA7),
+     o3(0xEF,0xBD,0xA8), o3(0xEF,0xBD,0xA9),
+     o3(0xEF,0xBD,0xAA), o3(0xEF,0xBD,0xAB),
+     o3(0xEF,0xBD,0xAC), o3(0xEF,0xBD,0xAD),
+     o3(0xEF,0xBD,0xAE), o3(0xEF,0xBD,0xAF),
+     o3(0xEF,0xBD,0xB0), o3(0xEF,0xBD,0xB1),
+     o3(0xEF,0xBD,0xB2), o3(0xEF,0xBD,0xB3),
+     o3(0xEF,0xBD,0xB4), o3(0xEF,0xBD,0xB5),
+     o3(0xEF,0xBD,0xB6), o3(0xEF,0xBD,0xB7),
+     o3(0xEF,0xBD,0xB8), o3(0xEF,0xBD,0xB9),
+     o3(0xEF,0xBD,0xBA), o3(0xEF,0xBD,0xBB),
+     o3(0xEF,0xBD,0xBC), o3(0xEF,0xBD,0xBD),
+     o3(0xEF,0xBD,0xBE), o3(0xEF,0xBD,0xBF),
+     o3(0xEF,0xBE,0x80), o3(0xEF,0xBE,0x81),
+     o3(0xEF,0xBE,0x82), o3(0xEF,0xBE,0x83),
+     o3(0xEF,0xBE,0x84), o3(0xEF,0xBE,0x85),
+     o3(0xEF,0xBE,0x86), o3(0xEF,0xBE,0x87),
+     o3(0xEF,0xBE,0x88), o3(0xEF,0xBE,0x89),
+     o3(0xEF,0xBE,0x8A), o3(0xEF,0xBE,0x8B),
+     o3(0xEF,0xBE,0x8C), o3(0xEF,0xBE,0x8D),
+     o3(0xEF,0xBE,0x8E), o3(0xEF,0xBE,0x8F),
+     o3(0xEF,0xBE,0x90), o3(0xEF,0xBE,0x91),
+     o3(0xEF,0xBE,0x92), o3(0xEF,0xBE,0x93),
+     o3(0xEF,0xBE,0x94), o3(0xEF,0xBE,0x95),
+     o3(0xEF,0xBE,0x96), o3(0xEF,0xBE,0x97),
+     o3(0xEF,0xBE,0x98), o3(0xEF,0xBE,0x99),
+     o3(0xEF,0xBE,0x9A), o3(0xEF,0xBE,0x9B),
+     o3(0xEF,0xBE,0x9C), o3(0xEF,0xBE,0x9D),
+     o3(0xEF,0xBE,0x9E), o3(0xEF,0xBE,0x9F),
+                  UNDEF,
+
+#define from_EUC_JP_8E WORDINDEX2INFO(65)
+    from_EUC_JP_8E_offsets,
+    from_EUC_JP_8E_infos,
+
+#define from_EUC_JP_8F_A1_infos WORDINDEX2INFO(67)
+     INVALID,   UNDEF,
+
+#define from_EUC_JP_8F_A1 WORDINDEX2INFO(69)
+    from_EUC_JP_8F_A1_offsets,
+    from_EUC_JP_8F_A1_infos,
+
+#define from_EUC_JP_8F_A2_infos WORDINDEX2INFO(71)
+                INVALID,              UNDEF,
+          o2(0xCB,0x98),      o2(0xCB,0x87),
+          o2(0xC2,0xB8),      o2(0xCB,0x99),
+          o2(0xCB,0x9D),      o2(0xC2,0xAF),
+          o2(0xCB,0x9B),      o2(0xCB,0x9A),
+               o1(0x7E),      o2(0xCE,0x84),
+          o2(0xCE,0x85),      o2(0xC2,0xA1),
+          o2(0xC2,0xA6),      o2(0xC2,0xBF),
+          o2(0xC2,0xBA),      o2(0xC2,0xAA),
+          o2(0xC2,0xA9),      o2(0xC2,0xAE),
+     o3(0xE2,0x84,0xA2),      o2(0xC2,0xA4),
+     o3(0xE2,0x84,0x96),
+
+#define from_EUC_JP_8F_A2 WORDINDEX2INFO(94)
+    from_EUC_JP_8F_A2_offsets,
+    from_EUC_JP_8F_A2_infos,
+
+#define from_EUC_JP_8F_A6_infos WORDINDEX2INFO(96)
+           INVALID,         UNDEF, o2(0xCE,0x86), o2(0xCE,0x88),
+     o2(0xCE,0x89), o2(0xCE,0x8A), o2(0xCE,0xAA), o2(0xCE,0x8C),
+     o2(0xCE,0x8E), o2(0xCE,0xAB), o2(0xCE,0x8F), o2(0xCE,0xAC),
+     o2(0xCE,0xAD), o2(0xCE,0xAE), o2(0xCE,0xAF), o2(0xCF,0x8A),
+     o2(0xCE,0x90), o2(0xCF,0x8C), o2(0xCF,0x82), o2(0xCF,0x8D),
+     o2(0xCF,0x8B), o2(0xCE,0xB0), o2(0xCF,0x8E),
+
+#define from_EUC_JP_8F_A6 WORDINDEX2INFO(119)
+    from_EUC_JP_8F_A6_offsets,
+    from_EUC_JP_8F_A6_infos,
+
+#define from_EUC_JP_8F_A7_infos WORDINDEX2INFO(121)
+           INVALID,         UNDEF, o2(0xD0,0x82), o2(0xD0,0x83),
+     o2(0xD0,0x84), o2(0xD0,0x85), o2(0xD0,0x86), o2(0xD0,0x87),
+     o2(0xD0,0x88), o2(0xD0,0x89), o2(0xD0,0x8A), o2(0xD0,0x8B),
+     o2(0xD0,0x8C), o2(0xD0,0x8E), o2(0xD0,0x8F), o2(0xD1,0x92),
+     o2(0xD1,0x93), o2(0xD1,0x94), o2(0xD1,0x95), o2(0xD1,0x96),
+     o2(0xD1,0x97), o2(0xD1,0x98), o2(0xD1,0x99), o2(0xD1,0x9A),
+     o2(0xD1,0x9B), o2(0xD1,0x9C), o2(0xD1,0x9E), o2(0xD1,0x9F),
+
+#define from_EUC_JP_8F_A7 WORDINDEX2INFO(149)
+    from_EUC_JP_8F_A7_offsets,
+    from_EUC_JP_8F_A7_infos,
+
+#define from_EUC_JP_8F_A9_infos WORDINDEX2INFO(151)
+           INVALID, o2(0xC3,0x86), o2(0xC4,0x90),         UNDEF,
+     o2(0xC4,0xA6), o2(0xC4,0xB2), o2(0xC5,0x81), o2(0xC4,0xBF),
+     o2(0xC5,0x8A), o2(0xC3,0x98), o2(0xC5,0x92), o2(0xC5,0xA6),
+     o2(0xC3,0x9E), o2(0xC3,0xA6), o2(0xC4,0x91), o2(0xC3,0xB0),
+     o2(0xC4,0xA7), o2(0xC4,0xB1), o2(0xC4,0xB3), o2(0xC4,0xB8),
+     o2(0xC5,0x82), o2(0xC5,0x80), o2(0xC5,0x89), o2(0xC5,0x8B),
+     o2(0xC3,0xB8), o2(0xC5,0x93), o2(0xC3,0x9F), o2(0xC5,0xA7),
+     o2(0xC3,0xBE),
+
+#define from_EUC_JP_8F_A9 WORDINDEX2INFO(180)
+    from_EUC_JP_8F_A9_offsets,
+    from_EUC_JP_8F_A9_infos,
+
+#define from_EUC_JP_8F_AA_infos WORDINDEX2INFO(182)
+           INVALID, o2(0xC3,0x81), o2(0xC3,0x80), o2(0xC3,0x84),
+     o2(0xC3,0x82), o2(0xC4,0x82), o2(0xC7,0x8D), o2(0xC4,0x80),
+     o2(0xC4,0x84), o2(0xC3,0x85), o2(0xC3,0x83), o2(0xC4,0x86),
+     o2(0xC4,0x88), o2(0xC4,0x8C), o2(0xC3,0x87), o2(0xC4,0x8A),
+     o2(0xC4,0x8E), o2(0xC3,0x89), o2(0xC3,0x88), o2(0xC3,0x8B),
+     o2(0xC3,0x8A), o2(0xC4,0x9A), o2(0xC4,0x96), o2(0xC4,0x92),
+     o2(0xC4,0x98),         UNDEF, o2(0xC4,0x9C), o2(0xC4,0x9E),
+     o2(0xC4,0xA2), o2(0xC4,0xA0), o2(0xC4,0xA4), o2(0xC3,0x8D),
+     o2(0xC3,0x8C), o2(0xC3,0x8F), o2(0xC3,0x8E), o2(0xC7,0x8F),
+     o2(0xC4,0xB0), o2(0xC4,0xAA), o2(0xC4,0xAE), o2(0xC4,0xA8),
+     o2(0xC4,0xB4), o2(0xC4,0xB6), o2(0xC4,0xB9), o2(0xC4,0xBD),
+     o2(0xC4,0xBB), o2(0xC5,0x83), o2(0xC5,0x87), o2(0xC5,0x85),
+     o2(0xC3,0x91), o2(0xC3,0x93), o2(0xC3,0x92), o2(0xC3,0x96),
+     o2(0xC3,0x94), o2(0xC7,0x91), o2(0xC5,0x90), o2(0xC5,0x8C),
+     o2(0xC3,0x95), o2(0xC5,0x94), o2(0xC5,0x98), o2(0xC5,0x96),
+     o2(0xC5,0x9A), o2(0xC5,0x9C), o2(0xC5,0xA0), o2(0xC5,0x9E),
+     o2(0xC5,0xA4), o2(0xC5,0xA2), o2(0xC3,0x9A), o2(0xC3,0x99),
+     o2(0xC3,0x9C), o2(0xC3,0x9B), o2(0xC5,0xAC), o2(0xC7,0x93),
+     o2(0xC5,0xB0), o2(0xC5,0xAA), o2(0xC5,0xB2), o2(0xC5,0xAE),
+     o2(0xC5,0xA8), o2(0xC7,0x97), o2(0xC7,0x9B), o2(0xC7,0x99),
+     o2(0xC7,0x95), o2(0xC5,0xB4), o2(0xC3,0x9D), o2(0xC5,0xB8),
+     o2(0xC5,0xB6), o2(0xC5,0xB9), o2(0xC5,0xBD), o2(0xC5,0xBB),
+
+#define from_EUC_JP_8F_AA WORDINDEX2INFO(270)
+    from_EUC_JP_8F_AA_offsets,
+    from_EUC_JP_8F_AA_infos,
+
+#define from_EUC_JP_8F_AB_infos WORDINDEX2INFO(272)
+           INVALID, o2(0xC3,0xA1), o2(0xC3,0xA0), o2(0xC3,0xA4),
+     o2(0xC3,0xA2), o2(0xC4,0x83), o2(0xC7,0x8E), o2(0xC4,0x81),
+     o2(0xC4,0x85), o2(0xC3,0xA5), o2(0xC3,0xA3), o2(0xC4,0x87),
+     o2(0xC4,0x89), o2(0xC4,0x8D), o2(0xC3,0xA7), o2(0xC4,0x8B),
+     o2(0xC4,0x8F), o2(0xC3,0xA9), o2(0xC3,0xA8), o2(0xC3,0xAB),
+     o2(0xC3,0xAA), o2(0xC4,0x9B), o2(0xC4,0x97), o2(0xC4,0x93),
+     o2(0xC4,0x99), o2(0xC7,0xB5), o2(0xC4,0x9D), o2(0xC4,0x9F),
+             UNDEF, o2(0xC4,0xA1), o2(0xC4,0xA5), o2(0xC3,0xAD),
+     o2(0xC3,0xAC), o2(0xC3,0xAF), o2(0xC3,0xAE), o2(0xC7,0x90),
+     o2(0xC4,0xAB), o2(0xC4,0xAF), o2(0xC4,0xA9), o2(0xC4,0xB5),
+     o2(0xC4,0xB7), o2(0xC4,0xBA), o2(0xC4,0xBE), o2(0xC4,0xBC),
+     o2(0xC5,0x84), o2(0xC5,0x88), o2(0xC5,0x86), o2(0xC3,0xB1),
+     o2(0xC3,0xB3), o2(0xC3,0xB2), o2(0xC3,0xB6), o2(0xC3,0xB4),
+     o2(0xC7,0x92), o2(0xC5,0x91), o2(0xC5,0x8D), o2(0xC3,0xB5),
+     o2(0xC5,0x95), o2(0xC5,0x99), o2(0xC5,0x97), o2(0xC5,0x9B),
+     o2(0xC5,0x9D), o2(0xC5,0xA1), o2(0xC5,0x9F), o2(0xC5,0xA5),
+     o2(0xC5,0xA3), o2(0xC3,0xBA), o2(0xC3,0xB9), o2(0xC3,0xBC),
+     o2(0xC3,0xBB), o2(0xC5,0xAD), o2(0xC7,0x94), o2(0xC5,0xB1),
+     o2(0xC5,0xAB), o2(0xC5,0xB3), o2(0xC5,0xAF), o2(0xC5,0xA9),
+     o2(0xC7,0x98), o2(0xC7,0x9C), o2(0xC7,0x9A), o2(0xC7,0x96),
+     o2(0xC5,0xB5), o2(0xC3,0xBD), o2(0xC3,0xBF), o2(0xC5,0xB7),
+     o2(0xC5,0xBA), o2(0xC5,0xBE), o2(0xC5,0xBC),
+
+#define from_EUC_JP_8F_AB WORDINDEX2INFO(359)
+    from_EUC_JP_8F_AB_offsets,
+    from_EUC_JP_8F_AB_infos,
+
+#define from_EUC_JP_8F_B0_infos WORDINDEX2INFO(361)
+                INVALID, o3(0xE4,0xB8,0x82),
+     o3(0xE4,0xB8,0x84), o3(0xE4,0xB8,0x85),
+     o3(0xE4,0xB8,0x8C), o3(0xE4,0xB8,0x92),
+     o3(0xE4,0xB8,0x9F), o3(0xE4,0xB8,0xA3),
+     o3(0xE4,0xB8,0xA4), o3(0xE4,0xB8,0xA8),
+     o3(0xE4,0xB8,0xAB), o3(0xE4,0xB8,0xAE),
+     o3(0xE4,0xB8,0xAF), o3(0xE4,0xB8,0xB0),
+     o3(0xE4,0xB8,0xB5), o3(0xE4,0xB9,0x80),
+     o3(0xE4,0xB9,0x81), o3(0xE4,0xB9,0x84),
+     o3(0xE4,0xB9,0x87), o3(0xE4,0xB9,0x91),
+     o3(0xE4,0xB9,0x9A), o3(0xE4,0xB9,0x9C),
+     o3(0xE4,0xB9,0xA3), o3(0xE4,0xB9,0xA8),
+     o3(0xE4,0xB9,0xA9), o3(0xE4,0xB9,0xB4),
+     o3(0xE4,0xB9,0xB5), o3(0xE4,0xB9,0xB9),
+     o3(0xE4,0xB9,0xBF), o3(0xE4,0xBA,0x8D),
+     o3(0xE4,0xBA,0x96), o3(0xE4,0xBA,0x97),
+     o3(0xE4,0xBA,0x9D), o3(0xE4,0xBA,0xAF),
+     o3(0xE4,0xBA,0xB9), o3(0xE4,0xBB,0x83),
+     o3(0xE4,0xBB,0x90), o3(0xE4,0xBB,0x9A),
+     o3(0xE4,0xBB,0x9B), o3(0xE4,0xBB,0xA0),
+     o3(0xE4,0xBB,0xA1), o3(0xE4,0xBB,0xA2),
+     o3(0xE4,0xBB,0xA8), o3(0xE4,0xBB,0xAF),
+     o3(0xE4,0xBB,0xB1), o3(0xE4,0xBB,0xB3),
+     o3(0xE4,0xBB,0xB5), o3(0xE4,0xBB,0xBD),
+     o3(0xE4,0xBB,0xBE), o3(0xE4,0xBB,0xBF),
+     o3(0xE4,0xBC,0x80), o3(0xE4,0xBC,0x82),
+     o3(0xE4,0xBC,0x83), o3(0xE4,0xBC,0x88),
+     o3(0xE4,0xBC,0x8B), o3(0xE4,0xBC,0x8C),
+     o3(0xE4,0xBC,0x92), o3(0xE4,0xBC,0x95),
+     o3(0xE4,0xBC,0x96), o3(0xE4,0xBC,0x97),
+     o3(0xE4,0xBC,0x99), o3(0xE4,0xBC,0xAE),
+     o3(0xE4,0xBC,0xB1), o3(0xE4,0xBD,0xA0),
+     o3(0xE4,0xBC,0xB3), o3(0xE4,0xBC,0xB5),
+     o3(0xE4,0xBC,0xB7), o3(0xE4,0xBC,0xB9),
+     o3(0xE4,0xBC,0xBB), o3(0xE4,0xBC,0xBE),
+     o3(0xE4,0xBD,0x80), o3(0xE4,0xBD,0x82),
+     o3(0xE4,0xBD,0x88), o3(0xE4,0xBD,0x89),
+     o3(0xE4,0xBD,0x8B), o3(0xE4,0xBD,0x8C),
+     o3(0xE4,0xBD,0x92), o3(0xE4,0xBD,0x94),
+     o3(0xE4,0xBD,0x96), o3(0xE4,0xBD,0x98),
+     o3(0xE4,0xBD,0x9F), o3(0xE4,0xBD,0xA3),
+     o3(0xE4,0xBD,0xAA), o3(0xE4,0xBD,0xAC),
+     o3(0xE4,0xBD,0xAE), o3(0xE4,0xBD,0xB1),
+     o3(0xE4,0xBD,0xB7), o3(0xE4,0xBD,0xB8),
+     o3(0xE4,0xBD,0xB9), o3(0xE4,0xBD,0xBA),
+     o3(0xE4,0xBD,0xBD), o3(0xE4,0xBD,0xBE),
+     o3(0xE4,0xBE,0x81), o3(0xE4,0xBE,0x82),
+     o3(0xE4,0xBE,0x84),
+
+#define from_EUC_JP_8F_B0 WORDINDEX2INFO(456)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B0_infos,
+
+#define from_EUC_JP_8F_B1_infos WORDINDEX2INFO(458)
+                INVALID, o3(0xE4,0xBE,0x85),
+     o3(0xE4,0xBE,0x89), o3(0xE4,0xBE,0x8A),
+     o3(0xE4,0xBE,0x8C), o3(0xE4,0xBE,0x8E),
+     o3(0xE4,0xBE,0x90), o3(0xE4,0xBE,0x92),
+     o3(0xE4,0xBE,0x93), o3(0xE4,0xBE,0x94),
+     o3(0xE4,0xBE,0x97), o3(0xE4,0xBE,0x99),
+     o3(0xE4,0xBE,0x9A), o3(0xE4,0xBE,0x9E),
+     o3(0xE4,0xBE,0x9F), o3(0xE4,0xBE,0xB2),
+     o3(0xE4,0xBE,0xB7), o3(0xE4,0xBE,0xB9),
+     o3(0xE4,0xBE,0xBB), o3(0xE4,0xBE,0xBC),
+     o3(0xE4,0xBE,0xBD), o3(0xE4,0xBE,0xBE),
+     o3(0xE4,0xBF,0x80), o3(0xE4,0xBF,0x81),
+     o3(0xE4,0xBF,0x85), o3(0xE4,0xBF,0x86),
+     o3(0xE4,0xBF,0x88), o3(0xE4,0xBF,0x89),
+     o3(0xE4,0xBF,0x8B), o3(0xE4,0xBF,0x8C),
+     o3(0xE4,0xBF,0x8D), o3(0xE4,0xBF,0x8F),
+     o3(0xE4,0xBF,0x92), o3(0xE4,0xBF,0x9C),
+     o3(0xE4,0xBF,0xA0), o3(0xE4,0xBF,0xA2),
+     o3(0xE4,0xBF,0xB0), o3(0xE4,0xBF,0xB2),
+     o3(0xE4,0xBF,0xBC), o3(0xE4,0xBF,0xBD),
+     o3(0xE4,0xBF,0xBF), o3(0xE5,0x80,0x80),
+     o3(0xE5,0x80,0x81), o3(0xE5,0x80,0x84),
+     o3(0xE5,0x80,0x87), o3(0xE5,0x80,0x8A),
+     o3(0xE5,0x80,0x8C), o3(0xE5,0x80,0x8E),
+     o3(0xE5,0x80,0x90), o3(0xE5,0x80,0x93),
+     o3(0xE5,0x80,0x97), o3(0xE5,0x80,0x98),
+     o3(0xE5,0x80,0x9B), o3(0xE5,0x80,0x9C),
+     o3(0xE5,0x80,0x9D), o3(0xE5,0x80,0x9E),
+     o3(0xE5,0x80,0xA2), o3(0xE5,0x80,0xA7),
+     o3(0xE5,0x80,0xAE), o3(0xE5,0x80,0xB0),
+     o3(0xE5,0x80,0xB2), o3(0xE5,0x80,0xB3),
+     o3(0xE5,0x80,0xB5), o3(0xE5,0x81,0x80),
+     o3(0xE5,0x81,0x81), o3(0xE5,0x81,0x82),
+     o3(0xE5,0x81,0x85), o3(0xE5,0x81,0x86),
+     o3(0xE5,0x81,0x8A), o3(0xE5,0x81,0x8C),
+     o3(0xE5,0x81,0x8E), o3(0xE5,0x81,0x91),
+     o3(0xE5,0x81,0x92), o3(0xE5,0x81,0x93),
+     o3(0xE5,0x81,0x97), o3(0xE5,0x81,0x99),
+     o3(0xE5,0x81,0x9F), o3(0xE5,0x81,0xA0),
+     o3(0xE5,0x81,0xA2), o3(0xE5,0x81,0xA3),
+     o3(0xE5,0x81,0xA6), o3(0xE5,0x81,0xA7),
+     o3(0xE5,0x81,0xAA), o3(0xE5,0x81,0xAD),
+     o3(0xE5,0x81,0xB0), o3(0xE5,0x81,0xB1),
+     o3(0xE5,0x80,0xBB), o3(0xE5,0x82,0x81),
+     o3(0xE5,0x82,0x83), o3(0xE5,0x82,0x84),
+     o3(0xE5,0x82,0x86), o3(0xE5,0x82,0x8A),
+     o3(0xE5,0x82,0x8E), o3(0xE5,0x82,0x8F),
+     o3(0xE5,0x82,0x90),
+
+#define from_EUC_JP_8F_B1 WORDINDEX2INFO(553)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B1_infos,
+
+#define from_EUC_JP_8F_B2_infos WORDINDEX2INFO(555)
+                INVALID, o3(0xE5,0x82,0x92),
+     o3(0xE5,0x82,0x93), o3(0xE5,0x82,0x94),
+     o3(0xE5,0x82,0x96), o3(0xE5,0x82,0x9B),
+     o3(0xE5,0x82,0x9C), o3(0xE5,0x82,0x9E),
+     o3(0xE5,0x82,0x9F), o3(0xE5,0x82,0xA0),
+     o3(0xE5,0x82,0xA1), o3(0xE5,0x82,0xA2),
+     o3(0xE5,0x82,0xAA), o3(0xE5,0x82,0xAF),
+     o3(0xE5,0x82,0xB0), o3(0xE5,0x82,0xB9),
+     o3(0xE5,0x82,0xBA), o3(0xE5,0x82,0xBD),
+     o3(0xE5,0x83,0x80), o3(0xE5,0x83,0x83),
+     o3(0xE5,0x83,0x84), o3(0xE5,0x83,0x87),
+     o3(0xE5,0x83,0x8C), o3(0xE5,0x83,0x8E),
+     o3(0xE5,0x83,0x90), o3(0xE5,0x83,0x93),
+     o3(0xE5,0x83,0x94), o3(0xE5,0x83,0x98),
+     o3(0xE5,0x83,0x9C), o3(0xE5,0x83,0x9D),
+     o3(0xE5,0x83,0x9F), o3(0xE5,0x83,0xA2),
+     o3(0xE5,0x83,0xA4), o3(0xE5,0x83,0xA6),
+     o3(0xE5,0x83,0xA8), o3(0xE5,0x83,0xA9),
+     o3(0xE5,0x83,0xAF), o3(0xE5,0x83,0xB1),
+     o3(0xE5,0x83,0xB6), o3(0xE5,0x83,0xBA),
+     o3(0xE5,0x83,0xBE), o3(0xE5,0x84,0x83),
+     o3(0xE5,0x84,0x86), o3(0xE5,0x84,0x87),
+     o3(0xE5,0x84,0x88), o3(0xE5,0x84,0x8B),
+     o3(0xE5,0x84,0x8C), o3(0xE5,0x84,0x8D),
+     o3(0xE5,0x84,0x8E), o3(0xE5,0x83,0xB2),
+     o3(0xE5,0x84,0x90), o3(0xE5,0x84,0x97),
+     o3(0xE5,0x84,0x99), o3(0xE5,0x84,0x9B),
+     o3(0xE5,0x84,0x9C), o3(0xE5,0x84,0x9D),
+     o3(0xE5,0x84,0x9E), o3(0xE5,0x84,0xA3),
+     o3(0xE5,0x84,0xA7), o3(0xE5,0x84,0xA8),
+     o3(0xE5,0x84,0xAC), o3(0xE5,0x84,0xAD),
+     o3(0xE5,0x84,0xAF), o3(0xE5,0x84,0xB1),
+     o3(0xE5,0x84,0xB3), o3(0xE5,0x84,0xB4),
+     o3(0xE5,0x84,0xB5), o3(0xE5,0x84,0xB8),
+     o3(0xE5,0x84,0xB9), o3(0xE5,0x85,0x82),
+     o3(0xE5,0x85,0x8A), o3(0xE5,0x85,0x8F),
+     o3(0xE5,0x85,0x93), o3(0xE5,0x85,0x95),
+     o3(0xE5,0x85,0x97), o3(0xE5,0x85,0x98),
+     o3(0xE5,0x85,0x9F), o3(0xE5,0x85,0xA4),
+     o3(0xE5,0x85,0xA6), o3(0xE5,0x85,0xBE),
+     o3(0xE5,0x86,0x83), o3(0xE5,0x86,0x84),
+     o3(0xE5,0x86,0x8B), o3(0xE5,0x86,0x8E),
+     o3(0xE5,0x86,0x98), o3(0xE5,0x86,0x9D),
+     o3(0xE5,0x86,0xA1), o3(0xE5,0x86,0xA3),
+     o3(0xE5,0x86,0xAD), o3(0xE5,0x86,0xB8),
+     o3(0xE5,0x86,0xBA), o3(0xE5,0x86,0xBC),
+     o3(0xE5,0x86,0xBE), o3(0xE5,0x86,0xBF),
+     o3(0xE5,0x87,0x82),
+
+#define from_EUC_JP_8F_B2 WORDINDEX2INFO(650)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B2_infos,
+
+#define from_EUC_JP_8F_B3_infos WORDINDEX2INFO(652)
+                INVALID, o3(0xE5,0x87,0x88),
+     o3(0xE5,0x87,0x8F), o3(0xE5,0x87,0x91),
+     o3(0xE5,0x87,0x92), o3(0xE5,0x87,0x93),
+     o3(0xE5,0x87,0x95), o3(0xE5,0x87,0x98),
+     o3(0xE5,0x87,0x9E), o3(0xE5,0x87,0xA2),
+     o3(0xE5,0x87,0xA5), o3(0xE5,0x87,0xAE),
+     o3(0xE5,0x87,0xB2), o3(0xE5,0x87,0xB3),
+     o3(0xE5,0x87,0xB4), o3(0xE5,0x87,0xB7),
+     o3(0xE5,0x88,0x81), o3(0xE5,0x88,0x82),
+     o3(0xE5,0x88,0x85), o3(0xE5,0x88,0x92),
+     o3(0xE5,0x88,0x93), o3(0xE5,0x88,0x95),
+     o3(0xE5,0x88,0x96), o3(0xE5,0x88,0x98),
+     o3(0xE5,0x88,0xA2), o3(0xE5,0x88,0xA8),
+     o3(0xE5,0x88,0xB1), o3(0xE5,0x88,0xB2),
+     o3(0xE5,0x88,0xB5), o3(0xE5,0x88,0xBC),
+     o3(0xE5,0x89,0x85), o3(0xE5,0x89,0x89),
+     o3(0xE5,0x89,0x95), o3(0xE5,0x89,0x97),
+     o3(0xE5,0x89,0x98), o3(0xE5,0x89,0x9A),
+     o3(0xE5,0x89,0x9C), o3(0xE5,0x89,0x9F),
+     o3(0xE5,0x89,0xA0), o3(0xE5,0x89,0xA1),
+     o3(0xE5,0x89,0xA6), o3(0xE5,0x89,0xAE),
+     o3(0xE5,0x89,0xB7), o3(0xE5,0x89,0xB8),
+     o3(0xE5,0x89,0xB9), o3(0xE5,0x8A,0x80),
+     o3(0xE5,0x8A,0x82), o3(0xE5,0x8A,0x85),
+     o3(0xE5,0x8A,0x8A), o3(0xE5,0x8A,0x8C),
+     o3(0xE5,0x8A,0x93), o3(0xE5,0x8A,0x95),
+     o3(0xE5,0x8A,0x96), o3(0xE5,0x8A,0x97),
+     o3(0xE5,0x8A,0x98), o3(0xE5,0x8A,0x9A),
+     o3(0xE5,0x8A,0x9C), o3(0xE5,0x8A,0xA4),
+     o3(0xE5,0x8A,0xA5), o3(0xE5,0x8A,0xA6),
+     o3(0xE5,0x8A,0xA7), o3(0xE5,0x8A,0xAF),
+     o3(0xE5,0x8A,0xB0), o3(0xE5,0x8A,0xB6),
+     o3(0xE5,0x8A,0xB7), o3(0xE5,0x8A,0xB8),
+     o3(0xE5,0x8A,0xBA), o3(0xE5,0x8A,0xBB),
+     o3(0xE5,0x8A,0xBD), o3(0xE5,0x8B,0x80),
+     o3(0xE5,0x8B,0x84), o3(0xE5,0x8B,0x86),
+     o3(0xE5,0x8B,0x88), o3(0xE5,0x8B,0x8C),
+     o3(0xE5,0x8B,0x8F), o3(0xE5,0x8B,0x91),
+     o3(0xE5,0x8B,0x94), o3(0xE5,0x8B,0x96),
+     o3(0xE5,0x8B,0x9B), o3(0xE5,0x8B,0x9C),
+     o3(0xE5,0x8B,0xA1), o3(0xE5,0x8B,0xA5),
+     o3(0xE5,0x8B,0xA8), o3(0xE5,0x8B,0xA9),
+     o3(0xE5,0x8B,0xAA), o3(0xE5,0x8B,0xAC),
+     o3(0xE5,0x8B,0xB0), o3(0xE5,0x8B,0xB1),
+     o3(0xE5,0x8B,0xB4), o3(0xE5,0x8B,0xB6),
+     o3(0xE5,0x8B,0xB7), o3(0xE5,0x8C,0x80),
+     o3(0xE5,0x8C,0x83), o3(0xE5,0x8C,0x8A),
+     o3(0xE5,0x8C,0x8B),
+
+#define from_EUC_JP_8F_B3 WORDINDEX2INFO(747)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B3_infos,
+
+#define from_EUC_JP_8F_B4_infos WORDINDEX2INFO(749)
+                INVALID, o3(0xE5,0x8C,0x8C),
+     o3(0xE5,0x8C,0x91), o3(0xE5,0x8C,0x93),
+     o3(0xE5,0x8C,0x98), o3(0xE5,0x8C,0x9B),
+     o3(0xE5,0x8C,0x9C), o3(0xE5,0x8C,0x9E),
+     o3(0xE5,0x8C,0x9F), o3(0xE5,0x8C,0xA5),
+     o3(0xE5,0x8C,0xA7), o3(0xE5,0x8C,0xA8),
+     o3(0xE5,0x8C,0xA9), o3(0xE5,0x8C,0xAB),
+     o3(0xE5,0x8C,0xAC), o3(0xE5,0x8C,0xAD),
+     o3(0xE5,0x8C,0xB0), o3(0xE5,0x8C,0xB2),
+     o3(0xE5,0x8C,0xB5), o3(0xE5,0x8C,0xBC),
+     o3(0xE5,0x8C,0xBD), o3(0xE5,0x8C,0xBE),
+     o3(0xE5,0x8D,0x82), o3(0xE5,0x8D,0x8C),
+     o3(0xE5,0x8D,0x8B), o3(0xE5,0x8D,0x99),
+     o3(0xE5,0x8D,0x9B), o3(0xE5,0x8D,0xA1),
+     o3(0xE5,0x8D,0xA3), o3(0xE5,0x8D,0xA5),
+     o3(0xE5,0x8D,0xAC), o3(0xE5,0x8D,0xAD),
+     o3(0xE5,0x8D,0xB2), o3(0xE5,0x8D,0xB9),
+     o3(0xE5,0x8D,0xBE), o3(0xE5,0x8E,0x83),
+     o3(0xE5,0x8E,0x87), o3(0xE5,0x8E,0x88),
+     o3(0xE5,0x8E,0x8E), o3(0xE5,0x8E,0x93),
+     o3(0xE5,0x8E,0x94), o3(0xE5,0x8E,0x99),
+     o3(0xE5,0x8E,0x9D), o3(0xE5,0x8E,0xA1),
+     o3(0xE5,0x8E,0xA4), o3(0xE5,0x8E,0xAA),
+     o3(0xE5,0x8E,0xAB), o3(0xE5,0x8E,0xAF),
+     o3(0xE5,0x8E,0xB2), o3(0xE5,0x8E,0xB4),
+     o3(0xE5,0x8E,0xB5), o3(0xE5,0x8E,0xB7),
+     o3(0xE5,0x8E,0xB8), o3(0xE5,0x8E,0xBA),
+     o3(0xE5,0x8E,0xBD), o3(0xE5,0x8F,0x80),
+     o3(0xE5,0x8F,0x85), o3(0xE5,0x8F,0x8F),
+     o3(0xE5,0x8F,0x92), o3(0xE5,0x8F,0x93),
+     o3(0xE5,0x8F,0x95), o3(0xE5,0x8F,0x9A),
+     o3(0xE5,0x8F,0x9D), o3(0xE5,0x8F,0x9E),
+     o3(0xE5,0x8F,0xA0), o3(0xE5,0x8F,0xA6),
+     o3(0xE5,0x8F,0xA7), o3(0xE5,0x8F,0xB5),
+     o3(0xE5,0x90,0x82), o3(0xE5,0x90,0x93),
+     o3(0xE5,0x90,0x9A), o3(0xE5,0x90,0xA1),
+     o3(0xE5,0x90,0xA7), o3(0xE5,0x90,0xA8),
+     o3(0xE5,0x90,0xAA), o3(0xE5,0x90,0xAF),
+     o3(0xE5,0x90,0xB1), o3(0xE5,0x90,0xB4),
+     o3(0xE5,0x90,0xB5), o3(0xE5,0x91,0x83),
+     o3(0xE5,0x91,0x84), o3(0xE5,0x91,0x87),
+     o3(0xE5,0x91,0x8D), o3(0xE5,0x91,0x8F),
+     o3(0xE5,0x91,0x9E), o3(0xE5,0x91,0xA2),
+     o3(0xE5,0x91,0xA4), o3(0xE5,0x91,0xA6),
+     o3(0xE5,0x91,0xA7), o3(0xE5,0x91,0xA9),
+     o3(0xE5,0x91,0xAB), o3(0xE5,0x91,0xAD),
+     o3(0xE5,0x91,0xAE), o3(0xE5,0x91,0xB4),
+     o3(0xE5,0x91,0xBF),
+
+#define from_EUC_JP_8F_B4 WORDINDEX2INFO(844)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B4_infos,
+
+#define from_EUC_JP_8F_B5_infos WORDINDEX2INFO(846)
+                INVALID, o3(0xE5,0x92,0x81),
+     o3(0xE5,0x92,0x83), o3(0xE5,0x92,0x85),
+     o3(0xE5,0x92,0x88), o3(0xE5,0x92,0x89),
+     o3(0xE5,0x92,0x8D), o3(0xE5,0x92,0x91),
+     o3(0xE5,0x92,0x95), o3(0xE5,0x92,0x96),
+     o3(0xE5,0x92,0x9C), o3(0xE5,0x92,0x9F),
+     o3(0xE5,0x92,0xA1), o3(0xE5,0x92,0xA6),
+     o3(0xE5,0x92,0xA7), o3(0xE5,0x92,0xA9),
+     o3(0xE5,0x92,0xAA), o3(0xE5,0x92,0xAD),
+     o3(0xE5,0x92,0xAE), o3(0xE5,0x92,0xB1),
+     o3(0xE5,0x92,0xB7), o3(0xE5,0x92,0xB9),
+     o3(0xE5,0x92,0xBA), o3(0xE5,0x92,0xBB),
+     o3(0xE5,0x92,0xBF), o3(0xE5,0x93,0x86),
+     o3(0xE5,0x93,0x8A), o3(0xE5,0x93,0x8D),
+     o3(0xE5,0x93,0x8E), o3(0xE5,0x93,0xA0),
+     o3(0xE5,0x93,0xAA), o3(0xE5,0x93,0xAC),
+     o3(0xE5,0x93,0xAF), o3(0xE5,0x93,0xB6),
+     o3(0xE5,0x93,0xBC), o3(0xE5,0x93,0xBE),
+     o3(0xE5,0x93,0xBF), o3(0xE5,0x94,0x80),
+     o3(0xE5,0x94,0x81), o3(0xE5,0x94,0x85),
+     o3(0xE5,0x94,0x88), o3(0xE5,0x94,0x89),
+     o3(0xE5,0x94,0x8C), o3(0xE5,0x94,0x8D),
+     o3(0xE5,0x94,0x8E), o3(0xE5,0x94,0x95),
+     o3(0xE5,0x94,0xAA), o3(0xE5,0x94,0xAB),
+     o3(0xE5,0x94,0xB2), o3(0xE5,0x94,0xB5),
+     o3(0xE5,0x94,0xB6), o3(0xE5,0x94,0xBB),
+     o3(0xE5,0x94,0xBC), o3(0xE5,0x94,0xBD),
+     o3(0xE5,0x95,0x81), o3(0xE5,0x95,0x87),
+     o3(0xE5,0x95,0x89), o3(0xE5,0x95,0x8A),
+     o3(0xE5,0x95,0x8D), o3(0xE5,0x95,0x90),
+     o3(0xE5,0x95,0x91), o3(0xE5,0x95,0x98),
+     o3(0xE5,0x95,0x9A), o3(0xE5,0x95,0x9B),
+     o3(0xE5,0x95,0x9E), o3(0xE5,0x95,0xA0),
+     o3(0xE5,0x95,0xA1), o3(0xE5,0x95,0xA4),
+     o3(0xE5,0x95,0xA6), o3(0xE5,0x95,0xBF),
+     o3(0xE5,0x96,0x81), o3(0xE5,0x96,0x82),
+     o3(0xE5,0x96,0x86), o3(0xE5,0x96,0x88),
+     o3(0xE5,0x96,0x8E), o3(0xE5,0x96,0x8F),
+     o3(0xE5,0x96,0x91), o3(0xE5,0x96,0x92),
+     o3(0xE5,0x96,0x93), o3(0xE5,0x96,0x94),
+     o3(0xE5,0x96,0x97), o3(0xE5,0x96,0xA3),
+     o3(0xE5,0x96,0xA4), o3(0xE5,0x96,0xAD),
+     o3(0xE5,0x96,0xB2), o3(0xE5,0x96,0xBF),
+     o3(0xE5,0x97,0x81), o3(0xE5,0x97,0x83),
+     o3(0xE5,0x97,0x86), o3(0xE5,0x97,0x89),
+     o3(0xE5,0x97,0x8B), o3(0xE5,0x97,0x8C),
+     o3(0xE5,0x97,0x8E), o3(0xE5,0x97,0x91),
+     o3(0xE5,0x97,0x92),
+
+#define from_EUC_JP_8F_B5 WORDINDEX2INFO(941)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B5_infos,
+
+#define from_EUC_JP_8F_B6_infos WORDINDEX2INFO(943)
+                INVALID, o3(0xE5,0x97,0x93),
+     o3(0xE5,0x97,0x97), o3(0xE5,0x97,0x98),
+     o3(0xE5,0x97,0x9B), o3(0xE5,0x97,0x9E),
+     o3(0xE5,0x97,0xA2), o3(0xE5,0x97,0xA9),
+     o3(0xE5,0x97,0xB6), o3(0xE5,0x97,0xBF),
+     o3(0xE5,0x98,0x85), o3(0xE5,0x98,0x88),
+     o3(0xE5,0x98,0x8A), o3(0xE5,0x98,0x8D),
+     o3(0xE5,0x98,0x8E), o3(0xE5,0x98,0x8F),
+     o3(0xE5,0x98,0x90), o3(0xE5,0x98,0x91),
+     o3(0xE5,0x98,0x92), o3(0xE5,0x98,0x99),
+     o3(0xE5,0x98,0xAC), o3(0xE5,0x98,0xB0),
+     o3(0xE5,0x98,0xB3), o3(0xE5,0x98,0xB5),
+     o3(0xE5,0x98,0xB7), o3(0xE5,0x98,0xB9),
+     o3(0xE5,0x98,0xBB), o3(0xE5,0x98,0xBC),
+     o3(0xE5,0x98,0xBD), o3(0xE5,0x98,0xBF),
+     o3(0xE5,0x99,0x80), o3(0xE5,0x99,0x81),
+     o3(0xE5,0x99,0x83), o3(0xE5,0x99,0x84),
+     o3(0xE5,0x99,0x86), o3(0xE5,0x99,0x89),
+     o3(0xE5,0x99,0x8B), o3(0xE5,0x99,0x8D),
+     o3(0xE5,0x99,0x8F), o3(0xE5,0x99,0x94),
+     o3(0xE5,0x99,0x9E), o3(0xE5,0x99,0xA0),
+     o3(0xE5,0x99,0xA1), o3(0xE5,0x99,0xA2),
+     o3(0xE5,0x99,0xA3), o3(0xE5,0x99,0xA6),
+     o3(0xE5,0x99,0xA9), o3(0xE5,0x99,0xAD),
+     o3(0xE5,0x99,0xAF), o3(0xE5,0x99,0xB1),
+     o3(0xE5,0x99,0xB2), o3(0xE5,0x99,0xB5),
+     o3(0xE5,0x9A,0x84), o3(0xE5,0x9A,0x85),
+     o3(0xE5,0x9A,0x88), o3(0xE5,0x9A,0x8B),
+     o3(0xE5,0x9A,0x8C), o3(0xE5,0x9A,0x95),
+     o3(0xE5,0x9A,0x99), o3(0xE5,0x9A,0x9A),
+     o3(0xE5,0x9A,0x9D), o3(0xE5,0x9A,0x9E),
+     o3(0xE5,0x9A,0x9F), o3(0xE5,0x9A,0xA6),
+     o3(0xE5,0x9A,0xA7), o3(0xE5,0x9A,0xA8),
+     o3(0xE5,0x9A,0xA9), o3(0xE5,0x9A,0xAB),
+     o3(0xE5,0x9A,0xAC), o3(0xE5,0x9A,0xAD),
+     o3(0xE5,0x9A,0xB1), o3(0xE5,0x9A,0xB3),
+     o3(0xE5,0x9A,0xB7), o3(0xE5,0x9A,0xBE),
+     o3(0xE5,0x9B,0x85), o3(0xE5,0x9B,0x89),
+     o3(0xE5,0x9B,0x8A), o3(0xE5,0x9B,0x8B),
+     o3(0xE5,0x9B,0x8F), o3(0xE5,0x9B,0x90),
+     o3(0xE5,0x9B,0x8C), o3(0xE5,0x9B,0x8D),
+     o3(0xE5,0x9B,0x99), o3(0xE5,0x9B,0x9C),
+     o3(0xE5,0x9B,0x9D), o3(0xE5,0x9B,0x9F),
+     o3(0xE5,0x9B,0xA1), o3(0xE5,0x9B,0xA4),
+     o3(0xE5,0x9B,0xA5), o3(0xE5,0x9B,0xA6),
+     o3(0xE5,0x9B,0xA7), o3(0xE5,0x9B,0xA8),
+     o3(0xE5,0x9B,0xB1), o3(0xE5,0x9B,0xAB),
+     o3(0xE5,0x9B,0xAD),
+
+#define from_EUC_JP_8F_B6 WORDINDEX2INFO(1038)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B6_infos,
+
+#define from_EUC_JP_8F_B7_infos WORDINDEX2INFO(1040)
+                INVALID, o3(0xE5,0x9B,0xB6),
+     o3(0xE5,0x9B,0xB7), o3(0xE5,0x9C,0x81),
+     o3(0xE5,0x9C,0x82), o3(0xE5,0x9C,0x87),
+     o3(0xE5,0x9C,0x8A), o3(0xE5,0x9C,0x8C),
+     o3(0xE5,0x9C,0x91), o3(0xE5,0x9C,0x95),
+     o3(0xE5,0x9C,0x9A), o3(0xE5,0x9C,0x9B),
+     o3(0xE5,0x9C,0x9D), o3(0xE5,0x9C,0xA0),
+     o3(0xE5,0x9C,0xA2), o3(0xE5,0x9C,0xA3),
+     o3(0xE5,0x9C,0xA4), o3(0xE5,0x9C,0xA5),
+     o3(0xE5,0x9C,0xA9), o3(0xE5,0x9C,0xAA),
+     o3(0xE5,0x9C,0xAC), o3(0xE5,0x9C,0xAE),
+     o3(0xE5,0x9C,0xAF), o3(0xE5,0x9C,0xB3),
+     o3(0xE5,0x9C,0xB4), o3(0xE5,0x9C,0xBD),
+     o3(0xE5,0x9C,0xBE), o3(0xE5,0x9C,0xBF),
+     o3(0xE5,0x9D,0x85), o3(0xE5,0x9D,0x86),
+     o3(0xE5,0x9D,0x8C), o3(0xE5,0x9D,0x8D),
+     o3(0xE5,0x9D,0x92), o3(0xE5,0x9D,0xA2),
+     o3(0xE5,0x9D,0xA5), o3(0xE5,0x9D,0xA7),
+     o3(0xE5,0x9D,0xA8), o3(0xE5,0x9D,0xAB),
+     o3(0xE5,0x9D,0xAD), o3(0xE5,0x9D,0xAE),
+     o3(0xE5,0x9D,0xAF), o3(0xE5,0x9D,0xB0),
+     o3(0xE5,0x9D,0xB1), o3(0xE5,0x9D,0xB3),
+     o3(0xE5,0x9D,0xB4), o3(0xE5,0x9D,0xB5),
+     o3(0xE5,0x9D,0xB7), o3(0xE5,0x9D,0xB9),
+     o3(0xE5,0x9D,0xBA), o3(0xE5,0x9D,0xBB),
+     o3(0xE5,0x9D,0xBC), o3(0xE5,0x9D,0xBE),
+     o3(0xE5,0x9E,0x81), o3(0xE5,0x9E,0x83),
+     o3(0xE5,0x9E,0x8C), o3(0xE5,0x9E,0x94),
+     o3(0xE5,0x9E,0x97), o3(0xE5,0x9E,0x99),
+     o3(0xE5,0x9E,0x9A), o3(0xE5,0x9E,0x9C),
+     o3(0xE5,0x9E,0x9D), o3(0xE5,0x9E,0x9E),
+     o3(0xE5,0x9E,0x9F), o3(0xE5,0x9E,0xA1),
+     o3(0xE5,0x9E,0x95), o3(0xE5,0x9E,0xA7),
+     o3(0xE5,0x9E,0xA8), o3(0xE5,0x9E,0xA9),
+     o3(0xE5,0x9E,0xAC), o3(0xE5,0x9E,0xB8),
+     o3(0xE5,0x9E,0xBD), o3(0xE5,0x9F,0x87),
+     o3(0xE5,0x9F,0x88), o3(0xE5,0x9F,0x8C),
+     o3(0xE5,0x9F,0x8F), o3(0xE5,0x9F,0x95),
+     o3(0xE5,0x9F,0x9D), o3(0xE5,0x9F,0x9E),
+     o3(0xE5,0x9F,0xA4), o3(0xE5,0x9F,0xA6),
+     o3(0xE5,0x9F,0xA7), o3(0xE5,0x9F,0xA9),
+     o3(0xE5,0x9F,0xAD), o3(0xE5,0x9F,0xB0),
+     o3(0xE5,0x9F,0xB5), o3(0xE5,0x9F,0xB6),
+     o3(0xE5,0x9F,0xB8), o3(0xE5,0x9F,0xBD),
+     o3(0xE5,0x9F,0xBE), o3(0xE5,0x9F,0xBF),
+     o3(0xE5,0xA0,0x83), o3(0xE5,0xA0,0x84),
+     o3(0xE5,0xA0,0x88), o3(0xE5,0xA0,0x89),
+     o3(0xE5,0x9F,0xA1),
+
+#define from_EUC_JP_8F_B7 WORDINDEX2INFO(1135)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B7_infos,
+
+#define from_EUC_JP_8F_B8_infos WORDINDEX2INFO(1137)
+                INVALID, o3(0xE5,0xA0,0x8C),
+     o3(0xE5,0xA0,0x8D), o3(0xE5,0xA0,0x9B),
+     o3(0xE5,0xA0,0x9E), o3(0xE5,0xA0,0x9F),
+     o3(0xE5,0xA0,0xA0), o3(0xE5,0xA0,0xA6),
+     o3(0xE5,0xA0,0xA7), o3(0xE5,0xA0,0xAD),
+     o3(0xE5,0xA0,0xB2), o3(0xE5,0xA0,0xB9),
+     o3(0xE5,0xA0,0xBF), o3(0xE5,0xA1,0x89),
+     o3(0xE5,0xA1,0x8C), o3(0xE5,0xA1,0x8D),
+     o3(0xE5,0xA1,0x8F), o3(0xE5,0xA1,0x90),
+     o3(0xE5,0xA1,0x95), o3(0xE5,0xA1,0x9F),
+     o3(0xE5,0xA1,0xA1), o3(0xE5,0xA1,0xA4),
+     o3(0xE5,0xA1,0xA7), o3(0xE5,0xA1,0xA8),
+     o3(0xE5,0xA1,0xB8), o3(0xE5,0xA1,0xBC),
+     o3(0xE5,0xA1,0xBF), o3(0xE5,0xA2,0x80),
+     o3(0xE5,0xA2,0x81), o3(0xE5,0xA2,0x87),
+     o3(0xE5,0xA2,0x88), o3(0xE5,0xA2,0x89),
+     o3(0xE5,0xA2,0x8A), o3(0xE5,0xA2,0x8C),
+     o3(0xE5,0xA2,0x8D), o3(0xE5,0xA2,0x8F),
+     o3(0xE5,0xA2,0x90), o3(0xE5,0xA2,0x94),
+     o3(0xE5,0xA2,0x96), o3(0xE5,0xA2,0x9D),
+     o3(0xE5,0xA2,0xA0), o3(0xE5,0xA2,0xA1),
+     o3(0xE5,0xA2,0xA2), o3(0xE5,0xA2,0xA6),
+     o3(0xE5,0xA2,0xA9), o3(0xE5,0xA2,0xB1),
+     o3(0xE5,0xA2,0xB2), o3(0xE5,0xA3,0x84),
+     o3(0xE5,0xA2,0xBC), o3(0xE5,0xA3,0x82),
+     o3(0xE5,0xA3,0x88), o3(0xE5,0xA3,0x8D),
+     o3(0xE5,0xA3,0x8E), o3(0xE5,0xA3,0x90),
+     o3(0xE5,0xA3,0x92), o3(0xE5,0xA3,0x94),
+     o3(0xE5,0xA3,0x96), o3(0xE5,0xA3,0x9A),
+     o3(0xE5,0xA3,0x9D), o3(0xE5,0xA3,0xA1),
+     o3(0xE5,0xA3,0xA2), o3(0xE5,0xA3,0xA9),
+     o3(0xE5,0xA3,0xB3), o3(0xE5,0xA4,0x85),
+     o3(0xE5,0xA4,0x86), o3(0xE5,0xA4,0x8B),
+     o3(0xE5,0xA4,0x8C), o3(0xE5,0xA4,0x92),
+     o3(0xE5,0xA4,0x93), o3(0xE5,0xA4,0x94),
+     o3(0xE8,0x99,0x81), o3(0xE5,0xA4,0x9D),
+     o3(0xE5,0xA4,0xA1), o3(0xE5,0xA4,0xA3),
+     o3(0xE5,0xA4,0xA4), o3(0xE5,0xA4,0xA8),
+     o3(0xE5,0xA4,0xAF), o3(0xE5,0xA4,0xB0),
+     o3(0xE5,0xA4,0xB3), o3(0xE5,0xA4,0xB5),
+     o3(0xE5,0xA4,0xB6), o3(0xE5,0xA4,0xBF),
+     o3(0xE5,0xA5,0x83), o3(0xE5,0xA5,0x86),
+     o3(0xE5,0xA5,0x92), o3(0xE5,0xA5,0x93),
+     o3(0xE5,0xA5,0x99), o3(0xE5,0xA5,0x9B),
+     o3(0xE5,0xA5,0x9D), o3(0xE5,0xA5,0x9E),
+     o3(0xE5,0xA5,0x9F), o3(0xE5,0xA5,0xA1),
+     o3(0xE5,0xA5,0xA3), o3(0xE5,0xA5,0xAB),
+     o3(0xE5,0xA5,0xAD),
+
+#define from_EUC_JP_8F_B8 WORDINDEX2INFO(1232)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B8_infos,
+
+#define from_EUC_JP_8F_B9_infos WORDINDEX2INFO(1234)
+                INVALID, o3(0xE5,0xA5,0xAF),
+     o3(0xE5,0xA5,0xB2), o3(0xE5,0xA5,0xB5),
+     o3(0xE5,0xA5,0xB6), o3(0xE5,0xA5,0xB9),
+     o3(0xE5,0xA5,0xBB), o3(0xE5,0xA5,0xBC),
+     o3(0xE5,0xA6,0x8B), o3(0xE5,0xA6,0x8C),
+     o3(0xE5,0xA6,0x8E), o3(0xE5,0xA6,0x92),
+     o3(0xE5,0xA6,0x95), o3(0xE5,0xA6,0x97),
+     o3(0xE5,0xA6,0x9F), o3(0xE5,0xA6,0xA4),
+     o3(0xE5,0xA6,0xA7), o3(0xE5,0xA6,0xAD),
+     o3(0xE5,0xA6,0xAE), o3(0xE5,0xA6,0xAF),
+     o3(0xE5,0xA6,0xB0), o3(0xE5,0xA6,0xB3),
+     o3(0xE5,0xA6,0xB7), o3(0xE5,0xA6,0xBA),
+     o3(0xE5,0xA6,0xBC), o3(0xE5,0xA7,0x81),
+     o3(0xE5,0xA7,0x83), o3(0xE5,0xA7,0x84),
+     o3(0xE5,0xA7,0x88), o3(0xE5,0xA7,0x8A),
+     o3(0xE5,0xA7,0x8D), o3(0xE5,0xA7,0x92),
+     o3(0xE5,0xA7,0x9D), o3(0xE5,0xA7,0x9E),
+     o3(0xE5,0xA7,0x9F), o3(0xE5,0xA7,0xA3),
+     o3(0xE5,0xA7,0xA4), o3(0xE5,0xA7,0xA7),
+     o3(0xE5,0xA7,0xAE), o3(0xE5,0xA7,0xAF),
+     o3(0xE5,0xA7,0xB1), o3(0xE5,0xA7,0xB2),
+     o3(0xE5,0xA7,0xB4), o3(0xE5,0xA7,0xB7),
+     o3(0xE5,0xA8,0x80), o3(0xE5,0xA8,0x84),
+     o3(0xE5,0xA8,0x8C), o3(0xE5,0xA8,0x8D),
+     o3(0xE5,0xA8,0x8E), o3(0xE5,0xA8,0x92),
+     o3(0xE5,0xA8,0x93), o3(0xE5,0xA8,0x9E),
+     o3(0xE5,0xA8,0xA3), o3(0xE5,0xA8,0xA4),
+     o3(0xE5,0xA8,0xA7), o3(0xE5,0xA8,0xA8),
+     o3(0xE5,0xA8,0xAA), o3(0xE5,0xA8,0xAD),
+     o3(0xE5,0xA8,0xB0), o3(0xE5,0xA9,0x84),
+     o3(0xE5,0xA9,0x85), o3(0xE5,0xA9,0x87),
+     o3(0xE5,0xA9,0x88), o3(0xE5,0xA9,0x8C),
+     o3(0xE5,0xA9,0x90), o3(0xE5,0xA9,0x95),
+     o3(0xE5,0xA9,0x9E), o3(0xE5,0xA9,0xA3),
+     o3(0xE5,0xA9,0xA5), o3(0xE5,0xA9,0xA7),
+     o3(0xE5,0xA9,0xAD), o3(0xE5,0xA9,0xB7),
+     o3(0xE5,0xA9,0xBA), o3(0xE5,0xA9,0xBB),
+     o3(0xE5,0xA9,0xBE), o3(0xE5,0xAA,0x8B),
+     o3(0xE5,0xAA,0x90), o3(0xE5,0xAA,0x93),
+     o3(0xE5,0xAA,0x96), o3(0xE5,0xAA,0x99),
+     o3(0xE5,0xAA,0x9C), o3(0xE5,0xAA,0x9E),
+     o3(0xE5,0xAA,0x9F), o3(0xE5,0xAA,0xA0),
+     o3(0xE5,0xAA,0xA2), o3(0xE5,0xAA,0xA7),
+     o3(0xE5,0xAA,0xAC), o3(0xE5,0xAA,0xB1),
+     o3(0xE5,0xAA,0xB2), o3(0xE5,0xAA,0xB3),
+     o3(0xE5,0xAA,0xB5), o3(0xE5,0xAA,0xB8),
+     o3(0xE5,0xAA,0xBA), o3(0xE5,0xAA,0xBB),
+     o3(0xE5,0xAA,0xBF),
+
+#define from_EUC_JP_8F_B9 WORDINDEX2INFO(1329)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_B9_infos,
+
+#define from_EUC_JP_8F_BA_infos WORDINDEX2INFO(1331)
+                INVALID, o3(0xE5,0xAB,0x84),
+     o3(0xE5,0xAB,0x86), o3(0xE5,0xAB,0x88),
+     o3(0xE5,0xAB,0x8F), o3(0xE5,0xAB,0x9A),
+     o3(0xE5,0xAB,0x9C), o3(0xE5,0xAB,0xA0),
+     o3(0xE5,0xAB,0xA5), o3(0xE5,0xAB,0xAA),
+     o3(0xE5,0xAB,0xAE), o3(0xE5,0xAB,0xB5),
+     o3(0xE5,0xAB,0xB6), o3(0xE5,0xAB,0xBD),
+     o3(0xE5,0xAC,0x80), o3(0xE5,0xAC,0x81),
+     o3(0xE5,0xAC,0x88), o3(0xE5,0xAC,0x97),
+     o3(0xE5,0xAC,0xB4), o3(0xE5,0xAC,0x99),
+     o3(0xE5,0xAC,0x9B), o3(0xE5,0xAC,0x9D),
+     o3(0xE5,0xAC,0xA1), o3(0xE5,0xAC,0xA5),
+     o3(0xE5,0xAC,0xAD), o3(0xE5,0xAC,0xB8),
+     o3(0xE5,0xAD,0x81), o3(0xE5,0xAD,0x8B),
+     o3(0xE5,0xAD,0x8C), o3(0xE5,0xAD,0x92),
+     o3(0xE5,0xAD,0x96), o3(0xE5,0xAD,0x9E),
+     o3(0xE5,0xAD,0xA8), o3(0xE5,0xAD,0xAE),
+     o3(0xE5,0xAD,0xAF), o3(0xE5,0xAD,0xBC),
+     o3(0xE5,0xAD,0xBD), o3(0xE5,0xAD,0xBE),
+     o3(0xE5,0xAD,0xBF), o3(0xE5,0xAE,0x81),
+     o3(0xE5,0xAE,0x84), o3(0xE5,0xAE,0x86),
+     o3(0xE5,0xAE,0x8A), o3(0xE5,0xAE,0x8E),
+     o3(0xE5,0xAE,0x90), o3(0xE5,0xAE,0x91),
+     o3(0xE5,0xAE,0x93), o3(0xE5,0xAE,0x94),
+     o3(0xE5,0xAE,0x96), o3(0xE5,0xAE,0xA8),
+     o3(0xE5,0xAE,0xA9), o3(0xE5,0xAE,0xAC),
+     o3(0xE5,0xAE,0xAD), o3(0xE5,0xAE,0xAF),
+     o3(0xE5,0xAE,0xB1), o3(0xE5,0xAE,0xB2),
+     o3(0xE5,0xAE,0xB7), o3(0xE5,0xAE,0xBA),
+     o3(0xE5,0xAE,0xBC), o3(0xE5,0xAF,0x80),
+     o3(0xE5,0xAF,0x81), o3(0xE5,0xAF,0x8D),
+     o3(0xE5,0xAF,0x8F), o3(0xE5,0xAF,0x96),
+     o3(0xE5,0xAF,0x97), o3(0xE5,0xAF,0x98),
+     o3(0xE5,0xAF,0x99), o3(0xE5,0xAF,0x9A),
+     o3(0xE5,0xAF,0xA0), o3(0xE5,0xAF,0xAF),
+     o3(0xE5,0xAF,0xB1), o3(0xE5,0xAF,0xB4),
+     o3(0xE5,0xAF,0xBD), o3(0xE5,0xB0,0x8C),
+     o3(0xE5,0xB0,0x97), o3(0xE5,0xB0,0x9E),
+     o3(0xE5,0xB0,0x9F), o3(0xE5,0xB0,0xA3),
+     o3(0xE5,0xB0,0xA6), o3(0xE5,0xB0,0xA9),
+     o3(0xE5,0xB0,0xAB), o3(0xE5,0xB0,0xAC),
+     o3(0xE5,0xB0,0xAE), o3(0xE5,0xB0,0xB0),
+     o3(0xE5,0xB0,0xB2), o3(0xE5,0xB0,0xB5),
+     o3(0xE5,0xB0,0xB6), o3(0xE5,0xB1,0x99),
+     o3(0xE5,0xB1,0x9A), o3(0xE5,0xB1,0x9C),
+     o3(0xE5,0xB1,0xA2), o3(0xE5,0xB1,0xA3),
+     o3(0xE5,0xB1,0xA7), o3(0xE5,0xB1,0xA8),
+     o3(0xE5,0xB1,0xA9),
+
+#define from_EUC_JP_8F_BA WORDINDEX2INFO(1426)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BA_infos,
+
+#define from_EUC_JP_8F_BB_infos WORDINDEX2INFO(1428)
+                INVALID, o3(0xE5,0xB1,0xAD),
+     o3(0xE5,0xB1,0xB0), o3(0xE5,0xB1,0xB4),
+     o3(0xE5,0xB1,0xB5), o3(0xE5,0xB1,0xBA),
+     o3(0xE5,0xB1,0xBB), o3(0xE5,0xB1,0xBC),
+     o3(0xE5,0xB1,0xBD), o3(0xE5,0xB2,0x87),
+     o3(0xE5,0xB2,0x88), o3(0xE5,0xB2,0x8A),
+     o3(0xE5,0xB2,0x8F), o3(0xE5,0xB2,0x92),
+     o3(0xE5,0xB2,0x9D), o3(0xE5,0xB2,0x9F),
+     o3(0xE5,0xB2,0xA0), o3(0xE5,0xB2,0xA2),
+     o3(0xE5,0xB2,0xA3), o3(0xE5,0xB2,0xA6),
+     o3(0xE5,0xB2,0xAA), o3(0xE5,0xB2,0xB2),
+     o3(0xE5,0xB2,0xB4), o3(0xE5,0xB2,0xB5),
+     o3(0xE5,0xB2,0xBA), o3(0xE5,0xB3,0x89),
+     o3(0xE5,0xB3,0x8B), o3(0xE5,0xB3,0x92),
+     o3(0xE5,0xB3,0x9D), o3(0xE5,0xB3,0x97),
+     o3(0xE5,0xB3,0xAE), o3(0xE5,0xB3,0xB1),
+     o3(0xE5,0xB3,0xB2), o3(0xE5,0xB3,0xB4),
+     o3(0xE5,0xB4,0x81), o3(0xE5,0xB4,0x86),
+     o3(0xE5,0xB4,0x8D), o3(0xE5,0xB4,0x92),
+     o3(0xE5,0xB4,0xAB), o3(0xE5,0xB4,0xA3),
+     o3(0xE5,0xB4,0xA4), o3(0xE5,0xB4,0xA6),
+     o3(0xE5,0xB4,0xA7), o3(0xE5,0xB4,0xB1),
+     o3(0xE5,0xB4,0xB4), o3(0xE5,0xB4,0xB9),
+     o3(0xE5,0xB4,0xBD), o3(0xE5,0xB4,0xBF),
+     o3(0xE5,0xB5,0x82), o3(0xE5,0xB5,0x83),
+     o3(0xE5,0xB5,0x86), o3(0xE5,0xB5,0x88),
+     o3(0xE5,0xB5,0x95), o3(0xE5,0xB5,0x91),
+     o3(0xE5,0xB5,0x99), o3(0xE5,0xB5,0x8A),
+     o3(0xE5,0xB5,0x9F), o3(0xE5,0xB5,0xA0),
+     o3(0xE5,0xB5,0xA1), o3(0xE5,0xB5,0xA2),
+     o3(0xE5,0xB5,0xA4), o3(0xE5,0xB5,0xAA),
+     o3(0xE5,0xB5,0xAD), o3(0xE5,0xB5,0xB0),
+     o3(0xE5,0xB5,0xB9), o3(0xE5,0xB5,0xBA),
+     o3(0xE5,0xB5,0xBE), o3(0xE5,0xB5,0xBF),
+     o3(0xE5,0xB6,0x81), o3(0xE5,0xB6,0x83),
+     o3(0xE5,0xB6,0x88), o3(0xE5,0xB6,0x8A),
+     o3(0xE5,0xB6,0x92), o3(0xE5,0xB6,0x93),
+     o3(0xE5,0xB6,0x94), o3(0xE5,0xB6,0x95),
+     o3(0xE5,0xB6,0x99), o3(0xE5,0xB6,0x9B),
+     o3(0xE5,0xB6,0x9F), o3(0xE5,0xB6,0xA0),
+     o3(0xE5,0xB6,0xA7), o3(0xE5,0xB6,0xAB),
+     o3(0xE5,0xB6,0xB0), o3(0xE5,0xB6,0xB4),
+     o3(0xE5,0xB6,0xB8), o3(0xE5,0xB6,0xB9),
+     o3(0xE5,0xB7,0x83), o3(0xE5,0xB7,0x87),
+     o3(0xE5,0xB7,0x8B), o3(0xE5,0xB7,0x90),
+     o3(0xE5,0xB7,0x8E), o3(0xE5,0xB7,0x98),
+     o3(0xE5,0xB7,0x99), o3(0xE5,0xB7,0xA0),
+     o3(0xE5,0xB7,0xA4),
+
+#define from_EUC_JP_8F_BB WORDINDEX2INFO(1523)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BB_infos,
+
+#define from_EUC_JP_8F_BC_infos WORDINDEX2INFO(1525)
+                INVALID, o3(0xE5,0xB7,0xA9),
+     o3(0xE5,0xB7,0xB8), o3(0xE5,0xB7,0xB9),
+     o3(0xE5,0xB8,0x80), o3(0xE5,0xB8,0x87),
+     o3(0xE5,0xB8,0x8D), o3(0xE5,0xB8,0x92),
+     o3(0xE5,0xB8,0x94), o3(0xE5,0xB8,0x95),
+     o3(0xE5,0xB8,0x98), o3(0xE5,0xB8,0x9F),
+     o3(0xE5,0xB8,0xA0), o3(0xE5,0xB8,0xAE),
+     o3(0xE5,0xB8,0xA8), o3(0xE5,0xB8,0xB2),
+     o3(0xE5,0xB8,0xB5), o3(0xE5,0xB8,0xBE),
+     o3(0xE5,0xB9,0x8B), o3(0xE5,0xB9,0x90),
+     o3(0xE5,0xB9,0x89), o3(0xE5,0xB9,0x91),
+     o3(0xE5,0xB9,0x96), o3(0xE5,0xB9,0x98),
+     o3(0xE5,0xB9,0x9B), o3(0xE5,0xB9,0x9C),
+     o3(0xE5,0xB9,0x9E), o3(0xE5,0xB9,0xA8),
+     o3(0xE5,0xB9,0xAA), o3(0xE5,0xB9,0xAB),
+     o3(0xE5,0xB9,0xAC), o3(0xE5,0xB9,0xAD),
+     o3(0xE5,0xB9,0xAE), o3(0xE5,0xB9,0xB0),
+     o3(0xE5,0xBA,0x80), o3(0xE5,0xBA,0x8B),
+     o3(0xE5,0xBA,0x8E), o3(0xE5,0xBA,0xA2),
+     o3(0xE5,0xBA,0xA4), o3(0xE5,0xBA,0xA5),
+     o3(0xE5,0xBA,0xA8), o3(0xE5,0xBA,0xAA),
+     o3(0xE5,0xBA,0xAC), o3(0xE5,0xBA,0xB1),
+     o3(0xE5,0xBA,0xB3), o3(0xE5,0xBA,0xBD),
+     o3(0xE5,0xBA,0xBE), o3(0xE5,0xBA,0xBF),
+     o3(0xE5,0xBB,0x86), o3(0xE5,0xBB,0x8C),
+     o3(0xE5,0xBB,0x8B), o3(0xE5,0xBB,0x8E),
+     o3(0xE5,0xBB,0x91), o3(0xE5,0xBB,0x92),
+     o3(0xE5,0xBB,0x94), o3(0xE5,0xBB,0x95),
+     o3(0xE5,0xBB,0x9C), o3(0xE5,0xBB,0x9E),
+     o3(0xE5,0xBB,0xA5), o3(0xE5,0xBB,0xAB),
+     o3(0xE5,0xBC,0x82), o3(0xE5,0xBC,0x86),
+     o3(0xE5,0xBC,0x87), o3(0xE5,0xBC,0x88),
+     o3(0xE5,0xBC,0x8E), o3(0xE5,0xBC,0x99),
+     o3(0xE5,0xBC,0x9C), o3(0xE5,0xBC,0x9D),
+     o3(0xE5,0xBC,0xA1), o3(0xE5,0xBC,0xA2),
+     o3(0xE5,0xBC,0xA3), o3(0xE5,0xBC,0xA4),
+     o3(0xE5,0xBC,0xA8), o3(0xE5,0xBC,0xAB),
+     o3(0xE5,0xBC,0xAC), o3(0xE5,0xBC,0xAE),
+     o3(0xE5,0xBC,0xB0), o3(0xE5,0xBC,0xB4),
+     o3(0xE5,0xBC,0xB6), o3(0xE5,0xBC,0xBB),
+     o3(0xE5,0xBC,0xBD), o3(0xE5,0xBC,0xBF),
+     o3(0xE5,0xBD,0x80), o3(0xE5,0xBD,0x84),
+     o3(0xE5,0xBD,0x85), o3(0xE5,0xBD,0x87),
+     o3(0xE5,0xBD,0x8D), o3(0xE5,0xBD,0x90),
+     o3(0xE5,0xBD,0x94), o3(0xE5,0xBD,0x98),
+     o3(0xE5,0xBD,0x9B), o3(0xE5,0xBD,0xA0),
+     o3(0xE5,0xBD,0xA3), o3(0xE5,0xBD,0xA4),
+     o3(0xE5,0xBD,0xA7),
+
+#define from_EUC_JP_8F_BC WORDINDEX2INFO(1620)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BC_infos,
+
+#define from_EUC_JP_8F_BD_infos WORDINDEX2INFO(1622)
+                INVALID, o3(0xE5,0xBD,0xAF),
+     o3(0xE5,0xBD,0xB2), o3(0xE5,0xBD,0xB4),
+     o3(0xE5,0xBD,0xB5), o3(0xE5,0xBD,0xB8),
+     o3(0xE5,0xBD,0xBA), o3(0xE5,0xBD,0xBD),
+     o3(0xE5,0xBD,0xBE), o3(0xE5,0xBE,0x89),
+     o3(0xE5,0xBE,0x8D), o3(0xE5,0xBE,0x8F),
+     o3(0xE5,0xBE,0x96), o3(0xE5,0xBE,0x9C),
+     o3(0xE5,0xBE,0x9D), o3(0xE5,0xBE,0xA2),
+     o3(0xE5,0xBE,0xA7), o3(0xE5,0xBE,0xAB),
+     o3(0xE5,0xBE,0xA4), o3(0xE5,0xBE,0xAC),
+     o3(0xE5,0xBE,0xAF), o3(0xE5,0xBE,0xB0),
+     o3(0xE5,0xBE,0xB1), o3(0xE5,0xBE,0xB8),
+     o3(0xE5,0xBF,0x84), o3(0xE5,0xBF,0x87),
+     o3(0xE5,0xBF,0x88), o3(0xE5,0xBF,0x89),
+     o3(0xE5,0xBF,0x8B), o3(0xE5,0xBF,0x90),
+     o3(0xE5,0xBF,0x91), o3(0xE5,0xBF,0x92),
+     o3(0xE5,0xBF,0x93), o3(0xE5,0xBF,0x94),
+     o3(0xE5,0xBF,0x9E), o3(0xE5,0xBF,0xA1),
+     o3(0xE5,0xBF,0xA2), o3(0xE5,0xBF,0xA8),
+     o3(0xE5,0xBF,0xA9), o3(0xE5,0xBF,0xAA),
+     o3(0xE5,0xBF,0xAC), o3(0xE5,0xBF,0xAD),
+     o3(0xE5,0xBF,0xAE), o3(0xE5,0xBF,0xAF),
+     o3(0xE5,0xBF,0xB2), o3(0xE5,0xBF,0xB3),
+     o3(0xE5,0xBF,0xB6), o3(0xE5,0xBF,0xBA),
+     o3(0xE5,0xBF,0xBC), o3(0xE6,0x80,0x87),
+     o3(0xE6,0x80,0x8A), o3(0xE6,0x80,0x8D),
+     o3(0xE6,0x80,0x93), o3(0xE6,0x80,0x94),
+     o3(0xE6,0x80,0x97), o3(0xE6,0x80,0x98),
+     o3(0xE6,0x80,0x9A), o3(0xE6,0x80,0x9F),
+     o3(0xE6,0x80,0xA4), o3(0xE6,0x80,0xAD),
+     o3(0xE6,0x80,0xB3), o3(0xE6,0x80,0xB5),
+     o3(0xE6,0x81,0x80), o3(0xE6,0x81,0x87),
+     o3(0xE6,0x81,0x88), o3(0xE6,0x81,0x89),
+     o3(0xE6,0x81,0x8C), o3(0xE6,0x81,0x91),
+     o3(0xE6,0x81,0x94), o3(0xE6,0x81,0x96),
+     o3(0xE6,0x81,0x97), o3(0xE6,0x81,0x9D),
+     o3(0xE6,0x81,0xA1), o3(0xE6,0x81,0xA7),
+     o3(0xE6,0x81,0xB1), o3(0xE6,0x81,0xBE),
+     o3(0xE6,0x81,0xBF), o3(0xE6,0x82,0x82),
+     o3(0xE6,0x82,0x86), o3(0xE6,0x82,0x88),
+     o3(0xE6,0x82,0x8A), o3(0xE6,0x82,0x8E),
+     o3(0xE6,0x82,0x91), o3(0xE6,0x82,0x93),
+     o3(0xE6,0x82,0x95), o3(0xE6,0x82,0x98),
+     o3(0xE6,0x82,0x9D), o3(0xE6,0x82,0x9E),
+     o3(0xE6,0x82,0xA2), o3(0xE6,0x82,0xA4),
+     o3(0xE6,0x82,0xA5), o3(0xE6,0x82,0xA8),
+     o3(0xE6,0x82,0xB0), o3(0xE6,0x82,0xB1),
+     o3(0xE6,0x82,0xB7),
+
+#define from_EUC_JP_8F_BD WORDINDEX2INFO(1717)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BD_infos,
+
+#define from_EUC_JP_8F_BE_infos WORDINDEX2INFO(1719)
+                INVALID, o3(0xE6,0x82,0xBB),
+     o3(0xE6,0x82,0xBE), o3(0xE6,0x83,0x82),
+     o3(0xE6,0x83,0x84), o3(0xE6,0x83,0x88),
+     o3(0xE6,0x83,0x89), o3(0xE6,0x83,0x8A),
+     o3(0xE6,0x83,0x8B), o3(0xE6,0x83,0x8E),
+     o3(0xE6,0x83,0x8F), o3(0xE6,0x83,0x94),
+     o3(0xE6,0x83,0x95), o3(0xE6,0x83,0x99),
+     o3(0xE6,0x83,0x9B), o3(0xE6,0x83,0x9D),
+     o3(0xE6,0x83,0x9E), o3(0xE6,0x83,0xA2),
+     o3(0xE6,0x83,0xA5), o3(0xE6,0x83,0xB2),
+     o3(0xE6,0x83,0xB5), o3(0xE6,0x83,0xB8),
+     o3(0xE6,0x83,0xBC), o3(0xE6,0x83,0xBD),
+     o3(0xE6,0x84,0x82), o3(0xE6,0x84,0x87),
+     o3(0xE6,0x84,0x8A), o3(0xE6,0x84,0x8C),
+     o3(0xE6,0x84,0x90), o3(0xE6,0x84,0x91),
+     o3(0xE6,0x84,0x92), o3(0xE6,0x84,0x93),
+     o3(0xE6,0x84,0x94), o3(0xE6,0x84,0x96),
+     o3(0xE6,0x84,0x97), o3(0xE6,0x84,0x99),
+     o3(0xE6,0x84,0x9C), o3(0xE6,0x84,0x9E),
+     o3(0xE6,0x84,0xA2), o3(0xE6,0x84,0xAA),
+     o3(0xE6,0x84,0xAB), o3(0xE6,0x84,0xB0),
+     o3(0xE6,0x84,0xB1), o3(0xE6,0x84,0xB5),
+     o3(0xE6,0x84,0xB6), o3(0xE6,0x84,0xB7),
+     o3(0xE6,0x84,0xB9), o3(0xE6,0x85,0x81),
+     o3(0xE6,0x85,0x85), o3(0xE6,0x85,0x86),
+     o3(0xE6,0x85,0x89), o3(0xE6,0x85,0x9E),
+     o3(0xE6,0x85,0xA0), o3(0xE6,0x85,0xAC),
+     o3(0xE6,0x85,0xB2), o3(0xE6,0x85,0xB8),
+     o3(0xE6,0x85,0xBB), o3(0xE6,0x85,0xBC),
+     o3(0xE6,0x85,0xBF), o3(0xE6,0x86,0x80),
+     o3(0xE6,0x86,0x81), o3(0xE6,0x86,0x83),
+     o3(0xE6,0x86,0x84), o3(0xE6,0x86,0x8B),
+     o3(0xE6,0x86,0x8D), o3(0xE6,0x86,0x92),
+     o3(0xE6,0x86,0x93), o3(0xE6,0x86,0x97),
+     o3(0xE6,0x86,0x98), o3(0xE6,0x86,0x9C),
+     o3(0xE6,0x86,0x9D), o3(0xE6,0x86,0x9F),
+     o3(0xE6,0x86,0xA0), o3(0xE6,0x86,0xA5),
+     o3(0xE6,0x86,0xA8), o3(0xE6,0x86,0xAA),
+     o3(0xE6,0x86,0xAD), o3(0xE6,0x86,0xB8),
+     o3(0xE6,0x86,0xB9), o3(0xE6,0x86,0xBC),
+     o3(0xE6,0x87,0x80), o3(0xE6,0x87,0x81),
+     o3(0xE6,0x87,0x82), o3(0xE6,0x87,0x8E),
+     o3(0xE6,0x87,0x8F), o3(0xE6,0x87,0x95),
+     o3(0xE6,0x87,0x9C), o3(0xE6,0x87,0x9D),
+     o3(0xE6,0x87,0x9E), o3(0xE6,0x87,0x9F),
+     o3(0xE6,0x87,0xA1), o3(0xE6,0x87,0xA2),
+     o3(0xE6,0x87,0xA7), o3(0xE6,0x87,0xA9),
+     o3(0xE6,0x87,0xA5),
+
+#define from_EUC_JP_8F_BE WORDINDEX2INFO(1814)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BE_infos,
+
+#define from_EUC_JP_8F_BF_infos WORDINDEX2INFO(1816)
+                INVALID, o3(0xE6,0x87,0xAC),
+     o3(0xE6,0x87,0xAD), o3(0xE6,0x87,0xAF),
+     o3(0xE6,0x88,0x81), o3(0xE6,0x88,0x83),
+     o3(0xE6,0x88,0x84), o3(0xE6,0x88,0x87),
+     o3(0xE6,0x88,0x93), o3(0xE6,0x88,0x95),
+     o3(0xE6,0x88,0x9C), o3(0xE6,0x88,0xA0),
+     o3(0xE6,0x88,0xA2), o3(0xE6,0x88,0xA3),
+     o3(0xE6,0x88,0xA7), o3(0xE6,0x88,0xA9),
+     o3(0xE6,0x88,0xAB), o3(0xE6,0x88,0xB9),
+     o3(0xE6,0x88,0xBD), o3(0xE6,0x89,0x82),
+     o3(0xE6,0x89,0x83), o3(0xE6,0x89,0x84),
+     o3(0xE6,0x89,0x86), o3(0xE6,0x89,0x8C),
+     o3(0xE6,0x89,0x90), o3(0xE6,0x89,0x91),
+     o3(0xE6,0x89,0x92), o3(0xE6,0x89,0x94),
+     o3(0xE6,0x89,0x96), o3(0xE6,0x89,0x9A),
+     o3(0xE6,0x89,0x9C), o3(0xE6,0x89,0xA4),
+     o3(0xE6,0x89,0xAD), o3(0xE6,0x89,0xAF),
+     o3(0xE6,0x89,0xB3), o3(0xE6,0x89,0xBA),
+     o3(0xE6,0x89,0xBD), o3(0xE6,0x8A,0x8D),
+     o3(0xE6,0x8A,0x8E), o3(0xE6,0x8A,0x8F),
+     o3(0xE6,0x8A,0x90), o3(0xE6,0x8A,0xA6),
+     o3(0xE6,0x8A,0xA8), o3(0xE6,0x8A,0xB3),
+     o3(0xE6,0x8A,0xB6), o3(0xE6,0x8A,0xB7),
+     o3(0xE6,0x8A,0xBA), o3(0xE6,0x8A,0xBE),
+     o3(0xE6,0x8A,0xBF), o3(0xE6,0x8B,0x84),
+     o3(0xE6,0x8B,0x8E), o3(0xE6,0x8B,0x95),
+     o3(0xE6,0x8B,0x96), o3(0xE6,0x8B,0x9A),
+     o3(0xE6,0x8B,0xAA), o3(0xE6,0x8B,0xB2),
+     o3(0xE6,0x8B,0xB4), o3(0xE6,0x8B,0xBC),
+     o3(0xE6,0x8B,0xBD), o3(0xE6,0x8C,0x83),
+     o3(0xE6,0x8C,0x84), o3(0xE6,0x8C,0x8A),
+     o3(0xE6,0x8C,0x8B), o3(0xE6,0x8C,0x8D),
+     o3(0xE6,0x8C,0x90), o3(0xE6,0x8C,0x93),
+     o3(0xE6,0x8C,0x96), o3(0xE6,0x8C,0x98),
+     o3(0xE6,0x8C,0xA9), o3(0xE6,0x8C,0xAA),
+     o3(0xE6,0x8C,0xAD), o3(0xE6,0x8C,0xB5),
+     o3(0xE6,0x8C,0xB6), o3(0xE6,0x8C,0xB9),
+     o3(0xE6,0x8C,0xBC), o3(0xE6,0x8D,0x81),
+     o3(0xE6,0x8D,0x82), o3(0xE6,0x8D,0x83),
+     o3(0xE6,0x8D,0x84), o3(0xE6,0x8D,0x86),
+     o3(0xE6,0x8D,0x8A), o3(0xE6,0x8D,0x8B),
+     o3(0xE6,0x8D,0x8E), o3(0xE6,0x8D,0x92),
+     o3(0xE6,0x8D,0x93), o3(0xE6,0x8D,0x94),
+     o3(0xE6,0x8D,0x98), o3(0xE6,0x8D,0x9B),
+     o3(0xE6,0x8D,0xA5), o3(0xE6,0x8D,0xA6),
+     o3(0xE6,0x8D,0xAC), o3(0xE6,0x8D,0xAD),
+     o3(0xE6,0x8D,0xB1), o3(0xE6,0x8D,0xB4),
+     o3(0xE6,0x8D,0xB5),
+
+#define from_EUC_JP_8F_BF WORDINDEX2INFO(1911)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_BF_infos,
+
+#define from_EUC_JP_8F_C0_infos WORDINDEX2INFO(1913)
+                INVALID, o3(0xE6,0x8D,0xB8),
+     o3(0xE6,0x8D,0xBC), o3(0xE6,0x8D,0xBD),
+     o3(0xE6,0x8D,0xBF), o3(0xE6,0x8E,0x82),
+     o3(0xE6,0x8E,0x84), o3(0xE6,0x8E,0x87),
+     o3(0xE6,0x8E,0x8A), o3(0xE6,0x8E,0x90),
+     o3(0xE6,0x8E,0x94), o3(0xE6,0x8E,0x95),
+     o3(0xE6,0x8E,0x99), o3(0xE6,0x8E,0x9A),
+     o3(0xE6,0x8E,0x9E), o3(0xE6,0x8E,0xA4),
+     o3(0xE6,0x8E,0xA6), o3(0xE6,0x8E,0xAD),
+     o3(0xE6,0x8E,0xAE), o3(0xE6,0x8E,0xAF),
+     o3(0xE6,0x8E,0xBD), o3(0xE6,0x8F,0x81),
+     o3(0xE6,0x8F,0x85), o3(0xE6,0x8F,0x88),
+     o3(0xE6,0x8F,0x8E), o3(0xE6,0x8F,0x91),
+     o3(0xE6,0x8F,0x93), o3(0xE6,0x8F,0x94),
+     o3(0xE6,0x8F,0x95), o3(0xE6,0x8F,0x9C),
+     o3(0xE6,0x8F,0xA0), o3(0xE6,0x8F,0xA5),
+     o3(0xE6,0x8F,0xAA), o3(0xE6,0x8F,0xAC),
+     o3(0xE6,0x8F,0xB2), o3(0xE6,0x8F,0xB3),
+     o3(0xE6,0x8F,0xB5), o3(0xE6,0x8F,0xB8),
+     o3(0xE6,0x8F,0xB9), o3(0xE6,0x90,0x89),
+     o3(0xE6,0x90,0x8A), o3(0xE6,0x90,0x90),
+     o3(0xE6,0x90,0x92), o3(0xE6,0x90,0x94),
+     o3(0xE6,0x90,0x98), o3(0xE6,0x90,0x9E),
+     o3(0xE6,0x90,0xA0), o3(0xE6,0x90,0xA2),
+     o3(0xE6,0x90,0xA4), o3(0xE6,0x90,0xA5),
+     o3(0xE6,0x90,0xA9), o3(0xE6,0x90,0xAA),
+     o3(0xE6,0x90,0xAF), o3(0xE6,0x90,0xB0),
+     o3(0xE6,0x90,0xB5), o3(0xE6,0x90,0xBD),
+     o3(0xE6,0x90,0xBF), o3(0xE6,0x91,0x8B),
+     o3(0xE6,0x91,0x8F), o3(0xE6,0x91,0x91),
+     o3(0xE6,0x91,0x92), o3(0xE6,0x91,0x93),
+     o3(0xE6,0x91,0x94), o3(0xE6,0x91,0x9A),
+     o3(0xE6,0x91,0x9B), o3(0xE6,0x91,0x9C),
+     o3(0xE6,0x91,0x9D), o3(0xE6,0x91,0x9F),
+     o3(0xE6,0x91,0xA0), o3(0xE6,0x91,0xA1),
+     o3(0xE6,0x91,0xA3), o3(0xE6,0x91,0xAD),
+     o3(0xE6,0x91,0xB3), o3(0xE6,0x91,0xB4),
+     o3(0xE6,0x91,0xBB), o3(0xE6,0x91,0xBD),
+     o3(0xE6,0x92,0x85), o3(0xE6,0x92,0x87),
+     o3(0xE6,0x92,0x8F), o3(0xE6,0x92,0x90),
+     o3(0xE6,0x92,0x91), o3(0xE6,0x92,0x98),
+     o3(0xE6,0x92,0x99), o3(0xE6,0x92,0x9B),
+     o3(0xE6,0x92,0x9D), o3(0xE6,0x92,0x9F),
+     o3(0xE6,0x92,0xA1), o3(0xE6,0x92,0xA3),
+     o3(0xE6,0x92,0xA6), o3(0xE6,0x92,0xA8),
+     o3(0xE6,0x92,0xAC), o3(0xE6,0x92,0xB3),
+     o3(0xE6,0x92,0xBD), o3(0xE6,0x92,0xBE),
+     o3(0xE6,0x92,0xBF),
+
+#define from_EUC_JP_8F_C0 WORDINDEX2INFO(2008)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C0_infos,
+
+#define from_EUC_JP_8F_C1_infos WORDINDEX2INFO(2010)
+                INVALID, o3(0xE6,0x93,0x84),
+     o3(0xE6,0x93,0x89), o3(0xE6,0x93,0x8A),
+     o3(0xE6,0x93,0x8B), o3(0xE6,0x93,0x8C),
+     o3(0xE6,0x93,0x8E), o3(0xE6,0x93,0x90),
+     o3(0xE6,0x93,0x91), o3(0xE6,0x93,0x95),
+     o3(0xE6,0x93,0x97), o3(0xE6,0x93,0xA4),
+     o3(0xE6,0x93,0xA5), o3(0xE6,0x93,0xA9),
+     o3(0xE6,0x93,0xAA), o3(0xE6,0x93,0xAD),
+     o3(0xE6,0x93,0xB0), o3(0xE6,0x93,0xB5),
+     o3(0xE6,0x93,0xB7), o3(0xE6,0x93,0xBB),
+     o3(0xE6,0x93,0xBF), o3(0xE6,0x94,0x81),
+     o3(0xE6,0x94,0x84), o3(0xE6,0x94,0x88),
+     o3(0xE6,0x94,0x89), o3(0xE6,0x94,0x8A),
+     o3(0xE6,0x94,0x8F), o3(0xE6,0x94,0x93),
+     o3(0xE6,0x94,0x94), o3(0xE6,0x94,0x96),
+     o3(0xE6,0x94,0x99), o3(0xE6,0x94,0x9B),
+     o3(0xE6,0x94,0x9E), o3(0xE6,0x94,0x9F),
+     o3(0xE6,0x94,0xA2), o3(0xE6,0x94,0xA6),
+     o3(0xE6,0x94,0xA9), o3(0xE6,0x94,0xAE),
+     o3(0xE6,0x94,0xB1), o3(0xE6,0x94,0xBA),
+     o3(0xE6,0x94,0xBC), o3(0xE6,0x94,0xBD),
+     o3(0xE6,0x95,0x83), o3(0xE6,0x95,0x87),
+     o3(0xE6,0x95,0x89), o3(0xE6,0x95,0x90),
+     o3(0xE6,0x95,0x92), o3(0xE6,0x95,0x94),
+     o3(0xE6,0x95,0x9F), o3(0xE6,0x95,0xA0),
+     o3(0xE6,0x95,0xA7), o3(0xE6,0x95,0xAB),
+     o3(0xE6,0x95,0xBA), o3(0xE6,0x95,0xBD),
+     o3(0xE6,0x96,0x81), o3(0xE6,0x96,0x85),
+     o3(0xE6,0x96,0x8A), o3(0xE6,0x96,0x92),
+     o3(0xE6,0x96,0x95), o3(0xE6,0x96,0x98),
+     o3(0xE6,0x96,0x9D), o3(0xE6,0x96,0xA0),
+     o3(0xE6,0x96,0xA3), o3(0xE6,0x96,0xA6),
+     o3(0xE6,0x96,0xAE), o3(0xE6,0x96,0xB2),
+     o3(0xE6,0x96,0xB3), o3(0xE6,0x96,0xB4),
+     o3(0xE6,0x96,0xBF), o3(0xE6,0x97,0x82),
+     o3(0xE6,0x97,0x88), o3(0xE6,0x97,0x89),
+     o3(0xE6,0x97,0x8E), o3(0xE6,0x97,0x90),
+     o3(0xE6,0x97,0x94), o3(0xE6,0x97,0x96),
+     o3(0xE6,0x97,0x98), o3(0xE6,0x97,0x9F),
+     o3(0xE6,0x97,0xB0), o3(0xE6,0x97,0xB2),
+     o3(0xE6,0x97,0xB4), o3(0xE6,0x97,0xB5),
+     o3(0xE6,0x97,0xB9), o3(0xE6,0x97,0xBE),
+     o3(0xE6,0x97,0xBF), o3(0xE6,0x98,0x80),
+     o3(0xE6,0x98,0x84), o3(0xE6,0x98,0x88),
+     o3(0xE6,0x98,0x89), o3(0xE6,0x98,0x8D),
+     o3(0xE6,0x98,0x91), o3(0xE6,0x98,0x92),
+     o3(0xE6,0x98,0x95), o3(0xE6,0x98,0x96),
+     o3(0xE6,0x98,0x9D),
+
+#define from_EUC_JP_8F_C1 WORDINDEX2INFO(2105)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C1_infos,
+
+#define from_EUC_JP_8F_C2_infos WORDINDEX2INFO(2107)
+                INVALID, o3(0xE6,0x98,0x9E),
+     o3(0xE6,0x98,0xA1), o3(0xE6,0x98,0xA2),
+     o3(0xE6,0x98,0xA3), o3(0xE6,0x98,0xA4),
+     o3(0xE6,0x98,0xA6), o3(0xE6,0x98,0xA9),
+     o3(0xE6,0x98,0xAA), o3(0xE6,0x98,0xAB),
+     o3(0xE6,0x98,0xAC), o3(0xE6,0x98,0xAE),
+     o3(0xE6,0x98,0xB0), o3(0xE6,0x98,0xB1),
+     o3(0xE6,0x98,0xB3), o3(0xE6,0x98,0xB9),
+     o3(0xE6,0x98,0xB7), o3(0xE6,0x99,0x80),
+     o3(0xE6,0x99,0x85), o3(0xE6,0x99,0x86),
+     o3(0xE6,0x99,0x8A), o3(0xE6,0x99,0x8C),
+     o3(0xE6,0x99,0x91), o3(0xE6,0x99,0x8E),
+     o3(0xE6,0x99,0x97), o3(0xE6,0x99,0x98),
+     o3(0xE6,0x99,0x99), o3(0xE6,0x99,0x9B),
+     o3(0xE6,0x99,0x9C), o3(0xE6,0x99,0xA0),
+     o3(0xE6,0x99,0xA1), o3(0xE6,0x9B,0xBB),
+     o3(0xE6,0x99,0xAA), o3(0xE6,0x99,0xAB),
+     o3(0xE6,0x99,0xAC), o3(0xE6,0x99,0xBE),
+     o3(0xE6,0x99,0xB3), o3(0xE6,0x99,0xB5),
+     o3(0xE6,0x99,0xBF), o3(0xE6,0x99,0xB7),
+     o3(0xE6,0x99,0xB8), o3(0xE6,0x99,0xB9),
+     o3(0xE6,0x99,0xBB), o3(0xE6,0x9A,0x80),
+     o3(0xE6,0x99,0xBC), o3(0xE6,0x9A,0x8B),
+     o3(0xE6,0x9A,0x8C), o3(0xE6,0x9A,0x8D),
+     o3(0xE6,0x9A,0x90), o3(0xE6,0x9A,0x92),
+     o3(0xE6,0x9A,0x99), o3(0xE6,0x9A,0x9A),
+     o3(0xE6,0x9A,0x9B), o3(0xE6,0x9A,0x9C),
+     o3(0xE6,0x9A,0x9F), o3(0xE6,0x9A,0xA0),
+     o3(0xE6,0x9A,0xA4), o3(0xE6,0x9A,0xAD),
+     o3(0xE6,0x9A,0xB1), o3(0xE6,0x9A,0xB2),
+     o3(0xE6,0x9A,0xB5), o3(0xE6,0x9A,0xBB),
+     o3(0xE6,0x9A,0xBF), o3(0xE6,0x9B,0x80),
+     o3(0xE6,0x9B,0x82), o3(0xE6,0x9B,0x83),
+     o3(0xE6,0x9B,0x88), o3(0xE6,0x9B,0x8C),
+     o3(0xE6,0x9B,0x8E), o3(0xE6,0x9B,0x8F),
+     o3(0xE6,0x9B,0x94), o3(0xE6,0x9B,0x9B),
+     o3(0xE6,0x9B,0x9F), o3(0xE6,0x9B,0xA8),
+     o3(0xE6,0x9B,0xAB), o3(0xE6,0x9B,0xAC),
+     o3(0xE6,0x9B,0xAE), o3(0xE6,0x9B,0xBA),
+     o3(0xE6,0x9C,0x85), o3(0xE6,0x9C,0x87),
+     o3(0xE6,0x9C,0x8E), o3(0xE6,0x9C,0x93),
+     o3(0xE6,0x9C,0x99), o3(0xE6,0x9C,0x9C),
+     o3(0xE6,0x9C,0xA0), o3(0xE6,0x9C,0xA2),
+     o3(0xE6,0x9C,0xB3), o3(0xE6,0x9C,0xBE),
+     o3(0xE6,0x9D,0x85), o3(0xE6,0x9D,0x87),
+     o3(0xE6,0x9D,0x88), o3(0xE6,0x9D,0x8C),
+     o3(0xE6,0x9D,0x94), o3(0xE6,0x9D,0x95),
+     o3(0xE6,0x9D,0x9D),
+
+#define from_EUC_JP_8F_C2 WORDINDEX2INFO(2202)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C2_infos,
+
+#define from_EUC_JP_8F_C3_infos WORDINDEX2INFO(2204)
+                INVALID, o3(0xE6,0x9D,0xA6),
+     o3(0xE6,0x9D,0xAC), o3(0xE6,0x9D,0xAE),
+     o3(0xE6,0x9D,0xB4), o3(0xE6,0x9D,0xB6),
+     o3(0xE6,0x9D,0xBB), o3(0xE6,0x9E,0x81),
+     o3(0xE6,0x9E,0x84), o3(0xE6,0x9E,0x8E),
+     o3(0xE6,0x9E,0x8F), o3(0xE6,0x9E,0x91),
+     o3(0xE6,0x9E,0x93), o3(0xE6,0x9E,0x96),
+     o3(0xE6,0x9E,0x98), o3(0xE6,0x9E,0x99),
+     o3(0xE6,0x9E,0x9B), o3(0xE6,0x9E,0xB0),
+     o3(0xE6,0x9E,0xB1), o3(0xE6,0x9E,0xB2),
+     o3(0xE6,0x9E,0xB5), o3(0xE6,0x9E,0xBB),
+     o3(0xE6,0x9E,0xBC), o3(0xE6,0x9E,0xBD),
+     o3(0xE6,0x9F,0xB9), o3(0xE6,0x9F,0x80),
+     o3(0xE6,0x9F,0x82), o3(0xE6,0x9F,0x83),
+     o3(0xE6,0x9F,0x85), o3(0xE6,0x9F,0x88),
+     o3(0xE6,0x9F,0x89), o3(0xE6,0x9F,0x92),
+     o3(0xE6,0x9F,0x97), o3(0xE6,0x9F,0x99),
+     o3(0xE6,0x9F,0x9C), o3(0xE6,0x9F,0xA1),
+     o3(0xE6,0x9F,0xA6), o3(0xE6,0x9F,0xB0),
+     o3(0xE6,0x9F,0xB2), o3(0xE6,0x9F,0xB6),
+     o3(0xE6,0x9F,0xB7), o3(0xE6,0xA1,0x92),
+     o3(0xE6,0xA0,0x94), o3(0xE6,0xA0,0x99),
+     o3(0xE6,0xA0,0x9D), o3(0xE6,0xA0,0x9F),
+     o3(0xE6,0xA0,0xA8), o3(0xE6,0xA0,0xA7),
+     o3(0xE6,0xA0,0xAC), o3(0xE6,0xA0,0xAD),
+     o3(0xE6,0xA0,0xAF), o3(0xE6,0xA0,0xB0),
+     o3(0xE6,0xA0,0xB1), o3(0xE6,0xA0,0xB3),
+     o3(0xE6,0xA0,0xBB), o3(0xE6,0xA0,0xBF),
+     o3(0xE6,0xA1,0x84), o3(0xE6,0xA1,0x85),
+     o3(0xE6,0xA1,0x8A), o3(0xE6,0xA1,0x8C),
+     o3(0xE6,0xA1,0x95), o3(0xE6,0xA1,0x97),
+     o3(0xE6,0xA1,0x98), o3(0xE6,0xA1,0x9B),
+     o3(0xE6,0xA1,0xAB), o3(0xE6,0xA1,0xAE),
+     o3(0xE6,0xA1,0xAF), o3(0xE6,0xA1,0xB0),
+     o3(0xE6,0xA1,0xB1), o3(0xE6,0xA1,0xB2),
+     o3(0xE6,0xA1,0xB5), o3(0xE6,0xA1,0xB9),
+     o3(0xE6,0xA1,0xBA), o3(0xE6,0xA1,0xBB),
+     o3(0xE6,0xA1,0xBC), o3(0xE6,0xA2,0x82),
+     o3(0xE6,0xA2,0x84), o3(0xE6,0xA2,0x86),
+     o3(0xE6,0xA2,0x88), o3(0xE6,0xA2,0x96),
+     o3(0xE6,0xA2,0x98), o3(0xE6,0xA2,0x9A),
+     o3(0xE6,0xA2,0x9C), o3(0xE6,0xA2,0xA1),
+     o3(0xE6,0xA2,0xA3), o3(0xE6,0xA2,0xA5),
+     o3(0xE6,0xA2,0xA9), o3(0xE6,0xA2,0xAA),
+     o3(0xE6,0xA2,0xAE), o3(0xE6,0xA2,0xB2),
+     o3(0xE6,0xA2,0xBB), o3(0xE6,0xA3,0x85),
+     o3(0xE6,0xA3,0x88), o3(0xE6,0xA3,0x8C),
+     o3(0xE6,0xA3,0x8F),
+
+#define from_EUC_JP_8F_C3 WORDINDEX2INFO(2299)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C3_infos,
+
+#define from_EUC_JP_8F_C4_infos WORDINDEX2INFO(2301)
+                INVALID, o3(0xE6,0xA3,0x90),
+     o3(0xE6,0xA3,0x91), o3(0xE6,0xA3,0x93),
+     o3(0xE6,0xA3,0x96), o3(0xE6,0xA3,0x99),
+     o3(0xE6,0xA3,0x9C), o3(0xE6,0xA3,0x9D),
+     o3(0xE6,0xA3,0xA5), o3(0xE6,0xA3,0xA8),
+     o3(0xE6,0xA3,0xAA), o3(0xE6,0xA3,0xAB),
+     o3(0xE6,0xA3,0xAC), o3(0xE6,0xA3,0xAD),
+     o3(0xE6,0xA3,0xB0), o3(0xE6,0xA3,0xB1),
+     o3(0xE6,0xA3,0xB5), o3(0xE6,0xA3,0xB6),
+     o3(0xE6,0xA3,0xBB), o3(0xE6,0xA3,0xBC),
+     o3(0xE6,0xA3,0xBD), o3(0xE6,0xA4,0x86),
+     o3(0xE6,0xA4,0x89), o3(0xE6,0xA4,0x8A),
+     o3(0xE6,0xA4,0x90), o3(0xE6,0xA4,0x91),
+     o3(0xE6,0xA4,0x93), o3(0xE6,0xA4,0x96),
+     o3(0xE6,0xA4,0x97), o3(0xE6,0xA4,0xB1),
+     o3(0xE6,0xA4,0xB3), o3(0xE6,0xA4,0xB5),
+     o3(0xE6,0xA4,0xB8), o3(0xE6,0xA4,0xBB),
+     o3(0xE6,0xA5,0x82), o3(0xE6,0xA5,0x85),
+     o3(0xE6,0xA5,0x89), o3(0xE6,0xA5,0x8E),
+     o3(0xE6,0xA5,0x97), o3(0xE6,0xA5,0x9B),
+     o3(0xE6,0xA5,0xA3), o3(0xE6,0xA5,0xA4),
+     o3(0xE6,0xA5,0xA5), o3(0xE6,0xA5,0xA6),
+     o3(0xE6,0xA5,0xA8), o3(0xE6,0xA5,0xA9),
+     o3(0xE6,0xA5,0xAC), o3(0xE6,0xA5,0xB0),
+     o3(0xE6,0xA5,0xB1), o3(0xE6,0xA5,0xB2),
+     o3(0xE6,0xA5,0xBA), o3(0xE6,0xA5,0xBB),
+     o3(0xE6,0xA5,0xBF), o3(0xE6,0xA6,0x80),
+     o3(0xE6,0xA6,0x8D), o3(0xE6,0xA6,0x92),
+     o3(0xE6,0xA6,0x96), o3(0xE6,0xA6,0x98),
+     o3(0xE6,0xA6,0xA1), o3(0xE6,0xA6,0xA5),
+     o3(0xE6,0xA6,0xA6), o3(0xE6,0xA6,0xA8),
+     o3(0xE6,0xA6,0xAB), o3(0xE6,0xA6,0xAD),
+     o3(0xE6,0xA6,0xAF), o3(0xE6,0xA6,0xB7),
+     o3(0xE6,0xA6,0xB8), o3(0xE6,0xA6,0xBA),
+     o3(0xE6,0xA6,0xBC), o3(0xE6,0xA7,0x85),
+     o3(0xE6,0xA7,0x88), o3(0xE6,0xA7,0x91),
+     o3(0xE6,0xA7,0x96), o3(0xE6,0xA7,0x97),
+     o3(0xE6,0xA7,0xA2), o3(0xE6,0xA7,0xA5),
+     o3(0xE6,0xA7,0xAE), o3(0xE6,0xA7,0xAF),
+     o3(0xE6,0xA7,0xB1), o3(0xE6,0xA7,0xB3),
+     o3(0xE6,0xA7,0xB5), o3(0xE6,0xA7,0xBE),
+     o3(0xE6,0xA8,0x80), o3(0xE6,0xA8,0x81),
+     o3(0xE6,0xA8,0x83), o3(0xE6,0xA8,0x8F),
+     o3(0xE6,0xA8,0x91), o3(0xE6,0xA8,0x95),
+     o3(0xE6,0xA8,0x9A), o3(0xE6,0xA8,0x9D),
+     o3(0xE6,0xA8,0xA0), o3(0xE6,0xA8,0xA4),
+     o3(0xE6,0xA8,0xA8), o3(0xE6,0xA8,0xB0),
+     o3(0xE6,0xA8,0xB2),
+
+#define from_EUC_JP_8F_C4 WORDINDEX2INFO(2396)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C4_infos,
+
+#define from_EUC_JP_8F_C5_infos WORDINDEX2INFO(2398)
+                INVALID, o3(0xE6,0xA8,0xB4),
+     o3(0xE6,0xA8,0xB7), o3(0xE6,0xA8,0xBB),
+     o3(0xE6,0xA8,0xBE), o3(0xE6,0xA8,0xBF),
+     o3(0xE6,0xA9,0x85), o3(0xE6,0xA9,0x86),
+     o3(0xE6,0xA9,0x89), o3(0xE6,0xA9,0x8A),
+     o3(0xE6,0xA9,0x8E), o3(0xE6,0xA9,0x90),
+     o3(0xE6,0xA9,0x91), o3(0xE6,0xA9,0x92),
+     o3(0xE6,0xA9,0x95), o3(0xE6,0xA9,0x96),
+     o3(0xE6,0xA9,0x9B), o3(0xE6,0xA9,0xA4),
+     o3(0xE6,0xA9,0xA7), o3(0xE6,0xA9,0xAA),
+     o3(0xE6,0xA9,0xB1), o3(0xE6,0xA9,0xB3),
+     o3(0xE6,0xA9,0xBE), o3(0xE6,0xAA,0x81),
+     o3(0xE6,0xAA,0x83), o3(0xE6,0xAA,0x86),
+     o3(0xE6,0xAA,0x87), o3(0xE6,0xAA,0x89),
+     o3(0xE6,0xAA,0x8B), o3(0xE6,0xAA,0x91),
+     o3(0xE6,0xAA,0x9B), o3(0xE6,0xAA,0x9D),
+     o3(0xE6,0xAA,0x9E), o3(0xE6,0xAA,0x9F),
+     o3(0xE6,0xAA,0xA5), o3(0xE6,0xAA,0xAB),
+     o3(0xE6,0xAA,0xAF), o3(0xE6,0xAA,0xB0),
+     o3(0xE6,0xAA,0xB1), o3(0xE6,0xAA,0xB4),
+     o3(0xE6,0xAA,0xBD), o3(0xE6,0xAA,0xBE),
+     o3(0xE6,0xAA,0xBF), o3(0xE6,0xAB,0x86),
+     o3(0xE6,0xAB,0x89), o3(0xE6,0xAB,0x88),
+     o3(0xE6,0xAB,0x8C), o3(0xE6,0xAB,0x90),
+     o3(0xE6,0xAB,0x94), o3(0xE6,0xAB,0x95),
+     o3(0xE6,0xAB,0x96), o3(0xE6,0xAB,0x9C),
+     o3(0xE6,0xAB,0x9D), o3(0xE6,0xAB,0xA4),
+     o3(0xE6,0xAB,0xA7), o3(0xE6,0xAB,0xAC),
+     o3(0xE6,0xAB,0xB0), o3(0xE6,0xAB,0xB1),
+     o3(0xE6,0xAB,0xB2), o3(0xE6,0xAB,0xBC),
+     o3(0xE6,0xAB,0xBD), o3(0xE6,0xAC,0x82),
+     o3(0xE6,0xAC,0x83), o3(0xE6,0xAC,0x86),
+     o3(0xE6,0xAC,0x87), o3(0xE6,0xAC,0x89),
+     o3(0xE6,0xAC,0x8F), o3(0xE6,0xAC,0x90),
+     o3(0xE6,0xAC,0x91), o3(0xE6,0xAC,0x97),
+     o3(0xE6,0xAC,0x9B), o3(0xE6,0xAC,0x9E),
+     o3(0xE6,0xAC,0xA4), o3(0xE6,0xAC,0xA8),
+     o3(0xE6,0xAC,0xAB), o3(0xE6,0xAC,0xAC),
+     o3(0xE6,0xAC,0xAF), o3(0xE6,0xAC,0xB5),
+     o3(0xE6,0xAC,0xB6), o3(0xE6,0xAC,0xBB),
+     o3(0xE6,0xAC,0xBF), o3(0xE6,0xAD,0x86),
+     o3(0xE6,0xAD,0x8A), o3(0xE6,0xAD,0x8D),
+     o3(0xE6,0xAD,0x92), o3(0xE6,0xAD,0x96),
+     o3(0xE6,0xAD,0x98), o3(0xE6,0xAD,0x9D),
+     o3(0xE6,0xAD,0xA0), o3(0xE6,0xAD,0xA7),
+     o3(0xE6,0xAD,0xAB), o3(0xE6,0xAD,0xAE),
+     o3(0xE6,0xAD,0xB0), o3(0xE6,0xAD,0xB5),
+     o3(0xE6,0xAD,0xBD),
+
+#define from_EUC_JP_8F_C5 WORDINDEX2INFO(2493)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C5_infos,
+
+#define from_EUC_JP_8F_C6_infos WORDINDEX2INFO(2495)
+                INVALID, o3(0xE6,0xAD,0xBE),
+     o3(0xE6,0xAE,0x82), o3(0xE6,0xAE,0x85),
+     o3(0xE6,0xAE,0x97), o3(0xE6,0xAE,0x9B),
+     o3(0xE6,0xAE,0x9F), o3(0xE6,0xAE,0xA0),
+     o3(0xE6,0xAE,0xA2), o3(0xE6,0xAE,0xA3),
+     o3(0xE6,0xAE,0xA8), o3(0xE6,0xAE,0xA9),
+     o3(0xE6,0xAE,0xAC), o3(0xE6,0xAE,0xAD),
+     o3(0xE6,0xAE,0xAE), o3(0xE6,0xAE,0xB0),
+     o3(0xE6,0xAE,0xB8), o3(0xE6,0xAE,0xB9),
+     o3(0xE6,0xAE,0xBD), o3(0xE6,0xAE,0xBE),
+     o3(0xE6,0xAF,0x83), o3(0xE6,0xAF,0x84),
+     o3(0xE6,0xAF,0x89), o3(0xE6,0xAF,0x8C),
+     o3(0xE6,0xAF,0x96), o3(0xE6,0xAF,0x9A),
+     o3(0xE6,0xAF,0xA1), o3(0xE6,0xAF,0xA3),
+     o3(0xE6,0xAF,0xA6), o3(0xE6,0xAF,0xA7),
+     o3(0xE6,0xAF,0xAE), o3(0xE6,0xAF,0xB1),
+     o3(0xE6,0xAF,0xB7), o3(0xE6,0xAF,0xB9),
+     o3(0xE6,0xAF,0xBF), o3(0xE6,0xB0,0x82),
+     o3(0xE6,0xB0,0x84), o3(0xE6,0xB0,0x85),
+     o3(0xE6,0xB0,0x89), o3(0xE6,0xB0,0x8D),
+     o3(0xE6,0xB0,0x8E), o3(0xE6,0xB0,0x90),
+     o3(0xE6,0xB0,0x92), o3(0xE6,0xB0,0x99),
+     o3(0xE6,0xB0,0x9F), o3(0xE6,0xB0,0xA6),
+     o3(0xE6,0xB0,0xA7), o3(0xE6,0xB0,0xA8),
+     o3(0xE6,0xB0,0xAC), o3(0xE6,0xB0,0xAE),
+     o3(0xE6,0xB0,0xB3), o3(0xE6,0xB0,0xB5),
+     o3(0xE6,0xB0,0xB6), o3(0xE6,0xB0,0xBA),
+     o3(0xE6,0xB0,0xBB), o3(0xE6,0xB0,0xBF),
+     o3(0xE6,0xB1,0x8A), o3(0xE6,0xB1,0x8B),
+     o3(0xE6,0xB1,0x8D), o3(0xE6,0xB1,0x8F),
+     o3(0xE6,0xB1,0x92), o3(0xE6,0xB1,0x94),
+     o3(0xE6,0xB1,0x99), o3(0xE6,0xB1,0x9B),
+     o3(0xE6,0xB1,0x9C), o3(0xE6,0xB1,0xAB),
+     o3(0xE6,0xB1,0xAD), o3(0xE6,0xB1,0xAF),
+     o3(0xE6,0xB1,0xB4), o3(0xE6,0xB1,0xB6),
+     o3(0xE6,0xB1,0xB8), o3(0xE6,0xB1,0xB9),
+     o3(0xE6,0xB1,0xBB), o3(0xE6,0xB2,0x85),
+     o3(0xE6,0xB2,0x86), o3(0xE6,0xB2,0x87),
+     o3(0xE6,0xB2,0x89), o3(0xE6,0xB2,0x94),
+     o3(0xE6,0xB2,0x95), o3(0xE6,0xB2,0x97),
+     o3(0xE6,0xB2,0x98), o3(0xE6,0xB2,0x9C),
+     o3(0xE6,0xB2,0x9F), o3(0xE6,0xB2,0xB0),
+     o3(0xE6,0xB2,0xB2), o3(0xE6,0xB2,0xB4),
+     o3(0xE6,0xB3,0x82), o3(0xE6,0xB3,0x86),
+     o3(0xE6,0xB3,0x8D), o3(0xE6,0xB3,0x8F),
+     o3(0xE6,0xB3,0x90), o3(0xE6,0xB3,0x91),
+     o3(0xE6,0xB3,0x92), o3(0xE6,0xB3,0x94),
+     o3(0xE6,0xB3,0x96),
+
+#define from_EUC_JP_8F_C6 WORDINDEX2INFO(2590)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C6_infos,
+
+#define from_EUC_JP_8F_C7_infos WORDINDEX2INFO(2592)
+                INVALID, o3(0xE6,0xB3,0x9A),
+     o3(0xE6,0xB3,0x9C), o3(0xE6,0xB3,0xA0),
+     o3(0xE6,0xB3,0xA7), o3(0xE6,0xB3,0xA9),
+     o3(0xE6,0xB3,0xAB), o3(0xE6,0xB3,0xAC),
+     o3(0xE6,0xB3,0xAE), o3(0xE6,0xB3,0xB2),
+     o3(0xE6,0xB3,0xB4), o3(0xE6,0xB4,0x84),
+     o3(0xE6,0xB4,0x87), o3(0xE6,0xB4,0x8A),
+     o3(0xE6,0xB4,0x8E), o3(0xE6,0xB4,0x8F),
+     o3(0xE6,0xB4,0x91), o3(0xE6,0xB4,0x93),
+     o3(0xE6,0xB4,0x9A), o3(0xE6,0xB4,0xA6),
+     o3(0xE6,0xB4,0xA7), o3(0xE6,0xB4,0xA8),
+     o3(0xE6,0xB1,0xA7), o3(0xE6,0xB4,0xAE),
+     o3(0xE6,0xB4,0xAF), o3(0xE6,0xB4,0xB1),
+     o3(0xE6,0xB4,0xB9), o3(0xE6,0xB4,0xBC),
+     o3(0xE6,0xB4,0xBF), o3(0xE6,0xB5,0x97),
+     o3(0xE6,0xB5,0x9E), o3(0xE6,0xB5,0x9F),
+     o3(0xE6,0xB5,0xA1), o3(0xE6,0xB5,0xA5),
+     o3(0xE6,0xB5,0xA7), o3(0xE6,0xB5,0xAF),
+     o3(0xE6,0xB5,0xB0), o3(0xE6,0xB5,0xBC),
+     o3(0xE6,0xB6,0x82), o3(0xE6,0xB6,0x87),
+     o3(0xE6,0xB6,0x91), o3(0xE6,0xB6,0x92),
+     o3(0xE6,0xB6,0x94), o3(0xE6,0xB6,0x96),
+     o3(0xE6,0xB6,0x97), o3(0xE6,0xB6,0x98),
+     o3(0xE6,0xB6,0xAA), o3(0xE6,0xB6,0xAC),
+     o3(0xE6,0xB6,0xB4), o3(0xE6,0xB6,0xB7),
+     o3(0xE6,0xB6,0xB9), o3(0xE6,0xB6,0xBD),
+     o3(0xE6,0xB6,0xBF), o3(0xE6,0xB7,0x84),
+     o3(0xE6,0xB7,0x88), o3(0xE6,0xB7,0x8A),
+     o3(0xE6,0xB7,0x8E), o3(0xE6,0xB7,0x8F),
+     o3(0xE6,0xB7,0x96), o3(0xE6,0xB7,0x9B),
+     o3(0xE6,0xB7,0x9D), o3(0xE6,0xB7,0x9F),
+     o3(0xE6,0xB7,0xA0), o3(0xE6,0xB7,0xA2),
+     o3(0xE6,0xB7,0xA5), o3(0xE6,0xB7,0xA9),
+     o3(0xE6,0xB7,0xAF), o3(0xE6,0xB7,0xB0),
+     o3(0xE6,0xB7,0xB4), o3(0xE6,0xB7,0xB6),
+     o3(0xE6,0xB7,0xBC), o3(0xE6,0xB8,0x80),
+     o3(0xE6,0xB8,0x84), o3(0xE6,0xB8,0x9E),
+     o3(0xE6,0xB8,0xA2), o3(0xE6,0xB8,0xA7),
+     o3(0xE6,0xB8,0xB2), o3(0xE6,0xB8,0xB6),
+     o3(0xE6,0xB8,0xB9), o3(0xE6,0xB8,0xBB),
+     o3(0xE6,0xB8,0xBC), o3(0xE6,0xB9,0x84),
+     o3(0xE6,0xB9,0x85), o3(0xE6,0xB9,0x88),
+     o3(0xE6,0xB9,0x89), o3(0xE6,0xB9,0x8B),
+     o3(0xE6,0xB9,0x8F), o3(0xE6,0xB9,0x91),
+     o3(0xE6,0xB9,0x92), o3(0xE6,0xB9,0x93),
+     o3(0xE6,0xB9,0x94), o3(0xE6,0xB9,0x97),
+     o3(0xE6,0xB9,0x9C), o3(0xE6,0xB9,0x9D),
+     o3(0xE6,0xB9,0x9E),
+
+#define from_EUC_JP_8F_C7 WORDINDEX2INFO(2687)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C7_infos,
+
+#define from_EUC_JP_8F_C8_infos WORDINDEX2INFO(2689)
+                INVALID, o3(0xE6,0xB9,0xA2),
+     o3(0xE6,0xB9,0xA3), o3(0xE6,0xB9,0xA8),
+     o3(0xE6,0xB9,0xB3), o3(0xE6,0xB9,0xBB),
+     o3(0xE6,0xB9,0xBD), o3(0xE6,0xBA,0x8D),
+     o3(0xE6,0xBA,0x93), o3(0xE6,0xBA,0x99),
+     o3(0xE6,0xBA,0xA0), o3(0xE6,0xBA,0xA7),
+     o3(0xE6,0xBA,0xAD), o3(0xE6,0xBA,0xAE),
+     o3(0xE6,0xBA,0xB1), o3(0xE6,0xBA,0xB3),
+     o3(0xE6,0xBA,0xBB), o3(0xE6,0xBA,0xBF),
+     o3(0xE6,0xBB,0x80), o3(0xE6,0xBB,0x81),
+     o3(0xE6,0xBB,0x83), o3(0xE6,0xBB,0x87),
+     o3(0xE6,0xBB,0x88), o3(0xE6,0xBB,0x8A),
+     o3(0xE6,0xBB,0x8D), o3(0xE6,0xBB,0x8E),
+     o3(0xE6,0xBB,0x8F), o3(0xE6,0xBB,0xAB),
+     o3(0xE6,0xBB,0xAD), o3(0xE6,0xBB,0xAE),
+     o3(0xE6,0xBB,0xB9), o3(0xE6,0xBB,0xBB),
+     o3(0xE6,0xBB,0xBD), o3(0xE6,0xBC,0x84),
+     o3(0xE6,0xBC,0x88), o3(0xE6,0xBC,0x8A),
+     o3(0xE6,0xBC,0x8C), o3(0xE6,0xBC,0x8D),
+     o3(0xE6,0xBC,0x96), o3(0xE6,0xBC,0x98),
+     o3(0xE6,0xBC,0x9A), o3(0xE6,0xBC,0x9B),
+     o3(0xE6,0xBC,0xA6), o3(0xE6,0xBC,0xA9),
+     o3(0xE6,0xBC,0xAA), o3(0xE6,0xBC,0xAF),
+     o3(0xE6,0xBC,0xB0), o3(0xE6,0xBC,0xB3),
+     o3(0xE6,0xBC,0xB6), o3(0xE6,0xBC,0xBB),
+     o3(0xE6,0xBC,0xBC), o3(0xE6,0xBC,0xAD),
+     o3(0xE6,0xBD,0x8F), o3(0xE6,0xBD,0x91),
+     o3(0xE6,0xBD,0x92), o3(0xE6,0xBD,0x93),
+     o3(0xE6,0xBD,0x97), o3(0xE6,0xBD,0x99),
+     o3(0xE6,0xBD,0x9A), o3(0xE6,0xBD,0x9D),
+     o3(0xE6,0xBD,0x9E), o3(0xE6,0xBD,0xA1),
+     o3(0xE6,0xBD,0xA2), o3(0xE6,0xBD,0xA8),
+     o3(0xE6,0xBD,0xAC), o3(0xE6,0xBD,0xBD),
+     o3(0xE6,0xBD,0xBE), o3(0xE6,0xBE,0x83),
+     o3(0xE6,0xBE,0x87), o3(0xE6,0xBE,0x88),
+     o3(0xE6,0xBE,0x8B), o3(0xE6,0xBE,0x8C),
+     o3(0xE6,0xBE,0x8D), o3(0xE6,0xBE,0x90),
+     o3(0xE6,0xBE,0x92), o3(0xE6,0xBE,0x93),
+     o3(0xE6,0xBE,0x94), o3(0xE6,0xBE,0x96),
+     o3(0xE6,0xBE,0x9A), o3(0xE6,0xBE,0x9F),
+     o3(0xE6,0xBE,0xA0), o3(0xE6,0xBE,0xA5),
+     o3(0xE6,0xBE,0xA6), o3(0xE6,0xBE,0xA7),
+     o3(0xE6,0xBE,0xA8), o3(0xE6,0xBE,0xAE),
+     o3(0xE6,0xBE,0xAF), o3(0xE6,0xBE,0xB0),
+     o3(0xE6,0xBE,0xB5), o3(0xE6,0xBE,0xB6),
+     o3(0xE6,0xBE,0xBC), o3(0xE6,0xBF,0x85),
+     o3(0xE6,0xBF,0x87), o3(0xE6,0xBF,0x88),
+     o3(0xE6,0xBF,0x8A),
+
+#define from_EUC_JP_8F_C8 WORDINDEX2INFO(2784)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C8_infos,
+
+#define from_EUC_JP_8F_C9_infos WORDINDEX2INFO(2786)
+                INVALID, o3(0xE6,0xBF,0x9A),
+     o3(0xE6,0xBF,0x9E), o3(0xE6,0xBF,0xA8),
+     o3(0xE6,0xBF,0xA9), o3(0xE6,0xBF,0xB0),
+     o3(0xE6,0xBF,0xB5), o3(0xE6,0xBF,0xB9),
+     o3(0xE6,0xBF,0xBC), o3(0xE6,0xBF,0xBD),
+     o3(0xE7,0x80,0x80), o3(0xE7,0x80,0x85),
+     o3(0xE7,0x80,0x86), o3(0xE7,0x80,0x87),
+     o3(0xE7,0x80,0x8D), o3(0xE7,0x80,0x97),
+     o3(0xE7,0x80,0xA0), o3(0xE7,0x80,0xA3),
+     o3(0xE7,0x80,0xAF), o3(0xE7,0x80,0xB4),
+     o3(0xE7,0x80,0xB7), o3(0xE7,0x80,0xB9),
+     o3(0xE7,0x80,0xBC), o3(0xE7,0x81,0x83),
+     o3(0xE7,0x81,0x84), o3(0xE7,0x81,0x88),
+     o3(0xE7,0x81,0x89), o3(0xE7,0x81,0x8A),
+     o3(0xE7,0x81,0x8B), o3(0xE7,0x81,0x94),
+     o3(0xE7,0x81,0x95), o3(0xE7,0x81,0x9D),
+     o3(0xE7,0x81,0x9E), o3(0xE7,0x81,0x8E),
+     o3(0xE7,0x81,0xA4), o3(0xE7,0x81,0xA5),
+     o3(0xE7,0x81,0xAC), o3(0xE7,0x81,0xAE),
+     o3(0xE7,0x81,0xB5), o3(0xE7,0x81,0xB6),
+     o3(0xE7,0x81,0xBE), o3(0xE7,0x82,0x81),
+     o3(0xE7,0x82,0x85), o3(0xE7,0x82,0x86),
+     o3(0xE7,0x82,0x94), o3(0xE7,0x82,0x95),
+     o3(0xE7,0x82,0x96), o3(0xE7,0x82,0x97),
+     o3(0xE7,0x82,0x98), o3(0xE7,0x82,0x9B),
+     o3(0xE7,0x82,0xA4), o3(0xE7,0x82,0xAB),
+     o3(0xE7,0x82,0xB0), o3(0xE7,0x82,0xB1),
+     o3(0xE7,0x82,0xB4), o3(0xE7,0x82,0xB7),
+     o3(0xE7,0x83,0x8A), o3(0xE7,0x83,0x91),
+     o3(0xE7,0x83,0x93), o3(0xE7,0x83,0x94),
+     o3(0xE7,0x83,0x95), o3(0xE7,0x83,0x96),
+     o3(0xE7,0x83,0x98), o3(0xE7,0x83,0x9C),
+     o3(0xE7,0x83,0xA4), o3(0xE7,0x83,0xBA),
+     o3(0xE7,0x84,0x83), o3(0xE7,0x84,0x84),
+     o3(0xE7,0x84,0x85), o3(0xE7,0x84,0x86),
+     o3(0xE7,0x84,0x87), o3(0xE7,0x84,0x8B),
+     o3(0xE7,0x84,0x8C), o3(0xE7,0x84,0x8F),
+     o3(0xE7,0x84,0x9E), o3(0xE7,0x84,0xA0),
+     o3(0xE7,0x84,0xAB), o3(0xE7,0x84,0xAD),
+     o3(0xE7,0x84,0xAF), o3(0xE7,0x84,0xB0),
+     o3(0xE7,0x84,0xB1), o3(0xE7,0x84,0xB8),
+     o3(0xE7,0x85,0x81), o3(0xE7,0x85,0x85),
+     o3(0xE7,0x85,0x86), o3(0xE7,0x85,0x87),
+     o3(0xE7,0x85,0x8A), o3(0xE7,0x85,0x8B),
+     o3(0xE7,0x85,0x90), o3(0xE7,0x85,0x92),
+     o3(0xE7,0x85,0x97), o3(0xE7,0x85,0x9A),
+     o3(0xE7,0x85,0x9C), o3(0xE7,0x85,0x9E),
+     o3(0xE7,0x85,0xA0),
+
+#define from_EUC_JP_8F_C9 WORDINDEX2INFO(2881)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_C9_infos,
+
+#define from_EUC_JP_8F_CA_infos WORDINDEX2INFO(2883)
+                INVALID, o3(0xE7,0x85,0xA8),
+     o3(0xE7,0x85,0xB9), o3(0xE7,0x86,0x80),
+     o3(0xE7,0x86,0x85), o3(0xE7,0x86,0x87),
+     o3(0xE7,0x86,0x8C), o3(0xE7,0x86,0x92),
+     o3(0xE7,0x86,0x9A), o3(0xE7,0x86,0x9B),
+     o3(0xE7,0x86,0xA0), o3(0xE7,0x86,0xA2),
+     o3(0xE7,0x86,0xAF), o3(0xE7,0x86,0xB0),
+     o3(0xE7,0x86,0xB2), o3(0xE7,0x86,0xB3),
+     o3(0xE7,0x86,0xBA), o3(0xE7,0x86,0xBF),
+     o3(0xE7,0x87,0x80), o3(0xE7,0x87,0x81),
+     o3(0xE7,0x87,0x84), o3(0xE7,0x87,0x8B),
+     o3(0xE7,0x87,0x8C), o3(0xE7,0x87,0x93),
+     o3(0xE7,0x87,0x96), o3(0xE7,0x87,0x99),
+     o3(0xE7,0x87,0x9A), o3(0xE7,0x87,0x9C),
+     o3(0xE7,0x87,0xB8), o3(0xE7,0x87,0xBE),
+     o3(0xE7,0x88,0x80), o3(0xE7,0x88,0x87),
+     o3(0xE7,0x88,0x88), o3(0xE7,0x88,0x89),
+     o3(0xE7,0x88,0x93), o3(0xE7,0x88,0x97),
+     o3(0xE7,0x88,0x9A), o3(0xE7,0x88,0x9D),
+     o3(0xE7,0x88,0x9F), o3(0xE7,0x88,0xA4),
+     o3(0xE7,0x88,0xAB), o3(0xE7,0x88,0xAF),
+     o3(0xE7,0x88,0xB4), o3(0xE7,0x88,0xB8),
+     o3(0xE7,0x88,0xB9), o3(0xE7,0x89,0x81),
+     o3(0xE7,0x89,0x82), o3(0xE7,0x89,0x83),
+     o3(0xE7,0x89,0x85), o3(0xE7,0x89,0x8E),
+     o3(0xE7,0x89,0x8F), o3(0xE7,0x89,0x90),
+     o3(0xE7,0x89,0x93), o3(0xE7,0x89,0x95),
+     o3(0xE7,0x89,0x96), o3(0xE7,0x89,0x9A),
+     o3(0xE7,0x89,0x9C), o3(0xE7,0x89,0x9E),
+     o3(0xE7,0x89,0xA0), o3(0xE7,0x89,0xA3),
+     o3(0xE7,0x89,0xA8), o3(0xE7,0x89,0xAB),
+     o3(0xE7,0x89,0xAE), o3(0xE7,0x89,0xAF),
+     o3(0xE7,0x89,0xB1), o3(0xE7,0x89,0xB7),
+     o3(0xE7,0x89,0xB8), o3(0xE7,0x89,0xBB),
+     o3(0xE7,0x89,0xBC), o3(0xE7,0x89,0xBF),
+     o3(0xE7,0x8A,0x84), o3(0xE7,0x8A,0x89),
+     o3(0xE7,0x8A,0x8D), o3(0xE7,0x8A,0x8E),
+     o3(0xE7,0x8A,0x93), o3(0xE7,0x8A,0x9B),
+     o3(0xE7,0x8A,0xA8), o3(0xE7,0x8A,0xAD),
+     o3(0xE7,0x8A,0xAE), o3(0xE7,0x8A,0xB1),
+     o3(0xE7,0x8A,0xB4), o3(0xE7,0x8A,0xBE),
+     o3(0xE7,0x8B,0x81), o3(0xE7,0x8B,0x87),
+     o3(0xE7,0x8B,0x89), o3(0xE7,0x8B,0x8C),
+     o3(0xE7,0x8B,0x95), o3(0xE7,0x8B,0x96),
+     o3(0xE7,0x8B,0x98), o3(0xE7,0x8B,0x9F),
+     o3(0xE7,0x8B,0xA5), o3(0xE7,0x8B,0xB3),
+     o3(0xE7,0x8B,0xB4), o3(0xE7,0x8B,0xBA),
+     o3(0xE7,0x8B,0xBB),
+
+#define from_EUC_JP_8F_CA WORDINDEX2INFO(2978)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CA_infos,
+
+#define from_EUC_JP_8F_CB_infos WORDINDEX2INFO(2980)
+                INVALID, o3(0xE7,0x8B,0xBE),
+     o3(0xE7,0x8C,0x82), o3(0xE7,0x8C,0x84),
+     o3(0xE7,0x8C,0x85), o3(0xE7,0x8C,0x87),
+     o3(0xE7,0x8C,0x8B), o3(0xE7,0x8C,0x8D),
+     o3(0xE7,0x8C,0x92), o3(0xE7,0x8C,0x93),
+     o3(0xE7,0x8C,0x98), o3(0xE7,0x8C,0x99),
+     o3(0xE7,0x8C,0x9E), o3(0xE7,0x8C,0xA2),
+     o3(0xE7,0x8C,0xA4), o3(0xE7,0x8C,0xA7),
+     o3(0xE7,0x8C,0xA8), o3(0xE7,0x8C,0xAC),
+     o3(0xE7,0x8C,0xB1), o3(0xE7,0x8C,0xB2),
+     o3(0xE7,0x8C,0xB5), o3(0xE7,0x8C,0xBA),
+     o3(0xE7,0x8C,0xBB), o3(0xE7,0x8C,0xBD),
+     o3(0xE7,0x8D,0x83), o3(0xE7,0x8D,0x8D),
+     o3(0xE7,0x8D,0x90), o3(0xE7,0x8D,0x92),
+     o3(0xE7,0x8D,0x96), o3(0xE7,0x8D,0x98),
+     o3(0xE7,0x8D,0x9D), o3(0xE7,0x8D,0x9E),
+     o3(0xE7,0x8D,0x9F), o3(0xE7,0x8D,0xA0),
+     o3(0xE7,0x8D,0xA6), o3(0xE7,0x8D,0xA7),
+     o3(0xE7,0x8D,0xA9), o3(0xE7,0x8D,0xAB),
+     o3(0xE7,0x8D,0xAC), o3(0xE7,0x8D,0xAE),
+     o3(0xE7,0x8D,0xAF), o3(0xE7,0x8D,0xB1),
+     o3(0xE7,0x8D,0xB7), o3(0xE7,0x8D,0xB9),
+     o3(0xE7,0x8D,0xBC), o3(0xE7,0x8E,0x80),
+     o3(0xE7,0x8E,0x81), o3(0xE7,0x8E,0x83),
+     o3(0xE7,0x8E,0x85), o3(0xE7,0x8E,0x86),
+     o3(0xE7,0x8E,0x8E), o3(0xE7,0x8E,0x90),
+     o3(0xE7,0x8E,0x93), o3(0xE7,0x8E,0x95),
+     o3(0xE7,0x8E,0x97), o3(0xE7,0x8E,0x98),
+     o3(0xE7,0x8E,0x9C), o3(0xE7,0x8E,0x9E),
+     o3(0xE7,0x8E,0x9F), o3(0xE7,0x8E,0xA0),
+     o3(0xE7,0x8E,0xA2), o3(0xE7,0x8E,0xA5),
+     o3(0xE7,0x8E,0xA6), o3(0xE7,0x8E,0xAA),
+     o3(0xE7,0x8E,0xAB), o3(0xE7,0x8E,0xAD),
+     o3(0xE7,0x8E,0xB5), o3(0xE7,0x8E,0xB7),
+     o3(0xE7,0x8E,0xB9), o3(0xE7,0x8E,0xBC),
+     o3(0xE7,0x8E,0xBD), o3(0xE7,0x8E,0xBF),
+     o3(0xE7,0x8F,0x85), o3(0xE7,0x8F,0x86),
+     o3(0xE7,0x8F,0x89), o3(0xE7,0x8F,0x8B),
+     o3(0xE7,0x8F,0x8C), o3(0xE7,0x8F,0x8F),
+     o3(0xE7,0x8F,0x92), o3(0xE7,0x8F,0x93),
+     o3(0xE7,0x8F,0x96), o3(0xE7,0x8F,0x99),
+     o3(0xE7,0x8F,0x9D), o3(0xE7,0x8F,0xA1),
+     o3(0xE7,0x8F,0xA3), o3(0xE7,0x8F,0xA6),
+     o3(0xE7,0x8F,0xA7), o3(0xE7,0x8F,0xA9),
+     o3(0xE7,0x8F,0xB4), o3(0xE7,0x8F,0xB5),
+     o3(0xE7,0x8F,0xB7), o3(0xE7,0x8F,0xB9),
+     o3(0xE7,0x8F,0xBA), o3(0xE7,0x8F,0xBB),
+     o3(0xE7,0x8F,0xBD),
+
+#define from_EUC_JP_8F_CB WORDINDEX2INFO(3075)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CB_infos,
+
+#define from_EUC_JP_8F_CC_infos WORDINDEX2INFO(3077)
+                INVALID, o3(0xE7,0x8F,0xBF),
+     o3(0xE7,0x90,0x80), o3(0xE7,0x90,0x81),
+     o3(0xE7,0x90,0x84), o3(0xE7,0x90,0x87),
+     o3(0xE7,0x90,0x8A), o3(0xE7,0x90,0x91),
+     o3(0xE7,0x90,0x9A), o3(0xE7,0x90,0x9B),
+     o3(0xE7,0x90,0xA4), o3(0xE7,0x90,0xA6),
+     o3(0xE7,0x90,0xA8), o3(0xE7,0x90,0xA9),
+     o3(0xE7,0x90,0xAA), o3(0xE7,0x90,0xAB),
+     o3(0xE7,0x90,0xAC), o3(0xE7,0x90,0xAD),
+     o3(0xE7,0x90,0xAE), o3(0xE7,0x90,0xAF),
+     o3(0xE7,0x90,0xB0), o3(0xE7,0x90,0xB1),
+     o3(0xE7,0x90,0xB9), o3(0xE7,0x91,0x80),
+     o3(0xE7,0x91,0x83), o3(0xE7,0x91,0x84),
+     o3(0xE7,0x91,0x86), o3(0xE7,0x91,0x87),
+     o3(0xE7,0x91,0x8B), o3(0xE7,0x91,0x8D),
+     o3(0xE7,0x91,0x91), o3(0xE7,0x91,0x92),
+     o3(0xE7,0x91,0x97), o3(0xE7,0x91,0x9D),
+     o3(0xE7,0x91,0xA2), o3(0xE7,0x91,0xA6),
+     o3(0xE7,0x91,0xA7), o3(0xE7,0x91,0xA8),
+     o3(0xE7,0x91,0xAB), o3(0xE7,0x91,0xAD),
+     o3(0xE7,0x91,0xAE), o3(0xE7,0x91,0xB1),
+     o3(0xE7,0x91,0xB2), o3(0xE7,0x92,0x80),
+     o3(0xE7,0x92,0x81), o3(0xE7,0x92,0x85),
+     o3(0xE7,0x92,0x86), o3(0xE7,0x92,0x87),
+     o3(0xE7,0x92,0x89), o3(0xE7,0x92,0x8F),
+     o3(0xE7,0x92,0x90), o3(0xE7,0x92,0x91),
+     o3(0xE7,0x92,0x92), o3(0xE7,0x92,0x98),
+     o3(0xE7,0x92,0x99), o3(0xE7,0x92,0x9A),
+     o3(0xE7,0x92,0x9C), o3(0xE7,0x92,0x9F),
+     o3(0xE7,0x92,0xA0), o3(0xE7,0x92,0xA1),
+     o3(0xE7,0x92,0xA3), o3(0xE7,0x92,0xA6),
+     o3(0xE7,0x92,0xA8), o3(0xE7,0x92,0xA9),
+     o3(0xE7,0x92,0xAA), o3(0xE7,0x92,0xAB),
+     o3(0xE7,0x92,0xAE), o3(0xE7,0x92,0xAF),
+     o3(0xE7,0x92,0xB1), o3(0xE7,0x92,0xB2),
+     o3(0xE7,0x92,0xB5), o3(0xE7,0x92,0xB9),
+     o3(0xE7,0x92,0xBB), o3(0xE7,0x92,0xBF),
+     o3(0xE7,0x93,0x88), o3(0xE7,0x93,0x89),
+     o3(0xE7,0x93,0x8C), o3(0xE7,0x93,0x90),
+     o3(0xE7,0x93,0x93), o3(0xE7,0x93,0x98),
+     o3(0xE7,0x93,0x9A), o3(0xE7,0x93,0x9B),
+     o3(0xE7,0x93,0x9E), o3(0xE7,0x93,0x9F),
+     o3(0xE7,0x93,0xA4), o3(0xE7,0x93,0xA8),
+     o3(0xE7,0x93,0xAA), o3(0xE7,0x93,0xAB),
+     o3(0xE7,0x93,0xAF), o3(0xE7,0x93,0xB4),
+     o3(0xE7,0x93,0xBA), o3(0xE7,0x93,0xBB),
+     o3(0xE7,0x93,0xBC), o3(0xE7,0x93,0xBF),
+     o3(0xE7,0x94,0x86),
+
+#define from_EUC_JP_8F_CC WORDINDEX2INFO(3172)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CC_infos,
+
+#define from_EUC_JP_8F_CD_infos WORDINDEX2INFO(3174)
+                INVALID, o3(0xE7,0x94,0x92),
+     o3(0xE7,0x94,0x96), o3(0xE7,0x94,0x97),
+     o3(0xE7,0x94,0xA0), o3(0xE7,0x94,0xA1),
+     o3(0xE7,0x94,0xA4), o3(0xE7,0x94,0xA7),
+     o3(0xE7,0x94,0xA9), o3(0xE7,0x94,0xAA),
+     o3(0xE7,0x94,0xAF), o3(0xE7,0x94,0xB6),
+     o3(0xE7,0x94,0xB9), o3(0xE7,0x94,0xBD),
+     o3(0xE7,0x94,0xBE), o3(0xE7,0x94,0xBF),
+     o3(0xE7,0x95,0x80), o3(0xE7,0x95,0x83),
+     o3(0xE7,0x95,0x87), o3(0xE7,0x95,0x88),
+     o3(0xE7,0x95,0x8E), o3(0xE7,0x95,0x90),
+     o3(0xE7,0x95,0x92), o3(0xE7,0x95,0x97),
+     o3(0xE7,0x95,0x9E), o3(0xE7,0x95,0x9F),
+     o3(0xE7,0x95,0xA1), o3(0xE7,0x95,0xAF),
+     o3(0xE7,0x95,0xB1), o3(0xE7,0x95,0xB9),
+     o3(0xE7,0x95,0xBA), o3(0xE7,0x95,0xBB),
+     o3(0xE7,0x95,0xBC), o3(0xE7,0x95,0xBD),
+     o3(0xE7,0x95,0xBE), o3(0xE7,0x96,0x81),
+     o3(0xE7,0x96,0x85), o3(0xE7,0x96,0x90),
+     o3(0xE7,0x96,0x92), o3(0xE7,0x96,0x93),
+     o3(0xE7,0x96,0x95), o3(0xE7,0x96,0x99),
+     o3(0xE7,0x96,0x9C), o3(0xE7,0x96,0xA2),
+     o3(0xE7,0x96,0xA4), o3(0xE7,0x96,0xB4),
+     o3(0xE7,0x96,0xBA), o3(0xE7,0x96,0xBF),
+     o3(0xE7,0x97,0x80), o3(0xE7,0x97,0x81),
+     o3(0xE7,0x97,0x84), o3(0xE7,0x97,0x86),
+     o3(0xE7,0x97,0x8C), o3(0xE7,0x97,0x8E),
+     o3(0xE7,0x97,0x8F), o3(0xE7,0x97,0x97),
+     o3(0xE7,0x97,0x9C), o3(0xE7,0x97,0x9F),
+     o3(0xE7,0x97,0xA0), o3(0xE7,0x97,0xA1),
+     o3(0xE7,0x97,0xA4), o3(0xE7,0x97,0xA7),
+     o3(0xE7,0x97,0xAC), o3(0xE7,0x97,0xAE),
+     o3(0xE7,0x97,0xAF), o3(0xE7,0x97,0xB1),
+     o3(0xE7,0x97,0xB9), o3(0xE7,0x98,0x80),
+     o3(0xE7,0x98,0x82), o3(0xE7,0x98,0x83),
+     o3(0xE7,0x98,0x84), o3(0xE7,0x98,0x87),
+     o3(0xE7,0x98,0x88), o3(0xE7,0x98,0x8A),
+     o3(0xE7,0x98,0x8C), o3(0xE7,0x98,0x8F),
+     o3(0xE7,0x98,0x92), o3(0xE7,0x98,0x93),
+     o3(0xE7,0x98,0x95), o3(0xE7,0x98,0x96),
+     o3(0xE7,0x98,0x99), o3(0xE7,0x98,0x9B),
+     o3(0xE7,0x98,0x9C), o3(0xE7,0x98,0x9D),
+     o3(0xE7,0x98,0x9E), o3(0xE7,0x98,0xA3),
+     o3(0xE7,0x98,0xA5), o3(0xE7,0x98,0xA6),
+     o3(0xE7,0x98,0xA9), o3(0xE7,0x98,0xAD),
+     o3(0xE7,0x98,0xB2), o3(0xE7,0x98,0xB3),
+     o3(0xE7,0x98,0xB5), o3(0xE7,0x98,0xB8),
+     o3(0xE7,0x98,0xB9),
+
+#define from_EUC_JP_8F_CD WORDINDEX2INFO(3269)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CD_infos,
+
+#define from_EUC_JP_8F_CE_infos WORDINDEX2INFO(3271)
+                INVALID, o3(0xE7,0x98,0xBA),
+     o3(0xE7,0x98,0xBC), o3(0xE7,0x99,0x8A),
+     o3(0xE7,0x99,0x80), o3(0xE7,0x99,0x81),
+     o3(0xE7,0x99,0x83), o3(0xE7,0x99,0x84),
+     o3(0xE7,0x99,0x85), o3(0xE7,0x99,0x89),
+     o3(0xE7,0x99,0x8B), o3(0xE7,0x99,0x95),
+     o3(0xE7,0x99,0x99), o3(0xE7,0x99,0x9F),
+     o3(0xE7,0x99,0xA4), o3(0xE7,0x99,0xA5),
+     o3(0xE7,0x99,0xAD), o3(0xE7,0x99,0xAE),
+     o3(0xE7,0x99,0xAF), o3(0xE7,0x99,0xB1),
+     o3(0xE7,0x99,0xB4), o3(0xE7,0x9A,0x81),
+     o3(0xE7,0x9A,0x85), o3(0xE7,0x9A,0x8C),
+     o3(0xE7,0x9A,0x8D), o3(0xE7,0x9A,0x95),
+     o3(0xE7,0x9A,0x9B), o3(0xE7,0x9A,0x9C),
+     o3(0xE7,0x9A,0x9D), o3(0xE7,0x9A,0x9F),
+     o3(0xE7,0x9A,0xA0), o3(0xE7,0x9A,0xA2),
+     o3(0xE7,0x9A,0xA3), o3(0xE7,0x9A,0xA4),
+     o3(0xE7,0x9A,0xA5), o3(0xE7,0x9A,0xA6),
+     o3(0xE7,0x9A,0xA7), o3(0xE7,0x9A,0xA8),
+     o3(0xE7,0x9A,0xAA), o3(0xE7,0x9A,0xAD),
+     o3(0xE7,0x9A,0xBD), o3(0xE7,0x9B,0x81),
+     o3(0xE7,0x9B,0x85), o3(0xE7,0x9B,0x89),
+     o3(0xE7,0x9B,0x8B), o3(0xE7,0x9B,0x8C),
+     o3(0xE7,0x9B,0x8E), o3(0xE7,0x9B,0x94),
+     o3(0xE7,0x9B,0x99), o3(0xE7,0x9B,0xA0),
+     o3(0xE7,0x9B,0xA6), o3(0xE7,0x9B,0xA8),
+     o3(0xE7,0x9B,0xAC), o3(0xE7,0x9B,0xB0),
+     o3(0xE7,0x9B,0xB1), o3(0xE7,0x9B,0xB6),
+     o3(0xE7,0x9B,0xB9), o3(0xE7,0x9B,0xBC),
+     o3(0xE7,0x9C,0x80), o3(0xE7,0x9C,0x86),
+     o3(0xE7,0x9C,0x8A), o3(0xE7,0x9C,0x8E),
+     o3(0xE7,0x9C,0x92), o3(0xE7,0x9C,0x94),
+     o3(0xE7,0x9C,0x95), o3(0xE7,0x9C,0x97),
+     o3(0xE7,0x9C,0x99), o3(0xE7,0x9C,0x9A),
+     o3(0xE7,0x9C,0x9C), o3(0xE7,0x9C,0xA2),
+     o3(0xE7,0x9C,0xA8), o3(0xE7,0x9C,0xAD),
+     o3(0xE7,0x9C,0xAE), o3(0xE7,0x9C,0xAF),
+     o3(0xE7,0x9C,0xB4), o3(0xE7,0x9C,0xB5),
+     o3(0xE7,0x9C,0xB6), o3(0xE7,0x9C,0xB9),
+     o3(0xE7,0x9C,0xBD), o3(0xE7,0x9C,0xBE),
+     o3(0xE7,0x9D,0x82), o3(0xE7,0x9D,0x85),
+     o3(0xE7,0x9D,0x86), o3(0xE7,0x9D,0x8A),
+     o3(0xE7,0x9D,0x8D), o3(0xE7,0x9D,0x8E),
+     o3(0xE7,0x9D,0x8F), o3(0xE7,0x9D,0x92),
+     o3(0xE7,0x9D,0x96), o3(0xE7,0x9D,0x97),
+     o3(0xE7,0x9D,0x9C), o3(0xE7,0x9D,0x9E),
+     o3(0xE7,0x9D,0x9F), o3(0xE7,0x9D,0xA0),
+     o3(0xE7,0x9D,0xA2),
+
+#define from_EUC_JP_8F_CE WORDINDEX2INFO(3366)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CE_infos,
+
+#define from_EUC_JP_8F_CF_infos WORDINDEX2INFO(3368)
+                INVALID, o3(0xE7,0x9D,0xA4),
+     o3(0xE7,0x9D,0xA7), o3(0xE7,0x9D,0xAA),
+     o3(0xE7,0x9D,0xAC), o3(0xE7,0x9D,0xB0),
+     o3(0xE7,0x9D,0xB2), o3(0xE7,0x9D,0xB3),
+     o3(0xE7,0x9D,0xB4), o3(0xE7,0x9D,0xBA),
+     o3(0xE7,0x9D,0xBD), o3(0xE7,0x9E,0x80),
+     o3(0xE7,0x9E,0x84), o3(0xE7,0x9E,0x8C),
+     o3(0xE7,0x9E,0x8D), o3(0xE7,0x9E,0x94),
+     o3(0xE7,0x9E,0x95), o3(0xE7,0x9E,0x96),
+     o3(0xE7,0x9E,0x9A), o3(0xE7,0x9E,0x9F),
+     o3(0xE7,0x9E,0xA2), o3(0xE7,0x9E,0xA7),
+     o3(0xE7,0x9E,0xAA), o3(0xE7,0x9E,0xAE),
+     o3(0xE7,0x9E,0xAF), o3(0xE7,0x9E,0xB1),
+     o3(0xE7,0x9E,0xB5), o3(0xE7,0x9E,0xBE),
+     o3(0xE7,0x9F,0x83), o3(0xE7,0x9F,0x89),
+     o3(0xE7,0x9F,0x91), o3(0xE7,0x9F,0x92),
+     o3(0xE7,0x9F,0x95), o3(0xE7,0x9F,0x99),
+     o3(0xE7,0x9F,0x9E), o3(0xE7,0x9F,0x9F),
+     o3(0xE7,0x9F,0xA0), o3(0xE7,0x9F,0xA4),
+     o3(0xE7,0x9F,0xA6), o3(0xE7,0x9F,0xAA),
+     o3(0xE7,0x9F,0xAC), o3(0xE7,0x9F,0xB0),
+     o3(0xE7,0x9F,0xB1), o3(0xE7,0x9F,0xB4),
+     o3(0xE7,0x9F,0xB8), o3(0xE7,0x9F,0xBB),
+     o3(0xE7,0xA0,0x85), o3(0xE7,0xA0,0x86),
+     o3(0xE7,0xA0,0x89), o3(0xE7,0xA0,0x8D),
+     o3(0xE7,0xA0,0x8E), o3(0xE7,0xA0,0x91),
+     o3(0xE7,0xA0,0x9D), o3(0xE7,0xA0,0xA1),
+     o3(0xE7,0xA0,0xA2), o3(0xE7,0xA0,0xA3),
+     o3(0xE7,0xA0,0xAD), o3(0xE7,0xA0,0xAE),
+     o3(0xE7,0xA0,0xB0), o3(0xE7,0xA0,0xB5),
+     o3(0xE7,0xA0,0xB7), o3(0xE7,0xA1,0x83),
+     o3(0xE7,0xA1,0x84), o3(0xE7,0xA1,0x87),
+     o3(0xE7,0xA1,0x88), o3(0xE7,0xA1,0x8C),
+     o3(0xE7,0xA1,0x8E), o3(0xE7,0xA1,0x92),
+     o3(0xE7,0xA1,0x9C), o3(0xE7,0xA1,0x9E),
+     o3(0xE7,0xA1,0xA0), o3(0xE7,0xA1,0xA1),
+     o3(0xE7,0xA1,0xA3), o3(0xE7,0xA1,0xA4),
+     o3(0xE7,0xA1,0xA8), o3(0xE7,0xA1,0xAA),
+     o3(0xE7,0xA1,0xAE), o3(0xE7,0xA1,0xBA),
+     o3(0xE7,0xA1,0xBE), o3(0xE7,0xA2,0x8A),
+     o3(0xE7,0xA2,0x8F), o3(0xE7,0xA2,0x94),
+     o3(0xE7,0xA2,0x98), o3(0xE7,0xA2,0xA1),
+     o3(0xE7,0xA2,0x9D), o3(0xE7,0xA2,0x9E),
+     o3(0xE7,0xA2,0x9F), o3(0xE7,0xA2,0xA4),
+     o3(0xE7,0xA2,0xA8), o3(0xE7,0xA2,0xAC),
+     o3(0xE7,0xA2,0xAD), o3(0xE7,0xA2,0xB0),
+     o3(0xE7,0xA2,0xB1), o3(0xE7,0xA2,0xB2),
+     o3(0xE7,0xA2,0xB3),
+
+#define from_EUC_JP_8F_CF WORDINDEX2INFO(3463)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_CF_infos,
+
+#define from_EUC_JP_8F_D0_infos WORDINDEX2INFO(3465)
+                INVALID, o3(0xE7,0xA2,0xBB),
+     o3(0xE7,0xA2,0xBD), o3(0xE7,0xA2,0xBF),
+     o3(0xE7,0xA3,0x87), o3(0xE7,0xA3,0x88),
+     o3(0xE7,0xA3,0x89), o3(0xE7,0xA3,0x8C),
+     o3(0xE7,0xA3,0x8E), o3(0xE7,0xA3,0x92),
+     o3(0xE7,0xA3,0x93), o3(0xE7,0xA3,0x95),
+     o3(0xE7,0xA3,0x96), o3(0xE7,0xA3,0xA4),
+     o3(0xE7,0xA3,0x9B), o3(0xE7,0xA3,0x9F),
+     o3(0xE7,0xA3,0xA0), o3(0xE7,0xA3,0xA1),
+     o3(0xE7,0xA3,0xA6), o3(0xE7,0xA3,0xAA),
+     o3(0xE7,0xA3,0xB2), o3(0xE7,0xA3,0xB3),
+     o3(0xE7,0xA4,0x80), o3(0xE7,0xA3,0xB6),
+     o3(0xE7,0xA3,0xB7), o3(0xE7,0xA3,0xBA),
+     o3(0xE7,0xA3,0xBB), o3(0xE7,0xA3,0xBF),
+     o3(0xE7,0xA4,0x86), o3(0xE7,0xA4,0x8C),
+     o3(0xE7,0xA4,0x90), o3(0xE7,0xA4,0x9A),
+     o3(0xE7,0xA4,0x9C), o3(0xE7,0xA4,0x9E),
+     o3(0xE7,0xA4,0x9F), o3(0xE7,0xA4,0xA0),
+     o3(0xE7,0xA4,0xA5), o3(0xE7,0xA4,0xA7),
+     o3(0xE7,0xA4,0xA9), o3(0xE7,0xA4,0xAD),
+     o3(0xE7,0xA4,0xB1), o3(0xE7,0xA4,0xB4),
+     o3(0xE7,0xA4,0xB5), o3(0xE7,0xA4,0xBB),
+     o3(0xE7,0xA4,0xBD), o3(0xE7,0xA4,0xBF),
+     o3(0xE7,0xA5,0x84), o3(0xE7,0xA5,0x85),
+     o3(0xE7,0xA5,0x86), o3(0xE7,0xA5,0x8A),
+     o3(0xE7,0xA5,0x8B), o3(0xE7,0xA5,0x8F),
+     o3(0xE7,0xA5,0x91), o3(0xE7,0xA5,0x94),
+     o3(0xE7,0xA5,0x98), o3(0xE7,0xA5,0x9B),
+     o3(0xE7,0xA5,0x9C), o3(0xE7,0xA5,0xA7),
+     o3(0xE7,0xA5,0xA9), o3(0xE7,0xA5,0xAB),
+     o3(0xE7,0xA5,0xB2), o3(0xE7,0xA5,0xB9),
+     o3(0xE7,0xA5,0xBB), o3(0xE7,0xA5,0xBC),
+     o3(0xE7,0xA5,0xBE), o3(0xE7,0xA6,0x8B),
+     o3(0xE7,0xA6,0x8C), o3(0xE7,0xA6,0x91),
+     o3(0xE7,0xA6,0x93), o3(0xE7,0xA6,0x94),
+     o3(0xE7,0xA6,0x95), o3(0xE7,0xA6,0x96),
+     o3(0xE7,0xA6,0x98), o3(0xE7,0xA6,0x9B),
+     o3(0xE7,0xA6,0x9C), o3(0xE7,0xA6,0xA1),
+     o3(0xE7,0xA6,0xA8), o3(0xE7,0xA6,0xA9),
+     o3(0xE7,0xA6,0xAB), o3(0xE7,0xA6,0xAF),
+     o3(0xE7,0xA6,0xB1), o3(0xE7,0xA6,0xB4),
+     o3(0xE7,0xA6,0xB8), o3(0xE7,0xA6,0xBB),
+     o3(0xE7,0xA7,0x82), o3(0xE7,0xA7,0x84),
+     o3(0xE7,0xA7,0x87), o3(0xE7,0xA7,0x88),
+     o3(0xE7,0xA7,0x8A), o3(0xE7,0xA7,0x8F),
+     o3(0xE7,0xA7,0x94), o3(0xE7,0xA7,0x96),
+     o3(0xE7,0xA7,0x9A), o3(0xE7,0xA7,0x9D),
+     o3(0xE7,0xA7,0x9E),
+
+#define from_EUC_JP_8F_D0 WORDINDEX2INFO(3560)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D0_infos,
+
+#define from_EUC_JP_8F_D1_infos WORDINDEX2INFO(3562)
+                INVALID, o3(0xE7,0xA7,0xA0),
+     o3(0xE7,0xA7,0xA2), o3(0xE7,0xA7,0xA5),
+     o3(0xE7,0xA7,0xAA), o3(0xE7,0xA7,0xAB),
+     o3(0xE7,0xA7,0xAD), o3(0xE7,0xA7,0xB1),
+     o3(0xE7,0xA7,0xB8), o3(0xE7,0xA7,0xBC),
+     o3(0xE7,0xA8,0x82), o3(0xE7,0xA8,0x83),
+     o3(0xE7,0xA8,0x87), o3(0xE7,0xA8,0x89),
+     o3(0xE7,0xA8,0x8A), o3(0xE7,0xA8,0x8C),
+     o3(0xE7,0xA8,0x91), o3(0xE7,0xA8,0x95),
+     o3(0xE7,0xA8,0x9B), o3(0xE7,0xA8,0x9E),
+     o3(0xE7,0xA8,0xA1), o3(0xE7,0xA8,0xA7),
+     o3(0xE7,0xA8,0xAB), o3(0xE7,0xA8,0xAD),
+     o3(0xE7,0xA8,0xAF), o3(0xE7,0xA8,0xB0),
+     o3(0xE7,0xA8,0xB4), o3(0xE7,0xA8,0xB5),
+     o3(0xE7,0xA8,0xB8), o3(0xE7,0xA8,0xB9),
+     o3(0xE7,0xA8,0xBA), o3(0xE7,0xA9,0x84),
+     o3(0xE7,0xA9,0x85), o3(0xE7,0xA9,0x87),
+     o3(0xE7,0xA9,0x88), o3(0xE7,0xA9,0x8C),
+     o3(0xE7,0xA9,0x95), o3(0xE7,0xA9,0x96),
+     o3(0xE7,0xA9,0x99), o3(0xE7,0xA9,0x9C),
+     o3(0xE7,0xA9,0x9D), o3(0xE7,0xA9,0x9F),
+     o3(0xE7,0xA9,0xA0), o3(0xE7,0xA9,0xA5),
+     o3(0xE7,0xA9,0xA7), o3(0xE7,0xA9,0xAA),
+     o3(0xE7,0xA9,0xAD), o3(0xE7,0xA9,0xB5),
+     o3(0xE7,0xA9,0xB8), o3(0xE7,0xA9,0xBE),
+     o3(0xE7,0xAA,0x80), o3(0xE7,0xAA,0x82),
+     o3(0xE7,0xAA,0x85), o3(0xE7,0xAA,0x86),
+     o3(0xE7,0xAA,0x8A), o3(0xE7,0xAA,0x8B),
+     o3(0xE7,0xAA,0x90), o3(0xE7,0xAA,0x91),
+     o3(0xE7,0xAA,0x94), o3(0xE7,0xAA,0x9E),
+     o3(0xE7,0xAA,0xA0), o3(0xE7,0xAA,0xA3),
+     o3(0xE7,0xAA,0xAC), o3(0xE7,0xAA,0xB3),
+     o3(0xE7,0xAA,0xB5), o3(0xE7,0xAA,0xB9),
+     o3(0xE7,0xAA,0xBB), o3(0xE7,0xAA,0xBC),
+     o3(0xE7,0xAB,0x86), o3(0xE7,0xAB,0x89),
+     o3(0xE7,0xAB,0x8C), o3(0xE7,0xAB,0x8E),
+     o3(0xE7,0xAB,0x91), o3(0xE7,0xAB,0x9B),
+     o3(0xE7,0xAB,0xA8), o3(0xE7,0xAB,0xA9),
+     o3(0xE7,0xAB,0xAB), o3(0xE7,0xAB,0xAC),
+     o3(0xE7,0xAB,0xB1), o3(0xE7,0xAB,0xB4),
+     o3(0xE7,0xAB,0xBB), o3(0xE7,0xAB,0xBD),
+     o3(0xE7,0xAB,0xBE), o3(0xE7,0xAC,0x87),
+     o3(0xE7,0xAC,0x94), o3(0xE7,0xAC,0x9F),
+     o3(0xE7,0xAC,0xA3), o3(0xE7,0xAC,0xA7),
+     o3(0xE7,0xAC,0xA9), o3(0xE7,0xAC,0xAA),
+     o3(0xE7,0xAC,0xAB), o3(0xE7,0xAC,0xAD),
+     o3(0xE7,0xAC,0xAE), o3(0xE7,0xAC,0xAF),
+     o3(0xE7,0xAC,0xB0),
+
+#define from_EUC_JP_8F_D1 WORDINDEX2INFO(3657)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D1_infos,
+
+#define from_EUC_JP_8F_D2_infos WORDINDEX2INFO(3659)
+                INVALID, o3(0xE7,0xAC,0xB1),
+     o3(0xE7,0xAC,0xB4), o3(0xE7,0xAC,0xBD),
+     o3(0xE7,0xAC,0xBF), o3(0xE7,0xAD,0x80),
+     o3(0xE7,0xAD,0x81), o3(0xE7,0xAD,0x87),
+     o3(0xE7,0xAD,0x8E), o3(0xE7,0xAD,0x95),
+     o3(0xE7,0xAD,0xA0), o3(0xE7,0xAD,0xA4),
+     o3(0xE7,0xAD,0xA6), o3(0xE7,0xAD,0xA9),
+     o3(0xE7,0xAD,0xAA), o3(0xE7,0xAD,0xAD),
+     o3(0xE7,0xAD,0xAF), o3(0xE7,0xAD,0xB2),
+     o3(0xE7,0xAD,0xB3), o3(0xE7,0xAD,0xB7),
+     o3(0xE7,0xAE,0x84), o3(0xE7,0xAE,0x89),
+     o3(0xE7,0xAE,0x8E), o3(0xE7,0xAE,0x90),
+     o3(0xE7,0xAE,0x91), o3(0xE7,0xAE,0x96),
+     o3(0xE7,0xAE,0x9B), o3(0xE7,0xAE,0x9E),
+     o3(0xE7,0xAE,0xA0), o3(0xE7,0xAE,0xA5),
+     o3(0xE7,0xAE,0xAC), o3(0xE7,0xAE,0xAF),
+     o3(0xE7,0xAE,0xB0), o3(0xE7,0xAE,0xB2),
+     o3(0xE7,0xAE,0xB5), o3(0xE7,0xAE,0xB6),
+     o3(0xE7,0xAE,0xBA), o3(0xE7,0xAE,0xBB),
+     o3(0xE7,0xAE,0xBC), o3(0xE7,0xAE,0xBD),
+     o3(0xE7,0xAF,0x82), o3(0xE7,0xAF,0x85),
+     o3(0xE7,0xAF,0x88), o3(0xE7,0xAF,0x8A),
+     o3(0xE7,0xAF,0x94), o3(0xE7,0xAF,0x96),
+     o3(0xE7,0xAF,0x97), o3(0xE7,0xAF,0x99),
+     o3(0xE7,0xAF,0x9A), o3(0xE7,0xAF,0x9B),
+     o3(0xE7,0xAF,0xA8), o3(0xE7,0xAF,0xAA),
+     o3(0xE7,0xAF,0xB2), o3(0xE7,0xAF,0xB4),
+     o3(0xE7,0xAF,0xB5), o3(0xE7,0xAF,0xB8),
+     o3(0xE7,0xAF,0xB9), o3(0xE7,0xAF,0xBA),
+     o3(0xE7,0xAF,0xBC), o3(0xE7,0xAF,0xBE),
+     o3(0xE7,0xB0,0x81), o3(0xE7,0xB0,0x82),
+     o3(0xE7,0xB0,0x83), o3(0xE7,0xB0,0x84),
+     o3(0xE7,0xB0,0x86), o3(0xE7,0xB0,0x89),
+     o3(0xE7,0xB0,0x8B), o3(0xE7,0xB0,0x8C),
+     o3(0xE7,0xB0,0x8E), o3(0xE7,0xB0,0x8F),
+     o3(0xE7,0xB0,0x99), o3(0xE7,0xB0,0x9B),
+     o3(0xE7,0xB0,0xA0), o3(0xE7,0xB0,0xA5),
+     o3(0xE7,0xB0,0xA6), o3(0xE7,0xB0,0xA8),
+     o3(0xE7,0xB0,0xAC), o3(0xE7,0xB0,0xB1),
+     o3(0xE7,0xB0,0xB3), o3(0xE7,0xB0,0xB4),
+     o3(0xE7,0xB0,0xB6), o3(0xE7,0xB0,0xB9),
+     o3(0xE7,0xB0,0xBA), o3(0xE7,0xB1,0x86),
+     o3(0xE7,0xB1,0x8A), o3(0xE7,0xB1,0x95),
+     o3(0xE7,0xB1,0x91), o3(0xE7,0xB1,0x92),
+     o3(0xE7,0xB1,0x93), o3(0xE7,0xB1,0x99),
+     o3(0xE7,0xB1,0x9A), o3(0xE7,0xB1,0x9B),
+     o3(0xE7,0xB1,0x9C), o3(0xE7,0xB1,0x9D),
+     o3(0xE7,0xB1,0x9E),
+
+#define from_EUC_JP_8F_D2 WORDINDEX2INFO(3754)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D2_infos,
+
+#define from_EUC_JP_8F_D3_infos WORDINDEX2INFO(3756)
+                INVALID, o3(0xE7,0xB1,0xA1),
+     o3(0xE7,0xB1,0xA3), o3(0xE7,0xB1,0xA7),
+     o3(0xE7,0xB1,0xA9), o3(0xE7,0xB1,0xAD),
+     o3(0xE7,0xB1,0xAE), o3(0xE7,0xB1,0xB0),
+     o3(0xE7,0xB1,0xB2), o3(0xE7,0xB1,0xB9),
+     o3(0xE7,0xB1,0xBC), o3(0xE7,0xB1,0xBD),
+     o3(0xE7,0xB2,0x86), o3(0xE7,0xB2,0x87),
+     o3(0xE7,0xB2,0x8F), o3(0xE7,0xB2,0x94),
+     o3(0xE7,0xB2,0x9E), o3(0xE7,0xB2,0xA0),
+     o3(0xE7,0xB2,0xA6), o3(0xE7,0xB2,0xB0),
+     o3(0xE7,0xB2,0xB6), o3(0xE7,0xB2,0xB7),
+     o3(0xE7,0xB2,0xBA), o3(0xE7,0xB2,0xBB),
+     o3(0xE7,0xB2,0xBC), o3(0xE7,0xB2,0xBF),
+     o3(0xE7,0xB3,0x84), o3(0xE7,0xB3,0x87),
+     o3(0xE7,0xB3,0x88), o3(0xE7,0xB3,0x89),
+     o3(0xE7,0xB3,0x8D), o3(0xE7,0xB3,0x8F),
+     o3(0xE7,0xB3,0x93), o3(0xE7,0xB3,0x94),
+     o3(0xE7,0xB3,0x95), o3(0xE7,0xB3,0x97),
+     o3(0xE7,0xB3,0x99), o3(0xE7,0xB3,0x9A),
+     o3(0xE7,0xB3,0x9D), o3(0xE7,0xB3,0xA6),
+     o3(0xE7,0xB3,0xA9), o3(0xE7,0xB3,0xAB),
+     o3(0xE7,0xB3,0xB5), o3(0xE7,0xB4,0x83),
+     o3(0xE7,0xB4,0x87), o3(0xE7,0xB4,0x88),
+     o3(0xE7,0xB4,0x89), o3(0xE7,0xB4,0x8F),
+     o3(0xE7,0xB4,0x91), o3(0xE7,0xB4,0x92),
+     o3(0xE7,0xB4,0x93), o3(0xE7,0xB4,0x96),
+     o3(0xE7,0xB4,0x9D), o3(0xE7,0xB4,0x9E),
+     o3(0xE7,0xB4,0xA3), o3(0xE7,0xB4,0xA6),
+     o3(0xE7,0xB4,0xAA), o3(0xE7,0xB4,0xAD),
+     o3(0xE7,0xB4,0xB1), o3(0xE7,0xB4,0xBC),
+     o3(0xE7,0xB4,0xBD), o3(0xE7,0xB4,0xBE),
+     o3(0xE7,0xB5,0x80), o3(0xE7,0xB5,0x81),
+     o3(0xE7,0xB5,0x87), o3(0xE7,0xB5,0x88),
+     o3(0xE7,0xB5,0x8D), o3(0xE7,0xB5,0x91),
+     o3(0xE7,0xB5,0x93), o3(0xE7,0xB5,0x97),
+     o3(0xE7,0xB5,0x99), o3(0xE7,0xB5,0x9A),
+     o3(0xE7,0xB5,0x9C), o3(0xE7,0xB5,0x9D),
+     o3(0xE7,0xB5,0xA5), o3(0xE7,0xB5,0xA7),
+     o3(0xE7,0xB5,0xAA), o3(0xE7,0xB5,0xB0),
+     o3(0xE7,0xB5,0xB8), o3(0xE7,0xB5,0xBA),
+     o3(0xE7,0xB5,0xBB), o3(0xE7,0xB5,0xBF),
+     o3(0xE7,0xB6,0x81), o3(0xE7,0xB6,0x82),
+     o3(0xE7,0xB6,0x83), o3(0xE7,0xB6,0x85),
+     o3(0xE7,0xB6,0x86), o3(0xE7,0xB6,0x88),
+     o3(0xE7,0xB6,0x8B), o3(0xE7,0xB6,0x8C),
+     o3(0xE7,0xB6,0x8D), o3(0xE7,0xB6,0x91),
+     o3(0xE7,0xB6,0x96), o3(0xE7,0xB6,0x97),
+     o3(0xE7,0xB6,0x9D),
+
+#define from_EUC_JP_8F_D3 WORDINDEX2INFO(3851)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D3_infos,
+
+#define from_EUC_JP_8F_D4_infos WORDINDEX2INFO(3853)
+                INVALID, o3(0xE7,0xB6,0x9E),
+     o3(0xE7,0xB6,0xA6), o3(0xE7,0xB6,0xA7),
+     o3(0xE7,0xB6,0xAA), o3(0xE7,0xB6,0xB3),
+     o3(0xE7,0xB6,0xB6), o3(0xE7,0xB6,0xB7),
+     o3(0xE7,0xB6,0xB9), o3(0xE7,0xB7,0x82),
+     o3(0xE7,0xB7,0x83), o3(0xE7,0xB7,0x84),
+     o3(0xE7,0xB7,0x85), o3(0xE7,0xB7,0x86),
+     o3(0xE7,0xB7,0x8C), o3(0xE7,0xB7,0x8D),
+     o3(0xE7,0xB7,0x8E), o3(0xE7,0xB7,0x97),
+     o3(0xE7,0xB7,0x99), o3(0xE7,0xB8,0x80),
+     o3(0xE7,0xB7,0xA2), o3(0xE7,0xB7,0xA5),
+     o3(0xE7,0xB7,0xA6), o3(0xE7,0xB7,0xAA),
+     o3(0xE7,0xB7,0xAB), o3(0xE7,0xB7,0xAD),
+     o3(0xE7,0xB7,0xB1), o3(0xE7,0xB7,0xB5),
+     o3(0xE7,0xB7,0xB6), o3(0xE7,0xB7,0xB9),
+     o3(0xE7,0xB7,0xBA), o3(0xE7,0xB8,0x88),
+     o3(0xE7,0xB8,0x90), o3(0xE7,0xB8,0x91),
+     o3(0xE7,0xB8,0x95), o3(0xE7,0xB8,0x97),
+     o3(0xE7,0xB8,0x9C), o3(0xE7,0xB8,0x9D),
+     o3(0xE7,0xB8,0xA0), o3(0xE7,0xB8,0xA7),
+     o3(0xE7,0xB8,0xA8), o3(0xE7,0xB8,0xAC),
+     o3(0xE7,0xB8,0xAD), o3(0xE7,0xB8,0xAF),
+     o3(0xE7,0xB8,0xB3), o3(0xE7,0xB8,0xB6),
+     o3(0xE7,0xB8,0xBF), o3(0xE7,0xB9,0x84),
+     o3(0xE7,0xB9,0x85), o3(0xE7,0xB9,0x87),
+     o3(0xE7,0xB9,0x8E), o3(0xE7,0xB9,0x90),
+     o3(0xE7,0xB9,0x92), o3(0xE7,0xB9,0x98),
+     o3(0xE7,0xB9,0x9F), o3(0xE7,0xB9,0xA1),
+     o3(0xE7,0xB9,0xA2), o3(0xE7,0xB9,0xA5),
+     o3(0xE7,0xB9,0xAB), o3(0xE7,0xB9,0xAE),
+     o3(0xE7,0xB9,0xAF), o3(0xE7,0xB9,0xB3),
+     o3(0xE7,0xB9,0xB8), o3(0xE7,0xB9,0xBE),
+     o3(0xE7,0xBA,0x81), o3(0xE7,0xBA,0x86),
+     o3(0xE7,0xBA,0x87), o3(0xE7,0xBA,0x8A),
+     o3(0xE7,0xBA,0x8D), o3(0xE7,0xBA,0x91),
+     o3(0xE7,0xBA,0x95), o3(0xE7,0xBA,0x98),
+     o3(0xE7,0xBA,0x9A), o3(0xE7,0xBA,0x9D),
+     o3(0xE7,0xBA,0x9E), o3(0xE7,0xBC,0xBC),
+     o3(0xE7,0xBC,0xBB), o3(0xE7,0xBC,0xBD),
+     o3(0xE7,0xBC,0xBE), o3(0xE7,0xBC,0xBF),
+     o3(0xE7,0xBD,0x83), o3(0xE7,0xBD,0x84),
+     o3(0xE7,0xBD,0x87), o3(0xE7,0xBD,0x8F),
+     o3(0xE7,0xBD,0x92), o3(0xE7,0xBD,0x93),
+     o3(0xE7,0xBD,0x9B), o3(0xE7,0xBD,0x9C),
+     o3(0xE7,0xBD,0x9D), o3(0xE7,0xBD,0xA1),
+     o3(0xE7,0xBD,0xA3), o3(0xE7,0xBD,0xA4),
+     o3(0xE7,0xBD,0xA5), o3(0xE7,0xBD,0xA6),
+     o3(0xE7,0xBD,0xAD),
+
+#define from_EUC_JP_8F_D4 WORDINDEX2INFO(3948)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D4_infos,
+
+#define from_EUC_JP_8F_D5_infos WORDINDEX2INFO(3950)
+                INVALID, o3(0xE7,0xBD,0xB1),
+     o3(0xE7,0xBD,0xBD), o3(0xE7,0xBD,0xBE),
+     o3(0xE7,0xBD,0xBF), o3(0xE7,0xBE,0x80),
+     o3(0xE7,0xBE,0x8B), o3(0xE7,0xBE,0x8D),
+     o3(0xE7,0xBE,0x8F), o3(0xE7,0xBE,0x90),
+     o3(0xE7,0xBE,0x91), o3(0xE7,0xBE,0x96),
+     o3(0xE7,0xBE,0x97), o3(0xE7,0xBE,0x9C),
+     o3(0xE7,0xBE,0xA1), o3(0xE7,0xBE,0xA2),
+     o3(0xE7,0xBE,0xA6), o3(0xE7,0xBE,0xAA),
+     o3(0xE7,0xBE,0xAD), o3(0xE7,0xBE,0xB4),
+     o3(0xE7,0xBE,0xBC), o3(0xE7,0xBE,0xBF),
+     o3(0xE7,0xBF,0x80), o3(0xE7,0xBF,0x83),
+     o3(0xE7,0xBF,0x88), o3(0xE7,0xBF,0x8E),
+     o3(0xE7,0xBF,0x8F), o3(0xE7,0xBF,0x9B),
+     o3(0xE7,0xBF,0x9F), o3(0xE7,0xBF,0xA3),
+     o3(0xE7,0xBF,0xA5), o3(0xE7,0xBF,0xA8),
+     o3(0xE7,0xBF,0xAC), o3(0xE7,0xBF,0xAE),
+     o3(0xE7,0xBF,0xAF), o3(0xE7,0xBF,0xB2),
+     o3(0xE7,0xBF,0xBA), o3(0xE7,0xBF,0xBD),
+     o3(0xE7,0xBF,0xBE), o3(0xE7,0xBF,0xBF),
+     o3(0xE8,0x80,0x87), o3(0xE8,0x80,0x88),
+     o3(0xE8,0x80,0x8A), o3(0xE8,0x80,0x8D),
+     o3(0xE8,0x80,0x8E), o3(0xE8,0x80,0x8F),
+     o3(0xE8,0x80,0x91), o3(0xE8,0x80,0x93),
+     o3(0xE8,0x80,0x94), o3(0xE8,0x80,0x96),
+     o3(0xE8,0x80,0x9D), o3(0xE8,0x80,0x9E),
+     o3(0xE8,0x80,0x9F), o3(0xE8,0x80,0xA0),
+     o3(0xE8,0x80,0xA4), o3(0xE8,0x80,0xA6),
+     o3(0xE8,0x80,0xAC), o3(0xE8,0x80,0xAE),
+     o3(0xE8,0x80,0xB0), o3(0xE8,0x80,0xB4),
+     o3(0xE8,0x80,0xB5), o3(0xE8,0x80,0xB7),
+     o3(0xE8,0x80,0xB9), o3(0xE8,0x80,0xBA),
+     o3(0xE8,0x80,0xBC), o3(0xE8,0x80,0xBE),
+     o3(0xE8,0x81,0x80), o3(0xE8,0x81,0x84),
+     o3(0xE8,0x81,0xA0), o3(0xE8,0x81,0xA4),
+     o3(0xE8,0x81,0xA6), o3(0xE8,0x81,0xAD),
+     o3(0xE8,0x81,0xB1), o3(0xE8,0x81,0xB5),
+     o3(0xE8,0x82,0x81), o3(0xE8,0x82,0x88),
+     o3(0xE8,0x82,0x8E), o3(0xE8,0x82,0x9C),
+     o3(0xE8,0x82,0x9E), o3(0xE8,0x82,0xA6),
+     o3(0xE8,0x82,0xA7), o3(0xE8,0x82,0xAB),
+     o3(0xE8,0x82,0xB8), o3(0xE8,0x82,0xB9),
+     o3(0xE8,0x83,0x88), o3(0xE8,0x83,0x8D),
+     o3(0xE8,0x83,0x8F), o3(0xE8,0x83,0x92),
+     o3(0xE8,0x83,0x94), o3(0xE8,0x83,0x95),
+     o3(0xE8,0x83,0x97), o3(0xE8,0x83,0x98),
+     o3(0xE8,0x83,0xA0), o3(0xE8,0x83,0xAD),
+     o3(0xE8,0x83,0xAE),
+
+#define from_EUC_JP_8F_D5 WORDINDEX2INFO(4045)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D5_infos,
+
+#define from_EUC_JP_8F_D6_infos WORDINDEX2INFO(4047)
+                INVALID, o3(0xE8,0x83,0xB0),
+     o3(0xE8,0x83,0xB2), o3(0xE8,0x83,0xB3),
+     o3(0xE8,0x83,0xB6), o3(0xE8,0x83,0xB9),
+     o3(0xE8,0x83,0xBA), o3(0xE8,0x83,0xBE),
+     o3(0xE8,0x84,0x83), o3(0xE8,0x84,0x8B),
+     o3(0xE8,0x84,0x96), o3(0xE8,0x84,0x97),
+     o3(0xE8,0x84,0x98), o3(0xE8,0x84,0x9C),
+     o3(0xE8,0x84,0x9E), o3(0xE8,0x84,0xA0),
+     o3(0xE8,0x84,0xA4), o3(0xE8,0x84,0xA7),
+     o3(0xE8,0x84,0xAC), o3(0xE8,0x84,0xB0),
+     o3(0xE8,0x84,0xB5), o3(0xE8,0x84,0xBA),
+     o3(0xE8,0x84,0xBC), o3(0xE8,0x85,0x85),
+     o3(0xE8,0x85,0x87), o3(0xE8,0x85,0x8A),
+     o3(0xE8,0x85,0x8C), o3(0xE8,0x85,0x92),
+     o3(0xE8,0x85,0x97), o3(0xE8,0x85,0xA0),
+     o3(0xE8,0x85,0xA1), o3(0xE8,0x85,0xA7),
+     o3(0xE8,0x85,0xA8), o3(0xE8,0x85,0xA9),
+     o3(0xE8,0x85,0xAD), o3(0xE8,0x85,0xAF),
+     o3(0xE8,0x85,0xB7), o3(0xE8,0x86,0x81),
+     o3(0xE8,0x86,0x90), o3(0xE8,0x86,0x84),
+     o3(0xE8,0x86,0x85), o3(0xE8,0x86,0x86),
+     o3(0xE8,0x86,0x8B), o3(0xE8,0x86,0x8E),
+     o3(0xE8,0x86,0x96), o3(0xE8,0x86,0x98),
+     o3(0xE8,0x86,0x9B), o3(0xE8,0x86,0x9E),
+     o3(0xE8,0x86,0xA2), o3(0xE8,0x86,0xAE),
+     o3(0xE8,0x86,0xB2), o3(0xE8,0x86,0xB4),
+     o3(0xE8,0x86,0xBB), o3(0xE8,0x87,0x8B),
+     o3(0xE8,0x87,0x83), o3(0xE8,0x87,0x85),
+     o3(0xE8,0x87,0x8A), o3(0xE8,0x87,0x8E),
+     o3(0xE8,0x87,0x8F), o3(0xE8,0x87,0x95),
+     o3(0xE8,0x87,0x97), o3(0xE8,0x87,0x9B),
+     o3(0xE8,0x87,0x9D), o3(0xE8,0x87,0x9E),
+     o3(0xE8,0x87,0xA1), o3(0xE8,0x87,0xA4),
+     o3(0xE8,0x87,0xAB), o3(0xE8,0x87,0xAC),
+     o3(0xE8,0x87,0xB0), o3(0xE8,0x87,0xB1),
+     o3(0xE8,0x87,0xB2), o3(0xE8,0x87,0xB5),
+     o3(0xE8,0x87,0xB6), o3(0xE8,0x87,0xB8),
+     o3(0xE8,0x87,0xB9), o3(0xE8,0x87,0xBD),
+     o3(0xE8,0x87,0xBF), o3(0xE8,0x88,0x80),
+     o3(0xE8,0x88,0x83), o3(0xE8,0x88,0x8F),
+     o3(0xE8,0x88,0x93), o3(0xE8,0x88,0x94),
+     o3(0xE8,0x88,0x99), o3(0xE8,0x88,0x9A),
+     o3(0xE8,0x88,0x9D), o3(0xE8,0x88,0xA1),
+     o3(0xE8,0x88,0xA2), o3(0xE8,0x88,0xA8),
+     o3(0xE8,0x88,0xB2), o3(0xE8,0x88,0xB4),
+     o3(0xE8,0x88,0xBA), o3(0xE8,0x89,0x83),
+     o3(0xE8,0x89,0x84), o3(0xE8,0x89,0x85),
+     o3(0xE8,0x89,0x86),
+
+#define from_EUC_JP_8F_D6 WORDINDEX2INFO(4142)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D6_infos,
+
+#define from_EUC_JP_8F_D7_infos WORDINDEX2INFO(4144)
+                INVALID, o3(0xE8,0x89,0x8B),
+     o3(0xE8,0x89,0x8E), o3(0xE8,0x89,0x8F),
+     o3(0xE8,0x89,0x91), o3(0xE8,0x89,0x96),
+     o3(0xE8,0x89,0x9C), o3(0xE8,0x89,0xA0),
+     o3(0xE8,0x89,0xA3), o3(0xE8,0x89,0xA7),
+     o3(0xE8,0x89,0xAD), o3(0xE8,0x89,0xB4),
+     o3(0xE8,0x89,0xBB), o3(0xE8,0x89,0xBD),
+     o3(0xE8,0x89,0xBF), o3(0xE8,0x8A,0x80),
+     o3(0xE8,0x8A,0x81), o3(0xE8,0x8A,0x83),
+     o3(0xE8,0x8A,0x84), o3(0xE8,0x8A,0x87),
+     o3(0xE8,0x8A,0x89), o3(0xE8,0x8A,0x8A),
+     o3(0xE8,0x8A,0x8E), o3(0xE8,0x8A,0x91),
+     o3(0xE8,0x8A,0x94), o3(0xE8,0x8A,0x96),
+     o3(0xE8,0x8A,0x98), o3(0xE8,0x8A,0x9A),
+     o3(0xE8,0x8A,0x9B), o3(0xE8,0x8A,0xA0),
+     o3(0xE8,0x8A,0xA1), o3(0xE8,0x8A,0xA3),
+     o3(0xE8,0x8A,0xA4), o3(0xE8,0x8A,0xA7),
+     o3(0xE8,0x8A,0xA8), o3(0xE8,0x8A,0xA9),
+     o3(0xE8,0x8A,0xAA), o3(0xE8,0x8A,0xAE),
+     o3(0xE8,0x8A,0xB0), o3(0xE8,0x8A,0xB2),
+     o3(0xE8,0x8A,0xB4), o3(0xE8,0x8A,0xB7),
+     o3(0xE8,0x8A,0xBA), o3(0xE8,0x8A,0xBC),
+     o3(0xE8,0x8A,0xBE), o3(0xE8,0x8A,0xBF),
+     o3(0xE8,0x8B,0x86), o3(0xE8,0x8B,0x90),
+     o3(0xE8,0x8B,0x95), o3(0xE8,0x8B,0x9A),
+     o3(0xE8,0x8B,0xA0), o3(0xE8,0x8B,0xA2),
+     o3(0xE8,0x8B,0xA4), o3(0xE8,0x8B,0xA8),
+     o3(0xE8,0x8B,0xAA), o3(0xE8,0x8B,0xAD),
+     o3(0xE8,0x8B,0xAF), o3(0xE8,0x8B,0xB6),
+     o3(0xE8,0x8B,0xB7), o3(0xE8,0x8B,0xBD),
+     o3(0xE8,0x8B,0xBE), o3(0xE8,0x8C,0x80),
+     o3(0xE8,0x8C,0x81), o3(0xE8,0x8C,0x87),
+     o3(0xE8,0x8C,0x88), o3(0xE8,0x8C,0x8A),
+     o3(0xE8,0x8C,0x8B), o3(0xE8,0x8D,0x94),
+     o3(0xE8,0x8C,0x9B), o3(0xE8,0x8C,0x9D),
+     o3(0xE8,0x8C,0x9E), o3(0xE8,0x8C,0x9F),
+     o3(0xE8,0x8C,0xA1), o3(0xE8,0x8C,0xA2),
+     o3(0xE8,0x8C,0xAC), o3(0xE8,0x8C,0xAD),
+     o3(0xE8,0x8C,0xAE), o3(0xE8,0x8C,0xB0),
+     o3(0xE8,0x8C,0xB3), o3(0xE8,0x8C,0xB7),
+     o3(0xE8,0x8C,0xBA), o3(0xE8,0x8C,0xBC),
+     o3(0xE8,0x8C,0xBD), o3(0xE8,0x8D,0x82),
+     o3(0xE8,0x8D,0x83), o3(0xE8,0x8D,0x84),
+     o3(0xE8,0x8D,0x87), o3(0xE8,0x8D,0x8D),
+     o3(0xE8,0x8D,0x8E), o3(0xE8,0x8D,0x91),
+     o3(0xE8,0x8D,0x95), o3(0xE8,0x8D,0x96),
+     o3(0xE8,0x8D,0x97), o3(0xE8,0x8D,0xB0),
+     o3(0xE8,0x8D,0xB8),
+
+#define from_EUC_JP_8F_D7 WORDINDEX2INFO(4239)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D7_infos,
+
+#define from_EUC_JP_8F_D8_infos WORDINDEX2INFO(4241)
+                INVALID, o3(0xE8,0x8D,0xBD),
+     o3(0xE8,0x8D,0xBF), o3(0xE8,0x8E,0x80),
+     o3(0xE8,0x8E,0x82), o3(0xE8,0x8E,0x84),
+     o3(0xE8,0x8E,0x86), o3(0xE8,0x8E,0x8D),
+     o3(0xE8,0x8E,0x92), o3(0xE8,0x8E,0x94),
+     o3(0xE8,0x8E,0x95), o3(0xE8,0x8E,0x98),
+     o3(0xE8,0x8E,0x99), o3(0xE8,0x8E,0x9B),
+     o3(0xE8,0x8E,0x9C), o3(0xE8,0x8E,0x9D),
+     o3(0xE8,0x8E,0xA6), o3(0xE8,0x8E,0xA7),
+     o3(0xE8,0x8E,0xA9), o3(0xE8,0x8E,0xAC),
+     o3(0xE8,0x8E,0xBE), o3(0xE8,0x8E,0xBF),
+     o3(0xE8,0x8F,0x80), o3(0xE8,0x8F,0x87),
+     o3(0xE8,0x8F,0x89), o3(0xE8,0x8F,0x8F),
+     o3(0xE8,0x8F,0x90), o3(0xE8,0x8F,0x91),
+     o3(0xE8,0x8F,0x94), o3(0xE8,0x8F,0x9D),
+     o3(0xE8,0x8D,0x93), o3(0xE8,0x8F,0xA8),
+     o3(0xE8,0x8F,0xAA), o3(0xE8,0x8F,0xB6),
+     o3(0xE8,0x8F,0xB8), o3(0xE8,0x8F,0xB9),
+     o3(0xE8,0x8F,0xBC), o3(0xE8,0x90,0x81),
+     o3(0xE8,0x90,0x86), o3(0xE8,0x90,0x8A),
+     o3(0xE8,0x90,0x8F), o3(0xE8,0x90,0x91),
+     o3(0xE8,0x90,0x95), o3(0xE8,0x90,0x99),
+     o3(0xE8,0x8E,0xAD), o3(0xE8,0x90,0xAF),
+     o3(0xE8,0x90,0xB9), o3(0xE8,0x91,0x85),
+     o3(0xE8,0x91,0x87), o3(0xE8,0x91,0x88),
+     o3(0xE8,0x91,0x8A), o3(0xE8,0x91,0x8D),
+     o3(0xE8,0x91,0x8F), o3(0xE8,0x91,0x91),
+     o3(0xE8,0x91,0x92), o3(0xE8,0x91,0x96),
+     o3(0xE8,0x91,0x98), o3(0xE8,0x91,0x99),
+     o3(0xE8,0x91,0x9A), o3(0xE8,0x91,0x9C),
+     o3(0xE8,0x91,0xA0), o3(0xE8,0x91,0xA4),
+     o3(0xE8,0x91,0xA5), o3(0xE8,0x91,0xA7),
+     o3(0xE8,0x91,0xAA), o3(0xE8,0x91,0xB0),
+     o3(0xE8,0x91,0xB3), o3(0xE8,0x91,0xB4),
+     o3(0xE8,0x91,0xB6), o3(0xE8,0x91,0xB8),
+     o3(0xE8,0x91,0xBC), o3(0xE8,0x91,0xBD),
+     o3(0xE8,0x92,0x81), o3(0xE8,0x92,0x85),
+     o3(0xE8,0x92,0x92), o3(0xE8,0x92,0x93),
+     o3(0xE8,0x92,0x95), o3(0xE8,0x92,0x9E),
+     o3(0xE8,0x92,0xA6), o3(0xE8,0x92,0xA8),
+     o3(0xE8,0x92,0xA9), o3(0xE8,0x92,0xAA),
+     o3(0xE8,0x92,0xAF), o3(0xE8,0x92,0xB1),
+     o3(0xE8,0x92,0xB4), o3(0xE8,0x92,0xBA),
+     o3(0xE8,0x92,0xBD), o3(0xE8,0x92,0xBE),
+     o3(0xE8,0x93,0x80), o3(0xE8,0x93,0x82),
+     o3(0xE8,0x93,0x87), o3(0xE8,0x93,0x88),
+     o3(0xE8,0x93,0x8C), o3(0xE8,0x93,0x8F),
+     o3(0xE8,0x93,0x93),
+
+#define from_EUC_JP_8F_D8 WORDINDEX2INFO(4336)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D8_infos,
+
+#define from_EUC_JP_8F_D9_infos WORDINDEX2INFO(4338)
+                INVALID, o3(0xE8,0x93,0x9C),
+     o3(0xE8,0x93,0xA7), o3(0xE8,0x93,0xAA),
+     o3(0xE8,0x93,0xAF), o3(0xE8,0x93,0xB0),
+     o3(0xE8,0x93,0xB1), o3(0xE8,0x93,0xB2),
+     o3(0xE8,0x93,0xB7), o3(0xE8,0x94,0xB2),
+     o3(0xE8,0x93,0xBA), o3(0xE8,0x93,0xBB),
+     o3(0xE8,0x93,0xBD), o3(0xE8,0x94,0x82),
+     o3(0xE8,0x94,0x83), o3(0xE8,0x94,0x87),
+     o3(0xE8,0x94,0x8C), o3(0xE8,0x94,0x8E),
+     o3(0xE8,0x94,0x90), o3(0xE8,0x94,0x9C),
+     o3(0xE8,0x94,0x9E), o3(0xE8,0x94,0xA2),
+     o3(0xE8,0x94,0xA3), o3(0xE8,0x94,0xA4),
+     o3(0xE8,0x94,0xA5), o3(0xE8,0x94,0xA7),
+     o3(0xE8,0x94,0xAA), o3(0xE8,0x94,0xAB),
+     o3(0xE8,0x94,0xAF), o3(0xE8,0x94,0xB3),
+     o3(0xE8,0x94,0xB4), o3(0xE8,0x94,0xB6),
+     o3(0xE8,0x94,0xBF), o3(0xE8,0x95,0x86),
+     o3(0xE8,0x95,0x8F), o3(0xE8,0x95,0x90),
+     o3(0xE8,0x95,0x91), o3(0xE8,0x95,0x92),
+     o3(0xE8,0x95,0x93), o3(0xE8,0x95,0x96),
+     o3(0xE8,0x95,0x99), o3(0xE8,0x95,0x9C),
+     o3(0xE8,0x95,0x9D), o3(0xE8,0x95,0x9E),
+     o3(0xE8,0x95,0x9F), o3(0xE8,0x95,0xA0),
+     o3(0xE8,0x95,0xA1), o3(0xE8,0x95,0xA2),
+     o3(0xE8,0x95,0xA4), o3(0xE8,0x95,0xAB),
+     o3(0xE8,0x95,0xAF), o3(0xE8,0x95,0xB9),
+     o3(0xE8,0x95,0xBA), o3(0xE8,0x95,0xBB),
+     o3(0xE8,0x95,0xBD), o3(0xE8,0x95,0xBF),
+     o3(0xE8,0x96,0x81), o3(0xE8,0x96,0x85),
+     o3(0xE8,0x96,0x86), o3(0xE8,0x96,0x89),
+     o3(0xE8,0x96,0x8B), o3(0xE8,0x96,0x8C),
+     o3(0xE8,0x96,0x8F), o3(0xE8,0x96,0x93),
+     o3(0xE8,0x96,0x98), o3(0xE8,0x96,0x9D),
+     o3(0xE8,0x96,0x9F), o3(0xE8,0x96,0xA0),
+     o3(0xE8,0x96,0xA2), o3(0xE8,0x96,0xA5),
+     o3(0xE8,0x96,0xA7), o3(0xE8,0x96,0xB4),
+     o3(0xE8,0x96,0xB6), o3(0xE8,0x96,0xB7),
+     o3(0xE8,0x96,0xB8), o3(0xE8,0x96,0xBC),
+     o3(0xE8,0x96,0xBD), o3(0xE8,0x96,0xBE),
+     o3(0xE8,0x96,0xBF), o3(0xE8,0x97,0x82),
+     o3(0xE8,0x97,0x87), o3(0xE8,0x97,0x8A),
+     o3(0xE8,0x97,0x8B), o3(0xE8,0x97,0x8E),
+     o3(0xE8,0x96,0xAD), o3(0xE8,0x97,0x98),
+     o3(0xE8,0x97,0x9A), o3(0xE8,0x97,0x9F),
+     o3(0xE8,0x97,0xA0), o3(0xE8,0x97,0xA6),
+     o3(0xE8,0x97,0xA8), o3(0xE8,0x97,0xAD),
+     o3(0xE8,0x97,0xB3), o3(0xE8,0x97,0xB6),
+     o3(0xE8,0x97,0xBC),
+
+#define from_EUC_JP_8F_D9 WORDINDEX2INFO(4433)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_D9_infos,
+
+#define from_EUC_JP_8F_DA_infos WORDINDEX2INFO(4435)
+                INVALID, o3(0xE8,0x97,0xBF),
+     o3(0xE8,0x98,0x80), o3(0xE8,0x98,0x84),
+     o3(0xE8,0x98,0x85), o3(0xE8,0x98,0x8D),
+     o3(0xE8,0x98,0x8E), o3(0xE8,0x98,0x90),
+     o3(0xE8,0x98,0x91), o3(0xE8,0x98,0x92),
+     o3(0xE8,0x98,0x98), o3(0xE8,0x98,0x99),
+     o3(0xE8,0x98,0x9B), o3(0xE8,0x98,0x9E),
+     o3(0xE8,0x98,0xA1), o3(0xE8,0x98,0xA7),
+     o3(0xE8,0x98,0xA9), o3(0xE8,0x98,0xB6),
+     o3(0xE8,0x98,0xB8), o3(0xE8,0x98,0xBA),
+     o3(0xE8,0x98,0xBC), o3(0xE8,0x98,0xBD),
+     o3(0xE8,0x99,0x80), o3(0xE8,0x99,0x82),
+     o3(0xE8,0x99,0x86), o3(0xE8,0x99,0x92),
+     o3(0xE8,0x99,0x93), o3(0xE8,0x99,0x96),
+     o3(0xE8,0x99,0x97), o3(0xE8,0x99,0x98),
+     o3(0xE8,0x99,0x99), o3(0xE8,0x99,0x9D),
+     o3(0xE8,0x99,0xA0), o3(0xE8,0x99,0xA1),
+     o3(0xE8,0x99,0xA2), o3(0xE8,0x99,0xA3),
+     o3(0xE8,0x99,0xA4), o3(0xE8,0x99,0xA9),
+     o3(0xE8,0x99,0xAC), o3(0xE8,0x99,0xAF),
+     o3(0xE8,0x99,0xB5), o3(0xE8,0x99,0xB6),
+     o3(0xE8,0x99,0xB7), o3(0xE8,0x99,0xBA),
+     o3(0xE8,0x9A,0x8D), o3(0xE8,0x9A,0x91),
+     o3(0xE8,0x9A,0x96), o3(0xE8,0x9A,0x98),
+     o3(0xE8,0x9A,0x9A), o3(0xE8,0x9A,0x9C),
+     o3(0xE8,0x9A,0xA1), o3(0xE8,0x9A,0xA6),
+     o3(0xE8,0x9A,0xA7), o3(0xE8,0x9A,0xA8),
+     o3(0xE8,0x9A,0xAD), o3(0xE8,0x9A,0xB1),
+     o3(0xE8,0x9A,0xB3), o3(0xE8,0x9A,0xB4),
+     o3(0xE8,0x9A,0xB5), o3(0xE8,0x9A,0xB7),
+     o3(0xE8,0x9A,0xB8), o3(0xE8,0x9A,0xB9),
+     o3(0xE8,0x9A,0xBF), o3(0xE8,0x9B,0x80),
+     o3(0xE8,0x9B,0x81), o3(0xE8,0x9B,0x83),
+     o3(0xE8,0x9B,0x85), o3(0xE8,0x9B,0x91),
+     o3(0xE8,0x9B,0x92), o3(0xE8,0x9B,0x95),
+     o3(0xE8,0x9B,0x97), o3(0xE8,0x9B,0x9A),
+     o3(0xE8,0x9B,0x9C), o3(0xE8,0x9B,0xA0),
+     o3(0xE8,0x9B,0xA3), o3(0xE8,0x9B,0xA5),
+     o3(0xE8,0x9B,0xA7), o3(0xE8,0x9A,0x88),
+     o3(0xE8,0x9B,0xBA), o3(0xE8,0x9B,0xBC),
+     o3(0xE8,0x9B,0xBD), o3(0xE8,0x9C,0x84),
+     o3(0xE8,0x9C,0x85), o3(0xE8,0x9C,0x87),
+     o3(0xE8,0x9C,0x8B), o3(0xE8,0x9C,0x8E),
+     o3(0xE8,0x9C,0x8F), o3(0xE8,0x9C,0x90),
+     o3(0xE8,0x9C,0x93), o3(0xE8,0x9C,0x94),
+     o3(0xE8,0x9C,0x99), o3(0xE8,0x9C,0x9E),
+     o3(0xE8,0x9C,0x9F), o3(0xE8,0x9C,0xA1),
+     o3(0xE8,0x9C,0xA3),
+
+#define from_EUC_JP_8F_DA WORDINDEX2INFO(4530)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DA_infos,
+
+#define from_EUC_JP_8F_DB_infos WORDINDEX2INFO(4532)
+                INVALID, o3(0xE8,0x9C,0xA8),
+     o3(0xE8,0x9C,0xAE), o3(0xE8,0x9C,0xAF),
+     o3(0xE8,0x9C,0xB1), o3(0xE8,0x9C,0xB2),
+     o3(0xE8,0x9C,0xB9), o3(0xE8,0x9C,0xBA),
+     o3(0xE8,0x9C,0xBC), o3(0xE8,0x9C,0xBD),
+     o3(0xE8,0x9C,0xBE), o3(0xE8,0x9D,0x80),
+     o3(0xE8,0x9D,0x83), o3(0xE8,0x9D,0x85),
+     o3(0xE8,0x9D,0x8D), o3(0xE8,0x9D,0x98),
+     o3(0xE8,0x9D,0x9D), o3(0xE8,0x9D,0xA1),
+     o3(0xE8,0x9D,0xA4), o3(0xE8,0x9D,0xA5),
+     o3(0xE8,0x9D,0xAF), o3(0xE8,0x9D,0xB1),
+     o3(0xE8,0x9D,0xB2), o3(0xE8,0x9D,0xBB),
+     o3(0xE8,0x9E,0x83), o3(0xE8,0x9E,0x84),
+     o3(0xE8,0x9E,0x85), o3(0xE8,0x9E,0x86),
+     o3(0xE8,0x9E,0x87), o3(0xE8,0x9E,0x88),
+     o3(0xE8,0x9E,0x89), o3(0xE8,0x9E,0x8B),
+     o3(0xE8,0x9E,0x8C), o3(0xE8,0x9E,0x90),
+     o3(0xE8,0x9E,0x93), o3(0xE8,0x9E,0x95),
+     o3(0xE8,0x9E,0x97), o3(0xE8,0x9E,0x98),
+     o3(0xE8,0x9E,0x99), o3(0xE8,0x9E,0x9E),
+     o3(0xE8,0x9E,0xA0), o3(0xE8,0x9E,0xA3),
+     o3(0xE8,0x9E,0xA7), o3(0xE8,0x9E,0xAC),
+     o3(0xE8,0x9E,0xAD), o3(0xE8,0x9E,0xAE),
+     o3(0xE8,0x9E,0xB1), o3(0xE8,0x9E,0xB5),
+     o3(0xE8,0x9E,0xBE), o3(0xE8,0x9E,0xBF),
+     o3(0xE8,0x9F,0x81), o3(0xE8,0x9F,0x88),
+     o3(0xE8,0x9F,0x89), o3(0xE8,0x9F,0x8A),
+     o3(0xE8,0x9F,0x8E), o3(0xE8,0x9F,0x95),
+     o3(0xE8,0x9F,0x96), o3(0xE8,0x9F,0x99),
+     o3(0xE8,0x9F,0x9A), o3(0xE8,0x9F,0x9C),
+     o3(0xE8,0x9F,0x9F), o3(0xE8,0x9F,0xA2),
+     o3(0xE8,0x9F,0xA3), o3(0xE8,0x9F,0xA4),
+     o3(0xE8,0x9F,0xAA), o3(0xE8,0x9F,0xAB),
+     o3(0xE8,0x9F,0xAD), o3(0xE8,0x9F,0xB1),
+     o3(0xE8,0x9F,0xB3), o3(0xE8,0x9F,0xB8),
+     o3(0xE8,0x9F,0xBA), o3(0xE8,0x9F,0xBF),
+     o3(0xE8,0xA0,0x81), o3(0xE8,0xA0,0x83),
+     o3(0xE8,0xA0,0x86), o3(0xE8,0xA0,0x89),
+     o3(0xE8,0xA0,0x8A), o3(0xE8,0xA0,0x8B),
+     o3(0xE8,0xA0,0x90), o3(0xE8,0xA0,0x99),
+     o3(0xE8,0xA0,0x92), o3(0xE8,0xA0,0x93),
+     o3(0xE8,0xA0,0x94), o3(0xE8,0xA0,0x98),
+     o3(0xE8,0xA0,0x9A), o3(0xE8,0xA0,0x9B),
+     o3(0xE8,0xA0,0x9C), o3(0xE8,0xA0,0x9E),
+     o3(0xE8,0xA0,0x9F), o3(0xE8,0xA0,0xA8),
+     o3(0xE8,0xA0,0xAD), o3(0xE8,0xA0,0xAE),
+     o3(0xE8,0xA0,0xB0), o3(0xE8,0xA0,0xB2),
+     o3(0xE8,0xA0,0xB5),
+
+#define from_EUC_JP_8F_DB WORDINDEX2INFO(4627)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DB_infos,
+
+#define from_EUC_JP_8F_DC_infos WORDINDEX2INFO(4629)
+                INVALID, o3(0xE8,0xA0,0xBA),
+     o3(0xE8,0xA0,0xBC), o3(0xE8,0xA1,0x81),
+     o3(0xE8,0xA1,0x83), o3(0xE8,0xA1,0x85),
+     o3(0xE8,0xA1,0x88), o3(0xE8,0xA1,0x89),
+     o3(0xE8,0xA1,0x8A), o3(0xE8,0xA1,0x8B),
+     o3(0xE8,0xA1,0x8E), o3(0xE8,0xA1,0x91),
+     o3(0xE8,0xA1,0x95), o3(0xE8,0xA1,0x96),
+     o3(0xE8,0xA1,0x98), o3(0xE8,0xA1,0x9A),
+     o3(0xE8,0xA1,0x9C), o3(0xE8,0xA1,0x9F),
+     o3(0xE8,0xA1,0xA0), o3(0xE8,0xA1,0xA4),
+     o3(0xE8,0xA1,0xA9), o3(0xE8,0xA1,0xB1),
+     o3(0xE8,0xA1,0xB9), o3(0xE8,0xA1,0xBB),
+     o3(0xE8,0xA2,0x80), o3(0xE8,0xA2,0x98),
+     o3(0xE8,0xA2,0x9A), o3(0xE8,0xA2,0x9B),
+     o3(0xE8,0xA2,0x9C), o3(0xE8,0xA2,0x9F),
+     o3(0xE8,0xA2,0xA0), o3(0xE8,0xA2,0xA8),
+     o3(0xE8,0xA2,0xAA), o3(0xE8,0xA2,0xBA),
+     o3(0xE8,0xA2,0xBD), o3(0xE8,0xA2,0xBE),
+     o3(0xE8,0xA3,0x80), o3(0xE8,0xA3,0x8A),
+     o3(0xE8,0xA3,0x8B), o3(0xE8,0xA3,0x8C),
+     o3(0xE8,0xA3,0x8D), o3(0xE8,0xA3,0x8E),
+     o3(0xE8,0xA3,0x91), o3(0xE8,0xA3,0x92),
+     o3(0xE8,0xA3,0x93), o3(0xE8,0xA3,0x9B),
+     o3(0xE8,0xA3,0x9E), o3(0xE8,0xA3,0xA7),
+     o3(0xE8,0xA3,0xAF), o3(0xE8,0xA3,0xB0),
+     o3(0xE8,0xA3,0xB1), o3(0xE8,0xA3,0xB5),
+     o3(0xE8,0xA3,0xB7), o3(0xE8,0xA4,0x81),
+     o3(0xE8,0xA4,0x86), o3(0xE8,0xA4,0x8D),
+     o3(0xE8,0xA4,0x8E), o3(0xE8,0xA4,0x8F),
+     o3(0xE8,0xA4,0x95), o3(0xE8,0xA4,0x96),
+     o3(0xE8,0xA4,0x98), o3(0xE8,0xA4,0x99),
+     o3(0xE8,0xA4,0x9A), o3(0xE8,0xA4,0x9C),
+     o3(0xE8,0xA4,0xA0), o3(0xE8,0xA4,0xA6),
+     o3(0xE8,0xA4,0xA7), o3(0xE8,0xA4,0xA8),
+     o3(0xE8,0xA4,0xB0), o3(0xE8,0xA4,0xB1),
+     o3(0xE8,0xA4,0xB2), o3(0xE8,0xA4,0xB5),
+     o3(0xE8,0xA4,0xB9), o3(0xE8,0xA4,0xBA),
+     o3(0xE8,0xA4,0xBE), o3(0xE8,0xA5,0x80),
+     o3(0xE8,0xA5,0x82), o3(0xE8,0xA5,0x85),
+     o3(0xE8,0xA5,0x86), o3(0xE8,0xA5,0x89),
+     o3(0xE8,0xA5,0x8F), o3(0xE8,0xA5,0x92),
+     o3(0xE8,0xA5,0x97), o3(0xE8,0xA5,0x9A),
+     o3(0xE8,0xA5,0x9B), o3(0xE8,0xA5,0x9C),
+     o3(0xE8,0xA5,0xA1), o3(0xE8,0xA5,0xA2),
+     o3(0xE8,0xA5,0xA3), o3(0xE8,0xA5,0xAB),
+     o3(0xE8,0xA5,0xAE), o3(0xE8,0xA5,0xB0),
+     o3(0xE8,0xA5,0xB3), o3(0xE8,0xA5,0xB5),
+     o3(0xE8,0xA5,0xBA),
+
+#define from_EUC_JP_8F_DC WORDINDEX2INFO(4724)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DC_infos,
+
+#define from_EUC_JP_8F_DD_infos WORDINDEX2INFO(4726)
+                INVALID, o3(0xE8,0xA5,0xBB),
+     o3(0xE8,0xA5,0xBC), o3(0xE8,0xA5,0xBD),
+     o3(0xE8,0xA6,0x89), o3(0xE8,0xA6,0x8D),
+     o3(0xE8,0xA6,0x90), o3(0xE8,0xA6,0x94),
+     o3(0xE8,0xA6,0x95), o3(0xE8,0xA6,0x9B),
+     o3(0xE8,0xA6,0x9C), o3(0xE8,0xA6,0x9F),
+     o3(0xE8,0xA6,0xA0), o3(0xE8,0xA6,0xA5),
+     o3(0xE8,0xA6,0xB0), o3(0xE8,0xA6,0xB4),
+     o3(0xE8,0xA6,0xB5), o3(0xE8,0xA6,0xB6),
+     o3(0xE8,0xA6,0xB7), o3(0xE8,0xA6,0xBC),
+     o3(0xE8,0xA7,0x94), o3(0xE8,0xA7,0x95),
+     o3(0xE8,0xA7,0x96), o3(0xE8,0xA7,0x97),
+     o3(0xE8,0xA7,0x98), o3(0xE8,0xA7,0xA5),
+     o3(0xE8,0xA7,0xA9), o3(0xE8,0xA7,0xAB),
+     o3(0xE8,0xA7,0xAD), o3(0xE8,0xA7,0xB1),
+     o3(0xE8,0xA7,0xB3), o3(0xE8,0xA7,0xB6),
+     o3(0xE8,0xA7,0xB9), o3(0xE8,0xA7,0xBD),
+     o3(0xE8,0xA7,0xBF), o3(0xE8,0xA8,0x84),
+     o3(0xE8,0xA8,0x85), o3(0xE8,0xA8,0x87),
+     o3(0xE8,0xA8,0x8F), o3(0xE8,0xA8,0x91),
+     o3(0xE8,0xA8,0x92), o3(0xE8,0xA8,0x94),
+     o3(0xE8,0xA8,0x95), o3(0xE8,0xA8,0x9E),
+     o3(0xE8,0xA8,0xA0), o3(0xE8,0xA8,0xA2),
+     o3(0xE8,0xA8,0xA4), o3(0xE8,0xA8,0xA6),
+     o3(0xE8,0xA8,0xAB), o3(0xE8,0xA8,0xAC),
+     o3(0xE8,0xA8,0xAF), o3(0xE8,0xA8,0xB5),
+     o3(0xE8,0xA8,0xB7), o3(0xE8,0xA8,0xBD),
+     o3(0xE8,0xA8,0xBE), o3(0xE8,0xA9,0x80),
+     o3(0xE8,0xA9,0x83), o3(0xE8,0xA9,0x85),
+     o3(0xE8,0xA9,0x87), o3(0xE8,0xA9,0x89),
+     o3(0xE8,0xA9,0x8D), o3(0xE8,0xA9,0x8E),
+     o3(0xE8,0xA9,0x93), o3(0xE8,0xA9,0x96),
+     o3(0xE8,0xA9,0x97), o3(0xE8,0xA9,0x98),
+     o3(0xE8,0xA9,0x9C), o3(0xE8,0xA9,0x9D),
+     o3(0xE8,0xA9,0xA1), o3(0xE8,0xA9,0xA5),
+     o3(0xE8,0xA9,0xA7), o3(0xE8,0xA9,0xB5),
+     o3(0xE8,0xA9,0xB6), o3(0xE8,0xA9,0xB7),
+     o3(0xE8,0xA9,0xB9), o3(0xE8,0xA9,0xBA),
+     o3(0xE8,0xA9,0xBB), o3(0xE8,0xA9,0xBE),
+     o3(0xE8,0xA9,0xBF), o3(0xE8,0xAA,0x80),
+     o3(0xE8,0xAA,0x83), o3(0xE8,0xAA,0x86),
+     o3(0xE8,0xAA,0x8B), o3(0xE8,0xAA,0x8F),
+     o3(0xE8,0xAA,0x90), o3(0xE8,0xAA,0x92),
+     o3(0xE8,0xAA,0x96), o3(0xE8,0xAA,0x97),
+     o3(0xE8,0xAA,0x99), o3(0xE8,0xAA,0x9F),
+     o3(0xE8,0xAA,0xA7), o3(0xE8,0xAA,0xA9),
+     o3(0xE8,0xAA,0xAE), o3(0xE8,0xAA,0xAF),
+     o3(0xE8,0xAA,0xB3),
+
+#define from_EUC_JP_8F_DD WORDINDEX2INFO(4821)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DD_infos,
+
+#define from_EUC_JP_8F_DE_infos WORDINDEX2INFO(4823)
+                INVALID, o3(0xE8,0xAA,0xB6),
+     o3(0xE8,0xAA,0xB7), o3(0xE8,0xAA,0xBB),
+     o3(0xE8,0xAA,0xBE), o3(0xE8,0xAB,0x83),
+     o3(0xE8,0xAB,0x86), o3(0xE8,0xAB,0x88),
+     o3(0xE8,0xAB,0x89), o3(0xE8,0xAB,0x8A),
+     o3(0xE8,0xAB,0x91), o3(0xE8,0xAB,0x93),
+     o3(0xE8,0xAB,0x94), o3(0xE8,0xAB,0x95),
+     o3(0xE8,0xAB,0x97), o3(0xE8,0xAB,0x9D),
+     o3(0xE8,0xAB,0x9F), o3(0xE8,0xAB,0xAC),
+     o3(0xE8,0xAB,0xB0), o3(0xE8,0xAB,0xB4),
+     o3(0xE8,0xAB,0xB5), o3(0xE8,0xAB,0xB6),
+     o3(0xE8,0xAB,0xBC), o3(0xE8,0xAB,0xBF),
+     o3(0xE8,0xAC,0x85), o3(0xE8,0xAC,0x86),
+     o3(0xE8,0xAC,0x8B), o3(0xE8,0xAC,0x91),
+     o3(0xE8,0xAC,0x9C), o3(0xE8,0xAC,0x9E),
+     o3(0xE8,0xAC,0x9F), o3(0xE8,0xAC,0x8A),
+     o3(0xE8,0xAC,0xAD), o3(0xE8,0xAC,0xB0),
+     o3(0xE8,0xAC,0xB7), o3(0xE8,0xAC,0xBC),
+     o3(0xE8,0xAD,0x82), o3(0xE8,0xAD,0x83),
+     o3(0xE8,0xAD,0x84), o3(0xE8,0xAD,0x85),
+     o3(0xE8,0xAD,0x86), o3(0xE8,0xAD,0x88),
+     o3(0xE8,0xAD,0x92), o3(0xE8,0xAD,0x93),
+     o3(0xE8,0xAD,0x94), o3(0xE8,0xAD,0x99),
+     o3(0xE8,0xAD,0x8D), o3(0xE8,0xAD,0x9E),
+     o3(0xE8,0xAD,0xA3), o3(0xE8,0xAD,0xAD),
+     o3(0xE8,0xAD,0xB6), o3(0xE8,0xAD,0xB8),
+     o3(0xE8,0xAD,0xB9), o3(0xE8,0xAD,0xBC),
+     o3(0xE8,0xAD,0xBE), o3(0xE8,0xAE,0x81),
+     o3(0xE8,0xAE,0x84), o3(0xE8,0xAE,0x85),
+     o3(0xE8,0xAE,0x8B), o3(0xE8,0xAE,0x8D),
+     o3(0xE8,0xAE,0x8F), o3(0xE8,0xAE,0x94),
+     o3(0xE8,0xAE,0x95), o3(0xE8,0xAE,0x9C),
+     o3(0xE8,0xAE,0x9E), o3(0xE8,0xAE,0x9F),
+     o3(0xE8,0xB0,0xB8), o3(0xE8,0xB0,0xB9),
+     o3(0xE8,0xB0,0xBD), o3(0xE8,0xB0,0xBE),
+     o3(0xE8,0xB1,0x85), o3(0xE8,0xB1,0x87),
+     o3(0xE8,0xB1,0x89), o3(0xE8,0xB1,0x8B),
+     o3(0xE8,0xB1,0x8F), o3(0xE8,0xB1,0x91),
+     o3(0xE8,0xB1,0x93), o3(0xE8,0xB1,0x94),
+     o3(0xE8,0xB1,0x97), o3(0xE8,0xB1,0x98),
+     o3(0xE8,0xB1,0x9B), o3(0xE8,0xB1,0x9D),
+     o3(0xE8,0xB1,0x99), o3(0xE8,0xB1,0xA3),
+     o3(0xE8,0xB1,0xA4), o3(0xE8,0xB1,0xA6),
+     o3(0xE8,0xB1,0xA8), o3(0xE8,0xB1,0xA9),
+     o3(0xE8,0xB1,0xAD), o3(0xE8,0xB1,0xB3),
+     o3(0xE8,0xB1,0xB5), o3(0xE8,0xB1,0xB6),
+     o3(0xE8,0xB1,0xBB), o3(0xE8,0xB1,0xBE),
+     o3(0xE8,0xB2,0x86),
+
+#define from_EUC_JP_8F_DE WORDINDEX2INFO(4918)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DE_infos,
+
+#define from_EUC_JP_8F_DF_infos WORDINDEX2INFO(4920)
+                INVALID, o3(0xE8,0xB2,0x87),
+     o3(0xE8,0xB2,0x8B), o3(0xE8,0xB2,0x90),
+     o3(0xE8,0xB2,0x92), o3(0xE8,0xB2,0x93),
+     o3(0xE8,0xB2,0x99), o3(0xE8,0xB2,0x9B),
+     o3(0xE8,0xB2,0x9C), o3(0xE8,0xB2,0xA4),
+     o3(0xE8,0xB2,0xB9), o3(0xE8,0xB2,0xBA),
+     o3(0xE8,0xB3,0x85), o3(0xE8,0xB3,0x86),
+     o3(0xE8,0xB3,0x89), o3(0xE8,0xB3,0x8B),
+     o3(0xE8,0xB3,0x8F), o3(0xE8,0xB3,0x96),
+     o3(0xE8,0xB3,0x95), o3(0xE8,0xB3,0x99),
+     o3(0xE8,0xB3,0x9D), o3(0xE8,0xB3,0xA1),
+     o3(0xE8,0xB3,0xA8), o3(0xE8,0xB3,0xAC),
+     o3(0xE8,0xB3,0xAF), o3(0xE8,0xB3,0xB0),
+     o3(0xE8,0xB3,0xB2), o3(0xE8,0xB3,0xB5),
+     o3(0xE8,0xB3,0xB7), o3(0xE8,0xB3,0xB8),
+     o3(0xE8,0xB3,0xBE), o3(0xE8,0xB3,0xBF),
+     o3(0xE8,0xB4,0x81), o3(0xE8,0xB4,0x83),
+     o3(0xE8,0xB4,0x89), o3(0xE8,0xB4,0x92),
+     o3(0xE8,0xB4,0x97), o3(0xE8,0xB4,0x9B),
+     o3(0xE8,0xB5,0xA5), o3(0xE8,0xB5,0xA9),
+     o3(0xE8,0xB5,0xAC), o3(0xE8,0xB5,0xAE),
+     o3(0xE8,0xB5,0xBF), o3(0xE8,0xB6,0x82),
+     o3(0xE8,0xB6,0x84), o3(0xE8,0xB6,0x88),
+     o3(0xE8,0xB6,0x8D), o3(0xE8,0xB6,0x90),
+     o3(0xE8,0xB6,0x91), o3(0xE8,0xB6,0x95),
+     o3(0xE8,0xB6,0x9E), o3(0xE8,0xB6,0x9F),
+     o3(0xE8,0xB6,0xA0), o3(0xE8,0xB6,0xA6),
+     o3(0xE8,0xB6,0xAB), o3(0xE8,0xB6,0xAC),
+     o3(0xE8,0xB6,0xAF), o3(0xE8,0xB6,0xB2),
+     o3(0xE8,0xB6,0xB5), o3(0xE8,0xB6,0xB7),
+     o3(0xE8,0xB6,0xB9), o3(0xE8,0xB6,0xBB),
+     o3(0xE8,0xB7,0x80), o3(0xE8,0xB7,0x85),
+     o3(0xE8,0xB7,0x86), o3(0xE8,0xB7,0x87),
+     o3(0xE8,0xB7,0x88), o3(0xE8,0xB7,0x8A),
+     o3(0xE8,0xB7,0x8E), o3(0xE8,0xB7,0x91),
+     o3(0xE8,0xB7,0x94), o3(0xE8,0xB7,0x95),
+     o3(0xE8,0xB7,0x97), o3(0xE8,0xB7,0x99),
+     o3(0xE8,0xB7,0xA4), o3(0xE8,0xB7,0xA5),
+     o3(0xE8,0xB7,0xA7), o3(0xE8,0xB7,0xAC),
+     o3(0xE8,0xB7,0xB0), o3(0xE8,0xB6,0xBC),
+     o3(0xE8,0xB7,0xB1), o3(0xE8,0xB7,0xB2),
+     o3(0xE8,0xB7,0xB4), o3(0xE8,0xB7,0xBD),
+     o3(0xE8,0xB8,0x81), o3(0xE8,0xB8,0x84),
+     o3(0xE8,0xB8,0x85), o3(0xE8,0xB8,0x86),
+     o3(0xE8,0xB8,0x8B), o3(0xE8,0xB8,0x91),
+     o3(0xE8,0xB8,0x94), o3(0xE8,0xB8,0x96),
+     o3(0xE8,0xB8,0xA0), o3(0xE8,0xB8,0xA1),
+     o3(0xE8,0xB8,0xA2),
+
+#define from_EUC_JP_8F_DF WORDINDEX2INFO(5015)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_DF_infos,
+
+#define from_EUC_JP_8F_E0_infos WORDINDEX2INFO(5017)
+                INVALID, o3(0xE8,0xB8,0xA3),
+     o3(0xE8,0xB8,0xA6), o3(0xE8,0xB8,0xA7),
+     o3(0xE8,0xB8,0xB1), o3(0xE8,0xB8,0xB3),
+     o3(0xE8,0xB8,0xB6), o3(0xE8,0xB8,0xB7),
+     o3(0xE8,0xB8,0xB8), o3(0xE8,0xB8,0xB9),
+     o3(0xE8,0xB8,0xBD), o3(0xE8,0xB9,0x80),
+     o3(0xE8,0xB9,0x81), o3(0xE8,0xB9,0x8B),
+     o3(0xE8,0xB9,0x8D), o3(0xE8,0xB9,0x8E),
+     o3(0xE8,0xB9,0x8F), o3(0xE8,0xB9,0x94),
+     o3(0xE8,0xB9,0x9B), o3(0xE8,0xB9,0x9C),
+     o3(0xE8,0xB9,0x9D), o3(0xE8,0xB9,0x9E),
+     o3(0xE8,0xB9,0xA1), o3(0xE8,0xB9,0xA2),
+     o3(0xE8,0xB9,0xA9), o3(0xE8,0xB9,0xAC),
+     o3(0xE8,0xB9,0xAD), o3(0xE8,0xB9,0xAF),
+     o3(0xE8,0xB9,0xB0), o3(0xE8,0xB9,0xB1),
+     o3(0xE8,0xB9,0xB9), o3(0xE8,0xB9,0xBA),
+     o3(0xE8,0xB9,0xBB), o3(0xE8,0xBA,0x82),
+     o3(0xE8,0xBA,0x83), o3(0xE8,0xBA,0x89),
+     o3(0xE8,0xBA,0x90), o3(0xE8,0xBA,0x92),
+     o3(0xE8,0xBA,0x95), o3(0xE8,0xBA,0x9A),
+     o3(0xE8,0xBA,0x9B), o3(0xE8,0xBA,0x9D),
+     o3(0xE8,0xBA,0x9E), o3(0xE8,0xBA,0xA2),
+     o3(0xE8,0xBA,0xA7), o3(0xE8,0xBA,0xA9),
+     o3(0xE8,0xBA,0xAD), o3(0xE8,0xBA,0xAE),
+     o3(0xE8,0xBA,0xB3), o3(0xE8,0xBA,0xB5),
+     o3(0xE8,0xBA,0xBA), o3(0xE8,0xBA,0xBB),
+     o3(0xE8,0xBB,0x80), o3(0xE8,0xBB,0x81),
+     o3(0xE8,0xBB,0x83), o3(0xE8,0xBB,0x84),
+     o3(0xE8,0xBB,0x87), o3(0xE8,0xBB,0x8F),
+     o3(0xE8,0xBB,0x91), o3(0xE8,0xBB,0x94),
+     o3(0xE8,0xBB,0x9C), o3(0xE8,0xBB,0xA8),
+     o3(0xE8,0xBB,0xAE), o3(0xE8,0xBB,0xB0),
+     o3(0xE8,0xBB,0xB1), o3(0xE8,0xBB,0xB7),
+     o3(0xE8,0xBB,0xB9), o3(0xE8,0xBB,0xBA),
+     o3(0xE8,0xBB,0xAD), o3(0xE8,0xBC,0x80),
+     o3(0xE8,0xBC,0x82), o3(0xE8,0xBC,0x87),
+     o3(0xE8,0xBC,0x88), o3(0xE8,0xBC,0x8F),
+     o3(0xE8,0xBC,0x90), o3(0xE8,0xBC,0x96),
+     o3(0xE8,0xBC,0x97), o3(0xE8,0xBC,0x98),
+     o3(0xE8,0xBC,0x9E), o3(0xE8,0xBC,0xA0),
+     o3(0xE8,0xBC,0xA1), o3(0xE8,0xBC,0xA3),
+     o3(0xE8,0xBC,0xA5), o3(0xE8,0xBC,0xA7),
+     o3(0xE8,0xBC,0xA8), o3(0xE8,0xBC,0xAC),
+     o3(0xE8,0xBC,0xAD), o3(0xE8,0xBC,0xAE),
+     o3(0xE8,0xBC,0xB4), o3(0xE8,0xBC,0xB5),
+     o3(0xE8,0xBC,0xB6), o3(0xE8,0xBC,0xB7),
+     o3(0xE8,0xBC,0xBA), o3(0xE8,0xBD,0x80),
+     o3(0xE8,0xBD,0x81),
+
+#define from_EUC_JP_8F_E0 WORDINDEX2INFO(5112)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E0_infos,
+
+#define from_EUC_JP_8F_E1_infos WORDINDEX2INFO(5114)
+                INVALID, o3(0xE8,0xBD,0x83),
+     o3(0xE8,0xBD,0x87), o3(0xE8,0xBD,0x8F),
+     o3(0xE8,0xBD,0x91), o3(0xE8,0xBD,0x92),
+     o3(0xE8,0xBD,0x93), o3(0xE8,0xBD,0x94),
+     o3(0xE8,0xBD,0x95), o3(0xE8,0xBD,0x98),
+     o3(0xE8,0xBD,0x9D), o3(0xE8,0xBD,0x9E),
+     o3(0xE8,0xBD,0xA5), o3(0xE8,0xBE,0x9D),
+     o3(0xE8,0xBE,0xA0), o3(0xE8,0xBE,0xA1),
+     o3(0xE8,0xBE,0xA4), o3(0xE8,0xBE,0xA5),
+     o3(0xE8,0xBE,0xA6), o3(0xE8,0xBE,0xB5),
+     o3(0xE8,0xBE,0xB6), o3(0xE8,0xBE,0xB8),
+     o3(0xE8,0xBE,0xBE), o3(0xE8,0xBF,0x80),
+     o3(0xE8,0xBF,0x81), o3(0xE8,0xBF,0x86),
+     o3(0xE8,0xBF,0x8A), o3(0xE8,0xBF,0x8B),
+     o3(0xE8,0xBF,0x8D), o3(0xE8,0xBF,0x90),
+     o3(0xE8,0xBF,0x92), o3(0xE8,0xBF,0x93),
+     o3(0xE8,0xBF,0x95), o3(0xE8,0xBF,0xA0),
+     o3(0xE8,0xBF,0xA3), o3(0xE8,0xBF,0xA4),
+     o3(0xE8,0xBF,0xA8), o3(0xE8,0xBF,0xAE),
+     o3(0xE8,0xBF,0xB1), o3(0xE8,0xBF,0xB5),
+     o3(0xE8,0xBF,0xB6), o3(0xE8,0xBF,0xBB),
+     o3(0xE8,0xBF,0xBE), o3(0xE9,0x80,0x82),
+     o3(0xE9,0x80,0x84), o3(0xE9,0x80,0x88),
+     o3(0xE9,0x80,0x8C), o3(0xE9,0x80,0x98),
+     o3(0xE9,0x80,0x9B), o3(0xE9,0x80,0xA8),
+     o3(0xE9,0x80,0xA9), o3(0xE9,0x80,0xAF),
+     o3(0xE9,0x80,0xAA), o3(0xE9,0x80,0xAC),
+     o3(0xE9,0x80,0xAD), o3(0xE9,0x80,0xB3),
+     o3(0xE9,0x80,0xB4), o3(0xE9,0x80,0xB7),
+     o3(0xE9,0x80,0xBF), o3(0xE9,0x81,0x83),
+     o3(0xE9,0x81,0x84), o3(0xE9,0x81,0x8C),
+     o3(0xE9,0x81,0x9B), o3(0xE9,0x81,0x9D),
+     o3(0xE9,0x81,0xA2), o3(0xE9,0x81,0xA6),
+     o3(0xE9,0x81,0xA7), o3(0xE9,0x81,0xAC),
+     o3(0xE9,0x81,0xB0), o3(0xE9,0x81,0xB4),
+     o3(0xE9,0x81,0xB9), o3(0xE9,0x82,0x85),
+     o3(0xE9,0x82,0x88), o3(0xE9,0x82,0x8B),
+     o3(0xE9,0x82,0x8C), o3(0xE9,0x82,0x8E),
+     o3(0xE9,0x82,0x90), o3(0xE9,0x82,0x95),
+     o3(0xE9,0x82,0x97), o3(0xE9,0x82,0x98),
+     o3(0xE9,0x82,0x99), o3(0xE9,0x82,0x9B),
+     o3(0xE9,0x82,0xA0), o3(0xE9,0x82,0xA1),
+     o3(0xE9,0x82,0xA2), o3(0xE9,0x82,0xA5),
+     o3(0xE9,0x82,0xB0), o3(0xE9,0x82,0xB2),
+     o3(0xE9,0x82,0xB3), o3(0xE9,0x82,0xB4),
+     o3(0xE9,0x82,0xB6), o3(0xE9,0x82,0xBD),
+     o3(0xE9,0x83,0x8C), o3(0xE9,0x82,0xBE),
+     o3(0xE9,0x83,0x83),
+
+#define from_EUC_JP_8F_E1 WORDINDEX2INFO(5209)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E1_infos,
+
+#define from_EUC_JP_8F_E2_infos WORDINDEX2INFO(5211)
+                INVALID, o3(0xE9,0x83,0x84),
+     o3(0xE9,0x83,0x85), o3(0xE9,0x83,0x87),
+     o3(0xE9,0x83,0x88), o3(0xE9,0x83,0x95),
+     o3(0xE9,0x83,0x97), o3(0xE9,0x83,0x98),
+     o3(0xE9,0x83,0x99), o3(0xE9,0x83,0x9C),
+     o3(0xE9,0x83,0x9D), o3(0xE9,0x83,0x9F),
+     o3(0xE9,0x83,0xA5), o3(0xE9,0x83,0x92),
+     o3(0xE9,0x83,0xB6), o3(0xE9,0x83,0xAB),
+     o3(0xE9,0x83,0xAF), o3(0xE9,0x83,0xB0),
+     o3(0xE9,0x83,0xB4), o3(0xE9,0x83,0xBE),
+     o3(0xE9,0x83,0xBF), o3(0xE9,0x84,0x80),
+     o3(0xE9,0x84,0x84), o3(0xE9,0x84,0x85),
+     o3(0xE9,0x84,0x86), o3(0xE9,0x84,0x88),
+     o3(0xE9,0x84,0x8D), o3(0xE9,0x84,0x90),
+     o3(0xE9,0x84,0x94), o3(0xE9,0x84,0x96),
+     o3(0xE9,0x84,0x97), o3(0xE9,0x84,0x98),
+     o3(0xE9,0x84,0x9A), o3(0xE9,0x84,0x9C),
+     o3(0xE9,0x84,0x9E), o3(0xE9,0x84,0xA0),
+     o3(0xE9,0x84,0xA5), o3(0xE9,0x84,0xA2),
+     o3(0xE9,0x84,0xA3), o3(0xE9,0x84,0xA7),
+     o3(0xE9,0x84,0xA9), o3(0xE9,0x84,0xAE),
+     o3(0xE9,0x84,0xAF), o3(0xE9,0x84,0xB1),
+     o3(0xE9,0x84,0xB4), o3(0xE9,0x84,0xB6),
+     o3(0xE9,0x84,0xB7), o3(0xE9,0x84,0xB9),
+     o3(0xE9,0x84,0xBA), o3(0xE9,0x84,0xBC),
+     o3(0xE9,0x84,0xBD), o3(0xE9,0x85,0x83),
+     o3(0xE9,0x85,0x87), o3(0xE9,0x85,0x88),
+     o3(0xE9,0x85,0x8F), o3(0xE9,0x85,0x93),
+     o3(0xE9,0x85,0x97), o3(0xE9,0x85,0x99),
+     o3(0xE9,0x85,0x9A), o3(0xE9,0x85,0x9B),
+     o3(0xE9,0x85,0xA1), o3(0xE9,0x85,0xA4),
+     o3(0xE9,0x85,0xA7), o3(0xE9,0x85,0xAD),
+     o3(0xE9,0x85,0xB4), o3(0xE9,0x85,0xB9),
+     o3(0xE9,0x85,0xBA), o3(0xE9,0x85,0xBB),
+     o3(0xE9,0x86,0x81), o3(0xE9,0x86,0x83),
+     o3(0xE9,0x86,0x85), o3(0xE9,0x86,0x86),
+     o3(0xE9,0x86,0x8A), o3(0xE9,0x86,0x8E),
+     o3(0xE9,0x86,0x91), o3(0xE9,0x86,0x93),
+     o3(0xE9,0x86,0x94), o3(0xE9,0x86,0x95),
+     o3(0xE9,0x86,0x98), o3(0xE9,0x86,0x9E),
+     o3(0xE9,0x86,0xA1), o3(0xE9,0x86,0xA6),
+     o3(0xE9,0x86,0xA8), o3(0xE9,0x86,0xAC),
+     o3(0xE9,0x86,0xAD), o3(0xE9,0x86,0xAE),
+     o3(0xE9,0x86,0xB0), o3(0xE9,0x86,0xB1),
+     o3(0xE9,0x86,0xB2), o3(0xE9,0x86,0xB3),
+     o3(0xE9,0x86,0xB6), o3(0xE9,0x86,0xBB),
+     o3(0xE9,0x86,0xBC), o3(0xE9,0x86,0xBD),
+     o3(0xE9,0x86,0xBF),
+
+#define from_EUC_JP_8F_E2 WORDINDEX2INFO(5306)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E2_infos,
+
+#define from_EUC_JP_8F_E3_infos WORDINDEX2INFO(5308)
+                INVALID, o3(0xE9,0x87,0x82),
+     o3(0xE9,0x87,0x83), o3(0xE9,0x87,0x85),
+     o3(0xE9,0x87,0x93), o3(0xE9,0x87,0x94),
+     o3(0xE9,0x87,0x97), o3(0xE9,0x87,0x99),
+     o3(0xE9,0x87,0x9A), o3(0xE9,0x87,0x9E),
+     o3(0xE9,0x87,0xA4), o3(0xE9,0x87,0xA5),
+     o3(0xE9,0x87,0xA9), o3(0xE9,0x87,0xAA),
+     o3(0xE9,0x87,0xAC), o3(0xE9,0x87,0xAD),
+     o3(0xE9,0x87,0xAE), o3(0xE9,0x87,0xAF),
+     o3(0xE9,0x87,0xB0), o3(0xE9,0x87,0xB1),
+     o3(0xE9,0x87,0xB7), o3(0xE9,0x87,0xB9),
+     o3(0xE9,0x87,0xBB), o3(0xE9,0x87,0xBD),
+     o3(0xE9,0x88,0x80), o3(0xE9,0x88,0x81),
+     o3(0xE9,0x88,0x84), o3(0xE9,0x88,0x85),
+     o3(0xE9,0x88,0x86), o3(0xE9,0x88,0x87),
+     o3(0xE9,0x88,0x89), o3(0xE9,0x88,0x8A),
+     o3(0xE9,0x88,0x8C), o3(0xE9,0x88,0x90),
+     o3(0xE9,0x88,0x92), o3(0xE9,0x88,0x93),
+     o3(0xE9,0x88,0x96), o3(0xE9,0x88,0x98),
+     o3(0xE9,0x88,0x9C), o3(0xE9,0x88,0x9D),
+     o3(0xE9,0x88,0xA3), o3(0xE9,0x88,0xA4),
+     o3(0xE9,0x88,0xA5), o3(0xE9,0x88,0xA6),
+     o3(0xE9,0x88,0xA8), o3(0xE9,0x88,0xAE),
+     o3(0xE9,0x88,0xAF), o3(0xE9,0x88,0xB0),
+     o3(0xE9,0x88,0xB3), o3(0xE9,0x88,0xB5),
+     o3(0xE9,0x88,0xB6), o3(0xE9,0x88,0xB8),
+     o3(0xE9,0x88,0xB9), o3(0xE9,0x88,0xBA),
+     o3(0xE9,0x88,0xBC), o3(0xE9,0x88,0xBE),
+     o3(0xE9,0x89,0x80), o3(0xE9,0x89,0x82),
+     o3(0xE9,0x89,0x83), o3(0xE9,0x89,0x86),
+     o3(0xE9,0x89,0x87), o3(0xE9,0x89,0x8A),
+     o3(0xE9,0x89,0x8D), o3(0xE9,0x89,0x8E),
+     o3(0xE9,0x89,0x8F), o3(0xE9,0x89,0x91),
+     o3(0xE9,0x89,0x98), o3(0xE9,0x89,0x99),
+     o3(0xE9,0x89,0x9C), o3(0xE9,0x89,0x9D),
+     o3(0xE9,0x89,0xA0), o3(0xE9,0x89,0xA1),
+     o3(0xE9,0x89,0xA5), o3(0xE9,0x89,0xA7),
+     o3(0xE9,0x89,0xA8), o3(0xE9,0x89,0xA9),
+     o3(0xE9,0x89,0xAE), o3(0xE9,0x89,0xAF),
+     o3(0xE9,0x89,0xB0), o3(0xE9,0x89,0xB5),
+     o3(0xE9,0x89,0xB6), o3(0xE9,0x89,0xB7),
+     o3(0xE9,0x89,0xB8), o3(0xE9,0x89,0xB9),
+     o3(0xE9,0x89,0xBB), o3(0xE9,0x89,0xBC),
+     o3(0xE9,0x89,0xBD), o3(0xE9,0x89,0xBF),
+     o3(0xE9,0x8A,0x88), o3(0xE9,0x8A,0x89),
+     o3(0xE9,0x8A,0x8A), o3(0xE9,0x8A,0x8D),
+     o3(0xE9,0x8A,0x8E), o3(0xE9,0x8A,0x92),
+     o3(0xE9,0x8A,0x97),
+
+#define from_EUC_JP_8F_E3 WORDINDEX2INFO(5403)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E3_infos,
+
+#define from_EUC_JP_8F_E4_infos WORDINDEX2INFO(5405)
+                INVALID, o3(0xE9,0x8A,0x99),
+     o3(0xE9,0x8A,0x9F), o3(0xE9,0x8A,0xA0),
+     o3(0xE9,0x8A,0xA4), o3(0xE9,0x8A,0xA5),
+     o3(0xE9,0x8A,0xA7), o3(0xE9,0x8A,0xA8),
+     o3(0xE9,0x8A,0xAB), o3(0xE9,0x8A,0xAF),
+     o3(0xE9,0x8A,0xB2), o3(0xE9,0x8A,0xB6),
+     o3(0xE9,0x8A,0xB8), o3(0xE9,0x8A,0xBA),
+     o3(0xE9,0x8A,0xBB), o3(0xE9,0x8A,0xBC),
+     o3(0xE9,0x8A,0xBD), o3(0xE9,0x8A,0xBF),
+     o3(0xE9,0x8B,0x80), o3(0xE9,0x8B,0x81),
+     o3(0xE9,0x8B,0x82), o3(0xE9,0x8B,0x83),
+     o3(0xE9,0x8B,0x85), o3(0xE9,0x8B,0x86),
+     o3(0xE9,0x8B,0x87), o3(0xE9,0x8B,0x88),
+     o3(0xE9,0x8B,0x8B), o3(0xE9,0x8B,0x8C),
+     o3(0xE9,0x8B,0x8D), o3(0xE9,0x8B,0x8E),
+     o3(0xE9,0x8B,0x90), o3(0xE9,0x8B,0x93),
+     o3(0xE9,0x8B,0x95), o3(0xE9,0x8B,0x97),
+     o3(0xE9,0x8B,0x98), o3(0xE9,0x8B,0x99),
+     o3(0xE9,0x8B,0x9C), o3(0xE9,0x8B,0x9D),
+     o3(0xE9,0x8B,0x9F), o3(0xE9,0x8B,0xA0),
+     o3(0xE9,0x8B,0xA1), o3(0xE9,0x8B,0xA3),
+     o3(0xE9,0x8B,0xA5), o3(0xE9,0x8B,0xA7),
+     o3(0xE9,0x8B,0xA8), o3(0xE9,0x8B,0xAC),
+     o3(0xE9,0x8B,0xAE), o3(0xE9,0x8B,0xB0),
+     o3(0xE9,0x8B,0xB9), o3(0xE9,0x8B,0xBB),
+     o3(0xE9,0x8B,0xBF), o3(0xE9,0x8C,0x80),
+     o3(0xE9,0x8C,0x82), o3(0xE9,0x8C,0x88),
+     o3(0xE9,0x8C,0x8D), o3(0xE9,0x8C,0x91),
+     o3(0xE9,0x8C,0x94), o3(0xE9,0x8C,0x95),
+     o3(0xE9,0x8C,0x9C), o3(0xE9,0x8C,0x9D),
+     o3(0xE9,0x8C,0x9E), o3(0xE9,0x8C,0x9F),
+     o3(0xE9,0x8C,0xA1), o3(0xE9,0x8C,0xA4),
+     o3(0xE9,0x8C,0xA5), o3(0xE9,0x8C,0xA7),
+     o3(0xE9,0x8C,0xA9), o3(0xE9,0x8C,0xAA),
+     o3(0xE9,0x8C,0xB3), o3(0xE9,0x8C,0xB4),
+     o3(0xE9,0x8C,0xB6), o3(0xE9,0x8C,0xB7),
+     o3(0xE9,0x8D,0x87), o3(0xE9,0x8D,0x88),
+     o3(0xE9,0x8D,0x89), o3(0xE9,0x8D,0x90),
+     o3(0xE9,0x8D,0x91), o3(0xE9,0x8D,0x92),
+     o3(0xE9,0x8D,0x95), o3(0xE9,0x8D,0x97),
+     o3(0xE9,0x8D,0x98), o3(0xE9,0x8D,0x9A),
+     o3(0xE9,0x8D,0x9E), o3(0xE9,0x8D,0xA4),
+     o3(0xE9,0x8D,0xA5), o3(0xE9,0x8D,0xA7),
+     o3(0xE9,0x8D,0xA9), o3(0xE9,0x8D,0xAA),
+     o3(0xE9,0x8D,0xAD), o3(0xE9,0x8D,0xAF),
+     o3(0xE9,0x8D,0xB0), o3(0xE9,0x8D,0xB1),
+     o3(0xE9,0x8D,0xB3), o3(0xE9,0x8D,0xB4),
+     o3(0xE9,0x8D,0xB6),
+
+#define from_EUC_JP_8F_E4 WORDINDEX2INFO(5500)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E4_infos,
+
+#define from_EUC_JP_8F_E5_infos WORDINDEX2INFO(5502)
+                INVALID, o3(0xE9,0x8D,0xBA),
+     o3(0xE9,0x8D,0xBD), o3(0xE9,0x8D,0xBF),
+     o3(0xE9,0x8E,0x80), o3(0xE9,0x8E,0x81),
+     o3(0xE9,0x8E,0x82), o3(0xE9,0x8E,0x88),
+     o3(0xE9,0x8E,0x8A), o3(0xE9,0x8E,0x8B),
+     o3(0xE9,0x8E,0x8D), o3(0xE9,0x8E,0x8F),
+     o3(0xE9,0x8E,0x92), o3(0xE9,0x8E,0x95),
+     o3(0xE9,0x8E,0x98), o3(0xE9,0x8E,0x9B),
+     o3(0xE9,0x8E,0x9E), o3(0xE9,0x8E,0xA1),
+     o3(0xE9,0x8E,0xA3), o3(0xE9,0x8E,0xA4),
+     o3(0xE9,0x8E,0xA6), o3(0xE9,0x8E,0xA8),
+     o3(0xE9,0x8E,0xAB), o3(0xE9,0x8E,0xB4),
+     o3(0xE9,0x8E,0xB5), o3(0xE9,0x8E,0xB6),
+     o3(0xE9,0x8E,0xBA), o3(0xE9,0x8E,0xA9),
+     o3(0xE9,0x8F,0x81), o3(0xE9,0x8F,0x84),
+     o3(0xE9,0x8F,0x85), o3(0xE9,0x8F,0x86),
+     o3(0xE9,0x8F,0x87), o3(0xE9,0x8F,0x89),
+     o3(0xE9,0x8F,0x8A), o3(0xE9,0x8F,0x8B),
+     o3(0xE9,0x8F,0x8C), o3(0xE9,0x8F,0x8D),
+     o3(0xE9,0x8F,0x93), o3(0xE9,0x8F,0x99),
+     o3(0xE9,0x8F,0x9C), o3(0xE9,0x8F,0x9E),
+     o3(0xE9,0x8F,0x9F), o3(0xE9,0x8F,0xA2),
+     o3(0xE9,0x8F,0xA6), o3(0xE9,0x8F,0xA7),
+     o3(0xE9,0x8F,0xB9), o3(0xE9,0x8F,0xB7),
+     o3(0xE9,0x8F,0xB8), o3(0xE9,0x8F,0xBA),
+     o3(0xE9,0x8F,0xBB), o3(0xE9,0x8F,0xBD),
+     o3(0xE9,0x90,0x81), o3(0xE9,0x90,0x82),
+     o3(0xE9,0x90,0x84), o3(0xE9,0x90,0x88),
+     o3(0xE9,0x90,0x89), o3(0xE9,0x90,0x8D),
+     o3(0xE9,0x90,0x8E), o3(0xE9,0x90,0x8F),
+     o3(0xE9,0x90,0x95), o3(0xE9,0x90,0x96),
+     o3(0xE9,0x90,0x97), o3(0xE9,0x90,0x9F),
+     o3(0xE9,0x90,0xAE), o3(0xE9,0x90,0xAF),
+     o3(0xE9,0x90,0xB1), o3(0xE9,0x90,0xB2),
+     o3(0xE9,0x90,0xB3), o3(0xE9,0x90,0xB4),
+     o3(0xE9,0x90,0xBB), o3(0xE9,0x90,0xBF),
+     o3(0xE9,0x90,0xBD), o3(0xE9,0x91,0x83),
+     o3(0xE9,0x91,0x85), o3(0xE9,0x91,0x88),
+     o3(0xE9,0x91,0x8A), o3(0xE9,0x91,0x8C),
+     o3(0xE9,0x91,0x95), o3(0xE9,0x91,0x99),
+     o3(0xE9,0x91,0x9C), o3(0xE9,0x91,0x9F),
+     o3(0xE9,0x91,0xA1), o3(0xE9,0x91,0xA3),
+     o3(0xE9,0x91,0xA8), o3(0xE9,0x91,0xAB),
+     o3(0xE9,0x91,0xAD), o3(0xE9,0x91,0xAE),
+     o3(0xE9,0x91,0xAF), o3(0xE9,0x91,0xB1),
+     o3(0xE9,0x91,0xB2), o3(0xE9,0x92,0x84),
+     o3(0xE9,0x92,0x83), o3(0xE9,0x95,0xB8),
+     o3(0xE9,0x95,0xB9),
+
+#define from_EUC_JP_8F_E5 WORDINDEX2INFO(5597)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E5_infos,
+
+#define from_EUC_JP_8F_E6_infos WORDINDEX2INFO(5599)
+                INVALID, o3(0xE9,0x95,0xBE),
+     o3(0xE9,0x96,0x84), o3(0xE9,0x96,0x88),
+     o3(0xE9,0x96,0x8C), o3(0xE9,0x96,0x8D),
+     o3(0xE9,0x96,0x8E), o3(0xE9,0x96,0x9D),
+     o3(0xE9,0x96,0x9E), o3(0xE9,0x96,0x9F),
+     o3(0xE9,0x96,0xA1), o3(0xE9,0x96,0xA6),
+     o3(0xE9,0x96,0xA9), o3(0xE9,0x96,0xAB),
+     o3(0xE9,0x96,0xAC), o3(0xE9,0x96,0xB4),
+     o3(0xE9,0x96,0xB6), o3(0xE9,0x96,0xBA),
+     o3(0xE9,0x96,0xBD), o3(0xE9,0x96,0xBF),
+     o3(0xE9,0x97,0x86), o3(0xE9,0x97,0x88),
+     o3(0xE9,0x97,0x89), o3(0xE9,0x97,0x8B),
+     o3(0xE9,0x97,0x90), o3(0xE9,0x97,0x91),
+     o3(0xE9,0x97,0x92), o3(0xE9,0x97,0x93),
+     o3(0xE9,0x97,0x99), o3(0xE9,0x97,0x9A),
+     o3(0xE9,0x97,0x9D), o3(0xE9,0x97,0x9E),
+     o3(0xE9,0x97,0x9F), o3(0xE9,0x97,0xA0),
+     o3(0xE9,0x97,0xA4), o3(0xE9,0x97,0xA6),
+     o3(0xE9,0x98,0x9D), o3(0xE9,0x98,0x9E),
+     o3(0xE9,0x98,0xA2), o3(0xE9,0x98,0xA4),
+     o3(0xE9,0x98,0xA5), o3(0xE9,0x98,0xA6),
+     o3(0xE9,0x98,0xAC), o3(0xE9,0x98,0xB1),
+     o3(0xE9,0x98,0xB3), o3(0xE9,0x98,0xB7),
+     o3(0xE9,0x98,0xB8), o3(0xE9,0x98,0xB9),
+     o3(0xE9,0x98,0xBA), o3(0xE9,0x98,0xBC),
+     o3(0xE9,0x98,0xBD), o3(0xE9,0x99,0x81),
+     o3(0xE9,0x99,0x92), o3(0xE9,0x99,0x94),
+     o3(0xE9,0x99,0x96), o3(0xE9,0x99,0x97),
+     o3(0xE9,0x99,0x98), o3(0xE9,0x99,0xA1),
+     o3(0xE9,0x99,0xAE), o3(0xE9,0x99,0xB4),
+     o3(0xE9,0x99,0xBB), o3(0xE9,0x99,0xBC),
+     o3(0xE9,0x99,0xBE), o3(0xE9,0x99,0xBF),
+     o3(0xE9,0x9A,0x81), o3(0xE9,0x9A,0x82),
+     o3(0xE9,0x9A,0x83), o3(0xE9,0x9A,0x84),
+     o3(0xE9,0x9A,0x89), o3(0xE9,0x9A,0x91),
+     o3(0xE9,0x9A,0x96), o3(0xE9,0x9A,0x9A),
+     o3(0xE9,0x9A,0x9D), o3(0xE9,0x9A,0x9F),
+     o3(0xE9,0x9A,0xA4), o3(0xE9,0x9A,0xA5),
+     o3(0xE9,0x9A,0xA6), o3(0xE9,0x9A,0xA9),
+     o3(0xE9,0x9A,0xAE), o3(0xE9,0x9A,0xAF),
+     o3(0xE9,0x9A,0xB3), o3(0xE9,0x9A,0xBA),
+     o3(0xE9,0x9B,0x8A), o3(0xE9,0x9B,0x92),
+     o3(0xE5,0xB6,0xB2), o3(0xE9,0x9B,0x98),
+     o3(0xE9,0x9B,0x9A), o3(0xE9,0x9B,0x9D),
+     o3(0xE9,0x9B,0x9E), o3(0xE9,0x9B,0x9F),
+     o3(0xE9,0x9B,0xA9), o3(0xE9,0x9B,0xAF),
+     o3(0xE9,0x9B,0xB1), o3(0xE9,0x9B,0xBA),
+     o3(0xE9,0x9C,0x82),
+
+#define from_EUC_JP_8F_E6 WORDINDEX2INFO(5694)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E6_infos,
+
+#define from_EUC_JP_8F_E7_infos WORDINDEX2INFO(5696)
+                INVALID, o3(0xE9,0x9C,0x83),
+     o3(0xE9,0x9C,0x85), o3(0xE9,0x9C,0x89),
+     o3(0xE9,0x9C,0x9A), o3(0xE9,0x9C,0x9B),
+     o3(0xE9,0x9C,0x9D), o3(0xE9,0x9C,0xA1),
+     o3(0xE9,0x9C,0xA2), o3(0xE9,0x9C,0xA3),
+     o3(0xE9,0x9C,0xA8), o3(0xE9,0x9C,0xB1),
+     o3(0xE9,0x9C,0xB3), o3(0xE9,0x9D,0x81),
+     o3(0xE9,0x9D,0x83), o3(0xE9,0x9D,0x8A),
+     o3(0xE9,0x9D,0x8E), o3(0xE9,0x9D,0x8F),
+     o3(0xE9,0x9D,0x95), o3(0xE9,0x9D,0x97),
+     o3(0xE9,0x9D,0x98), o3(0xE9,0x9D,0x9A),
+     o3(0xE9,0x9D,0x9B), o3(0xE9,0x9D,0xA3),
+     o3(0xE9,0x9D,0xA7), o3(0xE9,0x9D,0xAA),
+     o3(0xE9,0x9D,0xAE), o3(0xE9,0x9D,0xB3),
+     o3(0xE9,0x9D,0xB6), o3(0xE9,0x9D,0xB7),
+     o3(0xE9,0x9D,0xB8), o3(0xE9,0x9D,0xBB),
+     o3(0xE9,0x9D,0xBD), o3(0xE9,0x9D,0xBF),
+     o3(0xE9,0x9E,0x80), o3(0xE9,0x9E,0x89),
+     o3(0xE9,0x9E,0x95), o3(0xE9,0x9E,0x96),
+     o3(0xE9,0x9E,0x97), o3(0xE9,0x9E,0x99),
+     o3(0xE9,0x9E,0x9A), o3(0xE9,0x9E,0x9E),
+     o3(0xE9,0x9E,0x9F), o3(0xE9,0x9E,0xA2),
+     o3(0xE9,0x9E,0xAC), o3(0xE9,0x9E,0xAE),
+     o3(0xE9,0x9E,0xB1), o3(0xE9,0x9E,0xB2),
+     o3(0xE9,0x9E,0xB5), o3(0xE9,0x9E,0xB6),
+     o3(0xE9,0x9E,0xB8), o3(0xE9,0x9E,0xB9),
+     o3(0xE9,0x9E,0xBA), o3(0xE9,0x9E,0xBC),
+     o3(0xE9,0x9E,0xBE), o3(0xE9,0x9E,0xBF),
+     o3(0xE9,0x9F,0x81), o3(0xE9,0x9F,0x84),
+     o3(0xE9,0x9F,0x85), o3(0xE9,0x9F,0x87),
+     o3(0xE9,0x9F,0x89), o3(0xE9,0x9F,0x8A),
+     o3(0xE9,0x9F,0x8C), o3(0xE9,0x9F,0x8D),
+     o3(0xE9,0x9F,0x8E), o3(0xE9,0x9F,0x90),
+     o3(0xE9,0x9F,0x91), o3(0xE9,0x9F,0x94),
+     o3(0xE9,0x9F,0x97), o3(0xE9,0x9F,0x98),
+     o3(0xE9,0x9F,0x99), o3(0xE9,0x9F,0x9D),
+     o3(0xE9,0x9F,0x9E), o3(0xE9,0x9F,0xA0),
+     o3(0xE9,0x9F,0x9B), o3(0xE9,0x9F,0xA1),
+     o3(0xE9,0x9F,0xA4), o3(0xE9,0x9F,0xAF),
+     o3(0xE9,0x9F,0xB1), o3(0xE9,0x9F,0xB4),
+     o3(0xE9,0x9F,0xB7), o3(0xE9,0x9F,0xB8),
+     o3(0xE9,0x9F,0xBA), o3(0xE9,0xA0,0x87),
+     o3(0xE9,0xA0,0x8A), o3(0xE9,0xA0,0x99),
+     o3(0xE9,0xA0,0x8D), o3(0xE9,0xA0,0x8E),
+     o3(0xE9,0xA0,0x94), o3(0xE9,0xA0,0x96),
+     o3(0xE9,0xA0,0x9C), o3(0xE9,0xA0,0x9E),
+     o3(0xE9,0xA0,0xA0), o3(0xE9,0xA0,0xA3),
+     o3(0xE9,0xA0,0xA6),
+
+#define from_EUC_JP_8F_E7 WORDINDEX2INFO(5791)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E7_infos,
+
+#define from_EUC_JP_8F_E8_infos WORDINDEX2INFO(5793)
+                INVALID, o3(0xE9,0xA0,0xAB),
+     o3(0xE9,0xA0,0xAE), o3(0xE9,0xA0,0xAF),
+     o3(0xE9,0xA0,0xB0), o3(0xE9,0xA0,0xB2),
+     o3(0xE9,0xA0,0xB3), o3(0xE9,0xA0,0xB5),
+     o3(0xE9,0xA0,0xA5), o3(0xE9,0xA0,0xBE),
+     o3(0xE9,0xA1,0x84), o3(0xE9,0xA1,0x87),
+     o3(0xE9,0xA1,0x8A), o3(0xE9,0xA1,0x91),
+     o3(0xE9,0xA1,0x92), o3(0xE9,0xA1,0x93),
+     o3(0xE9,0xA1,0x96), o3(0xE9,0xA1,0x97),
+     o3(0xE9,0xA1,0x99), o3(0xE9,0xA1,0x9A),
+     o3(0xE9,0xA1,0xA2), o3(0xE9,0xA1,0xA3),
+     o3(0xE9,0xA1,0xA5), o3(0xE9,0xA1,0xA6),
+     o3(0xE9,0xA1,0xAA), o3(0xE9,0xA1,0xAC),
+     o3(0xE9,0xA2,0xAB), o3(0xE9,0xA2,0xAD),
+     o3(0xE9,0xA2,0xAE), o3(0xE9,0xA2,0xB0),
+     o3(0xE9,0xA2,0xB4), o3(0xE9,0xA2,0xB7),
+     o3(0xE9,0xA2,0xB8), o3(0xE9,0xA2,0xBA),
+     o3(0xE9,0xA2,0xBB), o3(0xE9,0xA2,0xBF),
+     o3(0xE9,0xA3,0x82), o3(0xE9,0xA3,0x85),
+     o3(0xE9,0xA3,0x88), o3(0xE9,0xA3,0x8C),
+     o3(0xE9,0xA3,0xA1), o3(0xE9,0xA3,0xA3),
+     o3(0xE9,0xA3,0xA5), o3(0xE9,0xA3,0xA6),
+     o3(0xE9,0xA3,0xA7), o3(0xE9,0xA3,0xAA),
+     o3(0xE9,0xA3,0xB3), o3(0xE9,0xA3,0xB6),
+     o3(0xE9,0xA4,0x82), o3(0xE9,0xA4,0x87),
+     o3(0xE9,0xA4,0x88), o3(0xE9,0xA4,0x91),
+     o3(0xE9,0xA4,0x95), o3(0xE9,0xA4,0x96),
+     o3(0xE9,0xA4,0x97), o3(0xE9,0xA4,0x9A),
+     o3(0xE9,0xA4,0x9B), o3(0xE9,0xA4,0x9C),
+     o3(0xE9,0xA4,0x9F), o3(0xE9,0xA4,0xA2),
+     o3(0xE9,0xA4,0xA6), o3(0xE9,0xA4,0xA7),
+     o3(0xE9,0xA4,0xAB), o3(0xE9,0xA4,0xB1),
+     o3(0xE9,0xA4,0xB2), o3(0xE9,0xA4,0xB3),
+     o3(0xE9,0xA4,0xB4), o3(0xE9,0xA4,0xB5),
+     o3(0xE9,0xA4,0xB9), o3(0xE9,0xA4,0xBA),
+     o3(0xE9,0xA4,0xBB), o3(0xE9,0xA4,0xBC),
+     o3(0xE9,0xA5,0x80), o3(0xE9,0xA5,0x81),
+     o3(0xE9,0xA5,0x86), o3(0xE9,0xA5,0x87),
+     o3(0xE9,0xA5,0x88), o3(0xE9,0xA5,0x8D),
+     o3(0xE9,0xA5,0x8E), o3(0xE9,0xA5,0x94),
+     o3(0xE9,0xA5,0x98), o3(0xE9,0xA5,0x99),
+     o3(0xE9,0xA5,0x9B), o3(0xE9,0xA5,0x9C),
+     o3(0xE9,0xA5,0x9E), o3(0xE9,0xA5,0x9F),
+     o3(0xE9,0xA5,0xA0), o3(0xE9,0xA6,0x9B),
+     o3(0xE9,0xA6,0x9D), o3(0xE9,0xA6,0x9F),
+     o3(0xE9,0xA6,0xA6), o3(0xE9,0xA6,0xB0),
+     o3(0xE9,0xA6,0xB1), o3(0xE9,0xA6,0xB2),
+     o3(0xE9,0xA6,0xB5),
+
+#define from_EUC_JP_8F_E8 WORDINDEX2INFO(5888)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E8_infos,
+
+#define from_EUC_JP_8F_E9_infos WORDINDEX2INFO(5890)
+                INVALID, o3(0xE9,0xA6,0xB9),
+     o3(0xE9,0xA6,0xBA), o3(0xE9,0xA6,0xBD),
+     o3(0xE9,0xA6,0xBF), o3(0xE9,0xA7,0x83),
+     o3(0xE9,0xA7,0x89), o3(0xE9,0xA7,0x93),
+     o3(0xE9,0xA7,0x94), o3(0xE9,0xA7,0x99),
+     o3(0xE9,0xA7,0x9A), o3(0xE9,0xA7,0x9C),
+     o3(0xE9,0xA7,0x9E), o3(0xE9,0xA7,0xA7),
+     o3(0xE9,0xA7,0xAA), o3(0xE9,0xA7,0xAB),
+     o3(0xE9,0xA7,0xAC), o3(0xE9,0xA7,0xB0),
+     o3(0xE9,0xA7,0xB4), o3(0xE9,0xA7,0xB5),
+     o3(0xE9,0xA7,0xB9), o3(0xE9,0xA7,0xBD),
+     o3(0xE9,0xA7,0xBE), o3(0xE9,0xA8,0x82),
+     o3(0xE9,0xA8,0x83), o3(0xE9,0xA8,0x84),
+     o3(0xE9,0xA8,0x8B), o3(0xE9,0xA8,0x8C),
+     o3(0xE9,0xA8,0x90), o3(0xE9,0xA8,0x91),
+     o3(0xE9,0xA8,0x96), o3(0xE9,0xA8,0x9E),
+     o3(0xE9,0xA8,0xA0), o3(0xE9,0xA8,0xA2),
+     o3(0xE9,0xA8,0xA3), o3(0xE9,0xA8,0xA4),
+     o3(0xE9,0xA8,0xA7), o3(0xE9,0xA8,0xAD),
+     o3(0xE9,0xA8,0xAE), o3(0xE9,0xA8,0xB3),
+     o3(0xE9,0xA8,0xB5), o3(0xE9,0xA8,0xB6),
+     o3(0xE9,0xA8,0xB8), o3(0xE9,0xA9,0x87),
+     o3(0xE9,0xA9,0x81), o3(0xE9,0xA9,0x84),
+     o3(0xE9,0xA9,0x8A), o3(0xE9,0xA9,0x8B),
+     o3(0xE9,0xA9,0x8C), o3(0xE9,0xA9,0x8E),
+     o3(0xE9,0xA9,0x91), o3(0xE9,0xA9,0x94),
+     o3(0xE9,0xA9,0x96), o3(0xE9,0xA9,0x9D),
+     o3(0xE9,0xAA,0xAA), o3(0xE9,0xAA,0xAC),
+     o3(0xE9,0xAA,0xAE), o3(0xE9,0xAA,0xAF),
+     o3(0xE9,0xAA,0xB2), o3(0xE9,0xAA,0xB4),
+     o3(0xE9,0xAA,0xB5), o3(0xE9,0xAA,0xB6),
+     o3(0xE9,0xAA,0xB9), o3(0xE9,0xAA,0xBB),
+     o3(0xE9,0xAA,0xBE), o3(0xE9,0xAA,0xBF),
+     o3(0xE9,0xAB,0x81), o3(0xE9,0xAB,0x83),
+     o3(0xE9,0xAB,0x86), o3(0xE9,0xAB,0x88),
+     o3(0xE9,0xAB,0x8E), o3(0xE9,0xAB,0x90),
+     o3(0xE9,0xAB,0x92), o3(0xE9,0xAB,0x95),
+     o3(0xE9,0xAB,0x96), o3(0xE9,0xAB,0x97),
+     o3(0xE9,0xAB,0x9B), o3(0xE9,0xAB,0x9C),
+     o3(0xE9,0xAB,0xA0), o3(0xE9,0xAB,0xA4),
+     o3(0xE9,0xAB,0xA5), o3(0xE9,0xAB,0xA7),
+     o3(0xE9,0xAB,0xA9), o3(0xE9,0xAB,0xAC),
+     o3(0xE9,0xAB,0xB2), o3(0xE9,0xAB,0xB3),
+     o3(0xE9,0xAB,0xB5), o3(0xE9,0xAB,0xB9),
+     o3(0xE9,0xAB,0xBA), o3(0xE9,0xAB,0xBD),
+     o3(0xE9,0xAB,0xBF), o3(0xE9,0xAC,0x80),
+     o3(0xE9,0xAC,0x81), o3(0xE9,0xAC,0x82),
+     o3(0xE9,0xAC,0x83),
+
+#define from_EUC_JP_8F_E9 WORDINDEX2INFO(5985)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_E9_infos,
+
+#define from_EUC_JP_8F_EA_infos WORDINDEX2INFO(5987)
+                INVALID, o3(0xE9,0xAC,0x84),
+     o3(0xE9,0xAC,0x85), o3(0xE9,0xAC,0x88),
+     o3(0xE9,0xAC,0x89), o3(0xE9,0xAC,0x8B),
+     o3(0xE9,0xAC,0x8C), o3(0xE9,0xAC,0x8D),
+     o3(0xE9,0xAC,0x8E), o3(0xE9,0xAC,0x90),
+     o3(0xE9,0xAC,0x92), o3(0xE9,0xAC,0x96),
+     o3(0xE9,0xAC,0x99), o3(0xE9,0xAC,0x9B),
+     o3(0xE9,0xAC,0x9C), o3(0xE9,0xAC,0xA0),
+     o3(0xE9,0xAC,0xA6), o3(0xE9,0xAC,0xAB),
+     o3(0xE9,0xAC,0xAD), o3(0xE9,0xAC,0xB3),
+     o3(0xE9,0xAC,0xB4), o3(0xE9,0xAC,0xB5),
+     o3(0xE9,0xAC,0xB7), o3(0xE9,0xAC,0xB9),
+     o3(0xE9,0xAC,0xBA), o3(0xE9,0xAC,0xBD),
+     o3(0xE9,0xAD,0x88), o3(0xE9,0xAD,0x8B),
+     o3(0xE9,0xAD,0x8C), o3(0xE9,0xAD,0x95),
+     o3(0xE9,0xAD,0x96), o3(0xE9,0xAD,0x97),
+     o3(0xE9,0xAD,0x9B), o3(0xE9,0xAD,0x9E),
+     o3(0xE9,0xAD,0xA1), o3(0xE9,0xAD,0xA3),
+     o3(0xE9,0xAD,0xA5), o3(0xE9,0xAD,0xA6),
+     o3(0xE9,0xAD,0xA8), o3(0xE9,0xAD,0xAA),
+     o3(0xE9,0xAD,0xAB), o3(0xE9,0xAD,0xAC),
+     o3(0xE9,0xAD,0xAD), o3(0xE9,0xAD,0xAE),
+     o3(0xE9,0xAD,0xB3), o3(0xE9,0xAD,0xB5),
+     o3(0xE9,0xAD,0xB7), o3(0xE9,0xAD,0xB8),
+     o3(0xE9,0xAD,0xB9), o3(0xE9,0xAD,0xBF),
+     o3(0xE9,0xAE,0x80), o3(0xE9,0xAE,0x84),
+     o3(0xE9,0xAE,0x85), o3(0xE9,0xAE,0x86),
+     o3(0xE9,0xAE,0x87), o3(0xE9,0xAE,0x89),
+     o3(0xE9,0xAE,0x8A), o3(0xE9,0xAE,0x8B),
+     o3(0xE9,0xAE,0x8D), o3(0xE9,0xAE,0x8F),
+     o3(0xE9,0xAE,0x90), o3(0xE9,0xAE,0x94),
+     o3(0xE9,0xAE,0x9A), o3(0xE9,0xAE,0x9D),
+     o3(0xE9,0xAE,0x9E), o3(0xE9,0xAE,0xA6),
+     o3(0xE9,0xAE,0xA7), o3(0xE9,0xAE,0xA9),
+     o3(0xE9,0xAE,0xAC), o3(0xE9,0xAE,0xB0),
+     o3(0xE9,0xAE,0xB1), o3(0xE9,0xAE,0xB2),
+     o3(0xE9,0xAE,0xB7), o3(0xE9,0xAE,0xB8),
+     o3(0xE9,0xAE,0xBB), o3(0xE9,0xAE,0xBC),
+     o3(0xE9,0xAE,0xBE), o3(0xE9,0xAE,0xBF),
+     o3(0xE9,0xAF,0x81), o3(0xE9,0xAF,0x87),
+     o3(0xE9,0xAF,0x88), o3(0xE9,0xAF,0x8E),
+     o3(0xE9,0xAF,0x90), o3(0xE9,0xAF,0x97),
+     o3(0xE9,0xAF,0x98), o3(0xE9,0xAF,0x9D),
+     o3(0xE9,0xAF,0x9F), o3(0xE9,0xAF,0xA5),
+     o3(0xE9,0xAF,0xA7), o3(0xE9,0xAF,0xAA),
+     o3(0xE9,0xAF,0xAB), o3(0xE9,0xAF,0xAF),
+     o3(0xE9,0xAF,0xB3), o3(0xE9,0xAF,0xB7),
+     o3(0xE9,0xAF,0xB8),
+
+#define from_EUC_JP_8F_EA WORDINDEX2INFO(6082)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_EA_infos,
+
+#define from_EUC_JP_8F_EB_infos WORDINDEX2INFO(6084)
+                INVALID, o3(0xE9,0xAF,0xB9),
+     o3(0xE9,0xAF,0xBA), o3(0xE9,0xAF,0xBD),
+     o3(0xE9,0xAF,0xBF), o3(0xE9,0xB0,0x80),
+     o3(0xE9,0xB0,0x82), o3(0xE9,0xB0,0x8B),
+     o3(0xE9,0xB0,0x8F), o3(0xE9,0xB0,0x91),
+     o3(0xE9,0xB0,0x96), o3(0xE9,0xB0,0x98),
+     o3(0xE9,0xB0,0x99), o3(0xE9,0xB0,0x9A),
+     o3(0xE9,0xB0,0x9C), o3(0xE9,0xB0,0x9E),
+     o3(0xE9,0xB0,0xA2), o3(0xE9,0xB0,0xA3),
+     o3(0xE9,0xB0,0xA6), o3(0xE9,0xB0,0xA7),
+     o3(0xE9,0xB0,0xA8), o3(0xE9,0xB0,0xA9),
+     o3(0xE9,0xB0,0xAA), o3(0xE9,0xB0,0xB1),
+     o3(0xE9,0xB0,0xB5), o3(0xE9,0xB0,0xB6),
+     o3(0xE9,0xB0,0xB7), o3(0xE9,0xB0,0xBD),
+     o3(0xE9,0xB1,0x81), o3(0xE9,0xB1,0x83),
+     o3(0xE9,0xB1,0x84), o3(0xE9,0xB1,0x85),
+     o3(0xE9,0xB1,0x89), o3(0xE9,0xB1,0x8A),
+     o3(0xE9,0xB1,0x8E), o3(0xE9,0xB1,0x8F),
+     o3(0xE9,0xB1,0x90), o3(0xE9,0xB1,0x93),
+     o3(0xE9,0xB1,0x94), o3(0xE9,0xB1,0x96),
+     o3(0xE9,0xB1,0x98), o3(0xE9,0xB1,0x9B),
+     o3(0xE9,0xB1,0x9D), o3(0xE9,0xB1,0x9E),
+     o3(0xE9,0xB1,0x9F), o3(0xE9,0xB1,0xA3),
+     o3(0xE9,0xB1,0xA9), o3(0xE9,0xB1,0xAA),
+     o3(0xE9,0xB1,0x9C), o3(0xE9,0xB1,0xAB),
+     o3(0xE9,0xB1,0xA8), o3(0xE9,0xB1,0xAE),
+     o3(0xE9,0xB1,0xB0), o3(0xE9,0xB1,0xB2),
+     o3(0xE9,0xB1,0xB5), o3(0xE9,0xB1,0xB7),
+     o3(0xE9,0xB1,0xBB), o3(0xE9,0xB3,0xA6),
+     o3(0xE9,0xB3,0xB2), o3(0xE9,0xB3,0xB7),
+     o3(0xE9,0xB3,0xB9), o3(0xE9,0xB4,0x8B),
+     o3(0xE9,0xB4,0x82), o3(0xE9,0xB4,0x91),
+     o3(0xE9,0xB4,0x97), o3(0xE9,0xB4,0x98),
+     o3(0xE9,0xB4,0x9C), o3(0xE9,0xB4,0x9D),
+     o3(0xE9,0xB4,0x9E), o3(0xE9,0xB4,0xAF),
+     o3(0xE9,0xB4,0xB0), o3(0xE9,0xB4,0xB2),
+     o3(0xE9,0xB4,0xB3), o3(0xE9,0xB4,0xB4),
+     o3(0xE9,0xB4,0xBA), o3(0xE9,0xB4,0xBC),
+     o3(0xE9,0xB5,0x85), o3(0xE9,0xB4,0xBD),
+     o3(0xE9,0xB5,0x82), o3(0xE9,0xB5,0x83),
+     o3(0xE9,0xB5,0x87), o3(0xE9,0xB5,0x8A),
+     o3(0xE9,0xB5,0x93), o3(0xE9,0xB5,0x94),
+     o3(0xE9,0xB5,0x9F), o3(0xE9,0xB5,0xA3),
+     o3(0xE9,0xB5,0xA2), o3(0xE9,0xB5,0xA5),
+     o3(0xE9,0xB5,0xA9), o3(0xE9,0xB5,0xAA),
+     o3(0xE9,0xB5,0xAB), o3(0xE9,0xB5,0xB0),
+     o3(0xE9,0xB5,0xB6), o3(0xE9,0xB5,0xB7),
+     o3(0xE9,0xB5,0xBB),
+
+#define from_EUC_JP_8F_EB WORDINDEX2INFO(6179)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_EB_infos,
+
+#define from_EUC_JP_8F_EC_infos WORDINDEX2INFO(6181)
+                INVALID, o3(0xE9,0xB5,0xBC),
+     o3(0xE9,0xB5,0xBE), o3(0xE9,0xB6,0x83),
+     o3(0xE9,0xB6,0x84), o3(0xE9,0xB6,0x86),
+     o3(0xE9,0xB6,0x8A), o3(0xE9,0xB6,0x8D),
+     o3(0xE9,0xB6,0x8E), o3(0xE9,0xB6,0x92),
+     o3(0xE9,0xB6,0x93), o3(0xE9,0xB6,0x95),
+     o3(0xE9,0xB6,0x96), o3(0xE9,0xB6,0x97),
+     o3(0xE9,0xB6,0x98), o3(0xE9,0xB6,0xA1),
+     o3(0xE9,0xB6,0xAA), o3(0xE9,0xB6,0xAC),
+     o3(0xE9,0xB6,0xAE), o3(0xE9,0xB6,0xB1),
+     o3(0xE9,0xB6,0xB5), o3(0xE9,0xB6,0xB9),
+     o3(0xE9,0xB6,0xBC), o3(0xE9,0xB6,0xBF),
+     o3(0xE9,0xB7,0x83), o3(0xE9,0xB7,0x87),
+     o3(0xE9,0xB7,0x89), o3(0xE9,0xB7,0x8A),
+     o3(0xE9,0xB7,0x94), o3(0xE9,0xB7,0x95),
+     o3(0xE9,0xB7,0x96), o3(0xE9,0xB7,0x97),
+     o3(0xE9,0xB7,0x9A), o3(0xE9,0xB7,0x9E),
+     o3(0xE9,0xB7,0x9F), o3(0xE9,0xB7,0xA0),
+     o3(0xE9,0xB7,0xA5), o3(0xE9,0xB7,0xA7),
+     o3(0xE9,0xB7,0xA9), o3(0xE9,0xB7,0xAB),
+     o3(0xE9,0xB7,0xAE), o3(0xE9,0xB7,0xB0),
+     o3(0xE9,0xB7,0xB3), o3(0xE9,0xB7,0xB4),
+     o3(0xE9,0xB7,0xBE), o3(0xE9,0xB8,0x8A),
+     o3(0xE9,0xB8,0x82), o3(0xE9,0xB8,0x87),
+     o3(0xE9,0xB8,0x8E), o3(0xE9,0xB8,0x90),
+     o3(0xE9,0xB8,0x91), o3(0xE9,0xB8,0x92),
+     o3(0xE9,0xB8,0x95), o3(0xE9,0xB8,0x96),
+     o3(0xE9,0xB8,0x99), o3(0xE9,0xB8,0x9C),
+     o3(0xE9,0xB8,0x9D), o3(0xE9,0xB9,0xBA),
+     o3(0xE9,0xB9,0xBB), o3(0xE9,0xB9,0xBC),
+     o3(0xE9,0xBA,0x80), o3(0xE9,0xBA,0x82),
+     o3(0xE9,0xBA,0x83), o3(0xE9,0xBA,0x84),
+     o3(0xE9,0xBA,0x85), o3(0xE9,0xBA,0x87),
+     o3(0xE9,0xBA,0x8E), o3(0xE9,0xBA,0x8F),
+     o3(0xE9,0xBA,0x96), o3(0xE9,0xBA,0x98),
+     o3(0xE9,0xBA,0x9B), o3(0xE9,0xBA,0x9E),
+     o3(0xE9,0xBA,0xA4), o3(0xE9,0xBA,0xA8),
+     o3(0xE9,0xBA,0xAC), o3(0xE9,0xBA,0xAE),
+     o3(0xE9,0xBA,0xAF), o3(0xE9,0xBA,0xB0),
+     o3(0xE9,0xBA,0xB3), o3(0xE9,0xBA,0xB4),
+     o3(0xE9,0xBA,0xB5), o3(0xE9,0xBB,0x86),
+     o3(0xE9,0xBB,0x88), o3(0xE9,0xBB,0x8B),
+     o3(0xE9,0xBB,0x95), o3(0xE9,0xBB,0x9F),
+     o3(0xE9,0xBB,0xA4), o3(0xE9,0xBB,0xA7),
+     o3(0xE9,0xBB,0xAC), o3(0xE9,0xBB,0xAD),
+     o3(0xE9,0xBB,0xAE), o3(0xE9,0xBB,0xB0),
+     o3(0xE9,0xBB,0xB1), o3(0xE9,0xBB,0xB2),
+     o3(0xE9,0xBB,0xB5),
+
+#define from_EUC_JP_8F_EC WORDINDEX2INFO(6276)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_8F_EC_infos,
+
+#define from_EUC_JP_8F_ED_infos WORDINDEX2INFO(6278)
+                INVALID, o3(0xE9,0xBB,0xB8),
+     o3(0xE9,0xBB,0xBF), o3(0xE9,0xBC,0x82),
+     o3(0xE9,0xBC,0x83), o3(0xE9,0xBC,0x89),
+     o3(0xE9,0xBC,0x8F), o3(0xE9,0xBC,0x90),
+     o3(0xE9,0xBC,0x91), o3(0xE9,0xBC,0x92),
+     o3(0xE9,0xBC,0x94), o3(0xE9,0xBC,0x96),
+     o3(0xE9,0xBC,0x97), o3(0xE9,0xBC,0x99),
+     o3(0xE9,0xBC,0x9A), o3(0xE9,0xBC,0x9B),
+     o3(0xE9,0xBC,0x9F), o3(0xE9,0xBC,0xA2),
+     o3(0xE9,0xBC,0xA6), o3(0xE9,0xBC,0xAA),
+     o3(0xE9,0xBC,0xAB), o3(0xE9,0xBC,0xAF),
+     o3(0xE9,0xBC,0xB1), o3(0xE9,0xBC,0xB2),
+     o3(0xE9,0xBC,0xB4), o3(0xE9,0xBC,0xB7),
+     o3(0xE9,0xBC,0xB9), o3(0xE9,0xBC,0xBA),
+     o3(0xE9,0xBC,0xBC), o3(0xE9,0xBC,0xBD),
+     o3(0xE9,0xBC,0xBF), o3(0xE9,0xBD,0x81),
+     o3(0xE9,0xBD,0x83), o3(0xE9,0xBD,0x84),
+     o3(0xE9,0xBD,0x85), o3(0xE9,0xBD,0x86),
+     o3(0xE9,0xBD,0x87), o3(0xE9,0xBD,0x93),
+     o3(0xE9,0xBD,0x95), o3(0xE9,0xBD,0x96),
+     o3(0xE9,0xBD,0x97), o3(0xE9,0xBD,0x98),
+     o3(0xE9,0xBD,0x9A), o3(0xE9,0xBD,0x9D),
+     o3(0xE9,0xBD,0x9E), o3(0xE9,0xBD,0xA8),
+     o3(0xE9,0xBD,0xA9), o3(0xE9,0xBD,0xAD),
+     o3(0xE9,0xBD,0xAE), o3(0xE9,0xBD,0xAF),
+     o3(0xE9,0xBD,0xB0), o3(0xE9,0xBD,0xB1),
+     o3(0xE9,0xBD,0xB3), o3(0xE9,0xBD,0xB5),
+     o3(0xE9,0xBD,0xBA), o3(0xE9,0xBD,0xBD),
+     o3(0xE9,0xBE,0x8F), o3(0xE9,0xBE,0x90),
+     o3(0xE9,0xBE,0x91), o3(0xE9,0xBE,0x92),
+     o3(0xE9,0xBE,0x94), o3(0xE9,0xBE,0x96),
+     o3(0xE9,0xBE,0x97), o3(0xE9,0xBE,0x9E),
+     o3(0xE9,0xBE,0xA1), o3(0xE9,0xBE,0xA2),
+     o3(0xE9,0xBE,0xA3), o3(0xE9,0xBE,0xA5),
+                  UNDEF,
+
+#define from_EUC_JP_8F_ED WORDINDEX2INFO(6347)
+    from_EUC_JP_8F_ED_offsets,
+    from_EUC_JP_8F_ED_infos,
+
+#define from_EUC_JP_8F_infos WORDINDEX2INFO(6349)
+               INVALID, from_EUC_JP_8F_A1,
+     from_EUC_JP_8F_A2, from_EUC_JP_8F_A6,
+     from_EUC_JP_8F_A7, from_EUC_JP_8F_A9,
+     from_EUC_JP_8F_AA, from_EUC_JP_8F_AB,
+     from_EUC_JP_8F_B0, from_EUC_JP_8F_B1,
+     from_EUC_JP_8F_B2, from_EUC_JP_8F_B3,
+     from_EUC_JP_8F_B4, from_EUC_JP_8F_B5,
+     from_EUC_JP_8F_B6, from_EUC_JP_8F_B7,
+     from_EUC_JP_8F_B8, from_EUC_JP_8F_B9,
+     from_EUC_JP_8F_BA, from_EUC_JP_8F_BB,
+     from_EUC_JP_8F_BC, from_EUC_JP_8F_BD,
+     from_EUC_JP_8F_BE, from_EUC_JP_8F_BF,
+     from_EUC_JP_8F_C0, from_EUC_JP_8F_C1,
+     from_EUC_JP_8F_C2, from_EUC_JP_8F_C3,
+     from_EUC_JP_8F_C4, from_EUC_JP_8F_C5,
+     from_EUC_JP_8F_C6, from_EUC_JP_8F_C7,
+     from_EUC_JP_8F_C8, from_EUC_JP_8F_C9,
+     from_EUC_JP_8F_CA, from_EUC_JP_8F_CB,
+     from_EUC_JP_8F_CC, from_EUC_JP_8F_CD,
+     from_EUC_JP_8F_CE, from_EUC_JP_8F_CF,
+     from_EUC_JP_8F_D0, from_EUC_JP_8F_D1,
+     from_EUC_JP_8F_D2, from_EUC_JP_8F_D3,
+     from_EUC_JP_8F_D4, from_EUC_JP_8F_D5,
+     from_EUC_JP_8F_D6, from_EUC_JP_8F_D7,
+     from_EUC_JP_8F_D8, from_EUC_JP_8F_D9,
+     from_EUC_JP_8F_DA, from_EUC_JP_8F_DB,
+     from_EUC_JP_8F_DC, from_EUC_JP_8F_DD,
+     from_EUC_JP_8F_DE, from_EUC_JP_8F_DF,
+     from_EUC_JP_8F_E0, from_EUC_JP_8F_E1,
+     from_EUC_JP_8F_E2, from_EUC_JP_8F_E3,
+     from_EUC_JP_8F_E4, from_EUC_JP_8F_E5,
+     from_EUC_JP_8F_E6, from_EUC_JP_8F_E7,
+     from_EUC_JP_8F_E8, from_EUC_JP_8F_E9,
+     from_EUC_JP_8F_EA, from_EUC_JP_8F_EB,
+     from_EUC_JP_8F_EC, from_EUC_JP_8F_ED,
+
+#define from_EUC_JP_8F WORDINDEX2INFO(6419)
+    from_EUC_JP_8F_offsets,
+    from_EUC_JP_8F_infos,
+
+#define from_EUC_JP_A1_infos WORDINDEX2INFO(6421)
+                INVALID, o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8E),
+     o3(0xE3,0x83,0xBB), o3(0xEF,0xBC,0x9A),
+     o3(0xEF,0xBC,0x9B), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0x81), o3(0xE3,0x82,0x9B),
+     o3(0xE3,0x82,0x9C),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x80),      o2(0xC2,0xA8),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBF,0xA3),
+     o3(0xEF,0xBC,0xBF), o3(0xE3,0x83,0xBD),
+     o3(0xE3,0x83,0xBE), o3(0xE3,0x82,0x9D),
+     o3(0xE3,0x82,0x9E), o3(0xE3,0x80,0x83),
+     o3(0xE4,0xBB,0x9D), o3(0xE3,0x80,0x85),
+     o3(0xE3,0x80,0x86), o3(0xE3,0x80,0x87),
+     o3(0xE3,0x83,0xBC), o3(0xE2,0x80,0x94),
+     o3(0xE2,0x80,0x90), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0xBC), o3(0xE3,0x80,0x9C),
+     o3(0xE2,0x80,0x96), o3(0xEF,0xBD,0x9C),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xEF,0xBC,0xBB), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBD,0x9B), o3(0xEF,0xBD,0x9D),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+     o3(0xEF,0xBC,0x8B), o3(0xE2,0x88,0x92),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xEF,0xBC,0x9D),
+     o3(0xE2,0x89,0xA0), o3(0xEF,0xBC,0x9C),
+     o3(0xEF,0xBC,0x9E), o3(0xE2,0x89,0xA6),
+     o3(0xE2,0x89,0xA7), o3(0xE2,0x88,0x9E),
+     o3(0xE2,0x88,0xB4), o3(0xE2,0x99,0x82),
+     o3(0xE2,0x99,0x80),      o2(0xC2,0xB0),
+     o3(0xE2,0x80,0xB2), o3(0xE2,0x80,0xB3),
+     o3(0xE2,0x84,0x83), o3(0xEF,0xBF,0xA5),
+     o3(0xEF,0xBC,0x84),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x83), o3(0xEF,0xBC,0x86),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0xA0),
+          o2(0xC2,0xA7), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87),
+
+#define from_EUC_JP_A1 WORDINDEX2INFO(6516)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_A1_infos,
+
+#define from_EUC_JP_A2_infos WORDINDEX2INFO(6518)
+                INVALID, o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x80,0xBB), o3(0xE3,0x80,0x92),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE3,0x80,0x93),              UNDEF,
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+          o2(0xC2,0xAC), o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x8C,0x92),
+     o3(0xE2,0x88,0x82), o3(0xE2,0x88,0x87),
+     o3(0xE2,0x89,0xA1), o3(0xE2,0x89,0x92),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x84,0xAB), o3(0xE2,0x80,0xB0),
+     o3(0xE2,0x99,0xAF), o3(0xE2,0x99,0xAD),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xC2,0xB6),
+     o3(0xE2,0x97,0xAF),
+
+#define from_EUC_JP_A2 WORDINDEX2INFO(6573)
+    from_EUC_JP_A2_offsets,
+    from_EUC_JP_A2_infos,
+
+#define from_EUC_JP_A3_infos WORDINDEX2INFO(6575)
+                INVALID,              UNDEF,
+     o3(0xEF,0xBC,0x90), o3(0xEF,0xBC,0x91),
+     o3(0xEF,0xBC,0x92), o3(0xEF,0xBC,0x93),
+     o3(0xEF,0xBC,0x94), o3(0xEF,0xBC,0x95),
+     o3(0xEF,0xBC,0x96), o3(0xEF,0xBC,0x97),
+     o3(0xEF,0xBC,0x98), o3(0xEF,0xBC,0x99),
+     o3(0xEF,0xBC,0xA1), o3(0xEF,0xBC,0xA2),
+     o3(0xEF,0xBC,0xA3), o3(0xEF,0xBC,0xA4),
+     o3(0xEF,0xBC,0xA5), o3(0xEF,0xBC,0xA6),
+     o3(0xEF,0xBC,0xA7), o3(0xEF,0xBC,0xA8),
+     o3(0xEF,0xBC,0xA9), o3(0xEF,0xBC,0xAA),
+     o3(0xEF,0xBC,0xAB), o3(0xEF,0xBC,0xAC),
+     o3(0xEF,0xBC,0xAD), o3(0xEF,0xBC,0xAE),
+     o3(0xEF,0xBC,0xAF), o3(0xEF,0xBC,0xB0),
+     o3(0xEF,0xBC,0xB1), o3(0xEF,0xBC,0xB2),
+     o3(0xEF,0xBC,0xB3), o3(0xEF,0xBC,0xB4),
+     o3(0xEF,0xBC,0xB5), o3(0xEF,0xBC,0xB6),
+     o3(0xEF,0xBC,0xB7), o3(0xEF,0xBC,0xB8),
+     o3(0xEF,0xBC,0xB9), o3(0xEF,0xBC,0xBA),
+     o3(0xEF,0xBD,0x81), o3(0xEF,0xBD,0x82),
+     o3(0xEF,0xBD,0x83), o3(0xEF,0xBD,0x84),
+     o3(0xEF,0xBD,0x85), o3(0xEF,0xBD,0x86),
+     o3(0xEF,0xBD,0x87), o3(0xEF,0xBD,0x88),
+     o3(0xEF,0xBD,0x89), o3(0xEF,0xBD,0x8A),
+     o3(0xEF,0xBD,0x8B), o3(0xEF,0xBD,0x8C),
+     o3(0xEF,0xBD,0x8D), o3(0xEF,0xBD,0x8E),
+     o3(0xEF,0xBD,0x8F), o3(0xEF,0xBD,0x90),
+     o3(0xEF,0xBD,0x91), o3(0xEF,0xBD,0x92),
+     o3(0xEF,0xBD,0x93), o3(0xEF,0xBD,0x94),
+     o3(0xEF,0xBD,0x95), o3(0xEF,0xBD,0x96),
+     o3(0xEF,0xBD,0x97), o3(0xEF,0xBD,0x98),
+     o3(0xEF,0xBD,0x99), o3(0xEF,0xBD,0x9A),
+
+#define from_EUC_JP_A3 WORDINDEX2INFO(6639)
+    from_EUC_JP_A3_offsets,
+    from_EUC_JP_A3_infos,
+
+#define from_EUC_JP_A4_infos WORDINDEX2INFO(6641)
+                INVALID, o3(0xE3,0x81,0x81),
+     o3(0xE3,0x81,0x82), o3(0xE3,0x81,0x83),
+     o3(0xE3,0x81,0x84), o3(0xE3,0x81,0x85),
+     o3(0xE3,0x81,0x86), o3(0xE3,0x81,0x87),
+     o3(0xE3,0x81,0x88), o3(0xE3,0x81,0x89),
+     o3(0xE3,0x81,0x8A), o3(0xE3,0x81,0x8B),
+     o3(0xE3,0x81,0x8C), o3(0xE3,0x81,0x8D),
+     o3(0xE3,0x81,0x8E), o3(0xE3,0x81,0x8F),
+     o3(0xE3,0x81,0x90), o3(0xE3,0x81,0x91),
+     o3(0xE3,0x81,0x92), o3(0xE3,0x81,0x93),
+     o3(0xE3,0x81,0x94), o3(0xE3,0x81,0x95),
+     o3(0xE3,0x81,0x96), o3(0xE3,0x81,0x97),
+     o3(0xE3,0x81,0x98), o3(0xE3,0x81,0x99),
+     o3(0xE3,0x81,0x9A), o3(0xE3,0x81,0x9B),
+     o3(0xE3,0x81,0x9C), o3(0xE3,0x81,0x9D),
+     o3(0xE3,0x81,0x9E), o3(0xE3,0x81,0x9F),
+     o3(0xE3,0x81,0xA0), o3(0xE3,0x81,0xA1),
+     o3(0xE3,0x81,0xA2), o3(0xE3,0x81,0xA3),
+     o3(0xE3,0x81,0xA4), o3(0xE3,0x81,0xA5),
+     o3(0xE3,0x81,0xA6), o3(0xE3,0x81,0xA7),
+     o3(0xE3,0x81,0xA8), o3(0xE3,0x81,0xA9),
+     o3(0xE3,0x81,0xAA), o3(0xE3,0x81,0xAB),
+     o3(0xE3,0x81,0xAC), o3(0xE3,0x81,0xAD),
+     o3(0xE3,0x81,0xAE), o3(0xE3,0x81,0xAF),
+     o3(0xE3,0x81,0xB0), o3(0xE3,0x81,0xB1),
+     o3(0xE3,0x81,0xB2), o3(0xE3,0x81,0xB3),
+     o3(0xE3,0x81,0xB4), o3(0xE3,0x81,0xB5),
+     o3(0xE3,0x81,0xB6), o3(0xE3,0x81,0xB7),
+     o3(0xE3,0x81,0xB8), o3(0xE3,0x81,0xB9),
+     o3(0xE3,0x81,0xBA), o3(0xE3,0x81,0xBB),
+     o3(0xE3,0x81,0xBC), o3(0xE3,0x81,0xBD),
+     o3(0xE3,0x81,0xBE), o3(0xE3,0x81,0xBF),
+     o3(0xE3,0x82,0x80), o3(0xE3,0x82,0x81),
+     o3(0xE3,0x82,0x82), o3(0xE3,0x82,0x83),
+     o3(0xE3,0x82,0x84), o3(0xE3,0x82,0x85),
+     o3(0xE3,0x82,0x86), o3(0xE3,0x82,0x87),
+     o3(0xE3,0x82,0x88), o3(0xE3,0x82,0x89),
+     o3(0xE3,0x82,0x8A), o3(0xE3,0x82,0x8B),
+     o3(0xE3,0x82,0x8C), o3(0xE3,0x82,0x8D),
+     o3(0xE3,0x82,0x8E), o3(0xE3,0x82,0x8F),
+     o3(0xE3,0x82,0x90), o3(0xE3,0x82,0x91),
+     o3(0xE3,0x82,0x92), o3(0xE3,0x82,0x93),
+                  UNDEF,
+
+#define from_EUC_JP_A4 WORDINDEX2INFO(6726)
+    from_EUC_JP_A4_offsets,
+    from_EUC_JP_A4_infos,
+
+#define from_EUC_JP_A5_infos WORDINDEX2INFO(6728)
+                INVALID, o3(0xE3,0x82,0xA1),
+     o3(0xE3,0x82,0xA2), o3(0xE3,0x82,0xA3),
+     o3(0xE3,0x82,0xA4), o3(0xE3,0x82,0xA5),
+     o3(0xE3,0x82,0xA6), o3(0xE3,0x82,0xA7),
+     o3(0xE3,0x82,0xA8), o3(0xE3,0x82,0xA9),
+     o3(0xE3,0x82,0xAA), o3(0xE3,0x82,0xAB),
+     o3(0xE3,0x82,0xAC), o3(0xE3,0x82,0xAD),
+     o3(0xE3,0x82,0xAE), o3(0xE3,0x82,0xAF),
+     o3(0xE3,0x82,0xB0), o3(0xE3,0x82,0xB1),
+     o3(0xE3,0x82,0xB2), o3(0xE3,0x82,0xB3),
+     o3(0xE3,0x82,0xB4), o3(0xE3,0x82,0xB5),
+     o3(0xE3,0x82,0xB6), o3(0xE3,0x82,0xB7),
+     o3(0xE3,0x82,0xB8), o3(0xE3,0x82,0xB9),
+     o3(0xE3,0x82,0xBA), o3(0xE3,0x82,0xBB),
+     o3(0xE3,0x82,0xBC), o3(0xE3,0x82,0xBD),
+     o3(0xE3,0x82,0xBE), o3(0xE3,0x82,0xBF),
+     o3(0xE3,0x83,0x80), o3(0xE3,0x83,0x81),
+     o3(0xE3,0x83,0x82), o3(0xE3,0x83,0x83),
+     o3(0xE3,0x83,0x84), o3(0xE3,0x83,0x85),
+     o3(0xE3,0x83,0x86), o3(0xE3,0x83,0x87),
+     o3(0xE3,0x83,0x88), o3(0xE3,0x83,0x89),
+     o3(0xE3,0x83,0x8A), o3(0xE3,0x83,0x8B),
+     o3(0xE3,0x83,0x8C), o3(0xE3,0x83,0x8D),
+     o3(0xE3,0x83,0x8E), o3(0xE3,0x83,0x8F),
+     o3(0xE3,0x83,0x90), o3(0xE3,0x83,0x91),
+     o3(0xE3,0x83,0x92), o3(0xE3,0x83,0x93),
+     o3(0xE3,0x83,0x94), o3(0xE3,0x83,0x95),
+     o3(0xE3,0x83,0x96), o3(0xE3,0x83,0x97),
+     o3(0xE3,0x83,0x98), o3(0xE3,0x83,0x99),
+     o3(0xE3,0x83,0x9A), o3(0xE3,0x83,0x9B),
+     o3(0xE3,0x83,0x9C), o3(0xE3,0x83,0x9D),
+     o3(0xE3,0x83,0x9E), o3(0xE3,0x83,0x9F),
+     o3(0xE3,0x83,0xA0), o3(0xE3,0x83,0xA1),
+     o3(0xE3,0x83,0xA2), o3(0xE3,0x83,0xA3),
+     o3(0xE3,0x83,0xA4), o3(0xE3,0x83,0xA5),
+     o3(0xE3,0x83,0xA6), o3(0xE3,0x83,0xA7),
+     o3(0xE3,0x83,0xA8), o3(0xE3,0x83,0xA9),
+     o3(0xE3,0x83,0xAA), o3(0xE3,0x83,0xAB),
+     o3(0xE3,0x83,0xAC), o3(0xE3,0x83,0xAD),
+     o3(0xE3,0x83,0xAE), o3(0xE3,0x83,0xAF),
+     o3(0xE3,0x83,0xB0), o3(0xE3,0x83,0xB1),
+     o3(0xE3,0x83,0xB2), o3(0xE3,0x83,0xB3),
+     o3(0xE3,0x83,0xB4), o3(0xE3,0x83,0xB5),
+     o3(0xE3,0x83,0xB6),              UNDEF,
+
+#define from_EUC_JP_A5 WORDINDEX2INFO(6816)
+    from_EUC_JP_A5_offsets,
+    from_EUC_JP_A5_infos,
+
+#define from_EUC_JP_A6_infos WORDINDEX2INFO(6818)
+           INVALID, o2(0xCE,0x91), o2(0xCE,0x92), o2(0xCE,0x93),
+     o2(0xCE,0x94), o2(0xCE,0x95), o2(0xCE,0x96), o2(0xCE,0x97),
+     o2(0xCE,0x98), o2(0xCE,0x99), o2(0xCE,0x9A), o2(0xCE,0x9B),
+     o2(0xCE,0x9C), o2(0xCE,0x9D), o2(0xCE,0x9E), o2(0xCE,0x9F),
+     o2(0xCE,0xA0), o2(0xCE,0xA1), o2(0xCE,0xA3), o2(0xCE,0xA4),
+     o2(0xCE,0xA5), o2(0xCE,0xA6), o2(0xCE,0xA7), o2(0xCE,0xA8),
+     o2(0xCE,0xA9),         UNDEF, o2(0xCE,0xB1), o2(0xCE,0xB2),
+     o2(0xCE,0xB3), o2(0xCE,0xB4), o2(0xCE,0xB5), o2(0xCE,0xB6),
+     o2(0xCE,0xB7), o2(0xCE,0xB8), o2(0xCE,0xB9), o2(0xCE,0xBA),
+     o2(0xCE,0xBB), o2(0xCE,0xBC), o2(0xCE,0xBD), o2(0xCE,0xBE),
+     o2(0xCE,0xBF), o2(0xCF,0x80), o2(0xCF,0x81), o2(0xCF,0x83),
+     o2(0xCF,0x84), o2(0xCF,0x85), o2(0xCF,0x86), o2(0xCF,0x87),
+     o2(0xCF,0x88), o2(0xCF,0x89),
+
+#define from_EUC_JP_A6 WORDINDEX2INFO(6868)
+    from_EUC_JP_A6_offsets,
+    from_EUC_JP_A6_infos,
+
+#define from_EUC_JP_A7_infos WORDINDEX2INFO(6870)
+           INVALID, o2(0xD0,0x90), o2(0xD0,0x91), o2(0xD0,0x92),
+     o2(0xD0,0x93), o2(0xD0,0x94), o2(0xD0,0x95), o2(0xD0,0x81),
+     o2(0xD0,0x96), o2(0xD0,0x97), o2(0xD0,0x98), o2(0xD0,0x99),
+     o2(0xD0,0x9A), o2(0xD0,0x9B), o2(0xD0,0x9C), o2(0xD0,0x9D),
+     o2(0xD0,0x9E), o2(0xD0,0x9F), o2(0xD0,0xA0), o2(0xD0,0xA1),
+     o2(0xD0,0xA2), o2(0xD0,0xA3), o2(0xD0,0xA4), o2(0xD0,0xA5),
+     o2(0xD0,0xA6), o2(0xD0,0xA7), o2(0xD0,0xA8), o2(0xD0,0xA9),
+     o2(0xD0,0xAA), o2(0xD0,0xAB), o2(0xD0,0xAC), o2(0xD0,0xAD),
+     o2(0xD0,0xAE), o2(0xD0,0xAF),         UNDEF, o2(0xD0,0xB0),
+     o2(0xD0,0xB1), o2(0xD0,0xB2), o2(0xD0,0xB3), o2(0xD0,0xB4),
+     o2(0xD0,0xB5), o2(0xD1,0x91), o2(0xD0,0xB6), o2(0xD0,0xB7),
+     o2(0xD0,0xB8), o2(0xD0,0xB9), o2(0xD0,0xBA), o2(0xD0,0xBB),
+     o2(0xD0,0xBC), o2(0xD0,0xBD), o2(0xD0,0xBE), o2(0xD0,0xBF),
+     o2(0xD1,0x80), o2(0xD1,0x81), o2(0xD1,0x82), o2(0xD1,0x83),
+     o2(0xD1,0x84), o2(0xD1,0x85), o2(0xD1,0x86), o2(0xD1,0x87),
+     o2(0xD1,0x88), o2(0xD1,0x89), o2(0xD1,0x8A), o2(0xD1,0x8B),
+     o2(0xD1,0x8C), o2(0xD1,0x8D), o2(0xD1,0x8E), o2(0xD1,0x8F),
+
+#define from_EUC_JP_A7 WORDINDEX2INFO(6938)
+    from_EUC_JP_A7_offsets,
+    from_EUC_JP_A7_infos,
+
+#define from_EUC_JP_A8_infos WORDINDEX2INFO(6940)
+                INVALID, o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x98),
+     o3(0xE2,0x94,0x94), o3(0xE2,0x94,0x9C),
+     o3(0xE2,0x94,0xAC), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xBC),
+     o3(0xE2,0x94,0x81), o3(0xE2,0x94,0x83),
+     o3(0xE2,0x94,0x8F), o3(0xE2,0x94,0x93),
+     o3(0xE2,0x94,0x9B), o3(0xE2,0x94,0x97),
+     o3(0xE2,0x94,0xA3), o3(0xE2,0x94,0xB3),
+     o3(0xE2,0x94,0xAB), o3(0xE2,0x94,0xBB),
+     o3(0xE2,0x95,0x8B), o3(0xE2,0x94,0xA0),
+     o3(0xE2,0x94,0xAF), o3(0xE2,0x94,0xA8),
+     o3(0xE2,0x94,0xB7), o3(0xE2,0x94,0xBF),
+     o3(0xE2,0x94,0x9D), o3(0xE2,0x94,0xB0),
+     o3(0xE2,0x94,0xA5), o3(0xE2,0x94,0xB8),
+     o3(0xE2,0x95,0x82),              UNDEF,
+
+#define from_EUC_JP_A8 WORDINDEX2INFO(6974)
+    from_EUC_JP_A8_offsets,
+    from_EUC_JP_A8_infos,
+
+#define from_EUC_JP_B0_infos WORDINDEX2INFO(6976)
+                INVALID, o3(0xE4,0xBA,0x9C),
+     o3(0xE5,0x94,0x96), o3(0xE5,0xA8,0x83),
+     o3(0xE9,0x98,0xBF), o3(0xE5,0x93,0x80),
+     o3(0xE6,0x84,0x9B), o3(0xE6,0x8C,0xA8),
+     o3(0xE5,0xA7,0xB6), o3(0xE9,0x80,0xA2),
+     o3(0xE8,0x91,0xB5), o3(0xE8,0x8C,0x9C),
+     o3(0xE7,0xA9,0x90), o3(0xE6,0x82,0xAA),
+     o3(0xE6,0x8F,0xA1), o3(0xE6,0xB8,0xA5),
+     o3(0xE6,0x97,0xAD), o3(0xE8,0x91,0xA6),
+     o3(0xE8,0x8A,0xA6), o3(0xE9,0xAF,0xB5),
+     o3(0xE6,0xA2,0x93), o3(0xE5,0x9C,0xA7),
+     o3(0xE6,0x96,0xA1), o3(0xE6,0x89,0xB1),
+     o3(0xE5,0xAE,0x9B), o3(0xE5,0xA7,0x90),
+     o3(0xE8,0x99,0xBB), o3(0xE9,0xA3,0xB4),
+     o3(0xE7,0xB5,0xA2), o3(0xE7,0xB6,0xBE),
+     o3(0xE9,0xAE,0x8E), o3(0xE6,0x88,0x96),
+     o3(0xE7,0xB2,0x9F), o3(0xE8,0xA2,0xB7),
+     o3(0xE5,0xAE,0x89), o3(0xE5,0xBA,0xB5),
+     o3(0xE6,0x8C,0x89), o3(0xE6,0x9A,0x97),
+     o3(0xE6,0xA1,0x88), o3(0xE9,0x97,0x87),
+     o3(0xE9,0x9E,0x8D), o3(0xE6,0x9D,0x8F),
+     o3(0xE4,0xBB,0xA5), o3(0xE4,0xBC,0x8A),
+     o3(0xE4,0xBD,0x8D), o3(0xE4,0xBE,0x9D),
+     o3(0xE5,0x81,0x89), o3(0xE5,0x9B,0xB2),
+     o3(0xE5,0xA4,0xB7), o3(0xE5,0xA7,0x94),
+     o3(0xE5,0xA8,0x81), o3(0xE5,0xB0,0x89),
+     o3(0xE6,0x83,0x9F), o3(0xE6,0x84,0x8F),
+     o3(0xE6,0x85,0xB0), o3(0xE6,0x98,0x93),
+     o3(0xE6,0xA4,0x85), o3(0xE7,0x82,0xBA),
+     o3(0xE7,0x95,0x8F), o3(0xE7,0x95,0xB0),
+     o3(0xE7,0xA7,0xBB), o3(0xE7,0xB6,0xAD),
+     o3(0xE7,0xB7,0xAF), o3(0xE8,0x83,0x83),
+     o3(0xE8,0x90,0x8E), o3(0xE8,0xA1,0xA3),
+     o3(0xE8,0xAC,0x82), o3(0xE9,0x81,0x95),
+     o3(0xE9,0x81,0xBA), o3(0xE5,0x8C,0xBB),
+     o3(0xE4,0xBA,0x95), o3(0xE4,0xBA,0xA5),
+     o3(0xE5,0x9F,0x9F), o3(0xE8,0x82,0xB2),
+     o3(0xE9,0x83,0x81), o3(0xE7,0xA3,0xAF),
+     o3(0xE4,0xB8,0x80), o3(0xE5,0xA3,0xB1),
+     o3(0xE6,0xBA,0xA2), o3(0xE9,0x80,0xB8),
+     o3(0xE7,0xA8,0xB2), o3(0xE8,0x8C,0xA8),
+     o3(0xE8,0x8A,0x8B), o3(0xE9,0xB0,0xAF),
+     o3(0xE5,0x85,0x81), o3(0xE5,0x8D,0xB0),
+     o3(0xE5,0x92,0xBD), o3(0xE5,0x93,0xA1),
+     o3(0xE5,0x9B,0xA0), o3(0xE5,0xA7,0xBB),
+     o3(0xE5,0xBC,0x95), o3(0xE9,0xA3,0xB2),
+     o3(0xE6,0xB7,0xAB), o3(0xE8,0x83,0xA4),
+     o3(0xE8,0x94,0xAD),
+
+#define from_EUC_JP_B0 WORDINDEX2INFO(7071)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B0_infos,
+
+#define from_EUC_JP_B1_infos WORDINDEX2INFO(7073)
+                INVALID, o3(0xE9,0x99,0xA2),
+     o3(0xE9,0x99,0xB0), o3(0xE9,0x9A,0xA0),
+     o3(0xE9,0x9F,0xBB), o3(0xE5,0x90,0x8B),
+     o3(0xE5,0x8F,0xB3), o3(0xE5,0xAE,0x87),
+     o3(0xE7,0x83,0x8F), o3(0xE7,0xBE,0xBD),
+     o3(0xE8,0xBF,0x82), o3(0xE9,0x9B,0xA8),
+     o3(0xE5,0x8D,0xAF), o3(0xE9,0xB5,0x9C),
+     o3(0xE7,0xAA,0xBA), o3(0xE4,0xB8,0x91),
+     o3(0xE7,0xA2,0x93), o3(0xE8,0x87,0xBC),
+     o3(0xE6,0xB8,0xA6), o3(0xE5,0x98,0x98),
+     o3(0xE5,0x94,0x84), o3(0xE6,0xAC,0x9D),
+     o3(0xE8,0x94,0x9A), o3(0xE9,0xB0,0xBB),
+     o3(0xE5,0xA7,0xA5), o3(0xE5,0x8E,0xA9),
+     o3(0xE6,0xB5,0xA6), o3(0xE7,0x93,0x9C),
+     o3(0xE9,0x96,0x8F), o3(0xE5,0x99,0x82),
+     o3(0xE4,0xBA,0x91), o3(0xE9,0x81,0x8B),
+     o3(0xE9,0x9B,0xB2), o3(0xE8,0x8D,0x8F),
+     o3(0xE9,0xA4,0x8C), o3(0xE5,0x8F,0xA1),
+     o3(0xE5,0x96,0xB6), o3(0xE5,0xAC,0xB0),
+     o3(0xE5,0xBD,0xB1), o3(0xE6,0x98,0xA0),
+     o3(0xE6,0x9B,0xB3), o3(0xE6,0xA0,0x84),
+     o3(0xE6,0xB0,0xB8), o3(0xE6,0xB3,0xB3),
+     o3(0xE6,0xB4,0xA9), o3(0xE7,0x91,0x9B),
+     o3(0xE7,0x9B,0x88), o3(0xE7,0xA9,0x8E),
+     o3(0xE9,0xA0,0xB4), o3(0xE8,0x8B,0xB1),
+     o3(0xE8,0xA1,0x9B), o3(0xE8,0xA9,0xA0),
+     o3(0xE9,0x8B,0xAD), o3(0xE6,0xB6,0xB2),
+     o3(0xE7,0x96,0xAB), o3(0xE7,0x9B,0x8A),
+     o3(0xE9,0xA7,0x85), o3(0xE6,0x82,0xA6),
+     o3(0xE8,0xAC,0x81), o3(0xE8,0xB6,0x8A),
+     o3(0xE9,0x96,0xB2), o3(0xE6,0xA6,0x8E),
+     o3(0xE5,0x8E,0xAD), o3(0xE5,0x86,0x86),
+     o3(0xE5,0x9C,0x92), o3(0xE5,0xA0,0xB0),
+     o3(0xE5,0xA5,0x84), o3(0xE5,0xAE,0xB4),
+     o3(0xE5,0xBB,0xB6), o3(0xE6,0x80,0xA8),
+     o3(0xE6,0x8E,0xA9), o3(0xE6,0x8F,0xB4),
+     o3(0xE6,0xB2,0xBF), o3(0xE6,0xBC,0x94),
+     o3(0xE7,0x82,0x8E), o3(0xE7,0x84,0x94),
+     o3(0xE7,0x85,0x99), o3(0xE7,0x87,0x95),
+     o3(0xE7,0x8C,0xBF), o3(0xE7,0xB8,0x81),
+     o3(0xE8,0x89,0xB6), o3(0xE8,0x8B,0x91),
+     o3(0xE8,0x96,0x97), o3(0xE9,0x81,0xA0),
+     o3(0xE9,0x89,0x9B), o3(0xE9,0xB4,0x9B),
+     o3(0xE5,0xA1,0xA9), o3(0xE6,0x96,0xBC),
+     o3(0xE6,0xB1,0x9A), o3(0xE7,0x94,0xA5),
+     o3(0xE5,0x87,0xB9), o3(0xE5,0xA4,0xAE),
+     o3(0xE5,0xA5,0xA5), o3(0xE5,0xBE,0x80),
+     o3(0xE5,0xBF,0x9C),
+
+#define from_EUC_JP_B1 WORDINDEX2INFO(7168)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B1_infos,
+
+#define from_EUC_JP_B2_infos WORDINDEX2INFO(7170)
+                INVALID, o3(0xE6,0x8A,0xBC),
+     o3(0xE6,0x97,0xBA), o3(0xE6,0xA8,0xAA),
+     o3(0xE6,0xAC,0xA7), o3(0xE6,0xAE,0xB4),
+     o3(0xE7,0x8E,0x8B), o3(0xE7,0xBF,0x81),
+     o3(0xE8,0xA5,0x96), o3(0xE9,0xB4,0xAC),
+     o3(0xE9,0xB4,0x8E), o3(0xE9,0xBB,0x84),
+     o3(0xE5,0xB2,0xA1), o3(0xE6,0xB2,0x96),
+     o3(0xE8,0x8D,0xBB), o3(0xE5,0x84,0x84),
+     o3(0xE5,0xB1,0x8B), o3(0xE6,0x86,0xB6),
+     o3(0xE8,0x87,0x86), o3(0xE6,0xA1,0xB6),
+     o3(0xE7,0x89,0xA1), o3(0xE4,0xB9,0x99),
+     o3(0xE4,0xBF,0xBA), o3(0xE5,0x8D,0xB8),
+     o3(0xE6,0x81,0xA9), o3(0xE6,0xB8,0xA9),
+     o3(0xE7,0xA9,0x8F), o3(0xE9,0x9F,0xB3),
+     o3(0xE4,0xB8,0x8B), o3(0xE5,0x8C,0x96),
+     o3(0xE4,0xBB,0xAE), o3(0xE4,0xBD,0x95),
+     o3(0xE4,0xBC,0xBD), o3(0xE4,0xBE,0xA1),
+     o3(0xE4,0xBD,0xB3), o3(0xE5,0x8A,0xA0),
+     o3(0xE5,0x8F,0xAF), o3(0xE5,0x98,0x89),
+     o3(0xE5,0xA4,0x8F), o3(0xE5,0xAB,0x81),
+     o3(0xE5,0xAE,0xB6), o3(0xE5,0xAF,0xA1),
+     o3(0xE7,0xA7,0x91), o3(0xE6,0x9A,0x87),
+     o3(0xE6,0x9E,0x9C), o3(0xE6,0x9E,0xB6),
+     o3(0xE6,0xAD,0x8C), o3(0xE6,0xB2,0xB3),
+     o3(0xE7,0x81,0xAB), o3(0xE7,0x8F,0x82),
+     o3(0xE7,0xA6,0x8D), o3(0xE7,0xA6,0xBE),
+     o3(0xE7,0xA8,0xBC), o3(0xE7,0xAE,0x87),
+     o3(0xE8,0x8A,0xB1), o3(0xE8,0x8B,0x9B),
+     o3(0xE8,0x8C,0x84), o3(0xE8,0x8D,0xB7),
+     o3(0xE8,0x8F,0xAF), o3(0xE8,0x8F,0x93),
+     o3(0xE8,0x9D,0xA6), o3(0xE8,0xAA,0xB2),
+     o3(0xE5,0x98,0xA9), o3(0xE8,0xB2,0xA8),
+     o3(0xE8,0xBF,0xA6), o3(0xE9,0x81,0x8E),
+     o3(0xE9,0x9C,0x9E), o3(0xE8,0x9A,0x8A),
+     o3(0xE4,0xBF,0x84), o3(0xE5,0xB3,0xA8),
+     o3(0xE6,0x88,0x91), o3(0xE7,0x89,0x99),
+     o3(0xE7,0x94,0xBB), o3(0xE8,0x87,0xA5),
+     o3(0xE8,0x8A,0xBD), o3(0xE8,0x9B,0xBE),
+     o3(0xE8,0xB3,0x80), o3(0xE9,0x9B,0x85),
+     o3(0xE9,0xA4,0x93), o3(0xE9,0xA7,0x95),
+     o3(0xE4,0xBB,0x8B), o3(0xE4,0xBC,0x9A),
+     o3(0xE8,0xA7,0xA3), o3(0xE5,0x9B,0x9E),
+     o3(0xE5,0xA1,0x8A), o3(0xE5,0xA3,0x8A),
+     o3(0xE5,0xBB,0xBB), o3(0xE5,0xBF,0xAB),
+     o3(0xE6,0x80,0xAA), o3(0xE6,0x82,0x94),
+     o3(0xE6,0x81,0xA2), o3(0xE6,0x87,0x90),
+     o3(0xE6,0x88,0x92), o3(0xE6,0x8B,0x90),
+     o3(0xE6,0x94,0xB9),
+
+#define from_EUC_JP_B2 WORDINDEX2INFO(7265)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B2_infos,
+
+#define from_EUC_JP_B3_infos WORDINDEX2INFO(7267)
+                INVALID, o3(0xE9,0xAD,0x81),
+     o3(0xE6,0x99,0xA6), o3(0xE6,0xA2,0xB0),
+     o3(0xE6,0xB5,0xB7), o3(0xE7,0x81,0xB0),
+     o3(0xE7,0x95,0x8C), o3(0xE7,0x9A,0x86),
+     o3(0xE7,0xB5,0xB5), o3(0xE8,0x8A,0xA5),
+     o3(0xE8,0x9F,0xB9), o3(0xE9,0x96,0x8B),
+     o3(0xE9,0x9A,0x8E), o3(0xE8,0xB2,0x9D),
+     o3(0xE5,0x87,0xB1), o3(0xE5,0x8A,0xBE),
+     o3(0xE5,0xA4,0x96), o3(0xE5,0x92,0xB3),
+     o3(0xE5,0xAE,0xB3), o3(0xE5,0xB4,0x96),
+     o3(0xE6,0x85,0xA8), o3(0xE6,0xA6,0x82),
+     o3(0xE6,0xB6,0xAF), o3(0xE7,0xA2,0x8D),
+     o3(0xE8,0x93,0x8B), o3(0xE8,0xA1,0x97),
+     o3(0xE8,0xA9,0xB2), o3(0xE9,0x8E,0xA7),
+     o3(0xE9,0xAA,0xB8), o3(0xE6,0xB5,0xAC),
+     o3(0xE9,0xA6,0xA8), o3(0xE8,0x9B,0x99),
+     o3(0xE5,0x9E,0xA3), o3(0xE6,0x9F,0xBF),
+     o3(0xE8,0x9B,0x8E), o3(0xE9,0x88,0x8E),
+     o3(0xE5,0x8A,0x83), o3(0xE5,0x9A,0x87),
+     o3(0xE5,0x90,0x84), o3(0xE5,0xBB,0x93),
+     o3(0xE6,0x8B,0xA1), o3(0xE6,0x92,0xB9),
+     o3(0xE6,0xA0,0xBC), o3(0xE6,0xA0,0xB8),
+     o3(0xE6,0xAE,0xBB), o3(0xE7,0x8D,0xB2),
+     o3(0xE7,0xA2,0xBA), o3(0xE7,0xA9,0xAB),
+     o3(0xE8,0xA6,0x9A), o3(0xE8,0xA7,0x92),
+     o3(0xE8,0xB5,0xAB), o3(0xE8,0xBC,0x83),
+     o3(0xE9,0x83,0xAD), o3(0xE9,0x96,0xA3),
+     o3(0xE9,0x9A,0x94), o3(0xE9,0x9D,0xA9),
+     o3(0xE5,0xAD,0xA6), o3(0xE5,0xB2,0xB3),
+     o3(0xE6,0xA5,0xBD), o3(0xE9,0xA1,0x8D),
+     o3(0xE9,0xA1,0x8E), o3(0xE6,0x8E,0x9B),
+     o3(0xE7,0xAC,0xA0), o3(0xE6,0xA8,0xAB),
+     o3(0xE6,0xA9,0xBF), o3(0xE6,0xA2,0xB6),
+     o3(0xE9,0xB0,0x8D), o3(0xE6,0xBD,0x9F),
+     o3(0xE5,0x89,0xB2), o3(0xE5,0x96,0x9D),
+     o3(0xE6,0x81,0xB0), o3(0xE6,0x8B,0xAC),
+     o3(0xE6,0xB4,0xBB), o3(0xE6,0xB8,0x87),
+     o3(0xE6,0xBB,0x91), o3(0xE8,0x91,0x9B),
+     o3(0xE8,0xA4,0x90), o3(0xE8,0xBD,0x84),
+     o3(0xE4,0xB8,0x94), o3(0xE9,0xB0,0xB9),
+     o3(0xE5,0x8F,0xB6), o3(0xE6,0xA4,0x9B),
+     o3(0xE6,0xA8,0xBA), o3(0xE9,0x9E,0x84),
+     o3(0xE6,0xA0,0xAA), o3(0xE5,0x85,0x9C),
+     o3(0xE7,0xAB,0x83), o3(0xE8,0x92,0xB2),
+     o3(0xE9,0x87,0x9C), o3(0xE9,0x8E,0x8C),
+     o3(0xE5,0x99,0x9B), o3(0xE9,0xB4,0xA8),
+     o3(0xE6,0xA0,0xA2), o3(0xE8,0x8C,0x85),
+     o3(0xE8,0x90,0xB1),
+
+#define from_EUC_JP_B3 WORDINDEX2INFO(7362)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B3_infos,
+
+#define from_EUC_JP_B4_infos WORDINDEX2INFO(7364)
+                INVALID, o3(0xE7,0xB2,0xA5),
+     o3(0xE5,0x88,0x88), o3(0xE8,0x8B,0x85),
+     o3(0xE7,0x93,0xA6), o3(0xE4,0xB9,0xBE),
+     o3(0xE4,0xBE,0x83), o3(0xE5,0x86,0xA0),
+     o3(0xE5,0xAF,0x92), o3(0xE5,0x88,0x8A),
+     o3(0xE5,0x8B,0x98), o3(0xE5,0x8B,0xA7),
+     o3(0xE5,0xB7,0xBB), o3(0xE5,0x96,0x9A),
+     o3(0xE5,0xA0,0xAA), o3(0xE5,0xA7,0xA6),
+     o3(0xE5,0xAE,0x8C), o3(0xE5,0xAE,0x98),
+     o3(0xE5,0xAF,0x9B), o3(0xE5,0xB9,0xB2),
+     o3(0xE5,0xB9,0xB9), o3(0xE6,0x82,0xA3),
+     o3(0xE6,0x84,0x9F), o3(0xE6,0x85,0xA3),
+     o3(0xE6,0x86,0xBE), o3(0xE6,0x8F,0x9B),
+     o3(0xE6,0x95,0xA2), o3(0xE6,0x9F,0x91),
+     o3(0xE6,0xA1,0x93), o3(0xE6,0xA3,0xBA),
+     o3(0xE6,0xAC,0xBE), o3(0xE6,0xAD,0x93),
+     o3(0xE6,0xB1,0x97), o3(0xE6,0xBC,0xA2),
+     o3(0xE6,0xBE,0x97), o3(0xE6,0xBD,0x85),
+     o3(0xE7,0x92,0xB0), o3(0xE7,0x94,0x98),
+     o3(0xE7,0x9B,0xA3), o3(0xE7,0x9C,0x8B),
+     o3(0xE7,0xAB,0xBF), o3(0xE7,0xAE,0xA1),
+     o3(0xE7,0xB0,0xA1), o3(0xE7,0xB7,0xA9),
+     o3(0xE7,0xBC,0xB6), o3(0xE7,0xBF,0xB0),
+     o3(0xE8,0x82,0x9D), o3(0xE8,0x89,0xA6),
+     o3(0xE8,0x8E,0x9E), o3(0xE8,0xA6,0xB3),
+     o3(0xE8,0xAB,0x8C), o3(0xE8,0xB2,0xAB),
+     o3(0xE9,0x82,0x84), o3(0xE9,0x91,0x91),
+     o3(0xE9,0x96,0x93), o3(0xE9,0x96,0x91),
+     o3(0xE9,0x96,0xA2), o3(0xE9,0x99,0xA5),
+     o3(0xE9,0x9F,0x93), o3(0xE9,0xA4,0xA8),
+     o3(0xE8,0x88,0x98), o3(0xE4,0xB8,0xB8),
+     o3(0xE5,0x90,0xAB), o3(0xE5,0xB2,0xB8),
+     o3(0xE5,0xB7,0x8C), o3(0xE7,0x8E,0xA9),
+     o3(0xE7,0x99,0x8C), o3(0xE7,0x9C,0xBC),
+     o3(0xE5,0xB2,0xA9), o3(0xE7,0xBF,0xAB),
+     o3(0xE8,0xB4,0x8B), o3(0xE9,0x9B,0x81),
+     o3(0xE9,0xA0,0x91), o3(0xE9,0xA1,0x94),
+     o3(0xE9,0xA1,0x98), o3(0xE4,0xBC,0x81),
+     o3(0xE4,0xBC,0x8E), o3(0xE5,0x8D,0xB1),
+     o3(0xE5,0x96,0x9C), o3(0xE5,0x99,0xA8),
+     o3(0xE5,0x9F,0xBA), o3(0xE5,0xA5,0x87),
+     o3(0xE5,0xAC,0x89), o3(0xE5,0xAF,0x84),
+     o3(0xE5,0xB2,0x90), o3(0xE5,0xB8,0x8C),
+     o3(0xE5,0xB9,0xBE), o3(0xE5,0xBF,0x8C),
+     o3(0xE6,0x8F,0xAE), o3(0xE6,0x9C,0xBA),
+     o3(0xE6,0x97,0x97), o3(0xE6,0x97,0xA2),
+     o3(0xE6,0x9C,0x9F), o3(0xE6,0xA3,0x8B),
+     o3(0xE6,0xA3,0x84),
+
+#define from_EUC_JP_B4 WORDINDEX2INFO(7459)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B4_infos,
+
+#define from_EUC_JP_B5_infos WORDINDEX2INFO(7461)
+                INVALID, o3(0xE6,0xA9,0x9F),
+     o3(0xE5,0xB8,0xB0), o3(0xE6,0xAF,0x85),
+     o3(0xE6,0xB0,0x97), o3(0xE6,0xB1,0xBD),
+     o3(0xE7,0x95,0xBF), o3(0xE7,0xA5,0x88),
+     o3(0xE5,0xAD,0xA3), o3(0xE7,0xA8,0x80),
+     o3(0xE7,0xB4,0x80), o3(0xE5,0xBE,0xBD),
+     o3(0xE8,0xA6,0x8F), o3(0xE8,0xA8,0x98),
+     o3(0xE8,0xB2,0xB4), o3(0xE8,0xB5,0xB7),
+     o3(0xE8,0xBB,0x8C), o3(0xE8,0xBC,0x9D),
+     o3(0xE9,0xA3,0xA2), o3(0xE9,0xA8,0x8E),
+     o3(0xE9,0xAC,0xBC), o3(0xE4,0xBA,0x80),
+     o3(0xE5,0x81,0xBD), o3(0xE5,0x84,0x80),
+     o3(0xE5,0xA6,0x93), o3(0xE5,0xAE,0x9C),
+     o3(0xE6,0x88,0xAF), o3(0xE6,0x8A,0x80),
+     o3(0xE6,0x93,0xAC), o3(0xE6,0xAC,0xBA),
+     o3(0xE7,0x8A,0xA0), o3(0xE7,0x96,0x91),
+     o3(0xE7,0xA5,0x87), o3(0xE7,0xBE,0xA9),
+     o3(0xE8,0x9F,0xBB), o3(0xE8,0xAA,0xBC),
+     o3(0xE8,0xAD,0xB0), o3(0xE6,0x8E,0xAC),
+     o3(0xE8,0x8F,0x8A), o3(0xE9,0x9E,0xA0),
+     o3(0xE5,0x90,0x89), o3(0xE5,0x90,0x83),
+     o3(0xE5,0x96,0xAB), o3(0xE6,0xA1,0x94),
+     o3(0xE6,0xA9,0x98), o3(0xE8,0xA9,0xB0),
+     o3(0xE7,0xA0,0xA7), o3(0xE6,0x9D,0xB5),
+     o3(0xE9,0xBB,0x8D), o3(0xE5,0x8D,0xB4),
+     o3(0xE5,0xAE,0xA2), o3(0xE8,0x84,0x9A),
+     o3(0xE8,0x99,0x90), o3(0xE9,0x80,0x86),
+     o3(0xE4,0xB8,0x98), o3(0xE4,0xB9,0x85),
+     o3(0xE4,0xBB,0x87), o3(0xE4,0xBC,0x91),
+     o3(0xE5,0x8F,0x8A), o3(0xE5,0x90,0xB8),
+     o3(0xE5,0xAE,0xAE), o3(0xE5,0xBC,0x93),
+     o3(0xE6,0x80,0xA5), o3(0xE6,0x95,0x91),
+     o3(0xE6,0x9C,0xBD), o3(0xE6,0xB1,0x82),
+     o3(0xE6,0xB1,0xB2), o3(0xE6,0xB3,0xA3),
+     o3(0xE7,0x81,0xB8), o3(0xE7,0x90,0x83),
+     o3(0xE7,0xA9,0xB6), o3(0xE7,0xAA,0xAE),
+     o3(0xE7,0xAC,0x88), o3(0xE7,0xB4,0x9A),
+     o3(0xE7,0xB3,0xBE), o3(0xE7,0xB5,0xA6),
+     o3(0xE6,0x97,0xA7), o3(0xE7,0x89,0x9B),
+     o3(0xE5,0x8E,0xBB), o3(0xE5,0xB1,0x85),
+     o3(0xE5,0xB7,0xA8), o3(0xE6,0x8B,0x92),
+     o3(0xE6,0x8B,0xA0), o3(0xE6,0x8C,0x99),
+     o3(0xE6,0xB8,0xA0), o3(0xE8,0x99,0x9A),
+     o3(0xE8,0xA8,0xB1), o3(0xE8,0xB7,0x9D),
+     o3(0xE9,0x8B,0xB8), o3(0xE6,0xBC,0x81),
+     o3(0xE7,0xA6,0xA6), o3(0xE9,0xAD,0x9A),
+     o3(0xE4,0xBA,0xA8), o3(0xE4,0xBA,0xAB),
+     o3(0xE4,0xBA,0xAC),
+
+#define from_EUC_JP_B5 WORDINDEX2INFO(7556)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B5_infos,
+
+#define from_EUC_JP_B6_infos WORDINDEX2INFO(7558)
+                INVALID, o3(0xE4,0xBE,0x9B),
+     o3(0xE4,0xBE,0xA0), o3(0xE5,0x83,0x91),
+     o3(0xE5,0x85,0x87), o3(0xE7,0xAB,0xB6),
+     o3(0xE5,0x85,0xB1), o3(0xE5,0x87,0xB6),
+     o3(0xE5,0x8D,0x94), o3(0xE5,0x8C,0xA1),
+     o3(0xE5,0x8D,0xBF), o3(0xE5,0x8F,0xAB),
+     o3(0xE5,0x96,0xAC), o3(0xE5,0xA2,0x83),
+     o3(0xE5,0xB3,0xA1), o3(0xE5,0xBC,0xB7),
+     o3(0xE5,0xBD,0x8A), o3(0xE6,0x80,0xAF),
+     o3(0xE6,0x81,0x90), o3(0xE6,0x81,0xAD),
+     o3(0xE6,0x8C,0x9F), o3(0xE6,0x95,0x99),
+     o3(0xE6,0xA9,0x8B), o3(0xE6,0xB3,0x81),
+     o3(0xE7,0x8B,0x82), o3(0xE7,0x8B,0xAD),
+     o3(0xE7,0x9F,0xAF), o3(0xE8,0x83,0xB8),
+     o3(0xE8,0x84,0x85), o3(0xE8,0x88,0x88),
+     o3(0xE8,0x95,0x8E), o3(0xE9,0x83,0xB7),
+     o3(0xE9,0x8F,0xA1), o3(0xE9,0x9F,0xBF),
+     o3(0xE9,0xA5,0x97), o3(0xE9,0xA9,0x9A),
+     o3(0xE4,0xBB,0xB0), o3(0xE5,0x87,0x9D),
+     o3(0xE5,0xB0,0xAD), o3(0xE6,0x9A,0x81),
+     o3(0xE6,0xA5,0xAD), o3(0xE5,0xB1,0x80),
+     o3(0xE6,0x9B,0xB2), o3(0xE6,0xA5,0xB5),
+     o3(0xE7,0x8E,0x89), o3(0xE6,0xA1,0x90),
+     o3(0xE7,0xB2,0x81), o3(0xE5,0x83,0x85),
+     o3(0xE5,0x8B,0xA4), o3(0xE5,0x9D,0x87),
+     o3(0xE5,0xB7,0xBE), o3(0xE9,0x8C,0xA6),
+     o3(0xE6,0x96,0xA4), o3(0xE6,0xAC,0xA3),
+     o3(0xE6,0xAC,0xBD), o3(0xE7,0x90,0xB4),
+     o3(0xE7,0xA6,0x81), o3(0xE7,0xA6,0xBD),
+     o3(0xE7,0xAD,0x8B), o3(0xE7,0xB7,0x8A),
+     o3(0xE8,0x8A,0xB9), o3(0xE8,0x8F,0x8C),
+     o3(0xE8,0xA1,0xBF), o3(0xE8,0xA5,0x9F),
+     o3(0xE8,0xAC,0xB9), o3(0xE8,0xBF,0x91),
+     o3(0xE9,0x87,0x91), o3(0xE5,0x90,0x9F),
+     o3(0xE9,0x8A,0x80), o3(0xE4,0xB9,0x9D),
+     o3(0xE5,0x80,0xB6), o3(0xE5,0x8F,0xA5),
+     o3(0xE5,0x8C,0xBA), o3(0xE7,0x8B,0x97),
+     o3(0xE7,0x8E,0x96), o3(0xE7,0x9F,0xA9),
+     o3(0xE8,0x8B,0xA6), o3(0xE8,0xBA,0xAF),
+     o3(0xE9,0xA7,0x86), o3(0xE9,0xA7,0x88),
+     o3(0xE9,0xA7,0x92), o3(0xE5,0x85,0xB7),
+     o3(0xE6,0x84,0x9A), o3(0xE8,0x99,0x9E),
+     o3(0xE5,0x96,0xB0), o3(0xE7,0xA9,0xBA),
+     o3(0xE5,0x81,0xB6), o3(0xE5,0xAF,0x93),
+     o3(0xE9,0x81,0x87), o3(0xE9,0x9A,0x85),
+     o3(0xE4,0xB8,0xB2), o3(0xE6,0xAB,0x9B),
+     o3(0xE9,0x87,0xA7), o3(0xE5,0xB1,0x91),
+     o3(0xE5,0xB1,0x88),
+
+#define from_EUC_JP_B6 WORDINDEX2INFO(7653)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B6_infos,
+
+#define from_EUC_JP_B7_infos WORDINDEX2INFO(7655)
+                INVALID, o3(0xE6,0x8E,0x98),
+     o3(0xE7,0xAA,0x9F), o3(0xE6,0xB2,0x93),
+     o3(0xE9,0x9D,0xB4), o3(0xE8,0xBD,0xA1),
+     o3(0xE7,0xAA,0xAA), o3(0xE7,0x86,0x8A),
+     o3(0xE9,0x9A,0x88), o3(0xE7,0xB2,0x82),
+     o3(0xE6,0xA0,0x97), o3(0xE7,0xB9,0xB0),
+     o3(0xE6,0xA1,0x91), o3(0xE9,0x8D,0xAC),
+     o3(0xE5,0x8B,0xB2), o3(0xE5,0x90,0x9B),
+     o3(0xE8,0x96,0xAB), o3(0xE8,0xA8,0x93),
+     o3(0xE7,0xBE,0xA4), o3(0xE8,0xBB,0x8D),
+     o3(0xE9,0x83,0xA1), o3(0xE5,0x8D,0xA6),
+     o3(0xE8,0xA2,0x88), o3(0xE7,0xA5,0x81),
+     o3(0xE4,0xBF,0x82), o3(0xE5,0x82,0xBE),
+     o3(0xE5,0x88,0x91), o3(0xE5,0x85,0x84),
+     o3(0xE5,0x95,0x93), o3(0xE5,0x9C,0xAD),
+     o3(0xE7,0x8F,0xAA), o3(0xE5,0x9E,0x8B),
+     o3(0xE5,0xA5,0x91), o3(0xE5,0xBD,0xA2),
+     o3(0xE5,0xBE,0x84), o3(0xE6,0x81,0xB5),
+     o3(0xE6,0x85,0xB6), o3(0xE6,0x85,0xA7),
+     o3(0xE6,0x86,0xA9), o3(0xE6,0x8E,0xB2),
+     o3(0xE6,0x90,0xBA), o3(0xE6,0x95,0xAC),
+     o3(0xE6,0x99,0xAF), o3(0xE6,0xA1,0x82),
+     o3(0xE6,0xB8,0x93), o3(0xE7,0x95,0xA6),
+     o3(0xE7,0xA8,0xBD), o3(0xE7,0xB3,0xBB),
+     o3(0xE7,0xB5,0x8C), o3(0xE7,0xB6,0x99),
+     o3(0xE7,0xB9,0x8B), o3(0xE7,0xBD,0xAB),
+     o3(0xE8,0x8C,0x8E), o3(0xE8,0x8D,0x8A),
+     o3(0xE8,0x9B,0x8D), o3(0xE8,0xA8,0x88),
+     o3(0xE8,0xA9,0xA3), o3(0xE8,0xAD,0xA6),
+     o3(0xE8,0xBB,0xBD), o3(0xE9,0xA0,0x9A),
+     o3(0xE9,0xB6,0x8F), o3(0xE8,0x8A,0xB8),
+     o3(0xE8,0xBF,0x8E), o3(0xE9,0xAF,0xA8),
+     o3(0xE5,0x8A,0x87), o3(0xE6,0x88,0x9F),
+     o3(0xE6,0x92,0x83), o3(0xE6,0xBF,0x80),
+     o3(0xE9,0x9A,0x99), o3(0xE6,0xA1,0x81),
+     o3(0xE5,0x82,0x91), o3(0xE6,0xAC,0xA0),
+     o3(0xE6,0xB1,0xBA), o3(0xE6,0xBD,0x94),
+     o3(0xE7,0xA9,0xB4), o3(0xE7,0xB5,0x90),
+     o3(0xE8,0xA1,0x80), o3(0xE8,0xA8,0xA3),
+     o3(0xE6,0x9C,0x88), o3(0xE4,0xBB,0xB6),
+     o3(0xE5,0x80,0xB9), o3(0xE5,0x80,0xA6),
+     o3(0xE5,0x81,0xA5), o3(0xE5,0x85,0xBC),
+     o3(0xE5,0x88,0xB8), o3(0xE5,0x89,0xA3),
+     o3(0xE5,0x96,0xA7), o3(0xE5,0x9C,0x8F),
+     o3(0xE5,0xA0,0x85), o3(0xE5,0xAB,0x8C),
+     o3(0xE5,0xBB,0xBA), o3(0xE6,0x86,0xB2),
+     o3(0xE6,0x87,0xB8), o3(0xE6,0x8B,0xB3),
+     o3(0xE6,0x8D,0xB2),
+
+#define from_EUC_JP_B7 WORDINDEX2INFO(7750)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B7_infos,
+
+#define from_EUC_JP_B8_infos WORDINDEX2INFO(7752)
+                INVALID, o3(0xE6,0xA4,0x9C),
+     o3(0xE6,0xA8,0xA9), o3(0xE7,0x89,0xBD),
+     o3(0xE7,0x8A,0xAC), o3(0xE7,0x8C,0xAE),
+     o3(0xE7,0xA0,0x94), o3(0xE7,0xA1,0xAF),
+     o3(0xE7,0xB5,0xB9), o3(0xE7,0x9C,0x8C),
+     o3(0xE8,0x82,0xA9), o3(0xE8,0xA6,0x8B),
+     o3(0xE8,0xAC,0x99), o3(0xE8,0xB3,0xA2),
+     o3(0xE8,0xBB,0x92), o3(0xE9,0x81,0xA3),
+     o3(0xE9,0x8D,0xB5), o3(0xE9,0x99,0xBA),
+     o3(0xE9,0xA1,0x95), o3(0xE9,0xA8,0x93),
+     o3(0xE9,0xB9,0xB8), o3(0xE5,0x85,0x83),
+     o3(0xE5,0x8E,0x9F), o3(0xE5,0x8E,0xB3),
+     o3(0xE5,0xB9,0xBB), o3(0xE5,0xBC,0xA6),
+     o3(0xE6,0xB8,0x9B), o3(0xE6,0xBA,0x90),
+     o3(0xE7,0x8E,0x84), o3(0xE7,0x8F,0xBE),
+     o3(0xE7,0xB5,0x83), o3(0xE8,0x88,0xB7),
+     o3(0xE8,0xA8,0x80), o3(0xE8,0xAB,0xBA),
+     o3(0xE9,0x99,0x90), o3(0xE4,0xB9,0x8E),
+     o3(0xE5,0x80,0x8B), o3(0xE5,0x8F,0xA4),
+     o3(0xE5,0x91,0xBC), o3(0xE5,0x9B,0xBA),
+     o3(0xE5,0xA7,0x91), o3(0xE5,0xAD,0xA4),
+     o3(0xE5,0xB7,0xB1), o3(0xE5,0xBA,0xAB),
+     o3(0xE5,0xBC,0xA7), o3(0xE6,0x88,0xB8),
+     o3(0xE6,0x95,0x85), o3(0xE6,0x9E,0xAF),
+     o3(0xE6,0xB9,0x96), o3(0xE7,0x8B,0x90),
+     o3(0xE7,0xB3,0x8A), o3(0xE8,0xA2,0xB4),
+     o3(0xE8,0x82,0xA1), o3(0xE8,0x83,0xA1),
+     o3(0xE8,0x8F,0xB0), o3(0xE8,0x99,0x8E),
+     o3(0xE8,0xAA,0x87), o3(0xE8,0xB7,0xA8),
+     o3(0xE9,0x88,0xB7), o3(0xE9,0x9B,0x87),
+     o3(0xE9,0xA1,0xA7), o3(0xE9,0xBC,0x93),
+     o3(0xE4,0xBA,0x94), o3(0xE4,0xBA,0x92),
+     o3(0xE4,0xBC,0x8D), o3(0xE5,0x8D,0x88),
+     o3(0xE5,0x91,0x89), o3(0xE5,0x90,0xBE),
+     o3(0xE5,0xA8,0xAF), o3(0xE5,0xBE,0x8C),
+     o3(0xE5,0xBE,0xA1), o3(0xE6,0x82,0x9F),
+     o3(0xE6,0xA2,0xA7), o3(0xE6,0xAA,0x8E),
+     o3(0xE7,0x91,0x9A), o3(0xE7,0xA2,0x81),
+     o3(0xE8,0xAA,0x9E), o3(0xE8,0xAA,0xA4),
+     o3(0xE8,0xAD,0xB7), o3(0xE9,0x86,0x90),
+     o3(0xE4,0xB9,0x9E), o3(0xE9,0xAF,0x89),
+     o3(0xE4,0xBA,0xA4), o3(0xE4,0xBD,0xBC),
+     o3(0xE4,0xBE,0xAF), o3(0xE5,0x80,0x99),
+     o3(0xE5,0x80,0x96), o3(0xE5,0x85,0x89),
+     o3(0xE5,0x85,0xAC), o3(0xE5,0x8A,0x9F),
+     o3(0xE5,0x8A,0xB9), o3(0xE5,0x8B,0xBE),
+     o3(0xE5,0x8E,0x9A), o3(0xE5,0x8F,0xA3),
+     o3(0xE5,0x90,0x91),
+
+#define from_EUC_JP_B8 WORDINDEX2INFO(7847)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B8_infos,
+
+#define from_EUC_JP_B9_infos WORDINDEX2INFO(7849)
+                INVALID, o3(0xE5,0x90,0x8E),
+     o3(0xE5,0x96,0x89), o3(0xE5,0x9D,0x91),
+     o3(0xE5,0x9E,0xA2), o3(0xE5,0xA5,0xBD),
+     o3(0xE5,0xAD,0x94), o3(0xE5,0xAD,0x9D),
+     o3(0xE5,0xAE,0x8F), o3(0xE5,0xB7,0xA5),
+     o3(0xE5,0xB7,0xA7), o3(0xE5,0xB7,0xB7),
+     o3(0xE5,0xB9,0xB8), o3(0xE5,0xBA,0x83),
+     o3(0xE5,0xBA,0x9A), o3(0xE5,0xBA,0xB7),
+     o3(0xE5,0xBC,0x98), o3(0xE6,0x81,0x92),
+     o3(0xE6,0x85,0x8C), o3(0xE6,0x8A,0x97),
+     o3(0xE6,0x8B,0x98), o3(0xE6,0x8E,0xA7),
+     o3(0xE6,0x94,0xBB), o3(0xE6,0x98,0x82),
+     o3(0xE6,0x99,0x83), o3(0xE6,0x9B,0xB4),
+     o3(0xE6,0x9D,0xAD), o3(0xE6,0xA0,0xA1),
+     o3(0xE6,0xA2,0x97), o3(0xE6,0xA7,0x8B),
+     o3(0xE6,0xB1,0x9F), o3(0xE6,0xB4,0xAA),
+     o3(0xE6,0xB5,0xA9), o3(0xE6,0xB8,0xAF),
+     o3(0xE6,0xBA,0x9D), o3(0xE7,0x94,0xB2),
+     o3(0xE7,0x9A,0x87), o3(0xE7,0xA1,0xAC),
+     o3(0xE7,0xA8,0xBF), o3(0xE7,0xB3,0xA0),
+     o3(0xE7,0xB4,0x85), o3(0xE7,0xB4,0x98),
+     o3(0xE7,0xB5,0x9E), o3(0xE7,0xB6,0xB1),
+     o3(0xE8,0x80,0x95), o3(0xE8,0x80,0x83),
+     o3(0xE8,0x82,0xAF), o3(0xE8,0x82,0xB1),
+     o3(0xE8,0x85,0x94), o3(0xE8,0x86,0x8F),
+     o3(0xE8,0x88,0xAA), o3(0xE8,0x8D,0x92),
+     o3(0xE8,0xA1,0x8C), o3(0xE8,0xA1,0xA1),
+     o3(0xE8,0xAC,0x9B), o3(0xE8,0xB2,0xA2),
+     o3(0xE8,0xB3,0xBC), o3(0xE9,0x83,0x8A),
+     o3(0xE9,0x85,0xB5), o3(0xE9,0x89,0xB1),
+     o3(0xE7,0xA0,0xBF), o3(0xE9,0x8B,0xBC),
+     o3(0xE9,0x96,0xA4), o3(0xE9,0x99,0x8D),
+     o3(0xE9,0xA0,0x85), o3(0xE9,0xA6,0x99),
+     o3(0xE9,0xAB,0x98), o3(0xE9,0xB4,0xBB),
+     o3(0xE5,0x89,0x9B), o3(0xE5,0x8A,0xAB),
+     o3(0xE5,0x8F,0xB7), o3(0xE5,0x90,0x88),
+     o3(0xE5,0xA3,0x95), o3(0xE6,0x8B,0xB7),
+     o3(0xE6,0xBF,0xA0), o3(0xE8,0xB1,0xAA),
+     o3(0xE8,0xBD,0x9F), o3(0xE9,0xBA,0xB9),
+     o3(0xE5,0x85,0x8B), o3(0xE5,0x88,0xBB),
+     o3(0xE5,0x91,0x8A), o3(0xE5,0x9B,0xBD),
+     o3(0xE7,0xA9,0x80), o3(0xE9,0x85,0xB7),
+     o3(0xE9,0xB5,0xA0), o3(0xE9,0xBB,0x92),
+     o3(0xE7,0x8D,0x84), o3(0xE6,0xBC,0x89),
+     o3(0xE8,0x85,0xB0), o3(0xE7,0x94,0x91),
+     o3(0xE5,0xBF,0xBD), o3(0xE6,0x83,0x9A),
+     o3(0xE9,0xAA,0xA8), o3(0xE7,0x8B,0x9B),
+     o3(0xE8,0xBE,0xBC),
+
+#define from_EUC_JP_B9 WORDINDEX2INFO(7944)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_B9_infos,
+
+#define from_EUC_JP_BA_infos WORDINDEX2INFO(7946)
+                INVALID, o3(0xE6,0xAD,0xA4),
+     o3(0xE9,0xA0,0x83), o3(0xE4,0xBB,0x8A),
+     o3(0xE5,0x9B,0xB0), o3(0xE5,0x9D,0xA4),
+     o3(0xE5,0xA2,0xBE), o3(0xE5,0xA9,0x9A),
+     o3(0xE6,0x81,0xA8), o3(0xE6,0x87,0x87),
+     o3(0xE6,0x98,0x8F), o3(0xE6,0x98,0x86),
+     o3(0xE6,0xA0,0xB9), o3(0xE6,0xA2,0xB1),
+     o3(0xE6,0xB7,0xB7), o3(0xE7,0x97,0x95),
+     o3(0xE7,0xB4,0xBA), o3(0xE8,0x89,0xAE),
+     o3(0xE9,0xAD,0x82), o3(0xE4,0xBA,0x9B),
+     o3(0xE4,0xBD,0x90), o3(0xE5,0x8F,0x89),
+     o3(0xE5,0x94,0x86), o3(0xE5,0xB5,0xAF),
+     o3(0xE5,0xB7,0xA6), o3(0xE5,0xB7,0xAE),
+     o3(0xE6,0x9F,0xBB), o3(0xE6,0xB2,0x99),
+     o3(0xE7,0x91,0xB3), o3(0xE7,0xA0,0x82),
+     o3(0xE8,0xA9,0x90), o3(0xE9,0x8E,0x96),
+     o3(0xE8,0xA3,0x9F), o3(0xE5,0x9D,0x90),
+     o3(0xE5,0xBA,0xA7), o3(0xE6,0x8C,0xAB),
+     o3(0xE5,0x82,0xB5), o3(0xE5,0x82,0xAC),
+     o3(0xE5,0x86,0x8D), o3(0xE6,0x9C,0x80),
+     o3(0xE5,0x93,0x89), o3(0xE5,0xA1,0x9E),
+     o3(0xE5,0xA6,0xBB), o3(0xE5,0xAE,0xB0),
+     o3(0xE5,0xBD,0xA9), o3(0xE6,0x89,0x8D),
+     o3(0xE6,0x8E,0xA1), o3(0xE6,0xA0,0xBD),
+     o3(0xE6,0xAD,0xB3), o3(0xE6,0xB8,0x88),
+     o3(0xE7,0x81,0xBD), o3(0xE9,0x87,0x87),
+     o3(0xE7,0x8A,0x80), o3(0xE7,0xA0,0x95),
+     o3(0xE7,0xA0,0xA6), o3(0xE7,0xA5,0xAD),
+     o3(0xE6,0x96,0x8E), o3(0xE7,0xB4,0xB0),
+     o3(0xE8,0x8F,0x9C), o3(0xE8,0xA3,0x81),
+     o3(0xE8,0xBC,0x89), o3(0xE9,0x9A,0x9B),
+     o3(0xE5,0x89,0xA4), o3(0xE5,0x9C,0xA8),
+     o3(0xE6,0x9D,0x90), o3(0xE7,0xBD,0xAA),
+     o3(0xE8,0xB2,0xA1), o3(0xE5,0x86,0xB4),
+     o3(0xE5,0x9D,0x82), o3(0xE9,0x98,0xAA),
+     o3(0xE5,0xA0,0xBA), o3(0xE6,0xA6,0x8A),
+     o3(0xE8,0x82,0xB4), o3(0xE5,0x92,0xB2),
+     o3(0xE5,0xB4,0x8E), o3(0xE5,0x9F,0xBC),
+     o3(0xE7,0xA2,0x95), o3(0xE9,0xB7,0xBA),
+     o3(0xE4,0xBD,0x9C), o3(0xE5,0x89,0x8A),
+     o3(0xE5,0x92,0x8B), o3(0xE6,0x90,0xBE),
+     o3(0xE6,0x98,0xA8), o3(0xE6,0x9C,0x94),
+     o3(0xE6,0x9F,0xB5), o3(0xE7,0xAA,0x84),
+     o3(0xE7,0xAD,0x96), o3(0xE7,0xB4,0xA2),
+     o3(0xE9,0x8C,0xAF), o3(0xE6,0xA1,0x9C),
+     o3(0xE9,0xAE,0xAD), o3(0xE7,0xAC,0xB9),
+     o3(0xE5,0x8C,0x99), o3(0xE5,0x86,0x8A),
+     o3(0xE5,0x88,0xB7),
+
+#define from_EUC_JP_BA WORDINDEX2INFO(8041)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BA_infos,
+
+#define from_EUC_JP_BB_infos WORDINDEX2INFO(8043)
+                INVALID, o3(0xE5,0xAF,0x9F),
+     o3(0xE6,0x8B,0xB6), o3(0xE6,0x92,0xAE),
+     o3(0xE6,0x93,0xA6), o3(0xE6,0x9C,0xAD),
+     o3(0xE6,0xAE,0xBA), o3(0xE8,0x96,0xA9),
+     o3(0xE9,0x9B,0x91), o3(0xE7,0x9A,0x90),
+     o3(0xE9,0xAF,0x96), o3(0xE6,0x8D,0x8C),
+     o3(0xE9,0x8C,0x86), o3(0xE9,0xAE,0xAB),
+     o3(0xE7,0x9A,0xBF), o3(0xE6,0x99,0x92),
+     o3(0xE4,0xB8,0x89), o3(0xE5,0x82,0x98),
+     o3(0xE5,0x8F,0x82), o3(0xE5,0xB1,0xB1),
+     o3(0xE6,0x83,0xA8), o3(0xE6,0x92,0x92),
+     o3(0xE6,0x95,0xA3), o3(0xE6,0xA1,0x9F),
+     o3(0xE7,0x87,0xA6), o3(0xE7,0x8F,0x8A),
+     o3(0xE7,0x94,0xA3), o3(0xE7,0xAE,0x97),
+     o3(0xE7,0xBA,0x82), o3(0xE8,0x9A,0x95),
+     o3(0xE8,0xAE,0x83), o3(0xE8,0xB3,0x9B),
+     o3(0xE9,0x85,0xB8), o3(0xE9,0xA4,0x90),
+     o3(0xE6,0x96,0xAC), o3(0xE6,0x9A,0xAB),
+     o3(0xE6,0xAE,0x8B), o3(0xE4,0xBB,0x95),
+     o3(0xE4,0xBB,0x94), o3(0xE4,0xBC,0xBA),
+     o3(0xE4,0xBD,0xBF), o3(0xE5,0x88,0xBA),
+     o3(0xE5,0x8F,0xB8), o3(0xE5,0x8F,0xB2),
+     o3(0xE5,0x97,0xA3), o3(0xE5,0x9B,0x9B),
+     o3(0xE5,0xA3,0xAB), o3(0xE5,0xA7,0x8B),
+     o3(0xE5,0xA7,0x89), o3(0xE5,0xA7,0xBF),
+     o3(0xE5,0xAD,0x90), o3(0xE5,0xB1,0x8D),
+     o3(0xE5,0xB8,0x82), o3(0xE5,0xB8,0xAB),
+     o3(0xE5,0xBF,0x97), o3(0xE6,0x80,0x9D),
+     o3(0xE6,0x8C,0x87), o3(0xE6,0x94,0xAF),
+     o3(0xE5,0xAD,0x9C), o3(0xE6,0x96,0xAF),
+     o3(0xE6,0x96,0xBD), o3(0xE6,0x97,0xA8),
+     o3(0xE6,0x9E,0x9D), o3(0xE6,0xAD,0xA2),
+     o3(0xE6,0xAD,0xBB), o3(0xE6,0xB0,0x8F),
+     o3(0xE7,0x8D,0x85), o3(0xE7,0xA5,0x89),
+     o3(0xE7,0xA7,0x81), o3(0xE7,0xB3,0xB8),
+     o3(0xE7,0xB4,0x99), o3(0xE7,0xB4,0xAB),
+     o3(0xE8,0x82,0xA2), o3(0xE8,0x84,0x82),
+     o3(0xE8,0x87,0xB3), o3(0xE8,0xA6,0x96),
+     o3(0xE8,0xA9,0x9E), o3(0xE8,0xA9,0xA9),
+     o3(0xE8,0xA9,0xA6), o3(0xE8,0xAA,0x8C),
+     o3(0xE8,0xAB,0xAE), o3(0xE8,0xB3,0x87),
+     o3(0xE8,0xB3,0x9C), o3(0xE9,0x9B,0x8C),
+     o3(0xE9,0xA3,0xBC), o3(0xE6,0xAD,0xAF),
+     o3(0xE4,0xBA,0x8B), o3(0xE4,0xBC,0xBC),
+     o3(0xE4,0xBE,0x8D), o3(0xE5,0x85,0x90),
+     o3(0xE5,0xAD,0x97), o3(0xE5,0xAF,0xBA),
+     o3(0xE6,0x85,0x88), o3(0xE6,0x8C,0x81),
+     o3(0xE6,0x99,0x82),
+
+#define from_EUC_JP_BB WORDINDEX2INFO(8138)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BB_infos,
+
+#define from_EUC_JP_BC_infos WORDINDEX2INFO(8140)
+                INVALID, o3(0xE6,0xAC,0xA1),
+     o3(0xE6,0xBB,0x8B), o3(0xE6,0xB2,0xBB),
+     o3(0xE7,0x88,0xBE), o3(0xE7,0x92,0xBD),
+     o3(0xE7,0x97,0x94), o3(0xE7,0xA3,0x81),
+     o3(0xE7,0xA4,0xBA), o3(0xE8,0x80,0x8C),
+     o3(0xE8,0x80,0xB3), o3(0xE8,0x87,0xAA),
+     o3(0xE8,0x92,0x94), o3(0xE8,0xBE,0x9E),
+     o3(0xE6,0xB1,0x90), o3(0xE9,0xB9,0xBF),
+     o3(0xE5,0xBC,0x8F), o3(0xE8,0xAD,0x98),
+     o3(0xE9,0xB4,0xAB), o3(0xE7,0xAB,0xBA),
+     o3(0xE8,0xBB,0xB8), o3(0xE5,0xAE,0x8D),
+     o3(0xE9,0x9B,0xAB), o3(0xE4,0xB8,0x83),
+     o3(0xE5,0x8F,0xB1), o3(0xE5,0x9F,0xB7),
+     o3(0xE5,0xA4,0xB1), o3(0xE5,0xAB,0x89),
+     o3(0xE5,0xAE,0xA4), o3(0xE6,0x82,0x89),
+     o3(0xE6,0xB9,0xBF), o3(0xE6,0xBC,0x86),
+     o3(0xE7,0x96,0xBE), o3(0xE8,0xB3,0xAA),
+     o3(0xE5,0xAE,0x9F), o3(0xE8,0x94,0x80),
+     o3(0xE7,0xAF,0xA0), o3(0xE5,0x81,0xB2),
+     o3(0xE6,0x9F,0xB4), o3(0xE8,0x8A,0x9D),
+     o3(0xE5,0xB1,0xA1), o3(0xE8,0x95,0x8A),
+     o3(0xE7,0xB8,0x9E), o3(0xE8,0x88,0x8E),
+     o3(0xE5,0x86,0x99), o3(0xE5,0xB0,0x84),
+     o3(0xE6,0x8D,0xA8), o3(0xE8,0xB5,0xA6),
+     o3(0xE6,0x96,0x9C), o3(0xE7,0x85,0xAE),
+     o3(0xE7,0xA4,0xBE), o3(0xE7,0xB4,0x97),
+     o3(0xE8,0x80,0x85), o3(0xE8,0xAC,0x9D),
+     o3(0xE8,0xBB,0x8A), o3(0xE9,0x81,0xAE),
+     o3(0xE8,0x9B,0x87), o3(0xE9,0x82,0xAA),
+     o3(0xE5,0x80,0x9F), o3(0xE5,0x8B,0xBA),
+     o3(0xE5,0xB0,0xBA), o3(0xE6,0x9D,0x93),
+     o3(0xE7,0x81,0xBC), o3(0xE7,0x88,0xB5),
+     o3(0xE9,0x85,0x8C), o3(0xE9,0x87,0x88),
+     o3(0xE9,0x8C,0xAB), o3(0xE8,0x8B,0xA5),
+     o3(0xE5,0xAF,0x82), o3(0xE5,0xBC,0xB1),
+     o3(0xE6,0x83,0xB9), o3(0xE4,0xB8,0xBB),
+     o3(0xE5,0x8F,0x96), o3(0xE5,0xAE,0x88),
+     o3(0xE6,0x89,0x8B), o3(0xE6,0x9C,0xB1),
+     o3(0xE6,0xAE,0x8A), o3(0xE7,0x8B,0xA9),
+     o3(0xE7,0x8F,0xA0), o3(0xE7,0xA8,0xAE),
+     o3(0xE8,0x85,0xAB), o3(0xE8,0xB6,0xA3),
+     o3(0xE9,0x85,0x92), o3(0xE9,0xA6,0x96),
+     o3(0xE5,0x84,0x92), o3(0xE5,0x8F,0x97),
+     o3(0xE5,0x91,0xAA), o3(0xE5,0xAF,0xBF),
+     o3(0xE6,0x8E,0x88), o3(0xE6,0xA8,0xB9),
+     o3(0xE7,0xB6,0xAC), o3(0xE9,0x9C,0x80),
+     o3(0xE5,0x9B,0x9A), o3(0xE5,0x8F,0x8E),
+     o3(0xE5,0x91,0xA8),
+
+#define from_EUC_JP_BC WORDINDEX2INFO(8235)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BC_infos,
+
+#define from_EUC_JP_BD_infos WORDINDEX2INFO(8237)
+                INVALID, o3(0xE5,0xAE,0x97),
+     o3(0xE5,0xB0,0xB1), o3(0xE5,0xB7,0x9E),
+     o3(0xE4,0xBF,0xAE), o3(0xE6,0x84,0x81),
+     o3(0xE6,0x8B,0xBE), o3(0xE6,0xB4,0xB2),
+     o3(0xE7,0xA7,0x80), o3(0xE7,0xA7,0x8B),
+     o3(0xE7,0xB5,0x82), o3(0xE7,0xB9,0x8D),
+     o3(0xE7,0xBF,0x92), o3(0xE8,0x87,0xAD),
+     o3(0xE8,0x88,0x9F), o3(0xE8,0x92,0x90),
+     o3(0xE8,0xA1,0x86), o3(0xE8,0xA5,0xB2),
+     o3(0xE8,0xAE,0x90), o3(0xE8,0xB9,0xB4),
+     o3(0xE8,0xBC,0xAF), o3(0xE9,0x80,0xB1),
+     o3(0xE9,0x85,0x8B), o3(0xE9,0x85,0xAC),
+     o3(0xE9,0x9B,0x86), o3(0xE9,0x86,0x9C),
+     o3(0xE4,0xBB,0x80), o3(0xE4,0xBD,0x8F),
+     o3(0xE5,0x85,0x85), o3(0xE5,0x8D,0x81),
+     o3(0xE5,0xBE,0x93), o3(0xE6,0x88,0x8E),
+     o3(0xE6,0x9F,0x94), o3(0xE6,0xB1,0x81),
+     o3(0xE6,0xB8,0x8B), o3(0xE7,0x8D,0xA3),
+     o3(0xE7,0xB8,0xA6), o3(0xE9,0x87,0x8D),
+     o3(0xE9,0x8A,0x83), o3(0xE5,0x8F,0x94),
+     o3(0xE5,0xA4,0x99), o3(0xE5,0xAE,0xBF),
+     o3(0xE6,0xB7,0x91), o3(0xE7,0xA5,0x9D),
+     o3(0xE7,0xB8,0xAE), o3(0xE7,0xB2,0x9B),
+     o3(0xE5,0xA1,0xBE), o3(0xE7,0x86,0x9F),
+     o3(0xE5,0x87,0xBA), o3(0xE8,0xA1,0x93),
+     o3(0xE8,0xBF,0xB0), o3(0xE4,0xBF,0x8A),
+     o3(0xE5,0xB3,0xBB), o3(0xE6,0x98,0xA5),
+     o3(0xE7,0x9E,0xAC), o3(0xE7,0xAB,0xA3),
+     o3(0xE8,0x88,0x9C), o3(0xE9,0xA7,0xBF),
+     o3(0xE5,0x87,0x86), o3(0xE5,0xBE,0xAA),
+     o3(0xE6,0x97,0xAC), o3(0xE6,0xA5,0xAF),
+     o3(0xE6,0xAE,0x89), o3(0xE6,0xB7,0xB3),
+     o3(0xE6,0xBA,0x96), o3(0xE6,0xBD,0xA4),
+     o3(0xE7,0x9B,0xBE), o3(0xE7,0xB4,0x94),
+     o3(0xE5,0xB7,0xA1), o3(0xE9,0x81,0xB5),
+     o3(0xE9,0x86,0x87), o3(0xE9,0xA0,0x86),
+     o3(0xE5,0x87,0xA6), o3(0xE5,0x88,0x9D),
+     o3(0xE6,0x89,0x80), o3(0xE6,0x9A,0x91),
+     o3(0xE6,0x9B,0x99), o3(0xE6,0xB8,0x9A),
+     o3(0xE5,0xBA,0xB6), o3(0xE7,0xB7,0x92),
+     o3(0xE7,0xBD,0xB2), o3(0xE6,0x9B,0xB8),
+     o3(0xE8,0x96,0xAF), o3(0xE8,0x97,0xB7),
+     o3(0xE8,0xAB,0xB8), o3(0xE5,0x8A,0xA9),
+     o3(0xE5,0x8F,0x99), o3(0xE5,0xA5,0xB3),
+     o3(0xE5,0xBA,0x8F), o3(0xE5,0xBE,0x90),
+     o3(0xE6,0x81,0x95), o3(0xE9,0x8B,0xA4),
+     o3(0xE9,0x99,0xA4), o3(0xE5,0x82,0xB7),
+     o3(0xE5,0x84,0x9F),
+
+#define from_EUC_JP_BD WORDINDEX2INFO(8332)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BD_infos,
+
+#define from_EUC_JP_BE_infos WORDINDEX2INFO(8334)
+                INVALID, o3(0xE5,0x8B,0x9D),
+     o3(0xE5,0x8C,0xA0), o3(0xE5,0x8D,0x87),
+     o3(0xE5,0x8F,0xAC), o3(0xE5,0x93,0xA8),
+     o3(0xE5,0x95,0x86), o3(0xE5,0x94,0xB1),
+     o3(0xE5,0x98,0x97), o3(0xE5,0xA5,0xA8),
+     o3(0xE5,0xA6,0xBE), o3(0xE5,0xA8,0xBC),
+     o3(0xE5,0xAE,0xB5), o3(0xE5,0xB0,0x86),
+     o3(0xE5,0xB0,0x8F), o3(0xE5,0xB0,0x91),
+     o3(0xE5,0xB0,0x9A), o3(0xE5,0xBA,0x84),
+     o3(0xE5,0xBA,0x8A), o3(0xE5,0xBB,0xA0),
+     o3(0xE5,0xBD,0xB0), o3(0xE6,0x89,0xBF),
+     o3(0xE6,0x8A,0x84), o3(0xE6,0x8B,0x9B),
+     o3(0xE6,0x8E,0x8C), o3(0xE6,0x8D,0xB7),
+     o3(0xE6,0x98,0x87), o3(0xE6,0x98,0x8C),
+     o3(0xE6,0x98,0xAD), o3(0xE6,0x99,0xB6),
+     o3(0xE6,0x9D,0xBE), o3(0xE6,0xA2,0xA2),
+     o3(0xE6,0xA8,0x9F), o3(0xE6,0xA8,0xB5),
+     o3(0xE6,0xB2,0xBC), o3(0xE6,0xB6,0x88),
+     o3(0xE6,0xB8,0x89), o3(0xE6,0xB9,0x98),
+     o3(0xE7,0x84,0xBC), o3(0xE7,0x84,0xA6),
+     o3(0xE7,0x85,0xA7), o3(0xE7,0x97,0x87),
+     o3(0xE7,0x9C,0x81), o3(0xE7,0xA1,0x9D),
+     o3(0xE7,0xA4,0x81), o3(0xE7,0xA5,0xA5),
+     o3(0xE7,0xA7,0xB0), o3(0xE7,0xAB,0xA0),
+     o3(0xE7,0xAC,0x91), o3(0xE7,0xB2,0xA7),
+     o3(0xE7,0xB4,0xB9), o3(0xE8,0x82,0x96),
+     o3(0xE8,0x8F,0x96), o3(0xE8,0x92,0x8B),
+     o3(0xE8,0x95,0x89), o3(0xE8,0xA1,0x9D),
+     o3(0xE8,0xA3,0xB3), o3(0xE8,0xA8,0x9F),
+     o3(0xE8,0xA8,0xBC), o3(0xE8,0xA9,0x94),
+     o3(0xE8,0xA9,0xB3), o3(0xE8,0xB1,0xA1),
+     o3(0xE8,0xB3,0x9E), o3(0xE9,0x86,0xA4),
+     o3(0xE9,0x89,0xA6), o3(0xE9,0x8D,0xBE),
+     o3(0xE9,0x90,0x98), o3(0xE9,0x9A,0x9C),
+     o3(0xE9,0x9E,0x98), o3(0xE4,0xB8,0x8A),
+     o3(0xE4,0xB8,0x88), o3(0xE4,0xB8,0x9E),
+     o3(0xE4,0xB9,0x97), o3(0xE5,0x86,0x97),
+     o3(0xE5,0x89,0xB0), o3(0xE5,0x9F,0x8E),
+     o3(0xE5,0xA0,0xB4), o3(0xE5,0xA3,0x8C),
+     o3(0xE5,0xAC,0xA2), o3(0xE5,0xB8,0xB8),
+     o3(0xE6,0x83,0x85), o3(0xE6,0x93,0xBE),
+     o3(0xE6,0x9D,0xA1), o3(0xE6,0x9D,0x96),
+     o3(0xE6,0xB5,0x84), o3(0xE7,0x8A,0xB6),
+     o3(0xE7,0x95,0xB3), o3(0xE7,0xA9,0xA3),
+     o3(0xE8,0x92,0xB8), o3(0xE8,0xAD,0xB2),
+     o3(0xE9,0x86,0xB8), o3(0xE9,0x8C,0xA0),
+     o3(0xE5,0x98,0xB1), o3(0xE5,0x9F,0xB4),
+     o3(0xE9,0xA3,0xBE),
+
+#define from_EUC_JP_BE WORDINDEX2INFO(8429)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BE_infos,
+
+#define from_EUC_JP_BF_infos WORDINDEX2INFO(8431)
+                INVALID, o3(0xE6,0x8B,0xAD),
+     o3(0xE6,0xA4,0x8D), o3(0xE6,0xAE,0x96),
+     o3(0xE7,0x87,0xAD), o3(0xE7,0xB9,0x94),
+     o3(0xE8,0x81,0xB7), o3(0xE8,0x89,0xB2),
+     o3(0xE8,0xA7,0xA6), o3(0xE9,0xA3,0x9F),
+     o3(0xE8,0x9D,0x95), o3(0xE8,0xBE,0xB1),
+     o3(0xE5,0xB0,0xBB), o3(0xE4,0xBC,0xB8),
+     o3(0xE4,0xBF,0xA1), o3(0xE4,0xBE,0xB5),
+     o3(0xE5,0x94,0x87), o3(0xE5,0xA8,0xA0),
+     o3(0xE5,0xAF,0x9D), o3(0xE5,0xAF,0xA9),
+     o3(0xE5,0xBF,0x83), o3(0xE6,0x85,0x8E),
+     o3(0xE6,0x8C,0xAF), o3(0xE6,0x96,0xB0),
+     o3(0xE6,0x99,0x8B), o3(0xE6,0xA3,0xAE),
+     o3(0xE6,0xA6,0x9B), o3(0xE6,0xB5,0xB8),
+     o3(0xE6,0xB7,0xB1), o3(0xE7,0x94,0xB3),
+     o3(0xE7,0x96,0xB9), o3(0xE7,0x9C,0x9F),
+     o3(0xE7,0xA5,0x9E), o3(0xE7,0xA7,0xA6),
+     o3(0xE7,0xB4,0xB3), o3(0xE8,0x87,0xA3),
+     o3(0xE8,0x8A,0xAF), o3(0xE8,0x96,0xAA),
+     o3(0xE8,0xA6,0xAA), o3(0xE8,0xA8,0xBA),
+     o3(0xE8,0xBA,0xAB), o3(0xE8,0xBE,0x9B),
+     o3(0xE9,0x80,0xB2), o3(0xE9,0x87,0x9D),
+     o3(0xE9,0x9C,0x87), o3(0xE4,0xBA,0xBA),
+     o3(0xE4,0xBB,0x81), o3(0xE5,0x88,0x83),
+     o3(0xE5,0xA1,0xB5), o3(0xE5,0xA3,0xAC),
+     o3(0xE5,0xB0,0x8B), o3(0xE7,0x94,0x9A),
+     o3(0xE5,0xB0,0xBD), o3(0xE8,0x85,0x8E),
+     o3(0xE8,0xA8,0x8A), o3(0xE8,0xBF,0x85),
+     o3(0xE9,0x99,0xA3), o3(0xE9,0x9D,0xAD),
+     o3(0xE7,0xAC,0xA5), o3(0xE8,0xAB,0x8F),
+     o3(0xE9,0xA0,0x88), o3(0xE9,0x85,0xA2),
+     o3(0xE5,0x9B,0xB3), o3(0xE5,0x8E,0xA8),
+     o3(0xE9,0x80,0x97), o3(0xE5,0x90,0xB9),
+     o3(0xE5,0x9E,0x82), o3(0xE5,0xB8,0xA5),
+     o3(0xE6,0x8E,0xA8), o3(0xE6,0xB0,0xB4),
+     o3(0xE7,0x82,0x8A), o3(0xE7,0x9D,0xA1),
+     o3(0xE7,0xB2,0x8B), o3(0xE7,0xBF,0xA0),
+     o3(0xE8,0xA1,0xB0), o3(0xE9,0x81,0x82),
+     o3(0xE9,0x85,0x94), o3(0xE9,0x8C,0x90),
+     o3(0xE9,0x8C,0x98), o3(0xE9,0x9A,0x8F),
+     o3(0xE7,0x91,0x9E), o3(0xE9,0xAB,0x84),
+     o3(0xE5,0xB4,0x87), o3(0xE5,0xB5,0xA9),
+     o3(0xE6,0x95,0xB0), o3(0xE6,0x9E,0xA2),
+     o3(0xE8,0xB6,0xA8), o3(0xE9,0x9B,0x9B),
+     o3(0xE6,0x8D,0xAE), o3(0xE6,0x9D,0x89),
+     o3(0xE6,0xA4,0x99), o3(0xE8,0x8F,0x85),
+     o3(0xE9,0xA0,0x97), o3(0xE9,0x9B,0x80),
+     o3(0xE8,0xA3,0xBE),
+
+#define from_EUC_JP_BF WORDINDEX2INFO(8526)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_BF_infos,
+
+#define from_EUC_JP_C0_infos WORDINDEX2INFO(8528)
+                INVALID, o3(0xE6,0xBE,0x84),
+     o3(0xE6,0x91,0xBA), o3(0xE5,0xAF,0xB8),
+     o3(0xE4,0xB8,0x96), o3(0xE7,0x80,0xAC),
+     o3(0xE7,0x95,0x9D), o3(0xE6,0x98,0xAF),
+     o3(0xE5,0x87,0x84), o3(0xE5,0x88,0xB6),
+     o3(0xE5,0x8B,0xA2), o3(0xE5,0xA7,0x93),
+     o3(0xE5,0xBE,0x81), o3(0xE6,0x80,0xA7),
+     o3(0xE6,0x88,0x90), o3(0xE6,0x94,0xBF),
+     o3(0xE6,0x95,0xB4), o3(0xE6,0x98,0x9F),
+     o3(0xE6,0x99,0xB4), o3(0xE6,0xA3,0xB2),
+     o3(0xE6,0xA0,0x96), o3(0xE6,0xAD,0xA3),
+     o3(0xE6,0xB8,0x85), o3(0xE7,0x89,0xB2),
+     o3(0xE7,0x94,0x9F), o3(0xE7,0x9B,0x9B),
+     o3(0xE7,0xB2,0xBE), o3(0xE8,0x81,0x96),
+     o3(0xE5,0xA3,0xB0), o3(0xE8,0xA3,0xBD),
+     o3(0xE8,0xA5,0xBF), o3(0xE8,0xAA,0xA0),
+     o3(0xE8,0xAA,0x93), o3(0xE8,0xAB,0x8B),
+     o3(0xE9,0x80,0x9D), o3(0xE9,0x86,0x92),
+     o3(0xE9,0x9D,0x92), o3(0xE9,0x9D,0x99),
+     o3(0xE6,0x96,0x89), o3(0xE7,0xA8,0x8E),
+     o3(0xE8,0x84,0x86), o3(0xE9,0x9A,0xBB),
+     o3(0xE5,0xB8,0xAD), o3(0xE6,0x83,0x9C),
+     o3(0xE6,0x88,0x9A), o3(0xE6,0x96,0xA5),
+     o3(0xE6,0x98,0x94), o3(0xE6,0x9E,0x90),
+     o3(0xE7,0x9F,0xB3), o3(0xE7,0xA9,0x8D),
+     o3(0xE7,0xB1,0x8D), o3(0xE7,0xB8,0xBE),
+     o3(0xE8,0x84,0x8A), o3(0xE8,0xB2,0xAC),
+     o3(0xE8,0xB5,0xA4), o3(0xE8,0xB7,0xA1),
+     o3(0xE8,0xB9,0x9F), o3(0xE7,0xA2,0xA9),
+     o3(0xE5,0x88,0x87), o3(0xE6,0x8B,0x99),
+     o3(0xE6,0x8E,0xA5), o3(0xE6,0x91,0x82),
+     o3(0xE6,0x8A,0x98), o3(0xE8,0xA8,0xAD),
+     o3(0xE7,0xAA,0x83), o3(0xE7,0xAF,0x80),
+     o3(0xE8,0xAA,0xAC), o3(0xE9,0x9B,0xAA),
+     o3(0xE7,0xB5,0xB6), o3(0xE8,0x88,0x8C),
+     o3(0xE8,0x9D,0x89), o3(0xE4,0xBB,0x99),
+     o3(0xE5,0x85,0x88), o3(0xE5,0x8D,0x83),
+     o3(0xE5,0x8D,0xA0), o3(0xE5,0xAE,0xA3),
+     o3(0xE5,0xB0,0x82), o3(0xE5,0xB0,0x96),
+     o3(0xE5,0xB7,0x9D), o3(0xE6,0x88,0xA6),
+     o3(0xE6,0x89,0x87), o3(0xE6,0x92,0xB0),
+     o3(0xE6,0xA0,0x93), o3(0xE6,0xA0,0xB4),
+     o3(0xE6,0xB3,0x89), o3(0xE6,0xB5,0x85),
+     o3(0xE6,0xB4,0x97), o3(0xE6,0x9F,0x93),
+     o3(0xE6,0xBD,0x9C), o3(0xE7,0x85,0x8E),
+     o3(0xE7,0x85,0xBD), o3(0xE6,0x97,0x8B),
+     o3(0xE7,0xA9,0xBF), o3(0xE7,0xAE,0xAD),
+     o3(0xE7,0xB7,0x9A),
+
+#define from_EUC_JP_C0 WORDINDEX2INFO(8623)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C0_infos,
+
+#define from_EUC_JP_C1_infos WORDINDEX2INFO(8625)
+                INVALID, o3(0xE7,0xB9,0x8A),
+     o3(0xE7,0xBE,0xA8), o3(0xE8,0x85,0xBA),
+     o3(0xE8,0x88,0x9B), o3(0xE8,0x88,0xB9),
+     o3(0xE8,0x96,0xA6), o3(0xE8,0xA9,0xAE),
+     o3(0xE8,0xB3,0x8E), o3(0xE8,0xB7,0xB5),
+     o3(0xE9,0x81,0xB8), o3(0xE9,0x81,0xB7),
+     o3(0xE9,0x8A,0xAD), o3(0xE9,0x8A,0x91),
+     o3(0xE9,0x96,0x83), o3(0xE9,0xAE,0xAE),
+     o3(0xE5,0x89,0x8D), o3(0xE5,0x96,0x84),
+     o3(0xE6,0xBC,0xB8), o3(0xE7,0x84,0xB6),
+     o3(0xE5,0x85,0xA8), o3(0xE7,0xA6,0x85),
+     o3(0xE7,0xB9,0x95), o3(0xE8,0x86,0xB3),
+     o3(0xE7,0xB3,0x8E), o3(0xE5,0x99,0x8C),
+     o3(0xE5,0xA1,0x91), o3(0xE5,0xB2,0xA8),
+     o3(0xE6,0x8E,0xAA), o3(0xE6,0x9B,0xBE),
+     o3(0xE6,0x9B,0xBD), o3(0xE6,0xA5,0x9A),
+     o3(0xE7,0x8B,0x99), o3(0xE7,0x96,0x8F),
+     o3(0xE7,0x96,0x8E), o3(0xE7,0xA4,0x8E),
+     o3(0xE7,0xA5,0x96), o3(0xE7,0xA7,0x9F),
+     o3(0xE7,0xB2,0x97), o3(0xE7,0xB4,0xA0),
+     o3(0xE7,0xB5,0x84), o3(0xE8,0x98,0x87),
+     o3(0xE8,0xA8,0xB4), o3(0xE9,0x98,0xBB),
+     o3(0xE9,0x81,0xA1), o3(0xE9,0xBC,0xA0),
+     o3(0xE5,0x83,0xA7), o3(0xE5,0x89,0xB5),
+     o3(0xE5,0x8F,0x8C), o3(0xE5,0x8F,0xA2),
+     o3(0xE5,0x80,0x89), o3(0xE5,0x96,0xAA),
+     o3(0xE5,0xA3,0xAE), o3(0xE5,0xA5,0x8F),
+     o3(0xE7,0x88,0xBD), o3(0xE5,0xAE,0x8B),
+     o3(0xE5,0xB1,0xA4), o3(0xE5,0x8C,0x9D),
+     o3(0xE6,0x83,0xA3), o3(0xE6,0x83,0xB3),
+     o3(0xE6,0x8D,0x9C), o3(0xE6,0x8E,0x83),
+     o3(0xE6,0x8C,0xBF), o3(0xE6,0x8E,0xBB),
+     o3(0xE6,0x93,0x8D), o3(0xE6,0x97,0xA9),
+     o3(0xE6,0x9B,0xB9), o3(0xE5,0xB7,0xA3),
+     o3(0xE6,0xA7,0x8D), o3(0xE6,0xA7,0xBD),
+     o3(0xE6,0xBC,0x95), o3(0xE7,0x87,0xA5),
+     o3(0xE4,0xBA,0x89), o3(0xE7,0x97,0xA9),
+     o3(0xE7,0x9B,0xB8), o3(0xE7,0xAA,0x93),
+     o3(0xE7,0xB3,0x9F), o3(0xE7,0xB7,0x8F),
+     o3(0xE7,0xB6,0x9C), o3(0xE8,0x81,0xA1),
+     o3(0xE8,0x8D,0x89), o3(0xE8,0x8D,0x98),
+     o3(0xE8,0x91,0xAC), o3(0xE8,0x92,0xBC),
+     o3(0xE8,0x97,0xBB), o3(0xE8,0xA3,0x85),
+     o3(0xE8,0xB5,0xB0), o3(0xE9,0x80,0x81),
+     o3(0xE9,0x81,0xAD), o3(0xE9,0x8E,0x97),
+     o3(0xE9,0x9C,0x9C), o3(0xE9,0xA8,0x92),
+     o3(0xE5,0x83,0x8F), o3(0xE5,0xA2,0x97),
+     o3(0xE6,0x86,0x8E),
+
+#define from_EUC_JP_C1 WORDINDEX2INFO(8720)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C1_infos,
+
+#define from_EUC_JP_C2_infos WORDINDEX2INFO(8722)
+                INVALID, o3(0xE8,0x87,0x93),
+     o3(0xE8,0x94,0xB5), o3(0xE8,0xB4,0x88),
+     o3(0xE9,0x80,0xA0), o3(0xE4,0xBF,0x83),
+     o3(0xE5,0x81,0xB4), o3(0xE5,0x89,0x87),
+     o3(0xE5,0x8D,0xB3), o3(0xE6,0x81,0xAF),
+     o3(0xE6,0x8D,0x89), o3(0xE6,0x9D,0x9F),
+     o3(0xE6,0xB8,0xAC), o3(0xE8,0xB6,0xB3),
+     o3(0xE9,0x80,0x9F), o3(0xE4,0xBF,0x97),
+     o3(0xE5,0xB1,0x9E), o3(0xE8,0xB3,0x8A),
+     o3(0xE6,0x97,0x8F), o3(0xE7,0xB6,0x9A),
+     o3(0xE5,0x8D,0x92), o3(0xE8,0xA2,0x96),
+     o3(0xE5,0x85,0xB6), o3(0xE6,0x8F,0x83),
+     o3(0xE5,0xAD,0x98), o3(0xE5,0xAD,0xAB),
+     o3(0xE5,0xB0,0x8A), o3(0xE6,0x90,0x8D),
+     o3(0xE6,0x9D,0x91), o3(0xE9,0x81,0x9C),
+     o3(0xE4,0xBB,0x96), o3(0xE5,0xA4,0x9A),
+     o3(0xE5,0xA4,0xAA), o3(0xE6,0xB1,0xB0),
+     o3(0xE8,0xA9,0x91), o3(0xE5,0x94,0xBE),
+     o3(0xE5,0xA0,0x95), o3(0xE5,0xA6,0xA5),
+     o3(0xE6,0x83,0xB0), o3(0xE6,0x89,0x93),
+     o3(0xE6,0x9F,0x81), o3(0xE8,0x88,0xB5),
+     o3(0xE6,0xA5,0x95), o3(0xE9,0x99,0x80),
+     o3(0xE9,0xA7,0x84), o3(0xE9,0xA8,0xA8),
+     o3(0xE4,0xBD,0x93), o3(0xE5,0xA0,0x86),
+     o3(0xE5,0xAF,0xBE), o3(0xE8,0x80,0x90),
+     o3(0xE5,0xB2,0xB1), o3(0xE5,0xB8,0xAF),
+     o3(0xE5,0xBE,0x85), o3(0xE6,0x80,0xA0),
+     o3(0xE6,0x85,0x8B), o3(0xE6,0x88,0xB4),
+     o3(0xE6,0x9B,0xBF), o3(0xE6,0xB3,0xB0),
+     o3(0xE6,0xBB,0x9E), o3(0xE8,0x83,0x8E),
+     o3(0xE8,0x85,0xBF), o3(0xE8,0x8B,0x94),
+     o3(0xE8,0xA2,0x8B), o3(0xE8,0xB2,0xB8),
+     o3(0xE9,0x80,0x80), o3(0xE9,0x80,0xAE),
+     o3(0xE9,0x9A,0x8A), o3(0xE9,0xBB,0x9B),
+     o3(0xE9,0xAF,0x9B), o3(0xE4,0xBB,0xA3),
+     o3(0xE5,0x8F,0xB0), o3(0xE5,0xA4,0xA7),
+     o3(0xE7,0xAC,0xAC), o3(0xE9,0x86,0x8D),
+     o3(0xE9,0xA1,0x8C), o3(0xE9,0xB7,0xB9),
+     o3(0xE6,0xBB,0x9D), o3(0xE7,0x80,0xA7),
+     o3(0xE5,0x8D,0x93), o3(0xE5,0x95,0x84),
+     o3(0xE5,0xAE,0x85), o3(0xE6,0x89,0x98),
+     o3(0xE6,0x8A,0x9E), o3(0xE6,0x8B,0x93),
+     o3(0xE6,0xB2,0xA2), o3(0xE6,0xBF,0xAF),
+     o3(0xE7,0x90,0xA2), o3(0xE8,0xA8,0x97),
+     o3(0xE9,0x90,0xB8), o3(0xE6,0xBF,0x81),
+     o3(0xE8,0xAB,0xBE), o3(0xE8,0x8C,0xB8),
+     o3(0xE5,0x87,0xA7), o3(0xE8,0x9B,0xB8),
+     o3(0xE5,0x8F,0xAA),
+
+#define from_EUC_JP_C2 WORDINDEX2INFO(8817)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C2_infos,
+
+#define from_EUC_JP_C3_infos WORDINDEX2INFO(8819)
+                INVALID, o3(0xE5,0x8F,0xA9),
+     o3(0xE4,0xBD,0x86), o3(0xE9,0x81,0x94),
+     o3(0xE8,0xBE,0xB0), o3(0xE5,0xA5,0xAA),
+     o3(0xE8,0x84,0xB1), o3(0xE5,0xB7,0xBD),
+     o3(0xE7,0xAB,0xAA), o3(0xE8,0xBE,0xBF),
+     o3(0xE6,0xA3,0x9A), o3(0xE8,0xB0,0xB7),
+     o3(0xE7,0x8B,0xB8), o3(0xE9,0xB1,0x88),
+     o3(0xE6,0xA8,0xBD), o3(0xE8,0xAA,0xB0),
+     o3(0xE4,0xB8,0xB9), o3(0xE5,0x8D,0x98),
+     o3(0xE5,0x98,0x86), o3(0xE5,0x9D,0xA6),
+     o3(0xE6,0x8B,0x85), o3(0xE6,0x8E,0xA2),
+     o3(0xE6,0x97,0xA6), o3(0xE6,0xAD,0x8E),
+     o3(0xE6,0xB7,0xA1), o3(0xE6,0xB9,0x9B),
+     o3(0xE7,0x82,0xAD), o3(0xE7,0x9F,0xAD),
+     o3(0xE7,0xAB,0xAF), o3(0xE7,0xAE,0xAA),
+     o3(0xE7,0xB6,0xBB), o3(0xE8,0x80,0xBD),
+     o3(0xE8,0x83,0x86), o3(0xE8,0x9B,0x8B),
+     o3(0xE8,0xAA,0x95), o3(0xE9,0x8D,0x9B),
+     o3(0xE5,0x9B,0xA3), o3(0xE5,0xA3,0x87),
+     o3(0xE5,0xBC,0xBE), o3(0xE6,0x96,0xAD),
+     o3(0xE6,0x9A,0x96), o3(0xE6,0xAA,0x80),
+     o3(0xE6,0xAE,0xB5), o3(0xE7,0x94,0xB7),
+     o3(0xE8,0xAB,0x87), o3(0xE5,0x80,0xA4),
+     o3(0xE7,0x9F,0xA5), o3(0xE5,0x9C,0xB0),
+     o3(0xE5,0xBC,0x9B), o3(0xE6,0x81,0xA5),
+     o3(0xE6,0x99,0xBA), o3(0xE6,0xB1,0xA0),
+     o3(0xE7,0x97,0xB4), o3(0xE7,0xA8,0x9A),
+     o3(0xE7,0xBD,0xAE), o3(0xE8,0x87,0xB4),
+     o3(0xE8,0x9C,0x98), o3(0xE9,0x81,0x85),
+     o3(0xE9,0xA6,0xB3), o3(0xE7,0xAF,0x89),
+     o3(0xE7,0x95,0x9C), o3(0xE7,0xAB,0xB9),
+     o3(0xE7,0xAD,0x91), o3(0xE8,0x93,0x84),
+     o3(0xE9,0x80,0x90), o3(0xE7,0xA7,0xA9),
+     o3(0xE7,0xAA,0x92), o3(0xE8,0x8C,0xB6),
+     o3(0xE5,0xAB,0xA1), o3(0xE7,0x9D,0x80),
+     o3(0xE4,0xB8,0xAD), o3(0xE4,0xBB,0xB2),
+     o3(0xE5,0xAE,0x99), o3(0xE5,0xBF,0xA0),
+     o3(0xE6,0x8A,0xBD), o3(0xE6,0x98,0xBC),
+     o3(0xE6,0x9F,0xB1), o3(0xE6,0xB3,0xA8),
+     o3(0xE8,0x99,0xAB), o3(0xE8,0xA1,0xB7),
+     o3(0xE8,0xA8,0xBB), o3(0xE9,0x85,0x8E),
+     o3(0xE9,0x8B,0xB3), o3(0xE9,0xA7,0x90),
+     o3(0xE6,0xA8,0x97), o3(0xE7,0x80,0xA6),
+     o3(0xE7,0x8C,0xAA), o3(0xE8,0x8B,0xA7),
+     o3(0xE8,0x91,0x97), o3(0xE8,0xB2,0xAF),
+     o3(0xE4,0xB8,0x81), o3(0xE5,0x85,0x86),
+     o3(0xE5,0x87,0x8B), o3(0xE5,0x96,0x8B),
+     o3(0xE5,0xAF,0xB5),
+
+#define from_EUC_JP_C3 WORDINDEX2INFO(8914)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C3_infos,
+
+#define from_EUC_JP_C4_infos WORDINDEX2INFO(8916)
+                INVALID, o3(0xE5,0xB8,0x96),
+     o3(0xE5,0xB8,0xB3), o3(0xE5,0xBA,0x81),
+     o3(0xE5,0xBC,0x94), o3(0xE5,0xBC,0xB5),
+     o3(0xE5,0xBD,0xAB), o3(0xE5,0xBE,0xB4),
+     o3(0xE6,0x87,0xB2), o3(0xE6,0x8C,0x91),
+     o3(0xE6,0x9A,0xA2), o3(0xE6,0x9C,0x9D),
+     o3(0xE6,0xBD,0xAE), o3(0xE7,0x89,0x92),
+     o3(0xE7,0x94,0xBA), o3(0xE7,0x9C,0xBA),
+     o3(0xE8,0x81,0xB4), o3(0xE8,0x84,0xB9),
+     o3(0xE8,0x85,0xB8), o3(0xE8,0x9D,0xB6),
+     o3(0xE8,0xAA,0xBF), o3(0xE8,0xAB,0x9C),
+     o3(0xE8,0xB6,0x85), o3(0xE8,0xB7,0xB3),
+     o3(0xE9,0x8A,0x9A), o3(0xE9,0x95,0xB7),
+     o3(0xE9,0xA0,0x82), o3(0xE9,0xB3,0xA5),
+     o3(0xE5,0x8B,0x85), o3(0xE6,0x8D,0x97),
+     o3(0xE7,0x9B,0xB4), o3(0xE6,0x9C,0x95),
+     o3(0xE6,0xB2,0x88), o3(0xE7,0x8F,0x8D),
+     o3(0xE8,0xB3,0x83), o3(0xE9,0x8E,0xAE),
+     o3(0xE9,0x99,0xB3), o3(0xE6,0xB4,0xA5),
+     o3(0xE5,0xA2,0x9C), o3(0xE6,0xA4,0x8E),
+     o3(0xE6,0xA7,0x8C), o3(0xE8,0xBF,0xBD),
+     o3(0xE9,0x8E,0x9A), o3(0xE7,0x97,0x9B),
+     o3(0xE9,0x80,0x9A), o3(0xE5,0xA1,0x9A),
+     o3(0xE6,0xA0,0x82), o3(0xE6,0x8E,0xB4),
+     o3(0xE6,0xA7,0xBB), o3(0xE4,0xBD,0x83),
+     o3(0xE6,0xBC,0xAC), o3(0xE6,0x9F,0x98),
+     o3(0xE8,0xBE,0xBB), o3(0xE8,0x94,0xA6),
+     o3(0xE7,0xB6,0xB4), o3(0xE9,0x8D,0x94),
+     o3(0xE6,0xA4,0xBF), o3(0xE6,0xBD,0xB0),
+     o3(0xE5,0x9D,0xAA), o3(0xE5,0xA3,0xB7),
+     o3(0xE5,0xAC,0xAC), o3(0xE7,0xB4,0xAC),
+     o3(0xE7,0x88,0xAA), o3(0xE5,0x90,0x8A),
+     o3(0xE9,0x87,0xA3), o3(0xE9,0xB6,0xB4),
+     o3(0xE4,0xBA,0xAD), o3(0xE4,0xBD,0x8E),
+     o3(0xE5,0x81,0x9C), o3(0xE5,0x81,0xB5),
+     o3(0xE5,0x89,0x83), o3(0xE8,0xB2,0x9E),
+     o3(0xE5,0x91,0x88), o3(0xE5,0xA0,0xA4),
+     o3(0xE5,0xAE,0x9A), o3(0xE5,0xB8,0x9D),
+     o3(0xE5,0xBA,0x95), o3(0xE5,0xBA,0xAD),
+     o3(0xE5,0xBB,0xB7), o3(0xE5,0xBC,0x9F),
+     o3(0xE6,0x82,0x8C), o3(0xE6,0x8A,0xB5),
+     o3(0xE6,0x8C,0xBA), o3(0xE6,0x8F,0x90),
+     o3(0xE6,0xA2,0xAF), o3(0xE6,0xB1,0x80),
+     o3(0xE7,0xA2,0x87), o3(0xE7,0xA6,0x8E),
+     o3(0xE7,0xA8,0x8B), o3(0xE7,0xB7,0xA0),
+     o3(0xE8,0x89,0x87), o3(0xE8,0xA8,0x82),
+     o3(0xE8,0xAB,0xA6), o3(0xE8,0xB9,0x84),
+     o3(0xE9,0x80,0x93),
+
+#define from_EUC_JP_C4 WORDINDEX2INFO(9011)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C4_infos,
+
+#define from_EUC_JP_C5_infos WORDINDEX2INFO(9013)
+                INVALID, o3(0xE9,0x82,0xB8),
+     o3(0xE9,0x84,0xAD), o3(0xE9,0x87,0x98),
+     o3(0xE9,0xBC,0x8E), o3(0xE6,0xB3,0xA5),
+     o3(0xE6,0x91,0x98), o3(0xE6,0x93,0xA2),
+     o3(0xE6,0x95,0xB5), o3(0xE6,0xBB,0xB4),
+     o3(0xE7,0x9A,0x84), o3(0xE7,0xAC,0x9B),
+     o3(0xE9,0x81,0xA9), o3(0xE9,0x8F,0x91),
+     o3(0xE6,0xBA,0xBA), o3(0xE5,0x93,0xB2),
+     o3(0xE5,0xBE,0xB9), o3(0xE6,0x92,0xA4),
+     o3(0xE8,0xBD,0x8D), o3(0xE8,0xBF,0xAD),
+     o3(0xE9,0x89,0x84), o3(0xE5,0x85,0xB8),
+     o3(0xE5,0xA1,0xAB), o3(0xE5,0xA4,0xA9),
+     o3(0xE5,0xB1,0x95), o3(0xE5,0xBA,0x97),
+     o3(0xE6,0xB7,0xBB), o3(0xE7,0xBA,0x8F),
+     o3(0xE7,0x94,0x9C), o3(0xE8,0xB2,0xBC),
+     o3(0xE8,0xBB,0xA2), o3(0xE9,0xA1,0x9B),
+     o3(0xE7,0x82,0xB9), o3(0xE4,0xBC,0x9D),
+     o3(0xE6,0xAE,0xBF), o3(0xE6,0xBE,0xB1),
+     o3(0xE7,0x94,0xB0), o3(0xE9,0x9B,0xBB),
+     o3(0xE5,0x85,0x8E), o3(0xE5,0x90,0x90),
+     o3(0xE5,0xA0,0xB5), o3(0xE5,0xA1,0x97),
+     o3(0xE5,0xA6,0xAC), o3(0xE5,0xB1,0xA0),
+     o3(0xE5,0xBE,0x92), o3(0xE6,0x96,0x97),
+     o3(0xE6,0x9D,0x9C), o3(0xE6,0xB8,0xA1),
+     o3(0xE7,0x99,0xBB), o3(0xE8,0x8F,0x9F),
+     o3(0xE8,0xB3,0xAD), o3(0xE9,0x80,0x94),
+     o3(0xE9,0x83,0xBD), o3(0xE9,0x8D,0x8D),
+     o3(0xE7,0xA0,0xA5), o3(0xE7,0xA0,0xBA),
+     o3(0xE5,0x8A,0xAA), o3(0xE5,0xBA,0xA6),
+     o3(0xE5,0x9C,0x9F), o3(0xE5,0xA5,0xB4),
+     o3(0xE6,0x80,0x92), o3(0xE5,0x80,0x92),
+     o3(0xE5,0x85,0x9A), o3(0xE5,0x86,0xAC),
+     o3(0xE5,0x87,0x8D), o3(0xE5,0x88,0x80),
+     o3(0xE5,0x94,0x90), o3(0xE5,0xA1,0x94),
+     o3(0xE5,0xA1,0x98), o3(0xE5,0xA5,0x97),
+     o3(0xE5,0xAE,0x95), o3(0xE5,0xB3,0xB6),
+     o3(0xE5,0xB6,0x8B), o3(0xE6,0x82,0xBC),
+     o3(0xE6,0x8A,0x95), o3(0xE6,0x90,0xAD),
+     o3(0xE6,0x9D,0xB1), o3(0xE6,0xA1,0x83),
+     o3(0xE6,0xA2,0xBC), o3(0xE6,0xA3,0x9F),
+     o3(0xE7,0x9B,0x97), o3(0xE6,0xB7,0x98),
+     o3(0xE6,0xB9,0xAF), o3(0xE6,0xB6,0x9B),
+     o3(0xE7,0x81,0xAF), o3(0xE7,0x87,0x88),
+     o3(0xE5,0xBD,0x93), o3(0xE7,0x97,0x98),
+     o3(0xE7,0xA5,0xB7), o3(0xE7,0xAD,0x89),
+     o3(0xE7,0xAD,0x94), o3(0xE7,0xAD,0x92),
+     o3(0xE7,0xB3,0x96), o3(0xE7,0xB5,0xB1),
+     o3(0xE5,0x88,0xB0),
+
+#define from_EUC_JP_C5 WORDINDEX2INFO(9108)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C5_infos,
+
+#define from_EUC_JP_C6_infos WORDINDEX2INFO(9110)
+                INVALID, o3(0xE8,0x91,0xA3),
+     o3(0xE8,0x95,0xA9), o3(0xE8,0x97,0xA4),
+     o3(0xE8,0xA8,0x8E), o3(0xE8,0xAC,0x84),
+     o3(0xE8,0xB1,0x86), o3(0xE8,0xB8,0x8F),
+     o3(0xE9,0x80,0x83), o3(0xE9,0x80,0x8F),
+     o3(0xE9,0x90,0x99), o3(0xE9,0x99,0xB6),
+     o3(0xE9,0xA0,0xAD), o3(0xE9,0xA8,0xB0),
+     o3(0xE9,0x97,0x98), o3(0xE5,0x83,0x8D),
+     o3(0xE5,0x8B,0x95), o3(0xE5,0x90,0x8C),
+     o3(0xE5,0xA0,0x82), o3(0xE5,0xB0,0x8E),
+     o3(0xE6,0x86,0xA7), o3(0xE6,0x92,0x9E),
+     o3(0xE6,0xB4,0x9E), o3(0xE7,0x9E,0xB3),
+     o3(0xE7,0xAB,0xA5), o3(0xE8,0x83,0xB4),
+     o3(0xE8,0x90,0x84), o3(0xE9,0x81,0x93),
+     o3(0xE9,0x8A,0x85), o3(0xE5,0xB3,0xA0),
+     o3(0xE9,0xB4,0x87), o3(0xE5,0x8C,0xBF),
+     o3(0xE5,0xBE,0x97), o3(0xE5,0xBE,0xB3),
+     o3(0xE6,0xB6,0x9C), o3(0xE7,0x89,0xB9),
+     o3(0xE7,0x9D,0xA3), o3(0xE7,0xA6,0xBF),
+     o3(0xE7,0xAF,0xA4), o3(0xE6,0xAF,0x92),
+     o3(0xE7,0x8B,0xAC), o3(0xE8,0xAA,0xAD),
+     o3(0xE6,0xA0,0x83), o3(0xE6,0xA9,0xA1),
+     o3(0xE5,0x87,0xB8), o3(0xE7,0xAA,0x81),
+     o3(0xE6,0xA4,0xB4), o3(0xE5,0xB1,0x8A),
+     o3(0xE9,0xB3,0xB6), o3(0xE8,0x8B,0xAB),
+     o3(0xE5,0xAF,0x85), o3(0xE9,0x85,0x89),
+     o3(0xE7,0x80,0x9E), o3(0xE5,0x99,0xB8),
+     o3(0xE5,0xB1,0xAF), o3(0xE6,0x83,0x87),
+     o3(0xE6,0x95,0xA6), o3(0xE6,0xB2,0x8C),
+     o3(0xE8,0xB1,0x9A), o3(0xE9,0x81,0x81),
+     o3(0xE9,0xA0,0x93), o3(0xE5,0x91,0x91),
+     o3(0xE6,0x9B,0x87), o3(0xE9,0x88,0x8D),
+     o3(0xE5,0xA5,0x88), o3(0xE9,0x82,0xA3),
+     o3(0xE5,0x86,0x85), o3(0xE4,0xB9,0x8D),
+     o3(0xE5,0x87,0xAA), o3(0xE8,0x96,0x99),
+     o3(0xE8,0xAC,0x8E), o3(0xE7,0x81,0x98),
+     o3(0xE6,0x8D,0xBA), o3(0xE9,0x8D,0x8B),
+     o3(0xE6,0xA5,0xA2), o3(0xE9,0xA6,0xB4),
+     o3(0xE7,0xB8,0x84), o3(0xE7,0x95,0xB7),
+     o3(0xE5,0x8D,0x97), o3(0xE6,0xA5,0xA0),
+     o3(0xE8,0xBB,0x9F), o3(0xE9,0x9B,0xA3),
+     o3(0xE6,0xB1,0x9D), o3(0xE4,0xBA,0x8C),
+     o3(0xE5,0xB0,0xBC), o3(0xE5,0xBC,0x90),
+     o3(0xE8,0xBF,0xA9), o3(0xE5,0x8C,0x82),
+     o3(0xE8,0xB3,0x91), o3(0xE8,0x82,0x89),
+     o3(0xE8,0x99,0xB9), o3(0xE5,0xBB,0xBF),
+     o3(0xE6,0x97,0xA5), o3(0xE4,0xB9,0xB3),
+     o3(0xE5,0x85,0xA5),
+
+#define from_EUC_JP_C6 WORDINDEX2INFO(9205)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C6_infos,
+
+#define from_EUC_JP_C7_infos WORDINDEX2INFO(9207)
+                INVALID, o3(0xE5,0xA6,0x82),
+     o3(0xE5,0xB0,0xBF), o3(0xE9,0x9F,0xAE),
+     o3(0xE4,0xBB,0xBB), o3(0xE5,0xA6,0x8A),
+     o3(0xE5,0xBF,0x8D), o3(0xE8,0xAA,0x8D),
+     o3(0xE6,0xBF,0xA1), o3(0xE7,0xA6,0xB0),
+     o3(0xE7,0xA5,0xA2), o3(0xE5,0xAF,0xA7),
+     o3(0xE8,0x91,0xB1), o3(0xE7,0x8C,0xAB),
+     o3(0xE7,0x86,0xB1), o3(0xE5,0xB9,0xB4),
+     o3(0xE5,0xBF,0xB5), o3(0xE6,0x8D,0xBB),
+     o3(0xE6,0x92,0x9A), o3(0xE7,0x87,0x83),
+     o3(0xE7,0xB2,0x98), o3(0xE4,0xB9,0x83),
+     o3(0xE5,0xBB,0xBC), o3(0xE4,0xB9,0x8B),
+     o3(0xE5,0x9F,0x9C), o3(0xE5,0x9A,0xA2),
+     o3(0xE6,0x82,0xA9), o3(0xE6,0xBF,0x83),
+     o3(0xE7,0xB4,0x8D), o3(0xE8,0x83,0xBD),
+     o3(0xE8,0x84,0xB3), o3(0xE8,0x86,0xBF),
+     o3(0xE8,0xBE,0xB2), o3(0xE8,0xA6,0x97),
+     o3(0xE8,0x9A,0xA4), o3(0xE5,0xB7,0xB4),
+     o3(0xE6,0x8A,0x8A), o3(0xE6,0x92,0xAD),
+     o3(0xE8,0xA6,0x87), o3(0xE6,0x9D,0xB7),
+     o3(0xE6,0xB3,0xA2), o3(0xE6,0xB4,0xBE),
+     o3(0xE7,0x90,0xB6), o3(0xE7,0xA0,0xB4),
+     o3(0xE5,0xA9,0x86), o3(0xE7,0xBD,0xB5),
+     o3(0xE8,0x8A,0xAD), o3(0xE9,0xA6,0xAC),
+     o3(0xE4,0xBF,0xB3), o3(0xE5,0xBB,0x83),
+     o3(0xE6,0x8B,0x9D), o3(0xE6,0x8E,0x92),
+     o3(0xE6,0x95,0x97), o3(0xE6,0x9D,0xAF),
+     o3(0xE7,0x9B,0x83), o3(0xE7,0x89,0x8C),
+     o3(0xE8,0x83,0x8C), o3(0xE8,0x82,0xBA),
+     o3(0xE8,0xBC,0xA9), o3(0xE9,0x85,0x8D),
+     o3(0xE5,0x80,0x8D), o3(0xE5,0x9F,0xB9),
+     o3(0xE5,0xAA,0x92), o3(0xE6,0xA2,0x85),
+     o3(0xE6,0xA5,0xB3), o3(0xE7,0x85,0xA4),
+     o3(0xE7,0x8B,0xBD), o3(0xE8,0xB2,0xB7),
+     o3(0xE5,0xA3,0xB2), o3(0xE8,0xB3,0xA0),
+     o3(0xE9,0x99,0xAA), o3(0xE9,0x80,0x99),
+     o3(0xE8,0x9D,0xBF), o3(0xE7,0xA7,0xA4),
+     o3(0xE7,0x9F,0xA7), o3(0xE8,0x90,0xA9),
+     o3(0xE4,0xBC,0xAF), o3(0xE5,0x89,0xA5),
+     o3(0xE5,0x8D,0x9A), o3(0xE6,0x8B,0x8D),
+     o3(0xE6,0x9F,0x8F), o3(0xE6,0xB3,0x8A),
+     o3(0xE7,0x99,0xBD), o3(0xE7,0xAE,0x94),
+     o3(0xE7,0xB2,0x95), o3(0xE8,0x88,0xB6),
+     o3(0xE8,0x96,0x84), o3(0xE8,0xBF,0xAB),
+     o3(0xE6,0x9B,0x9D), o3(0xE6,0xBC,0xA0),
+     o3(0xE7,0x88,0x86), o3(0xE7,0xB8,0x9B),
+     o3(0xE8,0x8E,0xAB), o3(0xE9,0xA7,0x81),
+     o3(0xE9,0xBA,0xA6),
+
+#define from_EUC_JP_C7 WORDINDEX2INFO(9302)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C7_infos,
+
+#define from_EUC_JP_C8_infos WORDINDEX2INFO(9304)
+                INVALID, o3(0xE5,0x87,0xBD),
+     o3(0xE7,0xAE,0xB1), o3(0xE7,0xA1,0xB2),
+     o3(0xE7,0xAE,0xB8), o3(0xE8,0x82,0x87),
+     o3(0xE7,0xAD,0x88), o3(0xE6,0xAB,0xA8),
+     o3(0xE5,0xB9,0xA1), o3(0xE8,0x82,0x8C),
+     o3(0xE7,0x95,0x91), o3(0xE7,0x95,0xA0),
+     o3(0xE5,0x85,0xAB), o3(0xE9,0x89,0xA2),
+     o3(0xE6,0xBA,0x8C), o3(0xE7,0x99,0xBA),
+     o3(0xE9,0x86,0x97), o3(0xE9,0xAB,0xAA),
+     o3(0xE4,0xBC,0x90), o3(0xE7,0xBD,0xB0),
+     o3(0xE6,0x8A,0x9C), o3(0xE7,0xAD,0x8F),
+     o3(0xE9,0x96,0xA5), o3(0xE9,0xB3,0xA9),
+     o3(0xE5,0x99,0xBA), o3(0xE5,0xA1,0x99),
+     o3(0xE8,0x9B,0xA4), o3(0xE9,0x9A,0xBC),
+     o3(0xE4,0xBC,0xB4), o3(0xE5,0x88,0xA4),
+     o3(0xE5,0x8D,0x8A), o3(0xE5,0x8F,0x8D),
+     o3(0xE5,0x8F,0x9B), o3(0xE5,0xB8,0x86),
+     o3(0xE6,0x90,0xAC), o3(0xE6,0x96,0x91),
+     o3(0xE6,0x9D,0xBF), o3(0xE6,0xB0,0xBE),
+     o3(0xE6,0xB1,0x8E), o3(0xE7,0x89,0x88),
+     o3(0xE7,0x8A,0xAF), o3(0xE7,0x8F,0xAD),
+     o3(0xE7,0x95,0x94), o3(0xE7,0xB9,0x81),
+     o3(0xE8,0x88,0xAC), o3(0xE8,0x97,0xA9),
+     o3(0xE8,0xB2,0xA9), o3(0xE7,0xAF,0x84),
+     o3(0xE9,0x87,0x86), o3(0xE7,0x85,0xA9),
+     o3(0xE9,0xA0,0x92), o3(0xE9,0xA3,0xAF),
+     o3(0xE6,0x8C,0xBD), o3(0xE6,0x99,0xA9),
+     o3(0xE7,0x95,0xAA), o3(0xE7,0x9B,0xA4),
+     o3(0xE7,0xA3,0x90), o3(0xE8,0x95,0x83),
+     o3(0xE8,0x9B,0xAE), o3(0xE5,0x8C,0xAA),
+     o3(0xE5,0x8D,0x91), o3(0xE5,0x90,0xA6),
+     o3(0xE5,0xA6,0x83), o3(0xE5,0xBA,0x87),
+     o3(0xE5,0xBD,0xBC), o3(0xE6,0x82,0xB2),
+     o3(0xE6,0x89,0x89), o3(0xE6,0x89,0xB9),
+     o3(0xE6,0x8A,0xAB), o3(0xE6,0x96,0x90),
+     o3(0xE6,0xAF,0x94), o3(0xE6,0xB3,0x8C),
+     o3(0xE7,0x96,0xB2), o3(0xE7,0x9A,0xAE),
+     o3(0xE7,0xA2,0x91), o3(0xE7,0xA7,0x98),
+     o3(0xE7,0xB7,0x8B), o3(0xE7,0xBD,0xB7),
+     o3(0xE8,0x82,0xA5), o3(0xE8,0xA2,0xAB),
+     o3(0xE8,0xAA,0xB9), o3(0xE8,0xB2,0xBB),
+     o3(0xE9,0x81,0xBF), o3(0xE9,0x9D,0x9E),
+     o3(0xE9,0xA3,0x9B), o3(0xE6,0xA8,0x8B),
+     o3(0xE7,0xB0,0xB8), o3(0xE5,0x82,0x99),
+     o3(0xE5,0xB0,0xBE), o3(0xE5,0xBE,0xAE),
+     o3(0xE6,0x9E,0x87), o3(0xE6,0xAF,0x98),
+     o3(0xE7,0x90,0xB5), o3(0xE7,0x9C,0x89),
+     o3(0xE7,0xBE,0x8E),
+
+#define from_EUC_JP_C8 WORDINDEX2INFO(9399)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C8_infos,
+
+#define from_EUC_JP_C9_infos WORDINDEX2INFO(9401)
+                INVALID, o3(0xE9,0xBC,0xBB),
+     o3(0xE6,0x9F,0x8A), o3(0xE7,0xA8,0x97),
+     o3(0xE5,0x8C,0xB9), o3(0xE7,0x96,0x8B),
+     o3(0xE9,0xAB,0xAD), o3(0xE5,0xBD,0xA6),
+     o3(0xE8,0x86,0x9D), o3(0xE8,0x8F,0xB1),
+     o3(0xE8,0x82,0x98), o3(0xE5,0xBC,0xBC),
+     o3(0xE5,0xBF,0x85), o3(0xE7,0x95,0xA2),
+     o3(0xE7,0xAD,0x86), o3(0xE9,0x80,0xBC),
+     o3(0xE6,0xA1,0xA7), o3(0xE5,0xA7,0xAB),
+     o3(0xE5,0xAA,0x9B), o3(0xE7,0xB4,0x90),
+     o3(0xE7,0x99,0xBE), o3(0xE8,0xAC,0xAC),
+     o3(0xE4,0xBF,0xB5), o3(0xE5,0xBD,0xAA),
+     o3(0xE6,0xA8,0x99), o3(0xE6,0xB0,0xB7),
+     o3(0xE6,0xBC,0x82), o3(0xE7,0x93,0xA2),
+     o3(0xE7,0xA5,0xA8), o3(0xE8,0xA1,0xA8),
+     o3(0xE8,0xA9,0x95), o3(0xE8,0xB1,0xB9),
+     o3(0xE5,0xBB,0x9F), o3(0xE6,0x8F,0x8F),
+     o3(0xE7,0x97,0x85), o3(0xE7,0xA7,0x92),
+     o3(0xE8,0x8B,0x97), o3(0xE9,0x8C,0xA8),
+     o3(0xE9,0x8B,0xB2), o3(0xE8,0x92,0x9C),
+     o3(0xE8,0x9B,0xAD), o3(0xE9,0xB0,0xAD),
+     o3(0xE5,0x93,0x81), o3(0xE5,0xBD,0xAC),
+     o3(0xE6,0x96,0x8C), o3(0xE6,0xB5,0x9C),
+     o3(0xE7,0x80,0x95), o3(0xE8,0xB2,0xA7),
+     o3(0xE8,0xB3,0x93), o3(0xE9,0xA0,0xBB),
+     o3(0xE6,0x95,0x8F), o3(0xE7,0x93,0xB6),
+     o3(0xE4,0xB8,0x8D), o3(0xE4,0xBB,0x98),
+     o3(0xE5,0x9F,0xA0), o3(0xE5,0xA4,0xAB),
+     o3(0xE5,0xA9,0xA6), o3(0xE5,0xAF,0x8C),
+     o3(0xE5,0x86,0xA8), o3(0xE5,0xB8,0x83),
+     o3(0xE5,0xBA,0x9C), o3(0xE6,0x80,0x96),
+     o3(0xE6,0x89,0xB6), o3(0xE6,0x95,0xB7),
+     o3(0xE6,0x96,0xA7), o3(0xE6,0x99,0xAE),
+     o3(0xE6,0xB5,0xAE), o3(0xE7,0x88,0xB6),
+     o3(0xE7,0xAC,0xA6), o3(0xE8,0x85,0x90),
+     o3(0xE8,0x86,0x9A), o3(0xE8,0x8A,0x99),
+     o3(0xE8,0xAD,0x9C), o3(0xE8,0xB2,0xA0),
+     o3(0xE8,0xB3,0xA6), o3(0xE8,0xB5,0xB4),
+     o3(0xE9,0x98,0x9C), o3(0xE9,0x99,0x84),
+     o3(0xE4,0xBE,0xAE), o3(0xE6,0x92,0xAB),
+     o3(0xE6,0xAD,0xA6), o3(0xE8,0x88,0x9E),
+     o3(0xE8,0x91,0xA1), o3(0xE8,0x95,0xAA),
+     o3(0xE9,0x83,0xA8), o3(0xE5,0xB0,0x81),
+     o3(0xE6,0xA5,0x93), o3(0xE9,0xA2,0xA8),
+     o3(0xE8,0x91,0xBA), o3(0xE8,0x95,0x97),
+     o3(0xE4,0xBC,0x8F), o3(0xE5,0x89,0xAF),
+     o3(0xE5,0xBE,0xA9), o3(0xE5,0xB9,0x85),
+     o3(0xE6,0x9C,0x8D),
+
+#define from_EUC_JP_C9 WORDINDEX2INFO(9496)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_C9_infos,
+
+#define from_EUC_JP_CA_infos WORDINDEX2INFO(9498)
+                INVALID, o3(0xE7,0xA6,0x8F),
+     o3(0xE8,0x85,0xB9), o3(0xE8,0xA4,0x87),
+     o3(0xE8,0xA6,0x86), o3(0xE6,0xB7,0xB5),
+     o3(0xE5,0xBC,0x97), o3(0xE6,0x89,0x95),
+     o3(0xE6,0xB2,0xB8), o3(0xE4,0xBB,0x8F),
+     o3(0xE7,0x89,0xA9), o3(0xE9,0xAE,0x92),
+     o3(0xE5,0x88,0x86), o3(0xE5,0x90,0xBB),
+     o3(0xE5,0x99,0xB4), o3(0xE5,0xA2,0xB3),
+     o3(0xE6,0x86,0xA4), o3(0xE6,0x89,0xAE),
+     o3(0xE7,0x84,0x9A), o3(0xE5,0xA5,0xAE),
+     o3(0xE7,0xB2,0x89), o3(0xE7,0xB3,0x9E),
+     o3(0xE7,0xB4,0x9B), o3(0xE9,0x9B,0xB0),
+     o3(0xE6,0x96,0x87), o3(0xE8,0x81,0x9E),
+     o3(0xE4,0xB8,0x99), o3(0xE4,0xBD,0xB5),
+     o3(0xE5,0x85,0xB5), o3(0xE5,0xA1,0x80),
+     o3(0xE5,0xB9,0xA3), o3(0xE5,0xB9,0xB3),
+     o3(0xE5,0xBC,0x8A), o3(0xE6,0x9F,0x84),
+     o3(0xE4,0xB8,0xA6), o3(0xE8,0x94,0xBD),
+     o3(0xE9,0x96,0x89), o3(0xE9,0x99,0x9B),
+     o3(0xE7,0xB1,0xB3), o3(0xE9,0xA0,0x81),
+     o3(0xE5,0x83,0xBB), o3(0xE5,0xA3,0x81),
+     o3(0xE7,0x99,0x96), o3(0xE7,0xA2,0xA7),
+     o3(0xE5,0x88,0xA5), o3(0xE7,0x9E,0xA5),
+     o3(0xE8,0x94,0x91), o3(0xE7,0xAE,0x86),
+     o3(0xE5,0x81,0x8F), o3(0xE5,0xA4,0x89),
+     o3(0xE7,0x89,0x87), o3(0xE7,0xAF,0x87),
+     o3(0xE7,0xB7,0xA8), o3(0xE8,0xBE,0xBA),
+     o3(0xE8,0xBF,0x94), o3(0xE9,0x81,0x8D),
+     o3(0xE4,0xBE,0xBF), o3(0xE5,0x8B,0x89),
+     o3(0xE5,0xA8,0xA9), o3(0xE5,0xBC,0x81),
+     o3(0xE9,0x9E,0xAD), o3(0xE4,0xBF,0x9D),
+     o3(0xE8,0x88,0x97), o3(0xE9,0x8B,0xAA),
+     o3(0xE5,0x9C,0x83), o3(0xE6,0x8D,0x95),
+     o3(0xE6,0xAD,0xA9), o3(0xE7,0x94,0xAB),
+     o3(0xE8,0xA3,0x9C), o3(0xE8,0xBC,0x94),
+     o3(0xE7,0xA9,0x82), o3(0xE5,0x8B,0x9F),
+     o3(0xE5,0xA2,0x93), o3(0xE6,0x85,0x95),
+     o3(0xE6,0x88,0x8A), o3(0xE6,0x9A,0xAE),
+     o3(0xE6,0xAF,0x8D), o3(0xE7,0xB0,0xBF),
+     o3(0xE8,0x8F,0xA9), o3(0xE5,0x80,0xA3),
+     o3(0xE4,0xBF,0xB8), o3(0xE5,0x8C,0x85),
+     o3(0xE5,0x91,0x86), o3(0xE5,0xA0,0xB1),
+     o3(0xE5,0xA5,0x89), o3(0xE5,0xAE,0x9D),
+     o3(0xE5,0xB3,0xB0), o3(0xE5,0xB3,0xAF),
+     o3(0xE5,0xB4,0xA9), o3(0xE5,0xBA,0x96),
+     o3(0xE6,0x8A,0xB1), o3(0xE6,0x8D,0xA7),
+     o3(0xE6,0x94,0xBE), o3(0xE6,0x96,0xB9),
+     o3(0xE6,0x9C,0x8B),
+
+#define from_EUC_JP_CA WORDINDEX2INFO(9593)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_CA_infos,
+
+#define from_EUC_JP_CB_infos WORDINDEX2INFO(9595)
+                INVALID, o3(0xE6,0xB3,0x95),
+     o3(0xE6,0xB3,0xA1), o3(0xE7,0x83,0xB9),
+     o3(0xE7,0xA0,0xB2), o3(0xE7,0xB8,0xAB),
+     o3(0xE8,0x83,0x9E), o3(0xE8,0x8A,0xB3),
+     o3(0xE8,0x90,0x8C), o3(0xE8,0x93,0xAC),
+     o3(0xE8,0x9C,0x82), o3(0xE8,0xA4,0x92),
+     o3(0xE8,0xA8,0xAA), o3(0xE8,0xB1,0x8A),
+     o3(0xE9,0x82,0xA6), o3(0xE9,0x8B,0x92),
+     o3(0xE9,0xA3,0xBD), o3(0xE9,0xB3,0xB3),
+     o3(0xE9,0xB5,0xAC), o3(0xE4,0xB9,0x8F),
+     o3(0xE4,0xBA,0xA1), o3(0xE5,0x82,0x8D),
+     o3(0xE5,0x89,0x96), o3(0xE5,0x9D,0x8A),
+     o3(0xE5,0xA6,0xA8), o3(0xE5,0xB8,0xBD),
+     o3(0xE5,0xBF,0x98), o3(0xE5,0xBF,0x99),
+     o3(0xE6,0x88,0xBF), o3(0xE6,0x9A,0xB4),
+     o3(0xE6,0x9C,0x9B), o3(0xE6,0x9F,0x90),
+     o3(0xE6,0xA3,0x92), o3(0xE5,0x86,0x92),
+     o3(0xE7,0xB4,0xA1), o3(0xE8,0x82,0xAA),
+     o3(0xE8,0x86,0xA8), o3(0xE8,0xAC,0x80),
+     o3(0xE8,0xB2,0x8C), o3(0xE8,0xB2,0xBF),
+     o3(0xE9,0x89,0xBE), o3(0xE9,0x98,0xB2),
+     o3(0xE5,0x90,0xA0), o3(0xE9,0xA0,0xAC),
+     o3(0xE5,0x8C,0x97), o3(0xE5,0x83,0x95),
+     o3(0xE5,0x8D,0x9C), o3(0xE5,0xA2,0xA8),
+     o3(0xE6,0x92,0xB2), o3(0xE6,0x9C,0xB4),
+     o3(0xE7,0x89,0xA7), o3(0xE7,0x9D,0xA6),
+     o3(0xE7,0xA9,0x86), o3(0xE9,0x87,0xA6),
+     o3(0xE5,0x8B,0x83), o3(0xE6,0xB2,0xA1),
+     o3(0xE6,0xAE,0x86), o3(0xE5,0xA0,0x80),
+     o3(0xE5,0xB9,0x8C), o3(0xE5,0xA5,0x94),
+     o3(0xE6,0x9C,0xAC), o3(0xE7,0xBF,0xBB),
+     o3(0xE5,0x87,0xA1), o3(0xE7,0x9B,0x86),
+     o3(0xE6,0x91,0xA9), o3(0xE7,0xA3,0xA8),
+     o3(0xE9,0xAD,0x94), o3(0xE9,0xBA,0xBB),
+     o3(0xE5,0x9F,0x8B), o3(0xE5,0xA6,0xB9),
+     o3(0xE6,0x98,0xA7), o3(0xE6,0x9E,0x9A),
+     o3(0xE6,0xAF,0x8E), o3(0xE5,0x93,0xA9),
+     o3(0xE6,0xA7,0x99), o3(0xE5,0xB9,0x95),
+     o3(0xE8,0x86,0x9C), o3(0xE6,0x9E,0x95),
+     o3(0xE9,0xAE,0xAA), o3(0xE6,0x9F,0xBE),
+     o3(0xE9,0xB1,0x92), o3(0xE6,0xA1,0x9D),
+     o3(0xE4,0xBA,0xA6), o3(0xE4,0xBF,0xA3),
+     o3(0xE5,0x8F,0x88), o3(0xE6,0x8A,0xB9),
+     o3(0xE6,0x9C,0xAB), o3(0xE6,0xB2,0xAB),
+     o3(0xE8,0xBF,0x84), o3(0xE4,0xBE,0xAD),
+     o3(0xE7,0xB9,0xAD), o3(0xE9,0xBA,0xBF),
+     o3(0xE4,0xB8,0x87), o3(0xE6,0x85,0xA2),
+     o3(0xE6,0xBA,0x80),
+
+#define from_EUC_JP_CB WORDINDEX2INFO(9690)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_CB_infos,
+
+#define from_EUC_JP_CC_infos WORDINDEX2INFO(9692)
+                INVALID, o3(0xE6,0xBC,0xAB),
+     o3(0xE8,0x94,0x93), o3(0xE5,0x91,0xB3),
+     o3(0xE6,0x9C,0xAA), o3(0xE9,0xAD,0x85),
+     o3(0xE5,0xB7,0xB3), o3(0xE7,0xAE,0x95),
+     o3(0xE5,0xB2,0xAC), o3(0xE5,0xAF,0x86),
+     o3(0xE8,0x9C,0x9C), o3(0xE6,0xB9,0x8A),
+     o3(0xE8,0x93,0x91), o3(0xE7,0xA8,0x94),
+     o3(0xE8,0x84,0x88), o3(0xE5,0xA6,0x99),
+     o3(0xE7,0xB2,0x8D), o3(0xE6,0xB0,0x91),
+     o3(0xE7,0x9C,0xA0), o3(0xE5,0x8B,0x99),
+     o3(0xE5,0xA4,0xA2), o3(0xE7,0x84,0xA1),
+     o3(0xE7,0x89,0x9F), o3(0xE7,0x9F,0x9B),
+     o3(0xE9,0x9C,0xA7), o3(0xE9,0xB5,0xA1),
+     o3(0xE6,0xA4,0x8B), o3(0xE5,0xA9,0xBF),
+     o3(0xE5,0xA8,0x98), o3(0xE5,0x86,0xA5),
+     o3(0xE5,0x90,0x8D), o3(0xE5,0x91,0xBD),
+     o3(0xE6,0x98,0x8E), o3(0xE7,0x9B,0x9F),
+     o3(0xE8,0xBF,0xB7), o3(0xE9,0x8A,0x98),
+     o3(0xE9,0xB3,0xB4), o3(0xE5,0xA7,0xAA),
+     o3(0xE7,0x89,0x9D), o3(0xE6,0xBB,0x85),
+     o3(0xE5,0x85,0x8D), o3(0xE6,0xA3,0x89),
+     o3(0xE7,0xB6,0xBF), o3(0xE7,0xB7,0xAC),
+     o3(0xE9,0x9D,0xA2), o3(0xE9,0xBA,0xBA),
+     o3(0xE6,0x91,0xB8), o3(0xE6,0xA8,0xA1),
+     o3(0xE8,0x8C,0x82), o3(0xE5,0xA6,0x84),
+     o3(0xE5,0xAD,0x9F), o3(0xE6,0xAF,0x9B),
+     o3(0xE7,0x8C,0x9B), o3(0xE7,0x9B,0xB2),
+     o3(0xE7,0xB6,0xB2), o3(0xE8,0x80,0x97),
+     o3(0xE8,0x92,0x99), o3(0xE5,0x84,0xB2),
+     o3(0xE6,0x9C,0xA8), o3(0xE9,0xBB,0x99),
+     o3(0xE7,0x9B,0xAE), o3(0xE6,0x9D,0xA2),
+     o3(0xE5,0x8B,0xBF), o3(0xE9,0xA4,0x85),
+     o3(0xE5,0xB0,0xA4), o3(0xE6,0x88,0xBB),
+     o3(0xE7,0xB1,0xBE), o3(0xE8,0xB2,0xB0),
+     o3(0xE5,0x95,0x8F), o3(0xE6,0x82,0xB6),
+     o3(0xE7,0xB4,0x8B), o3(0xE9,0x96,0x80),
+     o3(0xE5,0x8C,0x81), o3(0xE4,0xB9,0x9F),
+     o3(0xE5,0x86,0xB6), o3(0xE5,0xA4,0x9C),
+     o3(0xE7,0x88,0xBA), o3(0xE8,0x80,0xB6),
+     o3(0xE9,0x87,0x8E), o3(0xE5,0xBC,0xA5),
+     o3(0xE7,0x9F,0xA2), o3(0xE5,0x8E,0x84),
+     o3(0xE5,0xBD,0xB9), o3(0xE7,0xB4,0x84),
+     o3(0xE8,0x96,0xAC), o3(0xE8,0xA8,0xB3),
+     o3(0xE8,0xBA,0x8D), o3(0xE9,0x9D,0x96),
+     o3(0xE6,0x9F,0xB3), o3(0xE8,0x96,0xAE),
+     o3(0xE9,0x91,0x93), o3(0xE6,0x84,0x89),
+     o3(0xE6,0x84,0x88), o3(0xE6,0xB2,0xB9),
+     o3(0xE7,0x99,0x92),
+
+#define from_EUC_JP_CC WORDINDEX2INFO(9787)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_CC_infos,
+
+#define from_EUC_JP_CD_infos WORDINDEX2INFO(9789)
+                INVALID, o3(0xE8,0xAB,0xAD),
+     o3(0xE8,0xBC,0xB8), o3(0xE5,0x94,0xAF),
+     o3(0xE4,0xBD,0x91), o3(0xE5,0x84,0xAA),
+     o3(0xE5,0x8B,0x87), o3(0xE5,0x8F,0x8B),
+     o3(0xE5,0xAE,0xA5), o3(0xE5,0xB9,0xBD),
+     o3(0xE6,0x82,0xA0), o3(0xE6,0x86,0x82),
+     o3(0xE6,0x8F,0x96), o3(0xE6,0x9C,0x89),
+     o3(0xE6,0x9F,0x9A), o3(0xE6,0xB9,0xA7),
+     o3(0xE6,0xB6,0x8C), o3(0xE7,0x8C,0xB6),
+     o3(0xE7,0x8C,0xB7), o3(0xE7,0x94,0xB1),
+     o3(0xE7,0xA5,0x90), o3(0xE8,0xA3,0x95),
+     o3(0xE8,0xAA,0x98), o3(0xE9,0x81,0x8A),
+     o3(0xE9,0x82,0x91), o3(0xE9,0x83,0xB5),
+     o3(0xE9,0x9B,0x84), o3(0xE8,0x9E,0x8D),
+     o3(0xE5,0xA4,0x95), o3(0xE4,0xBA,0x88),
+     o3(0xE4,0xBD,0x99), o3(0xE4,0xB8,0x8E),
+     o3(0xE8,0xAA,0x89), o3(0xE8,0xBC,0xBF),
+     o3(0xE9,0xA0,0x90), o3(0xE5,0x82,0xAD),
+     o3(0xE5,0xB9,0xBC), o3(0xE5,0xA6,0x96),
+     o3(0xE5,0xAE,0xB9), o3(0xE5,0xBA,0xB8),
+     o3(0xE6,0x8F,0x9A), o3(0xE6,0x8F,0xBA),
+     o3(0xE6,0x93,0x81), o3(0xE6,0x9B,0x9C),
+     o3(0xE6,0xA5,0x8A), o3(0xE6,0xA7,0x98),
+     o3(0xE6,0xB4,0x8B), o3(0xE6,0xBA,0xB6),
+     o3(0xE7,0x86,0x94), o3(0xE7,0x94,0xA8),
+     o3(0xE7,0xAA,0xAF), o3(0xE7,0xBE,0x8A),
+     o3(0xE8,0x80,0x80), o3(0xE8,0x91,0x89),
+     o3(0xE8,0x93,0x89), o3(0xE8,0xA6,0x81),
+     o3(0xE8,0xAC,0xA1), o3(0xE8,0xB8,0x8A),
+     o3(0xE9,0x81,0xA5), o3(0xE9,0x99,0xBD),
+     o3(0xE9,0xA4,0x8A), o3(0xE6,0x85,0xBE),
+     o3(0xE6,0x8A,0x91), o3(0xE6,0xAC,0xB2),
+     o3(0xE6,0xB2,0x83), o3(0xE6,0xB5,0xB4),
+     o3(0xE7,0xBF,0x8C), o3(0xE7,0xBF,0xBC),
+     o3(0xE6,0xB7,0x80), o3(0xE7,0xBE,0x85),
+     o3(0xE8,0x9E,0xBA), o3(0xE8,0xA3,0xB8),
+     o3(0xE6,0x9D,0xA5), o3(0xE8,0x8E,0xB1),
+     o3(0xE9,0xA0,0xBC), o3(0xE9,0x9B,0xB7),
+     o3(0xE6,0xB4,0x9B), o3(0xE7,0xB5,0xA1),
+     o3(0xE8,0x90,0xBD), o3(0xE9,0x85,0xAA),
+     o3(0xE4,0xB9,0xB1), o3(0xE5,0x8D,0xB5),
+     o3(0xE5,0xB5,0x90), o3(0xE6,0xAC,0x84),
+     o3(0xE6,0xBF,0xAB), o3(0xE8,0x97,0x8D),
+     o3(0xE8,0x98,0xAD), o3(0xE8,0xA6,0xA7),
+     o3(0xE5,0x88,0xA9), o3(0xE5,0x90,0x8F),
+     o3(0xE5,0xB1,0xA5), o3(0xE6,0x9D,0x8E),
+     o3(0xE6,0xA2,0xA8), o3(0xE7,0x90,0x86),
+     o3(0xE7,0x92,0x83),
+
+#define from_EUC_JP_CD WORDINDEX2INFO(9884)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_CD_infos,
+
+#define from_EUC_JP_CE_infos WORDINDEX2INFO(9886)
+                INVALID, o3(0xE7,0x97,0xA2),
+     o3(0xE8,0xA3,0x8F), o3(0xE8,0xA3,0xA1),
+     o3(0xE9,0x87,0x8C), o3(0xE9,0x9B,0xA2),
+     o3(0xE9,0x99,0xB8), o3(0xE5,0xBE,0x8B),
+     o3(0xE7,0x8E,0x87), o3(0xE7,0xAB,0x8B),
+     o3(0xE8,0x91,0x8E), o3(0xE6,0x8E,0xA0),
+     o3(0xE7,0x95,0xA5), o3(0xE5,0x8A,0x89),
+     o3(0xE6,0xB5,0x81), o3(0xE6,0xBA,0x9C),
+     o3(0xE7,0x90,0x89), o3(0xE7,0x95,0x99),
+     o3(0xE7,0xA1,0xAB), o3(0xE7,0xB2,0x92),
+     o3(0xE9,0x9A,0x86), o3(0xE7,0xAB,0x9C),
+     o3(0xE9,0xBE,0x8D), o3(0xE4,0xBE,0xB6),
+     o3(0xE6,0x85,0xAE), o3(0xE6,0x97,0x85),
+     o3(0xE8,0x99,0x9C), o3(0xE4,0xBA,0x86),
+     o3(0xE4,0xBA,0xAE), o3(0xE5,0x83,0x9A),
+     o3(0xE4,0xB8,0xA1), o3(0xE5,0x87,0x8C),
+     o3(0xE5,0xAF,0xAE), o3(0xE6,0x96,0x99),
+     o3(0xE6,0xA2,0x81), o3(0xE6,0xB6,0xBC),
+     o3(0xE7,0x8C,0x9F), o3(0xE7,0x99,0x82),
+     o3(0xE7,0x9E,0xAD), o3(0xE7,0xA8,0x9C),
+     o3(0xE7,0xB3,0xA7), o3(0xE8,0x89,0xAF),
+     o3(0xE8,0xAB,0x92), o3(0xE9,0x81,0xBC),
+     o3(0xE9,0x87,0x8F), o3(0xE9,0x99,0xB5),
+     o3(0xE9,0xA0,0x98), o3(0xE5,0x8A,0x9B),
+     o3(0xE7,0xB7,0x91), o3(0xE5,0x80,0xAB),
+     o3(0xE5,0x8E,0x98), o3(0xE6,0x9E,0x97),
+     o3(0xE6,0xB7,0x8B), o3(0xE7,0x87,0x90),
+     o3(0xE7,0x90,0xB3), o3(0xE8,0x87,0xA8),
+     o3(0xE8,0xBC,0xAA), o3(0xE9,0x9A,0xA3),
+     o3(0xE9,0xB1,0x97), o3(0xE9,0xBA,0x9F),
+     o3(0xE7,0x91,0xA0), o3(0xE5,0xA1,0x81),
+     o3(0xE6,0xB6,0x99), o3(0xE7,0xB4,0xAF),
+     o3(0xE9,0xA1,0x9E), o3(0xE4,0xBB,0xA4),
+     o3(0xE4,0xBC,0xB6), o3(0xE4,0xBE,0x8B),
+     o3(0xE5,0x86,0xB7), o3(0xE5,0x8A,0xB1),
+     o3(0xE5,0xB6,0xBA), o3(0xE6,0x80,0x9C),
+     o3(0xE7,0x8E,0xB2), o3(0xE7,0xA4,0xBC),
+     o3(0xE8,0x8B,0x93), o3(0xE9,0x88,0xB4),
+     o3(0xE9,0x9A,0xB7), o3(0xE9,0x9B,0xB6),
+     o3(0xE9,0x9C,0x8A), o3(0xE9,0xBA,0x97),
+     o3(0xE9,0xBD,0xA2), o3(0xE6,0x9A,0xA6),
+     o3(0xE6,0xAD,0xB4), o3(0xE5,0x88,0x97),
+     o3(0xE5,0x8A,0xA3), o3(0xE7,0x83,0x88),
+     o3(0xE8,0xA3,0x82), o3(0xE5,0xBB,0x89),
+     o3(0xE6,0x81,0x8B), o3(0xE6,0x86,0x90),
+     o3(0xE6,0xBC,0xA3), o3(0xE7,0x85,0x89),
+     o3(0xE7,0xB0,0xBE), o3(0xE7,0xB7,0xB4),
+     o3(0xE8,0x81,0xAF),
+
+#define from_EUC_JP_CE WORDINDEX2INFO(9981)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_CE_infos,
+
+#define from_EUC_JP_CF_infos WORDINDEX2INFO(9983)
+                INVALID, o3(0xE8,0x93,0xAE),
+     o3(0xE9,0x80,0xA3), o3(0xE9,0x8C,0xAC),
+     o3(0xE5,0x91,0x82), o3(0xE9,0xAD,0xAF),
+     o3(0xE6,0xAB,0x93), o3(0xE7,0x82,0x89),
+     o3(0xE8,0xB3,0x82), o3(0xE8,0xB7,0xAF),
+     o3(0xE9,0x9C,0xB2), o3(0xE5,0x8A,0xB4),
+     o3(0xE5,0xA9,0x81), o3(0xE5,0xBB,0x8A),
+     o3(0xE5,0xBC,0x84), o3(0xE6,0x9C,0x97),
+     o3(0xE6,0xA5,0xBC), o3(0xE6,0xA6,0x94),
+     o3(0xE6,0xB5,0xAA), o3(0xE6,0xBC,0x8F),
+     o3(0xE7,0x89,0xA2), o3(0xE7,0x8B,0xBC),
+     o3(0xE7,0xAF,0xAD), o3(0xE8,0x80,0x81),
+     o3(0xE8,0x81,0xBE), o3(0xE8,0x9D,0x8B),
+     o3(0xE9,0x83,0x8E), o3(0xE5,0x85,0xAD),
+     o3(0xE9,0xBA,0x93), o3(0xE7,0xA6,0x84),
+     o3(0xE8,0x82,0x8B), o3(0xE9,0x8C,0xB2),
+     o3(0xE8,0xAB,0x96), o3(0xE5,0x80,0xAD),
+     o3(0xE5,0x92,0x8C), o3(0xE8,0xA9,0xB1),
+     o3(0xE6,0xAD,0xAA), o3(0xE8,0xB3,0x84),
+     o3(0xE8,0x84,0x87), o3(0xE6,0x83,0x91),
+     o3(0xE6,0x9E,0xA0), o3(0xE9,0xB7,0xB2),
+     o3(0xE4,0xBA,0x99), o3(0xE4,0xBA,0x98),
+     o3(0xE9,0xB0,0x90), o3(0xE8,0xA9,0xAB),
+     o3(0xE8,0x97,0x81), o3(0xE8,0x95,0xA8),
+     o3(0xE6,0xA4,0x80), o3(0xE6,0xB9,0xBE),
+     o3(0xE7,0xA2,0x97), o3(0xE8,0x85,0x95),
+                  UNDEF,
+
+#define from_EUC_JP_CF WORDINDEX2INFO(10036)
+    from_EUC_JP_CF_offsets,
+    from_EUC_JP_CF_infos,
+
+#define from_EUC_JP_D0_infos WORDINDEX2INFO(10038)
+                INVALID, o3(0xE5,0xBC,0x8C),
+     o3(0xE4,0xB8,0x90), o3(0xE4,0xB8,0x95),
+     o3(0xE4,0xB8,0xAA), o3(0xE4,0xB8,0xB1),
+     o3(0xE4,0xB8,0xB6), o3(0xE4,0xB8,0xBC),
+     o3(0xE4,0xB8,0xBF), o3(0xE4,0xB9,0x82),
+     o3(0xE4,0xB9,0x96), o3(0xE4,0xB9,0x98),
+     o3(0xE4,0xBA,0x82), o3(0xE4,0xBA,0x85),
+     o3(0xE8,0xB1,0xAB), o3(0xE4,0xBA,0x8A),
+     o3(0xE8,0x88,0x92), o3(0xE5,0xBC,0x8D),
+     o3(0xE4,0xBA,0x8E), o3(0xE4,0xBA,0x9E),
+     o3(0xE4,0xBA,0x9F), o3(0xE4,0xBA,0xA0),
+     o3(0xE4,0xBA,0xA2), o3(0xE4,0xBA,0xB0),
+     o3(0xE4,0xBA,0xB3), o3(0xE4,0xBA,0xB6),
+     o3(0xE4,0xBB,0x8E), o3(0xE4,0xBB,0x8D),
+     o3(0xE4,0xBB,0x84), o3(0xE4,0xBB,0x86),
+     o3(0xE4,0xBB,0x82), o3(0xE4,0xBB,0x97),
+     o3(0xE4,0xBB,0x9E), o3(0xE4,0xBB,0xAD),
+     o3(0xE4,0xBB,0x9F), o3(0xE4,0xBB,0xB7),
+     o3(0xE4,0xBC,0x89), o3(0xE4,0xBD,0x9A),
+     o3(0xE4,0xBC,0xB0), o3(0xE4,0xBD,0x9B),
+     o3(0xE4,0xBD,0x9D), o3(0xE4,0xBD,0x97),
+     o3(0xE4,0xBD,0x87), o3(0xE4,0xBD,0xB6),
+     o3(0xE4,0xBE,0x88), o3(0xE4,0xBE,0x8F),
+     o3(0xE4,0xBE,0x98), o3(0xE4,0xBD,0xBB),
+     o3(0xE4,0xBD,0xA9), o3(0xE4,0xBD,0xB0),
+     o3(0xE4,0xBE,0x91), o3(0xE4,0xBD,0xAF),
+     o3(0xE4,0xBE,0x86), o3(0xE4,0xBE,0x96),
+     o3(0xE5,0x84,0x98), o3(0xE4,0xBF,0x94),
+     o3(0xE4,0xBF,0x9F), o3(0xE4,0xBF,0x8E),
+     o3(0xE4,0xBF,0x98), o3(0xE4,0xBF,0x9B),
+     o3(0xE4,0xBF,0x91), o3(0xE4,0xBF,0x9A),
+     o3(0xE4,0xBF,0x90), o3(0xE4,0xBF,0xA4),
+     o3(0xE4,0xBF,0xA5), o3(0xE5,0x80,0x9A),
+     o3(0xE5,0x80,0xA8), o3(0xE5,0x80,0x94),
+     o3(0xE5,0x80,0xAA), o3(0xE5,0x80,0xA5),
+     o3(0xE5,0x80,0x85), o3(0xE4,0xBC,0x9C),
+     o3(0xE4,0xBF,0xB6), o3(0xE5,0x80,0xA1),
+     o3(0xE5,0x80,0xA9), o3(0xE5,0x80,0xAC),
+     o3(0xE4,0xBF,0xBE), o3(0xE4,0xBF,0xAF),
+     o3(0xE5,0x80,0x91), o3(0xE5,0x80,0x86),
+     o3(0xE5,0x81,0x83), o3(0xE5,0x81,0x87),
+     o3(0xE6,0x9C,0x83), o3(0xE5,0x81,0x95),
+     o3(0xE5,0x81,0x90), o3(0xE5,0x81,0x88),
+     o3(0xE5,0x81,0x9A), o3(0xE5,0x81,0x96),
+     o3(0xE5,0x81,0xAC), o3(0xE5,0x81,0xB8),
+     o3(0xE5,0x82,0x80), o3(0xE5,0x82,0x9A),
+     o3(0xE5,0x82,0x85), o3(0xE5,0x82,0xB4),
+     o3(0xE5,0x82,0xB2),
+
+#define from_EUC_JP_D0 WORDINDEX2INFO(10133)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D0_infos,
+
+#define from_EUC_JP_D1_infos WORDINDEX2INFO(10135)
+                INVALID, o3(0xE5,0x83,0x89),
+     o3(0xE5,0x83,0x8A), o3(0xE5,0x82,0xB3),
+     o3(0xE5,0x83,0x82), o3(0xE5,0x83,0x96),
+     o3(0xE5,0x83,0x9E), o3(0xE5,0x83,0xA5),
+     o3(0xE5,0x83,0xAD), o3(0xE5,0x83,0xA3),
+     o3(0xE5,0x83,0xAE), o3(0xE5,0x83,0xB9),
+     o3(0xE5,0x83,0xB5), o3(0xE5,0x84,0x89),
+     o3(0xE5,0x84,0x81), o3(0xE5,0x84,0x82),
+     o3(0xE5,0x84,0x96), o3(0xE5,0x84,0x95),
+     o3(0xE5,0x84,0x94), o3(0xE5,0x84,0x9A),
+     o3(0xE5,0x84,0xA1), o3(0xE5,0x84,0xBA),
+     o3(0xE5,0x84,0xB7), o3(0xE5,0x84,0xBC),
+     o3(0xE5,0x84,0xBB), o3(0xE5,0x84,0xBF),
+     o3(0xE5,0x85,0x80), o3(0xE5,0x85,0x92),
+     o3(0xE5,0x85,0x8C), o3(0xE5,0x85,0x94),
+     o3(0xE5,0x85,0xA2), o3(0xE7,0xAB,0xB8),
+     o3(0xE5,0x85,0xA9), o3(0xE5,0x85,0xAA),
+     o3(0xE5,0x85,0xAE), o3(0xE5,0x86,0x80),
+     o3(0xE5,0x86,0x82), o3(0xE5,0x9B,0x98),
+     o3(0xE5,0x86,0x8C), o3(0xE5,0x86,0x89),
+     o3(0xE5,0x86,0x8F), o3(0xE5,0x86,0x91),
+     o3(0xE5,0x86,0x93), o3(0xE5,0x86,0x95),
+     o3(0xE5,0x86,0x96), o3(0xE5,0x86,0xA4),
+     o3(0xE5,0x86,0xA6), o3(0xE5,0x86,0xA2),
+     o3(0xE5,0x86,0xA9), o3(0xE5,0x86,0xAA),
+     o3(0xE5,0x86,0xAB), o3(0xE5,0x86,0xB3),
+     o3(0xE5,0x86,0xB1), o3(0xE5,0x86,0xB2),
+     o3(0xE5,0x86,0xB0), o3(0xE5,0x86,0xB5),
+     o3(0xE5,0x86,0xBD), o3(0xE5,0x87,0x85),
+     o3(0xE5,0x87,0x89), o3(0xE5,0x87,0x9B),
+     o3(0xE5,0x87,0xA0), o3(0xE8,0x99,0x95),
+     o3(0xE5,0x87,0xA9), o3(0xE5,0x87,0xAD),
+     o3(0xE5,0x87,0xB0), o3(0xE5,0x87,0xB5),
+     o3(0xE5,0x87,0xBE), o3(0xE5,0x88,0x84),
+     o3(0xE5,0x88,0x8B), o3(0xE5,0x88,0x94),
+     o3(0xE5,0x88,0x8E), o3(0xE5,0x88,0xA7),
+     o3(0xE5,0x88,0xAA), o3(0xE5,0x88,0xAE),
+     o3(0xE5,0x88,0xB3), o3(0xE5,0x88,0xB9),
+     o3(0xE5,0x89,0x8F), o3(0xE5,0x89,0x84),
+     o3(0xE5,0x89,0x8B), o3(0xE5,0x89,0x8C),
+     o3(0xE5,0x89,0x9E), o3(0xE5,0x89,0x94),
+     o3(0xE5,0x89,0xAA), o3(0xE5,0x89,0xB4),
+     o3(0xE5,0x89,0xA9), o3(0xE5,0x89,0xB3),
+     o3(0xE5,0x89,0xBF), o3(0xE5,0x89,0xBD),
+     o3(0xE5,0x8A,0x8D), o3(0xE5,0x8A,0x94),
+     o3(0xE5,0x8A,0x92), o3(0xE5,0x89,0xB1),
+     o3(0xE5,0x8A,0x88), o3(0xE5,0x8A,0x91),
+     o3(0xE8,0xBE,0xA8),
+
+#define from_EUC_JP_D1 WORDINDEX2INFO(10230)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D1_infos,
+
+#define from_EUC_JP_D2_infos WORDINDEX2INFO(10232)
+                INVALID, o3(0xE8,0xBE,0xA7),
+     o3(0xE5,0x8A,0xAC), o3(0xE5,0x8A,0xAD),
+     o3(0xE5,0x8A,0xBC), o3(0xE5,0x8A,0xB5),
+     o3(0xE5,0x8B,0x81), o3(0xE5,0x8B,0x8D),
+     o3(0xE5,0x8B,0x97), o3(0xE5,0x8B,0x9E),
+     o3(0xE5,0x8B,0xA3), o3(0xE5,0x8B,0xA6),
+     o3(0xE9,0xA3,0xAD), o3(0xE5,0x8B,0xA0),
+     o3(0xE5,0x8B,0xB3), o3(0xE5,0x8B,0xB5),
+     o3(0xE5,0x8B,0xB8), o3(0xE5,0x8B,0xB9),
+     o3(0xE5,0x8C,0x86), o3(0xE5,0x8C,0x88),
+     o3(0xE7,0x94,0xB8), o3(0xE5,0x8C,0x8D),
+     o3(0xE5,0x8C,0x90), o3(0xE5,0x8C,0x8F),
+     o3(0xE5,0x8C,0x95), o3(0xE5,0x8C,0x9A),
+     o3(0xE5,0x8C,0xA3), o3(0xE5,0x8C,0xAF),
+     o3(0xE5,0x8C,0xB1), o3(0xE5,0x8C,0xB3),
+     o3(0xE5,0x8C,0xB8), o3(0xE5,0x8D,0x80),
+     o3(0xE5,0x8D,0x86), o3(0xE5,0x8D,0x85),
+     o3(0xE4,0xB8,0x97), o3(0xE5,0x8D,0x89),
+     o3(0xE5,0x8D,0x8D), o3(0xE5,0x87,0x96),
+     o3(0xE5,0x8D,0x9E), o3(0xE5,0x8D,0xA9),
+     o3(0xE5,0x8D,0xAE), o3(0xE5,0xA4,0x98),
+     o3(0xE5,0x8D,0xBB), o3(0xE5,0x8D,0xB7),
+     o3(0xE5,0x8E,0x82), o3(0xE5,0x8E,0x96),
+     o3(0xE5,0x8E,0xA0), o3(0xE5,0x8E,0xA6),
+     o3(0xE5,0x8E,0xA5), o3(0xE5,0x8E,0xAE),
+     o3(0xE5,0x8E,0xB0), o3(0xE5,0x8E,0xB6),
+     o3(0xE5,0x8F,0x83), o3(0xE7,0xB0,0x92),
+     o3(0xE9,0x9B,0x99), o3(0xE5,0x8F,0x9F),
+     o3(0xE6,0x9B,0xBC), o3(0xE7,0x87,0xAE),
+     o3(0xE5,0x8F,0xAE), o3(0xE5,0x8F,0xA8),
+     o3(0xE5,0x8F,0xAD), o3(0xE5,0x8F,0xBA),
+     o3(0xE5,0x90,0x81), o3(0xE5,0x90,0xBD),
+     o3(0xE5,0x91,0x80), o3(0xE5,0x90,0xAC),
+     o3(0xE5,0x90,0xAD), o3(0xE5,0x90,0xBC),
+     o3(0xE5,0x90,0xAE), o3(0xE5,0x90,0xB6),
+     o3(0xE5,0x90,0xA9), o3(0xE5,0x90,0x9D),
+     o3(0xE5,0x91,0x8E), o3(0xE5,0x92,0x8F),
+     o3(0xE5,0x91,0xB5), o3(0xE5,0x92,0x8E),
+     o3(0xE5,0x91,0x9F), o3(0xE5,0x91,0xB1),
+     o3(0xE5,0x91,0xB7), o3(0xE5,0x91,0xB0),
+     o3(0xE5,0x92,0x92), o3(0xE5,0x91,0xBB),
+     o3(0xE5,0x92,0x80), o3(0xE5,0x91,0xB6),
+     o3(0xE5,0x92,0x84), o3(0xE5,0x92,0x90),
+     o3(0xE5,0x92,0x86), o3(0xE5,0x93,0x87),
+     o3(0xE5,0x92,0xA2), o3(0xE5,0x92,0xB8),
+     o3(0xE5,0x92,0xA5), o3(0xE5,0x92,0xAC),
+     o3(0xE5,0x93,0x84), o3(0xE5,0x93,0x88),
+     o3(0xE5,0x92,0xA8),
+
+#define from_EUC_JP_D2 WORDINDEX2INFO(10327)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D2_infos,
+
+#define from_EUC_JP_D3_infos WORDINDEX2INFO(10329)
+                INVALID, o3(0xE5,0x92,0xAB),
+     o3(0xE5,0x93,0x82), o3(0xE5,0x92,0xA4),
+     o3(0xE5,0x92,0xBE), o3(0xE5,0x92,0xBC),
+     o3(0xE5,0x93,0x98), o3(0xE5,0x93,0xA5),
+     o3(0xE5,0x93,0xA6), o3(0xE5,0x94,0x8F),
+     o3(0xE5,0x94,0x94), o3(0xE5,0x93,0xBD),
+     o3(0xE5,0x93,0xAE), o3(0xE5,0x93,0xAD),
+     o3(0xE5,0x93,0xBA), o3(0xE5,0x93,0xA2),
+     o3(0xE5,0x94,0xB9), o3(0xE5,0x95,0x80),
+     o3(0xE5,0x95,0xA3), o3(0xE5,0x95,0x8C),
+     o3(0xE5,0x94,0xAE), o3(0xE5,0x95,0x9C),
+     o3(0xE5,0x95,0x85), o3(0xE5,0x95,0x96),
+     o3(0xE5,0x95,0x97), o3(0xE5,0x94,0xB8),
+     o3(0xE5,0x94,0xB3), o3(0xE5,0x95,0x9D),
+     o3(0xE5,0x96,0x99), o3(0xE5,0x96,0x80),
+     o3(0xE5,0x92,0xAF), o3(0xE5,0x96,0x8A),
+     o3(0xE5,0x96,0x9F), o3(0xE5,0x95,0xBB),
+     o3(0xE5,0x95,0xBE), o3(0xE5,0x96,0x98),
+     o3(0xE5,0x96,0x9E), o3(0xE5,0x96,0xAE),
+     o3(0xE5,0x95,0xBC), o3(0xE5,0x96,0x83),
+     o3(0xE5,0x96,0xA9), o3(0xE5,0x96,0x87),
+     o3(0xE5,0x96,0xA8), o3(0xE5,0x97,0x9A),
+     o3(0xE5,0x97,0x85), o3(0xE5,0x97,0x9F),
+     o3(0xE5,0x97,0x84), o3(0xE5,0x97,0x9C),
+     o3(0xE5,0x97,0xA4), o3(0xE5,0x97,0x94),
+     o3(0xE5,0x98,0x94), o3(0xE5,0x97,0xB7),
+     o3(0xE5,0x98,0x96), o3(0xE5,0x97,0xBE),
+     o3(0xE5,0x97,0xBD), o3(0xE5,0x98,0x9B),
+     o3(0xE5,0x97,0xB9), o3(0xE5,0x99,0x8E),
+     o3(0xE5,0x99,0x90), o3(0xE7,0x87,0x9F),
+     o3(0xE5,0x98,0xB4), o3(0xE5,0x98,0xB6),
+     o3(0xE5,0x98,0xB2), o3(0xE5,0x98,0xB8),
+     o3(0xE5,0x99,0xAB), o3(0xE5,0x99,0xA4),
+     o3(0xE5,0x98,0xAF), o3(0xE5,0x99,0xAC),
+     o3(0xE5,0x99,0xAA), o3(0xE5,0x9A,0x86),
+     o3(0xE5,0x9A,0x80), o3(0xE5,0x9A,0x8A),
+     o3(0xE5,0x9A,0xA0), o3(0xE5,0x9A,0x94),
+     o3(0xE5,0x9A,0x8F), o3(0xE5,0x9A,0xA5),
+     o3(0xE5,0x9A,0xAE), o3(0xE5,0x9A,0xB6),
+     o3(0xE5,0x9A,0xB4), o3(0xE5,0x9B,0x82),
+     o3(0xE5,0x9A,0xBC), o3(0xE5,0x9B,0x81),
+     o3(0xE5,0x9B,0x83), o3(0xE5,0x9B,0x80),
+     o3(0xE5,0x9B,0x88), o3(0xE5,0x9B,0x8E),
+     o3(0xE5,0x9B,0x91), o3(0xE5,0x9B,0x93),
+     o3(0xE5,0x9B,0x97), o3(0xE5,0x9B,0xAE),
+     o3(0xE5,0x9B,0xB9), o3(0xE5,0x9C,0x80),
+     o3(0xE5,0x9B,0xBF), o3(0xE5,0x9C,0x84),
+     o3(0xE5,0x9C,0x89),
+
+#define from_EUC_JP_D3 WORDINDEX2INFO(10424)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D3_infos,
+
+#define from_EUC_JP_D4_infos WORDINDEX2INFO(10426)
+                INVALID, o3(0xE5,0x9C,0x88),
+     o3(0xE5,0x9C,0x8B), o3(0xE5,0x9C,0x8D),
+     o3(0xE5,0x9C,0x93), o3(0xE5,0x9C,0x98),
+     o3(0xE5,0x9C,0x96), o3(0xE5,0x97,0x87),
+     o3(0xE5,0x9C,0x9C), o3(0xE5,0x9C,0xA6),
+     o3(0xE5,0x9C,0xB7), o3(0xE5,0x9C,0xB8),
+     o3(0xE5,0x9D,0x8E), o3(0xE5,0x9C,0xBB),
+     o3(0xE5,0x9D,0x80), o3(0xE5,0x9D,0x8F),
+     o3(0xE5,0x9D,0xA9), o3(0xE5,0x9F,0x80),
+     o3(0xE5,0x9E,0x88), o3(0xE5,0x9D,0xA1),
+     o3(0xE5,0x9D,0xBF), o3(0xE5,0x9E,0x89),
+     o3(0xE5,0x9E,0x93), o3(0xE5,0x9E,0xA0),
+     o3(0xE5,0x9E,0xB3), o3(0xE5,0x9E,0xA4),
+     o3(0xE5,0x9E,0xAA), o3(0xE5,0x9E,0xB0),
+     o3(0xE5,0x9F,0x83), o3(0xE5,0x9F,0x86),
+     o3(0xE5,0x9F,0x94), o3(0xE5,0x9F,0x92),
+     o3(0xE5,0x9F,0x93), o3(0xE5,0xA0,0x8A),
+     o3(0xE5,0x9F,0x96), o3(0xE5,0x9F,0xA3),
+     o3(0xE5,0xA0,0x8B), o3(0xE5,0xA0,0x99),
+     o3(0xE5,0xA0,0x9D), o3(0xE5,0xA1,0xB2),
+     o3(0xE5,0xA0,0xA1), o3(0xE5,0xA1,0xA2),
+     o3(0xE5,0xA1,0x8B), o3(0xE5,0xA1,0xB0),
+     o3(0xE6,0xAF,0x80), o3(0xE5,0xA1,0x92),
+     o3(0xE5,0xA0,0xBD), o3(0xE5,0xA1,0xB9),
+     o3(0xE5,0xA2,0x85), o3(0xE5,0xA2,0xB9),
+     o3(0xE5,0xA2,0x9F), o3(0xE5,0xA2,0xAB),
+     o3(0xE5,0xA2,0xBA), o3(0xE5,0xA3,0x9E),
+     o3(0xE5,0xA2,0xBB), o3(0xE5,0xA2,0xB8),
+     o3(0xE5,0xA2,0xAE), o3(0xE5,0xA3,0x85),
+     o3(0xE5,0xA3,0x93), o3(0xE5,0xA3,0x91),
+     o3(0xE5,0xA3,0x97), o3(0xE5,0xA3,0x99),
+     o3(0xE5,0xA3,0x98), o3(0xE5,0xA3,0xA5),
+     o3(0xE5,0xA3,0x9C), o3(0xE5,0xA3,0xA4),
+     o3(0xE5,0xA3,0x9F), o3(0xE5,0xA3,0xAF),
+     o3(0xE5,0xA3,0xBA), o3(0xE5,0xA3,0xB9),
+     o3(0xE5,0xA3,0xBB), o3(0xE5,0xA3,0xBC),
+     o3(0xE5,0xA3,0xBD), o3(0xE5,0xA4,0x82),
+     o3(0xE5,0xA4,0x8A), o3(0xE5,0xA4,0x90),
+     o3(0xE5,0xA4,0x9B), o3(0xE6,0xA2,0xA6),
+     o3(0xE5,0xA4,0xA5), o3(0xE5,0xA4,0xAC),
+     o3(0xE5,0xA4,0xAD), o3(0xE5,0xA4,0xB2),
+     o3(0xE5,0xA4,0xB8), o3(0xE5,0xA4,0xBE),
+     o3(0xE7,0xAB,0x92), o3(0xE5,0xA5,0x95),
+     o3(0xE5,0xA5,0x90), o3(0xE5,0xA5,0x8E),
+     o3(0xE5,0xA5,0x9A), o3(0xE5,0xA5,0x98),
+     o3(0xE5,0xA5,0xA2), o3(0xE5,0xA5,0xA0),
+     o3(0xE5,0xA5,0xA7), o3(0xE5,0xA5,0xAC),
+     o3(0xE5,0xA5,0xA9),
+
+#define from_EUC_JP_D4 WORDINDEX2INFO(10521)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D4_infos,
+
+#define from_EUC_JP_D5_infos WORDINDEX2INFO(10523)
+                INVALID, o3(0xE5,0xA5,0xB8),
+     o3(0xE5,0xA6,0x81), o3(0xE5,0xA6,0x9D),
+     o3(0xE4,0xBD,0x9E), o3(0xE4,0xBE,0xAB),
+     o3(0xE5,0xA6,0xA3), o3(0xE5,0xA6,0xB2),
+     o3(0xE5,0xA7,0x86), o3(0xE5,0xA7,0xA8),
+     o3(0xE5,0xA7,0x9C), o3(0xE5,0xA6,0x8D),
+     o3(0xE5,0xA7,0x99), o3(0xE5,0xA7,0x9A),
+     o3(0xE5,0xA8,0xA5), o3(0xE5,0xA8,0x9F),
+     o3(0xE5,0xA8,0x91), o3(0xE5,0xA8,0x9C),
+     o3(0xE5,0xA8,0x89), o3(0xE5,0xA8,0x9A),
+     o3(0xE5,0xA9,0x80), o3(0xE5,0xA9,0xAC),
+     o3(0xE5,0xA9,0x89), o3(0xE5,0xA8,0xB5),
+     o3(0xE5,0xA8,0xB6), o3(0xE5,0xA9,0xA2),
+     o3(0xE5,0xA9,0xAA), o3(0xE5,0xAA,0x9A),
+     o3(0xE5,0xAA,0xBC), o3(0xE5,0xAA,0xBE),
+     o3(0xE5,0xAB,0x8B), o3(0xE5,0xAB,0x82),
+     o3(0xE5,0xAA,0xBD), o3(0xE5,0xAB,0xA3),
+     o3(0xE5,0xAB,0x97), o3(0xE5,0xAB,0xA6),
+     o3(0xE5,0xAB,0xA9), o3(0xE5,0xAB,0x96),
+     o3(0xE5,0xAB,0xBA), o3(0xE5,0xAB,0xBB),
+     o3(0xE5,0xAC,0x8C), o3(0xE5,0xAC,0x8B),
+     o3(0xE5,0xAC,0x96), o3(0xE5,0xAC,0xB2),
+     o3(0xE5,0xAB,0x90), o3(0xE5,0xAC,0xAA),
+     o3(0xE5,0xAC,0xB6), o3(0xE5,0xAC,0xBE),
+     o3(0xE5,0xAD,0x83), o3(0xE5,0xAD,0x85),
+     o3(0xE5,0xAD,0x80), o3(0xE5,0xAD,0x91),
+     o3(0xE5,0xAD,0x95), o3(0xE5,0xAD,0x9A),
+     o3(0xE5,0xAD,0x9B), o3(0xE5,0xAD,0xA5),
+     o3(0xE5,0xAD,0xA9), o3(0xE5,0xAD,0xB0),
+     o3(0xE5,0xAD,0xB3), o3(0xE5,0xAD,0xB5),
+     o3(0xE5,0xAD,0xB8), o3(0xE6,0x96,0x88),
+     o3(0xE5,0xAD,0xBA), o3(0xE5,0xAE,0x80),
+     o3(0xE5,0xAE,0x83), o3(0xE5,0xAE,0xA6),
+     o3(0xE5,0xAE,0xB8), o3(0xE5,0xAF,0x83),
+     o3(0xE5,0xAF,0x87), o3(0xE5,0xAF,0x89),
+     o3(0xE5,0xAF,0x94), o3(0xE5,0xAF,0x90),
+     o3(0xE5,0xAF,0xA4), o3(0xE5,0xAF,0xA6),
+     o3(0xE5,0xAF,0xA2), o3(0xE5,0xAF,0x9E),
+     o3(0xE5,0xAF,0xA5), o3(0xE5,0xAF,0xAB),
+     o3(0xE5,0xAF,0xB0), o3(0xE5,0xAF,0xB6),
+     o3(0xE5,0xAF,0xB3), o3(0xE5,0xB0,0x85),
+     o3(0xE5,0xB0,0x87), o3(0xE5,0xB0,0x88),
+     o3(0xE5,0xB0,0x8D), o3(0xE5,0xB0,0x93),
+     o3(0xE5,0xB0,0xA0), o3(0xE5,0xB0,0xA2),
+     o3(0xE5,0xB0,0xA8), o3(0xE5,0xB0,0xB8),
+     o3(0xE5,0xB0,0xB9), o3(0xE5,0xB1,0x81),
+     o3(0xE5,0xB1,0x86), o3(0xE5,0xB1,0x8E),
+     o3(0xE5,0xB1,0x93),
+
+#define from_EUC_JP_D5 WORDINDEX2INFO(10618)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D5_infos,
+
+#define from_EUC_JP_D6_infos WORDINDEX2INFO(10620)
+                INVALID, o3(0xE5,0xB1,0x90),
+     o3(0xE5,0xB1,0x8F), o3(0xE5,0xAD,0xB1),
+     o3(0xE5,0xB1,0xAC), o3(0xE5,0xB1,0xAE),
+     o3(0xE4,0xB9,0xA2), o3(0xE5,0xB1,0xB6),
+     o3(0xE5,0xB1,0xB9), o3(0xE5,0xB2,0x8C),
+     o3(0xE5,0xB2,0x91), o3(0xE5,0xB2,0x94),
+     o3(0xE5,0xA6,0x9B), o3(0xE5,0xB2,0xAB),
+     o3(0xE5,0xB2,0xBB), o3(0xE5,0xB2,0xB6),
+     o3(0xE5,0xB2,0xBC), o3(0xE5,0xB2,0xB7),
+     o3(0xE5,0xB3,0x85), o3(0xE5,0xB2,0xBE),
+     o3(0xE5,0xB3,0x87), o3(0xE5,0xB3,0x99),
+     o3(0xE5,0xB3,0xA9), o3(0xE5,0xB3,0xBD),
+     o3(0xE5,0xB3,0xBA), o3(0xE5,0xB3,0xAD),
+     o3(0xE5,0xB6,0x8C), o3(0xE5,0xB3,0xAA),
+     o3(0xE5,0xB4,0x8B), o3(0xE5,0xB4,0x95),
+     o3(0xE5,0xB4,0x97), o3(0xE5,0xB5,0x9C),
+     o3(0xE5,0xB4,0x9F), o3(0xE5,0xB4,0x9B),
+     o3(0xE5,0xB4,0x91), o3(0xE5,0xB4,0x94),
+     o3(0xE5,0xB4,0xA2), o3(0xE5,0xB4,0x9A),
+     o3(0xE5,0xB4,0x99), o3(0xE5,0xB4,0x98),
+     o3(0xE5,0xB5,0x8C), o3(0xE5,0xB5,0x92),
+     o3(0xE5,0xB5,0x8E), o3(0xE5,0xB5,0x8B),
+     o3(0xE5,0xB5,0xAC), o3(0xE5,0xB5,0xB3),
+     o3(0xE5,0xB5,0xB6), o3(0xE5,0xB6,0x87),
+     o3(0xE5,0xB6,0x84), o3(0xE5,0xB6,0x82),
+     o3(0xE5,0xB6,0xA2), o3(0xE5,0xB6,0x9D),
+     o3(0xE5,0xB6,0xAC), o3(0xE5,0xB6,0xAE),
+     o3(0xE5,0xB6,0xBD), o3(0xE5,0xB6,0x90),
+     o3(0xE5,0xB6,0xB7), o3(0xE5,0xB6,0xBC),
+     o3(0xE5,0xB7,0x89), o3(0xE5,0xB7,0x8D),
+     o3(0xE5,0xB7,0x93), o3(0xE5,0xB7,0x92),
+     o3(0xE5,0xB7,0x96), o3(0xE5,0xB7,0x9B),
+     o3(0xE5,0xB7,0xAB), o3(0xE5,0xB7,0xB2),
+     o3(0xE5,0xB7,0xB5), o3(0xE5,0xB8,0x8B),
+     o3(0xE5,0xB8,0x9A), o3(0xE5,0xB8,0x99),
+     o3(0xE5,0xB8,0x91), o3(0xE5,0xB8,0x9B),
+     o3(0xE5,0xB8,0xB6), o3(0xE5,0xB8,0xB7),
+     o3(0xE5,0xB9,0x84), o3(0xE5,0xB9,0x83),
+     o3(0xE5,0xB9,0x80), o3(0xE5,0xB9,0x8E),
+     o3(0xE5,0xB9,0x97), o3(0xE5,0xB9,0x94),
+     o3(0xE5,0xB9,0x9F), o3(0xE5,0xB9,0xA2),
+     o3(0xE5,0xB9,0xA4), o3(0xE5,0xB9,0x87),
+     o3(0xE5,0xB9,0xB5), o3(0xE5,0xB9,0xB6),
+     o3(0xE5,0xB9,0xBA), o3(0xE9,0xBA,0xBC),
+     o3(0xE5,0xB9,0xBF), o3(0xE5,0xBA,0xA0),
+     o3(0xE5,0xBB,0x81), o3(0xE5,0xBB,0x82),
+     o3(0xE5,0xBB,0x88), o3(0xE5,0xBB,0x90),
+     o3(0xE5,0xBB,0x8F),
+
+#define from_EUC_JP_D6 WORDINDEX2INFO(10715)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D6_infos,
+
+#define from_EUC_JP_D7_infos WORDINDEX2INFO(10717)
+                INVALID, o3(0xE5,0xBB,0x96),
+     o3(0xE5,0xBB,0xA3), o3(0xE5,0xBB,0x9D),
+     o3(0xE5,0xBB,0x9A), o3(0xE5,0xBB,0x9B),
+     o3(0xE5,0xBB,0xA2), o3(0xE5,0xBB,0xA1),
+     o3(0xE5,0xBB,0xA8), o3(0xE5,0xBB,0xA9),
+     o3(0xE5,0xBB,0xAC), o3(0xE5,0xBB,0xB1),
+     o3(0xE5,0xBB,0xB3), o3(0xE5,0xBB,0xB0),
+     o3(0xE5,0xBB,0xB4), o3(0xE5,0xBB,0xB8),
+     o3(0xE5,0xBB,0xBE), o3(0xE5,0xBC,0x83),
+     o3(0xE5,0xBC,0x89), o3(0xE5,0xBD,0x9D),
+     o3(0xE5,0xBD,0x9C), o3(0xE5,0xBC,0x8B),
+     o3(0xE5,0xBC,0x91), o3(0xE5,0xBC,0x96),
+     o3(0xE5,0xBC,0xA9), o3(0xE5,0xBC,0xAD),
+     o3(0xE5,0xBC,0xB8), o3(0xE5,0xBD,0x81),
+     o3(0xE5,0xBD,0x88), o3(0xE5,0xBD,0x8C),
+     o3(0xE5,0xBD,0x8E), o3(0xE5,0xBC,0xAF),
+     o3(0xE5,0xBD,0x91), o3(0xE5,0xBD,0x96),
+     o3(0xE5,0xBD,0x97), o3(0xE5,0xBD,0x99),
+     o3(0xE5,0xBD,0xA1), o3(0xE5,0xBD,0xAD),
+     o3(0xE5,0xBD,0xB3), o3(0xE5,0xBD,0xB7),
+     o3(0xE5,0xBE,0x83), o3(0xE5,0xBE,0x82),
+     o3(0xE5,0xBD,0xBF), o3(0xE5,0xBE,0x8A),
+     o3(0xE5,0xBE,0x88), o3(0xE5,0xBE,0x91),
+     o3(0xE5,0xBE,0x87), o3(0xE5,0xBE,0x9E),
+     o3(0xE5,0xBE,0x99), o3(0xE5,0xBE,0x98),
+     o3(0xE5,0xBE,0xA0), o3(0xE5,0xBE,0xA8),
+     o3(0xE5,0xBE,0xAD), o3(0xE5,0xBE,0xBC),
+     o3(0xE5,0xBF,0x96), o3(0xE5,0xBF,0xBB),
+     o3(0xE5,0xBF,0xA4), o3(0xE5,0xBF,0xB8),
+     o3(0xE5,0xBF,0xB1), o3(0xE5,0xBF,0x9D),
+     o3(0xE6,0x82,0xB3), o3(0xE5,0xBF,0xBF),
+     o3(0xE6,0x80,0xA1), o3(0xE6,0x81,0xA0),
+     o3(0xE6,0x80,0x99), o3(0xE6,0x80,0x90),
+     o3(0xE6,0x80,0xA9), o3(0xE6,0x80,0x8E),
+     o3(0xE6,0x80,0xB1), o3(0xE6,0x80,0x9B),
+     o3(0xE6,0x80,0x95), o3(0xE6,0x80,0xAB),
+     o3(0xE6,0x80,0xA6), o3(0xE6,0x80,0x8F),
+     o3(0xE6,0x80,0xBA), o3(0xE6,0x81,0x9A),
+     o3(0xE6,0x81,0x81), o3(0xE6,0x81,0xAA),
+     o3(0xE6,0x81,0xB7), o3(0xE6,0x81,0x9F),
+     o3(0xE6,0x81,0x8A), o3(0xE6,0x81,0x86),
+     o3(0xE6,0x81,0x8D), o3(0xE6,0x81,0xA3),
+     o3(0xE6,0x81,0x83), o3(0xE6,0x81,0xA4),
+     o3(0xE6,0x81,0x82), o3(0xE6,0x81,0xAC),
+     o3(0xE6,0x81,0xAB), o3(0xE6,0x81,0x99),
+     o3(0xE6,0x82,0x81), o3(0xE6,0x82,0x8D),
+     o3(0xE6,0x83,0xA7), o3(0xE6,0x82,0x83),
+     o3(0xE6,0x82,0x9A),
+
+#define from_EUC_JP_D7 WORDINDEX2INFO(10812)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D7_infos,
+
+#define from_EUC_JP_D8_infos WORDINDEX2INFO(10814)
+                INVALID, o3(0xE6,0x82,0x84),
+     o3(0xE6,0x82,0x9B), o3(0xE6,0x82,0x96),
+     o3(0xE6,0x82,0x97), o3(0xE6,0x82,0x92),
+     o3(0xE6,0x82,0xA7), o3(0xE6,0x82,0x8B),
+     o3(0xE6,0x83,0xA1), o3(0xE6,0x82,0xB8),
+     o3(0xE6,0x83,0xA0), o3(0xE6,0x83,0x93),
+     o3(0xE6,0x82,0xB4), o3(0xE5,0xBF,0xB0),
+     o3(0xE6,0x82,0xBD), o3(0xE6,0x83,0x86),
+     o3(0xE6,0x82,0xB5), o3(0xE6,0x83,0x98),
+     o3(0xE6,0x85,0x8D), o3(0xE6,0x84,0x95),
+     o3(0xE6,0x84,0x86), o3(0xE6,0x83,0xB6),
+     o3(0xE6,0x83,0xB7), o3(0xE6,0x84,0x80),
+     o3(0xE6,0x83,0xB4), o3(0xE6,0x83,0xBA),
+     o3(0xE6,0x84,0x83), o3(0xE6,0x84,0xA1),
+     o3(0xE6,0x83,0xBB), o3(0xE6,0x83,0xB1),
+     o3(0xE6,0x84,0x8D), o3(0xE6,0x84,0x8E),
+     o3(0xE6,0x85,0x87), o3(0xE6,0x84,0xBE),
+     o3(0xE6,0x84,0xA8), o3(0xE6,0x84,0xA7),
+     o3(0xE6,0x85,0x8A), o3(0xE6,0x84,0xBF),
+     o3(0xE6,0x84,0xBC), o3(0xE6,0x84,0xAC),
+     o3(0xE6,0x84,0xB4), o3(0xE6,0x84,0xBD),
+     o3(0xE6,0x85,0x82), o3(0xE6,0x85,0x84),
+     o3(0xE6,0x85,0xB3), o3(0xE6,0x85,0xB7),
+     o3(0xE6,0x85,0x98), o3(0xE6,0x85,0x99),
+     o3(0xE6,0x85,0x9A), o3(0xE6,0x85,0xAB),
+     o3(0xE6,0x85,0xB4), o3(0xE6,0x85,0xAF),
+     o3(0xE6,0x85,0xA5), o3(0xE6,0x85,0xB1),
+     o3(0xE6,0x85,0x9F), o3(0xE6,0x85,0x9D),
+     o3(0xE6,0x85,0x93), o3(0xE6,0x85,0xB5),
+     o3(0xE6,0x86,0x99), o3(0xE6,0x86,0x96),
+     o3(0xE6,0x86,0x87), o3(0xE6,0x86,0xAC),
+     o3(0xE6,0x86,0x94), o3(0xE6,0x86,0x9A),
+     o3(0xE6,0x86,0x8A), o3(0xE6,0x86,0x91),
+     o3(0xE6,0x86,0xAB), o3(0xE6,0x86,0xAE),
+     o3(0xE6,0x87,0x8C), o3(0xE6,0x87,0x8A),
+     o3(0xE6,0x87,0x89), o3(0xE6,0x87,0xB7),
+     o3(0xE6,0x87,0x88), o3(0xE6,0x87,0x83),
+     o3(0xE6,0x87,0x86), o3(0xE6,0x86,0xBA),
+     o3(0xE6,0x87,0x8B), o3(0xE7,0xBD,0xB9),
+     o3(0xE6,0x87,0x8D), o3(0xE6,0x87,0xA6),
+     o3(0xE6,0x87,0xA3), o3(0xE6,0x87,0xB6),
+     o3(0xE6,0x87,0xBA), o3(0xE6,0x87,0xB4),
+     o3(0xE6,0x87,0xBF), o3(0xE6,0x87,0xBD),
+     o3(0xE6,0x87,0xBC), o3(0xE6,0x87,0xBE),
+     o3(0xE6,0x88,0x80), o3(0xE6,0x88,0x88),
+     o3(0xE6,0x88,0x89), o3(0xE6,0x88,0x8D),
+     o3(0xE6,0x88,0x8C), o3(0xE6,0x88,0x94),
+     o3(0xE6,0x88,0x9B),
+
+#define from_EUC_JP_D8 WORDINDEX2INFO(10909)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D8_infos,
+
+#define from_EUC_JP_D9_infos WORDINDEX2INFO(10911)
+                INVALID, o3(0xE6,0x88,0x9E),
+     o3(0xE6,0x88,0xA1), o3(0xE6,0x88,0xAA),
+     o3(0xE6,0x88,0xAE), o3(0xE6,0x88,0xB0),
+     o3(0xE6,0x88,0xB2), o3(0xE6,0x88,0xB3),
+     o3(0xE6,0x89,0x81), o3(0xE6,0x89,0x8E),
+     o3(0xE6,0x89,0x9E), o3(0xE6,0x89,0xA3),
+     o3(0xE6,0x89,0x9B), o3(0xE6,0x89,0xA0),
+     o3(0xE6,0x89,0xA8), o3(0xE6,0x89,0xBC),
+     o3(0xE6,0x8A,0x82), o3(0xE6,0x8A,0x89),
+     o3(0xE6,0x89,0xBE), o3(0xE6,0x8A,0x92),
+     o3(0xE6,0x8A,0x93), o3(0xE6,0x8A,0x96),
+     o3(0xE6,0x8B,0x94), o3(0xE6,0x8A,0x83),
+     o3(0xE6,0x8A,0x94), o3(0xE6,0x8B,0x97),
+     o3(0xE6,0x8B,0x91), o3(0xE6,0x8A,0xBB),
+     o3(0xE6,0x8B,0x8F), o3(0xE6,0x8B,0xBF),
+     o3(0xE6,0x8B,0x86), o3(0xE6,0x93,0x94),
+     o3(0xE6,0x8B,0x88), o3(0xE6,0x8B,0x9C),
+     o3(0xE6,0x8B,0x8C), o3(0xE6,0x8B,0x8A),
+     o3(0xE6,0x8B,0x82), o3(0xE6,0x8B,0x87),
+     o3(0xE6,0x8A,0x9B), o3(0xE6,0x8B,0x89),
+     o3(0xE6,0x8C,0x8C), o3(0xE6,0x8B,0xAE),
+     o3(0xE6,0x8B,0xB1), o3(0xE6,0x8C,0xA7),
+     o3(0xE6,0x8C,0x82), o3(0xE6,0x8C,0x88),
+     o3(0xE6,0x8B,0xAF), o3(0xE6,0x8B,0xB5),
+     o3(0xE6,0x8D,0x90), o3(0xE6,0x8C,0xBE),
+     o3(0xE6,0x8D,0x8D), o3(0xE6,0x90,0x9C),
+     o3(0xE6,0x8D,0x8F), o3(0xE6,0x8E,0x96),
+     o3(0xE6,0x8E,0x8E), o3(0xE6,0x8E,0x80),
+     o3(0xE6,0x8E,0xAB), o3(0xE6,0x8D,0xB6),
+     o3(0xE6,0x8E,0xA3), o3(0xE6,0x8E,0x8F),
+     o3(0xE6,0x8E,0x89), o3(0xE6,0x8E,0x9F),
+     o3(0xE6,0x8E,0xB5), o3(0xE6,0x8D,0xAB),
+     o3(0xE6,0x8D,0xA9), o3(0xE6,0x8E,0xBE),
+     o3(0xE6,0x8F,0xA9), o3(0xE6,0x8F,0x80),
+     o3(0xE6,0x8F,0x86), o3(0xE6,0x8F,0xA3),
+     o3(0xE6,0x8F,0x89), o3(0xE6,0x8F,0x92),
+     o3(0xE6,0x8F,0xB6), o3(0xE6,0x8F,0x84),
+     o3(0xE6,0x90,0x96), o3(0xE6,0x90,0xB4),
+     o3(0xE6,0x90,0x86), o3(0xE6,0x90,0x93),
+     o3(0xE6,0x90,0xA6), o3(0xE6,0x90,0xB6),
+     o3(0xE6,0x94,0x9D), o3(0xE6,0x90,0x97),
+     o3(0xE6,0x90,0xA8), o3(0xE6,0x90,0x8F),
+     o3(0xE6,0x91,0xA7), o3(0xE6,0x91,0xAF),
+     o3(0xE6,0x91,0xB6), o3(0xE6,0x91,0x8E),
+     o3(0xE6,0x94,0xAA), o3(0xE6,0x92,0x95),
+     o3(0xE6,0x92,0x93), o3(0xE6,0x92,0xA5),
+     o3(0xE6,0x92,0xA9), o3(0xE6,0x92,0x88),
+     o3(0xE6,0x92,0xBC),
+
+#define from_EUC_JP_D9 WORDINDEX2INFO(11006)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_D9_infos,
+
+#define from_EUC_JP_DA_infos WORDINDEX2INFO(11008)
+                INVALID, o3(0xE6,0x93,0x9A),
+     o3(0xE6,0x93,0x92), o3(0xE6,0x93,0x85),
+     o3(0xE6,0x93,0x87), o3(0xE6,0x92,0xBB),
+     o3(0xE6,0x93,0x98), o3(0xE6,0x93,0x82),
+     o3(0xE6,0x93,0xB1), o3(0xE6,0x93,0xA7),
+     o3(0xE8,0x88,0x89), o3(0xE6,0x93,0xA0),
+     o3(0xE6,0x93,0xA1), o3(0xE6,0x8A,0xAC),
+     o3(0xE6,0x93,0xA3), o3(0xE6,0x93,0xAF),
+     o3(0xE6,0x94,0xAC), o3(0xE6,0x93,0xB6),
+     o3(0xE6,0x93,0xB4), o3(0xE6,0x93,0xB2),
+     o3(0xE6,0x93,0xBA), o3(0xE6,0x94,0x80),
+     o3(0xE6,0x93,0xBD), o3(0xE6,0x94,0x98),
+     o3(0xE6,0x94,0x9C), o3(0xE6,0x94,0x85),
+     o3(0xE6,0x94,0xA4), o3(0xE6,0x94,0xA3),
+     o3(0xE6,0x94,0xAB), o3(0xE6,0x94,0xB4),
+     o3(0xE6,0x94,0xB5), o3(0xE6,0x94,0xB7),
+     o3(0xE6,0x94,0xB6), o3(0xE6,0x94,0xB8),
+     o3(0xE7,0x95,0x8B), o3(0xE6,0x95,0x88),
+     o3(0xE6,0x95,0x96), o3(0xE6,0x95,0x95),
+     o3(0xE6,0x95,0x8D), o3(0xE6,0x95,0x98),
+     o3(0xE6,0x95,0x9E), o3(0xE6,0x95,0x9D),
+     o3(0xE6,0x95,0xB2), o3(0xE6,0x95,0xB8),
+     o3(0xE6,0x96,0x82), o3(0xE6,0x96,0x83),
+     o3(0xE8,0xAE,0x8A), o3(0xE6,0x96,0x9B),
+     o3(0xE6,0x96,0x9F), o3(0xE6,0x96,0xAB),
+     o3(0xE6,0x96,0xB7), o3(0xE6,0x97,0x83),
+     o3(0xE6,0x97,0x86), o3(0xE6,0x97,0x81),
+     o3(0xE6,0x97,0x84), o3(0xE6,0x97,0x8C),
+     o3(0xE6,0x97,0x92), o3(0xE6,0x97,0x9B),
+     o3(0xE6,0x97,0x99), o3(0xE6,0x97,0xA0),
+     o3(0xE6,0x97,0xA1), o3(0xE6,0x97,0xB1),
+     o3(0xE6,0x9D,0xB2), o3(0xE6,0x98,0x8A),
+     o3(0xE6,0x98,0x83), o3(0xE6,0x97,0xBB),
+     o3(0xE6,0x9D,0xB3), o3(0xE6,0x98,0xB5),
+     o3(0xE6,0x98,0xB6), o3(0xE6,0x98,0xB4),
+     o3(0xE6,0x98,0x9C), o3(0xE6,0x99,0x8F),
+     o3(0xE6,0x99,0x84), o3(0xE6,0x99,0x89),
+     o3(0xE6,0x99,0x81), o3(0xE6,0x99,0x9E),
+     o3(0xE6,0x99,0x9D), o3(0xE6,0x99,0xA4),
+     o3(0xE6,0x99,0xA7), o3(0xE6,0x99,0xA8),
+     o3(0xE6,0x99,0x9F), o3(0xE6,0x99,0xA2),
+     o3(0xE6,0x99,0xB0), o3(0xE6,0x9A,0x83),
+     o3(0xE6,0x9A,0x88), o3(0xE6,0x9A,0x8E),
+     o3(0xE6,0x9A,0x89), o3(0xE6,0x9A,0x84),
+     o3(0xE6,0x9A,0x98), o3(0xE6,0x9A,0x9D),
+     o3(0xE6,0x9B,0x81), o3(0xE6,0x9A,0xB9),
+     o3(0xE6,0x9B,0x89), o3(0xE6,0x9A,0xBE),
+     o3(0xE6,0x9A,0xBC),
+
+#define from_EUC_JP_DA WORDINDEX2INFO(11103)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DA_infos,
+
+#define from_EUC_JP_DB_infos WORDINDEX2INFO(11105)
+                INVALID, o3(0xE6,0x9B,0x84),
+     o3(0xE6,0x9A,0xB8), o3(0xE6,0x9B,0x96),
+     o3(0xE6,0x9B,0x9A), o3(0xE6,0x9B,0xA0),
+     o3(0xE6,0x98,0xBF), o3(0xE6,0x9B,0xA6),
+     o3(0xE6,0x9B,0xA9), o3(0xE6,0x9B,0xB0),
+     o3(0xE6,0x9B,0xB5), o3(0xE6,0x9B,0xB7),
+     o3(0xE6,0x9C,0x8F), o3(0xE6,0x9C,0x96),
+     o3(0xE6,0x9C,0x9E), o3(0xE6,0x9C,0xA6),
+     o3(0xE6,0x9C,0xA7), o3(0xE9,0x9C,0xB8),
+     o3(0xE6,0x9C,0xAE), o3(0xE6,0x9C,0xBF),
+     o3(0xE6,0x9C,0xB6), o3(0xE6,0x9D,0x81),
+     o3(0xE6,0x9C,0xB8), o3(0xE6,0x9C,0xB7),
+     o3(0xE6,0x9D,0x86), o3(0xE6,0x9D,0x9E),
+     o3(0xE6,0x9D,0xA0), o3(0xE6,0x9D,0x99),
+     o3(0xE6,0x9D,0xA3), o3(0xE6,0x9D,0xA4),
+     o3(0xE6,0x9E,0x89), o3(0xE6,0x9D,0xB0),
+     o3(0xE6,0x9E,0xA9), o3(0xE6,0x9D,0xBC),
+     o3(0xE6,0x9D,0xAA), o3(0xE6,0x9E,0x8C),
+     o3(0xE6,0x9E,0x8B), o3(0xE6,0x9E,0xA6),
+     o3(0xE6,0x9E,0xA1), o3(0xE6,0x9E,0x85),
+     o3(0xE6,0x9E,0xB7), o3(0xE6,0x9F,0xAF),
+     o3(0xE6,0x9E,0xB4), o3(0xE6,0x9F,0xAC),
+     o3(0xE6,0x9E,0xB3), o3(0xE6,0x9F,0xA9),
+     o3(0xE6,0x9E,0xB8), o3(0xE6,0x9F,0xA4),
+     o3(0xE6,0x9F,0x9E), o3(0xE6,0x9F,0x9D),
+     o3(0xE6,0x9F,0xA2), o3(0xE6,0x9F,0xAE),
+     o3(0xE6,0x9E,0xB9), o3(0xE6,0x9F,0x8E),
+     o3(0xE6,0x9F,0x86), o3(0xE6,0x9F,0xA7),
+     o3(0xE6,0xAA,0x9C), o3(0xE6,0xA0,0x9E),
+     o3(0xE6,0xA1,0x86), o3(0xE6,0xA0,0xA9),
+     o3(0xE6,0xA1,0x80), o3(0xE6,0xA1,0x8D),
+     o3(0xE6,0xA0,0xB2), o3(0xE6,0xA1,0x8E),
+     o3(0xE6,0xA2,0xB3), o3(0xE6,0xA0,0xAB),
+     o3(0xE6,0xA1,0x99), o3(0xE6,0xA1,0xA3),
+     o3(0xE6,0xA1,0xB7), o3(0xE6,0xA1,0xBF),
+     o3(0xE6,0xA2,0x9F), o3(0xE6,0xA2,0x8F),
+     o3(0xE6,0xA2,0xAD), o3(0xE6,0xA2,0x94),
+     o3(0xE6,0xA2,0x9D), o3(0xE6,0xA2,0x9B),
+     o3(0xE6,0xA2,0x83), o3(0xE6,0xAA,0xAE),
+     o3(0xE6,0xA2,0xB9), o3(0xE6,0xA1,0xB4),
+     o3(0xE6,0xA2,0xB5), o3(0xE6,0xA2,0xA0),
+     o3(0xE6,0xA2,0xBA), o3(0xE6,0xA4,0x8F),
+     o3(0xE6,0xA2,0x8D), o3(0xE6,0xA1,0xBE),
+     o3(0xE6,0xA4,0x81), o3(0xE6,0xA3,0x8A),
+     o3(0xE6,0xA4,0x88), o3(0xE6,0xA3,0x98),
+     o3(0xE6,0xA4,0xA2), o3(0xE6,0xA4,0xA6),
+     o3(0xE6,0xA3,0xA1), o3(0xE6,0xA4,0x8C),
+     o3(0xE6,0xA3,0x8D),
+
+#define from_EUC_JP_DB WORDINDEX2INFO(11200)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DB_infos,
+
+#define from_EUC_JP_DC_infos WORDINDEX2INFO(11202)
+                INVALID, o3(0xE6,0xA3,0x94),
+     o3(0xE6,0xA3,0xA7), o3(0xE6,0xA3,0x95),
+     o3(0xE6,0xA4,0xB6), o3(0xE6,0xA4,0x92),
+     o3(0xE6,0xA4,0x84), o3(0xE6,0xA3,0x97),
+     o3(0xE6,0xA3,0xA3), o3(0xE6,0xA4,0xA5),
+     o3(0xE6,0xA3,0xB9), o3(0xE6,0xA3,0xA0),
+     o3(0xE6,0xA3,0xAF), o3(0xE6,0xA4,0xA8),
+     o3(0xE6,0xA4,0xAA), o3(0xE6,0xA4,0x9A),
+     o3(0xE6,0xA4,0xA3), o3(0xE6,0xA4,0xA1),
+     o3(0xE6,0xA3,0x86), o3(0xE6,0xA5,0xB9),
+     o3(0xE6,0xA5,0xB7), o3(0xE6,0xA5,0x9C),
+     o3(0xE6,0xA5,0xB8), o3(0xE6,0xA5,0xAB),
+     o3(0xE6,0xA5,0x94), o3(0xE6,0xA5,0xBE),
+     o3(0xE6,0xA5,0xAE), o3(0xE6,0xA4,0xB9),
+     o3(0xE6,0xA5,0xB4), o3(0xE6,0xA4,0xBD),
+     o3(0xE6,0xA5,0x99), o3(0xE6,0xA4,0xB0),
+     o3(0xE6,0xA5,0xA1), o3(0xE6,0xA5,0x9E),
+     o3(0xE6,0xA5,0x9D), o3(0xE6,0xA6,0x81),
+     o3(0xE6,0xA5,0xAA), o3(0xE6,0xA6,0xB2),
+     o3(0xE6,0xA6,0xAE), o3(0xE6,0xA7,0x90),
+     o3(0xE6,0xA6,0xBF), o3(0xE6,0xA7,0x81),
+     o3(0xE6,0xA7,0x93), o3(0xE6,0xA6,0xBE),
+     o3(0xE6,0xA7,0x8E), o3(0xE5,0xAF,0xA8),
+     o3(0xE6,0xA7,0x8A), o3(0xE6,0xA7,0x9D),
+     o3(0xE6,0xA6,0xBB), o3(0xE6,0xA7,0x83),
+     o3(0xE6,0xA6,0xA7), o3(0xE6,0xA8,0xAE),
+     o3(0xE6,0xA6,0x91), o3(0xE6,0xA6,0xA0),
+     o3(0xE6,0xA6,0x9C), o3(0xE6,0xA6,0x95),
+     o3(0xE6,0xA6,0xB4), o3(0xE6,0xA7,0x9E),
+     o3(0xE6,0xA7,0xA8), o3(0xE6,0xA8,0x82),
+     o3(0xE6,0xA8,0x9B), o3(0xE6,0xA7,0xBF),
+     o3(0xE6,0xAC,0x8A), o3(0xE6,0xA7,0xB9),
+     o3(0xE6,0xA7,0xB2), o3(0xE6,0xA7,0xA7),
+     o3(0xE6,0xA8,0x85), o3(0xE6,0xA6,0xB1),
+     o3(0xE6,0xA8,0x9E), o3(0xE6,0xA7,0xAD),
+     o3(0xE6,0xA8,0x94), o3(0xE6,0xA7,0xAB),
+     o3(0xE6,0xA8,0x8A), o3(0xE6,0xA8,0x92),
+     o3(0xE6,0xAB,0x81), o3(0xE6,0xA8,0xA3),
+     o3(0xE6,0xA8,0x93), o3(0xE6,0xA9,0x84),
+     o3(0xE6,0xA8,0x8C), o3(0xE6,0xA9,0xB2),
+     o3(0xE6,0xA8,0xB6), o3(0xE6,0xA9,0xB8),
+     o3(0xE6,0xA9,0x87), o3(0xE6,0xA9,0xA2),
+     o3(0xE6,0xA9,0x99), o3(0xE6,0xA9,0xA6),
+     o3(0xE6,0xA9,0x88), o3(0xE6,0xA8,0xB8),
+     o3(0xE6,0xA8,0xA2), o3(0xE6,0xAA,0x90),
+     o3(0xE6,0xAA,0x8D), o3(0xE6,0xAA,0xA0),
+     o3(0xE6,0xAA,0x84), o3(0xE6,0xAA,0xA2),
+     o3(0xE6,0xAA,0xA3),
+
+#define from_EUC_JP_DC WORDINDEX2INFO(11297)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DC_infos,
+
+#define from_EUC_JP_DD_infos WORDINDEX2INFO(11299)
+                INVALID, o3(0xE6,0xAA,0x97),
+     o3(0xE8,0x98,0x97), o3(0xE6,0xAA,0xBB),
+     o3(0xE6,0xAB,0x83), o3(0xE6,0xAB,0x82),
+     o3(0xE6,0xAA,0xB8), o3(0xE6,0xAA,0xB3),
+     o3(0xE6,0xAA,0xAC), o3(0xE6,0xAB,0x9E),
+     o3(0xE6,0xAB,0x91), o3(0xE6,0xAB,0x9F),
+     o3(0xE6,0xAA,0xAA), o3(0xE6,0xAB,0x9A),
+     o3(0xE6,0xAB,0xAA), o3(0xE6,0xAB,0xBB),
+     o3(0xE6,0xAC,0x85), o3(0xE8,0x98,0x96),
+     o3(0xE6,0xAB,0xBA), o3(0xE6,0xAC,0x92),
+     o3(0xE6,0xAC,0x96), o3(0xE9,0xAC,0xB1),
+     o3(0xE6,0xAC,0x9F), o3(0xE6,0xAC,0xB8),
+     o3(0xE6,0xAC,0xB7), o3(0xE7,0x9B,0x9C),
+     o3(0xE6,0xAC,0xB9), o3(0xE9,0xA3,0xAE),
+     o3(0xE6,0xAD,0x87), o3(0xE6,0xAD,0x83),
+     o3(0xE6,0xAD,0x89), o3(0xE6,0xAD,0x90),
+     o3(0xE6,0xAD,0x99), o3(0xE6,0xAD,0x94),
+     o3(0xE6,0xAD,0x9B), o3(0xE6,0xAD,0x9F),
+     o3(0xE6,0xAD,0xA1), o3(0xE6,0xAD,0xB8),
+     o3(0xE6,0xAD,0xB9), o3(0xE6,0xAD,0xBF),
+     o3(0xE6,0xAE,0x80), o3(0xE6,0xAE,0x84),
+     o3(0xE6,0xAE,0x83), o3(0xE6,0xAE,0x8D),
+     o3(0xE6,0xAE,0x98), o3(0xE6,0xAE,0x95),
+     o3(0xE6,0xAE,0x9E), o3(0xE6,0xAE,0xA4),
+     o3(0xE6,0xAE,0xAA), o3(0xE6,0xAE,0xAB),
+     o3(0xE6,0xAE,0xAF), o3(0xE6,0xAE,0xB2),
+     o3(0xE6,0xAE,0xB1), o3(0xE6,0xAE,0xB3),
+     o3(0xE6,0xAE,0xB7), o3(0xE6,0xAE,0xBC),
+     o3(0xE6,0xAF,0x86), o3(0xE6,0xAF,0x8B),
+     o3(0xE6,0xAF,0x93), o3(0xE6,0xAF,0x9F),
+     o3(0xE6,0xAF,0xAC), o3(0xE6,0xAF,0xAB),
+     o3(0xE6,0xAF,0xB3), o3(0xE6,0xAF,0xAF),
+     o3(0xE9,0xBA,0xBE), o3(0xE6,0xB0,0x88),
+     o3(0xE6,0xB0,0x93), o3(0xE6,0xB0,0x94),
+     o3(0xE6,0xB0,0x9B), o3(0xE6,0xB0,0xA4),
+     o3(0xE6,0xB0,0xA3), o3(0xE6,0xB1,0x9E),
+     o3(0xE6,0xB1,0x95), o3(0xE6,0xB1,0xA2),
+     o3(0xE6,0xB1,0xAA), o3(0xE6,0xB2,0x82),
+     o3(0xE6,0xB2,0x8D), o3(0xE6,0xB2,0x9A),
+     o3(0xE6,0xB2,0x81), o3(0xE6,0xB2,0x9B),
+     o3(0xE6,0xB1,0xBE), o3(0xE6,0xB1,0xA8),
+     o3(0xE6,0xB1,0xB3), o3(0xE6,0xB2,0x92),
+     o3(0xE6,0xB2,0x90), o3(0xE6,0xB3,0x84),
+     o3(0xE6,0xB3,0xB1), o3(0xE6,0xB3,0x93),
+     o3(0xE6,0xB2,0xBD), o3(0xE6,0xB3,0x97),
+     o3(0xE6,0xB3,0x85), o3(0xE6,0xB3,0x9D),
+     o3(0xE6,0xB2,0xAE), o3(0xE6,0xB2,0xB1),
+     o3(0xE6,0xB2,0xBE),
+
+#define from_EUC_JP_DD WORDINDEX2INFO(11394)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DD_infos,
+
+#define from_EUC_JP_DE_infos WORDINDEX2INFO(11396)
+                INVALID, o3(0xE6,0xB2,0xBA),
+     o3(0xE6,0xB3,0x9B), o3(0xE6,0xB3,0xAF),
+     o3(0xE6,0xB3,0x99), o3(0xE6,0xB3,0xAA),
+     o3(0xE6,0xB4,0x9F), o3(0xE8,0xA1,0x8D),
+     o3(0xE6,0xB4,0xB6), o3(0xE6,0xB4,0xAB),
+     o3(0xE6,0xB4,0xBD), o3(0xE6,0xB4,0xB8),
+     o3(0xE6,0xB4,0x99), o3(0xE6,0xB4,0xB5),
+     o3(0xE6,0xB4,0xB3), o3(0xE6,0xB4,0x92),
+     o3(0xE6,0xB4,0x8C), o3(0xE6,0xB5,0xA3),
+     o3(0xE6,0xB6,0x93), o3(0xE6,0xB5,0xA4),
+     o3(0xE6,0xB5,0x9A), o3(0xE6,0xB5,0xB9),
+     o3(0xE6,0xB5,0x99), o3(0xE6,0xB6,0x8E),
+     o3(0xE6,0xB6,0x95), o3(0xE6,0xBF,0xA4),
+     o3(0xE6,0xB6,0x85), o3(0xE6,0xB7,0xB9),
+     o3(0xE6,0xB8,0x95), o3(0xE6,0xB8,0x8A),
+     o3(0xE6,0xB6,0xB5), o3(0xE6,0xB7,0x87),
+     o3(0xE6,0xB7,0xA6), o3(0xE6,0xB6,0xB8),
+     o3(0xE6,0xB7,0x86), o3(0xE6,0xB7,0xAC),
+     o3(0xE6,0xB7,0x9E), o3(0xE6,0xB7,0x8C),
+     o3(0xE6,0xB7,0xA8), o3(0xE6,0xB7,0x92),
+     o3(0xE6,0xB7,0x85), o3(0xE6,0xB7,0xBA),
+     o3(0xE6,0xB7,0x99), o3(0xE6,0xB7,0xA4),
+     o3(0xE6,0xB7,0x95), o3(0xE6,0xB7,0xAA),
+     o3(0xE6,0xB7,0xAE), o3(0xE6,0xB8,0xAD),
+     o3(0xE6,0xB9,0xAE), o3(0xE6,0xB8,0xAE),
+     o3(0xE6,0xB8,0x99), o3(0xE6,0xB9,0xB2),
+     o3(0xE6,0xB9,0x9F), o3(0xE6,0xB8,0xBE),
+     o3(0xE6,0xB8,0xA3), o3(0xE6,0xB9,0xAB),
+     o3(0xE6,0xB8,0xAB), o3(0xE6,0xB9,0xB6),
+     o3(0xE6,0xB9,0x8D), o3(0xE6,0xB8,0x9F),
+     o3(0xE6,0xB9,0x83), o3(0xE6,0xB8,0xBA),
+     o3(0xE6,0xB9,0x8E), o3(0xE6,0xB8,0xA4),
+     o3(0xE6,0xBB,0xBF), o3(0xE6,0xB8,0x9D),
+     o3(0xE6,0xB8,0xB8), o3(0xE6,0xBA,0x82),
+     o3(0xE6,0xBA,0xAA), o3(0xE6,0xBA,0x98),
+     o3(0xE6,0xBB,0x89), o3(0xE6,0xBA,0xB7),
+     o3(0xE6,0xBB,0x93), o3(0xE6,0xBA,0xBD),
+     o3(0xE6,0xBA,0xAF), o3(0xE6,0xBB,0x84),
+     o3(0xE6,0xBA,0xB2), o3(0xE6,0xBB,0x94),
+     o3(0xE6,0xBB,0x95), o3(0xE6,0xBA,0x8F),
+     o3(0xE6,0xBA,0xA5), o3(0xE6,0xBB,0x82),
+     o3(0xE6,0xBA,0x9F), o3(0xE6,0xBD,0x81),
+     o3(0xE6,0xBC,0x91), o3(0xE7,0x81,0x8C),
+     o3(0xE6,0xBB,0xAC), o3(0xE6,0xBB,0xB8),
+     o3(0xE6,0xBB,0xBE), o3(0xE6,0xBC,0xBF),
+     o3(0xE6,0xBB,0xB2), o3(0xE6,0xBC,0xB1),
+     o3(0xE6,0xBB,0xAF), o3(0xE6,0xBC,0xB2),
+     o3(0xE6,0xBB,0x8C),
+
+#define from_EUC_JP_DE WORDINDEX2INFO(11491)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DE_infos,
+
+#define from_EUC_JP_DF_infos WORDINDEX2INFO(11493)
+                INVALID, o3(0xE6,0xBC,0xBE),
+     o3(0xE6,0xBC,0x93), o3(0xE6,0xBB,0xB7),
+     o3(0xE6,0xBE,0x86), o3(0xE6,0xBD,0xBA),
+     o3(0xE6,0xBD,0xB8), o3(0xE6,0xBE,0x81),
+     o3(0xE6,0xBE,0x80), o3(0xE6,0xBD,0xAF),
+     o3(0xE6,0xBD,0x9B), o3(0xE6,0xBF,0xB3),
+     o3(0xE6,0xBD,0xAD), o3(0xE6,0xBE,0x82),
+     o3(0xE6,0xBD,0xBC), o3(0xE6,0xBD,0x98),
+     o3(0xE6,0xBE,0x8E), o3(0xE6,0xBE,0x91),
+     o3(0xE6,0xBF,0x82), o3(0xE6,0xBD,0xA6),
+     o3(0xE6,0xBE,0xB3), o3(0xE6,0xBE,0xA3),
+     o3(0xE6,0xBE,0xA1), o3(0xE6,0xBE,0xA4),
+     o3(0xE6,0xBE,0xB9), o3(0xE6,0xBF,0x86),
+     o3(0xE6,0xBE,0xAA), o3(0xE6,0xBF,0x9F),
+     o3(0xE6,0xBF,0x95), o3(0xE6,0xBF,0xAC),
+     o3(0xE6,0xBF,0x94), o3(0xE6,0xBF,0x98),
+     o3(0xE6,0xBF,0xB1), o3(0xE6,0xBF,0xAE),
+     o3(0xE6,0xBF,0x9B), o3(0xE7,0x80,0x89),
+     o3(0xE7,0x80,0x8B), o3(0xE6,0xBF,0xBA),
+     o3(0xE7,0x80,0x91), o3(0xE7,0x80,0x81),
+     o3(0xE7,0x80,0x8F), o3(0xE6,0xBF,0xBE),
+     o3(0xE7,0x80,0x9B), o3(0xE7,0x80,0x9A),
+     o3(0xE6,0xBD,0xB4), o3(0xE7,0x80,0x9D),
+     o3(0xE7,0x80,0x98), o3(0xE7,0x80,0x9F),
+     o3(0xE7,0x80,0xB0), o3(0xE7,0x80,0xBE),
+     o3(0xE7,0x80,0xB2), o3(0xE7,0x81,0x91),
+     o3(0xE7,0x81,0xA3), o3(0xE7,0x82,0x99),
+     o3(0xE7,0x82,0x92), o3(0xE7,0x82,0xAF),
+     o3(0xE7,0x83,0xB1), o3(0xE7,0x82,0xAC),
+     o3(0xE7,0x82,0xB8), o3(0xE7,0x82,0xB3),
+     o3(0xE7,0x82,0xAE), o3(0xE7,0x83,0x9F),
+     o3(0xE7,0x83,0x8B), o3(0xE7,0x83,0x9D),
+     o3(0xE7,0x83,0x99), o3(0xE7,0x84,0x89),
+     o3(0xE7,0x83,0xBD), o3(0xE7,0x84,0x9C),
+     o3(0xE7,0x84,0x99), o3(0xE7,0x85,0xA5),
+     o3(0xE7,0x85,0x95), o3(0xE7,0x86,0x88),
+     o3(0xE7,0x85,0xA6), o3(0xE7,0x85,0xA2),
+     o3(0xE7,0x85,0x8C), o3(0xE7,0x85,0x96),
+     o3(0xE7,0x85,0xAC), o3(0xE7,0x86,0x8F),
+     o3(0xE7,0x87,0xBB), o3(0xE7,0x86,0x84),
+     o3(0xE7,0x86,0x95), o3(0xE7,0x86,0xA8),
+     o3(0xE7,0x86,0xAC), o3(0xE7,0x87,0x97),
+     o3(0xE7,0x86,0xB9), o3(0xE7,0x86,0xBE),
+     o3(0xE7,0x87,0x92), o3(0xE7,0x87,0x89),
+     o3(0xE7,0x87,0x94), o3(0xE7,0x87,0x8E),
+     o3(0xE7,0x87,0xA0), o3(0xE7,0x87,0xAC),
+     o3(0xE7,0x87,0xA7), o3(0xE7,0x87,0xB5),
+     o3(0xE7,0x87,0xBC),
+
+#define from_EUC_JP_DF WORDINDEX2INFO(11588)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_DF_infos,
+
+#define from_EUC_JP_E0_infos WORDINDEX2INFO(11590)
+                INVALID, o3(0xE7,0x87,0xB9),
+     o3(0xE7,0x87,0xBF), o3(0xE7,0x88,0x8D),
+     o3(0xE7,0x88,0x90), o3(0xE7,0x88,0x9B),
+     o3(0xE7,0x88,0xA8), o3(0xE7,0x88,0xAD),
+     o3(0xE7,0x88,0xAC), o3(0xE7,0x88,0xB0),
+     o3(0xE7,0x88,0xB2), o3(0xE7,0x88,0xBB),
+     o3(0xE7,0x88,0xBC), o3(0xE7,0x88,0xBF),
+     o3(0xE7,0x89,0x80), o3(0xE7,0x89,0x86),
+     o3(0xE7,0x89,0x8B), o3(0xE7,0x89,0x98),
+     o3(0xE7,0x89,0xB4), o3(0xE7,0x89,0xBE),
+     o3(0xE7,0x8A,0x82), o3(0xE7,0x8A,0x81),
+     o3(0xE7,0x8A,0x87), o3(0xE7,0x8A,0x92),
+     o3(0xE7,0x8A,0x96), o3(0xE7,0x8A,0xA2),
+     o3(0xE7,0x8A,0xA7), o3(0xE7,0x8A,0xB9),
+     o3(0xE7,0x8A,0xB2), o3(0xE7,0x8B,0x83),
+     o3(0xE7,0x8B,0x86), o3(0xE7,0x8B,0x84),
+     o3(0xE7,0x8B,0x8E), o3(0xE7,0x8B,0x92),
+     o3(0xE7,0x8B,0xA2), o3(0xE7,0x8B,0xA0),
+     o3(0xE7,0x8B,0xA1), o3(0xE7,0x8B,0xB9),
+     o3(0xE7,0x8B,0xB7), o3(0xE5,0x80,0x8F),
+     o3(0xE7,0x8C,0x97), o3(0xE7,0x8C,0x8A),
+     o3(0xE7,0x8C,0x9C), o3(0xE7,0x8C,0x96),
+     o3(0xE7,0x8C,0x9D), o3(0xE7,0x8C,0xB4),
+     o3(0xE7,0x8C,0xAF), o3(0xE7,0x8C,0xA9),
+     o3(0xE7,0x8C,0xA5), o3(0xE7,0x8C,0xBE),
+     o3(0xE7,0x8D,0x8E), o3(0xE7,0x8D,0x8F),
+     o3(0xE9,0xBB,0x98), o3(0xE7,0x8D,0x97),
+     o3(0xE7,0x8D,0xAA), o3(0xE7,0x8D,0xA8),
+     o3(0xE7,0x8D,0xB0), o3(0xE7,0x8D,0xB8),
+     o3(0xE7,0x8D,0xB5), o3(0xE7,0x8D,0xBB),
+     o3(0xE7,0x8D,0xBA), o3(0xE7,0x8F,0x88),
+     o3(0xE7,0x8E,0xB3), o3(0xE7,0x8F,0x8E),
+     o3(0xE7,0x8E,0xBB), o3(0xE7,0x8F,0x80),
+     o3(0xE7,0x8F,0xA5), o3(0xE7,0x8F,0xAE),
+     o3(0xE7,0x8F,0x9E), o3(0xE7,0x92,0xA2),
+     o3(0xE7,0x90,0x85), o3(0xE7,0x91,0xAF),
+     o3(0xE7,0x90,0xA5), o3(0xE7,0x8F,0xB8),
+     o3(0xE7,0x90,0xB2), o3(0xE7,0x90,0xBA),
+     o3(0xE7,0x91,0x95), o3(0xE7,0x90,0xBF),
+     o3(0xE7,0x91,0x9F), o3(0xE7,0x91,0x99),
+     o3(0xE7,0x91,0x81), o3(0xE7,0x91,0x9C),
+     o3(0xE7,0x91,0xA9), o3(0xE7,0x91,0xB0),
+     o3(0xE7,0x91,0xA3), o3(0xE7,0x91,0xAA),
+     o3(0xE7,0x91,0xB6), o3(0xE7,0x91,0xBE),
+     o3(0xE7,0x92,0x8B), o3(0xE7,0x92,0x9E),
+     o3(0xE7,0x92,0xA7), o3(0xE7,0x93,0x8A),
+     o3(0xE7,0x93,0x8F), o3(0xE7,0x93,0x94),
+     o3(0xE7,0x8F,0xB1),
+
+#define from_EUC_JP_E0 WORDINDEX2INFO(11685)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E0_infos,
+
+#define from_EUC_JP_E1_infos WORDINDEX2INFO(11687)
+                INVALID, o3(0xE7,0x93,0xA0),
+     o3(0xE7,0x93,0xA3), o3(0xE7,0x93,0xA7),
+     o3(0xE7,0x93,0xA9), o3(0xE7,0x93,0xAE),
+     o3(0xE7,0x93,0xB2), o3(0xE7,0x93,0xB0),
+     o3(0xE7,0x93,0xB1), o3(0xE7,0x93,0xB8),
+     o3(0xE7,0x93,0xB7), o3(0xE7,0x94,0x84),
+     o3(0xE7,0x94,0x83), o3(0xE7,0x94,0x85),
+     o3(0xE7,0x94,0x8C), o3(0xE7,0x94,0x8E),
+     o3(0xE7,0x94,0x8D), o3(0xE7,0x94,0x95),
+     o3(0xE7,0x94,0x93), o3(0xE7,0x94,0x9E),
+     o3(0xE7,0x94,0xA6), o3(0xE7,0x94,0xAC),
+     o3(0xE7,0x94,0xBC), o3(0xE7,0x95,0x84),
+     o3(0xE7,0x95,0x8D), o3(0xE7,0x95,0x8A),
+     o3(0xE7,0x95,0x89), o3(0xE7,0x95,0x9B),
+     o3(0xE7,0x95,0x86), o3(0xE7,0x95,0x9A),
+     o3(0xE7,0x95,0xA9), o3(0xE7,0x95,0xA4),
+     o3(0xE7,0x95,0xA7), o3(0xE7,0x95,0xAB),
+     o3(0xE7,0x95,0xAD), o3(0xE7,0x95,0xB8),
+     o3(0xE7,0x95,0xB6), o3(0xE7,0x96,0x86),
+     o3(0xE7,0x96,0x87), o3(0xE7,0x95,0xB4),
+     o3(0xE7,0x96,0x8A), o3(0xE7,0x96,0x89),
+     o3(0xE7,0x96,0x82), o3(0xE7,0x96,0x94),
+     o3(0xE7,0x96,0x9A), o3(0xE7,0x96,0x9D),
+     o3(0xE7,0x96,0xA5), o3(0xE7,0x96,0xA3),
+     o3(0xE7,0x97,0x82), o3(0xE7,0x96,0xB3),
+     o3(0xE7,0x97,0x83), o3(0xE7,0x96,0xB5),
+     o3(0xE7,0x96,0xBD), o3(0xE7,0x96,0xB8),
+     o3(0xE7,0x96,0xBC), o3(0xE7,0x96,0xB1),
+     o3(0xE7,0x97,0x8D), o3(0xE7,0x97,0x8A),
+     o3(0xE7,0x97,0x92), o3(0xE7,0x97,0x99),
+     o3(0xE7,0x97,0xA3), o3(0xE7,0x97,0x9E),
+     o3(0xE7,0x97,0xBE), o3(0xE7,0x97,0xBF),
+     o3(0xE7,0x97,0xBC), o3(0xE7,0x98,0x81),
+     o3(0xE7,0x97,0xB0), o3(0xE7,0x97,0xBA),
+     o3(0xE7,0x97,0xB2), o3(0xE7,0x97,0xB3),
+     o3(0xE7,0x98,0x8B), o3(0xE7,0x98,0x8D),
+     o3(0xE7,0x98,0x89), o3(0xE7,0x98,0x9F),
+     o3(0xE7,0x98,0xA7), o3(0xE7,0x98,0xA0),
+     o3(0xE7,0x98,0xA1), o3(0xE7,0x98,0xA2),
+     o3(0xE7,0x98,0xA4), o3(0xE7,0x98,0xB4),
+     o3(0xE7,0x98,0xB0), o3(0xE7,0x98,0xBB),
+     o3(0xE7,0x99,0x87), o3(0xE7,0x99,0x88),
+     o3(0xE7,0x99,0x86), o3(0xE7,0x99,0x9C),
+     o3(0xE7,0x99,0x98), o3(0xE7,0x99,0xA1),
+     o3(0xE7,0x99,0xA2), o3(0xE7,0x99,0xA8),
+     o3(0xE7,0x99,0xA9), o3(0xE7,0x99,0xAA),
+     o3(0xE7,0x99,0xA7), o3(0xE7,0x99,0xAC),
+     o3(0xE7,0x99,0xB0),
+
+#define from_EUC_JP_E1 WORDINDEX2INFO(11782)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E1_infos,
+
+#define from_EUC_JP_E2_infos WORDINDEX2INFO(11784)
+                INVALID, o3(0xE7,0x99,0xB2),
+     o3(0xE7,0x99,0xB6), o3(0xE7,0x99,0xB8),
+     o3(0xE7,0x99,0xBC), o3(0xE7,0x9A,0x80),
+     o3(0xE7,0x9A,0x83), o3(0xE7,0x9A,0x88),
+     o3(0xE7,0x9A,0x8B), o3(0xE7,0x9A,0x8E),
+     o3(0xE7,0x9A,0x96), o3(0xE7,0x9A,0x93),
+     o3(0xE7,0x9A,0x99), o3(0xE7,0x9A,0x9A),
+     o3(0xE7,0x9A,0xB0), o3(0xE7,0x9A,0xB4),
+     o3(0xE7,0x9A,0xB8), o3(0xE7,0x9A,0xB9),
+     o3(0xE7,0x9A,0xBA), o3(0xE7,0x9B,0x82),
+     o3(0xE7,0x9B,0x8D), o3(0xE7,0x9B,0x96),
+     o3(0xE7,0x9B,0x92), o3(0xE7,0x9B,0x9E),
+     o3(0xE7,0x9B,0xA1), o3(0xE7,0x9B,0xA5),
+     o3(0xE7,0x9B,0xA7), o3(0xE7,0x9B,0xAA),
+     o3(0xE8,0x98,0xAF), o3(0xE7,0x9B,0xBB),
+     o3(0xE7,0x9C,0x88), o3(0xE7,0x9C,0x87),
+     o3(0xE7,0x9C,0x84), o3(0xE7,0x9C,0xA9),
+     o3(0xE7,0x9C,0xA4), o3(0xE7,0x9C,0x9E),
+     o3(0xE7,0x9C,0xA5), o3(0xE7,0x9C,0xA6),
+     o3(0xE7,0x9C,0x9B), o3(0xE7,0x9C,0xB7),
+     o3(0xE7,0x9C,0xB8), o3(0xE7,0x9D,0x87),
+     o3(0xE7,0x9D,0x9A), o3(0xE7,0x9D,0xA8),
+     o3(0xE7,0x9D,0xAB), o3(0xE7,0x9D,0x9B),
+     o3(0xE7,0x9D,0xA5), o3(0xE7,0x9D,0xBF),
+     o3(0xE7,0x9D,0xBE), o3(0xE7,0x9D,0xB9),
+     o3(0xE7,0x9E,0x8E), o3(0xE7,0x9E,0x8B),
+     o3(0xE7,0x9E,0x91), o3(0xE7,0x9E,0xA0),
+     o3(0xE7,0x9E,0x9E), o3(0xE7,0x9E,0xB0),
+     o3(0xE7,0x9E,0xB6), o3(0xE7,0x9E,0xB9),
+     o3(0xE7,0x9E,0xBF), o3(0xE7,0x9E,0xBC),
+     o3(0xE7,0x9E,0xBD), o3(0xE7,0x9E,0xBB),
+     o3(0xE7,0x9F,0x87), o3(0xE7,0x9F,0x8D),
+     o3(0xE7,0x9F,0x97), o3(0xE7,0x9F,0x9A),
+     o3(0xE7,0x9F,0x9C), o3(0xE7,0x9F,0xA3),
+     o3(0xE7,0x9F,0xAE), o3(0xE7,0x9F,0xBC),
+     o3(0xE7,0xA0,0x8C), o3(0xE7,0xA0,0x92),
+     o3(0xE7,0xA4,0xA6), o3(0xE7,0xA0,0xA0),
+     o3(0xE7,0xA4,0xAA), o3(0xE7,0xA1,0x85),
+     o3(0xE7,0xA2,0x8E), o3(0xE7,0xA1,0xB4),
+     o3(0xE7,0xA2,0x86), o3(0xE7,0xA1,0xBC),
+     o3(0xE7,0xA2,0x9A), o3(0xE7,0xA2,0x8C),
+     o3(0xE7,0xA2,0xA3), o3(0xE7,0xA2,0xB5),
+     o3(0xE7,0xA2,0xAA), o3(0xE7,0xA2,0xAF),
+     o3(0xE7,0xA3,0x91), o3(0xE7,0xA3,0x86),
+     o3(0xE7,0xA3,0x8B), o3(0xE7,0xA3,0x94),
+     o3(0xE7,0xA2,0xBE), o3(0xE7,0xA2,0xBC),
+     o3(0xE7,0xA3,0x85), o3(0xE7,0xA3,0x8A),
+     o3(0xE7,0xA3,0xAC),
+
+#define from_EUC_JP_E2 WORDINDEX2INFO(11879)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E2_infos,
+
+#define from_EUC_JP_E3_infos WORDINDEX2INFO(11881)
+                INVALID, o3(0xE7,0xA3,0xA7),
+     o3(0xE7,0xA3,0x9A), o3(0xE7,0xA3,0xBD),
+     o3(0xE7,0xA3,0xB4), o3(0xE7,0xA4,0x87),
+     o3(0xE7,0xA4,0x92), o3(0xE7,0xA4,0x91),
+     o3(0xE7,0xA4,0x99), o3(0xE7,0xA4,0xAC),
+     o3(0xE7,0xA4,0xAB), o3(0xE7,0xA5,0x80),
+     o3(0xE7,0xA5,0xA0), o3(0xE7,0xA5,0x97),
+     o3(0xE7,0xA5,0x9F), o3(0xE7,0xA5,0x9A),
+     o3(0xE7,0xA5,0x95), o3(0xE7,0xA5,0x93),
+     o3(0xE7,0xA5,0xBA), o3(0xE7,0xA5,0xBF),
+     o3(0xE7,0xA6,0x8A), o3(0xE7,0xA6,0x9D),
+     o3(0xE7,0xA6,0xA7), o3(0xE9,0xBD,0x8B),
+     o3(0xE7,0xA6,0xAA), o3(0xE7,0xA6,0xAE),
+     o3(0xE7,0xA6,0xB3), o3(0xE7,0xA6,0xB9),
+     o3(0xE7,0xA6,0xBA), o3(0xE7,0xA7,0x89),
+     o3(0xE7,0xA7,0x95), o3(0xE7,0xA7,0xA7),
+     o3(0xE7,0xA7,0xAC), o3(0xE7,0xA7,0xA1),
+     o3(0xE7,0xA7,0xA3), o3(0xE7,0xA8,0x88),
+     o3(0xE7,0xA8,0x8D), o3(0xE7,0xA8,0x98),
+     o3(0xE7,0xA8,0x99), o3(0xE7,0xA8,0xA0),
+     o3(0xE7,0xA8,0x9F), o3(0xE7,0xA6,0x80),
+     o3(0xE7,0xA8,0xB1), o3(0xE7,0xA8,0xBB),
+     o3(0xE7,0xA8,0xBE), o3(0xE7,0xA8,0xB7),
+     o3(0xE7,0xA9,0x83), o3(0xE7,0xA9,0x97),
+     o3(0xE7,0xA9,0x89), o3(0xE7,0xA9,0xA1),
+     o3(0xE7,0xA9,0xA2), o3(0xE7,0xA9,0xA9),
+     o3(0xE9,0xBE,0x9D), o3(0xE7,0xA9,0xB0),
+     o3(0xE7,0xA9,0xB9), o3(0xE7,0xA9,0xBD),
+     o3(0xE7,0xAA,0x88), o3(0xE7,0xAA,0x97),
+     o3(0xE7,0xAA,0x95), o3(0xE7,0xAA,0x98),
+     o3(0xE7,0xAA,0x96), o3(0xE7,0xAA,0xA9),
+     o3(0xE7,0xAB,0x88), o3(0xE7,0xAA,0xB0),
+     o3(0xE7,0xAA,0xB6), o3(0xE7,0xAB,0x85),
+     o3(0xE7,0xAB,0x84), o3(0xE7,0xAA,0xBF),
+     o3(0xE9,0x82,0x83), o3(0xE7,0xAB,0x87),
+     o3(0xE7,0xAB,0x8A), o3(0xE7,0xAB,0x8D),
+     o3(0xE7,0xAB,0x8F), o3(0xE7,0xAB,0x95),
+     o3(0xE7,0xAB,0x93), o3(0xE7,0xAB,0x99),
+     o3(0xE7,0xAB,0x9A), o3(0xE7,0xAB,0x9D),
+     o3(0xE7,0xAB,0xA1), o3(0xE7,0xAB,0xA2),
+     o3(0xE7,0xAB,0xA6), o3(0xE7,0xAB,0xAD),
+     o3(0xE7,0xAB,0xB0), o3(0xE7,0xAC,0x82),
+     o3(0xE7,0xAC,0x8F), o3(0xE7,0xAC,0x8A),
+     o3(0xE7,0xAC,0x86), o3(0xE7,0xAC,0xB3),
+     o3(0xE7,0xAC,0x98), o3(0xE7,0xAC,0x99),
+     o3(0xE7,0xAC,0x9E), o3(0xE7,0xAC,0xB5),
+     o3(0xE7,0xAC,0xA8), o3(0xE7,0xAC,0xB6),
+     o3(0xE7,0xAD,0x90),
+
+#define from_EUC_JP_E3 WORDINDEX2INFO(11976)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E3_infos,
+
+#define from_EUC_JP_E4_infos WORDINDEX2INFO(11978)
+                INVALID, o3(0xE7,0xAD,0xBA),
+     o3(0xE7,0xAC,0x84), o3(0xE7,0xAD,0x8D),
+     o3(0xE7,0xAC,0x8B), o3(0xE7,0xAD,0x8C),
+     o3(0xE7,0xAD,0x85), o3(0xE7,0xAD,0xB5),
+     o3(0xE7,0xAD,0xA5), o3(0xE7,0xAD,0xB4),
+     o3(0xE7,0xAD,0xA7), o3(0xE7,0xAD,0xB0),
+     o3(0xE7,0xAD,0xB1), o3(0xE7,0xAD,0xAC),
+     o3(0xE7,0xAD,0xAE), o3(0xE7,0xAE,0x9D),
+     o3(0xE7,0xAE,0x98), o3(0xE7,0xAE,0x9F),
+     o3(0xE7,0xAE,0x8D), o3(0xE7,0xAE,0x9C),
+     o3(0xE7,0xAE,0x9A), o3(0xE7,0xAE,0x8B),
+     o3(0xE7,0xAE,0x92), o3(0xE7,0xAE,0x8F),
+     o3(0xE7,0xAD,0x9D), o3(0xE7,0xAE,0x99),
+     o3(0xE7,0xAF,0x8B), o3(0xE7,0xAF,0x81),
+     o3(0xE7,0xAF,0x8C), o3(0xE7,0xAF,0x8F),
+     o3(0xE7,0xAE,0xB4), o3(0xE7,0xAF,0x86),
+     o3(0xE7,0xAF,0x9D), o3(0xE7,0xAF,0xA9),
+     o3(0xE7,0xB0,0x91), o3(0xE7,0xB0,0x94),
+     o3(0xE7,0xAF,0xA6), o3(0xE7,0xAF,0xA5),
+     o3(0xE7,0xB1,0xA0), o3(0xE7,0xB0,0x80),
+     o3(0xE7,0xB0,0x87), o3(0xE7,0xB0,0x93),
+     o3(0xE7,0xAF,0xB3), o3(0xE7,0xAF,0xB7),
+     o3(0xE7,0xB0,0x97), o3(0xE7,0xB0,0x8D),
+     o3(0xE7,0xAF,0xB6), o3(0xE7,0xB0,0xA3),
+     o3(0xE7,0xB0,0xA7), o3(0xE7,0xB0,0xAA),
+     o3(0xE7,0xB0,0x9F), o3(0xE7,0xB0,0xB7),
+     o3(0xE7,0xB0,0xAB), o3(0xE7,0xB0,0xBD),
+     o3(0xE7,0xB1,0x8C), o3(0xE7,0xB1,0x83),
+     o3(0xE7,0xB1,0x94), o3(0xE7,0xB1,0x8F),
+     o3(0xE7,0xB1,0x80), o3(0xE7,0xB1,0x90),
+     o3(0xE7,0xB1,0x98), o3(0xE7,0xB1,0x9F),
+     o3(0xE7,0xB1,0xA4), o3(0xE7,0xB1,0x96),
+     o3(0xE7,0xB1,0xA5), o3(0xE7,0xB1,0xAC),
+     o3(0xE7,0xB1,0xB5), o3(0xE7,0xB2,0x83),
+     o3(0xE7,0xB2,0x90), o3(0xE7,0xB2,0xA4),
+     o3(0xE7,0xB2,0xAD), o3(0xE7,0xB2,0xA2),
+     o3(0xE7,0xB2,0xAB), o3(0xE7,0xB2,0xA1),
+     o3(0xE7,0xB2,0xA8), o3(0xE7,0xB2,0xB3),
+     o3(0xE7,0xB2,0xB2), o3(0xE7,0xB2,0xB1),
+     o3(0xE7,0xB2,0xAE), o3(0xE7,0xB2,0xB9),
+     o3(0xE7,0xB2,0xBD), o3(0xE7,0xB3,0x80),
+     o3(0xE7,0xB3,0x85), o3(0xE7,0xB3,0x82),
+     o3(0xE7,0xB3,0x98), o3(0xE7,0xB3,0x92),
+     o3(0xE7,0xB3,0x9C), o3(0xE7,0xB3,0xA2),
+     o3(0xE9,0xAC,0xBB), o3(0xE7,0xB3,0xAF),
+     o3(0xE7,0xB3,0xB2), o3(0xE7,0xB3,0xB4),
+     o3(0xE7,0xB3,0xB6), o3(0xE7,0xB3,0xBA),
+     o3(0xE7,0xB4,0x86),
+
+#define from_EUC_JP_E4 WORDINDEX2INFO(12073)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E4_infos,
+
+#define from_EUC_JP_E5_infos WORDINDEX2INFO(12075)
+                INVALID, o3(0xE7,0xB4,0x82),
+     o3(0xE7,0xB4,0x9C), o3(0xE7,0xB4,0x95),
+     o3(0xE7,0xB4,0x8A), o3(0xE7,0xB5,0x85),
+     o3(0xE7,0xB5,0x8B), o3(0xE7,0xB4,0xAE),
+     o3(0xE7,0xB4,0xB2), o3(0xE7,0xB4,0xBF),
+     o3(0xE7,0xB4,0xB5), o3(0xE7,0xB5,0x86),
+     o3(0xE7,0xB5,0xB3), o3(0xE7,0xB5,0x96),
+     o3(0xE7,0xB5,0x8E), o3(0xE7,0xB5,0xB2),
+     o3(0xE7,0xB5,0xA8), o3(0xE7,0xB5,0xAE),
+     o3(0xE7,0xB5,0x8F), o3(0xE7,0xB5,0xA3),
+     o3(0xE7,0xB6,0x93), o3(0xE7,0xB6,0x89),
+     o3(0xE7,0xB5,0x9B), o3(0xE7,0xB6,0x8F),
+     o3(0xE7,0xB5,0xBD), o3(0xE7,0xB6,0x9B),
+     o3(0xE7,0xB6,0xBA), o3(0xE7,0xB6,0xAE),
+     o3(0xE7,0xB6,0xA3), o3(0xE7,0xB6,0xB5),
+     o3(0xE7,0xB7,0x87), o3(0xE7,0xB6,0xBD),
+     o3(0xE7,0xB6,0xAB), o3(0xE7,0xB8,0xBD),
+     o3(0xE7,0xB6,0xA2), o3(0xE7,0xB6,0xAF),
+     o3(0xE7,0xB7,0x9C), o3(0xE7,0xB6,0xB8),
+     o3(0xE7,0xB6,0x9F), o3(0xE7,0xB6,0xB0),
+     o3(0xE7,0xB7,0x98), o3(0xE7,0xB7,0x9D),
+     o3(0xE7,0xB7,0xA4), o3(0xE7,0xB7,0x9E),
+     o3(0xE7,0xB7,0xBB), o3(0xE7,0xB7,0xB2),
+     o3(0xE7,0xB7,0xA1), o3(0xE7,0xB8,0x85),
+     o3(0xE7,0xB8,0x8A), o3(0xE7,0xB8,0xA3),
+     o3(0xE7,0xB8,0xA1), o3(0xE7,0xB8,0x92),
+     o3(0xE7,0xB8,0xB1), o3(0xE7,0xB8,0x9F),
+     o3(0xE7,0xB8,0x89), o3(0xE7,0xB8,0x8B),
+     o3(0xE7,0xB8,0xA2), o3(0xE7,0xB9,0x86),
+     o3(0xE7,0xB9,0xA6), o3(0xE7,0xB8,0xBB),
+     o3(0xE7,0xB8,0xB5), o3(0xE7,0xB8,0xB9),
+     o3(0xE7,0xB9,0x83), o3(0xE7,0xB8,0xB7),
+     o3(0xE7,0xB8,0xB2), o3(0xE7,0xB8,0xBA),
+     o3(0xE7,0xB9,0xA7), o3(0xE7,0xB9,0x9D),
+     o3(0xE7,0xB9,0x96), o3(0xE7,0xB9,0x9E),
+     o3(0xE7,0xB9,0x99), o3(0xE7,0xB9,0x9A),
+     o3(0xE7,0xB9,0xB9), o3(0xE7,0xB9,0xAA),
+     o3(0xE7,0xB9,0xA9), o3(0xE7,0xB9,0xBC),
+     o3(0xE7,0xB9,0xBB), o3(0xE7,0xBA,0x83),
+     o3(0xE7,0xB7,0x95), o3(0xE7,0xB9,0xBD),
+     o3(0xE8,0xBE,0xAE), o3(0xE7,0xB9,0xBF),
+     o3(0xE7,0xBA,0x88), o3(0xE7,0xBA,0x89),
+     o3(0xE7,0xBA,0x8C), o3(0xE7,0xBA,0x92),
+     o3(0xE7,0xBA,0x90), o3(0xE7,0xBA,0x93),
+     o3(0xE7,0xBA,0x94), o3(0xE7,0xBA,0x96),
+     o3(0xE7,0xBA,0x8E), o3(0xE7,0xBA,0x9B),
+     o3(0xE7,0xBA,0x9C), o3(0xE7,0xBC,0xB8),
+     o3(0xE7,0xBC,0xBA),
+
+#define from_EUC_JP_E5 WORDINDEX2INFO(12170)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E5_infos,
+
+#define from_EUC_JP_E6_infos WORDINDEX2INFO(12172)
+                INVALID, o3(0xE7,0xBD,0x85),
+     o3(0xE7,0xBD,0x8C), o3(0xE7,0xBD,0x8D),
+     o3(0xE7,0xBD,0x8E), o3(0xE7,0xBD,0x90),
+     o3(0xE7,0xBD,0x91), o3(0xE7,0xBD,0x95),
+     o3(0xE7,0xBD,0x94), o3(0xE7,0xBD,0x98),
+     o3(0xE7,0xBD,0x9F), o3(0xE7,0xBD,0xA0),
+     o3(0xE7,0xBD,0xA8), o3(0xE7,0xBD,0xA9),
+     o3(0xE7,0xBD,0xA7), o3(0xE7,0xBD,0xB8),
+     o3(0xE7,0xBE,0x82), o3(0xE7,0xBE,0x86),
+     o3(0xE7,0xBE,0x83), o3(0xE7,0xBE,0x88),
+     o3(0xE7,0xBE,0x87), o3(0xE7,0xBE,0x8C),
+     o3(0xE7,0xBE,0x94), o3(0xE7,0xBE,0x9E),
+     o3(0xE7,0xBE,0x9D), o3(0xE7,0xBE,0x9A),
+     o3(0xE7,0xBE,0xA3), o3(0xE7,0xBE,0xAF),
+     o3(0xE7,0xBE,0xB2), o3(0xE7,0xBE,0xB9),
+     o3(0xE7,0xBE,0xAE), o3(0xE7,0xBE,0xB6),
+     o3(0xE7,0xBE,0xB8), o3(0xE8,0xAD,0xB1),
+     o3(0xE7,0xBF,0x85), o3(0xE7,0xBF,0x86),
+     o3(0xE7,0xBF,0x8A), o3(0xE7,0xBF,0x95),
+     o3(0xE7,0xBF,0x94), o3(0xE7,0xBF,0xA1),
+     o3(0xE7,0xBF,0xA6), o3(0xE7,0xBF,0xA9),
+     o3(0xE7,0xBF,0xB3), o3(0xE7,0xBF,0xB9),
+     o3(0xE9,0xA3,0x9C), o3(0xE8,0x80,0x86),
+     o3(0xE8,0x80,0x84), o3(0xE8,0x80,0x8B),
+     o3(0xE8,0x80,0x92), o3(0xE8,0x80,0x98),
+     o3(0xE8,0x80,0x99), o3(0xE8,0x80,0x9C),
+     o3(0xE8,0x80,0xA1), o3(0xE8,0x80,0xA8),
+     o3(0xE8,0x80,0xBF), o3(0xE8,0x80,0xBB),
+     o3(0xE8,0x81,0x8A), o3(0xE8,0x81,0x86),
+     o3(0xE8,0x81,0x92), o3(0xE8,0x81,0x98),
+     o3(0xE8,0x81,0x9A), o3(0xE8,0x81,0x9F),
+     o3(0xE8,0x81,0xA2), o3(0xE8,0x81,0xA8),
+     o3(0xE8,0x81,0xB3), o3(0xE8,0x81,0xB2),
+     o3(0xE8,0x81,0xB0), o3(0xE8,0x81,0xB6),
+     o3(0xE8,0x81,0xB9), o3(0xE8,0x81,0xBD),
+     o3(0xE8,0x81,0xBF), o3(0xE8,0x82,0x84),
+     o3(0xE8,0x82,0x86), o3(0xE8,0x82,0x85),
+     o3(0xE8,0x82,0x9B), o3(0xE8,0x82,0x93),
+     o3(0xE8,0x82,0x9A), o3(0xE8,0x82,0xAD),
+     o3(0xE5,0x86,0x90), o3(0xE8,0x82,0xAC),
+     o3(0xE8,0x83,0x9B), o3(0xE8,0x83,0xA5),
+     o3(0xE8,0x83,0x99), o3(0xE8,0x83,0x9D),
+     o3(0xE8,0x83,0x84), o3(0xE8,0x83,0x9A),
+     o3(0xE8,0x83,0x96), o3(0xE8,0x84,0x89),
+     o3(0xE8,0x83,0xAF), o3(0xE8,0x83,0xB1),
+     o3(0xE8,0x84,0x9B), o3(0xE8,0x84,0xA9),
+     o3(0xE8,0x84,0xA3), o3(0xE8,0x84,0xAF),
+     o3(0xE8,0x85,0x8B),
+
+#define from_EUC_JP_E6 WORDINDEX2INFO(12267)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E6_infos,
+
+#define from_EUC_JP_E7_infos WORDINDEX2INFO(12269)
+                INVALID, o3(0xE9,0x9A,0x8B),
+     o3(0xE8,0x85,0x86), o3(0xE8,0x84,0xBE),
+     o3(0xE8,0x85,0x93), o3(0xE8,0x85,0x91),
+     o3(0xE8,0x83,0xBC), o3(0xE8,0x85,0xB1),
+     o3(0xE8,0x85,0xAE), o3(0xE8,0x85,0xA5),
+     o3(0xE8,0x85,0xA6), o3(0xE8,0x85,0xB4),
+     o3(0xE8,0x86,0x83), o3(0xE8,0x86,0x88),
+     o3(0xE8,0x86,0x8A), o3(0xE8,0x86,0x80),
+     o3(0xE8,0x86,0x82), o3(0xE8,0x86,0xA0),
+     o3(0xE8,0x86,0x95), o3(0xE8,0x86,0xA4),
+     o3(0xE8,0x86,0xA3), o3(0xE8,0x85,0x9F),
+     o3(0xE8,0x86,0x93), o3(0xE8,0x86,0xA9),
+     o3(0xE8,0x86,0xB0), o3(0xE8,0x86,0xB5),
+     o3(0xE8,0x86,0xBE), o3(0xE8,0x86,0xB8),
+     o3(0xE8,0x86,0xBD), o3(0xE8,0x87,0x80),
+     o3(0xE8,0x87,0x82), o3(0xE8,0x86,0xBA),
+     o3(0xE8,0x87,0x89), o3(0xE8,0x87,0x8D),
+     o3(0xE8,0x87,0x91), o3(0xE8,0x87,0x99),
+     o3(0xE8,0x87,0x98), o3(0xE8,0x87,0x88),
+     o3(0xE8,0x87,0x9A), o3(0xE8,0x87,0x9F),
+     o3(0xE8,0x87,0xA0), o3(0xE8,0x87,0xA7),
+     o3(0xE8,0x87,0xBA), o3(0xE8,0x87,0xBB),
+     o3(0xE8,0x87,0xBE), o3(0xE8,0x88,0x81),
+     o3(0xE8,0x88,0x82), o3(0xE8,0x88,0x85),
+     o3(0xE8,0x88,0x87), o3(0xE8,0x88,0x8A),
+     o3(0xE8,0x88,0x8D), o3(0xE8,0x88,0x90),
+     o3(0xE8,0x88,0x96), o3(0xE8,0x88,0xA9),
+     o3(0xE8,0x88,0xAB), o3(0xE8,0x88,0xB8),
+     o3(0xE8,0x88,0xB3), o3(0xE8,0x89,0x80),
+     o3(0xE8,0x89,0x99), o3(0xE8,0x89,0x98),
+     o3(0xE8,0x89,0x9D), o3(0xE8,0x89,0x9A),
+     o3(0xE8,0x89,0x9F), o3(0xE8,0x89,0xA4),
+     o3(0xE8,0x89,0xA2), o3(0xE8,0x89,0xA8),
+     o3(0xE8,0x89,0xAA), o3(0xE8,0x89,0xAB),
+     o3(0xE8,0x88,0xAE), o3(0xE8,0x89,0xB1),
+     o3(0xE8,0x89,0xB7), o3(0xE8,0x89,0xB8),
+     o3(0xE8,0x89,0xBE), o3(0xE8,0x8A,0x8D),
+     o3(0xE8,0x8A,0x92), o3(0xE8,0x8A,0xAB),
+     o3(0xE8,0x8A,0x9F), o3(0xE8,0x8A,0xBB),
+     o3(0xE8,0x8A,0xAC), o3(0xE8,0x8B,0xA1),
+     o3(0xE8,0x8B,0xA3), o3(0xE8,0x8B,0x9F),
+     o3(0xE8,0x8B,0x92), o3(0xE8,0x8B,0xB4),
+     o3(0xE8,0x8B,0xB3), o3(0xE8,0x8B,0xBA),
+     o3(0xE8,0x8E,0x93), o3(0xE8,0x8C,0x83),
+     o3(0xE8,0x8B,0xBB), o3(0xE8,0x8B,0xB9),
+     o3(0xE8,0x8B,0x9E), o3(0xE8,0x8C,0x86),
+     o3(0xE8,0x8B,0x9C), o3(0xE8,0x8C,0x89),
+     o3(0xE8,0x8B,0x99),
+
+#define from_EUC_JP_E7 WORDINDEX2INFO(12364)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E7_infos,
+
+#define from_EUC_JP_E8_infos WORDINDEX2INFO(12366)
+                INVALID, o3(0xE8,0x8C,0xB5),
+     o3(0xE8,0x8C,0xB4), o3(0xE8,0x8C,0x96),
+     o3(0xE8,0x8C,0xB2), o3(0xE8,0x8C,0xB1),
+     o3(0xE8,0x8D,0x80), o3(0xE8,0x8C,0xB9),
+     o3(0xE8,0x8D,0x90), o3(0xE8,0x8D,0x85),
+     o3(0xE8,0x8C,0xAF), o3(0xE8,0x8C,0xAB),
+     o3(0xE8,0x8C,0x97), o3(0xE8,0x8C,0x98),
+     o3(0xE8,0x8E,0x85), o3(0xE8,0x8E,0x9A),
+     o3(0xE8,0x8E,0xAA), o3(0xE8,0x8E,0x9F),
+     o3(0xE8,0x8E,0xA2), o3(0xE8,0x8E,0x96),
+     o3(0xE8,0x8C,0xA3), o3(0xE8,0x8E,0x8E),
+     o3(0xE8,0x8E,0x87), o3(0xE8,0x8E,0x8A),
+     o3(0xE8,0x8D,0xBC), o3(0xE8,0x8E,0xB5),
+     o3(0xE8,0x8D,0xB3), o3(0xE8,0x8D,0xB5),
+     o3(0xE8,0x8E,0xA0), o3(0xE8,0x8E,0x89),
+     o3(0xE8,0x8E,0xA8), o3(0xE8,0x8F,0xB4),
+     o3(0xE8,0x90,0x93), o3(0xE8,0x8F,0xAB),
+     o3(0xE8,0x8F,0x8E), o3(0xE8,0x8F,0xBD),
+     o3(0xE8,0x90,0x83), o3(0xE8,0x8F,0x98),
+     o3(0xE8,0x90,0x8B), o3(0xE8,0x8F,0x81),
+     o3(0xE8,0x8F,0xB7), o3(0xE8,0x90,0x87),
+     o3(0xE8,0x8F,0xA0), o3(0xE8,0x8F,0xB2),
+     o3(0xE8,0x90,0x8D), o3(0xE8,0x90,0xA2),
+     o3(0xE8,0x90,0xA0), o3(0xE8,0x8E,0xBD),
+     o3(0xE8,0x90,0xB8), o3(0xE8,0x94,0x86),
+     o3(0xE8,0x8F,0xBB), o3(0xE8,0x91,0xAD),
+     o3(0xE8,0x90,0xAA), o3(0xE8,0x90,0xBC),
+     o3(0xE8,0x95,0x9A), o3(0xE8,0x92,0x84),
+     o3(0xE8,0x91,0xB7), o3(0xE8,0x91,0xAB),
+     o3(0xE8,0x92,0xAD), o3(0xE8,0x91,0xAE),
+     o3(0xE8,0x92,0x82), o3(0xE8,0x91,0xA9),
+     o3(0xE8,0x91,0x86), o3(0xE8,0x90,0xAC),
+     o3(0xE8,0x91,0xAF), o3(0xE8,0x91,0xB9),
+     o3(0xE8,0x90,0xB5), o3(0xE8,0x93,0x8A),
+     o3(0xE8,0x91,0xA2), o3(0xE8,0x92,0xB9),
+     o3(0xE8,0x92,0xBF), o3(0xE8,0x92,0x9F),
+     o3(0xE8,0x93,0x99), o3(0xE8,0x93,0x8D),
+     o3(0xE8,0x92,0xBB), o3(0xE8,0x93,0x9A),
+     o3(0xE8,0x93,0x90), o3(0xE8,0x93,0x81),
+     o3(0xE8,0x93,0x86), o3(0xE8,0x93,0x96),
+     o3(0xE8,0x92,0xA1), o3(0xE8,0x94,0xA1),
+     o3(0xE8,0x93,0xBF), o3(0xE8,0x93,0xB4),
+     o3(0xE8,0x94,0x97), o3(0xE8,0x94,0x98),
+     o3(0xE8,0x94,0xAC), o3(0xE8,0x94,0x9F),
+     o3(0xE8,0x94,0x95), o3(0xE8,0x94,0x94),
+     o3(0xE8,0x93,0xBC), o3(0xE8,0x95,0x80),
+     o3(0xE8,0x95,0xA3), o3(0xE8,0x95,0x98),
+     o3(0xE8,0x95,0x88),
+
+#define from_EUC_JP_E8 WORDINDEX2INFO(12461)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E8_infos,
+
+#define from_EUC_JP_E9_infos WORDINDEX2INFO(12463)
+                INVALID, o3(0xE8,0x95,0x81),
+     o3(0xE8,0x98,0x82), o3(0xE8,0x95,0x8B),
+     o3(0xE8,0x95,0x95), o3(0xE8,0x96,0x80),
+     o3(0xE8,0x96,0xA4), o3(0xE8,0x96,0x88),
+     o3(0xE8,0x96,0x91), o3(0xE8,0x96,0x8A),
+     o3(0xE8,0x96,0xA8), o3(0xE8,0x95,0xAD),
+     o3(0xE8,0x96,0x94), o3(0xE8,0x96,0x9B),
+     o3(0xE8,0x97,0xAA), o3(0xE8,0x96,0x87),
+     o3(0xE8,0x96,0x9C), o3(0xE8,0x95,0xB7),
+     o3(0xE8,0x95,0xBE), o3(0xE8,0x96,0x90),
+     o3(0xE8,0x97,0x89), o3(0xE8,0x96,0xBA),
+     o3(0xE8,0x97,0x8F), o3(0xE8,0x96,0xB9),
+     o3(0xE8,0x97,0x90), o3(0xE8,0x97,0x95),
+     o3(0xE8,0x97,0x9D), o3(0xE8,0x97,0xA5),
+     o3(0xE8,0x97,0x9C), o3(0xE8,0x97,0xB9),
+     o3(0xE8,0x98,0x8A), o3(0xE8,0x98,0x93),
+     o3(0xE8,0x98,0x8B), o3(0xE8,0x97,0xBE),
+     o3(0xE8,0x97,0xBA), o3(0xE8,0x98,0x86),
+     o3(0xE8,0x98,0xA2), o3(0xE8,0x98,0x9A),
+     o3(0xE8,0x98,0xB0), o3(0xE8,0x98,0xBF),
+     o3(0xE8,0x99,0x8D), o3(0xE4,0xB9,0x95),
+     o3(0xE8,0x99,0x94), o3(0xE8,0x99,0x9F),
+     o3(0xE8,0x99,0xA7), o3(0xE8,0x99,0xB1),
+     o3(0xE8,0x9A,0x93), o3(0xE8,0x9A,0xA3),
+     o3(0xE8,0x9A,0xA9), o3(0xE8,0x9A,0xAA),
+     o3(0xE8,0x9A,0x8B), o3(0xE8,0x9A,0x8C),
+     o3(0xE8,0x9A,0xB6), o3(0xE8,0x9A,0xAF),
+     o3(0xE8,0x9B,0x84), o3(0xE8,0x9B,0x86),
+     o3(0xE8,0x9A,0xB0), o3(0xE8,0x9B,0x89),
+     o3(0xE8,0xA0,0xA3), o3(0xE8,0x9A,0xAB),
+     o3(0xE8,0x9B,0x94), o3(0xE8,0x9B,0x9E),
+     o3(0xE8,0x9B,0xA9), o3(0xE8,0x9B,0xAC),
+     o3(0xE8,0x9B,0x9F), o3(0xE8,0x9B,0x9B),
+     o3(0xE8,0x9B,0xAF), o3(0xE8,0x9C,0x92),
+     o3(0xE8,0x9C,0x86), o3(0xE8,0x9C,0x88),
+     o3(0xE8,0x9C,0x80), o3(0xE8,0x9C,0x83),
+     o3(0xE8,0x9B,0xBB), o3(0xE8,0x9C,0x91),
+     o3(0xE8,0x9C,0x89), o3(0xE8,0x9C,0x8D),
+     o3(0xE8,0x9B,0xB9), o3(0xE8,0x9C,0x8A),
+     o3(0xE8,0x9C,0xB4), o3(0xE8,0x9C,0xBF),
+     o3(0xE8,0x9C,0xB7), o3(0xE8,0x9C,0xBB),
+     o3(0xE8,0x9C,0xA5), o3(0xE8,0x9C,0xA9),
+     o3(0xE8,0x9C,0x9A), o3(0xE8,0x9D,0xA0),
+     o3(0xE8,0x9D,0x9F), o3(0xE8,0x9D,0xB8),
+     o3(0xE8,0x9D,0x8C), o3(0xE8,0x9D,0x8E),
+     o3(0xE8,0x9D,0xB4), o3(0xE8,0x9D,0x97),
+     o3(0xE8,0x9D,0xA8), o3(0xE8,0x9D,0xAE),
+     o3(0xE8,0x9D,0x99),
+
+#define from_EUC_JP_E9 WORDINDEX2INFO(12558)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_E9_infos,
+
+#define from_EUC_JP_EA_infos WORDINDEX2INFO(12560)
+                INVALID, o3(0xE8,0x9D,0x93),
+     o3(0xE8,0x9D,0xA3), o3(0xE8,0x9D,0xAA),
+     o3(0xE8,0xA0,0x85), o3(0xE8,0x9E,0xA2),
+     o3(0xE8,0x9E,0x9F), o3(0xE8,0x9E,0x82),
+     o3(0xE8,0x9E,0xAF), o3(0xE8,0x9F,0x8B),
+     o3(0xE8,0x9E,0xBD), o3(0xE8,0x9F,0x80),
+     o3(0xE8,0x9F,0x90), o3(0xE9,0x9B,0x96),
+     o3(0xE8,0x9E,0xAB), o3(0xE8,0x9F,0x84),
+     o3(0xE8,0x9E,0xB3), o3(0xE8,0x9F,0x87),
+     o3(0xE8,0x9F,0x86), o3(0xE8,0x9E,0xBB),
+     o3(0xE8,0x9F,0xAF), o3(0xE8,0x9F,0xB2),
+     o3(0xE8,0x9F,0xA0), o3(0xE8,0xA0,0x8F),
+     o3(0xE8,0xA0,0x8D), o3(0xE8,0x9F,0xBE),
+     o3(0xE8,0x9F,0xB6), o3(0xE8,0x9F,0xB7),
+     o3(0xE8,0xA0,0x8E), o3(0xE8,0x9F,0x92),
+     o3(0xE8,0xA0,0x91), o3(0xE8,0xA0,0x96),
+     o3(0xE8,0xA0,0x95), o3(0xE8,0xA0,0xA2),
+     o3(0xE8,0xA0,0xA1), o3(0xE8,0xA0,0xB1),
+     o3(0xE8,0xA0,0xB6), o3(0xE8,0xA0,0xB9),
+     o3(0xE8,0xA0,0xA7), o3(0xE8,0xA0,0xBB),
+     o3(0xE8,0xA1,0x84), o3(0xE8,0xA1,0x82),
+     o3(0xE8,0xA1,0x92), o3(0xE8,0xA1,0x99),
+     o3(0xE8,0xA1,0x9E), o3(0xE8,0xA1,0xA2),
+     o3(0xE8,0xA1,0xAB), o3(0xE8,0xA2,0x81),
+     o3(0xE8,0xA1,0xBE), o3(0xE8,0xA2,0x9E),
+     o3(0xE8,0xA1,0xB5), o3(0xE8,0xA1,0xBD),
+     o3(0xE8,0xA2,0xB5), o3(0xE8,0xA1,0xB2),
+     o3(0xE8,0xA2,0x82), o3(0xE8,0xA2,0x97),
+     o3(0xE8,0xA2,0x92), o3(0xE8,0xA2,0xAE),
+     o3(0xE8,0xA2,0x99), o3(0xE8,0xA2,0xA2),
+     o3(0xE8,0xA2,0x8D), o3(0xE8,0xA2,0xA4),
+     o3(0xE8,0xA2,0xB0), o3(0xE8,0xA2,0xBF),
+     o3(0xE8,0xA2,0xB1), o3(0xE8,0xA3,0x83),
+     o3(0xE8,0xA3,0x84), o3(0xE8,0xA3,0x94),
+     o3(0xE8,0xA3,0x98), o3(0xE8,0xA3,0x99),
+     o3(0xE8,0xA3,0x9D), o3(0xE8,0xA3,0xB9),
+     o3(0xE8,0xA4,0x82), o3(0xE8,0xA3,0xBC),
+     o3(0xE8,0xA3,0xB4), o3(0xE8,0xA3,0xA8),
+     o3(0xE8,0xA3,0xB2), o3(0xE8,0xA4,0x84),
+     o3(0xE8,0xA4,0x8C), o3(0xE8,0xA4,0x8A),
+     o3(0xE8,0xA4,0x93), o3(0xE8,0xA5,0x83),
+     o3(0xE8,0xA4,0x9E), o3(0xE8,0xA4,0xA5),
+     o3(0xE8,0xA4,0xAA), o3(0xE8,0xA4,0xAB),
+     o3(0xE8,0xA5,0x81), o3(0xE8,0xA5,0x84),
+     o3(0xE8,0xA4,0xBB), o3(0xE8,0xA4,0xB6),
+     o3(0xE8,0xA4,0xB8), o3(0xE8,0xA5,0x8C),
+     o3(0xE8,0xA4,0x9D), o3(0xE8,0xA5,0xA0),
+     o3(0xE8,0xA5,0x9E),
+
+#define from_EUC_JP_EA WORDINDEX2INFO(12655)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_EA_infos,
+
+#define from_EUC_JP_EB_infos WORDINDEX2INFO(12657)
+                INVALID, o3(0xE8,0xA5,0xA6),
+     o3(0xE8,0xA5,0xA4), o3(0xE8,0xA5,0xAD),
+     o3(0xE8,0xA5,0xAA), o3(0xE8,0xA5,0xAF),
+     o3(0xE8,0xA5,0xB4), o3(0xE8,0xA5,0xB7),
+     o3(0xE8,0xA5,0xBE), o3(0xE8,0xA6,0x83),
+     o3(0xE8,0xA6,0x88), o3(0xE8,0xA6,0x8A),
+     o3(0xE8,0xA6,0x93), o3(0xE8,0xA6,0x98),
+     o3(0xE8,0xA6,0xA1), o3(0xE8,0xA6,0xA9),
+     o3(0xE8,0xA6,0xA6), o3(0xE8,0xA6,0xAC),
+     o3(0xE8,0xA6,0xAF), o3(0xE8,0xA6,0xB2),
+     o3(0xE8,0xA6,0xBA), o3(0xE8,0xA6,0xBD),
+     o3(0xE8,0xA6,0xBF), o3(0xE8,0xA7,0x80),
+     o3(0xE8,0xA7,0x9A), o3(0xE8,0xA7,0x9C),
+     o3(0xE8,0xA7,0x9D), o3(0xE8,0xA7,0xA7),
+     o3(0xE8,0xA7,0xB4), o3(0xE8,0xA7,0xB8),
+     o3(0xE8,0xA8,0x83), o3(0xE8,0xA8,0x96),
+     o3(0xE8,0xA8,0x90), o3(0xE8,0xA8,0x8C),
+     o3(0xE8,0xA8,0x9B), o3(0xE8,0xA8,0x9D),
+     o3(0xE8,0xA8,0xA5), o3(0xE8,0xA8,0xB6),
+     o3(0xE8,0xA9,0x81), o3(0xE8,0xA9,0x9B),
+     o3(0xE8,0xA9,0x92), o3(0xE8,0xA9,0x86),
+     o3(0xE8,0xA9,0x88), o3(0xE8,0xA9,0xBC),
+     o3(0xE8,0xA9,0xAD), o3(0xE8,0xA9,0xAC),
+     o3(0xE8,0xA9,0xA2), o3(0xE8,0xAA,0x85),
+     o3(0xE8,0xAA,0x82), o3(0xE8,0xAA,0x84),
+     o3(0xE8,0xAA,0xA8), o3(0xE8,0xAA,0xA1),
+     o3(0xE8,0xAA,0x91), o3(0xE8,0xAA,0xA5),
+     o3(0xE8,0xAA,0xA6), o3(0xE8,0xAA,0x9A),
+     o3(0xE8,0xAA,0xA3), o3(0xE8,0xAB,0x84),
+     o3(0xE8,0xAB,0x8D), o3(0xE8,0xAB,0x82),
+     o3(0xE8,0xAB,0x9A), o3(0xE8,0xAB,0xAB),
+     o3(0xE8,0xAB,0xB3), o3(0xE8,0xAB,0xA7),
+     o3(0xE8,0xAB,0xA4), o3(0xE8,0xAB,0xB1),
+     o3(0xE8,0xAC,0x94), o3(0xE8,0xAB,0xA0),
+     o3(0xE8,0xAB,0xA2), o3(0xE8,0xAB,0xB7),
+     o3(0xE8,0xAB,0x9E), o3(0xE8,0xAB,0x9B),
+     o3(0xE8,0xAC,0x8C), o3(0xE8,0xAC,0x87),
+     o3(0xE8,0xAC,0x9A), o3(0xE8,0xAB,0xA1),
+     o3(0xE8,0xAC,0x96), o3(0xE8,0xAC,0x90),
+     o3(0xE8,0xAC,0x97), o3(0xE8,0xAC,0xA0),
+     o3(0xE8,0xAC,0xB3), o3(0xE9,0x9E,0xAB),
+     o3(0xE8,0xAC,0xA6), o3(0xE8,0xAC,0xAB),
+     o3(0xE8,0xAC,0xBE), o3(0xE8,0xAC,0xA8),
+     o3(0xE8,0xAD,0x81), o3(0xE8,0xAD,0x8C),
+     o3(0xE8,0xAD,0x8F), o3(0xE8,0xAD,0x8E),
+     o3(0xE8,0xAD,0x89), o3(0xE8,0xAD,0x96),
+     o3(0xE8,0xAD,0x9B), o3(0xE8,0xAD,0x9A),
+     o3(0xE8,0xAD,0xAB),
+
+#define from_EUC_JP_EB WORDINDEX2INFO(12752)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_EB_infos,
+
+#define from_EUC_JP_EC_infos WORDINDEX2INFO(12754)
+                INVALID, o3(0xE8,0xAD,0x9F),
+     o3(0xE8,0xAD,0xAC), o3(0xE8,0xAD,0xAF),
+     o3(0xE8,0xAD,0xB4), o3(0xE8,0xAD,0xBD),
+     o3(0xE8,0xAE,0x80), o3(0xE8,0xAE,0x8C),
+     o3(0xE8,0xAE,0x8E), o3(0xE8,0xAE,0x92),
+     o3(0xE8,0xAE,0x93), o3(0xE8,0xAE,0x96),
+     o3(0xE8,0xAE,0x99), o3(0xE8,0xAE,0x9A),
+     o3(0xE8,0xB0,0xBA), o3(0xE8,0xB1,0x81),
+     o3(0xE8,0xB0,0xBF), o3(0xE8,0xB1,0x88),
+     o3(0xE8,0xB1,0x8C), o3(0xE8,0xB1,0x8E),
+     o3(0xE8,0xB1,0x90), o3(0xE8,0xB1,0x95),
+     o3(0xE8,0xB1,0xA2), o3(0xE8,0xB1,0xAC),
+     o3(0xE8,0xB1,0xB8), o3(0xE8,0xB1,0xBA),
+     o3(0xE8,0xB2,0x82), o3(0xE8,0xB2,0x89),
+     o3(0xE8,0xB2,0x85), o3(0xE8,0xB2,0x8A),
+     o3(0xE8,0xB2,0x8D), o3(0xE8,0xB2,0x8E),
+     o3(0xE8,0xB2,0x94), o3(0xE8,0xB1,0xBC),
+     o3(0xE8,0xB2,0x98), o3(0xE6,0x88,0x9D),
+     o3(0xE8,0xB2,0xAD), o3(0xE8,0xB2,0xAA),
+     o3(0xE8,0xB2,0xBD), o3(0xE8,0xB2,0xB2),
+     o3(0xE8,0xB2,0xB3), o3(0xE8,0xB2,0xAE),
+     o3(0xE8,0xB2,0xB6), o3(0xE8,0xB3,0x88),
+     o3(0xE8,0xB3,0x81), o3(0xE8,0xB3,0xA4),
+     o3(0xE8,0xB3,0xA3), o3(0xE8,0xB3,0x9A),
+     o3(0xE8,0xB3,0xBD), o3(0xE8,0xB3,0xBA),
+     o3(0xE8,0xB3,0xBB), o3(0xE8,0xB4,0x84),
+     o3(0xE8,0xB4,0x85), o3(0xE8,0xB4,0x8A),
+     o3(0xE8,0xB4,0x87), o3(0xE8,0xB4,0x8F),
+     o3(0xE8,0xB4,0x8D), o3(0xE8,0xB4,0x90),
+     o3(0xE9,0xBD,0x8E), o3(0xE8,0xB4,0x93),
+     o3(0xE8,0xB3,0x8D), o3(0xE8,0xB4,0x94),
+     o3(0xE8,0xB4,0x96), o3(0xE8,0xB5,0xA7),
+     o3(0xE8,0xB5,0xAD), o3(0xE8,0xB5,0xB1),
+     o3(0xE8,0xB5,0xB3), o3(0xE8,0xB6,0x81),
+     o3(0xE8,0xB6,0x99), o3(0xE8,0xB7,0x82),
+     o3(0xE8,0xB6,0xBE), o3(0xE8,0xB6,0xBA),
+     o3(0xE8,0xB7,0x8F), o3(0xE8,0xB7,0x9A),
+     o3(0xE8,0xB7,0x96), o3(0xE8,0xB7,0x8C),
+     o3(0xE8,0xB7,0x9B), o3(0xE8,0xB7,0x8B),
+     o3(0xE8,0xB7,0xAA), o3(0xE8,0xB7,0xAB),
+     o3(0xE8,0xB7,0x9F), o3(0xE8,0xB7,0xA3),
+     o3(0xE8,0xB7,0xBC), o3(0xE8,0xB8,0x88),
+     o3(0xE8,0xB8,0x89), o3(0xE8,0xB7,0xBF),
+     o3(0xE8,0xB8,0x9D), o3(0xE8,0xB8,0x9E),
+     o3(0xE8,0xB8,0x90), o3(0xE8,0xB8,0x9F),
+     o3(0xE8,0xB9,0x82), o3(0xE8,0xB8,0xB5),
+     o3(0xE8,0xB8,0xB0), o3(0xE8,0xB8,0xB4),
+     o3(0xE8,0xB9,0x8A),
+
+#define from_EUC_JP_EC WORDINDEX2INFO(12849)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_EC_infos,
+
+#define from_EUC_JP_ED_infos WORDINDEX2INFO(12851)
+                INVALID, o3(0xE8,0xB9,0x87),
+     o3(0xE8,0xB9,0x89), o3(0xE8,0xB9,0x8C),
+     o3(0xE8,0xB9,0x90), o3(0xE8,0xB9,0x88),
+     o3(0xE8,0xB9,0x99), o3(0xE8,0xB9,0xA4),
+     o3(0xE8,0xB9,0xA0), o3(0xE8,0xB8,0xAA),
+     o3(0xE8,0xB9,0xA3), o3(0xE8,0xB9,0x95),
+     o3(0xE8,0xB9,0xB6), o3(0xE8,0xB9,0xB2),
+     o3(0xE8,0xB9,0xBC), o3(0xE8,0xBA,0x81),
+     o3(0xE8,0xBA,0x87), o3(0xE8,0xBA,0x85),
+     o3(0xE8,0xBA,0x84), o3(0xE8,0xBA,0x8B),
+     o3(0xE8,0xBA,0x8A), o3(0xE8,0xBA,0x93),
+     o3(0xE8,0xBA,0x91), o3(0xE8,0xBA,0x94),
+     o3(0xE8,0xBA,0x99), o3(0xE8,0xBA,0xAA),
+     o3(0xE8,0xBA,0xA1), o3(0xE8,0xBA,0xAC),
+     o3(0xE8,0xBA,0xB0), o3(0xE8,0xBB,0x86),
+     o3(0xE8,0xBA,0xB1), o3(0xE8,0xBA,0xBE),
+     o3(0xE8,0xBB,0x85), o3(0xE8,0xBB,0x88),
+     o3(0xE8,0xBB,0x8B), o3(0xE8,0xBB,0x9B),
+     o3(0xE8,0xBB,0xA3), o3(0xE8,0xBB,0xBC),
+     o3(0xE8,0xBB,0xBB), o3(0xE8,0xBB,0xAB),
+     o3(0xE8,0xBB,0xBE), o3(0xE8,0xBC,0x8A),
+     o3(0xE8,0xBC,0x85), o3(0xE8,0xBC,0x95),
+     o3(0xE8,0xBC,0x92), o3(0xE8,0xBC,0x99),
+     o3(0xE8,0xBC,0x93), o3(0xE8,0xBC,0x9C),
+     o3(0xE8,0xBC,0x9F), o3(0xE8,0xBC,0x9B),
+     o3(0xE8,0xBC,0x8C), o3(0xE8,0xBC,0xA6),
+     o3(0xE8,0xBC,0xB3), o3(0xE8,0xBC,0xBB),
+     o3(0xE8,0xBC,0xB9), o3(0xE8,0xBD,0x85),
+     o3(0xE8,0xBD,0x82), o3(0xE8,0xBC,0xBE),
+     o3(0xE8,0xBD,0x8C), o3(0xE8,0xBD,0x89),
+     o3(0xE8,0xBD,0x86), o3(0xE8,0xBD,0x8E),
+     o3(0xE8,0xBD,0x97), o3(0xE8,0xBD,0x9C),
+     o3(0xE8,0xBD,0xA2), o3(0xE8,0xBD,0xA3),
+     o3(0xE8,0xBD,0xA4), o3(0xE8,0xBE,0x9C),
+     o3(0xE8,0xBE,0x9F), o3(0xE8,0xBE,0xA3),
+     o3(0xE8,0xBE,0xAD), o3(0xE8,0xBE,0xAF),
+     o3(0xE8,0xBE,0xB7), o3(0xE8,0xBF,0x9A),
+     o3(0xE8,0xBF,0xA5), o3(0xE8,0xBF,0xA2),
+     o3(0xE8,0xBF,0xAA), o3(0xE8,0xBF,0xAF),
+     o3(0xE9,0x82,0x87), o3(0xE8,0xBF,0xB4),
+     o3(0xE9,0x80,0x85), o3(0xE8,0xBF,0xB9),
+     o3(0xE8,0xBF,0xBA), o3(0xE9,0x80,0x91),
+     o3(0xE9,0x80,0x95), o3(0xE9,0x80,0xA1),
+     o3(0xE9,0x80,0x8D), o3(0xE9,0x80,0x9E),
+     o3(0xE9,0x80,0x96), o3(0xE9,0x80,0x8B),
+     o3(0xE9,0x80,0xA7), o3(0xE9,0x80,0xB6),
+     o3(0xE9,0x80,0xB5), o3(0xE9,0x80,0xB9),
+     o3(0xE8,0xBF,0xB8),
+
+#define from_EUC_JP_ED WORDINDEX2INFO(12946)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_ED_infos,
+
+#define from_EUC_JP_EE_infos WORDINDEX2INFO(12948)
+                INVALID, o3(0xE9,0x81,0x8F),
+     o3(0xE9,0x81,0x90), o3(0xE9,0x81,0x91),
+     o3(0xE9,0x81,0x92), o3(0xE9,0x80,0x8E),
+     o3(0xE9,0x81,0x89), o3(0xE9,0x80,0xBE),
+     o3(0xE9,0x81,0x96), o3(0xE9,0x81,0x98),
+     o3(0xE9,0x81,0x9E), o3(0xE9,0x81,0xA8),
+     o3(0xE9,0x81,0xAF), o3(0xE9,0x81,0xB6),
+     o3(0xE9,0x9A,0xA8), o3(0xE9,0x81,0xB2),
+     o3(0xE9,0x82,0x82), o3(0xE9,0x81,0xBD),
+     o3(0xE9,0x82,0x81), o3(0xE9,0x82,0x80),
+     o3(0xE9,0x82,0x8A), o3(0xE9,0x82,0x89),
+     o3(0xE9,0x82,0x8F), o3(0xE9,0x82,0xA8),
+     o3(0xE9,0x82,0xAF), o3(0xE9,0x82,0xB1),
+     o3(0xE9,0x82,0xB5), o3(0xE9,0x83,0xA2),
+     o3(0xE9,0x83,0xA4), o3(0xE6,0x89,0x88),
+     o3(0xE9,0x83,0x9B), o3(0xE9,0x84,0x82),
+     o3(0xE9,0x84,0x92), o3(0xE9,0x84,0x99),
+     o3(0xE9,0x84,0xB2), o3(0xE9,0x84,0xB0),
+     o3(0xE9,0x85,0x8A), o3(0xE9,0x85,0x96),
+     o3(0xE9,0x85,0x98), o3(0xE9,0x85,0xA3),
+     o3(0xE9,0x85,0xA5), o3(0xE9,0x85,0xA9),
+     o3(0xE9,0x85,0xB3), o3(0xE9,0x85,0xB2),
+     o3(0xE9,0x86,0x8B), o3(0xE9,0x86,0x89),
+     o3(0xE9,0x86,0x82), o3(0xE9,0x86,0xA2),
+     o3(0xE9,0x86,0xAB), o3(0xE9,0x86,0xAF),
+     o3(0xE9,0x86,0xAA), o3(0xE9,0x86,0xB5),
+     o3(0xE9,0x86,0xB4), o3(0xE9,0x86,0xBA),
+     o3(0xE9,0x87,0x80), o3(0xE9,0x87,0x81),
+     o3(0xE9,0x87,0x89), o3(0xE9,0x87,0x8B),
+     o3(0xE9,0x87,0x90), o3(0xE9,0x87,0x96),
+     o3(0xE9,0x87,0x9F), o3(0xE9,0x87,0xA1),
+     o3(0xE9,0x87,0x9B), o3(0xE9,0x87,0xBC),
+     o3(0xE9,0x87,0xB5), o3(0xE9,0x87,0xB6),
+     o3(0xE9,0x88,0x9E), o3(0xE9,0x87,0xBF),
+     o3(0xE9,0x88,0x94), o3(0xE9,0x88,0xAC),
+     o3(0xE9,0x88,0x95), o3(0xE9,0x88,0x91),
+     o3(0xE9,0x89,0x9E), o3(0xE9,0x89,0x97),
+     o3(0xE9,0x89,0x85), o3(0xE9,0x89,0x89),
+     o3(0xE9,0x89,0xA4), o3(0xE9,0x89,0x88),
+     o3(0xE9,0x8A,0x95), o3(0xE9,0x88,0xBF),
+     o3(0xE9,0x89,0x8B), o3(0xE9,0x89,0x90),
+     o3(0xE9,0x8A,0x9C), o3(0xE9,0x8A,0x96),
+     o3(0xE9,0x8A,0x93), o3(0xE9,0x8A,0x9B),
+     o3(0xE9,0x89,0x9A), o3(0xE9,0x8B,0x8F),
+     o3(0xE9,0x8A,0xB9), o3(0xE9,0x8A,0xB7),
+     o3(0xE9,0x8B,0xA9), o3(0xE9,0x8C,0x8F),
+     o3(0xE9,0x8B,0xBA), o3(0xE9,0x8D,0x84),
+     o3(0xE9,0x8C,0xAE),
+
+#define from_EUC_JP_EE WORDINDEX2INFO(13043)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_EE_infos,
+
+#define from_EUC_JP_EF_infos WORDINDEX2INFO(13045)
+                INVALID, o3(0xE9,0x8C,0x99),
+     o3(0xE9,0x8C,0xA2), o3(0xE9,0x8C,0x9A),
+     o3(0xE9,0x8C,0xA3), o3(0xE9,0x8C,0xBA),
+     o3(0xE9,0x8C,0xB5), o3(0xE9,0x8C,0xBB),
+     o3(0xE9,0x8D,0x9C), o3(0xE9,0x8D,0xA0),
+     o3(0xE9,0x8D,0xBC), o3(0xE9,0x8D,0xAE),
+     o3(0xE9,0x8D,0x96), o3(0xE9,0x8E,0xB0),
+     o3(0xE9,0x8E,0xAC), o3(0xE9,0x8E,0xAD),
+     o3(0xE9,0x8E,0x94), o3(0xE9,0x8E,0xB9),
+     o3(0xE9,0x8F,0x96), o3(0xE9,0x8F,0x97),
+     o3(0xE9,0x8F,0xA8), o3(0xE9,0x8F,0xA5),
+     o3(0xE9,0x8F,0x98), o3(0xE9,0x8F,0x83),
+     o3(0xE9,0x8F,0x9D), o3(0xE9,0x8F,0x90),
+     o3(0xE9,0x8F,0x88), o3(0xE9,0x8F,0xA4),
+     o3(0xE9,0x90,0x9A), o3(0xE9,0x90,0x94),
+     o3(0xE9,0x90,0x93), o3(0xE9,0x90,0x83),
+     o3(0xE9,0x90,0x87), o3(0xE9,0x90,0x90),
+     o3(0xE9,0x90,0xB6), o3(0xE9,0x90,0xAB),
+     o3(0xE9,0x90,0xB5), o3(0xE9,0x90,0xA1),
+     o3(0xE9,0x90,0xBA), o3(0xE9,0x91,0x81),
+     o3(0xE9,0x91,0x92), o3(0xE9,0x91,0x84),
+     o3(0xE9,0x91,0x9B), o3(0xE9,0x91,0xA0),
+     o3(0xE9,0x91,0xA2), o3(0xE9,0x91,0x9E),
+     o3(0xE9,0x91,0xAA), o3(0xE9,0x88,0xA9),
+     o3(0xE9,0x91,0xB0), o3(0xE9,0x91,0xB5),
+     o3(0xE9,0x91,0xB7), o3(0xE9,0x91,0xBD),
+     o3(0xE9,0x91,0x9A), o3(0xE9,0x91,0xBC),
+     o3(0xE9,0x91,0xBE), o3(0xE9,0x92,0x81),
+     o3(0xE9,0x91,0xBF), o3(0xE9,0x96,0x82),
+     o3(0xE9,0x96,0x87), o3(0xE9,0x96,0x8A),
+     o3(0xE9,0x96,0x94), o3(0xE9,0x96,0x96),
+     o3(0xE9,0x96,0x98), o3(0xE9,0x96,0x99),
+     o3(0xE9,0x96,0xA0), o3(0xE9,0x96,0xA8),
+     o3(0xE9,0x96,0xA7), o3(0xE9,0x96,0xAD),
+     o3(0xE9,0x96,0xBC), o3(0xE9,0x96,0xBB),
+     o3(0xE9,0x96,0xB9), o3(0xE9,0x96,0xBE),
+     o3(0xE9,0x97,0x8A), o3(0xE6,0xBF,0xB6),
+     o3(0xE9,0x97,0x83), o3(0xE9,0x97,0x8D),
+     o3(0xE9,0x97,0x8C), o3(0xE9,0x97,0x95),
+     o3(0xE9,0x97,0x94), o3(0xE9,0x97,0x96),
+     o3(0xE9,0x97,0x9C), o3(0xE9,0x97,0xA1),
+     o3(0xE9,0x97,0xA5), o3(0xE9,0x97,0xA2),
+     o3(0xE9,0x98,0xA1), o3(0xE9,0x98,0xA8),
+     o3(0xE9,0x98,0xAE), o3(0xE9,0x98,0xAF),
+     o3(0xE9,0x99,0x82), o3(0xE9,0x99,0x8C),
+     o3(0xE9,0x99,0x8F), o3(0xE9,0x99,0x8B),
+     o3(0xE9,0x99,0xB7), o3(0xE9,0x99,0x9C),
+     o3(0xE9,0x99,0x9E),
+
+#define from_EUC_JP_EF WORDINDEX2INFO(13140)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_EF_infos,
+
+#define from_EUC_JP_F0_infos WORDINDEX2INFO(13142)
+                INVALID, o3(0xE9,0x99,0x9D),
+     o3(0xE9,0x99,0x9F), o3(0xE9,0x99,0xA6),
+     o3(0xE9,0x99,0xB2), o3(0xE9,0x99,0xAC),
+     o3(0xE9,0x9A,0x8D), o3(0xE9,0x9A,0x98),
+     o3(0xE9,0x9A,0x95), o3(0xE9,0x9A,0x97),
+     o3(0xE9,0x9A,0xAA), o3(0xE9,0x9A,0xA7),
+     o3(0xE9,0x9A,0xB1), o3(0xE9,0x9A,0xB2),
+     o3(0xE9,0x9A,0xB0), o3(0xE9,0x9A,0xB4),
+     o3(0xE9,0x9A,0xB6), o3(0xE9,0x9A,0xB8),
+     o3(0xE9,0x9A,0xB9), o3(0xE9,0x9B,0x8E),
+     o3(0xE9,0x9B,0x8B), o3(0xE9,0x9B,0x89),
+     o3(0xE9,0x9B,0x8D), o3(0xE8,0xA5,0x8D),
+     o3(0xE9,0x9B,0x9C), o3(0xE9,0x9C,0x8D),
+     o3(0xE9,0x9B,0x95), o3(0xE9,0x9B,0xB9),
+     o3(0xE9,0x9C,0x84), o3(0xE9,0x9C,0x86),
+     o3(0xE9,0x9C,0x88), o3(0xE9,0x9C,0x93),
+     o3(0xE9,0x9C,0x8E), o3(0xE9,0x9C,0x91),
+     o3(0xE9,0x9C,0x8F), o3(0xE9,0x9C,0x96),
+     o3(0xE9,0x9C,0x99), o3(0xE9,0x9C,0xA4),
+     o3(0xE9,0x9C,0xAA), o3(0xE9,0x9C,0xB0),
+     o3(0xE9,0x9C,0xB9), o3(0xE9,0x9C,0xBD),
+     o3(0xE9,0x9C,0xBE), o3(0xE9,0x9D,0x84),
+     o3(0xE9,0x9D,0x86), o3(0xE9,0x9D,0x88),
+     o3(0xE9,0x9D,0x82), o3(0xE9,0x9D,0x89),
+     o3(0xE9,0x9D,0x9C), o3(0xE9,0x9D,0xA0),
+     o3(0xE9,0x9D,0xA4), o3(0xE9,0x9D,0xA6),
+     o3(0xE9,0x9D,0xA8), o3(0xE5,0x8B,0x92),
+     o3(0xE9,0x9D,0xAB), o3(0xE9,0x9D,0xB1),
+     o3(0xE9,0x9D,0xB9), o3(0xE9,0x9E,0x85),
+     o3(0xE9,0x9D,0xBC), o3(0xE9,0x9E,0x81),
+     o3(0xE9,0x9D,0xBA), o3(0xE9,0x9E,0x86),
+     o3(0xE9,0x9E,0x8B), o3(0xE9,0x9E,0x8F),
+     o3(0xE9,0x9E,0x90), o3(0xE9,0x9E,0x9C),
+     o3(0xE9,0x9E,0xA8), o3(0xE9,0x9E,0xA6),
+     o3(0xE9,0x9E,0xA3), o3(0xE9,0x9E,0xB3),
+     o3(0xE9,0x9E,0xB4), o3(0xE9,0x9F,0x83),
+     o3(0xE9,0x9F,0x86), o3(0xE9,0x9F,0x88),
+     o3(0xE9,0x9F,0x8B), o3(0xE9,0x9F,0x9C),
+     o3(0xE9,0x9F,0xAD), o3(0xE9,0xBD,0x8F),
+     o3(0xE9,0x9F,0xB2), o3(0xE7,0xAB,0x9F),
+     o3(0xE9,0x9F,0xB6), o3(0xE9,0x9F,0xB5),
+     o3(0xE9,0xA0,0x8F), o3(0xE9,0xA0,0x8C),
+     o3(0xE9,0xA0,0xB8), o3(0xE9,0xA0,0xA4),
+     o3(0xE9,0xA0,0xA1), o3(0xE9,0xA0,0xB7),
+     o3(0xE9,0xA0,0xBD), o3(0xE9,0xA1,0x86),
+     o3(0xE9,0xA1,0x8F), o3(0xE9,0xA1,0x8B),
+     o3(0xE9,0xA1,0xAB), o3(0xE9,0xA1,0xAF),
+     o3(0xE9,0xA1,0xB0),
+
+#define from_EUC_JP_F0 WORDINDEX2INFO(13237)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_F0_infos,
+
+#define from_EUC_JP_F1_infos WORDINDEX2INFO(13239)
+                INVALID, o3(0xE9,0xA1,0xB1),
+     o3(0xE9,0xA1,0xB4), o3(0xE9,0xA1,0xB3),
+     o3(0xE9,0xA2,0xAA), o3(0xE9,0xA2,0xAF),
+     o3(0xE9,0xA2,0xB1), o3(0xE9,0xA2,0xB6),
+     o3(0xE9,0xA3,0x84), o3(0xE9,0xA3,0x83),
+     o3(0xE9,0xA3,0x86), o3(0xE9,0xA3,0xA9),
+     o3(0xE9,0xA3,0xAB), o3(0xE9,0xA4,0x83),
+     o3(0xE9,0xA4,0x89), o3(0xE9,0xA4,0x92),
+     o3(0xE9,0xA4,0x94), o3(0xE9,0xA4,0x98),
+     o3(0xE9,0xA4,0xA1), o3(0xE9,0xA4,0x9D),
+     o3(0xE9,0xA4,0x9E), o3(0xE9,0xA4,0xA4),
+     o3(0xE9,0xA4,0xA0), o3(0xE9,0xA4,0xAC),
+     o3(0xE9,0xA4,0xAE), o3(0xE9,0xA4,0xBD),
+     o3(0xE9,0xA4,0xBE), o3(0xE9,0xA5,0x82),
+     o3(0xE9,0xA5,0x89), o3(0xE9,0xA5,0x85),
+     o3(0xE9,0xA5,0x90), o3(0xE9,0xA5,0x8B),
+     o3(0xE9,0xA5,0x91), o3(0xE9,0xA5,0x92),
+     o3(0xE9,0xA5,0x8C), o3(0xE9,0xA5,0x95),
+     o3(0xE9,0xA6,0x97), o3(0xE9,0xA6,0x98),
+     o3(0xE9,0xA6,0xA5), o3(0xE9,0xA6,0xAD),
+     o3(0xE9,0xA6,0xAE), o3(0xE9,0xA6,0xBC),
+     o3(0xE9,0xA7,0x9F), o3(0xE9,0xA7,0x9B),
+     o3(0xE9,0xA7,0x9D), o3(0xE9,0xA7,0x98),
+     o3(0xE9,0xA7,0x91), o3(0xE9,0xA7,0xAD),
+     o3(0xE9,0xA7,0xAE), o3(0xE9,0xA7,0xB1),
+     o3(0xE9,0xA7,0xB2), o3(0xE9,0xA7,0xBB),
+     o3(0xE9,0xA7,0xB8), o3(0xE9,0xA8,0x81),
+     o3(0xE9,0xA8,0x8F), o3(0xE9,0xA8,0x85),
+     o3(0xE9,0xA7,0xA2), o3(0xE9,0xA8,0x99),
+     o3(0xE9,0xA8,0xAB), o3(0xE9,0xA8,0xB7),
+     o3(0xE9,0xA9,0x85), o3(0xE9,0xA9,0x82),
+     o3(0xE9,0xA9,0x80), o3(0xE9,0xA9,0x83),
+     o3(0xE9,0xA8,0xBE), o3(0xE9,0xA9,0x95),
+     o3(0xE9,0xA9,0x8D), o3(0xE9,0xA9,0x9B),
+     o3(0xE9,0xA9,0x97), o3(0xE9,0xA9,0x9F),
+     o3(0xE9,0xA9,0xA2), o3(0xE9,0xA9,0xA5),
+     o3(0xE9,0xA9,0xA4), o3(0xE9,0xA9,0xA9),
+     o3(0xE9,0xA9,0xAB), o3(0xE9,0xA9,0xAA),
+     o3(0xE9,0xAA,0xAD), o3(0xE9,0xAA,0xB0),
+     o3(0xE9,0xAA,0xBC), o3(0xE9,0xAB,0x80),
+     o3(0xE9,0xAB,0x8F), o3(0xE9,0xAB,0x91),
+     o3(0xE9,0xAB,0x93), o3(0xE9,0xAB,0x94),
+     o3(0xE9,0xAB,0x9E), o3(0xE9,0xAB,0x9F),
+     o3(0xE9,0xAB,0xA2), o3(0xE9,0xAB,0xA3),
+     o3(0xE9,0xAB,0xA6), o3(0xE9,0xAB,0xAF),
+     o3(0xE9,0xAB,0xAB), o3(0xE9,0xAB,0xAE),
+     o3(0xE9,0xAB,0xB4), o3(0xE9,0xAB,0xB1),
+     o3(0xE9,0xAB,0xB7),
+
+#define from_EUC_JP_F1 WORDINDEX2INFO(13334)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_F1_infos,
+
+#define from_EUC_JP_F2_infos WORDINDEX2INFO(13336)
+                INVALID, o3(0xE9,0xAB,0xBB),
+     o3(0xE9,0xAC,0x86), o3(0xE9,0xAC,0x98),
+     o3(0xE9,0xAC,0x9A), o3(0xE9,0xAC,0x9F),
+     o3(0xE9,0xAC,0xA2), o3(0xE9,0xAC,0xA3),
+     o3(0xE9,0xAC,0xA5), o3(0xE9,0xAC,0xA7),
+     o3(0xE9,0xAC,0xA8), o3(0xE9,0xAC,0xA9),
+     o3(0xE9,0xAC,0xAA), o3(0xE9,0xAC,0xAE),
+     o3(0xE9,0xAC,0xAF), o3(0xE9,0xAC,0xB2),
+     o3(0xE9,0xAD,0x84), o3(0xE9,0xAD,0x83),
+     o3(0xE9,0xAD,0x8F), o3(0xE9,0xAD,0x8D),
+     o3(0xE9,0xAD,0x8E), o3(0xE9,0xAD,0x91),
+     o3(0xE9,0xAD,0x98), o3(0xE9,0xAD,0xB4),
+     o3(0xE9,0xAE,0x93), o3(0xE9,0xAE,0x83),
+     o3(0xE9,0xAE,0x91), o3(0xE9,0xAE,0x96),
+     o3(0xE9,0xAE,0x97), o3(0xE9,0xAE,0x9F),
+     o3(0xE9,0xAE,0xA0), o3(0xE9,0xAE,0xA8),
+     o3(0xE9,0xAE,0xB4), o3(0xE9,0xAF,0x80),
+     o3(0xE9,0xAF,0x8A), o3(0xE9,0xAE,0xB9),
+     o3(0xE9,0xAF,0x86), o3(0xE9,0xAF,0x8F),
+     o3(0xE9,0xAF,0x91), o3(0xE9,0xAF,0x92),
+     o3(0xE9,0xAF,0xA3), o3(0xE9,0xAF,0xA2),
+     o3(0xE9,0xAF,0xA4), o3(0xE9,0xAF,0x94),
+     o3(0xE9,0xAF,0xA1), o3(0xE9,0xB0,0xBA),
+     o3(0xE9,0xAF,0xB2), o3(0xE9,0xAF,0xB1),
+     o3(0xE9,0xAF,0xB0), o3(0xE9,0xB0,0x95),
+     o3(0xE9,0xB0,0x94), o3(0xE9,0xB0,0x89),
+     o3(0xE9,0xB0,0x93), o3(0xE9,0xB0,0x8C),
+     o3(0xE9,0xB0,0x86), o3(0xE9,0xB0,0x88),
+     o3(0xE9,0xB0,0x92), o3(0xE9,0xB0,0x8A),
+     o3(0xE9,0xB0,0x84), o3(0xE9,0xB0,0xAE),
+     o3(0xE9,0xB0,0x9B), o3(0xE9,0xB0,0xA5),
+     o3(0xE9,0xB0,0xA4), o3(0xE9,0xB0,0xA1),
+     o3(0xE9,0xB0,0xB0), o3(0xE9,0xB1,0x87),
+     o3(0xE9,0xB0,0xB2), o3(0xE9,0xB1,0x86),
+     o3(0xE9,0xB0,0xBE), o3(0xE9,0xB1,0x9A),
+     o3(0xE9,0xB1,0xA0), o3(0xE9,0xB1,0xA7),
+     o3(0xE9,0xB1,0xB6), o3(0xE9,0xB1,0xB8),
+     o3(0xE9,0xB3,0xA7), o3(0xE9,0xB3,0xAC),
+     o3(0xE9,0xB3,0xB0), o3(0xE9,0xB4,0x89),
+     o3(0xE9,0xB4,0x88), o3(0xE9,0xB3,0xAB),
+     o3(0xE9,0xB4,0x83), o3(0xE9,0xB4,0x86),
+     o3(0xE9,0xB4,0xAA), o3(0xE9,0xB4,0xA6),
+     o3(0xE9,0xB6,0xAF), o3(0xE9,0xB4,0xA3),
+     o3(0xE9,0xB4,0x9F), o3(0xE9,0xB5,0x84),
+     o3(0xE9,0xB4,0x95), o3(0xE9,0xB4,0x92),
+     o3(0xE9,0xB5,0x81), o3(0xE9,0xB4,0xBF),
+     o3(0xE9,0xB4,0xBE), o3(0xE9,0xB5,0x86),
+     o3(0xE9,0xB5,0x88),
+
+#define from_EUC_JP_F2 WORDINDEX2INFO(13431)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_F2_infos,
+
+#define from_EUC_JP_F3_infos WORDINDEX2INFO(13433)
+                INVALID, o3(0xE9,0xB5,0x9D),
+     o3(0xE9,0xB5,0x9E), o3(0xE9,0xB5,0xA4),
+     o3(0xE9,0xB5,0x91), o3(0xE9,0xB5,0x90),
+     o3(0xE9,0xB5,0x99), o3(0xE9,0xB5,0xB2),
+     o3(0xE9,0xB6,0x89), o3(0xE9,0xB6,0x87),
+     o3(0xE9,0xB6,0xAB), o3(0xE9,0xB5,0xAF),
+     o3(0xE9,0xB5,0xBA), o3(0xE9,0xB6,0x9A),
+     o3(0xE9,0xB6,0xA4), o3(0xE9,0xB6,0xA9),
+     o3(0xE9,0xB6,0xB2), o3(0xE9,0xB7,0x84),
+     o3(0xE9,0xB7,0x81), o3(0xE9,0xB6,0xBB),
+     o3(0xE9,0xB6,0xB8), o3(0xE9,0xB6,0xBA),
+     o3(0xE9,0xB7,0x86), o3(0xE9,0xB7,0x8F),
+     o3(0xE9,0xB7,0x82), o3(0xE9,0xB7,0x99),
+     o3(0xE9,0xB7,0x93), o3(0xE9,0xB7,0xB8),
+     o3(0xE9,0xB7,0xA6), o3(0xE9,0xB7,0xAD),
+     o3(0xE9,0xB7,0xAF), o3(0xE9,0xB7,0xBD),
+     o3(0xE9,0xB8,0x9A), o3(0xE9,0xB8,0x9B),
+     o3(0xE9,0xB8,0x9E), o3(0xE9,0xB9,0xB5),
+     o3(0xE9,0xB9,0xB9), o3(0xE9,0xB9,0xBD),
+     o3(0xE9,0xBA,0x81), o3(0xE9,0xBA,0x88),
+     o3(0xE9,0xBA,0x8B), o3(0xE9,0xBA,0x8C),
+     o3(0xE9,0xBA,0x92), o3(0xE9,0xBA,0x95),
+     o3(0xE9,0xBA,0x91), o3(0xE9,0xBA,0x9D),
+     o3(0xE9,0xBA,0xA5), o3(0xE9,0xBA,0xA9),
+     o3(0xE9,0xBA,0xB8), o3(0xE9,0xBA,0xAA),
+     o3(0xE9,0xBA,0xAD), o3(0xE9,0x9D,0xA1),
+     o3(0xE9,0xBB,0x8C), o3(0xE9,0xBB,0x8E),
+     o3(0xE9,0xBB,0x8F), o3(0xE9,0xBB,0x90),
+     o3(0xE9,0xBB,0x94), o3(0xE9,0xBB,0x9C),
+     o3(0xE9,0xBB,0x9E), o3(0xE9,0xBB,0x9D),
+     o3(0xE9,0xBB,0xA0), o3(0xE9,0xBB,0xA5),
+     o3(0xE9,0xBB,0xA8), o3(0xE9,0xBB,0xAF),
+     o3(0xE9,0xBB,0xB4), o3(0xE9,0xBB,0xB6),
+     o3(0xE9,0xBB,0xB7), o3(0xE9,0xBB,0xB9),
+     o3(0xE9,0xBB,0xBB), o3(0xE9,0xBB,0xBC),
+     o3(0xE9,0xBB,0xBD), o3(0xE9,0xBC,0x87),
+     o3(0xE9,0xBC,0x88), o3(0xE7,0x9A,0xB7),
+     o3(0xE9,0xBC,0x95), o3(0xE9,0xBC,0xA1),
+     o3(0xE9,0xBC,0xAC), o3(0xE9,0xBC,0xBE),
+     o3(0xE9,0xBD,0x8A), o3(0xE9,0xBD,0x92),
+     o3(0xE9,0xBD,0x94), o3(0xE9,0xBD,0xA3),
+     o3(0xE9,0xBD,0x9F), o3(0xE9,0xBD,0xA0),
+     o3(0xE9,0xBD,0xA1), o3(0xE9,0xBD,0xA6),
+     o3(0xE9,0xBD,0xA7), o3(0xE9,0xBD,0xAC),
+     o3(0xE9,0xBD,0xAA), o3(0xE9,0xBD,0xB7),
+     o3(0xE9,0xBD,0xB2), o3(0xE9,0xBD,0xB6),
+     o3(0xE9,0xBE,0x95), o3(0xE9,0xBE,0x9C),
+     o3(0xE9,0xBE,0xA0),
+
+#define from_EUC_JP_F3 WORDINDEX2INFO(13528)
+    from_EUC_JP_8F_B0_offsets,
+    from_EUC_JP_F3_infos,
+
+#define from_EUC_JP_F4_infos WORDINDEX2INFO(13530)
+                INVALID, o3(0xE5,0xA0,0xAF),
+     o3(0xE6,0xA7,0x87), o3(0xE9,0x81,0x99),
+     o3(0xE7,0x91,0xA4), o3(0xE5,0x87,0x9C),
+     o3(0xE7,0x86,0x99),              UNDEF,
+
+#define from_EUC_JP_F4 WORDINDEX2INFO(13538)
+    from_EUC_JP_F4_offsets,
+    from_EUC_JP_F4_infos,
+
+#define from_EUC_JP_infos WORDINDEX2INFO(13540)
+                 NOMAP,           INVALID,
+        from_EUC_JP_8E,    from_EUC_JP_8F,
+        from_EUC_JP_A1,    from_EUC_JP_A2,
+        from_EUC_JP_A3,    from_EUC_JP_A4,
+        from_EUC_JP_A5,    from_EUC_JP_A6,
+        from_EUC_JP_A7,    from_EUC_JP_A8,
+     from_EUC_JP_8F_A1,    from_EUC_JP_B0,
+        from_EUC_JP_B1,    from_EUC_JP_B2,
+        from_EUC_JP_B3,    from_EUC_JP_B4,
+        from_EUC_JP_B5,    from_EUC_JP_B6,
+        from_EUC_JP_B7,    from_EUC_JP_B8,
+        from_EUC_JP_B9,    from_EUC_JP_BA,
+        from_EUC_JP_BB,    from_EUC_JP_BC,
+        from_EUC_JP_BD,    from_EUC_JP_BE,
+        from_EUC_JP_BF,    from_EUC_JP_C0,
+        from_EUC_JP_C1,    from_EUC_JP_C2,
+        from_EUC_JP_C3,    from_EUC_JP_C4,
+        from_EUC_JP_C5,    from_EUC_JP_C6,
+        from_EUC_JP_C7,    from_EUC_JP_C8,
+        from_EUC_JP_C9,    from_EUC_JP_CA,
+        from_EUC_JP_CB,    from_EUC_JP_CC,
+        from_EUC_JP_CD,    from_EUC_JP_CE,
+        from_EUC_JP_CF,    from_EUC_JP_D0,
+        from_EUC_JP_D1,    from_EUC_JP_D2,
+        from_EUC_JP_D3,    from_EUC_JP_D4,
+        from_EUC_JP_D5,    from_EUC_JP_D6,
+        from_EUC_JP_D7,    from_EUC_JP_D8,
+        from_EUC_JP_D9,    from_EUC_JP_DA,
+        from_EUC_JP_DB,    from_EUC_JP_DC,
+        from_EUC_JP_DD,    from_EUC_JP_DE,
+        from_EUC_JP_DF,    from_EUC_JP_E0,
+        from_EUC_JP_E1,    from_EUC_JP_E2,
+        from_EUC_JP_E3,    from_EUC_JP_E4,
+        from_EUC_JP_E5,    from_EUC_JP_E6,
+        from_EUC_JP_E7,    from_EUC_JP_E8,
+        from_EUC_JP_E9,    from_EUC_JP_EA,
+        from_EUC_JP_EB,    from_EUC_JP_EC,
+        from_EUC_JP_ED,    from_EUC_JP_EE,
+        from_EUC_JP_EF,    from_EUC_JP_F0,
+        from_EUC_JP_F1,    from_EUC_JP_F2,
+        from_EUC_JP_F3,    from_EUC_JP_F4,
+
+#define from_EUC_JP WORDINDEX2INFO(13622)
+    from_EUC_JP_offsets,
+    from_EUC_JP_infos,
+
+#define from_eucJP_ms_8F_A2_infos WORDINDEX2INFO(13624)
+                INVALID,              UNDEF,
+          o2(0xCB,0x98),      o2(0xCB,0x87),
+          o2(0xC2,0xB8),      o2(0xCB,0x99),
+          o2(0xCB,0x9D),      o2(0xC2,0xAF),
+          o2(0xCB,0x9B),      o2(0xCB,0x9A),
+     o3(0xEF,0xBD,0x9E),      o2(0xCE,0x84),
+          o2(0xCE,0x85),      o2(0xC2,0xA1),
+     o3(0xEF,0xBF,0xA4),      o2(0xC2,0xBF),
+          o2(0xC2,0xBA),      o2(0xC2,0xAA),
+          o2(0xC2,0xA9),      o2(0xC2,0xAE),
+     o3(0xE2,0x84,0xA2),      o2(0xC2,0xA4),
+     o3(0xE2,0x84,0x96),
+
+#define from_eucJP_ms_8F_A2 WORDINDEX2INFO(13647)
+    from_EUC_JP_8F_A2_offsets,
+    from_eucJP_ms_8F_A2_infos,
+
+#define from_eucJP_ms_8F_F3_infos WORDINDEX2INFO(13649)
+                INVALID,              UNDEF,
+     o3(0xE2,0x85,0xB0), o3(0xE2,0x85,0xB1),
+     o3(0xE2,0x85,0xB2), o3(0xE2,0x85,0xB3),
+     o3(0xE2,0x85,0xB4), o3(0xE2,0x85,0xB5),
+     o3(0xE2,0x85,0xB6), o3(0xE2,0x85,0xB7),
+     o3(0xE2,0x85,0xB8), o3(0xE2,0x85,0xB9),
+     o3(0xE2,0x85,0xA0), o3(0xE2,0x85,0xA1),
+
+#define from_eucJP_ms_8F_F3 WORDINDEX2INFO(13663)
+    from_eucJP_ms_8F_F3_offsets,
+    from_eucJP_ms_8F_F3_infos,
+
+#define from_eucJP_ms_8F_F4_infos WORDINDEX2INFO(13665)
+                INVALID, o3(0xE2,0x85,0xA2),
+     o3(0xE2,0x85,0xA3), o3(0xE2,0x85,0xA4),
+     o3(0xE2,0x85,0xA5), o3(0xE2,0x85,0xA6),
+     o3(0xE2,0x85,0xA7), o3(0xE2,0x85,0xA8),
+     o3(0xE2,0x85,0xA9), o3(0xEF,0xBC,0x87),
+     o3(0xEF,0xBC,0x82), o3(0xE3,0x88,0xB1),
+     o3(0xE2,0x84,0x96), o3(0xE2,0x84,0xA1),
+     o3(0xE7,0x82,0xBB), o3(0xE4,0xBB,0xBC),
+     o3(0xE5,0x83,0xB4), o3(0xE5,0x87,0xAC),
+     o3(0xE5,0x8C,0x87), o3(0xE5,0x8C,0xA4),
+     o3(0xEF,0xA8,0x8E), o3(0xE5,0x92,0x8A),
+     o3(0xE5,0x9D,0x99), o3(0xEF,0xA8,0x8F),
+     o3(0xEF,0xA8,0x90), o3(0xE5,0xA2,0x9E),
+     o3(0xE5,0xAF,0xAC), o3(0xE5,0xB3,0xB5),
+     o3(0xE5,0xB5,0x93), o3(0xEF,0xA8,0x91),
+     o3(0xE5,0xBE,0xB7), o3(0xE6,0x82,0x85),
+     o3(0xE6,0x84,0xA0), o3(0xE6,0x95,0x8E),
+     o3(0xE6,0x98,0xBB), o3(0xE6,0x99,0xA5),
+     o3(0xEF,0xA8,0x92), o3(0xEF,0xA4,0xA9),
+     o3(0xE6,0xA0,0x81), o3(0xEF,0xA8,0x93),
+     o3(0xEF,0xA8,0x94), o3(0xE6,0xA9,0xAB),
+     o3(0xE6,0xAB,0xA2), o3(0xE6,0xB7,0xB8),
+     o3(0xE6,0xB7,0xB2), o3(0xE7,0x80,0xA8),
+     o3(0xEF,0xA8,0x95), o3(0xEF,0xA8,0x96),
+     o3(0xE7,0x94,0x81), o3(0xE7,0x9A,0x82),
+     o3(0xE7,0x9A,0x9E), o3(0xEF,0xA8,0x97),
+     o3(0xE7,0xA4,0xB0), o3(0xEF,0xA8,0x98),
+     o3(0xEF,0xA8,0x99), o3(0xEF,0xA8,0x9A),
+     o3(0xEF,0xA8,0x9B), o3(0xE7,0xAB,0xA7),
+     o3(0xEF,0xA8,0x9C), o3(0xEF,0xA8,0x9D),
+     o3(0xE7,0xB6,0xA0), o3(0xE7,0xB7,0x96),
+     o3(0xEF,0xA8,0x9E), o3(0xE8,0x8D,0xA2),
+     o3(0xEF,0xA8,0x9F), o3(0xE8,0x96,0xB0),
+     o3(0xEF,0xA8,0xA0), o3(0xEF,0xA8,0xA1),
+     o3(0xE8,0xA0,0x87), o3(0xEF,0xA8,0xA2),
+     o3(0xE8,0xAD,0xBF), o3(0xE8,0xB3,0xB4),
+     o3(0xE8,0xB5,0xB6), o3(0xEF,0xA8,0xA3),
+     o3(0xEF,0xA8,0xA4), o3(0xEF,0xA8,0xA5),
+     o3(0xE9,0x83,0x9E), o3(0xEF,0xA8,0xA6),
+     o3(0xE9,0x84,0x95), o3(0xEF,0xA8,0xA7),
+     o3(0xEF,0xA8,0xA8), o3(0xE9,0x96,0x92),
+     o3(0xEF,0xA7,0x9C), o3(0xEF,0xA8,0xA9),
+     o3(0xE9,0x9C,0xBB), o3(0xE9,0x9D,0x8D),
+     o3(0xE9,0x9D,0x91), o3(0xEF,0xA8,0xAA),
+     o3(0xEF,0xA8,0xAB), o3(0xEF,0xA8,0xAC),
+     o3(0xE9,0xA6,0x9E), o3(0xE9,0xAB,0x99),
+     o3(0xE9,0xAD,0xB2), o3(0xEF,0xA8,0xAD),
+     o3(0xE9,0xBB,0x91),
+
+#define from_eucJP_ms_8F_F4 WORDINDEX2INFO(13760)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F4_infos,
+
+#define from_eucJP_ms_8F_F5_infos WORDINDEX2INFO(13762)
+                INVALID, o3(0xEE,0x8E,0xAC),
+     o3(0xEE,0x8E,0xAD), o3(0xEE,0x8E,0xAE),
+     o3(0xEE,0x8E,0xAF), o3(0xEE,0x8E,0xB0),
+     o3(0xEE,0x8E,0xB1), o3(0xEE,0x8E,0xB2),
+     o3(0xEE,0x8E,0xB3), o3(0xEE,0x8E,0xB4),
+     o3(0xEE,0x8E,0xB5), o3(0xEE,0x8E,0xB6),
+     o3(0xEE,0x8E,0xB7), o3(0xEE,0x8E,0xB8),
+     o3(0xEE,0x8E,0xB9), o3(0xEE,0x8E,0xBA),
+     o3(0xEE,0x8E,0xBB), o3(0xEE,0x8E,0xBC),
+     o3(0xEE,0x8E,0xBD), o3(0xEE,0x8E,0xBE),
+     o3(0xEE,0x8E,0xBF), o3(0xEE,0x8F,0x80),
+     o3(0xEE,0x8F,0x81), o3(0xEE,0x8F,0x82),
+     o3(0xEE,0x8F,0x83), o3(0xEE,0x8F,0x84),
+     o3(0xEE,0x8F,0x85), o3(0xEE,0x8F,0x86),
+     o3(0xEE,0x8F,0x87), o3(0xEE,0x8F,0x88),
+     o3(0xEE,0x8F,0x89), o3(0xEE,0x8F,0x8A),
+     o3(0xEE,0x8F,0x8B), o3(0xEE,0x8F,0x8C),
+     o3(0xEE,0x8F,0x8D), o3(0xEE,0x8F,0x8E),
+     o3(0xEE,0x8F,0x8F), o3(0xEE,0x8F,0x90),
+     o3(0xEE,0x8F,0x91), o3(0xEE,0x8F,0x92),
+     o3(0xEE,0x8F,0x93), o3(0xEE,0x8F,0x94),
+     o3(0xEE,0x8F,0x95), o3(0xEE,0x8F,0x96),
+     o3(0xEE,0x8F,0x97), o3(0xEE,0x8F,0x98),
+     o3(0xEE,0x8F,0x99), o3(0xEE,0x8F,0x9A),
+     o3(0xEE,0x8F,0x9B), o3(0xEE,0x8F,0x9C),
+     o3(0xEE,0x8F,0x9D), o3(0xEE,0x8F,0x9E),
+     o3(0xEE,0x8F,0x9F), o3(0xEE,0x8F,0xA0),
+     o3(0xEE,0x8F,0xA1), o3(0xEE,0x8F,0xA2),
+     o3(0xEE,0x8F,0xA3), o3(0xEE,0x8F,0xA4),
+     o3(0xEE,0x8F,0xA5), o3(0xEE,0x8F,0xA6),
+     o3(0xEE,0x8F,0xA7), o3(0xEE,0x8F,0xA8),
+     o3(0xEE,0x8F,0xA9), o3(0xEE,0x8F,0xAA),
+     o3(0xEE,0x8F,0xAB), o3(0xEE,0x8F,0xAC),
+     o3(0xEE,0x8F,0xAD), o3(0xEE,0x8F,0xAE),
+     o3(0xEE,0x8F,0xAF), o3(0xEE,0x8F,0xB0),
+     o3(0xEE,0x8F,0xB1), o3(0xEE,0x8F,0xB2),
+     o3(0xEE,0x8F,0xB3), o3(0xEE,0x8F,0xB4),
+     o3(0xEE,0x8F,0xB5), o3(0xEE,0x8F,0xB6),
+     o3(0xEE,0x8F,0xB7), o3(0xEE,0x8F,0xB8),
+     o3(0xEE,0x8F,0xB9), o3(0xEE,0x8F,0xBA),
+     o3(0xEE,0x8F,0xBB), o3(0xEE,0x8F,0xBC),
+     o3(0xEE,0x8F,0xBD), o3(0xEE,0x8F,0xBE),
+     o3(0xEE,0x8F,0xBF), o3(0xEE,0x90,0x80),
+     o3(0xEE,0x90,0x81), o3(0xEE,0x90,0x82),
+     o3(0xEE,0x90,0x83), o3(0xEE,0x90,0x84),
+     o3(0xEE,0x90,0x85), o3(0xEE,0x90,0x86),
+     o3(0xEE,0x90,0x87), o3(0xEE,0x90,0x88),
+     o3(0xEE,0x90,0x89),
+
+#define from_eucJP_ms_8F_F5 WORDINDEX2INFO(13857)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F5_infos,
+
+#define from_eucJP_ms_8F_F6_infos WORDINDEX2INFO(13859)
+                INVALID, o3(0xEE,0x90,0x8A),
+     o3(0xEE,0x90,0x8B), o3(0xEE,0x90,0x8C),
+     o3(0xEE,0x90,0x8D), o3(0xEE,0x90,0x8E),
+     o3(0xEE,0x90,0x8F), o3(0xEE,0x90,0x90),
+     o3(0xEE,0x90,0x91), o3(0xEE,0x90,0x92),
+     o3(0xEE,0x90,0x93), o3(0xEE,0x90,0x94),
+     o3(0xEE,0x90,0x95), o3(0xEE,0x90,0x96),
+     o3(0xEE,0x90,0x97), o3(0xEE,0x90,0x98),
+     o3(0xEE,0x90,0x99), o3(0xEE,0x90,0x9A),
+     o3(0xEE,0x90,0x9B), o3(0xEE,0x90,0x9C),
+     o3(0xEE,0x90,0x9D), o3(0xEE,0x90,0x9E),
+     o3(0xEE,0x90,0x9F), o3(0xEE,0x90,0xA0),
+     o3(0xEE,0x90,0xA1), o3(0xEE,0x90,0xA2),
+     o3(0xEE,0x90,0xA3), o3(0xEE,0x90,0xA4),
+     o3(0xEE,0x90,0xA5), o3(0xEE,0x90,0xA6),
+     o3(0xEE,0x90,0xA7), o3(0xEE,0x90,0xA8),
+     o3(0xEE,0x90,0xA9), o3(0xEE,0x90,0xAA),
+     o3(0xEE,0x90,0xAB), o3(0xEE,0x90,0xAC),
+     o3(0xEE,0x90,0xAD), o3(0xEE,0x90,0xAE),
+     o3(0xEE,0x90,0xAF), o3(0xEE,0x90,0xB0),
+     o3(0xEE,0x90,0xB1), o3(0xEE,0x90,0xB2),
+     o3(0xEE,0x90,0xB3), o3(0xEE,0x90,0xB4),
+     o3(0xEE,0x90,0xB5), o3(0xEE,0x90,0xB6),
+     o3(0xEE,0x90,0xB7), o3(0xEE,0x90,0xB8),
+     o3(0xEE,0x90,0xB9), o3(0xEE,0x90,0xBA),
+     o3(0xEE,0x90,0xBB), o3(0xEE,0x90,0xBC),
+     o3(0xEE,0x90,0xBD), o3(0xEE,0x90,0xBE),
+     o3(0xEE,0x90,0xBF), o3(0xEE,0x91,0x80),
+     o3(0xEE,0x91,0x81), o3(0xEE,0x91,0x82),
+     o3(0xEE,0x91,0x83), o3(0xEE,0x91,0x84),
+     o3(0xEE,0x91,0x85), o3(0xEE,0x91,0x86),
+     o3(0xEE,0x91,0x87), o3(0xEE,0x91,0x88),
+     o3(0xEE,0x91,0x89), o3(0xEE,0x91,0x8A),
+     o3(0xEE,0x91,0x8B), o3(0xEE,0x91,0x8C),
+     o3(0xEE,0x91,0x8D), o3(0xEE,0x91,0x8E),
+     o3(0xEE,0x91,0x8F), o3(0xEE,0x91,0x90),
+     o3(0xEE,0x91,0x91), o3(0xEE,0x91,0x92),
+     o3(0xEE,0x91,0x93), o3(0xEE,0x91,0x94),
+     o3(0xEE,0x91,0x95), o3(0xEE,0x91,0x96),
+     o3(0xEE,0x91,0x97), o3(0xEE,0x91,0x98),
+     o3(0xEE,0x91,0x99), o3(0xEE,0x91,0x9A),
+     o3(0xEE,0x91,0x9B), o3(0xEE,0x91,0x9C),
+     o3(0xEE,0x91,0x9D), o3(0xEE,0x91,0x9E),
+     o3(0xEE,0x91,0x9F), o3(0xEE,0x91,0xA0),
+     o3(0xEE,0x91,0xA1), o3(0xEE,0x91,0xA2),
+     o3(0xEE,0x91,0xA3), o3(0xEE,0x91,0xA4),
+     o3(0xEE,0x91,0xA5), o3(0xEE,0x91,0xA6),
+     o3(0xEE,0x91,0xA7),
+
+#define from_eucJP_ms_8F_F6 WORDINDEX2INFO(13954)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F6_infos,
+
+#define from_eucJP_ms_8F_F7_infos WORDINDEX2INFO(13956)
+                INVALID, o3(0xEE,0x91,0xA8),
+     o3(0xEE,0x91,0xA9), o3(0xEE,0x91,0xAA),
+     o3(0xEE,0x91,0xAB), o3(0xEE,0x91,0xAC),
+     o3(0xEE,0x91,0xAD), o3(0xEE,0x91,0xAE),
+     o3(0xEE,0x91,0xAF), o3(0xEE,0x91,0xB0),
+     o3(0xEE,0x91,0xB1), o3(0xEE,0x91,0xB2),
+     o3(0xEE,0x91,0xB3), o3(0xEE,0x91,0xB4),
+     o3(0xEE,0x91,0xB5), o3(0xEE,0x91,0xB6),
+     o3(0xEE,0x91,0xB7), o3(0xEE,0x91,0xB8),
+     o3(0xEE,0x91,0xB9), o3(0xEE,0x91,0xBA),
+     o3(0xEE,0x91,0xBB), o3(0xEE,0x91,0xBC),
+     o3(0xEE,0x91,0xBD), o3(0xEE,0x91,0xBE),
+     o3(0xEE,0x91,0xBF), o3(0xEE,0x92,0x80),
+     o3(0xEE,0x92,0x81), o3(0xEE,0x92,0x82),
+     o3(0xEE,0x92,0x83), o3(0xEE,0x92,0x84),
+     o3(0xEE,0x92,0x85), o3(0xEE,0x92,0x86),
+     o3(0xEE,0x92,0x87), o3(0xEE,0x92,0x88),
+     o3(0xEE,0x92,0x89), o3(0xEE,0x92,0x8A),
+     o3(0xEE,0x92,0x8B), o3(0xEE,0x92,0x8C),
+     o3(0xEE,0x92,0x8D), o3(0xEE,0x92,0x8E),
+     o3(0xEE,0x92,0x8F), o3(0xEE,0x92,0x90),
+     o3(0xEE,0x92,0x91), o3(0xEE,0x92,0x92),
+     o3(0xEE,0x92,0x93), o3(0xEE,0x92,0x94),
+     o3(0xEE,0x92,0x95), o3(0xEE,0x92,0x96),
+     o3(0xEE,0x92,0x97), o3(0xEE,0x92,0x98),
+     o3(0xEE,0x92,0x99), o3(0xEE,0x92,0x9A),
+     o3(0xEE,0x92,0x9B), o3(0xEE,0x92,0x9C),
+     o3(0xEE,0x92,0x9D), o3(0xEE,0x92,0x9E),
+     o3(0xEE,0x92,0x9F), o3(0xEE,0x92,0xA0),
+     o3(0xEE,0x92,0xA1), o3(0xEE,0x92,0xA2),
+     o3(0xEE,0x92,0xA3), o3(0xEE,0x92,0xA4),
+     o3(0xEE,0x92,0xA5), o3(0xEE,0x92,0xA6),
+     o3(0xEE,0x92,0xA7), o3(0xEE,0x92,0xA8),
+     o3(0xEE,0x92,0xA9), o3(0xEE,0x92,0xAA),
+     o3(0xEE,0x92,0xAB), o3(0xEE,0x92,0xAC),
+     o3(0xEE,0x92,0xAD), o3(0xEE,0x92,0xAE),
+     o3(0xEE,0x92,0xAF), o3(0xEE,0x92,0xB0),
+     o3(0xEE,0x92,0xB1), o3(0xEE,0x92,0xB2),
+     o3(0xEE,0x92,0xB3), o3(0xEE,0x92,0xB4),
+     o3(0xEE,0x92,0xB5), o3(0xEE,0x92,0xB6),
+     o3(0xEE,0x92,0xB7), o3(0xEE,0x92,0xB8),
+     o3(0xEE,0x92,0xB9), o3(0xEE,0x92,0xBA),
+     o3(0xEE,0x92,0xBB), o3(0xEE,0x92,0xBC),
+     o3(0xEE,0x92,0xBD), o3(0xEE,0x92,0xBE),
+     o3(0xEE,0x92,0xBF), o3(0xEE,0x93,0x80),
+     o3(0xEE,0x93,0x81), o3(0xEE,0x93,0x82),
+     o3(0xEE,0x93,0x83), o3(0xEE,0x93,0x84),
+     o3(0xEE,0x93,0x85),
+
+#define from_eucJP_ms_8F_F7 WORDINDEX2INFO(14051)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F7_infos,
+
+#define from_eucJP_ms_8F_F8_infos WORDINDEX2INFO(14053)
+                INVALID, o3(0xEE,0x93,0x86),
+     o3(0xEE,0x93,0x87), o3(0xEE,0x93,0x88),
+     o3(0xEE,0x93,0x89), o3(0xEE,0x93,0x8A),
+     o3(0xEE,0x93,0x8B), o3(0xEE,0x93,0x8C),
+     o3(0xEE,0x93,0x8D), o3(0xEE,0x93,0x8E),
+     o3(0xEE,0x93,0x8F), o3(0xEE,0x93,0x90),
+     o3(0xEE,0x93,0x91), o3(0xEE,0x93,0x92),
+     o3(0xEE,0x93,0x93), o3(0xEE,0x93,0x94),
+     o3(0xEE,0x93,0x95), o3(0xEE,0x93,0x96),
+     o3(0xEE,0x93,0x97), o3(0xEE,0x93,0x98),
+     o3(0xEE,0x93,0x99), o3(0xEE,0x93,0x9A),
+     o3(0xEE,0x93,0x9B), o3(0xEE,0x93,0x9C),
+     o3(0xEE,0x93,0x9D), o3(0xEE,0x93,0x9E),
+     o3(0xEE,0x93,0x9F), o3(0xEE,0x93,0xA0),
+     o3(0xEE,0x93,0xA1), o3(0xEE,0x93,0xA2),
+     o3(0xEE,0x93,0xA3), o3(0xEE,0x93,0xA4),
+     o3(0xEE,0x93,0xA5), o3(0xEE,0x93,0xA6),
+     o3(0xEE,0x93,0xA7), o3(0xEE,0x93,0xA8),
+     o3(0xEE,0x93,0xA9), o3(0xEE,0x93,0xAA),
+     o3(0xEE,0x93,0xAB), o3(0xEE,0x93,0xAC),
+     o3(0xEE,0x93,0xAD), o3(0xEE,0x93,0xAE),
+     o3(0xEE,0x93,0xAF), o3(0xEE,0x93,0xB0),
+     o3(0xEE,0x93,0xB1), o3(0xEE,0x93,0xB2),
+     o3(0xEE,0x93,0xB3), o3(0xEE,0x93,0xB4),
+     o3(0xEE,0x93,0xB5), o3(0xEE,0x93,0xB6),
+     o3(0xEE,0x93,0xB7), o3(0xEE,0x93,0xB8),
+     o3(0xEE,0x93,0xB9), o3(0xEE,0x93,0xBA),
+     o3(0xEE,0x93,0xBB), o3(0xEE,0x93,0xBC),
+     o3(0xEE,0x93,0xBD), o3(0xEE,0x93,0xBE),
+     o3(0xEE,0x93,0xBF), o3(0xEE,0x94,0x80),
+     o3(0xEE,0x94,0x81), o3(0xEE,0x94,0x82),
+     o3(0xEE,0x94,0x83), o3(0xEE,0x94,0x84),
+     o3(0xEE,0x94,0x85), o3(0xEE,0x94,0x86),
+     o3(0xEE,0x94,0x87), o3(0xEE,0x94,0x88),
+     o3(0xEE,0x94,0x89), o3(0xEE,0x94,0x8A),
+     o3(0xEE,0x94,0x8B), o3(0xEE,0x94,0x8C),
+     o3(0xEE,0x94,0x8D), o3(0xEE,0x94,0x8E),
+     o3(0xEE,0x94,0x8F), o3(0xEE,0x94,0x90),
+     o3(0xEE,0x94,0x91), o3(0xEE,0x94,0x92),
+     o3(0xEE,0x94,0x93), o3(0xEE,0x94,0x94),
+     o3(0xEE,0x94,0x95), o3(0xEE,0x94,0x96),
+     o3(0xEE,0x94,0x97), o3(0xEE,0x94,0x98),
+     o3(0xEE,0x94,0x99), o3(0xEE,0x94,0x9A),
+     o3(0xEE,0x94,0x9B), o3(0xEE,0x94,0x9C),
+     o3(0xEE,0x94,0x9D), o3(0xEE,0x94,0x9E),
+     o3(0xEE,0x94,0x9F), o3(0xEE,0x94,0xA0),
+     o3(0xEE,0x94,0xA1), o3(0xEE,0x94,0xA2),
+     o3(0xEE,0x94,0xA3),
+
+#define from_eucJP_ms_8F_F8 WORDINDEX2INFO(14148)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F8_infos,
+
+#define from_eucJP_ms_8F_F9_infos WORDINDEX2INFO(14150)
+                INVALID, o3(0xEE,0x94,0xA4),
+     o3(0xEE,0x94,0xA5), o3(0xEE,0x94,0xA6),
+     o3(0xEE,0x94,0xA7), o3(0xEE,0x94,0xA8),
+     o3(0xEE,0x94,0xA9), o3(0xEE,0x94,0xAA),
+     o3(0xEE,0x94,0xAB), o3(0xEE,0x94,0xAC),
+     o3(0xEE,0x94,0xAD), o3(0xEE,0x94,0xAE),
+     o3(0xEE,0x94,0xAF), o3(0xEE,0x94,0xB0),
+     o3(0xEE,0x94,0xB1), o3(0xEE,0x94,0xB2),
+     o3(0xEE,0x94,0xB3), o3(0xEE,0x94,0xB4),
+     o3(0xEE,0x94,0xB5), o3(0xEE,0x94,0xB6),
+     o3(0xEE,0x94,0xB7), o3(0xEE,0x94,0xB8),
+     o3(0xEE,0x94,0xB9), o3(0xEE,0x94,0xBA),
+     o3(0xEE,0x94,0xBB), o3(0xEE,0x94,0xBC),
+     o3(0xEE,0x94,0xBD), o3(0xEE,0x94,0xBE),
+     o3(0xEE,0x94,0xBF), o3(0xEE,0x95,0x80),
+     o3(0xEE,0x95,0x81), o3(0xEE,0x95,0x82),
+     o3(0xEE,0x95,0x83), o3(0xEE,0x95,0x84),
+     o3(0xEE,0x95,0x85), o3(0xEE,0x95,0x86),
+     o3(0xEE,0x95,0x87), o3(0xEE,0x95,0x88),
+     o3(0xEE,0x95,0x89), o3(0xEE,0x95,0x8A),
+     o3(0xEE,0x95,0x8B), o3(0xEE,0x95,0x8C),
+     o3(0xEE,0x95,0x8D), o3(0xEE,0x95,0x8E),
+     o3(0xEE,0x95,0x8F), o3(0xEE,0x95,0x90),
+     o3(0xEE,0x95,0x91), o3(0xEE,0x95,0x92),
+     o3(0xEE,0x95,0x93), o3(0xEE,0x95,0x94),
+     o3(0xEE,0x95,0x95), o3(0xEE,0x95,0x96),
+     o3(0xEE,0x95,0x97), o3(0xEE,0x95,0x98),
+     o3(0xEE,0x95,0x99), o3(0xEE,0x95,0x9A),
+     o3(0xEE,0x95,0x9B), o3(0xEE,0x95,0x9C),
+     o3(0xEE,0x95,0x9D), o3(0xEE,0x95,0x9E),
+     o3(0xEE,0x95,0x9F), o3(0xEE,0x95,0xA0),
+     o3(0xEE,0x95,0xA1), o3(0xEE,0x95,0xA2),
+     o3(0xEE,0x95,0xA3), o3(0xEE,0x95,0xA4),
+     o3(0xEE,0x95,0xA5), o3(0xEE,0x95,0xA6),
+     o3(0xEE,0x95,0xA7), o3(0xEE,0x95,0xA8),
+     o3(0xEE,0x95,0xA9), o3(0xEE,0x95,0xAA),
+     o3(0xEE,0x95,0xAB), o3(0xEE,0x95,0xAC),
+     o3(0xEE,0x95,0xAD), o3(0xEE,0x95,0xAE),
+     o3(0xEE,0x95,0xAF), o3(0xEE,0x95,0xB0),
+     o3(0xEE,0x95,0xB1), o3(0xEE,0x95,0xB2),
+     o3(0xEE,0x95,0xB3), o3(0xEE,0x95,0xB4),
+     o3(0xEE,0x95,0xB5), o3(0xEE,0x95,0xB6),
+     o3(0xEE,0x95,0xB7), o3(0xEE,0x95,0xB8),
+     o3(0xEE,0x95,0xB9), o3(0xEE,0x95,0xBA),
+     o3(0xEE,0x95,0xBB), o3(0xEE,0x95,0xBC),
+     o3(0xEE,0x95,0xBD), o3(0xEE,0x95,0xBE),
+     o3(0xEE,0x95,0xBF), o3(0xEE,0x96,0x80),
+     o3(0xEE,0x96,0x81),
+
+#define from_eucJP_ms_8F_F9 WORDINDEX2INFO(14245)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_F9_infos,
+
+#define from_eucJP_ms_8F_FA_infos WORDINDEX2INFO(14247)
+                INVALID, o3(0xEE,0x96,0x82),
+     o3(0xEE,0x96,0x83), o3(0xEE,0x96,0x84),
+     o3(0xEE,0x96,0x85), o3(0xEE,0x96,0x86),
+     o3(0xEE,0x96,0x87), o3(0xEE,0x96,0x88),
+     o3(0xEE,0x96,0x89), o3(0xEE,0x96,0x8A),
+     o3(0xEE,0x96,0x8B), o3(0xEE,0x96,0x8C),
+     o3(0xEE,0x96,0x8D), o3(0xEE,0x96,0x8E),
+     o3(0xEE,0x96,0x8F), o3(0xEE,0x96,0x90),
+     o3(0xEE,0x96,0x91), o3(0xEE,0x96,0x92),
+     o3(0xEE,0x96,0x93), o3(0xEE,0x96,0x94),
+     o3(0xEE,0x96,0x95), o3(0xEE,0x96,0x96),
+     o3(0xEE,0x96,0x97), o3(0xEE,0x96,0x98),
+     o3(0xEE,0x96,0x99), o3(0xEE,0x96,0x9A),
+     o3(0xEE,0x96,0x9B), o3(0xEE,0x96,0x9C),
+     o3(0xEE,0x96,0x9D), o3(0xEE,0x96,0x9E),
+     o3(0xEE,0x96,0x9F), o3(0xEE,0x96,0xA0),
+     o3(0xEE,0x96,0xA1), o3(0xEE,0x96,0xA2),
+     o3(0xEE,0x96,0xA3), o3(0xEE,0x96,0xA4),
+     o3(0xEE,0x96,0xA5), o3(0xEE,0x96,0xA6),
+     o3(0xEE,0x96,0xA7), o3(0xEE,0x96,0xA8),
+     o3(0xEE,0x96,0xA9), o3(0xEE,0x96,0xAA),
+     o3(0xEE,0x96,0xAB), o3(0xEE,0x96,0xAC),
+     o3(0xEE,0x96,0xAD), o3(0xEE,0x96,0xAE),
+     o3(0xEE,0x96,0xAF), o3(0xEE,0x96,0xB0),
+     o3(0xEE,0x96,0xB1), o3(0xEE,0x96,0xB2),
+     o3(0xEE,0x96,0xB3), o3(0xEE,0x96,0xB4),
+     o3(0xEE,0x96,0xB5), o3(0xEE,0x96,0xB6),
+     o3(0xEE,0x96,0xB7), o3(0xEE,0x96,0xB8),
+     o3(0xEE,0x96,0xB9), o3(0xEE,0x96,0xBA),
+     o3(0xEE,0x96,0xBB), o3(0xEE,0x96,0xBC),
+     o3(0xEE,0x96,0xBD), o3(0xEE,0x96,0xBE),
+     o3(0xEE,0x96,0xBF), o3(0xEE,0x97,0x80),
+     o3(0xEE,0x97,0x81), o3(0xEE,0x97,0x82),
+     o3(0xEE,0x97,0x83), o3(0xEE,0x97,0x84),
+     o3(0xEE,0x97,0x85), o3(0xEE,0x97,0x86),
+     o3(0xEE,0x97,0x87), o3(0xEE,0x97,0x88),
+     o3(0xEE,0x97,0x89), o3(0xEE,0x97,0x8A),
+     o3(0xEE,0x97,0x8B), o3(0xEE,0x97,0x8C),
+     o3(0xEE,0x97,0x8D), o3(0xEE,0x97,0x8E),
+     o3(0xEE,0x97,0x8F), o3(0xEE,0x97,0x90),
+     o3(0xEE,0x97,0x91), o3(0xEE,0x97,0x92),
+     o3(0xEE,0x97,0x93), o3(0xEE,0x97,0x94),
+     o3(0xEE,0x97,0x95), o3(0xEE,0x97,0x96),
+     o3(0xEE,0x97,0x97), o3(0xEE,0x97,0x98),
+     o3(0xEE,0x97,0x99), o3(0xEE,0x97,0x9A),
+     o3(0xEE,0x97,0x9B), o3(0xEE,0x97,0x9C),
+     o3(0xEE,0x97,0x9D), o3(0xEE,0x97,0x9E),
+     o3(0xEE,0x97,0x9F),
+
+#define from_eucJP_ms_8F_FA WORDINDEX2INFO(14342)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_FA_infos,
+
+#define from_eucJP_ms_8F_FB_infos WORDINDEX2INFO(14344)
+                INVALID, o3(0xEE,0x97,0xA0),
+     o3(0xEE,0x97,0xA1), o3(0xEE,0x97,0xA2),
+     o3(0xEE,0x97,0xA3), o3(0xEE,0x97,0xA4),
+     o3(0xEE,0x97,0xA5), o3(0xEE,0x97,0xA6),
+     o3(0xEE,0x97,0xA7), o3(0xEE,0x97,0xA8),
+     o3(0xEE,0x97,0xA9), o3(0xEE,0x97,0xAA),
+     o3(0xEE,0x97,0xAB), o3(0xEE,0x97,0xAC),
+     o3(0xEE,0x97,0xAD), o3(0xEE,0x97,0xAE),
+     o3(0xEE,0x97,0xAF), o3(0xEE,0x97,0xB0),
+     o3(0xEE,0x97,0xB1), o3(0xEE,0x97,0xB2),
+     o3(0xEE,0x97,0xB3), o3(0xEE,0x97,0xB4),
+     o3(0xEE,0x97,0xB5), o3(0xEE,0x97,0xB6),
+     o3(0xEE,0x97,0xB7), o3(0xEE,0x97,0xB8),
+     o3(0xEE,0x97,0xB9), o3(0xEE,0x97,0xBA),
+     o3(0xEE,0x97,0xBB), o3(0xEE,0x97,0xBC),
+     o3(0xEE,0x97,0xBD), o3(0xEE,0x97,0xBE),
+     o3(0xEE,0x97,0xBF), o3(0xEE,0x98,0x80),
+     o3(0xEE,0x98,0x81), o3(0xEE,0x98,0x82),
+     o3(0xEE,0x98,0x83), o3(0xEE,0x98,0x84),
+     o3(0xEE,0x98,0x85), o3(0xEE,0x98,0x86),
+     o3(0xEE,0x98,0x87), o3(0xEE,0x98,0x88),
+     o3(0xEE,0x98,0x89), o3(0xEE,0x98,0x8A),
+     o3(0xEE,0x98,0x8B), o3(0xEE,0x98,0x8C),
+     o3(0xEE,0x98,0x8D), o3(0xEE,0x98,0x8E),
+     o3(0xEE,0x98,0x8F), o3(0xEE,0x98,0x90),
+     o3(0xEE,0x98,0x91), o3(0xEE,0x98,0x92),
+     o3(0xEE,0x98,0x93), o3(0xEE,0x98,0x94),
+     o3(0xEE,0x98,0x95), o3(0xEE,0x98,0x96),
+     o3(0xEE,0x98,0x97), o3(0xEE,0x98,0x98),
+     o3(0xEE,0x98,0x99), o3(0xEE,0x98,0x9A),
+     o3(0xEE,0x98,0x9B), o3(0xEE,0x98,0x9C),
+     o3(0xEE,0x98,0x9D), o3(0xEE,0x98,0x9E),
+     o3(0xEE,0x98,0x9F), o3(0xEE,0x98,0xA0),
+     o3(0xEE,0x98,0xA1), o3(0xEE,0x98,0xA2),
+     o3(0xEE,0x98,0xA3), o3(0xEE,0x98,0xA4),
+     o3(0xEE,0x98,0xA5), o3(0xEE,0x98,0xA6),
+     o3(0xEE,0x98,0xA7), o3(0xEE,0x98,0xA8),
+     o3(0xEE,0x98,0xA9), o3(0xEE,0x98,0xAA),
+     o3(0xEE,0x98,0xAB), o3(0xEE,0x98,0xAC),
+     o3(0xEE,0x98,0xAD), o3(0xEE,0x98,0xAE),
+     o3(0xEE,0x98,0xAF), o3(0xEE,0x98,0xB0),
+     o3(0xEE,0x98,0xB1), o3(0xEE,0x98,0xB2),
+     o3(0xEE,0x98,0xB3), o3(0xEE,0x98,0xB4),
+     o3(0xEE,0x98,0xB5), o3(0xEE,0x98,0xB6),
+     o3(0xEE,0x98,0xB7), o3(0xEE,0x98,0xB8),
+     o3(0xEE,0x98,0xB9), o3(0xEE,0x98,0xBA),
+     o3(0xEE,0x98,0xBB), o3(0xEE,0x98,0xBC),
+     o3(0xEE,0x98,0xBD),
+
+#define from_eucJP_ms_8F_FB WORDINDEX2INFO(14439)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_FB_infos,
+
+#define from_eucJP_ms_8F_FC_infos WORDINDEX2INFO(14441)
+                INVALID, o3(0xEE,0x98,0xBE),
+     o3(0xEE,0x98,0xBF), o3(0xEE,0x99,0x80),
+     o3(0xEE,0x99,0x81), o3(0xEE,0x99,0x82),
+     o3(0xEE,0x99,0x83), o3(0xEE,0x99,0x84),
+     o3(0xEE,0x99,0x85), o3(0xEE,0x99,0x86),
+     o3(0xEE,0x99,0x87), o3(0xEE,0x99,0x88),
+     o3(0xEE,0x99,0x89), o3(0xEE,0x99,0x8A),
+     o3(0xEE,0x99,0x8B), o3(0xEE,0x99,0x8C),
+     o3(0xEE,0x99,0x8D), o3(0xEE,0x99,0x8E),
+     o3(0xEE,0x99,0x8F), o3(0xEE,0x99,0x90),
+     o3(0xEE,0x99,0x91), o3(0xEE,0x99,0x92),
+     o3(0xEE,0x99,0x93), o3(0xEE,0x99,0x94),
+     o3(0xEE,0x99,0x95), o3(0xEE,0x99,0x96),
+     o3(0xEE,0x99,0x97), o3(0xEE,0x99,0x98),
+     o3(0xEE,0x99,0x99), o3(0xEE,0x99,0x9A),
+     o3(0xEE,0x99,0x9B), o3(0xEE,0x99,0x9C),
+     o3(0xEE,0x99,0x9D), o3(0xEE,0x99,0x9E),
+     o3(0xEE,0x99,0x9F), o3(0xEE,0x99,0xA0),
+     o3(0xEE,0x99,0xA1), o3(0xEE,0x99,0xA2),
+     o3(0xEE,0x99,0xA3), o3(0xEE,0x99,0xA4),
+     o3(0xEE,0x99,0xA5), o3(0xEE,0x99,0xA6),
+     o3(0xEE,0x99,0xA7), o3(0xEE,0x99,0xA8),
+     o3(0xEE,0x99,0xA9), o3(0xEE,0x99,0xAA),
+     o3(0xEE,0x99,0xAB), o3(0xEE,0x99,0xAC),
+     o3(0xEE,0x99,0xAD), o3(0xEE,0x99,0xAE),
+     o3(0xEE,0x99,0xAF), o3(0xEE,0x99,0xB0),
+     o3(0xEE,0x99,0xB1), o3(0xEE,0x99,0xB2),
+     o3(0xEE,0x99,0xB3), o3(0xEE,0x99,0xB4),
+     o3(0xEE,0x99,0xB5), o3(0xEE,0x99,0xB6),
+     o3(0xEE,0x99,0xB7), o3(0xEE,0x99,0xB8),
+     o3(0xEE,0x99,0xB9), o3(0xEE,0x99,0xBA),
+     o3(0xEE,0x99,0xBB), o3(0xEE,0x99,0xBC),
+     o3(0xEE,0x99,0xBD), o3(0xEE,0x99,0xBE),
+     o3(0xEE,0x99,0xBF), o3(0xEE,0x9A,0x80),
+     o3(0xEE,0x9A,0x81), o3(0xEE,0x9A,0x82),
+     o3(0xEE,0x9A,0x83), o3(0xEE,0x9A,0x84),
+     o3(0xEE,0x9A,0x85), o3(0xEE,0x9A,0x86),
+     o3(0xEE,0x9A,0x87), o3(0xEE,0x9A,0x88),
+     o3(0xEE,0x9A,0x89), o3(0xEE,0x9A,0x8A),
+     o3(0xEE,0x9A,0x8B), o3(0xEE,0x9A,0x8C),
+     o3(0xEE,0x9A,0x8D), o3(0xEE,0x9A,0x8E),
+     o3(0xEE,0x9A,0x8F), o3(0xEE,0x9A,0x90),
+     o3(0xEE,0x9A,0x91), o3(0xEE,0x9A,0x92),
+     o3(0xEE,0x9A,0x93), o3(0xEE,0x9A,0x94),
+     o3(0xEE,0x9A,0x95), o3(0xEE,0x9A,0x96),
+     o3(0xEE,0x9A,0x97), o3(0xEE,0x9A,0x98),
+     o3(0xEE,0x9A,0x99), o3(0xEE,0x9A,0x9A),
+     o3(0xEE,0x9A,0x9B),
+
+#define from_eucJP_ms_8F_FC WORDINDEX2INFO(14536)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_FC_infos,
+
+#define from_eucJP_ms_8F_FD_infos WORDINDEX2INFO(14538)
+                INVALID, o3(0xEE,0x9A,0x9C),
+     o3(0xEE,0x9A,0x9D), o3(0xEE,0x9A,0x9E),
+     o3(0xEE,0x9A,0x9F), o3(0xEE,0x9A,0xA0),
+     o3(0xEE,0x9A,0xA1), o3(0xEE,0x9A,0xA2),
+     o3(0xEE,0x9A,0xA3), o3(0xEE,0x9A,0xA4),
+     o3(0xEE,0x9A,0xA5), o3(0xEE,0x9A,0xA6),
+     o3(0xEE,0x9A,0xA7), o3(0xEE,0x9A,0xA8),
+     o3(0xEE,0x9A,0xA9), o3(0xEE,0x9A,0xAA),
+     o3(0xEE,0x9A,0xAB), o3(0xEE,0x9A,0xAC),
+     o3(0xEE,0x9A,0xAD), o3(0xEE,0x9A,0xAE),
+     o3(0xEE,0x9A,0xAF), o3(0xEE,0x9A,0xB0),
+     o3(0xEE,0x9A,0xB1), o3(0xEE,0x9A,0xB2),
+     o3(0xEE,0x9A,0xB3), o3(0xEE,0x9A,0xB4),
+     o3(0xEE,0x9A,0xB5), o3(0xEE,0x9A,0xB6),
+     o3(0xEE,0x9A,0xB7), o3(0xEE,0x9A,0xB8),
+     o3(0xEE,0x9A,0xB9), o3(0xEE,0x9A,0xBA),
+     o3(0xEE,0x9A,0xBB), o3(0xEE,0x9A,0xBC),
+     o3(0xEE,0x9A,0xBD), o3(0xEE,0x9A,0xBE),
+     o3(0xEE,0x9A,0xBF), o3(0xEE,0x9B,0x80),
+     o3(0xEE,0x9B,0x81), o3(0xEE,0x9B,0x82),
+     o3(0xEE,0x9B,0x83), o3(0xEE,0x9B,0x84),
+     o3(0xEE,0x9B,0x85), o3(0xEE,0x9B,0x86),
+     o3(0xEE,0x9B,0x87), o3(0xEE,0x9B,0x88),
+     o3(0xEE,0x9B,0x89), o3(0xEE,0x9B,0x8A),
+     o3(0xEE,0x9B,0x8B), o3(0xEE,0x9B,0x8C),
+     o3(0xEE,0x9B,0x8D), o3(0xEE,0x9B,0x8E),
+     o3(0xEE,0x9B,0x8F), o3(0xEE,0x9B,0x90),
+     o3(0xEE,0x9B,0x91), o3(0xEE,0x9B,0x92),
+     o3(0xEE,0x9B,0x93), o3(0xEE,0x9B,0x94),
+     o3(0xEE,0x9B,0x95), o3(0xEE,0x9B,0x96),
+     o3(0xEE,0x9B,0x97), o3(0xEE,0x9B,0x98),
+     o3(0xEE,0x9B,0x99), o3(0xEE,0x9B,0x9A),
+     o3(0xEE,0x9B,0x9B), o3(0xEE,0x9B,0x9C),
+     o3(0xEE,0x9B,0x9D), o3(0xEE,0x9B,0x9E),
+     o3(0xEE,0x9B,0x9F), o3(0xEE,0x9B,0xA0),
+     o3(0xEE,0x9B,0xA1), o3(0xEE,0x9B,0xA2),
+     o3(0xEE,0x9B,0xA3), o3(0xEE,0x9B,0xA4),
+     o3(0xEE,0x9B,0xA5), o3(0xEE,0x9B,0xA6),
+     o3(0xEE,0x9B,0xA7), o3(0xEE,0x9B,0xA8),
+     o3(0xEE,0x9B,0xA9), o3(0xEE,0x9B,0xAA),
+     o3(0xEE,0x9B,0xAB), o3(0xEE,0x9B,0xAC),
+     o3(0xEE,0x9B,0xAD), o3(0xEE,0x9B,0xAE),
+     o3(0xEE,0x9B,0xAF), o3(0xEE,0x9B,0xB0),
+     o3(0xEE,0x9B,0xB1), o3(0xEE,0x9B,0xB2),
+     o3(0xEE,0x9B,0xB3), o3(0xEE,0x9B,0xB4),
+     o3(0xEE,0x9B,0xB5), o3(0xEE,0x9B,0xB6),
+     o3(0xEE,0x9B,0xB7), o3(0xEE,0x9B,0xB8),
+     o3(0xEE,0x9B,0xB9),
+
+#define from_eucJP_ms_8F_FD WORDINDEX2INFO(14633)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_FD_infos,
+
+#define from_eucJP_ms_8F_FE_infos WORDINDEX2INFO(14635)
+                INVALID, o3(0xEE,0x9B,0xBA),
+     o3(0xEE,0x9B,0xBB), o3(0xEE,0x9B,0xBC),
+     o3(0xEE,0x9B,0xBD), o3(0xEE,0x9B,0xBE),
+     o3(0xEE,0x9B,0xBF), o3(0xEE,0x9C,0x80),
+     o3(0xEE,0x9C,0x81), o3(0xEE,0x9C,0x82),
+     o3(0xEE,0x9C,0x83), o3(0xEE,0x9C,0x84),
+     o3(0xEE,0x9C,0x85), o3(0xEE,0x9C,0x86),
+     o3(0xEE,0x9C,0x87), o3(0xEE,0x9C,0x88),
+     o3(0xEE,0x9C,0x89), o3(0xEE,0x9C,0x8A),
+     o3(0xEE,0x9C,0x8B), o3(0xEE,0x9C,0x8C),
+     o3(0xEE,0x9C,0x8D), o3(0xEE,0x9C,0x8E),
+     o3(0xEE,0x9C,0x8F), o3(0xEE,0x9C,0x90),
+     o3(0xEE,0x9C,0x91), o3(0xEE,0x9C,0x92),
+     o3(0xEE,0x9C,0x93), o3(0xEE,0x9C,0x94),
+     o3(0xEE,0x9C,0x95), o3(0xEE,0x9C,0x96),
+     o3(0xEE,0x9C,0x97), o3(0xEE,0x9C,0x98),
+     o3(0xEE,0x9C,0x99), o3(0xEE,0x9C,0x9A),
+     o3(0xEE,0x9C,0x9B), o3(0xEE,0x9C,0x9C),
+     o3(0xEE,0x9C,0x9D), o3(0xEE,0x9C,0x9E),
+     o3(0xEE,0x9C,0x9F), o3(0xEE,0x9C,0xA0),
+     o3(0xEE,0x9C,0xA1), o3(0xEE,0x9C,0xA2),
+     o3(0xEE,0x9C,0xA3), o3(0xEE,0x9C,0xA4),
+     o3(0xEE,0x9C,0xA5), o3(0xEE,0x9C,0xA6),
+     o3(0xEE,0x9C,0xA7), o3(0xEE,0x9C,0xA8),
+     o3(0xEE,0x9C,0xA9), o3(0xEE,0x9C,0xAA),
+     o3(0xEE,0x9C,0xAB), o3(0xEE,0x9C,0xAC),
+     o3(0xEE,0x9C,0xAD), o3(0xEE,0x9C,0xAE),
+     o3(0xEE,0x9C,0xAF), o3(0xEE,0x9C,0xB0),
+     o3(0xEE,0x9C,0xB1), o3(0xEE,0x9C,0xB2),
+     o3(0xEE,0x9C,0xB3), o3(0xEE,0x9C,0xB4),
+     o3(0xEE,0x9C,0xB5), o3(0xEE,0x9C,0xB6),
+     o3(0xEE,0x9C,0xB7), o3(0xEE,0x9C,0xB8),
+     o3(0xEE,0x9C,0xB9), o3(0xEE,0x9C,0xBA),
+     o3(0xEE,0x9C,0xBB), o3(0xEE,0x9C,0xBC),
+     o3(0xEE,0x9C,0xBD), o3(0xEE,0x9C,0xBE),
+     o3(0xEE,0x9C,0xBF), o3(0xEE,0x9D,0x80),
+     o3(0xEE,0x9D,0x81), o3(0xEE,0x9D,0x82),
+     o3(0xEE,0x9D,0x83), o3(0xEE,0x9D,0x84),
+     o3(0xEE,0x9D,0x85), o3(0xEE,0x9D,0x86),
+     o3(0xEE,0x9D,0x87), o3(0xEE,0x9D,0x88),
+     o3(0xEE,0x9D,0x89), o3(0xEE,0x9D,0x8A),
+     o3(0xEE,0x9D,0x8B), o3(0xEE,0x9D,0x8C),
+     o3(0xEE,0x9D,0x8D), o3(0xEE,0x9D,0x8E),
+     o3(0xEE,0x9D,0x8F), o3(0xEE,0x9D,0x90),
+     o3(0xEE,0x9D,0x91), o3(0xEE,0x9D,0x92),
+     o3(0xEE,0x9D,0x93), o3(0xEE,0x9D,0x94),
+     o3(0xEE,0x9D,0x95), o3(0xEE,0x9D,0x96),
+     o3(0xEE,0x9D,0x97),
+
+#define from_eucJP_ms_8F_FE WORDINDEX2INFO(14730)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_8F_FE_infos,
+
+#define from_eucJP_ms_8F_infos WORDINDEX2INFO(14732)
+                 INVALID,   from_EUC_JP_8F_A1,
+     from_eucJP_ms_8F_A2,   from_EUC_JP_8F_A6,
+       from_EUC_JP_8F_A7,   from_EUC_JP_8F_A9,
+       from_EUC_JP_8F_AA,   from_EUC_JP_8F_AB,
+       from_EUC_JP_8F_B0,   from_EUC_JP_8F_B1,
+       from_EUC_JP_8F_B2,   from_EUC_JP_8F_B3,
+       from_EUC_JP_8F_B4,   from_EUC_JP_8F_B5,
+       from_EUC_JP_8F_B6,   from_EUC_JP_8F_B7,
+       from_EUC_JP_8F_B8,   from_EUC_JP_8F_B9,
+       from_EUC_JP_8F_BA,   from_EUC_JP_8F_BB,
+       from_EUC_JP_8F_BC,   from_EUC_JP_8F_BD,
+       from_EUC_JP_8F_BE,   from_EUC_JP_8F_BF,
+       from_EUC_JP_8F_C0,   from_EUC_JP_8F_C1,
+       from_EUC_JP_8F_C2,   from_EUC_JP_8F_C3,
+       from_EUC_JP_8F_C4,   from_EUC_JP_8F_C5,
+       from_EUC_JP_8F_C6,   from_EUC_JP_8F_C7,
+       from_EUC_JP_8F_C8,   from_EUC_JP_8F_C9,
+       from_EUC_JP_8F_CA,   from_EUC_JP_8F_CB,
+       from_EUC_JP_8F_CC,   from_EUC_JP_8F_CD,
+       from_EUC_JP_8F_CE,   from_EUC_JP_8F_CF,
+       from_EUC_JP_8F_D0,   from_EUC_JP_8F_D1,
+       from_EUC_JP_8F_D2,   from_EUC_JP_8F_D3,
+       from_EUC_JP_8F_D4,   from_EUC_JP_8F_D5,
+       from_EUC_JP_8F_D6,   from_EUC_JP_8F_D7,
+       from_EUC_JP_8F_D8,   from_EUC_JP_8F_D9,
+       from_EUC_JP_8F_DA,   from_EUC_JP_8F_DB,
+       from_EUC_JP_8F_DC,   from_EUC_JP_8F_DD,
+       from_EUC_JP_8F_DE,   from_EUC_JP_8F_DF,
+       from_EUC_JP_8F_E0,   from_EUC_JP_8F_E1,
+       from_EUC_JP_8F_E2,   from_EUC_JP_8F_E3,
+       from_EUC_JP_8F_E4,   from_EUC_JP_8F_E5,
+       from_EUC_JP_8F_E6,   from_EUC_JP_8F_E7,
+       from_EUC_JP_8F_E8,   from_EUC_JP_8F_E9,
+       from_EUC_JP_8F_EA,   from_EUC_JP_8F_EB,
+       from_EUC_JP_8F_EC,   from_EUC_JP_8F_ED,
+     from_eucJP_ms_8F_F3, from_eucJP_ms_8F_F4,
+     from_eucJP_ms_8F_F5, from_eucJP_ms_8F_F6,
+     from_eucJP_ms_8F_F7, from_eucJP_ms_8F_F8,
+     from_eucJP_ms_8F_F9, from_eucJP_ms_8F_FA,
+     from_eucJP_ms_8F_FB, from_eucJP_ms_8F_FC,
+     from_eucJP_ms_8F_FD, from_eucJP_ms_8F_FE,
+
+#define from_eucJP_ms_8F WORDINDEX2INFO(14814)
+    from_eucJP_ms_8F_offsets,
+    from_eucJP_ms_8F_infos,
+
+#define from_eucJP_ms_A1_infos WORDINDEX2INFO(14816)
+                INVALID, o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8E),
+     o3(0xE3,0x83,0xBB), o3(0xEF,0xBC,0x9A),
+     o3(0xEF,0xBC,0x9B), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0x81), o3(0xE3,0x82,0x9B),
+     o3(0xE3,0x82,0x9C),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x80),      o2(0xC2,0xA8),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBF,0xA3),
+     o3(0xEF,0xBC,0xBF), o3(0xE3,0x83,0xBD),
+     o3(0xE3,0x83,0xBE), o3(0xE3,0x82,0x9D),
+     o3(0xE3,0x82,0x9E), o3(0xE3,0x80,0x83),
+     o3(0xE4,0xBB,0x9D), o3(0xE3,0x80,0x85),
+     o3(0xE3,0x80,0x86), o3(0xE3,0x80,0x87),
+     o3(0xE3,0x83,0xBC), o3(0xE2,0x80,0x95),
+     o3(0xE2,0x80,0x90), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0xBC), o3(0xEF,0xBD,0x9E),
+     o3(0xE2,0x88,0xA5), o3(0xEF,0xBD,0x9C),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xEF,0xBC,0xBB), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBD,0x9B), o3(0xEF,0xBD,0x9D),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+     o3(0xEF,0xBC,0x8B), o3(0xEF,0xBC,0x8D),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xEF,0xBC,0x9D),
+     o3(0xE2,0x89,0xA0), o3(0xEF,0xBC,0x9C),
+     o3(0xEF,0xBC,0x9E), o3(0xE2,0x89,0xA6),
+     o3(0xE2,0x89,0xA7), o3(0xE2,0x88,0x9E),
+     o3(0xE2,0x88,0xB4), o3(0xE2,0x99,0x82),
+     o3(0xE2,0x99,0x80),      o2(0xC2,0xB0),
+     o3(0xE2,0x80,0xB2), o3(0xE2,0x80,0xB3),
+     o3(0xE2,0x84,0x83), o3(0xEF,0xBF,0xA5),
+     o3(0xEF,0xBC,0x84), o3(0xEF,0xBF,0xA0),
+     o3(0xEF,0xBF,0xA1), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x83), o3(0xEF,0xBC,0x86),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0xA0),
+          o2(0xC2,0xA7), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87),
+
+#define from_eucJP_ms_A1 WORDINDEX2INFO(14911)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_A1_infos,
+
+#define from_eucJP_ms_A2_infos WORDINDEX2INFO(14913)
+                INVALID, o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x80,0xBB), o3(0xE3,0x80,0x92),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE3,0x80,0x93),              UNDEF,
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+     o3(0xEF,0xBF,0xA2), o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x8C,0x92),
+     o3(0xE2,0x88,0x82), o3(0xE2,0x88,0x87),
+     o3(0xE2,0x89,0xA1), o3(0xE2,0x89,0x92),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x84,0xAB), o3(0xE2,0x80,0xB0),
+     o3(0xE2,0x99,0xAF), o3(0xE2,0x99,0xAD),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xC2,0xB6),
+     o3(0xE2,0x97,0xAF),
+
+#define from_eucJP_ms_A2 WORDINDEX2INFO(14968)
+    from_EUC_JP_A2_offsets,
+    from_eucJP_ms_A2_infos,
+
+#define from_eucJP_ms_AD_infos WORDINDEX2INFO(14970)
+                INVALID, o3(0xE2,0x91,0xA0),
+     o3(0xE2,0x91,0xA1), o3(0xE2,0x91,0xA2),
+     o3(0xE2,0x91,0xA3), o3(0xE2,0x91,0xA4),
+     o3(0xE2,0x91,0xA5), o3(0xE2,0x91,0xA6),
+     o3(0xE2,0x91,0xA7), o3(0xE2,0x91,0xA8),
+     o3(0xE2,0x91,0xA9), o3(0xE2,0x91,0xAA),
+     o3(0xE2,0x91,0xAB), o3(0xE2,0x91,0xAC),
+     o3(0xE2,0x91,0xAD), o3(0xE2,0x91,0xAE),
+     o3(0xE2,0x91,0xAF), o3(0xE2,0x91,0xB0),
+     o3(0xE2,0x91,0xB1), o3(0xE2,0x91,0xB2),
+     o3(0xE2,0x91,0xB3), o3(0xE2,0x85,0xA0),
+     o3(0xE2,0x85,0xA1), o3(0xE2,0x85,0xA2),
+     o3(0xE2,0x85,0xA3), o3(0xE2,0x85,0xA4),
+     o3(0xE2,0x85,0xA5), o3(0xE2,0x85,0xA6),
+     o3(0xE2,0x85,0xA7), o3(0xE2,0x85,0xA8),
+     o3(0xE2,0x85,0xA9),              UNDEF,
+     o3(0xE3,0x8D,0x89), o3(0xE3,0x8C,0x94),
+     o3(0xE3,0x8C,0xA2), o3(0xE3,0x8D,0x8D),
+     o3(0xE3,0x8C,0x98), o3(0xE3,0x8C,0xA7),
+     o3(0xE3,0x8C,0x83), o3(0xE3,0x8C,0xB6),
+     o3(0xE3,0x8D,0x91), o3(0xE3,0x8D,0x97),
+     o3(0xE3,0x8C,0x8D), o3(0xE3,0x8C,0xA6),
+     o3(0xE3,0x8C,0xA3), o3(0xE3,0x8C,0xAB),
+     o3(0xE3,0x8D,0x8A), o3(0xE3,0x8C,0xBB),
+     o3(0xE3,0x8E,0x9C), o3(0xE3,0x8E,0x9D),
+     o3(0xE3,0x8E,0x9E), o3(0xE3,0x8E,0x8E),
+     o3(0xE3,0x8E,0x8F), o3(0xE3,0x8F,0x84),
+     o3(0xE3,0x8E,0xA1), o3(0xE3,0x8D,0xBB),
+     o3(0xE3,0x80,0x9D), o3(0xE3,0x80,0x9F),
+     o3(0xE2,0x84,0x96), o3(0xE3,0x8F,0x8D),
+     o3(0xE2,0x84,0xA1), o3(0xE3,0x8A,0xA4),
+     o3(0xE3,0x8A,0xA5), o3(0xE3,0x8A,0xA6),
+     o3(0xE3,0x8A,0xA7), o3(0xE3,0x8A,0xA8),
+     o3(0xE3,0x88,0xB1), o3(0xE3,0x88,0xB2),
+     o3(0xE3,0x88,0xB9), o3(0xE3,0x8D,0xBE),
+     o3(0xE3,0x8D,0xBD), o3(0xE3,0x8D,0xBC),
+     o3(0xE2,0x89,0x92), o3(0xE2,0x89,0xA1),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAE),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x9A),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x88,0x9F), o3(0xE2,0x8A,0xBF),
+     o3(0xE2,0x88,0xB5), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xAA),
+
+#define from_eucJP_ms_AD WORDINDEX2INFO(15055)
+    from_eucJP_ms_AD_offsets,
+    from_eucJP_ms_AD_infos,
+
+#define from_eucJP_ms_F5_infos WORDINDEX2INFO(15057)
+                INVALID, o3(0xEE,0x80,0x80),
+     o3(0xEE,0x80,0x81), o3(0xEE,0x80,0x82),
+     o3(0xEE,0x80,0x83), o3(0xEE,0x80,0x84),
+     o3(0xEE,0x80,0x85), o3(0xEE,0x80,0x86),
+     o3(0xEE,0x80,0x87), o3(0xEE,0x80,0x88),
+     o3(0xEE,0x80,0x89), o3(0xEE,0x80,0x8A),
+     o3(0xEE,0x80,0x8B), o3(0xEE,0x80,0x8C),
+     o3(0xEE,0x80,0x8D), o3(0xEE,0x80,0x8E),
+     o3(0xEE,0x80,0x8F), o3(0xEE,0x80,0x90),
+     o3(0xEE,0x80,0x91), o3(0xEE,0x80,0x92),
+     o3(0xEE,0x80,0x93), o3(0xEE,0x80,0x94),
+     o3(0xEE,0x80,0x95), o3(0xEE,0x80,0x96),
+     o3(0xEE,0x80,0x97), o3(0xEE,0x80,0x98),
+     o3(0xEE,0x80,0x99), o3(0xEE,0x80,0x9A),
+     o3(0xEE,0x80,0x9B), o3(0xEE,0x80,0x9C),
+     o3(0xEE,0x80,0x9D), o3(0xEE,0x80,0x9E),
+     o3(0xEE,0x80,0x9F), o3(0xEE,0x80,0xA0),
+     o3(0xEE,0x80,0xA1), o3(0xEE,0x80,0xA2),
+     o3(0xEE,0x80,0xA3), o3(0xEE,0x80,0xA4),
+     o3(0xEE,0x80,0xA5), o3(0xEE,0x80,0xA6),
+     o3(0xEE,0x80,0xA7), o3(0xEE,0x80,0xA8),
+     o3(0xEE,0x80,0xA9), o3(0xEE,0x80,0xAA),
+     o3(0xEE,0x80,0xAB), o3(0xEE,0x80,0xAC),
+     o3(0xEE,0x80,0xAD), o3(0xEE,0x80,0xAE),
+     o3(0xEE,0x80,0xAF), o3(0xEE,0x80,0xB0),
+     o3(0xEE,0x80,0xB1), o3(0xEE,0x80,0xB2),
+     o3(0xEE,0x80,0xB3), o3(0xEE,0x80,0xB4),
+     o3(0xEE,0x80,0xB5), o3(0xEE,0x80,0xB6),
+     o3(0xEE,0x80,0xB7), o3(0xEE,0x80,0xB8),
+     o3(0xEE,0x80,0xB9), o3(0xEE,0x80,0xBA),
+     o3(0xEE,0x80,0xBB), o3(0xEE,0x80,0xBC),
+     o3(0xEE,0x80,0xBD), o3(0xEE,0x80,0xBE),
+     o3(0xEE,0x80,0xBF), o3(0xEE,0x81,0x80),
+     o3(0xEE,0x81,0x81), o3(0xEE,0x81,0x82),
+     o3(0xEE,0x81,0x83), o3(0xEE,0x81,0x84),
+     o3(0xEE,0x81,0x85), o3(0xEE,0x81,0x86),
+     o3(0xEE,0x81,0x87), o3(0xEE,0x81,0x88),
+     o3(0xEE,0x81,0x89), o3(0xEE,0x81,0x8A),
+     o3(0xEE,0x81,0x8B), o3(0xEE,0x81,0x8C),
+     o3(0xEE,0x81,0x8D), o3(0xEE,0x81,0x8E),
+     o3(0xEE,0x81,0x8F), o3(0xEE,0x81,0x90),
+     o3(0xEE,0x81,0x91), o3(0xEE,0x81,0x92),
+     o3(0xEE,0x81,0x93), o3(0xEE,0x81,0x94),
+     o3(0xEE,0x81,0x95), o3(0xEE,0x81,0x96),
+     o3(0xEE,0x81,0x97), o3(0xEE,0x81,0x98),
+     o3(0xEE,0x81,0x99), o3(0xEE,0x81,0x9A),
+     o3(0xEE,0x81,0x9B), o3(0xEE,0x81,0x9C),
+     o3(0xEE,0x81,0x9D),
+
+#define from_eucJP_ms_F5 WORDINDEX2INFO(15152)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_F5_infos,
+
+#define from_eucJP_ms_F6_infos WORDINDEX2INFO(15154)
+                INVALID, o3(0xEE,0x81,0x9E),
+     o3(0xEE,0x81,0x9F), o3(0xEE,0x81,0xA0),
+     o3(0xEE,0x81,0xA1), o3(0xEE,0x81,0xA2),
+     o3(0xEE,0x81,0xA3), o3(0xEE,0x81,0xA4),
+     o3(0xEE,0x81,0xA5), o3(0xEE,0x81,0xA6),
+     o3(0xEE,0x81,0xA7), o3(0xEE,0x81,0xA8),
+     o3(0xEE,0x81,0xA9), o3(0xEE,0x81,0xAA),
+     o3(0xEE,0x81,0xAB), o3(0xEE,0x81,0xAC),
+     o3(0xEE,0x81,0xAD), o3(0xEE,0x81,0xAE),
+     o3(0xEE,0x81,0xAF), o3(0xEE,0x81,0xB0),
+     o3(0xEE,0x81,0xB1), o3(0xEE,0x81,0xB2),
+     o3(0xEE,0x81,0xB3), o3(0xEE,0x81,0xB4),
+     o3(0xEE,0x81,0xB5), o3(0xEE,0x81,0xB6),
+     o3(0xEE,0x81,0xB7), o3(0xEE,0x81,0xB8),
+     o3(0xEE,0x81,0xB9), o3(0xEE,0x81,0xBA),
+     o3(0xEE,0x81,0xBB), o3(0xEE,0x81,0xBC),
+     o3(0xEE,0x81,0xBD), o3(0xEE,0x81,0xBE),
+     o3(0xEE,0x81,0xBF), o3(0xEE,0x82,0x80),
+     o3(0xEE,0x82,0x81), o3(0xEE,0x82,0x82),
+     o3(0xEE,0x82,0x83), o3(0xEE,0x82,0x84),
+     o3(0xEE,0x82,0x85), o3(0xEE,0x82,0x86),
+     o3(0xEE,0x82,0x87), o3(0xEE,0x82,0x88),
+     o3(0xEE,0x82,0x89), o3(0xEE,0x82,0x8A),
+     o3(0xEE,0x82,0x8B), o3(0xEE,0x82,0x8C),
+     o3(0xEE,0x82,0x8D), o3(0xEE,0x82,0x8E),
+     o3(0xEE,0x82,0x8F), o3(0xEE,0x82,0x90),
+     o3(0xEE,0x82,0x91), o3(0xEE,0x82,0x92),
+     o3(0xEE,0x82,0x93), o3(0xEE,0x82,0x94),
+     o3(0xEE,0x82,0x95), o3(0xEE,0x82,0x96),
+     o3(0xEE,0x82,0x97), o3(0xEE,0x82,0x98),
+     o3(0xEE,0x82,0x99), o3(0xEE,0x82,0x9A),
+     o3(0xEE,0x82,0x9B), o3(0xEE,0x82,0x9C),
+     o3(0xEE,0x82,0x9D), o3(0xEE,0x82,0x9E),
+     o3(0xEE,0x82,0x9F), o3(0xEE,0x82,0xA0),
+     o3(0xEE,0x82,0xA1), o3(0xEE,0x82,0xA2),
+     o3(0xEE,0x82,0xA3), o3(0xEE,0x82,0xA4),
+     o3(0xEE,0x82,0xA5), o3(0xEE,0x82,0xA6),
+     o3(0xEE,0x82,0xA7), o3(0xEE,0x82,0xA8),
+     o3(0xEE,0x82,0xA9), o3(0xEE,0x82,0xAA),
+     o3(0xEE,0x82,0xAB), o3(0xEE,0x82,0xAC),
+     o3(0xEE,0x82,0xAD), o3(0xEE,0x82,0xAE),
+     o3(0xEE,0x82,0xAF), o3(0xEE,0x82,0xB0),
+     o3(0xEE,0x82,0xB1), o3(0xEE,0x82,0xB2),
+     o3(0xEE,0x82,0xB3), o3(0xEE,0x82,0xB4),
+     o3(0xEE,0x82,0xB5), o3(0xEE,0x82,0xB6),
+     o3(0xEE,0x82,0xB7), o3(0xEE,0x82,0xB8),
+     o3(0xEE,0x82,0xB9), o3(0xEE,0x82,0xBA),
+     o3(0xEE,0x82,0xBB),
+
+#define from_eucJP_ms_F6 WORDINDEX2INFO(15249)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_F6_infos,
+
+#define from_eucJP_ms_F7_infos WORDINDEX2INFO(15251)
+                INVALID, o3(0xEE,0x82,0xBC),
+     o3(0xEE,0x82,0xBD), o3(0xEE,0x82,0xBE),
+     o3(0xEE,0x82,0xBF), o3(0xEE,0x83,0x80),
+     o3(0xEE,0x83,0x81), o3(0xEE,0x83,0x82),
+     o3(0xEE,0x83,0x83), o3(0xEE,0x83,0x84),
+     o3(0xEE,0x83,0x85), o3(0xEE,0x83,0x86),
+     o3(0xEE,0x83,0x87), o3(0xEE,0x83,0x88),
+     o3(0xEE,0x83,0x89), o3(0xEE,0x83,0x8A),
+     o3(0xEE,0x83,0x8B), o3(0xEE,0x83,0x8C),
+     o3(0xEE,0x83,0x8D), o3(0xEE,0x83,0x8E),
+     o3(0xEE,0x83,0x8F), o3(0xEE,0x83,0x90),
+     o3(0xEE,0x83,0x91), o3(0xEE,0x83,0x92),
+     o3(0xEE,0x83,0x93), o3(0xEE,0x83,0x94),
+     o3(0xEE,0x83,0x95), o3(0xEE,0x83,0x96),
+     o3(0xEE,0x83,0x97), o3(0xEE,0x83,0x98),
+     o3(0xEE,0x83,0x99), o3(0xEE,0x83,0x9A),
+     o3(0xEE,0x83,0x9B), o3(0xEE,0x83,0x9C),
+     o3(0xEE,0x83,0x9D), o3(0xEE,0x83,0x9E),
+     o3(0xEE,0x83,0x9F), o3(0xEE,0x83,0xA0),
+     o3(0xEE,0x83,0xA1), o3(0xEE,0x83,0xA2),
+     o3(0xEE,0x83,0xA3), o3(0xEE,0x83,0xA4),
+     o3(0xEE,0x83,0xA5), o3(0xEE,0x83,0xA6),
+     o3(0xEE,0x83,0xA7), o3(0xEE,0x83,0xA8),
+     o3(0xEE,0x83,0xA9), o3(0xEE,0x83,0xAA),
+     o3(0xEE,0x83,0xAB), o3(0xEE,0x83,0xAC),
+     o3(0xEE,0x83,0xAD), o3(0xEE,0x83,0xAE),
+     o3(0xEE,0x83,0xAF), o3(0xEE,0x83,0xB0),
+     o3(0xEE,0x83,0xB1), o3(0xEE,0x83,0xB2),
+     o3(0xEE,0x83,0xB3), o3(0xEE,0x83,0xB4),
+     o3(0xEE,0x83,0xB5), o3(0xEE,0x83,0xB6),
+     o3(0xEE,0x83,0xB7), o3(0xEE,0x83,0xB8),
+     o3(0xEE,0x83,0xB9), o3(0xEE,0x83,0xBA),
+     o3(0xEE,0x83,0xBB), o3(0xEE,0x83,0xBC),
+     o3(0xEE,0x83,0xBD), o3(0xEE,0x83,0xBE),
+     o3(0xEE,0x83,0xBF), o3(0xEE,0x84,0x80),
+     o3(0xEE,0x84,0x81), o3(0xEE,0x84,0x82),
+     o3(0xEE,0x84,0x83), o3(0xEE,0x84,0x84),
+     o3(0xEE,0x84,0x85), o3(0xEE,0x84,0x86),
+     o3(0xEE,0x84,0x87), o3(0xEE,0x84,0x88),
+     o3(0xEE,0x84,0x89), o3(0xEE,0x84,0x8A),
+     o3(0xEE,0x84,0x8B), o3(0xEE,0x84,0x8C),
+     o3(0xEE,0x84,0x8D), o3(0xEE,0x84,0x8E),
+     o3(0xEE,0x84,0x8F), o3(0xEE,0x84,0x90),
+     o3(0xEE,0x84,0x91), o3(0xEE,0x84,0x92),
+     o3(0xEE,0x84,0x93), o3(0xEE,0x84,0x94),
+     o3(0xEE,0x84,0x95), o3(0xEE,0x84,0x96),
+     o3(0xEE,0x84,0x97), o3(0xEE,0x84,0x98),
+     o3(0xEE,0x84,0x99),
+
+#define from_eucJP_ms_F7 WORDINDEX2INFO(15346)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_F7_infos,
+
+#define from_eucJP_ms_F8_infos WORDINDEX2INFO(15348)
+                INVALID, o3(0xEE,0x84,0x9A),
+     o3(0xEE,0x84,0x9B), o3(0xEE,0x84,0x9C),
+     o3(0xEE,0x84,0x9D), o3(0xEE,0x84,0x9E),
+     o3(0xEE,0x84,0x9F), o3(0xEE,0x84,0xA0),
+     o3(0xEE,0x84,0xA1), o3(0xEE,0x84,0xA2),
+     o3(0xEE,0x84,0xA3), o3(0xEE,0x84,0xA4),
+     o3(0xEE,0x84,0xA5), o3(0xEE,0x84,0xA6),
+     o3(0xEE,0x84,0xA7), o3(0xEE,0x84,0xA8),
+     o3(0xEE,0x84,0xA9), o3(0xEE,0x84,0xAA),
+     o3(0xEE,0x84,0xAB), o3(0xEE,0x84,0xAC),
+     o3(0xEE,0x84,0xAD), o3(0xEE,0x84,0xAE),
+     o3(0xEE,0x84,0xAF), o3(0xEE,0x84,0xB0),
+     o3(0xEE,0x84,0xB1), o3(0xEE,0x84,0xB2),
+     o3(0xEE,0x84,0xB3), o3(0xEE,0x84,0xB4),
+     o3(0xEE,0x84,0xB5), o3(0xEE,0x84,0xB6),
+     o3(0xEE,0x84,0xB7), o3(0xEE,0x84,0xB8),
+     o3(0xEE,0x84,0xB9), o3(0xEE,0x84,0xBA),
+     o3(0xEE,0x84,0xBB), o3(0xEE,0x84,0xBC),
+     o3(0xEE,0x84,0xBD), o3(0xEE,0x84,0xBE),
+     o3(0xEE,0x84,0xBF), o3(0xEE,0x85,0x80),
+     o3(0xEE,0x85,0x81), o3(0xEE,0x85,0x82),
+     o3(0xEE,0x85,0x83), o3(0xEE,0x85,0x84),
+     o3(0xEE,0x85,0x85), o3(0xEE,0x85,0x86),
+     o3(0xEE,0x85,0x87), o3(0xEE,0x85,0x88),
+     o3(0xEE,0x85,0x89), o3(0xEE,0x85,0x8A),
+     o3(0xEE,0x85,0x8B), o3(0xEE,0x85,0x8C),
+     o3(0xEE,0x85,0x8D), o3(0xEE,0x85,0x8E),
+     o3(0xEE,0x85,0x8F), o3(0xEE,0x85,0x90),
+     o3(0xEE,0x85,0x91), o3(0xEE,0x85,0x92),
+     o3(0xEE,0x85,0x93), o3(0xEE,0x85,0x94),
+     o3(0xEE,0x85,0x95), o3(0xEE,0x85,0x96),
+     o3(0xEE,0x85,0x97), o3(0xEE,0x85,0x98),
+     o3(0xEE,0x85,0x99), o3(0xEE,0x85,0x9A),
+     o3(0xEE,0x85,0x9B), o3(0xEE,0x85,0x9C),
+     o3(0xEE,0x85,0x9D), o3(0xEE,0x85,0x9E),
+     o3(0xEE,0x85,0x9F), o3(0xEE,0x85,0xA0),
+     o3(0xEE,0x85,0xA1), o3(0xEE,0x85,0xA2),
+     o3(0xEE,0x85,0xA3), o3(0xEE,0x85,0xA4),
+     o3(0xEE,0x85,0xA5), o3(0xEE,0x85,0xA6),
+     o3(0xEE,0x85,0xA7), o3(0xEE,0x85,0xA8),
+     o3(0xEE,0x85,0xA9), o3(0xEE,0x85,0xAA),
+     o3(0xEE,0x85,0xAB), o3(0xEE,0x85,0xAC),
+     o3(0xEE,0x85,0xAD), o3(0xEE,0x85,0xAE),
+     o3(0xEE,0x85,0xAF), o3(0xEE,0x85,0xB0),
+     o3(0xEE,0x85,0xB1), o3(0xEE,0x85,0xB2),
+     o3(0xEE,0x85,0xB3), o3(0xEE,0x85,0xB4),
+     o3(0xEE,0x85,0xB5), o3(0xEE,0x85,0xB6),
+     o3(0xEE,0x85,0xB7),
+
+#define from_eucJP_ms_F8 WORDINDEX2INFO(15443)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_F8_infos,
+
+#define from_eucJP_ms_F9_infos WORDINDEX2INFO(15445)
+                INVALID, o3(0xEE,0x85,0xB8),
+     o3(0xEE,0x85,0xB9), o3(0xEE,0x85,0xBA),
+     o3(0xEE,0x85,0xBB), o3(0xEE,0x85,0xBC),
+     o3(0xEE,0x85,0xBD), o3(0xEE,0x85,0xBE),
+     o3(0xEE,0x85,0xBF), o3(0xEE,0x86,0x80),
+     o3(0xEE,0x86,0x81), o3(0xEE,0x86,0x82),
+     o3(0xEE,0x86,0x83), o3(0xEE,0x86,0x84),
+     o3(0xEE,0x86,0x85), o3(0xEE,0x86,0x86),
+     o3(0xEE,0x86,0x87), o3(0xEE,0x86,0x88),
+     o3(0xEE,0x86,0x89), o3(0xEE,0x86,0x8A),
+     o3(0xEE,0x86,0x8B), o3(0xEE,0x86,0x8C),
+     o3(0xEE,0x86,0x8D), o3(0xEE,0x86,0x8E),
+     o3(0xEE,0x86,0x8F), o3(0xEE,0x86,0x90),
+     o3(0xEE,0x86,0x91), o3(0xEE,0x86,0x92),
+     o3(0xEE,0x86,0x93), o3(0xEE,0x86,0x94),
+     o3(0xEE,0x86,0x95), o3(0xEE,0x86,0x96),
+     o3(0xEE,0x86,0x97), o3(0xEE,0x86,0x98),
+     o3(0xEE,0x86,0x99), o3(0xEE,0x86,0x9A),
+     o3(0xEE,0x86,0x9B), o3(0xEE,0x86,0x9C),
+     o3(0xEE,0x86,0x9D), o3(0xEE,0x86,0x9E),
+     o3(0xEE,0x86,0x9F), o3(0xEE,0x86,0xA0),
+     o3(0xEE,0x86,0xA1), o3(0xEE,0x86,0xA2),
+     o3(0xEE,0x86,0xA3), o3(0xEE,0x86,0xA4),
+     o3(0xEE,0x86,0xA5), o3(0xEE,0x86,0xA6),
+     o3(0xEE,0x86,0xA7), o3(0xEE,0x86,0xA8),
+     o3(0xEE,0x86,0xA9), o3(0xEE,0x86,0xAA),
+     o3(0xEE,0x86,0xAB), o3(0xEE,0x86,0xAC),
+     o3(0xEE,0x86,0xAD), o3(0xEE,0x86,0xAE),
+     o3(0xEE,0x86,0xAF), o3(0xEE,0x86,0xB0),
+     o3(0xEE,0x86,0xB1), o3(0xEE,0x86,0xB2),
+     o3(0xEE,0x86,0xB3), o3(0xEE,0x86,0xB4),
+     o3(0xEE,0x86,0xB5), o3(0xEE,0x86,0xB6),
+     o3(0xEE,0x86,0xB7), o3(0xEE,0x86,0xB8),
+     o3(0xEE,0x86,0xB9), o3(0xEE,0x86,0xBA),
+     o3(0xEE,0x86,0xBB), o3(0xEE,0x86,0xBC),
+     o3(0xEE,0x86,0xBD), o3(0xEE,0x86,0xBE),
+     o3(0xEE,0x86,0xBF), o3(0xEE,0x87,0x80),
+     o3(0xEE,0x87,0x81), o3(0xEE,0x87,0x82),
+     o3(0xEE,0x87,0x83), o3(0xEE,0x87,0x84),
+     o3(0xEE,0x87,0x85), o3(0xEE,0x87,0x86),
+     o3(0xEE,0x87,0x87), o3(0xEE,0x87,0x88),
+     o3(0xEE,0x87,0x89), o3(0xEE,0x87,0x8A),
+     o3(0xEE,0x87,0x8B), o3(0xEE,0x87,0x8C),
+     o3(0xEE,0x87,0x8D), o3(0xEE,0x87,0x8E),
+     o3(0xEE,0x87,0x8F), o3(0xEE,0x87,0x90),
+     o3(0xEE,0x87,0x91), o3(0xEE,0x87,0x92),
+     o3(0xEE,0x87,0x93), o3(0xEE,0x87,0x94),
+     o3(0xEE,0x87,0x95),
+
+#define from_eucJP_ms_F9 WORDINDEX2INFO(15540)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_F9_infos,
+
+#define from_eucJP_ms_FA_infos WORDINDEX2INFO(15542)
+                INVALID, o3(0xEE,0x87,0x96),
+     o3(0xEE,0x87,0x97), o3(0xEE,0x87,0x98),
+     o3(0xEE,0x87,0x99), o3(0xEE,0x87,0x9A),
+     o3(0xEE,0x87,0x9B), o3(0xEE,0x87,0x9C),
+     o3(0xEE,0x87,0x9D), o3(0xEE,0x87,0x9E),
+     o3(0xEE,0x87,0x9F), o3(0xEE,0x87,0xA0),
+     o3(0xEE,0x87,0xA1), o3(0xEE,0x87,0xA2),
+     o3(0xEE,0x87,0xA3), o3(0xEE,0x87,0xA4),
+     o3(0xEE,0x87,0xA5), o3(0xEE,0x87,0xA6),
+     o3(0xEE,0x87,0xA7), o3(0xEE,0x87,0xA8),
+     o3(0xEE,0x87,0xA9), o3(0xEE,0x87,0xAA),
+     o3(0xEE,0x87,0xAB), o3(0xEE,0x87,0xAC),
+     o3(0xEE,0x87,0xAD), o3(0xEE,0x87,0xAE),
+     o3(0xEE,0x87,0xAF), o3(0xEE,0x87,0xB0),
+     o3(0xEE,0x87,0xB1), o3(0xEE,0x87,0xB2),
+     o3(0xEE,0x87,0xB3), o3(0xEE,0x87,0xB4),
+     o3(0xEE,0x87,0xB5), o3(0xEE,0x87,0xB6),
+     o3(0xEE,0x87,0xB7), o3(0xEE,0x87,0xB8),
+     o3(0xEE,0x87,0xB9), o3(0xEE,0x87,0xBA),
+     o3(0xEE,0x87,0xBB), o3(0xEE,0x87,0xBC),
+     o3(0xEE,0x87,0xBD), o3(0xEE,0x87,0xBE),
+     o3(0xEE,0x87,0xBF), o3(0xEE,0x88,0x80),
+     o3(0xEE,0x88,0x81), o3(0xEE,0x88,0x82),
+     o3(0xEE,0x88,0x83), o3(0xEE,0x88,0x84),
+     o3(0xEE,0x88,0x85), o3(0xEE,0x88,0x86),
+     o3(0xEE,0x88,0x87), o3(0xEE,0x88,0x88),
+     o3(0xEE,0x88,0x89), o3(0xEE,0x88,0x8A),
+     o3(0xEE,0x88,0x8B), o3(0xEE,0x88,0x8C),
+     o3(0xEE,0x88,0x8D), o3(0xEE,0x88,0x8E),
+     o3(0xEE,0x88,0x8F), o3(0xEE,0x88,0x90),
+     o3(0xEE,0x88,0x91), o3(0xEE,0x88,0x92),
+     o3(0xEE,0x88,0x93), o3(0xEE,0x88,0x94),
+     o3(0xEE,0x88,0x95), o3(0xEE,0x88,0x96),
+     o3(0xEE,0x88,0x97), o3(0xEE,0x88,0x98),
+     o3(0xEE,0x88,0x99), o3(0xEE,0x88,0x9A),
+     o3(0xEE,0x88,0x9B), o3(0xEE,0x88,0x9C),
+     o3(0xEE,0x88,0x9D), o3(0xEE,0x88,0x9E),
+     o3(0xEE,0x88,0x9F), o3(0xEE,0x88,0xA0),
+     o3(0xEE,0x88,0xA1), o3(0xEE,0x88,0xA2),
+     o3(0xEE,0x88,0xA3), o3(0xEE,0x88,0xA4),
+     o3(0xEE,0x88,0xA5), o3(0xEE,0x88,0xA6),
+     o3(0xEE,0x88,0xA7), o3(0xEE,0x88,0xA8),
+     o3(0xEE,0x88,0xA9), o3(0xEE,0x88,0xAA),
+     o3(0xEE,0x88,0xAB), o3(0xEE,0x88,0xAC),
+     o3(0xEE,0x88,0xAD), o3(0xEE,0x88,0xAE),
+     o3(0xEE,0x88,0xAF), o3(0xEE,0x88,0xB0),
+     o3(0xEE,0x88,0xB1), o3(0xEE,0x88,0xB2),
+     o3(0xEE,0x88,0xB3),
+
+#define from_eucJP_ms_FA WORDINDEX2INFO(15637)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_FA_infos,
+
+#define from_eucJP_ms_FB_infos WORDINDEX2INFO(15639)
+                INVALID, o3(0xEE,0x88,0xB4),
+     o3(0xEE,0x88,0xB5), o3(0xEE,0x88,0xB6),
+     o3(0xEE,0x88,0xB7), o3(0xEE,0x88,0xB8),
+     o3(0xEE,0x88,0xB9), o3(0xEE,0x88,0xBA),
+     o3(0xEE,0x88,0xBB), o3(0xEE,0x88,0xBC),
+     o3(0xEE,0x88,0xBD), o3(0xEE,0x88,0xBE),
+     o3(0xEE,0x88,0xBF), o3(0xEE,0x89,0x80),
+     o3(0xEE,0x89,0x81), o3(0xEE,0x89,0x82),
+     o3(0xEE,0x89,0x83), o3(0xEE,0x89,0x84),
+     o3(0xEE,0x89,0x85), o3(0xEE,0x89,0x86),
+     o3(0xEE,0x89,0x87), o3(0xEE,0x89,0x88),
+     o3(0xEE,0x89,0x89), o3(0xEE,0x89,0x8A),
+     o3(0xEE,0x89,0x8B), o3(0xEE,0x89,0x8C),
+     o3(0xEE,0x89,0x8D), o3(0xEE,0x89,0x8E),
+     o3(0xEE,0x89,0x8F), o3(0xEE,0x89,0x90),
+     o3(0xEE,0x89,0x91), o3(0xEE,0x89,0x92),
+     o3(0xEE,0x89,0x93), o3(0xEE,0x89,0x94),
+     o3(0xEE,0x89,0x95), o3(0xEE,0x89,0x96),
+     o3(0xEE,0x89,0x97), o3(0xEE,0x89,0x98),
+     o3(0xEE,0x89,0x99), o3(0xEE,0x89,0x9A),
+     o3(0xEE,0x89,0x9B), o3(0xEE,0x89,0x9C),
+     o3(0xEE,0x89,0x9D), o3(0xEE,0x89,0x9E),
+     o3(0xEE,0x89,0x9F), o3(0xEE,0x89,0xA0),
+     o3(0xEE,0x89,0xA1), o3(0xEE,0x89,0xA2),
+     o3(0xEE,0x89,0xA3), o3(0xEE,0x89,0xA4),
+     o3(0xEE,0x89,0xA5), o3(0xEE,0x89,0xA6),
+     o3(0xEE,0x89,0xA7), o3(0xEE,0x89,0xA8),
+     o3(0xEE,0x89,0xA9), o3(0xEE,0x89,0xAA),
+     o3(0xEE,0x89,0xAB), o3(0xEE,0x89,0xAC),
+     o3(0xEE,0x89,0xAD), o3(0xEE,0x89,0xAE),
+     o3(0xEE,0x89,0xAF), o3(0xEE,0x89,0xB0),
+     o3(0xEE,0x89,0xB1), o3(0xEE,0x89,0xB2),
+     o3(0xEE,0x89,0xB3), o3(0xEE,0x89,0xB4),
+     o3(0xEE,0x89,0xB5), o3(0xEE,0x89,0xB6),
+     o3(0xEE,0x89,0xB7), o3(0xEE,0x89,0xB8),
+     o3(0xEE,0x89,0xB9), o3(0xEE,0x89,0xBA),
+     o3(0xEE,0x89,0xBB), o3(0xEE,0x89,0xBC),
+     o3(0xEE,0x89,0xBD), o3(0xEE,0x89,0xBE),
+     o3(0xEE,0x89,0xBF), o3(0xEE,0x8A,0x80),
+     o3(0xEE,0x8A,0x81), o3(0xEE,0x8A,0x82),
+     o3(0xEE,0x8A,0x83), o3(0xEE,0x8A,0x84),
+     o3(0xEE,0x8A,0x85), o3(0xEE,0x8A,0x86),
+     o3(0xEE,0x8A,0x87), o3(0xEE,0x8A,0x88),
+     o3(0xEE,0x8A,0x89), o3(0xEE,0x8A,0x8A),
+     o3(0xEE,0x8A,0x8B), o3(0xEE,0x8A,0x8C),
+     o3(0xEE,0x8A,0x8D), o3(0xEE,0x8A,0x8E),
+     o3(0xEE,0x8A,0x8F), o3(0xEE,0x8A,0x90),
+     o3(0xEE,0x8A,0x91),
+
+#define from_eucJP_ms_FB WORDINDEX2INFO(15734)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_FB_infos,
+
+#define from_eucJP_ms_FC_infos WORDINDEX2INFO(15736)
+                INVALID, o3(0xEE,0x8A,0x92),
+     o3(0xEE,0x8A,0x93), o3(0xEE,0x8A,0x94),
+     o3(0xEE,0x8A,0x95), o3(0xEE,0x8A,0x96),
+     o3(0xEE,0x8A,0x97), o3(0xEE,0x8A,0x98),
+     o3(0xEE,0x8A,0x99), o3(0xEE,0x8A,0x9A),
+     o3(0xEE,0x8A,0x9B), o3(0xEE,0x8A,0x9C),
+     o3(0xEE,0x8A,0x9D), o3(0xEE,0x8A,0x9E),
+     o3(0xEE,0x8A,0x9F), o3(0xEE,0x8A,0xA0),
+     o3(0xEE,0x8A,0xA1), o3(0xEE,0x8A,0xA2),
+     o3(0xEE,0x8A,0xA3), o3(0xEE,0x8A,0xA4),
+     o3(0xEE,0x8A,0xA5), o3(0xEE,0x8A,0xA6),
+     o3(0xEE,0x8A,0xA7), o3(0xEE,0x8A,0xA8),
+     o3(0xEE,0x8A,0xA9), o3(0xEE,0x8A,0xAA),
+     o3(0xEE,0x8A,0xAB), o3(0xEE,0x8A,0xAC),
+     o3(0xEE,0x8A,0xAD), o3(0xEE,0x8A,0xAE),
+     o3(0xEE,0x8A,0xAF), o3(0xEE,0x8A,0xB0),
+     o3(0xEE,0x8A,0xB1), o3(0xEE,0x8A,0xB2),
+     o3(0xEE,0x8A,0xB3), o3(0xEE,0x8A,0xB4),
+     o3(0xEE,0x8A,0xB5), o3(0xEE,0x8A,0xB6),
+     o3(0xEE,0x8A,0xB7), o3(0xEE,0x8A,0xB8),
+     o3(0xEE,0x8A,0xB9), o3(0xEE,0x8A,0xBA),
+     o3(0xEE,0x8A,0xBB), o3(0xEE,0x8A,0xBC),
+     o3(0xEE,0x8A,0xBD), o3(0xEE,0x8A,0xBE),
+     o3(0xEE,0x8A,0xBF), o3(0xEE,0x8B,0x80),
+     o3(0xEE,0x8B,0x81), o3(0xEE,0x8B,0x82),
+     o3(0xEE,0x8B,0x83), o3(0xEE,0x8B,0x84),
+     o3(0xEE,0x8B,0x85), o3(0xEE,0x8B,0x86),
+     o3(0xEE,0x8B,0x87), o3(0xEE,0x8B,0x88),
+     o3(0xEE,0x8B,0x89), o3(0xEE,0x8B,0x8A),
+     o3(0xEE,0x8B,0x8B), o3(0xEE,0x8B,0x8C),
+     o3(0xEE,0x8B,0x8D), o3(0xEE,0x8B,0x8E),
+     o3(0xEE,0x8B,0x8F), o3(0xEE,0x8B,0x90),
+     o3(0xEE,0x8B,0x91), o3(0xEE,0x8B,0x92),
+     o3(0xEE,0x8B,0x93), o3(0xEE,0x8B,0x94),
+     o3(0xEE,0x8B,0x95), o3(0xEE,0x8B,0x96),
+     o3(0xEE,0x8B,0x97), o3(0xEE,0x8B,0x98),
+     o3(0xEE,0x8B,0x99), o3(0xEE,0x8B,0x9A),
+     o3(0xEE,0x8B,0x9B), o3(0xEE,0x8B,0x9C),
+     o3(0xEE,0x8B,0x9D), o3(0xEE,0x8B,0x9E),
+     o3(0xEE,0x8B,0x9F), o3(0xEE,0x8B,0xA0),
+     o3(0xEE,0x8B,0xA1), o3(0xEE,0x8B,0xA2),
+     o3(0xEE,0x8B,0xA3), o3(0xEE,0x8B,0xA4),
+     o3(0xEE,0x8B,0xA5), o3(0xEE,0x8B,0xA6),
+     o3(0xEE,0x8B,0xA7), o3(0xEE,0x8B,0xA8),
+     o3(0xEE,0x8B,0xA9), o3(0xEE,0x8B,0xAA),
+     o3(0xEE,0x8B,0xAB), o3(0xEE,0x8B,0xAC),
+     o3(0xEE,0x8B,0xAD), o3(0xEE,0x8B,0xAE),
+     o3(0xEE,0x8B,0xAF),
+
+#define from_eucJP_ms_FC WORDINDEX2INFO(15831)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_FC_infos,
+
+#define from_eucJP_ms_FD_infos WORDINDEX2INFO(15833)
+                INVALID, o3(0xEE,0x8B,0xB0),
+     o3(0xEE,0x8B,0xB1), o3(0xEE,0x8B,0xB2),
+     o3(0xEE,0x8B,0xB3), o3(0xEE,0x8B,0xB4),
+     o3(0xEE,0x8B,0xB5), o3(0xEE,0x8B,0xB6),
+     o3(0xEE,0x8B,0xB7), o3(0xEE,0x8B,0xB8),
+     o3(0xEE,0x8B,0xB9), o3(0xEE,0x8B,0xBA),
+     o3(0xEE,0x8B,0xBB), o3(0xEE,0x8B,0xBC),
+     o3(0xEE,0x8B,0xBD), o3(0xEE,0x8B,0xBE),
+     o3(0xEE,0x8B,0xBF), o3(0xEE,0x8C,0x80),
+     o3(0xEE,0x8C,0x81), o3(0xEE,0x8C,0x82),
+     o3(0xEE,0x8C,0x83), o3(0xEE,0x8C,0x84),
+     o3(0xEE,0x8C,0x85), o3(0xEE,0x8C,0x86),
+     o3(0xEE,0x8C,0x87), o3(0xEE,0x8C,0x88),
+     o3(0xEE,0x8C,0x89), o3(0xEE,0x8C,0x8A),
+     o3(0xEE,0x8C,0x8B), o3(0xEE,0x8C,0x8C),
+     o3(0xEE,0x8C,0x8D), o3(0xEE,0x8C,0x8E),
+     o3(0xEE,0x8C,0x8F), o3(0xEE,0x8C,0x90),
+     o3(0xEE,0x8C,0x91), o3(0xEE,0x8C,0x92),
+     o3(0xEE,0x8C,0x93), o3(0xEE,0x8C,0x94),
+     o3(0xEE,0x8C,0x95), o3(0xEE,0x8C,0x96),
+     o3(0xEE,0x8C,0x97), o3(0xEE,0x8C,0x98),
+     o3(0xEE,0x8C,0x99), o3(0xEE,0x8C,0x9A),
+     o3(0xEE,0x8C,0x9B), o3(0xEE,0x8C,0x9C),
+     o3(0xEE,0x8C,0x9D), o3(0xEE,0x8C,0x9E),
+     o3(0xEE,0x8C,0x9F), o3(0xEE,0x8C,0xA0),
+     o3(0xEE,0x8C,0xA1), o3(0xEE,0x8C,0xA2),
+     o3(0xEE,0x8C,0xA3), o3(0xEE,0x8C,0xA4),
+     o3(0xEE,0x8C,0xA5), o3(0xEE,0x8C,0xA6),
+     o3(0xEE,0x8C,0xA7), o3(0xEE,0x8C,0xA8),
+     o3(0xEE,0x8C,0xA9), o3(0xEE,0x8C,0xAA),
+     o3(0xEE,0x8C,0xAB), o3(0xEE,0x8C,0xAC),
+     o3(0xEE,0x8C,0xAD), o3(0xEE,0x8C,0xAE),
+     o3(0xEE,0x8C,0xAF), o3(0xEE,0x8C,0xB0),
+     o3(0xEE,0x8C,0xB1), o3(0xEE,0x8C,0xB2),
+     o3(0xEE,0x8C,0xB3), o3(0xEE,0x8C,0xB4),
+     o3(0xEE,0x8C,0xB5), o3(0xEE,0x8C,0xB6),
+     o3(0xEE,0x8C,0xB7), o3(0xEE,0x8C,0xB8),
+     o3(0xEE,0x8C,0xB9), o3(0xEE,0x8C,0xBA),
+     o3(0xEE,0x8C,0xBB), o3(0xEE,0x8C,0xBC),
+     o3(0xEE,0x8C,0xBD), o3(0xEE,0x8C,0xBE),
+     o3(0xEE,0x8C,0xBF), o3(0xEE,0x8D,0x80),
+     o3(0xEE,0x8D,0x81), o3(0xEE,0x8D,0x82),
+     o3(0xEE,0x8D,0x83), o3(0xEE,0x8D,0x84),
+     o3(0xEE,0x8D,0x85), o3(0xEE,0x8D,0x86),
+     o3(0xEE,0x8D,0x87), o3(0xEE,0x8D,0x88),
+     o3(0xEE,0x8D,0x89), o3(0xEE,0x8D,0x8A),
+     o3(0xEE,0x8D,0x8B), o3(0xEE,0x8D,0x8C),
+     o3(0xEE,0x8D,0x8D),
+
+#define from_eucJP_ms_FD WORDINDEX2INFO(15928)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_FD_infos,
+
+#define from_eucJP_ms_FE_infos WORDINDEX2INFO(15930)
+                INVALID, o3(0xEE,0x8D,0x8E),
+     o3(0xEE,0x8D,0x8F), o3(0xEE,0x8D,0x90),
+     o3(0xEE,0x8D,0x91), o3(0xEE,0x8D,0x92),
+     o3(0xEE,0x8D,0x93), o3(0xEE,0x8D,0x94),
+     o3(0xEE,0x8D,0x95), o3(0xEE,0x8D,0x96),
+     o3(0xEE,0x8D,0x97), o3(0xEE,0x8D,0x98),
+     o3(0xEE,0x8D,0x99), o3(0xEE,0x8D,0x9A),
+     o3(0xEE,0x8D,0x9B), o3(0xEE,0x8D,0x9C),
+     o3(0xEE,0x8D,0x9D), o3(0xEE,0x8D,0x9E),
+     o3(0xEE,0x8D,0x9F), o3(0xEE,0x8D,0xA0),
+     o3(0xEE,0x8D,0xA1), o3(0xEE,0x8D,0xA2),
+     o3(0xEE,0x8D,0xA3), o3(0xEE,0x8D,0xA4),
+     o3(0xEE,0x8D,0xA5), o3(0xEE,0x8D,0xA6),
+     o3(0xEE,0x8D,0xA7), o3(0xEE,0x8D,0xA8),
+     o3(0xEE,0x8D,0xA9), o3(0xEE,0x8D,0xAA),
+     o3(0xEE,0x8D,0xAB), o3(0xEE,0x8D,0xAC),
+     o3(0xEE,0x8D,0xAD), o3(0xEE,0x8D,0xAE),
+     o3(0xEE,0x8D,0xAF), o3(0xEE,0x8D,0xB0),
+     o3(0xEE,0x8D,0xB1), o3(0xEE,0x8D,0xB2),
+     o3(0xEE,0x8D,0xB3), o3(0xEE,0x8D,0xB4),
+     o3(0xEE,0x8D,0xB5), o3(0xEE,0x8D,0xB6),
+     o3(0xEE,0x8D,0xB7), o3(0xEE,0x8D,0xB8),
+     o3(0xEE,0x8D,0xB9), o3(0xEE,0x8D,0xBA),
+     o3(0xEE,0x8D,0xBB), o3(0xEE,0x8D,0xBC),
+     o3(0xEE,0x8D,0xBD), o3(0xEE,0x8D,0xBE),
+     o3(0xEE,0x8D,0xBF), o3(0xEE,0x8E,0x80),
+     o3(0xEE,0x8E,0x81), o3(0xEE,0x8E,0x82),
+     o3(0xEE,0x8E,0x83), o3(0xEE,0x8E,0x84),
+     o3(0xEE,0x8E,0x85), o3(0xEE,0x8E,0x86),
+     o3(0xEE,0x8E,0x87), o3(0xEE,0x8E,0x88),
+     o3(0xEE,0x8E,0x89), o3(0xEE,0x8E,0x8A),
+     o3(0xEE,0x8E,0x8B), o3(0xEE,0x8E,0x8C),
+     o3(0xEE,0x8E,0x8D), o3(0xEE,0x8E,0x8E),
+     o3(0xEE,0x8E,0x8F), o3(0xEE,0x8E,0x90),
+     o3(0xEE,0x8E,0x91), o3(0xEE,0x8E,0x92),
+     o3(0xEE,0x8E,0x93), o3(0xEE,0x8E,0x94),
+     o3(0xEE,0x8E,0x95), o3(0xEE,0x8E,0x96),
+     o3(0xEE,0x8E,0x97), o3(0xEE,0x8E,0x98),
+     o3(0xEE,0x8E,0x99), o3(0xEE,0x8E,0x9A),
+     o3(0xEE,0x8E,0x9B), o3(0xEE,0x8E,0x9C),
+     o3(0xEE,0x8E,0x9D), o3(0xEE,0x8E,0x9E),
+     o3(0xEE,0x8E,0x9F), o3(0xEE,0x8E,0xA0),
+     o3(0xEE,0x8E,0xA1), o3(0xEE,0x8E,0xA2),
+     o3(0xEE,0x8E,0xA3), o3(0xEE,0x8E,0xA4),
+     o3(0xEE,0x8E,0xA5), o3(0xEE,0x8E,0xA6),
+     o3(0xEE,0x8E,0xA7), o3(0xEE,0x8E,0xA8),
+     o3(0xEE,0x8E,0xA9), o3(0xEE,0x8E,0xAA),
+     o3(0xEE,0x8E,0xAB),
+
+#define from_eucJP_ms_FE WORDINDEX2INFO(16025)
+    from_EUC_JP_8F_B0_offsets,
+    from_eucJP_ms_FE_infos,
+
+#define from_eucJP_ms_infos WORDINDEX2INFO(16027)
+                 NOMAP,           INVALID,
+        from_EUC_JP_8E,  from_eucJP_ms_8F,
+      from_eucJP_ms_A1,  from_eucJP_ms_A2,
+        from_EUC_JP_A3,    from_EUC_JP_A4,
+        from_EUC_JP_A5,    from_EUC_JP_A6,
+        from_EUC_JP_A7,    from_EUC_JP_A8,
+     from_EUC_JP_8F_A1,  from_eucJP_ms_AD,
+        from_EUC_JP_B0,    from_EUC_JP_B1,
+        from_EUC_JP_B2,    from_EUC_JP_B3,
+        from_EUC_JP_B4,    from_EUC_JP_B5,
+        from_EUC_JP_B6,    from_EUC_JP_B7,
+        from_EUC_JP_B8,    from_EUC_JP_B9,
+        from_EUC_JP_BA,    from_EUC_JP_BB,
+        from_EUC_JP_BC,    from_EUC_JP_BD,
+        from_EUC_JP_BE,    from_EUC_JP_BF,
+        from_EUC_JP_C0,    from_EUC_JP_C1,
+        from_EUC_JP_C2,    from_EUC_JP_C3,
+        from_EUC_JP_C4,    from_EUC_JP_C5,
+        from_EUC_JP_C6,    from_EUC_JP_C7,
+        from_EUC_JP_C8,    from_EUC_JP_C9,
+        from_EUC_JP_CA,    from_EUC_JP_CB,
+        from_EUC_JP_CC,    from_EUC_JP_CD,
+        from_EUC_JP_CE,    from_EUC_JP_CF,
+        from_EUC_JP_D0,    from_EUC_JP_D1,
+        from_EUC_JP_D2,    from_EUC_JP_D3,
+        from_EUC_JP_D4,    from_EUC_JP_D5,
+        from_EUC_JP_D6,    from_EUC_JP_D7,
+        from_EUC_JP_D8,    from_EUC_JP_D9,
+        from_EUC_JP_DA,    from_EUC_JP_DB,
+        from_EUC_JP_DC,    from_EUC_JP_DD,
+        from_EUC_JP_DE,    from_EUC_JP_DF,
+        from_EUC_JP_E0,    from_EUC_JP_E1,
+        from_EUC_JP_E2,    from_EUC_JP_E3,
+        from_EUC_JP_E4,    from_EUC_JP_E5,
+        from_EUC_JP_E6,    from_EUC_JP_E7,
+        from_EUC_JP_E8,    from_EUC_JP_E9,
+        from_EUC_JP_EA,    from_EUC_JP_EB,
+        from_EUC_JP_EC,    from_EUC_JP_ED,
+        from_EUC_JP_EE,    from_EUC_JP_EF,
+        from_EUC_JP_F0,    from_EUC_JP_F1,
+        from_EUC_JP_F2,    from_EUC_JP_F3,
+        from_EUC_JP_F4,  from_eucJP_ms_F5,
+      from_eucJP_ms_F6,  from_eucJP_ms_F7,
+      from_eucJP_ms_F8,  from_eucJP_ms_F9,
+      from_eucJP_ms_FA,  from_eucJP_ms_FB,
+      from_eucJP_ms_FC,  from_eucJP_ms_FD,
+      from_eucJP_ms_FE,
+
+#define from_eucJP_ms WORDINDEX2INFO(16120)
+    from_eucJP_ms_offsets,
+    from_eucJP_ms_infos,
+
+#define from_CP51932_F9_infos WORDINDEX2INFO(16122)
+                INVALID, o3(0xE7,0xBA,0x8A),
+     o3(0xE8,0xA4,0x9C), o3(0xE9,0x8D,0x88),
+     o3(0xE9,0x8A,0x88), o3(0xE8,0x93,0x9C),
+     o3(0xE4,0xBF,0x89), o3(0xE7,0x82,0xBB),
+     o3(0xE6,0x98,0xB1), o3(0xE6,0xA3,0x88),
+     o3(0xE9,0x8B,0xB9), o3(0xE6,0x9B,0xBB),
+     o3(0xE5,0xBD,0x85), o3(0xE4,0xB8,0xA8),
+     o3(0xE4,0xBB,0xA1), o3(0xE4,0xBB,0xBC),
+     o3(0xE4,0xBC,0x80), o3(0xE4,0xBC,0x83),
+     o3(0xE4,0xBC,0xB9), o3(0xE4,0xBD,0x96),
+     o3(0xE4,0xBE,0x92), o3(0xE4,0xBE,0x8A),
+     o3(0xE4,0xBE,0x9A), o3(0xE4,0xBE,0x94),
+     o3(0xE4,0xBF,0x8D), o3(0xE5,0x81,0x80),
+     o3(0xE5,0x80,0xA2), o3(0xE4,0xBF,0xBF),
+     o3(0xE5,0x80,0x9E), o3(0xE5,0x81,0x86),
+     o3(0xE5,0x81,0xB0), o3(0xE5,0x81,0x82),
+     o3(0xE5,0x82,0x94), o3(0xE5,0x83,0xB4),
+     o3(0xE5,0x83,0x98), o3(0xE5,0x85,0x8A),
+     o3(0xE5,0x85,0xA4), o3(0xE5,0x86,0x9D),
+     o3(0xE5,0x86,0xBE), o3(0xE5,0x87,0xAC),
+     o3(0xE5,0x88,0x95), o3(0xE5,0x8A,0x9C),
+     o3(0xE5,0x8A,0xA6), o3(0xE5,0x8B,0x80),
+     o3(0xE5,0x8B,0x9B), o3(0xE5,0x8C,0x80),
+     o3(0xE5,0x8C,0x87), o3(0xE5,0x8C,0xA4),
+     o3(0xE5,0x8D,0xB2), o3(0xE5,0x8E,0x93),
+     o3(0xE5,0x8E,0xB2), o3(0xE5,0x8F,0x9D),
+     o3(0xEF,0xA8,0x8E), o3(0xE5,0x92,0x9C),
+     o3(0xE5,0x92,0x8A), o3(0xE5,0x92,0xA9),
+     o3(0xE5,0x93,0xBF), o3(0xE5,0x96,0x86),
+     o3(0xE5,0x9D,0x99), o3(0xE5,0x9D,0xA5),
+     o3(0xE5,0x9E,0xAC), o3(0xE5,0x9F,0x88),
+     o3(0xE5,0x9F,0x87), o3(0xEF,0xA8,0x8F),
+     o3(0xEF,0xA8,0x90), o3(0xE5,0xA2,0x9E),
+     o3(0xE5,0xA2,0xB2), o3(0xE5,0xA4,0x8B),
+     o3(0xE5,0xA5,0x93), o3(0xE5,0xA5,0x9B),
+     o3(0xE5,0xA5,0x9D), o3(0xE5,0xA5,0xA3),
+     o3(0xE5,0xA6,0xA4), o3(0xE5,0xA6,0xBA),
+     o3(0xE5,0xAD,0x96), o3(0xE5,0xAF,0x80),
+     o3(0xE7,0x94,0xAF), o3(0xE5,0xAF,0x98),
+     o3(0xE5,0xAF,0xAC), o3(0xE5,0xB0,0x9E),
+     o3(0xE5,0xB2,0xA6), o3(0xE5,0xB2,0xBA),
+     o3(0xE5,0xB3,0xB5), o3(0xE5,0xB4,0xA7),
+     o3(0xE5,0xB5,0x93), o3(0xEF,0xA8,0x91),
+     o3(0xE5,0xB5,0x82), o3(0xE5,0xB5,0xAD),
+     o3(0xE5,0xB6,0xB8), o3(0xE5,0xB6,0xB9),
+     o3(0xE5,0xB7,0x90), o3(0xE5,0xBC,0xA1),
+     o3(0xE5,0xBC,0xB4), o3(0xE5,0xBD,0xA7),
+     o3(0xE5,0xBE,0xB7),
+
+#define from_CP51932_F9 WORDINDEX2INFO(16217)
+    from_EUC_JP_8F_B0_offsets,
+    from_CP51932_F9_infos,
+
+#define from_CP51932_FA_infos WORDINDEX2INFO(16219)
+                INVALID, o3(0xE5,0xBF,0x9E),
+     o3(0xE6,0x81,0x9D), o3(0xE6,0x82,0x85),
+     o3(0xE6,0x82,0x8A), o3(0xE6,0x83,0x9E),
+     o3(0xE6,0x83,0x95), o3(0xE6,0x84,0xA0),
+     o3(0xE6,0x83,0xB2), o3(0xE6,0x84,0x91),
+     o3(0xE6,0x84,0xB7), o3(0xE6,0x84,0xB0),
+     o3(0xE6,0x86,0x98), o3(0xE6,0x88,0x93),
+     o3(0xE6,0x8A,0xA6), o3(0xE6,0x8F,0xB5),
+     o3(0xE6,0x91,0xA0), o3(0xE6,0x92,0x9D),
+     o3(0xE6,0x93,0x8E), o3(0xE6,0x95,0x8E),
+     o3(0xE6,0x98,0x80), o3(0xE6,0x98,0x95),
+     o3(0xE6,0x98,0xBB), o3(0xE6,0x98,0x89),
+     o3(0xE6,0x98,0xAE), o3(0xE6,0x98,0x9E),
+     o3(0xE6,0x98,0xA4), o3(0xE6,0x99,0xA5),
+     o3(0xE6,0x99,0x97), o3(0xE6,0x99,0x99),
+     o3(0xEF,0xA8,0x92), o3(0xE6,0x99,0xB3),
+     o3(0xE6,0x9A,0x99), o3(0xE6,0x9A,0xA0),
+     o3(0xE6,0x9A,0xB2), o3(0xE6,0x9A,0xBF),
+     o3(0xE6,0x9B,0xBA), o3(0xE6,0x9C,0x8E),
+     o3(0xEF,0xA4,0xA9), o3(0xE6,0x9D,0xA6),
+     o3(0xE6,0x9E,0xBB), o3(0xE6,0xA1,0x92),
+     o3(0xE6,0x9F,0x80), o3(0xE6,0xA0,0x81),
+     o3(0xE6,0xA1,0x84), o3(0xE6,0xA3,0x8F),
+     o3(0xEF,0xA8,0x93), o3(0xE6,0xA5,0xA8),
+     o3(0xEF,0xA8,0x94), o3(0xE6,0xA6,0x98),
+     o3(0xE6,0xA7,0xA2), o3(0xE6,0xA8,0xB0),
+     o3(0xE6,0xA9,0xAB), o3(0xE6,0xA9,0x86),
+     o3(0xE6,0xA9,0xB3), o3(0xE6,0xA9,0xBE),
+     o3(0xE6,0xAB,0xA2), o3(0xE6,0xAB,0xA4),
+     o3(0xE6,0xAF,0x96), o3(0xE6,0xB0,0xBF),
+     o3(0xE6,0xB1,0x9C), o3(0xE6,0xB2,0x86),
+     o3(0xE6,0xB1,0xAF), o3(0xE6,0xB3,0x9A),
+     o3(0xE6,0xB4,0x84), o3(0xE6,0xB6,0x87),
+     o3(0xE6,0xB5,0xAF), o3(0xE6,0xB6,0x96),
+     o3(0xE6,0xB6,0xAC), o3(0xE6,0xB7,0x8F),
+     o3(0xE6,0xB7,0xB8), o3(0xE6,0xB7,0xB2),
+     o3(0xE6,0xB7,0xBC), o3(0xE6,0xB8,0xB9),
+     o3(0xE6,0xB9,0x9C), o3(0xE6,0xB8,0xA7),
+     o3(0xE6,0xB8,0xBC), o3(0xE6,0xBA,0xBF),
+     o3(0xE6,0xBE,0x88), o3(0xE6,0xBE,0xB5),
+     o3(0xE6,0xBF,0xB5), o3(0xE7,0x80,0x85),
+     o3(0xE7,0x80,0x87), o3(0xE7,0x80,0xA8),
+     o3(0xE7,0x82,0x85), o3(0xE7,0x82,0xAB),
+     o3(0xE7,0x84,0x8F), o3(0xE7,0x84,0x84),
+     o3(0xE7,0x85,0x9C), o3(0xE7,0x85,0x86),
+     o3(0xE7,0x85,0x87), o3(0xEF,0xA8,0x95),
+     o3(0xE7,0x87,0x81), o3(0xE7,0x87,0xBE),
+     o3(0xE7,0x8A,0xB1),
+
+#define from_CP51932_FA WORDINDEX2INFO(16314)
+    from_EUC_JP_8F_B0_offsets,
+    from_CP51932_FA_infos,
+
+#define from_CP51932_FB_infos WORDINDEX2INFO(16316)
+                INVALID, o3(0xE7,0x8A,0xBE),
+     o3(0xE7,0x8C,0xA4), o3(0xEF,0xA8,0x96),
+     o3(0xE7,0x8D,0xB7), o3(0xE7,0x8E,0xBD),
+     o3(0xE7,0x8F,0x89), o3(0xE7,0x8F,0x96),
+     o3(0xE7,0x8F,0xA3), o3(0xE7,0x8F,0x92),
+     o3(0xE7,0x90,0x87), o3(0xE7,0x8F,0xB5),
+     o3(0xE7,0x90,0xA6), o3(0xE7,0x90,0xAA),
+     o3(0xE7,0x90,0xA9), o3(0xE7,0x90,0xAE),
+     o3(0xE7,0x91,0xA2), o3(0xE7,0x92,0x89),
+     o3(0xE7,0x92,0x9F), o3(0xE7,0x94,0x81),
+     o3(0xE7,0x95,0xAF), o3(0xE7,0x9A,0x82),
+     o3(0xE7,0x9A,0x9C), o3(0xE7,0x9A,0x9E),
+     o3(0xE7,0x9A,0x9B), o3(0xE7,0x9A,0xA6),
+     o3(0xEF,0xA8,0x97), o3(0xE7,0x9D,0x86),
+     o3(0xE5,0x8A,0xAF), o3(0xE7,0xA0,0xA1),
+     o3(0xE7,0xA1,0x8E), o3(0xE7,0xA1,0xA4),
+     o3(0xE7,0xA1,0xBA), o3(0xE7,0xA4,0xB0),
+     o3(0xEF,0xA8,0x98), o3(0xEF,0xA8,0x99),
+     o3(0xEF,0xA8,0x9A), o3(0xE7,0xA6,0x94),
+     o3(0xEF,0xA8,0x9B), o3(0xE7,0xA6,0x9B),
+     o3(0xE7,0xAB,0x91), o3(0xE7,0xAB,0xA7),
+     o3(0xEF,0xA8,0x9C), o3(0xE7,0xAB,0xAB),
+     o3(0xE7,0xAE,0x9E), o3(0xEF,0xA8,0x9D),
+     o3(0xE7,0xB5,0x88), o3(0xE7,0xB5,0x9C),
+     o3(0xE7,0xB6,0xB7), o3(0xE7,0xB6,0xA0),
+     o3(0xE7,0xB7,0x96), o3(0xE7,0xB9,0x92),
+     o3(0xE7,0xBD,0x87), o3(0xE7,0xBE,0xA1),
+     o3(0xEF,0xA8,0x9E), o3(0xE8,0x8C,0x81),
+     o3(0xE8,0x8D,0xA2), o3(0xE8,0x8D,0xBF),
+     o3(0xE8,0x8F,0x87), o3(0xE8,0x8F,0xB6),
+     o3(0xE8,0x91,0x88), o3(0xE8,0x92,0xB4),
+     o3(0xE8,0x95,0x93), o3(0xE8,0x95,0x99),
+     o3(0xE8,0x95,0xAB), o3(0xEF,0xA8,0x9F),
+     o3(0xE8,0x96,0xB0), o3(0xEF,0xA8,0xA0),
+     o3(0xEF,0xA8,0xA1), o3(0xE8,0xA0,0x87),
+     o3(0xE8,0xA3,0xB5), o3(0xE8,0xA8,0x92),
+     o3(0xE8,0xA8,0xB7), o3(0xE8,0xA9,0xB9),
+     o3(0xE8,0xAA,0xA7), o3(0xE8,0xAA,0xBE),
+     o3(0xE8,0xAB,0x9F), o3(0xEF,0xA8,0xA2),
+     o3(0xE8,0xAB,0xB6), o3(0xE8,0xAD,0x93),
+     o3(0xE8,0xAD,0xBF), o3(0xE8,0xB3,0xB0),
+     o3(0xE8,0xB3,0xB4), o3(0xE8,0xB4,0x92),
+     o3(0xE8,0xB5,0xB6), o3(0xEF,0xA8,0xA3),
+     o3(0xE8,0xBB,0x8F), o3(0xEF,0xA8,0xA4),
+     o3(0xEF,0xA8,0xA5), o3(0xE9,0x81,0xA7),
+     o3(0xE9,0x83,0x9E), o3(0xEF,0xA8,0xA6),
+     o3(0xE9,0x84,0x95), o3(0xE9,0x84,0xA7),
+     o3(0xE9,0x87,0x9A),
+
+#define from_CP51932_FB WORDINDEX2INFO(16411)
+    from_EUC_JP_8F_B0_offsets,
+    from_CP51932_FB_infos,
+
+#define from_CP51932_FC_infos WORDINDEX2INFO(16413)
+                INVALID, o3(0xE9,0x87,0x97),
+     o3(0xE9,0x87,0x9E), o3(0xE9,0x87,0xAD),
+     o3(0xE9,0x87,0xAE), o3(0xE9,0x87,0xA4),
+     o3(0xE9,0x87,0xA5), o3(0xE9,0x88,0x86),
+     o3(0xE9,0x88,0x90), o3(0xE9,0x88,0x8A),
+     o3(0xE9,0x88,0xBA), o3(0xE9,0x89,0x80),
+     o3(0xE9,0x88,0xBC), o3(0xE9,0x89,0x8E),
+     o3(0xE9,0x89,0x99), o3(0xE9,0x89,0x91),
+     o3(0xE9,0x88,0xB9), o3(0xE9,0x89,0xA7),
+     o3(0xE9,0x8A,0xA7), o3(0xE9,0x89,0xB7),
+     o3(0xE9,0x89,0xB8), o3(0xE9,0x8B,0xA7),
+     o3(0xE9,0x8B,0x97), o3(0xE9,0x8B,0x99),
+     o3(0xE9,0x8B,0x90), o3(0xEF,0xA8,0xA7),
+     o3(0xE9,0x8B,0x95), o3(0xE9,0x8B,0xA0),
+     o3(0xE9,0x8B,0x93), o3(0xE9,0x8C,0xA5),
+     o3(0xE9,0x8C,0xA1), o3(0xE9,0x8B,0xBB),
+     o3(0xEF,0xA8,0xA8), o3(0xE9,0x8C,0x9E),
+     o3(0xE9,0x8B,0xBF), o3(0xE9,0x8C,0x9D),
+     o3(0xE9,0x8C,0x82), o3(0xE9,0x8D,0xB0),
+     o3(0xE9,0x8D,0x97), o3(0xE9,0x8E,0xA4),
+     o3(0xE9,0x8F,0x86), o3(0xE9,0x8F,0x9E),
+     o3(0xE9,0x8F,0xB8), o3(0xE9,0x90,0xB1),
+     o3(0xE9,0x91,0x85), o3(0xE9,0x91,0x88),
+     o3(0xE9,0x96,0x92), o3(0xEF,0xA7,0x9C),
+     o3(0xEF,0xA8,0xA9), o3(0xE9,0x9A,0x9D),
+     o3(0xE9,0x9A,0xAF), o3(0xE9,0x9C,0xB3),
+     o3(0xE9,0x9C,0xBB), o3(0xE9,0x9D,0x83),
+     o3(0xE9,0x9D,0x8D), o3(0xE9,0x9D,0x8F),
+     o3(0xE9,0x9D,0x91), o3(0xE9,0x9D,0x95),
+     o3(0xE9,0xA1,0x97), o3(0xE9,0xA1,0xA5),
+     o3(0xEF,0xA8,0xAA), o3(0xEF,0xA8,0xAB),
+     o3(0xE9,0xA4,0xA7), o3(0xEF,0xA8,0xAC),
+     o3(0xE9,0xA6,0x9E), o3(0xE9,0xA9,0x8E),
+     o3(0xE9,0xAB,0x99), o3(0xE9,0xAB,0x9C),
+     o3(0xE9,0xAD,0xB5), o3(0xE9,0xAD,0xB2),
+     o3(0xE9,0xAE,0x8F), o3(0xE9,0xAE,0xB1),
+     o3(0xE9,0xAE,0xBB), o3(0xE9,0xB0,0x80),
+     o3(0xE9,0xB5,0xB0), o3(0xE9,0xB5,0xAB),
+     o3(0xEF,0xA8,0xAD), o3(0xE9,0xB8,0x99),
+     o3(0xE9,0xBB,0x91),              UNDEF,
+     o3(0xE2,0x85,0xB0), o3(0xE2,0x85,0xB1),
+     o3(0xE2,0x85,0xB2), o3(0xE2,0x85,0xB3),
+     o3(0xE2,0x85,0xB4), o3(0xE2,0x85,0xB5),
+     o3(0xE2,0x85,0xB6), o3(0xE2,0x85,0xB7),
+     o3(0xE2,0x85,0xB8), o3(0xE2,0x85,0xB9),
+     o3(0xEF,0xBF,0xA2), o3(0xEF,0xBF,0xA4),
+     o3(0xEF,0xBC,0x87), o3(0xEF,0xBC,0x82),
+
+#define from_CP51932_FC WORDINDEX2INFO(16507)
+    from_CP51932_FC_offsets,
+    from_CP51932_FC_infos,
+
+#define from_CP51932_infos WORDINDEX2INFO(16509)
+                 NOMAP,           INVALID,
+        from_EUC_JP_8E,  from_eucJP_ms_A1,
+      from_eucJP_ms_A2,    from_EUC_JP_A3,
+        from_EUC_JP_A4,    from_EUC_JP_A5,
+        from_EUC_JP_A6,    from_EUC_JP_A7,
+        from_EUC_JP_A8, from_EUC_JP_8F_A1,
+      from_eucJP_ms_AD,    from_EUC_JP_B0,
+        from_EUC_JP_B1,    from_EUC_JP_B2,
+        from_EUC_JP_B3,    from_EUC_JP_B4,
+        from_EUC_JP_B5,    from_EUC_JP_B6,
+        from_EUC_JP_B7,    from_EUC_JP_B8,
+        from_EUC_JP_B9,    from_EUC_JP_BA,
+        from_EUC_JP_BB,    from_EUC_JP_BC,
+        from_EUC_JP_BD,    from_EUC_JP_BE,
+        from_EUC_JP_BF,    from_EUC_JP_C0,
+        from_EUC_JP_C1,    from_EUC_JP_C2,
+        from_EUC_JP_C3,    from_EUC_JP_C4,
+        from_EUC_JP_C5,    from_EUC_JP_C6,
+        from_EUC_JP_C7,    from_EUC_JP_C8,
+        from_EUC_JP_C9,    from_EUC_JP_CA,
+        from_EUC_JP_CB,    from_EUC_JP_CC,
+        from_EUC_JP_CD,    from_EUC_JP_CE,
+        from_EUC_JP_CF,    from_EUC_JP_D0,
+        from_EUC_JP_D1,    from_EUC_JP_D2,
+        from_EUC_JP_D3,    from_EUC_JP_D4,
+        from_EUC_JP_D5,    from_EUC_JP_D6,
+        from_EUC_JP_D7,    from_EUC_JP_D8,
+        from_EUC_JP_D9,    from_EUC_JP_DA,
+        from_EUC_JP_DB,    from_EUC_JP_DC,
+        from_EUC_JP_DD,    from_EUC_JP_DE,
+        from_EUC_JP_DF,    from_EUC_JP_E0,
+        from_EUC_JP_E1,    from_EUC_JP_E2,
+        from_EUC_JP_E3,    from_EUC_JP_E4,
+        from_EUC_JP_E5,    from_EUC_JP_E6,
+        from_EUC_JP_E7,    from_EUC_JP_E8,
+        from_EUC_JP_E9,    from_EUC_JP_EA,
+        from_EUC_JP_EB,    from_EUC_JP_EC,
+        from_EUC_JP_ED,    from_EUC_JP_EE,
+        from_EUC_JP_EF,    from_EUC_JP_F0,
+        from_EUC_JP_F1,    from_EUC_JP_F2,
+        from_EUC_JP_F3,    from_EUC_JP_F4,
+       from_CP51932_F9,   from_CP51932_FA,
+       from_CP51932_FB,   from_CP51932_FC,
+
+#define from_CP51932 WORDINDEX2INFO(16595)
+    from_CP51932_offsets,
+    from_CP51932_infos,
+
+#define to_EUC_JP_C2_infos WORDINDEX2INFO(16597)
+                INVALID,              UNDEF,
+     o3(0x8f,0xa2,0xc2),      o2(0xa1,0xf1),
+          o2(0xa1,0xf2), o3(0x8f,0xa2,0xf0),
+     o3(0x8f,0xa2,0xc3),      o2(0xa1,0xf8),
+          o2(0xa1,0xaf), o3(0x8f,0xa2,0xed),
+     o3(0x8f,0xa2,0xec),      o2(0xa2,0xcc),
+     o3(0x8f,0xa2,0xee), o3(0x8f,0xa2,0xb4),
+          o2(0xa1,0xeb),      o2(0xa1,0xde),
+          o2(0xa1,0xad),      o2(0xa2,0xf9),
+     o3(0x8f,0xa2,0xb1), o3(0x8f,0xa2,0xeb),
+     o3(0x8f,0xa2,0xc4),
+
+#define to_EUC_JP_C2 WORDINDEX2INFO(16618)
+    to_EUC_JP_C2_offsets,
+    to_EUC_JP_C2_infos,
+
+#define to_EUC_JP_C3_infos WORDINDEX2INFO(16620)
+                INVALID, o3(0x8f,0xaa,0xa2),
+     o3(0x8f,0xaa,0xa1), o3(0x8f,0xaa,0xa4),
+     o3(0x8f,0xaa,0xaa), o3(0x8f,0xaa,0xa3),
+     o3(0x8f,0xaa,0xa9), o3(0x8f,0xa9,0xa1),
+     o3(0x8f,0xaa,0xae), o3(0x8f,0xaa,0xb2),
+     o3(0x8f,0xaa,0xb1), o3(0x8f,0xaa,0xb4),
+     o3(0x8f,0xaa,0xb3), o3(0x8f,0xaa,0xc0),
+     o3(0x8f,0xaa,0xbf), o3(0x8f,0xaa,0xc2),
+     o3(0x8f,0xaa,0xc1),              UNDEF,
+     o3(0x8f,0xaa,0xd0), o3(0x8f,0xaa,0xd2),
+     o3(0x8f,0xaa,0xd1), o3(0x8f,0xaa,0xd4),
+     o3(0x8f,0xaa,0xd8), o3(0x8f,0xaa,0xd3),
+          o2(0xa1,0xdf), o3(0x8f,0xa9,0xac),
+     o3(0x8f,0xaa,0xe3), o3(0x8f,0xaa,0xe2),
+     o3(0x8f,0xaa,0xe5), o3(0x8f,0xaa,0xe4),
+     o3(0x8f,0xaa,0xf2), o3(0x8f,0xa9,0xb0),
+     o3(0x8f,0xa9,0xce), o3(0x8f,0xab,0xa2),
+     o3(0x8f,0xab,0xa1), o3(0x8f,0xab,0xa4),
+     o3(0x8f,0xab,0xaa), o3(0x8f,0xab,0xa3),
+     o3(0x8f,0xab,0xa9), o3(0x8f,0xa9,0xc1),
+     o3(0x8f,0xab,0xae), o3(0x8f,0xab,0xb2),
+     o3(0x8f,0xab,0xb1), o3(0x8f,0xab,0xb4),
+     o3(0x8f,0xab,0xb3), o3(0x8f,0xab,0xc0),
+     o3(0x8f,0xab,0xbf), o3(0x8f,0xab,0xc2),
+     o3(0x8f,0xab,0xc1), o3(0x8f,0xa9,0xc3),
+     o3(0x8f,0xab,0xd0), o3(0x8f,0xab,0xd2),
+     o3(0x8f,0xab,0xd1), o3(0x8f,0xab,0xd4),
+     o3(0x8f,0xab,0xd8), o3(0x8f,0xab,0xd3),
+          o2(0xa1,0xe0), o3(0x8f,0xa9,0xcc),
+     o3(0x8f,0xab,0xe3), o3(0x8f,0xab,0xe2),
+     o3(0x8f,0xab,0xe5), o3(0x8f,0xab,0xe4),
+     o3(0x8f,0xab,0xf2), o3(0x8f,0xa9,0xd0),
+     o3(0x8f,0xab,0xf3),
+
+#define to_EUC_JP_C3 WORDINDEX2INFO(16685)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_C3_infos,
+
+#define to_EUC_JP_C4_infos WORDINDEX2INFO(16687)
+                INVALID, o3(0x8f,0xaa,0xa7),
+     o3(0x8f,0xab,0xa7), o3(0x8f,0xaa,0xa5),
+     o3(0x8f,0xab,0xa5), o3(0x8f,0xaa,0xa8),
+     o3(0x8f,0xab,0xa8), o3(0x8f,0xaa,0xab),
+     o3(0x8f,0xab,0xab), o3(0x8f,0xaa,0xac),
+     o3(0x8f,0xab,0xac), o3(0x8f,0xaa,0xaf),
+     o3(0x8f,0xab,0xaf), o3(0x8f,0xaa,0xad),
+     o3(0x8f,0xab,0xad), o3(0x8f,0xaa,0xb0),
+     o3(0x8f,0xab,0xb0), o3(0x8f,0xa9,0xa2),
+     o3(0x8f,0xa9,0xc2), o3(0x8f,0xaa,0xb7),
+     o3(0x8f,0xab,0xb7),              UNDEF,
+     o3(0x8f,0xaa,0xb6), o3(0x8f,0xab,0xb6),
+     o3(0x8f,0xaa,0xb8), o3(0x8f,0xab,0xb8),
+     o3(0x8f,0xaa,0xb5), o3(0x8f,0xab,0xb5),
+     o3(0x8f,0xaa,0xba), o3(0x8f,0xab,0xba),
+     o3(0x8f,0xaa,0xbb), o3(0x8f,0xab,0xbb),
+     o3(0x8f,0xaa,0xbd), o3(0x8f,0xab,0xbd),
+     o3(0x8f,0xaa,0xbc), o3(0x8f,0xaa,0xbe),
+     o3(0x8f,0xab,0xbe), o3(0x8f,0xa9,0xa4),
+     o3(0x8f,0xa9,0xc4), o3(0x8f,0xaa,0xc7),
+     o3(0x8f,0xab,0xc7), o3(0x8f,0xaa,0xc5),
+     o3(0x8f,0xab,0xc5), o3(0x8f,0xaa,0xc6),
+     o3(0x8f,0xab,0xc6), o3(0x8f,0xaa,0xc4),
+     o3(0x8f,0xa9,0xc5), o3(0x8f,0xa9,0xa6),
+     o3(0x8f,0xa9,0xc6), o3(0x8f,0xaa,0xc8),
+     o3(0x8f,0xab,0xc8), o3(0x8f,0xaa,0xc9),
+     o3(0x8f,0xab,0xc9), o3(0x8f,0xa9,0xc7),
+     o3(0x8f,0xaa,0xca), o3(0x8f,0xab,0xca),
+     o3(0x8f,0xaa,0xcc), o3(0x8f,0xab,0xcc),
+     o3(0x8f,0xaa,0xcb), o3(0x8f,0xab,0xcb),
+     o3(0x8f,0xa9,0xa9),
+
+#define to_EUC_JP_C4 WORDINDEX2INFO(16748)
+    to_EUC_JP_C4_offsets,
+    to_EUC_JP_C4_infos,
+
+#define to_EUC_JP_C5_infos WORDINDEX2INFO(16750)
+                INVALID, o3(0x8f,0xa9,0xc9),
+     o3(0x8f,0xa9,0xa8), o3(0x8f,0xa9,0xc8),
+     o3(0x8f,0xaa,0xcd), o3(0x8f,0xab,0xcd),
+     o3(0x8f,0xaa,0xcf), o3(0x8f,0xab,0xcf),
+     o3(0x8f,0xaa,0xce), o3(0x8f,0xab,0xce),
+     o3(0x8f,0xa9,0xca), o3(0x8f,0xa9,0xab),
+     o3(0x8f,0xa9,0xcb), o3(0x8f,0xaa,0xd7),
+     o3(0x8f,0xab,0xd7),              UNDEF,
+     o3(0x8f,0xaa,0xd6), o3(0x8f,0xab,0xd6),
+     o3(0x8f,0xa9,0xad), o3(0x8f,0xa9,0xcd),
+     o3(0x8f,0xaa,0xd9), o3(0x8f,0xab,0xd9),
+     o3(0x8f,0xaa,0xdb), o3(0x8f,0xab,0xdb),
+     o3(0x8f,0xaa,0xda), o3(0x8f,0xab,0xda),
+     o3(0x8f,0xaa,0xdc), o3(0x8f,0xab,0xdc),
+     o3(0x8f,0xaa,0xdd), o3(0x8f,0xab,0xdd),
+     o3(0x8f,0xaa,0xdf), o3(0x8f,0xab,0xdf),
+     o3(0x8f,0xaa,0xde), o3(0x8f,0xab,0xde),
+     o3(0x8f,0xaa,0xe1), o3(0x8f,0xab,0xe1),
+     o3(0x8f,0xaa,0xe0), o3(0x8f,0xab,0xe0),
+     o3(0x8f,0xa9,0xaf), o3(0x8f,0xa9,0xcf),
+     o3(0x8f,0xaa,0xec), o3(0x8f,0xab,0xec),
+     o3(0x8f,0xaa,0xe9), o3(0x8f,0xab,0xe9),
+     o3(0x8f,0xaa,0xe6), o3(0x8f,0xab,0xe6),
+     o3(0x8f,0xaa,0xeb), o3(0x8f,0xab,0xeb),
+     o3(0x8f,0xaa,0xe8), o3(0x8f,0xab,0xe8),
+     o3(0x8f,0xaa,0xea), o3(0x8f,0xab,0xea),
+     o3(0x8f,0xaa,0xf1), o3(0x8f,0xab,0xf1),
+     o3(0x8f,0xaa,0xf4), o3(0x8f,0xab,0xf4),
+     o3(0x8f,0xaa,0xf3), o3(0x8f,0xaa,0xf5),
+     o3(0x8f,0xab,0xf5), o3(0x8f,0xaa,0xf7),
+     o3(0x8f,0xab,0xf7), o3(0x8f,0xaa,0xf6),
+     o3(0x8f,0xab,0xf6),
+
+#define to_EUC_JP_C5 WORDINDEX2INFO(16813)
+    to_EUC_JP_C5_offsets,
+    to_EUC_JP_C5_infos,
+
+#define to_EUC_JP_C6 WORDINDEX2INFO(16815)
+    to_EUC_JP_C6_offsets,
+    from_EUC_JP_8F_A1_infos,
+
+#define to_EUC_JP_C7_infos WORDINDEX2INFO(16817)
+                INVALID,              UNDEF,
+     o3(0x8f,0xaa,0xa6), o3(0x8f,0xab,0xa6),
+     o3(0x8f,0xaa,0xc3), o3(0x8f,0xab,0xc3),
+     o3(0x8f,0xaa,0xd5), o3(0x8f,0xab,0xd5),
+     o3(0x8f,0xaa,0xe7), o3(0x8f,0xab,0xe7),
+     o3(0x8f,0xaa,0xf0), o3(0x8f,0xab,0xf0),
+     o3(0x8f,0xaa,0xed), o3(0x8f,0xab,0xed),
+     o3(0x8f,0xaa,0xef), o3(0x8f,0xab,0xef),
+     o3(0x8f,0xaa,0xee), o3(0x8f,0xab,0xee),
+     o3(0x8f,0xab,0xb9),
+
+#define to_EUC_JP_C7 WORDINDEX2INFO(16836)
+    to_EUC_JP_C7_offsets,
+    to_EUC_JP_C7_infos,
+
+#define to_EUC_JP_CB_infos WORDINDEX2INFO(16838)
+                INVALID,              UNDEF,
+     o3(0x8f,0xa2,0xb0), o3(0x8f,0xa2,0xaf),
+     o3(0x8f,0xa2,0xb2), o3(0x8f,0xa2,0xb6),
+     o3(0x8f,0xa2,0xb5), o3(0x8f,0xa2,0xb3),
+
+#define to_EUC_JP_CB WORDINDEX2INFO(16846)
+    to_EUC_JP_CB_offsets,
+    to_EUC_JP_CB_infos,
+
+#define to_EUC_JP_CE_infos WORDINDEX2INFO(16848)
+                INVALID,              UNDEF,
+     o3(0x8f,0xa2,0xb8), o3(0x8f,0xa2,0xb9),
+     o3(0x8f,0xa6,0xe1), o3(0x8f,0xa6,0xe2),
+     o3(0x8f,0xa6,0xe3), o3(0x8f,0xa6,0xe4),
+     o3(0x8f,0xa6,0xe7), o3(0x8f,0xa6,0xe9),
+     o3(0x8f,0xa6,0xec), o3(0x8f,0xa6,0xf6),
+          o2(0xa6,0xa1),      o2(0xa6,0xa2),
+          o2(0xa6,0xa3),      o2(0xa6,0xa4),
+          o2(0xa6,0xa5),      o2(0xa6,0xa6),
+          o2(0xa6,0xa7),      o2(0xa6,0xa8),
+          o2(0xa6,0xa9),      o2(0xa6,0xaa),
+          o2(0xa6,0xab),      o2(0xa6,0xac),
+          o2(0xa6,0xad),      o2(0xa6,0xae),
+          o2(0xa6,0xaf),      o2(0xa6,0xb0),
+          o2(0xa6,0xb1),      o2(0xa6,0xb2),
+          o2(0xa6,0xb3),      o2(0xa6,0xb4),
+          o2(0xa6,0xb5),      o2(0xa6,0xb6),
+          o2(0xa6,0xb7),      o2(0xa6,0xb8),
+     o3(0x8f,0xa6,0xe5), o3(0x8f,0xa6,0xea),
+     o3(0x8f,0xa6,0xf1), o3(0x8f,0xa6,0xf2),
+     o3(0x8f,0xa6,0xf3), o3(0x8f,0xa6,0xf4),
+     o3(0x8f,0xa6,0xfb),      o2(0xa6,0xc1),
+          o2(0xa6,0xc2),      o2(0xa6,0xc3),
+          o2(0xa6,0xc4),      o2(0xa6,0xc5),
+          o2(0xa6,0xc6),      o2(0xa6,0xc7),
+          o2(0xa6,0xc8),      o2(0xa6,0xc9),
+          o2(0xa6,0xca),      o2(0xa6,0xcb),
+          o2(0xa6,0xcc),      o2(0xa6,0xcd),
+          o2(0xa6,0xce),      o2(0xa6,0xcf),
+
+#define to_EUC_JP_CE WORDINDEX2INFO(16906)
+    to_EUC_JP_CE_offsets,
+    to_EUC_JP_CE_infos,
+
+#define to_EUC_JP_CF_infos WORDINDEX2INFO(16908)
+                INVALID,      o2(0xa6,0xd0),
+          o2(0xa6,0xd1), o3(0x8f,0xa6,0xf8),
+          o2(0xa6,0xd2),      o2(0xa6,0xd3),
+          o2(0xa6,0xd4),      o2(0xa6,0xd5),
+          o2(0xa6,0xd6),      o2(0xa6,0xd7),
+          o2(0xa6,0xd8), o3(0x8f,0xa6,0xf5),
+     o3(0x8f,0xa6,0xfa), o3(0x8f,0xa6,0xf7),
+     o3(0x8f,0xa6,0xf9), o3(0x8f,0xa6,0xfc),
+                  UNDEF,
+
+#define to_EUC_JP_CF WORDINDEX2INFO(16925)
+    to_EUC_JP_CF_offsets,
+    to_EUC_JP_CF_infos,
+
+#define to_EUC_JP_D0_infos WORDINDEX2INFO(16927)
+                INVALID,              UNDEF,
+          o2(0xa7,0xa7), o3(0x8f,0xa7,0xc2),
+     o3(0x8f,0xa7,0xc3), o3(0x8f,0xa7,0xc4),
+     o3(0x8f,0xa7,0xc5), o3(0x8f,0xa7,0xc6),
+     o3(0x8f,0xa7,0xc7), o3(0x8f,0xa7,0xc8),
+     o3(0x8f,0xa7,0xc9), o3(0x8f,0xa7,0xca),
+     o3(0x8f,0xa7,0xcb), o3(0x8f,0xa7,0xcc),
+     o3(0x8f,0xa7,0xcd), o3(0x8f,0xa7,0xce),
+          o2(0xa7,0xa1),      o2(0xa7,0xa2),
+          o2(0xa7,0xa3),      o2(0xa7,0xa4),
+          o2(0xa7,0xa5),      o2(0xa7,0xa6),
+          o2(0xa7,0xa8),      o2(0xa7,0xa9),
+          o2(0xa7,0xaa),      o2(0xa7,0xab),
+          o2(0xa7,0xac),      o2(0xa7,0xad),
+          o2(0xa7,0xae),      o2(0xa7,0xaf),
+          o2(0xa7,0xb0),      o2(0xa7,0xb1),
+          o2(0xa7,0xb2),      o2(0xa7,0xb3),
+          o2(0xa7,0xb4),      o2(0xa7,0xb5),
+          o2(0xa7,0xb6),      o2(0xa7,0xb7),
+          o2(0xa7,0xb8),      o2(0xa7,0xb9),
+          o2(0xa7,0xba),      o2(0xa7,0xbb),
+          o2(0xa7,0xbc),      o2(0xa7,0xbd),
+          o2(0xa7,0xbe),      o2(0xa7,0xbf),
+          o2(0xa7,0xc0),      o2(0xa7,0xc1),
+          o2(0xa7,0xd1),      o2(0xa7,0xd2),
+          o2(0xa7,0xd3),      o2(0xa7,0xd4),
+          o2(0xa7,0xd5),      o2(0xa7,0xd6),
+          o2(0xa7,0xd8),      o2(0xa7,0xd9),
+          o2(0xa7,0xda),      o2(0xa7,0xdb),
+          o2(0xa7,0xdc),      o2(0xa7,0xdd),
+          o2(0xa7,0xde),      o2(0xa7,0xdf),
+          o2(0xa7,0xe0),      o2(0xa7,0xe1),
+
+#define to_EUC_JP_D0 WORDINDEX2INFO(16991)
+    to_EUC_JP_D0_offsets,
+    to_EUC_JP_D0_infos,
+
+#define to_EUC_JP_D1_infos WORDINDEX2INFO(16993)
+                INVALID,      o2(0xa7,0xe2),
+          o2(0xa7,0xe3),      o2(0xa7,0xe4),
+          o2(0xa7,0xe5),      o2(0xa7,0xe6),
+          o2(0xa7,0xe7),      o2(0xa7,0xe8),
+          o2(0xa7,0xe9),      o2(0xa7,0xea),
+          o2(0xa7,0xeb),      o2(0xa7,0xec),
+          o2(0xa7,0xed),      o2(0xa7,0xee),
+          o2(0xa7,0xef),      o2(0xa7,0xf0),
+          o2(0xa7,0xf1),              UNDEF,
+          o2(0xa7,0xd7), o3(0x8f,0xa7,0xf2),
+     o3(0x8f,0xa7,0xf3), o3(0x8f,0xa7,0xf4),
+     o3(0x8f,0xa7,0xf5), o3(0x8f,0xa7,0xf6),
+     o3(0x8f,0xa7,0xf7), o3(0x8f,0xa7,0xf8),
+     o3(0x8f,0xa7,0xf9), o3(0x8f,0xa7,0xfa),
+     o3(0x8f,0xa7,0xfb), o3(0x8f,0xa7,0xfc),
+     o3(0x8f,0xa7,0xfd), o3(0x8f,0xa7,0xfe),
+
+#define to_EUC_JP_D1 WORDINDEX2INFO(17025)
+    to_EUC_JP_D1_offsets,
+    to_EUC_JP_D1_infos,
+
+#define to_EUC_JP_E0_infos WORDINDEX2INFO(17027)
+          INVALID, to_EUC_JP_C6,
+
+#define to_EUC_JP_E0 WORDINDEX2INFO(17029)
+    to_EUC_JP_E0_offsets,
+    to_EUC_JP_E0_infos,
+
+#define to_EUC_JP_E1 WORDINDEX2INFO(17031)
+    to_EUC_JP_C6_offsets,
+    to_EUC_JP_E0_infos,
+
+#define to_EUC_JP_E2_80_infos WORDINDEX2INFO(17033)
+           INVALID,         UNDEF, o2(0xa1,0xbe), o2(0xa1,0xbd),
+     o2(0xa1,0xc2), o2(0xa1,0xc6), o2(0xa1,0xc7), o2(0xa1,0xc8),
+     o2(0xa1,0xc9), o2(0xa2,0xf7), o2(0xa2,0xf8), o2(0xa1,0xc5),
+     o2(0xa1,0xc4), o2(0xa2,0xf3), o2(0xa1,0xec), o2(0xa1,0xed),
+     o2(0xa2,0xa8),
+
+#define to_EUC_JP_E2_80 WORDINDEX2INFO(17050)
+    to_EUC_JP_E2_80_offsets,
+    to_EUC_JP_E2_80_infos,
+
+#define to_EUC_JP_E2_84_infos WORDINDEX2INFO(17052)
+                INVALID,              UNDEF,
+          o2(0xa1,0xee), o3(0x8f,0xa2,0xf1),
+     o3(0x8f,0xa2,0xef),      o2(0xa2,0xf2),
+
+#define to_EUC_JP_E2_84 WORDINDEX2INFO(17058)
+    to_EUC_JP_E2_84_offsets,
+    to_EUC_JP_E2_84_infos,
+
+#define to_EUC_JP_E2_86_infos WORDINDEX2INFO(17060)
+           INVALID,         UNDEF, o2(0xa2,0xab), o2(0xa2,0xac),
+     o2(0xa2,0xaa), o2(0xa2,0xad),
+
+#define to_EUC_JP_E2_86 WORDINDEX2INFO(17066)
+    to_EUC_JP_E2_86_offsets,
+    to_EUC_JP_E2_86_infos,
+
+#define to_EUC_JP_E2_87_infos WORDINDEX2INFO(17068)
+           INVALID,         UNDEF, o2(0xa2,0xcd), o2(0xa2,0xce),
+
+#define to_EUC_JP_E2_87 WORDINDEX2INFO(17072)
+    to_EUC_JP_E2_87_offsets,
+    to_EUC_JP_E2_87_infos,
+
+#define to_EUC_JP_E2_88_infos WORDINDEX2INFO(17074)
+           INVALID, o2(0xa2,0xcf),         UNDEF, o2(0xa2,0xdf),
+     o2(0xa2,0xd0), o2(0xa2,0xe0), o2(0xa2,0xba), o2(0xa2,0xbb),
+     o2(0xa1,0xdd), o2(0xa2,0xe5), o2(0xa2,0xe7), o2(0xa1,0xe7),
+     o2(0xa2,0xdc), o2(0xa2,0xca), o2(0xa2,0xcb), o2(0xa2,0xc1),
+     o2(0xa2,0xc0), o2(0xa2,0xe9), o2(0xa2,0xea), o2(0xa1,0xe8),
+     o2(0xa2,0xe8), o2(0xa2,0xe6),
+
+#define to_EUC_JP_E2_88 WORDINDEX2INFO(17096)
+    to_EUC_JP_E2_88_offsets,
+    to_EUC_JP_E2_88_infos,
+
+#define to_EUC_JP_E2_89_infos WORDINDEX2INFO(17098)
+           INVALID,         UNDEF, o2(0xa2,0xe2), o2(0xa1,0xe2),
+     o2(0xa2,0xe1), o2(0xa1,0xe5), o2(0xa1,0xe6), o2(0xa2,0xe3),
+     o2(0xa2,0xe4),
+
+#define to_EUC_JP_E2_89 WORDINDEX2INFO(17107)
+    to_EUC_JP_E2_89_offsets,
+    to_EUC_JP_E2_89_infos,
+
+#define to_EUC_JP_E2_8A_infos WORDINDEX2INFO(17109)
+           INVALID,         UNDEF, o2(0xa2,0xbe), o2(0xa2,0xbf),
+     o2(0xa2,0xbc), o2(0xa2,0xbd), o2(0xa2,0xdd),
+
+#define to_EUC_JP_E2_8A WORDINDEX2INFO(17116)
+    to_EUC_JP_E2_8A_offsets,
+    to_EUC_JP_E2_8A_infos,
+
+#define to_EUC_JP_E2_8C_infos WORDINDEX2INFO(17118)
+           INVALID,         UNDEF, o2(0xa2,0xde),
+
+#define to_EUC_JP_E2_8C WORDINDEX2INFO(17121)
+    to_EUC_JP_E2_8C_offsets,
+    to_EUC_JP_E2_8C_infos,
+
+#define to_EUC_JP_E2_94_infos WORDINDEX2INFO(17123)
+           INVALID, o2(0xa8,0xa1), o2(0xa8,0xac), o2(0xa8,0xa2),
+     o2(0xa8,0xad),         UNDEF, o2(0xa8,0xa3), o2(0xa8,0xae),
+     o2(0xa8,0xa4), o2(0xa8,0xaf), o2(0xa8,0xa6), o2(0xa8,0xb1),
+     o2(0xa8,0xa5), o2(0xa8,0xb0), o2(0xa8,0xa7), o2(0xa8,0xbc),
+     o2(0xa8,0xb7), o2(0xa8,0xb2), o2(0xa8,0xa9), o2(0xa8,0xbe),
+     o2(0xa8,0xb9), o2(0xa8,0xb4), o2(0xa8,0xa8), o2(0xa8,0xb8),
+     o2(0xa8,0xbd), o2(0xa8,0xb3), o2(0xa8,0xaa), o2(0xa8,0xba),
+     o2(0xa8,0xbf), o2(0xa8,0xb5), o2(0xa8,0xab), o2(0xa8,0xbb),
+
+#define to_EUC_JP_E2_94 WORDINDEX2INFO(17155)
+    to_EUC_JP_E2_94_offsets,
+    to_EUC_JP_E2_94_infos,
+
+#define to_EUC_JP_E2_95_infos WORDINDEX2INFO(17157)
+           INVALID,         UNDEF, o2(0xa8,0xc0), o2(0xa8,0xb6),
+
+#define to_EUC_JP_E2_95 WORDINDEX2INFO(17161)
+    to_EUC_JP_E2_95_offsets,
+    to_EUC_JP_E2_95_infos,
+
+#define to_EUC_JP_E2_96_infos WORDINDEX2INFO(17163)
+           INVALID,         UNDEF, o2(0xa2,0xa3), o2(0xa2,0xa2),
+     o2(0xa2,0xa5), o2(0xa2,0xa4), o2(0xa2,0xa7), o2(0xa2,0xa6),
+
+#define to_EUC_JP_E2_96 WORDINDEX2INFO(17171)
+    to_EUC_JP_E2_96_offsets,
+    to_EUC_JP_E2_96_infos,
+
+#define to_EUC_JP_E2_97_infos WORDINDEX2INFO(17173)
+           INVALID,         UNDEF, o2(0xa2,0xa1), o2(0xa1,0xfe),
+     o2(0xa1,0xfb), o2(0xa1,0xfd), o2(0xa1,0xfc), o2(0xa2,0xfe),
+
+#define to_EUC_JP_E2_97 WORDINDEX2INFO(17181)
+    to_EUC_JP_E2_97_offsets,
+    to_EUC_JP_E2_97_infos,
+
+#define to_EUC_JP_E2_98_infos WORDINDEX2INFO(17183)
+           INVALID,         UNDEF, o2(0xa1,0xfa), o2(0xa1,0xf9),
+
+#define to_EUC_JP_E2_98 WORDINDEX2INFO(17187)
+    to_EUC_JP_E2_98_offsets,
+    to_EUC_JP_E2_98_infos,
+
+#define to_EUC_JP_E2_99_infos WORDINDEX2INFO(17189)
+           INVALID, o2(0xa1,0xea),         UNDEF, o2(0xa1,0xe9),
+     o2(0xa2,0xf6), o2(0xa2,0xf5), o2(0xa2,0xf4),
+
+#define to_EUC_JP_E2_99 WORDINDEX2INFO(17196)
+    to_EUC_JP_E2_99_offsets,
+    to_EUC_JP_E2_99_infos,
+
+#define to_EUC_JP_E2_infos WORDINDEX2INFO(17198)
+             INVALID, to_EUC_JP_E2_80,    to_EUC_JP_C6, to_EUC_JP_E2_84,
+     to_EUC_JP_E2_86, to_EUC_JP_E2_87, to_EUC_JP_E2_88, to_EUC_JP_E2_89,
+     to_EUC_JP_E2_8A, to_EUC_JP_E2_8C, to_EUC_JP_E2_94, to_EUC_JP_E2_95,
+     to_EUC_JP_E2_96, to_EUC_JP_E2_97, to_EUC_JP_E2_98, to_EUC_JP_E2_99,
+
+#define to_EUC_JP_E2 WORDINDEX2INFO(17214)
+    to_EUC_JP_E2_offsets,
+    to_EUC_JP_E2_infos,
+
+#define to_EUC_JP_E3_80_infos WORDINDEX2INFO(17216)
+           INVALID, o2(0xa1,0xa1), o2(0xa1,0xa2), o2(0xa1,0xa3),
+     o2(0xa1,0xb7),         UNDEF, o2(0xa1,0xb9), o2(0xa1,0xba),
+     o2(0xa1,0xbb), o2(0xa1,0xd2), o2(0xa1,0xd3), o2(0xa1,0xd4),
+     o2(0xa1,0xd5), o2(0xa1,0xd6), o2(0xa1,0xd7), o2(0xa1,0xd8),
+     o2(0xa1,0xd9), o2(0xa1,0xda), o2(0xa1,0xdb), o2(0xa2,0xa9),
+     o2(0xa2,0xae), o2(0xa1,0xcc), o2(0xa1,0xcd), o2(0xa1,0xc1),
+
+#define to_EUC_JP_E3_80 WORDINDEX2INFO(17240)
+    to_EUC_JP_E3_80_offsets,
+    to_EUC_JP_E3_80_infos,
+
+#define to_EUC_JP_E3_81_infos WORDINDEX2INFO(17242)
+           INVALID,         UNDEF, o2(0xa4,0xa1), o2(0xa4,0xa2),
+     o2(0xa4,0xa3), o2(0xa4,0xa4), o2(0xa4,0xa5), o2(0xa4,0xa6),
+     o2(0xa4,0xa7), o2(0xa4,0xa8), o2(0xa4,0xa9), o2(0xa4,0xaa),
+     o2(0xa4,0xab), o2(0xa4,0xac), o2(0xa4,0xad), o2(0xa4,0xae),
+     o2(0xa4,0xaf), o2(0xa4,0xb0), o2(0xa4,0xb1), o2(0xa4,0xb2),
+     o2(0xa4,0xb3), o2(0xa4,0xb4), o2(0xa4,0xb5), o2(0xa4,0xb6),
+     o2(0xa4,0xb7), o2(0xa4,0xb8), o2(0xa4,0xb9), o2(0xa4,0xba),
+     o2(0xa4,0xbb), o2(0xa4,0xbc), o2(0xa4,0xbd), o2(0xa4,0xbe),
+     o2(0xa4,0xbf), o2(0xa4,0xc0), o2(0xa4,0xc1), o2(0xa4,0xc2),
+     o2(0xa4,0xc3), o2(0xa4,0xc4), o2(0xa4,0xc5), o2(0xa4,0xc6),
+     o2(0xa4,0xc7), o2(0xa4,0xc8), o2(0xa4,0xc9), o2(0xa4,0xca),
+     o2(0xa4,0xcb), o2(0xa4,0xcc), o2(0xa4,0xcd), o2(0xa4,0xce),
+     o2(0xa4,0xcf), o2(0xa4,0xd0), o2(0xa4,0xd1), o2(0xa4,0xd2),
+     o2(0xa4,0xd3), o2(0xa4,0xd4), o2(0xa4,0xd5), o2(0xa4,0xd6),
+     o2(0xa4,0xd7), o2(0xa4,0xd8), o2(0xa4,0xd9), o2(0xa4,0xda),
+     o2(0xa4,0xdb), o2(0xa4,0xdc), o2(0xa4,0xdd), o2(0xa4,0xde),
+     o2(0xa4,0xdf),
+
+#define to_EUC_JP_E3_81 WORDINDEX2INFO(17307)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_E3_81_infos,
+
+#define to_EUC_JP_E3_82_infos WORDINDEX2INFO(17309)
+           INVALID, o2(0xa4,0xe0), o2(0xa4,0xe1), o2(0xa4,0xe2),
+     o2(0xa4,0xe3), o2(0xa4,0xe4), o2(0xa4,0xe5), o2(0xa4,0xe6),
+     o2(0xa4,0xe7), o2(0xa4,0xe8), o2(0xa4,0xe9), o2(0xa4,0xea),
+     o2(0xa4,0xeb), o2(0xa4,0xec), o2(0xa4,0xed), o2(0xa4,0xee),
+     o2(0xa4,0xef), o2(0xa4,0xf0), o2(0xa4,0xf1), o2(0xa4,0xf2),
+     o2(0xa4,0xf3),         UNDEF, o2(0xa1,0xab), o2(0xa1,0xac),
+     o2(0xa1,0xb5), o2(0xa1,0xb6), o2(0xa5,0xa1), o2(0xa5,0xa2),
+     o2(0xa5,0xa3), o2(0xa5,0xa4), o2(0xa5,0xa5), o2(0xa5,0xa6),
+     o2(0xa5,0xa7), o2(0xa5,0xa8), o2(0xa5,0xa9), o2(0xa5,0xaa),
+     o2(0xa5,0xab), o2(0xa5,0xac), o2(0xa5,0xad), o2(0xa5,0xae),
+     o2(0xa5,0xaf), o2(0xa5,0xb0), o2(0xa5,0xb1), o2(0xa5,0xb2),
+     o2(0xa5,0xb3), o2(0xa5,0xb4), o2(0xa5,0xb5), o2(0xa5,0xb6),
+     o2(0xa5,0xb7), o2(0xa5,0xb8), o2(0xa5,0xb9), o2(0xa5,0xba),
+     o2(0xa5,0xbb), o2(0xa5,0xbc), o2(0xa5,0xbd), o2(0xa5,0xbe),
+     o2(0xa5,0xbf),
+
+#define to_EUC_JP_E3_82 WORDINDEX2INFO(17366)
+    to_EUC_JP_E3_82_offsets,
+    to_EUC_JP_E3_82_infos,
+
+#define to_EUC_JP_E3_83_infos WORDINDEX2INFO(17368)
+           INVALID, o2(0xa5,0xc0), o2(0xa5,0xc1), o2(0xa5,0xc2),
+     o2(0xa5,0xc3), o2(0xa5,0xc4), o2(0xa5,0xc5), o2(0xa5,0xc6),
+     o2(0xa5,0xc7), o2(0xa5,0xc8), o2(0xa5,0xc9), o2(0xa5,0xca),
+     o2(0xa5,0xcb), o2(0xa5,0xcc), o2(0xa5,0xcd), o2(0xa5,0xce),
+     o2(0xa5,0xcf), o2(0xa5,0xd0), o2(0xa5,0xd1), o2(0xa5,0xd2),
+     o2(0xa5,0xd3), o2(0xa5,0xd4), o2(0xa5,0xd5), o2(0xa5,0xd6),
+     o2(0xa5,0xd7), o2(0xa5,0xd8), o2(0xa5,0xd9), o2(0xa5,0xda),
+     o2(0xa5,0xdb), o2(0xa5,0xdc), o2(0xa5,0xdd), o2(0xa5,0xde),
+     o2(0xa5,0xdf), o2(0xa5,0xe0), o2(0xa5,0xe1), o2(0xa5,0xe2),
+     o2(0xa5,0xe3), o2(0xa5,0xe4), o2(0xa5,0xe5), o2(0xa5,0xe6),
+     o2(0xa5,0xe7), o2(0xa5,0xe8), o2(0xa5,0xe9), o2(0xa5,0xea),
+     o2(0xa5,0xeb), o2(0xa5,0xec), o2(0xa5,0xed), o2(0xa5,0xee),
+     o2(0xa5,0xef), o2(0xa5,0xf0), o2(0xa5,0xf1), o2(0xa5,0xf2),
+     o2(0xa5,0xf3), o2(0xa5,0xf4), o2(0xa5,0xf5), o2(0xa5,0xf6),
+             UNDEF, o2(0xa1,0xa6), o2(0xa1,0xbc), o2(0xa1,0xb3),
+     o2(0xa1,0xb4),
+
+#define to_EUC_JP_E3_83 WORDINDEX2INFO(17429)
+    to_EUC_JP_E3_83_offsets,
+    to_EUC_JP_E3_83_infos,
+
+#define to_EUC_JP_E3_infos WORDINDEX2INFO(17431)
+             INVALID, to_EUC_JP_E3_80, to_EUC_JP_E3_81, to_EUC_JP_E3_82,
+     to_EUC_JP_E3_83,    to_EUC_JP_C6,
+
+#define to_EUC_JP_E3 WORDINDEX2INFO(17437)
+    to_EUC_JP_E3_offsets,
+    to_EUC_JP_E3_infos,
+
+#define to_EUC_JP_E4_B8_infos WORDINDEX2INFO(17439)
+                INVALID,      o2(0xb0,0xec),
+          o2(0xc3,0xfa), o3(0x8f,0xb0,0xa1),
+          o2(0xbc,0xb7), o3(0x8f,0xb0,0xa2),
+     o3(0x8f,0xb0,0xa3),              UNDEF,
+          o2(0xcb,0xfc),      o2(0xbe,0xe6),
+          o2(0xbb,0xb0),      o2(0xbe,0xe5),
+          o2(0xb2,0xbc), o3(0x8f,0xb0,0xa4),
+          o2(0xc9,0xd4),      o2(0xcd,0xbf),
+          o2(0xd0,0xa2),      o2(0xb1,0xaf),
+     o3(0x8f,0xb0,0xa5),      o2(0xb3,0xee),
+          o2(0xd0,0xa3),      o2(0xc0,0xa4),
+          o2(0xd2,0xc2),      o2(0xb5,0xd6),
+          o2(0xca,0xba),      o2(0xbe,0xe7),
+     o3(0x8f,0xb0,0xa6),      o2(0xce,0xbe),
+     o3(0x8f,0xb0,0xa7), o3(0x8f,0xb0,0xa8),
+          o2(0xca,0xc2), o3(0x8f,0xb0,0xa9),
+          o2(0xd0,0xa4), o3(0x8f,0xb0,0xaa),
+          o2(0xc3,0xe6), o3(0x8f,0xb0,0xab),
+     o3(0x8f,0xb0,0xac), o3(0x8f,0xb0,0xad),
+          o2(0xd0,0xa5),      o2(0xb6,0xfa),
+     o3(0x8f,0xb0,0xae),      o2(0xd0,0xa6),
+          o2(0xb4,0xdd),      o2(0xc3,0xb0),
+          o2(0xbc,0xe7),      o2(0xd0,0xa7),
+          o2(0xd0,0xa8),
+
+#define to_EUC_JP_E4_B8 WORDINDEX2INFO(17486)
+    to_EUC_JP_E4_B8_offsets,
+    to_EUC_JP_E4_B8_infos,
+
+#define to_EUC_JP_E4_B9_infos WORDINDEX2INFO(17488)
+                INVALID, o3(0x8f,0xb0,0xaf),
+     o3(0x8f,0xb0,0xb0),      o2(0xd0,0xa9),
+          o2(0xc7,0xb5), o3(0x8f,0xb0,0xb1),
+          o2(0xb5,0xd7),              UNDEF,
+     o3(0x8f,0xb0,0xb2),      o2(0xc7,0xb7),
+          o2(0xc6,0xe3),      o2(0xb8,0xc3),
+          o2(0xcb,0xb3), o3(0x8f,0xb0,0xb3),
+          o2(0xe9,0xc9),      o2(0xd0,0xaa),
+          o2(0xbe,0xe8),      o2(0xd0,0xab),
+          o2(0xb2,0xb5), o3(0x8f,0xb0,0xb4),
+     o3(0x8f,0xb0,0xb5),      o2(0xb6,0xe5),
+          o2(0xb8,0xf0),      o2(0xcc,0xe9),
+          o2(0xd6,0xa6), o3(0x8f,0xb0,0xb6),
+     o3(0x8f,0xb0,0xb7), o3(0x8f,0xb0,0xb8),
+          o2(0xcd,0xf0),      o2(0xc6,0xfd),
+     o3(0x8f,0xb0,0xb9), o3(0x8f,0xb0,0xba),
+     o3(0x8f,0xb0,0xbb),      o2(0xb4,0xa5),
+     o3(0x8f,0xb0,0xbc),
+
+#define to_EUC_JP_E4_B9 WORDINDEX2INFO(17523)
+    to_EUC_JP_E4_B9_offsets,
+    to_EUC_JP_E4_B9_infos,
+
+#define to_EUC_JP_E4_BA_infos WORDINDEX2INFO(17525)
+                INVALID,      o2(0xb5,0xb5),
+                  UNDEF,      o2(0xd0,0xac),
+          o2(0xd0,0xad),      o2(0xce,0xbb),
+          o2(0xcd,0xbd),      o2(0xc1,0xe8),
+          o2(0xd0,0xaf),      o2(0xbb,0xf6),
+          o2(0xc6,0xf3), o3(0x8f,0xb0,0xbd),
+          o2(0xd0,0xb2),      o2(0xb1,0xbe),
+          o2(0xb8,0xdf),      o2(0xb8,0xde),
+          o2(0xb0,0xe6), o3(0x8f,0xb0,0xbe),
+     o3(0x8f,0xb0,0xbf),      o2(0xcf,0xcb),
+          o2(0xcf,0xca),      o2(0xba,0xb3),
+          o2(0xb0,0xa1), o3(0x8f,0xb0,0xc0),
+          o2(0xd0,0xb3),      o2(0xd0,0xb4),
+          o2(0xd0,0xb5),      o2(0xcb,0xb4),
+          o2(0xd0,0xb6),      o2(0xb8,0xf2),
+          o2(0xb0,0xe7),      o2(0xcb,0xf2),
+          o2(0xb5,0xfc),      o2(0xb5,0xfd),
+          o2(0xb5,0xfe),      o2(0xc4,0xe2),
+          o2(0xce,0xbc), o3(0x8f,0xb0,0xc1),
+          o2(0xd0,0xb7),      o2(0xd0,0xb8),
+          o2(0xd0,0xb9), o3(0x8f,0xb0,0xc2),
+          o2(0xbf,0xcd),
+
+#define to_EUC_JP_E4_BA WORDINDEX2INFO(17568)
+    to_EUC_JP_E4_BA_offsets,
+    to_EUC_JP_E4_BA_infos,
+
+#define to_EUC_JP_E4_BB_infos WORDINDEX2INFO(17570)
+                INVALID,      o2(0xbd,0xba),
+          o2(0xbf,0xce),      o2(0xd0,0xbe),
+     o3(0x8f,0xb0,0xc3),      o2(0xd0,0xbc),
+                  UNDEF,      o2(0xd0,0xbd),
+          o2(0xb5,0xd8),      o2(0xba,0xa3),
+          o2(0xb2,0xf0),      o2(0xd0,0xbb),
+          o2(0xd0,0xba),      o2(0xca,0xa9),
+     o3(0x8f,0xb0,0xc4),      o2(0xbb,0xc6),
+          o2(0xbb,0xc5),      o2(0xc2,0xbe),
+          o2(0xd0,0xbf),      o2(0xc9,0xd5),
+          o2(0xc0,0xe7), o3(0x8f,0xb0,0xc5),
+     o3(0x8f,0xb0,0xc6),      o2(0xa1,0xb8),
+          o2(0xd0,0xc0),      o2(0xd0,0xc2),
+     o3(0x8f,0xb0,0xc7), o3(0x8f,0xb0,0xc8),
+     o3(0x8f,0xb0,0xc9),      o2(0xc2,0xe5),
+          o2(0xce,0xe1),      o2(0xb0,0xca),
+     o3(0x8f,0xb0,0xca),      o2(0xd0,0xc1),
+          o2(0xb2,0xbe), o3(0x8f,0xb0,0xcb),
+          o2(0xb6,0xc4), o3(0x8f,0xb0,0xcc),
+          o2(0xc3,0xe7), o3(0x8f,0xb0,0xcd),
+     o3(0x8f,0xb0,0xce),      o2(0xb7,0xef),
+          o2(0xd0,0xc3),      o2(0xc7,0xa4),
+     o3(0x8f,0xb0,0xcf), o3(0x8f,0xb0,0xd0),
+     o3(0x8f,0xb0,0xd1),
+
+#define to_EUC_JP_E4_BB WORDINDEX2INFO(17617)
+    to_EUC_JP_E4_BB_offsets,
+    to_EUC_JP_E4_BB_infos,
+
+#define to_EUC_JP_E4_BC_infos WORDINDEX2INFO(17619)
+                INVALID, o3(0x8f,0xb0,0xd2),
+          o2(0xb4,0xeb), o3(0x8f,0xb0,0xd3),
+     o3(0x8f,0xb0,0xd4),              UNDEF,
+     o3(0x8f,0xb0,0xd5),      o2(0xd0,0xc4),
+          o2(0xb0,0xcb), o3(0x8f,0xb0,0xd6),
+     o3(0x8f,0xb0,0xd7),      o2(0xb8,0xe0),
+          o2(0xb4,0xec),      o2(0xc9,0xfa),
+          o2(0xc8,0xb2),      o2(0xb5,0xd9),
+     o3(0x8f,0xb0,0xd8), o3(0x8f,0xb0,0xd9),
+     o3(0x8f,0xb0,0xda), o3(0x8f,0xb0,0xdb),
+     o3(0x8f,0xb0,0xdc),      o2(0xb2,0xf1),
+          o2(0xd0,0xe7),      o2(0xc5,0xc1),
+     o3(0x8f,0xb0,0xdd),      o2(0xc7,0xec),
+          o2(0xd0,0xc6), o3(0x8f,0xb0,0xde),
+     o3(0x8f,0xb0,0xe0),      o2(0xc8,0xbc),
+     o3(0x8f,0xb0,0xe1),      o2(0xce,0xe2),
+     o3(0x8f,0xb0,0xe2),      o2(0xbf,0xad),
+     o3(0x8f,0xb0,0xe3),      o2(0xbb,0xc7),
+     o3(0x8f,0xb0,0xe4),      o2(0xbb,0xf7),
+          o2(0xb2,0xc0), o3(0x8f,0xb0,0xe5),
+
+#define to_EUC_JP_E4_BC WORDINDEX2INFO(17659)
+    to_EUC_JP_E4_BC_offsets,
+    to_EUC_JP_E4_BC_infos,
+
+#define to_EUC_JP_E4_BD_infos WORDINDEX2INFO(17661)
+                INVALID, o3(0x8f,0xb0,0xe6),
+                  UNDEF, o3(0x8f,0xb0,0xe7),
+          o2(0xc4,0xd1),      o2(0xc3,0xa2),
+          o2(0xd0,0xca), o3(0x8f,0xb0,0xe8),
+     o3(0x8f,0xb0,0xe9), o3(0x8f,0xb0,0xea),
+     o3(0x8f,0xb0,0xeb),      o2(0xb0,0xcc),
+          o2(0xc4,0xe3),      o2(0xbd,0xbb),
+          o2(0xba,0xb4),      o2(0xcd,0xa4),
+     o3(0x8f,0xb0,0xec),      o2(0xc2,0xce),
+     o3(0x8f,0xb0,0xed),      o2(0xb2,0xbf),
+     o3(0x8f,0xb0,0xee),      o2(0xd0,0xc9),
+     o3(0x8f,0xb0,0xef),      o2(0xcd,0xbe),
+          o2(0xd0,0xc5),      o2(0xd0,0xc7),
+          o2(0xba,0xee),      o2(0xd0,0xc8),
+          o2(0xd5,0xa4), o3(0x8f,0xb0,0xf0),
+     o3(0x8f,0xb0,0xdf), o3(0x8f,0xb0,0xf1),
+          o2(0xd0,0xd0), o3(0x8f,0xb0,0xf2),
+     o3(0x8f,0xb0,0xf3), o3(0x8f,0xb0,0xf4),
+          o2(0xd0,0xd3),      o2(0xd0,0xd1),
+     o3(0x8f,0xb0,0xf5),      o2(0xb2,0xc2),
+          o2(0xca,0xbb),      o2(0xd0,0xcb),
+     o3(0x8f,0xb0,0xf6), o3(0x8f,0xb0,0xf7),
+     o3(0x8f,0xb0,0xf8), o3(0x8f,0xb0,0xf9),
+          o2(0xd0,0xcf),      o2(0xb8,0xf3),
+     o3(0x8f,0xb0,0xfa), o3(0x8f,0xb0,0xfb),
+          o2(0xbb,0xc8),
+
+#define to_EUC_JP_E4_BD WORDINDEX2INFO(17712)
+    to_EUC_JP_E4_BD_offsets,
+    to_EUC_JP_E4_BD_infos,
+
+#define to_EUC_JP_E4_BE_infos WORDINDEX2INFO(17714)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb0,0xfc), o3(0x8f,0xb0,0xfd),
+          o2(0xb4,0xa6), o3(0x8f,0xb0,0xfe),
+     o3(0x8f,0xb1,0xa1),      o2(0xd0,0xd4),
+          o2(0xd0,0xcc), o3(0x8f,0xb1,0xa2),
+     o3(0x8f,0xb1,0xa3),      o2(0xce,0xe3),
+     o3(0x8f,0xb1,0xa4),      o2(0xbb,0xf8),
+     o3(0x8f,0xb1,0xa5),      o2(0xd0,0xcd),
+     o3(0x8f,0xb1,0xa6),      o2(0xd0,0xd2),
+     o3(0x8f,0xb1,0xa7), o3(0x8f,0xb1,0xa8),
+     o3(0x8f,0xb1,0xa9),      o2(0xd0,0xd5),
+     o3(0x8f,0xb1,0xaa),      o2(0xd0,0xce),
+     o3(0x8f,0xb1,0xab), o3(0x8f,0xb1,0xac),
+          o2(0xb6,0xa1),      o2(0xb0,0xcd),
+     o3(0x8f,0xb1,0xad), o3(0x8f,0xb1,0xae),
+          o2(0xb6,0xa2),      o2(0xb2,0xc1),
+          o2(0xd5,0xa5),      o2(0xcb,0xf9),
+          o2(0xc9,0xee),      o2(0xb8,0xf4),
+     o3(0x8f,0xb1,0xaf),      o2(0xbf,0xaf),
+          o2(0xce,0xb7), o3(0x8f,0xb1,0xb0),
+     o3(0x8f,0xb1,0xb1), o3(0x8f,0xb1,0xb2),
+     o3(0x8f,0xb1,0xb3), o3(0x8f,0xb1,0xb4),
+     o3(0x8f,0xb1,0xb5),      o2(0xca,0xd8),
+
+#define to_EUC_JP_E4_BE WORDINDEX2INFO(17760)
+    to_EUC_JP_E4_BE_offsets,
+    to_EUC_JP_E4_BE_infos,
+
+#define to_EUC_JP_E4_BF_infos WORDINDEX2INFO(17762)
+                INVALID, o3(0x8f,0xb1,0xb6),
+     o3(0x8f,0xb1,0xb7),      o2(0xb7,0xb8),
+          o2(0xc2,0xa5),      o2(0xb2,0xe4),
+     o3(0x8f,0xb1,0xb8), o3(0x8f,0xb1,0xb9),
+                  UNDEF, o3(0x8f,0xb1,0xba),
+     o3(0x8f,0xb1,0xbb),      o2(0xbd,0xd3),
+     o3(0x8f,0xb1,0xbc), o3(0x8f,0xb1,0xbd),
+     o3(0x8f,0xb1,0xbe),      o2(0xd0,0xd9),
+     o3(0x8f,0xb1,0xbf),      o2(0xd0,0xde),
+          o2(0xd0,0xdc), o3(0x8f,0xb1,0xc0),
+          o2(0xd0,0xd7),      o2(0xc2,0xaf),
+          o2(0xd0,0xda),      o2(0xd0,0xdd),
+          o2(0xd0,0xdb), o3(0x8f,0xb1,0xc1),
+          o2(0xca,0xdd),      o2(0xd0,0xd8),
+     o3(0x8f,0xb1,0xc2),      o2(0xbf,0xae),
+     o3(0x8f,0xb1,0xc3),      o2(0xcb,0xf3),
+          o2(0xd0,0xdf),      o2(0xd0,0xe0),
+          o2(0xbd,0xa4),      o2(0xd0,0xed),
+     o3(0x8f,0xb1,0xc4), o3(0x8f,0xb1,0xc5),
+          o2(0xc7,0xd0),      o2(0xc9,0xb6),
+          o2(0xd0,0xe8),      o2(0xca,0xf0),
+          o2(0xb2,0xb6), o3(0x8f,0xb1,0xc6),
+     o3(0x8f,0xb1,0xc7),      o2(0xd0,0xec),
+     o3(0x8f,0xb1,0xc8),
+
+#define to_EUC_JP_E4_BF WORDINDEX2INFO(17809)
+    to_EUC_JP_E4_BF_offsets,
+    to_EUC_JP_E4_BF_infos,
+
+#define to_EUC_JP_E4_infos WORDINDEX2INFO(17811)
+             INVALID,    to_EUC_JP_C6, to_EUC_JP_E4_B8, to_EUC_JP_E4_B9,
+     to_EUC_JP_E4_BA, to_EUC_JP_E4_BB, to_EUC_JP_E4_BC, to_EUC_JP_E4_BD,
+     to_EUC_JP_E4_BE, to_EUC_JP_E4_BF,
+
+#define to_EUC_JP_E4 WORDINDEX2INFO(17821)
+    to_EUC_JP_E4_offsets,
+    to_EUC_JP_E4_infos,
+
+#define to_EUC_JP_E5_80_infos WORDINDEX2INFO(17823)
+                INVALID, o3(0x8f,0xb1,0xc9),
+     o3(0x8f,0xb1,0xca),              UNDEF,
+     o3(0x8f,0xb1,0xcb),      o2(0xd0,0xe6),
+          o2(0xd0,0xef), o3(0x8f,0xb1,0xcc),
+          o2(0xc1,0xd2), o3(0x8f,0xb1,0xcd),
+          o2(0xb8,0xc4), o3(0x8f,0xb1,0xce),
+          o2(0xc7,0xdc), o3(0x8f,0xb1,0xcf),
+          o2(0xe0,0xc7), o3(0x8f,0xb1,0xd0),
+          o2(0xd0,0xee),      o2(0xc5,0xdd),
+     o3(0x8f,0xb1,0xd1),      o2(0xd0,0xe3),
+          o2(0xb8,0xf6), o3(0x8f,0xb1,0xd2),
+     o3(0x8f,0xb1,0xd3),      o2(0xb8,0xf5),
+          o2(0xd0,0xe1), o3(0x8f,0xb1,0xd4),
+     o3(0x8f,0xb1,0xd5), o3(0x8f,0xb1,0xd6),
+     o3(0x8f,0xb1,0xd7),      o2(0xbc,0xda),
+          o2(0xd0,0xe9), o3(0x8f,0xb1,0xd8),
+          o2(0xca,0xef),      o2(0xc3,0xcd),
+          o2(0xd0,0xe5),      o2(0xb7,0xf1),
+     o3(0x8f,0xb1,0xd9),      o2(0xd0,0xe2),
+          o2(0xd0,0xea),      o2(0xd0,0xe4),
+          o2(0xce,0xd1),      o2(0xd0,0xeb),
+          o2(0xcf,0xc1), o3(0x8f,0xb1,0xda),
+     o3(0x8f,0xb1,0xdb), o3(0x8f,0xb1,0xdc),
+     o3(0x8f,0xb1,0xdd), o3(0x8f,0xb1,0xde),
+          o2(0xb6,0xe6),      o2(0xb7,0xf0),
+     o3(0x8f,0xb1,0xf6),
+
+#define to_EUC_JP_E5_80 WORDINDEX2INFO(17874)
+    to_EUC_JP_E5_80_offsets,
+    to_EUC_JP_E5_80_infos,
+
+#define to_EUC_JP_E5_81_infos WORDINDEX2INFO(17876)
+                INVALID, o3(0x8f,0xb1,0xdf),
+     o3(0x8f,0xb1,0xe0), o3(0x8f,0xb1,0xe1),
+          o2(0xd0,0xf0),              UNDEF,
+     o3(0x8f,0xb1,0xe2), o3(0x8f,0xb1,0xe3),
+          o2(0xd0,0xf1),      o2(0xd0,0xf5),
+          o2(0xb0,0xce), o3(0x8f,0xb1,0xe4),
+     o3(0x8f,0xb1,0xe5), o3(0x8f,0xb1,0xe6),
+          o2(0xca,0xd0),      o2(0xd0,0xf4),
+     o3(0x8f,0xb1,0xe7), o3(0x8f,0xb1,0xe8),
+     o3(0x8f,0xb1,0xe9),      o2(0xd0,0xf3),
+          o2(0xd0,0xf7), o3(0x8f,0xb1,0xea),
+     o3(0x8f,0xb1,0xeb),      o2(0xd0,0xf6),
+          o2(0xc4,0xe4), o3(0x8f,0xb1,0xec),
+     o3(0x8f,0xb1,0xed), o3(0x8f,0xb1,0xee),
+     o3(0x8f,0xb1,0xef),      o2(0xb7,0xf2),
+     o3(0x8f,0xb1,0xf0), o3(0x8f,0xb1,0xf1),
+     o3(0x8f,0xb1,0xf2),      o2(0xd0,0xf8),
+     o3(0x8f,0xb1,0xf3), o3(0x8f,0xb1,0xf4),
+     o3(0x8f,0xb1,0xf5),      o2(0xbc,0xc5),
+          o2(0xc2,0xa6),      o2(0xc4,0xe5),
+          o2(0xb6,0xf6),      o2(0xd0,0xf9),
+          o2(0xb5,0xb6),
+
+#define to_EUC_JP_E5_81 WORDINDEX2INFO(17919)
+    to_EUC_JP_E5_81_offsets,
+    to_EUC_JP_E5_81_infos,
+
+#define to_EUC_JP_E5_82_infos WORDINDEX2INFO(17921)
+                INVALID,      o2(0xd0,0xfa),
+     o3(0x8f,0xb1,0xf7),              UNDEF,
+     o3(0x8f,0xb1,0xf8), o3(0x8f,0xb1,0xf9),
+          o2(0xd0,0xfc), o3(0x8f,0xb1,0xfa),
+     o3(0x8f,0xb1,0xfb),      o2(0xcb,0xb5),
+     o3(0x8f,0xb1,0xfc), o3(0x8f,0xb1,0xfd),
+     o3(0x8f,0xb1,0xfe),      o2(0xb7,0xe6),
+     o3(0x8f,0xb2,0xa1), o3(0x8f,0xb2,0xa2),
+     o3(0x8f,0xb2,0xa3), o3(0x8f,0xb2,0xa4),
+          o2(0xbb,0xb1),      o2(0xc8,0xf7),
+          o2(0xd0,0xfb), o3(0x8f,0xb2,0xa5),
+     o3(0x8f,0xb2,0xa6), o3(0x8f,0xb2,0xa7),
+     o3(0x8f,0xb2,0xa8), o3(0x8f,0xb2,0xa9),
+     o3(0x8f,0xb2,0xaa), o3(0x8f,0xb2,0xab),
+     o3(0x8f,0xb2,0xac),      o2(0xba,0xc5),
+          o2(0xcd,0xc3), o3(0x8f,0xb2,0xad),
+     o3(0x8f,0xb2,0xae),      o2(0xd0,0xfe),
+          o2(0xd1,0xa3),      o2(0xd0,0xfd),
+          o2(0xba,0xc4),      o2(0xbd,0xfd),
+     o3(0x8f,0xb2,0xaf), o3(0x8f,0xb2,0xb0),
+     o3(0x8f,0xb2,0xb1),      o2(0xb7,0xb9),
+
+#define to_EUC_JP_E5_82 WORDINDEX2INFO(17963)
+    to_EUC_JP_E5_82_offsets,
+    to_EUC_JP_E5_82_infos,
+
+#define to_EUC_JP_E5_83_infos WORDINDEX2INFO(17965)
+                INVALID, o3(0x8f,0xb2,0xb2),
+                  UNDEF,      o2(0xd1,0xa4),
+     o3(0x8f,0xb2,0xb3), o3(0x8f,0xb2,0xb4),
+          o2(0xb6,0xcf), o3(0x8f,0xb2,0xb5),
+          o2(0xd1,0xa1),      o2(0xd1,0xa2),
+     o3(0x8f,0xb2,0xb6),      o2(0xc6,0xaf),
+     o3(0x8f,0xb2,0xb7),      o2(0xc1,0xfc),
+     o3(0x8f,0xb2,0xb8),      o2(0xb6,0xa3),
+     o3(0x8f,0xb2,0xb9), o3(0x8f,0xb2,0xba),
+          o2(0xcb,0xcd),      o2(0xd1,0xa5),
+     o3(0x8f,0xb2,0xbb),      o2(0xce,0xbd),
+     o3(0x8f,0xb2,0xbc), o3(0x8f,0xb2,0xbd),
+          o2(0xd1,0xa6), o3(0x8f,0xb2,0xbe),
+     o3(0x8f,0xb2,0xbf),      o2(0xd1,0xa9),
+     o3(0x8f,0xb2,0xc0),      o2(0xd1,0xa7),
+     o3(0x8f,0xb2,0xc1),      o2(0xc1,0xce),
+     o3(0x8f,0xb2,0xc2), o3(0x8f,0xb2,0xc3),
+          o2(0xd1,0xa8),      o2(0xd1,0xaa),
+     o3(0x8f,0xb2,0xc4), o3(0x8f,0xb2,0xc5),
+     o3(0x8f,0xb2,0xd1),      o2(0xd1,0xac),
+     o3(0x8f,0xb2,0xc6),      o2(0xd1,0xab),
+     o3(0x8f,0xb2,0xc7),      o2(0xca,0xc8),
+     o3(0x8f,0xb2,0xc8),
+
+#define to_EUC_JP_E5_83 WORDINDEX2INFO(18010)
+    to_EUC_JP_E5_83_offsets,
+    to_EUC_JP_E5_83_infos,
+
+#define to_EUC_JP_E5_84_infos WORDINDEX2INFO(18012)
+                INVALID,      o2(0xb5,0xb7),
+          o2(0xd1,0xae),      o2(0xd1,0xaf),
+     o3(0x8f,0xb2,0xc9),      o2(0xb2,0xaf),
+                  UNDEF, o3(0x8f,0xb2,0xca),
+     o3(0x8f,0xb2,0xcb), o3(0x8f,0xb2,0xcc),
+          o2(0xd1,0xad), o3(0x8f,0xb2,0xcd),
+     o3(0x8f,0xb2,0xce), o3(0x8f,0xb2,0xcf),
+     o3(0x8f,0xb2,0xd0), o3(0x8f,0xb2,0xd2),
+          o2(0xbc,0xf4),      o2(0xd1,0xb2),
+          o2(0xd1,0xb1),      o2(0xd1,0xb0),
+     o3(0x8f,0xb2,0xd3),      o2(0xd0,0xd6),
+     o3(0x8f,0xb2,0xd4),      o2(0xd1,0xb3),
+     o3(0x8f,0xb2,0xd5), o3(0x8f,0xb2,0xd6),
+     o3(0x8f,0xb2,0xd7), o3(0x8f,0xb2,0xd8),
+          o2(0xbd,0xfe),      o2(0xd1,0xb4),
+     o3(0x8f,0xb2,0xd9), o3(0x8f,0xb2,0xda),
+     o3(0x8f,0xb2,0xdb),      o2(0xcd,0xa5),
+     o3(0x8f,0xb2,0xdc), o3(0x8f,0xb2,0xdd),
+     o3(0x8f,0xb2,0xde), o3(0x8f,0xb2,0xdf),
+          o2(0xcc,0xd9), o3(0x8f,0xb2,0xe0),
+     o3(0x8f,0xb2,0xe1), o3(0x8f,0xb2,0xe2),
+          o2(0xd1,0xb6), o3(0x8f,0xb2,0xe3),
+     o3(0x8f,0xb2,0xe4),      o2(0xd1,0xb5),
+          o2(0xd1,0xb8),      o2(0xd1,0xb7),
+          o2(0xd1,0xb9),
+
+#define to_EUC_JP_E5_84 WORDINDEX2INFO(18061)
+    to_EUC_JP_E5_84_offsets,
+    to_EUC_JP_E5_84_infos,
+
+#define to_EUC_JP_E5_85_infos WORDINDEX2INFO(18063)
+                INVALID,      o2(0xd1,0xba),
+          o2(0xb0,0xf4), o3(0x8f,0xb2,0xe5),
+          o2(0xb8,0xb5),      o2(0xb7,0xbb),
+          o2(0xbd,0xbc),      o2(0xc3,0xfb),
+          o2(0xb6,0xa4),      o2(0xc0,0xe8),
+          o2(0xb8,0xf7), o3(0x8f,0xb2,0xe6),
+          o2(0xb9,0xee),      o2(0xd1,0xbc),
+          o2(0xcc,0xc8),      o2(0xc5,0xc6),
+     o3(0x8f,0xb2,0xe7),      o2(0xbb,0xf9),
+                  UNDEF,      o2(0xd1,0xbb),
+     o3(0x8f,0xb2,0xe8),      o2(0xd1,0xbd),
+     o3(0x8f,0xb2,0xe9), o3(0x8f,0xb2,0xea),
+     o3(0x8f,0xb2,0xeb),      o2(0xc5,0xde),
+          o2(0xb3,0xf5), o3(0x8f,0xb2,0xec),
+          o2(0xd1,0xbe), o3(0x8f,0xb2,0xed),
+          o2(0xc6,0xfe), o3(0x8f,0xb2,0xee),
+          o2(0xc1,0xb4),      o2(0xd1,0xc0),
+          o2(0xd1,0xc1),      o2(0xc8,0xac),
+          o2(0xb8,0xf8),      o2(0xcf,0xbb),
+          o2(0xd1,0xc2),      o2(0xb6,0xa6),
+          o2(0xca,0xbc),      o2(0xc2,0xb6),
+          o2(0xb6,0xf1),      o2(0xc5,0xb5),
+          o2(0xb7,0xf3), o3(0x8f,0xb2,0xef),
+
+#define to_EUC_JP_E5_85 WORDINDEX2INFO(18109)
+    to_EUC_JP_E5_85_offsets,
+    to_EUC_JP_E5_85_infos,
+
+#define to_EUC_JP_E5_86_infos WORDINDEX2INFO(18111)
+                INVALID,      o2(0xd1,0xc3),
+                  UNDEF,      o2(0xd1,0xc4),
+     o3(0x8f,0xb2,0xf0), o3(0x8f,0xb2,0xf1),
+          o2(0xc6,0xe2),      o2(0xb1,0xdf),
+          o2(0xd1,0xc7),      o2(0xba,0xfd),
+     o3(0x8f,0xb2,0xf2),      o2(0xd1,0xc6),
+          o2(0xba,0xc6), o3(0x8f,0xb2,0xf3),
+          o2(0xd1,0xc8),      o2(0xe6,0xee),
+          o2(0xd1,0xc9),      o2(0xcb,0xc1),
+          o2(0xd1,0xca),      o2(0xd1,0xcb),
+          o2(0xd1,0xcc),      o2(0xbe,0xe9),
+     o3(0x8f,0xb2,0xf4),      o2(0xbc,0xcc),
+     o3(0x8f,0xb2,0xf5),      o2(0xb4,0xa7),
+     o3(0x8f,0xb2,0xf6),      o2(0xd1,0xcf),
+     o3(0x8f,0xb2,0xf7),      o2(0xd1,0xcd),
+          o2(0xcc,0xbd),      o2(0xd1,0xce),
+          o2(0xc9,0xda),      o2(0xd1,0xd0),
+          o2(0xd1,0xd1),      o2(0xd1,0xd2),
+          o2(0xc5,0xdf), o3(0x8f,0xb2,0xf8),
+          o2(0xd1,0xd6),      o2(0xd1,0xd4),
+          o2(0xd1,0xd5),      o2(0xd1,0xd3),
+          o2(0xba,0xe3),      o2(0xd1,0xd7),
+          o2(0xcc,0xea),      o2(0xce,0xe4),
+     o3(0x8f,0xb2,0xf9), o3(0x8f,0xb2,0xfa),
+     o3(0x8f,0xb2,0xfb),      o2(0xd1,0xd8),
+     o3(0x8f,0xb2,0xfc), o3(0x8f,0xb2,0xfd),
+
+#define to_EUC_JP_E5_86 WORDINDEX2INFO(18163)
+    to_EUC_JP_E5_86_offsets,
+    to_EUC_JP_E5_86_infos,
+
+#define to_EUC_JP_E5_87_infos WORDINDEX2INFO(18165)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb2,0xfe),      o2(0xc0,0xa8),
+          o2(0xd1,0xd9),      o2(0xbd,0xda),
+     o3(0x8f,0xb3,0xa1),      o2(0xd1,0xda),
+          o2(0xc3,0xfc),      o2(0xce,0xbf),
+          o2(0xc5,0xe0), o3(0x8f,0xb3,0xa2),
+     o3(0x8f,0xb3,0xa3), o3(0x8f,0xb3,0xa4),
+     o3(0x8f,0xb3,0xa5), o3(0x8f,0xb3,0xa6),
+          o2(0xd2,0xc5), o3(0x8f,0xb3,0xa7),
+          o2(0xd1,0xdb),      o2(0xf4,0xa5),
+          o2(0xb6,0xc5), o3(0x8f,0xb3,0xa8),
+          o2(0xd1,0xdc),      o2(0xcb,0xde),
+     o3(0x8f,0xb3,0xa9), o3(0x8f,0xb3,0xaa),
+          o2(0xbd,0xe8),      o2(0xc2,0xfc),
+          o2(0xd1,0xde),      o2(0xc6,0xe4),
+          o2(0xd1,0xdf), o3(0x8f,0xb3,0xab),
+          o2(0xd1,0xe0),      o2(0xb3,0xae),
+     o3(0x8f,0xb3,0xac), o3(0x8f,0xb3,0xad),
+     o3(0x8f,0xb3,0xae),      o2(0xd1,0xe1),
+          o2(0xb6,0xa7), o3(0x8f,0xb3,0xaf),
+          o2(0xc6,0xcc),      o2(0xb1,0xfa),
+          o2(0xbd,0xd0),      o2(0xc8,0xa1),
+          o2(0xd1,0xe2),
+
+#define to_EUC_JP_E5_87 WORDINDEX2INFO(18210)
+    to_EUC_JP_E5_87_offsets,
+    to_EUC_JP_E5_87_infos,
+
+#define to_EUC_JP_E5_88_infos WORDINDEX2INFO(18212)
+                INVALID,      o2(0xc5,0xe1),
+     o3(0x8f,0xb3,0xb0), o3(0x8f,0xb3,0xb1),
+          o2(0xbf,0xcf),      o2(0xd1,0xe3),
+     o3(0x8f,0xb3,0xb2),      o2(0xca,0xac),
+          o2(0xc0,0xda),      o2(0xb4,0xa2),
+                  UNDEF,      o2(0xb4,0xa9),
+          o2(0xd1,0xe4),      o2(0xd1,0xe6),
+          o2(0xb7,0xba), o3(0x8f,0xb3,0xb3),
+     o3(0x8f,0xb3,0xb4),      o2(0xd1,0xe5),
+     o3(0x8f,0xb3,0xb5), o3(0x8f,0xb3,0xb6),
+          o2(0xce,0xf3), o3(0x8f,0xb3,0xb7),
+          o2(0xbd,0xe9), o3(0x8f,0xb3,0xb8),
+          o2(0xc8,0xbd),      o2(0xca,0xcc),
+          o2(0xd1,0xe7), o3(0x8f,0xb3,0xb9),
+          o2(0xcd,0xf8),      o2(0xd1,0xe8),
+          o2(0xd1,0xe9),      o2(0xc5,0xfe),
+     o3(0x8f,0xb3,0xba), o3(0x8f,0xb3,0xbb),
+          o2(0xd1,0xea), o3(0x8f,0xb3,0xbc),
+          o2(0xc0,0xa9),      o2(0xba,0xfe),
+          o2(0xb7,0xf4),      o2(0xd1,0xeb),
+          o2(0xbb,0xc9),      o2(0xb9,0xef),
+     o3(0x8f,0xb3,0xbd),
+
+#define to_EUC_JP_E5_88 WORDINDEX2INFO(18255)
+    to_EUC_JP_E5_88_offsets,
+    to_EUC_JP_E5_88_infos,
+
+#define to_EUC_JP_E5_89_infos WORDINDEX2INFO(18257)
+                INVALID,              UNDEF,
+          o2(0xc4,0xe6),      o2(0xd1,0xed),
+     o3(0x8f,0xb3,0xbe),      o2(0xc2,0xa7),
+     o3(0x8f,0xb3,0xbf),      o2(0xba,0xef),
+          o2(0xd1,0xee),      o2(0xd1,0xef),
+          o2(0xc1,0xb0),      o2(0xd1,0xec),
+          o2(0xd1,0xf1), o3(0x8f,0xb3,0xc0),
+          o2(0xcb,0xb6), o3(0x8f,0xb3,0xc1),
+     o3(0x8f,0xb3,0xc2), o3(0x8f,0xb3,0xc3),
+          o2(0xb9,0xe4), o3(0x8f,0xb3,0xc4),
+          o2(0xd1,0xf0), o3(0x8f,0xb3,0xc5),
+     o3(0x8f,0xb3,0xc6), o3(0x8f,0xb3,0xc7),
+          o2(0xb7,0xf5),      o2(0xba,0xde),
+          o2(0xc7,0xed), o3(0x8f,0xb3,0xc8),
+          o2(0xd1,0xf4),      o2(0xd1,0xf2),
+     o3(0x8f,0xb3,0xc9),      o2(0xc9,0xfb),
+          o2(0xbe,0xea),      o2(0xd1,0xfb),
+          o2(0xb3,0xe4),      o2(0xd1,0xf5),
+          o2(0xd1,0xf3),      o2(0xc1,0xcf),
+     o3(0x8f,0xb3,0xca), o3(0x8f,0xb3,0xcb),
+     o3(0x8f,0xb3,0xcc),      o2(0xd1,0xf7),
+          o2(0xd1,0xf6),
+
+#define to_EUC_JP_E5_89 WORDINDEX2INFO(18300)
+    to_EUC_JP_E5_89_offsets,
+    to_EUC_JP_E5_89_infos,
+
+#define to_EUC_JP_E5_8A_infos WORDINDEX2INFO(18302)
+                INVALID, o3(0x8f,0xb3,0xcd),
+                  UNDEF, o3(0x8f,0xb3,0xce),
+          o2(0xb3,0xc4), o3(0x8f,0xb3,0xcf),
+          o2(0xb7,0xe0),      o2(0xd1,0xfc),
+          o2(0xce,0xad), o3(0x8f,0xb3,0xd0),
+     o3(0x8f,0xb3,0xd1),      o2(0xd1,0xf8),
+          o2(0xd1,0xfd),      o2(0xd1,0xfa),
+     o3(0x8f,0xb3,0xd2),      o2(0xd1,0xf9),
+     o3(0x8f,0xb3,0xd3), o3(0x8f,0xb3,0xd4),
+     o3(0x8f,0xb3,0xd5), o3(0x8f,0xb3,0xd6),
+     o3(0x8f,0xb3,0xd7),      o2(0xce,0xcf),
+     o3(0x8f,0xb3,0xd8),      o2(0xb8,0xf9),
+          o2(0xb2,0xc3),      o2(0xce,0xf4),
+     o3(0x8f,0xb3,0xd9), o3(0x8f,0xb3,0xda),
+     o3(0x8f,0xb3,0xdb), o3(0x8f,0xb3,0xdc),
+          o2(0xbd,0xf5),      o2(0xc5,0xd8),
+          o2(0xb9,0xe5),      o2(0xd2,0xa2),
+          o2(0xd2,0xa3), o3(0x8f,0xb3,0xdd),
+     o3(0x8f,0xb3,0xde),      o2(0xce,0xe5),
+          o2(0xcf,0xab),      o2(0xd2,0xa5),
+     o3(0x8f,0xb3,0xdf), o3(0x8f,0xb3,0xe0),
+     o3(0x8f,0xb3,0xe1),      o2(0xb8,0xfa),
+     o3(0x8f,0xb3,0xe2), o3(0x8f,0xb3,0xe3),
+          o2(0xd2,0xa4), o3(0x8f,0xb3,0xe4),
+          o2(0xb3,0xaf),
+
+#define to_EUC_JP_E5_8A WORDINDEX2INFO(18351)
+    to_EUC_JP_E5_8A_offsets,
+    to_EUC_JP_E5_8A_infos,
+
+#define to_EUC_JP_E5_8B_infos WORDINDEX2INFO(18353)
+                INVALID, o3(0x8f,0xb3,0xe5),
+          o2(0xd2,0xa6),              UNDEF,
+          o2(0xcb,0xd6), o3(0x8f,0xb3,0xe6),
+          o2(0xc4,0xbc), o3(0x8f,0xb3,0xe7),
+          o2(0xcd,0xa6), o3(0x8f,0xb3,0xe8),
+          o2(0xca,0xd9), o3(0x8f,0xb3,0xe9),
+          o2(0xd2,0xa7), o3(0x8f,0xb3,0xea),
+     o3(0x8f,0xb3,0xeb),      o2(0xf0,0xd5),
+     o3(0x8f,0xb3,0xec),      o2(0xc6,0xb0),
+     o3(0x8f,0xb3,0xed),      o2(0xd2,0xa8),
+          o2(0xb4,0xaa),      o2(0xcc,0xb3),
+     o3(0x8f,0xb3,0xee), o3(0x8f,0xb3,0xef),
+          o2(0xbe,0xa1),      o2(0xd2,0xa9),
+          o2(0xca,0xe7),      o2(0xd2,0xad),
+     o3(0x8f,0xb3,0xf0),      o2(0xc0,0xaa),
+          o2(0xd2,0xaa),      o2(0xb6,0xd0),
+     o3(0x8f,0xb3,0xf1),      o2(0xd2,0xab),
+          o2(0xb4,0xab), o3(0x8f,0xb3,0xf2),
+     o3(0x8f,0xb3,0xf3), o3(0x8f,0xb3,0xf4),
+     o3(0x8f,0xb3,0xf5), o3(0x8f,0xb3,0xf6),
+     o3(0x8f,0xb3,0xf7),      o2(0xb7,0xae),
+          o2(0xd2,0xae), o3(0x8f,0xb3,0xf8),
+          o2(0xd2,0xaf), o3(0x8f,0xb3,0xf9),
+     o3(0x8f,0xb3,0xfa),      o2(0xd2,0xb0),
+          o2(0xd2,0xb1),      o2(0xbc,0xdb),
+          o2(0xb8,0xfb),      o2(0xcc,0xde),
+
+#define to_EUC_JP_E5_8B WORDINDEX2INFO(18405)
+    to_EUC_JP_E5_8B_offsets,
+    to_EUC_JP_E5_8B_infos,
+
+#define to_EUC_JP_E5_8C_infos WORDINDEX2INFO(18407)
+                INVALID, o3(0x8f,0xb3,0xfb),
+          o2(0xcc,0xe8),      o2(0xc6,0xf7),
+     o3(0x8f,0xb3,0xfc),              UNDEF,
+          o2(0xca,0xf1),      o2(0xd2,0xb2),
+          o2(0xd2,0xb3), o3(0x8f,0xb3,0xfd),
+     o3(0x8f,0xb3,0xfe), o3(0x8f,0xb4,0xa1),
+          o2(0xd2,0xb5),      o2(0xd2,0xb7),
+          o2(0xd2,0xb6), o3(0x8f,0xb4,0xa2),
+     o3(0x8f,0xb4,0xa3),      o2(0xd2,0xb8),
+          o2(0xb2,0xbd),      o2(0xcb,0xcc),
+     o3(0x8f,0xb4,0xa4),      o2(0xba,0xfc),
+          o2(0xd2,0xb9), o3(0x8f,0xb4,0xa5),
+     o3(0x8f,0xb4,0xa6),      o2(0xc1,0xd9),
+     o3(0x8f,0xb4,0xa7), o3(0x8f,0xb4,0xa8),
+          o2(0xbe,0xa2),      o2(0xb6,0xa9),
+          o2(0xd2,0xba), o3(0x8f,0xb4,0xa9),
+     o3(0x8f,0xb4,0xaa), o3(0x8f,0xb4,0xab),
+     o3(0x8f,0xb4,0xac),      o2(0xc8,0xdb),
+     o3(0x8f,0xb4,0xad), o3(0x8f,0xb4,0xae),
+     o3(0x8f,0xb4,0xaf),      o2(0xd2,0xbb),
+     o3(0x8f,0xb4,0xb0),      o2(0xd2,0xbc),
+     o3(0x8f,0xb4,0xb1),      o2(0xd2,0xbd),
+     o3(0x8f,0xb4,0xb2),      o2(0xd2,0xbe),
+          o2(0xc9,0xa4),      o2(0xb6,0xe8),
+          o2(0xb0,0xe5), o3(0x8f,0xb4,0xb3),
+     o3(0x8f,0xb4,0xb4), o3(0x8f,0xb4,0xb5),
+          o2(0xc6,0xbf),
+
+#define to_EUC_JP_E5_8C WORDINDEX2INFO(18460)
+    to_EUC_JP_E5_8C_offsets,
+    to_EUC_JP_E5_8C_infos,
+
+#define to_EUC_JP_E5_8D_infos WORDINDEX2INFO(18462)
+                INVALID,      o2(0xd2,0xbf),
+          o2(0xbd,0xbd), o3(0x8f,0xb4,0xb6),
+          o2(0xc0,0xe9),              UNDEF,
+          o2(0xd2,0xc1),      o2(0xd2,0xc0),
+          o2(0xbe,0xa3),      o2(0xb8,0xe1),
+          o2(0xd2,0xc3),      o2(0xc8,0xbe),
+     o3(0x8f,0xb4,0xb8), o3(0x8f,0xb4,0xb7),
+          o2(0xd2,0xc4),      o2(0xc8,0xdc),
+          o2(0xc2,0xb4),      o2(0xc2,0xee),
+          o2(0xb6,0xa8),      o2(0xc6,0xee),
+          o2(0xc3,0xb1), o3(0x8f,0xb4,0xb9),
+          o2(0xc7,0xee), o3(0x8f,0xb4,0xba),
+          o2(0xcb,0xce),      o2(0xd2,0xc6),
+          o2(0xc0,0xea), o3(0x8f,0xb4,0xbb),
+     o3(0x8f,0xb4,0xbc), o3(0x8f,0xb4,0xbd),
+          o2(0xb7,0xb5),      o2(0xd2,0xc7),
+     o3(0x8f,0xb4,0xbe), o3(0x8f,0xb4,0xbf),
+          o2(0xd2,0xc8),      o2(0xb1,0xac),
+          o2(0xb0,0xf5),      o2(0xb4,0xed),
+     o3(0x8f,0xb4,0xc0),      o2(0xc2,0xa8),
+          o2(0xb5,0xd1),      o2(0xcd,0xf1),
+          o2(0xd2,0xcb),      o2(0xb2,0xb7),
+     o3(0x8f,0xb4,0xc1),      o2(0xd2,0xca),
+     o3(0x8f,0xb4,0xc2),      o2(0xb6,0xaa),
+
+#define to_EUC_JP_E5_8D WORDINDEX2INFO(18510)
+    to_EUC_JP_E5_8D_offsets,
+    to_EUC_JP_E5_8D_infos,
+
+#define to_EUC_JP_E5_8E_infos WORDINDEX2INFO(18512)
+                INVALID,              UNDEF,
+          o2(0xd2,0xcc), o3(0x8f,0xb4,0xc3),
+          o2(0xcc,0xf1), o3(0x8f,0xb4,0xc4),
+     o3(0x8f,0xb4,0xc5), o3(0x8f,0xb4,0xc6),
+     o3(0x8f,0xb4,0xc7), o3(0x8f,0xb4,0xc8),
+          o2(0xd2,0xcd),      o2(0xce,0xd2),
+     o3(0x8f,0xb4,0xc9),      o2(0xb8,0xfc),
+     o3(0x8f,0xb4,0xca),      o2(0xb8,0xb6),
+          o2(0xd2,0xce), o3(0x8f,0xb4,0xcb),
+     o3(0x8f,0xb4,0xcc),      o2(0xd2,0xd0),
+          o2(0xd2,0xcf),      o2(0xbf,0xdf),
+          o2(0xb1,0xb9), o3(0x8f,0xb4,0xcd),
+     o3(0x8f,0xb4,0xce),      o2(0xb1,0xde),
+          o2(0xd2,0xd1), o3(0x8f,0xb4,0xcf),
+          o2(0xd2,0xd2), o3(0x8f,0xb4,0xd0),
+          o2(0xb8,0xb7), o3(0x8f,0xb4,0xd1),
+     o3(0x8f,0xb4,0xd2),      o2(0xd2,0xd3),
+     o3(0x8f,0xb4,0xd3), o3(0x8f,0xb4,0xd4),
+     o3(0x8f,0xb4,0xd5),      o2(0xb5,0xee),
+     o3(0x8f,0xb4,0xd6),
+
+#define to_EUC_JP_E5_8E WORDINDEX2INFO(18551)
+    to_EUC_JP_E5_8E_offsets,
+    to_EUC_JP_E5_8E_infos,
+
+#define to_EUC_JP_E5_8F_infos WORDINDEX2INFO(18553)
+                INVALID, o3(0x8f,0xb4,0xd7),
+                  UNDEF,      o2(0xbb,0xb2),
+          o2(0xd2,0xd4), o3(0x8f,0xb4,0xd8),
+          o2(0xcb,0xf4),      o2(0xba,0xb5),
+          o2(0xb5,0xda),      o2(0xcd,0xa7),
+          o2(0xc1,0xd0),      o2(0xc8,0xbf),
+          o2(0xbc,0xfd), o3(0x8f,0xb4,0xd9),
+     o3(0x8f,0xb4,0xda), o3(0x8f,0xb4,0xdb),
+          o2(0xbd,0xc7), o3(0x8f,0xb4,0xdc),
+          o2(0xbc,0xe8),      o2(0xbc,0xf5),
+          o2(0xbd,0xf6), o3(0x8f,0xb4,0xdd),
+          o2(0xc8,0xc0), o3(0x8f,0xb4,0xde),
+     o3(0x8f,0xb4,0xdf),      o2(0xd2,0xd7),
+     o3(0x8f,0xb4,0xe0),      o2(0xb1,0xc3),
+          o2(0xc1,0xd1),      o2(0xb8,0xfd),
+          o2(0xb8,0xc5),      o2(0xb6,0xe7),
+     o3(0x8f,0xb4,0xe1), o3(0x8f,0xb4,0xe2),
+          o2(0xd2,0xdb),      o2(0xc3,0xa1),
+          o2(0xc2,0xfe),      o2(0xb6,0xab),
+          o2(0xbe,0xa4),      o2(0xd2,0xdc),
+          o2(0xd2,0xda),      o2(0xb2,0xc4),
+          o2(0xc2,0xe6),      o2(0xbc,0xb8),
+          o2(0xbb,0xcb),      o2(0xb1,0xa6),
+     o3(0x8f,0xb4,0xe3),      o2(0xb3,0xf0),
+          o2(0xb9,0xe6),      o2(0xbb,0xca),
+          o2(0xd2,0xdd),
+
+#define to_EUC_JP_E5_8F WORDINDEX2INFO(18604)
+    to_EUC_JP_E5_8F_offsets,
+    to_EUC_JP_E5_8F_infos,
+
+#define to_EUC_JP_E5_90_infos WORDINDEX2INFO(18606)
+                INVALID,              UNDEF,
+          o2(0xd2,0xde), o3(0x8f,0xb4,0xe4),
+          o2(0xb5,0xc9),      o2(0xb3,0xc6),
+          o2(0xb9,0xe7),      o2(0xb5,0xc8),
+          o2(0xc4,0xdf),      o2(0xb1,0xa5),
+          o2(0xc6,0xb1),      o2(0xcc,0xbe),
+          o2(0xb9,0xa1),      o2(0xcd,0xf9),
+          o2(0xc5,0xc7),      o2(0xb8,0xfe),
+     o3(0x8f,0xb4,0xe5), o3(0x8f,0xb4,0xe6),
+          o2(0xb7,0xaf),      o2(0xd2,0xe7),
+          o2(0xb6,0xe3),      o2(0xcb,0xca),
+     o3(0x8f,0xb4,0xe7),      o2(0xc8,0xdd),
+     o3(0x8f,0xb4,0xe8), o3(0x8f,0xb4,0xe9),
+          o2(0xd2,0xe6), o3(0x8f,0xb4,0xea),
+          o2(0xb4,0xde),      o2(0xd2,0xe1),
+          o2(0xd2,0xe2),      o2(0xd2,0xe4),
+     o3(0x8f,0xb4,0xeb), o3(0x8f,0xb4,0xec),
+     o3(0x8f,0xb4,0xed), o3(0x8f,0xb4,0xee),
+          o2(0xd2,0xe5),      o2(0xb5,0xdb),
+          o2(0xbf,0xe1),      o2(0xca,0xad),
+          o2(0xd2,0xe3),      o2(0xd2,0xdf),
+          o2(0xb8,0xe3),
+
+#define to_EUC_JP_E5_90 WORDINDEX2INFO(18649)
+    to_EUC_JP_E5_90_offsets,
+    to_EUC_JP_E5_90_infos,
+
+#define to_EUC_JP_E5_91_infos WORDINDEX2INFO(18651)
+                INVALID,      o2(0xd2,0xe0),
+                  UNDEF,      o2(0xcf,0xa4),
+     o3(0x8f,0xb4,0xef), o3(0x8f,0xb4,0xf0),
+          o2(0xca,0xf2), o3(0x8f,0xb4,0xf1),
+          o2(0xc4,0xe8),      o2(0xb8,0xe2),
+          o2(0xb9,0xf0), o3(0x8f,0xb4,0xf2),
+          o2(0xd2,0xe8), o3(0x8f,0xb4,0xf3),
+          o2(0xc6,0xdd), o3(0x8f,0xb4,0xf4),
+          o2(0xd2,0xec), o3(0x8f,0xb4,0xf5),
+     o3(0x8f,0xb4,0xf6), o3(0x8f,0xb4,0xf7),
+     o3(0x8f,0xb4,0xf8),      o2(0xbc,0xfe),
+     o3(0x8f,0xb4,0xf9),      o2(0xbc,0xf6),
+     o3(0x8f,0xb4,0xfa), o3(0x8f,0xb4,0xfb),
+     o3(0x8f,0xb4,0xfc),      o2(0xd2,0xef),
+          o2(0xd2,0xed),      o2(0xcc,0xa3),
+     o3(0x8f,0xb4,0xfd),      o2(0xd2,0xea),
+          o2(0xd2,0xf3),      o2(0xd2,0xee),
+          o2(0xd2,0xf1),      o2(0xb8,0xc6),
+          o2(0xcc,0xbf), o3(0x8f,0xb4,0xfe),
+
+#define to_EUC_JP_E5_91 WORDINDEX2INFO(18689)
+    to_EUC_JP_E5_91_offsets,
+    to_EUC_JP_E5_91_infos,
+
+#define to_EUC_JP_E5_92_infos WORDINDEX2INFO(18691)
+                INVALID,      o2(0xd2,0xf2),
+     o3(0x8f,0xb5,0xa1),              UNDEF,
+     o3(0x8f,0xb5,0xa2),      o2(0xd2,0xf4),
+     o3(0x8f,0xb5,0xa3),      o2(0xd2,0xf6),
+     o3(0x8f,0xb5,0xa4), o3(0x8f,0xb5,0xa5),
+          o2(0xba,0xf0),      o2(0xcf,0xc2),
+     o3(0x8f,0xb5,0xa6),      o2(0xd2,0xeb),
+          o2(0xd2,0xe9),      o2(0xd2,0xf5),
+     o3(0x8f,0xb5,0xa7),      o2(0xd2,0xf0),
+     o3(0x8f,0xb5,0xa8), o3(0x8f,0xb5,0xa9),
+     o3(0x8f,0xb5,0xaa), o3(0x8f,0xb5,0xab),
+     o3(0x8f,0xb5,0xac),      o2(0xd2,0xf8),
+          o2(0xd3,0xa3),      o2(0xd2,0xfa),
+     o3(0x8f,0xb5,0xad), o3(0x8f,0xb5,0xae),
+          o2(0xd2,0xfe), o3(0x8f,0xb5,0xaf),
+     o3(0x8f,0xb5,0xb0),      o2(0xd3,0xa1),
+          o2(0xd2,0xfb), o3(0x8f,0xb5,0xb1),
+     o3(0x8f,0xb5,0xb2),      o2(0xd3,0xbe),
+     o3(0x8f,0xb5,0xb3),      o2(0xba,0xe9),
+          o2(0xb3,0xb1), o3(0x8f,0xb5,0xb4),
+          o2(0xd2,0xf9), o3(0x8f,0xb5,0xb5),
+     o3(0x8f,0xb5,0xb6), o3(0x8f,0xb5,0xb7),
+          o2(0xd3,0xa5),      o2(0xb0,0xf6),
+          o2(0xd3,0xa4), o3(0x8f,0xb5,0xb8),
+
+#define to_EUC_JP_E5_92 WORDINDEX2INFO(18739)
+    to_EUC_JP_E5_92_offsets,
+    to_EUC_JP_E5_92_infos,
+
+#define to_EUC_JP_E5_93_infos WORDINDEX2INFO(18741)
+                INVALID,      o2(0xb0,0xa5),
+          o2(0xc9,0xca),      o2(0xd3,0xa2),
+                  UNDEF,      o2(0xd2,0xfc),
+     o3(0x8f,0xb5,0xb9),      o2(0xd2,0xf7),
+          o2(0xd2,0xfd),      o2(0xba,0xc8),
+     o3(0x8f,0xb5,0xba), o3(0x8f,0xb5,0xbb),
+     o3(0x8f,0xb5,0xbc),      o2(0xd3,0xa6),
+     o3(0x8f,0xb5,0xbd),      o2(0xb0,0xf7),
+          o2(0xd3,0xaf),      o2(0xd3,0xa7),
+          o2(0xd3,0xa8),      o2(0xbe,0xa5),
+          o2(0xcb,0xe9), o3(0x8f,0xb5,0xbe),
+     o3(0x8f,0xb5,0xbf),      o2(0xd3,0xad),
+          o2(0xd3,0xac), o3(0x8f,0xb5,0xc0),
+          o2(0xc5,0xaf), o3(0x8f,0xb5,0xc1),
+          o2(0xd3,0xae), o3(0x8f,0xb5,0xc2),
+          o2(0xd3,0xab), o3(0x8f,0xb5,0xc3),
+     o3(0x8f,0xb5,0xc4),
+
+#define to_EUC_JP_E5_93 WORDINDEX2INFO(18774)
+    to_EUC_JP_E5_93_offsets,
+    to_EUC_JP_E5_93_infos,
+
+#define to_EUC_JP_E5_94_infos WORDINDEX2INFO(18776)
+                INVALID, o3(0x8f,0xb5,0xc5),
+     o3(0x8f,0xb5,0xc6),              UNDEF,
+          o2(0xb1,0xb4), o3(0x8f,0xb5,0xc7),
+          o2(0xba,0xb6),      o2(0xbf,0xb0),
+     o3(0x8f,0xb5,0xc8), o3(0x8f,0xb5,0xc9),
+     o3(0x8f,0xb5,0xca), o3(0x8f,0xb5,0xcb),
+     o3(0x8f,0xb5,0xcc),      o2(0xd3,0xa9),
+          o2(0xc5,0xe2),      o2(0xd3,0xaa),
+     o3(0x8f,0xb5,0xcd),      o2(0xb0,0xa2),
+     o3(0x8f,0xb5,0xce), o3(0x8f,0xb5,0xcf),
+          o2(0xd3,0xb4),      o2(0xcd,0xa3),
+          o2(0xbe,0xa7), o3(0x8f,0xb5,0xd0),
+          o2(0xd3,0xba), o3(0x8f,0xb5,0xd1),
+     o3(0x8f,0xb5,0xd2),      o2(0xd3,0xb9),
+          o2(0xd3,0xb0), o3(0x8f,0xb5,0xd3),
+     o3(0x8f,0xb5,0xd4), o3(0x8f,0xb5,0xd5),
+          o2(0xc2,0xc3),
+
+#define to_EUC_JP_E5_94 WORDINDEX2INFO(18809)
+    to_EUC_JP_E5_94_offsets,
+    to_EUC_JP_E5_94_infos,
+
+#define to_EUC_JP_E5_95_infos WORDINDEX2INFO(18811)
+                INVALID,      o2(0xd3,0xb1),
+     o3(0x8f,0xb5,0xd6),              UNDEF,
+          o2(0xc2,0xef),      o2(0xd3,0xb6),
+          o2(0xbe,0xa6), o3(0x8f,0xb5,0xd7),
+     o3(0x8f,0xb5,0xd8), o3(0x8f,0xb5,0xd9),
+          o2(0xd3,0xb3), o3(0x8f,0xb5,0xda),
+          o2(0xcc,0xe4), o3(0x8f,0xb5,0xdb),
+     o3(0x8f,0xb5,0xdc),      o2(0xb7,0xbc),
+          o2(0xd3,0xb7),      o2(0xd3,0xb8),
+     o3(0x8f,0xb5,0xdd), o3(0x8f,0xb5,0xde),
+     o3(0x8f,0xb5,0xdf),      o2(0xd3,0xb5),
+          o2(0xd3,0xbb), o3(0x8f,0xb5,0xe0),
+     o3(0x8f,0xb5,0xe1), o3(0x8f,0xb5,0xe2),
+          o2(0xd3,0xb2), o3(0x8f,0xb5,0xe3),
+     o3(0x8f,0xb5,0xe4),      o2(0xd3,0xc1),
+          o2(0xd3,0xc6),      o2(0xd3,0xc2),
+     o3(0x8f,0xb5,0xe5),
+
+#define to_EUC_JP_E5_95 WORDINDEX2INFO(18844)
+    to_EUC_JP_E5_95_offsets,
+    to_EUC_JP_E5_95_infos,
+
+#define to_EUC_JP_E5_96_infos WORDINDEX2INFO(18846)
+                INVALID,      o2(0xd3,0xbd),
+     o3(0x8f,0xb5,0xe6), o3(0x8f,0xb5,0xe7),
+          o2(0xd3,0xc7),      o2(0xc1,0xb1),
+                  UNDEF, o3(0x8f,0xb5,0xe8),
+          o2(0xd3,0xc9), o3(0x8f,0xb5,0xe9),
+          o2(0xb9,0xa2),      o2(0xd3,0xbf),
+          o2(0xc3,0xfd), o3(0x8f,0xb5,0xea),
+     o3(0x8f,0xb5,0xeb), o3(0x8f,0xb5,0xec),
+     o3(0x8f,0xb5,0xed), o3(0x8f,0xb5,0xee),
+     o3(0x8f,0xb5,0xef), o3(0x8f,0xb5,0xf0),
+          o2(0xd3,0xc3),      o2(0xd3,0xbc),
+          o2(0xb4,0xad),      o2(0xb4,0xee),
+          o2(0xb3,0xe5),      o2(0xd3,0xc4),
+          o2(0xd3,0xc0), o3(0x8f,0xb5,0xf1),
+     o3(0x8f,0xb5,0xf2),      o2(0xb7,0xf6),
+          o2(0xd3,0xca),      o2(0xd3,0xc8),
+          o2(0xc1,0xd3),      o2(0xb5,0xca),
+          o2(0xb6,0xac), o3(0x8f,0xb5,0xf3),
+          o2(0xd3,0xc5),      o2(0xb6,0xf4),
+     o3(0x8f,0xb5,0xf4),      o2(0xb1,0xc4),
+     o3(0x8f,0xb5,0xf5),
+
+#define to_EUC_JP_E5_96 WORDINDEX2INFO(18887)
+    to_EUC_JP_E5_96_offsets,
+    to_EUC_JP_E5_96_infos,
+
+#define to_EUC_JP_E5_97_infos WORDINDEX2INFO(18889)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb5,0xf6), o3(0x8f,0xb5,0xf7),
+          o2(0xd3,0xce),      o2(0xd3,0xcc),
+     o3(0x8f,0xb5,0xf8),      o2(0xd4,0xa7),
+     o3(0x8f,0xb5,0xf9), o3(0x8f,0xb5,0xfa),
+     o3(0x8f,0xb5,0xfb), o3(0x8f,0xb5,0xfc),
+     o3(0x8f,0xb5,0xfd), o3(0x8f,0xb5,0xfe),
+     o3(0x8f,0xb6,0xa1),      o2(0xd3,0xd1),
+     o3(0x8f,0xb6,0xa2), o3(0x8f,0xb6,0xa3),
+          o2(0xd3,0xcb), o3(0x8f,0xb6,0xa4),
+          o2(0xd3,0xcf), o3(0x8f,0xb6,0xa5),
+          o2(0xd3,0xcd), o3(0x8f,0xb6,0xa6),
+          o2(0xbb,0xcc),      o2(0xd3,0xd0),
+     o3(0x8f,0xb6,0xa7), o3(0x8f,0xb6,0xa8),
+          o2(0xd3,0xd3),      o2(0xd3,0xd8),
+          o2(0xd3,0xd6),      o2(0xd3,0xd5),
+     o3(0x8f,0xb6,0xa9),
+
+#define to_EUC_JP_E5_97 WORDINDEX2INFO(18922)
+    to_EUC_JP_E5_97_offsets,
+    to_EUC_JP_E5_97_infos,
+
+#define to_EUC_JP_E5_98_infos WORDINDEX2INFO(18924)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb6,0xaa),      o2(0xc3,0xb2),
+     o3(0x8f,0xb6,0xab),      o2(0xb2,0xc5),
+     o3(0x8f,0xb6,0xac), o3(0x8f,0xb6,0xad),
+     o3(0x8f,0xb6,0xae), o3(0x8f,0xb6,0xaf),
+     o3(0x8f,0xb6,0xb0), o3(0x8f,0xb6,0xb1),
+     o3(0x8f,0xb6,0xb2),      o2(0xd3,0xd2),
+          o2(0xd3,0xd4),      o2(0xbe,0xa8),
+          o2(0xb1,0xb3), o3(0x8f,0xb6,0xb3),
+          o2(0xd3,0xd7),      o2(0xb2,0xde),
+     o3(0x8f,0xb6,0xb4),      o2(0xd3,0xe2),
+     o3(0x8f,0xb6,0xb5),      o2(0xbe,0xfc),
+          o2(0xd3,0xde), o3(0x8f,0xb6,0xb6),
+          o2(0xd3,0xdc), o3(0x8f,0xb6,0xb7),
+          o2(0xd3,0xdd), o3(0x8f,0xb6,0xb8),
+          o2(0xd3,0xdf), o3(0x8f,0xb6,0xb9),
+     o3(0x8f,0xb6,0xba), o3(0x8f,0xb6,0xbb),
+     o3(0x8f,0xb6,0xbc), o3(0x8f,0xb6,0xbd),
+
+#define to_EUC_JP_E5_98 WORDINDEX2INFO(18960)
+    to_EUC_JP_E5_98_offsets,
+    to_EUC_JP_E5_98_infos,
+
+#define to_EUC_JP_E5_99_infos WORDINDEX2INFO(18962)
+                INVALID, o3(0x8f,0xb6,0xbe),
+     o3(0x8f,0xb6,0xbf),      o2(0xb1,0xbd),
+     o3(0x8f,0xb6,0xc0), o3(0x8f,0xb6,0xc1),
+                  UNDEF, o3(0x8f,0xb6,0xc2),
+     o3(0x8f,0xb6,0xc3), o3(0x8f,0xb6,0xc4),
+          o2(0xc1,0xb9), o3(0x8f,0xb6,0xc5),
+          o2(0xd3,0xd9), o3(0x8f,0xb6,0xc6),
+          o2(0xd3,0xda), o3(0x8f,0xb6,0xc7),
+          o2(0xb3,0xfa), o3(0x8f,0xb6,0xc8),
+     o3(0x8f,0xb6,0xc9), o3(0x8f,0xb6,0xca),
+     o3(0x8f,0xb6,0xcb), o3(0x8f,0xb6,0xcc),
+          o2(0xd3,0xe1), o3(0x8f,0xb6,0xcd),
+          o2(0xb4,0xef), o3(0x8f,0xb6,0xce),
+          o2(0xd3,0xe4),      o2(0xd3,0xe0),
+          o2(0xd3,0xe3), o3(0x8f,0xb6,0xcf),
+     o3(0x8f,0xb6,0xd0), o3(0x8f,0xb6,0xd1),
+     o3(0x8f,0xb6,0xd2),      o2(0xca,0xae),
+     o3(0x8f,0xb6,0xd3),      o2(0xc6,0xd5),
+          o2(0xc8,0xb8),
+
+#define to_EUC_JP_E5_99 WORDINDEX2INFO(18999)
+    to_EUC_JP_E5_99_offsets,
+    to_EUC_JP_E5_99_infos,
+
+#define to_EUC_JP_E5_9A_infos WORDINDEX2INFO(19001)
+                INVALID,      o2(0xd3,0xe6),
+                  UNDEF, o3(0x8f,0xb6,0xd4),
+     o3(0x8f,0xb6,0xd5),      o2(0xd3,0xe5),
+          o2(0xb3,0xc5), o3(0x8f,0xb6,0xd6),
+          o2(0xd3,0xe7), o3(0x8f,0xb6,0xd7),
+     o3(0x8f,0xb6,0xd8),      o2(0xd3,0xea),
+          o2(0xd3,0xe9), o3(0x8f,0xb6,0xd9),
+     o3(0x8f,0xb6,0xda), o3(0x8f,0xb6,0xdb),
+     o3(0x8f,0xb6,0xdc), o3(0x8f,0xb6,0xdd),
+     o3(0x8f,0xb6,0xde),      o2(0xd3,0xe8),
+          o2(0xc7,0xb9),      o2(0xd3,0xeb),
+     o3(0x8f,0xb6,0xdf), o3(0x8f,0xb6,0xe0),
+     o3(0x8f,0xb6,0xe1), o3(0x8f,0xb6,0xe2),
+     o3(0x8f,0xb6,0xe3), o3(0x8f,0xb6,0xe4),
+     o3(0x8f,0xb6,0xe5),      o2(0xd3,0xec),
+     o3(0x8f,0xb6,0xe6), o3(0x8f,0xb6,0xe7),
+          o2(0xd3,0xee),      o2(0xd3,0xed),
+     o3(0x8f,0xb6,0xe8),      o2(0xd3,0xf0),
+     o3(0x8f,0xb6,0xe9),
+
+#define to_EUC_JP_E5_9A WORDINDEX2INFO(19038)
+    to_EUC_JP_E5_9A_offsets,
+    to_EUC_JP_E5_9A_infos,
+
+#define to_EUC_JP_E5_9B_infos WORDINDEX2INFO(19040)
+                INVALID,      o2(0xd3,0xf3),
+          o2(0xd3,0xf1),      o2(0xd3,0xef),
+          o2(0xd3,0xf2),              UNDEF,
+     o3(0x8f,0xb6,0xea),      o2(0xd3,0xf4),
+     o3(0x8f,0xb6,0xeb), o3(0x8f,0xb6,0xec),
+     o3(0x8f,0xb6,0xed), o3(0x8f,0xb6,0xf0),
+     o3(0x8f,0xb6,0xf1),      o2(0xd3,0xf5),
+     o3(0x8f,0xb6,0xee), o3(0x8f,0xb6,0xef),
+          o2(0xd3,0xf6),      o2(0xd3,0xf7),
+          o2(0xd3,0xf8),      o2(0xd1,0xc5),
+     o3(0x8f,0xb6,0xf2),      o2(0xbc,0xfc),
+          o2(0xbb,0xcd), o3(0x8f,0xb6,0xf3),
+     o3(0x8f,0xb6,0xf4),      o2(0xb2,0xf3),
+     o3(0x8f,0xb6,0xf5),      o2(0xb0,0xf8),
+     o3(0x8f,0xb6,0xf6),      o2(0xc3,0xc4),
+     o3(0x8f,0xb6,0xf7), o3(0x8f,0xb6,0xf8),
+     o3(0x8f,0xb6,0xf9), o3(0x8f,0xb6,0xfa),
+     o3(0x8f,0xb6,0xfb), o3(0x8f,0xb6,0xfd),
+     o3(0x8f,0xb6,0xfe),      o2(0xd3,0xf9),
+          o2(0xba,0xa4), o3(0x8f,0xb6,0xfc),
+          o2(0xb0,0xcf),      o2(0xbf,0xde),
+     o3(0x8f,0xb7,0xa1), o3(0x8f,0xb7,0xa2),
+          o2(0xd3,0xfa),      o2(0xb8,0xc7),
+          o2(0xb9,0xf1),      o2(0xd3,0xfc),
+
+#define to_EUC_JP_E5_9B WORDINDEX2INFO(19088)
+    to_EUC_JP_E5_9B_offsets,
+    to_EUC_JP_E5_9B_infos,
+
+#define to_EUC_JP_E5_9C_infos WORDINDEX2INFO(19090)
+                INVALID,      o2(0xd3,0xfb),
+     o3(0x8f,0xb7,0xa3), o3(0x8f,0xb7,0xa4),
+          o2(0xca,0xe0),      o2(0xd3,0xfd),
+                  UNDEF, o3(0x8f,0xb7,0xa5),
+          o2(0xd4,0xa1),      o2(0xd3,0xfe),
+     o3(0x8f,0xb7,0xa6),      o2(0xd4,0xa2),
+     o3(0x8f,0xb7,0xa7),      o2(0xd4,0xa3),
+          o2(0xb7,0xf7), o3(0x8f,0xb7,0xa8),
+          o2(0xb1,0xe0),      o2(0xd4,0xa4),
+     o3(0x8f,0xb7,0xa9),      o2(0xd4,0xa6),
+          o2(0xd4,0xa5), o3(0x8f,0xb7,0xaa),
+     o3(0x8f,0xb7,0xab),      o2(0xd4,0xa8),
+     o3(0x8f,0xb7,0xac),      o2(0xc5,0xda),
+     o3(0x8f,0xb7,0xad), o3(0x8f,0xb7,0xae),
+     o3(0x8f,0xb7,0xaf), o3(0x8f,0xb7,0xb0),
+     o3(0x8f,0xb7,0xb1),      o2(0xd4,0xa9),
+          o2(0xb0,0xb5),      o2(0xba,0xdf),
+     o3(0x8f,0xb7,0xb2), o3(0x8f,0xb7,0xb3),
+     o3(0x8f,0xb7,0xb4),      o2(0xb7,0xbd),
+     o3(0x8f,0xb7,0xb5), o3(0x8f,0xb7,0xb6),
+          o2(0xc3,0xcf), o3(0x8f,0xb7,0xb7),
+     o3(0x8f,0xb7,0xb8),      o2(0xd4,0xaa),
+          o2(0xd4,0xab),      o2(0xd4,0xad),
+     o3(0x8f,0xb7,0xb9), o3(0x8f,0xb7,0xba),
+     o3(0x8f,0xb7,0xbb),
+
+#define to_EUC_JP_E5_9C WORDINDEX2INFO(19139)
+    to_EUC_JP_E5_9C_offsets,
+    to_EUC_JP_E5_9C_infos,
+
+#define to_EUC_JP_E5_9D_infos WORDINDEX2INFO(19141)
+                INVALID,      o2(0xd4,0xae),
+                  UNDEF,      o2(0xba,0xe4),
+     o3(0x8f,0xb7,0xbc), o3(0x8f,0xb7,0xbd),
+          o2(0xb6,0xd1),      o2(0xcb,0xb7),
+     o3(0x8f,0xb7,0xbe), o3(0x8f,0xb7,0xbf),
+          o2(0xd4,0xac),      o2(0xd4,0xaf),
+          o2(0xba,0xc1),      o2(0xb9,0xa3),
+     o3(0x8f,0xb7,0xc0),      o2(0xd4,0xb3),
+     o3(0x8f,0xb7,0xc1),      o2(0xba,0xa5),
+     o3(0x8f,0xb7,0xc2),      o2(0xc3,0xb3),
+     o3(0x8f,0xb7,0xc3), o3(0x8f,0xb7,0xc4),
+          o2(0xd4,0xb0),      o2(0xc4,0xda),
+     o3(0x8f,0xb7,0xc5), o3(0x8f,0xb7,0xc6),
+     o3(0x8f,0xb7,0xc7), o3(0x8f,0xb7,0xc8),
+     o3(0x8f,0xb7,0xc9), o3(0x8f,0xb7,0xca),
+     o3(0x8f,0xb7,0xcb), o3(0x8f,0xb7,0xcc),
+     o3(0x8f,0xb7,0xcd), o3(0x8f,0xb7,0xce),
+     o3(0x8f,0xb7,0xcf), o3(0x8f,0xb7,0xd0),
+     o3(0x8f,0xb7,0xd1), o3(0x8f,0xb7,0xd2),
+     o3(0x8f,0xb7,0xd3),      o2(0xd4,0xb4),
+
+#define to_EUC_JP_E5_9D WORDINDEX2INFO(19181)
+    to_EUC_JP_E5_9D_offsets,
+    to_EUC_JP_E5_9D_infos,
+
+#define to_EUC_JP_E5_9E_infos WORDINDEX2INFO(19183)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb7,0xd4),      o2(0xbf,0xe2),
+     o3(0x8f,0xb7,0xd5),      o2(0xd4,0xb2),
+          o2(0xd4,0xb5),      o2(0xb7,0xbf),
+     o3(0x8f,0xb7,0xd6),      o2(0xd4,0xb6),
+     o3(0x8f,0xb7,0xd7), o3(0x8f,0xb7,0xe0),
+     o3(0x8f,0xb7,0xd8), o3(0x8f,0xb7,0xd9),
+     o3(0x8f,0xb7,0xda), o3(0x8f,0xb7,0xdb),
+     o3(0x8f,0xb7,0xdc), o3(0x8f,0xb7,0xdd),
+     o3(0x8f,0xb7,0xde),      o2(0xd4,0xb7),
+     o3(0x8f,0xb7,0xdf),      o2(0xb9,0xa4),
+          o2(0xb3,0xc0),      o2(0xd4,0xb9),
+     o3(0x8f,0xb7,0xe1), o3(0x8f,0xb7,0xe2),
+     o3(0x8f,0xb7,0xe3),      o2(0xd4,0xba),
+     o3(0x8f,0xb7,0xe4),      o2(0xd4,0xbb),
+          o2(0xd4,0xb8), o3(0x8f,0xb7,0xe5),
+     o3(0x8f,0xb7,0xe6),
+
+#define to_EUC_JP_E5_9E WORDINDEX2INFO(19216)
+    to_EUC_JP_E5_9E_offsets,
+    to_EUC_JP_E5_9E_infos,
+
+#define to_EUC_JP_E5_9F_infos WORDINDEX2INFO(19218)
+                INVALID,      o2(0xd4,0xb1),
+                  UNDEF,      o2(0xd4,0xbc),
+          o2(0xd4,0xbd), o3(0x8f,0xb7,0xe7),
+     o3(0x8f,0xb7,0xe8),      o2(0xcb,0xe4),
+     o3(0x8f,0xb7,0xe9),      o2(0xbe,0xeb),
+     o3(0x8f,0xb7,0xea),      o2(0xd4,0xbf),
+          o2(0xd4,0xc0),      o2(0xd4,0xbe),
+     o3(0x8f,0xb7,0xeb),      o2(0xd4,0xc2),
+          o2(0xc7,0xb8), o3(0x8f,0xb7,0xec),
+     o3(0x8f,0xb7,0xed),      o2(0xb0,0xe8),
+          o2(0xc9,0xd6), o3(0x8f,0xb7,0xfe),
+          o2(0xd4,0xc3), o3(0x8f,0xb7,0xee),
+     o3(0x8f,0xb7,0xef), o3(0x8f,0xb7,0xf0),
+     o3(0x8f,0xb7,0xf1), o3(0x8f,0xb7,0xf2),
+     o3(0x8f,0xb7,0xf3),      o2(0xbe,0xfd),
+     o3(0x8f,0xb7,0xf4), o3(0x8f,0xb7,0xf5),
+          o2(0xbc,0xb9), o3(0x8f,0xb7,0xf6),
+          o2(0xc7,0xdd),      o2(0xb4,0xf0),
+          o2(0xba,0xeb), o3(0x8f,0xb7,0xf7),
+     o3(0x8f,0xb7,0xf8), o3(0x8f,0xb7,0xf9),
+
+#define to_EUC_JP_E5_9F WORDINDEX2INFO(19258)
+    to_EUC_JP_E5_9F_offsets,
+    to_EUC_JP_E5_9F_infos,
+
+#define to_EUC_JP_E5_A0_infos WORDINDEX2INFO(19260)
+                INVALID,      o2(0xcb,0xd9),
+                  UNDEF,      o2(0xc6,0xb2),
+     o3(0x8f,0xb7,0xfa), o3(0x8f,0xb7,0xfb),
+          o2(0xb7,0xf8),      o2(0xc2,0xcf),
+     o3(0x8f,0xb7,0xfc), o3(0x8f,0xb7,0xfd),
+          o2(0xd4,0xc1),      o2(0xd4,0xc4),
+     o3(0x8f,0xb8,0xa1), o3(0x8f,0xb8,0xa2),
+          o2(0xc2,0xc4),      o2(0xd4,0xc5),
+     o3(0x8f,0xb8,0xa3),      o2(0xd4,0xc6),
+     o3(0x8f,0xb8,0xa4), o3(0x8f,0xb8,0xa5),
+     o3(0x8f,0xb8,0xa6),      o2(0xd4,0xc8),
+          o2(0xc4,0xe9), o3(0x8f,0xb8,0xa7),
+     o3(0x8f,0xb8,0xa8),      o2(0xb4,0xae),
+     o3(0x8f,0xb8,0xa9),      o2(0xf4,0xa1),
+          o2(0xb1,0xe1),      o2(0xca,0xf3),
+     o3(0x8f,0xb8,0xaa),      o2(0xbe,0xec),
+          o2(0xc5,0xc8), o3(0x8f,0xb8,0xab),
+          o2(0xba,0xe6),      o2(0xd4,0xce),
+     o3(0x8f,0xb8,0xac),
+
+#define to_EUC_JP_E5_A0 WORDINDEX2INFO(19297)
+    to_EUC_JP_E5_A0_offsets,
+    to_EUC_JP_E5_A0_infos,
+
+#define to_EUC_JP_E5_A1_infos WORDINDEX2INFO(19299)
+                INVALID,      o2(0xca,0xbd),
+          o2(0xce,0xdd),              UNDEF,
+     o3(0x8f,0xb8,0xad),      o2(0xb2,0xf4),
+          o2(0xd4,0xca), o3(0x8f,0xb8,0xae),
+     o3(0x8f,0xb8,0xaf), o3(0x8f,0xb8,0xb0),
+     o3(0x8f,0xb8,0xb1),      o2(0xc1,0xba),
+          o2(0xd4,0xcd),      o2(0xc5,0xe3),
+     o3(0x8f,0xb8,0xb2),      o2(0xc5,0xc9),
+          o2(0xc5,0xe4),      o2(0xc8,0xb9),
+          o2(0xc4,0xcd),      o2(0xba,0xc9),
+     o3(0x8f,0xb8,0xb3), o3(0x8f,0xb8,0xb4),
+          o2(0xd4,0xc9), o3(0x8f,0xb8,0xb5),
+     o3(0x8f,0xb8,0xb6), o3(0x8f,0xb8,0xb7),
+          o2(0xb1,0xf6),      o2(0xc5,0xb6),
+          o2(0xd4,0xcb),      o2(0xd4,0xc7),
+          o2(0xbf,0xd0), o3(0x8f,0xb8,0xb8),
+          o2(0xd4,0xcf), o3(0x8f,0xb8,0xb9),
+          o2(0xbd,0xce), o3(0x8f,0xb8,0xba),
+
+#define to_EUC_JP_E5_A1 WORDINDEX2INFO(19335)
+    to_EUC_JP_E5_A1_offsets,
+    to_EUC_JP_E5_A1_infos,
+
+#define to_EUC_JP_E5_A2_infos WORDINDEX2INFO(19337)
+                INVALID, o3(0x8f,0xb8,0xbb),
+     o3(0x8f,0xb8,0xbc),              UNDEF,
+          o2(0xb6,0xad),      o2(0xd4,0xd0),
+     o3(0x8f,0xb8,0xbd), o3(0x8f,0xb8,0xbe),
+     o3(0x8f,0xb8,0xbf), o3(0x8f,0xb8,0xc0),
+     o3(0x8f,0xb8,0xc1), o3(0x8f,0xb8,0xc2),
+     o3(0x8f,0xb8,0xc3), o3(0x8f,0xb8,0xc4),
+          o2(0xca,0xe8), o3(0x8f,0xb8,0xc5),
+     o3(0x8f,0xb8,0xc6),      o2(0xc1,0xfd),
+          o2(0xc4,0xc6), o3(0x8f,0xb8,0xc7),
+          o2(0xd4,0xd2), o3(0x8f,0xb8,0xc8),
+     o3(0x8f,0xb8,0xc9), o3(0x8f,0xb8,0xca),
+     o3(0x8f,0xb8,0xcb),      o2(0xcb,0xcf),
+     o3(0x8f,0xb8,0xcc),      o2(0xd4,0xd3),
+          o2(0xd4,0xd8), o3(0x8f,0xb8,0xcd),
+     o3(0x8f,0xb8,0xce),      o2(0xca,0xaf),
+          o2(0xd4,0xd7),      o2(0xd4,0xd1),
+          o2(0xd4,0xd4),      o2(0xd4,0xd6),
+     o3(0x8f,0xb8,0xd0),      o2(0xba,0xa6),
+
+#define to_EUC_JP_E5_A2 WORDINDEX2INFO(19375)
+    to_EUC_JP_E5_A2_offsets,
+    to_EUC_JP_E5_A2_infos,
+
+#define to_EUC_JP_E5_A3_infos WORDINDEX2INFO(19377)
+                INVALID,              UNDEF,
+          o2(0xca,0xc9), o3(0x8f,0xb8,0xd1),
+     o3(0x8f,0xb8,0xcf),      o2(0xd4,0xd9),
+          o2(0xc3,0xc5), o3(0x8f,0xb8,0xd2),
+          o2(0xb2,0xf5),      o2(0xbe,0xed),
+     o3(0x8f,0xb8,0xd3), o3(0x8f,0xb8,0xd4),
+     o3(0x8f,0xb8,0xd5),      o2(0xd4,0xdb),
+     o3(0x8f,0xb8,0xd6),      o2(0xd4,0xda),
+     o3(0x8f,0xb8,0xd7),      o2(0xb9,0xe8),
+     o3(0x8f,0xb8,0xd8),      o2(0xd4,0xdc),
+          o2(0xd4,0xde),      o2(0xd4,0xdd),
+     o3(0x8f,0xb8,0xd9),      o2(0xd4,0xe0),
+     o3(0x8f,0xb8,0xda),      o2(0xd4,0xd5),
+          o2(0xd4,0xe2), o3(0x8f,0xb8,0xdb),
+     o3(0x8f,0xb8,0xdc),      o2(0xd4,0xe1),
+          o2(0xd4,0xdf), o3(0x8f,0xb8,0xdd),
+          o2(0xbb,0xce),      o2(0xbf,0xd1),
+          o2(0xc1,0xd4),      o2(0xd4,0xe3),
+          o2(0xc0,0xbc),      o2(0xb0,0xed),
+          o2(0xc7,0xe4), o3(0x8f,0xb8,0xde),
+          o2(0xc4,0xdb),      o2(0xd4,0xe5),
+          o2(0xd4,0xe4),      o2(0xd4,0xe6),
+          o2(0xd4,0xe7),      o2(0xd4,0xe8),
+
+#define to_EUC_JP_E5_A3 WORDINDEX2INFO(19423)
+    to_EUC_JP_E5_A3_offsets,
+    to_EUC_JP_E5_A3_infos,
+
+#define to_EUC_JP_E5_A4_infos WORDINDEX2INFO(19425)
+                INVALID,              UNDEF,
+          o2(0xd4,0xe9), o3(0x8f,0xb8,0xdf),
+     o3(0x8f,0xb8,0xe0),      o2(0xca,0xd1),
+          o2(0xd4,0xea), o3(0x8f,0xb8,0xe1),
+     o3(0x8f,0xb8,0xe2),      o2(0xb2,0xc6),
+          o2(0xd4,0xeb), o3(0x8f,0xb8,0xe3),
+     o3(0x8f,0xb8,0xe4), o3(0x8f,0xb8,0xe5),
+          o2(0xcd,0xbc),      o2(0xb3,0xb0),
+          o2(0xd2,0xc9),      o2(0xbd,0xc8),
+          o2(0xc2,0xbf),      o2(0xd4,0xec),
+          o2(0xcc,0xeb), o3(0x8f,0xb8,0xe7),
+     o3(0x8f,0xb8,0xe8),      o2(0xcc,0xb4),
+     o3(0x8f,0xb8,0xe9), o3(0x8f,0xb8,0xea),
+          o2(0xd4,0xee),      o2(0xc2,0xe7),
+     o3(0x8f,0xb8,0xeb),      o2(0xc5,0xb7),
+          o2(0xc2,0xc0),      o2(0xc9,0xd7),
+          o2(0xd4,0xef),      o2(0xd4,0xf0),
+          o2(0xb1,0xfb), o3(0x8f,0xb8,0xec),
+     o3(0x8f,0xb8,0xed),      o2(0xbc,0xba),
+          o2(0xd4,0xf1), o3(0x8f,0xb8,0xee),
+     o3(0x8f,0xb8,0xef), o3(0x8f,0xb8,0xf0),
+          o2(0xb0,0xd0),      o2(0xd4,0xf2),
+          o2(0xd4,0xf3), o3(0x8f,0xb8,0xf1),
+
+#define to_EUC_JP_E5_A4 WORDINDEX2INFO(19471)
+    to_EUC_JP_E5_A4_offsets,
+    to_EUC_JP_E5_A4_infos,
+
+#define to_EUC_JP_E5_A5_infos WORDINDEX2INFO(19473)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb8,0xf2),      o2(0xb1,0xe2),
+     o3(0x8f,0xb8,0xf3),      o2(0xb4,0xf1),
+          o2(0xc6,0xe0),      o2(0xca,0xf4),
+          o2(0xd4,0xf7),      o2(0xc1,0xd5),
+          o2(0xd4,0xf6),      o2(0xb7,0xc0),
+     o3(0x8f,0xb8,0xf4), o3(0x8f,0xb8,0xf5),
+          o2(0xcb,0xdb),      o2(0xd4,0xf5),
+          o2(0xc5,0xe5),      o2(0xd4,0xf9),
+     o3(0x8f,0xb8,0xf6),      o2(0xd4,0xf8),
+     o3(0x8f,0xb8,0xf7), o3(0x8f,0xb8,0xf8),
+     o3(0x8f,0xb8,0xf9), o3(0x8f,0xb8,0xfa),
+          o2(0xd4,0xfb), o3(0x8f,0xb8,0xfb),
+          o2(0xd4,0xfa), o3(0x8f,0xb8,0xfc),
+          o2(0xb1,0xfc),      o2(0xd4,0xfc),
+          o2(0xbe,0xa9),      o2(0xd4,0xfe),
+          o2(0xc3,0xa5), o3(0x8f,0xb8,0xfd),
+          o2(0xd4,0xfd), o3(0x8f,0xb8,0xfe),
+          o2(0xca,0xb3), o3(0x8f,0xb9,0xa1),
+     o3(0x8f,0xb9,0xa2),      o2(0xbd,0xf7),
+          o2(0xc5,0xdb), o3(0x8f,0xb9,0xa3),
+     o3(0x8f,0xb9,0xa4),      o2(0xd5,0xa1),
+     o3(0x8f,0xb9,0xa5), o3(0x8f,0xb9,0xa6),
+     o3(0x8f,0xb9,0xa7),      o2(0xb9,0xa5),
+
+#define to_EUC_JP_E5_A5 WORDINDEX2INFO(19521)
+    to_EUC_JP_E5_A5_offsets,
+    to_EUC_JP_E5_A5_infos,
+
+#define to_EUC_JP_E5_A6_infos WORDINDEX2INFO(19523)
+                INVALID,              UNDEF,
+          o2(0xd5,0xa2),      o2(0xc7,0xa1),
+          o2(0xc8,0xde),      o2(0xcc,0xd1),
+          o2(0xc7,0xa5), o3(0x8f,0xb9,0xa8),
+     o3(0x8f,0xb9,0xa9),      o2(0xd5,0xab),
+     o3(0x8f,0xb9,0xaa), o3(0x8f,0xb9,0xab),
+          o2(0xb5,0xb8), o3(0x8f,0xb9,0xac),
+          o2(0xcd,0xc5), o3(0x8f,0xb9,0xad),
+          o2(0xcc,0xaf),      o2(0xd6,0xac),
+          o2(0xd5,0xa3), o3(0x8f,0xb9,0xae),
+          o2(0xd5,0xa6), o3(0x8f,0xb9,0xaf),
+          o2(0xc2,0xc5), o3(0x8f,0xb9,0xb0),
+          o2(0xcb,0xb8),      o2(0xc5,0xca),
+     o3(0x8f,0xb9,0xb1), o3(0x8f,0xb9,0xb2),
+     o3(0x8f,0xb9,0xb3), o3(0x8f,0xb9,0xb4),
+          o2(0xd5,0xa7), o3(0x8f,0xb9,0xb5),
+     o3(0x8f,0xb9,0xb6),      o2(0xcb,0xe5),
+     o3(0x8f,0xb9,0xb7),      o2(0xba,0xca),
+     o3(0x8f,0xb9,0xb8),      o2(0xbe,0xaa),
+
+#define to_EUC_JP_E5_A6 WORDINDEX2INFO(19561)
+    to_EUC_JP_E5_A6_offsets,
+    to_EUC_JP_E5_A6_infos,
+
+#define to_EUC_JP_E5_A7_infos WORDINDEX2INFO(19563)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb9,0xb9), o3(0x8f,0xb9,0xba),
+     o3(0x8f,0xb9,0xbb),      o2(0xd5,0xa8),
+     o3(0x8f,0xb9,0xbc),      o2(0xbb,0xd0),
+     o3(0x8f,0xb9,0xbd),      o2(0xbb,0xcf),
+     o3(0x8f,0xb9,0xbe),      o2(0xb0,0xb9),
+          o2(0xb8,0xc8), o3(0x8f,0xb9,0xbf),
+          o2(0xc0,0xab),      o2(0xb0,0xd1),
+          o2(0xd5,0xac),      o2(0xd5,0xad),
+          o2(0xd5,0xaa), o3(0x8f,0xb9,0xc0),
+     o3(0x8f,0xb9,0xc1), o3(0x8f,0xb9,0xc2),
+     o3(0x8f,0xb9,0xc3), o3(0x8f,0xb9,0xc4),
+          o2(0xb1,0xb8),      o2(0xb4,0xaf),
+     o3(0x8f,0xb9,0xc5),      o2(0xd5,0xa9),
+          o2(0xcc,0xc5),      o2(0xc9,0xb1),
+     o3(0x8f,0xb9,0xc6), o3(0x8f,0xb9,0xc7),
+     o3(0x8f,0xb9,0xc8), o3(0x8f,0xb9,0xc9),
+     o3(0x8f,0xb9,0xca),      o2(0xb0,0xa8),
+     o3(0x8f,0xb9,0xcb),      o2(0xb0,0xf9),
+          o2(0xbb,0xd1),
+
+#define to_EUC_JP_E5_A7 WORDINDEX2INFO(19602)
+    to_EUC_JP_E5_A7_offsets,
+    to_EUC_JP_E5_A7_infos,
+
+#define to_EUC_JP_E5_A8_infos WORDINDEX2INFO(19604)
+                INVALID, o3(0x8f,0xb9,0xcc),
+          o2(0xb0,0xd2),              UNDEF,
+          o2(0xb0,0xa3), o3(0x8f,0xb9,0xcd),
+          o2(0xd5,0xb2), o3(0x8f,0xb9,0xce),
+     o3(0x8f,0xb9,0xcf), o3(0x8f,0xb9,0xd0),
+          o2(0xd5,0xb0), o3(0x8f,0xb9,0xd1),
+     o3(0x8f,0xb9,0xd2),      o2(0xcc,0xbc),
+          o2(0xd5,0xb3),      o2(0xd5,0xb1),
+     o3(0x8f,0xb9,0xd3),      o2(0xd5,0xaf),
+          o2(0xbf,0xb1), o3(0x8f,0xb9,0xd4),
+     o3(0x8f,0xb9,0xd5),      o2(0xd5,0xae),
+     o3(0x8f,0xb9,0xd6), o3(0x8f,0xb9,0xd7),
+          o2(0xca,0xda), o3(0x8f,0xb9,0xd8),
+     o3(0x8f,0xb9,0xd9),      o2(0xb8,0xe4),
+     o3(0x8f,0xb9,0xda),      o2(0xd5,0xb7),
+          o2(0xd5,0xb8),      o2(0xbe,0xab),
+
+#define to_EUC_JP_E5_A8 WORDINDEX2INFO(19636)
+    to_EUC_JP_E5_A8_offsets,
+    to_EUC_JP_E5_A8_infos,
+
+#define to_EUC_JP_E5_A9_infos WORDINDEX2INFO(19638)
+                INVALID,      o2(0xd5,0xb4),
+          o2(0xcf,0xac),              UNDEF,
+     o3(0x8f,0xb9,0xdb), o3(0x8f,0xb9,0xdc),
+          o2(0xc7,0xcc), o3(0x8f,0xb9,0xdd),
+     o3(0x8f,0xb9,0xde),      o2(0xd5,0xb6),
+     o3(0x8f,0xb9,0xdf), o3(0x8f,0xb9,0xe0),
+     o3(0x8f,0xb9,0xe1),      o2(0xba,0xa7),
+     o3(0x8f,0xb9,0xe2),      o2(0xd5,0xb9),
+     o3(0x8f,0xb9,0xe3), o3(0x8f,0xb9,0xe4),
+          o2(0xc9,0xd8), o3(0x8f,0xb9,0xe5),
+          o2(0xd5,0xba),      o2(0xd5,0xb5),
+     o3(0x8f,0xb9,0xe6), o3(0x8f,0xb9,0xe7),
+     o3(0x8f,0xb9,0xe8), o3(0x8f,0xb9,0xe9),
+     o3(0x8f,0xb9,0xea),      o2(0xcc,0xbb),
+
+#define to_EUC_JP_E5_A9 WORDINDEX2INFO(19666)
+    to_EUC_JP_E5_A9_offsets,
+    to_EUC_JP_E5_A9_infos,
+
+#define to_EUC_JP_E5_AA_infos WORDINDEX2INFO(19668)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb9,0xeb), o3(0x8f,0xb9,0xec),
+          o2(0xc7,0xde), o3(0x8f,0xb9,0xed),
+     o3(0x8f,0xb9,0xee), o3(0x8f,0xb9,0xef),
+          o2(0xd5,0xbb),      o2(0xc9,0xb2),
+     o3(0x8f,0xb9,0xf0), o3(0x8f,0xb9,0xf1),
+     o3(0x8f,0xb9,0xf2), o3(0x8f,0xb9,0xf3),
+     o3(0x8f,0xb9,0xf4), o3(0x8f,0xb9,0xf5),
+     o3(0x8f,0xb9,0xf6), o3(0x8f,0xb9,0xf7),
+     o3(0x8f,0xb9,0xf8), o3(0x8f,0xb9,0xf9),
+     o3(0x8f,0xb9,0xfa), o3(0x8f,0xb9,0xfb),
+     o3(0x8f,0xb9,0xfc), o3(0x8f,0xb9,0xfd),
+          o2(0xd5,0xbc),      o2(0xd5,0xc0),
+          o2(0xd5,0xbd), o3(0x8f,0xb9,0xfe),
+
+#define to_EUC_JP_E5_AA WORDINDEX2INFO(19696)
+    to_EUC_JP_E5_AA_offsets,
+    to_EUC_JP_E5_AA_infos,
+
+#define to_EUC_JP_E5_AB_infos WORDINDEX2INFO(19698)
+                INVALID,              UNDEF,
+          o2(0xb2,0xc7),      o2(0xd5,0xbf),
+     o3(0x8f,0xba,0xa1), o3(0x8f,0xba,0xa2),
+     o3(0x8f,0xba,0xa3),      o2(0xbc,0xbb),
+          o2(0xd5,0xbe),      o2(0xb7,0xf9),
+     o3(0x8f,0xba,0xa4),      o2(0xd5,0xcc),
+          o2(0xd5,0xc5),      o2(0xd5,0xc2),
+     o3(0x8f,0xba,0xa5), o3(0x8f,0xba,0xa6),
+     o3(0x8f,0xba,0xa7),      o2(0xc3,0xe4),
+          o2(0xd5,0xc1), o3(0x8f,0xba,0xa8),
+          o2(0xd5,0xc3),      o2(0xd5,0xc4),
+     o3(0x8f,0xba,0xa9), o3(0x8f,0xba,0xaa),
+     o3(0x8f,0xba,0xab), o3(0x8f,0xba,0xac),
+          o2(0xd5,0xc6),      o2(0xd5,0xc7),
+     o3(0x8f,0xba,0xad),
+
+#define to_EUC_JP_E5_AB WORDINDEX2INFO(19727)
+    to_EUC_JP_E5_AB_offsets,
+    to_EUC_JP_E5_AB_infos,
+
+#define to_EUC_JP_E5_AC_infos WORDINDEX2INFO(19729)
+                INVALID, o3(0x8f,0xba,0xae),
+     o3(0x8f,0xba,0xaf),              UNDEF,
+     o3(0x8f,0xba,0xb0),      o2(0xb4,0xf2),
+          o2(0xd5,0xc9),      o2(0xd5,0xc8),
+          o2(0xd5,0xca), o3(0x8f,0xba,0xb1),
+     o3(0x8f,0xba,0xb3), o3(0x8f,0xba,0xb4),
+     o3(0x8f,0xba,0xb5), o3(0x8f,0xba,0xb6),
+          o2(0xbe,0xee), o3(0x8f,0xba,0xb7),
+          o2(0xd5,0xcd),      o2(0xc4,0xdc),
+     o3(0x8f,0xba,0xb8),      o2(0xb1,0xc5),
+          o2(0xd5,0xcb), o3(0x8f,0xba,0xb2),
+          o2(0xd5,0xce), o3(0x8f,0xba,0xb9),
+          o2(0xd5,0xcf),
+
+#define to_EUC_JP_E5_AC WORDINDEX2INFO(19754)
+    to_EUC_JP_E5_AC_offsets,
+    to_EUC_JP_E5_AC_infos,
+
+#define to_EUC_JP_E5_AD_infos WORDINDEX2INFO(19756)
+                INVALID,      o2(0xd5,0xd2),
+     o3(0x8f,0xba,0xba),              UNDEF,
+          o2(0xd5,0xd0),      o2(0xd5,0xd1),
+     o3(0x8f,0xba,0xbb), o3(0x8f,0xba,0xbc),
+          o2(0xbb,0xd2),      o2(0xd5,0xd3),
+     o3(0x8f,0xba,0xbd),      o2(0xb9,0xa6),
+          o2(0xd5,0xd4), o3(0x8f,0xba,0xbe),
+          o2(0xbb,0xfa),      o2(0xc2,0xb8),
+          o2(0xd5,0xd5),      o2(0xd5,0xd6),
+          o2(0xbb,0xda),      o2(0xb9,0xa7),
+     o3(0x8f,0xba,0xbf),      o2(0xcc,0xd2),
+          o2(0xb5,0xa8),      o2(0xb8,0xc9),
+          o2(0xd5,0xd7),      o2(0xb3,0xd8),
+     o3(0x8f,0xba,0xc0),      o2(0xd5,0xd8),
+          o2(0xc2,0xb9), o3(0x8f,0xba,0xc1),
+     o3(0x8f,0xba,0xc2),      o2(0xd5,0xd9),
+          o2(0xd6,0xa3),      o2(0xd5,0xda),
+          o2(0xd5,0xdb),      o2(0xd5,0xdc),
+          o2(0xd5,0xde), o3(0x8f,0xba,0xc3),
+     o3(0x8f,0xba,0xc4), o3(0x8f,0xba,0xc5),
+     o3(0x8f,0xba,0xc6),
+
+#define to_EUC_JP_E5_AD WORDINDEX2INFO(19797)
+    to_EUC_JP_E5_AD_offsets,
+    to_EUC_JP_E5_AD_infos,
+
+#define to_EUC_JP_E5_AE_infos WORDINDEX2INFO(19799)
+                INVALID,      o2(0xd5,0xdf),
+     o3(0x8f,0xba,0xc7),              UNDEF,
+          o2(0xd5,0xe0), o3(0x8f,0xba,0xc8),
+          o2(0xc2,0xf0), o3(0x8f,0xba,0xc9),
+          o2(0xb1,0xa7),      o2(0xbc,0xe9),
+          o2(0xb0,0xc2), o3(0x8f,0xba,0xca),
+          o2(0xc1,0xd7),      o2(0xb4,0xb0),
+          o2(0xbc,0xb5), o3(0x8f,0xba,0xcb),
+          o2(0xb9,0xa8), o3(0x8f,0xba,0xcc),
+     o3(0x8f,0xba,0xcd), o3(0x8f,0xba,0xce),
+     o3(0x8f,0xba,0xcf),      o2(0xc5,0xe6),
+     o3(0x8f,0xba,0xd0),      o2(0xbd,0xa1),
+          o2(0xb4,0xb1),      o2(0xc3,0xe8),
+          o2(0xc4,0xea),      o2(0xb0,0xb8),
+          o2(0xb5,0xb9),      o2(0xca,0xf5),
+          o2(0xbc,0xc2),      o2(0xb5,0xd2),
+          o2(0xc0,0xeb),      o2(0xbc,0xbc),
+          o2(0xcd,0xa8),      o2(0xd5,0xe1),
+     o3(0x8f,0xba,0xd1), o3(0x8f,0xba,0xd2),
+     o3(0x8f,0xba,0xd3), o3(0x8f,0xba,0xd4),
+          o2(0xb5,0xdc), o3(0x8f,0xba,0xd5),
+          o2(0xba,0xcb), o3(0x8f,0xba,0xd6),
+     o3(0x8f,0xba,0xd7),      o2(0xb3,0xb2),
+          o2(0xb1,0xe3),      o2(0xbe,0xac),
+          o2(0xb2,0xc8), o3(0x8f,0xba,0xd8),
+          o2(0xd5,0xe2),      o2(0xcd,0xc6),
+     o3(0x8f,0xba,0xd9), o3(0x8f,0xba,0xda),
+          o2(0xbd,0xc9),
+
+#define to_EUC_JP_E5_AE WORDINDEX2INFO(19854)
+    to_EUC_JP_E5_AE_offsets,
+    to_EUC_JP_E5_AE_infos,
+
+#define to_EUC_JP_E5_AF_infos WORDINDEX2INFO(19856)
+                INVALID, o3(0x8f,0xba,0xdb),
+     o3(0x8f,0xba,0xdc),      o2(0xbc,0xe4),
+          o2(0xd5,0xe3),      o2(0xb4,0xf3),
+          o2(0xc6,0xd2),      o2(0xcc,0xa9),
+          o2(0xd5,0xe4),              UNDEF,
+          o2(0xd5,0xe5),      o2(0xc9,0xd9),
+     o3(0x8f,0xba,0xdd), o3(0x8f,0xba,0xde),
+          o2(0xd5,0xe7),      o2(0xb4,0xa8),
+          o2(0xb6,0xf7),      o2(0xd5,0xe6),
+     o3(0x8f,0xba,0xdf), o3(0x8f,0xba,0xe0),
+     o3(0x8f,0xba,0xe1), o3(0x8f,0xba,0xe2),
+     o3(0x8f,0xba,0xe3),      o2(0xb4,0xb2),
+          o2(0xbf,0xb2),      o2(0xd5,0xeb),
+          o2(0xbb,0xa1), o3(0x8f,0xba,0xe4),
+          o2(0xb2,0xc9),      o2(0xd5,0xea),
+          o2(0xd5,0xe8),      o2(0xd5,0xec),
+          o2(0xd5,0xe9),      o2(0xc7,0xab),
+          o2(0xdc,0xcd),      o2(0xbf,0xb3),
+          o2(0xd5,0xed),      o2(0xce,0xc0),
+     o3(0x8f,0xba,0xe5),      o2(0xd5,0xee),
+     o3(0x8f,0xba,0xe6),      o2(0xd5,0xf0),
+     o3(0x8f,0xba,0xe7),      o2(0xc3,0xfe),
+          o2(0xd5,0xef),      o2(0xc0,0xa3),
+          o2(0xbb,0xfb), o3(0x8f,0xba,0xe8),
+          o2(0xc2,0xd0),      o2(0xbc,0xf7),
+
+#define to_EUC_JP_E5_AF WORDINDEX2INFO(19906)
+    to_EUC_JP_E5_AF_offsets,
+    to_EUC_JP_E5_AF_infos,
+
+#define to_EUC_JP_E5_B0_infos WORDINDEX2INFO(19908)
+                INVALID,              UNDEF,
+          o2(0xc9,0xf5),      o2(0xc0,0xec),
+          o2(0xbc,0xcd),      o2(0xd5,0xf1),
+          o2(0xbe,0xad),      o2(0xd5,0xf2),
+          o2(0xd5,0xf3),      o2(0xb0,0xd3),
+          o2(0xc2,0xba),      o2(0xbf,0xd2),
+     o3(0x8f,0xba,0xe9),      o2(0xd5,0xf4),
+          o2(0xc6,0xb3),      o2(0xbe,0xae),
+          o2(0xbe,0xaf),      o2(0xd5,0xf5),
+          o2(0xc0,0xed), o3(0x8f,0xba,0xea),
+          o2(0xbe,0xb0), o3(0x8f,0xba,0xeb),
+     o3(0x8f,0xba,0xec),      o2(0xd5,0xf6),
+          o2(0xd5,0xf7), o3(0x8f,0xba,0xed),
+          o2(0xcc,0xe0), o3(0x8f,0xba,0xee),
+          o2(0xd5,0xf8), o3(0x8f,0xba,0xef),
+     o3(0x8f,0xba,0xf0), o3(0x8f,0xba,0xf1),
+          o2(0xb6,0xc6), o3(0x8f,0xba,0xf2),
+     o3(0x8f,0xba,0xf3),      o2(0xbd,0xa2),
+     o3(0x8f,0xba,0xf4), o3(0x8f,0xba,0xf5),
+     o3(0x8f,0xba,0xf6),      o2(0xd5,0xf9),
+          o2(0xd5,0xfa),      o2(0xbc,0xdc),
+          o2(0xbf,0xac),      o2(0xc6,0xf4),
+          o2(0xbf,0xd4),      o2(0xc8,0xf8),
+          o2(0xc7,0xa2),
+
+#define to_EUC_JP_E5_B0 WORDINDEX2INFO(19955)
+    to_EUC_JP_E5_B0_offsets,
+    to_EUC_JP_E5_B0_infos,
+
+#define to_EUC_JP_E5_B1_infos WORDINDEX2INFO(19957)
+                INVALID,      o2(0xb6,0xc9),
+          o2(0xd5,0xfb),              UNDEF,
+          o2(0xb5,0xef),      o2(0xd5,0xfc),
+          o2(0xb6,0xfe),      o2(0xc6,0xcf),
+          o2(0xb2,0xb0),      o2(0xbb,0xd3),
+          o2(0xd5,0xfd),      o2(0xd6,0xa2),
+          o2(0xd6,0xa1),      o2(0xb6,0xfd),
+          o2(0xd5,0xfe),      o2(0xc5,0xb8),
+     o3(0x8f,0xba,0xf7), o3(0x8f,0xba,0xf8),
+     o3(0x8f,0xba,0xf9),      o2(0xc2,0xb0),
+          o2(0xc5,0xcb),      o2(0xbc,0xc8),
+     o3(0x8f,0xba,0xfa), o3(0x8f,0xba,0xfb),
+          o2(0xc1,0xd8),      o2(0xcd,0xfa),
+     o3(0x8f,0xba,0xfc), o3(0x8f,0xba,0xfd),
+     o3(0x8f,0xba,0xfe),      o2(0xd6,0xa4),
+     o3(0x8f,0xbb,0xa1),      o2(0xd6,0xa5),
+          o2(0xc6,0xd6), o3(0x8f,0xbb,0xa2),
+          o2(0xbb,0xb3), o3(0x8f,0xbb,0xa3),
+     o3(0x8f,0xbb,0xa4),      o2(0xd6,0xa7),
+          o2(0xd6,0xa8), o3(0x8f,0xbb,0xa5),
+     o3(0x8f,0xbb,0xa6), o3(0x8f,0xbb,0xa7),
+     o3(0x8f,0xbb,0xa8),
+
+#define to_EUC_JP_E5_B1 WORDINDEX2INFO(20000)
+    to_EUC_JP_E5_B1_offsets,
+    to_EUC_JP_E5_B1_infos,
+
+#define to_EUC_JP_E5_B2_infos WORDINDEX2INFO(20002)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xa9), o3(0x8f,0xbb,0xaa),
+     o3(0x8f,0xbb,0xab),      o2(0xd6,0xa9),
+     o3(0x8f,0xbb,0xac),      o2(0xb4,0xf4),
+          o2(0xd6,0xaa), o3(0x8f,0xbb,0xad),
+          o2(0xd6,0xab), o3(0x8f,0xbb,0xae),
+     o3(0x8f,0xbb,0xaf), o3(0x8f,0xbb,0xb0),
+          o2(0xb2,0xac), o3(0x8f,0xbb,0xb1),
+     o3(0x8f,0xbb,0xb2), o3(0x8f,0xbb,0xb3),
+          o2(0xc1,0xbb),      o2(0xb4,0xe4),
+     o3(0x8f,0xbb,0xb4),      o2(0xd6,0xad),
+          o2(0xcc,0xa8),      o2(0xc2,0xd2),
+     o3(0x8f,0xbb,0xb5),      o2(0xb3,0xd9),
+     o3(0x8f,0xbb,0xb6), o3(0x8f,0xbb,0xb7),
+          o2(0xd6,0xaf),      o2(0xd6,0xb1),
+          o2(0xb4,0xdf), o3(0x8f,0xbb,0xb8),
+          o2(0xd6,0xae),      o2(0xd6,0xb0),
+          o2(0xd6,0xb3),
+
+#define to_EUC_JP_E5_B2 WORDINDEX2INFO(20037)
+    to_EUC_JP_E5_B2_offsets,
+    to_EUC_JP_E5_B2_infos,
+
+#define to_EUC_JP_E5_B3_infos WORDINDEX2INFO(20039)
+                INVALID,              UNDEF,
+          o2(0xd6,0xb2),      o2(0xd6,0xb4),
+     o3(0x8f,0xbb,0xb9), o3(0x8f,0xbb,0xba),
+     o3(0x8f,0xbb,0xbb), o3(0x8f,0xbb,0xbd),
+          o2(0xd6,0xb5), o3(0x8f,0xbb,0xbc),
+          o2(0xc6,0xbd),      o2(0xb6,0xae),
+          o2(0xb2,0xe5),      o2(0xd6,0xb6),
+          o2(0xd6,0xbb),      o2(0xd6,0xb9),
+     o3(0x8f,0xbb,0xbe),      o2(0xca,0xf7),
+          o2(0xca,0xf6), o3(0x8f,0xbb,0xbf),
+     o3(0x8f,0xbb,0xc0), o3(0x8f,0xbb,0xc1),
+          o2(0xc5,0xe7),      o2(0xd6,0xb8),
+          o2(0xbd,0xd4),      o2(0xd6,0xb7),
+
+#define to_EUC_JP_E5_B3 WORDINDEX2INFO(20065)
+    to_EUC_JP_E5_B3_offsets,
+    to_EUC_JP_E5_B3_infos,
+
+#define to_EUC_JP_E5_B4_infos WORDINDEX2INFO(20067)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xc2), o3(0x8f,0xbb,0xc3),
+          o2(0xbf,0xf2),      o2(0xd6,0xbc),
+     o3(0x8f,0xbb,0xc4),      o2(0xba,0xea),
+          o2(0xd6,0xc2), o3(0x8f,0xbb,0xc5),
+          o2(0xd6,0xc3),      o2(0xd6,0xbd),
+          o2(0xb3,0xb3),      o2(0xd6,0xbe),
+          o2(0xd6,0xc7),      o2(0xd6,0xc6),
+          o2(0xd6,0xc5),      o2(0xd6,0xc1),
+          o2(0xd6,0xc0),      o2(0xd6,0xc4),
+     o3(0x8f,0xbb,0xc7), o3(0x8f,0xbb,0xc8),
+     o3(0x8f,0xbb,0xc9), o3(0x8f,0xbb,0xca),
+          o2(0xca,0xf8), o3(0x8f,0xbb,0xc6),
+     o3(0x8f,0xbb,0xcb), o3(0x8f,0xbb,0xcc),
+     o3(0x8f,0xbb,0xcd), o3(0x8f,0xbb,0xce),
+     o3(0x8f,0xbb,0xcf),
+
+#define to_EUC_JP_E5_B4 WORDINDEX2INFO(20098)
+    to_EUC_JP_E5_B4_offsets,
+    to_EUC_JP_E5_B4_infos,
+
+#define to_EUC_JP_E5_B5_infos WORDINDEX2INFO(20100)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xd0), o3(0x8f,0xbb,0xd1),
+     o3(0x8f,0xbb,0xd2), o3(0x8f,0xbb,0xd3),
+     o3(0x8f,0xbb,0xd7),      o2(0xd6,0xcb),
+          o2(0xd6,0xc8),      o2(0xd6,0xca),
+          o2(0xcd,0xf2), o3(0x8f,0xbb,0xd5),
+          o2(0xd6,0xc9), o3(0x8f,0xbb,0xd4),
+     o3(0x8f,0xbb,0xd6),      o2(0xd6,0xbf),
+     o3(0x8f,0xbb,0xd8), o3(0x8f,0xbb,0xd9),
+     o3(0x8f,0xbb,0xda), o3(0x8f,0xbb,0xdb),
+     o3(0x8f,0xbb,0xdc),      o2(0xbf,0xf3),
+     o3(0x8f,0xbb,0xdd),      o2(0xd6,0xcc),
+     o3(0x8f,0xbb,0xde),      o2(0xba,0xb7),
+     o3(0x8f,0xbb,0xdf),      o2(0xd6,0xcd),
+          o2(0xd6,0xce), o3(0x8f,0xbb,0xe0),
+     o3(0x8f,0xbb,0xe1), o3(0x8f,0xbb,0xe2),
+     o3(0x8f,0xbb,0xe3),
+
+#define to_EUC_JP_E5_B5 WORDINDEX2INFO(20133)
+    to_EUC_JP_E5_B5_offsets,
+    to_EUC_JP_E5_B5_infos,
+
+#define to_EUC_JP_E5_B6_infos WORDINDEX2INFO(20135)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xe4),      o2(0xd6,0xd1),
+     o3(0x8f,0xbb,0xe5),      o2(0xd6,0xd0),
+          o2(0xd6,0xcf), o3(0x8f,0xbb,0xe6),
+     o3(0x8f,0xbb,0xe7),      o2(0xc5,0xe8),
+          o2(0xd6,0xba),      o2(0xd6,0xd7),
+     o3(0x8f,0xbb,0xe8), o3(0x8f,0xbb,0xe9),
+     o3(0x8f,0xbb,0xea), o3(0x8f,0xbb,0xeb),
+     o3(0x8f,0xbb,0xec), o3(0x8f,0xbb,0xed),
+          o2(0xd6,0xd3), o3(0x8f,0xbb,0xee),
+     o3(0x8f,0xbb,0xef),      o2(0xd6,0xd2),
+     o3(0x8f,0xbb,0xf0), o3(0x8f,0xbb,0xf1),
+          o2(0xd6,0xd4),      o2(0xd6,0xd5),
+     o3(0x8f,0xbb,0xf2), o3(0x8f,0xe6,0xf4),
+     o3(0x8f,0xbb,0xf3),      o2(0xd6,0xd8),
+     o3(0x8f,0xbb,0xf4), o3(0x8f,0xbb,0xf5),
+          o2(0xce,0xe6),      o2(0xd6,0xd9),
+          o2(0xd6,0xd6),
+
+#define to_EUC_JP_E5_B6 WORDINDEX2INFO(20170)
+    to_EUC_JP_E5_B6_offsets,
+    to_EUC_JP_E5_B6_infos,
+
+#define to_EUC_JP_E5_B7_infos WORDINDEX2INFO(20172)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xf6), o3(0x8f,0xbb,0xf7),
+          o2(0xd6,0xda), o3(0x8f,0xbb,0xf8),
+          o2(0xb4,0xe0),      o2(0xd6,0xdb),
+     o3(0x8f,0xbb,0xfa), o3(0x8f,0xbb,0xf9),
+          o2(0xd6,0xdd),      o2(0xd6,0xdc),
+          o2(0xd6,0xde), o3(0x8f,0xbb,0xfb),
+     o3(0x8f,0xbb,0xfc),      o2(0xd6,0xdf),
+          o2(0xc0,0xee),      o2(0xbd,0xa3),
+     o3(0x8f,0xbb,0xfd),      o2(0xbd,0xe4),
+          o2(0xc1,0xe3), o3(0x8f,0xbb,0xfe),
+          o2(0xb9,0xa9),      o2(0xba,0xb8),
+          o2(0xb9,0xaa),      o2(0xb5,0xf0),
+     o3(0x8f,0xbc,0xa1),      o2(0xd6,0xe0),
+          o2(0xba,0xb9),      o2(0xb8,0xca),
+          o2(0xd6,0xe1),      o2(0xcc,0xa6),
+          o2(0xc7,0xc3),      o2(0xd6,0xe2),
+          o2(0xb9,0xab), o3(0x8f,0xbc,0xa2),
+     o3(0x8f,0xbc,0xa3),      o2(0xb4,0xac),
+          o2(0xc3,0xa7),      o2(0xb6,0xd2),
+
+#define to_EUC_JP_E5_B7 WORDINDEX2INFO(20212)
+    to_EUC_JP_E5_B7_offsets,
+    to_EUC_JP_E5_B7_infos,
+
+#define to_EUC_JP_E5_B8_infos WORDINDEX2INFO(20214)
+                INVALID, o3(0x8f,0xbc,0xa4),
+                  UNDEF,      o2(0xbb,0xd4),
+          o2(0xc9,0xdb),      o2(0xc8,0xc1),
+     o3(0x8f,0xbc,0xa5),      o2(0xd6,0xe3),
+          o2(0xb4,0xf5), o3(0x8f,0xbc,0xa6),
+          o2(0xd6,0xe6), o3(0x8f,0xbc,0xa7),
+     o3(0x8f,0xbc,0xa8), o3(0x8f,0xbc,0xa9),
+          o2(0xc4,0xa1), o3(0x8f,0xbc,0xaa),
+          o2(0xd6,0xe5),      o2(0xd6,0xe4),
+          o2(0xd6,0xe7),      o2(0xc4,0xeb),
+     o3(0x8f,0xbc,0xab), o3(0x8f,0xbc,0xac),
+          o2(0xbf,0xe3), o3(0x8f,0xbc,0xae),
+          o2(0xbb,0xd5),      o2(0xc0,0xca),
+     o3(0x8f,0xbc,0xad),      o2(0xc2,0xd3),
+          o2(0xb5,0xa2), o3(0x8f,0xbc,0xaf),
+          o2(0xc4,0xa2), o3(0x8f,0xbc,0xb0),
+          o2(0xd6,0xe8),      o2(0xd6,0xe9),
+          o2(0xbe,0xef),      o2(0xcb,0xb9),
+     o3(0x8f,0xbc,0xb1),
+
+#define to_EUC_JP_E5_B8 WORDINDEX2INFO(20251)
+    to_EUC_JP_E5_B8_offsets,
+    to_EUC_JP_E5_B8_infos,
+
+#define to_EUC_JP_E5_B9_infos WORDINDEX2INFO(20253)
+                INVALID,      o2(0xd6,0xec),
+                  UNDEF,      o2(0xd6,0xeb),
+          o2(0xd6,0xea),      o2(0xc9,0xfd),
+          o2(0xd6,0xf3), o3(0x8f,0xbc,0xb4),
+     o3(0x8f,0xbc,0xb2),      o2(0xcb,0xda),
+          o2(0xd6,0xed), o3(0x8f,0xbc,0xb3),
+     o3(0x8f,0xbc,0xb5),      o2(0xd6,0xef),
+          o2(0xcb,0xeb), o3(0x8f,0xbc,0xb6),
+          o2(0xd6,0xee), o3(0x8f,0xbc,0xb7),
+     o3(0x8f,0xbc,0xb8), o3(0x8f,0xbc,0xb9),
+     o3(0x8f,0xbc,0xba),      o2(0xd6,0xf0),
+          o2(0xc8,0xa8),      o2(0xd6,0xf1),
+          o2(0xca,0xbe),      o2(0xd6,0xf2),
+     o3(0x8f,0xbc,0xbb), o3(0x8f,0xbc,0xbc),
+     o3(0x8f,0xbc,0xbd), o3(0x8f,0xbc,0xbe),
+     o3(0x8f,0xbc,0xbf), o3(0x8f,0xbc,0xc0),
+     o3(0x8f,0xbc,0xc1),      o2(0xb4,0xb3),
+          o2(0xca,0xbf),      o2(0xc7,0xaf),
+          o2(0xd6,0xf4),      o2(0xd6,0xf5),
+          o2(0xb9,0xac),      o2(0xb4,0xb4),
+          o2(0xd6,0xf6),      o2(0xb8,0xb8),
+          o2(0xcd,0xc4),      o2(0xcd,0xa9),
+          o2(0xb4,0xf6),      o2(0xd6,0xf8),
+
+#define to_EUC_JP_E5_B9 WORDINDEX2INFO(20299)
+    to_EUC_JP_E5_B9_offsets,
+    to_EUC_JP_E5_B9_infos,
+
+#define to_EUC_JP_E5_BA_infos WORDINDEX2INFO(20301)
+                INVALID, o3(0x8f,0xbc,0xc2),
+          o2(0xc4,0xa3),              UNDEF,
+          o2(0xb9,0xad),      o2(0xbe,0xb1),
+          o2(0xc8,0xdf),      o2(0xbe,0xb2),
+     o3(0x8f,0xbc,0xc3), o3(0x8f,0xbc,0xc4),
+          o2(0xbd,0xf8),      o2(0xc4,0xec),
+          o2(0xca,0xf9),      o2(0xc5,0xb9),
+          o2(0xb9,0xae),      o2(0xc9,0xdc),
+          o2(0xd6,0xf9), o3(0x8f,0xbc,0xc5),
+     o3(0x8f,0xbc,0xc6), o3(0x8f,0xbc,0xc7),
+          o2(0xc5,0xd9),      o2(0xba,0xc2),
+     o3(0x8f,0xbc,0xc8), o3(0x8f,0xbc,0xc9),
+          o2(0xb8,0xcb), o3(0x8f,0xbc,0xca),
+          o2(0xc4,0xed), o3(0x8f,0xbc,0xcb),
+     o3(0x8f,0xbc,0xcc),      o2(0xb0,0xc3),
+          o2(0xbd,0xee),      o2(0xb9,0xaf),
+          o2(0xcd,0xc7), o3(0x8f,0xbc,0xcd),
+     o3(0x8f,0xbc,0xce), o3(0x8f,0xbc,0xcf),
+
+#define to_EUC_JP_E5_BA WORDINDEX2INFO(20337)
+    to_EUC_JP_E5_BA_offsets,
+    to_EUC_JP_E5_BA_infos,
+
+#define to_EUC_JP_E5_BB_infos WORDINDEX2INFO(20339)
+                INVALID,              UNDEF,
+          o2(0xd6,0xfa),      o2(0xd6,0xfb),
+          o2(0xc7,0xd1), o3(0x8f,0xbc,0xd0),
+          o2(0xd6,0xfc),      o2(0xce,0xf7),
+          o2(0xcf,0xad), o3(0x8f,0xbc,0xd2),
+     o3(0x8f,0xbc,0xd1), o3(0x8f,0xbc,0xd3),
+          o2(0xd6,0xfe),      o2(0xd6,0xfd),
+     o3(0x8f,0xbc,0xd4), o3(0x8f,0xbc,0xd5),
+          o2(0xb3,0xc7), o3(0x8f,0xbc,0xd6),
+     o3(0x8f,0xbc,0xd7),      o2(0xd7,0xa1),
+          o2(0xd7,0xa4),      o2(0xd7,0xa5),
+     o3(0x8f,0xbc,0xd8),      o2(0xd7,0xa3),
+     o3(0x8f,0xbc,0xd9),      o2(0xc9,0xc0),
+          o2(0xbe,0xb3),      o2(0xd7,0xa7),
+          o2(0xd7,0xa6),      o2(0xd7,0xa2),
+     o3(0x8f,0xbc,0xda),      o2(0xd7,0xa8),
+          o2(0xd7,0xa9), o3(0x8f,0xbc,0xdb),
+          o2(0xd7,0xaa),      o2(0xd7,0xad),
+          o2(0xd7,0xab),      o2(0xd7,0xac),
+          o2(0xd7,0xae),      o2(0xb1,0xe4),
+          o2(0xc4,0xee),      o2(0xd7,0xaf),
+          o2(0xb7,0xfa),      o2(0xb2,0xf6),
+          o2(0xc7,0xb6),      o2(0xd7,0xb0),
+          o2(0xc6,0xfb),
+
+#define to_EUC_JP_E5_BB WORDINDEX2INFO(20386)
+    to_EUC_JP_E5_BB_offsets,
+    to_EUC_JP_E5_BB_infos,
+
+#define to_EUC_JP_E5_BC_infos WORDINDEX2INFO(20388)
+                INVALID,              UNDEF,
+          o2(0xca,0xdb), o3(0x8f,0xbc,0xdc),
+          o2(0xd7,0xb1),      o2(0xcf,0xae),
+     o3(0x8f,0xbc,0xdd), o3(0x8f,0xbc,0xde),
+     o3(0x8f,0xbc,0xdf),      o2(0xd7,0xb2),
+          o2(0xca,0xc0),      o2(0xd7,0xb5),
+          o2(0xd0,0xa1),      o2(0xd0,0xb1),
+     o3(0x8f,0xbc,0xe0),      o2(0xbc,0xb0),
+          o2(0xc6,0xf5),      o2(0xd7,0xb6),
+          o2(0xb5,0xdd),      o2(0xc4,0xa4),
+          o2(0xb0,0xfa),      o2(0xd7,0xb7),
+          o2(0xca,0xa6),      o2(0xb9,0xb0),
+     o3(0x8f,0xbc,0xe1),      o2(0xc3,0xd0),
+     o3(0x8f,0xbc,0xe2), o3(0x8f,0xbc,0xe3),
+          o2(0xc4,0xef), o3(0x8f,0xbc,0xe4),
+     o3(0x8f,0xbc,0xe5), o3(0x8f,0xbc,0xe6),
+     o3(0x8f,0xbc,0xe7),      o2(0xcc,0xef),
+          o2(0xb8,0xb9),      o2(0xb8,0xcc),
+     o3(0x8f,0xbc,0xe8),      o2(0xd7,0xb8),
+     o3(0x8f,0xbc,0xe9), o3(0x8f,0xbc,0xea),
+          o2(0xd7,0xb9), o3(0x8f,0xbc,0xeb),
+          o2(0xd7,0xbf), o3(0x8f,0xbc,0xec),
+          o2(0xbc,0xe5), o3(0x8f,0xbc,0xed),
+          o2(0xc4,0xa5), o3(0x8f,0xbc,0xee),
+          o2(0xb6,0xaf),      o2(0xd7,0xba),
+     o3(0x8f,0xbc,0xef),      o2(0xc9,0xab),
+     o3(0x8f,0xbc,0xf0),      o2(0xc3,0xc6),
+     o3(0x8f,0xbc,0xf1),
+
+#define to_EUC_JP_E5_BC WORDINDEX2INFO(20443)
+    to_EUC_JP_E5_BC_offsets,
+    to_EUC_JP_E5_BC_infos,
+
+#define to_EUC_JP_E5_BD_infos WORDINDEX2INFO(20445)
+                INVALID, o3(0x8f,0xbc,0xf2),
+          o2(0xd7,0xbb),              UNDEF,
+     o3(0x8f,0xbc,0xf3), o3(0x8f,0xbc,0xf4),
+     o3(0x8f,0xbc,0xf5),      o2(0xd7,0xbc),
+          o2(0xb6,0xb0),      o2(0xd7,0xbd),
+     o3(0x8f,0xbc,0xf6),      o2(0xd7,0xbe),
+     o3(0x8f,0xbc,0xf7),      o2(0xd7,0xc0),
+          o2(0xc5,0xf6), o3(0x8f,0xbc,0xf8),
+          o2(0xd7,0xc1),      o2(0xd7,0xc2),
+     o3(0x8f,0xbc,0xf9),      o2(0xd7,0xc3),
+     o3(0x8f,0xbc,0xfa),      o2(0xd7,0xb4),
+          o2(0xd7,0xb3), o3(0x8f,0xbc,0xfb),
+          o2(0xd7,0xc4),      o2(0xb7,0xc1),
+     o3(0x8f,0xbc,0xfc), o3(0x8f,0xbc,0xfd),
+          o2(0xc9,0xa7), o3(0x8f,0xbc,0xfe),
+          o2(0xba,0xcc),      o2(0xc9,0xb7),
+          o2(0xc4,0xa6),      o2(0xc9,0xcb),
+          o2(0xd7,0xc5), o3(0x8f,0xbd,0xa1),
+          o2(0xbe,0xb4),      o2(0xb1,0xc6),
+     o3(0x8f,0xbd,0xa2),      o2(0xd7,0xc6),
+     o3(0x8f,0xbd,0xa3), o3(0x8f,0xbd,0xa4),
+          o2(0xd7,0xc7), o3(0x8f,0xbd,0xa5),
+          o2(0xcc,0xf2), o3(0x8f,0xbd,0xa6),
+          o2(0xc8,0xe0), o3(0x8f,0xbd,0xa7),
+     o3(0x8f,0xbd,0xa8),      o2(0xd7,0xca),
+
+#define to_EUC_JP_E5_BD WORDINDEX2INFO(20495)
+    to_EUC_JP_E5_BD_offsets,
+    to_EUC_JP_E5_BD_infos,
+
+#define to_EUC_JP_E5_BE_infos WORDINDEX2INFO(20497)
+                INVALID,      o2(0xb1,0xfd),
+          o2(0xc0,0xac),      o2(0xd7,0xc9),
+          o2(0xd7,0xc8),      o2(0xb7,0xc2),
+          o2(0xc2,0xd4),              UNDEF,
+          o2(0xd7,0xce),      o2(0xd7,0xcc),
+     o3(0x8f,0xbd,0xa9),      o2(0xd7,0xcb),
+          o2(0xce,0xa7),      o2(0xb8,0xe5),
+     o3(0x8f,0xbd,0xaa), o3(0x8f,0xbd,0xab),
+          o2(0xbd,0xf9),      o2(0xd7,0xcd),
+          o2(0xc5,0xcc),      o2(0xbd,0xbe),
+     o3(0x8f,0xbd,0xac),      o2(0xc6,0xc0),
+          o2(0xd7,0xd1),      o2(0xd7,0xd0),
+     o3(0x8f,0xbd,0xad), o3(0x8f,0xbd,0xae),
+          o2(0xd7,0xcf),      o2(0xd7,0xd2),
+          o2(0xb8,0xe6), o3(0x8f,0xbd,0xaf),
+     o3(0x8f,0xbd,0xb2), o3(0x8f,0xbd,0xb0),
+          o2(0xd7,0xd3),      o2(0xc9,0xfc),
+          o2(0xbd,0xdb), o3(0x8f,0xbd,0xb1),
+     o3(0x8f,0xbd,0xb3),      o2(0xd7,0xd4),
+          o2(0xc8,0xf9), o3(0x8f,0xbd,0xb4),
+     o3(0x8f,0xbd,0xb5), o3(0x8f,0xbd,0xb6),
+          o2(0xc6,0xc1),      o2(0xc4,0xa7),
+     o3(0x8f,0xbd,0xb7),      o2(0xc5,0xb0),
+          o2(0xd7,0xd5),      o2(0xb5,0xab),
+
+#define to_EUC_JP_E5_BE WORDINDEX2INFO(20545)
+    to_EUC_JP_E5_BE_offsets,
+    to_EUC_JP_E5_BE_infos,
+
+#define to_EUC_JP_E5_BF_infos WORDINDEX2INFO(20547)
+                INVALID,              UNDEF,
+          o2(0xbf,0xb4), o3(0x8f,0xbd,0xb8),
+          o2(0xc9,0xac), o3(0x8f,0xbd,0xb9),
+     o3(0x8f,0xbd,0xba), o3(0x8f,0xbd,0xbb),
+     o3(0x8f,0xbd,0xbc),      o2(0xb4,0xf7),
+          o2(0xc7,0xa6), o3(0x8f,0xbd,0xbd),
+     o3(0x8f,0xbd,0xbe), o3(0x8f,0xbd,0xbf),
+     o3(0x8f,0xbd,0xc0), o3(0x8f,0xbd,0xc1),
+          o2(0xd7,0xd6),      o2(0xbb,0xd6),
+          o2(0xcb,0xba),      o2(0xcb,0xbb),
+          o2(0xb1,0xfe),      o2(0xd7,0xdb),
+     o3(0x8f,0xbd,0xc2),      o2(0xc3,0xe9),
+     o3(0x8f,0xbd,0xc3), o3(0x8f,0xbd,0xc4),
+          o2(0xd7,0xd8), o3(0x8f,0xbd,0xc5),
+     o3(0x8f,0xbd,0xc6), o3(0x8f,0xbd,0xc7),
+          o2(0xb2,0xf7), o3(0x8f,0xbd,0xc8),
+     o3(0x8f,0xbd,0xc9), o3(0x8f,0xbd,0xca),
+     o3(0x8f,0xbd,0xcb),      o2(0xd8,0xad),
+          o2(0xd7,0xda), o3(0x8f,0xbd,0xcc),
+     o3(0x8f,0xbd,0xcd),      o2(0xc7,0xb0),
+     o3(0x8f,0xbd,0xce),      o2(0xd7,0xd9),
+     o3(0x8f,0xbd,0xcf),      o2(0xd7,0xd7),
+     o3(0x8f,0xbd,0xd0),      o2(0xb9,0xfa),
+          o2(0xd7,0xdd),
+
+#define to_EUC_JP_E5_BF WORDINDEX2INFO(20594)
+    to_EUC_JP_E5_BF_offsets,
+    to_EUC_JP_E5_BF_infos,
+
+#define to_EUC_JP_E5_infos WORDINDEX2INFO(20596)
+             INVALID, to_EUC_JP_E5_80, to_EUC_JP_E5_81, to_EUC_JP_E5_82,
+     to_EUC_JP_E5_83, to_EUC_JP_E5_84, to_EUC_JP_E5_85, to_EUC_JP_E5_86,
+     to_EUC_JP_E5_87, to_EUC_JP_E5_88, to_EUC_JP_E5_89, to_EUC_JP_E5_8A,
+     to_EUC_JP_E5_8B, to_EUC_JP_E5_8C, to_EUC_JP_E5_8D, to_EUC_JP_E5_8E,
+     to_EUC_JP_E5_8F, to_EUC_JP_E5_90, to_EUC_JP_E5_91, to_EUC_JP_E5_92,
+     to_EUC_JP_E5_93, to_EUC_JP_E5_94, to_EUC_JP_E5_95, to_EUC_JP_E5_96,
+     to_EUC_JP_E5_97, to_EUC_JP_E5_98, to_EUC_JP_E5_99, to_EUC_JP_E5_9A,
+     to_EUC_JP_E5_9B, to_EUC_JP_E5_9C, to_EUC_JP_E5_9D, to_EUC_JP_E5_9E,
+     to_EUC_JP_E5_9F, to_EUC_JP_E5_A0, to_EUC_JP_E5_A1, to_EUC_JP_E5_A2,
+     to_EUC_JP_E5_A3, to_EUC_JP_E5_A4, to_EUC_JP_E5_A5, to_EUC_JP_E5_A6,
+     to_EUC_JP_E5_A7, to_EUC_JP_E5_A8, to_EUC_JP_E5_A9, to_EUC_JP_E5_AA,
+     to_EUC_JP_E5_AB, to_EUC_JP_E5_AC, to_EUC_JP_E5_AD, to_EUC_JP_E5_AE,
+     to_EUC_JP_E5_AF, to_EUC_JP_E5_B0, to_EUC_JP_E5_B1, to_EUC_JP_E5_B2,
+     to_EUC_JP_E5_B3, to_EUC_JP_E5_B4, to_EUC_JP_E5_B5, to_EUC_JP_E5_B6,
+     to_EUC_JP_E5_B7, to_EUC_JP_E5_B8, to_EUC_JP_E5_B9, to_EUC_JP_E5_BA,
+     to_EUC_JP_E5_BB, to_EUC_JP_E5_BC, to_EUC_JP_E5_BD, to_EUC_JP_E5_BE,
+     to_EUC_JP_E5_BF,
+
+#define to_EUC_JP_E5 WORDINDEX2INFO(20661)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_E5_infos,
+
+#define to_EUC_JP_E6_80_infos WORDINDEX2INFO(20663)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbd,0xd1), o3(0x8f,0xbd,0xd2),
+     o3(0x8f,0xbd,0xd3),      o2(0xd7,0xe3),
+          o2(0xd7,0xe9),      o2(0xd7,0xe1),
+          o2(0xc5,0xdc), o3(0x8f,0xbd,0xd4),
+     o3(0x8f,0xbd,0xd5),      o2(0xd7,0xe6),
+          o2(0xc9,0xdd), o3(0x8f,0xbd,0xd6),
+     o3(0x8f,0xbd,0xd7),      o2(0xd7,0xe0),
+     o3(0x8f,0xbd,0xd8),      o2(0xd7,0xe5),
+          o2(0xce,0xe7),      o2(0xbb,0xd7),
+     o3(0x8f,0xbd,0xd9),      o2(0xc2,0xd5),
+          o2(0xd7,0xde), o3(0x8f,0xbd,0xda),
+          o2(0xb5,0xde),      o2(0xd7,0xe8),
+          o2(0xc0,0xad),      o2(0xb1,0xe5),
+          o2(0xd7,0xe2),      o2(0xb2,0xf8),
+          o2(0xd7,0xe7), o3(0x8f,0xbd,0xdb),
+          o2(0xb6,0xb1),      o2(0xd7,0xe4),
+     o3(0x8f,0xbd,0xdc), o3(0x8f,0xbd,0xdd),
+          o2(0xd7,0xea),
+
+#define to_EUC_JP_E6_80 WORDINDEX2INFO(20700)
+    to_EUC_JP_E6_80_offsets,
+    to_EUC_JP_E6_80_infos,
+
+#define to_EUC_JP_E6_81_infos WORDINDEX2INFO(20702)
+                INVALID, o3(0x8f,0xbd,0xde),
+          o2(0xd7,0xec),      o2(0xd7,0xf6),
+          o2(0xd7,0xf4),              UNDEF,
+          o2(0xd7,0xf1), o3(0x8f,0xbd,0xdf),
+     o3(0x8f,0xbd,0xe0), o3(0x8f,0xbd,0xe1),
+          o2(0xd7,0xf0),      o2(0xce,0xf8),
+     o3(0x8f,0xbd,0xe2),      o2(0xd7,0xf2),
+          o2(0xb6,0xb2), o3(0x8f,0xbd,0xe3),
+          o2(0xb9,0xb1), o3(0x8f,0xbd,0xe4),
+          o2(0xbd,0xfa), o3(0x8f,0xbd,0xe5),
+     o3(0x8f,0xbd,0xe6),      o2(0xd7,0xf9),
+          o2(0xd7,0xeb), o3(0x8f,0xbd,0xe7),
+          o2(0xd7,0xef),      o2(0xd7,0xdf),
+     o3(0x8f,0xbd,0xe8),      o2(0xb2,0xfa),
+          o2(0xd7,0xf3),      o2(0xd7,0xf5),
+          o2(0xc3,0xd1), o3(0x8f,0xbd,0xe9),
+          o2(0xba,0xa8),      o2(0xb2,0xb8),
+          o2(0xd7,0xed),      o2(0xd7,0xf8),
+          o2(0xd7,0xf7),      o2(0xb6,0xb3),
+          o2(0xc2,0xa9),      o2(0xb3,0xe6),
+     o3(0x8f,0xbd,0xea),      o2(0xb7,0xc3),
+          o2(0xd7,0xee), o3(0x8f,0xbd,0xeb),
+     o3(0x8f,0xbd,0xec),
+
+#define to_EUC_JP_E6_81 WORDINDEX2INFO(20747)
+    to_EUC_JP_E6_81_offsets,
+    to_EUC_JP_E6_81_infos,
+
+#define to_EUC_JP_E6_82_infos WORDINDEX2INFO(20749)
+                INVALID,              UNDEF,
+          o2(0xd7,0xfa), o3(0x8f,0xbd,0xed),
+          o2(0xd7,0xfd),      o2(0xd8,0xa1),
+     o3(0x8f,0xbd,0xee), o3(0x8f,0xbd,0xef),
+          o2(0xbc,0xbd), o3(0x8f,0xbd,0xf0),
+          o2(0xd8,0xa7),      o2(0xc4,0xf0),
+          o2(0xd7,0xfb), o3(0x8f,0xbd,0xf1),
+     o3(0x8f,0xbd,0xf2),      o2(0xd8,0xa5),
+     o3(0x8f,0xbd,0xf3),      o2(0xb2,0xf9),
+     o3(0x8f,0xbd,0xf4),      o2(0xd8,0xa3),
+          o2(0xd8,0xa4), o3(0x8f,0xbd,0xf5),
+          o2(0xd7,0xfe),      o2(0xd8,0xa2),
+     o3(0x8f,0xbd,0xf6), o3(0x8f,0xbd,0xf7),
+          o2(0xb8,0xe7),      o2(0xcd,0xaa),
+     o3(0x8f,0xbd,0xf8),      o2(0xb4,0xb5),
+     o3(0x8f,0xbd,0xf9), o3(0x8f,0xbd,0xfa),
+          o2(0xb1,0xd9),      o2(0xd8,0xa6),
+     o3(0x8f,0xbd,0xfb),      o2(0xc7,0xba),
+          o2(0xb0,0xad), o3(0x8f,0xbd,0xfc),
+     o3(0x8f,0xbd,0xfd),      o2(0xc8,0xe1),
+          o2(0xd7,0xdc),      o2(0xd8,0xac),
+          o2(0xd8,0xb0),      o2(0xcc,0xe5),
+     o3(0x8f,0xbd,0xfe),      o2(0xd8,0xa9),
+     o3(0x8f,0xbe,0xa1),      o2(0xc5,0xe9),
+          o2(0xd8,0xae), o3(0x8f,0xbe,0xa2),
+
+#define to_EUC_JP_E6_82 WORDINDEX2INFO(20799)
+    to_EUC_JP_E6_82_offsets,
+    to_EUC_JP_E6_82_infos,
+
+#define to_EUC_JP_E6_83_infos WORDINDEX2INFO(20801)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbe,0xa3), o3(0x8f,0xbe,0xa4),
+          o2(0xbe,0xf0),      o2(0xd8,0xaf),
+          o2(0xc6,0xd7), o3(0x8f,0xbe,0xa5),
+     o3(0x8f,0xbe,0xa6), o3(0x8f,0xbe,0xa7),
+     o3(0x8f,0xbe,0xa8), o3(0x8f,0xbe,0xa9),
+     o3(0x8f,0xbe,0xaa),      o2(0xcf,0xc7),
+          o2(0xd8,0xab), o3(0x8f,0xbe,0xab),
+     o3(0x8f,0xbe,0xac),      o2(0xd8,0xb1),
+     o3(0x8f,0xbe,0xad),      o2(0xb9,0xfb),
+     o3(0x8f,0xbe,0xae),      o2(0xc0,0xcb),
+     o3(0x8f,0xbe,0xaf), o3(0x8f,0xbe,0xb0),
+          o2(0xb0,0xd4),      o2(0xd8,0xaa),
+          o2(0xd8,0xa8), o3(0x8f,0xbe,0xb1),
+          o2(0xc1,0xda), o3(0x8f,0xbe,0xb2),
+          o2(0xd7,0xfc),      o2(0xbb,0xb4),
+          o2(0xc2,0xc6),      o2(0xd8,0xbd),
+     o3(0x8f,0xbe,0xb3),      o2(0xc1,0xdb),
+          o2(0xd8,0xb8), o3(0x8f,0xbe,0xb4),
+          o2(0xd8,0xb5),      o2(0xd8,0xb6),
+     o3(0x8f,0xbe,0xb5),      o2(0xbc,0xe6),
+          o2(0xd8,0xb9),      o2(0xd8,0xbc),
+     o3(0x8f,0xbe,0xb6), o3(0x8f,0xbe,0xb7),
+
+#define to_EUC_JP_E6_83 WORDINDEX2INFO(20847)
+    to_EUC_JP_E6_83_offsets,
+    to_EUC_JP_E6_83_infos,
+
+#define to_EUC_JP_E6_84_infos WORDINDEX2INFO(20849)
+                INVALID,      o2(0xd8,0xb7),
+          o2(0xbd,0xa5), o3(0x8f,0xbe,0xb8),
+          o2(0xd8,0xba),              UNDEF,
+          o2(0xd8,0xb4), o3(0x8f,0xbe,0xb9),
+          o2(0xcc,0xfc),      o2(0xcc,0xfb),
+     o3(0x8f,0xbe,0xba), o3(0x8f,0xbe,0xbb),
+          o2(0xd8,0xbe),      o2(0xd8,0xbf),
+          o2(0xb0,0xd5), o3(0x8f,0xbe,0xbc),
+     o3(0x8f,0xbe,0xbd), o3(0x8f,0xbe,0xbe),
+     o3(0x8f,0xbe,0xbf), o3(0x8f,0xbe,0xc0),
+          o2(0xd8,0xb3), o3(0x8f,0xbe,0xc1),
+     o3(0x8f,0xbe,0xc2), o3(0x8f,0xbe,0xc3),
+          o2(0xb6,0xf2),      o2(0xb0,0xa6),
+     o3(0x8f,0xbe,0xc4), o3(0x8f,0xbe,0xc5),
+          o2(0xb4,0xb6),      o2(0xd8,0xbb),
+     o3(0x8f,0xbe,0xc6),      o2(0xd8,0xc3),
+          o2(0xd8,0xc2), o3(0x8f,0xbe,0xc7),
+     o3(0x8f,0xbe,0xc8),      o2(0xd8,0xc7),
+     o3(0x8f,0xbe,0xc9), o3(0x8f,0xbe,0xca),
+          o2(0xd8,0xc8), o3(0x8f,0xbe,0xcb),
+     o3(0x8f,0xbe,0xcc), o3(0x8f,0xbe,0xcd),
+     o3(0x8f,0xbe,0xce),      o2(0xd8,0xc6),
+          o2(0xd8,0xc9),      o2(0xd8,0xc1),
+          o2(0xd8,0xc5),
+
+#define to_EUC_JP_E6_84 WORDINDEX2INFO(20896)
+    to_EUC_JP_E6_84_offsets,
+    to_EUC_JP_E6_84_infos,
+
+#define to_EUC_JP_E6_85_infos WORDINDEX2INFO(20898)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbe,0xcf),      o2(0xd8,0xca),
+          o2(0xd8,0xcb), o3(0x8f,0xbe,0xd0),
+     o3(0x8f,0xbe,0xd1),      o2(0xd8,0xc0),
+          o2(0xbb,0xfc), o3(0x8f,0xbe,0xd2),
+          o2(0xd8,0xc4),      o2(0xc2,0xd6),
+          o2(0xb9,0xb2),      o2(0xd8,0xb2),
+          o2(0xbf,0xb5),      o2(0xd8,0xd8),
+          o2(0xca,0xe9),      o2(0xd8,0xce),
+          o2(0xd8,0xcf),      o2(0xd8,0xd0),
+          o2(0xd8,0xd7), o3(0x8f,0xbe,0xd3),
+          o2(0xd8,0xd6), o3(0x8f,0xbe,0xd4),
+          o2(0xcb,0xfd),      o2(0xb4,0xb7),
+          o2(0xd8,0xd4),      o2(0xb7,0xc5),
+          o2(0xb3,0xb4),      o2(0xd8,0xd1),
+     o3(0x8f,0xbe,0xd5),      o2(0xce,0xb8),
+          o2(0xd8,0xd3),      o2(0xb0,0xd6),
+          o2(0xd8,0xd5), o3(0x8f,0xbe,0xd6),
+          o2(0xd8,0xcc),      o2(0xd8,0xd2),
+          o2(0xd8,0xd9),      o2(0xb7,0xc4),
+          o2(0xd8,0xcd), o3(0x8f,0xbe,0xd7),
+     o3(0x8f,0xbe,0xd8), o3(0x8f,0xbe,0xd9),
+          o2(0xcd,0xdd), o3(0x8f,0xbe,0xda),
+
+#define to_EUC_JP_E6_85 WORDINDEX2INFO(20944)
+    to_EUC_JP_E6_85_offsets,
+    to_EUC_JP_E6_85_infos,
+
+#define to_EUC_JP_E6_86_infos WORDINDEX2INFO(20946)
+                INVALID, o3(0x8f,0xbe,0xdb),
+     o3(0x8f,0xbe,0xdc),      o2(0xcd,0xab),
+     o3(0x8f,0xbe,0xdd), o3(0x8f,0xbe,0xde),
+                  UNDEF,      o2(0xd8,0xdc),
+          o2(0xd8,0xe0), o3(0x8f,0xbe,0xdf),
+     o3(0x8f,0xbe,0xe0),      o2(0xc1,0xfe),
+          o2(0xce,0xf9),      o2(0xd8,0xe1),
+     o3(0x8f,0xbe,0xe1), o3(0x8f,0xbe,0xe2),
+          o2(0xd8,0xde),      o2(0xd8,0xdb),
+     o3(0x8f,0xbe,0xe3), o3(0x8f,0xbe,0xe4),
+          o2(0xd8,0xda),      o2(0xd8,0xdf),
+     o3(0x8f,0xbe,0xe5), o3(0x8f,0xbe,0xe6),
+     o3(0x8f,0xbe,0xe7), o3(0x8f,0xbe,0xe8),
+          o2(0xca,0xb0), o3(0x8f,0xbe,0xe9),
+          o2(0xc6,0xb4), o3(0x8f,0xbe,0xea),
+          o2(0xb7,0xc6), o3(0x8f,0xbe,0xeb),
+          o2(0xd8,0xe2),      o2(0xd8,0xdd),
+     o3(0x8f,0xbe,0xec),      o2(0xd8,0xe3),
+          o2(0xb7,0xfb),      o2(0xb2,0xb1),
+     o3(0x8f,0xbe,0xed), o3(0x8f,0xbe,0xee),
+          o2(0xd8,0xeb), o3(0x8f,0xbe,0xef),
+          o2(0xb4,0xb8),
+
+#define to_EUC_JP_E6_86 WORDINDEX2INFO(20989)
+    to_EUC_JP_E6_86_offsets,
+    to_EUC_JP_E6_86_infos,
+
+#define to_EUC_JP_E6_87_infos WORDINDEX2INFO(20991)
+                INVALID, o3(0x8f,0xbe,0xf0),
+     o3(0x8f,0xbe,0xf1), o3(0x8f,0xbe,0xf2),
+          o2(0xd8,0xe9),              UNDEF,
+          o2(0xd8,0xea),      o2(0xba,0xa9),
+          o2(0xd8,0xe8),      o2(0xd8,0xe6),
+          o2(0xd8,0xe5),      o2(0xd8,0xec),
+          o2(0xd8,0xe4),      o2(0xd8,0xee),
+     o3(0x8f,0xbe,0xf3), o3(0x8f,0xbe,0xf4),
+          o2(0xb2,0xfb), o3(0x8f,0xbe,0xf5),
+     o3(0x8f,0xbe,0xf6), o3(0x8f,0xbe,0xf7),
+     o3(0x8f,0xbe,0xf8), o3(0x8f,0xbe,0xf9),
+     o3(0x8f,0xbe,0xfa), o3(0x8f,0xbe,0xfb),
+          o2(0xd8,0xf0), o3(0x8f,0xbe,0xfe),
+          o2(0xd8,0xef), o3(0x8f,0xbe,0xfc),
+     o3(0x8f,0xbe,0xfd), o3(0x8f,0xbf,0xa1),
+     o3(0x8f,0xbf,0xa2), o3(0x8f,0xbf,0xa3),
+          o2(0xc4,0xa8),      o2(0xd8,0xf3),
+          o2(0xd8,0xf1),      o2(0xd8,0xe7),
+          o2(0xb7,0xfc),      o2(0xd8,0xf2),
+          o2(0xd8,0xf6),      o2(0xd8,0xf5),
+          o2(0xd8,0xf7),      o2(0xd8,0xf4),
+
+#define to_EUC_JP_E6_87 WORDINDEX2INFO(21033)
+    to_EUC_JP_E6_87_offsets,
+    to_EUC_JP_E6_87_infos,
+
+#define to_EUC_JP_E6_88_infos WORDINDEX2INFO(21035)
+                INVALID,      o2(0xd8,0xf8),
+     o3(0x8f,0xbf,0xa4),              UNDEF,
+     o3(0x8f,0xbf,0xa5), o3(0x8f,0xbf,0xa6),
+     o3(0x8f,0xbf,0xa7),      o2(0xd8,0xf9),
+          o2(0xd8,0xfa),      o2(0xca,0xea),
+          o2(0xd8,0xfc),      o2(0xd8,0xfb),
+          o2(0xbd,0xbf),      o2(0xc0,0xae),
+          o2(0xb2,0xe6),      o2(0xb2,0xfc),
+     o3(0x8f,0xbf,0xa8),      o2(0xd8,0xfd),
+     o3(0x8f,0xbf,0xa9),      o2(0xb0,0xbf),
+          o2(0xc0,0xcc),      o2(0xd8,0xfe),
+     o3(0x8f,0xbf,0xaa),      o2(0xec,0xc3),
+          o2(0xd9,0xa1),      o2(0xb7,0xe1),
+     o3(0x8f,0xbf,0xab),      o2(0xd9,0xa2),
+     o3(0x8f,0xbf,0xac), o3(0x8f,0xbf,0xad),
+          o2(0xc0,0xef), o3(0x8f,0xbf,0xae),
+     o3(0x8f,0xbf,0xaf),      o2(0xd9,0xa3),
+     o3(0x8f,0xbf,0xb0),      o2(0xd9,0xa4),
+          o2(0xb5,0xba),      o2(0xd9,0xa5),
+          o2(0xd9,0xa6),      o2(0xd9,0xa7),
+          o2(0xc2,0xd7),      o2(0xb8,0xcd),
+     o3(0x8f,0xbf,0xb1),      o2(0xcc,0xe1),
+     o3(0x8f,0xbf,0xb2),      o2(0xcb,0xbc),
+
+#define to_EUC_JP_E6_88 WORDINDEX2INFO(21081)
+    to_EUC_JP_E6_88_offsets,
+    to_EUC_JP_E6_88_infos,
+
+#define to_EUC_JP_E6_89_infos WORDINDEX2INFO(21083)
+                INVALID,      o2(0xbd,0xea),
+          o2(0xd9,0xa8), o3(0x8f,0xbf,0xb3),
+     o3(0x8f,0xbf,0xb4), o3(0x8f,0xbf,0xb5),
+                  UNDEF, o3(0x8f,0xbf,0xb6),
+          o2(0xc0,0xf0),      o2(0xee,0xbd),
+          o2(0xc8,0xe2),      o2(0xbc,0xea),
+     o3(0x8f,0xbf,0xb7),      o2(0xba,0xcd),
+          o2(0xd9,0xa9), o3(0x8f,0xbf,0xb8),
+     o3(0x8f,0xbf,0xb9), o3(0x8f,0xbf,0xba),
+          o2(0xc2,0xc7), o3(0x8f,0xbf,0xbb),
+          o2(0xca,0xa7), o3(0x8f,0xbf,0xbc),
+          o2(0xc2,0xf1), o3(0x8f,0xbf,0xbd),
+          o2(0xd9,0xac), o3(0x8f,0xbf,0xbe),
+          o2(0xd9,0xaa),      o2(0xd9,0xad),
+          o2(0xd9,0xab), o3(0x8f,0xbf,0xbf),
+          o2(0xd9,0xae), o3(0x8f,0xbf,0xc0),
+          o2(0xca,0xb1), o3(0x8f,0xbf,0xc1),
+          o2(0xb0,0xb7), o3(0x8f,0xbf,0xc2),
+          o2(0xc9,0xde),      o2(0xc8,0xe3),
+     o3(0x8f,0xbf,0xc3),      o2(0xd9,0xaf),
+     o3(0x8f,0xbf,0xc4),      o2(0xd9,0xb2),
+          o2(0xbe,0xb5),
+
+#define to_EUC_JP_E6_89 WORDINDEX2INFO(21126)
+    to_EUC_JP_E6_89_offsets,
+    to_EUC_JP_E6_89_infos,
+
+#define to_EUC_JP_E6_8A_infos WORDINDEX2INFO(21128)
+                INVALID,      o2(0xb5,0xbb),
+                  UNDEF,      o2(0xd9,0xb0),
+          o2(0xd9,0xb7),      o2(0xbe,0xb6),
+          o2(0xd9,0xb1),      o2(0xc7,0xc4),
+     o3(0x8f,0xbf,0xc5), o3(0x8f,0xbf,0xc6),
+     o3(0x8f,0xbf,0xc7), o3(0x8f,0xbf,0xc8),
+          o2(0xcd,0xde),      o2(0xd9,0xb3),
+          o2(0xd9,0xb4),      o2(0xd9,0xb8),
+          o2(0xc5,0xea),      o2(0xd9,0xb5),
+          o2(0xb9,0xb3),      o2(0xc0,0xde),
+          o2(0xd9,0xc6),      o2(0xc8,0xb4),
+          o2(0xc2,0xf2), o3(0x8f,0xbf,0xc9),
+     o3(0x8f,0xbf,0xca),      o2(0xc8,0xe4),
+          o2(0xda,0xad),      o2(0xca,0xfa),
+     o3(0x8f,0xbf,0xcb),      o2(0xc4,0xf1),
+     o3(0x8f,0xbf,0xcc), o3(0x8f,0xbf,0xcd),
+          o2(0xcb,0xf5), o3(0x8f,0xbf,0xce),
+          o2(0xd9,0xbb),      o2(0xb2,0xa1),
+          o2(0xc3,0xea), o3(0x8f,0xbf,0xcf),
+     o3(0x8f,0xbf,0xd0),
+
+#define to_EUC_JP_E6_8A WORDINDEX2INFO(21167)
+    to_EUC_JP_E6_8A_offsets,
+    to_EUC_JP_E6_8A_infos,
+
+#define to_EUC_JP_E6_8B_infos WORDINDEX2INFO(21169)
+                INVALID,              UNDEF,
+          o2(0xd9,0xc4), o3(0x8f,0xbf,0xd1),
+          o2(0xc3,0xb4),      o2(0xd9,0xbe),
+          o2(0xd9,0xc5),      o2(0xd9,0xc0),
+          o2(0xd9,0xc7),      o2(0xd9,0xc3),
+          o2(0xd9,0xc2),      o2(0xc7,0xef),
+     o3(0x8f,0xbf,0xd2),      o2(0xd9,0xbc),
+          o2(0xb2,0xfd),      o2(0xd9,0xba),
+          o2(0xb5,0xf1),      o2(0xc2,0xf3),
+          o2(0xd9,0xb6), o3(0x8f,0xbf,0xd3),
+     o3(0x8f,0xbf,0xd4),      o2(0xd9,0xb9),
+          o2(0xb9,0xb4),      o2(0xc0,0xdb),
+     o3(0x8f,0xbf,0xd5),      o2(0xbe,0xb7),
+          o2(0xd9,0xc1),      o2(0xc7,0xd2),
+          o2(0xb5,0xf2),      o2(0xb3,0xc8),
+     o3(0x8f,0xbf,0xd6),      o2(0xb3,0xe7),
+          o2(0xbf,0xa1),      o2(0xd9,0xc9),
+          o2(0xd9,0xce),      o2(0xd9,0xca),
+     o3(0x8f,0xbf,0xd7),      o2(0xb7,0xfd),
+     o3(0x8f,0xbf,0xd8),      o2(0xd9,0xcf),
+          o2(0xbb,0xa2),      o2(0xb9,0xe9),
+     o3(0x8f,0xbf,0xd9), o3(0x8f,0xbf,0xda),
+          o2(0xbd,0xa6),      o2(0xd9,0xbd),
+
+#define to_EUC_JP_E6_8B WORDINDEX2INFO(21215)
+    to_EUC_JP_E6_8B_offsets,
+    to_EUC_JP_E6_8B_infos,
+
+#define to_EUC_JP_E6_8C_infos WORDINDEX2INFO(21217)
+                INVALID,              UNDEF,
+          o2(0xbb,0xfd),      o2(0xd9,0xcc),
+     o3(0x8f,0xbf,0xdb), o3(0x8f,0xbf,0xdc),
+          o2(0xbb,0xd8),      o2(0xd9,0xcd),
+          o2(0xb0,0xc4), o3(0x8f,0xbf,0xdd),
+     o3(0x8f,0xbf,0xde),      o2(0xd9,0xc8),
+     o3(0x8f,0xbf,0xdf), o3(0x8f,0xbf,0xe0),
+          o2(0xc4,0xa9), o3(0x8f,0xbf,0xe1),
+     o3(0x8f,0xbf,0xe2), o3(0x8f,0xbf,0xe3),
+          o2(0xb5,0xf3),      o2(0xb6,0xb4),
+          o2(0xd9,0xcb),      o2(0xb0,0xa7),
+     o3(0x8f,0xbf,0xe4), o3(0x8f,0xbf,0xe5),
+          o2(0xba,0xc3), o3(0x8f,0xbf,0xe6),
+          o2(0xbf,0xb6), o3(0x8f,0xbf,0xe7),
+     o3(0x8f,0xbf,0xe8), o3(0x8f,0xbf,0xe9),
+          o2(0xc4,0xf2), o3(0x8f,0xbf,0xea),
+          o2(0xc8,0xd4),      o2(0xd9,0xd1),
+          o2(0xc1,0xde),
+
+#define to_EUC_JP_E6_8C WORDINDEX2INFO(21252)
+    to_EUC_JP_E6_8C_offsets,
+    to_EUC_JP_E6_8C_infos,
+
+#define to_EUC_JP_E6_8D_infos WORDINDEX2INFO(21254)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbf,0xeb), o3(0x8f,0xbf,0xec),
+     o3(0x8f,0xbf,0xed), o3(0x8f,0xbf,0xee),
+     o3(0x8f,0xbf,0xef),      o2(0xc2,0xaa),
+     o3(0x8f,0xbf,0xf0), o3(0x8f,0xbf,0xf1),
+          o2(0xbb,0xab),      o2(0xd9,0xd2),
+     o3(0x8f,0xbf,0xf2),      o2(0xd9,0xd4),
+          o2(0xd9,0xd0), o3(0x8f,0xbf,0xf3),
+     o3(0x8f,0xbf,0xf4), o3(0x8f,0xbf,0xf5),
+          o2(0xca,0xe1),      o2(0xc4,0xbd),
+     o3(0x8f,0xbf,0xf6), o3(0x8f,0xbf,0xf7),
+          o2(0xc1,0xdc), o3(0x8f,0xbf,0xf8),
+     o3(0x8f,0xbf,0xf9),      o2(0xca,0xfb),
+          o2(0xbc,0xce),      o2(0xd9,0xe0),
+          o2(0xd9,0xdf), o3(0x8f,0xbf,0xfa),
+     o3(0x8f,0xbf,0xfb),      o2(0xbf,0xf8),
+     o3(0x8f,0xbf,0xfc),      o2(0xb7,0xfe),
+     o3(0x8f,0xbf,0xfd), o3(0x8f,0xbf,0xfe),
+          o2(0xd9,0xd9),      o2(0xbe,0xb9),
+     o3(0x8f,0xc0,0xa1),      o2(0xc6,0xe8),
+          o2(0xc7,0xb1), o3(0x8f,0xc0,0xa2),
+     o3(0x8f,0xc0,0xa3), o3(0x8f,0xc0,0xa4),
+
+#define to_EUC_JP_E6_8D WORDINDEX2INFO(21298)
+    to_EUC_JP_E6_8D_offsets,
+    to_EUC_JP_E6_8D_infos,
+
+#define to_EUC_JP_E6_8E_infos WORDINDEX2INFO(21300)
+                INVALID,      o2(0xd9,0xd7),
+                  UNDEF, o3(0x8f,0xc0,0xa5),
+          o2(0xc1,0xdd), o3(0x8f,0xc0,0xa6),
+     o3(0x8f,0xc0,0xa7),      o2(0xbc,0xf8),
+          o2(0xd9,0xdc), o3(0x8f,0xc0,0xa8),
+          o2(0xbe,0xb8),      o2(0xd9,0xd6),
+          o2(0xd9,0xdb), o3(0x8f,0xc0,0xa9),
+          o2(0xc7,0xd3), o3(0x8f,0xc0,0xaa),
+     o3(0x8f,0xc0,0xab),      o2(0xd9,0xd5),
+          o2(0xb7,0xa1), o3(0x8f,0xc0,0xac),
+     o3(0x8f,0xc0,0xad),      o2(0xb3,0xdd),
+     o3(0x8f,0xc0,0xae),      o2(0xd9,0xdd),
+          o2(0xce,0xab),      o2(0xba,0xce),
+          o2(0xc3,0xb5),      o2(0xd9,0xda),
+     o3(0x8f,0xc0,0xaf),      o2(0xc0,0xdc),
+     o3(0x8f,0xc0,0xb0),      o2(0xb9,0xb5),
+          o2(0xbf,0xe4),      o2(0xb1,0xe6),
+          o2(0xc1,0xbc),      o2(0xd9,0xd8),
+          o2(0xb5,0xc5), o3(0x8f,0xc0,0xb1),
+     o3(0x8f,0xc0,0xb2), o3(0x8f,0xc0,0xb3),
+          o2(0xb7,0xc7),      o2(0xc4,0xcf),
+          o2(0xd9,0xde),      o2(0xc1,0xdf),
+     o3(0x8f,0xc0,0xb4),      o2(0xd9,0xe1),
+
+#define to_EUC_JP_E6_8E WORDINDEX2INFO(21346)
+    to_EUC_JP_E6_8E_offsets,
+    to_EUC_JP_E6_8E_infos,
+
+#define to_EUC_JP_E6_8F_infos WORDINDEX2INFO(21348)
+                INVALID,      o2(0xd9,0xe3),
+     o3(0x8f,0xc0,0xb5),              UNDEF,
+          o2(0xc2,0xb7),      o2(0xd9,0xe9),
+     o3(0x8f,0xc0,0xb6),      o2(0xd9,0xe4),
+     o3(0x8f,0xc0,0xb7),      o2(0xd9,0xe6),
+     o3(0x8f,0xc0,0xb8),      o2(0xc9,0xc1),
+          o2(0xc4,0xf3), o3(0x8f,0xc0,0xb9),
+          o2(0xd9,0xe7), o3(0x8f,0xc0,0xba),
+     o3(0x8f,0xc0,0xbb), o3(0x8f,0xc0,0xbc),
+          o2(0xcd,0xac),      o2(0xcd,0xc8),
+          o2(0xb4,0xb9), o3(0x8f,0xc0,0xbd),
+     o3(0x8f,0xc0,0xbe),      o2(0xb0,0xae),
+          o2(0xd9,0xe5), o3(0x8f,0xc0,0xbf),
+          o2(0xd9,0xe2), o3(0x8f,0xc0,0xc0),
+     o3(0x8f,0xc0,0xc1),      o2(0xb4,0xf8),
+     o3(0x8f,0xc0,0xc2), o3(0x8f,0xc0,0xc3),
+          o2(0xb1,0xe7), o3(0x8f,0xc0,0xc4),
+          o2(0xd9,0xe8), o3(0x8f,0xc0,0xc5),
+     o3(0x8f,0xc0,0xc6),      o2(0xcd,0xc9),
+
+#define to_EUC_JP_E6_8F WORDINDEX2INFO(21386)
+    to_EUC_JP_E6_8F_offsets,
+    to_EUC_JP_E6_8F_infos,
+
+#define to_EUC_JP_E6_90_infos WORDINDEX2INFO(21388)
+                INVALID,              UNDEF,
+          o2(0xd9,0xec), o3(0x8f,0xc0,0xc7),
+     o3(0x8f,0xc0,0xc8),      o2(0xc2,0xbb),
+          o2(0xd9,0xf3), o3(0x8f,0xc0,0xc9),
+     o3(0x8f,0xc0,0xca),      o2(0xd9,0xed),
+     o3(0x8f,0xc0,0xcb),      o2(0xd9,0xea),
+          o2(0xd9,0xf1), o3(0x8f,0xc0,0xcc),
+          o2(0xd9,0xd3), o3(0x8f,0xc0,0xcd),
+     o3(0x8f,0xc0,0xce), o3(0x8f,0xc0,0xcf),
+     o3(0x8f,0xc0,0xd0), o3(0x8f,0xc0,0xd1),
+          o2(0xd9,0xee),      o2(0xd9,0xf2),
+     o3(0x8f,0xc0,0xd2), o3(0x8f,0xc0,0xd3),
+          o2(0xc8,0xc2),      o2(0xc5,0xeb),
+     o3(0x8f,0xc0,0xd4), o3(0x8f,0xc0,0xd5),
+          o2(0xd9,0xeb), o3(0x8f,0xc0,0xd6),
+          o2(0xd9,0xef),      o2(0xb7,0xc8),
+     o3(0x8f,0xc0,0xd7),      o2(0xba,0xf1),
+     o3(0x8f,0xc0,0xd8),
+
+#define to_EUC_JP_E6_90 WORDINDEX2INFO(21423)
+    to_EUC_JP_E6_90_offsets,
+    to_EUC_JP_E6_90_infos,
+
+#define to_EUC_JP_E6_91_infos WORDINDEX2INFO(21425)
+                INVALID,              UNDEF,
+          o2(0xc0,0xdd), o3(0x8f,0xc0,0xd9),
+          o2(0xd9,0xf7), o3(0x8f,0xc0,0xda),
+     o3(0x8f,0xc0,0xdb), o3(0x8f,0xc0,0xdc),
+     o3(0x8f,0xc0,0xdd), o3(0x8f,0xc0,0xde),
+          o2(0xc5,0xa6), o3(0x8f,0xc0,0xdf),
+     o3(0x8f,0xc0,0xe0), o3(0x8f,0xc0,0xe1),
+     o3(0x8f,0xc0,0xe2), o3(0x8f,0xc0,0xe3),
+     o3(0x8f,0xc0,0xe4), o3(0x8f,0xc0,0xe5),
+     o3(0x8f,0xc0,0xe6),      o2(0xd9,0xf4),
+          o2(0xcb,0xe0), o3(0x8f,0xc0,0xe7),
+          o2(0xd9,0xf5), o3(0x8f,0xc0,0xe8),
+     o3(0x8f,0xc0,0xe9),      o2(0xd9,0xf6),
+          o2(0xcc,0xce),      o2(0xc0,0xa2),
+     o3(0x8f,0xc0,0xea), o3(0x8f,0xc0,0xeb),
+
+#define to_EUC_JP_E6_91 WORDINDEX2INFO(21455)
+    to_EUC_JP_E6_91_offsets,
+    to_EUC_JP_E6_91_infos,
+
+#define to_EUC_JP_E6_92_infos WORDINDEX2INFO(21457)
+                INVALID,              UNDEF,
+          o2(0xb7,0xe2), o3(0x8f,0xc0,0xec),
+     o3(0x8f,0xc0,0xed),      o2(0xd9,0xfd),
+     o3(0x8f,0xc0,0xee), o3(0x8f,0xc0,0xef),
+     o3(0x8f,0xc0,0xf0),      o2(0xbb,0xb5),
+          o2(0xd9,0xfa),      o2(0xd9,0xf9),
+     o3(0x8f,0xc0,0xf1), o3(0x8f,0xc0,0xf2),
+          o2(0xc7,0xb2), o3(0x8f,0xc0,0xf3),
+     o3(0x8f,0xc0,0xf4),      o2(0xc6,0xb5),
+     o3(0x8f,0xc0,0xf5), o3(0x8f,0xc0,0xf6),
+     o3(0x8f,0xc0,0xf7),      o2(0xc5,0xb1),
+          o2(0xd9,0xfb), o3(0x8f,0xc0,0xf8),
+     o3(0x8f,0xc0,0xf9),      o2(0xd9,0xfc),
+          o2(0xc9,0xef), o3(0x8f,0xc0,0xfa),
+          o2(0xc7,0xc5),      o2(0xbb,0xa3),
+          o2(0xc0,0xf1),      o2(0xcb,0xd0),
+     o3(0x8f,0xc0,0xfb),      o2(0xb3,0xc9),
+          o2(0xda,0xa5),      o2(0xd9,0xfe),
+     o3(0x8f,0xc0,0xfc), o3(0x8f,0xc0,0xfd),
+     o3(0x8f,0xc0,0xfe),
+
+#define to_EUC_JP_E6_92 WORDINDEX2INFO(21496)
+    to_EUC_JP_E6_92_offsets,
+    to_EUC_JP_E6_92_infos,
+
+#define to_EUC_JP_E6_93_infos WORDINDEX2INFO(21498)
+                INVALID,              UNDEF,
+          o2(0xcd,0xca),      o2(0xda,0xa7),
+     o3(0x8f,0xc1,0xa1),      o2(0xda,0xa3),
+          o2(0xda,0xa4), o3(0x8f,0xc1,0xa2),
+     o3(0x8f,0xc1,0xa3), o3(0x8f,0xc1,0xa4),
+     o3(0x8f,0xc1,0xa5),      o2(0xc1,0xe0),
+     o3(0x8f,0xc1,0xa6), o3(0x8f,0xc1,0xa7),
+     o3(0x8f,0xc1,0xa8),      o2(0xda,0xa2),
+          o2(0xd9,0xbf), o3(0x8f,0xc1,0xa9),
+     o3(0x8f,0xc1,0xaa),      o2(0xda,0xa6),
+          o2(0xda,0xa1),      o2(0xda,0xab),
+          o2(0xda,0xac),      o2(0xc5,0xa7),
+          o2(0xda,0xae), o3(0x8f,0xc1,0xab),
+     o3(0x8f,0xc1,0xac),      o2(0xbb,0xa4),
+          o2(0xda,0xa9), o3(0x8f,0xc1,0xad),
+     o3(0x8f,0xc1,0xae),      o2(0xb5,0xbc),
+     o3(0x8f,0xc1,0xaf),      o2(0xda,0xaf),
+     o3(0x8f,0xc1,0xb0),      o2(0xda,0xa8),
+          o2(0xda,0xb3),      o2(0xda,0xb2),
+     o3(0x8f,0xc1,0xb1),      o2(0xda,0xb1),
+     o3(0x8f,0xc1,0xb2),      o2(0xda,0xb4),
+     o3(0x8f,0xc1,0xb3),      o2(0xda,0xb6),
+          o2(0xbe,0xf1), o3(0x8f,0xc1,0xb4),
+
+#define to_EUC_JP_E6_93 WORDINDEX2INFO(21544)
+    to_EUC_JP_E6_93_offsets,
+    to_EUC_JP_E6_93_infos,
+
+#define to_EUC_JP_E6_94_infos WORDINDEX2INFO(21546)
+                INVALID,      o2(0xda,0xb5),
+     o3(0x8f,0xc1,0xb5),              UNDEF,
+     o3(0x8f,0xc1,0xb6),      o2(0xda,0xb9),
+     o3(0x8f,0xc1,0xb7), o3(0x8f,0xc1,0xb8),
+     o3(0x8f,0xc1,0xb9), o3(0x8f,0xc1,0xba),
+     o3(0x8f,0xc1,0xbb), o3(0x8f,0xc1,0xbc),
+     o3(0x8f,0xc1,0xbd),      o2(0xda,0xb7),
+     o3(0x8f,0xc1,0xbe), o3(0x8f,0xc1,0xbf),
+          o2(0xda,0xb8),      o2(0xd9,0xf0),
+     o3(0x8f,0xc1,0xc0), o3(0x8f,0xc1,0xc1),
+     o3(0x8f,0xc1,0xc2),      o2(0xda,0xbb),
+          o2(0xda,0xba), o3(0x8f,0xc1,0xc3),
+     o3(0x8f,0xc1,0xc4),      o2(0xd9,0xf8),
+          o2(0xda,0xbc),      o2(0xda,0xb0),
+     o3(0x8f,0xc1,0xc5),      o2(0xbb,0xd9),
+     o3(0x8f,0xc1,0xc6),      o2(0xda,0xbd),
+          o2(0xda,0xbe),      o2(0xda,0xc0),
+          o2(0xda,0xbf),      o2(0xda,0xc1),
+          o2(0xb2,0xfe), o3(0x8f,0xc1,0xc7),
+          o2(0xb9,0xb6), o3(0x8f,0xc1,0xc8),
+     o3(0x8f,0xc1,0xc9),      o2(0xca,0xfc),
+          o2(0xc0,0xaf),
+
+#define to_EUC_JP_E6_94 WORDINDEX2INFO(21589)
+    to_EUC_JP_E6_94_offsets,
+    to_EUC_JP_E6_94_infos,
+
+#define to_EUC_JP_E6_95_infos WORDINDEX2INFO(21591)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc1,0xca),      o2(0xb8,0xce),
+     o3(0x8f,0xc1,0xcb),      o2(0xda,0xc3),
+     o3(0x8f,0xc1,0xcc),      o2(0xda,0xc6),
+          o2(0xc9,0xd2), o3(0x8f,0xc1,0xcd),
+          o2(0xb5,0xdf), o3(0x8f,0xc1,0xce),
+     o3(0x8f,0xc1,0xcf),      o2(0xda,0xc5),
+          o2(0xda,0xc4),      o2(0xc7,0xd4),
+          o2(0xda,0xc7),      o2(0xb6,0xb5),
+          o2(0xda,0xc9),      o2(0xda,0xc8),
+     o3(0x8f,0xc1,0xd0), o3(0x8f,0xc1,0xd1),
+          o2(0xb4,0xba),      o2(0xbb,0xb6),
+          o2(0xc6,0xd8), o3(0x8f,0xc1,0xd2),
+     o3(0x8f,0xc1,0xd3),      o2(0xb7,0xc9),
+          o2(0xbf,0xf4),      o2(0xda,0xca),
+          o2(0xc0,0xb0),      o2(0xc5,0xa8),
+          o2(0xc9,0xdf),      o2(0xda,0xcb),
+     o3(0x8f,0xc1,0xd4), o3(0x8f,0xc1,0xd5),
+
+#define to_EUC_JP_E6_95 WORDINDEX2INFO(21627)
+    to_EUC_JP_E6_95_offsets,
+    to_EUC_JP_E6_95_infos,
+
+#define to_EUC_JP_E6_96_infos WORDINDEX2INFO(21629)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc1,0xd6),      o2(0xda,0xcc),
+          o2(0xda,0xcd), o3(0x8f,0xc1,0xd7),
+          o2(0xca,0xb8),      o2(0xd5,0xdd),
+          o2(0xc0,0xc6), o3(0x8f,0xc1,0xd8),
+          o2(0xc9,0xcc),      o2(0xba,0xd8),
+          o2(0xc8,0xe5),      o2(0xc8,0xc3),
+     o3(0x8f,0xc1,0xd9), o3(0x8f,0xc1,0xda),
+          o2(0xc5,0xcd), o3(0x8f,0xc1,0xdb),
+          o2(0xce,0xc1),      o2(0xda,0xcf),
+          o2(0xbc,0xd0), o3(0x8f,0xc1,0xdc),
+          o2(0xda,0xd0), o3(0x8f,0xc1,0xdd),
+          o2(0xb0,0xb6), o3(0x8f,0xc1,0xde),
+          o2(0xb6,0xd4),      o2(0xc0,0xcd),
+     o3(0x8f,0xc1,0xdf),      o2(0xc9,0xe0),
+          o2(0xda,0xd1),      o2(0xbb,0xc2),
+          o2(0xc3,0xc7), o3(0x8f,0xc1,0xe0),
+          o2(0xbb,0xdb),      o2(0xbf,0xb7),
+     o3(0x8f,0xc1,0xe1), o3(0x8f,0xc1,0xe2),
+     o3(0x8f,0xc1,0xe3),      o2(0xda,0xd2),
+          o2(0xca,0xfd),      o2(0xb1,0xf7),
+          o2(0xbb,0xdc), o3(0x8f,0xc1,0xe4),
+
+#define to_EUC_JP_E6_96 WORDINDEX2INFO(21673)
+    to_EUC_JP_E6_96_offsets,
+    to_EUC_JP_E6_96_infos,
+
+#define to_EUC_JP_E6_97_infos WORDINDEX2INFO(21675)
+                INVALID,              UNDEF,
+          o2(0xda,0xd5), o3(0x8f,0xc1,0xe5),
+          o2(0xda,0xd3),      o2(0xda,0xd6),
+          o2(0xce,0xb9),      o2(0xda,0xd4),
+     o3(0x8f,0xc1,0xe6), o3(0x8f,0xc1,0xe7),
+          o2(0xc0,0xfb),      o2(0xda,0xd7),
+     o3(0x8f,0xc1,0xe8),      o2(0xc2,0xb2),
+     o3(0x8f,0xc1,0xe9),      o2(0xda,0xd8),
+     o3(0x8f,0xc1,0xea), o3(0x8f,0xc1,0xeb),
+          o2(0xb4,0xfa), o3(0x8f,0xc1,0xec),
+          o2(0xda,0xda),      o2(0xda,0xd9),
+     o3(0x8f,0xc1,0xed),      o2(0xda,0xdb),
+          o2(0xda,0xdc),      o2(0xb4,0xfb),
+          o2(0xc6,0xfc),      o2(0xc3,0xb6),
+          o2(0xb5,0xec),      o2(0xbb,0xdd),
+          o2(0xc1,0xe1),      o2(0xbd,0xdc),
+          o2(0xb0,0xb0), o3(0x8f,0xc1,0xee),
+          o2(0xda,0xdd), o3(0x8f,0xc1,0xef),
+     o3(0x8f,0xc1,0xf0), o3(0x8f,0xc1,0xf1),
+     o3(0x8f,0xc1,0xf2),      o2(0xb2,0xa2),
+          o2(0xda,0xe1), o3(0x8f,0xc1,0xf3),
+     o3(0x8f,0xc1,0xf4),
+
+#define to_EUC_JP_E6_97 WORDINDEX2INFO(21718)
+    to_EUC_JP_E6_97_offsets,
+    to_EUC_JP_E6_97_infos,
+
+#define to_EUC_JP_E6_98_infos WORDINDEX2INFO(21720)
+                INVALID, o3(0x8f,0xc1,0xf5),
+                  UNDEF,      o2(0xb9,0xb7),
+          o2(0xda,0xe0), o3(0x8f,0xc1,0xf6),
+          o2(0xba,0xab),      o2(0xbe,0xba),
+     o3(0x8f,0xc1,0xf7), o3(0x8f,0xc1,0xf8),
+          o2(0xda,0xdf),      o2(0xbe,0xbb),
+     o3(0x8f,0xc1,0xf9),      o2(0xcc,0xc0),
+          o2(0xba,0xaa), o3(0x8f,0xc1,0xfa),
+     o3(0x8f,0xc1,0xfb),      o2(0xb0,0xd7),
+          o2(0xc0,0xce), o3(0x8f,0xc1,0xfc),
+     o3(0x8f,0xc1,0xfd),      o2(0xda,0xe6),
+     o3(0x8f,0xc1,0xfe), o3(0x8f,0xc2,0xa1),
+          o2(0xc0,0xb1),      o2(0xb1,0xc7),
+     o3(0x8f,0xc2,0xa2), o3(0x8f,0xc2,0xa3),
+     o3(0x8f,0xc2,0xa4), o3(0x8f,0xc2,0xa5),
+          o2(0xbd,0xd5), o3(0x8f,0xc2,0xa6),
+          o2(0xcb,0xe6),      o2(0xba,0xf2),
+     o3(0x8f,0xc2,0xa7), o3(0x8f,0xc2,0xa8),
+     o3(0x8f,0xc2,0xa9), o3(0x8f,0xc2,0xaa),
+          o2(0xbe,0xbc), o3(0x8f,0xc2,0xab),
+          o2(0xc0,0xa7), o3(0x8f,0xc2,0xac),
+     o3(0x8f,0xc2,0xad), o3(0x8f,0xc2,0xae),
+          o2(0xda,0xe5),      o2(0xda,0xe3),
+          o2(0xda,0xe4), o3(0x8f,0xc2,0xb0),
+     o3(0x8f,0xc2,0xaf),      o2(0xc3,0xeb),
+          o2(0xdb,0xa6),
+
+#define to_EUC_JP_E6_98 WORDINDEX2INFO(21771)
+    to_EUC_JP_E6_98_offsets,
+    to_EUC_JP_E6_98_infos,
+
+#define to_EUC_JP_E6_99_infos WORDINDEX2INFO(21773)
+                INVALID, o3(0x8f,0xc2,0xb1),
+          o2(0xda,0xea),      o2(0xbb,0xfe),
+          o2(0xb9,0xb8),      o2(0xda,0xe8),
+     o3(0x8f,0xc2,0xb2), o3(0x8f,0xc2,0xb3),
+                  UNDEF,      o2(0xda,0xe9),
+     o3(0x8f,0xc2,0xb4),      o2(0xbf,0xb8),
+     o3(0x8f,0xc2,0xb5), o3(0x8f,0xc2,0xb7),
+          o2(0xda,0xe7), o3(0x8f,0xc2,0xb6),
+          o2(0xbb,0xaf), o3(0x8f,0xc2,0xb8),
+     o3(0x8f,0xc2,0xb9), o3(0x8f,0xc2,0xba),
+     o3(0x8f,0xc2,0xbb), o3(0x8f,0xc2,0xbc),
+          o2(0xda,0xec),      o2(0xda,0xeb),
+          o2(0xda,0xf0), o3(0x8f,0xc2,0xbd),
+     o3(0x8f,0xc2,0xbe),      o2(0xda,0xf1),
+          o2(0xda,0xed),      o2(0xb3,0xa2),
+          o2(0xda,0xee),      o2(0xda,0xef),
+          o2(0xc8,0xd5), o3(0x8f,0xc2,0xc0),
+     o3(0x8f,0xc2,0xc1), o3(0x8f,0xc2,0xc2),
+          o2(0xc9,0xe1),      o2(0xb7,0xca),
+          o2(0xda,0xf2), o3(0x8f,0xc2,0xc4),
+          o2(0xc0,0xb2), o3(0x8f,0xc2,0xc5),
+          o2(0xbe,0xbd), o3(0x8f,0xc2,0xc7),
+     o3(0x8f,0xc2,0xc8), o3(0x8f,0xc2,0xc9),
+          o2(0xc3,0xd2), o3(0x8f,0xc2,0xca),
+     o3(0x8f,0xc2,0xcc), o3(0x8f,0xc2,0xc3),
+     o3(0x8f,0xc2,0xc6),
+
+#define to_EUC_JP_E6_99 WORDINDEX2INFO(21824)
+    to_EUC_JP_E6_99_offsets,
+    to_EUC_JP_E6_99_infos,
+
+#define to_EUC_JP_E6_9A_infos WORDINDEX2INFO(21826)
+                INVALID, o3(0x8f,0xc2,0xcb),
+          o2(0xb6,0xc7),              UNDEF,
+          o2(0xda,0xf3),      o2(0xda,0xf7),
+          o2(0xb2,0xcb),      o2(0xda,0xf4),
+          o2(0xda,0xf6), o3(0x8f,0xc2,0xcd),
+     o3(0x8f,0xc2,0xce), o3(0x8f,0xc2,0xcf),
+          o2(0xda,0xf5), o3(0x8f,0xc2,0xd0),
+          o2(0xbd,0xeb), o3(0x8f,0xc2,0xd1),
+          o2(0xc3,0xc8),      o2(0xb0,0xc5),
+          o2(0xda,0xf8), o3(0x8f,0xc2,0xd2),
+     o3(0x8f,0xc2,0xd3), o3(0x8f,0xc2,0xd4),
+     o3(0x8f,0xc2,0xd5),      o2(0xda,0xf9),
+     o3(0x8f,0xc2,0xd6), o3(0x8f,0xc2,0xd7),
+          o2(0xc4,0xaa), o3(0x8f,0xc2,0xd8),
+          o2(0xce,0xf1),      o2(0xbb,0xc3),
+     o3(0x8f,0xc2,0xd9),      o2(0xca,0xeb),
+     o3(0x8f,0xc2,0xda), o3(0x8f,0xc2,0xdb),
+          o2(0xcb,0xbd), o3(0x8f,0xc2,0xdc),
+          o2(0xdb,0xa2),      o2(0xda,0xfb),
+     o3(0x8f,0xc2,0xdd),      o2(0xda,0xfe),
+          o2(0xda,0xfd), o3(0x8f,0xc2,0xde),
+
+#define to_EUC_JP_E6_9A WORDINDEX2INFO(21868)
+    to_EUC_JP_E6_9A_offsets,
+    to_EUC_JP_E6_9A_infos,
+
+#define to_EUC_JP_E6_9B_infos WORDINDEX2INFO(21870)
+                INVALID, o3(0x8f,0xc2,0xdf),
+          o2(0xda,0xfa), o3(0x8f,0xc2,0xe0),
+     o3(0x8f,0xc2,0xe1),      o2(0xdb,0xa1),
+                  UNDEF,      o2(0xc6,0xde),
+     o3(0x8f,0xc2,0xe2),      o2(0xda,0xfc),
+     o3(0x8f,0xc2,0xe3), o3(0x8f,0xc2,0xe4),
+     o3(0x8f,0xc2,0xe5), o3(0x8f,0xc2,0xe6),
+          o2(0xdb,0xa3),      o2(0xbd,0xec),
+          o2(0xdb,0xa4), o3(0x8f,0xc2,0xe7),
+          o2(0xcd,0xcb),      o2(0xc7,0xf8),
+     o3(0x8f,0xc2,0xe8),      o2(0xdb,0xa5),
+          o2(0xdb,0xa7), o3(0x8f,0xc2,0xe9),
+          o2(0xdb,0xa8), o3(0x8f,0xc2,0xea),
+     o3(0x8f,0xc2,0xeb), o3(0x8f,0xc2,0xec),
+          o2(0xdb,0xa9),      o2(0xb6,0xca),
+          o2(0xb1,0xc8),      o2(0xb9,0xb9),
+          o2(0xdb,0xaa),      o2(0xdb,0xab),
+          o2(0xbd,0xf1),      o2(0xc1,0xe2),
+     o3(0x8f,0xc2,0xed), o3(0x8f,0xc2,0xbf),
+          o2(0xd2,0xd8),      o2(0xc1,0xbe),
+          o2(0xc1,0xbd),      o2(0xc2,0xd8),
+
+#define to_EUC_JP_E6_9B WORDINDEX2INFO(21912)
+    to_EUC_JP_E6_9B_offsets,
+    to_EUC_JP_E6_9B_infos,
+
+#define to_EUC_JP_E6_9C_infos WORDINDEX2INFO(21914)
+                INVALID,      o2(0xba,0xc7),
+                  UNDEF,      o2(0xd0,0xf2),
+     o3(0x8f,0xc2,0xee), o3(0x8f,0xc2,0xef),
+          o2(0xb7,0xee),      o2(0xcd,0xad),
+          o2(0xca,0xfe),      o2(0xc9,0xfe),
+     o3(0x8f,0xc2,0xf0),      o2(0xdb,0xac),
+     o3(0x8f,0xc2,0xf1),      o2(0xba,0xf3),
+          o2(0xc4,0xbf),      o2(0xdb,0xad),
+          o2(0xcf,0xaf), o3(0x8f,0xc2,0xf2),
+          o2(0xcb,0xbe), o3(0x8f,0xc2,0xf3),
+          o2(0xc4,0xab),      o2(0xdb,0xae),
+          o2(0xb4,0xfc), o3(0x8f,0xc2,0xf4),
+     o3(0x8f,0xc2,0xf5),      o2(0xdb,0xaf),
+          o2(0xdb,0xb0),      o2(0xcc,0xda),
+          o2(0xcc,0xa4),      o2(0xcb,0xf6),
+          o2(0xcb,0xdc),      o2(0xbb,0xa5),
+          o2(0xdb,0xb2),      o2(0xbc,0xeb),
+     o3(0x8f,0xc2,0xf6),      o2(0xcb,0xd1),
+          o2(0xdb,0xb4),      o2(0xdb,0xb7),
+          o2(0xdb,0xb6),      o2(0xb4,0xf9),
+          o2(0xb5,0xe0), o3(0x8f,0xc2,0xf7),
+          o2(0xdb,0xb3),
+
+#define to_EUC_JP_E6_9C WORDINDEX2INFO(21957)
+    to_EUC_JP_E6_9C_offsets,
+    to_EUC_JP_E6_9C_infos,
+
+#define to_EUC_JP_E6_9D_infos WORDINDEX2INFO(21959)
+                INVALID,              UNDEF,
+          o2(0xdb,0xb5), o3(0x8f,0xc2,0xf8),
+          o2(0xdb,0xb8), o3(0x8f,0xc2,0xf9),
+     o3(0x8f,0xc2,0xfa),      o2(0xbf,0xf9),
+     o3(0x8f,0xc2,0xfb),      o2(0xcd,0xfb),
+          o2(0xb0,0xc9),      o2(0xba,0xe0),
+          o2(0xc2,0xbc),      o2(0xbc,0xdd),
+     o3(0x8f,0xc2,0xfc), o3(0x8f,0xc2,0xfd),
+          o2(0xbe,0xf3),      o2(0xdb,0xbb),
+          o2(0xc5,0xce), o3(0x8f,0xc2,0xfe),
+          o2(0xdb,0xb9),      o2(0xc2,0xab),
+          o2(0xdb,0xba),      o2(0xbe,0xf2),
+          o2(0xcc,0xdd),      o2(0xdb,0xbc),
+          o2(0xdb,0xbd),      o2(0xcd,0xe8),
+     o3(0x8f,0xc3,0xa1),      o2(0xdb,0xc2),
+     o3(0x8f,0xc3,0xa2),      o2(0xb9,0xba),
+     o3(0x8f,0xc3,0xa3),      o2(0xc7,0xd5),
+          o2(0xdb,0xbf),      o2(0xc5,0xec),
+          o2(0xda,0xde),      o2(0xda,0xe2),
+     o3(0x8f,0xc3,0xa4),      o2(0xb5,0xcf),
+     o3(0x8f,0xc3,0xa5),      o2(0xc7,0xc7),
+     o3(0x8f,0xc3,0xa6),      o2(0xdb,0xc1),
+          o2(0xbe,0xbe),      o2(0xc8,0xc4),
+
+#define to_EUC_JP_E6_9D WORDINDEX2INFO(22005)
+    to_EUC_JP_E6_9D_offsets,
+    to_EUC_JP_E6_9D_infos,
+
+#define to_EUC_JP_E6_9E_infos WORDINDEX2INFO(22007)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc3,0xa7), o3(0x8f,0xc3,0xa8),
+          o2(0xdb,0xc7),      o2(0xc8,0xfa),
+          o2(0xdb,0xbe),      o2(0xdb,0xc4),
+          o2(0xdb,0xc3), o3(0x8f,0xc3,0xa9),
+     o3(0x8f,0xc3,0xaa),      o2(0xc0,0xcf),
+     o3(0x8f,0xc3,0xab), o3(0x8f,0xc3,0xac),
+          o2(0xcb,0xed), o3(0x8f,0xc3,0xad),
+          o2(0xce,0xd3), o3(0x8f,0xc3,0xae),
+     o3(0x8f,0xc3,0xaf),      o2(0xcb,0xe7),
+     o3(0x8f,0xc3,0xb0),      o2(0xb2,0xcc),
+          o2(0xbb,0xde),      o2(0xcf,0xc8),
+          o2(0xdb,0xc6),      o2(0xbf,0xf5),
+          o2(0xdb,0xc5),      o2(0xdb,0xc0),
+          o2(0xb8,0xcf), o3(0x8f,0xc3,0xb1),
+     o3(0x8f,0xc3,0xb2), o3(0x8f,0xc3,0xb3),
+          o2(0xdb,0xcc),      o2(0xdb,0xca),
+     o3(0x8f,0xc3,0xb4),      o2(0xb2,0xcd),
+          o2(0xdb,0xc8),      o2(0xdb,0xce),
+          o2(0xdb,0xd4), o3(0x8f,0xc3,0xb5),
+     o3(0x8f,0xc3,0xb6), o3(0x8f,0xc3,0xb7),
+
+#define to_EUC_JP_E6_9E WORDINDEX2INFO(22049)
+    to_EUC_JP_E6_9E_offsets,
+    to_EUC_JP_E6_9E_infos,
+
+#define to_EUC_JP_E6_9F_infos WORDINDEX2INFO(22051)
+                INVALID, o3(0x8f,0xc3,0xb9),
+          o2(0xc2,0xc8), o3(0x8f,0xc3,0xba),
+     o3(0x8f,0xc3,0xbb),      o2(0xca,0xc1),
+     o3(0x8f,0xc3,0xbc),      o2(0xdb,0xd6),
+                  UNDEF, o3(0x8f,0xc3,0xbd),
+     o3(0x8f,0xc3,0xbe),      o2(0xc9,0xa2),
+          o2(0xdb,0xd5),      o2(0xc7,0xf0),
+          o2(0xcb,0xbf),      o2(0xb4,0xbb),
+     o3(0x8f,0xc3,0xbf),      o2(0xc0,0xf7),
+          o2(0xbd,0xc0), o3(0x8f,0xc3,0xc0),
+          o2(0xc4,0xd3), o3(0x8f,0xc3,0xc1),
+          o2(0xcd,0xae), o3(0x8f,0xc3,0xc2),
+          o2(0xdb,0xd1),      o2(0xdb,0xd0),
+     o3(0x8f,0xc3,0xc3),      o2(0xdb,0xd2),
+          o2(0xdb,0xcf), o3(0x8f,0xc3,0xc4),
+          o2(0xdb,0xd7),      o2(0xdb,0xcd),
+          o2(0xdb,0xcb),      o2(0xdb,0xd3),
+          o2(0xdb,0xc9), o3(0x8f,0xc3,0xc5),
+          o2(0xc3,0xec), o3(0x8f,0xc3,0xc6),
+          o2(0xcc,0xf8),      o2(0xbc,0xc6),
+          o2(0xba,0xf4), o3(0x8f,0xc3,0xc7),
+     o3(0x8f,0xc3,0xc8), o3(0x8f,0xc3,0xb8),
+          o2(0xba,0xba),      o2(0xcb,0xef),
+          o2(0xb3,0xc1),
+
+#define to_EUC_JP_E6_9F WORDINDEX2INFO(22098)
+    to_EUC_JP_E6_9F_offsets,
+    to_EUC_JP_E6_9F_infos,
+
+#define to_EUC_JP_E6_A0_infos WORDINDEX2INFO(22100)
+                INVALID,              UNDEF,
+          o2(0xc4,0xce),      o2(0xc6,0xca),
+          o2(0xb1,0xc9),      o2(0xc0,0xf2),
+     o3(0x8f,0xc3,0xca),      o2(0xc0,0xb4),
+          o2(0xb7,0xaa), o3(0x8f,0xc3,0xcb),
+     o3(0x8f,0xc3,0xcc),      o2(0xdb,0xd9),
+     o3(0x8f,0xc3,0xcd),      o2(0xb9,0xbb),
+          o2(0xb3,0xfc), o3(0x8f,0xc3,0xcf),
+     o3(0x8f,0xc3,0xce),      o2(0xdb,0xdb),
+          o2(0xb3,0xf4),      o2(0xdb,0xe1),
+     o3(0x8f,0xc3,0xd0), o3(0x8f,0xc3,0xd1),
+     o3(0x8f,0xc3,0xd2), o3(0x8f,0xc3,0xd3),
+     o3(0x8f,0xc3,0xd4),      o2(0xdb,0xde),
+     o3(0x8f,0xc3,0xd5),      o2(0xc0,0xf3),
+          o2(0xb3,0xcb),      o2(0xba,0xac),
+     o3(0x8f,0xc3,0xd6),      o2(0xb3,0xca),
+          o2(0xba,0xcf), o3(0x8f,0xc3,0xd7),
+
+#define to_EUC_JP_E6_A0 WORDINDEX2INFO(22134)
+    to_EUC_JP_E6_A0_offsets,
+    to_EUC_JP_E6_A0_infos,
+
+#define to_EUC_JP_E6_A1_infos WORDINDEX2INFO(22136)
+                INVALID,      o2(0xdb,0xdc),
+          o2(0xb7,0xe5),      o2(0xb7,0xcb),
+          o2(0xc5,0xed), o3(0x8f,0xc3,0xd8),
+     o3(0x8f,0xc3,0xd9),      o2(0xdb,0xda),
+                  UNDEF,      o2(0xb0,0xc6),
+     o3(0x8f,0xc3,0xda), o3(0x8f,0xc3,0xdb),
+          o2(0xdb,0xdd),      o2(0xdb,0xdf),
+          o2(0xb6,0xcd),      o2(0xb7,0xac),
+     o3(0x8f,0xc3,0xc9),      o2(0xb4,0xbc),
+          o2(0xb5,0xcb), o3(0x8f,0xc3,0xdc),
+     o3(0x8f,0xc3,0xdd), o3(0x8f,0xc3,0xde),
+          o2(0xdb,0xe2), o3(0x8f,0xc3,0xdf),
+          o2(0xba,0xf9),      o2(0xcb,0xf1),
+          o2(0xbb,0xb7),      o2(0xdb,0xe3),
+          o2(0xc9,0xb0), o3(0x8f,0xc3,0xe0),
+     o3(0x8f,0xc3,0xe1), o3(0x8f,0xc3,0xe2),
+     o3(0x8f,0xc3,0xe3), o3(0x8f,0xc3,0xe4),
+     o3(0x8f,0xc3,0xe5),      o2(0xdb,0xef),
+     o3(0x8f,0xc3,0xe6),      o2(0xb2,0xb3),
+          o2(0xdb,0xe4), o3(0x8f,0xc3,0xe7),
+     o3(0x8f,0xc3,0xe8), o3(0x8f,0xc3,0xe9),
+     o3(0x8f,0xc3,0xea),      o2(0xdb,0xf5),
+          o2(0xdb,0xe5),
+
+#define to_EUC_JP_E6_A1 WORDINDEX2INFO(22181)
+    to_EUC_JP_E6_A1_offsets,
+    to_EUC_JP_E6_A1_infos,
+
+#define to_EUC_JP_E6_A2_infos WORDINDEX2INFO(22183)
+                INVALID,              UNDEF,
+          o2(0xce,0xc2), o3(0x8f,0xc3,0xeb),
+          o2(0xdb,0xec), o3(0x8f,0xc3,0xec),
+          o2(0xc7,0xdf), o3(0x8f,0xc3,0xed),
+     o3(0x8f,0xc3,0xee),      o2(0xdb,0xf4),
+          o2(0xdb,0xe7),      o2(0xb0,0xb4),
+          o2(0xdb,0xe9), o3(0x8f,0xc3,0xef),
+          o2(0xb9,0xbc), o3(0x8f,0xc3,0xf0),
+     o3(0x8f,0xc3,0xf1),      o2(0xdb,0xeb),
+     o3(0x8f,0xc3,0xf2),      o2(0xdb,0xea),
+          o2(0xdb,0xe6),      o2(0xdb,0xf1),
+     o3(0x8f,0xc3,0xf3),      o2(0xbe,0xbf),
+     o3(0x8f,0xc3,0xf4), o3(0x8f,0xc3,0xf5),
+          o2(0xd4,0xed),      o2(0xb8,0xe8),
+          o2(0xcd,0xfc), o3(0x8f,0xc3,0xf6),
+     o3(0x8f,0xc3,0xf7),      o2(0xdb,0xe8),
+     o3(0x8f,0xc3,0xf8),      o2(0xc4,0xf4),
+          o2(0xb3,0xa3),      o2(0xba,0xad),
+     o3(0x8f,0xc3,0xf9),      o2(0xdb,0xe0),
+          o2(0xdb,0xf0),      o2(0xb3,0xe1),
+          o2(0xdb,0xee),      o2(0xdb,0xf2),
+     o3(0x8f,0xc3,0xfa),      o2(0xc5,0xee),
+
+#define to_EUC_JP_E6_A2 WORDINDEX2INFO(22227)
+    to_EUC_JP_E6_A2_offsets,
+    to_EUC_JP_E6_A2_infos,
+
+#define to_EUC_JP_E6_A3_infos WORDINDEX2INFO(22229)
+                INVALID,              UNDEF,
+          o2(0xb4,0xfe), o3(0x8f,0xc3,0xfb),
+          o2(0xdc,0xb2), o3(0x8f,0xc3,0xfc),
+          o2(0xcc,0xc9),      o2(0xdb,0xf7),
+          o2(0xb4,0xfd), o3(0x8f,0xc3,0xfd),
+          o2(0xdb,0xfe), o3(0x8f,0xc3,0xfe),
+     o3(0x8f,0xc4,0xa1), o3(0x8f,0xc4,0xa2),
+          o2(0xcb,0xc0), o3(0x8f,0xc4,0xa3),
+          o2(0xdc,0xa1),      o2(0xdc,0xa3),
+     o3(0x8f,0xc4,0xa4),      o2(0xdc,0xa7),
+          o2(0xdb,0xf9), o3(0x8f,0xc4,0xa5),
+          o2(0xc3,0xaa), o3(0x8f,0xc4,0xa6),
+     o3(0x8f,0xc4,0xa7),      o2(0xc5,0xef),
+          o2(0xdc,0xab),      o2(0xdb,0xfc),
+          o2(0xdc,0xa8), o3(0x8f,0xc4,0xa8),
+          o2(0xdc,0xa2), o3(0x8f,0xc4,0xa9),
+     o3(0x8f,0xc4,0xaa), o3(0x8f,0xc4,0xab),
+     o3(0x8f,0xc4,0xac), o3(0x8f,0xc4,0xad),
+          o2(0xbf,0xb9),      o2(0xdc,0xac),
+     o3(0x8f,0xc4,0xae), o3(0x8f,0xc4,0xaf),
+          o2(0xc0,0xb3), o3(0x8f,0xc4,0xb0),
+     o3(0x8f,0xc4,0xb1),      o2(0xdc,0xaa),
+          o2(0xb4,0xbd), o3(0x8f,0xc4,0xb2),
+     o3(0x8f,0xc4,0xb3), o3(0x8f,0xc4,0xb4),
+
+#define to_EUC_JP_E6_A3 WORDINDEX2INFO(22277)
+    to_EUC_JP_E6_A3_offsets,
+    to_EUC_JP_E6_A3_infos,
+
+#define to_EUC_JP_E6_A4_infos WORDINDEX2INFO(22279)
+                INVALID,      o2(0xcf,0xd0),
+          o2(0xdb,0xf6),              UNDEF,
+          o2(0xdc,0xa6),      o2(0xb0,0xd8),
+     o3(0x8f,0xc4,0xb5),      o2(0xdb,0xf8),
+     o3(0x8f,0xc4,0xb6), o3(0x8f,0xc4,0xb7),
+          o2(0xcc,0xba),      o2(0xdb,0xfd),
+          o2(0xbf,0xa2),      o2(0xc4,0xc7),
+          o2(0xdb,0xf3), o3(0x8f,0xc4,0xb8),
+     o3(0x8f,0xc4,0xb9),      o2(0xdc,0xa5),
+     o3(0x8f,0xc4,0xba), o3(0x8f,0xc4,0xbb),
+     o3(0x8f,0xc4,0xbc),      o2(0xbf,0xfa),
+          o2(0xdc,0xaf),      o2(0xb3,0xf1),
+          o2(0xb8,0xa1),      o2(0xdc,0xb1),
+          o2(0xdb,0xfa),      o2(0xdc,0xb0),
+          o2(0xdc,0xa9),      o2(0xdb,0xfb),
+          o2(0xdc,0xad),      o2(0xdc,0xae),
+          o2(0xdc,0xbf), o3(0x8f,0xc4,0xbd),
+     o3(0x8f,0xc4,0xbe),      o2(0xc6,0xce),
+     o3(0x8f,0xc4,0xbf),      o2(0xdc,0xa4),
+     o3(0x8f,0xc4,0xc0),      o2(0xdc,0xbb),
+     o3(0x8f,0xc4,0xc1),      o2(0xdc,0xbd),
+          o2(0xc4,0xd8),
+
+#define to_EUC_JP_E6_A4 WORDINDEX2INFO(22322)
+    to_EUC_JP_E6_A4_offsets,
+    to_EUC_JP_E6_A4_infos,
+
+#define to_EUC_JP_E6_A5_infos WORDINDEX2INFO(22324)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc4,0xc2), o3(0x8f,0xc4,0xc3),
+     o3(0x8f,0xc4,0xc4),      o2(0xcd,0xcc),
+     o3(0x8f,0xc4,0xc5),      o2(0xc9,0xf6),
+          o2(0xdc,0xb8),      o2(0xc2,0xca),
+     o3(0x8f,0xc4,0xc6),      o2(0xdc,0xbe),
+          o2(0xc1,0xbf), o3(0x8f,0xc4,0xc7),
+          o2(0xdc,0xb5),      o2(0xdc,0xc2),
+          o2(0xdc,0xc1),      o2(0xc6,0xef),
+          o2(0xdc,0xc0),      o2(0xc6,0xea),
+     o3(0x8f,0xc4,0xc8), o3(0x8f,0xc4,0xc9),
+     o3(0x8f,0xc4,0xca), o3(0x8f,0xc4,0xcb),
+     o3(0x8f,0xc4,0xcc), o3(0x8f,0xc4,0xcd),
+          o2(0xdc,0xc4),      o2(0xdc,0xb7),
+     o3(0x8f,0xc4,0xce),      o2(0xb6,0xc8),
+          o2(0xdc,0xba),      o2(0xbd,0xdd),
+     o3(0x8f,0xc4,0xcf), o3(0x8f,0xc4,0xd0),
+     o3(0x8f,0xc4,0xd1),      o2(0xc7,0xe0),
+          o2(0xdc,0xbc),      o2(0xb6,0xcb),
+          o2(0xdc,0xb4),      o2(0xdc,0xb6),
+          o2(0xdc,0xb3), o3(0x8f,0xc4,0xd2),
+     o3(0x8f,0xc4,0xd3),      o2(0xcf,0xb0),
+          o2(0xb3,0xda),      o2(0xdc,0xb9),
+     o3(0x8f,0xc4,0xd4),
+
+#define to_EUC_JP_E6_A5 WORDINDEX2INFO(22371)
+    to_EUC_JP_E6_A5_offsets,
+    to_EUC_JP_E6_A5_infos,
+
+#define to_EUC_JP_E6_A6_infos WORDINDEX2INFO(22373)
+                INVALID, o3(0x8f,0xc4,0xd5),
+          o2(0xdc,0xc3),      o2(0xb3,0xb5),
+                  UNDEF,      o2(0xba,0xe7),
+     o3(0x8f,0xc4,0xd6),      o2(0xb1,0xdd),
+          o2(0xdc,0xd4), o3(0x8f,0xc4,0xd7),
+          o2(0xcf,0xb1),      o2(0xdc,0xd7),
+     o3(0x8f,0xc4,0xd8), o3(0x8f,0xc4,0xd9),
+          o2(0xbf,0xba),      o2(0xdc,0xd6),
+          o2(0xdc,0xd5), o3(0x8f,0xc4,0xda),
+     o3(0x8f,0xc4,0xdb), o3(0x8f,0xc4,0xdc),
+          o2(0xdc,0xd2), o3(0x8f,0xc4,0xdd),
+     o3(0x8f,0xc4,0xde), o3(0x8f,0xc4,0xdf),
+          o2(0xdc,0xc6), o3(0x8f,0xc4,0xe0),
+          o2(0xdc,0xe3),      o2(0xdc,0xc5),
+          o2(0xdc,0xd8), o3(0x8f,0xc4,0xe1),
+     o3(0x8f,0xc4,0xe2), o3(0x8f,0xc4,0xe3),
+          o2(0xdc,0xd0), o3(0x8f,0xc4,0xe4),
+          o2(0xdc,0xcb),      o2(0xdc,0xc8),
+
+#define to_EUC_JP_E6_A6 WORDINDEX2INFO(22409)
+    to_EUC_JP_E6_A6_offsets,
+    to_EUC_JP_E6_A6_infos,
+
+#define to_EUC_JP_E6_A7_infos WORDINDEX2INFO(22411)
+                INVALID,              UNDEF,
+          o2(0xdc,0xc9),      o2(0xdc,0xd1),
+     o3(0x8f,0xc4,0xe5),      o2(0xf4,0xa2),
+     o3(0x8f,0xc4,0xe6),      o2(0xdc,0xce),
+          o2(0xb9,0xbd),      o2(0xc4,0xc8),
+          o2(0xc1,0xe4),      o2(0xdc,0xcc),
+          o2(0xdc,0xc7), o3(0x8f,0xc4,0xe7),
+          o2(0xdc,0xca), o3(0x8f,0xc4,0xe8),
+     o3(0x8f,0xc4,0xe9),      o2(0xcd,0xcd),
+          o2(0xcb,0xea),      o2(0xdc,0xcf),
+          o2(0xdc,0xd9), o3(0x8f,0xc4,0xea),
+     o3(0x8f,0xc4,0xeb),      o2(0xdc,0xe1),
+          o2(0xdc,0xda),      o2(0xdc,0xe7),
+          o2(0xdc,0xe5), o3(0x8f,0xc4,0xec),
+     o3(0x8f,0xc4,0xed), o3(0x8f,0xc4,0xee),
+          o2(0xdc,0xe0), o3(0x8f,0xc4,0xef),
+     o3(0x8f,0xc4,0xf0),      o2(0xdc,0xdf),
+          o2(0xc4,0xd0),      o2(0xc1,0xe5),
+     o3(0x8f,0xc4,0xf1),      o2(0xdc,0xdd),
+
+#define to_EUC_JP_E6_A7 WORDINDEX2INFO(22449)
+    to_EUC_JP_E6_A7_offsets,
+    to_EUC_JP_E6_A7_infos,
+
+#define to_EUC_JP_E6_A8_infos WORDINDEX2INFO(22451)
+                INVALID, o3(0x8f,0xc4,0xf2),
+     o3(0x8f,0xc4,0xf3),      o2(0xdc,0xdb),
+     o3(0x8f,0xc4,0xf4),              UNDEF,
+          o2(0xdc,0xe2),      o2(0xdc,0xe8),
+          o2(0xc8,0xf5),      o2(0xdc,0xee),
+     o3(0x8f,0xc4,0xf5), o3(0x8f,0xc4,0xf6),
+          o2(0xdc,0xe9),      o2(0xdc,0xec),
+          o2(0xdc,0xe6), o3(0x8f,0xc4,0xf7),
+          o2(0xc3,0xf4),      o2(0xc9,0xb8),
+     o3(0x8f,0xc4,0xf8),      o2(0xdc,0xdc),
+     o3(0x8f,0xc4,0xf9),      o2(0xdc,0xe4),
+          o2(0xbe,0xc0), o3(0x8f,0xc4,0xfa),
+          o2(0xcc,0xcf),      o2(0xdc,0xf8),
+          o2(0xdc,0xeb), o3(0x8f,0xc4,0xfb),
+     o3(0x8f,0xc4,0xfc),      o2(0xb8,0xa2),
+          o2(0xb2,0xa3),      o2(0xb3,0xdf),
+          o2(0xdc,0xd3), o3(0x8f,0xc4,0xfd),
+     o3(0x8f,0xc4,0xfe), o3(0x8f,0xc5,0xa1),
+          o2(0xbe,0xc1),      o2(0xdc,0xf0),
+     o3(0x8f,0xc5,0xa2),      o2(0xdc,0xf7),
+          o2(0xbc,0xf9),      o2(0xb3,0xf2),
+     o3(0x8f,0xc5,0xa3),      o2(0xc3,0xae),
+     o3(0x8f,0xc5,0xa4), o3(0x8f,0xc5,0xa5),
+
+#define to_EUC_JP_E6_A8 WORDINDEX2INFO(22497)
+    to_EUC_JP_E6_A8_offsets,
+    to_EUC_JP_E6_A8_infos,
+
+#define to_EUC_JP_E6_A9_infos WORDINDEX2INFO(22499)
+                INVALID,              UNDEF,
+          o2(0xdc,0xed), o3(0x8f,0xc5,0xa6),
+     o3(0x8f,0xc5,0xa7),      o2(0xdc,0xf2),
+          o2(0xdc,0xf6), o3(0x8f,0xc5,0xa8),
+     o3(0x8f,0xc5,0xa9),      o2(0xb6,0xb6),
+     o3(0x8f,0xc5,0xaa), o3(0x8f,0xc5,0xab),
+     o3(0x8f,0xc5,0xac), o3(0x8f,0xc5,0xad),
+     o3(0x8f,0xc5,0xae), o3(0x8f,0xc5,0xaf),
+          o2(0xb5,0xcc),      o2(0xdc,0xf4),
+     o3(0x8f,0xc5,0xb0),      o2(0xb5,0xa1),
+          o2(0xc6,0xcb),      o2(0xdc,0xf3),
+     o3(0x8f,0xc5,0xb1),      o2(0xdc,0xf5),
+     o3(0x8f,0xc5,0xb2), o3(0x8f,0xc5,0xb3),
+     o3(0x8f,0xc5,0xb4),      o2(0xdc,0xef),
+     o3(0x8f,0xc5,0xb5),      o2(0xdc,0xf1),
+     o3(0x8f,0xc5,0xb6),      o2(0xb3,0xe0),
+
+#define to_EUC_JP_E6_A9 WORDINDEX2INFO(22531)
+    to_EUC_JP_E6_A9_offsets,
+    to_EUC_JP_E6_A9_infos,
+
+#define to_EUC_JP_E6_AA_infos WORDINDEX2INFO(22533)
+                INVALID,      o2(0xc3,0xc9),
+     o3(0x8f,0xc5,0xb7),              UNDEF,
+     o3(0x8f,0xc5,0xb8),      o2(0xdc,0xfc),
+     o3(0x8f,0xc5,0xb9), o3(0x8f,0xc5,0xba),
+     o3(0x8f,0xc5,0xbb), o3(0x8f,0xc5,0xbc),
+          o2(0xdc,0xfa),      o2(0xb8,0xe9),
+          o2(0xdc,0xf9), o3(0x8f,0xc5,0xbd),
+          o2(0xdd,0xa1), o3(0x8f,0xc5,0xbe),
+          o2(0xdb,0xd8), o3(0x8f,0xc5,0xbf),
+     o3(0x8f,0xc5,0xc0), o3(0x8f,0xc5,0xc1),
+          o2(0xdc,0xfb),      o2(0xdc,0xfd),
+          o2(0xdc,0xfe), o3(0x8f,0xc5,0xc2),
+          o2(0xdd,0xac), o3(0x8f,0xc5,0xc3),
+          o2(0xdd,0xa8),      o2(0xdb,0xed),
+     o3(0x8f,0xc5,0xc4), o3(0x8f,0xc5,0xc5),
+     o3(0x8f,0xc5,0xc6),      o2(0xdd,0xa7),
+     o3(0x8f,0xc5,0xc7),      o2(0xdd,0xa6),
+          o2(0xdd,0xa3), o3(0x8f,0xc5,0xc8),
+     o3(0x8f,0xc5,0xc9), o3(0x8f,0xc5,0xca),
+
+#define to_EUC_JP_E6_AA WORDINDEX2INFO(22571)
+    to_EUC_JP_E6_AA_offsets,
+    to_EUC_JP_E6_AA_infos,
+
+#define to_EUC_JP_E6_AB_infos WORDINDEX2INFO(22573)
+                INVALID,              UNDEF,
+          o2(0xdc,0xea),      o2(0xdd,0xa5),
+          o2(0xdd,0xa4), o3(0x8f,0xc5,0xcb),
+     o3(0x8f,0xc5,0xcd), o3(0x8f,0xc5,0xcc),
+     o3(0x8f,0xc5,0xce), o3(0x8f,0xc5,0xcf),
+          o2(0xdd,0xaa),      o2(0xcf,0xa6),
+     o3(0x8f,0xc5,0xd0), o3(0x8f,0xc5,0xd1),
+     o3(0x8f,0xc5,0xd2),      o2(0xdd,0xad),
+          o2(0xb6,0xfb), o3(0x8f,0xc5,0xd3),
+     o3(0x8f,0xc5,0xd4),      o2(0xdd,0xa9),
+          o2(0xdd,0xab), o3(0x8f,0xc5,0xd5),
+     o3(0x8f,0xc5,0xd6),      o2(0xc8,0xa7),
+          o2(0xdd,0xae), o3(0x8f,0xc5,0xd7),
+     o3(0x8f,0xc5,0xd8), o3(0x8f,0xc5,0xd9),
+     o3(0x8f,0xc5,0xda),      o2(0xdd,0xb2),
+          o2(0xdd,0xaf), o3(0x8f,0xc5,0xdb),
+     o3(0x8f,0xc5,0xdc),
+
+#define to_EUC_JP_E6_AB WORDINDEX2INFO(22606)
+    to_EUC_JP_E6_AB_offsets,
+    to_EUC_JP_E6_AB_infos,
+
+#define to_EUC_JP_E6_AC_infos WORDINDEX2INFO(22608)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc5,0xdd), o3(0x8f,0xc5,0xde),
+          o2(0xcd,0xf3),      o2(0xdd,0xb0),
+     o3(0x8f,0xc5,0xdf), o3(0x8f,0xc5,0xe0),
+     o3(0x8f,0xc5,0xe1),      o2(0xdc,0xde),
+     o3(0x8f,0xc5,0xe2), o3(0x8f,0xc5,0xe3),
+     o3(0x8f,0xc5,0xe4),      o2(0xdd,0xb3),
+          o2(0xdd,0xb4), o3(0x8f,0xc5,0xe5),
+     o3(0x8f,0xc5,0xe6),      o2(0xb1,0xb5),
+     o3(0x8f,0xc5,0xe7),      o2(0xdd,0xb6),
+          o2(0xb7,0xe7),      o2(0xbc,0xa1),
+          o2(0xb6,0xd5), o3(0x8f,0xc5,0xe8),
+          o2(0xb2,0xa4), o3(0x8f,0xc5,0xe9),
+     o3(0x8f,0xc5,0xea), o3(0x8f,0xc5,0xeb),
+     o3(0x8f,0xc5,0xec),      o2(0xcd,0xdf),
+     o3(0x8f,0xc5,0xed), o3(0x8f,0xc5,0xee),
+          o2(0xdd,0xb8),      o2(0xdd,0xb7),
+          o2(0xdd,0xba),      o2(0xb5,0xbd),
+     o3(0x8f,0xc5,0xef),      o2(0xb6,0xd6),
+          o2(0xb4,0xbe), o3(0x8f,0xc5,0xf0),
+
+#define to_EUC_JP_E6_AC WORDINDEX2INFO(22648)
+    to_EUC_JP_E6_AC_offsets,
+    to_EUC_JP_E6_AC_infos,
+
+#define to_EUC_JP_E6_AD_infos WORDINDEX2INFO(22650)
+                INVALID,              UNDEF,
+          o2(0xdd,0xbd), o3(0x8f,0xc5,0xf1),
+          o2(0xdd,0xbc),      o2(0xdd,0xbe),
+     o3(0x8f,0xc5,0xf2),      o2(0xb2,0xce),
+     o3(0x8f,0xc5,0xf3),      o2(0xc3,0xb7),
+          o2(0xdd,0xbf), o3(0x8f,0xc5,0xf4),
+          o2(0xb4,0xbf),      o2(0xdd,0xc1),
+     o3(0x8f,0xc5,0xf5), o3(0x8f,0xc5,0xf6),
+          o2(0xdd,0xc0),      o2(0xdd,0xc2),
+     o3(0x8f,0xc5,0xf7),      o2(0xdd,0xc3),
+     o3(0x8f,0xc5,0xf8),      o2(0xdd,0xc4),
+          o2(0xbb,0xdf),      o2(0xc0,0xb5),
+          o2(0xba,0xa1),      o2(0xc9,0xf0),
+     o3(0x8f,0xc5,0xf9),      o2(0xca,0xe2),
+          o2(0xcf,0xc4), o3(0x8f,0xc5,0xfa),
+     o3(0x8f,0xc5,0xfb),      o2(0xbb,0xf5),
+     o3(0x8f,0xc5,0xfc),      o2(0xba,0xd0),
+          o2(0xce,0xf2), o3(0x8f,0xc5,0xfd),
+          o2(0xdd,0xc5),      o2(0xdd,0xc6),
+          o2(0xbb,0xe0), o3(0x8f,0xc5,0xfe),
+     o3(0x8f,0xc6,0xa1),      o2(0xdd,0xc7),
+
+#define to_EUC_JP_E6_AD WORDINDEX2INFO(22692)
+    to_EUC_JP_E6_AD_offsets,
+    to_EUC_JP_E6_AD_infos,
+
+#define to_EUC_JP_E6_AE_infos WORDINDEX2INFO(22694)
+                INVALID,      o2(0xdd,0xc8),
+                  UNDEF, o3(0x8f,0xc6,0xa2),
+          o2(0xdd,0xca),      o2(0xdd,0xc9),
+     o3(0x8f,0xc6,0xa3),      o2(0xcb,0xd8),
+          o2(0xbd,0xde),      o2(0xbc,0xec),
+          o2(0xbb,0xc4),      o2(0xdd,0xcb),
+          o2(0xdd,0xcd),      o2(0xbf,0xa3),
+     o3(0x8f,0xc6,0xa4),      o2(0xdd,0xcc),
+     o3(0x8f,0xc6,0xa5),      o2(0xdd,0xce),
+     o3(0x8f,0xc6,0xa6), o3(0x8f,0xc6,0xa7),
+     o3(0x8f,0xc6,0xa8), o3(0x8f,0xc6,0xa9),
+          o2(0xdd,0xcf), o3(0x8f,0xc6,0xaa),
+     o3(0x8f,0xc6,0xab),      o2(0xdd,0xd0),
+          o2(0xdd,0xd1), o3(0x8f,0xc6,0xac),
+     o3(0x8f,0xc6,0xad), o3(0x8f,0xc6,0xae),
+          o2(0xdd,0xd2), o3(0x8f,0xc6,0xaf),
+          o2(0xdd,0xd4),      o2(0xdd,0xd3),
+          o2(0xdd,0xd5),      o2(0xb2,0xa5),
+          o2(0xc3,0xca),      o2(0xdd,0xd6),
+     o3(0x8f,0xc6,0xb0), o3(0x8f,0xc6,0xb1),
+          o2(0xbb,0xa6),      o2(0xb3,0xcc),
+          o2(0xdd,0xd7), o3(0x8f,0xc6,0xb2),
+     o3(0x8f,0xc6,0xb3),      o2(0xc5,0xc2),
+
+#define to_EUC_JP_E6_AE WORDINDEX2INFO(22740)
+    to_EUC_JP_E6_AE_offsets,
+    to_EUC_JP_E6_AE_infos,
+
+#define to_EUC_JP_E6_AF_infos WORDINDEX2INFO(22742)
+                INVALID,      o2(0xd4,0xcc),
+                  UNDEF, o3(0x8f,0xc6,0xb4),
+     o3(0x8f,0xc6,0xb5),      o2(0xb5,0xa3),
+          o2(0xdd,0xd8), o3(0x8f,0xc6,0xb6),
+          o2(0xdd,0xd9), o3(0x8f,0xc6,0xb7),
+          o2(0xca,0xec),      o2(0xcb,0xe8),
+          o2(0xc6,0xc7),      o2(0xdd,0xda),
+          o2(0xc8,0xe6), o3(0x8f,0xc6,0xb8),
+          o2(0xc8,0xfb), o3(0x8f,0xc6,0xb9),
+          o2(0xcc,0xd3),      o2(0xdd,0xdb),
+     o3(0x8f,0xc6,0xba), o3(0x8f,0xc6,0xbb),
+     o3(0x8f,0xc6,0xbc), o3(0x8f,0xc6,0xbd),
+          o2(0xdd,0xdd),      o2(0xdd,0xdc),
+     o3(0x8f,0xc6,0xbe),      o2(0xdd,0xdf),
+     o3(0x8f,0xc6,0xbf),      o2(0xdd,0xde),
+     o3(0x8f,0xc6,0xc0), o3(0x8f,0xc6,0xc1),
+     o3(0x8f,0xc6,0xc2),
+
+#define to_EUC_JP_E6_AF WORDINDEX2INFO(22775)
+    to_EUC_JP_E6_AF_offsets,
+    to_EUC_JP_E6_AF_infos,
+
+#define to_EUC_JP_E6_B0_infos WORDINDEX2INFO(22777)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc6,0xc3), o3(0x8f,0xc6,0xc4),
+     o3(0x8f,0xc6,0xc5),      o2(0xdd,0xe1),
+     o3(0x8f,0xc6,0xc6), o3(0x8f,0xc6,0xc7),
+     o3(0x8f,0xc6,0xc8),      o2(0xbb,0xe1),
+     o3(0x8f,0xc6,0xc9),      o2(0xcc,0xb1),
+     o3(0x8f,0xc6,0xca),      o2(0xdd,0xe2),
+          o2(0xdd,0xe3),      o2(0xb5,0xa4),
+     o3(0x8f,0xc6,0xcb),      o2(0xdd,0xe4),
+     o3(0x8f,0xc6,0xcc),      o2(0xdd,0xe6),
+          o2(0xdd,0xe5), o3(0x8f,0xc6,0xcd),
+     o3(0x8f,0xc6,0xce), o3(0x8f,0xc6,0xcf),
+     o3(0x8f,0xc6,0xd0), o3(0x8f,0xc6,0xd1),
+     o3(0x8f,0xc6,0xd2),      o2(0xbf,0xe5),
+     o3(0x8f,0xc6,0xd3), o3(0x8f,0xc6,0xd4),
+          o2(0xc9,0xb9),      o2(0xb1,0xca),
+     o3(0x8f,0xc6,0xd5), o3(0x8f,0xc6,0xd6),
+          o2(0xc8,0xc5), o3(0x8f,0xc6,0xd7),
+
+#define to_EUC_JP_E6_B0 WORDINDEX2INFO(22813)
+    to_EUC_JP_E6_B0_offsets,
+    to_EUC_JP_E6_B0_infos,
+
+#define to_EUC_JP_E6_B1_infos WORDINDEX2INFO(22815)
+                INVALID,      o2(0xc4,0xf5),
+          o2(0xbd,0xc1),      o2(0xb5,0xe1),
+                  UNDEF, o3(0x8f,0xc6,0xd8),
+     o3(0x8f,0xc6,0xd9), o3(0x8f,0xc6,0xda),
+          o2(0xc8,0xc6), o3(0x8f,0xc6,0xdb),
+          o2(0xbc,0xae), o3(0x8f,0xc6,0xdc),
+     o3(0x8f,0xc6,0xdd),      o2(0xdd,0xe8),
+          o2(0xb4,0xc0), o3(0x8f,0xc6,0xde),
+          o2(0xb1,0xf8), o3(0x8f,0xc6,0xdf),
+     o3(0x8f,0xc6,0xe0),      o2(0xc6,0xf2),
+          o2(0xdd,0xe7),      o2(0xb9,0xbe),
+          o2(0xc3,0xd3),      o2(0xdd,0xe9),
+     o3(0x8f,0xc7,0xb6),      o2(0xdd,0xf1),
+          o2(0xdd,0xea), o3(0x8f,0xc6,0xe1),
+     o3(0x8f,0xc6,0xe2), o3(0x8f,0xc6,0xe3),
+          o2(0xc2,0xc1),      o2(0xb5,0xe2),
+          o2(0xdd,0xf2), o3(0x8f,0xc6,0xe4),
+     o3(0x8f,0xc6,0xe5), o3(0x8f,0xc6,0xe6),
+     o3(0x8f,0xc6,0xe7),      o2(0xb7,0xe8),
+     o3(0x8f,0xc6,0xe8),      o2(0xb5,0xa5),
+          o2(0xdd,0xf0),
+
+#define to_EUC_JP_E6_B1 WORDINDEX2INFO(22856)
+    to_EUC_JP_E6_B1_offsets,
+    to_EUC_JP_E6_B1_infos,
+
+#define to_EUC_JP_E6_B2_infos WORDINDEX2INFO(22858)
+                INVALID,              UNDEF,
+          o2(0xdd,0xee),      o2(0xdd,0xeb),
+          o2(0xcd,0xe0), o3(0x8f,0xc6,0xe9),
+     o3(0x8f,0xc6,0xea), o3(0x8f,0xc6,0xeb),
+          o2(0xc4,0xc0), o3(0x8f,0xc6,0xec),
+          o2(0xc6,0xd9),      o2(0xdd,0xec),
+          o2(0xdd,0xf4),      o2(0xdd,0xf3),
+          o2(0xb7,0xa3), o3(0x8f,0xc6,0xed),
+     o3(0x8f,0xc6,0xee),      o2(0xb2,0xad),
+     o3(0x8f,0xc6,0xef), o3(0x8f,0xc6,0xf0),
+          o2(0xba,0xbb),      o2(0xdd,0xed),
+          o2(0xdd,0xef), o3(0x8f,0xc6,0xf1),
+     o3(0x8f,0xc6,0xf2),      o2(0xcb,0xd7),
+          o2(0xc2,0xf4),      o2(0xcb,0xf7),
+          o2(0xdd,0xfc), o3(0x8f,0xc6,0xf3),
+          o2(0xdd,0xfd), o3(0x8f,0xc6,0xf4),
+          o2(0xb2,0xcf), o3(0x8f,0xc6,0xf5),
+          o2(0xca,0xa8),      o2(0xcc,0xfd),
+          o2(0xde,0xa1),      o2(0xbc,0xa3),
+          o2(0xbe,0xc2),      o2(0xdd,0xf8),
+          o2(0xdd,0xfe),      o2(0xb1,0xe8),
+
+#define to_EUC_JP_E6_B2 WORDINDEX2INFO(22900)
+    to_EUC_JP_E6_B2_offsets,
+    to_EUC_JP_E6_B2_infos,
+
+#define to_EUC_JP_E6_B3_infos WORDINDEX2INFO(22902)
+                INVALID,              UNDEF,
+          o2(0xb6,0xb7), o3(0x8f,0xc6,0xf6),
+          o2(0xdd,0xf5),      o2(0xdd,0xfa),
+     o3(0x8f,0xc6,0xf7),      o2(0xc0,0xf4),
+          o2(0xc7,0xf1),      o2(0xc8,0xe7),
+     o3(0x8f,0xc6,0xf8), o3(0x8f,0xc6,0xf9),
+     o3(0x8f,0xc6,0xfa), o3(0x8f,0xc6,0xfb),
+     o3(0x8f,0xc6,0xfc),      o2(0xdd,0xf7),
+     o3(0x8f,0xc6,0xfd),      o2(0xcb,0xa1),
+     o3(0x8f,0xc6,0xfe),      o2(0xdd,0xf9),
+          o2(0xde,0xa4), o3(0x8f,0xc7,0xa1),
+          o2(0xde,0xa2), o3(0x8f,0xc7,0xa2),
+          o2(0xdd,0xfb), o3(0x8f,0xc7,0xa3),
+          o2(0xcb,0xa2),      o2(0xc7,0xc8),
+          o2(0xb5,0xe3),      o2(0xc5,0xa5),
+     o3(0x8f,0xc7,0xa4),      o2(0xc3,0xed),
+     o3(0x8f,0xc7,0xa5),      o2(0xde,0xa5),
+     o3(0x8f,0xc7,0xa6), o3(0x8f,0xc7,0xa7),
+     o3(0x8f,0xc7,0xa8),      o2(0xde,0xa3),
+          o2(0xc2,0xd9),      o2(0xdd,0xf6),
+     o3(0x8f,0xc7,0xa9),      o2(0xb1,0xcb),
+     o3(0x8f,0xc7,0xaa),
+
+#define to_EUC_JP_E6_B3 WORDINDEX2INFO(22945)
+    to_EUC_JP_E6_B3_offsets,
+    to_EUC_JP_E6_B3_infos,
+
+#define to_EUC_JP_E6_B4_infos WORDINDEX2INFO(22947)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc7,0xab), o3(0x8f,0xc7,0xac),
+     o3(0x8f,0xc7,0xad),      o2(0xcd,0xce),
+          o2(0xde,0xb0), o3(0x8f,0xc7,0xae),
+     o3(0x8f,0xc7,0xaf), o3(0x8f,0xc7,0xb0),
+          o2(0xde,0xaf), o3(0x8f,0xc7,0xb1),
+          o2(0xc0,0xf6),      o2(0xde,0xac),
+     o3(0x8f,0xc7,0xb2),      o2(0xcd,0xec),
+          o2(0xc6,0xb6),      o2(0xde,0xa6),
+          o2(0xc4,0xc5), o3(0x8f,0xc7,0xb3),
+     o3(0x8f,0xc7,0xb4), o3(0x8f,0xc7,0xb5),
+          o2(0xb1,0xcc),      o2(0xb9,0xbf),
+          o2(0xde,0xa9), o3(0x8f,0xc7,0xb7),
+     o3(0x8f,0xc7,0xb8), o3(0x8f,0xc7,0xb9),
+          o2(0xbd,0xa7),      o2(0xde,0xae),
+          o2(0xde,0xad),      o2(0xde,0xa8),
+          o2(0xde,0xab), o3(0x8f,0xc7,0xba),
+          o2(0xb3,0xe8), o3(0x8f,0xc7,0xbb),
+          o2(0xde,0xaa),      o2(0xc7,0xc9),
+     o3(0x8f,0xc7,0xbc),
+
+#define to_EUC_JP_E6_B4 WORDINDEX2INFO(22986)
+    to_EUC_JP_E6_B4_offsets,
+    to_EUC_JP_E6_B4_infos,
+
+#define to_EUC_JP_E6_B5_infos WORDINDEX2INFO(22988)
+                INVALID,              UNDEF,
+          o2(0xce,0xae),      o2(0xbe,0xf4),
+          o2(0xc0,0xf5), o3(0x8f,0xc7,0xbd),
+          o2(0xde,0xb6),      o2(0xde,0xb4),
+          o2(0xc9,0xcd), o3(0x8f,0xc7,0xbe),
+     o3(0x8f,0xc7,0xbf), o3(0x8f,0xc7,0xc0),
+          o2(0xde,0xb1),      o2(0xde,0xb3),
+     o3(0x8f,0xc7,0xc1),      o2(0xb1,0xba),
+     o3(0x8f,0xc7,0xc2),      o2(0xb9,0xc0),
+          o2(0xcf,0xb2),      o2(0xb3,0xbd),
+          o2(0xc9,0xe2), o3(0x8f,0xc7,0xc3),
+     o3(0x8f,0xc7,0xc4),      o2(0xcd,0xe1),
+          o2(0xb3,0xa4),      o2(0xbf,0xbb),
+          o2(0xde,0xb5), o3(0x8f,0xc7,0xc5),
+
+#define to_EUC_JP_E6_B5 WORDINDEX2INFO(23016)
+    to_EUC_JP_E6_B5_offsets,
+    to_EUC_JP_E6_B5_infos,
+
+#define to_EUC_JP_E6_B6_infos WORDINDEX2INFO(23018)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc7,0xc6),      o2(0xde,0xba),
+     o3(0x8f,0xc7,0xc7),      o2(0xbe,0xc3),
+          o2(0xcd,0xb0),      o2(0xde,0xb7),
+     o3(0x8f,0xc7,0xc8), o3(0x8f,0xc7,0xc9),
+          o2(0xde,0xb2), o3(0x8f,0xc7,0xca),
+          o2(0xde,0xb8), o3(0x8f,0xc7,0xcb),
+     o3(0x8f,0xc7,0xcc), o3(0x8f,0xc7,0xcd),
+          o2(0xce,0xde),      o2(0xc5,0xf3),
+          o2(0xc6,0xc2), o3(0x8f,0xc7,0xce),
+     o3(0x8f,0xc7,0xcf),      o2(0xb3,0xb6),
+          o2(0xb1,0xd5), o3(0x8f,0xc7,0xd0),
+          o2(0xde,0xbe), o3(0x8f,0xc7,0xd1),
+          o2(0xde,0xc1), o3(0x8f,0xc7,0xd2),
+          o2(0xce,0xc3), o3(0x8f,0xc7,0xd3),
+     o3(0x8f,0xc7,0xd4),
+
+#define to_EUC_JP_E6_B6 WORDINDEX2INFO(23049)
+    to_EUC_JP_E6_B6_offsets,
+    to_EUC_JP_E6_B6_infos,
+
+#define to_EUC_JP_E6_B7_infos WORDINDEX2INFO(23051)
+                INVALID,      o2(0xcd,0xe4),
+                  UNDEF, o3(0x8f,0xc7,0xd5),
+          o2(0xde,0xc8),      o2(0xde,0xc2),
+          o2(0xde,0xbf), o3(0x8f,0xc7,0xd6),
+     o3(0x8f,0xc7,0xd7),      o2(0xce,0xd4),
+          o2(0xde,0xc5), o3(0x8f,0xc7,0xd8),
+     o3(0x8f,0xc7,0xd9),      o2(0xbd,0xca),
+          o2(0xde,0xc7),      o2(0xde,0xcc),
+     o3(0x8f,0xc7,0xda),      o2(0xc5,0xf1),
+          o2(0xde,0xca), o3(0x8f,0xc7,0xdb),
+     o3(0x8f,0xc7,0xdc),      o2(0xde,0xc4),
+     o3(0x8f,0xc7,0xdd), o3(0x8f,0xc7,0xde),
+          o2(0xc3,0xb8), o3(0x8f,0xc7,0xdf),
+          o2(0xde,0xcb), o3(0x8f,0xc7,0xe0),
+          o2(0xde,0xc0),      o2(0xde,0xc6),
+     o3(0x8f,0xc7,0xe1),      o2(0xde,0xcd),
+          o2(0xb0,0xfc),      o2(0xde,0xc3),
+          o2(0xde,0xce), o3(0x8f,0xc7,0xe2),
+     o3(0x8f,0xc7,0xe3),      o2(0xbf,0xbc),
+          o2(0xbd,0xdf), o3(0x8f,0xc7,0xe4),
+          o2(0xca,0xa5), o3(0x8f,0xc7,0xe5),
+          o2(0xba,0xae),      o2(0xde,0xbb),
+          o2(0xde,0xc9),      o2(0xc5,0xba),
+     o3(0x8f,0xc7,0xe6),
+
+#define to_EUC_JP_E6_B7 WORDINDEX2INFO(23098)
+    to_EUC_JP_E6_B7_offsets,
+    to_EUC_JP_E6_B7_infos,
+
+#define to_EUC_JP_E6_B8_infos WORDINDEX2INFO(23100)
+                INVALID, o3(0x8f,0xc7,0xe7),
+                  UNDEF, o3(0x8f,0xc7,0xe8),
+          o2(0xc0,0xb6),      o2(0xb3,0xe9),
+          o2(0xba,0xd1),      o2(0xbe,0xc4),
+          o2(0xde,0xbd),      o2(0xbd,0xc2),
+          o2(0xb7,0xcc),      o2(0xde,0xbc),
+          o2(0xde,0xd2),      o2(0xbd,0xed),
+          o2(0xb8,0xba),      o2(0xde,0xe1),
+     o3(0x8f,0xc7,0xe9),      o2(0xde,0xdb),
+          o2(0xb5,0xf4),      o2(0xc5,0xcf),
+     o3(0x8f,0xc7,0xea),      o2(0xde,0xd6),
+          o2(0xde,0xdf),      o2(0xb0,0xaf),
+          o2(0xb1,0xb2), o3(0x8f,0xc7,0xeb),
+          o2(0xb2,0xb9),      o2(0xde,0xd8),
+          o2(0xc2,0xac),      o2(0xde,0xcf),
+          o2(0xde,0xd1),      o2(0xb9,0xc1),
+     o3(0x8f,0xc7,0xec), o3(0x8f,0xc7,0xed),
+          o2(0xde,0xe2), o3(0x8f,0xc7,0xee),
+          o2(0xde,0xdd), o3(0x8f,0xc7,0xef),
+     o3(0x8f,0xc7,0xf0),      o2(0xde,0xd5),
+
+#define to_EUC_JP_E6_B8 WORDINDEX2INFO(23140)
+    to_EUC_JP_E6_B8_offsets,
+    to_EUC_JP_E6_B8_infos,
+
+#define to_EUC_JP_E6_B9_infos WORDINDEX2INFO(23142)
+                INVALID,              UNDEF,
+          o2(0xde,0xdc), o3(0x8f,0xc7,0xf1),
+     o3(0x8f,0xc7,0xf2), o3(0x8f,0xc7,0xf3),
+     o3(0x8f,0xc7,0xf4),      o2(0xcc,0xab),
+     o3(0x8f,0xc7,0xf5),      o2(0xde,0xda),
+          o2(0xde,0xde), o3(0x8f,0xc7,0xf6),
+     o3(0x8f,0xc7,0xf7), o3(0x8f,0xc7,0xf8),
+     o3(0x8f,0xc7,0xf9), o3(0x8f,0xc7,0xfa),
+          o2(0xb8,0xd0), o3(0x8f,0xc7,0xfb),
+          o2(0xbe,0xc5),      o2(0xc3,0xb9),
+     o3(0x8f,0xc7,0xfc), o3(0x8f,0xc7,0xfd),
+     o3(0x8f,0xc7,0xfe),      o2(0xde,0xd4),
+     o3(0x8f,0xc8,0xa1), o3(0x8f,0xc8,0xa2),
+          o2(0xcd,0xaf), o3(0x8f,0xc8,0xa3),
+          o2(0xde,0xd7),      o2(0xde,0xd0),
+          o2(0xc5,0xf2),      o2(0xde,0xd3),
+     o3(0x8f,0xc8,0xa4),      o2(0xde,0xd9),
+     o3(0x8f,0xc8,0xa5), o3(0x8f,0xc8,0xa6),
+          o2(0xcf,0xd1),      o2(0xbc,0xbe),
+
+#define to_EUC_JP_E6_B9 WORDINDEX2INFO(23180)
+    to_EUC_JP_E6_B9_offsets,
+    to_EUC_JP_E6_B9_infos,
+
+#define to_EUC_JP_E6_BA_infos WORDINDEX2INFO(23182)
+                INVALID,      o2(0xcb,0xfe),
+                  UNDEF,      o2(0xde,0xe3),
+          o2(0xc8,0xae), o3(0x8f,0xc8,0xa7),
+          o2(0xde,0xef),      o2(0xb8,0xbb),
+     o3(0x8f,0xc8,0xa8),      o2(0xbd,0xe0),
+          o2(0xde,0xe5), o3(0x8f,0xc8,0xa9),
+          o2(0xce,0xaf),      o2(0xb9,0xc2),
+          o2(0xde,0xf2), o3(0x8f,0xc8,0xaa),
+          o2(0xb0,0xee),      o2(0xde,0xf0),
+     o3(0x8f,0xc8,0xab),      o2(0xde,0xe4),
+     o3(0x8f,0xc8,0xac), o3(0x8f,0xc8,0xad),
+          o2(0xde,0xea), o3(0x8f,0xc8,0xae),
+          o2(0xde,0xec), o3(0x8f,0xc8,0xaf),
+          o2(0xcd,0xcf),      o2(0xde,0xe7),
+          o2(0xc5,0xae), o3(0x8f,0xc8,0xb0),
+          o2(0xde,0xe9), o3(0x8f,0xc8,0xb1),
+
+#define to_EUC_JP_E6_BA WORDINDEX2INFO(23214)
+    to_EUC_JP_E6_BA_offsets,
+    to_EUC_JP_E6_BA_infos,
+
+#define to_EUC_JP_E6_BB_infos WORDINDEX2INFO(23216)
+                INVALID, o3(0x8f,0xc8,0xb2),
+     o3(0x8f,0xc8,0xb3),      o2(0xde,0xf1),
+     o3(0x8f,0xc8,0xb4),      o2(0xde,0xeb),
+          o2(0xcc,0xc7),              UNDEF,
+     o3(0x8f,0xc8,0xb5), o3(0x8f,0xc8,0xb6),
+          o2(0xde,0xe6), o3(0x8f,0xc8,0xb7),
+          o2(0xbc,0xa2),      o2(0xde,0xfe),
+     o3(0x8f,0xc8,0xb8), o3(0x8f,0xc8,0xb9),
+     o3(0x8f,0xc8,0xba),      o2(0xb3,0xea),
+          o2(0xde,0xe8),      o2(0xde,0xed),
+          o2(0xde,0xee),      o2(0xc2,0xec),
+          o2(0xc2,0xda), o3(0x8f,0xc8,0xbb),
+          o2(0xde,0xf6), o3(0x8f,0xc8,0xbc),
+     o3(0x8f,0xc8,0xbd),      o2(0xde,0xfc),
+          o2(0xde,0xfa),      o2(0xc5,0xa9),
+          o2(0xdf,0xa3),      o2(0xde,0xf7),
+     o3(0x8f,0xc8,0xbe), o3(0x8f,0xc8,0xbf),
+     o3(0x8f,0xc8,0xc0),      o2(0xde,0xf8),
+          o2(0xde,0xe0),
+
+#define to_EUC_JP_E6_BB WORDINDEX2INFO(23253)
+    to_EUC_JP_E6_BB_offsets,
+    to_EUC_JP_E6_BB_infos,
+
+#define to_EUC_JP_E6_BC_infos WORDINDEX2INFO(23255)
+                INVALID,              UNDEF,
+          o2(0xb5,0xf9),      o2(0xc9,0xba),
+     o3(0x8f,0xc8,0xc1),      o2(0xbc,0xbf),
+     o3(0x8f,0xc8,0xc2),      o2(0xb9,0xf7),
+     o3(0x8f,0xc8,0xc3), o3(0x8f,0xc8,0xc4),
+     o3(0x8f,0xc8,0xc5),      o2(0xcf,0xb3),
+          o2(0xde,0xf4),      o2(0xdf,0xa2),
+          o2(0xb1,0xe9),      o2(0xc1,0xe6),
+     o3(0x8f,0xc8,0xc6), o3(0x8f,0xc8,0xc7),
+     o3(0x8f,0xc8,0xc8), o3(0x8f,0xc8,0xc9),
+          o2(0xc7,0xf9),      o2(0xb4,0xc1),
+          o2(0xce,0xfa), o3(0x8f,0xc8,0xca),
+     o3(0x8f,0xc8,0xcb), o3(0x8f,0xc8,0xcc),
+          o2(0xcc,0xa1),      o2(0xc4,0xd2),
+     o3(0x8f,0xc8,0xd3), o3(0x8f,0xc8,0xcd),
+     o3(0x8f,0xc8,0xce),      o2(0xde,0xfb),
+          o2(0xde,0xfd), o3(0x8f,0xc8,0xcf),
+     o3(0x8f,0xc8,0xd0),      o2(0xc1,0xb2),
+     o3(0x8f,0xc8,0xd1), o3(0x8f,0xc8,0xd2),
+          o2(0xdf,0xa1),      o2(0xde,0xf9),
+
+#define to_EUC_JP_E6_BC WORDINDEX2INFO(23295)
+    to_EUC_JP_E6_BC_offsets,
+    to_EUC_JP_E6_BC_infos,
+
+#define to_EUC_JP_E6_BD_infos WORDINDEX2INFO(23297)
+                INVALID,              UNDEF,
+          o2(0xde,0xf3),      o2(0xb4,0xc3),
+     o3(0x8f,0xc8,0xd4), o3(0x8f,0xc8,0xd5),
+     o3(0x8f,0xc8,0xd6), o3(0x8f,0xc8,0xd7),
+          o2(0xb7,0xe9), o3(0x8f,0xc8,0xd8),
+          o2(0xdf,0xaf), o3(0x8f,0xc8,0xd9),
+     o3(0x8f,0xc8,0xda),      o2(0xdf,0xaa),
+          o2(0xc0,0xf8), o3(0x8f,0xc8,0xdb),
+     o3(0x8f,0xc8,0xdc),      o2(0xb3,0xe3),
+     o3(0x8f,0xc8,0xdd), o3(0x8f,0xc8,0xde),
+          o2(0xbd,0xe1),      o2(0xdf,0xb3),
+     o3(0x8f,0xc8,0xdf), o3(0x8f,0xc8,0xe0),
+          o2(0xdf,0xac),      o2(0xc4,0xac),
+          o2(0xdf,0xa9),      o2(0xc4,0xd9),
+          o2(0xdf,0xcc),      o2(0xdf,0xa6),
+          o2(0xdf,0xa5),      o2(0xdf,0xae),
+     o3(0x8f,0xc8,0xe1), o3(0x8f,0xc8,0xe2),
+
+#define to_EUC_JP_E6_BD WORDINDEX2INFO(23331)
+    to_EUC_JP_E6_BD_offsets,
+    to_EUC_JP_E6_BD_infos,
+
+#define to_EUC_JP_E6_BE_infos WORDINDEX2INFO(23333)
+                INVALID,      o2(0xdf,0xa8),
+          o2(0xdf,0xa7),      o2(0xdf,0xad),
+     o3(0x8f,0xc8,0xe3),      o2(0xc0,0xa1),
+                  UNDEF,      o2(0xdf,0xa4),
+     o3(0x8f,0xc8,0xe4), o3(0x8f,0xc8,0xe5),
+     o3(0x8f,0xc8,0xe6), o3(0x8f,0xc8,0xe7),
+     o3(0x8f,0xc8,0xe8),      o2(0xdf,0xb0),
+     o3(0x8f,0xc8,0xe9),      o2(0xdf,0xb1),
+     o3(0x8f,0xc8,0xea), o3(0x8f,0xc8,0xeb),
+     o3(0x8f,0xc8,0xec), o3(0x8f,0xc8,0xed),
+          o2(0xb4,0xc2), o3(0x8f,0xc8,0xee),
+     o3(0x8f,0xc8,0xef), o3(0x8f,0xc8,0xf0),
+          o2(0xdf,0xb6),      o2(0xdf,0xb5),
+          o2(0xdf,0xb7), o3(0x8f,0xc8,0xf1),
+     o3(0x8f,0xc8,0xf2), o3(0x8f,0xc8,0xf3),
+     o3(0x8f,0xc8,0xf4),      o2(0xdf,0xba),
+     o3(0x8f,0xc8,0xf5), o3(0x8f,0xc8,0xf6),
+     o3(0x8f,0xc8,0xf7),      o2(0xc5,0xc3),
+          o2(0xdf,0xb4), o3(0x8f,0xc8,0xf8),
+     o3(0x8f,0xc8,0xf9),      o2(0xdf,0xb8),
+     o3(0x8f,0xc8,0xfa),
+
+#define to_EUC_JP_E6_BE WORDINDEX2INFO(23374)
+    to_EUC_JP_E6_BE_offsets,
+    to_EUC_JP_E6_BE_infos,
+
+#define to_EUC_JP_E6_BF_infos WORDINDEX2INFO(23376)
+                INVALID,      o2(0xb7,0xe3),
+          o2(0xc2,0xf9),      o2(0xdf,0xb2),
+          o2(0xc7,0xbb),              UNDEF,
+     o3(0x8f,0xc8,0xfb),      o2(0xdf,0xb9),
+     o3(0x8f,0xc8,0xfc), o3(0x8f,0xc8,0xfd),
+     o3(0x8f,0xc8,0xfe),      o2(0xdf,0xbe),
+          o2(0xdf,0xbc),      o2(0xdf,0xbf),
+     o3(0x8f,0xc9,0xa1),      o2(0xdf,0xc2),
+     o3(0x8f,0xc9,0xa2),      o2(0xdf,0xbb),
+          o2(0xb9,0xea),      o2(0xc7,0xa8),
+          o2(0xde,0xb9), o3(0x8f,0xc9,0xa3),
+     o3(0x8f,0xc9,0xa4),      o2(0xcd,0xf4),
+          o2(0xdf,0xbd),      o2(0xdf,0xc1),
+          o2(0xc2,0xf5), o3(0x8f,0xc9,0xa5),
+          o2(0xdf,0xc0),      o2(0xdf,0xab),
+     o3(0x8f,0xc9,0xa6),      o2(0xef,0xe9),
+     o3(0x8f,0xc9,0xa7),      o2(0xdf,0xc5),
+     o3(0x8f,0xc9,0xa8), o3(0x8f,0xc9,0xa9),
+          o2(0xdf,0xc9),
+
+#define to_EUC_JP_E6_BF WORDINDEX2INFO(23413)
+    to_EUC_JP_E6_BF_offsets,
+    to_EUC_JP_E6_BF_infos,
+
+#define to_EUC_JP_E6_infos WORDINDEX2INFO(23415)
+             INVALID, to_EUC_JP_E6_80, to_EUC_JP_E6_81, to_EUC_JP_E6_82,
+     to_EUC_JP_E6_83, to_EUC_JP_E6_84, to_EUC_JP_E6_85, to_EUC_JP_E6_86,
+     to_EUC_JP_E6_87, to_EUC_JP_E6_88, to_EUC_JP_E6_89, to_EUC_JP_E6_8A,
+     to_EUC_JP_E6_8B, to_EUC_JP_E6_8C, to_EUC_JP_E6_8D, to_EUC_JP_E6_8E,
+     to_EUC_JP_E6_8F, to_EUC_JP_E6_90, to_EUC_JP_E6_91, to_EUC_JP_E6_92,
+     to_EUC_JP_E6_93, to_EUC_JP_E6_94, to_EUC_JP_E6_95, to_EUC_JP_E6_96,
+     to_EUC_JP_E6_97, to_EUC_JP_E6_98, to_EUC_JP_E6_99, to_EUC_JP_E6_9A,
+     to_EUC_JP_E6_9B, to_EUC_JP_E6_9C, to_EUC_JP_E6_9D, to_EUC_JP_E6_9E,
+     to_EUC_JP_E6_9F, to_EUC_JP_E6_A0, to_EUC_JP_E6_A1, to_EUC_JP_E6_A2,
+     to_EUC_JP_E6_A3, to_EUC_JP_E6_A4, to_EUC_JP_E6_A5, to_EUC_JP_E6_A6,
+     to_EUC_JP_E6_A7, to_EUC_JP_E6_A8, to_EUC_JP_E6_A9, to_EUC_JP_E6_AA,
+     to_EUC_JP_E6_AB, to_EUC_JP_E6_AC, to_EUC_JP_E6_AD, to_EUC_JP_E6_AE,
+     to_EUC_JP_E6_AF, to_EUC_JP_E6_B0, to_EUC_JP_E6_B1, to_EUC_JP_E6_B2,
+     to_EUC_JP_E6_B3, to_EUC_JP_E6_B4, to_EUC_JP_E6_B5, to_EUC_JP_E6_B6,
+     to_EUC_JP_E6_B7, to_EUC_JP_E6_B8, to_EUC_JP_E6_B9, to_EUC_JP_E6_BA,
+     to_EUC_JP_E6_BB, to_EUC_JP_E6_BC, to_EUC_JP_E6_BD, to_EUC_JP_E6_BE,
+     to_EUC_JP_E6_BF,
+
+#define to_EUC_JP_E6 WORDINDEX2INFO(23480)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_E6_infos,
+
+#define to_EUC_JP_E7_80_infos WORDINDEX2INFO(23482)
+                INVALID, o3(0x8f,0xc9,0xaa),
+          o2(0xdf,0xc7),              UNDEF,
+     o3(0x8f,0xc9,0xab), o3(0x8f,0xc9,0xac),
+     o3(0x8f,0xc9,0xad),      o2(0xdf,0xc3),
+          o2(0xdf,0xc4), o3(0x8f,0xc9,0xae),
+          o2(0xdf,0xc8),      o2(0xdf,0xc6),
+          o2(0xc9,0xce), o3(0x8f,0xc9,0xaf),
+          o2(0xdf,0xce),      o2(0xdf,0xcb),
+          o2(0xdf,0xca),      o2(0xdf,0xcd),
+          o2(0xc6,0xd4),      o2(0xdf,0xcf),
+     o3(0x8f,0xc9,0xb0), o3(0x8f,0xc9,0xb1),
+          o2(0xc3,0xf5),      o2(0xc2,0xed),
+          o2(0xc0,0xa5), o3(0x8f,0xc9,0xb2),
+          o2(0xdf,0xd0),      o2(0xdf,0xd2),
+     o3(0x8f,0xc9,0xb3), o3(0x8f,0xc9,0xb4),
+     o3(0x8f,0xc9,0xb5), o3(0x8f,0xc9,0xb6),
+          o2(0xdf,0xd1),
+
+#define to_EUC_JP_E7_80 WORDINDEX2INFO(23515)
+    to_EUC_JP_E7_80_offsets,
+    to_EUC_JP_E7_80_infos,
+
+#define to_EUC_JP_E7_81_infos WORDINDEX2INFO(23517)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc9,0xb7), o3(0x8f,0xc9,0xb8),
+     o3(0x8f,0xc9,0xb9), o3(0x8f,0xc9,0xba),
+     o3(0x8f,0xc9,0xbb), o3(0x8f,0xc9,0xbc),
+          o2(0xde,0xf5), o3(0x8f,0xc9,0xc1),
+          o2(0xdf,0xd3), o3(0x8f,0xc9,0xbd),
+     o3(0x8f,0xc9,0xbe),      o2(0xc6,0xe7),
+     o3(0x8f,0xc9,0xbf), o3(0x8f,0xc9,0xc0),
+          o2(0xdf,0xd4), o3(0x8f,0xc9,0xc2),
+     o3(0x8f,0xc9,0xc3),      o2(0xb2,0xd0),
+     o3(0x8f,0xc9,0xc4), o3(0x8f,0xc9,0xc5),
+          o2(0xc5,0xf4),      o2(0xb3,0xa5),
+     o3(0x8f,0xc9,0xc6), o3(0x8f,0xc9,0xc7),
+          o2(0xb5,0xe4),      o2(0xbc,0xde),
+          o2(0xba,0xd2), o3(0x8f,0xc9,0xc8),
+
+#define to_EUC_JP_E7_81 WORDINDEX2INFO(23547)
+    to_EUC_JP_E7_81_offsets,
+    to_EUC_JP_E7_81_infos,
+
+#define to_EUC_JP_E7_82_infos WORDINDEX2INFO(23549)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc9,0xc9), o3(0x8f,0xc9,0xca),
+     o3(0x8f,0xc9,0xcb),      o2(0xcf,0xa7),
+          o2(0xbf,0xe6),      o2(0xb1,0xea),
+          o2(0xdf,0xd6), o3(0x8f,0xc9,0xcc),
+     o3(0x8f,0xc9,0xcd), o3(0x8f,0xc9,0xce),
+     o3(0x8f,0xc9,0xcf), o3(0x8f,0xc9,0xd0),
+          o2(0xdf,0xd5), o3(0x8f,0xc9,0xd1),
+     o3(0x8f,0xc9,0xd2), o3(0x8f,0xc9,0xd3),
+          o2(0xdf,0xd9),      o2(0xc3,0xba),
+          o2(0xdf,0xdc),      o2(0xdf,0xd7),
+     o3(0x8f,0xc9,0xd4), o3(0x8f,0xc9,0xd5),
+          o2(0xdf,0xdb), o3(0x8f,0xc9,0xd6),
+     o3(0x8f,0xc9,0xd7),      o2(0xdf,0xda),
+          o2(0xc5,0xc0),      o2(0xb0,0xd9),
+
+#define to_EUC_JP_E7_82 WORDINDEX2INFO(23579)
+    to_EUC_JP_E7_82_offsets,
+    to_EUC_JP_E7_82_infos,
+
+#define to_EUC_JP_E7_83_infos WORDINDEX2INFO(23581)
+                INVALID,              UNDEF,
+          o2(0xce,0xf5), o3(0x8f,0xc9,0xd8),
+          o2(0xdf,0xde),      o2(0xb1,0xa8),
+     o3(0x8f,0xc9,0xd9), o3(0x8f,0xc9,0xda),
+     o3(0x8f,0xc9,0xdb), o3(0x8f,0xc9,0xdc),
+     o3(0x8f,0xc9,0xdd), o3(0x8f,0xc9,0xde),
+          o2(0xdf,0xe0), o3(0x8f,0xc9,0xdf),
+          o2(0xdf,0xdf),      o2(0xdf,0xdd),
+     o3(0x8f,0xc9,0xe0),      o2(0xdf,0xd8),
+          o2(0xcb,0xa3), o3(0x8f,0xc9,0xe1),
+          o2(0xdf,0xe2),
+
+#define to_EUC_JP_E7_83 WORDINDEX2INFO(23602)
+    to_EUC_JP_E7_83_offsets,
+    to_EUC_JP_E7_83_infos,
+
+#define to_EUC_JP_E7_84_infos WORDINDEX2INFO(23604)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc9,0xe2), o3(0x8f,0xc9,0xe3),
+     o3(0x8f,0xc9,0xe4), o3(0x8f,0xc9,0xe5),
+     o3(0x8f,0xc9,0xe6),      o2(0xdf,0xe1),
+     o3(0x8f,0xc9,0xe7), o3(0x8f,0xc9,0xe8),
+     o3(0x8f,0xc9,0xe9),      o2(0xb1,0xeb),
+          o2(0xdf,0xe4),      o2(0xca,0xb2),
+          o2(0xdf,0xe3), o3(0x8f,0xc9,0xea),
+     o3(0x8f,0xc9,0xeb),      o2(0xcc,0xb5),
+          o2(0xbe,0xc7), o3(0x8f,0xc9,0xec),
+     o3(0x8f,0xc9,0xed), o3(0x8f,0xc9,0xee),
+     o3(0x8f,0xc9,0xef), o3(0x8f,0xc9,0xf0),
+          o2(0xc1,0xb3), o3(0x8f,0xc9,0xf1),
+          o2(0xbe,0xc6),
+
+#define to_EUC_JP_E7_84 WORDINDEX2INFO(23631)
+    to_EUC_JP_E7_84_offsets,
+    to_EUC_JP_E7_84_infos,
+
+#define to_EUC_JP_E7_85_infos WORDINDEX2INFO(23633)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc9,0xf2), o3(0x8f,0xc9,0xf3),
+     o3(0x8f,0xc9,0xf4), o3(0x8f,0xc9,0xf5),
+          o2(0xce,0xfb), o3(0x8f,0xc9,0xf6),
+     o3(0x8f,0xc9,0xf7),      o2(0xdf,0xea),
+          o2(0xc0,0xf9), o3(0x8f,0xc9,0xf8),
+     o3(0x8f,0xc9,0xf9),      o2(0xdf,0xe6),
+          o2(0xdf,0xeb), o3(0x8f,0xc9,0xfa),
+          o2(0xb1,0xec), o3(0x8f,0xc9,0xfb),
+     o3(0x8f,0xc9,0xfc), o3(0x8f,0xc9,0xfd),
+     o3(0x8f,0xc9,0xfe),      o2(0xdf,0xe9),
+          o2(0xc7,0xe1),      o2(0xdf,0xe5),
+          o2(0xdf,0xe8),      o2(0xbe,0xc8),
+     o3(0x8f,0xca,0xa1),      o2(0xc8,0xd1),
+          o2(0xdf,0xec),      o2(0xbc,0xd1),
+     o3(0x8f,0xca,0xa2),      o2(0xc0,0xfa),
+
+#define to_EUC_JP_E7_85 WORDINDEX2INFO(23665)
+    to_EUC_JP_E7_85_offsets,
+    to_EUC_JP_E7_85_infos,
+
+#define to_EUC_JP_E7_86_infos WORDINDEX2INFO(23667)
+                INVALID, o3(0x8f,0xca,0xa3),
+                  UNDEF,      o2(0xdf,0xef),
+     o3(0x8f,0xca,0xa4), o3(0x8f,0xca,0xa5),
+          o2(0xdf,0xe7),      o2(0xb7,0xa7),
+     o3(0x8f,0xca,0xa6),      o2(0xdf,0xed),
+     o3(0x8f,0xca,0xa7),      o2(0xcd,0xd0),
+          o2(0xdf,0xf0),      o2(0xf4,0xa6),
+     o3(0x8f,0xca,0xa8), o3(0x8f,0xca,0xa9),
+          o2(0xbd,0xcf), o3(0x8f,0xca,0xaa),
+     o3(0x8f,0xca,0xab),      o2(0xdf,0xf1),
+          o2(0xdf,0xf2), o3(0x8f,0xca,0xac),
+     o3(0x8f,0xca,0xad),      o2(0xc7,0xae),
+     o3(0x8f,0xca,0xae), o3(0x8f,0xca,0xaf),
+          o2(0xdf,0xf4), o3(0x8f,0xca,0xb0),
+          o2(0xdf,0xf5), o3(0x8f,0xca,0xb1),
+
+#define to_EUC_JP_E7_86 WORDINDEX2INFO(23697)
+    to_EUC_JP_E7_86_offsets,
+    to_EUC_JP_E7_86_infos,
+
+#define to_EUC_JP_E7_87_infos WORDINDEX2INFO(23699)
+                INVALID, o3(0x8f,0xca,0xb2),
+     o3(0x8f,0xca,0xb3),              UNDEF,
+          o2(0xc7,0xb3), o3(0x8f,0xca,0xb4),
+          o2(0xc5,0xf5),      o2(0xdf,0xf7),
+     o3(0x8f,0xca,0xb5), o3(0x8f,0xca,0xb6),
+          o2(0xdf,0xf9),      o2(0xce,0xd5),
+          o2(0xdf,0xf6), o3(0x8f,0xca,0xb7),
+          o2(0xdf,0xf8),      o2(0xb1,0xed),
+     o3(0x8f,0xca,0xb8),      o2(0xdf,0xf3),
+     o3(0x8f,0xca,0xb9), o3(0x8f,0xca,0xba),
+     o3(0x8f,0xca,0xbb),      o2(0xd3,0xdb),
+          o2(0xdf,0xfa),      o2(0xc1,0xe7),
+          o2(0xbb,0xb8),      o2(0xdf,0xfc),
+          o2(0xdf,0xfb),      o2(0xbf,0xa4),
+          o2(0xd2,0xd9),      o2(0xdf,0xfd),
+     o3(0x8f,0xca,0xbc),      o2(0xe0,0xa1),
+          o2(0xdf,0xee),      o2(0xdf,0xfe),
+     o3(0x8f,0xca,0xbd),      o2(0xe0,0xa2),
+
+#define to_EUC_JP_E7_87 WORDINDEX2INFO(23735)
+    to_EUC_JP_E7_87_offsets,
+    to_EUC_JP_E7_87_infos,
+
+#define to_EUC_JP_E7_88_infos WORDINDEX2INFO(23737)
+                INVALID, o3(0x8f,0xca,0xbe),
+                  UNDEF,      o2(0xc7,0xfa),
+     o3(0x8f,0xca,0xbf), o3(0x8f,0xca,0xc0),
+     o3(0x8f,0xca,0xc1),      o2(0xe0,0xa3),
+          o2(0xe0,0xa4), o3(0x8f,0xca,0xc2),
+     o3(0x8f,0xca,0xc3), o3(0x8f,0xca,0xc4),
+          o2(0xe0,0xa5), o3(0x8f,0xca,0xc5),
+     o3(0x8f,0xca,0xc6), o3(0x8f,0xca,0xc7),
+          o2(0xe0,0xa6),      o2(0xc4,0xde),
+     o3(0x8f,0xca,0xc8),      o2(0xe0,0xa8),
+          o2(0xe0,0xa7), o3(0x8f,0xca,0xc9),
+          o2(0xe0,0xa9),      o2(0xe0,0xaa),
+     o3(0x8f,0xca,0xca),      o2(0xbc,0xdf),
+          o2(0xc9,0xe3), o3(0x8f,0xca,0xcb),
+     o3(0x8f,0xca,0xcc),      o2(0xcc,0xec),
+          o2(0xe0,0xab),      o2(0xe0,0xac),
+          o2(0xc1,0xd6),      o2(0xbc,0xa4),
+          o2(0xe0,0xad),
+
+#define to_EUC_JP_E7_88 WORDINDEX2INFO(23772)
+    to_EUC_JP_E7_88_offsets,
+    to_EUC_JP_E7_88_infos,
+
+#define to_EUC_JP_E7_89_infos WORDINDEX2INFO(23774)
+                INVALID,      o2(0xe0,0xae),
+     o3(0x8f,0xca,0xcd), o3(0x8f,0xca,0xce),
+     o3(0x8f,0xca,0xcf),              UNDEF,
+     o3(0x8f,0xca,0xd0),      o2(0xe0,0xaf),
+          o2(0xca,0xd2),      o2(0xc8,0xc7),
+          o2(0xe0,0xb0),      o2(0xc7,0xd7),
+     o3(0x8f,0xca,0xd1), o3(0x8f,0xca,0xd2),
+     o3(0x8f,0xca,0xd3),      o2(0xc4,0xad),
+     o3(0x8f,0xca,0xd4), o3(0x8f,0xca,0xd5),
+     o3(0x8f,0xca,0xd6),      o2(0xe0,0xb1),
+          o2(0xb2,0xe7), o3(0x8f,0xca,0xd7),
+          o2(0xb5,0xed), o3(0x8f,0xca,0xd8),
+          o2(0xcc,0xc6), o3(0x8f,0xca,0xd9),
+          o2(0xcc,0xb6), o3(0x8f,0xca,0xda),
+          o2(0xb2,0xb4),      o2(0xcf,0xb4),
+     o3(0x8f,0xca,0xdb),      o2(0xcb,0xd2),
+     o3(0x8f,0xca,0xdc),      o2(0xca,0xaa),
+     o3(0x8f,0xca,0xdd), o3(0x8f,0xca,0xde),
+     o3(0x8f,0xca,0xdf), o3(0x8f,0xca,0xe0),
+          o2(0xc0,0xb7),      o2(0xe0,0xb2),
+     o3(0x8f,0xca,0xe1), o3(0x8f,0xca,0xe2),
+          o2(0xc6,0xc3), o3(0x8f,0xca,0xe3),
+     o3(0x8f,0xca,0xe4),      o2(0xb8,0xa3),
+          o2(0xe0,0xb3), o3(0x8f,0xca,0xe5),
+
+#define to_EUC_JP_E7_89 WORDINDEX2INFO(23822)
+    to_EUC_JP_E7_89_offsets,
+    to_EUC_JP_E7_89_infos,
+
+#define to_EUC_JP_E7_8A_infos WORDINDEX2INFO(23824)
+                INVALID,      o2(0xba,0xd4),
+          o2(0xe0,0xb5),      o2(0xe0,0xb4),
+                  UNDEF, o3(0x8f,0xca,0xe6),
+          o2(0xe0,0xb6), o3(0x8f,0xca,0xe7),
+     o3(0x8f,0xca,0xe8), o3(0x8f,0xca,0xe9),
+          o2(0xe0,0xb7), o3(0x8f,0xca,0xea),
+          o2(0xe0,0xb8), o3(0x8f,0xca,0xeb),
+          o2(0xb5,0xbe),      o2(0xe0,0xb9),
+          o2(0xe0,0xba), o3(0x8f,0xca,0xec),
+          o2(0xb8,0xa4), o3(0x8f,0xca,0xed),
+     o3(0x8f,0xca,0xee),      o2(0xc8,0xc8),
+     o3(0x8f,0xca,0xef),      o2(0xe0,0xbc),
+     o3(0x8f,0xca,0xf0),      o2(0xbe,0xf5),
+          o2(0xe0,0xbb), o3(0x8f,0xca,0xf1),
+
+#define to_EUC_JP_E7_8A WORDINDEX2INFO(23852)
+    to_EUC_JP_E7_8A_offsets,
+    to_EUC_JP_E7_8A_infos,
+
+#define to_EUC_JP_E7_8B_infos WORDINDEX2INFO(23854)
+                INVALID,              UNDEF,
+     o3(0x8f,0xca,0xf2),      o2(0xb6,0xb8),
+          o2(0xe0,0xbd),      o2(0xe0,0xbf),
+          o2(0xe0,0xbe), o3(0x8f,0xca,0xf3),
+     o3(0x8f,0xca,0xf4), o3(0x8f,0xca,0xf5),
+          o2(0xe0,0xc0),      o2(0xb8,0xd1),
+          o2(0xe0,0xc1), o3(0x8f,0xca,0xf6),
+     o3(0x8f,0xca,0xf7),      o2(0xb6,0xe9),
+     o3(0x8f,0xca,0xf8),      o2(0xc1,0xc0),
+          o2(0xb9,0xfd), o3(0x8f,0xca,0xf9),
+          o2(0xe0,0xc3),      o2(0xe0,0xc4),
+          o2(0xe0,0xc2), o3(0x8f,0xca,0xfa),
+          o2(0xbc,0xed),      o2(0xc6,0xc8),
+          o2(0xb6,0xb9), o3(0x8f,0xca,0xfb),
+     o3(0x8f,0xca,0xfc),      o2(0xe0,0xc6),
+          o2(0xc3,0xac),      o2(0xe0,0xc5),
+     o3(0x8f,0xca,0xfd), o3(0x8f,0xca,0xfe),
+          o2(0xcf,0xb5),      o2(0xc7,0xe2),
+     o3(0x8f,0xcb,0xa1),
+
+#define to_EUC_JP_E7_8B WORDINDEX2INFO(23891)
+    to_EUC_JP_E7_8B_offsets,
+    to_EUC_JP_E7_8B_infos,
+
+#define to_EUC_JP_E7_8C_infos WORDINDEX2INFO(23893)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcb,0xa2), o3(0x8f,0xcb,0xa3),
+     o3(0x8f,0xcb,0xa4), o3(0x8f,0xcb,0xa5),
+          o2(0xe0,0xc9), o3(0x8f,0xcb,0xa6),
+     o3(0x8f,0xcb,0xa7), o3(0x8f,0xcb,0xa8),
+     o3(0x8f,0xcb,0xa9),      o2(0xe0,0xcb),
+          o2(0xe0,0xc8), o3(0x8f,0xcb,0xaa),
+     o3(0x8f,0xcb,0xab),      o2(0xcc,0xd4),
+          o2(0xe0,0xca),      o2(0xe0,0xcc),
+     o3(0x8f,0xcb,0xac),      o2(0xce,0xc4),
+     o3(0x8f,0xcb,0xad), o3(0x8f,0xcb,0xae),
+          o2(0xe0,0xd0), o3(0x8f,0xcb,0xaf),
+     o3(0x8f,0xcb,0xb0),      o2(0xe0,0xcf),
+          o2(0xc3,0xf6),      o2(0xc7,0xad),
+     o3(0x8f,0xcb,0xb1),      o2(0xb8,0xa5),
+          o2(0xe0,0xce), o3(0x8f,0xcb,0xb2),
+     o3(0x8f,0xcb,0xb3),      o2(0xe0,0xcd),
+     o3(0x8f,0xcb,0xb4),      o2(0xcd,0xb1),
+          o2(0xcd,0xb2), o3(0x8f,0xcb,0xb5),
+     o3(0x8f,0xcb,0xb6), o3(0x8f,0xcb,0xb7),
+          o2(0xe0,0xd1),      o2(0xb1,0xee),
+
+#define to_EUC_JP_E7_8C WORDINDEX2INFO(23935)
+    to_EUC_JP_E7_8C_offsets,
+    to_EUC_JP_E7_8C_infos,
+
+#define to_EUC_JP_E7_8D_infos WORDINDEX2INFO(23937)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcb,0xb8),      o2(0xb9,0xf6),
+          o2(0xbb,0xe2), o3(0x8f,0xcb,0xb9),
+          o2(0xe0,0xd2),      o2(0xe0,0xd3),
+     o3(0x8f,0xcb,0xba), o3(0x8f,0xcb,0xbb),
+     o3(0x8f,0xcb,0xbc),      o2(0xe0,0xd5),
+     o3(0x8f,0xcb,0xbd), o3(0x8f,0xcb,0xbe),
+     o3(0x8f,0xcb,0xbf), o3(0x8f,0xcb,0xc0),
+     o3(0x8f,0xcb,0xc1),      o2(0xbd,0xc3),
+     o3(0x8f,0xcb,0xc2), o3(0x8f,0xcb,0xc3),
+          o2(0xe0,0xd7), o3(0x8f,0xcb,0xc4),
+          o2(0xe0,0xd6), o3(0x8f,0xcb,0xc5),
+     o3(0x8f,0xcb,0xc6), o3(0x8f,0xcb,0xc7),
+     o3(0x8f,0xcb,0xc8),      o2(0xe0,0xd8),
+     o3(0x8f,0xcb,0xc9),      o2(0xb3,0xcd),
+          o2(0xe0,0xda), o3(0x8f,0xcb,0xca),
+          o2(0xe0,0xd9), o3(0x8f,0xcb,0xcb),
+          o2(0xe0,0xdc),      o2(0xe0,0xdb),
+     o3(0x8f,0xcb,0xcc),
+
+#define to_EUC_JP_E7_8D WORDINDEX2INFO(23974)
+    to_EUC_JP_E7_8D_offsets,
+    to_EUC_JP_E7_8D_infos,
+
+#define to_EUC_JP_E7_8E_infos WORDINDEX2INFO(23976)
+                INVALID, o3(0x8f,0xcb,0xcd),
+     o3(0x8f,0xcb,0xce),              UNDEF,
+     o3(0x8f,0xcb,0xcf),      o2(0xb8,0xbc),
+     o3(0x8f,0xcb,0xd0), o3(0x8f,0xcb,0xd1),
+          o2(0xce,0xa8),      o2(0xb6,0xcc),
+          o2(0xb2,0xa6), o3(0x8f,0xcb,0xd2),
+     o3(0x8f,0xcb,0xd3), o3(0x8f,0xcb,0xd4),
+     o3(0x8f,0xcb,0xd5),      o2(0xb6,0xea),
+     o3(0x8f,0xcb,0xd6), o3(0x8f,0xcb,0xd7),
+     o3(0x8f,0xcb,0xd8), o3(0x8f,0xcb,0xd9),
+     o3(0x8f,0xcb,0xda), o3(0x8f,0xcb,0xdb),
+     o3(0x8f,0xcb,0xdc), o3(0x8f,0xcb,0xdd),
+     o3(0x8f,0xcb,0xde),      o2(0xb4,0xe1),
+     o3(0x8f,0xcb,0xdf), o3(0x8f,0xcb,0xe0),
+     o3(0x8f,0xcb,0xe1),      o2(0xce,0xe8),
+          o2(0xe0,0xde), o3(0x8f,0xcb,0xe2),
+     o3(0x8f,0xcb,0xe3), o3(0x8f,0xcb,0xe4),
+          o2(0xe0,0xe0), o3(0x8f,0xcb,0xe5),
+     o3(0x8f,0xcb,0xe6), o3(0x8f,0xcb,0xe7),
+
+#define to_EUC_JP_E7_8E WORDINDEX2INFO(24014)
+    to_EUC_JP_E7_8E_offsets,
+    to_EUC_JP_E7_8E_infos,
+
+#define to_EUC_JP_E7_8F_infos WORDINDEX2INFO(24016)
+                INVALID,      o2(0xe0,0xe1),
+                  UNDEF,      o2(0xb2,0xd1),
+     o3(0x8f,0xcb,0xe8), o3(0x8f,0xcb,0xe9),
+          o2(0xe0,0xdd), o3(0x8f,0xcb,0xea),
+          o2(0xbb,0xb9), o3(0x8f,0xcb,0xeb),
+     o3(0x8f,0xcb,0xec),      o2(0xc4,0xc1),
+          o2(0xe0,0xdf), o3(0x8f,0xcb,0xed),
+     o3(0x8f,0xcb,0xee), o3(0x8f,0xcb,0xef),
+     o3(0x8f,0xcb,0xf0), o3(0x8f,0xcb,0xf1),
+     o3(0x8f,0xcb,0xf2),      o2(0xe0,0xe4),
+          o2(0xbc,0xee), o3(0x8f,0xcb,0xf3),
+     o3(0x8f,0xcb,0xf4),      o2(0xe0,0xe2),
+     o3(0x8f,0xcb,0xf5), o3(0x8f,0xcb,0xf6),
+     o3(0x8f,0xcb,0xf7),      o2(0xb7,0xbe),
+          o2(0xc8,0xc9),      o2(0xe0,0xe3),
+          o2(0xe0,0xfe), o3(0x8f,0xcb,0xf8),
+     o3(0x8f,0xcb,0xf9), o3(0x8f,0xcb,0xfa),
+          o2(0xe0,0xe9), o3(0x8f,0xcb,0xfb),
+     o3(0x8f,0xcb,0xfc), o3(0x8f,0xcb,0xfd),
+     o3(0x8f,0xcb,0xfe),      o2(0xb8,0xbd),
+     o3(0x8f,0xcc,0xa1),
+
+#define to_EUC_JP_E7_8F WORDINDEX2INFO(24057)
+    to_EUC_JP_E7_8F_offsets,
+    to_EUC_JP_E7_8F_infos,
+
+#define to_EUC_JP_E7_90_infos WORDINDEX2INFO(24059)
+                INVALID, o3(0x8f,0xcc,0xa2),
+     o3(0x8f,0xcc,0xa3),              UNDEF,
+          o2(0xb5,0xe5), o3(0x8f,0xcc,0xa4),
+          o2(0xe0,0xe6),      o2(0xcd,0xfd),
+     o3(0x8f,0xcc,0xa5),      o2(0xce,0xb0),
+     o3(0x8f,0xcc,0xa6), o3(0x8f,0xcc,0xa7),
+     o3(0x8f,0xcc,0xa8), o3(0x8f,0xcc,0xa9),
+          o2(0xc2,0xf6), o3(0x8f,0xcc,0xaa),
+          o2(0xe0,0xe8), o3(0x8f,0xcc,0xab),
+     o3(0x8f,0xcc,0xac), o3(0x8f,0xcc,0xad),
+     o3(0x8f,0xcc,0xae), o3(0x8f,0xcc,0xaf),
+     o3(0x8f,0xcc,0xb0), o3(0x8f,0xcc,0xb1),
+     o3(0x8f,0xcc,0xb2), o3(0x8f,0xcc,0xb3),
+     o3(0x8f,0xcc,0xb4), o3(0x8f,0xcc,0xb5),
+          o2(0xe0,0xea),      o2(0xce,0xd6),
+          o2(0xb6,0xd7),      o2(0xc8,0xfc),
+          o2(0xc7,0xca), o3(0x8f,0xcc,0xb6),
+          o2(0xe0,0xeb),      o2(0xe0,0xed),
+
+#define to_EUC_JP_E7_90 WORDINDEX2INFO(24095)
+    to_EUC_JP_E7_90_offsets,
+    to_EUC_JP_E7_90_infos,
+
+#define to_EUC_JP_E7_91_infos WORDINDEX2INFO(24097)
+                INVALID, o3(0x8f,0xcc,0xb7),
+          o2(0xe0,0xf0),              UNDEF,
+     o3(0x8f,0xcc,0xb8), o3(0x8f,0xcc,0xb9),
+     o3(0x8f,0xcc,0xba), o3(0x8f,0xcc,0xbb),
+     o3(0x8f,0xcc,0xbc), o3(0x8f,0xcc,0xbd),
+     o3(0x8f,0xcc,0xbe), o3(0x8f,0xcc,0xbf),
+          o2(0xe0,0xec), o3(0x8f,0xcc,0xc0),
+          o2(0xe0,0xef),      o2(0xb8,0xea),
+          o2(0xb1,0xcd),      o2(0xe0,0xf1),
+     o3(0x8f,0xcc,0xc1),      o2(0xbf,0xf0),
+          o2(0xe0,0xee),      o2(0xce,0xdc),
+     o3(0x8f,0xcc,0xc2),      o2(0xe0,0xf4),
+          o2(0xf4,0xa4), o3(0x8f,0xcc,0xc3),
+     o3(0x8f,0xcc,0xc4), o3(0x8f,0xcc,0xc5),
+          o2(0xe0,0xf2),      o2(0xe0,0xf5),
+     o3(0x8f,0xcc,0xc6), o3(0x8f,0xcc,0xc7),
+     o3(0x8f,0xcc,0xc8),      o2(0xe0,0xe7),
+          o2(0xe0,0xf3), o3(0x8f,0xcc,0xc9),
+     o3(0x8f,0xcc,0xca),      o2(0xba,0xbc),
+          o2(0xe0,0xf6),      o2(0xe0,0xf7),
+
+#define to_EUC_JP_E7_91 WORDINDEX2INFO(24137)
+    to_EUC_JP_E7_91_offsets,
+    to_EUC_JP_E7_91_infos,
+
+#define to_EUC_JP_E7_92_infos WORDINDEX2INFO(24139)
+                INVALID, o3(0x8f,0xcc,0xcb),
+     o3(0x8f,0xcc,0xcc),              UNDEF,
+          o2(0xcd,0xfe), o3(0x8f,0xcc,0xcd),
+     o3(0x8f,0xcc,0xce), o3(0x8f,0xcc,0xcf),
+     o3(0x8f,0xcc,0xd0),      o2(0xe0,0xf8),
+     o3(0x8f,0xcc,0xd1), o3(0x8f,0xcc,0xd2),
+     o3(0x8f,0xcc,0xd3), o3(0x8f,0xcc,0xd4),
+     o3(0x8f,0xcc,0xd5), o3(0x8f,0xcc,0xd6),
+     o3(0x8f,0xcc,0xd7), o3(0x8f,0xcc,0xd8),
+          o2(0xe0,0xf9), o3(0x8f,0xcc,0xd9),
+     o3(0x8f,0xcc,0xda), o3(0x8f,0xcc,0xdb),
+          o2(0xe0,0xe5), o3(0x8f,0xcc,0xdc),
+     o3(0x8f,0xcc,0xdd),      o2(0xe0,0xfa),
+     o3(0x8f,0xcc,0xde), o3(0x8f,0xcc,0xdf),
+     o3(0x8f,0xcc,0xe0), o3(0x8f,0xcc,0xe1),
+     o3(0x8f,0xcc,0xe2), o3(0x8f,0xcc,0xe3),
+          o2(0xb4,0xc4), o3(0x8f,0xcc,0xe4),
+     o3(0x8f,0xcc,0xe5), o3(0x8f,0xcc,0xe6),
+     o3(0x8f,0xcc,0xe7), o3(0x8f,0xcc,0xe8),
+          o2(0xbc,0xa5), o3(0x8f,0xcc,0xe9),
+
+#define to_EUC_JP_E7_92 WORDINDEX2INFO(24179)
+    to_EUC_JP_E7_92_offsets,
+    to_EUC_JP_E7_92_infos,
+
+#define to_EUC_JP_E7_93_infos WORDINDEX2INFO(24181)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcc,0xea), o3(0x8f,0xcc,0xeb),
+          o2(0xe0,0xfb), o3(0x8f,0xcc,0xec),
+          o2(0xe0,0xfc), o3(0x8f,0xcc,0xed),
+     o3(0x8f,0xcc,0xee),      o2(0xe0,0xfd),
+     o3(0x8f,0xcc,0xef), o3(0x8f,0xcc,0xf0),
+     o3(0x8f,0xcc,0xf1),      o2(0xb1,0xbb),
+     o3(0x8f,0xcc,0xf2), o3(0x8f,0xcc,0xf3),
+          o2(0xe1,0xa1),      o2(0xc9,0xbb),
+          o2(0xe1,0xa2), o3(0x8f,0xcc,0xf4),
+          o2(0xb4,0xa4),      o2(0xe1,0xa3),
+     o3(0x8f,0xcc,0xf5),      o2(0xe1,0xa4),
+     o3(0x8f,0xcc,0xf6), o3(0x8f,0xcc,0xf7),
+          o2(0xe1,0xa5), o3(0x8f,0xcc,0xf8),
+          o2(0xe1,0xa7),      o2(0xe1,0xa8),
+          o2(0xe1,0xa6), o3(0x8f,0xcc,0xf9),
+          o2(0xc9,0xd3),      o2(0xe1,0xaa),
+          o2(0xe1,0xa9), o3(0x8f,0xcc,0xfa),
+     o3(0x8f,0xcc,0xfb), o3(0x8f,0xcc,0xfc),
+     o3(0x8f,0xcc,0xfd),
+
+#define to_EUC_JP_E7_93 WORDINDEX2INFO(24220)
+    to_EUC_JP_E7_93_offsets,
+    to_EUC_JP_E7_93_infos,
+
+#define to_EUC_JP_E7_94_infos WORDINDEX2INFO(24222)
+                INVALID,              UNDEF,
+          o2(0xe1,0xac),      o2(0xe1,0xab),
+          o2(0xe1,0xad), o3(0x8f,0xcc,0xfe),
+          o2(0xe1,0xae),      o2(0xe1,0xb0),
+          o2(0xe1,0xaf),      o2(0xb9,0xf9),
+     o3(0x8f,0xcd,0xa1),      o2(0xe1,0xb2),
+          o2(0xe1,0xb1), o3(0x8f,0xcd,0xa2),
+     o3(0x8f,0xcd,0xa3),      o2(0xb4,0xc5),
+          o2(0xbf,0xd3),      o2(0xc5,0xbc),
+          o2(0xe1,0xb3),      o2(0xc0,0xb8),
+     o3(0x8f,0xcd,0xa4), o3(0x8f,0xcd,0xa5),
+          o2(0xbb,0xba), o3(0x8f,0xcd,0xa6),
+          o2(0xb1,0xf9),      o2(0xe1,0xb4),
+     o3(0x8f,0xcd,0xa7),      o2(0xcd,0xd1),
+     o3(0x8f,0xcd,0xa8), o3(0x8f,0xcd,0xa9),
+          o2(0xca,0xe3),      o2(0xe1,0xb5),
+     o3(0x8f,0xcd,0xaa),      o2(0xc5,0xc4),
+          o2(0xcd,0xb3),      o2(0xb9,0xc3),
+          o2(0xbf,0xbd), o3(0x8f,0xcd,0xab),
+          o2(0xc3,0xcb),      o2(0xd2,0xb4),
+     o3(0x8f,0xcd,0xac),      o2(0xc4,0xae),
+          o2(0xb2,0xe8),      o2(0xe1,0xb6),
+     o3(0x8f,0xcd,0xad), o3(0x8f,0xcd,0xae),
+     o3(0x8f,0xcd,0xaf),
+
+#define to_EUC_JP_E7_94 WORDINDEX2INFO(24269)
+    to_EUC_JP_E7_94_offsets,
+    to_EUC_JP_E7_94_infos,
+
+#define to_EUC_JP_E7_95_infos WORDINDEX2INFO(24271)
+                INVALID, o3(0x8f,0xcd,0xb0),
+                  UNDEF, o3(0x8f,0xcd,0xb1),
+          o2(0xe1,0xb7),      o2(0xe1,0xbc),
+     o3(0x8f,0xcd,0xb2), o3(0x8f,0xcd,0xb3),
+          o2(0xe1,0xba),      o2(0xe1,0xb9),
+          o2(0xda,0xc2),      o2(0xb3,0xa6),
+          o2(0xe1,0xb8), o3(0x8f,0xcd,0xb4),
+          o2(0xb0,0xda), o3(0x8f,0xcd,0xb5),
+          o2(0xc8,0xaa), o3(0x8f,0xcd,0xb6),
+          o2(0xc8,0xca), o3(0x8f,0xcd,0xb7),
+          o2(0xce,0xb1),      o2(0xe1,0xbd),
+          o2(0xe1,0xbb),      o2(0xc3,0xdc),
+          o2(0xc0,0xa6), o3(0x8f,0xcd,0xb8),
+     o3(0x8f,0xcd,0xb9),      o2(0xc8,0xab),
+     o3(0x8f,0xcd,0xba),      o2(0xc9,0xad),
+          o2(0xe1,0xbf),      o2(0xce,0xac),
+          o2(0xb7,0xcd),      o2(0xe1,0xc0),
+          o2(0xe1,0xbe),      o2(0xc8,0xd6),
+          o2(0xe1,0xc1),      o2(0xe1,0xc2),
+     o3(0x8f,0xcd,0xbb),      o2(0xb0,0xdb),
+     o3(0x8f,0xcd,0xbc),      o2(0xbe,0xf6),
+          o2(0xe1,0xc7),      o2(0xe1,0xc4),
+          o2(0xc6,0xed),      o2(0xe1,0xc3),
+     o3(0x8f,0xcd,0xbd), o3(0x8f,0xcd,0xbe),
+     o3(0x8f,0xcd,0xbf), o3(0x8f,0xcd,0xc0),
+     o3(0x8f,0xcd,0xc1), o3(0x8f,0xcd,0xc2),
+          o2(0xb5,0xa6),
+
+#define to_EUC_JP_E7_95 WORDINDEX2INFO(24324)
+    to_EUC_JP_E7_95_offsets,
+    to_EUC_JP_E7_95_infos,
+
+#define to_EUC_JP_E7_96_infos WORDINDEX2INFO(24326)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcd,0xc3),      o2(0xe1,0xca),
+     o3(0x8f,0xcd,0xc4),      o2(0xe1,0xc5),
+          o2(0xe1,0xc6),      o2(0xe1,0xc9),
+          o2(0xe1,0xc8),      o2(0xc9,0xa5),
+          o2(0xc1,0xc2),      o2(0xc1,0xc1),
+     o3(0x8f,0xcd,0xc5),      o2(0xb5,0xbf),
+     o3(0x8f,0xcd,0xc6), o3(0x8f,0xcd,0xc7),
+          o2(0xe1,0xcb), o3(0x8f,0xcd,0xc8),
+     o3(0x8f,0xcd,0xc9),      o2(0xe1,0xcc),
+     o3(0x8f,0xcd,0xca),      o2(0xe1,0xcd),
+     o3(0x8f,0xcd,0xcb),      o2(0xe1,0xcf),
+     o3(0x8f,0xcd,0xcc),      o2(0xe1,0xce),
+          o2(0xb1,0xd6),      o2(0xe1,0xd7),
+          o2(0xc8,0xe8),      o2(0xe1,0xd1),
+     o3(0x8f,0xcd,0xcd),      o2(0xe1,0xd3),
+          o2(0xe1,0xd5),      o2(0xbf,0xbe),
+     o3(0x8f,0xcd,0xce),      o2(0xe1,0xd6),
+          o2(0xe1,0xd4),      o2(0xbc,0xc0),
+     o3(0x8f,0xcd,0xcf),
+
+#define to_EUC_JP_E7_96 WORDINDEX2INFO(24365)
+    to_EUC_JP_E7_96_offsets,
+    to_EUC_JP_E7_96_infos,
+
+#define to_EUC_JP_E7_97_infos WORDINDEX2INFO(24367)
+                INVALID, o3(0x8f,0xcd,0xd0),
+     o3(0x8f,0xcd,0xd1),      o2(0xe1,0xd0),
+          o2(0xe1,0xd2), o3(0x8f,0xcd,0xd2),
+          o2(0xc9,0xc2), o3(0x8f,0xcd,0xd3),
+          o2(0xbe,0xc9),              UNDEF,
+          o2(0xe1,0xd9), o3(0x8f,0xcd,0xd4),
+          o2(0xe1,0xd8), o3(0x8f,0xcd,0xd5),
+     o3(0x8f,0xcd,0xd6),      o2(0xe1,0xda),
+          o2(0xbc,0xa6),      o2(0xba,0xaf),
+     o3(0x8f,0xcd,0xd7),      o2(0xc5,0xf7),
+          o2(0xe1,0xdb),      o2(0xc4,0xcb),
+     o3(0x8f,0xcd,0xd8),      o2(0xe1,0xdd),
+     o3(0x8f,0xcd,0xd9), o3(0x8f,0xcd,0xda),
+     o3(0x8f,0xcd,0xdb),      o2(0xce,0xa1),
+          o2(0xe1,0xdc), o3(0x8f,0xcd,0xdc),
+     o3(0x8f,0xcd,0xdd),      o2(0xc1,0xe9),
+     o3(0x8f,0xcd,0xde), o3(0x8f,0xcd,0xdf),
+     o3(0x8f,0xcd,0xe0),      o2(0xe1,0xe2),
+     o3(0x8f,0xcd,0xe1),      o2(0xe1,0xe4),
+          o2(0xe1,0xe5),      o2(0xc3,0xd4),
+     o3(0x8f,0xcd,0xe2),      o2(0xe1,0xe3),
+          o2(0xe1,0xe0),      o2(0xe1,0xde),
+          o2(0xe1,0xdf),
+
+#define to_EUC_JP_E7_97 WORDINDEX2INFO(24412)
+    to_EUC_JP_E7_97_offsets,
+    to_EUC_JP_E7_97_infos,
+
+#define to_EUC_JP_E7_98_infos WORDINDEX2INFO(24414)
+                INVALID, o3(0x8f,0xcd,0xe3),
+          o2(0xe1,0xe1), o3(0x8f,0xcd,0xe4),
+     o3(0x8f,0xcd,0xe5), o3(0x8f,0xcd,0xe6),
+                  UNDEF, o3(0x8f,0xcd,0xe7),
+     o3(0x8f,0xcd,0xe8),      o2(0xe1,0xe8),
+     o3(0x8f,0xcd,0xe9),      o2(0xe1,0xe6),
+     o3(0x8f,0xcd,0xea),      o2(0xe1,0xe7),
+     o3(0x8f,0xcd,0xeb), o3(0x8f,0xcd,0xec),
+     o3(0x8f,0xcd,0xed), o3(0x8f,0xcd,0xee),
+     o3(0x8f,0xcd,0xef), o3(0x8f,0xcd,0xf0),
+     o3(0x8f,0xcd,0xf1), o3(0x8f,0xcd,0xf2),
+     o3(0x8f,0xcd,0xf3), o3(0x8f,0xcd,0xf4),
+          o2(0xe1,0xe9),      o2(0xe1,0xeb),
+          o2(0xe1,0xec),      o2(0xe1,0xed),
+     o3(0x8f,0xcd,0xf5),      o2(0xe1,0xee),
+     o3(0x8f,0xcd,0xf6), o3(0x8f,0xcd,0xf7),
+          o2(0xe1,0xea), o3(0x8f,0xcd,0xf8),
+     o3(0x8f,0xcd,0xf9),      o2(0xe1,0xf0),
+     o3(0x8f,0xcd,0xfa), o3(0x8f,0xcd,0xfb),
+          o2(0xe1,0xef), o3(0x8f,0xcd,0xfc),
+     o3(0x8f,0xcd,0xfd), o3(0x8f,0xcd,0xfe),
+     o3(0x8f,0xce,0xa1),      o2(0xe1,0xf1),
+     o3(0x8f,0xce,0xa2),
+
+#define to_EUC_JP_E7_98 WORDINDEX2INFO(24459)
+    to_EUC_JP_E7_98_offsets,
+    to_EUC_JP_E7_98_infos,
+
+#define to_EUC_JP_E7_99_infos WORDINDEX2INFO(24461)
+                INVALID, o3(0x8f,0xce,0xa4),
+     o3(0x8f,0xce,0xa5),      o2(0xce,0xc5),
+     o3(0x8f,0xce,0xa6), o3(0x8f,0xce,0xa7),
+     o3(0x8f,0xce,0xa8),      o2(0xe1,0xf4),
+          o2(0xe1,0xf2),      o2(0xe1,0xf3),
+     o3(0x8f,0xce,0xa9), o3(0x8f,0xce,0xa3),
+     o3(0x8f,0xce,0xaa),      o2(0xb4,0xe2),
+                  UNDEF,      o2(0xcc,0xfe),
+     o3(0x8f,0xce,0xab),      o2(0xca,0xca),
+          o2(0xe1,0xf6), o3(0x8f,0xce,0xac),
+          o2(0xe1,0xf5), o3(0x8f,0xce,0xad),
+          o2(0xe1,0xf7),      o2(0xe1,0xf8),
+     o3(0x8f,0xce,0xae), o3(0x8f,0xce,0xaf),
+          o2(0xe1,0xfc),      o2(0xe1,0xf9),
+          o2(0xe1,0xfa),      o2(0xe1,0xfb),
+          o2(0xe1,0xfd), o3(0x8f,0xce,0xb0),
+     o3(0x8f,0xce,0xb1), o3(0x8f,0xce,0xb2),
+          o2(0xe1,0xfe), o3(0x8f,0xce,0xb3),
+          o2(0xe2,0xa1), o3(0x8f,0xce,0xb4),
+          o2(0xe2,0xa2),      o2(0xe2,0xa3),
+          o2(0xc8,0xaf),      o2(0xc5,0xd0),
+          o2(0xe2,0xa4),      o2(0xc7,0xf2),
+          o2(0xc9,0xb4),
+
+#define to_EUC_JP_E7_99 WORDINDEX2INFO(24506)
+    to_EUC_JP_E7_99_offsets,
+    to_EUC_JP_E7_99_infos,
+
+#define to_EUC_JP_E7_9A_infos WORDINDEX2INFO(24508)
+                INVALID,      o2(0xe2,0xa5),
+     o3(0x8f,0xce,0xb5),              UNDEF,
+          o2(0xe2,0xa6),      o2(0xc5,0xaa),
+     o3(0x8f,0xce,0xb6),      o2(0xb3,0xa7),
+          o2(0xb9,0xc4),      o2(0xe2,0xa7),
+          o2(0xe2,0xa8), o3(0x8f,0xce,0xb7),
+     o3(0x8f,0xce,0xb8),      o2(0xe2,0xa9),
+          o2(0xbb,0xa9),      o2(0xe2,0xab),
+     o3(0x8f,0xce,0xb9),      o2(0xe2,0xaa),
+          o2(0xe2,0xac),      o2(0xe2,0xad),
+     o3(0x8f,0xce,0xba), o3(0x8f,0xce,0xbb),
+     o3(0x8f,0xce,0xbc), o3(0x8f,0xce,0xbd),
+     o3(0x8f,0xce,0xbe), o3(0x8f,0xce,0xbf),
+     o3(0x8f,0xce,0xc0), o3(0x8f,0xce,0xc1),
+     o3(0x8f,0xce,0xc2), o3(0x8f,0xce,0xc3),
+     o3(0x8f,0xce,0xc4), o3(0x8f,0xce,0xc5),
+     o3(0x8f,0xce,0xc6), o3(0x8f,0xce,0xc7),
+          o2(0xc8,0xe9),      o2(0xe2,0xae),
+          o2(0xe2,0xaf),      o2(0xf3,0xe9),
+          o2(0xe2,0xb0),      o2(0xe2,0xb1),
+          o2(0xe2,0xb2), o3(0x8f,0xce,0xc8),
+          o2(0xbb,0xae),
+
+#define to_EUC_JP_E7_9A WORDINDEX2INFO(24551)
+    to_EUC_JP_E7_9A_offsets,
+    to_EUC_JP_E7_9A_infos,
+
+#define to_EUC_JP_E7_9B_infos WORDINDEX2INFO(24553)
+                INVALID,              UNDEF,
+     o3(0x8f,0xce,0xc9),      o2(0xe2,0xb3),
+          o2(0xc7,0xd6), o3(0x8f,0xce,0xca),
+          o2(0xcb,0xdf),      o2(0xb1,0xce),
+     o3(0x8f,0xce,0xcb),      o2(0xb1,0xd7),
+     o3(0x8f,0xce,0xcc), o3(0x8f,0xce,0xcd),
+          o2(0xe2,0xb4), o3(0x8f,0xce,0xce),
+          o2(0xe2,0xb6), o3(0x8f,0xce,0xcf),
+          o2(0xe2,0xb5),      o2(0xc5,0xf0),
+     o3(0x8f,0xce,0xd0),      o2(0xc0,0xb9),
+          o2(0xdd,0xb9),      o2(0xe2,0xb7),
+          o2(0xcc,0xc1), o3(0x8f,0xce,0xd1),
+          o2(0xe2,0xb8),      o2(0xb4,0xc6),
+          o2(0xc8,0xd7),      o2(0xe2,0xb9),
+     o3(0x8f,0xce,0xd2),      o2(0xe2,0xba),
+     o3(0x8f,0xce,0xd3),      o2(0xe2,0xbb),
+     o3(0x8f,0xce,0xd4),      o2(0xcc,0xdc),
+     o3(0x8f,0xce,0xd5), o3(0x8f,0xce,0xd6),
+          o2(0xcc,0xd5),      o2(0xc4,0xbe),
+     o3(0x8f,0xce,0xd7),      o2(0xc1,0xea),
+     o3(0x8f,0xce,0xd8),      o2(0xe2,0xbd),
+     o3(0x8f,0xce,0xd9),      o2(0xbd,0xe2),
+
+#define to_EUC_JP_E7_9B WORDINDEX2INFO(24597)
+    to_EUC_JP_E7_9B_offsets,
+    to_EUC_JP_E7_9B_infos,
+
+#define to_EUC_JP_E7_9C_infos WORDINDEX2INFO(24599)
+                INVALID, o3(0x8f,0xce,0xda),
+          o2(0xbe,0xca),              UNDEF,
+          o2(0xe2,0xc0), o3(0x8f,0xce,0xdb),
+          o2(0xe2,0xbf),      o2(0xe2,0xbe),
+          o2(0xc8,0xfd), o3(0x8f,0xce,0xdc),
+          o2(0xb4,0xc7),      o2(0xb8,0xa9),
+     o3(0x8f,0xce,0xdd), o3(0x8f,0xce,0xde),
+     o3(0x8f,0xce,0xdf), o3(0x8f,0xce,0xe0),
+     o3(0x8f,0xce,0xe1), o3(0x8f,0xce,0xe2),
+     o3(0x8f,0xce,0xe3),      o2(0xe2,0xc6),
+     o3(0x8f,0xce,0xe4),      o2(0xe2,0xc3),
+          o2(0xbf,0xbf),      o2(0xcc,0xb2),
+     o3(0x8f,0xce,0xe5),      o2(0xe2,0xc2),
+          o2(0xe2,0xc4),      o2(0xe2,0xc5),
+     o3(0x8f,0xce,0xe6),      o2(0xe2,0xc1),
+     o3(0x8f,0xce,0xe7), o3(0x8f,0xce,0xe8),
+     o3(0x8f,0xce,0xe9), o3(0x8f,0xce,0xea),
+     o3(0x8f,0xce,0xeb), o3(0x8f,0xce,0xec),
+          o2(0xe2,0xc7),      o2(0xe2,0xc8),
+     o3(0x8f,0xce,0xed),      o2(0xc4,0xaf),
+          o2(0xb4,0xe3), o3(0x8f,0xce,0xee),
+     o3(0x8f,0xce,0xef),
+
+#define to_EUC_JP_E7_9C WORDINDEX2INFO(24642)
+    to_EUC_JP_E7_9C_offsets,
+    to_EUC_JP_E7_9C_infos,
+
+#define to_EUC_JP_E7_9D_infos WORDINDEX2INFO(24644)
+                INVALID,      o2(0xc3,0xe5),
+                  UNDEF, o3(0x8f,0xce,0xf0),
+     o3(0x8f,0xce,0xf1), o3(0x8f,0xce,0xf2),
+          o2(0xe2,0xc9), o3(0x8f,0xce,0xf3),
+     o3(0x8f,0xce,0xf4), o3(0x8f,0xce,0xf5),
+     o3(0x8f,0xce,0xf6), o3(0x8f,0xce,0xf7),
+     o3(0x8f,0xce,0xf8), o3(0x8f,0xce,0xf9),
+          o2(0xe2,0xca),      o2(0xe2,0xcd),
+     o3(0x8f,0xce,0xfa), o3(0x8f,0xce,0xfb),
+     o3(0x8f,0xce,0xfc), o3(0x8f,0xce,0xfd),
+          o2(0xbf,0xe7), o3(0x8f,0xce,0xfe),
+          o2(0xc6,0xc4), o3(0x8f,0xcf,0xa1),
+          o2(0xe2,0xce),      o2(0xcb,0xd3),
+     o3(0x8f,0xcf,0xa2),      o2(0xe2,0xcb),
+     o3(0x8f,0xcf,0xa3),      o2(0xe2,0xcc),
+     o3(0x8f,0xcf,0xa4), o3(0x8f,0xcf,0xa5),
+     o3(0x8f,0xcf,0xa6), o3(0x8f,0xcf,0xa7),
+     o3(0x8f,0xcf,0xa8),      o2(0xe2,0xd1),
+     o3(0x8f,0xcf,0xa9), o3(0x8f,0xcf,0xaa),
+          o2(0xe2,0xd0),      o2(0xe2,0xcf),
+
+#define to_EUC_JP_E7_9D WORDINDEX2INFO(24684)
+    to_EUC_JP_E7_9D_offsets,
+    to_EUC_JP_E7_9D_infos,
+
+#define to_EUC_JP_E7_9E_infos WORDINDEX2INFO(24686)
+                INVALID, o3(0x8f,0xcf,0xab),
+                  UNDEF, o3(0x8f,0xcf,0xac),
+          o2(0xe2,0xd3), o3(0x8f,0xcf,0xad),
+     o3(0x8f,0xcf,0xae),      o2(0xe2,0xd2),
+          o2(0xe2,0xd4), o3(0x8f,0xcf,0xaf),
+     o3(0x8f,0xcf,0xb0), o3(0x8f,0xcf,0xb1),
+     o3(0x8f,0xcf,0xb2),      o2(0xe2,0xd6),
+     o3(0x8f,0xcf,0xb3),      o2(0xe2,0xd5),
+     o3(0x8f,0xcf,0xb4),      o2(0xca,0xcd),
+     o3(0x8f,0xcf,0xb5), o3(0x8f,0xcf,0xb6),
+          o2(0xbd,0xd6),      o2(0xce,0xc6),
+     o3(0x8f,0xcf,0xb7), o3(0x8f,0xcf,0xb8),
+          o2(0xe2,0xd7), o3(0x8f,0xcf,0xb9),
+          o2(0xc6,0xb7), o3(0x8f,0xcf,0xba),
+          o2(0xe2,0xd8),      o2(0xe2,0xd9),
+          o2(0xe2,0xdd),      o2(0xe2,0xdb),
+          o2(0xe2,0xdc), o3(0x8f,0xcf,0xbb),
+          o2(0xe2,0xda),
+
+#define to_EUC_JP_E7_9E WORDINDEX2INFO(24721)
+    to_EUC_JP_E7_9E_offsets,
+    to_EUC_JP_E7_9E_infos,
+
+#define to_EUC_JP_E7_9F_infos WORDINDEX2INFO(24723)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcf,0xbc),      o2(0xe2,0xde),
+     o3(0x8f,0xcf,0xbd),      o2(0xe2,0xdf),
+     o3(0x8f,0xcf,0xbe), o3(0x8f,0xcf,0xbf),
+     o3(0x8f,0xcf,0xc0),      o2(0xe2,0xe0),
+     o3(0x8f,0xcf,0xc1),      o2(0xe2,0xe1),
+          o2(0xcc,0xb7),      o2(0xe2,0xe2),
+     o3(0x8f,0xcf,0xc2), o3(0x8f,0xcf,0xc3),
+     o3(0x8f,0xcf,0xc4),      o2(0xcc,0xf0),
+          o2(0xe2,0xe3), o3(0x8f,0xcf,0xc5),
+          o2(0xc3,0xce), o3(0x8f,0xcf,0xc6),
+          o2(0xc7,0xea),      o2(0xb6,0xeb),
+     o3(0x8f,0xcf,0xc7), o3(0x8f,0xcf,0xc8),
+          o2(0xc3,0xbb),      o2(0xe2,0xe4),
+          o2(0xb6,0xba), o3(0x8f,0xcf,0xc9),
+     o3(0x8f,0xcf,0xca),      o2(0xc0,0xd0),
+     o3(0x8f,0xcf,0xcb), o3(0x8f,0xcf,0xcc),
+     o3(0x8f,0xcf,0xcd),      o2(0xe2,0xe5),
+
+#define to_EUC_JP_E7_9F WORDINDEX2INFO(24759)
+    to_EUC_JP_E7_9F_offsets,
+    to_EUC_JP_E7_9F_infos,
+
+#define to_EUC_JP_E7_A0_infos WORDINDEX2INFO(24761)
+                INVALID,              UNDEF,
+          o2(0xba,0xbd), o3(0x8f,0xcf,0xce),
+     o3(0x8f,0xcf,0xcf), o3(0x8f,0xcf,0xd0),
+          o2(0xe2,0xe6), o3(0x8f,0xcf,0xd1),
+     o3(0x8f,0xcf,0xd2), o3(0x8f,0xcf,0xd3),
+          o2(0xe2,0xe7),      o2(0xb8,0xa6),
+          o2(0xba,0xd5), o3(0x8f,0xcf,0xd4),
+          o2(0xe2,0xe9), o3(0x8f,0xcf,0xd5),
+     o3(0x8f,0xcf,0xd6), o3(0x8f,0xcf,0xd7),
+          o2(0xc5,0xd6),      o2(0xba,0xd6),
+          o2(0xb5,0xce), o3(0x8f,0xcf,0xd8),
+     o3(0x8f,0xcf,0xd9), o3(0x8f,0xcf,0xda),
+          o2(0xcb,0xa4),      o2(0xc7,0xcb),
+     o3(0x8f,0xcf,0xdb), o3(0x8f,0xcf,0xdc),
+          o2(0xc5,0xd7),      o2(0xb9,0xdc),
+
+#define to_EUC_JP_E7_A0 WORDINDEX2INFO(24791)
+    to_EUC_JP_E7_A0_offsets,
+    to_EUC_JP_E7_A0_infos,
+
+#define to_EUC_JP_E7_A1_infos WORDINDEX2INFO(24793)
+                INVALID,              UNDEF,
+     o3(0x8f,0xcf,0xdd), o3(0x8f,0xcf,0xde),
+          o2(0xe2,0xeb), o3(0x8f,0xcf,0xdf),
+     o3(0x8f,0xcf,0xe0), o3(0x8f,0xcf,0xe1),
+     o3(0x8f,0xcf,0xe2), o3(0x8f,0xcf,0xe3),
+     o3(0x8f,0xcf,0xe4),      o2(0xbe,0xcb),
+     o3(0x8f,0xcf,0xe5), o3(0x8f,0xcf,0xe6),
+     o3(0x8f,0xcf,0xe7), o3(0x8f,0xcf,0xe8),
+     o3(0x8f,0xcf,0xe9), o3(0x8f,0xcf,0xea),
+     o3(0x8f,0xcf,0xeb),      o2(0xce,0xb2),
+          o2(0xb9,0xc5), o3(0x8f,0xcf,0xec),
+          o2(0xb8,0xa7),      o2(0xc8,0xa3),
+          o2(0xe2,0xed), o3(0x8f,0xcf,0xed),
+          o2(0xe2,0xef), o3(0x8f,0xcf,0xee),
+
+#define to_EUC_JP_E7_A1 WORDINDEX2INFO(24821)
+    to_EUC_JP_E7_A1_offsets,
+    to_EUC_JP_E7_A1_infos,
+
+#define to_EUC_JP_E7_A2_infos WORDINDEX2INFO(24823)
+                INVALID,              UNDEF,
+          o2(0xb8,0xeb),      o2(0xe2,0xee),
+          o2(0xc4,0xf6), o3(0x8f,0xcf,0xef),
+          o2(0xe2,0xf1),      o2(0xb3,0xb7),
+          o2(0xe2,0xec), o3(0x8f,0xcf,0xf0),
+          o2(0xc8,0xea),      o2(0xb1,0xb0),
+     o3(0x8f,0xcf,0xf1),      o2(0xba,0xec),
+          o2(0xcf,0xd2), o3(0x8f,0xcf,0xf2),
+          o2(0xe2,0xf0), o3(0x8f,0xcf,0xf4),
+     o3(0x8f,0xcf,0xf5), o3(0x8f,0xcf,0xf6),
+     o3(0x8f,0xcf,0xf3),      o2(0xe2,0xf2),
+     o3(0x8f,0xcf,0xf7),      o2(0xca,0xcb),
+     o3(0x8f,0xcf,0xf8),      o2(0xc0,0xd9),
+          o2(0xe2,0xf4), o3(0x8f,0xcf,0xf9),
+     o3(0x8f,0xcf,0xfa),      o2(0xe2,0xf5),
+     o3(0x8f,0xcf,0xfb), o3(0x8f,0xcf,0xfc),
+     o3(0x8f,0xcf,0xfd), o3(0x8f,0xcf,0xfe),
+          o2(0xe2,0xf3),      o2(0xb3,0xce),
+     o3(0x8f,0xd0,0xa1),      o2(0xe2,0xfb),
+     o3(0x8f,0xd0,0xa2),      o2(0xe2,0xfa),
+     o3(0x8f,0xd0,0xa3),
+
+#define to_EUC_JP_E7_A2 WORDINDEX2INFO(24864)
+    to_EUC_JP_E7_A2_offsets,
+    to_EUC_JP_E7_A2_infos,
+
+#define to_EUC_JP_E7_A3_infos WORDINDEX2INFO(24866)
+                INVALID,              UNDEF,
+          o2(0xbc,0xa7),      o2(0xe2,0xfc),
+          o2(0xe2,0xf7), o3(0x8f,0xd0,0xa4),
+     o3(0x8f,0xd0,0xa5), o3(0x8f,0xd0,0xa6),
+          o2(0xe2,0xfd),      o2(0xe2,0xf8),
+     o3(0x8f,0xd0,0xa7), o3(0x8f,0xd0,0xa8),
+          o2(0xc8,0xd8),      o2(0xe2,0xf6),
+     o3(0x8f,0xd0,0xa9), o3(0x8f,0xd0,0xaa),
+          o2(0xe2,0xf9), o3(0x8f,0xd0,0xab),
+     o3(0x8f,0xd0,0xac),      o2(0xe3,0xa2),
+     o3(0x8f,0xd0,0xae), o3(0x8f,0xd0,0xaf),
+     o3(0x8f,0xd0,0xb0), o3(0x8f,0xd0,0xb1),
+     o3(0x8f,0xd0,0xad), o3(0x8f,0xd0,0xb2),
+          o2(0xe3,0xa1),      o2(0xcb,0xe1),
+     o3(0x8f,0xd0,0xb3),      o2(0xe2,0xfe),
+          o2(0xb0,0xeb), o3(0x8f,0xd0,0xb4),
+     o3(0x8f,0xd0,0xb5),      o2(0xe3,0xa4),
+     o3(0x8f,0xd0,0xb7), o3(0x8f,0xd0,0xb8),
+     o3(0x8f,0xd0,0xb9), o3(0x8f,0xd0,0xba),
+          o2(0xe3,0xa3), o3(0x8f,0xd0,0xbb),
+
+#define to_EUC_JP_E7_A3 WORDINDEX2INFO(24906)
+    to_EUC_JP_E7_A3_offsets,
+    to_EUC_JP_E7_A3_infos,
+
+#define to_EUC_JP_E7_A4_infos WORDINDEX2INFO(24908)
+                INVALID, o3(0x8f,0xd0,0xb6),
+          o2(0xbe,0xcc),              UNDEF,
+     o3(0x8f,0xd0,0xbc),      o2(0xe3,0xa5),
+     o3(0x8f,0xd0,0xbd),      o2(0xc1,0xc3),
+     o3(0x8f,0xd0,0xbe),      o2(0xe3,0xa7),
+          o2(0xe3,0xa6),      o2(0xe3,0xa8),
+     o3(0x8f,0xd0,0xbf), o3(0x8f,0xd0,0xc0),
+     o3(0x8f,0xd0,0xc1), o3(0x8f,0xd0,0xc2),
+     o3(0x8f,0xd0,0xc3), o3(0x8f,0xd0,0xc4),
+          o2(0xe2,0xe8), o3(0x8f,0xd0,0xc5),
+     o3(0x8f,0xd0,0xc6),      o2(0xe2,0xea),
+          o2(0xe3,0xaa),      o2(0xe3,0xa9),
+     o3(0x8f,0xd0,0xc7), o3(0x8f,0xd0,0xc8),
+     o3(0x8f,0xd0,0xc9), o3(0x8f,0xd0,0xca),
+          o2(0xbc,0xa8), o3(0x8f,0xd0,0xcb),
+          o2(0xce,0xe9), o3(0x8f,0xd0,0xcc),
+          o2(0xbc,0xd2), o3(0x8f,0xd0,0xcd),
+
+#define to_EUC_JP_E7_A4 WORDINDEX2INFO(24942)
+    to_EUC_JP_E7_A4_offsets,
+    to_EUC_JP_E7_A4_infos,
+
+#define to_EUC_JP_E7_A5_infos WORDINDEX2INFO(24944)
+                INVALID,      o2(0xe3,0xab),
+          o2(0xb7,0xb7),              UNDEF,
+     o3(0x8f,0xd0,0xce), o3(0x8f,0xd0,0xcf),
+     o3(0x8f,0xd0,0xd0),      o2(0xb5,0xc0),
+          o2(0xb5,0xa7),      o2(0xbb,0xe3),
+     o3(0x8f,0xd0,0xd1), o3(0x8f,0xd0,0xd2),
+     o3(0x8f,0xd0,0xd3),      o2(0xcd,0xb4),
+     o3(0x8f,0xd0,0xd4),      o2(0xe3,0xb1),
+     o3(0x8f,0xd0,0xd5),      o2(0xe3,0xb0),
+          o2(0xc1,0xc4),      o2(0xe3,0xad),
+     o3(0x8f,0xd0,0xd6),      o2(0xe3,0xaf),
+     o3(0x8f,0xd0,0xd7), o3(0x8f,0xd0,0xd8),
+          o2(0xbd,0xcb),      o2(0xbf,0xc0),
+          o2(0xe3,0xae),      o2(0xe3,0xac),
+          o2(0xc7,0xaa),      o2(0xbe,0xcd),
+     o3(0x8f,0xd0,0xd9),      o2(0xc9,0xbc),
+     o3(0x8f,0xd0,0xda), o3(0x8f,0xd0,0xdb),
+          o2(0xba,0xd7), o3(0x8f,0xd0,0xdc),
+          o2(0xc5,0xf8), o3(0x8f,0xd0,0xdd),
+          o2(0xe3,0xb2), o3(0x8f,0xd0,0xde),
+     o3(0x8f,0xd0,0xdf), o3(0x8f,0xd0,0xe0),
+          o2(0xe3,0xb3),
+
+#define to_EUC_JP_E7_A5 WORDINDEX2INFO(24987)
+    to_EUC_JP_E7_A5_offsets,
+    to_EUC_JP_E7_A5_infos,
+
+#define to_EUC_JP_E7_A6_infos WORDINDEX2INFO(24989)
+                INVALID,      o2(0xe3,0xc9),
+          o2(0xb6,0xd8),              UNDEF,
+          o2(0xcf,0xbd),      o2(0xc1,0xb5),
+          o2(0xe3,0xb4), o3(0x8f,0xd0,0xe1),
+     o3(0x8f,0xd0,0xe2),      o2(0xb2,0xd2),
+          o2(0xc4,0xf7),      o2(0xca,0xa1),
+     o3(0x8f,0xd0,0xe3), o3(0x8f,0xd0,0xe4),
+     o3(0x8f,0xd0,0xe5), o3(0x8f,0xd0,0xe6),
+     o3(0x8f,0xd0,0xe7), o3(0x8f,0xd0,0xe8),
+     o3(0x8f,0xd0,0xe9), o3(0x8f,0xd0,0xea),
+          o2(0xe3,0xb5), o3(0x8f,0xd0,0xeb),
+          o2(0xb5,0xfa),      o2(0xe3,0xb6),
+     o3(0x8f,0xd0,0xec), o3(0x8f,0xd0,0xed),
+          o2(0xe3,0xb8), o3(0x8f,0xd0,0xee),
+          o2(0xe3,0xb9), o3(0x8f,0xd0,0xef),
+          o2(0xc7,0xa9), o3(0x8f,0xd0,0xf0),
+          o2(0xe3,0xba), o3(0x8f,0xd0,0xf1),
+     o3(0x8f,0xd0,0xf2),      o2(0xe3,0xbb),
+          o2(0xe3,0xbc), o3(0x8f,0xd0,0xf3),
+          o2(0xb6,0xd9),      o2(0xb2,0xd3),
+          o2(0xc6,0xc5),
+
+#define to_EUC_JP_E7_A6 WORDINDEX2INFO(25030)
+    to_EUC_JP_E7_A6_offsets,
+    to_EUC_JP_E7_A6_infos,
+
+#define to_EUC_JP_E7_A7_infos WORDINDEX2INFO(25032)
+                INVALID,      o2(0xbd,0xa8),
+          o2(0xbb,0xe4), o3(0x8f,0xd0,0xf4),
+                  UNDEF, o3(0x8f,0xd0,0xf5),
+     o3(0x8f,0xd0,0xf6), o3(0x8f,0xd0,0xf7),
+          o2(0xe3,0xbd), o3(0x8f,0xd0,0xf8),
+          o2(0xbd,0xa9), o3(0x8f,0xd0,0xf9),
+          o2(0xb2,0xca),      o2(0xc9,0xc3),
+     o3(0x8f,0xd0,0xfa),      o2(0xe3,0xbe),
+     o3(0x8f,0xd0,0xfb),      o2(0xc8,0xeb),
+     o3(0x8f,0xd0,0xfc), o3(0x8f,0xd0,0xfd),
+     o3(0x8f,0xd0,0xfe),      o2(0xc1,0xc5),
+     o3(0x8f,0xd1,0xa1),      o2(0xe3,0xc1),
+     o3(0x8f,0xd1,0xa2),      o2(0xe3,0xc2),
+          o2(0xc7,0xe9), o3(0x8f,0xd1,0xa3),
+          o2(0xbf,0xc1),      o2(0xe3,0xbf),
+          o2(0xc3,0xe1), o3(0x8f,0xd1,0xa4),
+     o3(0x8f,0xd1,0xa5),      o2(0xe3,0xc0),
+     o3(0x8f,0xd1,0xa6),      o2(0xbe,0xce),
+     o3(0x8f,0xd1,0xa7), o3(0x8f,0xd1,0xa8),
+          o2(0xb0,0xdc), o3(0x8f,0xd1,0xa9),
+
+#define to_EUC_JP_E7_A7 WORDINDEX2INFO(25072)
+    to_EUC_JP_E7_A7_offsets,
+    to_EUC_JP_E7_A7_infos,
+
+#define to_EUC_JP_E7_A8_infos WORDINDEX2INFO(25074)
+                INVALID,      o2(0xb5,0xa9),
+                  UNDEF, o3(0x8f,0xd1,0xaa),
+     o3(0x8f,0xd1,0xab), o3(0x8f,0xd1,0xac),
+          o2(0xe3,0xc3), o3(0x8f,0xd1,0xad),
+     o3(0x8f,0xd1,0xae),      o2(0xc4,0xf8),
+     o3(0x8f,0xd1,0xaf),      o2(0xe3,0xc4),
+          o2(0xc0,0xc7), o3(0x8f,0xd1,0xb0),
+          o2(0xcc,0xad), o3(0x8f,0xd1,0xb1),
+          o2(0xc9,0xa3),      o2(0xe3,0xc5),
+          o2(0xe3,0xc6),      o2(0xc3,0xd5),
+     o3(0x8f,0xd1,0xb2),      o2(0xce,0xc7),
+     o3(0x8f,0xd1,0xb3),      o2(0xe3,0xc8),
+          o2(0xe3,0xc7), o3(0x8f,0xd1,0xb4),
+     o3(0x8f,0xd1,0xb5), o3(0x8f,0xd1,0xb6),
+     o3(0x8f,0xd1,0xb7),      o2(0xbc,0xef),
+     o3(0x8f,0xd1,0xb8), o3(0x8f,0xd1,0xb9),
+          o2(0xe3,0xca),      o2(0xb0,0xf0),
+     o3(0x8f,0xd1,0xba), o3(0x8f,0xd1,0xbb),
+          o2(0xe3,0xcd), o3(0x8f,0xd1,0xbc),
+     o3(0x8f,0xd1,0xbd), o3(0x8f,0xd1,0xbe),
+          o2(0xe3,0xcb),      o2(0xb2,0xd4),
+          o2(0xb7,0xce),      o2(0xe3,0xcc),
+          o2(0xb9,0xc6),
+
+#define to_EUC_JP_E7_A8 WORDINDEX2INFO(25119)
+    to_EUC_JP_E7_A8_offsets,
+    to_EUC_JP_E7_A8_infos,
+
+#define to_EUC_JP_E7_A9_infos WORDINDEX2INFO(25121)
+                INVALID,      o2(0xb9,0xf2),
+                  UNDEF,      o2(0xca,0xe6),
+          o2(0xe3,0xce), o3(0x8f,0xd1,0xbf),
+     o3(0x8f,0xd1,0xc0),      o2(0xcb,0xd4),
+     o3(0x8f,0xd1,0xc1), o3(0x8f,0xd1,0xc2),
+          o2(0xe3,0xd0), o3(0x8f,0xd1,0xc3),
+          o2(0xc0,0xd1),      o2(0xb1,0xcf),
+          o2(0xb2,0xba),      o2(0xb0,0xac),
+     o3(0x8f,0xd1,0xc4), o3(0x8f,0xd1,0xc5),
+          o2(0xe3,0xcf), o3(0x8f,0xd1,0xc6),
+     o3(0x8f,0xd1,0xc7), o3(0x8f,0xd1,0xc8),
+     o3(0x8f,0xd1,0xc9), o3(0x8f,0xd1,0xca),
+          o2(0xe3,0xd1),      o2(0xe3,0xd2),
+          o2(0xbe,0xf7), o3(0x8f,0xd1,0xcb),
+     o3(0x8f,0xd1,0xcc),      o2(0xe3,0xd3),
+     o3(0x8f,0xd1,0xcd),      o2(0xb3,0xcf),
+     o3(0x8f,0xd1,0xce),      o2(0xe3,0xd5),
+          o2(0xb7,0xea), o3(0x8f,0xd1,0xcf),
+          o2(0xb5,0xe6), o3(0x8f,0xd1,0xd0),
+          o2(0xe3,0xd6),      o2(0xb6,0xf5),
+          o2(0xe3,0xd7), o3(0x8f,0xd1,0xd1),
+          o2(0xc0,0xfc),
+
+#define to_EUC_JP_E7_A9 WORDINDEX2INFO(25164)
+    to_EUC_JP_E7_A9_offsets,
+    to_EUC_JP_E7_A9_infos,
+
+#define to_EUC_JP_E7_AA_infos WORDINDEX2INFO(25166)
+                INVALID, o3(0x8f,0xd1,0xd2),
+          o2(0xc6,0xcd), o3(0x8f,0xd1,0xd3),
+          o2(0xc0,0xe0),      o2(0xba,0xf5),
+     o3(0x8f,0xd1,0xd4), o3(0x8f,0xd1,0xd5),
+                  UNDEF,      o2(0xe3,0xd8),
+     o3(0x8f,0xd1,0xd6), o3(0x8f,0xd1,0xd7),
+     o3(0x8f,0xd1,0xd8), o3(0x8f,0xd1,0xd9),
+          o2(0xc3,0xe2),      o2(0xc1,0xeb),
+     o3(0x8f,0xd1,0xda),      o2(0xe3,0xda),
+          o2(0xe3,0xdc),      o2(0xe3,0xd9),
+          o2(0xe3,0xdb), o3(0x8f,0xd1,0xdb),
+          o2(0xb7,0xa2), o3(0x8f,0xd1,0xdc),
+     o3(0x8f,0xd1,0xdd),      o2(0xe3,0xdd),
+          o2(0xb7,0xa6), o3(0x8f,0xd1,0xde),
+          o2(0xb5,0xe7),      o2(0xcd,0xd2),
+          o2(0xe3,0xdf), o3(0x8f,0xd1,0xdf),
+     o3(0x8f,0xd1,0xe0),      o2(0xe3,0xe0),
+     o3(0x8f,0xd1,0xe1),      o2(0xb1,0xae),
+     o3(0x8f,0xd1,0xe2), o3(0x8f,0xd1,0xe3),
+          o2(0xe3,0xe3),
+
+#define to_EUC_JP_E7_AA WORDINDEX2INFO(25205)
+    to_EUC_JP_E7_AA_offsets,
+    to_EUC_JP_E7_AA_infos,
+
+#define to_EUC_JP_E7_AB_infos WORDINDEX2INFO(25207)
+                INVALID,              UNDEF,
+          o2(0xb3,0xf6),      o2(0xe3,0xe2),
+          o2(0xe3,0xe1), o3(0x8f,0xd1,0xe4),
+          o2(0xe3,0xe5),      o2(0xe3,0xde),
+     o3(0x8f,0xd1,0xe5),      o2(0xe3,0xe6),
+          o2(0xce,0xa9), o3(0x8f,0xd1,0xe6),
+          o2(0xe3,0xe7), o3(0x8f,0xd1,0xe7),
+          o2(0xe3,0xe8), o3(0x8f,0xd1,0xe8),
+          o2(0xd4,0xf4),      o2(0xe3,0xea),
+          o2(0xe3,0xe9),      o2(0xe3,0xeb),
+          o2(0xe3,0xec), o3(0x8f,0xd1,0xe9),
+          o2(0xce,0xb5),      o2(0xe3,0xed),
+          o2(0xf0,0xef),      o2(0xbe,0xcf),
+          o2(0xe3,0xee),      o2(0xe3,0xef),
+          o2(0xbd,0xd7),      o2(0xc6,0xb8),
+          o2(0xe3,0xf0), o3(0x8f,0xd1,0xea),
+     o3(0x8f,0xd1,0xeb),      o2(0xc3,0xa8),
+     o3(0x8f,0xd1,0xec), o3(0x8f,0xd1,0xed),
+          o2(0xe3,0xf1),      o2(0xc3,0xbc),
+          o2(0xe3,0xf2), o3(0x8f,0xd1,0xee),
+     o3(0x8f,0xd1,0xef),      o2(0xb6,0xa5),
+          o2(0xd1,0xbf),      o2(0xc3,0xdd),
+          o2(0xbc,0xb3), o3(0x8f,0xd1,0xf0),
+     o3(0x8f,0xd1,0xf1), o3(0x8f,0xd1,0xf2),
+          o2(0xb4,0xc8),
+
+#define to_EUC_JP_E7_AB WORDINDEX2INFO(25256)
+    to_EUC_JP_E7_AB_offsets,
+    to_EUC_JP_E7_AB_infos,
+
+#define to_EUC_JP_E7_AC_infos WORDINDEX2INFO(25258)
+                INVALID,              UNDEF,
+          o2(0xe3,0xf3),      o2(0xe4,0xa2),
+          o2(0xe3,0xf6), o3(0x8f,0xd1,0xf3),
+          o2(0xb5,0xe8),      o2(0xe3,0xf5),
+          o2(0xe4,0xa4),      o2(0xe3,0xf4),
+          o2(0xbe,0xd0), o3(0x8f,0xd1,0xf4),
+          o2(0xe3,0xf8),      o2(0xe3,0xf9),
+          o2(0xc5,0xab),      o2(0xe3,0xfa),
+     o3(0x8f,0xd1,0xf5),      o2(0xb3,0xde),
+     o3(0x8f,0xd1,0xf6),      o2(0xbf,0xda),
+          o2(0xc9,0xe4), o3(0x8f,0xd1,0xf7),
+          o2(0xe3,0xfc), o3(0x8f,0xd1,0xf8),
+     o3(0x8f,0xd1,0xf9), o3(0x8f,0xd1,0xfa),
+          o2(0xc2,0xe8), o3(0x8f,0xd1,0xfb),
+     o3(0x8f,0xd1,0xfc), o3(0x8f,0xd1,0xfd),
+     o3(0x8f,0xd1,0xfe), o3(0x8f,0xd2,0xa1),
+          o2(0xe3,0xf7), o3(0x8f,0xd2,0xa2),
+          o2(0xe3,0xfb),      o2(0xe3,0xfd),
+          o2(0xba,0xfb), o3(0x8f,0xd2,0xa3),
+     o3(0x8f,0xd2,0xa4),
+
+#define to_EUC_JP_E7_AC WORDINDEX2INFO(25297)
+    to_EUC_JP_E7_AC_offsets,
+    to_EUC_JP_E7_AC_infos,
+
+#define to_EUC_JP_E7_AD_infos WORDINDEX2INFO(25299)
+                INVALID, o3(0x8f,0xd2,0xa5),
+     o3(0x8f,0xd2,0xa6),              UNDEF,
+          o2(0xe4,0xa6),      o2(0xc9,0xae),
+     o3(0x8f,0xd2,0xa7),      o2(0xc8,0xa6),
+          o2(0xc5,0xf9),      o2(0xb6,0xda),
+          o2(0xe4,0xa5),      o2(0xe4,0xa3),
+     o3(0x8f,0xd2,0xa8),      o2(0xc8,0xb5),
+          o2(0xe3,0xfe),      o2(0xc3,0xde),
+          o2(0xc5,0xfb),      o2(0xc5,0xfa),
+     o3(0x8f,0xd2,0xa9),      o2(0xba,0xf6),
+          o2(0xe4,0xb8), o3(0x8f,0xd2,0xaa),
+     o3(0x8f,0xd2,0xab),      o2(0xe4,0xa8),
+     o3(0x8f,0xd2,0xac),      o2(0xe4,0xaa),
+     o3(0x8f,0xd2,0xad), o3(0x8f,0xd2,0xae),
+          o2(0xe4,0xad), o3(0x8f,0xd2,0xaf),
+          o2(0xe4,0xae), o3(0x8f,0xd2,0xb0),
+          o2(0xe4,0xab),      o2(0xe4,0xac),
+     o3(0x8f,0xd2,0xb1), o3(0x8f,0xd2,0xb2),
+          o2(0xe4,0xa9),      o2(0xe4,0xa7),
+     o3(0x8f,0xd2,0xb3),      o2(0xe4,0xa1),
+
+#define to_EUC_JP_E7_AD WORDINDEX2INFO(25339)
+    to_EUC_JP_E7_AD_offsets,
+    to_EUC_JP_E7_AD_infos,
+
+#define to_EUC_JP_E7_AE_infos WORDINDEX2INFO(25341)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd2,0xb4),      o2(0xca,0xcf),
+          o2(0xb2,0xd5), o3(0x8f,0xd2,0xb5),
+          o2(0xe4,0xb5),      o2(0xe4,0xb2),
+     o3(0x8f,0xd2,0xb6),      o2(0xe4,0xb7),
+     o3(0x8f,0xd2,0xb7), o3(0x8f,0xd2,0xb8),
+          o2(0xe4,0xb6),      o2(0xc7,0xf3),
+          o2(0xcc,0xa7), o3(0x8f,0xd2,0xb9),
+          o2(0xbb,0xbb),      o2(0xe4,0xb0),
+          o2(0xe4,0xb9),      o2(0xe4,0xb4),
+     o3(0x8f,0xd2,0xba),      o2(0xe4,0xb3),
+          o2(0xe4,0xaf), o3(0x8f,0xd2,0xbb),
+          o2(0xe4,0xb1), o3(0x8f,0xd2,0xbc),
+          o2(0xb4,0xc9), o3(0x8f,0xd2,0xbd),
+          o2(0xc3,0xbd), o3(0x8f,0xd2,0xbe),
+          o2(0xc0,0xfd), o3(0x8f,0xd2,0xbf),
+     o3(0x8f,0xd2,0xc0),      o2(0xc8,0xa2),
+     o3(0x8f,0xd2,0xc1),      o2(0xe4,0xbe),
+     o3(0x8f,0xd2,0xc2), o3(0x8f,0xd2,0xc3),
+          o2(0xc8,0xa4), o3(0x8f,0xd2,0xc4),
+     o3(0x8f,0xd2,0xc5), o3(0x8f,0xd2,0xc6),
+     o3(0x8f,0xd2,0xc7),
+
+#define to_EUC_JP_E7_AE WORDINDEX2INFO(25384)
+    to_EUC_JP_E7_AE_offsets,
+    to_EUC_JP_E7_AE_infos,
+
+#define to_EUC_JP_E7_AF_infos WORDINDEX2INFO(25386)
+                INVALID,      o2(0xc0,0xe1),
+          o2(0xe4,0xbb), o3(0x8f,0xd2,0xc8),
+                  UNDEF,      o2(0xc8,0xcf),
+     o3(0x8f,0xd2,0xc9),      o2(0xe4,0xbf),
+          o2(0xca,0xd3), o3(0x8f,0xd2,0xca),
+          o2(0xc3,0xdb), o3(0x8f,0xd2,0xcb),
+          o2(0xe4,0xba),      o2(0xe4,0xbc),
+          o2(0xe4,0xbd), o3(0x8f,0xd2,0xcc),
+     o3(0x8f,0xd2,0xcd), o3(0x8f,0xd2,0xce),
+     o3(0x8f,0xd2,0xcf), o3(0x8f,0xd2,0xd0),
+     o3(0x8f,0xd2,0xd1),      o2(0xe4,0xc0),
+          o2(0xbc,0xc4),      o2(0xc6,0xc6),
+          o2(0xe4,0xc5),      o2(0xe4,0xc4),
+     o3(0x8f,0xd2,0xd2),      o2(0xe4,0xc1),
+     o3(0x8f,0xd2,0xd3),      o2(0xcf,0xb6),
+     o3(0x8f,0xd2,0xd4),      o2(0xe4,0xca),
+     o3(0x8f,0xd2,0xd5), o3(0x8f,0xd2,0xd6),
+          o2(0xe4,0xce),      o2(0xe4,0xcb),
+     o3(0x8f,0xd2,0xd7), o3(0x8f,0xd2,0xd8),
+     o3(0x8f,0xd2,0xd9), o3(0x8f,0xd2,0xda),
+     o3(0x8f,0xd2,0xdb),
+
+#define to_EUC_JP_E7_AF WORDINDEX2INFO(25427)
+    to_EUC_JP_E7_AF_offsets,
+    to_EUC_JP_E7_AF_infos,
+
+#define to_EUC_JP_E7_B0_infos WORDINDEX2INFO(25429)
+                INVALID,      o2(0xe4,0xc7),
+     o3(0x8f,0xd2,0xdc), o3(0x8f,0xd2,0xdd),
+     o3(0x8f,0xd2,0xde), o3(0x8f,0xd2,0xdf),
+                  UNDEF, o3(0x8f,0xd2,0xe0),
+          o2(0xe4,0xc8), o3(0x8f,0xd2,0xe1),
+     o3(0x8f,0xd2,0xe2), o3(0x8f,0xd2,0xe3),
+          o2(0xe4,0xcd), o3(0x8f,0xd2,0xe4),
+     o3(0x8f,0xd2,0xe5),      o2(0xe4,0xc2),
+          o2(0xd2,0xd5),      o2(0xe4,0xc9),
+          o2(0xe4,0xc3),      o2(0xe4,0xcc),
+     o3(0x8f,0xd2,0xe6), o3(0x8f,0xd2,0xe7),
+          o2(0xe4,0xd2), o3(0x8f,0xd2,0xe8),
+          o2(0xb4,0xca),      o2(0xe4,0xcf),
+     o3(0x8f,0xd2,0xe9), o3(0x8f,0xd2,0xea),
+          o2(0xe4,0xd0), o3(0x8f,0xd2,0xeb),
+          o2(0xe4,0xd1),      o2(0xe4,0xd4),
+     o3(0x8f,0xd2,0xec), o3(0x8f,0xd2,0xed),
+     o3(0x8f,0xd2,0xee), o3(0x8f,0xd2,0xef),
+     o3(0x8f,0xd2,0xf0),      o2(0xe4,0xd3),
+          o2(0xc8,0xf6), o3(0x8f,0xd2,0xf1),
+     o3(0x8f,0xd2,0xf2),      o2(0xe4,0xd5),
+          o2(0xce,0xfc),      o2(0xca,0xed),
+
+#define to_EUC_JP_E7_B0 WORDINDEX2INFO(25473)
+    to_EUC_JP_E7_B0_offsets,
+    to_EUC_JP_E7_B0_infos,
+
+#define to_EUC_JP_E7_B1_infos WORDINDEX2INFO(25475)
+                INVALID,      o2(0xe4,0xda),
+                  UNDEF,      o2(0xe4,0xd7),
+     o3(0x8f,0xd2,0xf3), o3(0x8f,0xd2,0xf4),
+          o2(0xe4,0xd6),      o2(0xc0,0xd2),
+          o2(0xe4,0xd9),      o2(0xe4,0xdb),
+     o3(0x8f,0xd2,0xf6), o3(0x8f,0xd2,0xf7),
+     o3(0x8f,0xd2,0xf8),      o2(0xe4,0xd8),
+     o3(0x8f,0xd2,0xf5),      o2(0xe4,0xdf),
+          o2(0xe4,0xdc), o3(0x8f,0xd2,0xf9),
+     o3(0x8f,0xd2,0xfa), o3(0x8f,0xd2,0xfb),
+     o3(0x8f,0xd2,0xfc), o3(0x8f,0xd2,0xfd),
+     o3(0x8f,0xd2,0xfe),      o2(0xe4,0xdd),
+          o2(0xe4,0xc6), o3(0x8f,0xd3,0xa1),
+     o3(0x8f,0xd3,0xa2),      o2(0xe4,0xde),
+          o2(0xe4,0xe0), o3(0x8f,0xd3,0xa3),
+     o3(0x8f,0xd3,0xa4),      o2(0xe4,0xe1),
+     o3(0x8f,0xd3,0xa5), o3(0x8f,0xd3,0xa6),
+     o3(0x8f,0xd3,0xa7), o3(0x8f,0xd3,0xa8),
+          o2(0xca,0xc6),      o2(0xe4,0xe2),
+     o3(0x8f,0xd3,0xa9), o3(0x8f,0xd3,0xaa),
+     o3(0x8f,0xd3,0xab),      o2(0xcc,0xe2),
+
+#define to_EUC_JP_E7_B1 WORDINDEX2INFO(25517)
+    to_EUC_JP_E7_B1_offsets,
+    to_EUC_JP_E7_B1_infos,
+
+#define to_EUC_JP_E7_B2_infos WORDINDEX2INFO(25519)
+                INVALID,              UNDEF,
+          o2(0xb6,0xce),      o2(0xb7,0xa9),
+          o2(0xe4,0xe3), o3(0x8f,0xd3,0xac),
+     o3(0x8f,0xd3,0xad),      o2(0xca,0xb4),
+          o2(0xbf,0xe8),      o2(0xcc,0xb0),
+     o3(0x8f,0xd3,0xae),      o2(0xe4,0xe4),
+          o2(0xce,0xb3), o3(0x8f,0xd3,0xaf),
+          o2(0xc7,0xf4),      o2(0xc1,0xc6),
+          o2(0xc7,0xb4),      o2(0xbd,0xcd),
+     o3(0x8f,0xd3,0xb0),      o2(0xb0,0xc0),
+     o3(0x8f,0xd3,0xb1),      o2(0xe4,0xe9),
+          o2(0xe4,0xe7),      o2(0xe4,0xe5),
+          o2(0xb4,0xa1), o3(0x8f,0xd3,0xb2),
+          o2(0xbe,0xd1),      o2(0xe4,0xea),
+          o2(0xe4,0xe8),      o2(0xe4,0xe6),
+          o2(0xe4,0xee), o3(0x8f,0xd3,0xb3),
+          o2(0xe4,0xed),      o2(0xe4,0xec),
+          o2(0xe4,0xeb), o3(0x8f,0xd3,0xb4),
+     o3(0x8f,0xd3,0xb5),      o2(0xe4,0xef),
+     o3(0x8f,0xd3,0xb6), o3(0x8f,0xd3,0xb7),
+     o3(0x8f,0xd3,0xb8),      o2(0xe4,0xf0),
+          o2(0xc0,0xba), o3(0x8f,0xd3,0xb9),
+
+#define to_EUC_JP_E7_B2 WORDINDEX2INFO(25563)
+    to_EUC_JP_E7_B2_offsets,
+    to_EUC_JP_E7_B2_infos,
+
+#define to_EUC_JP_E7_B3_infos WORDINDEX2INFO(25565)
+                INVALID,      o2(0xe4,0xf1),
+                  UNDEF,      o2(0xe4,0xf3),
+     o3(0x8f,0xd3,0xba),      o2(0xe4,0xf2),
+     o3(0x8f,0xd3,0xbb), o3(0x8f,0xd3,0xbc),
+     o3(0x8f,0xd3,0xbd),      o2(0xb8,0xd2),
+     o3(0x8f,0xd3,0xbe),      o2(0xc1,0xb8),
+     o3(0x8f,0xd3,0xbf),      o2(0xe4,0xf5),
+     o3(0x8f,0xd3,0xc0), o3(0x8f,0xd3,0xc1),
+     o3(0x8f,0xd3,0xc2),      o2(0xc5,0xfc),
+     o3(0x8f,0xd3,0xc3),      o2(0xe4,0xf4),
+     o3(0x8f,0xd3,0xc4), o3(0x8f,0xd3,0xc5),
+          o2(0xe4,0xf6), o3(0x8f,0xd3,0xc6),
+          o2(0xca,0xb5),      o2(0xc1,0xec),
+          o2(0xb9,0xc7),      o2(0xe4,0xf7),
+     o3(0x8f,0xd3,0xc7),      o2(0xce,0xc8),
+     o3(0x8f,0xd3,0xc8), o3(0x8f,0xd3,0xc9),
+          o2(0xe4,0xf9),      o2(0xe4,0xfa),
+          o2(0xe4,0xfb), o3(0x8f,0xd3,0xca),
+          o2(0xe4,0xfc),      o2(0xbb,0xe5),
+          o2(0xe4,0xfd),      o2(0xb7,0xcf),
+          o2(0xb5,0xea),
+
+#define to_EUC_JP_E7_B3 WORDINDEX2INFO(25606)
+    to_EUC_JP_E7_B3_offsets,
+    to_EUC_JP_E7_B3_infos,
+
+#define to_EUC_JP_E7_B4_infos WORDINDEX2INFO(25608)
+                INVALID,      o2(0xb5,0xaa),
+                  UNDEF,      o2(0xe5,0xa1),
+     o3(0x8f,0xd3,0xcb),      o2(0xcc,0xf3),
+          o2(0xb9,0xc8),      o2(0xe4,0xfe),
+     o3(0x8f,0xd3,0xcc), o3(0x8f,0xd3,0xcd),
+     o3(0x8f,0xd3,0xce),      o2(0xe5,0xa4),
+          o2(0xcc,0xe6),      o2(0xc7,0xbc),
+     o3(0x8f,0xd3,0xcf),      o2(0xc9,0xb3),
+     o3(0x8f,0xd3,0xd0), o3(0x8f,0xd3,0xd1),
+     o3(0x8f,0xd3,0xd2),      o2(0xbd,0xe3),
+          o2(0xe5,0xa3), o3(0x8f,0xd3,0xd3),
+          o2(0xbc,0xd3),      o2(0xb9,0xc9),
+          o2(0xbb,0xe6),      o2(0xb5,0xe9),
+          o2(0xca,0xb6),      o2(0xe5,0xa2),
+     o3(0x8f,0xd3,0xd4), o3(0x8f,0xd3,0xd5),
+          o2(0xc1,0xc7),      o2(0xcb,0xc2),
+          o2(0xba,0xf7), o3(0x8f,0xd3,0xd6),
+     o3(0x8f,0xd3,0xd7), o3(0x8f,0xd3,0xd8),
+          o2(0xbb,0xe7),      o2(0xc4,0xdd),
+     o3(0x8f,0xd3,0xd9),      o2(0xe5,0xa7),
+          o2(0xce,0xdf),      o2(0xba,0xd9),
+     o3(0x8f,0xd3,0xda),      o2(0xe5,0xa8),
+          o2(0xbf,0xc2),      o2(0xe5,0xaa),
+          o2(0xbe,0xd2),      o2(0xba,0xb0),
+     o3(0x8f,0xd3,0xdb), o3(0x8f,0xd3,0xdc),
+     o3(0x8f,0xd3,0xdd),      o2(0xe5,0xa9),
+
+#define to_EUC_JP_E7_B4 WORDINDEX2INFO(25660)
+    to_EUC_JP_E7_B4_offsets,
+    to_EUC_JP_E7_B4_infos,
+
+#define to_EUC_JP_E7_B5_infos WORDINDEX2INFO(25662)
+                INVALID, o3(0x8f,0xd3,0xde),
+     o3(0x8f,0xd3,0xdf),      o2(0xbd,0xaa),
+          o2(0xb8,0xbe),      o2(0xc1,0xc8),
+          o2(0xe5,0xa5),      o2(0xe5,0xab),
+     o3(0x8f,0xd3,0xe0), o3(0x8f,0xd3,0xe1),
+                  UNDEF,      o2(0xe5,0xa6),
+          o2(0xb7,0xd0), o3(0x8f,0xd3,0xe2),
+          o2(0xe5,0xae),      o2(0xe5,0xb2),
+          o2(0xb7,0xeb), o3(0x8f,0xd3,0xe3),
+     o3(0x8f,0xd3,0xe4),      o2(0xe5,0xad),
+     o3(0x8f,0xd3,0xe5), o3(0x8f,0xd3,0xe6),
+     o3(0x8f,0xd3,0xe7),      o2(0xe5,0xb6),
+     o3(0x8f,0xd3,0xe8), o3(0x8f,0xd3,0xe9),
+          o2(0xb9,0xca),      o2(0xcd,0xed),
+          o2(0xb0,0xbc),      o2(0xe5,0xb3),
+     o3(0x8f,0xd3,0xea),      o2(0xb5,0xeb),
+     o3(0x8f,0xd3,0xeb),      o2(0xe5,0xb0),
+     o3(0x8f,0xd3,0xec),      o2(0xe5,0xb1),
+     o3(0x8f,0xd3,0xed),      o2(0xc5,0xfd),
+          o2(0xe5,0xaf),      o2(0xe5,0xac),
+          o2(0xb3,0xa8),      o2(0xc0,0xe4),
+     o3(0x8f,0xd3,0xee),      o2(0xb8,0xa8),
+     o3(0x8f,0xd3,0xef), o3(0x8f,0xd3,0xf0),
+          o2(0xe5,0xb8), o3(0x8f,0xd3,0xf1),
+
+#define to_EUC_JP_E7_B5 WORDINDEX2INFO(25710)
+    to_EUC_JP_E7_B5_offsets,
+    to_EUC_JP_E7_B5_infos,
+
+#define to_EUC_JP_E7_B6_infos WORDINDEX2INFO(25712)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd3,0xf2), o3(0x8f,0xd3,0xf3),
+     o3(0x8f,0xd3,0xf4), o3(0x8f,0xd3,0xf5),
+     o3(0x8f,0xd3,0xf6), o3(0x8f,0xd3,0xf7),
+          o2(0xe5,0xb5), o3(0x8f,0xd3,0xf8),
+     o3(0x8f,0xd3,0xf9), o3(0x8f,0xd3,0xfa),
+          o2(0xe5,0xb7), o3(0x8f,0xd3,0xfb),
+          o2(0xe5,0xb4), o3(0x8f,0xd3,0xfc),
+     o3(0x8f,0xd3,0xfd),      o2(0xb7,0xd1),
+          o2(0xc2,0xb3),      o2(0xe5,0xb9),
+          o2(0xc1,0xee), o3(0x8f,0xd3,0xfe),
+     o3(0x8f,0xd4,0xa1),      o2(0xe5,0xc6),
+          o2(0xe5,0xc2),      o2(0xe5,0xbc),
+     o3(0x8f,0xd4,0xa2), o3(0x8f,0xd4,0xa3),
+     o3(0x8f,0xd4,0xa4),      o2(0xe5,0xc0),
+          o2(0xbc,0xfa),      o2(0xb0,0xdd),
+          o2(0xe5,0xbb),      o2(0xe5,0xc3),
+          o2(0xe5,0xc7),      o2(0xb9,0xcb),
+          o2(0xcc,0xd6), o3(0x8f,0xd4,0xa5),
+          o2(0xc4,0xd6),      o2(0xe5,0xbd),
+     o3(0x8f,0xd4,0xa6), o3(0x8f,0xd4,0xa7),
+          o2(0xe5,0xc5), o3(0x8f,0xd4,0xa8),
+          o2(0xe5,0xba),      o2(0xc3,0xbe),
+          o2(0xe5,0xbf),      o2(0xb0,0xbd),
+          o2(0xcc,0xca),
+
+#define to_EUC_JP_E7_B6 WORDINDEX2INFO(25761)
+    to_EUC_JP_E7_B6_offsets,
+    to_EUC_JP_E7_B6_infos,
+
+#define to_EUC_JP_E7_B7_infos WORDINDEX2INFO(25763)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd4,0xa9), o3(0x8f,0xd4,0xaa),
+     o3(0x8f,0xd4,0xab), o3(0x8f,0xd4,0xac),
+     o3(0x8f,0xd4,0xad),      o2(0xe5,0xbe),
+          o2(0xb6,0xdb),      o2(0xc8,0xec),
+     o3(0x8f,0xd4,0xae), o3(0x8f,0xd4,0xaf),
+     o3(0x8f,0xd4,0xb0),      o2(0xc1,0xed),
+          o2(0xce,0xd0),      o2(0xbd,0xef),
+          o2(0xe5,0xee), o3(0x8f,0xd4,0xb1),
+          o2(0xe5,0xc8), o3(0x8f,0xd4,0xb2),
+          o2(0xc0,0xfe),      o2(0xe5,0xc4),
+          o2(0xe5,0xc9),      o2(0xe5,0xcb),
+          o2(0xc4,0xf9),      o2(0xe5,0xce),
+     o3(0x8f,0xd4,0xb4),      o2(0xe5,0xca),
+     o3(0x8f,0xd4,0xb5), o3(0x8f,0xd4,0xb6),
+          o2(0xca,0xd4),      o2(0xb4,0xcb),
+     o3(0x8f,0xd4,0xb7), o3(0x8f,0xd4,0xb8),
+          o2(0xcc,0xcb), o3(0x8f,0xd4,0xb9),
+          o2(0xb0,0xde), o3(0x8f,0xd4,0xba),
+          o2(0xe5,0xcd),      o2(0xce,0xfd),
+     o3(0x8f,0xd4,0xbb), o3(0x8f,0xd4,0xbc),
+     o3(0x8f,0xd4,0xbd), o3(0x8f,0xd4,0xbe),
+          o2(0xe5,0xcc),
+
+#define to_EUC_JP_E7_B7 WORDINDEX2INFO(25808)
+    to_EUC_JP_E7_B7_offsets,
+    to_EUC_JP_E7_B7_infos,
+
+#define to_EUC_JP_E7_B8_infos WORDINDEX2INFO(25810)
+                INVALID, o3(0x8f,0xd4,0xb3),
+          o2(0xb1,0xef),              UNDEF,
+          o2(0xc6,0xec),      o2(0xe5,0xcf),
+     o3(0x8f,0xd4,0xbf),      o2(0xe5,0xd6),
+          o2(0xe5,0xd0),      o2(0xe5,0xd7),
+     o3(0x8f,0xd4,0xc0), o3(0x8f,0xd4,0xc1),
+          o2(0xe5,0xd3), o3(0x8f,0xd4,0xc2),
+     o3(0x8f,0xd4,0xc3),      o2(0xc7,0xfb),
+     o3(0x8f,0xd4,0xc4), o3(0x8f,0xd4,0xc5),
+          o2(0xbc,0xca),      o2(0xe5,0xd5),
+     o3(0x8f,0xd4,0xc6),      o2(0xe5,0xd2),
+          o2(0xe5,0xd8),      o2(0xe5,0xd1),
+          o2(0xbd,0xc4), o3(0x8f,0xd4,0xc7),
+     o3(0x8f,0xd4,0xc8),      o2(0xcb,0xa5),
+     o3(0x8f,0xd4,0xc9), o3(0x8f,0xd4,0xca),
+          o2(0xbd,0xcc), o3(0x8f,0xd4,0xcb),
+          o2(0xe5,0xd4),      o2(0xe5,0xe0),
+     o3(0x8f,0xd4,0xcc),      o2(0xe5,0xdc),
+     o3(0x8f,0xd4,0xcd),      o2(0xe5,0xdf),
+          o2(0xe5,0xdd),      o2(0xe5,0xe1),
+          o2(0xe5,0xdb),      o2(0xe5,0xc1),
+          o2(0xc0,0xd3), o3(0x8f,0xd4,0xce),
+
+#define to_EUC_JP_E7_B8 WORDINDEX2INFO(25854)
+    to_EUC_JP_E7_B8_offsets,
+    to_EUC_JP_E7_B8_infos,
+
+#define to_EUC_JP_E7_B9_infos WORDINDEX2INFO(25856)
+                INVALID,              UNDEF,
+          o2(0xc8,0xcb),      o2(0xe5,0xde),
+     o3(0x8f,0xd4,0xcf), o3(0x8f,0xd4,0xd0),
+          o2(0xe5,0xd9), o3(0x8f,0xd4,0xd1),
+          o2(0xc1,0xa1),      o2(0xb7,0xd2),
+          o2(0xbd,0xab), o3(0x8f,0xd4,0xd2),
+     o3(0x8f,0xd4,0xd3), o3(0x8f,0xd4,0xd4),
+          o2(0xbf,0xa5),      o2(0xc1,0xb6),
+          o2(0xe5,0xe4), o3(0x8f,0xd4,0xd5),
+          o2(0xe5,0xe6),      o2(0xe5,0xe7),
+          o2(0xe5,0xe3),      o2(0xe5,0xe5),
+     o3(0x8f,0xd4,0xd6), o3(0x8f,0xd4,0xd7),
+     o3(0x8f,0xd4,0xd8), o3(0x8f,0xd4,0xd9),
+          o2(0xe5,0xda),      o2(0xe5,0xe2),
+          o2(0xe5,0xea),      o2(0xe5,0xe9),
+     o3(0x8f,0xd4,0xda),      o2(0xcb,0xfa),
+     o3(0x8f,0xd4,0xdb), o3(0x8f,0xd4,0xdc),
+          o2(0xb7,0xab), o3(0x8f,0xd4,0xdd),
+     o3(0x8f,0xd4,0xde),      o2(0xe5,0xe8),
+          o2(0xe5,0xec),      o2(0xe5,0xeb),
+          o2(0xe5,0xef), o3(0x8f,0xd4,0xdf),
+          o2(0xe5,0xf1),
+
+#define to_EUC_JP_E7_B9 WORDINDEX2INFO(25899)
+    to_EUC_JP_E7_B9_offsets,
+    to_EUC_JP_E7_B9_infos,
+
+#define to_EUC_JP_E7_BA_infos WORDINDEX2INFO(25901)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd4,0xe0),      o2(0xbb,0xbc),
+          o2(0xe5,0xed), o3(0x8f,0xd4,0xe1),
+     o3(0x8f,0xd4,0xe2),      o2(0xe5,0xf2),
+          o2(0xe5,0xf3), o3(0x8f,0xd4,0xe3),
+          o2(0xe5,0xf4), o3(0x8f,0xd4,0xe4),
+          o2(0xe5,0xfa),      o2(0xc5,0xbb),
+          o2(0xe5,0xf6), o3(0x8f,0xd4,0xe5),
+          o2(0xe5,0xf5),      o2(0xe5,0xf7),
+          o2(0xe5,0xf8), o3(0x8f,0xd4,0xe6),
+          o2(0xe5,0xf9), o3(0x8f,0xd4,0xe7),
+     o3(0x8f,0xd4,0xe8),      o2(0xe5,0xfb),
+          o2(0xe5,0xfc), o3(0x8f,0xd4,0xe9),
+     o3(0x8f,0xd4,0xea),
+
+#define to_EUC_JP_E7_BA WORDINDEX2INFO(25928)
+    to_EUC_JP_E7_BA_offsets,
+    to_EUC_JP_E7_BA_infos,
+
+#define to_EUC_JP_E7_BC_infos WORDINDEX2INFO(25930)
+                INVALID,              UNDEF,
+          o2(0xb4,0xcc),      o2(0xe5,0xfd),
+          o2(0xe5,0xfe), o3(0x8f,0xd4,0xec),
+     o3(0x8f,0xd4,0xeb), o3(0x8f,0xd4,0xed),
+     o3(0x8f,0xd4,0xee), o3(0x8f,0xd4,0xef),
+
+#define to_EUC_JP_E7_BC WORDINDEX2INFO(25940)
+    to_EUC_JP_E7_BC_offsets,
+    to_EUC_JP_E7_BC_infos,
+
+#define to_EUC_JP_E7_BD_infos WORDINDEX2INFO(25942)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd4,0xf0), o3(0x8f,0xd4,0xf1),
+          o2(0xe6,0xa1), o3(0x8f,0xd4,0xf2),
+          o2(0xe6,0xa2),      o2(0xe6,0xa3),
+          o2(0xe6,0xa4), o3(0x8f,0xd4,0xf3),
+          o2(0xe6,0xa5),      o2(0xe6,0xa6),
+     o3(0x8f,0xd4,0xf4), o3(0x8f,0xd4,0xf5),
+          o2(0xe6,0xa8),      o2(0xe6,0xa7),
+          o2(0xe6,0xa9), o3(0x8f,0xd4,0xf6),
+     o3(0x8f,0xd4,0xf7), o3(0x8f,0xd4,0xf8),
+          o2(0xe6,0xaa),      o2(0xe6,0xab),
+     o3(0x8f,0xd4,0xf9), o3(0x8f,0xd4,0xfa),
+     o3(0x8f,0xd4,0xfb), o3(0x8f,0xd4,0xfc),
+     o3(0x8f,0xd4,0xfd),      o2(0xe6,0xae),
+          o2(0xe6,0xac),      o2(0xe6,0xad),
+          o2(0xba,0xe1),      o2(0xb7,0xd3),
+     o3(0x8f,0xd4,0xfe),      o2(0xc3,0xd6),
+          o2(0xc8,0xb3), o3(0x8f,0xd5,0xa1),
+          o2(0xbd,0xf0),      o2(0xc7,0xcd),
+          o2(0xc8,0xed),      o2(0xe6,0xaf),
+          o2(0xd8,0xed), o3(0x8f,0xd5,0xa2),
+     o3(0x8f,0xd5,0xa3), o3(0x8f,0xd5,0xa4),
+
+#define to_EUC_JP_E7_BD WORDINDEX2INFO(25986)
+    to_EUC_JP_E7_BD_offsets,
+    to_EUC_JP_E7_BD_infos,
+
+#define to_EUC_JP_E7_BE_infos WORDINDEX2INFO(25988)
+                INVALID, o3(0x8f,0xd5,0xa5),
+                  UNDEF,      o2(0xe6,0xb0),
+          o2(0xe6,0xb2),      o2(0xcd,0xe5),
+          o2(0xe6,0xb1),      o2(0xe6,0xb4),
+          o2(0xe6,0xb3),      o2(0xcd,0xd3),
+     o3(0x8f,0xd5,0xa6),      o2(0xe6,0xb5),
+     o3(0x8f,0xd5,0xa7),      o2(0xc8,0xfe),
+     o3(0x8f,0xd5,0xa8), o3(0x8f,0xd5,0xa9),
+     o3(0x8f,0xd5,0xaa),      o2(0xe6,0xb6),
+     o3(0x8f,0xd5,0xab), o3(0x8f,0xd5,0xac),
+          o2(0xe6,0xb9), o3(0x8f,0xd5,0xad),
+          o2(0xe6,0xb8),      o2(0xe6,0xb7),
+     o3(0x8f,0xd5,0xae), o3(0x8f,0xd5,0xaf),
+          o2(0xe6,0xba),      o2(0xb7,0xb2),
+     o3(0x8f,0xd5,0xb0),      o2(0xc1,0xa2),
+          o2(0xb5,0xc1), o3(0x8f,0xd5,0xb1),
+     o3(0x8f,0xd5,0xb2),      o2(0xe6,0xbe),
+          o2(0xe6,0xbb),      o2(0xe6,0xbc),
+     o3(0x8f,0xd5,0xb3),      o2(0xe6,0xbf),
+          o2(0xe6,0xc0),      o2(0xe6,0xbd),
+     o3(0x8f,0xd5,0xb4),      o2(0xb1,0xa9),
+     o3(0x8f,0xd5,0xb5),
+
+#define to_EUC_JP_E7_BE WORDINDEX2INFO(26031)
+    to_EUC_JP_E7_BE_offsets,
+    to_EUC_JP_E7_BE_infos,
+
+#define to_EUC_JP_E7_BF_infos WORDINDEX2INFO(26033)
+                INVALID, o3(0x8f,0xd5,0xb6),
+          o2(0xb2,0xa7),              UNDEF,
+     o3(0x8f,0xd5,0xb7),      o2(0xe6,0xc2),
+          o2(0xe6,0xc3), o3(0x8f,0xd5,0xb8),
+          o2(0xe6,0xc4),      o2(0xcd,0xe2),
+     o3(0x8f,0xd5,0xb9), o3(0x8f,0xd5,0xba),
+          o2(0xbd,0xac),      o2(0xe6,0xc6),
+          o2(0xe6,0xc5), o3(0x8f,0xd5,0xbb),
+     o3(0x8f,0xd5,0xbc),      o2(0xbf,0xe9),
+          o2(0xe6,0xc7), o3(0x8f,0xd5,0xbd),
+     o3(0x8f,0xd5,0xbe),      o2(0xe6,0xc8),
+     o3(0x8f,0xd5,0xbf),      o2(0xe6,0xc9),
+          o2(0xb4,0xe5), o3(0x8f,0xd5,0xc0),
+     o3(0x8f,0xd5,0xc1), o3(0x8f,0xd5,0xc2),
+          o2(0xb4,0xcd), o3(0x8f,0xd5,0xc3),
+          o2(0xe6,0xca),      o2(0xe6,0xcb),
+     o3(0x8f,0xd5,0xc4),      o2(0xcb,0xdd),
+          o2(0xcd,0xe3), o3(0x8f,0xd5,0xc5),
+     o3(0x8f,0xd5,0xc6), o3(0x8f,0xd5,0xc7),
+
+#define to_EUC_JP_E7_BF WORDINDEX2INFO(26071)
+    to_EUC_JP_E7_BF_offsets,
+    to_EUC_JP_E7_BF_infos,
+
+#define to_EUC_JP_E7_infos WORDINDEX2INFO(26073)
+             INVALID, to_EUC_JP_E7_80, to_EUC_JP_E7_81, to_EUC_JP_E7_82,
+     to_EUC_JP_E7_83, to_EUC_JP_E7_84, to_EUC_JP_E7_85, to_EUC_JP_E7_86,
+     to_EUC_JP_E7_87, to_EUC_JP_E7_88, to_EUC_JP_E7_89, to_EUC_JP_E7_8A,
+     to_EUC_JP_E7_8B, to_EUC_JP_E7_8C, to_EUC_JP_E7_8D, to_EUC_JP_E7_8E,
+     to_EUC_JP_E7_8F, to_EUC_JP_E7_90, to_EUC_JP_E7_91, to_EUC_JP_E7_92,
+     to_EUC_JP_E7_93, to_EUC_JP_E7_94, to_EUC_JP_E7_95, to_EUC_JP_E7_96,
+     to_EUC_JP_E7_97, to_EUC_JP_E7_98, to_EUC_JP_E7_99, to_EUC_JP_E7_9A,
+     to_EUC_JP_E7_9B, to_EUC_JP_E7_9C, to_EUC_JP_E7_9D, to_EUC_JP_E7_9E,
+     to_EUC_JP_E7_9F, to_EUC_JP_E7_A0, to_EUC_JP_E7_A1, to_EUC_JP_E7_A2,
+     to_EUC_JP_E7_A3, to_EUC_JP_E7_A4, to_EUC_JP_E7_A5, to_EUC_JP_E7_A6,
+     to_EUC_JP_E7_A7, to_EUC_JP_E7_A8, to_EUC_JP_E7_A9, to_EUC_JP_E7_AA,
+     to_EUC_JP_E7_AB, to_EUC_JP_E7_AC, to_EUC_JP_E7_AD, to_EUC_JP_E7_AE,
+     to_EUC_JP_E7_AF, to_EUC_JP_E7_B0, to_EUC_JP_E7_B1, to_EUC_JP_E7_B2,
+     to_EUC_JP_E7_B3, to_EUC_JP_E7_B4, to_EUC_JP_E7_B5, to_EUC_JP_E7_B6,
+     to_EUC_JP_E7_B7, to_EUC_JP_E7_B8, to_EUC_JP_E7_B9, to_EUC_JP_E7_BA,
+        to_EUC_JP_C6, to_EUC_JP_E7_BC, to_EUC_JP_E7_BD, to_EUC_JP_E7_BE,
+     to_EUC_JP_E7_BF,
+
+#define to_EUC_JP_E7 WORDINDEX2INFO(26138)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_E7_infos,
+
+#define to_EUC_JP_E8_80_infos WORDINDEX2INFO(26140)
+                INVALID,      o2(0xcd,0xd4),
+          o2(0xcf,0xb7),              UNDEF,
+          o2(0xb9,0xcd),      o2(0xe6,0xce),
+          o2(0xbc,0xd4),      o2(0xe6,0xcd),
+     o3(0x8f,0xd5,0xc8), o3(0x8f,0xd5,0xc9),
+     o3(0x8f,0xd5,0xca),      o2(0xe6,0xcf),
+          o2(0xbc,0xa9), o3(0x8f,0xd5,0xcb),
+     o3(0x8f,0xd5,0xcc), o3(0x8f,0xd5,0xcd),
+          o2(0xc2,0xd1), o3(0x8f,0xd5,0xce),
+          o2(0xe6,0xd0), o3(0x8f,0xd5,0xcf),
+     o3(0x8f,0xd5,0xd0),      o2(0xb9,0xcc),
+     o3(0x8f,0xd5,0xd1),      o2(0xcc,0xd7),
+          o2(0xe6,0xd1),      o2(0xe6,0xd2),
+          o2(0xe6,0xd3), o3(0x8f,0xd5,0xd2),
+     o3(0x8f,0xd5,0xd3), o3(0x8f,0xd5,0xd4),
+     o3(0x8f,0xd5,0xd5),      o2(0xe6,0xd4),
+     o3(0x8f,0xd5,0xd6), o3(0x8f,0xd5,0xd7),
+          o2(0xe6,0xd5), o3(0x8f,0xd5,0xd8),
+     o3(0x8f,0xd5,0xd9), o3(0x8f,0xd5,0xda),
+          o2(0xbc,0xaa), o3(0x8f,0xd5,0xdb),
+     o3(0x8f,0xd5,0xdc),      o2(0xcc,0xed),
+     o3(0x8f,0xd5,0xdd), o3(0x8f,0xd5,0xde),
+     o3(0x8f,0xd5,0xdf),      o2(0xe6,0xd7),
+     o3(0x8f,0xd5,0xe0),      o2(0xc3,0xbf),
+     o3(0x8f,0xd5,0xe1),      o2(0xe6,0xd6),
+
+#define to_EUC_JP_E8_80 WORDINDEX2INFO(26190)
+    to_EUC_JP_E8_80_offsets,
+    to_EUC_JP_E8_80_infos,
+
+#define to_EUC_JP_E8_81_infos WORDINDEX2INFO(26192)
+                INVALID, o3(0x8f,0xd5,0xe2),
+                  UNDEF, o3(0x8f,0xd5,0xe3),
+          o2(0xe6,0xd9),      o2(0xe6,0xd8),
+          o2(0xe6,0xda),      o2(0xc0,0xbb),
+          o2(0xe6,0xdb),      o2(0xe6,0xdc),
+          o2(0xca,0xb9),      o2(0xe6,0xdd),
+     o3(0x8f,0xd5,0xe4),      o2(0xc1,0xef),
+          o2(0xe6,0xde), o3(0x8f,0xd5,0xe5),
+     o3(0x8f,0xd5,0xe6),      o2(0xe6,0xdf),
+     o3(0x8f,0xd5,0xe7),      o2(0xce,0xfe),
+          o2(0xe6,0xe2), o3(0x8f,0xd5,0xe8),
+          o2(0xe6,0xe1),      o2(0xe6,0xe0),
+          o2(0xc4,0xb0), o3(0x8f,0xd5,0xe9),
+          o2(0xe6,0xe3),      o2(0xbf,0xa6),
+          o2(0xe6,0xe4),      o2(0xe6,0xe5),
+          o2(0xcf,0xb8),      o2(0xe6,0xe6),
+
+#define to_EUC_JP_E8_81 WORDINDEX2INFO(26224)
+    to_EUC_JP_E8_81_offsets,
+    to_EUC_JP_E8_81_infos,
+
+#define to_EUC_JP_E8_82_infos WORDINDEX2INFO(26226)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd5,0xea),      o2(0xe6,0xe7),
+          o2(0xe6,0xe9),      o2(0xe6,0xe8),
+          o2(0xc8,0xa5), o3(0x8f,0xd5,0xeb),
+          o2(0xc6,0xf9),      o2(0xcf,0xbe),
+          o2(0xc8,0xa9), o3(0x8f,0xd5,0xec),
+          o2(0xe6,0xeb),      o2(0xbe,0xd3),
+          o2(0xc9,0xaa),      o2(0xe6,0xec),
+          o2(0xe6,0xea), o3(0x8f,0xd5,0xed),
+          o2(0xb4,0xce), o3(0x8f,0xd5,0xee),
+          o2(0xb8,0xd4),      o2(0xbb,0xe8),
+          o2(0xc8,0xee), o3(0x8f,0xd5,0xef),
+     o3(0x8f,0xd5,0xf0),      o2(0xb8,0xaa),
+          o2(0xcb,0xc3), o3(0x8f,0xd5,0xf1),
+          o2(0xe6,0xef),      o2(0xe6,0xed),
+          o2(0xb9,0xce),      o2(0xb9,0xcf),
+          o2(0xb0,0xe9),      o2(0xba,0xe8),
+     o3(0x8f,0xd5,0xf2), o3(0x8f,0xd5,0xf3),
+          o2(0xc7,0xd9),
+
+#define to_EUC_JP_E8_82 WORDINDEX2INFO(26263)
+    to_EUC_JP_E8_82_offsets,
+    to_EUC_JP_E8_82_infos,
+
+#define to_EUC_JP_E8_83_infos WORDINDEX2INFO(26265)
+                INVALID,              UNDEF,
+          o2(0xb0,0xdf),      o2(0xe6,0xf4),
+          o2(0xc3,0xc0), o3(0x8f,0xd5,0xf4),
+          o2(0xc7,0xd8), o3(0x8f,0xd5,0xf5),
+          o2(0xc2,0xdb), o3(0x8f,0xd5,0xf6),
+     o3(0x8f,0xd5,0xf7), o3(0x8f,0xd5,0xf8),
+     o3(0x8f,0xd5,0xf9),      o2(0xe6,0xf6),
+     o3(0x8f,0xd5,0xfa), o3(0x8f,0xd5,0xfb),
+          o2(0xe6,0xf2),      o2(0xe6,0xf5),
+          o2(0xe6,0xf0),      o2(0xe6,0xf3),
+          o2(0xcb,0xa6), o3(0x8f,0xd5,0xfc),
+          o2(0xb8,0xd5),      o2(0xb0,0xfd),
+          o2(0xe6,0xf1), o3(0x8f,0xd5,0xfd),
+     o3(0x8f,0xd5,0xfe),      o2(0xe6,0xf8),
+     o3(0x8f,0xd6,0xa1),      o2(0xe6,0xf9),
+     o3(0x8f,0xd6,0xa2), o3(0x8f,0xd6,0xa3),
+          o2(0xc6,0xb9), o3(0x8f,0xd6,0xa4),
+          o2(0xb6,0xbb), o3(0x8f,0xd6,0xa5),
+     o3(0x8f,0xd6,0xa6),      o2(0xe7,0xa6),
+          o2(0xc7,0xbd), o3(0x8f,0xd6,0xa7),
+
+#define to_EUC_JP_E8_83 WORDINDEX2INFO(26305)
+    to_EUC_JP_E8_83_offsets,
+    to_EUC_JP_E8_83_infos,
+
+#define to_EUC_JP_E8_84_infos WORDINDEX2INFO(26307)
+                INVALID,              UNDEF,
+          o2(0xbb,0xe9), o3(0x8f,0xd6,0xa8),
+          o2(0xb6,0xbc),      o2(0xc0,0xc8),
+          o2(0xcf,0xc6),      o2(0xcc,0xae),
+          o2(0xe6,0xf7),      o2(0xc0,0xd4),
+     o3(0x8f,0xd6,0xa9), o3(0x8f,0xd6,0xaa),
+     o3(0x8f,0xd6,0xab), o3(0x8f,0xd6,0xac),
+          o2(0xb5,0xd3),      o2(0xe6,0xfa),
+     o3(0x8f,0xd6,0xad), o3(0x8f,0xd6,0xae),
+     o3(0x8f,0xd6,0xaf),      o2(0xe6,0xfc),
+     o3(0x8f,0xd6,0xb0), o3(0x8f,0xd6,0xb1),
+          o2(0xe6,0xfb), o3(0x8f,0xd6,0xb2),
+          o2(0xe6,0xfd), o3(0x8f,0xd6,0xb3),
+          o2(0xc3,0xa6),      o2(0xc7,0xbe),
+     o3(0x8f,0xd6,0xb4),      o2(0xc4,0xb1),
+     o3(0x8f,0xd6,0xb5), o3(0x8f,0xd6,0xb6),
+          o2(0xe7,0xa3),
+
+#define to_EUC_JP_E8_84 WORDINDEX2INFO(26340)
+    to_EUC_JP_E8_84_offsets,
+    to_EUC_JP_E8_84_infos,
+
+#define to_EUC_JP_E8_85_infos WORDINDEX2INFO(26342)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd6,0xb7),      o2(0xe7,0xa2),
+     o3(0x8f,0xd6,0xb8), o3(0x8f,0xd6,0xb9),
+          o2(0xe6,0xfe), o3(0x8f,0xd6,0xba),
+          o2(0xbf,0xd5),      o2(0xc9,0xe5),
+          o2(0xe7,0xa5), o3(0x8f,0xd6,0xbb),
+          o2(0xe7,0xa4),      o2(0xb9,0xd0),
+          o2(0xcf,0xd3), o3(0x8f,0xd6,0xbc),
+          o2(0xe7,0xb5), o3(0x8f,0xd6,0xbd),
+     o3(0x8f,0xd6,0xbe),      o2(0xe7,0xa9),
+          o2(0xe7,0xaa), o3(0x8f,0xd6,0xbf),
+     o3(0x8f,0xd6,0xc0), o3(0x8f,0xd6,0xc1),
+          o2(0xbc,0xf0), o3(0x8f,0xd6,0xc2),
+          o2(0xe7,0xa8), o3(0x8f,0xd6,0xc3),
+          o2(0xb9,0xf8),      o2(0xe7,0xa7),
+          o2(0xe7,0xab), o3(0x8f,0xd6,0xc4),
+          o2(0xc4,0xb2),      o2(0xca,0xa2),
+          o2(0xc1,0xa3),      o2(0xc2,0xdc),
+
+#define to_EUC_JP_E8_85 WORDINDEX2INFO(26378)
+    to_EUC_JP_E8_85_offsets,
+    to_EUC_JP_E8_85_infos,
+
+#define to_EUC_JP_E8_86_infos WORDINDEX2INFO(26380)
+                INVALID,      o2(0xe7,0xaf),
+     o3(0x8f,0xd6,0xc5),      o2(0xe7,0xb0),
+          o2(0xe7,0xac), o3(0x8f,0xd6,0xc7),
+     o3(0x8f,0xd6,0xc8), o3(0x8f,0xd6,0xc9),
+                  UNDEF,      o2(0xe7,0xad),
+          o2(0xe7,0xae), o3(0x8f,0xd6,0xca),
+     o3(0x8f,0xd6,0xcb),      o2(0xb9,0xd1),
+     o3(0x8f,0xd6,0xc6),      o2(0xe7,0xb6),
+          o2(0xe7,0xb2), o3(0x8f,0xd6,0xcc),
+     o3(0x8f,0xd6,0xcd),      o2(0xc9,0xe6),
+     o3(0x8f,0xd6,0xce),      o2(0xcb,0xec),
+          o2(0xc9,0xa8), o3(0x8f,0xd6,0xcf),
+          o2(0xe7,0xb1), o3(0x8f,0xd6,0xd0),
+          o2(0xe7,0xb4),      o2(0xe7,0xb3),
+          o2(0xcb,0xc4),      o2(0xe7,0xb7),
+     o3(0x8f,0xd6,0xd1),      o2(0xe7,0xb8),
+     o3(0x8f,0xd6,0xd2),      o2(0xc1,0xb7),
+     o3(0x8f,0xd6,0xd3),      o2(0xe7,0xb9),
+          o2(0xe7,0xbb),      o2(0xe7,0xbf),
+     o3(0x8f,0xd6,0xd4),      o2(0xe7,0xbc),
+          o2(0xe7,0xba),      o2(0xc7,0xbf),
+
+#define to_EUC_JP_E8_86 WORDINDEX2INFO(26422)
+    to_EUC_JP_E8_86_offsets,
+    to_EUC_JP_E8_86_infos,
+
+#define to_EUC_JP_E8_87_infos WORDINDEX2INFO(26424)
+                INVALID,      o2(0xe7,0xbd),
+                  UNDEF,      o2(0xe7,0xbe),
+     o3(0x8f,0xd6,0xd6), o3(0x8f,0xd6,0xd7),
+          o2(0xb2,0xb2),      o2(0xe7,0xc5),
+          o2(0xe7,0xc0), o3(0x8f,0xd6,0xd8),
+     o3(0x8f,0xd6,0xd5),      o2(0xe7,0xc1),
+     o3(0x8f,0xd6,0xd9), o3(0x8f,0xd6,0xda),
+          o2(0xe7,0xc2),      o2(0xc2,0xa1),
+     o3(0x8f,0xd6,0xdb), o3(0x8f,0xd6,0xdc),
+          o2(0xe7,0xc4),      o2(0xe7,0xc3),
+          o2(0xe7,0xc6), o3(0x8f,0xd6,0xdd),
+     o3(0x8f,0xd6,0xde), o3(0x8f,0xd6,0xdf),
+          o2(0xe7,0xc7),      o2(0xe7,0xc8),
+     o3(0x8f,0xd6,0xe0),      o2(0xbf,0xc3),
+     o3(0x8f,0xd6,0xe1),      o2(0xb2,0xe9),
+          o2(0xe7,0xc9),      o2(0xce,0xd7),
+          o2(0xbc,0xab), o3(0x8f,0xd6,0xe2),
+     o3(0x8f,0xd6,0xe3),      o2(0xbd,0xad),
+     o3(0x8f,0xd6,0xe4), o3(0x8f,0xd6,0xe5),
+     o3(0x8f,0xd6,0xe6),      o2(0xbb,0xea),
+          o2(0xc3,0xd7), o3(0x8f,0xd6,0xe7),
+     o3(0x8f,0xd6,0xe8), o3(0x8f,0xd6,0xe9),
+     o3(0x8f,0xd6,0xea),      o2(0xe7,0xca),
+          o2(0xe7,0xcb),      o2(0xb1,0xb1),
+     o3(0x8f,0xd6,0xeb),      o2(0xe7,0xcc),
+     o3(0x8f,0xd6,0xec),
+
+#define to_EUC_JP_E8_87 WORDINDEX2INFO(26475)
+    to_EUC_JP_E8_87_offsets,
+    to_EUC_JP_E8_87_infos,
+
+#define to_EUC_JP_E8_88_infos WORDINDEX2INFO(26477)
+                INVALID, o3(0x8f,0xd6,0xed),
+          o2(0xe7,0xcd),      o2(0xe7,0xce),
+     o3(0x8f,0xd6,0xee),              UNDEF,
+          o2(0xe7,0xcf),      o2(0xe7,0xd0),
+          o2(0xb6,0xbd),      o2(0xda,0xaa),
+          o2(0xe7,0xd1),      o2(0xc0,0xe5),
+          o2(0xe7,0xd2),      o2(0xbc,0xcb),
+     o3(0x8f,0xd6,0xef),      o2(0xe7,0xd3),
+          o2(0xd0,0xb0), o3(0x8f,0xd6,0xf0),
+     o3(0x8f,0xd6,0xf1),      o2(0xe7,0xd4),
+          o2(0xca,0xde),      o2(0xb4,0xdc),
+     o3(0x8f,0xd6,0xf2), o3(0x8f,0xd6,0xf3),
+          o2(0xc1,0xa4),      o2(0xbd,0xd8),
+     o3(0x8f,0xd6,0xf4),      o2(0xc9,0xf1),
+          o2(0xbd,0xae), o3(0x8f,0xd6,0xf5),
+     o3(0x8f,0xd6,0xf6), o3(0x8f,0xd6,0xf7),
+          o2(0xe7,0xd5),      o2(0xb9,0xd2),
+          o2(0xe7,0xd6),      o2(0xc8,0xcc),
+          o2(0xe7,0xe4), o3(0x8f,0xd6,0xf8),
+          o2(0xe7,0xd8), o3(0x8f,0xd6,0xf9),
+          o2(0xc2,0xc9),      o2(0xc7,0xf5),
+          o2(0xb8,0xbf),      o2(0xe7,0xd7),
+          o2(0xc1,0xa5), o3(0x8f,0xd6,0xfa),
+
+#define to_EUC_JP_E8_88 WORDINDEX2INFO(26523)
+    to_EUC_JP_E8_88_offsets,
+    to_EUC_JP_E8_88_infos,
+
+#define to_EUC_JP_E8_89_infos WORDINDEX2INFO(26525)
+                INVALID,      o2(0xe7,0xd9),
+                  UNDEF, o3(0x8f,0xd6,0xfb),
+     o3(0x8f,0xd6,0xfc), o3(0x8f,0xd6,0xfd),
+     o3(0x8f,0xd6,0xfe),      o2(0xc4,0xfa),
+     o3(0x8f,0xd7,0xa1), o3(0x8f,0xd7,0xa2),
+     o3(0x8f,0xd7,0xa3), o3(0x8f,0xd7,0xa4),
+     o3(0x8f,0xd7,0xa5),      o2(0xe7,0xdb),
+          o2(0xe7,0xda),      o2(0xe7,0xdd),
+     o3(0x8f,0xd7,0xa6),      o2(0xe7,0xdc),
+          o2(0xe7,0xde), o3(0x8f,0xd7,0xa7),
+          o2(0xe7,0xe0), o3(0x8f,0xd7,0xa8),
+          o2(0xe7,0xdf),      o2(0xb4,0xcf),
+     o3(0x8f,0xd7,0xa9),      o2(0xe7,0xe1),
+          o2(0xe7,0xe2),      o2(0xe7,0xe3),
+     o3(0x8f,0xd7,0xaa),      o2(0xba,0xb1),
+          o2(0xce,0xc9),      o2(0xe7,0xe5),
+          o2(0xbf,0xa7), o3(0x8f,0xd7,0xab),
+          o2(0xb1,0xf0),      o2(0xe7,0xe6),
+          o2(0xe7,0xe7), o3(0x8f,0xd7,0xac),
+     o3(0x8f,0xd7,0xad),      o2(0xe7,0xe8),
+     o3(0x8f,0xd7,0xae),
+
+#define to_EUC_JP_E8_89 WORDINDEX2INFO(26566)
+    to_EUC_JP_E8_89_offsets,
+    to_EUC_JP_E8_89_infos,
+
+#define to_EUC_JP_E8_8A_infos WORDINDEX2INFO(26568)
+                INVALID, o3(0x8f,0xd7,0xaf),
+     o3(0x8f,0xd7,0xb0),              UNDEF,
+     o3(0x8f,0xd7,0xb1), o3(0x8f,0xd7,0xb2),
+     o3(0x8f,0xd7,0xb3), o3(0x8f,0xd7,0xb4),
+     o3(0x8f,0xd7,0xb5),      o2(0xb0,0xf2),
+          o2(0xe7,0xe9), o3(0x8f,0xd7,0xb6),
+     o3(0x8f,0xd7,0xb7),      o2(0xe7,0xea),
+     o3(0x8f,0xd7,0xb8), o3(0x8f,0xd7,0xb9),
+     o3(0x8f,0xd7,0xba),      o2(0xc9,0xe7),
+     o3(0x8f,0xd7,0xbb), o3(0x8f,0xd7,0xbc),
+          o2(0xbc,0xc7),      o2(0xe7,0xec),
+     o3(0x8f,0xd7,0xbd), o3(0x8f,0xd7,0xbe),
+     o3(0x8f,0xd7,0xbf), o3(0x8f,0xd7,0xc0),
+          o2(0xb3,0xa9),      o2(0xb0,0xb2),
+     o3(0x8f,0xd7,0xc1), o3(0x8f,0xd7,0xc2),
+     o3(0x8f,0xd7,0xc3), o3(0x8f,0xd7,0xc4),
+          o2(0xe7,0xeb),      o2(0xe7,0xee),
+          o2(0xc7,0xce), o3(0x8f,0xd7,0xc5),
+          o2(0xbf,0xc4), o3(0x8f,0xd7,0xc6),
+          o2(0xb2,0xd6), o3(0x8f,0xd7,0xc7),
+          o2(0xcb,0xa7), o3(0x8f,0xd7,0xc8),
+     o3(0x8f,0xd7,0xc9),      o2(0xb7,0xdd),
+          o2(0xb6,0xdc), o3(0x8f,0xd7,0xca),
+          o2(0xe7,0xed), o3(0x8f,0xd7,0xcb),
+          o2(0xb2,0xea), o3(0x8f,0xd7,0xcc),
+     o3(0x8f,0xd7,0xcd),
+
+#define to_EUC_JP_E8_8A WORDINDEX2INFO(26619)
+    to_EUC_JP_E8_8A_offsets,
+    to_EUC_JP_E8_8A_infos,
+
+#define to_EUC_JP_E8_8B_infos WORDINDEX2INFO(26621)
+                INVALID,              UNDEF,
+          o2(0xb4,0xa3), o3(0x8f,0xd7,0xce),
+     o3(0x8f,0xd7,0xcf),      o2(0xb1,0xf1),
+          o2(0xe7,0xf2),      o2(0xce,0xea),
+          o2(0xc2,0xdd), o3(0x8f,0xd7,0xd0),
+          o2(0xc9,0xc4),      o2(0xe7,0xfe),
+     o3(0x8f,0xd7,0xd1),      o2(0xb2,0xd7),
+          o2(0xe7,0xfc),      o2(0xe7,0xfa),
+          o2(0xe7,0xf1), o3(0x8f,0xd7,0xd2),
+          o2(0xe7,0xef), o3(0x8f,0xd7,0xd3),
+          o2(0xe7,0xf0), o3(0x8f,0xd7,0xd4),
+          o2(0xbc,0xe3),      o2(0xb6,0xec),
+          o2(0xc3,0xf7), o3(0x8f,0xd7,0xd5),
+     o3(0x8f,0xd7,0xd6),      o2(0xc6,0xd1),
+     o3(0x8f,0xd7,0xd7), o3(0x8f,0xd7,0xd8),
+          o2(0xb1,0xd1),      o2(0xe7,0xf4),
+          o2(0xe7,0xf3), o3(0x8f,0xd7,0xd9),
+     o3(0x8f,0xd7,0xda),      o2(0xe7,0xf9),
+          o2(0xe7,0xf5),      o2(0xe7,0xf8),
+     o3(0x8f,0xd7,0xdb), o3(0x8f,0xd7,0xdc),
+
+#define to_EUC_JP_E8_8B WORDINDEX2INFO(26661)
+    to_EUC_JP_E8_8B_offsets,
+    to_EUC_JP_E8_8B_infos,
+
+#define to_EUC_JP_E8_8C_infos WORDINDEX2INFO(26663)
+                INVALID, o3(0x8f,0xd7,0xdd),
+     o3(0x8f,0xd7,0xde),      o2(0xcc,0xd0),
+          o2(0xe7,0xf7),      o2(0xb2,0xd8),
+          o2(0xb3,0xfd),      o2(0xe7,0xfb),
+     o3(0x8f,0xd7,0xdf), o3(0x8f,0xd7,0xe0),
+          o2(0xe7,0xfd), o3(0x8f,0xd7,0xe1),
+     o3(0x8f,0xd7,0xe2),              UNDEF,
+          o2(0xb7,0xd4),      o2(0xe8,0xa3),
+          o2(0xe8,0xac),      o2(0xe8,0xad),
+     o3(0x8f,0xd7,0xe4),      o2(0xb0,0xab),
+     o3(0x8f,0xd7,0xe5), o3(0x8f,0xd7,0xe6),
+     o3(0x8f,0xd7,0xe7), o3(0x8f,0xd7,0xe8),
+     o3(0x8f,0xd7,0xe9),      o2(0xe8,0xb4),
+          o2(0xb0,0xf1),      o2(0xe8,0xab),
+     o3(0x8f,0xd7,0xea), o3(0x8f,0xd7,0xeb),
+     o3(0x8f,0xd7,0xec),      o2(0xe8,0xaa),
+     o3(0x8f,0xd7,0xed),      o2(0xe8,0xa5),
+          o2(0xe8,0xa4), o3(0x8f,0xd7,0xee),
+          o2(0xe8,0xa2),      o2(0xe8,0xa1),
+          o2(0xc3,0xe3), o3(0x8f,0xd7,0xef),
+          o2(0xc2,0xfb),      o2(0xe8,0xa7),
+     o3(0x8f,0xd7,0xf0), o3(0x8f,0xd7,0xf1),
+     o3(0x8f,0xd7,0xf2),
+
+#define to_EUC_JP_E8_8C WORDINDEX2INFO(26708)
+    to_EUC_JP_E8_8C_offsets,
+    to_EUC_JP_E8_8C_infos,
+
+#define to_EUC_JP_E8_8D_infos WORDINDEX2INFO(26710)
+                INVALID,      o2(0xe8,0xa6),
+                  UNDEF, o3(0x8f,0xd7,0xf3),
+     o3(0x8f,0xd7,0xf4), o3(0x8f,0xd7,0xf5),
+          o2(0xe8,0xa9), o3(0x8f,0xd7,0xf6),
+          o2(0xc1,0xf0),      o2(0xb7,0xd5),
+     o3(0x8f,0xd7,0xf7), o3(0x8f,0xd7,0xf8),
+          o2(0xb1,0xc1),      o2(0xe8,0xa8),
+     o3(0x8f,0xd7,0xf9),      o2(0xb9,0xd3),
+     o3(0x8f,0xd8,0xbe), o3(0x8f,0xd7,0xe3),
+     o3(0x8f,0xd7,0xfa), o3(0x8f,0xd7,0xfb),
+     o3(0x8f,0xd7,0xfc),      o2(0xc1,0xf1),
+     o3(0x8f,0xd7,0xfd),      o2(0xe8,0xba),
+          o2(0xe8,0xbb),      o2(0xb2,0xd9),
+     o3(0x8f,0xd7,0xfe),      o2(0xb2,0xae),
+          o2(0xe8,0xb8), o3(0x8f,0xd8,0xa1),
+     o3(0x8f,0xd8,0xa2),
+
+#define to_EUC_JP_E8_8D WORDINDEX2INFO(26741)
+    to_EUC_JP_E8_8D_offsets,
+    to_EUC_JP_E8_8D_infos,
+
+#define to_EUC_JP_E8_8E_infos WORDINDEX2INFO(26743)
+                INVALID, o3(0x8f,0xd8,0xa3),
+                  UNDEF, o3(0x8f,0xd8,0xa4),
+     o3(0x8f,0xd8,0xa5),      o2(0xe8,0xae),
+     o3(0x8f,0xd8,0xa6),      o2(0xe8,0xb6),
+          o2(0xe8,0xbd),      o2(0xe8,0xb7),
+     o3(0x8f,0xd8,0xa7),      o2(0xe8,0xb5),
+     o3(0x8f,0xd8,0xa8),      o2(0xe7,0xf6),
+     o3(0x8f,0xd8,0xa9), o3(0x8f,0xd8,0xaa),
+          o2(0xe8,0xb3), o3(0x8f,0xd8,0xab),
+     o3(0x8f,0xd8,0xac),      o2(0xe8,0xaf),
+     o3(0x8f,0xd8,0xad), o3(0x8f,0xd8,0xae),
+     o3(0x8f,0xd8,0xaf),      o2(0xb4,0xd0),
+          o2(0xe8,0xb1),      o2(0xe8,0xbc),
+          o2(0xe8,0xb2), o3(0x8f,0xd8,0xb0),
+     o3(0x8f,0xd8,0xb1),      o2(0xe8,0xbe),
+     o3(0x8f,0xd8,0xb2),      o2(0xe8,0xb0),
+          o2(0xc7,0xfc), o3(0x8f,0xd8,0xb3),
+     o3(0x8f,0xd8,0xcc),      o2(0xcd,0xe9),
+          o2(0xe8,0xb9),      o2(0xe8,0xcf),
+     o3(0x8f,0xd8,0xb4), o3(0x8f,0xd8,0xb5),
+
+#define to_EUC_JP_E8_8E WORDINDEX2INFO(26783)
+    to_EUC_JP_E8_8E_offsets,
+    to_EUC_JP_E8_8E_infos,
+
+#define to_EUC_JP_E8_8F_infos WORDINDEX2INFO(26785)
+                INVALID, o3(0x8f,0xd8,0xb6),
+          o2(0xe8,0xc7),              UNDEF,
+          o2(0xbf,0xfb), o3(0x8f,0xd8,0xb7),
+     o3(0x8f,0xd8,0xb8),      o2(0xb5,0xc6),
+          o2(0xb6,0xdd),      o2(0xe8,0xc2),
+     o3(0x8f,0xd8,0xb9), o3(0x8f,0xd8,0xba),
+     o3(0x8f,0xd8,0xbb),      o2(0xb2,0xdb),
+     o3(0x8f,0xd8,0xbc),      o2(0xbe,0xd4),
+          o2(0xe8,0xc5),      o2(0xba,0xda),
+     o3(0x8f,0xd8,0xbd),      o2(0xc5,0xd1),
+          o2(0xe8,0xca), o3(0x8f,0xd8,0xbf),
+          o2(0xca,0xee), o3(0x8f,0xd8,0xc0),
+          o2(0xe8,0xc1),      o2(0xb2,0xda),
+          o2(0xb8,0xd6),      o2(0xc9,0xa9),
+          o2(0xe8,0xcb),      o2(0xe8,0xbf),
+     o3(0x8f,0xd8,0xc1),      o2(0xe8,0xc8),
+     o3(0x8f,0xd8,0xc2), o3(0x8f,0xd8,0xc3),
+          o2(0xe8,0xd2), o3(0x8f,0xd8,0xc4),
+          o2(0xe8,0xc3),
+
+#define to_EUC_JP_E8_8F WORDINDEX2INFO(26822)
+    to_EUC_JP_E8_8F_offsets,
+    to_EUC_JP_E8_8F_infos,
+
+#define to_EUC_JP_E8_90_infos WORDINDEX2INFO(26824)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd8,0xc5),      o2(0xe8,0xc4),
+          o2(0xc6,0xba), o3(0x8f,0xd8,0xc6),
+          o2(0xe8,0xc9), o3(0x8f,0xd8,0xc7),
+          o2(0xe8,0xc6),      o2(0xcb,0xa8),
+          o2(0xe8,0xcc),      o2(0xb0,0xe0),
+     o3(0x8f,0xd8,0xc8), o3(0x8f,0xd8,0xc9),
+          o2(0xe8,0xc0), o3(0x8f,0xd8,0xca),
+     o3(0x8f,0xd8,0xcb),      o2(0xe8,0xce),
+          o2(0xe8,0xcd),      o2(0xc7,0xeb),
+          o2(0xe8,0xd4),      o2(0xe8,0xdf),
+     o3(0x8f,0xd8,0xcd),      o2(0xb3,0xfe),
+          o2(0xe8,0xe2),      o2(0xe8,0xd0),
+     o3(0x8f,0xd8,0xce),      o2(0xe8,0xd5),
+          o2(0xcd,0xee),
+
+#define to_EUC_JP_E8_90 WORDINDEX2INFO(26853)
+    to_EUC_JP_E8_90_offsets,
+    to_EUC_JP_E8_90_infos,
+
+#define to_EUC_JP_E8_91_infos WORDINDEX2INFO(26855)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd8,0xcf),      o2(0xe8,0xde),
+     o3(0x8f,0xd8,0xd0), o3(0x8f,0xd8,0xd1),
+          o2(0xcd,0xd5), o3(0x8f,0xd8,0xd2),
+     o3(0x8f,0xd8,0xd3),      o2(0xce,0xaa),
+     o3(0x8f,0xd8,0xd4), o3(0x8f,0xd8,0xd5),
+     o3(0x8f,0xd8,0xd6), o3(0x8f,0xd8,0xd7),
+          o2(0xc3,0xf8), o3(0x8f,0xd8,0xd8),
+     o3(0x8f,0xd8,0xd9), o3(0x8f,0xd8,0xda),
+          o2(0xb3,0xeb), o3(0x8f,0xd8,0xdb),
+     o3(0x8f,0xd8,0xdc),      o2(0xc9,0xf2),
+          o2(0xe8,0xe4),      o2(0xc6,0xa1),
+     o3(0x8f,0xd8,0xdd), o3(0x8f,0xd8,0xde),
+          o2(0xb0,0xb1), o3(0x8f,0xd8,0xdf),
+          o2(0xe8,0xdd), o3(0x8f,0xd8,0xe0),
+          o2(0xe8,0xd9),      o2(0xc1,0xf2),
+          o2(0xe8,0xd3),      o2(0xe8,0xdb),
+          o2(0xe8,0xe0), o3(0x8f,0xd8,0xe1),
+          o2(0xc7,0xac), o3(0x8f,0xd8,0xe2),
+     o3(0x8f,0xd8,0xe3),      o2(0xb0,0xaa),
+     o3(0x8f,0xd8,0xe4),      o2(0xe8,0xd8),
+     o3(0x8f,0xd8,0xe5),      o2(0xe8,0xe1),
+          o2(0xc9,0xf8), o3(0x8f,0xd8,0xe6),
+     o3(0x8f,0xd8,0xe7),
+
+#define to_EUC_JP_E8_91 WORDINDEX2INFO(26902)
+    to_EUC_JP_E8_91_offsets,
+    to_EUC_JP_E8_91_infos,
+
+#define to_EUC_JP_E8_92_infos WORDINDEX2INFO(26904)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd8,0xe8),      o2(0xe8,0xdc),
+          o2(0xe8,0xd7), o3(0x8f,0xd8,0xe9),
+          o2(0xbe,0xd5),      o2(0xbd,0xaf),
+     o3(0x8f,0xd8,0xea), o3(0x8f,0xd8,0xeb),
+          o2(0xbc,0xac), o3(0x8f,0xd8,0xec),
+          o2(0xcc,0xd8),      o2(0xc9,0xc7),
+     o3(0x8f,0xd8,0xed),      o2(0xe8,0xe7),
+          o2(0xe8,0xf0), o3(0x8f,0xd8,0xee),
+     o3(0x8f,0xd8,0xef), o3(0x8f,0xd8,0xf0),
+     o3(0x8f,0xd8,0xf1),      o2(0xe8,0xda),
+     o3(0x8f,0xd8,0xf2), o3(0x8f,0xd8,0xf3),
+          o2(0xb3,0xf7), o3(0x8f,0xd8,0xf4),
+          o2(0xbe,0xf8),      o2(0xe8,0xe5),
+     o3(0x8f,0xd8,0xf5),      o2(0xe8,0xea),
+          o2(0xc1,0xf3), o3(0x8f,0xd8,0xf6),
+     o3(0x8f,0xd8,0xf7),      o2(0xe8,0xe6),
+
+#define to_EUC_JP_E8_92 WORDINDEX2INFO(26938)
+    to_EUC_JP_E8_92_offsets,
+    to_EUC_JP_E8_92_infos,
+
+#define to_EUC_JP_E8_93_infos WORDINDEX2INFO(26940)
+                INVALID, o3(0x8f,0xd8,0xf8),
+          o2(0xe8,0xed), o3(0x8f,0xd8,0xf9),
+                  UNDEF,      o2(0xc3,0xdf),
+          o2(0xe8,0xee), o3(0x8f,0xd8,0xfa),
+     o3(0x8f,0xd8,0xfb),      o2(0xcd,0xd6),
+          o2(0xe8,0xe3),      o2(0xb3,0xb8),
+     o3(0x8f,0xd8,0xfc),      o2(0xe8,0xe9),
+     o3(0x8f,0xd8,0xfd),      o2(0xe8,0xec),
+          o2(0xcc,0xac), o3(0x8f,0xd8,0xfe),
+          o2(0xe8,0xef),      o2(0xe8,0xe8),
+          o2(0xe8,0xeb), o3(0x8f,0xd9,0xa1),
+     o3(0x8f,0xd9,0xa2), o3(0x8f,0xd9,0xa3),
+          o2(0xcb,0xa9),      o2(0xcf,0xa1),
+     o3(0x8f,0xd9,0xa4), o3(0x8f,0xd9,0xa5),
+     o3(0x8f,0xd9,0xa6), o3(0x8f,0xd9,0xa7),
+          o2(0xe8,0xf3), o3(0x8f,0xd9,0xa8),
+     o3(0x8f,0xd9,0xaa), o3(0x8f,0xd9,0xab),
+          o2(0xe8,0xfa), o3(0x8f,0xd9,0xac),
+          o2(0xe8,0xf2),
+
+#define to_EUC_JP_E8_93 WORDINDEX2INFO(26977)
+    to_EUC_JP_E8_93_offsets,
+    to_EUC_JP_E8_93_infos,
+
+#define to_EUC_JP_E8_94_infos WORDINDEX2INFO(26979)
+                INVALID,      o2(0xbc,0xc3),
+                  UNDEF, o3(0x8f,0xd9,0xad),
+     o3(0x8f,0xd9,0xae),      o2(0xe8,0xd1),
+     o3(0x8f,0xd9,0xaf), o3(0x8f,0xd9,0xb0),
+     o3(0x8f,0xd9,0xb1), o3(0x8f,0xd9,0xb2),
+          o2(0xca,0xce),      o2(0xcc,0xa2),
+          o2(0xe8,0xf9),      o2(0xe8,0xf8),
+          o2(0xe8,0xf4),      o2(0xe8,0xf5),
+          o2(0xb1,0xb6), o3(0x8f,0xd9,0xb3),
+     o3(0x8f,0xd9,0xb4),      o2(0xe8,0xf7),
+          o2(0xe8,0xf1), o3(0x8f,0xd9,0xb5),
+     o3(0x8f,0xd9,0xb6), o3(0x8f,0xd9,0xb7),
+     o3(0x8f,0xd9,0xb8),      o2(0xc4,0xd5),
+     o3(0x8f,0xd9,0xb9), o3(0x8f,0xd9,0xba),
+     o3(0x8f,0xd9,0xbb),      o2(0xe8,0xf6),
+          o2(0xb0,0xfe), o3(0x8f,0xd9,0xbc),
+     o3(0x8f,0xd9,0xa9), o3(0x8f,0xd9,0xbd),
+     o3(0x8f,0xd9,0xbe),      o2(0xc2,0xa2),
+     o3(0x8f,0xd9,0xbf),      o2(0xca,0xc3),
+     o3(0x8f,0xd9,0xc0),
+
+#define to_EUC_JP_E8_94 WORDINDEX2INFO(27018)
+    to_EUC_JP_E8_94_offsets,
+    to_EUC_JP_E8_94_infos,
+
+#define to_EUC_JP_E8_95_infos WORDINDEX2INFO(27020)
+                INVALID,      o2(0xe8,0xfb),
+          o2(0xe9,0xa1),              UNDEF,
+          o2(0xc8,0xd9), o3(0x8f,0xd9,0xc1),
+          o2(0xe8,0xfe),      o2(0xbe,0xd6),
+          o2(0xbc,0xc9),      o2(0xe9,0xa3),
+          o2(0xb6,0xbe), o3(0x8f,0xd9,0xc2),
+     o3(0x8f,0xd9,0xc3), o3(0x8f,0xd9,0xc4),
+     o3(0x8f,0xd9,0xc5), o3(0x8f,0xd9,0xc6),
+          o2(0xe9,0xa4), o3(0x8f,0xd9,0xc7),
+          o2(0xc9,0xf9),      o2(0xe8,0xfd),
+     o3(0x8f,0xd9,0xc8),      o2(0xe8,0xd6),
+     o3(0x8f,0xd9,0xc9), o3(0x8f,0xd9,0xca),
+     o3(0x8f,0xd9,0xcb), o3(0x8f,0xd9,0xcc),
+     o3(0x8f,0xd9,0xcd), o3(0x8f,0xd9,0xce),
+     o3(0x8f,0xd9,0xcf),      o2(0xe8,0xfc),
+     o3(0x8f,0xd9,0xd0),      o2(0xcf,0xcf),
+          o2(0xc6,0xa2),      o2(0xc9,0xf3),
+     o3(0x8f,0xd9,0xd1),      o2(0xe9,0xab),
+     o3(0x8f,0xd9,0xd2),      o2(0xe9,0xb1),
+     o3(0x8f,0xd9,0xd3), o3(0x8f,0xd9,0xd4),
+     o3(0x8f,0xd9,0xd5), o3(0x8f,0xd9,0xd6),
+          o2(0xe9,0xb2), o3(0x8f,0xd9,0xd7),
+
+#define to_EUC_JP_E8_95 WORDINDEX2INFO(27064)
+    to_EUC_JP_E8_95_offsets,
+    to_EUC_JP_E8_95_infos,
+
+#define to_EUC_JP_E8_96_infos WORDINDEX2INFO(27066)
+                INVALID,      o2(0xe9,0xa5),
+     o3(0x8f,0xd9,0xd8),              UNDEF,
+          o2(0xc7,0xf6), o3(0x8f,0xd9,0xd9),
+     o3(0x8f,0xd9,0xda),      o2(0xe9,0xaf),
+          o2(0xe9,0xa7), o3(0x8f,0xd9,0xdb),
+          o2(0xe9,0xa9), o3(0x8f,0xd9,0xdc),
+     o3(0x8f,0xd9,0xdd), o3(0x8f,0xd9,0xde),
+          o2(0xe9,0xb3),      o2(0xe9,0xa8),
+     o3(0x8f,0xd9,0xdf),      o2(0xe9,0xac),
+          o2(0xb1,0xf2), o3(0x8f,0xd9,0xe0),
+          o2(0xc6,0xe5),      o2(0xe9,0xad),
+          o2(0xe9,0xb0), o3(0x8f,0xd9,0xe1),
+     o3(0x8f,0xd9,0xe2), o3(0x8f,0xd9,0xe3),
+     o3(0x8f,0xd9,0xe4),      o2(0xe9,0xa6),
+     o3(0x8f,0xd9,0xe5),      o2(0xc1,0xa6),
+     o3(0x8f,0xd9,0xe6),      o2(0xe9,0xaa),
+          o2(0xbb,0xa7),      o2(0xbf,0xc5),
+          o2(0xb7,0xb0),      o2(0xcc,0xf4),
+     o3(0x8f,0xd9,0xf4),      o2(0xcc,0xf9),
+          o2(0xbd,0xf2), o3(0x8f,0xd9,0xe7),
+     o3(0x8f,0xd9,0xe8), o3(0x8f,0xd9,0xe9),
+     o3(0x8f,0xd9,0xea),      o2(0xe9,0xb7),
+          o2(0xe9,0xb5), o3(0x8f,0xd9,0xeb),
+     o3(0x8f,0xd9,0xec), o3(0x8f,0xd9,0xed),
+     o3(0x8f,0xd9,0xee),
+
+#define to_EUC_JP_E8_96 WORDINDEX2INFO(27115)
+    to_EUC_JP_E8_96_offsets,
+    to_EUC_JP_E8_96_infos,
+
+#define to_EUC_JP_E8_97_infos WORDINDEX2INFO(27117)
+                INVALID,              UNDEF,
+          o2(0xcf,0xce), o3(0x8f,0xd9,0xef),
+     o3(0x8f,0xd9,0xf0),      o2(0xe9,0xb4),
+     o3(0x8f,0xd9,0xf1), o3(0x8f,0xd9,0xf2),
+          o2(0xcd,0xf5), o3(0x8f,0xd9,0xf3),
+          o2(0xe9,0xb6),      o2(0xe9,0xb8),
+          o2(0xe9,0xb9), o3(0x8f,0xd9,0xf5),
+     o3(0x8f,0xd9,0xf6),      o2(0xe9,0xbc),
+          o2(0xe9,0xba), o3(0x8f,0xd9,0xf7),
+     o3(0x8f,0xd9,0xf8),      o2(0xc6,0xa3),
+          o2(0xe9,0xbb), o3(0x8f,0xd9,0xf9),
+     o3(0x8f,0xd9,0xfa),      o2(0xc8,0xcd),
+          o2(0xe9,0xae), o3(0x8f,0xd9,0xfb),
+     o3(0x8f,0xd9,0xfc), o3(0x8f,0xd9,0xfd),
+          o2(0xbd,0xf3),      o2(0xe9,0xbd),
+          o2(0xe9,0xc2),      o2(0xc1,0xf4),
+     o3(0x8f,0xd9,0xfe),      o2(0xe9,0xc1),
+     o3(0x8f,0xda,0xa1),
+
+#define to_EUC_JP_E8_97 WORDINDEX2INFO(27152)
+    to_EUC_JP_E8_97_offsets,
+    to_EUC_JP_E8_97_infos,
+
+#define to_EUC_JP_E8_98_infos WORDINDEX2INFO(27154)
+                INVALID, o3(0x8f,0xda,0xa2),
+                  UNDEF,      o2(0xe9,0xa2),
+     o3(0x8f,0xda,0xa3), o3(0x8f,0xda,0xa4),
+          o2(0xe9,0xc3),      o2(0xc1,0xc9),
+          o2(0xe9,0xbe),      o2(0xe9,0xc0),
+     o3(0x8f,0xda,0xa5), o3(0x8f,0xda,0xa6),
+     o3(0x8f,0xda,0xa7), o3(0x8f,0xda,0xa8),
+     o3(0x8f,0xda,0xa9),      o2(0xe9,0xbf),
+          o2(0xdd,0xb1),      o2(0xdd,0xa2),
+     o3(0x8f,0xda,0xaa), o3(0x8f,0xda,0xab),
+          o2(0xe9,0xc5), o3(0x8f,0xda,0xac),
+     o3(0x8f,0xda,0xad), o3(0x8f,0xda,0xae),
+          o2(0xe9,0xc4), o3(0x8f,0xda,0xaf),
+     o3(0x8f,0xda,0xb0),      o2(0xcd,0xf6),
+          o2(0xe2,0xbc),      o2(0xe9,0xc6),
+     o3(0x8f,0xda,0xb1), o3(0x8f,0xda,0xb2),
+     o3(0x8f,0xda,0xb3), o3(0x8f,0xda,0xb4),
+     o3(0x8f,0xda,0xb5),      o2(0xe9,0xc7),
+
+#define to_EUC_JP_E8_98 WORDINDEX2INFO(27190)
+    to_EUC_JP_E8_98_offsets,
+    to_EUC_JP_E8_98_infos,
+
+#define to_EUC_JP_E8_99_infos WORDINDEX2INFO(27192)
+                INVALID, o3(0x8f,0xda,0xb6),
+     o3(0x8f,0xb8,0xe6), o3(0x8f,0xda,0xb7),
+                  UNDEF, o3(0x8f,0xda,0xb8),
+          o2(0xe9,0xc8),      o2(0xb8,0xd7),
+          o2(0xb5,0xd4), o3(0x8f,0xda,0xb9),
+     o3(0x8f,0xda,0xba),      o2(0xe9,0xca),
+          o2(0xd1,0xdd), o3(0x8f,0xda,0xbb),
+     o3(0x8f,0xda,0xbc), o3(0x8f,0xda,0xbd),
+     o3(0x8f,0xda,0xbe),      o2(0xb5,0xf5),
+          o2(0xce,0xba), o3(0x8f,0xda,0xbf),
+          o2(0xb6,0xf3),      o2(0xe9,0xcb),
+     o3(0x8f,0xda,0xc0), o3(0x8f,0xda,0xc1),
+     o3(0x8f,0xda,0xc2), o3(0x8f,0xda,0xc3),
+     o3(0x8f,0xda,0xc4),      o2(0xe9,0xcc),
+     o3(0x8f,0xda,0xc5),      o2(0xc3,0xee),
+     o3(0x8f,0xda,0xc6), o3(0x8f,0xda,0xc7),
+          o2(0xe9,0xcd), o3(0x8f,0xda,0xc8),
+     o3(0x8f,0xda,0xc9), o3(0x8f,0xda,0xca),
+          o2(0xc6,0xfa), o3(0x8f,0xda,0xcb),
+          o2(0xb0,0xba),
+
+#define to_EUC_JP_E8_99 WORDINDEX2INFO(27231)
+    to_EUC_JP_E8_99_offsets,
+    to_EUC_JP_E8_99_infos,
+
+#define to_EUC_JP_E8_9A_infos WORDINDEX2INFO(27233)
+                INVALID,              UNDEF,
+     o3(0x8f,0xda,0xed),      o2(0xb2,0xe3),
+          o2(0xe9,0xd2),      o2(0xe9,0xd3),
+     o3(0x8f,0xda,0xcc), o3(0x8f,0xda,0xcd),
+          o2(0xe9,0xce),      o2(0xbb,0xbd),
+     o3(0x8f,0xda,0xce), o3(0x8f,0xda,0xcf),
+     o3(0x8f,0xda,0xd0), o3(0x8f,0xda,0xd1),
+     o3(0x8f,0xda,0xd2),      o2(0xe9,0xcf),
+          o2(0xc7,0xc2), o3(0x8f,0xda,0xd3),
+     o3(0x8f,0xda,0xd4), o3(0x8f,0xda,0xd5),
+          o2(0xe9,0xd0),      o2(0xe9,0xd1),
+          o2(0xe9,0xdb), o3(0x8f,0xda,0xd6),
+          o2(0xe9,0xd5),      o2(0xe9,0xd8),
+     o3(0x8f,0xda,0xd7), o3(0x8f,0xda,0xd8),
+     o3(0x8f,0xda,0xd9), o3(0x8f,0xda,0xda),
+          o2(0xe9,0xd4), o3(0x8f,0xda,0xdb),
+     o3(0x8f,0xda,0xdc), o3(0x8f,0xda,0xdd),
+     o3(0x8f,0xda,0xde),
+
+#define to_EUC_JP_E8_9A WORDINDEX2INFO(27268)
+    to_EUC_JP_E8_9A_offsets,
+    to_EUC_JP_E8_9A_infos,
+
+#define to_EUC_JP_E8_9B_infos WORDINDEX2INFO(27270)
+                INVALID, o3(0x8f,0xda,0xdf),
+     o3(0x8f,0xda,0xe0),              UNDEF,
+     o3(0x8f,0xda,0xe1),      o2(0xe9,0xd6),
+     o3(0x8f,0xda,0xe2),      o2(0xe9,0xd7),
+          o2(0xbc,0xd8),      o2(0xe9,0xd9),
+          o2(0xc3,0xc1),      o2(0xb7,0xd6),
+          o2(0xb3,0xc2), o3(0x8f,0xda,0xe3),
+     o3(0x8f,0xda,0xe4),      o2(0xe9,0xdc),
+     o3(0x8f,0xda,0xe5), o3(0x8f,0xda,0xe6),
+          o2(0xb3,0xbf), o3(0x8f,0xda,0xe7),
+          o2(0xe9,0xe1), o3(0x8f,0xda,0xe8),
+          o2(0xe9,0xdd),      o2(0xe9,0xe0),
+     o3(0x8f,0xda,0xe9), o3(0x8f,0xda,0xea),
+          o2(0xc8,0xba), o3(0x8f,0xda,0xeb),
+     o3(0x8f,0xda,0xec),      o2(0xe9,0xde),
+          o2(0xe9,0xdf),      o2(0xc9,0xc8),
+          o2(0xc8,0xda),      o2(0xe9,0xe2),
+          o2(0xc2,0xfd),      o2(0xe9,0xec),
+     o3(0x8f,0xda,0xee),      o2(0xe9,0xe8),
+     o3(0x8f,0xda,0xef), o3(0x8f,0xda,0xf0),
+          o2(0xb2,0xeb),
+
+#define to_EUC_JP_E8_9B WORDINDEX2INFO(27311)
+    to_EUC_JP_E8_9B_offsets,
+    to_EUC_JP_E8_9B_infos,
+
+#define to_EUC_JP_E8_9C_infos WORDINDEX2INFO(27313)
+                INVALID,      o2(0xe9,0xe6),
+                  UNDEF,      o2(0xcb,0xaa),
+          o2(0xe9,0xe7), o3(0x8f,0xda,0xf1),
+     o3(0x8f,0xda,0xf2),      o2(0xe9,0xe4),
+     o3(0x8f,0xda,0xf3),      o2(0xe9,0xe5),
+          o2(0xe9,0xea),      o2(0xe9,0xed),
+     o3(0x8f,0xda,0xf4),      o2(0xe9,0xeb),
+     o3(0x8f,0xda,0xf5), o3(0x8f,0xda,0xf6),
+     o3(0x8f,0xda,0xf7),      o2(0xe9,0xe9),
+          o2(0xe9,0xe3), o3(0x8f,0xda,0xf8),
+     o3(0x8f,0xda,0xf9),      o2(0xc3,0xd8),
+     o3(0x8f,0xda,0xfa),      o2(0xe9,0xf4),
+          o2(0xcc,0xaa), o3(0x8f,0xda,0xfb),
+     o3(0x8f,0xda,0xfc), o3(0x8f,0xda,0xfd),
+     o3(0x8f,0xda,0xfe),      o2(0xe9,0xf2),
+     o3(0x8f,0xdb,0xa1),      o2(0xe9,0xf3),
+     o3(0x8f,0xdb,0xa2), o3(0x8f,0xdb,0xa3),
+     o3(0x8f,0xdb,0xa4), o3(0x8f,0xdb,0xa5),
+          o2(0xe9,0xee),      o2(0xe9,0xf0),
+     o3(0x8f,0xdb,0xa6), o3(0x8f,0xdb,0xa7),
+          o2(0xe9,0xf1), o3(0x8f,0xdb,0xa8),
+     o3(0x8f,0xdb,0xa9), o3(0x8f,0xdb,0xaa),
+          o2(0xe9,0xef),
+
+#define to_EUC_JP_E8_9C WORDINDEX2INFO(27358)
+    to_EUC_JP_E8_9C_offsets,
+    to_EUC_JP_E8_9C_infos,
+
+#define to_EUC_JP_E8_9D_infos WORDINDEX2INFO(27360)
+                INVALID, o3(0x8f,0xdb,0xab),
+                  UNDEF, o3(0x8f,0xdb,0xac),
+     o3(0x8f,0xdb,0xad),      o2(0xc0,0xe6),
+          o2(0xcf,0xb9),      o2(0xe9,0xf8),
+     o3(0x8f,0xdb,0xae),      o2(0xe9,0xf9),
+          o2(0xea,0xa1),      o2(0xbf,0xaa),
+          o2(0xe9,0xfb), o3(0x8f,0xdb,0xaf),
+          o2(0xe9,0xfe), o3(0x8f,0xdb,0xb0),
+          o2(0xe9,0xf6),      o2(0xe9,0xf5),
+     o3(0x8f,0xdb,0xb1),      o2(0xea,0xa2),
+     o3(0x8f,0xdb,0xb2), o3(0x8f,0xdb,0xb3),
+          o2(0xb2,0xdc),      o2(0xe9,0xfc),
+          o2(0xea,0xa3),      o2(0xe9,0xfd),
+     o3(0x8f,0xdb,0xb4), o3(0x8f,0xdb,0xb5),
+     o3(0x8f,0xdb,0xb6),      o2(0xe9,0xfa),
+          o2(0xc4,0xb3),      o2(0xe9,0xf7),
+     o3(0x8f,0xdb,0xb7),      o2(0xc7,0xe8),
+
+#define to_EUC_JP_E8_9D WORDINDEX2INFO(27394)
+    to_EUC_JP_E8_9D_offsets,
+    to_EUC_JP_E8_9D_infos,
+
+#define to_EUC_JP_E8_9E_infos WORDINDEX2INFO(27396)
+                INVALID,              UNDEF,
+          o2(0xea,0xa7), o3(0x8f,0xdb,0xb8),
+     o3(0x8f,0xdb,0xb9), o3(0x8f,0xdb,0xba),
+     o3(0x8f,0xdb,0xbb), o3(0x8f,0xdb,0xbc),
+     o3(0x8f,0xdb,0xbd), o3(0x8f,0xdb,0xbe),
+     o3(0x8f,0xdb,0xbf), o3(0x8f,0xdb,0xc0),
+          o2(0xcd,0xbb), o3(0x8f,0xdb,0xc1),
+     o3(0x8f,0xdb,0xc2), o3(0x8f,0xdb,0xc3),
+     o3(0x8f,0xdb,0xc4), o3(0x8f,0xdb,0xc5),
+     o3(0x8f,0xdb,0xc6), o3(0x8f,0xdb,0xc7),
+          o2(0xea,0xa6), o3(0x8f,0xdb,0xc8),
+          o2(0xea,0xa5), o3(0x8f,0xdb,0xc9),
+     o3(0x8f,0xdb,0xca),      o2(0xea,0xae),
+     o3(0x8f,0xdb,0xcb), o3(0x8f,0xdb,0xcc),
+     o3(0x8f,0xdb,0xcd),      o2(0xea,0xa8),
+     o3(0x8f,0xdb,0xce),      o2(0xea,0xb0),
+     o3(0x8f,0xdb,0xcf),      o2(0xcd,0xe6),
+          o2(0xea,0xb3),      o2(0xea,0xaa),
+     o3(0x8f,0xdb,0xd0), o3(0x8f,0xdb,0xd1),
+
+#define to_EUC_JP_E8_9E WORDINDEX2INFO(27434)
+    to_EUC_JP_E8_9E_offsets,
+    to_EUC_JP_E8_9E_infos,
+
+#define to_EUC_JP_E8_9F_infos WORDINDEX2INFO(27436)
+                INVALID,      o2(0xea,0xab),
+     o3(0x8f,0xdb,0xd2),              UNDEF,
+          o2(0xea,0xaf),      o2(0xea,0xb2),
+          o2(0xea,0xb1), o3(0x8f,0xdb,0xd3),
+     o3(0x8f,0xdb,0xd4), o3(0x8f,0xdb,0xd5),
+          o2(0xea,0xa9), o3(0x8f,0xdb,0xd6),
+          o2(0xea,0xac),      o2(0xea,0xbd),
+     o3(0x8f,0xdb,0xd7), o3(0x8f,0xdb,0xd8),
+     o3(0x8f,0xdb,0xd9), o3(0x8f,0xdb,0xda),
+     o3(0x8f,0xdb,0xdb), o3(0x8f,0xdb,0xdc),
+          o2(0xea,0xb6), o3(0x8f,0xdb,0xdd),
+     o3(0x8f,0xdb,0xde), o3(0x8f,0xdb,0xdf),
+     o3(0x8f,0xdb,0xe0), o3(0x8f,0xdb,0xe1),
+     o3(0x8f,0xdb,0xe2),      o2(0xea,0xb4),
+     o3(0x8f,0xdb,0xe3),      o2(0xea,0xb5),
+     o3(0x8f,0xdb,0xe4),      o2(0xea,0xba),
+          o2(0xea,0xbb), o3(0x8f,0xdb,0xe5),
+          o2(0xb3,0xaa), o3(0x8f,0xdb,0xe6),
+          o2(0xb5,0xc2),      o2(0xea,0xb9),
+     o3(0x8f,0xdb,0xe7),
+
+#define to_EUC_JP_E8_9F WORDINDEX2INFO(27475)
+    to_EUC_JP_E8_9F_offsets,
+    to_EUC_JP_E8_9F_infos,
+
+#define to_EUC_JP_E8_A0_infos WORDINDEX2INFO(27477)
+                INVALID,              UNDEF,
+     o3(0x8f,0xdb,0xe8), o3(0x8f,0xdb,0xe9),
+          o2(0xea,0xa4), o3(0x8f,0xdb,0xea),
+     o3(0x8f,0xdb,0xeb), o3(0x8f,0xdb,0xec),
+     o3(0x8f,0xdb,0xed),      o2(0xea,0xb8),
+          o2(0xea,0xbc),      o2(0xea,0xb7),
+     o3(0x8f,0xdb,0xee),      o2(0xea,0xbe),
+     o3(0x8f,0xdb,0xf0), o3(0x8f,0xdb,0xf1),
+     o3(0x8f,0xdb,0xf2),      o2(0xea,0xc0),
+          o2(0xea,0xbf), o3(0x8f,0xdb,0xf3),
+     o3(0x8f,0xdb,0xef), o3(0x8f,0xdb,0xf4),
+     o3(0x8f,0xdb,0xf5), o3(0x8f,0xdb,0xf6),
+     o3(0x8f,0xdb,0xf7), o3(0x8f,0xdb,0xf8),
+          o2(0xea,0xc2),      o2(0xea,0xc1),
+          o2(0xe9,0xda),      o2(0xea,0xc6),
+     o3(0x8f,0xdb,0xf9), o3(0x8f,0xdb,0xfa),
+     o3(0x8f,0xdb,0xfb), o3(0x8f,0xdb,0xfc),
+          o2(0xea,0xc3), o3(0x8f,0xdb,0xfd),
+     o3(0x8f,0xdb,0xfe),      o2(0xea,0xc4),
+          o2(0xea,0xc5), o3(0x8f,0xdc,0xa1),
+          o2(0xea,0xc7), o3(0x8f,0xdc,0xa2),
+
+#define to_EUC_JP_E8_A0 WORDINDEX2INFO(27519)
+    to_EUC_JP_E8_A0_offsets,
+    to_EUC_JP_E8_A0_infos,
+
+#define to_EUC_JP_E8_A1_infos WORDINDEX2INFO(27521)
+                INVALID,      o2(0xb7,0xec),
+     o3(0x8f,0xdc,0xa3),      o2(0xea,0xc9),
+     o3(0x8f,0xdc,0xa4),      o2(0xea,0xc8),
+     o3(0x8f,0xdc,0xa5),      o2(0xbd,0xb0),
+                  UNDEF, o3(0x8f,0xdc,0xa6),
+     o3(0x8f,0xdc,0xa7), o3(0x8f,0xdc,0xa8),
+     o3(0x8f,0xdc,0xa9),      o2(0xb9,0xd4),
+          o2(0xde,0xa7), o3(0x8f,0xdc,0xaa),
+     o3(0x8f,0xdc,0xab),      o2(0xea,0xca),
+          o2(0xbd,0xd1), o3(0x8f,0xdc,0xac),
+     o3(0x8f,0xdc,0xad),      o2(0xb3,0xb9),
+     o3(0x8f,0xdc,0xae),      o2(0xea,0xcb),
+     o3(0x8f,0xdc,0xaf),      o2(0xb1,0xd2),
+     o3(0x8f,0xdc,0xb0),      o2(0xbe,0xd7),
+          o2(0xea,0xcc), o3(0x8f,0xdc,0xb1),
+     o3(0x8f,0xdc,0xb2),      o2(0xb9,0xd5),
+          o2(0xea,0xcd),      o2(0xb0,0xe1),
+     o3(0x8f,0xdc,0xb3),      o2(0xc9,0xbd),
+     o3(0x8f,0xdc,0xb4),      o2(0xea,0xce),
+          o2(0xbf,0xea), o3(0x8f,0xdc,0xb5),
+          o2(0xea,0xd5),      o2(0xea,0xd2),
+          o2(0xc3,0xef), o3(0x8f,0xdc,0xb6),
+     o3(0x8f,0xdc,0xb7),      o2(0xea,0xd3),
+          o2(0xea,0xd0),      o2(0xb6,0xde),
+
+#define to_EUC_JP_E8_A1 WORDINDEX2INFO(27569)
+    to_EUC_JP_E8_A1_offsets,
+    to_EUC_JP_E8_A1_infos,
+
+#define to_EUC_JP_E8_A2_infos WORDINDEX2INFO(27571)
+                INVALID, o3(0x8f,0xdc,0xb8),
+          o2(0xea,0xcf),      o2(0xea,0xd6),
+                  UNDEF,      o2(0xb7,0xb6),
+          o2(0xc2,0xde),      o2(0xea,0xdc),
+          o2(0xea,0xd8),      o2(0xc2,0xb5),
+          o2(0xea,0xd7), o3(0x8f,0xdc,0xb9),
+          o2(0xea,0xda), o3(0x8f,0xdc,0xba),
+     o3(0x8f,0xdc,0xbb), o3(0x8f,0xdc,0xbc),
+          o2(0xea,0xd1), o3(0x8f,0xdc,0xbd),
+     o3(0x8f,0xdc,0xbe),      o2(0xea,0xdb),
+          o2(0xea,0xdd), o3(0x8f,0xdc,0xbf),
+     o3(0x8f,0xdc,0xc0),      o2(0xc8,0xef),
+          o2(0xea,0xd9),      o2(0xea,0xde),
+          o2(0xea,0xe0),      o2(0xb8,0xd3),
+          o2(0xea,0xd4),      o2(0xb0,0xc1),
+     o3(0x8f,0xdc,0xc1), o3(0x8f,0xdc,0xc2),
+     o3(0x8f,0xdc,0xc3),      o2(0xea,0xdf),
+
+#define to_EUC_JP_E8_A2 WORDINDEX2INFO(27605)
+    to_EUC_JP_E8_A2_offsets,
+    to_EUC_JP_E8_A2_infos,
+
+#define to_EUC_JP_E8_A3_infos WORDINDEX2INFO(27607)
+                INVALID, o3(0x8f,0xdc,0xc4),
+          o2(0xba,0xdb),      o2(0xce,0xf6),
+          o2(0xea,0xe1),      o2(0xea,0xe2),
+          o2(0xc1,0xf5),              UNDEF,
+     o3(0x8f,0xdc,0xc5), o3(0x8f,0xdc,0xc6),
+     o3(0x8f,0xdc,0xc7), o3(0x8f,0xdc,0xc8),
+     o3(0x8f,0xdc,0xc9),      o2(0xce,0xa2),
+     o3(0x8f,0xdc,0xca), o3(0x8f,0xdc,0xcb),
+     o3(0x8f,0xdc,0xcc),      o2(0xea,0xe3),
+          o2(0xcd,0xb5),      o2(0xea,0xe4),
+          o2(0xea,0xe5), o3(0x8f,0xdc,0xcd),
+          o2(0xca,0xe4),      o2(0xea,0xe6),
+     o3(0x8f,0xdc,0xce),      o2(0xba,0xc0),
+          o2(0xce,0xa3), o3(0x8f,0xdc,0xcf),
+          o2(0xea,0xeb), o3(0x8f,0xdc,0xd0),
+     o3(0x8f,0xdc,0xd1), o3(0x8f,0xdc,0xd2),
+          o2(0xea,0xec),      o2(0xbe,0xd8),
+          o2(0xea,0xea), o3(0x8f,0xdc,0xd3),
+     o3(0x8f,0xdc,0xd4),      o2(0xcd,0xe7),
+          o2(0xea,0xe7),      o2(0xea,0xe9),
+          o2(0xc0,0xbd),      o2(0xbf,0xfe),
+
+#define to_EUC_JP_E8_A3 WORDINDEX2INFO(27649)
+    to_EUC_JP_E8_A3_offsets,
+    to_EUC_JP_E8_A3_infos,
+
+#define to_EUC_JP_E8_A4_infos WORDINDEX2INFO(27651)
+                INVALID,              UNDEF,
+     o3(0x8f,0xdc,0xd5),      o2(0xea,0xe8),
+          o2(0xea,0xed), o3(0x8f,0xdc,0xd6),
+          o2(0xca,0xa3),      o2(0xea,0xef),
+          o2(0xea,0xee), o3(0x8f,0xdc,0xd7),
+     o3(0x8f,0xdc,0xd8), o3(0x8f,0xdc,0xd9),
+          o2(0xb3,0xec),      o2(0xcb,0xab),
+          o2(0xea,0xf0), o3(0x8f,0xdc,0xda),
+     o3(0x8f,0xdc,0xdb), o3(0x8f,0xdc,0xdc),
+     o3(0x8f,0xdc,0xdd), o3(0x8f,0xdc,0xde),
+     o3(0x8f,0xdc,0xdf),      o2(0xea,0xfc),
+          o2(0xea,0xf2), o3(0x8f,0xdc,0xe0),
+          o2(0xea,0xf3), o3(0x8f,0xdc,0xe1),
+     o3(0x8f,0xdc,0xe2), o3(0x8f,0xdc,0xe3),
+          o2(0xea,0xf4),      o2(0xea,0xf5),
+     o3(0x8f,0xdc,0xe4), o3(0x8f,0xdc,0xe5),
+     o3(0x8f,0xdc,0xe6), o3(0x8f,0xdc,0xe7),
+          o2(0xea,0xf9),      o2(0xea,0xfa),
+     o3(0x8f,0xdc,0xe8), o3(0x8f,0xdc,0xe9),
+          o2(0xea,0xf8), o3(0x8f,0xdc,0xea),
+
+#define to_EUC_JP_E8_A4 WORDINDEX2INFO(27691)
+    to_EUC_JP_E8_A4_offsets,
+    to_EUC_JP_E8_A4_infos,
+
+#define to_EUC_JP_E8_A5_infos WORDINDEX2INFO(27693)
+                INVALID, o3(0x8f,0xdc,0xeb),
+          o2(0xea,0xf6), o3(0x8f,0xdc,0xec),
+          o2(0xea,0xf1),      o2(0xea,0xf7),
+     o3(0x8f,0xdc,0xed), o3(0x8f,0xdc,0xee),
+                  UNDEF, o3(0x8f,0xdc,0xef),
+          o2(0xea,0xfb),      o2(0xf0,0xb7),
+     o3(0x8f,0xdc,0xf0), o3(0x8f,0xdc,0xf1),
+          o2(0xb2,0xa8), o3(0x8f,0xdc,0xf2),
+     o3(0x8f,0xdc,0xf3), o3(0x8f,0xdc,0xf4),
+     o3(0x8f,0xdc,0xf5),      o2(0xea,0xfe),
+          o2(0xb6,0xdf),      o2(0xea,0xfd),
+     o3(0x8f,0xdc,0xf6), o3(0x8f,0xdc,0xf7),
+     o3(0x8f,0xdc,0xf8),      o2(0xeb,0xa2),
+          o2(0xeb,0xa1),      o2(0xeb,0xa4),
+     o3(0x8f,0xdc,0xf9),      o2(0xeb,0xa3),
+     o3(0x8f,0xdc,0xfa),      o2(0xeb,0xa5),
+     o3(0x8f,0xdc,0xfb),      o2(0xbd,0xb1),
+     o3(0x8f,0xdc,0xfc),      o2(0xeb,0xa6),
+     o3(0x8f,0xdc,0xfd),      o2(0xeb,0xa7),
+     o3(0x8f,0xdc,0xfe), o3(0x8f,0xdd,0xa1),
+     o3(0x8f,0xdd,0xa2), o3(0x8f,0xdd,0xa3),
+          o2(0xeb,0xa8),      o2(0xc0,0xbe),
+
+#define to_EUC_JP_E8_A5 WORDINDEX2INFO(27737)
+    to_EUC_JP_E8_A5_offsets,
+    to_EUC_JP_E8_A5_infos,
+
+#define to_EUC_JP_E8_A6_infos WORDINDEX2INFO(27739)
+                INVALID,              UNDEF,
+          o2(0xcd,0xd7),      o2(0xeb,0xa9),
+          o2(0xca,0xa4),      o2(0xc7,0xc6),
+          o2(0xeb,0xaa), o3(0x8f,0xdd,0xa4),
+          o2(0xeb,0xab),      o2(0xb8,0xab),
+     o3(0x8f,0xdd,0xa5),      o2(0xb5,0xac),
+     o3(0x8f,0xdd,0xa6),      o2(0xeb,0xac),
+     o3(0x8f,0xdd,0xa7), o3(0x8f,0xdd,0xa8),
+          o2(0xbb,0xeb),      o2(0xc7,0xc1),
+          o2(0xeb,0xad),      o2(0xb3,0xd0),
+     o3(0x8f,0xdd,0xa9), o3(0x8f,0xdd,0xaa),
+     o3(0x8f,0xdd,0xab), o3(0x8f,0xdd,0xac),
+          o2(0xeb,0xae), o3(0x8f,0xdd,0xad),
+          o2(0xeb,0xb0),      o2(0xcd,0xf7),
+          o2(0xeb,0xaf),      o2(0xbf,0xc6),
+          o2(0xeb,0xb1),      o2(0xeb,0xb2),
+     o3(0x8f,0xdd,0xae),      o2(0xeb,0xb3),
+          o2(0xb4,0xd1), o3(0x8f,0xdd,0xaf),
+     o3(0x8f,0xdd,0xb0), o3(0x8f,0xdd,0xb1),
+     o3(0x8f,0xdd,0xb2),      o2(0xeb,0xb4),
+     o3(0x8f,0xdd,0xb3),      o2(0xeb,0xb5),
+          o2(0xeb,0xb6),
+
+#define to_EUC_JP_E8_A6 WORDINDEX2INFO(27782)
+    to_EUC_JP_E8_A6_offsets,
+    to_EUC_JP_E8_A6_infos,
+
+#define to_EUC_JP_E8_A7_infos WORDINDEX2INFO(27784)
+                INVALID,      o2(0xeb,0xb7),
+                  UNDEF,      o2(0xb3,0xd1),
+     o3(0x8f,0xdd,0xb4), o3(0x8f,0xdd,0xb5),
+     o3(0x8f,0xdd,0xb6), o3(0x8f,0xdd,0xb7),
+     o3(0x8f,0xdd,0xb8),      o2(0xeb,0xb8),
+          o2(0xeb,0xb9),      o2(0xeb,0xba),
+          o2(0xb2,0xf2), o3(0x8f,0xdd,0xb9),
+          o2(0xbf,0xa8),      o2(0xeb,0xbb),
+     o3(0x8f,0xdd,0xba), o3(0x8f,0xdd,0xbb),
+     o3(0x8f,0xdd,0xbc), o3(0x8f,0xdd,0xbd),
+     o3(0x8f,0xdd,0xbe),      o2(0xeb,0xbc),
+     o3(0x8f,0xdd,0xbf),      o2(0xeb,0xbd),
+     o3(0x8f,0xdd,0xc0), o3(0x8f,0xdd,0xc1),
+     o3(0x8f,0xdd,0xc2),
+
+#define to_EUC_JP_E8_A7 WORDINDEX2INFO(27811)
+    to_EUC_JP_E8_A7_offsets,
+    to_EUC_JP_E8_A7_infos,
+
+#define to_EUC_JP_E8_A8_infos WORDINDEX2INFO(27813)
+                INVALID,      o2(0xb8,0xc0),
+                  UNDEF,      o2(0xc4,0xfb),
+          o2(0xeb,0xbe), o3(0x8f,0xdd,0xc3),
+     o3(0x8f,0xdd,0xc4), o3(0x8f,0xdd,0xc5),
+          o2(0xb7,0xd7),      o2(0xbf,0xd6),
+          o2(0xeb,0xc1),      o2(0xc6,0xa4),
+     o3(0x8f,0xdd,0xc6),      o2(0xeb,0xc0),
+     o3(0x8f,0xdd,0xc7), o3(0x8f,0xdd,0xc8),
+          o2(0xb7,0xb1), o3(0x8f,0xdd,0xc9),
+     o3(0x8f,0xdd,0xca),      o2(0xeb,0xbf),
+          o2(0xc2,0xf7),      o2(0xb5,0xad),
+          o2(0xeb,0xc2),      o2(0xeb,0xc3),
+     o3(0x8f,0xdd,0xcb),      o2(0xbe,0xd9),
+     o3(0x8f,0xdd,0xcc), o3(0x8f,0xdd,0xcd),
+          o2(0xb7,0xed), o3(0x8f,0xdd,0xce),
+          o2(0xeb,0xc4), o3(0x8f,0xdd,0xcf),
+          o2(0xcb,0xac), o3(0x8f,0xdd,0xd0),
+     o3(0x8f,0xdd,0xd1),      o2(0xc0,0xdf),
+     o3(0x8f,0xdd,0xd2),      o2(0xb5,0xf6),
+          o2(0xcc,0xf5),      o2(0xc1,0xca),
+     o3(0x8f,0xdd,0xd3),      o2(0xeb,0xc5),
+     o3(0x8f,0xdd,0xd4),      o2(0xbf,0xc7),
+          o2(0xc3,0xf0),      o2(0xbe,0xda),
+     o3(0x8f,0xdd,0xd5), o3(0x8f,0xdd,0xd6),
+
+#define to_EUC_JP_E8_A8 WORDINDEX2INFO(27861)
+    to_EUC_JP_E8_A8_offsets,
+    to_EUC_JP_E8_A8_infos,
+
+#define to_EUC_JP_E8_A9_infos WORDINDEX2INFO(27863)
+                INVALID, o3(0x8f,0xdd,0xd7),
+          o2(0xeb,0xc6),              UNDEF,
+     o3(0x8f,0xdd,0xd8), o3(0x8f,0xdd,0xd9),
+          o2(0xeb,0xc9), o3(0x8f,0xdd,0xda),
+          o2(0xeb,0xca), o3(0x8f,0xdd,0xdb),
+     o3(0x8f,0xdd,0xdc), o3(0x8f,0xdd,0xdd),
+          o2(0xba,0xbe),      o2(0xc2,0xc2),
+          o2(0xeb,0xc8), o3(0x8f,0xdd,0xde),
+          o2(0xbe,0xdb),      o2(0xc9,0xbe),
+     o3(0x8f,0xdd,0xdf), o3(0x8f,0xdd,0xe0),
+     o3(0x8f,0xdd,0xe1),      o2(0xeb,0xc7),
+     o3(0x8f,0xdd,0xe2), o3(0x8f,0xdd,0xe3),
+          o2(0xbb,0xec),      o2(0xb1,0xd3),
+     o3(0x8f,0xdd,0xe4),      o2(0xeb,0xce),
+          o2(0xb7,0xd8), o3(0x8f,0xdd,0xe5),
+          o2(0xbb,0xee), o3(0x8f,0xdd,0xe6),
+          o2(0xbb,0xed),      o2(0xcf,0xcd),
+          o2(0xeb,0xcd),      o2(0xeb,0xcc),
+          o2(0xc1,0xa7),      o2(0xb5,0xcd),
+          o2(0xcf,0xc3),      o2(0xb3,0xba),
+          o2(0xbe,0xdc), o3(0x8f,0xdd,0xe7),
+     o3(0x8f,0xdd,0xe8), o3(0x8f,0xdd,0xe9),
+     o3(0x8f,0xdd,0xea), o3(0x8f,0xdd,0xeb),
+     o3(0x8f,0xdd,0xec),      o2(0xeb,0xcb),
+     o3(0x8f,0xdd,0xed), o3(0x8f,0xdd,0xee),
+
+#define to_EUC_JP_E8_A9 WORDINDEX2INFO(27913)
+    to_EUC_JP_E8_A9_offsets,
+    to_EUC_JP_E8_A9_infos,
+
+#define to_EUC_JP_E8_AA_infos WORDINDEX2INFO(27915)
+                INVALID, o3(0x8f,0xdd,0xef),
+                  UNDEF,      o2(0xeb,0xd0),
+     o3(0x8f,0xdd,0xf0),      o2(0xeb,0xd1),
+          o2(0xeb,0xcf), o3(0x8f,0xdd,0xf1),
+          o2(0xb8,0xd8),      o2(0xcd,0xc0),
+     o3(0x8f,0xdd,0xf2),      o2(0xbb,0xef),
+          o2(0xc7,0xa7), o3(0x8f,0xdd,0xf3),
+     o3(0x8f,0xdd,0xf4),      o2(0xeb,0xd4),
+     o3(0x8f,0xdd,0xf5),      o2(0xc0,0xc0),
+          o2(0xc3,0xc2), o3(0x8f,0xdd,0xf6),
+     o3(0x8f,0xdd,0xf7),      o2(0xcd,0xb6),
+     o3(0x8f,0xdd,0xf8),      o2(0xeb,0xd7),
+          o2(0xb8,0xec), o3(0x8f,0xdd,0xf9),
+          o2(0xc0,0xbf),      o2(0xeb,0xd3),
+          o2(0xeb,0xd8),      o2(0xb8,0xed),
+          o2(0xeb,0xd5),      o2(0xeb,0xd6),
+     o3(0x8f,0xdd,0xfa),      o2(0xeb,0xd2),
+     o3(0x8f,0xdd,0xfb),      o2(0xc0,0xe2),
+          o2(0xc6,0xc9), o3(0x8f,0xdd,0xfc),
+     o3(0x8f,0xdd,0xfd),      o2(0xc3,0xaf),
+          o2(0xb2,0xdd), o3(0x8f,0xdd,0xfe),
+     o3(0x8f,0xde,0xa1), o3(0x8f,0xde,0xa2),
+          o2(0xc8,0xf0), o3(0x8f,0xde,0xa3),
+          o2(0xb5,0xc3), o3(0x8f,0xde,0xa4),
+          o2(0xc4,0xb4),
+
+#define to_EUC_JP_E8_AA WORDINDEX2INFO(27964)
+    to_EUC_JP_E8_AA_offsets,
+    to_EUC_JP_E8_AA_infos,
+
+#define to_EUC_JP_E8_AB_infos WORDINDEX2INFO(27966)
+                INVALID,              UNDEF,
+          o2(0xeb,0xdb), o3(0x8f,0xde,0xa5),
+          o2(0xeb,0xd9), o3(0x8f,0xde,0xa6),
+          o2(0xc3,0xcc), o3(0x8f,0xde,0xa7),
+     o3(0x8f,0xde,0xa8), o3(0x8f,0xde,0xa9),
+          o2(0xc0,0xc1),      o2(0xb4,0xd2),
+          o2(0xeb,0xda),      o2(0xbf,0xdb),
+     o3(0x8f,0xde,0xaa),      o2(0xce,0xca),
+     o3(0x8f,0xde,0xab), o3(0x8f,0xde,0xac),
+     o3(0x8f,0xde,0xad),      o2(0xcf,0xc0),
+     o3(0x8f,0xde,0xae),      o2(0xeb,0xdc),
+          o2(0xeb,0xe7),      o2(0xc4,0xb5),
+     o3(0x8f,0xde,0xaf),      o2(0xeb,0xe6),
+     o3(0x8f,0xde,0xb0),      o2(0xeb,0xe3),
+          o2(0xeb,0xeb),      o2(0xeb,0xe4),
+          o2(0xeb,0xe0),      o2(0xc4,0xfc),
+          o2(0xeb,0xdf),      o2(0xeb,0xdd),
+     o3(0x8f,0xde,0xb1),      o2(0xcd,0xa1),
+          o2(0xbb,0xf0), o3(0x8f,0xde,0xb2),
+          o2(0xeb,0xe1),      o2(0xeb,0xde),
+     o3(0x8f,0xde,0xb3), o3(0x8f,0xde,0xb4),
+     o3(0x8f,0xde,0xb5),      o2(0xeb,0xe5),
+          o2(0xbd,0xf4),      o2(0xb8,0xc1),
+     o3(0x8f,0xde,0xb6),      o2(0xc2,0xfa),
+     o3(0x8f,0xde,0xb7),
+
+#define to_EUC_JP_E8_AB WORDINDEX2INFO(28015)
+    to_EUC_JP_E8_AB_offsets,
+    to_EUC_JP_E8_AB_infos,
+
+#define to_EUC_JP_E8_AC_infos WORDINDEX2INFO(28017)
+                INVALID,      o2(0xcb,0xc5),
+          o2(0xb1,0xda),      o2(0xb0,0xe2),
+                  UNDEF,      o2(0xc6,0xa5),
+     o3(0x8f,0xde,0xb8), o3(0x8f,0xde,0xb9),
+          o2(0xeb,0xe9), o3(0x8f,0xde,0xbf),
+     o3(0x8f,0xde,0xba),      o2(0xeb,0xe8),
+          o2(0xc6,0xe6),      o2(0xeb,0xed),
+     o3(0x8f,0xde,0xbb),      o2(0xeb,0xe2),
+          o2(0xeb,0xec),      o2(0xeb,0xee),
+          o2(0xb8,0xac),      o2(0xeb,0xea),
+          o2(0xb9,0xd6), o3(0x8f,0xde,0xbc),
+          o2(0xbc,0xd5), o3(0x8f,0xde,0xbd),
+     o3(0x8f,0xde,0xbe),      o2(0xeb,0xef),
+          o2(0xcd,0xd8),      o2(0xeb,0xf2),
+          o2(0xeb,0xf5),      o2(0xeb,0xf3),
+          o2(0xc9,0xb5), o3(0x8f,0xde,0xc0),
+     o3(0x8f,0xde,0xc1),      o2(0xeb,0xf0),
+     o3(0x8f,0xde,0xc2),      o2(0xb6,0xe0),
+     o3(0x8f,0xde,0xc3),      o2(0xeb,0xf4),
+
+#define to_EUC_JP_E8_AC WORDINDEX2INFO(28055)
+    to_EUC_JP_E8_AC_offsets,
+    to_EUC_JP_E8_AC_infos,
+
+#define to_EUC_JP_E8_AD_infos WORDINDEX2INFO(28057)
+                INVALID,              UNDEF,
+          o2(0xeb,0xf6), o3(0x8f,0xde,0xc4),
+     o3(0x8f,0xde,0xc5), o3(0x8f,0xde,0xc6),
+     o3(0x8f,0xde,0xc7), o3(0x8f,0xde,0xc8),
+     o3(0x8f,0xde,0xc9),      o2(0xeb,0xfa),
+          o2(0xeb,0xf7), o3(0x8f,0xde,0xce),
+          o2(0xeb,0xf9),      o2(0xeb,0xf8),
+     o3(0x8f,0xde,0xca), o3(0x8f,0xde,0xcb),
+     o3(0x8f,0xde,0xcc),      o2(0xeb,0xfb),
+          o2(0xbc,0xb1), o3(0x8f,0xde,0xcd),
+          o2(0xeb,0xfd),      o2(0xeb,0xfc),
+          o2(0xc9,0xe8), o3(0x8f,0xde,0xcf),
+          o2(0xec,0xa1), o3(0x8f,0xde,0xd0),
+          o2(0xb7,0xd9),      o2(0xeb,0xfe),
+          o2(0xec,0xa2), o3(0x8f,0xde,0xd1),
+          o2(0xec,0xa3),      o2(0xb5,0xc4),
+          o2(0xe6,0xc1),      o2(0xbe,0xf9),
+          o2(0xec,0xa4), o3(0x8f,0xde,0xd2),
+          o2(0xb8,0xee), o3(0x8f,0xde,0xd3),
+     o3(0x8f,0xde,0xd4), o3(0x8f,0xde,0xd5),
+          o2(0xec,0xa5), o3(0x8f,0xde,0xd6),
+
+#define to_EUC_JP_E8_AD WORDINDEX2INFO(28099)
+    to_EUC_JP_E8_AD_offsets,
+    to_EUC_JP_E8_AD_infos,
+
+#define to_EUC_JP_E8_AE_infos WORDINDEX2INFO(28101)
+                INVALID,      o2(0xec,0xa6),
+     o3(0x8f,0xde,0xd7),              UNDEF,
+          o2(0xbb,0xbe), o3(0x8f,0xde,0xd8),
+     o3(0x8f,0xde,0xd9),      o2(0xda,0xce),
+     o3(0x8f,0xde,0xda),      o2(0xec,0xa7),
+     o3(0x8f,0xde,0xdb),      o2(0xec,0xa8),
+     o3(0x8f,0xde,0xdc),      o2(0xbd,0xb2),
+          o2(0xec,0xa9),      o2(0xec,0xaa),
+     o3(0x8f,0xde,0xdd), o3(0x8f,0xde,0xde),
+          o2(0xec,0xab),      o2(0xec,0xac),
+          o2(0xec,0xad), o3(0x8f,0xde,0xdf),
+     o3(0x8f,0xde,0xe0), o3(0x8f,0xde,0xe1),
+
+#define to_EUC_JP_E8_AE WORDINDEX2INFO(28125)
+    to_EUC_JP_E8_AE_offsets,
+    to_EUC_JP_E8_AE_infos,
+
+#define to_EUC_JP_E8_B0_infos WORDINDEX2INFO(28127)
+                INVALID,              UNDEF,
+          o2(0xc3,0xab), o3(0x8f,0xde,0xe2),
+     o3(0x8f,0xde,0xe3),      o2(0xec,0xae),
+     o3(0x8f,0xde,0xe4), o3(0x8f,0xde,0xe5),
+          o2(0xec,0xb0),
+
+#define to_EUC_JP_E8_B0 WORDINDEX2INFO(28136)
+    to_EUC_JP_E8_B0_offsets,
+    to_EUC_JP_E8_B0_infos,
+
+#define to_EUC_JP_E8_B1_infos WORDINDEX2INFO(28138)
+                INVALID,              UNDEF,
+          o2(0xec,0xaf), o3(0x8f,0xde,0xe6),
+          o2(0xc6,0xa6), o3(0x8f,0xde,0xe7),
+          o2(0xec,0xb1), o3(0x8f,0xde,0xe8),
+          o2(0xcb,0xad), o3(0x8f,0xde,0xe9),
+          o2(0xec,0xb2),      o2(0xec,0xb3),
+     o3(0x8f,0xde,0xea),      o2(0xec,0xb4),
+     o3(0x8f,0xde,0xeb), o3(0x8f,0xde,0xec),
+     o3(0x8f,0xde,0xed),      o2(0xec,0xb5),
+     o3(0x8f,0xde,0xee), o3(0x8f,0xde,0xef),
+     o3(0x8f,0xde,0xf2),      o2(0xc6,0xda),
+     o3(0x8f,0xde,0xf0), o3(0x8f,0xde,0xf1),
+          o2(0xbe,0xdd),      o2(0xec,0xb6),
+     o3(0x8f,0xde,0xf3), o3(0x8f,0xde,0xf4),
+     o3(0x8f,0xde,0xf5), o3(0x8f,0xde,0xf6),
+     o3(0x8f,0xde,0xf7),      o2(0xb9,0xeb),
+          o2(0xd0,0xae),      o2(0xec,0xb7),
+     o3(0x8f,0xde,0xf8), o3(0x8f,0xde,0xf9),
+     o3(0x8f,0xde,0xfa), o3(0x8f,0xde,0xfb),
+          o2(0xec,0xb8),      o2(0xc9,0xbf),
+          o2(0xec,0xb9), o3(0x8f,0xde,0xfc),
+          o2(0xec,0xc1), o3(0x8f,0xde,0xfd),
+
+#define to_EUC_JP_E8_B1 WORDINDEX2INFO(28182)
+    to_EUC_JP_E8_B1_offsets,
+    to_EUC_JP_E8_B1_infos,
+
+#define to_EUC_JP_E8_B2_infos WORDINDEX2INFO(28184)
+                INVALID,              UNDEF,
+          o2(0xec,0xba),      o2(0xec,0xbc),
+     o3(0x8f,0xde,0xfe), o3(0x8f,0xdf,0xa1),
+          o2(0xec,0xbb),      o2(0xec,0xbd),
+     o3(0x8f,0xdf,0xa2),      o2(0xcb,0xc6),
+          o2(0xec,0xbe),      o2(0xec,0xbf),
+     o3(0x8f,0xdf,0xa3), o3(0x8f,0xdf,0xa4),
+     o3(0x8f,0xdf,0xa5),      o2(0xec,0xc0),
+          o2(0xec,0xc2), o3(0x8f,0xdf,0xa6),
+     o3(0x8f,0xdf,0xa7), o3(0x8f,0xdf,0xa8),
+          o2(0xb3,0xad),      o2(0xc4,0xe7),
+          o2(0xc9,0xe9),      o2(0xba,0xe2),
+          o2(0xb9,0xd7), o3(0x8f,0xdf,0xa9),
+          o2(0xc9,0xcf),      o2(0xb2,0xdf),
+          o2(0xc8,0xce),      o2(0xec,0xc5),
+          o2(0xb4,0xd3),      o2(0xc0,0xd5),
+          o2(0xec,0xc4),      o2(0xec,0xc9),
+          o2(0xc3,0xf9),      o2(0xcc,0xe3),
+          o2(0xec,0xc7),      o2(0xec,0xc8),
+          o2(0xb5,0xae),      o2(0xec,0xca),
+          o2(0xc7,0xe3),      o2(0xc2,0xdf),
+     o3(0x8f,0xdf,0xaa), o3(0x8f,0xdf,0xab),
+          o2(0xc8,0xf1),      o2(0xc5,0xbd),
+          o2(0xec,0xc6),      o2(0xcb,0xc7),
+
+#define to_EUC_JP_E8_B2 WORDINDEX2INFO(28232)
+    to_EUC_JP_E8_B2_offsets,
+    to_EUC_JP_E8_B2_infos,
+
+#define to_EUC_JP_E8_B3_infos WORDINDEX2INFO(28234)
+                INVALID,      o2(0xb2,0xec),
+          o2(0xec,0xcc),      o2(0xcf,0xa8),
+          o2(0xc4,0xc2),      o2(0xcf,0xc5),
+     o3(0x8f,0xdf,0xac), o3(0x8f,0xdf,0xad),
+          o2(0xbb,0xf1),      o2(0xec,0xcb),
+     o3(0x8f,0xdf,0xae),      o2(0xc2,0xb1),
+     o3(0x8f,0xdf,0xaf),              UNDEF,
+          o2(0xec,0xdc),      o2(0xc1,0xa8),
+     o3(0x8f,0xdf,0xb0),      o2(0xc6,0xf8),
+          o2(0xc9,0xd0), o3(0x8f,0xdf,0xb2),
+     o3(0x8f,0xdf,0xb1), o3(0x8f,0xdf,0xb3),
+          o2(0xec,0xcf),      o2(0xbb,0xbf),
+          o2(0xbb,0xf2), o3(0x8f,0xdf,0xb4),
+          o2(0xbe,0xde),      o2(0xc7,0xe5),
+     o3(0x8f,0xdf,0xb5),      o2(0xb8,0xad),
+          o2(0xec,0xce),      o2(0xec,0xcd),
+          o2(0xc9,0xea), o3(0x8f,0xdf,0xb6),
+          o2(0xbc,0xc1), o3(0x8f,0xdf,0xb7),
+          o2(0xc5,0xd2), o3(0x8f,0xdf,0xb8),
+     o3(0x8f,0xdf,0xb9), o3(0x8f,0xdf,0xba),
+     o3(0x8f,0xdf,0xbb), o3(0x8f,0xdf,0xbc),
+     o3(0x8f,0xdf,0xbd),      o2(0xec,0xd1),
+          o2(0xec,0xd2),      o2(0xb9,0xd8),
+          o2(0xec,0xd0), o3(0x8f,0xdf,0xbe),
+     o3(0x8f,0xdf,0xbf),
+
+#define to_EUC_JP_E8_B3 WORDINDEX2INFO(28283)
+    to_EUC_JP_E8_B3_offsets,
+    to_EUC_JP_E8_B3_infos,
+
+#define to_EUC_JP_E8_B4_infos WORDINDEX2INFO(28285)
+                INVALID,              UNDEF,
+     o3(0x8f,0xdf,0xc0), o3(0x8f,0xdf,0xc1),
+          o2(0xec,0xd3),      o2(0xec,0xd4),
+          o2(0xec,0xd6),      o2(0xc2,0xa3),
+     o3(0x8f,0xdf,0xc2),      o2(0xec,0xd5),
+          o2(0xb4,0xe6),      o2(0xec,0xd8),
+          o2(0xec,0xd7),      o2(0xec,0xd9),
+     o3(0x8f,0xdf,0xc3),      o2(0xec,0xdb),
+          o2(0xec,0xdd),      o2(0xec,0xde),
+     o3(0x8f,0xdf,0xc4), o3(0x8f,0xdf,0xc5),
+
+#define to_EUC_JP_E8_B4 WORDINDEX2INFO(28305)
+    to_EUC_JP_E8_B4_offsets,
+    to_EUC_JP_E8_B4_infos,
+
+#define to_EUC_JP_E8_B5_infos WORDINDEX2INFO(28307)
+                INVALID,              UNDEF,
+          o2(0xc0,0xd6), o3(0x8f,0xdf,0xc6),
+          o2(0xbc,0xcf),      o2(0xec,0xdf),
+     o3(0x8f,0xdf,0xc7),      o2(0xb3,0xd2),
+     o3(0x8f,0xdf,0xc8),      o2(0xec,0xe0),
+     o3(0x8f,0xdf,0xc9),      o2(0xc1,0xf6),
+          o2(0xec,0xe1),      o2(0xec,0xe2),
+          o2(0xc9,0xeb),      o2(0xb5,0xaf),
+     o3(0x8f,0xdf,0xca),
+
+#define to_EUC_JP_E8_B5 WORDINDEX2INFO(28324)
+    to_EUC_JP_E8_B5_offsets,
+    to_EUC_JP_E8_B5_infos,
+
+#define to_EUC_JP_E8_B6_infos WORDINDEX2INFO(28326)
+                INVALID,              UNDEF,
+          o2(0xec,0xe3), o3(0x8f,0xdf,0xcb),
+     o3(0x8f,0xdf,0xcc),      o2(0xc4,0xb6),
+     o3(0x8f,0xdf,0xcd),      o2(0xb1,0xdb),
+     o3(0x8f,0xdf,0xce), o3(0x8f,0xdf,0xcf),
+     o3(0x8f,0xdf,0xd0), o3(0x8f,0xdf,0xd1),
+          o2(0xec,0xe4), o3(0x8f,0xdf,0xd2),
+     o3(0x8f,0xdf,0xd3), o3(0x8f,0xdf,0xd4),
+          o2(0xbc,0xf1), o3(0x8f,0xdf,0xd5),
+          o2(0xbf,0xf6), o3(0x8f,0xdf,0xd6),
+     o3(0x8f,0xdf,0xd7), o3(0x8f,0xdf,0xd8),
+     o3(0x8f,0xdf,0xd9),      o2(0xc2,0xad),
+     o3(0x8f,0xdf,0xda), o3(0x8f,0xdf,0xdb),
+     o3(0x8f,0xdf,0xdc),      o2(0xec,0xe7),
+     o3(0x8f,0xdf,0xdd), o3(0x8f,0xdf,0xef),
+          o2(0xec,0xe6),
+
+#define to_EUC_JP_E8_B6 WORDINDEX2INFO(28357)
+    to_EUC_JP_E8_B6_offsets,
+    to_EUC_JP_E8_B6_infos,
+
+#define to_EUC_JP_E8_B7_infos WORDINDEX2INFO(28359)
+                INVALID, o3(0x8f,0xdf,0xde),
+                  UNDEF,      o2(0xec,0xe5),
+     o3(0x8f,0xdf,0xdf), o3(0x8f,0xdf,0xe0),
+     o3(0x8f,0xdf,0xe1), o3(0x8f,0xdf,0xe2),
+     o3(0x8f,0xdf,0xe3),      o2(0xec,0xed),
+          o2(0xec,0xeb), o3(0x8f,0xdf,0xe4),
+          o2(0xec,0xe8), o3(0x8f,0xdf,0xe5),
+     o3(0x8f,0xdf,0xe6), o3(0x8f,0xdf,0xe7),
+          o2(0xec,0xea), o3(0x8f,0xdf,0xe8),
+     o3(0x8f,0xdf,0xe9),      o2(0xec,0xe9),
+          o2(0xec,0xec),      o2(0xb5,0xf7),
+          o2(0xec,0xf0),      o2(0xc0,0xd7),
+          o2(0xec,0xf1), o3(0x8f,0xdf,0xea),
+     o3(0x8f,0xdf,0xeb), o3(0x8f,0xdf,0xec),
+          o2(0xb8,0xd9),      o2(0xec,0xee),
+          o2(0xec,0xef), o3(0x8f,0xdf,0xed),
+          o2(0xcf,0xa9), o3(0x8f,0xdf,0xee),
+     o3(0x8f,0xdf,0xf0), o3(0x8f,0xdf,0xf1),
+          o2(0xc4,0xb7), o3(0x8f,0xdf,0xf2),
+          o2(0xc1,0xa9),      o2(0xec,0xf2),
+     o3(0x8f,0xdf,0xf3),      o2(0xec,0xf5),
+
+#define to_EUC_JP_E8_B7 WORDINDEX2INFO(28401)
+    to_EUC_JP_E8_B7_offsets,
+    to_EUC_JP_E8_B7_infos,
+
+#define to_EUC_JP_E8_B8_infos WORDINDEX2INFO(28403)
+                INVALID,              UNDEF,
+     o3(0x8f,0xdf,0xf4), o3(0x8f,0xdf,0xf5),
+     o3(0x8f,0xdf,0xf6), o3(0x8f,0xdf,0xf7),
+          o2(0xec,0xf3),      o2(0xec,0xf4),
+          o2(0xcd,0xd9), o3(0x8f,0xdf,0xf8),
+          o2(0xc6,0xa7),      o2(0xec,0xf8),
+     o3(0x8f,0xdf,0xf9), o3(0x8f,0xdf,0xfa),
+     o3(0x8f,0xdf,0xfb),      o2(0xec,0xf6),
+          o2(0xec,0xf7),      o2(0xec,0xf9),
+     o3(0x8f,0xdf,0xfc), o3(0x8f,0xdf,0xfd),
+     o3(0x8f,0xdf,0xfe), o3(0x8f,0xe0,0xa1),
+     o3(0x8f,0xe0,0xa2), o3(0x8f,0xe0,0xa3),
+          o2(0xed,0xa9),      o2(0xec,0xfc),
+     o3(0x8f,0xe0,0xa4), o3(0x8f,0xe0,0xa5),
+          o2(0xec,0xfd),      o2(0xec,0xfb),
+     o3(0x8f,0xe0,0xa6), o3(0x8f,0xe0,0xa7),
+     o3(0x8f,0xe0,0xa8), o3(0x8f,0xe0,0xa9),
+     o3(0x8f,0xe0,0xaa),
+
+#define to_EUC_JP_E8_B8 WORDINDEX2INFO(28438)
+    to_EUC_JP_E8_B8_offsets,
+    to_EUC_JP_E8_B8_infos,
+
+#define to_EUC_JP_E8_B9_infos WORDINDEX2INFO(28440)
+                INVALID, o3(0x8f,0xe0,0xab),
+     o3(0x8f,0xe0,0xac),      o2(0xec,0xfa),
+                  UNDEF,      o2(0xc4,0xfd),
+          o2(0xed,0xa1),      o2(0xed,0xa5),
+          o2(0xed,0xa2),      o2(0xec,0xfe),
+     o3(0x8f,0xe0,0xad),      o2(0xed,0xa3),
+     o3(0x8f,0xe0,0xae), o3(0x8f,0xe0,0xaf),
+     o3(0x8f,0xe0,0xb0),      o2(0xed,0xa4),
+     o3(0x8f,0xe0,0xb1),      o2(0xed,0xab),
+          o2(0xed,0xa6), o3(0x8f,0xe0,0xb2),
+     o3(0x8f,0xe0,0xb3), o3(0x8f,0xe0,0xb4),
+     o3(0x8f,0xe0,0xb5),      o2(0xc0,0xd8),
+          o2(0xed,0xa8), o3(0x8f,0xe0,0xb6),
+     o3(0x8f,0xe0,0xb7),      o2(0xed,0xaa),
+          o2(0xed,0xa7), o3(0x8f,0xe0,0xb8),
+     o3(0x8f,0xe0,0xb9), o3(0x8f,0xe0,0xba),
+     o3(0x8f,0xe0,0xbb), o3(0x8f,0xe0,0xbc),
+     o3(0x8f,0xe0,0xbd),      o2(0xed,0xad),
+          o2(0xbd,0xb3),      o2(0xed,0xac),
+     o3(0x8f,0xe0,0xbe), o3(0x8f,0xe0,0xbf),
+     o3(0x8f,0xe0,0xc0),      o2(0xed,0xae),
+
+#define to_EUC_JP_E8_B9 WORDINDEX2INFO(28482)
+    to_EUC_JP_E8_B9_offsets,
+    to_EUC_JP_E8_B9_infos,
+
+#define to_EUC_JP_E8_BA_infos WORDINDEX2INFO(28484)
+                INVALID,              UNDEF,
+          o2(0xed,0xaf), o3(0x8f,0xe0,0xc1),
+     o3(0x8f,0xe0,0xc2),      o2(0xed,0xb2),
+          o2(0xed,0xb1),      o2(0xed,0xb0),
+     o3(0x8f,0xe0,0xc3),      o2(0xed,0xb4),
+          o2(0xed,0xb3),      o2(0xcc,0xf6),
+     o3(0x8f,0xe0,0xc4),      o2(0xed,0xb6),
+     o3(0x8f,0xe0,0xc5),      o2(0xed,0xb5),
+          o2(0xed,0xb7), o3(0x8f,0xe0,0xc6),
+          o2(0xed,0xb8), o3(0x8f,0xe0,0xc7),
+     o3(0x8f,0xe0,0xc8), o3(0x8f,0xe0,0xc9),
+     o3(0x8f,0xe0,0xca),      o2(0xed,0xba),
+     o3(0x8f,0xe0,0xcb), o3(0x8f,0xe0,0xcc),
+     o3(0x8f,0xe0,0xcd),      o2(0xed,0xb9),
+          o2(0xbf,0xc8),      o2(0xed,0xbb),
+     o3(0x8f,0xe0,0xce), o3(0x8f,0xe0,0xcf),
+          o2(0xb6,0xed),      o2(0xed,0xbc),
+          o2(0xed,0xbe), o3(0x8f,0xe0,0xd0),
+     o3(0x8f,0xe0,0xd1), o3(0x8f,0xe0,0xd2),
+     o3(0x8f,0xe0,0xd3),      o2(0xed,0xbf),
+
+#define to_EUC_JP_E8_BA WORDINDEX2INFO(28524)
+    to_EUC_JP_E8_BA_offsets,
+    to_EUC_JP_E8_BA_infos,
+
+#define to_EUC_JP_E8_BB_infos WORDINDEX2INFO(28526)
+                INVALID, o3(0x8f,0xe0,0xd4),
+     o3(0x8f,0xe0,0xd5),              UNDEF,
+     o3(0x8f,0xe0,0xd6), o3(0x8f,0xe0,0xd7),
+          o2(0xed,0xc0),      o2(0xed,0xbd),
+     o3(0x8f,0xe0,0xd8),      o2(0xed,0xc1),
+          o2(0xbc,0xd6),      o2(0xed,0xc2),
+          o2(0xb5,0xb0),      o2(0xb7,0xb3),
+     o3(0x8f,0xe0,0xd9), o3(0x8f,0xe0,0xda),
+          o2(0xb8,0xae), o3(0x8f,0xe0,0xdb),
+          o2(0xed,0xc3), o3(0x8f,0xe0,0xdc),
+          o2(0xc6,0xf0),      o2(0xc5,0xbe),
+          o2(0xed,0xc4), o3(0x8f,0xe0,0xdd),
+          o2(0xed,0xc7), o3(0x8f,0xe0,0xe4),
+     o3(0x8f,0xe0,0xde), o3(0x8f,0xe0,0xdf),
+     o3(0x8f,0xe0,0xe0), o3(0x8f,0xe0,0xe1),
+          o2(0xbc,0xb4), o3(0x8f,0xe0,0xe2),
+     o3(0x8f,0xe0,0xe3),      o2(0xed,0xc6),
+          o2(0xed,0xc5),      o2(0xb7,0xda),
+          o2(0xed,0xc8),
+
+#define to_EUC_JP_E8_BB WORDINDEX2INFO(28563)
+    to_EUC_JP_E8_BB_offsets,
+    to_EUC_JP_E8_BB_infos,
+
+#define to_EUC_JP_E8_BC_infos WORDINDEX2INFO(28565)
+                INVALID, o3(0x8f,0xe0,0xe5),
+                  UNDEF, o3(0x8f,0xe0,0xe6),
+          o2(0xb3,0xd3),      o2(0xed,0xca),
+     o3(0x8f,0xe0,0xe7), o3(0x8f,0xe0,0xe8),
+          o2(0xba,0xdc),      o2(0xed,0xc9),
+          o2(0xed,0xd2), o3(0x8f,0xe0,0xe9),
+     o3(0x8f,0xe0,0xea),      o2(0xed,0xcc),
+          o2(0xed,0xce),      o2(0xca,0xe5),
+          o2(0xed,0xcb), o3(0x8f,0xe0,0xeb),
+     o3(0x8f,0xe0,0xec), o3(0x8f,0xe0,0xed),
+          o2(0xed,0xcd),      o2(0xed,0xd1),
+          o2(0xed,0xcf),      o2(0xb5,0xb1),
+     o3(0x8f,0xe0,0xee),      o2(0xed,0xd0),
+     o3(0x8f,0xe0,0xef), o3(0x8f,0xe0,0xf0),
+     o3(0x8f,0xe0,0xf1), o3(0x8f,0xe0,0xf2),
+          o2(0xed,0xd3), o3(0x8f,0xe0,0xf3),
+     o3(0x8f,0xe0,0xf4),      o2(0xc7,0xda),
+          o2(0xce,0xd8), o3(0x8f,0xe0,0xf5),
+     o3(0x8f,0xe0,0xf6), o3(0x8f,0xe0,0xf7),
+          o2(0xbd,0xb4),      o2(0xed,0xd4),
+     o3(0x8f,0xe0,0xf8), o3(0x8f,0xe0,0xf9),
+     o3(0x8f,0xe0,0xfa), o3(0x8f,0xe0,0xfb),
+          o2(0xcd,0xa2),      o2(0xed,0xd6),
+     o3(0x8f,0xe0,0xfc),      o2(0xed,0xd5),
+          o2(0xed,0xd9),      o2(0xcd,0xc1),
+
+#define to_EUC_JP_E8_BC WORDINDEX2INFO(28615)
+    to_EUC_JP_E8_BC_offsets,
+    to_EUC_JP_E8_BC_infos,
+
+#define to_EUC_JP_E8_BD_infos WORDINDEX2INFO(28617)
+                INVALID, o3(0x8f,0xe0,0xfd),
+     o3(0x8f,0xe0,0xfe),      o2(0xed,0xd8),
+     o3(0x8f,0xe1,0xa1),      o2(0xb3,0xed),
+          o2(0xed,0xd7),      o2(0xed,0xdc),
+     o3(0x8f,0xe1,0xa2),              UNDEF,
+          o2(0xed,0xdb),      o2(0xed,0xda),
+          o2(0xc5,0xb2),      o2(0xed,0xdd),
+     o3(0x8f,0xe1,0xa3), o3(0x8f,0xe1,0xa4),
+     o3(0x8f,0xe1,0xa5), o3(0x8f,0xe1,0xa6),
+     o3(0x8f,0xe1,0xa7), o3(0x8f,0xe1,0xa8),
+          o2(0xed,0xde), o3(0x8f,0xe1,0xa9),
+          o2(0xed,0xdf), o3(0x8f,0xe1,0xaa),
+     o3(0x8f,0xe1,0xab),      o2(0xb9,0xec),
+          o2(0xb7,0xa5),      o2(0xed,0xe0),
+          o2(0xed,0xe1),      o2(0xed,0xe2),
+     o3(0x8f,0xe1,0xac),
+
+#define to_EUC_JP_E8_BD WORDINDEX2INFO(28648)
+    to_EUC_JP_E8_BD_offsets,
+    to_EUC_JP_E8_BD_infos,
+
+#define to_EUC_JP_E8_BE_infos WORDINDEX2INFO(28650)
+                INVALID,              UNDEF,
+          o2(0xbf,0xc9),      o2(0xed,0xe3),
+     o3(0x8f,0xe1,0xad),      o2(0xbc,0xad),
+          o2(0xed,0xe4), o3(0x8f,0xe1,0xae),
+     o3(0x8f,0xe1,0xaf),      o2(0xed,0xe5),
+     o3(0x8f,0xe1,0xb0), o3(0x8f,0xe1,0xb1),
+     o3(0x8f,0xe1,0xb2),      o2(0xd2,0xa1),
+          o2(0xd1,0xfe),      o2(0xed,0xe6),
+          o2(0xe5,0xf0),      o2(0xed,0xe7),
+          o2(0xc3,0xa4),      o2(0xbf,0xab),
+          o2(0xc7,0xc0), o3(0x8f,0xe1,0xb3),
+     o3(0x8f,0xe1,0xb4),      o2(0xed,0xe8),
+     o3(0x8f,0xe1,0xb5),      o2(0xca,0xd5),
+          o2(0xc4,0xd4),      o2(0xb9,0xfe),
+     o3(0x8f,0xe1,0xb6),      o2(0xc3,0xa9),
+
+#define to_EUC_JP_E8_BE WORDINDEX2INFO(28680)
+    to_EUC_JP_E8_BE_offsets,
+    to_EUC_JP_E8_BE_infos,
+
+#define to_EUC_JP_E8_BF_infos WORDINDEX2INFO(28682)
+                INVALID, o3(0x8f,0xe1,0xb7),
+     o3(0x8f,0xe1,0xb8),      o2(0xb1,0xaa),
+                  UNDEF,      o2(0xcb,0xf8),
+          o2(0xbf,0xd7), o3(0x8f,0xe1,0xb9),
+     o3(0x8f,0xe1,0xba), o3(0x8f,0xe1,0xbb),
+     o3(0x8f,0xe1,0xbc),      o2(0xb7,0xde),
+     o3(0x8f,0xe1,0xbd),      o2(0xb6,0xe1),
+     o3(0x8f,0xe1,0xbe), o3(0x8f,0xe1,0xbf),
+          o2(0xca,0xd6), o3(0x8f,0xe1,0xc0),
+          o2(0xed,0xe9), o3(0x8f,0xe1,0xc1),
+          o2(0xed,0xeb), o3(0x8f,0xe1,0xc2),
+     o3(0x8f,0xe1,0xc3),      o2(0xed,0xea),
+          o2(0xb2,0xe0), o3(0x8f,0xe1,0xc4),
+          o2(0xc6,0xf6),      o2(0xed,0xec),
+          o2(0xc7,0xf7),      o2(0xc5,0xb3),
+     o3(0x8f,0xe1,0xc5),      o2(0xed,0xed),
+          o2(0xbd,0xd2), o3(0x8f,0xe1,0xc6),
+          o2(0xed,0xef), o3(0x8f,0xe1,0xc7),
+     o3(0x8f,0xe1,0xc8),      o2(0xcc,0xc2),
+          o2(0xed,0xfe),      o2(0xed,0xf1),
+          o2(0xed,0xf2), o3(0x8f,0xe1,0xc9),
+          o2(0xc4,0xc9), o3(0x8f,0xe1,0xca),
+
+#define to_EUC_JP_E8_BF WORDINDEX2INFO(28726)
+    to_EUC_JP_E8_BF_offsets,
+    to_EUC_JP_E8_BF_infos,
+
+#define to_EUC_JP_E8_infos WORDINDEX2INFO(28728)
+             INVALID, to_EUC_JP_E8_80, to_EUC_JP_E8_81, to_EUC_JP_E8_82,
+     to_EUC_JP_E8_83, to_EUC_JP_E8_84, to_EUC_JP_E8_85, to_EUC_JP_E8_86,
+     to_EUC_JP_E8_87, to_EUC_JP_E8_88, to_EUC_JP_E8_89, to_EUC_JP_E8_8A,
+     to_EUC_JP_E8_8B, to_EUC_JP_E8_8C, to_EUC_JP_E8_8D, to_EUC_JP_E8_8E,
+     to_EUC_JP_E8_8F, to_EUC_JP_E8_90, to_EUC_JP_E8_91, to_EUC_JP_E8_92,
+     to_EUC_JP_E8_93, to_EUC_JP_E8_94, to_EUC_JP_E8_95, to_EUC_JP_E8_96,
+     to_EUC_JP_E8_97, to_EUC_JP_E8_98, to_EUC_JP_E8_99, to_EUC_JP_E8_9A,
+     to_EUC_JP_E8_9B, to_EUC_JP_E8_9C, to_EUC_JP_E8_9D, to_EUC_JP_E8_9E,
+     to_EUC_JP_E8_9F, to_EUC_JP_E8_A0, to_EUC_JP_E8_A1, to_EUC_JP_E8_A2,
+     to_EUC_JP_E8_A3, to_EUC_JP_E8_A4, to_EUC_JP_E8_A5, to_EUC_JP_E8_A6,
+     to_EUC_JP_E8_A7, to_EUC_JP_E8_A8, to_EUC_JP_E8_A9, to_EUC_JP_E8_AA,
+     to_EUC_JP_E8_AB, to_EUC_JP_E8_AC, to_EUC_JP_E8_AD, to_EUC_JP_E8_AE,
+        to_EUC_JP_C6, to_EUC_JP_E8_B0, to_EUC_JP_E8_B1, to_EUC_JP_E8_B2,
+     to_EUC_JP_E8_B3, to_EUC_JP_E8_B4, to_EUC_JP_E8_B5, to_EUC_JP_E8_B6,
+     to_EUC_JP_E8_B7, to_EUC_JP_E8_B8, to_EUC_JP_E8_B9, to_EUC_JP_E8_BA,
+     to_EUC_JP_E8_BB, to_EUC_JP_E8_BC, to_EUC_JP_E8_BD, to_EUC_JP_E8_BE,
+     to_EUC_JP_E8_BF,
+
+#define to_EUC_JP_E8 WORDINDEX2INFO(28793)
+    to_EUC_JP_C3_offsets,
+    to_EUC_JP_E8_infos,
+
+#define to_EUC_JP_E9_80_infos WORDINDEX2INFO(28795)
+                INVALID,      o2(0xc2,0xe0),
+          o2(0xc1,0xf7), o3(0x8f,0xe1,0xcb),
+          o2(0xc6,0xa8), o3(0x8f,0xe1,0xcc),
+          o2(0xed,0xf0),      o2(0xb5,0xd5),
+                  UNDEF, o3(0x8f,0xe1,0xcd),
+          o2(0xed,0xf9), o3(0x8f,0xe1,0xce),
+          o2(0xed,0xf6),      o2(0xee,0xa5),
+          o2(0xc6,0xa9),      o2(0xc3,0xe0),
+          o2(0xed,0xf3),      o2(0xc4,0xfe),
+          o2(0xc5,0xd3),      o2(0xed,0xf4),
+          o2(0xed,0xf8),      o2(0xbf,0xe0),
+     o3(0x8f,0xe1,0xcf),      o2(0xc7,0xe7),
+          o2(0xc4,0xcc), o3(0x8f,0xe1,0xd0),
+          o2(0xc0,0xc2),      o2(0xed,0xf7),
+          o2(0xc2,0xae),      o2(0xc2,0xa4),
+          o2(0xed,0xf5),      o2(0xb0,0xa9),
+          o2(0xcf,0xa2),      o2(0xed,0xfa),
+     o3(0x8f,0xe1,0xd1), o3(0x8f,0xe1,0xd2),
+     o3(0x8f,0xe1,0xd4), o3(0x8f,0xe1,0xd5),
+     o3(0x8f,0xe1,0xd6),      o2(0xc2,0xe1),
+     o3(0x8f,0xe1,0xd3),      o2(0xbd,0xb5),
+          o2(0xbf,0xca), o3(0x8f,0xe1,0xd7),
+     o3(0x8f,0xe1,0xd8),      o2(0xed,0xfc),
+          o2(0xed,0xfb), o3(0x8f,0xe1,0xd9),
+          o2(0xb0,0xef),      o2(0xed,0xfd),
+          o2(0xc9,0xaf),      o2(0xee,0xa7),
+     o3(0x8f,0xe1,0xda),
+
+#define to_EUC_JP_E9_80 WORDINDEX2INFO(28848)
+    to_EUC_JP_E9_80_offsets,
+    to_EUC_JP_E9_80_infos,
+
+#define to_EUC_JP_E9_81_infos WORDINDEX2INFO(28850)
+                INVALID,              UNDEF,
+          o2(0xc6,0xdb),      o2(0xbf,0xeb),
+     o3(0x8f,0xe1,0xdb), o3(0x8f,0xe1,0xdc),
+          o2(0xc3,0xd9),      o2(0xb6,0xf8),
+          o2(0xee,0xa6),      o2(0xcd,0xb7),
+          o2(0xb1,0xbf), o3(0x8f,0xe1,0xdd),
+          o2(0xca,0xd7),      o2(0xb2,0xe1),
+          o2(0xee,0xa1),      o2(0xee,0xa2),
+          o2(0xee,0xa3),      o2(0xee,0xa4),
+          o2(0xc6,0xbb),      o2(0xc3,0xa3),
+          o2(0xb0,0xe3),      o2(0xee,0xa8),
+          o2(0xee,0xa9),      o2(0xf4,0xa3),
+     o3(0x8f,0xe1,0xde),      o2(0xc2,0xbd),
+     o3(0x8f,0xe1,0xdf),      o2(0xee,0xaa),
+          o2(0xb1,0xf3),      o2(0xc1,0xcc),
+     o3(0x8f,0xe1,0xe0),      o2(0xb8,0xaf),
+          o2(0xcd,0xda), o3(0x8f,0xe1,0xe1),
+     o3(0x8f,0xe1,0xe2),      o2(0xee,0xab),
+          o2(0xc5,0xac), o3(0x8f,0xe1,0xe3),
+          o2(0xc1,0xf8),      o2(0xbc,0xd7),
+          o2(0xee,0xac), o3(0x8f,0xe1,0xe4),
+          o2(0xee,0xaf), o3(0x8f,0xe1,0xe5),
+          o2(0xbd,0xe5),      o2(0xee,0xad),
+          o2(0xc1,0xab),      o2(0xc1,0xaa),
+     o3(0x8f,0xe1,0xe6),      o2(0xb0,0xe4),
+          o2(0xce,0xcb),      o2(0xee,0xb1),
+          o2(0xc8,0xf2),
+
+#define to_EUC_JP_E9_81 WORDINDEX2INFO(28903)
+    to_EUC_JP_E9_81_offsets,
+    to_EUC_JP_E9_81_infos,
+
+#define to_EUC_JP_E9_82_infos WORDINDEX2INFO(28905)
+                INVALID,      o2(0xee,0xb3),
+          o2(0xee,0xb2),      o2(0xee,0xb0),
+          o2(0xe3,0xe4),      o2(0xb4,0xd4),
+     o3(0x8f,0xe1,0xe7),              UNDEF,
+          o2(0xed,0xee), o3(0x8f,0xe1,0xe8),
+          o2(0xee,0xb5),      o2(0xee,0xb4),
+     o3(0x8f,0xe1,0xe9), o3(0x8f,0xe1,0xea),
+     o3(0x8f,0xe1,0xeb),      o2(0xee,0xb6),
+     o3(0x8f,0xe1,0xec),      o2(0xcd,0xb8),
+     o3(0x8f,0xe1,0xed), o3(0x8f,0xe1,0xee),
+     o3(0x8f,0xe1,0xef), o3(0x8f,0xe1,0xf0),
+     o3(0x8f,0xe1,0xf1), o3(0x8f,0xe1,0xf2),
+     o3(0x8f,0xe1,0xf3), o3(0x8f,0xe1,0xf4),
+          o2(0xc6,0xe1), o3(0x8f,0xe1,0xf5),
+          o2(0xcb,0xae),      o2(0xee,0xb7),
+          o2(0xbc,0xd9),      o2(0xee,0xb8),
+     o3(0x8f,0xe1,0xf6),      o2(0xee,0xb9),
+     o3(0x8f,0xe1,0xf7), o3(0x8f,0xe1,0xf8),
+     o3(0x8f,0xe1,0xf9),      o2(0xee,0xba),
+     o3(0x8f,0xe1,0xfa),      o2(0xc5,0xa1),
+     o3(0x8f,0xe1,0xfb), o3(0x8f,0xe1,0xfd),
+
+#define to_EUC_JP_E9_82 WORDINDEX2INFO(28947)
+    to_EUC_JP_E9_82_offsets,
+    to_EUC_JP_E9_82_infos,
+
+#define to_EUC_JP_E9_83_infos WORDINDEX2INFO(28949)
+                INVALID,              UNDEF,
+          o2(0xb0,0xea), o3(0x8f,0xe1,0xfe),
+     o3(0x8f,0xe2,0xa1), o3(0x8f,0xe2,0xa2),
+     o3(0x8f,0xe2,0xa3), o3(0x8f,0xe2,0xa4),
+          o2(0xb9,0xd9), o3(0x8f,0xe1,0xfc),
+          o2(0xcf,0xba), o3(0x8f,0xe2,0xad),
+     o3(0x8f,0xe2,0xa5), o3(0x8f,0xe2,0xa6),
+     o3(0x8f,0xe2,0xa7), o3(0x8f,0xe2,0xa8),
+          o2(0xee,0xbe), o3(0x8f,0xe2,0xa9),
+     o3(0x8f,0xe2,0xaa), o3(0x8f,0xe2,0xab),
+          o2(0xb7,0xb4),      o2(0xee,0xbb),
+          o2(0xee,0xbc), o3(0x8f,0xe2,0xac),
+          o2(0xc9,0xf4), o3(0x8f,0xe2,0xaf),
+          o2(0xb3,0xd4), o3(0x8f,0xe2,0xb0),
+     o3(0x8f,0xe2,0xb1), o3(0x8f,0xe2,0xb2),
+          o2(0xcd,0xb9), o3(0x8f,0xe2,0xae),
+          o2(0xb6,0xbf),      o2(0xc5,0xd4),
+     o3(0x8f,0xe2,0xb3), o3(0x8f,0xe2,0xb4),
+
+#define to_EUC_JP_E9_83 WORDINDEX2INFO(28985)
+    to_EUC_JP_E9_83_offsets,
+    to_EUC_JP_E9_83_infos,
+
+#define to_EUC_JP_E9_84_infos WORDINDEX2INFO(28987)
+                INVALID, o3(0x8f,0xe2,0xb5),
+                  UNDEF,      o2(0xee,0xbf),
+     o3(0x8f,0xe2,0xb6), o3(0x8f,0xe2,0xb7),
+     o3(0x8f,0xe2,0xb8), o3(0x8f,0xe2,0xb9),
+     o3(0x8f,0xe2,0xba), o3(0x8f,0xe2,0xbb),
+          o2(0xee,0xc0), o3(0x8f,0xe2,0xbc),
+     o3(0x8f,0xe2,0xbd), o3(0x8f,0xe2,0xbe),
+     o3(0x8f,0xe2,0xbf),      o2(0xee,0xc1),
+     o3(0x8f,0xe2,0xc0), o3(0x8f,0xe2,0xc1),
+     o3(0x8f,0xe2,0xc2), o3(0x8f,0xe2,0xc3),
+     o3(0x8f,0xe2,0xc5), o3(0x8f,0xe2,0xc6),
+     o3(0x8f,0xe2,0xc4), o3(0x8f,0xe2,0xc7),
+     o3(0x8f,0xe2,0xc8),      o2(0xc5,0xa2),
+     o3(0x8f,0xe2,0xc9), o3(0x8f,0xe2,0xca),
+          o2(0xee,0xc3), o3(0x8f,0xe2,0xcb),
+          o2(0xee,0xc2), o3(0x8f,0xe2,0xcc),
+     o3(0x8f,0xe2,0xcd), o3(0x8f,0xe2,0xce),
+     o3(0x8f,0xe2,0xcf), o3(0x8f,0xe2,0xd0),
+     o3(0x8f,0xe2,0xd1), o3(0x8f,0xe2,0xd2),
+
+#define to_EUC_JP_E9_84 WORDINDEX2INFO(29025)
+    to_EUC_JP_E9_84_offsets,
+    to_EUC_JP_E9_84_infos,
+
+#define to_EUC_JP_E9_85_infos WORDINDEX2INFO(29027)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe2,0xd3), o3(0x8f,0xe2,0xd4),
+     o3(0x8f,0xe2,0xd5),      o2(0xc6,0xd3),
+          o2(0xee,0xc4),      o2(0xbd,0xb6),
+          o2(0xbc,0xe0),      o2(0xc7,0xdb),
+          o2(0xc3,0xf1), o3(0x8f,0xe2,0xd6),
+          o2(0xbc,0xf2), o3(0x8f,0xe2,0xd7),
+          o2(0xbf,0xec),      o2(0xee,0xc5),
+     o3(0x8f,0xe2,0xd8),      o2(0xee,0xc6),
+     o3(0x8f,0xe2,0xd9), o3(0x8f,0xe2,0xda),
+     o3(0x8f,0xe2,0xdb), o3(0x8f,0xe2,0xdc),
+          o2(0xbf,0xdd),      o2(0xee,0xc7),
+     o3(0x8f,0xe2,0xdd),      o2(0xee,0xc8),
+     o3(0x8f,0xe2,0xde),      o2(0xee,0xc9),
+          o2(0xcd,0xef),      o2(0xbd,0xb7),
+     o3(0x8f,0xe2,0xdf),      o2(0xee,0xcb),
+          o2(0xee,0xca), o3(0x8f,0xe2,0xe0),
+          o2(0xb9,0xda),      o2(0xb9,0xf3),
+          o2(0xbb,0xc0), o3(0x8f,0xe2,0xe1),
+     o3(0x8f,0xe2,0xe2), o3(0x8f,0xe2,0xe3),
+
+#define to_EUC_JP_E9_85 WORDINDEX2INFO(29067)
+    to_EUC_JP_E9_85_offsets,
+    to_EUC_JP_E9_85_infos,
+
+#define to_EUC_JP_E9_86_infos WORDINDEX2INFO(29069)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe2,0xe4),      o2(0xee,0xce),
+     o3(0x8f,0xe2,0xe5), o3(0x8f,0xe2,0xe6),
+     o3(0x8f,0xe2,0xe7),      o2(0xbd,0xe6),
+          o2(0xee,0xcd), o3(0x8f,0xe2,0xe8),
+          o2(0xee,0xcc),      o2(0xc2,0xe9),
+     o3(0x8f,0xe2,0xe9),      o2(0xb8,0xef),
+     o3(0x8f,0xe2,0xea),      o2(0xc0,0xc3),
+     o3(0x8f,0xe2,0xeb), o3(0x8f,0xe2,0xec),
+     o3(0x8f,0xe2,0xed),      o2(0xc8,0xb0),
+     o3(0x8f,0xe2,0xee),      o2(0xbd,0xb9),
+     o3(0x8f,0xe2,0xef), o3(0x8f,0xe2,0xf0),
+          o2(0xee,0xcf),      o2(0xbe,0xdf),
+     o3(0x8f,0xe2,0xf1), o3(0x8f,0xe2,0xf2),
+          o2(0xee,0xd2),      o2(0xee,0xd0),
+     o3(0x8f,0xe2,0xf3), o3(0x8f,0xe2,0xf4),
+     o3(0x8f,0xe2,0xf5),      o2(0xee,0xd1),
+     o3(0x8f,0xe2,0xf6), o3(0x8f,0xe2,0xf7),
+     o3(0x8f,0xe2,0xf8), o3(0x8f,0xe2,0xf9),
+          o2(0xee,0xd4),      o2(0xee,0xd3),
+     o3(0x8f,0xe2,0xfa),      o2(0xbe,0xfa),
+          o2(0xee,0xd5), o3(0x8f,0xe2,0xfb),
+     o3(0x8f,0xe2,0xfc), o3(0x8f,0xe2,0xfd),
+     o3(0x8f,0xe2,0xfe),
+
+#define to_EUC_JP_E9_86 WORDINDEX2INFO(29116)
+    to_EUC_JP_E9_86_offsets,
+    to_EUC_JP_E9_86_infos,
+
+#define to_EUC_JP_E9_87_infos WORDINDEX2INFO(29118)
+                INVALID,      o2(0xee,0xd6),
+          o2(0xee,0xd7), o3(0x8f,0xe3,0xa1),
+     o3(0x8f,0xe3,0xa2),              UNDEF,
+     o3(0x8f,0xe3,0xa3),      o2(0xc8,0xd0),
+          o2(0xba,0xd3),      o2(0xbc,0xe1),
+          o2(0xee,0xd8),      o2(0xee,0xd9),
+          o2(0xce,0xa4),      o2(0xbd,0xc5),
+          o2(0xcc,0xee),      o2(0xce,0xcc),
+          o2(0xee,0xda),      o2(0xb6,0xe2),
+     o3(0x8f,0xe3,0xa4), o3(0x8f,0xe3,0xa5),
+          o2(0xee,0xdb), o3(0x8f,0xe3,0xa6),
+          o2(0xc5,0xa3), o3(0x8f,0xe3,0xa7),
+     o3(0x8f,0xe3,0xa8),      o2(0xee,0xde),
+          o2(0xb3,0xf8),      o2(0xbf,0xcb),
+     o3(0x8f,0xe3,0xa9),      o2(0xee,0xdc),
+          o2(0xee,0xdd),      o2(0xc4,0xe0),
+     o3(0x8f,0xe3,0xaa), o3(0x8f,0xe3,0xab),
+          o2(0xcb,0xd5),      o2(0xb6,0xfc),
+     o3(0x8f,0xe3,0xac), o3(0x8f,0xe3,0xad),
+     o3(0x8f,0xe3,0xae), o3(0x8f,0xe3,0xaf),
+     o3(0x8f,0xe3,0xb0), o3(0x8f,0xe3,0xb1),
+     o3(0x8f,0xe3,0xb2), o3(0x8f,0xe3,0xb3),
+          o2(0xee,0xe0),      o2(0xee,0xe1),
+     o3(0x8f,0xe3,0xb4), o3(0x8f,0xe3,0xb5),
+     o3(0x8f,0xe3,0xb6),      o2(0xee,0xdf),
+     o3(0x8f,0xe3,0xb7),      o2(0xee,0xe3),
+
+#define to_EUC_JP_E9_87 WORDINDEX2INFO(29170)
+    to_EUC_JP_E9_87_offsets,
+    to_EUC_JP_E9_87_infos,
+
+#define to_EUC_JP_E9_88_infos WORDINDEX2INFO(29172)
+                INVALID, o3(0x8f,0xe3,0xb8),
+     o3(0x8f,0xe3,0xb9),              UNDEF,
+     o3(0x8f,0xe3,0xba), o3(0x8f,0xe3,0xbb),
+     o3(0x8f,0xe3,0xbc), o3(0x8f,0xe3,0xbd),
+     o3(0x8f,0xe3,0xbe), o3(0x8f,0xe3,0xbf),
+     o3(0x8f,0xe3,0xc0),      o2(0xc6,0xdf),
+          o2(0xb3,0xc3), o3(0x8f,0xe3,0xc1),
+          o2(0xee,0xe7), o3(0x8f,0xe3,0xc2),
+     o3(0x8f,0xe3,0xc3),      o2(0xee,0xe4),
+          o2(0xee,0xe6), o3(0x8f,0xe3,0xc4),
+     o3(0x8f,0xe3,0xc5), o3(0x8f,0xe3,0xc6),
+     o3(0x8f,0xe3,0xc7),      o2(0xee,0xe2),
+     o3(0x8f,0xe3,0xc8), o3(0x8f,0xe3,0xc9),
+     o3(0x8f,0xe3,0xca), o3(0x8f,0xe3,0xcb),
+     o3(0x8f,0xe3,0xcc),      o2(0xef,0xcf),
+          o2(0xee,0xe5), o3(0x8f,0xe3,0xcd),
+     o3(0x8f,0xe3,0xce), o3(0x8f,0xe3,0xcf),
+     o3(0x8f,0xe3,0xd0),      o2(0xce,0xeb),
+     o3(0x8f,0xe3,0xd1), o3(0x8f,0xe3,0xd2),
+          o2(0xb8,0xda), o3(0x8f,0xe3,0xd3),
+     o3(0x8f,0xe3,0xd4), o3(0x8f,0xe3,0xd5),
+     o3(0x8f,0xe3,0xd6), o3(0x8f,0xe3,0xd7),
+          o2(0xee,0xef),
+
+#define to_EUC_JP_E9_88 WORDINDEX2INFO(29217)
+    to_EUC_JP_E9_88_offsets,
+    to_EUC_JP_E9_88_infos,
+
+#define to_EUC_JP_E9_89_infos WORDINDEX2INFO(29219)
+                INVALID, o3(0x8f,0xe3,0xd8),
+                  UNDEF, o3(0x8f,0xe3,0xd9),
+     o3(0x8f,0xe3,0xda),      o2(0xc5,0xb4),
+          o2(0xee,0xea), o3(0x8f,0xe3,0xdb),
+     o3(0x8f,0xe3,0xdc),      o2(0xee,0xed),
+          o2(0xee,0xeb), o3(0x8f,0xe3,0xdd),
+          o2(0xee,0xf0), o3(0x8f,0xe3,0xde),
+     o3(0x8f,0xe3,0xdf), o3(0x8f,0xe3,0xe0),
+          o2(0xee,0xf1), o3(0x8f,0xe3,0xe1),
+          o2(0xee,0xe9), o3(0x8f,0xe3,0xe2),
+     o3(0x8f,0xe3,0xe3),      o2(0xee,0xf6),
+          o2(0xb1,0xf4), o3(0x8f,0xe3,0xe4),
+     o3(0x8f,0xe3,0xe5),      o2(0xee,0xe8),
+     o3(0x8f,0xe3,0xe6), o3(0x8f,0xe3,0xe7),
+          o2(0xc8,0xad),      o2(0xee,0xec),
+     o3(0x8f,0xe3,0xe8),      o2(0xbe,0xe0),
+     o3(0x8f,0xe3,0xe9), o3(0x8f,0xe3,0xea),
+     o3(0x8f,0xe3,0xeb), o3(0x8f,0xe3,0xec),
+     o3(0x8f,0xe3,0xed), o3(0x8f,0xe3,0xee),
+          o2(0xb9,0xdb), o3(0x8f,0xe3,0xef),
+     o3(0x8f,0xe3,0xf0), o3(0x8f,0xe3,0xf1),
+     o3(0x8f,0xe3,0xf2), o3(0x8f,0xe3,0xf3),
+     o3(0x8f,0xe3,0xf4), o3(0x8f,0xe3,0xf5),
+     o3(0x8f,0xe3,0xf6),      o2(0xcb,0xc8),
+     o3(0x8f,0xe3,0xf7),
+
+#define to_EUC_JP_E9_89 WORDINDEX2INFO(29268)
+    to_EUC_JP_E9_89_offsets,
+    to_EUC_JP_E9_89_infos,
+
+#define to_EUC_JP_E9_8A_infos WORDINDEX2INFO(29270)
+                INVALID,      o2(0xb6,0xe4),
+                  UNDEF,      o2(0xbd,0xc6),
+          o2(0xc6,0xbc), o3(0x8f,0xe3,0xf8),
+     o3(0x8f,0xe3,0xf9), o3(0x8f,0xe3,0xfa),
+     o3(0x8f,0xe3,0xfb), o3(0x8f,0xe3,0xfc),
+          o2(0xc1,0xad), o3(0x8f,0xe3,0xfd),
+          o2(0xee,0xf4),      o2(0xee,0xee),
+          o2(0xee,0xf3), o3(0x8f,0xe3,0xfe),
+          o2(0xcc,0xc3), o3(0x8f,0xe4,0xa1),
+          o2(0xc4,0xb8),      o2(0xee,0xf5),
+          o2(0xee,0xf2), o3(0x8f,0xe4,0xa2),
+     o3(0x8f,0xe4,0xa3), o3(0x8f,0xe4,0xa4),
+     o3(0x8f,0xe4,0xa5), o3(0x8f,0xe4,0xa6),
+     o3(0x8f,0xe4,0xa7), o3(0x8f,0xe4,0xa8),
+          o2(0xc1,0xac), o3(0x8f,0xe4,0xa9),
+     o3(0x8f,0xe4,0xaa), o3(0x8f,0xe4,0xab),
+          o2(0xee,0xf9), o3(0x8f,0xe4,0xac),
+          o2(0xee,0xf8), o3(0x8f,0xe4,0xad),
+     o3(0x8f,0xe4,0xae), o3(0x8f,0xe4,0xaf),
+     o3(0x8f,0xe4,0xb0), o3(0x8f,0xe4,0xb1),
+
+#define to_EUC_JP_E9_8A WORDINDEX2INFO(29310)
+    to_EUC_JP_E9_8A_offsets,
+    to_EUC_JP_E9_8A_infos,
+
+#define to_EUC_JP_E9_8B_infos WORDINDEX2INFO(29312)
+                INVALID, o3(0x8f,0xe4,0xb2),
+     o3(0x8f,0xe4,0xb3), o3(0x8f,0xe4,0xb4),
+     o3(0x8f,0xe4,0xb5),              UNDEF,
+     o3(0x8f,0xe4,0xb6), o3(0x8f,0xe4,0xb7),
+     o3(0x8f,0xe4,0xb8), o3(0x8f,0xe4,0xb9),
+     o3(0x8f,0xe4,0xba), o3(0x8f,0xe4,0xbb),
+     o3(0x8f,0xe4,0xbc), o3(0x8f,0xe4,0xbd),
+          o2(0xee,0xf7), o3(0x8f,0xe4,0xbe),
+          o2(0xcb,0xaf), o3(0x8f,0xe4,0xbf),
+     o3(0x8f,0xe4,0xc0), o3(0x8f,0xe4,0xc1),
+     o3(0x8f,0xe4,0xc2), o3(0x8f,0xe4,0xc3),
+     o3(0x8f,0xe4,0xc4), o3(0x8f,0xe4,0xc5),
+     o3(0x8f,0xe4,0xc6), o3(0x8f,0xe4,0xc7),
+     o3(0x8f,0xe4,0xc8), o3(0x8f,0xe4,0xc9),
+          o2(0xbd,0xfb), o3(0x8f,0xe4,0xca),
+     o3(0x8f,0xe4,0xcb), o3(0x8f,0xe4,0xcc),
+          o2(0xee,0xfa),      o2(0xca,0xdf),
+     o3(0x8f,0xe4,0xcd),      o2(0xb1,0xd4),
+     o3(0x8f,0xe4,0xce), o3(0x8f,0xe4,0xcf),
+          o2(0xc9,0xc6),      o2(0xc3,0xf2),
+          o2(0xb5,0xf8), o3(0x8f,0xe4,0xd0),
+          o2(0xee,0xfc), o3(0x8f,0xe4,0xd1),
+          o2(0xb9,0xdd), o3(0x8f,0xe4,0xd2),
+
+#define to_EUC_JP_E9_8B WORDINDEX2INFO(29358)
+    to_EUC_JP_E9_8B_offsets,
+    to_EUC_JP_E9_8B_infos,
+
+#define to_EUC_JP_E9_8C_infos WORDINDEX2INFO(29360)
+                INVALID, o3(0x8f,0xe4,0xd3),
+                  UNDEF, o3(0x8f,0xe4,0xd4),
+          o2(0xbb,0xac), o3(0x8f,0xe4,0xd5),
+     o3(0x8f,0xe4,0xd6),      o2(0xee,0xfb),
+          o2(0xbf,0xed), o3(0x8f,0xe4,0xd7),
+     o3(0x8f,0xe4,0xd8), o3(0x8f,0xe4,0xd9),
+          o2(0xbf,0xee),      o2(0xef,0xa1),
+          o2(0xef,0xa3), o3(0x8f,0xe4,0xda),
+     o3(0x8f,0xe4,0xdb), o3(0x8f,0xe4,0xdc),
+     o3(0x8f,0xe4,0xdd),      o2(0xbe,0xfb),
+     o3(0x8f,0xe4,0xde),      o2(0xef,0xa2),
+          o2(0xef,0xa4), o3(0x8f,0xe4,0xdf),
+     o3(0x8f,0xe4,0xe0),      o2(0xb6,0xd3),
+     o3(0x8f,0xe4,0xe1),      o2(0xc9,0xc5),
+     o3(0x8f,0xe4,0xe2), o3(0x8f,0xe4,0xe3),
+          o2(0xbc,0xe2),      o2(0xcf,0xa3),
+          o2(0xee,0xfe),      o2(0xba,0xf8),
+          o2(0xcf,0xbf), o3(0x8f,0xe4,0xe4),
+     o3(0x8f,0xe4,0xe5),      o2(0xef,0xa6),
+     o3(0x8f,0xe4,0xe6), o3(0x8f,0xe4,0xe7),
+          o2(0xef,0xa5),      o2(0xef,0xa7),
+
+#define to_EUC_JP_E9_8C WORDINDEX2INFO(29402)
+    to_EUC_JP_E9_8C_offsets,
+    to_EUC_JP_E9_8C_infos,
+
+#define to_EUC_JP_E9_8D_infos WORDINDEX2INFO(29404)
+                INVALID,              UNDEF,
+          o2(0xee,0xfd), o3(0x8f,0xe4,0xe8),
+     o3(0x8f,0xe4,0xe9), o3(0x8f,0xe4,0xea),
+          o2(0xc6,0xe9),      o2(0xc5,0xd5),
+     o3(0x8f,0xe4,0xeb), o3(0x8f,0xe4,0xec),
+     o3(0x8f,0xe4,0xed),      o2(0xc4,0xd7),
+     o3(0x8f,0xe4,0xee),      o2(0xef,0xac),
+     o3(0x8f,0xe4,0xef), o3(0x8f,0xe4,0xf0),
+     o3(0x8f,0xe4,0xf1),      o2(0xc3,0xc3),
+          o2(0xef,0xa8), o3(0x8f,0xe4,0xf2),
+          o2(0xef,0xa9), o3(0x8f,0xe4,0xf3),
+     o3(0x8f,0xe4,0xf4), o3(0x8f,0xe4,0xf5),
+     o3(0x8f,0xe4,0xf6), o3(0x8f,0xe4,0xf7),
+          o2(0xb7,0xad), o3(0x8f,0xe4,0xf8),
+          o2(0xef,0xab), o3(0x8f,0xe4,0xf9),
+     o3(0x8f,0xe4,0xfa), o3(0x8f,0xe4,0xfb),
+     o3(0x8f,0xe4,0xfc), o3(0x8f,0xe4,0xfd),
+          o2(0xb8,0xb0), o3(0x8f,0xe4,0xfe),
+     o3(0x8f,0xe5,0xa1),      o2(0xef,0xaa),
+     o3(0x8f,0xe5,0xa2),      o2(0xbe,0xe1),
+     o3(0x8f,0xe5,0xa3),
+
+#define to_EUC_JP_E9_8D WORDINDEX2INFO(29445)
+    to_EUC_JP_E9_8D_offsets,
+    to_EUC_JP_E9_8D_infos,
+
+#define to_EUC_JP_E9_8E_infos WORDINDEX2INFO(29447)
+                INVALID, o3(0x8f,0xe5,0xa4),
+     o3(0x8f,0xe5,0xa5), o3(0x8f,0xe5,0xa6),
+                  UNDEF, o3(0x8f,0xe5,0xa7),
+     o3(0x8f,0xe5,0xa8), o3(0x8f,0xe5,0xa9),
+          o2(0xb3,0xf9), o3(0x8f,0xe5,0xaa),
+     o3(0x8f,0xe5,0xab), o3(0x8f,0xe5,0xac),
+          o2(0xef,0xb0), o3(0x8f,0xe5,0xad),
+          o2(0xba,0xbf),      o2(0xc1,0xf9),
+     o3(0x8f,0xe5,0xae),      o2(0xc4,0xca),
+     o3(0x8f,0xe5,0xaf), o3(0x8f,0xe5,0xb0),
+     o3(0x8f,0xe5,0xb1), o3(0x8f,0xe5,0xb2),
+     o3(0x8f,0xe5,0xb3), o3(0x8f,0xe5,0xb4),
+          o2(0xb3,0xbb), o3(0x8f,0xe5,0xb5),
+     o3(0x8f,0xe5,0xbb), o3(0x8f,0xe5,0xb6),
+          o2(0xef,0xae),      o2(0xef,0xaf),
+          o2(0xc4,0xc3),      o2(0xef,0xad),
+     o3(0x8f,0xe5,0xb7), o3(0x8f,0xe5,0xb8),
+     o3(0x8f,0xe5,0xb9),      o2(0xef,0xb1),
+     o3(0x8f,0xe5,0xba),
+
+#define to_EUC_JP_E9_8E WORDINDEX2INFO(29484)
+    to_EUC_JP_E9_8E_offsets,
+    to_EUC_JP_E9_8E_infos,
+
+#define to_EUC_JP_E9_8F_infos WORDINDEX2INFO(29486)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe5,0xbc),      o2(0xef,0xb7),
+     o3(0x8f,0xe5,0xbd), o3(0x8f,0xe5,0xbe),
+     o3(0x8f,0xe5,0xbf), o3(0x8f,0xe5,0xc0),
+          o2(0xef,0xba), o3(0x8f,0xe5,0xc1),
+     o3(0x8f,0xe5,0xc2), o3(0x8f,0xe5,0xc3),
+     o3(0x8f,0xe5,0xc4), o3(0x8f,0xe5,0xc5),
+          o2(0xef,0xb9),      o2(0xc5,0xad),
+     o3(0x8f,0xe5,0xc6),      o2(0xef,0xb2),
+          o2(0xef,0xb3),      o2(0xef,0xb6),
+     o3(0x8f,0xe5,0xc7), o3(0x8f,0xe5,0xc8),
+          o2(0xef,0xb8), o3(0x8f,0xe5,0xc9),
+     o3(0x8f,0xe5,0xca),      o2(0xb6,0xc0),
+     o3(0x8f,0xe5,0xcb),      o2(0xef,0xbb),
+          o2(0xef,0xb5), o3(0x8f,0xe5,0xcc),
+     o3(0x8f,0xe5,0xcd),      o2(0xef,0xb4),
+     o3(0x8f,0xe5,0xcf), o3(0x8f,0xe5,0xd0),
+     o3(0x8f,0xe5,0xce), o3(0x8f,0xe5,0xd1),
+     o3(0x8f,0xe5,0xd2), o3(0x8f,0xe5,0xd3),
+
+#define to_EUC_JP_E9_8F WORDINDEX2INFO(29524)
+    to_EUC_JP_E9_8F_offsets,
+    to_EUC_JP_E9_8F_infos,
+
+#define to_EUC_JP_E9_90_infos WORDINDEX2INFO(29526)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe5,0xd4), o3(0x8f,0xe5,0xd5),
+          o2(0xef,0xbf), o3(0x8f,0xe5,0xd6),
+          o2(0xef,0xc0), o3(0x8f,0xe5,0xd7),
+     o3(0x8f,0xe5,0xd8), o3(0x8f,0xe5,0xd9),
+     o3(0x8f,0xe5,0xda), o3(0x8f,0xe5,0xdb),
+          o2(0xef,0xc1),      o2(0xef,0xbe),
+          o2(0xef,0xbd), o3(0x8f,0xe5,0xdc),
+     o3(0x8f,0xe5,0xdd), o3(0x8f,0xe5,0xde),
+          o2(0xbe,0xe2),      o2(0xc6,0xaa),
+          o2(0xef,0xbc), o3(0x8f,0xe5,0xdf),
+          o2(0xef,0xc5),      o2(0xef,0xc3),
+     o3(0x8f,0xe5,0xe0), o3(0x8f,0xe5,0xe1),
+     o3(0x8f,0xe5,0xe2), o3(0x8f,0xe5,0xe3),
+     o3(0x8f,0xe5,0xe4), o3(0x8f,0xe5,0xe5),
+          o2(0xef,0xc4),      o2(0xef,0xc2),
+          o2(0xc2,0xf8),      o2(0xef,0xc6),
+     o3(0x8f,0xe5,0xe6), o3(0x8f,0xe5,0xe8),
+     o3(0x8f,0xe5,0xe7),
+
+#define to_EUC_JP_E9_90 WORDINDEX2INFO(29563)
+    to_EUC_JP_E9_90_offsets,
+    to_EUC_JP_E9_90_infos,
+
+#define to_EUC_JP_E9_91_infos WORDINDEX2INFO(29565)
+                INVALID,              UNDEF,
+          o2(0xef,0xc7), o3(0x8f,0xe5,0xe9),
+          o2(0xef,0xc9), o3(0x8f,0xe5,0xea),
+     o3(0x8f,0xe5,0xeb), o3(0x8f,0xe5,0xec),
+     o3(0x8f,0xe5,0xed),      o2(0xb4,0xd5),
+          o2(0xef,0xc8),      o2(0xcc,0xfa),
+     o3(0x8f,0xe5,0xee), o3(0x8f,0xe5,0xef),
+          o2(0xef,0xd4),      o2(0xef,0xca),
+     o3(0x8f,0xe5,0xf0),      o2(0xef,0xcd),
+     o3(0x8f,0xe5,0xf1),      o2(0xef,0xcb),
+     o3(0x8f,0xe5,0xf2),      o2(0xef,0xcc),
+     o3(0x8f,0xe5,0xf3), o3(0x8f,0xe5,0xf4),
+          o2(0xef,0xce), o3(0x8f,0xe5,0xf5),
+     o3(0x8f,0xe5,0xf6), o3(0x8f,0xe5,0xf7),
+     o3(0x8f,0xe5,0xf8),      o2(0xef,0xd0),
+     o3(0x8f,0xe5,0xf9), o3(0x8f,0xe5,0xfa),
+          o2(0xef,0xd1),      o2(0xef,0xd2),
+          o2(0xef,0xd5),      o2(0xef,0xd3),
+          o2(0xef,0xd6),      o2(0xef,0xd8),
+
+#define to_EUC_JP_E9_91 WORDINDEX2INFO(29603)
+    to_EUC_JP_E9_91_offsets,
+    to_EUC_JP_E9_91_infos,
+
+#define to_EUC_JP_E9_92_infos WORDINDEX2INFO(29605)
+                INVALID,              UNDEF,
+          o2(0xef,0xd7), o3(0x8f,0xe5,0xfc),
+     o3(0x8f,0xe5,0xfb),
+
+#define to_EUC_JP_E9_92 WORDINDEX2INFO(29610)
+    to_EUC_JP_E9_92_offsets,
+    to_EUC_JP_E9_92_infos,
+
+#define to_EUC_JP_E9_95_infos WORDINDEX2INFO(29612)
+                INVALID,              UNDEF,
+          o2(0xc4,0xb9), o3(0x8f,0xe5,0xfd),
+     o3(0x8f,0xe5,0xfe), o3(0x8f,0xe6,0xa1),
+
+#define to_EUC_JP_E9_95 WORDINDEX2INFO(29618)
+    to_EUC_JP_E9_95_offsets,
+    to_EUC_JP_E9_95_infos,
+
+#define to_EUC_JP_E9_96_infos WORDINDEX2INFO(29620)
+                INVALID,      o2(0xcc,0xe7),
+                  UNDEF,      o2(0xef,0xd9),
+          o2(0xc1,0xae), o3(0x8f,0xe6,0xa2),
+          o2(0xef,0xda), o3(0x8f,0xe6,0xa3),
+          o2(0xca,0xc4),      o2(0xef,0xdb),
+          o2(0xb3,0xab), o3(0x8f,0xe6,0xa4),
+     o3(0x8f,0xe6,0xa5), o3(0x8f,0xe6,0xa6),
+          o2(0xb1,0xbc),      o2(0xb4,0xd7),
+          o2(0xb4,0xd6),      o2(0xef,0xdc),
+          o2(0xef,0xdd),      o2(0xef,0xde),
+          o2(0xef,0xdf), o3(0x8f,0xe6,0xa7),
+     o3(0x8f,0xe6,0xa8), o3(0x8f,0xe6,0xa9),
+          o2(0xef,0xe0), o3(0x8f,0xe6,0xaa),
+          o2(0xb4,0xd8),      o2(0xb3,0xd5),
+          o2(0xb9,0xde),      o2(0xc8,0xb6),
+     o3(0x8f,0xe6,0xab),      o2(0xef,0xe2),
+          o2(0xef,0xe1), o3(0x8f,0xe6,0xac),
+     o3(0x8f,0xe6,0xad), o3(0x8f,0xe6,0xae),
+          o2(0xef,0xe3),      o2(0xb1,0xdc),
+     o3(0x8f,0xe6,0xaf), o3(0x8f,0xe6,0xb0),
+          o2(0xef,0xe6), o3(0x8f,0xe6,0xb1),
+          o2(0xef,0xe5),      o2(0xef,0xe4),
+     o3(0x8f,0xe6,0xb2),      o2(0xef,0xe7),
+     o3(0x8f,0xe6,0xb3),
+
+#define to_EUC_JP_E9_96 WORDINDEX2INFO(29667)
+    to_EUC_JP_E9_96_offsets,
+    to_EUC_JP_E9_96_infos,
+
+#define to_EUC_JP_E9_97_infos WORDINDEX2INFO(29669)
+                INVALID,              UNDEF,
+          o2(0xef,0xea), o3(0x8f,0xe6,0xb4),
+          o2(0xb0,0xc7), o3(0x8f,0xe6,0xb5),
+     o3(0x8f,0xe6,0xb6),      o2(0xef,0xe8),
+     o3(0x8f,0xe6,0xb7),      o2(0xef,0xec),
+          o2(0xef,0xeb), o3(0x8f,0xe6,0xb8),
+     o3(0x8f,0xe6,0xb9), o3(0x8f,0xe6,0xba),
+     o3(0x8f,0xe6,0xbb),      o2(0xef,0xee),
+          o2(0xef,0xed),      o2(0xef,0xef),
+          o2(0xc6,0xae), o3(0x8f,0xe6,0xbc),
+     o3(0x8f,0xe6,0xbd),      o2(0xef,0xf0),
+     o3(0x8f,0xe6,0xbe), o3(0x8f,0xe6,0xbf),
+     o3(0x8f,0xe6,0xc0), o3(0x8f,0xe6,0xc1),
+          o2(0xef,0xf1),      o2(0xef,0xf3),
+     o3(0x8f,0xe6,0xc2),      o2(0xef,0xf2),
+     o3(0x8f,0xe6,0xc3),
+
+#define to_EUC_JP_E9_97 WORDINDEX2INFO(29700)
+    to_EUC_JP_E9_97_offsets,
+    to_EUC_JP_E9_97_infos,
+
+#define to_EUC_JP_E9_98_infos WORDINDEX2INFO(29702)
+                INVALID,              UNDEF,
+          o2(0xc9,0xec), o3(0x8f,0xe6,0xc4),
+     o3(0x8f,0xe6,0xc5),      o2(0xef,0xf4),
+     o3(0x8f,0xe6,0xc6), o3(0x8f,0xe6,0xc7),
+     o3(0x8f,0xe6,0xc8), o3(0x8f,0xe6,0xc9),
+          o2(0xef,0xf5),      o2(0xba,0xe5),
+     o3(0x8f,0xe6,0xca),      o2(0xef,0xf6),
+          o2(0xef,0xf7), o3(0x8f,0xe6,0xcb),
+          o2(0xcb,0xc9), o3(0x8f,0xe6,0xcc),
+     o3(0x8f,0xe6,0xcd), o3(0x8f,0xe6,0xce),
+     o3(0x8f,0xe6,0xcf), o3(0x8f,0xe6,0xd0),
+          o2(0xc1,0xcb), o3(0x8f,0xe6,0xd1),
+     o3(0x8f,0xe6,0xd2),      o2(0xb0,0xa4),
+
+#define to_EUC_JP_E9_98 WORDINDEX2INFO(29728)
+    to_EUC_JP_E9_98_offsets,
+    to_EUC_JP_E9_98_infos,
+
+#define to_EUC_JP_E9_99_infos WORDINDEX2INFO(29730)
+                INVALID,      o2(0xc2,0xcb),
+     o3(0x8f,0xe6,0xd3),      o2(0xef,0xf8),
+                  UNDEF,      o2(0xc9,0xed),
+          o2(0xef,0xfb),      o2(0xef,0xf9),
+          o2(0xb9,0xdf),      o2(0xef,0xfa),
+          o2(0xb8,0xc2), o3(0x8f,0xe6,0xd4),
+     o3(0x8f,0xe6,0xd5), o3(0x8f,0xe6,0xd6),
+     o3(0x8f,0xe6,0xd7), o3(0x8f,0xe6,0xd8),
+          o2(0xca,0xc5),      o2(0xef,0xfd),
+          o2(0xf0,0xa1),      o2(0xef,0xfe),
+          o2(0xf0,0xa2), o3(0x8f,0xe6,0xd9),
+          o2(0xb1,0xa1),      o2(0xbf,0xd8),
+          o2(0xbd,0xfc),      o2(0xb4,0xd9),
+          o2(0xf0,0xa3),      o2(0xc7,0xe6),
+          o2(0xf0,0xa5), o3(0x8f,0xe6,0xda),
+          o2(0xb1,0xa2),      o2(0xf0,0xa4),
+          o2(0xc4,0xc4), o3(0x8f,0xe6,0xdb),
+          o2(0xce,0xcd),      o2(0xc6,0xab),
+          o2(0xef,0xfc),      o2(0xce,0xa6),
+          o2(0xb8,0xb1), o3(0x8f,0xe6,0xdc),
+     o3(0x8f,0xe6,0xdd),      o2(0xcd,0xdb),
+     o3(0x8f,0xe6,0xde), o3(0x8f,0xe6,0xdf),
+
+#define to_EUC_JP_E9_99 WORDINDEX2INFO(29774)
+    to_EUC_JP_E9_99_offsets,
+    to_EUC_JP_E9_99_infos,
+
+#define to_EUC_JP_E9_9A_infos WORDINDEX2INFO(29776)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe6,0xe0), o3(0x8f,0xe6,0xe1),
+     o3(0x8f,0xe6,0xe2), o3(0x8f,0xe6,0xe3),
+          o2(0xb6,0xf9),      o2(0xce,0xb4),
+          o2(0xb7,0xa8), o3(0x8f,0xe6,0xe4),
+          o2(0xc2,0xe2),      o2(0xe7,0xa1),
+          o2(0xf0,0xa6),      o2(0xb3,0xac),
+          o2(0xbf,0xef), o3(0x8f,0xe6,0xe5),
+          o2(0xb3,0xd6),      o2(0xf0,0xa8),
+     o3(0x8f,0xe6,0xe6),      o2(0xf0,0xa9),
+          o2(0xf0,0xa7),      o2(0xb7,0xe4),
+     o3(0x8f,0xe6,0xe7),      o2(0xba,0xdd),
+          o2(0xbe,0xe3), o3(0x8f,0xe6,0xe8),
+     o3(0x8f,0xe6,0xe9),      o2(0xb1,0xa3),
+          o2(0xce,0xd9), o3(0x8f,0xe6,0xea),
+     o3(0x8f,0xe6,0xeb), o3(0x8f,0xe6,0xec),
+          o2(0xf0,0xab),      o2(0xee,0xae),
+     o3(0x8f,0xe6,0xed),      o2(0xf0,0xaa),
+     o3(0x8f,0xe6,0xee), o3(0x8f,0xe6,0xef),
+          o2(0xf0,0xae),      o2(0xf0,0xac),
+          o2(0xf0,0xad), o3(0x8f,0xe6,0xf0),
+          o2(0xf0,0xaf),      o2(0xf0,0xb0),
+          o2(0xce,0xec),      o2(0xf0,0xb1),
+          o2(0xf0,0xb2), o3(0x8f,0xe6,0xf1),
+          o2(0xc0,0xc9),      o2(0xc8,0xbb),
+
+#define to_EUC_JP_E9_9A WORDINDEX2INFO(29826)
+    to_EUC_JP_E9_9A_offsets,
+    to_EUC_JP_E9_9A_infos,
+
+#define to_EUC_JP_E9_9B_infos WORDINDEX2INFO(29828)
+                INVALID,      o2(0xbf,0xfd),
+          o2(0xb4,0xe7),              UNDEF,
+          o2(0xcd,0xba),      o2(0xb2,0xed),
+          o2(0xbd,0xb8),      o2(0xb8,0xdb),
+          o2(0xf0,0xb5), o3(0x8f,0xe6,0xf2),
+          o2(0xf0,0xb4),      o2(0xbb,0xf3),
+          o2(0xf0,0xb6),      o2(0xf0,0xb3),
+          o2(0xbb,0xa8), o3(0x8f,0xe6,0xf3),
+          o2(0xf0,0xba),      o2(0xea,0xad),
+     o3(0x8f,0xe6,0xf5),      o2(0xd2,0xd6),
+     o3(0x8f,0xe6,0xf6),      o2(0xbf,0xf7),
+          o2(0xf0,0xb8), o3(0x8f,0xe6,0xf7),
+     o3(0x8f,0xe6,0xf8), o3(0x8f,0xe6,0xf9),
+          o2(0xce,0xa5),      o2(0xc6,0xf1),
+          o2(0xb1,0xab), o3(0x8f,0xe6,0xfa),
+          o2(0xc0,0xe3),      o2(0xbc,0xb6),
+     o3(0x8f,0xe6,0xfb),      o2(0xca,0xb7),
+     o3(0x8f,0xe6,0xfc),      o2(0xb1,0xc0),
+          o2(0xce,0xed),      o2(0xcd,0xeb),
+          o2(0xf0,0xbb), o3(0x8f,0xe6,0xfd),
+          o2(0xc5,0xc5),
+
+#define to_EUC_JP_E9_9B WORDINDEX2INFO(29869)
+    to_EUC_JP_E9_9B_offsets,
+    to_EUC_JP_E9_9B_infos,
+
+#define to_EUC_JP_E9_9C_infos WORDINDEX2INFO(29871)
+                INVALID,      o2(0xbc,0xfb),
+                  UNDEF, o3(0x8f,0xe6,0xfe),
+     o3(0x8f,0xe7,0xa1),      o2(0xf0,0xbc),
+     o3(0x8f,0xe7,0xa2),      o2(0xf0,0xbd),
+          o2(0xbf,0xcc),      o2(0xf0,0xbe),
+     o3(0x8f,0xe7,0xa3),      o2(0xce,0xee),
+          o2(0xf0,0xb9),      o2(0xf0,0xc0),
+          o2(0xf0,0xc2),      o2(0xf0,0xc1),
+          o2(0xf0,0xbf),      o2(0xf0,0xc3),
+          o2(0xf0,0xc4), o3(0x8f,0xe7,0xa4),
+     o3(0x8f,0xe7,0xa5),      o2(0xc1,0xfa),
+     o3(0x8f,0xe7,0xa6),      o2(0xb2,0xe2),
+     o3(0x8f,0xe7,0xa7), o3(0x8f,0xe7,0xa8),
+     o3(0x8f,0xe7,0xa9),      o2(0xf0,0xc5),
+          o2(0xcc,0xb8), o3(0x8f,0xe7,0xaa),
+          o2(0xf0,0xc6),      o2(0xf0,0xc7),
+     o3(0x8f,0xe7,0xab),      o2(0xcf,0xaa),
+     o3(0x8f,0xe7,0xac),      o2(0xdb,0xb1),
+          o2(0xf0,0xc8),      o2(0xf0,0xc9),
+          o2(0xf0,0xca),
+
+#define to_EUC_JP_E9_9C WORDINDEX2INFO(29910)
+    to_EUC_JP_E9_9C_offsets,
+    to_EUC_JP_E9_9C_infos,
+
+#define to_EUC_JP_E9_9D_infos WORDINDEX2INFO(29912)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe7,0xad),      o2(0xf0,0xce),
+     o3(0x8f,0xe7,0xae),      o2(0xf0,0xcb),
+          o2(0xf0,0xcc),      o2(0xf0,0xcd),
+          o2(0xf0,0xcf), o3(0x8f,0xe7,0xaf),
+     o3(0x8f,0xe7,0xb0), o3(0x8f,0xe7,0xb1),
+          o2(0xc0,0xc4), o3(0x8f,0xe7,0xb2),
+          o2(0xcc,0xf7), o3(0x8f,0xe7,0xb3),
+     o3(0x8f,0xe7,0xb4),      o2(0xc0,0xc5),
+     o3(0x8f,0xe7,0xb5), o3(0x8f,0xe7,0xb6),
+          o2(0xf0,0xd0),      o2(0xc8,0xf3),
+          o2(0xf0,0xd1),      o2(0xf3,0xd3),
+          o2(0xcc,0xcc), o3(0x8f,0xe7,0xb7),
+          o2(0xf0,0xd2),      o2(0xf0,0xd3),
+     o3(0x8f,0xe7,0xb8),      o2(0xf0,0xd4),
+          o2(0xb3,0xd7), o3(0x8f,0xe7,0xb9),
+          o2(0xf0,0xd6),      o2(0xbf,0xd9),
+     o3(0x8f,0xe7,0xba),      o2(0xf0,0xd7),
+     o3(0x8f,0xe7,0xbb),      o2(0xb7,0xa4),
+     o3(0x8f,0xe7,0xbc), o3(0x8f,0xe7,0xbd),
+     o3(0x8f,0xe7,0xbe),      o2(0xf0,0xd8),
+          o2(0xf0,0xdc), o3(0x8f,0xe7,0xbf),
+          o2(0xf0,0xda), o3(0x8f,0xe7,0xc0),
+     o3(0x8f,0xe7,0xc1),
+
+#define to_EUC_JP_E9_9D WORDINDEX2INFO(29959)
+    to_EUC_JP_E9_9D_offsets,
+    to_EUC_JP_E9_9D_infos,
+
+#define to_EUC_JP_E9_9E_infos WORDINDEX2INFO(29961)
+                INVALID, o3(0x8f,0xe7,0xc2),
+          o2(0xf0,0xdb),              UNDEF,
+          o2(0xb3,0xf3),      o2(0xf0,0xd9),
+          o2(0xf0,0xdd), o3(0x8f,0xe7,0xc3),
+          o2(0xf0,0xde),      o2(0xb0,0xc8),
+          o2(0xf0,0xdf),      o2(0xf0,0xe0),
+     o3(0x8f,0xe7,0xc4), o3(0x8f,0xe7,0xc5),
+     o3(0x8f,0xe7,0xc6),      o2(0xbe,0xe4),
+     o3(0x8f,0xe7,0xc7), o3(0x8f,0xe7,0xc8),
+          o2(0xf0,0xe1), o3(0x8f,0xe7,0xc9),
+     o3(0x8f,0xe7,0xca),      o2(0xb5,0xc7),
+     o3(0x8f,0xe7,0xcb),      o2(0xf0,0xe4),
+          o2(0xf0,0xe3),      o2(0xf0,0xe2),
+          o2(0xeb,0xf1), o3(0x8f,0xe7,0xcc),
+          o2(0xca,0xdc), o3(0x8f,0xe7,0xcd),
+     o3(0x8f,0xe7,0xce), o3(0x8f,0xe7,0xcf),
+          o2(0xf0,0xe5),      o2(0xf0,0xe6),
+     o3(0x8f,0xe7,0xd0), o3(0x8f,0xe7,0xd1),
+     o3(0x8f,0xe7,0xd2), o3(0x8f,0xe7,0xd3),
+     o3(0x8f,0xe7,0xd4), o3(0x8f,0xe7,0xd5),
+     o3(0x8f,0xe7,0xd6), o3(0x8f,0xe7,0xd7),
+
+#define to_EUC_JP_E9_9E WORDINDEX2INFO(30003)
+    to_EUC_JP_E9_9E_offsets,
+    to_EUC_JP_E9_9E_infos,
+
+#define to_EUC_JP_E9_9F_infos WORDINDEX2INFO(30005)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe7,0xd8),      o2(0xf0,0xe7),
+     o3(0x8f,0xe7,0xd9), o3(0x8f,0xe7,0xda),
+          o2(0xf0,0xe8), o3(0x8f,0xe7,0xdb),
+          o2(0xf0,0xe9), o3(0x8f,0xe7,0xdc),
+     o3(0x8f,0xe7,0xdd),      o2(0xf0,0xea),
+     o3(0x8f,0xe7,0xde), o3(0x8f,0xe7,0xdf),
+     o3(0x8f,0xe7,0xe0), o3(0x8f,0xe7,0xe1),
+     o3(0x8f,0xe7,0xe2),      o2(0xb4,0xda),
+     o3(0x8f,0xe7,0xe3), o3(0x8f,0xe7,0xe4),
+     o3(0x8f,0xe7,0xe5), o3(0x8f,0xe7,0xe6),
+     o3(0x8f,0xe7,0xea),      o2(0xf0,0xeb),
+     o3(0x8f,0xe7,0xe7), o3(0x8f,0xe7,0xe8),
+     o3(0x8f,0xe7,0xe9), o3(0x8f,0xe7,0xeb),
+     o3(0x8f,0xe7,0xec),      o2(0xf0,0xec),
+          o2(0xc7,0xa3), o3(0x8f,0xe7,0xed),
+     o3(0x8f,0xe7,0xee),      o2(0xf0,0xee),
+          o2(0xb2,0xbb), o3(0x8f,0xe7,0xef),
+          o2(0xf0,0xf1),      o2(0xf0,0xf0),
+     o3(0x8f,0xe7,0xf0), o3(0x8f,0xe7,0xf1),
+     o3(0x8f,0xe7,0xf2),      o2(0xb1,0xa4),
+          o2(0xb6,0xc1),
+
+#define to_EUC_JP_E9_9F WORDINDEX2INFO(30048)
+    to_EUC_JP_E9_9F_offsets,
+    to_EUC_JP_E9_9F_infos,
+
+#define to_EUC_JP_E9_A0_infos WORDINDEX2INFO(30050)
+                INVALID,              UNDEF,
+          o2(0xca,0xc7),      o2(0xc4,0xba),
+          o2(0xba,0xa2),      o2(0xb9,0xe0),
+          o2(0xbd,0xe7), o3(0x8f,0xe7,0xf3),
+          o2(0xbf,0xdc), o3(0x8f,0xe7,0xf4),
+          o2(0xf0,0xf3), o3(0x8f,0xe7,0xf6),
+     o3(0x8f,0xe7,0xf7),      o2(0xf0,0xf2),
+          o2(0xcd,0xc2),      o2(0xb4,0xe8),
+          o2(0xc8,0xd2),      o2(0xc6,0xdc),
+     o3(0x8f,0xe7,0xf8), o3(0x8f,0xe7,0xf9),
+          o2(0xbf,0xfc),      o2(0xce,0xce),
+     o3(0x8f,0xe7,0xf5),      o2(0xb7,0xdb),
+     o3(0x8f,0xe7,0xfa), o3(0x8f,0xe7,0xfb),
+     o3(0x8f,0xe7,0xfc),      o2(0xf0,0xf6),
+     o3(0x8f,0xe7,0xfd),      o2(0xf0,0xf5),
+     o3(0x8f,0xe8,0xa8), o3(0x8f,0xe7,0xfe),
+     o3(0x8f,0xe8,0xa1),      o2(0xcb,0xcb),
+          o2(0xc6,0xac), o3(0x8f,0xe8,0xa2),
+     o3(0x8f,0xe8,0xa3), o3(0x8f,0xe8,0xa4),
+     o3(0x8f,0xe8,0xa5), o3(0x8f,0xe8,0xa6),
+          o2(0xb1,0xd0), o3(0x8f,0xe8,0xa7),
+          o2(0xf0,0xf7),      o2(0xf0,0xf4),
+          o2(0xc9,0xd1),      o2(0xcd,0xea),
+          o2(0xf0,0xf8), o3(0x8f,0xe8,0xa9),
+
+#define to_EUC_JP_E9_A0 WORDINDEX2INFO(30098)
+    to_EUC_JP_E9_A0_offsets,
+    to_EUC_JP_E9_A0_infos,
+
+#define to_EUC_JP_E9_A1_infos WORDINDEX2INFO(30100)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe8,0xaa),      o2(0xf0,0xf9),
+     o3(0x8f,0xe8,0xab), o3(0x8f,0xe8,0xac),
+          o2(0xf0,0xfb),      o2(0xc2,0xea),
+          o2(0xb3,0xdb),      o2(0xb3,0xdc),
+          o2(0xf0,0xfa), o3(0x8f,0xe8,0xad),
+     o3(0x8f,0xe8,0xae), o3(0x8f,0xe8,0xaf),
+          o2(0xb4,0xe9),      o2(0xb8,0xb2),
+     o3(0x8f,0xe8,0xb0), o3(0x8f,0xe8,0xb1),
+          o2(0xb4,0xea), o3(0x8f,0xe8,0xb2),
+     o3(0x8f,0xe8,0xb3),      o2(0xc5,0xbf),
+          o2(0xce,0xe0), o3(0x8f,0xe8,0xb4),
+     o3(0x8f,0xe8,0xb5), o3(0x8f,0xe8,0xb6),
+     o3(0x8f,0xe8,0xb7),      o2(0xb8,0xdc),
+     o3(0x8f,0xe8,0xb8),      o2(0xf0,0xfc),
+     o3(0x8f,0xe8,0xb9),      o2(0xf0,0xfd),
+          o2(0xf0,0xfe),      o2(0xf1,0xa1),
+          o2(0xf1,0xa3),      o2(0xf1,0xa2),
+
+#define to_EUC_JP_E9_A1 WORDINDEX2INFO(30136)
+    to_EUC_JP_E9_A1_offsets,
+    to_EUC_JP_E9_A1_infos,
+
+#define to_EUC_JP_E9_A2_infos WORDINDEX2INFO(30138)
+                INVALID,              UNDEF,
+          o2(0xc9,0xf7),      o2(0xf1,0xa4),
+     o3(0x8f,0xe8,0xba), o3(0x8f,0xe8,0xbb),
+     o3(0x8f,0xe8,0xbc),      o2(0xf1,0xa5),
+     o3(0x8f,0xe8,0xbd),      o2(0xf1,0xa6),
+     o3(0x8f,0xe8,0xbe),      o2(0xf1,0xa7),
+     o3(0x8f,0xe8,0xbf), o3(0x8f,0xe8,0xc0),
+     o3(0x8f,0xe8,0xc1), o3(0x8f,0xe8,0xc2),
+     o3(0x8f,0xe8,0xc3),
+
+#define to_EUC_JP_E9_A2 WORDINDEX2INFO(30155)
+    to_EUC_JP_E9_A2_offsets,
+    to_EUC_JP_E9_A2_infos,
+
+#define to_EUC_JP_E9_A3_infos WORDINDEX2INFO(30157)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe8,0xc4),      o2(0xf1,0xa9),
+          o2(0xf1,0xa8), o3(0x8f,0xe8,0xc5),
+          o2(0xf1,0xaa), o3(0x8f,0xe8,0xc6),
+     o3(0x8f,0xe8,0xc7),      o2(0xc8,0xf4),
+          o2(0xe6,0xcc),      o2(0xbf,0xa9),
+     o3(0x8f,0xe8,0xc8),      o2(0xb5,0xb2),
+     o3(0x8f,0xe8,0xc9), o3(0x8f,0xe8,0xca),
+     o3(0x8f,0xe8,0xcb), o3(0x8f,0xe8,0xcc),
+          o2(0xf1,0xab), o3(0x8f,0xe8,0xcd),
+          o2(0xf1,0xac),      o2(0xd2,0xac),
+          o2(0xdd,0xbb),      o2(0xc8,0xd3),
+          o2(0xb0,0xfb), o3(0x8f,0xe8,0xce),
+          o2(0xb0,0xbb), o3(0x8f,0xe8,0xcf),
+          o2(0xbb,0xf4),      o2(0xcb,0xb0),
+          o2(0xbe,0xfe),
+
+#define to_EUC_JP_E9_A3 WORDINDEX2INFO(30188)
+    to_EUC_JP_E9_A3_offsets,
+    to_EUC_JP_E9_A3_infos,
+
+#define to_EUC_JP_E9_A4_infos WORDINDEX2INFO(30190)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe8,0xd0),      o2(0xf1,0xad),
+          o2(0xcc,0xdf), o3(0x8f,0xe8,0xd1),
+     o3(0x8f,0xe8,0xd2),      o2(0xf1,0xae),
+          o2(0xcd,0xdc),      o2(0xb1,0xc2),
+          o2(0xbb,0xc1), o3(0x8f,0xe8,0xd3),
+          o2(0xf1,0xaf),      o2(0xb2,0xee),
+          o2(0xf1,0xb0), o3(0x8f,0xe8,0xd4),
+     o3(0x8f,0xe8,0xd5), o3(0x8f,0xe8,0xd6),
+          o2(0xf1,0xb1), o3(0x8f,0xe8,0xd7),
+     o3(0x8f,0xe8,0xd8), o3(0x8f,0xe8,0xd9),
+          o2(0xf1,0xb3),      o2(0xf1,0xb4),
+     o3(0x8f,0xe8,0xda),      o2(0xf1,0xb6),
+          o2(0xf1,0xb2), o3(0x8f,0xe8,0xdb),
+          o2(0xf1,0xb5), o3(0x8f,0xe8,0xdc),
+     o3(0x8f,0xe8,0xdd),      o2(0xb4,0xdb),
+     o3(0x8f,0xe8,0xde),      o2(0xf1,0xb7),
+          o2(0xf1,0xb8), o3(0x8f,0xe8,0xdf),
+     o3(0x8f,0xe8,0xe0), o3(0x8f,0xe8,0xe1),
+     o3(0x8f,0xe8,0xe2), o3(0x8f,0xe8,0xe3),
+     o3(0x8f,0xe8,0xe4), o3(0x8f,0xe8,0xe5),
+     o3(0x8f,0xe8,0xe6), o3(0x8f,0xe8,0xe7),
+          o2(0xf1,0xb9),      o2(0xf1,0xba),
+
+#define to_EUC_JP_E9_A4 WORDINDEX2INFO(30236)
+    to_EUC_JP_E9_A4_offsets,
+    to_EUC_JP_E9_A4_infos,
+
+#define to_EUC_JP_E9_A5_infos WORDINDEX2INFO(30238)
+                INVALID, o3(0x8f,0xe8,0xe8),
+     o3(0x8f,0xe8,0xe9),      o2(0xf1,0xbb),
+                  UNDEF,      o2(0xf1,0xbd),
+     o3(0x8f,0xe8,0xea), o3(0x8f,0xe8,0xeb),
+     o3(0x8f,0xe8,0xec),      o2(0xf1,0xbc),
+          o2(0xf1,0xbf),      o2(0xf1,0xc2),
+     o3(0x8f,0xe8,0xed), o3(0x8f,0xe8,0xee),
+          o2(0xf1,0xbe),      o2(0xf1,0xc0),
+          o2(0xf1,0xc1), o3(0x8f,0xe8,0xef),
+          o2(0xf1,0xc3),      o2(0xb6,0xc2),
+     o3(0x8f,0xe8,0xf0), o3(0x8f,0xe8,0xf1),
+     o3(0x8f,0xe8,0xf2), o3(0x8f,0xe8,0xf3),
+     o3(0x8f,0xe8,0xf4), o3(0x8f,0xe8,0xf5),
+     o3(0x8f,0xe8,0xf6),
+
+#define to_EUC_JP_E9_A5 WORDINDEX2INFO(30265)
+    to_EUC_JP_E9_A5_offsets,
+    to_EUC_JP_E9_A5_infos,
+
+#define to_EUC_JP_E9_A6_infos WORDINDEX2INFO(30267)
+                INVALID,              UNDEF,
+          o2(0xbc,0xf3),      o2(0xf1,0xc4),
+          o2(0xf1,0xc5),      o2(0xb9,0xe1),
+     o3(0x8f,0xe8,0xf7), o3(0x8f,0xe8,0xf8),
+     o3(0x8f,0xe8,0xf9),      o2(0xf1,0xc6),
+     o3(0x8f,0xe8,0xfa),      o2(0xb3,0xbe),
+          o2(0xc7,0xcf),      o2(0xf1,0xc7),
+          o2(0xf1,0xc8), o3(0x8f,0xe8,0xfb),
+     o3(0x8f,0xe8,0xfc), o3(0x8f,0xe8,0xfd),
+          o2(0xc3,0xda),      o2(0xc6,0xeb),
+     o3(0x8f,0xe8,0xfe), o3(0x8f,0xe9,0xa1),
+     o3(0x8f,0xe9,0xa2),      o2(0xf1,0xc9),
+     o3(0x8f,0xe9,0xa3), o3(0x8f,0xe9,0xa4),
+
+#define to_EUC_JP_E9_A6 WORDINDEX2INFO(30293)
+    to_EUC_JP_E9_A6_offsets,
+    to_EUC_JP_E9_A6_infos,
+
+#define to_EUC_JP_E9_A7_infos WORDINDEX2INFO(30295)
+                INVALID,              UNDEF,
+          o2(0xc7,0xfd), o3(0x8f,0xe9,0xa5),
+          o2(0xc2,0xcc),      o2(0xb1,0xd8),
+          o2(0xb6,0xee),      o2(0xb6,0xef),
+     o3(0x8f,0xe9,0xa6),      o2(0xc3,0xf3),
+          o2(0xf1,0xce),      o2(0xb6,0xf0),
+     o3(0x8f,0xe9,0xa7), o3(0x8f,0xe9,0xa8),
+          o2(0xb2,0xef),      o2(0xf1,0xcd),
+     o3(0x8f,0xe9,0xa9), o3(0x8f,0xe9,0xaa),
+          o2(0xf1,0xcb), o3(0x8f,0xe9,0xab),
+          o2(0xf1,0xcc), o3(0x8f,0xe9,0xac),
+          o2(0xf1,0xca),      o2(0xf1,0xd8),
+     o3(0x8f,0xe9,0xad), o3(0x8f,0xe9,0xae),
+     o3(0x8f,0xe9,0xaf), o3(0x8f,0xe9,0xb0),
+          o2(0xf1,0xcf),      o2(0xf1,0xd0),
+     o3(0x8f,0xe9,0xb1),      o2(0xf1,0xd1),
+          o2(0xf1,0xd2), o3(0x8f,0xe9,0xb2),
+     o3(0x8f,0xe9,0xb3),      o2(0xf1,0xd4),
+     o3(0x8f,0xe9,0xb4),      o2(0xf1,0xd3),
+     o3(0x8f,0xe9,0xb5), o3(0x8f,0xe9,0xb6),
+          o2(0xbd,0xd9),
+
+#define to_EUC_JP_E9_A7 WORDINDEX2INFO(30336)
+    to_EUC_JP_E9_A7_offsets,
+    to_EUC_JP_E9_A7_infos,
+
+#define to_EUC_JP_E9_A8_infos WORDINDEX2INFO(30338)
+                INVALID,              UNDEF,
+          o2(0xf1,0xd5), o3(0x8f,0xe9,0xb7),
+     o3(0x8f,0xe9,0xb8), o3(0x8f,0xe9,0xb9),
+          o2(0xf1,0xd7), o3(0x8f,0xe9,0xba),
+     o3(0x8f,0xe9,0xbb),      o2(0xb5,0xb3),
+          o2(0xf1,0xd6), o3(0x8f,0xe9,0xbc),
+     o3(0x8f,0xe9,0xbd),      o2(0xc1,0xfb),
+          o2(0xb8,0xb3), o3(0x8f,0xe9,0xbe),
+          o2(0xf1,0xd9), o3(0x8f,0xe9,0xbf),
+     o3(0x8f,0xe9,0xc0), o3(0x8f,0xe9,0xc1),
+     o3(0x8f,0xe9,0xc2), o3(0x8f,0xe9,0xc3),
+     o3(0x8f,0xe9,0xc4),      o2(0xc2,0xcd),
+          o2(0xf1,0xda), o3(0x8f,0xe9,0xc5),
+     o3(0x8f,0xe9,0xc6),      o2(0xc6,0xad),
+     o3(0x8f,0xe9,0xc7), o3(0x8f,0xe9,0xc8),
+     o3(0x8f,0xe9,0xc9),      o2(0xf1,0xdb),
+     o3(0x8f,0xe9,0xca),      o2(0xf1,0xe0),
+
+#define to_EUC_JP_E9_A8 WORDINDEX2INFO(30372)
+    to_EUC_JP_E9_A8_offsets,
+    to_EUC_JP_E9_A8_infos,
+
+#define to_EUC_JP_E9_A9_infos WORDINDEX2INFO(30374)
+                INVALID,      o2(0xf1,0xde),
+     o3(0x8f,0xe9,0xcc),      o2(0xf1,0xdd),
+          o2(0xf1,0xdf), o3(0x8f,0xe9,0xcd),
+          o2(0xf1,0xdc),              UNDEF,
+     o3(0x8f,0xe9,0xcb), o3(0x8f,0xe9,0xce),
+     o3(0x8f,0xe9,0xcf), o3(0x8f,0xe9,0xd0),
+          o2(0xf1,0xe2), o3(0x8f,0xe9,0xd1),
+     o3(0x8f,0xe9,0xd2), o3(0x8f,0xe9,0xd3),
+          o2(0xf1,0xe1), o3(0x8f,0xe9,0xd4),
+          o2(0xf1,0xe4),      o2(0xb6,0xc3),
+          o2(0xf1,0xe3), o3(0x8f,0xe9,0xd5),
+          o2(0xf1,0xe5),      o2(0xf1,0xe6),
+          o2(0xf1,0xe8),      o2(0xf1,0xe7),
+          o2(0xf1,0xe9),      o2(0xf1,0xeb),
+          o2(0xf1,0xea),
+
+#define to_EUC_JP_E9_A9 WORDINDEX2INFO(30403)
+    to_EUC_JP_E9_A9_offsets,
+    to_EUC_JP_E9_A9_infos,
+
+#define to_EUC_JP_E9_AA_infos WORDINDEX2INFO(30405)
+                INVALID,              UNDEF,
+          o2(0xb9,0xfc), o3(0x8f,0xe9,0xd6),
+     o3(0x8f,0xe9,0xd7),      o2(0xf1,0xec),
+     o3(0x8f,0xe9,0xd8), o3(0x8f,0xe9,0xd9),
+          o2(0xf1,0xed), o3(0x8f,0xe9,0xda),
+     o3(0x8f,0xe9,0xdb), o3(0x8f,0xe9,0xdc),
+     o3(0x8f,0xe9,0xdd),      o2(0xb3,0xbc),
+     o3(0x8f,0xe9,0xde), o3(0x8f,0xe9,0xdf),
+          o2(0xf1,0xee), o3(0x8f,0xe9,0xe0),
+     o3(0x8f,0xe9,0xe1),
+
+#define to_EUC_JP_E9_AA WORDINDEX2INFO(30424)
+    to_EUC_JP_E9_AA_offsets,
+    to_EUC_JP_E9_AA_infos,
+
+#define to_EUC_JP_E9_AB_infos WORDINDEX2INFO(30426)
+                INVALID,      o2(0xf1,0xef),
+     o3(0x8f,0xe9,0xe2),              UNDEF,
+     o3(0x8f,0xe9,0xe3),      o2(0xbf,0xf1),
+     o3(0x8f,0xe9,0xe4), o3(0x8f,0xe9,0xe5),
+     o3(0x8f,0xe9,0xe6),      o2(0xf1,0xf0),
+     o3(0x8f,0xe9,0xe7),      o2(0xf1,0xf1),
+     o3(0x8f,0xe9,0xe8),      o2(0xf1,0xf2),
+          o2(0xf1,0xf3), o3(0x8f,0xe9,0xe9),
+     o3(0x8f,0xe9,0xea), o3(0x8f,0xe9,0xeb),
+          o2(0xb9,0xe2), o3(0x8f,0xe9,0xec),
+     o3(0x8f,0xe9,0xed),      o2(0xf1,0xf4),
+          o2(0xf1,0xf5), o3(0x8f,0xe9,0xee),
+          o2(0xf1,0xf6),      o2(0xf1,0xf7),
+     o3(0x8f,0xe9,0xef), o3(0x8f,0xe9,0xf0),
+          o2(0xf1,0xf8), o3(0x8f,0xe9,0xf1),
+     o3(0x8f,0xe9,0xf2),      o2(0xc8,0xb1),
+          o2(0xf1,0xfa), o3(0x8f,0xe9,0xf3),
+          o2(0xc9,0xa6),      o2(0xf1,0xfb),
+          o2(0xf1,0xf9),      o2(0xf1,0xfd),
+     o3(0x8f,0xe9,0xf4), o3(0x8f,0xe9,0xf5),
+          o2(0xf1,0xfc), o3(0x8f,0xe9,0xf6),
+          o2(0xf1,0xfe), o3(0x8f,0xe9,0xf7),
+     o3(0x8f,0xe9,0xf8),      o2(0xf2,0xa1),
+     o3(0x8f,0xe9,0xf9), o3(0x8f,0xe9,0xfa),
+
+#define to_EUC_JP_E9_AB WORDINDEX2INFO(30474)
+    to_EUC_JP_E9_AB_offsets,
+    to_EUC_JP_E9_AB_infos,
+
+#define to_EUC_JP_E9_AC_infos WORDINDEX2INFO(30476)
+                INVALID, o3(0x8f,0xe9,0xfb),
+     o3(0x8f,0xe9,0xfc), o3(0x8f,0xe9,0xfd),
+     o3(0x8f,0xe9,0xfe), o3(0x8f,0xea,0xa1),
+     o3(0x8f,0xea,0xa2),      o2(0xf2,0xa2),
+                  UNDEF, o3(0x8f,0xea,0xa3),
+     o3(0x8f,0xea,0xa4), o3(0x8f,0xea,0xa5),
+     o3(0x8f,0xea,0xa6), o3(0x8f,0xea,0xa7),
+     o3(0x8f,0xea,0xa8), o3(0x8f,0xea,0xa9),
+     o3(0x8f,0xea,0xaa), o3(0x8f,0xea,0xab),
+          o2(0xf2,0xa3), o3(0x8f,0xea,0xac),
+          o2(0xf2,0xa4), o3(0x8f,0xea,0xad),
+     o3(0x8f,0xea,0xae),      o2(0xf2,0xa5),
+     o3(0x8f,0xea,0xaf),      o2(0xf2,0xa6),
+          o2(0xf2,0xa7),      o2(0xf2,0xa8),
+     o3(0x8f,0xea,0xb0),      o2(0xf2,0xa9),
+          o2(0xf2,0xaa),      o2(0xf2,0xab),
+          o2(0xf2,0xac), o3(0x8f,0xea,0xb1),
+     o3(0x8f,0xea,0xb2),      o2(0xf2,0xad),
+          o2(0xf2,0xae),      o2(0xdd,0xb5),
+          o2(0xf2,0xaf), o3(0x8f,0xea,0xb3),
+     o3(0x8f,0xea,0xb4), o3(0x8f,0xea,0xb5),
+     o3(0x8f,0xea,0xb6), o3(0x8f,0xea,0xb7),
+     o3(0x8f,0xea,0xb8),      o2(0xe4,0xf8),
+          o2(0xb5,0xb4), o3(0x8f,0xea,0xb9),
+
+#define to_EUC_JP_E9_AC WORDINDEX2INFO(30524)
+    to_EUC_JP_E9_AC_offsets,
+    to_EUC_JP_E9_AC_infos,
+
+#define to_EUC_JP_E9_AD_infos WORDINDEX2INFO(30526)
+                INVALID,              UNDEF,
+          o2(0xb3,0xa1),      o2(0xba,0xb2),
+          o2(0xf2,0xb1),      o2(0xf2,0xb0),
+          o2(0xcc,0xa5), o3(0x8f,0xea,0xba),
+     o3(0x8f,0xea,0xbb), o3(0x8f,0xea,0xbc),
+          o2(0xf2,0xb3),      o2(0xf2,0xb4),
+          o2(0xf2,0xb2),      o2(0xf2,0xb5),
+          o2(0xcb,0xe2), o3(0x8f,0xea,0xbd),
+     o3(0x8f,0xea,0xbe), o3(0x8f,0xea,0xbf),
+          o2(0xf2,0xb6),      o2(0xb5,0xfb),
+     o3(0x8f,0xea,0xc0), o3(0x8f,0xea,0xc1),
+     o3(0x8f,0xea,0xc2), o3(0x8f,0xea,0xc3),
+     o3(0x8f,0xea,0xc4), o3(0x8f,0xea,0xc5),
+     o3(0x8f,0xea,0xc6), o3(0x8f,0xea,0xc7),
+     o3(0x8f,0xea,0xc8), o3(0x8f,0xea,0xc9),
+     o3(0x8f,0xea,0xca), o3(0x8f,0xea,0xcb),
+          o2(0xcf,0xa5), o3(0x8f,0xea,0xcc),
+          o2(0xf2,0xb7), o3(0x8f,0xea,0xcd),
+     o3(0x8f,0xea,0xce), o3(0x8f,0xea,0xcf),
+     o3(0x8f,0xea,0xd0), o3(0x8f,0xea,0xd1),
+
+#define to_EUC_JP_E9_AD WORDINDEX2INFO(30566)
+    to_EUC_JP_E9_AD_offsets,
+    to_EUC_JP_E9_AD_infos,
+
+#define to_EUC_JP_E9_AE_infos WORDINDEX2INFO(30568)
+                INVALID, o3(0x8f,0xea,0xd2),
+                  UNDEF,      o2(0xf2,0xb9),
+     o3(0x8f,0xea,0xd3), o3(0x8f,0xea,0xd4),
+     o3(0x8f,0xea,0xd5), o3(0x8f,0xea,0xd6),
+     o3(0x8f,0xea,0xd7), o3(0x8f,0xea,0xd8),
+     o3(0x8f,0xea,0xd9), o3(0x8f,0xea,0xda),
+          o2(0xb0,0xbe), o3(0x8f,0xea,0xdb),
+     o3(0x8f,0xea,0xdc),      o2(0xf2,0xba),
+          o2(0xca,0xab),      o2(0xf2,0xb8),
+     o3(0x8f,0xea,0xdd),      o2(0xf2,0xbb),
+          o2(0xf2,0xbc), o3(0x8f,0xea,0xde),
+     o3(0x8f,0xea,0xdf), o3(0x8f,0xea,0xe0),
+          o2(0xf2,0xbd),      o2(0xf2,0xbe),
+     o3(0x8f,0xea,0xe1), o3(0x8f,0xea,0xe2),
+          o2(0xf2,0xbf), o3(0x8f,0xea,0xe3),
+          o2(0xcb,0xee),      o2(0xbb,0xad),
+     o3(0x8f,0xea,0xe4),      o2(0xba,0xfa),
+          o2(0xc1,0xaf), o3(0x8f,0xea,0xe5),
+     o3(0x8f,0xea,0xe6), o3(0x8f,0xea,0xe7),
+          o2(0xf2,0xc0), o3(0x8f,0xea,0xe8),
+     o3(0x8f,0xea,0xe9),      o2(0xf2,0xc3),
+     o3(0x8f,0xea,0xea), o3(0x8f,0xea,0xeb),
+     o3(0x8f,0xea,0xec), o3(0x8f,0xea,0xed),
+
+#define to_EUC_JP_E9_AE WORDINDEX2INFO(30614)
+    to_EUC_JP_E9_AE_offsets,
+    to_EUC_JP_E9_AE_infos,
+
+#define to_EUC_JP_E9_AF_infos WORDINDEX2INFO(30616)
+                INVALID,      o2(0xf2,0xc1),
+     o3(0x8f,0xea,0xee),              UNDEF,
+          o2(0xf2,0xc4), o3(0x8f,0xea,0xef),
+     o3(0x8f,0xea,0xf0),      o2(0xb8,0xf1),
+          o2(0xf2,0xc2), o3(0x8f,0xea,0xf1),
+          o2(0xf2,0xc5), o3(0x8f,0xea,0xf2),
+          o2(0xf2,0xc6),      o2(0xf2,0xc7),
+          o2(0xf2,0xcb),      o2(0xbb,0xaa),
+     o3(0x8f,0xea,0xf3), o3(0x8f,0xea,0xf4),
+          o2(0xc2,0xe4), o3(0x8f,0xea,0xf5),
+     o3(0x8f,0xea,0xf6),      o2(0xf2,0xcc),
+          o2(0xf2,0xc9),      o2(0xf2,0xc8),
+          o2(0xf2,0xca), o3(0x8f,0xea,0xf7),
+     o3(0x8f,0xea,0xf8),      o2(0xb7,0xdf),
+     o3(0x8f,0xea,0xf9), o3(0x8f,0xea,0xfa),
+     o3(0x8f,0xea,0xfb),      o2(0xf2,0xd0),
+          o2(0xf2,0xcf),      o2(0xf2,0xce),
+     o3(0x8f,0xea,0xfc),      o2(0xb0,0xb3),
+     o3(0x8f,0xea,0xfd), o3(0x8f,0xea,0xfe),
+     o3(0x8f,0xeb,0xa1), o3(0x8f,0xeb,0xa2),
+     o3(0x8f,0xeb,0xa3), o3(0x8f,0xeb,0xa4),
+
+#define to_EUC_JP_E9_AF WORDINDEX2INFO(30658)
+    to_EUC_JP_E9_AF_offsets,
+    to_EUC_JP_E9_AF_infos,
+
+#define to_EUC_JP_E9_B0_infos WORDINDEX2INFO(30660)
+                INVALID, o3(0x8f,0xeb,0xa5),
+                  UNDEF, o3(0x8f,0xeb,0xa6),
+          o2(0xf2,0xda),      o2(0xf2,0xd6),
+          o2(0xf2,0xd7),      o2(0xf2,0xd3),
+          o2(0xf2,0xd9), o3(0x8f,0xeb,0xa7),
+          o2(0xf2,0xd5),      o2(0xb3,0xe2),
+     o3(0x8f,0xeb,0xa8),      o2(0xcf,0xcc),
+     o3(0x8f,0xeb,0xa9),      o2(0xf2,0xd8),
+          o2(0xf2,0xd4),      o2(0xf2,0xd2),
+          o2(0xf2,0xd1), o3(0x8f,0xeb,0xaa),
+     o3(0x8f,0xeb,0xab), o3(0x8f,0xeb,0xac),
+     o3(0x8f,0xeb,0xad),      o2(0xf2,0xdc),
+     o3(0x8f,0xeb,0xae), o3(0x8f,0xeb,0xaf),
+          o2(0xf2,0xdf), o3(0x8f,0xeb,0xb0),
+     o3(0x8f,0xeb,0xb1),      o2(0xf2,0xde),
+          o2(0xf2,0xdd), o3(0x8f,0xeb,0xb2),
+     o3(0x8f,0xeb,0xb3), o3(0x8f,0xeb,0xb4),
+     o3(0x8f,0xeb,0xb5), o3(0x8f,0xeb,0xb6),
+          o2(0xc9,0xc9),      o2(0xf2,0xdb),
+          o2(0xb0,0xf3),      o2(0xf2,0xe0),
+     o3(0x8f,0xeb,0xb7),      o2(0xf2,0xe2),
+     o3(0x8f,0xeb,0xb8), o3(0x8f,0xeb,0xb9),
+     o3(0x8f,0xeb,0xba),      o2(0xb3,0xef),
+          o2(0xf2,0xcd),      o2(0xb1,0xb7),
+     o3(0x8f,0xeb,0xbb),      o2(0xf2,0xe4),
+
+#define to_EUC_JP_E9_B0 WORDINDEX2INFO(30710)
+    to_EUC_JP_E9_B0_offsets,
+    to_EUC_JP_E9_B0_infos,
+
+#define to_EUC_JP_E9_B1_infos WORDINDEX2INFO(30712)
+                INVALID,              UNDEF,
+     o3(0x8f,0xeb,0xbc), o3(0x8f,0xeb,0xbd),
+     o3(0x8f,0xeb,0xbe), o3(0x8f,0xeb,0xbf),
+          o2(0xf2,0xe3),      o2(0xf2,0xe1),
+          o2(0xc3,0xad), o3(0x8f,0xeb,0xc0),
+     o3(0x8f,0xeb,0xc1), o3(0x8f,0xeb,0xc2),
+     o3(0x8f,0xeb,0xc3), o3(0x8f,0xeb,0xc4),
+          o2(0xcb,0xf0), o3(0x8f,0xeb,0xc5),
+     o3(0x8f,0xeb,0xc6), o3(0x8f,0xeb,0xc7),
+          o2(0xce,0xda), o3(0x8f,0xeb,0xc8),
+          o2(0xf2,0xe5), o3(0x8f,0xeb,0xc9),
+     o3(0x8f,0xeb,0xd0), o3(0x8f,0xeb,0xca),
+     o3(0x8f,0xeb,0xcb), o3(0x8f,0xeb,0xcc),
+          o2(0xf2,0xe6), o3(0x8f,0xeb,0xcd),
+          o2(0xf2,0xe7), o3(0x8f,0xeb,0xd2),
+     o3(0x8f,0xeb,0xce), o3(0x8f,0xeb,0xcf),
+     o3(0x8f,0xeb,0xd1), o3(0x8f,0xeb,0xd3),
+     o3(0x8f,0xeb,0xd4), o3(0x8f,0xeb,0xd5),
+     o3(0x8f,0xeb,0xd6),      o2(0xf2,0xe8),
+     o3(0x8f,0xeb,0xd7),      o2(0xf2,0xe9),
+     o3(0x8f,0xeb,0xd8),
+
+#define to_EUC_JP_E9_B1 WORDINDEX2INFO(30753)
+    to_EUC_JP_E9_B1_offsets,
+    to_EUC_JP_E9_B1_infos,
+
+#define to_EUC_JP_E9_B3_infos WORDINDEX2INFO(30755)
+                INVALID,              UNDEF,
+          o2(0xc4,0xbb), o3(0x8f,0xeb,0xd9),
+          o2(0xf2,0xea),      o2(0xc8,0xb7),
+          o2(0xf2,0xef),      o2(0xf2,0xeb),
+          o2(0xf2,0xec), o3(0x8f,0xeb,0xda),
+          o2(0xcb,0xb1),      o2(0xcc,0xc4),
+          o2(0xc6,0xd0), o3(0x8f,0xeb,0xdb),
+     o3(0x8f,0xeb,0xdc),
+
+#define to_EUC_JP_E9_B3 WORDINDEX2INFO(30770)
+    to_EUC_JP_E9_B3_offsets,
+    to_EUC_JP_E9_B3_infos,
+
+#define to_EUC_JP_E9_B4_infos WORDINDEX2INFO(30772)
+                INVALID,              UNDEF,
+     o3(0x8f,0xeb,0xde),      o2(0xf2,0xf0),
+          o2(0xf2,0xf1),      o2(0xc6,0xbe),
+          o2(0xf2,0xee),      o2(0xf2,0xed),
+     o3(0x8f,0xeb,0xdd),      o2(0xb2,0xaa),
+     o3(0x8f,0xeb,0xdf),      o2(0xf2,0xf9),
+          o2(0xf2,0xf8), o3(0x8f,0xeb,0xe0),
+     o3(0x8f,0xeb,0xe1),      o2(0xb1,0xf5),
+     o3(0x8f,0xeb,0xe2), o3(0x8f,0xeb,0xe3),
+     o3(0x8f,0xeb,0xe4),      o2(0xf2,0xf6),
+          o2(0xf2,0xf5),      o2(0xf2,0xf3),
+          o2(0xb3,0xfb),      o2(0xf2,0xf2),
+          o2(0xbc,0xb2),      o2(0xb2,0xa9),
+     o3(0x8f,0xeb,0xe5), o3(0x8f,0xeb,0xe6),
+     o3(0x8f,0xeb,0xe7), o3(0x8f,0xeb,0xe8),
+     o3(0x8f,0xeb,0xe9), o3(0x8f,0xeb,0xea),
+          o2(0xb9,0xe3), o3(0x8f,0xeb,0xeb),
+     o3(0x8f,0xeb,0xed),      o2(0xf2,0xfc),
+          o2(0xf2,0xfb),
+
+#define to_EUC_JP_E9_B4 WORDINDEX2INFO(30809)
+    to_EUC_JP_E9_B4_offsets,
+    to_EUC_JP_E9_B4_infos,
+
+#define to_EUC_JP_E9_B5_infos WORDINDEX2INFO(30811)
+                INVALID,              UNDEF,
+          o2(0xf2,0xfa), o3(0x8f,0xeb,0xee),
+     o3(0x8f,0xeb,0xef),      o2(0xf2,0xf7),
+     o3(0x8f,0xeb,0xec),      o2(0xf2,0xfd),
+     o3(0x8f,0xeb,0xf0),      o2(0xf2,0xfe),
+     o3(0x8f,0xeb,0xf1),      o2(0xf3,0xa5),
+          o2(0xf3,0xa4), o3(0x8f,0xeb,0xf2),
+     o3(0x8f,0xeb,0xf3),      o2(0xf3,0xa6),
+          o2(0xb1,0xad),      o2(0xf3,0xa1),
+          o2(0xf3,0xa2), o3(0x8f,0xeb,0xf4),
+          o2(0xb9,0xf4),      o2(0xcc,0xb9),
+     o3(0x8f,0xeb,0xf6), o3(0x8f,0xeb,0xf5),
+          o2(0xf3,0xa3), o3(0x8f,0xeb,0xf7),
+     o3(0x8f,0xeb,0xf8), o3(0x8f,0xeb,0xf9),
+     o3(0x8f,0xeb,0xfa),      o2(0xcb,0xb2),
+          o2(0xf3,0xab), o3(0x8f,0xeb,0xfb),
+          o2(0xf3,0xa7), o3(0x8f,0xeb,0xfc),
+     o3(0x8f,0xeb,0xfd),      o2(0xf3,0xac),
+     o3(0x8f,0xeb,0xfe), o3(0x8f,0xec,0xa1),
+     o3(0x8f,0xec,0xa2),
+
+#define to_EUC_JP_E9_B5 WORDINDEX2INFO(30850)
+    to_EUC_JP_E9_B5_offsets,
+    to_EUC_JP_E9_B5_infos,
+
+#define to_EUC_JP_E9_B6_infos WORDINDEX2INFO(30852)
+                INVALID,              UNDEF,
+     o3(0x8f,0xec,0xa3), o3(0x8f,0xec,0xa4),
+     o3(0x8f,0xec,0xa5),      o2(0xf3,0xa9),
+          o2(0xf3,0xa8), o3(0x8f,0xec,0xa6),
+     o3(0x8f,0xec,0xa7), o3(0x8f,0xec,0xa8),
+          o2(0xb7,0xdc), o3(0x8f,0xec,0xa9),
+     o3(0x8f,0xec,0xaa), o3(0x8f,0xec,0xab),
+     o3(0x8f,0xec,0xac), o3(0x8f,0xec,0xad),
+     o3(0x8f,0xec,0xae),      o2(0xf3,0xad),
+     o3(0x8f,0xec,0xaf),      o2(0xf3,0xae),
+          o2(0xf3,0xaf), o3(0x8f,0xec,0xb0),
+          o2(0xf3,0xaa), o3(0x8f,0xec,0xb1),
+     o3(0x8f,0xec,0xb2),      o2(0xf2,0xf4),
+     o3(0x8f,0xec,0xb3),      o2(0xf3,0xb0),
+          o2(0xc4,0xe1), o3(0x8f,0xec,0xb4),
+          o2(0xf3,0xb4), o3(0x8f,0xec,0xb5),
+          o2(0xf3,0xb5),      o2(0xf3,0xb3),
+     o3(0x8f,0xec,0xb6), o3(0x8f,0xec,0xb7),
+
+#define to_EUC_JP_E9_B6 WORDINDEX2INFO(30888)
+    to_EUC_JP_E9_B6_offsets,
+    to_EUC_JP_E9_B6_infos,
+
+#define to_EUC_JP_E9_B7_infos WORDINDEX2INFO(30890)
+                INVALID,              UNDEF,
+          o2(0xf3,0xb2),      o2(0xf3,0xb8),
+     o3(0x8f,0xec,0xb8),      o2(0xf3,0xb1),
+          o2(0xf3,0xb6), o3(0x8f,0xec,0xb9),
+     o3(0x8f,0xec,0xba), o3(0x8f,0xec,0xbb),
+          o2(0xf3,0xb7),      o2(0xf3,0xba),
+     o3(0x8f,0xec,0xbc), o3(0x8f,0xec,0xbd),
+     o3(0x8f,0xec,0xbe), o3(0x8f,0xec,0xbf),
+          o2(0xf3,0xb9), o3(0x8f,0xec,0xc0),
+     o3(0x8f,0xec,0xc1), o3(0x8f,0xec,0xc2),
+     o3(0x8f,0xec,0xc3), o3(0x8f,0xec,0xc4),
+          o2(0xf3,0xbc), o3(0x8f,0xec,0xc5),
+     o3(0x8f,0xec,0xc6), o3(0x8f,0xec,0xc7),
+          o2(0xf3,0xbd), o3(0x8f,0xec,0xc8),
+          o2(0xf3,0xbe), o3(0x8f,0xec,0xc9),
+          o2(0xcf,0xc9), o3(0x8f,0xec,0xca),
+     o3(0x8f,0xec,0xcb),      o2(0xf3,0xbb),
+          o2(0xc2,0xeb),      o2(0xba,0xed),
+          o2(0xf3,0xbf), o3(0x8f,0xec,0xcc),
+
+#define to_EUC_JP_E9_B7 WORDINDEX2INFO(30928)
+    to_EUC_JP_E9_B7_offsets,
+    to_EUC_JP_E9_B7_infos,
+
+#define to_EUC_JP_E9_B8_infos WORDINDEX2INFO(30930)
+                INVALID,              UNDEF,
+     o3(0x8f,0xec,0xce), o3(0x8f,0xec,0xcf),
+     o3(0x8f,0xec,0xcd), o3(0x8f,0xec,0xd0),
+     o3(0x8f,0xec,0xd1), o3(0x8f,0xec,0xd2),
+     o3(0x8f,0xec,0xd3), o3(0x8f,0xec,0xd4),
+     o3(0x8f,0xec,0xd5), o3(0x8f,0xec,0xd6),
+          o2(0xf3,0xc0),      o2(0xf3,0xc1),
+     o3(0x8f,0xec,0xd7), o3(0x8f,0xec,0xd8),
+          o2(0xf3,0xc2),
+
+#define to_EUC_JP_E9_B8 WORDINDEX2INFO(30947)
+    to_EUC_JP_E9_B8_offsets,
+    to_EUC_JP_E9_B8_infos,
+
+#define to_EUC_JP_E9_B9_infos WORDINDEX2INFO(30949)
+                INVALID,              UNDEF,
+          o2(0xf3,0xc3),      o2(0xb8,0xb4),
+          o2(0xf3,0xc4), o3(0x8f,0xec,0xd9),
+     o3(0x8f,0xec,0xda), o3(0x8f,0xec,0xdb),
+          o2(0xf3,0xc5),      o2(0xbc,0xaf),
+
+#define to_EUC_JP_E9_B9 WORDINDEX2INFO(30959)
+    to_EUC_JP_E9_B9_offsets,
+    to_EUC_JP_E9_B9_infos,
+
+#define to_EUC_JP_E9_BA_infos WORDINDEX2INFO(30961)
+                INVALID, o3(0x8f,0xec,0xdc),
+          o2(0xf3,0xc6), o3(0x8f,0xec,0xdd),
+     o3(0x8f,0xec,0xde), o3(0x8f,0xec,0xdf),
+     o3(0x8f,0xec,0xe0),              UNDEF,
+     o3(0x8f,0xec,0xe1),      o2(0xf3,0xc7),
+          o2(0xf3,0xc8),      o2(0xf3,0xc9),
+     o3(0x8f,0xec,0xe2), o3(0x8f,0xec,0xe3),
+          o2(0xf3,0xcc),      o2(0xf3,0xca),
+          o2(0xcf,0xbc),      o2(0xf3,0xcb),
+     o3(0x8f,0xec,0xe4),      o2(0xce,0xef),
+     o3(0x8f,0xec,0xe5), o3(0x8f,0xec,0xe6),
+          o2(0xf3,0xcd), o3(0x8f,0xec,0xe7),
+          o2(0xce,0xdb), o3(0x8f,0xec,0xe8),
+          o2(0xf3,0xce),      o2(0xc7,0xfe),
+     o3(0x8f,0xec,0xe9),      o2(0xf3,0xcf),
+          o2(0xf3,0xd1), o3(0x8f,0xec,0xea),
+          o2(0xf3,0xd2), o3(0x8f,0xec,0xeb),
+     o3(0x8f,0xec,0xec), o3(0x8f,0xec,0xed),
+     o3(0x8f,0xec,0xee), o3(0x8f,0xec,0xef),
+     o3(0x8f,0xec,0xf0),      o2(0xf3,0xd0),
+          o2(0xb9,0xed),      o2(0xcc,0xcd),
+          o2(0xcb,0xe3),      o2(0xd6,0xf7),
+          o2(0xdd,0xe0),      o2(0xcb,0xfb),
+
+#define to_EUC_JP_E9_BA WORDINDEX2INFO(31007)
+    to_EUC_JP_E9_BA_offsets,
+    to_EUC_JP_E9_BA_infos,
+
+#define to_EUC_JP_E9_BB_infos WORDINDEX2INFO(31009)
+                INVALID,              UNDEF,
+          o2(0xb2,0xab), o3(0x8f,0xec,0xf1),
+     o3(0x8f,0xec,0xf2), o3(0x8f,0xec,0xf3),
+          o2(0xf3,0xd4),      o2(0xb5,0xd0),
+          o2(0xf3,0xd5),      o2(0xf3,0xd6),
+          o2(0xf3,0xd7),      o2(0xb9,0xf5),
+          o2(0xf3,0xd8), o3(0x8f,0xec,0xf4),
+          o2(0xe0,0xd4),      o2(0xcc,0xdb),
+          o2(0xc2,0xe3),      o2(0xf3,0xd9),
+          o2(0xf3,0xdb),      o2(0xf3,0xda),
+     o3(0x8f,0xec,0xf5),      o2(0xf3,0xdc),
+     o3(0x8f,0xec,0xf6),      o2(0xf3,0xdd),
+     o3(0x8f,0xec,0xf7),      o2(0xf3,0xde),
+     o3(0x8f,0xec,0xf8), o3(0x8f,0xec,0xf9),
+     o3(0x8f,0xec,0xfa),      o2(0xf3,0xdf),
+     o3(0x8f,0xec,0xfb), o3(0x8f,0xec,0xfc),
+     o3(0x8f,0xec,0xfd),      o2(0xf3,0xe0),
+     o3(0x8f,0xec,0xfe),      o2(0xf3,0xe1),
+          o2(0xf3,0xe2), o3(0x8f,0xed,0xa1),
+          o2(0xf3,0xe3),      o2(0xf3,0xe4),
+          o2(0xf3,0xe5),      o2(0xf3,0xe6),
+     o3(0x8f,0xed,0xa2),
+
+#define to_EUC_JP_E9_BB WORDINDEX2INFO(31052)
+    to_EUC_JP_E9_BB_offsets,
+    to_EUC_JP_E9_BB_infos,
+
+#define to_EUC_JP_E9_BC_infos WORDINDEX2INFO(31054)
+                INVALID,              UNDEF,
+     o3(0x8f,0xed,0xa3), o3(0x8f,0xed,0xa4),
+          o2(0xf3,0xe7),      o2(0xf3,0xe8),
+     o3(0x8f,0xed,0xa5),      o2(0xc5,0xa4),
+     o3(0x8f,0xed,0xa6), o3(0x8f,0xed,0xa7),
+     o3(0x8f,0xed,0xa8), o3(0x8f,0xed,0xa9),
+          o2(0xb8,0xdd), o3(0x8f,0xed,0xaa),
+          o2(0xf3,0xea), o3(0x8f,0xed,0xab),
+     o3(0x8f,0xed,0xac), o3(0x8f,0xed,0xad),
+     o3(0x8f,0xed,0xae), o3(0x8f,0xed,0xaf),
+     o3(0x8f,0xed,0xb0),      o2(0xc1,0xcd),
+          o2(0xf3,0xeb), o3(0x8f,0xed,0xb1),
+     o3(0x8f,0xed,0xb2), o3(0x8f,0xed,0xb3),
+     o3(0x8f,0xed,0xb4),      o2(0xf3,0xec),
+     o3(0x8f,0xed,0xb5), o3(0x8f,0xed,0xb6),
+     o3(0x8f,0xed,0xb7), o3(0x8f,0xed,0xb8),
+     o3(0x8f,0xed,0xb9), o3(0x8f,0xed,0xba),
+     o3(0x8f,0xed,0xbb),      o2(0xc9,0xa1),
+     o3(0x8f,0xed,0xbc), o3(0x8f,0xed,0xbd),
+          o2(0xf3,0xed), o3(0x8f,0xed,0xbe),
+
+#define to_EUC_JP_E9_BC WORDINDEX2INFO(31094)
+    to_EUC_JP_E9_BC_offsets,
+    to_EUC_JP_E9_BC_infos,
+
+#define to_EUC_JP_E9_BD_infos WORDINDEX2INFO(31096)
+                INVALID,              UNDEF,
+     o3(0x8f,0xed,0xbf), o3(0x8f,0xed,0xc0),
+     o3(0x8f,0xed,0xc1), o3(0x8f,0xed,0xc2),
+     o3(0x8f,0xed,0xc3), o3(0x8f,0xed,0xc4),
+          o2(0xf3,0xee),      o2(0xe3,0xb7),
+          o2(0xec,0xda),      o2(0xf0,0xed),
+          o2(0xf3,0xef), o3(0x8f,0xed,0xc5),
+          o2(0xf3,0xf0), o3(0x8f,0xed,0xc6),
+     o3(0x8f,0xed,0xc7), o3(0x8f,0xed,0xc8),
+     o3(0x8f,0xed,0xc9), o3(0x8f,0xed,0xca),
+     o3(0x8f,0xed,0xcb), o3(0x8f,0xed,0xcc),
+          o2(0xf3,0xf2),      o2(0xf3,0xf3),
+          o2(0xf3,0xf4),      o2(0xce,0xf0),
+          o2(0xf3,0xf1),      o2(0xf3,0xf5),
+          o2(0xf3,0xf6), o3(0x8f,0xed,0xcd),
+     o3(0x8f,0xed,0xce),      o2(0xf3,0xf8),
+          o2(0xf3,0xf7), o3(0x8f,0xed,0xcf),
+     o3(0x8f,0xed,0xd0), o3(0x8f,0xed,0xd1),
+     o3(0x8f,0xed,0xd2), o3(0x8f,0xed,0xd3),
+          o2(0xf3,0xfa), o3(0x8f,0xed,0xd4),
+     o3(0x8f,0xed,0xd5),      o2(0xf3,0xfb),
+          o2(0xf3,0xf9), o3(0x8f,0xed,0xd6),
+     o3(0x8f,0xed,0xd7),
+
+#define to_EUC_JP_E9_BD WORDINDEX2INFO(31141)
+    to_EUC_JP_E9_BD_offsets,
+    to_EUC_JP_E9_BD_infos,
+
+#define to_EUC_JP_E9_BE_infos WORDINDEX2INFO(31143)
+                INVALID,              UNDEF,
+          o2(0xce,0xb6), o3(0x8f,0xed,0xd8),
+     o3(0x8f,0xed,0xd9), o3(0x8f,0xed,0xda),
+     o3(0x8f,0xed,0xdb), o3(0x8f,0xed,0xdc),
+          o2(0xf3,0xfc), o3(0x8f,0xed,0xdd),
+     o3(0x8f,0xed,0xde),      o2(0xf3,0xfd),
+          o2(0xe3,0xd4), o3(0x8f,0xed,0xdf),
+          o2(0xf3,0xfe), o3(0x8f,0xed,0xe0),
+     o3(0x8f,0xed,0xe1), o3(0x8f,0xed,0xe2),
+     o3(0x8f,0xed,0xe3),
+
+#define to_EUC_JP_E9_BE WORDINDEX2INFO(31162)
+    to_EUC_JP_E9_BE_offsets,
+    to_EUC_JP_E9_BE_infos,
+
+#define to_EUC_JP_E9_infos WORDINDEX2INFO(31164)
+             INVALID, to_EUC_JP_E9_80, to_EUC_JP_E9_81, to_EUC_JP_E9_82,
+     to_EUC_JP_E9_83, to_EUC_JP_E9_84, to_EUC_JP_E9_85, to_EUC_JP_E9_86,
+     to_EUC_JP_E9_87, to_EUC_JP_E9_88, to_EUC_JP_E9_89, to_EUC_JP_E9_8A,
+     to_EUC_JP_E9_8B, to_EUC_JP_E9_8C, to_EUC_JP_E9_8D, to_EUC_JP_E9_8E,
+     to_EUC_JP_E9_8F, to_EUC_JP_E9_90, to_EUC_JP_E9_91, to_EUC_JP_E9_92,
+        to_EUC_JP_C6, to_EUC_JP_E9_95, to_EUC_JP_E9_96, to_EUC_JP_E9_97,
+     to_EUC_JP_E9_98, to_EUC_JP_E9_99, to_EUC_JP_E9_9A, to_EUC_JP_E9_9B,
+     to_EUC_JP_E9_9C, to_EUC_JP_E9_9D, to_EUC_JP_E9_9E, to_EUC_JP_E9_9F,
+     to_EUC_JP_E9_A0, to_EUC_JP_E9_A1, to_EUC_JP_E9_A2, to_EUC_JP_E9_A3,
+     to_EUC_JP_E9_A4, to_EUC_JP_E9_A5, to_EUC_JP_E9_A6, to_EUC_JP_E9_A7,
+     to_EUC_JP_E9_A8, to_EUC_JP_E9_A9, to_EUC_JP_E9_AA, to_EUC_JP_E9_AB,
+     to_EUC_JP_E9_AC, to_EUC_JP_E9_AD, to_EUC_JP_E9_AE, to_EUC_JP_E9_AF,
+     to_EUC_JP_E9_B0, to_EUC_JP_E9_B1, to_EUC_JP_E9_B3, to_EUC_JP_E9_B4,
+     to_EUC_JP_E9_B5, to_EUC_JP_E9_B6, to_EUC_JP_E9_B7, to_EUC_JP_E9_B8,
+     to_EUC_JP_E9_B9, to_EUC_JP_E9_BA, to_EUC_JP_E9_BB, to_EUC_JP_E9_BC,
+     to_EUC_JP_E9_BD, to_EUC_JP_E9_BE,
+
+#define to_EUC_JP_E9 WORDINDEX2INFO(31226)
+    to_EUC_JP_E9_offsets,
+    to_EUC_JP_E9_infos,
+
+#define to_EUC_JP_ED WORDINDEX2INFO(31228)
+    to_EUC_JP_ED_offsets,
+    to_EUC_JP_E0_infos,
+
+#define to_EUC_JP_EF_BC_infos WORDINDEX2INFO(31230)
+           INVALID,         UNDEF, o2(0xa1,0xaa), o2(0xa1,0xf4),
+     o2(0xa1,0xf0), o2(0xa1,0xf3), o2(0xa1,0xf5), o2(0xa1,0xca),
+     o2(0xa1,0xcb), o2(0xa1,0xf6), o2(0xa1,0xdc), o2(0xa1,0xa4),
+     o2(0xa1,0xa5), o2(0xa1,0xbf), o2(0xa3,0xb0), o2(0xa3,0xb1),
+     o2(0xa3,0xb2), o2(0xa3,0xb3), o2(0xa3,0xb4), o2(0xa3,0xb5),
+     o2(0xa3,0xb6), o2(0xa3,0xb7), o2(0xa3,0xb8), o2(0xa3,0xb9),
+     o2(0xa1,0xa7), o2(0xa1,0xa8), o2(0xa1,0xe3), o2(0xa1,0xe1),
+     o2(0xa1,0xe4), o2(0xa1,0xa9), o2(0xa1,0xf7), o2(0xa3,0xc1),
+     o2(0xa3,0xc2), o2(0xa3,0xc3), o2(0xa3,0xc4), o2(0xa3,0xc5),
+     o2(0xa3,0xc6), o2(0xa3,0xc7), o2(0xa3,0xc8), o2(0xa3,0xc9),
+     o2(0xa3,0xca), o2(0xa3,0xcb), o2(0xa3,0xcc), o2(0xa3,0xcd),
+     o2(0xa3,0xce), o2(0xa3,0xcf), o2(0xa3,0xd0), o2(0xa3,0xd1),
+     o2(0xa3,0xd2), o2(0xa3,0xd3), o2(0xa3,0xd4), o2(0xa3,0xd5),
+     o2(0xa3,0xd6), o2(0xa3,0xd7), o2(0xa3,0xd8), o2(0xa3,0xd9),
+     o2(0xa3,0xda), o2(0xa1,0xce), o2(0xa1,0xc0), o2(0xa1,0xcf),
+     o2(0xa1,0xb0), o2(0xa1,0xb2),
+
+#define to_EUC_JP_EF_BC WORDINDEX2INFO(31292)
+    to_EUC_JP_EF_BC_offsets,
+    to_EUC_JP_EF_BC_infos,
+
+#define to_EUC_JP_EF_BD_infos WORDINDEX2INFO(31294)
+           INVALID, o2(0xa1,0xae), o2(0xa3,0xe1), o2(0xa3,0xe2),
+     o2(0xa3,0xe3), o2(0xa3,0xe4), o2(0xa3,0xe5), o2(0xa3,0xe6),
+     o2(0xa3,0xe7), o2(0xa3,0xe8), o2(0xa3,0xe9), o2(0xa3,0xea),
+     o2(0xa3,0xeb), o2(0xa3,0xec), o2(0xa3,0xed), o2(0xa3,0xee),
+     o2(0xa3,0xef), o2(0xa3,0xf0), o2(0xa3,0xf1), o2(0xa3,0xf2),
+     o2(0xa3,0xf3), o2(0xa3,0xf4), o2(0xa3,0xf5), o2(0xa3,0xf6),
+     o2(0xa3,0xf7), o2(0xa3,0xf8), o2(0xa3,0xf9), o2(0xa3,0xfa),
+     o2(0xa1,0xd0), o2(0xa1,0xc3), o2(0xa1,0xd1),         UNDEF,
+     o2(0x8e,0xa1), o2(0x8e,0xa2), o2(0x8e,0xa3), o2(0x8e,0xa4),
+     o2(0x8e,0xa5), o2(0x8e,0xa6), o2(0x8e,0xa7), o2(0x8e,0xa8),
+     o2(0x8e,0xa9), o2(0x8e,0xaa), o2(0x8e,0xab), o2(0x8e,0xac),
+     o2(0x8e,0xad), o2(0x8e,0xae), o2(0x8e,0xaf), o2(0x8e,0xb0),
+     o2(0x8e,0xb1), o2(0x8e,0xb2), o2(0x8e,0xb3), o2(0x8e,0xb4),
+     o2(0x8e,0xb5), o2(0x8e,0xb6), o2(0x8e,0xb7), o2(0x8e,0xb8),
+     o2(0x8e,0xb9), o2(0x8e,0xba), o2(0x8e,0xbb), o2(0x8e,0xbc),
+     o2(0x8e,0xbd), o2(0x8e,0xbe), o2(0x8e,0xbf),
+
+#define to_EUC_JP_EF_BD WORDINDEX2INFO(31357)
+    to_EUC_JP_EF_BD_offsets,
+    to_EUC_JP_EF_BD_infos,
+
+#define to_EUC_JP_EF_BE_infos WORDINDEX2INFO(31359)
+           INVALID, o2(0x8e,0xc0), o2(0x8e,0xc1), o2(0x8e,0xc2),
+     o2(0x8e,0xc3), o2(0x8e,0xc4), o2(0x8e,0xc5), o2(0x8e,0xc6),
+     o2(0x8e,0xc7), o2(0x8e,0xc8), o2(0x8e,0xc9), o2(0x8e,0xca),
+     o2(0x8e,0xcb), o2(0x8e,0xcc), o2(0x8e,0xcd), o2(0x8e,0xce),
+     o2(0x8e,0xcf), o2(0x8e,0xd0), o2(0x8e,0xd1), o2(0x8e,0xd2),
+     o2(0x8e,0xd3), o2(0x8e,0xd4), o2(0x8e,0xd5), o2(0x8e,0xd6),
+     o2(0x8e,0xd7), o2(0x8e,0xd8), o2(0x8e,0xd9), o2(0x8e,0xda),
+     o2(0x8e,0xdb), o2(0x8e,0xdc), o2(0x8e,0xdd), o2(0x8e,0xde),
+     o2(0x8e,0xdf),         UNDEF,
+
+#define to_EUC_JP_EF_BE WORDINDEX2INFO(31393)
+    to_EUC_JP_EF_BE_offsets,
+    to_EUC_JP_EF_BE_infos,
+
+#define to_EUC_JP_EF_BF_infos WORDINDEX2INFO(31395)
+           INVALID,         UNDEF, o2(0xa1,0xb1), o2(0xa1,0xef),
+
+#define to_EUC_JP_EF_BF WORDINDEX2INFO(31399)
+    to_EUC_JP_EF_BF_offsets,
+    to_EUC_JP_EF_BF_infos,
+
+#define to_EUC_JP_EF_infos WORDINDEX2INFO(31401)
+             INVALID,    to_EUC_JP_C6, to_EUC_JP_EF_BC, to_EUC_JP_EF_BD,
+     to_EUC_JP_EF_BE, to_EUC_JP_EF_BF,
+
+#define to_EUC_JP_EF WORDINDEX2INFO(31407)
+    to_EUC_JP_EF_offsets,
+    to_EUC_JP_EF_infos,
+
+#define to_EUC_JP_F0_infos WORDINDEX2INFO(31409)
+          INVALID, to_EUC_JP_E1,
+
+#define to_EUC_JP_F0 WORDINDEX2INFO(31411)
+    to_EUC_JP_F0_offsets,
+    to_EUC_JP_F0_infos,
+
+#define to_EUC_JP_F1 WORDINDEX2INFO(31413)
+    to_EUC_JP_C6_offsets,
+    to_EUC_JP_F0_infos,
+
+#define to_EUC_JP_F4 WORDINDEX2INFO(31415)
+    to_EUC_JP_F4_offsets,
+    to_EUC_JP_F0_infos,
+
+#define to_EUC_JP_infos WORDINDEX2INFO(31417)
+            NOMAP,      INVALID, to_EUC_JP_C2, to_EUC_JP_C3,
+     to_EUC_JP_C4, to_EUC_JP_C5, to_EUC_JP_C6, to_EUC_JP_C7,
+     to_EUC_JP_CB, to_EUC_JP_CE, to_EUC_JP_CF, to_EUC_JP_D0,
+     to_EUC_JP_D1, to_EUC_JP_E0, to_EUC_JP_E1, to_EUC_JP_E2,
+     to_EUC_JP_E3, to_EUC_JP_E4, to_EUC_JP_E5, to_EUC_JP_E6,
+     to_EUC_JP_E7, to_EUC_JP_E8, to_EUC_JP_E9, to_EUC_JP_ED,
+     to_EUC_JP_EF, to_EUC_JP_F0, to_EUC_JP_F1, to_EUC_JP_F4,
+
+#define to_EUC_JP WORDINDEX2INFO(31445)
+    to_EUC_JP_offsets,
+    to_EUC_JP_infos,
+
+#define to_eucJP_ms_C2_infos WORDINDEX2INFO(31447)
+                INVALID,              UNDEF,
+     o3(0x8f,0xa2,0xc2), o3(0x8f,0xa2,0xf0),
+          o2(0xa1,0xf8),      o2(0xa1,0xaf),
+     o3(0x8f,0xa2,0xed), o3(0x8f,0xa2,0xec),
+     o3(0x8f,0xa2,0xee), o3(0x8f,0xa2,0xb4),
+          o2(0xa1,0xeb),      o2(0xa1,0xde),
+          o2(0xa1,0xad),      o2(0xa2,0xf9),
+     o3(0x8f,0xa2,0xb1), o3(0x8f,0xa2,0xeb),
+     o3(0x8f,0xa2,0xc4),
+
+#define to_eucJP_ms_C2 WORDINDEX2INFO(31464)
+    to_eucJP_ms_C2_offsets,
+    to_eucJP_ms_C2_infos,
+
+#define to_eucJP_ms_E2_80_infos WORDINDEX2INFO(31466)
+           INVALID,         UNDEF, o2(0xa1,0xbe), o2(0xa1,0xbd),
+     o2(0xa1,0xc6), o2(0xa1,0xc7), o2(0xa1,0xc8), o2(0xa1,0xc9),
+     o2(0xa2,0xf7), o2(0xa2,0xf8), o2(0xa1,0xc5), o2(0xa1,0xc4),
+     o2(0xa2,0xf3), o2(0xa1,0xec), o2(0xa1,0xed), o2(0xa2,0xa8),
+
+#define to_eucJP_ms_E2_80 WORDINDEX2INFO(31482)
+    to_eucJP_ms_E2_80_offsets,
+    to_eucJP_ms_E2_80_infos,
+
+#define to_eucJP_ms_E2_84_infos WORDINDEX2INFO(31484)
+                INVALID,              UNDEF,
+          o2(0xa1,0xee),      o2(0xad,0xe2),
+          o2(0xad,0xe4), o3(0x8f,0xa2,0xef),
+          o2(0xa2,0xf2),
+
+#define to_eucJP_ms_E2_84 WORDINDEX2INFO(31491)
+    to_eucJP_ms_E2_84_offsets,
+    to_eucJP_ms_E2_84_infos,
+
+#define to_eucJP_ms_E2_85_infos WORDINDEX2INFO(31493)
+                INVALID,              UNDEF,
+          o2(0xad,0xb5),      o2(0xad,0xb6),
+          o2(0xad,0xb7),      o2(0xad,0xb8),
+          o2(0xad,0xb9),      o2(0xad,0xba),
+          o2(0xad,0xbb),      o2(0xad,0xbc),
+          o2(0xad,0xbd),      o2(0xad,0xbe),
+     o3(0x8f,0xf3,0xf3), o3(0x8f,0xf3,0xf4),
+     o3(0x8f,0xf3,0xf5), o3(0x8f,0xf3,0xf6),
+     o3(0x8f,0xf3,0xf7), o3(0x8f,0xf3,0xf8),
+     o3(0x8f,0xf3,0xf9), o3(0x8f,0xf3,0xfa),
+     o3(0x8f,0xf3,0xfb), o3(0x8f,0xf3,0xfc),
+
+#define to_eucJP_ms_E2_85 WORDINDEX2INFO(31515)
+    to_eucJP_ms_E2_85_offsets,
+    to_eucJP_ms_E2_85_infos,
+
+#define to_eucJP_ms_E2_88_infos WORDINDEX2INFO(31517)
+           INVALID, o2(0xa2,0xcf),         UNDEF, o2(0xa2,0xdf),
+     o2(0xa2,0xd0), o2(0xa2,0xe0), o2(0xa2,0xba), o2(0xa2,0xbb),
+     o2(0xad,0xf4), o2(0xa2,0xe5), o2(0xa2,0xe7), o2(0xa1,0xe7),
+     o2(0xad,0xf8), o2(0xa2,0xdc), o2(0xa1,0xc2), o2(0xa2,0xca),
+     o2(0xa2,0xcb), o2(0xa2,0xc1), o2(0xa2,0xc0), o2(0xa2,0xe9),
+     o2(0xa2,0xea), o2(0xad,0xf3), o2(0xa1,0xe8), o2(0xa2,0xe8),
+     o2(0xa2,0xe6),
+
+#define to_eucJP_ms_E2_88 WORDINDEX2INFO(31542)
+    to_eucJP_ms_E2_88_offsets,
+    to_eucJP_ms_E2_88_infos,
+
+#define to_eucJP_ms_E2_8A_infos WORDINDEX2INFO(31544)
+           INVALID,         UNDEF, o2(0xa2,0xbe), o2(0xa2,0xbf),
+     o2(0xa2,0xbc), o2(0xa2,0xbd), o2(0xa2,0xdd), o2(0xad,0xf9),
+
+#define to_eucJP_ms_E2_8A WORDINDEX2INFO(31552)
+    to_eucJP_ms_E2_8A_offsets,
+    to_eucJP_ms_E2_8A_infos,
+
+#define to_eucJP_ms_E2_91_infos WORDINDEX2INFO(31554)
+           INVALID,         UNDEF, o2(0xad,0xa1), o2(0xad,0xa2),
+     o2(0xad,0xa3), o2(0xad,0xa4), o2(0xad,0xa5), o2(0xad,0xa6),
+     o2(0xad,0xa7), o2(0xad,0xa8), o2(0xad,0xa9), o2(0xad,0xaa),
+     o2(0xad,0xab), o2(0xad,0xac), o2(0xad,0xad), o2(0xad,0xae),
+     o2(0xad,0xaf), o2(0xad,0xb0), o2(0xad,0xb1), o2(0xad,0xb2),
+     o2(0xad,0xb3), o2(0xad,0xb4),
+
+#define to_eucJP_ms_E2_91 WORDINDEX2INFO(31576)
+    to_eucJP_ms_E2_91_offsets,
+    to_eucJP_ms_E2_91_infos,
+
+#define to_eucJP_ms_E2_infos WORDINDEX2INFO(31578)
+               INVALID, to_eucJP_ms_E2_80,
+          to_EUC_JP_C6, to_eucJP_ms_E2_84,
+     to_eucJP_ms_E2_85,   to_EUC_JP_E2_86,
+       to_EUC_JP_E2_87, to_eucJP_ms_E2_88,
+       to_EUC_JP_E2_89, to_eucJP_ms_E2_8A,
+       to_EUC_JP_E2_8C, to_eucJP_ms_E2_91,
+       to_EUC_JP_E2_94,   to_EUC_JP_E2_95,
+       to_EUC_JP_E2_96,   to_EUC_JP_E2_97,
+       to_EUC_JP_E2_98,   to_EUC_JP_E2_99,
+
+#define to_eucJP_ms_E2 WORDINDEX2INFO(31596)
+    to_eucJP_ms_E2_offsets,
+    to_eucJP_ms_E2_infos,
+
+#define to_eucJP_ms_E3_80_infos WORDINDEX2INFO(31598)
+           INVALID, o2(0xa1,0xa1), o2(0xa1,0xa2), o2(0xa1,0xa3),
+     o2(0xa1,0xb7),         UNDEF, o2(0xa1,0xb9), o2(0xa1,0xba),
+     o2(0xa1,0xbb), o2(0xa1,0xd2), o2(0xa1,0xd3), o2(0xa1,0xd4),
+     o2(0xa1,0xd5), o2(0xa1,0xd6), o2(0xa1,0xd7), o2(0xa1,0xd8),
+     o2(0xa1,0xd9), o2(0xa1,0xda), o2(0xa1,0xdb), o2(0xa2,0xa9),
+     o2(0xa2,0xae), o2(0xa1,0xcc), o2(0xa1,0xcd), o2(0xad,0xe0),
+     o2(0xad,0xe1),
+
+#define to_eucJP_ms_E3_80 WORDINDEX2INFO(31623)
+    to_eucJP_ms_E3_80_offsets,
+    to_eucJP_ms_E3_80_infos,
+
+#define to_eucJP_ms_E3_88_infos WORDINDEX2INFO(31625)
+           INVALID,         UNDEF, o2(0xad,0xea), o2(0xad,0xeb),
+     o2(0xad,0xec),
+
+#define to_eucJP_ms_E3_88 WORDINDEX2INFO(31630)
+    to_eucJP_ms_E3_88_offsets,
+    to_eucJP_ms_E3_88_infos,
+
+#define to_eucJP_ms_E3_8A_infos WORDINDEX2INFO(31632)
+           INVALID,         UNDEF, o2(0xad,0xe5), o2(0xad,0xe6),
+     o2(0xad,0xe7), o2(0xad,0xe8), o2(0xad,0xe9),
+
+#define to_eucJP_ms_E3_8A WORDINDEX2INFO(31639)
+    to_eucJP_ms_E3_8A_offsets,
+    to_eucJP_ms_E3_8A_infos,
+
+#define to_eucJP_ms_E3_8C_infos WORDINDEX2INFO(31641)
+           INVALID,         UNDEF, o2(0xad,0xc6), o2(0xad,0xca),
+     o2(0xad,0xc1), o2(0xad,0xc4), o2(0xad,0xc2), o2(0xad,0xcc),
+     o2(0xad,0xcb), o2(0xad,0xc5), o2(0xad,0xcd), o2(0xad,0xc7),
+     o2(0xad,0xcf),
+
+#define to_eucJP_ms_E3_8C WORDINDEX2INFO(31654)
+    to_eucJP_ms_E3_8C_offsets,
+    to_eucJP_ms_E3_8C_infos,
+
+#define to_eucJP_ms_E3_8D_infos WORDINDEX2INFO(31656)
+           INVALID,         UNDEF, o2(0xad,0xc0), o2(0xad,0xce),
+     o2(0xad,0xc3), o2(0xad,0xc8), o2(0xad,0xc9), o2(0xad,0xdf),
+     o2(0xad,0xef), o2(0xad,0xee), o2(0xad,0xed),
+
+#define to_eucJP_ms_E3_8D WORDINDEX2INFO(31667)
+    to_eucJP_ms_E3_8D_offsets,
+    to_eucJP_ms_E3_8D_infos,
+
+#define to_eucJP_ms_E3_8E_infos WORDINDEX2INFO(31669)
+           INVALID,         UNDEF, o2(0xad,0xd3), o2(0xad,0xd4),
+     o2(0xad,0xd0), o2(0xad,0xd1), o2(0xad,0xd2), o2(0xad,0xd6),
+
+#define to_eucJP_ms_E3_8E WORDINDEX2INFO(31677)
+    to_eucJP_ms_E3_8E_offsets,
+    to_eucJP_ms_E3_8E_infos,
+
+#define to_eucJP_ms_E3_8F_infos WORDINDEX2INFO(31679)
+           INVALID,         UNDEF, o2(0xad,0xd5), o2(0xad,0xe3),
+
+#define to_eucJP_ms_E3_8F WORDINDEX2INFO(31683)
+    to_eucJP_ms_E3_8F_offsets,
+    to_eucJP_ms_E3_8F_infos,
+
+#define to_eucJP_ms_E3_infos WORDINDEX2INFO(31685)
+               INVALID, to_eucJP_ms_E3_80,
+       to_EUC_JP_E3_81,   to_EUC_JP_E3_82,
+       to_EUC_JP_E3_83,      to_EUC_JP_C6,
+     to_eucJP_ms_E3_88, to_eucJP_ms_E3_8A,
+     to_eucJP_ms_E3_8C, to_eucJP_ms_E3_8D,
+     to_eucJP_ms_E3_8E, to_eucJP_ms_E3_8F,
+
+#define to_eucJP_ms_E3 WORDINDEX2INFO(31697)
+    to_eucJP_ms_E3_offsets,
+    to_eucJP_ms_E3_infos,
+
+#define to_eucJP_ms_E4_BB_infos WORDINDEX2INFO(31699)
+                INVALID,      o2(0xbd,0xba),
+          o2(0xbf,0xce),      o2(0xd0,0xbe),
+     o3(0x8f,0xb0,0xc3),      o2(0xd0,0xbc),
+                  UNDEF,      o2(0xd0,0xbd),
+          o2(0xb5,0xd8),      o2(0xba,0xa3),
+          o2(0xb2,0xf0),      o2(0xd0,0xbb),
+          o2(0xd0,0xba),      o2(0xca,0xa9),
+     o3(0x8f,0xb0,0xc4),      o2(0xbb,0xc6),
+          o2(0xbb,0xc5),      o2(0xc2,0xbe),
+          o2(0xd0,0xbf),      o2(0xc9,0xd5),
+          o2(0xc0,0xe7), o3(0x8f,0xb0,0xc5),
+     o3(0x8f,0xb0,0xc6),      o2(0xa1,0xb8),
+          o2(0xd0,0xc0),      o2(0xd0,0xc2),
+     o3(0x8f,0xb0,0xc7), o3(0x8f,0xb0,0xc8),
+     o3(0x8f,0xb0,0xc9),      o2(0xc2,0xe5),
+          o2(0xce,0xe1),      o2(0xb0,0xca),
+     o3(0x8f,0xb0,0xca),      o2(0xd0,0xc1),
+          o2(0xb2,0xbe), o3(0x8f,0xb0,0xcb),
+          o2(0xb6,0xc4), o3(0x8f,0xb0,0xcc),
+          o2(0xc3,0xe7), o3(0x8f,0xb0,0xcd),
+     o3(0x8f,0xb0,0xce),      o2(0xb7,0xef),
+          o2(0xd0,0xc3),      o2(0xc7,0xa4),
+     o3(0x8f,0xf4,0xaf), o3(0x8f,0xb0,0xcf),
+     o3(0x8f,0xb0,0xd0), o3(0x8f,0xb0,0xd1),
+
+#define to_eucJP_ms_E4_BB WORDINDEX2INFO(31747)
+    to_eucJP_ms_E4_BB_offsets,
+    to_eucJP_ms_E4_BB_infos,
+
+#define to_eucJP_ms_E4_infos WORDINDEX2INFO(31749)
+               INVALID,      to_EUC_JP_C6,
+       to_EUC_JP_E4_B8,   to_EUC_JP_E4_B9,
+       to_EUC_JP_E4_BA, to_eucJP_ms_E4_BB,
+       to_EUC_JP_E4_BC,   to_EUC_JP_E4_BD,
+       to_EUC_JP_E4_BE,   to_EUC_JP_E4_BF,
+
+#define to_eucJP_ms_E4 WORDINDEX2INFO(31759)
+    to_EUC_JP_E4_offsets,
+    to_eucJP_ms_E4_infos,
+
+#define to_eucJP_ms_E5_83_infos WORDINDEX2INFO(31761)
+                INVALID, o3(0x8f,0xb2,0xb2),
+                  UNDEF,      o2(0xd1,0xa4),
+     o3(0x8f,0xb2,0xb3), o3(0x8f,0xb2,0xb4),
+          o2(0xb6,0xcf), o3(0x8f,0xb2,0xb5),
+          o2(0xd1,0xa1),      o2(0xd1,0xa2),
+     o3(0x8f,0xb2,0xb6),      o2(0xc6,0xaf),
+     o3(0x8f,0xb2,0xb7),      o2(0xc1,0xfc),
+     o3(0x8f,0xb2,0xb8),      o2(0xb6,0xa3),
+     o3(0x8f,0xb2,0xb9), o3(0x8f,0xb2,0xba),
+          o2(0xcb,0xcd),      o2(0xd1,0xa5),
+     o3(0x8f,0xb2,0xbb),      o2(0xce,0xbd),
+     o3(0x8f,0xb2,0xbc), o3(0x8f,0xb2,0xbd),
+          o2(0xd1,0xa6), o3(0x8f,0xb2,0xbe),
+     o3(0x8f,0xb2,0xbf),      o2(0xd1,0xa9),
+     o3(0x8f,0xb2,0xc0),      o2(0xd1,0xa7),
+     o3(0x8f,0xb2,0xc1),      o2(0xc1,0xce),
+     o3(0x8f,0xb2,0xc2), o3(0x8f,0xb2,0xc3),
+          o2(0xd1,0xa8),      o2(0xd1,0xaa),
+     o3(0x8f,0xb2,0xc4), o3(0x8f,0xb2,0xc5),
+     o3(0x8f,0xb2,0xd1), o3(0x8f,0xf4,0xb0),
+          o2(0xd1,0xac), o3(0x8f,0xb2,0xc6),
+          o2(0xd1,0xab), o3(0x8f,0xb2,0xc7),
+          o2(0xca,0xc8), o3(0x8f,0xb2,0xc8),
+
+#define to_eucJP_ms_E5_83 WORDINDEX2INFO(31807)
+    to_eucJP_ms_E5_83_offsets,
+    to_eucJP_ms_E5_83_infos,
+
+#define to_eucJP_ms_E5_87_infos WORDINDEX2INFO(31809)
+                INVALID,              UNDEF,
+     o3(0x8f,0xb2,0xfe),      o2(0xc0,0xa8),
+          o2(0xd1,0xd9),      o2(0xbd,0xda),
+     o3(0x8f,0xb3,0xa1),      o2(0xd1,0xda),
+          o2(0xc3,0xfc),      o2(0xce,0xbf),
+          o2(0xc5,0xe0), o3(0x8f,0xb3,0xa2),
+     o3(0x8f,0xb3,0xa3), o3(0x8f,0xb3,0xa4),
+     o3(0x8f,0xb3,0xa5), o3(0x8f,0xb3,0xa6),
+          o2(0xd2,0xc5), o3(0x8f,0xb3,0xa7),
+          o2(0xd1,0xdb),      o2(0xf4,0xa5),
+          o2(0xb6,0xc5), o3(0x8f,0xb3,0xa8),
+          o2(0xd1,0xdc),      o2(0xcb,0xde),
+     o3(0x8f,0xb3,0xa9), o3(0x8f,0xb3,0xaa),
+          o2(0xbd,0xe8),      o2(0xc2,0xfc),
+          o2(0xd1,0xde),      o2(0xc6,0xe4),
+     o3(0x8f,0xf4,0xb1),      o2(0xd1,0xdf),
+     o3(0x8f,0xb3,0xab),      o2(0xd1,0xe0),
+          o2(0xb3,0xae), o3(0x8f,0xb3,0xac),
+     o3(0x8f,0xb3,0xad), o3(0x8f,0xb3,0xae),
+          o2(0xd1,0xe1),      o2(0xb6,0xa7),
+     o3(0x8f,0xb3,0xaf),      o2(0xc6,0xcc),
+          o2(0xb1,0xfa),      o2(0xbd,0xd0),
+          o2(0xc8,0xa1),      o2(0xd1,0xe2),
+
+#define to_eucJP_ms_E5_87 WORDINDEX2INFO(31855)
+    to_eucJP_ms_E5_87_offsets,
+    to_eucJP_ms_E5_87_infos,
+
+#define to_eucJP_ms_E5_8C_infos WORDINDEX2INFO(31857)
+                INVALID, o3(0x8f,0xb3,0xfb),
+          o2(0xcc,0xe8),      o2(0xc6,0xf7),
+     o3(0x8f,0xb3,0xfc),              UNDEF,
+          o2(0xca,0xf1),      o2(0xd2,0xb2),
+     o3(0x8f,0xf4,0xb2),      o2(0xd2,0xb3),
+     o3(0x8f,0xb3,0xfd), o3(0x8f,0xb3,0xfe),
+     o3(0x8f,0xb4,0xa1),      o2(0xd2,0xb5),
+          o2(0xd2,0xb7),      o2(0xd2,0xb6),
+     o3(0x8f,0xb4,0xa2), o3(0x8f,0xb4,0xa3),
+          o2(0xd2,0xb8),      o2(0xb2,0xbd),
+          o2(0xcb,0xcc), o3(0x8f,0xb4,0xa4),
+          o2(0xba,0xfc),      o2(0xd2,0xb9),
+     o3(0x8f,0xb4,0xa5), o3(0x8f,0xb4,0xa6),
+          o2(0xc1,0xd9), o3(0x8f,0xb4,0xa7),
+     o3(0x8f,0xb4,0xa8),      o2(0xbe,0xa2),
+          o2(0xb6,0xa9),      o2(0xd2,0xba),
+     o3(0x8f,0xf4,0xb3), o3(0x8f,0xb4,0xa9),
+     o3(0x8f,0xb4,0xaa), o3(0x8f,0xb4,0xab),
+     o3(0x8f,0xb4,0xac),      o2(0xc8,0xdb),
+     o3(0x8f,0xb4,0xad), o3(0x8f,0xb4,0xae),
+     o3(0x8f,0xb4,0xaf),      o2(0xd2,0xbb),
+     o3(0x8f,0xb4,0xb0),      o2(0xd2,0xbc),
+     o3(0x8f,0xb4,0xb1),      o2(0xd2,0xbd),
+     o3(0x8f,0xb4,0xb2),      o2(0xd2,0xbe),
+          o2(0xc9,0xa4),      o2(0xb6,0xe8),
+          o2(0xb0,0xe5), o3(0x8f,0xb4,0xb3),
+     o3(0x8f,0xb4,0xb4), o3(0x8f,0xb4,0xb5),
+          o2(0xc6,0xbf),
+
+#define to_eucJP_ms_E5_8C WORDINDEX2INFO(31912)
+    to_eucJP_ms_E5_8C_offsets,
+    to_eucJP_ms_E5_8C_infos,
+
+#define to_eucJP_ms_E5_92_infos WORDINDEX2INFO(31914)
+                INVALID,      o2(0xd2,0xf2),
+     o3(0x8f,0xb5,0xa1),              UNDEF,
+     o3(0x8f,0xb5,0xa2),      o2(0xd2,0xf4),
+     o3(0x8f,0xb5,0xa3),      o2(0xd2,0xf6),
+     o3(0x8f,0xb5,0xa4), o3(0x8f,0xb5,0xa5),
+     o3(0x8f,0xf4,0xb5),      o2(0xba,0xf0),
+          o2(0xcf,0xc2), o3(0x8f,0xb5,0xa6),
+          o2(0xd2,0xeb),      o2(0xd2,0xe9),
+          o2(0xd2,0xf5), o3(0x8f,0xb5,0xa7),
+          o2(0xd2,0xf0), o3(0x8f,0xb5,0xa8),
+     o3(0x8f,0xb5,0xa9), o3(0x8f,0xb5,0xaa),
+     o3(0x8f,0xb5,0xab), o3(0x8f,0xb5,0xac),
+          o2(0xd2,0xf8),      o2(0xd3,0xa3),
+          o2(0xd2,0xfa), o3(0x8f,0xb5,0xad),
+     o3(0x8f,0xb5,0xae),      o2(0xd2,0xfe),
+     o3(0x8f,0xb5,0xaf), o3(0x8f,0xb5,0xb0),
+          o2(0xd3,0xa1),      o2(0xd2,0xfb),
+     o3(0x8f,0xb5,0xb1), o3(0x8f,0xb5,0xb2),
+          o2(0xd3,0xbe), o3(0x8f,0xb5,0xb3),
+          o2(0xba,0xe9),      o2(0xb3,0xb1),
+     o3(0x8f,0xb5,0xb4),      o2(0xd2,0xf9),
+     o3(0x8f,0xb5,0xb5), o3(0x8f,0xb5,0xb6),
+     o3(0x8f,0xb5,0xb7),      o2(0xd3,0xa5),
+          o2(0xb0,0xf6),      o2(0xd3,0xa4),
+     o3(0x8f,0xb5,0xb8),
+
+#define to_eucJP_ms_E5_92 WORDINDEX2INFO(31963)
+    to_eucJP_ms_E5_92_offsets,
+    to_eucJP_ms_E5_92_infos,
+
+#define to_eucJP_ms_E5_9D_infos WORDINDEX2INFO(31965)
+                INVALID,      o2(0xd4,0xae),
+                  UNDEF,      o2(0xba,0xe4),
+     o3(0x8f,0xb7,0xbc), o3(0x8f,0xb7,0xbd),
+          o2(0xb6,0xd1),      o2(0xcb,0xb7),
+     o3(0x8f,0xb7,0xbe), o3(0x8f,0xb7,0xbf),
+          o2(0xd4,0xac),      o2(0xd4,0xaf),
+          o2(0xba,0xc1),      o2(0xb9,0xa3),
+     o3(0x8f,0xb7,0xc0), o3(0x8f,0xf4,0xb6),
+          o2(0xd4,0xb3), o3(0x8f,0xb7,0xc1),
+          o2(0xba,0xa5), o3(0x8f,0xb7,0xc2),
+          o2(0xc3,0xb3), o3(0x8f,0xb7,0xc3),
+     o3(0x8f,0xb7,0xc4),      o2(0xd4,0xb0),
+          o2(0xc4,0xda), o3(0x8f,0xb7,0xc5),
+     o3(0x8f,0xb7,0xc6), o3(0x8f,0xb7,0xc7),
+     o3(0x8f,0xb7,0xc8), o3(0x8f,0xb7,0xc9),
+     o3(0x8f,0xb7,0xca), o3(0x8f,0xb7,0xcb),
+     o3(0x8f,0xb7,0xcc), o3(0x8f,0xb7,0xcd),
+     o3(0x8f,0xb7,0xce), o3(0x8f,0xb7,0xcf),
+     o3(0x8f,0xb7,0xd0), o3(0x8f,0xb7,0xd1),
+     o3(0x8f,0xb7,0xd2), o3(0x8f,0xb7,0xd3),
+          o2(0xd4,0xb4),
+
+#define to_eucJP_ms_E5_9D WORDINDEX2INFO(32006)
+    to_eucJP_ms_E5_9D_offsets,
+    to_eucJP_ms_E5_9D_infos,
+
+#define to_eucJP_ms_E5_A2_infos WORDINDEX2INFO(32008)
+                INVALID, o3(0x8f,0xb8,0xbb),
+     o3(0x8f,0xb8,0xbc),              UNDEF,
+          o2(0xb6,0xad),      o2(0xd4,0xd0),
+     o3(0x8f,0xb8,0xbd), o3(0x8f,0xb8,0xbe),
+     o3(0x8f,0xb8,0xbf), o3(0x8f,0xb8,0xc0),
+     o3(0x8f,0xb8,0xc1), o3(0x8f,0xb8,0xc2),
+     o3(0x8f,0xb8,0xc3), o3(0x8f,0xb8,0xc4),
+          o2(0xca,0xe8), o3(0x8f,0xb8,0xc5),
+     o3(0x8f,0xb8,0xc6),      o2(0xc1,0xfd),
+          o2(0xc4,0xc6), o3(0x8f,0xb8,0xc7),
+     o3(0x8f,0xf4,0xb9),      o2(0xd4,0xd2),
+     o3(0x8f,0xb8,0xc8), o3(0x8f,0xb8,0xc9),
+     o3(0x8f,0xb8,0xca), o3(0x8f,0xb8,0xcb),
+          o2(0xcb,0xcf), o3(0x8f,0xb8,0xcc),
+          o2(0xd4,0xd3),      o2(0xd4,0xd8),
+     o3(0x8f,0xb8,0xcd), o3(0x8f,0xb8,0xce),
+          o2(0xca,0xaf),      o2(0xd4,0xd7),
+          o2(0xd4,0xd1),      o2(0xd4,0xd4),
+          o2(0xd4,0xd6), o3(0x8f,0xb8,0xd0),
+          o2(0xba,0xa6),
+
+#define to_eucJP_ms_E5_A2 WORDINDEX2INFO(32047)
+    to_eucJP_ms_E5_A2_offsets,
+    to_eucJP_ms_E5_A2_infos,
+
+#define to_eucJP_ms_E5_AF_infos WORDINDEX2INFO(32049)
+                INVALID, o3(0x8f,0xba,0xdb),
+     o3(0x8f,0xba,0xdc),      o2(0xbc,0xe4),
+          o2(0xd5,0xe3),      o2(0xb4,0xf3),
+          o2(0xc6,0xd2),      o2(0xcc,0xa9),
+          o2(0xd5,0xe4),              UNDEF,
+          o2(0xd5,0xe5),      o2(0xc9,0xd9),
+     o3(0x8f,0xba,0xdd), o3(0x8f,0xba,0xde),
+          o2(0xd5,0xe7),      o2(0xb4,0xa8),
+          o2(0xb6,0xf7),      o2(0xd5,0xe6),
+     o3(0x8f,0xba,0xdf), o3(0x8f,0xba,0xe0),
+     o3(0x8f,0xba,0xe1), o3(0x8f,0xba,0xe2),
+     o3(0x8f,0xba,0xe3),      o2(0xb4,0xb2),
+          o2(0xbf,0xb2),      o2(0xd5,0xeb),
+          o2(0xbb,0xa1), o3(0x8f,0xba,0xe4),
+          o2(0xb2,0xc9),      o2(0xd5,0xea),
+          o2(0xd5,0xe8),      o2(0xd5,0xec),
+          o2(0xd5,0xe9),      o2(0xc7,0xab),
+          o2(0xdc,0xcd),      o2(0xbf,0xb3),
+          o2(0xd5,0xed), o3(0x8f,0xf4,0xba),
+          o2(0xce,0xc0), o3(0x8f,0xba,0xe5),
+          o2(0xd5,0xee), o3(0x8f,0xba,0xe6),
+          o2(0xd5,0xf0), o3(0x8f,0xba,0xe7),
+          o2(0xc3,0xfe),      o2(0xd5,0xef),
+          o2(0xc0,0xa3),      o2(0xbb,0xfb),
+     o3(0x8f,0xba,0xe8),      o2(0xc2,0xd0),
+          o2(0xbc,0xf7),
+
+#define to_eucJP_ms_E5_AF WORDINDEX2INFO(32100)
+    to_eucJP_ms_E5_AF_offsets,
+    to_eucJP_ms_E5_AF_infos,
+
+#define to_eucJP_ms_E5_B3_infos WORDINDEX2INFO(32102)
+                INVALID,              UNDEF,
+          o2(0xd6,0xb2),      o2(0xd6,0xb4),
+     o3(0x8f,0xbb,0xb9), o3(0x8f,0xbb,0xba),
+     o3(0x8f,0xbb,0xbb), o3(0x8f,0xbb,0xbd),
+          o2(0xd6,0xb5), o3(0x8f,0xbb,0xbc),
+          o2(0xc6,0xbd),      o2(0xb6,0xae),
+          o2(0xb2,0xe5),      o2(0xd6,0xb6),
+          o2(0xd6,0xbb),      o2(0xd6,0xb9),
+     o3(0x8f,0xbb,0xbe),      o2(0xca,0xf7),
+          o2(0xca,0xf6), o3(0x8f,0xbb,0xbf),
+     o3(0x8f,0xbb,0xc0), o3(0x8f,0xbb,0xc1),
+     o3(0x8f,0xf4,0xbb),      o2(0xc5,0xe7),
+          o2(0xd6,0xb8),      o2(0xbd,0xd4),
+          o2(0xd6,0xb7),
+
+#define to_eucJP_ms_E5_B3 WORDINDEX2INFO(32129)
+    to_eucJP_ms_E5_B3_offsets,
+    to_eucJP_ms_E5_B3_infos,
+
+#define to_eucJP_ms_E5_B5_infos WORDINDEX2INFO(32131)
+                INVALID,              UNDEF,
+     o3(0x8f,0xbb,0xd0), o3(0x8f,0xbb,0xd1),
+     o3(0x8f,0xbb,0xd2), o3(0x8f,0xbb,0xd3),
+     o3(0x8f,0xbb,0xd7),      o2(0xd6,0xcb),
+          o2(0xd6,0xc8),      o2(0xd6,0xca),
+          o2(0xcd,0xf2), o3(0x8f,0xbb,0xd5),
+          o2(0xd6,0xc9), o3(0x8f,0xf4,0xbc),
+     o3(0x8f,0xbb,0xd4), o3(0x8f,0xbb,0xd6),
+          o2(0xd6,0xbf), o3(0x8f,0xbb,0xd8),
+     o3(0x8f,0xbb,0xd9), o3(0x8f,0xbb,0xda),
+     o3(0x8f,0xbb,0xdb), o3(0x8f,0xbb,0xdc),
+          o2(0xbf,0xf3), o3(0x8f,0xbb,0xdd),
+          o2(0xd6,0xcc), o3(0x8f,0xbb,0xde),
+          o2(0xba,0xb7), o3(0x8f,0xbb,0xdf),
+          o2(0xd6,0xcd),      o2(0xd6,0xce),
+     o3(0x8f,0xbb,0xe0), o3(0x8f,0xbb,0xe1),
+     o3(0x8f,0xbb,0xe2), o3(0x8f,0xbb,0xe3),
+
+#define to_eucJP_ms_E5_B5 WORDINDEX2INFO(32165)
+    to_eucJP_ms_E5_B5_offsets,
+    to_eucJP_ms_E5_B5_infos,
+
+#define to_eucJP_ms_E5_BE_infos WORDINDEX2INFO(32167)
+                INVALID,      o2(0xb1,0xfd),
+          o2(0xc0,0xac),      o2(0xd7,0xc9),
+          o2(0xd7,0xc8),      o2(0xb7,0xc2),
+          o2(0xc2,0xd4),              UNDEF,
+          o2(0xd7,0xce),      o2(0xd7,0xcc),
+     o3(0x8f,0xbd,0xa9),      o2(0xd7,0xcb),
+          o2(0xce,0xa7),      o2(0xb8,0xe5),
+     o3(0x8f,0xbd,0xaa), o3(0x8f,0xbd,0xab),
+          o2(0xbd,0xf9),      o2(0xd7,0xcd),
+          o2(0xc5,0xcc),      o2(0xbd,0xbe),
+     o3(0x8f,0xbd,0xac),      o2(0xc6,0xc0),
+          o2(0xd7,0xd1),      o2(0xd7,0xd0),
+     o3(0x8f,0xbd,0xad), o3(0x8f,0xbd,0xae),
+          o2(0xd7,0xcf),      o2(0xd7,0xd2),
+          o2(0xb8,0xe6), o3(0x8f,0xbd,0xaf),
+     o3(0x8f,0xbd,0xb2), o3(0x8f,0xbd,0xb0),
+          o2(0xd7,0xd3),      o2(0xc9,0xfc),
+          o2(0xbd,0xdb), o3(0x8f,0xbd,0xb1),
+     o3(0x8f,0xbd,0xb3),      o2(0xd7,0xd4),
+          o2(0xc8,0xf9), o3(0x8f,0xbd,0xb4),
+     o3(0x8f,0xbd,0xb5), o3(0x8f,0xbd,0xb6),
+          o2(0xc6,0xc1),      o2(0xc4,0xa7),
+     o3(0x8f,0xf4,0xbe), o3(0x8f,0xbd,0xb7),
+          o2(0xc5,0xb0),      o2(0xd7,0xd5),
+          o2(0xb5,0xab),
+
+#define to_eucJP_ms_E5_BE WORDINDEX2INFO(32216)
+    to_eucJP_ms_E5_BE_offsets,
+    to_eucJP_ms_E5_BE_infos,
+
+#define to_eucJP_ms_E5_infos WORDINDEX2INFO(32218)
+               INVALID,   to_EUC_JP_E5_80,
+       to_EUC_JP_E5_81,   to_EUC_JP_E5_82,
+     to_eucJP_ms_E5_83,   to_EUC_JP_E5_84,
+       to_EUC_JP_E5_85,   to_EUC_JP_E5_86,
+     to_eucJP_ms_E5_87,   to_EUC_JP_E5_88,
+       to_EUC_JP_E5_89,   to_EUC_JP_E5_8A,
+       to_EUC_JP_E5_8B, to_eucJP_ms_E5_8C,
+       to_EUC_JP_E5_8D,   to_EUC_JP_E5_8E,
+       to_EUC_JP_E5_8F,   to_EUC_JP_E5_90,
+       to_EUC_JP_E5_91, to_eucJP_ms_E5_92,
+       to_EUC_JP_E5_93,   to_EUC_JP_E5_94,
+       to_EUC_JP_E5_95,   to_EUC_JP_E5_96,
+       to_EUC_JP_E5_97,   to_EUC_JP_E5_98,
+       to_EUC_JP_E5_99,   to_EUC_JP_E5_9A,
+       to_EUC_JP_E5_9B,   to_EUC_JP_E5_9C,
+     to_eucJP_ms_E5_9D,   to_EUC_JP_E5_9E,
+       to_EUC_JP_E5_9F,   to_EUC_JP_E5_A0,
+       to_EUC_JP_E5_A1, to_eucJP_ms_E5_A2,
+       to_EUC_JP_E5_A3,   to_EUC_JP_E5_A4,
+       to_EUC_JP_E5_A5,   to_EUC_JP_E5_A6,
+       to_EUC_JP_E5_A7,   to_EUC_JP_E5_A8,
+       to_EUC_JP_E5_A9,   to_EUC_JP_E5_AA,
+       to_EUC_JP_E5_AB,   to_EUC_JP_E5_AC,
+       to_EUC_JP_E5_AD,   to_EUC_JP_E5_AE,
+     to_eucJP_ms_E5_AF,   to_EUC_JP_E5_B0,
+       to_EUC_JP_E5_B1,   to_EUC_JP_E5_B2,
+     to_eucJP_ms_E5_B3,   to_EUC_JP_E5_B4,
+     to_eucJP_ms_E5_B5,   to_EUC_JP_E5_B6,
+       to_EUC_JP_E5_B7,   to_EUC_JP_E5_B8,
+       to_EUC_JP_E5_B9,   to_EUC_JP_E5_BA,
+       to_EUC_JP_E5_BB,   to_EUC_JP_E5_BC,
+       to_EUC_JP_E5_BD, to_eucJP_ms_E5_BE,
+       to_EUC_JP_E5_BF,
+
+#define to_eucJP_ms_E5 WORDINDEX2INFO(32283)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_E5_infos,
+
+#define to_eucJP_ms_E6_82_infos WORDINDEX2INFO(32285)
+                INVALID,              UNDEF,
+          o2(0xd7,0xfa), o3(0x8f,0xbd,0xed),
+          o2(0xd7,0xfd),      o2(0xd8,0xa1),
+     o3(0x8f,0xf4,0xbf), o3(0x8f,0xbd,0xee),
+     o3(0x8f,0xbd,0xef),      o2(0xbc,0xbd),
+     o3(0x8f,0xbd,0xf0),      o2(0xd8,0xa7),
+          o2(0xc4,0xf0),      o2(0xd7,0xfb),
+     o3(0x8f,0xbd,0xf1), o3(0x8f,0xbd,0xf2),
+          o2(0xd8,0xa5), o3(0x8f,0xbd,0xf3),
+          o2(0xb2,0xf9), o3(0x8f,0xbd,0xf4),
+          o2(0xd8,0xa3),      o2(0xd8,0xa4),
+     o3(0x8f,0xbd,0xf5),      o2(0xd7,0xfe),
+          o2(0xd8,0xa2), o3(0x8f,0xbd,0xf6),
+     o3(0x8f,0xbd,0xf7),      o2(0xb8,0xe7),
+          o2(0xcd,0xaa), o3(0x8f,0xbd,0xf8),
+          o2(0xb4,0xb5), o3(0x8f,0xbd,0xf9),
+     o3(0x8f,0xbd,0xfa),      o2(0xb1,0xd9),
+          o2(0xd8,0xa6), o3(0x8f,0xbd,0xfb),
+          o2(0xc7,0xba),      o2(0xb0,0xad),
+     o3(0x8f,0xbd,0xfc), o3(0x8f,0xbd,0xfd),
+          o2(0xc8,0xe1),      o2(0xd7,0xdc),
+          o2(0xd8,0xac),      o2(0xd8,0xb0),
+          o2(0xcc,0xe5), o3(0x8f,0xbd,0xfe),
+          o2(0xd8,0xa9), o3(0x8f,0xbe,0xa1),
+          o2(0xc5,0xe9),      o2(0xd8,0xae),
+     o3(0x8f,0xbe,0xa2),
+
+#define to_eucJP_ms_E6_82 WORDINDEX2INFO(32336)
+    to_eucJP_ms_E6_82_offsets,
+    to_eucJP_ms_E6_82_infos,
+
+#define to_eucJP_ms_E6_84_infos WORDINDEX2INFO(32338)
+                INVALID,      o2(0xd8,0xb7),
+          o2(0xbd,0xa5), o3(0x8f,0xbe,0xb8),
+          o2(0xd8,0xba),              UNDEF,
+          o2(0xd8,0xb4), o3(0x8f,0xbe,0xb9),
+          o2(0xcc,0xfc),      o2(0xcc,0xfb),
+     o3(0x8f,0xbe,0xba), o3(0x8f,0xbe,0xbb),
+          o2(0xd8,0xbe),      o2(0xd8,0xbf),
+          o2(0xb0,0xd5), o3(0x8f,0xbe,0xbc),
+     o3(0x8f,0xbe,0xbd), o3(0x8f,0xbe,0xbe),
+     o3(0x8f,0xbe,0xbf), o3(0x8f,0xbe,0xc0),
+          o2(0xd8,0xb3), o3(0x8f,0xbe,0xc1),
+     o3(0x8f,0xbe,0xc2), o3(0x8f,0xbe,0xc3),
+          o2(0xb6,0xf2),      o2(0xb0,0xa6),
+     o3(0x8f,0xbe,0xc4), o3(0x8f,0xbe,0xc5),
+          o2(0xb4,0xb6), o3(0x8f,0xf4,0xc0),
+          o2(0xd8,0xbb), o3(0x8f,0xbe,0xc6),
+          o2(0xd8,0xc3),      o2(0xd8,0xc2),
+     o3(0x8f,0xbe,0xc7), o3(0x8f,0xbe,0xc8),
+          o2(0xd8,0xc7), o3(0x8f,0xbe,0xc9),
+     o3(0x8f,0xbe,0xca),      o2(0xd8,0xc8),
+     o3(0x8f,0xbe,0xcb), o3(0x8f,0xbe,0xcc),
+     o3(0x8f,0xbe,0xcd), o3(0x8f,0xbe,0xce),
+          o2(0xd8,0xc6),      o2(0xd8,0xc9),
+          o2(0xd8,0xc1),      o2(0xd8,0xc5),
+
+#define to_eucJP_ms_E6_84 WORDINDEX2INFO(32386)
+    to_eucJP_ms_E6_84_offsets,
+    to_eucJP_ms_E6_84_infos,
+
+#define to_eucJP_ms_E6_95_infos WORDINDEX2INFO(32388)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc1,0xca),      o2(0xb8,0xce),
+     o3(0x8f,0xc1,0xcb),      o2(0xda,0xc3),
+     o3(0x8f,0xc1,0xcc),      o2(0xda,0xc6),
+     o3(0x8f,0xf4,0xc1),      o2(0xc9,0xd2),
+     o3(0x8f,0xc1,0xcd),      o2(0xb5,0xdf),
+     o3(0x8f,0xc1,0xce), o3(0x8f,0xc1,0xcf),
+          o2(0xda,0xc5),      o2(0xda,0xc4),
+          o2(0xc7,0xd4),      o2(0xda,0xc7),
+          o2(0xb6,0xb5),      o2(0xda,0xc9),
+          o2(0xda,0xc8), o3(0x8f,0xc1,0xd0),
+     o3(0x8f,0xc1,0xd1),      o2(0xb4,0xba),
+          o2(0xbb,0xb6),      o2(0xc6,0xd8),
+     o3(0x8f,0xc1,0xd2), o3(0x8f,0xc1,0xd3),
+          o2(0xb7,0xc9),      o2(0xbf,0xf4),
+          o2(0xda,0xca),      o2(0xc0,0xb0),
+          o2(0xc5,0xa8),      o2(0xc9,0xdf),
+          o2(0xda,0xcb), o3(0x8f,0xc1,0xd4),
+     o3(0x8f,0xc1,0xd5),
+
+#define to_eucJP_ms_E6_95 WORDINDEX2INFO(32425)
+    to_eucJP_ms_E6_95_offsets,
+    to_eucJP_ms_E6_95_infos,
+
+#define to_eucJP_ms_E6_98_infos WORDINDEX2INFO(32427)
+                INVALID, o3(0x8f,0xc1,0xf5),
+                  UNDEF,      o2(0xb9,0xb7),
+          o2(0xda,0xe0), o3(0x8f,0xc1,0xf6),
+          o2(0xba,0xab),      o2(0xbe,0xba),
+     o3(0x8f,0xc1,0xf7), o3(0x8f,0xc1,0xf8),
+          o2(0xda,0xdf),      o2(0xbe,0xbb),
+     o3(0x8f,0xc1,0xf9),      o2(0xcc,0xc0),
+          o2(0xba,0xaa), o3(0x8f,0xc1,0xfa),
+     o3(0x8f,0xc1,0xfb),      o2(0xb0,0xd7),
+          o2(0xc0,0xce), o3(0x8f,0xc1,0xfc),
+     o3(0x8f,0xc1,0xfd),      o2(0xda,0xe6),
+     o3(0x8f,0xc1,0xfe), o3(0x8f,0xc2,0xa1),
+          o2(0xc0,0xb1),      o2(0xb1,0xc7),
+     o3(0x8f,0xc2,0xa2), o3(0x8f,0xc2,0xa3),
+     o3(0x8f,0xc2,0xa4), o3(0x8f,0xc2,0xa5),
+          o2(0xbd,0xd5), o3(0x8f,0xc2,0xa6),
+          o2(0xcb,0xe6),      o2(0xba,0xf2),
+     o3(0x8f,0xc2,0xa7), o3(0x8f,0xc2,0xa8),
+     o3(0x8f,0xc2,0xa9), o3(0x8f,0xc2,0xaa),
+          o2(0xbe,0xbc), o3(0x8f,0xc2,0xab),
+          o2(0xc0,0xa7), o3(0x8f,0xc2,0xac),
+     o3(0x8f,0xc2,0xad), o3(0x8f,0xc2,0xae),
+          o2(0xda,0xe5),      o2(0xda,0xe3),
+          o2(0xda,0xe4), o3(0x8f,0xc2,0xb0),
+     o3(0x8f,0xc2,0xaf), o3(0x8f,0xf4,0xc2),
+          o2(0xc3,0xeb),      o2(0xdb,0xa6),
+
+#define to_eucJP_ms_E6_98 WORDINDEX2INFO(32479)
+    to_eucJP_ms_E6_98_offsets,
+    to_eucJP_ms_E6_98_infos,
+
+#define to_eucJP_ms_E6_99_infos WORDINDEX2INFO(32481)
+                INVALID, o3(0x8f,0xc2,0xb1),
+          o2(0xda,0xea),      o2(0xbb,0xfe),
+          o2(0xb9,0xb8),      o2(0xda,0xe8),
+     o3(0x8f,0xc2,0xb2), o3(0x8f,0xc2,0xb3),
+                  UNDEF,      o2(0xda,0xe9),
+     o3(0x8f,0xc2,0xb4),      o2(0xbf,0xb8),
+     o3(0x8f,0xc2,0xb5), o3(0x8f,0xc2,0xb7),
+          o2(0xda,0xe7), o3(0x8f,0xc2,0xb6),
+          o2(0xbb,0xaf), o3(0x8f,0xc2,0xb8),
+     o3(0x8f,0xc2,0xb9), o3(0x8f,0xc2,0xba),
+     o3(0x8f,0xc2,0xbb), o3(0x8f,0xc2,0xbc),
+          o2(0xda,0xec),      o2(0xda,0xeb),
+          o2(0xda,0xf0), o3(0x8f,0xc2,0xbd),
+     o3(0x8f,0xc2,0xbe),      o2(0xda,0xf1),
+          o2(0xda,0xed), o3(0x8f,0xf4,0xc3),
+          o2(0xb3,0xa2),      o2(0xda,0xee),
+          o2(0xda,0xef),      o2(0xc8,0xd5),
+     o3(0x8f,0xc2,0xc0), o3(0x8f,0xc2,0xc1),
+     o3(0x8f,0xc2,0xc2),      o2(0xc9,0xe1),
+          o2(0xb7,0xca),      o2(0xda,0xf2),
+     o3(0x8f,0xc2,0xc4),      o2(0xc0,0xb2),
+     o3(0x8f,0xc2,0xc5),      o2(0xbe,0xbd),
+     o3(0x8f,0xc2,0xc7), o3(0x8f,0xc2,0xc8),
+     o3(0x8f,0xc2,0xc9),      o2(0xc3,0xd2),
+     o3(0x8f,0xc2,0xca), o3(0x8f,0xc2,0xcc),
+     o3(0x8f,0xc2,0xc3), o3(0x8f,0xc2,0xc6),
+
+#define to_eucJP_ms_E6_99 WORDINDEX2INFO(32533)
+    to_eucJP_ms_E6_99_offsets,
+    to_eucJP_ms_E6_99_infos,
+
+#define to_eucJP_ms_E6_A0_infos WORDINDEX2INFO(32535)
+                INVALID,              UNDEF,
+     o3(0x8f,0xf4,0xc6),      o2(0xc4,0xce),
+          o2(0xc6,0xca),      o2(0xb1,0xc9),
+          o2(0xc0,0xf2), o3(0x8f,0xc3,0xca),
+          o2(0xc0,0xb4),      o2(0xb7,0xaa),
+     o3(0x8f,0xc3,0xcb), o3(0x8f,0xc3,0xcc),
+          o2(0xdb,0xd9), o3(0x8f,0xc3,0xcd),
+          o2(0xb9,0xbb),      o2(0xb3,0xfc),
+     o3(0x8f,0xc3,0xcf), o3(0x8f,0xc3,0xce),
+          o2(0xdb,0xdb),      o2(0xb3,0xf4),
+          o2(0xdb,0xe1), o3(0x8f,0xc3,0xd0),
+     o3(0x8f,0xc3,0xd1), o3(0x8f,0xc3,0xd2),
+     o3(0x8f,0xc3,0xd3), o3(0x8f,0xc3,0xd4),
+          o2(0xdb,0xde), o3(0x8f,0xc3,0xd5),
+          o2(0xc0,0xf3),      o2(0xb3,0xcb),
+          o2(0xba,0xac), o3(0x8f,0xc3,0xd6),
+          o2(0xb3,0xca),      o2(0xba,0xcf),
+     o3(0x8f,0xc3,0xd7),
+
+#define to_eucJP_ms_E6_A0 WORDINDEX2INFO(32570)
+    to_eucJP_ms_E6_A0_offsets,
+    to_eucJP_ms_E6_A0_infos,
+
+#define to_eucJP_ms_E6_A9_infos WORDINDEX2INFO(32572)
+                INVALID,              UNDEF,
+          o2(0xdc,0xed), o3(0x8f,0xc5,0xa6),
+     o3(0x8f,0xc5,0xa7),      o2(0xdc,0xf2),
+          o2(0xdc,0xf6), o3(0x8f,0xc5,0xa8),
+     o3(0x8f,0xc5,0xa9),      o2(0xb6,0xb6),
+     o3(0x8f,0xc5,0xaa), o3(0x8f,0xc5,0xab),
+     o3(0x8f,0xc5,0xac), o3(0x8f,0xc5,0xad),
+     o3(0x8f,0xc5,0xae), o3(0x8f,0xc5,0xaf),
+          o2(0xb5,0xcc),      o2(0xdc,0xf4),
+     o3(0x8f,0xc5,0xb0),      o2(0xb5,0xa1),
+          o2(0xc6,0xcb),      o2(0xdc,0xf3),
+     o3(0x8f,0xc5,0xb1),      o2(0xdc,0xf5),
+     o3(0x8f,0xc5,0xb2), o3(0x8f,0xc5,0xb3),
+     o3(0x8f,0xf4,0xc9), o3(0x8f,0xc5,0xb4),
+          o2(0xdc,0xef), o3(0x8f,0xc5,0xb5),
+          o2(0xdc,0xf1), o3(0x8f,0xc5,0xb6),
+          o2(0xb3,0xe0),
+
+#define to_eucJP_ms_E6_A9 WORDINDEX2INFO(32605)
+    to_eucJP_ms_E6_A9_offsets,
+    to_eucJP_ms_E6_A9_infos,
+
+#define to_eucJP_ms_E6_AB_infos WORDINDEX2INFO(32607)
+                INVALID,              UNDEF,
+          o2(0xdc,0xea),      o2(0xdd,0xa5),
+          o2(0xdd,0xa4), o3(0x8f,0xc5,0xcb),
+     o3(0x8f,0xc5,0xcd), o3(0x8f,0xc5,0xcc),
+     o3(0x8f,0xc5,0xce), o3(0x8f,0xc5,0xcf),
+          o2(0xdd,0xaa),      o2(0xcf,0xa6),
+     o3(0x8f,0xc5,0xd0), o3(0x8f,0xc5,0xd1),
+     o3(0x8f,0xc5,0xd2),      o2(0xdd,0xad),
+          o2(0xb6,0xfb), o3(0x8f,0xc5,0xd3),
+     o3(0x8f,0xc5,0xd4),      o2(0xdd,0xa9),
+          o2(0xdd,0xab), o3(0x8f,0xf4,0xca),
+     o3(0x8f,0xc5,0xd5), o3(0x8f,0xc5,0xd6),
+          o2(0xc8,0xa7),      o2(0xdd,0xae),
+     o3(0x8f,0xc5,0xd7), o3(0x8f,0xc5,0xd8),
+     o3(0x8f,0xc5,0xd9), o3(0x8f,0xc5,0xda),
+          o2(0xdd,0xb2),      o2(0xdd,0xaf),
+     o3(0x8f,0xc5,0xdb), o3(0x8f,0xc5,0xdc),
+
+#define to_eucJP_ms_E6_AB WORDINDEX2INFO(32641)
+    to_eucJP_ms_E6_AB_offsets,
+    to_eucJP_ms_E6_AB_infos,
+
+#define to_eucJP_ms_E6_B7_infos WORDINDEX2INFO(32643)
+                INVALID,      o2(0xcd,0xe4),
+                  UNDEF, o3(0x8f,0xc7,0xd5),
+          o2(0xde,0xc8),      o2(0xde,0xc2),
+          o2(0xde,0xbf), o3(0x8f,0xc7,0xd6),
+     o3(0x8f,0xc7,0xd7),      o2(0xce,0xd4),
+          o2(0xde,0xc5), o3(0x8f,0xc7,0xd8),
+     o3(0x8f,0xc7,0xd9),      o2(0xbd,0xca),
+          o2(0xde,0xc7),      o2(0xde,0xcc),
+     o3(0x8f,0xc7,0xda),      o2(0xc5,0xf1),
+          o2(0xde,0xca), o3(0x8f,0xc7,0xdb),
+     o3(0x8f,0xc7,0xdc),      o2(0xde,0xc4),
+     o3(0x8f,0xc7,0xdd), o3(0x8f,0xc7,0xde),
+          o2(0xc3,0xb8), o3(0x8f,0xc7,0xdf),
+          o2(0xde,0xcb), o3(0x8f,0xc7,0xe0),
+          o2(0xde,0xc0),      o2(0xde,0xc6),
+     o3(0x8f,0xc7,0xe1),      o2(0xde,0xcd),
+          o2(0xb0,0xfc),      o2(0xde,0xc3),
+          o2(0xde,0xce), o3(0x8f,0xc7,0xe2),
+     o3(0x8f,0xc7,0xe3),      o2(0xbf,0xbc),
+     o3(0x8f,0xf4,0xcc),      o2(0xbd,0xdf),
+     o3(0x8f,0xc7,0xe4),      o2(0xca,0xa5),
+     o3(0x8f,0xc7,0xe5),      o2(0xba,0xae),
+     o3(0x8f,0xf4,0xcb),      o2(0xde,0xbb),
+          o2(0xde,0xc9),      o2(0xc5,0xba),
+     o3(0x8f,0xc7,0xe6),
+
+#define to_eucJP_ms_E6_B7 WORDINDEX2INFO(32692)
+    to_eucJP_ms_E6_B7_offsets,
+    to_eucJP_ms_E6_B7_infos,
+
+#define to_eucJP_ms_E6_infos WORDINDEX2INFO(32694)
+               INVALID,   to_EUC_JP_E6_80,
+       to_EUC_JP_E6_81, to_eucJP_ms_E6_82,
+       to_EUC_JP_E6_83, to_eucJP_ms_E6_84,
+       to_EUC_JP_E6_85,   to_EUC_JP_E6_86,
+       to_EUC_JP_E6_87,   to_EUC_JP_E6_88,
+       to_EUC_JP_E6_89,   to_EUC_JP_E6_8A,
+       to_EUC_JP_E6_8B,   to_EUC_JP_E6_8C,
+       to_EUC_JP_E6_8D,   to_EUC_JP_E6_8E,
+       to_EUC_JP_E6_8F,   to_EUC_JP_E6_90,
+       to_EUC_JP_E6_91,   to_EUC_JP_E6_92,
+       to_EUC_JP_E6_93,   to_EUC_JP_E6_94,
+     to_eucJP_ms_E6_95,   to_EUC_JP_E6_96,
+       to_EUC_JP_E6_97, to_eucJP_ms_E6_98,
+     to_eucJP_ms_E6_99,   to_EUC_JP_E6_9A,
+       to_EUC_JP_E6_9B,   to_EUC_JP_E6_9C,
+       to_EUC_JP_E6_9D,   to_EUC_JP_E6_9E,
+       to_EUC_JP_E6_9F, to_eucJP_ms_E6_A0,
+       to_EUC_JP_E6_A1,   to_EUC_JP_E6_A2,
+       to_EUC_JP_E6_A3,   to_EUC_JP_E6_A4,
+       to_EUC_JP_E6_A5,   to_EUC_JP_E6_A6,
+       to_EUC_JP_E6_A7,   to_EUC_JP_E6_A8,
+     to_eucJP_ms_E6_A9,   to_EUC_JP_E6_AA,
+     to_eucJP_ms_E6_AB,   to_EUC_JP_E6_AC,
+       to_EUC_JP_E6_AD,   to_EUC_JP_E6_AE,
+       to_EUC_JP_E6_AF,   to_EUC_JP_E6_B0,
+       to_EUC_JP_E6_B1,   to_EUC_JP_E6_B2,
+       to_EUC_JP_E6_B3,   to_EUC_JP_E6_B4,
+       to_EUC_JP_E6_B5,   to_EUC_JP_E6_B6,
+     to_eucJP_ms_E6_B7,   to_EUC_JP_E6_B8,
+       to_EUC_JP_E6_B9,   to_EUC_JP_E6_BA,
+       to_EUC_JP_E6_BB,   to_EUC_JP_E6_BC,
+       to_EUC_JP_E6_BD,   to_EUC_JP_E6_BE,
+       to_EUC_JP_E6_BF,
+
+#define to_eucJP_ms_E6 WORDINDEX2INFO(32759)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_E6_infos,
+
+#define to_eucJP_ms_E7_80_infos WORDINDEX2INFO(32761)
+                INVALID, o3(0x8f,0xc9,0xaa),
+          o2(0xdf,0xc7),              UNDEF,
+     o3(0x8f,0xc9,0xab), o3(0x8f,0xc9,0xac),
+     o3(0x8f,0xc9,0xad),      o2(0xdf,0xc3),
+          o2(0xdf,0xc4), o3(0x8f,0xc9,0xae),
+          o2(0xdf,0xc8),      o2(0xdf,0xc6),
+          o2(0xc9,0xce), o3(0x8f,0xc9,0xaf),
+          o2(0xdf,0xce),      o2(0xdf,0xcb),
+          o2(0xdf,0xca),      o2(0xdf,0xcd),
+          o2(0xc6,0xd4),      o2(0xdf,0xcf),
+     o3(0x8f,0xc9,0xb0), o3(0x8f,0xc9,0xb1),
+          o2(0xc3,0xf5),      o2(0xc2,0xed),
+     o3(0x8f,0xf4,0xcd),      o2(0xc0,0xa5),
+     o3(0x8f,0xc9,0xb2),      o2(0xdf,0xd0),
+          o2(0xdf,0xd2), o3(0x8f,0xc9,0xb3),
+     o3(0x8f,0xc9,0xb4), o3(0x8f,0xc9,0xb5),
+     o3(0x8f,0xc9,0xb6),      o2(0xdf,0xd1),
+
+#define to_eucJP_ms_E7_80 WORDINDEX2INFO(32795)
+    to_eucJP_ms_E7_80_offsets,
+    to_eucJP_ms_E7_80_infos,
+
+#define to_eucJP_ms_E7_82_infos WORDINDEX2INFO(32797)
+                INVALID,              UNDEF,
+     o3(0x8f,0xc9,0xc9), o3(0x8f,0xc9,0xca),
+     o3(0x8f,0xc9,0xcb),      o2(0xcf,0xa7),
+          o2(0xbf,0xe6),      o2(0xb1,0xea),
+          o2(0xdf,0xd6), o3(0x8f,0xc9,0xcc),
+     o3(0x8f,0xc9,0xcd), o3(0x8f,0xc9,0xce),
+     o3(0x8f,0xc9,0xcf), o3(0x8f,0xc9,0xd0),
+          o2(0xdf,0xd5), o3(0x8f,0xc9,0xd1),
+     o3(0x8f,0xc9,0xd2), o3(0x8f,0xc9,0xd3),
+          o2(0xdf,0xd9),      o2(0xc3,0xba),
+          o2(0xdf,0xdc),      o2(0xdf,0xd7),
+     o3(0x8f,0xc9,0xd4), o3(0x8f,0xc9,0xd5),
+          o2(0xdf,0xdb), o3(0x8f,0xc9,0xd6),
+     o3(0x8f,0xc9,0xd7),      o2(0xdf,0xda),
+          o2(0xc5,0xc0),      o2(0xb0,0xd9),
+     o3(0x8f,0xf4,0xae),
+
+#define to_eucJP_ms_E7_82 WORDINDEX2INFO(32828)
+    to_eucJP_ms_E7_82_offsets,
+    to_eucJP_ms_E7_82_infos,
+
+#define to_eucJP_ms_E7_94_infos WORDINDEX2INFO(32830)
+                INVALID,              UNDEF,
+     o3(0x8f,0xf4,0xd0),      o2(0xe1,0xac),
+          o2(0xe1,0xab),      o2(0xe1,0xad),
+     o3(0x8f,0xcc,0xfe),      o2(0xe1,0xae),
+          o2(0xe1,0xb0),      o2(0xe1,0xaf),
+          o2(0xb9,0xf9), o3(0x8f,0xcd,0xa1),
+          o2(0xe1,0xb2),      o2(0xe1,0xb1),
+     o3(0x8f,0xcd,0xa2), o3(0x8f,0xcd,0xa3),
+          o2(0xb4,0xc5),      o2(0xbf,0xd3),
+          o2(0xc5,0xbc),      o2(0xe1,0xb3),
+          o2(0xc0,0xb8), o3(0x8f,0xcd,0xa4),
+     o3(0x8f,0xcd,0xa5),      o2(0xbb,0xba),
+     o3(0x8f,0xcd,0xa6),      o2(0xb1,0xf9),
+          o2(0xe1,0xb4), o3(0x8f,0xcd,0xa7),
+          o2(0xcd,0xd1), o3(0x8f,0xcd,0xa8),
+     o3(0x8f,0xcd,0xa9),      o2(0xca,0xe3),
+          o2(0xe1,0xb5), o3(0x8f,0xcd,0xaa),
+          o2(0xc5,0xc4),      o2(0xcd,0xb3),
+          o2(0xb9,0xc3),      o2(0xbf,0xbd),
+     o3(0x8f,0xcd,0xab),      o2(0xc3,0xcb),
+          o2(0xd2,0xb4), o3(0x8f,0xcd,0xac),
+          o2(0xc4,0xae),      o2(0xb2,0xe8),
+          o2(0xe1,0xb6), o3(0x8f,0xcd,0xad),
+     o3(0x8f,0xcd,0xae), o3(0x8f,0xcd,0xaf),
+
+#define to_eucJP_ms_E7_94 WORDINDEX2INFO(32878)
+    to_eucJP_ms_E7_94_offsets,
+    to_eucJP_ms_E7_94_infos,
+
+#define to_eucJP_ms_E7_9A_infos WORDINDEX2INFO(32880)
+                INVALID,      o2(0xe2,0xa5),
+     o3(0x8f,0xce,0xb5), o3(0x8f,0xf4,0xd1),
+          o2(0xe2,0xa6),      o2(0xc5,0xaa),
+     o3(0x8f,0xce,0xb6),      o2(0xb3,0xa7),
+          o2(0xb9,0xc4),      o2(0xe2,0xa7),
+                  UNDEF,      o2(0xe2,0xa8),
+     o3(0x8f,0xce,0xb7), o3(0x8f,0xce,0xb8),
+          o2(0xe2,0xa9),      o2(0xbb,0xa9),
+          o2(0xe2,0xab), o3(0x8f,0xce,0xb9),
+          o2(0xe2,0xaa),      o2(0xe2,0xac),
+          o2(0xe2,0xad), o3(0x8f,0xce,0xba),
+     o3(0x8f,0xce,0xbb), o3(0x8f,0xce,0xbc),
+     o3(0x8f,0xf4,0xd2), o3(0x8f,0xce,0xbd),
+     o3(0x8f,0xce,0xbe), o3(0x8f,0xce,0xbf),
+     o3(0x8f,0xce,0xc0), o3(0x8f,0xce,0xc1),
+     o3(0x8f,0xce,0xc2), o3(0x8f,0xce,0xc3),
+     o3(0x8f,0xce,0xc4), o3(0x8f,0xce,0xc5),
+     o3(0x8f,0xce,0xc6), o3(0x8f,0xce,0xc7),
+          o2(0xc8,0xe9),      o2(0xe2,0xae),
+          o2(0xe2,0xaf),      o2(0xf3,0xe9),
+          o2(0xe2,0xb0),      o2(0xe2,0xb1),
+          o2(0xe2,0xb2), o3(0x8f,0xce,0xc8),
+          o2(0xbb,0xae),
+
+#define to_eucJP_ms_E7_9A WORDINDEX2INFO(32925)
+    to_eucJP_ms_E7_9A_offsets,
+    to_eucJP_ms_E7_9A_infos,
+
+#define to_eucJP_ms_E7_A4_infos WORDINDEX2INFO(32927)
+                INVALID, o3(0x8f,0xd0,0xb6),
+          o2(0xbe,0xcc),              UNDEF,
+     o3(0x8f,0xd0,0xbc),      o2(0xe3,0xa5),
+     o3(0x8f,0xd0,0xbd),      o2(0xc1,0xc3),
+     o3(0x8f,0xd0,0xbe),      o2(0xe3,0xa7),
+          o2(0xe3,0xa6),      o2(0xe3,0xa8),
+     o3(0x8f,0xd0,0xbf), o3(0x8f,0xd0,0xc0),
+     o3(0x8f,0xd0,0xc1), o3(0x8f,0xd0,0xc2),
+     o3(0x8f,0xd0,0xc3), o3(0x8f,0xd0,0xc4),
+          o2(0xe2,0xe8), o3(0x8f,0xd0,0xc5),
+     o3(0x8f,0xd0,0xc6),      o2(0xe2,0xea),
+          o2(0xe3,0xaa),      o2(0xe3,0xa9),
+     o3(0x8f,0xd0,0xc7), o3(0x8f,0xf4,0xd4),
+     o3(0x8f,0xd0,0xc8), o3(0x8f,0xd0,0xc9),
+     o3(0x8f,0xd0,0xca),      o2(0xbc,0xa8),
+     o3(0x8f,0xd0,0xcb),      o2(0xce,0xe9),
+     o3(0x8f,0xd0,0xcc),      o2(0xbc,0xd2),
+     o3(0x8f,0xd0,0xcd),
+
+#define to_eucJP_ms_E7_A4 WORDINDEX2INFO(32962)
+    to_eucJP_ms_E7_A4_offsets,
+    to_eucJP_ms_E7_A4_infos,
+
+#define to_eucJP_ms_E7_AB_infos WORDINDEX2INFO(32964)
+                INVALID,              UNDEF,
+          o2(0xb3,0xf6),      o2(0xe3,0xe2),
+          o2(0xe3,0xe1), o3(0x8f,0xd1,0xe4),
+          o2(0xe3,0xe5),      o2(0xe3,0xde),
+     o3(0x8f,0xd1,0xe5),      o2(0xe3,0xe6),
+          o2(0xce,0xa9), o3(0x8f,0xd1,0xe6),
+          o2(0xe3,0xe7), o3(0x8f,0xd1,0xe7),
+          o2(0xe3,0xe8), o3(0x8f,0xd1,0xe8),
+          o2(0xd4,0xf4),      o2(0xe3,0xea),
+          o2(0xe3,0xe9),      o2(0xe3,0xeb),
+          o2(0xe3,0xec), o3(0x8f,0xd1,0xe9),
+          o2(0xce,0xb5),      o2(0xe3,0xed),
+          o2(0xf0,0xef),      o2(0xbe,0xcf),
+          o2(0xe3,0xee),      o2(0xe3,0xef),
+          o2(0xbd,0xd7),      o2(0xc6,0xb8),
+          o2(0xe3,0xf0), o3(0x8f,0xf4,0xd9),
+     o3(0x8f,0xd1,0xea), o3(0x8f,0xd1,0xeb),
+          o2(0xc3,0xa8), o3(0x8f,0xd1,0xec),
+     o3(0x8f,0xd1,0xed),      o2(0xe3,0xf1),
+          o2(0xc3,0xbc),      o2(0xe3,0xf2),
+     o3(0x8f,0xd1,0xee), o3(0x8f,0xd1,0xef),
+          o2(0xb6,0xa5),      o2(0xd1,0xbf),
+          o2(0xc3,0xdd),      o2(0xbc,0xb3),
+     o3(0x8f,0xd1,0xf0), o3(0x8f,0xd1,0xf1),
+     o3(0x8f,0xd1,0xf2),      o2(0xb4,0xc8),
+
+#define to_eucJP_ms_E7_AB WORDINDEX2INFO(33014)
+    to_eucJP_ms_E7_AB_offsets,
+    to_eucJP_ms_E7_AB_infos,
+
+#define to_eucJP_ms_E7_B6_infos WORDINDEX2INFO(33016)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd3,0xf2), o3(0x8f,0xd3,0xf3),
+     o3(0x8f,0xd3,0xf4), o3(0x8f,0xd3,0xf5),
+     o3(0x8f,0xd3,0xf6), o3(0x8f,0xd3,0xf7),
+          o2(0xe5,0xb5), o3(0x8f,0xd3,0xf8),
+     o3(0x8f,0xd3,0xf9), o3(0x8f,0xd3,0xfa),
+          o2(0xe5,0xb7), o3(0x8f,0xd3,0xfb),
+          o2(0xe5,0xb4), o3(0x8f,0xd3,0xfc),
+     o3(0x8f,0xd3,0xfd),      o2(0xb7,0xd1),
+          o2(0xc2,0xb3),      o2(0xe5,0xb9),
+          o2(0xc1,0xee), o3(0x8f,0xd3,0xfe),
+     o3(0x8f,0xd4,0xa1),      o2(0xe5,0xc6),
+     o3(0x8f,0xf4,0xdc),      o2(0xe5,0xc2),
+          o2(0xe5,0xbc), o3(0x8f,0xd4,0xa2),
+     o3(0x8f,0xd4,0xa3), o3(0x8f,0xd4,0xa4),
+          o2(0xe5,0xc0),      o2(0xbc,0xfa),
+          o2(0xb0,0xdd),      o2(0xe5,0xbb),
+          o2(0xe5,0xc3),      o2(0xe5,0xc7),
+          o2(0xb9,0xcb),      o2(0xcc,0xd6),
+     o3(0x8f,0xd4,0xa5),      o2(0xc4,0xd6),
+          o2(0xe5,0xbd), o3(0x8f,0xd4,0xa6),
+     o3(0x8f,0xd4,0xa7),      o2(0xe5,0xc5),
+     o3(0x8f,0xd4,0xa8),      o2(0xe5,0xba),
+          o2(0xc3,0xbe),      o2(0xe5,0xbf),
+          o2(0xb0,0xbd),      o2(0xcc,0xca),
+
+#define to_eucJP_ms_E7_B6 WORDINDEX2INFO(33066)
+    to_eucJP_ms_E7_B6_offsets,
+    to_eucJP_ms_E7_B6_infos,
+
+#define to_eucJP_ms_E7_B7_infos WORDINDEX2INFO(33068)
+                INVALID,              UNDEF,
+     o3(0x8f,0xd4,0xa9), o3(0x8f,0xd4,0xaa),
+     o3(0x8f,0xd4,0xab), o3(0x8f,0xd4,0xac),
+     o3(0x8f,0xd4,0xad),      o2(0xe5,0xbe),
+          o2(0xb6,0xdb),      o2(0xc8,0xec),
+     o3(0x8f,0xd4,0xae), o3(0x8f,0xd4,0xaf),
+     o3(0x8f,0xd4,0xb0),      o2(0xc1,0xed),
+          o2(0xce,0xd0),      o2(0xbd,0xef),
+          o2(0xe5,0xee), o3(0x8f,0xf4,0xdd),
+     o3(0x8f,0xd4,0xb1),      o2(0xe5,0xc8),
+     o3(0x8f,0xd4,0xb2),      o2(0xc0,0xfe),
+          o2(0xe5,0xc4),      o2(0xe5,0xc9),
+          o2(0xe5,0xcb),      o2(0xc4,0xf9),
+          o2(0xe5,0xce), o3(0x8f,0xd4,0xb4),
+          o2(0xe5,0xca), o3(0x8f,0xd4,0xb5),
+     o3(0x8f,0xd4,0xb6),      o2(0xca,0xd4),
+          o2(0xb4,0xcb), o3(0x8f,0xd4,0xb7),
+     o3(0x8f,0xd4,0xb8),      o2(0xcc,0xcb),
+     o3(0x8f,0xd4,0xb9),      o2(0xb0,0xde),
+     o3(0x8f,0xd4,0xba),      o2(0xe5,0xcd),
+          o2(0xce,0xfd), o3(0x8f,0xd4,0xbb),
+     o3(0x8f,0xd4,0xbc), o3(0x8f,0xd4,0xbd),
+     o3(0x8f,0xd4,0xbe),      o2(0xe5,0xcc),
+
+#define to_eucJP_ms_E7_B7 WORDINDEX2INFO(33114)
+    to_eucJP_ms_E7_B7_offsets,
+    to_eucJP_ms_E7_B7_infos,
+
+#define to_eucJP_ms_E7_infos WORDINDEX2INFO(33116)
+               INVALID, to_eucJP_ms_E7_80,
+       to_EUC_JP_E7_81, to_eucJP_ms_E7_82,
+       to_EUC_JP_E7_83,   to_EUC_JP_E7_84,
+       to_EUC_JP_E7_85,   to_EUC_JP_E7_86,
+       to_EUC_JP_E7_87,   to_EUC_JP_E7_88,
+       to_EUC_JP_E7_89,   to_EUC_JP_E7_8A,
+       to_EUC_JP_E7_8B,   to_EUC_JP_E7_8C,
+       to_EUC_JP_E7_8D,   to_EUC_JP_E7_8E,
+       to_EUC_JP_E7_8F,   to_EUC_JP_E7_90,
+       to_EUC_JP_E7_91,   to_EUC_JP_E7_92,
+       to_EUC_JP_E7_93, to_eucJP_ms_E7_94,
+       to_EUC_JP_E7_95,   to_EUC_JP_E7_96,
+       to_EUC_JP_E7_97,   to_EUC_JP_E7_98,
+       to_EUC_JP_E7_99, to_eucJP_ms_E7_9A,
+       to_EUC_JP_E7_9B,   to_EUC_JP_E7_9C,
+       to_EUC_JP_E7_9D,   to_EUC_JP_E7_9E,
+       to_EUC_JP_E7_9F,   to_EUC_JP_E7_A0,
+       to_EUC_JP_E7_A1,   to_EUC_JP_E7_A2,
+       to_EUC_JP_E7_A3, to_eucJP_ms_E7_A4,
+       to_EUC_JP_E7_A5,   to_EUC_JP_E7_A6,
+       to_EUC_JP_E7_A7,   to_EUC_JP_E7_A8,
+       to_EUC_JP_E7_A9,   to_EUC_JP_E7_AA,
+     to_eucJP_ms_E7_AB,   to_EUC_JP_E7_AC,
+       to_EUC_JP_E7_AD,   to_EUC_JP_E7_AE,
+       to_EUC_JP_E7_AF,   to_EUC_JP_E7_B0,
+       to_EUC_JP_E7_B1,   to_EUC_JP_E7_B2,
+       to_EUC_JP_E7_B3,   to_EUC_JP_E7_B4,
+       to_EUC_JP_E7_B5, to_eucJP_ms_E7_B6,
+     to_eucJP_ms_E7_B7,   to_EUC_JP_E7_B8,
+       to_EUC_JP_E7_B9,   to_EUC_JP_E7_BA,
+          to_EUC_JP_C6,   to_EUC_JP_E7_BC,
+       to_EUC_JP_E7_BD,   to_EUC_JP_E7_BE,
+       to_EUC_JP_E7_BF,
+
+#define to_eucJP_ms_E7 WORDINDEX2INFO(33181)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_E7_infos,
+
+#define to_eucJP_ms_E8_8D_infos WORDINDEX2INFO(33183)
+                INVALID,      o2(0xe8,0xa6),
+                  UNDEF, o3(0x8f,0xd7,0xf3),
+     o3(0x8f,0xd7,0xf4), o3(0x8f,0xd7,0xf5),
+          o2(0xe8,0xa9), o3(0x8f,0xd7,0xf6),
+          o2(0xc1,0xf0),      o2(0xb7,0xd5),
+     o3(0x8f,0xd7,0xf7), o3(0x8f,0xd7,0xf8),
+          o2(0xb1,0xc1),      o2(0xe8,0xa8),
+     o3(0x8f,0xd7,0xf9),      o2(0xb9,0xd3),
+     o3(0x8f,0xd8,0xbe), o3(0x8f,0xd7,0xe3),
+     o3(0x8f,0xd7,0xfa), o3(0x8f,0xd7,0xfb),
+     o3(0x8f,0xd7,0xfc),      o2(0xc1,0xf1),
+     o3(0x8f,0xf4,0xdf), o3(0x8f,0xd7,0xfd),
+          o2(0xe8,0xba),      o2(0xe8,0xbb),
+          o2(0xb2,0xd9), o3(0x8f,0xd7,0xfe),
+          o2(0xb2,0xae),      o2(0xe8,0xb8),
+     o3(0x8f,0xd8,0xa1), o3(0x8f,0xd8,0xa2),
+
+#define to_eucJP_ms_E8_8D WORDINDEX2INFO(33215)
+    to_eucJP_ms_E8_8D_offsets,
+    to_eucJP_ms_E8_8D_infos,
+
+#define to_eucJP_ms_E8_96_infos WORDINDEX2INFO(33217)
+                INVALID,      o2(0xe9,0xa5),
+     o3(0x8f,0xd9,0xd8),              UNDEF,
+          o2(0xc7,0xf6), o3(0x8f,0xd9,0xd9),
+     o3(0x8f,0xd9,0xda),      o2(0xe9,0xaf),
+          o2(0xe9,0xa7), o3(0x8f,0xd9,0xdb),
+          o2(0xe9,0xa9), o3(0x8f,0xd9,0xdc),
+     o3(0x8f,0xd9,0xdd), o3(0x8f,0xd9,0xde),
+          o2(0xe9,0xb3),      o2(0xe9,0xa8),
+     o3(0x8f,0xd9,0xdf),      o2(0xe9,0xac),
+          o2(0xb1,0xf2), o3(0x8f,0xd9,0xe0),
+          o2(0xc6,0xe5),      o2(0xe9,0xad),
+          o2(0xe9,0xb0), o3(0x8f,0xd9,0xe1),
+     o3(0x8f,0xd9,0xe2), o3(0x8f,0xd9,0xe3),
+     o3(0x8f,0xd9,0xe4),      o2(0xe9,0xa6),
+     o3(0x8f,0xd9,0xe5),      o2(0xc1,0xa6),
+     o3(0x8f,0xd9,0xe6),      o2(0xe9,0xaa),
+          o2(0xbb,0xa7),      o2(0xbf,0xc5),
+          o2(0xb7,0xb0),      o2(0xcc,0xf4),
+     o3(0x8f,0xd9,0xf4),      o2(0xcc,0xf9),
+          o2(0xbd,0xf2), o3(0x8f,0xf4,0xe1),
+     o3(0x8f,0xd9,0xe7), o3(0x8f,0xd9,0xe8),
+     o3(0x8f,0xd9,0xe9), o3(0x8f,0xd9,0xea),
+          o2(0xe9,0xb7),      o2(0xe9,0xb5),
+     o3(0x8f,0xd9,0xeb), o3(0x8f,0xd9,0xec),
+     o3(0x8f,0xd9,0xed), o3(0x8f,0xd9,0xee),
+
+#define to_eucJP_ms_E8_96 WORDINDEX2INFO(33267)
+    to_eucJP_ms_E8_96_offsets,
+    to_eucJP_ms_E8_96_infos,
+
+#define to_eucJP_ms_E8_A0_infos WORDINDEX2INFO(33269)
+                INVALID,              UNDEF,
+     o3(0x8f,0xdb,0xe8), o3(0x8f,0xdb,0xe9),
+          o2(0xea,0xa4), o3(0x8f,0xdb,0xea),
+     o3(0x8f,0xf4,0xe4), o3(0x8f,0xdb,0xeb),
+     o3(0x8f,0xdb,0xec), o3(0x8f,0xdb,0xed),
+          o2(0xea,0xb8),      o2(0xea,0xbc),
+          o2(0xea,0xb7), o3(0x8f,0xdb,0xee),
+          o2(0xea,0xbe), o3(0x8f,0xdb,0xf0),
+     o3(0x8f,0xdb,0xf1), o3(0x8f,0xdb,0xf2),
+          o2(0xea,0xc0),      o2(0xea,0xbf),
+     o3(0x8f,0xdb,0xf3), o3(0x8f,0xdb,0xef),
+     o3(0x8f,0xdb,0xf4), o3(0x8f,0xdb,0xf5),
+     o3(0x8f,0xdb,0xf6), o3(0x8f,0xdb,0xf7),
+     o3(0x8f,0xdb,0xf8),      o2(0xea,0xc2),
+          o2(0xea,0xc1),      o2(0xe9,0xda),
+          o2(0xea,0xc6), o3(0x8f,0xdb,0xf9),
+     o3(0x8f,0xdb,0xfa), o3(0x8f,0xdb,0xfb),
+     o3(0x8f,0xdb,0xfc),      o2(0xea,0xc3),
+     o3(0x8f,0xdb,0xfd), o3(0x8f,0xdb,0xfe),
+          o2(0xea,0xc4),      o2(0xea,0xc5),
+     o3(0x8f,0xdc,0xa1),      o2(0xea,0xc7),
+     o3(0x8f,0xdc,0xa2),
+
+#define to_eucJP_ms_E8_A0 WORDINDEX2INFO(33312)
+    to_eucJP_ms_E8_A0_offsets,
+    to_eucJP_ms_E8_A0_infos,
+
+#define to_eucJP_ms_E8_AD_infos WORDINDEX2INFO(33314)
+                INVALID,              UNDEF,
+          o2(0xeb,0xf6), o3(0x8f,0xde,0xc4),
+     o3(0x8f,0xde,0xc5), o3(0x8f,0xde,0xc6),
+     o3(0x8f,0xde,0xc7), o3(0x8f,0xde,0xc8),
+     o3(0x8f,0xde,0xc9),      o2(0xeb,0xfa),
+          o2(0xeb,0xf7), o3(0x8f,0xde,0xce),
+          o2(0xeb,0xf9),      o2(0xeb,0xf8),
+     o3(0x8f,0xde,0xca), o3(0x8f,0xde,0xcb),
+     o3(0x8f,0xde,0xcc),      o2(0xeb,0xfb),
+          o2(0xbc,0xb1), o3(0x8f,0xde,0xcd),
+          o2(0xeb,0xfd),      o2(0xeb,0xfc),
+          o2(0xc9,0xe8), o3(0x8f,0xde,0xcf),
+          o2(0xec,0xa1), o3(0x8f,0xde,0xd0),
+          o2(0xb7,0xd9),      o2(0xeb,0xfe),
+          o2(0xec,0xa2), o3(0x8f,0xde,0xd1),
+          o2(0xec,0xa3),      o2(0xb5,0xc4),
+          o2(0xe6,0xc1),      o2(0xbe,0xf9),
+          o2(0xec,0xa4), o3(0x8f,0xde,0xd2),
+          o2(0xb8,0xee), o3(0x8f,0xde,0xd3),
+     o3(0x8f,0xde,0xd4), o3(0x8f,0xde,0xd5),
+          o2(0xec,0xa5), o3(0x8f,0xde,0xd6),
+     o3(0x8f,0xf4,0xe6),
+
+#define to_eucJP_ms_E8_AD WORDINDEX2INFO(33357)
+    to_eucJP_ms_E8_AD_offsets,
+    to_eucJP_ms_E8_AD_infos,
+
+#define to_eucJP_ms_E8_B3_infos WORDINDEX2INFO(33359)
+                INVALID,      o2(0xb2,0xec),
+          o2(0xec,0xcc),      o2(0xcf,0xa8),
+          o2(0xc4,0xc2),      o2(0xcf,0xc5),
+     o3(0x8f,0xdf,0xac), o3(0x8f,0xdf,0xad),
+          o2(0xbb,0xf1),      o2(0xec,0xcb),
+     o3(0x8f,0xdf,0xae),      o2(0xc2,0xb1),
+     o3(0x8f,0xdf,0xaf),              UNDEF,
+          o2(0xec,0xdc),      o2(0xc1,0xa8),
+     o3(0x8f,0xdf,0xb0),      o2(0xc6,0xf8),
+          o2(0xc9,0xd0), o3(0x8f,0xdf,0xb2),
+     o3(0x8f,0xdf,0xb1), o3(0x8f,0xdf,0xb3),
+          o2(0xec,0xcf),      o2(0xbb,0xbf),
+          o2(0xbb,0xf2), o3(0x8f,0xdf,0xb4),
+          o2(0xbe,0xde),      o2(0xc7,0xe5),
+     o3(0x8f,0xdf,0xb5),      o2(0xb8,0xad),
+          o2(0xec,0xce),      o2(0xec,0xcd),
+          o2(0xc9,0xea), o3(0x8f,0xdf,0xb6),
+          o2(0xbc,0xc1), o3(0x8f,0xdf,0xb7),
+          o2(0xc5,0xd2), o3(0x8f,0xdf,0xb8),
+     o3(0x8f,0xdf,0xb9), o3(0x8f,0xdf,0xba),
+     o3(0x8f,0xf4,0xe7), o3(0x8f,0xdf,0xbb),
+     o3(0x8f,0xdf,0xbc), o3(0x8f,0xdf,0xbd),
+          o2(0xec,0xd1),      o2(0xec,0xd2),
+          o2(0xb9,0xd8),      o2(0xec,0xd0),
+     o3(0x8f,0xdf,0xbe), o3(0x8f,0xdf,0xbf),
+
+#define to_eucJP_ms_E8_B3 WORDINDEX2INFO(33409)
+    to_eucJP_ms_E8_B3_offsets,
+    to_eucJP_ms_E8_B3_infos,
+
+#define to_eucJP_ms_E8_B5_infos WORDINDEX2INFO(33411)
+                INVALID,              UNDEF,
+          o2(0xc0,0xd6), o3(0x8f,0xdf,0xc6),
+          o2(0xbc,0xcf),      o2(0xec,0xdf),
+     o3(0x8f,0xdf,0xc7),      o2(0xb3,0xd2),
+     o3(0x8f,0xdf,0xc8),      o2(0xec,0xe0),
+     o3(0x8f,0xdf,0xc9),      o2(0xc1,0xf6),
+          o2(0xec,0xe1),      o2(0xec,0xe2),
+          o2(0xc9,0xeb), o3(0x8f,0xf4,0xe8),
+          o2(0xb5,0xaf), o3(0x8f,0xdf,0xca),
+
+#define to_eucJP_ms_E8_B5 WORDINDEX2INFO(33429)
+    to_eucJP_ms_E8_B5_offsets,
+    to_eucJP_ms_E8_B5_infos,
+
+#define to_eucJP_ms_E8_infos WORDINDEX2INFO(33431)
+               INVALID,   to_EUC_JP_E8_80,
+       to_EUC_JP_E8_81,   to_EUC_JP_E8_82,
+       to_EUC_JP_E8_83,   to_EUC_JP_E8_84,
+       to_EUC_JP_E8_85,   to_EUC_JP_E8_86,
+       to_EUC_JP_E8_87,   to_EUC_JP_E8_88,
+       to_EUC_JP_E8_89,   to_EUC_JP_E8_8A,
+       to_EUC_JP_E8_8B,   to_EUC_JP_E8_8C,
+     to_eucJP_ms_E8_8D,   to_EUC_JP_E8_8E,
+       to_EUC_JP_E8_8F,   to_EUC_JP_E8_90,
+       to_EUC_JP_E8_91,   to_EUC_JP_E8_92,
+       to_EUC_JP_E8_93,   to_EUC_JP_E8_94,
+       to_EUC_JP_E8_95, to_eucJP_ms_E8_96,
+       to_EUC_JP_E8_97,   to_EUC_JP_E8_98,
+       to_EUC_JP_E8_99,   to_EUC_JP_E8_9A,
+       to_EUC_JP_E8_9B,   to_EUC_JP_E8_9C,
+       to_EUC_JP_E8_9D,   to_EUC_JP_E8_9E,
+       to_EUC_JP_E8_9F, to_eucJP_ms_E8_A0,
+       to_EUC_JP_E8_A1,   to_EUC_JP_E8_A2,
+       to_EUC_JP_E8_A3,   to_EUC_JP_E8_A4,
+       to_EUC_JP_E8_A5,   to_EUC_JP_E8_A6,
+       to_EUC_JP_E8_A7,   to_EUC_JP_E8_A8,
+       to_EUC_JP_E8_A9,   to_EUC_JP_E8_AA,
+       to_EUC_JP_E8_AB,   to_EUC_JP_E8_AC,
+     to_eucJP_ms_E8_AD,   to_EUC_JP_E8_AE,
+          to_EUC_JP_C6,   to_EUC_JP_E8_B0,
+       to_EUC_JP_E8_B1,   to_EUC_JP_E8_B2,
+     to_eucJP_ms_E8_B3,   to_EUC_JP_E8_B4,
+     to_eucJP_ms_E8_B5,   to_EUC_JP_E8_B6,
+       to_EUC_JP_E8_B7,   to_EUC_JP_E8_B8,
+       to_EUC_JP_E8_B9,   to_EUC_JP_E8_BA,
+       to_EUC_JP_E8_BB,   to_EUC_JP_E8_BC,
+       to_EUC_JP_E8_BD,   to_EUC_JP_E8_BE,
+       to_EUC_JP_E8_BF,
+
+#define to_eucJP_ms_E8 WORDINDEX2INFO(33496)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_E8_infos,
+
+#define to_eucJP_ms_E9_83_infos WORDINDEX2INFO(33498)
+                INVALID,              UNDEF,
+          o2(0xb0,0xea), o3(0x8f,0xe1,0xfe),
+     o3(0x8f,0xe2,0xa1), o3(0x8f,0xe2,0xa2),
+     o3(0x8f,0xe2,0xa3), o3(0x8f,0xe2,0xa4),
+          o2(0xb9,0xd9), o3(0x8f,0xe1,0xfc),
+          o2(0xcf,0xba), o3(0x8f,0xe2,0xad),
+     o3(0x8f,0xe2,0xa5), o3(0x8f,0xe2,0xa6),
+     o3(0x8f,0xe2,0xa7), o3(0x8f,0xe2,0xa8),
+          o2(0xee,0xbe), o3(0x8f,0xe2,0xa9),
+     o3(0x8f,0xe2,0xaa), o3(0x8f,0xf4,0xec),
+     o3(0x8f,0xe2,0xab),      o2(0xb7,0xb4),
+          o2(0xee,0xbb),      o2(0xee,0xbc),
+     o3(0x8f,0xe2,0xac),      o2(0xc9,0xf4),
+     o3(0x8f,0xe2,0xaf),      o2(0xb3,0xd4),
+     o3(0x8f,0xe2,0xb0), o3(0x8f,0xe2,0xb1),
+     o3(0x8f,0xe2,0xb2),      o2(0xcd,0xb9),
+     o3(0x8f,0xe2,0xae),      o2(0xb6,0xbf),
+          o2(0xc5,0xd4), o3(0x8f,0xe2,0xb3),
+     o3(0x8f,0xe2,0xb4),
+
+#define to_eucJP_ms_E9_83 WORDINDEX2INFO(33535)
+    to_eucJP_ms_E9_83_offsets,
+    to_eucJP_ms_E9_83_infos,
+
+#define to_eucJP_ms_E9_84_infos WORDINDEX2INFO(33537)
+                INVALID, o3(0x8f,0xe2,0xb5),
+                  UNDEF,      o2(0xee,0xbf),
+     o3(0x8f,0xe2,0xb6), o3(0x8f,0xe2,0xb7),
+     o3(0x8f,0xe2,0xb8), o3(0x8f,0xe2,0xb9),
+     o3(0x8f,0xe2,0xba), o3(0x8f,0xe2,0xbb),
+          o2(0xee,0xc0), o3(0x8f,0xe2,0xbc),
+     o3(0x8f,0xf4,0xee), o3(0x8f,0xe2,0xbd),
+     o3(0x8f,0xe2,0xbe), o3(0x8f,0xe2,0xbf),
+          o2(0xee,0xc1), o3(0x8f,0xe2,0xc0),
+     o3(0x8f,0xe2,0xc1), o3(0x8f,0xe2,0xc2),
+     o3(0x8f,0xe2,0xc3), o3(0x8f,0xe2,0xc5),
+     o3(0x8f,0xe2,0xc6), o3(0x8f,0xe2,0xc4),
+     o3(0x8f,0xe2,0xc7), o3(0x8f,0xe2,0xc8),
+          o2(0xc5,0xa2), o3(0x8f,0xe2,0xc9),
+     o3(0x8f,0xe2,0xca),      o2(0xee,0xc3),
+     o3(0x8f,0xe2,0xcb),      o2(0xee,0xc2),
+     o3(0x8f,0xe2,0xcc), o3(0x8f,0xe2,0xcd),
+     o3(0x8f,0xe2,0xce), o3(0x8f,0xe2,0xcf),
+     o3(0x8f,0xe2,0xd0), o3(0x8f,0xe2,0xd1),
+     o3(0x8f,0xe2,0xd2),
+
+#define to_eucJP_ms_E9_84 WORDINDEX2INFO(33576)
+    to_eucJP_ms_E9_84_offsets,
+    to_eucJP_ms_E9_84_infos,
+
+#define to_eucJP_ms_E9_96_infos WORDINDEX2INFO(33578)
+                INVALID,      o2(0xcc,0xe7),
+                  UNDEF,      o2(0xef,0xd9),
+          o2(0xc1,0xae), o3(0x8f,0xe6,0xa2),
+          o2(0xef,0xda), o3(0x8f,0xe6,0xa3),
+          o2(0xca,0xc4),      o2(0xef,0xdb),
+          o2(0xb3,0xab), o3(0x8f,0xe6,0xa4),
+     o3(0x8f,0xe6,0xa5), o3(0x8f,0xe6,0xa6),
+          o2(0xb1,0xbc),      o2(0xb4,0xd7),
+     o3(0x8f,0xf4,0xf1),      o2(0xb4,0xd6),
+          o2(0xef,0xdc),      o2(0xef,0xdd),
+          o2(0xef,0xde),      o2(0xef,0xdf),
+     o3(0x8f,0xe6,0xa7), o3(0x8f,0xe6,0xa8),
+     o3(0x8f,0xe6,0xa9),      o2(0xef,0xe0),
+     o3(0x8f,0xe6,0xaa),      o2(0xb4,0xd8),
+          o2(0xb3,0xd5),      o2(0xb9,0xde),
+          o2(0xc8,0xb6), o3(0x8f,0xe6,0xab),
+          o2(0xef,0xe2),      o2(0xef,0xe1),
+     o3(0x8f,0xe6,0xac), o3(0x8f,0xe6,0xad),
+     o3(0x8f,0xe6,0xae),      o2(0xef,0xe3),
+          o2(0xb1,0xdc), o3(0x8f,0xe6,0xaf),
+     o3(0x8f,0xe6,0xb0),      o2(0xef,0xe6),
+     o3(0x8f,0xe6,0xb1),      o2(0xef,0xe5),
+          o2(0xef,0xe4), o3(0x8f,0xe6,0xb2),
+          o2(0xef,0xe7), o3(0x8f,0xe6,0xb3),
+
+#define to_eucJP_ms_E9_96 WORDINDEX2INFO(33626)
+    to_eucJP_ms_E9_96_offsets,
+    to_eucJP_ms_E9_96_infos,
+
+#define to_eucJP_ms_E9_9C_infos WORDINDEX2INFO(33628)
+                INVALID,      o2(0xbc,0xfb),
+                  UNDEF, o3(0x8f,0xe6,0xfe),
+     o3(0x8f,0xe7,0xa1),      o2(0xf0,0xbc),
+     o3(0x8f,0xe7,0xa2),      o2(0xf0,0xbd),
+          o2(0xbf,0xcc),      o2(0xf0,0xbe),
+     o3(0x8f,0xe7,0xa3),      o2(0xce,0xee),
+          o2(0xf0,0xb9),      o2(0xf0,0xc0),
+          o2(0xf0,0xc2),      o2(0xf0,0xc1),
+          o2(0xf0,0xbf),      o2(0xf0,0xc3),
+          o2(0xf0,0xc4), o3(0x8f,0xe7,0xa4),
+     o3(0x8f,0xe7,0xa5),      o2(0xc1,0xfa),
+     o3(0x8f,0xe7,0xa6),      o2(0xb2,0xe2),
+     o3(0x8f,0xe7,0xa7), o3(0x8f,0xe7,0xa8),
+     o3(0x8f,0xe7,0xa9),      o2(0xf0,0xc5),
+          o2(0xcc,0xb8), o3(0x8f,0xe7,0xaa),
+          o2(0xf0,0xc6),      o2(0xf0,0xc7),
+     o3(0x8f,0xe7,0xab),      o2(0xcf,0xaa),
+     o3(0x8f,0xe7,0xac),      o2(0xdb,0xb1),
+          o2(0xf0,0xc8), o3(0x8f,0xf4,0xf4),
+          o2(0xf0,0xc9),      o2(0xf0,0xca),
+
+#define to_eucJP_ms_E9_9C WORDINDEX2INFO(33668)
+    to_eucJP_ms_E9_9C_offsets,
+    to_eucJP_ms_E9_9C_infos,
+
+#define to_eucJP_ms_E9_9D_infos WORDINDEX2INFO(33670)
+                INVALID,              UNDEF,
+     o3(0x8f,0xe7,0xad),      o2(0xf0,0xce),
+     o3(0x8f,0xe7,0xae),      o2(0xf0,0xcb),
+          o2(0xf0,0xcc),      o2(0xf0,0xcd),
+          o2(0xf0,0xcf), o3(0x8f,0xe7,0xaf),
+     o3(0x8f,0xf4,0xf5), o3(0x8f,0xe7,0xb0),
+     o3(0x8f,0xe7,0xb1), o3(0x8f,0xf4,0xf6),
+          o2(0xc0,0xc4), o3(0x8f,0xe7,0xb2),
+          o2(0xcc,0xf7), o3(0x8f,0xe7,0xb3),
+     o3(0x8f,0xe7,0xb4),      o2(0xc0,0xc5),
+     o3(0x8f,0xe7,0xb5), o3(0x8f,0xe7,0xb6),
+          o2(0xf0,0xd0),      o2(0xc8,0xf3),
+          o2(0xf0,0xd1),      o2(0xf3,0xd3),
+          o2(0xcc,0xcc), o3(0x8f,0xe7,0xb7),
+          o2(0xf0,0xd2),      o2(0xf0,0xd3),
+     o3(0x8f,0xe7,0xb8),      o2(0xf0,0xd4),
+          o2(0xb3,0xd7), o3(0x8f,0xe7,0xb9),
+          o2(0xf0,0xd6),      o2(0xbf,0xd9),
+     o3(0x8f,0xe7,0xba),      o2(0xf0,0xd7),
+     o3(0x8f,0xe7,0xbb),      o2(0xb7,0xa4),
+     o3(0x8f,0xe7,0xbc), o3(0x8f,0xe7,0xbd),
+     o3(0x8f,0xe7,0xbe),      o2(0xf0,0xd8),
+          o2(0xf0,0xdc), o3(0x8f,0xe7,0xbf),
+          o2(0xf0,0xda), o3(0x8f,0xe7,0xc0),
+     o3(0x8f,0xe7,0xc1),
+
+#define to_eucJP_ms_E9_9D WORDINDEX2INFO(33719)
+    to_eucJP_ms_E9_9D_offsets,
+    to_eucJP_ms_E9_9D_infos,
+
+#define to_eucJP_ms_E9_A6_infos WORDINDEX2INFO(33721)
+                INVALID,              UNDEF,
+          o2(0xbc,0xf3),      o2(0xf1,0xc4),
+          o2(0xf1,0xc5),      o2(0xb9,0xe1),
+     o3(0x8f,0xe8,0xf7), o3(0x8f,0xe8,0xf8),
+     o3(0x8f,0xf4,0xfa), o3(0x8f,0xe8,0xf9),
+          o2(0xf1,0xc6), o3(0x8f,0xe8,0xfa),
+          o2(0xb3,0xbe),      o2(0xc7,0xcf),
+          o2(0xf1,0xc7),      o2(0xf1,0xc8),
+     o3(0x8f,0xe8,0xfb), o3(0x8f,0xe8,0xfc),
+     o3(0x8f,0xe8,0xfd),      o2(0xc3,0xda),
+          o2(0xc6,0xeb), o3(0x8f,0xe8,0xfe),
+     o3(0x8f,0xe9,0xa1), o3(0x8f,0xe9,0xa2),
+          o2(0xf1,0xc9), o3(0x8f,0xe9,0xa3),
+     o3(0x8f,0xe9,0xa4),
+
+#define to_eucJP_ms_E9_A6 WORDINDEX2INFO(33748)
+    to_eucJP_ms_E9_A6_offsets,
+    to_eucJP_ms_E9_A6_infos,
+
+#define to_eucJP_ms_E9_AB_infos WORDINDEX2INFO(33750)
+                INVALID,      o2(0xf1,0xef),
+     o3(0x8f,0xe9,0xe2),              UNDEF,
+     o3(0x8f,0xe9,0xe3),      o2(0xbf,0xf1),
+     o3(0x8f,0xe9,0xe4), o3(0x8f,0xe9,0xe5),
+     o3(0x8f,0xe9,0xe6),      o2(0xf1,0xf0),
+     o3(0x8f,0xe9,0xe7),      o2(0xf1,0xf1),
+     o3(0x8f,0xe9,0xe8),      o2(0xf1,0xf2),
+          o2(0xf1,0xf3), o3(0x8f,0xe9,0xe9),
+     o3(0x8f,0xe9,0xea), o3(0x8f,0xe9,0xeb),
+          o2(0xb9,0xe2), o3(0x8f,0xf4,0xfb),
+     o3(0x8f,0xe9,0xec), o3(0x8f,0xe9,0xed),
+          o2(0xf1,0xf4),      o2(0xf1,0xf5),
+     o3(0x8f,0xe9,0xee),      o2(0xf1,0xf6),
+          o2(0xf1,0xf7), o3(0x8f,0xe9,0xef),
+     o3(0x8f,0xe9,0xf0),      o2(0xf1,0xf8),
+     o3(0x8f,0xe9,0xf1), o3(0x8f,0xe9,0xf2),
+          o2(0xc8,0xb1),      o2(0xf1,0xfa),
+     o3(0x8f,0xe9,0xf3),      o2(0xc9,0xa6),
+          o2(0xf1,0xfb),      o2(0xf1,0xf9),
+          o2(0xf1,0xfd), o3(0x8f,0xe9,0xf4),
+     o3(0x8f,0xe9,0xf5),      o2(0xf1,0xfc),
+     o3(0x8f,0xe9,0xf6),      o2(0xf1,0xfe),
+     o3(0x8f,0xe9,0xf7), o3(0x8f,0xe9,0xf8),
+          o2(0xf2,0xa1), o3(0x8f,0xe9,0xf9),
+     o3(0x8f,0xe9,0xfa),
+
+#define to_eucJP_ms_E9_AB WORDINDEX2INFO(33799)
+    to_eucJP_ms_E9_AB_offsets,
+    to_eucJP_ms_E9_AB_infos,
+
+#define to_eucJP_ms_E9_AD_infos WORDINDEX2INFO(33801)
+                INVALID,              UNDEF,
+          o2(0xb3,0xa1),      o2(0xba,0xb2),
+          o2(0xf2,0xb1),      o2(0xf2,0xb0),
+          o2(0xcc,0xa5), o3(0x8f,0xea,0xba),
+     o3(0x8f,0xea,0xbb), o3(0x8f,0xea,0xbc),
+          o2(0xf2,0xb3),      o2(0xf2,0xb4),
+          o2(0xf2,0xb2),      o2(0xf2,0xb5),
+          o2(0xcb,0xe2), o3(0x8f,0xea,0xbd),
+     o3(0x8f,0xea,0xbe), o3(0x8f,0xea,0xbf),
+          o2(0xf2,0xb6),      o2(0xb5,0xfb),
+     o3(0x8f,0xea,0xc0), o3(0x8f,0xea,0xc1),
+     o3(0x8f,0xea,0xc2), o3(0x8f,0xea,0xc3),
+     o3(0x8f,0xea,0xc4), o3(0x8f,0xea,0xc5),
+     o3(0x8f,0xea,0xc6), o3(0x8f,0xea,0xc7),
+     o3(0x8f,0xea,0xc8), o3(0x8f,0xea,0xc9),
+     o3(0x8f,0xea,0xca), o3(0x8f,0xea,0xcb),
+          o2(0xcf,0xa5), o3(0x8f,0xf4,0xfc),
+     o3(0x8f,0xea,0xcc),      o2(0xf2,0xb7),
+     o3(0x8f,0xea,0xcd), o3(0x8f,0xea,0xce),
+     o3(0x8f,0xea,0xcf), o3(0x8f,0xea,0xd0),
+     o3(0x8f,0xea,0xd1),
+
+#define to_eucJP_ms_E9_AD WORDINDEX2INFO(33842)
+    to_eucJP_ms_E9_AD_offsets,
+    to_eucJP_ms_E9_AD_infos,
+
+#define to_eucJP_ms_E9_BB_infos WORDINDEX2INFO(33844)
+                INVALID,              UNDEF,
+          o2(0xb2,0xab), o3(0x8f,0xec,0xf1),
+     o3(0x8f,0xec,0xf2), o3(0x8f,0xec,0xf3),
+          o2(0xf3,0xd4),      o2(0xb5,0xd0),
+          o2(0xf3,0xd5),      o2(0xf3,0xd6),
+          o2(0xf3,0xd7), o3(0x8f,0xf4,0xfe),
+          o2(0xb9,0xf5),      o2(0xf3,0xd8),
+     o3(0x8f,0xec,0xf4),      o2(0xe0,0xd4),
+          o2(0xcc,0xdb),      o2(0xc2,0xe3),
+          o2(0xf3,0xd9),      o2(0xf3,0xdb),
+          o2(0xf3,0xda), o3(0x8f,0xec,0xf5),
+          o2(0xf3,0xdc), o3(0x8f,0xec,0xf6),
+          o2(0xf3,0xdd), o3(0x8f,0xec,0xf7),
+          o2(0xf3,0xde), o3(0x8f,0xec,0xf8),
+     o3(0x8f,0xec,0xf9), o3(0x8f,0xec,0xfa),
+          o2(0xf3,0xdf), o3(0x8f,0xec,0xfb),
+     o3(0x8f,0xec,0xfc), o3(0x8f,0xec,0xfd),
+          o2(0xf3,0xe0), o3(0x8f,0xec,0xfe),
+          o2(0xf3,0xe1),      o2(0xf3,0xe2),
+     o3(0x8f,0xed,0xa1),      o2(0xf3,0xe3),
+          o2(0xf3,0xe4),      o2(0xf3,0xe5),
+          o2(0xf3,0xe6), o3(0x8f,0xed,0xa2),
+
+#define to_eucJP_ms_E9_BB WORDINDEX2INFO(33888)
+    to_eucJP_ms_E9_BB_offsets,
+    to_eucJP_ms_E9_BB_infos,
+
+#define to_eucJP_ms_E9_infos WORDINDEX2INFO(33890)
+               INVALID,   to_EUC_JP_E9_80,
+       to_EUC_JP_E9_81,   to_EUC_JP_E9_82,
+     to_eucJP_ms_E9_83, to_eucJP_ms_E9_84,
+       to_EUC_JP_E9_85,   to_EUC_JP_E9_86,
+       to_EUC_JP_E9_87,   to_EUC_JP_E9_88,
+       to_EUC_JP_E9_89,   to_EUC_JP_E9_8A,
+       to_EUC_JP_E9_8B,   to_EUC_JP_E9_8C,
+       to_EUC_JP_E9_8D,   to_EUC_JP_E9_8E,
+       to_EUC_JP_E9_8F,   to_EUC_JP_E9_90,
+       to_EUC_JP_E9_91,   to_EUC_JP_E9_92,
+          to_EUC_JP_C6,   to_EUC_JP_E9_95,
+     to_eucJP_ms_E9_96,   to_EUC_JP_E9_97,
+       to_EUC_JP_E9_98,   to_EUC_JP_E9_99,
+       to_EUC_JP_E9_9A,   to_EUC_JP_E9_9B,
+     to_eucJP_ms_E9_9C, to_eucJP_ms_E9_9D,
+       to_EUC_JP_E9_9E,   to_EUC_JP_E9_9F,
+       to_EUC_JP_E9_A0,   to_EUC_JP_E9_A1,
+       to_EUC_JP_E9_A2,   to_EUC_JP_E9_A3,
+       to_EUC_JP_E9_A4,   to_EUC_JP_E9_A5,
+     to_eucJP_ms_E9_A6,   to_EUC_JP_E9_A7,
+       to_EUC_JP_E9_A8,   to_EUC_JP_E9_A9,
+       to_EUC_JP_E9_AA, to_eucJP_ms_E9_AB,
+       to_EUC_JP_E9_AC, to_eucJP_ms_E9_AD,
+       to_EUC_JP_E9_AE,   to_EUC_JP_E9_AF,
+       to_EUC_JP_E9_B0,   to_EUC_JP_E9_B1,
+       to_EUC_JP_E9_B3,   to_EUC_JP_E9_B4,
+       to_EUC_JP_E9_B5,   to_EUC_JP_E9_B6,
+       to_EUC_JP_E9_B7,   to_EUC_JP_E9_B8,
+       to_EUC_JP_E9_B9,   to_EUC_JP_E9_BA,
+     to_eucJP_ms_E9_BB,   to_EUC_JP_E9_BC,
+       to_EUC_JP_E9_BD,   to_EUC_JP_E9_BE,
+
+#define to_eucJP_ms_E9 WORDINDEX2INFO(33952)
+    to_EUC_JP_E9_offsets,
+    to_eucJP_ms_E9_infos,
+
+#define to_eucJP_ms_EE_80_infos WORDINDEX2INFO(33954)
+           INVALID, o2(0xf5,0xa1), o2(0xf5,0xa2), o2(0xf5,0xa3),
+     o2(0xf5,0xa4), o2(0xf5,0xa5), o2(0xf5,0xa6), o2(0xf5,0xa7),
+     o2(0xf5,0xa8), o2(0xf5,0xa9), o2(0xf5,0xaa), o2(0xf5,0xab),
+     o2(0xf5,0xac), o2(0xf5,0xad), o2(0xf5,0xae), o2(0xf5,0xaf),
+     o2(0xf5,0xb0), o2(0xf5,0xb1), o2(0xf5,0xb2), o2(0xf5,0xb3),
+     o2(0xf5,0xb4), o2(0xf5,0xb5), o2(0xf5,0xb6), o2(0xf5,0xb7),
+     o2(0xf5,0xb8), o2(0xf5,0xb9), o2(0xf5,0xba), o2(0xf5,0xbb),
+     o2(0xf5,0xbc), o2(0xf5,0xbd), o2(0xf5,0xbe), o2(0xf5,0xbf),
+     o2(0xf5,0xc0), o2(0xf5,0xc1), o2(0xf5,0xc2), o2(0xf5,0xc3),
+     o2(0xf5,0xc4), o2(0xf5,0xc5), o2(0xf5,0xc6), o2(0xf5,0xc7),
+     o2(0xf5,0xc8), o2(0xf5,0xc9), o2(0xf5,0xca), o2(0xf5,0xcb),
+     o2(0xf5,0xcc), o2(0xf5,0xcd), o2(0xf5,0xce), o2(0xf5,0xcf),
+     o2(0xf5,0xd0), o2(0xf5,0xd1), o2(0xf5,0xd2), o2(0xf5,0xd3),
+     o2(0xf5,0xd4), o2(0xf5,0xd5), o2(0xf5,0xd6), o2(0xf5,0xd7),
+     o2(0xf5,0xd8), o2(0xf5,0xd9), o2(0xf5,0xda), o2(0xf5,0xdb),
+     o2(0xf5,0xdc), o2(0xf5,0xdd), o2(0xf5,0xde), o2(0xf5,0xdf),
+     o2(0xf5,0xe0),
+
+#define to_eucJP_ms_EE_80 WORDINDEX2INFO(34019)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_80_infos,
+
+#define to_eucJP_ms_EE_81_infos WORDINDEX2INFO(34021)
+           INVALID, o2(0xf5,0xe1), o2(0xf5,0xe2), o2(0xf5,0xe3),
+     o2(0xf5,0xe4), o2(0xf5,0xe5), o2(0xf5,0xe6), o2(0xf5,0xe7),
+     o2(0xf5,0xe8), o2(0xf5,0xe9), o2(0xf5,0xea), o2(0xf5,0xeb),
+     o2(0xf5,0xec), o2(0xf5,0xed), o2(0xf5,0xee), o2(0xf5,0xef),
+     o2(0xf5,0xf0), o2(0xf5,0xf1), o2(0xf5,0xf2), o2(0xf5,0xf3),
+     o2(0xf5,0xf4), o2(0xf5,0xf5), o2(0xf5,0xf6), o2(0xf5,0xf7),
+     o2(0xf5,0xf8), o2(0xf5,0xf9), o2(0xf5,0xfa), o2(0xf5,0xfb),
+     o2(0xf5,0xfc), o2(0xf5,0xfd), o2(0xf5,0xfe), o2(0xf6,0xa1),
+     o2(0xf6,0xa2), o2(0xf6,0xa3), o2(0xf6,0xa4), o2(0xf6,0xa5),
+     o2(0xf6,0xa6), o2(0xf6,0xa7), o2(0xf6,0xa8), o2(0xf6,0xa9),
+     o2(0xf6,0xaa), o2(0xf6,0xab), o2(0xf6,0xac), o2(0xf6,0xad),
+     o2(0xf6,0xae), o2(0xf6,0xaf), o2(0xf6,0xb0), o2(0xf6,0xb1),
+     o2(0xf6,0xb2), o2(0xf6,0xb3), o2(0xf6,0xb4), o2(0xf6,0xb5),
+     o2(0xf6,0xb6), o2(0xf6,0xb7), o2(0xf6,0xb8), o2(0xf6,0xb9),
+     o2(0xf6,0xba), o2(0xf6,0xbb), o2(0xf6,0xbc), o2(0xf6,0xbd),
+     o2(0xf6,0xbe), o2(0xf6,0xbf), o2(0xf6,0xc0), o2(0xf6,0xc1),
+     o2(0xf6,0xc2),
+
+#define to_eucJP_ms_EE_81 WORDINDEX2INFO(34086)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_81_infos,
+
+#define to_eucJP_ms_EE_82_infos WORDINDEX2INFO(34088)
+           INVALID, o2(0xf6,0xc3), o2(0xf6,0xc4), o2(0xf6,0xc5),
+     o2(0xf6,0xc6), o2(0xf6,0xc7), o2(0xf6,0xc8), o2(0xf6,0xc9),
+     o2(0xf6,0xca), o2(0xf6,0xcb), o2(0xf6,0xcc), o2(0xf6,0xcd),
+     o2(0xf6,0xce), o2(0xf6,0xcf), o2(0xf6,0xd0), o2(0xf6,0xd1),
+     o2(0xf6,0xd2), o2(0xf6,0xd3), o2(0xf6,0xd4), o2(0xf6,0xd5),
+     o2(0xf6,0xd6), o2(0xf6,0xd7), o2(0xf6,0xd8), o2(0xf6,0xd9),
+     o2(0xf6,0xda), o2(0xf6,0xdb), o2(0xf6,0xdc), o2(0xf6,0xdd),
+     o2(0xf6,0xde), o2(0xf6,0xdf), o2(0xf6,0xe0), o2(0xf6,0xe1),
+     o2(0xf6,0xe2), o2(0xf6,0xe3), o2(0xf6,0xe4), o2(0xf6,0xe5),
+     o2(0xf6,0xe6), o2(0xf6,0xe7), o2(0xf6,0xe8), o2(0xf6,0xe9),
+     o2(0xf6,0xea), o2(0xf6,0xeb), o2(0xf6,0xec), o2(0xf6,0xed),
+     o2(0xf6,0xee), o2(0xf6,0xef), o2(0xf6,0xf0), o2(0xf6,0xf1),
+     o2(0xf6,0xf2), o2(0xf6,0xf3), o2(0xf6,0xf4), o2(0xf6,0xf5),
+     o2(0xf6,0xf6), o2(0xf6,0xf7), o2(0xf6,0xf8), o2(0xf6,0xf9),
+     o2(0xf6,0xfa), o2(0xf6,0xfb), o2(0xf6,0xfc), o2(0xf6,0xfd),
+     o2(0xf6,0xfe), o2(0xf7,0xa1), o2(0xf7,0xa2), o2(0xf7,0xa3),
+     o2(0xf7,0xa4),
+
+#define to_eucJP_ms_EE_82 WORDINDEX2INFO(34153)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_82_infos,
+
+#define to_eucJP_ms_EE_83_infos WORDINDEX2INFO(34155)
+           INVALID, o2(0xf7,0xa5), o2(0xf7,0xa6), o2(0xf7,0xa7),
+     o2(0xf7,0xa8), o2(0xf7,0xa9), o2(0xf7,0xaa), o2(0xf7,0xab),
+     o2(0xf7,0xac), o2(0xf7,0xad), o2(0xf7,0xae), o2(0xf7,0xaf),
+     o2(0xf7,0xb0), o2(0xf7,0xb1), o2(0xf7,0xb2), o2(0xf7,0xb3),
+     o2(0xf7,0xb4), o2(0xf7,0xb5), o2(0xf7,0xb6), o2(0xf7,0xb7),
+     o2(0xf7,0xb8), o2(0xf7,0xb9), o2(0xf7,0xba), o2(0xf7,0xbb),
+     o2(0xf7,0xbc), o2(0xf7,0xbd), o2(0xf7,0xbe), o2(0xf7,0xbf),
+     o2(0xf7,0xc0), o2(0xf7,0xc1), o2(0xf7,0xc2), o2(0xf7,0xc3),
+     o2(0xf7,0xc4), o2(0xf7,0xc5), o2(0xf7,0xc6), o2(0xf7,0xc7),
+     o2(0xf7,0xc8), o2(0xf7,0xc9), o2(0xf7,0xca), o2(0xf7,0xcb),
+     o2(0xf7,0xcc), o2(0xf7,0xcd), o2(0xf7,0xce), o2(0xf7,0xcf),
+     o2(0xf7,0xd0), o2(0xf7,0xd1), o2(0xf7,0xd2), o2(0xf7,0xd3),
+     o2(0xf7,0xd4), o2(0xf7,0xd5), o2(0xf7,0xd6), o2(0xf7,0xd7),
+     o2(0xf7,0xd8), o2(0xf7,0xd9), o2(0xf7,0xda), o2(0xf7,0xdb),
+     o2(0xf7,0xdc), o2(0xf7,0xdd), o2(0xf7,0xde), o2(0xf7,0xdf),
+     o2(0xf7,0xe0), o2(0xf7,0xe1), o2(0xf7,0xe2), o2(0xf7,0xe3),
+     o2(0xf7,0xe4),
+
+#define to_eucJP_ms_EE_83 WORDINDEX2INFO(34220)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_83_infos,
+
+#define to_eucJP_ms_EE_84_infos WORDINDEX2INFO(34222)
+           INVALID, o2(0xf7,0xe5), o2(0xf7,0xe6), o2(0xf7,0xe7),
+     o2(0xf7,0xe8), o2(0xf7,0xe9), o2(0xf7,0xea), o2(0xf7,0xeb),
+     o2(0xf7,0xec), o2(0xf7,0xed), o2(0xf7,0xee), o2(0xf7,0xef),
+     o2(0xf7,0xf0), o2(0xf7,0xf1), o2(0xf7,0xf2), o2(0xf7,0xf3),
+     o2(0xf7,0xf4), o2(0xf7,0xf5), o2(0xf7,0xf6), o2(0xf7,0xf7),
+     o2(0xf7,0xf8), o2(0xf7,0xf9), o2(0xf7,0xfa), o2(0xf7,0xfb),
+     o2(0xf7,0xfc), o2(0xf7,0xfd), o2(0xf7,0xfe), o2(0xf8,0xa1),
+     o2(0xf8,0xa2), o2(0xf8,0xa3), o2(0xf8,0xa4), o2(0xf8,0xa5),
+     o2(0xf8,0xa6), o2(0xf8,0xa7), o2(0xf8,0xa8), o2(0xf8,0xa9),
+     o2(0xf8,0xaa), o2(0xf8,0xab), o2(0xf8,0xac), o2(0xf8,0xad),
+     o2(0xf8,0xae), o2(0xf8,0xaf), o2(0xf8,0xb0), o2(0xf8,0xb1),
+     o2(0xf8,0xb2), o2(0xf8,0xb3), o2(0xf8,0xb4), o2(0xf8,0xb5),
+     o2(0xf8,0xb6), o2(0xf8,0xb7), o2(0xf8,0xb8), o2(0xf8,0xb9),
+     o2(0xf8,0xba), o2(0xf8,0xbb), o2(0xf8,0xbc), o2(0xf8,0xbd),
+     o2(0xf8,0xbe), o2(0xf8,0xbf), o2(0xf8,0xc0), o2(0xf8,0xc1),
+     o2(0xf8,0xc2), o2(0xf8,0xc3), o2(0xf8,0xc4), o2(0xf8,0xc5),
+     o2(0xf8,0xc6),
+
+#define to_eucJP_ms_EE_84 WORDINDEX2INFO(34287)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_84_infos,
+
+#define to_eucJP_ms_EE_85_infos WORDINDEX2INFO(34289)
+           INVALID, o2(0xf8,0xc7), o2(0xf8,0xc8), o2(0xf8,0xc9),
+     o2(0xf8,0xca), o2(0xf8,0xcb), o2(0xf8,0xcc), o2(0xf8,0xcd),
+     o2(0xf8,0xce), o2(0xf8,0xcf), o2(0xf8,0xd0), o2(0xf8,0xd1),
+     o2(0xf8,0xd2), o2(0xf8,0xd3), o2(0xf8,0xd4), o2(0xf8,0xd5),
+     o2(0xf8,0xd6), o2(0xf8,0xd7), o2(0xf8,0xd8), o2(0xf8,0xd9),
+     o2(0xf8,0xda), o2(0xf8,0xdb), o2(0xf8,0xdc), o2(0xf8,0xdd),
+     o2(0xf8,0xde), o2(0xf8,0xdf), o2(0xf8,0xe0), o2(0xf8,0xe1),
+     o2(0xf8,0xe2), o2(0xf8,0xe3), o2(0xf8,0xe4), o2(0xf8,0xe5),
+     o2(0xf8,0xe6), o2(0xf8,0xe7), o2(0xf8,0xe8), o2(0xf8,0xe9),
+     o2(0xf8,0xea), o2(0xf8,0xeb), o2(0xf8,0xec), o2(0xf8,0xed),
+     o2(0xf8,0xee), o2(0xf8,0xef), o2(0xf8,0xf0), o2(0xf8,0xf1),
+     o2(0xf8,0xf2), o2(0xf8,0xf3), o2(0xf8,0xf4), o2(0xf8,0xf5),
+     o2(0xf8,0xf6), o2(0xf8,0xf7), o2(0xf8,0xf8), o2(0xf8,0xf9),
+     o2(0xf8,0xfa), o2(0xf8,0xfb), o2(0xf8,0xfc), o2(0xf8,0xfd),
+     o2(0xf8,0xfe), o2(0xf9,0xa1), o2(0xf9,0xa2), o2(0xf9,0xa3),
+     o2(0xf9,0xa4), o2(0xf9,0xa5), o2(0xf9,0xa6), o2(0xf9,0xa7),
+     o2(0xf9,0xa8),
+
+#define to_eucJP_ms_EE_85 WORDINDEX2INFO(34354)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_85_infos,
+
+#define to_eucJP_ms_EE_86_infos WORDINDEX2INFO(34356)
+           INVALID, o2(0xf9,0xa9), o2(0xf9,0xaa), o2(0xf9,0xab),
+     o2(0xf9,0xac), o2(0xf9,0xad), o2(0xf9,0xae), o2(0xf9,0xaf),
+     o2(0xf9,0xb0), o2(0xf9,0xb1), o2(0xf9,0xb2), o2(0xf9,0xb3),
+     o2(0xf9,0xb4), o2(0xf9,0xb5), o2(0xf9,0xb6), o2(0xf9,0xb7),
+     o2(0xf9,0xb8), o2(0xf9,0xb9), o2(0xf9,0xba), o2(0xf9,0xbb),
+     o2(0xf9,0xbc), o2(0xf9,0xbd), o2(0xf9,0xbe), o2(0xf9,0xbf),
+     o2(0xf9,0xc0), o2(0xf9,0xc1), o2(0xf9,0xc2), o2(0xf9,0xc3),
+     o2(0xf9,0xc4), o2(0xf9,0xc5), o2(0xf9,0xc6), o2(0xf9,0xc7),
+     o2(0xf9,0xc8), o2(0xf9,0xc9), o2(0xf9,0xca), o2(0xf9,0xcb),
+     o2(0xf9,0xcc), o2(0xf9,0xcd), o2(0xf9,0xce), o2(0xf9,0xcf),
+     o2(0xf9,0xd0), o2(0xf9,0xd1), o2(0xf9,0xd2), o2(0xf9,0xd3),
+     o2(0xf9,0xd4), o2(0xf9,0xd5), o2(0xf9,0xd6), o2(0xf9,0xd7),
+     o2(0xf9,0xd8), o2(0xf9,0xd9), o2(0xf9,0xda), o2(0xf9,0xdb),
+     o2(0xf9,0xdc), o2(0xf9,0xdd), o2(0xf9,0xde), o2(0xf9,0xdf),
+     o2(0xf9,0xe0), o2(0xf9,0xe1), o2(0xf9,0xe2), o2(0xf9,0xe3),
+     o2(0xf9,0xe4), o2(0xf9,0xe5), o2(0xf9,0xe6), o2(0xf9,0xe7),
+     o2(0xf9,0xe8),
+
+#define to_eucJP_ms_EE_86 WORDINDEX2INFO(34421)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_86_infos,
+
+#define to_eucJP_ms_EE_87_infos WORDINDEX2INFO(34423)
+           INVALID, o2(0xf9,0xe9), o2(0xf9,0xea), o2(0xf9,0xeb),
+     o2(0xf9,0xec), o2(0xf9,0xed), o2(0xf9,0xee), o2(0xf9,0xef),
+     o2(0xf9,0xf0), o2(0xf9,0xf1), o2(0xf9,0xf2), o2(0xf9,0xf3),
+     o2(0xf9,0xf4), o2(0xf9,0xf5), o2(0xf9,0xf6), o2(0xf9,0xf7),
+     o2(0xf9,0xf8), o2(0xf9,0xf9), o2(0xf9,0xfa), o2(0xf9,0xfb),
+     o2(0xf9,0xfc), o2(0xf9,0xfd), o2(0xf9,0xfe), o2(0xfa,0xa1),
+     o2(0xfa,0xa2), o2(0xfa,0xa3), o2(0xfa,0xa4), o2(0xfa,0xa5),
+     o2(0xfa,0xa6), o2(0xfa,0xa7), o2(0xfa,0xa8), o2(0xfa,0xa9),
+     o2(0xfa,0xaa), o2(0xfa,0xab), o2(0xfa,0xac), o2(0xfa,0xad),
+     o2(0xfa,0xae), o2(0xfa,0xaf), o2(0xfa,0xb0), o2(0xfa,0xb1),
+     o2(0xfa,0xb2), o2(0xfa,0xb3), o2(0xfa,0xb4), o2(0xfa,0xb5),
+     o2(0xfa,0xb6), o2(0xfa,0xb7), o2(0xfa,0xb8), o2(0xfa,0xb9),
+     o2(0xfa,0xba), o2(0xfa,0xbb), o2(0xfa,0xbc), o2(0xfa,0xbd),
+     o2(0xfa,0xbe), o2(0xfa,0xbf), o2(0xfa,0xc0), o2(0xfa,0xc1),
+     o2(0xfa,0xc2), o2(0xfa,0xc3), o2(0xfa,0xc4), o2(0xfa,0xc5),
+     o2(0xfa,0xc6), o2(0xfa,0xc7), o2(0xfa,0xc8), o2(0xfa,0xc9),
+     o2(0xfa,0xca),
+
+#define to_eucJP_ms_EE_87 WORDINDEX2INFO(34488)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_87_infos,
+
+#define to_eucJP_ms_EE_88_infos WORDINDEX2INFO(34490)
+           INVALID, o2(0xfa,0xcb), o2(0xfa,0xcc), o2(0xfa,0xcd),
+     o2(0xfa,0xce), o2(0xfa,0xcf), o2(0xfa,0xd0), o2(0xfa,0xd1),
+     o2(0xfa,0xd2), o2(0xfa,0xd3), o2(0xfa,0xd4), o2(0xfa,0xd5),
+     o2(0xfa,0xd6), o2(0xfa,0xd7), o2(0xfa,0xd8), o2(0xfa,0xd9),
+     o2(0xfa,0xda), o2(0xfa,0xdb), o2(0xfa,0xdc), o2(0xfa,0xdd),
+     o2(0xfa,0xde), o2(0xfa,0xdf), o2(0xfa,0xe0), o2(0xfa,0xe1),
+     o2(0xfa,0xe2), o2(0xfa,0xe3), o2(0xfa,0xe4), o2(0xfa,0xe5),
+     o2(0xfa,0xe6), o2(0xfa,0xe7), o2(0xfa,0xe8), o2(0xfa,0xe9),
+     o2(0xfa,0xea), o2(0xfa,0xeb), o2(0xfa,0xec), o2(0xfa,0xed),
+     o2(0xfa,0xee), o2(0xfa,0xef), o2(0xfa,0xf0), o2(0xfa,0xf1),
+     o2(0xfa,0xf2), o2(0xfa,0xf3), o2(0xfa,0xf4), o2(0xfa,0xf5),
+     o2(0xfa,0xf6), o2(0xfa,0xf7), o2(0xfa,0xf8), o2(0xfa,0xf9),
+     o2(0xfa,0xfa), o2(0xfa,0xfb), o2(0xfa,0xfc), o2(0xfa,0xfd),
+     o2(0xfa,0xfe), o2(0xfb,0xa1), o2(0xfb,0xa2), o2(0xfb,0xa3),
+     o2(0xfb,0xa4), o2(0xfb,0xa5), o2(0xfb,0xa6), o2(0xfb,0xa7),
+     o2(0xfb,0xa8), o2(0xfb,0xa9), o2(0xfb,0xaa), o2(0xfb,0xab),
+     o2(0xfb,0xac),
+
+#define to_eucJP_ms_EE_88 WORDINDEX2INFO(34555)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_88_infos,
+
+#define to_eucJP_ms_EE_89_infos WORDINDEX2INFO(34557)
+           INVALID, o2(0xfb,0xad), o2(0xfb,0xae), o2(0xfb,0xaf),
+     o2(0xfb,0xb0), o2(0xfb,0xb1), o2(0xfb,0xb2), o2(0xfb,0xb3),
+     o2(0xfb,0xb4), o2(0xfb,0xb5), o2(0xfb,0xb6), o2(0xfb,0xb7),
+     o2(0xfb,0xb8), o2(0xfb,0xb9), o2(0xfb,0xba), o2(0xfb,0xbb),
+     o2(0xfb,0xbc), o2(0xfb,0xbd), o2(0xfb,0xbe), o2(0xfb,0xbf),
+     o2(0xfb,0xc0), o2(0xfb,0xc1), o2(0xfb,0xc2), o2(0xfb,0xc3),
+     o2(0xfb,0xc4), o2(0xfb,0xc5), o2(0xfb,0xc6), o2(0xfb,0xc7),
+     o2(0xfb,0xc8), o2(0xfb,0xc9), o2(0xfb,0xca), o2(0xfb,0xcb),
+     o2(0xfb,0xcc), o2(0xfb,0xcd), o2(0xfb,0xce), o2(0xfb,0xcf),
+     o2(0xfb,0xd0), o2(0xfb,0xd1), o2(0xfb,0xd2), o2(0xfb,0xd3),
+     o2(0xfb,0xd4), o2(0xfb,0xd5), o2(0xfb,0xd6), o2(0xfb,0xd7),
+     o2(0xfb,0xd8), o2(0xfb,0xd9), o2(0xfb,0xda), o2(0xfb,0xdb),
+     o2(0xfb,0xdc), o2(0xfb,0xdd), o2(0xfb,0xde), o2(0xfb,0xdf),
+     o2(0xfb,0xe0), o2(0xfb,0xe1), o2(0xfb,0xe2), o2(0xfb,0xe3),
+     o2(0xfb,0xe4), o2(0xfb,0xe5), o2(0xfb,0xe6), o2(0xfb,0xe7),
+     o2(0xfb,0xe8), o2(0xfb,0xe9), o2(0xfb,0xea), o2(0xfb,0xeb),
+     o2(0xfb,0xec),
+
+#define to_eucJP_ms_EE_89 WORDINDEX2INFO(34622)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_89_infos,
+
+#define to_eucJP_ms_EE_8A_infos WORDINDEX2INFO(34624)
+           INVALID, o2(0xfb,0xed), o2(0xfb,0xee), o2(0xfb,0xef),
+     o2(0xfb,0xf0), o2(0xfb,0xf1), o2(0xfb,0xf2), o2(0xfb,0xf3),
+     o2(0xfb,0xf4), o2(0xfb,0xf5), o2(0xfb,0xf6), o2(0xfb,0xf7),
+     o2(0xfb,0xf8), o2(0xfb,0xf9), o2(0xfb,0xfa), o2(0xfb,0xfb),
+     o2(0xfb,0xfc), o2(0xfb,0xfd), o2(0xfb,0xfe), o2(0xfc,0xa1),
+     o2(0xfc,0xa2), o2(0xfc,0xa3), o2(0xfc,0xa4), o2(0xfc,0xa5),
+     o2(0xfc,0xa6), o2(0xfc,0xa7), o2(0xfc,0xa8), o2(0xfc,0xa9),
+     o2(0xfc,0xaa), o2(0xfc,0xab), o2(0xfc,0xac), o2(0xfc,0xad),
+     o2(0xfc,0xae), o2(0xfc,0xaf), o2(0xfc,0xb0), o2(0xfc,0xb1),
+     o2(0xfc,0xb2), o2(0xfc,0xb3), o2(0xfc,0xb4), o2(0xfc,0xb5),
+     o2(0xfc,0xb6), o2(0xfc,0xb7), o2(0xfc,0xb8), o2(0xfc,0xb9),
+     o2(0xfc,0xba), o2(0xfc,0xbb), o2(0xfc,0xbc), o2(0xfc,0xbd),
+     o2(0xfc,0xbe), o2(0xfc,0xbf), o2(0xfc,0xc0), o2(0xfc,0xc1),
+     o2(0xfc,0xc2), o2(0xfc,0xc3), o2(0xfc,0xc4), o2(0xfc,0xc5),
+     o2(0xfc,0xc6), o2(0xfc,0xc7), o2(0xfc,0xc8), o2(0xfc,0xc9),
+     o2(0xfc,0xca), o2(0xfc,0xcb), o2(0xfc,0xcc), o2(0xfc,0xcd),
+     o2(0xfc,0xce),
+
+#define to_eucJP_ms_EE_8A WORDINDEX2INFO(34689)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8A_infos,
+
+#define to_eucJP_ms_EE_8B_infos WORDINDEX2INFO(34691)
+           INVALID, o2(0xfc,0xcf), o2(0xfc,0xd0), o2(0xfc,0xd1),
+     o2(0xfc,0xd2), o2(0xfc,0xd3), o2(0xfc,0xd4), o2(0xfc,0xd5),
+     o2(0xfc,0xd6), o2(0xfc,0xd7), o2(0xfc,0xd8), o2(0xfc,0xd9),
+     o2(0xfc,0xda), o2(0xfc,0xdb), o2(0xfc,0xdc), o2(0xfc,0xdd),
+     o2(0xfc,0xde), o2(0xfc,0xdf), o2(0xfc,0xe0), o2(0xfc,0xe1),
+     o2(0xfc,0xe2), o2(0xfc,0xe3), o2(0xfc,0xe4), o2(0xfc,0xe5),
+     o2(0xfc,0xe6), o2(0xfc,0xe7), o2(0xfc,0xe8), o2(0xfc,0xe9),
+     o2(0xfc,0xea), o2(0xfc,0xeb), o2(0xfc,0xec), o2(0xfc,0xed),
+     o2(0xfc,0xee), o2(0xfc,0xef), o2(0xfc,0xf0), o2(0xfc,0xf1),
+     o2(0xfc,0xf2), o2(0xfc,0xf3), o2(0xfc,0xf4), o2(0xfc,0xf5),
+     o2(0xfc,0xf6), o2(0xfc,0xf7), o2(0xfc,0xf8), o2(0xfc,0xf9),
+     o2(0xfc,0xfa), o2(0xfc,0xfb), o2(0xfc,0xfc), o2(0xfc,0xfd),
+     o2(0xfc,0xfe), o2(0xfd,0xa1), o2(0xfd,0xa2), o2(0xfd,0xa3),
+     o2(0xfd,0xa4), o2(0xfd,0xa5), o2(0xfd,0xa6), o2(0xfd,0xa7),
+     o2(0xfd,0xa8), o2(0xfd,0xa9), o2(0xfd,0xaa), o2(0xfd,0xab),
+     o2(0xfd,0xac), o2(0xfd,0xad), o2(0xfd,0xae), o2(0xfd,0xaf),
+     o2(0xfd,0xb0),
+
+#define to_eucJP_ms_EE_8B WORDINDEX2INFO(34756)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8B_infos,
+
+#define to_eucJP_ms_EE_8C_infos WORDINDEX2INFO(34758)
+           INVALID, o2(0xfd,0xb1), o2(0xfd,0xb2), o2(0xfd,0xb3),
+     o2(0xfd,0xb4), o2(0xfd,0xb5), o2(0xfd,0xb6), o2(0xfd,0xb7),
+     o2(0xfd,0xb8), o2(0xfd,0xb9), o2(0xfd,0xba), o2(0xfd,0xbb),
+     o2(0xfd,0xbc), o2(0xfd,0xbd), o2(0xfd,0xbe), o2(0xfd,0xbf),
+     o2(0xfd,0xc0), o2(0xfd,0xc1), o2(0xfd,0xc2), o2(0xfd,0xc3),
+     o2(0xfd,0xc4), o2(0xfd,0xc5), o2(0xfd,0xc6), o2(0xfd,0xc7),
+     o2(0xfd,0xc8), o2(0xfd,0xc9), o2(0xfd,0xca), o2(0xfd,0xcb),
+     o2(0xfd,0xcc), o2(0xfd,0xcd), o2(0xfd,0xce), o2(0xfd,0xcf),
+     o2(0xfd,0xd0), o2(0xfd,0xd1), o2(0xfd,0xd2), o2(0xfd,0xd3),
+     o2(0xfd,0xd4), o2(0xfd,0xd5), o2(0xfd,0xd6), o2(0xfd,0xd7),
+     o2(0xfd,0xd8), o2(0xfd,0xd9), o2(0xfd,0xda), o2(0xfd,0xdb),
+     o2(0xfd,0xdc), o2(0xfd,0xdd), o2(0xfd,0xde), o2(0xfd,0xdf),
+     o2(0xfd,0xe0), o2(0xfd,0xe1), o2(0xfd,0xe2), o2(0xfd,0xe3),
+     o2(0xfd,0xe4), o2(0xfd,0xe5), o2(0xfd,0xe6), o2(0xfd,0xe7),
+     o2(0xfd,0xe8), o2(0xfd,0xe9), o2(0xfd,0xea), o2(0xfd,0xeb),
+     o2(0xfd,0xec), o2(0xfd,0xed), o2(0xfd,0xee), o2(0xfd,0xef),
+     o2(0xfd,0xf0),
+
+#define to_eucJP_ms_EE_8C WORDINDEX2INFO(34823)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8C_infos,
+
+#define to_eucJP_ms_EE_8D_infos WORDINDEX2INFO(34825)
+           INVALID, o2(0xfd,0xf1), o2(0xfd,0xf2), o2(0xfd,0xf3),
+     o2(0xfd,0xf4), o2(0xfd,0xf5), o2(0xfd,0xf6), o2(0xfd,0xf7),
+     o2(0xfd,0xf8), o2(0xfd,0xf9), o2(0xfd,0xfa), o2(0xfd,0xfb),
+     o2(0xfd,0xfc), o2(0xfd,0xfd), o2(0xfd,0xfe), o2(0xfe,0xa1),
+     o2(0xfe,0xa2), o2(0xfe,0xa3), o2(0xfe,0xa4), o2(0xfe,0xa5),
+     o2(0xfe,0xa6), o2(0xfe,0xa7), o2(0xfe,0xa8), o2(0xfe,0xa9),
+     o2(0xfe,0xaa), o2(0xfe,0xab), o2(0xfe,0xac), o2(0xfe,0xad),
+     o2(0xfe,0xae), o2(0xfe,0xaf), o2(0xfe,0xb0), o2(0xfe,0xb1),
+     o2(0xfe,0xb2), o2(0xfe,0xb3), o2(0xfe,0xb4), o2(0xfe,0xb5),
+     o2(0xfe,0xb6), o2(0xfe,0xb7), o2(0xfe,0xb8), o2(0xfe,0xb9),
+     o2(0xfe,0xba), o2(0xfe,0xbb), o2(0xfe,0xbc), o2(0xfe,0xbd),
+     o2(0xfe,0xbe), o2(0xfe,0xbf), o2(0xfe,0xc0), o2(0xfe,0xc1),
+     o2(0xfe,0xc2), o2(0xfe,0xc3), o2(0xfe,0xc4), o2(0xfe,0xc5),
+     o2(0xfe,0xc6), o2(0xfe,0xc7), o2(0xfe,0xc8), o2(0xfe,0xc9),
+     o2(0xfe,0xca), o2(0xfe,0xcb), o2(0xfe,0xcc), o2(0xfe,0xcd),
+     o2(0xfe,0xce), o2(0xfe,0xcf), o2(0xfe,0xd0), o2(0xfe,0xd1),
+     o2(0xfe,0xd2),
+
+#define to_eucJP_ms_EE_8D WORDINDEX2INFO(34890)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8D_infos,
+
+#define to_eucJP_ms_EE_8E_infos WORDINDEX2INFO(34892)
+                INVALID,      o2(0xfe,0xd3),
+          o2(0xfe,0xd4),      o2(0xfe,0xd5),
+          o2(0xfe,0xd6),      o2(0xfe,0xd7),
+          o2(0xfe,0xd8),      o2(0xfe,0xd9),
+          o2(0xfe,0xda),      o2(0xfe,0xdb),
+          o2(0xfe,0xdc),      o2(0xfe,0xdd),
+          o2(0xfe,0xde),      o2(0xfe,0xdf),
+          o2(0xfe,0xe0),      o2(0xfe,0xe1),
+          o2(0xfe,0xe2),      o2(0xfe,0xe3),
+          o2(0xfe,0xe4),      o2(0xfe,0xe5),
+          o2(0xfe,0xe6),      o2(0xfe,0xe7),
+          o2(0xfe,0xe8),      o2(0xfe,0xe9),
+          o2(0xfe,0xea),      o2(0xfe,0xeb),
+          o2(0xfe,0xec),      o2(0xfe,0xed),
+          o2(0xfe,0xee),      o2(0xfe,0xef),
+          o2(0xfe,0xf0),      o2(0xfe,0xf1),
+          o2(0xfe,0xf2),      o2(0xfe,0xf3),
+          o2(0xfe,0xf4),      o2(0xfe,0xf5),
+          o2(0xfe,0xf6),      o2(0xfe,0xf7),
+          o2(0xfe,0xf8),      o2(0xfe,0xf9),
+          o2(0xfe,0xfa),      o2(0xfe,0xfb),
+          o2(0xfe,0xfc),      o2(0xfe,0xfd),
+          o2(0xfe,0xfe), o3(0x8f,0xf5,0xa1),
+     o3(0x8f,0xf5,0xa2), o3(0x8f,0xf5,0xa3),
+     o3(0x8f,0xf5,0xa4), o3(0x8f,0xf5,0xa5),
+     o3(0x8f,0xf5,0xa6), o3(0x8f,0xf5,0xa7),
+     o3(0x8f,0xf5,0xa8), o3(0x8f,0xf5,0xa9),
+     o3(0x8f,0xf5,0xaa), o3(0x8f,0xf5,0xab),
+     o3(0x8f,0xf5,0xac), o3(0x8f,0xf5,0xad),
+     o3(0x8f,0xf5,0xae), o3(0x8f,0xf5,0xaf),
+     o3(0x8f,0xf5,0xb0), o3(0x8f,0xf5,0xb1),
+     o3(0x8f,0xf5,0xb2), o3(0x8f,0xf5,0xb3),
+     o3(0x8f,0xf5,0xb4),
+
+#define to_eucJP_ms_EE_8E WORDINDEX2INFO(34957)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8E_infos,
+
+#define to_eucJP_ms_EE_8F_infos WORDINDEX2INFO(34959)
+                INVALID, o3(0x8f,0xf5,0xb5),
+     o3(0x8f,0xf5,0xb6), o3(0x8f,0xf5,0xb7),
+     o3(0x8f,0xf5,0xb8), o3(0x8f,0xf5,0xb9),
+     o3(0x8f,0xf5,0xba), o3(0x8f,0xf5,0xbb),
+     o3(0x8f,0xf5,0xbc), o3(0x8f,0xf5,0xbd),
+     o3(0x8f,0xf5,0xbe), o3(0x8f,0xf5,0xbf),
+     o3(0x8f,0xf5,0xc0), o3(0x8f,0xf5,0xc1),
+     o3(0x8f,0xf5,0xc2), o3(0x8f,0xf5,0xc3),
+     o3(0x8f,0xf5,0xc4), o3(0x8f,0xf5,0xc5),
+     o3(0x8f,0xf5,0xc6), o3(0x8f,0xf5,0xc7),
+     o3(0x8f,0xf5,0xc8), o3(0x8f,0xf5,0xc9),
+     o3(0x8f,0xf5,0xca), o3(0x8f,0xf5,0xcb),
+     o3(0x8f,0xf5,0xcc), o3(0x8f,0xf5,0xcd),
+     o3(0x8f,0xf5,0xce), o3(0x8f,0xf5,0xcf),
+     o3(0x8f,0xf5,0xd0), o3(0x8f,0xf5,0xd1),
+     o3(0x8f,0xf5,0xd2), o3(0x8f,0xf5,0xd3),
+     o3(0x8f,0xf5,0xd4), o3(0x8f,0xf5,0xd5),
+     o3(0x8f,0xf5,0xd6), o3(0x8f,0xf5,0xd7),
+     o3(0x8f,0xf5,0xd8), o3(0x8f,0xf5,0xd9),
+     o3(0x8f,0xf5,0xda), o3(0x8f,0xf5,0xdb),
+     o3(0x8f,0xf5,0xdc), o3(0x8f,0xf5,0xdd),
+     o3(0x8f,0xf5,0xde), o3(0x8f,0xf5,0xdf),
+     o3(0x8f,0xf5,0xe0), o3(0x8f,0xf5,0xe1),
+     o3(0x8f,0xf5,0xe2), o3(0x8f,0xf5,0xe3),
+     o3(0x8f,0xf5,0xe4), o3(0x8f,0xf5,0xe5),
+     o3(0x8f,0xf5,0xe6), o3(0x8f,0xf5,0xe7),
+     o3(0x8f,0xf5,0xe8), o3(0x8f,0xf5,0xe9),
+     o3(0x8f,0xf5,0xea), o3(0x8f,0xf5,0xeb),
+     o3(0x8f,0xf5,0xec), o3(0x8f,0xf5,0xed),
+     o3(0x8f,0xf5,0xee), o3(0x8f,0xf5,0xef),
+     o3(0x8f,0xf5,0xf0), o3(0x8f,0xf5,0xf1),
+     o3(0x8f,0xf5,0xf2), o3(0x8f,0xf5,0xf3),
+     o3(0x8f,0xf5,0xf4),
+
+#define to_eucJP_ms_EE_8F WORDINDEX2INFO(35024)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_8F_infos,
+
+#define to_eucJP_ms_EE_90_infos WORDINDEX2INFO(35026)
+                INVALID, o3(0x8f,0xf5,0xf5),
+     o3(0x8f,0xf5,0xf6), o3(0x8f,0xf5,0xf7),
+     o3(0x8f,0xf5,0xf8), o3(0x8f,0xf5,0xf9),
+     o3(0x8f,0xf5,0xfa), o3(0x8f,0xf5,0xfb),
+     o3(0x8f,0xf5,0xfc), o3(0x8f,0xf5,0xfd),
+     o3(0x8f,0xf5,0xfe), o3(0x8f,0xf6,0xa1),
+     o3(0x8f,0xf6,0xa2), o3(0x8f,0xf6,0xa3),
+     o3(0x8f,0xf6,0xa4), o3(0x8f,0xf6,0xa5),
+     o3(0x8f,0xf6,0xa6), o3(0x8f,0xf6,0xa7),
+     o3(0x8f,0xf6,0xa8), o3(0x8f,0xf6,0xa9),
+     o3(0x8f,0xf6,0xaa), o3(0x8f,0xf6,0xab),
+     o3(0x8f,0xf6,0xac), o3(0x8f,0xf6,0xad),
+     o3(0x8f,0xf6,0xae), o3(0x8f,0xf6,0xaf),
+     o3(0x8f,0xf6,0xb0), o3(0x8f,0xf6,0xb1),
+     o3(0x8f,0xf6,0xb2), o3(0x8f,0xf6,0xb3),
+     o3(0x8f,0xf6,0xb4), o3(0x8f,0xf6,0xb5),
+     o3(0x8f,0xf6,0xb6), o3(0x8f,0xf6,0xb7),
+     o3(0x8f,0xf6,0xb8), o3(0x8f,0xf6,0xb9),
+     o3(0x8f,0xf6,0xba), o3(0x8f,0xf6,0xbb),
+     o3(0x8f,0xf6,0xbc), o3(0x8f,0xf6,0xbd),
+     o3(0x8f,0xf6,0xbe), o3(0x8f,0xf6,0xbf),
+     o3(0x8f,0xf6,0xc0), o3(0x8f,0xf6,0xc1),
+     o3(0x8f,0xf6,0xc2), o3(0x8f,0xf6,0xc3),
+     o3(0x8f,0xf6,0xc4), o3(0x8f,0xf6,0xc5),
+     o3(0x8f,0xf6,0xc6), o3(0x8f,0xf6,0xc7),
+     o3(0x8f,0xf6,0xc8), o3(0x8f,0xf6,0xc9),
+     o3(0x8f,0xf6,0xca), o3(0x8f,0xf6,0xcb),
+     o3(0x8f,0xf6,0xcc), o3(0x8f,0xf6,0xcd),
+     o3(0x8f,0xf6,0xce), o3(0x8f,0xf6,0xcf),
+     o3(0x8f,0xf6,0xd0), o3(0x8f,0xf6,0xd1),
+     o3(0x8f,0xf6,0xd2), o3(0x8f,0xf6,0xd3),
+     o3(0x8f,0xf6,0xd4), o3(0x8f,0xf6,0xd5),
+     o3(0x8f,0xf6,0xd6),
+
+#define to_eucJP_ms_EE_90 WORDINDEX2INFO(35091)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_90_infos,
+
+#define to_eucJP_ms_EE_91_infos WORDINDEX2INFO(35093)
+                INVALID, o3(0x8f,0xf6,0xd7),
+     o3(0x8f,0xf6,0xd8), o3(0x8f,0xf6,0xd9),
+     o3(0x8f,0xf6,0xda), o3(0x8f,0xf6,0xdb),
+     o3(0x8f,0xf6,0xdc), o3(0x8f,0xf6,0xdd),
+     o3(0x8f,0xf6,0xde), o3(0x8f,0xf6,0xdf),
+     o3(0x8f,0xf6,0xe0), o3(0x8f,0xf6,0xe1),
+     o3(0x8f,0xf6,0xe2), o3(0x8f,0xf6,0xe3),
+     o3(0x8f,0xf6,0xe4), o3(0x8f,0xf6,0xe5),
+     o3(0x8f,0xf6,0xe6), o3(0x8f,0xf6,0xe7),
+     o3(0x8f,0xf6,0xe8), o3(0x8f,0xf6,0xe9),
+     o3(0x8f,0xf6,0xea), o3(0x8f,0xf6,0xeb),
+     o3(0x8f,0xf6,0xec), o3(0x8f,0xf6,0xed),
+     o3(0x8f,0xf6,0xee), o3(0x8f,0xf6,0xef),
+     o3(0x8f,0xf6,0xf0), o3(0x8f,0xf6,0xf1),
+     o3(0x8f,0xf6,0xf2), o3(0x8f,0xf6,0xf3),
+     o3(0x8f,0xf6,0xf4), o3(0x8f,0xf6,0xf5),
+     o3(0x8f,0xf6,0xf6), o3(0x8f,0xf6,0xf7),
+     o3(0x8f,0xf6,0xf8), o3(0x8f,0xf6,0xf9),
+     o3(0x8f,0xf6,0xfa), o3(0x8f,0xf6,0xfb),
+     o3(0x8f,0xf6,0xfc), o3(0x8f,0xf6,0xfd),
+     o3(0x8f,0xf6,0xfe), o3(0x8f,0xf7,0xa1),
+     o3(0x8f,0xf7,0xa2), o3(0x8f,0xf7,0xa3),
+     o3(0x8f,0xf7,0xa4), o3(0x8f,0xf7,0xa5),
+     o3(0x8f,0xf7,0xa6), o3(0x8f,0xf7,0xa7),
+     o3(0x8f,0xf7,0xa8), o3(0x8f,0xf7,0xa9),
+     o3(0x8f,0xf7,0xaa), o3(0x8f,0xf7,0xab),
+     o3(0x8f,0xf7,0xac), o3(0x8f,0xf7,0xad),
+     o3(0x8f,0xf7,0xae), o3(0x8f,0xf7,0xaf),
+     o3(0x8f,0xf7,0xb0), o3(0x8f,0xf7,0xb1),
+     o3(0x8f,0xf7,0xb2), o3(0x8f,0xf7,0xb3),
+     o3(0x8f,0xf7,0xb4), o3(0x8f,0xf7,0xb5),
+     o3(0x8f,0xf7,0xb6), o3(0x8f,0xf7,0xb7),
+     o3(0x8f,0xf7,0xb8),
+
+#define to_eucJP_ms_EE_91 WORDINDEX2INFO(35158)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_91_infos,
+
+#define to_eucJP_ms_EE_92_infos WORDINDEX2INFO(35160)
+                INVALID, o3(0x8f,0xf7,0xb9),
+     o3(0x8f,0xf7,0xba), o3(0x8f,0xf7,0xbb),
+     o3(0x8f,0xf7,0xbc), o3(0x8f,0xf7,0xbd),
+     o3(0x8f,0xf7,0xbe), o3(0x8f,0xf7,0xbf),
+     o3(0x8f,0xf7,0xc0), o3(0x8f,0xf7,0xc1),
+     o3(0x8f,0xf7,0xc2), o3(0x8f,0xf7,0xc3),
+     o3(0x8f,0xf7,0xc4), o3(0x8f,0xf7,0xc5),
+     o3(0x8f,0xf7,0xc6), o3(0x8f,0xf7,0xc7),
+     o3(0x8f,0xf7,0xc8), o3(0x8f,0xf7,0xc9),
+     o3(0x8f,0xf7,0xca), o3(0x8f,0xf7,0xcb),
+     o3(0x8f,0xf7,0xcc), o3(0x8f,0xf7,0xcd),
+     o3(0x8f,0xf7,0xce), o3(0x8f,0xf7,0xcf),
+     o3(0x8f,0xf7,0xd0), o3(0x8f,0xf7,0xd1),
+     o3(0x8f,0xf7,0xd2), o3(0x8f,0xf7,0xd3),
+     o3(0x8f,0xf7,0xd4), o3(0x8f,0xf7,0xd5),
+     o3(0x8f,0xf7,0xd6), o3(0x8f,0xf7,0xd7),
+     o3(0x8f,0xf7,0xd8), o3(0x8f,0xf7,0xd9),
+     o3(0x8f,0xf7,0xda), o3(0x8f,0xf7,0xdb),
+     o3(0x8f,0xf7,0xdc), o3(0x8f,0xf7,0xdd),
+     o3(0x8f,0xf7,0xde), o3(0x8f,0xf7,0xdf),
+     o3(0x8f,0xf7,0xe0), o3(0x8f,0xf7,0xe1),
+     o3(0x8f,0xf7,0xe2), o3(0x8f,0xf7,0xe3),
+     o3(0x8f,0xf7,0xe4), o3(0x8f,0xf7,0xe5),
+     o3(0x8f,0xf7,0xe6), o3(0x8f,0xf7,0xe7),
+     o3(0x8f,0xf7,0xe8), o3(0x8f,0xf7,0xe9),
+     o3(0x8f,0xf7,0xea), o3(0x8f,0xf7,0xeb),
+     o3(0x8f,0xf7,0xec), o3(0x8f,0xf7,0xed),
+     o3(0x8f,0xf7,0xee), o3(0x8f,0xf7,0xef),
+     o3(0x8f,0xf7,0xf0), o3(0x8f,0xf7,0xf1),
+     o3(0x8f,0xf7,0xf2), o3(0x8f,0xf7,0xf3),
+     o3(0x8f,0xf7,0xf4), o3(0x8f,0xf7,0xf5),
+     o3(0x8f,0xf7,0xf6), o3(0x8f,0xf7,0xf7),
+     o3(0x8f,0xf7,0xf8),
+
+#define to_eucJP_ms_EE_92 WORDINDEX2INFO(35225)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_92_infos,
+
+#define to_eucJP_ms_EE_93_infos WORDINDEX2INFO(35227)
+                INVALID, o3(0x8f,0xf7,0xf9),
+     o3(0x8f,0xf7,0xfa), o3(0x8f,0xf7,0xfb),
+     o3(0x8f,0xf7,0xfc), o3(0x8f,0xf7,0xfd),
+     o3(0x8f,0xf7,0xfe), o3(0x8f,0xf8,0xa1),
+     o3(0x8f,0xf8,0xa2), o3(0x8f,0xf8,0xa3),
+     o3(0x8f,0xf8,0xa4), o3(0x8f,0xf8,0xa5),
+     o3(0x8f,0xf8,0xa6), o3(0x8f,0xf8,0xa7),
+     o3(0x8f,0xf8,0xa8), o3(0x8f,0xf8,0xa9),
+     o3(0x8f,0xf8,0xaa), o3(0x8f,0xf8,0xab),
+     o3(0x8f,0xf8,0xac), o3(0x8f,0xf8,0xad),
+     o3(0x8f,0xf8,0xae), o3(0x8f,0xf8,0xaf),
+     o3(0x8f,0xf8,0xb0), o3(0x8f,0xf8,0xb1),
+     o3(0x8f,0xf8,0xb2), o3(0x8f,0xf8,0xb3),
+     o3(0x8f,0xf8,0xb4), o3(0x8f,0xf8,0xb5),
+     o3(0x8f,0xf8,0xb6), o3(0x8f,0xf8,0xb7),
+     o3(0x8f,0xf8,0xb8), o3(0x8f,0xf8,0xb9),
+     o3(0x8f,0xf8,0xba), o3(0x8f,0xf8,0xbb),
+     o3(0x8f,0xf8,0xbc), o3(0x8f,0xf8,0xbd),
+     o3(0x8f,0xf8,0xbe), o3(0x8f,0xf8,0xbf),
+     o3(0x8f,0xf8,0xc0), o3(0x8f,0xf8,0xc1),
+     o3(0x8f,0xf8,0xc2), o3(0x8f,0xf8,0xc3),
+     o3(0x8f,0xf8,0xc4), o3(0x8f,0xf8,0xc5),
+     o3(0x8f,0xf8,0xc6), o3(0x8f,0xf8,0xc7),
+     o3(0x8f,0xf8,0xc8), o3(0x8f,0xf8,0xc9),
+     o3(0x8f,0xf8,0xca), o3(0x8f,0xf8,0xcb),
+     o3(0x8f,0xf8,0xcc), o3(0x8f,0xf8,0xcd),
+     o3(0x8f,0xf8,0xce), o3(0x8f,0xf8,0xcf),
+     o3(0x8f,0xf8,0xd0), o3(0x8f,0xf8,0xd1),
+     o3(0x8f,0xf8,0xd2), o3(0x8f,0xf8,0xd3),
+     o3(0x8f,0xf8,0xd4), o3(0x8f,0xf8,0xd5),
+     o3(0x8f,0xf8,0xd6), o3(0x8f,0xf8,0xd7),
+     o3(0x8f,0xf8,0xd8), o3(0x8f,0xf8,0xd9),
+     o3(0x8f,0xf8,0xda),
+
+#define to_eucJP_ms_EE_93 WORDINDEX2INFO(35292)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_93_infos,
+
+#define to_eucJP_ms_EE_94_infos WORDINDEX2INFO(35294)
+                INVALID, o3(0x8f,0xf8,0xdb),
+     o3(0x8f,0xf8,0xdc), o3(0x8f,0xf8,0xdd),
+     o3(0x8f,0xf8,0xde), o3(0x8f,0xf8,0xdf),
+     o3(0x8f,0xf8,0xe0), o3(0x8f,0xf8,0xe1),
+     o3(0x8f,0xf8,0xe2), o3(0x8f,0xf8,0xe3),
+     o3(0x8f,0xf8,0xe4), o3(0x8f,0xf8,0xe5),
+     o3(0x8f,0xf8,0xe6), o3(0x8f,0xf8,0xe7),
+     o3(0x8f,0xf8,0xe8), o3(0x8f,0xf8,0xe9),
+     o3(0x8f,0xf8,0xea), o3(0x8f,0xf8,0xeb),
+     o3(0x8f,0xf8,0xec), o3(0x8f,0xf8,0xed),
+     o3(0x8f,0xf8,0xee), o3(0x8f,0xf8,0xef),
+     o3(0x8f,0xf8,0xf0), o3(0x8f,0xf8,0xf1),
+     o3(0x8f,0xf8,0xf2), o3(0x8f,0xf8,0xf3),
+     o3(0x8f,0xf8,0xf4), o3(0x8f,0xf8,0xf5),
+     o3(0x8f,0xf8,0xf6), o3(0x8f,0xf8,0xf7),
+     o3(0x8f,0xf8,0xf8), o3(0x8f,0xf8,0xf9),
+     o3(0x8f,0xf8,0xfa), o3(0x8f,0xf8,0xfb),
+     o3(0x8f,0xf8,0xfc), o3(0x8f,0xf8,0xfd),
+     o3(0x8f,0xf8,0xfe), o3(0x8f,0xf9,0xa1),
+     o3(0x8f,0xf9,0xa2), o3(0x8f,0xf9,0xa3),
+     o3(0x8f,0xf9,0xa4), o3(0x8f,0xf9,0xa5),
+     o3(0x8f,0xf9,0xa6), o3(0x8f,0xf9,0xa7),
+     o3(0x8f,0xf9,0xa8), o3(0x8f,0xf9,0xa9),
+     o3(0x8f,0xf9,0xaa), o3(0x8f,0xf9,0xab),
+     o3(0x8f,0xf9,0xac), o3(0x8f,0xf9,0xad),
+     o3(0x8f,0xf9,0xae), o3(0x8f,0xf9,0xaf),
+     o3(0x8f,0xf9,0xb0), o3(0x8f,0xf9,0xb1),
+     o3(0x8f,0xf9,0xb2), o3(0x8f,0xf9,0xb3),
+     o3(0x8f,0xf9,0xb4), o3(0x8f,0xf9,0xb5),
+     o3(0x8f,0xf9,0xb6), o3(0x8f,0xf9,0xb7),
+     o3(0x8f,0xf9,0xb8), o3(0x8f,0xf9,0xb9),
+     o3(0x8f,0xf9,0xba), o3(0x8f,0xf9,0xbb),
+     o3(0x8f,0xf9,0xbc),
+
+#define to_eucJP_ms_EE_94 WORDINDEX2INFO(35359)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_94_infos,
+
+#define to_eucJP_ms_EE_95_infos WORDINDEX2INFO(35361)
+                INVALID, o3(0x8f,0xf9,0xbd),
+     o3(0x8f,0xf9,0xbe), o3(0x8f,0xf9,0xbf),
+     o3(0x8f,0xf9,0xc0), o3(0x8f,0xf9,0xc1),
+     o3(0x8f,0xf9,0xc2), o3(0x8f,0xf9,0xc3),
+     o3(0x8f,0xf9,0xc4), o3(0x8f,0xf9,0xc5),
+     o3(0x8f,0xf9,0xc6), o3(0x8f,0xf9,0xc7),
+     o3(0x8f,0xf9,0xc8), o3(0x8f,0xf9,0xc9),
+     o3(0x8f,0xf9,0xca), o3(0x8f,0xf9,0xcb),
+     o3(0x8f,0xf9,0xcc), o3(0x8f,0xf9,0xcd),
+     o3(0x8f,0xf9,0xce), o3(0x8f,0xf9,0xcf),
+     o3(0x8f,0xf9,0xd0), o3(0x8f,0xf9,0xd1),
+     o3(0x8f,0xf9,0xd2), o3(0x8f,0xf9,0xd3),
+     o3(0x8f,0xf9,0xd4), o3(0x8f,0xf9,0xd5),
+     o3(0x8f,0xf9,0xd6), o3(0x8f,0xf9,0xd7),
+     o3(0x8f,0xf9,0xd8), o3(0x8f,0xf9,0xd9),
+     o3(0x8f,0xf9,0xda), o3(0x8f,0xf9,0xdb),
+     o3(0x8f,0xf9,0xdc), o3(0x8f,0xf9,0xdd),
+     o3(0x8f,0xf9,0xde), o3(0x8f,0xf9,0xdf),
+     o3(0x8f,0xf9,0xe0), o3(0x8f,0xf9,0xe1),
+     o3(0x8f,0xf9,0xe2), o3(0x8f,0xf9,0xe3),
+     o3(0x8f,0xf9,0xe4), o3(0x8f,0xf9,0xe5),
+     o3(0x8f,0xf9,0xe6), o3(0x8f,0xf9,0xe7),
+     o3(0x8f,0xf9,0xe8), o3(0x8f,0xf9,0xe9),
+     o3(0x8f,0xf9,0xea), o3(0x8f,0xf9,0xeb),
+     o3(0x8f,0xf9,0xec), o3(0x8f,0xf9,0xed),
+     o3(0x8f,0xf9,0xee), o3(0x8f,0xf9,0xef),
+     o3(0x8f,0xf9,0xf0), o3(0x8f,0xf9,0xf1),
+     o3(0x8f,0xf9,0xf2), o3(0x8f,0xf9,0xf3),
+     o3(0x8f,0xf9,0xf4), o3(0x8f,0xf9,0xf5),
+     o3(0x8f,0xf9,0xf6), o3(0x8f,0xf9,0xf7),
+     o3(0x8f,0xf9,0xf8), o3(0x8f,0xf9,0xf9),
+     o3(0x8f,0xf9,0xfa), o3(0x8f,0xf9,0xfb),
+     o3(0x8f,0xf9,0xfc),
+
+#define to_eucJP_ms_EE_95 WORDINDEX2INFO(35426)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_95_infos,
+
+#define to_eucJP_ms_EE_96_infos WORDINDEX2INFO(35428)
+                INVALID, o3(0x8f,0xf9,0xfd),
+     o3(0x8f,0xf9,0xfe), o3(0x8f,0xfa,0xa1),
+     o3(0x8f,0xfa,0xa2), o3(0x8f,0xfa,0xa3),
+     o3(0x8f,0xfa,0xa4), o3(0x8f,0xfa,0xa5),
+     o3(0x8f,0xfa,0xa6), o3(0x8f,0xfa,0xa7),
+     o3(0x8f,0xfa,0xa8), o3(0x8f,0xfa,0xa9),
+     o3(0x8f,0xfa,0xaa), o3(0x8f,0xfa,0xab),
+     o3(0x8f,0xfa,0xac), o3(0x8f,0xfa,0xad),
+     o3(0x8f,0xfa,0xae), o3(0x8f,0xfa,0xaf),
+     o3(0x8f,0xfa,0xb0), o3(0x8f,0xfa,0xb1),
+     o3(0x8f,0xfa,0xb2), o3(0x8f,0xfa,0xb3),
+     o3(0x8f,0xfa,0xb4), o3(0x8f,0xfa,0xb5),
+     o3(0x8f,0xfa,0xb6), o3(0x8f,0xfa,0xb7),
+     o3(0x8f,0xfa,0xb8), o3(0x8f,0xfa,0xb9),
+     o3(0x8f,0xfa,0xba), o3(0x8f,0xfa,0xbb),
+     o3(0x8f,0xfa,0xbc), o3(0x8f,0xfa,0xbd),
+     o3(0x8f,0xfa,0xbe), o3(0x8f,0xfa,0xbf),
+     o3(0x8f,0xfa,0xc0), o3(0x8f,0xfa,0xc1),
+     o3(0x8f,0xfa,0xc2), o3(0x8f,0xfa,0xc3),
+     o3(0x8f,0xfa,0xc4), o3(0x8f,0xfa,0xc5),
+     o3(0x8f,0xfa,0xc6), o3(0x8f,0xfa,0xc7),
+     o3(0x8f,0xfa,0xc8), o3(0x8f,0xfa,0xc9),
+     o3(0x8f,0xfa,0xca), o3(0x8f,0xfa,0xcb),
+     o3(0x8f,0xfa,0xcc), o3(0x8f,0xfa,0xcd),
+     o3(0x8f,0xfa,0xce), o3(0x8f,0xfa,0xcf),
+     o3(0x8f,0xfa,0xd0), o3(0x8f,0xfa,0xd1),
+     o3(0x8f,0xfa,0xd2), o3(0x8f,0xfa,0xd3),
+     o3(0x8f,0xfa,0xd4), o3(0x8f,0xfa,0xd5),
+     o3(0x8f,0xfa,0xd6), o3(0x8f,0xfa,0xd7),
+     o3(0x8f,0xfa,0xd8), o3(0x8f,0xfa,0xd9),
+     o3(0x8f,0xfa,0xda), o3(0x8f,0xfa,0xdb),
+     o3(0x8f,0xfa,0xdc), o3(0x8f,0xfa,0xdd),
+     o3(0x8f,0xfa,0xde),
+
+#define to_eucJP_ms_EE_96 WORDINDEX2INFO(35493)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_96_infos,
+
+#define to_eucJP_ms_EE_97_infos WORDINDEX2INFO(35495)
+                INVALID, o3(0x8f,0xfa,0xdf),
+     o3(0x8f,0xfa,0xe0), o3(0x8f,0xfa,0xe1),
+     o3(0x8f,0xfa,0xe2), o3(0x8f,0xfa,0xe3),
+     o3(0x8f,0xfa,0xe4), o3(0x8f,0xfa,0xe5),
+     o3(0x8f,0xfa,0xe6), o3(0x8f,0xfa,0xe7),
+     o3(0x8f,0xfa,0xe8), o3(0x8f,0xfa,0xe9),
+     o3(0x8f,0xfa,0xea), o3(0x8f,0xfa,0xeb),
+     o3(0x8f,0xfa,0xec), o3(0x8f,0xfa,0xed),
+     o3(0x8f,0xfa,0xee), o3(0x8f,0xfa,0xef),
+     o3(0x8f,0xfa,0xf0), o3(0x8f,0xfa,0xf1),
+     o3(0x8f,0xfa,0xf2), o3(0x8f,0xfa,0xf3),
+     o3(0x8f,0xfa,0xf4), o3(0x8f,0xfa,0xf5),
+     o3(0x8f,0xfa,0xf6), o3(0x8f,0xfa,0xf7),
+     o3(0x8f,0xfa,0xf8), o3(0x8f,0xfa,0xf9),
+     o3(0x8f,0xfa,0xfa), o3(0x8f,0xfa,0xfb),
+     o3(0x8f,0xfa,0xfc), o3(0x8f,0xfa,0xfd),
+     o3(0x8f,0xfa,0xfe), o3(0x8f,0xfb,0xa1),
+     o3(0x8f,0xfb,0xa2), o3(0x8f,0xfb,0xa3),
+     o3(0x8f,0xfb,0xa4), o3(0x8f,0xfb,0xa5),
+     o3(0x8f,0xfb,0xa6), o3(0x8f,0xfb,0xa7),
+     o3(0x8f,0xfb,0xa8), o3(0x8f,0xfb,0xa9),
+     o3(0x8f,0xfb,0xaa), o3(0x8f,0xfb,0xab),
+     o3(0x8f,0xfb,0xac), o3(0x8f,0xfb,0xad),
+     o3(0x8f,0xfb,0xae), o3(0x8f,0xfb,0xaf),
+     o3(0x8f,0xfb,0xb0), o3(0x8f,0xfb,0xb1),
+     o3(0x8f,0xfb,0xb2), o3(0x8f,0xfb,0xb3),
+     o3(0x8f,0xfb,0xb4), o3(0x8f,0xfb,0xb5),
+     o3(0x8f,0xfb,0xb6), o3(0x8f,0xfb,0xb7),
+     o3(0x8f,0xfb,0xb8), o3(0x8f,0xfb,0xb9),
+     o3(0x8f,0xfb,0xba), o3(0x8f,0xfb,0xbb),
+     o3(0x8f,0xfb,0xbc), o3(0x8f,0xfb,0xbd),
+     o3(0x8f,0xfb,0xbe), o3(0x8f,0xfb,0xbf),
+     o3(0x8f,0xfb,0xc0),
+
+#define to_eucJP_ms_EE_97 WORDINDEX2INFO(35560)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_97_infos,
+
+#define to_eucJP_ms_EE_98_infos WORDINDEX2INFO(35562)
+                INVALID, o3(0x8f,0xfb,0xc1),
+     o3(0x8f,0xfb,0xc2), o3(0x8f,0xfb,0xc3),
+     o3(0x8f,0xfb,0xc4), o3(0x8f,0xfb,0xc5),
+     o3(0x8f,0xfb,0xc6), o3(0x8f,0xfb,0xc7),
+     o3(0x8f,0xfb,0xc8), o3(0x8f,0xfb,0xc9),
+     o3(0x8f,0xfb,0xca), o3(0x8f,0xfb,0xcb),
+     o3(0x8f,0xfb,0xcc), o3(0x8f,0xfb,0xcd),
+     o3(0x8f,0xfb,0xce), o3(0x8f,0xfb,0xcf),
+     o3(0x8f,0xfb,0xd0), o3(0x8f,0xfb,0xd1),
+     o3(0x8f,0xfb,0xd2), o3(0x8f,0xfb,0xd3),
+     o3(0x8f,0xfb,0xd4), o3(0x8f,0xfb,0xd5),
+     o3(0x8f,0xfb,0xd6), o3(0x8f,0xfb,0xd7),
+     o3(0x8f,0xfb,0xd8), o3(0x8f,0xfb,0xd9),
+     o3(0x8f,0xfb,0xda), o3(0x8f,0xfb,0xdb),
+     o3(0x8f,0xfb,0xdc), o3(0x8f,0xfb,0xdd),
+     o3(0x8f,0xfb,0xde), o3(0x8f,0xfb,0xdf),
+     o3(0x8f,0xfb,0xe0), o3(0x8f,0xfb,0xe1),
+     o3(0x8f,0xfb,0xe2), o3(0x8f,0xfb,0xe3),
+     o3(0x8f,0xfb,0xe4), o3(0x8f,0xfb,0xe5),
+     o3(0x8f,0xfb,0xe6), o3(0x8f,0xfb,0xe7),
+     o3(0x8f,0xfb,0xe8), o3(0x8f,0xfb,0xe9),
+     o3(0x8f,0xfb,0xea), o3(0x8f,0xfb,0xeb),
+     o3(0x8f,0xfb,0xec), o3(0x8f,0xfb,0xed),
+     o3(0x8f,0xfb,0xee), o3(0x8f,0xfb,0xef),
+     o3(0x8f,0xfb,0xf0), o3(0x8f,0xfb,0xf1),
+     o3(0x8f,0xfb,0xf2), o3(0x8f,0xfb,0xf3),
+     o3(0x8f,0xfb,0xf4), o3(0x8f,0xfb,0xf5),
+     o3(0x8f,0xfb,0xf6), o3(0x8f,0xfb,0xf7),
+     o3(0x8f,0xfb,0xf8), o3(0x8f,0xfb,0xf9),
+     o3(0x8f,0xfb,0xfa), o3(0x8f,0xfb,0xfb),
+     o3(0x8f,0xfb,0xfc), o3(0x8f,0xfb,0xfd),
+     o3(0x8f,0xfb,0xfe), o3(0x8f,0xfc,0xa1),
+     o3(0x8f,0xfc,0xa2),
+
+#define to_eucJP_ms_EE_98 WORDINDEX2INFO(35627)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_98_infos,
+
+#define to_eucJP_ms_EE_99_infos WORDINDEX2INFO(35629)
+                INVALID, o3(0x8f,0xfc,0xa3),
+     o3(0x8f,0xfc,0xa4), o3(0x8f,0xfc,0xa5),
+     o3(0x8f,0xfc,0xa6), o3(0x8f,0xfc,0xa7),
+     o3(0x8f,0xfc,0xa8), o3(0x8f,0xfc,0xa9),
+     o3(0x8f,0xfc,0xaa), o3(0x8f,0xfc,0xab),
+     o3(0x8f,0xfc,0xac), o3(0x8f,0xfc,0xad),
+     o3(0x8f,0xfc,0xae), o3(0x8f,0xfc,0xaf),
+     o3(0x8f,0xfc,0xb0), o3(0x8f,0xfc,0xb1),
+     o3(0x8f,0xfc,0xb2), o3(0x8f,0xfc,0xb3),
+     o3(0x8f,0xfc,0xb4), o3(0x8f,0xfc,0xb5),
+     o3(0x8f,0xfc,0xb6), o3(0x8f,0xfc,0xb7),
+     o3(0x8f,0xfc,0xb8), o3(0x8f,0xfc,0xb9),
+     o3(0x8f,0xfc,0xba), o3(0x8f,0xfc,0xbb),
+     o3(0x8f,0xfc,0xbc), o3(0x8f,0xfc,0xbd),
+     o3(0x8f,0xfc,0xbe), o3(0x8f,0xfc,0xbf),
+     o3(0x8f,0xfc,0xc0), o3(0x8f,0xfc,0xc1),
+     o3(0x8f,0xfc,0xc2), o3(0x8f,0xfc,0xc3),
+     o3(0x8f,0xfc,0xc4), o3(0x8f,0xfc,0xc5),
+     o3(0x8f,0xfc,0xc6), o3(0x8f,0xfc,0xc7),
+     o3(0x8f,0xfc,0xc8), o3(0x8f,0xfc,0xc9),
+     o3(0x8f,0xfc,0xca), o3(0x8f,0xfc,0xcb),
+     o3(0x8f,0xfc,0xcc), o3(0x8f,0xfc,0xcd),
+     o3(0x8f,0xfc,0xce), o3(0x8f,0xfc,0xcf),
+     o3(0x8f,0xfc,0xd0), o3(0x8f,0xfc,0xd1),
+     o3(0x8f,0xfc,0xd2), o3(0x8f,0xfc,0xd3),
+     o3(0x8f,0xfc,0xd4), o3(0x8f,0xfc,0xd5),
+     o3(0x8f,0xfc,0xd6), o3(0x8f,0xfc,0xd7),
+     o3(0x8f,0xfc,0xd8), o3(0x8f,0xfc,0xd9),
+     o3(0x8f,0xfc,0xda), o3(0x8f,0xfc,0xdb),
+     o3(0x8f,0xfc,0xdc), o3(0x8f,0xfc,0xdd),
+     o3(0x8f,0xfc,0xde), o3(0x8f,0xfc,0xdf),
+     o3(0x8f,0xfc,0xe0), o3(0x8f,0xfc,0xe1),
+     o3(0x8f,0xfc,0xe2),
+
+#define to_eucJP_ms_EE_99 WORDINDEX2INFO(35694)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_99_infos,
+
+#define to_eucJP_ms_EE_9A_infos WORDINDEX2INFO(35696)
+                INVALID, o3(0x8f,0xfc,0xe3),
+     o3(0x8f,0xfc,0xe4), o3(0x8f,0xfc,0xe5),
+     o3(0x8f,0xfc,0xe6), o3(0x8f,0xfc,0xe7),
+     o3(0x8f,0xfc,0xe8), o3(0x8f,0xfc,0xe9),
+     o3(0x8f,0xfc,0xea), o3(0x8f,0xfc,0xeb),
+     o3(0x8f,0xfc,0xec), o3(0x8f,0xfc,0xed),
+     o3(0x8f,0xfc,0xee), o3(0x8f,0xfc,0xef),
+     o3(0x8f,0xfc,0xf0), o3(0x8f,0xfc,0xf1),
+     o3(0x8f,0xfc,0xf2), o3(0x8f,0xfc,0xf3),
+     o3(0x8f,0xfc,0xf4), o3(0x8f,0xfc,0xf5),
+     o3(0x8f,0xfc,0xf6), o3(0x8f,0xfc,0xf7),
+     o3(0x8f,0xfc,0xf8), o3(0x8f,0xfc,0xf9),
+     o3(0x8f,0xfc,0xfa), o3(0x8f,0xfc,0xfb),
+     o3(0x8f,0xfc,0xfc), o3(0x8f,0xfc,0xfd),
+     o3(0x8f,0xfc,0xfe), o3(0x8f,0xfd,0xa1),
+     o3(0x8f,0xfd,0xa2), o3(0x8f,0xfd,0xa3),
+     o3(0x8f,0xfd,0xa4), o3(0x8f,0xfd,0xa5),
+     o3(0x8f,0xfd,0xa6), o3(0x8f,0xfd,0xa7),
+     o3(0x8f,0xfd,0xa8), o3(0x8f,0xfd,0xa9),
+     o3(0x8f,0xfd,0xaa), o3(0x8f,0xfd,0xab),
+     o3(0x8f,0xfd,0xac), o3(0x8f,0xfd,0xad),
+     o3(0x8f,0xfd,0xae), o3(0x8f,0xfd,0xaf),
+     o3(0x8f,0xfd,0xb0), o3(0x8f,0xfd,0xb1),
+     o3(0x8f,0xfd,0xb2), o3(0x8f,0xfd,0xb3),
+     o3(0x8f,0xfd,0xb4), o3(0x8f,0xfd,0xb5),
+     o3(0x8f,0xfd,0xb6), o3(0x8f,0xfd,0xb7),
+     o3(0x8f,0xfd,0xb8), o3(0x8f,0xfd,0xb9),
+     o3(0x8f,0xfd,0xba), o3(0x8f,0xfd,0xbb),
+     o3(0x8f,0xfd,0xbc), o3(0x8f,0xfd,0xbd),
+     o3(0x8f,0xfd,0xbe), o3(0x8f,0xfd,0xbf),
+     o3(0x8f,0xfd,0xc0), o3(0x8f,0xfd,0xc1),
+     o3(0x8f,0xfd,0xc2), o3(0x8f,0xfd,0xc3),
+     o3(0x8f,0xfd,0xc4),
+
+#define to_eucJP_ms_EE_9A WORDINDEX2INFO(35761)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_9A_infos,
+
+#define to_eucJP_ms_EE_9B_infos WORDINDEX2INFO(35763)
+                INVALID, o3(0x8f,0xfd,0xc5),
+     o3(0x8f,0xfd,0xc6), o3(0x8f,0xfd,0xc7),
+     o3(0x8f,0xfd,0xc8), o3(0x8f,0xfd,0xc9),
+     o3(0x8f,0xfd,0xca), o3(0x8f,0xfd,0xcb),
+     o3(0x8f,0xfd,0xcc), o3(0x8f,0xfd,0xcd),
+     o3(0x8f,0xfd,0xce), o3(0x8f,0xfd,0xcf),
+     o3(0x8f,0xfd,0xd0), o3(0x8f,0xfd,0xd1),
+     o3(0x8f,0xfd,0xd2), o3(0x8f,0xfd,0xd3),
+     o3(0x8f,0xfd,0xd4), o3(0x8f,0xfd,0xd5),
+     o3(0x8f,0xfd,0xd6), o3(0x8f,0xfd,0xd7),
+     o3(0x8f,0xfd,0xd8), o3(0x8f,0xfd,0xd9),
+     o3(0x8f,0xfd,0xda), o3(0x8f,0xfd,0xdb),
+     o3(0x8f,0xfd,0xdc), o3(0x8f,0xfd,0xdd),
+     o3(0x8f,0xfd,0xde), o3(0x8f,0xfd,0xdf),
+     o3(0x8f,0xfd,0xe0), o3(0x8f,0xfd,0xe1),
+     o3(0x8f,0xfd,0xe2), o3(0x8f,0xfd,0xe3),
+     o3(0x8f,0xfd,0xe4), o3(0x8f,0xfd,0xe5),
+     o3(0x8f,0xfd,0xe6), o3(0x8f,0xfd,0xe7),
+     o3(0x8f,0xfd,0xe8), o3(0x8f,0xfd,0xe9),
+     o3(0x8f,0xfd,0xea), o3(0x8f,0xfd,0xeb),
+     o3(0x8f,0xfd,0xec), o3(0x8f,0xfd,0xed),
+     o3(0x8f,0xfd,0xee), o3(0x8f,0xfd,0xef),
+     o3(0x8f,0xfd,0xf0), o3(0x8f,0xfd,0xf1),
+     o3(0x8f,0xfd,0xf2), o3(0x8f,0xfd,0xf3),
+     o3(0x8f,0xfd,0xf4), o3(0x8f,0xfd,0xf5),
+     o3(0x8f,0xfd,0xf6), o3(0x8f,0xfd,0xf7),
+     o3(0x8f,0xfd,0xf8), o3(0x8f,0xfd,0xf9),
+     o3(0x8f,0xfd,0xfa), o3(0x8f,0xfd,0xfb),
+     o3(0x8f,0xfd,0xfc), o3(0x8f,0xfd,0xfd),
+     o3(0x8f,0xfd,0xfe), o3(0x8f,0xfe,0xa1),
+     o3(0x8f,0xfe,0xa2), o3(0x8f,0xfe,0xa3),
+     o3(0x8f,0xfe,0xa4), o3(0x8f,0xfe,0xa5),
+     o3(0x8f,0xfe,0xa6),
+
+#define to_eucJP_ms_EE_9B WORDINDEX2INFO(35828)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_9B_infos,
+
+#define to_eucJP_ms_EE_9C_infos WORDINDEX2INFO(35830)
+                INVALID, o3(0x8f,0xfe,0xa7),
+     o3(0x8f,0xfe,0xa8), o3(0x8f,0xfe,0xa9),
+     o3(0x8f,0xfe,0xaa), o3(0x8f,0xfe,0xab),
+     o3(0x8f,0xfe,0xac), o3(0x8f,0xfe,0xad),
+     o3(0x8f,0xfe,0xae), o3(0x8f,0xfe,0xaf),
+     o3(0x8f,0xfe,0xb0), o3(0x8f,0xfe,0xb1),
+     o3(0x8f,0xfe,0xb2), o3(0x8f,0xfe,0xb3),
+     o3(0x8f,0xfe,0xb4), o3(0x8f,0xfe,0xb5),
+     o3(0x8f,0xfe,0xb6), o3(0x8f,0xfe,0xb7),
+     o3(0x8f,0xfe,0xb8), o3(0x8f,0xfe,0xb9),
+     o3(0x8f,0xfe,0xba), o3(0x8f,0xfe,0xbb),
+     o3(0x8f,0xfe,0xbc), o3(0x8f,0xfe,0xbd),
+     o3(0x8f,0xfe,0xbe), o3(0x8f,0xfe,0xbf),
+     o3(0x8f,0xfe,0xc0), o3(0x8f,0xfe,0xc1),
+     o3(0x8f,0xfe,0xc2), o3(0x8f,0xfe,0xc3),
+     o3(0x8f,0xfe,0xc4), o3(0x8f,0xfe,0xc5),
+     o3(0x8f,0xfe,0xc6), o3(0x8f,0xfe,0xc7),
+     o3(0x8f,0xfe,0xc8), o3(0x8f,0xfe,0xc9),
+     o3(0x8f,0xfe,0xca), o3(0x8f,0xfe,0xcb),
+     o3(0x8f,0xfe,0xcc), o3(0x8f,0xfe,0xcd),
+     o3(0x8f,0xfe,0xce), o3(0x8f,0xfe,0xcf),
+     o3(0x8f,0xfe,0xd0), o3(0x8f,0xfe,0xd1),
+     o3(0x8f,0xfe,0xd2), o3(0x8f,0xfe,0xd3),
+     o3(0x8f,0xfe,0xd4), o3(0x8f,0xfe,0xd5),
+     o3(0x8f,0xfe,0xd6), o3(0x8f,0xfe,0xd7),
+     o3(0x8f,0xfe,0xd8), o3(0x8f,0xfe,0xd9),
+     o3(0x8f,0xfe,0xda), o3(0x8f,0xfe,0xdb),
+     o3(0x8f,0xfe,0xdc), o3(0x8f,0xfe,0xdd),
+     o3(0x8f,0xfe,0xde), o3(0x8f,0xfe,0xdf),
+     o3(0x8f,0xfe,0xe0), o3(0x8f,0xfe,0xe1),
+     o3(0x8f,0xfe,0xe2), o3(0x8f,0xfe,0xe3),
+     o3(0x8f,0xfe,0xe4), o3(0x8f,0xfe,0xe5),
+     o3(0x8f,0xfe,0xe6),
+
+#define to_eucJP_ms_EE_9C WORDINDEX2INFO(35895)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EE_9C_infos,
+
+#define to_eucJP_ms_EE_9D_infos WORDINDEX2INFO(35897)
+                INVALID, o3(0x8f,0xfe,0xe7),
+     o3(0x8f,0xfe,0xe8), o3(0x8f,0xfe,0xe9),
+     o3(0x8f,0xfe,0xea), o3(0x8f,0xfe,0xeb),
+     o3(0x8f,0xfe,0xec), o3(0x8f,0xfe,0xed),
+     o3(0x8f,0xfe,0xee), o3(0x8f,0xfe,0xef),
+     o3(0x8f,0xfe,0xf0), o3(0x8f,0xfe,0xf1),
+     o3(0x8f,0xfe,0xf2), o3(0x8f,0xfe,0xf3),
+     o3(0x8f,0xfe,0xf4), o3(0x8f,0xfe,0xf5),
+     o3(0x8f,0xfe,0xf6), o3(0x8f,0xfe,0xf7),
+     o3(0x8f,0xfe,0xf8), o3(0x8f,0xfe,0xf9),
+     o3(0x8f,0xfe,0xfa), o3(0x8f,0xfe,0xfb),
+     o3(0x8f,0xfe,0xfc), o3(0x8f,0xfe,0xfd),
+     o3(0x8f,0xfe,0xfe),              UNDEF,
+
+#define to_eucJP_ms_EE_9D WORDINDEX2INFO(35923)
+    to_eucJP_ms_EE_9D_offsets,
+    to_eucJP_ms_EE_9D_infos,
+
+#define to_eucJP_ms_EE_infos WORDINDEX2INFO(35925)
+               INVALID, to_eucJP_ms_EE_80,
+     to_eucJP_ms_EE_81, to_eucJP_ms_EE_82,
+     to_eucJP_ms_EE_83, to_eucJP_ms_EE_84,
+     to_eucJP_ms_EE_85, to_eucJP_ms_EE_86,
+     to_eucJP_ms_EE_87, to_eucJP_ms_EE_88,
+     to_eucJP_ms_EE_89, to_eucJP_ms_EE_8A,
+     to_eucJP_ms_EE_8B, to_eucJP_ms_EE_8C,
+     to_eucJP_ms_EE_8D, to_eucJP_ms_EE_8E,
+     to_eucJP_ms_EE_8F, to_eucJP_ms_EE_90,
+     to_eucJP_ms_EE_91, to_eucJP_ms_EE_92,
+     to_eucJP_ms_EE_93, to_eucJP_ms_EE_94,
+     to_eucJP_ms_EE_95, to_eucJP_ms_EE_96,
+     to_eucJP_ms_EE_97, to_eucJP_ms_EE_98,
+     to_eucJP_ms_EE_99, to_eucJP_ms_EE_9A,
+     to_eucJP_ms_EE_9B, to_eucJP_ms_EE_9C,
+     to_eucJP_ms_EE_9D,      to_EUC_JP_C6,
+
+#define to_eucJP_ms_EE WORDINDEX2INFO(35957)
+    to_eucJP_ms_EE_offsets,
+    to_eucJP_ms_EE_infos,
+
+#define to_eucJP_ms_EF_A4_infos WORDINDEX2INFO(35959)
+                INVALID,              UNDEF,
+     o3(0x8f,0xf4,0xc5),
+
+#define to_eucJP_ms_EF_A4 WORDINDEX2INFO(35962)
+    to_eucJP_ms_EF_A4_offsets,
+    to_eucJP_ms_EF_A4_infos,
+
+#define to_eucJP_ms_EF_A7_infos WORDINDEX2INFO(35964)
+                INVALID,              UNDEF,
+     o3(0x8f,0xf4,0xf2),
+
+#define to_eucJP_ms_EF_A7 WORDINDEX2INFO(35967)
+    to_eucJP_ms_EF_A7_offsets,
+    to_eucJP_ms_EF_A7_infos,
+
+#define to_eucJP_ms_EF_A8_infos WORDINDEX2INFO(35969)
+                INVALID,              UNDEF,
+     o3(0x8f,0xf4,0xb4), o3(0x8f,0xf4,0xb7),
+     o3(0x8f,0xf4,0xb8), o3(0x8f,0xf4,0xbd),
+     o3(0x8f,0xf4,0xc4), o3(0x8f,0xf4,0xc7),
+     o3(0x8f,0xf4,0xc8), o3(0x8f,0xf4,0xce),
+     o3(0x8f,0xf4,0xcf), o3(0x8f,0xf4,0xd3),
+     o3(0x8f,0xf4,0xd5), o3(0x8f,0xf4,0xd6),
+     o3(0x8f,0xf4,0xd7), o3(0x8f,0xf4,0xd8),
+     o3(0x8f,0xf4,0xda), o3(0x8f,0xf4,0xdb),
+     o3(0x8f,0xf4,0xde), o3(0x8f,0xf4,0xe0),
+     o3(0x8f,0xf4,0xe2), o3(0x8f,0xf4,0xe3),
+     o3(0x8f,0xf4,0xe5), o3(0x8f,0xf4,0xe9),
+     o3(0x8f,0xf4,0xea), o3(0x8f,0xf4,0xeb),
+     o3(0x8f,0xf4,0xed), o3(0x8f,0xf4,0xef),
+     o3(0x8f,0xf4,0xf0), o3(0x8f,0xf4,0xf3),
+     o3(0x8f,0xf4,0xf7), o3(0x8f,0xf4,0xf8),
+     o3(0x8f,0xf4,0xf9), o3(0x8f,0xf4,0xfd),
+
+#define to_eucJP_ms_EF_A8 WORDINDEX2INFO(36003)
+    to_eucJP_ms_EF_A8_offsets,
+    to_eucJP_ms_EF_A8_infos,
+
+#define to_eucJP_ms_EF_BC_infos WORDINDEX2INFO(36005)
+                INVALID,              UNDEF,
+          o2(0xa1,0xaa), o3(0x8f,0xf4,0xaa),
+          o2(0xa1,0xf4),      o2(0xa1,0xf0),
+          o2(0xa1,0xf3),      o2(0xa1,0xf5),
+     o3(0x8f,0xf4,0xa9),      o2(0xa1,0xca),
+          o2(0xa1,0xcb),      o2(0xa1,0xf6),
+          o2(0xa1,0xdc),      o2(0xa1,0xa4),
+          o2(0xa1,0xdd),      o2(0xa1,0xa5),
+          o2(0xa1,0xbf),      o2(0xa3,0xb0),
+          o2(0xa3,0xb1),      o2(0xa3,0xb2),
+          o2(0xa3,0xb3),      o2(0xa3,0xb4),
+          o2(0xa3,0xb5),      o2(0xa3,0xb6),
+          o2(0xa3,0xb7),      o2(0xa3,0xb8),
+          o2(0xa3,0xb9),      o2(0xa1,0xa7),
+          o2(0xa1,0xa8),      o2(0xa1,0xe3),
+          o2(0xa1,0xe1),      o2(0xa1,0xe4),
+          o2(0xa1,0xa9),      o2(0xa1,0xf7),
+          o2(0xa3,0xc1),      o2(0xa3,0xc2),
+          o2(0xa3,0xc3),      o2(0xa3,0xc4),
+          o2(0xa3,0xc5),      o2(0xa3,0xc6),
+          o2(0xa3,0xc7),      o2(0xa3,0xc8),
+          o2(0xa3,0xc9),      o2(0xa3,0xca),
+          o2(0xa3,0xcb),      o2(0xa3,0xcc),
+          o2(0xa3,0xcd),      o2(0xa3,0xce),
+          o2(0xa3,0xcf),      o2(0xa3,0xd0),
+          o2(0xa3,0xd1),      o2(0xa3,0xd2),
+          o2(0xa3,0xd3),      o2(0xa3,0xd4),
+          o2(0xa3,0xd5),      o2(0xa3,0xd6),
+          o2(0xa3,0xd7),      o2(0xa3,0xd8),
+          o2(0xa3,0xd9),      o2(0xa3,0xda),
+          o2(0xa1,0xce),      o2(0xa1,0xc0),
+          o2(0xa1,0xcf),      o2(0xa1,0xb0),
+          o2(0xa1,0xb2),
+
+#define to_eucJP_ms_EF_BC WORDINDEX2INFO(36070)
+    to_EUC_JP_C3_offsets,
+    to_eucJP_ms_EF_BC_infos,
+
+#define to_eucJP_ms_EF_BD_infos WORDINDEX2INFO(36072)
+           INVALID, o2(0xa1,0xae), o2(0xa3,0xe1), o2(0xa3,0xe2),
+     o2(0xa3,0xe3), o2(0xa3,0xe4), o2(0xa3,0xe5), o2(0xa3,0xe6),
+     o2(0xa3,0xe7), o2(0xa3,0xe8), o2(0xa3,0xe9), o2(0xa3,0xea),
+     o2(0xa3,0xeb), o2(0xa3,0xec), o2(0xa3,0xed), o2(0xa3,0xee),
+     o2(0xa3,0xef), o2(0xa3,0xf0), o2(0xa3,0xf1), o2(0xa3,0xf2),
+     o2(0xa3,0xf3), o2(0xa3,0xf4), o2(0xa3,0xf5), o2(0xa3,0xf6),
+     o2(0xa3,0xf7), o2(0xa3,0xf8), o2(0xa3,0xf9), o2(0xa3,0xfa),
+     o2(0xa1,0xd0), o2(0xa1,0xc3), o2(0xa1,0xd1), o2(0xa1,0xc1),
+             UNDEF, o2(0x8e,0xa1), o2(0x8e,0xa2), o2(0x8e,0xa3),
+     o2(0x8e,0xa4), o2(0x8e,0xa5), o2(0x8e,0xa6), o2(0x8e,0xa7),
+     o2(0x8e,0xa8), o2(0x8e,0xa9), o2(0x8e,0xaa), o2(0x8e,0xab),
+     o2(0x8e,0xac), o2(0x8e,0xad), o2(0x8e,0xae), o2(0x8e,0xaf),
+     o2(0x8e,0xb0), o2(0x8e,0xb1), o2(0x8e,0xb2), o2(0x8e,0xb3),
+     o2(0x8e,0xb4), o2(0x8e,0xb5), o2(0x8e,0xb6), o2(0x8e,0xb7),
+     o2(0x8e,0xb8), o2(0x8e,0xb9), o2(0x8e,0xba), o2(0x8e,0xbb),
+     o2(0x8e,0xbc), o2(0x8e,0xbd), o2(0x8e,0xbe), o2(0x8e,0xbf),
+
+#define to_eucJP_ms_EF_BD WORDINDEX2INFO(36136)
+    to_eucJP_ms_EF_BD_offsets,
+    to_eucJP_ms_EF_BD_infos,
+
+#define to_eucJP_ms_EF_BF_infos WORDINDEX2INFO(36138)
+                INVALID,              UNDEF,
+          o2(0xa1,0xf1),      o2(0xa1,0xf2),
+          o2(0xa2,0xcc),      o2(0xa1,0xb1),
+     o3(0x8f,0xa2,0xc3),      o2(0xa1,0xef),
+
+#define to_eucJP_ms_EF_BF WORDINDEX2INFO(36146)
+    to_eucJP_ms_EF_BF_offsets,
+    to_eucJP_ms_EF_BF_infos,
+
+#define to_eucJP_ms_EF_infos WORDINDEX2INFO(36148)
+               INVALID,      to_EUC_JP_C6,
+     to_eucJP_ms_EF_A4, to_eucJP_ms_EF_A7,
+     to_eucJP_ms_EF_A8, to_eucJP_ms_EF_BC,
+     to_eucJP_ms_EF_BD,   to_EUC_JP_EF_BE,
+     to_eucJP_ms_EF_BF,
+
+#define to_eucJP_ms_EF WORDINDEX2INFO(36157)
+    to_eucJP_ms_EF_offsets,
+    to_eucJP_ms_EF_infos,
+
+#define to_eucJP_ms_infos WORDINDEX2INFO(36159)
+              NOMAP,        INVALID, to_eucJP_ms_C2,   to_EUC_JP_C3,
+       to_EUC_JP_C4,   to_EUC_JP_C5,   to_EUC_JP_C6,   to_EUC_JP_C7,
+       to_EUC_JP_CB,   to_EUC_JP_CE,   to_EUC_JP_CF,   to_EUC_JP_D0,
+       to_EUC_JP_D1,   to_EUC_JP_E0,   to_EUC_JP_E1, to_eucJP_ms_E2,
+     to_eucJP_ms_E3, to_eucJP_ms_E4, to_eucJP_ms_E5, to_eucJP_ms_E6,
+     to_eucJP_ms_E7, to_eucJP_ms_E8, to_eucJP_ms_E9,   to_EUC_JP_ED,
+     to_eucJP_ms_EE, to_eucJP_ms_EF,   to_EUC_JP_F0,   to_EUC_JP_F1,
+       to_EUC_JP_F4,
+
+#define to_eucJP_ms WORDINDEX2INFO(36188)
+    to_eucJP_ms_offsets,
+    to_eucJP_ms_infos,
+
+#define to_CP51932_C2_infos WORDINDEX2INFO(36190)
+           INVALID,         UNDEF, o2(0xa1,0xf8), o2(0xa1,0xaf),
+     o2(0xa1,0xeb), o2(0xa1,0xde), o2(0xa1,0xad), o2(0xa2,0xf9),
+
+#define to_CP51932_C2 WORDINDEX2INFO(36198)
+    to_CP51932_C2_offsets,
+    to_CP51932_C2_infos,
+
+#define to_CP51932_C3_infos WORDINDEX2INFO(36200)
+           INVALID,         UNDEF, o2(0xa1,0xdf), o2(0xa1,0xe0),
+
+#define to_CP51932_C3 WORDINDEX2INFO(36204)
+    to_CP51932_C3_offsets,
+    to_CP51932_C3_infos,
+
+#define to_CP51932_CE_infos WORDINDEX2INFO(36206)
+           INVALID,         UNDEF, o2(0xa6,0xa1), o2(0xa6,0xa2),
+     o2(0xa6,0xa3), o2(0xa6,0xa4), o2(0xa6,0xa5), o2(0xa6,0xa6),
+     o2(0xa6,0xa7), o2(0xa6,0xa8), o2(0xa6,0xa9), o2(0xa6,0xaa),
+     o2(0xa6,0xab), o2(0xa6,0xac), o2(0xa6,0xad), o2(0xa6,0xae),
+     o2(0xa6,0xaf), o2(0xa6,0xb0), o2(0xa6,0xb1), o2(0xa6,0xb2),
+     o2(0xa6,0xb3), o2(0xa6,0xb4), o2(0xa6,0xb5), o2(0xa6,0xb6),
+     o2(0xa6,0xb7), o2(0xa6,0xb8), o2(0xa6,0xc1), o2(0xa6,0xc2),
+     o2(0xa6,0xc3), o2(0xa6,0xc4), o2(0xa6,0xc5), o2(0xa6,0xc6),
+     o2(0xa6,0xc7), o2(0xa6,0xc8), o2(0xa6,0xc9), o2(0xa6,0xca),
+     o2(0xa6,0xcb), o2(0xa6,0xcc), o2(0xa6,0xcd), o2(0xa6,0xce),
+     o2(0xa6,0xcf),
+
+#define to_CP51932_CE WORDINDEX2INFO(36247)
+    to_CP51932_CE_offsets,
+    to_CP51932_CE_infos,
+
+#define to_CP51932_CF_infos WORDINDEX2INFO(36249)
+           INVALID, o2(0xa6,0xd0), o2(0xa6,0xd1),         UNDEF,
+     o2(0xa6,0xd2), o2(0xa6,0xd3), o2(0xa6,0xd4), o2(0xa6,0xd5),
+     o2(0xa6,0xd6), o2(0xa6,0xd7), o2(0xa6,0xd8),
+
+#define to_CP51932_CF WORDINDEX2INFO(36260)
+    to_CP51932_CF_offsets,
+    to_CP51932_CF_infos,
+
+#define to_CP51932_D0_infos WORDINDEX2INFO(36262)
+           INVALID,         UNDEF, o2(0xa7,0xa7), o2(0xa7,0xa1),
+     o2(0xa7,0xa2), o2(0xa7,0xa3), o2(0xa7,0xa4), o2(0xa7,0xa5),
+     o2(0xa7,0xa6), o2(0xa7,0xa8), o2(0xa7,0xa9), o2(0xa7,0xaa),
+     o2(0xa7,0xab), o2(0xa7,0xac), o2(0xa7,0xad), o2(0xa7,0xae),
+     o2(0xa7,0xaf), o2(0xa7,0xb0), o2(0xa7,0xb1), o2(0xa7,0xb2),
+     o2(0xa7,0xb3), o2(0xa7,0xb4), o2(0xa7,0xb5), o2(0xa7,0xb6),
+     o2(0xa7,0xb7), o2(0xa7,0xb8), o2(0xa7,0xb9), o2(0xa7,0xba),
+     o2(0xa7,0xbb), o2(0xa7,0xbc), o2(0xa7,0xbd), o2(0xa7,0xbe),
+     o2(0xa7,0xbf), o2(0xa7,0xc0), o2(0xa7,0xc1), o2(0xa7,0xd1),
+     o2(0xa7,0xd2), o2(0xa7,0xd3), o2(0xa7,0xd4), o2(0xa7,0xd5),
+     o2(0xa7,0xd6), o2(0xa7,0xd8), o2(0xa7,0xd9), o2(0xa7,0xda),
+     o2(0xa7,0xdb), o2(0xa7,0xdc), o2(0xa7,0xdd), o2(0xa7,0xde),
+     o2(0xa7,0xdf), o2(0xa7,0xe0), o2(0xa7,0xe1),
+
+#define to_CP51932_D0 WORDINDEX2INFO(36313)
+    to_CP51932_D0_offsets,
+    to_CP51932_D0_infos,
+
+#define to_CP51932_D1_infos WORDINDEX2INFO(36315)
+           INVALID, o2(0xa7,0xe2), o2(0xa7,0xe3), o2(0xa7,0xe4),
+     o2(0xa7,0xe5), o2(0xa7,0xe6), o2(0xa7,0xe7), o2(0xa7,0xe8),
+     o2(0xa7,0xe9), o2(0xa7,0xea), o2(0xa7,0xeb), o2(0xa7,0xec),
+     o2(0xa7,0xed), o2(0xa7,0xee), o2(0xa7,0xef), o2(0xa7,0xf0),
+     o2(0xa7,0xf1),         UNDEF, o2(0xa7,0xd7),
+
+#define to_CP51932_D1 WORDINDEX2INFO(36334)
+    to_CP51932_D1_offsets,
+    to_CP51932_D1_infos,
+
+#define to_CP51932_E2_84_infos WORDINDEX2INFO(36336)
+           INVALID,         UNDEF, o2(0xa1,0xee), o2(0xad,0xe2),
+     o2(0xad,0xe4), o2(0xa2,0xf2),
+
+#define to_CP51932_E2_84 WORDINDEX2INFO(36342)
+    to_CP51932_E2_84_offsets,
+    to_CP51932_E2_84_infos,
+
+#define to_CP51932_E2_85_infos WORDINDEX2INFO(36344)
+           INVALID,         UNDEF, o2(0xad,0xb5), o2(0xad,0xb6),
+     o2(0xad,0xb7), o2(0xad,0xb8), o2(0xad,0xb9), o2(0xad,0xba),
+     o2(0xad,0xbb), o2(0xad,0xbc), o2(0xad,0xbd), o2(0xad,0xbe),
+     o2(0xfc,0xf1), o2(0xfc,0xf2), o2(0xfc,0xf3), o2(0xfc,0xf4),
+     o2(0xfc,0xf5), o2(0xfc,0xf6), o2(0xfc,0xf7), o2(0xfc,0xf8),
+     o2(0xfc,0xf9), o2(0xfc,0xfa),
+
+#define to_CP51932_E2_85 WORDINDEX2INFO(36366)
+    to_eucJP_ms_E2_85_offsets,
+    to_CP51932_E2_85_infos,
+
+#define to_CP51932_E2_infos WORDINDEX2INFO(36368)
+               INVALID, to_eucJP_ms_E2_80,
+          to_EUC_JP_C6,  to_CP51932_E2_84,
+      to_CP51932_E2_85,   to_EUC_JP_E2_86,
+       to_EUC_JP_E2_87, to_eucJP_ms_E2_88,
+       to_EUC_JP_E2_89, to_eucJP_ms_E2_8A,
+       to_EUC_JP_E2_8C, to_eucJP_ms_E2_91,
+       to_EUC_JP_E2_94,   to_EUC_JP_E2_95,
+       to_EUC_JP_E2_96,   to_EUC_JP_E2_97,
+       to_EUC_JP_E2_98,   to_EUC_JP_E2_99,
+
+#define to_CP51932_E2 WORDINDEX2INFO(36386)
+    to_eucJP_ms_E2_offsets,
+    to_CP51932_E2_infos,
+
+#define to_CP51932_E4_B8_infos WORDINDEX2INFO(36388)
+           INVALID, o2(0xb0,0xec), o2(0xc3,0xfa),         UNDEF,
+     o2(0xbc,0xb7), o2(0xcb,0xfc), o2(0xbe,0xe6), o2(0xbb,0xb0),
+     o2(0xbe,0xe5), o2(0xb2,0xbc), o2(0xc9,0xd4), o2(0xcd,0xbf),
+     o2(0xd0,0xa2), o2(0xb1,0xaf), o2(0xb3,0xee), o2(0xd0,0xa3),
+     o2(0xc0,0xa4), o2(0xd2,0xc2), o2(0xb5,0xd6), o2(0xca,0xba),
+     o2(0xbe,0xe7), o2(0xce,0xbe), o2(0xca,0xc2), o2(0xf9,0xad),
+     o2(0xd0,0xa4), o2(0xc3,0xe6), o2(0xd0,0xa5), o2(0xb6,0xfa),
+     o2(0xd0,0xa6), o2(0xb4,0xdd), o2(0xc3,0xb0), o2(0xbc,0xe7),
+     o2(0xd0,0xa7), o2(0xd0,0xa8),
+
+#define to_CP51932_E4_B8 WORDINDEX2INFO(36422)
+    to_CP51932_E4_B8_offsets,
+    to_CP51932_E4_B8_infos,
+
+#define to_CP51932_E4_B9_infos WORDINDEX2INFO(36424)
+           INVALID,         UNDEF, o2(0xd0,0xa9), o2(0xc7,0xb5),
+     o2(0xb5,0xd7), o2(0xc7,0xb7), o2(0xc6,0xe3), o2(0xb8,0xc3),
+     o2(0xcb,0xb3), o2(0xe9,0xc9), o2(0xd0,0xaa), o2(0xbe,0xe8),
+     o2(0xd0,0xab), o2(0xb2,0xb5), o2(0xb6,0xe5), o2(0xb8,0xf0),
+     o2(0xcc,0xe9), o2(0xd6,0xa6), o2(0xcd,0xf0), o2(0xc6,0xfd),
+     o2(0xb4,0xa5),
+
+#define to_CP51932_E4_B9 WORDINDEX2INFO(36445)
+    to_CP51932_E4_B9_offsets,
+    to_CP51932_E4_B9_infos,
+
+#define to_CP51932_E4_BA_infos WORDINDEX2INFO(36447)
+           INVALID, o2(0xb5,0xb5),         UNDEF, o2(0xd0,0xac),
+     o2(0xd0,0xad), o2(0xce,0xbb), o2(0xcd,0xbd), o2(0xc1,0xe8),
+     o2(0xd0,0xaf), o2(0xbb,0xf6), o2(0xc6,0xf3), o2(0xd0,0xb2),
+     o2(0xb1,0xbe), o2(0xb8,0xdf), o2(0xb8,0xde), o2(0xb0,0xe6),
+     o2(0xcf,0xcb), o2(0xcf,0xca), o2(0xba,0xb3), o2(0xb0,0xa1),
+     o2(0xd0,0xb3), o2(0xd0,0xb4), o2(0xd0,0xb5), o2(0xcb,0xb4),
+     o2(0xd0,0xb6), o2(0xb8,0xf2), o2(0xb0,0xe7), o2(0xcb,0xf2),
+     o2(0xb5,0xfc), o2(0xb5,0xfd), o2(0xb5,0xfe), o2(0xc4,0xe2),
+     o2(0xce,0xbc), o2(0xd0,0xb7), o2(0xd0,0xb8), o2(0xd0,0xb9),
+     o2(0xbf,0xcd),
+
+#define to_CP51932_E4_BA WORDINDEX2INFO(36484)
+    to_CP51932_E4_BA_offsets,
+    to_CP51932_E4_BA_infos,
+
+#define to_CP51932_E4_BB_infos WORDINDEX2INFO(36486)
+           INVALID, o2(0xbd,0xba), o2(0xbf,0xce), o2(0xd0,0xbe),
+             UNDEF, o2(0xd0,0xbc), o2(0xd0,0xbd), o2(0xb5,0xd8),
+     o2(0xba,0xa3), o2(0xb2,0xf0), o2(0xd0,0xbb), o2(0xd0,0xba),
+     o2(0xca,0xa9), o2(0xbb,0xc6), o2(0xbb,0xc5), o2(0xc2,0xbe),
+     o2(0xd0,0xbf), o2(0xc9,0xd5), o2(0xc0,0xe7), o2(0xa1,0xb8),
+     o2(0xd0,0xc0), o2(0xd0,0xc2), o2(0xf9,0xae), o2(0xc2,0xe5),
+     o2(0xce,0xe1), o2(0xb0,0xca), o2(0xd0,0xc1), o2(0xb2,0xbe),
+     o2(0xb6,0xc4), o2(0xc3,0xe7), o2(0xb7,0xef), o2(0xd0,0xc3),
+     o2(0xc7,0xa4), o2(0xf9,0xaf),
+
+#define to_CP51932_E4_BB WORDINDEX2INFO(36520)
+    to_CP51932_E4_BB_offsets,
+    to_CP51932_E4_BB_infos,
+
+#define to_CP51932_E4_BC_infos WORDINDEX2INFO(36522)
+           INVALID, o2(0xf9,0xb0), o2(0xb4,0xeb),         UNDEF,
+     o2(0xf9,0xb1), o2(0xd0,0xc4), o2(0xb0,0xcb), o2(0xb8,0xe0),
+     o2(0xb4,0xec), o2(0xc9,0xfa), o2(0xc8,0xb2), o2(0xb5,0xd9),
+     o2(0xb2,0xf1), o2(0xd0,0xe7), o2(0xc5,0xc1), o2(0xc7,0xec),
+     o2(0xd0,0xc6), o2(0xc8,0xbc), o2(0xce,0xe2), o2(0xbf,0xad),
+     o2(0xf9,0xb2), o2(0xbb,0xc7), o2(0xbb,0xf7), o2(0xb2,0xc0),
+
+#define to_CP51932_E4_BC WORDINDEX2INFO(36546)
+    to_CP51932_E4_BC_offsets,
+    to_CP51932_E4_BC_infos,
+
+#define to_CP51932_E4_BD_infos WORDINDEX2INFO(36548)
+           INVALID,         UNDEF, o2(0xc4,0xd1), o2(0xc3,0xa2),
+     o2(0xd0,0xca), o2(0xb0,0xcc), o2(0xc4,0xe3), o2(0xbd,0xbb),
+     o2(0xba,0xb4), o2(0xcd,0xa4), o2(0xc2,0xce), o2(0xb2,0xbf),
+     o2(0xf9,0xb3), o2(0xd0,0xc9), o2(0xcd,0xbe), o2(0xd0,0xc5),
+     o2(0xd0,0xc7), o2(0xba,0xee), o2(0xd0,0xc8), o2(0xd5,0xa4),
+     o2(0xd0,0xd0), o2(0xd0,0xd3), o2(0xd0,0xd1), o2(0xb2,0xc2),
+     o2(0xca,0xbb), o2(0xd0,0xcb), o2(0xd0,0xcf), o2(0xb8,0xf3),
+     o2(0xbb,0xc8),
+
+#define to_CP51932_E4_BD WORDINDEX2INFO(36577)
+    to_CP51932_E4_BD_offsets,
+    to_CP51932_E4_BD_infos,
+
+#define to_CP51932_E4_BE_infos WORDINDEX2INFO(36579)
+           INVALID,         UNDEF, o2(0xb4,0xa6), o2(0xd0,0xd4),
+     o2(0xd0,0xcc), o2(0xf9,0xb5), o2(0xce,0xe3), o2(0xbb,0xf8),
+     o2(0xd0,0xcd), o2(0xd0,0xd2), o2(0xf9,0xb4), o2(0xf9,0xb7),
+     o2(0xd0,0xd5), o2(0xd0,0xce), o2(0xf9,0xb6), o2(0xb6,0xa1),
+     o2(0xb0,0xcd), o2(0xb6,0xa2), o2(0xb2,0xc1), o2(0xd5,0xa5),
+     o2(0xcb,0xf9), o2(0xc9,0xee), o2(0xb8,0xf4), o2(0xbf,0xaf),
+     o2(0xce,0xb7), o2(0xca,0xd8),
+
+#define to_CP51932_E4_BE WORDINDEX2INFO(36605)
+    to_CP51932_E4_BE_offsets,
+    to_CP51932_E4_BE_infos,
+
+#define to_CP51932_E4_BF_infos WORDINDEX2INFO(36607)
+           INVALID,         UNDEF, o2(0xb7,0xb8), o2(0xc2,0xa5),
+     o2(0xb2,0xe4), o2(0xf9,0xa6), o2(0xbd,0xd3), o2(0xf9,0xb8),
+     o2(0xd0,0xd9), o2(0xd0,0xde), o2(0xd0,0xdc), o2(0xd0,0xd7),
+     o2(0xc2,0xaf), o2(0xd0,0xda), o2(0xd0,0xdd), o2(0xd0,0xdb),
+     o2(0xca,0xdd), o2(0xd0,0xd8), o2(0xbf,0xae), o2(0xcb,0xf3),
+     o2(0xd0,0xdf), o2(0xd0,0xe0), o2(0xbd,0xa4), o2(0xd0,0xed),
+     o2(0xc7,0xd0), o2(0xc9,0xb6), o2(0xd0,0xe8), o2(0xca,0xf0),
+     o2(0xb2,0xb6), o2(0xd0,0xec), o2(0xf9,0xbb),
+
+#define to_CP51932_E4_BF WORDINDEX2INFO(36638)
+    to_CP51932_E4_BF_offsets,
+    to_CP51932_E4_BF_infos,
+
+#define to_CP51932_E4_infos WORDINDEX2INFO(36640)
+              INVALID,     to_EUC_JP_C6, to_CP51932_E4_B8, to_CP51932_E4_B9,
+     to_CP51932_E4_BA, to_CP51932_E4_BB, to_CP51932_E4_BC, to_CP51932_E4_BD,
+     to_CP51932_E4_BE, to_CP51932_E4_BF,
+
+#define to_CP51932_E4 WORDINDEX2INFO(36650)
+    to_EUC_JP_E4_offsets,
+    to_CP51932_E4_infos,
+
+#define to_CP51932_E5_80_infos WORDINDEX2INFO(36652)
+           INVALID,         UNDEF, o2(0xd0,0xe6), o2(0xd0,0xef),
+     o2(0xc1,0xd2), o2(0xb8,0xc4), o2(0xc7,0xdc), o2(0xe0,0xc7),
+     o2(0xd0,0xee), o2(0xc5,0xdd), o2(0xd0,0xe3), o2(0xb8,0xf6),
+     o2(0xb8,0xf5), o2(0xd0,0xe1), o2(0xf9,0xbc), o2(0xbc,0xda),
+     o2(0xd0,0xe9), o2(0xf9,0xba), o2(0xca,0xef), o2(0xc3,0xcd),
+     o2(0xd0,0xe5), o2(0xb7,0xf1), o2(0xd0,0xe2), o2(0xd0,0xea),
+     o2(0xd0,0xe4), o2(0xce,0xd1), o2(0xd0,0xeb), o2(0xcf,0xc1),
+     o2(0xb6,0xe6), o2(0xb7,0xf0),
+
+#define to_CP51932_E5_80 WORDINDEX2INFO(36682)
+    to_CP51932_E5_80_offsets,
+    to_CP51932_E5_80_infos,
+
+#define to_CP51932_E5_81_infos WORDINDEX2INFO(36684)
+           INVALID, o2(0xf9,0xb9),         UNDEF, o2(0xf9,0xbf),
+     o2(0xd0,0xf0), o2(0xf9,0xbd), o2(0xd0,0xf1), o2(0xd0,0xf5),
+     o2(0xb0,0xce), o2(0xca,0xd0), o2(0xd0,0xf4), o2(0xd0,0xf3),
+     o2(0xd0,0xf7), o2(0xd0,0xf6), o2(0xc4,0xe4), o2(0xb7,0xf2),
+     o2(0xd0,0xf8), o2(0xf9,0xbe), o2(0xbc,0xc5), o2(0xc2,0xa6),
+     o2(0xc4,0xe5), o2(0xb6,0xf6), o2(0xd0,0xf9), o2(0xb5,0xb6),
+
+#define to_CP51932_E5_81 WORDINDEX2INFO(36708)
+    to_CP51932_E5_81_offsets,
+    to_CP51932_E5_81_infos,
+
+#define to_CP51932_E5_82_infos WORDINDEX2INFO(36710)
+           INVALID, o2(0xd0,0xfa),         UNDEF, o2(0xd0,0xfc),
+     o2(0xcb,0xb5), o2(0xb7,0xe6), o2(0xf9,0xc0), o2(0xbb,0xb1),
+     o2(0xc8,0xf7), o2(0xd0,0xfb), o2(0xba,0xc5), o2(0xcd,0xc3),
+     o2(0xd0,0xfe), o2(0xd1,0xa3), o2(0xd0,0xfd), o2(0xba,0xc4),
+     o2(0xbd,0xfd), o2(0xb7,0xb9),
+
+#define to_CP51932_E5_82 WORDINDEX2INFO(36728)
+    to_CP51932_E5_82_offsets,
+    to_CP51932_E5_82_infos,
+
+#define to_CP51932_E5_83_infos WORDINDEX2INFO(36730)
+           INVALID,         UNDEF, o2(0xd1,0xa4), o2(0xb6,0xcf),
+     o2(0xd1,0xa1), o2(0xd1,0xa2), o2(0xc6,0xaf), o2(0xc1,0xfc),
+     o2(0xb6,0xa3), o2(0xcb,0xcd), o2(0xd1,0xa5), o2(0xf9,0xc2),
+     o2(0xce,0xbd), o2(0xd1,0xa6), o2(0xd1,0xa9), o2(0xd1,0xa7),
+     o2(0xc1,0xce), o2(0xd1,0xa8), o2(0xd1,0xaa), o2(0xf9,0xc1),
+     o2(0xd1,0xac), o2(0xd1,0xab), o2(0xca,0xc8),
+
+#define to_CP51932_E5_83 WORDINDEX2INFO(36753)
+    to_CP51932_E5_83_offsets,
+    to_CP51932_E5_83_infos,
+
+#define to_CP51932_E5_84_infos WORDINDEX2INFO(36755)
+           INVALID, o2(0xb5,0xb7), o2(0xd1,0xae), o2(0xd1,0xaf),
+             UNDEF, o2(0xb2,0xaf), o2(0xd1,0xad), o2(0xbc,0xf4),
+     o2(0xd1,0xb2), o2(0xd1,0xb1), o2(0xd1,0xb0), o2(0xd0,0xd6),
+     o2(0xd1,0xb3), o2(0xbd,0xfe), o2(0xd1,0xb4), o2(0xcd,0xa5),
+     o2(0xcc,0xd9), o2(0xd1,0xb6), o2(0xd1,0xb5), o2(0xd1,0xb8),
+     o2(0xd1,0xb7), o2(0xd1,0xb9),
+
+#define to_CP51932_E5_84 WORDINDEX2INFO(36777)
+    to_CP51932_E5_84_offsets,
+    to_CP51932_E5_84_infos,
+
+#define to_CP51932_E5_85_infos WORDINDEX2INFO(36779)
+           INVALID, o2(0xd1,0xba), o2(0xb0,0xf4),         UNDEF,
+     o2(0xb8,0xb5), o2(0xb7,0xbb), o2(0xbd,0xbc), o2(0xc3,0xfb),
+     o2(0xb6,0xa4), o2(0xc0,0xe8), o2(0xb8,0xf7), o2(0xf9,0xc3),
+     o2(0xb9,0xee), o2(0xd1,0xbc), o2(0xcc,0xc8), o2(0xc5,0xc6),
+     o2(0xbb,0xf9), o2(0xd1,0xbb), o2(0xd1,0xbd), o2(0xc5,0xde),
+     o2(0xb3,0xf5), o2(0xd1,0xbe), o2(0xf9,0xc4), o2(0xc6,0xfe),
+     o2(0xc1,0xb4), o2(0xd1,0xc0), o2(0xd1,0xc1), o2(0xc8,0xac),
+     o2(0xb8,0xf8), o2(0xcf,0xbb), o2(0xd1,0xc2), o2(0xb6,0xa6),
+     o2(0xca,0xbc), o2(0xc2,0xb6), o2(0xb6,0xf1), o2(0xc5,0xb5),
+     o2(0xb7,0xf3),
+
+#define to_CP51932_E5_85 WORDINDEX2INFO(36816)
+    to_CP51932_E5_85_offsets,
+    to_CP51932_E5_85_infos,
+
+#define to_CP51932_E5_86_infos WORDINDEX2INFO(36818)
+           INVALID, o2(0xd1,0xc3),         UNDEF, o2(0xd1,0xc4),
+     o2(0xc6,0xe2), o2(0xb1,0xdf), o2(0xd1,0xc7), o2(0xba,0xfd),
+     o2(0xd1,0xc6), o2(0xba,0xc6), o2(0xd1,0xc8), o2(0xe6,0xee),
+     o2(0xd1,0xc9), o2(0xcb,0xc1), o2(0xd1,0xca), o2(0xd1,0xcb),
+     o2(0xd1,0xcc), o2(0xbe,0xe9), o2(0xbc,0xcc), o2(0xf9,0xc5),
+     o2(0xb4,0xa7), o2(0xd1,0xcf), o2(0xd1,0xcd), o2(0xcc,0xbd),
+     o2(0xd1,0xce), o2(0xc9,0xda), o2(0xd1,0xd0), o2(0xd1,0xd1),
+     o2(0xd1,0xd2), o2(0xc5,0xdf), o2(0xd1,0xd6), o2(0xd1,0xd4),
+     o2(0xd1,0xd5), o2(0xd1,0xd3), o2(0xba,0xe3), o2(0xd1,0xd7),
+     o2(0xcc,0xea), o2(0xce,0xe4), o2(0xd1,0xd8), o2(0xf9,0xc6),
+
+#define to_CP51932_E5_86 WORDINDEX2INFO(36858)
+    to_CP51932_E5_86_offsets,
+    to_CP51932_E5_86_infos,
+
+#define to_CP51932_E5_87_infos WORDINDEX2INFO(36860)
+           INVALID,         UNDEF, o2(0xc0,0xa8), o2(0xd1,0xd9),
+     o2(0xbd,0xda), o2(0xd1,0xda), o2(0xc3,0xfc), o2(0xce,0xbf),
+     o2(0xc5,0xe0), o2(0xd2,0xc5), o2(0xd1,0xdb), o2(0xf4,0xa5),
+     o2(0xb6,0xc5), o2(0xd1,0xdc), o2(0xcb,0xde), o2(0xbd,0xe8),
+     o2(0xc2,0xfc), o2(0xd1,0xde), o2(0xc6,0xe4), o2(0xf9,0xc7),
+     o2(0xd1,0xdf), o2(0xd1,0xe0), o2(0xb3,0xae), o2(0xd1,0xe1),
+     o2(0xb6,0xa7), o2(0xc6,0xcc), o2(0xb1,0xfa), o2(0xbd,0xd0),
+     o2(0xc8,0xa1), o2(0xd1,0xe2),
+
+#define to_CP51932_E5_87 WORDINDEX2INFO(36890)
+    to_CP51932_E5_87_offsets,
+    to_CP51932_E5_87_infos,
+
+#define to_CP51932_E5_88_infos WORDINDEX2INFO(36892)
+           INVALID, o2(0xc5,0xe1),         UNDEF, o2(0xbf,0xcf),
+     o2(0xd1,0xe3), o2(0xca,0xac), o2(0xc0,0xda), o2(0xb4,0xa2),
+     o2(0xb4,0xa9), o2(0xd1,0xe4), o2(0xd1,0xe6), o2(0xb7,0xba),
+     o2(0xd1,0xe5), o2(0xf9,0xc8), o2(0xce,0xf3), o2(0xbd,0xe9),
+     o2(0xc8,0xbd), o2(0xca,0xcc), o2(0xd1,0xe7), o2(0xcd,0xf8),
+     o2(0xd1,0xe8), o2(0xd1,0xe9), o2(0xc5,0xfe), o2(0xd1,0xea),
+     o2(0xc0,0xa9), o2(0xba,0xfe), o2(0xb7,0xf4), o2(0xd1,0xeb),
+     o2(0xbb,0xc9), o2(0xb9,0xef),
+
+#define to_CP51932_E5_88 WORDINDEX2INFO(36922)
+    to_CP51932_E5_88_offsets,
+    to_CP51932_E5_88_infos,
+
+#define to_CP51932_E5_89_infos WORDINDEX2INFO(36924)
+           INVALID,         UNDEF, o2(0xc4,0xe6), o2(0xd1,0xed),
+     o2(0xc2,0xa7), o2(0xba,0xef), o2(0xd1,0xee), o2(0xd1,0xef),
+     o2(0xc1,0xb0), o2(0xd1,0xec), o2(0xd1,0xf1), o2(0xcb,0xb6),
+     o2(0xb9,0xe4), o2(0xd1,0xf0), o2(0xb7,0xf5), o2(0xba,0xde),
+     o2(0xc7,0xed), o2(0xd1,0xf4), o2(0xd1,0xf2), o2(0xc9,0xfb),
+     o2(0xbe,0xea), o2(0xd1,0xfb), o2(0xb3,0xe4), o2(0xd1,0xf5),
+     o2(0xd1,0xf3), o2(0xc1,0xcf), o2(0xd1,0xf7), o2(0xd1,0xf6),
+
+#define to_CP51932_E5_89 WORDINDEX2INFO(36952)
+    to_CP51932_E5_89_offsets,
+    to_CP51932_E5_89_infos,
+
+#define to_CP51932_E5_8A_infos WORDINDEX2INFO(36954)
+           INVALID,         UNDEF, o2(0xb3,0xc4), o2(0xb7,0xe0),
+     o2(0xd1,0xfc), o2(0xce,0xad), o2(0xd1,0xf8), o2(0xd1,0xfd),
+     o2(0xd1,0xfa), o2(0xd1,0xf9), o2(0xce,0xcf), o2(0xf9,0xc9),
+     o2(0xb8,0xf9), o2(0xb2,0xc3), o2(0xce,0xf4), o2(0xf9,0xca),
+     o2(0xbd,0xf5), o2(0xc5,0xd8), o2(0xb9,0xe5), o2(0xd2,0xa2),
+     o2(0xd2,0xa3), o2(0xfb,0xbc), o2(0xce,0xe5), o2(0xcf,0xab),
+     o2(0xd2,0xa5), o2(0xb8,0xfa), o2(0xd2,0xa4), o2(0xb3,0xaf),
+
+#define to_CP51932_E5_8A WORDINDEX2INFO(36982)
+    to_CP51932_E5_8A_offsets,
+    to_CP51932_E5_8A_infos,
+
+#define to_CP51932_E5_8B_infos WORDINDEX2INFO(36984)
+           INVALID, o2(0xf9,0xcb), o2(0xd2,0xa6),         UNDEF,
+     o2(0xcb,0xd6), o2(0xc4,0xbc), o2(0xcd,0xa6), o2(0xca,0xd9),
+     o2(0xd2,0xa7), o2(0xf0,0xd5), o2(0xc6,0xb0), o2(0xd2,0xa8),
+     o2(0xb4,0xaa), o2(0xcc,0xb3), o2(0xf9,0xcc), o2(0xbe,0xa1),
+     o2(0xd2,0xa9), o2(0xca,0xe7), o2(0xd2,0xad), o2(0xc0,0xaa),
+     o2(0xd2,0xaa), o2(0xb6,0xd0), o2(0xd2,0xab), o2(0xb4,0xab),
+     o2(0xb7,0xae), o2(0xd2,0xae), o2(0xd2,0xaf), o2(0xd2,0xb0),
+     o2(0xd2,0xb1), o2(0xbc,0xdb), o2(0xb8,0xfb), o2(0xcc,0xde),
+
+#define to_CP51932_E5_8B WORDINDEX2INFO(37016)
+    to_CP51932_E5_8B_offsets,
+    to_CP51932_E5_8B_infos,
+
+#define to_CP51932_E5_8C_infos WORDINDEX2INFO(37018)
+           INVALID, o2(0xf9,0xcd), o2(0xcc,0xe8), o2(0xc6,0xf7),
+             UNDEF, o2(0xca,0xf1), o2(0xd2,0xb2), o2(0xf9,0xce),
+     o2(0xd2,0xb3), o2(0xd2,0xb5), o2(0xd2,0xb7), o2(0xd2,0xb6),
+     o2(0xd2,0xb8), o2(0xb2,0xbd), o2(0xcb,0xcc), o2(0xba,0xfc),
+     o2(0xd2,0xb9), o2(0xc1,0xd9), o2(0xbe,0xa2), o2(0xb6,0xa9),
+     o2(0xd2,0xba), o2(0xf9,0xcf), o2(0xc8,0xdb), o2(0xd2,0xbb),
+     o2(0xd2,0xbc), o2(0xd2,0xbd), o2(0xd2,0xbe), o2(0xc9,0xa4),
+     o2(0xb6,0xe8), o2(0xb0,0xe5), o2(0xc6,0xbf),
+
+#define to_CP51932_E5_8C WORDINDEX2INFO(37049)
+    to_CP51932_E5_8C_offsets,
+    to_CP51932_E5_8C_infos,
+
+#define to_CP51932_E5_8D_infos WORDINDEX2INFO(37051)
+           INVALID, o2(0xd2,0xbf), o2(0xbd,0xbd),         UNDEF,
+     o2(0xc0,0xe9), o2(0xd2,0xc1), o2(0xd2,0xc0), o2(0xbe,0xa3),
+     o2(0xb8,0xe1), o2(0xd2,0xc3), o2(0xc8,0xbe), o2(0xd2,0xc4),
+     o2(0xc8,0xdc), o2(0xc2,0xb4), o2(0xc2,0xee), o2(0xb6,0xa8),
+     o2(0xc6,0xee), o2(0xc3,0xb1), o2(0xc7,0xee), o2(0xcb,0xce),
+     o2(0xd2,0xc6), o2(0xc0,0xea), o2(0xb7,0xb5), o2(0xd2,0xc7),
+     o2(0xd2,0xc8), o2(0xb1,0xac), o2(0xb0,0xf5), o2(0xb4,0xed),
+     o2(0xf9,0xd0), o2(0xc2,0xa8), o2(0xb5,0xd1), o2(0xcd,0xf1),
+     o2(0xd2,0xcb), o2(0xb2,0xb7), o2(0xd2,0xca), o2(0xb6,0xaa),
+
+#define to_CP51932_E5_8D WORDINDEX2INFO(37087)
+    to_CP51932_E5_8D_offsets,
+    to_CP51932_E5_8D_infos,
+
+#define to_CP51932_E5_8E_infos WORDINDEX2INFO(37089)
+           INVALID,         UNDEF, o2(0xd2,0xcc), o2(0xcc,0xf1),
+     o2(0xf9,0xd1), o2(0xd2,0xcd), o2(0xce,0xd2), o2(0xb8,0xfc),
+     o2(0xb8,0xb6), o2(0xd2,0xce), o2(0xd2,0xd0), o2(0xd2,0xcf),
+     o2(0xbf,0xdf), o2(0xb1,0xb9), o2(0xb1,0xde), o2(0xd2,0xd1),
+     o2(0xd2,0xd2), o2(0xf9,0xd2), o2(0xb8,0xb7), o2(0xd2,0xd3),
+     o2(0xb5,0xee),
+
+#define to_CP51932_E5_8E WORDINDEX2INFO(37110)
+    to_CP51932_E5_8E_offsets,
+    to_CP51932_E5_8E_infos,
+
+#define to_CP51932_E5_8F_infos WORDINDEX2INFO(37112)
+           INVALID,         UNDEF, o2(0xbb,0xb2), o2(0xd2,0xd4),
+     o2(0xcb,0xf4), o2(0xba,0xb5), o2(0xb5,0xda), o2(0xcd,0xa7),
+     o2(0xc1,0xd0), o2(0xc8,0xbf), o2(0xbc,0xfd), o2(0xbd,0xc7),
+     o2(0xbc,0xe8), o2(0xbc,0xf5), o2(0xbd,0xf6), o2(0xc8,0xc0),
+     o2(0xf9,0xd3), o2(0xd2,0xd7), o2(0xb1,0xc3), o2(0xc1,0xd1),
+     o2(0xb8,0xfd), o2(0xb8,0xc5), o2(0xb6,0xe7), o2(0xd2,0xdb),
+     o2(0xc3,0xa1), o2(0xc2,0xfe), o2(0xb6,0xab), o2(0xbe,0xa4),
+     o2(0xd2,0xdc), o2(0xd2,0xda), o2(0xb2,0xc4), o2(0xc2,0xe6),
+     o2(0xbc,0xb8), o2(0xbb,0xcb), o2(0xb1,0xa6), o2(0xb3,0xf0),
+     o2(0xb9,0xe6), o2(0xbb,0xca), o2(0xd2,0xdd),
+
+#define to_CP51932_E5_8F WORDINDEX2INFO(37151)
+    to_CP51932_E5_8F_offsets,
+    to_CP51932_E5_8F_infos,
+
+#define to_CP51932_E5_90_infos WORDINDEX2INFO(37153)
+           INVALID,         UNDEF, o2(0xd2,0xde), o2(0xb5,0xc9),
+     o2(0xb3,0xc6), o2(0xb9,0xe7), o2(0xb5,0xc8), o2(0xc4,0xdf),
+     o2(0xb1,0xa5), o2(0xc6,0xb1), o2(0xcc,0xbe), o2(0xb9,0xa1),
+     o2(0xcd,0xf9), o2(0xc5,0xc7), o2(0xb8,0xfe), o2(0xb7,0xaf),
+     o2(0xd2,0xe7), o2(0xb6,0xe3), o2(0xcb,0xca), o2(0xc8,0xdd),
+     o2(0xd2,0xe6), o2(0xb4,0xde), o2(0xd2,0xe1), o2(0xd2,0xe2),
+     o2(0xd2,0xe4), o2(0xd2,0xe5), o2(0xb5,0xdb), o2(0xbf,0xe1),
+     o2(0xca,0xad), o2(0xd2,0xe3), o2(0xd2,0xdf), o2(0xb8,0xe3),
+
+#define to_CP51932_E5_90 WORDINDEX2INFO(37185)
+    to_CP51932_E5_90_offsets,
+    to_CP51932_E5_90_infos,
+
+#define to_CP51932_E5_91_infos WORDINDEX2INFO(37187)
+           INVALID, o2(0xd2,0xe0),         UNDEF, o2(0xcf,0xa4),
+     o2(0xca,0xf2), o2(0xc4,0xe8), o2(0xb8,0xe2), o2(0xb9,0xf0),
+     o2(0xd2,0xe8), o2(0xc6,0xdd), o2(0xd2,0xec), o2(0xbc,0xfe),
+     o2(0xbc,0xf6), o2(0xd2,0xef), o2(0xd2,0xed), o2(0xcc,0xa3),
+     o2(0xd2,0xea), o2(0xd2,0xf3), o2(0xd2,0xee), o2(0xd2,0xf1),
+     o2(0xb8,0xc6), o2(0xcc,0xbf),
+
+#define to_CP51932_E5_91 WORDINDEX2INFO(37209)
+    to_CP51932_E5_91_offsets,
+    to_CP51932_E5_91_infos,
+
+#define to_CP51932_E5_92_infos WORDINDEX2INFO(37211)
+           INVALID, o2(0xd2,0xf2),         UNDEF, o2(0xd2,0xf4),
+     o2(0xd2,0xf6), o2(0xf9,0xd6), o2(0xba,0xf0), o2(0xcf,0xc2),
+     o2(0xd2,0xeb), o2(0xd2,0xe9), o2(0xd2,0xf5), o2(0xd2,0xf0),
+     o2(0xf9,0xd5), o2(0xd2,0xf8), o2(0xd3,0xa3), o2(0xd2,0xfa),
+     o2(0xd2,0xfe), o2(0xf9,0xd7), o2(0xd3,0xa1), o2(0xd2,0xfb),
+     o2(0xd3,0xbe), o2(0xba,0xe9), o2(0xb3,0xb1), o2(0xd2,0xf9),
+     o2(0xd3,0xa5), o2(0xb0,0xf6), o2(0xd3,0xa4),
+
+#define to_CP51932_E5_92 WORDINDEX2INFO(37238)
+    to_CP51932_E5_92_offsets,
+    to_CP51932_E5_92_infos,
+
+#define to_CP51932_E5_93_infos WORDINDEX2INFO(37240)
+           INVALID, o2(0xb0,0xa5), o2(0xc9,0xca), o2(0xd3,0xa2),
+             UNDEF, o2(0xd2,0xfc), o2(0xd2,0xf7), o2(0xd2,0xfd),
+     o2(0xba,0xc8), o2(0xd3,0xa6), o2(0xb0,0xf7), o2(0xd3,0xaf),
+     o2(0xd3,0xa7), o2(0xd3,0xa8), o2(0xbe,0xa5), o2(0xcb,0xe9),
+     o2(0xd3,0xad), o2(0xd3,0xac), o2(0xc5,0xaf), o2(0xd3,0xae),
+     o2(0xd3,0xab), o2(0xf9,0xd8),
+
+#define to_CP51932_E5_93 WORDINDEX2INFO(37262)
+    to_CP51932_E5_93_offsets,
+    to_CP51932_E5_93_infos,
+
+#define to_CP51932_E5_94_infos WORDINDEX2INFO(37264)
+           INVALID,         UNDEF, o2(0xb1,0xb4), o2(0xba,0xb6),
+     o2(0xbf,0xb0), o2(0xd3,0xa9), o2(0xc5,0xe2), o2(0xd3,0xaa),
+     o2(0xb0,0xa2), o2(0xd3,0xb4), o2(0xcd,0xa3), o2(0xbe,0xa7),
+     o2(0xd3,0xba), o2(0xd3,0xb9), o2(0xd3,0xb0), o2(0xc2,0xc3),
+
+#define to_CP51932_E5_94 WORDINDEX2INFO(37280)
+    to_CP51932_E5_94_offsets,
+    to_CP51932_E5_94_infos,
+
+#define to_CP51932_E5_95_infos WORDINDEX2INFO(37282)
+           INVALID, o2(0xd3,0xb1),         UNDEF, o2(0xc2,0xef),
+     o2(0xd3,0xb6), o2(0xbe,0xa6), o2(0xd3,0xb3), o2(0xcc,0xe4),
+     o2(0xb7,0xbc), o2(0xd3,0xb7), o2(0xd3,0xb8), o2(0xd3,0xb5),
+     o2(0xd3,0xbb), o2(0xd3,0xb2), o2(0xd3,0xc1), o2(0xd3,0xc6),
+     o2(0xd3,0xc2),
+
+#define to_CP51932_E5_95 WORDINDEX2INFO(37299)
+    to_CP51932_E5_95_offsets,
+    to_CP51932_E5_95_infos,
+
+#define to_CP51932_E5_96_infos WORDINDEX2INFO(37301)
+           INVALID, o2(0xd3,0xbd),         UNDEF, o2(0xd3,0xc7),
+     o2(0xc1,0xb1), o2(0xf9,0xd9), o2(0xd3,0xc9), o2(0xb9,0xa2),
+     o2(0xd3,0xbf), o2(0xc3,0xfd), o2(0xd3,0xc3), o2(0xd3,0xbc),
+     o2(0xb4,0xad), o2(0xb4,0xee), o2(0xb3,0xe5), o2(0xd3,0xc4),
+     o2(0xd3,0xc0), o2(0xb7,0xf6), o2(0xd3,0xca), o2(0xd3,0xc8),
+     o2(0xc1,0xd3), o2(0xb5,0xca), o2(0xb6,0xac), o2(0xd3,0xc5),
+     o2(0xb6,0xf4), o2(0xb1,0xc4),
+
+#define to_CP51932_E5_96 WORDINDEX2INFO(37327)
+    to_CP51932_E5_96_offsets,
+    to_CP51932_E5_96_infos,
+
+#define to_CP51932_E5_97_infos WORDINDEX2INFO(37329)
+           INVALID,         UNDEF, o2(0xd3,0xce), o2(0xd3,0xcc),
+     o2(0xd4,0xa7), o2(0xd3,0xd1), o2(0xd3,0xcb), o2(0xd3,0xcf),
+     o2(0xd3,0xcd), o2(0xbb,0xcc), o2(0xd3,0xd0), o2(0xd3,0xd3),
+     o2(0xd3,0xd8), o2(0xd3,0xd6), o2(0xd3,0xd5),
+
+#define to_CP51932_E5_97 WORDINDEX2INFO(37344)
+    to_CP51932_E5_97_offsets,
+    to_CP51932_E5_97_infos,
+
+#define to_CP51932_E5_98_infos WORDINDEX2INFO(37346)
+           INVALID,         UNDEF, o2(0xc3,0xb2), o2(0xb2,0xc5),
+     o2(0xd3,0xd2), o2(0xd3,0xd4), o2(0xbe,0xa8), o2(0xb1,0xb3),
+     o2(0xd3,0xd7), o2(0xb2,0xde), o2(0xd3,0xe2), o2(0xbe,0xfc),
+     o2(0xd3,0xde), o2(0xd3,0xdc), o2(0xd3,0xdd), o2(0xd3,0xdf),
+
+#define to_CP51932_E5_98 WORDINDEX2INFO(37362)
+    to_CP51932_E5_98_offsets,
+    to_CP51932_E5_98_infos,
+
+#define to_CP51932_E5_99_infos WORDINDEX2INFO(37364)
+           INVALID,         UNDEF, o2(0xb1,0xbd), o2(0xc1,0xb9),
+     o2(0xd3,0xd9), o2(0xd3,0xda), o2(0xb3,0xfa), o2(0xd3,0xe1),
+     o2(0xb4,0xef), o2(0xd3,0xe4), o2(0xd3,0xe0), o2(0xd3,0xe3),
+     o2(0xca,0xae), o2(0xc6,0xd5), o2(0xc8,0xb8),
+
+#define to_CP51932_E5_99 WORDINDEX2INFO(37379)
+    to_CP51932_E5_99_offsets,
+    to_CP51932_E5_99_infos,
+
+#define to_CP51932_E5_9A_infos WORDINDEX2INFO(37381)
+           INVALID, o2(0xd3,0xe6),         UNDEF, o2(0xd3,0xe5),
+     o2(0xb3,0xc5), o2(0xd3,0xe7), o2(0xd3,0xea), o2(0xd3,0xe9),
+     o2(0xd3,0xe8), o2(0xc7,0xb9), o2(0xd3,0xeb), o2(0xd3,0xec),
+     o2(0xd3,0xee), o2(0xd3,0xed), o2(0xd3,0xf0),
+
+#define to_CP51932_E5_9A WORDINDEX2INFO(37396)
+    to_CP51932_E5_9A_offsets,
+    to_CP51932_E5_9A_infos,
+
+#define to_CP51932_E5_9B_infos WORDINDEX2INFO(37398)
+           INVALID, o2(0xd3,0xf3), o2(0xd3,0xf1), o2(0xd3,0xef),
+     o2(0xd3,0xf2),         UNDEF, o2(0xd3,0xf4), o2(0xd3,0xf5),
+     o2(0xd3,0xf6), o2(0xd3,0xf7), o2(0xd3,0xf8), o2(0xd1,0xc5),
+     o2(0xbc,0xfc), o2(0xbb,0xcd), o2(0xb2,0xf3), o2(0xb0,0xf8),
+     o2(0xc3,0xc4), o2(0xd3,0xf9), o2(0xba,0xa4), o2(0xb0,0xcf),
+     o2(0xbf,0xde), o2(0xd3,0xfa), o2(0xb8,0xc7), o2(0xb9,0xf1),
+     o2(0xd3,0xfc),
+
+#define to_CP51932_E5_9B WORDINDEX2INFO(37423)
+    to_CP51932_E5_9B_offsets,
+    to_CP51932_E5_9B_infos,
+
+#define to_CP51932_E5_9C_infos WORDINDEX2INFO(37425)
+           INVALID, o2(0xd3,0xfb),         UNDEF, o2(0xca,0xe0),
+     o2(0xd3,0xfd), o2(0xd4,0xa1), o2(0xd3,0xfe), o2(0xd4,0xa2),
+     o2(0xd4,0xa3), o2(0xb7,0xf7), o2(0xb1,0xe0), o2(0xd4,0xa4),
+     o2(0xd4,0xa6), o2(0xd4,0xa5), o2(0xd4,0xa8), o2(0xc5,0xda),
+     o2(0xd4,0xa9), o2(0xb0,0xb5), o2(0xba,0xdf), o2(0xb7,0xbd),
+     o2(0xc3,0xcf), o2(0xd4,0xaa), o2(0xd4,0xab), o2(0xd4,0xad),
+
+#define to_CP51932_E5_9C WORDINDEX2INFO(37449)
+    to_CP51932_E5_9C_offsets,
+    to_CP51932_E5_9C_infos,
+
+#define to_CP51932_E5_9D_infos WORDINDEX2INFO(37451)
+           INVALID, o2(0xd4,0xae),         UNDEF, o2(0xba,0xe4),
+     o2(0xb6,0xd1), o2(0xcb,0xb7), o2(0xd4,0xac), o2(0xd4,0xaf),
+     o2(0xba,0xc1), o2(0xb9,0xa3), o2(0xf9,0xda), o2(0xd4,0xb3),
+     o2(0xba,0xa5), o2(0xf9,0xdb), o2(0xc3,0xb3), o2(0xd4,0xb0),
+     o2(0xc4,0xda), o2(0xd4,0xb4),
+
+#define to_CP51932_E5_9D WORDINDEX2INFO(37469)
+    to_CP51932_E5_9D_offsets,
+    to_CP51932_E5_9D_infos,
+
+#define to_CP51932_E5_9E_infos WORDINDEX2INFO(37471)
+           INVALID,         UNDEF, o2(0xbf,0xe2), o2(0xd4,0xb2),
+     o2(0xd4,0xb5), o2(0xb7,0xbf), o2(0xd4,0xb6), o2(0xd4,0xb7),
+     o2(0xb9,0xa4), o2(0xb3,0xc0), o2(0xd4,0xb9), o2(0xd4,0xba),
+     o2(0xf9,0xdc), o2(0xd4,0xbb), o2(0xd4,0xb8),
+
+#define to_CP51932_E5_9E WORDINDEX2INFO(37486)
+    to_CP51932_E5_9E_offsets,
+    to_CP51932_E5_9E_infos,
+
+#define to_CP51932_E5_9F_infos WORDINDEX2INFO(37488)
+           INVALID, o2(0xd4,0xb1),         UNDEF, o2(0xd4,0xbc),
+     o2(0xd4,0xbd), o2(0xf9,0xde), o2(0xf9,0xdd), o2(0xcb,0xe4),
+     o2(0xbe,0xeb), o2(0xd4,0xbf), o2(0xd4,0xc0), o2(0xd4,0xbe),
+     o2(0xd4,0xc2), o2(0xc7,0xb8), o2(0xb0,0xe8), o2(0xc9,0xd6),
+     o2(0xd4,0xc3), o2(0xbe,0xfd), o2(0xbc,0xb9), o2(0xc7,0xdd),
+     o2(0xb4,0xf0), o2(0xba,0xeb),
+
+#define to_CP51932_E5_9F WORDINDEX2INFO(37510)
+    to_CP51932_E5_9F_offsets,
+    to_CP51932_E5_9F_infos,
+
+#define to_CP51932_E5_A0_infos WORDINDEX2INFO(37512)
+           INVALID, o2(0xcb,0xd9),         UNDEF, o2(0xc6,0xb2),
+     o2(0xb7,0xf8), o2(0xc2,0xcf), o2(0xd4,0xc1), o2(0xd4,0xc4),
+     o2(0xc2,0xc4), o2(0xd4,0xc5), o2(0xd4,0xc6), o2(0xd4,0xc8),
+     o2(0xc4,0xe9), o2(0xb4,0xae), o2(0xf4,0xa1), o2(0xb1,0xe1),
+     o2(0xca,0xf3), o2(0xbe,0xec), o2(0xc5,0xc8), o2(0xba,0xe6),
+     o2(0xd4,0xce),
+
+#define to_CP51932_E5_A0 WORDINDEX2INFO(37533)
+    to_CP51932_E5_A0_offsets,
+    to_CP51932_E5_A0_infos,
+
+#define to_CP51932_E5_A1_infos WORDINDEX2INFO(37535)
+           INVALID, o2(0xca,0xbd), o2(0xce,0xdd),         UNDEF,
+     o2(0xb2,0xf4), o2(0xd4,0xca), o2(0xc1,0xba), o2(0xd4,0xcd),
+     o2(0xc5,0xe3), o2(0xc5,0xc9), o2(0xc5,0xe4), o2(0xc8,0xb9),
+     o2(0xc4,0xcd), o2(0xba,0xc9), o2(0xd4,0xc9), o2(0xb1,0xf6),
+     o2(0xc5,0xb6), o2(0xd4,0xcb), o2(0xd4,0xc7), o2(0xbf,0xd0),
+     o2(0xd4,0xcf), o2(0xbd,0xce),
+
+#define to_CP51932_E5_A1 WORDINDEX2INFO(37557)
+    to_CP51932_E5_A1_offsets,
+    to_CP51932_E5_A1_infos,
+
+#define to_CP51932_E5_A2_infos WORDINDEX2INFO(37559)
+           INVALID,         UNDEF, o2(0xb6,0xad), o2(0xd4,0xd0),
+     o2(0xca,0xe8), o2(0xc1,0xfd), o2(0xc4,0xc6), o2(0xf9,0xe1),
+     o2(0xd4,0xd2), o2(0xcb,0xcf), o2(0xd4,0xd3), o2(0xd4,0xd8),
+     o2(0xf9,0xe2), o2(0xca,0xaf), o2(0xd4,0xd7), o2(0xd4,0xd1),
+     o2(0xd4,0xd4), o2(0xd4,0xd6), o2(0xba,0xa6),
+
+#define to_CP51932_E5_A2 WORDINDEX2INFO(37578)
+    to_CP51932_E5_A2_offsets,
+    to_CP51932_E5_A2_infos,
+
+#define to_CP51932_E5_A3_infos WORDINDEX2INFO(37580)
+           INVALID,         UNDEF, o2(0xca,0xc9), o2(0xd4,0xd9),
+     o2(0xc3,0xc5), o2(0xb2,0xf5), o2(0xbe,0xed), o2(0xd4,0xdb),
+     o2(0xd4,0xda), o2(0xb9,0xe8), o2(0xd4,0xdc), o2(0xd4,0xde),
+     o2(0xd4,0xdd), o2(0xd4,0xe0), o2(0xd4,0xd5), o2(0xd4,0xe2),
+     o2(0xd4,0xe1), o2(0xd4,0xdf), o2(0xbb,0xce), o2(0xbf,0xd1),
+     o2(0xc1,0xd4), o2(0xd4,0xe3), o2(0xc0,0xbc), o2(0xb0,0xed),
+     o2(0xc7,0xe4), o2(0xc4,0xdb), o2(0xd4,0xe5), o2(0xd4,0xe4),
+     o2(0xd4,0xe6), o2(0xd4,0xe7), o2(0xd4,0xe8),
+
+#define to_CP51932_E5_A3 WORDINDEX2INFO(37611)
+    to_CP51932_E5_A3_offsets,
+    to_CP51932_E5_A3_infos,
+
+#define to_CP51932_E5_A4_infos WORDINDEX2INFO(37613)
+           INVALID,         UNDEF, o2(0xd4,0xe9), o2(0xca,0xd1),
+     o2(0xd4,0xea), o2(0xf9,0xe3), o2(0xb2,0xc6), o2(0xd4,0xeb),
+     o2(0xcd,0xbc), o2(0xb3,0xb0), o2(0xd2,0xc9), o2(0xbd,0xc8),
+     o2(0xc2,0xbf), o2(0xd4,0xec), o2(0xcc,0xeb), o2(0xcc,0xb4),
+     o2(0xd4,0xee), o2(0xc2,0xe7), o2(0xc5,0xb7), o2(0xc2,0xc0),
+     o2(0xc9,0xd7), o2(0xd4,0xef), o2(0xd4,0xf0), o2(0xb1,0xfb),
+     o2(0xbc,0xba), o2(0xd4,0xf1), o2(0xb0,0xd0), o2(0xd4,0xf2),
+     o2(0xd4,0xf3),
+
+#define to_CP51932_E5_A4 WORDINDEX2INFO(37642)
+    to_CP51932_E5_A4_offsets,
+    to_CP51932_E5_A4_infos,
+
+#define to_CP51932_E5_A5_infos WORDINDEX2INFO(37644)
+           INVALID,         UNDEF, o2(0xb1,0xe2), o2(0xb4,0xf1),
+     o2(0xc6,0xe0), o2(0xca,0xf4), o2(0xd4,0xf7), o2(0xc1,0xd5),
+     o2(0xd4,0xf6), o2(0xb7,0xc0), o2(0xf9,0xe4), o2(0xcb,0xdb),
+     o2(0xd4,0xf5), o2(0xc5,0xe5), o2(0xd4,0xf9), o2(0xd4,0xf8),
+     o2(0xf9,0xe5), o2(0xf9,0xe6), o2(0xd4,0xfb), o2(0xd4,0xfa),
+     o2(0xf9,0xe7), o2(0xb1,0xfc), o2(0xd4,0xfc), o2(0xbe,0xa9),
+     o2(0xd4,0xfe), o2(0xc3,0xa5), o2(0xd4,0xfd), o2(0xca,0xb3),
+     o2(0xbd,0xf7), o2(0xc5,0xdb), o2(0xd5,0xa1), o2(0xb9,0xa5),
+
+#define to_CP51932_E5_A5 WORDINDEX2INFO(37676)
+    to_CP51932_E5_A5_offsets,
+    to_CP51932_E5_A5_infos,
+
+#define to_CP51932_E5_A6_infos WORDINDEX2INFO(37678)
+           INVALID,         UNDEF, o2(0xd5,0xa2), o2(0xc7,0xa1),
+     o2(0xc8,0xde), o2(0xcc,0xd1), o2(0xc7,0xa5), o2(0xd5,0xab),
+     o2(0xb5,0xb8), o2(0xcd,0xc5), o2(0xcc,0xaf), o2(0xd6,0xac),
+     o2(0xd5,0xa3), o2(0xd5,0xa6), o2(0xf9,0xe8), o2(0xc2,0xc5),
+     o2(0xcb,0xb8), o2(0xc5,0xca), o2(0xd5,0xa7), o2(0xcb,0xe5),
+     o2(0xf9,0xe9), o2(0xba,0xca), o2(0xbe,0xaa),
+
+#define to_CP51932_E5_A6 WORDINDEX2INFO(37701)
+    to_CP51932_E5_A6_offsets,
+    to_CP51932_E5_A6_infos,
+
+#define to_CP51932_E5_A7_infos WORDINDEX2INFO(37703)
+           INVALID,         UNDEF, o2(0xd5,0xa8), o2(0xbb,0xd0),
+     o2(0xbb,0xcf), o2(0xb0,0xb9), o2(0xb8,0xc8), o2(0xc0,0xab),
+     o2(0xb0,0xd1), o2(0xd5,0xac), o2(0xd5,0xad), o2(0xd5,0xaa),
+     o2(0xb1,0xb8), o2(0xb4,0xaf), o2(0xd5,0xa9), o2(0xcc,0xc5),
+     o2(0xc9,0xb1), o2(0xb0,0xa8), o2(0xb0,0xf9), o2(0xbb,0xd1),
+
+#define to_CP51932_E5_A7 WORDINDEX2INFO(37723)
+    to_CP51932_E5_A7_offsets,
+    to_CP51932_E5_A7_infos,
+
+#define to_CP51932_E5_A8_infos WORDINDEX2INFO(37725)
+           INVALID,         UNDEF, o2(0xb0,0xd2), o2(0xb0,0xa3),
+     o2(0xd5,0xb2), o2(0xd5,0xb0), o2(0xcc,0xbc), o2(0xd5,0xb3),
+     o2(0xd5,0xb1), o2(0xd5,0xaf), o2(0xbf,0xb1), o2(0xd5,0xae),
+     o2(0xca,0xda), o2(0xb8,0xe4), o2(0xd5,0xb7), o2(0xd5,0xb8),
+     o2(0xbe,0xab),
+
+#define to_CP51932_E5_A8 WORDINDEX2INFO(37742)
+    to_CP51932_E5_A8_offsets,
+    to_CP51932_E5_A8_infos,
+
+#define to_CP51932_E5_A9_infos WORDINDEX2INFO(37744)
+           INVALID, o2(0xd5,0xb4), o2(0xcf,0xac),         UNDEF,
+     o2(0xc7,0xcc), o2(0xd5,0xb6), o2(0xba,0xa7), o2(0xd5,0xb9),
+     o2(0xc9,0xd8), o2(0xd5,0xba), o2(0xd5,0xb5), o2(0xcc,0xbb),
+
+#define to_CP51932_E5_A9 WORDINDEX2INFO(37756)
+    to_CP51932_E5_A9_offsets,
+    to_CP51932_E5_A9_infos,
+
+#define to_CP51932_E5_AA_infos WORDINDEX2INFO(37758)
+           INVALID,         UNDEF, o2(0xc7,0xde), o2(0xd5,0xbb),
+     o2(0xc9,0xb2), o2(0xd5,0xbc), o2(0xd5,0xc0), o2(0xd5,0xbd),
+
+#define to_CP51932_E5_AA WORDINDEX2INFO(37766)
+    to_CP51932_E5_AA_offsets,
+    to_CP51932_E5_AA_infos,
+
+#define to_CP51932_E5_AB_infos WORDINDEX2INFO(37768)
+           INVALID,         UNDEF, o2(0xb2,0xc7), o2(0xd5,0xbf),
+     o2(0xbc,0xbb), o2(0xd5,0xbe), o2(0xb7,0xf9), o2(0xd5,0xcc),
+     o2(0xd5,0xc5), o2(0xd5,0xc2), o2(0xc3,0xe4), o2(0xd5,0xc1),
+     o2(0xd5,0xc3), o2(0xd5,0xc4), o2(0xd5,0xc6), o2(0xd5,0xc7),
+
+#define to_CP51932_E5_AB WORDINDEX2INFO(37784)
+    to_CP51932_E5_AB_offsets,
+    to_CP51932_E5_AB_infos,
+
+#define to_CP51932_E5_AC_infos WORDINDEX2INFO(37786)
+           INVALID,         UNDEF, o2(0xb4,0xf2), o2(0xd5,0xc9),
+     o2(0xd5,0xc8), o2(0xd5,0xca), o2(0xbe,0xee), o2(0xd5,0xcd),
+     o2(0xc4,0xdc), o2(0xb1,0xc5), o2(0xd5,0xcb), o2(0xd5,0xce),
+     o2(0xd5,0xcf),
+
+#define to_CP51932_E5_AC WORDINDEX2INFO(37799)
+    to_CP51932_E5_AC_offsets,
+    to_CP51932_E5_AC_infos,
+
+#define to_CP51932_E5_AD_infos WORDINDEX2INFO(37801)
+           INVALID, o2(0xd5,0xd2),         UNDEF, o2(0xd5,0xd0),
+     o2(0xd5,0xd1), o2(0xbb,0xd2), o2(0xd5,0xd3), o2(0xb9,0xa6),
+     o2(0xd5,0xd4), o2(0xf9,0xea), o2(0xbb,0xfa), o2(0xc2,0xb8),
+     o2(0xd5,0xd5), o2(0xd5,0xd6), o2(0xbb,0xda), o2(0xb9,0xa7),
+     o2(0xcc,0xd2), o2(0xb5,0xa8), o2(0xb8,0xc9), o2(0xd5,0xd7),
+     o2(0xb3,0xd8), o2(0xd5,0xd8), o2(0xc2,0xb9), o2(0xd5,0xd9),
+     o2(0xd6,0xa3), o2(0xd5,0xda), o2(0xd5,0xdb), o2(0xd5,0xdc),
+     o2(0xd5,0xde),
+
+#define to_CP51932_E5_AD WORDINDEX2INFO(37830)
+    to_CP51932_E5_AD_offsets,
+    to_CP51932_E5_AD_infos,
+
+#define to_CP51932_E5_AE_infos WORDINDEX2INFO(37832)
+           INVALID, o2(0xd5,0xdf),         UNDEF, o2(0xd5,0xe0),
+     o2(0xc2,0xf0), o2(0xb1,0xa7), o2(0xbc,0xe9), o2(0xb0,0xc2),
+     o2(0xc1,0xd7), o2(0xb4,0xb0), o2(0xbc,0xb5), o2(0xb9,0xa8),
+     o2(0xc5,0xe6), o2(0xbd,0xa1), o2(0xb4,0xb1), o2(0xc3,0xe8),
+     o2(0xc4,0xea), o2(0xb0,0xb8), o2(0xb5,0xb9), o2(0xca,0xf5),
+     o2(0xbc,0xc2), o2(0xb5,0xd2), o2(0xc0,0xeb), o2(0xbc,0xbc),
+     o2(0xcd,0xa8), o2(0xd5,0xe1), o2(0xb5,0xdc), o2(0xba,0xcb),
+     o2(0xb3,0xb2), o2(0xb1,0xe3), o2(0xbe,0xac), o2(0xb2,0xc8),
+     o2(0xd5,0xe2), o2(0xcd,0xc6), o2(0xbd,0xc9),
+
+#define to_CP51932_E5_AE WORDINDEX2INFO(37867)
+    to_CP51932_E5_AE_offsets,
+    to_CP51932_E5_AE_infos,
+
+#define to_CP51932_E5_AF_infos WORDINDEX2INFO(37869)
+           INVALID, o2(0xf9,0xeb),         UNDEF, o2(0xbc,0xe4),
+     o2(0xd5,0xe3), o2(0xb4,0xf3), o2(0xc6,0xd2), o2(0xcc,0xa9),
+     o2(0xd5,0xe4), o2(0xd5,0xe5), o2(0xc9,0xd9), o2(0xd5,0xe7),
+     o2(0xb4,0xa8), o2(0xb6,0xf7), o2(0xd5,0xe6), o2(0xf9,0xed),
+     o2(0xb4,0xb2), o2(0xbf,0xb2), o2(0xd5,0xeb), o2(0xbb,0xa1),
+     o2(0xb2,0xc9), o2(0xd5,0xea), o2(0xd5,0xe8), o2(0xd5,0xec),
+     o2(0xd5,0xe9), o2(0xc7,0xab), o2(0xdc,0xcd), o2(0xbf,0xb3),
+     o2(0xd5,0xed), o2(0xf9,0xee), o2(0xce,0xc0), o2(0xd5,0xee),
+     o2(0xd5,0xf0), o2(0xc3,0xfe), o2(0xd5,0xef), o2(0xc0,0xa3),
+     o2(0xbb,0xfb), o2(0xc2,0xd0), o2(0xbc,0xf7),
+
+#define to_CP51932_E5_AF WORDINDEX2INFO(37908)
+    to_CP51932_E5_AF_offsets,
+    to_CP51932_E5_AF_infos,
+
+#define to_CP51932_E5_B0_infos WORDINDEX2INFO(37910)
+           INVALID,         UNDEF, o2(0xc9,0xf5), o2(0xc0,0xec),
+     o2(0xbc,0xcd), o2(0xd5,0xf1), o2(0xbe,0xad), o2(0xd5,0xf2),
+     o2(0xd5,0xf3), o2(0xb0,0xd3), o2(0xc2,0xba), o2(0xbf,0xd2),
+     o2(0xd5,0xf4), o2(0xc6,0xb3), o2(0xbe,0xae), o2(0xbe,0xaf),
+     o2(0xd5,0xf5), o2(0xc0,0xed), o2(0xbe,0xb0), o2(0xf9,0xef),
+     o2(0xd5,0xf6), o2(0xd5,0xf7), o2(0xcc,0xe0), o2(0xd5,0xf8),
+     o2(0xb6,0xc6), o2(0xbd,0xa2), o2(0xd5,0xf9), o2(0xd5,0xfa),
+     o2(0xbc,0xdc), o2(0xbf,0xac), o2(0xc6,0xf4), o2(0xbf,0xd4),
+     o2(0xc8,0xf8), o2(0xc7,0xa2),
+
+#define to_CP51932_E5_B0 WORDINDEX2INFO(37944)
+    to_CP51932_E5_B0_offsets,
+    to_CP51932_E5_B0_infos,
+
+#define to_CP51932_E5_B1_infos WORDINDEX2INFO(37946)
+           INVALID, o2(0xb6,0xc9), o2(0xd5,0xfb),         UNDEF,
+     o2(0xb5,0xef), o2(0xd5,0xfc), o2(0xb6,0xfe), o2(0xc6,0xcf),
+     o2(0xb2,0xb0), o2(0xbb,0xd3), o2(0xd5,0xfd), o2(0xd6,0xa2),
+     o2(0xd6,0xa1), o2(0xb6,0xfd), o2(0xd5,0xfe), o2(0xc5,0xb8),
+     o2(0xc2,0xb0), o2(0xc5,0xcb), o2(0xbc,0xc8), o2(0xc1,0xd8),
+     o2(0xcd,0xfa), o2(0xd6,0xa4), o2(0xd6,0xa5), o2(0xc6,0xd6),
+     o2(0xbb,0xb3), o2(0xd6,0xa7), o2(0xd6,0xa8),
+
+#define to_CP51932_E5_B1 WORDINDEX2INFO(37973)
+    to_CP51932_E5_B1_offsets,
+    to_CP51932_E5_B1_infos,
+
+#define to_CP51932_E5_B2_infos WORDINDEX2INFO(37975)
+           INVALID,         UNDEF, o2(0xd6,0xa9), o2(0xb4,0xf4),
+     o2(0xd6,0xaa), o2(0xd6,0xab), o2(0xb2,0xac), o2(0xf9,0xf0),
+     o2(0xc1,0xbb), o2(0xb4,0xe4), o2(0xd6,0xad), o2(0xcc,0xa8),
+     o2(0xc2,0xd2), o2(0xb3,0xd9), o2(0xd6,0xaf), o2(0xd6,0xb1),
+     o2(0xb4,0xdf), o2(0xf9,0xf1), o2(0xd6,0xae), o2(0xd6,0xb0),
+     o2(0xd6,0xb3),
+
+#define to_CP51932_E5_B2 WORDINDEX2INFO(37996)
+    to_CP51932_E5_B2_offsets,
+    to_CP51932_E5_B2_infos,
+
+#define to_CP51932_E5_B3_infos WORDINDEX2INFO(37998)
+           INVALID,         UNDEF, o2(0xd6,0xb2), o2(0xd6,0xb4),
+     o2(0xd6,0xb5), o2(0xc6,0xbd), o2(0xb6,0xae), o2(0xb2,0xe5),
+     o2(0xd6,0xb6), o2(0xd6,0xbb), o2(0xd6,0xb9), o2(0xca,0xf7),
+     o2(0xca,0xf6), o2(0xf9,0xf2), o2(0xc5,0xe7), o2(0xd6,0xb8),
+     o2(0xbd,0xd4), o2(0xd6,0xb7),
+
+#define to_CP51932_E5_B3 WORDINDEX2INFO(38016)
+    to_CP51932_E5_B3_offsets,
+    to_CP51932_E5_B3_infos,
+
+#define to_CP51932_E5_B4_infos WORDINDEX2INFO(38018)
+           INVALID,         UNDEF, o2(0xbf,0xf2), o2(0xd6,0xbc),
+     o2(0xba,0xea), o2(0xd6,0xc2), o2(0xd6,0xc3), o2(0xd6,0xbd),
+     o2(0xb3,0xb3), o2(0xd6,0xbe), o2(0xd6,0xc7), o2(0xd6,0xc6),
+     o2(0xd6,0xc5), o2(0xd6,0xc1), o2(0xd6,0xc0), o2(0xd6,0xc4),
+     o2(0xf9,0xf3), o2(0xca,0xf8),
+
+#define to_CP51932_E5_B4 WORDINDEX2INFO(38036)
+    to_CP51932_E5_B4_offsets,
+    to_CP51932_E5_B4_infos,
+
+#define to_CP51932_E5_B5_infos WORDINDEX2INFO(38038)
+           INVALID,         UNDEF, o2(0xf9,0xf6), o2(0xd6,0xcb),
+     o2(0xd6,0xc8), o2(0xd6,0xca), o2(0xcd,0xf2), o2(0xd6,0xc9),
+     o2(0xf9,0xf4), o2(0xd6,0xbf), o2(0xbf,0xf3), o2(0xd6,0xcc),
+     o2(0xf9,0xf7), o2(0xba,0xb7), o2(0xd6,0xcd), o2(0xd6,0xce),
+
+#define to_CP51932_E5_B5 WORDINDEX2INFO(38054)
+    to_CP51932_E5_B5_offsets,
+    to_CP51932_E5_B5_infos,
+
+#define to_CP51932_E5_B6_infos WORDINDEX2INFO(38056)
+           INVALID,         UNDEF, o2(0xd6,0xd1), o2(0xd6,0xd0),
+     o2(0xd6,0xcf), o2(0xc5,0xe8), o2(0xd6,0xba), o2(0xd6,0xd7),
+     o2(0xd6,0xd3), o2(0xd6,0xd2), o2(0xd6,0xd4), o2(0xd6,0xd5),
+     o2(0xd6,0xd8), o2(0xf9,0xf8), o2(0xf9,0xf9), o2(0xce,0xe6),
+     o2(0xd6,0xd9), o2(0xd6,0xd6),
+
+#define to_CP51932_E5_B6 WORDINDEX2INFO(38074)
+    to_CP51932_E5_B6_offsets,
+    to_CP51932_E5_B6_infos,
+
+#define to_CP51932_E5_B7_infos WORDINDEX2INFO(38076)
+           INVALID,         UNDEF, o2(0xd6,0xda), o2(0xb4,0xe0),
+     o2(0xd6,0xdb), o2(0xf9,0xfa), o2(0xd6,0xdd), o2(0xd6,0xdc),
+     o2(0xd6,0xde), o2(0xd6,0xdf), o2(0xc0,0xee), o2(0xbd,0xa3),
+     o2(0xbd,0xe4), o2(0xc1,0xe3), o2(0xb9,0xa9), o2(0xba,0xb8),
+     o2(0xb9,0xaa), o2(0xb5,0xf0), o2(0xd6,0xe0), o2(0xba,0xb9),
+     o2(0xb8,0xca), o2(0xd6,0xe1), o2(0xcc,0xa6), o2(0xc7,0xc3),
+     o2(0xd6,0xe2), o2(0xb9,0xab), o2(0xb4,0xac), o2(0xc3,0xa7),
+     o2(0xb6,0xd2),
+
+#define to_CP51932_E5_B7 WORDINDEX2INFO(38105)
+    to_CP51932_E5_B7_offsets,
+    to_CP51932_E5_B7_infos,
+
+#define to_CP51932_E5_B8_infos WORDINDEX2INFO(38107)
+           INVALID,         UNDEF, o2(0xbb,0xd4), o2(0xc9,0xdb),
+     o2(0xc8,0xc1), o2(0xd6,0xe3), o2(0xb4,0xf5), o2(0xd6,0xe6),
+     o2(0xc4,0xa1), o2(0xd6,0xe5), o2(0xd6,0xe4), o2(0xd6,0xe7),
+     o2(0xc4,0xeb), o2(0xbf,0xe3), o2(0xbb,0xd5), o2(0xc0,0xca),
+     o2(0xc2,0xd3), o2(0xb5,0xa2), o2(0xc4,0xa2), o2(0xd6,0xe8),
+     o2(0xd6,0xe9), o2(0xbe,0xef), o2(0xcb,0xb9),
+
+#define to_CP51932_E5_B8 WORDINDEX2INFO(38130)
+    to_CP51932_E5_B8_offsets,
+    to_CP51932_E5_B8_infos,
+
+#define to_CP51932_E5_B9_infos WORDINDEX2INFO(38132)
+           INVALID, o2(0xd6,0xec),         UNDEF, o2(0xd6,0xeb),
+     o2(0xd6,0xea), o2(0xc9,0xfd), o2(0xd6,0xf3), o2(0xcb,0xda),
+     o2(0xd6,0xed), o2(0xd6,0xef), o2(0xcb,0xeb), o2(0xd6,0xee),
+     o2(0xd6,0xf0), o2(0xc8,0xa8), o2(0xd6,0xf1), o2(0xca,0xbe),
+     o2(0xd6,0xf2), o2(0xb4,0xb3), o2(0xca,0xbf), o2(0xc7,0xaf),
+     o2(0xd6,0xf4), o2(0xd6,0xf5), o2(0xb9,0xac), o2(0xb4,0xb4),
+     o2(0xd6,0xf6), o2(0xb8,0xb8), o2(0xcd,0xc4), o2(0xcd,0xa9),
+     o2(0xb4,0xf6), o2(0xd6,0xf8),
+
+#define to_CP51932_E5_B9 WORDINDEX2INFO(38162)
+    to_CP51932_E5_B9_offsets,
+    to_CP51932_E5_B9_infos,
+
+#define to_CP51932_E5_BA_infos WORDINDEX2INFO(38164)
+           INVALID,         UNDEF, o2(0xc4,0xa3), o2(0xb9,0xad),
+     o2(0xbe,0xb1), o2(0xc8,0xdf), o2(0xbe,0xb2), o2(0xbd,0xf8),
+     o2(0xc4,0xec), o2(0xca,0xf9), o2(0xc5,0xb9), o2(0xb9,0xae),
+     o2(0xc9,0xdc), o2(0xd6,0xf9), o2(0xc5,0xd9), o2(0xba,0xc2),
+     o2(0xb8,0xcb), o2(0xc4,0xed), o2(0xb0,0xc3), o2(0xbd,0xee),
+     o2(0xb9,0xaf), o2(0xcd,0xc7),
+
+#define to_CP51932_E5_BA WORDINDEX2INFO(38186)
+    to_CP51932_E5_BA_offsets,
+    to_CP51932_E5_BA_infos,
+
+#define to_CP51932_E5_BB_infos WORDINDEX2INFO(38188)
+           INVALID,         UNDEF, o2(0xd6,0xfa), o2(0xd6,0xfb),
+     o2(0xc7,0xd1), o2(0xd6,0xfc), o2(0xce,0xf7), o2(0xcf,0xad),
+     o2(0xd6,0xfe), o2(0xd6,0xfd), o2(0xb3,0xc7), o2(0xd7,0xa1),
+     o2(0xd7,0xa4), o2(0xd7,0xa5), o2(0xd7,0xa3), o2(0xc9,0xc0),
+     o2(0xbe,0xb3), o2(0xd7,0xa7), o2(0xd7,0xa6), o2(0xd7,0xa2),
+     o2(0xd7,0xa8), o2(0xd7,0xa9), o2(0xd7,0xaa), o2(0xd7,0xad),
+     o2(0xd7,0xab), o2(0xd7,0xac), o2(0xd7,0xae), o2(0xb1,0xe4),
+     o2(0xc4,0xee), o2(0xd7,0xaf), o2(0xb7,0xfa), o2(0xb2,0xf6),
+     o2(0xc7,0xb6), o2(0xd7,0xb0), o2(0xc6,0xfb),
+
+#define to_CP51932_E5_BB WORDINDEX2INFO(38223)
+    to_CP51932_E5_BB_offsets,
+    to_CP51932_E5_BB_infos,
+
+#define to_CP51932_E5_BC_infos WORDINDEX2INFO(38225)
+           INVALID,         UNDEF, o2(0xca,0xdb), o2(0xd7,0xb1),
+     o2(0xcf,0xae), o2(0xd7,0xb2), o2(0xca,0xc0), o2(0xd7,0xb5),
+     o2(0xd0,0xa1), o2(0xd0,0xb1), o2(0xbc,0xb0), o2(0xc6,0xf5),
+     o2(0xd7,0xb6), o2(0xb5,0xdd), o2(0xc4,0xa4), o2(0xb0,0xfa),
+     o2(0xd7,0xb7), o2(0xca,0xa6), o2(0xb9,0xb0), o2(0xc3,0xd0),
+     o2(0xc4,0xef), o2(0xf9,0xfb), o2(0xcc,0xef), o2(0xb8,0xb9),
+     o2(0xb8,0xcc), o2(0xd7,0xb8), o2(0xd7,0xb9), o2(0xd7,0xbf),
+     o2(0xbc,0xe5), o2(0xf9,0xfc), o2(0xc4,0xa5), o2(0xb6,0xaf),
+     o2(0xd7,0xba), o2(0xc9,0xab), o2(0xc3,0xc6),
+
+#define to_CP51932_E5_BC WORDINDEX2INFO(38260)
+    to_CP51932_E5_BC_offsets,
+    to_CP51932_E5_BC_infos,
+
+#define to_CP51932_E5_BD_infos WORDINDEX2INFO(38262)
+           INVALID,         UNDEF, o2(0xd7,0xbb), o2(0xf9,0xac),
+     o2(0xd7,0xbc), o2(0xb6,0xb0), o2(0xd7,0xbd), o2(0xd7,0xbe),
+     o2(0xd7,0xc0), o2(0xc5,0xf6), o2(0xd7,0xc1), o2(0xd7,0xc2),
+     o2(0xd7,0xc3), o2(0xd7,0xb4), o2(0xd7,0xb3), o2(0xd7,0xc4),
+     o2(0xb7,0xc1), o2(0xc9,0xa7), o2(0xf9,0xfd), o2(0xba,0xcc),
+     o2(0xc9,0xb7), o2(0xc4,0xa6), o2(0xc9,0xcb), o2(0xd7,0xc5),
+     o2(0xbe,0xb4), o2(0xb1,0xc6), o2(0xd7,0xc6), o2(0xd7,0xc7),
+     o2(0xcc,0xf2), o2(0xc8,0xe0), o2(0xd7,0xca),
+
+#define to_CP51932_E5_BD WORDINDEX2INFO(38293)
+    to_CP51932_E5_BD_offsets,
+    to_CP51932_E5_BD_infos,
+
+#define to_CP51932_E5_BE_infos WORDINDEX2INFO(38295)
+           INVALID, o2(0xb1,0xfd), o2(0xc0,0xac), o2(0xd7,0xc9),
+     o2(0xd7,0xc8), o2(0xb7,0xc2), o2(0xc2,0xd4),         UNDEF,
+     o2(0xd7,0xce), o2(0xd7,0xcc), o2(0xd7,0xcb), o2(0xce,0xa7),
+     o2(0xb8,0xe5), o2(0xbd,0xf9), o2(0xd7,0xcd), o2(0xc5,0xcc),
+     o2(0xbd,0xbe), o2(0xc6,0xc0), o2(0xd7,0xd1), o2(0xd7,0xd0),
+     o2(0xd7,0xcf), o2(0xd7,0xd2), o2(0xb8,0xe6), o2(0xd7,0xd3),
+     o2(0xc9,0xfc), o2(0xbd,0xdb), o2(0xd7,0xd4), o2(0xc8,0xf9),
+     o2(0xc6,0xc1), o2(0xc4,0xa7), o2(0xf9,0xfe), o2(0xc5,0xb0),
+     o2(0xd7,0xd5), o2(0xb5,0xab),
+
+#define to_CP51932_E5_BE WORDINDEX2INFO(38329)
+    to_CP51932_E5_BE_offsets,
+    to_CP51932_E5_BE_infos,
+
+#define to_CP51932_E5_BF_infos WORDINDEX2INFO(38331)
+           INVALID,         UNDEF, o2(0xbf,0xb4), o2(0xc9,0xac),
+     o2(0xb4,0xf7), o2(0xc7,0xa6), o2(0xd7,0xd6), o2(0xbb,0xd6),
+     o2(0xcb,0xba), o2(0xcb,0xbb), o2(0xb1,0xfe), o2(0xd7,0xdb),
+     o2(0xfa,0xa1), o2(0xc3,0xe9), o2(0xd7,0xd8), o2(0xb2,0xf7),
+     o2(0xd8,0xad), o2(0xd7,0xda), o2(0xc7,0xb0), o2(0xd7,0xd9),
+     o2(0xd7,0xd7), o2(0xb9,0xfa), o2(0xd7,0xdd),
+
+#define to_CP51932_E5_BF WORDINDEX2INFO(38354)
+    to_CP51932_E5_BF_offsets,
+    to_CP51932_E5_BF_infos,
+
+#define to_CP51932_E5_infos WORDINDEX2INFO(38356)
+              INVALID, to_CP51932_E5_80, to_CP51932_E5_81, to_CP51932_E5_82,
+     to_CP51932_E5_83, to_CP51932_E5_84, to_CP51932_E5_85, to_CP51932_E5_86,
+     to_CP51932_E5_87, to_CP51932_E5_88, to_CP51932_E5_89, to_CP51932_E5_8A,
+     to_CP51932_E5_8B, to_CP51932_E5_8C, to_CP51932_E5_8D, to_CP51932_E5_8E,
+     to_CP51932_E5_8F, to_CP51932_E5_90, to_CP51932_E5_91, to_CP51932_E5_92,
+     to_CP51932_E5_93, to_CP51932_E5_94, to_CP51932_E5_95, to_CP51932_E5_96,
+     to_CP51932_E5_97, to_CP51932_E5_98, to_CP51932_E5_99, to_CP51932_E5_9A,
+     to_CP51932_E5_9B, to_CP51932_E5_9C, to_CP51932_E5_9D, to_CP51932_E5_9E,
+     to_CP51932_E5_9F, to_CP51932_E5_A0, to_CP51932_E5_A1, to_CP51932_E5_A2,
+     to_CP51932_E5_A3, to_CP51932_E5_A4, to_CP51932_E5_A5, to_CP51932_E5_A6,
+     to_CP51932_E5_A7, to_CP51932_E5_A8, to_CP51932_E5_A9, to_CP51932_E5_AA,
+     to_CP51932_E5_AB, to_CP51932_E5_AC, to_CP51932_E5_AD, to_CP51932_E5_AE,
+     to_CP51932_E5_AF, to_CP51932_E5_B0, to_CP51932_E5_B1, to_CP51932_E5_B2,
+     to_CP51932_E5_B3, to_CP51932_E5_B4, to_CP51932_E5_B5, to_CP51932_E5_B6,
+     to_CP51932_E5_B7, to_CP51932_E5_B8, to_CP51932_E5_B9, to_CP51932_E5_BA,
+     to_CP51932_E5_BB, to_CP51932_E5_BC, to_CP51932_E5_BD, to_CP51932_E5_BE,
+     to_CP51932_E5_BF,
+
+#define to_CP51932_E5 WORDINDEX2INFO(38421)
+    to_EUC_JP_C3_offsets,
+    to_CP51932_E5_infos,
+
+#define to_CP51932_E6_80_infos WORDINDEX2INFO(38423)
+           INVALID,         UNDEF, o2(0xd7,0xe3), o2(0xd7,0xe9),
+     o2(0xd7,0xe1), o2(0xc5,0xdc), o2(0xd7,0xe6), o2(0xc9,0xdd),
+     o2(0xd7,0xe0), o2(0xd7,0xe5), o2(0xce,0xe7), o2(0xbb,0xd7),
+     o2(0xc2,0xd5), o2(0xd7,0xde), o2(0xb5,0xde), o2(0xd7,0xe8),
+     o2(0xc0,0xad), o2(0xb1,0xe5), o2(0xd7,0xe2), o2(0xb2,0xf8),
+     o2(0xd7,0xe7), o2(0xb6,0xb1), o2(0xd7,0xe4), o2(0xd7,0xea),
+
+#define to_CP51932_E6_80 WORDINDEX2INFO(38447)
+    to_CP51932_E6_80_offsets,
+    to_CP51932_E6_80_infos,
+
+#define to_CP51932_E6_81_infos WORDINDEX2INFO(38449)
+           INVALID,         UNDEF, o2(0xd7,0xec), o2(0xd7,0xf6),
+     o2(0xd7,0xf4), o2(0xd7,0xf1), o2(0xd7,0xf0), o2(0xce,0xf8),
+     o2(0xd7,0xf2), o2(0xb6,0xb2), o2(0xb9,0xb1), o2(0xbd,0xfa),
+     o2(0xd7,0xf9), o2(0xd7,0xeb), o2(0xfa,0xa2), o2(0xd7,0xef),
+     o2(0xd7,0xdf), o2(0xb2,0xfa), o2(0xd7,0xf3), o2(0xd7,0xf5),
+     o2(0xc3,0xd1), o2(0xba,0xa8), o2(0xb2,0xb8), o2(0xd7,0xed),
+     o2(0xd7,0xf8), o2(0xd7,0xf7), o2(0xb6,0xb3), o2(0xc2,0xa9),
+     o2(0xb3,0xe6), o2(0xb7,0xc3), o2(0xd7,0xee),
+
+#define to_CP51932_E6_81 WORDINDEX2INFO(38480)
+    to_CP51932_E6_81_offsets,
+    to_CP51932_E6_81_infos,
+
+#define to_CP51932_E6_82_infos WORDINDEX2INFO(38482)
+           INVALID,         UNDEF, o2(0xd7,0xfa), o2(0xd7,0xfd),
+     o2(0xd8,0xa1), o2(0xfa,0xa3), o2(0xbc,0xbd), o2(0xfa,0xa4),
+     o2(0xd8,0xa7), o2(0xc4,0xf0), o2(0xd7,0xfb), o2(0xd8,0xa5),
+     o2(0xb2,0xf9), o2(0xd8,0xa3), o2(0xd8,0xa4), o2(0xd7,0xfe),
+     o2(0xd8,0xa2), o2(0xb8,0xe7), o2(0xcd,0xaa), o2(0xb4,0xb5),
+     o2(0xb1,0xd9), o2(0xd8,0xa6), o2(0xc7,0xba), o2(0xb0,0xad),
+     o2(0xc8,0xe1), o2(0xd7,0xdc), o2(0xd8,0xac), o2(0xd8,0xb0),
+     o2(0xcc,0xe5), o2(0xd8,0xa9), o2(0xc5,0xe9), o2(0xd8,0xae),
+
+#define to_CP51932_E6_82 WORDINDEX2INFO(38514)
+    to_CP51932_E6_82_offsets,
+    to_CP51932_E6_82_infos,
+
+#define to_CP51932_E6_83_infos WORDINDEX2INFO(38516)
+           INVALID,         UNDEF, o2(0xbe,0xf0), o2(0xd8,0xaf),
+     o2(0xc6,0xd7), o2(0xcf,0xc7), o2(0xd8,0xab), o2(0xfa,0xa6),
+     o2(0xd8,0xb1), o2(0xb9,0xfb), o2(0xc0,0xcb), o2(0xfa,0xa5),
+     o2(0xb0,0xd4), o2(0xd8,0xaa), o2(0xd8,0xa8), o2(0xc1,0xda),
+     o2(0xd7,0xfc), o2(0xbb,0xb4), o2(0xc2,0xc6), o2(0xd8,0xbd),
+     o2(0xfa,0xa8), o2(0xc1,0xdb), o2(0xd8,0xb8), o2(0xd8,0xb5),
+     o2(0xd8,0xb6), o2(0xbc,0xe6), o2(0xd8,0xb9), o2(0xd8,0xbc),
+
+#define to_CP51932_E6_83 WORDINDEX2INFO(38544)
+    to_CP51932_E6_83_offsets,
+    to_CP51932_E6_83_infos,
+
+#define to_CP51932_E6_84_infos WORDINDEX2INFO(38546)
+           INVALID, o2(0xd8,0xb7), o2(0xbd,0xa5),         UNDEF,
+     o2(0xd8,0xba), o2(0xd8,0xb4), o2(0xcc,0xfc), o2(0xcc,0xfb),
+     o2(0xd8,0xbe), o2(0xd8,0xbf), o2(0xb0,0xd5), o2(0xfa,0xa9),
+     o2(0xd8,0xb3), o2(0xb6,0xf2), o2(0xb0,0xa6), o2(0xb4,0xb6),
+     o2(0xfa,0xa7), o2(0xd8,0xbb), o2(0xd8,0xc3), o2(0xd8,0xc2),
+     o2(0xd8,0xc7), o2(0xfa,0xab), o2(0xd8,0xc8), o2(0xfa,0xaa),
+     o2(0xd8,0xc6), o2(0xd8,0xc9), o2(0xd8,0xc1), o2(0xd8,0xc5),
+
+#define to_CP51932_E6_84 WORDINDEX2INFO(38574)
+    to_CP51932_E6_84_offsets,
+    to_CP51932_E6_84_infos,
+
+#define to_CP51932_E6_85_infos WORDINDEX2INFO(38576)
+           INVALID,         UNDEF, o2(0xd8,0xca), o2(0xd8,0xcb),
+     o2(0xd8,0xc0), o2(0xbb,0xfc), o2(0xd8,0xc4), o2(0xc2,0xd6),
+     o2(0xb9,0xb2), o2(0xd8,0xb2), o2(0xbf,0xb5), o2(0xd8,0xd8),
+     o2(0xca,0xe9), o2(0xd8,0xce), o2(0xd8,0xcf), o2(0xd8,0xd0),
+     o2(0xd8,0xd7), o2(0xd8,0xd6), o2(0xcb,0xfd), o2(0xb4,0xb7),
+     o2(0xd8,0xd4), o2(0xb7,0xc5), o2(0xb3,0xb4), o2(0xd8,0xd1),
+     o2(0xce,0xb8), o2(0xd8,0xd3), o2(0xb0,0xd6), o2(0xd8,0xd5),
+     o2(0xd8,0xcc), o2(0xd8,0xd2), o2(0xd8,0xd9), o2(0xb7,0xc4),
+     o2(0xd8,0xcd), o2(0xcd,0xdd),
+
+#define to_CP51932_E6_85 WORDINDEX2INFO(38610)
+    to_CP51932_E6_85_offsets,
+    to_CP51932_E6_85_infos,
+
+#define to_CP51932_E6_86_infos WORDINDEX2INFO(38612)
+           INVALID,         UNDEF, o2(0xcd,0xab), o2(0xd8,0xdc),
+     o2(0xd8,0xe0), o2(0xc1,0xfe), o2(0xce,0xf9), o2(0xd8,0xe1),
+     o2(0xd8,0xde), o2(0xd8,0xdb), o2(0xfa,0xac), o2(0xd8,0xda),
+     o2(0xd8,0xdf), o2(0xca,0xb0), o2(0xc6,0xb4), o2(0xb7,0xc6),
+     o2(0xd8,0xe2), o2(0xd8,0xdd), o2(0xd8,0xe3), o2(0xb7,0xfb),
+     o2(0xb2,0xb1), o2(0xd8,0xeb), o2(0xb4,0xb8),
+
+#define to_CP51932_E6_86 WORDINDEX2INFO(38635)
+    to_CP51932_E6_86_offsets,
+    to_CP51932_E6_86_infos,
+
+#define to_CP51932_E6_87_infos WORDINDEX2INFO(38637)
+           INVALID,         UNDEF, o2(0xd8,0xe9), o2(0xd8,0xea),
+     o2(0xba,0xa9), o2(0xd8,0xe8), o2(0xd8,0xe6), o2(0xd8,0xe5),
+     o2(0xd8,0xec), o2(0xd8,0xe4), o2(0xd8,0xee), o2(0xb2,0xfb),
+     o2(0xd8,0xf0), o2(0xd8,0xef), o2(0xc4,0xa8), o2(0xd8,0xf3),
+     o2(0xd8,0xf1), o2(0xd8,0xe7), o2(0xb7,0xfc), o2(0xd8,0xf2),
+     o2(0xd8,0xf6), o2(0xd8,0xf5), o2(0xd8,0xf7), o2(0xd8,0xf4),
+
+#define to_CP51932_E6_87 WORDINDEX2INFO(38661)
+    to_CP51932_E6_87_offsets,
+    to_CP51932_E6_87_infos,
+
+#define to_CP51932_E6_88_infos WORDINDEX2INFO(38663)
+           INVALID, o2(0xd8,0xf8),         UNDEF, o2(0xd8,0xf9),
+     o2(0xd8,0xfa), o2(0xca,0xea), o2(0xd8,0xfc), o2(0xd8,0xfb),
+     o2(0xbd,0xbf), o2(0xc0,0xae), o2(0xb2,0xe6), o2(0xb2,0xfc),
+     o2(0xfa,0xad), o2(0xd8,0xfd), o2(0xb0,0xbf), o2(0xc0,0xcc),
+     o2(0xd8,0xfe), o2(0xec,0xc3), o2(0xd9,0xa1), o2(0xb7,0xe1),
+     o2(0xd9,0xa2), o2(0xc0,0xef), o2(0xd9,0xa3), o2(0xd9,0xa4),
+     o2(0xb5,0xba), o2(0xd9,0xa5), o2(0xd9,0xa6), o2(0xd9,0xa7),
+     o2(0xc2,0xd7), o2(0xb8,0xcd), o2(0xcc,0xe1), o2(0xcb,0xbc),
+
+#define to_CP51932_E6_88 WORDINDEX2INFO(38695)
+    to_CP51932_E6_88_offsets,
+    to_CP51932_E6_88_infos,
+
+#define to_CP51932_E6_89_infos WORDINDEX2INFO(38697)
+           INVALID, o2(0xbd,0xea), o2(0xd9,0xa8),         UNDEF,
+     o2(0xc0,0xf0), o2(0xee,0xbd), o2(0xc8,0xe2), o2(0xbc,0xea),
+     o2(0xba,0xcd), o2(0xd9,0xa9), o2(0xc2,0xc7), o2(0xca,0xa7),
+     o2(0xc2,0xf1), o2(0xd9,0xac), o2(0xd9,0xaa), o2(0xd9,0xad),
+     o2(0xd9,0xab), o2(0xd9,0xae), o2(0xca,0xb1), o2(0xb0,0xb7),
+     o2(0xc9,0xde), o2(0xc8,0xe3), o2(0xd9,0xaf), o2(0xd9,0xb2),
+     o2(0xbe,0xb5),
+
+#define to_CP51932_E6_89 WORDINDEX2INFO(38722)
+    to_CP51932_E6_89_offsets,
+    to_CP51932_E6_89_infos,
+
+#define to_CP51932_E6_8A_infos WORDINDEX2INFO(38724)
+           INVALID, o2(0xb5,0xbb),         UNDEF, o2(0xd9,0xb0),
+     o2(0xd9,0xb7), o2(0xbe,0xb6), o2(0xd9,0xb1), o2(0xc7,0xc4),
+     o2(0xcd,0xde), o2(0xd9,0xb3), o2(0xd9,0xb4), o2(0xd9,0xb8),
+     o2(0xc5,0xea), o2(0xd9,0xb5), o2(0xb9,0xb3), o2(0xc0,0xde),
+     o2(0xd9,0xc6), o2(0xc8,0xb4), o2(0xc2,0xf2), o2(0xfa,0xae),
+     o2(0xc8,0xe4), o2(0xda,0xad), o2(0xca,0xfa), o2(0xc4,0xf1),
+     o2(0xcb,0xf5), o2(0xd9,0xbb), o2(0xb2,0xa1), o2(0xc3,0xea),
+
+#define to_CP51932_E6_8A WORDINDEX2INFO(38752)
+    to_CP51932_E6_8A_offsets,
+    to_CP51932_E6_8A_infos,
+
+#define to_CP51932_E6_8B_infos WORDINDEX2INFO(38754)
+           INVALID,         UNDEF, o2(0xd9,0xc4), o2(0xc3,0xb4),
+     o2(0xd9,0xbe), o2(0xd9,0xc5), o2(0xd9,0xc0), o2(0xd9,0xc7),
+     o2(0xd9,0xc3), o2(0xd9,0xc2), o2(0xc7,0xef), o2(0xd9,0xbc),
+     o2(0xb2,0xfd), o2(0xd9,0xba), o2(0xb5,0xf1), o2(0xc2,0xf3),
+     o2(0xd9,0xb6), o2(0xd9,0xb9), o2(0xb9,0xb4), o2(0xc0,0xdb),
+     o2(0xbe,0xb7), o2(0xd9,0xc1), o2(0xc7,0xd2), o2(0xb5,0xf2),
+     o2(0xb3,0xc8), o2(0xb3,0xe7), o2(0xbf,0xa1), o2(0xd9,0xc9),
+     o2(0xd9,0xce), o2(0xd9,0xca), o2(0xb7,0xfd), o2(0xd9,0xcf),
+     o2(0xbb,0xa2), o2(0xb9,0xe9), o2(0xbd,0xa6), o2(0xd9,0xbd),
+
+#define to_CP51932_E6_8B WORDINDEX2INFO(38790)
+    to_CP51932_E6_8B_offsets,
+    to_CP51932_E6_8B_infos,
+
+#define to_CP51932_E6_8C_infos WORDINDEX2INFO(38792)
+           INVALID,         UNDEF, o2(0xbb,0xfd), o2(0xd9,0xcc),
+     o2(0xbb,0xd8), o2(0xd9,0xcd), o2(0xb0,0xc4), o2(0xd9,0xc8),
+     o2(0xc4,0xa9), o2(0xb5,0xf3), o2(0xb6,0xb4), o2(0xd9,0xcb),
+     o2(0xb0,0xa7), o2(0xba,0xc3), o2(0xbf,0xb6), o2(0xc4,0xf2),
+     o2(0xc8,0xd4), o2(0xd9,0xd1), o2(0xc1,0xde),
+
+#define to_CP51932_E6_8C WORDINDEX2INFO(38811)
+    to_CP51932_E6_8C_offsets,
+    to_CP51932_E6_8C_infos,
+
+#define to_CP51932_E6_8D_infos WORDINDEX2INFO(38813)
+           INVALID,         UNDEF, o2(0xc2,0xaa), o2(0xbb,0xab),
+     o2(0xd9,0xd2), o2(0xd9,0xd4), o2(0xd9,0xd0), o2(0xca,0xe1),
+     o2(0xc4,0xbd), o2(0xc1,0xdc), o2(0xca,0xfb), o2(0xbc,0xce),
+     o2(0xd9,0xe0), o2(0xd9,0xdf), o2(0xbf,0xf8), o2(0xb7,0xfe),
+     o2(0xd9,0xd9), o2(0xbe,0xb9), o2(0xc6,0xe8), o2(0xc7,0xb1),
+
+#define to_CP51932_E6_8D WORDINDEX2INFO(38833)
+    to_CP51932_E6_8D_offsets,
+    to_CP51932_E6_8D_infos,
+
+#define to_CP51932_E6_8E_infos WORDINDEX2INFO(38835)
+           INVALID, o2(0xd9,0xd7),         UNDEF, o2(0xc1,0xdd),
+     o2(0xbc,0xf8), o2(0xd9,0xdc), o2(0xbe,0xb8), o2(0xd9,0xd6),
+     o2(0xd9,0xdb), o2(0xc7,0xd3), o2(0xd9,0xd5), o2(0xb7,0xa1),
+     o2(0xb3,0xdd), o2(0xd9,0xdd), o2(0xce,0xab), o2(0xba,0xce),
+     o2(0xc3,0xb5), o2(0xd9,0xda), o2(0xc0,0xdc), o2(0xb9,0xb5),
+     o2(0xbf,0xe4), o2(0xb1,0xe6), o2(0xc1,0xbc), o2(0xd9,0xd8),
+     o2(0xb5,0xc5), o2(0xb7,0xc7), o2(0xc4,0xcf), o2(0xd9,0xde),
+     o2(0xc1,0xdf), o2(0xd9,0xe1),
+
+#define to_CP51932_E6_8E WORDINDEX2INFO(38865)
+    to_CP51932_E6_8E_offsets,
+    to_CP51932_E6_8E_infos,
+
+#define to_CP51932_E6_8F_infos WORDINDEX2INFO(38867)
+           INVALID, o2(0xd9,0xe3),         UNDEF, o2(0xc2,0xb7),
+     o2(0xd9,0xe9), o2(0xd9,0xe4), o2(0xd9,0xe6), o2(0xc9,0xc1),
+     o2(0xc4,0xf3), o2(0xd9,0xe7), o2(0xcd,0xac), o2(0xcd,0xc8),
+     o2(0xb4,0xb9), o2(0xb0,0xae), o2(0xd9,0xe5), o2(0xd9,0xe2),
+     o2(0xb4,0xf8), o2(0xb1,0xe7), o2(0xfa,0xaf), o2(0xd9,0xe8),
+     o2(0xcd,0xc9),
+
+#define to_CP51932_E6_8F WORDINDEX2INFO(38888)
+    to_CP51932_E6_8F_offsets,
+    to_CP51932_E6_8F_infos,
+
+#define to_CP51932_E6_90_infos WORDINDEX2INFO(38890)
+           INVALID,         UNDEF, o2(0xd9,0xec), o2(0xc2,0xbb),
+     o2(0xd9,0xf3), o2(0xd9,0xed), o2(0xd9,0xea), o2(0xd9,0xf1),
+     o2(0xd9,0xd3), o2(0xd9,0xee), o2(0xd9,0xf2), o2(0xc8,0xc2),
+     o2(0xc5,0xeb), o2(0xd9,0xeb), o2(0xd9,0xef), o2(0xb7,0xc8),
+     o2(0xba,0xf1),
+
+#define to_CP51932_E6_90 WORDINDEX2INFO(38907)
+    to_CP51932_E6_90_offsets,
+    to_CP51932_E6_90_infos,
+
+#define to_CP51932_E6_91_infos WORDINDEX2INFO(38909)
+           INVALID,         UNDEF, o2(0xc0,0xdd), o2(0xd9,0xf7),
+     o2(0xc5,0xa6), o2(0xfa,0xb0), o2(0xd9,0xf4), o2(0xcb,0xe0),
+     o2(0xd9,0xf5), o2(0xd9,0xf6), o2(0xcc,0xce), o2(0xc0,0xa2),
+
+#define to_CP51932_E6_91 WORDINDEX2INFO(38921)
+    to_CP51932_E6_91_offsets,
+    to_CP51932_E6_91_infos,
+
+#define to_CP51932_E6_92_infos WORDINDEX2INFO(38923)
+           INVALID,         UNDEF, o2(0xb7,0xe2), o2(0xd9,0xfd),
+     o2(0xbb,0xb5), o2(0xd9,0xfa), o2(0xd9,0xf9), o2(0xc7,0xb2),
+     o2(0xfa,0xb1), o2(0xc6,0xb5), o2(0xc5,0xb1), o2(0xd9,0xfb),
+     o2(0xd9,0xfc), o2(0xc9,0xef), o2(0xc7,0xc5), o2(0xbb,0xa3),
+     o2(0xc0,0xf1), o2(0xcb,0xd0), o2(0xb3,0xc9), o2(0xda,0xa5),
+     o2(0xd9,0xfe),
+
+#define to_CP51932_E6_92 WORDINDEX2INFO(38944)
+    to_CP51932_E6_92_offsets,
+    to_CP51932_E6_92_infos,
+
+#define to_CP51932_E6_93_infos WORDINDEX2INFO(38946)
+           INVALID,         UNDEF, o2(0xcd,0xca), o2(0xda,0xa7),
+     o2(0xda,0xa3), o2(0xda,0xa4), o2(0xc1,0xe0), o2(0xfa,0xb2),
+     o2(0xda,0xa2), o2(0xd9,0xbf), o2(0xda,0xa6), o2(0xda,0xa1),
+     o2(0xda,0xab), o2(0xda,0xac), o2(0xc5,0xa7), o2(0xda,0xae),
+     o2(0xbb,0xa4), o2(0xda,0xa9), o2(0xb5,0xbc), o2(0xda,0xaf),
+     o2(0xda,0xa8), o2(0xda,0xb3), o2(0xda,0xb2), o2(0xda,0xb1),
+     o2(0xda,0xb4), o2(0xda,0xb6), o2(0xbe,0xf1),
+
+#define to_CP51932_E6_93 WORDINDEX2INFO(38973)
+    to_CP51932_E6_93_offsets,
+    to_CP51932_E6_93_infos,
+
+#define to_CP51932_E6_94_infos WORDINDEX2INFO(38975)
+           INVALID, o2(0xda,0xb5),         UNDEF, o2(0xda,0xb9),
+     o2(0xda,0xb7), o2(0xda,0xb8), o2(0xd9,0xf0), o2(0xda,0xbb),
+     o2(0xda,0xba), o2(0xd9,0xf8), o2(0xda,0xbc), o2(0xda,0xb0),
+     o2(0xbb,0xd9), o2(0xda,0xbd), o2(0xda,0xbe), o2(0xda,0xc0),
+     o2(0xda,0xbf), o2(0xda,0xc1), o2(0xb2,0xfe), o2(0xb9,0xb6),
+     o2(0xca,0xfc), o2(0xc0,0xaf),
+
+#define to_CP51932_E6_94 WORDINDEX2INFO(38997)
+    to_CP51932_E6_94_offsets,
+    to_CP51932_E6_94_infos,
+
+#define to_CP51932_E6_95_infos WORDINDEX2INFO(38999)
+           INVALID,         UNDEF, o2(0xb8,0xce), o2(0xda,0xc3),
+     o2(0xda,0xc6), o2(0xfa,0xb3), o2(0xc9,0xd2), o2(0xb5,0xdf),
+     o2(0xda,0xc5), o2(0xda,0xc4), o2(0xc7,0xd4), o2(0xda,0xc7),
+     o2(0xb6,0xb5), o2(0xda,0xc9), o2(0xda,0xc8), o2(0xb4,0xba),
+     o2(0xbb,0xb6), o2(0xc6,0xd8), o2(0xb7,0xc9), o2(0xbf,0xf4),
+     o2(0xda,0xca), o2(0xc0,0xb0), o2(0xc5,0xa8), o2(0xc9,0xdf),
+     o2(0xda,0xcb),
+
+#define to_CP51932_E6_95 WORDINDEX2INFO(39024)
+    to_CP51932_E6_95_offsets,
+    to_CP51932_E6_95_infos,
+
+#define to_CP51932_E6_96_infos WORDINDEX2INFO(39026)
+           INVALID,         UNDEF, o2(0xda,0xcc), o2(0xda,0xcd),
+     o2(0xca,0xb8), o2(0xd5,0xdd), o2(0xc0,0xc6), o2(0xc9,0xcc),
+     o2(0xba,0xd8), o2(0xc8,0xe5), o2(0xc8,0xc3), o2(0xc5,0xcd),
+     o2(0xce,0xc1), o2(0xda,0xcf), o2(0xbc,0xd0), o2(0xda,0xd0),
+     o2(0xb0,0xb6), o2(0xb6,0xd4), o2(0xc0,0xcd), o2(0xc9,0xe0),
+     o2(0xda,0xd1), o2(0xbb,0xc2), o2(0xc3,0xc7), o2(0xbb,0xdb),
+     o2(0xbf,0xb7), o2(0xda,0xd2), o2(0xca,0xfd), o2(0xb1,0xf7),
+     o2(0xbb,0xdc),
+
+#define to_CP51932_E6_96 WORDINDEX2INFO(39055)
+    to_CP51932_E6_96_offsets,
+    to_CP51932_E6_96_infos,
+
+#define to_CP51932_E6_97_infos WORDINDEX2INFO(39057)
+           INVALID,         UNDEF, o2(0xda,0xd5), o2(0xda,0xd3),
+     o2(0xda,0xd6), o2(0xce,0xb9), o2(0xda,0xd4), o2(0xc0,0xfb),
+     o2(0xda,0xd7), o2(0xc2,0xb2), o2(0xda,0xd8), o2(0xb4,0xfa),
+     o2(0xda,0xda), o2(0xda,0xd9), o2(0xda,0xdb), o2(0xda,0xdc),
+     o2(0xb4,0xfb), o2(0xc6,0xfc), o2(0xc3,0xb6), o2(0xb5,0xec),
+     o2(0xbb,0xdd), o2(0xc1,0xe1), o2(0xbd,0xdc), o2(0xb0,0xb0),
+     o2(0xda,0xdd), o2(0xb2,0xa2), o2(0xda,0xe1),
+
+#define to_CP51932_E6_97 WORDINDEX2INFO(39084)
+    to_CP51932_E6_97_offsets,
+    to_CP51932_E6_97_infos,
+
+#define to_CP51932_E6_98_infos WORDINDEX2INFO(39086)
+           INVALID, o2(0xfa,0xb4),         UNDEF, o2(0xb9,0xb7),
+     o2(0xda,0xe0), o2(0xba,0xab), o2(0xbe,0xba), o2(0xfa,0xb7),
+     o2(0xda,0xdf), o2(0xbe,0xbb), o2(0xcc,0xc0), o2(0xba,0xaa),
+     o2(0xb0,0xd7), o2(0xc0,0xce), o2(0xfa,0xb5), o2(0xda,0xe6),
+     o2(0xfa,0xb9), o2(0xc0,0xb1), o2(0xb1,0xc7), o2(0xfa,0xba),
+     o2(0xbd,0xd5), o2(0xcb,0xe6), o2(0xba,0xf2), o2(0xbe,0xbc),
+     o2(0xfa,0xb8), o2(0xc0,0xa7), o2(0xf9,0xa8), o2(0xda,0xe5),
+     o2(0xda,0xe3), o2(0xda,0xe4), o2(0xfa,0xb6), o2(0xc3,0xeb),
+     o2(0xdb,0xa6),
+
+#define to_CP51932_E6_98 WORDINDEX2INFO(39119)
+    to_CP51932_E6_98_offsets,
+    to_CP51932_E6_98_infos,
+
+#define to_CP51932_E6_99_infos WORDINDEX2INFO(39121)
+           INVALID,         UNDEF, o2(0xda,0xea), o2(0xbb,0xfe),
+     o2(0xb9,0xb8), o2(0xda,0xe8), o2(0xda,0xe9), o2(0xbf,0xb8),
+     o2(0xda,0xe7), o2(0xbb,0xaf), o2(0xfa,0xbc), o2(0xfa,0xbd),
+     o2(0xda,0xec), o2(0xda,0xeb), o2(0xda,0xf0), o2(0xda,0xf1),
+     o2(0xda,0xed), o2(0xfa,0xbb), o2(0xb3,0xa2), o2(0xda,0xee),
+     o2(0xda,0xef), o2(0xc8,0xd5), o2(0xc9,0xe1), o2(0xb7,0xca),
+     o2(0xda,0xf2), o2(0xfa,0xbf), o2(0xc0,0xb2), o2(0xbe,0xbd),
+     o2(0xc3,0xd2),
+
+#define to_CP51932_E6_99 WORDINDEX2INFO(39150)
+    to_CP51932_E6_99_offsets,
+    to_CP51932_E6_99_infos,
+
+#define to_CP51932_E6_9A_infos WORDINDEX2INFO(39152)
+           INVALID,         UNDEF, o2(0xb6,0xc7), o2(0xda,0xf3),
+     o2(0xda,0xf7), o2(0xb2,0xcb), o2(0xda,0xf4), o2(0xda,0xf6),
+     o2(0xda,0xf5), o2(0xbd,0xeb), o2(0xc3,0xc8), o2(0xb0,0xc5),
+     o2(0xda,0xf8), o2(0xfa,0xc0), o2(0xda,0xf9), o2(0xfa,0xc1),
+     o2(0xc4,0xaa), o2(0xce,0xf1), o2(0xbb,0xc3), o2(0xca,0xeb),
+     o2(0xfa,0xc2), o2(0xcb,0xbd), o2(0xdb,0xa2), o2(0xda,0xfb),
+     o2(0xda,0xfe), o2(0xda,0xfd), o2(0xfa,0xc3),
+
+#define to_CP51932_E6_9A WORDINDEX2INFO(39179)
+    to_CP51932_E6_9A_offsets,
+    to_CP51932_E6_9A_infos,
+
+#define to_CP51932_E6_9B_infos WORDINDEX2INFO(39181)
+           INVALID,         UNDEF, o2(0xda,0xfa), o2(0xdb,0xa1),
+     o2(0xc6,0xde), o2(0xda,0xfc), o2(0xdb,0xa3), o2(0xbd,0xec),
+     o2(0xdb,0xa4), o2(0xcd,0xcb), o2(0xc7,0xf8), o2(0xdb,0xa5),
+     o2(0xdb,0xa7), o2(0xdb,0xa8), o2(0xdb,0xa9), o2(0xb6,0xca),
+     o2(0xb1,0xc8), o2(0xb9,0xb9), o2(0xdb,0xaa), o2(0xdb,0xab),
+     o2(0xbd,0xf1), o2(0xc1,0xe2), o2(0xfa,0xc4), o2(0xf9,0xab),
+     o2(0xd2,0xd8), o2(0xc1,0xbe), o2(0xc1,0xbd), o2(0xc2,0xd8),
+
+#define to_CP51932_E6_9B WORDINDEX2INFO(39209)
+    to_CP51932_E6_9B_offsets,
+    to_CP51932_E6_9B_infos,
+
+#define to_CP51932_E6_9C_infos WORDINDEX2INFO(39211)
+           INVALID, o2(0xba,0xc7),         UNDEF, o2(0xd0,0xf2),
+     o2(0xb7,0xee), o2(0xcd,0xad), o2(0xca,0xfe), o2(0xc9,0xfe),
+     o2(0xfa,0xc5), o2(0xdb,0xac), o2(0xba,0xf3), o2(0xc4,0xbf),
+     o2(0xdb,0xad), o2(0xcf,0xaf), o2(0xcb,0xbe), o2(0xc4,0xab),
+     o2(0xdb,0xae), o2(0xb4,0xfc), o2(0xdb,0xaf), o2(0xdb,0xb0),
+     o2(0xcc,0xda), o2(0xcc,0xa4), o2(0xcb,0xf6), o2(0xcb,0xdc),
+     o2(0xbb,0xa5), o2(0xdb,0xb2), o2(0xbc,0xeb), o2(0xcb,0xd1),
+     o2(0xdb,0xb4), o2(0xdb,0xb7), o2(0xdb,0xb6), o2(0xb4,0xf9),
+     o2(0xb5,0xe0), o2(0xdb,0xb3),
+
+#define to_CP51932_E6_9C WORDINDEX2INFO(39245)
+    to_CP51932_E6_9C_offsets,
+    to_CP51932_E6_9C_infos,
+
+#define to_CP51932_E6_9D_infos WORDINDEX2INFO(39247)
+           INVALID,         UNDEF, o2(0xdb,0xb5), o2(0xdb,0xb8),
+     o2(0xbf,0xf9), o2(0xcd,0xfb), o2(0xb0,0xc9), o2(0xba,0xe0),
+     o2(0xc2,0xbc), o2(0xbc,0xdd), o2(0xbe,0xf3), o2(0xdb,0xbb),
+     o2(0xc5,0xce), o2(0xdb,0xb9), o2(0xc2,0xab), o2(0xdb,0xba),
+     o2(0xbe,0xf2), o2(0xcc,0xdd), o2(0xdb,0xbc), o2(0xdb,0xbd),
+     o2(0xcd,0xe8), o2(0xfa,0xc7), o2(0xdb,0xc2), o2(0xb9,0xba),
+     o2(0xc7,0xd5), o2(0xdb,0xbf), o2(0xc5,0xec), o2(0xda,0xde),
+     o2(0xda,0xe2), o2(0xb5,0xcf), o2(0xc7,0xc7), o2(0xdb,0xc1),
+     o2(0xbe,0xbe), o2(0xc8,0xc4),
+
+#define to_CP51932_E6_9D WORDINDEX2INFO(39281)
+    to_CP51932_E6_9D_offsets,
+    to_CP51932_E6_9D_infos,
+
+#define to_CP51932_E6_9E_infos WORDINDEX2INFO(39283)
+           INVALID,         UNDEF, o2(0xdb,0xc7), o2(0xc8,0xfa),
+     o2(0xdb,0xbe), o2(0xdb,0xc4), o2(0xdb,0xc3), o2(0xc0,0xcf),
+     o2(0xcb,0xed), o2(0xce,0xd3), o2(0xcb,0xe7), o2(0xb2,0xcc),
+     o2(0xbb,0xde), o2(0xcf,0xc8), o2(0xdb,0xc6), o2(0xbf,0xf5),
+     o2(0xdb,0xc5), o2(0xdb,0xc0), o2(0xb8,0xcf), o2(0xdb,0xcc),
+     o2(0xdb,0xca), o2(0xb2,0xcd), o2(0xdb,0xc8), o2(0xdb,0xce),
+     o2(0xdb,0xd4), o2(0xfa,0xc8),
+
+#define to_CP51932_E6_9E WORDINDEX2INFO(39309)
+    to_CP51932_E6_9E_offsets,
+    to_CP51932_E6_9E_infos,
+
+#define to_CP51932_E6_9F_infos WORDINDEX2INFO(39311)
+           INVALID, o2(0xfa,0xca), o2(0xc2,0xc8),         UNDEF,
+     o2(0xca,0xc1), o2(0xdb,0xd6), o2(0xc9,0xa2), o2(0xdb,0xd5),
+     o2(0xc7,0xf0), o2(0xcb,0xbf), o2(0xb4,0xbb), o2(0xc0,0xf7),
+     o2(0xbd,0xc0), o2(0xc4,0xd3), o2(0xcd,0xae), o2(0xdb,0xd1),
+     o2(0xdb,0xd0), o2(0xdb,0xd2), o2(0xdb,0xcf), o2(0xdb,0xd7),
+     o2(0xdb,0xcd), o2(0xdb,0xcb), o2(0xdb,0xd3), o2(0xdb,0xc9),
+     o2(0xc3,0xec), o2(0xcc,0xf8), o2(0xbc,0xc6), o2(0xba,0xf4),
+     o2(0xba,0xba), o2(0xcb,0xef), o2(0xb3,0xc1),
+
+#define to_CP51932_E6_9F WORDINDEX2INFO(39342)
+    to_CP51932_E6_9F_offsets,
+    to_CP51932_E6_9F_infos,
+
+#define to_CP51932_E6_A0_infos WORDINDEX2INFO(39344)
+           INVALID,         UNDEF, o2(0xfa,0xcb), o2(0xc4,0xce),
+     o2(0xc6,0xca), o2(0xb1,0xc9), o2(0xc0,0xf2), o2(0xc0,0xb4),
+     o2(0xb7,0xaa), o2(0xdb,0xd9), o2(0xb9,0xbb), o2(0xb3,0xfc),
+     o2(0xdb,0xdb), o2(0xb3,0xf4), o2(0xdb,0xe1), o2(0xdb,0xde),
+     o2(0xc0,0xf3), o2(0xb3,0xcb), o2(0xba,0xac), o2(0xb3,0xca),
+     o2(0xba,0xcf),
+
+#define to_CP51932_E6_A0 WORDINDEX2INFO(39365)
+    to_CP51932_E6_A0_offsets,
+    to_CP51932_E6_A0_infos,
+
+#define to_CP51932_E6_A1_infos WORDINDEX2INFO(39367)
+           INVALID, o2(0xdb,0xdc), o2(0xb7,0xe5), o2(0xb7,0xcb),
+     o2(0xc5,0xed), o2(0xfa,0xcc),         UNDEF, o2(0xdb,0xda),
+     o2(0xb0,0xc6), o2(0xdb,0xdd), o2(0xdb,0xdf), o2(0xb6,0xcd),
+     o2(0xb7,0xac), o2(0xfa,0xc9), o2(0xb4,0xbc), o2(0xb5,0xcb),
+     o2(0xdb,0xe2), o2(0xba,0xf9), o2(0xcb,0xf1), o2(0xbb,0xb7),
+     o2(0xdb,0xe3), o2(0xc9,0xb0), o2(0xdb,0xef), o2(0xb2,0xb3),
+     o2(0xdb,0xe4), o2(0xdb,0xf5), o2(0xdb,0xe5),
+
+#define to_CP51932_E6_A1 WORDINDEX2INFO(39394)
+    to_CP51932_E6_A1_offsets,
+    to_CP51932_E6_A1_infos,
+
+#define to_CP51932_E6_A2_infos WORDINDEX2INFO(39396)
+           INVALID,         UNDEF, o2(0xce,0xc2), o2(0xdb,0xec),
+     o2(0xc7,0xdf), o2(0xdb,0xf4), o2(0xdb,0xe7), o2(0xb0,0xb4),
+     o2(0xdb,0xe9), o2(0xb9,0xbc), o2(0xdb,0xeb), o2(0xdb,0xea),
+     o2(0xdb,0xe6), o2(0xdb,0xf1), o2(0xbe,0xbf), o2(0xd4,0xed),
+     o2(0xb8,0xe8), o2(0xcd,0xfc), o2(0xdb,0xe8), o2(0xc4,0xf4),
+     o2(0xb3,0xa3), o2(0xba,0xad), o2(0xdb,0xe0), o2(0xdb,0xf0),
+     o2(0xb3,0xe1), o2(0xdb,0xee), o2(0xdb,0xf2), o2(0xc5,0xee),
+
+#define to_CP51932_E6_A2 WORDINDEX2INFO(39424)
+    to_CP51932_E6_A2_offsets,
+    to_CP51932_E6_A2_infos,
+
+#define to_CP51932_E6_A3_infos WORDINDEX2INFO(39426)
+           INVALID,         UNDEF, o2(0xb4,0xfe), o2(0xdc,0xb2),
+     o2(0xf9,0xa9), o2(0xcc,0xc9), o2(0xdb,0xf7), o2(0xb4,0xfd),
+     o2(0xdb,0xfe), o2(0xfa,0xcd), o2(0xcb,0xc0), o2(0xdc,0xa1),
+     o2(0xdc,0xa3), o2(0xdc,0xa7), o2(0xdb,0xf9), o2(0xc3,0xaa),
+     o2(0xc5,0xef), o2(0xdc,0xab), o2(0xdb,0xfc), o2(0xdc,0xa8),
+     o2(0xdc,0xa2), o2(0xbf,0xb9), o2(0xdc,0xac), o2(0xc0,0xb3),
+     o2(0xdc,0xaa), o2(0xb4,0xbd),
+
+#define to_CP51932_E6_A3 WORDINDEX2INFO(39452)
+    to_CP51932_E6_A3_offsets,
+    to_CP51932_E6_A3_infos,
+
+#define to_CP51932_E6_A4_infos WORDINDEX2INFO(39454)
+           INVALID, o2(0xcf,0xd0), o2(0xdb,0xf6),         UNDEF,
+     o2(0xdc,0xa6), o2(0xb0,0xd8), o2(0xdb,0xf8), o2(0xcc,0xba),
+     o2(0xdb,0xfd), o2(0xbf,0xa2), o2(0xc4,0xc7), o2(0xdb,0xf3),
+     o2(0xdc,0xa5), o2(0xbf,0xfa), o2(0xdc,0xaf), o2(0xb3,0xf1),
+     o2(0xb8,0xa1), o2(0xdc,0xb1), o2(0xdb,0xfa), o2(0xdc,0xb0),
+     o2(0xdc,0xa9), o2(0xdb,0xfb), o2(0xdc,0xad), o2(0xdc,0xae),
+     o2(0xdc,0xbf), o2(0xc6,0xce), o2(0xdc,0xa4), o2(0xdc,0xbb),
+     o2(0xdc,0xbd), o2(0xc4,0xd8),
+
+#define to_CP51932_E6_A4 WORDINDEX2INFO(39484)
+    to_CP51932_E6_A4_offsets,
+    to_CP51932_E6_A4_infos,
+
+#define to_CP51932_E6_A5_infos WORDINDEX2INFO(39486)
+           INVALID,         UNDEF, o2(0xcd,0xcc), o2(0xc9,0xf6),
+     o2(0xdc,0xb8), o2(0xc2,0xca), o2(0xdc,0xbe), o2(0xc1,0xbf),
+     o2(0xdc,0xb5), o2(0xdc,0xc2), o2(0xdc,0xc1), o2(0xc6,0xef),
+     o2(0xdc,0xc0), o2(0xc6,0xea), o2(0xfa,0xcf), o2(0xdc,0xc4),
+     o2(0xdc,0xb7), o2(0xb6,0xc8), o2(0xdc,0xba), o2(0xbd,0xdd),
+     o2(0xc7,0xe0), o2(0xdc,0xbc), o2(0xb6,0xcb), o2(0xdc,0xb4),
+     o2(0xdc,0xb6), o2(0xdc,0xb3), o2(0xcf,0xb0), o2(0xb3,0xda),
+     o2(0xdc,0xb9),
+
+#define to_CP51932_E6_A5 WORDINDEX2INFO(39515)
+    to_CP51932_E6_A5_offsets,
+    to_CP51932_E6_A5_infos,
+
+#define to_CP51932_E6_A6_infos WORDINDEX2INFO(39517)
+           INVALID,         UNDEF, o2(0xdc,0xc3), o2(0xb3,0xb5),
+     o2(0xba,0xe7), o2(0xb1,0xdd), o2(0xdc,0xd4), o2(0xcf,0xb1),
+     o2(0xdc,0xd7), o2(0xfa,0xd1), o2(0xbf,0xba), o2(0xdc,0xd6),
+     o2(0xdc,0xd5), o2(0xdc,0xd2), o2(0xdc,0xc6), o2(0xdc,0xe3),
+     o2(0xdc,0xc5), o2(0xdc,0xd8), o2(0xdc,0xd0), o2(0xdc,0xcb),
+     o2(0xdc,0xc8),
+
+#define to_CP51932_E6_A6 WORDINDEX2INFO(39538)
+    to_CP51932_E6_A6_offsets,
+    to_CP51932_E6_A6_infos,
+
+#define to_CP51932_E6_A7_infos WORDINDEX2INFO(39540)
+           INVALID,         UNDEF, o2(0xdc,0xc9), o2(0xdc,0xd1),
+     o2(0xf4,0xa2), o2(0xdc,0xce), o2(0xb9,0xbd), o2(0xc4,0xc8),
+     o2(0xc1,0xe4), o2(0xdc,0xcc), o2(0xdc,0xc7), o2(0xdc,0xca),
+     o2(0xcd,0xcd), o2(0xcb,0xea), o2(0xdc,0xcf), o2(0xdc,0xd9),
+     o2(0xfa,0xd2), o2(0xdc,0xe1), o2(0xdc,0xda), o2(0xdc,0xe7),
+     o2(0xdc,0xe5), o2(0xdc,0xe0), o2(0xdc,0xdf), o2(0xc4,0xd0),
+     o2(0xc1,0xe5), o2(0xdc,0xdd),
+
+#define to_CP51932_E6_A7 WORDINDEX2INFO(39566)
+    to_CP51932_E6_A7_offsets,
+    to_CP51932_E6_A7_infos,
+
+#define to_CP51932_E6_A8_infos WORDINDEX2INFO(39568)
+           INVALID,         UNDEF, o2(0xdc,0xdb), o2(0xdc,0xe2),
+     o2(0xdc,0xe8), o2(0xc8,0xf5), o2(0xdc,0xee), o2(0xdc,0xe9),
+     o2(0xdc,0xec), o2(0xdc,0xe6), o2(0xc3,0xf4), o2(0xc9,0xb8),
+     o2(0xdc,0xdc), o2(0xdc,0xe4), o2(0xbe,0xc0), o2(0xcc,0xcf),
+     o2(0xdc,0xf8), o2(0xdc,0xeb), o2(0xb8,0xa2), o2(0xb2,0xa3),
+     o2(0xb3,0xdf), o2(0xdc,0xd3), o2(0xfa,0xd3), o2(0xbe,0xc1),
+     o2(0xdc,0xf0), o2(0xdc,0xf7), o2(0xbc,0xf9), o2(0xb3,0xf2),
+     o2(0xc3,0xae),
+
+#define to_CP51932_E6_A8 WORDINDEX2INFO(39597)
+    to_CP51932_E6_A8_offsets,
+    to_CP51932_E6_A8_infos,
+
+#define to_CP51932_E6_A9_infos WORDINDEX2INFO(39599)
+           INVALID,         UNDEF, o2(0xdc,0xed), o2(0xfa,0xd5),
+     o2(0xdc,0xf2), o2(0xdc,0xf6), o2(0xb6,0xb6), o2(0xb5,0xcc),
+     o2(0xdc,0xf4), o2(0xb5,0xa1), o2(0xc6,0xcb), o2(0xdc,0xf3),
+     o2(0xdc,0xf5), o2(0xfa,0xd4), o2(0xdc,0xef), o2(0xfa,0xd6),
+     o2(0xdc,0xf1), o2(0xfa,0xd7), o2(0xb3,0xe0),
+
+#define to_CP51932_E6_A9 WORDINDEX2INFO(39618)
+    to_CP51932_E6_A9_offsets,
+    to_CP51932_E6_A9_infos,
+
+#define to_CP51932_E6_AA_infos WORDINDEX2INFO(39620)
+           INVALID, o2(0xc3,0xc9),         UNDEF, o2(0xdc,0xfc),
+     o2(0xdc,0xfa), o2(0xb8,0xe9), o2(0xdc,0xf9), o2(0xdd,0xa1),
+     o2(0xdb,0xd8), o2(0xdc,0xfb), o2(0xdc,0xfd), o2(0xdc,0xfe),
+     o2(0xdd,0xac), o2(0xdd,0xa8), o2(0xdb,0xed), o2(0xdd,0xa7),
+     o2(0xdd,0xa6), o2(0xdd,0xa3),
+
+#define to_CP51932_E6_AA WORDINDEX2INFO(39638)
+    to_CP51932_E6_AA_offsets,
+    to_CP51932_E6_AA_infos,
+
+#define to_CP51932_E6_AB_infos WORDINDEX2INFO(39640)
+           INVALID,         UNDEF, o2(0xdc,0xea), o2(0xdd,0xa5),
+     o2(0xdd,0xa4), o2(0xdd,0xaa), o2(0xcf,0xa6), o2(0xdd,0xad),
+     o2(0xb6,0xfb), o2(0xdd,0xa9), o2(0xdd,0xab), o2(0xfa,0xd8),
+     o2(0xfa,0xd9), o2(0xc8,0xa7), o2(0xdd,0xae), o2(0xdd,0xb2),
+     o2(0xdd,0xaf),
+
+#define to_CP51932_E6_AB WORDINDEX2INFO(39657)
+    to_CP51932_E6_AB_offsets,
+    to_CP51932_E6_AB_infos,
+
+#define to_CP51932_E6_AC_infos WORDINDEX2INFO(39659)
+           INVALID,         UNDEF, o2(0xcd,0xf3), o2(0xdd,0xb0),
+     o2(0xdc,0xde), o2(0xdd,0xb3), o2(0xdd,0xb4), o2(0xb1,0xb5),
+     o2(0xdd,0xb6), o2(0xb7,0xe7), o2(0xbc,0xa1), o2(0xb6,0xd5),
+     o2(0xb2,0xa4), o2(0xcd,0xdf), o2(0xdd,0xb8), o2(0xdd,0xb7),
+     o2(0xdd,0xba), o2(0xb5,0xbd), o2(0xb6,0xd6), o2(0xb4,0xbe),
+
+#define to_CP51932_E6_AC WORDINDEX2INFO(39679)
+    to_CP51932_E6_AC_offsets,
+    to_CP51932_E6_AC_infos,
+
+#define to_CP51932_E6_AD_infos WORDINDEX2INFO(39681)
+           INVALID,         UNDEF, o2(0xdd,0xbd), o2(0xdd,0xbc),
+     o2(0xdd,0xbe), o2(0xb2,0xce), o2(0xc3,0xb7), o2(0xdd,0xbf),
+     o2(0xb4,0xbf), o2(0xdd,0xc1), o2(0xdd,0xc0), o2(0xdd,0xc2),
+     o2(0xdd,0xc3), o2(0xdd,0xc4), o2(0xbb,0xdf), o2(0xc0,0xb5),
+     o2(0xba,0xa1), o2(0xc9,0xf0), o2(0xca,0xe2), o2(0xcf,0xc4),
+     o2(0xbb,0xf5), o2(0xba,0xd0), o2(0xce,0xf2), o2(0xdd,0xc5),
+     o2(0xdd,0xc6), o2(0xbb,0xe0), o2(0xdd,0xc7),
+
+#define to_CP51932_E6_AD WORDINDEX2INFO(39708)
+    to_CP51932_E6_AD_offsets,
+    to_CP51932_E6_AD_infos,
+
+#define to_CP51932_E6_AE_infos WORDINDEX2INFO(39710)
+           INVALID, o2(0xdd,0xc8),         UNDEF, o2(0xdd,0xca),
+     o2(0xdd,0xc9), o2(0xcb,0xd8), o2(0xbd,0xde), o2(0xbc,0xec),
+     o2(0xbb,0xc4), o2(0xdd,0xcb), o2(0xdd,0xcd), o2(0xbf,0xa3),
+     o2(0xdd,0xcc), o2(0xdd,0xce), o2(0xdd,0xcf), o2(0xdd,0xd0),
+     o2(0xdd,0xd1), o2(0xdd,0xd2), o2(0xdd,0xd4), o2(0xdd,0xd3),
+     o2(0xdd,0xd5), o2(0xb2,0xa5), o2(0xc3,0xca), o2(0xdd,0xd6),
+     o2(0xbb,0xa6), o2(0xb3,0xcc), o2(0xdd,0xd7), o2(0xc5,0xc2),
+
+#define to_CP51932_E6_AE WORDINDEX2INFO(39738)
+    to_CP51932_E6_AE_offsets,
+    to_CP51932_E6_AE_infos,
+
+#define to_CP51932_E6_AF_infos WORDINDEX2INFO(39740)
+           INVALID, o2(0xd4,0xcc),         UNDEF, o2(0xb5,0xa3),
+     o2(0xdd,0xd8), o2(0xdd,0xd9), o2(0xca,0xec), o2(0xcb,0xe8),
+     o2(0xc6,0xc7), o2(0xdd,0xda), o2(0xc8,0xe6), o2(0xfa,0xda),
+     o2(0xc8,0xfb), o2(0xcc,0xd3), o2(0xdd,0xdb), o2(0xdd,0xdd),
+     o2(0xdd,0xdc), o2(0xdd,0xdf), o2(0xdd,0xde),
+
+#define to_CP51932_E6_AF WORDINDEX2INFO(39759)
+    to_CP51932_E6_AF_offsets,
+    to_CP51932_E6_AF_infos,
+
+#define to_CP51932_E6_B0_infos WORDINDEX2INFO(39761)
+           INVALID,         UNDEF, o2(0xdd,0xe1), o2(0xbb,0xe1),
+     o2(0xcc,0xb1), o2(0xdd,0xe2), o2(0xdd,0xe3), o2(0xb5,0xa4),
+     o2(0xdd,0xe4), o2(0xdd,0xe6), o2(0xdd,0xe5), o2(0xbf,0xe5),
+     o2(0xc9,0xb9), o2(0xb1,0xca), o2(0xc8,0xc5), o2(0xfa,0xdb),
+
+#define to_CP51932_E6_B0 WORDINDEX2INFO(39777)
+    to_CP51932_E6_B0_offsets,
+    to_CP51932_E6_B0_infos,
+
+#define to_CP51932_E6_B1_infos WORDINDEX2INFO(39779)
+           INVALID, o2(0xc4,0xf5), o2(0xbd,0xc1), o2(0xb5,0xe1),
+             UNDEF, o2(0xc8,0xc6), o2(0xbc,0xae), o2(0xdd,0xe8),
+     o2(0xb4,0xc0), o2(0xb1,0xf8), o2(0xfa,0xdc), o2(0xc6,0xf2),
+     o2(0xdd,0xe7), o2(0xb9,0xbe), o2(0xc3,0xd3), o2(0xdd,0xe9),
+     o2(0xdd,0xf1), o2(0xdd,0xea), o2(0xfa,0xde), o2(0xc2,0xc1),
+     o2(0xb5,0xe2), o2(0xdd,0xf2), o2(0xb7,0xe8), o2(0xb5,0xa5),
+     o2(0xdd,0xf0),
+
+#define to_CP51932_E6_B1 WORDINDEX2INFO(39804)
+    to_CP51932_E6_B1_offsets,
+    to_CP51932_E6_B1_infos,
+
+#define to_CP51932_E6_B2_infos WORDINDEX2INFO(39806)
+           INVALID,         UNDEF, o2(0xdd,0xee), o2(0xdd,0xeb),
+     o2(0xcd,0xe0), o2(0xfa,0xdd), o2(0xc4,0xc0), o2(0xc6,0xd9),
+     o2(0xdd,0xec), o2(0xdd,0xf4), o2(0xdd,0xf3), o2(0xb7,0xa3),
+     o2(0xb2,0xad), o2(0xba,0xbb), o2(0xdd,0xed), o2(0xdd,0xef),
+     o2(0xcb,0xd7), o2(0xc2,0xf4), o2(0xcb,0xf7), o2(0xdd,0xfc),
+     o2(0xdd,0xfd), o2(0xb2,0xcf), o2(0xca,0xa8), o2(0xcc,0xfd),
+     o2(0xde,0xa1), o2(0xbc,0xa3), o2(0xbe,0xc2), o2(0xdd,0xf8),
+     o2(0xdd,0xfe), o2(0xb1,0xe8),
+
+#define to_CP51932_E6_B2 WORDINDEX2INFO(39836)
+    to_CP51932_E6_B2_offsets,
+    to_CP51932_E6_B2_infos,
+
+#define to_CP51932_E6_B3_infos WORDINDEX2INFO(39838)
+           INVALID,         UNDEF, o2(0xb6,0xb7), o2(0xdd,0xf5),
+     o2(0xdd,0xfa), o2(0xc0,0xf4), o2(0xc7,0xf1), o2(0xc8,0xe7),
+     o2(0xdd,0xf7), o2(0xcb,0xa1), o2(0xdd,0xf9), o2(0xde,0xa4),
+     o2(0xfa,0xdf), o2(0xde,0xa2), o2(0xdd,0xfb), o2(0xcb,0xa2),
+     o2(0xc7,0xc8), o2(0xb5,0xe3), o2(0xc5,0xa5), o2(0xc3,0xed),
+     o2(0xde,0xa5), o2(0xde,0xa3), o2(0xc2,0xd9), o2(0xdd,0xf6),
+     o2(0xb1,0xcb),
+
+#define to_CP51932_E6_B3 WORDINDEX2INFO(39863)
+    to_CP51932_E6_B3_offsets,
+    to_CP51932_E6_B3_infos,
+
+#define to_CP51932_E6_B4_infos WORDINDEX2INFO(39865)
+           INVALID,         UNDEF, o2(0xfa,0xe0), o2(0xcd,0xce),
+     o2(0xde,0xb0), o2(0xde,0xaf), o2(0xc0,0xf6), o2(0xde,0xac),
+     o2(0xcd,0xec), o2(0xc6,0xb6), o2(0xde,0xa6), o2(0xc4,0xc5),
+     o2(0xb1,0xcc), o2(0xb9,0xbf), o2(0xde,0xa9), o2(0xbd,0xa7),
+     o2(0xde,0xae), o2(0xde,0xad), o2(0xde,0xa8), o2(0xde,0xab),
+     o2(0xb3,0xe8), o2(0xde,0xaa), o2(0xc7,0xc9),
+
+#define to_CP51932_E6_B4 WORDINDEX2INFO(39888)
+    to_CP51932_E6_B4_offsets,
+    to_CP51932_E6_B4_infos,
+
+#define to_CP51932_E6_B5_infos WORDINDEX2INFO(39890)
+           INVALID,         UNDEF, o2(0xce,0xae), o2(0xbe,0xf4),
+     o2(0xc0,0xf5), o2(0xde,0xb6), o2(0xde,0xb4), o2(0xc9,0xcd),
+     o2(0xde,0xb1), o2(0xde,0xb3), o2(0xb1,0xba), o2(0xb9,0xc0),
+     o2(0xcf,0xb2), o2(0xb3,0xbd), o2(0xc9,0xe2), o2(0xfa,0xe2),
+     o2(0xcd,0xe1), o2(0xb3,0xa4), o2(0xbf,0xbb), o2(0xde,0xb5),
+
+#define to_CP51932_E6_B5 WORDINDEX2INFO(39910)
+    to_CP51932_E6_B5_offsets,
+    to_CP51932_E6_B5_infos,
+
+#define to_CP51932_E6_B6_infos WORDINDEX2INFO(39912)
+           INVALID,         UNDEF, o2(0xde,0xba), o2(0xfa,0xe1),
+     o2(0xbe,0xc3), o2(0xcd,0xb0), o2(0xde,0xb7), o2(0xde,0xb2),
+     o2(0xde,0xb8), o2(0xfa,0xe3), o2(0xce,0xde), o2(0xc5,0xf3),
+     o2(0xc6,0xc2), o2(0xfa,0xe4), o2(0xb3,0xb6), o2(0xb1,0xd5),
+     o2(0xde,0xbe), o2(0xde,0xc1), o2(0xce,0xc3),
+
+#define to_CP51932_E6_B6 WORDINDEX2INFO(39931)
+    to_CP51932_E6_B6_offsets,
+    to_CP51932_E6_B6_infos,
+
+#define to_CP51932_E6_B7_infos WORDINDEX2INFO(39933)
+           INVALID, o2(0xcd,0xe4),         UNDEF, o2(0xde,0xc8),
+     o2(0xde,0xc2), o2(0xde,0xbf), o2(0xce,0xd4), o2(0xde,0xc5),
+     o2(0xfa,0xe5), o2(0xbd,0xca), o2(0xde,0xc7), o2(0xde,0xcc),
+     o2(0xc5,0xf1), o2(0xde,0xca), o2(0xde,0xc4), o2(0xc3,0xb8),
+     o2(0xde,0xcb), o2(0xde,0xc0), o2(0xde,0xc6), o2(0xde,0xcd),
+     o2(0xb0,0xfc), o2(0xde,0xc3), o2(0xde,0xce), o2(0xbf,0xbc),
+     o2(0xfa,0xe7), o2(0xbd,0xdf), o2(0xca,0xa5), o2(0xba,0xae),
+     o2(0xfa,0xe6), o2(0xde,0xbb), o2(0xde,0xc9), o2(0xc5,0xba),
+     o2(0xfa,0xe8),
+
+#define to_CP51932_E6_B7 WORDINDEX2INFO(39966)
+    to_CP51932_E6_B7_offsets,
+    to_CP51932_E6_B7_infos,
+
+#define to_CP51932_E6_B8_infos WORDINDEX2INFO(39968)
+           INVALID,         UNDEF, o2(0xc0,0xb6), o2(0xb3,0xe9),
+     o2(0xba,0xd1), o2(0xbe,0xc4), o2(0xde,0xbd), o2(0xbd,0xc2),
+     o2(0xb7,0xcc), o2(0xde,0xbc), o2(0xde,0xd2), o2(0xbd,0xed),
+     o2(0xb8,0xba), o2(0xde,0xe1), o2(0xde,0xdb), o2(0xb5,0xf4),
+     o2(0xc5,0xcf), o2(0xde,0xd6), o2(0xde,0xdf), o2(0xb0,0xaf),
+     o2(0xb1,0xb2), o2(0xfa,0xeb), o2(0xb2,0xb9), o2(0xde,0xd8),
+     o2(0xc2,0xac), o2(0xde,0xcf), o2(0xde,0xd1), o2(0xb9,0xc1),
+     o2(0xde,0xe2), o2(0xfa,0xe9), o2(0xde,0xdd), o2(0xfa,0xec),
+     o2(0xde,0xd5),
+
+#define to_CP51932_E6_B8 WORDINDEX2INFO(40001)
+    to_CP51932_E6_B8_offsets,
+    to_CP51932_E6_B8_infos,
+
+#define to_CP51932_E6_B9_infos WORDINDEX2INFO(40003)
+           INVALID,         UNDEF, o2(0xde,0xdc), o2(0xcc,0xab),
+     o2(0xde,0xda), o2(0xde,0xde), o2(0xb8,0xd0), o2(0xbe,0xc5),
+     o2(0xc3,0xb9), o2(0xfa,0xea), o2(0xde,0xd4), o2(0xcd,0xaf),
+     o2(0xde,0xd7), o2(0xde,0xd0), o2(0xc5,0xf2), o2(0xde,0xd3),
+     o2(0xde,0xd9), o2(0xcf,0xd1), o2(0xbc,0xbe),
+
+#define to_CP51932_E6_B9 WORDINDEX2INFO(40022)
+    to_CP51932_E6_B9_offsets,
+    to_CP51932_E6_B9_infos,
+
+#define to_CP51932_E6_BA_infos WORDINDEX2INFO(40024)
+           INVALID, o2(0xcb,0xfe),         UNDEF, o2(0xde,0xe3),
+     o2(0xc8,0xae), o2(0xde,0xef), o2(0xb8,0xbb), o2(0xbd,0xe0),
+     o2(0xde,0xe5), o2(0xce,0xaf), o2(0xb9,0xc2), o2(0xde,0xf2),
+     o2(0xb0,0xee), o2(0xde,0xf0), o2(0xde,0xe4), o2(0xde,0xea),
+     o2(0xde,0xec), o2(0xcd,0xcf), o2(0xde,0xe7), o2(0xc5,0xae),
+     o2(0xde,0xe9), o2(0xfa,0xed),
+
+#define to_CP51932_E6_BA WORDINDEX2INFO(40046)
+    to_CP51932_E6_BA_offsets,
+    to_CP51932_E6_BA_infos,
+
+#define to_CP51932_E6_BB_infos WORDINDEX2INFO(40048)
+           INVALID,         UNDEF, o2(0xde,0xf1), o2(0xde,0xeb),
+     o2(0xcc,0xc7), o2(0xde,0xe6), o2(0xbc,0xa2), o2(0xde,0xfe),
+     o2(0xb3,0xea), o2(0xde,0xe8), o2(0xde,0xed), o2(0xde,0xee),
+     o2(0xc2,0xec), o2(0xc2,0xda), o2(0xde,0xf6), o2(0xde,0xfc),
+     o2(0xde,0xfa), o2(0xc5,0xa9), o2(0xdf,0xa3), o2(0xde,0xf7),
+     o2(0xde,0xf8), o2(0xde,0xe0),
+
+#define to_CP51932_E6_BB WORDINDEX2INFO(40070)
+    to_CP51932_E6_BB_offsets,
+    to_CP51932_E6_BB_infos,
+
+#define to_CP51932_E6_BC_infos WORDINDEX2INFO(40072)
+           INVALID,         UNDEF, o2(0xb5,0xf9), o2(0xc9,0xba),
+     o2(0xbc,0xbf), o2(0xb9,0xf7), o2(0xcf,0xb3), o2(0xde,0xf4),
+     o2(0xdf,0xa2), o2(0xb1,0xe9), o2(0xc1,0xe6), o2(0xc7,0xf9),
+     o2(0xb4,0xc1), o2(0xce,0xfa), o2(0xcc,0xa1), o2(0xc4,0xd2),
+     o2(0xde,0xfb), o2(0xde,0xfd), o2(0xc1,0xb2), o2(0xdf,0xa1),
+     o2(0xde,0xf9),
+
+#define to_CP51932_E6_BC WORDINDEX2INFO(40093)
+    to_CP51932_E6_BC_offsets,
+    to_CP51932_E6_BC_infos,
+
+#define to_CP51932_E6_BD_infos WORDINDEX2INFO(40095)
+           INVALID,         UNDEF, o2(0xde,0xf3), o2(0xb4,0xc3),
+     o2(0xb7,0xe9), o2(0xdf,0xaf), o2(0xdf,0xaa), o2(0xc0,0xf8),
+     o2(0xb3,0xe3), o2(0xbd,0xe1), o2(0xdf,0xb3), o2(0xdf,0xac),
+     o2(0xc4,0xac), o2(0xdf,0xa9), o2(0xc4,0xd9), o2(0xdf,0xcc),
+     o2(0xdf,0xa6), o2(0xdf,0xa5), o2(0xdf,0xae),
+
+#define to_CP51932_E6_BD WORDINDEX2INFO(40114)
+    to_CP51932_E6_BD_offsets,
+    to_CP51932_E6_BD_infos,
+
+#define to_CP51932_E6_BE_infos WORDINDEX2INFO(40116)
+           INVALID, o2(0xdf,0xa8), o2(0xdf,0xa7), o2(0xdf,0xad),
+             UNDEF, o2(0xc0,0xa1), o2(0xdf,0xa4), o2(0xfa,0xee),
+     o2(0xdf,0xb0), o2(0xdf,0xb1), o2(0xb4,0xc2), o2(0xdf,0xb6),
+     o2(0xdf,0xb5), o2(0xdf,0xb7), o2(0xdf,0xba), o2(0xc5,0xc3),
+     o2(0xdf,0xb4), o2(0xfa,0xef), o2(0xdf,0xb8),
+
+#define to_CP51932_E6_BE WORDINDEX2INFO(40135)
+    to_CP51932_E6_BE_offsets,
+    to_CP51932_E6_BE_infos,
+
+#define to_CP51932_E6_BF_infos WORDINDEX2INFO(40137)
+           INVALID, o2(0xb7,0xe3), o2(0xc2,0xf9), o2(0xdf,0xb2),
+     o2(0xc7,0xbb),         UNDEF, o2(0xdf,0xb9), o2(0xdf,0xbe),
+     o2(0xdf,0xbc), o2(0xdf,0xbf), o2(0xdf,0xc2), o2(0xdf,0xbb),
+     o2(0xb9,0xea), o2(0xc7,0xa8), o2(0xde,0xb9), o2(0xcd,0xf4),
+     o2(0xdf,0xbd), o2(0xdf,0xc1), o2(0xc2,0xf5), o2(0xdf,0xc0),
+     o2(0xdf,0xab), o2(0xfa,0xf0), o2(0xef,0xe9), o2(0xdf,0xc5),
+     o2(0xdf,0xc9),
+
+#define to_CP51932_E6_BF WORDINDEX2INFO(40162)
+    to_CP51932_E6_BF_offsets,
+    to_CP51932_E6_BF_infos,
+
+#define to_CP51932_E6_infos WORDINDEX2INFO(40164)
+              INVALID, to_CP51932_E6_80, to_CP51932_E6_81, to_CP51932_E6_82,
+     to_CP51932_E6_83, to_CP51932_E6_84, to_CP51932_E6_85, to_CP51932_E6_86,
+     to_CP51932_E6_87, to_CP51932_E6_88, to_CP51932_E6_89, to_CP51932_E6_8A,
+     to_CP51932_E6_8B, to_CP51932_E6_8C, to_CP51932_E6_8D, to_CP51932_E6_8E,
+     to_CP51932_E6_8F, to_CP51932_E6_90, to_CP51932_E6_91, to_CP51932_E6_92,
+     to_CP51932_E6_93, to_CP51932_E6_94, to_CP51932_E6_95, to_CP51932_E6_96,
+     to_CP51932_E6_97, to_CP51932_E6_98, to_CP51932_E6_99, to_CP51932_E6_9A,
+     to_CP51932_E6_9B, to_CP51932_E6_9C, to_CP51932_E6_9D, to_CP51932_E6_9E,
+     to_CP51932_E6_9F, to_CP51932_E6_A0, to_CP51932_E6_A1, to_CP51932_E6_A2,
+     to_CP51932_E6_A3, to_CP51932_E6_A4, to_CP51932_E6_A5, to_CP51932_E6_A6,
+     to_CP51932_E6_A7, to_CP51932_E6_A8, to_CP51932_E6_A9, to_CP51932_E6_AA,
+     to_CP51932_E6_AB, to_CP51932_E6_AC, to_CP51932_E6_AD, to_CP51932_E6_AE,
+     to_CP51932_E6_AF, to_CP51932_E6_B0, to_CP51932_E6_B1, to_CP51932_E6_B2,
+     to_CP51932_E6_B3, to_CP51932_E6_B4, to_CP51932_E6_B5, to_CP51932_E6_B6,
+     to_CP51932_E6_B7, to_CP51932_E6_B8, to_CP51932_E6_B9, to_CP51932_E6_BA,
+     to_CP51932_E6_BB, to_CP51932_E6_BC, to_CP51932_E6_BD, to_CP51932_E6_BE,
+     to_CP51932_E6_BF,
+
+#define to_CP51932_E6 WORDINDEX2INFO(40229)
+    to_EUC_JP_C3_offsets,
+    to_CP51932_E6_infos,
+
+#define to_CP51932_E7_80_infos WORDINDEX2INFO(40231)
+           INVALID,         UNDEF, o2(0xdf,0xc7), o2(0xfa,0xf1),
+     o2(0xfa,0xf2), o2(0xdf,0xc3), o2(0xdf,0xc4), o2(0xdf,0xc8),
+     o2(0xdf,0xc6), o2(0xc9,0xce), o2(0xdf,0xce), o2(0xdf,0xcb),
+     o2(0xdf,0xca), o2(0xdf,0xcd), o2(0xc6,0xd4), o2(0xdf,0xcf),
+     o2(0xc3,0xf5), o2(0xc2,0xed), o2(0xfa,0xf3), o2(0xc0,0xa5),
+     o2(0xdf,0xd0), o2(0xdf,0xd2), o2(0xdf,0xd1),
+
+#define to_CP51932_E7_80 WORDINDEX2INFO(40254)
+    to_CP51932_E7_80_offsets,
+    to_CP51932_E7_80_infos,
+
+#define to_CP51932_E7_81_infos WORDINDEX2INFO(40256)
+           INVALID,         UNDEF, o2(0xde,0xf5), o2(0xdf,0xd3),
+     o2(0xc6,0xe7), o2(0xdf,0xd4), o2(0xb2,0xd0), o2(0xc5,0xf4),
+     o2(0xb3,0xa5), o2(0xb5,0xe4), o2(0xbc,0xde), o2(0xba,0xd2),
+
+#define to_CP51932_E7_81 WORDINDEX2INFO(40268)
+    to_CP51932_E7_81_offsets,
+    to_CP51932_E7_81_infos,
+
+#define to_CP51932_E7_82_infos WORDINDEX2INFO(40270)
+           INVALID,         UNDEF, o2(0xfa,0xf4), o2(0xcf,0xa7),
+     o2(0xbf,0xe6), o2(0xb1,0xea), o2(0xdf,0xd6), o2(0xdf,0xd5),
+     o2(0xfa,0xf5), o2(0xdf,0xd9), o2(0xc3,0xba), o2(0xdf,0xdc),
+     o2(0xdf,0xd7), o2(0xdf,0xdb), o2(0xdf,0xda), o2(0xc5,0xc0),
+     o2(0xb0,0xd9), o2(0xf9,0xa7),
+
+#define to_CP51932_E7_82 WORDINDEX2INFO(40288)
+    to_CP51932_E7_82_offsets,
+    to_CP51932_E7_82_infos,
+
+#define to_CP51932_E7_83_infos WORDINDEX2INFO(40290)
+           INVALID,         UNDEF, o2(0xce,0xf5), o2(0xdf,0xde),
+     o2(0xb1,0xa8), o2(0xdf,0xe0), o2(0xdf,0xdf), o2(0xdf,0xdd),
+     o2(0xdf,0xd8), o2(0xcb,0xa3), o2(0xdf,0xe2),
+
+#define to_CP51932_E7_83 WORDINDEX2INFO(40301)
+    to_CP51932_E7_83_offsets,
+    to_CP51932_E7_83_infos,
+
+#define to_CP51932_E7_84_infos WORDINDEX2INFO(40303)
+           INVALID,         UNDEF, o2(0xfa,0xf7), o2(0xdf,0xe1),
+     o2(0xfa,0xf6), o2(0xb1,0xeb), o2(0xdf,0xe4), o2(0xca,0xb2),
+     o2(0xdf,0xe3), o2(0xcc,0xb5), o2(0xbe,0xc7), o2(0xc1,0xb3),
+     o2(0xbe,0xc6),
+
+#define to_CP51932_E7_84 WORDINDEX2INFO(40316)
+    to_CP51932_E7_84_offsets,
+    to_CP51932_E7_84_infos,
+
+#define to_CP51932_E7_85_infos WORDINDEX2INFO(40318)
+           INVALID,         UNDEF, o2(0xfa,0xf9), o2(0xfa,0xfa),
+     o2(0xce,0xfb), o2(0xdf,0xea), o2(0xc0,0xf9), o2(0xdf,0xe6),
+     o2(0xdf,0xeb), o2(0xb1,0xec), o2(0xfa,0xf8), o2(0xdf,0xe9),
+     o2(0xc7,0xe1), o2(0xdf,0xe5), o2(0xdf,0xe8), o2(0xbe,0xc8),
+     o2(0xc8,0xd1), o2(0xdf,0xec), o2(0xbc,0xd1), o2(0xc0,0xfa),
+
+#define to_CP51932_E7_85 WORDINDEX2INFO(40338)
+    to_CP51932_E7_85_offsets,
+    to_CP51932_E7_85_infos,
+
+#define to_CP51932_E7_86_infos WORDINDEX2INFO(40340)
+           INVALID,         UNDEF, o2(0xdf,0xef), o2(0xdf,0xe7),
+     o2(0xb7,0xa7), o2(0xdf,0xed), o2(0xcd,0xd0), o2(0xdf,0xf0),
+     o2(0xf4,0xa6), o2(0xbd,0xcf), o2(0xdf,0xf1), o2(0xdf,0xf2),
+     o2(0xc7,0xae), o2(0xdf,0xf4), o2(0xdf,0xf5),
+
+#define to_CP51932_E7_86 WORDINDEX2INFO(40355)
+    to_CP51932_E7_86_offsets,
+    to_CP51932_E7_86_infos,
+
+#define to_CP51932_E7_87_infos WORDINDEX2INFO(40357)
+           INVALID,         UNDEF, o2(0xfa,0xfc), o2(0xc7,0xb3),
+     o2(0xc5,0xf5), o2(0xdf,0xf7), o2(0xdf,0xf9), o2(0xce,0xd5),
+     o2(0xdf,0xf6), o2(0xdf,0xf8), o2(0xb1,0xed), o2(0xdf,0xf3),
+     o2(0xd3,0xdb), o2(0xdf,0xfa), o2(0xc1,0xe7), o2(0xbb,0xb8),
+     o2(0xdf,0xfc), o2(0xdf,0xfb), o2(0xbf,0xa4), o2(0xd2,0xd9),
+     o2(0xdf,0xfd), o2(0xe0,0xa1), o2(0xdf,0xee), o2(0xdf,0xfe),
+     o2(0xfa,0xfd), o2(0xe0,0xa2),
+
+#define to_CP51932_E7_87 WORDINDEX2INFO(40383)
+    to_CP51932_E7_87_offsets,
+    to_CP51932_E7_87_infos,
+
+#define to_CP51932_E7_88_infos WORDINDEX2INFO(40385)
+           INVALID,         UNDEF, o2(0xc7,0xfa), o2(0xe0,0xa3),
+     o2(0xe0,0xa4), o2(0xe0,0xa5), o2(0xe0,0xa6), o2(0xc4,0xde),
+     o2(0xe0,0xa8), o2(0xe0,0xa7), o2(0xe0,0xa9), o2(0xe0,0xaa),
+     o2(0xbc,0xdf), o2(0xc9,0xe3), o2(0xcc,0xec), o2(0xe0,0xab),
+     o2(0xe0,0xac), o2(0xc1,0xd6), o2(0xbc,0xa4), o2(0xe0,0xad),
+
+#define to_CP51932_E7_88 WORDINDEX2INFO(40405)
+    to_CP51932_E7_88_offsets,
+    to_CP51932_E7_88_infos,
+
+#define to_CP51932_E7_89_infos WORDINDEX2INFO(40407)
+           INVALID, o2(0xe0,0xae),         UNDEF, o2(0xe0,0xaf),
+     o2(0xca,0xd2), o2(0xc8,0xc7), o2(0xe0,0xb0), o2(0xc7,0xd7),
+     o2(0xc4,0xad), o2(0xe0,0xb1), o2(0xb2,0xe7), o2(0xb5,0xed),
+     o2(0xcc,0xc6), o2(0xcc,0xb6), o2(0xb2,0xb4), o2(0xcf,0xb4),
+     o2(0xcb,0xd2), o2(0xca,0xaa), o2(0xc0,0xb7), o2(0xe0,0xb2),
+     o2(0xc6,0xc3), o2(0xb8,0xa3), o2(0xe0,0xb3),
+
+#define to_CP51932_E7_89 WORDINDEX2INFO(40430)
+    to_CP51932_E7_89_offsets,
+    to_CP51932_E7_89_infos,
+
+#define to_CP51932_E7_8A_infos WORDINDEX2INFO(40432)
+           INVALID, o2(0xba,0xd4), o2(0xe0,0xb5), o2(0xe0,0xb4),
+             UNDEF, o2(0xe0,0xb6), o2(0xe0,0xb7), o2(0xe0,0xb8),
+     o2(0xb5,0xbe), o2(0xe0,0xb9), o2(0xe0,0xba), o2(0xb8,0xa4),
+     o2(0xc8,0xc8), o2(0xfa,0xfe), o2(0xe0,0xbc), o2(0xbe,0xf5),
+     o2(0xe0,0xbb), o2(0xfb,0xa1),
+
+#define to_CP51932_E7_8A WORDINDEX2INFO(40450)
+    to_CP51932_E7_8A_offsets,
+    to_CP51932_E7_8A_infos,
+
+#define to_CP51932_E7_8B_infos WORDINDEX2INFO(40452)
+           INVALID,         UNDEF, o2(0xb6,0xb8), o2(0xe0,0xbd),
+     o2(0xe0,0xbf), o2(0xe0,0xbe), o2(0xe0,0xc0), o2(0xb8,0xd1),
+     o2(0xe0,0xc1), o2(0xb6,0xe9), o2(0xc1,0xc0), o2(0xb9,0xfd),
+     o2(0xe0,0xc3), o2(0xe0,0xc4), o2(0xe0,0xc2), o2(0xbc,0xed),
+     o2(0xc6,0xc8), o2(0xb6,0xb9), o2(0xe0,0xc6), o2(0xc3,0xac),
+     o2(0xe0,0xc5), o2(0xcf,0xb5), o2(0xc7,0xe2),
+
+#define to_CP51932_E7_8B WORDINDEX2INFO(40475)
+    to_CP51932_E7_8B_offsets,
+    to_CP51932_E7_8B_infos,
+
+#define to_CP51932_E7_8C_infos WORDINDEX2INFO(40477)
+           INVALID,         UNDEF, o2(0xe0,0xc9), o2(0xe0,0xcb),
+     o2(0xe0,0xc8), o2(0xcc,0xd4), o2(0xe0,0xca), o2(0xe0,0xcc),
+     o2(0xce,0xc4), o2(0xfb,0xa2), o2(0xe0,0xd0), o2(0xe0,0xcf),
+     o2(0xc3,0xf6), o2(0xc7,0xad), o2(0xb8,0xa5), o2(0xe0,0xce),
+     o2(0xe0,0xcd), o2(0xcd,0xb1), o2(0xcd,0xb2), o2(0xe0,0xd1),
+     o2(0xb1,0xee),
+
+#define to_CP51932_E7_8C WORDINDEX2INFO(40498)
+    to_CP51932_E7_8C_offsets,
+    to_CP51932_E7_8C_infos,
+
+#define to_CP51932_E7_8D_infos WORDINDEX2INFO(40500)
+           INVALID,         UNDEF, o2(0xb9,0xf6), o2(0xbb,0xe2),
+     o2(0xe0,0xd2), o2(0xe0,0xd3), o2(0xe0,0xd5), o2(0xbd,0xc3),
+     o2(0xe0,0xd7), o2(0xe0,0xd6), o2(0xe0,0xd8), o2(0xb3,0xcd),
+     o2(0xe0,0xda), o2(0xfb,0xa4), o2(0xe0,0xd9), o2(0xe0,0xdc),
+     o2(0xe0,0xdb),
+
+#define to_CP51932_E7_8D WORDINDEX2INFO(40517)
+    to_CP51932_E7_8D_offsets,
+    to_CP51932_E7_8D_infos,
+
+#define to_CP51932_E7_8E_infos WORDINDEX2INFO(40519)
+           INVALID,         UNDEF, o2(0xb8,0xbc), o2(0xce,0xa8),
+     o2(0xb6,0xcc), o2(0xb2,0xa6), o2(0xb6,0xea), o2(0xb4,0xe1),
+     o2(0xce,0xe8), o2(0xe0,0xde), o2(0xe0,0xe0), o2(0xfb,0xa5),
+
+#define to_CP51932_E7_8E WORDINDEX2INFO(40531)
+    to_CP51932_E7_8E_offsets,
+    to_CP51932_E7_8E_infos,
+
+#define to_CP51932_E7_8F_infos WORDINDEX2INFO(40533)
+           INVALID, o2(0xe0,0xe1),         UNDEF, o2(0xb2,0xd1),
+     o2(0xe0,0xdd), o2(0xfb,0xa6), o2(0xbb,0xb9), o2(0xc4,0xc1),
+     o2(0xe0,0xdf), o2(0xfb,0xa9), o2(0xfb,0xa7), o2(0xe0,0xe4),
+     o2(0xbc,0xee), o2(0xfb,0xa8), o2(0xe0,0xe2), o2(0xb7,0xbe),
+     o2(0xc8,0xc9), o2(0xe0,0xe3), o2(0xe0,0xfe), o2(0xfb,0xab),
+     o2(0xe0,0xe9), o2(0xb8,0xbd),
+
+#define to_CP51932_E7_8F WORDINDEX2INFO(40555)
+    to_CP51932_E7_8F_offsets,
+    to_CP51932_E7_8F_infos,
+
+#define to_CP51932_E7_90_infos WORDINDEX2INFO(40557)
+           INVALID,         UNDEF, o2(0xb5,0xe5), o2(0xe0,0xe6),
+     o2(0xcd,0xfd), o2(0xfb,0xaa), o2(0xce,0xb0), o2(0xc2,0xf6),
+     o2(0xe0,0xe8), o2(0xfb,0xac), o2(0xfb,0xae), o2(0xfb,0xad),
+     o2(0xfb,0xaf), o2(0xe0,0xea), o2(0xce,0xd6), o2(0xb6,0xd7),
+     o2(0xc8,0xfc), o2(0xc7,0xca), o2(0xe0,0xeb), o2(0xe0,0xed),
+
+#define to_CP51932_E7_90 WORDINDEX2INFO(40577)
+    to_CP51932_E7_90_offsets,
+    to_CP51932_E7_90_infos,
+
+#define to_CP51932_E7_91_infos WORDINDEX2INFO(40579)
+           INVALID,         UNDEF, o2(0xe0,0xf0), o2(0xe0,0xec),
+     o2(0xe0,0xef), o2(0xb8,0xea), o2(0xb1,0xcd), o2(0xe0,0xf1),
+     o2(0xbf,0xf0), o2(0xe0,0xee), o2(0xce,0xdc), o2(0xfb,0xb0),
+     o2(0xe0,0xf4), o2(0xf4,0xa4), o2(0xe0,0xf2), o2(0xe0,0xf5),
+     o2(0xe0,0xe7), o2(0xe0,0xf3), o2(0xba,0xbc), o2(0xe0,0xf6),
+     o2(0xe0,0xf7),
+
+#define to_CP51932_E7_91 WORDINDEX2INFO(40600)
+    to_CP51932_E7_91_offsets,
+    to_CP51932_E7_91_infos,
+
+#define to_CP51932_E7_92_infos WORDINDEX2INFO(40602)
+           INVALID,         UNDEF, o2(0xcd,0xfe), o2(0xfb,0xb1),
+     o2(0xe0,0xf8), o2(0xe0,0xf9), o2(0xfb,0xb2), o2(0xe0,0xe5),
+     o2(0xe0,0xfa), o2(0xb4,0xc4), o2(0xbc,0xa5),
+
+#define to_CP51932_E7_92 WORDINDEX2INFO(40613)
+    to_CP51932_E7_92_offsets,
+    to_CP51932_E7_92_infos,
+
+#define to_CP51932_E7_93_infos WORDINDEX2INFO(40615)
+           INVALID,         UNDEF, o2(0xe0,0xfb), o2(0xe0,0xfc),
+     o2(0xe0,0xfd), o2(0xb1,0xbb), o2(0xe1,0xa1), o2(0xc9,0xbb),
+     o2(0xe1,0xa2), o2(0xb4,0xa4), o2(0xe1,0xa3), o2(0xe1,0xa4),
+     o2(0xe1,0xa5), o2(0xe1,0xa7), o2(0xe1,0xa8), o2(0xe1,0xa6),
+     o2(0xc9,0xd3), o2(0xe1,0xaa), o2(0xe1,0xa9),
+
+#define to_CP51932_E7_93 WORDINDEX2INFO(40634)
+    to_CP51932_E7_93_offsets,
+    to_CP51932_E7_93_infos,
+
+#define to_CP51932_E7_94_infos WORDINDEX2INFO(40636)
+           INVALID,         UNDEF, o2(0xfb,0xb3), o2(0xe1,0xac),
+     o2(0xe1,0xab), o2(0xe1,0xad), o2(0xe1,0xae), o2(0xe1,0xb0),
+     o2(0xe1,0xaf), o2(0xb9,0xf9), o2(0xe1,0xb2), o2(0xe1,0xb1),
+     o2(0xb4,0xc5), o2(0xbf,0xd3), o2(0xc5,0xbc), o2(0xe1,0xb3),
+     o2(0xc0,0xb8), o2(0xbb,0xba), o2(0xb1,0xf9), o2(0xe1,0xb4),
+     o2(0xcd,0xd1), o2(0xca,0xe3), o2(0xe1,0xb5), o2(0xf9,0xec),
+     o2(0xc5,0xc4), o2(0xcd,0xb3), o2(0xb9,0xc3), o2(0xbf,0xbd),
+     o2(0xc3,0xcb), o2(0xd2,0xb4), o2(0xc4,0xae), o2(0xb2,0xe8),
+     o2(0xe1,0xb6),
+
+#define to_CP51932_E7_94 WORDINDEX2INFO(40669)
+    to_CP51932_E7_94_offsets,
+    to_CP51932_E7_94_infos,
+
+#define to_CP51932_E7_95_infos WORDINDEX2INFO(40671)
+           INVALID,         UNDEF, o2(0xe1,0xb7), o2(0xe1,0xbc),
+     o2(0xe1,0xba), o2(0xe1,0xb9), o2(0xda,0xc2), o2(0xb3,0xa6),
+     o2(0xe1,0xb8), o2(0xb0,0xda), o2(0xc8,0xaa), o2(0xc8,0xca),
+     o2(0xce,0xb1), o2(0xe1,0xbd), o2(0xe1,0xbb), o2(0xc3,0xdc),
+     o2(0xc0,0xa6), o2(0xc8,0xab), o2(0xc9,0xad), o2(0xe1,0xbf),
+     o2(0xce,0xac), o2(0xb7,0xcd), o2(0xe1,0xc0), o2(0xe1,0xbe),
+     o2(0xc8,0xd6), o2(0xe1,0xc1), o2(0xe1,0xc2), o2(0xfb,0xb4),
+     o2(0xb0,0xdb), o2(0xbe,0xf6), o2(0xe1,0xc7), o2(0xe1,0xc4),
+     o2(0xc6,0xed), o2(0xe1,0xc3), o2(0xb5,0xa6),
+
+#define to_CP51932_E7_95 WORDINDEX2INFO(40706)
+    to_CP51932_E7_95_offsets,
+    to_CP51932_E7_95_infos,
+
+#define to_CP51932_E7_96_infos WORDINDEX2INFO(40708)
+           INVALID,         UNDEF, o2(0xe1,0xca), o2(0xe1,0xc5),
+     o2(0xe1,0xc6), o2(0xe1,0xc9), o2(0xe1,0xc8), o2(0xc9,0xa5),
+     o2(0xc1,0xc2), o2(0xc1,0xc1), o2(0xb5,0xbf), o2(0xe1,0xcb),
+     o2(0xe1,0xcc), o2(0xe1,0xcd), o2(0xe1,0xcf), o2(0xe1,0xce),
+     o2(0xb1,0xd6), o2(0xe1,0xd7), o2(0xc8,0xe8), o2(0xe1,0xd1),
+     o2(0xe1,0xd3), o2(0xe1,0xd5), o2(0xbf,0xbe), o2(0xe1,0xd6),
+     o2(0xe1,0xd4), o2(0xbc,0xc0),
+
+#define to_CP51932_E7_96 WORDINDEX2INFO(40734)
+    to_CP51932_E7_96_offsets,
+    to_CP51932_E7_96_infos,
+
+#define to_CP51932_E7_97_infos WORDINDEX2INFO(40736)
+           INVALID,         UNDEF, o2(0xe1,0xd0), o2(0xe1,0xd2),
+     o2(0xc9,0xc2), o2(0xbe,0xc9), o2(0xe1,0xd9), o2(0xe1,0xd8),
+     o2(0xe1,0xda), o2(0xbc,0xa6), o2(0xba,0xaf), o2(0xc5,0xf7),
+     o2(0xe1,0xdb), o2(0xc4,0xcb), o2(0xe1,0xdd), o2(0xce,0xa1),
+     o2(0xe1,0xdc), o2(0xc1,0xe9), o2(0xe1,0xe2), o2(0xe1,0xe4),
+     o2(0xe1,0xe5), o2(0xc3,0xd4), o2(0xe1,0xe3), o2(0xe1,0xe0),
+     o2(0xe1,0xde), o2(0xe1,0xdf),
+
+#define to_CP51932_E7_97 WORDINDEX2INFO(40762)
+    to_CP51932_E7_97_offsets,
+    to_CP51932_E7_97_infos,
+
+#define to_CP51932_E7_98_infos WORDINDEX2INFO(40764)
+           INVALID,         UNDEF, o2(0xe1,0xe1), o2(0xe1,0xe8),
+     o2(0xe1,0xe6), o2(0xe1,0xe7), o2(0xe1,0xe9), o2(0xe1,0xeb),
+     o2(0xe1,0xec), o2(0xe1,0xed), o2(0xe1,0xee), o2(0xe1,0xea),
+     o2(0xe1,0xf0), o2(0xe1,0xef), o2(0xe1,0xf1),
+
+#define to_CP51932_E7_98 WORDINDEX2INFO(40779)
+    to_CP51932_E7_98_offsets,
+    to_CP51932_E7_98_infos,
+
+#define to_CP51932_E7_99_infos WORDINDEX2INFO(40781)
+           INVALID,         UNDEF, o2(0xce,0xc5), o2(0xe1,0xf4),
+     o2(0xe1,0xf2), o2(0xe1,0xf3), o2(0xb4,0xe2), o2(0xcc,0xfe),
+     o2(0xca,0xca), o2(0xe1,0xf6), o2(0xe1,0xf5), o2(0xe1,0xf7),
+     o2(0xe1,0xf8), o2(0xe1,0xfc), o2(0xe1,0xf9), o2(0xe1,0xfa),
+     o2(0xe1,0xfb), o2(0xe1,0xfd), o2(0xe1,0xfe), o2(0xe2,0xa1),
+     o2(0xe2,0xa2), o2(0xe2,0xa3), o2(0xc8,0xaf), o2(0xc5,0xd0),
+     o2(0xe2,0xa4), o2(0xc7,0xf2), o2(0xc9,0xb4),
+
+#define to_CP51932_E7_99 WORDINDEX2INFO(40808)
+    to_CP51932_E7_99_offsets,
+    to_CP51932_E7_99_infos,
+
+#define to_CP51932_E7_9A_infos WORDINDEX2INFO(40810)
+           INVALID, o2(0xe2,0xa5),         UNDEF, o2(0xfb,0xb5),
+     o2(0xe2,0xa6), o2(0xc5,0xaa), o2(0xb3,0xa7), o2(0xb9,0xc4),
+     o2(0xe2,0xa7), o2(0xe2,0xa8), o2(0xe2,0xa9), o2(0xbb,0xa9),
+     o2(0xe2,0xab), o2(0xe2,0xaa), o2(0xe2,0xac), o2(0xe2,0xad),
+     o2(0xfb,0xb8), o2(0xfb,0xb6), o2(0xfb,0xb7), o2(0xfb,0xb9),
+     o2(0xc8,0xe9), o2(0xe2,0xae), o2(0xe2,0xaf), o2(0xf3,0xe9),
+     o2(0xe2,0xb0), o2(0xe2,0xb1), o2(0xe2,0xb2), o2(0xbb,0xae),
+
+#define to_CP51932_E7_9A WORDINDEX2INFO(40838)
+    to_CP51932_E7_9A_offsets,
+    to_CP51932_E7_9A_infos,
+
+#define to_CP51932_E7_9B_infos WORDINDEX2INFO(40840)
+           INVALID,         UNDEF, o2(0xe2,0xb3), o2(0xc7,0xd6),
+     o2(0xcb,0xdf), o2(0xb1,0xce), o2(0xb1,0xd7), o2(0xe2,0xb4),
+     o2(0xe2,0xb6), o2(0xe2,0xb5), o2(0xc5,0xf0), o2(0xc0,0xb9),
+     o2(0xdd,0xb9), o2(0xe2,0xb7), o2(0xcc,0xc1), o2(0xe2,0xb8),
+     o2(0xb4,0xc6), o2(0xc8,0xd7), o2(0xe2,0xb9), o2(0xe2,0xba),
+     o2(0xe2,0xbb), o2(0xcc,0xdc), o2(0xcc,0xd5), o2(0xc4,0xbe),
+     o2(0xc1,0xea), o2(0xe2,0xbd), o2(0xbd,0xe2),
+
+#define to_CP51932_E7_9B WORDINDEX2INFO(40867)
+    to_CP51932_E7_9B_offsets,
+    to_CP51932_E7_9B_infos,
+
+#define to_CP51932_E7_9C_infos WORDINDEX2INFO(40869)
+           INVALID,         UNDEF, o2(0xbe,0xca), o2(0xe2,0xc0),
+     o2(0xe2,0xbf), o2(0xe2,0xbe), o2(0xc8,0xfd), o2(0xb4,0xc7),
+     o2(0xb8,0xa9), o2(0xe2,0xc6), o2(0xe2,0xc3), o2(0xbf,0xbf),
+     o2(0xcc,0xb2), o2(0xe2,0xc2), o2(0xe2,0xc4), o2(0xe2,0xc5),
+     o2(0xe2,0xc1), o2(0xe2,0xc7), o2(0xe2,0xc8), o2(0xc4,0xaf),
+     o2(0xb4,0xe3),
+
+#define to_CP51932_E7_9C WORDINDEX2INFO(40890)
+    to_CP51932_E7_9C_offsets,
+    to_CP51932_E7_9C_infos,
+
+#define to_CP51932_E7_9D_infos WORDINDEX2INFO(40892)
+           INVALID, o2(0xc3,0xe5),         UNDEF, o2(0xfb,0xbb),
+     o2(0xe2,0xc9), o2(0xe2,0xca), o2(0xe2,0xcd), o2(0xbf,0xe7),
+     o2(0xc6,0xc4), o2(0xe2,0xce), o2(0xcb,0xd3), o2(0xe2,0xcb),
+     o2(0xe2,0xcc), o2(0xe2,0xd1), o2(0xe2,0xd0), o2(0xe2,0xcf),
+
+#define to_CP51932_E7_9D WORDINDEX2INFO(40908)
+    to_CP51932_E7_9D_offsets,
+    to_CP51932_E7_9D_infos,
+
+#define to_CP51932_E7_9E_infos WORDINDEX2INFO(40910)
+           INVALID,         UNDEF, o2(0xe2,0xd3), o2(0xe2,0xd2),
+     o2(0xe2,0xd4), o2(0xe2,0xd6), o2(0xe2,0xd5), o2(0xca,0xcd),
+     o2(0xbd,0xd6), o2(0xce,0xc6), o2(0xe2,0xd7), o2(0xc6,0xb7),
+     o2(0xe2,0xd8), o2(0xe2,0xd9), o2(0xe2,0xdd), o2(0xe2,0xdb),
+     o2(0xe2,0xdc), o2(0xe2,0xda),
+
+#define to_CP51932_E7_9E WORDINDEX2INFO(40928)
+    to_CP51932_E7_9E_offsets,
+    to_CP51932_E7_9E_infos,
+
+#define to_CP51932_E7_9F_infos WORDINDEX2INFO(40930)
+           INVALID,         UNDEF, o2(0xe2,0xde), o2(0xe2,0xdf),
+     o2(0xe2,0xe0), o2(0xe2,0xe1), o2(0xcc,0xb7), o2(0xe2,0xe2),
+     o2(0xcc,0xf0), o2(0xe2,0xe3), o2(0xc3,0xce), o2(0xc7,0xea),
+     o2(0xb6,0xeb), o2(0xc3,0xbb), o2(0xe2,0xe4), o2(0xb6,0xba),
+     o2(0xc0,0xd0), o2(0xe2,0xe5),
+
+#define to_CP51932_E7_9F WORDINDEX2INFO(40948)
+    to_CP51932_E7_9F_offsets,
+    to_CP51932_E7_9F_infos,
+
+#define to_CP51932_E7_A0_infos WORDINDEX2INFO(40950)
+           INVALID,         UNDEF, o2(0xba,0xbd), o2(0xe2,0xe6),
+     o2(0xe2,0xe7), o2(0xb8,0xa6), o2(0xba,0xd5), o2(0xe2,0xe9),
+     o2(0xfb,0xbd), o2(0xc5,0xd6), o2(0xba,0xd6), o2(0xb5,0xce),
+     o2(0xcb,0xa4), o2(0xc7,0xcb), o2(0xc5,0xd7), o2(0xb9,0xdc),
+
+#define to_CP51932_E7_A0 WORDINDEX2INFO(40966)
+    to_CP51932_E7_A0_offsets,
+    to_CP51932_E7_A0_infos,
+
+#define to_CP51932_E7_A1_infos WORDINDEX2INFO(40968)
+           INVALID,         UNDEF, o2(0xe2,0xeb), o2(0xfb,0xbe),
+     o2(0xbe,0xcb), o2(0xfb,0xbf), o2(0xce,0xb2), o2(0xb9,0xc5),
+     o2(0xb8,0xa7), o2(0xc8,0xa3), o2(0xe2,0xed), o2(0xfb,0xc0),
+     o2(0xe2,0xef),
+
+#define to_CP51932_E7_A1 WORDINDEX2INFO(40981)
+    to_CP51932_E7_A1_offsets,
+    to_CP51932_E7_A1_infos,
+
+#define to_CP51932_E7_A2_infos WORDINDEX2INFO(40983)
+           INVALID,         UNDEF, o2(0xb8,0xeb), o2(0xe2,0xee),
+     o2(0xc4,0xf6), o2(0xe2,0xf1), o2(0xb3,0xb7), o2(0xe2,0xec),
+     o2(0xc8,0xea), o2(0xb1,0xb0), o2(0xba,0xec), o2(0xcf,0xd2),
+     o2(0xe2,0xf0), o2(0xe2,0xf2), o2(0xca,0xcb), o2(0xc0,0xd9),
+     o2(0xe2,0xf4), o2(0xe2,0xf5), o2(0xe2,0xf3), o2(0xb3,0xce),
+     o2(0xe2,0xfb), o2(0xe2,0xfa),
+
+#define to_CP51932_E7_A2 WORDINDEX2INFO(41005)
+    to_CP51932_E7_A2_offsets,
+    to_CP51932_E7_A2_infos,
+
+#define to_CP51932_E7_A3_infos WORDINDEX2INFO(41007)
+           INVALID,         UNDEF, o2(0xbc,0xa7), o2(0xe2,0xfc),
+     o2(0xe2,0xf7), o2(0xe2,0xfd), o2(0xe2,0xf8), o2(0xc8,0xd8),
+     o2(0xe2,0xf6), o2(0xe2,0xf9), o2(0xe3,0xa2), o2(0xe3,0xa1),
+     o2(0xcb,0xe1), o2(0xe2,0xfe), o2(0xb0,0xeb), o2(0xe3,0xa4),
+     o2(0xe3,0xa3),
+
+#define to_CP51932_E7_A3 WORDINDEX2INFO(41024)
+    to_CP51932_E7_A3_offsets,
+    to_CP51932_E7_A3_infos,
+
+#define to_CP51932_E7_A4_infos WORDINDEX2INFO(41026)
+           INVALID,         UNDEF, o2(0xbe,0xcc), o2(0xe3,0xa5),
+     o2(0xc1,0xc3), o2(0xe3,0xa7), o2(0xe3,0xa6), o2(0xe3,0xa8),
+     o2(0xe2,0xe8), o2(0xe2,0xea), o2(0xe3,0xaa), o2(0xe3,0xa9),
+     o2(0xfb,0xc1), o2(0xbc,0xa8), o2(0xce,0xe9), o2(0xbc,0xd2),
+
+#define to_CP51932_E7_A4 WORDINDEX2INFO(41042)
+    to_CP51932_E7_A4_offsets,
+    to_CP51932_E7_A4_infos,
+
+#define to_CP51932_E7_A5_infos WORDINDEX2INFO(41044)
+           INVALID, o2(0xe3,0xab), o2(0xb7,0xb7),         UNDEF,
+     o2(0xb5,0xc0), o2(0xb5,0xa7), o2(0xbb,0xe3), o2(0xcd,0xb4),
+     o2(0xe3,0xb1), o2(0xe3,0xb0), o2(0xc1,0xc4), o2(0xe3,0xad),
+     o2(0xe3,0xaf), o2(0xbd,0xcb), o2(0xbf,0xc0), o2(0xe3,0xae),
+     o2(0xe3,0xac), o2(0xc7,0xaa), o2(0xbe,0xcd), o2(0xc9,0xbc),
+     o2(0xba,0xd7), o2(0xc5,0xf8), o2(0xe3,0xb2), o2(0xe3,0xb3),
+
+#define to_CP51932_E7_A5 WORDINDEX2INFO(41068)
+    to_CP51932_E7_A5_offsets,
+    to_CP51932_E7_A5_infos,
+
+#define to_CP51932_E7_A6_infos WORDINDEX2INFO(41070)
+           INVALID, o2(0xe3,0xc9), o2(0xb6,0xd8),         UNDEF,
+     o2(0xcf,0xbd), o2(0xc1,0xb5), o2(0xe3,0xb4), o2(0xb2,0xd2),
+     o2(0xc4,0xf7), o2(0xca,0xa1), o2(0xfb,0xc5), o2(0xfb,0xc7),
+     o2(0xe3,0xb5), o2(0xb5,0xfa), o2(0xe3,0xb6), o2(0xe3,0xb8),
+     o2(0xe3,0xb9), o2(0xc7,0xa9), o2(0xe3,0xba), o2(0xe3,0xbb),
+     o2(0xe3,0xbc), o2(0xb6,0xd9), o2(0xb2,0xd3), o2(0xc6,0xc5),
+
+#define to_CP51932_E7_A6 WORDINDEX2INFO(41094)
+    to_CP51932_E7_A6_offsets,
+    to_CP51932_E7_A6_infos,
+
+#define to_CP51932_E7_A7_infos WORDINDEX2INFO(41096)
+           INVALID, o2(0xbd,0xa8), o2(0xbb,0xe4),         UNDEF,
+     o2(0xe3,0xbd), o2(0xbd,0xa9), o2(0xb2,0xca), o2(0xc9,0xc3),
+     o2(0xe3,0xbe), o2(0xc8,0xeb), o2(0xc1,0xc5), o2(0xe3,0xc1),
+     o2(0xe3,0xc2), o2(0xc7,0xe9), o2(0xbf,0xc1), o2(0xe3,0xbf),
+     o2(0xc3,0xe1), o2(0xe3,0xc0), o2(0xbe,0xce), o2(0xb0,0xdc),
+
+#define to_CP51932_E7_A7 WORDINDEX2INFO(41116)
+    to_CP51932_E7_A7_offsets,
+    to_CP51932_E7_A7_infos,
+
+#define to_CP51932_E7_A8_infos WORDINDEX2INFO(41118)
+           INVALID, o2(0xb5,0xa9),         UNDEF, o2(0xe3,0xc3),
+     o2(0xc4,0xf8), o2(0xe3,0xc4), o2(0xc0,0xc7), o2(0xcc,0xad),
+     o2(0xc9,0xa3), o2(0xe3,0xc5), o2(0xe3,0xc6), o2(0xc3,0xd5),
+     o2(0xce,0xc7), o2(0xe3,0xc8), o2(0xe3,0xc7), o2(0xbc,0xef),
+     o2(0xe3,0xca), o2(0xb0,0xf0), o2(0xe3,0xcd), o2(0xe3,0xcb),
+     o2(0xb2,0xd4), o2(0xb7,0xce), o2(0xe3,0xcc), o2(0xb9,0xc6),
+
+#define to_CP51932_E7_A8 WORDINDEX2INFO(41142)
+    to_CP51932_E7_A8_offsets,
+    to_CP51932_E7_A8_infos,
+
+#define to_CP51932_E7_A9_infos WORDINDEX2INFO(41144)
+           INVALID, o2(0xb9,0xf2),         UNDEF, o2(0xca,0xe6),
+     o2(0xe3,0xce), o2(0xcb,0xd4), o2(0xe3,0xd0), o2(0xc0,0xd1),
+     o2(0xb1,0xcf), o2(0xb2,0xba), o2(0xb0,0xac), o2(0xe3,0xcf),
+     o2(0xe3,0xd1), o2(0xe3,0xd2), o2(0xbe,0xf7), o2(0xe3,0xd3),
+     o2(0xb3,0xcf), o2(0xe3,0xd5), o2(0xb7,0xea), o2(0xb5,0xe6),
+     o2(0xe3,0xd6), o2(0xb6,0xf5), o2(0xe3,0xd7), o2(0xc0,0xfc),
+
+#define to_CP51932_E7_A9 WORDINDEX2INFO(41168)
+    to_CP51932_E7_A9_offsets,
+    to_CP51932_E7_A9_infos,
+
+#define to_CP51932_E7_AA_infos WORDINDEX2INFO(41170)
+           INVALID,         UNDEF, o2(0xc6,0xcd), o2(0xc0,0xe0),
+     o2(0xba,0xf5), o2(0xe3,0xd8), o2(0xc3,0xe2), o2(0xc1,0xeb),
+     o2(0xe3,0xda), o2(0xe3,0xdc), o2(0xe3,0xd9), o2(0xe3,0xdb),
+     o2(0xb7,0xa2), o2(0xe3,0xdd), o2(0xb7,0xa6), o2(0xb5,0xe7),
+     o2(0xcd,0xd2), o2(0xe3,0xdf), o2(0xe3,0xe0), o2(0xb1,0xae),
+     o2(0xe3,0xe3),
+
+#define to_CP51932_E7_AA WORDINDEX2INFO(41191)
+    to_CP51932_E7_AA_offsets,
+    to_CP51932_E7_AA_infos,
+
+#define to_CP51932_E7_AB_infos WORDINDEX2INFO(41193)
+           INVALID,         UNDEF, o2(0xb3,0xf6), o2(0xe3,0xe2),
+     o2(0xe3,0xe1), o2(0xe3,0xe5), o2(0xe3,0xde), o2(0xe3,0xe6),
+     o2(0xce,0xa9), o2(0xe3,0xe7), o2(0xe3,0xe8), o2(0xfb,0xc8),
+     o2(0xd4,0xf4), o2(0xe3,0xea), o2(0xe3,0xe9), o2(0xe3,0xeb),
+     o2(0xe3,0xec), o2(0xce,0xb5), o2(0xe3,0xed), o2(0xf0,0xef),
+     o2(0xbe,0xcf), o2(0xe3,0xee), o2(0xe3,0xef), o2(0xbd,0xd7),
+     o2(0xc6,0xb8), o2(0xe3,0xf0), o2(0xfb,0xc9), o2(0xc3,0xa8),
+     o2(0xfb,0xcb), o2(0xe3,0xf1), o2(0xc3,0xbc), o2(0xe3,0xf2),
+     o2(0xb6,0xa5), o2(0xd1,0xbf), o2(0xc3,0xdd), o2(0xbc,0xb3),
+     o2(0xb4,0xc8),
+
+#define to_CP51932_E7_AB WORDINDEX2INFO(41230)
+    to_CP51932_E7_AB_offsets,
+    to_CP51932_E7_AB_infos,
+
+#define to_CP51932_E7_AC_infos WORDINDEX2INFO(41232)
+           INVALID,         UNDEF, o2(0xe3,0xf3), o2(0xe4,0xa2),
+     o2(0xe3,0xf6), o2(0xb5,0xe8), o2(0xe3,0xf5), o2(0xe4,0xa4),
+     o2(0xe3,0xf4), o2(0xbe,0xd0), o2(0xe3,0xf8), o2(0xe3,0xf9),
+     o2(0xc5,0xab), o2(0xe3,0xfa), o2(0xb3,0xde), o2(0xbf,0xda),
+     o2(0xc9,0xe4), o2(0xe3,0xfc), o2(0xc2,0xe8), o2(0xe3,0xf7),
+     o2(0xe3,0xfb), o2(0xe3,0xfd), o2(0xba,0xfb),
+
+#define to_CP51932_E7_AC WORDINDEX2INFO(41255)
+    to_CP51932_E7_AC_offsets,
+    to_CP51932_E7_AC_infos,
+
+#define to_CP51932_E7_AD_infos WORDINDEX2INFO(41257)
+           INVALID,         UNDEF, o2(0xe4,0xa6), o2(0xc9,0xae),
+     o2(0xc8,0xa6), o2(0xc5,0xf9), o2(0xb6,0xda), o2(0xe4,0xa5),
+     o2(0xe4,0xa3), o2(0xc8,0xb5), o2(0xe3,0xfe), o2(0xc3,0xde),
+     o2(0xc5,0xfb), o2(0xc5,0xfa), o2(0xba,0xf6), o2(0xe4,0xb8),
+     o2(0xe4,0xa8), o2(0xe4,0xaa), o2(0xe4,0xad), o2(0xe4,0xae),
+     o2(0xe4,0xab), o2(0xe4,0xac), o2(0xe4,0xa9), o2(0xe4,0xa7),
+     o2(0xe4,0xa1),
+
+#define to_CP51932_E7_AD WORDINDEX2INFO(41282)
+    to_CP51932_E7_AD_offsets,
+    to_CP51932_E7_AD_infos,
+
+#define to_CP51932_E7_AE_infos WORDINDEX2INFO(41284)
+           INVALID,         UNDEF, o2(0xca,0xcf), o2(0xb2,0xd5),
+     o2(0xe4,0xb5), o2(0xe4,0xb2), o2(0xe4,0xb7), o2(0xe4,0xb6),
+     o2(0xc7,0xf3), o2(0xcc,0xa7), o2(0xbb,0xbb), o2(0xe4,0xb0),
+     o2(0xe4,0xb9), o2(0xe4,0xb4), o2(0xe4,0xb3), o2(0xe4,0xaf),
+     o2(0xfb,0xcc), o2(0xe4,0xb1), o2(0xb4,0xc9), o2(0xc3,0xbd),
+     o2(0xc0,0xfd), o2(0xc8,0xa2), o2(0xe4,0xbe), o2(0xc8,0xa4),
+
+#define to_CP51932_E7_AE WORDINDEX2INFO(41308)
+    to_CP51932_E7_AE_offsets,
+    to_CP51932_E7_AE_infos,
+
+#define to_CP51932_E7_AF_infos WORDINDEX2INFO(41310)
+           INVALID, o2(0xc0,0xe1), o2(0xe4,0xbb),         UNDEF,
+     o2(0xc8,0xcf), o2(0xe4,0xbf), o2(0xca,0xd3), o2(0xc3,0xdb),
+     o2(0xe4,0xba), o2(0xe4,0xbc), o2(0xe4,0xbd), o2(0xe4,0xc0),
+     o2(0xbc,0xc4), o2(0xc6,0xc6), o2(0xe4,0xc5), o2(0xe4,0xc4),
+     o2(0xe4,0xc1), o2(0xcf,0xb6), o2(0xe4,0xca), o2(0xe4,0xce),
+     o2(0xe4,0xcb),
+
+#define to_CP51932_E7_AF WORDINDEX2INFO(41331)
+    to_CP51932_E7_AF_offsets,
+    to_CP51932_E7_AF_infos,
+
+#define to_CP51932_E7_B0_infos WORDINDEX2INFO(41333)
+           INVALID, o2(0xe4,0xc7),         UNDEF, o2(0xe4,0xc8),
+     o2(0xe4,0xcd), o2(0xe4,0xc2), o2(0xd2,0xd5), o2(0xe4,0xc9),
+     o2(0xe4,0xc3), o2(0xe4,0xcc), o2(0xe4,0xd2), o2(0xb4,0xca),
+     o2(0xe4,0xcf), o2(0xe4,0xd0), o2(0xe4,0xd1), o2(0xe4,0xd4),
+     o2(0xe4,0xd3), o2(0xc8,0xf6), o2(0xe4,0xd5), o2(0xce,0xfc),
+     o2(0xca,0xed),
+
+#define to_CP51932_E7_B0 WORDINDEX2INFO(41354)
+    to_CP51932_E7_B0_offsets,
+    to_CP51932_E7_B0_infos,
+
+#define to_CP51932_E7_B1_infos WORDINDEX2INFO(41356)
+           INVALID, o2(0xe4,0xda),         UNDEF, o2(0xe4,0xd7),
+     o2(0xe4,0xd6), o2(0xc0,0xd2), o2(0xe4,0xd9), o2(0xe4,0xdb),
+     o2(0xe4,0xd8), o2(0xe4,0xdf), o2(0xe4,0xdc), o2(0xe4,0xdd),
+     o2(0xe4,0xc6), o2(0xe4,0xde), o2(0xe4,0xe0), o2(0xe4,0xe1),
+     o2(0xca,0xc6), o2(0xe4,0xe2), o2(0xcc,0xe2),
+
+#define to_CP51932_E7_B1 WORDINDEX2INFO(41375)
+    to_CP51932_E7_B1_offsets,
+    to_CP51932_E7_B1_infos,
+
+#define to_CP51932_E7_B2_infos WORDINDEX2INFO(41377)
+           INVALID,         UNDEF, o2(0xb6,0xce), o2(0xb7,0xa9),
+     o2(0xe4,0xe3), o2(0xca,0xb4), o2(0xbf,0xe8), o2(0xcc,0xb0),
+     o2(0xe4,0xe4), o2(0xce,0xb3), o2(0xc7,0xf4), o2(0xc1,0xc6),
+     o2(0xc7,0xb4), o2(0xbd,0xcd), o2(0xb0,0xc0), o2(0xe4,0xe9),
+     o2(0xe4,0xe7), o2(0xe4,0xe5), o2(0xb4,0xa1), o2(0xbe,0xd1),
+     o2(0xe4,0xea), o2(0xe4,0xe8), o2(0xe4,0xe6), o2(0xe4,0xee),
+     o2(0xe4,0xed), o2(0xe4,0xec), o2(0xe4,0xeb), o2(0xe4,0xef),
+     o2(0xe4,0xf0), o2(0xc0,0xba),
+
+#define to_CP51932_E7_B2 WORDINDEX2INFO(41407)
+    to_CP51932_E7_B2_offsets,
+    to_CP51932_E7_B2_infos,
+
+#define to_CP51932_E7_B3_infos WORDINDEX2INFO(41409)
+           INVALID, o2(0xe4,0xf1),         UNDEF, o2(0xe4,0xf3),
+     o2(0xe4,0xf2), o2(0xb8,0xd2), o2(0xc1,0xb8), o2(0xe4,0xf5),
+     o2(0xc5,0xfc), o2(0xe4,0xf4), o2(0xe4,0xf6), o2(0xca,0xb5),
+     o2(0xc1,0xec), o2(0xb9,0xc7), o2(0xe4,0xf7), o2(0xce,0xc8),
+     o2(0xe4,0xf9), o2(0xe4,0xfa), o2(0xe4,0xfb), o2(0xe4,0xfc),
+     o2(0xbb,0xe5), o2(0xe4,0xfd), o2(0xb7,0xcf), o2(0xb5,0xea),
+
+#define to_CP51932_E7_B3 WORDINDEX2INFO(41433)
+    to_CP51932_E7_B3_offsets,
+    to_CP51932_E7_B3_infos,
+
+#define to_CP51932_E7_B4_infos WORDINDEX2INFO(41435)
+           INVALID, o2(0xb5,0xaa),         UNDEF, o2(0xe5,0xa1),
+     o2(0xcc,0xf3), o2(0xb9,0xc8), o2(0xe4,0xfe), o2(0xe5,0xa4),
+     o2(0xcc,0xe6), o2(0xc7,0xbc), o2(0xc9,0xb3), o2(0xbd,0xe3),
+     o2(0xe5,0xa3), o2(0xbc,0xd3), o2(0xb9,0xc9), o2(0xbb,0xe6),
+     o2(0xb5,0xe9), o2(0xca,0xb6), o2(0xe5,0xa2), o2(0xc1,0xc7),
+     o2(0xcb,0xc2), o2(0xba,0xf7), o2(0xbb,0xe7), o2(0xc4,0xdd),
+     o2(0xe5,0xa7), o2(0xce,0xdf), o2(0xba,0xd9), o2(0xe5,0xa8),
+     o2(0xbf,0xc2), o2(0xe5,0xaa), o2(0xbe,0xd2), o2(0xba,0xb0),
+     o2(0xe5,0xa9),
+
+#define to_CP51932_E7_B4 WORDINDEX2INFO(41468)
+    to_CP51932_E7_B4_offsets,
+    to_CP51932_E7_B4_infos,
+
+#define to_CP51932_E7_B5_infos WORDINDEX2INFO(41470)
+           INVALID,         UNDEF, o2(0xbd,0xaa), o2(0xb8,0xbe),
+     o2(0xc1,0xc8), o2(0xe5,0xa5), o2(0xe5,0xab), o2(0xfb,0xce),
+     o2(0xe5,0xa6), o2(0xb7,0xd0), o2(0xe5,0xae), o2(0xe5,0xb2),
+     o2(0xb7,0xeb), o2(0xe5,0xad), o2(0xe5,0xb6), o2(0xfb,0xcf),
+     o2(0xb9,0xca), o2(0xcd,0xed), o2(0xb0,0xbc), o2(0xe5,0xb3),
+     o2(0xb5,0xeb), o2(0xe5,0xb0), o2(0xe5,0xb1), o2(0xc5,0xfd),
+     o2(0xe5,0xaf), o2(0xe5,0xac), o2(0xb3,0xa8), o2(0xc0,0xe4),
+     o2(0xb8,0xa8), o2(0xe5,0xb8),
+
+#define to_CP51932_E7_B5 WORDINDEX2INFO(41500)
+    to_CP51932_E7_B5_offsets,
+    to_CP51932_E7_B5_infos,
+
+#define to_CP51932_E7_B6_infos WORDINDEX2INFO(41502)
+           INVALID,         UNDEF, o2(0xe5,0xb5), o2(0xe5,0xb7),
+     o2(0xe5,0xb4), o2(0xb7,0xd1), o2(0xc2,0xb3), o2(0xe5,0xb9),
+     o2(0xc1,0xee), o2(0xe5,0xc6), o2(0xfb,0xd1), o2(0xe5,0xc2),
+     o2(0xe5,0xbc), o2(0xe5,0xc0), o2(0xbc,0xfa), o2(0xb0,0xdd),
+     o2(0xe5,0xbb), o2(0xe5,0xc3), o2(0xe5,0xc7), o2(0xb9,0xcb),
+     o2(0xcc,0xd6), o2(0xc4,0xd6), o2(0xe5,0xbd), o2(0xfb,0xd0),
+     o2(0xe5,0xc5), o2(0xe5,0xba), o2(0xc3,0xbe), o2(0xe5,0xbf),
+     o2(0xb0,0xbd), o2(0xcc,0xca),
+
+#define to_CP51932_E7_B6 WORDINDEX2INFO(41532)
+    to_CP51932_E7_B6_offsets,
+    to_CP51932_E7_B6_infos,
+
+#define to_CP51932_E7_B7_infos WORDINDEX2INFO(41534)
+           INVALID,         UNDEF, o2(0xe5,0xbe), o2(0xb6,0xdb),
+     o2(0xc8,0xec), o2(0xc1,0xed), o2(0xce,0xd0), o2(0xbd,0xef),
+     o2(0xe5,0xee), o2(0xfb,0xd2), o2(0xe5,0xc8), o2(0xc0,0xfe),
+     o2(0xe5,0xc4), o2(0xe5,0xc9), o2(0xe5,0xcb), o2(0xc4,0xf9),
+     o2(0xe5,0xce), o2(0xe5,0xca), o2(0xca,0xd4), o2(0xb4,0xcb),
+     o2(0xcc,0xcb), o2(0xb0,0xde), o2(0xe5,0xcd), o2(0xce,0xfd),
+     o2(0xe5,0xcc),
+
+#define to_CP51932_E7_B7 WORDINDEX2INFO(41559)
+    to_CP51932_E7_B7_offsets,
+    to_CP51932_E7_B7_infos,
+
+#define to_CP51932_E7_B8_infos WORDINDEX2INFO(41561)
+           INVALID,         UNDEF, o2(0xb1,0xef), o2(0xc6,0xec),
+     o2(0xe5,0xcf), o2(0xe5,0xd6), o2(0xe5,0xd0), o2(0xe5,0xd7),
+     o2(0xe5,0xd3), o2(0xc7,0xfb), o2(0xbc,0xca), o2(0xe5,0xd5),
+     o2(0xe5,0xd2), o2(0xe5,0xd8), o2(0xe5,0xd1), o2(0xbd,0xc4),
+     o2(0xcb,0xa5), o2(0xbd,0xcc), o2(0xe5,0xd4), o2(0xe5,0xe0),
+     o2(0xe5,0xdc), o2(0xe5,0xdf), o2(0xe5,0xdd), o2(0xe5,0xe1),
+     o2(0xe5,0xdb), o2(0xe5,0xc1), o2(0xc0,0xd3),
+
+#define to_CP51932_E7_B8 WORDINDEX2INFO(41588)
+    to_CP51932_E7_B8_offsets,
+    to_CP51932_E7_B8_infos,
+
+#define to_CP51932_E7_B9_infos WORDINDEX2INFO(41590)
+           INVALID,         UNDEF, o2(0xc8,0xcb), o2(0xe5,0xde),
+     o2(0xe5,0xd9), o2(0xc1,0xa1), o2(0xb7,0xd2), o2(0xbd,0xab),
+     o2(0xfb,0xd3), o2(0xbf,0xa5), o2(0xc1,0xb6), o2(0xe5,0xe4),
+     o2(0xe5,0xe6), o2(0xe5,0xe7), o2(0xe5,0xe3), o2(0xe5,0xe5),
+     o2(0xe5,0xda), o2(0xe5,0xe2), o2(0xe5,0xea), o2(0xe5,0xe9),
+     o2(0xcb,0xfa), o2(0xb7,0xab), o2(0xe5,0xe8), o2(0xe5,0xec),
+     o2(0xe5,0xeb), o2(0xe5,0xef), o2(0xe5,0xf1),
+
+#define to_CP51932_E7_B9 WORDINDEX2INFO(41617)
+    to_CP51932_E7_B9_offsets,
+    to_CP51932_E7_B9_infos,
+
+#define to_CP51932_E7_BA_infos WORDINDEX2INFO(41619)
+           INVALID,         UNDEF, o2(0xbb,0xbc), o2(0xe5,0xed),
+     o2(0xe5,0xf2), o2(0xe5,0xf3), o2(0xf9,0xa1), o2(0xe5,0xf4),
+     o2(0xe5,0xfa), o2(0xc5,0xbb), o2(0xe5,0xf6), o2(0xe5,0xf5),
+     o2(0xe5,0xf7), o2(0xe5,0xf8), o2(0xe5,0xf9), o2(0xe5,0xfb),
+     o2(0xe5,0xfc),
+
+#define to_CP51932_E7_BA WORDINDEX2INFO(41636)
+    to_CP51932_E7_BA_offsets,
+    to_CP51932_E7_BA_infos,
+
+#define to_CP51932_E7_BC_infos WORDINDEX2INFO(41638)
+           INVALID,         UNDEF, o2(0xb4,0xcc), o2(0xe5,0xfd),
+     o2(0xe5,0xfe),
+
+#define to_CP51932_E7_BC WORDINDEX2INFO(41643)
+    to_CP51932_E7_BC_offsets,
+    to_CP51932_E7_BC_infos,
+
+#define to_CP51932_E7_BD_infos WORDINDEX2INFO(41645)
+           INVALID,         UNDEF, o2(0xe6,0xa1), o2(0xfb,0xd4),
+     o2(0xe6,0xa2), o2(0xe6,0xa3), o2(0xe6,0xa4), o2(0xe6,0xa5),
+     o2(0xe6,0xa6), o2(0xe6,0xa8), o2(0xe6,0xa7), o2(0xe6,0xa9),
+     o2(0xe6,0xaa), o2(0xe6,0xab), o2(0xe6,0xae), o2(0xe6,0xac),
+     o2(0xe6,0xad), o2(0xba,0xe1), o2(0xb7,0xd3), o2(0xc3,0xd6),
+     o2(0xc8,0xb3), o2(0xbd,0xf0), o2(0xc7,0xcd), o2(0xc8,0xed),
+     o2(0xe6,0xaf), o2(0xd8,0xed),
+
+#define to_CP51932_E7_BD WORDINDEX2INFO(41671)
+    to_CP51932_E7_BD_offsets,
+    to_CP51932_E7_BD_infos,
+
+#define to_CP51932_E7_BE_infos WORDINDEX2INFO(41673)
+           INVALID,         UNDEF, o2(0xe6,0xb0), o2(0xe6,0xb2),
+     o2(0xcd,0xe5), o2(0xe6,0xb1), o2(0xe6,0xb4), o2(0xe6,0xb3),
+     o2(0xcd,0xd3), o2(0xe6,0xb5), o2(0xc8,0xfe), o2(0xe6,0xb6),
+     o2(0xe6,0xb9), o2(0xe6,0xb8), o2(0xe6,0xb7), o2(0xfb,0xd5),
+     o2(0xe6,0xba), o2(0xb7,0xb2), o2(0xc1,0xa2), o2(0xb5,0xc1),
+     o2(0xe6,0xbe), o2(0xe6,0xbb), o2(0xe6,0xbc), o2(0xe6,0xbf),
+     o2(0xe6,0xc0), o2(0xe6,0xbd), o2(0xb1,0xa9),
+
+#define to_CP51932_E7_BE WORDINDEX2INFO(41700)
+    to_CP51932_E7_BE_offsets,
+    to_CP51932_E7_BE_infos,
+
+#define to_CP51932_E7_BF_infos WORDINDEX2INFO(41702)
+           INVALID,         UNDEF, o2(0xb2,0xa7), o2(0xe6,0xc2),
+     o2(0xe6,0xc3), o2(0xe6,0xc4), o2(0xcd,0xe2), o2(0xbd,0xac),
+     o2(0xe6,0xc6), o2(0xe6,0xc5), o2(0xbf,0xe9), o2(0xe6,0xc7),
+     o2(0xe6,0xc8), o2(0xe6,0xc9), o2(0xb4,0xe5), o2(0xb4,0xcd),
+     o2(0xe6,0xca), o2(0xe6,0xcb), o2(0xcb,0xdd), o2(0xcd,0xe3),
+
+#define to_CP51932_E7_BF WORDINDEX2INFO(41722)
+    to_CP51932_E7_BF_offsets,
+    to_CP51932_E7_BF_infos,
+
+#define to_CP51932_E7_infos WORDINDEX2INFO(41724)
+              INVALID, to_CP51932_E7_80, to_CP51932_E7_81, to_CP51932_E7_82,
+     to_CP51932_E7_83, to_CP51932_E7_84, to_CP51932_E7_85, to_CP51932_E7_86,
+     to_CP51932_E7_87, to_CP51932_E7_88, to_CP51932_E7_89, to_CP51932_E7_8A,
+     to_CP51932_E7_8B, to_CP51932_E7_8C, to_CP51932_E7_8D, to_CP51932_E7_8E,
+     to_CP51932_E7_8F, to_CP51932_E7_90, to_CP51932_E7_91, to_CP51932_E7_92,
+     to_CP51932_E7_93, to_CP51932_E7_94, to_CP51932_E7_95, to_CP51932_E7_96,
+     to_CP51932_E7_97, to_CP51932_E7_98, to_CP51932_E7_99, to_CP51932_E7_9A,
+     to_CP51932_E7_9B, to_CP51932_E7_9C, to_CP51932_E7_9D, to_CP51932_E7_9E,
+     to_CP51932_E7_9F, to_CP51932_E7_A0, to_CP51932_E7_A1, to_CP51932_E7_A2,
+     to_CP51932_E7_A3, to_CP51932_E7_A4, to_CP51932_E7_A5, to_CP51932_E7_A6,
+     to_CP51932_E7_A7, to_CP51932_E7_A8, to_CP51932_E7_A9, to_CP51932_E7_AA,
+     to_CP51932_E7_AB, to_CP51932_E7_AC, to_CP51932_E7_AD, to_CP51932_E7_AE,
+     to_CP51932_E7_AF, to_CP51932_E7_B0, to_CP51932_E7_B1, to_CP51932_E7_B2,
+     to_CP51932_E7_B3, to_CP51932_E7_B4, to_CP51932_E7_B5, to_CP51932_E7_B6,
+     to_CP51932_E7_B7, to_CP51932_E7_B8, to_CP51932_E7_B9, to_CP51932_E7_BA,
+         to_EUC_JP_C6, to_CP51932_E7_BC, to_CP51932_E7_BD, to_CP51932_E7_BE,
+     to_CP51932_E7_BF,
+
+#define to_CP51932_E7 WORDINDEX2INFO(41789)
+    to_EUC_JP_C3_offsets,
+    to_CP51932_E7_infos,
+
+#define to_CP51932_E8_80_infos WORDINDEX2INFO(41791)
+           INVALID, o2(0xcd,0xd4), o2(0xcf,0xb7),         UNDEF,
+     o2(0xb9,0xcd), o2(0xe6,0xce), o2(0xbc,0xd4), o2(0xe6,0xcd),
+     o2(0xe6,0xcf), o2(0xbc,0xa9), o2(0xc2,0xd1), o2(0xe6,0xd0),
+     o2(0xb9,0xcc), o2(0xcc,0xd7), o2(0xe6,0xd1), o2(0xe6,0xd2),
+     o2(0xe6,0xd3), o2(0xe6,0xd4), o2(0xe6,0xd5), o2(0xbc,0xaa),
+     o2(0xcc,0xed), o2(0xe6,0xd7), o2(0xc3,0xbf), o2(0xe6,0xd6),
+
+#define to_CP51932_E8_80 WORDINDEX2INFO(41815)
+    to_CP51932_E8_80_offsets,
+    to_CP51932_E8_80_infos,
+
+#define to_CP51932_E8_81_infos WORDINDEX2INFO(41817)
+           INVALID,         UNDEF, o2(0xe6,0xd9), o2(0xe6,0xd8),
+     o2(0xe6,0xda), o2(0xc0,0xbb), o2(0xe6,0xdb), o2(0xe6,0xdc),
+     o2(0xca,0xb9), o2(0xe6,0xdd), o2(0xc1,0xef), o2(0xe6,0xde),
+     o2(0xe6,0xdf), o2(0xce,0xfe), o2(0xe6,0xe2), o2(0xe6,0xe1),
+     o2(0xe6,0xe0), o2(0xc4,0xb0), o2(0xe6,0xe3), o2(0xbf,0xa6),
+     o2(0xe6,0xe4), o2(0xe6,0xe5), o2(0xcf,0xb8), o2(0xe6,0xe6),
+
+#define to_CP51932_E8_81 WORDINDEX2INFO(41841)
+    to_CP51932_E8_81_offsets,
+    to_CP51932_E8_81_infos,
+
+#define to_CP51932_E8_82_infos WORDINDEX2INFO(41843)
+           INVALID,         UNDEF, o2(0xe6,0xe7), o2(0xe6,0xe9),
+     o2(0xe6,0xe8), o2(0xc8,0xa5), o2(0xc6,0xf9), o2(0xcf,0xbe),
+     o2(0xc8,0xa9), o2(0xe6,0xeb), o2(0xbe,0xd3), o2(0xc9,0xaa),
+     o2(0xe6,0xec), o2(0xe6,0xea), o2(0xb4,0xce), o2(0xb8,0xd4),
+     o2(0xbb,0xe8), o2(0xc8,0xee), o2(0xb8,0xaa), o2(0xcb,0xc3),
+     o2(0xe6,0xef), o2(0xe6,0xed), o2(0xb9,0xce), o2(0xb9,0xcf),
+     o2(0xb0,0xe9), o2(0xba,0xe8), o2(0xc7,0xd9),
+
+#define to_CP51932_E8_82 WORDINDEX2INFO(41870)
+    to_CP51932_E8_82_offsets,
+    to_CP51932_E8_82_infos,
+
+#define to_CP51932_E8_83_infos WORDINDEX2INFO(41872)
+           INVALID,         UNDEF, o2(0xb0,0xdf), o2(0xe6,0xf4),
+     o2(0xc3,0xc0), o2(0xc7,0xd8), o2(0xc2,0xdb), o2(0xe6,0xf6),
+     o2(0xe6,0xf2), o2(0xe6,0xf5), o2(0xe6,0xf0), o2(0xe6,0xf3),
+     o2(0xcb,0xa6), o2(0xb8,0xd5), o2(0xb0,0xfd), o2(0xe6,0xf1),
+     o2(0xe6,0xf8), o2(0xe6,0xf9), o2(0xc6,0xb9), o2(0xb6,0xbb),
+     o2(0xe7,0xa6), o2(0xc7,0xbd),
+
+#define to_CP51932_E8_83 WORDINDEX2INFO(41894)
+    to_CP51932_E8_83_offsets,
+    to_CP51932_E8_83_infos,
+
+#define to_CP51932_E8_84_infos WORDINDEX2INFO(41896)
+           INVALID,         UNDEF, o2(0xbb,0xe9), o2(0xb6,0xbc),
+     o2(0xc0,0xc8), o2(0xcf,0xc6), o2(0xcc,0xae), o2(0xe6,0xf7),
+     o2(0xc0,0xd4), o2(0xb5,0xd3), o2(0xe6,0xfa), o2(0xe6,0xfc),
+     o2(0xe6,0xfb), o2(0xe6,0xfd), o2(0xc3,0xa6), o2(0xc7,0xbe),
+     o2(0xc4,0xb1), o2(0xe7,0xa3),
+
+#define to_CP51932_E8_84 WORDINDEX2INFO(41914)
+    to_CP51932_E8_84_offsets,
+    to_CP51932_E8_84_infos,
+
+#define to_CP51932_E8_85_infos WORDINDEX2INFO(41916)
+           INVALID,         UNDEF, o2(0xe7,0xa2), o2(0xe6,0xfe),
+     o2(0xbf,0xd5), o2(0xc9,0xe5), o2(0xe7,0xa5), o2(0xe7,0xa4),
+     o2(0xb9,0xd0), o2(0xcf,0xd3), o2(0xe7,0xb5), o2(0xe7,0xa9),
+     o2(0xe7,0xaa), o2(0xbc,0xf0), o2(0xe7,0xa8), o2(0xb9,0xf8),
+     o2(0xe7,0xa7), o2(0xe7,0xab), o2(0xc4,0xb2), o2(0xca,0xa2),
+     o2(0xc1,0xa3), o2(0xc2,0xdc),
+
+#define to_CP51932_E8_85 WORDINDEX2INFO(41938)
+    to_CP51932_E8_85_offsets,
+    to_CP51932_E8_85_infos,
+
+#define to_CP51932_E8_86_infos WORDINDEX2INFO(41940)
+           INVALID, o2(0xe7,0xaf),         UNDEF, o2(0xe7,0xb0),
+     o2(0xe7,0xac), o2(0xe7,0xad), o2(0xe7,0xae), o2(0xb9,0xd1),
+     o2(0xe7,0xb6), o2(0xe7,0xb2), o2(0xc9,0xe6), o2(0xcb,0xec),
+     o2(0xc9,0xa8), o2(0xe7,0xb1), o2(0xe7,0xb4), o2(0xe7,0xb3),
+     o2(0xcb,0xc4), o2(0xe7,0xb7), o2(0xe7,0xb8), o2(0xc1,0xb7),
+     o2(0xe7,0xb9), o2(0xe7,0xbb), o2(0xe7,0xbf), o2(0xe7,0xbc),
+     o2(0xe7,0xba), o2(0xc7,0xbf),
+
+#define to_CP51932_E8_86 WORDINDEX2INFO(41966)
+    to_CP51932_E8_86_offsets,
+    to_CP51932_E8_86_infos,
+
+#define to_CP51932_E8_87_infos WORDINDEX2INFO(41968)
+           INVALID, o2(0xe7,0xbd),         UNDEF, o2(0xe7,0xbe),
+     o2(0xb2,0xb2), o2(0xe7,0xc5), o2(0xe7,0xc0), o2(0xe7,0xc1),
+     o2(0xe7,0xc2), o2(0xc2,0xa1), o2(0xe7,0xc4), o2(0xe7,0xc3),
+     o2(0xe7,0xc6), o2(0xe7,0xc7), o2(0xe7,0xc8), o2(0xbf,0xc3),
+     o2(0xb2,0xe9), o2(0xe7,0xc9), o2(0xce,0xd7), o2(0xbc,0xab),
+     o2(0xbd,0xad), o2(0xbb,0xea), o2(0xc3,0xd7), o2(0xe7,0xca),
+     o2(0xe7,0xcb), o2(0xb1,0xb1), o2(0xe7,0xcc),
+
+#define to_CP51932_E8_87 WORDINDEX2INFO(41995)
+    to_CP51932_E8_87_offsets,
+    to_CP51932_E8_87_infos,
+
+#define to_CP51932_E8_88_infos WORDINDEX2INFO(41997)
+           INVALID,         UNDEF, o2(0xe7,0xcd), o2(0xe7,0xce),
+     o2(0xe7,0xcf), o2(0xe7,0xd0), o2(0xb6,0xbd), o2(0xda,0xaa),
+     o2(0xe7,0xd1), o2(0xc0,0xe5), o2(0xe7,0xd2), o2(0xbc,0xcb),
+     o2(0xe7,0xd3), o2(0xd0,0xb0), o2(0xe7,0xd4), o2(0xca,0xde),
+     o2(0xb4,0xdc), o2(0xc1,0xa4), o2(0xbd,0xd8), o2(0xc9,0xf1),
+     o2(0xbd,0xae), o2(0xe7,0xd5), o2(0xb9,0xd2), o2(0xe7,0xd6),
+     o2(0xc8,0xcc), o2(0xe7,0xe4), o2(0xe7,0xd8), o2(0xc2,0xc9),
+     o2(0xc7,0xf5), o2(0xb8,0xbf), o2(0xe7,0xd7), o2(0xc1,0xa5),
+
+#define to_CP51932_E8_88 WORDINDEX2INFO(42029)
+    to_CP51932_E8_88_offsets,
+    to_CP51932_E8_88_infos,
+
+#define to_CP51932_E8_89_infos WORDINDEX2INFO(42031)
+           INVALID, o2(0xe7,0xd9),         UNDEF, o2(0xc4,0xfa),
+     o2(0xe7,0xdb), o2(0xe7,0xda), o2(0xe7,0xdd), o2(0xe7,0xdc),
+     o2(0xe7,0xde), o2(0xe7,0xe0), o2(0xe7,0xdf), o2(0xb4,0xcf),
+     o2(0xe7,0xe1), o2(0xe7,0xe2), o2(0xe7,0xe3), o2(0xba,0xb1),
+     o2(0xce,0xc9), o2(0xe7,0xe5), o2(0xbf,0xa7), o2(0xb1,0xf0),
+     o2(0xe7,0xe6), o2(0xe7,0xe7), o2(0xe7,0xe8),
+
+#define to_CP51932_E8_89 WORDINDEX2INFO(42054)
+    to_CP51932_E8_89_offsets,
+    to_CP51932_E8_89_infos,
+
+#define to_CP51932_E8_8A_infos WORDINDEX2INFO(42056)
+           INVALID,         UNDEF, o2(0xb0,0xf2), o2(0xe7,0xe9),
+     o2(0xe7,0xea), o2(0xc9,0xe7), o2(0xbc,0xc7), o2(0xe7,0xec),
+     o2(0xb3,0xa9), o2(0xb0,0xb2), o2(0xe7,0xeb), o2(0xe7,0xee),
+     o2(0xc7,0xce), o2(0xbf,0xc4), o2(0xb2,0xd6), o2(0xcb,0xa7),
+     o2(0xb7,0xdd), o2(0xb6,0xdc), o2(0xe7,0xed), o2(0xb2,0xea),
+
+#define to_CP51932_E8_8A WORDINDEX2INFO(42076)
+    to_CP51932_E8_8A_offsets,
+    to_CP51932_E8_8A_infos,
+
+#define to_CP51932_E8_8B_infos WORDINDEX2INFO(42078)
+           INVALID,         UNDEF, o2(0xb4,0xa3), o2(0xb1,0xf1),
+     o2(0xe7,0xf2), o2(0xce,0xea), o2(0xc2,0xdd), o2(0xc9,0xc4),
+     o2(0xe7,0xfe), o2(0xb2,0xd7), o2(0xe7,0xfc), o2(0xe7,0xfa),
+     o2(0xe7,0xf1), o2(0xe7,0xef), o2(0xe7,0xf0), o2(0xbc,0xe3),
+     o2(0xb6,0xec), o2(0xc3,0xf7), o2(0xc6,0xd1), o2(0xb1,0xd1),
+     o2(0xe7,0xf4), o2(0xe7,0xf3), o2(0xe7,0xf9), o2(0xe7,0xf5),
+     o2(0xe7,0xf8),
+
+#define to_CP51932_E8_8B WORDINDEX2INFO(42103)
+    to_CP51932_E8_8B_offsets,
+    to_CP51932_E8_8B_infos,
+
+#define to_CP51932_E8_8C_infos WORDINDEX2INFO(42105)
+           INVALID,         UNDEF, o2(0xfb,0xd7), o2(0xcc,0xd0),
+     o2(0xe7,0xf7), o2(0xb2,0xd8), o2(0xb3,0xfd), o2(0xe7,0xfb),
+     o2(0xe7,0xfd), o2(0xb7,0xd4), o2(0xe8,0xa3), o2(0xe8,0xac),
+     o2(0xe8,0xad), o2(0xb0,0xab), o2(0xe8,0xb4), o2(0xb0,0xf1),
+     o2(0xe8,0xab), o2(0xe8,0xaa), o2(0xe8,0xa5), o2(0xe8,0xa4),
+     o2(0xe8,0xa2), o2(0xe8,0xa1), o2(0xc3,0xe3), o2(0xc2,0xfb),
+     o2(0xe8,0xa7),
+
+#define to_CP51932_E8_8C WORDINDEX2INFO(42130)
+    to_CP51932_E8_8C_offsets,
+    to_CP51932_E8_8C_infos,
+
+#define to_CP51932_E8_8D_infos WORDINDEX2INFO(42132)
+           INVALID, o2(0xe8,0xa6),         UNDEF, o2(0xe8,0xa9),
+     o2(0xc1,0xf0), o2(0xb7,0xd5), o2(0xb1,0xc1), o2(0xe8,0xa8),
+     o2(0xb9,0xd3), o2(0xc1,0xf1), o2(0xfb,0xd8), o2(0xe8,0xba),
+     o2(0xe8,0xbb), o2(0xb2,0xd9), o2(0xb2,0xae), o2(0xe8,0xb8),
+     o2(0xfb,0xd9),
+
+#define to_CP51932_E8_8D WORDINDEX2INFO(42149)
+    to_CP51932_E8_8D_offsets,
+    to_CP51932_E8_8D_infos,
+
+#define to_CP51932_E8_8E_infos WORDINDEX2INFO(42151)
+           INVALID,         UNDEF, o2(0xe8,0xae), o2(0xe8,0xb6),
+     o2(0xe8,0xbd), o2(0xe8,0xb7), o2(0xe8,0xb5), o2(0xe7,0xf6),
+     o2(0xe8,0xb3), o2(0xe8,0xaf), o2(0xb4,0xd0), o2(0xe8,0xb1),
+     o2(0xe8,0xbc), o2(0xe8,0xb2), o2(0xe8,0xbe), o2(0xe8,0xb0),
+     o2(0xc7,0xfc), o2(0xcd,0xe9), o2(0xe8,0xb9), o2(0xe8,0xcf),
+
+#define to_CP51932_E8_8E WORDINDEX2INFO(42171)
+    to_CP51932_E8_8E_offsets,
+    to_CP51932_E8_8E_infos,
+
+#define to_CP51932_E8_8F_infos WORDINDEX2INFO(42173)
+           INVALID,         UNDEF, o2(0xe8,0xc7), o2(0xbf,0xfb),
+     o2(0xfb,0xda), o2(0xb5,0xc6), o2(0xb6,0xdd), o2(0xe8,0xc2),
+     o2(0xb2,0xdb), o2(0xbe,0xd4), o2(0xe8,0xc5), o2(0xba,0xda),
+     o2(0xc5,0xd1), o2(0xe8,0xca), o2(0xca,0xee), o2(0xe8,0xc1),
+     o2(0xb2,0xda), o2(0xb8,0xd6), o2(0xc9,0xa9), o2(0xe8,0xcb),
+     o2(0xe8,0xbf), o2(0xfb,0xdb), o2(0xe8,0xc8), o2(0xe8,0xd2),
+     o2(0xe8,0xc3),
+
+#define to_CP51932_E8_8F WORDINDEX2INFO(42198)
+    to_CP51932_E8_8F_offsets,
+    to_CP51932_E8_8F_infos,
+
+#define to_CP51932_E8_90_infos WORDINDEX2INFO(42200)
+           INVALID,         UNDEF, o2(0xe8,0xc4), o2(0xc6,0xba),
+     o2(0xe8,0xc9), o2(0xe8,0xc6), o2(0xcb,0xa8), o2(0xe8,0xcc),
+     o2(0xb0,0xe0), o2(0xe8,0xc0), o2(0xe8,0xce), o2(0xe8,0xcd),
+     o2(0xc7,0xeb), o2(0xe8,0xd4), o2(0xe8,0xdf), o2(0xb3,0xfe),
+     o2(0xe8,0xe2), o2(0xe8,0xd0), o2(0xe8,0xd5), o2(0xcd,0xee),
+
+#define to_CP51932_E8_90 WORDINDEX2INFO(42220)
+    to_CP51932_E8_90_offsets,
+    to_CP51932_E8_90_infos,
+
+#define to_CP51932_E8_91_infos WORDINDEX2INFO(42222)
+           INVALID,         UNDEF, o2(0xe8,0xde), o2(0xfb,0xdc),
+     o2(0xcd,0xd5), o2(0xce,0xaa), o2(0xc3,0xf8), o2(0xb3,0xeb),
+     o2(0xc9,0xf2), o2(0xe8,0xe4), o2(0xc6,0xa1), o2(0xb0,0xb1),
+     o2(0xe8,0xdd), o2(0xe8,0xd9), o2(0xc1,0xf2), o2(0xe8,0xd3),
+     o2(0xe8,0xdb), o2(0xe8,0xe0), o2(0xc7,0xac), o2(0xb0,0xaa),
+     o2(0xe8,0xd8), o2(0xe8,0xe1), o2(0xc9,0xf8),
+
+#define to_CP51932_E8_91 WORDINDEX2INFO(42245)
+    to_CP51932_E8_91_offsets,
+    to_CP51932_E8_91_infos,
+
+#define to_CP51932_E8_92_infos WORDINDEX2INFO(42247)
+           INVALID,         UNDEF, o2(0xe8,0xdc), o2(0xe8,0xd7),
+     o2(0xbe,0xd5), o2(0xbd,0xaf), o2(0xbc,0xac), o2(0xcc,0xd8),
+     o2(0xc9,0xc7), o2(0xe8,0xe7), o2(0xe8,0xf0), o2(0xe8,0xda),
+     o2(0xb3,0xf7), o2(0xfb,0xdd), o2(0xbe,0xf8), o2(0xe8,0xe5),
+     o2(0xe8,0xea), o2(0xc1,0xf3), o2(0xe8,0xe6),
+
+#define to_CP51932_E8_92 WORDINDEX2INFO(42266)
+    to_CP51932_E8_92_offsets,
+    to_CP51932_E8_92_infos,
+
+#define to_CP51932_E8_93_infos WORDINDEX2INFO(42268)
+           INVALID,         UNDEF, o2(0xe8,0xed), o2(0xc3,0xdf),
+     o2(0xe8,0xee), o2(0xcd,0xd6), o2(0xe8,0xe3), o2(0xb3,0xb8),
+     o2(0xe8,0xe9), o2(0xe8,0xec), o2(0xcc,0xac), o2(0xe8,0xef),
+     o2(0xe8,0xe8), o2(0xe8,0xeb), o2(0xf9,0xa5), o2(0xcb,0xa9),
+     o2(0xcf,0xa1), o2(0xe8,0xf3), o2(0xe8,0xfa), o2(0xe8,0xf2),
+
+#define to_CP51932_E8_93 WORDINDEX2INFO(42288)
+    to_CP51932_E8_93_offsets,
+    to_CP51932_E8_93_infos,
+
+#define to_CP51932_E8_94_infos WORDINDEX2INFO(42290)
+           INVALID, o2(0xbc,0xc3),         UNDEF, o2(0xe8,0xd1),
+     o2(0xca,0xce), o2(0xcc,0xa2), o2(0xe8,0xf9), o2(0xe8,0xf8),
+     o2(0xe8,0xf4), o2(0xe8,0xf5), o2(0xb1,0xb6), o2(0xe8,0xf7),
+     o2(0xe8,0xf1), o2(0xc4,0xd5), o2(0xe8,0xf6), o2(0xb0,0xfe),
+     o2(0xc2,0xa2), o2(0xca,0xc3),
+
+#define to_CP51932_E8_94 WORDINDEX2INFO(42308)
+    to_CP51932_E8_94_offsets,
+    to_CP51932_E8_94_infos,
+
+#define to_CP51932_E8_95_infos WORDINDEX2INFO(42310)
+           INVALID, o2(0xe8,0xfb), o2(0xe9,0xa1),         UNDEF,
+     o2(0xc8,0xd9), o2(0xe8,0xfe), o2(0xbe,0xd6), o2(0xbc,0xc9),
+     o2(0xe9,0xa3), o2(0xb6,0xbe), o2(0xfb,0xde), o2(0xe9,0xa4),
+     o2(0xc9,0xf9), o2(0xe8,0xfd), o2(0xfb,0xdf), o2(0xe8,0xd6),
+     o2(0xe8,0xfc), o2(0xcf,0xcf), o2(0xc6,0xa2), o2(0xc9,0xf3),
+     o2(0xfb,0xe0), o2(0xe9,0xab), o2(0xe9,0xb1), o2(0xe9,0xb2),
+
+#define to_CP51932_E8_95 WORDINDEX2INFO(42334)
+    to_CP51932_E8_95_offsets,
+    to_CP51932_E8_95_infos,
+
+#define to_CP51932_E8_96_infos WORDINDEX2INFO(42336)
+           INVALID, o2(0xe9,0xa5),         UNDEF, o2(0xc7,0xf6),
+     o2(0xe9,0xaf), o2(0xe9,0xa7), o2(0xe9,0xa9), o2(0xe9,0xb3),
+     o2(0xe9,0xa8), o2(0xe9,0xac), o2(0xb1,0xf2), o2(0xc6,0xe5),
+     o2(0xe9,0xad), o2(0xe9,0xb0), o2(0xe9,0xa6), o2(0xc1,0xa6),
+     o2(0xe9,0xaa), o2(0xbb,0xa7), o2(0xbf,0xc5), o2(0xb7,0xb0),
+     o2(0xcc,0xf4), o2(0xcc,0xf9), o2(0xbd,0xf2), o2(0xfb,0xe2),
+     o2(0xe9,0xb7), o2(0xe9,0xb5),
+
+#define to_CP51932_E8_96 WORDINDEX2INFO(42362)
+    to_CP51932_E8_96_offsets,
+    to_CP51932_E8_96_infos,
+
+#define to_CP51932_E8_97_infos WORDINDEX2INFO(42364)
+           INVALID,         UNDEF, o2(0xcf,0xce), o2(0xe9,0xb4),
+     o2(0xcd,0xf5), o2(0xe9,0xb6), o2(0xe9,0xb8), o2(0xe9,0xb9),
+     o2(0xe9,0xbc), o2(0xe9,0xba), o2(0xc6,0xa3), o2(0xe9,0xbb),
+     o2(0xc8,0xcd), o2(0xe9,0xae), o2(0xbd,0xf3), o2(0xe9,0xbd),
+     o2(0xe9,0xc2), o2(0xc1,0xf4), o2(0xe9,0xc1),
+
+#define to_CP51932_E8_97 WORDINDEX2INFO(42383)
+    to_CP51932_E8_97_offsets,
+    to_CP51932_E8_97_infos,
+
+#define to_CP51932_E8_98_infos WORDINDEX2INFO(42385)
+           INVALID,         UNDEF, o2(0xe9,0xa2), o2(0xe9,0xc3),
+     o2(0xc1,0xc9), o2(0xe9,0xbe), o2(0xe9,0xc0), o2(0xe9,0xbf),
+     o2(0xdd,0xb1), o2(0xdd,0xa2), o2(0xe9,0xc5), o2(0xe9,0xc4),
+     o2(0xcd,0xf6), o2(0xe2,0xbc), o2(0xe9,0xc6), o2(0xe9,0xc7),
+
+#define to_CP51932_E8_98 WORDINDEX2INFO(42401)
+    to_CP51932_E8_98_offsets,
+    to_CP51932_E8_98_infos,
+
+#define to_CP51932_E8_99_infos WORDINDEX2INFO(42403)
+           INVALID,         UNDEF, o2(0xe9,0xc8), o2(0xb8,0xd7),
+     o2(0xb5,0xd4), o2(0xe9,0xca), o2(0xd1,0xdd), o2(0xb5,0xf5),
+     o2(0xce,0xba), o2(0xb6,0xf3), o2(0xe9,0xcb), o2(0xe9,0xcc),
+     o2(0xc3,0xee), o2(0xe9,0xcd), o2(0xc6,0xfa), o2(0xb0,0xba),
+
+#define to_CP51932_E8_99 WORDINDEX2INFO(42419)
+    to_CP51932_E8_99_offsets,
+    to_CP51932_E8_99_infos,
+
+#define to_CP51932_E8_9A_infos WORDINDEX2INFO(42421)
+           INVALID,         UNDEF, o2(0xb2,0xe3), o2(0xe9,0xd2),
+     o2(0xe9,0xd3), o2(0xe9,0xce), o2(0xbb,0xbd), o2(0xe9,0xcf),
+     o2(0xc7,0xc2), o2(0xe9,0xd0), o2(0xe9,0xd1), o2(0xe9,0xdb),
+     o2(0xe9,0xd5), o2(0xe9,0xd8), o2(0xe9,0xd4),
+
+#define to_CP51932_E8_9A WORDINDEX2INFO(42436)
+    to_CP51932_E8_9A_offsets,
+    to_CP51932_E8_9A_infos,
+
+#define to_CP51932_E8_9B_infos WORDINDEX2INFO(42438)
+           INVALID,         UNDEF, o2(0xe9,0xd6), o2(0xe9,0xd7),
+     o2(0xbc,0xd8), o2(0xe9,0xd9), o2(0xc3,0xc1), o2(0xb7,0xd6),
+     o2(0xb3,0xc2), o2(0xe9,0xdc), o2(0xb3,0xbf), o2(0xe9,0xe1),
+     o2(0xe9,0xdd), o2(0xe9,0xe0), o2(0xc8,0xba), o2(0xe9,0xde),
+     o2(0xe9,0xdf), o2(0xc9,0xc8), o2(0xc8,0xda), o2(0xe9,0xe2),
+     o2(0xc2,0xfd), o2(0xe9,0xec), o2(0xe9,0xe8), o2(0xb2,0xeb),
+
+#define to_CP51932_E8_9B WORDINDEX2INFO(42462)
+    to_CP51932_E8_9B_offsets,
+    to_CP51932_E8_9B_infos,
+
+#define to_CP51932_E8_9C_infos WORDINDEX2INFO(42464)
+           INVALID, o2(0xe9,0xe6),         UNDEF, o2(0xcb,0xaa),
+     o2(0xe9,0xe7), o2(0xe9,0xe4), o2(0xe9,0xe5), o2(0xe9,0xea),
+     o2(0xe9,0xed), o2(0xe9,0xeb), o2(0xe9,0xe9), o2(0xe9,0xe3),
+     o2(0xc3,0xd8), o2(0xe9,0xf4), o2(0xcc,0xaa), o2(0xe9,0xf2),
+     o2(0xe9,0xf3), o2(0xe9,0xee), o2(0xe9,0xf0), o2(0xe9,0xf1),
+     o2(0xe9,0xef),
+
+#define to_CP51932_E8_9C WORDINDEX2INFO(42485)
+    to_CP51932_E8_9C_offsets,
+    to_CP51932_E8_9C_infos,
+
+#define to_CP51932_E8_9D_infos WORDINDEX2INFO(42487)
+           INVALID,         UNDEF, o2(0xc0,0xe6), o2(0xcf,0xb9),
+     o2(0xe9,0xf8), o2(0xe9,0xf9), o2(0xea,0xa1), o2(0xbf,0xaa),
+     o2(0xe9,0xfb), o2(0xe9,0xfe), o2(0xe9,0xf6), o2(0xe9,0xf5),
+     o2(0xea,0xa2), o2(0xb2,0xdc), o2(0xe9,0xfc), o2(0xea,0xa3),
+     o2(0xe9,0xfd), o2(0xe9,0xfa), o2(0xc4,0xb3), o2(0xe9,0xf7),
+     o2(0xc7,0xe8),
+
+#define to_CP51932_E8_9D WORDINDEX2INFO(42508)
+    to_CP51932_E8_9D_offsets,
+    to_CP51932_E8_9D_infos,
+
+#define to_CP51932_E8_9E_infos WORDINDEX2INFO(42510)
+           INVALID,         UNDEF, o2(0xea,0xa7), o2(0xcd,0xbb),
+     o2(0xea,0xa6), o2(0xea,0xa5), o2(0xea,0xae), o2(0xea,0xa8),
+     o2(0xea,0xb0), o2(0xcd,0xe6), o2(0xea,0xb3), o2(0xea,0xaa),
+
+#define to_CP51932_E8_9E WORDINDEX2INFO(42522)
+    to_CP51932_E8_9E_offsets,
+    to_CP51932_E8_9E_infos,
+
+#define to_CP51932_E8_9F_infos WORDINDEX2INFO(42524)
+           INVALID, o2(0xea,0xab),         UNDEF, o2(0xea,0xaf),
+     o2(0xea,0xb2), o2(0xea,0xb1), o2(0xea,0xa9), o2(0xea,0xac),
+     o2(0xea,0xbd), o2(0xea,0xb6), o2(0xea,0xb4), o2(0xea,0xb5),
+     o2(0xea,0xba), o2(0xea,0xbb), o2(0xb3,0xaa), o2(0xb5,0xc2),
+     o2(0xea,0xb9),
+
+#define to_CP51932_E8_9F WORDINDEX2INFO(42541)
+    to_CP51932_E8_9F_offsets,
+    to_CP51932_E8_9F_infos,
+
+#define to_CP51932_E8_A0_infos WORDINDEX2INFO(42543)
+           INVALID,         UNDEF, o2(0xea,0xa4), o2(0xfb,0xe5),
+     o2(0xea,0xb8), o2(0xea,0xbc), o2(0xea,0xb7), o2(0xea,0xbe),
+     o2(0xea,0xc0), o2(0xea,0xbf), o2(0xea,0xc2), o2(0xea,0xc1),
+     o2(0xe9,0xda), o2(0xea,0xc6), o2(0xea,0xc3), o2(0xea,0xc4),
+     o2(0xea,0xc5), o2(0xea,0xc7),
+
+#define to_CP51932_E8_A0 WORDINDEX2INFO(42561)
+    to_CP51932_E8_A0_offsets,
+    to_CP51932_E8_A0_infos,
+
+#define to_CP51932_E8_A1_infos WORDINDEX2INFO(42563)
+           INVALID, o2(0xb7,0xec),         UNDEF, o2(0xea,0xc9),
+     o2(0xea,0xc8), o2(0xbd,0xb0), o2(0xb9,0xd4), o2(0xde,0xa7),
+     o2(0xea,0xca), o2(0xbd,0xd1), o2(0xb3,0xb9), o2(0xea,0xcb),
+     o2(0xb1,0xd2), o2(0xbe,0xd7), o2(0xea,0xcc), o2(0xb9,0xd5),
+     o2(0xea,0xcd), o2(0xb0,0xe1), o2(0xc9,0xbd), o2(0xea,0xce),
+     o2(0xbf,0xea), o2(0xea,0xd5), o2(0xea,0xd2), o2(0xc3,0xef),
+     o2(0xea,0xd3), o2(0xea,0xd0), o2(0xb6,0xde),
+
+#define to_CP51932_E8_A1 WORDINDEX2INFO(42590)
+    to_CP51932_E8_A1_offsets,
+    to_CP51932_E8_A1_infos,
+
+#define to_CP51932_E8_A2_infos WORDINDEX2INFO(42592)
+           INVALID,         UNDEF, o2(0xea,0xcf), o2(0xea,0xd6),
+     o2(0xb7,0xb6), o2(0xc2,0xde), o2(0xea,0xdc), o2(0xea,0xd8),
+     o2(0xc2,0xb5), o2(0xea,0xd7), o2(0xea,0xda), o2(0xea,0xd1),
+     o2(0xea,0xdb), o2(0xea,0xdd), o2(0xc8,0xef), o2(0xea,0xd9),
+     o2(0xea,0xde), o2(0xea,0xe0), o2(0xb8,0xd3), o2(0xea,0xd4),
+     o2(0xb0,0xc1), o2(0xea,0xdf),
+
+#define to_CP51932_E8_A2 WORDINDEX2INFO(42614)
+    to_CP51932_E8_A2_offsets,
+    to_CP51932_E8_A2_infos,
+
+#define to_CP51932_E8_A3_infos WORDINDEX2INFO(42616)
+           INVALID,         UNDEF, o2(0xba,0xdb), o2(0xce,0xf6),
+     o2(0xea,0xe1), o2(0xea,0xe2), o2(0xc1,0xf5), o2(0xce,0xa2),
+     o2(0xea,0xe3), o2(0xcd,0xb5), o2(0xea,0xe4), o2(0xea,0xe5),
+     o2(0xca,0xe4), o2(0xea,0xe6), o2(0xba,0xc0), o2(0xce,0xa3),
+     o2(0xea,0xeb), o2(0xea,0xec), o2(0xbe,0xd8), o2(0xea,0xea),
+     o2(0xfb,0xe6), o2(0xcd,0xe7), o2(0xea,0xe7), o2(0xea,0xe9),
+     o2(0xc0,0xbd), o2(0xbf,0xfe),
+
+#define to_CP51932_E8_A3 WORDINDEX2INFO(42642)
+    to_CP51932_E8_A3_offsets,
+    to_CP51932_E8_A3_infos,
+
+#define to_CP51932_E8_A4_infos WORDINDEX2INFO(42644)
+           INVALID,         UNDEF, o2(0xea,0xe8), o2(0xea,0xed),
+     o2(0xca,0xa3), o2(0xea,0xef), o2(0xea,0xee), o2(0xb3,0xec),
+     o2(0xcb,0xab), o2(0xea,0xf0), o2(0xf9,0xa2), o2(0xea,0xfc),
+     o2(0xea,0xf2), o2(0xea,0xf3), o2(0xea,0xf4), o2(0xea,0xf5),
+     o2(0xea,0xf9), o2(0xea,0xfa), o2(0xea,0xf8),
+
+#define to_CP51932_E8_A4 WORDINDEX2INFO(42663)
+    to_CP51932_E8_A4_offsets,
+    to_CP51932_E8_A4_infos,
+
+#define to_CP51932_E8_A5_infos WORDINDEX2INFO(42665)
+           INVALID,         UNDEF, o2(0xea,0xf6), o2(0xea,0xf1),
+     o2(0xea,0xf7), o2(0xea,0xfb), o2(0xf0,0xb7), o2(0xb2,0xa8),
+     o2(0xea,0xfe), o2(0xb6,0xdf), o2(0xea,0xfd), o2(0xeb,0xa2),
+     o2(0xeb,0xa1), o2(0xeb,0xa4), o2(0xeb,0xa3), o2(0xeb,0xa5),
+     o2(0xbd,0xb1), o2(0xeb,0xa6), o2(0xeb,0xa7), o2(0xeb,0xa8),
+     o2(0xc0,0xbe),
+
+#define to_CP51932_E8_A5 WORDINDEX2INFO(42686)
+    to_CP51932_E8_A5_offsets,
+    to_CP51932_E8_A5_infos,
+
+#define to_CP51932_E8_A6_infos WORDINDEX2INFO(42688)
+           INVALID,         UNDEF, o2(0xcd,0xd7), o2(0xeb,0xa9),
+     o2(0xca,0xa4), o2(0xc7,0xc6), o2(0xeb,0xaa), o2(0xeb,0xab),
+     o2(0xb8,0xab), o2(0xb5,0xac), o2(0xeb,0xac), o2(0xbb,0xeb),
+     o2(0xc7,0xc1), o2(0xeb,0xad), o2(0xb3,0xd0), o2(0xeb,0xae),
+     o2(0xeb,0xb0), o2(0xcd,0xf7), o2(0xeb,0xaf), o2(0xbf,0xc6),
+     o2(0xeb,0xb1), o2(0xeb,0xb2), o2(0xeb,0xb3), o2(0xb4,0xd1),
+     o2(0xeb,0xb4), o2(0xeb,0xb5), o2(0xeb,0xb6),
+
+#define to_CP51932_E8_A6 WORDINDEX2INFO(42715)
+    to_CP51932_E8_A6_offsets,
+    to_CP51932_E8_A6_infos,
+
+#define to_CP51932_E8_A7_infos WORDINDEX2INFO(42717)
+           INVALID, o2(0xeb,0xb7),         UNDEF, o2(0xb3,0xd1),
+     o2(0xeb,0xb8), o2(0xeb,0xb9), o2(0xeb,0xba), o2(0xb2,0xf2),
+     o2(0xbf,0xa8), o2(0xeb,0xbb), o2(0xeb,0xbc), o2(0xeb,0xbd),
+
+#define to_CP51932_E8_A7 WORDINDEX2INFO(42729)
+    to_CP51932_E8_A7_offsets,
+    to_CP51932_E8_A7_infos,
+
+#define to_CP51932_E8_A8_infos WORDINDEX2INFO(42731)
+           INVALID, o2(0xb8,0xc0),         UNDEF, o2(0xc4,0xfb),
+     o2(0xeb,0xbe), o2(0xb7,0xd7), o2(0xbf,0xd6), o2(0xeb,0xc1),
+     o2(0xc6,0xa4), o2(0xeb,0xc0), o2(0xfb,0xe7), o2(0xb7,0xb1),
+     o2(0xeb,0xbf), o2(0xc2,0xf7), o2(0xb5,0xad), o2(0xeb,0xc2),
+     o2(0xeb,0xc3), o2(0xbe,0xd9), o2(0xb7,0xed), o2(0xeb,0xc4),
+     o2(0xcb,0xac), o2(0xc0,0xdf), o2(0xb5,0xf6), o2(0xcc,0xf5),
+     o2(0xc1,0xca), o2(0xeb,0xc5), o2(0xfb,0xe8), o2(0xbf,0xc7),
+     o2(0xc3,0xf0), o2(0xbe,0xda),
+
+#define to_CP51932_E8_A8 WORDINDEX2INFO(42761)
+    to_CP51932_E8_A8_offsets,
+    to_CP51932_E8_A8_infos,
+
+#define to_CP51932_E8_A9_infos WORDINDEX2INFO(42763)
+           INVALID,         UNDEF, o2(0xeb,0xc6), o2(0xeb,0xc9),
+     o2(0xeb,0xca), o2(0xba,0xbe), o2(0xc2,0xc2), o2(0xeb,0xc8),
+     o2(0xbe,0xdb), o2(0xc9,0xbe), o2(0xeb,0xc7), o2(0xbb,0xec),
+     o2(0xb1,0xd3), o2(0xeb,0xce), o2(0xb7,0xd8), o2(0xbb,0xee),
+     o2(0xbb,0xed), o2(0xcf,0xcd), o2(0xeb,0xcd), o2(0xeb,0xcc),
+     o2(0xc1,0xa7), o2(0xb5,0xcd), o2(0xcf,0xc3), o2(0xb3,0xba),
+     o2(0xbe,0xdc), o2(0xfb,0xe9), o2(0xeb,0xcb),
+
+#define to_CP51932_E8_A9 WORDINDEX2INFO(42790)
+    to_CP51932_E8_A9_offsets,
+    to_CP51932_E8_A9_infos,
+
+#define to_CP51932_E8_AA_infos WORDINDEX2INFO(42792)
+           INVALID,         UNDEF, o2(0xeb,0xd0), o2(0xeb,0xd1),
+     o2(0xeb,0xcf), o2(0xb8,0xd8), o2(0xcd,0xc0), o2(0xbb,0xef),
+     o2(0xc7,0xa7), o2(0xeb,0xd4), o2(0xc0,0xc0), o2(0xc3,0xc2),
+     o2(0xcd,0xb6), o2(0xeb,0xd7), o2(0xb8,0xec), o2(0xc0,0xbf),
+     o2(0xeb,0xd3), o2(0xeb,0xd8), o2(0xb8,0xed), o2(0xeb,0xd5),
+     o2(0xeb,0xd6), o2(0xfb,0xea), o2(0xeb,0xd2), o2(0xc0,0xe2),
+     o2(0xc6,0xc9), o2(0xc3,0xaf), o2(0xb2,0xdd), o2(0xc8,0xf0),
+     o2(0xb5,0xc3), o2(0xfb,0xeb), o2(0xc4,0xb4),
+
+#define to_CP51932_E8_AA WORDINDEX2INFO(42823)
+    to_CP51932_E8_AA_offsets,
+    to_CP51932_E8_AA_infos,
+
+#define to_CP51932_E8_AB_infos WORDINDEX2INFO(42825)
+           INVALID,         UNDEF, o2(0xeb,0xdb), o2(0xeb,0xd9),
+     o2(0xc3,0xcc), o2(0xc0,0xc1), o2(0xb4,0xd2), o2(0xeb,0xda),
+     o2(0xbf,0xdb), o2(0xce,0xca), o2(0xcf,0xc0), o2(0xeb,0xdc),
+     o2(0xeb,0xe7), o2(0xc4,0xb5), o2(0xeb,0xe6), o2(0xfb,0xec),
+     o2(0xeb,0xe3), o2(0xeb,0xeb), o2(0xeb,0xe4), o2(0xeb,0xe0),
+     o2(0xc4,0xfc), o2(0xeb,0xdf), o2(0xeb,0xdd), o2(0xcd,0xa1),
+     o2(0xbb,0xf0), o2(0xeb,0xe1), o2(0xeb,0xde), o2(0xfb,0xee),
+     o2(0xeb,0xe5), o2(0xbd,0xf4), o2(0xb8,0xc1), o2(0xc2,0xfa),
+
+#define to_CP51932_E8_AB WORDINDEX2INFO(42857)
+    to_CP51932_E8_AB_offsets,
+    to_CP51932_E8_AB_infos,
+
+#define to_CP51932_E8_AC_infos WORDINDEX2INFO(42859)
+           INVALID, o2(0xcb,0xc5), o2(0xb1,0xda), o2(0xb0,0xe2),
+             UNDEF, o2(0xc6,0xa5), o2(0xeb,0xe9), o2(0xeb,0xe8),
+     o2(0xc6,0xe6), o2(0xeb,0xed), o2(0xeb,0xe2), o2(0xeb,0xec),
+     o2(0xeb,0xee), o2(0xb8,0xac), o2(0xeb,0xea), o2(0xb9,0xd6),
+     o2(0xbc,0xd5), o2(0xeb,0xef), o2(0xcd,0xd8), o2(0xeb,0xf2),
+     o2(0xeb,0xf5), o2(0xeb,0xf3), o2(0xc9,0xb5), o2(0xeb,0xf0),
+     o2(0xb6,0xe0), o2(0xeb,0xf4),
+
+#define to_CP51932_E8_AC WORDINDEX2INFO(42885)
+    to_CP51932_E8_AC_offsets,
+    to_CP51932_E8_AC_infos,
+
+#define to_CP51932_E8_AD_infos WORDINDEX2INFO(42887)
+           INVALID,         UNDEF, o2(0xeb,0xf6), o2(0xeb,0xfa),
+     o2(0xeb,0xf7), o2(0xeb,0xf9), o2(0xeb,0xf8), o2(0xfb,0xef),
+     o2(0xeb,0xfb), o2(0xbc,0xb1), o2(0xeb,0xfd), o2(0xeb,0xfc),
+     o2(0xc9,0xe8), o2(0xec,0xa1), o2(0xb7,0xd9), o2(0xeb,0xfe),
+     o2(0xec,0xa2), o2(0xec,0xa3), o2(0xb5,0xc4), o2(0xe6,0xc1),
+     o2(0xbe,0xf9), o2(0xec,0xa4), o2(0xb8,0xee), o2(0xec,0xa5),
+     o2(0xfb,0xf0),
+
+#define to_CP51932_E8_AD WORDINDEX2INFO(42912)
+    to_CP51932_E8_AD_offsets,
+    to_CP51932_E8_AD_infos,
+
+#define to_CP51932_E8_AE_infos WORDINDEX2INFO(42914)
+           INVALID, o2(0xec,0xa6),         UNDEF, o2(0xbb,0xbe),
+     o2(0xda,0xce), o2(0xec,0xa7), o2(0xec,0xa8), o2(0xbd,0xb2),
+     o2(0xec,0xa9), o2(0xec,0xaa), o2(0xec,0xab), o2(0xec,0xac),
+     o2(0xec,0xad),
+
+#define to_CP51932_E8_AE WORDINDEX2INFO(42927)
+    to_CP51932_E8_AE_offsets,
+    to_CP51932_E8_AE_infos,
+
+#define to_CP51932_E8_B0_infos WORDINDEX2INFO(42929)
+           INVALID,         UNDEF, o2(0xc3,0xab), o2(0xec,0xae),
+     o2(0xec,0xb0),
+
+#define to_CP51932_E8_B0 WORDINDEX2INFO(42934)
+    to_CP51932_E8_B0_offsets,
+    to_CP51932_E8_B0_infos,
+
+#define to_CP51932_E8_B1_infos WORDINDEX2INFO(42936)
+           INVALID,         UNDEF, o2(0xec,0xaf), o2(0xc6,0xa6),
+     o2(0xec,0xb1), o2(0xcb,0xad), o2(0xec,0xb2), o2(0xec,0xb3),
+     o2(0xec,0xb4), o2(0xec,0xb5), o2(0xc6,0xda), o2(0xbe,0xdd),
+     o2(0xec,0xb6), o2(0xb9,0xeb), o2(0xd0,0xae), o2(0xec,0xb7),
+     o2(0xec,0xb8), o2(0xc9,0xbf), o2(0xec,0xb9), o2(0xec,0xc1),
+
+#define to_CP51932_E8_B1 WORDINDEX2INFO(42956)
+    to_CP51932_E8_B1_offsets,
+    to_CP51932_E8_B1_infos,
+
+#define to_CP51932_E8_B2_infos WORDINDEX2INFO(42958)
+           INVALID,         UNDEF, o2(0xec,0xba), o2(0xec,0xbc),
+     o2(0xec,0xbb), o2(0xec,0xbd), o2(0xcb,0xc6), o2(0xec,0xbe),
+     o2(0xec,0xbf), o2(0xec,0xc0), o2(0xec,0xc2), o2(0xb3,0xad),
+     o2(0xc4,0xe7), o2(0xc9,0xe9), o2(0xba,0xe2), o2(0xb9,0xd7),
+     o2(0xc9,0xcf), o2(0xb2,0xdf), o2(0xc8,0xce), o2(0xec,0xc5),
+     o2(0xb4,0xd3), o2(0xc0,0xd5), o2(0xec,0xc4), o2(0xec,0xc9),
+     o2(0xc3,0xf9), o2(0xcc,0xe3), o2(0xec,0xc7), o2(0xec,0xc8),
+     o2(0xb5,0xae), o2(0xec,0xca), o2(0xc7,0xe3), o2(0xc2,0xdf),
+     o2(0xc8,0xf1), o2(0xc5,0xbd), o2(0xec,0xc6), o2(0xcb,0xc7),
+
+#define to_CP51932_E8_B2 WORDINDEX2INFO(42994)
+    to_CP51932_E8_B2_offsets,
+    to_CP51932_E8_B2_infos,
+
+#define to_CP51932_E8_B3_infos WORDINDEX2INFO(42996)
+           INVALID, o2(0xb2,0xec), o2(0xec,0xcc), o2(0xcf,0xa8),
+     o2(0xc4,0xc2), o2(0xcf,0xc5),         UNDEF, o2(0xbb,0xf1),
+     o2(0xec,0xcb), o2(0xc2,0xb1), o2(0xec,0xdc), o2(0xc1,0xa8),
+     o2(0xc6,0xf8), o2(0xc9,0xd0), o2(0xec,0xcf), o2(0xbb,0xbf),
+     o2(0xbb,0xf2), o2(0xbe,0xde), o2(0xc7,0xe5), o2(0xb8,0xad),
+     o2(0xec,0xce), o2(0xec,0xcd), o2(0xc9,0xea), o2(0xbc,0xc1),
+     o2(0xc5,0xd2), o2(0xfb,0xf1), o2(0xfb,0xf2), o2(0xec,0xd1),
+     o2(0xec,0xd2), o2(0xb9,0xd8), o2(0xec,0xd0),
+
+#define to_CP51932_E8_B3 WORDINDEX2INFO(43027)
+    to_CP51932_E8_B3_offsets,
+    to_CP51932_E8_B3_infos,
+
+#define to_CP51932_E8_B4_infos WORDINDEX2INFO(43029)
+           INVALID,         UNDEF, o2(0xec,0xd3), o2(0xec,0xd4),
+     o2(0xec,0xd6), o2(0xc2,0xa3), o2(0xec,0xd5), o2(0xb4,0xe6),
+     o2(0xec,0xd8), o2(0xec,0xd7), o2(0xec,0xd9), o2(0xfb,0xf3),
+     o2(0xec,0xdb), o2(0xec,0xdd), o2(0xec,0xde),
+
+#define to_CP51932_E8_B4 WORDINDEX2INFO(43044)
+    to_CP51932_E8_B4_offsets,
+    to_CP51932_E8_B4_infos,
+
+#define to_CP51932_E8_B5_infos WORDINDEX2INFO(43046)
+           INVALID,         UNDEF, o2(0xc0,0xd6), o2(0xbc,0xcf),
+     o2(0xec,0xdf), o2(0xb3,0xd2), o2(0xec,0xe0), o2(0xc1,0xf6),
+     o2(0xec,0xe1), o2(0xec,0xe2), o2(0xc9,0xeb), o2(0xfb,0xf4),
+     o2(0xb5,0xaf),
+
+#define to_CP51932_E8_B5 WORDINDEX2INFO(43059)
+    to_CP51932_E8_B5_offsets,
+    to_CP51932_E8_B5_infos,
+
+#define to_CP51932_E8_B6_infos WORDINDEX2INFO(43061)
+           INVALID,         UNDEF, o2(0xec,0xe3), o2(0xc4,0xb6),
+     o2(0xb1,0xdb), o2(0xec,0xe4), o2(0xbc,0xf1), o2(0xbf,0xf6),
+     o2(0xc2,0xad), o2(0xec,0xe7), o2(0xec,0xe6),
+
+#define to_CP51932_E8_B6 WORDINDEX2INFO(43072)
+    to_CP51932_E8_B6_offsets,
+    to_CP51932_E8_B6_infos,
+
+#define to_CP51932_E8_B7_infos WORDINDEX2INFO(43074)
+           INVALID,         UNDEF, o2(0xec,0xe5), o2(0xec,0xed),
+     o2(0xec,0xeb), o2(0xec,0xe8), o2(0xec,0xea), o2(0xec,0xe9),
+     o2(0xec,0xec), o2(0xb5,0xf7), o2(0xec,0xf0), o2(0xc0,0xd7),
+     o2(0xec,0xf1), o2(0xb8,0xd9), o2(0xec,0xee), o2(0xec,0xef),
+     o2(0xcf,0xa9), o2(0xc4,0xb7), o2(0xc1,0xa9), o2(0xec,0xf2),
+     o2(0xec,0xf5),
+
+#define to_CP51932_E8_B7 WORDINDEX2INFO(43095)
+    to_CP51932_E8_B7_offsets,
+    to_CP51932_E8_B7_infos,
+
+#define to_CP51932_E8_B8_infos WORDINDEX2INFO(43097)
+           INVALID,         UNDEF, o2(0xec,0xf3), o2(0xec,0xf4),
+     o2(0xcd,0xd9), o2(0xc6,0xa7), o2(0xec,0xf8), o2(0xec,0xf6),
+     o2(0xec,0xf7), o2(0xec,0xf9), o2(0xed,0xa9), o2(0xec,0xfc),
+     o2(0xec,0xfd), o2(0xec,0xfb),
+
+#define to_CP51932_E8_B8 WORDINDEX2INFO(43111)
+    to_CP51932_E8_B8_offsets,
+    to_CP51932_E8_B8_infos,
+
+#define to_CP51932_E8_B9_infos WORDINDEX2INFO(43113)
+           INVALID,         UNDEF, o2(0xec,0xfa), o2(0xc4,0xfd),
+     o2(0xed,0xa1), o2(0xed,0xa5), o2(0xed,0xa2), o2(0xec,0xfe),
+     o2(0xed,0xa3), o2(0xed,0xa4), o2(0xed,0xab), o2(0xed,0xa6),
+     o2(0xc0,0xd8), o2(0xed,0xa8), o2(0xed,0xaa), o2(0xed,0xa7),
+     o2(0xed,0xad), o2(0xbd,0xb3), o2(0xed,0xac), o2(0xed,0xae),
+
+#define to_CP51932_E8_B9 WORDINDEX2INFO(43133)
+    to_CP51932_E8_B9_offsets,
+    to_CP51932_E8_B9_infos,
+
+#define to_CP51932_E8_BA_infos WORDINDEX2INFO(43135)
+           INVALID,         UNDEF, o2(0xed,0xaf), o2(0xed,0xb2),
+     o2(0xed,0xb1), o2(0xed,0xb0), o2(0xed,0xb4), o2(0xed,0xb3),
+     o2(0xcc,0xf6), o2(0xed,0xb6), o2(0xed,0xb5), o2(0xed,0xb7),
+     o2(0xed,0xb8), o2(0xed,0xba), o2(0xed,0xb9), o2(0xbf,0xc8),
+     o2(0xed,0xbb), o2(0xb6,0xed), o2(0xed,0xbc), o2(0xed,0xbe),
+     o2(0xed,0xbf),
+
+#define to_CP51932_E8_BA WORDINDEX2INFO(43156)
+    to_CP51932_E8_BA_offsets,
+    to_CP51932_E8_BA_infos,
+
+#define to_CP51932_E8_BB_infos WORDINDEX2INFO(43158)
+           INVALID,         UNDEF, o2(0xed,0xc0), o2(0xed,0xbd),
+     o2(0xed,0xc1), o2(0xbc,0xd6), o2(0xed,0xc2), o2(0xb5,0xb0),
+     o2(0xb7,0xb3), o2(0xfb,0xf6), o2(0xb8,0xae), o2(0xed,0xc3),
+     o2(0xc6,0xf0), o2(0xc5,0xbe), o2(0xed,0xc4), o2(0xed,0xc7),
+     o2(0xbc,0xb4), o2(0xed,0xc6), o2(0xed,0xc5), o2(0xb7,0xda),
+     o2(0xed,0xc8),
+
+#define to_CP51932_E8_BB WORDINDEX2INFO(43179)
+    to_CP51932_E8_BB_offsets,
+    to_CP51932_E8_BB_infos,
+
+#define to_CP51932_E8_BC_infos WORDINDEX2INFO(43181)
+           INVALID,         UNDEF, o2(0xb3,0xd3), o2(0xed,0xca),
+     o2(0xba,0xdc), o2(0xed,0xc9), o2(0xed,0xd2), o2(0xed,0xcc),
+     o2(0xed,0xce), o2(0xca,0xe5), o2(0xed,0xcb), o2(0xed,0xcd),
+     o2(0xed,0xd1), o2(0xed,0xcf), o2(0xb5,0xb1), o2(0xed,0xd0),
+     o2(0xed,0xd3), o2(0xc7,0xda), o2(0xce,0xd8), o2(0xbd,0xb4),
+     o2(0xed,0xd4), o2(0xcd,0xa2), o2(0xed,0xd6), o2(0xed,0xd5),
+     o2(0xed,0xd9), o2(0xcd,0xc1),
+
+#define to_CP51932_E8_BC WORDINDEX2INFO(43207)
+    to_CP51932_E8_BC_offsets,
+    to_CP51932_E8_BC_infos,
+
+#define to_CP51932_E8_BD_infos WORDINDEX2INFO(43209)
+           INVALID,         UNDEF, o2(0xed,0xd8), o2(0xb3,0xed),
+     o2(0xed,0xd7), o2(0xed,0xdc), o2(0xed,0xdb), o2(0xed,0xda),
+     o2(0xc5,0xb2), o2(0xed,0xdd), o2(0xed,0xde), o2(0xed,0xdf),
+     o2(0xb9,0xec), o2(0xb7,0xa5), o2(0xed,0xe0), o2(0xed,0xe1),
+     o2(0xed,0xe2),
+
+#define to_CP51932_E8_BD WORDINDEX2INFO(43226)
+    to_CP51932_E8_BD_offsets,
+    to_CP51932_E8_BD_infos,
+
+#define to_CP51932_E8_BE_infos WORDINDEX2INFO(43228)
+           INVALID,         UNDEF, o2(0xbf,0xc9), o2(0xed,0xe3),
+     o2(0xbc,0xad), o2(0xed,0xe4), o2(0xed,0xe5), o2(0xd2,0xa1),
+     o2(0xd1,0xfe), o2(0xed,0xe6), o2(0xe5,0xf0), o2(0xed,0xe7),
+     o2(0xc3,0xa4), o2(0xbf,0xab), o2(0xc7,0xc0), o2(0xed,0xe8),
+     o2(0xca,0xd5), o2(0xc4,0xd4), o2(0xb9,0xfe), o2(0xc3,0xa9),
+
+#define to_CP51932_E8_BE WORDINDEX2INFO(43248)
+    to_CP51932_E8_BE_offsets,
+    to_CP51932_E8_BE_infos,
+
+#define to_CP51932_E8_BF_infos WORDINDEX2INFO(43250)
+           INVALID,         UNDEF, o2(0xb1,0xaa), o2(0xcb,0xf8),
+     o2(0xbf,0xd7), o2(0xb7,0xde), o2(0xb6,0xe1), o2(0xca,0xd6),
+     o2(0xed,0xe9), o2(0xed,0xeb), o2(0xed,0xea), o2(0xb2,0xe0),
+     o2(0xc6,0xf6), o2(0xed,0xec), o2(0xc7,0xf7), o2(0xc5,0xb3),
+     o2(0xed,0xed), o2(0xbd,0xd2), o2(0xed,0xef), o2(0xcc,0xc2),
+     o2(0xed,0xfe), o2(0xed,0xf1), o2(0xed,0xf2), o2(0xc4,0xc9),
+
+#define to_CP51932_E8_BF WORDINDEX2INFO(43274)
+    to_CP51932_E8_BF_offsets,
+    to_CP51932_E8_BF_infos,
+
+#define to_CP51932_E8_infos WORDINDEX2INFO(43276)
+              INVALID, to_CP51932_E8_80, to_CP51932_E8_81, to_CP51932_E8_82,
+     to_CP51932_E8_83, to_CP51932_E8_84, to_CP51932_E8_85, to_CP51932_E8_86,
+     to_CP51932_E8_87, to_CP51932_E8_88, to_CP51932_E8_89, to_CP51932_E8_8A,
+     to_CP51932_E8_8B, to_CP51932_E8_8C, to_CP51932_E8_8D, to_CP51932_E8_8E,
+     to_CP51932_E8_8F, to_CP51932_E8_90, to_CP51932_E8_91, to_CP51932_E8_92,
+     to_CP51932_E8_93, to_CP51932_E8_94, to_CP51932_E8_95, to_CP51932_E8_96,
+     to_CP51932_E8_97, to_CP51932_E8_98, to_CP51932_E8_99, to_CP51932_E8_9A,
+     to_CP51932_E8_9B, to_CP51932_E8_9C, to_CP51932_E8_9D, to_CP51932_E8_9E,
+     to_CP51932_E8_9F, to_CP51932_E8_A0, to_CP51932_E8_A1, to_CP51932_E8_A2,
+     to_CP51932_E8_A3, to_CP51932_E8_A4, to_CP51932_E8_A5, to_CP51932_E8_A6,
+     to_CP51932_E8_A7, to_CP51932_E8_A8, to_CP51932_E8_A9, to_CP51932_E8_AA,
+     to_CP51932_E8_AB, to_CP51932_E8_AC, to_CP51932_E8_AD, to_CP51932_E8_AE,
+         to_EUC_JP_C6, to_CP51932_E8_B0, to_CP51932_E8_B1, to_CP51932_E8_B2,
+     to_CP51932_E8_B3, to_CP51932_E8_B4, to_CP51932_E8_B5, to_CP51932_E8_B6,
+     to_CP51932_E8_B7, to_CP51932_E8_B8, to_CP51932_E8_B9, to_CP51932_E8_BA,
+     to_CP51932_E8_BB, to_CP51932_E8_BC, to_CP51932_E8_BD, to_CP51932_E8_BE,
+     to_CP51932_E8_BF,
+
+#define to_CP51932_E8 WORDINDEX2INFO(43341)
+    to_EUC_JP_C3_offsets,
+    to_CP51932_E8_infos,
+
+#define to_CP51932_E9_80_infos WORDINDEX2INFO(43343)
+           INVALID, o2(0xc2,0xe0), o2(0xc1,0xf7),         UNDEF,
+     o2(0xc6,0xa8), o2(0xed,0xf0), o2(0xb5,0xd5), o2(0xed,0xf9),
+     o2(0xed,0xf6), o2(0xee,0xa5), o2(0xc6,0xa9), o2(0xc3,0xe0),
+     o2(0xed,0xf3), o2(0xc4,0xfe), o2(0xc5,0xd3), o2(0xed,0xf4),
+     o2(0xed,0xf8), o2(0xbf,0xe0), o2(0xc7,0xe7), o2(0xc4,0xcc),
+     o2(0xc0,0xc2), o2(0xed,0xf7), o2(0xc2,0xae), o2(0xc2,0xa4),
+     o2(0xed,0xf5), o2(0xb0,0xa9), o2(0xcf,0xa2), o2(0xed,0xfa),
+     o2(0xc2,0xe1), o2(0xbd,0xb5), o2(0xbf,0xca), o2(0xed,0xfc),
+     o2(0xed,0xfb), o2(0xb0,0xef), o2(0xed,0xfd), o2(0xc9,0xaf),
+     o2(0xee,0xa7),
+
+#define to_CP51932_E9_80 WORDINDEX2INFO(43380)
+    to_CP51932_E9_80_offsets,
+    to_CP51932_E9_80_infos,
+
+#define to_CP51932_E9_81_infos WORDINDEX2INFO(43382)
+           INVALID,         UNDEF, o2(0xc6,0xdb), o2(0xbf,0xeb),
+     o2(0xc3,0xd9), o2(0xb6,0xf8), o2(0xee,0xa6), o2(0xcd,0xb7),
+     o2(0xb1,0xbf), o2(0xca,0xd7), o2(0xb2,0xe1), o2(0xee,0xa1),
+     o2(0xee,0xa2), o2(0xee,0xa3), o2(0xee,0xa4), o2(0xc6,0xbb),
+     o2(0xc3,0xa3), o2(0xb0,0xe3), o2(0xee,0xa8), o2(0xee,0xa9),
+     o2(0xf4,0xa3), o2(0xc2,0xbd), o2(0xee,0xaa), o2(0xb1,0xf3),
+     o2(0xc1,0xcc), o2(0xb8,0xaf), o2(0xcd,0xda), o2(0xfb,0xf9),
+     o2(0xee,0xab), o2(0xc5,0xac), o2(0xc1,0xf8), o2(0xbc,0xd7),
+     o2(0xee,0xac), o2(0xee,0xaf), o2(0xbd,0xe5), o2(0xee,0xad),
+     o2(0xc1,0xab), o2(0xc1,0xaa), o2(0xb0,0xe4), o2(0xce,0xcb),
+     o2(0xee,0xb1), o2(0xc8,0xf2),
+
+#define to_CP51932_E9_81 WORDINDEX2INFO(43424)
+    to_CP51932_E9_81_offsets,
+    to_CP51932_E9_81_infos,
+
+#define to_CP51932_E9_82_infos WORDINDEX2INFO(43426)
+           INVALID, o2(0xee,0xb3), o2(0xee,0xb2), o2(0xee,0xb0),
+     o2(0xe3,0xe4), o2(0xb4,0xd4),         UNDEF, o2(0xed,0xee),
+     o2(0xee,0xb5), o2(0xee,0xb4), o2(0xee,0xb6), o2(0xcd,0xb8),
+     o2(0xc6,0xe1), o2(0xcb,0xae), o2(0xee,0xb7), o2(0xbc,0xd9),
+     o2(0xee,0xb8), o2(0xee,0xb9), o2(0xee,0xba), o2(0xc5,0xa1),
+
+#define to_CP51932_E9_82 WORDINDEX2INFO(43446)
+    to_CP51932_E9_82_offsets,
+    to_CP51932_E9_82_infos,
+
+#define to_CP51932_E9_83_infos WORDINDEX2INFO(43448)
+           INVALID,         UNDEF, o2(0xb0,0xea), o2(0xb9,0xd9),
+     o2(0xcf,0xba), o2(0xee,0xbe), o2(0xfb,0xfa), o2(0xb7,0xb4),
+     o2(0xee,0xbb), o2(0xee,0xbc), o2(0xc9,0xf4), o2(0xb3,0xd4),
+     o2(0xcd,0xb9), o2(0xb6,0xbf), o2(0xc5,0xd4),
+
+#define to_CP51932_E9_83 WORDINDEX2INFO(43463)
+    to_CP51932_E9_83_offsets,
+    to_CP51932_E9_83_infos,
+
+#define to_CP51932_E9_84_infos WORDINDEX2INFO(43465)
+           INVALID,         UNDEF, o2(0xee,0xbf), o2(0xee,0xc0),
+     o2(0xfb,0xfc), o2(0xee,0xc1), o2(0xfb,0xfd), o2(0xc5,0xa2),
+     o2(0xee,0xc3), o2(0xee,0xc2),
+
+#define to_CP51932_E9_84 WORDINDEX2INFO(43475)
+    to_CP51932_E9_84_offsets,
+    to_CP51932_E9_84_infos,
+
+#define to_CP51932_E9_85_infos WORDINDEX2INFO(43477)
+           INVALID,         UNDEF, o2(0xc6,0xd3), o2(0xee,0xc4),
+     o2(0xbd,0xb6), o2(0xbc,0xe0), o2(0xc7,0xdb), o2(0xc3,0xf1),
+     o2(0xbc,0xf2), o2(0xbf,0xec), o2(0xee,0xc5), o2(0xee,0xc6),
+     o2(0xbf,0xdd), o2(0xee,0xc7), o2(0xee,0xc8), o2(0xee,0xc9),
+     o2(0xcd,0xef), o2(0xbd,0xb7), o2(0xee,0xcb), o2(0xee,0xca),
+     o2(0xb9,0xda), o2(0xb9,0xf3), o2(0xbb,0xc0),
+
+#define to_CP51932_E9_85 WORDINDEX2INFO(43500)
+    to_CP51932_E9_85_offsets,
+    to_CP51932_E9_85_infos,
+
+#define to_CP51932_E9_86_infos WORDINDEX2INFO(43502)
+           INVALID,         UNDEF, o2(0xee,0xce), o2(0xbd,0xe6),
+     o2(0xee,0xcd), o2(0xee,0xcc), o2(0xc2,0xe9), o2(0xb8,0xef),
+     o2(0xc0,0xc3), o2(0xc8,0xb0), o2(0xbd,0xb9), o2(0xee,0xcf),
+     o2(0xbe,0xdf), o2(0xee,0xd2), o2(0xee,0xd0), o2(0xee,0xd1),
+     o2(0xee,0xd4), o2(0xee,0xd3), o2(0xbe,0xfa), o2(0xee,0xd5),
+
+#define to_CP51932_E9_86 WORDINDEX2INFO(43522)
+    to_CP51932_E9_86_offsets,
+    to_CP51932_E9_86_infos,
+
+#define to_CP51932_E9_87_infos WORDINDEX2INFO(43524)
+           INVALID, o2(0xee,0xd6), o2(0xee,0xd7),         UNDEF,
+     o2(0xc8,0xd0), o2(0xba,0xd3), o2(0xbc,0xe1), o2(0xee,0xd8),
+     o2(0xee,0xd9), o2(0xce,0xa4), o2(0xbd,0xc5), o2(0xcc,0xee),
+     o2(0xce,0xcc), o2(0xee,0xda), o2(0xb6,0xe2), o2(0xee,0xdb),
+     o2(0xfc,0xa1), o2(0xc5,0xa3), o2(0xfb,0xfe), o2(0xee,0xde),
+     o2(0xb3,0xf8), o2(0xbf,0xcb), o2(0xfc,0xa2), o2(0xee,0xdc),
+     o2(0xee,0xdd), o2(0xc4,0xe0), o2(0xfc,0xa5), o2(0xfc,0xa6),
+     o2(0xcb,0xd5), o2(0xb6,0xfc), o2(0xfc,0xa3), o2(0xfc,0xa4),
+     o2(0xee,0xe0), o2(0xee,0xe1), o2(0xee,0xdf), o2(0xee,0xe3),
+
+#define to_CP51932_E9_87 WORDINDEX2INFO(43560)
+    to_CP51932_E9_87_offsets,
+    to_CP51932_E9_87_infos,
+
+#define to_CP51932_E9_88_infos WORDINDEX2INFO(43562)
+           INVALID,         UNDEF, o2(0xfc,0xa7), o2(0xfc,0xa9),
+     o2(0xc6,0xdf), o2(0xb3,0xc3), o2(0xfc,0xa8), o2(0xee,0xe7),
+     o2(0xee,0xe4), o2(0xee,0xe6), o2(0xee,0xe2), o2(0xef,0xcf),
+     o2(0xee,0xe5), o2(0xce,0xeb), o2(0xb8,0xda), o2(0xfc,0xb0),
+     o2(0xfc,0xaa), o2(0xfc,0xac), o2(0xee,0xef),
+
+#define to_CP51932_E9_88 WORDINDEX2INFO(43581)
+    to_CP51932_E9_88_offsets,
+    to_CP51932_E9_88_infos,
+
+#define to_CP51932_E9_89_infos WORDINDEX2INFO(43583)
+           INVALID, o2(0xfc,0xab),         UNDEF, o2(0xc5,0xb4),
+     o2(0xee,0xea), o2(0xee,0xed), o2(0xee,0xeb), o2(0xee,0xf0),
+     o2(0xfc,0xad), o2(0xee,0xf1), o2(0xfc,0xaf), o2(0xee,0xe9),
+     o2(0xfc,0xae), o2(0xee,0xf6), o2(0xb1,0xf4), o2(0xee,0xe8),
+     o2(0xc8,0xad), o2(0xee,0xec), o2(0xbe,0xe0), o2(0xfc,0xb1),
+     o2(0xb9,0xdb), o2(0xfc,0xb3), o2(0xfc,0xb4), o2(0xcb,0xc8),
+
+#define to_CP51932_E9_89 WORDINDEX2INFO(43607)
+    to_CP51932_E9_89_offsets,
+    to_CP51932_E9_89_infos,
+
+#define to_CP51932_E9_8A_infos WORDINDEX2INFO(43609)
+           INVALID, o2(0xb6,0xe4),         UNDEF, o2(0xbd,0xc6),
+     o2(0xc6,0xbc), o2(0xf9,0xa4), o2(0xc1,0xad), o2(0xee,0xf4),
+     o2(0xee,0xee), o2(0xee,0xf3), o2(0xcc,0xc3), o2(0xc4,0xb8),
+     o2(0xee,0xf5), o2(0xee,0xf2), o2(0xfc,0xb2), o2(0xc1,0xac),
+     o2(0xee,0xf9), o2(0xee,0xf8),
+
+#define to_CP51932_E9_8A WORDINDEX2INFO(43627)
+    to_CP51932_E9_8A_offsets,
+    to_CP51932_E9_8A_infos,
+
+#define to_CP51932_E9_8B_infos WORDINDEX2INFO(43629)
+           INVALID,         UNDEF, o2(0xee,0xf7), o2(0xfc,0xb8),
+     o2(0xcb,0xaf), o2(0xfc,0xbc), o2(0xfc,0xba), o2(0xfc,0xb6),
+     o2(0xfc,0xb7), o2(0xfc,0xbb), o2(0xbd,0xfb), o2(0xfc,0xb5),
+     o2(0xee,0xfa), o2(0xca,0xdf), o2(0xb1,0xd4), o2(0xc9,0xc6),
+     o2(0xc3,0xf2), o2(0xb5,0xf8), o2(0xf9,0xaa), o2(0xee,0xfc),
+     o2(0xfc,0xbf), o2(0xb9,0xdd), o2(0xfc,0xc2),
+
+#define to_CP51932_E9_8B WORDINDEX2INFO(43652)
+    to_CP51932_E9_8B_offsets,
+    to_CP51932_E9_8B_infos,
+
+#define to_CP51932_E9_8C_infos WORDINDEX2INFO(43654)
+           INVALID,         UNDEF, o2(0xfc,0xc4), o2(0xbb,0xac),
+     o2(0xee,0xfb), o2(0xbf,0xed), o2(0xbf,0xee), o2(0xef,0xa1),
+     o2(0xef,0xa3), o2(0xfc,0xc3), o2(0xfc,0xc1), o2(0xbe,0xfb),
+     o2(0xfc,0xbe), o2(0xef,0xa2), o2(0xef,0xa4), o2(0xfc,0xbd),
+     o2(0xb6,0xd3), o2(0xc9,0xc5), o2(0xbc,0xe2), o2(0xcf,0xa3),
+     o2(0xee,0xfe), o2(0xba,0xf8), o2(0xcf,0xbf), o2(0xef,0xa6),
+     o2(0xef,0xa5), o2(0xef,0xa7),
+
+#define to_CP51932_E9_8C WORDINDEX2INFO(43680)
+    to_CP51932_E9_8C_offsets,
+    to_CP51932_E9_8C_infos,
+
+#define to_CP51932_E9_8D_infos WORDINDEX2INFO(43682)
+           INVALID,         UNDEF, o2(0xee,0xfd), o2(0xf9,0xa3),
+     o2(0xc6,0xe9), o2(0xc5,0xd5), o2(0xc4,0xd7), o2(0xef,0xac),
+     o2(0xfc,0xc6), o2(0xc3,0xc3), o2(0xef,0xa8), o2(0xef,0xa9),
+     o2(0xb7,0xad), o2(0xef,0xab), o2(0xfc,0xc5), o2(0xb8,0xb0),
+     o2(0xef,0xaa), o2(0xbe,0xe1),
+
+#define to_CP51932_E9_8D WORDINDEX2INFO(43700)
+    to_CP51932_E9_8D_offsets,
+    to_CP51932_E9_8D_infos,
+
+#define to_CP51932_E9_8E_infos WORDINDEX2INFO(43702)
+           INVALID,         UNDEF, o2(0xb3,0xf9), o2(0xef,0xb0),
+     o2(0xba,0xbf), o2(0xc1,0xf9), o2(0xc4,0xca), o2(0xfc,0xc7),
+     o2(0xb3,0xbb), o2(0xef,0xae), o2(0xef,0xaf), o2(0xc4,0xc3),
+     o2(0xef,0xad), o2(0xef,0xb1),
+
+#define to_CP51932_E9_8E WORDINDEX2INFO(43716)
+    to_CP51932_E9_8E_offsets,
+    to_CP51932_E9_8E_infos,
+
+#define to_CP51932_E9_8F_infos WORDINDEX2INFO(43718)
+           INVALID,         UNDEF, o2(0xef,0xb7), o2(0xfc,0xc8),
+     o2(0xef,0xba), o2(0xef,0xb9), o2(0xc5,0xad), o2(0xef,0xb2),
+     o2(0xef,0xb3), o2(0xef,0xb6), o2(0xef,0xb8), o2(0xfc,0xc9),
+     o2(0xb6,0xc0), o2(0xef,0xbb), o2(0xef,0xb5), o2(0xef,0xb4),
+     o2(0xfc,0xca),
+
+#define to_CP51932_E9_8F WORDINDEX2INFO(43735)
+    to_CP51932_E9_8F_offsets,
+    to_CP51932_E9_8F_infos,
+
+#define to_CP51932_E9_90_infos WORDINDEX2INFO(43737)
+           INVALID,         UNDEF, o2(0xef,0xbf), o2(0xef,0xc0),
+     o2(0xef,0xc1), o2(0xef,0xbe), o2(0xef,0xbd), o2(0xbe,0xe2),
+     o2(0xc6,0xaa), o2(0xef,0xbc), o2(0xef,0xc5), o2(0xef,0xc3),
+     o2(0xfc,0xcb), o2(0xef,0xc4), o2(0xef,0xc2), o2(0xc2,0xf8),
+     o2(0xef,0xc6),
+
+#define to_CP51932_E9_90 WORDINDEX2INFO(43754)
+    to_CP51932_E9_90_offsets,
+    to_CP51932_E9_90_infos,
+
+#define to_CP51932_E9_91_infos WORDINDEX2INFO(43756)
+           INVALID,         UNDEF, o2(0xef,0xc7), o2(0xef,0xc9),
+     o2(0xfc,0xcc), o2(0xfc,0xcd), o2(0xb4,0xd5), o2(0xef,0xc8),
+     o2(0xcc,0xfa), o2(0xef,0xd4), o2(0xef,0xca), o2(0xef,0xcd),
+     o2(0xef,0xcb), o2(0xef,0xcc), o2(0xef,0xce), o2(0xef,0xd0),
+     o2(0xef,0xd1), o2(0xef,0xd2), o2(0xef,0xd5), o2(0xef,0xd3),
+     o2(0xef,0xd6), o2(0xef,0xd8),
+
+#define to_CP51932_E9_91 WORDINDEX2INFO(43778)
+    to_CP51932_E9_91_offsets,
+    to_CP51932_E9_91_infos,
+
+#define to_CP51932_E9_92_infos WORDINDEX2INFO(43780)
+           INVALID,         UNDEF, o2(0xef,0xd7),
+
+#define to_CP51932_E9_92 WORDINDEX2INFO(43783)
+    to_CP51932_E9_92_offsets,
+    to_CP51932_E9_92_infos,
+
+#define to_CP51932_E9_95_infos WORDINDEX2INFO(43785)
+           INVALID,         UNDEF, o2(0xc4,0xb9),
+
+#define to_CP51932_E9_95 WORDINDEX2INFO(43788)
+    to_CP51932_E9_95_offsets,
+    to_CP51932_E9_95_infos,
+
+#define to_CP51932_E9_96_infos WORDINDEX2INFO(43790)
+           INVALID, o2(0xcc,0xe7),         UNDEF, o2(0xef,0xd9),
+     o2(0xc1,0xae), o2(0xef,0xda), o2(0xca,0xc4), o2(0xef,0xdb),
+     o2(0xb3,0xab), o2(0xb1,0xbc), o2(0xb4,0xd7), o2(0xfc,0xce),
+     o2(0xb4,0xd6), o2(0xef,0xdc), o2(0xef,0xdd), o2(0xef,0xde),
+     o2(0xef,0xdf), o2(0xef,0xe0), o2(0xb4,0xd8), o2(0xb3,0xd5),
+     o2(0xb9,0xde), o2(0xc8,0xb6), o2(0xef,0xe2), o2(0xef,0xe1),
+     o2(0xef,0xe3), o2(0xb1,0xdc), o2(0xef,0xe6), o2(0xef,0xe5),
+     o2(0xef,0xe4), o2(0xef,0xe7),
+
+#define to_CP51932_E9_96 WORDINDEX2INFO(43820)
+    to_CP51932_E9_96_offsets,
+    to_CP51932_E9_96_infos,
+
+#define to_CP51932_E9_97_infos WORDINDEX2INFO(43822)
+           INVALID,         UNDEF, o2(0xef,0xea), o2(0xb0,0xc7),
+     o2(0xef,0xe8), o2(0xef,0xec), o2(0xef,0xeb), o2(0xef,0xee),
+     o2(0xef,0xed), o2(0xef,0xef), o2(0xc6,0xae), o2(0xef,0xf0),
+     o2(0xef,0xf1), o2(0xef,0xf3), o2(0xef,0xf2),
+
+#define to_CP51932_E9_97 WORDINDEX2INFO(43837)
+    to_CP51932_E9_97_offsets,
+    to_CP51932_E9_97_infos,
+
+#define to_CP51932_E9_98_infos WORDINDEX2INFO(43839)
+           INVALID,         UNDEF, o2(0xc9,0xec), o2(0xef,0xf4),
+     o2(0xef,0xf5), o2(0xba,0xe5), o2(0xef,0xf6), o2(0xef,0xf7),
+     o2(0xcb,0xc9), o2(0xc1,0xcb), o2(0xb0,0xa4),
+
+#define to_CP51932_E9_98 WORDINDEX2INFO(43850)
+    to_CP51932_E9_98_offsets,
+    to_CP51932_E9_98_infos,
+
+#define to_CP51932_E9_99_infos WORDINDEX2INFO(43852)
+           INVALID, o2(0xc2,0xcb),         UNDEF, o2(0xef,0xf8),
+     o2(0xc9,0xed), o2(0xef,0xfb), o2(0xef,0xf9), o2(0xb9,0xdf),
+     o2(0xef,0xfa), o2(0xb8,0xc2), o2(0xca,0xc5), o2(0xef,0xfd),
+     o2(0xf0,0xa1), o2(0xef,0xfe), o2(0xf0,0xa2), o2(0xb1,0xa1),
+     o2(0xbf,0xd8), o2(0xbd,0xfc), o2(0xb4,0xd9), o2(0xf0,0xa3),
+     o2(0xc7,0xe6), o2(0xf0,0xa5), o2(0xb1,0xa2), o2(0xf0,0xa4),
+     o2(0xc4,0xc4), o2(0xce,0xcd), o2(0xc6,0xab), o2(0xef,0xfc),
+     o2(0xce,0xa6), o2(0xb8,0xb1), o2(0xcd,0xdb),
+
+#define to_CP51932_E9_99 WORDINDEX2INFO(43883)
+    to_CP51932_E9_99_offsets,
+    to_CP51932_E9_99_infos,
+
+#define to_CP51932_E9_9A_infos WORDINDEX2INFO(43885)
+           INVALID,         UNDEF, o2(0xb6,0xf9), o2(0xce,0xb4),
+     o2(0xb7,0xa8), o2(0xc2,0xe2), o2(0xe7,0xa1), o2(0xf0,0xa6),
+     o2(0xb3,0xac), o2(0xbf,0xef), o2(0xb3,0xd6), o2(0xf0,0xa8),
+     o2(0xf0,0xa9), o2(0xf0,0xa7), o2(0xb7,0xe4), o2(0xba,0xdd),
+     o2(0xbe,0xe3), o2(0xfc,0xd1), o2(0xb1,0xa3), o2(0xce,0xd9),
+     o2(0xf0,0xab), o2(0xee,0xae), o2(0xf0,0xaa), o2(0xfc,0xd2),
+     o2(0xf0,0xae), o2(0xf0,0xac), o2(0xf0,0xad), o2(0xf0,0xaf),
+     o2(0xf0,0xb0), o2(0xce,0xec), o2(0xf0,0xb1), o2(0xf0,0xb2),
+     o2(0xc0,0xc9), o2(0xc8,0xbb),
+
+#define to_CP51932_E9_9A WORDINDEX2INFO(43919)
+    to_CP51932_E9_9A_offsets,
+    to_CP51932_E9_9A_infos,
+
+#define to_CP51932_E9_9B_infos WORDINDEX2INFO(43921)
+           INVALID, o2(0xbf,0xfd), o2(0xb4,0xe7),         UNDEF,
+     o2(0xcd,0xba), o2(0xb2,0xed), o2(0xbd,0xb8), o2(0xb8,0xdb),
+     o2(0xf0,0xb5), o2(0xf0,0xb4), o2(0xbb,0xf3), o2(0xf0,0xb6),
+     o2(0xf0,0xb3), o2(0xbb,0xa8), o2(0xf0,0xba), o2(0xea,0xad),
+     o2(0xd2,0xd6), o2(0xbf,0xf7), o2(0xf0,0xb8), o2(0xce,0xa5),
+     o2(0xc6,0xf1), o2(0xb1,0xab), o2(0xc0,0xe3), o2(0xbc,0xb6),
+     o2(0xca,0xb7), o2(0xb1,0xc0), o2(0xce,0xed), o2(0xcd,0xeb),
+     o2(0xf0,0xbb), o2(0xc5,0xc5),
+
+#define to_CP51932_E9_9B WORDINDEX2INFO(43951)
+    to_CP51932_E9_9B_offsets,
+    to_CP51932_E9_9B_infos,
+
+#define to_CP51932_E9_9C_infos WORDINDEX2INFO(43953)
+           INVALID, o2(0xbc,0xfb),         UNDEF, o2(0xf0,0xbc),
+     o2(0xf0,0xbd), o2(0xbf,0xcc), o2(0xf0,0xbe), o2(0xce,0xee),
+     o2(0xf0,0xb9), o2(0xf0,0xc0), o2(0xf0,0xc2), o2(0xf0,0xc1),
+     o2(0xf0,0xbf), o2(0xf0,0xc3), o2(0xf0,0xc4), o2(0xc1,0xfa),
+     o2(0xb2,0xe2), o2(0xf0,0xc5), o2(0xcc,0xb8), o2(0xf0,0xc6),
+     o2(0xf0,0xc7), o2(0xcf,0xaa), o2(0xfc,0xd3), o2(0xdb,0xb1),
+     o2(0xf0,0xc8), o2(0xfc,0xd4), o2(0xf0,0xc9), o2(0xf0,0xca),
+
+#define to_CP51932_E9_9C WORDINDEX2INFO(43981)
+    to_CP51932_E9_9C_offsets,
+    to_CP51932_E9_9C_infos,
+
+#define to_CP51932_E9_9D_infos WORDINDEX2INFO(43983)
+           INVALID,         UNDEF, o2(0xf0,0xce), o2(0xfc,0xd5),
+     o2(0xf0,0xcb), o2(0xf0,0xcc), o2(0xf0,0xcd), o2(0xf0,0xcf),
+     o2(0xfc,0xd6), o2(0xfc,0xd7), o2(0xfc,0xd8), o2(0xc0,0xc4),
+     o2(0xfc,0xd9), o2(0xcc,0xf7), o2(0xc0,0xc5), o2(0xf0,0xd0),
+     o2(0xc8,0xf3), o2(0xf0,0xd1), o2(0xf3,0xd3), o2(0xcc,0xcc),
+     o2(0xf0,0xd2), o2(0xf0,0xd3), o2(0xf0,0xd4), o2(0xb3,0xd7),
+     o2(0xf0,0xd6), o2(0xbf,0xd9), o2(0xf0,0xd7), o2(0xb7,0xa4),
+     o2(0xf0,0xd8), o2(0xf0,0xdc), o2(0xf0,0xda),
+
+#define to_CP51932_E9_9D WORDINDEX2INFO(44014)
+    to_CP51932_E9_9D_offsets,
+    to_CP51932_E9_9D_infos,
+
+#define to_CP51932_E9_9E_infos WORDINDEX2INFO(44016)
+           INVALID,         UNDEF, o2(0xf0,0xdb), o2(0xb3,0xf3),
+     o2(0xf0,0xd9), o2(0xf0,0xdd), o2(0xf0,0xde), o2(0xb0,0xc8),
+     o2(0xf0,0xdf), o2(0xf0,0xe0), o2(0xbe,0xe4), o2(0xf0,0xe1),
+     o2(0xb5,0xc7), o2(0xf0,0xe4), o2(0xf0,0xe3), o2(0xf0,0xe2),
+     o2(0xeb,0xf1), o2(0xca,0xdc), o2(0xf0,0xe5), o2(0xf0,0xe6),
+
+#define to_CP51932_E9_9E WORDINDEX2INFO(44036)
+    to_CP51932_E9_9E_offsets,
+    to_CP51932_E9_9E_infos,
+
+#define to_CP51932_E9_9F_infos WORDINDEX2INFO(44038)
+           INVALID,         UNDEF, o2(0xf0,0xe7), o2(0xf0,0xe8),
+     o2(0xf0,0xe9), o2(0xf0,0xea), o2(0xb4,0xda), o2(0xf0,0xeb),
+     o2(0xf0,0xec), o2(0xc7,0xa3), o2(0xf0,0xee), o2(0xb2,0xbb),
+     o2(0xf0,0xf1), o2(0xf0,0xf0), o2(0xb1,0xa4), o2(0xb6,0xc1),
+
+#define to_CP51932_E9_9F WORDINDEX2INFO(44054)
+    to_CP51932_E9_9F_offsets,
+    to_CP51932_E9_9F_infos,
+
+#define to_CP51932_E9_A0_infos WORDINDEX2INFO(44056)
+           INVALID,         UNDEF, o2(0xca,0xc7), o2(0xc4,0xba),
+     o2(0xba,0xa2), o2(0xb9,0xe0), o2(0xbd,0xe7), o2(0xbf,0xdc),
+     o2(0xf0,0xf3), o2(0xf0,0xf2), o2(0xcd,0xc2), o2(0xb4,0xe8),
+     o2(0xc8,0xd2), o2(0xc6,0xdc), o2(0xbf,0xfc), o2(0xce,0xce),
+     o2(0xb7,0xdb), o2(0xf0,0xf6), o2(0xf0,0xf5), o2(0xcb,0xcb),
+     o2(0xc6,0xac), o2(0xb1,0xd0), o2(0xf0,0xf7), o2(0xf0,0xf4),
+     o2(0xc9,0xd1), o2(0xcd,0xea), o2(0xf0,0xf8),
+
+#define to_CP51932_E9_A0 WORDINDEX2INFO(44083)
+    to_CP51932_E9_A0_offsets,
+    to_CP51932_E9_A0_infos,
+
+#define to_CP51932_E9_A1_infos WORDINDEX2INFO(44085)
+           INVALID,         UNDEF, o2(0xf0,0xf9), o2(0xf0,0xfb),
+     o2(0xc2,0xea), o2(0xb3,0xdb), o2(0xb3,0xdc), o2(0xf0,0xfa),
+     o2(0xb4,0xe9), o2(0xb8,0xb2), o2(0xfc,0xda), o2(0xb4,0xea),
+     o2(0xc5,0xbf), o2(0xce,0xe0), o2(0xfc,0xdb), o2(0xb8,0xdc),
+     o2(0xf0,0xfc), o2(0xf0,0xfd), o2(0xf0,0xfe), o2(0xf1,0xa1),
+     o2(0xf1,0xa3), o2(0xf1,0xa2),
+
+#define to_CP51932_E9_A1 WORDINDEX2INFO(44107)
+    to_CP51932_E9_A1_offsets,
+    to_CP51932_E9_A1_infos,
+
+#define to_CP51932_E9_A2_infos WORDINDEX2INFO(44109)
+           INVALID,         UNDEF, o2(0xc9,0xf7), o2(0xf1,0xa4),
+     o2(0xf1,0xa5), o2(0xf1,0xa6), o2(0xf1,0xa7),
+
+#define to_CP51932_E9_A2 WORDINDEX2INFO(44116)
+    to_CP51932_E9_A2_offsets,
+    to_CP51932_E9_A2_infos,
+
+#define to_CP51932_E9_A3_infos WORDINDEX2INFO(44118)
+           INVALID,         UNDEF, o2(0xf1,0xa9), o2(0xf1,0xa8),
+     o2(0xf1,0xaa), o2(0xc8,0xf4), o2(0xe6,0xcc), o2(0xbf,0xa9),
+     o2(0xb5,0xb2), o2(0xf1,0xab), o2(0xf1,0xac), o2(0xd2,0xac),
+     o2(0xdd,0xbb), o2(0xc8,0xd3), o2(0xb0,0xfb), o2(0xb0,0xbb),
+     o2(0xbb,0xf4), o2(0xcb,0xb0), o2(0xbe,0xfe),
+
+#define to_CP51932_E9_A3 WORDINDEX2INFO(44137)
+    to_CP51932_E9_A3_offsets,
+    to_CP51932_E9_A3_infos,
+
+#define to_CP51932_E9_A4_infos WORDINDEX2INFO(44139)
+           INVALID,         UNDEF, o2(0xf1,0xad), o2(0xcc,0xdf),
+     o2(0xf1,0xae), o2(0xcd,0xdc), o2(0xb1,0xc2), o2(0xbb,0xc1),
+     o2(0xf1,0xaf), o2(0xb2,0xee), o2(0xf1,0xb0), o2(0xf1,0xb1),
+     o2(0xf1,0xb3), o2(0xf1,0xb4), o2(0xf1,0xb6), o2(0xf1,0xb2),
+     o2(0xf1,0xb5), o2(0xfc,0xde), o2(0xb4,0xdb), o2(0xf1,0xb7),
+     o2(0xf1,0xb8), o2(0xf1,0xb9), o2(0xf1,0xba),
+
+#define to_CP51932_E9_A4 WORDINDEX2INFO(44162)
+    to_CP51932_E9_A4_offsets,
+    to_CP51932_E9_A4_infos,
+
+#define to_CP51932_E9_A5_infos WORDINDEX2INFO(44164)
+           INVALID,         UNDEF, o2(0xf1,0xbb), o2(0xf1,0xbd),
+     o2(0xf1,0xbc), o2(0xf1,0xbf), o2(0xf1,0xc2), o2(0xf1,0xbe),
+     o2(0xf1,0xc0), o2(0xf1,0xc1), o2(0xf1,0xc3), o2(0xb6,0xc2),
+
+#define to_CP51932_E9_A5 WORDINDEX2INFO(44176)
+    to_CP51932_E9_A5_offsets,
+    to_CP51932_E9_A5_infos,
+
+#define to_CP51932_E9_A6_infos WORDINDEX2INFO(44178)
+           INVALID,         UNDEF, o2(0xbc,0xf3), o2(0xf1,0xc4),
+     o2(0xf1,0xc5), o2(0xb9,0xe1), o2(0xfc,0xe0), o2(0xf1,0xc6),
+     o2(0xb3,0xbe), o2(0xc7,0xcf), o2(0xf1,0xc7), o2(0xf1,0xc8),
+     o2(0xc3,0xda), o2(0xc6,0xeb), o2(0xf1,0xc9),
+
+#define to_CP51932_E9_A6 WORDINDEX2INFO(44193)
+    to_CP51932_E9_A6_offsets,
+    to_CP51932_E9_A6_infos,
+
+#define to_CP51932_E9_A7_infos WORDINDEX2INFO(44195)
+           INVALID,         UNDEF, o2(0xc7,0xfd), o2(0xc2,0xcc),
+     o2(0xb1,0xd8), o2(0xb6,0xee), o2(0xb6,0xef), o2(0xc3,0xf3),
+     o2(0xf1,0xce), o2(0xb6,0xf0), o2(0xb2,0xef), o2(0xf1,0xcd),
+     o2(0xf1,0xcb), o2(0xf1,0xcc), o2(0xf1,0xca), o2(0xf1,0xd8),
+     o2(0xf1,0xcf), o2(0xf1,0xd0), o2(0xf1,0xd1), o2(0xf1,0xd2),
+     o2(0xf1,0xd4), o2(0xf1,0xd3), o2(0xbd,0xd9),
+
+#define to_CP51932_E9_A7 WORDINDEX2INFO(44218)
+    to_CP51932_E9_A7_offsets,
+    to_CP51932_E9_A7_infos,
+
+#define to_CP51932_E9_A8_infos WORDINDEX2INFO(44220)
+           INVALID,         UNDEF, o2(0xf1,0xd5), o2(0xf1,0xd7),
+     o2(0xb5,0xb3), o2(0xf1,0xd6), o2(0xc1,0xfb), o2(0xb8,0xb3),
+     o2(0xf1,0xd9), o2(0xc2,0xcd), o2(0xf1,0xda), o2(0xc6,0xad),
+     o2(0xf1,0xdb), o2(0xf1,0xe0),
+
+#define to_CP51932_E9_A8 WORDINDEX2INFO(44234)
+    to_CP51932_E9_A8_offsets,
+    to_CP51932_E9_A8_infos,
+
+#define to_CP51932_E9_A9_infos WORDINDEX2INFO(44236)
+           INVALID, o2(0xf1,0xde),         UNDEF, o2(0xf1,0xdd),
+     o2(0xf1,0xdf), o2(0xf1,0xdc), o2(0xf1,0xe2), o2(0xfc,0xe1),
+     o2(0xf1,0xe1), o2(0xf1,0xe4), o2(0xb6,0xc3), o2(0xf1,0xe3),
+     o2(0xf1,0xe5), o2(0xf1,0xe6), o2(0xf1,0xe8), o2(0xf1,0xe7),
+     o2(0xf1,0xe9), o2(0xf1,0xeb), o2(0xf1,0xea),
+
+#define to_CP51932_E9_A9 WORDINDEX2INFO(44255)
+    to_CP51932_E9_A9_offsets,
+    to_CP51932_E9_A9_infos,
+
+#define to_CP51932_E9_AA_infos WORDINDEX2INFO(44257)
+           INVALID,         UNDEF, o2(0xb9,0xfc), o2(0xf1,0xec),
+     o2(0xf1,0xed), o2(0xb3,0xbc), o2(0xf1,0xee),
+
+#define to_CP51932_E9_AA WORDINDEX2INFO(44264)
+    to_CP51932_E9_AA_offsets,
+    to_CP51932_E9_AA_infos,
+
+#define to_CP51932_E9_AB_infos WORDINDEX2INFO(44266)
+           INVALID, o2(0xf1,0xef),         UNDEF, o2(0xbf,0xf1),
+     o2(0xf1,0xf0), o2(0xf1,0xf1), o2(0xf1,0xf2), o2(0xf1,0xf3),
+     o2(0xb9,0xe2), o2(0xfc,0xe2), o2(0xfc,0xe3), o2(0xf1,0xf4),
+     o2(0xf1,0xf5), o2(0xf1,0xf6), o2(0xf1,0xf7), o2(0xf1,0xf8),
+     o2(0xc8,0xb1), o2(0xf1,0xfa), o2(0xc9,0xa6), o2(0xf1,0xfb),
+     o2(0xf1,0xf9), o2(0xf1,0xfd), o2(0xf1,0xfc), o2(0xf1,0xfe),
+     o2(0xf2,0xa1),
+
+#define to_CP51932_E9_AB WORDINDEX2INFO(44291)
+    to_CP51932_E9_AB_offsets,
+    to_CP51932_E9_AB_infos,
+
+#define to_CP51932_E9_AC_infos WORDINDEX2INFO(44293)
+           INVALID,         UNDEF, o2(0xf2,0xa2), o2(0xf2,0xa3),
+     o2(0xf2,0xa4), o2(0xf2,0xa5), o2(0xf2,0xa6), o2(0xf2,0xa7),
+     o2(0xf2,0xa8), o2(0xf2,0xa9), o2(0xf2,0xaa), o2(0xf2,0xab),
+     o2(0xf2,0xac), o2(0xf2,0xad), o2(0xf2,0xae), o2(0xdd,0xb5),
+     o2(0xf2,0xaf), o2(0xe4,0xf8), o2(0xb5,0xb4),
+
+#define to_CP51932_E9_AC WORDINDEX2INFO(44312)
+    to_CP51932_E9_AC_offsets,
+    to_CP51932_E9_AC_infos,
+
+#define to_CP51932_E9_AD_infos WORDINDEX2INFO(44314)
+           INVALID,         UNDEF, o2(0xb3,0xa1), o2(0xba,0xb2),
+     o2(0xf2,0xb1), o2(0xf2,0xb0), o2(0xcc,0xa5), o2(0xf2,0xb3),
+     o2(0xf2,0xb4), o2(0xf2,0xb2), o2(0xf2,0xb5), o2(0xcb,0xe2),
+     o2(0xf2,0xb6), o2(0xb5,0xfb), o2(0xcf,0xa5), o2(0xfc,0xe5),
+     o2(0xf2,0xb7), o2(0xfc,0xe4),
+
+#define to_CP51932_E9_AD WORDINDEX2INFO(44332)
+    to_CP51932_E9_AD_offsets,
+    to_CP51932_E9_AD_infos,
+
+#define to_CP51932_E9_AE_infos WORDINDEX2INFO(44334)
+           INVALID,         UNDEF, o2(0xf2,0xb9), o2(0xb0,0xbe),
+     o2(0xfc,0xe6), o2(0xf2,0xba), o2(0xca,0xab), o2(0xf2,0xb8),
+     o2(0xf2,0xbb), o2(0xf2,0xbc), o2(0xf2,0xbd), o2(0xf2,0xbe),
+     o2(0xf2,0xbf), o2(0xcb,0xee), o2(0xbb,0xad), o2(0xba,0xfa),
+     o2(0xc1,0xaf), o2(0xfc,0xe7), o2(0xf2,0xc0), o2(0xf2,0xc3),
+     o2(0xfc,0xe8),
+
+#define to_CP51932_E9_AE WORDINDEX2INFO(44355)
+    to_CP51932_E9_AE_offsets,
+    to_CP51932_E9_AE_infos,
+
+#define to_CP51932_E9_AF_infos WORDINDEX2INFO(44357)
+           INVALID, o2(0xf2,0xc1),         UNDEF, o2(0xf2,0xc4),
+     o2(0xb8,0xf1), o2(0xf2,0xc2), o2(0xf2,0xc5), o2(0xf2,0xc6),
+     o2(0xf2,0xc7), o2(0xf2,0xcb), o2(0xbb,0xaa), o2(0xc2,0xe4),
+     o2(0xf2,0xcc), o2(0xf2,0xc9), o2(0xf2,0xc8), o2(0xf2,0xca),
+     o2(0xb7,0xdf), o2(0xf2,0xd0), o2(0xf2,0xcf), o2(0xf2,0xce),
+     o2(0xb0,0xb3),
+
+#define to_CP51932_E9_AF WORDINDEX2INFO(44378)
+    to_CP51932_E9_AF_offsets,
+    to_CP51932_E9_AF_infos,
+
+#define to_CP51932_E9_B0_infos WORDINDEX2INFO(44380)
+           INVALID, o2(0xfc,0xe9),         UNDEF, o2(0xf2,0xda),
+     o2(0xf2,0xd6), o2(0xf2,0xd7), o2(0xf2,0xd3), o2(0xf2,0xd9),
+     o2(0xf2,0xd5), o2(0xb3,0xe2), o2(0xcf,0xcc), o2(0xf2,0xd8),
+     o2(0xf2,0xd4), o2(0xf2,0xd2), o2(0xf2,0xd1), o2(0xf2,0xdc),
+     o2(0xf2,0xdf), o2(0xf2,0xde), o2(0xf2,0xdd), o2(0xc9,0xc9),
+     o2(0xf2,0xdb), o2(0xb0,0xf3), o2(0xf2,0xe0), o2(0xf2,0xe2),
+     o2(0xb3,0xef), o2(0xf2,0xcd), o2(0xb1,0xb7), o2(0xf2,0xe4),
+
+#define to_CP51932_E9_B0 WORDINDEX2INFO(44408)
+    to_CP51932_E9_B0_offsets,
+    to_CP51932_E9_B0_infos,
+
+#define to_CP51932_E9_B1_infos WORDINDEX2INFO(44410)
+           INVALID,         UNDEF, o2(0xf2,0xe3), o2(0xf2,0xe1),
+     o2(0xc3,0xad), o2(0xcb,0xf0), o2(0xce,0xda), o2(0xf2,0xe5),
+     o2(0xf2,0xe6), o2(0xf2,0xe7), o2(0xf2,0xe8), o2(0xf2,0xe9),
+
+#define to_CP51932_E9_B1 WORDINDEX2INFO(44422)
+    to_CP51932_E9_B1_offsets,
+    to_CP51932_E9_B1_infos,
+
+#define to_CP51932_E9_B3_infos WORDINDEX2INFO(44424)
+           INVALID,         UNDEF, o2(0xc4,0xbb), o2(0xf2,0xea),
+     o2(0xc8,0xb7), o2(0xf2,0xef), o2(0xf2,0xeb), o2(0xf2,0xec),
+     o2(0xcb,0xb1), o2(0xcc,0xc4), o2(0xc6,0xd0),
+
+#define to_CP51932_E9_B3 WORDINDEX2INFO(44435)
+    to_CP51932_E9_B3_offsets,
+    to_CP51932_E9_B3_infos,
+
+#define to_CP51932_E9_B4_infos WORDINDEX2INFO(44437)
+           INVALID,         UNDEF, o2(0xf2,0xf0), o2(0xf2,0xf1),
+     o2(0xc6,0xbe), o2(0xf2,0xee), o2(0xf2,0xed), o2(0xb2,0xaa),
+     o2(0xf2,0xf9), o2(0xf2,0xf8), o2(0xb1,0xf5), o2(0xf2,0xf6),
+     o2(0xf2,0xf5), o2(0xf2,0xf3), o2(0xb3,0xfb), o2(0xf2,0xf2),
+     o2(0xbc,0xb2), o2(0xb2,0xa9), o2(0xb9,0xe3), o2(0xf2,0xfc),
+     o2(0xf2,0xfb),
+
+#define to_CP51932_E9_B4 WORDINDEX2INFO(44458)
+    to_CP51932_E9_B4_offsets,
+    to_CP51932_E9_B4_infos,
+
+#define to_CP51932_E9_B5_infos WORDINDEX2INFO(44460)
+           INVALID,         UNDEF, o2(0xf2,0xfa), o2(0xf2,0xf7),
+     o2(0xf2,0xfd), o2(0xf2,0xfe), o2(0xf3,0xa5), o2(0xf3,0xa4),
+     o2(0xf3,0xa6), o2(0xb1,0xad), o2(0xf3,0xa1), o2(0xf3,0xa2),
+     o2(0xb9,0xf4), o2(0xcc,0xb9), o2(0xf3,0xa3), o2(0xfc,0xeb),
+     o2(0xcb,0xb2), o2(0xf3,0xab), o2(0xfc,0xea), o2(0xf3,0xa7),
+     o2(0xf3,0xac),
+
+#define to_CP51932_E9_B5 WORDINDEX2INFO(44481)
+    to_CP51932_E9_B5_offsets,
+    to_CP51932_E9_B5_infos,
+
+#define to_CP51932_E9_B6_infos WORDINDEX2INFO(44483)
+           INVALID,         UNDEF, o2(0xf3,0xa9), o2(0xf3,0xa8),
+     o2(0xb7,0xdc), o2(0xf3,0xad), o2(0xf3,0xae), o2(0xf3,0xaf),
+     o2(0xf3,0xaa), o2(0xf2,0xf4), o2(0xf3,0xb0), o2(0xc4,0xe1),
+     o2(0xf3,0xb4), o2(0xf3,0xb5), o2(0xf3,0xb3),
+
+#define to_CP51932_E9_B6 WORDINDEX2INFO(44498)
+    to_CP51932_E9_B6_offsets,
+    to_CP51932_E9_B6_infos,
+
+#define to_CP51932_E9_B7_infos WORDINDEX2INFO(44500)
+           INVALID,         UNDEF, o2(0xf3,0xb2), o2(0xf3,0xb8),
+     o2(0xf3,0xb1), o2(0xf3,0xb6), o2(0xf3,0xb7), o2(0xf3,0xba),
+     o2(0xf3,0xb9), o2(0xf3,0xbc), o2(0xf3,0xbd), o2(0xf3,0xbe),
+     o2(0xcf,0xc9), o2(0xf3,0xbb), o2(0xc2,0xeb), o2(0xba,0xed),
+     o2(0xf3,0xbf),
+
+#define to_CP51932_E9_B7 WORDINDEX2INFO(44517)
+    to_CP51932_E9_B7_offsets,
+    to_CP51932_E9_B7_infos,
+
+#define to_CP51932_E9_B8_infos WORDINDEX2INFO(44519)
+           INVALID,         UNDEF, o2(0xfc,0xed), o2(0xf3,0xc0),
+     o2(0xf3,0xc1), o2(0xf3,0xc2),
+
+#define to_CP51932_E9_B8 WORDINDEX2INFO(44525)
+    to_CP51932_E9_B8_offsets,
+    to_CP51932_E9_B8_infos,
+
+#define to_CP51932_E9_B9_infos WORDINDEX2INFO(44527)
+           INVALID,         UNDEF, o2(0xf3,0xc3), o2(0xb8,0xb4),
+     o2(0xf3,0xc4), o2(0xf3,0xc5), o2(0xbc,0xaf),
+
+#define to_CP51932_E9_B9 WORDINDEX2INFO(44534)
+    to_CP51932_E9_B9_offsets,
+    to_CP51932_E9_B9_infos,
+
+#define to_CP51932_E9_BA_infos WORDINDEX2INFO(44536)
+           INVALID,         UNDEF, o2(0xf3,0xc6), o2(0xf3,0xc7),
+     o2(0xf3,0xc8), o2(0xf3,0xc9), o2(0xf3,0xcc), o2(0xf3,0xca),
+     o2(0xcf,0xbc), o2(0xf3,0xcb), o2(0xce,0xef), o2(0xf3,0xcd),
+     o2(0xce,0xdb), o2(0xf3,0xce), o2(0xc7,0xfe), o2(0xf3,0xcf),
+     o2(0xf3,0xd1), o2(0xf3,0xd2), o2(0xf3,0xd0), o2(0xb9,0xed),
+     o2(0xcc,0xcd), o2(0xcb,0xe3), o2(0xd6,0xf7), o2(0xdd,0xe0),
+     o2(0xcb,0xfb),
+
+#define to_CP51932_E9_BA WORDINDEX2INFO(44561)
+    to_CP51932_E9_BA_offsets,
+    to_CP51932_E9_BA_infos,
+
+#define to_CP51932_E9_BB_infos WORDINDEX2INFO(44563)
+           INVALID,         UNDEF, o2(0xb2,0xab), o2(0xf3,0xd4),
+     o2(0xb5,0xd0), o2(0xf3,0xd5), o2(0xf3,0xd6), o2(0xf3,0xd7),
+     o2(0xfc,0xee), o2(0xb9,0xf5), o2(0xf3,0xd8), o2(0xe0,0xd4),
+     o2(0xcc,0xdb), o2(0xc2,0xe3), o2(0xf3,0xd9), o2(0xf3,0xdb),
+     o2(0xf3,0xda), o2(0xf3,0xdc), o2(0xf3,0xdd), o2(0xf3,0xde),
+     o2(0xf3,0xdf), o2(0xf3,0xe0), o2(0xf3,0xe1), o2(0xf3,0xe2),
+     o2(0xf3,0xe3), o2(0xf3,0xe4), o2(0xf3,0xe5), o2(0xf3,0xe6),
+
+#define to_CP51932_E9_BB WORDINDEX2INFO(44591)
+    to_CP51932_E9_BB_offsets,
+    to_CP51932_E9_BB_infos,
+
+#define to_CP51932_E9_BC_infos WORDINDEX2INFO(44593)
+           INVALID,         UNDEF, o2(0xf3,0xe7), o2(0xf3,0xe8),
+     o2(0xc5,0xa4), o2(0xb8,0xdd), o2(0xf3,0xea), o2(0xc1,0xcd),
+     o2(0xf3,0xeb), o2(0xf3,0xec), o2(0xc9,0xa1), o2(0xf3,0xed),
+
+#define to_CP51932_E9_BC WORDINDEX2INFO(44605)
+    to_CP51932_E9_BC_offsets,
+    to_CP51932_E9_BC_infos,
+
+#define to_CP51932_E9_BD_infos WORDINDEX2INFO(44607)
+           INVALID,         UNDEF, o2(0xf3,0xee), o2(0xe3,0xb7),
+     o2(0xec,0xda), o2(0xf0,0xed), o2(0xf3,0xef), o2(0xf3,0xf0),
+     o2(0xf3,0xf2), o2(0xf3,0xf3), o2(0xf3,0xf4), o2(0xce,0xf0),
+     o2(0xf3,0xf1), o2(0xf3,0xf5), o2(0xf3,0xf6), o2(0xf3,0xf8),
+     o2(0xf3,0xf7), o2(0xf3,0xfa), o2(0xf3,0xfb), o2(0xf3,0xf9),
+
+#define to_CP51932_E9_BD WORDINDEX2INFO(44627)
+    to_CP51932_E9_BD_offsets,
+    to_CP51932_E9_BD_infos,
+
+#define to_CP51932_E9_BE_infos WORDINDEX2INFO(44629)
+           INVALID,         UNDEF, o2(0xce,0xb6), o2(0xf3,0xfc),
+     o2(0xf3,0xfd), o2(0xe3,0xd4), o2(0xf3,0xfe),
+
+#define to_CP51932_E9_BE WORDINDEX2INFO(44636)
+    to_CP51932_E9_BE_offsets,
+    to_CP51932_E9_BE_infos,
+
+#define to_CP51932_E9_infos WORDINDEX2INFO(44638)
+              INVALID, to_CP51932_E9_80, to_CP51932_E9_81, to_CP51932_E9_82,
+     to_CP51932_E9_83, to_CP51932_E9_84, to_CP51932_E9_85, to_CP51932_E9_86,
+     to_CP51932_E9_87, to_CP51932_E9_88, to_CP51932_E9_89, to_CP51932_E9_8A,
+     to_CP51932_E9_8B, to_CP51932_E9_8C, to_CP51932_E9_8D, to_CP51932_E9_8E,
+     to_CP51932_E9_8F, to_CP51932_E9_90, to_CP51932_E9_91, to_CP51932_E9_92,
+         to_EUC_JP_C6, to_CP51932_E9_95, to_CP51932_E9_96, to_CP51932_E9_97,
+     to_CP51932_E9_98, to_CP51932_E9_99, to_CP51932_E9_9A, to_CP51932_E9_9B,
+     to_CP51932_E9_9C, to_CP51932_E9_9D, to_CP51932_E9_9E, to_CP51932_E9_9F,
+     to_CP51932_E9_A0, to_CP51932_E9_A1, to_CP51932_E9_A2, to_CP51932_E9_A3,
+     to_CP51932_E9_A4, to_CP51932_E9_A5, to_CP51932_E9_A6, to_CP51932_E9_A7,
+     to_CP51932_E9_A8, to_CP51932_E9_A9, to_CP51932_E9_AA, to_CP51932_E9_AB,
+     to_CP51932_E9_AC, to_CP51932_E9_AD, to_CP51932_E9_AE, to_CP51932_E9_AF,
+     to_CP51932_E9_B0, to_CP51932_E9_B1, to_CP51932_E9_B3, to_CP51932_E9_B4,
+     to_CP51932_E9_B5, to_CP51932_E9_B6, to_CP51932_E9_B7, to_CP51932_E9_B8,
+     to_CP51932_E9_B9, to_CP51932_E9_BA, to_CP51932_E9_BB, to_CP51932_E9_BC,
+     to_CP51932_E9_BD, to_CP51932_E9_BE,
+
+#define to_CP51932_E9 WORDINDEX2INFO(44700)
+    to_EUC_JP_E9_offsets,
+    to_CP51932_E9_infos,
+
+#define to_CP51932_EF_A4_infos WORDINDEX2INFO(44702)
+           INVALID,         UNDEF, o2(0xfa,0xc6),
+
+#define to_CP51932_EF_A4 WORDINDEX2INFO(44705)
+    to_eucJP_ms_EF_A4_offsets,
+    to_CP51932_EF_A4_infos,
+
+#define to_CP51932_EF_A7_infos WORDINDEX2INFO(44707)
+           INVALID,         UNDEF, o2(0xfc,0xcf),
+
+#define to_CP51932_EF_A7 WORDINDEX2INFO(44710)
+    to_eucJP_ms_EF_A7_offsets,
+    to_CP51932_EF_A7_infos,
+
+#define to_CP51932_EF_A8_infos WORDINDEX2INFO(44712)
+           INVALID,         UNDEF, o2(0xf9,0xd4), o2(0xf9,0xdf),
+     o2(0xf9,0xe0), o2(0xf9,0xf5), o2(0xfa,0xbe), o2(0xfa,0xce),
+     o2(0xfa,0xd0), o2(0xfa,0xfb), o2(0xfb,0xa3), o2(0xfb,0xba),
+     o2(0xfb,0xc2), o2(0xfb,0xc3), o2(0xfb,0xc4), o2(0xfb,0xc6),
+     o2(0xfb,0xca), o2(0xfb,0xcd), o2(0xfb,0xd6), o2(0xfb,0xe1),
+     o2(0xfb,0xe3), o2(0xfb,0xe4), o2(0xfb,0xed), o2(0xfb,0xf5),
+     o2(0xfb,0xf7), o2(0xfb,0xf8), o2(0xfb,0xfb), o2(0xfc,0xb9),
+     o2(0xfc,0xc0), o2(0xfc,0xd0), o2(0xfc,0xdc), o2(0xfc,0xdd),
+     o2(0xfc,0xdf), o2(0xfc,0xec),
+
+#define to_CP51932_EF_A8 WORDINDEX2INFO(44746)
+    to_eucJP_ms_EF_A8_offsets,
+    to_CP51932_EF_A8_infos,
+
+#define to_CP51932_EF_BC_infos WORDINDEX2INFO(44748)
+           INVALID,         UNDEF, o2(0xa1,0xaa), o2(0xfc,0xfe),
+     o2(0xa1,0xf4), o2(0xa1,0xf0), o2(0xa1,0xf3), o2(0xa1,0xf5),
+     o2(0xfc,0xfd), o2(0xa1,0xca), o2(0xa1,0xcb), o2(0xa1,0xf6),
+     o2(0xa1,0xdc), o2(0xa1,0xa4), o2(0xa1,0xdd), o2(0xa1,0xa5),
+     o2(0xa1,0xbf), o2(0xa3,0xb0), o2(0xa3,0xb1), o2(0xa3,0xb2),
+     o2(0xa3,0xb3), o2(0xa3,0xb4), o2(0xa3,0xb5), o2(0xa3,0xb6),
+     o2(0xa3,0xb7), o2(0xa3,0xb8), o2(0xa3,0xb9), o2(0xa1,0xa7),
+     o2(0xa1,0xa8), o2(0xa1,0xe3), o2(0xa1,0xe1), o2(0xa1,0xe4),
+     o2(0xa1,0xa9), o2(0xa1,0xf7), o2(0xa3,0xc1), o2(0xa3,0xc2),
+     o2(0xa3,0xc3), o2(0xa3,0xc4), o2(0xa3,0xc5), o2(0xa3,0xc6),
+     o2(0xa3,0xc7), o2(0xa3,0xc8), o2(0xa3,0xc9), o2(0xa3,0xca),
+     o2(0xa3,0xcb), o2(0xa3,0xcc), o2(0xa3,0xcd), o2(0xa3,0xce),
+     o2(0xa3,0xcf), o2(0xa3,0xd0), o2(0xa3,0xd1), o2(0xa3,0xd2),
+     o2(0xa3,0xd3), o2(0xa3,0xd4), o2(0xa3,0xd5), o2(0xa3,0xd6),
+     o2(0xa3,0xd7), o2(0xa3,0xd8), o2(0xa3,0xd9), o2(0xa3,0xda),
+     o2(0xa1,0xce), o2(0xa1,0xc0), o2(0xa1,0xcf), o2(0xa1,0xb0),
+     o2(0xa1,0xb2),
+
+#define to_CP51932_EF_BC WORDINDEX2INFO(44813)
+    to_EUC_JP_C3_offsets,
+    to_CP51932_EF_BC_infos,
+
+#define to_CP51932_EF_BF_infos WORDINDEX2INFO(44815)
+           INVALID,         UNDEF, o2(0xa1,0xf1), o2(0xa1,0xf2),
+     o2(0xa2,0xcc), o2(0xa1,0xb1), o2(0xfc,0xfc), o2(0xa1,0xef),
+
+#define to_CP51932_EF_BF WORDINDEX2INFO(44823)
+    to_eucJP_ms_EF_BF_offsets,
+    to_CP51932_EF_BF_infos,
+
+#define to_CP51932_EF_infos WORDINDEX2INFO(44825)
+               INVALID,      to_EUC_JP_C6,
+      to_CP51932_EF_A4,  to_CP51932_EF_A7,
+      to_CP51932_EF_A8,  to_CP51932_EF_BC,
+     to_eucJP_ms_EF_BD,   to_EUC_JP_EF_BE,
+      to_CP51932_EF_BF,
+
+#define to_CP51932_EF WORDINDEX2INFO(44834)
+    to_eucJP_ms_EF_offsets,
+    to_CP51932_EF_infos,
+
+#define to_CP51932_infos WORDINDEX2INFO(44836)
+              NOMAP,        INVALID,  to_CP51932_C2,  to_CP51932_C3,
+       to_EUC_JP_C6,  to_CP51932_CE,  to_CP51932_CF,  to_CP51932_D0,
+      to_CP51932_D1,   to_EUC_JP_E0,   to_EUC_JP_E1,  to_CP51932_E2,
+     to_eucJP_ms_E3,  to_CP51932_E4,  to_CP51932_E5,  to_CP51932_E6,
+      to_CP51932_E7,  to_CP51932_E8,  to_CP51932_E9,   to_EUC_JP_ED,
+      to_CP51932_EF,   to_EUC_JP_F0,   to_EUC_JP_F1,   to_EUC_JP_F4,
+
+#define to_CP51932 WORDINDEX2INFO(44860)
+    to_CP51932_offsets,
+    to_CP51932_infos,
+
+};
+#define TRANSCODE_TABLE_INFO japanese_euc_byte_array, 53782, japanese_euc_word_array, 44862, sizeof(unsigned int)
+static const rb_transcoder
+rb_from_EUC_JP = {
+    "EUC-JP", "UTF-8", from_EUC_JP,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_eucJP_ms = {
+    "eucJP-ms", "UTF-8", from_eucJP_ms,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_CP51932 = {
+    "CP51932", "UTF-8", from_CP51932,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_EUC_JP = {
+    "UTF-8", "EUC-JP", to_EUC_JP,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_eucJP_ms = {
+    "UTF-8", "eucJP-ms", to_eucJP_ms,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_CP51932 = {
+    "UTF-8", "CP51932", to_CP51932,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+
+
+void
+Init_japanese_euc(void)
+{
+    rb_register_transcoder(&rb_from_EUC_JP);
+    rb_register_transcoder(&rb_from_eucJP_ms);
+    rb_register_transcoder(&rb_from_CP51932);
+    rb_register_transcoder(&rb_to_EUC_JP);
+    rb_register_transcoder(&rb_to_eucJP_ms);
+    rb_register_transcoder(&rb_to_CP51932);
+
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.trans b/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.trans
new file mode 100644
index 0000000..a976fe5
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese_euc.trans
@@ -0,0 +1,46 @@
+#include "transcode_data.h"
+
+<%
+  transcode_tblgen "EUC-JP", "UTF-8",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "JISX0208:1990/UCS") +
+  citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS") +
+  citrus_decode_mapsrc("euc", 0x8000, "JISX0212/UCS")
+
+  transcode_tblgen "eucJP-ms", "UTF-8",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "JISX0208VDC:NEC/UCS,JISX0208UDC/UCS,JISX0208:MS/UCS") +
+  citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS") +
+  citrus_decode_mapsrc("euc", 0x8000, "JISX0212VDC:IBM/UCS,JISX0212UDC/UCS,JISX0212:MS/UCS")
+
+  transcode_tblgen "CP51932", "UTF-8",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "JISX0208VDC:NEC/UCS,CP932VDC:NEC_IBM/UCS,JISX0208:MS/UCS") +
+  citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS")
+
+
+  transcode_tblgen "UTF-8", "EUC-JP",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:1990") +
+  citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA") +
+  citrus_decode_mapsrc("euc", 0x8000, "UCS/JISX0212")
+
+  transcode_tblgen "UTF-8", "eucJP-ms",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:MS,UCS/JISX0208VDC:NEC,UCS/JISX0208UDC") +
+  citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA") +
+  citrus_decode_mapsrc("euc", 0x8000, "UCS/JISX0212VDC:IBM,UCS/JISX0212UDC,UCS/JISX0212:MS")
+
+  transcode_tblgen "UTF-8", "CP51932",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:MS,UCS/JISX0208VDC:NEC,UCS/CP932VDC:NEC_IBM") +
+  citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA")
+%>
+
+<%= transcode_generated_code %>
+
+void
+Init_japanese_euc(void)
+{
+<%= transcode_register_code %>
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.c b/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.c
new file mode 100644
index 0000000..0335e01
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.c
@@ -0,0 +1,17231 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="japanese_sjis.trans", len=1028, checksum=11896 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+japanese_sjis_byte_array[39402] = {
+#define from_Shift_JIS_81_offsets 0
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63,  0,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93, 94, 95,
+     96, 97, 98, 99,100,101,102,103,  104,105,106,107,108,109,109,109,
+    109,109,109,109,109,109,109,109,  110,111,112,113,114,115,116,117,
+    109,109,109,109,109,109,109,109,  118,119,120,121,122,123,124,109,
+    109,109,109,109,109,109,109,109,  109,109,125,126,127,128,129,130,
+    131,132,133,134,135,136,137,138,  139,109,109,109,109,109,109,109,
+    140,141,142,143,144,145,146,147,  109,109,109,109,148,
+
+#define from_Shift_JIS_82_offsets 191
+64, 252,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      3,  4,  5,  6,  7,  8,  9, 10,   11,  1,  1,  1,  1,  1,  1,  1,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+     28, 29, 30, 31, 32, 33, 34, 35,   36, 37,  1,  1,  1,  1,  1,  0,
+      1, 38, 39, 40, 41, 42, 43, 44,   45, 46, 47, 48, 49, 50, 51, 52,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63,  1,  1,  1,  1, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94, 95, 96,
+     97, 98, 99,100,101,102,103,104,  105,106,107,108,109,110,111,112,
+    113,114,115,116,117,118,119,120,  121,122,123,124,125,126,127,128,
+    129,130,131,132,133,134,135,136,  137,138,139,140,141,142,143,144,
+    145,146,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,
+
+#define from_Shift_JIS_83_offsets 382
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63,  0,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   87, 87, 87, 87, 87, 87, 87, 88,
+     89, 90, 91, 92, 93, 94, 95, 96,   97, 98, 99,100,101,102,103,104,
+    105,106,107,108,109,110,111, 87,   87, 87, 87, 87, 87, 87, 87,112,
+    113,114,115,116,117,118,119,120,  121,122,123,124,125,126,127,128,
+    129,130,131,132,133,134,135, 87,   87, 87, 87, 87, 87, 87, 87, 87,
+     87, 87, 87, 87, 87, 87, 87, 87,   87, 87, 87, 87, 87, 87, 87, 87,
+     87, 87, 87, 87, 87, 87, 87, 87,   87, 87, 87, 87, 87,
+
+#define from_Shift_JIS_84_offsets 573
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49,  0,
+     50, 51, 52, 53, 54, 55, 56, 57,   58, 59, 60, 61, 62, 63, 64, 65,
+     66, 67, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34,
+
+#define from_Shift_JIS_85_offsets 764
+64, 252,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,
+
+#define from_Shift_JIS_88_offsets 955
+64, 252,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      3,  4,  5,  6,  7,  8,  9, 10,   11, 12, 13, 14, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+     51, 52, 53, 54, 55, 56, 57, 58,   59, 60, 61, 62, 63, 64, 65, 66,
+     67, 68, 69, 70, 71, 72, 73, 74,   75, 76, 77, 78, 79, 80, 81, 82,
+     83, 84, 85, 86, 87, 88, 89, 90,   91, 92, 93, 94, 95,
+
+#define from_Shift_JIS_89_offsets 1146
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63,  0,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93, 94, 95,
+     96, 97, 98, 99,100,101,102,103,  104,105,106,107,108,109,110,111,
+    112,113,114,115,116,117,118,119,  120,121,122,123,124,125,126,127,
+    128,129,130,131,132,133,134,135,  136,137,138,139,140,141,142,143,
+    144,145,146,147,148,149,150,151,  152,153,154,155,156,157,158,159,
+    160,161,162,163,164,165,166,167,  168,169,170,171,172,173,174,175,
+    176,177,178,179,180,181,182,183,  184,185,186,187,188,
+
+#define from_Shift_JIS_98_offsets 1337
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52, 52,  0,
+     52, 52, 52, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52, 52, 52,
+     52, 52, 52, 52, 52, 52, 52, 52,   52, 52, 52, 52, 52, 52, 52, 53,
+     54, 55, 56, 57, 58, 59, 60, 61,   62, 63, 64, 65, 66, 67, 68, 69,
+     70, 71, 72, 73, 74, 75, 76, 77,   78, 79, 80, 81, 82, 83, 84, 85,
+     86, 87, 88, 89, 90, 91, 92, 93,   94, 95, 96, 97, 98, 99,100,101,
+    102,103,104,105,106,107,108,109,  110,111,112,113,114,115,116,117,
+    118,119,120,121,122,123,124,125,  126,127,128,129,130,131,132,133,
+    134,135,136,137,138,139,140,141,  142,143,144,145,146,
+
+#define from_Shift_JIS_EA_offsets 1528
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63,  0,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93, 94, 95,
+     96, 97, 98, 99,100,101,101,101,  101,101,101,101,101,101,101,101,
+    101,101,101,101,101,101,101,101,  101,101,101,101,101,101,101,101,
+    101,101,101,101,101,101,101,101,  101,101,101,101,101,101,101,101,
+    101,101,101,101,101,101,101,101,  101,101,101,101,101,101,101,101,
+    101,101,101,101,101,101,101,101,  101,101,101,101,101,101,101,101,
+    101,101,101,101,101,101,101,101,  101,101,101,101,101,
+
+#define from_Shift_JIS_offsets 1719
+0, 252,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  6,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29, 30,
+      1, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+     62, 63, 64, 65, 66, 67, 68, 69,   70, 71, 72, 73, 74, 75, 76, 77,
+     78, 79, 80, 81, 82, 83, 84, 85,   86, 87, 88, 89, 90, 91, 92, 93,
+     94, 95, 96, 97, 98, 99,100,101,  102,103,104,  6,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,
+
+#define from_Windows_31J_87_offsets 1974
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 31, 31,   31, 31, 31, 31, 31, 31, 55,  0,
+     56, 57, 58, 59, 60, 61, 62, 63,   64, 65, 66, 67, 68, 69, 70, 71,
+     72, 73, 74, 75, 76, 77, 78, 79,   80, 81, 82, 83, 84, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31,
+
+#define from_Windows_31J_EE_offsets 2165
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63,  0,
+     64, 65, 66, 67, 68, 69, 70, 71,   72, 73, 74, 75, 76, 77, 78, 79,
+     80, 81, 82, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93, 94, 95,
+     96, 97, 98, 99,100,101,102,103,  104,105,106,107,108,109,110,111,
+    112,113,114,115,116,117,118,119,  120,121,122,123,124,125,126,127,
+    128,129,130,131,132,133,134,135,  136,137,138,139,140,141,142,143,
+    144,145,146,147,148,149,150,151,  152,153,154,155,156,157,158,159,
+    160,161,162,163,164,165,166,167,  168,169,170,171,172,173,173,174,
+    175,176,177,178,179,180,181,182,  183,184,185,186,187,
+
+#define from_Windows_31J_FC_offsets 2356
+64, 252,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13,  0,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13,
+
+#define from_Windows_31J_offsets 2547
+0, 252,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  9, 10, 11, 12, 13, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+      1, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 62,
+     63, 64, 65, 66, 67, 68, 69, 70,   71, 72, 73, 74, 75, 76, 77, 78,
+     79, 80, 81, 82, 83, 84, 85, 86,   87, 88, 89, 90, 91, 92, 93, 94,
+     95, 96, 97, 98, 99,100,101,102,  103,104,105,  6,  6,106,107,  6,
+    108,109,110,111,112,113,114,115,  116,117,118,119,120,
+
+#define to_Shift_JIS_C2_offsets 2802
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  4,    5,  1,  1,  1,  6,  1,  1,  1,
+      7,  8,  1,  1,  9,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_C3_offsets 2868
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_C4_offsets 2934
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_CE_offsets 3000
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18,  1, 19, 20, 21, 22, 23,   24, 25,  1,  1,  1,  1,  1,  1,
+      1, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+
+#define to_Shift_JIS_CF_offsets 3066
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_Shift_JIS_D0_offsets 3132
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  5,  6,  7,  8,  9, 10,   11, 12, 13, 14, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_Shift_JIS_D1_offsets 3198
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_Shift_JIS_E0_offsets 3264
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_80_offsets 3298
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  3,  4,  1,    5,  6,  1,  1,  7,  8,  1,  1,
+      9, 10,  1,  1,  1, 11, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     13,  1, 14, 15,  1,  1,  1,  1,    1,  1,  1, 16,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_84_offsets 3364
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_86_offsets 3430
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_87_offsets 3496
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_88_offsets 3562
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  2,  2,  7,  2,  2,  2,  2,
+      2,  2,  8,  2,  2,  2,  2,  2,    2,  2,  9,  2,  2, 10, 11,  2,
+     12,  2,  2,  2,  2,  2,  2, 13,   14, 15, 16, 17, 18,  2,  2,  2,
+      2,  2,  2,  2, 19, 20,  2,  2,    2,  2,  2,  2,  2, 21,  2,  2,
+
+#define to_Shift_JIS_E2_89_offsets 3628
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  1,  1,  5,  6,    1,  1,  7,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_8A_offsets 3694
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_8C_offsets 3760
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_94_offsets 3826
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  6,  5,  5,  7,
+      8,  5,  5,  9, 10,  5,  5, 11,   12,  5,  5, 13, 14, 15,  5,  5,
+     16,  5,  5, 17, 18, 19,  5,  5,   20,  5,  5, 21, 22,  5,  5, 23,
+     24,  5,  5, 25, 26,  5,  5, 27,   28,  5,  5, 29, 30,  5,  5, 31,
+
+#define to_Shift_JIS_E2_95_offsets 3892
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_96_offsets 3958
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  5,  1,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+
+#define to_Shift_JIS_E2_97_offsets 4024
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  4,  1,  1,  5,  6,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_98_offsets 4090
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E2_99_offsets 4156
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  4,  2,  2,  5,  2,  6,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E2_offsets 4222
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    6,  7,  8,  2,  9,  2,  2,  2,
+      2,  2,  2,  2, 10, 11, 12, 13,   14, 15,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E3_80_offsets 4288
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22,  5,  5,    5,  5,  5,  5, 23,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_Shift_JIS_E3_81_offsets 4354
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+
+#define to_Shift_JIS_E3_82_offsets 4420
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 21, 21, 21,   21, 21, 21, 22, 23, 24, 25, 21,
+     21, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44, 45, 46, 47, 48,   49, 50, 51, 52, 53, 54, 55, 56,
+
+#define to_Shift_JIS_E3_83_offsets 4486
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   56, 56, 56, 57, 58, 59, 60, 56,
+
+#define to_Shift_JIS_E3_offsets 4552
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_Shift_JIS_E4_B8_offsets 4618
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  5,    6,  7,  8,  9,  3, 10, 11,  3,
+     12, 13,  3,  3, 14, 15, 16, 17,   18, 19,  3,  3,  3,  3, 20,  3,
+      3, 21,  3,  3,  3,  3, 22,  3,    3,  3, 23,  3,  3, 24,  3,  3,
+      3, 25, 26,  3,  3,  3, 27,  3,   28, 29,  3, 30, 31,  3,  3, 32,
+
+#define to_Shift_JIS_E4_B9_offsets 4684
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  1,    1,  1,  1,  5,  1,  6,  7,  8,
+      1,  1,  1,  1,  1,  9, 10, 11,   12, 13,  1,  1,  1, 14, 15, 16,
+      1,  1, 17,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 18,  1, 19,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_Shift_JIS_E4_BA_offsets 4750
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    6,  7,  8,  9, 10,  2, 11,  2,
+      2, 12, 13,  2, 14, 15,  2,  2,   16, 17,  2, 18, 19,  2, 20, 21,
+     22, 23, 24,  2, 25, 26, 27,  2,   28,  2,  2, 29, 30, 31, 32,  2,
+     33,  2,  2, 34,  2,  2, 35,  2,    2,  2, 36,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E4_BB_offsets 4816
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  7,    4,  4,  8,  9,  4, 10, 11, 12,
+      4,  4,  4,  4, 13, 14, 15, 16,   17, 18,  4,  4,  4, 19, 20, 21,
+      4,  4,  4, 22, 23, 24,  4,  4,    4,  4,  4,  4,  4, 25, 26,  4,
+     27,  4, 28,  4,  4,  4, 29, 30,    4,  4,  4, 31,  4,  4,  4,  4,
+
+#define to_Shift_JIS_E4_BC_offsets 4882
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  4,  1,  1,  5,  6,  7,
+      8,  9,  1,  1,  1,  1,  1,  1,    1,  1, 10,  1, 11, 12,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 13,
+     14,  1,  1,  1, 15,  1, 16,  1,   17,  1, 18,  1, 19, 20,  1,  1,
+
+#define to_Shift_JIS_E4_BD_offsets 4948
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    1,  1,  1,  1,  1,  5,  6,  7,
+      8,  9,  1, 10,  1, 11,  1, 12,    1, 13, 14, 15, 16, 17, 18,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 19,  1,  1,  1,  1,  1, 20,
+     21,  1,  1, 22,  1, 23, 24,  1,    1,  1,  1, 25, 26,  1,  1, 27,
+
+#define to_Shift_JIS_E4_BE_offsets 5014
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  1,  5,  1,  6,  1,  7,
+      1,  8,  1,  1,  1,  1,  9,  1,   10,  1,  1, 11,  1, 12,  1,  1,
+     13, 14,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1, 16, 17, 18,
+      1,  1,  1,  1,  1, 19, 20,  1,    1,  1,  1,  1,  1,  1,  1, 21,
+
+#define to_Shift_JIS_E4_BF_offsets 5080
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  1,  5,  1,  1,  1,  6,  1,
+      7,  8,  1,  1,  9,  1,  1, 10,   11,  1, 12, 13,  1, 14,  1, 15,
+      1, 16,  1, 17, 18, 19,  1,  1,    1,  1,  1,  1,  1,  1, 20, 21,
+      1,  1,  1, 22,  1, 23, 24,  1,   25,  1, 26,  1,  1,  1, 27,  1,
+
+#define to_Shift_JIS_E4_offsets 5146
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  5,  6,  7,  8,  9,
+
+#define to_Shift_JIS_E5_80_offsets 5212
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  4,  1,  5,  1,  6,  1,  7,
+      1,  8,  9,  1, 10,  1, 11,  1,    1, 12, 13,  1,  1,  1,  1, 14,
+      1, 15,  1, 16, 17, 18, 19,  1,   20, 21, 22, 23, 24, 25,  1,  1,
+      1,  1,  1,  1,  1,  1, 26,  1,    1, 27,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_81_offsets 5278
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  1,  1,  6,
+      7,  1,  1,  1,  1,  8,  9,  1,    1,  1, 10,  1, 11,  1,  1,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,    1,  1,  1,  1, 13,  1,  1,  1,
+      1,  1, 14,  1, 15, 16, 17,  1,   18,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_Shift_JIS_E5_82_offsets 5344
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  2,  2,  2,  2,  2,  2,    6,  7,  8,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  9, 10,  2,  2,
+      2,  2, 11, 12, 13, 14,  2, 15,    2,  2,  2,  2,  2,  2, 16,  2,
+
+#define to_Shift_JIS_E5_83_offsets 5410
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  1,  6,  1,  7,
+      1,  8,  1,  1,  1,  9, 10,  1,    1,  1, 11,  1,  1,  1, 12,  1,
+      1,  1,  1, 13,  1, 14,  1, 15,    1,  1,  1,  1,  1, 16, 17,  1,
+      1,  1,  1,  1,  1, 18,  1,  1,    1, 19,  1, 20,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_84_offsets 5476
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  4,    4,  6,  4,  4,  4,  4,  4,  4,
+      4,  4,  7,  4,  8,  9, 10,  4,   11,  4, 12,  4,  4,  4,  4, 13,
+      4, 14,  4,  4,  4,  4,  4,  4,    4,  4, 15,  4,  4,  4,  4,  4,
+      4,  4, 16,  4,  4,  4,  4, 17,    4,  4, 18, 19, 20,  4,  4, 21,
+
+#define to_Shift_JIS_E5_85_offsets 5542
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3, 11, 12, 13, 14,  3,
+     15,  3, 16,  3, 17,  3,  3,  3,    3,  3, 18,  3, 19,  3,  3,  3,
+      3,  3, 20,  3,  3, 21,  3,  3,   22, 23, 24, 25, 26, 27, 28,  3,
+      3, 29,  3,  3,  3, 30, 31, 32,   33,  3,  3,  3, 34,  3,  3,  3,
+
+#define to_Shift_JIS_E5_86_offsets 5608
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    2,  6,  7,  2,  8,  9,  2, 10,
+     11, 12, 13, 14,  2, 15, 16, 17,    2, 18,  2,  2,  2,  2,  2,  2,
+     19,  2, 20,  2, 21, 22, 23,  2,   24, 25, 26, 27, 28,  2,  2,  2,
+     29, 30, 31, 32, 33, 34, 35, 36,    2,  2,  2,  2,  2, 37,  2,  2,
+
+#define to_Shift_JIS_E5_87_offsets 5674
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    1,  5,  1,  6,  7,  8,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1, 10, 11, 12,  1,  1,
+     13, 14,  1,  1,  1,  1, 15, 16,    1, 17, 18,  1,  1, 19,  1,  1,
+     20, 21,  1,  1,  1, 22, 23,  1,   24, 25, 26,  1,  1, 27, 28,  1,
+
+#define to_Shift_JIS_E5_88_offsets 5740
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    7,  2,  8,  9,  2,  2, 10,  2,
+      2, 11,  2,  2, 12,  2,  2, 13,    2,  2,  2,  2,  2, 14,  2,  2,
+      2,  2,  2,  2, 15, 16,  2, 17,    2, 18, 19,  2,  2,  2, 20,  2,
+     21,  2,  2, 22,  2,  2, 23, 24,   25, 26, 27, 28,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E5_89_offsets 5806
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  4,    1,  1,  5,  6,  7,  8,  1,  9,
+      1,  1,  1,  1, 10,  1, 11,  1,    1,  1,  1, 12,  1,  1, 13,  1,
+      1,  1,  1, 14, 15, 16,  1,  1,    1, 17, 18,  1,  1,  1,  1, 19,
+     20, 21, 22, 23, 24, 25,  1,  1,    1,  1,  1,  1,  1, 26,  1, 27,
+
+#define to_Shift_JIS_E5_8A_offsets 5872
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  6,  1,  1,
+      1,  7,  8,  1,  9,  1,  1,  1,    1,  1,  1, 10,  1,  1,  1, 11,
+     12,  1,  1, 13,  1,  1,  1,  1,    1, 14, 15, 16, 17, 18,  1,  1,
+      1, 19,  1,  1, 20, 21,  1,  1,    1, 22,  1,  1, 23,  1, 24,  1,
+
+#define to_Shift_JIS_E5_8B_offsets 5938
+128, 191,
+      1,  2,  1,  3,  1,  4,  1,  5,    1,  6,  1,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  1,  9,  1, 10,   11, 12,  1,  1,  1, 13, 14, 15,
+     16,  1, 17, 18, 19,  1, 20, 21,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 22, 23,  1, 24,  1,  1,   25, 26, 27,  1,  1,  1, 28, 29,
+
+#define to_Shift_JIS_E5_8C_offsets 6004
+128, 191,
+      1,  2,  3,  1,  1,  4,  5,  1,    6,  1,  1,  1,  1,  7,  1,  8,
+      9,  1,  1,  1,  1, 10, 11, 12,    1, 13, 14,  1,  1, 15,  1,  1,
+     16, 17,  1, 18,  1,  1,  1,  1,    1,  1, 19,  1,  1,  1,  1, 20,
+      1, 21,  1, 22,  1,  1,  1,  1,   23, 24, 25, 26,  1,  1,  1, 27,
+
+#define to_Shift_JIS_E5_8D_offsets 6070
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    8,  9, 10,  3,  3, 11,  3,  3,
+      3, 12, 13, 14, 15,  3,  3, 16,   17,  3, 18,  3, 19,  3, 20,  3,
+     21,  3,  3,  3,  3,  3, 22,  3,    3, 23,  3,  3,  3,  3, 24, 25,
+     26, 27,  3, 28, 29, 30,  3, 31,   32,  3,  3, 33,  3,  3,  3, 34,
+
+#define to_Shift_JIS_E5_8E_offsets 6136
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  4,  1,    5,  1,  6,  1,  1,  1,  1,  7,
+      8,  1,  1,  1,  1,  9, 10,  1,   11, 12,  1,  1,  1, 13, 14,  1,
+     15,  1,  1, 16,  1,  1, 17,  1,    1,  1,  1, 18,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_8F_offsets 6202
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  6,  7,  8,  9, 10,  1,
+      1,  1,  1,  1, 11,  1, 12, 13,    1, 14,  1, 15,  1,  1,  1, 16,
+      1, 17, 18, 19, 20, 21,  1,  1,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31, 32, 33,  1,  1, 34, 35,   36,  1, 37,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_90_offsets 6268
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    5,  6,  7,  8,  9, 10, 11, 12,
+     13, 14,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1, 16,  1, 17,
+     18,  1,  1,  1,  1,  1, 19,  1,    1, 20,  1, 21, 22, 23, 24,  1,
+      1,  1,  1,  1,  1,  1, 25,  1,   26, 27,  1, 28, 29, 30, 31,  1,
+
+#define to_Shift_JIS_E5_91_offsets 6334
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    5,  6,  7,  2,  2,  2,  8,  2,
+      2,  9,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 10,
+      2,  2,  2,  2,  2,  2,  2,  2,   11,  2, 12,  2,  2,  2,  2,  2,
+     13, 14,  2, 15,  2, 16, 17, 18,    2,  2,  2, 19, 20, 21,  2,  2,
+
+#define to_Shift_JIS_E5_92_offsets 6400
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  2,  5,  6,  2,  7,  8,
+      9,  2, 10,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 11,  2, 12, 13,  2,  2,   14,  2,  2, 15, 16,  2,  2, 17,
+      2,  2, 18, 19,  2,  2,  2,  2,   20,  2,  2,  2, 21, 22, 23,  2,
+
+#define to_Shift_JIS_E5_93_offsets 6466
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    9,  4,  4,  4,  4,  4,  4,  4,
+      4, 10, 11,  4,  4, 12, 13,  4,   14, 15,  4,  4,  4, 16, 17,  4,
+      4,  4, 18,  4,  4,  4,  4,  4,    4,  4, 19,  4,  4, 20,  4,  4,
+
+#define to_Shift_JIS_E5_94_offsets 6532
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  1,  1,  1,  1,  5,
+      6,  1,  1,  1,  7,  1,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  9, 10,
+      1, 11,  1, 12,  1,  1,  1,  1,   13, 14,  1,  1,  1,  1, 15,  1,
+
+#define to_Shift_JIS_E5_95_offsets 6598
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  2,    2,  2,  2,  2,  6,  2,  2,  7,
+      2,  2,  2,  8,  2,  2,  9, 10,    2,  2,  2,  2, 11, 12,  2,  2,
+      2,  2,  2, 13,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 14, 15,  2, 16,  2,
+
+#define to_Shift_JIS_E5_96_offsets 6664
+128, 191,
+      1,  2,  2,  3,  4,  2,  2,  5,    2,  6,  7,  8,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    9, 10, 11,  2, 12, 13, 14, 15,
+      2,  2,  2,  2,  2,  2,  2, 16,   17, 18, 19, 20, 21,  2, 22,  2,
+     23,  2,  2,  2,  2,  2, 24,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E5_97_offsets 6730
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  6,  1,  7,  1,  1,  8,
+      1,  1,  1,  9, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,    1, 12,  1,  1,  1, 13, 14,  1,
+
+#define to_Shift_JIS_E5_98_offsets 6796
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  5,  6,    7,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1,  1,  1, 10,
+      1, 11, 12,  1, 13,  1, 14,  1,   15,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_99_offsets 6862
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  4,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  1,  1,  1,    8,  1,  9, 10, 11,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1,  1,   13,  1, 14,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_9A_offsets 6928
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    2,  2,  5,  2,  2,  2,  2,  6,
+      2,  2,  2,  2,  7,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  2,  9,  2,  2, 10,  2,  2,    2,  2,  2,  2,  2,  2, 11,  2,
+      2,  2,  2,  2, 12,  2, 13,  2,    2,  2,  2,  2, 14,  2,  2,  2,
+
+#define to_Shift_JIS_E5_9B_offsets 6994
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  5,  5,  5,  5,  5,  7,  5,
+      5,  8,  5,  9,  5,  5,  5, 10,   11,  5, 12, 13,  5,  5, 14,  5,
+     15,  5,  5, 16,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5, 17,  5,
+     18,  5, 19, 20,  5,  5,  5,  5,    5, 21, 22,  5,  5, 23,  5, 24,
+
+#define to_Shift_JIS_E5_9C_offsets 7060
+128, 191,
+      1,  2,  2,  3,  4,  2,  2,  2,    5,  6,  2,  7,  2,  8,  2,  9,
+      2,  2, 10, 11,  2,  2, 12,  2,   13,  2,  2,  2, 14,  2,  2, 15,
+      2,  2,  2,  2,  2,  2, 16, 17,   18,  2,  2,  2,  2, 19,  2,  2,
+     20,  2,  2,  2,  2,  2,  2, 21,   22,  2,  2, 23,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E5_9D_offsets 7126
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  4,    2,  2,  5,  2,  2,  2,  6,  7,
+      8,  9,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 10,  2,  2, 11,  2, 12,  2,    2, 13, 14,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 15,
+
+#define to_Shift_JIS_E5_9E_offsets 7192
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,    1,  1, 11,  1,  1,  1,  1,  1,
+     12,  1,  1, 13,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_9F_offsets 7258
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  2,    2,  2,  2,  5,  2,  2,  6,  2,
+      2,  2,  7,  8,  9,  2, 10,  2,    2,  2,  2,  2, 11,  2,  2, 12,
+     13,  2,  2, 14,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 15,  2,  2, 16,    2, 17, 18,  2, 19,  2,  2,  2,
+
+#define to_Shift_JIS_E5_A0_offsets 7324
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    2,  2,  6,  7,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  8,  2,  2,    2,  9,  2,  2,  2, 10,  2,  2,
+      2, 11,  2,  2, 12,  2,  2,  2,    2,  2, 13,  2,  2,  2,  2, 14,
+     15, 16,  2,  2, 17, 18,  2,  2,    2,  2, 19,  2,  2, 20,  2,  2,
+
+#define to_Shift_JIS_E5_A1_offsets 7390
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  3,  4,  5,  3,  3,  3,  3,
+      3,  6,  7,  3,  8,  3,  3,  9,   10, 11, 12,  3,  3,  3, 13,  3,
+      3,  3, 14,  3,  3,  3,  3,  3,    3, 15,  3, 16,  3,  3,  3,  3,
+     17,  3, 18,  3,  3, 19,  3,  3,    3, 20,  3,  3,  3,  3, 21,  3,
+
+#define to_Shift_JIS_E5_A2_offsets 7456
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  5,    1,  1,  1,  1,  6,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  1,  9,  1,  1, 10,  1,
+      1,  1,  1, 11,  1,  1,  1,  1,   12, 13, 14, 15,  1,  1, 16,  1,
+
+#define to_Shift_JIS_E5_A3_offsets 7522
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  1,  5,  1,  6,  1,  1,  1,
+      1,  7,  1,  8,  1,  9,  1, 10,   11, 12,  1,  1, 13,  1, 14, 15,
+      1,  1,  1,  1, 16, 17,  1,  1,    1,  1,  1, 18, 19,  1, 20, 21,
+     22, 23, 24,  1,  1,  1,  1, 25,    1, 26, 27, 28, 29, 30,  1,  1,
+
+#define to_Shift_JIS_E5_A4_offsets 7588
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  3,  4,  1,  1,  1,  1,  5,
+      6,  1,  1,  1,  1,  7,  8,  1,    9, 10, 11, 12, 13,  1,  1,  1,
+      1,  1, 14,  1,  1, 15,  1, 16,    1, 17, 18, 19, 20, 21, 22,  1,
+      1, 23, 24,  1,  1,  1,  1, 25,   26,  1,  1,  1,  1,  1, 27,  1,
+
+#define to_Shift_JIS_E5_A5_offsets 7654
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  1,  1,  1,  6,  7,
+      8,  9,  1,  1, 10, 11,  1, 12,   13,  1, 14,  1,  1,  1,  1,  1,
+     15,  1, 16,  1,  1, 17,  1, 18,   19, 20, 21,  1, 22,  1, 23,  1,
+      1,  1,  1, 24, 25,  1,  1,  1,   26,  1,  1,  1,  1, 27,  1,  1,
+
+#define to_Shift_JIS_E5_A6_offsets 7720
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,    1, 10,  1, 11,  1, 12,  1,  1,
+      1,  1,  1, 13,  1, 14,  1,  1,   15,  1,  1,  1, 16,  1,  1,  1,
+      1,  1, 17,  1,  1,  1,  1,  1,    1, 18,  1, 19,  1,  1, 20,  1,
+
+#define to_Shift_JIS_E5_A7_offsets 7786
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  4,  1,  1,  1,  1,
+      5,  6,  1,  7,  8,  1,  1,  1,    1,  9, 10,  1, 11,  1,  1,  1,
+      1,  1,  1,  1,  1, 12, 13,  1,   14,  1, 15, 16,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 17,  1,    1,  1,  1, 18,  1,  1,  1, 19,
+
+#define to_Shift_JIS_E5_A8_offsets 7852
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  8,  1,  1,  9,
+     10,  1,  1,  1,  1, 11,  1,  1,    1, 12,  1,  1,  1,  1,  1, 13,
+      1,  1,  1,  1,  1, 14, 15,  1,    1,  1,  1,  1, 16,  1,  1,  1,
+
+#define to_Shift_JIS_E5_A9_offsets 7918
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  3,    3,  5,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  6,  3,  3,  3,  3,  3,
+      3,  3,  7,  3,  3,  3,  8,  3,    3,  3,  9,  3, 10,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3, 11,
+
+#define to_Shift_JIS_E5_AA_offsets 7984
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  3,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  7,  1,
+
+#define to_Shift_JIS_E5_AB_offsets 8050
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 10,  1, 11,  1,  1, 12,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 14, 15,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_AC_offsets 8116
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  3,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  5,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  1,  7,  1,  8,  1,  1,  1,
+      9,  1, 10,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1, 12,  1,
+
+#define to_Shift_JIS_E5_AD_offsets 8182
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      5,  6,  2,  2,  7,  8,  2,  9,   10,  2, 11, 12, 13, 14,  2, 15,
+      2,  2,  2, 16, 17, 18, 19,  2,    2, 20,  2, 21,  2,  2,  2,  2,
+     22, 23,  2, 24,  2, 25,  2,  2,   26,  2, 27,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E5_AE_offsets 8248
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  5,    6,  7,  2,  8,  9, 10,  2, 11,
+      2,  2,  2,  2,  2, 12,  2, 13,   14, 15, 16, 17, 18, 19,  2, 20,
+      2,  2, 21, 22, 23, 24, 25,  2,    2,  2,  2,  2,  2,  2, 26,  2,
+     27,  2,  2, 28, 29, 30, 31,  2,   32, 33,  2,  2,  2,  2,  2, 34,
+
+#define to_Shift_JIS_E5_AF_offsets 8314
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    1,  8,  1,  1,  9,  1,  1,  1,
+     10,  1, 11, 12, 13,  1,  1,  1,    1,  1,  1, 14,  1, 15, 16, 17,
+      1, 18, 19,  1, 20, 21, 22, 23,   24, 25,  1, 26,  1,  1, 27,  1,
+     28,  1,  1, 29,  1, 30, 31,  1,   32,  1, 33,  1,  1,  1, 34, 35,
+
+#define to_Shift_JIS_E5_B0_offsets 8380
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  7,    8,  9, 10, 11,  1, 12, 13, 14,
+      1, 15,  1, 16,  1,  1, 17,  1,    1,  1, 18,  1,  1,  1,  1,  1,
+     19,  1, 20,  1, 21,  1,  1,  1,   22,  1,  1,  1,  1, 23,  1,  1,
+      1, 24,  1,  1,  1,  1,  1,  1,   25, 26, 27, 28, 29, 30, 31, 32,
+
+#define to_Shift_JIS_E5_B1_offsets 8446
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  3,    6,  3,  7,  8,  3,  9, 10, 11,
+     12, 13,  3, 14,  3, 15,  3,  3,    3,  3,  3,  3,  3,  3, 16,  3,
+     17, 18,  3,  3, 19, 20,  3,  3,    3,  3,  3,  3, 21,  3, 22, 23,
+      3, 24,  3,  3,  3,  3, 25,  3,    3, 26,  3,  3,  3,  3,  3,  3,
+
+#define to_Shift_JIS_E5_B2_offsets 8512
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  1,  1,    7,  8,  1,  9, 10,  1,  1,  1,
+      1, 11,  1, 12,  1,  1, 13, 14,   15,  1,  1, 16, 17,  1, 18,  1,
+
+#define to_Shift_JIS_E5_B3_offsets 8578
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  1,  1,  1,  1,    7,  8,  9,  1,  1, 10,  1, 11,
+     12,  1,  1,  1,  1,  1, 13,  1,    1,  1, 14, 15,  1, 16,  1,  1,
+
+#define to_Shift_JIS_E5_B4_offsets 8644
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  4,  1,
+      1,  5,  1,  1,  6,  7,  8,  9,   10, 11, 12, 13,  1,  1,  1, 14,
+      1,  1, 15,  1,  1,  1,  1,  1,    1, 16,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_B5_offsets 8710
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  4,  1,
+      5,  1,  6,  1,  1,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9,  1,  1, 10,
+      1,  1,  1, 11,  1,  1, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_B6_offsets 8776
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  1,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10,  1, 11,  1,
+      1,  1,  1,  1,  1,  1,  1, 12,    1,  1, 13,  1, 14, 15,  1,  1,
+
+#define to_Shift_JIS_E5_B7_offsets 8842
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  1,  1,
+      1,  1,  5,  6,  1,  1,  7,  1,    1,  1,  1,  8,  1,  9, 10,  1,
+      1, 11,  1, 12,  1, 13, 14, 15,   16,  1,  1, 17,  1,  1, 18,  1,
+      1, 19, 20, 21, 22, 23,  1, 24,    1,  1,  1, 25,  1, 26, 27,  1,
+
+#define to_Shift_JIS_E5_B8_offsets 8908
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    1,  1,  1,  5,  6,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    1,  9, 10, 11,  1, 12,  1,  1,
+      1,  1,  1,  1,  1, 13,  1,  1,    1,  1,  1, 14,  1, 15,  1, 16,
+     17,  1,  1, 18,  1,  1, 19, 20,   21,  1,  1,  1,  1, 22,  1,  1,
+
+#define to_Shift_JIS_E5_B9_offsets 8974
+128, 191,
+      1,  2,  2,  3,  4,  5,  2,  6,    2,  2,  2,  2,  7,  2,  8,  2,
+      2,  2,  2,  2,  9, 10,  2, 11,    2,  2,  2,  2,  2,  2,  2, 12,
+      2, 13, 14, 15, 16,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 17, 18, 19, 20, 21,  2,   22, 23, 24, 25, 26, 27, 28, 29,
+
+#define to_Shift_JIS_E5_BA_offsets 9040
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  5,    1,  1,  6,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  8,  9, 10,    1,  1, 11,  1, 12,  1,  1,  1,
+     13,  1,  1,  1,  1,  1, 14, 15,    1,  1,  1, 16,  1, 17,  1,  1,
+      1,  1,  1,  1,  1, 18, 19, 20,   21,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E5_BB_offsets 9106
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    5,  6,  7,  1,  1,  1,  1,  8,
+      9,  1,  1, 10,  1,  1, 11,  1,    1,  1, 12, 13,  1, 14,  1, 15,
+     16, 17, 18, 19,  1,  1,  1,  1,   20, 21,  1,  1, 22,  1,  1,  1,
+     23, 24,  1, 25, 26,  1, 27, 28,   29,  1, 30, 31, 32,  1, 33, 34,
+
+#define to_Shift_JIS_E5_BC_offsets 9172
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  5,  6,  7,  8,  9,  1, 10,
+     11, 12,  1, 13, 14, 15, 16, 17,   18,  1,  1, 19,  1,  1,  1, 20,
+      1,  1,  1,  1,  1, 21, 22, 23,    1, 24,  1,  1,  1, 25,  1, 26,
+      1, 27,  1,  1,  1, 28,  1, 29,   30,  1,  1,  1, 31,  1, 32,  1,
+
+#define to_Shift_JIS_E5_BD_offsets 9238
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  4,  1,  5,  1,  6,  1,
+      1,  7,  1,  8,  1,  1,  9, 10,    1, 11,  1,  1, 12, 13,  1,  1,
+      1, 14, 15,  1,  1,  1, 16,  1,    1, 17, 18, 19, 20, 21,  1,  1,
+     22, 23,  1, 24,  1,  1,  1, 25,    1, 26,  1,  1, 27,  1,  1, 28,
+
+#define to_Shift_JIS_E5_BE_offsets 9304
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  7, 10, 11, 12,  7,  7,  7,
+     13, 14, 15, 16,  7,  7,  7, 17,   18, 19,  7,  7,  7,  7, 20,  7,
+     21, 22,  7,  7,  7,  7,  7,  7,   23, 24, 25,  7,  7, 26, 27,  7,
+      7,  7,  7, 28, 29,  7,  7,  7,    7, 30,  7,  7, 31, 32,  7,  7,
+
+#define to_Shift_JIS_E5_BF_offsets 9370
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    8,  9,  1,  1, 10, 11,  1,  1,
+     12,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+     15, 16,  1,  1,  1, 17,  1,  1,   18,  1,  1, 19,  1, 20,  1, 21,
+
+#define to_Shift_JIS_E6_80_offsets 9436
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      4,  1,  5,  1,  1,  6,  7,  1,    1,  8,  1,  9, 10, 11,  1,  1,
+     12, 13,  1,  1,  1, 14, 15, 16,   17, 18, 19, 20,  1,  1,  1, 21,
+      1, 22,  1,  1,  1,  1,  1,  1,    1,  1, 23,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_81_offsets 9502
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    1,  1,  6,  7,  1,  8,  1,  1,
+      9,  1, 10,  1,  1, 11,  1,  1,    1, 12, 13,  1,  1,  1,  1, 14,
+     15,  1, 16, 17, 18, 19,  1,  1,   20, 21, 22, 23, 24, 25,  1, 26,
+     27,  1,  1,  1,  1, 28,  1, 29,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_82_offsets 9568
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  5,  1,  6,  7,  8,  1,  1,
+      1,  1,  9,  1, 10,  1, 11, 12,    1,  1, 13, 14,  1,  1,  1, 15,
+     16,  1,  1, 17,  1,  1, 18, 19,    1, 20, 21,  1,  1,  1,  1,  1,
+      1,  1, 22, 23, 24, 25, 26,  1,   27,  1,  1,  1, 28, 29,  1,  1,
+
+#define to_Shift_JIS_E6_83_offsets 9634
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  1,  1,  1,    7,  1,  8,  1,  9,  1,  1, 10,
+     11, 12,  1, 13,  1,  1,  1, 14,   15,  1,  1,  1,  1,  1,  1,  1,
+     16, 17,  1, 18, 19,  1, 20, 21,    1, 22, 23, 24,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_84_offsets 9700
+128, 191,
+      1,  2,  3,  4,  3,  3,  5,  3,    6,  7,  3,  3,  3,  8,  9, 10,
+      3,  3,  3,  3,  3, 11,  3,  3,    3,  3, 12, 13,  3,  3,  3, 14,
+      3, 15,  3,  3,  3,  3,  3, 16,   17,  3,  3,  3, 18,  3,  3,  3,
+      3,  3,  3,  3, 19,  3,  3,  3,    3,  3,  3,  3, 20, 21, 22, 23,
+
+#define to_Shift_JIS_E6_85_offsets 9766
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  1,  6,  7,  8,  9, 10,  1,
+      1,  1,  1, 11,  1, 12,  1,  1,   13, 14, 15,  1,  1, 16,  1, 17,
+      1,  1, 18, 19,  1, 20,  1, 21,   22,  1,  1, 23,  1,  1, 24, 25,
+     26, 27,  1, 28, 29, 30, 31, 32,    1,  1,  1,  1,  1,  1, 33,  1,
+
+#define to_Shift_JIS_E6_86_offsets 9832
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  1,  5,  1,
+      6,  7,  1,  1,  8,  1,  9,  1,    1, 10, 11,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1, 13,    1, 14,  1, 15, 16,  1, 17,  1,
+      1,  1, 18,  1,  1,  1, 19,  1,    1,  1, 20,  1,  1,  1, 21,  1,
+
+#define to_Shift_JIS_E6_87_offsets 9898
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  6,  7,  8,  9, 10,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 12,  1,  1, 13,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 14,  1, 15,  1, 16, 17,   18,  1, 19,  1, 20, 21, 22, 23,
+
+#define to_Shift_JIS_E6_88_offsets 9964
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  5,  2,  6,  7,  8,  2,
+      9, 10, 11,  2, 12,  2, 13,  2,    2,  2, 14, 15,  2, 16, 17, 18,
+      2, 19,  2,  2,  2,  2, 20,  2,    2,  2, 21,  2,  2,  2, 22, 23,
+     24,  2, 25, 26, 27,  2,  2,  2,   28,  2,  2, 29,  2,  2,  2, 30,
+
+#define to_Shift_JIS_E6_89_offsets 10030
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  7,  3,  8,  9,  3,
+      3,  3,  3, 10,  3, 11,  3,  3,   12,  3,  3, 13,  3,  3, 14,  3,
+     15,  3,  3, 16,  3,  3,  3,  3,   17,  3,  3,  3,  3,  3, 18,  3,
+      3, 19,  3,  3,  3,  3, 20,  3,    3, 21,  3,  3, 22,  3, 23, 24,
+
+#define to_Shift_JIS_E6_8A_offsets 10096
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  2,    2,  6,  7,  2,  2,  2,  2,  2,
+      2,  8,  9, 10, 11, 12, 13, 14,   15,  2,  2, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 19, 20,  2,  2,  2,
+      2, 21,  2,  2,  2, 22,  2,  2,    2, 23,  2, 24, 25, 26,  2,  2,
+
+#define to_Shift_JIS_E6_8B_offsets 10162
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    6,  7,  8,  1,  9, 10,  1, 11,
+     12, 13, 14, 15, 16,  1,  1, 17,   18, 19,  1, 20, 21, 22,  1,  1,
+     23, 24,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 25, 26, 27, 28,
+      1, 29,  1, 30,  1, 31, 32, 33,    1,  1,  1,  1,  1,  1, 34, 35,
+
+#define to_Shift_JIS_E6_8C_offsets 10228
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  4,    5,  6,  1,  1,  7,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1,  1,  1, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,   12,  1,  1, 13,  1,  1,  1, 14,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 15,  1,  1, 16, 17, 18,
+
+#define to_Shift_JIS_E6_8D_offsets 10294
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  1,  5,
+      6,  1,  1,  1,  1,  7,  1,  8,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,   11, 12,  1, 13,  1,  1, 14,  1,
+      1,  1, 15,  1,  1,  1, 16, 17,    1,  1, 18, 19,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_8E_offsets 10360
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  2,  6,  2,  7,  8,
+      2,  2,  9,  2,  2,  2, 10,  2,   11,  2,  2, 12,  2,  2,  2, 13,
+     14, 15, 16, 17,  2, 18,  2, 19,   20, 21, 22, 23, 24,  2,  2,  2,
+      2,  2, 25,  2, 26, 27,  2,  2,    2,  2,  2, 28,  2,  2, 29,  2,
+
+#define to_Shift_JIS_E6_8F_offsets 10426
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  6,  2,  2,  2,  2,  2,  7,
+      8,  2,  9,  2,  2,  2, 10,  2,    2,  2, 11, 12,  2,  2,  2,  2,
+      2, 13,  2, 14,  2,  2,  2,  2,    2, 15,  2,  2,  2,  2, 16,  2,
+      2,  2,  2,  2, 17,  2, 18,  2,    2,  2, 19,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E6_90_offsets 10492
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  3,  1,  4,
+      1,  1,  1,  5,  1,  1,  6,  7,    1,  1,  1,  1,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,   10,  1,  1,  1, 11, 12,  1,  1,
+      1,  1,  1,  1, 13,  1, 14,  1,    1,  1, 15,  1,  1,  1, 16,  1,
+
+#define to_Shift_JIS_E6_91_offsets 10558
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  5,    1,  6,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  8,  1,    9,  1, 10,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_92_offsets 10624
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  5,  1,  6,  1,  1,    1,  1,  7,  1,  1,  1,  8,  1,
+      1,  1,  1,  1,  9, 10,  1,  1,    1, 11,  1, 12,  1, 13, 14,  1,
+     15,  1, 16,  1,  1,  1,  1,  1,    1, 17,  1, 18, 19,  1,  1,  1,
+
+#define to_Shift_JIS_E6_93_offsets 10690
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  1,  1,  1,  1,  6,  1,  1,
+      1,  1,  7,  1,  8,  1,  1,  1,    9,  1, 10,  1,  1,  1,  1,  1,
+     11, 12, 13, 14,  1,  1, 15, 16,    1,  1,  1,  1, 17,  1,  1, 18,
+      1, 19, 20,  1, 21,  1, 22,  1,    1,  1, 23,  1,  1, 24, 25,  1,
+
+#define to_Shift_JIS_E6_94_offsets 10756
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    4,  2,  2,  2,  5,  6,  2,  2,
+      2,  2,  2,  7,  8,  2,  2,  2,    2,  2,  9, 10, 11,  2,  2, 12,
+      2,  2,  2,  2, 13, 14, 15, 16,   17, 18,  2, 19,  2,  2, 20, 21,
+
+#define to_Shift_JIS_E6_95_offsets 10822
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  1,  4,  1,  5,
+      1,  6,  1,  1,  1,  7,  8,  9,   10, 11,  1,  1,  1, 12, 13,  1,
+      1,  1, 14, 15,  1,  1, 16,  1,    1,  1,  1,  1, 17,  1,  1,  1,
+     18,  1, 19,  1, 20, 21,  1, 22,   23,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_96_offsets 10888
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  4,    5,  6,  1,  1,  7,  1,  8,  1,
+      9, 10,  1,  1,  1,  1,  1, 11,    1, 12,  1, 13, 14,  1,  1, 15,
+      1, 16,  1,  1, 17, 18,  1, 19,    1,  1,  1, 20, 21, 22,  1, 23,
+     24,  1,  1,  1,  1,  1,  1, 25,    1, 26,  1,  1, 27, 28,  1,  1,
+
+#define to_Shift_JIS_E6_97_offsets 10954
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    1,  1,  1,  7,  8,  1,  1,  9,
+      1,  1, 10,  1,  1,  1,  1, 11,    1, 12,  1, 13,  1,  1,  1,  1,
+     14, 15, 16,  1,  1, 17, 18, 19,   20, 21,  1,  1, 22, 23,  1,  1,
+      1, 24,  1,  1,  1,  1,  1,  1,    1,  1, 25, 26,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_98_offsets 11020
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  6,  1,  7,  1,  8,  9,
+      1,  1,  1, 10, 11,  1,  1,  1,    1,  1,  1,  1, 12,  1,  1, 13,
+     14,  1,  1,  1,  1, 15,  1, 16,   17,  1,  1,  1,  1, 18,  1, 19,
+      1,  1,  1,  1, 20, 21, 22,  1,    1,  1,  1,  1, 23,  1,  1, 24,
+
+#define to_Shift_JIS_E6_99_offsets 11086
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  6,  1,  7,  1,  1,  1,  8,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10, 11, 12,
+      1,  1, 13,  1, 14,  1, 15, 16,   17, 18,  1,  1,  1,  1, 19, 20,
+     21,  1,  1,  1, 22,  1, 23,  1,    1,  1, 24,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_9A_offsets 11152
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  5,    6,  7,  1,  1,  1,  1,  8,  1,
+      1,  9,  1,  1,  1,  1, 10, 11,   12,  1,  1,  1,  1, 13,  1,  1,
+      1,  1, 14,  1,  1,  1, 15,  1,    1,  1,  1, 16,  1,  1, 17,  1,
+      1,  1,  1,  1, 18,  1,  1,  1,   19, 20,  1,  1, 21,  1, 22,  1,
+
+#define to_Shift_JIS_E6_9B_offsets 11218
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  7,  8,  1,  9, 10,  1,  1,
+     11,  1,  1,  1,  1,  1, 12,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+     14,  1, 15, 16, 17, 18,  1, 19,   20, 21,  1,  1, 22, 23, 24, 25,
+
+#define to_Shift_JIS_E6_9C_offsets 11284
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  2,  8,
+      2,  2,  2,  2,  9, 10, 11, 12,    2,  2,  2, 13,  2, 14, 15, 16,
+      2,  2,  2,  2,  2,  2, 17, 18,   19,  2, 20, 21, 22, 23, 24,  2,
+      2, 25,  2,  2, 26,  2, 27, 28,   29,  2, 30,  2,  2, 31,  2, 32,
+
+#define to_Shift_JIS_E6_9D_offsets 11350
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    1,  4,  1,  1,  1,  1,  5,  6,
+      7,  8,  1,  9,  1,  1, 10,  1,    1, 11,  1,  1, 12,  1, 13, 14,
+     15, 16, 17, 18, 19, 20,  1,  1,    1,  1, 21,  1,  1, 22,  1, 23,
+     24, 25, 26, 27,  1, 28,  1, 29,    1,  1,  1,  1, 30,  1, 31, 32,
+
+#define to_Shift_JIS_E6_9E_offsets 11416
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  1,  9,    1,  1, 10,  1, 11, 12,  1,  1,
+     13, 14, 15,  1,  1,  1, 16,  1,    1, 17,  1,  1,  1,  1,  1, 18,
+      1,  1,  1, 19, 20,  1, 21, 22,   23, 24,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_9F_offsets 11482
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    1,  1,  5,  1,  1,  1,  6,  7,
+      8,  9,  1, 10, 11,  1,  1,  1,   12,  1, 13,  1,  1, 14, 15,  1,
+      1,  1, 16,  1, 17,  1,  1, 18,    1, 19,  1,  1, 20,  1, 21, 22,
+      1, 23,  1, 24, 25, 26,  1,  1,    1,  1,  1, 27,  1,  1, 28, 29,
+
+#define to_Shift_JIS_E6_A0_offsets 11548
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  6,  7,    1,  1,  1,  1,  1,  1,  8,  1,
+      1,  9, 10,  1,  1,  1,  1,  1,    1, 11, 12, 13,  1,  1,  1,  1,
+      1,  1, 14,  1, 15,  1,  1,  1,   16, 17,  1,  1, 18, 19,  1,  1,
+
+#define to_Shift_JIS_E6_A1_offsets 11614
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  5,    7,  5,  5,  5,  5,  8,  9,  5,
+     10, 11,  5, 12, 13,  5,  5,  5,    5, 14,  5,  5, 15, 16,  5, 17,
+      5,  5,  5, 18,  5,  5,  5, 19,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5, 20,  5, 21, 22,    5,  5,  5,  5,  5,  5, 23, 24,
+
+#define to_Shift_JIS_E6_A2_offsets 11680
+128, 191,
+      1,  2,  1,  3,  1,  4,  1,  1,    1,  1,  1,  1,  1,  5,  1,  6,
+      1,  1,  1,  7,  8,  1,  1,  9,    1,  1,  1, 10,  1, 11,  1, 12,
+     13,  1, 14,  1,  1,  1, 15, 16,   17,  1,  1,  1,  1, 18,  1, 19,
+     20, 21,  1, 22,  1, 23, 24,  1,    1, 25, 26,  1, 27,  1,  1,  1,
+
+#define to_Shift_JIS_E6_A3_offsets 11746
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  4,  5,  6,  1,  7,  1,  1,
+      1,  1,  8,  1,  9, 10,  1, 11,   12,  1, 13,  1,  1,  1,  1, 14,
+     15, 16,  1, 17,  1,  1,  1, 18,    1,  1,  1,  1,  1,  1, 19, 20,
+      1,  1, 21,  1,  1,  1,  1,  1,    1, 22, 23,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_A4_offsets 11812
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    6,  3,  3,  7,  8,  9, 10, 11,
+      3,  3, 12,  3,  3,  3,  3,  3,    3, 13, 14, 15, 16,  3,  3,  3,
+      3, 17, 18, 19,  3, 20, 21,  3,   22,  3, 23,  3,  3,  3,  3,  3,
+     24,  3,  3,  3, 25,  3, 26,  3,    3, 27,  3,  3,  3, 28,  3, 29,
+
+#define to_Shift_JIS_E6_A5_offsets 11878
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  3,  4,  5,  1,  1,    1,  6,  7,  1,  8,  9, 10,  1,
+     11, 12, 13,  1,  1,  1,  1,  1,    1,  1, 14, 15,  1, 16, 17, 18,
+      1,  1,  1, 19, 20, 21,  1, 22,   23, 24,  1,  1, 25, 26, 27,  1,
+
+#define to_Shift_JIS_E6_A6_offsets 11944
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      1,  6,  1,  1,  7,  8,  1,  1,    1,  1,  1,  9, 10,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1, 13,  1,
+      1, 14, 15,  1, 16,  1,  1,  1,    1,  1,  1, 17,  1,  1, 18, 19,
+
+#define to_Shift_JIS_E6_A7_offsets 12010
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  4,    1,  1,  5,  6,  7,  8,  9,  1,
+     10,  1,  1, 11,  1,  1,  1,  1,   12, 13,  1,  1,  1, 14, 15,  1,
+      1,  1,  1,  1,  1,  1,  1, 16,   17,  1,  1, 18,  1, 19,  1,  1,
+      1,  1, 20,  1,  1,  1,  1,  1,    1, 21,  1, 22,  1, 23,  1, 24,
+
+#define to_Shift_JIS_E6_A8_offsets 12076
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  1,  4,  5,  6,  1,  1,  1,
+      1,  1,  7,  8,  9,  1,  1, 10,    1, 11,  1, 12,  1,  1, 13, 14,
+      1, 15, 16, 17,  1,  1,  1,  1,    1, 18, 19, 20,  1,  1, 21,  1,
+      1,  1,  1,  1,  1, 22, 23,  1,   24, 25, 26,  1,  1, 27,  1,  1,
+
+#define to_Shift_JIS_E6_A9_offsets 12142
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  7,  1,  1,  1,  1,  1,  8,
+      1,  9, 10,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 12,  1,  1,  1,  1,  1,   13,  1,  1,  1,  1,  1,  1, 14,
+
+#define to_Shift_JIS_E6_AA_offsets 12208
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  4,  5,  2,
+      6,  2,  2,  2,  2,  2,  2,  7,    2,  2,  2,  2,  8,  2,  2,  2,
+      9,  2, 10, 11,  2,  2,  2,  2,    2,  2, 12,  2, 13,  2, 14,  2,
+      2,  2,  2, 15,  2,  2,  2,  2,   16,  2,  2, 17,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E6_AB_offsets 12274
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  1,  1,  1,    1,  1,  7,  8,  1,  1,  9, 10,
+      1,  1,  1,  1,  1,  1,  1,  1,   11,  1, 12,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 13, 14,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_AC_offsets 12340
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  7,  1,  8,
+      9, 10,  1, 11,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 13,  1,  1,  1,  1, 14,   15, 16, 17,  1,  1, 18, 19,  1,
+
+#define to_Shift_JIS_E6_AD_offsets 12406
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  4,  1,  1,  5,  1,  6,  1,
+      7,  1,  1,  8,  9,  1,  1,  1,    1, 10,  1, 11,  1,  1,  1, 12,
+      1, 13, 14, 15, 16,  1, 17,  1,    1, 18, 19,  1,  1,  1,  1, 20,
+      1,  1,  1, 21, 22,  1,  1,  1,   23, 24,  1, 25,  1,  1,  1, 26,
+
+#define to_Shift_JIS_E6_AE_offsets 12472
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  6,  7,  8,  2,  9,  2,  2,
+      2,  2,  2,  2,  2, 10, 11,  2,   12,  2,  2,  2,  2,  2, 13,  2,
+      2,  2,  2,  2, 14,  2,  2,  2,    2,  2, 15, 16,  2,  2,  2, 17,
+      2, 18, 19, 20, 21, 22,  2, 23,    2,  2, 24, 25, 26,  2,  2, 27,
+
+#define to_Shift_JIS_E6_AF_offsets 12538
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  2,    2,  2,  2,  5,  2,  6,  7,  2,
+      2,  2,  8,  9, 10,  2,  2,  2,   11,  2,  2, 12,  2,  2,  2, 13,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 14, 15,  2,  2, 16,
+      2,  2,  2, 17,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E6_B0_offsets 12604
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  5,  6,  1,  1,  7,    1,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  9, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 11,  1,  1, 12,   13,  1,  1,  1,  1,  1, 14,  1,
+
+#define to_Shift_JIS_E6_B1_offsets 12670
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  4,
+      6,  4,  4,  4,  4,  7,  4,  8,    4,  4,  9,  4,  4, 10, 11, 12,
+     13,  4, 14,  4,  4,  4,  4,  4,   15,  4, 16,  4,  4,  4,  4,  4,
+     17,  4, 18, 19,  4,  4,  4,  4,    4,  4, 20,  4,  4, 21, 22,  4,
+
+#define to_Shift_JIS_E6_B2_offsets 12736
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    5,  1,  1,  1,  6,  7,  1,  1,
+      8,  1,  9, 10,  1,  1, 11,  1,    1, 12, 13, 14,  1,  1,  1,  1,
+      1, 15, 16,  1,  1,  1,  1,  1,    1,  1,  1, 17,  1,  1, 18,  1,
+      1, 19,  1, 20,  1,  1,  1,  1,   21, 22, 23, 24, 25, 26, 27, 28,
+
+#define to_Shift_JIS_E6_B3_offsets 12802
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1, 10,    1, 11,  1, 12,  1, 13,  1,  1,
+      1, 14, 15, 16,  1, 17,  1,  1,   18,  1, 19,  1,  1,  1,  1, 20,
+     21, 22,  1, 23,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_B4_offsets 12868
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  1,  1,
+      1,  1,  4,  1,  1,  1,  1,  5,    1,  6,  1,  7,  1,  1,  8,  9,
+      1,  1,  1,  1,  1, 10,  1,  1,    1, 11, 12, 13,  1,  1,  1,  1,
+      1,  1, 14, 15,  1, 16, 17,  1,   18,  1,  1, 19,  1, 20, 21,  1,
+
+#define to_Shift_JIS_E6_B5_offsets 12934
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  9,  1, 10,  1,    1, 11, 12,  1, 13,  1, 14,  1,
+      1,  1,  1,  1, 15,  1,  1, 16,   17, 18,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E6_B6_offsets 13000
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  4,  1,  5,  1,
+      1,  1,  1,  6,  1,  7,  1,  1,    1,  8,  1,  9, 10,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 11,
+      1,  1, 12,  1,  1, 13,  1,  1,   14,  1,  1,  1, 15,  1,  1,  1,
+
+#define to_Shift_JIS_E6_B7_offsets 13066
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  5,    2,  2,  2,  6,  7,  2,  2,  2,
+      2,  8,  9,  2,  2, 10,  2,  2,   11, 12,  2,  2,  2,  2, 13,  2,
+      2, 14,  2,  2, 15,  2, 16,  2,   17,  2, 18, 19, 20,  2, 21,  2,
+      2, 22,  2, 23,  2, 24,  2, 25,    2, 26, 27, 28,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E6_B8_offsets 13132
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1,  1,    1, 10, 11, 12,  1, 13,  1, 14,
+     15, 16,  1, 17, 18, 19, 20,  1,    1, 21,  1, 22, 23, 24, 25, 26,
+      1,  1,  1,  1,  1,  1,  1,  1,   27,  1, 28,  1,  1,  1, 29,  1,
+
+#define to_Shift_JIS_E6_B9_offsets 13198
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  3,  1,  1,  4,  5,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    7,  1,  1,  8,  1,  1,  1,  9,
+      1,  1,  1,  1,  1,  1,  1, 10,    1,  1,  1, 11,  1,  1, 12, 13,
+      1,  1, 14,  1,  1,  1, 15,  1,    1,  1,  1,  1,  1,  1, 16, 17,
+
+#define to_Shift_JIS_E6_BA_offsets 13264
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  5,
+      6,  2,  2,  2,  2,  2,  7,  2,    8,  2,  2,  2,  9, 10,  2, 11,
+      2,  2, 12,  2,  2, 13,  2,  2,    2,  2, 14,  2,  2,  2,  2, 15,
+      2,  2, 16,  2,  2,  2, 17, 18,    2,  2, 19,  2,  2, 20,  2,  2,
+
+#define to_Shift_JIS_E6_BB_offsets 13330
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    1,  5,  1,  6,  7,  1,  1,  1,
+      1,  8,  1,  9, 10, 11,  1,  1,    1,  1,  1,  1,  1, 12, 13,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 14,  1,  1, 15,
+      1,  1, 16,  1, 17,  1,  1, 18,   19,  1,  1,  1,  1,  1, 20, 21,
+
+#define to_Shift_JIS_E6_BC_offsets 13396
+128, 191,
+      1,  2,  3,  1,  1,  1,  4,  1,    1,  5,  1,  1,  1,  1,  1,  6,
+      1,  7,  1,  8,  9, 10,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     11,  1, 12, 13,  1,  1,  1,  1,    1,  1,  1, 14, 15,  1,  1,  1,
+      1, 16, 17,  1,  1,  1,  1,  1,   18,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_Shift_JIS_E6_BD_offsets 13462
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  6,  7,  1,  1,  8,
+      1,  1,  1,  1,  9,  1, 10,  1,    1,  1,  1,  1,  1, 11, 12, 13,
+     14,  1,  1,  1, 15,  1,  1,  1,   16,  1, 17,  1, 18,  1,  1,  1,
+
+#define to_Shift_JIS_E6_BE_offsets 13528
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  4,    4,  4,  4,  4,  4,  4,  7,  4,
+      4,  8,  4,  4,  4,  4,  4,  9,    4,  4,  4,  4,  4,  4,  4,  4,
+      4, 10,  4, 11, 12,  4,  4,  4,    4,  4, 13,  4,  4,  4,  4,  4,
+      4, 14,  4, 15,  4,  4,  4,  4,    4, 16,  4,  4,  4,  4,  4,  4,
+
+#define to_Shift_JIS_E6_BF_offsets 13594
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  7,  8,  5,  5,    9,  5,  5, 10,  5,  5,  5, 11,
+     12, 13,  5,  5, 14,  5,  5,  5,    5,  5,  5, 15, 16,  5, 17, 18,
+      5, 19,  5, 20,  5,  5, 21,  5,    5,  5, 22,  5,  5,  5, 23,  5,
+
+#define to_Shift_JIS_E7_80_offsets 13660
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  4,  1,  1,  1,  5,
+      1,  6,  1,  1,  1,  7,  1,  1,    8,  1,  9, 10,  1, 11, 12, 13,
+      1,  1,  1,  1,  1,  1, 14, 15,    1,  1,  1,  1, 16,  1,  1,  1,
+     17,  1, 18,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 19,  1,
+
+#define to_Shift_JIS_E7_81_offsets 13726
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  7,
+      8,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1,  1, 10, 11,  1,  1,
+
+#define to_Shift_JIS_E7_82_offsets 13792
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  1,  4,  1,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  7,  8,  9, 10,
+      1,  1,  1, 11,  1,  1,  1,  1,   12, 13, 14,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_83_offsets 13858
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  3,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  6,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1, 10,  1,  1,
+
+#define to_Shift_JIS_E7_84_offsets 13924
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1,  1, 10,  1,  1,  1,
+
+#define to_Shift_JIS_E7_85_offsets 13990
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  1,  4,  1,
+      1,  1,  1,  1,  1,  5,  6,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  8,  1,  9, 10, 11, 12,    1, 13,  1,  1, 14,  1, 15,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 16,  1,  1,
+
+#define to_Shift_JIS_E7_86_offsets 14056
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  4,  1,  1,  1,  1,  5,
+      1,  1,  1,  1,  6,  7,  1,  1,    1,  8,  1,  1,  1,  1,  1,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+      1, 12,  1,  1,  1,  1,  1,  1,    1, 13,  1,  1,  1,  1, 14,  1,
+
+#define to_Shift_JIS_E7_87_offsets 14122
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  4,  1,  1,  1,  1,  5,  1,
+      6,  1,  7,  1,  8,  9,  1, 10,    1,  1,  1,  1,  1,  1,  1, 11,
+     12,  1,  1,  1,  1, 13, 14, 15,    1,  1,  1,  1, 16, 17, 18,  1,
+      1,  1,  1,  1,  1, 19,  1,  1,    1, 20,  1, 21, 22,  1,  1, 23,
+
+#define to_Shift_JIS_E7_88_offsets 14188
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  8,  9,  1,  1,
+     10,  1, 11,  1,  1, 12, 13,  1,    1,  1, 14, 15, 16, 17, 18, 19,
+
+#define to_Shift_JIS_E7_89_offsets 14254
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    5,  2,  2,  6,  7,  2,  2,  2,
+      2,  2,  8,  2,  2,  2,  2,  2,    9, 10,  2, 11,  2, 12,  2, 13,
+      2, 14, 15,  2,  2,  2,  2, 16,    2, 17,  2,  2,  2,  2,  2,  2,
+      2,  2, 18,  2, 19,  2,  2,  2,    2, 20,  2,  2,  2, 21, 22,  2,
+
+#define to_Shift_JIS_E7_8A_offsets 14320
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  5,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  6,  4,  4,  4,  7,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  4,  9,  4,  4,  4,  4, 10,    4,  4,  4,  4, 11,  4,  4, 12,
+      4,  4, 13,  4,  4,  4, 14,  4,    4, 15,  4,  4,  4,  4,  4,  4,
+
+#define to_Shift_JIS_E7_8B_offsets 14386
+128, 191,
+      1,  1,  2,  3,  4,  1,  5,  1,    1,  1,  1,  1,  1,  1,  6,  1,
+      7,  1,  8,  1,  1,  1,  1,  9,    1, 10,  1, 11,  1,  1,  1,  1,
+     12, 13, 14,  1,  1,  1,  1,  1,    1, 15,  1,  1, 16, 17,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 18,   19, 20,  1,  1, 21, 22,  1,  1,
+
+#define to_Shift_JIS_E7_8C_offsets 14452
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  1,  1,  1,  9,  1,  1,    1, 10, 11, 12,  1,  1, 13, 14,
+      1,  1,  1,  1, 15,  1, 16, 17,    1,  1,  1,  1,  1,  1, 18, 19,
+
+#define to_Shift_JIS_E7_8D_offsets 14518
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  1,  1,    8,  1,  9,  1,  1,  1,  1,  1,
+     10,  1, 11,  1,  1, 12,  1,  1,   13,  1, 14, 15,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_8E_offsets 14584
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1, 10,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_8F_offsets 14650
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  2,  5,  2,  2,  6,  7,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  8,  2,
+      9,  2,  2,  2,  2, 10,  2,  2,    2,  2, 11,  2,  2, 12, 13,  2,
+      2, 14,  2,  2,  2,  2,  2,  2,   15,  2,  2,  2,  2,  2, 16,  2,
+
+#define to_Shift_JIS_E7_90_offsets 14716
+128, 191,
+      1,  1,  1,  2,  1,  3,  4,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  8,  9, 10, 11, 12,  1,    1,  1, 13,  1,  1,  1,  1, 14,
+
+#define to_Shift_JIS_E7_91_offsets 14782
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  4,  5,  6,  7,  1,  8,  9,
+     10,  1,  1, 11, 12,  1,  1,  1,    1, 13, 14,  1,  1,  1,  1, 15,
+     16,  1,  1, 17,  1,  1, 18,  1,    1,  1,  1,  1,  1,  1, 19,  1,
+
+#define to_Shift_JIS_E7_92_offsets 14848
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  1,  5,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  1,  1,
+
+#define to_Shift_JIS_E7_93_offsets 14914
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  3,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      6,  1,  7,  8,  1,  1,  9, 10,    1, 11,  1,  1,  1,  1, 12,  1,
+     13, 14, 15,  1,  1,  1, 16, 17,   18,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_94_offsets 14980
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  1,    1,  1,  1,  1,  5,  6,  7,  1,
+      1,  8,  1,  9,  1, 10,  1,  1,   11,  1, 12,  1, 13,  1, 14, 15,
+      1,  1,  1, 16,  1, 17, 18,  1,   19,  1,  1, 20, 21,  1,  1,  1,
+     22, 23, 24, 25,  1,  1,  1, 26,   27,  1, 28, 29, 30,  1,  1,  1,
+
+#define to_Shift_JIS_E7_95_offsets 15046
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  4,  5,  6,  7,  8,  1,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,    1, 12, 13, 14, 15, 16,  1,  1,
+     17,  1, 18,  1, 19, 20, 21, 22,    1, 23, 24, 25,  1, 26,  1,  1,
+     27,  1,  1, 28, 29,  1, 30, 31,   32,  1,  1,  1,  1,  1,  1, 33,
+
+#define to_Shift_JIS_E7_96_offsets 15112
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    1,  5,  6,  7,  1,  1,  8,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,    1,  1, 12,  1,  1, 13,  1,  1,
+      1,  1,  1, 14,  1, 15,  1,  1,    1,  1,  1, 16,  1,  1,  1,  1,
+      1, 17, 18, 19,  1, 20,  1,  1,   21, 22,  1,  1, 23, 24, 25,  1,
+
+#define to_Shift_JIS_E7_97_offsets 15178
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  5,    1,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  9, 10,  1,  1,   11, 12,  1, 13,  1,  1, 14,  1,
+      1,  1, 15, 16,  1,  1,  1,  1,    1, 17,  1,  1,  1,  1,  1,  1,
+     18,  1, 19, 20, 21,  1,  1,  1,    1,  1, 22,  1, 23,  1, 24, 25,
+
+#define to_Shift_JIS_E7_98_offsets 15244
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  4,  1,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      7,  8,  9,  1, 10,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_99_offsets 15310
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    5,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  1,    9,  1,  1,  1, 10,  1,  1,  1,
+      1, 11, 12,  1,  1,  1,  1, 13,   14, 15, 16,  1, 17,  1,  1,  1,
+     18,  1, 19,  1,  1,  1, 20,  1,   21,  1, 22, 23, 24, 25, 26,  1,
+
+#define to_Shift_JIS_E7_9A_offsets 15376
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    7,  2,  2,  8,  2,  2,  9,  2,
+     10,  2,  2, 11,  2,  2, 12,  2,    2, 13, 14,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2, 15,  2,
+     16,  2,  2,  2, 17,  2,  2, 18,   19, 20, 21,  2,  2,  2,  2, 22,
+
+#define to_Shift_JIS_E7_9B_offsets 15442
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    5,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  1,  1,  9, 10,    1,  1,  1, 11, 12,  1, 13, 14,
+      1, 15,  1, 16, 17, 18,  1, 19,    1,  1, 20,  1,  1,  1, 21,  1,
+      1,  1, 22,  1, 23,  1,  1,  1,   24,  1,  1, 25,  1,  1, 26,  1,
+
+#define to_Shift_JIS_E7_9C_offsets 15508
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1, 10, 11,
+     12,  1,  1,  1, 13, 14, 15,  1,    1, 16,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 17,   18,  1, 19,  1, 20,  1,  1,  1,
+
+#define to_Shift_JIS_E7_9D_offsets 15574
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  4,  5,  2,  2,  2,  2,
+      2,  6,  2,  7,  2,  8,  9,  2,   10,  2,  2, 11,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2, 12,  2,  2,  2,  2, 13, 14,
+
+#define to_Shift_JIS_E7_9E_offsets 15640
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  1,  3,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  5,  1,
+      6,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+     10,  1,  1, 11,  1,  1, 12,  1,    1, 13,  1, 14, 15, 16,  1, 17,
+
+#define to_Shift_JIS_E7_9F_offsets 15706
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  4,    1,  1,  5,  6,  7,  1,  1,  1,
+      1,  1,  8,  9,  1, 10,  1, 11,    1, 12,  1,  1,  1, 13, 14, 15,
+      1,  1,  1, 16,  1,  1,  1,  1,    1,  1,  1,  1, 17,  1,  1,  1,
+
+#define to_Shift_JIS_E7_A0_offsets 15772
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  1,
+      1,  1,  4,  1,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  9, 10,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 11,  1, 12,  1,  1,  1,    1,  1, 13,  1,  1,  1,  1, 14,
+
+#define to_Shift_JIS_E7_A1_offsets 15838
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  4,  5,  1,  1,  6,
+      1,  1,  7,  1,  8,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+
+#define to_Shift_JIS_E7_A2_offsets 15904
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  4,    1,  1,  1,  1,  5,  6,  7,  1,
+      1,  8,  1,  9,  1, 10,  1, 11,    1,  1, 12,  1,  1,  1,  1,  1,
+      1,  1,  1, 13,  1,  1,  1, 14,    1, 15, 16,  1,  1,  1,  1, 17,
+      1,  1,  1,  1,  1, 18,  1,  1,    1,  1, 19,  1, 20,  1, 21,  1,
+
+#define to_Shift_JIS_E7_A3_offsets 15970
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  1,  5,  6,  1,  1,  1,  1,
+      7,  8,  1,  1,  9,  1,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,   12,  1,  1,  1, 13,  1,  1, 14,
+      1,  1,  1,  1, 15,  1,  1,  1,    1,  1,  1,  1,  1, 16,  1,  1,
+
+#define to_Shift_JIS_E7_A4_offsets 16036
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  6,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  1,    1,  1,  9, 10, 11,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 12,  1, 13,  1, 14,  1,
+
+#define to_Shift_JIS_E7_A5_offsets 16102
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  3,  3,  3,  3,  3,
+      7,  3,  3,  8,  3,  9, 10, 11,    3,  3, 12,  3,  3, 13, 14, 15,
+     16,  3, 17,  3,  3, 18,  3,  3,   19,  3,  3,  3,  3, 20,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 21,    3,  3, 22,  3,  3,  3,  3, 23,
+
+#define to_Shift_JIS_E7_A6_offsets 16168
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    3,  3,  6,  3,  3,  7,  8,  9,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 10,  3,  3,
+      3,  3,  3,  3,  3,  3, 11, 12,    3,  3, 13,  3,  3,  3, 14,  3,
+     15,  3,  3, 16,  3,  3,  3,  3,    3, 17, 18,  3,  3, 19, 20, 21,
+
+#define to_Shift_JIS_E7_A7_offsets 16234
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  4,  3,  5,  3,  3,  3,  3,
+      3,  6,  7,  3,  3,  8,  3,  3,    9,  3,  3,  3,  3,  3,  3, 10,
+      3, 11,  3, 12, 13,  3, 14, 15,    3, 16,  3,  3, 17,  3,  3,  3,
+     18,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3, 19,  3,  3,  3,  3,
+
+#define to_Shift_JIS_E7_A8_offsets 16300
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  2,  2,  4,  2,  5,  6,  2,
+      2,  2,  2,  2,  7,  2,  2,  8,    9, 10, 11,  2, 12,  2,  2, 13,
+     14,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2, 15,  2,
+      2, 16, 17,  2,  2,  2,  2, 18,    2,  2,  2, 19, 20, 21, 22, 23,
+
+#define to_Shift_JIS_E7_A9_offsets 16366
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  2,    2,  6,  2,  2,  2,  7,  8,  9,
+     10,  2,  2,  2,  2,  2,  2, 11,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 12, 13, 14,  2,  2,  2,  2,    2, 15,  2, 16,  2,  2,  2,  2,
+     17,  2,  2,  2, 18,  2, 19,  2,    2, 20, 21,  2,  2, 22,  2, 23,
+
+#define to_Shift_JIS_E7_AA_offsets 16432
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  7,  1,  8,  9, 10,   11,  1,  1,  1,  1,  1,  1, 12,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 13, 14,  1,  1,  1, 15, 16,
+     17,  1,  1,  1,  1,  1, 18,  1,    1,  1, 19,  1,  1,  1,  1, 20,
+
+#define to_Shift_JIS_E7_AB_offsets 16498
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  1,  7,  8,  1,  9,  1, 10,
+      1,  1, 11, 12,  1, 13,  1,  1,    1, 14, 15,  1, 16, 17,  1, 18,
+     19, 20, 21, 22,  1, 23, 24,  1,    1,  1, 25,  1,  1, 26,  1, 27,
+     28,  1,  1,  1,  1,  1, 29,  1,   30, 31, 32,  1,  1,  1,  1, 33,
+
+#define to_Shift_JIS_E7_AC_offsets 16564
+128, 191,
+      1,  1,  2,  1,  3,  1,  4,  1,    5,  1,  6,  7,  1,  1,  1,  8,
+      1,  9,  1,  1,  1,  1,  1,  1,   10, 11,  1, 12,  1,  1, 13,  1,
+     14,  1,  1,  1,  1, 15, 16,  1,   17,  1,  1,  1, 18,  1,  1,  1,
+      1,  1,  1, 19,  1, 20, 21,  1,    1, 22,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_AD_offsets 16630
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  5,  1,  6,  7,  8,  1,  9,
+     10, 11, 12,  1, 13,  1, 14,  1,    1,  1,  1,  1,  1, 15,  1,  1,
+      1,  1,  1,  1,  1, 16,  1, 17,    1,  1,  1,  1, 18,  1, 19,  1,
+     20, 21,  1,  1, 22, 23,  1,  1,    1,  1, 24,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_AE_offsets 16696
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  4,  1,  5,  1,  6,
+      1,  1,  7,  1,  8,  9,  1, 10,   11, 12, 13,  1, 14, 15,  1, 16,
+      1, 17,  1,  1,  1,  1,  1,  1,    1,  1, 18,  1,  1, 19,  1,  1,
+      1, 20,  1,  1, 21,  1,  1,  1,   22,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_AF_offsets 16762
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  6,    3,  7,  3,  8,  9,  3,  3, 10,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 11,  3,  3,
+     12,  3,  3,  3, 13, 14, 15,  3,    3, 16,  3,  3,  3, 17,  3,  3,
+      3,  3,  3, 18,  3,  3, 19, 20,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_Shift_JIS_E7_B0_offsets 16828
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  6,  7,  8,  2,  2,  9,    2,  2,  2,  2,  2,  2,  2, 10,
+      2, 11,  2, 12,  2,  2,  2, 13,    2,  2, 14, 15,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 16,   17,  2,  2,  2,  2, 18, 19, 20,
+
+#define to_Shift_JIS_E7_B1_offsets 16894
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  2,  2,  2,  8,  2,  9,  2,   10,  2,  2,  2,  2,  2,  2, 11,
+     12,  2,  2,  2, 13, 14,  2,  2,    2,  2,  2,  2, 15,  2,  2,  2,
+      2,  2,  2, 16,  2, 17,  2,  2,    2,  2,  2,  2,  2,  2, 18,  2,
+
+#define to_Shift_JIS_E7_B2_offsets 16960
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  5,  1,  6,  1,  7,  1,  1,
+      8,  1,  9,  1,  1, 10,  1, 11,   12,  1,  1, 13,  1,  1,  1, 14,
+      1, 15, 16,  1, 17, 18,  1, 19,   20,  1,  1, 21,  1, 22, 23,  1,
+      1, 24, 25, 26,  1,  1,  1,  1,    1, 27,  1,  1,  1, 28, 29,  1,
+
+#define to_Shift_JIS_E7_B3_offsets 17026
+128, 191,
+      1,  2,  3,  2,  2,  4,  2,  2,    2,  2,  5,  2,  2,  2,  6,  2,
+      2,  2,  7,  2,  2,  2,  8,  2,    9,  2,  2,  2, 10,  2, 11, 12,
+     13,  2, 14,  2,  2,  2,  2, 15,    2,  2,  2,  2,  2,  2,  2, 16,
+      2,  2, 17,  2, 18,  2, 19,  2,   20,  2, 21, 22,  2,  2, 23,  2,
+
+#define to_Shift_JIS_E7_B4_offsets 17092
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  2,    2,  2,  7,  8,  2,  9,  2,  2,
+     10,  2,  2,  2, 11, 12,  2, 13,   14, 15, 16, 17, 18,  2,  2,  2,
+     19, 20, 21,  2,  2,  2,  2,  2,    2,  2,  2, 22, 23,  2, 24, 25,
+     26,  2, 27, 28,  2, 29,  2,  2,    2, 30, 31,  2,  2,  2,  2, 32,
+
+#define to_Shift_JIS_E7_B5_offsets 17158
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    1,  1,  1,  7,  8,  1,  9, 10,
+     11,  1,  1,  1,  1,  1, 12,  1,    1,  1,  1, 13,  1,  1, 14,  1,
+      1, 15, 16, 17,  1,  1, 18,  1,   19,  1,  1,  1,  1,  1, 20,  1,
+      1, 21, 22, 23,  1, 24, 25,  1,    1, 26,  1,  1,  1, 27,  1,  1,
+
+#define to_Shift_JIS_E7_B6_offsets 17224
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  3,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  5,  6,  7,  8,  1,  1,  9,
+      1,  1, 10, 11,  1,  1,  1,  1,    1,  1,  1, 12, 13, 14, 15, 16,
+     17, 18, 19,  1, 20, 21,  1,  1,   22,  1, 23, 24,  1, 25, 26, 27,
+
+#define to_Shift_JIS_E7_B7_offsets 17290
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  4,  1,  1,  1,  5,
+      1,  6,  7,  1,  1,  8,  1,  1,    9,  1, 10,  1, 11, 12, 13,  1,
+     14, 15,  1,  1, 16,  1,  1,  1,   17, 18,  1,  1, 19,  1,  1, 20,
+      1,  1, 21,  1, 22,  1,  1,  1,    1,  1,  1, 23,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_B8_offsets 17356
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1, 10, 11,
+      1, 12, 13, 14,  1,  1, 15,  1,    1,  1,  1, 16,  1,  1, 17,  1,
+      1, 18, 19,  1,  1, 20,  1, 21,    1, 22, 23, 24,  1, 25, 26,  1,
+
+#define to_Shift_JIS_E7_B9_offsets 17422
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  1,    1,  1,  5,  6,  1,  7,  1,  1,
+      1,  1,  1,  1,  8,  9, 10,  1,    1, 11, 12,  1,  1, 13, 14,  1,
+      1,  1,  1,  1,  1,  1, 15, 16,    1, 17, 18,  1,  1, 19,  1,  1,
+     20,  1,  1,  1,  1,  1,  1,  1,    1, 21,  1, 22, 23, 24,  1, 25,
+
+#define to_Shift_JIS_E7_BA_offsets 17488
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  1,  1,  6,  1,  7,  8,
+      9,  1, 10, 11, 12,  1, 13,  1,    1,  1,  1, 14, 15,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_BC_offsets 17554
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  1,  4,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_BD_offsets 17620
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  3,  4,  5,  1,
+      6,  7,  1,  1,  8,  9,  1,  1,   10,  1,  1,  1,  1,  1,  1, 11,
+     12,  1,  1,  1,  1,  1,  1, 13,   14, 15, 16, 17,  1,  1, 18,  1,
+     19,  1, 20,  1,  1, 21,  1, 22,   23, 24,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E7_BE_offsets 17686
+128, 191,
+      1,  1,  2,  3,  1,  4,  5,  6,    7,  1,  8,  1,  9,  1, 10,  1,
+      1,  1,  1,  1, 11,  1,  1,  1,    1,  1, 12,  1,  1, 13, 14,  1,
+      1,  1,  1, 15, 16,  1,  1,  1,   17, 18,  1,  1,  1,  1, 19, 20,
+      1,  1, 21,  1,  1,  1, 22,  1,   23, 24,  1,  1,  1, 25,  1,  1,
+
+#define to_Shift_JIS_E7_BF_offsets 17752
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  1,  5,  1,  6,  1,  1,  1,
+      1,  1,  7,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1,  1,  1,  1, 12,  1,    1, 13,  1, 14,  1,  1,  1,  1,
+     15,  1,  1, 16,  1,  1,  1,  1,    1, 17,  1, 18, 19,  1,  1,  1,
+
+#define to_Shift_JIS_E8_80_offsets 17818
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    3,  3,  3,  8,  9,  3,  3,  3,
+     10,  3, 11,  3,  3, 12,  3, 13,   14, 15,  3,  3, 16,  3,  3,  3,
+      3, 17,  3,  3,  3,  3,  3,  3,   18,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3, 19,  3,  3, 20,  3,    3,  3,  3, 21,  3, 22,  3, 23,
+
+#define to_Shift_JIS_E8_81_offsets 17884
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  1,  4,  1,  1,  1,  5,  1,    6,  1,  7,  1,  1,  1,  8,  9,
+      1, 10, 11,  1,  1,  1,  1,  1,   12,  1,  1,  1,  1,  1,  1, 13,
+     14,  1, 15, 16, 17,  1, 18, 19,    1, 20,  1,  1,  1, 21, 22, 23,
+
+#define to_Shift_JIS_E8_82_offsets 17950
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  9,  1,  1, 10,  1,   11,  1, 12, 13,  1, 14,  1,  1,
+      1, 15, 16,  1,  1, 17,  1,  1,    1, 18, 19,  1, 20, 21,  1, 22,
+      1, 23, 24,  1, 25,  1,  1,  1,    1,  1, 26,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_83_offsets 18016
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    1,  1,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  8,  9, 10,  1, 11, 12,  1,
+      1, 13,  1,  1, 14, 15,  1,  1,    1,  1,  1,  1,  1,  1,  1, 16,
+      1, 17,  1,  1, 18,  1,  1,  1,   19,  1,  1,  1, 20, 21,  1,  1,
+
+#define to_Shift_JIS_E8_84_offsets 18082
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    6,  7,  8,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  9, 10,  1,  1,  1,  1,
+      1,  1,  1, 11,  1,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1, 13,
+      1, 14,  1, 15,  1,  1,  1,  1,    1, 16,  1,  1,  1,  1, 17,  1,
+
+#define to_Shift_JIS_E8_85_offsets 18148
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  1,  1,  4,  1,
+      5,  6,  1,  7,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1, 10,
+      1,  1,  1,  1,  1, 11, 12,  1,    1,  1,  1, 13,  1,  1, 14,  1,
+     15, 16,  1,  1, 17,  1,  1,  1,   18, 19, 20,  1,  1,  1,  1, 21,
+
+#define to_Shift_JIS_E8_86_offsets 18214
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  2,  2,  2,  7,
+      2,  2,  2,  8,  2,  9,  2,  2,    2,  2, 10,  2, 11, 12,  2,  2,
+     13,  2,  2, 14, 15,  2,  2,  2,   16, 17,  2,  2,  2,  2,  2,  2,
+     18,  2,  2, 19,  2, 20,  2,  2,   21,  2, 22,  2,  2, 23, 24, 25,
+
+#define to_Shift_JIS_E8_87_offsets 18280
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    5,  6,  2,  2,  2,  7,  2,  2,
+      2,  8,  2,  9,  2,  2,  2,  2,   10, 11, 12,  2,  2,  2,  2, 13,
+     14,  2,  2, 15,  2, 16,  2, 17,   18,  2, 19,  2,  2, 20,  2,  2,
+      2,  2,  2, 21, 22,  2,  2,  2,    2,  2, 23, 24, 25,  2, 26,  2,
+
+#define to_Shift_JIS_E8_88_offsets 18346
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    6,  7,  8,  1,  9, 10, 11,  1,
+     12,  1, 13,  1,  1,  1, 14, 15,   16,  1,  1, 17, 18,  1, 19, 20,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 21, 22, 23, 24,  1, 25,  1,
+      1,  1,  1, 26,  1, 27, 28, 29,   30, 31,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_89_offsets 18412
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    4,  5,  6,  2,  2,  7,  2,  8,
+      2,  2,  9,  2, 10,  2, 11,  2,   12,  2, 13, 14,  2,  2, 15, 16,
+      2, 17, 18,  2,  2,  2, 19, 20,   21,  2,  2,  2,  2,  2, 22,  2,
+
+#define to_Shift_JIS_E8_8A_offsets 18478
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  3,  1,  1,
+      1,  1,  4,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  6,  1,  7,
+      1,  1,  1,  1,  1,  8,  9,  1,    1,  1,  1, 10, 11, 12,  1, 13,
+      1, 14,  1, 15,  1,  1,  1,  1,   16, 17,  1, 18,  1, 19,  1,  1,
+
+#define to_Shift_JIS_E8_8B_offsets 18544
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  4,  5,  6,  1,  1,  7,    1,  8,  1,  9, 10,  1, 11, 12,
+      1, 13,  1, 14,  1, 15, 16, 17,    1,  1,  1, 18,  1,  1,  1,  1,
+      1, 19,  1, 20, 21,  1,  1,  1,    1, 22, 23, 24,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_8C_offsets 18610
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    1,  7,  1,  1,  1,  1,  8,  1,
+      1,  1,  1,  1,  1,  1,  9, 10,   11,  1,  1,  1, 12,  1,  1,  1,
+      1,  1,  1, 13,  1,  1,  1,  1,   14,  1,  1, 15,  1,  1,  1, 16,
+      1, 17, 18,  1, 19, 20, 21,  1,   22, 23,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_8D_offsets 18676
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  4,  5,  2,  2,  2,  2,  6,
+      7,  2,  8,  2,  2,  2,  2,  2,    9,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 10,  2, 11,  2, 12,    2,  2,  2, 13, 14,  2,  2,  2,
+
+#define to_Shift_JIS_E8_8E_offsets 18742
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  5,  1,  1,  1,  6,  1,
+      1,  1,  1,  7,  1,  1,  8,  1,    1,  1,  9,  1,  1,  1, 10, 11,
+     12,  1, 13,  1,  1,  1,  1,  1,   14,  1, 15, 16,  1,  1,  1,  1,
+      1, 17,  1,  1,  1, 18,  1,  1,    1,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_Shift_JIS_E8_8F_offsets 18808
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  4,  1,  5,  1,  6,  1,
+      1,  1,  1,  7,  1,  1,  8,  1,    9,  1,  1,  1, 10,  1,  1, 11,
+     12,  1,  1,  1,  1,  1,  1,  1,    1, 13,  1, 14,  1,  1,  1, 15,
+     16, 17, 18,  1, 19,  1,  1, 20,    1,  1,  1, 21,  1, 22,  1,  1,
+
+#define to_Shift_JIS_E8_90_offsets 18874
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  4,    1,  1,  1,  5,  6,  7,  8,  1,
+      1,  1,  1,  9,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10,  1, 11,  1,  1,  1,  1,  1,    1, 12, 13,  1, 14,  1,  1,  1,
+      1, 15,  1,  1,  1, 16,  1,  1,   17,  1,  1,  1, 18, 19,  1,  1,
+
+#define to_Shift_JIS_E8_91_offsets 18940
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  5,    1,  1,  1,  6,  1,  1,  1,  1,
+      1,  7,  8,  9,  1,  1, 10,  1,    1, 11,  1, 12, 13, 14, 15, 16,
+      1, 17,  1,  1,  1, 18,  1, 19,    1, 20, 21,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_92_offsets 19006
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  4,  1,  1,  1,  1,
+      5,  1,  1,  1,  6,  1,  1,  1,    1,  7,  1,  1,  8,  1,  1,  9,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 11,  1,  1,
+      1,  1, 12,  1,  1,  1,  1,  1,   13, 14,  1, 15, 16,  1,  1, 17,
+
+#define to_Shift_JIS_E8_93_offsets 19072
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    1,  5,  6,  7,  1,  8,  1,  1,
+      9, 10,  1,  1,  1,  1, 11,  1,    1, 12, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 14,  1, 15,  1,
+      1,  1,  1,  1, 16,  1,  1,  1,    1,  1,  1,  1, 17,  1,  1, 18,
+
+#define to_Shift_JIS_E8_94_offsets 19138
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  2,  5,  6,  7,  2,  8,    9,  2, 10,  2,  2,  2,  2, 11,
+      2, 12,  2,  2,  2,  2, 13,  2,    2,  2,  2,  2, 14, 15,  2,  2,
+      2,  2,  2,  2,  2, 16,  2,  2,    2,  2,  2,  2,  2, 17,  2,  2,
+
+#define to_Shift_JIS_E8_95_offsets 19204
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  3,    5,  6,  7,  8,  3,  3,  9,  3,
+      3,  3,  3,  3,  3, 10,  3, 11,   12,  3, 13,  3,  3,  3,  3,  3,
+      3,  3,  3, 14,  3,  3,  3,  3,   15, 16, 17,  3,  3, 18,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 19,    3,  3,  3,  3,  3,  3, 20,  3,
+
+#define to_Shift_JIS_E8_96_offsets 19270
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  4,    5,  2,  6,  2,  2,  2,  2,  2,
+      7,  8,  2,  2,  9,  2,  2, 10,    2, 11,  2, 12, 13,  2,  2,  2,
+      2,  2,  2,  2, 14,  2, 15,  2,   16, 17, 18, 19, 20,  2, 21, 22,
+      2,  2,  2,  2,  2,  2,  2,  2,    2, 23, 24,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E8_97_offsets 19336
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  1,  4,  1,  5,
+      6,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1, 12, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 14,    1, 15, 16, 17,  1,  1, 18,  1,
+
+#define to_Shift_JIS_E8_98_offsets 19402
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    1,  1,  5,  6,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  8,  9,    1,  1, 10,  1,  1,  1,  1,  1,
+      1,  1, 11,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 12,  1, 13,
+     14,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 15,
+
+#define to_Shift_JIS_E8_99_offsets 19468
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  3,  1,
+      4,  1,  1,  1,  5,  6,  1,  1,    1,  1,  7,  1,  8,  1,  9, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1, 12,  1,  1,  1,  1,
+      1, 13,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_9A_offsets 19534
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  4,  1,  1,  1,
+      1,  1,  1,  5,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  8,  1,  1,  1,    1,  9, 10, 11,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_9B_offsets 19600
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  5,  1,  6,  1,  7,  8,  1,
+      1,  1,  1,  1,  9,  1,  1,  1,    1, 10,  1, 11,  1,  1, 12, 13,
+      1,  1,  1,  1, 14,  1,  1,  1,    1, 15,  1,  1, 16, 17, 18, 19,
+      1,  1,  1,  1,  1,  1,  1,  1,   20, 21,  1, 22,  1,  1, 23,  1,
+
+#define to_Shift_JIS_E8_9C_offsets 19666
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  2,    6,  7,  8,  2,  2,  9,  2,  2,
+      2, 10, 11,  2,  2,  2,  2,  2,   12,  2, 13,  2, 14,  2,  2,  2,
+      2,  2,  2,  2,  2, 15,  2,  2,    2, 16,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2,  2,  2, 19,  2,  2,  2, 20,
+
+#define to_Shift_JIS_E8_9D_offsets 19732
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  3,  4,  1,  5,  1,
+      1,  1,  1,  6,  1,  7,  1,  8,    1,  9,  1,  1,  1,  1,  1, 10,
+     11,  1,  1, 12,  1,  1, 13,  1,   14,  1, 15,  1,  1,  1, 16,  1,
+      1,  1,  1,  1, 17,  1, 18,  1,   19,  1,  1,  1,  1,  1,  1, 20,
+
+#define to_Shift_JIS_E8_9E_offsets 19798
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  7,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  9, 10,  1, 11,  1,  1,
+
+#define to_Shift_JIS_E8_9F_offsets 19864
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    2,  2,  2,  6,  2,  2,  2,  2,
+      7,  2,  8,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      9,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 10,
+      2,  2, 11,  2,  2,  2, 12, 13,    2, 14,  2, 15,  2,  2, 16,  2,
+
+#define to_Shift_JIS_E8_A0_offsets 19930
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  3,  4,  5,
+      1,  6,  1,  1,  1,  7,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  9, 10, 11,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 13,  1,  1,  1,  1, 14,  1,    1, 15,  1, 16,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_A1_offsets 19996
+128, 191,
+      1,  2,  3,  2,  4,  2,  5,  2,    2,  2,  2,  2,  6,  7,  2,  2,
+      2,  2,  8,  9,  2,  2,  2, 10,    2, 11,  2, 12,  2, 13, 14,  2,
+      2, 15, 16, 17,  2,  2,  2,  2,   18,  2,  2, 19,  2,  2,  2,  2,
+     20,  2, 21,  2,  2, 22,  2, 23,    2,  2,  2,  2,  2, 24, 25, 26,
+
+#define to_Shift_JIS_E8_A2_offsets 20062
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    4,  1,  1,  5,  1,  6,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  9,    1, 10,  1,  1,  1,  1, 11,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,    1,  1,  1, 14,  1,  1, 15,  1,
+     16, 17,  1,  1, 18, 19,  1, 20,    1,  1,  1,  1,  1,  1,  1, 21,
+
+#define to_Shift_JIS_E8_A3_offsets 20128
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  8,  9,  1,  1,   10, 11,  1,  1, 12, 13,  1, 14,
+      1, 15,  1,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 17, 18, 19,  1,  1,  1,   20, 21,  1,  1, 22, 23, 24,  1,
+
+#define to_Shift_JIS_E8_A4_offsets 20194
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10, 11,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,    1,  1, 13, 14,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 15,  1,   16,  1,  1, 17,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_A5_offsets 20260
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  1,  1,  1,  1,  1,  8,  9,
+     10,  1,  1,  1, 11,  1, 12,  1,    1,  1, 13,  1,  1, 14,  1, 15,
+      1,  1, 16,  1, 17,  1,  1, 18,    1,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_Shift_JIS_E8_A6_offsets 20326
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  5,    6,  1,  7,  8,  1,  1,  1,  9,
+      1,  1,  1, 10,  1,  1, 11, 12,   13,  1, 14,  1,  1,  1,  1,  1,
+      1, 15,  1,  1,  1,  1, 16, 17,    1, 18, 19,  1, 20,  1,  1, 21,
+      1,  1, 22, 23,  1,  1,  1,  1,    1,  1, 24,  1,  1, 25,  1, 26,
+
+#define to_Shift_JIS_E8_A7_offsets 20392
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  3,  2,  2,  2,  2,  2,    2,  2,  4,  2,  5,  6,  2,  2,
+      2,  2,  2,  7,  2,  2,  8,  9,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 10,  2,  2,  2,   11,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E8_A8_offsets 20458
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  7,  2,  8,  2,
+      9,  2,  2, 10,  2,  2, 11, 12,   13,  2,  2, 14,  2, 15,  2, 16,
+      2,  2,  2, 17,  2, 18,  2,  2,    2,  2, 19,  2,  2, 20,  2,  2,
+      2, 21,  2, 22, 23,  2, 24,  2,    2,  2, 25, 26, 27,  2,  2,  2,
+
+#define to_Shift_JIS_E8_A9_offsets 20524
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  6,  7,  1,  8,  9,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+     12,  1, 13, 14,  1,  1, 15,  1,    1, 16,  1, 17, 18, 19, 20,  1,
+     21, 22, 23, 24,  1,  1,  1,  1,    1,  1,  1,  1, 25,  1,  1,  1,
+
+#define to_Shift_JIS_E8_AA_offsets 20590
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  5,    1,  6,  1,  1,  7,  8,  1,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,   12,  1, 13,  1,  1,  1, 14,  1,
+     15, 16,  1, 17, 18, 19, 20,  1,   21,  1,  1,  1, 22, 23,  1,  1,
+     24,  1, 25,  1,  1,  1,  1,  1,    1, 26,  1,  1, 27,  1,  1, 28,
+
+#define to_Shift_JIS_E8_AB_offsets 20656
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  9,  1,  1,  1, 10,  1,    1,  1, 11, 12, 13,  1, 14,  1,
+     15, 16, 17,  1, 18,  1, 19, 20,    1,  1,  1, 21,  1, 22, 23,  1,
+      1, 24,  1, 25,  1,  1,  1, 26,   27,  1, 28,  1,  1,  1, 29,  1,
+
+#define to_Shift_JIS_E8_AC_offsets 20722
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    4,  4,  4,  4,  7,  4,  8,  4,
+      9,  4,  4,  4, 10,  4, 11, 12,    4, 13, 14, 15,  4, 16,  4,  4,
+     17, 18,  4,  4,  4,  4, 19,  4,   20,  4,  4, 21, 22,  4,  4,  4,
+      4,  4,  4, 23,  4,  4,  4,  4,    4, 24,  4,  4,  4,  4, 25,  4,
+
+#define to_Shift_JIS_E8_AD_offsets 20788
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  4,  1,  5,  6,
+      1,  1,  1,  1,  1,  1,  7,  1,    8,  1,  9, 10, 11,  1,  1, 12,
+      1,  1,  1,  1,  1,  1, 13,  1,    1,  1,  1, 14, 15,  1,  1, 16,
+     17, 18, 19,  1, 20,  1,  1, 21,    1,  1,  1,  1,  1, 22,  1,  1,
+
+#define to_Shift_JIS_E8_AE_offsets 20854
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  2,  4,  2,  5,  2,  6,  2,
+      7,  2,  8,  9,  2,  2, 10,  2,    2, 11, 12,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E8_B0_offsets 20920
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  1,  1,  1,  1,  4,
+
+#define to_Shift_JIS_E8_B1_offsets 20986
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  5,  1,  6,  1,  7,  1,
+      8,  1,  1,  1,  1,  9,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+      1, 11, 12,  1,  1,  1,  1,  1,    1,  1, 13, 14, 15,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16, 17, 18,  1, 19,  1,  1,  1,
+
+#define to_Shift_JIS_E8_B2_offsets 21052
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  6,  7,  8,  1,
+      1,  1,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1, 11, 12,  1,
+     13, 14, 15,  1,  1,  1,  1, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25,  1, 26, 27, 28,  1, 29, 30,   31,  1,  1, 32, 33, 34,  1, 35,
+
+#define to_Shift_JIS_E8_B3_offsets 21118
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  6,  9,  6,  6, 10, 11,  6,
+      6, 12,  6, 13,  6,  6,  6,  6,    6,  6, 14, 15, 16,  6, 17,  6,
+     18,  6, 19, 20, 21,  6, 22,  6,    6,  6, 23,  6,  6, 24,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6, 25, 26, 27, 28,  6,  6,
+
+#define to_Shift_JIS_E8_B4_offsets 21184
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  1,  6,  7,  1,  8,  1,  9,
+     10,  1,  1, 11, 12,  1, 13,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_B5_offsets 21250
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  5,  1,  6,  1,  1,
+      7,  8,  1,  9, 10,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_B6_offsets 21316
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  9,  1,  1,  1, 10,  1,
+
+#define to_Shift_JIS_E8_B7_offsets 21382
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  4,  1,  1,  5,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  7,  8,  1,  9,  1, 10,
+      1, 11,  1, 12,  1,  1,  1,  1,   13,  1, 14, 15,  1,  1,  1, 16,
+      1,  1,  1, 17,  1, 18,  1,  1,    1,  1,  1,  1, 19,  1,  1, 20,
+
+#define to_Shift_JIS_E8_B8_offsets 21448
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  1,  1,  1,  1,  5,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  7,  8,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 10,  1,  1,  1,  1,  1,
+     11,  1,  1,  1, 12, 13,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_B9_offsets 21514
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  6,  7,  1,  8,  1,  1,  1,
+      9,  1,  1,  1,  1, 10,  1,  1,    1, 11,  1,  1,  1,  1,  1, 12,
+     13,  1,  1, 14, 15,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 16,  1, 17,  1, 18,  1,    1,  1,  1,  1, 19,  1,  1,  1,
+
+#define to_Shift_JIS_E8_BA_offsets 21580
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  5,    1,  1,  6,  7,  1,  8,  1,  1,
+      1,  9,  1, 10, 11,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1,  1,
+      1, 13,  1,  1,  1,  1,  1,  1,    1,  1, 14, 15, 16,  1,  1, 17,
+     18, 19,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_Shift_JIS_E8_BB_offsets 21646
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  7,  8,  1,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1, 10,  1,  1,  1, 11,
+      1,  1, 12, 13,  1,  1,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   15,  1,  1, 16, 17, 18, 19,  1,
+
+#define to_Shift_JIS_E8_BC_offsets 21712
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      1,  1,  7,  8,  9, 10,  1,  1,    1, 11,  1, 12, 13, 14,  1, 15,
+      1,  1,  1,  1,  1,  1, 16,  1,    1, 17, 18,  1,  1,  1,  1, 19,
+      1,  1,  1, 20,  1,  1,  1,  1,   21, 22,  1, 23,  1,  1, 24, 25,
+
+#define to_Shift_JIS_E8_BD_offsets 21778
+128, 191,
+      1,  1,  2,  1,  3,  4,  5,  1,    1,  6,  1,  1,  7,  8,  9,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,    1,  1,  1,  1, 11,  1,  1, 12,
+      1, 13, 14, 15, 16,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E8_BE_offsets 21844
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  4,  5,
+      1,  1,  1,  6,  1,  1,  1,  7,    8,  1,  1,  1,  1,  9, 10, 11,
+     12, 13, 14,  1,  1,  1,  1, 15,    1,  1, 16, 17, 18,  1,  1, 19,
+
+#define to_Shift_JIS_E8_BF_offsets 21910
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  5,  1,
+      1,  6,  1,  1,  7,  1,  1,  1,    1,  1,  8,  1,  1,  1,  1,  1,
+      1,  1,  9,  1,  1, 10, 11,  1,    1, 12, 13, 14,  1, 15,  1, 16,
+     17,  1,  1,  1, 18,  1,  1, 19,   20, 21, 22,  1,  1, 23,  1,  1,
+
+#define to_Shift_JIS_E9_80_offsets 21976
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  3,    3,  3,  3,  7,  3,  8,  9, 10,
+     11, 12,  3, 13, 14, 15, 16, 17,    3, 18, 19,  3,  3, 20, 21, 22,
+     23, 24, 25, 26,  3,  3,  3, 27,    3,  3,  3,  3,  3,  3, 28,  3,
+      3, 29, 30,  3,  3, 31, 32,  3,   33, 34,  3,  3, 35,  3, 36,  3,
+
+#define to_Shift_JIS_E9_81_offsets 22042
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  6,  7,  8,  1,  9, 10, 11,
+     12, 13, 14, 15, 16, 17, 18,  1,   19, 20,  1,  1, 21,  1, 22,  1,
+     23, 24,  1, 25,  1, 26,  1,  1,   27, 28,  1,  1,  1, 29, 30, 31,
+      1,  1, 32,  1,  1, 33, 34, 35,   36,  1, 37,  1, 38, 39,  1, 40,
+
+#define to_Shift_JIS_E9_82_offsets 22108
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    6,  8,  9,  6,  6,  6,  6, 10,
+      6, 11,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6, 12,  6,  6, 13,  6,   14,  6, 15,  6,  6,  6,  6, 16,
+      6, 17,  6,  6,  6, 18,  6,  6,   19,  6,  6,  6,  6,  6,  6,  6,
+
+#define to_Shift_JIS_E9_83_offsets 22174
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  6,  7,  1,  8,  1,  1,  1,    9,  1,  1,  1,  1, 10,  1,  1,
+      1,  1,  1,  1,  1, 11,  1, 12,    1,  1,  1,  1,  1, 13,  1,  1,
+
+#define to_Shift_JIS_E9_84_offsets 22240
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  5,  1,  1,
+      6,  1,  7,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_85_offsets 22306
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  4,  5,  6,  7,  1,
+      1,  1,  8,  1,  9,  1, 10,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 12, 13,  1, 14,  1,  1,    1, 15, 16,  1, 17,  1,  1,  1,
+      1,  1, 18, 19,  1, 20,  1, 21,   22,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_86_offsets 22372
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  4,  1,  5,  1,  6,  1,  1,
+      7,  1,  8,  1,  1,  1,  1,  9,    1,  1,  1,  1, 10,  1,  1,  1,
+      1,  1, 11,  1, 12,  1,  1,  1,    1,  1, 13, 14,  1,  1,  1, 15,
+      1,  1,  1,  1, 16, 17,  1,  1,   18,  1, 19,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_87_offsets 22438
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    6,  7,  3,  8,  9, 10, 11, 12,
+     13, 14,  3,  3,  3,  3, 15,  3,   16,  3,  3, 17, 18, 19,  3, 20,
+      3, 21,  3, 22,  3,  3, 23, 24,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3, 25, 26,  3,    3,  3,  3,  3, 27,  3,  3, 28,
+
+#define to_Shift_JIS_E9_88_offsets 22504
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  3,  1,
+      1,  4,  1,  1,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1, 10,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1, 12,
+
+#define to_Shift_JIS_E9_89_offsets 22570
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  5,  1,  6,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  8,    1,  1,  9, 10,  1,  1, 11,  1,
+      1,  1, 12,  1, 13,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 15,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 16,  1,
+
+#define to_Shift_JIS_E9_8A_offsets 22636
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  2,  6,  2,  7,  8,  2,    9,  2, 10, 11, 12,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2, 13,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 14,    2, 15,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E9_8B_offsets 22702
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  5,  6,  1,  1,  7,  1,  1,
+      1,  1,  8,  9,  1,  1,  1,  1,   10,  1, 11,  1, 12,  1,  1,  1,
+
+#define to_Shift_JIS_E9_8C_offsets 22768
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+      4,  1,  1,  1,  1,  1,  1,  1,    5,  6,  7,  1,  1,  1,  1,  1,
+      8,  1,  9, 10,  1,  1, 11,  1,   12,  1,  1, 13, 14,  1, 15, 16,
+      1,  1, 17,  1,  1, 18,  1,  1,    1,  1, 19, 20,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_8D_offsets 22834
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  3,  1,  4,  1,  1,
+      1,  1,  1,  1,  5,  1,  6,  1,    1,  1,  1,  7,  8,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10,  1, 11,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,    1,  1,  1,  1, 13,  1, 14,  1,
+
+#define to_Shift_JIS_E9_8E_offsets 22900
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  4,  5,    1,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  7,    1,  1,  1,  1,  8,  9, 10,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_8F_offsets 22966
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  1,  1,  6,  7,    8,  1,  1,  1,  1,  9,  1,  1,
+      1, 10,  1,  1, 11, 12,  1,  1,   13,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_90_offsets 23032
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  5,  6,  1,  1,  1,    7,  8,  9,  1,  1,  1,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 12, 13,  1,   14,  1, 15,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_91_offsets 23098
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  5,  6,  1,  1,  1,  1,    1,  1,  7,  8,  1,  1,  9,  1,
+     10,  1, 11,  1,  1,  1,  1,  1,    1,  1, 12,  1,  1,  1,  1,  1,
+     13,  1,  1,  1,  1, 14,  1, 15,    1,  1,  1,  1, 16, 17, 18, 19,
+
+#define to_Shift_JIS_E9_92_offsets 23164
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_95_offsets 23230
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_96_offsets 23296
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    2,  6,  7,  8,  2,  2,  2,  9,
+      2, 10,  2, 11, 12,  2, 13,  2,   14, 15,  2,  2,  2,  2,  2,  2,
+     16,  2, 17, 18, 19, 20,  2, 21,   22,  2,  2,  2,  2, 23,  2,  2,
+      2,  2, 24,  2,  2,  2,  2,  2,    2, 25,  2, 26, 27,  2, 28,  2,
+
+#define to_Shift_JIS_E9_97_offsets 23362
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  4,  1,  5,  6,  1,  1,
+      1,  1,  1,  1,  7,  8,  9,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+      1, 12, 13,  1,  1, 14,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_98_offsets 23428
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    4,  1,  5,  1,  1,  1,  6,  7,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1,  1, 10,
+
+#define to_Shift_JIS_E9_99_offsets 23494
+128, 191,
+      1,  2,  3,  2,  4,  2,  2,  2,    2,  2,  2,  5,  6,  7,  2,  8,
+      9,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 10, 11, 12, 13, 14,
+      2,  2, 15, 16, 17, 18, 19,  2,    2,  2, 20,  2, 21,  2,  2,  2,
+     22,  2, 23, 24,  2, 25, 26, 27,   28,  2, 29,  2,  2, 30,  2,  2,
+
+#define to_Shift_JIS_E9_9A_offsets 23560
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  1,  7,  8,  9,
+      1,  1,  1,  1, 10, 11,  1, 12,   13, 14,  1, 15, 16,  1,  1,  1,
+     17,  1,  1, 18,  1,  1,  1, 19,   20,  1, 21,  1,  1,  1,  1,  1,
+     22, 23, 24,  1, 25,  1, 26, 27,   28, 29,  1, 30, 31,  1,  1,  1,
+
+#define to_Shift_JIS_E9_9B_offsets 23626
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  3,  9, 10, 11, 12,  3,
+      3, 13,  3,  3,  3, 14, 15,  3,    3, 16,  3, 17, 18,  3,  3,  3,
+      3,  3, 19, 20,  3,  3,  3,  3,   21,  3, 22, 23,  3,  3,  3,  3,
+     24,  3, 25,  3,  3,  3, 26, 27,    3, 28,  3, 29,  3,  3,  3,  3,
+
+#define to_Shift_JIS_E9_9C_offsets 23692
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    6,  2,  7,  2,  2,  8,  9, 10,
+      2, 11,  2, 12,  2,  2, 13,  2,    2, 14,  2,  2, 15,  2, 16,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2,  2, 19,  2,  2,  2,  2,  2,
+     20,  2, 21,  2,  2,  2,  2,  2,   22, 23,  2,  2,  2, 24, 25,  2,
+
+#define to_Shift_JIS_E9_9D_offsets 23758
+128, 191,
+      1,  1,  2,  1,  3,  1,  4,  1,    5,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  1,    1,  9,  1,  1, 10,  1, 11,  1,
+     12, 13, 14,  1, 15,  1, 16,  1,   17, 18,  1, 19,  1, 20,  1,  1,
+      1, 21,  1,  1, 22,  1,  1,  1,    1, 23, 24,  1, 25,  1,  1,  1,
+
+#define to_Shift_JIS_E9_9E_offsets 23824
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  1,    1,  1,  1,  6,  1,  7,  1,  8,
+      9,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1,  1, 11,  1,  1,  1,
+     12,  1,  1, 13,  1,  1, 14,  1,   15,  1,  1, 16,  1, 17,  1,  1,
+      1,  1,  1, 18, 19,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_9F_offsets 23890
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  9,  1,
+      1,  1, 10, 11,  1, 12, 13,  1,    1,  1,  1, 14,  1,  1,  1, 15,
+
+#define to_Shift_JIS_E9_A0_offsets 23956
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  1,    7,  1,  1,  1,  8,  1,  1,  9,
+     10, 11, 12, 13,  1,  1,  1, 14,   15,  1, 16,  1,  1,  1,  1,  1,
+      1, 17,  1,  1, 18,  1,  1,  1,    1,  1,  1,  1, 19, 20,  1,  1,
+      1,  1,  1,  1, 21,  1,  1, 22,   23,  1,  1, 24, 25, 26,  1,  1,
+
+#define to_Shift_JIS_E9_A1_offsets 24022
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  4,  5,  6,  7,
+      1,  1,  1,  1,  8,  9,  1,  1,   10,  1,  1, 11,  1,  1, 12,  1,
+      1,  1,  1,  1,  1,  1,  1, 13,    1,  1,  1, 14,  1,  1,  1, 15,
+     16, 17,  1, 18, 19,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_A2_offsets 24088
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  1,  1,  1,  1,  4,
+      1,  5,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_A3_offsets 24154
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  6,  1,  1,  7,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  9,  1, 10,  1, 11, 12, 13,
+      1,  1, 14,  1, 15,  1,  1,  1,    1,  1,  1,  1, 16, 17, 18,  1,
+
+#define to_Shift_JIS_E9_A4_offsets 24220
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,   11,  1,  1,  1,  1, 12, 13,  1,
+     14, 15,  1,  1, 16,  1,  1,  1,   17,  1,  1,  1, 18,  1, 19,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 20, 21,  1,
+
+#define to_Shift_JIS_E9_A5_offsets 24286
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  8,  9,  1,  1, 10,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_A6_offsets 24352
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    7,  1,  1,  1,  8,  9, 10,  1,
+      1,  1,  1, 11, 12,  1,  1,  1,    1,  1,  1,  1, 13,  1,  1,  1,
+
+#define to_Shift_JIS_E9_A7_offsets 24418
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  9,  1,  1, 10,  1,  1,   11,  1,  1, 12,  1, 13,  1, 14,
+      1,  1, 15,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 16, 17,  1,
+      1, 18, 19,  1,  1,  1,  1,  1,   20,  1,  1, 21,  1,  1,  1, 22,
+
+#define to_Shift_JIS_E9_A8_offsets 24484
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  6,  7,  1,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1, 10,  1,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1, 12,    1,  1,  1,  1,  1,  1, 13,  1,
+
+#define to_Shift_JIS_E9_A9_offsets 24550
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  2,    2,  2,  2,  2,  2,  6,  2,  2,
+      2,  2,  2,  2,  2,  7,  2,  8,    2,  2,  9, 10,  2,  2,  2, 11,
+      2,  2, 12,  2, 13, 14,  2,  2,    2, 15, 16, 17,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E9_AA_offsets 24616
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  3,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+
+#define to_Shift_JIS_E9_AB_offsets 24682
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  4,
+      2,  5,  2,  6,  7,  2,  2,  2,    8,  2,  2,  2,  2,  2,  9, 10,
+      2,  2, 11, 12,  2,  2, 13,  2,    2,  2, 14, 15,  2, 16, 17, 18,
+      2, 19,  2,  2, 20,  2,  2, 21,    2,  2,  2, 22,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E9_AC_offsets 24748
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  4,  1,  1,  1,  1,  5,
+      1,  1,  6,  7,  1,  8,  1,  9,   10, 11, 12,  1,  1,  1, 13, 14,
+      1, 15, 16,  1,  1,  1,  1,  1,    1,  1,  1, 17, 18,  1,  1,  1,
+
+#define to_Shift_JIS_E9_AD_offsets 24814
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  7,  8,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,   12,  1, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 14,
+      1,  1,  1,  1, 15,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_AE_offsets 24880
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  4,  5,  6,  1,  1,  7,  8,    1,  1,  1,  1,  1,  1,  1,  9,
+     10,  1,  1,  1,  1,  1,  1,  1,   11,  1, 12, 13,  1, 14, 15,  1,
+      1,  1,  1,  1, 16,  1,  1,  1,    1, 17,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_AF_offsets 24946
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  4,  5,  2,  2,  2,  2,  6,
+      2,  7,  8,  2,  9,  2, 10,  2,    2,  2,  2, 11,  2,  2,  2,  2,
+      2, 12, 13, 14, 15,  2,  2,  2,   16,  2,  2,  2,  2,  2,  2,  2,
+     17, 18, 19,  2,  2, 20,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Shift_JIS_E9_B0_offsets 25012
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    4,  5,  6,  1,  7,  8,  1,  1,
+      9,  1, 10, 11, 12, 13,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+      1, 15,  1,  1, 16, 17,  1,  1,    1,  1,  1,  1,  1, 18, 19, 20,
+     21,  1, 22,  1,  1,  1,  1,  1,    1, 23, 24, 25,  1,  1, 26,  1,
+
+#define to_Shift_JIS_E9_B1_offsets 25078
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  1,  6,    1,  1,  7,  1,  1,  1,  1,  1,
+      8,  1,  1,  1,  1,  1,  1,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 10,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_B3_offsets 25144
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  8,  9,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_B4_offsets 25210
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  6,  1,  1,  1,  1,  7,  1,
+      1,  1,  8,  1,  1,  9,  1,  1,    1,  1,  1, 10,  1,  1,  1, 11,
+      1,  1,  1, 12,  1,  1, 13,  1,   14,  1, 15, 16, 17,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19, 20,
+
+#define to_Shift_JIS_E9_B5_offsets 25276
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9, 10, 11,  1,
+     12, 13,  1,  1, 14,  1,  1,  1,    1,  1,  1,  1, 15,  1,  1, 16,
+      1,  1, 17,  1,  1,  1,  1,  1,    1,  1, 18,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_B6_offsets 25342
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  6,  1,  1,  1,    1,  7,  1,  8,  1,  1,  1,  9,
+      1,  1, 10,  1, 11,  1,  1,  1,   12,  1, 13, 14,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_B7_offsets 25408
+128, 191,
+      1,  2,  3,  1,  4,  1,  5,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      1,  1,  1,  7,  1,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1,  1,  1, 10,  1, 11,
+      1,  1, 12,  1,  1,  1,  1,  1,   13, 14, 15,  1,  1, 16,  1,  1,
+
+#define to_Shift_JIS_E9_B8_offsets 25474
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_B9_offsets 25540
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  4,  1,  1,  1,  5,  1,  6,
+
+#define to_Shift_JIS_E9_BA_offsets 25606
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  4,  5,  1,  1,  1,
+      1,  6,  7,  8,  1,  9,  1, 10,    1,  1,  1,  1,  1, 11,  1, 12,
+      1,  1,  1,  1,  1, 13, 14,  1,    1, 15, 16,  1,  1, 17,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   18, 19, 20, 21, 22,  1, 23, 24,
+
+#define to_Shift_JIS_E9_BB_offsets 25672
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  3,  4,  5,  6,
+      7,  1,  8,  1,  9,  1,  1,  1,   10, 11,  1, 12, 13, 14, 15,  1,
+     16,  1,  1,  1,  1, 17,  1,  1,   18,  1,  1,  1,  1,  1,  1, 19,
+      1,  1,  1,  1, 20,  1, 21, 22,    1, 23,  1, 24, 25, 26,  1,  1,
+
+#define to_Shift_JIS_E9_BC_offsets 25738
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  1,  4,  1,
+      1,  1,  1,  5,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+
+#define to_Shift_JIS_E9_BD_offsets 25804
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  4,  5,
+      1,  1,  6,  1,  7,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  8,
+      9, 10, 11, 12,  1,  1, 13, 14,    1,  1, 15,  1, 16,  1,  1,  1,
+      1,  1, 17,  1,  1,  1, 18, 19,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_BE_offsets 25870
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_E9_offsets 25936
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 20, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 20,
+
+#define to_Shift_JIS_ED_offsets 26002
+128, 159,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_EF_BC_offsets 26036
+128, 191,
+      1,  2,  1,  3,  4,  5,  6,  1,    7,  8,  9, 10, 11,  1, 12, 13,
+     14, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26, 27, 28, 29,
+     30, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+
+#define to_Shift_JIS_EF_BD_offsets 26102
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 31,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 62,
+
+#define to_Shift_JIS_EF_BE_offsets 26168
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+     33, 33, 33, 33, 33, 33, 33, 33,   33, 33, 33, 33, 33, 33, 33, 33,
+
+#define to_Shift_JIS_EF_BF_offsets 26234
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_EF_offsets 26300
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  4,  5,
+
+#define to_Shift_JIS_F0_offsets 26366
+144, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_F4_offsets 26416
+128, 143,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Shift_JIS_offsets 26434
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  6,
+      7,  8,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 10, 10, 10, 19, 10, 20,
+     21, 22, 22, 22, 23,
+
+#define to_Windows_31J_C2_offsets 26681
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  6,  1,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E2_80_offsets 26747
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  3,  1,  1,    4,  5,  1,  1,  6,  7,  1,  1,
+      8,  9,  1,  1,  1, 10, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1, 13, 14,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+
+#define to_Windows_31J_E2_84_offsets 26813
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E2_85_offsets 26879
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11,  1,  1,  1,  1,  1,  1,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E2_88_offsets 26945
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  2,  2,  7,  2,  2,  2,  2,
+      2,  8,  2,  2,  2,  2,  2,  2,    2,  2,  9,  2,  2, 10, 11, 12,
+     13,  2,  2,  2,  2, 14,  2, 15,   16, 17, 18, 19, 20,  2, 21,  2,
+      2,  2,  2,  2, 22, 23,  2,  2,    2,  2,  2,  2,  2, 24,  2,  2,
+
+#define to_Windows_31J_E2_8A_offsets 27011
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+
+#define to_Windows_31J_E2_91_offsets 27077
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E2_offsets 27143
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  6,    7,  8,  9,  2, 10,  2,  2,  2,
+      2, 11,  2,  2, 12, 13, 14, 15,   16, 17,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E3_80_offsets 27209
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22,  5,  5,    5,  5,  5,  5,  5, 23,  5, 24,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_Windows_31J_E3_88_offsets 27275
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E3_8A_offsets 27341
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E3_8C_offsets 27407
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  7,  1,  1,  8,  9,    1,  1,  1, 10,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1, 12,  1,  1,  1,  1,
+
+#define to_Windows_31J_E3_8D_offsets 27473
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  4,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  7,  8,  9, 10,  1,
+
+#define to_Windows_31J_E3_8E_offsets 27539
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  5,  6,  1,
+      1,  7,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E3_8F_offsets 27605
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E3_offsets 27671
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  5,  7,  5,  8,  9, 10, 11,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_Windows_31J_E4_B8_offsets 27737
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  5,    6,  7,  8,  9,  3, 10, 11,  3,
+     12, 13,  3,  3, 14, 15, 16, 17,   18, 19,  3,  3,  3,  3, 20,  3,
+      3, 21,  3,  3,  3,  3, 22,  3,   23,  3, 24,  3,  3, 25,  3,  3,
+      3, 26, 27,  3,  3,  3, 28,  3,   29, 30,  3, 31, 32,  3,  3, 33,
+
+#define to_Windows_31J_E4_BB_offsets 27803
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  7,    4,  4,  8,  9,  4, 10, 11, 12,
+      4,  4,  4,  4, 13, 14, 15, 16,   17, 18,  4,  4,  4, 19, 20, 21,
+      4, 22,  4, 23, 24, 25,  4,  4,    4,  4,  4,  4,  4, 26, 27,  4,
+     28,  4, 29,  4,  4,  4, 30, 31,    4,  4,  4, 32, 33,  4,  4,  4,
+
+#define to_Windows_31J_E4_BC_offsets 27869
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  3,    3,  5,  6,  3,  3,  7,  8,  9,
+     10, 11,  3,  3,  3,  3,  3,  3,    3,  3, 12,  3, 13, 14,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3, 15,
+     16,  3,  3,  3, 17,  3, 18,  3,   19, 20, 21,  3, 22, 23,  3,  3,
+
+#define to_Windows_31J_E4_BD_offsets 27935
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    1,  1,  1,  1,  1,  5,  6,  7,
+      8,  9,  1, 10,  1, 11, 12, 13,    1, 14, 15, 16, 17, 18, 19,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 20,  1,  1,  1,  1,  1, 21,
+     22,  1,  1, 23,  1, 24, 25,  1,    1,  1,  1, 26, 27,  1,  1, 28,
+
+#define to_Windows_31J_E4_BE_offsets 28001
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  5,  6,  1,  7,  1,  8,
+      1,  9, 10,  1, 11,  1, 12,  1,   13,  1, 14, 15,  1, 16,  1,  1,
+     17, 18,  1,  1,  1,  1,  1,  1,    1,  1,  1, 19,  1, 20, 21, 22,
+      1,  1,  1,  1,  1, 23, 24,  1,    1,  1,  1,  1,  1,  1,  1, 25,
+
+#define to_Windows_31J_E4_BF_offsets 28067
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  5,  6,  1,  1,  7,  8,  1,
+      9, 10,  1,  1, 11,  1,  1, 12,   13,  1, 14, 15,  1, 16,  1, 17,
+      1, 18,  1, 19, 20, 21,  1,  1,    1,  1,  1,  1,  1,  1, 22, 23,
+      1,  1,  1, 24,  1, 25, 26,  1,   27,  1, 28,  1,  1,  1, 29, 30,
+
+#define to_Windows_31J_E5_80_offsets 28133
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  4,  1,  5,  1,  6,  1,  7,
+      1,  8,  9,  1, 10,  1, 11,  1,    1, 12, 13,  1,  1,  1, 14, 15,
+      1, 16, 17, 18, 19, 20, 21,  1,   22, 23, 24, 25, 26, 27,  1,  1,
+      1,  1,  1,  1,  1,  1, 28,  1,    1, 29,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_81_offsets 28199
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    7,  8,  2,  2,  2,  2,  2,  9,
+     10,  2,  2,  2,  2, 11, 12,  2,    2,  2, 13,  2, 14,  2,  2,  2,
+      2,  2,  2,  2,  2, 15,  2,  2,    2,  2,  2,  2, 16,  2,  2,  2,
+     17,  2, 18,  2, 19, 20, 21,  2,   22,  2,  2,  2,  2, 23,  2,  2,
+
+#define to_Windows_31J_E5_82_offsets 28265
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  2,  2,  6,  2,  2,  2,    7,  8,  9,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 10, 11,  2,  2,
+      2,  2, 12, 13, 14, 15,  2, 16,    2,  2,  2,  2,  2,  2, 17,  2,
+
+#define to_Windows_31J_E5_83_offsets 28331
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  4,  5,  1,  1,  6,  1,  7,
+      1,  8,  1,  1,  1,  9, 10,  1,   11,  1, 12,  1,  1,  1, 13,  1,
+      1,  1,  1, 14,  1, 15,  1, 16,    1,  1,  1,  1,  1, 17, 18,  1,
+      1,  1,  1,  1, 19, 20,  1,  1,    1, 21,  1, 22,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_85_offsets 28397
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15,  3,
+     16,  3, 17,  3, 18,  3,  3,  3,    3,  3, 19,  3, 20,  3,  3,  3,
+      3,  3, 21,  3, 22, 23,  3,  3,   24, 25, 26, 27, 28, 29, 30,  3,
+      3, 31,  3,  3,  3, 32, 33, 34,   35,  3,  3,  3, 36,  3,  3,  3,
+
+#define to_Windows_31J_E5_86_offsets 28463
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    2,  6,  7,  2,  8,  9,  2, 10,
+     11, 12, 13, 14,  2, 15, 16, 17,    2, 18,  2,  2,  2, 19,  2,  2,
+     20,  2, 21,  2, 22, 23, 24,  2,   25, 26, 27, 28, 29,  2,  2,  2,
+     30, 31, 32, 33, 34, 35, 36, 37,    2,  2,  2,  2,  2, 38, 39,  2,
+
+#define to_Windows_31J_E5_87_offsets 28529
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    1,  5,  1,  6,  7,  8,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1, 10, 11, 12,  1,  1,
+     13, 14,  1,  1,  1,  1, 15, 16,    1, 17, 18,  1, 19, 20,  1,  1,
+     21, 22,  1,  1,  1, 23, 24,  1,   25, 26, 27,  1,  1, 28, 29,  1,
+
+#define to_Windows_31J_E5_88_offsets 28595
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    7,  2,  8,  9,  2,  2, 10,  2,
+      2, 11,  2,  2, 12, 13,  2, 14,    2,  2,  2,  2,  2, 15,  2,  2,
+      2,  2,  2,  2, 16, 17,  2, 18,    2, 19, 20,  2,  2,  2, 21,  2,
+     22,  2,  2, 23,  2,  2, 24, 25,   26, 27, 28, 29,  2,  2,  2,  2,
+
+#define to_Windows_31J_E5_8A_offsets 28661
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  6,  1,  1,
+      1,  7,  8,  1,  9,  1,  1,  1,    1,  1,  1, 10, 11,  1,  1, 12,
+     13,  1,  1, 14,  1,  1, 15,  1,    1, 16, 17, 18, 19, 20,  1, 21,
+      1, 22,  1,  1, 23, 24,  1,  1,    1, 25,  1,  1, 26,  1, 27,  1,
+
+#define to_Windows_31J_E5_8B_offsets 28727
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  6,    3,  7,  3,  3,  3,  8,  3,  3,
+      3,  3,  9,  3,  3, 10,  3, 11,   12, 13,  3, 14,  3, 15, 16, 17,
+     18,  3, 19, 20, 21,  3, 22, 23,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3, 24, 25,  3, 26,  3,  3,   27, 28, 29,  3,  3,  3, 30, 31,
+
+#define to_Windows_31J_E5_8C_offsets 28793
+128, 191,
+      1,  2,  3,  4,  4,  5,  6,  7,    8,  4,  4,  4,  4,  9,  4, 10,
+     11,  4,  4,  4,  4, 12, 13, 14,    4, 15, 16,  4,  4, 17,  4,  4,
+     18, 19,  4, 20, 21,  4,  4,  4,    4,  4, 22,  4,  4,  4,  4, 23,
+      4, 24,  4, 25,  4,  4,  4,  4,   26, 27, 28, 29,  4,  4,  4, 30,
+
+#define to_Windows_31J_E5_8D_offsets 28859
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    8,  9, 10,  3,  3, 11,  3,  3,
+      3, 12, 13, 14, 15,  3,  3, 16,   17,  3, 18,  3, 19,  3, 20,  3,
+     21,  3,  3,  3,  3,  3, 22,  3,    3, 23,  3,  3,  3,  3, 24, 25,
+     26, 27, 28, 29, 30, 31,  3, 32,   33,  3,  3, 34,  3,  3,  3, 35,
+
+#define to_Windows_31J_E5_8E_offsets 28925
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  5,  1,    6,  1,  7,  1,  1,  1,  1,  8,
+      9,  1,  1,  1,  1, 10, 11,  1,   12, 13,  1,  1,  1, 14, 15,  1,
+     16,  1, 17, 18,  1,  1, 19,  1,    1,  1,  1, 20,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_8F_offsets 28991
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  6,  7,  8,  9, 10,  1,
+      1,  1,  1,  1, 11,  1, 12, 13,    1, 14,  1, 15,  1, 16,  1, 17,
+      1, 18, 19, 20, 21, 22,  1,  1,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34,  1,  1, 35, 36,   37,  1, 38,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_92_offsets 29057
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  5,  6,  7,  2,  8,  9,
+     10,  2, 11,  2,  2,  2,  2,  2,    2,  2,  2,  2, 12,  2,  2,  2,
+      2,  2, 13,  2, 14, 15,  2,  2,   16, 17,  2, 18, 19,  2,  2, 20,
+      2,  2, 21, 22,  2,  2,  2,  2,   23,  2,  2,  2, 24, 25, 26,  2,
+
+#define to_Windows_31J_E5_93_offsets 29123
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    9,  4,  4,  4,  4,  4,  4,  4,
+      4, 10, 11,  4,  4, 12, 13,  4,   14, 15,  4,  4,  4, 16, 17,  4,
+      4,  4, 18,  4,  4,  4,  4,  4,    4,  4, 19,  4,  4, 20,  4, 21,
+
+#define to_Windows_31J_E5_96_offsets 29189
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  6,    2,  7,  8,  9,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   10, 11, 12,  2, 13, 14, 15, 16,
+      2,  2,  2,  2,  2,  2,  2, 17,   18, 19, 20, 21, 22,  2, 23,  2,
+     24,  2,  2,  2,  2,  2, 25,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E5_9D_offsets 29255
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  4,    2,  2,  5,  2,  2,  2,  6,  7,
+      8,  9,  2,  2,  2,  2,  2,  2,    2, 10,  2,  2,  2,  2,  2,  2,
+      2, 11,  2,  2, 12, 13, 14,  2,    2, 15, 16,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2, 17,
+
+#define to_Windows_31J_E5_9E_offsets 29321
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,    1,  1, 11,  1, 12,  1,  1,  1,
+     13,  1,  1, 14,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_9F_offsets 29387
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  5,    6,  2,  2,  7,  2,  2,  8,  2,
+      2,  2,  9, 10, 11,  2, 12,  2,    2,  2,  2,  2, 13,  2,  2, 14,
+     15,  2,  2, 16,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2, 19, 20,  2, 21,  2,  2,  2,
+
+#define to_Windows_31J_E5_A2_offsets 29453
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  5,    1,  1,  1,  1,  6,  1,  7,  8,
+      1,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1, 10,  1,  1, 11,  1,
+      1,  1, 12, 13,  1,  1,  1,  1,   14, 15, 16, 17,  1,  1, 18,  1,
+
+#define to_Windows_31J_E5_A4_offsets 29519
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  3,  4,  5,  1,  1,  1,  6,
+      7,  1,  1,  1,  1,  8,  9,  1,   10, 11, 12, 13, 14,  1,  1,  1,
+      1,  1, 15,  1,  1, 16,  1, 17,    1, 18, 19, 20, 21, 22, 23,  1,
+      1, 24, 25,  1,  1,  1,  1, 26,   27,  1,  1,  1,  1,  1, 28,  1,
+
+#define to_Windows_31J_E5_A5_offsets 29585
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  1,  1,  1,  6,  7,
+      8,  9,  1, 10, 11, 12,  1, 13,   14,  1, 15, 16,  1, 17,  1,  1,
+     18,  1, 19, 20,  1, 21,  1, 22,   23, 24, 25,  1, 26,  1, 27,  1,
+      1,  1,  1, 28, 29,  1,  1,  1,   30,  1,  1,  1,  1, 31,  1,  1,
+
+#define to_Windows_31J_E5_A6_offsets 29651
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,    1, 10,  1, 11,  1, 12,  1,  1,
+      1,  1,  1, 13, 14, 15,  1,  1,   16,  1,  1,  1, 17,  1,  1,  1,
+      1,  1, 18,  1,  1,  1,  1,  1,    1, 19, 20, 21,  1,  1, 22,  1,
+
+#define to_Windows_31J_E5_AD_offsets 29717
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      5,  6,  2,  2,  7,  8,  9, 10,   11,  2, 12, 13, 14, 15,  2, 16,
+      2,  2,  2, 17, 18, 19, 20,  2,    2, 21,  2, 22,  2,  2,  2,  2,
+     23, 24,  2, 25,  2, 26,  2,  2,   27,  2, 28,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E5_AF_offsets 29783
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    2,  9,  2,  2, 10,  2,  2,  2,
+     11,  2, 12, 13, 14,  2,  2,  2,   15,  2,  2, 16,  2, 17, 18, 19,
+      2, 20, 21,  2, 22, 23, 24, 25,   26, 27,  2, 28, 29,  2, 30,  2,
+     31,  2,  2, 32,  2, 33, 34,  2,   35,  2, 36,  2,  2,  2, 37, 38,
+
+#define to_Windows_31J_E5_B0_offsets 29849
+128, 191,
+      1,  2,  3,  1,  4,  5,  6,  7,    8,  9, 10, 11,  1, 12, 13, 14,
+      1, 15,  1, 16,  1,  1, 17,  1,    1,  1, 18,  1,  1,  1, 19,  1,
+     20,  1, 21,  1, 22,  1,  1,  1,   23,  1,  1,  1,  1, 24,  1,  1,
+      1, 25,  1,  1,  1,  1,  1,  1,   26, 27, 28, 29, 30, 31, 32, 33,
+
+#define to_Windows_31J_E5_B2_offsets 29915
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  7,  1,    8,  9,  1, 10, 11,  1,  1,  1,
+      1, 12,  1, 13,  1,  1, 14, 15,   16,  1, 17, 18, 19,  1, 20,  1,
+
+#define to_Windows_31J_E5_B3_offsets 29981
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  1,  1,  1,  1,    7,  8,  9,  1,  1, 10,  1, 11,
+     12,  1,  1,  1,  1, 13, 14,  1,    1,  1, 15, 16,  1, 17,  1,  1,
+
+#define to_Windows_31J_E5_B4_offsets 30047
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  4,  1,
+      1,  5,  1,  1,  6,  7,  8,  9,   10, 11, 12, 13,  1,  1,  1, 14,
+      1,  1, 15,  1,  1,  1,  1, 16,    1, 17,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_B5_offsets 30113
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  3,  4,  1,  5,  1,
+      6,  1,  7,  8,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 10,  1,  1, 11, 12,  1, 13,
+      1,  1,  1, 14,  1,  1, 15,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E5_B6_offsets 30179
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  8,  1,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10,  1, 11,  1,
+      1,  1,  1,  1,  1,  1,  1, 12,   13, 14, 15,  1, 16, 17,  1,  1,
+
+#define to_Windows_31J_E5_B7_offsets 30245
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  1,  1,
+      5,  1,  6,  7,  1,  1,  8,  1,    1,  1,  1,  9,  1, 10, 11,  1,
+      1, 12,  1, 13,  1, 14, 15, 16,   17,  1,  1, 18,  1,  1, 19,  1,
+      1, 20, 21, 22, 23, 24,  1, 25,    1,  1,  1, 26,  1, 27, 28,  1,
+
+#define to_Windows_31J_E5_BC_offsets 30311
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  1,    1,  5,  6,  7,  8,  9,  1, 10,
+     11, 12,  1, 13, 14, 15, 16, 17,   18,  1,  1, 19,  1,  1,  1, 20,
+      1, 21,  1,  1,  1, 22, 23, 24,    1, 25,  1,  1,  1, 26,  1, 27,
+      1, 28,  1,  1, 29, 30,  1, 31,   32,  1,  1,  1, 33,  1, 34,  1,
+
+#define to_Windows_31J_E5_BD_offsets 30377
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    4,  1,  5,  1,  6,  1,  7,  1,
+      1,  8,  1,  9,  1,  1, 10, 11,    1, 12,  1,  1, 13, 14,  1,  1,
+      1, 15, 16,  1,  1,  1, 17, 18,    1, 19, 20, 21, 22, 23,  1,  1,
+     24, 25,  1, 26,  1,  1,  1, 27,    1, 28,  1,  1, 29,  1,  1, 30,
+
+#define to_Windows_31J_E5_BE_offsets 30443
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9,  7, 10, 11, 12,  7,  7,  7,
+     13, 14, 15, 16,  7,  7,  7, 17,   18, 19,  7,  7,  7,  7, 20,  7,
+     21, 22,  7,  7,  7,  7,  7,  7,   23, 24, 25,  7,  7, 26, 27,  7,
+      7,  7,  7, 28, 29,  7,  7, 30,    7, 31,  7,  7, 32, 33,  7,  7,
+
+#define to_Windows_31J_E5_BF_offsets 30509
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    8,  9,  1,  1, 10, 11, 12,  1,
+     13,  1,  1,  1, 14,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+     16, 17,  1,  1,  1, 18,  1,  1,   19,  1,  1, 20,  1, 21,  1, 22,
+
+#define to_Windows_31J_E6_81_offsets 30575
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    1,  1,  6,  7,  1,  8,  1,  1,
+      9,  1, 10,  1,  1, 11,  1,  1,    1, 12, 13,  1,  1, 14,  1, 15,
+     16,  1, 17, 18, 19, 20,  1,  1,   21, 22, 23, 24, 25, 26,  1, 27,
+     28,  1,  1,  1,  1, 29,  1, 30,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_82_offsets 30641
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  1,    1,  6,  7,  8,  9, 10,  1,  1,
+      1,  1, 11,  1, 12,  1, 13, 14,    1,  1, 15, 16,  1,  1,  1, 17,
+     18,  1,  1, 19,  1,  1, 20, 21,    1, 22, 23,  1,  1,  1,  1,  1,
+      1,  1, 24, 25, 26, 27, 28,  1,   29,  1,  1,  1, 30, 31,  1,  1,
+
+#define to_Windows_31J_E6_83_offsets 30707
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  7,  1,  1,    8,  1,  9,  1, 10,  1, 11, 12,
+     13, 14,  1, 15,  1,  1,  1, 16,   17,  1,  1,  1,  1,  1,  1,  1,
+     18, 19, 20, 21, 22,  1, 23, 24,    1, 25, 26, 27,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_84_offsets 30773
+128, 191,
+      1,  2,  3,  4,  3,  3,  5,  3,    6,  7,  3,  3,  3,  8,  9, 10,
+      3, 11,  3,  3,  3, 12,  3,  3,    3,  3, 13, 14,  3,  3,  3, 15,
+     16, 17,  3,  3,  3,  3,  3, 18,   19,  3,  3,  3, 20,  3,  3,  3,
+     21,  3,  3,  3, 22,  3,  3, 23,    3,  3,  3,  3, 24, 25, 26, 27,
+
+#define to_Windows_31J_E6_86_offsets 30839
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  1,  5,  1,
+      6,  7,  1,  1,  8,  1,  9,  1,   10, 11, 12,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 13,  1,  1, 14,    1, 15,  1, 16, 17,  1, 18,  1,
+      1,  1, 19,  1,  1,  1, 20,  1,    1,  1, 21,  1,  1,  1, 22,  1,
+
+#define to_Windows_31J_E6_88_offsets 30905
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  5,  2,  6,  7,  8,  2,
+      9, 10, 11, 12, 13,  2, 14,  2,    2,  2, 15, 16,  2, 17, 18, 19,
+      2, 20,  2,  2,  2,  2, 21,  2,    2,  2, 22,  2,  2,  2, 23, 24,
+     25,  2, 26, 27, 28,  2,  2,  2,   29,  2,  2, 30,  2,  2,  2, 31,
+
+#define to_Windows_31J_E6_8A_offsets 30971
+128, 191,
+      1,  2,  3,  4,  5,  2,  2,  2,    2,  6,  7,  2,  2,  2,  2,  2,
+      2,  8,  9, 10, 11, 12, 13, 14,   15,  2,  2, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2, 19,  2,    2,  2,  2, 20, 21,  2,  2,  2,
+      2, 22,  2,  2,  2, 23,  2,  2,    2, 24,  2, 25, 26, 27,  2,  2,
+
+#define to_Windows_31J_E6_8F_offsets 31037
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  6,  2,  2,  2,  2,  2,  7,
+      8,  2,  9,  2,  2,  2, 10,  2,    2,  2, 11, 12,  2,  2,  2,  2,
+      2, 13,  2, 14,  2,  2,  2,  2,    2, 15,  2,  2,  2,  2, 16,  2,
+      2,  2,  2,  2, 17, 18, 19,  2,    2,  2, 20,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E6_91_offsets 31103
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  6,    1,  7,  1,  1,  1,  1,  1,  8,
+      1,  1,  1,  1,  1,  1,  9,  1,   10,  1, 11,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_92_offsets 31169
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  5,  1,  6,  1,  1,    1,  1,  7,  1,  1,  8,  9,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1, 12,  1, 13,  1, 14, 15,  1,
+     16,  1, 17,  1,  1,  1,  1,  1,    1, 18,  1, 19, 20,  1,  1,  1,
+
+#define to_Windows_31J_E6_93_offsets 31235
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  1,  1,  1,  1,  6,  7,  1,
+      1,  1,  8,  1,  9,  1,  1,  1,   10,  1, 11,  1,  1,  1,  1,  1,
+     12, 13, 14, 15,  1,  1, 16, 17,    1,  1,  1,  1, 18,  1,  1, 19,
+      1, 20, 21,  1, 22,  1, 23,  1,    1,  1, 24,  1,  1, 25, 26,  1,
+
+#define to_Windows_31J_E6_95_offsets 31301
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  1,  4,  5,  6,
+      1,  7,  1,  1,  1,  8,  9, 10,   11, 12,  1,  1,  1, 13, 14,  1,
+      1,  1, 15, 16,  1,  1, 17,  1,    1,  1,  1,  1, 18,  1,  1,  1,
+     19,  1, 20,  1, 21, 22,  1, 23,   24,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_98_offsets 31367
+128, 191,
+      1,  2,  3,  4,  2,  2,  5,  6,    2,  7,  8,  2,  9,  2, 10, 11,
+      2,  2,  2, 12, 13, 14,  2,  2,    2,  2,  2,  2, 15,  2, 16, 17,
+     18,  2,  2,  2, 19, 20,  2, 21,   22,  2,  2,  2,  2, 23, 24, 25,
+      2, 26,  2,  2, 27, 28, 29,  2,    2,  2,  2, 30, 31,  2,  2, 32,
+
+#define to_Windows_31J_E6_99_offsets 31433
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  6,  1,  7,  1,  1,  1,  8,
+      1,  1,  9,  1,  1,  1,  1, 10,    1, 11,  1,  1,  1, 12, 13, 14,
+      1,  1, 15,  1, 16, 17, 18, 19,   20, 21,  1,  1,  1,  1, 22, 23,
+     24,  1,  1, 25, 26,  1, 27,  1,    1,  1, 28,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_9A_offsets 31499
+128, 191,
+      1,  2,  1,  3,  4,  1,  1,  5,    6,  7,  1,  1,  1,  1,  8,  1,
+      1,  9,  1,  1,  1,  1, 10, 11,   12, 13,  1,  1,  1, 14,  1,  1,
+     15,  1, 16,  1,  1,  1, 17,  1,    1,  1,  1, 18,  1,  1, 19,  1,
+      1,  1, 20,  1, 21,  1,  1,  1,   22, 23,  1,  1, 24,  1, 25, 26,
+
+#define to_Windows_31J_E6_9B_offsets 31565
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  7,  8,  1,  9, 10,  1,  1,
+     11,  1,  1,  1,  1,  1, 12,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+     14,  1, 15, 16, 17, 18,  1, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+
+#define to_Windows_31J_E6_9C_offsets 31631
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  8,  9,
+      2,  2,  2,  2, 10, 11, 12, 13,    2,  2,  2, 14,  2, 15, 16, 17,
+      2,  2,  2,  2,  2,  2, 18, 19,   20,  2, 21, 22, 23, 24, 25,  2,
+      2, 26,  2,  2, 27,  2, 28, 29,   30,  2, 31,  2,  2, 32,  2, 33,
+
+#define to_Windows_31J_E6_9D_offsets 31697
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    1,  4,  1,  1,  1,  1,  5,  6,
+      7,  8,  1,  9,  1,  1, 10,  1,    1, 11,  1,  1, 12,  1, 13, 14,
+     15, 16, 17, 18, 19, 20, 21,  1,    1,  1, 22,  1,  1, 23,  1, 24,
+     25, 26, 27, 28,  1, 29,  1, 30,    1,  1,  1,  1, 31,  1, 32, 33,
+
+#define to_Windows_31J_E6_9E_offsets 31763
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  5,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  1,  9,    1,  1, 10,  1, 11, 12,  1,  1,
+     13, 14, 15,  1,  1,  1, 16,  1,    1, 17,  1,  1,  1,  1,  1, 18,
+      1,  1,  1, 19, 20,  1, 21, 22,   23, 24,  1, 25,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_9F_offsets 31829
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  3,    3,  3,  6,  3,  3,  3,  7,  8,
+      9, 10,  3, 11, 12,  3,  3,  3,   13,  3, 14,  3,  3, 15, 16,  3,
+      3,  3, 17,  3, 18,  3,  3, 19,    3, 20,  3,  3, 21,  3, 22, 23,
+      3, 24,  3, 25, 26, 27,  3,  3,    3,  3,  3, 28,  3,  3, 29, 30,
+
+#define to_Windows_31J_E6_A0_offsets 31895
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  7,  8,    1,  1,  1,  1,  1,  1,  9,  1,
+      1, 10, 11,  1,  1,  1,  1,  1,    1, 12, 13, 14,  1,  1,  1,  1,
+      1,  1, 15,  1, 16,  1,  1,  1,   17, 18,  1,  1, 19, 20,  1,  1,
+
+#define to_Windows_31J_E6_A1_offsets 31961
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  6,    8,  6,  6,  6,  6,  9, 10,  6,
+     11, 12, 13, 14, 15,  6,  6,  6,    6, 16,  6,  6, 17, 18,  6, 19,
+      6,  6,  6, 20,  6,  6,  6, 21,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6,  6, 22,  6, 23, 24,    6,  6,  6,  6,  6,  6, 25, 26,
+
+#define to_Windows_31J_E6_A3_offsets 32027
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    4,  5,  6,  7,  1,  8,  1,  9,
+      1,  1, 10,  1, 11, 12,  1, 13,   14,  1, 15,  1,  1,  1,  1, 16,
+     17, 18,  1, 19,  1,  1,  1, 20,    1,  1,  1,  1,  1,  1, 21, 22,
+      1,  1, 23,  1,  1,  1,  1,  1,    1, 24, 25,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_A5_offsets 32093
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  3,  4,  5,  1,  1,    1,  6,  7,  1,  8,  9, 10,  1,
+     11, 12, 13,  1,  1,  1,  1,  1,   14,  1, 15, 16,  1, 17, 18, 19,
+      1,  1,  1, 20, 21, 22,  1, 23,   24, 25,  1,  1, 26, 27, 28,  1,
+
+#define to_Windows_31J_E6_A6_offsets 32159
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      1,  6,  1,  1,  7,  8,  1,  1,    9,  1,  1, 10, 11,  1,  1,  1,
+     12,  1,  1,  1,  1,  1,  1, 13,    1,  1,  1,  1,  1,  1, 14,  1,
+      1, 15, 16,  1, 17,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19, 20,
+
+#define to_Windows_31J_E6_A7_offsets 32225
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  4,    1,  1,  5,  6,  7,  8,  9,  1,
+     10,  1,  1, 11,  1,  1,  1,  1,   12, 13,  1,  1,  1, 14, 15,  1,
+      1,  1, 16,  1,  1,  1,  1, 17,   18,  1,  1, 19,  1, 20,  1,  1,
+      1,  1, 21,  1,  1,  1,  1,  1,    1, 22,  1, 23,  1, 24,  1, 25,
+
+#define to_Windows_31J_E6_A8_offsets 32291
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  1,  4,  5,  6,  1,  1,  1,
+      1,  1,  7,  8,  9,  1,  1, 10,    1, 11,  1, 12,  1,  1, 13, 14,
+      1, 15, 16, 17,  1,  1,  1,  1,    1, 18, 19, 20,  1,  1, 21,  1,
+     22,  1,  1,  1,  1, 23, 24,  1,   25, 26, 27,  1,  1, 28,  1,  1,
+
+#define to_Windows_31J_E6_A9_offsets 32357
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    5,  1,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  1,  1,  1,  1,  9,
+      1, 10, 11,  1,  1,  1, 12,  1,    1,  1,  1, 13,  1,  1,  1,  1,
+      1,  1, 14, 15,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1, 17, 18,
+
+#define to_Windows_31J_E6_AB_offsets 32423
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  1,  1,  1,    1,  1,  7,  8,  1,  1,  9, 10,
+      1,  1, 11,  1, 12,  1,  1,  1,   13,  1, 14,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 15, 16,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_AF_offsets 32489
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  2,    2,  2,  2,  5,  2,  6,  7,  2,
+      2,  2,  8,  9, 10,  2, 11,  2,   12,  2,  2, 13,  2,  2,  2, 14,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 15, 16,  2,  2, 17,
+      2,  2,  2, 18,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E6_B0_offsets 32555
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  5,  6,  1,  1,  7,    1,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  9, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 11,  1,  1, 12,   13,  1,  1,  1,  1,  1, 14, 15,
+
+#define to_Windows_31J_E6_B1_offsets 32621
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  4,
+      6,  4,  4,  4,  4,  7,  4,  8,    4,  4,  9,  4, 10, 11, 12, 13,
+     14,  4, 15,  4,  4,  4,  4,  4,   16,  4, 17,  4,  4,  4,  4, 18,
+     19,  4, 20, 21,  4,  4,  4,  4,    4,  4, 22,  4,  4, 23, 24,  4,
+
+#define to_Windows_31J_E6_B2_offsets 32687
+128, 191,
+      1,  2,  3,  4,  1,  1,  5,  1,    6,  1,  1,  1,  7,  8,  1,  1,
+      9,  1, 10, 11,  1,  1, 12,  1,    1, 13, 14, 15,  1,  1,  1,  1,
+      1, 16, 17,  1,  1,  1,  1,  1,    1,  1,  1, 18,  1,  1, 19,  1,
+      1, 20,  1, 21,  1,  1,  1,  1,   22, 23, 24, 25, 26, 27, 28, 29,
+
+#define to_Windows_31J_E6_B3_offsets 32753
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1, 10,    1, 11, 12, 13,  1, 14,  1,  1,
+      1, 15, 16, 17,  1, 18,  1,  1,   19,  1, 20,  1,  1,  1,  1, 21,
+     22, 23,  1, 24,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_B4_offsets 32819
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  3,  4,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  1,  6,    1,  7,  1,  8,  1,  1,  9, 10,
+      1,  1,  1,  1,  1, 11,  1,  1,    1, 12, 13, 14,  1,  1,  1,  1,
+      1,  1, 15, 16,  1, 17, 18,  1,   19,  1,  1, 20,  1, 21, 22,  1,
+
+#define to_Windows_31J_E6_B5_offsets 32885
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  9,  1, 10,  1,    1, 11, 12,  1, 13,  1, 14, 15,
+      1,  1,  1,  1, 16,  1,  1, 17,   18, 19,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E6_B6_offsets 32951
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  1,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  7,  1,  8,  9,  1,    1, 10,  1, 11, 12,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 13,  1,  1, 14,
+      1,  1, 15,  1,  1, 16,  1,  1,   17,  1,  1,  1, 18,  1,  1,  1,
+
+#define to_Windows_31J_E6_B7_offsets 33017
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  5,    2,  2,  2,  6,  7,  2,  2,  8,
+      2,  9, 10,  2,  2, 11,  2,  2,   12, 13,  2,  2,  2,  2, 14,  2,
+      2, 15,  2,  2, 16,  2, 17,  2,   18,  2, 19, 20, 21,  2, 22,  2,
+      2, 23, 24, 25,  2, 26,  2, 27,   28, 29, 30, 31, 32,  2,  2,  2,
+
+#define to_Windows_31J_E6_B8_offsets 33083
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1,  1,    1, 10, 11, 12,  1, 13,  1, 14,
+     15, 16,  1, 17, 18, 19, 20, 21,    1, 22,  1, 23, 24, 25, 26, 27,
+      1,  1,  1,  1,  1,  1,  1,  1,   28, 29, 30,  1, 31,  1, 32,  1,
+
+#define to_Windows_31J_E6_B9_offsets 33149
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  3,  1,  1,  4,  5,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    7,  1,  1,  8,  9,  1,  1, 10,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1, 12,  1,  1, 13, 14,
+      1,  1, 15,  1,  1,  1, 16,  1,    1,  1,  1,  1,  1,  1, 17, 18,
+
+#define to_Windows_31J_E6_BA_offsets 33215
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  5,
+      6,  2,  2,  2,  2,  2,  7,  2,    8,  2,  2,  2,  9, 10,  2, 11,
+      2,  2, 12,  2,  2, 13,  2,  2,    2,  2, 14,  2,  2,  2,  2, 15,
+      2,  2, 16,  2,  2,  2, 17, 18,    2,  2, 19,  2,  2, 20,  2, 21,
+
+#define to_Windows_31J_E6_BE_offsets 33281
+128, 191,
+      1,  2,  3,  4,  5,  4,  6,  4,    7,  4,  4,  4,  4,  4,  8,  4,
+      4,  9,  4,  4,  4,  4,  4, 10,    4,  4,  4,  4,  4,  4,  4,  4,
+      4, 11,  4, 12, 13,  4,  4,  4,    4,  4, 14,  4,  4,  4,  4,  4,
+      4, 15,  4, 16,  4, 17,  4,  4,    4, 18,  4,  4,  4,  4,  4,  4,
+
+#define to_Windows_31J_E6_BF_offsets 33347
+128, 191,
+      1,  2,  3,  4,  5,  5,  6,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  7,  8,  5,  5,    9,  5,  5, 10,  5,  5,  5, 11,
+     12, 13,  5,  5, 14,  5,  5,  5,    5,  5,  5, 15, 16,  5, 17, 18,
+      5, 19,  5, 20,  5, 21, 22,  5,    5,  5, 23,  5,  5,  5, 24,  5,
+
+#define to_Windows_31J_E7_80_offsets 33413
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  5,  1,  6,  1,  1,  1,  7,
+      1,  8,  1,  1,  1,  9,  1,  1,   10,  1, 11, 12,  1, 13, 14, 15,
+      1,  1,  1,  1,  1,  1, 16, 17,   18,  1,  1,  1, 19,  1,  1,  1,
+     20,  1, 21,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 22,  1,
+
+#define to_Windows_31J_E7_82_offsets 33479
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  4,  1,  1,  1,  5,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  9, 10, 11, 12,
+      1,  1,  1, 13,  1,  1,  1,  1,   14, 15, 16, 17,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_84_offsets 33545
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  6,  7,  1,  8,  1,  1,  1,
+      1,  9,  1,  1,  1,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1,  1, 12,  1,  1,  1,
+
+#define to_Windows_31J_E7_85_offsets 33611
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  4,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  1,  7,  8,  1,    1,  9,  1,  1, 10,  1,  1,  1,
+      1,  1, 11,  1, 12, 13, 14, 15,    1, 16,  1,  1, 17,  1, 18,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_Windows_31J_E7_87_offsets 33677
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    4,  5,  1,  1,  1,  1,  6,  1,
+      7,  1,  8,  1,  9, 10,  1, 11,    1,  1,  1,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1, 14, 15, 16,    1,  1,  1,  1, 17, 18, 19,  1,
+      1,  1,  1,  1,  1, 20,  1,  1,    1, 21,  1, 22, 23,  1, 24, 25,
+
+#define to_Windows_31J_E7_8A_offsets 33743
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  5,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  6,  4,  4,  4,  7,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  4,  9,  4,  4,  4,  4, 10,    4,  4,  4,  4, 11,  4,  4, 12,
+      4, 13, 14,  4,  4,  4, 15,  4,    4, 16,  4,  4,  4,  4, 17,  4,
+
+#define to_Windows_31J_E7_8C_offsets 33809
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  1,  1,  9, 10,  1,  1,    1, 11, 12, 13,  1,  1, 14, 15,
+      1,  1,  1,  1, 16,  1, 17, 18,    1,  1,  1,  1,  1,  1, 19, 20,
+
+#define to_Windows_31J_E7_8D_offsets 33875
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  1,  1,    8,  1,  9,  1,  1,  1,  1,  1,
+     10,  1, 11,  1,  1, 12,  1, 13,   14,  1, 15, 16,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_8E_offsets 33941
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  4,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1, 10,  1, 11,  1,  1,
+
+#define to_Windows_31J_E7_8F_offsets 34007
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  6,  2,  2,  7,  8,  2,
+      2,  2,  9,  2,  2,  2, 10,  2,    2,  2,  2,  2,  2,  2, 11,  2,
+     12,  2,  2, 13,  2, 14,  2,  2,    2,  2, 15,  2,  2, 16, 17,  2,
+      2, 18,  2,  2,  2, 19,  2,  2,   20,  2,  2,  2,  2,  2, 21,  2,
+
+#define to_Windows_31J_E7_90_offsets 34073
+128, 191,
+      1,  1,  1,  2,  1,  3,  4,  5,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  8,  9,  1,    1, 10, 11,  1,  1,  1, 12,  1,
+      1,  1, 13, 14, 15, 16, 17,  1,    1,  1, 18,  1,  1,  1,  1, 19,
+
+#define to_Windows_31J_E7_91_offsets 34139
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  4,  5,  6,  7,  1,  8,  9,
+     10,  1, 11, 12, 13,  1,  1,  1,    1, 14, 15,  1,  1,  1,  1, 16,
+     17,  1,  1, 18,  1,  1, 19,  1,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_Windows_31J_E7_92_offsets 34205
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  3,  1,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  5,  6,
+      1,  1,  7,  1,  1,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10,  1,  1,
+
+#define to_Windows_31J_E7_94_offsets 34271
+128, 191,
+      1,  2,  1,  3,  4,  5,  1,  1,    1,  1,  1,  1,  6,  7,  8,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,   12,  1, 13,  1, 14,  1, 15, 16,
+      1,  1,  1, 17,  1, 18, 19,  1,   20,  1,  1, 21, 22,  1,  1, 23,
+     24, 25, 26, 27,  1,  1,  1, 28,   29,  1, 30, 31, 32,  1,  1,  1,
+
+#define to_Windows_31J_E7_95_offsets 34337
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  4,  5,  6,  7,  8,  1,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,    1, 12, 13, 14, 15, 16,  1,  1,
+     17,  1, 18,  1, 19, 20, 21, 22,    1, 23, 24, 25,  1, 26,  1, 27,
+     28,  1,  1, 29, 30,  1, 31, 32,   33,  1,  1,  1,  1,  1,  1, 34,
+
+#define to_Windows_31J_E7_9A_offsets 34403
+128, 191,
+      1,  2,  3,  4,  5,  2,  6,  7,    8,  2,  2,  9,  2,  2, 10,  2,
+     11,  2,  2, 12,  2,  2, 13,  2,    2, 14, 15, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2, 19,  2,    2,  2,  2,  2,  2,  2, 20,  2,
+     21,  2,  2,  2, 22,  2,  2, 23,   24, 25, 26,  2,  2,  2,  2, 27,
+
+#define to_Windows_31J_E7_9D_offsets 34469
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  5,  6,  2,  2,  2,  2,
+      2,  7,  2,  8,  2,  9, 10,  2,   11,  2,  2, 12,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2, 13,  2,  2,  2,  2, 14, 15,
+
+#define to_Windows_31J_E7_A0_offsets 34535
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  1,
+      1,  1,  4,  1,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  1,  9, 10, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1, 15,
+
+#define to_Windows_31J_E7_A1_offsets 34601
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  4,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  6,  7,  1,  1,  8,
+      1,  1,  9,  1, 10,  1,  1,  1,    1,  1, 11,  1, 12,  1,  1,  1,
+
+#define to_Windows_31J_E7_A4_offsets 34667
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  6,  1,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  1,    1,  1,  9, 10, 11,  1,  1,  1,
+     12,  1,  1,  1,  1,  1,  1,  1,    1,  1, 13,  1, 14,  1, 15,  1,
+
+#define to_Windows_31J_E7_A6_offsets 34733
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    3,  3,  6,  3,  3,  7,  8,  9,
+      3,  3,  3,  3, 10,  3,  3,  3,    3,  3,  3, 11,  3, 12,  3,  3,
+      3,  3,  3,  3,  3,  3, 13, 14,    3,  3, 15,  3,  3,  3, 16,  3,
+     17,  3,  3, 18,  3,  3,  3,  3,    3, 19, 20,  3,  3, 21, 22, 23,
+
+#define to_Windows_31J_E7_AB_offsets 34799
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  1,  7,  8,  1,  9,  1, 10,
+      1, 11, 12, 13,  1, 14,  1,  1,    1, 15, 16,  1, 17, 18,  1, 19,
+     20, 21, 22, 23,  1, 24, 25, 26,    1,  1, 27, 28,  1, 29,  1, 30,
+     31,  1,  1,  1,  1,  1, 32,  1,   33, 34, 35,  1,  1,  1,  1, 36,
+
+#define to_Windows_31J_E7_AE_offsets 34865
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  4,  1,  5,  1,  6,
+      1,  1,  7,  1,  8,  9,  1, 10,   11, 12, 13,  1, 14, 15, 16, 17,
+      1, 18,  1,  1,  1,  1,  1,  1,    1,  1, 19,  1,  1, 20,  1,  1,
+      1, 21,  1,  1, 22,  1,  1,  1,   23,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_B5_offsets 34931
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    7,  1,  1,  8,  9,  1, 10, 11,
+     12,  1,  1,  1,  1,  1, 13,  1,    1,  1,  1, 14, 15,  1, 16,  1,
+      1, 17, 18, 19,  1,  1, 20,  1,   21,  1,  1,  1,  1,  1, 22,  1,
+      1, 23, 24, 25,  1, 26, 27,  1,    1, 28,  1,  1,  1, 29,  1,  1,
+
+#define to_Windows_31J_E7_B6_offsets 34997
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  3,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  5,  6,  7,  8,  1,  1,  9,
+     10,  1, 11, 12,  1,  1,  1,  1,    1,  1,  1, 13, 14, 15, 16, 17,
+     18, 19, 20,  1, 21, 22,  1, 23,   24,  1, 25, 26,  1, 27, 28, 29,
+
+#define to_Windows_31J_E7_B7_offsets 35063
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  4,  1,  1,  1,  5,
+      1,  6,  7,  1,  1,  8,  9,  1,   10,  1, 11,  1, 12, 13, 14,  1,
+     15, 16,  1,  1, 17,  1,  1,  1,   18, 19,  1,  1, 20,  1,  1, 21,
+      1,  1, 22,  1, 23,  1,  1,  1,    1,  1,  1, 24,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_B9_offsets 35129
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  1,    1,  1,  5,  6,  1,  7,  1,  1,
+      1,  1,  8,  1,  9, 10, 11,  1,    1, 12, 13,  1,  1, 14, 15,  1,
+      1,  1,  1,  1,  1,  1, 16, 17,    1, 18, 19,  1,  1, 20,  1,  1,
+     21,  1,  1,  1,  1,  1,  1,  1,    1, 22,  1, 23, 24, 25,  1, 26,
+
+#define to_Windows_31J_E7_BA_offsets 35195
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    4,  5,  6,  1,  7,  1,  8,  9,
+     10,  1, 11, 12, 13,  1, 14,  1,    1,  1,  1, 15, 16,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_BD_offsets 35261
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  4,  5,  6,  1,
+      7,  8,  1,  1,  9, 10,  1,  1,   11,  1,  1,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1, 14,   15, 16, 17, 18,  1,  1, 19,  1,
+     20,  1, 21,  1,  1, 22,  1, 23,   24, 25,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E7_BE_offsets 35327
+128, 191,
+      1,  1,  2,  3,  1,  4,  5,  6,    7,  1,  8,  1,  9,  1, 10,  1,
+      1,  1,  1,  1, 11,  1,  1,  1,    1,  1, 12,  1,  1, 13, 14,  1,
+      1, 15,  1, 16, 17,  1,  1,  1,   18, 19,  1,  1,  1,  1, 20, 21,
+      1,  1, 22,  1,  1,  1, 23,  1,   24, 25,  1,  1,  1, 26,  1,  1,
+
+#define to_Windows_31J_E8_8C_offsets 35393
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    1,  8,  1,  1,  1,  1,  9,  1,
+      1,  1,  1,  1,  1,  1, 10, 11,   12,  1,  1,  1, 13,  1,  1,  1,
+      1,  1,  1, 14,  1,  1,  1,  1,   15,  1,  1, 16,  1,  1,  1, 17,
+      1, 18, 19,  1, 20, 21, 22,  1,   23, 24,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_8D_offsets 35459
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  4,  5,  2,  2,  2,  2,  6,
+      7,  2,  8,  2,  2,  2,  2,  2,    9,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 10,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 11,  2, 12,  2, 13,    2,  2,  2, 14, 15,  2,  2, 16,
+
+#define to_Windows_31J_E8_8F_offsets 35525
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  1,  5,  1,  6,  1,  7,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,   10,  1,  1,  1, 11,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1, 16,
+     17, 18, 19,  1, 20,  1, 21, 22,    1,  1,  1, 23,  1, 24,  1,  1,
+
+#define to_Windows_31J_E8_91_offsets 35591
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  4,  1,  1,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  7,  1,  1,  1,  1,
+      1,  8,  9, 10,  1,  1, 11,  1,    1, 12,  1, 13, 14, 15, 16, 17,
+      1, 18,  1,  1,  1, 19,  1, 20,    1, 21, 22,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_92_offsets 35657
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  4,  1,  1,  1,  1,
+      5,  1,  1,  1,  6,  1,  1,  1,    1,  7,  1,  1,  8,  1,  1,  9,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 11,  1,  1,
+      1,  1, 12,  1, 13,  1,  1,  1,   14, 15,  1, 16, 17,  1,  1, 18,
+
+#define to_Windows_31J_E8_93_offsets 35723
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    1,  5,  6,  7,  1,  8,  1,  1,
+      9, 10,  1,  1,  1,  1, 11,  1,    1, 12, 13,  1, 14,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 15,  1, 16,  1,
+      1,  1,  1,  1, 17,  1,  1,  1,    1,  1,  1,  1, 18,  1,  1, 19,
+
+#define to_Windows_31J_E8_95_offsets 35789
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  3,    5,  6,  7,  8,  3,  3,  9,  3,
+      3,  3,  3, 10,  3, 11,  3, 12,   13, 14, 15,  3,  3,  3,  3,  3,
+      3,  3,  3, 16,  3,  3,  3,  3,   17, 18, 19, 20,  3, 21,  3,  3,
+      3,  3,  3,  3,  3,  3,  3, 22,    3,  3,  3,  3,  3,  3, 23,  3,
+
+#define to_Windows_31J_E8_96_offsets 35855
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  4,    5,  2,  6,  2,  2,  2,  2,  2,
+      7,  8,  2,  2,  9,  2,  2, 10,    2, 11,  2, 12, 13,  2,  2,  2,
+      2,  2,  2,  2, 14,  2, 15,  2,   16, 17, 18, 19, 20,  2, 21, 22,
+     23,  2,  2,  2,  2,  2,  2,  2,    2, 24, 25,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E8_A0_offsets 35921
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  4,  5,  6,
+      1,  7,  1,  1,  1,  8,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 10, 11, 12,  1,  1,  1, 13,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 14,  1,  1,  1,  1, 15,  1,    1, 16,  1, 17,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_A3_offsets 35987
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  8,  9,  1,  1,   10, 11,  1,  1, 12, 13,  1, 14,
+      1, 15,  1,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 17, 18, 19, 20,  1,  1,   21, 22,  1,  1, 23, 24, 25,  1,
+
+#define to_Windows_31J_E8_A4_offsets 36053
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9,  1,  1,  1,  1,    1,  1,  1,  1, 10, 11, 12,  1,
+      1,  1,  1,  1,  1, 13,  1,  1,    1,  1, 14, 15,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 16,  1,   17,  1,  1, 18,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_A8_offsets 36119
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  7,  2,  8,  2,
+      9,  2, 10, 11,  2,  2, 12, 13,   14,  2,  2, 15,  2, 16,  2, 17,
+      2,  2,  2, 18,  2, 19,  2,  2,    2,  2, 20,  2,  2, 21,  2,  2,
+      2, 22,  2, 23, 24,  2, 25, 26,    2,  2, 27, 28, 29,  2,  2,  2,
+
+#define to_Windows_31J_E8_A9_offsets 36185
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  6,  7,  1,  8,  9,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+     12,  1, 13, 14,  1,  1, 15,  1,    1, 16,  1, 17, 18, 19, 20,  1,
+     21, 22, 23, 24,  1,  1,  1,  1,    1, 25,  1,  1, 26,  1,  1,  1,
+
+#define to_Windows_31J_E8_AA_offsets 36251
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  5,    1,  6,  1,  1,  7,  8,  1,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,   12,  1, 13,  1,  1,  1, 14,  1,
+     15, 16,  1, 17, 18, 19, 20, 21,   22,  1,  1,  1, 23, 24,  1,  1,
+     25,  1, 26,  1,  1,  1,  1,  1,    1, 27,  1,  1, 28,  1, 29, 30,
+
+#define to_Windows_31J_E8_AB_offsets 36317
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  6,  7,  1,  8,
+      1,  1,  9,  1,  1,  1, 10,  1,    1,  1, 11, 12, 13,  1, 14, 15,
+     16, 17, 18,  1, 19,  1, 20, 21,    1,  1,  1, 22,  1, 23, 24,  1,
+      1, 25,  1, 26,  1,  1, 27, 28,   29,  1, 30,  1,  1,  1, 31,  1,
+
+#define to_Windows_31J_E8_AD_offsets 36383
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  4,  1,  5,  6,
+      1,  1,  1,  7,  1,  1,  8,  1,    9,  1, 10, 11, 12,  1,  1, 13,
+      1,  1,  1,  1,  1,  1, 14,  1,    1,  1,  1, 15, 16,  1,  1, 17,
+     18, 19, 20,  1, 21,  1,  1, 22,    1,  1,  1,  1,  1, 23,  1, 24,
+
+#define to_Windows_31J_E8_B3_offsets 36449
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  6,  9,  6,  6, 10, 11,  6,
+      6, 12,  6, 13,  6,  6,  6,  6,    6,  6, 14, 15, 16,  6, 17,  6,
+     18,  6, 19, 20, 21,  6, 22,  6,    6,  6, 23,  6,  6, 24,  6,  6,
+     25,  6,  6,  6, 26,  6,  6,  6,    6,  6, 27, 28, 29, 30,  6,  6,
+
+#define to_Windows_31J_E8_B4_offsets 36515
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  1,  6,  7,  1,  8,  1,  9,
+     10,  1, 11, 12, 13,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_B5_offsets 36581
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  5,  1,  6,  1,  1,
+      7,  8,  1,  9, 10,  1, 11, 12,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E8_BB_offsets 36647
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  7,  8,  1,  9,
+      1,  1, 10,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1, 12,
+      1,  1, 13, 14,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16,  1,  1, 17, 18, 19, 20,  1,
+
+#define to_Windows_31J_E9_81_offsets 36713
+128, 191,
+      1,  2,  3,  1,  1,  4,  1,  5,    1,  6,  7,  8,  1,  9, 10, 11,
+     12, 13, 14, 15, 16, 17, 18,  1,   19, 20,  1,  1, 21,  1, 22,  1,
+     23, 24,  1, 25,  1, 26,  1, 27,   28, 29,  1,  1,  1, 30, 31, 32,
+      1,  1, 33,  1,  1, 34, 35, 36,   37,  1, 38,  1, 39, 40,  1, 41,
+
+#define to_Windows_31J_E9_83_offsets 36779
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  6,  1,
+      1,  7,  8,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1, 11,  1,  1,
+      1,  1,  1,  1,  1, 12,  1, 13,    1,  1,  1,  1,  1, 14,  1,  1,
+
+#define to_Windows_31J_E9_84_offsets 36845
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  4,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  7,  1,  1,
+      8,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_87_offsets 36911
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    6,  7,  3,  8,  9, 10, 11, 12,
+     13, 14,  3,  3,  3,  3, 15, 16,   17,  3, 18, 19, 20, 21, 22, 23,
+      3, 24,  3, 25, 26, 27, 28, 29,    3,  3,  3,  3,  3, 30, 31,  3,
+      3,  3,  3,  3,  3, 32, 33,  3,    3,  3,  3,  3, 34,  3,  3, 35,
+
+#define to_Windows_31J_E9_88_offsets 36977
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  3,  1,  1,  4,  5,  1,
+      6,  7,  1,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1, 10,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 11,  1,  1, 12,  1,  1,  1,
+      1,  1,  1,  1, 13,  1,  1, 14,    1, 15, 16,  1, 17,  1,  1, 18,
+
+#define to_Windows_31J_E9_89_offsets 37043
+128, 191,
+      1,  2,  2,  2,  3,  4,  2,  2,    5,  6,  2,  7,  2,  2,  8,  2,
+      9, 10,  2,  2,  2,  2,  2, 11,    2, 12, 13, 14,  2,  2, 15,  2,
+      2,  2, 16,  2, 17,  2, 18, 19,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 20,  2,  2,  2,  2,  2, 21,   22,  2,  2,  2,  2,  2, 23,  2,
+
+#define to_Windows_31J_E9_8A_offsets 37109
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    5,  2,  2,  2,  2,  2,  2,  2,
+      2,  6,  2,  7,  2,  8,  9,  2,   10,  2, 11, 12, 13,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 14,    2,  2,  2,  2,  2, 15,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 16,    2, 17,  2,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E9_8B_offsets 37175
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      3,  1,  4,  5,  1,  6,  1,  7,    1,  8,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1, 10,  1,  1, 11,    1, 12, 13,  1,  1, 14,  1,  1,
+      1,  1, 15, 16,  1,  1,  1,  1,   17, 18, 19, 20, 21,  1,  1, 22,
+
+#define to_Windows_31J_E9_8C_offsets 37241
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  8,  1,  1,  9, 10,  1,
+     11, 12, 13, 14,  1, 15, 16,  1,   17,  1,  1, 18, 19,  1, 20, 21,
+      1,  1, 22,  1,  1, 23,  1,  1,    1,  1, 24, 25,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_8D_offsets 37307
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  4,  1,  5,  1,  1,
+      1,  1,  1,  1,  6,  1,  7,  8,    1,  1,  1,  9, 10,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 12,  1, 13,  1,
+     14,  1,  1,  1,  1, 15,  1,  1,    1,  1,  1,  1, 16,  1, 17,  1,
+
+#define to_Windows_31J_E9_8E_offsets 37373
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  4,  5,    1,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  1,  1,  8,    1,  1,  1,  1,  9, 10, 11,  1,
+     12,  1,  1,  1,  1,  1,  1,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_8F_offsets 37439
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  1,  1,  7,  8,    9,  1,  1,  1,  1, 10, 11,  1,
+      1, 12,  1,  1, 13, 14,  1,  1,   15,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_90_offsets 37505
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  5,  6,  1,  1,  1,    7,  8,  9,  1,  1,  1,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1, 12,  1,  1,  1, 13, 14,  1,   15,  1, 16,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_91_offsets 37571
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  7,  8,  1,  1,  1,  1,    1,  1,  9, 10,  1,  1, 11,  1,
+     12,  1, 13,  1,  1,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+     15,  1,  1,  1,  1, 16,  1, 17,    1,  1,  1,  1, 18, 19, 20, 21,
+
+#define to_Windows_31J_E9_96_offsets 37637
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    2,  6,  7,  8,  2,  2,  2,  9,
+      2, 10, 11, 12, 13,  2, 14,  2,   15, 16,  2,  2,  2,  2,  2,  2,
+     17,  2, 18, 19, 20, 21,  2, 22,   23,  2,  2,  2,  2, 24,  2,  2,
+      2,  2, 25,  2,  2,  2,  2,  2,    2, 26,  2, 27, 28,  2, 29,  2,
+
+#define to_Windows_31J_E9_9A_offsets 37703
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    4,  1,  5,  6,  1,  7,  8,  9,
+      1,  1,  1,  1, 10, 11,  1, 12,   13, 14,  1, 15, 16, 17,  1,  1,
+     18,  1,  1, 19,  1,  1,  1, 20,   21,  1, 22,  1,  1,  1,  1, 23,
+     24, 25, 26,  1, 27,  1, 28, 29,   30, 31,  1, 32, 33,  1,  1,  1,
+
+#define to_Windows_31J_E9_9C_offsets 37769
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    6,  2,  7,  2,  2,  8,  9, 10,
+      2, 11,  2, 12,  2,  2, 13,  2,    2, 14,  2,  2, 15,  2, 16,  2,
+      2,  2,  2,  2, 17,  2,  2, 18,    2,  2, 19,  2,  2,  2,  2,  2,
+     20,  2, 21, 22,  2,  2,  2,  2,   23, 24,  2, 25,  2, 26, 27,  2,
+
+#define to_Windows_31J_E9_9D_offsets 37835
+128, 191,
+      1,  1,  2,  3,  4,  1,  5,  1,    6,  7,  1,  1,  1,  8,  1,  9,
+      1, 10, 11,  1,  1, 12, 13,  1,    1, 14,  1,  1, 15,  1, 16,  1,
+     17, 18, 19,  1, 20,  1, 21,  1,   22, 23,  1, 24,  1, 25,  1,  1,
+      1, 26,  1,  1, 27,  1,  1,  1,    1, 28, 29,  1, 30,  1,  1,  1,
+
+#define to_Windows_31J_E9_A1_offsets 37901
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  4,  5,  6,  7,
+      1,  1,  1,  1,  8,  9,  1, 10,   11,  1,  1, 12,  1,  1, 13,  1,
+      1,  1,  1,  1,  1, 14,  1, 15,    1,  1,  1, 16,  1,  1,  1, 17,
+     18, 19,  1, 20, 21,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_A4_offsets 37967
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      7,  1,  8,  9, 10,  1,  1,  1,   11,  1,  1,  1,  1, 12, 13,  1,
+     14, 15,  1,  1, 16,  1,  1, 17,   18,  1,  1,  1, 19,  1, 20,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 21, 22,  1,
+
+#define to_Windows_31J_E9_A6_offsets 38033
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  3,    4,  5,  1,  1,  1,  1,  6,  1,
+      1,  1,  1,  1,  1,  7,  1,  1,    8,  1,  1,  1,  9, 10, 11,  1,
+      1,  1,  1, 12, 13,  1,  1,  1,    1,  1,  1,  1, 14,  1,  1,  1,
+
+#define to_Windows_31J_E9_A9_offsets 38099
+128, 191,
+      1,  2,  3,  4,  2,  5,  2,  2,    2,  2,  2,  2,  2,  6,  7,  2,
+      2,  2,  2,  2,  2,  8,  2,  9,    2,  2, 10, 11,  2,  2,  2, 12,
+      2,  2, 13,  2, 14, 15,  2,  2,    2, 16, 17, 18,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_Windows_31J_E9_AB_offsets 38165
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  4,
+      2,  5,  2,  6,  7,  2,  2,  2,    8,  9,  2,  2, 10,  2, 11, 12,
+      2,  2, 13, 14,  2,  2, 15,  2,    2,  2, 16, 17,  2, 18, 19, 20,
+      2, 21,  2,  2, 22,  2,  2, 23,    2,  2,  2, 24,  2,  2,  2,  2,
+
+#define to_Windows_31J_E9_AD_offsets 38231
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  7,  8,  9,
+      1, 10,  1,  1, 11,  1,  1,  1,   12,  1, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 14,
+      1,  1, 15,  1, 16, 17,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_AE_offsets 38297
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  4,
+      1,  5,  6,  7,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1,  1, 10,
+     11,  1,  1,  1,  1,  1,  1,  1,   12,  1, 13, 14,  1, 15, 16,  1,
+      1, 17,  1,  1, 18,  1,  1,  1,    1, 19,  1, 20,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_B0_offsets 38363
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    5,  6,  7,  2,  8,  9,  2,  2,
+     10,  2, 11, 12, 13, 14,  2,  2,    2,  2,  2, 15,  2,  2,  2,  2,
+      2, 16,  2,  2, 17, 18,  2,  2,    2,  2,  2,  2,  2, 19, 20, 21,
+     22,  2, 23,  2,  2,  2,  2,  2,    2, 24, 25, 26,  2,  2, 27,  2,
+
+#define to_Windows_31J_E9_B5_offsets 38429
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9, 10, 11,  1,
+     12, 13,  1,  1, 14,  1,  1,  1,    1,  1,  1, 15, 16,  1,  1, 17,
+     18,  1, 19,  1,  1,  1,  1,  1,    1,  1, 20,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_B8_offsets 38495
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  4,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_E9_BB_offsets 38561
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  3,  4,  5,  6,
+      7,  8,  9,  1, 10,  1,  1,  1,   11, 12,  1, 13, 14, 15, 16,  1,
+     17,  1,  1,  1,  1, 18,  1,  1,   19,  1,  1,  1,  1,  1,  1, 20,
+      1,  1,  1,  1, 21,  1, 22, 23,    1, 24,  1, 25, 26, 27,  1,  1,
+
+#define to_Windows_31J_EE_9D_offsets 38627
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25, 25, 25,
+     25, 25, 25, 25, 25, 25, 25, 25,   25, 25, 25, 25, 25, 25, 25, 25,
+
+#define to_Windows_31J_EE_offsets 38693
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+     31, 31, 31, 31, 31, 31, 31, 31,   31, 31, 31, 31, 31, 31, 31, 31,
+
+#define to_Windows_31J_EF_A4_offsets 38759
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_EF_A7_offsets 38825
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_EF_A8_offsets 38891
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      4,  5,  6,  7,  8,  9, 10, 11,   12, 13, 14, 15, 16, 17, 18, 19,
+     20, 21, 22, 23, 24, 25, 26, 27,   28, 29, 30, 31, 32, 33,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_EF_BD_offsets 38957
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 63,
+
+#define to_Windows_31J_EF_BF_offsets 39023
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_Windows_31J_EF_offsets 39089
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  7,  8,
+
+#define to_Windows_31J_offsets 39155
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  6,
+      7,  8,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 10, 10, 10, 19, 20, 21,
+     22, 23, 23, 23, 24,
+
+};
+static const unsigned int
+japanese_sjis_word_array[26127] = {
+#define from_Shift_JIS_81_infos WORDINDEX2INFO(0)
+                INVALID, o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8E),
+     o3(0xE3,0x83,0xBB), o3(0xEF,0xBC,0x9A),
+     o3(0xEF,0xBC,0x9B), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0x81), o3(0xE3,0x82,0x9B),
+     o3(0xE3,0x82,0x9C),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x80),      o2(0xC2,0xA8),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBF,0xA3),
+     o3(0xEF,0xBC,0xBF), o3(0xE3,0x83,0xBD),
+     o3(0xE3,0x83,0xBE), o3(0xE3,0x82,0x9D),
+     o3(0xE3,0x82,0x9E), o3(0xE3,0x80,0x83),
+     o3(0xE4,0xBB,0x9D), o3(0xE3,0x80,0x85),
+     o3(0xE3,0x80,0x86), o3(0xE3,0x80,0x87),
+     o3(0xE3,0x83,0xBC), o3(0xE2,0x80,0x94),
+     o3(0xE2,0x80,0x90), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0xBC), o3(0xE3,0x80,0x9C),
+     o3(0xE2,0x80,0x96), o3(0xEF,0xBD,0x9C),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xEF,0xBC,0xBB), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBD,0x9B), o3(0xEF,0xBD,0x9D),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+     o3(0xEF,0xBC,0x8B), o3(0xE2,0x88,0x92),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xEF,0xBC,0x9D),
+     o3(0xE2,0x89,0xA0), o3(0xEF,0xBC,0x9C),
+     o3(0xEF,0xBC,0x9E), o3(0xE2,0x89,0xA6),
+     o3(0xE2,0x89,0xA7), o3(0xE2,0x88,0x9E),
+     o3(0xE2,0x88,0xB4), o3(0xE2,0x99,0x82),
+     o3(0xE2,0x99,0x80),      o2(0xC2,0xB0),
+     o3(0xE2,0x80,0xB2), o3(0xE2,0x80,0xB3),
+     o3(0xE2,0x84,0x83), o3(0xEF,0xBF,0xA5),
+     o3(0xEF,0xBC,0x84),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x83), o3(0xEF,0xBC,0x86),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0xA0),
+          o2(0xC2,0xA7), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87), o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x80,0xBB), o3(0xE3,0x80,0x92),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE3,0x80,0x93),              UNDEF,
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+          o2(0xC2,0xAC), o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x8C,0x92),
+     o3(0xE2,0x88,0x82), o3(0xE2,0x88,0x87),
+     o3(0xE2,0x89,0xA1), o3(0xE2,0x89,0x92),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x84,0xAB), o3(0xE2,0x80,0xB0),
+     o3(0xE2,0x99,0xAF), o3(0xE2,0x99,0xAD),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xC2,0xB6),
+     o3(0xE2,0x97,0xAF),
+
+#define from_Shift_JIS_81 WORDINDEX2INFO(149)
+    from_Shift_JIS_81_offsets,
+    from_Shift_JIS_81_infos,
+
+#define from_Shift_JIS_82_infos WORDINDEX2INFO(151)
+                INVALID,              UNDEF,
+     o3(0xEF,0xBC,0x90), o3(0xEF,0xBC,0x91),
+     o3(0xEF,0xBC,0x92), o3(0xEF,0xBC,0x93),
+     o3(0xEF,0xBC,0x94), o3(0xEF,0xBC,0x95),
+     o3(0xEF,0xBC,0x96), o3(0xEF,0xBC,0x97),
+     o3(0xEF,0xBC,0x98), o3(0xEF,0xBC,0x99),
+     o3(0xEF,0xBC,0xA1), o3(0xEF,0xBC,0xA2),
+     o3(0xEF,0xBC,0xA3), o3(0xEF,0xBC,0xA4),
+     o3(0xEF,0xBC,0xA5), o3(0xEF,0xBC,0xA6),
+     o3(0xEF,0xBC,0xA7), o3(0xEF,0xBC,0xA8),
+     o3(0xEF,0xBC,0xA9), o3(0xEF,0xBC,0xAA),
+     o3(0xEF,0xBC,0xAB), o3(0xEF,0xBC,0xAC),
+     o3(0xEF,0xBC,0xAD), o3(0xEF,0xBC,0xAE),
+     o3(0xEF,0xBC,0xAF), o3(0xEF,0xBC,0xB0),
+     o3(0xEF,0xBC,0xB1), o3(0xEF,0xBC,0xB2),
+     o3(0xEF,0xBC,0xB3), o3(0xEF,0xBC,0xB4),
+     o3(0xEF,0xBC,0xB5), o3(0xEF,0xBC,0xB6),
+     o3(0xEF,0xBC,0xB7), o3(0xEF,0xBC,0xB8),
+     o3(0xEF,0xBC,0xB9), o3(0xEF,0xBC,0xBA),
+     o3(0xEF,0xBD,0x81), o3(0xEF,0xBD,0x82),
+     o3(0xEF,0xBD,0x83), o3(0xEF,0xBD,0x84),
+     o3(0xEF,0xBD,0x85), o3(0xEF,0xBD,0x86),
+     o3(0xEF,0xBD,0x87), o3(0xEF,0xBD,0x88),
+     o3(0xEF,0xBD,0x89), o3(0xEF,0xBD,0x8A),
+     o3(0xEF,0xBD,0x8B), o3(0xEF,0xBD,0x8C),
+     o3(0xEF,0xBD,0x8D), o3(0xEF,0xBD,0x8E),
+     o3(0xEF,0xBD,0x8F), o3(0xEF,0xBD,0x90),
+     o3(0xEF,0xBD,0x91), o3(0xEF,0xBD,0x92),
+     o3(0xEF,0xBD,0x93), o3(0xEF,0xBD,0x94),
+     o3(0xEF,0xBD,0x95), o3(0xEF,0xBD,0x96),
+     o3(0xEF,0xBD,0x97), o3(0xEF,0xBD,0x98),
+     o3(0xEF,0xBD,0x99), o3(0xEF,0xBD,0x9A),
+     o3(0xE3,0x81,0x81), o3(0xE3,0x81,0x82),
+     o3(0xE3,0x81,0x83), o3(0xE3,0x81,0x84),
+     o3(0xE3,0x81,0x85), o3(0xE3,0x81,0x86),
+     o3(0xE3,0x81,0x87), o3(0xE3,0x81,0x88),
+     o3(0xE3,0x81,0x89), o3(0xE3,0x81,0x8A),
+     o3(0xE3,0x81,0x8B), o3(0xE3,0x81,0x8C),
+     o3(0xE3,0x81,0x8D), o3(0xE3,0x81,0x8E),
+     o3(0xE3,0x81,0x8F), o3(0xE3,0x81,0x90),
+     o3(0xE3,0x81,0x91), o3(0xE3,0x81,0x92),
+     o3(0xE3,0x81,0x93), o3(0xE3,0x81,0x94),
+     o3(0xE3,0x81,0x95), o3(0xE3,0x81,0x96),
+     o3(0xE3,0x81,0x97), o3(0xE3,0x81,0x98),
+     o3(0xE3,0x81,0x99), o3(0xE3,0x81,0x9A),
+     o3(0xE3,0x81,0x9B), o3(0xE3,0x81,0x9C),
+     o3(0xE3,0x81,0x9D), o3(0xE3,0x81,0x9E),
+     o3(0xE3,0x81,0x9F), o3(0xE3,0x81,0xA0),
+     o3(0xE3,0x81,0xA1), o3(0xE3,0x81,0xA2),
+     o3(0xE3,0x81,0xA3), o3(0xE3,0x81,0xA4),
+     o3(0xE3,0x81,0xA5), o3(0xE3,0x81,0xA6),
+     o3(0xE3,0x81,0xA7), o3(0xE3,0x81,0xA8),
+     o3(0xE3,0x81,0xA9), o3(0xE3,0x81,0xAA),
+     o3(0xE3,0x81,0xAB), o3(0xE3,0x81,0xAC),
+     o3(0xE3,0x81,0xAD), o3(0xE3,0x81,0xAE),
+     o3(0xE3,0x81,0xAF), o3(0xE3,0x81,0xB0),
+     o3(0xE3,0x81,0xB1), o3(0xE3,0x81,0xB2),
+     o3(0xE3,0x81,0xB3), o3(0xE3,0x81,0xB4),
+     o3(0xE3,0x81,0xB5), o3(0xE3,0x81,0xB6),
+     o3(0xE3,0x81,0xB7), o3(0xE3,0x81,0xB8),
+     o3(0xE3,0x81,0xB9), o3(0xE3,0x81,0xBA),
+     o3(0xE3,0x81,0xBB), o3(0xE3,0x81,0xBC),
+     o3(0xE3,0x81,0xBD), o3(0xE3,0x81,0xBE),
+     o3(0xE3,0x81,0xBF), o3(0xE3,0x82,0x80),
+     o3(0xE3,0x82,0x81), o3(0xE3,0x82,0x82),
+     o3(0xE3,0x82,0x83), o3(0xE3,0x82,0x84),
+     o3(0xE3,0x82,0x85), o3(0xE3,0x82,0x86),
+     o3(0xE3,0x82,0x87), o3(0xE3,0x82,0x88),
+     o3(0xE3,0x82,0x89), o3(0xE3,0x82,0x8A),
+     o3(0xE3,0x82,0x8B), o3(0xE3,0x82,0x8C),
+     o3(0xE3,0x82,0x8D), o3(0xE3,0x82,0x8E),
+     o3(0xE3,0x82,0x8F), o3(0xE3,0x82,0x90),
+     o3(0xE3,0x82,0x91), o3(0xE3,0x82,0x92),
+     o3(0xE3,0x82,0x93),
+
+#define from_Shift_JIS_82 WORDINDEX2INFO(298)
+    from_Shift_JIS_82_offsets,
+    from_Shift_JIS_82_infos,
+
+#define from_Shift_JIS_83_infos WORDINDEX2INFO(300)
+                INVALID, o3(0xE3,0x82,0xA1),
+     o3(0xE3,0x82,0xA2), o3(0xE3,0x82,0xA3),
+     o3(0xE3,0x82,0xA4), o3(0xE3,0x82,0xA5),
+     o3(0xE3,0x82,0xA6), o3(0xE3,0x82,0xA7),
+     o3(0xE3,0x82,0xA8), o3(0xE3,0x82,0xA9),
+     o3(0xE3,0x82,0xAA), o3(0xE3,0x82,0xAB),
+     o3(0xE3,0x82,0xAC), o3(0xE3,0x82,0xAD),
+     o3(0xE3,0x82,0xAE), o3(0xE3,0x82,0xAF),
+     o3(0xE3,0x82,0xB0), o3(0xE3,0x82,0xB1),
+     o3(0xE3,0x82,0xB2), o3(0xE3,0x82,0xB3),
+     o3(0xE3,0x82,0xB4), o3(0xE3,0x82,0xB5),
+     o3(0xE3,0x82,0xB6), o3(0xE3,0x82,0xB7),
+     o3(0xE3,0x82,0xB8), o3(0xE3,0x82,0xB9),
+     o3(0xE3,0x82,0xBA), o3(0xE3,0x82,0xBB),
+     o3(0xE3,0x82,0xBC), o3(0xE3,0x82,0xBD),
+     o3(0xE3,0x82,0xBE), o3(0xE3,0x82,0xBF),
+     o3(0xE3,0x83,0x80), o3(0xE3,0x83,0x81),
+     o3(0xE3,0x83,0x82), o3(0xE3,0x83,0x83),
+     o3(0xE3,0x83,0x84), o3(0xE3,0x83,0x85),
+     o3(0xE3,0x83,0x86), o3(0xE3,0x83,0x87),
+     o3(0xE3,0x83,0x88), o3(0xE3,0x83,0x89),
+     o3(0xE3,0x83,0x8A), o3(0xE3,0x83,0x8B),
+     o3(0xE3,0x83,0x8C), o3(0xE3,0x83,0x8D),
+     o3(0xE3,0x83,0x8E), o3(0xE3,0x83,0x8F),
+     o3(0xE3,0x83,0x90), o3(0xE3,0x83,0x91),
+     o3(0xE3,0x83,0x92), o3(0xE3,0x83,0x93),
+     o3(0xE3,0x83,0x94), o3(0xE3,0x83,0x95),
+     o3(0xE3,0x83,0x96), o3(0xE3,0x83,0x97),
+     o3(0xE3,0x83,0x98), o3(0xE3,0x83,0x99),
+     o3(0xE3,0x83,0x9A), o3(0xE3,0x83,0x9B),
+     o3(0xE3,0x83,0x9C), o3(0xE3,0x83,0x9D),
+     o3(0xE3,0x83,0x9E), o3(0xE3,0x83,0x9F),
+     o3(0xE3,0x83,0xA0), o3(0xE3,0x83,0xA1),
+     o3(0xE3,0x83,0xA2), o3(0xE3,0x83,0xA3),
+     o3(0xE3,0x83,0xA4), o3(0xE3,0x83,0xA5),
+     o3(0xE3,0x83,0xA6), o3(0xE3,0x83,0xA7),
+     o3(0xE3,0x83,0xA8), o3(0xE3,0x83,0xA9),
+     o3(0xE3,0x83,0xAA), o3(0xE3,0x83,0xAB),
+     o3(0xE3,0x83,0xAC), o3(0xE3,0x83,0xAD),
+     o3(0xE3,0x83,0xAE), o3(0xE3,0x83,0xAF),
+     o3(0xE3,0x83,0xB0), o3(0xE3,0x83,0xB1),
+     o3(0xE3,0x83,0xB2), o3(0xE3,0x83,0xB3),
+     o3(0xE3,0x83,0xB4), o3(0xE3,0x83,0xB5),
+     o3(0xE3,0x83,0xB6),              UNDEF,
+          o2(0xCE,0x91),      o2(0xCE,0x92),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x95),      o2(0xCE,0x96),
+          o2(0xCE,0x97),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9B),      o2(0xCE,0x9C),
+          o2(0xCE,0x9D),      o2(0xCE,0x9E),
+          o2(0xCE,0x9F),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1),      o2(0xCE,0xA3),
+          o2(0xCE,0xA4),      o2(0xCE,0xA5),
+          o2(0xCE,0xA6),      o2(0xCE,0xA7),
+          o2(0xCE,0xA8),      o2(0xCE,0xA9),
+          o2(0xCE,0xB1),      o2(0xCE,0xB2),
+          o2(0xCE,0xB3),      o2(0xCE,0xB4),
+          o2(0xCE,0xB5),      o2(0xCE,0xB6),
+          o2(0xCE,0xB7),      o2(0xCE,0xB8),
+          o2(0xCE,0xB9),      o2(0xCE,0xBA),
+          o2(0xCE,0xBB),      o2(0xCE,0xBC),
+          o2(0xCE,0xBD),      o2(0xCE,0xBE),
+          o2(0xCE,0xBF),      o2(0xCF,0x80),
+          o2(0xCF,0x81),      o2(0xCF,0x83),
+          o2(0xCF,0x84),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xCF,0x88),      o2(0xCF,0x89),
+
+#define from_Shift_JIS_83 WORDINDEX2INFO(436)
+    from_Shift_JIS_83_offsets,
+    from_Shift_JIS_83_infos,
+
+#define from_Shift_JIS_84_infos WORDINDEX2INFO(438)
+                INVALID,      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x81),
+          o2(0xD0,0x96),      o2(0xD0,0x97),
+          o2(0xD0,0x98),      o2(0xD0,0x99),
+          o2(0xD0,0x9A),      o2(0xD0,0x9B),
+          o2(0xD0,0x9C),      o2(0xD0,0x9D),
+          o2(0xD0,0x9E),      o2(0xD0,0x9F),
+          o2(0xD0,0xA0),      o2(0xD0,0xA1),
+          o2(0xD0,0xA2),      o2(0xD0,0xA3),
+          o2(0xD0,0xA4),      o2(0xD0,0xA5),
+          o2(0xD0,0xA6),      o2(0xD0,0xA7),
+          o2(0xD0,0xA8),      o2(0xD0,0xA9),
+          o2(0xD0,0xAA),      o2(0xD0,0xAB),
+          o2(0xD0,0xAC),      o2(0xD0,0xAD),
+          o2(0xD0,0xAE),      o2(0xD0,0xAF),
+                  UNDEF,      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD1,0x91),
+          o2(0xD0,0xB6),      o2(0xD0,0xB7),
+          o2(0xD0,0xB8),      o2(0xD0,0xB9),
+          o2(0xD0,0xBA),      o2(0xD0,0xBB),
+          o2(0xD0,0xBC),      o2(0xD0,0xBD),
+          o2(0xD0,0xBE),      o2(0xD0,0xBF),
+          o2(0xD1,0x80),      o2(0xD1,0x81),
+          o2(0xD1,0x82),      o2(0xD1,0x83),
+          o2(0xD1,0x84),      o2(0xD1,0x85),
+          o2(0xD1,0x86),      o2(0xD1,0x87),
+          o2(0xD1,0x88),      o2(0xD1,0x89),
+          o2(0xD1,0x8A),      o2(0xD1,0x8B),
+          o2(0xD1,0x8C),      o2(0xD1,0x8D),
+          o2(0xD1,0x8E),      o2(0xD1,0x8F),
+     o3(0xE2,0x94,0x80), o3(0xE2,0x94,0x82),
+     o3(0xE2,0x94,0x8C), o3(0xE2,0x94,0x90),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0xA4), o3(0xE2,0x94,0xB4),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x94,0x81),
+     o3(0xE2,0x94,0x83), o3(0xE2,0x94,0x8F),
+     o3(0xE2,0x94,0x93), o3(0xE2,0x94,0x9B),
+     o3(0xE2,0x94,0x97), o3(0xE2,0x94,0xA3),
+     o3(0xE2,0x94,0xB3), o3(0xE2,0x94,0xAB),
+     o3(0xE2,0x94,0xBB), o3(0xE2,0x95,0x8B),
+     o3(0xE2,0x94,0xA0), o3(0xE2,0x94,0xAF),
+     o3(0xE2,0x94,0xA8), o3(0xE2,0x94,0xB7),
+     o3(0xE2,0x94,0xBF), o3(0xE2,0x94,0x9D),
+     o3(0xE2,0x94,0xB0), o3(0xE2,0x94,0xA5),
+     o3(0xE2,0x94,0xB8), o3(0xE2,0x95,0x82),
+
+#define from_Shift_JIS_84 WORDINDEX2INFO(538)
+    from_Shift_JIS_84_offsets,
+    from_Shift_JIS_84_infos,
+
+#define from_Shift_JIS_85_infos WORDINDEX2INFO(540)
+     INVALID,   UNDEF,
+
+#define from_Shift_JIS_85 WORDINDEX2INFO(542)
+    from_Shift_JIS_85_offsets,
+    from_Shift_JIS_85_infos,
+
+#define from_Shift_JIS_88_infos WORDINDEX2INFO(544)
+                INVALID,              UNDEF,
+     o3(0xE4,0xBA,0x9C), o3(0xE5,0x94,0x96),
+     o3(0xE5,0xA8,0x83), o3(0xE9,0x98,0xBF),
+     o3(0xE5,0x93,0x80), o3(0xE6,0x84,0x9B),
+     o3(0xE6,0x8C,0xA8), o3(0xE5,0xA7,0xB6),
+     o3(0xE9,0x80,0xA2), o3(0xE8,0x91,0xB5),
+     o3(0xE8,0x8C,0x9C), o3(0xE7,0xA9,0x90),
+     o3(0xE6,0x82,0xAA), o3(0xE6,0x8F,0xA1),
+     o3(0xE6,0xB8,0xA5), o3(0xE6,0x97,0xAD),
+     o3(0xE8,0x91,0xA6), o3(0xE8,0x8A,0xA6),
+     o3(0xE9,0xAF,0xB5), o3(0xE6,0xA2,0x93),
+     o3(0xE5,0x9C,0xA7), o3(0xE6,0x96,0xA1),
+     o3(0xE6,0x89,0xB1), o3(0xE5,0xAE,0x9B),
+     o3(0xE5,0xA7,0x90), o3(0xE8,0x99,0xBB),
+     o3(0xE9,0xA3,0xB4), o3(0xE7,0xB5,0xA2),
+     o3(0xE7,0xB6,0xBE), o3(0xE9,0xAE,0x8E),
+     o3(0xE6,0x88,0x96), o3(0xE7,0xB2,0x9F),
+     o3(0xE8,0xA2,0xB7), o3(0xE5,0xAE,0x89),
+     o3(0xE5,0xBA,0xB5), o3(0xE6,0x8C,0x89),
+     o3(0xE6,0x9A,0x97), o3(0xE6,0xA1,0x88),
+     o3(0xE9,0x97,0x87), o3(0xE9,0x9E,0x8D),
+     o3(0xE6,0x9D,0x8F), o3(0xE4,0xBB,0xA5),
+     o3(0xE4,0xBC,0x8A), o3(0xE4,0xBD,0x8D),
+     o3(0xE4,0xBE,0x9D), o3(0xE5,0x81,0x89),
+     o3(0xE5,0x9B,0xB2), o3(0xE5,0xA4,0xB7),
+     o3(0xE5,0xA7,0x94), o3(0xE5,0xA8,0x81),
+     o3(0xE5,0xB0,0x89), o3(0xE6,0x83,0x9F),
+     o3(0xE6,0x84,0x8F), o3(0xE6,0x85,0xB0),
+     o3(0xE6,0x98,0x93), o3(0xE6,0xA4,0x85),
+     o3(0xE7,0x82,0xBA), o3(0xE7,0x95,0x8F),
+     o3(0xE7,0x95,0xB0), o3(0xE7,0xA7,0xBB),
+     o3(0xE7,0xB6,0xAD), o3(0xE7,0xB7,0xAF),
+     o3(0xE8,0x83,0x83), o3(0xE8,0x90,0x8E),
+     o3(0xE8,0xA1,0xA3), o3(0xE8,0xAC,0x82),
+     o3(0xE9,0x81,0x95), o3(0xE9,0x81,0xBA),
+     o3(0xE5,0x8C,0xBB), o3(0xE4,0xBA,0x95),
+     o3(0xE4,0xBA,0xA5), o3(0xE5,0x9F,0x9F),
+     o3(0xE8,0x82,0xB2), o3(0xE9,0x83,0x81),
+     o3(0xE7,0xA3,0xAF), o3(0xE4,0xB8,0x80),
+     o3(0xE5,0xA3,0xB1), o3(0xE6,0xBA,0xA2),
+     o3(0xE9,0x80,0xB8), o3(0xE7,0xA8,0xB2),
+     o3(0xE8,0x8C,0xA8), o3(0xE8,0x8A,0x8B),
+     o3(0xE9,0xB0,0xAF), o3(0xE5,0x85,0x81),
+     o3(0xE5,0x8D,0xB0), o3(0xE5,0x92,0xBD),
+     o3(0xE5,0x93,0xA1), o3(0xE5,0x9B,0xA0),
+     o3(0xE5,0xA7,0xBB), o3(0xE5,0xBC,0x95),
+     o3(0xE9,0xA3,0xB2), o3(0xE6,0xB7,0xAB),
+     o3(0xE8,0x83,0xA4), o3(0xE8,0x94,0xAD),
+
+#define from_Shift_JIS_88 WORDINDEX2INFO(640)
+    from_Shift_JIS_88_offsets,
+    from_Shift_JIS_88_infos,
+
+#define from_Shift_JIS_89_infos WORDINDEX2INFO(642)
+                INVALID, o3(0xE9,0x99,0xA2),
+     o3(0xE9,0x99,0xB0), o3(0xE9,0x9A,0xA0),
+     o3(0xE9,0x9F,0xBB), o3(0xE5,0x90,0x8B),
+     o3(0xE5,0x8F,0xB3), o3(0xE5,0xAE,0x87),
+     o3(0xE7,0x83,0x8F), o3(0xE7,0xBE,0xBD),
+     o3(0xE8,0xBF,0x82), o3(0xE9,0x9B,0xA8),
+     o3(0xE5,0x8D,0xAF), o3(0xE9,0xB5,0x9C),
+     o3(0xE7,0xAA,0xBA), o3(0xE4,0xB8,0x91),
+     o3(0xE7,0xA2,0x93), o3(0xE8,0x87,0xBC),
+     o3(0xE6,0xB8,0xA6), o3(0xE5,0x98,0x98),
+     o3(0xE5,0x94,0x84), o3(0xE6,0xAC,0x9D),
+     o3(0xE8,0x94,0x9A), o3(0xE9,0xB0,0xBB),
+     o3(0xE5,0xA7,0xA5), o3(0xE5,0x8E,0xA9),
+     o3(0xE6,0xB5,0xA6), o3(0xE7,0x93,0x9C),
+     o3(0xE9,0x96,0x8F), o3(0xE5,0x99,0x82),
+     o3(0xE4,0xBA,0x91), o3(0xE9,0x81,0x8B),
+     o3(0xE9,0x9B,0xB2), o3(0xE8,0x8D,0x8F),
+     o3(0xE9,0xA4,0x8C), o3(0xE5,0x8F,0xA1),
+     o3(0xE5,0x96,0xB6), o3(0xE5,0xAC,0xB0),
+     o3(0xE5,0xBD,0xB1), o3(0xE6,0x98,0xA0),
+     o3(0xE6,0x9B,0xB3), o3(0xE6,0xA0,0x84),
+     o3(0xE6,0xB0,0xB8), o3(0xE6,0xB3,0xB3),
+     o3(0xE6,0xB4,0xA9), o3(0xE7,0x91,0x9B),
+     o3(0xE7,0x9B,0x88), o3(0xE7,0xA9,0x8E),
+     o3(0xE9,0xA0,0xB4), o3(0xE8,0x8B,0xB1),
+     o3(0xE8,0xA1,0x9B), o3(0xE8,0xA9,0xA0),
+     o3(0xE9,0x8B,0xAD), o3(0xE6,0xB6,0xB2),
+     o3(0xE7,0x96,0xAB), o3(0xE7,0x9B,0x8A),
+     o3(0xE9,0xA7,0x85), o3(0xE6,0x82,0xA6),
+     o3(0xE8,0xAC,0x81), o3(0xE8,0xB6,0x8A),
+     o3(0xE9,0x96,0xB2), o3(0xE6,0xA6,0x8E),
+     o3(0xE5,0x8E,0xAD), o3(0xE5,0x86,0x86),
+     o3(0xE5,0x9C,0x92), o3(0xE5,0xA0,0xB0),
+     o3(0xE5,0xA5,0x84), o3(0xE5,0xAE,0xB4),
+     o3(0xE5,0xBB,0xB6), o3(0xE6,0x80,0xA8),
+     o3(0xE6,0x8E,0xA9), o3(0xE6,0x8F,0xB4),
+     o3(0xE6,0xB2,0xBF), o3(0xE6,0xBC,0x94),
+     o3(0xE7,0x82,0x8E), o3(0xE7,0x84,0x94),
+     o3(0xE7,0x85,0x99), o3(0xE7,0x87,0x95),
+     o3(0xE7,0x8C,0xBF), o3(0xE7,0xB8,0x81),
+     o3(0xE8,0x89,0xB6), o3(0xE8,0x8B,0x91),
+     o3(0xE8,0x96,0x97), o3(0xE9,0x81,0xA0),
+     o3(0xE9,0x89,0x9B), o3(0xE9,0xB4,0x9B),
+     o3(0xE5,0xA1,0xA9), o3(0xE6,0x96,0xBC),
+     o3(0xE6,0xB1,0x9A), o3(0xE7,0x94,0xA5),
+     o3(0xE5,0x87,0xB9), o3(0xE5,0xA4,0xAE),
+     o3(0xE5,0xA5,0xA5), o3(0xE5,0xBE,0x80),
+     o3(0xE5,0xBF,0x9C), o3(0xE6,0x8A,0xBC),
+     o3(0xE6,0x97,0xBA), o3(0xE6,0xA8,0xAA),
+     o3(0xE6,0xAC,0xA7), o3(0xE6,0xAE,0xB4),
+     o3(0xE7,0x8E,0x8B), o3(0xE7,0xBF,0x81),
+     o3(0xE8,0xA5,0x96), o3(0xE9,0xB4,0xAC),
+     o3(0xE9,0xB4,0x8E), o3(0xE9,0xBB,0x84),
+     o3(0xE5,0xB2,0xA1), o3(0xE6,0xB2,0x96),
+     o3(0xE8,0x8D,0xBB), o3(0xE5,0x84,0x84),
+     o3(0xE5,0xB1,0x8B), o3(0xE6,0x86,0xB6),
+     o3(0xE8,0x87,0x86), o3(0xE6,0xA1,0xB6),
+     o3(0xE7,0x89,0xA1), o3(0xE4,0xB9,0x99),
+     o3(0xE4,0xBF,0xBA), o3(0xE5,0x8D,0xB8),
+     o3(0xE6,0x81,0xA9), o3(0xE6,0xB8,0xA9),
+     o3(0xE7,0xA9,0x8F), o3(0xE9,0x9F,0xB3),
+     o3(0xE4,0xB8,0x8B), o3(0xE5,0x8C,0x96),
+     o3(0xE4,0xBB,0xAE), o3(0xE4,0xBD,0x95),
+     o3(0xE4,0xBC,0xBD), o3(0xE4,0xBE,0xA1),
+     o3(0xE4,0xBD,0xB3), o3(0xE5,0x8A,0xA0),
+     o3(0xE5,0x8F,0xAF), o3(0xE5,0x98,0x89),
+     o3(0xE5,0xA4,0x8F), o3(0xE5,0xAB,0x81),
+     o3(0xE5,0xAE,0xB6), o3(0xE5,0xAF,0xA1),
+     o3(0xE7,0xA7,0x91), o3(0xE6,0x9A,0x87),
+     o3(0xE6,0x9E,0x9C), o3(0xE6,0x9E,0xB6),
+     o3(0xE6,0xAD,0x8C), o3(0xE6,0xB2,0xB3),
+     o3(0xE7,0x81,0xAB), o3(0xE7,0x8F,0x82),
+     o3(0xE7,0xA6,0x8D), o3(0xE7,0xA6,0xBE),
+     o3(0xE7,0xA8,0xBC), o3(0xE7,0xAE,0x87),
+     o3(0xE8,0x8A,0xB1), o3(0xE8,0x8B,0x9B),
+     o3(0xE8,0x8C,0x84), o3(0xE8,0x8D,0xB7),
+     o3(0xE8,0x8F,0xAF), o3(0xE8,0x8F,0x93),
+     o3(0xE8,0x9D,0xA6), o3(0xE8,0xAA,0xB2),
+     o3(0xE5,0x98,0xA9), o3(0xE8,0xB2,0xA8),
+     o3(0xE8,0xBF,0xA6), o3(0xE9,0x81,0x8E),
+     o3(0xE9,0x9C,0x9E), o3(0xE8,0x9A,0x8A),
+     o3(0xE4,0xBF,0x84), o3(0xE5,0xB3,0xA8),
+     o3(0xE6,0x88,0x91), o3(0xE7,0x89,0x99),
+     o3(0xE7,0x94,0xBB), o3(0xE8,0x87,0xA5),
+     o3(0xE8,0x8A,0xBD), o3(0xE8,0x9B,0xBE),
+     o3(0xE8,0xB3,0x80), o3(0xE9,0x9B,0x85),
+     o3(0xE9,0xA4,0x93), o3(0xE9,0xA7,0x95),
+     o3(0xE4,0xBB,0x8B), o3(0xE4,0xBC,0x9A),
+     o3(0xE8,0xA7,0xA3), o3(0xE5,0x9B,0x9E),
+     o3(0xE5,0xA1,0x8A), o3(0xE5,0xA3,0x8A),
+     o3(0xE5,0xBB,0xBB), o3(0xE5,0xBF,0xAB),
+     o3(0xE6,0x80,0xAA), o3(0xE6,0x82,0x94),
+     o3(0xE6,0x81,0xA2), o3(0xE6,0x87,0x90),
+     o3(0xE6,0x88,0x92), o3(0xE6,0x8B,0x90),
+     o3(0xE6,0x94,0xB9),
+
+#define from_Shift_JIS_89 WORDINDEX2INFO(831)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_89_infos,
+
+#define from_Shift_JIS_8A_infos WORDINDEX2INFO(833)
+                INVALID, o3(0xE9,0xAD,0x81),
+     o3(0xE6,0x99,0xA6), o3(0xE6,0xA2,0xB0),
+     o3(0xE6,0xB5,0xB7), o3(0xE7,0x81,0xB0),
+     o3(0xE7,0x95,0x8C), o3(0xE7,0x9A,0x86),
+     o3(0xE7,0xB5,0xB5), o3(0xE8,0x8A,0xA5),
+     o3(0xE8,0x9F,0xB9), o3(0xE9,0x96,0x8B),
+     o3(0xE9,0x9A,0x8E), o3(0xE8,0xB2,0x9D),
+     o3(0xE5,0x87,0xB1), o3(0xE5,0x8A,0xBE),
+     o3(0xE5,0xA4,0x96), o3(0xE5,0x92,0xB3),
+     o3(0xE5,0xAE,0xB3), o3(0xE5,0xB4,0x96),
+     o3(0xE6,0x85,0xA8), o3(0xE6,0xA6,0x82),
+     o3(0xE6,0xB6,0xAF), o3(0xE7,0xA2,0x8D),
+     o3(0xE8,0x93,0x8B), o3(0xE8,0xA1,0x97),
+     o3(0xE8,0xA9,0xB2), o3(0xE9,0x8E,0xA7),
+     o3(0xE9,0xAA,0xB8), o3(0xE6,0xB5,0xAC),
+     o3(0xE9,0xA6,0xA8), o3(0xE8,0x9B,0x99),
+     o3(0xE5,0x9E,0xA3), o3(0xE6,0x9F,0xBF),
+     o3(0xE8,0x9B,0x8E), o3(0xE9,0x88,0x8E),
+     o3(0xE5,0x8A,0x83), o3(0xE5,0x9A,0x87),
+     o3(0xE5,0x90,0x84), o3(0xE5,0xBB,0x93),
+     o3(0xE6,0x8B,0xA1), o3(0xE6,0x92,0xB9),
+     o3(0xE6,0xA0,0xBC), o3(0xE6,0xA0,0xB8),
+     o3(0xE6,0xAE,0xBB), o3(0xE7,0x8D,0xB2),
+     o3(0xE7,0xA2,0xBA), o3(0xE7,0xA9,0xAB),
+     o3(0xE8,0xA6,0x9A), o3(0xE8,0xA7,0x92),
+     o3(0xE8,0xB5,0xAB), o3(0xE8,0xBC,0x83),
+     o3(0xE9,0x83,0xAD), o3(0xE9,0x96,0xA3),
+     o3(0xE9,0x9A,0x94), o3(0xE9,0x9D,0xA9),
+     o3(0xE5,0xAD,0xA6), o3(0xE5,0xB2,0xB3),
+     o3(0xE6,0xA5,0xBD), o3(0xE9,0xA1,0x8D),
+     o3(0xE9,0xA1,0x8E), o3(0xE6,0x8E,0x9B),
+     o3(0xE7,0xAC,0xA0), o3(0xE6,0xA8,0xAB),
+     o3(0xE6,0xA9,0xBF), o3(0xE6,0xA2,0xB6),
+     o3(0xE9,0xB0,0x8D), o3(0xE6,0xBD,0x9F),
+     o3(0xE5,0x89,0xB2), o3(0xE5,0x96,0x9D),
+     o3(0xE6,0x81,0xB0), o3(0xE6,0x8B,0xAC),
+     o3(0xE6,0xB4,0xBB), o3(0xE6,0xB8,0x87),
+     o3(0xE6,0xBB,0x91), o3(0xE8,0x91,0x9B),
+     o3(0xE8,0xA4,0x90), o3(0xE8,0xBD,0x84),
+     o3(0xE4,0xB8,0x94), o3(0xE9,0xB0,0xB9),
+     o3(0xE5,0x8F,0xB6), o3(0xE6,0xA4,0x9B),
+     o3(0xE6,0xA8,0xBA), o3(0xE9,0x9E,0x84),
+     o3(0xE6,0xA0,0xAA), o3(0xE5,0x85,0x9C),
+     o3(0xE7,0xAB,0x83), o3(0xE8,0x92,0xB2),
+     o3(0xE9,0x87,0x9C), o3(0xE9,0x8E,0x8C),
+     o3(0xE5,0x99,0x9B), o3(0xE9,0xB4,0xA8),
+     o3(0xE6,0xA0,0xA2), o3(0xE8,0x8C,0x85),
+     o3(0xE8,0x90,0xB1), o3(0xE7,0xB2,0xA5),
+     o3(0xE5,0x88,0x88), o3(0xE8,0x8B,0x85),
+     o3(0xE7,0x93,0xA6), o3(0xE4,0xB9,0xBE),
+     o3(0xE4,0xBE,0x83), o3(0xE5,0x86,0xA0),
+     o3(0xE5,0xAF,0x92), o3(0xE5,0x88,0x8A),
+     o3(0xE5,0x8B,0x98), o3(0xE5,0x8B,0xA7),
+     o3(0xE5,0xB7,0xBB), o3(0xE5,0x96,0x9A),
+     o3(0xE5,0xA0,0xAA), o3(0xE5,0xA7,0xA6),
+     o3(0xE5,0xAE,0x8C), o3(0xE5,0xAE,0x98),
+     o3(0xE5,0xAF,0x9B), o3(0xE5,0xB9,0xB2),
+     o3(0xE5,0xB9,0xB9), o3(0xE6,0x82,0xA3),
+     o3(0xE6,0x84,0x9F), o3(0xE6,0x85,0xA3),
+     o3(0xE6,0x86,0xBE), o3(0xE6,0x8F,0x9B),
+     o3(0xE6,0x95,0xA2), o3(0xE6,0x9F,0x91),
+     o3(0xE6,0xA1,0x93), o3(0xE6,0xA3,0xBA),
+     o3(0xE6,0xAC,0xBE), o3(0xE6,0xAD,0x93),
+     o3(0xE6,0xB1,0x97), o3(0xE6,0xBC,0xA2),
+     o3(0xE6,0xBE,0x97), o3(0xE6,0xBD,0x85),
+     o3(0xE7,0x92,0xB0), o3(0xE7,0x94,0x98),
+     o3(0xE7,0x9B,0xA3), o3(0xE7,0x9C,0x8B),
+     o3(0xE7,0xAB,0xBF), o3(0xE7,0xAE,0xA1),
+     o3(0xE7,0xB0,0xA1), o3(0xE7,0xB7,0xA9),
+     o3(0xE7,0xBC,0xB6), o3(0xE7,0xBF,0xB0),
+     o3(0xE8,0x82,0x9D), o3(0xE8,0x89,0xA6),
+     o3(0xE8,0x8E,0x9E), o3(0xE8,0xA6,0xB3),
+     o3(0xE8,0xAB,0x8C), o3(0xE8,0xB2,0xAB),
+     o3(0xE9,0x82,0x84), o3(0xE9,0x91,0x91),
+     o3(0xE9,0x96,0x93), o3(0xE9,0x96,0x91),
+     o3(0xE9,0x96,0xA2), o3(0xE9,0x99,0xA5),
+     o3(0xE9,0x9F,0x93), o3(0xE9,0xA4,0xA8),
+     o3(0xE8,0x88,0x98), o3(0xE4,0xB8,0xB8),
+     o3(0xE5,0x90,0xAB), o3(0xE5,0xB2,0xB8),
+     o3(0xE5,0xB7,0x8C), o3(0xE7,0x8E,0xA9),
+     o3(0xE7,0x99,0x8C), o3(0xE7,0x9C,0xBC),
+     o3(0xE5,0xB2,0xA9), o3(0xE7,0xBF,0xAB),
+     o3(0xE8,0xB4,0x8B), o3(0xE9,0x9B,0x81),
+     o3(0xE9,0xA0,0x91), o3(0xE9,0xA1,0x94),
+     o3(0xE9,0xA1,0x98), o3(0xE4,0xBC,0x81),
+     o3(0xE4,0xBC,0x8E), o3(0xE5,0x8D,0xB1),
+     o3(0xE5,0x96,0x9C), o3(0xE5,0x99,0xA8),
+     o3(0xE5,0x9F,0xBA), o3(0xE5,0xA5,0x87),
+     o3(0xE5,0xAC,0x89), o3(0xE5,0xAF,0x84),
+     o3(0xE5,0xB2,0x90), o3(0xE5,0xB8,0x8C),
+     o3(0xE5,0xB9,0xBE), o3(0xE5,0xBF,0x8C),
+     o3(0xE6,0x8F,0xAE), o3(0xE6,0x9C,0xBA),
+     o3(0xE6,0x97,0x97), o3(0xE6,0x97,0xA2),
+     o3(0xE6,0x9C,0x9F), o3(0xE6,0xA3,0x8B),
+     o3(0xE6,0xA3,0x84),
+
+#define from_Shift_JIS_8A WORDINDEX2INFO(1022)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8A_infos,
+
+#define from_Shift_JIS_8B_infos WORDINDEX2INFO(1024)
+                INVALID, o3(0xE6,0xA9,0x9F),
+     o3(0xE5,0xB8,0xB0), o3(0xE6,0xAF,0x85),
+     o3(0xE6,0xB0,0x97), o3(0xE6,0xB1,0xBD),
+     o3(0xE7,0x95,0xBF), o3(0xE7,0xA5,0x88),
+     o3(0xE5,0xAD,0xA3), o3(0xE7,0xA8,0x80),
+     o3(0xE7,0xB4,0x80), o3(0xE5,0xBE,0xBD),
+     o3(0xE8,0xA6,0x8F), o3(0xE8,0xA8,0x98),
+     o3(0xE8,0xB2,0xB4), o3(0xE8,0xB5,0xB7),
+     o3(0xE8,0xBB,0x8C), o3(0xE8,0xBC,0x9D),
+     o3(0xE9,0xA3,0xA2), o3(0xE9,0xA8,0x8E),
+     o3(0xE9,0xAC,0xBC), o3(0xE4,0xBA,0x80),
+     o3(0xE5,0x81,0xBD), o3(0xE5,0x84,0x80),
+     o3(0xE5,0xA6,0x93), o3(0xE5,0xAE,0x9C),
+     o3(0xE6,0x88,0xAF), o3(0xE6,0x8A,0x80),
+     o3(0xE6,0x93,0xAC), o3(0xE6,0xAC,0xBA),
+     o3(0xE7,0x8A,0xA0), o3(0xE7,0x96,0x91),
+     o3(0xE7,0xA5,0x87), o3(0xE7,0xBE,0xA9),
+     o3(0xE8,0x9F,0xBB), o3(0xE8,0xAA,0xBC),
+     o3(0xE8,0xAD,0xB0), o3(0xE6,0x8E,0xAC),
+     o3(0xE8,0x8F,0x8A), o3(0xE9,0x9E,0xA0),
+     o3(0xE5,0x90,0x89), o3(0xE5,0x90,0x83),
+     o3(0xE5,0x96,0xAB), o3(0xE6,0xA1,0x94),
+     o3(0xE6,0xA9,0x98), o3(0xE8,0xA9,0xB0),
+     o3(0xE7,0xA0,0xA7), o3(0xE6,0x9D,0xB5),
+     o3(0xE9,0xBB,0x8D), o3(0xE5,0x8D,0xB4),
+     o3(0xE5,0xAE,0xA2), o3(0xE8,0x84,0x9A),
+     o3(0xE8,0x99,0x90), o3(0xE9,0x80,0x86),
+     o3(0xE4,0xB8,0x98), o3(0xE4,0xB9,0x85),
+     o3(0xE4,0xBB,0x87), o3(0xE4,0xBC,0x91),
+     o3(0xE5,0x8F,0x8A), o3(0xE5,0x90,0xB8),
+     o3(0xE5,0xAE,0xAE), o3(0xE5,0xBC,0x93),
+     o3(0xE6,0x80,0xA5), o3(0xE6,0x95,0x91),
+     o3(0xE6,0x9C,0xBD), o3(0xE6,0xB1,0x82),
+     o3(0xE6,0xB1,0xB2), o3(0xE6,0xB3,0xA3),
+     o3(0xE7,0x81,0xB8), o3(0xE7,0x90,0x83),
+     o3(0xE7,0xA9,0xB6), o3(0xE7,0xAA,0xAE),
+     o3(0xE7,0xAC,0x88), o3(0xE7,0xB4,0x9A),
+     o3(0xE7,0xB3,0xBE), o3(0xE7,0xB5,0xA6),
+     o3(0xE6,0x97,0xA7), o3(0xE7,0x89,0x9B),
+     o3(0xE5,0x8E,0xBB), o3(0xE5,0xB1,0x85),
+     o3(0xE5,0xB7,0xA8), o3(0xE6,0x8B,0x92),
+     o3(0xE6,0x8B,0xA0), o3(0xE6,0x8C,0x99),
+     o3(0xE6,0xB8,0xA0), o3(0xE8,0x99,0x9A),
+     o3(0xE8,0xA8,0xB1), o3(0xE8,0xB7,0x9D),
+     o3(0xE9,0x8B,0xB8), o3(0xE6,0xBC,0x81),
+     o3(0xE7,0xA6,0xA6), o3(0xE9,0xAD,0x9A),
+     o3(0xE4,0xBA,0xA8), o3(0xE4,0xBA,0xAB),
+     o3(0xE4,0xBA,0xAC), o3(0xE4,0xBE,0x9B),
+     o3(0xE4,0xBE,0xA0), o3(0xE5,0x83,0x91),
+     o3(0xE5,0x85,0x87), o3(0xE7,0xAB,0xB6),
+     o3(0xE5,0x85,0xB1), o3(0xE5,0x87,0xB6),
+     o3(0xE5,0x8D,0x94), o3(0xE5,0x8C,0xA1),
+     o3(0xE5,0x8D,0xBF), o3(0xE5,0x8F,0xAB),
+     o3(0xE5,0x96,0xAC), o3(0xE5,0xA2,0x83),
+     o3(0xE5,0xB3,0xA1), o3(0xE5,0xBC,0xB7),
+     o3(0xE5,0xBD,0x8A), o3(0xE6,0x80,0xAF),
+     o3(0xE6,0x81,0x90), o3(0xE6,0x81,0xAD),
+     o3(0xE6,0x8C,0x9F), o3(0xE6,0x95,0x99),
+     o3(0xE6,0xA9,0x8B), o3(0xE6,0xB3,0x81),
+     o3(0xE7,0x8B,0x82), o3(0xE7,0x8B,0xAD),
+     o3(0xE7,0x9F,0xAF), o3(0xE8,0x83,0xB8),
+     o3(0xE8,0x84,0x85), o3(0xE8,0x88,0x88),
+     o3(0xE8,0x95,0x8E), o3(0xE9,0x83,0xB7),
+     o3(0xE9,0x8F,0xA1), o3(0xE9,0x9F,0xBF),
+     o3(0xE9,0xA5,0x97), o3(0xE9,0xA9,0x9A),
+     o3(0xE4,0xBB,0xB0), o3(0xE5,0x87,0x9D),
+     o3(0xE5,0xB0,0xAD), o3(0xE6,0x9A,0x81),
+     o3(0xE6,0xA5,0xAD), o3(0xE5,0xB1,0x80),
+     o3(0xE6,0x9B,0xB2), o3(0xE6,0xA5,0xB5),
+     o3(0xE7,0x8E,0x89), o3(0xE6,0xA1,0x90),
+     o3(0xE7,0xB2,0x81), o3(0xE5,0x83,0x85),
+     o3(0xE5,0x8B,0xA4), o3(0xE5,0x9D,0x87),
+     o3(0xE5,0xB7,0xBE), o3(0xE9,0x8C,0xA6),
+     o3(0xE6,0x96,0xA4), o3(0xE6,0xAC,0xA3),
+     o3(0xE6,0xAC,0xBD), o3(0xE7,0x90,0xB4),
+     o3(0xE7,0xA6,0x81), o3(0xE7,0xA6,0xBD),
+     o3(0xE7,0xAD,0x8B), o3(0xE7,0xB7,0x8A),
+     o3(0xE8,0x8A,0xB9), o3(0xE8,0x8F,0x8C),
+     o3(0xE8,0xA1,0xBF), o3(0xE8,0xA5,0x9F),
+     o3(0xE8,0xAC,0xB9), o3(0xE8,0xBF,0x91),
+     o3(0xE9,0x87,0x91), o3(0xE5,0x90,0x9F),
+     o3(0xE9,0x8A,0x80), o3(0xE4,0xB9,0x9D),
+     o3(0xE5,0x80,0xB6), o3(0xE5,0x8F,0xA5),
+     o3(0xE5,0x8C,0xBA), o3(0xE7,0x8B,0x97),
+     o3(0xE7,0x8E,0x96), o3(0xE7,0x9F,0xA9),
+     o3(0xE8,0x8B,0xA6), o3(0xE8,0xBA,0xAF),
+     o3(0xE9,0xA7,0x86), o3(0xE9,0xA7,0x88),
+     o3(0xE9,0xA7,0x92), o3(0xE5,0x85,0xB7),
+     o3(0xE6,0x84,0x9A), o3(0xE8,0x99,0x9E),
+     o3(0xE5,0x96,0xB0), o3(0xE7,0xA9,0xBA),
+     o3(0xE5,0x81,0xB6), o3(0xE5,0xAF,0x93),
+     o3(0xE9,0x81,0x87), o3(0xE9,0x9A,0x85),
+     o3(0xE4,0xB8,0xB2), o3(0xE6,0xAB,0x9B),
+     o3(0xE9,0x87,0xA7), o3(0xE5,0xB1,0x91),
+     o3(0xE5,0xB1,0x88),
+
+#define from_Shift_JIS_8B WORDINDEX2INFO(1213)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8B_infos,
+
+#define from_Shift_JIS_8C_infos WORDINDEX2INFO(1215)
+                INVALID, o3(0xE6,0x8E,0x98),
+     o3(0xE7,0xAA,0x9F), o3(0xE6,0xB2,0x93),
+     o3(0xE9,0x9D,0xB4), o3(0xE8,0xBD,0xA1),
+     o3(0xE7,0xAA,0xAA), o3(0xE7,0x86,0x8A),
+     o3(0xE9,0x9A,0x88), o3(0xE7,0xB2,0x82),
+     o3(0xE6,0xA0,0x97), o3(0xE7,0xB9,0xB0),
+     o3(0xE6,0xA1,0x91), o3(0xE9,0x8D,0xAC),
+     o3(0xE5,0x8B,0xB2), o3(0xE5,0x90,0x9B),
+     o3(0xE8,0x96,0xAB), o3(0xE8,0xA8,0x93),
+     o3(0xE7,0xBE,0xA4), o3(0xE8,0xBB,0x8D),
+     o3(0xE9,0x83,0xA1), o3(0xE5,0x8D,0xA6),
+     o3(0xE8,0xA2,0x88), o3(0xE7,0xA5,0x81),
+     o3(0xE4,0xBF,0x82), o3(0xE5,0x82,0xBE),
+     o3(0xE5,0x88,0x91), o3(0xE5,0x85,0x84),
+     o3(0xE5,0x95,0x93), o3(0xE5,0x9C,0xAD),
+     o3(0xE7,0x8F,0xAA), o3(0xE5,0x9E,0x8B),
+     o3(0xE5,0xA5,0x91), o3(0xE5,0xBD,0xA2),
+     o3(0xE5,0xBE,0x84), o3(0xE6,0x81,0xB5),
+     o3(0xE6,0x85,0xB6), o3(0xE6,0x85,0xA7),
+     o3(0xE6,0x86,0xA9), o3(0xE6,0x8E,0xB2),
+     o3(0xE6,0x90,0xBA), o3(0xE6,0x95,0xAC),
+     o3(0xE6,0x99,0xAF), o3(0xE6,0xA1,0x82),
+     o3(0xE6,0xB8,0x93), o3(0xE7,0x95,0xA6),
+     o3(0xE7,0xA8,0xBD), o3(0xE7,0xB3,0xBB),
+     o3(0xE7,0xB5,0x8C), o3(0xE7,0xB6,0x99),
+     o3(0xE7,0xB9,0x8B), o3(0xE7,0xBD,0xAB),
+     o3(0xE8,0x8C,0x8E), o3(0xE8,0x8D,0x8A),
+     o3(0xE8,0x9B,0x8D), o3(0xE8,0xA8,0x88),
+     o3(0xE8,0xA9,0xA3), o3(0xE8,0xAD,0xA6),
+     o3(0xE8,0xBB,0xBD), o3(0xE9,0xA0,0x9A),
+     o3(0xE9,0xB6,0x8F), o3(0xE8,0x8A,0xB8),
+     o3(0xE8,0xBF,0x8E), o3(0xE9,0xAF,0xA8),
+     o3(0xE5,0x8A,0x87), o3(0xE6,0x88,0x9F),
+     o3(0xE6,0x92,0x83), o3(0xE6,0xBF,0x80),
+     o3(0xE9,0x9A,0x99), o3(0xE6,0xA1,0x81),
+     o3(0xE5,0x82,0x91), o3(0xE6,0xAC,0xA0),
+     o3(0xE6,0xB1,0xBA), o3(0xE6,0xBD,0x94),
+     o3(0xE7,0xA9,0xB4), o3(0xE7,0xB5,0x90),
+     o3(0xE8,0xA1,0x80), o3(0xE8,0xA8,0xA3),
+     o3(0xE6,0x9C,0x88), o3(0xE4,0xBB,0xB6),
+     o3(0xE5,0x80,0xB9), o3(0xE5,0x80,0xA6),
+     o3(0xE5,0x81,0xA5), o3(0xE5,0x85,0xBC),
+     o3(0xE5,0x88,0xB8), o3(0xE5,0x89,0xA3),
+     o3(0xE5,0x96,0xA7), o3(0xE5,0x9C,0x8F),
+     o3(0xE5,0xA0,0x85), o3(0xE5,0xAB,0x8C),
+     o3(0xE5,0xBB,0xBA), o3(0xE6,0x86,0xB2),
+     o3(0xE6,0x87,0xB8), o3(0xE6,0x8B,0xB3),
+     o3(0xE6,0x8D,0xB2), o3(0xE6,0xA4,0x9C),
+     o3(0xE6,0xA8,0xA9), o3(0xE7,0x89,0xBD),
+     o3(0xE7,0x8A,0xAC), o3(0xE7,0x8C,0xAE),
+     o3(0xE7,0xA0,0x94), o3(0xE7,0xA1,0xAF),
+     o3(0xE7,0xB5,0xB9), o3(0xE7,0x9C,0x8C),
+     o3(0xE8,0x82,0xA9), o3(0xE8,0xA6,0x8B),
+     o3(0xE8,0xAC,0x99), o3(0xE8,0xB3,0xA2),
+     o3(0xE8,0xBB,0x92), o3(0xE9,0x81,0xA3),
+     o3(0xE9,0x8D,0xB5), o3(0xE9,0x99,0xBA),
+     o3(0xE9,0xA1,0x95), o3(0xE9,0xA8,0x93),
+     o3(0xE9,0xB9,0xB8), o3(0xE5,0x85,0x83),
+     o3(0xE5,0x8E,0x9F), o3(0xE5,0x8E,0xB3),
+     o3(0xE5,0xB9,0xBB), o3(0xE5,0xBC,0xA6),
+     o3(0xE6,0xB8,0x9B), o3(0xE6,0xBA,0x90),
+     o3(0xE7,0x8E,0x84), o3(0xE7,0x8F,0xBE),
+     o3(0xE7,0xB5,0x83), o3(0xE8,0x88,0xB7),
+     o3(0xE8,0xA8,0x80), o3(0xE8,0xAB,0xBA),
+     o3(0xE9,0x99,0x90), o3(0xE4,0xB9,0x8E),
+     o3(0xE5,0x80,0x8B), o3(0xE5,0x8F,0xA4),
+     o3(0xE5,0x91,0xBC), o3(0xE5,0x9B,0xBA),
+     o3(0xE5,0xA7,0x91), o3(0xE5,0xAD,0xA4),
+     o3(0xE5,0xB7,0xB1), o3(0xE5,0xBA,0xAB),
+     o3(0xE5,0xBC,0xA7), o3(0xE6,0x88,0xB8),
+     o3(0xE6,0x95,0x85), o3(0xE6,0x9E,0xAF),
+     o3(0xE6,0xB9,0x96), o3(0xE7,0x8B,0x90),
+     o3(0xE7,0xB3,0x8A), o3(0xE8,0xA2,0xB4),
+     o3(0xE8,0x82,0xA1), o3(0xE8,0x83,0xA1),
+     o3(0xE8,0x8F,0xB0), o3(0xE8,0x99,0x8E),
+     o3(0xE8,0xAA,0x87), o3(0xE8,0xB7,0xA8),
+     o3(0xE9,0x88,0xB7), o3(0xE9,0x9B,0x87),
+     o3(0xE9,0xA1,0xA7), o3(0xE9,0xBC,0x93),
+     o3(0xE4,0xBA,0x94), o3(0xE4,0xBA,0x92),
+     o3(0xE4,0xBC,0x8D), o3(0xE5,0x8D,0x88),
+     o3(0xE5,0x91,0x89), o3(0xE5,0x90,0xBE),
+     o3(0xE5,0xA8,0xAF), o3(0xE5,0xBE,0x8C),
+     o3(0xE5,0xBE,0xA1), o3(0xE6,0x82,0x9F),
+     o3(0xE6,0xA2,0xA7), o3(0xE6,0xAA,0x8E),
+     o3(0xE7,0x91,0x9A), o3(0xE7,0xA2,0x81),
+     o3(0xE8,0xAA,0x9E), o3(0xE8,0xAA,0xA4),
+     o3(0xE8,0xAD,0xB7), o3(0xE9,0x86,0x90),
+     o3(0xE4,0xB9,0x9E), o3(0xE9,0xAF,0x89),
+     o3(0xE4,0xBA,0xA4), o3(0xE4,0xBD,0xBC),
+     o3(0xE4,0xBE,0xAF), o3(0xE5,0x80,0x99),
+     o3(0xE5,0x80,0x96), o3(0xE5,0x85,0x89),
+     o3(0xE5,0x85,0xAC), o3(0xE5,0x8A,0x9F),
+     o3(0xE5,0x8A,0xB9), o3(0xE5,0x8B,0xBE),
+     o3(0xE5,0x8E,0x9A), o3(0xE5,0x8F,0xA3),
+     o3(0xE5,0x90,0x91),
+
+#define from_Shift_JIS_8C WORDINDEX2INFO(1404)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8C_infos,
+
+#define from_Shift_JIS_8D_infos WORDINDEX2INFO(1406)
+                INVALID, o3(0xE5,0x90,0x8E),
+     o3(0xE5,0x96,0x89), o3(0xE5,0x9D,0x91),
+     o3(0xE5,0x9E,0xA2), o3(0xE5,0xA5,0xBD),
+     o3(0xE5,0xAD,0x94), o3(0xE5,0xAD,0x9D),
+     o3(0xE5,0xAE,0x8F), o3(0xE5,0xB7,0xA5),
+     o3(0xE5,0xB7,0xA7), o3(0xE5,0xB7,0xB7),
+     o3(0xE5,0xB9,0xB8), o3(0xE5,0xBA,0x83),
+     o3(0xE5,0xBA,0x9A), o3(0xE5,0xBA,0xB7),
+     o3(0xE5,0xBC,0x98), o3(0xE6,0x81,0x92),
+     o3(0xE6,0x85,0x8C), o3(0xE6,0x8A,0x97),
+     o3(0xE6,0x8B,0x98), o3(0xE6,0x8E,0xA7),
+     o3(0xE6,0x94,0xBB), o3(0xE6,0x98,0x82),
+     o3(0xE6,0x99,0x83), o3(0xE6,0x9B,0xB4),
+     o3(0xE6,0x9D,0xAD), o3(0xE6,0xA0,0xA1),
+     o3(0xE6,0xA2,0x97), o3(0xE6,0xA7,0x8B),
+     o3(0xE6,0xB1,0x9F), o3(0xE6,0xB4,0xAA),
+     o3(0xE6,0xB5,0xA9), o3(0xE6,0xB8,0xAF),
+     o3(0xE6,0xBA,0x9D), o3(0xE7,0x94,0xB2),
+     o3(0xE7,0x9A,0x87), o3(0xE7,0xA1,0xAC),
+     o3(0xE7,0xA8,0xBF), o3(0xE7,0xB3,0xA0),
+     o3(0xE7,0xB4,0x85), o3(0xE7,0xB4,0x98),
+     o3(0xE7,0xB5,0x9E), o3(0xE7,0xB6,0xB1),
+     o3(0xE8,0x80,0x95), o3(0xE8,0x80,0x83),
+     o3(0xE8,0x82,0xAF), o3(0xE8,0x82,0xB1),
+     o3(0xE8,0x85,0x94), o3(0xE8,0x86,0x8F),
+     o3(0xE8,0x88,0xAA), o3(0xE8,0x8D,0x92),
+     o3(0xE8,0xA1,0x8C), o3(0xE8,0xA1,0xA1),
+     o3(0xE8,0xAC,0x9B), o3(0xE8,0xB2,0xA2),
+     o3(0xE8,0xB3,0xBC), o3(0xE9,0x83,0x8A),
+     o3(0xE9,0x85,0xB5), o3(0xE9,0x89,0xB1),
+     o3(0xE7,0xA0,0xBF), o3(0xE9,0x8B,0xBC),
+     o3(0xE9,0x96,0xA4), o3(0xE9,0x99,0x8D),
+     o3(0xE9,0xA0,0x85), o3(0xE9,0xA6,0x99),
+     o3(0xE9,0xAB,0x98), o3(0xE9,0xB4,0xBB),
+     o3(0xE5,0x89,0x9B), o3(0xE5,0x8A,0xAB),
+     o3(0xE5,0x8F,0xB7), o3(0xE5,0x90,0x88),
+     o3(0xE5,0xA3,0x95), o3(0xE6,0x8B,0xB7),
+     o3(0xE6,0xBF,0xA0), o3(0xE8,0xB1,0xAA),
+     o3(0xE8,0xBD,0x9F), o3(0xE9,0xBA,0xB9),
+     o3(0xE5,0x85,0x8B), o3(0xE5,0x88,0xBB),
+     o3(0xE5,0x91,0x8A), o3(0xE5,0x9B,0xBD),
+     o3(0xE7,0xA9,0x80), o3(0xE9,0x85,0xB7),
+     o3(0xE9,0xB5,0xA0), o3(0xE9,0xBB,0x92),
+     o3(0xE7,0x8D,0x84), o3(0xE6,0xBC,0x89),
+     o3(0xE8,0x85,0xB0), o3(0xE7,0x94,0x91),
+     o3(0xE5,0xBF,0xBD), o3(0xE6,0x83,0x9A),
+     o3(0xE9,0xAA,0xA8), o3(0xE7,0x8B,0x9B),
+     o3(0xE8,0xBE,0xBC), o3(0xE6,0xAD,0xA4),
+     o3(0xE9,0xA0,0x83), o3(0xE4,0xBB,0x8A),
+     o3(0xE5,0x9B,0xB0), o3(0xE5,0x9D,0xA4),
+     o3(0xE5,0xA2,0xBE), o3(0xE5,0xA9,0x9A),
+     o3(0xE6,0x81,0xA8), o3(0xE6,0x87,0x87),
+     o3(0xE6,0x98,0x8F), o3(0xE6,0x98,0x86),
+     o3(0xE6,0xA0,0xB9), o3(0xE6,0xA2,0xB1),
+     o3(0xE6,0xB7,0xB7), o3(0xE7,0x97,0x95),
+     o3(0xE7,0xB4,0xBA), o3(0xE8,0x89,0xAE),
+     o3(0xE9,0xAD,0x82), o3(0xE4,0xBA,0x9B),
+     o3(0xE4,0xBD,0x90), o3(0xE5,0x8F,0x89),
+     o3(0xE5,0x94,0x86), o3(0xE5,0xB5,0xAF),
+     o3(0xE5,0xB7,0xA6), o3(0xE5,0xB7,0xAE),
+     o3(0xE6,0x9F,0xBB), o3(0xE6,0xB2,0x99),
+     o3(0xE7,0x91,0xB3), o3(0xE7,0xA0,0x82),
+     o3(0xE8,0xA9,0x90), o3(0xE9,0x8E,0x96),
+     o3(0xE8,0xA3,0x9F), o3(0xE5,0x9D,0x90),
+     o3(0xE5,0xBA,0xA7), o3(0xE6,0x8C,0xAB),
+     o3(0xE5,0x82,0xB5), o3(0xE5,0x82,0xAC),
+     o3(0xE5,0x86,0x8D), o3(0xE6,0x9C,0x80),
+     o3(0xE5,0x93,0x89), o3(0xE5,0xA1,0x9E),
+     o3(0xE5,0xA6,0xBB), o3(0xE5,0xAE,0xB0),
+     o3(0xE5,0xBD,0xA9), o3(0xE6,0x89,0x8D),
+     o3(0xE6,0x8E,0xA1), o3(0xE6,0xA0,0xBD),
+     o3(0xE6,0xAD,0xB3), o3(0xE6,0xB8,0x88),
+     o3(0xE7,0x81,0xBD), o3(0xE9,0x87,0x87),
+     o3(0xE7,0x8A,0x80), o3(0xE7,0xA0,0x95),
+     o3(0xE7,0xA0,0xA6), o3(0xE7,0xA5,0xAD),
+     o3(0xE6,0x96,0x8E), o3(0xE7,0xB4,0xB0),
+     o3(0xE8,0x8F,0x9C), o3(0xE8,0xA3,0x81),
+     o3(0xE8,0xBC,0x89), o3(0xE9,0x9A,0x9B),
+     o3(0xE5,0x89,0xA4), o3(0xE5,0x9C,0xA8),
+     o3(0xE6,0x9D,0x90), o3(0xE7,0xBD,0xAA),
+     o3(0xE8,0xB2,0xA1), o3(0xE5,0x86,0xB4),
+     o3(0xE5,0x9D,0x82), o3(0xE9,0x98,0xAA),
+     o3(0xE5,0xA0,0xBA), o3(0xE6,0xA6,0x8A),
+     o3(0xE8,0x82,0xB4), o3(0xE5,0x92,0xB2),
+     o3(0xE5,0xB4,0x8E), o3(0xE5,0x9F,0xBC),
+     o3(0xE7,0xA2,0x95), o3(0xE9,0xB7,0xBA),
+     o3(0xE4,0xBD,0x9C), o3(0xE5,0x89,0x8A),
+     o3(0xE5,0x92,0x8B), o3(0xE6,0x90,0xBE),
+     o3(0xE6,0x98,0xA8), o3(0xE6,0x9C,0x94),
+     o3(0xE6,0x9F,0xB5), o3(0xE7,0xAA,0x84),
+     o3(0xE7,0xAD,0x96), o3(0xE7,0xB4,0xA2),
+     o3(0xE9,0x8C,0xAF), o3(0xE6,0xA1,0x9C),
+     o3(0xE9,0xAE,0xAD), o3(0xE7,0xAC,0xB9),
+     o3(0xE5,0x8C,0x99), o3(0xE5,0x86,0x8A),
+     o3(0xE5,0x88,0xB7),
+
+#define from_Shift_JIS_8D WORDINDEX2INFO(1595)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8D_infos,
+
+#define from_Shift_JIS_8E_infos WORDINDEX2INFO(1597)
+                INVALID, o3(0xE5,0xAF,0x9F),
+     o3(0xE6,0x8B,0xB6), o3(0xE6,0x92,0xAE),
+     o3(0xE6,0x93,0xA6), o3(0xE6,0x9C,0xAD),
+     o3(0xE6,0xAE,0xBA), o3(0xE8,0x96,0xA9),
+     o3(0xE9,0x9B,0x91), o3(0xE7,0x9A,0x90),
+     o3(0xE9,0xAF,0x96), o3(0xE6,0x8D,0x8C),
+     o3(0xE9,0x8C,0x86), o3(0xE9,0xAE,0xAB),
+     o3(0xE7,0x9A,0xBF), o3(0xE6,0x99,0x92),
+     o3(0xE4,0xB8,0x89), o3(0xE5,0x82,0x98),
+     o3(0xE5,0x8F,0x82), o3(0xE5,0xB1,0xB1),
+     o3(0xE6,0x83,0xA8), o3(0xE6,0x92,0x92),
+     o3(0xE6,0x95,0xA3), o3(0xE6,0xA1,0x9F),
+     o3(0xE7,0x87,0xA6), o3(0xE7,0x8F,0x8A),
+     o3(0xE7,0x94,0xA3), o3(0xE7,0xAE,0x97),
+     o3(0xE7,0xBA,0x82), o3(0xE8,0x9A,0x95),
+     o3(0xE8,0xAE,0x83), o3(0xE8,0xB3,0x9B),
+     o3(0xE9,0x85,0xB8), o3(0xE9,0xA4,0x90),
+     o3(0xE6,0x96,0xAC), o3(0xE6,0x9A,0xAB),
+     o3(0xE6,0xAE,0x8B), o3(0xE4,0xBB,0x95),
+     o3(0xE4,0xBB,0x94), o3(0xE4,0xBC,0xBA),
+     o3(0xE4,0xBD,0xBF), o3(0xE5,0x88,0xBA),
+     o3(0xE5,0x8F,0xB8), o3(0xE5,0x8F,0xB2),
+     o3(0xE5,0x97,0xA3), o3(0xE5,0x9B,0x9B),
+     o3(0xE5,0xA3,0xAB), o3(0xE5,0xA7,0x8B),
+     o3(0xE5,0xA7,0x89), o3(0xE5,0xA7,0xBF),
+     o3(0xE5,0xAD,0x90), o3(0xE5,0xB1,0x8D),
+     o3(0xE5,0xB8,0x82), o3(0xE5,0xB8,0xAB),
+     o3(0xE5,0xBF,0x97), o3(0xE6,0x80,0x9D),
+     o3(0xE6,0x8C,0x87), o3(0xE6,0x94,0xAF),
+     o3(0xE5,0xAD,0x9C), o3(0xE6,0x96,0xAF),
+     o3(0xE6,0x96,0xBD), o3(0xE6,0x97,0xA8),
+     o3(0xE6,0x9E,0x9D), o3(0xE6,0xAD,0xA2),
+     o3(0xE6,0xAD,0xBB), o3(0xE6,0xB0,0x8F),
+     o3(0xE7,0x8D,0x85), o3(0xE7,0xA5,0x89),
+     o3(0xE7,0xA7,0x81), o3(0xE7,0xB3,0xB8),
+     o3(0xE7,0xB4,0x99), o3(0xE7,0xB4,0xAB),
+     o3(0xE8,0x82,0xA2), o3(0xE8,0x84,0x82),
+     o3(0xE8,0x87,0xB3), o3(0xE8,0xA6,0x96),
+     o3(0xE8,0xA9,0x9E), o3(0xE8,0xA9,0xA9),
+     o3(0xE8,0xA9,0xA6), o3(0xE8,0xAA,0x8C),
+     o3(0xE8,0xAB,0xAE), o3(0xE8,0xB3,0x87),
+     o3(0xE8,0xB3,0x9C), o3(0xE9,0x9B,0x8C),
+     o3(0xE9,0xA3,0xBC), o3(0xE6,0xAD,0xAF),
+     o3(0xE4,0xBA,0x8B), o3(0xE4,0xBC,0xBC),
+     o3(0xE4,0xBE,0x8D), o3(0xE5,0x85,0x90),
+     o3(0xE5,0xAD,0x97), o3(0xE5,0xAF,0xBA),
+     o3(0xE6,0x85,0x88), o3(0xE6,0x8C,0x81),
+     o3(0xE6,0x99,0x82), o3(0xE6,0xAC,0xA1),
+     o3(0xE6,0xBB,0x8B), o3(0xE6,0xB2,0xBB),
+     o3(0xE7,0x88,0xBE), o3(0xE7,0x92,0xBD),
+     o3(0xE7,0x97,0x94), o3(0xE7,0xA3,0x81),
+     o3(0xE7,0xA4,0xBA), o3(0xE8,0x80,0x8C),
+     o3(0xE8,0x80,0xB3), o3(0xE8,0x87,0xAA),
+     o3(0xE8,0x92,0x94), o3(0xE8,0xBE,0x9E),
+     o3(0xE6,0xB1,0x90), o3(0xE9,0xB9,0xBF),
+     o3(0xE5,0xBC,0x8F), o3(0xE8,0xAD,0x98),
+     o3(0xE9,0xB4,0xAB), o3(0xE7,0xAB,0xBA),
+     o3(0xE8,0xBB,0xB8), o3(0xE5,0xAE,0x8D),
+     o3(0xE9,0x9B,0xAB), o3(0xE4,0xB8,0x83),
+     o3(0xE5,0x8F,0xB1), o3(0xE5,0x9F,0xB7),
+     o3(0xE5,0xA4,0xB1), o3(0xE5,0xAB,0x89),
+     o3(0xE5,0xAE,0xA4), o3(0xE6,0x82,0x89),
+     o3(0xE6,0xB9,0xBF), o3(0xE6,0xBC,0x86),
+     o3(0xE7,0x96,0xBE), o3(0xE8,0xB3,0xAA),
+     o3(0xE5,0xAE,0x9F), o3(0xE8,0x94,0x80),
+     o3(0xE7,0xAF,0xA0), o3(0xE5,0x81,0xB2),
+     o3(0xE6,0x9F,0xB4), o3(0xE8,0x8A,0x9D),
+     o3(0xE5,0xB1,0xA1), o3(0xE8,0x95,0x8A),
+     o3(0xE7,0xB8,0x9E), o3(0xE8,0x88,0x8E),
+     o3(0xE5,0x86,0x99), o3(0xE5,0xB0,0x84),
+     o3(0xE6,0x8D,0xA8), o3(0xE8,0xB5,0xA6),
+     o3(0xE6,0x96,0x9C), o3(0xE7,0x85,0xAE),
+     o3(0xE7,0xA4,0xBE), o3(0xE7,0xB4,0x97),
+     o3(0xE8,0x80,0x85), o3(0xE8,0xAC,0x9D),
+     o3(0xE8,0xBB,0x8A), o3(0xE9,0x81,0xAE),
+     o3(0xE8,0x9B,0x87), o3(0xE9,0x82,0xAA),
+     o3(0xE5,0x80,0x9F), o3(0xE5,0x8B,0xBA),
+     o3(0xE5,0xB0,0xBA), o3(0xE6,0x9D,0x93),
+     o3(0xE7,0x81,0xBC), o3(0xE7,0x88,0xB5),
+     o3(0xE9,0x85,0x8C), o3(0xE9,0x87,0x88),
+     o3(0xE9,0x8C,0xAB), o3(0xE8,0x8B,0xA5),
+     o3(0xE5,0xAF,0x82), o3(0xE5,0xBC,0xB1),
+     o3(0xE6,0x83,0xB9), o3(0xE4,0xB8,0xBB),
+     o3(0xE5,0x8F,0x96), o3(0xE5,0xAE,0x88),
+     o3(0xE6,0x89,0x8B), o3(0xE6,0x9C,0xB1),
+     o3(0xE6,0xAE,0x8A), o3(0xE7,0x8B,0xA9),
+     o3(0xE7,0x8F,0xA0), o3(0xE7,0xA8,0xAE),
+     o3(0xE8,0x85,0xAB), o3(0xE8,0xB6,0xA3),
+     o3(0xE9,0x85,0x92), o3(0xE9,0xA6,0x96),
+     o3(0xE5,0x84,0x92), o3(0xE5,0x8F,0x97),
+     o3(0xE5,0x91,0xAA), o3(0xE5,0xAF,0xBF),
+     o3(0xE6,0x8E,0x88), o3(0xE6,0xA8,0xB9),
+     o3(0xE7,0xB6,0xAC), o3(0xE9,0x9C,0x80),
+     o3(0xE5,0x9B,0x9A), o3(0xE5,0x8F,0x8E),
+     o3(0xE5,0x91,0xA8),
+
+#define from_Shift_JIS_8E WORDINDEX2INFO(1786)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8E_infos,
+
+#define from_Shift_JIS_8F_infos WORDINDEX2INFO(1788)
+                INVALID, o3(0xE5,0xAE,0x97),
+     o3(0xE5,0xB0,0xB1), o3(0xE5,0xB7,0x9E),
+     o3(0xE4,0xBF,0xAE), o3(0xE6,0x84,0x81),
+     o3(0xE6,0x8B,0xBE), o3(0xE6,0xB4,0xB2),
+     o3(0xE7,0xA7,0x80), o3(0xE7,0xA7,0x8B),
+     o3(0xE7,0xB5,0x82), o3(0xE7,0xB9,0x8D),
+     o3(0xE7,0xBF,0x92), o3(0xE8,0x87,0xAD),
+     o3(0xE8,0x88,0x9F), o3(0xE8,0x92,0x90),
+     o3(0xE8,0xA1,0x86), o3(0xE8,0xA5,0xB2),
+     o3(0xE8,0xAE,0x90), o3(0xE8,0xB9,0xB4),
+     o3(0xE8,0xBC,0xAF), o3(0xE9,0x80,0xB1),
+     o3(0xE9,0x85,0x8B), o3(0xE9,0x85,0xAC),
+     o3(0xE9,0x9B,0x86), o3(0xE9,0x86,0x9C),
+     o3(0xE4,0xBB,0x80), o3(0xE4,0xBD,0x8F),
+     o3(0xE5,0x85,0x85), o3(0xE5,0x8D,0x81),
+     o3(0xE5,0xBE,0x93), o3(0xE6,0x88,0x8E),
+     o3(0xE6,0x9F,0x94), o3(0xE6,0xB1,0x81),
+     o3(0xE6,0xB8,0x8B), o3(0xE7,0x8D,0xA3),
+     o3(0xE7,0xB8,0xA6), o3(0xE9,0x87,0x8D),
+     o3(0xE9,0x8A,0x83), o3(0xE5,0x8F,0x94),
+     o3(0xE5,0xA4,0x99), o3(0xE5,0xAE,0xBF),
+     o3(0xE6,0xB7,0x91), o3(0xE7,0xA5,0x9D),
+     o3(0xE7,0xB8,0xAE), o3(0xE7,0xB2,0x9B),
+     o3(0xE5,0xA1,0xBE), o3(0xE7,0x86,0x9F),
+     o3(0xE5,0x87,0xBA), o3(0xE8,0xA1,0x93),
+     o3(0xE8,0xBF,0xB0), o3(0xE4,0xBF,0x8A),
+     o3(0xE5,0xB3,0xBB), o3(0xE6,0x98,0xA5),
+     o3(0xE7,0x9E,0xAC), o3(0xE7,0xAB,0xA3),
+     o3(0xE8,0x88,0x9C), o3(0xE9,0xA7,0xBF),
+     o3(0xE5,0x87,0x86), o3(0xE5,0xBE,0xAA),
+     o3(0xE6,0x97,0xAC), o3(0xE6,0xA5,0xAF),
+     o3(0xE6,0xAE,0x89), o3(0xE6,0xB7,0xB3),
+     o3(0xE6,0xBA,0x96), o3(0xE6,0xBD,0xA4),
+     o3(0xE7,0x9B,0xBE), o3(0xE7,0xB4,0x94),
+     o3(0xE5,0xB7,0xA1), o3(0xE9,0x81,0xB5),
+     o3(0xE9,0x86,0x87), o3(0xE9,0xA0,0x86),
+     o3(0xE5,0x87,0xA6), o3(0xE5,0x88,0x9D),
+     o3(0xE6,0x89,0x80), o3(0xE6,0x9A,0x91),
+     o3(0xE6,0x9B,0x99), o3(0xE6,0xB8,0x9A),
+     o3(0xE5,0xBA,0xB6), o3(0xE7,0xB7,0x92),
+     o3(0xE7,0xBD,0xB2), o3(0xE6,0x9B,0xB8),
+     o3(0xE8,0x96,0xAF), o3(0xE8,0x97,0xB7),
+     o3(0xE8,0xAB,0xB8), o3(0xE5,0x8A,0xA9),
+     o3(0xE5,0x8F,0x99), o3(0xE5,0xA5,0xB3),
+     o3(0xE5,0xBA,0x8F), o3(0xE5,0xBE,0x90),
+     o3(0xE6,0x81,0x95), o3(0xE9,0x8B,0xA4),
+     o3(0xE9,0x99,0xA4), o3(0xE5,0x82,0xB7),
+     o3(0xE5,0x84,0x9F), o3(0xE5,0x8B,0x9D),
+     o3(0xE5,0x8C,0xA0), o3(0xE5,0x8D,0x87),
+     o3(0xE5,0x8F,0xAC), o3(0xE5,0x93,0xA8),
+     o3(0xE5,0x95,0x86), o3(0xE5,0x94,0xB1),
+     o3(0xE5,0x98,0x97), o3(0xE5,0xA5,0xA8),
+     o3(0xE5,0xA6,0xBE), o3(0xE5,0xA8,0xBC),
+     o3(0xE5,0xAE,0xB5), o3(0xE5,0xB0,0x86),
+     o3(0xE5,0xB0,0x8F), o3(0xE5,0xB0,0x91),
+     o3(0xE5,0xB0,0x9A), o3(0xE5,0xBA,0x84),
+     o3(0xE5,0xBA,0x8A), o3(0xE5,0xBB,0xA0),
+     o3(0xE5,0xBD,0xB0), o3(0xE6,0x89,0xBF),
+     o3(0xE6,0x8A,0x84), o3(0xE6,0x8B,0x9B),
+     o3(0xE6,0x8E,0x8C), o3(0xE6,0x8D,0xB7),
+     o3(0xE6,0x98,0x87), o3(0xE6,0x98,0x8C),
+     o3(0xE6,0x98,0xAD), o3(0xE6,0x99,0xB6),
+     o3(0xE6,0x9D,0xBE), o3(0xE6,0xA2,0xA2),
+     o3(0xE6,0xA8,0x9F), o3(0xE6,0xA8,0xB5),
+     o3(0xE6,0xB2,0xBC), o3(0xE6,0xB6,0x88),
+     o3(0xE6,0xB8,0x89), o3(0xE6,0xB9,0x98),
+     o3(0xE7,0x84,0xBC), o3(0xE7,0x84,0xA6),
+     o3(0xE7,0x85,0xA7), o3(0xE7,0x97,0x87),
+     o3(0xE7,0x9C,0x81), o3(0xE7,0xA1,0x9D),
+     o3(0xE7,0xA4,0x81), o3(0xE7,0xA5,0xA5),
+     o3(0xE7,0xA7,0xB0), o3(0xE7,0xAB,0xA0),
+     o3(0xE7,0xAC,0x91), o3(0xE7,0xB2,0xA7),
+     o3(0xE7,0xB4,0xB9), o3(0xE8,0x82,0x96),
+     o3(0xE8,0x8F,0x96), o3(0xE8,0x92,0x8B),
+     o3(0xE8,0x95,0x89), o3(0xE8,0xA1,0x9D),
+     o3(0xE8,0xA3,0xB3), o3(0xE8,0xA8,0x9F),
+     o3(0xE8,0xA8,0xBC), o3(0xE8,0xA9,0x94),
+     o3(0xE8,0xA9,0xB3), o3(0xE8,0xB1,0xA1),
+     o3(0xE8,0xB3,0x9E), o3(0xE9,0x86,0xA4),
+     o3(0xE9,0x89,0xA6), o3(0xE9,0x8D,0xBE),
+     o3(0xE9,0x90,0x98), o3(0xE9,0x9A,0x9C),
+     o3(0xE9,0x9E,0x98), o3(0xE4,0xB8,0x8A),
+     o3(0xE4,0xB8,0x88), o3(0xE4,0xB8,0x9E),
+     o3(0xE4,0xB9,0x97), o3(0xE5,0x86,0x97),
+     o3(0xE5,0x89,0xB0), o3(0xE5,0x9F,0x8E),
+     o3(0xE5,0xA0,0xB4), o3(0xE5,0xA3,0x8C),
+     o3(0xE5,0xAC,0xA2), o3(0xE5,0xB8,0xB8),
+     o3(0xE6,0x83,0x85), o3(0xE6,0x93,0xBE),
+     o3(0xE6,0x9D,0xA1), o3(0xE6,0x9D,0x96),
+     o3(0xE6,0xB5,0x84), o3(0xE7,0x8A,0xB6),
+     o3(0xE7,0x95,0xB3), o3(0xE7,0xA9,0xA3),
+     o3(0xE8,0x92,0xB8), o3(0xE8,0xAD,0xB2),
+     o3(0xE9,0x86,0xB8), o3(0xE9,0x8C,0xA0),
+     o3(0xE5,0x98,0xB1), o3(0xE5,0x9F,0xB4),
+     o3(0xE9,0xA3,0xBE),
+
+#define from_Shift_JIS_8F WORDINDEX2INFO(1977)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_8F_infos,
+
+#define from_Shift_JIS_90_infos WORDINDEX2INFO(1979)
+                INVALID, o3(0xE6,0x8B,0xAD),
+     o3(0xE6,0xA4,0x8D), o3(0xE6,0xAE,0x96),
+     o3(0xE7,0x87,0xAD), o3(0xE7,0xB9,0x94),
+     o3(0xE8,0x81,0xB7), o3(0xE8,0x89,0xB2),
+     o3(0xE8,0xA7,0xA6), o3(0xE9,0xA3,0x9F),
+     o3(0xE8,0x9D,0x95), o3(0xE8,0xBE,0xB1),
+     o3(0xE5,0xB0,0xBB), o3(0xE4,0xBC,0xB8),
+     o3(0xE4,0xBF,0xA1), o3(0xE4,0xBE,0xB5),
+     o3(0xE5,0x94,0x87), o3(0xE5,0xA8,0xA0),
+     o3(0xE5,0xAF,0x9D), o3(0xE5,0xAF,0xA9),
+     o3(0xE5,0xBF,0x83), o3(0xE6,0x85,0x8E),
+     o3(0xE6,0x8C,0xAF), o3(0xE6,0x96,0xB0),
+     o3(0xE6,0x99,0x8B), o3(0xE6,0xA3,0xAE),
+     o3(0xE6,0xA6,0x9B), o3(0xE6,0xB5,0xB8),
+     o3(0xE6,0xB7,0xB1), o3(0xE7,0x94,0xB3),
+     o3(0xE7,0x96,0xB9), o3(0xE7,0x9C,0x9F),
+     o3(0xE7,0xA5,0x9E), o3(0xE7,0xA7,0xA6),
+     o3(0xE7,0xB4,0xB3), o3(0xE8,0x87,0xA3),
+     o3(0xE8,0x8A,0xAF), o3(0xE8,0x96,0xAA),
+     o3(0xE8,0xA6,0xAA), o3(0xE8,0xA8,0xBA),
+     o3(0xE8,0xBA,0xAB), o3(0xE8,0xBE,0x9B),
+     o3(0xE9,0x80,0xB2), o3(0xE9,0x87,0x9D),
+     o3(0xE9,0x9C,0x87), o3(0xE4,0xBA,0xBA),
+     o3(0xE4,0xBB,0x81), o3(0xE5,0x88,0x83),
+     o3(0xE5,0xA1,0xB5), o3(0xE5,0xA3,0xAC),
+     o3(0xE5,0xB0,0x8B), o3(0xE7,0x94,0x9A),
+     o3(0xE5,0xB0,0xBD), o3(0xE8,0x85,0x8E),
+     o3(0xE8,0xA8,0x8A), o3(0xE8,0xBF,0x85),
+     o3(0xE9,0x99,0xA3), o3(0xE9,0x9D,0xAD),
+     o3(0xE7,0xAC,0xA5), o3(0xE8,0xAB,0x8F),
+     o3(0xE9,0xA0,0x88), o3(0xE9,0x85,0xA2),
+     o3(0xE5,0x9B,0xB3), o3(0xE5,0x8E,0xA8),
+     o3(0xE9,0x80,0x97), o3(0xE5,0x90,0xB9),
+     o3(0xE5,0x9E,0x82), o3(0xE5,0xB8,0xA5),
+     o3(0xE6,0x8E,0xA8), o3(0xE6,0xB0,0xB4),
+     o3(0xE7,0x82,0x8A), o3(0xE7,0x9D,0xA1),
+     o3(0xE7,0xB2,0x8B), o3(0xE7,0xBF,0xA0),
+     o3(0xE8,0xA1,0xB0), o3(0xE9,0x81,0x82),
+     o3(0xE9,0x85,0x94), o3(0xE9,0x8C,0x90),
+     o3(0xE9,0x8C,0x98), o3(0xE9,0x9A,0x8F),
+     o3(0xE7,0x91,0x9E), o3(0xE9,0xAB,0x84),
+     o3(0xE5,0xB4,0x87), o3(0xE5,0xB5,0xA9),
+     o3(0xE6,0x95,0xB0), o3(0xE6,0x9E,0xA2),
+     o3(0xE8,0xB6,0xA8), o3(0xE9,0x9B,0x9B),
+     o3(0xE6,0x8D,0xAE), o3(0xE6,0x9D,0x89),
+     o3(0xE6,0xA4,0x99), o3(0xE8,0x8F,0x85),
+     o3(0xE9,0xA0,0x97), o3(0xE9,0x9B,0x80),
+     o3(0xE8,0xA3,0xBE), o3(0xE6,0xBE,0x84),
+     o3(0xE6,0x91,0xBA), o3(0xE5,0xAF,0xB8),
+     o3(0xE4,0xB8,0x96), o3(0xE7,0x80,0xAC),
+     o3(0xE7,0x95,0x9D), o3(0xE6,0x98,0xAF),
+     o3(0xE5,0x87,0x84), o3(0xE5,0x88,0xB6),
+     o3(0xE5,0x8B,0xA2), o3(0xE5,0xA7,0x93),
+     o3(0xE5,0xBE,0x81), o3(0xE6,0x80,0xA7),
+     o3(0xE6,0x88,0x90), o3(0xE6,0x94,0xBF),
+     o3(0xE6,0x95,0xB4), o3(0xE6,0x98,0x9F),
+     o3(0xE6,0x99,0xB4), o3(0xE6,0xA3,0xB2),
+     o3(0xE6,0xA0,0x96), o3(0xE6,0xAD,0xA3),
+     o3(0xE6,0xB8,0x85), o3(0xE7,0x89,0xB2),
+     o3(0xE7,0x94,0x9F), o3(0xE7,0x9B,0x9B),
+     o3(0xE7,0xB2,0xBE), o3(0xE8,0x81,0x96),
+     o3(0xE5,0xA3,0xB0), o3(0xE8,0xA3,0xBD),
+     o3(0xE8,0xA5,0xBF), o3(0xE8,0xAA,0xA0),
+     o3(0xE8,0xAA,0x93), o3(0xE8,0xAB,0x8B),
+     o3(0xE9,0x80,0x9D), o3(0xE9,0x86,0x92),
+     o3(0xE9,0x9D,0x92), o3(0xE9,0x9D,0x99),
+     o3(0xE6,0x96,0x89), o3(0xE7,0xA8,0x8E),
+     o3(0xE8,0x84,0x86), o3(0xE9,0x9A,0xBB),
+     o3(0xE5,0xB8,0xAD), o3(0xE6,0x83,0x9C),
+     o3(0xE6,0x88,0x9A), o3(0xE6,0x96,0xA5),
+     o3(0xE6,0x98,0x94), o3(0xE6,0x9E,0x90),
+     o3(0xE7,0x9F,0xB3), o3(0xE7,0xA9,0x8D),
+     o3(0xE7,0xB1,0x8D), o3(0xE7,0xB8,0xBE),
+     o3(0xE8,0x84,0x8A), o3(0xE8,0xB2,0xAC),
+     o3(0xE8,0xB5,0xA4), o3(0xE8,0xB7,0xA1),
+     o3(0xE8,0xB9,0x9F), o3(0xE7,0xA2,0xA9),
+     o3(0xE5,0x88,0x87), o3(0xE6,0x8B,0x99),
+     o3(0xE6,0x8E,0xA5), o3(0xE6,0x91,0x82),
+     o3(0xE6,0x8A,0x98), o3(0xE8,0xA8,0xAD),
+     o3(0xE7,0xAA,0x83), o3(0xE7,0xAF,0x80),
+     o3(0xE8,0xAA,0xAC), o3(0xE9,0x9B,0xAA),
+     o3(0xE7,0xB5,0xB6), o3(0xE8,0x88,0x8C),
+     o3(0xE8,0x9D,0x89), o3(0xE4,0xBB,0x99),
+     o3(0xE5,0x85,0x88), o3(0xE5,0x8D,0x83),
+     o3(0xE5,0x8D,0xA0), o3(0xE5,0xAE,0xA3),
+     o3(0xE5,0xB0,0x82), o3(0xE5,0xB0,0x96),
+     o3(0xE5,0xB7,0x9D), o3(0xE6,0x88,0xA6),
+     o3(0xE6,0x89,0x87), o3(0xE6,0x92,0xB0),
+     o3(0xE6,0xA0,0x93), o3(0xE6,0xA0,0xB4),
+     o3(0xE6,0xB3,0x89), o3(0xE6,0xB5,0x85),
+     o3(0xE6,0xB4,0x97), o3(0xE6,0x9F,0x93),
+     o3(0xE6,0xBD,0x9C), o3(0xE7,0x85,0x8E),
+     o3(0xE7,0x85,0xBD), o3(0xE6,0x97,0x8B),
+     o3(0xE7,0xA9,0xBF), o3(0xE7,0xAE,0xAD),
+     o3(0xE7,0xB7,0x9A),
+
+#define from_Shift_JIS_90 WORDINDEX2INFO(2168)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_90_infos,
+
+#define from_Shift_JIS_91_infos WORDINDEX2INFO(2170)
+                INVALID, o3(0xE7,0xB9,0x8A),
+     o3(0xE7,0xBE,0xA8), o3(0xE8,0x85,0xBA),
+     o3(0xE8,0x88,0x9B), o3(0xE8,0x88,0xB9),
+     o3(0xE8,0x96,0xA6), o3(0xE8,0xA9,0xAE),
+     o3(0xE8,0xB3,0x8E), o3(0xE8,0xB7,0xB5),
+     o3(0xE9,0x81,0xB8), o3(0xE9,0x81,0xB7),
+     o3(0xE9,0x8A,0xAD), o3(0xE9,0x8A,0x91),
+     o3(0xE9,0x96,0x83), o3(0xE9,0xAE,0xAE),
+     o3(0xE5,0x89,0x8D), o3(0xE5,0x96,0x84),
+     o3(0xE6,0xBC,0xB8), o3(0xE7,0x84,0xB6),
+     o3(0xE5,0x85,0xA8), o3(0xE7,0xA6,0x85),
+     o3(0xE7,0xB9,0x95), o3(0xE8,0x86,0xB3),
+     o3(0xE7,0xB3,0x8E), o3(0xE5,0x99,0x8C),
+     o3(0xE5,0xA1,0x91), o3(0xE5,0xB2,0xA8),
+     o3(0xE6,0x8E,0xAA), o3(0xE6,0x9B,0xBE),
+     o3(0xE6,0x9B,0xBD), o3(0xE6,0xA5,0x9A),
+     o3(0xE7,0x8B,0x99), o3(0xE7,0x96,0x8F),
+     o3(0xE7,0x96,0x8E), o3(0xE7,0xA4,0x8E),
+     o3(0xE7,0xA5,0x96), o3(0xE7,0xA7,0x9F),
+     o3(0xE7,0xB2,0x97), o3(0xE7,0xB4,0xA0),
+     o3(0xE7,0xB5,0x84), o3(0xE8,0x98,0x87),
+     o3(0xE8,0xA8,0xB4), o3(0xE9,0x98,0xBB),
+     o3(0xE9,0x81,0xA1), o3(0xE9,0xBC,0xA0),
+     o3(0xE5,0x83,0xA7), o3(0xE5,0x89,0xB5),
+     o3(0xE5,0x8F,0x8C), o3(0xE5,0x8F,0xA2),
+     o3(0xE5,0x80,0x89), o3(0xE5,0x96,0xAA),
+     o3(0xE5,0xA3,0xAE), o3(0xE5,0xA5,0x8F),
+     o3(0xE7,0x88,0xBD), o3(0xE5,0xAE,0x8B),
+     o3(0xE5,0xB1,0xA4), o3(0xE5,0x8C,0x9D),
+     o3(0xE6,0x83,0xA3), o3(0xE6,0x83,0xB3),
+     o3(0xE6,0x8D,0x9C), o3(0xE6,0x8E,0x83),
+     o3(0xE6,0x8C,0xBF), o3(0xE6,0x8E,0xBB),
+     o3(0xE6,0x93,0x8D), o3(0xE6,0x97,0xA9),
+     o3(0xE6,0x9B,0xB9), o3(0xE5,0xB7,0xA3),
+     o3(0xE6,0xA7,0x8D), o3(0xE6,0xA7,0xBD),
+     o3(0xE6,0xBC,0x95), o3(0xE7,0x87,0xA5),
+     o3(0xE4,0xBA,0x89), o3(0xE7,0x97,0xA9),
+     o3(0xE7,0x9B,0xB8), o3(0xE7,0xAA,0x93),
+     o3(0xE7,0xB3,0x9F), o3(0xE7,0xB7,0x8F),
+     o3(0xE7,0xB6,0x9C), o3(0xE8,0x81,0xA1),
+     o3(0xE8,0x8D,0x89), o3(0xE8,0x8D,0x98),
+     o3(0xE8,0x91,0xAC), o3(0xE8,0x92,0xBC),
+     o3(0xE8,0x97,0xBB), o3(0xE8,0xA3,0x85),
+     o3(0xE8,0xB5,0xB0), o3(0xE9,0x80,0x81),
+     o3(0xE9,0x81,0xAD), o3(0xE9,0x8E,0x97),
+     o3(0xE9,0x9C,0x9C), o3(0xE9,0xA8,0x92),
+     o3(0xE5,0x83,0x8F), o3(0xE5,0xA2,0x97),
+     o3(0xE6,0x86,0x8E), o3(0xE8,0x87,0x93),
+     o3(0xE8,0x94,0xB5), o3(0xE8,0xB4,0x88),
+     o3(0xE9,0x80,0xA0), o3(0xE4,0xBF,0x83),
+     o3(0xE5,0x81,0xB4), o3(0xE5,0x89,0x87),
+     o3(0xE5,0x8D,0xB3), o3(0xE6,0x81,0xAF),
+     o3(0xE6,0x8D,0x89), o3(0xE6,0x9D,0x9F),
+     o3(0xE6,0xB8,0xAC), o3(0xE8,0xB6,0xB3),
+     o3(0xE9,0x80,0x9F), o3(0xE4,0xBF,0x97),
+     o3(0xE5,0xB1,0x9E), o3(0xE8,0xB3,0x8A),
+     o3(0xE6,0x97,0x8F), o3(0xE7,0xB6,0x9A),
+     o3(0xE5,0x8D,0x92), o3(0xE8,0xA2,0x96),
+     o3(0xE5,0x85,0xB6), o3(0xE6,0x8F,0x83),
+     o3(0xE5,0xAD,0x98), o3(0xE5,0xAD,0xAB),
+     o3(0xE5,0xB0,0x8A), o3(0xE6,0x90,0x8D),
+     o3(0xE6,0x9D,0x91), o3(0xE9,0x81,0x9C),
+     o3(0xE4,0xBB,0x96), o3(0xE5,0xA4,0x9A),
+     o3(0xE5,0xA4,0xAA), o3(0xE6,0xB1,0xB0),
+     o3(0xE8,0xA9,0x91), o3(0xE5,0x94,0xBE),
+     o3(0xE5,0xA0,0x95), o3(0xE5,0xA6,0xA5),
+     o3(0xE6,0x83,0xB0), o3(0xE6,0x89,0x93),
+     o3(0xE6,0x9F,0x81), o3(0xE8,0x88,0xB5),
+     o3(0xE6,0xA5,0x95), o3(0xE9,0x99,0x80),
+     o3(0xE9,0xA7,0x84), o3(0xE9,0xA8,0xA8),
+     o3(0xE4,0xBD,0x93), o3(0xE5,0xA0,0x86),
+     o3(0xE5,0xAF,0xBE), o3(0xE8,0x80,0x90),
+     o3(0xE5,0xB2,0xB1), o3(0xE5,0xB8,0xAF),
+     o3(0xE5,0xBE,0x85), o3(0xE6,0x80,0xA0),
+     o3(0xE6,0x85,0x8B), o3(0xE6,0x88,0xB4),
+     o3(0xE6,0x9B,0xBF), o3(0xE6,0xB3,0xB0),
+     o3(0xE6,0xBB,0x9E), o3(0xE8,0x83,0x8E),
+     o3(0xE8,0x85,0xBF), o3(0xE8,0x8B,0x94),
+     o3(0xE8,0xA2,0x8B), o3(0xE8,0xB2,0xB8),
+     o3(0xE9,0x80,0x80), o3(0xE9,0x80,0xAE),
+     o3(0xE9,0x9A,0x8A), o3(0xE9,0xBB,0x9B),
+     o3(0xE9,0xAF,0x9B), o3(0xE4,0xBB,0xA3),
+     o3(0xE5,0x8F,0xB0), o3(0xE5,0xA4,0xA7),
+     o3(0xE7,0xAC,0xAC), o3(0xE9,0x86,0x8D),
+     o3(0xE9,0xA1,0x8C), o3(0xE9,0xB7,0xB9),
+     o3(0xE6,0xBB,0x9D), o3(0xE7,0x80,0xA7),
+     o3(0xE5,0x8D,0x93), o3(0xE5,0x95,0x84),
+     o3(0xE5,0xAE,0x85), o3(0xE6,0x89,0x98),
+     o3(0xE6,0x8A,0x9E), o3(0xE6,0x8B,0x93),
+     o3(0xE6,0xB2,0xA2), o3(0xE6,0xBF,0xAF),
+     o3(0xE7,0x90,0xA2), o3(0xE8,0xA8,0x97),
+     o3(0xE9,0x90,0xB8), o3(0xE6,0xBF,0x81),
+     o3(0xE8,0xAB,0xBE), o3(0xE8,0x8C,0xB8),
+     o3(0xE5,0x87,0xA7), o3(0xE8,0x9B,0xB8),
+     o3(0xE5,0x8F,0xAA),
+
+#define from_Shift_JIS_91 WORDINDEX2INFO(2359)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_91_infos,
+
+#define from_Shift_JIS_92_infos WORDINDEX2INFO(2361)
+                INVALID, o3(0xE5,0x8F,0xA9),
+     o3(0xE4,0xBD,0x86), o3(0xE9,0x81,0x94),
+     o3(0xE8,0xBE,0xB0), o3(0xE5,0xA5,0xAA),
+     o3(0xE8,0x84,0xB1), o3(0xE5,0xB7,0xBD),
+     o3(0xE7,0xAB,0xAA), o3(0xE8,0xBE,0xBF),
+     o3(0xE6,0xA3,0x9A), o3(0xE8,0xB0,0xB7),
+     o3(0xE7,0x8B,0xB8), o3(0xE9,0xB1,0x88),
+     o3(0xE6,0xA8,0xBD), o3(0xE8,0xAA,0xB0),
+     o3(0xE4,0xB8,0xB9), o3(0xE5,0x8D,0x98),
+     o3(0xE5,0x98,0x86), o3(0xE5,0x9D,0xA6),
+     o3(0xE6,0x8B,0x85), o3(0xE6,0x8E,0xA2),
+     o3(0xE6,0x97,0xA6), o3(0xE6,0xAD,0x8E),
+     o3(0xE6,0xB7,0xA1), o3(0xE6,0xB9,0x9B),
+     o3(0xE7,0x82,0xAD), o3(0xE7,0x9F,0xAD),
+     o3(0xE7,0xAB,0xAF), o3(0xE7,0xAE,0xAA),
+     o3(0xE7,0xB6,0xBB), o3(0xE8,0x80,0xBD),
+     o3(0xE8,0x83,0x86), o3(0xE8,0x9B,0x8B),
+     o3(0xE8,0xAA,0x95), o3(0xE9,0x8D,0x9B),
+     o3(0xE5,0x9B,0xA3), o3(0xE5,0xA3,0x87),
+     o3(0xE5,0xBC,0xBE), o3(0xE6,0x96,0xAD),
+     o3(0xE6,0x9A,0x96), o3(0xE6,0xAA,0x80),
+     o3(0xE6,0xAE,0xB5), o3(0xE7,0x94,0xB7),
+     o3(0xE8,0xAB,0x87), o3(0xE5,0x80,0xA4),
+     o3(0xE7,0x9F,0xA5), o3(0xE5,0x9C,0xB0),
+     o3(0xE5,0xBC,0x9B), o3(0xE6,0x81,0xA5),
+     o3(0xE6,0x99,0xBA), o3(0xE6,0xB1,0xA0),
+     o3(0xE7,0x97,0xB4), o3(0xE7,0xA8,0x9A),
+     o3(0xE7,0xBD,0xAE), o3(0xE8,0x87,0xB4),
+     o3(0xE8,0x9C,0x98), o3(0xE9,0x81,0x85),
+     o3(0xE9,0xA6,0xB3), o3(0xE7,0xAF,0x89),
+     o3(0xE7,0x95,0x9C), o3(0xE7,0xAB,0xB9),
+     o3(0xE7,0xAD,0x91), o3(0xE8,0x93,0x84),
+     o3(0xE9,0x80,0x90), o3(0xE7,0xA7,0xA9),
+     o3(0xE7,0xAA,0x92), o3(0xE8,0x8C,0xB6),
+     o3(0xE5,0xAB,0xA1), o3(0xE7,0x9D,0x80),
+     o3(0xE4,0xB8,0xAD), o3(0xE4,0xBB,0xB2),
+     o3(0xE5,0xAE,0x99), o3(0xE5,0xBF,0xA0),
+     o3(0xE6,0x8A,0xBD), o3(0xE6,0x98,0xBC),
+     o3(0xE6,0x9F,0xB1), o3(0xE6,0xB3,0xA8),
+     o3(0xE8,0x99,0xAB), o3(0xE8,0xA1,0xB7),
+     o3(0xE8,0xA8,0xBB), o3(0xE9,0x85,0x8E),
+     o3(0xE9,0x8B,0xB3), o3(0xE9,0xA7,0x90),
+     o3(0xE6,0xA8,0x97), o3(0xE7,0x80,0xA6),
+     o3(0xE7,0x8C,0xAA), o3(0xE8,0x8B,0xA7),
+     o3(0xE8,0x91,0x97), o3(0xE8,0xB2,0xAF),
+     o3(0xE4,0xB8,0x81), o3(0xE5,0x85,0x86),
+     o3(0xE5,0x87,0x8B), o3(0xE5,0x96,0x8B),
+     o3(0xE5,0xAF,0xB5), o3(0xE5,0xB8,0x96),
+     o3(0xE5,0xB8,0xB3), o3(0xE5,0xBA,0x81),
+     o3(0xE5,0xBC,0x94), o3(0xE5,0xBC,0xB5),
+     o3(0xE5,0xBD,0xAB), o3(0xE5,0xBE,0xB4),
+     o3(0xE6,0x87,0xB2), o3(0xE6,0x8C,0x91),
+     o3(0xE6,0x9A,0xA2), o3(0xE6,0x9C,0x9D),
+     o3(0xE6,0xBD,0xAE), o3(0xE7,0x89,0x92),
+     o3(0xE7,0x94,0xBA), o3(0xE7,0x9C,0xBA),
+     o3(0xE8,0x81,0xB4), o3(0xE8,0x84,0xB9),
+     o3(0xE8,0x85,0xB8), o3(0xE8,0x9D,0xB6),
+     o3(0xE8,0xAA,0xBF), o3(0xE8,0xAB,0x9C),
+     o3(0xE8,0xB6,0x85), o3(0xE8,0xB7,0xB3),
+     o3(0xE9,0x8A,0x9A), o3(0xE9,0x95,0xB7),
+     o3(0xE9,0xA0,0x82), o3(0xE9,0xB3,0xA5),
+     o3(0xE5,0x8B,0x85), o3(0xE6,0x8D,0x97),
+     o3(0xE7,0x9B,0xB4), o3(0xE6,0x9C,0x95),
+     o3(0xE6,0xB2,0x88), o3(0xE7,0x8F,0x8D),
+     o3(0xE8,0xB3,0x83), o3(0xE9,0x8E,0xAE),
+     o3(0xE9,0x99,0xB3), o3(0xE6,0xB4,0xA5),
+     o3(0xE5,0xA2,0x9C), o3(0xE6,0xA4,0x8E),
+     o3(0xE6,0xA7,0x8C), o3(0xE8,0xBF,0xBD),
+     o3(0xE9,0x8E,0x9A), o3(0xE7,0x97,0x9B),
+     o3(0xE9,0x80,0x9A), o3(0xE5,0xA1,0x9A),
+     o3(0xE6,0xA0,0x82), o3(0xE6,0x8E,0xB4),
+     o3(0xE6,0xA7,0xBB), o3(0xE4,0xBD,0x83),
+     o3(0xE6,0xBC,0xAC), o3(0xE6,0x9F,0x98),
+     o3(0xE8,0xBE,0xBB), o3(0xE8,0x94,0xA6),
+     o3(0xE7,0xB6,0xB4), o3(0xE9,0x8D,0x94),
+     o3(0xE6,0xA4,0xBF), o3(0xE6,0xBD,0xB0),
+     o3(0xE5,0x9D,0xAA), o3(0xE5,0xA3,0xB7),
+     o3(0xE5,0xAC,0xAC), o3(0xE7,0xB4,0xAC),
+     o3(0xE7,0x88,0xAA), o3(0xE5,0x90,0x8A),
+     o3(0xE9,0x87,0xA3), o3(0xE9,0xB6,0xB4),
+     o3(0xE4,0xBA,0xAD), o3(0xE4,0xBD,0x8E),
+     o3(0xE5,0x81,0x9C), o3(0xE5,0x81,0xB5),
+     o3(0xE5,0x89,0x83), o3(0xE8,0xB2,0x9E),
+     o3(0xE5,0x91,0x88), o3(0xE5,0xA0,0xA4),
+     o3(0xE5,0xAE,0x9A), o3(0xE5,0xB8,0x9D),
+     o3(0xE5,0xBA,0x95), o3(0xE5,0xBA,0xAD),
+     o3(0xE5,0xBB,0xB7), o3(0xE5,0xBC,0x9F),
+     o3(0xE6,0x82,0x8C), o3(0xE6,0x8A,0xB5),
+     o3(0xE6,0x8C,0xBA), o3(0xE6,0x8F,0x90),
+     o3(0xE6,0xA2,0xAF), o3(0xE6,0xB1,0x80),
+     o3(0xE7,0xA2,0x87), o3(0xE7,0xA6,0x8E),
+     o3(0xE7,0xA8,0x8B), o3(0xE7,0xB7,0xA0),
+     o3(0xE8,0x89,0x87), o3(0xE8,0xA8,0x82),
+     o3(0xE8,0xAB,0xA6), o3(0xE8,0xB9,0x84),
+     o3(0xE9,0x80,0x93),
+
+#define from_Shift_JIS_92 WORDINDEX2INFO(2550)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_92_infos,
+
+#define from_Shift_JIS_93_infos WORDINDEX2INFO(2552)
+                INVALID, o3(0xE9,0x82,0xB8),
+     o3(0xE9,0x84,0xAD), o3(0xE9,0x87,0x98),
+     o3(0xE9,0xBC,0x8E), o3(0xE6,0xB3,0xA5),
+     o3(0xE6,0x91,0x98), o3(0xE6,0x93,0xA2),
+     o3(0xE6,0x95,0xB5), o3(0xE6,0xBB,0xB4),
+     o3(0xE7,0x9A,0x84), o3(0xE7,0xAC,0x9B),
+     o3(0xE9,0x81,0xA9), o3(0xE9,0x8F,0x91),
+     o3(0xE6,0xBA,0xBA), o3(0xE5,0x93,0xB2),
+     o3(0xE5,0xBE,0xB9), o3(0xE6,0x92,0xA4),
+     o3(0xE8,0xBD,0x8D), o3(0xE8,0xBF,0xAD),
+     o3(0xE9,0x89,0x84), o3(0xE5,0x85,0xB8),
+     o3(0xE5,0xA1,0xAB), o3(0xE5,0xA4,0xA9),
+     o3(0xE5,0xB1,0x95), o3(0xE5,0xBA,0x97),
+     o3(0xE6,0xB7,0xBB), o3(0xE7,0xBA,0x8F),
+     o3(0xE7,0x94,0x9C), o3(0xE8,0xB2,0xBC),
+     o3(0xE8,0xBB,0xA2), o3(0xE9,0xA1,0x9B),
+     o3(0xE7,0x82,0xB9), o3(0xE4,0xBC,0x9D),
+     o3(0xE6,0xAE,0xBF), o3(0xE6,0xBE,0xB1),
+     o3(0xE7,0x94,0xB0), o3(0xE9,0x9B,0xBB),
+     o3(0xE5,0x85,0x8E), o3(0xE5,0x90,0x90),
+     o3(0xE5,0xA0,0xB5), o3(0xE5,0xA1,0x97),
+     o3(0xE5,0xA6,0xAC), o3(0xE5,0xB1,0xA0),
+     o3(0xE5,0xBE,0x92), o3(0xE6,0x96,0x97),
+     o3(0xE6,0x9D,0x9C), o3(0xE6,0xB8,0xA1),
+     o3(0xE7,0x99,0xBB), o3(0xE8,0x8F,0x9F),
+     o3(0xE8,0xB3,0xAD), o3(0xE9,0x80,0x94),
+     o3(0xE9,0x83,0xBD), o3(0xE9,0x8D,0x8D),
+     o3(0xE7,0xA0,0xA5), o3(0xE7,0xA0,0xBA),
+     o3(0xE5,0x8A,0xAA), o3(0xE5,0xBA,0xA6),
+     o3(0xE5,0x9C,0x9F), o3(0xE5,0xA5,0xB4),
+     o3(0xE6,0x80,0x92), o3(0xE5,0x80,0x92),
+     o3(0xE5,0x85,0x9A), o3(0xE5,0x86,0xAC),
+     o3(0xE5,0x87,0x8D), o3(0xE5,0x88,0x80),
+     o3(0xE5,0x94,0x90), o3(0xE5,0xA1,0x94),
+     o3(0xE5,0xA1,0x98), o3(0xE5,0xA5,0x97),
+     o3(0xE5,0xAE,0x95), o3(0xE5,0xB3,0xB6),
+     o3(0xE5,0xB6,0x8B), o3(0xE6,0x82,0xBC),
+     o3(0xE6,0x8A,0x95), o3(0xE6,0x90,0xAD),
+     o3(0xE6,0x9D,0xB1), o3(0xE6,0xA1,0x83),
+     o3(0xE6,0xA2,0xBC), o3(0xE6,0xA3,0x9F),
+     o3(0xE7,0x9B,0x97), o3(0xE6,0xB7,0x98),
+     o3(0xE6,0xB9,0xAF), o3(0xE6,0xB6,0x9B),
+     o3(0xE7,0x81,0xAF), o3(0xE7,0x87,0x88),
+     o3(0xE5,0xBD,0x93), o3(0xE7,0x97,0x98),
+     o3(0xE7,0xA5,0xB7), o3(0xE7,0xAD,0x89),
+     o3(0xE7,0xAD,0x94), o3(0xE7,0xAD,0x92),
+     o3(0xE7,0xB3,0x96), o3(0xE7,0xB5,0xB1),
+     o3(0xE5,0x88,0xB0), o3(0xE8,0x91,0xA3),
+     o3(0xE8,0x95,0xA9), o3(0xE8,0x97,0xA4),
+     o3(0xE8,0xA8,0x8E), o3(0xE8,0xAC,0x84),
+     o3(0xE8,0xB1,0x86), o3(0xE8,0xB8,0x8F),
+     o3(0xE9,0x80,0x83), o3(0xE9,0x80,0x8F),
+     o3(0xE9,0x90,0x99), o3(0xE9,0x99,0xB6),
+     o3(0xE9,0xA0,0xAD), o3(0xE9,0xA8,0xB0),
+     o3(0xE9,0x97,0x98), o3(0xE5,0x83,0x8D),
+     o3(0xE5,0x8B,0x95), o3(0xE5,0x90,0x8C),
+     o3(0xE5,0xA0,0x82), o3(0xE5,0xB0,0x8E),
+     o3(0xE6,0x86,0xA7), o3(0xE6,0x92,0x9E),
+     o3(0xE6,0xB4,0x9E), o3(0xE7,0x9E,0xB3),
+     o3(0xE7,0xAB,0xA5), o3(0xE8,0x83,0xB4),
+     o3(0xE8,0x90,0x84), o3(0xE9,0x81,0x93),
+     o3(0xE9,0x8A,0x85), o3(0xE5,0xB3,0xA0),
+     o3(0xE9,0xB4,0x87), o3(0xE5,0x8C,0xBF),
+     o3(0xE5,0xBE,0x97), o3(0xE5,0xBE,0xB3),
+     o3(0xE6,0xB6,0x9C), o3(0xE7,0x89,0xB9),
+     o3(0xE7,0x9D,0xA3), o3(0xE7,0xA6,0xBF),
+     o3(0xE7,0xAF,0xA4), o3(0xE6,0xAF,0x92),
+     o3(0xE7,0x8B,0xAC), o3(0xE8,0xAA,0xAD),
+     o3(0xE6,0xA0,0x83), o3(0xE6,0xA9,0xA1),
+     o3(0xE5,0x87,0xB8), o3(0xE7,0xAA,0x81),
+     o3(0xE6,0xA4,0xB4), o3(0xE5,0xB1,0x8A),
+     o3(0xE9,0xB3,0xB6), o3(0xE8,0x8B,0xAB),
+     o3(0xE5,0xAF,0x85), o3(0xE9,0x85,0x89),
+     o3(0xE7,0x80,0x9E), o3(0xE5,0x99,0xB8),
+     o3(0xE5,0xB1,0xAF), o3(0xE6,0x83,0x87),
+     o3(0xE6,0x95,0xA6), o3(0xE6,0xB2,0x8C),
+     o3(0xE8,0xB1,0x9A), o3(0xE9,0x81,0x81),
+     o3(0xE9,0xA0,0x93), o3(0xE5,0x91,0x91),
+     o3(0xE6,0x9B,0x87), o3(0xE9,0x88,0x8D),
+     o3(0xE5,0xA5,0x88), o3(0xE9,0x82,0xA3),
+     o3(0xE5,0x86,0x85), o3(0xE4,0xB9,0x8D),
+     o3(0xE5,0x87,0xAA), o3(0xE8,0x96,0x99),
+     o3(0xE8,0xAC,0x8E), o3(0xE7,0x81,0x98),
+     o3(0xE6,0x8D,0xBA), o3(0xE9,0x8D,0x8B),
+     o3(0xE6,0xA5,0xA2), o3(0xE9,0xA6,0xB4),
+     o3(0xE7,0xB8,0x84), o3(0xE7,0x95,0xB7),
+     o3(0xE5,0x8D,0x97), o3(0xE6,0xA5,0xA0),
+     o3(0xE8,0xBB,0x9F), o3(0xE9,0x9B,0xA3),
+     o3(0xE6,0xB1,0x9D), o3(0xE4,0xBA,0x8C),
+     o3(0xE5,0xB0,0xBC), o3(0xE5,0xBC,0x90),
+     o3(0xE8,0xBF,0xA9), o3(0xE5,0x8C,0x82),
+     o3(0xE8,0xB3,0x91), o3(0xE8,0x82,0x89),
+     o3(0xE8,0x99,0xB9), o3(0xE5,0xBB,0xBF),
+     o3(0xE6,0x97,0xA5), o3(0xE4,0xB9,0xB3),
+     o3(0xE5,0x85,0xA5),
+
+#define from_Shift_JIS_93 WORDINDEX2INFO(2741)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_93_infos,
+
+#define from_Shift_JIS_94_infos WORDINDEX2INFO(2743)
+                INVALID, o3(0xE5,0xA6,0x82),
+     o3(0xE5,0xB0,0xBF), o3(0xE9,0x9F,0xAE),
+     o3(0xE4,0xBB,0xBB), o3(0xE5,0xA6,0x8A),
+     o3(0xE5,0xBF,0x8D), o3(0xE8,0xAA,0x8D),
+     o3(0xE6,0xBF,0xA1), o3(0xE7,0xA6,0xB0),
+     o3(0xE7,0xA5,0xA2), o3(0xE5,0xAF,0xA7),
+     o3(0xE8,0x91,0xB1), o3(0xE7,0x8C,0xAB),
+     o3(0xE7,0x86,0xB1), o3(0xE5,0xB9,0xB4),
+     o3(0xE5,0xBF,0xB5), o3(0xE6,0x8D,0xBB),
+     o3(0xE6,0x92,0x9A), o3(0xE7,0x87,0x83),
+     o3(0xE7,0xB2,0x98), o3(0xE4,0xB9,0x83),
+     o3(0xE5,0xBB,0xBC), o3(0xE4,0xB9,0x8B),
+     o3(0xE5,0x9F,0x9C), o3(0xE5,0x9A,0xA2),
+     o3(0xE6,0x82,0xA9), o3(0xE6,0xBF,0x83),
+     o3(0xE7,0xB4,0x8D), o3(0xE8,0x83,0xBD),
+     o3(0xE8,0x84,0xB3), o3(0xE8,0x86,0xBF),
+     o3(0xE8,0xBE,0xB2), o3(0xE8,0xA6,0x97),
+     o3(0xE8,0x9A,0xA4), o3(0xE5,0xB7,0xB4),
+     o3(0xE6,0x8A,0x8A), o3(0xE6,0x92,0xAD),
+     o3(0xE8,0xA6,0x87), o3(0xE6,0x9D,0xB7),
+     o3(0xE6,0xB3,0xA2), o3(0xE6,0xB4,0xBE),
+     o3(0xE7,0x90,0xB6), o3(0xE7,0xA0,0xB4),
+     o3(0xE5,0xA9,0x86), o3(0xE7,0xBD,0xB5),
+     o3(0xE8,0x8A,0xAD), o3(0xE9,0xA6,0xAC),
+     o3(0xE4,0xBF,0xB3), o3(0xE5,0xBB,0x83),
+     o3(0xE6,0x8B,0x9D), o3(0xE6,0x8E,0x92),
+     o3(0xE6,0x95,0x97), o3(0xE6,0x9D,0xAF),
+     o3(0xE7,0x9B,0x83), o3(0xE7,0x89,0x8C),
+     o3(0xE8,0x83,0x8C), o3(0xE8,0x82,0xBA),
+     o3(0xE8,0xBC,0xA9), o3(0xE9,0x85,0x8D),
+     o3(0xE5,0x80,0x8D), o3(0xE5,0x9F,0xB9),
+     o3(0xE5,0xAA,0x92), o3(0xE6,0xA2,0x85),
+     o3(0xE6,0xA5,0xB3), o3(0xE7,0x85,0xA4),
+     o3(0xE7,0x8B,0xBD), o3(0xE8,0xB2,0xB7),
+     o3(0xE5,0xA3,0xB2), o3(0xE8,0xB3,0xA0),
+     o3(0xE9,0x99,0xAA), o3(0xE9,0x80,0x99),
+     o3(0xE8,0x9D,0xBF), o3(0xE7,0xA7,0xA4),
+     o3(0xE7,0x9F,0xA7), o3(0xE8,0x90,0xA9),
+     o3(0xE4,0xBC,0xAF), o3(0xE5,0x89,0xA5),
+     o3(0xE5,0x8D,0x9A), o3(0xE6,0x8B,0x8D),
+     o3(0xE6,0x9F,0x8F), o3(0xE6,0xB3,0x8A),
+     o3(0xE7,0x99,0xBD), o3(0xE7,0xAE,0x94),
+     o3(0xE7,0xB2,0x95), o3(0xE8,0x88,0xB6),
+     o3(0xE8,0x96,0x84), o3(0xE8,0xBF,0xAB),
+     o3(0xE6,0x9B,0x9D), o3(0xE6,0xBC,0xA0),
+     o3(0xE7,0x88,0x86), o3(0xE7,0xB8,0x9B),
+     o3(0xE8,0x8E,0xAB), o3(0xE9,0xA7,0x81),
+     o3(0xE9,0xBA,0xA6), o3(0xE5,0x87,0xBD),
+     o3(0xE7,0xAE,0xB1), o3(0xE7,0xA1,0xB2),
+     o3(0xE7,0xAE,0xB8), o3(0xE8,0x82,0x87),
+     o3(0xE7,0xAD,0x88), o3(0xE6,0xAB,0xA8),
+     o3(0xE5,0xB9,0xA1), o3(0xE8,0x82,0x8C),
+     o3(0xE7,0x95,0x91), o3(0xE7,0x95,0xA0),
+     o3(0xE5,0x85,0xAB), o3(0xE9,0x89,0xA2),
+     o3(0xE6,0xBA,0x8C), o3(0xE7,0x99,0xBA),
+     o3(0xE9,0x86,0x97), o3(0xE9,0xAB,0xAA),
+     o3(0xE4,0xBC,0x90), o3(0xE7,0xBD,0xB0),
+     o3(0xE6,0x8A,0x9C), o3(0xE7,0xAD,0x8F),
+     o3(0xE9,0x96,0xA5), o3(0xE9,0xB3,0xA9),
+     o3(0xE5,0x99,0xBA), o3(0xE5,0xA1,0x99),
+     o3(0xE8,0x9B,0xA4), o3(0xE9,0x9A,0xBC),
+     o3(0xE4,0xBC,0xB4), o3(0xE5,0x88,0xA4),
+     o3(0xE5,0x8D,0x8A), o3(0xE5,0x8F,0x8D),
+     o3(0xE5,0x8F,0x9B), o3(0xE5,0xB8,0x86),
+     o3(0xE6,0x90,0xAC), o3(0xE6,0x96,0x91),
+     o3(0xE6,0x9D,0xBF), o3(0xE6,0xB0,0xBE),
+     o3(0xE6,0xB1,0x8E), o3(0xE7,0x89,0x88),
+     o3(0xE7,0x8A,0xAF), o3(0xE7,0x8F,0xAD),
+     o3(0xE7,0x95,0x94), o3(0xE7,0xB9,0x81),
+     o3(0xE8,0x88,0xAC), o3(0xE8,0x97,0xA9),
+     o3(0xE8,0xB2,0xA9), o3(0xE7,0xAF,0x84),
+     o3(0xE9,0x87,0x86), o3(0xE7,0x85,0xA9),
+     o3(0xE9,0xA0,0x92), o3(0xE9,0xA3,0xAF),
+     o3(0xE6,0x8C,0xBD), o3(0xE6,0x99,0xA9),
+     o3(0xE7,0x95,0xAA), o3(0xE7,0x9B,0xA4),
+     o3(0xE7,0xA3,0x90), o3(0xE8,0x95,0x83),
+     o3(0xE8,0x9B,0xAE), o3(0xE5,0x8C,0xAA),
+     o3(0xE5,0x8D,0x91), o3(0xE5,0x90,0xA6),
+     o3(0xE5,0xA6,0x83), o3(0xE5,0xBA,0x87),
+     o3(0xE5,0xBD,0xBC), o3(0xE6,0x82,0xB2),
+     o3(0xE6,0x89,0x89), o3(0xE6,0x89,0xB9),
+     o3(0xE6,0x8A,0xAB), o3(0xE6,0x96,0x90),
+     o3(0xE6,0xAF,0x94), o3(0xE6,0xB3,0x8C),
+     o3(0xE7,0x96,0xB2), o3(0xE7,0x9A,0xAE),
+     o3(0xE7,0xA2,0x91), o3(0xE7,0xA7,0x98),
+     o3(0xE7,0xB7,0x8B), o3(0xE7,0xBD,0xB7),
+     o3(0xE8,0x82,0xA5), o3(0xE8,0xA2,0xAB),
+     o3(0xE8,0xAA,0xB9), o3(0xE8,0xB2,0xBB),
+     o3(0xE9,0x81,0xBF), o3(0xE9,0x9D,0x9E),
+     o3(0xE9,0xA3,0x9B), o3(0xE6,0xA8,0x8B),
+     o3(0xE7,0xB0,0xB8), o3(0xE5,0x82,0x99),
+     o3(0xE5,0xB0,0xBE), o3(0xE5,0xBE,0xAE),
+     o3(0xE6,0x9E,0x87), o3(0xE6,0xAF,0x98),
+     o3(0xE7,0x90,0xB5), o3(0xE7,0x9C,0x89),
+     o3(0xE7,0xBE,0x8E),
+
+#define from_Shift_JIS_94 WORDINDEX2INFO(2932)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_94_infos,
+
+#define from_Shift_JIS_95_infos WORDINDEX2INFO(2934)
+                INVALID, o3(0xE9,0xBC,0xBB),
+     o3(0xE6,0x9F,0x8A), o3(0xE7,0xA8,0x97),
+     o3(0xE5,0x8C,0xB9), o3(0xE7,0x96,0x8B),
+     o3(0xE9,0xAB,0xAD), o3(0xE5,0xBD,0xA6),
+     o3(0xE8,0x86,0x9D), o3(0xE8,0x8F,0xB1),
+     o3(0xE8,0x82,0x98), o3(0xE5,0xBC,0xBC),
+     o3(0xE5,0xBF,0x85), o3(0xE7,0x95,0xA2),
+     o3(0xE7,0xAD,0x86), o3(0xE9,0x80,0xBC),
+     o3(0xE6,0xA1,0xA7), o3(0xE5,0xA7,0xAB),
+     o3(0xE5,0xAA,0x9B), o3(0xE7,0xB4,0x90),
+     o3(0xE7,0x99,0xBE), o3(0xE8,0xAC,0xAC),
+     o3(0xE4,0xBF,0xB5), o3(0xE5,0xBD,0xAA),
+     o3(0xE6,0xA8,0x99), o3(0xE6,0xB0,0xB7),
+     o3(0xE6,0xBC,0x82), o3(0xE7,0x93,0xA2),
+     o3(0xE7,0xA5,0xA8), o3(0xE8,0xA1,0xA8),
+     o3(0xE8,0xA9,0x95), o3(0xE8,0xB1,0xB9),
+     o3(0xE5,0xBB,0x9F), o3(0xE6,0x8F,0x8F),
+     o3(0xE7,0x97,0x85), o3(0xE7,0xA7,0x92),
+     o3(0xE8,0x8B,0x97), o3(0xE9,0x8C,0xA8),
+     o3(0xE9,0x8B,0xB2), o3(0xE8,0x92,0x9C),
+     o3(0xE8,0x9B,0xAD), o3(0xE9,0xB0,0xAD),
+     o3(0xE5,0x93,0x81), o3(0xE5,0xBD,0xAC),
+     o3(0xE6,0x96,0x8C), o3(0xE6,0xB5,0x9C),
+     o3(0xE7,0x80,0x95), o3(0xE8,0xB2,0xA7),
+     o3(0xE8,0xB3,0x93), o3(0xE9,0xA0,0xBB),
+     o3(0xE6,0x95,0x8F), o3(0xE7,0x93,0xB6),
+     o3(0xE4,0xB8,0x8D), o3(0xE4,0xBB,0x98),
+     o3(0xE5,0x9F,0xA0), o3(0xE5,0xA4,0xAB),
+     o3(0xE5,0xA9,0xA6), o3(0xE5,0xAF,0x8C),
+     o3(0xE5,0x86,0xA8), o3(0xE5,0xB8,0x83),
+     o3(0xE5,0xBA,0x9C), o3(0xE6,0x80,0x96),
+     o3(0xE6,0x89,0xB6), o3(0xE6,0x95,0xB7),
+     o3(0xE6,0x96,0xA7), o3(0xE6,0x99,0xAE),
+     o3(0xE6,0xB5,0xAE), o3(0xE7,0x88,0xB6),
+     o3(0xE7,0xAC,0xA6), o3(0xE8,0x85,0x90),
+     o3(0xE8,0x86,0x9A), o3(0xE8,0x8A,0x99),
+     o3(0xE8,0xAD,0x9C), o3(0xE8,0xB2,0xA0),
+     o3(0xE8,0xB3,0xA6), o3(0xE8,0xB5,0xB4),
+     o3(0xE9,0x98,0x9C), o3(0xE9,0x99,0x84),
+     o3(0xE4,0xBE,0xAE), o3(0xE6,0x92,0xAB),
+     o3(0xE6,0xAD,0xA6), o3(0xE8,0x88,0x9E),
+     o3(0xE8,0x91,0xA1), o3(0xE8,0x95,0xAA),
+     o3(0xE9,0x83,0xA8), o3(0xE5,0xB0,0x81),
+     o3(0xE6,0xA5,0x93), o3(0xE9,0xA2,0xA8),
+     o3(0xE8,0x91,0xBA), o3(0xE8,0x95,0x97),
+     o3(0xE4,0xBC,0x8F), o3(0xE5,0x89,0xAF),
+     o3(0xE5,0xBE,0xA9), o3(0xE5,0xB9,0x85),
+     o3(0xE6,0x9C,0x8D), o3(0xE7,0xA6,0x8F),
+     o3(0xE8,0x85,0xB9), o3(0xE8,0xA4,0x87),
+     o3(0xE8,0xA6,0x86), o3(0xE6,0xB7,0xB5),
+     o3(0xE5,0xBC,0x97), o3(0xE6,0x89,0x95),
+     o3(0xE6,0xB2,0xB8), o3(0xE4,0xBB,0x8F),
+     o3(0xE7,0x89,0xA9), o3(0xE9,0xAE,0x92),
+     o3(0xE5,0x88,0x86), o3(0xE5,0x90,0xBB),
+     o3(0xE5,0x99,0xB4), o3(0xE5,0xA2,0xB3),
+     o3(0xE6,0x86,0xA4), o3(0xE6,0x89,0xAE),
+     o3(0xE7,0x84,0x9A), o3(0xE5,0xA5,0xAE),
+     o3(0xE7,0xB2,0x89), o3(0xE7,0xB3,0x9E),
+     o3(0xE7,0xB4,0x9B), o3(0xE9,0x9B,0xB0),
+     o3(0xE6,0x96,0x87), o3(0xE8,0x81,0x9E),
+     o3(0xE4,0xB8,0x99), o3(0xE4,0xBD,0xB5),
+     o3(0xE5,0x85,0xB5), o3(0xE5,0xA1,0x80),
+     o3(0xE5,0xB9,0xA3), o3(0xE5,0xB9,0xB3),
+     o3(0xE5,0xBC,0x8A), o3(0xE6,0x9F,0x84),
+     o3(0xE4,0xB8,0xA6), o3(0xE8,0x94,0xBD),
+     o3(0xE9,0x96,0x89), o3(0xE9,0x99,0x9B),
+     o3(0xE7,0xB1,0xB3), o3(0xE9,0xA0,0x81),
+     o3(0xE5,0x83,0xBB), o3(0xE5,0xA3,0x81),
+     o3(0xE7,0x99,0x96), o3(0xE7,0xA2,0xA7),
+     o3(0xE5,0x88,0xA5), o3(0xE7,0x9E,0xA5),
+     o3(0xE8,0x94,0x91), o3(0xE7,0xAE,0x86),
+     o3(0xE5,0x81,0x8F), o3(0xE5,0xA4,0x89),
+     o3(0xE7,0x89,0x87), o3(0xE7,0xAF,0x87),
+     o3(0xE7,0xB7,0xA8), o3(0xE8,0xBE,0xBA),
+     o3(0xE8,0xBF,0x94), o3(0xE9,0x81,0x8D),
+     o3(0xE4,0xBE,0xBF), o3(0xE5,0x8B,0x89),
+     o3(0xE5,0xA8,0xA9), o3(0xE5,0xBC,0x81),
+     o3(0xE9,0x9E,0xAD), o3(0xE4,0xBF,0x9D),
+     o3(0xE8,0x88,0x97), o3(0xE9,0x8B,0xAA),
+     o3(0xE5,0x9C,0x83), o3(0xE6,0x8D,0x95),
+     o3(0xE6,0xAD,0xA9), o3(0xE7,0x94,0xAB),
+     o3(0xE8,0xA3,0x9C), o3(0xE8,0xBC,0x94),
+     o3(0xE7,0xA9,0x82), o3(0xE5,0x8B,0x9F),
+     o3(0xE5,0xA2,0x93), o3(0xE6,0x85,0x95),
+     o3(0xE6,0x88,0x8A), o3(0xE6,0x9A,0xAE),
+     o3(0xE6,0xAF,0x8D), o3(0xE7,0xB0,0xBF),
+     o3(0xE8,0x8F,0xA9), o3(0xE5,0x80,0xA3),
+     o3(0xE4,0xBF,0xB8), o3(0xE5,0x8C,0x85),
+     o3(0xE5,0x91,0x86), o3(0xE5,0xA0,0xB1),
+     o3(0xE5,0xA5,0x89), o3(0xE5,0xAE,0x9D),
+     o3(0xE5,0xB3,0xB0), o3(0xE5,0xB3,0xAF),
+     o3(0xE5,0xB4,0xA9), o3(0xE5,0xBA,0x96),
+     o3(0xE6,0x8A,0xB1), o3(0xE6,0x8D,0xA7),
+     o3(0xE6,0x94,0xBE), o3(0xE6,0x96,0xB9),
+     o3(0xE6,0x9C,0x8B),
+
+#define from_Shift_JIS_95 WORDINDEX2INFO(3123)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_95_infos,
+
+#define from_Shift_JIS_96_infos WORDINDEX2INFO(3125)
+                INVALID, o3(0xE6,0xB3,0x95),
+     o3(0xE6,0xB3,0xA1), o3(0xE7,0x83,0xB9),
+     o3(0xE7,0xA0,0xB2), o3(0xE7,0xB8,0xAB),
+     o3(0xE8,0x83,0x9E), o3(0xE8,0x8A,0xB3),
+     o3(0xE8,0x90,0x8C), o3(0xE8,0x93,0xAC),
+     o3(0xE8,0x9C,0x82), o3(0xE8,0xA4,0x92),
+     o3(0xE8,0xA8,0xAA), o3(0xE8,0xB1,0x8A),
+     o3(0xE9,0x82,0xA6), o3(0xE9,0x8B,0x92),
+     o3(0xE9,0xA3,0xBD), o3(0xE9,0xB3,0xB3),
+     o3(0xE9,0xB5,0xAC), o3(0xE4,0xB9,0x8F),
+     o3(0xE4,0xBA,0xA1), o3(0xE5,0x82,0x8D),
+     o3(0xE5,0x89,0x96), o3(0xE5,0x9D,0x8A),
+     o3(0xE5,0xA6,0xA8), o3(0xE5,0xB8,0xBD),
+     o3(0xE5,0xBF,0x98), o3(0xE5,0xBF,0x99),
+     o3(0xE6,0x88,0xBF), o3(0xE6,0x9A,0xB4),
+     o3(0xE6,0x9C,0x9B), o3(0xE6,0x9F,0x90),
+     o3(0xE6,0xA3,0x92), o3(0xE5,0x86,0x92),
+     o3(0xE7,0xB4,0xA1), o3(0xE8,0x82,0xAA),
+     o3(0xE8,0x86,0xA8), o3(0xE8,0xAC,0x80),
+     o3(0xE8,0xB2,0x8C), o3(0xE8,0xB2,0xBF),
+     o3(0xE9,0x89,0xBE), o3(0xE9,0x98,0xB2),
+     o3(0xE5,0x90,0xA0), o3(0xE9,0xA0,0xAC),
+     o3(0xE5,0x8C,0x97), o3(0xE5,0x83,0x95),
+     o3(0xE5,0x8D,0x9C), o3(0xE5,0xA2,0xA8),
+     o3(0xE6,0x92,0xB2), o3(0xE6,0x9C,0xB4),
+     o3(0xE7,0x89,0xA7), o3(0xE7,0x9D,0xA6),
+     o3(0xE7,0xA9,0x86), o3(0xE9,0x87,0xA6),
+     o3(0xE5,0x8B,0x83), o3(0xE6,0xB2,0xA1),
+     o3(0xE6,0xAE,0x86), o3(0xE5,0xA0,0x80),
+     o3(0xE5,0xB9,0x8C), o3(0xE5,0xA5,0x94),
+     o3(0xE6,0x9C,0xAC), o3(0xE7,0xBF,0xBB),
+     o3(0xE5,0x87,0xA1), o3(0xE7,0x9B,0x86),
+     o3(0xE6,0x91,0xA9), o3(0xE7,0xA3,0xA8),
+     o3(0xE9,0xAD,0x94), o3(0xE9,0xBA,0xBB),
+     o3(0xE5,0x9F,0x8B), o3(0xE5,0xA6,0xB9),
+     o3(0xE6,0x98,0xA7), o3(0xE6,0x9E,0x9A),
+     o3(0xE6,0xAF,0x8E), o3(0xE5,0x93,0xA9),
+     o3(0xE6,0xA7,0x99), o3(0xE5,0xB9,0x95),
+     o3(0xE8,0x86,0x9C), o3(0xE6,0x9E,0x95),
+     o3(0xE9,0xAE,0xAA), o3(0xE6,0x9F,0xBE),
+     o3(0xE9,0xB1,0x92), o3(0xE6,0xA1,0x9D),
+     o3(0xE4,0xBA,0xA6), o3(0xE4,0xBF,0xA3),
+     o3(0xE5,0x8F,0x88), o3(0xE6,0x8A,0xB9),
+     o3(0xE6,0x9C,0xAB), o3(0xE6,0xB2,0xAB),
+     o3(0xE8,0xBF,0x84), o3(0xE4,0xBE,0xAD),
+     o3(0xE7,0xB9,0xAD), o3(0xE9,0xBA,0xBF),
+     o3(0xE4,0xB8,0x87), o3(0xE6,0x85,0xA2),
+     o3(0xE6,0xBA,0x80), o3(0xE6,0xBC,0xAB),
+     o3(0xE8,0x94,0x93), o3(0xE5,0x91,0xB3),
+     o3(0xE6,0x9C,0xAA), o3(0xE9,0xAD,0x85),
+     o3(0xE5,0xB7,0xB3), o3(0xE7,0xAE,0x95),
+     o3(0xE5,0xB2,0xAC), o3(0xE5,0xAF,0x86),
+     o3(0xE8,0x9C,0x9C), o3(0xE6,0xB9,0x8A),
+     o3(0xE8,0x93,0x91), o3(0xE7,0xA8,0x94),
+     o3(0xE8,0x84,0x88), o3(0xE5,0xA6,0x99),
+     o3(0xE7,0xB2,0x8D), o3(0xE6,0xB0,0x91),
+     o3(0xE7,0x9C,0xA0), o3(0xE5,0x8B,0x99),
+     o3(0xE5,0xA4,0xA2), o3(0xE7,0x84,0xA1),
+     o3(0xE7,0x89,0x9F), o3(0xE7,0x9F,0x9B),
+     o3(0xE9,0x9C,0xA7), o3(0xE9,0xB5,0xA1),
+     o3(0xE6,0xA4,0x8B), o3(0xE5,0xA9,0xBF),
+     o3(0xE5,0xA8,0x98), o3(0xE5,0x86,0xA5),
+     o3(0xE5,0x90,0x8D), o3(0xE5,0x91,0xBD),
+     o3(0xE6,0x98,0x8E), o3(0xE7,0x9B,0x9F),
+     o3(0xE8,0xBF,0xB7), o3(0xE9,0x8A,0x98),
+     o3(0xE9,0xB3,0xB4), o3(0xE5,0xA7,0xAA),
+     o3(0xE7,0x89,0x9D), o3(0xE6,0xBB,0x85),
+     o3(0xE5,0x85,0x8D), o3(0xE6,0xA3,0x89),
+     o3(0xE7,0xB6,0xBF), o3(0xE7,0xB7,0xAC),
+     o3(0xE9,0x9D,0xA2), o3(0xE9,0xBA,0xBA),
+     o3(0xE6,0x91,0xB8), o3(0xE6,0xA8,0xA1),
+     o3(0xE8,0x8C,0x82), o3(0xE5,0xA6,0x84),
+     o3(0xE5,0xAD,0x9F), o3(0xE6,0xAF,0x9B),
+     o3(0xE7,0x8C,0x9B), o3(0xE7,0x9B,0xB2),
+     o3(0xE7,0xB6,0xB2), o3(0xE8,0x80,0x97),
+     o3(0xE8,0x92,0x99), o3(0xE5,0x84,0xB2),
+     o3(0xE6,0x9C,0xA8), o3(0xE9,0xBB,0x99),
+     o3(0xE7,0x9B,0xAE), o3(0xE6,0x9D,0xA2),
+     o3(0xE5,0x8B,0xBF), o3(0xE9,0xA4,0x85),
+     o3(0xE5,0xB0,0xA4), o3(0xE6,0x88,0xBB),
+     o3(0xE7,0xB1,0xBE), o3(0xE8,0xB2,0xB0),
+     o3(0xE5,0x95,0x8F), o3(0xE6,0x82,0xB6),
+     o3(0xE7,0xB4,0x8B), o3(0xE9,0x96,0x80),
+     o3(0xE5,0x8C,0x81), o3(0xE4,0xB9,0x9F),
+     o3(0xE5,0x86,0xB6), o3(0xE5,0xA4,0x9C),
+     o3(0xE7,0x88,0xBA), o3(0xE8,0x80,0xB6),
+     o3(0xE9,0x87,0x8E), o3(0xE5,0xBC,0xA5),
+     o3(0xE7,0x9F,0xA2), o3(0xE5,0x8E,0x84),
+     o3(0xE5,0xBD,0xB9), o3(0xE7,0xB4,0x84),
+     o3(0xE8,0x96,0xAC), o3(0xE8,0xA8,0xB3),
+     o3(0xE8,0xBA,0x8D), o3(0xE9,0x9D,0x96),
+     o3(0xE6,0x9F,0xB3), o3(0xE8,0x96,0xAE),
+     o3(0xE9,0x91,0x93), o3(0xE6,0x84,0x89),
+     o3(0xE6,0x84,0x88), o3(0xE6,0xB2,0xB9),
+     o3(0xE7,0x99,0x92),
+
+#define from_Shift_JIS_96 WORDINDEX2INFO(3314)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_96_infos,
+
+#define from_Shift_JIS_97_infos WORDINDEX2INFO(3316)
+                INVALID, o3(0xE8,0xAB,0xAD),
+     o3(0xE8,0xBC,0xB8), o3(0xE5,0x94,0xAF),
+     o3(0xE4,0xBD,0x91), o3(0xE5,0x84,0xAA),
+     o3(0xE5,0x8B,0x87), o3(0xE5,0x8F,0x8B),
+     o3(0xE5,0xAE,0xA5), o3(0xE5,0xB9,0xBD),
+     o3(0xE6,0x82,0xA0), o3(0xE6,0x86,0x82),
+     o3(0xE6,0x8F,0x96), o3(0xE6,0x9C,0x89),
+     o3(0xE6,0x9F,0x9A), o3(0xE6,0xB9,0xA7),
+     o3(0xE6,0xB6,0x8C), o3(0xE7,0x8C,0xB6),
+     o3(0xE7,0x8C,0xB7), o3(0xE7,0x94,0xB1),
+     o3(0xE7,0xA5,0x90), o3(0xE8,0xA3,0x95),
+     o3(0xE8,0xAA,0x98), o3(0xE9,0x81,0x8A),
+     o3(0xE9,0x82,0x91), o3(0xE9,0x83,0xB5),
+     o3(0xE9,0x9B,0x84), o3(0xE8,0x9E,0x8D),
+     o3(0xE5,0xA4,0x95), o3(0xE4,0xBA,0x88),
+     o3(0xE4,0xBD,0x99), o3(0xE4,0xB8,0x8E),
+     o3(0xE8,0xAA,0x89), o3(0xE8,0xBC,0xBF),
+     o3(0xE9,0xA0,0x90), o3(0xE5,0x82,0xAD),
+     o3(0xE5,0xB9,0xBC), o3(0xE5,0xA6,0x96),
+     o3(0xE5,0xAE,0xB9), o3(0xE5,0xBA,0xB8),
+     o3(0xE6,0x8F,0x9A), o3(0xE6,0x8F,0xBA),
+     o3(0xE6,0x93,0x81), o3(0xE6,0x9B,0x9C),
+     o3(0xE6,0xA5,0x8A), o3(0xE6,0xA7,0x98),
+     o3(0xE6,0xB4,0x8B), o3(0xE6,0xBA,0xB6),
+     o3(0xE7,0x86,0x94), o3(0xE7,0x94,0xA8),
+     o3(0xE7,0xAA,0xAF), o3(0xE7,0xBE,0x8A),
+     o3(0xE8,0x80,0x80), o3(0xE8,0x91,0x89),
+     o3(0xE8,0x93,0x89), o3(0xE8,0xA6,0x81),
+     o3(0xE8,0xAC,0xA1), o3(0xE8,0xB8,0x8A),
+     o3(0xE9,0x81,0xA5), o3(0xE9,0x99,0xBD),
+     o3(0xE9,0xA4,0x8A), o3(0xE6,0x85,0xBE),
+     o3(0xE6,0x8A,0x91), o3(0xE6,0xAC,0xB2),
+     o3(0xE6,0xB2,0x83), o3(0xE6,0xB5,0xB4),
+     o3(0xE7,0xBF,0x8C), o3(0xE7,0xBF,0xBC),
+     o3(0xE6,0xB7,0x80), o3(0xE7,0xBE,0x85),
+     o3(0xE8,0x9E,0xBA), o3(0xE8,0xA3,0xB8),
+     o3(0xE6,0x9D,0xA5), o3(0xE8,0x8E,0xB1),
+     o3(0xE9,0xA0,0xBC), o3(0xE9,0x9B,0xB7),
+     o3(0xE6,0xB4,0x9B), o3(0xE7,0xB5,0xA1),
+     o3(0xE8,0x90,0xBD), o3(0xE9,0x85,0xAA),
+     o3(0xE4,0xB9,0xB1), o3(0xE5,0x8D,0xB5),
+     o3(0xE5,0xB5,0x90), o3(0xE6,0xAC,0x84),
+     o3(0xE6,0xBF,0xAB), o3(0xE8,0x97,0x8D),
+     o3(0xE8,0x98,0xAD), o3(0xE8,0xA6,0xA7),
+     o3(0xE5,0x88,0xA9), o3(0xE5,0x90,0x8F),
+     o3(0xE5,0xB1,0xA5), o3(0xE6,0x9D,0x8E),
+     o3(0xE6,0xA2,0xA8), o3(0xE7,0x90,0x86),
+     o3(0xE7,0x92,0x83), o3(0xE7,0x97,0xA2),
+     o3(0xE8,0xA3,0x8F), o3(0xE8,0xA3,0xA1),
+     o3(0xE9,0x87,0x8C), o3(0xE9,0x9B,0xA2),
+     o3(0xE9,0x99,0xB8), o3(0xE5,0xBE,0x8B),
+     o3(0xE7,0x8E,0x87), o3(0xE7,0xAB,0x8B),
+     o3(0xE8,0x91,0x8E), o3(0xE6,0x8E,0xA0),
+     o3(0xE7,0x95,0xA5), o3(0xE5,0x8A,0x89),
+     o3(0xE6,0xB5,0x81), o3(0xE6,0xBA,0x9C),
+     o3(0xE7,0x90,0x89), o3(0xE7,0x95,0x99),
+     o3(0xE7,0xA1,0xAB), o3(0xE7,0xB2,0x92),
+     o3(0xE9,0x9A,0x86), o3(0xE7,0xAB,0x9C),
+     o3(0xE9,0xBE,0x8D), o3(0xE4,0xBE,0xB6),
+     o3(0xE6,0x85,0xAE), o3(0xE6,0x97,0x85),
+     o3(0xE8,0x99,0x9C), o3(0xE4,0xBA,0x86),
+     o3(0xE4,0xBA,0xAE), o3(0xE5,0x83,0x9A),
+     o3(0xE4,0xB8,0xA1), o3(0xE5,0x87,0x8C),
+     o3(0xE5,0xAF,0xAE), o3(0xE6,0x96,0x99),
+     o3(0xE6,0xA2,0x81), o3(0xE6,0xB6,0xBC),
+     o3(0xE7,0x8C,0x9F), o3(0xE7,0x99,0x82),
+     o3(0xE7,0x9E,0xAD), o3(0xE7,0xA8,0x9C),
+     o3(0xE7,0xB3,0xA7), o3(0xE8,0x89,0xAF),
+     o3(0xE8,0xAB,0x92), o3(0xE9,0x81,0xBC),
+     o3(0xE9,0x87,0x8F), o3(0xE9,0x99,0xB5),
+     o3(0xE9,0xA0,0x98), o3(0xE5,0x8A,0x9B),
+     o3(0xE7,0xB7,0x91), o3(0xE5,0x80,0xAB),
+     o3(0xE5,0x8E,0x98), o3(0xE6,0x9E,0x97),
+     o3(0xE6,0xB7,0x8B), o3(0xE7,0x87,0x90),
+     o3(0xE7,0x90,0xB3), o3(0xE8,0x87,0xA8),
+     o3(0xE8,0xBC,0xAA), o3(0xE9,0x9A,0xA3),
+     o3(0xE9,0xB1,0x97), o3(0xE9,0xBA,0x9F),
+     o3(0xE7,0x91,0xA0), o3(0xE5,0xA1,0x81),
+     o3(0xE6,0xB6,0x99), o3(0xE7,0xB4,0xAF),
+     o3(0xE9,0xA1,0x9E), o3(0xE4,0xBB,0xA4),
+     o3(0xE4,0xBC,0xB6), o3(0xE4,0xBE,0x8B),
+     o3(0xE5,0x86,0xB7), o3(0xE5,0x8A,0xB1),
+     o3(0xE5,0xB6,0xBA), o3(0xE6,0x80,0x9C),
+     o3(0xE7,0x8E,0xB2), o3(0xE7,0xA4,0xBC),
+     o3(0xE8,0x8B,0x93), o3(0xE9,0x88,0xB4),
+     o3(0xE9,0x9A,0xB7), o3(0xE9,0x9B,0xB6),
+     o3(0xE9,0x9C,0x8A), o3(0xE9,0xBA,0x97),
+     o3(0xE9,0xBD,0xA2), o3(0xE6,0x9A,0xA6),
+     o3(0xE6,0xAD,0xB4), o3(0xE5,0x88,0x97),
+     o3(0xE5,0x8A,0xA3), o3(0xE7,0x83,0x88),
+     o3(0xE8,0xA3,0x82), o3(0xE5,0xBB,0x89),
+     o3(0xE6,0x81,0x8B), o3(0xE6,0x86,0x90),
+     o3(0xE6,0xBC,0xA3), o3(0xE7,0x85,0x89),
+     o3(0xE7,0xB0,0xBE), o3(0xE7,0xB7,0xB4),
+     o3(0xE8,0x81,0xAF),
+
+#define from_Shift_JIS_97 WORDINDEX2INFO(3505)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_97_infos,
+
+#define from_Shift_JIS_98_infos WORDINDEX2INFO(3507)
+                INVALID, o3(0xE8,0x93,0xAE),
+     o3(0xE9,0x80,0xA3), o3(0xE9,0x8C,0xAC),
+     o3(0xE5,0x91,0x82), o3(0xE9,0xAD,0xAF),
+     o3(0xE6,0xAB,0x93), o3(0xE7,0x82,0x89),
+     o3(0xE8,0xB3,0x82), o3(0xE8,0xB7,0xAF),
+     o3(0xE9,0x9C,0xB2), o3(0xE5,0x8A,0xB4),
+     o3(0xE5,0xA9,0x81), o3(0xE5,0xBB,0x8A),
+     o3(0xE5,0xBC,0x84), o3(0xE6,0x9C,0x97),
+     o3(0xE6,0xA5,0xBC), o3(0xE6,0xA6,0x94),
+     o3(0xE6,0xB5,0xAA), o3(0xE6,0xBC,0x8F),
+     o3(0xE7,0x89,0xA2), o3(0xE7,0x8B,0xBC),
+     o3(0xE7,0xAF,0xAD), o3(0xE8,0x80,0x81),
+     o3(0xE8,0x81,0xBE), o3(0xE8,0x9D,0x8B),
+     o3(0xE9,0x83,0x8E), o3(0xE5,0x85,0xAD),
+     o3(0xE9,0xBA,0x93), o3(0xE7,0xA6,0x84),
+     o3(0xE8,0x82,0x8B), o3(0xE9,0x8C,0xB2),
+     o3(0xE8,0xAB,0x96), o3(0xE5,0x80,0xAD),
+     o3(0xE5,0x92,0x8C), o3(0xE8,0xA9,0xB1),
+     o3(0xE6,0xAD,0xAA), o3(0xE8,0xB3,0x84),
+     o3(0xE8,0x84,0x87), o3(0xE6,0x83,0x91),
+     o3(0xE6,0x9E,0xA0), o3(0xE9,0xB7,0xB2),
+     o3(0xE4,0xBA,0x99), o3(0xE4,0xBA,0x98),
+     o3(0xE9,0xB0,0x90), o3(0xE8,0xA9,0xAB),
+     o3(0xE8,0x97,0x81), o3(0xE8,0x95,0xA8),
+     o3(0xE6,0xA4,0x80), o3(0xE6,0xB9,0xBE),
+     o3(0xE7,0xA2,0x97), o3(0xE8,0x85,0x95),
+                  UNDEF, o3(0xE5,0xBC,0x8C),
+     o3(0xE4,0xB8,0x90), o3(0xE4,0xB8,0x95),
+     o3(0xE4,0xB8,0xAA), o3(0xE4,0xB8,0xB1),
+     o3(0xE4,0xB8,0xB6), o3(0xE4,0xB8,0xBC),
+     o3(0xE4,0xB8,0xBF), o3(0xE4,0xB9,0x82),
+     o3(0xE4,0xB9,0x96), o3(0xE4,0xB9,0x98),
+     o3(0xE4,0xBA,0x82), o3(0xE4,0xBA,0x85),
+     o3(0xE8,0xB1,0xAB), o3(0xE4,0xBA,0x8A),
+     o3(0xE8,0x88,0x92), o3(0xE5,0xBC,0x8D),
+     o3(0xE4,0xBA,0x8E), o3(0xE4,0xBA,0x9E),
+     o3(0xE4,0xBA,0x9F), o3(0xE4,0xBA,0xA0),
+     o3(0xE4,0xBA,0xA2), o3(0xE4,0xBA,0xB0),
+     o3(0xE4,0xBA,0xB3), o3(0xE4,0xBA,0xB6),
+     o3(0xE4,0xBB,0x8E), o3(0xE4,0xBB,0x8D),
+     o3(0xE4,0xBB,0x84), o3(0xE4,0xBB,0x86),
+     o3(0xE4,0xBB,0x82), o3(0xE4,0xBB,0x97),
+     o3(0xE4,0xBB,0x9E), o3(0xE4,0xBB,0xAD),
+     o3(0xE4,0xBB,0x9F), o3(0xE4,0xBB,0xB7),
+     o3(0xE4,0xBC,0x89), o3(0xE4,0xBD,0x9A),
+     o3(0xE4,0xBC,0xB0), o3(0xE4,0xBD,0x9B),
+     o3(0xE4,0xBD,0x9D), o3(0xE4,0xBD,0x97),
+     o3(0xE4,0xBD,0x87), o3(0xE4,0xBD,0xB6),
+     o3(0xE4,0xBE,0x88), o3(0xE4,0xBE,0x8F),
+     o3(0xE4,0xBE,0x98), o3(0xE4,0xBD,0xBB),
+     o3(0xE4,0xBD,0xA9), o3(0xE4,0xBD,0xB0),
+     o3(0xE4,0xBE,0x91), o3(0xE4,0xBD,0xAF),
+     o3(0xE4,0xBE,0x86), o3(0xE4,0xBE,0x96),
+     o3(0xE5,0x84,0x98), o3(0xE4,0xBF,0x94),
+     o3(0xE4,0xBF,0x9F), o3(0xE4,0xBF,0x8E),
+     o3(0xE4,0xBF,0x98), o3(0xE4,0xBF,0x9B),
+     o3(0xE4,0xBF,0x91), o3(0xE4,0xBF,0x9A),
+     o3(0xE4,0xBF,0x90), o3(0xE4,0xBF,0xA4),
+     o3(0xE4,0xBF,0xA5), o3(0xE5,0x80,0x9A),
+     o3(0xE5,0x80,0xA8), o3(0xE5,0x80,0x94),
+     o3(0xE5,0x80,0xAA), o3(0xE5,0x80,0xA5),
+     o3(0xE5,0x80,0x85), o3(0xE4,0xBC,0x9C),
+     o3(0xE4,0xBF,0xB6), o3(0xE5,0x80,0xA1),
+     o3(0xE5,0x80,0xA9), o3(0xE5,0x80,0xAC),
+     o3(0xE4,0xBF,0xBE), o3(0xE4,0xBF,0xAF),
+     o3(0xE5,0x80,0x91), o3(0xE5,0x80,0x86),
+     o3(0xE5,0x81,0x83), o3(0xE5,0x81,0x87),
+     o3(0xE6,0x9C,0x83), o3(0xE5,0x81,0x95),
+     o3(0xE5,0x81,0x90), o3(0xE5,0x81,0x88),
+     o3(0xE5,0x81,0x9A), o3(0xE5,0x81,0x96),
+     o3(0xE5,0x81,0xAC), o3(0xE5,0x81,0xB8),
+     o3(0xE5,0x82,0x80), o3(0xE5,0x82,0x9A),
+     o3(0xE5,0x82,0x85), o3(0xE5,0x82,0xB4),
+     o3(0xE5,0x82,0xB2),
+
+#define from_Shift_JIS_98 WORDINDEX2INFO(3654)
+    from_Shift_JIS_98_offsets,
+    from_Shift_JIS_98_infos,
+
+#define from_Shift_JIS_99_infos WORDINDEX2INFO(3656)
+                INVALID, o3(0xE5,0x83,0x89),
+     o3(0xE5,0x83,0x8A), o3(0xE5,0x82,0xB3),
+     o3(0xE5,0x83,0x82), o3(0xE5,0x83,0x96),
+     o3(0xE5,0x83,0x9E), o3(0xE5,0x83,0xA5),
+     o3(0xE5,0x83,0xAD), o3(0xE5,0x83,0xA3),
+     o3(0xE5,0x83,0xAE), o3(0xE5,0x83,0xB9),
+     o3(0xE5,0x83,0xB5), o3(0xE5,0x84,0x89),
+     o3(0xE5,0x84,0x81), o3(0xE5,0x84,0x82),
+     o3(0xE5,0x84,0x96), o3(0xE5,0x84,0x95),
+     o3(0xE5,0x84,0x94), o3(0xE5,0x84,0x9A),
+     o3(0xE5,0x84,0xA1), o3(0xE5,0x84,0xBA),
+     o3(0xE5,0x84,0xB7), o3(0xE5,0x84,0xBC),
+     o3(0xE5,0x84,0xBB), o3(0xE5,0x84,0xBF),
+     o3(0xE5,0x85,0x80), o3(0xE5,0x85,0x92),
+     o3(0xE5,0x85,0x8C), o3(0xE5,0x85,0x94),
+     o3(0xE5,0x85,0xA2), o3(0xE7,0xAB,0xB8),
+     o3(0xE5,0x85,0xA9), o3(0xE5,0x85,0xAA),
+     o3(0xE5,0x85,0xAE), o3(0xE5,0x86,0x80),
+     o3(0xE5,0x86,0x82), o3(0xE5,0x9B,0x98),
+     o3(0xE5,0x86,0x8C), o3(0xE5,0x86,0x89),
+     o3(0xE5,0x86,0x8F), o3(0xE5,0x86,0x91),
+     o3(0xE5,0x86,0x93), o3(0xE5,0x86,0x95),
+     o3(0xE5,0x86,0x96), o3(0xE5,0x86,0xA4),
+     o3(0xE5,0x86,0xA6), o3(0xE5,0x86,0xA2),
+     o3(0xE5,0x86,0xA9), o3(0xE5,0x86,0xAA),
+     o3(0xE5,0x86,0xAB), o3(0xE5,0x86,0xB3),
+     o3(0xE5,0x86,0xB1), o3(0xE5,0x86,0xB2),
+     o3(0xE5,0x86,0xB0), o3(0xE5,0x86,0xB5),
+     o3(0xE5,0x86,0xBD), o3(0xE5,0x87,0x85),
+     o3(0xE5,0x87,0x89), o3(0xE5,0x87,0x9B),
+     o3(0xE5,0x87,0xA0), o3(0xE8,0x99,0x95),
+     o3(0xE5,0x87,0xA9), o3(0xE5,0x87,0xAD),
+     o3(0xE5,0x87,0xB0), o3(0xE5,0x87,0xB5),
+     o3(0xE5,0x87,0xBE), o3(0xE5,0x88,0x84),
+     o3(0xE5,0x88,0x8B), o3(0xE5,0x88,0x94),
+     o3(0xE5,0x88,0x8E), o3(0xE5,0x88,0xA7),
+     o3(0xE5,0x88,0xAA), o3(0xE5,0x88,0xAE),
+     o3(0xE5,0x88,0xB3), o3(0xE5,0x88,0xB9),
+     o3(0xE5,0x89,0x8F), o3(0xE5,0x89,0x84),
+     o3(0xE5,0x89,0x8B), o3(0xE5,0x89,0x8C),
+     o3(0xE5,0x89,0x9E), o3(0xE5,0x89,0x94),
+     o3(0xE5,0x89,0xAA), o3(0xE5,0x89,0xB4),
+     o3(0xE5,0x89,0xA9), o3(0xE5,0x89,0xB3),
+     o3(0xE5,0x89,0xBF), o3(0xE5,0x89,0xBD),
+     o3(0xE5,0x8A,0x8D), o3(0xE5,0x8A,0x94),
+     o3(0xE5,0x8A,0x92), o3(0xE5,0x89,0xB1),
+     o3(0xE5,0x8A,0x88), o3(0xE5,0x8A,0x91),
+     o3(0xE8,0xBE,0xA8), o3(0xE8,0xBE,0xA7),
+     o3(0xE5,0x8A,0xAC), o3(0xE5,0x8A,0xAD),
+     o3(0xE5,0x8A,0xBC), o3(0xE5,0x8A,0xB5),
+     o3(0xE5,0x8B,0x81), o3(0xE5,0x8B,0x8D),
+     o3(0xE5,0x8B,0x97), o3(0xE5,0x8B,0x9E),
+     o3(0xE5,0x8B,0xA3), o3(0xE5,0x8B,0xA6),
+     o3(0xE9,0xA3,0xAD), o3(0xE5,0x8B,0xA0),
+     o3(0xE5,0x8B,0xB3), o3(0xE5,0x8B,0xB5),
+     o3(0xE5,0x8B,0xB8), o3(0xE5,0x8B,0xB9),
+     o3(0xE5,0x8C,0x86), o3(0xE5,0x8C,0x88),
+     o3(0xE7,0x94,0xB8), o3(0xE5,0x8C,0x8D),
+     o3(0xE5,0x8C,0x90), o3(0xE5,0x8C,0x8F),
+     o3(0xE5,0x8C,0x95), o3(0xE5,0x8C,0x9A),
+     o3(0xE5,0x8C,0xA3), o3(0xE5,0x8C,0xAF),
+     o3(0xE5,0x8C,0xB1), o3(0xE5,0x8C,0xB3),
+     o3(0xE5,0x8C,0xB8), o3(0xE5,0x8D,0x80),
+     o3(0xE5,0x8D,0x86), o3(0xE5,0x8D,0x85),
+     o3(0xE4,0xB8,0x97), o3(0xE5,0x8D,0x89),
+     o3(0xE5,0x8D,0x8D), o3(0xE5,0x87,0x96),
+     o3(0xE5,0x8D,0x9E), o3(0xE5,0x8D,0xA9),
+     o3(0xE5,0x8D,0xAE), o3(0xE5,0xA4,0x98),
+     o3(0xE5,0x8D,0xBB), o3(0xE5,0x8D,0xB7),
+     o3(0xE5,0x8E,0x82), o3(0xE5,0x8E,0x96),
+     o3(0xE5,0x8E,0xA0), o3(0xE5,0x8E,0xA6),
+     o3(0xE5,0x8E,0xA5), o3(0xE5,0x8E,0xAE),
+     o3(0xE5,0x8E,0xB0), o3(0xE5,0x8E,0xB6),
+     o3(0xE5,0x8F,0x83), o3(0xE7,0xB0,0x92),
+     o3(0xE9,0x9B,0x99), o3(0xE5,0x8F,0x9F),
+     o3(0xE6,0x9B,0xBC), o3(0xE7,0x87,0xAE),
+     o3(0xE5,0x8F,0xAE), o3(0xE5,0x8F,0xA8),
+     o3(0xE5,0x8F,0xAD), o3(0xE5,0x8F,0xBA),
+     o3(0xE5,0x90,0x81), o3(0xE5,0x90,0xBD),
+     o3(0xE5,0x91,0x80), o3(0xE5,0x90,0xAC),
+     o3(0xE5,0x90,0xAD), o3(0xE5,0x90,0xBC),
+     o3(0xE5,0x90,0xAE), o3(0xE5,0x90,0xB6),
+     o3(0xE5,0x90,0xA9), o3(0xE5,0x90,0x9D),
+     o3(0xE5,0x91,0x8E), o3(0xE5,0x92,0x8F),
+     o3(0xE5,0x91,0xB5), o3(0xE5,0x92,0x8E),
+     o3(0xE5,0x91,0x9F), o3(0xE5,0x91,0xB1),
+     o3(0xE5,0x91,0xB7), o3(0xE5,0x91,0xB0),
+     o3(0xE5,0x92,0x92), o3(0xE5,0x91,0xBB),
+     o3(0xE5,0x92,0x80), o3(0xE5,0x91,0xB6),
+     o3(0xE5,0x92,0x84), o3(0xE5,0x92,0x90),
+     o3(0xE5,0x92,0x86), o3(0xE5,0x93,0x87),
+     o3(0xE5,0x92,0xA2), o3(0xE5,0x92,0xB8),
+     o3(0xE5,0x92,0xA5), o3(0xE5,0x92,0xAC),
+     o3(0xE5,0x93,0x84), o3(0xE5,0x93,0x88),
+     o3(0xE5,0x92,0xA8),
+
+#define from_Shift_JIS_99 WORDINDEX2INFO(3845)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_99_infos,
+
+#define from_Shift_JIS_9A_infos WORDINDEX2INFO(3847)
+                INVALID, o3(0xE5,0x92,0xAB),
+     o3(0xE5,0x93,0x82), o3(0xE5,0x92,0xA4),
+     o3(0xE5,0x92,0xBE), o3(0xE5,0x92,0xBC),
+     o3(0xE5,0x93,0x98), o3(0xE5,0x93,0xA5),
+     o3(0xE5,0x93,0xA6), o3(0xE5,0x94,0x8F),
+     o3(0xE5,0x94,0x94), o3(0xE5,0x93,0xBD),
+     o3(0xE5,0x93,0xAE), o3(0xE5,0x93,0xAD),
+     o3(0xE5,0x93,0xBA), o3(0xE5,0x93,0xA2),
+     o3(0xE5,0x94,0xB9), o3(0xE5,0x95,0x80),
+     o3(0xE5,0x95,0xA3), o3(0xE5,0x95,0x8C),
+     o3(0xE5,0x94,0xAE), o3(0xE5,0x95,0x9C),
+     o3(0xE5,0x95,0x85), o3(0xE5,0x95,0x96),
+     o3(0xE5,0x95,0x97), o3(0xE5,0x94,0xB8),
+     o3(0xE5,0x94,0xB3), o3(0xE5,0x95,0x9D),
+     o3(0xE5,0x96,0x99), o3(0xE5,0x96,0x80),
+     o3(0xE5,0x92,0xAF), o3(0xE5,0x96,0x8A),
+     o3(0xE5,0x96,0x9F), o3(0xE5,0x95,0xBB),
+     o3(0xE5,0x95,0xBE), o3(0xE5,0x96,0x98),
+     o3(0xE5,0x96,0x9E), o3(0xE5,0x96,0xAE),
+     o3(0xE5,0x95,0xBC), o3(0xE5,0x96,0x83),
+     o3(0xE5,0x96,0xA9), o3(0xE5,0x96,0x87),
+     o3(0xE5,0x96,0xA8), o3(0xE5,0x97,0x9A),
+     o3(0xE5,0x97,0x85), o3(0xE5,0x97,0x9F),
+     o3(0xE5,0x97,0x84), o3(0xE5,0x97,0x9C),
+     o3(0xE5,0x97,0xA4), o3(0xE5,0x97,0x94),
+     o3(0xE5,0x98,0x94), o3(0xE5,0x97,0xB7),
+     o3(0xE5,0x98,0x96), o3(0xE5,0x97,0xBE),
+     o3(0xE5,0x97,0xBD), o3(0xE5,0x98,0x9B),
+     o3(0xE5,0x97,0xB9), o3(0xE5,0x99,0x8E),
+     o3(0xE5,0x99,0x90), o3(0xE7,0x87,0x9F),
+     o3(0xE5,0x98,0xB4), o3(0xE5,0x98,0xB6),
+     o3(0xE5,0x98,0xB2), o3(0xE5,0x98,0xB8),
+     o3(0xE5,0x99,0xAB), o3(0xE5,0x99,0xA4),
+     o3(0xE5,0x98,0xAF), o3(0xE5,0x99,0xAC),
+     o3(0xE5,0x99,0xAA), o3(0xE5,0x9A,0x86),
+     o3(0xE5,0x9A,0x80), o3(0xE5,0x9A,0x8A),
+     o3(0xE5,0x9A,0xA0), o3(0xE5,0x9A,0x94),
+     o3(0xE5,0x9A,0x8F), o3(0xE5,0x9A,0xA5),
+     o3(0xE5,0x9A,0xAE), o3(0xE5,0x9A,0xB6),
+     o3(0xE5,0x9A,0xB4), o3(0xE5,0x9B,0x82),
+     o3(0xE5,0x9A,0xBC), o3(0xE5,0x9B,0x81),
+     o3(0xE5,0x9B,0x83), o3(0xE5,0x9B,0x80),
+     o3(0xE5,0x9B,0x88), o3(0xE5,0x9B,0x8E),
+     o3(0xE5,0x9B,0x91), o3(0xE5,0x9B,0x93),
+     o3(0xE5,0x9B,0x97), o3(0xE5,0x9B,0xAE),
+     o3(0xE5,0x9B,0xB9), o3(0xE5,0x9C,0x80),
+     o3(0xE5,0x9B,0xBF), o3(0xE5,0x9C,0x84),
+     o3(0xE5,0x9C,0x89), o3(0xE5,0x9C,0x88),
+     o3(0xE5,0x9C,0x8B), o3(0xE5,0x9C,0x8D),
+     o3(0xE5,0x9C,0x93), o3(0xE5,0x9C,0x98),
+     o3(0xE5,0x9C,0x96), o3(0xE5,0x97,0x87),
+     o3(0xE5,0x9C,0x9C), o3(0xE5,0x9C,0xA6),
+     o3(0xE5,0x9C,0xB7), o3(0xE5,0x9C,0xB8),
+     o3(0xE5,0x9D,0x8E), o3(0xE5,0x9C,0xBB),
+     o3(0xE5,0x9D,0x80), o3(0xE5,0x9D,0x8F),
+     o3(0xE5,0x9D,0xA9), o3(0xE5,0x9F,0x80),
+     o3(0xE5,0x9E,0x88), o3(0xE5,0x9D,0xA1),
+     o3(0xE5,0x9D,0xBF), o3(0xE5,0x9E,0x89),
+     o3(0xE5,0x9E,0x93), o3(0xE5,0x9E,0xA0),
+     o3(0xE5,0x9E,0xB3), o3(0xE5,0x9E,0xA4),
+     o3(0xE5,0x9E,0xAA), o3(0xE5,0x9E,0xB0),
+     o3(0xE5,0x9F,0x83), o3(0xE5,0x9F,0x86),
+     o3(0xE5,0x9F,0x94), o3(0xE5,0x9F,0x92),
+     o3(0xE5,0x9F,0x93), o3(0xE5,0xA0,0x8A),
+     o3(0xE5,0x9F,0x96), o3(0xE5,0x9F,0xA3),
+     o3(0xE5,0xA0,0x8B), o3(0xE5,0xA0,0x99),
+     o3(0xE5,0xA0,0x9D), o3(0xE5,0xA1,0xB2),
+     o3(0xE5,0xA0,0xA1), o3(0xE5,0xA1,0xA2),
+     o3(0xE5,0xA1,0x8B), o3(0xE5,0xA1,0xB0),
+     o3(0xE6,0xAF,0x80), o3(0xE5,0xA1,0x92),
+     o3(0xE5,0xA0,0xBD), o3(0xE5,0xA1,0xB9),
+     o3(0xE5,0xA2,0x85), o3(0xE5,0xA2,0xB9),
+     o3(0xE5,0xA2,0x9F), o3(0xE5,0xA2,0xAB),
+     o3(0xE5,0xA2,0xBA), o3(0xE5,0xA3,0x9E),
+     o3(0xE5,0xA2,0xBB), o3(0xE5,0xA2,0xB8),
+     o3(0xE5,0xA2,0xAE), o3(0xE5,0xA3,0x85),
+     o3(0xE5,0xA3,0x93), o3(0xE5,0xA3,0x91),
+     o3(0xE5,0xA3,0x97), o3(0xE5,0xA3,0x99),
+     o3(0xE5,0xA3,0x98), o3(0xE5,0xA3,0xA5),
+     o3(0xE5,0xA3,0x9C), o3(0xE5,0xA3,0xA4),
+     o3(0xE5,0xA3,0x9F), o3(0xE5,0xA3,0xAF),
+     o3(0xE5,0xA3,0xBA), o3(0xE5,0xA3,0xB9),
+     o3(0xE5,0xA3,0xBB), o3(0xE5,0xA3,0xBC),
+     o3(0xE5,0xA3,0xBD), o3(0xE5,0xA4,0x82),
+     o3(0xE5,0xA4,0x8A), o3(0xE5,0xA4,0x90),
+     o3(0xE5,0xA4,0x9B), o3(0xE6,0xA2,0xA6),
+     o3(0xE5,0xA4,0xA5), o3(0xE5,0xA4,0xAC),
+     o3(0xE5,0xA4,0xAD), o3(0xE5,0xA4,0xB2),
+     o3(0xE5,0xA4,0xB8), o3(0xE5,0xA4,0xBE),
+     o3(0xE7,0xAB,0x92), o3(0xE5,0xA5,0x95),
+     o3(0xE5,0xA5,0x90), o3(0xE5,0xA5,0x8E),
+     o3(0xE5,0xA5,0x9A), o3(0xE5,0xA5,0x98),
+     o3(0xE5,0xA5,0xA2), o3(0xE5,0xA5,0xA0),
+     o3(0xE5,0xA5,0xA7), o3(0xE5,0xA5,0xAC),
+     o3(0xE5,0xA5,0xA9),
+
+#define from_Shift_JIS_9A WORDINDEX2INFO(4036)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9A_infos,
+
+#define from_Shift_JIS_9B_infos WORDINDEX2INFO(4038)
+                INVALID, o3(0xE5,0xA5,0xB8),
+     o3(0xE5,0xA6,0x81), o3(0xE5,0xA6,0x9D),
+     o3(0xE4,0xBD,0x9E), o3(0xE4,0xBE,0xAB),
+     o3(0xE5,0xA6,0xA3), o3(0xE5,0xA6,0xB2),
+     o3(0xE5,0xA7,0x86), o3(0xE5,0xA7,0xA8),
+     o3(0xE5,0xA7,0x9C), o3(0xE5,0xA6,0x8D),
+     o3(0xE5,0xA7,0x99), o3(0xE5,0xA7,0x9A),
+     o3(0xE5,0xA8,0xA5), o3(0xE5,0xA8,0x9F),
+     o3(0xE5,0xA8,0x91), o3(0xE5,0xA8,0x9C),
+     o3(0xE5,0xA8,0x89), o3(0xE5,0xA8,0x9A),
+     o3(0xE5,0xA9,0x80), o3(0xE5,0xA9,0xAC),
+     o3(0xE5,0xA9,0x89), o3(0xE5,0xA8,0xB5),
+     o3(0xE5,0xA8,0xB6), o3(0xE5,0xA9,0xA2),
+     o3(0xE5,0xA9,0xAA), o3(0xE5,0xAA,0x9A),
+     o3(0xE5,0xAA,0xBC), o3(0xE5,0xAA,0xBE),
+     o3(0xE5,0xAB,0x8B), o3(0xE5,0xAB,0x82),
+     o3(0xE5,0xAA,0xBD), o3(0xE5,0xAB,0xA3),
+     o3(0xE5,0xAB,0x97), o3(0xE5,0xAB,0xA6),
+     o3(0xE5,0xAB,0xA9), o3(0xE5,0xAB,0x96),
+     o3(0xE5,0xAB,0xBA), o3(0xE5,0xAB,0xBB),
+     o3(0xE5,0xAC,0x8C), o3(0xE5,0xAC,0x8B),
+     o3(0xE5,0xAC,0x96), o3(0xE5,0xAC,0xB2),
+     o3(0xE5,0xAB,0x90), o3(0xE5,0xAC,0xAA),
+     o3(0xE5,0xAC,0xB6), o3(0xE5,0xAC,0xBE),
+     o3(0xE5,0xAD,0x83), o3(0xE5,0xAD,0x85),
+     o3(0xE5,0xAD,0x80), o3(0xE5,0xAD,0x91),
+     o3(0xE5,0xAD,0x95), o3(0xE5,0xAD,0x9A),
+     o3(0xE5,0xAD,0x9B), o3(0xE5,0xAD,0xA5),
+     o3(0xE5,0xAD,0xA9), o3(0xE5,0xAD,0xB0),
+     o3(0xE5,0xAD,0xB3), o3(0xE5,0xAD,0xB5),
+     o3(0xE5,0xAD,0xB8), o3(0xE6,0x96,0x88),
+     o3(0xE5,0xAD,0xBA), o3(0xE5,0xAE,0x80),
+     o3(0xE5,0xAE,0x83), o3(0xE5,0xAE,0xA6),
+     o3(0xE5,0xAE,0xB8), o3(0xE5,0xAF,0x83),
+     o3(0xE5,0xAF,0x87), o3(0xE5,0xAF,0x89),
+     o3(0xE5,0xAF,0x94), o3(0xE5,0xAF,0x90),
+     o3(0xE5,0xAF,0xA4), o3(0xE5,0xAF,0xA6),
+     o3(0xE5,0xAF,0xA2), o3(0xE5,0xAF,0x9E),
+     o3(0xE5,0xAF,0xA5), o3(0xE5,0xAF,0xAB),
+     o3(0xE5,0xAF,0xB0), o3(0xE5,0xAF,0xB6),
+     o3(0xE5,0xAF,0xB3), o3(0xE5,0xB0,0x85),
+     o3(0xE5,0xB0,0x87), o3(0xE5,0xB0,0x88),
+     o3(0xE5,0xB0,0x8D), o3(0xE5,0xB0,0x93),
+     o3(0xE5,0xB0,0xA0), o3(0xE5,0xB0,0xA2),
+     o3(0xE5,0xB0,0xA8), o3(0xE5,0xB0,0xB8),
+     o3(0xE5,0xB0,0xB9), o3(0xE5,0xB1,0x81),
+     o3(0xE5,0xB1,0x86), o3(0xE5,0xB1,0x8E),
+     o3(0xE5,0xB1,0x93), o3(0xE5,0xB1,0x90),
+     o3(0xE5,0xB1,0x8F), o3(0xE5,0xAD,0xB1),
+     o3(0xE5,0xB1,0xAC), o3(0xE5,0xB1,0xAE),
+     o3(0xE4,0xB9,0xA2), o3(0xE5,0xB1,0xB6),
+     o3(0xE5,0xB1,0xB9), o3(0xE5,0xB2,0x8C),
+     o3(0xE5,0xB2,0x91), o3(0xE5,0xB2,0x94),
+     o3(0xE5,0xA6,0x9B), o3(0xE5,0xB2,0xAB),
+     o3(0xE5,0xB2,0xBB), o3(0xE5,0xB2,0xB6),
+     o3(0xE5,0xB2,0xBC), o3(0xE5,0xB2,0xB7),
+     o3(0xE5,0xB3,0x85), o3(0xE5,0xB2,0xBE),
+     o3(0xE5,0xB3,0x87), o3(0xE5,0xB3,0x99),
+     o3(0xE5,0xB3,0xA9), o3(0xE5,0xB3,0xBD),
+     o3(0xE5,0xB3,0xBA), o3(0xE5,0xB3,0xAD),
+     o3(0xE5,0xB6,0x8C), o3(0xE5,0xB3,0xAA),
+     o3(0xE5,0xB4,0x8B), o3(0xE5,0xB4,0x95),
+     o3(0xE5,0xB4,0x97), o3(0xE5,0xB5,0x9C),
+     o3(0xE5,0xB4,0x9F), o3(0xE5,0xB4,0x9B),
+     o3(0xE5,0xB4,0x91), o3(0xE5,0xB4,0x94),
+     o3(0xE5,0xB4,0xA2), o3(0xE5,0xB4,0x9A),
+     o3(0xE5,0xB4,0x99), o3(0xE5,0xB4,0x98),
+     o3(0xE5,0xB5,0x8C), o3(0xE5,0xB5,0x92),
+     o3(0xE5,0xB5,0x8E), o3(0xE5,0xB5,0x8B),
+     o3(0xE5,0xB5,0xAC), o3(0xE5,0xB5,0xB3),
+     o3(0xE5,0xB5,0xB6), o3(0xE5,0xB6,0x87),
+     o3(0xE5,0xB6,0x84), o3(0xE5,0xB6,0x82),
+     o3(0xE5,0xB6,0xA2), o3(0xE5,0xB6,0x9D),
+     o3(0xE5,0xB6,0xAC), o3(0xE5,0xB6,0xAE),
+     o3(0xE5,0xB6,0xBD), o3(0xE5,0xB6,0x90),
+     o3(0xE5,0xB6,0xB7), o3(0xE5,0xB6,0xBC),
+     o3(0xE5,0xB7,0x89), o3(0xE5,0xB7,0x8D),
+     o3(0xE5,0xB7,0x93), o3(0xE5,0xB7,0x92),
+     o3(0xE5,0xB7,0x96), o3(0xE5,0xB7,0x9B),
+     o3(0xE5,0xB7,0xAB), o3(0xE5,0xB7,0xB2),
+     o3(0xE5,0xB7,0xB5), o3(0xE5,0xB8,0x8B),
+     o3(0xE5,0xB8,0x9A), o3(0xE5,0xB8,0x99),
+     o3(0xE5,0xB8,0x91), o3(0xE5,0xB8,0x9B),
+     o3(0xE5,0xB8,0xB6), o3(0xE5,0xB8,0xB7),
+     o3(0xE5,0xB9,0x84), o3(0xE5,0xB9,0x83),
+     o3(0xE5,0xB9,0x80), o3(0xE5,0xB9,0x8E),
+     o3(0xE5,0xB9,0x97), o3(0xE5,0xB9,0x94),
+     o3(0xE5,0xB9,0x9F), o3(0xE5,0xB9,0xA2),
+     o3(0xE5,0xB9,0xA4), o3(0xE5,0xB9,0x87),
+     o3(0xE5,0xB9,0xB5), o3(0xE5,0xB9,0xB6),
+     o3(0xE5,0xB9,0xBA), o3(0xE9,0xBA,0xBC),
+     o3(0xE5,0xB9,0xBF), o3(0xE5,0xBA,0xA0),
+     o3(0xE5,0xBB,0x81), o3(0xE5,0xBB,0x82),
+     o3(0xE5,0xBB,0x88), o3(0xE5,0xBB,0x90),
+     o3(0xE5,0xBB,0x8F),
+
+#define from_Shift_JIS_9B WORDINDEX2INFO(4227)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9B_infos,
+
+#define from_Shift_JIS_9C_infos WORDINDEX2INFO(4229)
+                INVALID, o3(0xE5,0xBB,0x96),
+     o3(0xE5,0xBB,0xA3), o3(0xE5,0xBB,0x9D),
+     o3(0xE5,0xBB,0x9A), o3(0xE5,0xBB,0x9B),
+     o3(0xE5,0xBB,0xA2), o3(0xE5,0xBB,0xA1),
+     o3(0xE5,0xBB,0xA8), o3(0xE5,0xBB,0xA9),
+     o3(0xE5,0xBB,0xAC), o3(0xE5,0xBB,0xB1),
+     o3(0xE5,0xBB,0xB3), o3(0xE5,0xBB,0xB0),
+     o3(0xE5,0xBB,0xB4), o3(0xE5,0xBB,0xB8),
+     o3(0xE5,0xBB,0xBE), o3(0xE5,0xBC,0x83),
+     o3(0xE5,0xBC,0x89), o3(0xE5,0xBD,0x9D),
+     o3(0xE5,0xBD,0x9C), o3(0xE5,0xBC,0x8B),
+     o3(0xE5,0xBC,0x91), o3(0xE5,0xBC,0x96),
+     o3(0xE5,0xBC,0xA9), o3(0xE5,0xBC,0xAD),
+     o3(0xE5,0xBC,0xB8), o3(0xE5,0xBD,0x81),
+     o3(0xE5,0xBD,0x88), o3(0xE5,0xBD,0x8C),
+     o3(0xE5,0xBD,0x8E), o3(0xE5,0xBC,0xAF),
+     o3(0xE5,0xBD,0x91), o3(0xE5,0xBD,0x96),
+     o3(0xE5,0xBD,0x97), o3(0xE5,0xBD,0x99),
+     o3(0xE5,0xBD,0xA1), o3(0xE5,0xBD,0xAD),
+     o3(0xE5,0xBD,0xB3), o3(0xE5,0xBD,0xB7),
+     o3(0xE5,0xBE,0x83), o3(0xE5,0xBE,0x82),
+     o3(0xE5,0xBD,0xBF), o3(0xE5,0xBE,0x8A),
+     o3(0xE5,0xBE,0x88), o3(0xE5,0xBE,0x91),
+     o3(0xE5,0xBE,0x87), o3(0xE5,0xBE,0x9E),
+     o3(0xE5,0xBE,0x99), o3(0xE5,0xBE,0x98),
+     o3(0xE5,0xBE,0xA0), o3(0xE5,0xBE,0xA8),
+     o3(0xE5,0xBE,0xAD), o3(0xE5,0xBE,0xBC),
+     o3(0xE5,0xBF,0x96), o3(0xE5,0xBF,0xBB),
+     o3(0xE5,0xBF,0xA4), o3(0xE5,0xBF,0xB8),
+     o3(0xE5,0xBF,0xB1), o3(0xE5,0xBF,0x9D),
+     o3(0xE6,0x82,0xB3), o3(0xE5,0xBF,0xBF),
+     o3(0xE6,0x80,0xA1), o3(0xE6,0x81,0xA0),
+     o3(0xE6,0x80,0x99), o3(0xE6,0x80,0x90),
+     o3(0xE6,0x80,0xA9), o3(0xE6,0x80,0x8E),
+     o3(0xE6,0x80,0xB1), o3(0xE6,0x80,0x9B),
+     o3(0xE6,0x80,0x95), o3(0xE6,0x80,0xAB),
+     o3(0xE6,0x80,0xA6), o3(0xE6,0x80,0x8F),
+     o3(0xE6,0x80,0xBA), o3(0xE6,0x81,0x9A),
+     o3(0xE6,0x81,0x81), o3(0xE6,0x81,0xAA),
+     o3(0xE6,0x81,0xB7), o3(0xE6,0x81,0x9F),
+     o3(0xE6,0x81,0x8A), o3(0xE6,0x81,0x86),
+     o3(0xE6,0x81,0x8D), o3(0xE6,0x81,0xA3),
+     o3(0xE6,0x81,0x83), o3(0xE6,0x81,0xA4),
+     o3(0xE6,0x81,0x82), o3(0xE6,0x81,0xAC),
+     o3(0xE6,0x81,0xAB), o3(0xE6,0x81,0x99),
+     o3(0xE6,0x82,0x81), o3(0xE6,0x82,0x8D),
+     o3(0xE6,0x83,0xA7), o3(0xE6,0x82,0x83),
+     o3(0xE6,0x82,0x9A), o3(0xE6,0x82,0x84),
+     o3(0xE6,0x82,0x9B), o3(0xE6,0x82,0x96),
+     o3(0xE6,0x82,0x97), o3(0xE6,0x82,0x92),
+     o3(0xE6,0x82,0xA7), o3(0xE6,0x82,0x8B),
+     o3(0xE6,0x83,0xA1), o3(0xE6,0x82,0xB8),
+     o3(0xE6,0x83,0xA0), o3(0xE6,0x83,0x93),
+     o3(0xE6,0x82,0xB4), o3(0xE5,0xBF,0xB0),
+     o3(0xE6,0x82,0xBD), o3(0xE6,0x83,0x86),
+     o3(0xE6,0x82,0xB5), o3(0xE6,0x83,0x98),
+     o3(0xE6,0x85,0x8D), o3(0xE6,0x84,0x95),
+     o3(0xE6,0x84,0x86), o3(0xE6,0x83,0xB6),
+     o3(0xE6,0x83,0xB7), o3(0xE6,0x84,0x80),
+     o3(0xE6,0x83,0xB4), o3(0xE6,0x83,0xBA),
+     o3(0xE6,0x84,0x83), o3(0xE6,0x84,0xA1),
+     o3(0xE6,0x83,0xBB), o3(0xE6,0x83,0xB1),
+     o3(0xE6,0x84,0x8D), o3(0xE6,0x84,0x8E),
+     o3(0xE6,0x85,0x87), o3(0xE6,0x84,0xBE),
+     o3(0xE6,0x84,0xA8), o3(0xE6,0x84,0xA7),
+     o3(0xE6,0x85,0x8A), o3(0xE6,0x84,0xBF),
+     o3(0xE6,0x84,0xBC), o3(0xE6,0x84,0xAC),
+     o3(0xE6,0x84,0xB4), o3(0xE6,0x84,0xBD),
+     o3(0xE6,0x85,0x82), o3(0xE6,0x85,0x84),
+     o3(0xE6,0x85,0xB3), o3(0xE6,0x85,0xB7),
+     o3(0xE6,0x85,0x98), o3(0xE6,0x85,0x99),
+     o3(0xE6,0x85,0x9A), o3(0xE6,0x85,0xAB),
+     o3(0xE6,0x85,0xB4), o3(0xE6,0x85,0xAF),
+     o3(0xE6,0x85,0xA5), o3(0xE6,0x85,0xB1),
+     o3(0xE6,0x85,0x9F), o3(0xE6,0x85,0x9D),
+     o3(0xE6,0x85,0x93), o3(0xE6,0x85,0xB5),
+     o3(0xE6,0x86,0x99), o3(0xE6,0x86,0x96),
+     o3(0xE6,0x86,0x87), o3(0xE6,0x86,0xAC),
+     o3(0xE6,0x86,0x94), o3(0xE6,0x86,0x9A),
+     o3(0xE6,0x86,0x8A), o3(0xE6,0x86,0x91),
+     o3(0xE6,0x86,0xAB), o3(0xE6,0x86,0xAE),
+     o3(0xE6,0x87,0x8C), o3(0xE6,0x87,0x8A),
+     o3(0xE6,0x87,0x89), o3(0xE6,0x87,0xB7),
+     o3(0xE6,0x87,0x88), o3(0xE6,0x87,0x83),
+     o3(0xE6,0x87,0x86), o3(0xE6,0x86,0xBA),
+     o3(0xE6,0x87,0x8B), o3(0xE7,0xBD,0xB9),
+     o3(0xE6,0x87,0x8D), o3(0xE6,0x87,0xA6),
+     o3(0xE6,0x87,0xA3), o3(0xE6,0x87,0xB6),
+     o3(0xE6,0x87,0xBA), o3(0xE6,0x87,0xB4),
+     o3(0xE6,0x87,0xBF), o3(0xE6,0x87,0xBD),
+     o3(0xE6,0x87,0xBC), o3(0xE6,0x87,0xBE),
+     o3(0xE6,0x88,0x80), o3(0xE6,0x88,0x88),
+     o3(0xE6,0x88,0x89), o3(0xE6,0x88,0x8D),
+     o3(0xE6,0x88,0x8C), o3(0xE6,0x88,0x94),
+     o3(0xE6,0x88,0x9B),
+
+#define from_Shift_JIS_9C WORDINDEX2INFO(4418)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9C_infos,
+
+#define from_Shift_JIS_9D_infos WORDINDEX2INFO(4420)
+                INVALID, o3(0xE6,0x88,0x9E),
+     o3(0xE6,0x88,0xA1), o3(0xE6,0x88,0xAA),
+     o3(0xE6,0x88,0xAE), o3(0xE6,0x88,0xB0),
+     o3(0xE6,0x88,0xB2), o3(0xE6,0x88,0xB3),
+     o3(0xE6,0x89,0x81), o3(0xE6,0x89,0x8E),
+     o3(0xE6,0x89,0x9E), o3(0xE6,0x89,0xA3),
+     o3(0xE6,0x89,0x9B), o3(0xE6,0x89,0xA0),
+     o3(0xE6,0x89,0xA8), o3(0xE6,0x89,0xBC),
+     o3(0xE6,0x8A,0x82), o3(0xE6,0x8A,0x89),
+     o3(0xE6,0x89,0xBE), o3(0xE6,0x8A,0x92),
+     o3(0xE6,0x8A,0x93), o3(0xE6,0x8A,0x96),
+     o3(0xE6,0x8B,0x94), o3(0xE6,0x8A,0x83),
+     o3(0xE6,0x8A,0x94), o3(0xE6,0x8B,0x97),
+     o3(0xE6,0x8B,0x91), o3(0xE6,0x8A,0xBB),
+     o3(0xE6,0x8B,0x8F), o3(0xE6,0x8B,0xBF),
+     o3(0xE6,0x8B,0x86), o3(0xE6,0x93,0x94),
+     o3(0xE6,0x8B,0x88), o3(0xE6,0x8B,0x9C),
+     o3(0xE6,0x8B,0x8C), o3(0xE6,0x8B,0x8A),
+     o3(0xE6,0x8B,0x82), o3(0xE6,0x8B,0x87),
+     o3(0xE6,0x8A,0x9B), o3(0xE6,0x8B,0x89),
+     o3(0xE6,0x8C,0x8C), o3(0xE6,0x8B,0xAE),
+     o3(0xE6,0x8B,0xB1), o3(0xE6,0x8C,0xA7),
+     o3(0xE6,0x8C,0x82), o3(0xE6,0x8C,0x88),
+     o3(0xE6,0x8B,0xAF), o3(0xE6,0x8B,0xB5),
+     o3(0xE6,0x8D,0x90), o3(0xE6,0x8C,0xBE),
+     o3(0xE6,0x8D,0x8D), o3(0xE6,0x90,0x9C),
+     o3(0xE6,0x8D,0x8F), o3(0xE6,0x8E,0x96),
+     o3(0xE6,0x8E,0x8E), o3(0xE6,0x8E,0x80),
+     o3(0xE6,0x8E,0xAB), o3(0xE6,0x8D,0xB6),
+     o3(0xE6,0x8E,0xA3), o3(0xE6,0x8E,0x8F),
+     o3(0xE6,0x8E,0x89), o3(0xE6,0x8E,0x9F),
+     o3(0xE6,0x8E,0xB5), o3(0xE6,0x8D,0xAB),
+     o3(0xE6,0x8D,0xA9), o3(0xE6,0x8E,0xBE),
+     o3(0xE6,0x8F,0xA9), o3(0xE6,0x8F,0x80),
+     o3(0xE6,0x8F,0x86), o3(0xE6,0x8F,0xA3),
+     o3(0xE6,0x8F,0x89), o3(0xE6,0x8F,0x92),
+     o3(0xE6,0x8F,0xB6), o3(0xE6,0x8F,0x84),
+     o3(0xE6,0x90,0x96), o3(0xE6,0x90,0xB4),
+     o3(0xE6,0x90,0x86), o3(0xE6,0x90,0x93),
+     o3(0xE6,0x90,0xA6), o3(0xE6,0x90,0xB6),
+     o3(0xE6,0x94,0x9D), o3(0xE6,0x90,0x97),
+     o3(0xE6,0x90,0xA8), o3(0xE6,0x90,0x8F),
+     o3(0xE6,0x91,0xA7), o3(0xE6,0x91,0xAF),
+     o3(0xE6,0x91,0xB6), o3(0xE6,0x91,0x8E),
+     o3(0xE6,0x94,0xAA), o3(0xE6,0x92,0x95),
+     o3(0xE6,0x92,0x93), o3(0xE6,0x92,0xA5),
+     o3(0xE6,0x92,0xA9), o3(0xE6,0x92,0x88),
+     o3(0xE6,0x92,0xBC), o3(0xE6,0x93,0x9A),
+     o3(0xE6,0x93,0x92), o3(0xE6,0x93,0x85),
+     o3(0xE6,0x93,0x87), o3(0xE6,0x92,0xBB),
+     o3(0xE6,0x93,0x98), o3(0xE6,0x93,0x82),
+     o3(0xE6,0x93,0xB1), o3(0xE6,0x93,0xA7),
+     o3(0xE8,0x88,0x89), o3(0xE6,0x93,0xA0),
+     o3(0xE6,0x93,0xA1), o3(0xE6,0x8A,0xAC),
+     o3(0xE6,0x93,0xA3), o3(0xE6,0x93,0xAF),
+     o3(0xE6,0x94,0xAC), o3(0xE6,0x93,0xB6),
+     o3(0xE6,0x93,0xB4), o3(0xE6,0x93,0xB2),
+     o3(0xE6,0x93,0xBA), o3(0xE6,0x94,0x80),
+     o3(0xE6,0x93,0xBD), o3(0xE6,0x94,0x98),
+     o3(0xE6,0x94,0x9C), o3(0xE6,0x94,0x85),
+     o3(0xE6,0x94,0xA4), o3(0xE6,0x94,0xA3),
+     o3(0xE6,0x94,0xAB), o3(0xE6,0x94,0xB4),
+     o3(0xE6,0x94,0xB5), o3(0xE6,0x94,0xB7),
+     o3(0xE6,0x94,0xB6), o3(0xE6,0x94,0xB8),
+     o3(0xE7,0x95,0x8B), o3(0xE6,0x95,0x88),
+     o3(0xE6,0x95,0x96), o3(0xE6,0x95,0x95),
+     o3(0xE6,0x95,0x8D), o3(0xE6,0x95,0x98),
+     o3(0xE6,0x95,0x9E), o3(0xE6,0x95,0x9D),
+     o3(0xE6,0x95,0xB2), o3(0xE6,0x95,0xB8),
+     o3(0xE6,0x96,0x82), o3(0xE6,0x96,0x83),
+     o3(0xE8,0xAE,0x8A), o3(0xE6,0x96,0x9B),
+     o3(0xE6,0x96,0x9F), o3(0xE6,0x96,0xAB),
+     o3(0xE6,0x96,0xB7), o3(0xE6,0x97,0x83),
+     o3(0xE6,0x97,0x86), o3(0xE6,0x97,0x81),
+     o3(0xE6,0x97,0x84), o3(0xE6,0x97,0x8C),
+     o3(0xE6,0x97,0x92), o3(0xE6,0x97,0x9B),
+     o3(0xE6,0x97,0x99), o3(0xE6,0x97,0xA0),
+     o3(0xE6,0x97,0xA1), o3(0xE6,0x97,0xB1),
+     o3(0xE6,0x9D,0xB2), o3(0xE6,0x98,0x8A),
+     o3(0xE6,0x98,0x83), o3(0xE6,0x97,0xBB),
+     o3(0xE6,0x9D,0xB3), o3(0xE6,0x98,0xB5),
+     o3(0xE6,0x98,0xB6), o3(0xE6,0x98,0xB4),
+     o3(0xE6,0x98,0x9C), o3(0xE6,0x99,0x8F),
+     o3(0xE6,0x99,0x84), o3(0xE6,0x99,0x89),
+     o3(0xE6,0x99,0x81), o3(0xE6,0x99,0x9E),
+     o3(0xE6,0x99,0x9D), o3(0xE6,0x99,0xA4),
+     o3(0xE6,0x99,0xA7), o3(0xE6,0x99,0xA8),
+     o3(0xE6,0x99,0x9F), o3(0xE6,0x99,0xA2),
+     o3(0xE6,0x99,0xB0), o3(0xE6,0x9A,0x83),
+     o3(0xE6,0x9A,0x88), o3(0xE6,0x9A,0x8E),
+     o3(0xE6,0x9A,0x89), o3(0xE6,0x9A,0x84),
+     o3(0xE6,0x9A,0x98), o3(0xE6,0x9A,0x9D),
+     o3(0xE6,0x9B,0x81), o3(0xE6,0x9A,0xB9),
+     o3(0xE6,0x9B,0x89), o3(0xE6,0x9A,0xBE),
+     o3(0xE6,0x9A,0xBC),
+
+#define from_Shift_JIS_9D WORDINDEX2INFO(4609)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9D_infos,
+
+#define from_Shift_JIS_9E_infos WORDINDEX2INFO(4611)
+                INVALID, o3(0xE6,0x9B,0x84),
+     o3(0xE6,0x9A,0xB8), o3(0xE6,0x9B,0x96),
+     o3(0xE6,0x9B,0x9A), o3(0xE6,0x9B,0xA0),
+     o3(0xE6,0x98,0xBF), o3(0xE6,0x9B,0xA6),
+     o3(0xE6,0x9B,0xA9), o3(0xE6,0x9B,0xB0),
+     o3(0xE6,0x9B,0xB5), o3(0xE6,0x9B,0xB7),
+     o3(0xE6,0x9C,0x8F), o3(0xE6,0x9C,0x96),
+     o3(0xE6,0x9C,0x9E), o3(0xE6,0x9C,0xA6),
+     o3(0xE6,0x9C,0xA7), o3(0xE9,0x9C,0xB8),
+     o3(0xE6,0x9C,0xAE), o3(0xE6,0x9C,0xBF),
+     o3(0xE6,0x9C,0xB6), o3(0xE6,0x9D,0x81),
+     o3(0xE6,0x9C,0xB8), o3(0xE6,0x9C,0xB7),
+     o3(0xE6,0x9D,0x86), o3(0xE6,0x9D,0x9E),
+     o3(0xE6,0x9D,0xA0), o3(0xE6,0x9D,0x99),
+     o3(0xE6,0x9D,0xA3), o3(0xE6,0x9D,0xA4),
+     o3(0xE6,0x9E,0x89), o3(0xE6,0x9D,0xB0),
+     o3(0xE6,0x9E,0xA9), o3(0xE6,0x9D,0xBC),
+     o3(0xE6,0x9D,0xAA), o3(0xE6,0x9E,0x8C),
+     o3(0xE6,0x9E,0x8B), o3(0xE6,0x9E,0xA6),
+     o3(0xE6,0x9E,0xA1), o3(0xE6,0x9E,0x85),
+     o3(0xE6,0x9E,0xB7), o3(0xE6,0x9F,0xAF),
+     o3(0xE6,0x9E,0xB4), o3(0xE6,0x9F,0xAC),
+     o3(0xE6,0x9E,0xB3), o3(0xE6,0x9F,0xA9),
+     o3(0xE6,0x9E,0xB8), o3(0xE6,0x9F,0xA4),
+     o3(0xE6,0x9F,0x9E), o3(0xE6,0x9F,0x9D),
+     o3(0xE6,0x9F,0xA2), o3(0xE6,0x9F,0xAE),
+     o3(0xE6,0x9E,0xB9), o3(0xE6,0x9F,0x8E),
+     o3(0xE6,0x9F,0x86), o3(0xE6,0x9F,0xA7),
+     o3(0xE6,0xAA,0x9C), o3(0xE6,0xA0,0x9E),
+     o3(0xE6,0xA1,0x86), o3(0xE6,0xA0,0xA9),
+     o3(0xE6,0xA1,0x80), o3(0xE6,0xA1,0x8D),
+     o3(0xE6,0xA0,0xB2), o3(0xE6,0xA1,0x8E),
+     o3(0xE6,0xA2,0xB3), o3(0xE6,0xA0,0xAB),
+     o3(0xE6,0xA1,0x99), o3(0xE6,0xA1,0xA3),
+     o3(0xE6,0xA1,0xB7), o3(0xE6,0xA1,0xBF),
+     o3(0xE6,0xA2,0x9F), o3(0xE6,0xA2,0x8F),
+     o3(0xE6,0xA2,0xAD), o3(0xE6,0xA2,0x94),
+     o3(0xE6,0xA2,0x9D), o3(0xE6,0xA2,0x9B),
+     o3(0xE6,0xA2,0x83), o3(0xE6,0xAA,0xAE),
+     o3(0xE6,0xA2,0xB9), o3(0xE6,0xA1,0xB4),
+     o3(0xE6,0xA2,0xB5), o3(0xE6,0xA2,0xA0),
+     o3(0xE6,0xA2,0xBA), o3(0xE6,0xA4,0x8F),
+     o3(0xE6,0xA2,0x8D), o3(0xE6,0xA1,0xBE),
+     o3(0xE6,0xA4,0x81), o3(0xE6,0xA3,0x8A),
+     o3(0xE6,0xA4,0x88), o3(0xE6,0xA3,0x98),
+     o3(0xE6,0xA4,0xA2), o3(0xE6,0xA4,0xA6),
+     o3(0xE6,0xA3,0xA1), o3(0xE6,0xA4,0x8C),
+     o3(0xE6,0xA3,0x8D), o3(0xE6,0xA3,0x94),
+     o3(0xE6,0xA3,0xA7), o3(0xE6,0xA3,0x95),
+     o3(0xE6,0xA4,0xB6), o3(0xE6,0xA4,0x92),
+     o3(0xE6,0xA4,0x84), o3(0xE6,0xA3,0x97),
+     o3(0xE6,0xA3,0xA3), o3(0xE6,0xA4,0xA5),
+     o3(0xE6,0xA3,0xB9), o3(0xE6,0xA3,0xA0),
+     o3(0xE6,0xA3,0xAF), o3(0xE6,0xA4,0xA8),
+     o3(0xE6,0xA4,0xAA), o3(0xE6,0xA4,0x9A),
+     o3(0xE6,0xA4,0xA3), o3(0xE6,0xA4,0xA1),
+     o3(0xE6,0xA3,0x86), o3(0xE6,0xA5,0xB9),
+     o3(0xE6,0xA5,0xB7), o3(0xE6,0xA5,0x9C),
+     o3(0xE6,0xA5,0xB8), o3(0xE6,0xA5,0xAB),
+     o3(0xE6,0xA5,0x94), o3(0xE6,0xA5,0xBE),
+     o3(0xE6,0xA5,0xAE), o3(0xE6,0xA4,0xB9),
+     o3(0xE6,0xA5,0xB4), o3(0xE6,0xA4,0xBD),
+     o3(0xE6,0xA5,0x99), o3(0xE6,0xA4,0xB0),
+     o3(0xE6,0xA5,0xA1), o3(0xE6,0xA5,0x9E),
+     o3(0xE6,0xA5,0x9D), o3(0xE6,0xA6,0x81),
+     o3(0xE6,0xA5,0xAA), o3(0xE6,0xA6,0xB2),
+     o3(0xE6,0xA6,0xAE), o3(0xE6,0xA7,0x90),
+     o3(0xE6,0xA6,0xBF), o3(0xE6,0xA7,0x81),
+     o3(0xE6,0xA7,0x93), o3(0xE6,0xA6,0xBE),
+     o3(0xE6,0xA7,0x8E), o3(0xE5,0xAF,0xA8),
+     o3(0xE6,0xA7,0x8A), o3(0xE6,0xA7,0x9D),
+     o3(0xE6,0xA6,0xBB), o3(0xE6,0xA7,0x83),
+     o3(0xE6,0xA6,0xA7), o3(0xE6,0xA8,0xAE),
+     o3(0xE6,0xA6,0x91), o3(0xE6,0xA6,0xA0),
+     o3(0xE6,0xA6,0x9C), o3(0xE6,0xA6,0x95),
+     o3(0xE6,0xA6,0xB4), o3(0xE6,0xA7,0x9E),
+     o3(0xE6,0xA7,0xA8), o3(0xE6,0xA8,0x82),
+     o3(0xE6,0xA8,0x9B), o3(0xE6,0xA7,0xBF),
+     o3(0xE6,0xAC,0x8A), o3(0xE6,0xA7,0xB9),
+     o3(0xE6,0xA7,0xB2), o3(0xE6,0xA7,0xA7),
+     o3(0xE6,0xA8,0x85), o3(0xE6,0xA6,0xB1),
+     o3(0xE6,0xA8,0x9E), o3(0xE6,0xA7,0xAD),
+     o3(0xE6,0xA8,0x94), o3(0xE6,0xA7,0xAB),
+     o3(0xE6,0xA8,0x8A), o3(0xE6,0xA8,0x92),
+     o3(0xE6,0xAB,0x81), o3(0xE6,0xA8,0xA3),
+     o3(0xE6,0xA8,0x93), o3(0xE6,0xA9,0x84),
+     o3(0xE6,0xA8,0x8C), o3(0xE6,0xA9,0xB2),
+     o3(0xE6,0xA8,0xB6), o3(0xE6,0xA9,0xB8),
+     o3(0xE6,0xA9,0x87), o3(0xE6,0xA9,0xA2),
+     o3(0xE6,0xA9,0x99), o3(0xE6,0xA9,0xA6),
+     o3(0xE6,0xA9,0x88), o3(0xE6,0xA8,0xB8),
+     o3(0xE6,0xA8,0xA2), o3(0xE6,0xAA,0x90),
+     o3(0xE6,0xAA,0x8D), o3(0xE6,0xAA,0xA0),
+     o3(0xE6,0xAA,0x84), o3(0xE6,0xAA,0xA2),
+     o3(0xE6,0xAA,0xA3),
+
+#define from_Shift_JIS_9E WORDINDEX2INFO(4800)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9E_infos,
+
+#define from_Shift_JIS_9F_infos WORDINDEX2INFO(4802)
+                INVALID, o3(0xE6,0xAA,0x97),
+     o3(0xE8,0x98,0x97), o3(0xE6,0xAA,0xBB),
+     o3(0xE6,0xAB,0x83), o3(0xE6,0xAB,0x82),
+     o3(0xE6,0xAA,0xB8), o3(0xE6,0xAA,0xB3),
+     o3(0xE6,0xAA,0xAC), o3(0xE6,0xAB,0x9E),
+     o3(0xE6,0xAB,0x91), o3(0xE6,0xAB,0x9F),
+     o3(0xE6,0xAA,0xAA), o3(0xE6,0xAB,0x9A),
+     o3(0xE6,0xAB,0xAA), o3(0xE6,0xAB,0xBB),
+     o3(0xE6,0xAC,0x85), o3(0xE8,0x98,0x96),
+     o3(0xE6,0xAB,0xBA), o3(0xE6,0xAC,0x92),
+     o3(0xE6,0xAC,0x96), o3(0xE9,0xAC,0xB1),
+     o3(0xE6,0xAC,0x9F), o3(0xE6,0xAC,0xB8),
+     o3(0xE6,0xAC,0xB7), o3(0xE7,0x9B,0x9C),
+     o3(0xE6,0xAC,0xB9), o3(0xE9,0xA3,0xAE),
+     o3(0xE6,0xAD,0x87), o3(0xE6,0xAD,0x83),
+     o3(0xE6,0xAD,0x89), o3(0xE6,0xAD,0x90),
+     o3(0xE6,0xAD,0x99), o3(0xE6,0xAD,0x94),
+     o3(0xE6,0xAD,0x9B), o3(0xE6,0xAD,0x9F),
+     o3(0xE6,0xAD,0xA1), o3(0xE6,0xAD,0xB8),
+     o3(0xE6,0xAD,0xB9), o3(0xE6,0xAD,0xBF),
+     o3(0xE6,0xAE,0x80), o3(0xE6,0xAE,0x84),
+     o3(0xE6,0xAE,0x83), o3(0xE6,0xAE,0x8D),
+     o3(0xE6,0xAE,0x98), o3(0xE6,0xAE,0x95),
+     o3(0xE6,0xAE,0x9E), o3(0xE6,0xAE,0xA4),
+     o3(0xE6,0xAE,0xAA), o3(0xE6,0xAE,0xAB),
+     o3(0xE6,0xAE,0xAF), o3(0xE6,0xAE,0xB2),
+     o3(0xE6,0xAE,0xB1), o3(0xE6,0xAE,0xB3),
+     o3(0xE6,0xAE,0xB7), o3(0xE6,0xAE,0xBC),
+     o3(0xE6,0xAF,0x86), o3(0xE6,0xAF,0x8B),
+     o3(0xE6,0xAF,0x93), o3(0xE6,0xAF,0x9F),
+     o3(0xE6,0xAF,0xAC), o3(0xE6,0xAF,0xAB),
+     o3(0xE6,0xAF,0xB3), o3(0xE6,0xAF,0xAF),
+     o3(0xE9,0xBA,0xBE), o3(0xE6,0xB0,0x88),
+     o3(0xE6,0xB0,0x93), o3(0xE6,0xB0,0x94),
+     o3(0xE6,0xB0,0x9B), o3(0xE6,0xB0,0xA4),
+     o3(0xE6,0xB0,0xA3), o3(0xE6,0xB1,0x9E),
+     o3(0xE6,0xB1,0x95), o3(0xE6,0xB1,0xA2),
+     o3(0xE6,0xB1,0xAA), o3(0xE6,0xB2,0x82),
+     o3(0xE6,0xB2,0x8D), o3(0xE6,0xB2,0x9A),
+     o3(0xE6,0xB2,0x81), o3(0xE6,0xB2,0x9B),
+     o3(0xE6,0xB1,0xBE), o3(0xE6,0xB1,0xA8),
+     o3(0xE6,0xB1,0xB3), o3(0xE6,0xB2,0x92),
+     o3(0xE6,0xB2,0x90), o3(0xE6,0xB3,0x84),
+     o3(0xE6,0xB3,0xB1), o3(0xE6,0xB3,0x93),
+     o3(0xE6,0xB2,0xBD), o3(0xE6,0xB3,0x97),
+     o3(0xE6,0xB3,0x85), o3(0xE6,0xB3,0x9D),
+     o3(0xE6,0xB2,0xAE), o3(0xE6,0xB2,0xB1),
+     o3(0xE6,0xB2,0xBE), o3(0xE6,0xB2,0xBA),
+     o3(0xE6,0xB3,0x9B), o3(0xE6,0xB3,0xAF),
+     o3(0xE6,0xB3,0x99), o3(0xE6,0xB3,0xAA),
+     o3(0xE6,0xB4,0x9F), o3(0xE8,0xA1,0x8D),
+     o3(0xE6,0xB4,0xB6), o3(0xE6,0xB4,0xAB),
+     o3(0xE6,0xB4,0xBD), o3(0xE6,0xB4,0xB8),
+     o3(0xE6,0xB4,0x99), o3(0xE6,0xB4,0xB5),
+     o3(0xE6,0xB4,0xB3), o3(0xE6,0xB4,0x92),
+     o3(0xE6,0xB4,0x8C), o3(0xE6,0xB5,0xA3),
+     o3(0xE6,0xB6,0x93), o3(0xE6,0xB5,0xA4),
+     o3(0xE6,0xB5,0x9A), o3(0xE6,0xB5,0xB9),
+     o3(0xE6,0xB5,0x99), o3(0xE6,0xB6,0x8E),
+     o3(0xE6,0xB6,0x95), o3(0xE6,0xBF,0xA4),
+     o3(0xE6,0xB6,0x85), o3(0xE6,0xB7,0xB9),
+     o3(0xE6,0xB8,0x95), o3(0xE6,0xB8,0x8A),
+     o3(0xE6,0xB6,0xB5), o3(0xE6,0xB7,0x87),
+     o3(0xE6,0xB7,0xA6), o3(0xE6,0xB6,0xB8),
+     o3(0xE6,0xB7,0x86), o3(0xE6,0xB7,0xAC),
+     o3(0xE6,0xB7,0x9E), o3(0xE6,0xB7,0x8C),
+     o3(0xE6,0xB7,0xA8), o3(0xE6,0xB7,0x92),
+     o3(0xE6,0xB7,0x85), o3(0xE6,0xB7,0xBA),
+     o3(0xE6,0xB7,0x99), o3(0xE6,0xB7,0xA4),
+     o3(0xE6,0xB7,0x95), o3(0xE6,0xB7,0xAA),
+     o3(0xE6,0xB7,0xAE), o3(0xE6,0xB8,0xAD),
+     o3(0xE6,0xB9,0xAE), o3(0xE6,0xB8,0xAE),
+     o3(0xE6,0xB8,0x99), o3(0xE6,0xB9,0xB2),
+     o3(0xE6,0xB9,0x9F), o3(0xE6,0xB8,0xBE),
+     o3(0xE6,0xB8,0xA3), o3(0xE6,0xB9,0xAB),
+     o3(0xE6,0xB8,0xAB), o3(0xE6,0xB9,0xB6),
+     o3(0xE6,0xB9,0x8D), o3(0xE6,0xB8,0x9F),
+     o3(0xE6,0xB9,0x83), o3(0xE6,0xB8,0xBA),
+     o3(0xE6,0xB9,0x8E), o3(0xE6,0xB8,0xA4),
+     o3(0xE6,0xBB,0xBF), o3(0xE6,0xB8,0x9D),
+     o3(0xE6,0xB8,0xB8), o3(0xE6,0xBA,0x82),
+     o3(0xE6,0xBA,0xAA), o3(0xE6,0xBA,0x98),
+     o3(0xE6,0xBB,0x89), o3(0xE6,0xBA,0xB7),
+     o3(0xE6,0xBB,0x93), o3(0xE6,0xBA,0xBD),
+     o3(0xE6,0xBA,0xAF), o3(0xE6,0xBB,0x84),
+     o3(0xE6,0xBA,0xB2), o3(0xE6,0xBB,0x94),
+     o3(0xE6,0xBB,0x95), o3(0xE6,0xBA,0x8F),
+     o3(0xE6,0xBA,0xA5), o3(0xE6,0xBB,0x82),
+     o3(0xE6,0xBA,0x9F), o3(0xE6,0xBD,0x81),
+     o3(0xE6,0xBC,0x91), o3(0xE7,0x81,0x8C),
+     o3(0xE6,0xBB,0xAC), o3(0xE6,0xBB,0xB8),
+     o3(0xE6,0xBB,0xBE), o3(0xE6,0xBC,0xBF),
+     o3(0xE6,0xBB,0xB2), o3(0xE6,0xBC,0xB1),
+     o3(0xE6,0xBB,0xAF), o3(0xE6,0xBC,0xB2),
+     o3(0xE6,0xBB,0x8C),
+
+#define from_Shift_JIS_9F WORDINDEX2INFO(4991)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_9F_infos,
+
+#define from_Shift_JIS_E0_infos WORDINDEX2INFO(4993)
+                INVALID, o3(0xE6,0xBC,0xBE),
+     o3(0xE6,0xBC,0x93), o3(0xE6,0xBB,0xB7),
+     o3(0xE6,0xBE,0x86), o3(0xE6,0xBD,0xBA),
+     o3(0xE6,0xBD,0xB8), o3(0xE6,0xBE,0x81),
+     o3(0xE6,0xBE,0x80), o3(0xE6,0xBD,0xAF),
+     o3(0xE6,0xBD,0x9B), o3(0xE6,0xBF,0xB3),
+     o3(0xE6,0xBD,0xAD), o3(0xE6,0xBE,0x82),
+     o3(0xE6,0xBD,0xBC), o3(0xE6,0xBD,0x98),
+     o3(0xE6,0xBE,0x8E), o3(0xE6,0xBE,0x91),
+     o3(0xE6,0xBF,0x82), o3(0xE6,0xBD,0xA6),
+     o3(0xE6,0xBE,0xB3), o3(0xE6,0xBE,0xA3),
+     o3(0xE6,0xBE,0xA1), o3(0xE6,0xBE,0xA4),
+     o3(0xE6,0xBE,0xB9), o3(0xE6,0xBF,0x86),
+     o3(0xE6,0xBE,0xAA), o3(0xE6,0xBF,0x9F),
+     o3(0xE6,0xBF,0x95), o3(0xE6,0xBF,0xAC),
+     o3(0xE6,0xBF,0x94), o3(0xE6,0xBF,0x98),
+     o3(0xE6,0xBF,0xB1), o3(0xE6,0xBF,0xAE),
+     o3(0xE6,0xBF,0x9B), o3(0xE7,0x80,0x89),
+     o3(0xE7,0x80,0x8B), o3(0xE6,0xBF,0xBA),
+     o3(0xE7,0x80,0x91), o3(0xE7,0x80,0x81),
+     o3(0xE7,0x80,0x8F), o3(0xE6,0xBF,0xBE),
+     o3(0xE7,0x80,0x9B), o3(0xE7,0x80,0x9A),
+     o3(0xE6,0xBD,0xB4), o3(0xE7,0x80,0x9D),
+     o3(0xE7,0x80,0x98), o3(0xE7,0x80,0x9F),
+     o3(0xE7,0x80,0xB0), o3(0xE7,0x80,0xBE),
+     o3(0xE7,0x80,0xB2), o3(0xE7,0x81,0x91),
+     o3(0xE7,0x81,0xA3), o3(0xE7,0x82,0x99),
+     o3(0xE7,0x82,0x92), o3(0xE7,0x82,0xAF),
+     o3(0xE7,0x83,0xB1), o3(0xE7,0x82,0xAC),
+     o3(0xE7,0x82,0xB8), o3(0xE7,0x82,0xB3),
+     o3(0xE7,0x82,0xAE), o3(0xE7,0x83,0x9F),
+     o3(0xE7,0x83,0x8B), o3(0xE7,0x83,0x9D),
+     o3(0xE7,0x83,0x99), o3(0xE7,0x84,0x89),
+     o3(0xE7,0x83,0xBD), o3(0xE7,0x84,0x9C),
+     o3(0xE7,0x84,0x99), o3(0xE7,0x85,0xA5),
+     o3(0xE7,0x85,0x95), o3(0xE7,0x86,0x88),
+     o3(0xE7,0x85,0xA6), o3(0xE7,0x85,0xA2),
+     o3(0xE7,0x85,0x8C), o3(0xE7,0x85,0x96),
+     o3(0xE7,0x85,0xAC), o3(0xE7,0x86,0x8F),
+     o3(0xE7,0x87,0xBB), o3(0xE7,0x86,0x84),
+     o3(0xE7,0x86,0x95), o3(0xE7,0x86,0xA8),
+     o3(0xE7,0x86,0xAC), o3(0xE7,0x87,0x97),
+     o3(0xE7,0x86,0xB9), o3(0xE7,0x86,0xBE),
+     o3(0xE7,0x87,0x92), o3(0xE7,0x87,0x89),
+     o3(0xE7,0x87,0x94), o3(0xE7,0x87,0x8E),
+     o3(0xE7,0x87,0xA0), o3(0xE7,0x87,0xAC),
+     o3(0xE7,0x87,0xA7), o3(0xE7,0x87,0xB5),
+     o3(0xE7,0x87,0xBC), o3(0xE7,0x87,0xB9),
+     o3(0xE7,0x87,0xBF), o3(0xE7,0x88,0x8D),
+     o3(0xE7,0x88,0x90), o3(0xE7,0x88,0x9B),
+     o3(0xE7,0x88,0xA8), o3(0xE7,0x88,0xAD),
+     o3(0xE7,0x88,0xAC), o3(0xE7,0x88,0xB0),
+     o3(0xE7,0x88,0xB2), o3(0xE7,0x88,0xBB),
+     o3(0xE7,0x88,0xBC), o3(0xE7,0x88,0xBF),
+     o3(0xE7,0x89,0x80), o3(0xE7,0x89,0x86),
+     o3(0xE7,0x89,0x8B), o3(0xE7,0x89,0x98),
+     o3(0xE7,0x89,0xB4), o3(0xE7,0x89,0xBE),
+     o3(0xE7,0x8A,0x82), o3(0xE7,0x8A,0x81),
+     o3(0xE7,0x8A,0x87), o3(0xE7,0x8A,0x92),
+     o3(0xE7,0x8A,0x96), o3(0xE7,0x8A,0xA2),
+     o3(0xE7,0x8A,0xA7), o3(0xE7,0x8A,0xB9),
+     o3(0xE7,0x8A,0xB2), o3(0xE7,0x8B,0x83),
+     o3(0xE7,0x8B,0x86), o3(0xE7,0x8B,0x84),
+     o3(0xE7,0x8B,0x8E), o3(0xE7,0x8B,0x92),
+     o3(0xE7,0x8B,0xA2), o3(0xE7,0x8B,0xA0),
+     o3(0xE7,0x8B,0xA1), o3(0xE7,0x8B,0xB9),
+     o3(0xE7,0x8B,0xB7), o3(0xE5,0x80,0x8F),
+     o3(0xE7,0x8C,0x97), o3(0xE7,0x8C,0x8A),
+     o3(0xE7,0x8C,0x9C), o3(0xE7,0x8C,0x96),
+     o3(0xE7,0x8C,0x9D), o3(0xE7,0x8C,0xB4),
+     o3(0xE7,0x8C,0xAF), o3(0xE7,0x8C,0xA9),
+     o3(0xE7,0x8C,0xA5), o3(0xE7,0x8C,0xBE),
+     o3(0xE7,0x8D,0x8E), o3(0xE7,0x8D,0x8F),
+     o3(0xE9,0xBB,0x98), o3(0xE7,0x8D,0x97),
+     o3(0xE7,0x8D,0xAA), o3(0xE7,0x8D,0xA8),
+     o3(0xE7,0x8D,0xB0), o3(0xE7,0x8D,0xB8),
+     o3(0xE7,0x8D,0xB5), o3(0xE7,0x8D,0xBB),
+     o3(0xE7,0x8D,0xBA), o3(0xE7,0x8F,0x88),
+     o3(0xE7,0x8E,0xB3), o3(0xE7,0x8F,0x8E),
+     o3(0xE7,0x8E,0xBB), o3(0xE7,0x8F,0x80),
+     o3(0xE7,0x8F,0xA5), o3(0xE7,0x8F,0xAE),
+     o3(0xE7,0x8F,0x9E), o3(0xE7,0x92,0xA2),
+     o3(0xE7,0x90,0x85), o3(0xE7,0x91,0xAF),
+     o3(0xE7,0x90,0xA5), o3(0xE7,0x8F,0xB8),
+     o3(0xE7,0x90,0xB2), o3(0xE7,0x90,0xBA),
+     o3(0xE7,0x91,0x95), o3(0xE7,0x90,0xBF),
+     o3(0xE7,0x91,0x9F), o3(0xE7,0x91,0x99),
+     o3(0xE7,0x91,0x81), o3(0xE7,0x91,0x9C),
+     o3(0xE7,0x91,0xA9), o3(0xE7,0x91,0xB0),
+     o3(0xE7,0x91,0xA3), o3(0xE7,0x91,0xAA),
+     o3(0xE7,0x91,0xB6), o3(0xE7,0x91,0xBE),
+     o3(0xE7,0x92,0x8B), o3(0xE7,0x92,0x9E),
+     o3(0xE7,0x92,0xA7), o3(0xE7,0x93,0x8A),
+     o3(0xE7,0x93,0x8F), o3(0xE7,0x93,0x94),
+     o3(0xE7,0x8F,0xB1),
+
+#define from_Shift_JIS_E0 WORDINDEX2INFO(5182)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E0_infos,
+
+#define from_Shift_JIS_E1_infos WORDINDEX2INFO(5184)
+                INVALID, o3(0xE7,0x93,0xA0),
+     o3(0xE7,0x93,0xA3), o3(0xE7,0x93,0xA7),
+     o3(0xE7,0x93,0xA9), o3(0xE7,0x93,0xAE),
+     o3(0xE7,0x93,0xB2), o3(0xE7,0x93,0xB0),
+     o3(0xE7,0x93,0xB1), o3(0xE7,0x93,0xB8),
+     o3(0xE7,0x93,0xB7), o3(0xE7,0x94,0x84),
+     o3(0xE7,0x94,0x83), o3(0xE7,0x94,0x85),
+     o3(0xE7,0x94,0x8C), o3(0xE7,0x94,0x8E),
+     o3(0xE7,0x94,0x8D), o3(0xE7,0x94,0x95),
+     o3(0xE7,0x94,0x93), o3(0xE7,0x94,0x9E),
+     o3(0xE7,0x94,0xA6), o3(0xE7,0x94,0xAC),
+     o3(0xE7,0x94,0xBC), o3(0xE7,0x95,0x84),
+     o3(0xE7,0x95,0x8D), o3(0xE7,0x95,0x8A),
+     o3(0xE7,0x95,0x89), o3(0xE7,0x95,0x9B),
+     o3(0xE7,0x95,0x86), o3(0xE7,0x95,0x9A),
+     o3(0xE7,0x95,0xA9), o3(0xE7,0x95,0xA4),
+     o3(0xE7,0x95,0xA7), o3(0xE7,0x95,0xAB),
+     o3(0xE7,0x95,0xAD), o3(0xE7,0x95,0xB8),
+     o3(0xE7,0x95,0xB6), o3(0xE7,0x96,0x86),
+     o3(0xE7,0x96,0x87), o3(0xE7,0x95,0xB4),
+     o3(0xE7,0x96,0x8A), o3(0xE7,0x96,0x89),
+     o3(0xE7,0x96,0x82), o3(0xE7,0x96,0x94),
+     o3(0xE7,0x96,0x9A), o3(0xE7,0x96,0x9D),
+     o3(0xE7,0x96,0xA5), o3(0xE7,0x96,0xA3),
+     o3(0xE7,0x97,0x82), o3(0xE7,0x96,0xB3),
+     o3(0xE7,0x97,0x83), o3(0xE7,0x96,0xB5),
+     o3(0xE7,0x96,0xBD), o3(0xE7,0x96,0xB8),
+     o3(0xE7,0x96,0xBC), o3(0xE7,0x96,0xB1),
+     o3(0xE7,0x97,0x8D), o3(0xE7,0x97,0x8A),
+     o3(0xE7,0x97,0x92), o3(0xE7,0x97,0x99),
+     o3(0xE7,0x97,0xA3), o3(0xE7,0x97,0x9E),
+     o3(0xE7,0x97,0xBE), o3(0xE7,0x97,0xBF),
+     o3(0xE7,0x97,0xBC), o3(0xE7,0x98,0x81),
+     o3(0xE7,0x97,0xB0), o3(0xE7,0x97,0xBA),
+     o3(0xE7,0x97,0xB2), o3(0xE7,0x97,0xB3),
+     o3(0xE7,0x98,0x8B), o3(0xE7,0x98,0x8D),
+     o3(0xE7,0x98,0x89), o3(0xE7,0x98,0x9F),
+     o3(0xE7,0x98,0xA7), o3(0xE7,0x98,0xA0),
+     o3(0xE7,0x98,0xA1), o3(0xE7,0x98,0xA2),
+     o3(0xE7,0x98,0xA4), o3(0xE7,0x98,0xB4),
+     o3(0xE7,0x98,0xB0), o3(0xE7,0x98,0xBB),
+     o3(0xE7,0x99,0x87), o3(0xE7,0x99,0x88),
+     o3(0xE7,0x99,0x86), o3(0xE7,0x99,0x9C),
+     o3(0xE7,0x99,0x98), o3(0xE7,0x99,0xA1),
+     o3(0xE7,0x99,0xA2), o3(0xE7,0x99,0xA8),
+     o3(0xE7,0x99,0xA9), o3(0xE7,0x99,0xAA),
+     o3(0xE7,0x99,0xA7), o3(0xE7,0x99,0xAC),
+     o3(0xE7,0x99,0xB0), o3(0xE7,0x99,0xB2),
+     o3(0xE7,0x99,0xB6), o3(0xE7,0x99,0xB8),
+     o3(0xE7,0x99,0xBC), o3(0xE7,0x9A,0x80),
+     o3(0xE7,0x9A,0x83), o3(0xE7,0x9A,0x88),
+     o3(0xE7,0x9A,0x8B), o3(0xE7,0x9A,0x8E),
+     o3(0xE7,0x9A,0x96), o3(0xE7,0x9A,0x93),
+     o3(0xE7,0x9A,0x99), o3(0xE7,0x9A,0x9A),
+     o3(0xE7,0x9A,0xB0), o3(0xE7,0x9A,0xB4),
+     o3(0xE7,0x9A,0xB8), o3(0xE7,0x9A,0xB9),
+     o3(0xE7,0x9A,0xBA), o3(0xE7,0x9B,0x82),
+     o3(0xE7,0x9B,0x8D), o3(0xE7,0x9B,0x96),
+     o3(0xE7,0x9B,0x92), o3(0xE7,0x9B,0x9E),
+     o3(0xE7,0x9B,0xA1), o3(0xE7,0x9B,0xA5),
+     o3(0xE7,0x9B,0xA7), o3(0xE7,0x9B,0xAA),
+     o3(0xE8,0x98,0xAF), o3(0xE7,0x9B,0xBB),
+     o3(0xE7,0x9C,0x88), o3(0xE7,0x9C,0x87),
+     o3(0xE7,0x9C,0x84), o3(0xE7,0x9C,0xA9),
+     o3(0xE7,0x9C,0xA4), o3(0xE7,0x9C,0x9E),
+     o3(0xE7,0x9C,0xA5), o3(0xE7,0x9C,0xA6),
+     o3(0xE7,0x9C,0x9B), o3(0xE7,0x9C,0xB7),
+     o3(0xE7,0x9C,0xB8), o3(0xE7,0x9D,0x87),
+     o3(0xE7,0x9D,0x9A), o3(0xE7,0x9D,0xA8),
+     o3(0xE7,0x9D,0xAB), o3(0xE7,0x9D,0x9B),
+     o3(0xE7,0x9D,0xA5), o3(0xE7,0x9D,0xBF),
+     o3(0xE7,0x9D,0xBE), o3(0xE7,0x9D,0xB9),
+     o3(0xE7,0x9E,0x8E), o3(0xE7,0x9E,0x8B),
+     o3(0xE7,0x9E,0x91), o3(0xE7,0x9E,0xA0),
+     o3(0xE7,0x9E,0x9E), o3(0xE7,0x9E,0xB0),
+     o3(0xE7,0x9E,0xB6), o3(0xE7,0x9E,0xB9),
+     o3(0xE7,0x9E,0xBF), o3(0xE7,0x9E,0xBC),
+     o3(0xE7,0x9E,0xBD), o3(0xE7,0x9E,0xBB),
+     o3(0xE7,0x9F,0x87), o3(0xE7,0x9F,0x8D),
+     o3(0xE7,0x9F,0x97), o3(0xE7,0x9F,0x9A),
+     o3(0xE7,0x9F,0x9C), o3(0xE7,0x9F,0xA3),
+     o3(0xE7,0x9F,0xAE), o3(0xE7,0x9F,0xBC),
+     o3(0xE7,0xA0,0x8C), o3(0xE7,0xA0,0x92),
+     o3(0xE7,0xA4,0xA6), o3(0xE7,0xA0,0xA0),
+     o3(0xE7,0xA4,0xAA), o3(0xE7,0xA1,0x85),
+     o3(0xE7,0xA2,0x8E), o3(0xE7,0xA1,0xB4),
+     o3(0xE7,0xA2,0x86), o3(0xE7,0xA1,0xBC),
+     o3(0xE7,0xA2,0x9A), o3(0xE7,0xA2,0x8C),
+     o3(0xE7,0xA2,0xA3), o3(0xE7,0xA2,0xB5),
+     o3(0xE7,0xA2,0xAA), o3(0xE7,0xA2,0xAF),
+     o3(0xE7,0xA3,0x91), o3(0xE7,0xA3,0x86),
+     o3(0xE7,0xA3,0x8B), o3(0xE7,0xA3,0x94),
+     o3(0xE7,0xA2,0xBE), o3(0xE7,0xA2,0xBC),
+     o3(0xE7,0xA3,0x85), o3(0xE7,0xA3,0x8A),
+     o3(0xE7,0xA3,0xAC),
+
+#define from_Shift_JIS_E1 WORDINDEX2INFO(5373)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E1_infos,
+
+#define from_Shift_JIS_E2_infos WORDINDEX2INFO(5375)
+                INVALID, o3(0xE7,0xA3,0xA7),
+     o3(0xE7,0xA3,0x9A), o3(0xE7,0xA3,0xBD),
+     o3(0xE7,0xA3,0xB4), o3(0xE7,0xA4,0x87),
+     o3(0xE7,0xA4,0x92), o3(0xE7,0xA4,0x91),
+     o3(0xE7,0xA4,0x99), o3(0xE7,0xA4,0xAC),
+     o3(0xE7,0xA4,0xAB), o3(0xE7,0xA5,0x80),
+     o3(0xE7,0xA5,0xA0), o3(0xE7,0xA5,0x97),
+     o3(0xE7,0xA5,0x9F), o3(0xE7,0xA5,0x9A),
+     o3(0xE7,0xA5,0x95), o3(0xE7,0xA5,0x93),
+     o3(0xE7,0xA5,0xBA), o3(0xE7,0xA5,0xBF),
+     o3(0xE7,0xA6,0x8A), o3(0xE7,0xA6,0x9D),
+     o3(0xE7,0xA6,0xA7), o3(0xE9,0xBD,0x8B),
+     o3(0xE7,0xA6,0xAA), o3(0xE7,0xA6,0xAE),
+     o3(0xE7,0xA6,0xB3), o3(0xE7,0xA6,0xB9),
+     o3(0xE7,0xA6,0xBA), o3(0xE7,0xA7,0x89),
+     o3(0xE7,0xA7,0x95), o3(0xE7,0xA7,0xA7),
+     o3(0xE7,0xA7,0xAC), o3(0xE7,0xA7,0xA1),
+     o3(0xE7,0xA7,0xA3), o3(0xE7,0xA8,0x88),
+     o3(0xE7,0xA8,0x8D), o3(0xE7,0xA8,0x98),
+     o3(0xE7,0xA8,0x99), o3(0xE7,0xA8,0xA0),
+     o3(0xE7,0xA8,0x9F), o3(0xE7,0xA6,0x80),
+     o3(0xE7,0xA8,0xB1), o3(0xE7,0xA8,0xBB),
+     o3(0xE7,0xA8,0xBE), o3(0xE7,0xA8,0xB7),
+     o3(0xE7,0xA9,0x83), o3(0xE7,0xA9,0x97),
+     o3(0xE7,0xA9,0x89), o3(0xE7,0xA9,0xA1),
+     o3(0xE7,0xA9,0xA2), o3(0xE7,0xA9,0xA9),
+     o3(0xE9,0xBE,0x9D), o3(0xE7,0xA9,0xB0),
+     o3(0xE7,0xA9,0xB9), o3(0xE7,0xA9,0xBD),
+     o3(0xE7,0xAA,0x88), o3(0xE7,0xAA,0x97),
+     o3(0xE7,0xAA,0x95), o3(0xE7,0xAA,0x98),
+     o3(0xE7,0xAA,0x96), o3(0xE7,0xAA,0xA9),
+     o3(0xE7,0xAB,0x88), o3(0xE7,0xAA,0xB0),
+     o3(0xE7,0xAA,0xB6), o3(0xE7,0xAB,0x85),
+     o3(0xE7,0xAB,0x84), o3(0xE7,0xAA,0xBF),
+     o3(0xE9,0x82,0x83), o3(0xE7,0xAB,0x87),
+     o3(0xE7,0xAB,0x8A), o3(0xE7,0xAB,0x8D),
+     o3(0xE7,0xAB,0x8F), o3(0xE7,0xAB,0x95),
+     o3(0xE7,0xAB,0x93), o3(0xE7,0xAB,0x99),
+     o3(0xE7,0xAB,0x9A), o3(0xE7,0xAB,0x9D),
+     o3(0xE7,0xAB,0xA1), o3(0xE7,0xAB,0xA2),
+     o3(0xE7,0xAB,0xA6), o3(0xE7,0xAB,0xAD),
+     o3(0xE7,0xAB,0xB0), o3(0xE7,0xAC,0x82),
+     o3(0xE7,0xAC,0x8F), o3(0xE7,0xAC,0x8A),
+     o3(0xE7,0xAC,0x86), o3(0xE7,0xAC,0xB3),
+     o3(0xE7,0xAC,0x98), o3(0xE7,0xAC,0x99),
+     o3(0xE7,0xAC,0x9E), o3(0xE7,0xAC,0xB5),
+     o3(0xE7,0xAC,0xA8), o3(0xE7,0xAC,0xB6),
+     o3(0xE7,0xAD,0x90), o3(0xE7,0xAD,0xBA),
+     o3(0xE7,0xAC,0x84), o3(0xE7,0xAD,0x8D),
+     o3(0xE7,0xAC,0x8B), o3(0xE7,0xAD,0x8C),
+     o3(0xE7,0xAD,0x85), o3(0xE7,0xAD,0xB5),
+     o3(0xE7,0xAD,0xA5), o3(0xE7,0xAD,0xB4),
+     o3(0xE7,0xAD,0xA7), o3(0xE7,0xAD,0xB0),
+     o3(0xE7,0xAD,0xB1), o3(0xE7,0xAD,0xAC),
+     o3(0xE7,0xAD,0xAE), o3(0xE7,0xAE,0x9D),
+     o3(0xE7,0xAE,0x98), o3(0xE7,0xAE,0x9F),
+     o3(0xE7,0xAE,0x8D), o3(0xE7,0xAE,0x9C),
+     o3(0xE7,0xAE,0x9A), o3(0xE7,0xAE,0x8B),
+     o3(0xE7,0xAE,0x92), o3(0xE7,0xAE,0x8F),
+     o3(0xE7,0xAD,0x9D), o3(0xE7,0xAE,0x99),
+     o3(0xE7,0xAF,0x8B), o3(0xE7,0xAF,0x81),
+     o3(0xE7,0xAF,0x8C), o3(0xE7,0xAF,0x8F),
+     o3(0xE7,0xAE,0xB4), o3(0xE7,0xAF,0x86),
+     o3(0xE7,0xAF,0x9D), o3(0xE7,0xAF,0xA9),
+     o3(0xE7,0xB0,0x91), o3(0xE7,0xB0,0x94),
+     o3(0xE7,0xAF,0xA6), o3(0xE7,0xAF,0xA5),
+     o3(0xE7,0xB1,0xA0), o3(0xE7,0xB0,0x80),
+     o3(0xE7,0xB0,0x87), o3(0xE7,0xB0,0x93),
+     o3(0xE7,0xAF,0xB3), o3(0xE7,0xAF,0xB7),
+     o3(0xE7,0xB0,0x97), o3(0xE7,0xB0,0x8D),
+     o3(0xE7,0xAF,0xB6), o3(0xE7,0xB0,0xA3),
+     o3(0xE7,0xB0,0xA7), o3(0xE7,0xB0,0xAA),
+     o3(0xE7,0xB0,0x9F), o3(0xE7,0xB0,0xB7),
+     o3(0xE7,0xB0,0xAB), o3(0xE7,0xB0,0xBD),
+     o3(0xE7,0xB1,0x8C), o3(0xE7,0xB1,0x83),
+     o3(0xE7,0xB1,0x94), o3(0xE7,0xB1,0x8F),
+     o3(0xE7,0xB1,0x80), o3(0xE7,0xB1,0x90),
+     o3(0xE7,0xB1,0x98), o3(0xE7,0xB1,0x9F),
+     o3(0xE7,0xB1,0xA4), o3(0xE7,0xB1,0x96),
+     o3(0xE7,0xB1,0xA5), o3(0xE7,0xB1,0xAC),
+     o3(0xE7,0xB1,0xB5), o3(0xE7,0xB2,0x83),
+     o3(0xE7,0xB2,0x90), o3(0xE7,0xB2,0xA4),
+     o3(0xE7,0xB2,0xAD), o3(0xE7,0xB2,0xA2),
+     o3(0xE7,0xB2,0xAB), o3(0xE7,0xB2,0xA1),
+     o3(0xE7,0xB2,0xA8), o3(0xE7,0xB2,0xB3),
+     o3(0xE7,0xB2,0xB2), o3(0xE7,0xB2,0xB1),
+     o3(0xE7,0xB2,0xAE), o3(0xE7,0xB2,0xB9),
+     o3(0xE7,0xB2,0xBD), o3(0xE7,0xB3,0x80),
+     o3(0xE7,0xB3,0x85), o3(0xE7,0xB3,0x82),
+     o3(0xE7,0xB3,0x98), o3(0xE7,0xB3,0x92),
+     o3(0xE7,0xB3,0x9C), o3(0xE7,0xB3,0xA2),
+     o3(0xE9,0xAC,0xBB), o3(0xE7,0xB3,0xAF),
+     o3(0xE7,0xB3,0xB2), o3(0xE7,0xB3,0xB4),
+     o3(0xE7,0xB3,0xB6), o3(0xE7,0xB3,0xBA),
+     o3(0xE7,0xB4,0x86),
+
+#define from_Shift_JIS_E2 WORDINDEX2INFO(5564)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E2_infos,
+
+#define from_Shift_JIS_E3_infos WORDINDEX2INFO(5566)
+                INVALID, o3(0xE7,0xB4,0x82),
+     o3(0xE7,0xB4,0x9C), o3(0xE7,0xB4,0x95),
+     o3(0xE7,0xB4,0x8A), o3(0xE7,0xB5,0x85),
+     o3(0xE7,0xB5,0x8B), o3(0xE7,0xB4,0xAE),
+     o3(0xE7,0xB4,0xB2), o3(0xE7,0xB4,0xBF),
+     o3(0xE7,0xB4,0xB5), o3(0xE7,0xB5,0x86),
+     o3(0xE7,0xB5,0xB3), o3(0xE7,0xB5,0x96),
+     o3(0xE7,0xB5,0x8E), o3(0xE7,0xB5,0xB2),
+     o3(0xE7,0xB5,0xA8), o3(0xE7,0xB5,0xAE),
+     o3(0xE7,0xB5,0x8F), o3(0xE7,0xB5,0xA3),
+     o3(0xE7,0xB6,0x93), o3(0xE7,0xB6,0x89),
+     o3(0xE7,0xB5,0x9B), o3(0xE7,0xB6,0x8F),
+     o3(0xE7,0xB5,0xBD), o3(0xE7,0xB6,0x9B),
+     o3(0xE7,0xB6,0xBA), o3(0xE7,0xB6,0xAE),
+     o3(0xE7,0xB6,0xA3), o3(0xE7,0xB6,0xB5),
+     o3(0xE7,0xB7,0x87), o3(0xE7,0xB6,0xBD),
+     o3(0xE7,0xB6,0xAB), o3(0xE7,0xB8,0xBD),
+     o3(0xE7,0xB6,0xA2), o3(0xE7,0xB6,0xAF),
+     o3(0xE7,0xB7,0x9C), o3(0xE7,0xB6,0xB8),
+     o3(0xE7,0xB6,0x9F), o3(0xE7,0xB6,0xB0),
+     o3(0xE7,0xB7,0x98), o3(0xE7,0xB7,0x9D),
+     o3(0xE7,0xB7,0xA4), o3(0xE7,0xB7,0x9E),
+     o3(0xE7,0xB7,0xBB), o3(0xE7,0xB7,0xB2),
+     o3(0xE7,0xB7,0xA1), o3(0xE7,0xB8,0x85),
+     o3(0xE7,0xB8,0x8A), o3(0xE7,0xB8,0xA3),
+     o3(0xE7,0xB8,0xA1), o3(0xE7,0xB8,0x92),
+     o3(0xE7,0xB8,0xB1), o3(0xE7,0xB8,0x9F),
+     o3(0xE7,0xB8,0x89), o3(0xE7,0xB8,0x8B),
+     o3(0xE7,0xB8,0xA2), o3(0xE7,0xB9,0x86),
+     o3(0xE7,0xB9,0xA6), o3(0xE7,0xB8,0xBB),
+     o3(0xE7,0xB8,0xB5), o3(0xE7,0xB8,0xB9),
+     o3(0xE7,0xB9,0x83), o3(0xE7,0xB8,0xB7),
+     o3(0xE7,0xB8,0xB2), o3(0xE7,0xB8,0xBA),
+     o3(0xE7,0xB9,0xA7), o3(0xE7,0xB9,0x9D),
+     o3(0xE7,0xB9,0x96), o3(0xE7,0xB9,0x9E),
+     o3(0xE7,0xB9,0x99), o3(0xE7,0xB9,0x9A),
+     o3(0xE7,0xB9,0xB9), o3(0xE7,0xB9,0xAA),
+     o3(0xE7,0xB9,0xA9), o3(0xE7,0xB9,0xBC),
+     o3(0xE7,0xB9,0xBB), o3(0xE7,0xBA,0x83),
+     o3(0xE7,0xB7,0x95), o3(0xE7,0xB9,0xBD),
+     o3(0xE8,0xBE,0xAE), o3(0xE7,0xB9,0xBF),
+     o3(0xE7,0xBA,0x88), o3(0xE7,0xBA,0x89),
+     o3(0xE7,0xBA,0x8C), o3(0xE7,0xBA,0x92),
+     o3(0xE7,0xBA,0x90), o3(0xE7,0xBA,0x93),
+     o3(0xE7,0xBA,0x94), o3(0xE7,0xBA,0x96),
+     o3(0xE7,0xBA,0x8E), o3(0xE7,0xBA,0x9B),
+     o3(0xE7,0xBA,0x9C), o3(0xE7,0xBC,0xB8),
+     o3(0xE7,0xBC,0xBA), o3(0xE7,0xBD,0x85),
+     o3(0xE7,0xBD,0x8C), o3(0xE7,0xBD,0x8D),
+     o3(0xE7,0xBD,0x8E), o3(0xE7,0xBD,0x90),
+     o3(0xE7,0xBD,0x91), o3(0xE7,0xBD,0x95),
+     o3(0xE7,0xBD,0x94), o3(0xE7,0xBD,0x98),
+     o3(0xE7,0xBD,0x9F), o3(0xE7,0xBD,0xA0),
+     o3(0xE7,0xBD,0xA8), o3(0xE7,0xBD,0xA9),
+     o3(0xE7,0xBD,0xA7), o3(0xE7,0xBD,0xB8),
+     o3(0xE7,0xBE,0x82), o3(0xE7,0xBE,0x86),
+     o3(0xE7,0xBE,0x83), o3(0xE7,0xBE,0x88),
+     o3(0xE7,0xBE,0x87), o3(0xE7,0xBE,0x8C),
+     o3(0xE7,0xBE,0x94), o3(0xE7,0xBE,0x9E),
+     o3(0xE7,0xBE,0x9D), o3(0xE7,0xBE,0x9A),
+     o3(0xE7,0xBE,0xA3), o3(0xE7,0xBE,0xAF),
+     o3(0xE7,0xBE,0xB2), o3(0xE7,0xBE,0xB9),
+     o3(0xE7,0xBE,0xAE), o3(0xE7,0xBE,0xB6),
+     o3(0xE7,0xBE,0xB8), o3(0xE8,0xAD,0xB1),
+     o3(0xE7,0xBF,0x85), o3(0xE7,0xBF,0x86),
+     o3(0xE7,0xBF,0x8A), o3(0xE7,0xBF,0x95),
+     o3(0xE7,0xBF,0x94), o3(0xE7,0xBF,0xA1),
+     o3(0xE7,0xBF,0xA6), o3(0xE7,0xBF,0xA9),
+     o3(0xE7,0xBF,0xB3), o3(0xE7,0xBF,0xB9),
+     o3(0xE9,0xA3,0x9C), o3(0xE8,0x80,0x86),
+     o3(0xE8,0x80,0x84), o3(0xE8,0x80,0x8B),
+     o3(0xE8,0x80,0x92), o3(0xE8,0x80,0x98),
+     o3(0xE8,0x80,0x99), o3(0xE8,0x80,0x9C),
+     o3(0xE8,0x80,0xA1), o3(0xE8,0x80,0xA8),
+     o3(0xE8,0x80,0xBF), o3(0xE8,0x80,0xBB),
+     o3(0xE8,0x81,0x8A), o3(0xE8,0x81,0x86),
+     o3(0xE8,0x81,0x92), o3(0xE8,0x81,0x98),
+     o3(0xE8,0x81,0x9A), o3(0xE8,0x81,0x9F),
+     o3(0xE8,0x81,0xA2), o3(0xE8,0x81,0xA8),
+     o3(0xE8,0x81,0xB3), o3(0xE8,0x81,0xB2),
+     o3(0xE8,0x81,0xB0), o3(0xE8,0x81,0xB6),
+     o3(0xE8,0x81,0xB9), o3(0xE8,0x81,0xBD),
+     o3(0xE8,0x81,0xBF), o3(0xE8,0x82,0x84),
+     o3(0xE8,0x82,0x86), o3(0xE8,0x82,0x85),
+     o3(0xE8,0x82,0x9B), o3(0xE8,0x82,0x93),
+     o3(0xE8,0x82,0x9A), o3(0xE8,0x82,0xAD),
+     o3(0xE5,0x86,0x90), o3(0xE8,0x82,0xAC),
+     o3(0xE8,0x83,0x9B), o3(0xE8,0x83,0xA5),
+     o3(0xE8,0x83,0x99), o3(0xE8,0x83,0x9D),
+     o3(0xE8,0x83,0x84), o3(0xE8,0x83,0x9A),
+     o3(0xE8,0x83,0x96), o3(0xE8,0x84,0x89),
+     o3(0xE8,0x83,0xAF), o3(0xE8,0x83,0xB1),
+     o3(0xE8,0x84,0x9B), o3(0xE8,0x84,0xA9),
+     o3(0xE8,0x84,0xA3), o3(0xE8,0x84,0xAF),
+     o3(0xE8,0x85,0x8B),
+
+#define from_Shift_JIS_E3 WORDINDEX2INFO(5755)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E3_infos,
+
+#define from_Shift_JIS_E4_infos WORDINDEX2INFO(5757)
+                INVALID, o3(0xE9,0x9A,0x8B),
+     o3(0xE8,0x85,0x86), o3(0xE8,0x84,0xBE),
+     o3(0xE8,0x85,0x93), o3(0xE8,0x85,0x91),
+     o3(0xE8,0x83,0xBC), o3(0xE8,0x85,0xB1),
+     o3(0xE8,0x85,0xAE), o3(0xE8,0x85,0xA5),
+     o3(0xE8,0x85,0xA6), o3(0xE8,0x85,0xB4),
+     o3(0xE8,0x86,0x83), o3(0xE8,0x86,0x88),
+     o3(0xE8,0x86,0x8A), o3(0xE8,0x86,0x80),
+     o3(0xE8,0x86,0x82), o3(0xE8,0x86,0xA0),
+     o3(0xE8,0x86,0x95), o3(0xE8,0x86,0xA4),
+     o3(0xE8,0x86,0xA3), o3(0xE8,0x85,0x9F),
+     o3(0xE8,0x86,0x93), o3(0xE8,0x86,0xA9),
+     o3(0xE8,0x86,0xB0), o3(0xE8,0x86,0xB5),
+     o3(0xE8,0x86,0xBE), o3(0xE8,0x86,0xB8),
+     o3(0xE8,0x86,0xBD), o3(0xE8,0x87,0x80),
+     o3(0xE8,0x87,0x82), o3(0xE8,0x86,0xBA),
+     o3(0xE8,0x87,0x89), o3(0xE8,0x87,0x8D),
+     o3(0xE8,0x87,0x91), o3(0xE8,0x87,0x99),
+     o3(0xE8,0x87,0x98), o3(0xE8,0x87,0x88),
+     o3(0xE8,0x87,0x9A), o3(0xE8,0x87,0x9F),
+     o3(0xE8,0x87,0xA0), o3(0xE8,0x87,0xA7),
+     o3(0xE8,0x87,0xBA), o3(0xE8,0x87,0xBB),
+     o3(0xE8,0x87,0xBE), o3(0xE8,0x88,0x81),
+     o3(0xE8,0x88,0x82), o3(0xE8,0x88,0x85),
+     o3(0xE8,0x88,0x87), o3(0xE8,0x88,0x8A),
+     o3(0xE8,0x88,0x8D), o3(0xE8,0x88,0x90),
+     o3(0xE8,0x88,0x96), o3(0xE8,0x88,0xA9),
+     o3(0xE8,0x88,0xAB), o3(0xE8,0x88,0xB8),
+     o3(0xE8,0x88,0xB3), o3(0xE8,0x89,0x80),
+     o3(0xE8,0x89,0x99), o3(0xE8,0x89,0x98),
+     o3(0xE8,0x89,0x9D), o3(0xE8,0x89,0x9A),
+     o3(0xE8,0x89,0x9F), o3(0xE8,0x89,0xA4),
+     o3(0xE8,0x89,0xA2), o3(0xE8,0x89,0xA8),
+     o3(0xE8,0x89,0xAA), o3(0xE8,0x89,0xAB),
+     o3(0xE8,0x88,0xAE), o3(0xE8,0x89,0xB1),
+     o3(0xE8,0x89,0xB7), o3(0xE8,0x89,0xB8),
+     o3(0xE8,0x89,0xBE), o3(0xE8,0x8A,0x8D),
+     o3(0xE8,0x8A,0x92), o3(0xE8,0x8A,0xAB),
+     o3(0xE8,0x8A,0x9F), o3(0xE8,0x8A,0xBB),
+     o3(0xE8,0x8A,0xAC), o3(0xE8,0x8B,0xA1),
+     o3(0xE8,0x8B,0xA3), o3(0xE8,0x8B,0x9F),
+     o3(0xE8,0x8B,0x92), o3(0xE8,0x8B,0xB4),
+     o3(0xE8,0x8B,0xB3), o3(0xE8,0x8B,0xBA),
+     o3(0xE8,0x8E,0x93), o3(0xE8,0x8C,0x83),
+     o3(0xE8,0x8B,0xBB), o3(0xE8,0x8B,0xB9),
+     o3(0xE8,0x8B,0x9E), o3(0xE8,0x8C,0x86),
+     o3(0xE8,0x8B,0x9C), o3(0xE8,0x8C,0x89),
+     o3(0xE8,0x8B,0x99), o3(0xE8,0x8C,0xB5),
+     o3(0xE8,0x8C,0xB4), o3(0xE8,0x8C,0x96),
+     o3(0xE8,0x8C,0xB2), o3(0xE8,0x8C,0xB1),
+     o3(0xE8,0x8D,0x80), o3(0xE8,0x8C,0xB9),
+     o3(0xE8,0x8D,0x90), o3(0xE8,0x8D,0x85),
+     o3(0xE8,0x8C,0xAF), o3(0xE8,0x8C,0xAB),
+     o3(0xE8,0x8C,0x97), o3(0xE8,0x8C,0x98),
+     o3(0xE8,0x8E,0x85), o3(0xE8,0x8E,0x9A),
+     o3(0xE8,0x8E,0xAA), o3(0xE8,0x8E,0x9F),
+     o3(0xE8,0x8E,0xA2), o3(0xE8,0x8E,0x96),
+     o3(0xE8,0x8C,0xA3), o3(0xE8,0x8E,0x8E),
+     o3(0xE8,0x8E,0x87), o3(0xE8,0x8E,0x8A),
+     o3(0xE8,0x8D,0xBC), o3(0xE8,0x8E,0xB5),
+     o3(0xE8,0x8D,0xB3), o3(0xE8,0x8D,0xB5),
+     o3(0xE8,0x8E,0xA0), o3(0xE8,0x8E,0x89),
+     o3(0xE8,0x8E,0xA8), o3(0xE8,0x8F,0xB4),
+     o3(0xE8,0x90,0x93), o3(0xE8,0x8F,0xAB),
+     o3(0xE8,0x8F,0x8E), o3(0xE8,0x8F,0xBD),
+     o3(0xE8,0x90,0x83), o3(0xE8,0x8F,0x98),
+     o3(0xE8,0x90,0x8B), o3(0xE8,0x8F,0x81),
+     o3(0xE8,0x8F,0xB7), o3(0xE8,0x90,0x87),
+     o3(0xE8,0x8F,0xA0), o3(0xE8,0x8F,0xB2),
+     o3(0xE8,0x90,0x8D), o3(0xE8,0x90,0xA2),
+     o3(0xE8,0x90,0xA0), o3(0xE8,0x8E,0xBD),
+     o3(0xE8,0x90,0xB8), o3(0xE8,0x94,0x86),
+     o3(0xE8,0x8F,0xBB), o3(0xE8,0x91,0xAD),
+     o3(0xE8,0x90,0xAA), o3(0xE8,0x90,0xBC),
+     o3(0xE8,0x95,0x9A), o3(0xE8,0x92,0x84),
+     o3(0xE8,0x91,0xB7), o3(0xE8,0x91,0xAB),
+     o3(0xE8,0x92,0xAD), o3(0xE8,0x91,0xAE),
+     o3(0xE8,0x92,0x82), o3(0xE8,0x91,0xA9),
+     o3(0xE8,0x91,0x86), o3(0xE8,0x90,0xAC),
+     o3(0xE8,0x91,0xAF), o3(0xE8,0x91,0xB9),
+     o3(0xE8,0x90,0xB5), o3(0xE8,0x93,0x8A),
+     o3(0xE8,0x91,0xA2), o3(0xE8,0x92,0xB9),
+     o3(0xE8,0x92,0xBF), o3(0xE8,0x92,0x9F),
+     o3(0xE8,0x93,0x99), o3(0xE8,0x93,0x8D),
+     o3(0xE8,0x92,0xBB), o3(0xE8,0x93,0x9A),
+     o3(0xE8,0x93,0x90), o3(0xE8,0x93,0x81),
+     o3(0xE8,0x93,0x86), o3(0xE8,0x93,0x96),
+     o3(0xE8,0x92,0xA1), o3(0xE8,0x94,0xA1),
+     o3(0xE8,0x93,0xBF), o3(0xE8,0x93,0xB4),
+     o3(0xE8,0x94,0x97), o3(0xE8,0x94,0x98),
+     o3(0xE8,0x94,0xAC), o3(0xE8,0x94,0x9F),
+     o3(0xE8,0x94,0x95), o3(0xE8,0x94,0x94),
+     o3(0xE8,0x93,0xBC), o3(0xE8,0x95,0x80),
+     o3(0xE8,0x95,0xA3), o3(0xE8,0x95,0x98),
+     o3(0xE8,0x95,0x88),
+
+#define from_Shift_JIS_E4 WORDINDEX2INFO(5946)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E4_infos,
+
+#define from_Shift_JIS_E5_infos WORDINDEX2INFO(5948)
+                INVALID, o3(0xE8,0x95,0x81),
+     o3(0xE8,0x98,0x82), o3(0xE8,0x95,0x8B),
+     o3(0xE8,0x95,0x95), o3(0xE8,0x96,0x80),
+     o3(0xE8,0x96,0xA4), o3(0xE8,0x96,0x88),
+     o3(0xE8,0x96,0x91), o3(0xE8,0x96,0x8A),
+     o3(0xE8,0x96,0xA8), o3(0xE8,0x95,0xAD),
+     o3(0xE8,0x96,0x94), o3(0xE8,0x96,0x9B),
+     o3(0xE8,0x97,0xAA), o3(0xE8,0x96,0x87),
+     o3(0xE8,0x96,0x9C), o3(0xE8,0x95,0xB7),
+     o3(0xE8,0x95,0xBE), o3(0xE8,0x96,0x90),
+     o3(0xE8,0x97,0x89), o3(0xE8,0x96,0xBA),
+     o3(0xE8,0x97,0x8F), o3(0xE8,0x96,0xB9),
+     o3(0xE8,0x97,0x90), o3(0xE8,0x97,0x95),
+     o3(0xE8,0x97,0x9D), o3(0xE8,0x97,0xA5),
+     o3(0xE8,0x97,0x9C), o3(0xE8,0x97,0xB9),
+     o3(0xE8,0x98,0x8A), o3(0xE8,0x98,0x93),
+     o3(0xE8,0x98,0x8B), o3(0xE8,0x97,0xBE),
+     o3(0xE8,0x97,0xBA), o3(0xE8,0x98,0x86),
+     o3(0xE8,0x98,0xA2), o3(0xE8,0x98,0x9A),
+     o3(0xE8,0x98,0xB0), o3(0xE8,0x98,0xBF),
+     o3(0xE8,0x99,0x8D), o3(0xE4,0xB9,0x95),
+     o3(0xE8,0x99,0x94), o3(0xE8,0x99,0x9F),
+     o3(0xE8,0x99,0xA7), o3(0xE8,0x99,0xB1),
+     o3(0xE8,0x9A,0x93), o3(0xE8,0x9A,0xA3),
+     o3(0xE8,0x9A,0xA9), o3(0xE8,0x9A,0xAA),
+     o3(0xE8,0x9A,0x8B), o3(0xE8,0x9A,0x8C),
+     o3(0xE8,0x9A,0xB6), o3(0xE8,0x9A,0xAF),
+     o3(0xE8,0x9B,0x84), o3(0xE8,0x9B,0x86),
+     o3(0xE8,0x9A,0xB0), o3(0xE8,0x9B,0x89),
+     o3(0xE8,0xA0,0xA3), o3(0xE8,0x9A,0xAB),
+     o3(0xE8,0x9B,0x94), o3(0xE8,0x9B,0x9E),
+     o3(0xE8,0x9B,0xA9), o3(0xE8,0x9B,0xAC),
+     o3(0xE8,0x9B,0x9F), o3(0xE8,0x9B,0x9B),
+     o3(0xE8,0x9B,0xAF), o3(0xE8,0x9C,0x92),
+     o3(0xE8,0x9C,0x86), o3(0xE8,0x9C,0x88),
+     o3(0xE8,0x9C,0x80), o3(0xE8,0x9C,0x83),
+     o3(0xE8,0x9B,0xBB), o3(0xE8,0x9C,0x91),
+     o3(0xE8,0x9C,0x89), o3(0xE8,0x9C,0x8D),
+     o3(0xE8,0x9B,0xB9), o3(0xE8,0x9C,0x8A),
+     o3(0xE8,0x9C,0xB4), o3(0xE8,0x9C,0xBF),
+     o3(0xE8,0x9C,0xB7), o3(0xE8,0x9C,0xBB),
+     o3(0xE8,0x9C,0xA5), o3(0xE8,0x9C,0xA9),
+     o3(0xE8,0x9C,0x9A), o3(0xE8,0x9D,0xA0),
+     o3(0xE8,0x9D,0x9F), o3(0xE8,0x9D,0xB8),
+     o3(0xE8,0x9D,0x8C), o3(0xE8,0x9D,0x8E),
+     o3(0xE8,0x9D,0xB4), o3(0xE8,0x9D,0x97),
+     o3(0xE8,0x9D,0xA8), o3(0xE8,0x9D,0xAE),
+     o3(0xE8,0x9D,0x99), o3(0xE8,0x9D,0x93),
+     o3(0xE8,0x9D,0xA3), o3(0xE8,0x9D,0xAA),
+     o3(0xE8,0xA0,0x85), o3(0xE8,0x9E,0xA2),
+     o3(0xE8,0x9E,0x9F), o3(0xE8,0x9E,0x82),
+     o3(0xE8,0x9E,0xAF), o3(0xE8,0x9F,0x8B),
+     o3(0xE8,0x9E,0xBD), o3(0xE8,0x9F,0x80),
+     o3(0xE8,0x9F,0x90), o3(0xE9,0x9B,0x96),
+     o3(0xE8,0x9E,0xAB), o3(0xE8,0x9F,0x84),
+     o3(0xE8,0x9E,0xB3), o3(0xE8,0x9F,0x87),
+     o3(0xE8,0x9F,0x86), o3(0xE8,0x9E,0xBB),
+     o3(0xE8,0x9F,0xAF), o3(0xE8,0x9F,0xB2),
+     o3(0xE8,0x9F,0xA0), o3(0xE8,0xA0,0x8F),
+     o3(0xE8,0xA0,0x8D), o3(0xE8,0x9F,0xBE),
+     o3(0xE8,0x9F,0xB6), o3(0xE8,0x9F,0xB7),
+     o3(0xE8,0xA0,0x8E), o3(0xE8,0x9F,0x92),
+     o3(0xE8,0xA0,0x91), o3(0xE8,0xA0,0x96),
+     o3(0xE8,0xA0,0x95), o3(0xE8,0xA0,0xA2),
+     o3(0xE8,0xA0,0xA1), o3(0xE8,0xA0,0xB1),
+     o3(0xE8,0xA0,0xB6), o3(0xE8,0xA0,0xB9),
+     o3(0xE8,0xA0,0xA7), o3(0xE8,0xA0,0xBB),
+     o3(0xE8,0xA1,0x84), o3(0xE8,0xA1,0x82),
+     o3(0xE8,0xA1,0x92), o3(0xE8,0xA1,0x99),
+     o3(0xE8,0xA1,0x9E), o3(0xE8,0xA1,0xA2),
+     o3(0xE8,0xA1,0xAB), o3(0xE8,0xA2,0x81),
+     o3(0xE8,0xA1,0xBE), o3(0xE8,0xA2,0x9E),
+     o3(0xE8,0xA1,0xB5), o3(0xE8,0xA1,0xBD),
+     o3(0xE8,0xA2,0xB5), o3(0xE8,0xA1,0xB2),
+     o3(0xE8,0xA2,0x82), o3(0xE8,0xA2,0x97),
+     o3(0xE8,0xA2,0x92), o3(0xE8,0xA2,0xAE),
+     o3(0xE8,0xA2,0x99), o3(0xE8,0xA2,0xA2),
+     o3(0xE8,0xA2,0x8D), o3(0xE8,0xA2,0xA4),
+     o3(0xE8,0xA2,0xB0), o3(0xE8,0xA2,0xBF),
+     o3(0xE8,0xA2,0xB1), o3(0xE8,0xA3,0x83),
+     o3(0xE8,0xA3,0x84), o3(0xE8,0xA3,0x94),
+     o3(0xE8,0xA3,0x98), o3(0xE8,0xA3,0x99),
+     o3(0xE8,0xA3,0x9D), o3(0xE8,0xA3,0xB9),
+     o3(0xE8,0xA4,0x82), o3(0xE8,0xA3,0xBC),
+     o3(0xE8,0xA3,0xB4), o3(0xE8,0xA3,0xA8),
+     o3(0xE8,0xA3,0xB2), o3(0xE8,0xA4,0x84),
+     o3(0xE8,0xA4,0x8C), o3(0xE8,0xA4,0x8A),
+     o3(0xE8,0xA4,0x93), o3(0xE8,0xA5,0x83),
+     o3(0xE8,0xA4,0x9E), o3(0xE8,0xA4,0xA5),
+     o3(0xE8,0xA4,0xAA), o3(0xE8,0xA4,0xAB),
+     o3(0xE8,0xA5,0x81), o3(0xE8,0xA5,0x84),
+     o3(0xE8,0xA4,0xBB), o3(0xE8,0xA4,0xB6),
+     o3(0xE8,0xA4,0xB8), o3(0xE8,0xA5,0x8C),
+     o3(0xE8,0xA4,0x9D), o3(0xE8,0xA5,0xA0),
+     o3(0xE8,0xA5,0x9E),
+
+#define from_Shift_JIS_E5 WORDINDEX2INFO(6137)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E5_infos,
+
+#define from_Shift_JIS_E6_infos WORDINDEX2INFO(6139)
+                INVALID, o3(0xE8,0xA5,0xA6),
+     o3(0xE8,0xA5,0xA4), o3(0xE8,0xA5,0xAD),
+     o3(0xE8,0xA5,0xAA), o3(0xE8,0xA5,0xAF),
+     o3(0xE8,0xA5,0xB4), o3(0xE8,0xA5,0xB7),
+     o3(0xE8,0xA5,0xBE), o3(0xE8,0xA6,0x83),
+     o3(0xE8,0xA6,0x88), o3(0xE8,0xA6,0x8A),
+     o3(0xE8,0xA6,0x93), o3(0xE8,0xA6,0x98),
+     o3(0xE8,0xA6,0xA1), o3(0xE8,0xA6,0xA9),
+     o3(0xE8,0xA6,0xA6), o3(0xE8,0xA6,0xAC),
+     o3(0xE8,0xA6,0xAF), o3(0xE8,0xA6,0xB2),
+     o3(0xE8,0xA6,0xBA), o3(0xE8,0xA6,0xBD),
+     o3(0xE8,0xA6,0xBF), o3(0xE8,0xA7,0x80),
+     o3(0xE8,0xA7,0x9A), o3(0xE8,0xA7,0x9C),
+     o3(0xE8,0xA7,0x9D), o3(0xE8,0xA7,0xA7),
+     o3(0xE8,0xA7,0xB4), o3(0xE8,0xA7,0xB8),
+     o3(0xE8,0xA8,0x83), o3(0xE8,0xA8,0x96),
+     o3(0xE8,0xA8,0x90), o3(0xE8,0xA8,0x8C),
+     o3(0xE8,0xA8,0x9B), o3(0xE8,0xA8,0x9D),
+     o3(0xE8,0xA8,0xA5), o3(0xE8,0xA8,0xB6),
+     o3(0xE8,0xA9,0x81), o3(0xE8,0xA9,0x9B),
+     o3(0xE8,0xA9,0x92), o3(0xE8,0xA9,0x86),
+     o3(0xE8,0xA9,0x88), o3(0xE8,0xA9,0xBC),
+     o3(0xE8,0xA9,0xAD), o3(0xE8,0xA9,0xAC),
+     o3(0xE8,0xA9,0xA2), o3(0xE8,0xAA,0x85),
+     o3(0xE8,0xAA,0x82), o3(0xE8,0xAA,0x84),
+     o3(0xE8,0xAA,0xA8), o3(0xE8,0xAA,0xA1),
+     o3(0xE8,0xAA,0x91), o3(0xE8,0xAA,0xA5),
+     o3(0xE8,0xAA,0xA6), o3(0xE8,0xAA,0x9A),
+     o3(0xE8,0xAA,0xA3), o3(0xE8,0xAB,0x84),
+     o3(0xE8,0xAB,0x8D), o3(0xE8,0xAB,0x82),
+     o3(0xE8,0xAB,0x9A), o3(0xE8,0xAB,0xAB),
+     o3(0xE8,0xAB,0xB3), o3(0xE8,0xAB,0xA7),
+     o3(0xE8,0xAB,0xA4), o3(0xE8,0xAB,0xB1),
+     o3(0xE8,0xAC,0x94), o3(0xE8,0xAB,0xA0),
+     o3(0xE8,0xAB,0xA2), o3(0xE8,0xAB,0xB7),
+     o3(0xE8,0xAB,0x9E), o3(0xE8,0xAB,0x9B),
+     o3(0xE8,0xAC,0x8C), o3(0xE8,0xAC,0x87),
+     o3(0xE8,0xAC,0x9A), o3(0xE8,0xAB,0xA1),
+     o3(0xE8,0xAC,0x96), o3(0xE8,0xAC,0x90),
+     o3(0xE8,0xAC,0x97), o3(0xE8,0xAC,0xA0),
+     o3(0xE8,0xAC,0xB3), o3(0xE9,0x9E,0xAB),
+     o3(0xE8,0xAC,0xA6), o3(0xE8,0xAC,0xAB),
+     o3(0xE8,0xAC,0xBE), o3(0xE8,0xAC,0xA8),
+     o3(0xE8,0xAD,0x81), o3(0xE8,0xAD,0x8C),
+     o3(0xE8,0xAD,0x8F), o3(0xE8,0xAD,0x8E),
+     o3(0xE8,0xAD,0x89), o3(0xE8,0xAD,0x96),
+     o3(0xE8,0xAD,0x9B), o3(0xE8,0xAD,0x9A),
+     o3(0xE8,0xAD,0xAB), o3(0xE8,0xAD,0x9F),
+     o3(0xE8,0xAD,0xAC), o3(0xE8,0xAD,0xAF),
+     o3(0xE8,0xAD,0xB4), o3(0xE8,0xAD,0xBD),
+     o3(0xE8,0xAE,0x80), o3(0xE8,0xAE,0x8C),
+     o3(0xE8,0xAE,0x8E), o3(0xE8,0xAE,0x92),
+     o3(0xE8,0xAE,0x93), o3(0xE8,0xAE,0x96),
+     o3(0xE8,0xAE,0x99), o3(0xE8,0xAE,0x9A),
+     o3(0xE8,0xB0,0xBA), o3(0xE8,0xB1,0x81),
+     o3(0xE8,0xB0,0xBF), o3(0xE8,0xB1,0x88),
+     o3(0xE8,0xB1,0x8C), o3(0xE8,0xB1,0x8E),
+     o3(0xE8,0xB1,0x90), o3(0xE8,0xB1,0x95),
+     o3(0xE8,0xB1,0xA2), o3(0xE8,0xB1,0xAC),
+     o3(0xE8,0xB1,0xB8), o3(0xE8,0xB1,0xBA),
+     o3(0xE8,0xB2,0x82), o3(0xE8,0xB2,0x89),
+     o3(0xE8,0xB2,0x85), o3(0xE8,0xB2,0x8A),
+     o3(0xE8,0xB2,0x8D), o3(0xE8,0xB2,0x8E),
+     o3(0xE8,0xB2,0x94), o3(0xE8,0xB1,0xBC),
+     o3(0xE8,0xB2,0x98), o3(0xE6,0x88,0x9D),
+     o3(0xE8,0xB2,0xAD), o3(0xE8,0xB2,0xAA),
+     o3(0xE8,0xB2,0xBD), o3(0xE8,0xB2,0xB2),
+     o3(0xE8,0xB2,0xB3), o3(0xE8,0xB2,0xAE),
+     o3(0xE8,0xB2,0xB6), o3(0xE8,0xB3,0x88),
+     o3(0xE8,0xB3,0x81), o3(0xE8,0xB3,0xA4),
+     o3(0xE8,0xB3,0xA3), o3(0xE8,0xB3,0x9A),
+     o3(0xE8,0xB3,0xBD), o3(0xE8,0xB3,0xBA),
+     o3(0xE8,0xB3,0xBB), o3(0xE8,0xB4,0x84),
+     o3(0xE8,0xB4,0x85), o3(0xE8,0xB4,0x8A),
+     o3(0xE8,0xB4,0x87), o3(0xE8,0xB4,0x8F),
+     o3(0xE8,0xB4,0x8D), o3(0xE8,0xB4,0x90),
+     o3(0xE9,0xBD,0x8E), o3(0xE8,0xB4,0x93),
+     o3(0xE8,0xB3,0x8D), o3(0xE8,0xB4,0x94),
+     o3(0xE8,0xB4,0x96), o3(0xE8,0xB5,0xA7),
+     o3(0xE8,0xB5,0xAD), o3(0xE8,0xB5,0xB1),
+     o3(0xE8,0xB5,0xB3), o3(0xE8,0xB6,0x81),
+     o3(0xE8,0xB6,0x99), o3(0xE8,0xB7,0x82),
+     o3(0xE8,0xB6,0xBE), o3(0xE8,0xB6,0xBA),
+     o3(0xE8,0xB7,0x8F), o3(0xE8,0xB7,0x9A),
+     o3(0xE8,0xB7,0x96), o3(0xE8,0xB7,0x8C),
+     o3(0xE8,0xB7,0x9B), o3(0xE8,0xB7,0x8B),
+     o3(0xE8,0xB7,0xAA), o3(0xE8,0xB7,0xAB),
+     o3(0xE8,0xB7,0x9F), o3(0xE8,0xB7,0xA3),
+     o3(0xE8,0xB7,0xBC), o3(0xE8,0xB8,0x88),
+     o3(0xE8,0xB8,0x89), o3(0xE8,0xB7,0xBF),
+     o3(0xE8,0xB8,0x9D), o3(0xE8,0xB8,0x9E),
+     o3(0xE8,0xB8,0x90), o3(0xE8,0xB8,0x9F),
+     o3(0xE8,0xB9,0x82), o3(0xE8,0xB8,0xB5),
+     o3(0xE8,0xB8,0xB0), o3(0xE8,0xB8,0xB4),
+     o3(0xE8,0xB9,0x8A),
+
+#define from_Shift_JIS_E6 WORDINDEX2INFO(6328)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E6_infos,
+
+#define from_Shift_JIS_E7_infos WORDINDEX2INFO(6330)
+                INVALID, o3(0xE8,0xB9,0x87),
+     o3(0xE8,0xB9,0x89), o3(0xE8,0xB9,0x8C),
+     o3(0xE8,0xB9,0x90), o3(0xE8,0xB9,0x88),
+     o3(0xE8,0xB9,0x99), o3(0xE8,0xB9,0xA4),
+     o3(0xE8,0xB9,0xA0), o3(0xE8,0xB8,0xAA),
+     o3(0xE8,0xB9,0xA3), o3(0xE8,0xB9,0x95),
+     o3(0xE8,0xB9,0xB6), o3(0xE8,0xB9,0xB2),
+     o3(0xE8,0xB9,0xBC), o3(0xE8,0xBA,0x81),
+     o3(0xE8,0xBA,0x87), o3(0xE8,0xBA,0x85),
+     o3(0xE8,0xBA,0x84), o3(0xE8,0xBA,0x8B),
+     o3(0xE8,0xBA,0x8A), o3(0xE8,0xBA,0x93),
+     o3(0xE8,0xBA,0x91), o3(0xE8,0xBA,0x94),
+     o3(0xE8,0xBA,0x99), o3(0xE8,0xBA,0xAA),
+     o3(0xE8,0xBA,0xA1), o3(0xE8,0xBA,0xAC),
+     o3(0xE8,0xBA,0xB0), o3(0xE8,0xBB,0x86),
+     o3(0xE8,0xBA,0xB1), o3(0xE8,0xBA,0xBE),
+     o3(0xE8,0xBB,0x85), o3(0xE8,0xBB,0x88),
+     o3(0xE8,0xBB,0x8B), o3(0xE8,0xBB,0x9B),
+     o3(0xE8,0xBB,0xA3), o3(0xE8,0xBB,0xBC),
+     o3(0xE8,0xBB,0xBB), o3(0xE8,0xBB,0xAB),
+     o3(0xE8,0xBB,0xBE), o3(0xE8,0xBC,0x8A),
+     o3(0xE8,0xBC,0x85), o3(0xE8,0xBC,0x95),
+     o3(0xE8,0xBC,0x92), o3(0xE8,0xBC,0x99),
+     o3(0xE8,0xBC,0x93), o3(0xE8,0xBC,0x9C),
+     o3(0xE8,0xBC,0x9F), o3(0xE8,0xBC,0x9B),
+     o3(0xE8,0xBC,0x8C), o3(0xE8,0xBC,0xA6),
+     o3(0xE8,0xBC,0xB3), o3(0xE8,0xBC,0xBB),
+     o3(0xE8,0xBC,0xB9), o3(0xE8,0xBD,0x85),
+     o3(0xE8,0xBD,0x82), o3(0xE8,0xBC,0xBE),
+     o3(0xE8,0xBD,0x8C), o3(0xE8,0xBD,0x89),
+     o3(0xE8,0xBD,0x86), o3(0xE8,0xBD,0x8E),
+     o3(0xE8,0xBD,0x97), o3(0xE8,0xBD,0x9C),
+     o3(0xE8,0xBD,0xA2), o3(0xE8,0xBD,0xA3),
+     o3(0xE8,0xBD,0xA4), o3(0xE8,0xBE,0x9C),
+     o3(0xE8,0xBE,0x9F), o3(0xE8,0xBE,0xA3),
+     o3(0xE8,0xBE,0xAD), o3(0xE8,0xBE,0xAF),
+     o3(0xE8,0xBE,0xB7), o3(0xE8,0xBF,0x9A),
+     o3(0xE8,0xBF,0xA5), o3(0xE8,0xBF,0xA2),
+     o3(0xE8,0xBF,0xAA), o3(0xE8,0xBF,0xAF),
+     o3(0xE9,0x82,0x87), o3(0xE8,0xBF,0xB4),
+     o3(0xE9,0x80,0x85), o3(0xE8,0xBF,0xB9),
+     o3(0xE8,0xBF,0xBA), o3(0xE9,0x80,0x91),
+     o3(0xE9,0x80,0x95), o3(0xE9,0x80,0xA1),
+     o3(0xE9,0x80,0x8D), o3(0xE9,0x80,0x9E),
+     o3(0xE9,0x80,0x96), o3(0xE9,0x80,0x8B),
+     o3(0xE9,0x80,0xA7), o3(0xE9,0x80,0xB6),
+     o3(0xE9,0x80,0xB5), o3(0xE9,0x80,0xB9),
+     o3(0xE8,0xBF,0xB8), o3(0xE9,0x81,0x8F),
+     o3(0xE9,0x81,0x90), o3(0xE9,0x81,0x91),
+     o3(0xE9,0x81,0x92), o3(0xE9,0x80,0x8E),
+     o3(0xE9,0x81,0x89), o3(0xE9,0x80,0xBE),
+     o3(0xE9,0x81,0x96), o3(0xE9,0x81,0x98),
+     o3(0xE9,0x81,0x9E), o3(0xE9,0x81,0xA8),
+     o3(0xE9,0x81,0xAF), o3(0xE9,0x81,0xB6),
+     o3(0xE9,0x9A,0xA8), o3(0xE9,0x81,0xB2),
+     o3(0xE9,0x82,0x82), o3(0xE9,0x81,0xBD),
+     o3(0xE9,0x82,0x81), o3(0xE9,0x82,0x80),
+     o3(0xE9,0x82,0x8A), o3(0xE9,0x82,0x89),
+     o3(0xE9,0x82,0x8F), o3(0xE9,0x82,0xA8),
+     o3(0xE9,0x82,0xAF), o3(0xE9,0x82,0xB1),
+     o3(0xE9,0x82,0xB5), o3(0xE9,0x83,0xA2),
+     o3(0xE9,0x83,0xA4), o3(0xE6,0x89,0x88),
+     o3(0xE9,0x83,0x9B), o3(0xE9,0x84,0x82),
+     o3(0xE9,0x84,0x92), o3(0xE9,0x84,0x99),
+     o3(0xE9,0x84,0xB2), o3(0xE9,0x84,0xB0),
+     o3(0xE9,0x85,0x8A), o3(0xE9,0x85,0x96),
+     o3(0xE9,0x85,0x98), o3(0xE9,0x85,0xA3),
+     o3(0xE9,0x85,0xA5), o3(0xE9,0x85,0xA9),
+     o3(0xE9,0x85,0xB3), o3(0xE9,0x85,0xB2),
+     o3(0xE9,0x86,0x8B), o3(0xE9,0x86,0x89),
+     o3(0xE9,0x86,0x82), o3(0xE9,0x86,0xA2),
+     o3(0xE9,0x86,0xAB), o3(0xE9,0x86,0xAF),
+     o3(0xE9,0x86,0xAA), o3(0xE9,0x86,0xB5),
+     o3(0xE9,0x86,0xB4), o3(0xE9,0x86,0xBA),
+     o3(0xE9,0x87,0x80), o3(0xE9,0x87,0x81),
+     o3(0xE9,0x87,0x89), o3(0xE9,0x87,0x8B),
+     o3(0xE9,0x87,0x90), o3(0xE9,0x87,0x96),
+     o3(0xE9,0x87,0x9F), o3(0xE9,0x87,0xA1),
+     o3(0xE9,0x87,0x9B), o3(0xE9,0x87,0xBC),
+     o3(0xE9,0x87,0xB5), o3(0xE9,0x87,0xB6),
+     o3(0xE9,0x88,0x9E), o3(0xE9,0x87,0xBF),
+     o3(0xE9,0x88,0x94), o3(0xE9,0x88,0xAC),
+     o3(0xE9,0x88,0x95), o3(0xE9,0x88,0x91),
+     o3(0xE9,0x89,0x9E), o3(0xE9,0x89,0x97),
+     o3(0xE9,0x89,0x85), o3(0xE9,0x89,0x89),
+     o3(0xE9,0x89,0xA4), o3(0xE9,0x89,0x88),
+     o3(0xE9,0x8A,0x95), o3(0xE9,0x88,0xBF),
+     o3(0xE9,0x89,0x8B), o3(0xE9,0x89,0x90),
+     o3(0xE9,0x8A,0x9C), o3(0xE9,0x8A,0x96),
+     o3(0xE9,0x8A,0x93), o3(0xE9,0x8A,0x9B),
+     o3(0xE9,0x89,0x9A), o3(0xE9,0x8B,0x8F),
+     o3(0xE9,0x8A,0xB9), o3(0xE9,0x8A,0xB7),
+     o3(0xE9,0x8B,0xA9), o3(0xE9,0x8C,0x8F),
+     o3(0xE9,0x8B,0xBA), o3(0xE9,0x8D,0x84),
+     o3(0xE9,0x8C,0xAE),
+
+#define from_Shift_JIS_E7 WORDINDEX2INFO(6519)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E7_infos,
+
+#define from_Shift_JIS_E8_infos WORDINDEX2INFO(6521)
+                INVALID, o3(0xE9,0x8C,0x99),
+     o3(0xE9,0x8C,0xA2), o3(0xE9,0x8C,0x9A),
+     o3(0xE9,0x8C,0xA3), o3(0xE9,0x8C,0xBA),
+     o3(0xE9,0x8C,0xB5), o3(0xE9,0x8C,0xBB),
+     o3(0xE9,0x8D,0x9C), o3(0xE9,0x8D,0xA0),
+     o3(0xE9,0x8D,0xBC), o3(0xE9,0x8D,0xAE),
+     o3(0xE9,0x8D,0x96), o3(0xE9,0x8E,0xB0),
+     o3(0xE9,0x8E,0xAC), o3(0xE9,0x8E,0xAD),
+     o3(0xE9,0x8E,0x94), o3(0xE9,0x8E,0xB9),
+     o3(0xE9,0x8F,0x96), o3(0xE9,0x8F,0x97),
+     o3(0xE9,0x8F,0xA8), o3(0xE9,0x8F,0xA5),
+     o3(0xE9,0x8F,0x98), o3(0xE9,0x8F,0x83),
+     o3(0xE9,0x8F,0x9D), o3(0xE9,0x8F,0x90),
+     o3(0xE9,0x8F,0x88), o3(0xE9,0x8F,0xA4),
+     o3(0xE9,0x90,0x9A), o3(0xE9,0x90,0x94),
+     o3(0xE9,0x90,0x93), o3(0xE9,0x90,0x83),
+     o3(0xE9,0x90,0x87), o3(0xE9,0x90,0x90),
+     o3(0xE9,0x90,0xB6), o3(0xE9,0x90,0xAB),
+     o3(0xE9,0x90,0xB5), o3(0xE9,0x90,0xA1),
+     o3(0xE9,0x90,0xBA), o3(0xE9,0x91,0x81),
+     o3(0xE9,0x91,0x92), o3(0xE9,0x91,0x84),
+     o3(0xE9,0x91,0x9B), o3(0xE9,0x91,0xA0),
+     o3(0xE9,0x91,0xA2), o3(0xE9,0x91,0x9E),
+     o3(0xE9,0x91,0xAA), o3(0xE9,0x88,0xA9),
+     o3(0xE9,0x91,0xB0), o3(0xE9,0x91,0xB5),
+     o3(0xE9,0x91,0xB7), o3(0xE9,0x91,0xBD),
+     o3(0xE9,0x91,0x9A), o3(0xE9,0x91,0xBC),
+     o3(0xE9,0x91,0xBE), o3(0xE9,0x92,0x81),
+     o3(0xE9,0x91,0xBF), o3(0xE9,0x96,0x82),
+     o3(0xE9,0x96,0x87), o3(0xE9,0x96,0x8A),
+     o3(0xE9,0x96,0x94), o3(0xE9,0x96,0x96),
+     o3(0xE9,0x96,0x98), o3(0xE9,0x96,0x99),
+     o3(0xE9,0x96,0xA0), o3(0xE9,0x96,0xA8),
+     o3(0xE9,0x96,0xA7), o3(0xE9,0x96,0xAD),
+     o3(0xE9,0x96,0xBC), o3(0xE9,0x96,0xBB),
+     o3(0xE9,0x96,0xB9), o3(0xE9,0x96,0xBE),
+     o3(0xE9,0x97,0x8A), o3(0xE6,0xBF,0xB6),
+     o3(0xE9,0x97,0x83), o3(0xE9,0x97,0x8D),
+     o3(0xE9,0x97,0x8C), o3(0xE9,0x97,0x95),
+     o3(0xE9,0x97,0x94), o3(0xE9,0x97,0x96),
+     o3(0xE9,0x97,0x9C), o3(0xE9,0x97,0xA1),
+     o3(0xE9,0x97,0xA5), o3(0xE9,0x97,0xA2),
+     o3(0xE9,0x98,0xA1), o3(0xE9,0x98,0xA8),
+     o3(0xE9,0x98,0xAE), o3(0xE9,0x98,0xAF),
+     o3(0xE9,0x99,0x82), o3(0xE9,0x99,0x8C),
+     o3(0xE9,0x99,0x8F), o3(0xE9,0x99,0x8B),
+     o3(0xE9,0x99,0xB7), o3(0xE9,0x99,0x9C),
+     o3(0xE9,0x99,0x9E), o3(0xE9,0x99,0x9D),
+     o3(0xE9,0x99,0x9F), o3(0xE9,0x99,0xA6),
+     o3(0xE9,0x99,0xB2), o3(0xE9,0x99,0xAC),
+     o3(0xE9,0x9A,0x8D), o3(0xE9,0x9A,0x98),
+     o3(0xE9,0x9A,0x95), o3(0xE9,0x9A,0x97),
+     o3(0xE9,0x9A,0xAA), o3(0xE9,0x9A,0xA7),
+     o3(0xE9,0x9A,0xB1), o3(0xE9,0x9A,0xB2),
+     o3(0xE9,0x9A,0xB0), o3(0xE9,0x9A,0xB4),
+     o3(0xE9,0x9A,0xB6), o3(0xE9,0x9A,0xB8),
+     o3(0xE9,0x9A,0xB9), o3(0xE9,0x9B,0x8E),
+     o3(0xE9,0x9B,0x8B), o3(0xE9,0x9B,0x89),
+     o3(0xE9,0x9B,0x8D), o3(0xE8,0xA5,0x8D),
+     o3(0xE9,0x9B,0x9C), o3(0xE9,0x9C,0x8D),
+     o3(0xE9,0x9B,0x95), o3(0xE9,0x9B,0xB9),
+     o3(0xE9,0x9C,0x84), o3(0xE9,0x9C,0x86),
+     o3(0xE9,0x9C,0x88), o3(0xE9,0x9C,0x93),
+     o3(0xE9,0x9C,0x8E), o3(0xE9,0x9C,0x91),
+     o3(0xE9,0x9C,0x8F), o3(0xE9,0x9C,0x96),
+     o3(0xE9,0x9C,0x99), o3(0xE9,0x9C,0xA4),
+     o3(0xE9,0x9C,0xAA), o3(0xE9,0x9C,0xB0),
+     o3(0xE9,0x9C,0xB9), o3(0xE9,0x9C,0xBD),
+     o3(0xE9,0x9C,0xBE), o3(0xE9,0x9D,0x84),
+     o3(0xE9,0x9D,0x86), o3(0xE9,0x9D,0x88),
+     o3(0xE9,0x9D,0x82), o3(0xE9,0x9D,0x89),
+     o3(0xE9,0x9D,0x9C), o3(0xE9,0x9D,0xA0),
+     o3(0xE9,0x9D,0xA4), o3(0xE9,0x9D,0xA6),
+     o3(0xE9,0x9D,0xA8), o3(0xE5,0x8B,0x92),
+     o3(0xE9,0x9D,0xAB), o3(0xE9,0x9D,0xB1),
+     o3(0xE9,0x9D,0xB9), o3(0xE9,0x9E,0x85),
+     o3(0xE9,0x9D,0xBC), o3(0xE9,0x9E,0x81),
+     o3(0xE9,0x9D,0xBA), o3(0xE9,0x9E,0x86),
+     o3(0xE9,0x9E,0x8B), o3(0xE9,0x9E,0x8F),
+     o3(0xE9,0x9E,0x90), o3(0xE9,0x9E,0x9C),
+     o3(0xE9,0x9E,0xA8), o3(0xE9,0x9E,0xA6),
+     o3(0xE9,0x9E,0xA3), o3(0xE9,0x9E,0xB3),
+     o3(0xE9,0x9E,0xB4), o3(0xE9,0x9F,0x83),
+     o3(0xE9,0x9F,0x86), o3(0xE9,0x9F,0x88),
+     o3(0xE9,0x9F,0x8B), o3(0xE9,0x9F,0x9C),
+     o3(0xE9,0x9F,0xAD), o3(0xE9,0xBD,0x8F),
+     o3(0xE9,0x9F,0xB2), o3(0xE7,0xAB,0x9F),
+     o3(0xE9,0x9F,0xB6), o3(0xE9,0x9F,0xB5),
+     o3(0xE9,0xA0,0x8F), o3(0xE9,0xA0,0x8C),
+     o3(0xE9,0xA0,0xB8), o3(0xE9,0xA0,0xA4),
+     o3(0xE9,0xA0,0xA1), o3(0xE9,0xA0,0xB7),
+     o3(0xE9,0xA0,0xBD), o3(0xE9,0xA1,0x86),
+     o3(0xE9,0xA1,0x8F), o3(0xE9,0xA1,0x8B),
+     o3(0xE9,0xA1,0xAB), o3(0xE9,0xA1,0xAF),
+     o3(0xE9,0xA1,0xB0),
+
+#define from_Shift_JIS_E8 WORDINDEX2INFO(6710)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E8_infos,
+
+#define from_Shift_JIS_E9_infos WORDINDEX2INFO(6712)
+                INVALID, o3(0xE9,0xA1,0xB1),
+     o3(0xE9,0xA1,0xB4), o3(0xE9,0xA1,0xB3),
+     o3(0xE9,0xA2,0xAA), o3(0xE9,0xA2,0xAF),
+     o3(0xE9,0xA2,0xB1), o3(0xE9,0xA2,0xB6),
+     o3(0xE9,0xA3,0x84), o3(0xE9,0xA3,0x83),
+     o3(0xE9,0xA3,0x86), o3(0xE9,0xA3,0xA9),
+     o3(0xE9,0xA3,0xAB), o3(0xE9,0xA4,0x83),
+     o3(0xE9,0xA4,0x89), o3(0xE9,0xA4,0x92),
+     o3(0xE9,0xA4,0x94), o3(0xE9,0xA4,0x98),
+     o3(0xE9,0xA4,0xA1), o3(0xE9,0xA4,0x9D),
+     o3(0xE9,0xA4,0x9E), o3(0xE9,0xA4,0xA4),
+     o3(0xE9,0xA4,0xA0), o3(0xE9,0xA4,0xAC),
+     o3(0xE9,0xA4,0xAE), o3(0xE9,0xA4,0xBD),
+     o3(0xE9,0xA4,0xBE), o3(0xE9,0xA5,0x82),
+     o3(0xE9,0xA5,0x89), o3(0xE9,0xA5,0x85),
+     o3(0xE9,0xA5,0x90), o3(0xE9,0xA5,0x8B),
+     o3(0xE9,0xA5,0x91), o3(0xE9,0xA5,0x92),
+     o3(0xE9,0xA5,0x8C), o3(0xE9,0xA5,0x95),
+     o3(0xE9,0xA6,0x97), o3(0xE9,0xA6,0x98),
+     o3(0xE9,0xA6,0xA5), o3(0xE9,0xA6,0xAD),
+     o3(0xE9,0xA6,0xAE), o3(0xE9,0xA6,0xBC),
+     o3(0xE9,0xA7,0x9F), o3(0xE9,0xA7,0x9B),
+     o3(0xE9,0xA7,0x9D), o3(0xE9,0xA7,0x98),
+     o3(0xE9,0xA7,0x91), o3(0xE9,0xA7,0xAD),
+     o3(0xE9,0xA7,0xAE), o3(0xE9,0xA7,0xB1),
+     o3(0xE9,0xA7,0xB2), o3(0xE9,0xA7,0xBB),
+     o3(0xE9,0xA7,0xB8), o3(0xE9,0xA8,0x81),
+     o3(0xE9,0xA8,0x8F), o3(0xE9,0xA8,0x85),
+     o3(0xE9,0xA7,0xA2), o3(0xE9,0xA8,0x99),
+     o3(0xE9,0xA8,0xAB), o3(0xE9,0xA8,0xB7),
+     o3(0xE9,0xA9,0x85), o3(0xE9,0xA9,0x82),
+     o3(0xE9,0xA9,0x80), o3(0xE9,0xA9,0x83),
+     o3(0xE9,0xA8,0xBE), o3(0xE9,0xA9,0x95),
+     o3(0xE9,0xA9,0x8D), o3(0xE9,0xA9,0x9B),
+     o3(0xE9,0xA9,0x97), o3(0xE9,0xA9,0x9F),
+     o3(0xE9,0xA9,0xA2), o3(0xE9,0xA9,0xA5),
+     o3(0xE9,0xA9,0xA4), o3(0xE9,0xA9,0xA9),
+     o3(0xE9,0xA9,0xAB), o3(0xE9,0xA9,0xAA),
+     o3(0xE9,0xAA,0xAD), o3(0xE9,0xAA,0xB0),
+     o3(0xE9,0xAA,0xBC), o3(0xE9,0xAB,0x80),
+     o3(0xE9,0xAB,0x8F), o3(0xE9,0xAB,0x91),
+     o3(0xE9,0xAB,0x93), o3(0xE9,0xAB,0x94),
+     o3(0xE9,0xAB,0x9E), o3(0xE9,0xAB,0x9F),
+     o3(0xE9,0xAB,0xA2), o3(0xE9,0xAB,0xA3),
+     o3(0xE9,0xAB,0xA6), o3(0xE9,0xAB,0xAF),
+     o3(0xE9,0xAB,0xAB), o3(0xE9,0xAB,0xAE),
+     o3(0xE9,0xAB,0xB4), o3(0xE9,0xAB,0xB1),
+     o3(0xE9,0xAB,0xB7), o3(0xE9,0xAB,0xBB),
+     o3(0xE9,0xAC,0x86), o3(0xE9,0xAC,0x98),
+     o3(0xE9,0xAC,0x9A), o3(0xE9,0xAC,0x9F),
+     o3(0xE9,0xAC,0xA2), o3(0xE9,0xAC,0xA3),
+     o3(0xE9,0xAC,0xA5), o3(0xE9,0xAC,0xA7),
+     o3(0xE9,0xAC,0xA8), o3(0xE9,0xAC,0xA9),
+     o3(0xE9,0xAC,0xAA), o3(0xE9,0xAC,0xAE),
+     o3(0xE9,0xAC,0xAF), o3(0xE9,0xAC,0xB2),
+     o3(0xE9,0xAD,0x84), o3(0xE9,0xAD,0x83),
+     o3(0xE9,0xAD,0x8F), o3(0xE9,0xAD,0x8D),
+     o3(0xE9,0xAD,0x8E), o3(0xE9,0xAD,0x91),
+     o3(0xE9,0xAD,0x98), o3(0xE9,0xAD,0xB4),
+     o3(0xE9,0xAE,0x93), o3(0xE9,0xAE,0x83),
+     o3(0xE9,0xAE,0x91), o3(0xE9,0xAE,0x96),
+     o3(0xE9,0xAE,0x97), o3(0xE9,0xAE,0x9F),
+     o3(0xE9,0xAE,0xA0), o3(0xE9,0xAE,0xA8),
+     o3(0xE9,0xAE,0xB4), o3(0xE9,0xAF,0x80),
+     o3(0xE9,0xAF,0x8A), o3(0xE9,0xAE,0xB9),
+     o3(0xE9,0xAF,0x86), o3(0xE9,0xAF,0x8F),
+     o3(0xE9,0xAF,0x91), o3(0xE9,0xAF,0x92),
+     o3(0xE9,0xAF,0xA3), o3(0xE9,0xAF,0xA2),
+     o3(0xE9,0xAF,0xA4), o3(0xE9,0xAF,0x94),
+     o3(0xE9,0xAF,0xA1), o3(0xE9,0xB0,0xBA),
+     o3(0xE9,0xAF,0xB2), o3(0xE9,0xAF,0xB1),
+     o3(0xE9,0xAF,0xB0), o3(0xE9,0xB0,0x95),
+     o3(0xE9,0xB0,0x94), o3(0xE9,0xB0,0x89),
+     o3(0xE9,0xB0,0x93), o3(0xE9,0xB0,0x8C),
+     o3(0xE9,0xB0,0x86), o3(0xE9,0xB0,0x88),
+     o3(0xE9,0xB0,0x92), o3(0xE9,0xB0,0x8A),
+     o3(0xE9,0xB0,0x84), o3(0xE9,0xB0,0xAE),
+     o3(0xE9,0xB0,0x9B), o3(0xE9,0xB0,0xA5),
+     o3(0xE9,0xB0,0xA4), o3(0xE9,0xB0,0xA1),
+     o3(0xE9,0xB0,0xB0), o3(0xE9,0xB1,0x87),
+     o3(0xE9,0xB0,0xB2), o3(0xE9,0xB1,0x86),
+     o3(0xE9,0xB0,0xBE), o3(0xE9,0xB1,0x9A),
+     o3(0xE9,0xB1,0xA0), o3(0xE9,0xB1,0xA7),
+     o3(0xE9,0xB1,0xB6), o3(0xE9,0xB1,0xB8),
+     o3(0xE9,0xB3,0xA7), o3(0xE9,0xB3,0xAC),
+     o3(0xE9,0xB3,0xB0), o3(0xE9,0xB4,0x89),
+     o3(0xE9,0xB4,0x88), o3(0xE9,0xB3,0xAB),
+     o3(0xE9,0xB4,0x83), o3(0xE9,0xB4,0x86),
+     o3(0xE9,0xB4,0xAA), o3(0xE9,0xB4,0xA6),
+     o3(0xE9,0xB6,0xAF), o3(0xE9,0xB4,0xA3),
+     o3(0xE9,0xB4,0x9F), o3(0xE9,0xB5,0x84),
+     o3(0xE9,0xB4,0x95), o3(0xE9,0xB4,0x92),
+     o3(0xE9,0xB5,0x81), o3(0xE9,0xB4,0xBF),
+     o3(0xE9,0xB4,0xBE), o3(0xE9,0xB5,0x86),
+     o3(0xE9,0xB5,0x88),
+
+#define from_Shift_JIS_E9 WORDINDEX2INFO(6901)
+    from_Shift_JIS_89_offsets,
+    from_Shift_JIS_E9_infos,
+
+#define from_Shift_JIS_EA_infos WORDINDEX2INFO(6903)
+                INVALID, o3(0xE9,0xB5,0x9D),
+     o3(0xE9,0xB5,0x9E), o3(0xE9,0xB5,0xA4),
+     o3(0xE9,0xB5,0x91), o3(0xE9,0xB5,0x90),
+     o3(0xE9,0xB5,0x99), o3(0xE9,0xB5,0xB2),
+     o3(0xE9,0xB6,0x89), o3(0xE9,0xB6,0x87),
+     o3(0xE9,0xB6,0xAB), o3(0xE9,0xB5,0xAF),
+     o3(0xE9,0xB5,0xBA), o3(0xE9,0xB6,0x9A),
+     o3(0xE9,0xB6,0xA4), o3(0xE9,0xB6,0xA9),
+     o3(0xE9,0xB6,0xB2), o3(0xE9,0xB7,0x84),
+     o3(0xE9,0xB7,0x81), o3(0xE9,0xB6,0xBB),
+     o3(0xE9,0xB6,0xB8), o3(0xE9,0xB6,0xBA),
+     o3(0xE9,0xB7,0x86), o3(0xE9,0xB7,0x8F),
+     o3(0xE9,0xB7,0x82), o3(0xE9,0xB7,0x99),
+     o3(0xE9,0xB7,0x93), o3(0xE9,0xB7,0xB8),
+     o3(0xE9,0xB7,0xA6), o3(0xE9,0xB7,0xAD),
+     o3(0xE9,0xB7,0xAF), o3(0xE9,0xB7,0xBD),
+     o3(0xE9,0xB8,0x9A), o3(0xE9,0xB8,0x9B),
+     o3(0xE9,0xB8,0x9E), o3(0xE9,0xB9,0xB5),
+     o3(0xE9,0xB9,0xB9), o3(0xE9,0xB9,0xBD),
+     o3(0xE9,0xBA,0x81), o3(0xE9,0xBA,0x88),
+     o3(0xE9,0xBA,0x8B), o3(0xE9,0xBA,0x8C),
+     o3(0xE9,0xBA,0x92), o3(0xE9,0xBA,0x95),
+     o3(0xE9,0xBA,0x91), o3(0xE9,0xBA,0x9D),
+     o3(0xE9,0xBA,0xA5), o3(0xE9,0xBA,0xA9),
+     o3(0xE9,0xBA,0xB8), o3(0xE9,0xBA,0xAA),
+     o3(0xE9,0xBA,0xAD), o3(0xE9,0x9D,0xA1),
+     o3(0xE9,0xBB,0x8C), o3(0xE9,0xBB,0x8E),
+     o3(0xE9,0xBB,0x8F), o3(0xE9,0xBB,0x90),
+     o3(0xE9,0xBB,0x94), o3(0xE9,0xBB,0x9C),
+     o3(0xE9,0xBB,0x9E), o3(0xE9,0xBB,0x9D),
+     o3(0xE9,0xBB,0xA0), o3(0xE9,0xBB,0xA5),
+     o3(0xE9,0xBB,0xA8), o3(0xE9,0xBB,0xAF),
+     o3(0xE9,0xBB,0xB4), o3(0xE9,0xBB,0xB6),
+     o3(0xE9,0xBB,0xB7), o3(0xE9,0xBB,0xB9),
+     o3(0xE9,0xBB,0xBB), o3(0xE9,0xBB,0xBC),
+     o3(0xE9,0xBB,0xBD), o3(0xE9,0xBC,0x87),
+     o3(0xE9,0xBC,0x88), o3(0xE7,0x9A,0xB7),
+     o3(0xE9,0xBC,0x95), o3(0xE9,0xBC,0xA1),
+     o3(0xE9,0xBC,0xAC), o3(0xE9,0xBC,0xBE),
+     o3(0xE9,0xBD,0x8A), o3(0xE9,0xBD,0x92),
+     o3(0xE9,0xBD,0x94), o3(0xE9,0xBD,0xA3),
+     o3(0xE9,0xBD,0x9F), o3(0xE9,0xBD,0xA0),
+     o3(0xE9,0xBD,0xA1), o3(0xE9,0xBD,0xA6),
+     o3(0xE9,0xBD,0xA7), o3(0xE9,0xBD,0xAC),
+     o3(0xE9,0xBD,0xAA), o3(0xE9,0xBD,0xB7),
+     o3(0xE9,0xBD,0xB2), o3(0xE9,0xBD,0xB6),
+     o3(0xE9,0xBE,0x95), o3(0xE9,0xBE,0x9C),
+     o3(0xE9,0xBE,0xA0), o3(0xE5,0xA0,0xAF),
+     o3(0xE6,0xA7,0x87), o3(0xE9,0x81,0x99),
+     o3(0xE7,0x91,0xA4), o3(0xE5,0x87,0x9C),
+     o3(0xE7,0x86,0x99),              UNDEF,
+
+#define from_Shift_JIS_EA WORDINDEX2INFO(7005)
+    from_Shift_JIS_EA_offsets,
+    from_Shift_JIS_EA_infos,
+
+#define from_Shift_JIS_infos WORDINDEX2INFO(7007)
+                  NOMAP,            INVALID,
+      from_Shift_JIS_81,  from_Shift_JIS_82,
+      from_Shift_JIS_83,  from_Shift_JIS_84,
+      from_Shift_JIS_85,  from_Shift_JIS_88,
+      from_Shift_JIS_89,  from_Shift_JIS_8A,
+      from_Shift_JIS_8B,  from_Shift_JIS_8C,
+      from_Shift_JIS_8D,  from_Shift_JIS_8E,
+      from_Shift_JIS_8F,  from_Shift_JIS_90,
+      from_Shift_JIS_91,  from_Shift_JIS_92,
+      from_Shift_JIS_93,  from_Shift_JIS_94,
+      from_Shift_JIS_95,  from_Shift_JIS_96,
+      from_Shift_JIS_97,  from_Shift_JIS_98,
+      from_Shift_JIS_99,  from_Shift_JIS_9A,
+      from_Shift_JIS_9B,  from_Shift_JIS_9C,
+      from_Shift_JIS_9D,  from_Shift_JIS_9E,
+      from_Shift_JIS_9F, o3(0xEF,0xBD,0xA1),
+     o3(0xEF,0xBD,0xA2), o3(0xEF,0xBD,0xA3),
+     o3(0xEF,0xBD,0xA4), o3(0xEF,0xBD,0xA5),
+     o3(0xEF,0xBD,0xA6), o3(0xEF,0xBD,0xA7),
+     o3(0xEF,0xBD,0xA8), o3(0xEF,0xBD,0xA9),
+     o3(0xEF,0xBD,0xAA), o3(0xEF,0xBD,0xAB),
+     o3(0xEF,0xBD,0xAC), o3(0xEF,0xBD,0xAD),
+     o3(0xEF,0xBD,0xAE), o3(0xEF,0xBD,0xAF),
+     o3(0xEF,0xBD,0xB0), o3(0xEF,0xBD,0xB1),
+     o3(0xEF,0xBD,0xB2), o3(0xEF,0xBD,0xB3),
+     o3(0xEF,0xBD,0xB4), o3(0xEF,0xBD,0xB5),
+     o3(0xEF,0xBD,0xB6), o3(0xEF,0xBD,0xB7),
+     o3(0xEF,0xBD,0xB8), o3(0xEF,0xBD,0xB9),
+     o3(0xEF,0xBD,0xBA), o3(0xEF,0xBD,0xBB),
+     o3(0xEF,0xBD,0xBC), o3(0xEF,0xBD,0xBD),
+     o3(0xEF,0xBD,0xBE), o3(0xEF,0xBD,0xBF),
+     o3(0xEF,0xBE,0x80), o3(0xEF,0xBE,0x81),
+     o3(0xEF,0xBE,0x82), o3(0xEF,0xBE,0x83),
+     o3(0xEF,0xBE,0x84), o3(0xEF,0xBE,0x85),
+     o3(0xEF,0xBE,0x86), o3(0xEF,0xBE,0x87),
+     o3(0xEF,0xBE,0x88), o3(0xEF,0xBE,0x89),
+     o3(0xEF,0xBE,0x8A), o3(0xEF,0xBE,0x8B),
+     o3(0xEF,0xBE,0x8C), o3(0xEF,0xBE,0x8D),
+     o3(0xEF,0xBE,0x8E), o3(0xEF,0xBE,0x8F),
+     o3(0xEF,0xBE,0x90), o3(0xEF,0xBE,0x91),
+     o3(0xEF,0xBE,0x92), o3(0xEF,0xBE,0x93),
+     o3(0xEF,0xBE,0x94), o3(0xEF,0xBE,0x95),
+     o3(0xEF,0xBE,0x96), o3(0xEF,0xBE,0x97),
+     o3(0xEF,0xBE,0x98), o3(0xEF,0xBE,0x99),
+     o3(0xEF,0xBE,0x9A), o3(0xEF,0xBE,0x9B),
+     o3(0xEF,0xBE,0x9C), o3(0xEF,0xBE,0x9D),
+     o3(0xEF,0xBE,0x9E), o3(0xEF,0xBE,0x9F),
+      from_Shift_JIS_E0,  from_Shift_JIS_E1,
+      from_Shift_JIS_E2,  from_Shift_JIS_E3,
+      from_Shift_JIS_E4,  from_Shift_JIS_E5,
+      from_Shift_JIS_E6,  from_Shift_JIS_E7,
+      from_Shift_JIS_E8,  from_Shift_JIS_E9,
+      from_Shift_JIS_EA,
+
+#define from_Shift_JIS WORDINDEX2INFO(7112)
+    from_Shift_JIS_offsets,
+    from_Shift_JIS_infos,
+
+#define from_Windows_31J_81_infos WORDINDEX2INFO(7114)
+                INVALID, o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8E),
+     o3(0xE3,0x83,0xBB), o3(0xEF,0xBC,0x9A),
+     o3(0xEF,0xBC,0x9B), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0x81), o3(0xE3,0x82,0x9B),
+     o3(0xE3,0x82,0x9C),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x80),      o2(0xC2,0xA8),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBF,0xA3),
+     o3(0xEF,0xBC,0xBF), o3(0xE3,0x83,0xBD),
+     o3(0xE3,0x83,0xBE), o3(0xE3,0x82,0x9D),
+     o3(0xE3,0x82,0x9E), o3(0xE3,0x80,0x83),
+     o3(0xE4,0xBB,0x9D), o3(0xE3,0x80,0x85),
+     o3(0xE3,0x80,0x86), o3(0xE3,0x80,0x87),
+     o3(0xE3,0x83,0xBC), o3(0xE2,0x80,0x95),
+     o3(0xE2,0x80,0x90), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0xBC), o3(0xEF,0xBD,0x9E),
+     o3(0xE2,0x88,0xA5), o3(0xEF,0xBD,0x9C),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xEF,0xBC,0xBB), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBD,0x9B), o3(0xEF,0xBD,0x9D),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+     o3(0xEF,0xBC,0x8B), o3(0xEF,0xBC,0x8D),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xEF,0xBC,0x9D),
+     o3(0xE2,0x89,0xA0), o3(0xEF,0xBC,0x9C),
+     o3(0xEF,0xBC,0x9E), o3(0xE2,0x89,0xA6),
+     o3(0xE2,0x89,0xA7), o3(0xE2,0x88,0x9E),
+     o3(0xE2,0x88,0xB4), o3(0xE2,0x99,0x82),
+     o3(0xE2,0x99,0x80),      o2(0xC2,0xB0),
+     o3(0xE2,0x80,0xB2), o3(0xE2,0x80,0xB3),
+     o3(0xE2,0x84,0x83), o3(0xEF,0xBF,0xA5),
+     o3(0xEF,0xBC,0x84), o3(0xEF,0xBF,0xA0),
+     o3(0xEF,0xBF,0xA1), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x83), o3(0xEF,0xBC,0x86),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0xA0),
+          o2(0xC2,0xA7), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87), o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x80,0xBB), o3(0xE3,0x80,0x92),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE3,0x80,0x93),              UNDEF,
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+     o3(0xEF,0xBF,0xA2), o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x8C,0x92),
+     o3(0xE2,0x88,0x82), o3(0xE2,0x88,0x87),
+     o3(0xE2,0x89,0xA1), o3(0xE2,0x89,0x92),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x84,0xAB), o3(0xE2,0x80,0xB0),
+     o3(0xE2,0x99,0xAF), o3(0xE2,0x99,0xAD),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xC2,0xB6),
+     o3(0xE2,0x97,0xAF),
+
+#define from_Windows_31J_81 WORDINDEX2INFO(7263)
+    from_Shift_JIS_81_offsets,
+    from_Windows_31J_81_infos,
+
+#define from_Windows_31J_87_infos WORDINDEX2INFO(7265)
+                INVALID, o3(0xE2,0x91,0xA0),
+     o3(0xE2,0x91,0xA1), o3(0xE2,0x91,0xA2),
+     o3(0xE2,0x91,0xA3), o3(0xE2,0x91,0xA4),
+     o3(0xE2,0x91,0xA5), o3(0xE2,0x91,0xA6),
+     o3(0xE2,0x91,0xA7), o3(0xE2,0x91,0xA8),
+     o3(0xE2,0x91,0xA9), o3(0xE2,0x91,0xAA),
+     o3(0xE2,0x91,0xAB), o3(0xE2,0x91,0xAC),
+     o3(0xE2,0x91,0xAD), o3(0xE2,0x91,0xAE),
+     o3(0xE2,0x91,0xAF), o3(0xE2,0x91,0xB0),
+     o3(0xE2,0x91,0xB1), o3(0xE2,0x91,0xB2),
+     o3(0xE2,0x91,0xB3), o3(0xE2,0x85,0xA0),
+     o3(0xE2,0x85,0xA1), o3(0xE2,0x85,0xA2),
+     o3(0xE2,0x85,0xA3), o3(0xE2,0x85,0xA4),
+     o3(0xE2,0x85,0xA5), o3(0xE2,0x85,0xA6),
+     o3(0xE2,0x85,0xA7), o3(0xE2,0x85,0xA8),
+     o3(0xE2,0x85,0xA9),              UNDEF,
+     o3(0xE3,0x8D,0x89), o3(0xE3,0x8C,0x94),
+     o3(0xE3,0x8C,0xA2), o3(0xE3,0x8D,0x8D),
+     o3(0xE3,0x8C,0x98), o3(0xE3,0x8C,0xA7),
+     o3(0xE3,0x8C,0x83), o3(0xE3,0x8C,0xB6),
+     o3(0xE3,0x8D,0x91), o3(0xE3,0x8D,0x97),
+     o3(0xE3,0x8C,0x8D), o3(0xE3,0x8C,0xA6),
+     o3(0xE3,0x8C,0xA3), o3(0xE3,0x8C,0xAB),
+     o3(0xE3,0x8D,0x8A), o3(0xE3,0x8C,0xBB),
+     o3(0xE3,0x8E,0x9C), o3(0xE3,0x8E,0x9D),
+     o3(0xE3,0x8E,0x9E), o3(0xE3,0x8E,0x8E),
+     o3(0xE3,0x8E,0x8F), o3(0xE3,0x8F,0x84),
+     o3(0xE3,0x8E,0xA1), o3(0xE3,0x8D,0xBB),
+     o3(0xE3,0x80,0x9D), o3(0xE3,0x80,0x9F),
+     o3(0xE2,0x84,0x96), o3(0xE3,0x8F,0x8D),
+     o3(0xE2,0x84,0xA1), o3(0xE3,0x8A,0xA4),
+     o3(0xE3,0x8A,0xA5), o3(0xE3,0x8A,0xA6),
+     o3(0xE3,0x8A,0xA7), o3(0xE3,0x8A,0xA8),
+     o3(0xE3,0x88,0xB1), o3(0xE3,0x88,0xB2),
+     o3(0xE3,0x88,0xB9), o3(0xE3,0x8D,0xBE),
+     o3(0xE3,0x8D,0xBD), o3(0xE3,0x8D,0xBC),
+     o3(0xE2,0x89,0x92), o3(0xE2,0x89,0xA1),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAE),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x9A),
+     o3(0xE2,0x8A,0xA5), o3(0xE2,0x88,0xA0),
+     o3(0xE2,0x88,0x9F), o3(0xE2,0x8A,0xBF),
+     o3(0xE2,0x88,0xB5), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xAA),
+
+#define from_Windows_31J_87 WORDINDEX2INFO(7350)
+    from_Windows_31J_87_offsets,
+    from_Windows_31J_87_infos,
+
+#define from_Windows_31J_ED_infos WORDINDEX2INFO(7352)
+                INVALID, o3(0xE7,0xBA,0x8A),
+     o3(0xE8,0xA4,0x9C), o3(0xE9,0x8D,0x88),
+     o3(0xE9,0x8A,0x88), o3(0xE8,0x93,0x9C),
+     o3(0xE4,0xBF,0x89), o3(0xE7,0x82,0xBB),
+     o3(0xE6,0x98,0xB1), o3(0xE6,0xA3,0x88),
+     o3(0xE9,0x8B,0xB9), o3(0xE6,0x9B,0xBB),
+     o3(0xE5,0xBD,0x85), o3(0xE4,0xB8,0xA8),
+     o3(0xE4,0xBB,0xA1), o3(0xE4,0xBB,0xBC),
+     o3(0xE4,0xBC,0x80), o3(0xE4,0xBC,0x83),
+     o3(0xE4,0xBC,0xB9), o3(0xE4,0xBD,0x96),
+     o3(0xE4,0xBE,0x92), o3(0xE4,0xBE,0x8A),
+     o3(0xE4,0xBE,0x9A), o3(0xE4,0xBE,0x94),
+     o3(0xE4,0xBF,0x8D), o3(0xE5,0x81,0x80),
+     o3(0xE5,0x80,0xA2), o3(0xE4,0xBF,0xBF),
+     o3(0xE5,0x80,0x9E), o3(0xE5,0x81,0x86),
+     o3(0xE5,0x81,0xB0), o3(0xE5,0x81,0x82),
+     o3(0xE5,0x82,0x94), o3(0xE5,0x83,0xB4),
+     o3(0xE5,0x83,0x98), o3(0xE5,0x85,0x8A),
+     o3(0xE5,0x85,0xA4), o3(0xE5,0x86,0x9D),
+     o3(0xE5,0x86,0xBE), o3(0xE5,0x87,0xAC),
+     o3(0xE5,0x88,0x95), o3(0xE5,0x8A,0x9C),
+     o3(0xE5,0x8A,0xA6), o3(0xE5,0x8B,0x80),
+     o3(0xE5,0x8B,0x9B), o3(0xE5,0x8C,0x80),
+     o3(0xE5,0x8C,0x87), o3(0xE5,0x8C,0xA4),
+     o3(0xE5,0x8D,0xB2), o3(0xE5,0x8E,0x93),
+     o3(0xE5,0x8E,0xB2), o3(0xE5,0x8F,0x9D),
+     o3(0xEF,0xA8,0x8E), o3(0xE5,0x92,0x9C),
+     o3(0xE5,0x92,0x8A), o3(0xE5,0x92,0xA9),
+     o3(0xE5,0x93,0xBF), o3(0xE5,0x96,0x86),
+     o3(0xE5,0x9D,0x99), o3(0xE5,0x9D,0xA5),
+     o3(0xE5,0x9E,0xAC), o3(0xE5,0x9F,0x88),
+     o3(0xE5,0x9F,0x87), o3(0xEF,0xA8,0x8F),
+     o3(0xEF,0xA8,0x90), o3(0xE5,0xA2,0x9E),
+     o3(0xE5,0xA2,0xB2), o3(0xE5,0xA4,0x8B),
+     o3(0xE5,0xA5,0x93), o3(0xE5,0xA5,0x9B),
+     o3(0xE5,0xA5,0x9D), o3(0xE5,0xA5,0xA3),
+     o3(0xE5,0xA6,0xA4), o3(0xE5,0xA6,0xBA),
+     o3(0xE5,0xAD,0x96), o3(0xE5,0xAF,0x80),
+     o3(0xE7,0x94,0xAF), o3(0xE5,0xAF,0x98),
+     o3(0xE5,0xAF,0xAC), o3(0xE5,0xB0,0x9E),
+     o3(0xE5,0xB2,0xA6), o3(0xE5,0xB2,0xBA),
+     o3(0xE5,0xB3,0xB5), o3(0xE5,0xB4,0xA7),
+     o3(0xE5,0xB5,0x93), o3(0xEF,0xA8,0x91),
+     o3(0xE5,0xB5,0x82), o3(0xE5,0xB5,0xAD),
+     o3(0xE5,0xB6,0xB8), o3(0xE5,0xB6,0xB9),
+     o3(0xE5,0xB7,0x90), o3(0xE5,0xBC,0xA1),
+     o3(0xE5,0xBC,0xB4), o3(0xE5,0xBD,0xA7),
+     o3(0xE5,0xBE,0xB7), o3(0xE5,0xBF,0x9E),
+     o3(0xE6,0x81,0x9D), o3(0xE6,0x82,0x85),
+     o3(0xE6,0x82,0x8A), o3(0xE6,0x83,0x9E),
+     o3(0xE6,0x83,0x95), o3(0xE6,0x84,0xA0),
+     o3(0xE6,0x83,0xB2), o3(0xE6,0x84,0x91),
+     o3(0xE6,0x84,0xB7), o3(0xE6,0x84,0xB0),
+     o3(0xE6,0x86,0x98), o3(0xE6,0x88,0x93),
+     o3(0xE6,0x8A,0xA6), o3(0xE6,0x8F,0xB5),
+     o3(0xE6,0x91,0xA0), o3(0xE6,0x92,0x9D),
+     o3(0xE6,0x93,0x8E), o3(0xE6,0x95,0x8E),
+     o3(0xE6,0x98,0x80), o3(0xE6,0x98,0x95),
+     o3(0xE6,0x98,0xBB), o3(0xE6,0x98,0x89),
+     o3(0xE6,0x98,0xAE), o3(0xE6,0x98,0x9E),
+     o3(0xE6,0x98,0xA4), o3(0xE6,0x99,0xA5),
+     o3(0xE6,0x99,0x97), o3(0xE6,0x99,0x99),
+     o3(0xEF,0xA8,0x92), o3(0xE6,0x99,0xB3),
+     o3(0xE6,0x9A,0x99), o3(0xE6,0x9A,0xA0),
+     o3(0xE6,0x9A,0xB2), o3(0xE6,0x9A,0xBF),
+     o3(0xE6,0x9B,0xBA), o3(0xE6,0x9C,0x8E),
+     o3(0xEF,0xA4,0xA9), o3(0xE6,0x9D,0xA6),
+     o3(0xE6,0x9E,0xBB), o3(0xE6,0xA1,0x92),
+     o3(0xE6,0x9F,0x80), o3(0xE6,0xA0,0x81),
+     o3(0xE6,0xA1,0x84), o3(0xE6,0xA3,0x8F),
+     o3(0xEF,0xA8,0x93), o3(0xE6,0xA5,0xA8),
+     o3(0xEF,0xA8,0x94), o3(0xE6,0xA6,0x98),
+     o3(0xE6,0xA7,0xA2), o3(0xE6,0xA8,0xB0),
+     o3(0xE6,0xA9,0xAB), o3(0xE6,0xA9,0x86),
+     o3(0xE6,0xA9,0xB3), o3(0xE6,0xA9,0xBE),
+     o3(0xE6,0xAB,0xA2), o3(0xE6,0xAB,0xA4),
+     o3(0xE6,0xAF,0x96), o3(0xE6,0xB0,0xBF),
+     o3(0xE6,0xB1,0x9C), o3(0xE6,0xB2,0x86),
+     o3(0xE6,0xB1,0xAF), o3(0xE6,0xB3,0x9A),
+     o3(0xE6,0xB4,0x84), o3(0xE6,0xB6,0x87),
+     o3(0xE6,0xB5,0xAF), o3(0xE6,0xB6,0x96),
+     o3(0xE6,0xB6,0xAC), o3(0xE6,0xB7,0x8F),
+     o3(0xE6,0xB7,0xB8), o3(0xE6,0xB7,0xB2),
+     o3(0xE6,0xB7,0xBC), o3(0xE6,0xB8,0xB9),
+     o3(0xE6,0xB9,0x9C), o3(0xE6,0xB8,0xA7),
+     o3(0xE6,0xB8,0xBC), o3(0xE6,0xBA,0xBF),
+     o3(0xE6,0xBE,0x88), o3(0xE6,0xBE,0xB5),
+     o3(0xE6,0xBF,0xB5), o3(0xE7,0x80,0x85),
+     o3(0xE7,0x80,0x87), o3(0xE7,0x80,0xA8),
+     o3(0xE7,0x82,0x85), o3(0xE7,0x82,0xAB),
+     o3(0xE7,0x84,0x8F), o3(0xE7,0x84,0x84),
+     o3(0xE7,0x85,0x9C), o3(0xE7,0x85,0x86),
+     o3(0xE7,0x85,0x87), o3(0xEF,0xA8,0x95),
+     o3(0xE7,0x87,0x81), o3(0xE7,0x87,0xBE),
+     o3(0xE7,0x8A,0xB1),
+
+#define from_Windows_31J_ED WORDINDEX2INFO(7541)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_ED_infos,
+
+#define from_Windows_31J_EE_infos WORDINDEX2INFO(7543)
+                INVALID, o3(0xE7,0x8A,0xBE),
+     o3(0xE7,0x8C,0xA4), o3(0xEF,0xA8,0x96),
+     o3(0xE7,0x8D,0xB7), o3(0xE7,0x8E,0xBD),
+     o3(0xE7,0x8F,0x89), o3(0xE7,0x8F,0x96),
+     o3(0xE7,0x8F,0xA3), o3(0xE7,0x8F,0x92),
+     o3(0xE7,0x90,0x87), o3(0xE7,0x8F,0xB5),
+     o3(0xE7,0x90,0xA6), o3(0xE7,0x90,0xAA),
+     o3(0xE7,0x90,0xA9), o3(0xE7,0x90,0xAE),
+     o3(0xE7,0x91,0xA2), o3(0xE7,0x92,0x89),
+     o3(0xE7,0x92,0x9F), o3(0xE7,0x94,0x81),
+     o3(0xE7,0x95,0xAF), o3(0xE7,0x9A,0x82),
+     o3(0xE7,0x9A,0x9C), o3(0xE7,0x9A,0x9E),
+     o3(0xE7,0x9A,0x9B), o3(0xE7,0x9A,0xA6),
+     o3(0xEF,0xA8,0x97), o3(0xE7,0x9D,0x86),
+     o3(0xE5,0x8A,0xAF), o3(0xE7,0xA0,0xA1),
+     o3(0xE7,0xA1,0x8E), o3(0xE7,0xA1,0xA4),
+     o3(0xE7,0xA1,0xBA), o3(0xE7,0xA4,0xB0),
+     o3(0xEF,0xA8,0x98), o3(0xEF,0xA8,0x99),
+     o3(0xEF,0xA8,0x9A), o3(0xE7,0xA6,0x94),
+     o3(0xEF,0xA8,0x9B), o3(0xE7,0xA6,0x9B),
+     o3(0xE7,0xAB,0x91), o3(0xE7,0xAB,0xA7),
+     o3(0xEF,0xA8,0x9C), o3(0xE7,0xAB,0xAB),
+     o3(0xE7,0xAE,0x9E), o3(0xEF,0xA8,0x9D),
+     o3(0xE7,0xB5,0x88), o3(0xE7,0xB5,0x9C),
+     o3(0xE7,0xB6,0xB7), o3(0xE7,0xB6,0xA0),
+     o3(0xE7,0xB7,0x96), o3(0xE7,0xB9,0x92),
+     o3(0xE7,0xBD,0x87), o3(0xE7,0xBE,0xA1),
+     o3(0xEF,0xA8,0x9E), o3(0xE8,0x8C,0x81),
+     o3(0xE8,0x8D,0xA2), o3(0xE8,0x8D,0xBF),
+     o3(0xE8,0x8F,0x87), o3(0xE8,0x8F,0xB6),
+     o3(0xE8,0x91,0x88), o3(0xE8,0x92,0xB4),
+     o3(0xE8,0x95,0x93), o3(0xE8,0x95,0x99),
+     o3(0xE8,0x95,0xAB), o3(0xEF,0xA8,0x9F),
+     o3(0xE8,0x96,0xB0), o3(0xEF,0xA8,0xA0),
+     o3(0xEF,0xA8,0xA1), o3(0xE8,0xA0,0x87),
+     o3(0xE8,0xA3,0xB5), o3(0xE8,0xA8,0x92),
+     o3(0xE8,0xA8,0xB7), o3(0xE8,0xA9,0xB9),
+     o3(0xE8,0xAA,0xA7), o3(0xE8,0xAA,0xBE),
+     o3(0xE8,0xAB,0x9F), o3(0xEF,0xA8,0xA2),
+     o3(0xE8,0xAB,0xB6), o3(0xE8,0xAD,0x93),
+     o3(0xE8,0xAD,0xBF), o3(0xE8,0xB3,0xB0),
+     o3(0xE8,0xB3,0xB4), o3(0xE8,0xB4,0x92),
+     o3(0xE8,0xB5,0xB6), o3(0xEF,0xA8,0xA3),
+     o3(0xE8,0xBB,0x8F), o3(0xEF,0xA8,0xA4),
+     o3(0xEF,0xA8,0xA5), o3(0xE9,0x81,0xA7),
+     o3(0xE9,0x83,0x9E), o3(0xEF,0xA8,0xA6),
+     o3(0xE9,0x84,0x95), o3(0xE9,0x84,0xA7),
+     o3(0xE9,0x87,0x9A), o3(0xE9,0x87,0x97),
+     o3(0xE9,0x87,0x9E), o3(0xE9,0x87,0xAD),
+     o3(0xE9,0x87,0xAE), o3(0xE9,0x87,0xA4),
+     o3(0xE9,0x87,0xA5), o3(0xE9,0x88,0x86),
+     o3(0xE9,0x88,0x90), o3(0xE9,0x88,0x8A),
+     o3(0xE9,0x88,0xBA), o3(0xE9,0x89,0x80),
+     o3(0xE9,0x88,0xBC), o3(0xE9,0x89,0x8E),
+     o3(0xE9,0x89,0x99), o3(0xE9,0x89,0x91),
+     o3(0xE9,0x88,0xB9), o3(0xE9,0x89,0xA7),
+     o3(0xE9,0x8A,0xA7), o3(0xE9,0x89,0xB7),
+     o3(0xE9,0x89,0xB8), o3(0xE9,0x8B,0xA7),
+     o3(0xE9,0x8B,0x97), o3(0xE9,0x8B,0x99),
+     o3(0xE9,0x8B,0x90), o3(0xEF,0xA8,0xA7),
+     o3(0xE9,0x8B,0x95), o3(0xE9,0x8B,0xA0),
+     o3(0xE9,0x8B,0x93), o3(0xE9,0x8C,0xA5),
+     o3(0xE9,0x8C,0xA1), o3(0xE9,0x8B,0xBB),
+     o3(0xEF,0xA8,0xA8), o3(0xE9,0x8C,0x9E),
+     o3(0xE9,0x8B,0xBF), o3(0xE9,0x8C,0x9D),
+     o3(0xE9,0x8C,0x82), o3(0xE9,0x8D,0xB0),
+     o3(0xE9,0x8D,0x97), o3(0xE9,0x8E,0xA4),
+     o3(0xE9,0x8F,0x86), o3(0xE9,0x8F,0x9E),
+     o3(0xE9,0x8F,0xB8), o3(0xE9,0x90,0xB1),
+     o3(0xE9,0x91,0x85), o3(0xE9,0x91,0x88),
+     o3(0xE9,0x96,0x92), o3(0xEF,0xA7,0x9C),
+     o3(0xEF,0xA8,0xA9), o3(0xE9,0x9A,0x9D),
+     o3(0xE9,0x9A,0xAF), o3(0xE9,0x9C,0xB3),
+     o3(0xE9,0x9C,0xBB), o3(0xE9,0x9D,0x83),
+     o3(0xE9,0x9D,0x8D), o3(0xE9,0x9D,0x8F),
+     o3(0xE9,0x9D,0x91), o3(0xE9,0x9D,0x95),
+     o3(0xE9,0xA1,0x97), o3(0xE9,0xA1,0xA5),
+     o3(0xEF,0xA8,0xAA), o3(0xEF,0xA8,0xAB),
+     o3(0xE9,0xA4,0xA7), o3(0xEF,0xA8,0xAC),
+     o3(0xE9,0xA6,0x9E), o3(0xE9,0xA9,0x8E),
+     o3(0xE9,0xAB,0x99), o3(0xE9,0xAB,0x9C),
+     o3(0xE9,0xAD,0xB5), o3(0xE9,0xAD,0xB2),
+     o3(0xE9,0xAE,0x8F), o3(0xE9,0xAE,0xB1),
+     o3(0xE9,0xAE,0xBB), o3(0xE9,0xB0,0x80),
+     o3(0xE9,0xB5,0xB0), o3(0xE9,0xB5,0xAB),
+     o3(0xEF,0xA8,0xAD), o3(0xE9,0xB8,0x99),
+     o3(0xE9,0xBB,0x91),              UNDEF,
+     o3(0xE2,0x85,0xB0), o3(0xE2,0x85,0xB1),
+     o3(0xE2,0x85,0xB2), o3(0xE2,0x85,0xB3),
+     o3(0xE2,0x85,0xB4), o3(0xE2,0x85,0xB5),
+     o3(0xE2,0x85,0xB6), o3(0xE2,0x85,0xB7),
+     o3(0xE2,0x85,0xB8), o3(0xE2,0x85,0xB9),
+     o3(0xEF,0xBF,0xA2), o3(0xEF,0xBF,0xA4),
+     o3(0xEF,0xBC,0x87), o3(0xEF,0xBC,0x82),
+
+#define from_Windows_31J_EE WORDINDEX2INFO(7731)
+    from_Windows_31J_EE_offsets,
+    from_Windows_31J_EE_infos,
+
+#define from_Windows_31J_F0_infos WORDINDEX2INFO(7733)
+                INVALID, o3(0xEE,0x80,0x80),
+     o3(0xEE,0x80,0x81), o3(0xEE,0x80,0x82),
+     o3(0xEE,0x80,0x83), o3(0xEE,0x80,0x84),
+     o3(0xEE,0x80,0x85), o3(0xEE,0x80,0x86),
+     o3(0xEE,0x80,0x87), o3(0xEE,0x80,0x88),
+     o3(0xEE,0x80,0x89), o3(0xEE,0x80,0x8A),
+     o3(0xEE,0x80,0x8B), o3(0xEE,0x80,0x8C),
+     o3(0xEE,0x80,0x8D), o3(0xEE,0x80,0x8E),
+     o3(0xEE,0x80,0x8F), o3(0xEE,0x80,0x90),
+     o3(0xEE,0x80,0x91), o3(0xEE,0x80,0x92),
+     o3(0xEE,0x80,0x93), o3(0xEE,0x80,0x94),
+     o3(0xEE,0x80,0x95), o3(0xEE,0x80,0x96),
+     o3(0xEE,0x80,0x97), o3(0xEE,0x80,0x98),
+     o3(0xEE,0x80,0x99), o3(0xEE,0x80,0x9A),
+     o3(0xEE,0x80,0x9B), o3(0xEE,0x80,0x9C),
+     o3(0xEE,0x80,0x9D), o3(0xEE,0x80,0x9E),
+     o3(0xEE,0x80,0x9F), o3(0xEE,0x80,0xA0),
+     o3(0xEE,0x80,0xA1), o3(0xEE,0x80,0xA2),
+     o3(0xEE,0x80,0xA3), o3(0xEE,0x80,0xA4),
+     o3(0xEE,0x80,0xA5), o3(0xEE,0x80,0xA6),
+     o3(0xEE,0x80,0xA7), o3(0xEE,0x80,0xA8),
+     o3(0xEE,0x80,0xA9), o3(0xEE,0x80,0xAA),
+     o3(0xEE,0x80,0xAB), o3(0xEE,0x80,0xAC),
+     o3(0xEE,0x80,0xAD), o3(0xEE,0x80,0xAE),
+     o3(0xEE,0x80,0xAF), o3(0xEE,0x80,0xB0),
+     o3(0xEE,0x80,0xB1), o3(0xEE,0x80,0xB2),
+     o3(0xEE,0x80,0xB3), o3(0xEE,0x80,0xB4),
+     o3(0xEE,0x80,0xB5), o3(0xEE,0x80,0xB6),
+     o3(0xEE,0x80,0xB7), o3(0xEE,0x80,0xB8),
+     o3(0xEE,0x80,0xB9), o3(0xEE,0x80,0xBA),
+     o3(0xEE,0x80,0xBB), o3(0xEE,0x80,0xBC),
+     o3(0xEE,0x80,0xBD), o3(0xEE,0x80,0xBE),
+     o3(0xEE,0x80,0xBF), o3(0xEE,0x81,0x80),
+     o3(0xEE,0x81,0x81), o3(0xEE,0x81,0x82),
+     o3(0xEE,0x81,0x83), o3(0xEE,0x81,0x84),
+     o3(0xEE,0x81,0x85), o3(0xEE,0x81,0x86),
+     o3(0xEE,0x81,0x87), o3(0xEE,0x81,0x88),
+     o3(0xEE,0x81,0x89), o3(0xEE,0x81,0x8A),
+     o3(0xEE,0x81,0x8B), o3(0xEE,0x81,0x8C),
+     o3(0xEE,0x81,0x8D), o3(0xEE,0x81,0x8E),
+     o3(0xEE,0x81,0x8F), o3(0xEE,0x81,0x90),
+     o3(0xEE,0x81,0x91), o3(0xEE,0x81,0x92),
+     o3(0xEE,0x81,0x93), o3(0xEE,0x81,0x94),
+     o3(0xEE,0x81,0x95), o3(0xEE,0x81,0x96),
+     o3(0xEE,0x81,0x97), o3(0xEE,0x81,0x98),
+     o3(0xEE,0x81,0x99), o3(0xEE,0x81,0x9A),
+     o3(0xEE,0x81,0x9B), o3(0xEE,0x81,0x9C),
+     o3(0xEE,0x81,0x9D), o3(0xEE,0x81,0x9E),
+     o3(0xEE,0x81,0x9F), o3(0xEE,0x81,0xA0),
+     o3(0xEE,0x81,0xA1), o3(0xEE,0x81,0xA2),
+     o3(0xEE,0x81,0xA3), o3(0xEE,0x81,0xA4),
+     o3(0xEE,0x81,0xA5), o3(0xEE,0x81,0xA6),
+     o3(0xEE,0x81,0xA7), o3(0xEE,0x81,0xA8),
+     o3(0xEE,0x81,0xA9), o3(0xEE,0x81,0xAA),
+     o3(0xEE,0x81,0xAB), o3(0xEE,0x81,0xAC),
+     o3(0xEE,0x81,0xAD), o3(0xEE,0x81,0xAE),
+     o3(0xEE,0x81,0xAF), o3(0xEE,0x81,0xB0),
+     o3(0xEE,0x81,0xB1), o3(0xEE,0x81,0xB2),
+     o3(0xEE,0x81,0xB3), o3(0xEE,0x81,0xB4),
+     o3(0xEE,0x81,0xB5), o3(0xEE,0x81,0xB6),
+     o3(0xEE,0x81,0xB7), o3(0xEE,0x81,0xB8),
+     o3(0xEE,0x81,0xB9), o3(0xEE,0x81,0xBA),
+     o3(0xEE,0x81,0xBB), o3(0xEE,0x81,0xBC),
+     o3(0xEE,0x81,0xBD), o3(0xEE,0x81,0xBE),
+     o3(0xEE,0x81,0xBF), o3(0xEE,0x82,0x80),
+     o3(0xEE,0x82,0x81), o3(0xEE,0x82,0x82),
+     o3(0xEE,0x82,0x83), o3(0xEE,0x82,0x84),
+     o3(0xEE,0x82,0x85), o3(0xEE,0x82,0x86),
+     o3(0xEE,0x82,0x87), o3(0xEE,0x82,0x88),
+     o3(0xEE,0x82,0x89), o3(0xEE,0x82,0x8A),
+     o3(0xEE,0x82,0x8B), o3(0xEE,0x82,0x8C),
+     o3(0xEE,0x82,0x8D), o3(0xEE,0x82,0x8E),
+     o3(0xEE,0x82,0x8F), o3(0xEE,0x82,0x90),
+     o3(0xEE,0x82,0x91), o3(0xEE,0x82,0x92),
+     o3(0xEE,0x82,0x93), o3(0xEE,0x82,0x94),
+     o3(0xEE,0x82,0x95), o3(0xEE,0x82,0x96),
+     o3(0xEE,0x82,0x97), o3(0xEE,0x82,0x98),
+     o3(0xEE,0x82,0x99), o3(0xEE,0x82,0x9A),
+     o3(0xEE,0x82,0x9B), o3(0xEE,0x82,0x9C),
+     o3(0xEE,0x82,0x9D), o3(0xEE,0x82,0x9E),
+     o3(0xEE,0x82,0x9F), o3(0xEE,0x82,0xA0),
+     o3(0xEE,0x82,0xA1), o3(0xEE,0x82,0xA2),
+     o3(0xEE,0x82,0xA3), o3(0xEE,0x82,0xA4),
+     o3(0xEE,0x82,0xA5), o3(0xEE,0x82,0xA6),
+     o3(0xEE,0x82,0xA7), o3(0xEE,0x82,0xA8),
+     o3(0xEE,0x82,0xA9), o3(0xEE,0x82,0xAA),
+     o3(0xEE,0x82,0xAB), o3(0xEE,0x82,0xAC),
+     o3(0xEE,0x82,0xAD), o3(0xEE,0x82,0xAE),
+     o3(0xEE,0x82,0xAF), o3(0xEE,0x82,0xB0),
+     o3(0xEE,0x82,0xB1), o3(0xEE,0x82,0xB2),
+     o3(0xEE,0x82,0xB3), o3(0xEE,0x82,0xB4),
+     o3(0xEE,0x82,0xB5), o3(0xEE,0x82,0xB6),
+     o3(0xEE,0x82,0xB7), o3(0xEE,0x82,0xB8),
+     o3(0xEE,0x82,0xB9), o3(0xEE,0x82,0xBA),
+     o3(0xEE,0x82,0xBB),
+
+#define from_Windows_31J_F0 WORDINDEX2INFO(7922)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F0_infos,
+
+#define from_Windows_31J_F1_infos WORDINDEX2INFO(7924)
+                INVALID, o3(0xEE,0x82,0xBC),
+     o3(0xEE,0x82,0xBD), o3(0xEE,0x82,0xBE),
+     o3(0xEE,0x82,0xBF), o3(0xEE,0x83,0x80),
+     o3(0xEE,0x83,0x81), o3(0xEE,0x83,0x82),
+     o3(0xEE,0x83,0x83), o3(0xEE,0x83,0x84),
+     o3(0xEE,0x83,0x85), o3(0xEE,0x83,0x86),
+     o3(0xEE,0x83,0x87), o3(0xEE,0x83,0x88),
+     o3(0xEE,0x83,0x89), o3(0xEE,0x83,0x8A),
+     o3(0xEE,0x83,0x8B), o3(0xEE,0x83,0x8C),
+     o3(0xEE,0x83,0x8D), o3(0xEE,0x83,0x8E),
+     o3(0xEE,0x83,0x8F), o3(0xEE,0x83,0x90),
+     o3(0xEE,0x83,0x91), o3(0xEE,0x83,0x92),
+     o3(0xEE,0x83,0x93), o3(0xEE,0x83,0x94),
+     o3(0xEE,0x83,0x95), o3(0xEE,0x83,0x96),
+     o3(0xEE,0x83,0x97), o3(0xEE,0x83,0x98),
+     o3(0xEE,0x83,0x99), o3(0xEE,0x83,0x9A),
+     o3(0xEE,0x83,0x9B), o3(0xEE,0x83,0x9C),
+     o3(0xEE,0x83,0x9D), o3(0xEE,0x83,0x9E),
+     o3(0xEE,0x83,0x9F), o3(0xEE,0x83,0xA0),
+     o3(0xEE,0x83,0xA1), o3(0xEE,0x83,0xA2),
+     o3(0xEE,0x83,0xA3), o3(0xEE,0x83,0xA4),
+     o3(0xEE,0x83,0xA5), o3(0xEE,0x83,0xA6),
+     o3(0xEE,0x83,0xA7), o3(0xEE,0x83,0xA8),
+     o3(0xEE,0x83,0xA9), o3(0xEE,0x83,0xAA),
+     o3(0xEE,0x83,0xAB), o3(0xEE,0x83,0xAC),
+     o3(0xEE,0x83,0xAD), o3(0xEE,0x83,0xAE),
+     o3(0xEE,0x83,0xAF), o3(0xEE,0x83,0xB0),
+     o3(0xEE,0x83,0xB1), o3(0xEE,0x83,0xB2),
+     o3(0xEE,0x83,0xB3), o3(0xEE,0x83,0xB4),
+     o3(0xEE,0x83,0xB5), o3(0xEE,0x83,0xB6),
+     o3(0xEE,0x83,0xB7), o3(0xEE,0x83,0xB8),
+     o3(0xEE,0x83,0xB9), o3(0xEE,0x83,0xBA),
+     o3(0xEE,0x83,0xBB), o3(0xEE,0x83,0xBC),
+     o3(0xEE,0x83,0xBD), o3(0xEE,0x83,0xBE),
+     o3(0xEE,0x83,0xBF), o3(0xEE,0x84,0x80),
+     o3(0xEE,0x84,0x81), o3(0xEE,0x84,0x82),
+     o3(0xEE,0x84,0x83), o3(0xEE,0x84,0x84),
+     o3(0xEE,0x84,0x85), o3(0xEE,0x84,0x86),
+     o3(0xEE,0x84,0x87), o3(0xEE,0x84,0x88),
+     o3(0xEE,0x84,0x89), o3(0xEE,0x84,0x8A),
+     o3(0xEE,0x84,0x8B), o3(0xEE,0x84,0x8C),
+     o3(0xEE,0x84,0x8D), o3(0xEE,0x84,0x8E),
+     o3(0xEE,0x84,0x8F), o3(0xEE,0x84,0x90),
+     o3(0xEE,0x84,0x91), o3(0xEE,0x84,0x92),
+     o3(0xEE,0x84,0x93), o3(0xEE,0x84,0x94),
+     o3(0xEE,0x84,0x95), o3(0xEE,0x84,0x96),
+     o3(0xEE,0x84,0x97), o3(0xEE,0x84,0x98),
+     o3(0xEE,0x84,0x99), o3(0xEE,0x84,0x9A),
+     o3(0xEE,0x84,0x9B), o3(0xEE,0x84,0x9C),
+     o3(0xEE,0x84,0x9D), o3(0xEE,0x84,0x9E),
+     o3(0xEE,0x84,0x9F), o3(0xEE,0x84,0xA0),
+     o3(0xEE,0x84,0xA1), o3(0xEE,0x84,0xA2),
+     o3(0xEE,0x84,0xA3), o3(0xEE,0x84,0xA4),
+     o3(0xEE,0x84,0xA5), o3(0xEE,0x84,0xA6),
+     o3(0xEE,0x84,0xA7), o3(0xEE,0x84,0xA8),
+     o3(0xEE,0x84,0xA9), o3(0xEE,0x84,0xAA),
+     o3(0xEE,0x84,0xAB), o3(0xEE,0x84,0xAC),
+     o3(0xEE,0x84,0xAD), o3(0xEE,0x84,0xAE),
+     o3(0xEE,0x84,0xAF), o3(0xEE,0x84,0xB0),
+     o3(0xEE,0x84,0xB1), o3(0xEE,0x84,0xB2),
+     o3(0xEE,0x84,0xB3), o3(0xEE,0x84,0xB4),
+     o3(0xEE,0x84,0xB5), o3(0xEE,0x84,0xB6),
+     o3(0xEE,0x84,0xB7), o3(0xEE,0x84,0xB8),
+     o3(0xEE,0x84,0xB9), o3(0xEE,0x84,0xBA),
+     o3(0xEE,0x84,0xBB), o3(0xEE,0x84,0xBC),
+     o3(0xEE,0x84,0xBD), o3(0xEE,0x84,0xBE),
+     o3(0xEE,0x84,0xBF), o3(0xEE,0x85,0x80),
+     o3(0xEE,0x85,0x81), o3(0xEE,0x85,0x82),
+     o3(0xEE,0x85,0x83), o3(0xEE,0x85,0x84),
+     o3(0xEE,0x85,0x85), o3(0xEE,0x85,0x86),
+     o3(0xEE,0x85,0x87), o3(0xEE,0x85,0x88),
+     o3(0xEE,0x85,0x89), o3(0xEE,0x85,0x8A),
+     o3(0xEE,0x85,0x8B), o3(0xEE,0x85,0x8C),
+     o3(0xEE,0x85,0x8D), o3(0xEE,0x85,0x8E),
+     o3(0xEE,0x85,0x8F), o3(0xEE,0x85,0x90),
+     o3(0xEE,0x85,0x91), o3(0xEE,0x85,0x92),
+     o3(0xEE,0x85,0x93), o3(0xEE,0x85,0x94),
+     o3(0xEE,0x85,0x95), o3(0xEE,0x85,0x96),
+     o3(0xEE,0x85,0x97), o3(0xEE,0x85,0x98),
+     o3(0xEE,0x85,0x99), o3(0xEE,0x85,0x9A),
+     o3(0xEE,0x85,0x9B), o3(0xEE,0x85,0x9C),
+     o3(0xEE,0x85,0x9D), o3(0xEE,0x85,0x9E),
+     o3(0xEE,0x85,0x9F), o3(0xEE,0x85,0xA0),
+     o3(0xEE,0x85,0xA1), o3(0xEE,0x85,0xA2),
+     o3(0xEE,0x85,0xA3), o3(0xEE,0x85,0xA4),
+     o3(0xEE,0x85,0xA5), o3(0xEE,0x85,0xA6),
+     o3(0xEE,0x85,0xA7), o3(0xEE,0x85,0xA8),
+     o3(0xEE,0x85,0xA9), o3(0xEE,0x85,0xAA),
+     o3(0xEE,0x85,0xAB), o3(0xEE,0x85,0xAC),
+     o3(0xEE,0x85,0xAD), o3(0xEE,0x85,0xAE),
+     o3(0xEE,0x85,0xAF), o3(0xEE,0x85,0xB0),
+     o3(0xEE,0x85,0xB1), o3(0xEE,0x85,0xB2),
+     o3(0xEE,0x85,0xB3), o3(0xEE,0x85,0xB4),
+     o3(0xEE,0x85,0xB5), o3(0xEE,0x85,0xB6),
+     o3(0xEE,0x85,0xB7),
+
+#define from_Windows_31J_F1 WORDINDEX2INFO(8113)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F1_infos,
+
+#define from_Windows_31J_F2_infos WORDINDEX2INFO(8115)
+                INVALID, o3(0xEE,0x85,0xB8),
+     o3(0xEE,0x85,0xB9), o3(0xEE,0x85,0xBA),
+     o3(0xEE,0x85,0xBB), o3(0xEE,0x85,0xBC),
+     o3(0xEE,0x85,0xBD), o3(0xEE,0x85,0xBE),
+     o3(0xEE,0x85,0xBF), o3(0xEE,0x86,0x80),
+     o3(0xEE,0x86,0x81), o3(0xEE,0x86,0x82),
+     o3(0xEE,0x86,0x83), o3(0xEE,0x86,0x84),
+     o3(0xEE,0x86,0x85), o3(0xEE,0x86,0x86),
+     o3(0xEE,0x86,0x87), o3(0xEE,0x86,0x88),
+     o3(0xEE,0x86,0x89), o3(0xEE,0x86,0x8A),
+     o3(0xEE,0x86,0x8B), o3(0xEE,0x86,0x8C),
+     o3(0xEE,0x86,0x8D), o3(0xEE,0x86,0x8E),
+     o3(0xEE,0x86,0x8F), o3(0xEE,0x86,0x90),
+     o3(0xEE,0x86,0x91), o3(0xEE,0x86,0x92),
+     o3(0xEE,0x86,0x93), o3(0xEE,0x86,0x94),
+     o3(0xEE,0x86,0x95), o3(0xEE,0x86,0x96),
+     o3(0xEE,0x86,0x97), o3(0xEE,0x86,0x98),
+     o3(0xEE,0x86,0x99), o3(0xEE,0x86,0x9A),
+     o3(0xEE,0x86,0x9B), o3(0xEE,0x86,0x9C),
+     o3(0xEE,0x86,0x9D), o3(0xEE,0x86,0x9E),
+     o3(0xEE,0x86,0x9F), o3(0xEE,0x86,0xA0),
+     o3(0xEE,0x86,0xA1), o3(0xEE,0x86,0xA2),
+     o3(0xEE,0x86,0xA3), o3(0xEE,0x86,0xA4),
+     o3(0xEE,0x86,0xA5), o3(0xEE,0x86,0xA6),
+     o3(0xEE,0x86,0xA7), o3(0xEE,0x86,0xA8),
+     o3(0xEE,0x86,0xA9), o3(0xEE,0x86,0xAA),
+     o3(0xEE,0x86,0xAB), o3(0xEE,0x86,0xAC),
+     o3(0xEE,0x86,0xAD), o3(0xEE,0x86,0xAE),
+     o3(0xEE,0x86,0xAF), o3(0xEE,0x86,0xB0),
+     o3(0xEE,0x86,0xB1), o3(0xEE,0x86,0xB2),
+     o3(0xEE,0x86,0xB3), o3(0xEE,0x86,0xB4),
+     o3(0xEE,0x86,0xB5), o3(0xEE,0x86,0xB6),
+     o3(0xEE,0x86,0xB7), o3(0xEE,0x86,0xB8),
+     o3(0xEE,0x86,0xB9), o3(0xEE,0x86,0xBA),
+     o3(0xEE,0x86,0xBB), o3(0xEE,0x86,0xBC),
+     o3(0xEE,0x86,0xBD), o3(0xEE,0x86,0xBE),
+     o3(0xEE,0x86,0xBF), o3(0xEE,0x87,0x80),
+     o3(0xEE,0x87,0x81), o3(0xEE,0x87,0x82),
+     o3(0xEE,0x87,0x83), o3(0xEE,0x87,0x84),
+     o3(0xEE,0x87,0x85), o3(0xEE,0x87,0x86),
+     o3(0xEE,0x87,0x87), o3(0xEE,0x87,0x88),
+     o3(0xEE,0x87,0x89), o3(0xEE,0x87,0x8A),
+     o3(0xEE,0x87,0x8B), o3(0xEE,0x87,0x8C),
+     o3(0xEE,0x87,0x8D), o3(0xEE,0x87,0x8E),
+     o3(0xEE,0x87,0x8F), o3(0xEE,0x87,0x90),
+     o3(0xEE,0x87,0x91), o3(0xEE,0x87,0x92),
+     o3(0xEE,0x87,0x93), o3(0xEE,0x87,0x94),
+     o3(0xEE,0x87,0x95), o3(0xEE,0x87,0x96),
+     o3(0xEE,0x87,0x97), o3(0xEE,0x87,0x98),
+     o3(0xEE,0x87,0x99), o3(0xEE,0x87,0x9A),
+     o3(0xEE,0x87,0x9B), o3(0xEE,0x87,0x9C),
+     o3(0xEE,0x87,0x9D), o3(0xEE,0x87,0x9E),
+     o3(0xEE,0x87,0x9F), o3(0xEE,0x87,0xA0),
+     o3(0xEE,0x87,0xA1), o3(0xEE,0x87,0xA2),
+     o3(0xEE,0x87,0xA3), o3(0xEE,0x87,0xA4),
+     o3(0xEE,0x87,0xA5), o3(0xEE,0x87,0xA6),
+     o3(0xEE,0x87,0xA7), o3(0xEE,0x87,0xA8),
+     o3(0xEE,0x87,0xA9), o3(0xEE,0x87,0xAA),
+     o3(0xEE,0x87,0xAB), o3(0xEE,0x87,0xAC),
+     o3(0xEE,0x87,0xAD), o3(0xEE,0x87,0xAE),
+     o3(0xEE,0x87,0xAF), o3(0xEE,0x87,0xB0),
+     o3(0xEE,0x87,0xB1), o3(0xEE,0x87,0xB2),
+     o3(0xEE,0x87,0xB3), o3(0xEE,0x87,0xB4),
+     o3(0xEE,0x87,0xB5), o3(0xEE,0x87,0xB6),
+     o3(0xEE,0x87,0xB7), o3(0xEE,0x87,0xB8),
+     o3(0xEE,0x87,0xB9), o3(0xEE,0x87,0xBA),
+     o3(0xEE,0x87,0xBB), o3(0xEE,0x87,0xBC),
+     o3(0xEE,0x87,0xBD), o3(0xEE,0x87,0xBE),
+     o3(0xEE,0x87,0xBF), o3(0xEE,0x88,0x80),
+     o3(0xEE,0x88,0x81), o3(0xEE,0x88,0x82),
+     o3(0xEE,0x88,0x83), o3(0xEE,0x88,0x84),
+     o3(0xEE,0x88,0x85), o3(0xEE,0x88,0x86),
+     o3(0xEE,0x88,0x87), o3(0xEE,0x88,0x88),
+     o3(0xEE,0x88,0x89), o3(0xEE,0x88,0x8A),
+     o3(0xEE,0x88,0x8B), o3(0xEE,0x88,0x8C),
+     o3(0xEE,0x88,0x8D), o3(0xEE,0x88,0x8E),
+     o3(0xEE,0x88,0x8F), o3(0xEE,0x88,0x90),
+     o3(0xEE,0x88,0x91), o3(0xEE,0x88,0x92),
+     o3(0xEE,0x88,0x93), o3(0xEE,0x88,0x94),
+     o3(0xEE,0x88,0x95), o3(0xEE,0x88,0x96),
+     o3(0xEE,0x88,0x97), o3(0xEE,0x88,0x98),
+     o3(0xEE,0x88,0x99), o3(0xEE,0x88,0x9A),
+     o3(0xEE,0x88,0x9B), o3(0xEE,0x88,0x9C),
+     o3(0xEE,0x88,0x9D), o3(0xEE,0x88,0x9E),
+     o3(0xEE,0x88,0x9F), o3(0xEE,0x88,0xA0),
+     o3(0xEE,0x88,0xA1), o3(0xEE,0x88,0xA2),
+     o3(0xEE,0x88,0xA3), o3(0xEE,0x88,0xA4),
+     o3(0xEE,0x88,0xA5), o3(0xEE,0x88,0xA6),
+     o3(0xEE,0x88,0xA7), o3(0xEE,0x88,0xA8),
+     o3(0xEE,0x88,0xA9), o3(0xEE,0x88,0xAA),
+     o3(0xEE,0x88,0xAB), o3(0xEE,0x88,0xAC),
+     o3(0xEE,0x88,0xAD), o3(0xEE,0x88,0xAE),
+     o3(0xEE,0x88,0xAF), o3(0xEE,0x88,0xB0),
+     o3(0xEE,0x88,0xB1), o3(0xEE,0x88,0xB2),
+     o3(0xEE,0x88,0xB3),
+
+#define from_Windows_31J_F2 WORDINDEX2INFO(8304)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F2_infos,
+
+#define from_Windows_31J_F3_infos WORDINDEX2INFO(8306)
+                INVALID, o3(0xEE,0x88,0xB4),
+     o3(0xEE,0x88,0xB5), o3(0xEE,0x88,0xB6),
+     o3(0xEE,0x88,0xB7), o3(0xEE,0x88,0xB8),
+     o3(0xEE,0x88,0xB9), o3(0xEE,0x88,0xBA),
+     o3(0xEE,0x88,0xBB), o3(0xEE,0x88,0xBC),
+     o3(0xEE,0x88,0xBD), o3(0xEE,0x88,0xBE),
+     o3(0xEE,0x88,0xBF), o3(0xEE,0x89,0x80),
+     o3(0xEE,0x89,0x81), o3(0xEE,0x89,0x82),
+     o3(0xEE,0x89,0x83), o3(0xEE,0x89,0x84),
+     o3(0xEE,0x89,0x85), o3(0xEE,0x89,0x86),
+     o3(0xEE,0x89,0x87), o3(0xEE,0x89,0x88),
+     o3(0xEE,0x89,0x89), o3(0xEE,0x89,0x8A),
+     o3(0xEE,0x89,0x8B), o3(0xEE,0x89,0x8C),
+     o3(0xEE,0x89,0x8D), o3(0xEE,0x89,0x8E),
+     o3(0xEE,0x89,0x8F), o3(0xEE,0x89,0x90),
+     o3(0xEE,0x89,0x91), o3(0xEE,0x89,0x92),
+     o3(0xEE,0x89,0x93), o3(0xEE,0x89,0x94),
+     o3(0xEE,0x89,0x95), o3(0xEE,0x89,0x96),
+     o3(0xEE,0x89,0x97), o3(0xEE,0x89,0x98),
+     o3(0xEE,0x89,0x99), o3(0xEE,0x89,0x9A),
+     o3(0xEE,0x89,0x9B), o3(0xEE,0x89,0x9C),
+     o3(0xEE,0x89,0x9D), o3(0xEE,0x89,0x9E),
+     o3(0xEE,0x89,0x9F), o3(0xEE,0x89,0xA0),
+     o3(0xEE,0x89,0xA1), o3(0xEE,0x89,0xA2),
+     o3(0xEE,0x89,0xA3), o3(0xEE,0x89,0xA4),
+     o3(0xEE,0x89,0xA5), o3(0xEE,0x89,0xA6),
+     o3(0xEE,0x89,0xA7), o3(0xEE,0x89,0xA8),
+     o3(0xEE,0x89,0xA9), o3(0xEE,0x89,0xAA),
+     o3(0xEE,0x89,0xAB), o3(0xEE,0x89,0xAC),
+     o3(0xEE,0x89,0xAD), o3(0xEE,0x89,0xAE),
+     o3(0xEE,0x89,0xAF), o3(0xEE,0x89,0xB0),
+     o3(0xEE,0x89,0xB1), o3(0xEE,0x89,0xB2),
+     o3(0xEE,0x89,0xB3), o3(0xEE,0x89,0xB4),
+     o3(0xEE,0x89,0xB5), o3(0xEE,0x89,0xB6),
+     o3(0xEE,0x89,0xB7), o3(0xEE,0x89,0xB8),
+     o3(0xEE,0x89,0xB9), o3(0xEE,0x89,0xBA),
+     o3(0xEE,0x89,0xBB), o3(0xEE,0x89,0xBC),
+     o3(0xEE,0x89,0xBD), o3(0xEE,0x89,0xBE),
+     o3(0xEE,0x89,0xBF), o3(0xEE,0x8A,0x80),
+     o3(0xEE,0x8A,0x81), o3(0xEE,0x8A,0x82),
+     o3(0xEE,0x8A,0x83), o3(0xEE,0x8A,0x84),
+     o3(0xEE,0x8A,0x85), o3(0xEE,0x8A,0x86),
+     o3(0xEE,0x8A,0x87), o3(0xEE,0x8A,0x88),
+     o3(0xEE,0x8A,0x89), o3(0xEE,0x8A,0x8A),
+     o3(0xEE,0x8A,0x8B), o3(0xEE,0x8A,0x8C),
+     o3(0xEE,0x8A,0x8D), o3(0xEE,0x8A,0x8E),
+     o3(0xEE,0x8A,0x8F), o3(0xEE,0x8A,0x90),
+     o3(0xEE,0x8A,0x91), o3(0xEE,0x8A,0x92),
+     o3(0xEE,0x8A,0x93), o3(0xEE,0x8A,0x94),
+     o3(0xEE,0x8A,0x95), o3(0xEE,0x8A,0x96),
+     o3(0xEE,0x8A,0x97), o3(0xEE,0x8A,0x98),
+     o3(0xEE,0x8A,0x99), o3(0xEE,0x8A,0x9A),
+     o3(0xEE,0x8A,0x9B), o3(0xEE,0x8A,0x9C),
+     o3(0xEE,0x8A,0x9D), o3(0xEE,0x8A,0x9E),
+     o3(0xEE,0x8A,0x9F), o3(0xEE,0x8A,0xA0),
+     o3(0xEE,0x8A,0xA1), o3(0xEE,0x8A,0xA2),
+     o3(0xEE,0x8A,0xA3), o3(0xEE,0x8A,0xA4),
+     o3(0xEE,0x8A,0xA5), o3(0xEE,0x8A,0xA6),
+     o3(0xEE,0x8A,0xA7), o3(0xEE,0x8A,0xA8),
+     o3(0xEE,0x8A,0xA9), o3(0xEE,0x8A,0xAA),
+     o3(0xEE,0x8A,0xAB), o3(0xEE,0x8A,0xAC),
+     o3(0xEE,0x8A,0xAD), o3(0xEE,0x8A,0xAE),
+     o3(0xEE,0x8A,0xAF), o3(0xEE,0x8A,0xB0),
+     o3(0xEE,0x8A,0xB1), o3(0xEE,0x8A,0xB2),
+     o3(0xEE,0x8A,0xB3), o3(0xEE,0x8A,0xB4),
+     o3(0xEE,0x8A,0xB5), o3(0xEE,0x8A,0xB6),
+     o3(0xEE,0x8A,0xB7), o3(0xEE,0x8A,0xB8),
+     o3(0xEE,0x8A,0xB9), o3(0xEE,0x8A,0xBA),
+     o3(0xEE,0x8A,0xBB), o3(0xEE,0x8A,0xBC),
+     o3(0xEE,0x8A,0xBD), o3(0xEE,0x8A,0xBE),
+     o3(0xEE,0x8A,0xBF), o3(0xEE,0x8B,0x80),
+     o3(0xEE,0x8B,0x81), o3(0xEE,0x8B,0x82),
+     o3(0xEE,0x8B,0x83), o3(0xEE,0x8B,0x84),
+     o3(0xEE,0x8B,0x85), o3(0xEE,0x8B,0x86),
+     o3(0xEE,0x8B,0x87), o3(0xEE,0x8B,0x88),
+     o3(0xEE,0x8B,0x89), o3(0xEE,0x8B,0x8A),
+     o3(0xEE,0x8B,0x8B), o3(0xEE,0x8B,0x8C),
+     o3(0xEE,0x8B,0x8D), o3(0xEE,0x8B,0x8E),
+     o3(0xEE,0x8B,0x8F), o3(0xEE,0x8B,0x90),
+     o3(0xEE,0x8B,0x91), o3(0xEE,0x8B,0x92),
+     o3(0xEE,0x8B,0x93), o3(0xEE,0x8B,0x94),
+     o3(0xEE,0x8B,0x95), o3(0xEE,0x8B,0x96),
+     o3(0xEE,0x8B,0x97), o3(0xEE,0x8B,0x98),
+     o3(0xEE,0x8B,0x99), o3(0xEE,0x8B,0x9A),
+     o3(0xEE,0x8B,0x9B), o3(0xEE,0x8B,0x9C),
+     o3(0xEE,0x8B,0x9D), o3(0xEE,0x8B,0x9E),
+     o3(0xEE,0x8B,0x9F), o3(0xEE,0x8B,0xA0),
+     o3(0xEE,0x8B,0xA1), o3(0xEE,0x8B,0xA2),
+     o3(0xEE,0x8B,0xA3), o3(0xEE,0x8B,0xA4),
+     o3(0xEE,0x8B,0xA5), o3(0xEE,0x8B,0xA6),
+     o3(0xEE,0x8B,0xA7), o3(0xEE,0x8B,0xA8),
+     o3(0xEE,0x8B,0xA9), o3(0xEE,0x8B,0xAA),
+     o3(0xEE,0x8B,0xAB), o3(0xEE,0x8B,0xAC),
+     o3(0xEE,0x8B,0xAD), o3(0xEE,0x8B,0xAE),
+     o3(0xEE,0x8B,0xAF),
+
+#define from_Windows_31J_F3 WORDINDEX2INFO(8495)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F3_infos,
+
+#define from_Windows_31J_F4_infos WORDINDEX2INFO(8497)
+                INVALID, o3(0xEE,0x8B,0xB0),
+     o3(0xEE,0x8B,0xB1), o3(0xEE,0x8B,0xB2),
+     o3(0xEE,0x8B,0xB3), o3(0xEE,0x8B,0xB4),
+     o3(0xEE,0x8B,0xB5), o3(0xEE,0x8B,0xB6),
+     o3(0xEE,0x8B,0xB7), o3(0xEE,0x8B,0xB8),
+     o3(0xEE,0x8B,0xB9), o3(0xEE,0x8B,0xBA),
+     o3(0xEE,0x8B,0xBB), o3(0xEE,0x8B,0xBC),
+     o3(0xEE,0x8B,0xBD), o3(0xEE,0x8B,0xBE),
+     o3(0xEE,0x8B,0xBF), o3(0xEE,0x8C,0x80),
+     o3(0xEE,0x8C,0x81), o3(0xEE,0x8C,0x82),
+     o3(0xEE,0x8C,0x83), o3(0xEE,0x8C,0x84),
+     o3(0xEE,0x8C,0x85), o3(0xEE,0x8C,0x86),
+     o3(0xEE,0x8C,0x87), o3(0xEE,0x8C,0x88),
+     o3(0xEE,0x8C,0x89), o3(0xEE,0x8C,0x8A),
+     o3(0xEE,0x8C,0x8B), o3(0xEE,0x8C,0x8C),
+     o3(0xEE,0x8C,0x8D), o3(0xEE,0x8C,0x8E),
+     o3(0xEE,0x8C,0x8F), o3(0xEE,0x8C,0x90),
+     o3(0xEE,0x8C,0x91), o3(0xEE,0x8C,0x92),
+     o3(0xEE,0x8C,0x93), o3(0xEE,0x8C,0x94),
+     o3(0xEE,0x8C,0x95), o3(0xEE,0x8C,0x96),
+     o3(0xEE,0x8C,0x97), o3(0xEE,0x8C,0x98),
+     o3(0xEE,0x8C,0x99), o3(0xEE,0x8C,0x9A),
+     o3(0xEE,0x8C,0x9B), o3(0xEE,0x8C,0x9C),
+     o3(0xEE,0x8C,0x9D), o3(0xEE,0x8C,0x9E),
+     o3(0xEE,0x8C,0x9F), o3(0xEE,0x8C,0xA0),
+     o3(0xEE,0x8C,0xA1), o3(0xEE,0x8C,0xA2),
+     o3(0xEE,0x8C,0xA3), o3(0xEE,0x8C,0xA4),
+     o3(0xEE,0x8C,0xA5), o3(0xEE,0x8C,0xA6),
+     o3(0xEE,0x8C,0xA7), o3(0xEE,0x8C,0xA8),
+     o3(0xEE,0x8C,0xA9), o3(0xEE,0x8C,0xAA),
+     o3(0xEE,0x8C,0xAB), o3(0xEE,0x8C,0xAC),
+     o3(0xEE,0x8C,0xAD), o3(0xEE,0x8C,0xAE),
+     o3(0xEE,0x8C,0xAF), o3(0xEE,0x8C,0xB0),
+     o3(0xEE,0x8C,0xB1), o3(0xEE,0x8C,0xB2),
+     o3(0xEE,0x8C,0xB3), o3(0xEE,0x8C,0xB4),
+     o3(0xEE,0x8C,0xB5), o3(0xEE,0x8C,0xB6),
+     o3(0xEE,0x8C,0xB7), o3(0xEE,0x8C,0xB8),
+     o3(0xEE,0x8C,0xB9), o3(0xEE,0x8C,0xBA),
+     o3(0xEE,0x8C,0xBB), o3(0xEE,0x8C,0xBC),
+     o3(0xEE,0x8C,0xBD), o3(0xEE,0x8C,0xBE),
+     o3(0xEE,0x8C,0xBF), o3(0xEE,0x8D,0x80),
+     o3(0xEE,0x8D,0x81), o3(0xEE,0x8D,0x82),
+     o3(0xEE,0x8D,0x83), o3(0xEE,0x8D,0x84),
+     o3(0xEE,0x8D,0x85), o3(0xEE,0x8D,0x86),
+     o3(0xEE,0x8D,0x87), o3(0xEE,0x8D,0x88),
+     o3(0xEE,0x8D,0x89), o3(0xEE,0x8D,0x8A),
+     o3(0xEE,0x8D,0x8B), o3(0xEE,0x8D,0x8C),
+     o3(0xEE,0x8D,0x8D), o3(0xEE,0x8D,0x8E),
+     o3(0xEE,0x8D,0x8F), o3(0xEE,0x8D,0x90),
+     o3(0xEE,0x8D,0x91), o3(0xEE,0x8D,0x92),
+     o3(0xEE,0x8D,0x93), o3(0xEE,0x8D,0x94),
+     o3(0xEE,0x8D,0x95), o3(0xEE,0x8D,0x96),
+     o3(0xEE,0x8D,0x97), o3(0xEE,0x8D,0x98),
+     o3(0xEE,0x8D,0x99), o3(0xEE,0x8D,0x9A),
+     o3(0xEE,0x8D,0x9B), o3(0xEE,0x8D,0x9C),
+     o3(0xEE,0x8D,0x9D), o3(0xEE,0x8D,0x9E),
+     o3(0xEE,0x8D,0x9F), o3(0xEE,0x8D,0xA0),
+     o3(0xEE,0x8D,0xA1), o3(0xEE,0x8D,0xA2),
+     o3(0xEE,0x8D,0xA3), o3(0xEE,0x8D,0xA4),
+     o3(0xEE,0x8D,0xA5), o3(0xEE,0x8D,0xA6),
+     o3(0xEE,0x8D,0xA7), o3(0xEE,0x8D,0xA8),
+     o3(0xEE,0x8D,0xA9), o3(0xEE,0x8D,0xAA),
+     o3(0xEE,0x8D,0xAB), o3(0xEE,0x8D,0xAC),
+     o3(0xEE,0x8D,0xAD), o3(0xEE,0x8D,0xAE),
+     o3(0xEE,0x8D,0xAF), o3(0xEE,0x8D,0xB0),
+     o3(0xEE,0x8D,0xB1), o3(0xEE,0x8D,0xB2),
+     o3(0xEE,0x8D,0xB3), o3(0xEE,0x8D,0xB4),
+     o3(0xEE,0x8D,0xB5), o3(0xEE,0x8D,0xB6),
+     o3(0xEE,0x8D,0xB7), o3(0xEE,0x8D,0xB8),
+     o3(0xEE,0x8D,0xB9), o3(0xEE,0x8D,0xBA),
+     o3(0xEE,0x8D,0xBB), o3(0xEE,0x8D,0xBC),
+     o3(0xEE,0x8D,0xBD), o3(0xEE,0x8D,0xBE),
+     o3(0xEE,0x8D,0xBF), o3(0xEE,0x8E,0x80),
+     o3(0xEE,0x8E,0x81), o3(0xEE,0x8E,0x82),
+     o3(0xEE,0x8E,0x83), o3(0xEE,0x8E,0x84),
+     o3(0xEE,0x8E,0x85), o3(0xEE,0x8E,0x86),
+     o3(0xEE,0x8E,0x87), o3(0xEE,0x8E,0x88),
+     o3(0xEE,0x8E,0x89), o3(0xEE,0x8E,0x8A),
+     o3(0xEE,0x8E,0x8B), o3(0xEE,0x8E,0x8C),
+     o3(0xEE,0x8E,0x8D), o3(0xEE,0x8E,0x8E),
+     o3(0xEE,0x8E,0x8F), o3(0xEE,0x8E,0x90),
+     o3(0xEE,0x8E,0x91), o3(0xEE,0x8E,0x92),
+     o3(0xEE,0x8E,0x93), o3(0xEE,0x8E,0x94),
+     o3(0xEE,0x8E,0x95), o3(0xEE,0x8E,0x96),
+     o3(0xEE,0x8E,0x97), o3(0xEE,0x8E,0x98),
+     o3(0xEE,0x8E,0x99), o3(0xEE,0x8E,0x9A),
+     o3(0xEE,0x8E,0x9B), o3(0xEE,0x8E,0x9C),
+     o3(0xEE,0x8E,0x9D), o3(0xEE,0x8E,0x9E),
+     o3(0xEE,0x8E,0x9F), o3(0xEE,0x8E,0xA0),
+     o3(0xEE,0x8E,0xA1), o3(0xEE,0x8E,0xA2),
+     o3(0xEE,0x8E,0xA3), o3(0xEE,0x8E,0xA4),
+     o3(0xEE,0x8E,0xA5), o3(0xEE,0x8E,0xA6),
+     o3(0xEE,0x8E,0xA7), o3(0xEE,0x8E,0xA8),
+     o3(0xEE,0x8E,0xA9), o3(0xEE,0x8E,0xAA),
+     o3(0xEE,0x8E,0xAB),
+
+#define from_Windows_31J_F4 WORDINDEX2INFO(8686)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F4_infos,
+
+#define from_Windows_31J_F5_infos WORDINDEX2INFO(8688)
+                INVALID, o3(0xEE,0x8E,0xAC),
+     o3(0xEE,0x8E,0xAD), o3(0xEE,0x8E,0xAE),
+     o3(0xEE,0x8E,0xAF), o3(0xEE,0x8E,0xB0),
+     o3(0xEE,0x8E,0xB1), o3(0xEE,0x8E,0xB2),
+     o3(0xEE,0x8E,0xB3), o3(0xEE,0x8E,0xB4),
+     o3(0xEE,0x8E,0xB5), o3(0xEE,0x8E,0xB6),
+     o3(0xEE,0x8E,0xB7), o3(0xEE,0x8E,0xB8),
+     o3(0xEE,0x8E,0xB9), o3(0xEE,0x8E,0xBA),
+     o3(0xEE,0x8E,0xBB), o3(0xEE,0x8E,0xBC),
+     o3(0xEE,0x8E,0xBD), o3(0xEE,0x8E,0xBE),
+     o3(0xEE,0x8E,0xBF), o3(0xEE,0x8F,0x80),
+     o3(0xEE,0x8F,0x81), o3(0xEE,0x8F,0x82),
+     o3(0xEE,0x8F,0x83), o3(0xEE,0x8F,0x84),
+     o3(0xEE,0x8F,0x85), o3(0xEE,0x8F,0x86),
+     o3(0xEE,0x8F,0x87), o3(0xEE,0x8F,0x88),
+     o3(0xEE,0x8F,0x89), o3(0xEE,0x8F,0x8A),
+     o3(0xEE,0x8F,0x8B), o3(0xEE,0x8F,0x8C),
+     o3(0xEE,0x8F,0x8D), o3(0xEE,0x8F,0x8E),
+     o3(0xEE,0x8F,0x8F), o3(0xEE,0x8F,0x90),
+     o3(0xEE,0x8F,0x91), o3(0xEE,0x8F,0x92),
+     o3(0xEE,0x8F,0x93), o3(0xEE,0x8F,0x94),
+     o3(0xEE,0x8F,0x95), o3(0xEE,0x8F,0x96),
+     o3(0xEE,0x8F,0x97), o3(0xEE,0x8F,0x98),
+     o3(0xEE,0x8F,0x99), o3(0xEE,0x8F,0x9A),
+     o3(0xEE,0x8F,0x9B), o3(0xEE,0x8F,0x9C),
+     o3(0xEE,0x8F,0x9D), o3(0xEE,0x8F,0x9E),
+     o3(0xEE,0x8F,0x9F), o3(0xEE,0x8F,0xA0),
+     o3(0xEE,0x8F,0xA1), o3(0xEE,0x8F,0xA2),
+     o3(0xEE,0x8F,0xA3), o3(0xEE,0x8F,0xA4),
+     o3(0xEE,0x8F,0xA5), o3(0xEE,0x8F,0xA6),
+     o3(0xEE,0x8F,0xA7), o3(0xEE,0x8F,0xA8),
+     o3(0xEE,0x8F,0xA9), o3(0xEE,0x8F,0xAA),
+     o3(0xEE,0x8F,0xAB), o3(0xEE,0x8F,0xAC),
+     o3(0xEE,0x8F,0xAD), o3(0xEE,0x8F,0xAE),
+     o3(0xEE,0x8F,0xAF), o3(0xEE,0x8F,0xB0),
+     o3(0xEE,0x8F,0xB1), o3(0xEE,0x8F,0xB2),
+     o3(0xEE,0x8F,0xB3), o3(0xEE,0x8F,0xB4),
+     o3(0xEE,0x8F,0xB5), o3(0xEE,0x8F,0xB6),
+     o3(0xEE,0x8F,0xB7), o3(0xEE,0x8F,0xB8),
+     o3(0xEE,0x8F,0xB9), o3(0xEE,0x8F,0xBA),
+     o3(0xEE,0x8F,0xBB), o3(0xEE,0x8F,0xBC),
+     o3(0xEE,0x8F,0xBD), o3(0xEE,0x8F,0xBE),
+     o3(0xEE,0x8F,0xBF), o3(0xEE,0x90,0x80),
+     o3(0xEE,0x90,0x81), o3(0xEE,0x90,0x82),
+     o3(0xEE,0x90,0x83), o3(0xEE,0x90,0x84),
+     o3(0xEE,0x90,0x85), o3(0xEE,0x90,0x86),
+     o3(0xEE,0x90,0x87), o3(0xEE,0x90,0x88),
+     o3(0xEE,0x90,0x89), o3(0xEE,0x90,0x8A),
+     o3(0xEE,0x90,0x8B), o3(0xEE,0x90,0x8C),
+     o3(0xEE,0x90,0x8D), o3(0xEE,0x90,0x8E),
+     o3(0xEE,0x90,0x8F), o3(0xEE,0x90,0x90),
+     o3(0xEE,0x90,0x91), o3(0xEE,0x90,0x92),
+     o3(0xEE,0x90,0x93), o3(0xEE,0x90,0x94),
+     o3(0xEE,0x90,0x95), o3(0xEE,0x90,0x96),
+     o3(0xEE,0x90,0x97), o3(0xEE,0x90,0x98),
+     o3(0xEE,0x90,0x99), o3(0xEE,0x90,0x9A),
+     o3(0xEE,0x90,0x9B), o3(0xEE,0x90,0x9C),
+     o3(0xEE,0x90,0x9D), o3(0xEE,0x90,0x9E),
+     o3(0xEE,0x90,0x9F), o3(0xEE,0x90,0xA0),
+     o3(0xEE,0x90,0xA1), o3(0xEE,0x90,0xA2),
+     o3(0xEE,0x90,0xA3), o3(0xEE,0x90,0xA4),
+     o3(0xEE,0x90,0xA5), o3(0xEE,0x90,0xA6),
+     o3(0xEE,0x90,0xA7), o3(0xEE,0x90,0xA8),
+     o3(0xEE,0x90,0xA9), o3(0xEE,0x90,0xAA),
+     o3(0xEE,0x90,0xAB), o3(0xEE,0x90,0xAC),
+     o3(0xEE,0x90,0xAD), o3(0xEE,0x90,0xAE),
+     o3(0xEE,0x90,0xAF), o3(0xEE,0x90,0xB0),
+     o3(0xEE,0x90,0xB1), o3(0xEE,0x90,0xB2),
+     o3(0xEE,0x90,0xB3), o3(0xEE,0x90,0xB4),
+     o3(0xEE,0x90,0xB5), o3(0xEE,0x90,0xB6),
+     o3(0xEE,0x90,0xB7), o3(0xEE,0x90,0xB8),
+     o3(0xEE,0x90,0xB9), o3(0xEE,0x90,0xBA),
+     o3(0xEE,0x90,0xBB), o3(0xEE,0x90,0xBC),
+     o3(0xEE,0x90,0xBD), o3(0xEE,0x90,0xBE),
+     o3(0xEE,0x90,0xBF), o3(0xEE,0x91,0x80),
+     o3(0xEE,0x91,0x81), o3(0xEE,0x91,0x82),
+     o3(0xEE,0x91,0x83), o3(0xEE,0x91,0x84),
+     o3(0xEE,0x91,0x85), o3(0xEE,0x91,0x86),
+     o3(0xEE,0x91,0x87), o3(0xEE,0x91,0x88),
+     o3(0xEE,0x91,0x89), o3(0xEE,0x91,0x8A),
+     o3(0xEE,0x91,0x8B), o3(0xEE,0x91,0x8C),
+     o3(0xEE,0x91,0x8D), o3(0xEE,0x91,0x8E),
+     o3(0xEE,0x91,0x8F), o3(0xEE,0x91,0x90),
+     o3(0xEE,0x91,0x91), o3(0xEE,0x91,0x92),
+     o3(0xEE,0x91,0x93), o3(0xEE,0x91,0x94),
+     o3(0xEE,0x91,0x95), o3(0xEE,0x91,0x96),
+     o3(0xEE,0x91,0x97), o3(0xEE,0x91,0x98),
+     o3(0xEE,0x91,0x99), o3(0xEE,0x91,0x9A),
+     o3(0xEE,0x91,0x9B), o3(0xEE,0x91,0x9C),
+     o3(0xEE,0x91,0x9D), o3(0xEE,0x91,0x9E),
+     o3(0xEE,0x91,0x9F), o3(0xEE,0x91,0xA0),
+     o3(0xEE,0x91,0xA1), o3(0xEE,0x91,0xA2),
+     o3(0xEE,0x91,0xA3), o3(0xEE,0x91,0xA4),
+     o3(0xEE,0x91,0xA5), o3(0xEE,0x91,0xA6),
+     o3(0xEE,0x91,0xA7),
+
+#define from_Windows_31J_F5 WORDINDEX2INFO(8877)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F5_infos,
+
+#define from_Windows_31J_F6_infos WORDINDEX2INFO(8879)
+                INVALID, o3(0xEE,0x91,0xA8),
+     o3(0xEE,0x91,0xA9), o3(0xEE,0x91,0xAA),
+     o3(0xEE,0x91,0xAB), o3(0xEE,0x91,0xAC),
+     o3(0xEE,0x91,0xAD), o3(0xEE,0x91,0xAE),
+     o3(0xEE,0x91,0xAF), o3(0xEE,0x91,0xB0),
+     o3(0xEE,0x91,0xB1), o3(0xEE,0x91,0xB2),
+     o3(0xEE,0x91,0xB3), o3(0xEE,0x91,0xB4),
+     o3(0xEE,0x91,0xB5), o3(0xEE,0x91,0xB6),
+     o3(0xEE,0x91,0xB7), o3(0xEE,0x91,0xB8),
+     o3(0xEE,0x91,0xB9), o3(0xEE,0x91,0xBA),
+     o3(0xEE,0x91,0xBB), o3(0xEE,0x91,0xBC),
+     o3(0xEE,0x91,0xBD), o3(0xEE,0x91,0xBE),
+     o3(0xEE,0x91,0xBF), o3(0xEE,0x92,0x80),
+     o3(0xEE,0x92,0x81), o3(0xEE,0x92,0x82),
+     o3(0xEE,0x92,0x83), o3(0xEE,0x92,0x84),
+     o3(0xEE,0x92,0x85), o3(0xEE,0x92,0x86),
+     o3(0xEE,0x92,0x87), o3(0xEE,0x92,0x88),
+     o3(0xEE,0x92,0x89), o3(0xEE,0x92,0x8A),
+     o3(0xEE,0x92,0x8B), o3(0xEE,0x92,0x8C),
+     o3(0xEE,0x92,0x8D), o3(0xEE,0x92,0x8E),
+     o3(0xEE,0x92,0x8F), o3(0xEE,0x92,0x90),
+     o3(0xEE,0x92,0x91), o3(0xEE,0x92,0x92),
+     o3(0xEE,0x92,0x93), o3(0xEE,0x92,0x94),
+     o3(0xEE,0x92,0x95), o3(0xEE,0x92,0x96),
+     o3(0xEE,0x92,0x97), o3(0xEE,0x92,0x98),
+     o3(0xEE,0x92,0x99), o3(0xEE,0x92,0x9A),
+     o3(0xEE,0x92,0x9B), o3(0xEE,0x92,0x9C),
+     o3(0xEE,0x92,0x9D), o3(0xEE,0x92,0x9E),
+     o3(0xEE,0x92,0x9F), o3(0xEE,0x92,0xA0),
+     o3(0xEE,0x92,0xA1), o3(0xEE,0x92,0xA2),
+     o3(0xEE,0x92,0xA3), o3(0xEE,0x92,0xA4),
+     o3(0xEE,0x92,0xA5), o3(0xEE,0x92,0xA6),
+     o3(0xEE,0x92,0xA7), o3(0xEE,0x92,0xA8),
+     o3(0xEE,0x92,0xA9), o3(0xEE,0x92,0xAA),
+     o3(0xEE,0x92,0xAB), o3(0xEE,0x92,0xAC),
+     o3(0xEE,0x92,0xAD), o3(0xEE,0x92,0xAE),
+     o3(0xEE,0x92,0xAF), o3(0xEE,0x92,0xB0),
+     o3(0xEE,0x92,0xB1), o3(0xEE,0x92,0xB2),
+     o3(0xEE,0x92,0xB3), o3(0xEE,0x92,0xB4),
+     o3(0xEE,0x92,0xB5), o3(0xEE,0x92,0xB6),
+     o3(0xEE,0x92,0xB7), o3(0xEE,0x92,0xB8),
+     o3(0xEE,0x92,0xB9), o3(0xEE,0x92,0xBA),
+     o3(0xEE,0x92,0xBB), o3(0xEE,0x92,0xBC),
+     o3(0xEE,0x92,0xBD), o3(0xEE,0x92,0xBE),
+     o3(0xEE,0x92,0xBF), o3(0xEE,0x93,0x80),
+     o3(0xEE,0x93,0x81), o3(0xEE,0x93,0x82),
+     o3(0xEE,0x93,0x83), o3(0xEE,0x93,0x84),
+     o3(0xEE,0x93,0x85), o3(0xEE,0x93,0x86),
+     o3(0xEE,0x93,0x87), o3(0xEE,0x93,0x88),
+     o3(0xEE,0x93,0x89), o3(0xEE,0x93,0x8A),
+     o3(0xEE,0x93,0x8B), o3(0xEE,0x93,0x8C),
+     o3(0xEE,0x93,0x8D), o3(0xEE,0x93,0x8E),
+     o3(0xEE,0x93,0x8F), o3(0xEE,0x93,0x90),
+     o3(0xEE,0x93,0x91), o3(0xEE,0x93,0x92),
+     o3(0xEE,0x93,0x93), o3(0xEE,0x93,0x94),
+     o3(0xEE,0x93,0x95), o3(0xEE,0x93,0x96),
+     o3(0xEE,0x93,0x97), o3(0xEE,0x93,0x98),
+     o3(0xEE,0x93,0x99), o3(0xEE,0x93,0x9A),
+     o3(0xEE,0x93,0x9B), o3(0xEE,0x93,0x9C),
+     o3(0xEE,0x93,0x9D), o3(0xEE,0x93,0x9E),
+     o3(0xEE,0x93,0x9F), o3(0xEE,0x93,0xA0),
+     o3(0xEE,0x93,0xA1), o3(0xEE,0x93,0xA2),
+     o3(0xEE,0x93,0xA3), o3(0xEE,0x93,0xA4),
+     o3(0xEE,0x93,0xA5), o3(0xEE,0x93,0xA6),
+     o3(0xEE,0x93,0xA7), o3(0xEE,0x93,0xA8),
+     o3(0xEE,0x93,0xA9), o3(0xEE,0x93,0xAA),
+     o3(0xEE,0x93,0xAB), o3(0xEE,0x93,0xAC),
+     o3(0xEE,0x93,0xAD), o3(0xEE,0x93,0xAE),
+     o3(0xEE,0x93,0xAF), o3(0xEE,0x93,0xB0),
+     o3(0xEE,0x93,0xB1), o3(0xEE,0x93,0xB2),
+     o3(0xEE,0x93,0xB3), o3(0xEE,0x93,0xB4),
+     o3(0xEE,0x93,0xB5), o3(0xEE,0x93,0xB6),
+     o3(0xEE,0x93,0xB7), o3(0xEE,0x93,0xB8),
+     o3(0xEE,0x93,0xB9), o3(0xEE,0x93,0xBA),
+     o3(0xEE,0x93,0xBB), o3(0xEE,0x93,0xBC),
+     o3(0xEE,0x93,0xBD), o3(0xEE,0x93,0xBE),
+     o3(0xEE,0x93,0xBF), o3(0xEE,0x94,0x80),
+     o3(0xEE,0x94,0x81), o3(0xEE,0x94,0x82),
+     o3(0xEE,0x94,0x83), o3(0xEE,0x94,0x84),
+     o3(0xEE,0x94,0x85), o3(0xEE,0x94,0x86),
+     o3(0xEE,0x94,0x87), o3(0xEE,0x94,0x88),
+     o3(0xEE,0x94,0x89), o3(0xEE,0x94,0x8A),
+     o3(0xEE,0x94,0x8B), o3(0xEE,0x94,0x8C),
+     o3(0xEE,0x94,0x8D), o3(0xEE,0x94,0x8E),
+     o3(0xEE,0x94,0x8F), o3(0xEE,0x94,0x90),
+     o3(0xEE,0x94,0x91), o3(0xEE,0x94,0x92),
+     o3(0xEE,0x94,0x93), o3(0xEE,0x94,0x94),
+     o3(0xEE,0x94,0x95), o3(0xEE,0x94,0x96),
+     o3(0xEE,0x94,0x97), o3(0xEE,0x94,0x98),
+     o3(0xEE,0x94,0x99), o3(0xEE,0x94,0x9A),
+     o3(0xEE,0x94,0x9B), o3(0xEE,0x94,0x9C),
+     o3(0xEE,0x94,0x9D), o3(0xEE,0x94,0x9E),
+     o3(0xEE,0x94,0x9F), o3(0xEE,0x94,0xA0),
+     o3(0xEE,0x94,0xA1), o3(0xEE,0x94,0xA2),
+     o3(0xEE,0x94,0xA3),
+
+#define from_Windows_31J_F6 WORDINDEX2INFO(9068)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F6_infos,
+
+#define from_Windows_31J_F7_infos WORDINDEX2INFO(9070)
+                INVALID, o3(0xEE,0x94,0xA4),
+     o3(0xEE,0x94,0xA5), o3(0xEE,0x94,0xA6),
+     o3(0xEE,0x94,0xA7), o3(0xEE,0x94,0xA8),
+     o3(0xEE,0x94,0xA9), o3(0xEE,0x94,0xAA),
+     o3(0xEE,0x94,0xAB), o3(0xEE,0x94,0xAC),
+     o3(0xEE,0x94,0xAD), o3(0xEE,0x94,0xAE),
+     o3(0xEE,0x94,0xAF), o3(0xEE,0x94,0xB0),
+     o3(0xEE,0x94,0xB1), o3(0xEE,0x94,0xB2),
+     o3(0xEE,0x94,0xB3), o3(0xEE,0x94,0xB4),
+     o3(0xEE,0x94,0xB5), o3(0xEE,0x94,0xB6),
+     o3(0xEE,0x94,0xB7), o3(0xEE,0x94,0xB8),
+     o3(0xEE,0x94,0xB9), o3(0xEE,0x94,0xBA),
+     o3(0xEE,0x94,0xBB), o3(0xEE,0x94,0xBC),
+     o3(0xEE,0x94,0xBD), o3(0xEE,0x94,0xBE),
+     o3(0xEE,0x94,0xBF), o3(0xEE,0x95,0x80),
+     o3(0xEE,0x95,0x81), o3(0xEE,0x95,0x82),
+     o3(0xEE,0x95,0x83), o3(0xEE,0x95,0x84),
+     o3(0xEE,0x95,0x85), o3(0xEE,0x95,0x86),
+     o3(0xEE,0x95,0x87), o3(0xEE,0x95,0x88),
+     o3(0xEE,0x95,0x89), o3(0xEE,0x95,0x8A),
+     o3(0xEE,0x95,0x8B), o3(0xEE,0x95,0x8C),
+     o3(0xEE,0x95,0x8D), o3(0xEE,0x95,0x8E),
+     o3(0xEE,0x95,0x8F), o3(0xEE,0x95,0x90),
+     o3(0xEE,0x95,0x91), o3(0xEE,0x95,0x92),
+     o3(0xEE,0x95,0x93), o3(0xEE,0x95,0x94),
+     o3(0xEE,0x95,0x95), o3(0xEE,0x95,0x96),
+     o3(0xEE,0x95,0x97), o3(0xEE,0x95,0x98),
+     o3(0xEE,0x95,0x99), o3(0xEE,0x95,0x9A),
+     o3(0xEE,0x95,0x9B), o3(0xEE,0x95,0x9C),
+     o3(0xEE,0x95,0x9D), o3(0xEE,0x95,0x9E),
+     o3(0xEE,0x95,0x9F), o3(0xEE,0x95,0xA0),
+     o3(0xEE,0x95,0xA1), o3(0xEE,0x95,0xA2),
+     o3(0xEE,0x95,0xA3), o3(0xEE,0x95,0xA4),
+     o3(0xEE,0x95,0xA5), o3(0xEE,0x95,0xA6),
+     o3(0xEE,0x95,0xA7), o3(0xEE,0x95,0xA8),
+     o3(0xEE,0x95,0xA9), o3(0xEE,0x95,0xAA),
+     o3(0xEE,0x95,0xAB), o3(0xEE,0x95,0xAC),
+     o3(0xEE,0x95,0xAD), o3(0xEE,0x95,0xAE),
+     o3(0xEE,0x95,0xAF), o3(0xEE,0x95,0xB0),
+     o3(0xEE,0x95,0xB1), o3(0xEE,0x95,0xB2),
+     o3(0xEE,0x95,0xB3), o3(0xEE,0x95,0xB4),
+     o3(0xEE,0x95,0xB5), o3(0xEE,0x95,0xB6),
+     o3(0xEE,0x95,0xB7), o3(0xEE,0x95,0xB8),
+     o3(0xEE,0x95,0xB9), o3(0xEE,0x95,0xBA),
+     o3(0xEE,0x95,0xBB), o3(0xEE,0x95,0xBC),
+     o3(0xEE,0x95,0xBD), o3(0xEE,0x95,0xBE),
+     o3(0xEE,0x95,0xBF), o3(0xEE,0x96,0x80),
+     o3(0xEE,0x96,0x81), o3(0xEE,0x96,0x82),
+     o3(0xEE,0x96,0x83), o3(0xEE,0x96,0x84),
+     o3(0xEE,0x96,0x85), o3(0xEE,0x96,0x86),
+     o3(0xEE,0x96,0x87), o3(0xEE,0x96,0x88),
+     o3(0xEE,0x96,0x89), o3(0xEE,0x96,0x8A),
+     o3(0xEE,0x96,0x8B), o3(0xEE,0x96,0x8C),
+     o3(0xEE,0x96,0x8D), o3(0xEE,0x96,0x8E),
+     o3(0xEE,0x96,0x8F), o3(0xEE,0x96,0x90),
+     o3(0xEE,0x96,0x91), o3(0xEE,0x96,0x92),
+     o3(0xEE,0x96,0x93), o3(0xEE,0x96,0x94),
+     o3(0xEE,0x96,0x95), o3(0xEE,0x96,0x96),
+     o3(0xEE,0x96,0x97), o3(0xEE,0x96,0x98),
+     o3(0xEE,0x96,0x99), o3(0xEE,0x96,0x9A),
+     o3(0xEE,0x96,0x9B), o3(0xEE,0x96,0x9C),
+     o3(0xEE,0x96,0x9D), o3(0xEE,0x96,0x9E),
+     o3(0xEE,0x96,0x9F), o3(0xEE,0x96,0xA0),
+     o3(0xEE,0x96,0xA1), o3(0xEE,0x96,0xA2),
+     o3(0xEE,0x96,0xA3), o3(0xEE,0x96,0xA4),
+     o3(0xEE,0x96,0xA5), o3(0xEE,0x96,0xA6),
+     o3(0xEE,0x96,0xA7), o3(0xEE,0x96,0xA8),
+     o3(0xEE,0x96,0xA9), o3(0xEE,0x96,0xAA),
+     o3(0xEE,0x96,0xAB), o3(0xEE,0x96,0xAC),
+     o3(0xEE,0x96,0xAD), o3(0xEE,0x96,0xAE),
+     o3(0xEE,0x96,0xAF), o3(0xEE,0x96,0xB0),
+     o3(0xEE,0x96,0xB1), o3(0xEE,0x96,0xB2),
+     o3(0xEE,0x96,0xB3), o3(0xEE,0x96,0xB4),
+     o3(0xEE,0x96,0xB5), o3(0xEE,0x96,0xB6),
+     o3(0xEE,0x96,0xB7), o3(0xEE,0x96,0xB8),
+     o3(0xEE,0x96,0xB9), o3(0xEE,0x96,0xBA),
+     o3(0xEE,0x96,0xBB), o3(0xEE,0x96,0xBC),
+     o3(0xEE,0x96,0xBD), o3(0xEE,0x96,0xBE),
+     o3(0xEE,0x96,0xBF), o3(0xEE,0x97,0x80),
+     o3(0xEE,0x97,0x81), o3(0xEE,0x97,0x82),
+     o3(0xEE,0x97,0x83), o3(0xEE,0x97,0x84),
+     o3(0xEE,0x97,0x85), o3(0xEE,0x97,0x86),
+     o3(0xEE,0x97,0x87), o3(0xEE,0x97,0x88),
+     o3(0xEE,0x97,0x89), o3(0xEE,0x97,0x8A),
+     o3(0xEE,0x97,0x8B), o3(0xEE,0x97,0x8C),
+     o3(0xEE,0x97,0x8D), o3(0xEE,0x97,0x8E),
+     o3(0xEE,0x97,0x8F), o3(0xEE,0x97,0x90),
+     o3(0xEE,0x97,0x91), o3(0xEE,0x97,0x92),
+     o3(0xEE,0x97,0x93), o3(0xEE,0x97,0x94),
+     o3(0xEE,0x97,0x95), o3(0xEE,0x97,0x96),
+     o3(0xEE,0x97,0x97), o3(0xEE,0x97,0x98),
+     o3(0xEE,0x97,0x99), o3(0xEE,0x97,0x9A),
+     o3(0xEE,0x97,0x9B), o3(0xEE,0x97,0x9C),
+     o3(0xEE,0x97,0x9D), o3(0xEE,0x97,0x9E),
+     o3(0xEE,0x97,0x9F),
+
+#define from_Windows_31J_F7 WORDINDEX2INFO(9259)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F7_infos,
+
+#define from_Windows_31J_F8_infos WORDINDEX2INFO(9261)
+                INVALID, o3(0xEE,0x97,0xA0),
+     o3(0xEE,0x97,0xA1), o3(0xEE,0x97,0xA2),
+     o3(0xEE,0x97,0xA3), o3(0xEE,0x97,0xA4),
+     o3(0xEE,0x97,0xA5), o3(0xEE,0x97,0xA6),
+     o3(0xEE,0x97,0xA7), o3(0xEE,0x97,0xA8),
+     o3(0xEE,0x97,0xA9), o3(0xEE,0x97,0xAA),
+     o3(0xEE,0x97,0xAB), o3(0xEE,0x97,0xAC),
+     o3(0xEE,0x97,0xAD), o3(0xEE,0x97,0xAE),
+     o3(0xEE,0x97,0xAF), o3(0xEE,0x97,0xB0),
+     o3(0xEE,0x97,0xB1), o3(0xEE,0x97,0xB2),
+     o3(0xEE,0x97,0xB3), o3(0xEE,0x97,0xB4),
+     o3(0xEE,0x97,0xB5), o3(0xEE,0x97,0xB6),
+     o3(0xEE,0x97,0xB7), o3(0xEE,0x97,0xB8),
+     o3(0xEE,0x97,0xB9), o3(0xEE,0x97,0xBA),
+     o3(0xEE,0x97,0xBB), o3(0xEE,0x97,0xBC),
+     o3(0xEE,0x97,0xBD), o3(0xEE,0x97,0xBE),
+     o3(0xEE,0x97,0xBF), o3(0xEE,0x98,0x80),
+     o3(0xEE,0x98,0x81), o3(0xEE,0x98,0x82),
+     o3(0xEE,0x98,0x83), o3(0xEE,0x98,0x84),
+     o3(0xEE,0x98,0x85), o3(0xEE,0x98,0x86),
+     o3(0xEE,0x98,0x87), o3(0xEE,0x98,0x88),
+     o3(0xEE,0x98,0x89), o3(0xEE,0x98,0x8A),
+     o3(0xEE,0x98,0x8B), o3(0xEE,0x98,0x8C),
+     o3(0xEE,0x98,0x8D), o3(0xEE,0x98,0x8E),
+     o3(0xEE,0x98,0x8F), o3(0xEE,0x98,0x90),
+     o3(0xEE,0x98,0x91), o3(0xEE,0x98,0x92),
+     o3(0xEE,0x98,0x93), o3(0xEE,0x98,0x94),
+     o3(0xEE,0x98,0x95), o3(0xEE,0x98,0x96),
+     o3(0xEE,0x98,0x97), o3(0xEE,0x98,0x98),
+     o3(0xEE,0x98,0x99), o3(0xEE,0x98,0x9A),
+     o3(0xEE,0x98,0x9B), o3(0xEE,0x98,0x9C),
+     o3(0xEE,0x98,0x9D), o3(0xEE,0x98,0x9E),
+     o3(0xEE,0x98,0x9F), o3(0xEE,0x98,0xA0),
+     o3(0xEE,0x98,0xA1), o3(0xEE,0x98,0xA2),
+     o3(0xEE,0x98,0xA3), o3(0xEE,0x98,0xA4),
+     o3(0xEE,0x98,0xA5), o3(0xEE,0x98,0xA6),
+     o3(0xEE,0x98,0xA7), o3(0xEE,0x98,0xA8),
+     o3(0xEE,0x98,0xA9), o3(0xEE,0x98,0xAA),
+     o3(0xEE,0x98,0xAB), o3(0xEE,0x98,0xAC),
+     o3(0xEE,0x98,0xAD), o3(0xEE,0x98,0xAE),
+     o3(0xEE,0x98,0xAF), o3(0xEE,0x98,0xB0),
+     o3(0xEE,0x98,0xB1), o3(0xEE,0x98,0xB2),
+     o3(0xEE,0x98,0xB3), o3(0xEE,0x98,0xB4),
+     o3(0xEE,0x98,0xB5), o3(0xEE,0x98,0xB6),
+     o3(0xEE,0x98,0xB7), o3(0xEE,0x98,0xB8),
+     o3(0xEE,0x98,0xB9), o3(0xEE,0x98,0xBA),
+     o3(0xEE,0x98,0xBB), o3(0xEE,0x98,0xBC),
+     o3(0xEE,0x98,0xBD), o3(0xEE,0x98,0xBE),
+     o3(0xEE,0x98,0xBF), o3(0xEE,0x99,0x80),
+     o3(0xEE,0x99,0x81), o3(0xEE,0x99,0x82),
+     o3(0xEE,0x99,0x83), o3(0xEE,0x99,0x84),
+     o3(0xEE,0x99,0x85), o3(0xEE,0x99,0x86),
+     o3(0xEE,0x99,0x87), o3(0xEE,0x99,0x88),
+     o3(0xEE,0x99,0x89), o3(0xEE,0x99,0x8A),
+     o3(0xEE,0x99,0x8B), o3(0xEE,0x99,0x8C),
+     o3(0xEE,0x99,0x8D), o3(0xEE,0x99,0x8E),
+     o3(0xEE,0x99,0x8F), o3(0xEE,0x99,0x90),
+     o3(0xEE,0x99,0x91), o3(0xEE,0x99,0x92),
+     o3(0xEE,0x99,0x93), o3(0xEE,0x99,0x94),
+     o3(0xEE,0x99,0x95), o3(0xEE,0x99,0x96),
+     o3(0xEE,0x99,0x97), o3(0xEE,0x99,0x98),
+     o3(0xEE,0x99,0x99), o3(0xEE,0x99,0x9A),
+     o3(0xEE,0x99,0x9B), o3(0xEE,0x99,0x9C),
+     o3(0xEE,0x99,0x9D), o3(0xEE,0x99,0x9E),
+     o3(0xEE,0x99,0x9F), o3(0xEE,0x99,0xA0),
+     o3(0xEE,0x99,0xA1), o3(0xEE,0x99,0xA2),
+     o3(0xEE,0x99,0xA3), o3(0xEE,0x99,0xA4),
+     o3(0xEE,0x99,0xA5), o3(0xEE,0x99,0xA6),
+     o3(0xEE,0x99,0xA7), o3(0xEE,0x99,0xA8),
+     o3(0xEE,0x99,0xA9), o3(0xEE,0x99,0xAA),
+     o3(0xEE,0x99,0xAB), o3(0xEE,0x99,0xAC),
+     o3(0xEE,0x99,0xAD), o3(0xEE,0x99,0xAE),
+     o3(0xEE,0x99,0xAF), o3(0xEE,0x99,0xB0),
+     o3(0xEE,0x99,0xB1), o3(0xEE,0x99,0xB2),
+     o3(0xEE,0x99,0xB3), o3(0xEE,0x99,0xB4),
+     o3(0xEE,0x99,0xB5), o3(0xEE,0x99,0xB6),
+     o3(0xEE,0x99,0xB7), o3(0xEE,0x99,0xB8),
+     o3(0xEE,0x99,0xB9), o3(0xEE,0x99,0xBA),
+     o3(0xEE,0x99,0xBB), o3(0xEE,0x99,0xBC),
+     o3(0xEE,0x99,0xBD), o3(0xEE,0x99,0xBE),
+     o3(0xEE,0x99,0xBF), o3(0xEE,0x9A,0x80),
+     o3(0xEE,0x9A,0x81), o3(0xEE,0x9A,0x82),
+     o3(0xEE,0x9A,0x83), o3(0xEE,0x9A,0x84),
+     o3(0xEE,0x9A,0x85), o3(0xEE,0x9A,0x86),
+     o3(0xEE,0x9A,0x87), o3(0xEE,0x9A,0x88),
+     o3(0xEE,0x9A,0x89), o3(0xEE,0x9A,0x8A),
+     o3(0xEE,0x9A,0x8B), o3(0xEE,0x9A,0x8C),
+     o3(0xEE,0x9A,0x8D), o3(0xEE,0x9A,0x8E),
+     o3(0xEE,0x9A,0x8F), o3(0xEE,0x9A,0x90),
+     o3(0xEE,0x9A,0x91), o3(0xEE,0x9A,0x92),
+     o3(0xEE,0x9A,0x93), o3(0xEE,0x9A,0x94),
+     o3(0xEE,0x9A,0x95), o3(0xEE,0x9A,0x96),
+     o3(0xEE,0x9A,0x97), o3(0xEE,0x9A,0x98),
+     o3(0xEE,0x9A,0x99), o3(0xEE,0x9A,0x9A),
+     o3(0xEE,0x9A,0x9B),
+
+#define from_Windows_31J_F8 WORDINDEX2INFO(9450)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F8_infos,
+
+#define from_Windows_31J_F9_infos WORDINDEX2INFO(9452)
+                INVALID, o3(0xEE,0x9A,0x9C),
+     o3(0xEE,0x9A,0x9D), o3(0xEE,0x9A,0x9E),
+     o3(0xEE,0x9A,0x9F), o3(0xEE,0x9A,0xA0),
+     o3(0xEE,0x9A,0xA1), o3(0xEE,0x9A,0xA2),
+     o3(0xEE,0x9A,0xA3), o3(0xEE,0x9A,0xA4),
+     o3(0xEE,0x9A,0xA5), o3(0xEE,0x9A,0xA6),
+     o3(0xEE,0x9A,0xA7), o3(0xEE,0x9A,0xA8),
+     o3(0xEE,0x9A,0xA9), o3(0xEE,0x9A,0xAA),
+     o3(0xEE,0x9A,0xAB), o3(0xEE,0x9A,0xAC),
+     o3(0xEE,0x9A,0xAD), o3(0xEE,0x9A,0xAE),
+     o3(0xEE,0x9A,0xAF), o3(0xEE,0x9A,0xB0),
+     o3(0xEE,0x9A,0xB1), o3(0xEE,0x9A,0xB2),
+     o3(0xEE,0x9A,0xB3), o3(0xEE,0x9A,0xB4),
+     o3(0xEE,0x9A,0xB5), o3(0xEE,0x9A,0xB6),
+     o3(0xEE,0x9A,0xB7), o3(0xEE,0x9A,0xB8),
+     o3(0xEE,0x9A,0xB9), o3(0xEE,0x9A,0xBA),
+     o3(0xEE,0x9A,0xBB), o3(0xEE,0x9A,0xBC),
+     o3(0xEE,0x9A,0xBD), o3(0xEE,0x9A,0xBE),
+     o3(0xEE,0x9A,0xBF), o3(0xEE,0x9B,0x80),
+     o3(0xEE,0x9B,0x81), o3(0xEE,0x9B,0x82),
+     o3(0xEE,0x9B,0x83), o3(0xEE,0x9B,0x84),
+     o3(0xEE,0x9B,0x85), o3(0xEE,0x9B,0x86),
+     o3(0xEE,0x9B,0x87), o3(0xEE,0x9B,0x88),
+     o3(0xEE,0x9B,0x89), o3(0xEE,0x9B,0x8A),
+     o3(0xEE,0x9B,0x8B), o3(0xEE,0x9B,0x8C),
+     o3(0xEE,0x9B,0x8D), o3(0xEE,0x9B,0x8E),
+     o3(0xEE,0x9B,0x8F), o3(0xEE,0x9B,0x90),
+     o3(0xEE,0x9B,0x91), o3(0xEE,0x9B,0x92),
+     o3(0xEE,0x9B,0x93), o3(0xEE,0x9B,0x94),
+     o3(0xEE,0x9B,0x95), o3(0xEE,0x9B,0x96),
+     o3(0xEE,0x9B,0x97), o3(0xEE,0x9B,0x98),
+     o3(0xEE,0x9B,0x99), o3(0xEE,0x9B,0x9A),
+     o3(0xEE,0x9B,0x9B), o3(0xEE,0x9B,0x9C),
+     o3(0xEE,0x9B,0x9D), o3(0xEE,0x9B,0x9E),
+     o3(0xEE,0x9B,0x9F), o3(0xEE,0x9B,0xA0),
+     o3(0xEE,0x9B,0xA1), o3(0xEE,0x9B,0xA2),
+     o3(0xEE,0x9B,0xA3), o3(0xEE,0x9B,0xA4),
+     o3(0xEE,0x9B,0xA5), o3(0xEE,0x9B,0xA6),
+     o3(0xEE,0x9B,0xA7), o3(0xEE,0x9B,0xA8),
+     o3(0xEE,0x9B,0xA9), o3(0xEE,0x9B,0xAA),
+     o3(0xEE,0x9B,0xAB), o3(0xEE,0x9B,0xAC),
+     o3(0xEE,0x9B,0xAD), o3(0xEE,0x9B,0xAE),
+     o3(0xEE,0x9B,0xAF), o3(0xEE,0x9B,0xB0),
+     o3(0xEE,0x9B,0xB1), o3(0xEE,0x9B,0xB2),
+     o3(0xEE,0x9B,0xB3), o3(0xEE,0x9B,0xB4),
+     o3(0xEE,0x9B,0xB5), o3(0xEE,0x9B,0xB6),
+     o3(0xEE,0x9B,0xB7), o3(0xEE,0x9B,0xB8),
+     o3(0xEE,0x9B,0xB9), o3(0xEE,0x9B,0xBA),
+     o3(0xEE,0x9B,0xBB), o3(0xEE,0x9B,0xBC),
+     o3(0xEE,0x9B,0xBD), o3(0xEE,0x9B,0xBE),
+     o3(0xEE,0x9B,0xBF), o3(0xEE,0x9C,0x80),
+     o3(0xEE,0x9C,0x81), o3(0xEE,0x9C,0x82),
+     o3(0xEE,0x9C,0x83), o3(0xEE,0x9C,0x84),
+     o3(0xEE,0x9C,0x85), o3(0xEE,0x9C,0x86),
+     o3(0xEE,0x9C,0x87), o3(0xEE,0x9C,0x88),
+     o3(0xEE,0x9C,0x89), o3(0xEE,0x9C,0x8A),
+     o3(0xEE,0x9C,0x8B), o3(0xEE,0x9C,0x8C),
+     o3(0xEE,0x9C,0x8D), o3(0xEE,0x9C,0x8E),
+     o3(0xEE,0x9C,0x8F), o3(0xEE,0x9C,0x90),
+     o3(0xEE,0x9C,0x91), o3(0xEE,0x9C,0x92),
+     o3(0xEE,0x9C,0x93), o3(0xEE,0x9C,0x94),
+     o3(0xEE,0x9C,0x95), o3(0xEE,0x9C,0x96),
+     o3(0xEE,0x9C,0x97), o3(0xEE,0x9C,0x98),
+     o3(0xEE,0x9C,0x99), o3(0xEE,0x9C,0x9A),
+     o3(0xEE,0x9C,0x9B), o3(0xEE,0x9C,0x9C),
+     o3(0xEE,0x9C,0x9D), o3(0xEE,0x9C,0x9E),
+     o3(0xEE,0x9C,0x9F), o3(0xEE,0x9C,0xA0),
+     o3(0xEE,0x9C,0xA1), o3(0xEE,0x9C,0xA2),
+     o3(0xEE,0x9C,0xA3), o3(0xEE,0x9C,0xA4),
+     o3(0xEE,0x9C,0xA5), o3(0xEE,0x9C,0xA6),
+     o3(0xEE,0x9C,0xA7), o3(0xEE,0x9C,0xA8),
+     o3(0xEE,0x9C,0xA9), o3(0xEE,0x9C,0xAA),
+     o3(0xEE,0x9C,0xAB), o3(0xEE,0x9C,0xAC),
+     o3(0xEE,0x9C,0xAD), o3(0xEE,0x9C,0xAE),
+     o3(0xEE,0x9C,0xAF), o3(0xEE,0x9C,0xB0),
+     o3(0xEE,0x9C,0xB1), o3(0xEE,0x9C,0xB2),
+     o3(0xEE,0x9C,0xB3), o3(0xEE,0x9C,0xB4),
+     o3(0xEE,0x9C,0xB5), o3(0xEE,0x9C,0xB6),
+     o3(0xEE,0x9C,0xB7), o3(0xEE,0x9C,0xB8),
+     o3(0xEE,0x9C,0xB9), o3(0xEE,0x9C,0xBA),
+     o3(0xEE,0x9C,0xBB), o3(0xEE,0x9C,0xBC),
+     o3(0xEE,0x9C,0xBD), o3(0xEE,0x9C,0xBE),
+     o3(0xEE,0x9C,0xBF), o3(0xEE,0x9D,0x80),
+     o3(0xEE,0x9D,0x81), o3(0xEE,0x9D,0x82),
+     o3(0xEE,0x9D,0x83), o3(0xEE,0x9D,0x84),
+     o3(0xEE,0x9D,0x85), o3(0xEE,0x9D,0x86),
+     o3(0xEE,0x9D,0x87), o3(0xEE,0x9D,0x88),
+     o3(0xEE,0x9D,0x89), o3(0xEE,0x9D,0x8A),
+     o3(0xEE,0x9D,0x8B), o3(0xEE,0x9D,0x8C),
+     o3(0xEE,0x9D,0x8D), o3(0xEE,0x9D,0x8E),
+     o3(0xEE,0x9D,0x8F), o3(0xEE,0x9D,0x90),
+     o3(0xEE,0x9D,0x91), o3(0xEE,0x9D,0x92),
+     o3(0xEE,0x9D,0x93), o3(0xEE,0x9D,0x94),
+     o3(0xEE,0x9D,0x95), o3(0xEE,0x9D,0x96),
+     o3(0xEE,0x9D,0x97),
+
+#define from_Windows_31J_F9 WORDINDEX2INFO(9641)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_F9_infos,
+
+#define from_Windows_31J_FA_infos WORDINDEX2INFO(9643)
+                INVALID, o3(0xE2,0x85,0xB0),
+     o3(0xE2,0x85,0xB1), o3(0xE2,0x85,0xB2),
+     o3(0xE2,0x85,0xB3), o3(0xE2,0x85,0xB4),
+     o3(0xE2,0x85,0xB5), o3(0xE2,0x85,0xB6),
+     o3(0xE2,0x85,0xB7), o3(0xE2,0x85,0xB8),
+     o3(0xE2,0x85,0xB9), o3(0xE2,0x85,0xA0),
+     o3(0xE2,0x85,0xA1), o3(0xE2,0x85,0xA2),
+     o3(0xE2,0x85,0xA3), o3(0xE2,0x85,0xA4),
+     o3(0xE2,0x85,0xA5), o3(0xE2,0x85,0xA6),
+     o3(0xE2,0x85,0xA7), o3(0xE2,0x85,0xA8),
+     o3(0xE2,0x85,0xA9), o3(0xEF,0xBF,0xA2),
+     o3(0xEF,0xBF,0xA4), o3(0xEF,0xBC,0x87),
+     o3(0xEF,0xBC,0x82), o3(0xE3,0x88,0xB1),
+     o3(0xE2,0x84,0x96), o3(0xE2,0x84,0xA1),
+     o3(0xE2,0x88,0xB5), o3(0xE7,0xBA,0x8A),
+     o3(0xE8,0xA4,0x9C), o3(0xE9,0x8D,0x88),
+     o3(0xE9,0x8A,0x88), o3(0xE8,0x93,0x9C),
+     o3(0xE4,0xBF,0x89), o3(0xE7,0x82,0xBB),
+     o3(0xE6,0x98,0xB1), o3(0xE6,0xA3,0x88),
+     o3(0xE9,0x8B,0xB9), o3(0xE6,0x9B,0xBB),
+     o3(0xE5,0xBD,0x85), o3(0xE4,0xB8,0xA8),
+     o3(0xE4,0xBB,0xA1), o3(0xE4,0xBB,0xBC),
+     o3(0xE4,0xBC,0x80), o3(0xE4,0xBC,0x83),
+     o3(0xE4,0xBC,0xB9), o3(0xE4,0xBD,0x96),
+     o3(0xE4,0xBE,0x92), o3(0xE4,0xBE,0x8A),
+     o3(0xE4,0xBE,0x9A), o3(0xE4,0xBE,0x94),
+     o3(0xE4,0xBF,0x8D), o3(0xE5,0x81,0x80),
+     o3(0xE5,0x80,0xA2), o3(0xE4,0xBF,0xBF),
+     o3(0xE5,0x80,0x9E), o3(0xE5,0x81,0x86),
+     o3(0xE5,0x81,0xB0), o3(0xE5,0x81,0x82),
+     o3(0xE5,0x82,0x94), o3(0xE5,0x83,0xB4),
+     o3(0xE5,0x83,0x98), o3(0xE5,0x85,0x8A),
+     o3(0xE5,0x85,0xA4), o3(0xE5,0x86,0x9D),
+     o3(0xE5,0x86,0xBE), o3(0xE5,0x87,0xAC),
+     o3(0xE5,0x88,0x95), o3(0xE5,0x8A,0x9C),
+     o3(0xE5,0x8A,0xA6), o3(0xE5,0x8B,0x80),
+     o3(0xE5,0x8B,0x9B), o3(0xE5,0x8C,0x80),
+     o3(0xE5,0x8C,0x87), o3(0xE5,0x8C,0xA4),
+     o3(0xE5,0x8D,0xB2), o3(0xE5,0x8E,0x93),
+     o3(0xE5,0x8E,0xB2), o3(0xE5,0x8F,0x9D),
+     o3(0xEF,0xA8,0x8E), o3(0xE5,0x92,0x9C),
+     o3(0xE5,0x92,0x8A), o3(0xE5,0x92,0xA9),
+     o3(0xE5,0x93,0xBF), o3(0xE5,0x96,0x86),
+     o3(0xE5,0x9D,0x99), o3(0xE5,0x9D,0xA5),
+     o3(0xE5,0x9E,0xAC), o3(0xE5,0x9F,0x88),
+     o3(0xE5,0x9F,0x87), o3(0xEF,0xA8,0x8F),
+     o3(0xEF,0xA8,0x90), o3(0xE5,0xA2,0x9E),
+     o3(0xE5,0xA2,0xB2), o3(0xE5,0xA4,0x8B),
+     o3(0xE5,0xA5,0x93), o3(0xE5,0xA5,0x9B),
+     o3(0xE5,0xA5,0x9D), o3(0xE5,0xA5,0xA3),
+     o3(0xE5,0xA6,0xA4), o3(0xE5,0xA6,0xBA),
+     o3(0xE5,0xAD,0x96), o3(0xE5,0xAF,0x80),
+     o3(0xE7,0x94,0xAF), o3(0xE5,0xAF,0x98),
+     o3(0xE5,0xAF,0xAC), o3(0xE5,0xB0,0x9E),
+     o3(0xE5,0xB2,0xA6), o3(0xE5,0xB2,0xBA),
+     o3(0xE5,0xB3,0xB5), o3(0xE5,0xB4,0xA7),
+     o3(0xE5,0xB5,0x93), o3(0xEF,0xA8,0x91),
+     o3(0xE5,0xB5,0x82), o3(0xE5,0xB5,0xAD),
+     o3(0xE5,0xB6,0xB8), o3(0xE5,0xB6,0xB9),
+     o3(0xE5,0xB7,0x90), o3(0xE5,0xBC,0xA1),
+     o3(0xE5,0xBC,0xB4), o3(0xE5,0xBD,0xA7),
+     o3(0xE5,0xBE,0xB7), o3(0xE5,0xBF,0x9E),
+     o3(0xE6,0x81,0x9D), o3(0xE6,0x82,0x85),
+     o3(0xE6,0x82,0x8A), o3(0xE6,0x83,0x9E),
+     o3(0xE6,0x83,0x95), o3(0xE6,0x84,0xA0),
+     o3(0xE6,0x83,0xB2), o3(0xE6,0x84,0x91),
+     o3(0xE6,0x84,0xB7), o3(0xE6,0x84,0xB0),
+     o3(0xE6,0x86,0x98), o3(0xE6,0x88,0x93),
+     o3(0xE6,0x8A,0xA6), o3(0xE6,0x8F,0xB5),
+     o3(0xE6,0x91,0xA0), o3(0xE6,0x92,0x9D),
+     o3(0xE6,0x93,0x8E), o3(0xE6,0x95,0x8E),
+     o3(0xE6,0x98,0x80), o3(0xE6,0x98,0x95),
+     o3(0xE6,0x98,0xBB), o3(0xE6,0x98,0x89),
+     o3(0xE6,0x98,0xAE), o3(0xE6,0x98,0x9E),
+     o3(0xE6,0x98,0xA4), o3(0xE6,0x99,0xA5),
+     o3(0xE6,0x99,0x97), o3(0xE6,0x99,0x99),
+     o3(0xEF,0xA8,0x92), o3(0xE6,0x99,0xB3),
+     o3(0xE6,0x9A,0x99), o3(0xE6,0x9A,0xA0),
+     o3(0xE6,0x9A,0xB2), o3(0xE6,0x9A,0xBF),
+     o3(0xE6,0x9B,0xBA), o3(0xE6,0x9C,0x8E),
+     o3(0xEF,0xA4,0xA9), o3(0xE6,0x9D,0xA6),
+     o3(0xE6,0x9E,0xBB), o3(0xE6,0xA1,0x92),
+     o3(0xE6,0x9F,0x80), o3(0xE6,0xA0,0x81),
+     o3(0xE6,0xA1,0x84), o3(0xE6,0xA3,0x8F),
+     o3(0xEF,0xA8,0x93), o3(0xE6,0xA5,0xA8),
+     o3(0xEF,0xA8,0x94), o3(0xE6,0xA6,0x98),
+     o3(0xE6,0xA7,0xA2), o3(0xE6,0xA8,0xB0),
+     o3(0xE6,0xA9,0xAB), o3(0xE6,0xA9,0x86),
+     o3(0xE6,0xA9,0xB3), o3(0xE6,0xA9,0xBE),
+     o3(0xE6,0xAB,0xA2), o3(0xE6,0xAB,0xA4),
+     o3(0xE6,0xAF,0x96), o3(0xE6,0xB0,0xBF),
+     o3(0xE6,0xB1,0x9C), o3(0xE6,0xB2,0x86),
+     o3(0xE6,0xB1,0xAF), o3(0xE6,0xB3,0x9A),
+     o3(0xE6,0xB4,0x84), o3(0xE6,0xB6,0x87),
+     o3(0xE6,0xB5,0xAF),
+
+#define from_Windows_31J_FA WORDINDEX2INFO(9832)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_FA_infos,
+
+#define from_Windows_31J_FB_infos WORDINDEX2INFO(9834)
+                INVALID, o3(0xE6,0xB6,0x96),
+     o3(0xE6,0xB6,0xAC), o3(0xE6,0xB7,0x8F),
+     o3(0xE6,0xB7,0xB8), o3(0xE6,0xB7,0xB2),
+     o3(0xE6,0xB7,0xBC), o3(0xE6,0xB8,0xB9),
+     o3(0xE6,0xB9,0x9C), o3(0xE6,0xB8,0xA7),
+     o3(0xE6,0xB8,0xBC), o3(0xE6,0xBA,0xBF),
+     o3(0xE6,0xBE,0x88), o3(0xE6,0xBE,0xB5),
+     o3(0xE6,0xBF,0xB5), o3(0xE7,0x80,0x85),
+     o3(0xE7,0x80,0x87), o3(0xE7,0x80,0xA8),
+     o3(0xE7,0x82,0x85), o3(0xE7,0x82,0xAB),
+     o3(0xE7,0x84,0x8F), o3(0xE7,0x84,0x84),
+     o3(0xE7,0x85,0x9C), o3(0xE7,0x85,0x86),
+     o3(0xE7,0x85,0x87), o3(0xEF,0xA8,0x95),
+     o3(0xE7,0x87,0x81), o3(0xE7,0x87,0xBE),
+     o3(0xE7,0x8A,0xB1), o3(0xE7,0x8A,0xBE),
+     o3(0xE7,0x8C,0xA4), o3(0xEF,0xA8,0x96),
+     o3(0xE7,0x8D,0xB7), o3(0xE7,0x8E,0xBD),
+     o3(0xE7,0x8F,0x89), o3(0xE7,0x8F,0x96),
+     o3(0xE7,0x8F,0xA3), o3(0xE7,0x8F,0x92),
+     o3(0xE7,0x90,0x87), o3(0xE7,0x8F,0xB5),
+     o3(0xE7,0x90,0xA6), o3(0xE7,0x90,0xAA),
+     o3(0xE7,0x90,0xA9), o3(0xE7,0x90,0xAE),
+     o3(0xE7,0x91,0xA2), o3(0xE7,0x92,0x89),
+     o3(0xE7,0x92,0x9F), o3(0xE7,0x94,0x81),
+     o3(0xE7,0x95,0xAF), o3(0xE7,0x9A,0x82),
+     o3(0xE7,0x9A,0x9C), o3(0xE7,0x9A,0x9E),
+     o3(0xE7,0x9A,0x9B), o3(0xE7,0x9A,0xA6),
+     o3(0xEF,0xA8,0x97), o3(0xE7,0x9D,0x86),
+     o3(0xE5,0x8A,0xAF), o3(0xE7,0xA0,0xA1),
+     o3(0xE7,0xA1,0x8E), o3(0xE7,0xA1,0xA4),
+     o3(0xE7,0xA1,0xBA), o3(0xE7,0xA4,0xB0),
+     o3(0xEF,0xA8,0x98), o3(0xEF,0xA8,0x99),
+     o3(0xEF,0xA8,0x9A), o3(0xE7,0xA6,0x94),
+     o3(0xEF,0xA8,0x9B), o3(0xE7,0xA6,0x9B),
+     o3(0xE7,0xAB,0x91), o3(0xE7,0xAB,0xA7),
+     o3(0xEF,0xA8,0x9C), o3(0xE7,0xAB,0xAB),
+     o3(0xE7,0xAE,0x9E), o3(0xEF,0xA8,0x9D),
+     o3(0xE7,0xB5,0x88), o3(0xE7,0xB5,0x9C),
+     o3(0xE7,0xB6,0xB7), o3(0xE7,0xB6,0xA0),
+     o3(0xE7,0xB7,0x96), o3(0xE7,0xB9,0x92),
+     o3(0xE7,0xBD,0x87), o3(0xE7,0xBE,0xA1),
+     o3(0xEF,0xA8,0x9E), o3(0xE8,0x8C,0x81),
+     o3(0xE8,0x8D,0xA2), o3(0xE8,0x8D,0xBF),
+     o3(0xE8,0x8F,0x87), o3(0xE8,0x8F,0xB6),
+     o3(0xE8,0x91,0x88), o3(0xE8,0x92,0xB4),
+     o3(0xE8,0x95,0x93), o3(0xE8,0x95,0x99),
+     o3(0xE8,0x95,0xAB), o3(0xEF,0xA8,0x9F),
+     o3(0xE8,0x96,0xB0), o3(0xEF,0xA8,0xA0),
+     o3(0xEF,0xA8,0xA1), o3(0xE8,0xA0,0x87),
+     o3(0xE8,0xA3,0xB5), o3(0xE8,0xA8,0x92),
+     o3(0xE8,0xA8,0xB7), o3(0xE8,0xA9,0xB9),
+     o3(0xE8,0xAA,0xA7), o3(0xE8,0xAA,0xBE),
+     o3(0xE8,0xAB,0x9F), o3(0xEF,0xA8,0xA2),
+     o3(0xE8,0xAB,0xB6), o3(0xE8,0xAD,0x93),
+     o3(0xE8,0xAD,0xBF), o3(0xE8,0xB3,0xB0),
+     o3(0xE8,0xB3,0xB4), o3(0xE8,0xB4,0x92),
+     o3(0xE8,0xB5,0xB6), o3(0xEF,0xA8,0xA3),
+     o3(0xE8,0xBB,0x8F), o3(0xEF,0xA8,0xA4),
+     o3(0xEF,0xA8,0xA5), o3(0xE9,0x81,0xA7),
+     o3(0xE9,0x83,0x9E), o3(0xEF,0xA8,0xA6),
+     o3(0xE9,0x84,0x95), o3(0xE9,0x84,0xA7),
+     o3(0xE9,0x87,0x9A), o3(0xE9,0x87,0x97),
+     o3(0xE9,0x87,0x9E), o3(0xE9,0x87,0xAD),
+     o3(0xE9,0x87,0xAE), o3(0xE9,0x87,0xA4),
+     o3(0xE9,0x87,0xA5), o3(0xE9,0x88,0x86),
+     o3(0xE9,0x88,0x90), o3(0xE9,0x88,0x8A),
+     o3(0xE9,0x88,0xBA), o3(0xE9,0x89,0x80),
+     o3(0xE9,0x88,0xBC), o3(0xE9,0x89,0x8E),
+     o3(0xE9,0x89,0x99), o3(0xE9,0x89,0x91),
+     o3(0xE9,0x88,0xB9), o3(0xE9,0x89,0xA7),
+     o3(0xE9,0x8A,0xA7), o3(0xE9,0x89,0xB7),
+     o3(0xE9,0x89,0xB8), o3(0xE9,0x8B,0xA7),
+     o3(0xE9,0x8B,0x97), o3(0xE9,0x8B,0x99),
+     o3(0xE9,0x8B,0x90), o3(0xEF,0xA8,0xA7),
+     o3(0xE9,0x8B,0x95), o3(0xE9,0x8B,0xA0),
+     o3(0xE9,0x8B,0x93), o3(0xE9,0x8C,0xA5),
+     o3(0xE9,0x8C,0xA1), o3(0xE9,0x8B,0xBB),
+     o3(0xEF,0xA8,0xA8), o3(0xE9,0x8C,0x9E),
+     o3(0xE9,0x8B,0xBF), o3(0xE9,0x8C,0x9D),
+     o3(0xE9,0x8C,0x82), o3(0xE9,0x8D,0xB0),
+     o3(0xE9,0x8D,0x97), o3(0xE9,0x8E,0xA4),
+     o3(0xE9,0x8F,0x86), o3(0xE9,0x8F,0x9E),
+     o3(0xE9,0x8F,0xB8), o3(0xE9,0x90,0xB1),
+     o3(0xE9,0x91,0x85), o3(0xE9,0x91,0x88),
+     o3(0xE9,0x96,0x92), o3(0xEF,0xA7,0x9C),
+     o3(0xEF,0xA8,0xA9), o3(0xE9,0x9A,0x9D),
+     o3(0xE9,0x9A,0xAF), o3(0xE9,0x9C,0xB3),
+     o3(0xE9,0x9C,0xBB), o3(0xE9,0x9D,0x83),
+     o3(0xE9,0x9D,0x8D), o3(0xE9,0x9D,0x8F),
+     o3(0xE9,0x9D,0x91), o3(0xE9,0x9D,0x95),
+     o3(0xE9,0xA1,0x97), o3(0xE9,0xA1,0xA5),
+     o3(0xEF,0xA8,0xAA), o3(0xEF,0xA8,0xAB),
+     o3(0xE9,0xA4,0xA7), o3(0xEF,0xA8,0xAC),
+     o3(0xE9,0xA6,0x9E), o3(0xE9,0xA9,0x8E),
+     o3(0xE9,0xAB,0x99),
+
+#define from_Windows_31J_FB WORDINDEX2INFO(10023)
+    from_Shift_JIS_89_offsets,
+    from_Windows_31J_FB_infos,
+
+#define from_Windows_31J_FC_infos WORDINDEX2INFO(10025)
+                INVALID, o3(0xE9,0xAB,0x9C),
+     o3(0xE9,0xAD,0xB5), o3(0xE9,0xAD,0xB2),
+     o3(0xE9,0xAE,0x8F), o3(0xE9,0xAE,0xB1),
+     o3(0xE9,0xAE,0xBB), o3(0xE9,0xB0,0x80),
+     o3(0xE9,0xB5,0xB0), o3(0xE9,0xB5,0xAB),
+     o3(0xEF,0xA8,0xAD), o3(0xE9,0xB8,0x99),
+     o3(0xE9,0xBB,0x91),              UNDEF,
+
+#define from_Windows_31J_FC WORDINDEX2INFO(10039)
+    from_Windows_31J_FC_offsets,
+    from_Windows_31J_FC_infos,
+
+#define from_Windows_31J_infos WORDINDEX2INFO(10041)
+                   NOMAP,             INVALID,
+     from_Windows_31J_81,   from_Shift_JIS_82,
+       from_Shift_JIS_83,   from_Shift_JIS_84,
+       from_Shift_JIS_85, from_Windows_31J_87,
+       from_Shift_JIS_88,   from_Shift_JIS_89,
+       from_Shift_JIS_8A,   from_Shift_JIS_8B,
+       from_Shift_JIS_8C,   from_Shift_JIS_8D,
+       from_Shift_JIS_8E,   from_Shift_JIS_8F,
+       from_Shift_JIS_90,   from_Shift_JIS_91,
+       from_Shift_JIS_92,   from_Shift_JIS_93,
+       from_Shift_JIS_94,   from_Shift_JIS_95,
+       from_Shift_JIS_96,   from_Shift_JIS_97,
+       from_Shift_JIS_98,   from_Shift_JIS_99,
+       from_Shift_JIS_9A,   from_Shift_JIS_9B,
+       from_Shift_JIS_9C,   from_Shift_JIS_9D,
+       from_Shift_JIS_9E,   from_Shift_JIS_9F,
+      o3(0xEF,0xBD,0xA1),  o3(0xEF,0xBD,0xA2),
+      o3(0xEF,0xBD,0xA3),  o3(0xEF,0xBD,0xA4),
+      o3(0xEF,0xBD,0xA5),  o3(0xEF,0xBD,0xA6),
+      o3(0xEF,0xBD,0xA7),  o3(0xEF,0xBD,0xA8),
+      o3(0xEF,0xBD,0xA9),  o3(0xEF,0xBD,0xAA),
+      o3(0xEF,0xBD,0xAB),  o3(0xEF,0xBD,0xAC),
+      o3(0xEF,0xBD,0xAD),  o3(0xEF,0xBD,0xAE),
+      o3(0xEF,0xBD,0xAF),  o3(0xEF,0xBD,0xB0),
+      o3(0xEF,0xBD,0xB1),  o3(0xEF,0xBD,0xB2),
+      o3(0xEF,0xBD,0xB3),  o3(0xEF,0xBD,0xB4),
+      o3(0xEF,0xBD,0xB5),  o3(0xEF,0xBD,0xB6),
+      o3(0xEF,0xBD,0xB7),  o3(0xEF,0xBD,0xB8),
+      o3(0xEF,0xBD,0xB9),  o3(0xEF,0xBD,0xBA),
+      o3(0xEF,0xBD,0xBB),  o3(0xEF,0xBD,0xBC),
+      o3(0xEF,0xBD,0xBD),  o3(0xEF,0xBD,0xBE),
+      o3(0xEF,0xBD,0xBF),  o3(0xEF,0xBE,0x80),
+      o3(0xEF,0xBE,0x81),  o3(0xEF,0xBE,0x82),
+      o3(0xEF,0xBE,0x83),  o3(0xEF,0xBE,0x84),
+      o3(0xEF,0xBE,0x85),  o3(0xEF,0xBE,0x86),
+      o3(0xEF,0xBE,0x87),  o3(0xEF,0xBE,0x88),
+      o3(0xEF,0xBE,0x89),  o3(0xEF,0xBE,0x8A),
+      o3(0xEF,0xBE,0x8B),  o3(0xEF,0xBE,0x8C),
+      o3(0xEF,0xBE,0x8D),  o3(0xEF,0xBE,0x8E),
+      o3(0xEF,0xBE,0x8F),  o3(0xEF,0xBE,0x90),
+      o3(0xEF,0xBE,0x91),  o3(0xEF,0xBE,0x92),
+      o3(0xEF,0xBE,0x93),  o3(0xEF,0xBE,0x94),
+      o3(0xEF,0xBE,0x95),  o3(0xEF,0xBE,0x96),
+      o3(0xEF,0xBE,0x97),  o3(0xEF,0xBE,0x98),
+      o3(0xEF,0xBE,0x99),  o3(0xEF,0xBE,0x9A),
+      o3(0xEF,0xBE,0x9B),  o3(0xEF,0xBE,0x9C),
+      o3(0xEF,0xBE,0x9D),  o3(0xEF,0xBE,0x9E),
+      o3(0xEF,0xBE,0x9F),   from_Shift_JIS_E0,
+       from_Shift_JIS_E1,   from_Shift_JIS_E2,
+       from_Shift_JIS_E3,   from_Shift_JIS_E4,
+       from_Shift_JIS_E5,   from_Shift_JIS_E6,
+       from_Shift_JIS_E7,   from_Shift_JIS_E8,
+       from_Shift_JIS_E9,   from_Shift_JIS_EA,
+     from_Windows_31J_ED, from_Windows_31J_EE,
+     from_Windows_31J_F0, from_Windows_31J_F1,
+     from_Windows_31J_F2, from_Windows_31J_F3,
+     from_Windows_31J_F4, from_Windows_31J_F5,
+     from_Windows_31J_F6, from_Windows_31J_F7,
+     from_Windows_31J_F8, from_Windows_31J_F9,
+     from_Windows_31J_FA, from_Windows_31J_FB,
+     from_Windows_31J_FC,
+
+#define from_Windows_31J WORDINDEX2INFO(10162)
+    from_Windows_31J_offsets,
+    from_Windows_31J_infos,
+
+#define to_Shift_JIS_C2_infos WORDINDEX2INFO(10164)
+           INVALID,         UNDEF, o2(0x81,0x91), o2(0x81,0x92),
+     o2(0x81,0x98), o2(0x81,0x4e), o2(0x81,0xca), o2(0x81,0x8b),
+     o2(0x81,0x7d), o2(0x81,0x4c), o2(0x81,0xf7),
+
+#define to_Shift_JIS_C2 WORDINDEX2INFO(10175)
+    to_Shift_JIS_C2_offsets,
+    to_Shift_JIS_C2_infos,
+
+#define to_Shift_JIS_C3_infos WORDINDEX2INFO(10177)
+           INVALID,         UNDEF, o2(0x81,0x7e), o2(0x81,0x80),
+
+#define to_Shift_JIS_C3 WORDINDEX2INFO(10181)
+    to_Shift_JIS_C3_offsets,
+    to_Shift_JIS_C3_infos,
+
+#define to_Shift_JIS_C4 WORDINDEX2INFO(10183)
+    to_Shift_JIS_C4_offsets,
+    from_Shift_JIS_85_infos,
+
+#define to_Shift_JIS_CE_infos WORDINDEX2INFO(10185)
+           INVALID,         UNDEF, o2(0x83,0x9f), o2(0x83,0xa0),
+     o2(0x83,0xa1), o2(0x83,0xa2), o2(0x83,0xa3), o2(0x83,0xa4),
+     o2(0x83,0xa5), o2(0x83,0xa6), o2(0x83,0xa7), o2(0x83,0xa8),
+     o2(0x83,0xa9), o2(0x83,0xaa), o2(0x83,0xab), o2(0x83,0xac),
+     o2(0x83,0xad), o2(0x83,0xae), o2(0x83,0xaf), o2(0x83,0xb0),
+     o2(0x83,0xb1), o2(0x83,0xb2), o2(0x83,0xb3), o2(0x83,0xb4),
+     o2(0x83,0xb5), o2(0x83,0xb6), o2(0x83,0xbf), o2(0x83,0xc0),
+     o2(0x83,0xc1), o2(0x83,0xc2), o2(0x83,0xc3), o2(0x83,0xc4),
+     o2(0x83,0xc5), o2(0x83,0xc6), o2(0x83,0xc7), o2(0x83,0xc8),
+     o2(0x83,0xc9), o2(0x83,0xca), o2(0x83,0xcb), o2(0x83,0xcc),
+     o2(0x83,0xcd),
+
+#define to_Shift_JIS_CE WORDINDEX2INFO(10226)
+    to_Shift_JIS_CE_offsets,
+    to_Shift_JIS_CE_infos,
+
+#define to_Shift_JIS_CF_infos WORDINDEX2INFO(10228)
+           INVALID, o2(0x83,0xce), o2(0x83,0xcf),         UNDEF,
+     o2(0x83,0xd0), o2(0x83,0xd1), o2(0x83,0xd2), o2(0x83,0xd3),
+     o2(0x83,0xd4), o2(0x83,0xd5), o2(0x83,0xd6),
+
+#define to_Shift_JIS_CF WORDINDEX2INFO(10239)
+    to_Shift_JIS_CF_offsets,
+    to_Shift_JIS_CF_infos,
+
+#define to_Shift_JIS_D0_infos WORDINDEX2INFO(10241)
+           INVALID,         UNDEF, o2(0x84,0x46), o2(0x84,0x40),
+     o2(0x84,0x41), o2(0x84,0x42), o2(0x84,0x43), o2(0x84,0x44),
+     o2(0x84,0x45), o2(0x84,0x47), o2(0x84,0x48), o2(0x84,0x49),
+     o2(0x84,0x4a), o2(0x84,0x4b), o2(0x84,0x4c), o2(0x84,0x4d),
+     o2(0x84,0x4e), o2(0x84,0x4f), o2(0x84,0x50), o2(0x84,0x51),
+     o2(0x84,0x52), o2(0x84,0x53), o2(0x84,0x54), o2(0x84,0x55),
+     o2(0x84,0x56), o2(0x84,0x57), o2(0x84,0x58), o2(0x84,0x59),
+     o2(0x84,0x5a), o2(0x84,0x5b), o2(0x84,0x5c), o2(0x84,0x5d),
+     o2(0x84,0x5e), o2(0x84,0x5f), o2(0x84,0x60), o2(0x84,0x70),
+     o2(0x84,0x71), o2(0x84,0x72), o2(0x84,0x73), o2(0x84,0x74),
+     o2(0x84,0x75), o2(0x84,0x77), o2(0x84,0x78), o2(0x84,0x79),
+     o2(0x84,0x7a), o2(0x84,0x7b), o2(0x84,0x7c), o2(0x84,0x7d),
+     o2(0x84,0x7e), o2(0x84,0x80), o2(0x84,0x81),
+
+#define to_Shift_JIS_D0 WORDINDEX2INFO(10292)
+    to_Shift_JIS_D0_offsets,
+    to_Shift_JIS_D0_infos,
+
+#define to_Shift_JIS_D1_infos WORDINDEX2INFO(10294)
+           INVALID, o2(0x84,0x82), o2(0x84,0x83), o2(0x84,0x84),
+     o2(0x84,0x85), o2(0x84,0x86), o2(0x84,0x87), o2(0x84,0x88),
+     o2(0x84,0x89), o2(0x84,0x8a), o2(0x84,0x8b), o2(0x84,0x8c),
+     o2(0x84,0x8d), o2(0x84,0x8e), o2(0x84,0x8f), o2(0x84,0x90),
+     o2(0x84,0x91),         UNDEF, o2(0x84,0x76),
+
+#define to_Shift_JIS_D1 WORDINDEX2INFO(10313)
+    to_Shift_JIS_D1_offsets,
+    to_Shift_JIS_D1_infos,
+
+#define to_Shift_JIS_E0_infos WORDINDEX2INFO(10315)
+             INVALID, to_Shift_JIS_C4,
+
+#define to_Shift_JIS_E0 WORDINDEX2INFO(10317)
+    to_Shift_JIS_E0_offsets,
+    to_Shift_JIS_E0_infos,
+
+#define to_Shift_JIS_E1 WORDINDEX2INFO(10319)
+    to_Shift_JIS_C4_offsets,
+    to_Shift_JIS_E0_infos,
+
+#define to_Shift_JIS_E2_80_infos WORDINDEX2INFO(10321)
+           INVALID,         UNDEF, o2(0x81,0x5d), o2(0x81,0x5c),
+     o2(0x81,0x61), o2(0x81,0x65), o2(0x81,0x66), o2(0x81,0x67),
+     o2(0x81,0x68), o2(0x81,0xf5), o2(0x81,0xf6), o2(0x81,0x64),
+     o2(0x81,0x63), o2(0x81,0xf1), o2(0x81,0x8c), o2(0x81,0x8d),
+     o2(0x81,0xa6),
+
+#define to_Shift_JIS_E2_80 WORDINDEX2INFO(10338)
+    to_Shift_JIS_E2_80_offsets,
+    to_Shift_JIS_E2_80_infos,
+
+#define to_Shift_JIS_E2_84_infos WORDINDEX2INFO(10340)
+           INVALID,         UNDEF, o2(0x81,0x8e), o2(0x81,0xf0),
+
+#define to_Shift_JIS_E2_84 WORDINDEX2INFO(10344)
+    to_Shift_JIS_E2_84_offsets,
+    to_Shift_JIS_E2_84_infos,
+
+#define to_Shift_JIS_E2_86_infos WORDINDEX2INFO(10346)
+           INVALID,         UNDEF, o2(0x81,0xa9), o2(0x81,0xaa),
+     o2(0x81,0xa8), o2(0x81,0xab),
+
+#define to_Shift_JIS_E2_86 WORDINDEX2INFO(10352)
+    to_Shift_JIS_E2_86_offsets,
+    to_Shift_JIS_E2_86_infos,
+
+#define to_Shift_JIS_E2_87_infos WORDINDEX2INFO(10354)
+           INVALID,         UNDEF, o2(0x81,0xcb), o2(0x81,0xcc),
+
+#define to_Shift_JIS_E2_87 WORDINDEX2INFO(10358)
+    to_Shift_JIS_E2_87_offsets,
+    to_Shift_JIS_E2_87_infos,
+
+#define to_Shift_JIS_E2_88_infos WORDINDEX2INFO(10360)
+           INVALID, o2(0x81,0xcd),         UNDEF, o2(0x81,0xdd),
+     o2(0x81,0xce), o2(0x81,0xde), o2(0x81,0xb8), o2(0x81,0xb9),
+     o2(0x81,0x7c), o2(0x81,0xe3), o2(0x81,0xe5), o2(0x81,0x87),
+     o2(0x81,0xda), o2(0x81,0xc8), o2(0x81,0xc9), o2(0x81,0xbf),
+     o2(0x81,0xbe), o2(0x81,0xe7), o2(0x81,0xe8), o2(0x81,0x88),
+     o2(0x81,0xe6), o2(0x81,0xe4),
+
+#define to_Shift_JIS_E2_88 WORDINDEX2INFO(10382)
+    to_Shift_JIS_E2_88_offsets,
+    to_Shift_JIS_E2_88_infos,
+
+#define to_Shift_JIS_E2_89_infos WORDINDEX2INFO(10384)
+           INVALID,         UNDEF, o2(0x81,0xe0), o2(0x81,0x82),
+     o2(0x81,0xdf), o2(0x81,0x85), o2(0x81,0x86), o2(0x81,0xe1),
+     o2(0x81,0xe2),
+
+#define to_Shift_JIS_E2_89 WORDINDEX2INFO(10393)
+    to_Shift_JIS_E2_89_offsets,
+    to_Shift_JIS_E2_89_infos,
+
+#define to_Shift_JIS_E2_8A_infos WORDINDEX2INFO(10395)
+           INVALID,         UNDEF, o2(0x81,0xbc), o2(0x81,0xbd),
+     o2(0x81,0xba), o2(0x81,0xbb), o2(0x81,0xdb),
+
+#define to_Shift_JIS_E2_8A WORDINDEX2INFO(10402)
+    to_Shift_JIS_E2_8A_offsets,
+    to_Shift_JIS_E2_8A_infos,
+
+#define to_Shift_JIS_E2_8C_infos WORDINDEX2INFO(10404)
+           INVALID,         UNDEF, o2(0x81,0xdc),
+
+#define to_Shift_JIS_E2_8C WORDINDEX2INFO(10407)
+    to_Shift_JIS_E2_8C_offsets,
+    to_Shift_JIS_E2_8C_infos,
+
+#define to_Shift_JIS_E2_94_infos WORDINDEX2INFO(10409)
+           INVALID, o2(0x84,0x9f), o2(0x84,0xaa), o2(0x84,0xa0),
+     o2(0x84,0xab),         UNDEF, o2(0x84,0xa1), o2(0x84,0xac),
+     o2(0x84,0xa2), o2(0x84,0xad), o2(0x84,0xa4), o2(0x84,0xaf),
+     o2(0x84,0xa3), o2(0x84,0xae), o2(0x84,0xa5), o2(0x84,0xba),
+     o2(0x84,0xb5), o2(0x84,0xb0), o2(0x84,0xa7), o2(0x84,0xbc),
+     o2(0x84,0xb7), o2(0x84,0xb2), o2(0x84,0xa6), o2(0x84,0xb6),
+     o2(0x84,0xbb), o2(0x84,0xb1), o2(0x84,0xa8), o2(0x84,0xb8),
+     o2(0x84,0xbd), o2(0x84,0xb3), o2(0x84,0xa9), o2(0x84,0xb9),
+
+#define to_Shift_JIS_E2_94 WORDINDEX2INFO(10441)
+    to_Shift_JIS_E2_94_offsets,
+    to_Shift_JIS_E2_94_infos,
+
+#define to_Shift_JIS_E2_95_infos WORDINDEX2INFO(10443)
+           INVALID,         UNDEF, o2(0x84,0xbe), o2(0x84,0xb4),
+
+#define to_Shift_JIS_E2_95 WORDINDEX2INFO(10447)
+    to_Shift_JIS_E2_95_offsets,
+    to_Shift_JIS_E2_95_infos,
+
+#define to_Shift_JIS_E2_96_infos WORDINDEX2INFO(10449)
+           INVALID,         UNDEF, o2(0x81,0xa1), o2(0x81,0xa0),
+     o2(0x81,0xa3), o2(0x81,0xa2), o2(0x81,0xa5), o2(0x81,0xa4),
+
+#define to_Shift_JIS_E2_96 WORDINDEX2INFO(10457)
+    to_Shift_JIS_E2_96_offsets,
+    to_Shift_JIS_E2_96_infos,
+
+#define to_Shift_JIS_E2_97_infos WORDINDEX2INFO(10459)
+           INVALID,         UNDEF, o2(0x81,0x9f), o2(0x81,0x9e),
+     o2(0x81,0x9b), o2(0x81,0x9d), o2(0x81,0x9c), o2(0x81,0xfc),
+
+#define to_Shift_JIS_E2_97 WORDINDEX2INFO(10467)
+    to_Shift_JIS_E2_97_offsets,
+    to_Shift_JIS_E2_97_infos,
+
+#define to_Shift_JIS_E2_98_infos WORDINDEX2INFO(10469)
+           INVALID,         UNDEF, o2(0x81,0x9a), o2(0x81,0x99),
+
+#define to_Shift_JIS_E2_98 WORDINDEX2INFO(10473)
+    to_Shift_JIS_E2_98_offsets,
+    to_Shift_JIS_E2_98_infos,
+
+#define to_Shift_JIS_E2_99_infos WORDINDEX2INFO(10475)
+           INVALID, o2(0x81,0x8a),         UNDEF, o2(0x81,0x89),
+     o2(0x81,0xf4), o2(0x81,0xf3), o2(0x81,0xf2),
+
+#define to_Shift_JIS_E2_99 WORDINDEX2INFO(10482)
+    to_Shift_JIS_E2_99_offsets,
+    to_Shift_JIS_E2_99_infos,
+
+#define to_Shift_JIS_E2_infos WORDINDEX2INFO(10484)
+                INVALID, to_Shift_JIS_E2_80,
+        to_Shift_JIS_C4, to_Shift_JIS_E2_84,
+     to_Shift_JIS_E2_86, to_Shift_JIS_E2_87,
+     to_Shift_JIS_E2_88, to_Shift_JIS_E2_89,
+     to_Shift_JIS_E2_8A, to_Shift_JIS_E2_8C,
+     to_Shift_JIS_E2_94, to_Shift_JIS_E2_95,
+     to_Shift_JIS_E2_96, to_Shift_JIS_E2_97,
+     to_Shift_JIS_E2_98, to_Shift_JIS_E2_99,
+
+#define to_Shift_JIS_E2 WORDINDEX2INFO(10500)
+    to_Shift_JIS_E2_offsets,
+    to_Shift_JIS_E2_infos,
+
+#define to_Shift_JIS_E3_80_infos WORDINDEX2INFO(10502)
+           INVALID, o2(0x81,0x40), o2(0x81,0x41), o2(0x81,0x42),
+     o2(0x81,0x56),         UNDEF, o2(0x81,0x58), o2(0x81,0x59),
+     o2(0x81,0x5a), o2(0x81,0x71), o2(0x81,0x72), o2(0x81,0x73),
+     o2(0x81,0x74), o2(0x81,0x75), o2(0x81,0x76), o2(0x81,0x77),
+     o2(0x81,0x78), o2(0x81,0x79), o2(0x81,0x7a), o2(0x81,0xa7),
+     o2(0x81,0xac), o2(0x81,0x6b), o2(0x81,0x6c), o2(0x81,0x60),
+
+#define to_Shift_JIS_E3_80 WORDINDEX2INFO(10526)
+    to_Shift_JIS_E3_80_offsets,
+    to_Shift_JIS_E3_80_infos,
+
+#define to_Shift_JIS_E3_81_infos WORDINDEX2INFO(10528)
+           INVALID,         UNDEF, o2(0x82,0x9f), o2(0x82,0xa0),
+     o2(0x82,0xa1), o2(0x82,0xa2), o2(0x82,0xa3), o2(0x82,0xa4),
+     o2(0x82,0xa5), o2(0x82,0xa6), o2(0x82,0xa7), o2(0x82,0xa8),
+     o2(0x82,0xa9), o2(0x82,0xaa), o2(0x82,0xab), o2(0x82,0xac),
+     o2(0x82,0xad), o2(0x82,0xae), o2(0x82,0xaf), o2(0x82,0xb0),
+     o2(0x82,0xb1), o2(0x82,0xb2), o2(0x82,0xb3), o2(0x82,0xb4),
+     o2(0x82,0xb5), o2(0x82,0xb6), o2(0x82,0xb7), o2(0x82,0xb8),
+     o2(0x82,0xb9), o2(0x82,0xba), o2(0x82,0xbb), o2(0x82,0xbc),
+     o2(0x82,0xbd), o2(0x82,0xbe), o2(0x82,0xbf), o2(0x82,0xc0),
+     o2(0x82,0xc1), o2(0x82,0xc2), o2(0x82,0xc3), o2(0x82,0xc4),
+     o2(0x82,0xc5), o2(0x82,0xc6), o2(0x82,0xc7), o2(0x82,0xc8),
+     o2(0x82,0xc9), o2(0x82,0xca), o2(0x82,0xcb), o2(0x82,0xcc),
+     o2(0x82,0xcd), o2(0x82,0xce), o2(0x82,0xcf), o2(0x82,0xd0),
+     o2(0x82,0xd1), o2(0x82,0xd2), o2(0x82,0xd3), o2(0x82,0xd4),
+     o2(0x82,0xd5), o2(0x82,0xd6), o2(0x82,0xd7), o2(0x82,0xd8),
+     o2(0x82,0xd9), o2(0x82,0xda), o2(0x82,0xdb), o2(0x82,0xdc),
+     o2(0x82,0xdd),
+
+#define to_Shift_JIS_E3_81 WORDINDEX2INFO(10593)
+    to_Shift_JIS_E3_81_offsets,
+    to_Shift_JIS_E3_81_infos,
+
+#define to_Shift_JIS_E3_82_infos WORDINDEX2INFO(10595)
+           INVALID, o2(0x82,0xde), o2(0x82,0xdf), o2(0x82,0xe0),
+     o2(0x82,0xe1), o2(0x82,0xe2), o2(0x82,0xe3), o2(0x82,0xe4),
+     o2(0x82,0xe5), o2(0x82,0xe6), o2(0x82,0xe7), o2(0x82,0xe8),
+     o2(0x82,0xe9), o2(0x82,0xea), o2(0x82,0xeb), o2(0x82,0xec),
+     o2(0x82,0xed), o2(0x82,0xee), o2(0x82,0xef), o2(0x82,0xf0),
+     o2(0x82,0xf1),         UNDEF, o2(0x81,0x4a), o2(0x81,0x4b),
+     o2(0x81,0x54), o2(0x81,0x55), o2(0x83,0x40), o2(0x83,0x41),
+     o2(0x83,0x42), o2(0x83,0x43), o2(0x83,0x44), o2(0x83,0x45),
+     o2(0x83,0x46), o2(0x83,0x47), o2(0x83,0x48), o2(0x83,0x49),
+     o2(0x83,0x4a), o2(0x83,0x4b), o2(0x83,0x4c), o2(0x83,0x4d),
+     o2(0x83,0x4e), o2(0x83,0x4f), o2(0x83,0x50), o2(0x83,0x51),
+     o2(0x83,0x52), o2(0x83,0x53), o2(0x83,0x54), o2(0x83,0x55),
+     o2(0x83,0x56), o2(0x83,0x57), o2(0x83,0x58), o2(0x83,0x59),
+     o2(0x83,0x5a), o2(0x83,0x5b), o2(0x83,0x5c), o2(0x83,0x5d),
+     o2(0x83,0x5e),
+
+#define to_Shift_JIS_E3_82 WORDINDEX2INFO(10652)
+    to_Shift_JIS_E3_82_offsets,
+    to_Shift_JIS_E3_82_infos,
+
+#define to_Shift_JIS_E3_83_infos WORDINDEX2INFO(10654)
+           INVALID, o2(0x83,0x5f), o2(0x83,0x60), o2(0x83,0x61),
+     o2(0x83,0x62), o2(0x83,0x63), o2(0x83,0x64), o2(0x83,0x65),
+     o2(0x83,0x66), o2(0x83,0x67), o2(0x83,0x68), o2(0x83,0x69),
+     o2(0x83,0x6a), o2(0x83,0x6b), o2(0x83,0x6c), o2(0x83,0x6d),
+     o2(0x83,0x6e), o2(0x83,0x6f), o2(0x83,0x70), o2(0x83,0x71),
+     o2(0x83,0x72), o2(0x83,0x73), o2(0x83,0x74), o2(0x83,0x75),
+     o2(0x83,0x76), o2(0x83,0x77), o2(0x83,0x78), o2(0x83,0x79),
+     o2(0x83,0x7a), o2(0x83,0x7b), o2(0x83,0x7c), o2(0x83,0x7d),
+     o2(0x83,0x7e), o2(0x83,0x80), o2(0x83,0x81), o2(0x83,0x82),
+     o2(0x83,0x83), o2(0x83,0x84), o2(0x83,0x85), o2(0x83,0x86),
+     o2(0x83,0x87), o2(0x83,0x88), o2(0x83,0x89), o2(0x83,0x8a),
+     o2(0x83,0x8b), o2(0x83,0x8c), o2(0x83,0x8d), o2(0x83,0x8e),
+     o2(0x83,0x8f), o2(0x83,0x90), o2(0x83,0x91), o2(0x83,0x92),
+     o2(0x83,0x93), o2(0x83,0x94), o2(0x83,0x95), o2(0x83,0x96),
+             UNDEF, o2(0x81,0x45), o2(0x81,0x5b), o2(0x81,0x52),
+     o2(0x81,0x53),
+
+#define to_Shift_JIS_E3_83 WORDINDEX2INFO(10715)
+    to_Shift_JIS_E3_83_offsets,
+    to_Shift_JIS_E3_83_infos,
+
+#define to_Shift_JIS_E3_infos WORDINDEX2INFO(10717)
+                INVALID, to_Shift_JIS_E3_80,
+     to_Shift_JIS_E3_81, to_Shift_JIS_E3_82,
+     to_Shift_JIS_E3_83,    to_Shift_JIS_C4,
+
+#define to_Shift_JIS_E3 WORDINDEX2INFO(10723)
+    to_Shift_JIS_E3_offsets,
+    to_Shift_JIS_E3_infos,
+
+#define to_Shift_JIS_E4_B8_infos WORDINDEX2INFO(10725)
+           INVALID, o2(0x88,0xea), o2(0x92,0x9a),         UNDEF,
+     o2(0x8e,0xb5), o2(0x96,0x9c), o2(0x8f,0xe4), o2(0x8e,0x4f),
+     o2(0x8f,0xe3), o2(0x89,0xba), o2(0x95,0x73), o2(0x97,0x5e),
+     o2(0x98,0xa0), o2(0x89,0x4e), o2(0x8a,0x8e), o2(0x98,0xa1),
+     o2(0x90,0xa2), o2(0x99,0xc0), o2(0x8b,0x75), o2(0x95,0xb8),
+     o2(0x8f,0xe5), o2(0x97,0xbc), o2(0x95,0xc0), o2(0x98,0xa2),
+     o2(0x92,0x86), o2(0x98,0xa3), o2(0x8b,0xf8), o2(0x98,0xa4),
+     o2(0x8a,0xdb), o2(0x92,0x4f), o2(0x8e,0xe5), o2(0x98,0xa5),
+     o2(0x98,0xa6),
+
+#define to_Shift_JIS_E4_B8 WORDINDEX2INFO(10758)
+    to_Shift_JIS_E4_B8_offsets,
+    to_Shift_JIS_E4_B8_infos,
+
+#define to_Shift_JIS_E4_B9_infos WORDINDEX2INFO(10760)
+           INVALID,         UNDEF, o2(0x98,0xa7), o2(0x94,0x54),
+     o2(0x8b,0x76), o2(0x94,0x56), o2(0x93,0xe1), o2(0x8c,0xc1),
+     o2(0x96,0x52), o2(0xe5,0x68), o2(0x98,0xa8), o2(0x8f,0xe6),
+     o2(0x98,0xa9), o2(0x89,0xb3), o2(0x8b,0xe3), o2(0x8c,0xee),
+     o2(0x96,0xe7), o2(0x9b,0xa4), o2(0x97,0x90), o2(0x93,0xfb),
+     o2(0x8a,0xa3),
+
+#define to_Shift_JIS_E4_B9 WORDINDEX2INFO(10781)
+    to_Shift_JIS_E4_B9_offsets,
+    to_Shift_JIS_E4_B9_infos,
+
+#define to_Shift_JIS_E4_BA_infos WORDINDEX2INFO(10783)
+           INVALID, o2(0x8b,0x54),         UNDEF, o2(0x98,0xaa),
+     o2(0x98,0xab), o2(0x97,0xb9), o2(0x97,0x5c), o2(0x91,0x88),
+     o2(0x98,0xad), o2(0x8e,0x96), o2(0x93,0xf1), o2(0x98,0xb0),
+     o2(0x89,0x5d), o2(0x8c,0xdd), o2(0x8c,0xdc), o2(0x88,0xe4),
+     o2(0x98,0x6a), o2(0x98,0x69), o2(0x8d,0xb1), o2(0x88,0x9f),
+     o2(0x98,0xb1), o2(0x98,0xb2), o2(0x98,0xb3), o2(0x96,0x53),
+     o2(0x98,0xb4), o2(0x8c,0xf0), o2(0x88,0xe5), o2(0x96,0x92),
+     o2(0x8b,0x9c), o2(0x8b,0x9d), o2(0x8b,0x9e), o2(0x92,0xe0),
+     o2(0x97,0xba), o2(0x98,0xb5), o2(0x98,0xb6), o2(0x98,0xb7),
+     o2(0x90,0x6c),
+
+#define to_Shift_JIS_E4_BA WORDINDEX2INFO(10820)
+    to_Shift_JIS_E4_BA_offsets,
+    to_Shift_JIS_E4_BA_infos,
+
+#define to_Shift_JIS_E4_BB_infos WORDINDEX2INFO(10822)
+           INVALID, o2(0x8f,0x59), o2(0x90,0x6d), o2(0x98,0xbc),
+             UNDEF, o2(0x98,0xba), o2(0x98,0xbb), o2(0x8b,0x77),
+     o2(0x8d,0xa1), o2(0x89,0xee), o2(0x98,0xb9), o2(0x98,0xb8),
+     o2(0x95,0xa7), o2(0x8e,0x65), o2(0x8e,0x64), o2(0x91,0xbc),
+     o2(0x98,0xbd), o2(0x95,0x74), o2(0x90,0xe5), o2(0x81,0x57),
+     o2(0x98,0xbe), o2(0x98,0xc0), o2(0x91,0xe3), o2(0x97,0xdf),
+     o2(0x88,0xc8), o2(0x98,0xbf), o2(0x89,0xbc), o2(0x8b,0xc2),
+     o2(0x92,0x87), o2(0x8c,0x8f), o2(0x98,0xc1), o2(0x94,0x43),
+
+#define to_Shift_JIS_E4_BB WORDINDEX2INFO(10854)
+    to_Shift_JIS_E4_BB_offsets,
+    to_Shift_JIS_E4_BB_infos,
+
+#define to_Shift_JIS_E4_BC_infos WORDINDEX2INFO(10856)
+           INVALID,         UNDEF, o2(0x8a,0xe9), o2(0x98,0xc2),
+     o2(0x88,0xc9), o2(0x8c,0xde), o2(0x8a,0xea), o2(0x95,0x9a),
+     o2(0x94,0xb0), o2(0x8b,0x78), o2(0x89,0xef), o2(0x98,0xe5),
+     o2(0x93,0x60), o2(0x94,0x8c), o2(0x98,0xc4), o2(0x94,0xba),
+     o2(0x97,0xe0), o2(0x90,0x4c), o2(0x8e,0x66), o2(0x8e,0x97),
+     o2(0x89,0xbe),
+
+#define to_Shift_JIS_E4_BC WORDINDEX2INFO(10877)
+    to_Shift_JIS_E4_BC_offsets,
+    to_Shift_JIS_E4_BC_infos,
+
+#define to_Shift_JIS_E4_BD_infos WORDINDEX2INFO(10879)
+           INVALID,         UNDEF, o2(0x92,0xcf), o2(0x92,0x41),
+     o2(0x98,0xc8), o2(0x88,0xca), o2(0x92,0xe1), o2(0x8f,0x5a),
+     o2(0x8d,0xb2), o2(0x97,0x43), o2(0x91,0xcc), o2(0x89,0xbd),
+     o2(0x98,0xc7), o2(0x97,0x5d), o2(0x98,0xc3), o2(0x98,0xc5),
+     o2(0x8d,0xec), o2(0x98,0xc6), o2(0x9b,0x43), o2(0x98,0xce),
+     o2(0x98,0xd1), o2(0x98,0xcf), o2(0x89,0xc0), o2(0x95,0xb9),
+     o2(0x98,0xc9), o2(0x98,0xcd), o2(0x8c,0xf1), o2(0x8e,0x67),
+
+#define to_Shift_JIS_E4_BD WORDINDEX2INFO(10907)
+    to_Shift_JIS_E4_BD_offsets,
+    to_Shift_JIS_E4_BD_infos,
+
+#define to_Shift_JIS_E4_BE_infos WORDINDEX2INFO(10909)
+           INVALID,         UNDEF, o2(0x8a,0xa4), o2(0x98,0xd2),
+     o2(0x98,0xca), o2(0x97,0xe1), o2(0x8e,0x98), o2(0x98,0xcb),
+     o2(0x98,0xd0), o2(0x98,0xd3), o2(0x98,0xcc), o2(0x8b,0x9f),
+     o2(0x88,0xcb), o2(0x8b,0xa0), o2(0x89,0xbf), o2(0x9b,0x44),
+     o2(0x96,0x99), o2(0x95,0x8e), o2(0x8c,0xf2), o2(0x90,0x4e),
+     o2(0x97,0xb5), o2(0x95,0xd6),
+
+#define to_Shift_JIS_E4_BE WORDINDEX2INFO(10931)
+    to_Shift_JIS_E4_BE_offsets,
+    to_Shift_JIS_E4_BE_infos,
+
+#define to_Shift_JIS_E4_BF_infos WORDINDEX2INFO(10933)
+           INVALID,         UNDEF, o2(0x8c,0x57), o2(0x91,0xa3),
+     o2(0x89,0xe2), o2(0x8f,0x72), o2(0x98,0xd7), o2(0x98,0xdc),
+     o2(0x98,0xda), o2(0x98,0xd5), o2(0x91,0xad), o2(0x98,0xd8),
+     o2(0x98,0xdb), o2(0x98,0xd9), o2(0x95,0xdb), o2(0x98,0xd6),
+     o2(0x90,0x4d), o2(0x96,0x93), o2(0x98,0xdd), o2(0x98,0xde),
+     o2(0x8f,0x43), o2(0x98,0xeb), o2(0x94,0x6f), o2(0x95,0x55),
+     o2(0x98,0xe6), o2(0x95,0xee), o2(0x89,0xb4), o2(0x98,0xea),
+
+#define to_Shift_JIS_E4_BF WORDINDEX2INFO(10961)
+    to_Shift_JIS_E4_BF_offsets,
+    to_Shift_JIS_E4_BF_infos,
+
+#define to_Shift_JIS_E4_infos WORDINDEX2INFO(10963)
+                INVALID,    to_Shift_JIS_C4,
+     to_Shift_JIS_E4_B8, to_Shift_JIS_E4_B9,
+     to_Shift_JIS_E4_BA, to_Shift_JIS_E4_BB,
+     to_Shift_JIS_E4_BC, to_Shift_JIS_E4_BD,
+     to_Shift_JIS_E4_BE, to_Shift_JIS_E4_BF,
+
+#define to_Shift_JIS_E4 WORDINDEX2INFO(10973)
+    to_Shift_JIS_E4_offsets,
+    to_Shift_JIS_E4_infos,
+
+#define to_Shift_JIS_E5_80_infos WORDINDEX2INFO(10975)
+           INVALID,         UNDEF, o2(0x98,0xe4), o2(0x98,0xed),
+     o2(0x91,0x71), o2(0x8c,0xc2), o2(0x94,0x7b), o2(0xe0,0xc5),
+     o2(0x98,0xec), o2(0x93,0x7c), o2(0x98,0xe1), o2(0x8c,0xf4),
+     o2(0x8c,0xf3), o2(0x98,0xdf), o2(0x8e,0xd8), o2(0x98,0xe7),
+     o2(0x95,0xed), o2(0x92,0x6c), o2(0x98,0xe3), o2(0x8c,0x91),
+     o2(0x98,0xe0), o2(0x98,0xe8), o2(0x98,0xe2), o2(0x97,0xcf),
+     o2(0x98,0xe9), o2(0x98,0x60), o2(0x8b,0xe4), o2(0x8c,0x90),
+
+#define to_Shift_JIS_E5_80 WORDINDEX2INFO(11003)
+    to_Shift_JIS_E5_80_offsets,
+    to_Shift_JIS_E5_80_infos,
+
+#define to_Shift_JIS_E5_81_infos WORDINDEX2INFO(11005)
+           INVALID,         UNDEF, o2(0x98,0xee), o2(0x98,0xef),
+     o2(0x98,0xf3), o2(0x88,0xcc), o2(0x95,0xce), o2(0x98,0xf2),
+     o2(0x98,0xf1), o2(0x98,0xf5), o2(0x98,0xf4), o2(0x92,0xe2),
+     o2(0x8c,0x92), o2(0x98,0xf6), o2(0x8e,0xc3), o2(0x91,0xa4),
+     o2(0x92,0xe3), o2(0x8b,0xf4), o2(0x98,0xf7), o2(0x8b,0x55),
+
+#define to_Shift_JIS_E5_81 WORDINDEX2INFO(11025)
+    to_Shift_JIS_E5_81_offsets,
+    to_Shift_JIS_E5_81_infos,
+
+#define to_Shift_JIS_E5_82_infos WORDINDEX2INFO(11027)
+           INVALID, o2(0x98,0xf8),         UNDEF, o2(0x98,0xfa),
+     o2(0x96,0x54), o2(0x8c,0x86), o2(0x8e,0x50), o2(0x94,0xf5),
+     o2(0x98,0xf9), o2(0x8d,0xc3), o2(0x97,0x62), o2(0x98,0xfc),
+     o2(0x99,0x42), o2(0x98,0xfb), o2(0x8d,0xc2), o2(0x8f,0x9d),
+     o2(0x8c,0x58),
+
+#define to_Shift_JIS_E5_82 WORDINDEX2INFO(11044)
+    to_Shift_JIS_E5_82_offsets,
+    to_Shift_JIS_E5_82_infos,
+
+#define to_Shift_JIS_E5_83_infos WORDINDEX2INFO(11046)
+           INVALID,         UNDEF, o2(0x99,0x43), o2(0x8b,0xcd),
+     o2(0x99,0x40), o2(0x99,0x41), o2(0x93,0xad), o2(0x91,0x9c),
+     o2(0x8b,0xa1), o2(0x96,0x6c), o2(0x99,0x44), o2(0x97,0xbb),
+     o2(0x99,0x45), o2(0x99,0x48), o2(0x99,0x46), o2(0x91,0x6d),
+     o2(0x99,0x47), o2(0x99,0x49), o2(0x99,0x4b), o2(0x99,0x4a),
+     o2(0x95,0xc6),
+
+#define to_Shift_JIS_E5_83 WORDINDEX2INFO(11067)
+    to_Shift_JIS_E5_83_offsets,
+    to_Shift_JIS_E5_83_infos,
+
+#define to_Shift_JIS_E5_84_infos WORDINDEX2INFO(11069)
+           INVALID, o2(0x8b,0x56), o2(0x99,0x4d), o2(0x99,0x4e),
+             UNDEF, o2(0x89,0xad), o2(0x99,0x4c), o2(0x8e,0xf2),
+     o2(0x99,0x51), o2(0x99,0x50), o2(0x99,0x4f), o2(0x98,0xd4),
+     o2(0x99,0x52), o2(0x8f,0x9e), o2(0x99,0x53), o2(0x97,0x44),
+     o2(0x96,0xd7), o2(0x99,0x55), o2(0x99,0x54), o2(0x99,0x57),
+     o2(0x99,0x56), o2(0x99,0x58),
+
+#define to_Shift_JIS_E5_84 WORDINDEX2INFO(11091)
+    to_Shift_JIS_E5_84_offsets,
+    to_Shift_JIS_E5_84_infos,
+
+#define to_Shift_JIS_E5_85_infos WORDINDEX2INFO(11093)
+           INVALID, o2(0x99,0x59), o2(0x88,0xf2),         UNDEF,
+     o2(0x8c,0xb3), o2(0x8c,0x5a), o2(0x8f,0x5b), o2(0x92,0x9b),
+     o2(0x8b,0xa2), o2(0x90,0xe6), o2(0x8c,0xf5), o2(0x8d,0x8e),
+     o2(0x99,0x5b), o2(0x96,0xc6), o2(0x93,0x65), o2(0x8e,0x99),
+     o2(0x99,0x5a), o2(0x99,0x5c), o2(0x93,0x7d), o2(0x8a,0x95),
+     o2(0x99,0x5d), o2(0x93,0xfc), o2(0x91,0x53), o2(0x99,0x5f),
+     o2(0x99,0x60), o2(0x94,0xaa), o2(0x8c,0xf6), o2(0x98,0x5a),
+     o2(0x99,0x61), o2(0x8b,0xa4), o2(0x95,0xba), o2(0x91,0xb4),
+     o2(0x8b,0xef), o2(0x93,0x54), o2(0x8c,0x93),
+
+#define to_Shift_JIS_E5_85 WORDINDEX2INFO(11128)
+    to_Shift_JIS_E5_85_offsets,
+    to_Shift_JIS_E5_85_infos,
+
+#define to_Shift_JIS_E5_86_infos WORDINDEX2INFO(11130)
+           INVALID, o2(0x99,0x62),         UNDEF, o2(0x99,0x63),
+     o2(0x93,0xe0), o2(0x89,0x7e), o2(0x99,0x66), o2(0x8d,0xfb),
+     o2(0x99,0x65), o2(0x8d,0xc4), o2(0x99,0x67), o2(0xe3,0xec),
+     o2(0x99,0x68), o2(0x96,0x60), o2(0x99,0x69), o2(0x99,0x6a),
+     o2(0x99,0x6b), o2(0x8f,0xe7), o2(0x8e,0xca), o2(0x8a,0xa5),
+     o2(0x99,0x6e), o2(0x99,0x6c), o2(0x96,0xbb), o2(0x99,0x6d),
+     o2(0x95,0x79), o2(0x99,0x6f), o2(0x99,0x70), o2(0x99,0x71),
+     o2(0x93,0x7e), o2(0x99,0x75), o2(0x99,0x73), o2(0x99,0x74),
+     o2(0x99,0x72), o2(0x8d,0xe1), o2(0x99,0x76), o2(0x96,0xe8),
+     o2(0x97,0xe2), o2(0x99,0x77),
+
+#define to_Shift_JIS_E5_86 WORDINDEX2INFO(11168)
+    to_Shift_JIS_E5_86_offsets,
+    to_Shift_JIS_E5_86_infos,
+
+#define to_Shift_JIS_E5_87_infos WORDINDEX2INFO(11170)
+           INVALID,         UNDEF, o2(0x90,0xa6), o2(0x99,0x78),
+     o2(0x8f,0x79), o2(0x99,0x79), o2(0x92,0x9c), o2(0x97,0xbd),
+     o2(0x93,0x80), o2(0x99,0xc3), o2(0x99,0x7a), o2(0xea,0xa3),
+     o2(0x8b,0xc3), o2(0x99,0x7b), o2(0x96,0x7d), o2(0x8f,0x88),
+     o2(0x91,0xfa), o2(0x99,0x7d), o2(0x93,0xe2), o2(0x99,0x7e),
+     o2(0x99,0x80), o2(0x8a,0x4d), o2(0x99,0x81), o2(0x8b,0xa5),
+     o2(0x93,0xca), o2(0x89,0x9a), o2(0x8f,0x6f), o2(0x94,0x9f),
+     o2(0x99,0x82),
+
+#define to_Shift_JIS_E5_87 WORDINDEX2INFO(11199)
+    to_Shift_JIS_E5_87_offsets,
+    to_Shift_JIS_E5_87_infos,
+
+#define to_Shift_JIS_E5_88_infos WORDINDEX2INFO(11201)
+           INVALID, o2(0x93,0x81),         UNDEF, o2(0x90,0x6e),
+     o2(0x99,0x83), o2(0x95,0xaa), o2(0x90,0xd8), o2(0x8a,0xa0),
+     o2(0x8a,0xa7), o2(0x99,0x84), o2(0x99,0x86), o2(0x8c,0x59),
+     o2(0x99,0x85), o2(0x97,0xf1), o2(0x8f,0x89), o2(0x94,0xbb),
+     o2(0x95,0xca), o2(0x99,0x87), o2(0x97,0x98), o2(0x99,0x88),
+     o2(0x99,0x89), o2(0x93,0x9e), o2(0x99,0x8a), o2(0x90,0xa7),
+     o2(0x8d,0xfc), o2(0x8c,0x94), o2(0x99,0x8b), o2(0x8e,0x68),
+     o2(0x8d,0x8f),
+
+#define to_Shift_JIS_E5_88 WORDINDEX2INFO(11230)
+    to_Shift_JIS_E5_88_offsets,
+    to_Shift_JIS_E5_88_infos,
+
+#define to_Shift_JIS_E5_89_infos WORDINDEX2INFO(11232)
+           INVALID,         UNDEF, o2(0x92,0xe4), o2(0x99,0x8d),
+     o2(0x91,0xa5), o2(0x8d,0xed), o2(0x99,0x8e), o2(0x99,0x8f),
+     o2(0x91,0x4f), o2(0x99,0x8c), o2(0x99,0x91), o2(0x96,0x55),
+     o2(0x8d,0x84), o2(0x99,0x90), o2(0x8c,0x95), o2(0x8d,0xdc),
+     o2(0x94,0x8d), o2(0x99,0x94), o2(0x99,0x92), o2(0x95,0x9b),
+     o2(0x8f,0xe8), o2(0x99,0x9b), o2(0x8a,0x84), o2(0x99,0x95),
+     o2(0x99,0x93), o2(0x91,0x6e), o2(0x99,0x97), o2(0x99,0x96),
+
+#define to_Shift_JIS_E5_89 WORDINDEX2INFO(11260)
+    to_Shift_JIS_E5_89_offsets,
+    to_Shift_JIS_E5_89_infos,
+
+#define to_Shift_JIS_E5_8A_infos WORDINDEX2INFO(11262)
+           INVALID,         UNDEF, o2(0x8a,0x63), o2(0x8c,0x80),
+     o2(0x99,0x9c), o2(0x97,0xab), o2(0x99,0x98), o2(0x99,0x9d),
+     o2(0x99,0x9a), o2(0x99,0x99), o2(0x97,0xcd), o2(0x8c,0xf7),
+     o2(0x89,0xc1), o2(0x97,0xf2), o2(0x8f,0x95), o2(0x93,0x77),
+     o2(0x8d,0x85), o2(0x99,0xa0), o2(0x99,0xa1), o2(0x97,0xe3),
+     o2(0x98,0x4a), o2(0x99,0xa3), o2(0x8c,0xf8), o2(0x99,0xa2),
+     o2(0x8a,0x4e),
+
+#define to_Shift_JIS_E5_8A WORDINDEX2INFO(11287)
+    to_Shift_JIS_E5_8A_offsets,
+    to_Shift_JIS_E5_8A_infos,
+
+#define to_Shift_JIS_E5_8B_infos WORDINDEX2INFO(11289)
+           INVALID,         UNDEF, o2(0x99,0xa4), o2(0x96,0x75),
+     o2(0x92,0xba), o2(0x97,0x45), o2(0x95,0xd7), o2(0x99,0xa5),
+     o2(0xe8,0xd3), o2(0x93,0xae), o2(0x99,0xa6), o2(0x8a,0xa8),
+     o2(0x96,0xb1), o2(0x8f,0x9f), o2(0x99,0xa7), o2(0x95,0xe5),
+     o2(0x99,0xab), o2(0x90,0xa8), o2(0x99,0xa8), o2(0x8b,0xce),
+     o2(0x99,0xa9), o2(0x8a,0xa9), o2(0x8c,0x4d), o2(0x99,0xac),
+     o2(0x99,0xad), o2(0x99,0xae), o2(0x99,0xaf), o2(0x8e,0xd9),
+     o2(0x8c,0xf9), o2(0x96,0xdc),
+
+#define to_Shift_JIS_E5_8B WORDINDEX2INFO(11319)
+    to_Shift_JIS_E5_8B_offsets,
+    to_Shift_JIS_E5_8B_infos,
+
+#define to_Shift_JIS_E5_8C_infos WORDINDEX2INFO(11321)
+           INVALID,         UNDEF, o2(0x96,0xe6), o2(0x93,0xf5),
+     o2(0x95,0xef), o2(0x99,0xb0), o2(0x99,0xb1), o2(0x99,0xb3),
+     o2(0x99,0xb5), o2(0x99,0xb4), o2(0x99,0xb6), o2(0x89,0xbb),
+     o2(0x96,0x6b), o2(0x8d,0xfa), o2(0x99,0xb7), o2(0x91,0x78),
+     o2(0x8f,0xa0), o2(0x8b,0xa7), o2(0x99,0xb8), o2(0x94,0xd9),
+     o2(0x99,0xb9), o2(0x99,0xba), o2(0x99,0xbb), o2(0x99,0xbc),
+     o2(0x95,0x43), o2(0x8b,0xe6), o2(0x88,0xe3), o2(0x93,0xbd),
+
+#define to_Shift_JIS_E5_8C WORDINDEX2INFO(11349)
+    to_Shift_JIS_E5_8C_offsets,
+    to_Shift_JIS_E5_8C_infos,
+
+#define to_Shift_JIS_E5_8D_infos WORDINDEX2INFO(11351)
+           INVALID, o2(0x99,0xbd), o2(0x8f,0x5c),         UNDEF,
+     o2(0x90,0xe7), o2(0x99,0xbf), o2(0x99,0xbe), o2(0x8f,0xa1),
+     o2(0x8c,0xdf), o2(0x99,0xc1), o2(0x94,0xbc), o2(0x99,0xc2),
+     o2(0x94,0xda), o2(0x91,0xb2), o2(0x91,0xec), o2(0x8b,0xa6),
+     o2(0x93,0xec), o2(0x92,0x50), o2(0x94,0x8e), o2(0x96,0x6d),
+     o2(0x99,0xc4), o2(0x90,0xe8), o2(0x8c,0x54), o2(0x99,0xc5),
+     o2(0x99,0xc6), o2(0x89,0x4b), o2(0x88,0xf3), o2(0x8a,0xeb),
+     o2(0x91,0xa6), o2(0x8b,0x70), o2(0x97,0x91), o2(0x99,0xc9),
+     o2(0x89,0xb5), o2(0x99,0xc8), o2(0x8b,0xa8),
+
+#define to_Shift_JIS_E5_8D WORDINDEX2INFO(11386)
+    to_Shift_JIS_E5_8D_offsets,
+    to_Shift_JIS_E5_8D_infos,
+
+#define to_Shift_JIS_E5_8E_infos WORDINDEX2INFO(11388)
+           INVALID,         UNDEF, o2(0x99,0xca), o2(0x96,0xef),
+     o2(0x99,0xcb), o2(0x97,0xd0), o2(0x8c,0xfa), o2(0x8c,0xb4),
+     o2(0x99,0xcc), o2(0x99,0xce), o2(0x99,0xcd), o2(0x90,0x7e),
+     o2(0x89,0x58), o2(0x89,0x7d), o2(0x99,0xcf), o2(0x99,0xd0),
+     o2(0x8c,0xb5), o2(0x99,0xd1), o2(0x8b,0x8e),
+
+#define to_Shift_JIS_E5_8E WORDINDEX2INFO(11407)
+    to_Shift_JIS_E5_8E_offsets,
+    to_Shift_JIS_E5_8E_infos,
+
+#define to_Shift_JIS_E5_8F_infos WORDINDEX2INFO(11409)
+           INVALID,         UNDEF, o2(0x8e,0x51), o2(0x99,0xd2),
+     o2(0x96,0x94), o2(0x8d,0xb3), o2(0x8b,0x79), o2(0x97,0x46),
+     o2(0x91,0x6f), o2(0x94,0xbd), o2(0x8e,0xfb), o2(0x8f,0x66),
+     o2(0x8e,0xe6), o2(0x8e,0xf3), o2(0x8f,0x96), o2(0x94,0xbe),
+     o2(0x99,0xd5), o2(0x89,0x62), o2(0x91,0x70), o2(0x8c,0xfb),
+     o2(0x8c,0xc3), o2(0x8b,0xe5), o2(0x99,0xd9), o2(0x92,0x40),
+     o2(0x91,0xfc), o2(0x8b,0xa9), o2(0x8f,0xa2), o2(0x99,0xda),
+     o2(0x99,0xd8), o2(0x89,0xc2), o2(0x91,0xe4), o2(0x8e,0xb6),
+     o2(0x8e,0x6a), o2(0x89,0x45), o2(0x8a,0x90), o2(0x8d,0x86),
+     o2(0x8e,0x69), o2(0x99,0xdb),
+
+#define to_Shift_JIS_E5_8F WORDINDEX2INFO(11447)
+    to_Shift_JIS_E5_8F_offsets,
+    to_Shift_JIS_E5_8F_infos,
+
+#define to_Shift_JIS_E5_90_infos WORDINDEX2INFO(11449)
+           INVALID,         UNDEF, o2(0x99,0xdc), o2(0x8b,0x68),
+     o2(0x8a,0x65), o2(0x8d,0x87), o2(0x8b,0x67), o2(0x92,0xdd),
+     o2(0x89,0x44), o2(0x93,0xaf), o2(0x96,0xbc), o2(0x8d,0x40),
+     o2(0x97,0x99), o2(0x93,0x66), o2(0x8c,0xfc), o2(0x8c,0x4e),
+     o2(0x99,0xe5), o2(0x8b,0xe1), o2(0x96,0x69), o2(0x94,0xdb),
+     o2(0x99,0xe4), o2(0x8a,0xdc), o2(0x99,0xdf), o2(0x99,0xe0),
+     o2(0x99,0xe2), o2(0x99,0xe3), o2(0x8b,0x7a), o2(0x90,0x81),
+     o2(0x95,0xab), o2(0x99,0xe1), o2(0x99,0xdd), o2(0x8c,0xe1),
+
+#define to_Shift_JIS_E5_90 WORDINDEX2INFO(11481)
+    to_Shift_JIS_E5_90_offsets,
+    to_Shift_JIS_E5_90_infos,
+
+#define to_Shift_JIS_E5_91_infos WORDINDEX2INFO(11483)
+           INVALID, o2(0x99,0xde),         UNDEF, o2(0x98,0x43),
+     o2(0x95,0xf0), o2(0x92,0xe6), o2(0x8c,0xe0), o2(0x8d,0x90),
+     o2(0x99,0xe6), o2(0x93,0xdb), o2(0x99,0xea), o2(0x8e,0xfc),
+     o2(0x8e,0xf4), o2(0x99,0xed), o2(0x99,0xeb), o2(0x96,0xa1),
+     o2(0x99,0xe8), o2(0x99,0xf1), o2(0x99,0xec), o2(0x99,0xef),
+     o2(0x8c,0xc4), o2(0x96,0xbd),
+
+#define to_Shift_JIS_E5_91 WORDINDEX2INFO(11505)
+    to_Shift_JIS_E5_91_offsets,
+    to_Shift_JIS_E5_91_infos,
+
+#define to_Shift_JIS_E5_92_infos WORDINDEX2INFO(11507)
+           INVALID, o2(0x99,0xf0),         UNDEF, o2(0x99,0xf2),
+     o2(0x99,0xf4), o2(0x8d,0xee), o2(0x98,0x61), o2(0x99,0xe9),
+     o2(0x99,0xe7), o2(0x99,0xf3), o2(0x99,0xee), o2(0x99,0xf6),
+     o2(0x9a,0x42), o2(0x99,0xf8), o2(0x99,0xfc), o2(0x9a,0x40),
+     o2(0x99,0xf9), o2(0x9a,0x5d), o2(0x8d,0xe7), o2(0x8a,0x50),
+     o2(0x99,0xf7), o2(0x9a,0x44), o2(0x88,0xf4), o2(0x9a,0x43),
+
+#define to_Shift_JIS_E5_92 WORDINDEX2INFO(11531)
+    to_Shift_JIS_E5_92_offsets,
+    to_Shift_JIS_E5_92_infos,
+
+#define to_Shift_JIS_E5_93_infos WORDINDEX2INFO(11533)
+           INVALID, o2(0x88,0xa3), o2(0x95,0x69), o2(0x9a,0x41),
+             UNDEF, o2(0x99,0xfa), o2(0x99,0xf5), o2(0x99,0xfb),
+     o2(0x8d,0xc6), o2(0x9a,0x45), o2(0x88,0xf5), o2(0x9a,0x4e),
+     o2(0x9a,0x46), o2(0x9a,0x47), o2(0x8f,0xa3), o2(0x96,0x89),
+     o2(0x9a,0x4c), o2(0x9a,0x4b), o2(0x93,0x4e), o2(0x9a,0x4d),
+     o2(0x9a,0x4a),
+
+#define to_Shift_JIS_E5_93 WORDINDEX2INFO(11554)
+    to_Shift_JIS_E5_93_offsets,
+    to_Shift_JIS_E5_93_infos,
+
+#define to_Shift_JIS_E5_94_infos WORDINDEX2INFO(11556)
+           INVALID,         UNDEF, o2(0x89,0x53), o2(0x8d,0xb4),
+     o2(0x90,0x4f), o2(0x9a,0x48), o2(0x93,0x82), o2(0x9a,0x49),
+     o2(0x88,0xa0), o2(0x9a,0x53), o2(0x97,0x42), o2(0x8f,0xa5),
+     o2(0x9a,0x59), o2(0x9a,0x58), o2(0x9a,0x4f), o2(0x91,0xc1),
+
+#define to_Shift_JIS_E5_94 WORDINDEX2INFO(11572)
+    to_Shift_JIS_E5_94_offsets,
+    to_Shift_JIS_E5_94_infos,
+
+#define to_Shift_JIS_E5_95_infos WORDINDEX2INFO(11574)
+           INVALID, o2(0x9a,0x50),         UNDEF, o2(0x91,0xed),
+     o2(0x9a,0x55), o2(0x8f,0xa4), o2(0x9a,0x52), o2(0x96,0xe2),
+     o2(0x8c,0x5b), o2(0x9a,0x56), o2(0x9a,0x57), o2(0x9a,0x54),
+     o2(0x9a,0x5a), o2(0x9a,0x51), o2(0x9a,0x60), o2(0x9a,0x65),
+     o2(0x9a,0x61),
+
+#define to_Shift_JIS_E5_95 WORDINDEX2INFO(11591)
+    to_Shift_JIS_E5_95_offsets,
+    to_Shift_JIS_E5_95_infos,
+
+#define to_Shift_JIS_E5_96_infos WORDINDEX2INFO(11593)
+           INVALID, o2(0x9a,0x5c),         UNDEF, o2(0x9a,0x66),
+     o2(0x91,0x50), o2(0x9a,0x68), o2(0x8d,0x41), o2(0x9a,0x5e),
+     o2(0x92,0x9d), o2(0x9a,0x62), o2(0x9a,0x5b), o2(0x8a,0xab),
+     o2(0x8a,0xec), o2(0x8a,0x85), o2(0x9a,0x63), o2(0x9a,0x5f),
+     o2(0x8c,0x96), o2(0x9a,0x69), o2(0x9a,0x67), o2(0x91,0x72),
+     o2(0x8b,0x69), o2(0x8b,0xaa), o2(0x9a,0x64), o2(0x8b,0xf2),
+     o2(0x89,0x63),
+
+#define to_Shift_JIS_E5_96 WORDINDEX2INFO(11618)
+    to_Shift_JIS_E5_96_offsets,
+    to_Shift_JIS_E5_96_infos,
+
+#define to_Shift_JIS_E5_97_infos WORDINDEX2INFO(11620)
+           INVALID,         UNDEF, o2(0x9a,0x6d), o2(0x9a,0x6b),
+     o2(0x9a,0xa5), o2(0x9a,0x70), o2(0x9a,0x6a), o2(0x9a,0x6e),
+     o2(0x9a,0x6c), o2(0x8e,0x6b), o2(0x9a,0x6f), o2(0x9a,0x72),
+     o2(0x9a,0x77), o2(0x9a,0x75), o2(0x9a,0x74),
+
+#define to_Shift_JIS_E5_97 WORDINDEX2INFO(11635)
+    to_Shift_JIS_E5_97_offsets,
+    to_Shift_JIS_E5_97_infos,
+
+#define to_Shift_JIS_E5_98_infos WORDINDEX2INFO(11637)
+           INVALID,         UNDEF, o2(0x92,0x51), o2(0x89,0xc3),
+     o2(0x9a,0x71), o2(0x9a,0x73), o2(0x8f,0xa6), o2(0x89,0x52),
+     o2(0x9a,0x76), o2(0x89,0xdc), o2(0x9a,0x82), o2(0x8f,0xfa),
+     o2(0x9a,0x7d), o2(0x9a,0x7b), o2(0x9a,0x7c), o2(0x9a,0x7e),
+
+#define to_Shift_JIS_E5_98 WORDINDEX2INFO(11653)
+    to_Shift_JIS_E5_98_offsets,
+    to_Shift_JIS_E5_98_infos,
+
+#define to_Shift_JIS_E5_99_infos WORDINDEX2INFO(11655)
+           INVALID,         UNDEF, o2(0x89,0x5c), o2(0x91,0x58),
+     o2(0x9a,0x78), o2(0x9a,0x79), o2(0x8a,0x9a), o2(0x9a,0x81),
+     o2(0x8a,0xed), o2(0x9a,0x84), o2(0x9a,0x80), o2(0x9a,0x83),
+     o2(0x95,0xac), o2(0x93,0xd3), o2(0x94,0xb6),
+
+#define to_Shift_JIS_E5_99 WORDINDEX2INFO(11670)
+    to_Shift_JIS_E5_99_offsets,
+    to_Shift_JIS_E5_99_infos,
+
+#define to_Shift_JIS_E5_9A_infos WORDINDEX2INFO(11672)
+           INVALID, o2(0x9a,0x86),         UNDEF, o2(0x9a,0x85),
+     o2(0x8a,0x64), o2(0x9a,0x87), o2(0x9a,0x8a), o2(0x9a,0x89),
+     o2(0x9a,0x88), o2(0x94,0x58), o2(0x9a,0x8b), o2(0x9a,0x8c),
+     o2(0x9a,0x8e), o2(0x9a,0x8d), o2(0x9a,0x90),
+
+#define to_Shift_JIS_E5_9A WORDINDEX2INFO(11687)
+    to_Shift_JIS_E5_9A_offsets,
+    to_Shift_JIS_E5_9A_infos,
+
+#define to_Shift_JIS_E5_9B_infos WORDINDEX2INFO(11689)
+           INVALID, o2(0x9a,0x93), o2(0x9a,0x91), o2(0x9a,0x8f),
+     o2(0x9a,0x92),         UNDEF, o2(0x9a,0x94), o2(0x9a,0x95),
+     o2(0x9a,0x96), o2(0x9a,0x97), o2(0x9a,0x98), o2(0x99,0x64),
+     o2(0x8e,0xfa), o2(0x8e,0x6c), o2(0x89,0xf1), o2(0x88,0xf6),
+     o2(0x92,0x63), o2(0x9a,0x99), o2(0x8d,0xa2), o2(0x88,0xcd),
+     o2(0x90,0x7d), o2(0x9a,0x9a), o2(0x8c,0xc5), o2(0x8d,0x91),
+     o2(0x9a,0x9c),
+
+#define to_Shift_JIS_E5_9B WORDINDEX2INFO(11714)
+    to_Shift_JIS_E5_9B_offsets,
+    to_Shift_JIS_E5_9B_infos,
+
+#define to_Shift_JIS_E5_9C_infos WORDINDEX2INFO(11716)
+           INVALID, o2(0x9a,0x9b),         UNDEF, o2(0x95,0xde),
+     o2(0x9a,0x9d), o2(0x9a,0x9f), o2(0x9a,0x9e), o2(0x9a,0xa0),
+     o2(0x9a,0xa1), o2(0x8c,0x97), o2(0x89,0x80), o2(0x9a,0xa2),
+     o2(0x9a,0xa4), o2(0x9a,0xa3), o2(0x9a,0xa6), o2(0x93,0x79),
+     o2(0x9a,0xa7), o2(0x88,0xb3), o2(0x8d,0xdd), o2(0x8c,0x5c),
+     o2(0x92,0x6e), o2(0x9a,0xa8), o2(0x9a,0xa9), o2(0x9a,0xab),
+
+#define to_Shift_JIS_E5_9C WORDINDEX2INFO(11740)
+    to_Shift_JIS_E5_9C_offsets,
+    to_Shift_JIS_E5_9C_infos,
+
+#define to_Shift_JIS_E5_9D_infos WORDINDEX2INFO(11742)
+           INVALID, o2(0x9a,0xac),         UNDEF, o2(0x8d,0xe2),
+     o2(0x8b,0xcf), o2(0x96,0x56), o2(0x9a,0xaa), o2(0x9a,0xad),
+     o2(0x8d,0xbf), o2(0x8d,0x42), o2(0x9a,0xb1), o2(0x8d,0xa3),
+     o2(0x92,0x52), o2(0x9a,0xae), o2(0x92,0xd8), o2(0x9a,0xb2),
+
+#define to_Shift_JIS_E5_9D WORDINDEX2INFO(11758)
+    to_Shift_JIS_E5_9D_offsets,
+    to_Shift_JIS_E5_9D_infos,
+
+#define to_Shift_JIS_E5_9E_infos WORDINDEX2INFO(11760)
+           INVALID,         UNDEF, o2(0x90,0x82), o2(0x9a,0xb0),
+     o2(0x9a,0xb3), o2(0x8c,0x5e), o2(0x9a,0xb4), o2(0x9a,0xb5),
+     o2(0x8d,0x43), o2(0x8a,0x5f), o2(0x9a,0xb7), o2(0x9a,0xb8),
+     o2(0x9a,0xb9), o2(0x9a,0xb6),
+
+#define to_Shift_JIS_E5_9E WORDINDEX2INFO(11774)
+    to_Shift_JIS_E5_9E_offsets,
+    to_Shift_JIS_E5_9E_infos,
+
+#define to_Shift_JIS_E5_9F_infos WORDINDEX2INFO(11776)
+           INVALID, o2(0x9a,0xaf),         UNDEF, o2(0x9a,0xba),
+     o2(0x9a,0xbb), o2(0x96,0x84), o2(0x8f,0xe9), o2(0x9a,0xbd),
+     o2(0x9a,0xbe), o2(0x9a,0xbc), o2(0x9a,0xc0), o2(0x94,0x57),
+     o2(0x88,0xe6), o2(0x95,0x75), o2(0x9a,0xc1), o2(0x8f,0xfb),
+     o2(0x8e,0xb7), o2(0x94,0x7c), o2(0x8a,0xee), o2(0x8d,0xe9),
+
+#define to_Shift_JIS_E5_9F WORDINDEX2INFO(11796)
+    to_Shift_JIS_E5_9F_offsets,
+    to_Shift_JIS_E5_9F_infos,
+
+#define to_Shift_JIS_E5_A0_infos WORDINDEX2INFO(11798)
+           INVALID, o2(0x96,0x78),         UNDEF, o2(0x93,0xb0),
+     o2(0x8c,0x98), o2(0x91,0xcd), o2(0x9a,0xbf), o2(0x9a,0xc2),
+     o2(0x91,0xc2), o2(0x9a,0xc3), o2(0x9a,0xc4), o2(0x9a,0xc6),
+     o2(0x92,0xe7), o2(0x8a,0xac), o2(0xea,0x9f), o2(0x89,0x81),
+     o2(0x95,0xf1), o2(0x8f,0xea), o2(0x93,0x67), o2(0x8d,0xe4),
+     o2(0x9a,0xcc),
+
+#define to_Shift_JIS_E5_A0 WORDINDEX2INFO(11819)
+    to_Shift_JIS_E5_A0_offsets,
+    to_Shift_JIS_E5_A0_infos,
+
+#define to_Shift_JIS_E5_A1_infos WORDINDEX2INFO(11821)
+           INVALID, o2(0x95,0xbb), o2(0x97,0xdb),         UNDEF,
+     o2(0x89,0xf2), o2(0x9a,0xc8), o2(0x91,0x59), o2(0x9a,0xcb),
+     o2(0x93,0x83), o2(0x93,0x68), o2(0x93,0x84), o2(0x94,0xb7),
+     o2(0x92,0xcb), o2(0x8d,0xc7), o2(0x9a,0xc7), o2(0x89,0x96),
+     o2(0x93,0x55), o2(0x9a,0xc9), o2(0x9a,0xc5), o2(0x90,0x6f),
+     o2(0x9a,0xcd), o2(0x8f,0x6d),
+
+#define to_Shift_JIS_E5_A1 WORDINDEX2INFO(11843)
+    to_Shift_JIS_E5_A1_offsets,
+    to_Shift_JIS_E5_A1_infos,
+
+#define to_Shift_JIS_E5_A2_infos WORDINDEX2INFO(11845)
+           INVALID,         UNDEF, o2(0x8b,0xab), o2(0x9a,0xce),
+     o2(0x95,0xe6), o2(0x91,0x9d), o2(0x92,0xc4), o2(0x9a,0xd0),
+     o2(0x96,0x6e), o2(0x9a,0xd1), o2(0x9a,0xd6), o2(0x95,0xad),
+     o2(0x9a,0xd5), o2(0x9a,0xcf), o2(0x9a,0xd2), o2(0x9a,0xd4),
+     o2(0x8d,0xa4),
+
+#define to_Shift_JIS_E5_A2 WORDINDEX2INFO(11862)
+    to_Shift_JIS_E5_A2_offsets,
+    to_Shift_JIS_E5_A2_infos,
+
+#define to_Shift_JIS_E5_A3_infos WORDINDEX2INFO(11864)
+           INVALID,         UNDEF, o2(0x95,0xc7), o2(0x9a,0xd7),
+     o2(0x92,0x64), o2(0x89,0xf3), o2(0x8f,0xeb), o2(0x9a,0xd9),
+     o2(0x9a,0xd8), o2(0x8d,0x88), o2(0x9a,0xda), o2(0x9a,0xdc),
+     o2(0x9a,0xdb), o2(0x9a,0xde), o2(0x9a,0xd3), o2(0x9a,0xe0),
+     o2(0x9a,0xdf), o2(0x9a,0xdd), o2(0x8e,0x6d), o2(0x90,0x70),
+     o2(0x91,0x73), o2(0x9a,0xe1), o2(0x90,0xba), o2(0x88,0xeb),
+     o2(0x94,0x84), o2(0x92,0xd9), o2(0x9a,0xe3), o2(0x9a,0xe2),
+     o2(0x9a,0xe4), o2(0x9a,0xe5), o2(0x9a,0xe6),
+
+#define to_Shift_JIS_E5_A3 WORDINDEX2INFO(11895)
+    to_Shift_JIS_E5_A3_offsets,
+    to_Shift_JIS_E5_A3_infos,
+
+#define to_Shift_JIS_E5_A4_infos WORDINDEX2INFO(11897)
+           INVALID,         UNDEF, o2(0x9a,0xe7), o2(0x95,0xcf),
+     o2(0x9a,0xe8), o2(0x89,0xc4), o2(0x9a,0xe9), o2(0x97,0x5b),
+     o2(0x8a,0x4f), o2(0x99,0xc7), o2(0x8f,0x67), o2(0x91,0xbd),
+     o2(0x9a,0xea), o2(0x96,0xe9), o2(0x96,0xb2), o2(0x9a,0xec),
+     o2(0x91,0xe5), o2(0x93,0x56), o2(0x91,0xbe), o2(0x95,0x76),
+     o2(0x9a,0xed), o2(0x9a,0xee), o2(0x89,0x9b), o2(0x8e,0xb8),
+     o2(0x9a,0xef), o2(0x88,0xce), o2(0x9a,0xf0), o2(0x9a,0xf1),
+
+#define to_Shift_JIS_E5_A4 WORDINDEX2INFO(11925)
+    to_Shift_JIS_E5_A4_offsets,
+    to_Shift_JIS_E5_A4_infos,
+
+#define to_Shift_JIS_E5_A5_infos WORDINDEX2INFO(11927)
+           INVALID,         UNDEF, o2(0x89,0x82), o2(0x8a,0xef),
+     o2(0x93,0xde), o2(0x95,0xf2), o2(0x9a,0xf5), o2(0x91,0x74),
+     o2(0x9a,0xf4), o2(0x8c,0x5f), o2(0x96,0x7a), o2(0x9a,0xf3),
+     o2(0x93,0x85), o2(0x9a,0xf7), o2(0x9a,0xf6), o2(0x9a,0xf9),
+     o2(0x9a,0xf8), o2(0x89,0x9c), o2(0x9a,0xfa), o2(0x8f,0xa7),
+     o2(0x9a,0xfc), o2(0x92,0x44), o2(0x9a,0xfb), o2(0x95,0xb1),
+     o2(0x8f,0x97), o2(0x93,0x7a), o2(0x9b,0x40), o2(0x8d,0x44),
+
+#define to_Shift_JIS_E5_A5 WORDINDEX2INFO(11955)
+    to_Shift_JIS_E5_A5_offsets,
+    to_Shift_JIS_E5_A5_infos,
+
+#define to_Shift_JIS_E5_A6_infos WORDINDEX2INFO(11957)
+           INVALID,         UNDEF, o2(0x9b,0x41), o2(0x94,0x40),
+     o2(0x94,0xdc), o2(0x96,0xcf), o2(0x94,0x44), o2(0x9b,0x4a),
+     o2(0x8b,0x57), o2(0x97,0x64), o2(0x96,0xad), o2(0x9b,0xaa),
+     o2(0x9b,0x42), o2(0x9b,0x45), o2(0x91,0xc3), o2(0x96,0x57),
+     o2(0x93,0x69), o2(0x9b,0x46), o2(0x96,0x85), o2(0x8d,0xc8),
+     o2(0x8f,0xa8),
+
+#define to_Shift_JIS_E5_A6 WORDINDEX2INFO(11978)
+    to_Shift_JIS_E5_A6_offsets,
+    to_Shift_JIS_E5_A6_infos,
+
+#define to_Shift_JIS_E5_A7_infos WORDINDEX2INFO(11980)
+           INVALID,         UNDEF, o2(0x9b,0x47), o2(0x8e,0x6f),
+     o2(0x8e,0x6e), o2(0x88,0xb7), o2(0x8c,0xc6), o2(0x90,0xa9),
+     o2(0x88,0xcf), o2(0x9b,0x4b), o2(0x9b,0x4c), o2(0x9b,0x49),
+     o2(0x89,0x57), o2(0x8a,0xad), o2(0x9b,0x48), o2(0x96,0xc3),
+     o2(0x95,0x50), o2(0x88,0xa6), o2(0x88,0xf7), o2(0x8e,0x70),
+
+#define to_Shift_JIS_E5_A7 WORDINDEX2INFO(12000)
+    to_Shift_JIS_E5_A7_offsets,
+    to_Shift_JIS_E5_A7_infos,
+
+#define to_Shift_JIS_E5_A8_infos WORDINDEX2INFO(12002)
+           INVALID,         UNDEF, o2(0x88,0xd0), o2(0x88,0xa1),
+     o2(0x9b,0x51), o2(0x9b,0x4f), o2(0x96,0xba), o2(0x9b,0x52),
+     o2(0x9b,0x50), o2(0x9b,0x4e), o2(0x90,0x50), o2(0x9b,0x4d),
+     o2(0x95,0xd8), o2(0x8c,0xe2), o2(0x9b,0x56), o2(0x9b,0x57),
+     o2(0x8f,0xa9),
+
+#define to_Shift_JIS_E5_A8 WORDINDEX2INFO(12019)
+    to_Shift_JIS_E5_A8_offsets,
+    to_Shift_JIS_E5_A8_infos,
+
+#define to_Shift_JIS_E5_A9_infos WORDINDEX2INFO(12021)
+           INVALID, o2(0x9b,0x53), o2(0x98,0x4b),         UNDEF,
+     o2(0x94,0x6b), o2(0x9b,0x55), o2(0x8d,0xa5), o2(0x9b,0x58),
+     o2(0x95,0x77), o2(0x9b,0x59), o2(0x9b,0x54), o2(0x96,0xb9),
+
+#define to_Shift_JIS_E5_A9 WORDINDEX2INFO(12033)
+    to_Shift_JIS_E5_A9_offsets,
+    to_Shift_JIS_E5_A9_infos,
+
+#define to_Shift_JIS_E5_AA_infos WORDINDEX2INFO(12035)
+           INVALID,         UNDEF, o2(0x94,0x7d), o2(0x9b,0x5a),
+     o2(0x95,0x51), o2(0x9b,0x5b), o2(0x9b,0x5f), o2(0x9b,0x5c),
+
+#define to_Shift_JIS_E5_AA WORDINDEX2INFO(12043)
+    to_Shift_JIS_E5_AA_offsets,
+    to_Shift_JIS_E5_AA_infos,
+
+#define to_Shift_JIS_E5_AB_infos WORDINDEX2INFO(12045)
+           INVALID,         UNDEF, o2(0x89,0xc5), o2(0x9b,0x5e),
+     o2(0x8e,0xb9), o2(0x9b,0x5d), o2(0x8c,0x99), o2(0x9b,0x6b),
+     o2(0x9b,0x64), o2(0x9b,0x61), o2(0x92,0x84), o2(0x9b,0x60),
+     o2(0x9b,0x62), o2(0x9b,0x63), o2(0x9b,0x65), o2(0x9b,0x66),
+
+#define to_Shift_JIS_E5_AB WORDINDEX2INFO(12061)
+    to_Shift_JIS_E5_AB_offsets,
+    to_Shift_JIS_E5_AB_infos,
+
+#define to_Shift_JIS_E5_AC_infos WORDINDEX2INFO(12063)
+           INVALID,         UNDEF, o2(0x8a,0xf0), o2(0x9b,0x68),
+     o2(0x9b,0x67), o2(0x9b,0x69), o2(0x8f,0xec), o2(0x9b,0x6c),
+     o2(0x92,0xda), o2(0x89,0x64), o2(0x9b,0x6a), o2(0x9b,0x6d),
+     o2(0x9b,0x6e),
+
+#define to_Shift_JIS_E5_AC WORDINDEX2INFO(12076)
+    to_Shift_JIS_E5_AC_offsets,
+    to_Shift_JIS_E5_AC_infos,
+
+#define to_Shift_JIS_E5_AD_infos WORDINDEX2INFO(12078)
+           INVALID, o2(0x9b,0x71),         UNDEF, o2(0x9b,0x6f),
+     o2(0x9b,0x70), o2(0x8e,0x71), o2(0x9b,0x72), o2(0x8d,0x45),
+     o2(0x9b,0x73), o2(0x8e,0x9a), o2(0x91,0xb6), o2(0x9b,0x74),
+     o2(0x9b,0x75), o2(0x8e,0x79), o2(0x8d,0x46), o2(0x96,0xd0),
+     o2(0x8b,0x47), o2(0x8c,0xc7), o2(0x9b,0x76), o2(0x8a,0x77),
+     o2(0x9b,0x77), o2(0x91,0xb7), o2(0x9b,0x78), o2(0x9b,0xa1),
+     o2(0x9b,0x79), o2(0x9b,0x7a), o2(0x9b,0x7b), o2(0x9b,0x7d),
+
+#define to_Shift_JIS_E5_AD WORDINDEX2INFO(12106)
+    to_Shift_JIS_E5_AD_offsets,
+    to_Shift_JIS_E5_AD_infos,
+
+#define to_Shift_JIS_E5_AE_infos WORDINDEX2INFO(12108)
+           INVALID, o2(0x9b,0x7e),         UNDEF, o2(0x9b,0x80),
+     o2(0x91,0xee), o2(0x89,0x46), o2(0x8e,0xe7), o2(0x88,0xc0),
+     o2(0x91,0x76), o2(0x8a,0xae), o2(0x8e,0xb3), o2(0x8d,0x47),
+     o2(0x93,0x86), o2(0x8f,0x40), o2(0x8a,0xaf), o2(0x92,0x88),
+     o2(0x92,0xe8), o2(0x88,0xb6), o2(0x8b,0x58), o2(0x95,0xf3),
+     o2(0x8e,0xc0), o2(0x8b,0x71), o2(0x90,0xe9), o2(0x8e,0xba),
+     o2(0x97,0x47), o2(0x9b,0x81), o2(0x8b,0x7b), o2(0x8d,0xc9),
+     o2(0x8a,0x51), o2(0x89,0x83), o2(0x8f,0xaa), o2(0x89,0xc6),
+     o2(0x9b,0x82), o2(0x97,0x65), o2(0x8f,0x68),
+
+#define to_Shift_JIS_E5_AE WORDINDEX2INFO(12143)
+    to_Shift_JIS_E5_AE_offsets,
+    to_Shift_JIS_E5_AE_infos,
+
+#define to_Shift_JIS_E5_AF_infos WORDINDEX2INFO(12145)
+           INVALID,         UNDEF, o2(0x8e,0xe2), o2(0x9b,0x83),
+     o2(0x8a,0xf1), o2(0x93,0xd0), o2(0x96,0xa7), o2(0x9b,0x84),
+     o2(0x9b,0x85), o2(0x95,0x78), o2(0x9b,0x87), o2(0x8a,0xa6),
+     o2(0x8b,0xf5), o2(0x9b,0x86), o2(0x8a,0xb0), o2(0x90,0x51),
+     o2(0x9b,0x8b), o2(0x8e,0x40), o2(0x89,0xc7), o2(0x9b,0x8a),
+     o2(0x9b,0x88), o2(0x9b,0x8c), o2(0x9b,0x89), o2(0x94,0x4a),
+     o2(0x9e,0xcb), o2(0x90,0x52), o2(0x9b,0x8d), o2(0x97,0xbe),
+     o2(0x9b,0x8e), o2(0x9b,0x90), o2(0x92,0x9e), o2(0x9b,0x8f),
+     o2(0x90,0xa1), o2(0x8e,0x9b), o2(0x91,0xce), o2(0x8e,0xf5),
+
+#define to_Shift_JIS_E5_AF WORDINDEX2INFO(12181)
+    to_Shift_JIS_E5_AF_offsets,
+    to_Shift_JIS_E5_AF_infos,
+
+#define to_Shift_JIS_E5_B0_infos WORDINDEX2INFO(12183)
+           INVALID,         UNDEF, o2(0x95,0x95), o2(0x90,0xea),
+     o2(0x8e,0xcb), o2(0x9b,0x91), o2(0x8f,0xab), o2(0x9b,0x92),
+     o2(0x9b,0x93), o2(0x88,0xd1), o2(0x91,0xb8), o2(0x90,0x71),
+     o2(0x9b,0x94), o2(0x93,0xb1), o2(0x8f,0xac), o2(0x8f,0xad),
+     o2(0x9b,0x95), o2(0x90,0xeb), o2(0x8f,0xae), o2(0x9b,0x96),
+     o2(0x9b,0x97), o2(0x96,0xde), o2(0x9b,0x98), o2(0x8b,0xc4),
+     o2(0x8f,0x41), o2(0x9b,0x99), o2(0x9b,0x9a), o2(0x8e,0xda),
+     o2(0x90,0x4b), o2(0x93,0xf2), o2(0x90,0x73), o2(0x94,0xf6),
+     o2(0x94,0x41),
+
+#define to_Shift_JIS_E5_B0 WORDINDEX2INFO(12216)
+    to_Shift_JIS_E5_B0_offsets,
+    to_Shift_JIS_E5_B0_infos,
+
+#define to_Shift_JIS_E5_B1_infos WORDINDEX2INFO(12218)
+           INVALID, o2(0x8b,0xc7), o2(0x9b,0x9b),         UNDEF,
+     o2(0x8b,0x8f), o2(0x9b,0x9c), o2(0x8b,0xfc), o2(0x93,0xcd),
+     o2(0x89,0xae), o2(0x8e,0x72), o2(0x9b,0x9d), o2(0x9b,0xa0),
+     o2(0x9b,0x9f), o2(0x8b,0xfb), o2(0x9b,0x9e), o2(0x93,0x57),
+     o2(0x91,0xae), o2(0x93,0x6a), o2(0x8e,0xc6), o2(0x91,0x77),
+     o2(0x97,0x9a), o2(0x9b,0xa2), o2(0x9b,0xa3), o2(0x93,0xd4),
+     o2(0x8e,0x52), o2(0x9b,0xa5), o2(0x9b,0xa6),
+
+#define to_Shift_JIS_E5_B1 WORDINDEX2INFO(12245)
+    to_Shift_JIS_E5_B1_offsets,
+    to_Shift_JIS_E5_B1_infos,
+
+#define to_Shift_JIS_E5_B2_infos WORDINDEX2INFO(12247)
+           INVALID,         UNDEF, o2(0x9b,0xa7), o2(0x8a,0xf2),
+     o2(0x9b,0xa8), o2(0x9b,0xa9), o2(0x89,0xaa), o2(0x91,0x5a),
+     o2(0x8a,0xe2), o2(0x9b,0xab), o2(0x96,0xa6), o2(0x91,0xd0),
+     o2(0x8a,0x78), o2(0x9b,0xad), o2(0x9b,0xaf), o2(0x8a,0xdd),
+     o2(0x9b,0xac), o2(0x9b,0xae), o2(0x9b,0xb1),
+
+#define to_Shift_JIS_E5_B2 WORDINDEX2INFO(12266)
+    to_Shift_JIS_E5_B2_offsets,
+    to_Shift_JIS_E5_B2_infos,
+
+#define to_Shift_JIS_E5_B3_infos WORDINDEX2INFO(12268)
+           INVALID,         UNDEF, o2(0x9b,0xb0), o2(0x9b,0xb2),
+     o2(0x9b,0xb3), o2(0x93,0xbb), o2(0x8b,0xac), o2(0x89,0xe3),
+     o2(0x9b,0xb4), o2(0x9b,0xb9), o2(0x9b,0xb7), o2(0x95,0xf5),
+     o2(0x95,0xf4), o2(0x93,0x87), o2(0x9b,0xb6), o2(0x8f,0x73),
+     o2(0x9b,0xb5),
+
+#define to_Shift_JIS_E5_B3 WORDINDEX2INFO(12285)
+    to_Shift_JIS_E5_B3_offsets,
+    to_Shift_JIS_E5_B3_infos,
+
+#define to_Shift_JIS_E5_B4_infos WORDINDEX2INFO(12287)
+           INVALID,         UNDEF, o2(0x90,0x92), o2(0x9b,0xba),
+     o2(0x8d,0xe8), o2(0x9b,0xc0), o2(0x9b,0xc1), o2(0x9b,0xbb),
+     o2(0x8a,0x52), o2(0x9b,0xbc), o2(0x9b,0xc5), o2(0x9b,0xc4),
+     o2(0x9b,0xc3), o2(0x9b,0xbf), o2(0x9b,0xbe), o2(0x9b,0xc2),
+     o2(0x95,0xf6),
+
+#define to_Shift_JIS_E5_B4 WORDINDEX2INFO(12304)
+    to_Shift_JIS_E5_B4_offsets,
+    to_Shift_JIS_E5_B4_infos,
+
+#define to_Shift_JIS_E5_B5_infos WORDINDEX2INFO(12306)
+           INVALID,         UNDEF, o2(0x9b,0xc9), o2(0x9b,0xc6),
+     o2(0x9b,0xc8), o2(0x97,0x92), o2(0x9b,0xc7), o2(0x9b,0xbd),
+     o2(0x90,0x93), o2(0x9b,0xca), o2(0x8d,0xb5), o2(0x9b,0xcb),
+     o2(0x9b,0xcc),
+
+#define to_Shift_JIS_E5_B5 WORDINDEX2INFO(12319)
+    to_Shift_JIS_E5_B5_offsets,
+    to_Shift_JIS_E5_B5_infos,
+
+#define to_Shift_JIS_E5_B6_infos WORDINDEX2INFO(12321)
+           INVALID,         UNDEF, o2(0x9b,0xcf), o2(0x9b,0xce),
+     o2(0x9b,0xcd), o2(0x93,0x88), o2(0x9b,0xb8), o2(0x9b,0xd5),
+     o2(0x9b,0xd1), o2(0x9b,0xd0), o2(0x9b,0xd2), o2(0x9b,0xd3),
+     o2(0x9b,0xd6), o2(0x97,0xe4), o2(0x9b,0xd7), o2(0x9b,0xd4),
+
+#define to_Shift_JIS_E5_B6 WORDINDEX2INFO(12337)
+    to_Shift_JIS_E5_B6_offsets,
+    to_Shift_JIS_E5_B6_infos,
+
+#define to_Shift_JIS_E5_B7_infos WORDINDEX2INFO(12339)
+           INVALID,         UNDEF, o2(0x9b,0xd8), o2(0x8a,0xde),
+     o2(0x9b,0xd9), o2(0x9b,0xdb), o2(0x9b,0xda), o2(0x9b,0xdc),
+     o2(0x9b,0xdd), o2(0x90,0xec), o2(0x8f,0x42), o2(0x8f,0x84),
+     o2(0x91,0x83), o2(0x8d,0x48), o2(0x8d,0xb6), o2(0x8d,0x49),
+     o2(0x8b,0x90), o2(0x9b,0xde), o2(0x8d,0xb7), o2(0x8c,0xc8),
+     o2(0x9b,0xdf), o2(0x96,0xa4), o2(0x94,0x62), o2(0x9b,0xe0),
+     o2(0x8d,0x4a), o2(0x8a,0xaa), o2(0x92,0x46), o2(0x8b,0xd0),
+
+#define to_Shift_JIS_E5_B7 WORDINDEX2INFO(12367)
+    to_Shift_JIS_E5_B7_offsets,
+    to_Shift_JIS_E5_B7_infos,
+
+#define to_Shift_JIS_E5_B8_infos WORDINDEX2INFO(12369)
+           INVALID,         UNDEF, o2(0x8e,0x73), o2(0x95,0x7a),
+     o2(0x94,0xbf), o2(0x9b,0xe1), o2(0x8a,0xf3), o2(0x9b,0xe4),
+     o2(0x92,0x9f), o2(0x9b,0xe3), o2(0x9b,0xe2), o2(0x9b,0xe5),
+     o2(0x92,0xe9), o2(0x90,0x83), o2(0x8e,0x74), o2(0x90,0xc8),
+     o2(0x91,0xd1), o2(0x8b,0x41), o2(0x92,0xa0), o2(0x9b,0xe6),
+     o2(0x9b,0xe7), o2(0x8f,0xed), o2(0x96,0x58),
+
+#define to_Shift_JIS_E5_B8 WORDINDEX2INFO(12392)
+    to_Shift_JIS_E5_B8_offsets,
+    to_Shift_JIS_E5_B8_infos,
+
+#define to_Shift_JIS_E5_B9_infos WORDINDEX2INFO(12394)
+           INVALID, o2(0x9b,0xea),         UNDEF, o2(0x9b,0xe9),
+     o2(0x9b,0xe8), o2(0x95,0x9d), o2(0x9b,0xf1), o2(0x96,0x79),
+     o2(0x9b,0xeb), o2(0x9b,0xed), o2(0x96,0x8b), o2(0x9b,0xec),
+     o2(0x9b,0xee), o2(0x94,0xa6), o2(0x9b,0xef), o2(0x95,0xbc),
+     o2(0x9b,0xf0), o2(0x8a,0xb1), o2(0x95,0xbd), o2(0x94,0x4e),
+     o2(0x9b,0xf2), o2(0x9b,0xf3), o2(0x8d,0x4b), o2(0x8a,0xb2),
+     o2(0x9b,0xf4), o2(0x8c,0xb6), o2(0x97,0x63), o2(0x97,0x48),
+     o2(0x8a,0xf4), o2(0x9b,0xf6),
+
+#define to_Shift_JIS_E5_B9 WORDINDEX2INFO(12424)
+    to_Shift_JIS_E5_B9_offsets,
+    to_Shift_JIS_E5_B9_infos,
+
+#define to_Shift_JIS_E5_BA_infos WORDINDEX2INFO(12426)
+           INVALID,         UNDEF, o2(0x92,0xa1), o2(0x8d,0x4c),
+     o2(0x8f,0xaf), o2(0x94,0xdd), o2(0x8f,0xb0), o2(0x8f,0x98),
+     o2(0x92,0xea), o2(0x95,0xf7), o2(0x93,0x58), o2(0x8d,0x4d),
+     o2(0x95,0x7b), o2(0x9b,0xf7), o2(0x93,0x78), o2(0x8d,0xc0),
+     o2(0x8c,0xc9), o2(0x92,0xeb), o2(0x88,0xc1), o2(0x8f,0x8e),
+     o2(0x8d,0x4e), o2(0x97,0x66),
+
+#define to_Shift_JIS_E5_BA WORDINDEX2INFO(12448)
+    to_Shift_JIS_E5_BA_offsets,
+    to_Shift_JIS_E5_BA_infos,
+
+#define to_Shift_JIS_E5_BB_infos WORDINDEX2INFO(12450)
+           INVALID,         UNDEF, o2(0x9b,0xf8), o2(0x9b,0xf9),
+     o2(0x94,0x70), o2(0x9b,0xfa), o2(0x97,0xf5), o2(0x98,0x4c),
+     o2(0x9b,0xfc), o2(0x9b,0xfb), o2(0x8a,0x66), o2(0x9c,0x40),
+     o2(0x9c,0x43), o2(0x9c,0x44), o2(0x9c,0x42), o2(0x95,0x5f),
+     o2(0x8f,0xb1), o2(0x9c,0x46), o2(0x9c,0x45), o2(0x9c,0x41),
+     o2(0x9c,0x47), o2(0x9c,0x48), o2(0x9c,0x49), o2(0x9c,0x4c),
+     o2(0x9c,0x4a), o2(0x9c,0x4b), o2(0x9c,0x4d), o2(0x89,0x84),
+     o2(0x92,0xec), o2(0x9c,0x4e), o2(0x8c,0x9a), o2(0x89,0xf4),
+     o2(0x94,0x55), o2(0x9c,0x4f), o2(0x93,0xf9),
+
+#define to_Shift_JIS_E5_BB WORDINDEX2INFO(12485)
+    to_Shift_JIS_E5_BB_offsets,
+    to_Shift_JIS_E5_BB_infos,
+
+#define to_Shift_JIS_E5_BC_infos WORDINDEX2INFO(12487)
+           INVALID,         UNDEF, o2(0x95,0xd9), o2(0x9c,0x50),
+     o2(0x98,0x4d), o2(0x9c,0x51), o2(0x95,0xbe), o2(0x9c,0x54),
+     o2(0x98,0x9f), o2(0x98,0xaf), o2(0x8e,0xae), o2(0x93,0xf3),
+     o2(0x9c,0x55), o2(0x8b,0x7c), o2(0x92,0xa2), o2(0x88,0xf8),
+     o2(0x9c,0x56), o2(0x95,0xa4), o2(0x8d,0x4f), o2(0x92,0x6f),
+     o2(0x92,0xed), o2(0x96,0xed), o2(0x8c,0xb7), o2(0x8c,0xca),
+     o2(0x9c,0x57), o2(0x9c,0x58), o2(0x9c,0x5e), o2(0x8e,0xe3),
+     o2(0x92,0xa3), o2(0x8b,0xad), o2(0x9c,0x59), o2(0x95,0x4a),
+     o2(0x92,0x65),
+
+#define to_Shift_JIS_E5_BC WORDINDEX2INFO(12520)
+    to_Shift_JIS_E5_BC_offsets,
+    to_Shift_JIS_E5_BC_infos,
+
+#define to_Shift_JIS_E5_BD_infos WORDINDEX2INFO(12522)
+           INVALID,         UNDEF, o2(0x9c,0x5a), o2(0x9c,0x5b),
+     o2(0x8b,0xae), o2(0x9c,0x5c), o2(0x9c,0x5d), o2(0x9c,0x5f),
+     o2(0x93,0x96), o2(0x9c,0x60), o2(0x9c,0x61), o2(0x9c,0x62),
+     o2(0x9c,0x53), o2(0x9c,0x52), o2(0x9c,0x63), o2(0x8c,0x60),
+     o2(0x95,0x46), o2(0x8d,0xca), o2(0x95,0x56), o2(0x92,0xa4),
+     o2(0x95,0x6a), o2(0x9c,0x64), o2(0x8f,0xb2), o2(0x89,0x65),
+     o2(0x9c,0x65), o2(0x9c,0x66), o2(0x96,0xf0), o2(0x94,0xde),
+     o2(0x9c,0x69),
+
+#define to_Shift_JIS_E5_BD WORDINDEX2INFO(12551)
+    to_Shift_JIS_E5_BD_offsets,
+    to_Shift_JIS_E5_BD_infos,
+
+#define to_Shift_JIS_E5_BE_infos WORDINDEX2INFO(12553)
+           INVALID, o2(0x89,0x9d), o2(0x90,0xaa), o2(0x9c,0x68),
+     o2(0x9c,0x67), o2(0x8c,0x61), o2(0x91,0xd2),         UNDEF,
+     o2(0x9c,0x6d), o2(0x9c,0x6b), o2(0x9c,0x6a), o2(0x97,0xa5),
+     o2(0x8c,0xe3), o2(0x8f,0x99), o2(0x9c,0x6c), o2(0x93,0x6b),
+     o2(0x8f,0x5d), o2(0x93,0xbe), o2(0x9c,0x70), o2(0x9c,0x6f),
+     o2(0x9c,0x6e), o2(0x9c,0x71), o2(0x8c,0xe4), o2(0x9c,0x72),
+     o2(0x95,0x9c), o2(0x8f,0x7a), o2(0x9c,0x73), o2(0x94,0xf7),
+     o2(0x93,0xbf), o2(0x92,0xa5), o2(0x93,0x4f), o2(0x9c,0x74),
+     o2(0x8b,0x4a),
+
+#define to_Shift_JIS_E5_BE WORDINDEX2INFO(12586)
+    to_Shift_JIS_E5_BE_offsets,
+    to_Shift_JIS_E5_BE_infos,
+
+#define to_Shift_JIS_E5_BF_infos WORDINDEX2INFO(12588)
+           INVALID,         UNDEF, o2(0x90,0x53), o2(0x95,0x4b),
+     o2(0x8a,0xf5), o2(0x94,0x45), o2(0x9c,0x75), o2(0x8e,0x75),
+     o2(0x96,0x59), o2(0x96,0x5a), o2(0x89,0x9e), o2(0x9c,0x7a),
+     o2(0x92,0x89), o2(0x9c,0x77), o2(0x89,0xf5), o2(0x9c,0xab),
+     o2(0x9c,0x79), o2(0x94,0x4f), o2(0x9c,0x78), o2(0x9c,0x76),
+     o2(0x8d,0x9a), o2(0x9c,0x7c),
+
+#define to_Shift_JIS_E5_BF WORDINDEX2INFO(12610)
+    to_Shift_JIS_E5_BF_offsets,
+    to_Shift_JIS_E5_BF_infos,
+
+#define to_Shift_JIS_E5_infos WORDINDEX2INFO(12612)
+                INVALID, to_Shift_JIS_E5_80,
+     to_Shift_JIS_E5_81, to_Shift_JIS_E5_82,
+     to_Shift_JIS_E5_83, to_Shift_JIS_E5_84,
+     to_Shift_JIS_E5_85, to_Shift_JIS_E5_86,
+     to_Shift_JIS_E5_87, to_Shift_JIS_E5_88,
+     to_Shift_JIS_E5_89, to_Shift_JIS_E5_8A,
+     to_Shift_JIS_E5_8B, to_Shift_JIS_E5_8C,
+     to_Shift_JIS_E5_8D, to_Shift_JIS_E5_8E,
+     to_Shift_JIS_E5_8F, to_Shift_JIS_E5_90,
+     to_Shift_JIS_E5_91, to_Shift_JIS_E5_92,
+     to_Shift_JIS_E5_93, to_Shift_JIS_E5_94,
+     to_Shift_JIS_E5_95, to_Shift_JIS_E5_96,
+     to_Shift_JIS_E5_97, to_Shift_JIS_E5_98,
+     to_Shift_JIS_E5_99, to_Shift_JIS_E5_9A,
+     to_Shift_JIS_E5_9B, to_Shift_JIS_E5_9C,
+     to_Shift_JIS_E5_9D, to_Shift_JIS_E5_9E,
+     to_Shift_JIS_E5_9F, to_Shift_JIS_E5_A0,
+     to_Shift_JIS_E5_A1, to_Shift_JIS_E5_A2,
+     to_Shift_JIS_E5_A3, to_Shift_JIS_E5_A4,
+     to_Shift_JIS_E5_A5, to_Shift_JIS_E5_A6,
+     to_Shift_JIS_E5_A7, to_Shift_JIS_E5_A8,
+     to_Shift_JIS_E5_A9, to_Shift_JIS_E5_AA,
+     to_Shift_JIS_E5_AB, to_Shift_JIS_E5_AC,
+     to_Shift_JIS_E5_AD, to_Shift_JIS_E5_AE,
+     to_Shift_JIS_E5_AF, to_Shift_JIS_E5_B0,
+     to_Shift_JIS_E5_B1, to_Shift_JIS_E5_B2,
+     to_Shift_JIS_E5_B3, to_Shift_JIS_E5_B4,
+     to_Shift_JIS_E5_B5, to_Shift_JIS_E5_B6,
+     to_Shift_JIS_E5_B7, to_Shift_JIS_E5_B8,
+     to_Shift_JIS_E5_B9, to_Shift_JIS_E5_BA,
+     to_Shift_JIS_E5_BB, to_Shift_JIS_E5_BC,
+     to_Shift_JIS_E5_BD, to_Shift_JIS_E5_BE,
+     to_Shift_JIS_E5_BF,
+
+#define to_Shift_JIS_E5 WORDINDEX2INFO(12677)
+    to_Shift_JIS_E3_81_offsets,
+    to_Shift_JIS_E5_infos,
+
+#define to_Shift_JIS_E6_80_infos WORDINDEX2INFO(12679)
+           INVALID,         UNDEF, o2(0x9c,0x83), o2(0x9c,0x89),
+     o2(0x9c,0x81), o2(0x93,0x7b), o2(0x9c,0x86), o2(0x95,0x7c),
+     o2(0x9c,0x80), o2(0x9c,0x85), o2(0x97,0xe5), o2(0x8e,0x76),
+     o2(0x91,0xd3), o2(0x9c,0x7d), o2(0x8b,0x7d), o2(0x9c,0x88),
+     o2(0x90,0xab), o2(0x89,0x85), o2(0x9c,0x82), o2(0x89,0xf6),
+     o2(0x9c,0x87), o2(0x8b,0xaf), o2(0x9c,0x84), o2(0x9c,0x8a),
+
+#define to_Shift_JIS_E6_80 WORDINDEX2INFO(12703)
+    to_Shift_JIS_E6_80_offsets,
+    to_Shift_JIS_E6_80_infos,
+
+#define to_Shift_JIS_E6_81_infos WORDINDEX2INFO(12705)
+           INVALID,         UNDEF, o2(0x9c,0x8c), o2(0x9c,0x96),
+     o2(0x9c,0x94), o2(0x9c,0x91), o2(0x9c,0x90), o2(0x97,0xf6),
+     o2(0x9c,0x92), o2(0x8b,0xb0), o2(0x8d,0x50), o2(0x8f,0x9a),
+     o2(0x9c,0x99), o2(0x9c,0x8b), o2(0x9c,0x8f), o2(0x9c,0x7e),
+     o2(0x89,0xf8), o2(0x9c,0x93), o2(0x9c,0x95), o2(0x92,0x70),
+     o2(0x8d,0xa6), o2(0x89,0xb6), o2(0x9c,0x8d), o2(0x9c,0x98),
+     o2(0x9c,0x97), o2(0x8b,0xb1), o2(0x91,0xa7), o2(0x8a,0x86),
+     o2(0x8c,0x62), o2(0x9c,0x8e),
+
+#define to_Shift_JIS_E6_81 WORDINDEX2INFO(12735)
+    to_Shift_JIS_E6_81_offsets,
+    to_Shift_JIS_E6_81_infos,
+
+#define to_Shift_JIS_E6_82_infos WORDINDEX2INFO(12737)
+           INVALID,         UNDEF, o2(0x9c,0x9a), o2(0x9c,0x9d),
+     o2(0x9c,0x9f), o2(0x8e,0xbb), o2(0x9c,0xa5), o2(0x92,0xee),
+     o2(0x9c,0x9b), o2(0x9c,0xa3), o2(0x89,0xf7), o2(0x9c,0xa1),
+     o2(0x9c,0xa2), o2(0x9c,0x9e), o2(0x9c,0xa0), o2(0x8c,0xe5),
+     o2(0x97,0x49), o2(0x8a,0xb3), o2(0x89,0x78), o2(0x9c,0xa4),
+     o2(0x94,0x59), o2(0x88,0xab), o2(0x94,0xdf), o2(0x9c,0x7b),
+     o2(0x9c,0xaa), o2(0x9c,0xae), o2(0x96,0xe3), o2(0x9c,0xa7),
+     o2(0x93,0x89), o2(0x9c,0xac),
+
+#define to_Shift_JIS_E6_82 WORDINDEX2INFO(12767)
+    to_Shift_JIS_E6_82_offsets,
+    to_Shift_JIS_E6_82_infos,
+
+#define to_Shift_JIS_E6_83_infos WORDINDEX2INFO(12769)
+           INVALID,         UNDEF, o2(0x8f,0xee), o2(0x9c,0xad),
+     o2(0x93,0xd5), o2(0x98,0x66), o2(0x9c,0xa9), o2(0x9c,0xaf),
+     o2(0x8d,0x9b), o2(0x90,0xc9), o2(0x88,0xd2), o2(0x9c,0xa8),
+     o2(0x9c,0xa6), o2(0x91,0x79), o2(0x9c,0x9c), o2(0x8e,0x53),
+     o2(0x91,0xc4), o2(0x9c,0xbb), o2(0x91,0x7a), o2(0x9c,0xb6),
+     o2(0x9c,0xb3), o2(0x9c,0xb4), o2(0x8e,0xe4), o2(0x9c,0xb7),
+     o2(0x9c,0xba),
+
+#define to_Shift_JIS_E6_83 WORDINDEX2INFO(12794)
+    to_Shift_JIS_E6_83_offsets,
+    to_Shift_JIS_E6_83_infos,
+
+#define to_Shift_JIS_E6_84_infos WORDINDEX2INFO(12796)
+           INVALID, o2(0x9c,0xb5), o2(0x8f,0x44),         UNDEF,
+     o2(0x9c,0xb8), o2(0x9c,0xb2), o2(0x96,0xfa), o2(0x96,0xf9),
+     o2(0x9c,0xbc), o2(0x9c,0xbd), o2(0x88,0xd3), o2(0x9c,0xb1),
+     o2(0x8b,0xf0), o2(0x88,0xa4), o2(0x8a,0xb4), o2(0x9c,0xb9),
+     o2(0x9c,0xc1), o2(0x9c,0xc0), o2(0x9c,0xc5), o2(0x9c,0xc6),
+     o2(0x9c,0xc4), o2(0x9c,0xc7), o2(0x9c,0xbf), o2(0x9c,0xc3),
+
+#define to_Shift_JIS_E6_84 WORDINDEX2INFO(12820)
+    to_Shift_JIS_E6_84_offsets,
+    to_Shift_JIS_E6_84_infos,
+
+#define to_Shift_JIS_E6_85_infos WORDINDEX2INFO(12822)
+           INVALID,         UNDEF, o2(0x9c,0xc8), o2(0x9c,0xc9),
+     o2(0x9c,0xbe), o2(0x8e,0x9c), o2(0x9c,0xc2), o2(0x91,0xd4),
+     o2(0x8d,0x51), o2(0x9c,0xb0), o2(0x90,0x54), o2(0x9c,0xd6),
+     o2(0x95,0xe7), o2(0x9c,0xcc), o2(0x9c,0xcd), o2(0x9c,0xce),
+     o2(0x9c,0xd5), o2(0x9c,0xd4), o2(0x96,0x9d), o2(0x8a,0xb5),
+     o2(0x9c,0xd2), o2(0x8c,0x64), o2(0x8a,0x53), o2(0x9c,0xcf),
+     o2(0x97,0xb6), o2(0x9c,0xd1), o2(0x88,0xd4), o2(0x9c,0xd3),
+     o2(0x9c,0xca), o2(0x9c,0xd0), o2(0x9c,0xd7), o2(0x8c,0x63),
+     o2(0x9c,0xcb), o2(0x97,0x7c),
+
+#define to_Shift_JIS_E6_85 WORDINDEX2INFO(12856)
+    to_Shift_JIS_E6_85_offsets,
+    to_Shift_JIS_E6_85_infos,
+
+#define to_Shift_JIS_E6_86_infos WORDINDEX2INFO(12858)
+           INVALID,         UNDEF, o2(0x97,0x4a), o2(0x9c,0xda),
+     o2(0x9c,0xde), o2(0x91,0x9e), o2(0x97,0xf7), o2(0x9c,0xdf),
+     o2(0x9c,0xdc), o2(0x9c,0xd9), o2(0x9c,0xd8), o2(0x9c,0xdd),
+     o2(0x95,0xae), o2(0x93,0xb2), o2(0x8c,0x65), o2(0x9c,0xe0),
+     o2(0x9c,0xdb), o2(0x9c,0xe1), o2(0x8c,0x9b), o2(0x89,0xaf),
+     o2(0x9c,0xe9), o2(0x8a,0xb6),
+
+#define to_Shift_JIS_E6_86 WORDINDEX2INFO(12880)
+    to_Shift_JIS_E6_86_offsets,
+    to_Shift_JIS_E6_86_infos,
+
+#define to_Shift_JIS_E6_87_infos WORDINDEX2INFO(12882)
+           INVALID,         UNDEF, o2(0x9c,0xe7), o2(0x9c,0xe8),
+     o2(0x8d,0xa7), o2(0x9c,0xe6), o2(0x9c,0xe4), o2(0x9c,0xe3),
+     o2(0x9c,0xea), o2(0x9c,0xe2), o2(0x9c,0xec), o2(0x89,0xf9),
+     o2(0x9c,0xee), o2(0x9c,0xed), o2(0x92,0xa6), o2(0x9c,0xf1),
+     o2(0x9c,0xef), o2(0x9c,0xe5), o2(0x8c,0x9c), o2(0x9c,0xf0),
+     o2(0x9c,0xf4), o2(0x9c,0xf3), o2(0x9c,0xf5), o2(0x9c,0xf2),
+
+#define to_Shift_JIS_E6_87 WORDINDEX2INFO(12906)
+    to_Shift_JIS_E6_87_offsets,
+    to_Shift_JIS_E6_87_infos,
+
+#define to_Shift_JIS_E6_88_infos WORDINDEX2INFO(12908)
+           INVALID, o2(0x9c,0xf6),         UNDEF, o2(0x9c,0xf7),
+     o2(0x9c,0xf8), o2(0x95,0xe8), o2(0x9c,0xfa), o2(0x9c,0xf9),
+     o2(0x8f,0x5e), o2(0x90,0xac), o2(0x89,0xe4), o2(0x89,0xfa),
+     o2(0x9c,0xfb), o2(0x88,0xbd), o2(0x90,0xca), o2(0x9c,0xfc),
+     o2(0xe6,0xc1), o2(0x9d,0x40), o2(0x8c,0x81), o2(0x9d,0x41),
+     o2(0x90,0xed), o2(0x9d,0x42), o2(0x9d,0x43), o2(0x8b,0x59),
+     o2(0x9d,0x44), o2(0x9d,0x45), o2(0x9d,0x46), o2(0x91,0xd5),
+     o2(0x8c,0xcb), o2(0x96,0xdf), o2(0x96,0x5b),
+
+#define to_Shift_JIS_E6_88 WORDINDEX2INFO(12939)
+    to_Shift_JIS_E6_88_offsets,
+    to_Shift_JIS_E6_88_infos,
+
+#define to_Shift_JIS_E6_89_infos WORDINDEX2INFO(12941)
+           INVALID, o2(0x8f,0x8a), o2(0x9d,0x47),         UNDEF,
+     o2(0x90,0xee), o2(0xe7,0xbb), o2(0x94,0xe0), o2(0x8e,0xe8),
+     o2(0x8d,0xcb), o2(0x9d,0x48), o2(0x91,0xc5), o2(0x95,0xa5),
+     o2(0x91,0xef), o2(0x9d,0x4b), o2(0x9d,0x49), o2(0x9d,0x4c),
+     o2(0x9d,0x4a), o2(0x9d,0x4d), o2(0x95,0xaf), o2(0x88,0xb5),
+     o2(0x95,0x7d), o2(0x94,0xe1), o2(0x9d,0x4e), o2(0x9d,0x51),
+     o2(0x8f,0xb3),
+
+#define to_Shift_JIS_E6_89 WORDINDEX2INFO(12966)
+    to_Shift_JIS_E6_89_offsets,
+    to_Shift_JIS_E6_89_infos,
+
+#define to_Shift_JIS_E6_8A_infos WORDINDEX2INFO(12968)
+           INVALID, o2(0x8b,0x5a),         UNDEF, o2(0x9d,0x4f),
+     o2(0x9d,0x56), o2(0x8f,0xb4), o2(0x9d,0x50), o2(0x94,0x63),
+     o2(0x97,0x7d), o2(0x9d,0x52), o2(0x9d,0x53), o2(0x9d,0x57),
+     o2(0x93,0x8a), o2(0x9d,0x54), o2(0x8d,0x52), o2(0x90,0xdc),
+     o2(0x9d,0x65), o2(0x94,0xb2), o2(0x91,0xf0), o2(0x94,0xe2),
+     o2(0x9d,0xab), o2(0x95,0xf8), o2(0x92,0xef), o2(0x96,0x95),
+     o2(0x9d,0x5a), o2(0x89,0x9f), o2(0x92,0x8a),
+
+#define to_Shift_JIS_E6_8A WORDINDEX2INFO(12995)
+    to_Shift_JIS_E6_8A_offsets,
+    to_Shift_JIS_E6_8A_infos,
+
+#define to_Shift_JIS_E6_8B_infos WORDINDEX2INFO(12997)
+           INVALID,         UNDEF, o2(0x9d,0x63), o2(0x92,0x53),
+     o2(0x9d,0x5d), o2(0x9d,0x64), o2(0x9d,0x5f), o2(0x9d,0x66),
+     o2(0x9d,0x62), o2(0x9d,0x61), o2(0x94,0x8f), o2(0x9d,0x5b),
+     o2(0x89,0xfb), o2(0x9d,0x59), o2(0x8b,0x91), o2(0x91,0xf1),
+     o2(0x9d,0x55), o2(0x9d,0x58), o2(0x8d,0x53), o2(0x90,0xd9),
+     o2(0x8f,0xb5), o2(0x9d,0x60), o2(0x94,0x71), o2(0x8b,0x92),
+     o2(0x8a,0x67), o2(0x8a,0x87), o2(0x90,0x40), o2(0x9d,0x68),
+     o2(0x9d,0x6d), o2(0x9d,0x69), o2(0x8c,0x9d), o2(0x9d,0x6e),
+     o2(0x8e,0x41), o2(0x8d,0x89), o2(0x8f,0x45), o2(0x9d,0x5c),
+
+#define to_Shift_JIS_E6_8B WORDINDEX2INFO(13033)
+    to_Shift_JIS_E6_8B_offsets,
+    to_Shift_JIS_E6_8B_infos,
+
+#define to_Shift_JIS_E6_8C_infos WORDINDEX2INFO(13035)
+           INVALID,         UNDEF, o2(0x8e,0x9d), o2(0x9d,0x6b),
+     o2(0x8e,0x77), o2(0x9d,0x6c), o2(0x88,0xc2), o2(0x9d,0x67),
+     o2(0x92,0xa7), o2(0x8b,0x93), o2(0x8b,0xb2), o2(0x9d,0x6a),
+     o2(0x88,0xa5), o2(0x8d,0xc1), o2(0x90,0x55), o2(0x92,0xf0),
+     o2(0x94,0xd2), o2(0x9d,0x70), o2(0x91,0x7d),
+
+#define to_Shift_JIS_E6_8C WORDINDEX2INFO(13054)
+    to_Shift_JIS_E6_8C_offsets,
+    to_Shift_JIS_E6_8C_infos,
+
+#define to_Shift_JIS_E6_8D_infos WORDINDEX2INFO(13056)
+           INVALID,         UNDEF, o2(0x91,0xa8), o2(0x8e,0x4a),
+     o2(0x9d,0x71), o2(0x9d,0x73), o2(0x9d,0x6f), o2(0x95,0xdf),
+     o2(0x92,0xbb), o2(0x91,0x7b), o2(0x95,0xf9), o2(0x8e,0xcc),
+     o2(0x9d,0x80), o2(0x9d,0x7e), o2(0x90,0x98), o2(0x8c,0x9e),
+     o2(0x9d,0x78), o2(0x8f,0xb7), o2(0x93,0xe6), o2(0x94,0x50),
+
+#define to_Shift_JIS_E6_8D WORDINDEX2INFO(13076)
+    to_Shift_JIS_E6_8D_offsets,
+    to_Shift_JIS_E6_8D_infos,
+
+#define to_Shift_JIS_E6_8E_infos WORDINDEX2INFO(13078)
+           INVALID, o2(0x9d,0x76),         UNDEF, o2(0x91,0x7c),
+     o2(0x8e,0xf6), o2(0x9d,0x7b), o2(0x8f,0xb6), o2(0x9d,0x75),
+     o2(0x9d,0x7a), o2(0x94,0x72), o2(0x9d,0x74), o2(0x8c,0x40),
+     o2(0x8a,0x7c), o2(0x9d,0x7c), o2(0x97,0xa9), o2(0x8d,0xcc),
+     o2(0x92,0x54), o2(0x9d,0x79), o2(0x90,0xda), o2(0x8d,0x54),
+     o2(0x90,0x84), o2(0x89,0x86), o2(0x91,0x5b), o2(0x9d,0x77),
+     o2(0x8b,0x64), o2(0x8c,0x66), o2(0x92,0xcd), o2(0x9d,0x7d),
+     o2(0x91,0x7e), o2(0x9d,0x81),
+
+#define to_Shift_JIS_E6_8E WORDINDEX2INFO(13108)
+    to_Shift_JIS_E6_8E_offsets,
+    to_Shift_JIS_E6_8E_infos,
+
+#define to_Shift_JIS_E6_8F_infos WORDINDEX2INFO(13110)
+           INVALID, o2(0x9d,0x83),         UNDEF, o2(0x91,0xb5),
+     o2(0x9d,0x89), o2(0x9d,0x84), o2(0x9d,0x86), o2(0x95,0x60),
+     o2(0x92,0xf1), o2(0x9d,0x87), o2(0x97,0x4b), o2(0x97,0x67),
+     o2(0x8a,0xb7), o2(0x88,0xac), o2(0x9d,0x85), o2(0x9d,0x82),
+     o2(0x8a,0xf6), o2(0x89,0x87), o2(0x9d,0x88), o2(0x97,0x68),
+
+#define to_Shift_JIS_E6_8F WORDINDEX2INFO(13130)
+    to_Shift_JIS_E6_8F_offsets,
+    to_Shift_JIS_E6_8F_infos,
+
+#define to_Shift_JIS_E6_90_infos WORDINDEX2INFO(13132)
+           INVALID,         UNDEF, o2(0x9d,0x8c), o2(0x91,0xb9),
+     o2(0x9d,0x93), o2(0x9d,0x8d), o2(0x9d,0x8a), o2(0x9d,0x91),
+     o2(0x9d,0x72), o2(0x9d,0x8e), o2(0x9d,0x92), o2(0x94,0xc0),
+     o2(0x93,0x8b), o2(0x9d,0x8b), o2(0x9d,0x8f), o2(0x8c,0x67),
+     o2(0x8d,0xef),
+
+#define to_Shift_JIS_E6_90 WORDINDEX2INFO(13149)
+    to_Shift_JIS_E6_90_offsets,
+    to_Shift_JIS_E6_90_infos,
+
+#define to_Shift_JIS_E6_91_infos WORDINDEX2INFO(13151)
+           INVALID,         UNDEF, o2(0x90,0xdb), o2(0x9d,0x97),
+     o2(0x93,0x45), o2(0x9d,0x94), o2(0x96,0x80), o2(0x9d,0x95),
+     o2(0x9d,0x96), o2(0x96,0xcc), o2(0x90,0xa0),
+
+#define to_Shift_JIS_E6_91 WORDINDEX2INFO(13162)
+    to_Shift_JIS_E6_91_offsets,
+    to_Shift_JIS_E6_91_infos,
+
+#define to_Shift_JIS_E6_92_infos WORDINDEX2INFO(13164)
+           INVALID,         UNDEF, o2(0x8c,0x82), o2(0x9d,0x9d),
+     o2(0x8e,0x54), o2(0x9d,0x9a), o2(0x9d,0x99), o2(0x94,0x51),
+     o2(0x93,0xb3), o2(0x93,0x50), o2(0x9d,0x9b), o2(0x9d,0x9c),
+     o2(0x95,0x8f), o2(0x94,0x64), o2(0x8e,0x42), o2(0x90,0xef),
+     o2(0x96,0x6f), o2(0x8a,0x68), o2(0x9d,0xa3), o2(0x9d,0x9e),
+
+#define to_Shift_JIS_E6_92 WORDINDEX2INFO(13184)
+    to_Shift_JIS_E6_92_offsets,
+    to_Shift_JIS_E6_92_infos,
+
+#define to_Shift_JIS_E6_93_infos WORDINDEX2INFO(13186)
+           INVALID,         UNDEF, o2(0x97,0x69), o2(0x9d,0xa5),
+     o2(0x9d,0xa1), o2(0x9d,0xa2), o2(0x91,0x80), o2(0x9d,0xa0),
+     o2(0x9d,0x5e), o2(0x9d,0xa4), o2(0x9d,0x9f), o2(0x9d,0xa9),
+     o2(0x9d,0xaa), o2(0x93,0x46), o2(0x9d,0xac), o2(0x8e,0x43),
+     o2(0x9d,0xa7), o2(0x8b,0x5b), o2(0x9d,0xad), o2(0x9d,0xa6),
+     o2(0x9d,0xb1), o2(0x9d,0xb0), o2(0x9d,0xaf), o2(0x9d,0xb2),
+     o2(0x9d,0xb4), o2(0x8f,0xef),
+
+#define to_Shift_JIS_E6_93 WORDINDEX2INFO(13212)
+    to_Shift_JIS_E6_93_offsets,
+    to_Shift_JIS_E6_93_infos,
+
+#define to_Shift_JIS_E6_94_infos WORDINDEX2INFO(13214)
+           INVALID, o2(0x9d,0xb3),         UNDEF, o2(0x9d,0xb7),
+     o2(0x9d,0xb5), o2(0x9d,0xb6), o2(0x9d,0x90), o2(0x9d,0xb9),
+     o2(0x9d,0xb8), o2(0x9d,0x98), o2(0x9d,0xba), o2(0x9d,0xae),
+     o2(0x8e,0x78), o2(0x9d,0xbb), o2(0x9d,0xbc), o2(0x9d,0xbe),
+     o2(0x9d,0xbd), o2(0x9d,0xbf), o2(0x89,0xfc), o2(0x8d,0x55),
+     o2(0x95,0xfa), o2(0x90,0xad),
+
+#define to_Shift_JIS_E6_94 WORDINDEX2INFO(13236)
+    to_Shift_JIS_E6_94_offsets,
+    to_Shift_JIS_E6_94_infos,
+
+#define to_Shift_JIS_E6_95_infos WORDINDEX2INFO(13238)
+           INVALID,         UNDEF, o2(0x8c,0xcc), o2(0x9d,0xc1),
+     o2(0x9d,0xc4), o2(0x95,0x71), o2(0x8b,0x7e), o2(0x9d,0xc3),
+     o2(0x9d,0xc2), o2(0x94,0x73), o2(0x9d,0xc5), o2(0x8b,0xb3),
+     o2(0x9d,0xc7), o2(0x9d,0xc6), o2(0x8a,0xb8), o2(0x8e,0x55),
+     o2(0x93,0xd6), o2(0x8c,0x68), o2(0x90,0x94), o2(0x9d,0xc8),
+     o2(0x90,0xae), o2(0x93,0x47), o2(0x95,0x7e), o2(0x9d,0xc9),
+
+#define to_Shift_JIS_E6_95 WORDINDEX2INFO(13262)
+    to_Shift_JIS_E6_95_offsets,
+    to_Shift_JIS_E6_95_infos,
+
+#define to_Shift_JIS_E6_96_infos WORDINDEX2INFO(13264)
+           INVALID,         UNDEF, o2(0x9d,0xca), o2(0x9d,0xcb),
+     o2(0x95,0xb6), o2(0x9b,0x7c), o2(0x90,0xc4), o2(0x95,0x6b),
+     o2(0x8d,0xd6), o2(0x94,0xe3), o2(0x94,0xc1), o2(0x93,0x6c),
+     o2(0x97,0xbf), o2(0x9d,0xcd), o2(0x8e,0xce), o2(0x9d,0xce),
+     o2(0x88,0xb4), o2(0x8b,0xd2), o2(0x90,0xcb), o2(0x95,0x80),
+     o2(0x9d,0xcf), o2(0x8e,0x61), o2(0x92,0x66), o2(0x8e,0x7a),
+     o2(0x90,0x56), o2(0x9d,0xd0), o2(0x95,0xfb), o2(0x89,0x97),
+     o2(0x8e,0x7b),
+
+#define to_Shift_JIS_E6_96 WORDINDEX2INFO(13293)
+    to_Shift_JIS_E6_96_offsets,
+    to_Shift_JIS_E6_96_infos,
+
+#define to_Shift_JIS_E6_97_infos WORDINDEX2INFO(13295)
+           INVALID,         UNDEF, o2(0x9d,0xd3), o2(0x9d,0xd1),
+     o2(0x9d,0xd4), o2(0x97,0xb7), o2(0x9d,0xd2), o2(0x90,0xf9),
+     o2(0x9d,0xd5), o2(0x91,0xb0), o2(0x9d,0xd6), o2(0x8a,0xf8),
+     o2(0x9d,0xd8), o2(0x9d,0xd7), o2(0x9d,0xd9), o2(0x9d,0xda),
+     o2(0x8a,0xf9), o2(0x93,0xfa), o2(0x92,0x55), o2(0x8b,0x8c),
+     o2(0x8e,0x7c), o2(0x91,0x81), o2(0x8f,0x7b), o2(0x88,0xae),
+     o2(0x9d,0xdb), o2(0x89,0xa0), o2(0x9d,0xdf),
+
+#define to_Shift_JIS_E6_97 WORDINDEX2INFO(13322)
+    to_Shift_JIS_E6_97_offsets,
+    to_Shift_JIS_E6_97_infos,
+
+#define to_Shift_JIS_E6_98_infos WORDINDEX2INFO(13324)
+           INVALID,         UNDEF, o2(0x8d,0x56), o2(0x9d,0xde),
+     o2(0x8d,0xa9), o2(0x8f,0xb8), o2(0x9d,0xdd), o2(0x8f,0xb9),
+     o2(0x96,0xbe), o2(0x8d,0xa8), o2(0x88,0xd5), o2(0x90,0xcc),
+     o2(0x9d,0xe4), o2(0x90,0xaf), o2(0x89,0x66), o2(0x8f,0x74),
+     o2(0x96,0x86), o2(0x8d,0xf0), o2(0x8f,0xba), o2(0x90,0xa5),
+     o2(0x9d,0xe3), o2(0x9d,0xe1), o2(0x9d,0xe2), o2(0x92,0x8b),
+     o2(0x9e,0x45),
+
+#define to_Shift_JIS_E6_98 WORDINDEX2INFO(13349)
+    to_Shift_JIS_E6_98_offsets,
+    to_Shift_JIS_E6_98_infos,
+
+#define to_Shift_JIS_E6_99_infos WORDINDEX2INFO(13351)
+           INVALID,         UNDEF, o2(0x9d,0xe8), o2(0x8e,0x9e),
+     o2(0x8d,0x57), o2(0x9d,0xe6), o2(0x9d,0xe7), o2(0x90,0x57),
+     o2(0x9d,0xe5), o2(0x8e,0x4e), o2(0x9d,0xea), o2(0x9d,0xe9),
+     o2(0x9d,0xee), o2(0x9d,0xef), o2(0x9d,0xeb), o2(0x8a,0x41),
+     o2(0x9d,0xec), o2(0x9d,0xed), o2(0x94,0xd3), o2(0x95,0x81),
+     o2(0x8c,0x69), o2(0x9d,0xf0), o2(0x90,0xb0), o2(0x8f,0xbb),
+     o2(0x92,0x71),
+
+#define to_Shift_JIS_E6_99 WORDINDEX2INFO(13376)
+    to_Shift_JIS_E6_99_offsets,
+    to_Shift_JIS_E6_99_infos,
+
+#define to_Shift_JIS_E6_9A_infos WORDINDEX2INFO(13378)
+           INVALID,         UNDEF, o2(0x8b,0xc5), o2(0x9d,0xf1),
+     o2(0x9d,0xf5), o2(0x89,0xc9), o2(0x9d,0xf2), o2(0x9d,0xf4),
+     o2(0x9d,0xf3), o2(0x8f,0x8b), o2(0x92,0x67), o2(0x88,0xc3),
+     o2(0x9d,0xf6), o2(0x9d,0xf7), o2(0x92,0xa8), o2(0x97,0xef),
+     o2(0x8e,0x62), o2(0x95,0xe9), o2(0x96,0x5c), o2(0x9e,0x41),
+     o2(0x9d,0xf9), o2(0x9d,0xfc), o2(0x9d,0xfb),
+
+#define to_Shift_JIS_E6_9A WORDINDEX2INFO(13401)
+    to_Shift_JIS_E6_9A_offsets,
+    to_Shift_JIS_E6_9A_infos,
+
+#define to_Shift_JIS_E6_9B_infos WORDINDEX2INFO(13403)
+           INVALID,         UNDEF, o2(0x9d,0xf8), o2(0x9e,0x40),
+     o2(0x93,0xdc), o2(0x9d,0xfa), o2(0x9e,0x42), o2(0x8f,0x8c),
+     o2(0x9e,0x43), o2(0x97,0x6a), o2(0x94,0x98), o2(0x9e,0x44),
+     o2(0x9e,0x46), o2(0x9e,0x47), o2(0x9e,0x48), o2(0x8b,0xc8),
+     o2(0x89,0x67), o2(0x8d,0x58), o2(0x9e,0x49), o2(0x9e,0x4a),
+     o2(0x8f,0x91), o2(0x91,0x82), o2(0x99,0xd6), o2(0x91,0x5d),
+     o2(0x91,0x5c), o2(0x91,0xd6),
+
+#define to_Shift_JIS_E6_9B WORDINDEX2INFO(13429)
+    to_Shift_JIS_E6_9B_offsets,
+    to_Shift_JIS_E6_9B_infos,
+
+#define to_Shift_JIS_E6_9C_infos WORDINDEX2INFO(13431)
+           INVALID, o2(0x8d,0xc5),         UNDEF, o2(0x98,0xf0),
+     o2(0x8c,0x8e), o2(0x97,0x4c), o2(0x95,0xfc), o2(0x95,0x9e),
+     o2(0x9e,0x4b), o2(0x8d,0xf1), o2(0x92,0xbd), o2(0x9e,0x4c),
+     o2(0x98,0x4e), o2(0x96,0x5d), o2(0x92,0xa9), o2(0x9e,0x4d),
+     o2(0x8a,0xfa), o2(0x9e,0x4e), o2(0x9e,0x4f), o2(0x96,0xd8),
+     o2(0x96,0xa2), o2(0x96,0x96), o2(0x96,0x7b), o2(0x8e,0x44),
+     o2(0x9e,0x51), o2(0x8e,0xe9), o2(0x96,0x70), o2(0x9e,0x53),
+     o2(0x9e,0x56), o2(0x9e,0x55), o2(0x8a,0xf7), o2(0x8b,0x80),
+     o2(0x9e,0x52),
+
+#define to_Shift_JIS_E6_9C WORDINDEX2INFO(13464)
+    to_Shift_JIS_E6_9C_offsets,
+    to_Shift_JIS_E6_9C_infos,
+
+#define to_Shift_JIS_E6_9D_infos WORDINDEX2INFO(13466)
+           INVALID,         UNDEF, o2(0x9e,0x54), o2(0x9e,0x57),
+     o2(0x90,0x99), o2(0x97,0x9b), o2(0x88,0xc7), o2(0x8d,0xde),
+     o2(0x91,0xba), o2(0x8e,0xdb), o2(0x8f,0xf1), o2(0x9e,0x5a),
+     o2(0x93,0x6d), o2(0x9e,0x58), o2(0x91,0xa9), o2(0x9e,0x59),
+     o2(0x8f,0xf0), o2(0x96,0xdb), o2(0x9e,0x5b), o2(0x9e,0x5c),
+     o2(0x97,0x88), o2(0x9e,0x61), o2(0x8d,0x59), o2(0x94,0x74),
+     o2(0x9e,0x5e), o2(0x93,0x8c), o2(0x9d,0xdc), o2(0x9d,0xe0),
+     o2(0x8b,0x6e), o2(0x94,0x66), o2(0x9e,0x60), o2(0x8f,0xbc),
+     o2(0x94,0xc2),
+
+#define to_Shift_JIS_E6_9D WORDINDEX2INFO(13499)
+    to_Shift_JIS_E6_9D_offsets,
+    to_Shift_JIS_E6_9D_infos,
+
+#define to_Shift_JIS_E6_9E_infos WORDINDEX2INFO(13501)
+           INVALID,         UNDEF, o2(0x9e,0x66), o2(0x94,0xf8),
+     o2(0x9e,0x5d), o2(0x9e,0x63), o2(0x9e,0x62), o2(0x90,0xcd),
+     o2(0x96,0x8d), o2(0x97,0xd1), o2(0x96,0x87), o2(0x89,0xca),
+     o2(0x8e,0x7d), o2(0x98,0x67), o2(0x9e,0x65), o2(0x90,0x95),
+     o2(0x9e,0x64), o2(0x9e,0x5f), o2(0x8c,0xcd), o2(0x9e,0x6b),
+     o2(0x9e,0x69), o2(0x89,0xcb), o2(0x9e,0x67), o2(0x9e,0x6d),
+     o2(0x9e,0x73),
+
+#define to_Shift_JIS_E6_9E WORDINDEX2INFO(13526)
+    to_Shift_JIS_E6_9E_offsets,
+    to_Shift_JIS_E6_9E_infos,
+
+#define to_Shift_JIS_E6_9F_infos WORDINDEX2INFO(13528)
+           INVALID,         UNDEF, o2(0x91,0xc6), o2(0x95,0xbf),
+     o2(0x9e,0x75), o2(0x95,0x41), o2(0x9e,0x74), o2(0x94,0x90),
+     o2(0x96,0x5e), o2(0x8a,0xb9), o2(0x90,0xf5), o2(0x8f,0x5f),
+     o2(0x92,0xd1), o2(0x97,0x4d), o2(0x9e,0x70), o2(0x9e,0x6f),
+     o2(0x9e,0x71), o2(0x9e,0x6e), o2(0x9e,0x76), o2(0x9e,0x6c),
+     o2(0x9e,0x6a), o2(0x9e,0x72), o2(0x9e,0x68), o2(0x92,0x8c),
+     o2(0x96,0xf6), o2(0x8e,0xc4), o2(0x8d,0xf2), o2(0x8d,0xb8),
+     o2(0x96,0x8f), o2(0x8a,0x60),
+
+#define to_Shift_JIS_E6_9F WORDINDEX2INFO(13558)
+    to_Shift_JIS_E6_9F_offsets,
+    to_Shift_JIS_E6_9F_infos,
+
+#define to_Shift_JIS_E6_A0_infos WORDINDEX2INFO(13560)
+           INVALID,         UNDEF, o2(0x92,0xcc), o2(0x93,0xc8),
+     o2(0x89,0x68), o2(0x90,0xf0), o2(0x90,0xb2), o2(0x8c,0x49),
+     o2(0x9e,0x78), o2(0x8d,0x5a), o2(0x8a,0x9c), o2(0x9e,0x7a),
+     o2(0x8a,0x94), o2(0x9e,0x81), o2(0x9e,0x7d), o2(0x90,0xf1),
+     o2(0x8a,0x6a), o2(0x8d,0xaa), o2(0x8a,0x69), o2(0x8d,0xcd),
+
+#define to_Shift_JIS_E6_A0 WORDINDEX2INFO(13580)
+    to_Shift_JIS_E6_A0_offsets,
+    to_Shift_JIS_E6_A0_infos,
+
+#define to_Shift_JIS_E6_A1_infos WORDINDEX2INFO(13582)
+           INVALID, o2(0x9e,0x7b), o2(0x8c,0x85), o2(0x8c,0x6a),
+     o2(0x93,0x8d),         UNDEF, o2(0x9e,0x79), o2(0x88,0xc4),
+     o2(0x9e,0x7c), o2(0x9e,0x7e), o2(0x8b,0xcb), o2(0x8c,0x4b),
+     o2(0x8a,0xba), o2(0x8b,0x6a), o2(0x9e,0x82), o2(0x8d,0xf7),
+     o2(0x96,0x91), o2(0x8e,0x56), o2(0x9e,0x83), o2(0x95,0x4f),
+     o2(0x9e,0x8f), o2(0x89,0xb1), o2(0x9e,0x84), o2(0x9e,0x95),
+     o2(0x9e,0x85),
+
+#define to_Shift_JIS_E6_A1 WORDINDEX2INFO(13607)
+    to_Shift_JIS_E6_A1_offsets,
+    to_Shift_JIS_E6_A1_infos,
+
+#define to_Shift_JIS_E6_A2_infos WORDINDEX2INFO(13609)
+           INVALID,         UNDEF, o2(0x97,0xc0), o2(0x9e,0x8c),
+     o2(0x94,0x7e), o2(0x9e,0x94), o2(0x9e,0x87), o2(0x88,0xb2),
+     o2(0x9e,0x89), o2(0x8d,0x5b), o2(0x9e,0x8b), o2(0x9e,0x8a),
+     o2(0x9e,0x86), o2(0x9e,0x91), o2(0x8f,0xbd), o2(0x9a,0xeb),
+     o2(0x8c,0xe6), o2(0x97,0x9c), o2(0x9e,0x88), o2(0x92,0xf2),
+     o2(0x8a,0x42), o2(0x8d,0xab), o2(0x9e,0x80), o2(0x9e,0x90),
+     o2(0x8a,0x81), o2(0x9e,0x8e), o2(0x9e,0x92), o2(0x93,0x8e),
+
+#define to_Shift_JIS_E6_A2 WORDINDEX2INFO(13637)
+    to_Shift_JIS_E6_A2_offsets,
+    to_Shift_JIS_E6_A2_infos,
+
+#define to_Shift_JIS_E6_A3_infos WORDINDEX2INFO(13639)
+           INVALID,         UNDEF, o2(0x8a,0xfc), o2(0x9e,0xb0),
+     o2(0x96,0xc7), o2(0x9e,0x97), o2(0x8a,0xfb), o2(0x9e,0x9e),
+     o2(0x96,0x5f), o2(0x9e,0x9f), o2(0x9e,0xa1), o2(0x9e,0xa5),
+     o2(0x9e,0x99), o2(0x92,0x49), o2(0x93,0x8f), o2(0x9e,0xa9),
+     o2(0x9e,0x9c), o2(0x9e,0xa6), o2(0x9e,0xa0), o2(0x90,0x58),
+     o2(0x9e,0xaa), o2(0x90,0xb1), o2(0x9e,0xa8), o2(0x8a,0xbb),
+
+#define to_Shift_JIS_E6_A3 WORDINDEX2INFO(13663)
+    to_Shift_JIS_E6_A3_offsets,
+    to_Shift_JIS_E6_A3_infos,
+
+#define to_Shift_JIS_E6_A4_infos WORDINDEX2INFO(13665)
+           INVALID, o2(0x98,0x6f), o2(0x9e,0x96),         UNDEF,
+     o2(0x9e,0xa4), o2(0x88,0xd6), o2(0x9e,0x98), o2(0x96,0xb8),
+     o2(0x9e,0x9d), o2(0x90,0x41), o2(0x92,0xc5), o2(0x9e,0x93),
+     o2(0x9e,0xa3), o2(0x90,0x9a), o2(0x9e,0xad), o2(0x8a,0x91),
+     o2(0x8c,0x9f), o2(0x9e,0xaf), o2(0x9e,0x9a), o2(0x9e,0xae),
+     o2(0x9e,0xa7), o2(0x9e,0x9b), o2(0x9e,0xab), o2(0x9e,0xac),
+     o2(0x9e,0xbd), o2(0x93,0xcc), o2(0x9e,0xa2), o2(0x9e,0xb9),
+     o2(0x9e,0xbb), o2(0x92,0xd6),
+
+#define to_Shift_JIS_E6_A4 WORDINDEX2INFO(13695)
+    to_Shift_JIS_E6_A4_offsets,
+    to_Shift_JIS_E6_A4_infos,
+
+#define to_Shift_JIS_E6_A5_infos WORDINDEX2INFO(13697)
+           INVALID,         UNDEF, o2(0x97,0x6b), o2(0x95,0x96),
+     o2(0x9e,0xb6), o2(0x91,0xc8), o2(0x9e,0xbc), o2(0x91,0x5e),
+     o2(0x9e,0xb3), o2(0x9e,0xc0), o2(0x9e,0xbf), o2(0x93,0xed),
+     o2(0x9e,0xbe), o2(0x93,0xe8), o2(0x9e,0xc2), o2(0x9e,0xb5),
+     o2(0x8b,0xc6), o2(0x9e,0xb8), o2(0x8f,0x7c), o2(0x94,0x80),
+     o2(0x9e,0xba), o2(0x8b,0xc9), o2(0x9e,0xb2), o2(0x9e,0xb4),
+     o2(0x9e,0xb1), o2(0x98,0x4f), o2(0x8a,0x79), o2(0x9e,0xb7),
+
+#define to_Shift_JIS_E6_A5 WORDINDEX2INFO(13725)
+    to_Shift_JIS_E6_A5_offsets,
+    to_Shift_JIS_E6_A5_infos,
+
+#define to_Shift_JIS_E6_A6_infos WORDINDEX2INFO(13727)
+           INVALID,         UNDEF, o2(0x9e,0xc1), o2(0x8a,0x54),
+     o2(0x8d,0xe5), o2(0x89,0x7c), o2(0x9e,0xd2), o2(0x98,0x50),
+     o2(0x9e,0xd5), o2(0x90,0x59), o2(0x9e,0xd4), o2(0x9e,0xd3),
+     o2(0x9e,0xd0), o2(0x9e,0xc4), o2(0x9e,0xe1), o2(0x9e,0xc3),
+     o2(0x9e,0xd6), o2(0x9e,0xce), o2(0x9e,0xc9), o2(0x9e,0xc6),
+
+#define to_Shift_JIS_E6_A6 WORDINDEX2INFO(13747)
+    to_Shift_JIS_E6_A6_offsets,
+    to_Shift_JIS_E6_A6_infos,
+
+#define to_Shift_JIS_E6_A7_infos WORDINDEX2INFO(13749)
+           INVALID,         UNDEF, o2(0x9e,0xc7), o2(0x9e,0xcf),
+     o2(0xea,0xa0), o2(0x9e,0xcc), o2(0x8d,0x5c), o2(0x92,0xc6),
+     o2(0x91,0x84), o2(0x9e,0xca), o2(0x9e,0xc5), o2(0x9e,0xc8),
+     o2(0x97,0x6c), o2(0x96,0x8a), o2(0x9e,0xcd), o2(0x9e,0xd7),
+     o2(0x9e,0xdf), o2(0x9e,0xd8), o2(0x9e,0xe5), o2(0x9e,0xe3),
+     o2(0x9e,0xde), o2(0x9e,0xdd), o2(0x92,0xce), o2(0x91,0x85),
+     o2(0x9e,0xdb),
+
+#define to_Shift_JIS_E6_A7 WORDINDEX2INFO(13774)
+    to_Shift_JIS_E6_A7_offsets,
+    to_Shift_JIS_E6_A7_infos,
+
+#define to_Shift_JIS_E6_A8_infos WORDINDEX2INFO(13776)
+           INVALID,         UNDEF, o2(0x9e,0xd9), o2(0x9e,0xe0),
+     o2(0x9e,0xe6), o2(0x94,0xf3), o2(0x9e,0xec), o2(0x9e,0xe7),
+     o2(0x9e,0xea), o2(0x9e,0xe4), o2(0x92,0x94), o2(0x95,0x57),
+     o2(0x9e,0xda), o2(0x9e,0xe2), o2(0x8f,0xbe), o2(0x96,0xcd),
+     o2(0x9e,0xf6), o2(0x9e,0xe9), o2(0x8c,0xa0), o2(0x89,0xa1),
+     o2(0x8a,0x7e), o2(0x9e,0xd1), o2(0x8f,0xbf), o2(0x9e,0xee),
+     o2(0x9e,0xf5), o2(0x8e,0xf7), o2(0x8a,0x92), o2(0x92,0x4d),
+
+#define to_Shift_JIS_E6_A8 WORDINDEX2INFO(13804)
+    to_Shift_JIS_E6_A8_offsets,
+    to_Shift_JIS_E6_A8_infos,
+
+#define to_Shift_JIS_E6_A9_infos WORDINDEX2INFO(13806)
+           INVALID,         UNDEF, o2(0x9e,0xeb), o2(0x9e,0xf0),
+     o2(0x9e,0xf4), o2(0x8b,0xb4), o2(0x8b,0x6b), o2(0x9e,0xf2),
+     o2(0x8b,0x40), o2(0x93,0xc9), o2(0x9e,0xf1), o2(0x9e,0xf3),
+     o2(0x9e,0xed), o2(0x9e,0xef), o2(0x8a,0x80),
+
+#define to_Shift_JIS_E6_A9 WORDINDEX2INFO(13821)
+    to_Shift_JIS_E6_A9_offsets,
+    to_Shift_JIS_E6_A9_infos,
+
+#define to_Shift_JIS_E6_AA_infos WORDINDEX2INFO(13823)
+           INVALID, o2(0x92,0x68),         UNDEF, o2(0x9e,0xfa),
+     o2(0x9e,0xf8), o2(0x8c,0xe7), o2(0x9e,0xf7), o2(0x9f,0x40),
+     o2(0x9e,0x77), o2(0x9e,0xf9), o2(0x9e,0xfb), o2(0x9e,0xfc),
+     o2(0x9f,0x4b), o2(0x9f,0x47), o2(0x9e,0x8d), o2(0x9f,0x46),
+     o2(0x9f,0x45), o2(0x9f,0x42),
+
+#define to_Shift_JIS_E6_AA WORDINDEX2INFO(13841)
+    to_Shift_JIS_E6_AA_offsets,
+    to_Shift_JIS_E6_AA_infos,
+
+#define to_Shift_JIS_E6_AB_infos WORDINDEX2INFO(13843)
+           INVALID,         UNDEF, o2(0x9e,0xe8), o2(0x9f,0x44),
+     o2(0x9f,0x43), o2(0x9f,0x49), o2(0x98,0x45), o2(0x9f,0x4c),
+     o2(0x8b,0xf9), o2(0x9f,0x48), o2(0x9f,0x4a), o2(0x94,0xa5),
+     o2(0x9f,0x4d), o2(0x9f,0x51), o2(0x9f,0x4e),
+
+#define to_Shift_JIS_E6_AB WORDINDEX2INFO(13858)
+    to_Shift_JIS_E6_AB_offsets,
+    to_Shift_JIS_E6_AB_infos,
+
+#define to_Shift_JIS_E6_AC_infos WORDINDEX2INFO(13860)
+           INVALID,         UNDEF, o2(0x97,0x93), o2(0x9f,0x4f),
+     o2(0x9e,0xdc), o2(0x9f,0x52), o2(0x9f,0x53), o2(0x89,0x54),
+     o2(0x9f,0x55), o2(0x8c,0x87), o2(0x8e,0x9f), o2(0x8b,0xd3),
+     o2(0x89,0xa2), o2(0x97,0x7e), o2(0x9f,0x57), o2(0x9f,0x56),
+     o2(0x9f,0x59), o2(0x8b,0x5c), o2(0x8b,0xd4), o2(0x8a,0xbc),
+
+#define to_Shift_JIS_E6_AC WORDINDEX2INFO(13880)
+    to_Shift_JIS_E6_AC_offsets,
+    to_Shift_JIS_E6_AC_infos,
+
+#define to_Shift_JIS_E6_AD_infos WORDINDEX2INFO(13882)
+           INVALID,         UNDEF, o2(0x9f,0x5c), o2(0x9f,0x5b),
+     o2(0x9f,0x5d), o2(0x89,0xcc), o2(0x92,0x56), o2(0x9f,0x5e),
+     o2(0x8a,0xbd), o2(0x9f,0x60), o2(0x9f,0x5f), o2(0x9f,0x61),
+     o2(0x9f,0x62), o2(0x9f,0x63), o2(0x8e,0x7e), o2(0x90,0xb3),
+     o2(0x8d,0x9f), o2(0x95,0x90), o2(0x95,0xe0), o2(0x98,0x63),
+     o2(0x8e,0x95), o2(0x8d,0xce), o2(0x97,0xf0), o2(0x9f,0x64),
+     o2(0x9f,0x65), o2(0x8e,0x80), o2(0x9f,0x66),
+
+#define to_Shift_JIS_E6_AD WORDINDEX2INFO(13909)
+    to_Shift_JIS_E6_AD_offsets,
+    to_Shift_JIS_E6_AD_infos,
+
+#define to_Shift_JIS_E6_AE_infos WORDINDEX2INFO(13911)
+           INVALID, o2(0x9f,0x67),         UNDEF, o2(0x9f,0x69),
+     o2(0x9f,0x68), o2(0x96,0x77), o2(0x8f,0x7d), o2(0x8e,0xea),
+     o2(0x8e,0x63), o2(0x9f,0x6a), o2(0x9f,0x6c), o2(0x90,0x42),
+     o2(0x9f,0x6b), o2(0x9f,0x6d), o2(0x9f,0x6e), o2(0x9f,0x6f),
+     o2(0x9f,0x70), o2(0x9f,0x71), o2(0x9f,0x73), o2(0x9f,0x72),
+     o2(0x9f,0x74), o2(0x89,0xa3), o2(0x92,0x69), o2(0x9f,0x75),
+     o2(0x8e,0x45), o2(0x8a,0x6b), o2(0x9f,0x76), o2(0x93,0x61),
+
+#define to_Shift_JIS_E6_AE WORDINDEX2INFO(13939)
+    to_Shift_JIS_E6_AE_offsets,
+    to_Shift_JIS_E6_AE_infos,
+
+#define to_Shift_JIS_E6_AF_infos WORDINDEX2INFO(13941)
+           INVALID, o2(0x9a,0xca),         UNDEF, o2(0x8b,0x42),
+     o2(0x9f,0x77), o2(0x9f,0x78), o2(0x95,0xea), o2(0x96,0x88),
+     o2(0x93,0xc5), o2(0x9f,0x79), o2(0x94,0xe4), o2(0x94,0xf9),
+     o2(0x96,0xd1), o2(0x9f,0x7a), o2(0x9f,0x7c), o2(0x9f,0x7b),
+     o2(0x9f,0x7e), o2(0x9f,0x7d),
+
+#define to_Shift_JIS_E6_AF WORDINDEX2INFO(13959)
+    to_Shift_JIS_E6_AF_offsets,
+    to_Shift_JIS_E6_AF_infos,
+
+#define to_Shift_JIS_E6_B0_infos WORDINDEX2INFO(13961)
+           INVALID,         UNDEF, o2(0x9f,0x81), o2(0x8e,0x81),
+     o2(0x96,0xaf), o2(0x9f,0x82), o2(0x9f,0x83), o2(0x8b,0x43),
+     o2(0x9f,0x84), o2(0x9f,0x86), o2(0x9f,0x85), o2(0x90,0x85),
+     o2(0x95,0x58), o2(0x89,0x69), o2(0x94,0xc3),
+
+#define to_Shift_JIS_E6_B0 WORDINDEX2INFO(13976)
+    to_Shift_JIS_E6_B0_offsets,
+    to_Shift_JIS_E6_B0_infos,
+
+#define to_Shift_JIS_E6_B1_infos WORDINDEX2INFO(13978)
+           INVALID, o2(0x92,0xf3), o2(0x8f,0x60), o2(0x8b,0x81),
+             UNDEF, o2(0x94,0xc4), o2(0x8e,0xac), o2(0x9f,0x88),
+     o2(0x8a,0xbe), o2(0x89,0x98), o2(0x93,0xf0), o2(0x9f,0x87),
+     o2(0x8d,0x5d), o2(0x92,0x72), o2(0x9f,0x89), o2(0x9f,0x91),
+     o2(0x9f,0x8a), o2(0x91,0xbf), o2(0x8b,0x82), o2(0x9f,0x92),
+     o2(0x8c,0x88), o2(0x8b,0x44), o2(0x9f,0x90),
+
+#define to_Shift_JIS_E6_B1 WORDINDEX2INFO(14001)
+    to_Shift_JIS_E6_B1_offsets,
+    to_Shift_JIS_E6_B1_infos,
+
+#define to_Shift_JIS_E6_B2_infos WORDINDEX2INFO(14003)
+           INVALID,         UNDEF, o2(0x9f,0x8e), o2(0x9f,0x8b),
+     o2(0x97,0x80), o2(0x92,0xbe), o2(0x93,0xd7), o2(0x9f,0x8c),
+     o2(0x9f,0x94), o2(0x9f,0x93), o2(0x8c,0x42), o2(0x89,0xab),
+     o2(0x8d,0xb9), o2(0x9f,0x8d), o2(0x9f,0x8f), o2(0x96,0x76),
+     o2(0x91,0xf2), o2(0x96,0x97), o2(0x9f,0x9c), o2(0x9f,0x9d),
+     o2(0x89,0xcd), o2(0x95,0xa6), o2(0x96,0xfb), o2(0x9f,0x9f),
+     o2(0x8e,0xa1), o2(0x8f,0xc0), o2(0x9f,0x98), o2(0x9f,0x9e),
+     o2(0x89,0x88),
+
+#define to_Shift_JIS_E6_B2 WORDINDEX2INFO(14032)
+    to_Shift_JIS_E6_B2_offsets,
+    to_Shift_JIS_E6_B2_infos,
+
+#define to_Shift_JIS_E6_B3_infos WORDINDEX2INFO(14034)
+           INVALID,         UNDEF, o2(0x8b,0xb5), o2(0x9f,0x95),
+     o2(0x9f,0x9a), o2(0x90,0xf2), o2(0x94,0x91), o2(0x94,0xe5),
+     o2(0x9f,0x97), o2(0x96,0x40), o2(0x9f,0x99), o2(0x9f,0xa2),
+     o2(0x9f,0xa0), o2(0x9f,0x9b), o2(0x96,0x41), o2(0x94,0x67),
+     o2(0x8b,0x83), o2(0x93,0x44), o2(0x92,0x8d), o2(0x9f,0xa3),
+     o2(0x9f,0xa1), o2(0x91,0xd7), o2(0x9f,0x96), o2(0x89,0x6a),
+
+#define to_Shift_JIS_E6_B3 WORDINDEX2INFO(14058)
+    to_Shift_JIS_E6_B3_offsets,
+    to_Shift_JIS_E6_B3_infos,
+
+#define to_Shift_JIS_E6_B4_infos WORDINDEX2INFO(14060)
+           INVALID,         UNDEF, o2(0x97,0x6d), o2(0x9f,0xae),
+     o2(0x9f,0xad), o2(0x90,0xf4), o2(0x9f,0xaa), o2(0x97,0x8c),
+     o2(0x93,0xb4), o2(0x9f,0xa4), o2(0x92,0xc3), o2(0x89,0x6b),
+     o2(0x8d,0x5e), o2(0x9f,0xa7), o2(0x8f,0x46), o2(0x9f,0xac),
+     o2(0x9f,0xab), o2(0x9f,0xa6), o2(0x9f,0xa9), o2(0x8a,0x88),
+     o2(0x9f,0xa8), o2(0x94,0x68),
+
+#define to_Shift_JIS_E6_B4 WORDINDEX2INFO(14082)
+    to_Shift_JIS_E6_B4_offsets,
+    to_Shift_JIS_E6_B4_infos,
+
+#define to_Shift_JIS_E6_B5_infos WORDINDEX2INFO(14084)
+           INVALID,         UNDEF, o2(0x97,0xac), o2(0x8f,0xf2),
+     o2(0x90,0xf3), o2(0x9f,0xb4), o2(0x9f,0xb2), o2(0x95,0x6c),
+     o2(0x9f,0xaf), o2(0x9f,0xb1), o2(0x89,0x59), o2(0x8d,0x5f),
+     o2(0x98,0x51), o2(0x8a,0x5c), o2(0x95,0x82), o2(0x97,0x81),
+     o2(0x8a,0x43), o2(0x90,0x5a), o2(0x9f,0xb3),
+
+#define to_Shift_JIS_E6_B5 WORDINDEX2INFO(14103)
+    to_Shift_JIS_E6_B5_offsets,
+    to_Shift_JIS_E6_B5_infos,
+
+#define to_Shift_JIS_E6_B6_infos WORDINDEX2INFO(14105)
+           INVALID,         UNDEF, o2(0x9f,0xb8), o2(0x8f,0xc1),
+     o2(0x97,0x4f), o2(0x9f,0xb5), o2(0x9f,0xb0), o2(0x9f,0xb6),
+     o2(0x97,0xdc), o2(0x93,0x93), o2(0x93,0xc0), o2(0x8a,0x55),
+     o2(0x89,0x74), o2(0x9f,0xbc), o2(0x9f,0xbf), o2(0x97,0xc1),
+
+#define to_Shift_JIS_E6_B6 WORDINDEX2INFO(14121)
+    to_Shift_JIS_E6_B6_offsets,
+    to_Shift_JIS_E6_B6_infos,
+
+#define to_Shift_JIS_E6_B7_infos WORDINDEX2INFO(14123)
+           INVALID, o2(0x97,0x84),         UNDEF, o2(0x9f,0xc6),
+     o2(0x9f,0xc0), o2(0x9f,0xbd), o2(0x97,0xd2), o2(0x9f,0xc3),
+     o2(0x8f,0x69), o2(0x9f,0xc5), o2(0x9f,0xca), o2(0x93,0x91),
+     o2(0x9f,0xc8), o2(0x9f,0xc2), o2(0x92,0x57), o2(0x9f,0xc9),
+     o2(0x9f,0xbe), o2(0x9f,0xc4), o2(0x9f,0xcb), o2(0x88,0xfa),
+     o2(0x9f,0xc1), o2(0x9f,0xcc), o2(0x90,0x5b), o2(0x8f,0x7e),
+     o2(0x95,0xa3), o2(0x8d,0xac), o2(0x9f,0xb9), o2(0x9f,0xc7),
+     o2(0x93,0x59),
+
+#define to_Shift_JIS_E6_B7 WORDINDEX2INFO(14152)
+    to_Shift_JIS_E6_B7_offsets,
+    to_Shift_JIS_E6_B7_infos,
+
+#define to_Shift_JIS_E6_B8_infos WORDINDEX2INFO(14154)
+           INVALID,         UNDEF, o2(0x90,0xb4), o2(0x8a,0x89),
+     o2(0x8d,0xcf), o2(0x8f,0xc2), o2(0x9f,0xbb), o2(0x8f,0x61),
+     o2(0x8c,0x6b), o2(0x9f,0xba), o2(0x9f,0xd0), o2(0x8f,0x8d),
+     o2(0x8c,0xb8), o2(0x9f,0xdf), o2(0x9f,0xd9), o2(0x8b,0x94),
+     o2(0x93,0x6e), o2(0x9f,0xd4), o2(0x9f,0xdd), o2(0x88,0xad),
+     o2(0x89,0x51), o2(0x89,0xb7), o2(0x9f,0xd6), o2(0x91,0xaa),
+     o2(0x9f,0xcd), o2(0x9f,0xcf), o2(0x8d,0x60), o2(0x9f,0xe0),
+     o2(0x9f,0xdb), o2(0x9f,0xd3),
+
+#define to_Shift_JIS_E6_B8 WORDINDEX2INFO(14184)
+    to_Shift_JIS_E6_B8_offsets,
+    to_Shift_JIS_E6_B8_infos,
+
+#define to_Shift_JIS_E6_B9_infos WORDINDEX2INFO(14186)
+           INVALID,         UNDEF, o2(0x9f,0xda), o2(0x96,0xa9),
+     o2(0x9f,0xd8), o2(0x9f,0xdc), o2(0x8c,0xce), o2(0x8f,0xc3),
+     o2(0x92,0x58), o2(0x9f,0xd2), o2(0x97,0x4e), o2(0x9f,0xd5),
+     o2(0x9f,0xce), o2(0x93,0x92), o2(0x9f,0xd1), o2(0x9f,0xd7),
+     o2(0x98,0x70), o2(0x8e,0xbc),
+
+#define to_Shift_JIS_E6_B9 WORDINDEX2INFO(14204)
+    to_Shift_JIS_E6_B9_offsets,
+    to_Shift_JIS_E6_B9_infos,
+
+#define to_Shift_JIS_E6_BA_infos WORDINDEX2INFO(14206)
+           INVALID, o2(0x96,0x9e),         UNDEF, o2(0x9f,0xe1),
+     o2(0x94,0xac), o2(0x9f,0xed), o2(0x8c,0xb9), o2(0x8f,0x80),
+     o2(0x9f,0xe3), o2(0x97,0xad), o2(0x8d,0x61), o2(0x9f,0xf0),
+     o2(0x88,0xec), o2(0x9f,0xee), o2(0x9f,0xe2), o2(0x9f,0xe8),
+     o2(0x9f,0xea), o2(0x97,0x6e), o2(0x9f,0xe5), o2(0x93,0x4d),
+     o2(0x9f,0xe7),
+
+#define to_Shift_JIS_E6_BA WORDINDEX2INFO(14227)
+    to_Shift_JIS_E6_BA_offsets,
+    to_Shift_JIS_E6_BA_infos,
+
+#define to_Shift_JIS_E6_BB_infos WORDINDEX2INFO(14229)
+           INVALID,         UNDEF, o2(0x9f,0xef), o2(0x9f,0xe9),
+     o2(0x96,0xc5), o2(0x9f,0xe4), o2(0x8e,0xa0), o2(0x9f,0xfc),
+     o2(0x8a,0x8a), o2(0x9f,0xe6), o2(0x9f,0xeb), o2(0x9f,0xec),
+     o2(0x91,0xea), o2(0x91,0xd8), o2(0x9f,0xf4), o2(0x9f,0xfa),
+     o2(0x9f,0xf8), o2(0x93,0x48), o2(0xe0,0x42), o2(0x9f,0xf5),
+     o2(0x9f,0xf6), o2(0x9f,0xde),
+
+#define to_Shift_JIS_E6_BB WORDINDEX2INFO(14251)
+    to_Shift_JIS_E6_BB_offsets,
+    to_Shift_JIS_E6_BB_infos,
+
+#define to_Shift_JIS_E6_BC_infos WORDINDEX2INFO(14253)
+           INVALID,         UNDEF, o2(0x8b,0x99), o2(0x95,0x59),
+     o2(0x8e,0xbd), o2(0x8d,0x97), o2(0x98,0x52), o2(0x9f,0xf2),
+     o2(0xe0,0x41), o2(0x89,0x89), o2(0x91,0x86), o2(0x94,0x99),
+     o2(0x8a,0xbf), o2(0x97,0xf8), o2(0x96,0x9f), o2(0x92,0xd0),
+     o2(0x9f,0xf9), o2(0x9f,0xfb), o2(0x91,0x51), o2(0xe0,0x40),
+     o2(0x9f,0xf7),
+
+#define to_Shift_JIS_E6_BC WORDINDEX2INFO(14274)
+    to_Shift_JIS_E6_BC_offsets,
+    to_Shift_JIS_E6_BC_infos,
+
+#define to_Shift_JIS_E6_BD_infos WORDINDEX2INFO(14276)
+           INVALID,         UNDEF, o2(0x9f,0xf1), o2(0x8a,0xc1),
+     o2(0x8c,0x89), o2(0xe0,0x4e), o2(0xe0,0x49), o2(0x90,0xf6),
+     o2(0x8a,0x83), o2(0x8f,0x81), o2(0xe0,0x52), o2(0xe0,0x4b),
+     o2(0x92,0xaa), o2(0xe0,0x48), o2(0x92,0xd7), o2(0xe0,0x6b),
+     o2(0xe0,0x45), o2(0xe0,0x44), o2(0xe0,0x4d),
+
+#define to_Shift_JIS_E6_BD WORDINDEX2INFO(14295)
+    to_Shift_JIS_E6_BD_offsets,
+    to_Shift_JIS_E6_BD_infos,
+
+#define to_Shift_JIS_E6_BE_infos WORDINDEX2INFO(14297)
+           INVALID, o2(0xe0,0x47), o2(0xe0,0x46), o2(0xe0,0x4c),
+             UNDEF, o2(0x90,0x9f), o2(0xe0,0x43), o2(0xe0,0x4f),
+     o2(0xe0,0x50), o2(0x8a,0xc0), o2(0xe0,0x55), o2(0xe0,0x54),
+     o2(0xe0,0x56), o2(0xe0,0x59), o2(0x93,0x62), o2(0xe0,0x53),
+     o2(0xe0,0x57),
+
+#define to_Shift_JIS_E6_BE WORDINDEX2INFO(14314)
+    to_Shift_JIS_E6_BE_offsets,
+    to_Shift_JIS_E6_BE_infos,
+
+#define to_Shift_JIS_E6_BF_infos WORDINDEX2INFO(14316)
+           INVALID, o2(0x8c,0x83), o2(0x91,0xf7), o2(0xe0,0x51),
+     o2(0x94,0x5a),         UNDEF, o2(0xe0,0x58), o2(0xe0,0x5d),
+     o2(0xe0,0x5b), o2(0xe0,0x5e), o2(0xe0,0x61), o2(0xe0,0x5a),
+     o2(0x8d,0x8a), o2(0x94,0x47), o2(0x9f,0xb7), o2(0x97,0x94),
+     o2(0xe0,0x5c), o2(0xe0,0x60), o2(0x91,0xf3), o2(0xe0,0x5f),
+     o2(0xe0,0x4a), o2(0xe8,0x89), o2(0xe0,0x64), o2(0xe0,0x68),
+
+#define to_Shift_JIS_E6_BF WORDINDEX2INFO(14340)
+    to_Shift_JIS_E6_BF_offsets,
+    to_Shift_JIS_E6_BF_infos,
+
+#define to_Shift_JIS_E6_infos WORDINDEX2INFO(14342)
+                INVALID, to_Shift_JIS_E6_80,
+     to_Shift_JIS_E6_81, to_Shift_JIS_E6_82,
+     to_Shift_JIS_E6_83, to_Shift_JIS_E6_84,
+     to_Shift_JIS_E6_85, to_Shift_JIS_E6_86,
+     to_Shift_JIS_E6_87, to_Shift_JIS_E6_88,
+     to_Shift_JIS_E6_89, to_Shift_JIS_E6_8A,
+     to_Shift_JIS_E6_8B, to_Shift_JIS_E6_8C,
+     to_Shift_JIS_E6_8D, to_Shift_JIS_E6_8E,
+     to_Shift_JIS_E6_8F, to_Shift_JIS_E6_90,
+     to_Shift_JIS_E6_91, to_Shift_JIS_E6_92,
+     to_Shift_JIS_E6_93, to_Shift_JIS_E6_94,
+     to_Shift_JIS_E6_95, to_Shift_JIS_E6_96,
+     to_Shift_JIS_E6_97, to_Shift_JIS_E6_98,
+     to_Shift_JIS_E6_99, to_Shift_JIS_E6_9A,
+     to_Shift_JIS_E6_9B, to_Shift_JIS_E6_9C,
+     to_Shift_JIS_E6_9D, to_Shift_JIS_E6_9E,
+     to_Shift_JIS_E6_9F, to_Shift_JIS_E6_A0,
+     to_Shift_JIS_E6_A1, to_Shift_JIS_E6_A2,
+     to_Shift_JIS_E6_A3, to_Shift_JIS_E6_A4,
+     to_Shift_JIS_E6_A5, to_Shift_JIS_E6_A6,
+     to_Shift_JIS_E6_A7, to_Shift_JIS_E6_A8,
+     to_Shift_JIS_E6_A9, to_Shift_JIS_E6_AA,
+     to_Shift_JIS_E6_AB, to_Shift_JIS_E6_AC,
+     to_Shift_JIS_E6_AD, to_Shift_JIS_E6_AE,
+     to_Shift_JIS_E6_AF, to_Shift_JIS_E6_B0,
+     to_Shift_JIS_E6_B1, to_Shift_JIS_E6_B2,
+     to_Shift_JIS_E6_B3, to_Shift_JIS_E6_B4,
+     to_Shift_JIS_E6_B5, to_Shift_JIS_E6_B6,
+     to_Shift_JIS_E6_B7, to_Shift_JIS_E6_B8,
+     to_Shift_JIS_E6_B9, to_Shift_JIS_E6_BA,
+     to_Shift_JIS_E6_BB, to_Shift_JIS_E6_BC,
+     to_Shift_JIS_E6_BD, to_Shift_JIS_E6_BE,
+     to_Shift_JIS_E6_BF,
+
+#define to_Shift_JIS_E6 WORDINDEX2INFO(14407)
+    to_Shift_JIS_E3_81_offsets,
+    to_Shift_JIS_E6_infos,
+
+#define to_Shift_JIS_E7_80_infos WORDINDEX2INFO(14409)
+           INVALID,         UNDEF, o2(0xe0,0x66), o2(0xe0,0x62),
+     o2(0xe0,0x63), o2(0xe0,0x67), o2(0xe0,0x65), o2(0x95,0x6d),
+     o2(0xe0,0x6d), o2(0xe0,0x6a), o2(0xe0,0x69), o2(0xe0,0x6c),
+     o2(0x93,0xd2), o2(0xe0,0x6e), o2(0x92,0x95), o2(0x91,0xeb),
+     o2(0x90,0xa3), o2(0xe0,0x6f), o2(0xe0,0x71), o2(0xe0,0x70),
+
+#define to_Shift_JIS_E7_80 WORDINDEX2INFO(14429)
+    to_Shift_JIS_E7_80_offsets,
+    to_Shift_JIS_E7_80_infos,
+
+#define to_Shift_JIS_E7_81_infos WORDINDEX2INFO(14431)
+           INVALID,         UNDEF, o2(0x9f,0xf3), o2(0xe0,0x72),
+     o2(0x93,0xe5), o2(0xe0,0x73), o2(0x89,0xce), o2(0x93,0x94),
+     o2(0x8a,0x44), o2(0x8b,0x84), o2(0x8e,0xdc), o2(0x8d,0xd0),
+
+#define to_Shift_JIS_E7_81 WORDINDEX2INFO(14443)
+    to_Shift_JIS_E7_81_offsets,
+    to_Shift_JIS_E7_81_infos,
+
+#define to_Shift_JIS_E7_82_infos WORDINDEX2INFO(14445)
+           INVALID,         UNDEF, o2(0x98,0x46), o2(0x90,0x86),
+     o2(0x89,0x8a), o2(0xe0,0x75), o2(0xe0,0x74), o2(0xe0,0x78),
+     o2(0x92,0x59), o2(0xe0,0x7b), o2(0xe0,0x76), o2(0xe0,0x7a),
+     o2(0xe0,0x79), o2(0x93,0x5f), o2(0x88,0xd7),
+
+#define to_Shift_JIS_E7_82 WORDINDEX2INFO(14460)
+    to_Shift_JIS_E7_82_offsets,
+    to_Shift_JIS_E7_82_infos,
+
+#define to_Shift_JIS_E7_83_infos WORDINDEX2INFO(14462)
+           INVALID,         UNDEF, o2(0x97,0xf3), o2(0xe0,0x7d),
+     o2(0x89,0x47), o2(0xe0,0x80), o2(0xe0,0x7e), o2(0xe0,0x7c),
+     o2(0xe0,0x77), o2(0x96,0x42), o2(0xe0,0x82),
+
+#define to_Shift_JIS_E7_83 WORDINDEX2INFO(14473)
+    to_Shift_JIS_E7_83_offsets,
+    to_Shift_JIS_E7_83_infos,
+
+#define to_Shift_JIS_E7_84_infos WORDINDEX2INFO(14475)
+           INVALID,         UNDEF, o2(0xe0,0x81), o2(0x89,0x8b),
+     o2(0xe0,0x84), o2(0x95,0xb0), o2(0xe0,0x83), o2(0x96,0xb3),
+     o2(0x8f,0xc5), o2(0x91,0x52), o2(0x8f,0xc4),
+
+#define to_Shift_JIS_E7_84 WORDINDEX2INFO(14486)
+    to_Shift_JIS_E7_84_offsets,
+    to_Shift_JIS_E7_84_infos,
+
+#define to_Shift_JIS_E7_85_infos WORDINDEX2INFO(14488)
+           INVALID,         UNDEF, o2(0x97,0xf9), o2(0xe0,0x8a),
+     o2(0x90,0xf7), o2(0xe0,0x86), o2(0xe0,0x8b), o2(0x89,0x8c),
+     o2(0xe0,0x89), o2(0x94,0x81), o2(0xe0,0x85), o2(0xe0,0x88),
+     o2(0x8f,0xc6), o2(0x94,0xcf), o2(0xe0,0x8c), o2(0x8e,0xcf),
+     o2(0x90,0xf8),
+
+#define to_Shift_JIS_E7_85 WORDINDEX2INFO(14505)
+    to_Shift_JIS_E7_85_offsets,
+    to_Shift_JIS_E7_85_infos,
+
+#define to_Shift_JIS_E7_86_infos WORDINDEX2INFO(14507)
+           INVALID,         UNDEF, o2(0xe0,0x8f), o2(0xe0,0x87),
+     o2(0x8c,0x46), o2(0xe0,0x8d), o2(0x97,0x6f), o2(0xe0,0x90),
+     o2(0xea,0xa4), o2(0x8f,0x6e), o2(0xe0,0x91), o2(0xe0,0x92),
+     o2(0x94,0x4d), o2(0xe0,0x94), o2(0xe0,0x95),
+
+#define to_Shift_JIS_E7_86 WORDINDEX2INFO(14522)
+    to_Shift_JIS_E7_86_offsets,
+    to_Shift_JIS_E7_86_infos,
+
+#define to_Shift_JIS_E7_87_infos WORDINDEX2INFO(14524)
+           INVALID,         UNDEF, o2(0x94,0x52), o2(0x93,0x95),
+     o2(0xe0,0x97), o2(0xe0,0x99), o2(0x97,0xd3), o2(0xe0,0x96),
+     o2(0xe0,0x98), o2(0x89,0x8d), o2(0xe0,0x93), o2(0x9a,0x7a),
+     o2(0xe0,0x9a), o2(0x91,0x87), o2(0x8e,0x57), o2(0xe0,0x9c),
+     o2(0xe0,0x9b), o2(0x90,0x43), o2(0x99,0xd7), o2(0xe0,0x9d),
+     o2(0xe0,0x9f), o2(0xe0,0x8e), o2(0xe0,0x9e), o2(0xe0,0xa0),
+
+#define to_Shift_JIS_E7_87 WORDINDEX2INFO(14548)
+    to_Shift_JIS_E7_87_offsets,
+    to_Shift_JIS_E7_87_infos,
+
+#define to_Shift_JIS_E7_88_infos WORDINDEX2INFO(14550)
+           INVALID,         UNDEF, o2(0x94,0x9a), o2(0xe0,0xa1),
+     o2(0xe0,0xa2), o2(0xe0,0xa3), o2(0xe0,0xa4), o2(0x92,0xdc),
+     o2(0xe0,0xa6), o2(0xe0,0xa5), o2(0xe0,0xa7), o2(0xe0,0xa8),
+     o2(0x8e,0xdd), o2(0x95,0x83), o2(0x96,0xea), o2(0xe0,0xa9),
+     o2(0xe0,0xaa), o2(0x91,0x75), o2(0x8e,0xa2), o2(0xe0,0xab),
+
+#define to_Shift_JIS_E7_88 WORDINDEX2INFO(14570)
+    to_Shift_JIS_E7_88_offsets,
+    to_Shift_JIS_E7_88_infos,
+
+#define to_Shift_JIS_E7_89_infos WORDINDEX2INFO(14572)
+           INVALID, o2(0xe0,0xac),         UNDEF, o2(0xe0,0xad),
+     o2(0x95,0xd0), o2(0x94,0xc5), o2(0xe0,0xae), o2(0x94,0x76),
+     o2(0x92,0xab), o2(0xe0,0xaf), o2(0x89,0xe5), o2(0x8b,0x8d),
+     o2(0x96,0xc4), o2(0x96,0xb4), o2(0x89,0xb2), o2(0x98,0x53),
+     o2(0x96,0x71), o2(0x95,0xa8), o2(0x90,0xb5), o2(0xe0,0xb0),
+     o2(0x93,0xc1), o2(0x8c,0xa1), o2(0xe0,0xb1),
+
+#define to_Shift_JIS_E7_89 WORDINDEX2INFO(14595)
+    to_Shift_JIS_E7_89_offsets,
+    to_Shift_JIS_E7_89_infos,
+
+#define to_Shift_JIS_E7_8A_infos WORDINDEX2INFO(14597)
+           INVALID, o2(0x8d,0xd2), o2(0xe0,0xb3), o2(0xe0,0xb2),
+             UNDEF, o2(0xe0,0xb4), o2(0xe0,0xb5), o2(0xe0,0xb6),
+     o2(0x8b,0x5d), o2(0xe0,0xb7), o2(0xe0,0xb8), o2(0x8c,0xa2),
+     o2(0x94,0xc6), o2(0xe0,0xba), o2(0x8f,0xf3), o2(0xe0,0xb9),
+
+#define to_Shift_JIS_E7_8A WORDINDEX2INFO(14613)
+    to_Shift_JIS_E7_8A_offsets,
+    to_Shift_JIS_E7_8A_infos,
+
+#define to_Shift_JIS_E7_8B_infos WORDINDEX2INFO(14615)
+           INVALID,         UNDEF, o2(0x8b,0xb6), o2(0xe0,0xbb),
+     o2(0xe0,0xbd), o2(0xe0,0xbc), o2(0xe0,0xbe), o2(0x8c,0xcf),
+     o2(0xe0,0xbf), o2(0x8b,0xe7), o2(0x91,0x5f), o2(0x8d,0x9d),
+     o2(0xe0,0xc1), o2(0xe0,0xc2), o2(0xe0,0xc0), o2(0x8e,0xeb),
+     o2(0x93,0xc6), o2(0x8b,0xb7), o2(0xe0,0xc4), o2(0x92,0x4b),
+     o2(0xe0,0xc3), o2(0x98,0x54), o2(0x94,0x82),
+
+#define to_Shift_JIS_E7_8B WORDINDEX2INFO(14638)
+    to_Shift_JIS_E7_8B_offsets,
+    to_Shift_JIS_E7_8B_infos,
+
+#define to_Shift_JIS_E7_8C_infos WORDINDEX2INFO(14640)
+           INVALID,         UNDEF, o2(0xe0,0xc7), o2(0xe0,0xc9),
+     o2(0xe0,0xc6), o2(0x96,0xd2), o2(0xe0,0xc8), o2(0xe0,0xca),
+     o2(0x97,0xc2), o2(0xe0,0xce), o2(0xe0,0xcd), o2(0x92,0x96),
+     o2(0x94,0x4c), o2(0x8c,0xa3), o2(0xe0,0xcc), o2(0xe0,0xcb),
+     o2(0x97,0x50), o2(0x97,0x51), o2(0xe0,0xcf), o2(0x89,0x8e),
+
+#define to_Shift_JIS_E7_8C WORDINDEX2INFO(14660)
+    to_Shift_JIS_E7_8C_offsets,
+    to_Shift_JIS_E7_8C_infos,
+
+#define to_Shift_JIS_E7_8D_infos WORDINDEX2INFO(14662)
+           INVALID,         UNDEF, o2(0x8d,0x96), o2(0x8e,0x82),
+     o2(0xe0,0xd0), o2(0xe0,0xd1), o2(0xe0,0xd3), o2(0x8f,0x62),
+     o2(0xe0,0xd5), o2(0xe0,0xd4), o2(0xe0,0xd6), o2(0x8a,0x6c),
+     o2(0xe0,0xd8), o2(0xe0,0xd7), o2(0xe0,0xda), o2(0xe0,0xd9),
+
+#define to_Shift_JIS_E7_8D WORDINDEX2INFO(14678)
+    to_Shift_JIS_E7_8D_offsets,
+    to_Shift_JIS_E7_8D_infos,
+
+#define to_Shift_JIS_E7_8E_infos WORDINDEX2INFO(14680)
+           INVALID,         UNDEF, o2(0x8c,0xba), o2(0x97,0xa6),
+     o2(0x8b,0xca), o2(0x89,0xa4), o2(0x8b,0xe8), o2(0x8a,0xdf),
+     o2(0x97,0xe6), o2(0xe0,0xdc), o2(0xe0,0xde),
+
+#define to_Shift_JIS_E7_8E WORDINDEX2INFO(14691)
+    to_Shift_JIS_E7_8E_offsets,
+    to_Shift_JIS_E7_8E_infos,
+
+#define to_Shift_JIS_E7_8F_infos WORDINDEX2INFO(14693)
+           INVALID, o2(0xe0,0xdf),         UNDEF, o2(0x89,0xcf),
+     o2(0xe0,0xdb), o2(0x8e,0x58), o2(0x92,0xbf), o2(0xe0,0xdd),
+     o2(0xe0,0xe2), o2(0x8e,0xec), o2(0xe0,0xe0), o2(0x8c,0x5d),
+     o2(0x94,0xc7), o2(0xe0,0xe1), o2(0xe0,0xfc), o2(0xe0,0xe7),
+     o2(0x8c,0xbb),
+
+#define to_Shift_JIS_E7_8F WORDINDEX2INFO(14710)
+    to_Shift_JIS_E7_8F_offsets,
+    to_Shift_JIS_E7_8F_infos,
+
+#define to_Shift_JIS_E7_90_infos WORDINDEX2INFO(14712)
+           INVALID,         UNDEF, o2(0x8b,0x85), o2(0xe0,0xe4),
+     o2(0x97,0x9d), o2(0x97,0xae), o2(0x91,0xf4), o2(0xe0,0xe6),
+     o2(0xe0,0xe8), o2(0x97,0xd4), o2(0x8b,0xd5), o2(0x94,0xfa),
+     o2(0x94,0x69), o2(0xe0,0xe9), o2(0xe0,0xeb),
+
+#define to_Shift_JIS_E7_90 WORDINDEX2INFO(14727)
+    to_Shift_JIS_E7_90_offsets,
+    to_Shift_JIS_E7_90_infos,
+
+#define to_Shift_JIS_E7_91_infos WORDINDEX2INFO(14729)
+           INVALID,         UNDEF, o2(0xe0,0xee), o2(0xe0,0xea),
+     o2(0xe0,0xed), o2(0x8c,0xe8), o2(0x89,0x6c), o2(0xe0,0xef),
+     o2(0x90,0x90), o2(0xe0,0xec), o2(0x97,0xda), o2(0xe0,0xf2),
+     o2(0xea,0xa2), o2(0xe0,0xf0), o2(0xe0,0xf3), o2(0xe0,0xe5),
+     o2(0xe0,0xf1), o2(0x8d,0xba), o2(0xe0,0xf4), o2(0xe0,0xf5),
+
+#define to_Shift_JIS_E7_91 WORDINDEX2INFO(14749)
+    to_Shift_JIS_E7_91_offsets,
+    to_Shift_JIS_E7_91_infos,
+
+#define to_Shift_JIS_E7_92_infos WORDINDEX2INFO(14751)
+           INVALID,         UNDEF, o2(0x97,0x9e), o2(0xe0,0xf6),
+     o2(0xe0,0xf7), o2(0xe0,0xe3), o2(0xe0,0xf8), o2(0x8a,0xc2),
+     o2(0x8e,0xa3),
+
+#define to_Shift_JIS_E7_92 WORDINDEX2INFO(14760)
+    to_Shift_JIS_E7_92_offsets,
+    to_Shift_JIS_E7_92_infos,
+
+#define to_Shift_JIS_E7_93_infos WORDINDEX2INFO(14762)
+           INVALID,         UNDEF, o2(0xe0,0xf9), o2(0xe0,0xfa),
+     o2(0xe0,0xfb), o2(0x89,0x5a), o2(0xe1,0x40), o2(0x95,0x5a),
+     o2(0xe1,0x41), o2(0x8a,0xa2), o2(0xe1,0x42), o2(0xe1,0x43),
+     o2(0xe1,0x44), o2(0xe1,0x46), o2(0xe1,0x47), o2(0xe1,0x45),
+     o2(0x95,0x72), o2(0xe1,0x49), o2(0xe1,0x48),
+
+#define to_Shift_JIS_E7_93 WORDINDEX2INFO(14781)
+    to_Shift_JIS_E7_93_offsets,
+    to_Shift_JIS_E7_93_infos,
+
+#define to_Shift_JIS_E7_94_infos WORDINDEX2INFO(14783)
+           INVALID,         UNDEF, o2(0xe1,0x4b), o2(0xe1,0x4a),
+     o2(0xe1,0x4c), o2(0xe1,0x4d), o2(0xe1,0x4f), o2(0xe1,0x4e),
+     o2(0x8d,0x99), o2(0xe1,0x51), o2(0xe1,0x50), o2(0x8a,0xc3),
+     o2(0x90,0x72), o2(0x93,0x5b), o2(0xe1,0x52), o2(0x90,0xb6),
+     o2(0x8e,0x59), o2(0x89,0x99), o2(0xe1,0x53), o2(0x97,0x70),
+     o2(0x95,0xe1), o2(0xe1,0x54), o2(0x93,0x63), o2(0x97,0x52),
+     o2(0x8d,0x62), o2(0x90,0x5c), o2(0x92,0x6a), o2(0x99,0xb2),
+     o2(0x92,0xac), o2(0x89,0xe6), o2(0xe1,0x55),
+
+#define to_Shift_JIS_E7_94 WORDINDEX2INFO(14814)
+    to_Shift_JIS_E7_94_offsets,
+    to_Shift_JIS_E7_94_infos,
+
+#define to_Shift_JIS_E7_95_infos WORDINDEX2INFO(14816)
+           INVALID,         UNDEF, o2(0xe1,0x56), o2(0xe1,0x5b),
+     o2(0xe1,0x59), o2(0xe1,0x58), o2(0x9d,0xc0), o2(0x8a,0x45),
+     o2(0xe1,0x57), o2(0x88,0xd8), o2(0x94,0xa8), o2(0x94,0xc8),
+     o2(0x97,0xaf), o2(0xe1,0x5c), o2(0xe1,0x5a), o2(0x92,0x7b),
+     o2(0x90,0xa4), o2(0x94,0xa9), o2(0x95,0x4c), o2(0xe1,0x5e),
+     o2(0x97,0xaa), o2(0x8c,0x6c), o2(0xe1,0x5f), o2(0xe1,0x5d),
+     o2(0x94,0xd4), o2(0xe1,0x60), o2(0xe1,0x61), o2(0x88,0xd9),
+     o2(0x8f,0xf4), o2(0xe1,0x66), o2(0xe1,0x63), o2(0x93,0xeb),
+     o2(0xe1,0x62), o2(0x8b,0x45),
+
+#define to_Shift_JIS_E7_95 WORDINDEX2INFO(14850)
+    to_Shift_JIS_E7_95_offsets,
+    to_Shift_JIS_E7_95_infos,
+
+#define to_Shift_JIS_E7_96_infos WORDINDEX2INFO(14852)
+           INVALID,         UNDEF, o2(0xe1,0x69), o2(0xe1,0x64),
+     o2(0xe1,0x65), o2(0xe1,0x68), o2(0xe1,0x67), o2(0x95,0x44),
+     o2(0x91,0x61), o2(0x91,0x60), o2(0x8b,0x5e), o2(0xe1,0x6a),
+     o2(0xe1,0x6b), o2(0xe1,0x6c), o2(0xe1,0x6e), o2(0xe1,0x6d),
+     o2(0x89,0x75), o2(0xe1,0x76), o2(0x94,0xe6), o2(0xe1,0x70),
+     o2(0xe1,0x72), o2(0xe1,0x74), o2(0x90,0x5d), o2(0xe1,0x75),
+     o2(0xe1,0x73), o2(0x8e,0xbe),
+
+#define to_Shift_JIS_E7_96 WORDINDEX2INFO(14878)
+    to_Shift_JIS_E7_96_offsets,
+    to_Shift_JIS_E7_96_infos,
+
+#define to_Shift_JIS_E7_97_infos WORDINDEX2INFO(14880)
+           INVALID,         UNDEF, o2(0xe1,0x6f), o2(0xe1,0x71),
+     o2(0x95,0x61), o2(0x8f,0xc7), o2(0xe1,0x78), o2(0xe1,0x77),
+     o2(0xe1,0x79), o2(0x8e,0xa4), o2(0x8d,0xad), o2(0x93,0x97),
+     o2(0xe1,0x7a), o2(0x92,0xc9), o2(0xe1,0x7c), o2(0x97,0x9f),
+     o2(0xe1,0x7b), o2(0x91,0x89), o2(0xe1,0x82), o2(0xe1,0x84),
+     o2(0xe1,0x85), o2(0x92,0x73), o2(0xe1,0x83), o2(0xe1,0x80),
+     o2(0xe1,0x7d), o2(0xe1,0x7e),
+
+#define to_Shift_JIS_E7_97 WORDINDEX2INFO(14906)
+    to_Shift_JIS_E7_97_offsets,
+    to_Shift_JIS_E7_97_infos,
+
+#define to_Shift_JIS_E7_98_infos WORDINDEX2INFO(14908)
+           INVALID,         UNDEF, o2(0xe1,0x81), o2(0xe1,0x88),
+     o2(0xe1,0x86), o2(0xe1,0x87), o2(0xe1,0x89), o2(0xe1,0x8b),
+     o2(0xe1,0x8c), o2(0xe1,0x8d), o2(0xe1,0x8e), o2(0xe1,0x8a),
+     o2(0xe1,0x90), o2(0xe1,0x8f), o2(0xe1,0x91),
+
+#define to_Shift_JIS_E7_98 WORDINDEX2INFO(14923)
+    to_Shift_JIS_E7_98_offsets,
+    to_Shift_JIS_E7_98_infos,
+
+#define to_Shift_JIS_E7_99_infos WORDINDEX2INFO(14925)
+           INVALID,         UNDEF, o2(0x97,0xc3), o2(0xe1,0x94),
+     o2(0xe1,0x92), o2(0xe1,0x93), o2(0x8a,0xe0), o2(0x96,0xfc),
+     o2(0x95,0xc8), o2(0xe1,0x96), o2(0xe1,0x95), o2(0xe1,0x97),
+     o2(0xe1,0x98), o2(0xe1,0x9c), o2(0xe1,0x99), o2(0xe1,0x9a),
+     o2(0xe1,0x9b), o2(0xe1,0x9d), o2(0xe1,0x9e), o2(0xe1,0x9f),
+     o2(0xe1,0xa0), o2(0xe1,0xa1), o2(0x94,0xad), o2(0x93,0x6f),
+     o2(0xe1,0xa2), o2(0x94,0x92), o2(0x95,0x53),
+
+#define to_Shift_JIS_E7_99 WORDINDEX2INFO(14952)
+    to_Shift_JIS_E7_99_offsets,
+    to_Shift_JIS_E7_99_infos,
+
+#define to_Shift_JIS_E7_9A_infos WORDINDEX2INFO(14954)
+           INVALID, o2(0xe1,0xa3),         UNDEF, o2(0xe1,0xa4),
+     o2(0x93,0x49), o2(0x8a,0x46), o2(0x8d,0x63), o2(0xe1,0xa5),
+     o2(0xe1,0xa6), o2(0xe1,0xa7), o2(0x8e,0x48), o2(0xe1,0xa9),
+     o2(0xe1,0xa8), o2(0xe1,0xaa), o2(0xe1,0xab), o2(0x94,0xe7),
+     o2(0xe1,0xac), o2(0xe1,0xad), o2(0xea,0x89), o2(0xe1,0xae),
+     o2(0xe1,0xaf), o2(0xe1,0xb0), o2(0x8e,0x4d),
+
+#define to_Shift_JIS_E7_9A WORDINDEX2INFO(14977)
+    to_Shift_JIS_E7_9A_offsets,
+    to_Shift_JIS_E7_9A_infos,
+
+#define to_Shift_JIS_E7_9B_infos WORDINDEX2INFO(14979)
+           INVALID,         UNDEF, o2(0xe1,0xb1), o2(0x94,0x75),
+     o2(0x96,0x7e), o2(0x89,0x6d), o2(0x89,0x76), o2(0xe1,0xb2),
+     o2(0xe1,0xb4), o2(0xe1,0xb3), o2(0x93,0x90), o2(0x90,0xb7),
+     o2(0x9f,0x58), o2(0xe1,0xb5), o2(0x96,0xbf), o2(0xe1,0xb6),
+     o2(0x8a,0xc4), o2(0x94,0xd5), o2(0xe1,0xb7), o2(0xe1,0xb8),
+     o2(0xe1,0xb9), o2(0x96,0xda), o2(0x96,0xd3), o2(0x92,0xbc),
+     o2(0x91,0x8a), o2(0xe1,0xbb), o2(0x8f,0x82),
+
+#define to_Shift_JIS_E7_9B WORDINDEX2INFO(15006)
+    to_Shift_JIS_E7_9B_offsets,
+    to_Shift_JIS_E7_9B_infos,
+
+#define to_Shift_JIS_E7_9C_infos WORDINDEX2INFO(15008)
+           INVALID,         UNDEF, o2(0x8f,0xc8), o2(0xe1,0xbe),
+     o2(0xe1,0xbd), o2(0xe1,0xbc), o2(0x94,0xfb), o2(0x8a,0xc5),
+     o2(0x8c,0xa7), o2(0xe1,0xc4), o2(0xe1,0xc1), o2(0x90,0x5e),
+     o2(0x96,0xb0), o2(0xe1,0xc0), o2(0xe1,0xc2), o2(0xe1,0xc3),
+     o2(0xe1,0xbf), o2(0xe1,0xc5), o2(0xe1,0xc6), o2(0x92,0xad),
+     o2(0x8a,0xe1),
+
+#define to_Shift_JIS_E7_9C WORDINDEX2INFO(15029)
+    to_Shift_JIS_E7_9C_offsets,
+    to_Shift_JIS_E7_9C_infos,
+
+#define to_Shift_JIS_E7_9D_infos WORDINDEX2INFO(15031)
+           INVALID, o2(0x92,0x85),         UNDEF, o2(0xe1,0xc7),
+     o2(0xe1,0xc8), o2(0xe1,0xcb), o2(0x90,0x87), o2(0x93,0xc2),
+     o2(0xe1,0xcc), o2(0x96,0x72), o2(0xe1,0xc9), o2(0xe1,0xca),
+     o2(0xe1,0xcf), o2(0xe1,0xce), o2(0xe1,0xcd),
+
+#define to_Shift_JIS_E7_9D WORDINDEX2INFO(15046)
+    to_Shift_JIS_E7_9D_offsets,
+    to_Shift_JIS_E7_9D_infos,
+
+#define to_Shift_JIS_E7_9E_infos WORDINDEX2INFO(15048)
+           INVALID,         UNDEF, o2(0xe1,0xd1), o2(0xe1,0xd0),
+     o2(0xe1,0xd2), o2(0xe1,0xd4), o2(0xe1,0xd3), o2(0x95,0xcb),
+     o2(0x8f,0x75), o2(0x97,0xc4), o2(0xe1,0xd5), o2(0x93,0xb5),
+     o2(0xe1,0xd6), o2(0xe1,0xd7), o2(0xe1,0xdb), o2(0xe1,0xd9),
+     o2(0xe1,0xda), o2(0xe1,0xd8),
+
+#define to_Shift_JIS_E7_9E WORDINDEX2INFO(15066)
+    to_Shift_JIS_E7_9E_offsets,
+    to_Shift_JIS_E7_9E_infos,
+
+#define to_Shift_JIS_E7_9F_infos WORDINDEX2INFO(15068)
+           INVALID,         UNDEF, o2(0xe1,0xdc), o2(0xe1,0xdd),
+     o2(0xe1,0xde), o2(0xe1,0xdf), o2(0x96,0xb5), o2(0xe1,0xe0),
+     o2(0x96,0xee), o2(0xe1,0xe1), o2(0x92,0x6d), o2(0x94,0x8a),
+     o2(0x8b,0xe9), o2(0x92,0x5a), o2(0xe1,0xe2), o2(0x8b,0xb8),
+     o2(0x90,0xce), o2(0xe1,0xe3),
+
+#define to_Shift_JIS_E7_9F WORDINDEX2INFO(15086)
+    to_Shift_JIS_E7_9F_offsets,
+    to_Shift_JIS_E7_9F_infos,
+
+#define to_Shift_JIS_E7_A0_infos WORDINDEX2INFO(15088)
+           INVALID,         UNDEF, o2(0x8d,0xbb), o2(0xe1,0xe4),
+     o2(0xe1,0xe5), o2(0x8c,0xa4), o2(0x8d,0xd3), o2(0xe1,0xe7),
+     o2(0x93,0x75), o2(0x8d,0xd4), o2(0x8b,0x6d), o2(0x96,0x43),
+     o2(0x94,0x6a), o2(0x93,0x76), o2(0x8d,0x7b),
+
+#define to_Shift_JIS_E7_A0 WORDINDEX2INFO(15103)
+    to_Shift_JIS_E7_A0_offsets,
+    to_Shift_JIS_E7_A0_infos,
+
+#define to_Shift_JIS_E7_A1_infos WORDINDEX2INFO(15105)
+           INVALID,         UNDEF, o2(0xe1,0xe9), o2(0x8f,0xc9),
+     o2(0x97,0xb0), o2(0x8d,0x64), o2(0x8c,0xa5), o2(0x94,0xa1),
+     o2(0xe1,0xeb), o2(0xe1,0xed),
+
+#define to_Shift_JIS_E7_A1 WORDINDEX2INFO(15115)
+    to_Shift_JIS_E7_A1_offsets,
+    to_Shift_JIS_E7_A1_infos,
+
+#define to_Shift_JIS_E7_A2_infos WORDINDEX2INFO(15117)
+           INVALID,         UNDEF, o2(0x8c,0xe9), o2(0xe1,0xec),
+     o2(0x92,0xf4), o2(0xe1,0xef), o2(0x8a,0x56), o2(0xe1,0xea),
+     o2(0x94,0xe8), o2(0x89,0x4f), o2(0x8d,0xea), o2(0x98,0x71),
+     o2(0xe1,0xee), o2(0xe1,0xf0), o2(0x95,0xc9), o2(0x90,0xd7),
+     o2(0xe1,0xf2), o2(0xe1,0xf3), o2(0xe1,0xf1), o2(0x8a,0x6d),
+     o2(0xe1,0xf9), o2(0xe1,0xf8),
+
+#define to_Shift_JIS_E7_A2 WORDINDEX2INFO(15139)
+    to_Shift_JIS_E7_A2_offsets,
+    to_Shift_JIS_E7_A2_infos,
+
+#define to_Shift_JIS_E7_A3_infos WORDINDEX2INFO(15141)
+           INVALID,         UNDEF, o2(0x8e,0xa5), o2(0xe1,0xfa),
+     o2(0xe1,0xf5), o2(0xe1,0xfb), o2(0xe1,0xf6), o2(0x94,0xd6),
+     o2(0xe1,0xf4), o2(0xe1,0xf7), o2(0xe2,0x41), o2(0xe2,0x40),
+     o2(0x96,0x81), o2(0xe1,0xfc), o2(0x88,0xe9), o2(0xe2,0x43),
+     o2(0xe2,0x42),
+
+#define to_Shift_JIS_E7_A3 WORDINDEX2INFO(15158)
+    to_Shift_JIS_E7_A3_offsets,
+    to_Shift_JIS_E7_A3_infos,
+
+#define to_Shift_JIS_E7_A4_infos WORDINDEX2INFO(15160)
+           INVALID,         UNDEF, o2(0x8f,0xca), o2(0xe2,0x44),
+     o2(0x91,0x62), o2(0xe2,0x46), o2(0xe2,0x45), o2(0xe2,0x47),
+     o2(0xe1,0xe6), o2(0xe1,0xe8), o2(0xe2,0x49), o2(0xe2,0x48),
+     o2(0x8e,0xa6), o2(0x97,0xe7), o2(0x8e,0xd0),
+
+#define to_Shift_JIS_E7_A4 WORDINDEX2INFO(15175)
+    to_Shift_JIS_E7_A4_offsets,
+    to_Shift_JIS_E7_A4_infos,
+
+#define to_Shift_JIS_E7_A5_infos WORDINDEX2INFO(15177)
+           INVALID, o2(0xe2,0x4a), o2(0x8c,0x56),         UNDEF,
+     o2(0x8b,0x5f), o2(0x8b,0x46), o2(0x8e,0x83), o2(0x97,0x53),
+     o2(0xe2,0x50), o2(0xe2,0x4f), o2(0x91,0x63), o2(0xe2,0x4c),
+     o2(0xe2,0x4e), o2(0x8f,0x6a), o2(0x90,0x5f), o2(0xe2,0x4d),
+     o2(0xe2,0x4b), o2(0x94,0x49), o2(0x8f,0xcb), o2(0x95,0x5b),
+     o2(0x8d,0xd5), o2(0x93,0x98), o2(0xe2,0x51), o2(0xe2,0x52),
+
+#define to_Shift_JIS_E7_A5 WORDINDEX2INFO(15201)
+    to_Shift_JIS_E7_A5_offsets,
+    to_Shift_JIS_E7_A5_infos,
+
+#define to_Shift_JIS_E7_A6_infos WORDINDEX2INFO(15203)
+           INVALID, o2(0xe2,0x68), o2(0x8b,0xd6),         UNDEF,
+     o2(0x98,0x5c), o2(0x91,0x54), o2(0xe2,0x53), o2(0x89,0xd0),
+     o2(0x92,0xf5), o2(0x95,0x9f), o2(0xe2,0x54), o2(0x8b,0x9a),
+     o2(0xe2,0x55), o2(0xe2,0x57), o2(0xe2,0x58), o2(0x94,0x48),
+     o2(0xe2,0x59), o2(0xe2,0x5a), o2(0xe2,0x5b), o2(0x8b,0xd7),
+     o2(0x89,0xd1), o2(0x93,0xc3),
+
+#define to_Shift_JIS_E7_A6 WORDINDEX2INFO(15225)
+    to_Shift_JIS_E7_A6_offsets,
+    to_Shift_JIS_E7_A6_infos,
+
+#define to_Shift_JIS_E7_A7_infos WORDINDEX2INFO(15227)
+           INVALID, o2(0x8f,0x47), o2(0x8e,0x84),         UNDEF,
+     o2(0xe2,0x5c), o2(0x8f,0x48), o2(0x89,0xc8), o2(0x95,0x62),
+     o2(0xe2,0x5d), o2(0x94,0xe9), o2(0x91,0x64), o2(0xe2,0x60),
+     o2(0xe2,0x61), o2(0x94,0x89), o2(0x90,0x60), o2(0xe2,0x5e),
+     o2(0x92,0x81), o2(0xe2,0x5f), o2(0x8f,0xcc), o2(0x88,0xda),
+
+#define to_Shift_JIS_E7_A7 WORDINDEX2INFO(15247)
+    to_Shift_JIS_E7_A7_offsets,
+    to_Shift_JIS_E7_A7_infos,
+
+#define to_Shift_JIS_E7_A8_infos WORDINDEX2INFO(15249)
+           INVALID, o2(0x8b,0x48),         UNDEF, o2(0xe2,0x62),
+     o2(0x92,0xf6), o2(0xe2,0x63), o2(0x90,0xc5), o2(0x96,0xab),
+     o2(0x95,0x42), o2(0xe2,0x64), o2(0xe2,0x65), o2(0x92,0x74),
+     o2(0x97,0xc5), o2(0xe2,0x67), o2(0xe2,0x66), o2(0x8e,0xed),
+     o2(0xe2,0x69), o2(0x88,0xee), o2(0xe2,0x6c), o2(0xe2,0x6a),
+     o2(0x89,0xd2), o2(0x8c,0x6d), o2(0xe2,0x6b), o2(0x8d,0x65),
+
+#define to_Shift_JIS_E7_A8 WORDINDEX2INFO(15273)
+    to_Shift_JIS_E7_A8_offsets,
+    to_Shift_JIS_E7_A8_infos,
+
+#define to_Shift_JIS_E7_A9_infos WORDINDEX2INFO(15275)
+           INVALID, o2(0x8d,0x92),         UNDEF, o2(0x95,0xe4),
+     o2(0xe2,0x6d), o2(0x96,0x73), o2(0xe2,0x6f), o2(0x90,0xcf),
+     o2(0x89,0x6e), o2(0x89,0xb8), o2(0x88,0xaa), o2(0xe2,0x6e),
+     o2(0xe2,0x70), o2(0xe2,0x71), o2(0x8f,0xf5), o2(0xe2,0x72),
+     o2(0x8a,0x6e), o2(0xe2,0x74), o2(0x8c,0x8a), o2(0x8b,0x86),
+     o2(0xe2,0x75), o2(0x8b,0xf3), o2(0xe2,0x76), o2(0x90,0xfa),
+
+#define to_Shift_JIS_E7_A9 WORDINDEX2INFO(15299)
+    to_Shift_JIS_E7_A9_offsets,
+    to_Shift_JIS_E7_A9_infos,
+
+#define to_Shift_JIS_E7_AA_infos WORDINDEX2INFO(15301)
+           INVALID,         UNDEF, o2(0x93,0xcb), o2(0x90,0xde),
+     o2(0x8d,0xf3), o2(0xe2,0x77), o2(0x92,0x82), o2(0x91,0x8b),
+     o2(0xe2,0x79), o2(0xe2,0x7b), o2(0xe2,0x78), o2(0xe2,0x7a),
+     o2(0x8c,0x41), o2(0xe2,0x7c), o2(0x8c,0x45), o2(0x8b,0x87),
+     o2(0x97,0x71), o2(0xe2,0x7e), o2(0xe2,0x80), o2(0x89,0x4d),
+     o2(0xe2,0x83),
+
+#define to_Shift_JIS_E7_AA WORDINDEX2INFO(15322)
+    to_Shift_JIS_E7_AA_offsets,
+    to_Shift_JIS_E7_AA_infos,
+
+#define to_Shift_JIS_E7_AB_infos WORDINDEX2INFO(15324)
+           INVALID,         UNDEF, o2(0x8a,0x96), o2(0xe2,0x82),
+     o2(0xe2,0x81), o2(0xe2,0x85), o2(0xe2,0x7d), o2(0xe2,0x86),
+     o2(0x97,0xa7), o2(0xe2,0x87), o2(0xe2,0x88), o2(0x9a,0xf2),
+     o2(0xe2,0x8a), o2(0xe2,0x89), o2(0xe2,0x8b), o2(0xe2,0x8c),
+     o2(0x97,0xb3), o2(0xe2,0x8d), o2(0xe8,0xed), o2(0x8f,0xcd),
+     o2(0xe2,0x8e), o2(0xe2,0x8f), o2(0x8f,0x76), o2(0x93,0xb6),
+     o2(0xe2,0x90), o2(0x92,0x47), o2(0xe2,0x91), o2(0x92,0x5b),
+     o2(0xe2,0x92), o2(0x8b,0xa3), o2(0x99,0x5e), o2(0x92,0x7c),
+     o2(0x8e,0xb1), o2(0x8a,0xc6),
+
+#define to_Shift_JIS_E7_AB WORDINDEX2INFO(15358)
+    to_Shift_JIS_E7_AB_offsets,
+    to_Shift_JIS_E7_AB_infos,
+
+#define to_Shift_JIS_E7_AC_infos WORDINDEX2INFO(15360)
+           INVALID,         UNDEF, o2(0xe2,0x93), o2(0xe2,0xa0),
+     o2(0xe2,0x96), o2(0x8b,0x88), o2(0xe2,0x95), o2(0xe2,0xa2),
+     o2(0xe2,0x94), o2(0x8f,0xce), o2(0xe2,0x98), o2(0xe2,0x99),
+     o2(0x93,0x4a), o2(0xe2,0x9a), o2(0x8a,0x7d), o2(0x90,0x79),
+     o2(0x95,0x84), o2(0xe2,0x9c), o2(0x91,0xe6), o2(0xe2,0x97),
+     o2(0xe2,0x9b), o2(0xe2,0x9d), o2(0x8d,0xf9),
+
+#define to_Shift_JIS_E7_AC WORDINDEX2INFO(15383)
+    to_Shift_JIS_E7_AC_offsets,
+    to_Shift_JIS_E7_AC_infos,
+
+#define to_Shift_JIS_E7_AD_infos WORDINDEX2INFO(15385)
+           INVALID,         UNDEF, o2(0xe2,0xa4), o2(0x95,0x4d),
+     o2(0x94,0xa4), o2(0x93,0x99), o2(0x8b,0xd8), o2(0xe2,0xa3),
+     o2(0xe2,0xa1), o2(0x94,0xb3), o2(0xe2,0x9e), o2(0x92,0x7d),
+     o2(0x93,0x9b), o2(0x93,0x9a), o2(0x8d,0xf4), o2(0xe2,0xb6),
+     o2(0xe2,0xa6), o2(0xe2,0xa8), o2(0xe2,0xab), o2(0xe2,0xac),
+     o2(0xe2,0xa9), o2(0xe2,0xaa), o2(0xe2,0xa7), o2(0xe2,0xa5),
+     o2(0xe2,0x9f),
+
+#define to_Shift_JIS_E7_AD WORDINDEX2INFO(15410)
+    to_Shift_JIS_E7_AD_offsets,
+    to_Shift_JIS_E7_AD_infos,
+
+#define to_Shift_JIS_E7_AE_infos WORDINDEX2INFO(15412)
+           INVALID,         UNDEF, o2(0x95,0xcd), o2(0x89,0xd3),
+     o2(0xe2,0xb3), o2(0xe2,0xb0), o2(0xe2,0xb5), o2(0xe2,0xb4),
+     o2(0x94,0x93), o2(0x96,0xa5), o2(0x8e,0x5a), o2(0xe2,0xae),
+     o2(0xe2,0xb7), o2(0xe2,0xb2), o2(0xe2,0xb1), o2(0xe2,0xad),
+     o2(0xe2,0xaf), o2(0x8a,0xc7), o2(0x92,0x5c), o2(0x90,0xfb),
+     o2(0x94,0xa0), o2(0xe2,0xbc), o2(0x94,0xa2),
+
+#define to_Shift_JIS_E7_AE WORDINDEX2INFO(15435)
+    to_Shift_JIS_E7_AE_offsets,
+    to_Shift_JIS_E7_AE_infos,
+
+#define to_Shift_JIS_E7_AF_infos WORDINDEX2INFO(15437)
+           INVALID, o2(0x90,0xdf), o2(0xe2,0xb9),         UNDEF,
+     o2(0x94,0xcd), o2(0xe2,0xbd), o2(0x95,0xd1), o2(0x92,0x7a),
+     o2(0xe2,0xb8), o2(0xe2,0xba), o2(0xe2,0xbb), o2(0xe2,0xbe),
+     o2(0x8e,0xc2), o2(0x93,0xc4), o2(0xe2,0xc3), o2(0xe2,0xc2),
+     o2(0xe2,0xbf), o2(0x98,0x55), o2(0xe2,0xc8), o2(0xe2,0xcc),
+     o2(0xe2,0xc9),
+
+#define to_Shift_JIS_E7_AF WORDINDEX2INFO(15458)
+    to_Shift_JIS_E7_AF_offsets,
+    to_Shift_JIS_E7_AF_infos,
+
+#define to_Shift_JIS_E7_B0_infos WORDINDEX2INFO(15460)
+           INVALID, o2(0xe2,0xc5),         UNDEF, o2(0xe2,0xc6),
+     o2(0xe2,0xcb), o2(0xe2,0xc0), o2(0x99,0xd3), o2(0xe2,0xc7),
+     o2(0xe2,0xc1), o2(0xe2,0xca), o2(0xe2,0xd0), o2(0x8a,0xc8),
+     o2(0xe2,0xcd), o2(0xe2,0xce), o2(0xe2,0xcf), o2(0xe2,0xd2),
+     o2(0xe2,0xd1), o2(0x94,0xf4), o2(0xe2,0xd3), o2(0x97,0xfa),
+     o2(0x95,0xeb),
+
+#define to_Shift_JIS_E7_B0 WORDINDEX2INFO(15481)
+    to_Shift_JIS_E7_B0_offsets,
+    to_Shift_JIS_E7_B0_infos,
+
+#define to_Shift_JIS_E7_B1_infos WORDINDEX2INFO(15483)
+           INVALID, o2(0xe2,0xd8),         UNDEF, o2(0xe2,0xd5),
+     o2(0xe2,0xd4), o2(0x90,0xd0), o2(0xe2,0xd7), o2(0xe2,0xd9),
+     o2(0xe2,0xd6), o2(0xe2,0xdd), o2(0xe2,0xda), o2(0xe2,0xdb),
+     o2(0xe2,0xc4), o2(0xe2,0xdc), o2(0xe2,0xde), o2(0xe2,0xdf),
+     o2(0x95,0xc4), o2(0xe2,0xe0), o2(0x96,0xe0),
+
+#define to_Shift_JIS_E7_B1 WORDINDEX2INFO(15502)
+    to_Shift_JIS_E7_B1_offsets,
+    to_Shift_JIS_E7_B1_infos,
+
+#define to_Shift_JIS_E7_B2_infos WORDINDEX2INFO(15504)
+           INVALID,         UNDEF, o2(0x8b,0xcc), o2(0x8c,0x48),
+     o2(0xe2,0xe1), o2(0x95,0xb2), o2(0x90,0x88), o2(0x96,0xae),
+     o2(0xe2,0xe2), o2(0x97,0xb1), o2(0x94,0x94), o2(0x91,0x65),
+     o2(0x94,0x53), o2(0x8f,0x6c), o2(0x88,0xbe), o2(0xe2,0xe7),
+     o2(0xe2,0xe5), o2(0xe2,0xe3), o2(0x8a,0x9f), o2(0x8f,0xcf),
+     o2(0xe2,0xe8), o2(0xe2,0xe6), o2(0xe2,0xe4), o2(0xe2,0xec),
+     o2(0xe2,0xeb), o2(0xe2,0xea), o2(0xe2,0xe9), o2(0xe2,0xed),
+     o2(0xe2,0xee), o2(0x90,0xb8),
+
+#define to_Shift_JIS_E7_B2 WORDINDEX2INFO(15534)
+    to_Shift_JIS_E7_B2_offsets,
+    to_Shift_JIS_E7_B2_infos,
+
+#define to_Shift_JIS_E7_B3_infos WORDINDEX2INFO(15536)
+           INVALID, o2(0xe2,0xef),         UNDEF, o2(0xe2,0xf1),
+     o2(0xe2,0xf0), o2(0x8c,0xd0), o2(0x91,0x57), o2(0xe2,0xf3),
+     o2(0x93,0x9c), o2(0xe2,0xf2), o2(0xe2,0xf4), o2(0x95,0xb3),
+     o2(0x91,0x8c), o2(0x8d,0x66), o2(0xe2,0xf5), o2(0x97,0xc6),
+     o2(0xe2,0xf7), o2(0xe2,0xf8), o2(0xe2,0xf9), o2(0xe2,0xfa),
+     o2(0x8e,0x85), o2(0xe2,0xfb), o2(0x8c,0x6e), o2(0x8b,0x8a),
+
+#define to_Shift_JIS_E7_B3 WORDINDEX2INFO(15560)
+    to_Shift_JIS_E7_B3_offsets,
+    to_Shift_JIS_E7_B3_infos,
+
+#define to_Shift_JIS_E7_B4_infos WORDINDEX2INFO(15562)
+           INVALID, o2(0x8b,0x49),         UNDEF, o2(0xe3,0x40),
+     o2(0x96,0xf1), o2(0x8d,0x67), o2(0xe2,0xfc), o2(0xe3,0x43),
+     o2(0x96,0xe4), o2(0x94,0x5b), o2(0x95,0x52), o2(0x8f,0x83),
+     o2(0xe3,0x42), o2(0x8e,0xd1), o2(0x8d,0x68), o2(0x8e,0x86),
+     o2(0x8b,0x89), o2(0x95,0xb4), o2(0xe3,0x41), o2(0x91,0x66),
+     o2(0x96,0x61), o2(0x8d,0xf5), o2(0x8e,0x87), o2(0x92,0xdb),
+     o2(0xe3,0x46), o2(0x97,0xdd), o2(0x8d,0xd7), o2(0xe3,0x47),
+     o2(0x90,0x61), o2(0xe3,0x49), o2(0x8f,0xd0), o2(0x8d,0xae),
+     o2(0xe3,0x48),
+
+#define to_Shift_JIS_E7_B4 WORDINDEX2INFO(15595)
+    to_Shift_JIS_E7_B4_offsets,
+    to_Shift_JIS_E7_B4_infos,
+
+#define to_Shift_JIS_E7_B5_infos WORDINDEX2INFO(15597)
+           INVALID,         UNDEF, o2(0x8f,0x49), o2(0x8c,0xbc),
+     o2(0x91,0x67), o2(0xe3,0x44), o2(0xe3,0x4a), o2(0xe3,0x45),
+     o2(0x8c,0x6f), o2(0xe3,0x4d), o2(0xe3,0x51), o2(0x8c,0x8b),
+     o2(0xe3,0x4c), o2(0xe3,0x55), o2(0x8d,0x69), o2(0x97,0x8d),
+     o2(0x88,0xba), o2(0xe3,0x52), o2(0x8b,0x8b), o2(0xe3,0x4f),
+     o2(0xe3,0x50), o2(0x93,0x9d), o2(0xe3,0x4e), o2(0xe3,0x4b),
+     o2(0x8a,0x47), o2(0x90,0xe2), o2(0x8c,0xa6), o2(0xe3,0x57),
+
+#define to_Shift_JIS_E7_B5 WORDINDEX2INFO(15625)
+    to_Shift_JIS_E7_B5_offsets,
+    to_Shift_JIS_E7_B5_infos,
+
+#define to_Shift_JIS_E7_B6_infos WORDINDEX2INFO(15627)
+           INVALID,         UNDEF, o2(0xe3,0x54), o2(0xe3,0x56),
+     o2(0xe3,0x53), o2(0x8c,0x70), o2(0x91,0xb1), o2(0xe3,0x58),
+     o2(0x91,0x8e), o2(0xe3,0x65), o2(0xe3,0x61), o2(0xe3,0x5b),
+     o2(0xe3,0x5f), o2(0x8e,0xf8), o2(0x88,0xdb), o2(0xe3,0x5a),
+     o2(0xe3,0x62), o2(0xe3,0x66), o2(0x8d,0x6a), o2(0x96,0xd4),
+     o2(0x92,0xd4), o2(0xe3,0x5c), o2(0xe3,0x64), o2(0xe3,0x59),
+     o2(0x92,0x5d), o2(0xe3,0x5e), o2(0x88,0xbb), o2(0x96,0xc8),
+
+#define to_Shift_JIS_E7_B6 WORDINDEX2INFO(15655)
+    to_Shift_JIS_E7_B6_offsets,
+    to_Shift_JIS_E7_B6_infos,
+
+#define to_Shift_JIS_E7_B7_infos WORDINDEX2INFO(15657)
+           INVALID,         UNDEF, o2(0xe3,0x5d), o2(0x8b,0xd9),
+     o2(0x94,0xea), o2(0x91,0x8d), o2(0x97,0xce), o2(0x8f,0x8f),
+     o2(0xe3,0x8e), o2(0xe3,0x67), o2(0x90,0xfc), o2(0xe3,0x63),
+     o2(0xe3,0x68), o2(0xe3,0x6a), o2(0x92,0xf7), o2(0xe3,0x6d),
+     o2(0xe3,0x69), o2(0x95,0xd2), o2(0x8a,0xc9), o2(0x96,0xc9),
+     o2(0x88,0xdc), o2(0xe3,0x6c), o2(0x97,0xfb), o2(0xe3,0x6b),
+
+#define to_Shift_JIS_E7_B7 WORDINDEX2INFO(15681)
+    to_Shift_JIS_E7_B7_offsets,
+    to_Shift_JIS_E7_B7_infos,
+
+#define to_Shift_JIS_E7_B8_infos WORDINDEX2INFO(15683)
+           INVALID,         UNDEF, o2(0x89,0x8f), o2(0x93,0xea),
+     o2(0xe3,0x6e), o2(0xe3,0x75), o2(0xe3,0x6f), o2(0xe3,0x76),
+     o2(0xe3,0x72), o2(0x94,0x9b), o2(0x8e,0xc8), o2(0xe3,0x74),
+     o2(0xe3,0x71), o2(0xe3,0x77), o2(0xe3,0x70), o2(0x8f,0x63),
+     o2(0x96,0x44), o2(0x8f,0x6b), o2(0xe3,0x73), o2(0xe3,0x80),
+     o2(0xe3,0x7b), o2(0xe3,0x7e), o2(0xe3,0x7c), o2(0xe3,0x81),
+     o2(0xe3,0x7a), o2(0xe3,0x60), o2(0x90,0xd1),
+
+#define to_Shift_JIS_E7_B8 WORDINDEX2INFO(15710)
+    to_Shift_JIS_E7_B8_offsets,
+    to_Shift_JIS_E7_B8_infos,
+
+#define to_Shift_JIS_E7_B9_infos WORDINDEX2INFO(15712)
+           INVALID,         UNDEF, o2(0x94,0xc9), o2(0xe3,0x7d),
+     o2(0xe3,0x78), o2(0x91,0x40), o2(0x8c,0x71), o2(0x8f,0x4a),
+     o2(0x90,0x44), o2(0x91,0x55), o2(0xe3,0x84), o2(0xe3,0x86),
+     o2(0xe3,0x87), o2(0xe3,0x83), o2(0xe3,0x85), o2(0xe3,0x79),
+     o2(0xe3,0x82), o2(0xe3,0x8a), o2(0xe3,0x89), o2(0x96,0x9a),
+     o2(0x8c,0x4a), o2(0xe3,0x88), o2(0xe3,0x8c), o2(0xe3,0x8b),
+     o2(0xe3,0x8f), o2(0xe3,0x91),
+
+#define to_Shift_JIS_E7_B9 WORDINDEX2INFO(15738)
+    to_Shift_JIS_E7_B9_offsets,
+    to_Shift_JIS_E7_B9_infos,
+
+#define to_Shift_JIS_E7_BA_infos WORDINDEX2INFO(15740)
+           INVALID,         UNDEF, o2(0x8e,0x5b), o2(0xe3,0x8d),
+     o2(0xe3,0x92), o2(0xe3,0x93), o2(0xe3,0x94), o2(0xe3,0x9a),
+     o2(0x93,0x5a), o2(0xe3,0x96), o2(0xe3,0x95), o2(0xe3,0x97),
+     o2(0xe3,0x98), o2(0xe3,0x99), o2(0xe3,0x9b), o2(0xe3,0x9c),
+
+#define to_Shift_JIS_E7_BA WORDINDEX2INFO(15756)
+    to_Shift_JIS_E7_BA_offsets,
+    to_Shift_JIS_E7_BA_infos,
+
+#define to_Shift_JIS_E7_BC_infos WORDINDEX2INFO(15758)
+           INVALID,         UNDEF, o2(0x8a,0xca), o2(0xe3,0x9d),
+     o2(0xe3,0x9e),
+
+#define to_Shift_JIS_E7_BC WORDINDEX2INFO(15763)
+    to_Shift_JIS_E7_BC_offsets,
+    to_Shift_JIS_E7_BC_infos,
+
+#define to_Shift_JIS_E7_BD_infos WORDINDEX2INFO(15765)
+           INVALID,         UNDEF, o2(0xe3,0x9f), o2(0xe3,0xa0),
+     o2(0xe3,0xa1), o2(0xe3,0xa2), o2(0xe3,0xa3), o2(0xe3,0xa4),
+     o2(0xe3,0xa6), o2(0xe3,0xa5), o2(0xe3,0xa7), o2(0xe3,0xa8),
+     o2(0xe3,0xa9), o2(0xe3,0xac), o2(0xe3,0xaa), o2(0xe3,0xab),
+     o2(0x8d,0xdf), o2(0x8c,0x72), o2(0x92,0x75), o2(0x94,0xb1),
+     o2(0x8f,0x90), o2(0x94,0x6c), o2(0x94,0xeb), o2(0xe3,0xad),
+     o2(0x9c,0xeb),
+
+#define to_Shift_JIS_E7_BD WORDINDEX2INFO(15790)
+    to_Shift_JIS_E7_BD_offsets,
+    to_Shift_JIS_E7_BD_infos,
+
+#define to_Shift_JIS_E7_BE_infos WORDINDEX2INFO(15792)
+           INVALID,         UNDEF, o2(0xe3,0xae), o2(0xe3,0xb0),
+     o2(0x97,0x85), o2(0xe3,0xaf), o2(0xe3,0xb2), o2(0xe3,0xb1),
+     o2(0x97,0x72), o2(0xe3,0xb3), o2(0x94,0xfc), o2(0xe3,0xb4),
+     o2(0xe3,0xb7), o2(0xe3,0xb6), o2(0xe3,0xb5), o2(0xe3,0xb8),
+     o2(0x8c,0x51), o2(0x91,0x41), o2(0x8b,0x60), o2(0xe3,0xbc),
+     o2(0xe3,0xb9), o2(0xe3,0xba), o2(0xe3,0xbd), o2(0xe3,0xbe),
+     o2(0xe3,0xbb), o2(0x89,0x48),
+
+#define to_Shift_JIS_E7_BE WORDINDEX2INFO(15818)
+    to_Shift_JIS_E7_BE_offsets,
+    to_Shift_JIS_E7_BE_infos,
+
+#define to_Shift_JIS_E7_BF_infos WORDINDEX2INFO(15820)
+           INVALID,         UNDEF, o2(0x89,0xa5), o2(0xe3,0xc0),
+     o2(0xe3,0xc1), o2(0xe3,0xc2), o2(0x97,0x82), o2(0x8f,0x4b),
+     o2(0xe3,0xc4), o2(0xe3,0xc3), o2(0x90,0x89), o2(0xe3,0xc5),
+     o2(0xe3,0xc6), o2(0xe3,0xc7), o2(0x8a,0xe3), o2(0x8a,0xcb),
+     o2(0xe3,0xc8), o2(0xe3,0xc9), o2(0x96,0x7c), o2(0x97,0x83),
+
+#define to_Shift_JIS_E7_BF WORDINDEX2INFO(15840)
+    to_Shift_JIS_E7_BF_offsets,
+    to_Shift_JIS_E7_BF_infos,
+
+#define to_Shift_JIS_E7_infos WORDINDEX2INFO(15842)
+                INVALID, to_Shift_JIS_E7_80,
+     to_Shift_JIS_E7_81, to_Shift_JIS_E7_82,
+     to_Shift_JIS_E7_83, to_Shift_JIS_E7_84,
+     to_Shift_JIS_E7_85, to_Shift_JIS_E7_86,
+     to_Shift_JIS_E7_87, to_Shift_JIS_E7_88,
+     to_Shift_JIS_E7_89, to_Shift_JIS_E7_8A,
+     to_Shift_JIS_E7_8B, to_Shift_JIS_E7_8C,
+     to_Shift_JIS_E7_8D, to_Shift_JIS_E7_8E,
+     to_Shift_JIS_E7_8F, to_Shift_JIS_E7_90,
+     to_Shift_JIS_E7_91, to_Shift_JIS_E7_92,
+     to_Shift_JIS_E7_93, to_Shift_JIS_E7_94,
+     to_Shift_JIS_E7_95, to_Shift_JIS_E7_96,
+     to_Shift_JIS_E7_97, to_Shift_JIS_E7_98,
+     to_Shift_JIS_E7_99, to_Shift_JIS_E7_9A,
+     to_Shift_JIS_E7_9B, to_Shift_JIS_E7_9C,
+     to_Shift_JIS_E7_9D, to_Shift_JIS_E7_9E,
+     to_Shift_JIS_E7_9F, to_Shift_JIS_E7_A0,
+     to_Shift_JIS_E7_A1, to_Shift_JIS_E7_A2,
+     to_Shift_JIS_E7_A3, to_Shift_JIS_E7_A4,
+     to_Shift_JIS_E7_A5, to_Shift_JIS_E7_A6,
+     to_Shift_JIS_E7_A7, to_Shift_JIS_E7_A8,
+     to_Shift_JIS_E7_A9, to_Shift_JIS_E7_AA,
+     to_Shift_JIS_E7_AB, to_Shift_JIS_E7_AC,
+     to_Shift_JIS_E7_AD, to_Shift_JIS_E7_AE,
+     to_Shift_JIS_E7_AF, to_Shift_JIS_E7_B0,
+     to_Shift_JIS_E7_B1, to_Shift_JIS_E7_B2,
+     to_Shift_JIS_E7_B3, to_Shift_JIS_E7_B4,
+     to_Shift_JIS_E7_B5, to_Shift_JIS_E7_B6,
+     to_Shift_JIS_E7_B7, to_Shift_JIS_E7_B8,
+     to_Shift_JIS_E7_B9, to_Shift_JIS_E7_BA,
+        to_Shift_JIS_C4, to_Shift_JIS_E7_BC,
+     to_Shift_JIS_E7_BD, to_Shift_JIS_E7_BE,
+     to_Shift_JIS_E7_BF,
+
+#define to_Shift_JIS_E7 WORDINDEX2INFO(15907)
+    to_Shift_JIS_E3_81_offsets,
+    to_Shift_JIS_E7_infos,
+
+#define to_Shift_JIS_E8_80_infos WORDINDEX2INFO(15909)
+           INVALID, o2(0x97,0x73), o2(0x98,0x56),         UNDEF,
+     o2(0x8d,0x6c), o2(0xe3,0xcc), o2(0x8e,0xd2), o2(0xe3,0xcb),
+     o2(0xe3,0xcd), o2(0x8e,0xa7), o2(0x91,0xcf), o2(0xe3,0xce),
+     o2(0x8d,0x6b), o2(0x96,0xd5), o2(0xe3,0xcf), o2(0xe3,0xd0),
+     o2(0xe3,0xd1), o2(0xe3,0xd2), o2(0xe3,0xd3), o2(0x8e,0xa8),
+     o2(0x96,0xeb), o2(0xe3,0xd5), o2(0x92,0x5e), o2(0xe3,0xd4),
+
+#define to_Shift_JIS_E8_80 WORDINDEX2INFO(15933)
+    to_Shift_JIS_E8_80_offsets,
+    to_Shift_JIS_E8_80_infos,
+
+#define to_Shift_JIS_E8_81_infos WORDINDEX2INFO(15935)
+           INVALID,         UNDEF, o2(0xe3,0xd7), o2(0xe3,0xd6),
+     o2(0xe3,0xd8), o2(0x90,0xb9), o2(0xe3,0xd9), o2(0xe3,0xda),
+     o2(0x95,0xb7), o2(0xe3,0xdb), o2(0x91,0x8f), o2(0xe3,0xdc),
+     o2(0xe3,0xdd), o2(0x97,0xfc), o2(0xe3,0xe0), o2(0xe3,0xdf),
+     o2(0xe3,0xde), o2(0x92,0xae), o2(0xe3,0xe1), o2(0x90,0x45),
+     o2(0xe3,0xe2), o2(0xe3,0xe3), o2(0x98,0x57), o2(0xe3,0xe4),
+
+#define to_Shift_JIS_E8_81 WORDINDEX2INFO(15959)
+    to_Shift_JIS_E8_81_offsets,
+    to_Shift_JIS_E8_81_infos,
+
+#define to_Shift_JIS_E8_82_infos WORDINDEX2INFO(15961)
+           INVALID,         UNDEF, o2(0xe3,0xe5), o2(0xe3,0xe7),
+     o2(0xe3,0xe6), o2(0x94,0xa3), o2(0x93,0xf7), o2(0x98,0x5d),
+     o2(0x94,0xa7), o2(0xe3,0xe9), o2(0x8f,0xd1), o2(0x95,0x49),
+     o2(0xe3,0xea), o2(0xe3,0xe8), o2(0x8a,0xcc), o2(0x8c,0xd2),
+     o2(0x8e,0x88), o2(0x94,0xec), o2(0x8c,0xa8), o2(0x96,0x62),
+     o2(0xe3,0xed), o2(0xe3,0xeb), o2(0x8d,0x6d), o2(0x8d,0x6e),
+     o2(0x88,0xe7), o2(0x8d,0xe6), o2(0x94,0x78),
+
+#define to_Shift_JIS_E8_82 WORDINDEX2INFO(15988)
+    to_Shift_JIS_E8_82_offsets,
+    to_Shift_JIS_E8_82_infos,
+
+#define to_Shift_JIS_E8_83_infos WORDINDEX2INFO(15990)
+           INVALID,         UNDEF, o2(0x88,0xdd), o2(0xe3,0xf2),
+     o2(0x92,0x5f), o2(0x94,0x77), o2(0x91,0xd9), o2(0xe3,0xf4),
+     o2(0xe3,0xf0), o2(0xe3,0xf3), o2(0xe3,0xee), o2(0xe3,0xf1),
+     o2(0x96,0x45), o2(0x8c,0xd3), o2(0x88,0xfb), o2(0xe3,0xef),
+     o2(0xe3,0xf6), o2(0xe3,0xf7), o2(0x93,0xb7), o2(0x8b,0xb9),
+     o2(0xe4,0x45), o2(0x94,0x5c),
+
+#define to_Shift_JIS_E8_83 WORDINDEX2INFO(16012)
+    to_Shift_JIS_E8_83_offsets,
+    to_Shift_JIS_E8_83_infos,
+
+#define to_Shift_JIS_E8_84_infos WORDINDEX2INFO(16014)
+           INVALID,         UNDEF, o2(0x8e,0x89), o2(0x8b,0xba),
+     o2(0x90,0xc6), o2(0x98,0x65), o2(0x96,0xac), o2(0xe3,0xf5),
+     o2(0x90,0xd2), o2(0x8b,0x72), o2(0xe3,0xf8), o2(0xe3,0xfa),
+     o2(0xe3,0xf9), o2(0xe3,0xfb), o2(0x92,0x45), o2(0x94,0x5d),
+     o2(0x92,0xaf), o2(0xe4,0x42),
+
+#define to_Shift_JIS_E8_84 WORDINDEX2INFO(16032)
+    to_Shift_JIS_E8_84_offsets,
+    to_Shift_JIS_E8_84_infos,
+
+#define to_Shift_JIS_E8_85_infos WORDINDEX2INFO(16034)
+           INVALID,         UNDEF, o2(0xe4,0x41), o2(0xe3,0xfc),
+     o2(0x90,0x74), o2(0x95,0x85), o2(0xe4,0x44), o2(0xe4,0x43),
+     o2(0x8d,0x6f), o2(0x98,0x72), o2(0xe4,0x54), o2(0xe4,0x48),
+     o2(0xe4,0x49), o2(0x8e,0xee), o2(0xe4,0x47), o2(0x8d,0x98),
+     o2(0xe4,0x46), o2(0xe4,0x4a), o2(0x92,0xb0), o2(0x95,0xa0),
+     o2(0x91,0x42), o2(0x91,0xda),
+
+#define to_Shift_JIS_E8_85 WORDINDEX2INFO(16056)
+    to_Shift_JIS_E8_85_offsets,
+    to_Shift_JIS_E8_85_infos,
+
+#define to_Shift_JIS_E8_86_infos WORDINDEX2INFO(16058)
+           INVALID, o2(0xe4,0x4e),         UNDEF, o2(0xe4,0x4f),
+     o2(0xe4,0x4b), o2(0xe4,0x4c), o2(0xe4,0x4d), o2(0x8d,0x70),
+     o2(0xe4,0x55), o2(0xe4,0x51), o2(0x95,0x86), o2(0x96,0x8c),
+     o2(0x95,0x47), o2(0xe4,0x50), o2(0xe4,0x53), o2(0xe4,0x52),
+     o2(0x96,0x63), o2(0xe4,0x56), o2(0xe4,0x57), o2(0x91,0x56),
+     o2(0xe4,0x58), o2(0xe4,0x5a), o2(0xe4,0x5e), o2(0xe4,0x5b),
+     o2(0xe4,0x59), o2(0x94,0x5e),
+
+#define to_Shift_JIS_E8_86 WORDINDEX2INFO(16084)
+    to_Shift_JIS_E8_86_offsets,
+    to_Shift_JIS_E8_86_infos,
+
+#define to_Shift_JIS_E8_87_infos WORDINDEX2INFO(16086)
+           INVALID, o2(0xe4,0x5c),         UNDEF, o2(0xe4,0x5d),
+     o2(0x89,0xb0), o2(0xe4,0x64), o2(0xe4,0x5f), o2(0xe4,0x60),
+     o2(0xe4,0x61), o2(0x91,0x9f), o2(0xe4,0x63), o2(0xe4,0x62),
+     o2(0xe4,0x65), o2(0xe4,0x66), o2(0xe4,0x67), o2(0x90,0x62),
+     o2(0x89,0xe7), o2(0xe4,0x68), o2(0x97,0xd5), o2(0x8e,0xa9),
+     o2(0x8f,0x4c), o2(0x8e,0x8a), o2(0x92,0x76), o2(0xe4,0x69),
+     o2(0xe4,0x6a), o2(0x89,0x50), o2(0xe4,0x6b),
+
+#define to_Shift_JIS_E8_87 WORDINDEX2INFO(16113)
+    to_Shift_JIS_E8_87_offsets,
+    to_Shift_JIS_E8_87_infos,
+
+#define to_Shift_JIS_E8_88_infos WORDINDEX2INFO(16115)
+           INVALID,         UNDEF, o2(0xe4,0x6c), o2(0xe4,0x6d),
+     o2(0xe4,0x6e), o2(0xe4,0x6f), o2(0x8b,0xbb), o2(0x9d,0xa8),
+     o2(0xe4,0x70), o2(0x90,0xe3), o2(0xe4,0x71), o2(0x8e,0xc9),
+     o2(0xe4,0x72), o2(0x98,0xae), o2(0xe4,0x73), o2(0x95,0xdc),
+     o2(0x8a,0xda), o2(0x91,0x43), o2(0x8f,0x77), o2(0x95,0x91),
+     o2(0x8f,0x4d), o2(0xe4,0x74), o2(0x8d,0x71), o2(0xe4,0x75),
+     o2(0x94,0xca), o2(0xe4,0x84), o2(0xe4,0x77), o2(0x91,0xc7),
+     o2(0x94,0x95), o2(0x8c,0xbd), o2(0xe4,0x76), o2(0x91,0x44),
+
+#define to_Shift_JIS_E8_88 WORDINDEX2INFO(16147)
+    to_Shift_JIS_E8_88_offsets,
+    to_Shift_JIS_E8_88_infos,
+
+#define to_Shift_JIS_E8_89_infos WORDINDEX2INFO(16149)
+           INVALID, o2(0xe4,0x78),         UNDEF, o2(0x92,0xf8),
+     o2(0xe4,0x7a), o2(0xe4,0x79), o2(0xe4,0x7c), o2(0xe4,0x7b),
+     o2(0xe4,0x7d), o2(0xe4,0x80), o2(0xe4,0x7e), o2(0x8a,0xcd),
+     o2(0xe4,0x81), o2(0xe4,0x82), o2(0xe4,0x83), o2(0x8d,0xaf),
+     o2(0x97,0xc7), o2(0xe4,0x85), o2(0x90,0x46), o2(0x89,0x90),
+     o2(0xe4,0x86), o2(0xe4,0x87), o2(0xe4,0x88),
+
+#define to_Shift_JIS_E8_89 WORDINDEX2INFO(16172)
+    to_Shift_JIS_E8_89_offsets,
+    to_Shift_JIS_E8_89_infos,
+
+#define to_Shift_JIS_E8_8A_infos WORDINDEX2INFO(16174)
+           INVALID,         UNDEF, o2(0x88,0xf0), o2(0xe4,0x89),
+     o2(0xe4,0x8a), o2(0x95,0x87), o2(0x8e,0xc5), o2(0xe4,0x8c),
+     o2(0x8a,0x48), o2(0x88,0xb0), o2(0xe4,0x8b), o2(0xe4,0x8e),
+     o2(0x94,0x6d), o2(0x90,0x63), o2(0x89,0xd4), o2(0x96,0x46),
+     o2(0x8c,0x7c), o2(0x8b,0xda), o2(0xe4,0x8d), o2(0x89,0xe8),
+
+#define to_Shift_JIS_E8_8A WORDINDEX2INFO(16194)
+    to_Shift_JIS_E8_8A_offsets,
+    to_Shift_JIS_E8_8A_infos,
+
+#define to_Shift_JIS_E8_8B_infos WORDINDEX2INFO(16196)
+           INVALID,         UNDEF, o2(0x8a,0xa1), o2(0x89,0x91),
+     o2(0xe4,0x92), o2(0x97,0xe8), o2(0x91,0xdb), o2(0x95,0x63),
+     o2(0xe4,0x9e), o2(0x89,0xd5), o2(0xe4,0x9c), o2(0xe4,0x9a),
+     o2(0xe4,0x91), o2(0xe4,0x8f), o2(0xe4,0x90), o2(0x8e,0xe1),
+     o2(0x8b,0xea), o2(0x92,0x97), o2(0x93,0xcf), o2(0x89,0x70),
+     o2(0xe4,0x94), o2(0xe4,0x93), o2(0xe4,0x99), o2(0xe4,0x95),
+     o2(0xe4,0x98),
+
+#define to_Shift_JIS_E8_8B WORDINDEX2INFO(16221)
+    to_Shift_JIS_E8_8B_offsets,
+    to_Shift_JIS_E8_8B_infos,
+
+#define to_Shift_JIS_E8_8C_infos WORDINDEX2INFO(16223)
+           INVALID,         UNDEF, o2(0x96,0xce), o2(0xe4,0x97),
+     o2(0x89,0xd6), o2(0x8a,0x9d), o2(0xe4,0x9b), o2(0xe4,0x9d),
+     o2(0x8c,0x73), o2(0xe4,0xa1), o2(0xe4,0xaa), o2(0xe4,0xab),
+     o2(0x88,0xa9), o2(0xe4,0xb2), o2(0x88,0xef), o2(0xe4,0xa9),
+     o2(0xe4,0xa8), o2(0xe4,0xa3), o2(0xe4,0xa2), o2(0xe4,0xa0),
+     o2(0xe4,0x9f), o2(0x92,0x83), o2(0x91,0xf9), o2(0xe4,0xa5),
+
+#define to_Shift_JIS_E8_8C WORDINDEX2INFO(16247)
+    to_Shift_JIS_E8_8C_offsets,
+    to_Shift_JIS_E8_8C_infos,
+
+#define to_Shift_JIS_E8_8D_infos WORDINDEX2INFO(16249)
+           INVALID, o2(0xe4,0xa4),         UNDEF, o2(0xe4,0xa7),
+     o2(0x91,0x90), o2(0x8c,0x74), o2(0x89,0x60), o2(0xe4,0xa6),
+     o2(0x8d,0x72), o2(0x91,0x91), o2(0xe4,0xb8), o2(0xe4,0xb9),
+     o2(0x89,0xd7), o2(0x89,0xac), o2(0xe4,0xb6),
+
+#define to_Shift_JIS_E8_8D WORDINDEX2INFO(16264)
+    to_Shift_JIS_E8_8D_offsets,
+    to_Shift_JIS_E8_8D_infos,
+
+#define to_Shift_JIS_E8_8E_infos WORDINDEX2INFO(16266)
+           INVALID,         UNDEF, o2(0xe4,0xac), o2(0xe4,0xb4),
+     o2(0xe4,0xbb), o2(0xe4,0xb5), o2(0xe4,0xb3), o2(0xe4,0x96),
+     o2(0xe4,0xb1), o2(0xe4,0xad), o2(0x8a,0xce), o2(0xe4,0xaf),
+     o2(0xe4,0xba), o2(0xe4,0xb0), o2(0xe4,0xbc), o2(0xe4,0xae),
+     o2(0x94,0x9c), o2(0x97,0x89), o2(0xe4,0xb7), o2(0xe4,0xcd),
+
+#define to_Shift_JIS_E8_8E WORDINDEX2INFO(16286)
+    to_Shift_JIS_E8_8E_offsets,
+    to_Shift_JIS_E8_8E_infos,
+
+#define to_Shift_JIS_E8_8F_infos WORDINDEX2INFO(16288)
+           INVALID,         UNDEF, o2(0xe4,0xc5), o2(0x90,0x9b),
+     o2(0x8b,0x65), o2(0x8b,0xdb), o2(0xe4,0xc0), o2(0x89,0xd9),
+     o2(0x8f,0xd2), o2(0xe4,0xc3), o2(0x8d,0xd8), o2(0x93,0x70),
+     o2(0xe4,0xc8), o2(0x95,0xec), o2(0xe4,0xbf), o2(0x89,0xd8),
+     o2(0x8c,0xd4), o2(0x95,0x48), o2(0xe4,0xc9), o2(0xe4,0xbd),
+     o2(0xe4,0xc6), o2(0xe4,0xd0), o2(0xe4,0xc1),
+
+#define to_Shift_JIS_E8_8F WORDINDEX2INFO(16311)
+    to_Shift_JIS_E8_8F_offsets,
+    to_Shift_JIS_E8_8F_infos,
+
+#define to_Shift_JIS_E8_90_infos WORDINDEX2INFO(16313)
+           INVALID,         UNDEF, o2(0xe4,0xc2), o2(0x93,0xb8),
+     o2(0xe4,0xc7), o2(0xe4,0xc4), o2(0x96,0x47), o2(0xe4,0xca),
+     o2(0x88,0xde), o2(0xe4,0xbe), o2(0xe4,0xcc), o2(0xe4,0xcb),
+     o2(0x94,0x8b), o2(0xe4,0xd2), o2(0xe4,0xdd), o2(0x8a,0x9e),
+     o2(0xe4,0xe0), o2(0xe4,0xce), o2(0xe4,0xd3), o2(0x97,0x8e),
+
+#define to_Shift_JIS_E8_90 WORDINDEX2INFO(16333)
+    to_Shift_JIS_E8_90_offsets,
+    to_Shift_JIS_E8_90_infos,
+
+#define to_Shift_JIS_E8_91_infos WORDINDEX2INFO(16335)
+           INVALID,         UNDEF, o2(0xe4,0xdc), o2(0x97,0x74),
+     o2(0x97,0xa8), o2(0x92,0x98), o2(0x8a,0x8b), o2(0x95,0x92),
+     o2(0xe4,0xe2), o2(0x93,0x9f), o2(0x88,0xaf), o2(0xe4,0xdb),
+     o2(0xe4,0xd7), o2(0x91,0x92), o2(0xe4,0xd1), o2(0xe4,0xd9),
+     o2(0xe4,0xde), o2(0x94,0x4b), o2(0x88,0xa8), o2(0xe4,0xd6),
+     o2(0xe4,0xdf), o2(0x95,0x98),
+
+#define to_Shift_JIS_E8_91 WORDINDEX2INFO(16357)
+    to_Shift_JIS_E8_91_offsets,
+    to_Shift_JIS_E8_91_infos,
+
+#define to_Shift_JIS_E8_92_infos WORDINDEX2INFO(16359)
+           INVALID,         UNDEF, o2(0xe4,0xda), o2(0xe4,0xd5),
+     o2(0x8f,0xd3), o2(0x8f,0x4e), o2(0x8e,0xaa), o2(0x96,0xd6),
+     o2(0x95,0x66), o2(0xe4,0xe5), o2(0xe4,0xee), o2(0xe4,0xd8),
+     o2(0x8a,0x97), o2(0x8f,0xf6), o2(0xe4,0xe3), o2(0xe4,0xe8),
+     o2(0x91,0x93), o2(0xe4,0xe4),
+
+#define to_Shift_JIS_E8_92 WORDINDEX2INFO(16377)
+    to_Shift_JIS_E8_92_offsets,
+    to_Shift_JIS_E8_92_infos,
+
+#define to_Shift_JIS_E8_93_infos WORDINDEX2INFO(16379)
+           INVALID,         UNDEF, o2(0xe4,0xeb), o2(0x92,0x7e),
+     o2(0xe4,0xec), o2(0x97,0x75), o2(0xe4,0xe1), o2(0x8a,0x57),
+     o2(0xe4,0xe7), o2(0xe4,0xea), o2(0x96,0xaa), o2(0xe4,0xed),
+     o2(0xe4,0xe6), o2(0xe4,0xe9), o2(0x96,0x48), o2(0x98,0x40),
+     o2(0xe4,0xf1), o2(0xe4,0xf8), o2(0xe4,0xf0),
+
+#define to_Shift_JIS_E8_93 WORDINDEX2INFO(16398)
+    to_Shift_JIS_E8_93_offsets,
+    to_Shift_JIS_E8_93_infos,
+
+#define to_Shift_JIS_E8_94_infos WORDINDEX2INFO(16400)
+           INVALID, o2(0x8e,0xc1),         UNDEF, o2(0xe4,0xcf),
+     o2(0x95,0xcc), o2(0x96,0xa0), o2(0xe4,0xf7), o2(0xe4,0xf6),
+     o2(0xe4,0xf2), o2(0xe4,0xf3), o2(0x89,0x55), o2(0xe4,0xf5),
+     o2(0xe4,0xef), o2(0x92,0xd3), o2(0xe4,0xf4), o2(0x88,0xfc),
+     o2(0x91,0xa0), o2(0x95,0xc1),
+
+#define to_Shift_JIS_E8_94 WORDINDEX2INFO(16418)
+    to_Shift_JIS_E8_94_offsets,
+    to_Shift_JIS_E8_94_infos,
+
+#define to_Shift_JIS_E8_95_infos WORDINDEX2INFO(16420)
+           INVALID, o2(0xe4,0xf9), o2(0xe5,0x40),         UNDEF,
+     o2(0x94,0xd7), o2(0xe4,0xfc), o2(0x8f,0xd4), o2(0x8e,0xc7),
+     o2(0xe5,0x42), o2(0x8b,0xbc), o2(0xe5,0x43), o2(0x95,0x99),
+     o2(0xe4,0xfb), o2(0xe4,0xd4), o2(0xe4,0xfa), o2(0x98,0x6e),
+     o2(0x93,0xa0), o2(0x95,0x93), o2(0xe5,0x4a), o2(0xe5,0x50),
+     o2(0xe5,0x51),
+
+#define to_Shift_JIS_E8_95 WORDINDEX2INFO(16441)
+    to_Shift_JIS_E8_95_offsets,
+    to_Shift_JIS_E8_95_infos,
+
+#define to_Shift_JIS_E8_96_infos WORDINDEX2INFO(16443)
+           INVALID, o2(0xe5,0x44),         UNDEF, o2(0x94,0x96),
+     o2(0xe5,0x4e), o2(0xe5,0x46), o2(0xe5,0x48), o2(0xe5,0x52),
+     o2(0xe5,0x47), o2(0xe5,0x4b), o2(0x89,0x92), o2(0x93,0xe3),
+     o2(0xe5,0x4c), o2(0xe5,0x4f), o2(0xe5,0x45), o2(0x91,0x45),
+     o2(0xe5,0x49), o2(0x8e,0x46), o2(0x90,0x64), o2(0x8c,0x4f),
+     o2(0x96,0xf2), o2(0x96,0xf7), o2(0x8f,0x92), o2(0xe5,0x56),
+     o2(0xe5,0x54),
+
+#define to_Shift_JIS_E8_96 WORDINDEX2INFO(16468)
+    to_Shift_JIS_E8_96_offsets,
+    to_Shift_JIS_E8_96_infos,
+
+#define to_Shift_JIS_E8_97_infos WORDINDEX2INFO(16470)
+           INVALID,         UNDEF, o2(0x98,0x6d), o2(0xe5,0x53),
+     o2(0x97,0x95), o2(0xe5,0x55), o2(0xe5,0x57), o2(0xe5,0x58),
+     o2(0xe5,0x5b), o2(0xe5,0x59), o2(0x93,0xa1), o2(0xe5,0x5a),
+     o2(0x94,0xcb), o2(0xe5,0x4d), o2(0x8f,0x93), o2(0xe5,0x5c),
+     o2(0xe5,0x61), o2(0x91,0x94), o2(0xe5,0x60),
+
+#define to_Shift_JIS_E8_97 WORDINDEX2INFO(16489)
+    to_Shift_JIS_E8_97_offsets,
+    to_Shift_JIS_E8_97_infos,
+
+#define to_Shift_JIS_E8_98_infos WORDINDEX2INFO(16491)
+           INVALID,         UNDEF, o2(0xe5,0x41), o2(0xe5,0x62),
+     o2(0x91,0x68), o2(0xe5,0x5d), o2(0xe5,0x5f), o2(0xe5,0x5e),
+     o2(0x9f,0x50), o2(0x9f,0x41), o2(0xe5,0x64), o2(0xe5,0x63),
+     o2(0x97,0x96), o2(0xe1,0xba), o2(0xe5,0x65), o2(0xe5,0x66),
+
+#define to_Shift_JIS_E8_98 WORDINDEX2INFO(16507)
+    to_Shift_JIS_E8_98_offsets,
+    to_Shift_JIS_E8_98_infos,
+
+#define to_Shift_JIS_E8_99_infos WORDINDEX2INFO(16509)
+           INVALID,         UNDEF, o2(0xe5,0x67), o2(0x8c,0xd5),
+     o2(0x8b,0x73), o2(0xe5,0x69), o2(0x99,0x7c), o2(0x8b,0x95),
+     o2(0x97,0xb8), o2(0x8b,0xf1), o2(0xe5,0x6a), o2(0xe5,0x6b),
+     o2(0x92,0x8e), o2(0xe5,0x6c), o2(0x93,0xf8), o2(0x88,0xb8),
+
+#define to_Shift_JIS_E8_99 WORDINDEX2INFO(16525)
+    to_Shift_JIS_E8_99_offsets,
+    to_Shift_JIS_E8_99_infos,
+
+#define to_Shift_JIS_E8_9A_infos WORDINDEX2INFO(16527)
+           INVALID,         UNDEF, o2(0x89,0xe1), o2(0xe5,0x71),
+     o2(0xe5,0x72), o2(0xe5,0x6d), o2(0x8e,0x5c), o2(0xe5,0x6e),
+     o2(0x94,0x61), o2(0xe5,0x6f), o2(0xe5,0x70), o2(0xe5,0x7a),
+     o2(0xe5,0x74), o2(0xe5,0x77), o2(0xe5,0x73),
+
+#define to_Shift_JIS_E8_9A WORDINDEX2INFO(16542)
+    to_Shift_JIS_E8_9A_offsets,
+    to_Shift_JIS_E8_9A_infos,
+
+#define to_Shift_JIS_E8_9B_infos WORDINDEX2INFO(16544)
+           INVALID,         UNDEF, o2(0xe5,0x75), o2(0xe5,0x76),
+     o2(0x8e,0xd6), o2(0xe5,0x78), o2(0x92,0x60), o2(0x8c,0x75),
+     o2(0x8a,0x61), o2(0xe5,0x7b), o2(0x8a,0x5e), o2(0xe5,0x81),
+     o2(0xe5,0x7c), o2(0xe5,0x80), o2(0x94,0xb8), o2(0xe5,0x7d),
+     o2(0xe5,0x7e), o2(0x95,0x67), o2(0x94,0xd8), o2(0xe5,0x82),
+     o2(0x91,0xfb), o2(0xe5,0x8c), o2(0xe5,0x88), o2(0x89,0xe9),
+
+#define to_Shift_JIS_E8_9B WORDINDEX2INFO(16568)
+    to_Shift_JIS_E8_9B_offsets,
+    to_Shift_JIS_E8_9B_infos,
+
+#define to_Shift_JIS_E8_9C_infos WORDINDEX2INFO(16570)
+           INVALID, o2(0xe5,0x86),         UNDEF, o2(0x96,0x49),
+     o2(0xe5,0x87), o2(0xe5,0x84), o2(0xe5,0x85), o2(0xe5,0x8a),
+     o2(0xe5,0x8d), o2(0xe5,0x8b), o2(0xe5,0x89), o2(0xe5,0x83),
+     o2(0x92,0x77), o2(0xe5,0x94), o2(0x96,0xa8), o2(0xe5,0x92),
+     o2(0xe5,0x93), o2(0xe5,0x8e), o2(0xe5,0x90), o2(0xe5,0x91),
+     o2(0xe5,0x8f),
+
+#define to_Shift_JIS_E8_9C WORDINDEX2INFO(16591)
+    to_Shift_JIS_E8_9C_offsets,
+    to_Shift_JIS_E8_9C_infos,
+
+#define to_Shift_JIS_E8_9D_infos WORDINDEX2INFO(16593)
+           INVALID,         UNDEF, o2(0x90,0xe4), o2(0x98,0x58),
+     o2(0xe5,0x98), o2(0xe5,0x99), o2(0xe5,0x9f), o2(0x90,0x49),
+     o2(0xe5,0x9b), o2(0xe5,0x9e), o2(0xe5,0x96), o2(0xe5,0x95),
+     o2(0xe5,0xa0), o2(0x89,0xda), o2(0xe5,0x9c), o2(0xe5,0xa1),
+     o2(0xe5,0x9d), o2(0xe5,0x9a), o2(0x92,0xb1), o2(0xe5,0x97),
+     o2(0x94,0x88),
+
+#define to_Shift_JIS_E8_9D WORDINDEX2INFO(16614)
+    to_Shift_JIS_E8_9D_offsets,
+    to_Shift_JIS_E8_9D_infos,
+
+#define to_Shift_JIS_E8_9E_infos WORDINDEX2INFO(16616)
+           INVALID,         UNDEF, o2(0xe5,0xa5), o2(0x97,0x5a),
+     o2(0xe5,0xa4), o2(0xe5,0xa3), o2(0xe5,0xac), o2(0xe5,0xa6),
+     o2(0xe5,0xae), o2(0x97,0x86), o2(0xe5,0xb1), o2(0xe5,0xa8),
+
+#define to_Shift_JIS_E8_9E WORDINDEX2INFO(16628)
+    to_Shift_JIS_E8_9E_offsets,
+    to_Shift_JIS_E8_9E_infos,
+
+#define to_Shift_JIS_E8_9F_infos WORDINDEX2INFO(16630)
+           INVALID, o2(0xe5,0xa9),         UNDEF, o2(0xe5,0xad),
+     o2(0xe5,0xb0), o2(0xe5,0xaf), o2(0xe5,0xa7), o2(0xe5,0xaa),
+     o2(0xe5,0xbb), o2(0xe5,0xb4), o2(0xe5,0xb2), o2(0xe5,0xb3),
+     o2(0xe5,0xb8), o2(0xe5,0xb9), o2(0x8a,0x49), o2(0x8b,0x61),
+     o2(0xe5,0xb7),
+
+#define to_Shift_JIS_E8_9F WORDINDEX2INFO(16647)
+    to_Shift_JIS_E8_9F_offsets,
+    to_Shift_JIS_E8_9F_infos,
+
+#define to_Shift_JIS_E8_A0_infos WORDINDEX2INFO(16649)
+           INVALID,         UNDEF, o2(0xe5,0xa2), o2(0xe5,0xb6),
+     o2(0xe5,0xba), o2(0xe5,0xb5), o2(0xe5,0xbc), o2(0xe5,0xbe),
+     o2(0xe5,0xbd), o2(0xe5,0xc0), o2(0xe5,0xbf), o2(0xe5,0x79),
+     o2(0xe5,0xc4), o2(0xe5,0xc1), o2(0xe5,0xc2), o2(0xe5,0xc3),
+     o2(0xe5,0xc5),
+
+#define to_Shift_JIS_E8_A0 WORDINDEX2INFO(16666)
+    to_Shift_JIS_E8_A0_offsets,
+    to_Shift_JIS_E8_A0_infos,
+
+#define to_Shift_JIS_E8_A1_infos WORDINDEX2INFO(16668)
+           INVALID, o2(0x8c,0x8c),         UNDEF, o2(0xe5,0xc7),
+     o2(0xe5,0xc6), o2(0x8f,0x4f), o2(0x8d,0x73), o2(0x9f,0xa5),
+     o2(0xe5,0xc8), o2(0x8f,0x70), o2(0x8a,0x58), o2(0xe5,0xc9),
+     o2(0x89,0x71), o2(0x8f,0xd5), o2(0xe5,0xca), o2(0x8d,0x74),
+     o2(0xe5,0xcb), o2(0x88,0xdf), o2(0x95,0x5c), o2(0xe5,0xcc),
+     o2(0x90,0x8a), o2(0xe5,0xd3), o2(0xe5,0xd0), o2(0x92,0x8f),
+     o2(0xe5,0xd1), o2(0xe5,0xce), o2(0x8b,0xdc),
+
+#define to_Shift_JIS_E8_A1 WORDINDEX2INFO(16695)
+    to_Shift_JIS_E8_A1_offsets,
+    to_Shift_JIS_E8_A1_infos,
+
+#define to_Shift_JIS_E8_A2_infos WORDINDEX2INFO(16697)
+           INVALID,         UNDEF, o2(0xe5,0xcd), o2(0xe5,0xd4),
+     o2(0x8c,0x55), o2(0x91,0xdc), o2(0xe5,0xda), o2(0xe5,0xd6),
+     o2(0x91,0xb3), o2(0xe5,0xd5), o2(0xe5,0xd8), o2(0xe5,0xcf),
+     o2(0xe5,0xd9), o2(0xe5,0xdb), o2(0x94,0xed), o2(0xe5,0xd7),
+     o2(0xe5,0xdc), o2(0xe5,0xde), o2(0x8c,0xd1), o2(0xe5,0xd2),
+     o2(0x88,0xbf), o2(0xe5,0xdd),
+
+#define to_Shift_JIS_E8_A2 WORDINDEX2INFO(16719)
+    to_Shift_JIS_E8_A2_offsets,
+    to_Shift_JIS_E8_A2_infos,
+
+#define to_Shift_JIS_E8_A3_infos WORDINDEX2INFO(16721)
+           INVALID,         UNDEF, o2(0x8d,0xd9), o2(0x97,0xf4),
+     o2(0xe5,0xdf), o2(0xe5,0xe0), o2(0x91,0x95), o2(0x97,0xa0),
+     o2(0xe5,0xe1), o2(0x97,0x54), o2(0xe5,0xe2), o2(0xe5,0xe3),
+     o2(0x95,0xe2), o2(0xe5,0xe4), o2(0x8d,0xbe), o2(0x97,0xa1),
+     o2(0xe5,0xe9), o2(0xe5,0xea), o2(0x8f,0xd6), o2(0xe5,0xe8),
+     o2(0x97,0x87), o2(0xe5,0xe5), o2(0xe5,0xe7), o2(0x90,0xbb),
+     o2(0x90,0x9e),
+
+#define to_Shift_JIS_E8_A3 WORDINDEX2INFO(16746)
+    to_Shift_JIS_E8_A3_offsets,
+    to_Shift_JIS_E8_A3_infos,
+
+#define to_Shift_JIS_E8_A4_infos WORDINDEX2INFO(16748)
+           INVALID,         UNDEF, o2(0xe5,0xe6), o2(0xe5,0xeb),
+     o2(0x95,0xa1), o2(0xe5,0xed), o2(0xe5,0xec), o2(0x8a,0x8c),
+     o2(0x96,0x4a), o2(0xe5,0xee), o2(0xe5,0xfa), o2(0xe5,0xf0),
+     o2(0xe5,0xf1), o2(0xe5,0xf2), o2(0xe5,0xf3), o2(0xe5,0xf7),
+     o2(0xe5,0xf8), o2(0xe5,0xf6),
+
+#define to_Shift_JIS_E8_A4 WORDINDEX2INFO(16766)
+    to_Shift_JIS_E8_A4_offsets,
+    to_Shift_JIS_E8_A4_infos,
+
+#define to_Shift_JIS_E8_A5_infos WORDINDEX2INFO(16768)
+           INVALID,         UNDEF, o2(0xe5,0xf4), o2(0xe5,0xef),
+     o2(0xe5,0xf5), o2(0xe5,0xf9), o2(0xe8,0xb5), o2(0x89,0xa6),
+     o2(0xe5,0xfc), o2(0x8b,0xdd), o2(0xe5,0xfb), o2(0xe6,0x41),
+     o2(0xe6,0x40), o2(0xe6,0x43), o2(0xe6,0x42), o2(0xe6,0x44),
+     o2(0x8f,0x50), o2(0xe6,0x45), o2(0xe6,0x46), o2(0xe6,0x47),
+     o2(0x90,0xbc),
+
+#define to_Shift_JIS_E8_A5 WORDINDEX2INFO(16789)
+    to_Shift_JIS_E8_A5_offsets,
+    to_Shift_JIS_E8_A5_infos,
+
+#define to_Shift_JIS_E8_A6_infos WORDINDEX2INFO(16791)
+           INVALID,         UNDEF, o2(0x97,0x76), o2(0xe6,0x48),
+     o2(0x95,0xa2), o2(0x94,0x65), o2(0xe6,0x49), o2(0xe6,0x4a),
+     o2(0x8c,0xa9), o2(0x8b,0x4b), o2(0xe6,0x4b), o2(0x8e,0x8b),
+     o2(0x94,0x60), o2(0xe6,0x4c), o2(0x8a,0x6f), o2(0xe6,0x4d),
+     o2(0xe6,0x4f), o2(0x97,0x97), o2(0xe6,0x4e), o2(0x90,0x65),
+     o2(0xe6,0x50), o2(0xe6,0x51), o2(0xe6,0x52), o2(0x8a,0xcf),
+     o2(0xe6,0x53), o2(0xe6,0x54), o2(0xe6,0x55),
+
+#define to_Shift_JIS_E8_A6 WORDINDEX2INFO(16818)
+    to_Shift_JIS_E8_A6_offsets,
+    to_Shift_JIS_E8_A6_infos,
+
+#define to_Shift_JIS_E8_A7_infos WORDINDEX2INFO(16820)
+           INVALID, o2(0xe6,0x56),         UNDEF, o2(0x8a,0x70),
+     o2(0xe6,0x57), o2(0xe6,0x58), o2(0xe6,0x59), o2(0x89,0xf0),
+     o2(0x90,0x47), o2(0xe6,0x5a), o2(0xe6,0x5b), o2(0xe6,0x5c),
+
+#define to_Shift_JIS_E8_A7 WORDINDEX2INFO(16832)
+    to_Shift_JIS_E8_A7_offsets,
+    to_Shift_JIS_E8_A7_infos,
+
+#define to_Shift_JIS_E8_A8_infos WORDINDEX2INFO(16834)
+           INVALID, o2(0x8c,0xbe),         UNDEF, o2(0x92,0xf9),
+     o2(0xe6,0x5d), o2(0x8c,0x76), o2(0x90,0x75), o2(0xe6,0x60),
+     o2(0x93,0xa2), o2(0xe6,0x5f), o2(0x8c,0x50), o2(0xe6,0x5e),
+     o2(0x91,0xf5), o2(0x8b,0x4c), o2(0xe6,0x61), o2(0xe6,0x62),
+     o2(0x8f,0xd7), o2(0x8c,0x8d), o2(0xe6,0x63), o2(0x96,0x4b),
+     o2(0x90,0xdd), o2(0x8b,0x96), o2(0x96,0xf3), o2(0x91,0x69),
+     o2(0xe6,0x64), o2(0x90,0x66), o2(0x92,0x90), o2(0x8f,0xd8),
+
+#define to_Shift_JIS_E8_A8 WORDINDEX2INFO(16862)
+    to_Shift_JIS_E8_A8_offsets,
+    to_Shift_JIS_E8_A8_infos,
+
+#define to_Shift_JIS_E8_A9_infos WORDINDEX2INFO(16864)
+           INVALID,         UNDEF, o2(0xe6,0x65), o2(0xe6,0x68),
+     o2(0xe6,0x69), o2(0x8d,0xbc), o2(0x91,0xc0), o2(0xe6,0x67),
+     o2(0x8f,0xd9), o2(0x95,0x5d), o2(0xe6,0x66), o2(0x8e,0x8c),
+     o2(0x89,0x72), o2(0xe6,0x6d), o2(0x8c,0x77), o2(0x8e,0x8e),
+     o2(0x8e,0x8d), o2(0x98,0x6c), o2(0xe6,0x6c), o2(0xe6,0x6b),
+     o2(0x91,0x46), o2(0x8b,0x6c), o2(0x98,0x62), o2(0x8a,0x59),
+     o2(0x8f,0xda), o2(0xe6,0x6a),
+
+#define to_Shift_JIS_E8_A9 WORDINDEX2INFO(16890)
+    to_Shift_JIS_E8_A9_offsets,
+    to_Shift_JIS_E8_A9_infos,
+
+#define to_Shift_JIS_E8_AA_infos WORDINDEX2INFO(16892)
+           INVALID,         UNDEF, o2(0xe6,0x6f), o2(0xe6,0x70),
+     o2(0xe6,0x6e), o2(0x8c,0xd6), o2(0x97,0x5f), o2(0x8e,0x8f),
+     o2(0x94,0x46), o2(0xe6,0x73), o2(0x90,0xbe), o2(0x92,0x61),
+     o2(0x97,0x55), o2(0xe6,0x76), o2(0x8c,0xea), o2(0x90,0xbd),
+     o2(0xe6,0x72), o2(0xe6,0x77), o2(0x8c,0xeb), o2(0xe6,0x74),
+     o2(0xe6,0x75), o2(0xe6,0x71), o2(0x90,0xe0), o2(0x93,0xc7),
+     o2(0x92,0x4e), o2(0x89,0xdb), o2(0x94,0xee), o2(0x8b,0x62),
+     o2(0x92,0xb2),
+
+#define to_Shift_JIS_E8_AA WORDINDEX2INFO(16921)
+    to_Shift_JIS_E8_AA_offsets,
+    to_Shift_JIS_E8_AA_infos,
+
+#define to_Shift_JIS_E8_AB_infos WORDINDEX2INFO(16923)
+           INVALID,         UNDEF, o2(0xe6,0x7a), o2(0xe6,0x78),
+     o2(0x92,0x6b), o2(0x90,0xbf), o2(0x8a,0xd0), o2(0xe6,0x79),
+     o2(0x90,0x7a), o2(0x97,0xc8), o2(0x98,0x5f), o2(0xe6,0x7b),
+     o2(0xe6,0x87), o2(0x92,0xb3), o2(0xe6,0x86), o2(0xe6,0x83),
+     o2(0xe6,0x8b), o2(0xe6,0x84), o2(0xe6,0x80), o2(0x92,0xfa),
+     o2(0xe6,0x7e), o2(0xe6,0x7c), o2(0x97,0x40), o2(0x8e,0x90),
+     o2(0xe6,0x81), o2(0xe6,0x7d), o2(0xe6,0x85), o2(0x8f,0x94),
+     o2(0x8c,0xbf), o2(0x91,0xf8),
+
+#define to_Shift_JIS_E8_AB WORDINDEX2INFO(16953)
+    to_Shift_JIS_E8_AB_offsets,
+    to_Shift_JIS_E8_AB_infos,
+
+#define to_Shift_JIS_E8_AC_infos WORDINDEX2INFO(16955)
+           INVALID, o2(0x96,0x64), o2(0x89,0x79), o2(0x88,0xe0),
+             UNDEF, o2(0x93,0xa3), o2(0xe6,0x89), o2(0xe6,0x88),
+     o2(0x93,0xe4), o2(0xe6,0x8d), o2(0xe6,0x82), o2(0xe6,0x8c),
+     o2(0xe6,0x8e), o2(0x8c,0xaa), o2(0xe6,0x8a), o2(0x8d,0x75),
+     o2(0x8e,0xd3), o2(0xe6,0x8f), o2(0x97,0x77), o2(0xe6,0x92),
+     o2(0xe6,0x95), o2(0xe6,0x93), o2(0x95,0x54), o2(0xe6,0x90),
+     o2(0x8b,0xde), o2(0xe6,0x94),
+
+#define to_Shift_JIS_E8_AC WORDINDEX2INFO(16981)
+    to_Shift_JIS_E8_AC_offsets,
+    to_Shift_JIS_E8_AC_infos,
+
+#define to_Shift_JIS_E8_AD_infos WORDINDEX2INFO(16983)
+           INVALID,         UNDEF, o2(0xe6,0x96), o2(0xe6,0x9a),
+     o2(0xe6,0x97), o2(0xe6,0x99), o2(0xe6,0x98), o2(0xe6,0x9b),
+     o2(0x8e,0xaf), o2(0xe6,0x9d), o2(0xe6,0x9c), o2(0x95,0x88),
+     o2(0xe6,0x9f), o2(0x8c,0x78), o2(0xe6,0x9e), o2(0xe6,0xa0),
+     o2(0xe6,0xa1), o2(0x8b,0x63), o2(0xe3,0xbf), o2(0x8f,0xf7),
+     o2(0xe6,0xa2), o2(0x8c,0xec), o2(0xe6,0xa3),
+
+#define to_Shift_JIS_E8_AD WORDINDEX2INFO(17006)
+    to_Shift_JIS_E8_AD_offsets,
+    to_Shift_JIS_E8_AD_infos,
+
+#define to_Shift_JIS_E8_AE_infos WORDINDEX2INFO(17008)
+           INVALID, o2(0xe6,0xa4),         UNDEF, o2(0x8e,0x5d),
+     o2(0x9d,0xcc), o2(0xe6,0xa5), o2(0xe6,0xa6), o2(0x8f,0x51),
+     o2(0xe6,0xa7), o2(0xe6,0xa8), o2(0xe6,0xa9), o2(0xe6,0xaa),
+     o2(0xe6,0xab),
+
+#define to_Shift_JIS_E8_AE WORDINDEX2INFO(17021)
+    to_Shift_JIS_E8_AE_offsets,
+    to_Shift_JIS_E8_AE_infos,
+
+#define to_Shift_JIS_E8_B0_infos WORDINDEX2INFO(17023)
+           INVALID,         UNDEF, o2(0x92,0x4a), o2(0xe6,0xac),
+     o2(0xe6,0xae),
+
+#define to_Shift_JIS_E8_B0 WORDINDEX2INFO(17028)
+    to_Shift_JIS_E8_B0_offsets,
+    to_Shift_JIS_E8_B0_infos,
+
+#define to_Shift_JIS_E8_B1_infos WORDINDEX2INFO(17030)
+           INVALID,         UNDEF, o2(0xe6,0xad), o2(0x93,0xa4),
+     o2(0xe6,0xaf), o2(0x96,0x4c), o2(0xe6,0xb0), o2(0xe6,0xb1),
+     o2(0xe6,0xb2), o2(0xe6,0xb3), o2(0x93,0xd8), o2(0x8f,0xdb),
+     o2(0xe6,0xb4), o2(0x8d,0x8b), o2(0x98,0xac), o2(0xe6,0xb5),
+     o2(0xe6,0xb6), o2(0x95,0x5e), o2(0xe6,0xb7), o2(0xe6,0xbf),
+
+#define to_Shift_JIS_E8_B1 WORDINDEX2INFO(17050)
+    to_Shift_JIS_E8_B1_offsets,
+    to_Shift_JIS_E8_B1_infos,
+
+#define to_Shift_JIS_E8_B2_infos WORDINDEX2INFO(17052)
+           INVALID,         UNDEF, o2(0xe6,0xb8), o2(0xe6,0xba),
+     o2(0xe6,0xb9), o2(0xe6,0xbb), o2(0x96,0x65), o2(0xe6,0xbc),
+     o2(0xe6,0xbd), o2(0xe6,0xbe), o2(0xe6,0xc0), o2(0x8a,0x4c),
+     o2(0x92,0xe5), o2(0x95,0x89), o2(0x8d,0xe0), o2(0x8d,0x76),
+     o2(0x95,0x6e), o2(0x89,0xdd), o2(0x94,0xcc), o2(0xe6,0xc3),
+     o2(0x8a,0xd1), o2(0x90,0xd3), o2(0xe6,0xc2), o2(0xe6,0xc7),
+     o2(0x92,0x99), o2(0x96,0xe1), o2(0xe6,0xc5), o2(0xe6,0xc6),
+     o2(0x8b,0x4d), o2(0xe6,0xc8), o2(0x94,0x83), o2(0x91,0xdd),
+     o2(0x94,0xef), o2(0x93,0x5c), o2(0xe6,0xc4), o2(0x96,0x66),
+
+#define to_Shift_JIS_E8_B2 WORDINDEX2INFO(17088)
+    to_Shift_JIS_E8_B2_offsets,
+    to_Shift_JIS_E8_B2_infos,
+
+#define to_Shift_JIS_E8_B3_infos WORDINDEX2INFO(17090)
+           INVALID, o2(0x89,0xea), o2(0xe6,0xca), o2(0x98,0x47),
+     o2(0x92,0xc0), o2(0x98,0x64),         UNDEF, o2(0x8e,0x91),
+     o2(0xe6,0xc9), o2(0x91,0xaf), o2(0xe6,0xda), o2(0x91,0x47),
+     o2(0x93,0xf6), o2(0x95,0x6f), o2(0xe6,0xcd), o2(0x8e,0x5e),
+     o2(0x8e,0x92), o2(0x8f,0xdc), o2(0x94,0x85), o2(0x8c,0xab),
+     o2(0xe6,0xcc), o2(0xe6,0xcb), o2(0x95,0x8a), o2(0x8e,0xbf),
+     o2(0x93,0x71), o2(0xe6,0xcf), o2(0xe6,0xd0), o2(0x8d,0x77),
+     o2(0xe6,0xce),
+
+#define to_Shift_JIS_E8_B3 WORDINDEX2INFO(17119)
+    to_Shift_JIS_E8_B3_offsets,
+    to_Shift_JIS_E8_B3_infos,
+
+#define to_Shift_JIS_E8_B4_infos WORDINDEX2INFO(17121)
+           INVALID,         UNDEF, o2(0xe6,0xd1), o2(0xe6,0xd2),
+     o2(0xe6,0xd4), o2(0x91,0xa1), o2(0xe6,0xd3), o2(0x8a,0xe4),
+     o2(0xe6,0xd6), o2(0xe6,0xd5), o2(0xe6,0xd7), o2(0xe6,0xd9),
+     o2(0xe6,0xdb), o2(0xe6,0xdc),
+
+#define to_Shift_JIS_E8_B4 WORDINDEX2INFO(17135)
+    to_Shift_JIS_E8_B4_offsets,
+    to_Shift_JIS_E8_B4_infos,
+
+#define to_Shift_JIS_E8_B5_infos WORDINDEX2INFO(17137)
+           INVALID,         UNDEF, o2(0x90,0xd4), o2(0x8e,0xcd),
+     o2(0xe6,0xdd), o2(0x8a,0x71), o2(0xe6,0xde), o2(0x91,0x96),
+     o2(0xe6,0xdf), o2(0xe6,0xe0), o2(0x95,0x8b), o2(0x8b,0x4e),
+
+#define to_Shift_JIS_E8_B5 WORDINDEX2INFO(17149)
+    to_Shift_JIS_E8_B5_offsets,
+    to_Shift_JIS_E8_B5_infos,
+
+#define to_Shift_JIS_E8_B6_infos WORDINDEX2INFO(17151)
+           INVALID,         UNDEF, o2(0xe6,0xe1), o2(0x92,0xb4),
+     o2(0x89,0x7a), o2(0xe6,0xe2), o2(0x8e,0xef), o2(0x90,0x96),
+     o2(0x91,0xab), o2(0xe6,0xe5), o2(0xe6,0xe4),
+
+#define to_Shift_JIS_E8_B6 WORDINDEX2INFO(17162)
+    to_Shift_JIS_E8_B6_offsets,
+    to_Shift_JIS_E8_B6_infos,
+
+#define to_Shift_JIS_E8_B7_infos WORDINDEX2INFO(17164)
+           INVALID,         UNDEF, o2(0xe6,0xe3), o2(0xe6,0xeb),
+     o2(0xe6,0xe9), o2(0xe6,0xe6), o2(0xe6,0xe8), o2(0xe6,0xe7),
+     o2(0xe6,0xea), o2(0x8b,0x97), o2(0xe6,0xee), o2(0x90,0xd5),
+     o2(0xe6,0xef), o2(0x8c,0xd7), o2(0xe6,0xec), o2(0xe6,0xed),
+     o2(0x98,0x48), o2(0x92,0xb5), o2(0x91,0x48), o2(0xe6,0xf0),
+     o2(0xe6,0xf3),
+
+#define to_Shift_JIS_E8_B7 WORDINDEX2INFO(17185)
+    to_Shift_JIS_E8_B7_offsets,
+    to_Shift_JIS_E8_B7_infos,
+
+#define to_Shift_JIS_E8_B8_infos WORDINDEX2INFO(17187)
+           INVALID,         UNDEF, o2(0xe6,0xf1), o2(0xe6,0xf2),
+     o2(0x97,0x78), o2(0x93,0xa5), o2(0xe6,0xf6), o2(0xe6,0xf4),
+     o2(0xe6,0xf5), o2(0xe6,0xf7), o2(0xe7,0x48), o2(0xe6,0xfa),
+     o2(0xe6,0xfb), o2(0xe6,0xf9),
+
+#define to_Shift_JIS_E8_B8 WORDINDEX2INFO(17201)
+    to_Shift_JIS_E8_B8_offsets,
+    to_Shift_JIS_E8_B8_infos,
+
+#define to_Shift_JIS_E8_B9_infos WORDINDEX2INFO(17203)
+           INVALID,         UNDEF, o2(0xe6,0xf8), o2(0x92,0xfb),
+     o2(0xe7,0x40), o2(0xe7,0x44), o2(0xe7,0x41), o2(0xe6,0xfc),
+     o2(0xe7,0x42), o2(0xe7,0x43), o2(0xe7,0x4a), o2(0xe7,0x45),
+     o2(0x90,0xd6), o2(0xe7,0x47), o2(0xe7,0x49), o2(0xe7,0x46),
+     o2(0xe7,0x4c), o2(0x8f,0x52), o2(0xe7,0x4b), o2(0xe7,0x4d),
+
+#define to_Shift_JIS_E8_B9 WORDINDEX2INFO(17223)
+    to_Shift_JIS_E8_B9_offsets,
+    to_Shift_JIS_E8_B9_infos,
+
+#define to_Shift_JIS_E8_BA_infos WORDINDEX2INFO(17225)
+           INVALID,         UNDEF, o2(0xe7,0x4e), o2(0xe7,0x51),
+     o2(0xe7,0x50), o2(0xe7,0x4f), o2(0xe7,0x53), o2(0xe7,0x52),
+     o2(0x96,0xf4), o2(0xe7,0x55), o2(0xe7,0x54), o2(0xe7,0x56),
+     o2(0xe7,0x57), o2(0xe7,0x59), o2(0xe7,0x58), o2(0x90,0x67),
+     o2(0xe7,0x5a), o2(0x8b,0xeb), o2(0xe7,0x5b), o2(0xe7,0x5d),
+     o2(0xe7,0x5e),
+
+#define to_Shift_JIS_E8_BA WORDINDEX2INFO(17246)
+    to_Shift_JIS_E8_BA_offsets,
+    to_Shift_JIS_E8_BA_infos,
+
+#define to_Shift_JIS_E8_BB_infos WORDINDEX2INFO(17248)
+           INVALID,         UNDEF, o2(0xe7,0x5f), o2(0xe7,0x5c),
+     o2(0xe7,0x60), o2(0x8e,0xd4), o2(0xe7,0x61), o2(0x8b,0x4f),
+     o2(0x8c,0x52), o2(0x8c,0xac), o2(0xe7,0x62), o2(0x93,0xee),
+     o2(0x93,0x5d), o2(0xe7,0x63), o2(0xe7,0x66), o2(0x8e,0xb2),
+     o2(0xe7,0x65), o2(0xe7,0x64), o2(0x8c,0x79), o2(0xe7,0x67),
+
+#define to_Shift_JIS_E8_BB WORDINDEX2INFO(17268)
+    to_Shift_JIS_E8_BB_offsets,
+    to_Shift_JIS_E8_BB_infos,
+
+#define to_Shift_JIS_E8_BC_infos WORDINDEX2INFO(17270)
+           INVALID,         UNDEF, o2(0x8a,0x72), o2(0xe7,0x69),
+     o2(0x8d,0xda), o2(0xe7,0x68), o2(0xe7,0x71), o2(0xe7,0x6b),
+     o2(0xe7,0x6d), o2(0x95,0xe3), o2(0xe7,0x6a), o2(0xe7,0x6c),
+     o2(0xe7,0x70), o2(0xe7,0x6e), o2(0x8b,0x50), o2(0xe7,0x6f),
+     o2(0xe7,0x72), o2(0x94,0x79), o2(0x97,0xd6), o2(0x8f,0x53),
+     o2(0xe7,0x73), o2(0x97,0x41), o2(0xe7,0x75), o2(0xe7,0x74),
+     o2(0xe7,0x78), o2(0x97,0x60),
+
+#define to_Shift_JIS_E8_BC WORDINDEX2INFO(17296)
+    to_Shift_JIS_E8_BC_offsets,
+    to_Shift_JIS_E8_BC_infos,
+
+#define to_Shift_JIS_E8_BD_infos WORDINDEX2INFO(17298)
+           INVALID,         UNDEF, o2(0xe7,0x77), o2(0x8a,0x8d),
+     o2(0xe7,0x76), o2(0xe7,0x7b), o2(0xe7,0x7a), o2(0xe7,0x79),
+     o2(0x93,0x51), o2(0xe7,0x7c), o2(0xe7,0x7d), o2(0xe7,0x7e),
+     o2(0x8d,0x8c), o2(0x8c,0x44), o2(0xe7,0x80), o2(0xe7,0x81),
+     o2(0xe7,0x82),
+
+#define to_Shift_JIS_E8_BD WORDINDEX2INFO(17315)
+    to_Shift_JIS_E8_BD_offsets,
+    to_Shift_JIS_E8_BD_infos,
+
+#define to_Shift_JIS_E8_BE_infos WORDINDEX2INFO(17317)
+           INVALID,         UNDEF, o2(0x90,0x68), o2(0xe7,0x83),
+     o2(0x8e,0xab), o2(0xe7,0x84), o2(0xe7,0x85), o2(0x99,0x9f),
+     o2(0x99,0x9e), o2(0xe7,0x86), o2(0xe3,0x90), o2(0xe7,0x87),
+     o2(0x92,0x43), o2(0x90,0x4a), o2(0x94,0x5f), o2(0xe7,0x88),
+     o2(0x95,0xd3), o2(0x92,0xd2), o2(0x8d,0x9e), o2(0x92,0x48),
+
+#define to_Shift_JIS_E8_BE WORDINDEX2INFO(17337)
+    to_Shift_JIS_E8_BE_offsets,
+    to_Shift_JIS_E8_BE_infos,
+
+#define to_Shift_JIS_E8_BF_infos WORDINDEX2INFO(17339)
+           INVALID,         UNDEF, o2(0x89,0x49), o2(0x96,0x98),
+     o2(0x90,0x76), o2(0x8c,0x7d), o2(0x8b,0xdf), o2(0x95,0xd4),
+     o2(0xe7,0x89), o2(0xe7,0x8b), o2(0xe7,0x8a), o2(0x89,0xde),
+     o2(0x93,0xf4), o2(0xe7,0x8c), o2(0x94,0x97), o2(0x93,0x52),
+     o2(0xe7,0x8d), o2(0x8f,0x71), o2(0xe7,0x8f), o2(0x96,0xc0),
+     o2(0xe7,0x9e), o2(0xe7,0x91), o2(0xe7,0x92), o2(0x92,0xc7),
+
+#define to_Shift_JIS_E8_BF WORDINDEX2INFO(17363)
+    to_Shift_JIS_E8_BF_offsets,
+    to_Shift_JIS_E8_BF_infos,
+
+#define to_Shift_JIS_E8_infos WORDINDEX2INFO(17365)
+                INVALID, to_Shift_JIS_E8_80,
+     to_Shift_JIS_E8_81, to_Shift_JIS_E8_82,
+     to_Shift_JIS_E8_83, to_Shift_JIS_E8_84,
+     to_Shift_JIS_E8_85, to_Shift_JIS_E8_86,
+     to_Shift_JIS_E8_87, to_Shift_JIS_E8_88,
+     to_Shift_JIS_E8_89, to_Shift_JIS_E8_8A,
+     to_Shift_JIS_E8_8B, to_Shift_JIS_E8_8C,
+     to_Shift_JIS_E8_8D, to_Shift_JIS_E8_8E,
+     to_Shift_JIS_E8_8F, to_Shift_JIS_E8_90,
+     to_Shift_JIS_E8_91, to_Shift_JIS_E8_92,
+     to_Shift_JIS_E8_93, to_Shift_JIS_E8_94,
+     to_Shift_JIS_E8_95, to_Shift_JIS_E8_96,
+     to_Shift_JIS_E8_97, to_Shift_JIS_E8_98,
+     to_Shift_JIS_E8_99, to_Shift_JIS_E8_9A,
+     to_Shift_JIS_E8_9B, to_Shift_JIS_E8_9C,
+     to_Shift_JIS_E8_9D, to_Shift_JIS_E8_9E,
+     to_Shift_JIS_E8_9F, to_Shift_JIS_E8_A0,
+     to_Shift_JIS_E8_A1, to_Shift_JIS_E8_A2,
+     to_Shift_JIS_E8_A3, to_Shift_JIS_E8_A4,
+     to_Shift_JIS_E8_A5, to_Shift_JIS_E8_A6,
+     to_Shift_JIS_E8_A7, to_Shift_JIS_E8_A8,
+     to_Shift_JIS_E8_A9, to_Shift_JIS_E8_AA,
+     to_Shift_JIS_E8_AB, to_Shift_JIS_E8_AC,
+     to_Shift_JIS_E8_AD, to_Shift_JIS_E8_AE,
+        to_Shift_JIS_C4, to_Shift_JIS_E8_B0,
+     to_Shift_JIS_E8_B1, to_Shift_JIS_E8_B2,
+     to_Shift_JIS_E8_B3, to_Shift_JIS_E8_B4,
+     to_Shift_JIS_E8_B5, to_Shift_JIS_E8_B6,
+     to_Shift_JIS_E8_B7, to_Shift_JIS_E8_B8,
+     to_Shift_JIS_E8_B9, to_Shift_JIS_E8_BA,
+     to_Shift_JIS_E8_BB, to_Shift_JIS_E8_BC,
+     to_Shift_JIS_E8_BD, to_Shift_JIS_E8_BE,
+     to_Shift_JIS_E8_BF,
+
+#define to_Shift_JIS_E8 WORDINDEX2INFO(17430)
+    to_Shift_JIS_E3_81_offsets,
+    to_Shift_JIS_E8_infos,
+
+#define to_Shift_JIS_E9_80_infos WORDINDEX2INFO(17432)
+           INVALID, o2(0x91,0xde), o2(0x91,0x97),         UNDEF,
+     o2(0x93,0xa6), o2(0xe7,0x90), o2(0x8b,0x74), o2(0xe7,0x99),
+     o2(0xe7,0x96), o2(0xe7,0xa3), o2(0x93,0xa7), o2(0x92,0x80),
+     o2(0xe7,0x93), o2(0x92,0xfc), o2(0x93,0x72), o2(0xe7,0x94),
+     o2(0xe7,0x98), o2(0x90,0x80), o2(0x94,0x87), o2(0x92,0xca),
+     o2(0x90,0xc0), o2(0xe7,0x97), o2(0x91,0xac), o2(0x91,0xa2),
+     o2(0xe7,0x95), o2(0x88,0xa7), o2(0x98,0x41), o2(0xe7,0x9a),
+     o2(0x91,0xdf), o2(0x8f,0x54), o2(0x90,0x69), o2(0xe7,0x9c),
+     o2(0xe7,0x9b), o2(0x88,0xed), o2(0xe7,0x9d), o2(0x95,0x4e),
+     o2(0xe7,0xa5),
+
+#define to_Shift_JIS_E9_80 WORDINDEX2INFO(17469)
+    to_Shift_JIS_E9_80_offsets,
+    to_Shift_JIS_E9_80_infos,
+
+#define to_Shift_JIS_E9_81_infos WORDINDEX2INFO(17471)
+           INVALID,         UNDEF, o2(0x93,0xd9), o2(0x90,0x8b),
+     o2(0x92,0x78), o2(0x8b,0xf6), o2(0xe7,0xa4), o2(0x97,0x56),
+     o2(0x89,0x5e), o2(0x95,0xd5), o2(0x89,0xdf), o2(0xe7,0x9f),
+     o2(0xe7,0xa0), o2(0xe7,0xa1), o2(0xe7,0xa2), o2(0x93,0xb9),
+     o2(0x92,0x42), o2(0x88,0xe1), o2(0xe7,0xa6), o2(0xe7,0xa7),
+     o2(0xea,0xa1), o2(0x91,0xbb), o2(0xe7,0xa8), o2(0x89,0x93),
+     o2(0x91,0x6b), o2(0x8c,0xad), o2(0x97,0x79), o2(0xe7,0xa9),
+     o2(0x93,0x4b), o2(0x91,0x98), o2(0x8e,0xd5), o2(0xe7,0xaa),
+     o2(0xe7,0xad), o2(0x8f,0x85), o2(0xe7,0xab), o2(0x91,0x4a),
+     o2(0x91,0x49), o2(0x88,0xe2), o2(0x97,0xc9), o2(0xe7,0xaf),
+     o2(0x94,0xf0),
+
+#define to_Shift_JIS_E9_81 WORDINDEX2INFO(17512)
+    to_Shift_JIS_E9_81_offsets,
+    to_Shift_JIS_E9_81_infos,
+
+#define to_Shift_JIS_E9_82_infos WORDINDEX2INFO(17514)
+           INVALID, o2(0xe7,0xb1), o2(0xe7,0xb0), o2(0xe7,0xae),
+     o2(0xe2,0x84), o2(0x8a,0xd2),         UNDEF, o2(0xe7,0x8e),
+     o2(0xe7,0xb3), o2(0xe7,0xb2), o2(0xe7,0xb4), o2(0x97,0x57),
+     o2(0x93,0xdf), o2(0x96,0x4d), o2(0xe7,0xb5), o2(0x8e,0xd7),
+     o2(0xe7,0xb6), o2(0xe7,0xb7), o2(0xe7,0xb8), o2(0x93,0x40),
+
+#define to_Shift_JIS_E9_82 WORDINDEX2INFO(17534)
+    to_Shift_JIS_E9_82_offsets,
+    to_Shift_JIS_E9_82_infos,
+
+#define to_Shift_JIS_E9_83_infos WORDINDEX2INFO(17536)
+           INVALID,         UNDEF, o2(0x88,0xe8), o2(0x8d,0x78),
+     o2(0x98,0x59), o2(0xe7,0xbc), o2(0x8c,0x53), o2(0xe7,0xb9),
+     o2(0xe7,0xba), o2(0x95,0x94), o2(0x8a,0x73), o2(0x97,0x58),
+     o2(0x8b,0xbd), o2(0x93,0x73),
+
+#define to_Shift_JIS_E9_83 WORDINDEX2INFO(17550)
+    to_Shift_JIS_E9_83_offsets,
+    to_Shift_JIS_E9_83_infos,
+
+#define to_Shift_JIS_E9_84_infos WORDINDEX2INFO(17552)
+           INVALID,         UNDEF, o2(0xe7,0xbd), o2(0xe7,0xbe),
+     o2(0xe7,0xbf), o2(0x93,0x41), o2(0xe7,0xc1), o2(0xe7,0xc0),
+
+#define to_Shift_JIS_E9_84 WORDINDEX2INFO(17560)
+    to_Shift_JIS_E9_84_offsets,
+    to_Shift_JIS_E9_84_infos,
+
+#define to_Shift_JIS_E9_85_infos WORDINDEX2INFO(17562)
+           INVALID,         UNDEF, o2(0x93,0xd1), o2(0xe7,0xc2),
+     o2(0x8f,0x55), o2(0x8e,0xde), o2(0x94,0x7a), o2(0x92,0x91),
+     o2(0x8e,0xf0), o2(0x90,0x8c), o2(0xe7,0xc3), o2(0xe7,0xc4),
+     o2(0x90,0x7c), o2(0xe7,0xc5), o2(0xe7,0xc6), o2(0xe7,0xc7),
+     o2(0x97,0x8f), o2(0x8f,0x56), o2(0xe7,0xc9), o2(0xe7,0xc8),
+     o2(0x8d,0x79), o2(0x8d,0x93), o2(0x8e,0x5f),
+
+#define to_Shift_JIS_E9_85 WORDINDEX2INFO(17585)
+    to_Shift_JIS_E9_85_offsets,
+    to_Shift_JIS_E9_85_infos,
+
+#define to_Shift_JIS_E9_86_infos WORDINDEX2INFO(17587)
+           INVALID,         UNDEF, o2(0xe7,0xcc), o2(0x8f,0x86),
+     o2(0xe7,0xcb), o2(0xe7,0xca), o2(0x91,0xe7), o2(0x8c,0xed),
+     o2(0x90,0xc1), o2(0x94,0xae), o2(0x8f,0x58), o2(0xe7,0xcd),
+     o2(0x8f,0xdd), o2(0xe7,0xd0), o2(0xe7,0xce), o2(0xe7,0xcf),
+     o2(0xe7,0xd2), o2(0xe7,0xd1), o2(0x8f,0xf8), o2(0xe7,0xd3),
+
+#define to_Shift_JIS_E9_86 WORDINDEX2INFO(17607)
+    to_Shift_JIS_E9_86_offsets,
+    to_Shift_JIS_E9_86_infos,
+
+#define to_Shift_JIS_E9_87_infos WORDINDEX2INFO(17609)
+           INVALID, o2(0xe7,0xd4), o2(0xe7,0xd5),         UNDEF,
+     o2(0x94,0xce), o2(0x8d,0xd1), o2(0x8e,0xdf), o2(0xe7,0xd6),
+     o2(0xe7,0xd7), o2(0x97,0xa2), o2(0x8f,0x64), o2(0x96,0xec),
+     o2(0x97,0xca), o2(0xe7,0xd8), o2(0x8b,0xe0), o2(0xe7,0xd9),
+     o2(0x93,0x42), o2(0xe7,0xdc), o2(0x8a,0x98), o2(0x90,0x6a),
+     o2(0xe7,0xda), o2(0xe7,0xdb), o2(0x92,0xde), o2(0x96,0x74),
+     o2(0x8b,0xfa), o2(0xe7,0xde), o2(0xe7,0xdf), o2(0xe7,0xdd),
+     o2(0xe7,0xe1),
+
+#define to_Shift_JIS_E9_87 WORDINDEX2INFO(17638)
+    to_Shift_JIS_E9_87_offsets,
+    to_Shift_JIS_E9_87_infos,
+
+#define to_Shift_JIS_E9_88_infos WORDINDEX2INFO(17640)
+           INVALID,         UNDEF, o2(0x93,0xdd), o2(0x8a,0x62),
+     o2(0xe7,0xe5), o2(0xe7,0xe2), o2(0xe7,0xe4), o2(0xe7,0xe0),
+     o2(0xe8,0x6e), o2(0xe7,0xe3), o2(0x97,0xe9), o2(0x8c,0xd8),
+     o2(0xe7,0xed),
+
+#define to_Shift_JIS_E9_88 WORDINDEX2INFO(17653)
+    to_Shift_JIS_E9_88_offsets,
+    to_Shift_JIS_E9_88_infos,
+
+#define to_Shift_JIS_E9_89_infos WORDINDEX2INFO(17655)
+           INVALID,         UNDEF, o2(0x93,0x53), o2(0xe7,0xe8),
+     o2(0xe7,0xeb), o2(0xe7,0xe9), o2(0xe7,0xee), o2(0xe7,0xef),
+     o2(0xe7,0xe7), o2(0xe7,0xf4), o2(0x89,0x94), o2(0xe7,0xe6),
+     o2(0x94,0xab), o2(0xe7,0xea), o2(0x8f,0xde), o2(0x8d,0x7a),
+     o2(0x96,0x67),
+
+#define to_Shift_JIS_E9_89 WORDINDEX2INFO(17672)
+    to_Shift_JIS_E9_89_offsets,
+    to_Shift_JIS_E9_89_infos,
+
+#define to_Shift_JIS_E9_8A_infos WORDINDEX2INFO(17674)
+           INVALID, o2(0x8b,0xe2),         UNDEF, o2(0x8f,0x65),
+     o2(0x93,0xba), o2(0x91,0x4c), o2(0xe7,0xf2), o2(0xe7,0xec),
+     o2(0xe7,0xf1), o2(0x96,0xc1), o2(0x92,0xb6), o2(0xe7,0xf3),
+     o2(0xe7,0xf0), o2(0x91,0x4b), o2(0xe7,0xf7), o2(0xe7,0xf6),
+
+#define to_Shift_JIS_E9_8A WORDINDEX2INFO(17690)
+    to_Shift_JIS_E9_8A_offsets,
+    to_Shift_JIS_E9_8A_infos,
+
+#define to_Shift_JIS_E9_8B_infos WORDINDEX2INFO(17692)
+           INVALID,         UNDEF, o2(0xe7,0xf5), o2(0x96,0x4e),
+     o2(0x8f,0x9b), o2(0xe7,0xf8), o2(0x95,0xdd), o2(0x89,0x73),
+     o2(0x95,0x65), o2(0x92,0x92), o2(0x8b,0x98), o2(0xe7,0xfa),
+     o2(0x8d,0x7c),
+
+#define to_Shift_JIS_E9_8B WORDINDEX2INFO(17705)
+    to_Shift_JIS_E9_8B_offsets,
+    to_Shift_JIS_E9_8B_infos,
+
+#define to_Shift_JIS_E9_8C_infos WORDINDEX2INFO(17707)
+           INVALID,         UNDEF, o2(0x8e,0x4b), o2(0xe7,0xf9),
+     o2(0x90,0x8d), o2(0x90,0x8e), o2(0xe8,0x40), o2(0xe8,0x42),
+     o2(0x8f,0xf9), o2(0xe8,0x41), o2(0xe8,0x43), o2(0x8b,0xd1),
+     o2(0x95,0x64), o2(0x8e,0xe0), o2(0x98,0x42), o2(0xe7,0xfc),
+     o2(0x8d,0xf6), o2(0x98,0x5e), o2(0xe8,0x45), o2(0xe8,0x44),
+     o2(0xe8,0x46),
+
+#define to_Shift_JIS_E9_8C WORDINDEX2INFO(17728)
+    to_Shift_JIS_E9_8C_offsets,
+    to_Shift_JIS_E9_8C_infos,
+
+#define to_Shift_JIS_E9_8D_infos WORDINDEX2INFO(17730)
+           INVALID,         UNDEF, o2(0xe7,0xfb), o2(0x93,0xe7),
+     o2(0x93,0x74), o2(0x92,0xd5), o2(0xe8,0x4b), o2(0x92,0x62),
+     o2(0xe8,0x47), o2(0xe8,0x48), o2(0x8c,0x4c), o2(0xe8,0x4a),
+     o2(0x8c,0xae), o2(0xe8,0x49), o2(0x8f,0xdf),
+
+#define to_Shift_JIS_E9_8D WORDINDEX2INFO(17745)
+    to_Shift_JIS_E9_8D_offsets,
+    to_Shift_JIS_E9_8D_infos,
+
+#define to_Shift_JIS_E9_8E_infos WORDINDEX2INFO(17747)
+           INVALID,         UNDEF, o2(0x8a,0x99), o2(0xe8,0x4f),
+     o2(0x8d,0xbd), o2(0x91,0x99), o2(0x92,0xc8), o2(0x8a,0x5a),
+     o2(0xe8,0x4d), o2(0xe8,0x4e), o2(0x92,0xc1), o2(0xe8,0x4c),
+     o2(0xe8,0x50),
+
+#define to_Shift_JIS_E9_8E WORDINDEX2INFO(17760)
+    to_Shift_JIS_E9_8E_offsets,
+    to_Shift_JIS_E9_8E_infos,
+
+#define to_Shift_JIS_E9_8F_infos WORDINDEX2INFO(17762)
+           INVALID,         UNDEF, o2(0xe8,0x56), o2(0xe8,0x59),
+     o2(0xe8,0x58), o2(0x93,0x4c), o2(0xe8,0x51), o2(0xe8,0x52),
+     o2(0xe8,0x55), o2(0xe8,0x57), o2(0x8b,0xbe), o2(0xe8,0x5a),
+     o2(0xe8,0x54), o2(0xe8,0x53),
+
+#define to_Shift_JIS_E9_8F WORDINDEX2INFO(17776)
+    to_Shift_JIS_E9_8F_offsets,
+    to_Shift_JIS_E9_8F_infos,
+
+#define to_Shift_JIS_E9_90_infos WORDINDEX2INFO(17778)
+           INVALID,         UNDEF, o2(0xe8,0x5e), o2(0xe8,0x5f),
+     o2(0xe8,0x60), o2(0xe8,0x5d), o2(0xe8,0x5c), o2(0x8f,0xe0),
+     o2(0x93,0xa8), o2(0xe8,0x5b), o2(0xe8,0x64), o2(0xe8,0x62),
+     o2(0xe8,0x63), o2(0xe8,0x61), o2(0x91,0xf6), o2(0xe8,0x65),
+
+#define to_Shift_JIS_E9_90 WORDINDEX2INFO(17794)
+    to_Shift_JIS_E9_90_offsets,
+    to_Shift_JIS_E9_90_infos,
+
+#define to_Shift_JIS_E9_91_infos WORDINDEX2INFO(17796)
+           INVALID,         UNDEF, o2(0xe8,0x66), o2(0xe8,0x68),
+     o2(0x8a,0xd3), o2(0xe8,0x67), o2(0x96,0xf8), o2(0xe8,0x73),
+     o2(0xe8,0x69), o2(0xe8,0x6c), o2(0xe8,0x6a), o2(0xe8,0x6b),
+     o2(0xe8,0x6d), o2(0xe8,0x6f), o2(0xe8,0x70), o2(0xe8,0x71),
+     o2(0xe8,0x74), o2(0xe8,0x72), o2(0xe8,0x75), o2(0xe8,0x77),
+
+#define to_Shift_JIS_E9_91 WORDINDEX2INFO(17816)
+    to_Shift_JIS_E9_91_offsets,
+    to_Shift_JIS_E9_91_infos,
+
+#define to_Shift_JIS_E9_92_infos WORDINDEX2INFO(17818)
+           INVALID,         UNDEF, o2(0xe8,0x76),
+
+#define to_Shift_JIS_E9_92 WORDINDEX2INFO(17821)
+    to_Shift_JIS_E9_92_offsets,
+    to_Shift_JIS_E9_92_infos,
+
+#define to_Shift_JIS_E9_95_infos WORDINDEX2INFO(17823)
+           INVALID,         UNDEF, o2(0x92,0xb7),
+
+#define to_Shift_JIS_E9_95 WORDINDEX2INFO(17826)
+    to_Shift_JIS_E9_95_offsets,
+    to_Shift_JIS_E9_95_infos,
+
+#define to_Shift_JIS_E9_96_infos WORDINDEX2INFO(17828)
+           INVALID, o2(0x96,0xe5),         UNDEF, o2(0xe8,0x78),
+     o2(0x91,0x4d), o2(0xe8,0x79), o2(0x95,0xc2), o2(0xe8,0x7a),
+     o2(0x8a,0x4a), o2(0x89,0x5b), o2(0x8a,0xd5), o2(0x8a,0xd4),
+     o2(0xe8,0x7b), o2(0xe8,0x7c), o2(0xe8,0x7d), o2(0xe8,0x7e),
+     o2(0xe8,0x80), o2(0x8a,0xd6), o2(0x8a,0x74), o2(0x8d,0x7d),
+     o2(0x94,0xb4), o2(0xe8,0x82), o2(0xe8,0x81), o2(0xe8,0x83),
+     o2(0x89,0x7b), o2(0xe8,0x86), o2(0xe8,0x85), o2(0xe8,0x84),
+     o2(0xe8,0x87),
+
+#define to_Shift_JIS_E9_96 WORDINDEX2INFO(17857)
+    to_Shift_JIS_E9_96_offsets,
+    to_Shift_JIS_E9_96_infos,
+
+#define to_Shift_JIS_E9_97_infos WORDINDEX2INFO(17859)
+           INVALID,         UNDEF, o2(0xe8,0x8a), o2(0x88,0xc5),
+     o2(0xe8,0x88), o2(0xe8,0x8c), o2(0xe8,0x8b), o2(0xe8,0x8e),
+     o2(0xe8,0x8d), o2(0xe8,0x8f), o2(0x93,0xac), o2(0xe8,0x90),
+     o2(0xe8,0x91), o2(0xe8,0x93), o2(0xe8,0x92),
+
+#define to_Shift_JIS_E9_97 WORDINDEX2INFO(17874)
+    to_Shift_JIS_E9_97_offsets,
+    to_Shift_JIS_E9_97_infos,
+
+#define to_Shift_JIS_E9_98_infos WORDINDEX2INFO(17876)
+           INVALID,         UNDEF, o2(0x95,0x8c), o2(0xe8,0x94),
+     o2(0xe8,0x95), o2(0x8d,0xe3), o2(0xe8,0x96), o2(0xe8,0x97),
+     o2(0x96,0x68), o2(0x91,0x6a), o2(0x88,0xa2),
+
+#define to_Shift_JIS_E9_98 WORDINDEX2INFO(17887)
+    to_Shift_JIS_E9_98_offsets,
+    to_Shift_JIS_E9_98_infos,
+
+#define to_Shift_JIS_E9_99_infos WORDINDEX2INFO(17889)
+           INVALID, o2(0x91,0xc9),         UNDEF, o2(0xe8,0x98),
+     o2(0x95,0x8d), o2(0xe8,0x9b), o2(0xe8,0x99), o2(0x8d,0x7e),
+     o2(0xe8,0x9a), o2(0x8c,0xc0), o2(0x95,0xc3), o2(0xe8,0x9d),
+     o2(0xe8,0x9f), o2(0xe8,0x9e), o2(0xe8,0xa0), o2(0x89,0x40),
+     o2(0x90,0x77), o2(0x8f,0x9c), o2(0x8a,0xd7), o2(0xe8,0xa1),
+     o2(0x94,0x86), o2(0xe8,0xa3), o2(0x89,0x41), o2(0xe8,0xa2),
+     o2(0x92,0xc2), o2(0x97,0xcb), o2(0x93,0xa9), o2(0xe8,0x9c),
+     o2(0x97,0xa4), o2(0x8c,0xaf), o2(0x97,0x7a),
+
+#define to_Shift_JIS_E9_99 WORDINDEX2INFO(17920)
+    to_Shift_JIS_E9_99_offsets,
+    to_Shift_JIS_E9_99_infos,
+
+#define to_Shift_JIS_E9_9A_infos WORDINDEX2INFO(17922)
+           INVALID,         UNDEF, o2(0x8b,0xf7), o2(0x97,0xb2),
+     o2(0x8c,0x47), o2(0x91,0xe0), o2(0xe4,0x40), o2(0xe8,0xa4),
+     o2(0x8a,0x4b), o2(0x90,0x8f), o2(0x8a,0x75), o2(0xe8,0xa6),
+     o2(0xe8,0xa7), o2(0xe8,0xa5), o2(0x8c,0x84), o2(0x8d,0xdb),
+     o2(0x8f,0xe1), o2(0x89,0x42), o2(0x97,0xd7), o2(0xe8,0xa9),
+     o2(0xe7,0xac), o2(0xe8,0xa8), o2(0xe8,0xac), o2(0xe8,0xaa),
+     o2(0xe8,0xab), o2(0xe8,0xad), o2(0xe8,0xae), o2(0x97,0xea),
+     o2(0xe8,0xaf), o2(0xe8,0xb0), o2(0x90,0xc7), o2(0x94,0xb9),
+
+#define to_Shift_JIS_E9_9A WORDINDEX2INFO(17954)
+    to_Shift_JIS_E9_9A_offsets,
+    to_Shift_JIS_E9_9A_infos,
+
+#define to_Shift_JIS_E9_9B_infos WORDINDEX2INFO(17956)
+           INVALID, o2(0x90,0x9d), o2(0x8a,0xe5),         UNDEF,
+     o2(0x97,0x59), o2(0x89,0xeb), o2(0x8f,0x57), o2(0x8c,0xd9),
+     o2(0xe8,0xb3), o2(0xe8,0xb2), o2(0x8e,0x93), o2(0xe8,0xb4),
+     o2(0xe8,0xb1), o2(0x8e,0x47), o2(0xe8,0xb8), o2(0xe5,0xab),
+     o2(0x99,0xd4), o2(0x90,0x97), o2(0xe8,0xb6), o2(0x97,0xa3),
+     o2(0x93,0xef), o2(0x89,0x4a), o2(0x90,0xe1), o2(0x8e,0xb4),
+     o2(0x95,0xb5), o2(0x89,0x5f), o2(0x97,0xeb), o2(0x97,0x8b),
+     o2(0xe8,0xb9), o2(0x93,0x64),
+
+#define to_Shift_JIS_E9_9B WORDINDEX2INFO(17986)
+    to_Shift_JIS_E9_9B_offsets,
+    to_Shift_JIS_E9_9B_infos,
+
+#define to_Shift_JIS_E9_9C_infos WORDINDEX2INFO(17988)
+           INVALID, o2(0x8e,0xf9),         UNDEF, o2(0xe8,0xba),
+     o2(0xe8,0xbb), o2(0x90,0x6b), o2(0xe8,0xbc), o2(0x97,0xec),
+     o2(0xe8,0xb7), o2(0xe8,0xbe), o2(0xe8,0xc0), o2(0xe8,0xbf),
+     o2(0xe8,0xbd), o2(0xe8,0xc1), o2(0xe8,0xc2), o2(0x91,0x9a),
+     o2(0x89,0xe0), o2(0xe8,0xc3), o2(0x96,0xb6), o2(0xe8,0xc4),
+     o2(0xe8,0xc5), o2(0x98,0x49), o2(0x9e,0x50), o2(0xe8,0xc6),
+     o2(0xe8,0xc7), o2(0xe8,0xc8),
+
+#define to_Shift_JIS_E9_9C WORDINDEX2INFO(18014)
+    to_Shift_JIS_E9_9C_offsets,
+    to_Shift_JIS_E9_9C_infos,
+
+#define to_Shift_JIS_E9_9D_infos WORDINDEX2INFO(18016)
+           INVALID,         UNDEF, o2(0xe8,0xcc), o2(0xe8,0xc9),
+     o2(0xe8,0xca), o2(0xe8,0xcb), o2(0xe8,0xcd), o2(0x90,0xc2),
+     o2(0x96,0xf5), o2(0x90,0xc3), o2(0xe8,0xce), o2(0x94,0xf1),
+     o2(0xe8,0xcf), o2(0xea,0x72), o2(0x96,0xca), o2(0xe8,0xd0),
+     o2(0xe8,0xd1), o2(0xe8,0xd2), o2(0x8a,0x76), o2(0xe8,0xd4),
+     o2(0x90,0x78), o2(0xe8,0xd5), o2(0x8c,0x43), o2(0xe8,0xd6),
+     o2(0xe8,0xda), o2(0xe8,0xd8),
+
+#define to_Shift_JIS_E9_9D WORDINDEX2INFO(18042)
+    to_Shift_JIS_E9_9D_offsets,
+    to_Shift_JIS_E9_9D_infos,
+
+#define to_Shift_JIS_E9_9E_infos WORDINDEX2INFO(18044)
+           INVALID,         UNDEF, o2(0xe8,0xd9), o2(0x8a,0x93),
+     o2(0xe8,0xd7), o2(0xe8,0xdb), o2(0xe8,0xdc), o2(0x88,0xc6),
+     o2(0xe8,0xdd), o2(0xe8,0xde), o2(0x8f,0xe2), o2(0xe8,0xdf),
+     o2(0x8b,0x66), o2(0xe8,0xe2), o2(0xe8,0xe1), o2(0xe8,0xe0),
+     o2(0xe6,0x91), o2(0x95,0xda), o2(0xe8,0xe3), o2(0xe8,0xe4),
+
+#define to_Shift_JIS_E9_9E WORDINDEX2INFO(18064)
+    to_Shift_JIS_E9_9E_offsets,
+    to_Shift_JIS_E9_9E_infos,
+
+#define to_Shift_JIS_E9_9F_infos WORDINDEX2INFO(18066)
+           INVALID,         UNDEF, o2(0xe8,0xe5), o2(0xe8,0xe6),
+     o2(0xe8,0xe7), o2(0xe8,0xe8), o2(0x8a,0xd8), o2(0xe8,0xe9),
+     o2(0xe8,0xea), o2(0x94,0x42), o2(0xe8,0xec), o2(0x89,0xb9),
+     o2(0xe8,0xef), o2(0xe8,0xee), o2(0x89,0x43), o2(0x8b,0xbf),
+
+#define to_Shift_JIS_E9_9F WORDINDEX2INFO(18082)
+    to_Shift_JIS_E9_9F_offsets,
+    to_Shift_JIS_E9_9F_infos,
+
+#define to_Shift_JIS_E9_A0_infos WORDINDEX2INFO(18084)
+           INVALID,         UNDEF, o2(0x95,0xc5), o2(0x92,0xb8),
+     o2(0x8d,0xa0), o2(0x8d,0x80), o2(0x8f,0x87), o2(0x90,0x7b),
+     o2(0xe8,0xf1), o2(0xe8,0xf0), o2(0x97,0x61), o2(0x8a,0xe6),
+     o2(0x94,0xd0), o2(0x93,0xda), o2(0x90,0x9c), o2(0x97,0xcc),
+     o2(0x8c,0x7a), o2(0xe8,0xf4), o2(0xe8,0xf3), o2(0x96,0x6a),
+     o2(0x93,0xaa), o2(0x89,0x6f), o2(0xe8,0xf5), o2(0xe8,0xf2),
+     o2(0x95,0x70), o2(0x97,0x8a), o2(0xe8,0xf6),
+
+#define to_Shift_JIS_E9_A0 WORDINDEX2INFO(18111)
+    to_Shift_JIS_E9_A0_offsets,
+    to_Shift_JIS_E9_A0_infos,
+
+#define to_Shift_JIS_E9_A1_infos WORDINDEX2INFO(18113)
+           INVALID,         UNDEF, o2(0xe8,0xf7), o2(0xe8,0xf9),
+     o2(0x91,0xe8), o2(0x8a,0x7a), o2(0x8a,0x7b), o2(0xe8,0xf8),
+     o2(0x8a,0xe7), o2(0x8c,0xb0), o2(0x8a,0xe8), o2(0x93,0x5e),
+     o2(0x97,0xde), o2(0x8c,0xda), o2(0xe8,0xfa), o2(0xe8,0xfb),
+     o2(0xe8,0xfc), o2(0xe9,0x40), o2(0xe9,0x42), o2(0xe9,0x41),
+
+#define to_Shift_JIS_E9_A1 WORDINDEX2INFO(18133)
+    to_Shift_JIS_E9_A1_offsets,
+    to_Shift_JIS_E9_A1_infos,
+
+#define to_Shift_JIS_E9_A2_infos WORDINDEX2INFO(18135)
+           INVALID,         UNDEF, o2(0x95,0x97), o2(0xe9,0x43),
+     o2(0xe9,0x44), o2(0xe9,0x45), o2(0xe9,0x46),
+
+#define to_Shift_JIS_E9_A2 WORDINDEX2INFO(18142)
+    to_Shift_JIS_E9_A2_offsets,
+    to_Shift_JIS_E9_A2_infos,
+
+#define to_Shift_JIS_E9_A3_infos WORDINDEX2INFO(18144)
+           INVALID,         UNDEF, o2(0xe9,0x48), o2(0xe9,0x47),
+     o2(0xe9,0x49), o2(0x94,0xf2), o2(0xe3,0xca), o2(0x90,0x48),
+     o2(0x8b,0x51), o2(0xe9,0x4a), o2(0xe9,0x4b), o2(0x99,0xaa),
+     o2(0x9f,0x5a), o2(0x94,0xd1), o2(0x88,0xf9), o2(0x88,0xb9),
+     o2(0x8e,0x94), o2(0x96,0x4f), o2(0x8f,0xfc),
+
+#define to_Shift_JIS_E9_A3 WORDINDEX2INFO(18163)
+    to_Shift_JIS_E9_A3_offsets,
+    to_Shift_JIS_E9_A3_infos,
+
+#define to_Shift_JIS_E9_A4_infos WORDINDEX2INFO(18165)
+           INVALID,         UNDEF, o2(0xe9,0x4c), o2(0x96,0xdd),
+     o2(0xe9,0x4d), o2(0x97,0x7b), o2(0x89,0x61), o2(0x8e,0x60),
+     o2(0xe9,0x4e), o2(0x89,0xec), o2(0xe9,0x4f), o2(0xe9,0x50),
+     o2(0xe9,0x52), o2(0xe9,0x53), o2(0xe9,0x55), o2(0xe9,0x51),
+     o2(0xe9,0x54), o2(0x8a,0xd9), o2(0xe9,0x56), o2(0xe9,0x57),
+     o2(0xe9,0x58), o2(0xe9,0x59),
+
+#define to_Shift_JIS_E9_A4 WORDINDEX2INFO(18187)
+    to_Shift_JIS_E9_A4_offsets,
+    to_Shift_JIS_E9_A4_infos,
+
+#define to_Shift_JIS_E9_A5_infos WORDINDEX2INFO(18189)
+           INVALID,         UNDEF, o2(0xe9,0x5a), o2(0xe9,0x5c),
+     o2(0xe9,0x5b), o2(0xe9,0x5e), o2(0xe9,0x61), o2(0xe9,0x5d),
+     o2(0xe9,0x5f), o2(0xe9,0x60), o2(0xe9,0x62), o2(0x8b,0xc0),
+
+#define to_Shift_JIS_E9_A5 WORDINDEX2INFO(18201)
+    to_Shift_JIS_E9_A5_offsets,
+    to_Shift_JIS_E9_A5_infos,
+
+#define to_Shift_JIS_E9_A6_infos WORDINDEX2INFO(18203)
+           INVALID,         UNDEF, o2(0x8e,0xf1), o2(0xe9,0x63),
+     o2(0xe9,0x64), o2(0x8d,0x81), o2(0xe9,0x65), o2(0x8a,0x5d),
+     o2(0x94,0x6e), o2(0xe9,0x66), o2(0xe9,0x67), o2(0x92,0x79),
+     o2(0x93,0xe9), o2(0xe9,0x68),
+
+#define to_Shift_JIS_E9_A6 WORDINDEX2INFO(18217)
+    to_Shift_JIS_E9_A6_offsets,
+    to_Shift_JIS_E9_A6_infos,
+
+#define to_Shift_JIS_E9_A7_infos WORDINDEX2INFO(18219)
+           INVALID,         UNDEF, o2(0x94,0x9d), o2(0x91,0xca),
+     o2(0x89,0x77), o2(0x8b,0xec), o2(0x8b,0xed), o2(0x92,0x93),
+     o2(0xe9,0x6d), o2(0x8b,0xee), o2(0x89,0xed), o2(0xe9,0x6c),
+     o2(0xe9,0x6a), o2(0xe9,0x6b), o2(0xe9,0x69), o2(0xe9,0x77),
+     o2(0xe9,0x6e), o2(0xe9,0x6f), o2(0xe9,0x70), o2(0xe9,0x71),
+     o2(0xe9,0x73), o2(0xe9,0x72), o2(0x8f,0x78),
+
+#define to_Shift_JIS_E9_A7 WORDINDEX2INFO(18242)
+    to_Shift_JIS_E9_A7_offsets,
+    to_Shift_JIS_E9_A7_infos,
+
+#define to_Shift_JIS_E9_A8_infos WORDINDEX2INFO(18244)
+           INVALID,         UNDEF, o2(0xe9,0x74), o2(0xe9,0x76),
+     o2(0x8b,0x52), o2(0xe9,0x75), o2(0x91,0x9b), o2(0x8c,0xb1),
+     o2(0xe9,0x78), o2(0x91,0xcb), o2(0xe9,0x79), o2(0x93,0xab),
+     o2(0xe9,0x7a), o2(0xe9,0x80),
+
+#define to_Shift_JIS_E9_A8 WORDINDEX2INFO(18258)
+    to_Shift_JIS_E9_A8_offsets,
+    to_Shift_JIS_E9_A8_infos,
+
+#define to_Shift_JIS_E9_A9_infos WORDINDEX2INFO(18260)
+           INVALID, o2(0xe9,0x7d),         UNDEF, o2(0xe9,0x7c),
+     o2(0xe9,0x7e), o2(0xe9,0x7b), o2(0xe9,0x82), o2(0xe9,0x81),
+     o2(0xe9,0x84), o2(0x8b,0xc1), o2(0xe9,0x83), o2(0xe9,0x85),
+     o2(0xe9,0x86), o2(0xe9,0x88), o2(0xe9,0x87), o2(0xe9,0x89),
+     o2(0xe9,0x8b), o2(0xe9,0x8a),
+
+#define to_Shift_JIS_E9_A9 WORDINDEX2INFO(18278)
+    to_Shift_JIS_E9_A9_offsets,
+    to_Shift_JIS_E9_A9_infos,
+
+#define to_Shift_JIS_E9_AA_infos WORDINDEX2INFO(18280)
+           INVALID,         UNDEF, o2(0x8d,0x9c), o2(0xe9,0x8c),
+     o2(0xe9,0x8d), o2(0x8a,0x5b), o2(0xe9,0x8e),
+
+#define to_Shift_JIS_E9_AA WORDINDEX2INFO(18287)
+    to_Shift_JIS_E9_AA_offsets,
+    to_Shift_JIS_E9_AA_infos,
+
+#define to_Shift_JIS_E9_AB_infos WORDINDEX2INFO(18289)
+           INVALID, o2(0xe9,0x8f),         UNDEF, o2(0x90,0x91),
+     o2(0xe9,0x90), o2(0xe9,0x91), o2(0xe9,0x92), o2(0xe9,0x93),
+     o2(0x8d,0x82), o2(0xe9,0x94), o2(0xe9,0x95), o2(0xe9,0x96),
+     o2(0xe9,0x97), o2(0xe9,0x98), o2(0x94,0xaf), o2(0xe9,0x9a),
+     o2(0x95,0x45), o2(0xe9,0x9b), o2(0xe9,0x99), o2(0xe9,0x9d),
+     o2(0xe9,0x9c), o2(0xe9,0x9e), o2(0xe9,0x9f),
+
+#define to_Shift_JIS_E9_AB WORDINDEX2INFO(18312)
+    to_Shift_JIS_E9_AB_offsets,
+    to_Shift_JIS_E9_AB_infos,
+
+#define to_Shift_JIS_E9_AC_infos WORDINDEX2INFO(18314)
+           INVALID,         UNDEF, o2(0xe9,0xa0), o2(0xe9,0xa1),
+     o2(0xe9,0xa2), o2(0xe9,0xa3), o2(0xe9,0xa4), o2(0xe9,0xa5),
+     o2(0xe9,0xa6), o2(0xe9,0xa7), o2(0xe9,0xa8), o2(0xe9,0xa9),
+     o2(0xe9,0xaa), o2(0xe9,0xab), o2(0xe9,0xac), o2(0x9f,0x54),
+     o2(0xe9,0xad), o2(0xe2,0xf6), o2(0x8b,0x53),
+
+#define to_Shift_JIS_E9_AC WORDINDEX2INFO(18333)
+    to_Shift_JIS_E9_AC_offsets,
+    to_Shift_JIS_E9_AC_infos,
+
+#define to_Shift_JIS_E9_AD_infos WORDINDEX2INFO(18335)
+           INVALID,         UNDEF, o2(0x8a,0x40), o2(0x8d,0xb0),
+     o2(0xe9,0xaf), o2(0xe9,0xae), o2(0x96,0xa3), o2(0xe9,0xb1),
+     o2(0xe9,0xb2), o2(0xe9,0xb0), o2(0xe9,0xb3), o2(0x96,0x82),
+     o2(0xe9,0xb4), o2(0x8b,0x9b), o2(0x98,0x44), o2(0xe9,0xb5),
+
+#define to_Shift_JIS_E9_AD WORDINDEX2INFO(18351)
+    to_Shift_JIS_E9_AD_offsets,
+    to_Shift_JIS_E9_AD_infos,
+
+#define to_Shift_JIS_E9_AE_infos WORDINDEX2INFO(18353)
+           INVALID,         UNDEF, o2(0xe9,0xb7), o2(0x88,0xbc),
+     o2(0xe9,0xb8), o2(0x95,0xa9), o2(0xe9,0xb6), o2(0xe9,0xb9),
+     o2(0xe9,0xba), o2(0xe9,0xbb), o2(0xe9,0xbc), o2(0xe9,0xbd),
+     o2(0x96,0x8e), o2(0x8e,0x4c), o2(0x8d,0xf8), o2(0x91,0x4e),
+     o2(0xe9,0xbe), o2(0xe9,0xc1),
+
+#define to_Shift_JIS_E9_AE WORDINDEX2INFO(18371)
+    to_Shift_JIS_E9_AE_offsets,
+    to_Shift_JIS_E9_AE_infos,
+
+#define to_Shift_JIS_E9_AF_infos WORDINDEX2INFO(18373)
+           INVALID, o2(0xe9,0xbf),         UNDEF, o2(0xe9,0xc2),
+     o2(0x8c,0xef), o2(0xe9,0xc0), o2(0xe9,0xc3), o2(0xe9,0xc4),
+     o2(0xe9,0xc5), o2(0xe9,0xc9), o2(0x8e,0x49), o2(0x91,0xe2),
+     o2(0xe9,0xca), o2(0xe9,0xc7), o2(0xe9,0xc6), o2(0xe9,0xc8),
+     o2(0x8c,0x7e), o2(0xe9,0xce), o2(0xe9,0xcd), o2(0xe9,0xcc),
+     o2(0x88,0xb1),
+
+#define to_Shift_JIS_E9_AF WORDINDEX2INFO(18394)
+    to_Shift_JIS_E9_AF_offsets,
+    to_Shift_JIS_E9_AF_infos,
+
+#define to_Shift_JIS_E9_B0_infos WORDINDEX2INFO(18396)
+           INVALID,         UNDEF, o2(0xe9,0xd8), o2(0xe9,0xd4),
+     o2(0xe9,0xd5), o2(0xe9,0xd1), o2(0xe9,0xd7), o2(0xe9,0xd3),
+     o2(0x8a,0x82), o2(0x98,0x6b), o2(0xe9,0xd6), o2(0xe9,0xd2),
+     o2(0xe9,0xd0), o2(0xe9,0xcf), o2(0xe9,0xda), o2(0xe9,0xdd),
+     o2(0xe9,0xdc), o2(0xe9,0xdb), o2(0x95,0x68), o2(0xe9,0xd9),
+     o2(0x88,0xf1), o2(0xe9,0xde), o2(0xe9,0xe0), o2(0x8a,0x8f),
+     o2(0xe9,0xcb), o2(0x89,0x56), o2(0xe9,0xe2),
+
+#define to_Shift_JIS_E9_B0 WORDINDEX2INFO(18423)
+    to_Shift_JIS_E9_B0_offsets,
+    to_Shift_JIS_E9_B0_infos,
+
+#define to_Shift_JIS_E9_B1_infos WORDINDEX2INFO(18425)
+           INVALID,         UNDEF, o2(0xe9,0xe1), o2(0xe9,0xdf),
+     o2(0x92,0x4c), o2(0x96,0x90), o2(0x97,0xd8), o2(0xe9,0xe3),
+     o2(0xe9,0xe4), o2(0xe9,0xe5), o2(0xe9,0xe6), o2(0xe9,0xe7),
+
+#define to_Shift_JIS_E9_B1 WORDINDEX2INFO(18437)
+    to_Shift_JIS_E9_B1_offsets,
+    to_Shift_JIS_E9_B1_infos,
+
+#define to_Shift_JIS_E9_B3_infos WORDINDEX2INFO(18439)
+           INVALID,         UNDEF, o2(0x92,0xb9), o2(0xe9,0xe8),
+     o2(0x94,0xb5), o2(0xe9,0xed), o2(0xe9,0xe9), o2(0xe9,0xea),
+     o2(0x96,0x50), o2(0x96,0xc2), o2(0x93,0xce),
+
+#define to_Shift_JIS_E9_B3 WORDINDEX2INFO(18450)
+    to_Shift_JIS_E9_B3_offsets,
+    to_Shift_JIS_E9_B3_infos,
+
+#define to_Shift_JIS_E9_B4_infos WORDINDEX2INFO(18452)
+           INVALID,         UNDEF, o2(0xe9,0xee), o2(0xe9,0xef),
+     o2(0x93,0xbc), o2(0xe9,0xec), o2(0xe9,0xeb), o2(0x89,0xa8),
+     o2(0xe9,0xf7), o2(0xe9,0xf6), o2(0x89,0x95), o2(0xe9,0xf4),
+     o2(0xe9,0xf3), o2(0xe9,0xf1), o2(0x8a,0x9b), o2(0xe9,0xf0),
+     o2(0x8e,0xb0), o2(0x89,0xa7), o2(0x8d,0x83), o2(0xe9,0xfa),
+     o2(0xe9,0xf9),
+
+#define to_Shift_JIS_E9_B4 WORDINDEX2INFO(18473)
+    to_Shift_JIS_E9_B4_offsets,
+    to_Shift_JIS_E9_B4_infos,
+
+#define to_Shift_JIS_E9_B5_infos WORDINDEX2INFO(18475)
+           INVALID,         UNDEF, o2(0xe9,0xf8), o2(0xe9,0xf5),
+     o2(0xe9,0xfb), o2(0xe9,0xfc), o2(0xea,0x44), o2(0xea,0x43),
+     o2(0xea,0x45), o2(0x89,0x4c), o2(0xea,0x40), o2(0xea,0x41),
+     o2(0x8d,0x94), o2(0x96,0xb7), o2(0xea,0x42), o2(0x96,0x51),
+     o2(0xea,0x4a), o2(0xea,0x46), o2(0xea,0x4b),
+
+#define to_Shift_JIS_E9_B5 WORDINDEX2INFO(18494)
+    to_Shift_JIS_E9_B5_offsets,
+    to_Shift_JIS_E9_B5_infos,
+
+#define to_Shift_JIS_E9_B6_infos WORDINDEX2INFO(18496)
+           INVALID,         UNDEF, o2(0xea,0x48), o2(0xea,0x47),
+     o2(0x8c,0x7b), o2(0xea,0x4c), o2(0xea,0x4d), o2(0xea,0x4e),
+     o2(0xea,0x49), o2(0xe9,0xf2), o2(0xea,0x4f), o2(0x92,0xdf),
+     o2(0xea,0x53), o2(0xea,0x54), o2(0xea,0x52),
+
+#define to_Shift_JIS_E9_B6 WORDINDEX2INFO(18511)
+    to_Shift_JIS_E9_B6_offsets,
+    to_Shift_JIS_E9_B6_infos,
+
+#define to_Shift_JIS_E9_B7_infos WORDINDEX2INFO(18513)
+           INVALID,         UNDEF, o2(0xea,0x51), o2(0xea,0x57),
+     o2(0xea,0x50), o2(0xea,0x55), o2(0xea,0x56), o2(0xea,0x59),
+     o2(0xea,0x58), o2(0xea,0x5b), o2(0xea,0x5c), o2(0xea,0x5d),
+     o2(0x98,0x68), o2(0xea,0x5a), o2(0x91,0xe9), o2(0x8d,0xeb),
+     o2(0xea,0x5e),
+
+#define to_Shift_JIS_E9_B7 WORDINDEX2INFO(18530)
+    to_Shift_JIS_E9_B7_offsets,
+    to_Shift_JIS_E9_B7_infos,
+
+#define to_Shift_JIS_E9_B8_infos WORDINDEX2INFO(18532)
+           INVALID,         UNDEF, o2(0xea,0x5f), o2(0xea,0x60),
+     o2(0xea,0x61),
+
+#define to_Shift_JIS_E9_B8 WORDINDEX2INFO(18537)
+    to_Shift_JIS_E9_B8_offsets,
+    to_Shift_JIS_E9_B8_infos,
+
+#define to_Shift_JIS_E9_B9_infos WORDINDEX2INFO(18539)
+           INVALID,         UNDEF, o2(0xea,0x62), o2(0x8c,0xb2),
+     o2(0xea,0x63), o2(0xea,0x64), o2(0x8e,0xad),
+
+#define to_Shift_JIS_E9_B9 WORDINDEX2INFO(18546)
+    to_Shift_JIS_E9_B9_offsets,
+    to_Shift_JIS_E9_B9_infos,
+
+#define to_Shift_JIS_E9_BA_infos WORDINDEX2INFO(18548)
+           INVALID,         UNDEF, o2(0xea,0x65), o2(0xea,0x66),
+     o2(0xea,0x67), o2(0xea,0x68), o2(0xea,0x6b), o2(0xea,0x69),
+     o2(0x98,0x5b), o2(0xea,0x6a), o2(0x97,0xed), o2(0xea,0x6c),
+     o2(0x97,0xd9), o2(0xea,0x6d), o2(0x94,0x9e), o2(0xea,0x6e),
+     o2(0xea,0x70), o2(0xea,0x71), o2(0xea,0x6f), o2(0x8d,0x8d),
+     o2(0x96,0xcb), o2(0x96,0x83), o2(0x9b,0xf5), o2(0x9f,0x80),
+     o2(0x96,0x9b),
+
+#define to_Shift_JIS_E9_BA WORDINDEX2INFO(18573)
+    to_Shift_JIS_E9_BA_offsets,
+    to_Shift_JIS_E9_BA_infos,
+
+#define to_Shift_JIS_E9_BB_infos WORDINDEX2INFO(18575)
+           INVALID,         UNDEF, o2(0x89,0xa9), o2(0xea,0x73),
+     o2(0x8b,0x6f), o2(0xea,0x74), o2(0xea,0x75), o2(0xea,0x76),
+     o2(0x8d,0x95), o2(0xea,0x77), o2(0xe0,0xd2), o2(0x96,0xd9),
+     o2(0x91,0xe1), o2(0xea,0x78), o2(0xea,0x7a), o2(0xea,0x79),
+     o2(0xea,0x7b), o2(0xea,0x7c), o2(0xea,0x7d), o2(0xea,0x7e),
+     o2(0xea,0x80), o2(0xea,0x81), o2(0xea,0x82), o2(0xea,0x83),
+     o2(0xea,0x84), o2(0xea,0x85), o2(0xea,0x86),
+
+#define to_Shift_JIS_E9_BB WORDINDEX2INFO(18602)
+    to_Shift_JIS_E9_BB_offsets,
+    to_Shift_JIS_E9_BB_infos,
+
+#define to_Shift_JIS_E9_BC_infos WORDINDEX2INFO(18604)
+           INVALID,         UNDEF, o2(0xea,0x87), o2(0xea,0x88),
+     o2(0x93,0x43), o2(0x8c,0xdb), o2(0xea,0x8a), o2(0x91,0x6c),
+     o2(0xea,0x8b), o2(0xea,0x8c), o2(0x95,0x40), o2(0xea,0x8d),
+
+#define to_Shift_JIS_E9_BC WORDINDEX2INFO(18616)
+    to_Shift_JIS_E9_BC_offsets,
+    to_Shift_JIS_E9_BC_infos,
+
+#define to_Shift_JIS_E9_BD_infos WORDINDEX2INFO(18618)
+           INVALID,         UNDEF, o2(0xea,0x8e), o2(0xe2,0x56),
+     o2(0xe6,0xd8), o2(0xe8,0xeb), o2(0xea,0x8f), o2(0xea,0x90),
+     o2(0xea,0x92), o2(0xea,0x93), o2(0xea,0x94), o2(0x97,0xee),
+     o2(0xea,0x91), o2(0xea,0x95), o2(0xea,0x96), o2(0xea,0x98),
+     o2(0xea,0x97), o2(0xea,0x9a), o2(0xea,0x9b), o2(0xea,0x99),
+
+#define to_Shift_JIS_E9_BD WORDINDEX2INFO(18638)
+    to_Shift_JIS_E9_BD_offsets,
+    to_Shift_JIS_E9_BD_infos,
+
+#define to_Shift_JIS_E9_BE_infos WORDINDEX2INFO(18640)
+           INVALID,         UNDEF, o2(0x97,0xb4), o2(0xea,0x9c),
+     o2(0xea,0x9d), o2(0xe2,0x73), o2(0xea,0x9e),
+
+#define to_Shift_JIS_E9_BE WORDINDEX2INFO(18647)
+    to_Shift_JIS_E9_BE_offsets,
+    to_Shift_JIS_E9_BE_infos,
+
+#define to_Shift_JIS_E9_infos WORDINDEX2INFO(18649)
+                INVALID, to_Shift_JIS_E9_80,
+     to_Shift_JIS_E9_81, to_Shift_JIS_E9_82,
+     to_Shift_JIS_E9_83, to_Shift_JIS_E9_84,
+     to_Shift_JIS_E9_85, to_Shift_JIS_E9_86,
+     to_Shift_JIS_E9_87, to_Shift_JIS_E9_88,
+     to_Shift_JIS_E9_89, to_Shift_JIS_E9_8A,
+     to_Shift_JIS_E9_8B, to_Shift_JIS_E9_8C,
+     to_Shift_JIS_E9_8D, to_Shift_JIS_E9_8E,
+     to_Shift_JIS_E9_8F, to_Shift_JIS_E9_90,
+     to_Shift_JIS_E9_91, to_Shift_JIS_E9_92,
+        to_Shift_JIS_C4, to_Shift_JIS_E9_95,
+     to_Shift_JIS_E9_96, to_Shift_JIS_E9_97,
+     to_Shift_JIS_E9_98, to_Shift_JIS_E9_99,
+     to_Shift_JIS_E9_9A, to_Shift_JIS_E9_9B,
+     to_Shift_JIS_E9_9C, to_Shift_JIS_E9_9D,
+     to_Shift_JIS_E9_9E, to_Shift_JIS_E9_9F,
+     to_Shift_JIS_E9_A0, to_Shift_JIS_E9_A1,
+     to_Shift_JIS_E9_A2, to_Shift_JIS_E9_A3,
+     to_Shift_JIS_E9_A4, to_Shift_JIS_E9_A5,
+     to_Shift_JIS_E9_A6, to_Shift_JIS_E9_A7,
+     to_Shift_JIS_E9_A8, to_Shift_JIS_E9_A9,
+     to_Shift_JIS_E9_AA, to_Shift_JIS_E9_AB,
+     to_Shift_JIS_E9_AC, to_Shift_JIS_E9_AD,
+     to_Shift_JIS_E9_AE, to_Shift_JIS_E9_AF,
+     to_Shift_JIS_E9_B0, to_Shift_JIS_E9_B1,
+     to_Shift_JIS_E9_B3, to_Shift_JIS_E9_B4,
+     to_Shift_JIS_E9_B5, to_Shift_JIS_E9_B6,
+     to_Shift_JIS_E9_B7, to_Shift_JIS_E9_B8,
+     to_Shift_JIS_E9_B9, to_Shift_JIS_E9_BA,
+     to_Shift_JIS_E9_BB, to_Shift_JIS_E9_BC,
+     to_Shift_JIS_E9_BD, to_Shift_JIS_E9_BE,
+
+#define to_Shift_JIS_E9 WORDINDEX2INFO(18711)
+    to_Shift_JIS_E9_offsets,
+    to_Shift_JIS_E9_infos,
+
+#define to_Shift_JIS_ED WORDINDEX2INFO(18713)
+    to_Shift_JIS_ED_offsets,
+    to_Shift_JIS_E0_infos,
+
+#define to_Shift_JIS_EF_BC_infos WORDINDEX2INFO(18715)
+           INVALID,         UNDEF, o2(0x81,0x49), o2(0x81,0x94),
+     o2(0x81,0x90), o2(0x81,0x93), o2(0x81,0x95), o2(0x81,0x69),
+     o2(0x81,0x6a), o2(0x81,0x96), o2(0x81,0x7b), o2(0x81,0x43),
+     o2(0x81,0x44), o2(0x81,0x5e), o2(0x82,0x4f), o2(0x82,0x50),
+     o2(0x82,0x51), o2(0x82,0x52), o2(0x82,0x53), o2(0x82,0x54),
+     o2(0x82,0x55), o2(0x82,0x56), o2(0x82,0x57), o2(0x82,0x58),
+     o2(0x81,0x46), o2(0x81,0x47), o2(0x81,0x83), o2(0x81,0x81),
+     o2(0x81,0x84), o2(0x81,0x48), o2(0x81,0x97), o2(0x82,0x60),
+     o2(0x82,0x61), o2(0x82,0x62), o2(0x82,0x63), o2(0x82,0x64),
+     o2(0x82,0x65), o2(0x82,0x66), o2(0x82,0x67), o2(0x82,0x68),
+     o2(0x82,0x69), o2(0x82,0x6a), o2(0x82,0x6b), o2(0x82,0x6c),
+     o2(0x82,0x6d), o2(0x82,0x6e), o2(0x82,0x6f), o2(0x82,0x70),
+     o2(0x82,0x71), o2(0x82,0x72), o2(0x82,0x73), o2(0x82,0x74),
+     o2(0x82,0x75), o2(0x82,0x76), o2(0x82,0x77), o2(0x82,0x78),
+     o2(0x82,0x79), o2(0x81,0x6d), o2(0x81,0x5f), o2(0x81,0x6e),
+     o2(0x81,0x4f), o2(0x81,0x51),
+
+#define to_Shift_JIS_EF_BC WORDINDEX2INFO(18777)
+    to_Shift_JIS_EF_BC_offsets,
+    to_Shift_JIS_EF_BC_infos,
+
+#define to_Shift_JIS_EF_BD_infos WORDINDEX2INFO(18779)
+           INVALID, o2(0x81,0x4d), o2(0x82,0x81), o2(0x82,0x82),
+     o2(0x82,0x83), o2(0x82,0x84), o2(0x82,0x85), o2(0x82,0x86),
+     o2(0x82,0x87), o2(0x82,0x88), o2(0x82,0x89), o2(0x82,0x8a),
+     o2(0x82,0x8b), o2(0x82,0x8c), o2(0x82,0x8d), o2(0x82,0x8e),
+     o2(0x82,0x8f), o2(0x82,0x90), o2(0x82,0x91), o2(0x82,0x92),
+     o2(0x82,0x93), o2(0x82,0x94), o2(0x82,0x95), o2(0x82,0x96),
+     o2(0x82,0x97), o2(0x82,0x98), o2(0x82,0x99), o2(0x82,0x9a),
+     o2(0x81,0x6f), o2(0x81,0x62), o2(0x81,0x70),         UNDEF,
+          o1(0xa1),      o1(0xa2),      o1(0xa3),      o1(0xa4),
+          o1(0xa5),      o1(0xa6),      o1(0xa7),      o1(0xa8),
+          o1(0xa9),      o1(0xaa),      o1(0xab),      o1(0xac),
+          o1(0xad),      o1(0xae),      o1(0xaf),      o1(0xb0),
+          o1(0xb1),      o1(0xb2),      o1(0xb3),      o1(0xb4),
+          o1(0xb5),      o1(0xb6),      o1(0xb7),      o1(0xb8),
+          o1(0xb9),      o1(0xba),      o1(0xbb),      o1(0xbc),
+          o1(0xbd),      o1(0xbe),      o1(0xbf),
+
+#define to_Shift_JIS_EF_BD WORDINDEX2INFO(18842)
+    to_Shift_JIS_EF_BD_offsets,
+    to_Shift_JIS_EF_BD_infos,
+
+#define to_Shift_JIS_EF_BE_infos WORDINDEX2INFO(18844)
+      INVALID, o1(0xc0), o1(0xc1), o1(0xc2),
+     o1(0xc3), o1(0xc4), o1(0xc5), o1(0xc6),
+     o1(0xc7), o1(0xc8), o1(0xc9), o1(0xca),
+     o1(0xcb), o1(0xcc), o1(0xcd), o1(0xce),
+     o1(0xcf), o1(0xd0), o1(0xd1), o1(0xd2),
+     o1(0xd3), o1(0xd4), o1(0xd5), o1(0xd6),
+     o1(0xd7), o1(0xd8), o1(0xd9), o1(0xda),
+     o1(0xdb), o1(0xdc), o1(0xdd), o1(0xde),
+     o1(0xdf),    UNDEF,
+
+#define to_Shift_JIS_EF_BE WORDINDEX2INFO(18878)
+    to_Shift_JIS_EF_BE_offsets,
+    to_Shift_JIS_EF_BE_infos,
+
+#define to_Shift_JIS_EF_BF_infos WORDINDEX2INFO(18880)
+           INVALID,         UNDEF, o2(0x81,0x50), o2(0x81,0x8f),
+
+#define to_Shift_JIS_EF_BF WORDINDEX2INFO(18884)
+    to_Shift_JIS_EF_BF_offsets,
+    to_Shift_JIS_EF_BF_infos,
+
+#define to_Shift_JIS_EF_infos WORDINDEX2INFO(18886)
+                INVALID,    to_Shift_JIS_C4,
+     to_Shift_JIS_EF_BC, to_Shift_JIS_EF_BD,
+     to_Shift_JIS_EF_BE, to_Shift_JIS_EF_BF,
+
+#define to_Shift_JIS_EF WORDINDEX2INFO(18892)
+    to_Shift_JIS_EF_offsets,
+    to_Shift_JIS_EF_infos,
+
+#define to_Shift_JIS_F0_infos WORDINDEX2INFO(18894)
+             INVALID, to_Shift_JIS_E1,
+
+#define to_Shift_JIS_F0 WORDINDEX2INFO(18896)
+    to_Shift_JIS_F0_offsets,
+    to_Shift_JIS_F0_infos,
+
+#define to_Shift_JIS_F1 WORDINDEX2INFO(18898)
+    to_Shift_JIS_C4_offsets,
+    to_Shift_JIS_F0_infos,
+
+#define to_Shift_JIS_F4 WORDINDEX2INFO(18900)
+    to_Shift_JIS_F4_offsets,
+    to_Shift_JIS_F0_infos,
+
+#define to_Shift_JIS_infos WORDINDEX2INFO(18902)
+               NOMAP,         INVALID, to_Shift_JIS_C2, to_Shift_JIS_C3,
+     to_Shift_JIS_C4, to_Shift_JIS_CE, to_Shift_JIS_CF, to_Shift_JIS_D0,
+     to_Shift_JIS_D1, to_Shift_JIS_E0, to_Shift_JIS_E1, to_Shift_JIS_E2,
+     to_Shift_JIS_E3, to_Shift_JIS_E4, to_Shift_JIS_E5, to_Shift_JIS_E6,
+     to_Shift_JIS_E7, to_Shift_JIS_E8, to_Shift_JIS_E9, to_Shift_JIS_ED,
+     to_Shift_JIS_EF, to_Shift_JIS_F0, to_Shift_JIS_F1, to_Shift_JIS_F4,
+
+#define to_Shift_JIS WORDINDEX2INFO(18926)
+    to_Shift_JIS_offsets,
+    to_Shift_JIS_infos,
+
+#define to_Windows_31J_C2_infos WORDINDEX2INFO(18928)
+           INVALID,         UNDEF, o2(0x81,0x98), o2(0x81,0x4e),
+     o2(0x81,0x8b), o2(0x81,0x7d), o2(0x81,0x4c), o2(0x81,0xf7),
+
+#define to_Windows_31J_C2 WORDINDEX2INFO(18936)
+    to_Windows_31J_C2_offsets,
+    to_Windows_31J_C2_infos,
+
+#define to_Windows_31J_E2_80_infos WORDINDEX2INFO(18938)
+           INVALID,         UNDEF, o2(0x81,0x5d), o2(0x81,0x5c),
+     o2(0x81,0x65), o2(0x81,0x66), o2(0x81,0x67), o2(0x81,0x68),
+     o2(0x81,0xf5), o2(0x81,0xf6), o2(0x81,0x64), o2(0x81,0x63),
+     o2(0x81,0xf1), o2(0x81,0x8c), o2(0x81,0x8d), o2(0x81,0xa6),
+
+#define to_Windows_31J_E2_80 WORDINDEX2INFO(18954)
+    to_Windows_31J_E2_80_offsets,
+    to_Windows_31J_E2_80_infos,
+
+#define to_Windows_31J_E2_84_infos WORDINDEX2INFO(18956)
+           INVALID,         UNDEF, o2(0x81,0x8e), o2(0x87,0x82),
+     o2(0x87,0x84), o2(0x81,0xf0),
+
+#define to_Windows_31J_E2_84 WORDINDEX2INFO(18962)
+    to_Windows_31J_E2_84_offsets,
+    to_Windows_31J_E2_84_infos,
+
+#define to_Windows_31J_E2_85_infos WORDINDEX2INFO(18964)
+           INVALID,         UNDEF, o2(0x87,0x54), o2(0x87,0x55),
+     o2(0x87,0x56), o2(0x87,0x57), o2(0x87,0x58), o2(0x87,0x59),
+     o2(0x87,0x5a), o2(0x87,0x5b), o2(0x87,0x5c), o2(0x87,0x5d),
+     o2(0xfa,0x40), o2(0xfa,0x41), o2(0xfa,0x42), o2(0xfa,0x43),
+     o2(0xfa,0x44), o2(0xfa,0x45), o2(0xfa,0x46), o2(0xfa,0x47),
+     o2(0xfa,0x48), o2(0xfa,0x49),
+
+#define to_Windows_31J_E2_85 WORDINDEX2INFO(18986)
+    to_Windows_31J_E2_85_offsets,
+    to_Windows_31J_E2_85_infos,
+
+#define to_Windows_31J_E2_88_infos WORDINDEX2INFO(18988)
+           INVALID, o2(0x81,0xcd),         UNDEF, o2(0x81,0xdd),
+     o2(0x81,0xce), o2(0x81,0xde), o2(0x81,0xb8), o2(0x81,0xb9),
+     o2(0x87,0x94), o2(0x81,0xe3), o2(0x81,0xe5), o2(0x81,0x87),
+     o2(0x87,0x98), o2(0x81,0xda), o2(0x81,0x61), o2(0x81,0xc8),
+     o2(0x81,0xc9), o2(0x81,0xbf), o2(0x81,0xbe), o2(0x81,0xe7),
+     o2(0x81,0xe8), o2(0x87,0x93), o2(0x81,0x88), o2(0x81,0xe6),
+     o2(0x81,0xe4),
+
+#define to_Windows_31J_E2_88 WORDINDEX2INFO(19013)
+    to_Windows_31J_E2_88_offsets,
+    to_Windows_31J_E2_88_infos,
+
+#define to_Windows_31J_E2_8A_infos WORDINDEX2INFO(19015)
+           INVALID,         UNDEF, o2(0x81,0xbc), o2(0x81,0xbd),
+     o2(0x81,0xba), o2(0x81,0xbb), o2(0x81,0xdb), o2(0x87,0x99),
+
+#define to_Windows_31J_E2_8A WORDINDEX2INFO(19023)
+    to_Windows_31J_E2_8A_offsets,
+    to_Windows_31J_E2_8A_infos,
+
+#define to_Windows_31J_E2_91_infos WORDINDEX2INFO(19025)
+           INVALID,         UNDEF, o2(0x87,0x40), o2(0x87,0x41),
+     o2(0x87,0x42), o2(0x87,0x43), o2(0x87,0x44), o2(0x87,0x45),
+     o2(0x87,0x46), o2(0x87,0x47), o2(0x87,0x48), o2(0x87,0x49),
+     o2(0x87,0x4a), o2(0x87,0x4b), o2(0x87,0x4c), o2(0x87,0x4d),
+     o2(0x87,0x4e), o2(0x87,0x4f), o2(0x87,0x50), o2(0x87,0x51),
+     o2(0x87,0x52), o2(0x87,0x53),
+
+#define to_Windows_31J_E2_91 WORDINDEX2INFO(19047)
+    to_Windows_31J_E2_91_offsets,
+    to_Windows_31J_E2_91_infos,
+
+#define to_Windows_31J_E2_infos WORDINDEX2INFO(19049)
+                  INVALID, to_Windows_31J_E2_80,
+          to_Shift_JIS_C4, to_Windows_31J_E2_84,
+     to_Windows_31J_E2_85,   to_Shift_JIS_E2_86,
+       to_Shift_JIS_E2_87, to_Windows_31J_E2_88,
+       to_Shift_JIS_E2_89, to_Windows_31J_E2_8A,
+       to_Shift_JIS_E2_8C, to_Windows_31J_E2_91,
+       to_Shift_JIS_E2_94,   to_Shift_JIS_E2_95,
+       to_Shift_JIS_E2_96,   to_Shift_JIS_E2_97,
+       to_Shift_JIS_E2_98,   to_Shift_JIS_E2_99,
+
+#define to_Windows_31J_E2 WORDINDEX2INFO(19067)
+    to_Windows_31J_E2_offsets,
+    to_Windows_31J_E2_infos,
+
+#define to_Windows_31J_E3_80_infos WORDINDEX2INFO(19069)
+           INVALID, o2(0x81,0x40), o2(0x81,0x41), o2(0x81,0x42),
+     o2(0x81,0x56),         UNDEF, o2(0x81,0x58), o2(0x81,0x59),
+     o2(0x81,0x5a), o2(0x81,0x71), o2(0x81,0x72), o2(0x81,0x73),
+     o2(0x81,0x74), o2(0x81,0x75), o2(0x81,0x76), o2(0x81,0x77),
+     o2(0x81,0x78), o2(0x81,0x79), o2(0x81,0x7a), o2(0x81,0xa7),
+     o2(0x81,0xac), o2(0x81,0x6b), o2(0x81,0x6c), o2(0x87,0x80),
+     o2(0x87,0x81),
+
+#define to_Windows_31J_E3_80 WORDINDEX2INFO(19094)
+    to_Windows_31J_E3_80_offsets,
+    to_Windows_31J_E3_80_infos,
+
+#define to_Windows_31J_E3_88_infos WORDINDEX2INFO(19096)
+           INVALID,         UNDEF, o2(0x87,0x8a), o2(0x87,0x8b),
+     o2(0x87,0x8c),
+
+#define to_Windows_31J_E3_88 WORDINDEX2INFO(19101)
+    to_Windows_31J_E3_88_offsets,
+    to_Windows_31J_E3_88_infos,
+
+#define to_Windows_31J_E3_8A_infos WORDINDEX2INFO(19103)
+           INVALID,         UNDEF, o2(0x87,0x85), o2(0x87,0x86),
+     o2(0x87,0x87), o2(0x87,0x88), o2(0x87,0x89),
+
+#define to_Windows_31J_E3_8A WORDINDEX2INFO(19110)
+    to_Windows_31J_E3_8A_offsets,
+    to_Windows_31J_E3_8A_infos,
+
+#define to_Windows_31J_E3_8C_infos WORDINDEX2INFO(19112)
+           INVALID,         UNDEF, o2(0x87,0x65), o2(0x87,0x69),
+     o2(0x87,0x60), o2(0x87,0x63), o2(0x87,0x61), o2(0x87,0x6b),
+     o2(0x87,0x6a), o2(0x87,0x64), o2(0x87,0x6c), o2(0x87,0x66),
+     o2(0x87,0x6e),
+
+#define to_Windows_31J_E3_8C WORDINDEX2INFO(19125)
+    to_Windows_31J_E3_8C_offsets,
+    to_Windows_31J_E3_8C_infos,
+
+#define to_Windows_31J_E3_8D_infos WORDINDEX2INFO(19127)
+           INVALID,         UNDEF, o2(0x87,0x5f), o2(0x87,0x6d),
+     o2(0x87,0x62), o2(0x87,0x67), o2(0x87,0x68), o2(0x87,0x7e),
+     o2(0x87,0x8f), o2(0x87,0x8e), o2(0x87,0x8d),
+
+#define to_Windows_31J_E3_8D WORDINDEX2INFO(19138)
+    to_Windows_31J_E3_8D_offsets,
+    to_Windows_31J_E3_8D_infos,
+
+#define to_Windows_31J_E3_8E_infos WORDINDEX2INFO(19140)
+           INVALID,         UNDEF, o2(0x87,0x72), o2(0x87,0x73),
+     o2(0x87,0x6f), o2(0x87,0x70), o2(0x87,0x71), o2(0x87,0x75),
+
+#define to_Windows_31J_E3_8E WORDINDEX2INFO(19148)
+    to_Windows_31J_E3_8E_offsets,
+    to_Windows_31J_E3_8E_infos,
+
+#define to_Windows_31J_E3_8F_infos WORDINDEX2INFO(19150)
+           INVALID,         UNDEF, o2(0x87,0x74), o2(0x87,0x83),
+
+#define to_Windows_31J_E3_8F WORDINDEX2INFO(19154)
+    to_Windows_31J_E3_8F_offsets,
+    to_Windows_31J_E3_8F_infos,
+
+#define to_Windows_31J_E3_infos WORDINDEX2INFO(19156)
+                  INVALID, to_Windows_31J_E3_80,
+       to_Shift_JIS_E3_81,   to_Shift_JIS_E3_82,
+       to_Shift_JIS_E3_83,      to_Shift_JIS_C4,
+     to_Windows_31J_E3_88, to_Windows_31J_E3_8A,
+     to_Windows_31J_E3_8C, to_Windows_31J_E3_8D,
+     to_Windows_31J_E3_8E, to_Windows_31J_E3_8F,
+
+#define to_Windows_31J_E3 WORDINDEX2INFO(19168)
+    to_Windows_31J_E3_offsets,
+    to_Windows_31J_E3_infos,
+
+#define to_Windows_31J_E4_B8_infos WORDINDEX2INFO(19170)
+           INVALID, o2(0x88,0xea), o2(0x92,0x9a),         UNDEF,
+     o2(0x8e,0xb5), o2(0x96,0x9c), o2(0x8f,0xe4), o2(0x8e,0x4f),
+     o2(0x8f,0xe3), o2(0x89,0xba), o2(0x95,0x73), o2(0x97,0x5e),
+     o2(0x98,0xa0), o2(0x89,0x4e), o2(0x8a,0x8e), o2(0x98,0xa1),
+     o2(0x90,0xa2), o2(0x99,0xc0), o2(0x8b,0x75), o2(0x95,0xb8),
+     o2(0x8f,0xe5), o2(0x97,0xbc), o2(0x95,0xc0), o2(0xfa,0x68),
+     o2(0x98,0xa2), o2(0x92,0x86), o2(0x98,0xa3), o2(0x8b,0xf8),
+     o2(0x98,0xa4), o2(0x8a,0xdb), o2(0x92,0x4f), o2(0x8e,0xe5),
+     o2(0x98,0xa5), o2(0x98,0xa6),
+
+#define to_Windows_31J_E4_B8 WORDINDEX2INFO(19204)
+    to_Windows_31J_E4_B8_offsets,
+    to_Windows_31J_E4_B8_infos,
+
+#define to_Windows_31J_E4_BB_infos WORDINDEX2INFO(19206)
+           INVALID, o2(0x8f,0x59), o2(0x90,0x6d), o2(0x98,0xbc),
+             UNDEF, o2(0x98,0xba), o2(0x98,0xbb), o2(0x8b,0x77),
+     o2(0x8d,0xa1), o2(0x89,0xee), o2(0x98,0xb9), o2(0x98,0xb8),
+     o2(0x95,0xa7), o2(0x8e,0x65), o2(0x8e,0x64), o2(0x91,0xbc),
+     o2(0x98,0xbd), o2(0x95,0x74), o2(0x90,0xe5), o2(0x81,0x57),
+     o2(0x98,0xbe), o2(0x98,0xc0), o2(0xfa,0x69), o2(0x91,0xe3),
+     o2(0x97,0xdf), o2(0x88,0xc8), o2(0x98,0xbf), o2(0x89,0xbc),
+     o2(0x8b,0xc2), o2(0x92,0x87), o2(0x8c,0x8f), o2(0x98,0xc1),
+     o2(0x94,0x43), o2(0xfa,0x6a),
+
+#define to_Windows_31J_E4_BB WORDINDEX2INFO(19240)
+    to_Windows_31J_E4_BB_offsets,
+    to_Windows_31J_E4_BB_infos,
+
+#define to_Windows_31J_E4_BC_infos WORDINDEX2INFO(19242)
+           INVALID, o2(0xfa,0x6b), o2(0x8a,0xe9),         UNDEF,
+     o2(0xfa,0x6c), o2(0x98,0xc2), o2(0x88,0xc9), o2(0x8c,0xde),
+     o2(0x8a,0xea), o2(0x95,0x9a), o2(0x94,0xb0), o2(0x8b,0x78),
+     o2(0x89,0xef), o2(0x98,0xe5), o2(0x93,0x60), o2(0x94,0x8c),
+     o2(0x98,0xc4), o2(0x94,0xba), o2(0x97,0xe0), o2(0x90,0x4c),
+     o2(0xfa,0x6d), o2(0x8e,0x66), o2(0x8e,0x97), o2(0x89,0xbe),
+
+#define to_Windows_31J_E4_BC WORDINDEX2INFO(19266)
+    to_Windows_31J_E4_BC_offsets,
+    to_Windows_31J_E4_BC_infos,
+
+#define to_Windows_31J_E4_BD_infos WORDINDEX2INFO(19268)
+           INVALID,         UNDEF, o2(0x92,0xcf), o2(0x92,0x41),
+     o2(0x98,0xc8), o2(0x88,0xca), o2(0x92,0xe1), o2(0x8f,0x5a),
+     o2(0x8d,0xb2), o2(0x97,0x43), o2(0x91,0xcc), o2(0x89,0xbd),
+     o2(0xfa,0x6e), o2(0x98,0xc7), o2(0x97,0x5d), o2(0x98,0xc3),
+     o2(0x98,0xc5), o2(0x8d,0xec), o2(0x98,0xc6), o2(0x9b,0x43),
+     o2(0x98,0xce), o2(0x98,0xd1), o2(0x98,0xcf), o2(0x89,0xc0),
+     o2(0x95,0xb9), o2(0x98,0xc9), o2(0x98,0xcd), o2(0x8c,0xf1),
+     o2(0x8e,0x67),
+
+#define to_Windows_31J_E4_BD WORDINDEX2INFO(19297)
+    to_Windows_31J_E4_BD_offsets,
+    to_Windows_31J_E4_BD_infos,
+
+#define to_Windows_31J_E4_BE_infos WORDINDEX2INFO(19299)
+           INVALID,         UNDEF, o2(0x8a,0xa4), o2(0x98,0xd2),
+     o2(0x98,0xca), o2(0xfa,0x70), o2(0x97,0xe1), o2(0x8e,0x98),
+     o2(0x98,0xcb), o2(0x98,0xd0), o2(0xfa,0x6f), o2(0xfa,0x72),
+     o2(0x98,0xd3), o2(0x98,0xcc), o2(0xfa,0x71), o2(0x8b,0x9f),
+     o2(0x88,0xcb), o2(0x8b,0xa0), o2(0x89,0xbf), o2(0x9b,0x44),
+     o2(0x96,0x99), o2(0x95,0x8e), o2(0x8c,0xf2), o2(0x90,0x4e),
+     o2(0x97,0xb5), o2(0x95,0xd6),
+
+#define to_Windows_31J_E4_BE WORDINDEX2INFO(19325)
+    to_Windows_31J_E4_BE_offsets,
+    to_Windows_31J_E4_BE_infos,
+
+#define to_Windows_31J_E4_BF_infos WORDINDEX2INFO(19327)
+           INVALID,         UNDEF, o2(0x8c,0x57), o2(0x91,0xa3),
+     o2(0x89,0xe2), o2(0xfa,0x61), o2(0x8f,0x72), o2(0xfa,0x73),
+     o2(0x98,0xd7), o2(0x98,0xdc), o2(0x98,0xda), o2(0x98,0xd5),
+     o2(0x91,0xad), o2(0x98,0xd8), o2(0x98,0xdb), o2(0x98,0xd9),
+     o2(0x95,0xdb), o2(0x98,0xd6), o2(0x90,0x4d), o2(0x96,0x93),
+     o2(0x98,0xdd), o2(0x98,0xde), o2(0x8f,0x43), o2(0x98,0xeb),
+     o2(0x94,0x6f), o2(0x95,0x55), o2(0x98,0xe6), o2(0x95,0xee),
+     o2(0x89,0xb4), o2(0x98,0xea), o2(0xfa,0x76),
+
+#define to_Windows_31J_E4_BF WORDINDEX2INFO(19358)
+    to_Windows_31J_E4_BF_offsets,
+    to_Windows_31J_E4_BF_infos,
+
+#define to_Windows_31J_E4_infos WORDINDEX2INFO(19360)
+                  INVALID,      to_Shift_JIS_C4,
+     to_Windows_31J_E4_B8,   to_Shift_JIS_E4_B9,
+       to_Shift_JIS_E4_BA, to_Windows_31J_E4_BB,
+     to_Windows_31J_E4_BC, to_Windows_31J_E4_BD,
+     to_Windows_31J_E4_BE, to_Windows_31J_E4_BF,
+
+#define to_Windows_31J_E4 WORDINDEX2INFO(19370)
+    to_Shift_JIS_E4_offsets,
+    to_Windows_31J_E4_infos,
+
+#define to_Windows_31J_E5_80_infos WORDINDEX2INFO(19372)
+           INVALID,         UNDEF, o2(0x98,0xe4), o2(0x98,0xed),
+     o2(0x91,0x71), o2(0x8c,0xc2), o2(0x94,0x7b), o2(0xe0,0xc5),
+     o2(0x98,0xec), o2(0x93,0x7c), o2(0x98,0xe1), o2(0x8c,0xf4),
+     o2(0x8c,0xf3), o2(0x98,0xdf), o2(0xfa,0x77), o2(0x8e,0xd8),
+     o2(0x98,0xe7), o2(0xfa,0x75), o2(0x95,0xed), o2(0x92,0x6c),
+     o2(0x98,0xe3), o2(0x8c,0x91), o2(0x98,0xe0), o2(0x98,0xe8),
+     o2(0x98,0xe2), o2(0x97,0xcf), o2(0x98,0xe9), o2(0x98,0x60),
+     o2(0x8b,0xe4), o2(0x8c,0x90),
+
+#define to_Windows_31J_E5_80 WORDINDEX2INFO(19402)
+    to_Windows_31J_E5_80_offsets,
+    to_Windows_31J_E5_80_infos,
+
+#define to_Windows_31J_E5_81_infos WORDINDEX2INFO(19404)
+           INVALID, o2(0xfa,0x74),         UNDEF, o2(0xfa,0x7a),
+     o2(0x98,0xee), o2(0xfa,0x78), o2(0x98,0xef), o2(0x98,0xf3),
+     o2(0x88,0xcc), o2(0x95,0xce), o2(0x98,0xf2), o2(0x98,0xf1),
+     o2(0x98,0xf5), o2(0x98,0xf4), o2(0x92,0xe2), o2(0x8c,0x92),
+     o2(0x98,0xf6), o2(0xfa,0x79), o2(0x8e,0xc3), o2(0x91,0xa4),
+     o2(0x92,0xe3), o2(0x8b,0xf4), o2(0x98,0xf7), o2(0x8b,0x55),
+
+#define to_Windows_31J_E5_81 WORDINDEX2INFO(19428)
+    to_Windows_31J_E5_81_offsets,
+    to_Windows_31J_E5_81_infos,
+
+#define to_Windows_31J_E5_82_infos WORDINDEX2INFO(19430)
+           INVALID, o2(0x98,0xf8),         UNDEF, o2(0x98,0xfa),
+     o2(0x96,0x54), o2(0x8c,0x86), o2(0xfa,0x7b), o2(0x8e,0x50),
+     o2(0x94,0xf5), o2(0x98,0xf9), o2(0x8d,0xc3), o2(0x97,0x62),
+     o2(0x98,0xfc), o2(0x99,0x42), o2(0x98,0xfb), o2(0x8d,0xc2),
+     o2(0x8f,0x9d), o2(0x8c,0x58),
+
+#define to_Windows_31J_E5_82 WORDINDEX2INFO(19448)
+    to_Windows_31J_E5_82_offsets,
+    to_Windows_31J_E5_82_infos,
+
+#define to_Windows_31J_E5_83_infos WORDINDEX2INFO(19450)
+           INVALID,         UNDEF, o2(0x99,0x43), o2(0x8b,0xcd),
+     o2(0x99,0x40), o2(0x99,0x41), o2(0x93,0xad), o2(0x91,0x9c),
+     o2(0x8b,0xa1), o2(0x96,0x6c), o2(0x99,0x44), o2(0xfa,0x7d),
+     o2(0x97,0xbb), o2(0x99,0x45), o2(0x99,0x48), o2(0x99,0x46),
+     o2(0x91,0x6d), o2(0x99,0x47), o2(0x99,0x49), o2(0xfa,0x7c),
+     o2(0x99,0x4b), o2(0x99,0x4a), o2(0x95,0xc6),
+
+#define to_Windows_31J_E5_83 WORDINDEX2INFO(19473)
+    to_Windows_31J_E5_83_offsets,
+    to_Windows_31J_E5_83_infos,
+
+#define to_Windows_31J_E5_85_infos WORDINDEX2INFO(19475)
+           INVALID, o2(0x99,0x59), o2(0x88,0xf2),         UNDEF,
+     o2(0x8c,0xb3), o2(0x8c,0x5a), o2(0x8f,0x5b), o2(0x92,0x9b),
+     o2(0x8b,0xa2), o2(0x90,0xe6), o2(0x8c,0xf5), o2(0xfa,0x7e),
+     o2(0x8d,0x8e), o2(0x99,0x5b), o2(0x96,0xc6), o2(0x93,0x65),
+     o2(0x8e,0x99), o2(0x99,0x5a), o2(0x99,0x5c), o2(0x93,0x7d),
+     o2(0x8a,0x95), o2(0x99,0x5d), o2(0xfa,0x80), o2(0x93,0xfc),
+     o2(0x91,0x53), o2(0x99,0x5f), o2(0x99,0x60), o2(0x94,0xaa),
+     o2(0x8c,0xf6), o2(0x98,0x5a), o2(0x99,0x61), o2(0x8b,0xa4),
+     o2(0x95,0xba), o2(0x91,0xb4), o2(0x8b,0xef), o2(0x93,0x54),
+     o2(0x8c,0x93),
+
+#define to_Windows_31J_E5_85 WORDINDEX2INFO(19512)
+    to_Windows_31J_E5_85_offsets,
+    to_Windows_31J_E5_85_infos,
+
+#define to_Windows_31J_E5_86_infos WORDINDEX2INFO(19514)
+           INVALID, o2(0x99,0x62),         UNDEF, o2(0x99,0x63),
+     o2(0x93,0xe0), o2(0x89,0x7e), o2(0x99,0x66), o2(0x8d,0xfb),
+     o2(0x99,0x65), o2(0x8d,0xc4), o2(0x99,0x67), o2(0xe3,0xec),
+     o2(0x99,0x68), o2(0x96,0x60), o2(0x99,0x69), o2(0x99,0x6a),
+     o2(0x99,0x6b), o2(0x8f,0xe7), o2(0x8e,0xca), o2(0xfa,0x81),
+     o2(0x8a,0xa5), o2(0x99,0x6e), o2(0x99,0x6c), o2(0x96,0xbb),
+     o2(0x99,0x6d), o2(0x95,0x79), o2(0x99,0x6f), o2(0x99,0x70),
+     o2(0x99,0x71), o2(0x93,0x7e), o2(0x99,0x75), o2(0x99,0x73),
+     o2(0x99,0x74), o2(0x99,0x72), o2(0x8d,0xe1), o2(0x99,0x76),
+     o2(0x96,0xe8), o2(0x97,0xe2), o2(0x99,0x77), o2(0xfa,0x82),
+
+#define to_Windows_31J_E5_86 WORDINDEX2INFO(19554)
+    to_Windows_31J_E5_86_offsets,
+    to_Windows_31J_E5_86_infos,
+
+#define to_Windows_31J_E5_87_infos WORDINDEX2INFO(19556)
+           INVALID,         UNDEF, o2(0x90,0xa6), o2(0x99,0x78),
+     o2(0x8f,0x79), o2(0x99,0x79), o2(0x92,0x9c), o2(0x97,0xbd),
+     o2(0x93,0x80), o2(0x99,0xc3), o2(0x99,0x7a), o2(0xea,0xa3),
+     o2(0x8b,0xc3), o2(0x99,0x7b), o2(0x96,0x7d), o2(0x8f,0x88),
+     o2(0x91,0xfa), o2(0x99,0x7d), o2(0x93,0xe2), o2(0xfa,0x83),
+     o2(0x99,0x7e), o2(0x99,0x80), o2(0x8a,0x4d), o2(0x99,0x81),
+     o2(0x8b,0xa5), o2(0x93,0xca), o2(0x89,0x9a), o2(0x8f,0x6f),
+     o2(0x94,0x9f), o2(0x99,0x82),
+
+#define to_Windows_31J_E5_87 WORDINDEX2INFO(19586)
+    to_Windows_31J_E5_87_offsets,
+    to_Windows_31J_E5_87_infos,
+
+#define to_Windows_31J_E5_88_infos WORDINDEX2INFO(19588)
+           INVALID, o2(0x93,0x81),         UNDEF, o2(0x90,0x6e),
+     o2(0x99,0x83), o2(0x95,0xaa), o2(0x90,0xd8), o2(0x8a,0xa0),
+     o2(0x8a,0xa7), o2(0x99,0x84), o2(0x99,0x86), o2(0x8c,0x59),
+     o2(0x99,0x85), o2(0xfa,0x84), o2(0x97,0xf1), o2(0x8f,0x89),
+     o2(0x94,0xbb), o2(0x95,0xca), o2(0x99,0x87), o2(0x97,0x98),
+     o2(0x99,0x88), o2(0x99,0x89), o2(0x93,0x9e), o2(0x99,0x8a),
+     o2(0x90,0xa7), o2(0x8d,0xfc), o2(0x8c,0x94), o2(0x99,0x8b),
+     o2(0x8e,0x68), o2(0x8d,0x8f),
+
+#define to_Windows_31J_E5_88 WORDINDEX2INFO(19618)
+    to_Windows_31J_E5_88_offsets,
+    to_Windows_31J_E5_88_infos,
+
+#define to_Windows_31J_E5_8A_infos WORDINDEX2INFO(19620)
+           INVALID,         UNDEF, o2(0x8a,0x63), o2(0x8c,0x80),
+     o2(0x99,0x9c), o2(0x97,0xab), o2(0x99,0x98), o2(0x99,0x9d),
+     o2(0x99,0x9a), o2(0x99,0x99), o2(0x97,0xcd), o2(0xfa,0x85),
+     o2(0x8c,0xf7), o2(0x89,0xc1), o2(0x97,0xf2), o2(0xfa,0x86),
+     o2(0x8f,0x95), o2(0x93,0x77), o2(0x8d,0x85), o2(0x99,0xa0),
+     o2(0x99,0xa1), o2(0xfb,0x77), o2(0x97,0xe3), o2(0x98,0x4a),
+     o2(0x99,0xa3), o2(0x8c,0xf8), o2(0x99,0xa2), o2(0x8a,0x4e),
+
+#define to_Windows_31J_E5_8A WORDINDEX2INFO(19648)
+    to_Windows_31J_E5_8A_offsets,
+    to_Windows_31J_E5_8A_infos,
+
+#define to_Windows_31J_E5_8B_infos WORDINDEX2INFO(19650)
+           INVALID, o2(0xfa,0x87), o2(0x99,0xa4),         UNDEF,
+     o2(0x96,0x75), o2(0x92,0xba), o2(0x97,0x45), o2(0x95,0xd7),
+     o2(0x99,0xa5), o2(0xe8,0xd3), o2(0x93,0xae), o2(0x99,0xa6),
+     o2(0x8a,0xa8), o2(0x96,0xb1), o2(0xfa,0x88), o2(0x8f,0x9f),
+     o2(0x99,0xa7), o2(0x95,0xe5), o2(0x99,0xab), o2(0x90,0xa8),
+     o2(0x99,0xa8), o2(0x8b,0xce), o2(0x99,0xa9), o2(0x8a,0xa9),
+     o2(0x8c,0x4d), o2(0x99,0xac), o2(0x99,0xad), o2(0x99,0xae),
+     o2(0x99,0xaf), o2(0x8e,0xd9), o2(0x8c,0xf9), o2(0x96,0xdc),
+
+#define to_Windows_31J_E5_8B WORDINDEX2INFO(19682)
+    to_Windows_31J_E5_8B_offsets,
+    to_Windows_31J_E5_8B_infos,
+
+#define to_Windows_31J_E5_8C_infos WORDINDEX2INFO(19684)
+           INVALID, o2(0xfa,0x89), o2(0x96,0xe6), o2(0x93,0xf5),
+             UNDEF, o2(0x95,0xef), o2(0x99,0xb0), o2(0xfa,0x8a),
+     o2(0x99,0xb1), o2(0x99,0xb3), o2(0x99,0xb5), o2(0x99,0xb4),
+     o2(0x99,0xb6), o2(0x89,0xbb), o2(0x96,0x6b), o2(0x8d,0xfa),
+     o2(0x99,0xb7), o2(0x91,0x78), o2(0x8f,0xa0), o2(0x8b,0xa7),
+     o2(0x99,0xb8), o2(0xfa,0x8b), o2(0x94,0xd9), o2(0x99,0xb9),
+     o2(0x99,0xba), o2(0x99,0xbb), o2(0x99,0xbc), o2(0x95,0x43),
+     o2(0x8b,0xe6), o2(0x88,0xe3), o2(0x93,0xbd),
+
+#define to_Windows_31J_E5_8C WORDINDEX2INFO(19715)
+    to_Windows_31J_E5_8C_offsets,
+    to_Windows_31J_E5_8C_infos,
+
+#define to_Windows_31J_E5_8D_infos WORDINDEX2INFO(19717)
+           INVALID, o2(0x99,0xbd), o2(0x8f,0x5c),         UNDEF,
+     o2(0x90,0xe7), o2(0x99,0xbf), o2(0x99,0xbe), o2(0x8f,0xa1),
+     o2(0x8c,0xdf), o2(0x99,0xc1), o2(0x94,0xbc), o2(0x99,0xc2),
+     o2(0x94,0xda), o2(0x91,0xb2), o2(0x91,0xec), o2(0x8b,0xa6),
+     o2(0x93,0xec), o2(0x92,0x50), o2(0x94,0x8e), o2(0x96,0x6d),
+     o2(0x99,0xc4), o2(0x90,0xe8), o2(0x8c,0x54), o2(0x99,0xc5),
+     o2(0x99,0xc6), o2(0x89,0x4b), o2(0x88,0xf3), o2(0x8a,0xeb),
+     o2(0xfa,0x8c), o2(0x91,0xa6), o2(0x8b,0x70), o2(0x97,0x91),
+     o2(0x99,0xc9), o2(0x89,0xb5), o2(0x99,0xc8), o2(0x8b,0xa8),
+
+#define to_Windows_31J_E5_8D WORDINDEX2INFO(19753)
+    to_Windows_31J_E5_8D_offsets,
+    to_Windows_31J_E5_8D_infos,
+
+#define to_Windows_31J_E5_8E_infos WORDINDEX2INFO(19755)
+           INVALID,         UNDEF, o2(0x99,0xca), o2(0x96,0xef),
+     o2(0xfa,0x8d), o2(0x99,0xcb), o2(0x97,0xd0), o2(0x8c,0xfa),
+     o2(0x8c,0xb4), o2(0x99,0xcc), o2(0x99,0xce), o2(0x99,0xcd),
+     o2(0x90,0x7e), o2(0x89,0x58), o2(0x89,0x7d), o2(0x99,0xcf),
+     o2(0x99,0xd0), o2(0xfa,0x8e), o2(0x8c,0xb5), o2(0x99,0xd1),
+     o2(0x8b,0x8e),
+
+#define to_Windows_31J_E5_8E WORDINDEX2INFO(19776)
+    to_Windows_31J_E5_8E_offsets,
+    to_Windows_31J_E5_8E_infos,
+
+#define to_Windows_31J_E5_8F_infos WORDINDEX2INFO(19778)
+           INVALID,         UNDEF, o2(0x8e,0x51), o2(0x99,0xd2),
+     o2(0x96,0x94), o2(0x8d,0xb3), o2(0x8b,0x79), o2(0x97,0x46),
+     o2(0x91,0x6f), o2(0x94,0xbd), o2(0x8e,0xfb), o2(0x8f,0x66),
+     o2(0x8e,0xe6), o2(0x8e,0xf3), o2(0x8f,0x96), o2(0x94,0xbe),
+     o2(0xfa,0x8f), o2(0x99,0xd5), o2(0x89,0x62), o2(0x91,0x70),
+     o2(0x8c,0xfb), o2(0x8c,0xc3), o2(0x8b,0xe5), o2(0x99,0xd9),
+     o2(0x92,0x40), o2(0x91,0xfc), o2(0x8b,0xa9), o2(0x8f,0xa2),
+     o2(0x99,0xda), o2(0x99,0xd8), o2(0x89,0xc2), o2(0x91,0xe4),
+     o2(0x8e,0xb6), o2(0x8e,0x6a), o2(0x89,0x45), o2(0x8a,0x90),
+     o2(0x8d,0x86), o2(0x8e,0x69), o2(0x99,0xdb),
+
+#define to_Windows_31J_E5_8F WORDINDEX2INFO(19817)
+    to_Windows_31J_E5_8F_offsets,
+    to_Windows_31J_E5_8F_infos,
+
+#define to_Windows_31J_E5_92_infos WORDINDEX2INFO(19819)
+           INVALID, o2(0x99,0xf0),         UNDEF, o2(0x99,0xf2),
+     o2(0x99,0xf4), o2(0xfa,0x92), o2(0x8d,0xee), o2(0x98,0x61),
+     o2(0x99,0xe9), o2(0x99,0xe7), o2(0x99,0xf3), o2(0x99,0xee),
+     o2(0xfa,0x91), o2(0x99,0xf6), o2(0x9a,0x42), o2(0x99,0xf8),
+     o2(0x99,0xfc), o2(0xfa,0x93), o2(0x9a,0x40), o2(0x99,0xf9),
+     o2(0x9a,0x5d), o2(0x8d,0xe7), o2(0x8a,0x50), o2(0x99,0xf7),
+     o2(0x9a,0x44), o2(0x88,0xf4), o2(0x9a,0x43),
+
+#define to_Windows_31J_E5_92 WORDINDEX2INFO(19846)
+    to_Windows_31J_E5_92_offsets,
+    to_Windows_31J_E5_92_infos,
+
+#define to_Windows_31J_E5_93_infos WORDINDEX2INFO(19848)
+           INVALID, o2(0x88,0xa3), o2(0x95,0x69), o2(0x9a,0x41),
+             UNDEF, o2(0x99,0xfa), o2(0x99,0xf5), o2(0x99,0xfb),
+     o2(0x8d,0xc6), o2(0x9a,0x45), o2(0x88,0xf5), o2(0x9a,0x4e),
+     o2(0x9a,0x46), o2(0x9a,0x47), o2(0x8f,0xa3), o2(0x96,0x89),
+     o2(0x9a,0x4c), o2(0x9a,0x4b), o2(0x93,0x4e), o2(0x9a,0x4d),
+     o2(0x9a,0x4a), o2(0xfa,0x94),
+
+#define to_Windows_31J_E5_93 WORDINDEX2INFO(19870)
+    to_Windows_31J_E5_93_offsets,
+    to_Windows_31J_E5_93_infos,
+
+#define to_Windows_31J_E5_96_infos WORDINDEX2INFO(19872)
+           INVALID, o2(0x9a,0x5c),         UNDEF, o2(0x9a,0x66),
+     o2(0x91,0x50), o2(0xfa,0x95), o2(0x9a,0x68), o2(0x8d,0x41),
+     o2(0x9a,0x5e), o2(0x92,0x9d), o2(0x9a,0x62), o2(0x9a,0x5b),
+     o2(0x8a,0xab), o2(0x8a,0xec), o2(0x8a,0x85), o2(0x9a,0x63),
+     o2(0x9a,0x5f), o2(0x8c,0x96), o2(0x9a,0x69), o2(0x9a,0x67),
+     o2(0x91,0x72), o2(0x8b,0x69), o2(0x8b,0xaa), o2(0x9a,0x64),
+     o2(0x8b,0xf2), o2(0x89,0x63),
+
+#define to_Windows_31J_E5_96 WORDINDEX2INFO(19898)
+    to_Windows_31J_E5_96_offsets,
+    to_Windows_31J_E5_96_infos,
+
+#define to_Windows_31J_E5_9D_infos WORDINDEX2INFO(19900)
+           INVALID, o2(0x9a,0xac),         UNDEF, o2(0x8d,0xe2),
+     o2(0x8b,0xcf), o2(0x96,0x56), o2(0x9a,0xaa), o2(0x9a,0xad),
+     o2(0x8d,0xbf), o2(0x8d,0x42), o2(0xfa,0x96), o2(0x9a,0xb1),
+     o2(0x8d,0xa3), o2(0xfa,0x97), o2(0x92,0x52), o2(0x9a,0xae),
+     o2(0x92,0xd8), o2(0x9a,0xb2),
+
+#define to_Windows_31J_E5_9D WORDINDEX2INFO(19918)
+    to_Windows_31J_E5_9D_offsets,
+    to_Windows_31J_E5_9D_infos,
+
+#define to_Windows_31J_E5_9E_infos WORDINDEX2INFO(19920)
+           INVALID,         UNDEF, o2(0x90,0x82), o2(0x9a,0xb0),
+     o2(0x9a,0xb3), o2(0x8c,0x5e), o2(0x9a,0xb4), o2(0x9a,0xb5),
+     o2(0x8d,0x43), o2(0x8a,0x5f), o2(0x9a,0xb7), o2(0x9a,0xb8),
+     o2(0xfa,0x98), o2(0x9a,0xb9), o2(0x9a,0xb6),
+
+#define to_Windows_31J_E5_9E WORDINDEX2INFO(19935)
+    to_Windows_31J_E5_9E_offsets,
+    to_Windows_31J_E5_9E_infos,
+
+#define to_Windows_31J_E5_9F_infos WORDINDEX2INFO(19937)
+           INVALID, o2(0x9a,0xaf),         UNDEF, o2(0x9a,0xba),
+     o2(0x9a,0xbb), o2(0xfa,0x9a), o2(0xfa,0x99), o2(0x96,0x84),
+     o2(0x8f,0xe9), o2(0x9a,0xbd), o2(0x9a,0xbe), o2(0x9a,0xbc),
+     o2(0x9a,0xc0), o2(0x94,0x57), o2(0x88,0xe6), o2(0x95,0x75),
+     o2(0x9a,0xc1), o2(0x8f,0xfb), o2(0x8e,0xb7), o2(0x94,0x7c),
+     o2(0x8a,0xee), o2(0x8d,0xe9),
+
+#define to_Windows_31J_E5_9F WORDINDEX2INFO(19959)
+    to_Windows_31J_E5_9F_offsets,
+    to_Windows_31J_E5_9F_infos,
+
+#define to_Windows_31J_E5_A2_infos WORDINDEX2INFO(19961)
+           INVALID,         UNDEF, o2(0x8b,0xab), o2(0x9a,0xce),
+     o2(0x95,0xe6), o2(0x91,0x9d), o2(0x92,0xc4), o2(0xfa,0x9d),
+     o2(0x9a,0xd0), o2(0x96,0x6e), o2(0x9a,0xd1), o2(0x9a,0xd6),
+     o2(0xfa,0x9e), o2(0x95,0xad), o2(0x9a,0xd5), o2(0x9a,0xcf),
+     o2(0x9a,0xd2), o2(0x9a,0xd4), o2(0x8d,0xa4),
+
+#define to_Windows_31J_E5_A2 WORDINDEX2INFO(19980)
+    to_Windows_31J_E5_A2_offsets,
+    to_Windows_31J_E5_A2_infos,
+
+#define to_Windows_31J_E5_A4_infos WORDINDEX2INFO(19982)
+           INVALID,         UNDEF, o2(0x9a,0xe7), o2(0x95,0xcf),
+     o2(0x9a,0xe8), o2(0xfa,0x9f), o2(0x89,0xc4), o2(0x9a,0xe9),
+     o2(0x97,0x5b), o2(0x8a,0x4f), o2(0x99,0xc7), o2(0x8f,0x67),
+     o2(0x91,0xbd), o2(0x9a,0xea), o2(0x96,0xe9), o2(0x96,0xb2),
+     o2(0x9a,0xec), o2(0x91,0xe5), o2(0x93,0x56), o2(0x91,0xbe),
+     o2(0x95,0x76), o2(0x9a,0xed), o2(0x9a,0xee), o2(0x89,0x9b),
+     o2(0x8e,0xb8), o2(0x9a,0xef), o2(0x88,0xce), o2(0x9a,0xf0),
+     o2(0x9a,0xf1),
+
+#define to_Windows_31J_E5_A4 WORDINDEX2INFO(20011)
+    to_Windows_31J_E5_A4_offsets,
+    to_Windows_31J_E5_A4_infos,
+
+#define to_Windows_31J_E5_A5_infos WORDINDEX2INFO(20013)
+           INVALID,         UNDEF, o2(0x89,0x82), o2(0x8a,0xef),
+     o2(0x93,0xde), o2(0x95,0xf2), o2(0x9a,0xf5), o2(0x91,0x74),
+     o2(0x9a,0xf4), o2(0x8c,0x5f), o2(0xfa,0xa0), o2(0x96,0x7a),
+     o2(0x9a,0xf3), o2(0x93,0x85), o2(0x9a,0xf7), o2(0x9a,0xf6),
+     o2(0xfa,0xa1), o2(0xfa,0xa2), o2(0x9a,0xf9), o2(0x9a,0xf8),
+     o2(0xfa,0xa3), o2(0x89,0x9c), o2(0x9a,0xfa), o2(0x8f,0xa7),
+     o2(0x9a,0xfc), o2(0x92,0x44), o2(0x9a,0xfb), o2(0x95,0xb1),
+     o2(0x8f,0x97), o2(0x93,0x7a), o2(0x9b,0x40), o2(0x8d,0x44),
+
+#define to_Windows_31J_E5_A5 WORDINDEX2INFO(20045)
+    to_Windows_31J_E5_A5_offsets,
+    to_Windows_31J_E5_A5_infos,
+
+#define to_Windows_31J_E5_A6_infos WORDINDEX2INFO(20047)
+           INVALID,         UNDEF, o2(0x9b,0x41), o2(0x94,0x40),
+     o2(0x94,0xdc), o2(0x96,0xcf), o2(0x94,0x44), o2(0x9b,0x4a),
+     o2(0x8b,0x57), o2(0x97,0x64), o2(0x96,0xad), o2(0x9b,0xaa),
+     o2(0x9b,0x42), o2(0x9b,0x45), o2(0xfa,0xa4), o2(0x91,0xc3),
+     o2(0x96,0x57), o2(0x93,0x69), o2(0x9b,0x46), o2(0x96,0x85),
+     o2(0xfa,0xa5), o2(0x8d,0xc8), o2(0x8f,0xa8),
+
+#define to_Windows_31J_E5_A6 WORDINDEX2INFO(20070)
+    to_Windows_31J_E5_A6_offsets,
+    to_Windows_31J_E5_A6_infos,
+
+#define to_Windows_31J_E5_AD_infos WORDINDEX2INFO(20072)
+           INVALID, o2(0x9b,0x71),         UNDEF, o2(0x9b,0x6f),
+     o2(0x9b,0x70), o2(0x8e,0x71), o2(0x9b,0x72), o2(0x8d,0x45),
+     o2(0x9b,0x73), o2(0xfa,0xa6), o2(0x8e,0x9a), o2(0x91,0xb6),
+     o2(0x9b,0x74), o2(0x9b,0x75), o2(0x8e,0x79), o2(0x8d,0x46),
+     o2(0x96,0xd0), o2(0x8b,0x47), o2(0x8c,0xc7), o2(0x9b,0x76),
+     o2(0x8a,0x77), o2(0x9b,0x77), o2(0x91,0xb7), o2(0x9b,0x78),
+     o2(0x9b,0xa1), o2(0x9b,0x79), o2(0x9b,0x7a), o2(0x9b,0x7b),
+     o2(0x9b,0x7d),
+
+#define to_Windows_31J_E5_AD WORDINDEX2INFO(20101)
+    to_Windows_31J_E5_AD_offsets,
+    to_Windows_31J_E5_AD_infos,
+
+#define to_Windows_31J_E5_AF_infos WORDINDEX2INFO(20103)
+           INVALID, o2(0xfa,0xa7),         UNDEF, o2(0x8e,0xe2),
+     o2(0x9b,0x83), o2(0x8a,0xf1), o2(0x93,0xd0), o2(0x96,0xa7),
+     o2(0x9b,0x84), o2(0x9b,0x85), o2(0x95,0x78), o2(0x9b,0x87),
+     o2(0x8a,0xa6), o2(0x8b,0xf5), o2(0x9b,0x86), o2(0xfa,0xa9),
+     o2(0x8a,0xb0), o2(0x90,0x51), o2(0x9b,0x8b), o2(0x8e,0x40),
+     o2(0x89,0xc7), o2(0x9b,0x8a), o2(0x9b,0x88), o2(0x9b,0x8c),
+     o2(0x9b,0x89), o2(0x94,0x4a), o2(0x9e,0xcb), o2(0x90,0x52),
+     o2(0x9b,0x8d), o2(0xfa,0xaa), o2(0x97,0xbe), o2(0x9b,0x8e),
+     o2(0x9b,0x90), o2(0x92,0x9e), o2(0x9b,0x8f), o2(0x90,0xa1),
+     o2(0x8e,0x9b), o2(0x91,0xce), o2(0x8e,0xf5),
+
+#define to_Windows_31J_E5_AF WORDINDEX2INFO(20142)
+    to_Windows_31J_E5_AF_offsets,
+    to_Windows_31J_E5_AF_infos,
+
+#define to_Windows_31J_E5_B0_infos WORDINDEX2INFO(20144)
+           INVALID,         UNDEF, o2(0x95,0x95), o2(0x90,0xea),
+     o2(0x8e,0xcb), o2(0x9b,0x91), o2(0x8f,0xab), o2(0x9b,0x92),
+     o2(0x9b,0x93), o2(0x88,0xd1), o2(0x91,0xb8), o2(0x90,0x71),
+     o2(0x9b,0x94), o2(0x93,0xb1), o2(0x8f,0xac), o2(0x8f,0xad),
+     o2(0x9b,0x95), o2(0x90,0xeb), o2(0x8f,0xae), o2(0xfa,0xab),
+     o2(0x9b,0x96), o2(0x9b,0x97), o2(0x96,0xde), o2(0x9b,0x98),
+     o2(0x8b,0xc4), o2(0x8f,0x41), o2(0x9b,0x99), o2(0x9b,0x9a),
+     o2(0x8e,0xda), o2(0x90,0x4b), o2(0x93,0xf2), o2(0x90,0x73),
+     o2(0x94,0xf6), o2(0x94,0x41),
+
+#define to_Windows_31J_E5_B0 WORDINDEX2INFO(20178)
+    to_Windows_31J_E5_B0_offsets,
+    to_Windows_31J_E5_B0_infos,
+
+#define to_Windows_31J_E5_B2_infos WORDINDEX2INFO(20180)
+           INVALID,         UNDEF, o2(0x9b,0xa7), o2(0x8a,0xf2),
+     o2(0x9b,0xa8), o2(0x9b,0xa9), o2(0x89,0xaa), o2(0xfa,0xac),
+     o2(0x91,0x5a), o2(0x8a,0xe2), o2(0x9b,0xab), o2(0x96,0xa6),
+     o2(0x91,0xd0), o2(0x8a,0x78), o2(0x9b,0xad), o2(0x9b,0xaf),
+     o2(0x8a,0xdd), o2(0xfa,0xad), o2(0x9b,0xac), o2(0x9b,0xae),
+     o2(0x9b,0xb1),
+
+#define to_Windows_31J_E5_B2 WORDINDEX2INFO(20201)
+    to_Windows_31J_E5_B2_offsets,
+    to_Windows_31J_E5_B2_infos,
+
+#define to_Windows_31J_E5_B3_infos WORDINDEX2INFO(20203)
+           INVALID,         UNDEF, o2(0x9b,0xb0), o2(0x9b,0xb2),
+     o2(0x9b,0xb3), o2(0x93,0xbb), o2(0x8b,0xac), o2(0x89,0xe3),
+     o2(0x9b,0xb4), o2(0x9b,0xb9), o2(0x9b,0xb7), o2(0x95,0xf5),
+     o2(0x95,0xf4), o2(0xfa,0xae), o2(0x93,0x87), o2(0x9b,0xb6),
+     o2(0x8f,0x73), o2(0x9b,0xb5),
+
+#define to_Windows_31J_E5_B3 WORDINDEX2INFO(20221)
+    to_Windows_31J_E5_B3_offsets,
+    to_Windows_31J_E5_B3_infos,
+
+#define to_Windows_31J_E5_B4_infos WORDINDEX2INFO(20223)
+           INVALID,         UNDEF, o2(0x90,0x92), o2(0x9b,0xba),
+     o2(0x8d,0xe8), o2(0x9b,0xc0), o2(0x9b,0xc1), o2(0x9b,0xbb),
+     o2(0x8a,0x52), o2(0x9b,0xbc), o2(0x9b,0xc5), o2(0x9b,0xc4),
+     o2(0x9b,0xc3), o2(0x9b,0xbf), o2(0x9b,0xbe), o2(0x9b,0xc2),
+     o2(0xfa,0xaf), o2(0x95,0xf6),
+
+#define to_Windows_31J_E5_B4 WORDINDEX2INFO(20241)
+    to_Windows_31J_E5_B4_offsets,
+    to_Windows_31J_E5_B4_infos,
+
+#define to_Windows_31J_E5_B5_infos WORDINDEX2INFO(20243)
+           INVALID,         UNDEF, o2(0xfa,0xb2), o2(0x9b,0xc9),
+     o2(0x9b,0xc6), o2(0x9b,0xc8), o2(0x97,0x92), o2(0x9b,0xc7),
+     o2(0xfa,0xb0), o2(0x9b,0xbd), o2(0x90,0x93), o2(0x9b,0xca),
+     o2(0xfa,0xb3), o2(0x8d,0xb5), o2(0x9b,0xcb), o2(0x9b,0xcc),
+
+#define to_Windows_31J_E5_B5 WORDINDEX2INFO(20259)
+    to_Windows_31J_E5_B5_offsets,
+    to_Windows_31J_E5_B5_infos,
+
+#define to_Windows_31J_E5_B6_infos WORDINDEX2INFO(20261)
+           INVALID,         UNDEF, o2(0x9b,0xcf), o2(0x9b,0xce),
+     o2(0x9b,0xcd), o2(0x93,0x88), o2(0x9b,0xb8), o2(0x9b,0xd5),
+     o2(0x9b,0xd1), o2(0x9b,0xd0), o2(0x9b,0xd2), o2(0x9b,0xd3),
+     o2(0x9b,0xd6), o2(0xfa,0xb4), o2(0xfa,0xb5), o2(0x97,0xe4),
+     o2(0x9b,0xd7), o2(0x9b,0xd4),
+
+#define to_Windows_31J_E5_B6 WORDINDEX2INFO(20279)
+    to_Windows_31J_E5_B6_offsets,
+    to_Windows_31J_E5_B6_infos,
+
+#define to_Windows_31J_E5_B7_infos WORDINDEX2INFO(20281)
+           INVALID,         UNDEF, o2(0x9b,0xd8), o2(0x8a,0xde),
+     o2(0x9b,0xd9), o2(0xfa,0xb6), o2(0x9b,0xdb), o2(0x9b,0xda),
+     o2(0x9b,0xdc), o2(0x9b,0xdd), o2(0x90,0xec), o2(0x8f,0x42),
+     o2(0x8f,0x84), o2(0x91,0x83), o2(0x8d,0x48), o2(0x8d,0xb6),
+     o2(0x8d,0x49), o2(0x8b,0x90), o2(0x9b,0xde), o2(0x8d,0xb7),
+     o2(0x8c,0xc8), o2(0x9b,0xdf), o2(0x96,0xa4), o2(0x94,0x62),
+     o2(0x9b,0xe0), o2(0x8d,0x4a), o2(0x8a,0xaa), o2(0x92,0x46),
+     o2(0x8b,0xd0),
+
+#define to_Windows_31J_E5_B7 WORDINDEX2INFO(20310)
+    to_Windows_31J_E5_B7_offsets,
+    to_Windows_31J_E5_B7_infos,
+
+#define to_Windows_31J_E5_BC_infos WORDINDEX2INFO(20312)
+           INVALID,         UNDEF, o2(0x95,0xd9), o2(0x9c,0x50),
+     o2(0x98,0x4d), o2(0x9c,0x51), o2(0x95,0xbe), o2(0x9c,0x54),
+     o2(0x98,0x9f), o2(0x98,0xaf), o2(0x8e,0xae), o2(0x93,0xf3),
+     o2(0x9c,0x55), o2(0x8b,0x7c), o2(0x92,0xa2), o2(0x88,0xf8),
+     o2(0x9c,0x56), o2(0x95,0xa4), o2(0x8d,0x4f), o2(0x92,0x6f),
+     o2(0x92,0xed), o2(0xfa,0xb7), o2(0x96,0xed), o2(0x8c,0xb7),
+     o2(0x8c,0xca), o2(0x9c,0x57), o2(0x9c,0x58), o2(0x9c,0x5e),
+     o2(0x8e,0xe3), o2(0xfa,0xb8), o2(0x92,0xa3), o2(0x8b,0xad),
+     o2(0x9c,0x59), o2(0x95,0x4a), o2(0x92,0x65),
+
+#define to_Windows_31J_E5_BC WORDINDEX2INFO(20347)
+    to_Windows_31J_E5_BC_offsets,
+    to_Windows_31J_E5_BC_infos,
+
+#define to_Windows_31J_E5_BD_infos WORDINDEX2INFO(20349)
+           INVALID,         UNDEF, o2(0x9c,0x5a), o2(0xfa,0x67),
+     o2(0x9c,0x5b), o2(0x8b,0xae), o2(0x9c,0x5c), o2(0x9c,0x5d),
+     o2(0x9c,0x5f), o2(0x93,0x96), o2(0x9c,0x60), o2(0x9c,0x61),
+     o2(0x9c,0x62), o2(0x9c,0x53), o2(0x9c,0x52), o2(0x9c,0x63),
+     o2(0x8c,0x60), o2(0x95,0x46), o2(0xfa,0xb9), o2(0x8d,0xca),
+     o2(0x95,0x56), o2(0x92,0xa4), o2(0x95,0x6a), o2(0x9c,0x64),
+     o2(0x8f,0xb2), o2(0x89,0x65), o2(0x9c,0x65), o2(0x9c,0x66),
+     o2(0x96,0xf0), o2(0x94,0xde), o2(0x9c,0x69),
+
+#define to_Windows_31J_E5_BD WORDINDEX2INFO(20380)
+    to_Windows_31J_E5_BD_offsets,
+    to_Windows_31J_E5_BD_infos,
+
+#define to_Windows_31J_E5_BE_infos WORDINDEX2INFO(20382)
+           INVALID, o2(0x89,0x9d), o2(0x90,0xaa), o2(0x9c,0x68),
+     o2(0x9c,0x67), o2(0x8c,0x61), o2(0x91,0xd2),         UNDEF,
+     o2(0x9c,0x6d), o2(0x9c,0x6b), o2(0x9c,0x6a), o2(0x97,0xa5),
+     o2(0x8c,0xe3), o2(0x8f,0x99), o2(0x9c,0x6c), o2(0x93,0x6b),
+     o2(0x8f,0x5d), o2(0x93,0xbe), o2(0x9c,0x70), o2(0x9c,0x6f),
+     o2(0x9c,0x6e), o2(0x9c,0x71), o2(0x8c,0xe4), o2(0x9c,0x72),
+     o2(0x95,0x9c), o2(0x8f,0x7a), o2(0x9c,0x73), o2(0x94,0xf7),
+     o2(0x93,0xbf), o2(0x92,0xa5), o2(0xfa,0xba), o2(0x93,0x4f),
+     o2(0x9c,0x74), o2(0x8b,0x4a),
+
+#define to_Windows_31J_E5_BE WORDINDEX2INFO(20416)
+    to_Windows_31J_E5_BE_offsets,
+    to_Windows_31J_E5_BE_infos,
+
+#define to_Windows_31J_E5_BF_infos WORDINDEX2INFO(20418)
+           INVALID,         UNDEF, o2(0x90,0x53), o2(0x95,0x4b),
+     o2(0x8a,0xf5), o2(0x94,0x45), o2(0x9c,0x75), o2(0x8e,0x75),
+     o2(0x96,0x59), o2(0x96,0x5a), o2(0x89,0x9e), o2(0x9c,0x7a),
+     o2(0xfa,0xbb), o2(0x92,0x89), o2(0x9c,0x77), o2(0x89,0xf5),
+     o2(0x9c,0xab), o2(0x9c,0x79), o2(0x94,0x4f), o2(0x9c,0x78),
+     o2(0x9c,0x76), o2(0x8d,0x9a), o2(0x9c,0x7c),
+
+#define to_Windows_31J_E5_BF WORDINDEX2INFO(20441)
+    to_Windows_31J_E5_BF_offsets,
+    to_Windows_31J_E5_BF_infos,
+
+#define to_Windows_31J_E5_infos WORDINDEX2INFO(20443)
+                  INVALID, to_Windows_31J_E5_80,
+     to_Windows_31J_E5_81, to_Windows_31J_E5_82,
+     to_Windows_31J_E5_83,   to_Shift_JIS_E5_84,
+     to_Windows_31J_E5_85, to_Windows_31J_E5_86,
+     to_Windows_31J_E5_87, to_Windows_31J_E5_88,
+       to_Shift_JIS_E5_89, to_Windows_31J_E5_8A,
+     to_Windows_31J_E5_8B, to_Windows_31J_E5_8C,
+     to_Windows_31J_E5_8D, to_Windows_31J_E5_8E,
+     to_Windows_31J_E5_8F,   to_Shift_JIS_E5_90,
+       to_Shift_JIS_E5_91, to_Windows_31J_E5_92,
+     to_Windows_31J_E5_93,   to_Shift_JIS_E5_94,
+       to_Shift_JIS_E5_95, to_Windows_31J_E5_96,
+       to_Shift_JIS_E5_97,   to_Shift_JIS_E5_98,
+       to_Shift_JIS_E5_99,   to_Shift_JIS_E5_9A,
+       to_Shift_JIS_E5_9B,   to_Shift_JIS_E5_9C,
+     to_Windows_31J_E5_9D, to_Windows_31J_E5_9E,
+     to_Windows_31J_E5_9F,   to_Shift_JIS_E5_A0,
+       to_Shift_JIS_E5_A1, to_Windows_31J_E5_A2,
+       to_Shift_JIS_E5_A3, to_Windows_31J_E5_A4,
+     to_Windows_31J_E5_A5, to_Windows_31J_E5_A6,
+       to_Shift_JIS_E5_A7,   to_Shift_JIS_E5_A8,
+       to_Shift_JIS_E5_A9,   to_Shift_JIS_E5_AA,
+       to_Shift_JIS_E5_AB,   to_Shift_JIS_E5_AC,
+     to_Windows_31J_E5_AD,   to_Shift_JIS_E5_AE,
+     to_Windows_31J_E5_AF, to_Windows_31J_E5_B0,
+       to_Shift_JIS_E5_B1, to_Windows_31J_E5_B2,
+     to_Windows_31J_E5_B3, to_Windows_31J_E5_B4,
+     to_Windows_31J_E5_B5, to_Windows_31J_E5_B6,
+     to_Windows_31J_E5_B7,   to_Shift_JIS_E5_B8,
+       to_Shift_JIS_E5_B9,   to_Shift_JIS_E5_BA,
+       to_Shift_JIS_E5_BB, to_Windows_31J_E5_BC,
+     to_Windows_31J_E5_BD, to_Windows_31J_E5_BE,
+     to_Windows_31J_E5_BF,
+
+#define to_Windows_31J_E5 WORDINDEX2INFO(20508)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_E5_infos,
+
+#define to_Windows_31J_E6_81_infos WORDINDEX2INFO(20510)
+           INVALID,         UNDEF, o2(0x9c,0x8c), o2(0x9c,0x96),
+     o2(0x9c,0x94), o2(0x9c,0x91), o2(0x9c,0x90), o2(0x97,0xf6),
+     o2(0x9c,0x92), o2(0x8b,0xb0), o2(0x8d,0x50), o2(0x8f,0x9a),
+     o2(0x9c,0x99), o2(0x9c,0x8b), o2(0xfa,0xbc), o2(0x9c,0x8f),
+     o2(0x9c,0x7e), o2(0x89,0xf8), o2(0x9c,0x93), o2(0x9c,0x95),
+     o2(0x92,0x70), o2(0x8d,0xa6), o2(0x89,0xb6), o2(0x9c,0x8d),
+     o2(0x9c,0x98), o2(0x9c,0x97), o2(0x8b,0xb1), o2(0x91,0xa7),
+     o2(0x8a,0x86), o2(0x8c,0x62), o2(0x9c,0x8e),
+
+#define to_Windows_31J_E6_81 WORDINDEX2INFO(20541)
+    to_Windows_31J_E6_81_offsets,
+    to_Windows_31J_E6_81_infos,
+
+#define to_Windows_31J_E6_82_infos WORDINDEX2INFO(20543)
+           INVALID,         UNDEF, o2(0x9c,0x9a), o2(0x9c,0x9d),
+     o2(0x9c,0x9f), o2(0xfa,0xbd), o2(0x8e,0xbb), o2(0xfa,0xbe),
+     o2(0x9c,0xa5), o2(0x92,0xee), o2(0x9c,0x9b), o2(0x9c,0xa3),
+     o2(0x89,0xf7), o2(0x9c,0xa1), o2(0x9c,0xa2), o2(0x9c,0x9e),
+     o2(0x9c,0xa0), o2(0x8c,0xe5), o2(0x97,0x49), o2(0x8a,0xb3),
+     o2(0x89,0x78), o2(0x9c,0xa4), o2(0x94,0x59), o2(0x88,0xab),
+     o2(0x94,0xdf), o2(0x9c,0x7b), o2(0x9c,0xaa), o2(0x9c,0xae),
+     o2(0x96,0xe3), o2(0x9c,0xa7), o2(0x93,0x89), o2(0x9c,0xac),
+
+#define to_Windows_31J_E6_82 WORDINDEX2INFO(20575)
+    to_Windows_31J_E6_82_offsets,
+    to_Windows_31J_E6_82_infos,
+
+#define to_Windows_31J_E6_83_infos WORDINDEX2INFO(20577)
+           INVALID,         UNDEF, o2(0x8f,0xee), o2(0x9c,0xad),
+     o2(0x93,0xd5), o2(0x98,0x66), o2(0x9c,0xa9), o2(0xfa,0xc0),
+     o2(0x9c,0xaf), o2(0x8d,0x9b), o2(0x90,0xc9), o2(0xfa,0xbf),
+     o2(0x88,0xd2), o2(0x9c,0xa8), o2(0x9c,0xa6), o2(0x91,0x79),
+     o2(0x9c,0x9c), o2(0x8e,0x53), o2(0x91,0xc4), o2(0x9c,0xbb),
+     o2(0xfa,0xc2), o2(0x91,0x7a), o2(0x9c,0xb6), o2(0x9c,0xb3),
+     o2(0x9c,0xb4), o2(0x8e,0xe4), o2(0x9c,0xb7), o2(0x9c,0xba),
+
+#define to_Windows_31J_E6_83 WORDINDEX2INFO(20605)
+    to_Windows_31J_E6_83_offsets,
+    to_Windows_31J_E6_83_infos,
+
+#define to_Windows_31J_E6_84_infos WORDINDEX2INFO(20607)
+           INVALID, o2(0x9c,0xb5), o2(0x8f,0x44),         UNDEF,
+     o2(0x9c,0xb8), o2(0x9c,0xb2), o2(0x96,0xfa), o2(0x96,0xf9),
+     o2(0x9c,0xbc), o2(0x9c,0xbd), o2(0x88,0xd3), o2(0xfa,0xc3),
+     o2(0x9c,0xb1), o2(0x8b,0xf0), o2(0x88,0xa4), o2(0x8a,0xb4),
+     o2(0xfa,0xc1), o2(0x9c,0xb9), o2(0x9c,0xc1), o2(0x9c,0xc0),
+     o2(0x9c,0xc5), o2(0xfa,0xc5), o2(0x9c,0xc6), o2(0xfa,0xc4),
+     o2(0x9c,0xc4), o2(0x9c,0xc7), o2(0x9c,0xbf), o2(0x9c,0xc3),
+
+#define to_Windows_31J_E6_84 WORDINDEX2INFO(20635)
+    to_Windows_31J_E6_84_offsets,
+    to_Windows_31J_E6_84_infos,
+
+#define to_Windows_31J_E6_86_infos WORDINDEX2INFO(20637)
+           INVALID,         UNDEF, o2(0x97,0x4a), o2(0x9c,0xda),
+     o2(0x9c,0xde), o2(0x91,0x9e), o2(0x97,0xf7), o2(0x9c,0xdf),
+     o2(0x9c,0xdc), o2(0x9c,0xd9), o2(0xfa,0xc6), o2(0x9c,0xd8),
+     o2(0x9c,0xdd), o2(0x95,0xae), o2(0x93,0xb2), o2(0x8c,0x65),
+     o2(0x9c,0xe0), o2(0x9c,0xdb), o2(0x9c,0xe1), o2(0x8c,0x9b),
+     o2(0x89,0xaf), o2(0x9c,0xe9), o2(0x8a,0xb6),
+
+#define to_Windows_31J_E6_86 WORDINDEX2INFO(20660)
+    to_Windows_31J_E6_86_offsets,
+    to_Windows_31J_E6_86_infos,
+
+#define to_Windows_31J_E6_88_infos WORDINDEX2INFO(20662)
+           INVALID, o2(0x9c,0xf6),         UNDEF, o2(0x9c,0xf7),
+     o2(0x9c,0xf8), o2(0x95,0xe8), o2(0x9c,0xfa), o2(0x9c,0xf9),
+     o2(0x8f,0x5e), o2(0x90,0xac), o2(0x89,0xe4), o2(0x89,0xfa),
+     o2(0xfa,0xc7), o2(0x9c,0xfb), o2(0x88,0xbd), o2(0x90,0xca),
+     o2(0x9c,0xfc), o2(0xe6,0xc1), o2(0x9d,0x40), o2(0x8c,0x81),
+     o2(0x9d,0x41), o2(0x90,0xed), o2(0x9d,0x42), o2(0x9d,0x43),
+     o2(0x8b,0x59), o2(0x9d,0x44), o2(0x9d,0x45), o2(0x9d,0x46),
+     o2(0x91,0xd5), o2(0x8c,0xcb), o2(0x96,0xdf), o2(0x96,0x5b),
+
+#define to_Windows_31J_E6_88 WORDINDEX2INFO(20694)
+    to_Windows_31J_E6_88_offsets,
+    to_Windows_31J_E6_88_infos,
+
+#define to_Windows_31J_E6_8A_infos WORDINDEX2INFO(20696)
+           INVALID, o2(0x8b,0x5a),         UNDEF, o2(0x9d,0x4f),
+     o2(0x9d,0x56), o2(0x8f,0xb4), o2(0x9d,0x50), o2(0x94,0x63),
+     o2(0x97,0x7d), o2(0x9d,0x52), o2(0x9d,0x53), o2(0x9d,0x57),
+     o2(0x93,0x8a), o2(0x9d,0x54), o2(0x8d,0x52), o2(0x90,0xdc),
+     o2(0x9d,0x65), o2(0x94,0xb2), o2(0x91,0xf0), o2(0xfa,0xc8),
+     o2(0x94,0xe2), o2(0x9d,0xab), o2(0x95,0xf8), o2(0x92,0xef),
+     o2(0x96,0x95), o2(0x9d,0x5a), o2(0x89,0x9f), o2(0x92,0x8a),
+
+#define to_Windows_31J_E6_8A WORDINDEX2INFO(20724)
+    to_Windows_31J_E6_8A_offsets,
+    to_Windows_31J_E6_8A_infos,
+
+#define to_Windows_31J_E6_8F_infos WORDINDEX2INFO(20726)
+           INVALID, o2(0x9d,0x83),         UNDEF, o2(0x91,0xb5),
+     o2(0x9d,0x89), o2(0x9d,0x84), o2(0x9d,0x86), o2(0x95,0x60),
+     o2(0x92,0xf1), o2(0x9d,0x87), o2(0x97,0x4b), o2(0x97,0x67),
+     o2(0x8a,0xb7), o2(0x88,0xac), o2(0x9d,0x85), o2(0x9d,0x82),
+     o2(0x8a,0xf6), o2(0x89,0x87), o2(0xfa,0xc9), o2(0x9d,0x88),
+     o2(0x97,0x68),
+
+#define to_Windows_31J_E6_8F WORDINDEX2INFO(20747)
+    to_Windows_31J_E6_8F_offsets,
+    to_Windows_31J_E6_8F_infos,
+
+#define to_Windows_31J_E6_91_infos WORDINDEX2INFO(20749)
+           INVALID,         UNDEF, o2(0x90,0xdb), o2(0x9d,0x97),
+     o2(0x93,0x45), o2(0xfa,0xca), o2(0x9d,0x94), o2(0x96,0x80),
+     o2(0x9d,0x95), o2(0x9d,0x96), o2(0x96,0xcc), o2(0x90,0xa0),
+
+#define to_Windows_31J_E6_91 WORDINDEX2INFO(20761)
+    to_Windows_31J_E6_91_offsets,
+    to_Windows_31J_E6_91_infos,
+
+#define to_Windows_31J_E6_92_infos WORDINDEX2INFO(20763)
+           INVALID,         UNDEF, o2(0x8c,0x82), o2(0x9d,0x9d),
+     o2(0x8e,0x54), o2(0x9d,0x9a), o2(0x9d,0x99), o2(0x94,0x51),
+     o2(0xfa,0xcb), o2(0x93,0xb3), o2(0x93,0x50), o2(0x9d,0x9b),
+     o2(0x9d,0x9c), o2(0x95,0x8f), o2(0x94,0x64), o2(0x8e,0x42),
+     o2(0x90,0xef), o2(0x96,0x6f), o2(0x8a,0x68), o2(0x9d,0xa3),
+     o2(0x9d,0x9e),
+
+#define to_Windows_31J_E6_92 WORDINDEX2INFO(20784)
+    to_Windows_31J_E6_92_offsets,
+    to_Windows_31J_E6_92_infos,
+
+#define to_Windows_31J_E6_93_infos WORDINDEX2INFO(20786)
+           INVALID,         UNDEF, o2(0x97,0x69), o2(0x9d,0xa5),
+     o2(0x9d,0xa1), o2(0x9d,0xa2), o2(0x91,0x80), o2(0xfa,0xcc),
+     o2(0x9d,0xa0), o2(0x9d,0x5e), o2(0x9d,0xa4), o2(0x9d,0x9f),
+     o2(0x9d,0xa9), o2(0x9d,0xaa), o2(0x93,0x46), o2(0x9d,0xac),
+     o2(0x8e,0x43), o2(0x9d,0xa7), o2(0x8b,0x5b), o2(0x9d,0xad),
+     o2(0x9d,0xa6), o2(0x9d,0xb1), o2(0x9d,0xb0), o2(0x9d,0xaf),
+     o2(0x9d,0xb2), o2(0x9d,0xb4), o2(0x8f,0xef),
+
+#define to_Windows_31J_E6_93 WORDINDEX2INFO(20813)
+    to_Windows_31J_E6_93_offsets,
+    to_Windows_31J_E6_93_infos,
+
+#define to_Windows_31J_E6_95_infos WORDINDEX2INFO(20815)
+           INVALID,         UNDEF, o2(0x8c,0xcc), o2(0x9d,0xc1),
+     o2(0x9d,0xc4), o2(0xfa,0xcd), o2(0x95,0x71), o2(0x8b,0x7e),
+     o2(0x9d,0xc3), o2(0x9d,0xc2), o2(0x94,0x73), o2(0x9d,0xc5),
+     o2(0x8b,0xb3), o2(0x9d,0xc7), o2(0x9d,0xc6), o2(0x8a,0xb8),
+     o2(0x8e,0x55), o2(0x93,0xd6), o2(0x8c,0x68), o2(0x90,0x94),
+     o2(0x9d,0xc8), o2(0x90,0xae), o2(0x93,0x47), o2(0x95,0x7e),
+     o2(0x9d,0xc9),
+
+#define to_Windows_31J_E6_95 WORDINDEX2INFO(20840)
+    to_Windows_31J_E6_95_offsets,
+    to_Windows_31J_E6_95_infos,
+
+#define to_Windows_31J_E6_98_infos WORDINDEX2INFO(20842)
+           INVALID, o2(0xfa,0xce),         UNDEF, o2(0x8d,0x56),
+     o2(0x9d,0xde), o2(0x8d,0xa9), o2(0x8f,0xb8), o2(0xfa,0xd1),
+     o2(0x9d,0xdd), o2(0x8f,0xb9), o2(0x96,0xbe), o2(0x8d,0xa8),
+     o2(0x88,0xd5), o2(0x90,0xcc), o2(0xfa,0xcf), o2(0x9d,0xe4),
+     o2(0xfa,0xd3), o2(0x90,0xaf), o2(0x89,0x66), o2(0xfa,0xd4),
+     o2(0x8f,0x74), o2(0x96,0x86), o2(0x8d,0xf0), o2(0x8f,0xba),
+     o2(0xfa,0xd2), o2(0x90,0xa5), o2(0xfa,0x63), o2(0x9d,0xe3),
+     o2(0x9d,0xe1), o2(0x9d,0xe2), o2(0xfa,0xd0), o2(0x92,0x8b),
+     o2(0x9e,0x45),
+
+#define to_Windows_31J_E6_98 WORDINDEX2INFO(20875)
+    to_Windows_31J_E6_98_offsets,
+    to_Windows_31J_E6_98_infos,
+
+#define to_Windows_31J_E6_99_infos WORDINDEX2INFO(20877)
+           INVALID,         UNDEF, o2(0x9d,0xe8), o2(0x8e,0x9e),
+     o2(0x8d,0x57), o2(0x9d,0xe6), o2(0x9d,0xe7), o2(0x90,0x57),
+     o2(0x9d,0xe5), o2(0x8e,0x4e), o2(0xfa,0xd6), o2(0xfa,0xd7),
+     o2(0x9d,0xea), o2(0x9d,0xe9), o2(0x9d,0xee), o2(0x9d,0xef),
+     o2(0x9d,0xeb), o2(0xfa,0xd5), o2(0x8a,0x41), o2(0x9d,0xec),
+     o2(0x9d,0xed), o2(0x94,0xd3), o2(0x95,0x81), o2(0x8c,0x69),
+     o2(0x9d,0xf0), o2(0xfa,0xd9), o2(0x90,0xb0), o2(0x8f,0xbb),
+     o2(0x92,0x71),
+
+#define to_Windows_31J_E6_99 WORDINDEX2INFO(20906)
+    to_Windows_31J_E6_99_offsets,
+    to_Windows_31J_E6_99_infos,
+
+#define to_Windows_31J_E6_9A_infos WORDINDEX2INFO(20908)
+           INVALID,         UNDEF, o2(0x8b,0xc5), o2(0x9d,0xf1),
+     o2(0x9d,0xf5), o2(0x89,0xc9), o2(0x9d,0xf2), o2(0x9d,0xf4),
+     o2(0x9d,0xf3), o2(0x8f,0x8b), o2(0x92,0x67), o2(0x88,0xc3),
+     o2(0x9d,0xf6), o2(0xfa,0xda), o2(0x9d,0xf7), o2(0xfa,0xdb),
+     o2(0x92,0xa8), o2(0x97,0xef), o2(0x8e,0x62), o2(0x95,0xe9),
+     o2(0xfa,0xdc), o2(0x96,0x5c), o2(0x9e,0x41), o2(0x9d,0xf9),
+     o2(0x9d,0xfc), o2(0x9d,0xfb), o2(0xfa,0xdd),
+
+#define to_Windows_31J_E6_9A WORDINDEX2INFO(20935)
+    to_Windows_31J_E6_9A_offsets,
+    to_Windows_31J_E6_9A_infos,
+
+#define to_Windows_31J_E6_9B_infos WORDINDEX2INFO(20937)
+           INVALID,         UNDEF, o2(0x9d,0xf8), o2(0x9e,0x40),
+     o2(0x93,0xdc), o2(0x9d,0xfa), o2(0x9e,0x42), o2(0x8f,0x8c),
+     o2(0x9e,0x43), o2(0x97,0x6a), o2(0x94,0x98), o2(0x9e,0x44),
+     o2(0x9e,0x46), o2(0x9e,0x47), o2(0x9e,0x48), o2(0x8b,0xc8),
+     o2(0x89,0x67), o2(0x8d,0x58), o2(0x9e,0x49), o2(0x9e,0x4a),
+     o2(0x8f,0x91), o2(0x91,0x82), o2(0xfa,0xde), o2(0xfa,0x66),
+     o2(0x99,0xd6), o2(0x91,0x5d), o2(0x91,0x5c), o2(0x91,0xd6),
+
+#define to_Windows_31J_E6_9B WORDINDEX2INFO(20965)
+    to_Windows_31J_E6_9B_offsets,
+    to_Windows_31J_E6_9B_infos,
+
+#define to_Windows_31J_E6_9C_infos WORDINDEX2INFO(20967)
+           INVALID, o2(0x8d,0xc5),         UNDEF, o2(0x98,0xf0),
+     o2(0x8c,0x8e), o2(0x97,0x4c), o2(0x95,0xfc), o2(0x95,0x9e),
+     o2(0xfa,0xdf), o2(0x9e,0x4b), o2(0x8d,0xf1), o2(0x92,0xbd),
+     o2(0x9e,0x4c), o2(0x98,0x4e), o2(0x96,0x5d), o2(0x92,0xa9),
+     o2(0x9e,0x4d), o2(0x8a,0xfa), o2(0x9e,0x4e), o2(0x9e,0x4f),
+     o2(0x96,0xd8), o2(0x96,0xa2), o2(0x96,0x96), o2(0x96,0x7b),
+     o2(0x8e,0x44), o2(0x9e,0x51), o2(0x8e,0xe9), o2(0x96,0x70),
+     o2(0x9e,0x53), o2(0x9e,0x56), o2(0x9e,0x55), o2(0x8a,0xf7),
+     o2(0x8b,0x80), o2(0x9e,0x52),
+
+#define to_Windows_31J_E6_9C WORDINDEX2INFO(21001)
+    to_Windows_31J_E6_9C_offsets,
+    to_Windows_31J_E6_9C_infos,
+
+#define to_Windows_31J_E6_9D_infos WORDINDEX2INFO(21003)
+           INVALID,         UNDEF, o2(0x9e,0x54), o2(0x9e,0x57),
+     o2(0x90,0x99), o2(0x97,0x9b), o2(0x88,0xc7), o2(0x8d,0xde),
+     o2(0x91,0xba), o2(0x8e,0xdb), o2(0x8f,0xf1), o2(0x9e,0x5a),
+     o2(0x93,0x6d), o2(0x9e,0x58), o2(0x91,0xa9), o2(0x9e,0x59),
+     o2(0x8f,0xf0), o2(0x96,0xdb), o2(0x9e,0x5b), o2(0x9e,0x5c),
+     o2(0x97,0x88), o2(0xfa,0xe1), o2(0x9e,0x61), o2(0x8d,0x59),
+     o2(0x94,0x74), o2(0x9e,0x5e), o2(0x93,0x8c), o2(0x9d,0xdc),
+     o2(0x9d,0xe0), o2(0x8b,0x6e), o2(0x94,0x66), o2(0x9e,0x60),
+     o2(0x8f,0xbc), o2(0x94,0xc2),
+
+#define to_Windows_31J_E6_9D WORDINDEX2INFO(21037)
+    to_Windows_31J_E6_9D_offsets,
+    to_Windows_31J_E6_9D_infos,
+
+#define to_Windows_31J_E6_9E_infos WORDINDEX2INFO(21039)
+           INVALID,         UNDEF, o2(0x9e,0x66), o2(0x94,0xf8),
+     o2(0x9e,0x5d), o2(0x9e,0x63), o2(0x9e,0x62), o2(0x90,0xcd),
+     o2(0x96,0x8d), o2(0x97,0xd1), o2(0x96,0x87), o2(0x89,0xca),
+     o2(0x8e,0x7d), o2(0x98,0x67), o2(0x9e,0x65), o2(0x90,0x95),
+     o2(0x9e,0x64), o2(0x9e,0x5f), o2(0x8c,0xcd), o2(0x9e,0x6b),
+     o2(0x9e,0x69), o2(0x89,0xcb), o2(0x9e,0x67), o2(0x9e,0x6d),
+     o2(0x9e,0x73), o2(0xfa,0xe2),
+
+#define to_Windows_31J_E6_9E WORDINDEX2INFO(21065)
+    to_Windows_31J_E6_9E_offsets,
+    to_Windows_31J_E6_9E_infos,
+
+#define to_Windows_31J_E6_9F_infos WORDINDEX2INFO(21067)
+           INVALID, o2(0xfa,0xe4), o2(0x91,0xc6),         UNDEF,
+     o2(0x95,0xbf), o2(0x9e,0x75), o2(0x95,0x41), o2(0x9e,0x74),
+     o2(0x94,0x90), o2(0x96,0x5e), o2(0x8a,0xb9), o2(0x90,0xf5),
+     o2(0x8f,0x5f), o2(0x92,0xd1), o2(0x97,0x4d), o2(0x9e,0x70),
+     o2(0x9e,0x6f), o2(0x9e,0x71), o2(0x9e,0x6e), o2(0x9e,0x76),
+     o2(0x9e,0x6c), o2(0x9e,0x6a), o2(0x9e,0x72), o2(0x9e,0x68),
+     o2(0x92,0x8c), o2(0x96,0xf6), o2(0x8e,0xc4), o2(0x8d,0xf2),
+     o2(0x8d,0xb8), o2(0x96,0x8f), o2(0x8a,0x60),
+
+#define to_Windows_31J_E6_9F WORDINDEX2INFO(21098)
+    to_Windows_31J_E6_9F_offsets,
+    to_Windows_31J_E6_9F_infos,
+
+#define to_Windows_31J_E6_A0_infos WORDINDEX2INFO(21100)
+           INVALID,         UNDEF, o2(0xfa,0xe5), o2(0x92,0xcc),
+     o2(0x93,0xc8), o2(0x89,0x68), o2(0x90,0xf0), o2(0x90,0xb2),
+     o2(0x8c,0x49), o2(0x9e,0x78), o2(0x8d,0x5a), o2(0x8a,0x9c),
+     o2(0x9e,0x7a), o2(0x8a,0x94), o2(0x9e,0x81), o2(0x9e,0x7d),
+     o2(0x90,0xf1), o2(0x8a,0x6a), o2(0x8d,0xaa), o2(0x8a,0x69),
+     o2(0x8d,0xcd),
+
+#define to_Windows_31J_E6_A0 WORDINDEX2INFO(21121)
+    to_Windows_31J_E6_A0_offsets,
+    to_Windows_31J_E6_A0_infos,
+
+#define to_Windows_31J_E6_A1_infos WORDINDEX2INFO(21123)
+           INVALID, o2(0x9e,0x7b), o2(0x8c,0x85), o2(0x8c,0x6a),
+     o2(0x93,0x8d), o2(0xfa,0xe6),         UNDEF, o2(0x9e,0x79),
+     o2(0x88,0xc4), o2(0x9e,0x7c), o2(0x9e,0x7e), o2(0x8b,0xcb),
+     o2(0x8c,0x4b), o2(0xfa,0xe3), o2(0x8a,0xba), o2(0x8b,0x6a),
+     o2(0x9e,0x82), o2(0x8d,0xf7), o2(0x96,0x91), o2(0x8e,0x56),
+     o2(0x9e,0x83), o2(0x95,0x4f), o2(0x9e,0x8f), o2(0x89,0xb1),
+     o2(0x9e,0x84), o2(0x9e,0x95), o2(0x9e,0x85),
+
+#define to_Windows_31J_E6_A1 WORDINDEX2INFO(21150)
+    to_Windows_31J_E6_A1_offsets,
+    to_Windows_31J_E6_A1_infos,
+
+#define to_Windows_31J_E6_A3_infos WORDINDEX2INFO(21152)
+           INVALID,         UNDEF, o2(0x8a,0xfc), o2(0x9e,0xb0),
+     o2(0xfa,0x64), o2(0x96,0xc7), o2(0x9e,0x97), o2(0x8a,0xfb),
+     o2(0x9e,0x9e), o2(0xfa,0xe7), o2(0x96,0x5f), o2(0x9e,0x9f),
+     o2(0x9e,0xa1), o2(0x9e,0xa5), o2(0x9e,0x99), o2(0x92,0x49),
+     o2(0x93,0x8f), o2(0x9e,0xa9), o2(0x9e,0x9c), o2(0x9e,0xa6),
+     o2(0x9e,0xa0), o2(0x90,0x58), o2(0x9e,0xaa), o2(0x90,0xb1),
+     o2(0x9e,0xa8), o2(0x8a,0xbb),
+
+#define to_Windows_31J_E6_A3 WORDINDEX2INFO(21178)
+    to_Windows_31J_E6_A3_offsets,
+    to_Windows_31J_E6_A3_infos,
+
+#define to_Windows_31J_E6_A5_infos WORDINDEX2INFO(21180)
+           INVALID,         UNDEF, o2(0x97,0x6b), o2(0x95,0x96),
+     o2(0x9e,0xb6), o2(0x91,0xc8), o2(0x9e,0xbc), o2(0x91,0x5e),
+     o2(0x9e,0xb3), o2(0x9e,0xc0), o2(0x9e,0xbf), o2(0x93,0xed),
+     o2(0x9e,0xbe), o2(0x93,0xe8), o2(0xfa,0xe9), o2(0x9e,0xc2),
+     o2(0x9e,0xb5), o2(0x8b,0xc6), o2(0x9e,0xb8), o2(0x8f,0x7c),
+     o2(0x94,0x80), o2(0x9e,0xba), o2(0x8b,0xc9), o2(0x9e,0xb2),
+     o2(0x9e,0xb4), o2(0x9e,0xb1), o2(0x98,0x4f), o2(0x8a,0x79),
+     o2(0x9e,0xb7),
+
+#define to_Windows_31J_E6_A5 WORDINDEX2INFO(21209)
+    to_Windows_31J_E6_A5_offsets,
+    to_Windows_31J_E6_A5_infos,
+
+#define to_Windows_31J_E6_A6_infos WORDINDEX2INFO(21211)
+           INVALID,         UNDEF, o2(0x9e,0xc1), o2(0x8a,0x54),
+     o2(0x8d,0xe5), o2(0x89,0x7c), o2(0x9e,0xd2), o2(0x98,0x50),
+     o2(0x9e,0xd5), o2(0xfa,0xeb), o2(0x90,0x59), o2(0x9e,0xd4),
+     o2(0x9e,0xd3), o2(0x9e,0xd0), o2(0x9e,0xc4), o2(0x9e,0xe1),
+     o2(0x9e,0xc3), o2(0x9e,0xd6), o2(0x9e,0xce), o2(0x9e,0xc9),
+     o2(0x9e,0xc6),
+
+#define to_Windows_31J_E6_A6 WORDINDEX2INFO(21232)
+    to_Windows_31J_E6_A6_offsets,
+    to_Windows_31J_E6_A6_infos,
+
+#define to_Windows_31J_E6_A7_infos WORDINDEX2INFO(21234)
+           INVALID,         UNDEF, o2(0x9e,0xc7), o2(0x9e,0xcf),
+     o2(0xea,0xa0), o2(0x9e,0xcc), o2(0x8d,0x5c), o2(0x92,0xc6),
+     o2(0x91,0x84), o2(0x9e,0xca), o2(0x9e,0xc5), o2(0x9e,0xc8),
+     o2(0x97,0x6c), o2(0x96,0x8a), o2(0x9e,0xcd), o2(0x9e,0xd7),
+     o2(0xfa,0xec), o2(0x9e,0xdf), o2(0x9e,0xd8), o2(0x9e,0xe5),
+     o2(0x9e,0xe3), o2(0x9e,0xde), o2(0x9e,0xdd), o2(0x92,0xce),
+     o2(0x91,0x85), o2(0x9e,0xdb),
+
+#define to_Windows_31J_E6_A7 WORDINDEX2INFO(21260)
+    to_Windows_31J_E6_A7_offsets,
+    to_Windows_31J_E6_A7_infos,
+
+#define to_Windows_31J_E6_A8_infos WORDINDEX2INFO(21262)
+           INVALID,         UNDEF, o2(0x9e,0xd9), o2(0x9e,0xe0),
+     o2(0x9e,0xe6), o2(0x94,0xf3), o2(0x9e,0xec), o2(0x9e,0xe7),
+     o2(0x9e,0xea), o2(0x9e,0xe4), o2(0x92,0x94), o2(0x95,0x57),
+     o2(0x9e,0xda), o2(0x9e,0xe2), o2(0x8f,0xbe), o2(0x96,0xcd),
+     o2(0x9e,0xf6), o2(0x9e,0xe9), o2(0x8c,0xa0), o2(0x89,0xa1),
+     o2(0x8a,0x7e), o2(0x9e,0xd1), o2(0xfa,0xed), o2(0x8f,0xbf),
+     o2(0x9e,0xee), o2(0x9e,0xf5), o2(0x8e,0xf7), o2(0x8a,0x92),
+     o2(0x92,0x4d),
+
+#define to_Windows_31J_E6_A8 WORDINDEX2INFO(21291)
+    to_Windows_31J_E6_A8_offsets,
+    to_Windows_31J_E6_A8_infos,
+
+#define to_Windows_31J_E6_A9_infos WORDINDEX2INFO(21293)
+           INVALID,         UNDEF, o2(0x9e,0xeb), o2(0xfa,0xef),
+     o2(0x9e,0xf0), o2(0x9e,0xf4), o2(0x8b,0xb4), o2(0x8b,0x6b),
+     o2(0x9e,0xf2), o2(0x8b,0x40), o2(0x93,0xc9), o2(0x9e,0xf1),
+     o2(0x9e,0xf3), o2(0xfa,0xee), o2(0x9e,0xed), o2(0xfa,0xf0),
+     o2(0x9e,0xef), o2(0xfa,0xf1), o2(0x8a,0x80),
+
+#define to_Windows_31J_E6_A9 WORDINDEX2INFO(21312)
+    to_Windows_31J_E6_A9_offsets,
+    to_Windows_31J_E6_A9_infos,
+
+#define to_Windows_31J_E6_AB_infos WORDINDEX2INFO(21314)
+           INVALID,         UNDEF, o2(0x9e,0xe8), o2(0x9f,0x44),
+     o2(0x9f,0x43), o2(0x9f,0x49), o2(0x98,0x45), o2(0x9f,0x4c),
+     o2(0x8b,0xf9), o2(0x9f,0x48), o2(0x9f,0x4a), o2(0xfa,0xf2),
+     o2(0xfa,0xf3), o2(0x94,0xa5), o2(0x9f,0x4d), o2(0x9f,0x51),
+     o2(0x9f,0x4e),
+
+#define to_Windows_31J_E6_AB WORDINDEX2INFO(21331)
+    to_Windows_31J_E6_AB_offsets,
+    to_Windows_31J_E6_AB_infos,
+
+#define to_Windows_31J_E6_AF_infos WORDINDEX2INFO(21333)
+           INVALID, o2(0x9a,0xca),         UNDEF, o2(0x8b,0x42),
+     o2(0x9f,0x77), o2(0x9f,0x78), o2(0x95,0xea), o2(0x96,0x88),
+     o2(0x93,0xc5), o2(0x9f,0x79), o2(0x94,0xe4), o2(0xfa,0xf4),
+     o2(0x94,0xf9), o2(0x96,0xd1), o2(0x9f,0x7a), o2(0x9f,0x7c),
+     o2(0x9f,0x7b), o2(0x9f,0x7e), o2(0x9f,0x7d),
+
+#define to_Windows_31J_E6_AF WORDINDEX2INFO(21352)
+    to_Windows_31J_E6_AF_offsets,
+    to_Windows_31J_E6_AF_infos,
+
+#define to_Windows_31J_E6_B0_infos WORDINDEX2INFO(21354)
+           INVALID,         UNDEF, o2(0x9f,0x81), o2(0x8e,0x81),
+     o2(0x96,0xaf), o2(0x9f,0x82), o2(0x9f,0x83), o2(0x8b,0x43),
+     o2(0x9f,0x84), o2(0x9f,0x86), o2(0x9f,0x85), o2(0x90,0x85),
+     o2(0x95,0x58), o2(0x89,0x69), o2(0x94,0xc3), o2(0xfa,0xf5),
+
+#define to_Windows_31J_E6_B0 WORDINDEX2INFO(21370)
+    to_Windows_31J_E6_B0_offsets,
+    to_Windows_31J_E6_B0_infos,
+
+#define to_Windows_31J_E6_B1_infos WORDINDEX2INFO(21372)
+           INVALID, o2(0x92,0xf3), o2(0x8f,0x60), o2(0x8b,0x81),
+             UNDEF, o2(0x94,0xc4), o2(0x8e,0xac), o2(0x9f,0x88),
+     o2(0x8a,0xbe), o2(0x89,0x98), o2(0xfa,0xf6), o2(0x93,0xf0),
+     o2(0x9f,0x87), o2(0x8d,0x5d), o2(0x92,0x72), o2(0x9f,0x89),
+     o2(0x9f,0x91), o2(0x9f,0x8a), o2(0xfa,0xf8), o2(0x91,0xbf),
+     o2(0x8b,0x82), o2(0x9f,0x92), o2(0x8c,0x88), o2(0x8b,0x44),
+     o2(0x9f,0x90),
+
+#define to_Windows_31J_E6_B1 WORDINDEX2INFO(21397)
+    to_Windows_31J_E6_B1_offsets,
+    to_Windows_31J_E6_B1_infos,
+
+#define to_Windows_31J_E6_B2_infos WORDINDEX2INFO(21399)
+           INVALID,         UNDEF, o2(0x9f,0x8e), o2(0x9f,0x8b),
+     o2(0x97,0x80), o2(0xfa,0xf7), o2(0x92,0xbe), o2(0x93,0xd7),
+     o2(0x9f,0x8c), o2(0x9f,0x94), o2(0x9f,0x93), o2(0x8c,0x42),
+     o2(0x89,0xab), o2(0x8d,0xb9), o2(0x9f,0x8d), o2(0x9f,0x8f),
+     o2(0x96,0x76), o2(0x91,0xf2), o2(0x96,0x97), o2(0x9f,0x9c),
+     o2(0x9f,0x9d), o2(0x89,0xcd), o2(0x95,0xa6), o2(0x96,0xfb),
+     o2(0x9f,0x9f), o2(0x8e,0xa1), o2(0x8f,0xc0), o2(0x9f,0x98),
+     o2(0x9f,0x9e), o2(0x89,0x88),
+
+#define to_Windows_31J_E6_B2 WORDINDEX2INFO(21429)
+    to_Windows_31J_E6_B2_offsets,
+    to_Windows_31J_E6_B2_infos,
+
+#define to_Windows_31J_E6_B3_infos WORDINDEX2INFO(21431)
+           INVALID,         UNDEF, o2(0x8b,0xb5), o2(0x9f,0x95),
+     o2(0x9f,0x9a), o2(0x90,0xf2), o2(0x94,0x91), o2(0x94,0xe5),
+     o2(0x9f,0x97), o2(0x96,0x40), o2(0x9f,0x99), o2(0x9f,0xa2),
+     o2(0xfa,0xf9), o2(0x9f,0xa0), o2(0x9f,0x9b), o2(0x96,0x41),
+     o2(0x94,0x67), o2(0x8b,0x83), o2(0x93,0x44), o2(0x92,0x8d),
+     o2(0x9f,0xa3), o2(0x9f,0xa1), o2(0x91,0xd7), o2(0x9f,0x96),
+     o2(0x89,0x6a),
+
+#define to_Windows_31J_E6_B3 WORDINDEX2INFO(21456)
+    to_Windows_31J_E6_B3_offsets,
+    to_Windows_31J_E6_B3_infos,
+
+#define to_Windows_31J_E6_B4_infos WORDINDEX2INFO(21458)
+           INVALID,         UNDEF, o2(0xfa,0xfa), o2(0x97,0x6d),
+     o2(0x9f,0xae), o2(0x9f,0xad), o2(0x90,0xf4), o2(0x9f,0xaa),
+     o2(0x97,0x8c), o2(0x93,0xb4), o2(0x9f,0xa4), o2(0x92,0xc3),
+     o2(0x89,0x6b), o2(0x8d,0x5e), o2(0x9f,0xa7), o2(0x8f,0x46),
+     o2(0x9f,0xac), o2(0x9f,0xab), o2(0x9f,0xa6), o2(0x9f,0xa9),
+     o2(0x8a,0x88), o2(0x9f,0xa8), o2(0x94,0x68),
+
+#define to_Windows_31J_E6_B4 WORDINDEX2INFO(21481)
+    to_Windows_31J_E6_B4_offsets,
+    to_Windows_31J_E6_B4_infos,
+
+#define to_Windows_31J_E6_B5_infos WORDINDEX2INFO(21483)
+           INVALID,         UNDEF, o2(0x97,0xac), o2(0x8f,0xf2),
+     o2(0x90,0xf3), o2(0x9f,0xb4), o2(0x9f,0xb2), o2(0x95,0x6c),
+     o2(0x9f,0xaf), o2(0x9f,0xb1), o2(0x89,0x59), o2(0x8d,0x5f),
+     o2(0x98,0x51), o2(0x8a,0x5c), o2(0x95,0x82), o2(0xfa,0xfc),
+     o2(0x97,0x81), o2(0x8a,0x43), o2(0x90,0x5a), o2(0x9f,0xb3),
+
+#define to_Windows_31J_E6_B5 WORDINDEX2INFO(21503)
+    to_Windows_31J_E6_B5_offsets,
+    to_Windows_31J_E6_B5_infos,
+
+#define to_Windows_31J_E6_B6_infos WORDINDEX2INFO(21505)
+           INVALID,         UNDEF, o2(0x9f,0xb8), o2(0xfa,0xfb),
+     o2(0x8f,0xc1), o2(0x97,0x4f), o2(0x9f,0xb5), o2(0x9f,0xb0),
+     o2(0x9f,0xb6), o2(0xfb,0x40), o2(0x97,0xdc), o2(0x93,0x93),
+     o2(0x93,0xc0), o2(0xfb,0x41), o2(0x8a,0x55), o2(0x89,0x74),
+     o2(0x9f,0xbc), o2(0x9f,0xbf), o2(0x97,0xc1),
+
+#define to_Windows_31J_E6_B6 WORDINDEX2INFO(21524)
+    to_Windows_31J_E6_B6_offsets,
+    to_Windows_31J_E6_B6_infos,
+
+#define to_Windows_31J_E6_B7_infos WORDINDEX2INFO(21526)
+           INVALID, o2(0x97,0x84),         UNDEF, o2(0x9f,0xc6),
+     o2(0x9f,0xc0), o2(0x9f,0xbd), o2(0x97,0xd2), o2(0x9f,0xc3),
+     o2(0xfb,0x42), o2(0x8f,0x69), o2(0x9f,0xc5), o2(0x9f,0xca),
+     o2(0x93,0x91), o2(0x9f,0xc8), o2(0x9f,0xc2), o2(0x92,0x57),
+     o2(0x9f,0xc9), o2(0x9f,0xbe), o2(0x9f,0xc4), o2(0x9f,0xcb),
+     o2(0x88,0xfa), o2(0x9f,0xc1), o2(0x9f,0xcc), o2(0x90,0x5b),
+     o2(0xfb,0x44), o2(0x8f,0x7e), o2(0x95,0xa3), o2(0x8d,0xac),
+     o2(0xfb,0x43), o2(0x9f,0xb9), o2(0x9f,0xc7), o2(0x93,0x59),
+     o2(0xfb,0x45),
+
+#define to_Windows_31J_E6_B7 WORDINDEX2INFO(21559)
+    to_Windows_31J_E6_B7_offsets,
+    to_Windows_31J_E6_B7_infos,
+
+#define to_Windows_31J_E6_B8_infos WORDINDEX2INFO(21561)
+           INVALID,         UNDEF, o2(0x90,0xb4), o2(0x8a,0x89),
+     o2(0x8d,0xcf), o2(0x8f,0xc2), o2(0x9f,0xbb), o2(0x8f,0x61),
+     o2(0x8c,0x6b), o2(0x9f,0xba), o2(0x9f,0xd0), o2(0x8f,0x8d),
+     o2(0x8c,0xb8), o2(0x9f,0xdf), o2(0x9f,0xd9), o2(0x8b,0x94),
+     o2(0x93,0x6e), o2(0x9f,0xd4), o2(0x9f,0xdd), o2(0x88,0xad),
+     o2(0x89,0x51), o2(0xfb,0x48), o2(0x89,0xb7), o2(0x9f,0xd6),
+     o2(0x91,0xaa), o2(0x9f,0xcd), o2(0x9f,0xcf), o2(0x8d,0x60),
+     o2(0x9f,0xe0), o2(0xfb,0x46), o2(0x9f,0xdb), o2(0xfb,0x49),
+     o2(0x9f,0xd3),
+
+#define to_Windows_31J_E6_B8 WORDINDEX2INFO(21594)
+    to_Windows_31J_E6_B8_offsets,
+    to_Windows_31J_E6_B8_infos,
+
+#define to_Windows_31J_E6_B9_infos WORDINDEX2INFO(21596)
+           INVALID,         UNDEF, o2(0x9f,0xda), o2(0x96,0xa9),
+     o2(0x9f,0xd8), o2(0x9f,0xdc), o2(0x8c,0xce), o2(0x8f,0xc3),
+     o2(0x92,0x58), o2(0xfb,0x47), o2(0x9f,0xd2), o2(0x97,0x4e),
+     o2(0x9f,0xd5), o2(0x9f,0xce), o2(0x93,0x92), o2(0x9f,0xd1),
+     o2(0x9f,0xd7), o2(0x98,0x70), o2(0x8e,0xbc),
+
+#define to_Windows_31J_E6_B9 WORDINDEX2INFO(21615)
+    to_Windows_31J_E6_B9_offsets,
+    to_Windows_31J_E6_B9_infos,
+
+#define to_Windows_31J_E6_BA_infos WORDINDEX2INFO(21617)
+           INVALID, o2(0x96,0x9e),         UNDEF, o2(0x9f,0xe1),
+     o2(0x94,0xac), o2(0x9f,0xed), o2(0x8c,0xb9), o2(0x8f,0x80),
+     o2(0x9f,0xe3), o2(0x97,0xad), o2(0x8d,0x61), o2(0x9f,0xf0),
+     o2(0x88,0xec), o2(0x9f,0xee), o2(0x9f,0xe2), o2(0x9f,0xe8),
+     o2(0x9f,0xea), o2(0x97,0x6e), o2(0x9f,0xe5), o2(0x93,0x4d),
+     o2(0x9f,0xe7), o2(0xfb,0x4a),
+
+#define to_Windows_31J_E6_BA WORDINDEX2INFO(21639)
+    to_Windows_31J_E6_BA_offsets,
+    to_Windows_31J_E6_BA_infos,
+
+#define to_Windows_31J_E6_BE_infos WORDINDEX2INFO(21641)
+           INVALID, o2(0xe0,0x47), o2(0xe0,0x46), o2(0xe0,0x4c),
+             UNDEF, o2(0x90,0x9f), o2(0xe0,0x43), o2(0xfb,0x4b),
+     o2(0xe0,0x4f), o2(0xe0,0x50), o2(0x8a,0xc0), o2(0xe0,0x55),
+     o2(0xe0,0x54), o2(0xe0,0x56), o2(0xe0,0x59), o2(0x93,0x62),
+     o2(0xe0,0x53), o2(0xfb,0x4c), o2(0xe0,0x57),
+
+#define to_Windows_31J_E6_BE WORDINDEX2INFO(21660)
+    to_Windows_31J_E6_BE_offsets,
+    to_Windows_31J_E6_BE_infos,
+
+#define to_Windows_31J_E6_BF_infos WORDINDEX2INFO(21662)
+           INVALID, o2(0x8c,0x83), o2(0x91,0xf7), o2(0xe0,0x51),
+     o2(0x94,0x5a),         UNDEF, o2(0xe0,0x58), o2(0xe0,0x5d),
+     o2(0xe0,0x5b), o2(0xe0,0x5e), o2(0xe0,0x61), o2(0xe0,0x5a),
+     o2(0x8d,0x8a), o2(0x94,0x47), o2(0x9f,0xb7), o2(0x97,0x94),
+     o2(0xe0,0x5c), o2(0xe0,0x60), o2(0x91,0xf3), o2(0xe0,0x5f),
+     o2(0xe0,0x4a), o2(0xfb,0x4d), o2(0xe8,0x89), o2(0xe0,0x64),
+     o2(0xe0,0x68),
+
+#define to_Windows_31J_E6_BF WORDINDEX2INFO(21687)
+    to_Windows_31J_E6_BF_offsets,
+    to_Windows_31J_E6_BF_infos,
+
+#define to_Windows_31J_E6_infos WORDINDEX2INFO(21689)
+                  INVALID,   to_Shift_JIS_E6_80,
+     to_Windows_31J_E6_81, to_Windows_31J_E6_82,
+     to_Windows_31J_E6_83, to_Windows_31J_E6_84,
+       to_Shift_JIS_E6_85, to_Windows_31J_E6_86,
+       to_Shift_JIS_E6_87, to_Windows_31J_E6_88,
+       to_Shift_JIS_E6_89, to_Windows_31J_E6_8A,
+       to_Shift_JIS_E6_8B,   to_Shift_JIS_E6_8C,
+       to_Shift_JIS_E6_8D,   to_Shift_JIS_E6_8E,
+     to_Windows_31J_E6_8F,   to_Shift_JIS_E6_90,
+     to_Windows_31J_E6_91, to_Windows_31J_E6_92,
+     to_Windows_31J_E6_93,   to_Shift_JIS_E6_94,
+     to_Windows_31J_E6_95,   to_Shift_JIS_E6_96,
+       to_Shift_JIS_E6_97, to_Windows_31J_E6_98,
+     to_Windows_31J_E6_99, to_Windows_31J_E6_9A,
+     to_Windows_31J_E6_9B, to_Windows_31J_E6_9C,
+     to_Windows_31J_E6_9D, to_Windows_31J_E6_9E,
+     to_Windows_31J_E6_9F, to_Windows_31J_E6_A0,
+     to_Windows_31J_E6_A1,   to_Shift_JIS_E6_A2,
+     to_Windows_31J_E6_A3,   to_Shift_JIS_E6_A4,
+     to_Windows_31J_E6_A5, to_Windows_31J_E6_A6,
+     to_Windows_31J_E6_A7, to_Windows_31J_E6_A8,
+     to_Windows_31J_E6_A9,   to_Shift_JIS_E6_AA,
+     to_Windows_31J_E6_AB,   to_Shift_JIS_E6_AC,
+       to_Shift_JIS_E6_AD,   to_Shift_JIS_E6_AE,
+     to_Windows_31J_E6_AF, to_Windows_31J_E6_B0,
+     to_Windows_31J_E6_B1, to_Windows_31J_E6_B2,
+     to_Windows_31J_E6_B3, to_Windows_31J_E6_B4,
+     to_Windows_31J_E6_B5, to_Windows_31J_E6_B6,
+     to_Windows_31J_E6_B7, to_Windows_31J_E6_B8,
+     to_Windows_31J_E6_B9, to_Windows_31J_E6_BA,
+       to_Shift_JIS_E6_BB,   to_Shift_JIS_E6_BC,
+       to_Shift_JIS_E6_BD, to_Windows_31J_E6_BE,
+     to_Windows_31J_E6_BF,
+
+#define to_Windows_31J_E6 WORDINDEX2INFO(21754)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_E6_infos,
+
+#define to_Windows_31J_E7_80_infos WORDINDEX2INFO(21756)
+           INVALID,         UNDEF, o2(0xe0,0x66), o2(0xfb,0x4e),
+     o2(0xfb,0x4f), o2(0xe0,0x62), o2(0xe0,0x63), o2(0xe0,0x67),
+     o2(0xe0,0x65), o2(0x95,0x6d), o2(0xe0,0x6d), o2(0xe0,0x6a),
+     o2(0xe0,0x69), o2(0xe0,0x6c), o2(0x93,0xd2), o2(0xe0,0x6e),
+     o2(0x92,0x95), o2(0x91,0xeb), o2(0xfb,0x50), o2(0x90,0xa3),
+     o2(0xe0,0x6f), o2(0xe0,0x71), o2(0xe0,0x70),
+
+#define to_Windows_31J_E7_80 WORDINDEX2INFO(21779)
+    to_Windows_31J_E7_80_offsets,
+    to_Windows_31J_E7_80_infos,
+
+#define to_Windows_31J_E7_82_infos WORDINDEX2INFO(21781)
+           INVALID,         UNDEF, o2(0xfb,0x51), o2(0x98,0x46),
+     o2(0x90,0x86), o2(0x89,0x8a), o2(0xe0,0x75), o2(0xe0,0x74),
+     o2(0xfb,0x52), o2(0xe0,0x78), o2(0x92,0x59), o2(0xe0,0x7b),
+     o2(0xe0,0x76), o2(0xe0,0x7a), o2(0xe0,0x79), o2(0x93,0x5f),
+     o2(0x88,0xd7), o2(0xfa,0x62),
+
+#define to_Windows_31J_E7_82 WORDINDEX2INFO(21799)
+    to_Windows_31J_E7_82_offsets,
+    to_Windows_31J_E7_82_infos,
+
+#define to_Windows_31J_E7_84_infos WORDINDEX2INFO(21801)
+           INVALID,         UNDEF, o2(0xfb,0x54), o2(0xe0,0x81),
+     o2(0xfb,0x53), o2(0x89,0x8b), o2(0xe0,0x84), o2(0x95,0xb0),
+     o2(0xe0,0x83), o2(0x96,0xb3), o2(0x8f,0xc5), o2(0x91,0x52),
+     o2(0x8f,0xc4),
+
+#define to_Windows_31J_E7_84 WORDINDEX2INFO(21814)
+    to_Windows_31J_E7_84_offsets,
+    to_Windows_31J_E7_84_infos,
+
+#define to_Windows_31J_E7_85_infos WORDINDEX2INFO(21816)
+           INVALID,         UNDEF, o2(0xfb,0x56), o2(0xfb,0x57),
+     o2(0x97,0xf9), o2(0xe0,0x8a), o2(0x90,0xf7), o2(0xe0,0x86),
+     o2(0xe0,0x8b), o2(0x89,0x8c), o2(0xfb,0x55), o2(0xe0,0x89),
+     o2(0x94,0x81), o2(0xe0,0x85), o2(0xe0,0x88), o2(0x8f,0xc6),
+     o2(0x94,0xcf), o2(0xe0,0x8c), o2(0x8e,0xcf), o2(0x90,0xf8),
+
+#define to_Windows_31J_E7_85 WORDINDEX2INFO(21836)
+    to_Windows_31J_E7_85_offsets,
+    to_Windows_31J_E7_85_infos,
+
+#define to_Windows_31J_E7_87_infos WORDINDEX2INFO(21838)
+           INVALID,         UNDEF, o2(0xfb,0x59), o2(0x94,0x52),
+     o2(0x93,0x95), o2(0xe0,0x97), o2(0xe0,0x99), o2(0x97,0xd3),
+     o2(0xe0,0x96), o2(0xe0,0x98), o2(0x89,0x8d), o2(0xe0,0x93),
+     o2(0x9a,0x7a), o2(0xe0,0x9a), o2(0x91,0x87), o2(0x8e,0x57),
+     o2(0xe0,0x9c), o2(0xe0,0x9b), o2(0x90,0x43), o2(0x99,0xd7),
+     o2(0xe0,0x9d), o2(0xe0,0x9f), o2(0xe0,0x8e), o2(0xe0,0x9e),
+     o2(0xfb,0x5a), o2(0xe0,0xa0),
+
+#define to_Windows_31J_E7_87 WORDINDEX2INFO(21864)
+    to_Windows_31J_E7_87_offsets,
+    to_Windows_31J_E7_87_infos,
+
+#define to_Windows_31J_E7_8A_infos WORDINDEX2INFO(21866)
+           INVALID, o2(0x8d,0xd2), o2(0xe0,0xb3), o2(0xe0,0xb2),
+             UNDEF, o2(0xe0,0xb4), o2(0xe0,0xb5), o2(0xe0,0xb6),
+     o2(0x8b,0x5d), o2(0xe0,0xb7), o2(0xe0,0xb8), o2(0x8c,0xa2),
+     o2(0x94,0xc6), o2(0xfb,0x5b), o2(0xe0,0xba), o2(0x8f,0xf3),
+     o2(0xe0,0xb9), o2(0xfb,0x5c),
+
+#define to_Windows_31J_E7_8A WORDINDEX2INFO(21884)
+    to_Windows_31J_E7_8A_offsets,
+    to_Windows_31J_E7_8A_infos,
+
+#define to_Windows_31J_E7_8C_infos WORDINDEX2INFO(21886)
+           INVALID,         UNDEF, o2(0xe0,0xc7), o2(0xe0,0xc9),
+     o2(0xe0,0xc6), o2(0x96,0xd2), o2(0xe0,0xc8), o2(0xe0,0xca),
+     o2(0x97,0xc2), o2(0xfb,0x5d), o2(0xe0,0xce), o2(0xe0,0xcd),
+     o2(0x92,0x96), o2(0x94,0x4c), o2(0x8c,0xa3), o2(0xe0,0xcc),
+     o2(0xe0,0xcb), o2(0x97,0x50), o2(0x97,0x51), o2(0xe0,0xcf),
+     o2(0x89,0x8e),
+
+#define to_Windows_31J_E7_8C WORDINDEX2INFO(21907)
+    to_Windows_31J_E7_8C_offsets,
+    to_Windows_31J_E7_8C_infos,
+
+#define to_Windows_31J_E7_8D_infos WORDINDEX2INFO(21909)
+           INVALID,         UNDEF, o2(0x8d,0x96), o2(0x8e,0x82),
+     o2(0xe0,0xd0), o2(0xe0,0xd1), o2(0xe0,0xd3), o2(0x8f,0x62),
+     o2(0xe0,0xd5), o2(0xe0,0xd4), o2(0xe0,0xd6), o2(0x8a,0x6c),
+     o2(0xe0,0xd8), o2(0xfb,0x5f), o2(0xe0,0xd7), o2(0xe0,0xda),
+     o2(0xe0,0xd9),
+
+#define to_Windows_31J_E7_8D WORDINDEX2INFO(21926)
+    to_Windows_31J_E7_8D_offsets,
+    to_Windows_31J_E7_8D_infos,
+
+#define to_Windows_31J_E7_8E_infos WORDINDEX2INFO(21928)
+           INVALID,         UNDEF, o2(0x8c,0xba), o2(0x97,0xa6),
+     o2(0x8b,0xca), o2(0x89,0xa4), o2(0x8b,0xe8), o2(0x8a,0xdf),
+     o2(0x97,0xe6), o2(0xe0,0xdc), o2(0xe0,0xde), o2(0xfb,0x60),
+
+#define to_Windows_31J_E7_8E WORDINDEX2INFO(21940)
+    to_Windows_31J_E7_8E_offsets,
+    to_Windows_31J_E7_8E_infos,
+
+#define to_Windows_31J_E7_8F_infos WORDINDEX2INFO(21942)
+           INVALID, o2(0xe0,0xdf),         UNDEF, o2(0x89,0xcf),
+     o2(0xe0,0xdb), o2(0xfb,0x61), o2(0x8e,0x58), o2(0x92,0xbf),
+     o2(0xe0,0xdd), o2(0xfb,0x64), o2(0xfb,0x62), o2(0xe0,0xe2),
+     o2(0x8e,0xec), o2(0xfb,0x63), o2(0xe0,0xe0), o2(0x8c,0x5d),
+     o2(0x94,0xc7), o2(0xe0,0xe1), o2(0xe0,0xfc), o2(0xfb,0x66),
+     o2(0xe0,0xe7), o2(0x8c,0xbb),
+
+#define to_Windows_31J_E7_8F WORDINDEX2INFO(21964)
+    to_Windows_31J_E7_8F_offsets,
+    to_Windows_31J_E7_8F_infos,
+
+#define to_Windows_31J_E7_90_infos WORDINDEX2INFO(21966)
+           INVALID,         UNDEF, o2(0x8b,0x85), o2(0xe0,0xe4),
+     o2(0x97,0x9d), o2(0xfb,0x65), o2(0x97,0xae), o2(0x91,0xf4),
+     o2(0xe0,0xe6), o2(0xfb,0x67), o2(0xfb,0x69), o2(0xfb,0x68),
+     o2(0xfb,0x6a), o2(0xe0,0xe8), o2(0x97,0xd4), o2(0x8b,0xd5),
+     o2(0x94,0xfa), o2(0x94,0x69), o2(0xe0,0xe9), o2(0xe0,0xeb),
+
+#define to_Windows_31J_E7_90 WORDINDEX2INFO(21986)
+    to_Windows_31J_E7_90_offsets,
+    to_Windows_31J_E7_90_infos,
+
+#define to_Windows_31J_E7_91_infos WORDINDEX2INFO(21988)
+           INVALID,         UNDEF, o2(0xe0,0xee), o2(0xe0,0xea),
+     o2(0xe0,0xed), o2(0x8c,0xe8), o2(0x89,0x6c), o2(0xe0,0xef),
+     o2(0x90,0x90), o2(0xe0,0xec), o2(0x97,0xda), o2(0xfb,0x6b),
+     o2(0xe0,0xf2), o2(0xea,0xa2), o2(0xe0,0xf0), o2(0xe0,0xf3),
+     o2(0xe0,0xe5), o2(0xe0,0xf1), o2(0x8d,0xba), o2(0xe0,0xf4),
+     o2(0xe0,0xf5),
+
+#define to_Windows_31J_E7_91 WORDINDEX2INFO(22009)
+    to_Windows_31J_E7_91_offsets,
+    to_Windows_31J_E7_91_infos,
+
+#define to_Windows_31J_E7_92_infos WORDINDEX2INFO(22011)
+           INVALID,         UNDEF, o2(0x97,0x9e), o2(0xfb,0x6c),
+     o2(0xe0,0xf6), o2(0xe0,0xf7), o2(0xfb,0x6d), o2(0xe0,0xe3),
+     o2(0xe0,0xf8), o2(0x8a,0xc2), o2(0x8e,0xa3),
+
+#define to_Windows_31J_E7_92 WORDINDEX2INFO(22022)
+    to_Windows_31J_E7_92_offsets,
+    to_Windows_31J_E7_92_infos,
+
+#define to_Windows_31J_E7_94_infos WORDINDEX2INFO(22024)
+           INVALID,         UNDEF, o2(0xfb,0x6e), o2(0xe1,0x4b),
+     o2(0xe1,0x4a), o2(0xe1,0x4c), o2(0xe1,0x4d), o2(0xe1,0x4f),
+     o2(0xe1,0x4e), o2(0x8d,0x99), o2(0xe1,0x51), o2(0xe1,0x50),
+     o2(0x8a,0xc3), o2(0x90,0x72), o2(0x93,0x5b), o2(0xe1,0x52),
+     o2(0x90,0xb6), o2(0x8e,0x59), o2(0x89,0x99), o2(0xe1,0x53),
+     o2(0x97,0x70), o2(0x95,0xe1), o2(0xe1,0x54), o2(0xfa,0xa8),
+     o2(0x93,0x63), o2(0x97,0x52), o2(0x8d,0x62), o2(0x90,0x5c),
+     o2(0x92,0x6a), o2(0x99,0xb2), o2(0x92,0xac), o2(0x89,0xe6),
+     o2(0xe1,0x55),
+
+#define to_Windows_31J_E7_94 WORDINDEX2INFO(22057)
+    to_Windows_31J_E7_94_offsets,
+    to_Windows_31J_E7_94_infos,
+
+#define to_Windows_31J_E7_95_infos WORDINDEX2INFO(22059)
+           INVALID,         UNDEF, o2(0xe1,0x56), o2(0xe1,0x5b),
+     o2(0xe1,0x59), o2(0xe1,0x58), o2(0x9d,0xc0), o2(0x8a,0x45),
+     o2(0xe1,0x57), o2(0x88,0xd8), o2(0x94,0xa8), o2(0x94,0xc8),
+     o2(0x97,0xaf), o2(0xe1,0x5c), o2(0xe1,0x5a), o2(0x92,0x7b),
+     o2(0x90,0xa4), o2(0x94,0xa9), o2(0x95,0x4c), o2(0xe1,0x5e),
+     o2(0x97,0xaa), o2(0x8c,0x6c), o2(0xe1,0x5f), o2(0xe1,0x5d),
+     o2(0x94,0xd4), o2(0xe1,0x60), o2(0xe1,0x61), o2(0xfb,0x6f),
+     o2(0x88,0xd9), o2(0x8f,0xf4), o2(0xe1,0x66), o2(0xe1,0x63),
+     o2(0x93,0xeb), o2(0xe1,0x62), o2(0x8b,0x45),
+
+#define to_Windows_31J_E7_95 WORDINDEX2INFO(22094)
+    to_Windows_31J_E7_95_offsets,
+    to_Windows_31J_E7_95_infos,
+
+#define to_Windows_31J_E7_9A_infos WORDINDEX2INFO(22096)
+           INVALID, o2(0xe1,0xa3),         UNDEF, o2(0xfb,0x70),
+     o2(0xe1,0xa4), o2(0x93,0x49), o2(0x8a,0x46), o2(0x8d,0x63),
+     o2(0xe1,0xa5), o2(0xe1,0xa6), o2(0xe1,0xa7), o2(0x8e,0x48),
+     o2(0xe1,0xa9), o2(0xe1,0xa8), o2(0xe1,0xaa), o2(0xe1,0xab),
+     o2(0xfb,0x73), o2(0xfb,0x71), o2(0xfb,0x72), o2(0xfb,0x74),
+     o2(0x94,0xe7), o2(0xe1,0xac), o2(0xe1,0xad), o2(0xea,0x89),
+     o2(0xe1,0xae), o2(0xe1,0xaf), o2(0xe1,0xb0), o2(0x8e,0x4d),
+
+#define to_Windows_31J_E7_9A WORDINDEX2INFO(22124)
+    to_Windows_31J_E7_9A_offsets,
+    to_Windows_31J_E7_9A_infos,
+
+#define to_Windows_31J_E7_9D_infos WORDINDEX2INFO(22126)
+           INVALID, o2(0x92,0x85),         UNDEF, o2(0xfb,0x76),
+     o2(0xe1,0xc7), o2(0xe1,0xc8), o2(0xe1,0xcb), o2(0x90,0x87),
+     o2(0x93,0xc2), o2(0xe1,0xcc), o2(0x96,0x72), o2(0xe1,0xc9),
+     o2(0xe1,0xca), o2(0xe1,0xcf), o2(0xe1,0xce), o2(0xe1,0xcd),
+
+#define to_Windows_31J_E7_9D WORDINDEX2INFO(22142)
+    to_Windows_31J_E7_9D_offsets,
+    to_Windows_31J_E7_9D_infos,
+
+#define to_Windows_31J_E7_A0_infos WORDINDEX2INFO(22144)
+           INVALID,         UNDEF, o2(0x8d,0xbb), o2(0xe1,0xe4),
+     o2(0xe1,0xe5), o2(0x8c,0xa4), o2(0x8d,0xd3), o2(0xe1,0xe7),
+     o2(0xfb,0x78), o2(0x93,0x75), o2(0x8d,0xd4), o2(0x8b,0x6d),
+     o2(0x96,0x43), o2(0x94,0x6a), o2(0x93,0x76), o2(0x8d,0x7b),
+
+#define to_Windows_31J_E7_A0 WORDINDEX2INFO(22160)
+    to_Windows_31J_E7_A0_offsets,
+    to_Windows_31J_E7_A0_infos,
+
+#define to_Windows_31J_E7_A1_infos WORDINDEX2INFO(22162)
+           INVALID,         UNDEF, o2(0xe1,0xe9), o2(0xfb,0x79),
+     o2(0x8f,0xc9), o2(0xfb,0x7a), o2(0x97,0xb0), o2(0x8d,0x64),
+     o2(0x8c,0xa5), o2(0x94,0xa1), o2(0xe1,0xeb), o2(0xfb,0x7b),
+     o2(0xe1,0xed),
+
+#define to_Windows_31J_E7_A1 WORDINDEX2INFO(22175)
+    to_Windows_31J_E7_A1_offsets,
+    to_Windows_31J_E7_A1_infos,
+
+#define to_Windows_31J_E7_A4_infos WORDINDEX2INFO(22177)
+           INVALID,         UNDEF, o2(0x8f,0xca), o2(0xe2,0x44),
+     o2(0x91,0x62), o2(0xe2,0x46), o2(0xe2,0x45), o2(0xe2,0x47),
+     o2(0xe1,0xe6), o2(0xe1,0xe8), o2(0xe2,0x49), o2(0xe2,0x48),
+     o2(0xfb,0x7c), o2(0x8e,0xa6), o2(0x97,0xe7), o2(0x8e,0xd0),
+
+#define to_Windows_31J_E7_A4 WORDINDEX2INFO(22193)
+    to_Windows_31J_E7_A4_offsets,
+    to_Windows_31J_E7_A4_infos,
+
+#define to_Windows_31J_E7_A6_infos WORDINDEX2INFO(22195)
+           INVALID, o2(0xe2,0x68), o2(0x8b,0xd6),         UNDEF,
+     o2(0x98,0x5c), o2(0x91,0x54), o2(0xe2,0x53), o2(0x89,0xd0),
+     o2(0x92,0xf5), o2(0x95,0x9f), o2(0xfb,0x81), o2(0xfb,0x83),
+     o2(0xe2,0x54), o2(0x8b,0x9a), o2(0xe2,0x55), o2(0xe2,0x57),
+     o2(0xe2,0x58), o2(0x94,0x48), o2(0xe2,0x59), o2(0xe2,0x5a),
+     o2(0xe2,0x5b), o2(0x8b,0xd7), o2(0x89,0xd1), o2(0x93,0xc3),
+
+#define to_Windows_31J_E7_A6 WORDINDEX2INFO(22219)
+    to_Windows_31J_E7_A6_offsets,
+    to_Windows_31J_E7_A6_infos,
+
+#define to_Windows_31J_E7_AB_infos WORDINDEX2INFO(22221)
+           INVALID,         UNDEF, o2(0x8a,0x96), o2(0xe2,0x82),
+     o2(0xe2,0x81), o2(0xe2,0x85), o2(0xe2,0x7d), o2(0xe2,0x86),
+     o2(0x97,0xa7), o2(0xe2,0x87), o2(0xe2,0x88), o2(0xfb,0x84),
+     o2(0x9a,0xf2), o2(0xe2,0x8a), o2(0xe2,0x89), o2(0xe2,0x8b),
+     o2(0xe2,0x8c), o2(0x97,0xb3), o2(0xe2,0x8d), o2(0xe8,0xed),
+     o2(0x8f,0xcd), o2(0xe2,0x8e), o2(0xe2,0x8f), o2(0x8f,0x76),
+     o2(0x93,0xb6), o2(0xe2,0x90), o2(0xfb,0x85), o2(0x92,0x47),
+     o2(0xfb,0x87), o2(0xe2,0x91), o2(0x92,0x5b), o2(0xe2,0x92),
+     o2(0x8b,0xa3), o2(0x99,0x5e), o2(0x92,0x7c), o2(0x8e,0xb1),
+     o2(0x8a,0xc6),
+
+#define to_Windows_31J_E7_AB WORDINDEX2INFO(22258)
+    to_Windows_31J_E7_AB_offsets,
+    to_Windows_31J_E7_AB_infos,
+
+#define to_Windows_31J_E7_AE_infos WORDINDEX2INFO(22260)
+           INVALID,         UNDEF, o2(0x95,0xcd), o2(0x89,0xd3),
+     o2(0xe2,0xb3), o2(0xe2,0xb0), o2(0xe2,0xb5), o2(0xe2,0xb4),
+     o2(0x94,0x93), o2(0x96,0xa5), o2(0x8e,0x5a), o2(0xe2,0xae),
+     o2(0xe2,0xb7), o2(0xe2,0xb2), o2(0xe2,0xb1), o2(0xe2,0xad),
+     o2(0xfb,0x88), o2(0xe2,0xaf), o2(0x8a,0xc7), o2(0x92,0x5c),
+     o2(0x90,0xfb), o2(0x94,0xa0), o2(0xe2,0xbc), o2(0x94,0xa2),
+
+#define to_Windows_31J_E7_AE WORDINDEX2INFO(22284)
+    to_Windows_31J_E7_AE_offsets,
+    to_Windows_31J_E7_AE_infos,
+
+#define to_Windows_31J_E7_B5_infos WORDINDEX2INFO(22286)
+           INVALID,         UNDEF, o2(0x8f,0x49), o2(0x8c,0xbc),
+     o2(0x91,0x67), o2(0xe3,0x44), o2(0xe3,0x4a), o2(0xfb,0x8a),
+     o2(0xe3,0x45), o2(0x8c,0x6f), o2(0xe3,0x4d), o2(0xe3,0x51),
+     o2(0x8c,0x8b), o2(0xe3,0x4c), o2(0xe3,0x55), o2(0xfb,0x8b),
+     o2(0x8d,0x69), o2(0x97,0x8d), o2(0x88,0xba), o2(0xe3,0x52),
+     o2(0x8b,0x8b), o2(0xe3,0x4f), o2(0xe3,0x50), o2(0x93,0x9d),
+     o2(0xe3,0x4e), o2(0xe3,0x4b), o2(0x8a,0x47), o2(0x90,0xe2),
+     o2(0x8c,0xa6), o2(0xe3,0x57),
+
+#define to_Windows_31J_E7_B5 WORDINDEX2INFO(22316)
+    to_Windows_31J_E7_B5_offsets,
+    to_Windows_31J_E7_B5_infos,
+
+#define to_Windows_31J_E7_B6_infos WORDINDEX2INFO(22318)
+           INVALID,         UNDEF, o2(0xe3,0x54), o2(0xe3,0x56),
+     o2(0xe3,0x53), o2(0x8c,0x70), o2(0x91,0xb1), o2(0xe3,0x58),
+     o2(0x91,0x8e), o2(0xe3,0x65), o2(0xfb,0x8d), o2(0xe3,0x61),
+     o2(0xe3,0x5b), o2(0xe3,0x5f), o2(0x8e,0xf8), o2(0x88,0xdb),
+     o2(0xe3,0x5a), o2(0xe3,0x62), o2(0xe3,0x66), o2(0x8d,0x6a),
+     o2(0x96,0xd4), o2(0x92,0xd4), o2(0xe3,0x5c), o2(0xfb,0x8c),
+     o2(0xe3,0x64), o2(0xe3,0x59), o2(0x92,0x5d), o2(0xe3,0x5e),
+     o2(0x88,0xbb), o2(0x96,0xc8),
+
+#define to_Windows_31J_E7_B6 WORDINDEX2INFO(22348)
+    to_Windows_31J_E7_B6_offsets,
+    to_Windows_31J_E7_B6_infos,
+
+#define to_Windows_31J_E7_B7_infos WORDINDEX2INFO(22350)
+           INVALID,         UNDEF, o2(0xe3,0x5d), o2(0x8b,0xd9),
+     o2(0x94,0xea), o2(0x91,0x8d), o2(0x97,0xce), o2(0x8f,0x8f),
+     o2(0xe3,0x8e), o2(0xfb,0x8e), o2(0xe3,0x67), o2(0x90,0xfc),
+     o2(0xe3,0x63), o2(0xe3,0x68), o2(0xe3,0x6a), o2(0x92,0xf7),
+     o2(0xe3,0x6d), o2(0xe3,0x69), o2(0x95,0xd2), o2(0x8a,0xc9),
+     o2(0x96,0xc9), o2(0x88,0xdc), o2(0xe3,0x6c), o2(0x97,0xfb),
+     o2(0xe3,0x6b),
+
+#define to_Windows_31J_E7_B7 WORDINDEX2INFO(22375)
+    to_Windows_31J_E7_B7_offsets,
+    to_Windows_31J_E7_B7_infos,
+
+#define to_Windows_31J_E7_B9_infos WORDINDEX2INFO(22377)
+           INVALID,         UNDEF, o2(0x94,0xc9), o2(0xe3,0x7d),
+     o2(0xe3,0x78), o2(0x91,0x40), o2(0x8c,0x71), o2(0x8f,0x4a),
+     o2(0xfb,0x8f), o2(0x90,0x44), o2(0x91,0x55), o2(0xe3,0x84),
+     o2(0xe3,0x86), o2(0xe3,0x87), o2(0xe3,0x83), o2(0xe3,0x85),
+     o2(0xe3,0x79), o2(0xe3,0x82), o2(0xe3,0x8a), o2(0xe3,0x89),
+     o2(0x96,0x9a), o2(0x8c,0x4a), o2(0xe3,0x88), o2(0xe3,0x8c),
+     o2(0xe3,0x8b), o2(0xe3,0x8f), o2(0xe3,0x91),
+
+#define to_Windows_31J_E7_B9 WORDINDEX2INFO(22404)
+    to_Windows_31J_E7_B9_offsets,
+    to_Windows_31J_E7_B9_infos,
+
+#define to_Windows_31J_E7_BA_infos WORDINDEX2INFO(22406)
+           INVALID,         UNDEF, o2(0x8e,0x5b), o2(0xe3,0x8d),
+     o2(0xe3,0x92), o2(0xe3,0x93), o2(0xfa,0x5c), o2(0xe3,0x94),
+     o2(0xe3,0x9a), o2(0x93,0x5a), o2(0xe3,0x96), o2(0xe3,0x95),
+     o2(0xe3,0x97), o2(0xe3,0x98), o2(0xe3,0x99), o2(0xe3,0x9b),
+     o2(0xe3,0x9c),
+
+#define to_Windows_31J_E7_BA WORDINDEX2INFO(22423)
+    to_Windows_31J_E7_BA_offsets,
+    to_Windows_31J_E7_BA_infos,
+
+#define to_Windows_31J_E7_BD_infos WORDINDEX2INFO(22425)
+           INVALID,         UNDEF, o2(0xe3,0x9f), o2(0xfb,0x90),
+     o2(0xe3,0xa0), o2(0xe3,0xa1), o2(0xe3,0xa2), o2(0xe3,0xa3),
+     o2(0xe3,0xa4), o2(0xe3,0xa6), o2(0xe3,0xa5), o2(0xe3,0xa7),
+     o2(0xe3,0xa8), o2(0xe3,0xa9), o2(0xe3,0xac), o2(0xe3,0xaa),
+     o2(0xe3,0xab), o2(0x8d,0xdf), o2(0x8c,0x72), o2(0x92,0x75),
+     o2(0x94,0xb1), o2(0x8f,0x90), o2(0x94,0x6c), o2(0x94,0xeb),
+     o2(0xe3,0xad), o2(0x9c,0xeb),
+
+#define to_Windows_31J_E7_BD WORDINDEX2INFO(22451)
+    to_Windows_31J_E7_BD_offsets,
+    to_Windows_31J_E7_BD_infos,
+
+#define to_Windows_31J_E7_BE_infos WORDINDEX2INFO(22453)
+           INVALID,         UNDEF, o2(0xe3,0xae), o2(0xe3,0xb0),
+     o2(0x97,0x85), o2(0xe3,0xaf), o2(0xe3,0xb2), o2(0xe3,0xb1),
+     o2(0x97,0x72), o2(0xe3,0xb3), o2(0x94,0xfc), o2(0xe3,0xb4),
+     o2(0xe3,0xb7), o2(0xe3,0xb6), o2(0xe3,0xb5), o2(0xfb,0x91),
+     o2(0xe3,0xb8), o2(0x8c,0x51), o2(0x91,0x41), o2(0x8b,0x60),
+     o2(0xe3,0xbc), o2(0xe3,0xb9), o2(0xe3,0xba), o2(0xe3,0xbd),
+     o2(0xe3,0xbe), o2(0xe3,0xbb), o2(0x89,0x48),
+
+#define to_Windows_31J_E7_BE WORDINDEX2INFO(22480)
+    to_Windows_31J_E7_BE_offsets,
+    to_Windows_31J_E7_BE_infos,
+
+#define to_Windows_31J_E7_infos WORDINDEX2INFO(22482)
+                  INVALID, to_Windows_31J_E7_80,
+       to_Shift_JIS_E7_81, to_Windows_31J_E7_82,
+       to_Shift_JIS_E7_83, to_Windows_31J_E7_84,
+     to_Windows_31J_E7_85,   to_Shift_JIS_E7_86,
+     to_Windows_31J_E7_87,   to_Shift_JIS_E7_88,
+       to_Shift_JIS_E7_89, to_Windows_31J_E7_8A,
+       to_Shift_JIS_E7_8B, to_Windows_31J_E7_8C,
+     to_Windows_31J_E7_8D, to_Windows_31J_E7_8E,
+     to_Windows_31J_E7_8F, to_Windows_31J_E7_90,
+     to_Windows_31J_E7_91, to_Windows_31J_E7_92,
+       to_Shift_JIS_E7_93, to_Windows_31J_E7_94,
+     to_Windows_31J_E7_95,   to_Shift_JIS_E7_96,
+       to_Shift_JIS_E7_97,   to_Shift_JIS_E7_98,
+       to_Shift_JIS_E7_99, to_Windows_31J_E7_9A,
+       to_Shift_JIS_E7_9B,   to_Shift_JIS_E7_9C,
+     to_Windows_31J_E7_9D,   to_Shift_JIS_E7_9E,
+       to_Shift_JIS_E7_9F, to_Windows_31J_E7_A0,
+     to_Windows_31J_E7_A1,   to_Shift_JIS_E7_A2,
+       to_Shift_JIS_E7_A3, to_Windows_31J_E7_A4,
+       to_Shift_JIS_E7_A5, to_Windows_31J_E7_A6,
+       to_Shift_JIS_E7_A7,   to_Shift_JIS_E7_A8,
+       to_Shift_JIS_E7_A9,   to_Shift_JIS_E7_AA,
+     to_Windows_31J_E7_AB,   to_Shift_JIS_E7_AC,
+       to_Shift_JIS_E7_AD, to_Windows_31J_E7_AE,
+       to_Shift_JIS_E7_AF,   to_Shift_JIS_E7_B0,
+       to_Shift_JIS_E7_B1,   to_Shift_JIS_E7_B2,
+       to_Shift_JIS_E7_B3,   to_Shift_JIS_E7_B4,
+     to_Windows_31J_E7_B5, to_Windows_31J_E7_B6,
+     to_Windows_31J_E7_B7,   to_Shift_JIS_E7_B8,
+     to_Windows_31J_E7_B9, to_Windows_31J_E7_BA,
+          to_Shift_JIS_C4,   to_Shift_JIS_E7_BC,
+     to_Windows_31J_E7_BD, to_Windows_31J_E7_BE,
+       to_Shift_JIS_E7_BF,
+
+#define to_Windows_31J_E7 WORDINDEX2INFO(22547)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_E7_infos,
+
+#define to_Windows_31J_E8_8C_infos WORDINDEX2INFO(22549)
+           INVALID,         UNDEF, o2(0xfb,0x93), o2(0x96,0xce),
+     o2(0xe4,0x97), o2(0x89,0xd6), o2(0x8a,0x9d), o2(0xe4,0x9b),
+     o2(0xe4,0x9d), o2(0x8c,0x73), o2(0xe4,0xa1), o2(0xe4,0xaa),
+     o2(0xe4,0xab), o2(0x88,0xa9), o2(0xe4,0xb2), o2(0x88,0xef),
+     o2(0xe4,0xa9), o2(0xe4,0xa8), o2(0xe4,0xa3), o2(0xe4,0xa2),
+     o2(0xe4,0xa0), o2(0xe4,0x9f), o2(0x92,0x83), o2(0x91,0xf9),
+     o2(0xe4,0xa5),
+
+#define to_Windows_31J_E8_8C WORDINDEX2INFO(22574)
+    to_Windows_31J_E8_8C_offsets,
+    to_Windows_31J_E8_8C_infos,
+
+#define to_Windows_31J_E8_8D_infos WORDINDEX2INFO(22576)
+           INVALID, o2(0xe4,0xa4),         UNDEF, o2(0xe4,0xa7),
+     o2(0x91,0x90), o2(0x8c,0x74), o2(0x89,0x60), o2(0xe4,0xa6),
+     o2(0x8d,0x72), o2(0x91,0x91), o2(0xfb,0x94), o2(0xe4,0xb8),
+     o2(0xe4,0xb9), o2(0x89,0xd7), o2(0x89,0xac), o2(0xe4,0xb6),
+     o2(0xfb,0x95),
+
+#define to_Windows_31J_E8_8D WORDINDEX2INFO(22593)
+    to_Windows_31J_E8_8D_offsets,
+    to_Windows_31J_E8_8D_infos,
+
+#define to_Windows_31J_E8_8F_infos WORDINDEX2INFO(22595)
+           INVALID,         UNDEF, o2(0xe4,0xc5), o2(0x90,0x9b),
+     o2(0xfb,0x96), o2(0x8b,0x65), o2(0x8b,0xdb), o2(0xe4,0xc0),
+     o2(0x89,0xd9), o2(0x8f,0xd2), o2(0xe4,0xc3), o2(0x8d,0xd8),
+     o2(0x93,0x70), o2(0xe4,0xc8), o2(0x95,0xec), o2(0xe4,0xbf),
+     o2(0x89,0xd8), o2(0x8c,0xd4), o2(0x95,0x48), o2(0xe4,0xc9),
+     o2(0xe4,0xbd), o2(0xfb,0x97), o2(0xe4,0xc6), o2(0xe4,0xd0),
+     o2(0xe4,0xc1),
+
+#define to_Windows_31J_E8_8F WORDINDEX2INFO(22620)
+    to_Windows_31J_E8_8F_offsets,
+    to_Windows_31J_E8_8F_infos,
+
+#define to_Windows_31J_E8_91_infos WORDINDEX2INFO(22622)
+           INVALID,         UNDEF, o2(0xe4,0xdc), o2(0xfb,0x98),
+     o2(0x97,0x74), o2(0x97,0xa8), o2(0x92,0x98), o2(0x8a,0x8b),
+     o2(0x95,0x92), o2(0xe4,0xe2), o2(0x93,0x9f), o2(0x88,0xaf),
+     o2(0xe4,0xdb), o2(0xe4,0xd7), o2(0x91,0x92), o2(0xe4,0xd1),
+     o2(0xe4,0xd9), o2(0xe4,0xde), o2(0x94,0x4b), o2(0x88,0xa8),
+     o2(0xe4,0xd6), o2(0xe4,0xdf), o2(0x95,0x98),
+
+#define to_Windows_31J_E8_91 WORDINDEX2INFO(22645)
+    to_Windows_31J_E8_91_offsets,
+    to_Windows_31J_E8_91_infos,
+
+#define to_Windows_31J_E8_92_infos WORDINDEX2INFO(22647)
+           INVALID,         UNDEF, o2(0xe4,0xda), o2(0xe4,0xd5),
+     o2(0x8f,0xd3), o2(0x8f,0x4e), o2(0x8e,0xaa), o2(0x96,0xd6),
+     o2(0x95,0x66), o2(0xe4,0xe5), o2(0xe4,0xee), o2(0xe4,0xd8),
+     o2(0x8a,0x97), o2(0xfb,0x99), o2(0x8f,0xf6), o2(0xe4,0xe3),
+     o2(0xe4,0xe8), o2(0x91,0x93), o2(0xe4,0xe4),
+
+#define to_Windows_31J_E8_92 WORDINDEX2INFO(22666)
+    to_Windows_31J_E8_92_offsets,
+    to_Windows_31J_E8_92_infos,
+
+#define to_Windows_31J_E8_93_infos WORDINDEX2INFO(22668)
+           INVALID,         UNDEF, o2(0xe4,0xeb), o2(0x92,0x7e),
+     o2(0xe4,0xec), o2(0x97,0x75), o2(0xe4,0xe1), o2(0x8a,0x57),
+     o2(0xe4,0xe7), o2(0xe4,0xea), o2(0x96,0xaa), o2(0xe4,0xed),
+     o2(0xe4,0xe6), o2(0xe4,0xe9), o2(0xfa,0x60), o2(0x96,0x48),
+     o2(0x98,0x40), o2(0xe4,0xf1), o2(0xe4,0xf8), o2(0xe4,0xf0),
+
+#define to_Windows_31J_E8_93 WORDINDEX2INFO(22688)
+    to_Windows_31J_E8_93_offsets,
+    to_Windows_31J_E8_93_infos,
+
+#define to_Windows_31J_E8_95_infos WORDINDEX2INFO(22690)
+           INVALID, o2(0xe4,0xf9), o2(0xe5,0x40),         UNDEF,
+     o2(0x94,0xd7), o2(0xe4,0xfc), o2(0x8f,0xd4), o2(0x8e,0xc7),
+     o2(0xe5,0x42), o2(0x8b,0xbc), o2(0xfb,0x9a), o2(0xe5,0x43),
+     o2(0x95,0x99), o2(0xe4,0xfb), o2(0xfb,0x9b), o2(0xe4,0xd4),
+     o2(0xe4,0xfa), o2(0x98,0x6e), o2(0x93,0xa0), o2(0x95,0x93),
+     o2(0xfb,0x9c), o2(0xe5,0x4a), o2(0xe5,0x50), o2(0xe5,0x51),
+
+#define to_Windows_31J_E8_95 WORDINDEX2INFO(22714)
+    to_Windows_31J_E8_95_offsets,
+    to_Windows_31J_E8_95_infos,
+
+#define to_Windows_31J_E8_96_infos WORDINDEX2INFO(22716)
+           INVALID, o2(0xe5,0x44),         UNDEF, o2(0x94,0x96),
+     o2(0xe5,0x4e), o2(0xe5,0x46), o2(0xe5,0x48), o2(0xe5,0x52),
+     o2(0xe5,0x47), o2(0xe5,0x4b), o2(0x89,0x92), o2(0x93,0xe3),
+     o2(0xe5,0x4c), o2(0xe5,0x4f), o2(0xe5,0x45), o2(0x91,0x45),
+     o2(0xe5,0x49), o2(0x8e,0x46), o2(0x90,0x64), o2(0x8c,0x4f),
+     o2(0x96,0xf2), o2(0x96,0xf7), o2(0x8f,0x92), o2(0xfb,0x9e),
+     o2(0xe5,0x56), o2(0xe5,0x54),
+
+#define to_Windows_31J_E8_96 WORDINDEX2INFO(22742)
+    to_Windows_31J_E8_96_offsets,
+    to_Windows_31J_E8_96_infos,
+
+#define to_Windows_31J_E8_A0_infos WORDINDEX2INFO(22744)
+           INVALID,         UNDEF, o2(0xe5,0xa2), o2(0xfb,0xa1),
+     o2(0xe5,0xb6), o2(0xe5,0xba), o2(0xe5,0xb5), o2(0xe5,0xbc),
+     o2(0xe5,0xbe), o2(0xe5,0xbd), o2(0xe5,0xc0), o2(0xe5,0xbf),
+     o2(0xe5,0x79), o2(0xe5,0xc4), o2(0xe5,0xc1), o2(0xe5,0xc2),
+     o2(0xe5,0xc3), o2(0xe5,0xc5),
+
+#define to_Windows_31J_E8_A0 WORDINDEX2INFO(22762)
+    to_Windows_31J_E8_A0_offsets,
+    to_Windows_31J_E8_A0_infos,
+
+#define to_Windows_31J_E8_A3_infos WORDINDEX2INFO(22764)
+           INVALID,         UNDEF, o2(0x8d,0xd9), o2(0x97,0xf4),
+     o2(0xe5,0xdf), o2(0xe5,0xe0), o2(0x91,0x95), o2(0x97,0xa0),
+     o2(0xe5,0xe1), o2(0x97,0x54), o2(0xe5,0xe2), o2(0xe5,0xe3),
+     o2(0x95,0xe2), o2(0xe5,0xe4), o2(0x8d,0xbe), o2(0x97,0xa1),
+     o2(0xe5,0xe9), o2(0xe5,0xea), o2(0x8f,0xd6), o2(0xe5,0xe8),
+     o2(0xfb,0xa2), o2(0x97,0x87), o2(0xe5,0xe5), o2(0xe5,0xe7),
+     o2(0x90,0xbb), o2(0x90,0x9e),
+
+#define to_Windows_31J_E8_A3 WORDINDEX2INFO(22790)
+    to_Windows_31J_E8_A3_offsets,
+    to_Windows_31J_E8_A3_infos,
+
+#define to_Windows_31J_E8_A4_infos WORDINDEX2INFO(22792)
+           INVALID,         UNDEF, o2(0xe5,0xe6), o2(0xe5,0xeb),
+     o2(0x95,0xa1), o2(0xe5,0xed), o2(0xe5,0xec), o2(0x8a,0x8c),
+     o2(0x96,0x4a), o2(0xe5,0xee), o2(0xfa,0x5d), o2(0xe5,0xfa),
+     o2(0xe5,0xf0), o2(0xe5,0xf1), o2(0xe5,0xf2), o2(0xe5,0xf3),
+     o2(0xe5,0xf7), o2(0xe5,0xf8), o2(0xe5,0xf6),
+
+#define to_Windows_31J_E8_A4 WORDINDEX2INFO(22811)
+    to_Windows_31J_E8_A4_offsets,
+    to_Windows_31J_E8_A4_infos,
+
+#define to_Windows_31J_E8_A8_infos WORDINDEX2INFO(22813)
+           INVALID, o2(0x8c,0xbe),         UNDEF, o2(0x92,0xf9),
+     o2(0xe6,0x5d), o2(0x8c,0x76), o2(0x90,0x75), o2(0xe6,0x60),
+     o2(0x93,0xa2), o2(0xe6,0x5f), o2(0xfb,0xa3), o2(0x8c,0x50),
+     o2(0xe6,0x5e), o2(0x91,0xf5), o2(0x8b,0x4c), o2(0xe6,0x61),
+     o2(0xe6,0x62), o2(0x8f,0xd7), o2(0x8c,0x8d), o2(0xe6,0x63),
+     o2(0x96,0x4b), o2(0x90,0xdd), o2(0x8b,0x96), o2(0x96,0xf3),
+     o2(0x91,0x69), o2(0xe6,0x64), o2(0xfb,0xa4), o2(0x90,0x66),
+     o2(0x92,0x90), o2(0x8f,0xd8),
+
+#define to_Windows_31J_E8_A8 WORDINDEX2INFO(22843)
+    to_Windows_31J_E8_A8_offsets,
+    to_Windows_31J_E8_A8_infos,
+
+#define to_Windows_31J_E8_A9_infos WORDINDEX2INFO(22845)
+           INVALID,         UNDEF, o2(0xe6,0x65), o2(0xe6,0x68),
+     o2(0xe6,0x69), o2(0x8d,0xbc), o2(0x91,0xc0), o2(0xe6,0x67),
+     o2(0x8f,0xd9), o2(0x95,0x5d), o2(0xe6,0x66), o2(0x8e,0x8c),
+     o2(0x89,0x72), o2(0xe6,0x6d), o2(0x8c,0x77), o2(0x8e,0x8e),
+     o2(0x8e,0x8d), o2(0x98,0x6c), o2(0xe6,0x6c), o2(0xe6,0x6b),
+     o2(0x91,0x46), o2(0x8b,0x6c), o2(0x98,0x62), o2(0x8a,0x59),
+     o2(0x8f,0xda), o2(0xfb,0xa5), o2(0xe6,0x6a),
+
+#define to_Windows_31J_E8_A9 WORDINDEX2INFO(22872)
+    to_Windows_31J_E8_A9_offsets,
+    to_Windows_31J_E8_A9_infos,
+
+#define to_Windows_31J_E8_AA_infos WORDINDEX2INFO(22874)
+           INVALID,         UNDEF, o2(0xe6,0x6f), o2(0xe6,0x70),
+     o2(0xe6,0x6e), o2(0x8c,0xd6), o2(0x97,0x5f), o2(0x8e,0x8f),
+     o2(0x94,0x46), o2(0xe6,0x73), o2(0x90,0xbe), o2(0x92,0x61),
+     o2(0x97,0x55), o2(0xe6,0x76), o2(0x8c,0xea), o2(0x90,0xbd),
+     o2(0xe6,0x72), o2(0xe6,0x77), o2(0x8c,0xeb), o2(0xe6,0x74),
+     o2(0xe6,0x75), o2(0xfb,0xa6), o2(0xe6,0x71), o2(0x90,0xe0),
+     o2(0x93,0xc7), o2(0x92,0x4e), o2(0x89,0xdb), o2(0x94,0xee),
+     o2(0x8b,0x62), o2(0xfb,0xa7), o2(0x92,0xb2),
+
+#define to_Windows_31J_E8_AA WORDINDEX2INFO(22905)
+    to_Windows_31J_E8_AA_offsets,
+    to_Windows_31J_E8_AA_infos,
+
+#define to_Windows_31J_E8_AB_infos WORDINDEX2INFO(22907)
+           INVALID,         UNDEF, o2(0xe6,0x7a), o2(0xe6,0x78),
+     o2(0x92,0x6b), o2(0x90,0xbf), o2(0x8a,0xd0), o2(0xe6,0x79),
+     o2(0x90,0x7a), o2(0x97,0xc8), o2(0x98,0x5f), o2(0xe6,0x7b),
+     o2(0xe6,0x87), o2(0x92,0xb3), o2(0xe6,0x86), o2(0xfb,0xa8),
+     o2(0xe6,0x83), o2(0xe6,0x8b), o2(0xe6,0x84), o2(0xe6,0x80),
+     o2(0x92,0xfa), o2(0xe6,0x7e), o2(0xe6,0x7c), o2(0x97,0x40),
+     o2(0x8e,0x90), o2(0xe6,0x81), o2(0xe6,0x7d), o2(0xfb,0xaa),
+     o2(0xe6,0x85), o2(0x8f,0x94), o2(0x8c,0xbf), o2(0x91,0xf8),
+
+#define to_Windows_31J_E8_AB WORDINDEX2INFO(22939)
+    to_Windows_31J_E8_AB_offsets,
+    to_Windows_31J_E8_AB_infos,
+
+#define to_Windows_31J_E8_AD_infos WORDINDEX2INFO(22941)
+           INVALID,         UNDEF, o2(0xe6,0x96), o2(0xe6,0x9a),
+     o2(0xe6,0x97), o2(0xe6,0x99), o2(0xe6,0x98), o2(0xfb,0xab),
+     o2(0xe6,0x9b), o2(0x8e,0xaf), o2(0xe6,0x9d), o2(0xe6,0x9c),
+     o2(0x95,0x88), o2(0xe6,0x9f), o2(0x8c,0x78), o2(0xe6,0x9e),
+     o2(0xe6,0xa0), o2(0xe6,0xa1), o2(0x8b,0x63), o2(0xe3,0xbf),
+     o2(0x8f,0xf7), o2(0xe6,0xa2), o2(0x8c,0xec), o2(0xe6,0xa3),
+     o2(0xfb,0xac),
+
+#define to_Windows_31J_E8_AD WORDINDEX2INFO(22966)
+    to_Windows_31J_E8_AD_offsets,
+    to_Windows_31J_E8_AD_infos,
+
+#define to_Windows_31J_E8_B3_infos WORDINDEX2INFO(22968)
+           INVALID, o2(0x89,0xea), o2(0xe6,0xca), o2(0x98,0x47),
+     o2(0x92,0xc0), o2(0x98,0x64),         UNDEF, o2(0x8e,0x91),
+     o2(0xe6,0xc9), o2(0x91,0xaf), o2(0xe6,0xda), o2(0x91,0x47),
+     o2(0x93,0xf6), o2(0x95,0x6f), o2(0xe6,0xcd), o2(0x8e,0x5e),
+     o2(0x8e,0x92), o2(0x8f,0xdc), o2(0x94,0x85), o2(0x8c,0xab),
+     o2(0xe6,0xcc), o2(0xe6,0xcb), o2(0x95,0x8a), o2(0x8e,0xbf),
+     o2(0x93,0x71), o2(0xfb,0xad), o2(0xfb,0xae), o2(0xe6,0xcf),
+     o2(0xe6,0xd0), o2(0x8d,0x77), o2(0xe6,0xce),
+
+#define to_Windows_31J_E8_B3 WORDINDEX2INFO(22999)
+    to_Windows_31J_E8_B3_offsets,
+    to_Windows_31J_E8_B3_infos,
+
+#define to_Windows_31J_E8_B4_infos WORDINDEX2INFO(23001)
+           INVALID,         UNDEF, o2(0xe6,0xd1), o2(0xe6,0xd2),
+     o2(0xe6,0xd4), o2(0x91,0xa1), o2(0xe6,0xd3), o2(0x8a,0xe4),
+     o2(0xe6,0xd6), o2(0xe6,0xd5), o2(0xe6,0xd7), o2(0xfb,0xaf),
+     o2(0xe6,0xd9), o2(0xe6,0xdb), o2(0xe6,0xdc),
+
+#define to_Windows_31J_E8_B4 WORDINDEX2INFO(23016)
+    to_Windows_31J_E8_B4_offsets,
+    to_Windows_31J_E8_B4_infos,
+
+#define to_Windows_31J_E8_B5_infos WORDINDEX2INFO(23018)
+           INVALID,         UNDEF, o2(0x90,0xd4), o2(0x8e,0xcd),
+     o2(0xe6,0xdd), o2(0x8a,0x71), o2(0xe6,0xde), o2(0x91,0x96),
+     o2(0xe6,0xdf), o2(0xe6,0xe0), o2(0x95,0x8b), o2(0xfb,0xb0),
+     o2(0x8b,0x4e),
+
+#define to_Windows_31J_E8_B5 WORDINDEX2INFO(23031)
+    to_Windows_31J_E8_B5_offsets,
+    to_Windows_31J_E8_B5_infos,
+
+#define to_Windows_31J_E8_BB_infos WORDINDEX2INFO(23033)
+           INVALID,         UNDEF, o2(0xe7,0x5f), o2(0xe7,0x5c),
+     o2(0xe7,0x60), o2(0x8e,0xd4), o2(0xe7,0x61), o2(0x8b,0x4f),
+     o2(0x8c,0x52), o2(0xfb,0xb2), o2(0x8c,0xac), o2(0xe7,0x62),
+     o2(0x93,0xee), o2(0x93,0x5d), o2(0xe7,0x63), o2(0xe7,0x66),
+     o2(0x8e,0xb2), o2(0xe7,0x65), o2(0xe7,0x64), o2(0x8c,0x79),
+     o2(0xe7,0x67),
+
+#define to_Windows_31J_E8_BB WORDINDEX2INFO(23054)
+    to_Windows_31J_E8_BB_offsets,
+    to_Windows_31J_E8_BB_infos,
+
+#define to_Windows_31J_E8_infos WORDINDEX2INFO(23056)
+                  INVALID,   to_Shift_JIS_E8_80,
+       to_Shift_JIS_E8_81,   to_Shift_JIS_E8_82,
+       to_Shift_JIS_E8_83,   to_Shift_JIS_E8_84,
+       to_Shift_JIS_E8_85,   to_Shift_JIS_E8_86,
+       to_Shift_JIS_E8_87,   to_Shift_JIS_E8_88,
+       to_Shift_JIS_E8_89,   to_Shift_JIS_E8_8A,
+       to_Shift_JIS_E8_8B, to_Windows_31J_E8_8C,
+     to_Windows_31J_E8_8D,   to_Shift_JIS_E8_8E,
+     to_Windows_31J_E8_8F,   to_Shift_JIS_E8_90,
+     to_Windows_31J_E8_91, to_Windows_31J_E8_92,
+     to_Windows_31J_E8_93,   to_Shift_JIS_E8_94,
+     to_Windows_31J_E8_95, to_Windows_31J_E8_96,
+       to_Shift_JIS_E8_97,   to_Shift_JIS_E8_98,
+       to_Shift_JIS_E8_99,   to_Shift_JIS_E8_9A,
+       to_Shift_JIS_E8_9B,   to_Shift_JIS_E8_9C,
+       to_Shift_JIS_E8_9D,   to_Shift_JIS_E8_9E,
+       to_Shift_JIS_E8_9F, to_Windows_31J_E8_A0,
+       to_Shift_JIS_E8_A1,   to_Shift_JIS_E8_A2,
+     to_Windows_31J_E8_A3, to_Windows_31J_E8_A4,
+       to_Shift_JIS_E8_A5,   to_Shift_JIS_E8_A6,
+       to_Shift_JIS_E8_A7, to_Windows_31J_E8_A8,
+     to_Windows_31J_E8_A9, to_Windows_31J_E8_AA,
+     to_Windows_31J_E8_AB,   to_Shift_JIS_E8_AC,
+     to_Windows_31J_E8_AD,   to_Shift_JIS_E8_AE,
+          to_Shift_JIS_C4,   to_Shift_JIS_E8_B0,
+       to_Shift_JIS_E8_B1,   to_Shift_JIS_E8_B2,
+     to_Windows_31J_E8_B3, to_Windows_31J_E8_B4,
+     to_Windows_31J_E8_B5,   to_Shift_JIS_E8_B6,
+       to_Shift_JIS_E8_B7,   to_Shift_JIS_E8_B8,
+       to_Shift_JIS_E8_B9,   to_Shift_JIS_E8_BA,
+     to_Windows_31J_E8_BB,   to_Shift_JIS_E8_BC,
+       to_Shift_JIS_E8_BD,   to_Shift_JIS_E8_BE,
+       to_Shift_JIS_E8_BF,
+
+#define to_Windows_31J_E8 WORDINDEX2INFO(23121)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_E8_infos,
+
+#define to_Windows_31J_E9_81_infos WORDINDEX2INFO(23123)
+           INVALID,         UNDEF, o2(0x93,0xd9), o2(0x90,0x8b),
+     o2(0x92,0x78), o2(0x8b,0xf6), o2(0xe7,0xa4), o2(0x97,0x56),
+     o2(0x89,0x5e), o2(0x95,0xd5), o2(0x89,0xdf), o2(0xe7,0x9f),
+     o2(0xe7,0xa0), o2(0xe7,0xa1), o2(0xe7,0xa2), o2(0x93,0xb9),
+     o2(0x92,0x42), o2(0x88,0xe1), o2(0xe7,0xa6), o2(0xe7,0xa7),
+     o2(0xea,0xa1), o2(0x91,0xbb), o2(0xe7,0xa8), o2(0x89,0x93),
+     o2(0x91,0x6b), o2(0x8c,0xad), o2(0x97,0x79), o2(0xfb,0xb5),
+     o2(0xe7,0xa9), o2(0x93,0x4b), o2(0x91,0x98), o2(0x8e,0xd5),
+     o2(0xe7,0xaa), o2(0xe7,0xad), o2(0x8f,0x85), o2(0xe7,0xab),
+     o2(0x91,0x4a), o2(0x91,0x49), o2(0x88,0xe2), o2(0x97,0xc9),
+     o2(0xe7,0xaf), o2(0x94,0xf0),
+
+#define to_Windows_31J_E9_81 WORDINDEX2INFO(23165)
+    to_Windows_31J_E9_81_offsets,
+    to_Windows_31J_E9_81_infos,
+
+#define to_Windows_31J_E9_83_infos WORDINDEX2INFO(23167)
+           INVALID,         UNDEF, o2(0x88,0xe8), o2(0x8d,0x78),
+     o2(0x98,0x59), o2(0xe7,0xbc), o2(0xfb,0xb6), o2(0x8c,0x53),
+     o2(0xe7,0xb9), o2(0xe7,0xba), o2(0x95,0x94), o2(0x8a,0x73),
+     o2(0x97,0x58), o2(0x8b,0xbd), o2(0x93,0x73),
+
+#define to_Windows_31J_E9_83 WORDINDEX2INFO(23182)
+    to_Windows_31J_E9_83_offsets,
+    to_Windows_31J_E9_83_infos,
+
+#define to_Windows_31J_E9_84_infos WORDINDEX2INFO(23184)
+           INVALID,         UNDEF, o2(0xe7,0xbd), o2(0xe7,0xbe),
+     o2(0xfb,0xb8), o2(0xe7,0xbf), o2(0xfb,0xb9), o2(0x93,0x41),
+     o2(0xe7,0xc1), o2(0xe7,0xc0),
+
+#define to_Windows_31J_E9_84 WORDINDEX2INFO(23194)
+    to_Windows_31J_E9_84_offsets,
+    to_Windows_31J_E9_84_infos,
+
+#define to_Windows_31J_E9_87_infos WORDINDEX2INFO(23196)
+           INVALID, o2(0xe7,0xd4), o2(0xe7,0xd5),         UNDEF,
+     o2(0x94,0xce), o2(0x8d,0xd1), o2(0x8e,0xdf), o2(0xe7,0xd6),
+     o2(0xe7,0xd7), o2(0x97,0xa2), o2(0x8f,0x64), o2(0x96,0xec),
+     o2(0x97,0xca), o2(0xe7,0xd8), o2(0x8b,0xe0), o2(0xe7,0xd9),
+     o2(0xfb,0xbb), o2(0x93,0x42), o2(0xfb,0xba), o2(0xe7,0xdc),
+     o2(0x8a,0x98), o2(0x90,0x6a), o2(0xfb,0xbc), o2(0xe7,0xda),
+     o2(0xe7,0xdb), o2(0x92,0xde), o2(0xfb,0xbf), o2(0xfb,0xc0),
+     o2(0x96,0x74), o2(0x8b,0xfa), o2(0xfb,0xbd), o2(0xfb,0xbe),
+     o2(0xe7,0xde), o2(0xe7,0xdf), o2(0xe7,0xdd), o2(0xe7,0xe1),
+
+#define to_Windows_31J_E9_87 WORDINDEX2INFO(23232)
+    to_Windows_31J_E9_87_offsets,
+    to_Windows_31J_E9_87_infos,
+
+#define to_Windows_31J_E9_88_infos WORDINDEX2INFO(23234)
+           INVALID,         UNDEF, o2(0xfb,0xc1), o2(0xfb,0xc3),
+     o2(0x93,0xdd), o2(0x8a,0x62), o2(0xfb,0xc2), o2(0xe7,0xe5),
+     o2(0xe7,0xe2), o2(0xe7,0xe4), o2(0xe7,0xe0), o2(0xe8,0x6e),
+     o2(0xe7,0xe3), o2(0x97,0xe9), o2(0x8c,0xd8), o2(0xfb,0xca),
+     o2(0xfb,0xc4), o2(0xfb,0xc6), o2(0xe7,0xed),
+
+#define to_Windows_31J_E9_88 WORDINDEX2INFO(23253)
+    to_Windows_31J_E9_88_offsets,
+    to_Windows_31J_E9_88_infos,
+
+#define to_Windows_31J_E9_89_infos WORDINDEX2INFO(23255)
+           INVALID, o2(0xfb,0xc5),         UNDEF, o2(0x93,0x53),
+     o2(0xe7,0xe8), o2(0xe7,0xeb), o2(0xe7,0xe9), o2(0xe7,0xee),
+     o2(0xfb,0xc7), o2(0xe7,0xef), o2(0xfb,0xc9), o2(0xe7,0xe7),
+     o2(0xfb,0xc8), o2(0xe7,0xf4), o2(0x89,0x94), o2(0xe7,0xe6),
+     o2(0x94,0xab), o2(0xe7,0xea), o2(0x8f,0xde), o2(0xfb,0xcb),
+     o2(0x8d,0x7a), o2(0xfb,0xcd), o2(0xfb,0xce), o2(0x96,0x67),
+
+#define to_Windows_31J_E9_89 WORDINDEX2INFO(23279)
+    to_Windows_31J_E9_89_offsets,
+    to_Windows_31J_E9_89_infos,
+
+#define to_Windows_31J_E9_8A_infos WORDINDEX2INFO(23281)
+           INVALID, o2(0x8b,0xe2),         UNDEF, o2(0x8f,0x65),
+     o2(0x93,0xba), o2(0xfa,0x5f), o2(0x91,0x4c), o2(0xe7,0xf2),
+     o2(0xe7,0xec), o2(0xe7,0xf1), o2(0x96,0xc1), o2(0x92,0xb6),
+     o2(0xe7,0xf3), o2(0xe7,0xf0), o2(0xfb,0xcc), o2(0x91,0x4b),
+     o2(0xe7,0xf7), o2(0xe7,0xf6),
+
+#define to_Windows_31J_E9_8A WORDINDEX2INFO(23299)
+    to_Windows_31J_E9_8A_offsets,
+    to_Windows_31J_E9_8A_infos,
+
+#define to_Windows_31J_E9_8B_infos WORDINDEX2INFO(23301)
+           INVALID,         UNDEF, o2(0xe7,0xf5), o2(0xfb,0xd2),
+     o2(0x96,0x4e), o2(0xfb,0xd6), o2(0xfb,0xd4), o2(0xfb,0xd0),
+     o2(0xfb,0xd1), o2(0xfb,0xd5), o2(0x8f,0x9b), o2(0xfb,0xcf),
+     o2(0xe7,0xf8), o2(0x95,0xdd), o2(0x89,0x73), o2(0x95,0x65),
+     o2(0x92,0x92), o2(0x8b,0x98), o2(0xfa,0x65), o2(0xe7,0xfa),
+     o2(0xfb,0xd9), o2(0x8d,0x7c), o2(0xfb,0xdc),
+
+#define to_Windows_31J_E9_8B WORDINDEX2INFO(23324)
+    to_Windows_31J_E9_8B_offsets,
+    to_Windows_31J_E9_8B_infos,
+
+#define to_Windows_31J_E9_8C_infos WORDINDEX2INFO(23326)
+           INVALID,         UNDEF, o2(0xfb,0xde), o2(0x8e,0x4b),
+     o2(0xe7,0xf9), o2(0x90,0x8d), o2(0x90,0x8e), o2(0xe8,0x40),
+     o2(0xe8,0x42), o2(0xfb,0xdd), o2(0xfb,0xdb), o2(0x8f,0xf9),
+     o2(0xfb,0xd8), o2(0xe8,0x41), o2(0xe8,0x43), o2(0xfb,0xd7),
+     o2(0x8b,0xd1), o2(0x95,0x64), o2(0x8e,0xe0), o2(0x98,0x42),
+     o2(0xe7,0xfc), o2(0x8d,0xf6), o2(0x98,0x5e), o2(0xe8,0x45),
+     o2(0xe8,0x44), o2(0xe8,0x46),
+
+#define to_Windows_31J_E9_8C WORDINDEX2INFO(23352)
+    to_Windows_31J_E9_8C_offsets,
+    to_Windows_31J_E9_8C_infos,
+
+#define to_Windows_31J_E9_8D_infos WORDINDEX2INFO(23354)
+           INVALID,         UNDEF, o2(0xe7,0xfb), o2(0xfa,0x5e),
+     o2(0x93,0xe7), o2(0x93,0x74), o2(0x92,0xd5), o2(0xe8,0x4b),
+     o2(0xfb,0xe0), o2(0x92,0x62), o2(0xe8,0x47), o2(0xe8,0x48),
+     o2(0x8c,0x4c), o2(0xe8,0x4a), o2(0xfb,0xdf), o2(0x8c,0xae),
+     o2(0xe8,0x49), o2(0x8f,0xdf),
+
+#define to_Windows_31J_E9_8D WORDINDEX2INFO(23372)
+    to_Windows_31J_E9_8D_offsets,
+    to_Windows_31J_E9_8D_infos,
+
+#define to_Windows_31J_E9_8E_infos WORDINDEX2INFO(23374)
+           INVALID,         UNDEF, o2(0x8a,0x99), o2(0xe8,0x4f),
+     o2(0x8d,0xbd), o2(0x91,0x99), o2(0x92,0xc8), o2(0xfb,0xe1),
+     o2(0x8a,0x5a), o2(0xe8,0x4d), o2(0xe8,0x4e), o2(0x92,0xc1),
+     o2(0xe8,0x4c), o2(0xe8,0x50),
+
+#define to_Windows_31J_E9_8E WORDINDEX2INFO(23388)
+    to_Windows_31J_E9_8E_offsets,
+    to_Windows_31J_E9_8E_infos,
+
+#define to_Windows_31J_E9_8F_infos WORDINDEX2INFO(23390)
+           INVALID,         UNDEF, o2(0xe8,0x56), o2(0xfb,0xe2),
+     o2(0xe8,0x59), o2(0xe8,0x58), o2(0x93,0x4c), o2(0xe8,0x51),
+     o2(0xe8,0x52), o2(0xe8,0x55), o2(0xe8,0x57), o2(0xfb,0xe3),
+     o2(0x8b,0xbe), o2(0xe8,0x5a), o2(0xe8,0x54), o2(0xe8,0x53),
+     o2(0xfb,0xe4),
+
+#define to_Windows_31J_E9_8F WORDINDEX2INFO(23407)
+    to_Windows_31J_E9_8F_offsets,
+    to_Windows_31J_E9_8F_infos,
+
+#define to_Windows_31J_E9_90_infos WORDINDEX2INFO(23409)
+           INVALID,         UNDEF, o2(0xe8,0x5e), o2(0xe8,0x5f),
+     o2(0xe8,0x60), o2(0xe8,0x5d), o2(0xe8,0x5c), o2(0x8f,0xe0),
+     o2(0x93,0xa8), o2(0xe8,0x5b), o2(0xe8,0x64), o2(0xe8,0x62),
+     o2(0xfb,0xe5), o2(0xe8,0x63), o2(0xe8,0x61), o2(0x91,0xf6),
+     o2(0xe8,0x65),
+
+#define to_Windows_31J_E9_90 WORDINDEX2INFO(23426)
+    to_Windows_31J_E9_90_offsets,
+    to_Windows_31J_E9_90_infos,
+
+#define to_Windows_31J_E9_91_infos WORDINDEX2INFO(23428)
+           INVALID,         UNDEF, o2(0xe8,0x66), o2(0xe8,0x68),
+     o2(0xfb,0xe6), o2(0xfb,0xe7), o2(0x8a,0xd3), o2(0xe8,0x67),
+     o2(0x96,0xf8), o2(0xe8,0x73), o2(0xe8,0x69), o2(0xe8,0x6c),
+     o2(0xe8,0x6a), o2(0xe8,0x6b), o2(0xe8,0x6d), o2(0xe8,0x6f),
+     o2(0xe8,0x70), o2(0xe8,0x71), o2(0xe8,0x74), o2(0xe8,0x72),
+     o2(0xe8,0x75), o2(0xe8,0x77),
+
+#define to_Windows_31J_E9_91 WORDINDEX2INFO(23450)
+    to_Windows_31J_E9_91_offsets,
+    to_Windows_31J_E9_91_infos,
+
+#define to_Windows_31J_E9_96_infos WORDINDEX2INFO(23452)
+           INVALID, o2(0x96,0xe5),         UNDEF, o2(0xe8,0x78),
+     o2(0x91,0x4d), o2(0xe8,0x79), o2(0x95,0xc2), o2(0xe8,0x7a),
+     o2(0x8a,0x4a), o2(0x89,0x5b), o2(0x8a,0xd5), o2(0xfb,0xe8),
+     o2(0x8a,0xd4), o2(0xe8,0x7b), o2(0xe8,0x7c), o2(0xe8,0x7d),
+     o2(0xe8,0x7e), o2(0xe8,0x80), o2(0x8a,0xd6), o2(0x8a,0x74),
+     o2(0x8d,0x7d), o2(0x94,0xb4), o2(0xe8,0x82), o2(0xe8,0x81),
+     o2(0xe8,0x83), o2(0x89,0x7b), o2(0xe8,0x86), o2(0xe8,0x85),
+     o2(0xe8,0x84), o2(0xe8,0x87),
+
+#define to_Windows_31J_E9_96 WORDINDEX2INFO(23482)
+    to_Windows_31J_E9_96_offsets,
+    to_Windows_31J_E9_96_infos,
+
+#define to_Windows_31J_E9_9A_infos WORDINDEX2INFO(23484)
+           INVALID,         UNDEF, o2(0x8b,0xf7), o2(0x97,0xb2),
+     o2(0x8c,0x47), o2(0x91,0xe0), o2(0xe4,0x40), o2(0xe8,0xa4),
+     o2(0x8a,0x4b), o2(0x90,0x8f), o2(0x8a,0x75), o2(0xe8,0xa6),
+     o2(0xe8,0xa7), o2(0xe8,0xa5), o2(0x8c,0x84), o2(0x8d,0xdb),
+     o2(0x8f,0xe1), o2(0xfb,0xeb), o2(0x89,0x42), o2(0x97,0xd7),
+     o2(0xe8,0xa9), o2(0xe7,0xac), o2(0xe8,0xa8), o2(0xfb,0xec),
+     o2(0xe8,0xac), o2(0xe8,0xaa), o2(0xe8,0xab), o2(0xe8,0xad),
+     o2(0xe8,0xae), o2(0x97,0xea), o2(0xe8,0xaf), o2(0xe8,0xb0),
+     o2(0x90,0xc7), o2(0x94,0xb9),
+
+#define to_Windows_31J_E9_9A WORDINDEX2INFO(23518)
+    to_Windows_31J_E9_9A_offsets,
+    to_Windows_31J_E9_9A_infos,
+
+#define to_Windows_31J_E9_9C_infos WORDINDEX2INFO(23520)
+           INVALID, o2(0x8e,0xf9),         UNDEF, o2(0xe8,0xba),
+     o2(0xe8,0xbb), o2(0x90,0x6b), o2(0xe8,0xbc), o2(0x97,0xec),
+     o2(0xe8,0xb7), o2(0xe8,0xbe), o2(0xe8,0xc0), o2(0xe8,0xbf),
+     o2(0xe8,0xbd), o2(0xe8,0xc1), o2(0xe8,0xc2), o2(0x91,0x9a),
+     o2(0x89,0xe0), o2(0xe8,0xc3), o2(0x96,0xb6), o2(0xe8,0xc4),
+     o2(0xe8,0xc5), o2(0x98,0x49), o2(0xfb,0xed), o2(0x9e,0x50),
+     o2(0xe8,0xc6), o2(0xfb,0xee), o2(0xe8,0xc7), o2(0xe8,0xc8),
+
+#define to_Windows_31J_E9_9C WORDINDEX2INFO(23548)
+    to_Windows_31J_E9_9C_offsets,
+    to_Windows_31J_E9_9C_infos,
+
+#define to_Windows_31J_E9_9D_infos WORDINDEX2INFO(23550)
+           INVALID,         UNDEF, o2(0xe8,0xcc), o2(0xfb,0xef),
+     o2(0xe8,0xc9), o2(0xe8,0xca), o2(0xe8,0xcb), o2(0xe8,0xcd),
+     o2(0xfb,0xf0), o2(0xfb,0xf1), o2(0xfb,0xf2), o2(0x90,0xc2),
+     o2(0xfb,0xf3), o2(0x96,0xf5), o2(0x90,0xc3), o2(0xe8,0xce),
+     o2(0x94,0xf1), o2(0xe8,0xcf), o2(0xea,0x72), o2(0x96,0xca),
+     o2(0xe8,0xd0), o2(0xe8,0xd1), o2(0xe8,0xd2), o2(0x8a,0x76),
+     o2(0xe8,0xd4), o2(0x90,0x78), o2(0xe8,0xd5), o2(0x8c,0x43),
+     o2(0xe8,0xd6), o2(0xe8,0xda), o2(0xe8,0xd8),
+
+#define to_Windows_31J_E9_9D WORDINDEX2INFO(23581)
+    to_Windows_31J_E9_9D_offsets,
+    to_Windows_31J_E9_9D_infos,
+
+#define to_Windows_31J_E9_A1_infos WORDINDEX2INFO(23583)
+           INVALID,         UNDEF, o2(0xe8,0xf7), o2(0xe8,0xf9),
+     o2(0x91,0xe8), o2(0x8a,0x7a), o2(0x8a,0x7b), o2(0xe8,0xf8),
+     o2(0x8a,0xe7), o2(0x8c,0xb0), o2(0xfb,0xf4), o2(0x8a,0xe8),
+     o2(0x93,0x5e), o2(0x97,0xde), o2(0xfb,0xf5), o2(0x8c,0xda),
+     o2(0xe8,0xfa), o2(0xe8,0xfb), o2(0xe8,0xfc), o2(0xe9,0x40),
+     o2(0xe9,0x42), o2(0xe9,0x41),
+
+#define to_Windows_31J_E9_A1 WORDINDEX2INFO(23605)
+    to_Windows_31J_E9_A1_offsets,
+    to_Windows_31J_E9_A1_infos,
+
+#define to_Windows_31J_E9_A4_infos WORDINDEX2INFO(23607)
+           INVALID,         UNDEF, o2(0xe9,0x4c), o2(0x96,0xdd),
+     o2(0xe9,0x4d), o2(0x97,0x7b), o2(0x89,0x61), o2(0x8e,0x60),
+     o2(0xe9,0x4e), o2(0x89,0xec), o2(0xe9,0x4f), o2(0xe9,0x50),
+     o2(0xe9,0x52), o2(0xe9,0x53), o2(0xe9,0x55), o2(0xe9,0x51),
+     o2(0xe9,0x54), o2(0xfb,0xf8), o2(0x8a,0xd9), o2(0xe9,0x56),
+     o2(0xe9,0x57), o2(0xe9,0x58), o2(0xe9,0x59),
+
+#define to_Windows_31J_E9_A4 WORDINDEX2INFO(23630)
+    to_Windows_31J_E9_A4_offsets,
+    to_Windows_31J_E9_A4_infos,
+
+#define to_Windows_31J_E9_A6_infos WORDINDEX2INFO(23632)
+           INVALID,         UNDEF, o2(0x8e,0xf1), o2(0xe9,0x63),
+     o2(0xe9,0x64), o2(0x8d,0x81), o2(0xfb,0xfa), o2(0xe9,0x65),
+     o2(0x8a,0x5d), o2(0x94,0x6e), o2(0xe9,0x66), o2(0xe9,0x67),
+     o2(0x92,0x79), o2(0x93,0xe9), o2(0xe9,0x68),
+
+#define to_Windows_31J_E9_A6 WORDINDEX2INFO(23647)
+    to_Windows_31J_E9_A6_offsets,
+    to_Windows_31J_E9_A6_infos,
+
+#define to_Windows_31J_E9_A9_infos WORDINDEX2INFO(23649)
+           INVALID, o2(0xe9,0x7d),         UNDEF, o2(0xe9,0x7c),
+     o2(0xe9,0x7e), o2(0xe9,0x7b), o2(0xe9,0x82), o2(0xfb,0xfb),
+     o2(0xe9,0x81), o2(0xe9,0x84), o2(0x8b,0xc1), o2(0xe9,0x83),
+     o2(0xe9,0x85), o2(0xe9,0x86), o2(0xe9,0x88), o2(0xe9,0x87),
+     o2(0xe9,0x89), o2(0xe9,0x8b), o2(0xe9,0x8a),
+
+#define to_Windows_31J_E9_A9 WORDINDEX2INFO(23668)
+    to_Windows_31J_E9_A9_offsets,
+    to_Windows_31J_E9_A9_infos,
+
+#define to_Windows_31J_E9_AB_infos WORDINDEX2INFO(23670)
+           INVALID, o2(0xe9,0x8f),         UNDEF, o2(0x90,0x91),
+     o2(0xe9,0x90), o2(0xe9,0x91), o2(0xe9,0x92), o2(0xe9,0x93),
+     o2(0x8d,0x82), o2(0xfb,0xfc), o2(0xfc,0x40), o2(0xe9,0x94),
+     o2(0xe9,0x95), o2(0xe9,0x96), o2(0xe9,0x97), o2(0xe9,0x98),
+     o2(0x94,0xaf), o2(0xe9,0x9a), o2(0x95,0x45), o2(0xe9,0x9b),
+     o2(0xe9,0x99), o2(0xe9,0x9d), o2(0xe9,0x9c), o2(0xe9,0x9e),
+     o2(0xe9,0x9f),
+
+#define to_Windows_31J_E9_AB WORDINDEX2INFO(23695)
+    to_Windows_31J_E9_AB_offsets,
+    to_Windows_31J_E9_AB_infos,
+
+#define to_Windows_31J_E9_AD_infos WORDINDEX2INFO(23697)
+           INVALID,         UNDEF, o2(0x8a,0x40), o2(0x8d,0xb0),
+     o2(0xe9,0xaf), o2(0xe9,0xae), o2(0x96,0xa3), o2(0xe9,0xb1),
+     o2(0xe9,0xb2), o2(0xe9,0xb0), o2(0xe9,0xb3), o2(0x96,0x82),
+     o2(0xe9,0xb4), o2(0x8b,0x9b), o2(0x98,0x44), o2(0xfc,0x42),
+     o2(0xe9,0xb5), o2(0xfc,0x41),
+
+#define to_Windows_31J_E9_AD WORDINDEX2INFO(23715)
+    to_Windows_31J_E9_AD_offsets,
+    to_Windows_31J_E9_AD_infos,
+
+#define to_Windows_31J_E9_AE_infos WORDINDEX2INFO(23717)
+           INVALID,         UNDEF, o2(0xe9,0xb7), o2(0x88,0xbc),
+     o2(0xfc,0x43), o2(0xe9,0xb8), o2(0x95,0xa9), o2(0xe9,0xb6),
+     o2(0xe9,0xb9), o2(0xe9,0xba), o2(0xe9,0xbb), o2(0xe9,0xbc),
+     o2(0xe9,0xbd), o2(0x96,0x8e), o2(0x8e,0x4c), o2(0x8d,0xf8),
+     o2(0x91,0x4e), o2(0xfc,0x44), o2(0xe9,0xbe), o2(0xe9,0xc1),
+     o2(0xfc,0x45),
+
+#define to_Windows_31J_E9_AE WORDINDEX2INFO(23738)
+    to_Windows_31J_E9_AE_offsets,
+    to_Windows_31J_E9_AE_infos,
+
+#define to_Windows_31J_E9_B0_infos WORDINDEX2INFO(23740)
+           INVALID, o2(0xfc,0x46),         UNDEF, o2(0xe9,0xd8),
+     o2(0xe9,0xd4), o2(0xe9,0xd5), o2(0xe9,0xd1), o2(0xe9,0xd7),
+     o2(0xe9,0xd3), o2(0x8a,0x82), o2(0x98,0x6b), o2(0xe9,0xd6),
+     o2(0xe9,0xd2), o2(0xe9,0xd0), o2(0xe9,0xcf), o2(0xe9,0xda),
+     o2(0xe9,0xdd), o2(0xe9,0xdc), o2(0xe9,0xdb), o2(0x95,0x68),
+     o2(0xe9,0xd9), o2(0x88,0xf1), o2(0xe9,0xde), o2(0xe9,0xe0),
+     o2(0x8a,0x8f), o2(0xe9,0xcb), o2(0x89,0x56), o2(0xe9,0xe2),
+
+#define to_Windows_31J_E9_B0 WORDINDEX2INFO(23768)
+    to_Windows_31J_E9_B0_offsets,
+    to_Windows_31J_E9_B0_infos,
+
+#define to_Windows_31J_E9_B5_infos WORDINDEX2INFO(23770)
+           INVALID,         UNDEF, o2(0xe9,0xf8), o2(0xe9,0xf5),
+     o2(0xe9,0xfb), o2(0xe9,0xfc), o2(0xea,0x44), o2(0xea,0x43),
+     o2(0xea,0x45), o2(0x89,0x4c), o2(0xea,0x40), o2(0xea,0x41),
+     o2(0x8d,0x94), o2(0x96,0xb7), o2(0xea,0x42), o2(0xfc,0x48),
+     o2(0x96,0x51), o2(0xea,0x4a), o2(0xfc,0x47), o2(0xea,0x46),
+     o2(0xea,0x4b),
+
+#define to_Windows_31J_E9_B5 WORDINDEX2INFO(23791)
+    to_Windows_31J_E9_B5_offsets,
+    to_Windows_31J_E9_B5_infos,
+
+#define to_Windows_31J_E9_B8_infos WORDINDEX2INFO(23793)
+           INVALID,         UNDEF, o2(0xfc,0x4a), o2(0xea,0x5f),
+     o2(0xea,0x60), o2(0xea,0x61),
+
+#define to_Windows_31J_E9_B8 WORDINDEX2INFO(23799)
+    to_Windows_31J_E9_B8_offsets,
+    to_Windows_31J_E9_B8_infos,
+
+#define to_Windows_31J_E9_BB_infos WORDINDEX2INFO(23801)
+           INVALID,         UNDEF, o2(0x89,0xa9), o2(0xea,0x73),
+     o2(0x8b,0x6f), o2(0xea,0x74), o2(0xea,0x75), o2(0xea,0x76),
+     o2(0xfc,0x4b), o2(0x8d,0x95), o2(0xea,0x77), o2(0xe0,0xd2),
+     o2(0x96,0xd9), o2(0x91,0xe1), o2(0xea,0x78), o2(0xea,0x7a),
+     o2(0xea,0x79), o2(0xea,0x7b), o2(0xea,0x7c), o2(0xea,0x7d),
+     o2(0xea,0x7e), o2(0xea,0x80), o2(0xea,0x81), o2(0xea,0x82),
+     o2(0xea,0x83), o2(0xea,0x84), o2(0xea,0x85), o2(0xea,0x86),
+
+#define to_Windows_31J_E9_BB WORDINDEX2INFO(23829)
+    to_Windows_31J_E9_BB_offsets,
+    to_Windows_31J_E9_BB_infos,
+
+#define to_Windows_31J_E9_infos WORDINDEX2INFO(23831)
+                  INVALID,   to_Shift_JIS_E9_80,
+     to_Windows_31J_E9_81,   to_Shift_JIS_E9_82,
+     to_Windows_31J_E9_83, to_Windows_31J_E9_84,
+       to_Shift_JIS_E9_85,   to_Shift_JIS_E9_86,
+     to_Windows_31J_E9_87, to_Windows_31J_E9_88,
+     to_Windows_31J_E9_89, to_Windows_31J_E9_8A,
+     to_Windows_31J_E9_8B, to_Windows_31J_E9_8C,
+     to_Windows_31J_E9_8D, to_Windows_31J_E9_8E,
+     to_Windows_31J_E9_8F, to_Windows_31J_E9_90,
+     to_Windows_31J_E9_91,   to_Shift_JIS_E9_92,
+          to_Shift_JIS_C4,   to_Shift_JIS_E9_95,
+     to_Windows_31J_E9_96,   to_Shift_JIS_E9_97,
+       to_Shift_JIS_E9_98,   to_Shift_JIS_E9_99,
+     to_Windows_31J_E9_9A,   to_Shift_JIS_E9_9B,
+     to_Windows_31J_E9_9C, to_Windows_31J_E9_9D,
+       to_Shift_JIS_E9_9E,   to_Shift_JIS_E9_9F,
+       to_Shift_JIS_E9_A0, to_Windows_31J_E9_A1,
+       to_Shift_JIS_E9_A2,   to_Shift_JIS_E9_A3,
+     to_Windows_31J_E9_A4,   to_Shift_JIS_E9_A5,
+     to_Windows_31J_E9_A6,   to_Shift_JIS_E9_A7,
+       to_Shift_JIS_E9_A8, to_Windows_31J_E9_A9,
+       to_Shift_JIS_E9_AA, to_Windows_31J_E9_AB,
+       to_Shift_JIS_E9_AC, to_Windows_31J_E9_AD,
+     to_Windows_31J_E9_AE,   to_Shift_JIS_E9_AF,
+     to_Windows_31J_E9_B0,   to_Shift_JIS_E9_B1,
+       to_Shift_JIS_E9_B3,   to_Shift_JIS_E9_B4,
+     to_Windows_31J_E9_B5,   to_Shift_JIS_E9_B6,
+       to_Shift_JIS_E9_B7, to_Windows_31J_E9_B8,
+       to_Shift_JIS_E9_B9,   to_Shift_JIS_E9_BA,
+     to_Windows_31J_E9_BB,   to_Shift_JIS_E9_BC,
+       to_Shift_JIS_E9_BD,   to_Shift_JIS_E9_BE,
+
+#define to_Windows_31J_E9 WORDINDEX2INFO(23893)
+    to_Shift_JIS_E9_offsets,
+    to_Windows_31J_E9_infos,
+
+#define to_Windows_31J_EE_80_infos WORDINDEX2INFO(23895)
+           INVALID, o2(0xf0,0x40), o2(0xf0,0x41), o2(0xf0,0x42),
+     o2(0xf0,0x43), o2(0xf0,0x44), o2(0xf0,0x45), o2(0xf0,0x46),
+     o2(0xf0,0x47), o2(0xf0,0x48), o2(0xf0,0x49), o2(0xf0,0x4a),
+     o2(0xf0,0x4b), o2(0xf0,0x4c), o2(0xf0,0x4d), o2(0xf0,0x4e),
+     o2(0xf0,0x4f), o2(0xf0,0x50), o2(0xf0,0x51), o2(0xf0,0x52),
+     o2(0xf0,0x53), o2(0xf0,0x54), o2(0xf0,0x55), o2(0xf0,0x56),
+     o2(0xf0,0x57), o2(0xf0,0x58), o2(0xf0,0x59), o2(0xf0,0x5a),
+     o2(0xf0,0x5b), o2(0xf0,0x5c), o2(0xf0,0x5d), o2(0xf0,0x5e),
+     o2(0xf0,0x5f), o2(0xf0,0x60), o2(0xf0,0x61), o2(0xf0,0x62),
+     o2(0xf0,0x63), o2(0xf0,0x64), o2(0xf0,0x65), o2(0xf0,0x66),
+     o2(0xf0,0x67), o2(0xf0,0x68), o2(0xf0,0x69), o2(0xf0,0x6a),
+     o2(0xf0,0x6b), o2(0xf0,0x6c), o2(0xf0,0x6d), o2(0xf0,0x6e),
+     o2(0xf0,0x6f), o2(0xf0,0x70), o2(0xf0,0x71), o2(0xf0,0x72),
+     o2(0xf0,0x73), o2(0xf0,0x74), o2(0xf0,0x75), o2(0xf0,0x76),
+     o2(0xf0,0x77), o2(0xf0,0x78), o2(0xf0,0x79), o2(0xf0,0x7a),
+     o2(0xf0,0x7b), o2(0xf0,0x7c), o2(0xf0,0x7d), o2(0xf0,0x7e),
+     o2(0xf0,0x80),
+
+#define to_Windows_31J_EE_80 WORDINDEX2INFO(23960)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_80_infos,
+
+#define to_Windows_31J_EE_81_infos WORDINDEX2INFO(23962)
+           INVALID, o2(0xf0,0x81), o2(0xf0,0x82), o2(0xf0,0x83),
+     o2(0xf0,0x84), o2(0xf0,0x85), o2(0xf0,0x86), o2(0xf0,0x87),
+     o2(0xf0,0x88), o2(0xf0,0x89), o2(0xf0,0x8a), o2(0xf0,0x8b),
+     o2(0xf0,0x8c), o2(0xf0,0x8d), o2(0xf0,0x8e), o2(0xf0,0x8f),
+     o2(0xf0,0x90), o2(0xf0,0x91), o2(0xf0,0x92), o2(0xf0,0x93),
+     o2(0xf0,0x94), o2(0xf0,0x95), o2(0xf0,0x96), o2(0xf0,0x97),
+     o2(0xf0,0x98), o2(0xf0,0x99), o2(0xf0,0x9a), o2(0xf0,0x9b),
+     o2(0xf0,0x9c), o2(0xf0,0x9d), o2(0xf0,0x9e), o2(0xf0,0x9f),
+     o2(0xf0,0xa0), o2(0xf0,0xa1), o2(0xf0,0xa2), o2(0xf0,0xa3),
+     o2(0xf0,0xa4), o2(0xf0,0xa5), o2(0xf0,0xa6), o2(0xf0,0xa7),
+     o2(0xf0,0xa8), o2(0xf0,0xa9), o2(0xf0,0xaa), o2(0xf0,0xab),
+     o2(0xf0,0xac), o2(0xf0,0xad), o2(0xf0,0xae), o2(0xf0,0xaf),
+     o2(0xf0,0xb0), o2(0xf0,0xb1), o2(0xf0,0xb2), o2(0xf0,0xb3),
+     o2(0xf0,0xb4), o2(0xf0,0xb5), o2(0xf0,0xb6), o2(0xf0,0xb7),
+     o2(0xf0,0xb8), o2(0xf0,0xb9), o2(0xf0,0xba), o2(0xf0,0xbb),
+     o2(0xf0,0xbc), o2(0xf0,0xbd), o2(0xf0,0xbe), o2(0xf0,0xbf),
+     o2(0xf0,0xc0),
+
+#define to_Windows_31J_EE_81 WORDINDEX2INFO(24027)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_81_infos,
+
+#define to_Windows_31J_EE_82_infos WORDINDEX2INFO(24029)
+           INVALID, o2(0xf0,0xc1), o2(0xf0,0xc2), o2(0xf0,0xc3),
+     o2(0xf0,0xc4), o2(0xf0,0xc5), o2(0xf0,0xc6), o2(0xf0,0xc7),
+     o2(0xf0,0xc8), o2(0xf0,0xc9), o2(0xf0,0xca), o2(0xf0,0xcb),
+     o2(0xf0,0xcc), o2(0xf0,0xcd), o2(0xf0,0xce), o2(0xf0,0xcf),
+     o2(0xf0,0xd0), o2(0xf0,0xd1), o2(0xf0,0xd2), o2(0xf0,0xd3),
+     o2(0xf0,0xd4), o2(0xf0,0xd5), o2(0xf0,0xd6), o2(0xf0,0xd7),
+     o2(0xf0,0xd8), o2(0xf0,0xd9), o2(0xf0,0xda), o2(0xf0,0xdb),
+     o2(0xf0,0xdc), o2(0xf0,0xdd), o2(0xf0,0xde), o2(0xf0,0xdf),
+     o2(0xf0,0xe0), o2(0xf0,0xe1), o2(0xf0,0xe2), o2(0xf0,0xe3),
+     o2(0xf0,0xe4), o2(0xf0,0xe5), o2(0xf0,0xe6), o2(0xf0,0xe7),
+     o2(0xf0,0xe8), o2(0xf0,0xe9), o2(0xf0,0xea), o2(0xf0,0xeb),
+     o2(0xf0,0xec), o2(0xf0,0xed), o2(0xf0,0xee), o2(0xf0,0xef),
+     o2(0xf0,0xf0), o2(0xf0,0xf1), o2(0xf0,0xf2), o2(0xf0,0xf3),
+     o2(0xf0,0xf4), o2(0xf0,0xf5), o2(0xf0,0xf6), o2(0xf0,0xf7),
+     o2(0xf0,0xf8), o2(0xf0,0xf9), o2(0xf0,0xfa), o2(0xf0,0xfb),
+     o2(0xf0,0xfc), o2(0xf1,0x40), o2(0xf1,0x41), o2(0xf1,0x42),
+     o2(0xf1,0x43),
+
+#define to_Windows_31J_EE_82 WORDINDEX2INFO(24094)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_82_infos,
+
+#define to_Windows_31J_EE_83_infos WORDINDEX2INFO(24096)
+           INVALID, o2(0xf1,0x44), o2(0xf1,0x45), o2(0xf1,0x46),
+     o2(0xf1,0x47), o2(0xf1,0x48), o2(0xf1,0x49), o2(0xf1,0x4a),
+     o2(0xf1,0x4b), o2(0xf1,0x4c), o2(0xf1,0x4d), o2(0xf1,0x4e),
+     o2(0xf1,0x4f), o2(0xf1,0x50), o2(0xf1,0x51), o2(0xf1,0x52),
+     o2(0xf1,0x53), o2(0xf1,0x54), o2(0xf1,0x55), o2(0xf1,0x56),
+     o2(0xf1,0x57), o2(0xf1,0x58), o2(0xf1,0x59), o2(0xf1,0x5a),
+     o2(0xf1,0x5b), o2(0xf1,0x5c), o2(0xf1,0x5d), o2(0xf1,0x5e),
+     o2(0xf1,0x5f), o2(0xf1,0x60), o2(0xf1,0x61), o2(0xf1,0x62),
+     o2(0xf1,0x63), o2(0xf1,0x64), o2(0xf1,0x65), o2(0xf1,0x66),
+     o2(0xf1,0x67), o2(0xf1,0x68), o2(0xf1,0x69), o2(0xf1,0x6a),
+     o2(0xf1,0x6b), o2(0xf1,0x6c), o2(0xf1,0x6d), o2(0xf1,0x6e),
+     o2(0xf1,0x6f), o2(0xf1,0x70), o2(0xf1,0x71), o2(0xf1,0x72),
+     o2(0xf1,0x73), o2(0xf1,0x74), o2(0xf1,0x75), o2(0xf1,0x76),
+     o2(0xf1,0x77), o2(0xf1,0x78), o2(0xf1,0x79), o2(0xf1,0x7a),
+     o2(0xf1,0x7b), o2(0xf1,0x7c), o2(0xf1,0x7d), o2(0xf1,0x7e),
+     o2(0xf1,0x80), o2(0xf1,0x81), o2(0xf1,0x82), o2(0xf1,0x83),
+     o2(0xf1,0x84),
+
+#define to_Windows_31J_EE_83 WORDINDEX2INFO(24161)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_83_infos,
+
+#define to_Windows_31J_EE_84_infos WORDINDEX2INFO(24163)
+           INVALID, o2(0xf1,0x85), o2(0xf1,0x86), o2(0xf1,0x87),
+     o2(0xf1,0x88), o2(0xf1,0x89), o2(0xf1,0x8a), o2(0xf1,0x8b),
+     o2(0xf1,0x8c), o2(0xf1,0x8d), o2(0xf1,0x8e), o2(0xf1,0x8f),
+     o2(0xf1,0x90), o2(0xf1,0x91), o2(0xf1,0x92), o2(0xf1,0x93),
+     o2(0xf1,0x94), o2(0xf1,0x95), o2(0xf1,0x96), o2(0xf1,0x97),
+     o2(0xf1,0x98), o2(0xf1,0x99), o2(0xf1,0x9a), o2(0xf1,0x9b),
+     o2(0xf1,0x9c), o2(0xf1,0x9d), o2(0xf1,0x9e), o2(0xf1,0x9f),
+     o2(0xf1,0xa0), o2(0xf1,0xa1), o2(0xf1,0xa2), o2(0xf1,0xa3),
+     o2(0xf1,0xa4), o2(0xf1,0xa5), o2(0xf1,0xa6), o2(0xf1,0xa7),
+     o2(0xf1,0xa8), o2(0xf1,0xa9), o2(0xf1,0xaa), o2(0xf1,0xab),
+     o2(0xf1,0xac), o2(0xf1,0xad), o2(0xf1,0xae), o2(0xf1,0xaf),
+     o2(0xf1,0xb0), o2(0xf1,0xb1), o2(0xf1,0xb2), o2(0xf1,0xb3),
+     o2(0xf1,0xb4), o2(0xf1,0xb5), o2(0xf1,0xb6), o2(0xf1,0xb7),
+     o2(0xf1,0xb8), o2(0xf1,0xb9), o2(0xf1,0xba), o2(0xf1,0xbb),
+     o2(0xf1,0xbc), o2(0xf1,0xbd), o2(0xf1,0xbe), o2(0xf1,0xbf),
+     o2(0xf1,0xc0), o2(0xf1,0xc1), o2(0xf1,0xc2), o2(0xf1,0xc3),
+     o2(0xf1,0xc4),
+
+#define to_Windows_31J_EE_84 WORDINDEX2INFO(24228)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_84_infos,
+
+#define to_Windows_31J_EE_85_infos WORDINDEX2INFO(24230)
+           INVALID, o2(0xf1,0xc5), o2(0xf1,0xc6), o2(0xf1,0xc7),
+     o2(0xf1,0xc8), o2(0xf1,0xc9), o2(0xf1,0xca), o2(0xf1,0xcb),
+     o2(0xf1,0xcc), o2(0xf1,0xcd), o2(0xf1,0xce), o2(0xf1,0xcf),
+     o2(0xf1,0xd0), o2(0xf1,0xd1), o2(0xf1,0xd2), o2(0xf1,0xd3),
+     o2(0xf1,0xd4), o2(0xf1,0xd5), o2(0xf1,0xd6), o2(0xf1,0xd7),
+     o2(0xf1,0xd8), o2(0xf1,0xd9), o2(0xf1,0xda), o2(0xf1,0xdb),
+     o2(0xf1,0xdc), o2(0xf1,0xdd), o2(0xf1,0xde), o2(0xf1,0xdf),
+     o2(0xf1,0xe0), o2(0xf1,0xe1), o2(0xf1,0xe2), o2(0xf1,0xe3),
+     o2(0xf1,0xe4), o2(0xf1,0xe5), o2(0xf1,0xe6), o2(0xf1,0xe7),
+     o2(0xf1,0xe8), o2(0xf1,0xe9), o2(0xf1,0xea), o2(0xf1,0xeb),
+     o2(0xf1,0xec), o2(0xf1,0xed), o2(0xf1,0xee), o2(0xf1,0xef),
+     o2(0xf1,0xf0), o2(0xf1,0xf1), o2(0xf1,0xf2), o2(0xf1,0xf3),
+     o2(0xf1,0xf4), o2(0xf1,0xf5), o2(0xf1,0xf6), o2(0xf1,0xf7),
+     o2(0xf1,0xf8), o2(0xf1,0xf9), o2(0xf1,0xfa), o2(0xf1,0xfb),
+     o2(0xf1,0xfc), o2(0xf2,0x40), o2(0xf2,0x41), o2(0xf2,0x42),
+     o2(0xf2,0x43), o2(0xf2,0x44), o2(0xf2,0x45), o2(0xf2,0x46),
+     o2(0xf2,0x47),
+
+#define to_Windows_31J_EE_85 WORDINDEX2INFO(24295)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_85_infos,
+
+#define to_Windows_31J_EE_86_infos WORDINDEX2INFO(24297)
+           INVALID, o2(0xf2,0x48), o2(0xf2,0x49), o2(0xf2,0x4a),
+     o2(0xf2,0x4b), o2(0xf2,0x4c), o2(0xf2,0x4d), o2(0xf2,0x4e),
+     o2(0xf2,0x4f), o2(0xf2,0x50), o2(0xf2,0x51), o2(0xf2,0x52),
+     o2(0xf2,0x53), o2(0xf2,0x54), o2(0xf2,0x55), o2(0xf2,0x56),
+     o2(0xf2,0x57), o2(0xf2,0x58), o2(0xf2,0x59), o2(0xf2,0x5a),
+     o2(0xf2,0x5b), o2(0xf2,0x5c), o2(0xf2,0x5d), o2(0xf2,0x5e),
+     o2(0xf2,0x5f), o2(0xf2,0x60), o2(0xf2,0x61), o2(0xf2,0x62),
+     o2(0xf2,0x63), o2(0xf2,0x64), o2(0xf2,0x65), o2(0xf2,0x66),
+     o2(0xf2,0x67), o2(0xf2,0x68), o2(0xf2,0x69), o2(0xf2,0x6a),
+     o2(0xf2,0x6b), o2(0xf2,0x6c), o2(0xf2,0x6d), o2(0xf2,0x6e),
+     o2(0xf2,0x6f), o2(0xf2,0x70), o2(0xf2,0x71), o2(0xf2,0x72),
+     o2(0xf2,0x73), o2(0xf2,0x74), o2(0xf2,0x75), o2(0xf2,0x76),
+     o2(0xf2,0x77), o2(0xf2,0x78), o2(0xf2,0x79), o2(0xf2,0x7a),
+     o2(0xf2,0x7b), o2(0xf2,0x7c), o2(0xf2,0x7d), o2(0xf2,0x7e),
+     o2(0xf2,0x80), o2(0xf2,0x81), o2(0xf2,0x82), o2(0xf2,0x83),
+     o2(0xf2,0x84), o2(0xf2,0x85), o2(0xf2,0x86), o2(0xf2,0x87),
+     o2(0xf2,0x88),
+
+#define to_Windows_31J_EE_86 WORDINDEX2INFO(24362)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_86_infos,
+
+#define to_Windows_31J_EE_87_infos WORDINDEX2INFO(24364)
+           INVALID, o2(0xf2,0x89), o2(0xf2,0x8a), o2(0xf2,0x8b),
+     o2(0xf2,0x8c), o2(0xf2,0x8d), o2(0xf2,0x8e), o2(0xf2,0x8f),
+     o2(0xf2,0x90), o2(0xf2,0x91), o2(0xf2,0x92), o2(0xf2,0x93),
+     o2(0xf2,0x94), o2(0xf2,0x95), o2(0xf2,0x96), o2(0xf2,0x97),
+     o2(0xf2,0x98), o2(0xf2,0x99), o2(0xf2,0x9a), o2(0xf2,0x9b),
+     o2(0xf2,0x9c), o2(0xf2,0x9d), o2(0xf2,0x9e), o2(0xf2,0x9f),
+     o2(0xf2,0xa0), o2(0xf2,0xa1), o2(0xf2,0xa2), o2(0xf2,0xa3),
+     o2(0xf2,0xa4), o2(0xf2,0xa5), o2(0xf2,0xa6), o2(0xf2,0xa7),
+     o2(0xf2,0xa8), o2(0xf2,0xa9), o2(0xf2,0xaa), o2(0xf2,0xab),
+     o2(0xf2,0xac), o2(0xf2,0xad), o2(0xf2,0xae), o2(0xf2,0xaf),
+     o2(0xf2,0xb0), o2(0xf2,0xb1), o2(0xf2,0xb2), o2(0xf2,0xb3),
+     o2(0xf2,0xb4), o2(0xf2,0xb5), o2(0xf2,0xb6), o2(0xf2,0xb7),
+     o2(0xf2,0xb8), o2(0xf2,0xb9), o2(0xf2,0xba), o2(0xf2,0xbb),
+     o2(0xf2,0xbc), o2(0xf2,0xbd), o2(0xf2,0xbe), o2(0xf2,0xbf),
+     o2(0xf2,0xc0), o2(0xf2,0xc1), o2(0xf2,0xc2), o2(0xf2,0xc3),
+     o2(0xf2,0xc4), o2(0xf2,0xc5), o2(0xf2,0xc6), o2(0xf2,0xc7),
+     o2(0xf2,0xc8),
+
+#define to_Windows_31J_EE_87 WORDINDEX2INFO(24429)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_87_infos,
+
+#define to_Windows_31J_EE_88_infos WORDINDEX2INFO(24431)
+           INVALID, o2(0xf2,0xc9), o2(0xf2,0xca), o2(0xf2,0xcb),
+     o2(0xf2,0xcc), o2(0xf2,0xcd), o2(0xf2,0xce), o2(0xf2,0xcf),
+     o2(0xf2,0xd0), o2(0xf2,0xd1), o2(0xf2,0xd2), o2(0xf2,0xd3),
+     o2(0xf2,0xd4), o2(0xf2,0xd5), o2(0xf2,0xd6), o2(0xf2,0xd7),
+     o2(0xf2,0xd8), o2(0xf2,0xd9), o2(0xf2,0xda), o2(0xf2,0xdb),
+     o2(0xf2,0xdc), o2(0xf2,0xdd), o2(0xf2,0xde), o2(0xf2,0xdf),
+     o2(0xf2,0xe0), o2(0xf2,0xe1), o2(0xf2,0xe2), o2(0xf2,0xe3),
+     o2(0xf2,0xe4), o2(0xf2,0xe5), o2(0xf2,0xe6), o2(0xf2,0xe7),
+     o2(0xf2,0xe8), o2(0xf2,0xe9), o2(0xf2,0xea), o2(0xf2,0xeb),
+     o2(0xf2,0xec), o2(0xf2,0xed), o2(0xf2,0xee), o2(0xf2,0xef),
+     o2(0xf2,0xf0), o2(0xf2,0xf1), o2(0xf2,0xf2), o2(0xf2,0xf3),
+     o2(0xf2,0xf4), o2(0xf2,0xf5), o2(0xf2,0xf6), o2(0xf2,0xf7),
+     o2(0xf2,0xf8), o2(0xf2,0xf9), o2(0xf2,0xfa), o2(0xf2,0xfb),
+     o2(0xf2,0xfc), o2(0xf3,0x40), o2(0xf3,0x41), o2(0xf3,0x42),
+     o2(0xf3,0x43), o2(0xf3,0x44), o2(0xf3,0x45), o2(0xf3,0x46),
+     o2(0xf3,0x47), o2(0xf3,0x48), o2(0xf3,0x49), o2(0xf3,0x4a),
+     o2(0xf3,0x4b),
+
+#define to_Windows_31J_EE_88 WORDINDEX2INFO(24496)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_88_infos,
+
+#define to_Windows_31J_EE_89_infos WORDINDEX2INFO(24498)
+           INVALID, o2(0xf3,0x4c), o2(0xf3,0x4d), o2(0xf3,0x4e),
+     o2(0xf3,0x4f), o2(0xf3,0x50), o2(0xf3,0x51), o2(0xf3,0x52),
+     o2(0xf3,0x53), o2(0xf3,0x54), o2(0xf3,0x55), o2(0xf3,0x56),
+     o2(0xf3,0x57), o2(0xf3,0x58), o2(0xf3,0x59), o2(0xf3,0x5a),
+     o2(0xf3,0x5b), o2(0xf3,0x5c), o2(0xf3,0x5d), o2(0xf3,0x5e),
+     o2(0xf3,0x5f), o2(0xf3,0x60), o2(0xf3,0x61), o2(0xf3,0x62),
+     o2(0xf3,0x63), o2(0xf3,0x64), o2(0xf3,0x65), o2(0xf3,0x66),
+     o2(0xf3,0x67), o2(0xf3,0x68), o2(0xf3,0x69), o2(0xf3,0x6a),
+     o2(0xf3,0x6b), o2(0xf3,0x6c), o2(0xf3,0x6d), o2(0xf3,0x6e),
+     o2(0xf3,0x6f), o2(0xf3,0x70), o2(0xf3,0x71), o2(0xf3,0x72),
+     o2(0xf3,0x73), o2(0xf3,0x74), o2(0xf3,0x75), o2(0xf3,0x76),
+     o2(0xf3,0x77), o2(0xf3,0x78), o2(0xf3,0x79), o2(0xf3,0x7a),
+     o2(0xf3,0x7b), o2(0xf3,0x7c), o2(0xf3,0x7d), o2(0xf3,0x7e),
+     o2(0xf3,0x80), o2(0xf3,0x81), o2(0xf3,0x82), o2(0xf3,0x83),
+     o2(0xf3,0x84), o2(0xf3,0x85), o2(0xf3,0x86), o2(0xf3,0x87),
+     o2(0xf3,0x88), o2(0xf3,0x89), o2(0xf3,0x8a), o2(0xf3,0x8b),
+     o2(0xf3,0x8c),
+
+#define to_Windows_31J_EE_89 WORDINDEX2INFO(24563)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_89_infos,
+
+#define to_Windows_31J_EE_8A_infos WORDINDEX2INFO(24565)
+           INVALID, o2(0xf3,0x8d), o2(0xf3,0x8e), o2(0xf3,0x8f),
+     o2(0xf3,0x90), o2(0xf3,0x91), o2(0xf3,0x92), o2(0xf3,0x93),
+     o2(0xf3,0x94), o2(0xf3,0x95), o2(0xf3,0x96), o2(0xf3,0x97),
+     o2(0xf3,0x98), o2(0xf3,0x99), o2(0xf3,0x9a), o2(0xf3,0x9b),
+     o2(0xf3,0x9c), o2(0xf3,0x9d), o2(0xf3,0x9e), o2(0xf3,0x9f),
+     o2(0xf3,0xa0), o2(0xf3,0xa1), o2(0xf3,0xa2), o2(0xf3,0xa3),
+     o2(0xf3,0xa4), o2(0xf3,0xa5), o2(0xf3,0xa6), o2(0xf3,0xa7),
+     o2(0xf3,0xa8), o2(0xf3,0xa9), o2(0xf3,0xaa), o2(0xf3,0xab),
+     o2(0xf3,0xac), o2(0xf3,0xad), o2(0xf3,0xae), o2(0xf3,0xaf),
+     o2(0xf3,0xb0), o2(0xf3,0xb1), o2(0xf3,0xb2), o2(0xf3,0xb3),
+     o2(0xf3,0xb4), o2(0xf3,0xb5), o2(0xf3,0xb6), o2(0xf3,0xb7),
+     o2(0xf3,0xb8), o2(0xf3,0xb9), o2(0xf3,0xba), o2(0xf3,0xbb),
+     o2(0xf3,0xbc), o2(0xf3,0xbd), o2(0xf3,0xbe), o2(0xf3,0xbf),
+     o2(0xf3,0xc0), o2(0xf3,0xc1), o2(0xf3,0xc2), o2(0xf3,0xc3),
+     o2(0xf3,0xc4), o2(0xf3,0xc5), o2(0xf3,0xc6), o2(0xf3,0xc7),
+     o2(0xf3,0xc8), o2(0xf3,0xc9), o2(0xf3,0xca), o2(0xf3,0xcb),
+     o2(0xf3,0xcc),
+
+#define to_Windows_31J_EE_8A WORDINDEX2INFO(24630)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8A_infos,
+
+#define to_Windows_31J_EE_8B_infos WORDINDEX2INFO(24632)
+           INVALID, o2(0xf3,0xcd), o2(0xf3,0xce), o2(0xf3,0xcf),
+     o2(0xf3,0xd0), o2(0xf3,0xd1), o2(0xf3,0xd2), o2(0xf3,0xd3),
+     o2(0xf3,0xd4), o2(0xf3,0xd5), o2(0xf3,0xd6), o2(0xf3,0xd7),
+     o2(0xf3,0xd8), o2(0xf3,0xd9), o2(0xf3,0xda), o2(0xf3,0xdb),
+     o2(0xf3,0xdc), o2(0xf3,0xdd), o2(0xf3,0xde), o2(0xf3,0xdf),
+     o2(0xf3,0xe0), o2(0xf3,0xe1), o2(0xf3,0xe2), o2(0xf3,0xe3),
+     o2(0xf3,0xe4), o2(0xf3,0xe5), o2(0xf3,0xe6), o2(0xf3,0xe7),
+     o2(0xf3,0xe8), o2(0xf3,0xe9), o2(0xf3,0xea), o2(0xf3,0xeb),
+     o2(0xf3,0xec), o2(0xf3,0xed), o2(0xf3,0xee), o2(0xf3,0xef),
+     o2(0xf3,0xf0), o2(0xf3,0xf1), o2(0xf3,0xf2), o2(0xf3,0xf3),
+     o2(0xf3,0xf4), o2(0xf3,0xf5), o2(0xf3,0xf6), o2(0xf3,0xf7),
+     o2(0xf3,0xf8), o2(0xf3,0xf9), o2(0xf3,0xfa), o2(0xf3,0xfb),
+     o2(0xf3,0xfc), o2(0xf4,0x40), o2(0xf4,0x41), o2(0xf4,0x42),
+     o2(0xf4,0x43), o2(0xf4,0x44), o2(0xf4,0x45), o2(0xf4,0x46),
+     o2(0xf4,0x47), o2(0xf4,0x48), o2(0xf4,0x49), o2(0xf4,0x4a),
+     o2(0xf4,0x4b), o2(0xf4,0x4c), o2(0xf4,0x4d), o2(0xf4,0x4e),
+     o2(0xf4,0x4f),
+
+#define to_Windows_31J_EE_8B WORDINDEX2INFO(24697)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8B_infos,
+
+#define to_Windows_31J_EE_8C_infos WORDINDEX2INFO(24699)
+           INVALID, o2(0xf4,0x50), o2(0xf4,0x51), o2(0xf4,0x52),
+     o2(0xf4,0x53), o2(0xf4,0x54), o2(0xf4,0x55), o2(0xf4,0x56),
+     o2(0xf4,0x57), o2(0xf4,0x58), o2(0xf4,0x59), o2(0xf4,0x5a),
+     o2(0xf4,0x5b), o2(0xf4,0x5c), o2(0xf4,0x5d), o2(0xf4,0x5e),
+     o2(0xf4,0x5f), o2(0xf4,0x60), o2(0xf4,0x61), o2(0xf4,0x62),
+     o2(0xf4,0x63), o2(0xf4,0x64), o2(0xf4,0x65), o2(0xf4,0x66),
+     o2(0xf4,0x67), o2(0xf4,0x68), o2(0xf4,0x69), o2(0xf4,0x6a),
+     o2(0xf4,0x6b), o2(0xf4,0x6c), o2(0xf4,0x6d), o2(0xf4,0x6e),
+     o2(0xf4,0x6f), o2(0xf4,0x70), o2(0xf4,0x71), o2(0xf4,0x72),
+     o2(0xf4,0x73), o2(0xf4,0x74), o2(0xf4,0x75), o2(0xf4,0x76),
+     o2(0xf4,0x77), o2(0xf4,0x78), o2(0xf4,0x79), o2(0xf4,0x7a),
+     o2(0xf4,0x7b), o2(0xf4,0x7c), o2(0xf4,0x7d), o2(0xf4,0x7e),
+     o2(0xf4,0x80), o2(0xf4,0x81), o2(0xf4,0x82), o2(0xf4,0x83),
+     o2(0xf4,0x84), o2(0xf4,0x85), o2(0xf4,0x86), o2(0xf4,0x87),
+     o2(0xf4,0x88), o2(0xf4,0x89), o2(0xf4,0x8a), o2(0xf4,0x8b),
+     o2(0xf4,0x8c), o2(0xf4,0x8d), o2(0xf4,0x8e), o2(0xf4,0x8f),
+     o2(0xf4,0x90),
+
+#define to_Windows_31J_EE_8C WORDINDEX2INFO(24764)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8C_infos,
+
+#define to_Windows_31J_EE_8D_infos WORDINDEX2INFO(24766)
+           INVALID, o2(0xf4,0x91), o2(0xf4,0x92), o2(0xf4,0x93),
+     o2(0xf4,0x94), o2(0xf4,0x95), o2(0xf4,0x96), o2(0xf4,0x97),
+     o2(0xf4,0x98), o2(0xf4,0x99), o2(0xf4,0x9a), o2(0xf4,0x9b),
+     o2(0xf4,0x9c), o2(0xf4,0x9d), o2(0xf4,0x9e), o2(0xf4,0x9f),
+     o2(0xf4,0xa0), o2(0xf4,0xa1), o2(0xf4,0xa2), o2(0xf4,0xa3),
+     o2(0xf4,0xa4), o2(0xf4,0xa5), o2(0xf4,0xa6), o2(0xf4,0xa7),
+     o2(0xf4,0xa8), o2(0xf4,0xa9), o2(0xf4,0xaa), o2(0xf4,0xab),
+     o2(0xf4,0xac), o2(0xf4,0xad), o2(0xf4,0xae), o2(0xf4,0xaf),
+     o2(0xf4,0xb0), o2(0xf4,0xb1), o2(0xf4,0xb2), o2(0xf4,0xb3),
+     o2(0xf4,0xb4), o2(0xf4,0xb5), o2(0xf4,0xb6), o2(0xf4,0xb7),
+     o2(0xf4,0xb8), o2(0xf4,0xb9), o2(0xf4,0xba), o2(0xf4,0xbb),
+     o2(0xf4,0xbc), o2(0xf4,0xbd), o2(0xf4,0xbe), o2(0xf4,0xbf),
+     o2(0xf4,0xc0), o2(0xf4,0xc1), o2(0xf4,0xc2), o2(0xf4,0xc3),
+     o2(0xf4,0xc4), o2(0xf4,0xc5), o2(0xf4,0xc6), o2(0xf4,0xc7),
+     o2(0xf4,0xc8), o2(0xf4,0xc9), o2(0xf4,0xca), o2(0xf4,0xcb),
+     o2(0xf4,0xcc), o2(0xf4,0xcd), o2(0xf4,0xce), o2(0xf4,0xcf),
+     o2(0xf4,0xd0),
+
+#define to_Windows_31J_EE_8D WORDINDEX2INFO(24831)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8D_infos,
+
+#define to_Windows_31J_EE_8E_infos WORDINDEX2INFO(24833)
+           INVALID, o2(0xf4,0xd1), o2(0xf4,0xd2), o2(0xf4,0xd3),
+     o2(0xf4,0xd4), o2(0xf4,0xd5), o2(0xf4,0xd6), o2(0xf4,0xd7),
+     o2(0xf4,0xd8), o2(0xf4,0xd9), o2(0xf4,0xda), o2(0xf4,0xdb),
+     o2(0xf4,0xdc), o2(0xf4,0xdd), o2(0xf4,0xde), o2(0xf4,0xdf),
+     o2(0xf4,0xe0), o2(0xf4,0xe1), o2(0xf4,0xe2), o2(0xf4,0xe3),
+     o2(0xf4,0xe4), o2(0xf4,0xe5), o2(0xf4,0xe6), o2(0xf4,0xe7),
+     o2(0xf4,0xe8), o2(0xf4,0xe9), o2(0xf4,0xea), o2(0xf4,0xeb),
+     o2(0xf4,0xec), o2(0xf4,0xed), o2(0xf4,0xee), o2(0xf4,0xef),
+     o2(0xf4,0xf0), o2(0xf4,0xf1), o2(0xf4,0xf2), o2(0xf4,0xf3),
+     o2(0xf4,0xf4), o2(0xf4,0xf5), o2(0xf4,0xf6), o2(0xf4,0xf7),
+     o2(0xf4,0xf8), o2(0xf4,0xf9), o2(0xf4,0xfa), o2(0xf4,0xfb),
+     o2(0xf4,0xfc), o2(0xf5,0x40), o2(0xf5,0x41), o2(0xf5,0x42),
+     o2(0xf5,0x43), o2(0xf5,0x44), o2(0xf5,0x45), o2(0xf5,0x46),
+     o2(0xf5,0x47), o2(0xf5,0x48), o2(0xf5,0x49), o2(0xf5,0x4a),
+     o2(0xf5,0x4b), o2(0xf5,0x4c), o2(0xf5,0x4d), o2(0xf5,0x4e),
+     o2(0xf5,0x4f), o2(0xf5,0x50), o2(0xf5,0x51), o2(0xf5,0x52),
+     o2(0xf5,0x53),
+
+#define to_Windows_31J_EE_8E WORDINDEX2INFO(24898)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8E_infos,
+
+#define to_Windows_31J_EE_8F_infos WORDINDEX2INFO(24900)
+           INVALID, o2(0xf5,0x54), o2(0xf5,0x55), o2(0xf5,0x56),
+     o2(0xf5,0x57), o2(0xf5,0x58), o2(0xf5,0x59), o2(0xf5,0x5a),
+     o2(0xf5,0x5b), o2(0xf5,0x5c), o2(0xf5,0x5d), o2(0xf5,0x5e),
+     o2(0xf5,0x5f), o2(0xf5,0x60), o2(0xf5,0x61), o2(0xf5,0x62),
+     o2(0xf5,0x63), o2(0xf5,0x64), o2(0xf5,0x65), o2(0xf5,0x66),
+     o2(0xf5,0x67), o2(0xf5,0x68), o2(0xf5,0x69), o2(0xf5,0x6a),
+     o2(0xf5,0x6b), o2(0xf5,0x6c), o2(0xf5,0x6d), o2(0xf5,0x6e),
+     o2(0xf5,0x6f), o2(0xf5,0x70), o2(0xf5,0x71), o2(0xf5,0x72),
+     o2(0xf5,0x73), o2(0xf5,0x74), o2(0xf5,0x75), o2(0xf5,0x76),
+     o2(0xf5,0x77), o2(0xf5,0x78), o2(0xf5,0x79), o2(0xf5,0x7a),
+     o2(0xf5,0x7b), o2(0xf5,0x7c), o2(0xf5,0x7d), o2(0xf5,0x7e),
+     o2(0xf5,0x80), o2(0xf5,0x81), o2(0xf5,0x82), o2(0xf5,0x83),
+     o2(0xf5,0x84), o2(0xf5,0x85), o2(0xf5,0x86), o2(0xf5,0x87),
+     o2(0xf5,0x88), o2(0xf5,0x89), o2(0xf5,0x8a), o2(0xf5,0x8b),
+     o2(0xf5,0x8c), o2(0xf5,0x8d), o2(0xf5,0x8e), o2(0xf5,0x8f),
+     o2(0xf5,0x90), o2(0xf5,0x91), o2(0xf5,0x92), o2(0xf5,0x93),
+     o2(0xf5,0x94),
+
+#define to_Windows_31J_EE_8F WORDINDEX2INFO(24965)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_8F_infos,
+
+#define to_Windows_31J_EE_90_infos WORDINDEX2INFO(24967)
+           INVALID, o2(0xf5,0x95), o2(0xf5,0x96), o2(0xf5,0x97),
+     o2(0xf5,0x98), o2(0xf5,0x99), o2(0xf5,0x9a), o2(0xf5,0x9b),
+     o2(0xf5,0x9c), o2(0xf5,0x9d), o2(0xf5,0x9e), o2(0xf5,0x9f),
+     o2(0xf5,0xa0), o2(0xf5,0xa1), o2(0xf5,0xa2), o2(0xf5,0xa3),
+     o2(0xf5,0xa4), o2(0xf5,0xa5), o2(0xf5,0xa6), o2(0xf5,0xa7),
+     o2(0xf5,0xa8), o2(0xf5,0xa9), o2(0xf5,0xaa), o2(0xf5,0xab),
+     o2(0xf5,0xac), o2(0xf5,0xad), o2(0xf5,0xae), o2(0xf5,0xaf),
+     o2(0xf5,0xb0), o2(0xf5,0xb1), o2(0xf5,0xb2), o2(0xf5,0xb3),
+     o2(0xf5,0xb4), o2(0xf5,0xb5), o2(0xf5,0xb6), o2(0xf5,0xb7),
+     o2(0xf5,0xb8), o2(0xf5,0xb9), o2(0xf5,0xba), o2(0xf5,0xbb),
+     o2(0xf5,0xbc), o2(0xf5,0xbd), o2(0xf5,0xbe), o2(0xf5,0xbf),
+     o2(0xf5,0xc0), o2(0xf5,0xc1), o2(0xf5,0xc2), o2(0xf5,0xc3),
+     o2(0xf5,0xc4), o2(0xf5,0xc5), o2(0xf5,0xc6), o2(0xf5,0xc7),
+     o2(0xf5,0xc8), o2(0xf5,0xc9), o2(0xf5,0xca), o2(0xf5,0xcb),
+     o2(0xf5,0xcc), o2(0xf5,0xcd), o2(0xf5,0xce), o2(0xf5,0xcf),
+     o2(0xf5,0xd0), o2(0xf5,0xd1), o2(0xf5,0xd2), o2(0xf5,0xd3),
+     o2(0xf5,0xd4),
+
+#define to_Windows_31J_EE_90 WORDINDEX2INFO(25032)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_90_infos,
+
+#define to_Windows_31J_EE_91_infos WORDINDEX2INFO(25034)
+           INVALID, o2(0xf5,0xd5), o2(0xf5,0xd6), o2(0xf5,0xd7),
+     o2(0xf5,0xd8), o2(0xf5,0xd9), o2(0xf5,0xda), o2(0xf5,0xdb),
+     o2(0xf5,0xdc), o2(0xf5,0xdd), o2(0xf5,0xde), o2(0xf5,0xdf),
+     o2(0xf5,0xe0), o2(0xf5,0xe1), o2(0xf5,0xe2), o2(0xf5,0xe3),
+     o2(0xf5,0xe4), o2(0xf5,0xe5), o2(0xf5,0xe6), o2(0xf5,0xe7),
+     o2(0xf5,0xe8), o2(0xf5,0xe9), o2(0xf5,0xea), o2(0xf5,0xeb),
+     o2(0xf5,0xec), o2(0xf5,0xed), o2(0xf5,0xee), o2(0xf5,0xef),
+     o2(0xf5,0xf0), o2(0xf5,0xf1), o2(0xf5,0xf2), o2(0xf5,0xf3),
+     o2(0xf5,0xf4), o2(0xf5,0xf5), o2(0xf5,0xf6), o2(0xf5,0xf7),
+     o2(0xf5,0xf8), o2(0xf5,0xf9), o2(0xf5,0xfa), o2(0xf5,0xfb),
+     o2(0xf5,0xfc), o2(0xf6,0x40), o2(0xf6,0x41), o2(0xf6,0x42),
+     o2(0xf6,0x43), o2(0xf6,0x44), o2(0xf6,0x45), o2(0xf6,0x46),
+     o2(0xf6,0x47), o2(0xf6,0x48), o2(0xf6,0x49), o2(0xf6,0x4a),
+     o2(0xf6,0x4b), o2(0xf6,0x4c), o2(0xf6,0x4d), o2(0xf6,0x4e),
+     o2(0xf6,0x4f), o2(0xf6,0x50), o2(0xf6,0x51), o2(0xf6,0x52),
+     o2(0xf6,0x53), o2(0xf6,0x54), o2(0xf6,0x55), o2(0xf6,0x56),
+     o2(0xf6,0x57),
+
+#define to_Windows_31J_EE_91 WORDINDEX2INFO(25099)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_91_infos,
+
+#define to_Windows_31J_EE_92_infos WORDINDEX2INFO(25101)
+           INVALID, o2(0xf6,0x58), o2(0xf6,0x59), o2(0xf6,0x5a),
+     o2(0xf6,0x5b), o2(0xf6,0x5c), o2(0xf6,0x5d), o2(0xf6,0x5e),
+     o2(0xf6,0x5f), o2(0xf6,0x60), o2(0xf6,0x61), o2(0xf6,0x62),
+     o2(0xf6,0x63), o2(0xf6,0x64), o2(0xf6,0x65), o2(0xf6,0x66),
+     o2(0xf6,0x67), o2(0xf6,0x68), o2(0xf6,0x69), o2(0xf6,0x6a),
+     o2(0xf6,0x6b), o2(0xf6,0x6c), o2(0xf6,0x6d), o2(0xf6,0x6e),
+     o2(0xf6,0x6f), o2(0xf6,0x70), o2(0xf6,0x71), o2(0xf6,0x72),
+     o2(0xf6,0x73), o2(0xf6,0x74), o2(0xf6,0x75), o2(0xf6,0x76),
+     o2(0xf6,0x77), o2(0xf6,0x78), o2(0xf6,0x79), o2(0xf6,0x7a),
+     o2(0xf6,0x7b), o2(0xf6,0x7c), o2(0xf6,0x7d), o2(0xf6,0x7e),
+     o2(0xf6,0x80), o2(0xf6,0x81), o2(0xf6,0x82), o2(0xf6,0x83),
+     o2(0xf6,0x84), o2(0xf6,0x85), o2(0xf6,0x86), o2(0xf6,0x87),
+     o2(0xf6,0x88), o2(0xf6,0x89), o2(0xf6,0x8a), o2(0xf6,0x8b),
+     o2(0xf6,0x8c), o2(0xf6,0x8d), o2(0xf6,0x8e), o2(0xf6,0x8f),
+     o2(0xf6,0x90), o2(0xf6,0x91), o2(0xf6,0x92), o2(0xf6,0x93),
+     o2(0xf6,0x94), o2(0xf6,0x95), o2(0xf6,0x96), o2(0xf6,0x97),
+     o2(0xf6,0x98),
+
+#define to_Windows_31J_EE_92 WORDINDEX2INFO(25166)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_92_infos,
+
+#define to_Windows_31J_EE_93_infos WORDINDEX2INFO(25168)
+           INVALID, o2(0xf6,0x99), o2(0xf6,0x9a), o2(0xf6,0x9b),
+     o2(0xf6,0x9c), o2(0xf6,0x9d), o2(0xf6,0x9e), o2(0xf6,0x9f),
+     o2(0xf6,0xa0), o2(0xf6,0xa1), o2(0xf6,0xa2), o2(0xf6,0xa3),
+     o2(0xf6,0xa4), o2(0xf6,0xa5), o2(0xf6,0xa6), o2(0xf6,0xa7),
+     o2(0xf6,0xa8), o2(0xf6,0xa9), o2(0xf6,0xaa), o2(0xf6,0xab),
+     o2(0xf6,0xac), o2(0xf6,0xad), o2(0xf6,0xae), o2(0xf6,0xaf),
+     o2(0xf6,0xb0), o2(0xf6,0xb1), o2(0xf6,0xb2), o2(0xf6,0xb3),
+     o2(0xf6,0xb4), o2(0xf6,0xb5), o2(0xf6,0xb6), o2(0xf6,0xb7),
+     o2(0xf6,0xb8), o2(0xf6,0xb9), o2(0xf6,0xba), o2(0xf6,0xbb),
+     o2(0xf6,0xbc), o2(0xf6,0xbd), o2(0xf6,0xbe), o2(0xf6,0xbf),
+     o2(0xf6,0xc0), o2(0xf6,0xc1), o2(0xf6,0xc2), o2(0xf6,0xc3),
+     o2(0xf6,0xc4), o2(0xf6,0xc5), o2(0xf6,0xc6), o2(0xf6,0xc7),
+     o2(0xf6,0xc8), o2(0xf6,0xc9), o2(0xf6,0xca), o2(0xf6,0xcb),
+     o2(0xf6,0xcc), o2(0xf6,0xcd), o2(0xf6,0xce), o2(0xf6,0xcf),
+     o2(0xf6,0xd0), o2(0xf6,0xd1), o2(0xf6,0xd2), o2(0xf6,0xd3),
+     o2(0xf6,0xd4), o2(0xf6,0xd5), o2(0xf6,0xd6), o2(0xf6,0xd7),
+     o2(0xf6,0xd8),
+
+#define to_Windows_31J_EE_93 WORDINDEX2INFO(25233)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_93_infos,
+
+#define to_Windows_31J_EE_94_infos WORDINDEX2INFO(25235)
+           INVALID, o2(0xf6,0xd9), o2(0xf6,0xda), o2(0xf6,0xdb),
+     o2(0xf6,0xdc), o2(0xf6,0xdd), o2(0xf6,0xde), o2(0xf6,0xdf),
+     o2(0xf6,0xe0), o2(0xf6,0xe1), o2(0xf6,0xe2), o2(0xf6,0xe3),
+     o2(0xf6,0xe4), o2(0xf6,0xe5), o2(0xf6,0xe6), o2(0xf6,0xe7),
+     o2(0xf6,0xe8), o2(0xf6,0xe9), o2(0xf6,0xea), o2(0xf6,0xeb),
+     o2(0xf6,0xec), o2(0xf6,0xed), o2(0xf6,0xee), o2(0xf6,0xef),
+     o2(0xf6,0xf0), o2(0xf6,0xf1), o2(0xf6,0xf2), o2(0xf6,0xf3),
+     o2(0xf6,0xf4), o2(0xf6,0xf5), o2(0xf6,0xf6), o2(0xf6,0xf7),
+     o2(0xf6,0xf8), o2(0xf6,0xf9), o2(0xf6,0xfa), o2(0xf6,0xfb),
+     o2(0xf6,0xfc), o2(0xf7,0x40), o2(0xf7,0x41), o2(0xf7,0x42),
+     o2(0xf7,0x43), o2(0xf7,0x44), o2(0xf7,0x45), o2(0xf7,0x46),
+     o2(0xf7,0x47), o2(0xf7,0x48), o2(0xf7,0x49), o2(0xf7,0x4a),
+     o2(0xf7,0x4b), o2(0xf7,0x4c), o2(0xf7,0x4d), o2(0xf7,0x4e),
+     o2(0xf7,0x4f), o2(0xf7,0x50), o2(0xf7,0x51), o2(0xf7,0x52),
+     o2(0xf7,0x53), o2(0xf7,0x54), o2(0xf7,0x55), o2(0xf7,0x56),
+     o2(0xf7,0x57), o2(0xf7,0x58), o2(0xf7,0x59), o2(0xf7,0x5a),
+     o2(0xf7,0x5b),
+
+#define to_Windows_31J_EE_94 WORDINDEX2INFO(25300)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_94_infos,
+
+#define to_Windows_31J_EE_95_infos WORDINDEX2INFO(25302)
+           INVALID, o2(0xf7,0x5c), o2(0xf7,0x5d), o2(0xf7,0x5e),
+     o2(0xf7,0x5f), o2(0xf7,0x60), o2(0xf7,0x61), o2(0xf7,0x62),
+     o2(0xf7,0x63), o2(0xf7,0x64), o2(0xf7,0x65), o2(0xf7,0x66),
+     o2(0xf7,0x67), o2(0xf7,0x68), o2(0xf7,0x69), o2(0xf7,0x6a),
+     o2(0xf7,0x6b), o2(0xf7,0x6c), o2(0xf7,0x6d), o2(0xf7,0x6e),
+     o2(0xf7,0x6f), o2(0xf7,0x70), o2(0xf7,0x71), o2(0xf7,0x72),
+     o2(0xf7,0x73), o2(0xf7,0x74), o2(0xf7,0x75), o2(0xf7,0x76),
+     o2(0xf7,0x77), o2(0xf7,0x78), o2(0xf7,0x79), o2(0xf7,0x7a),
+     o2(0xf7,0x7b), o2(0xf7,0x7c), o2(0xf7,0x7d), o2(0xf7,0x7e),
+     o2(0xf7,0x80), o2(0xf7,0x81), o2(0xf7,0x82), o2(0xf7,0x83),
+     o2(0xf7,0x84), o2(0xf7,0x85), o2(0xf7,0x86), o2(0xf7,0x87),
+     o2(0xf7,0x88), o2(0xf7,0x89), o2(0xf7,0x8a), o2(0xf7,0x8b),
+     o2(0xf7,0x8c), o2(0xf7,0x8d), o2(0xf7,0x8e), o2(0xf7,0x8f),
+     o2(0xf7,0x90), o2(0xf7,0x91), o2(0xf7,0x92), o2(0xf7,0x93),
+     o2(0xf7,0x94), o2(0xf7,0x95), o2(0xf7,0x96), o2(0xf7,0x97),
+     o2(0xf7,0x98), o2(0xf7,0x99), o2(0xf7,0x9a), o2(0xf7,0x9b),
+     o2(0xf7,0x9c),
+
+#define to_Windows_31J_EE_95 WORDINDEX2INFO(25367)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_95_infos,
+
+#define to_Windows_31J_EE_96_infos WORDINDEX2INFO(25369)
+           INVALID, o2(0xf7,0x9d), o2(0xf7,0x9e), o2(0xf7,0x9f),
+     o2(0xf7,0xa0), o2(0xf7,0xa1), o2(0xf7,0xa2), o2(0xf7,0xa3),
+     o2(0xf7,0xa4), o2(0xf7,0xa5), o2(0xf7,0xa6), o2(0xf7,0xa7),
+     o2(0xf7,0xa8), o2(0xf7,0xa9), o2(0xf7,0xaa), o2(0xf7,0xab),
+     o2(0xf7,0xac), o2(0xf7,0xad), o2(0xf7,0xae), o2(0xf7,0xaf),
+     o2(0xf7,0xb0), o2(0xf7,0xb1), o2(0xf7,0xb2), o2(0xf7,0xb3),
+     o2(0xf7,0xb4), o2(0xf7,0xb5), o2(0xf7,0xb6), o2(0xf7,0xb7),
+     o2(0xf7,0xb8), o2(0xf7,0xb9), o2(0xf7,0xba), o2(0xf7,0xbb),
+     o2(0xf7,0xbc), o2(0xf7,0xbd), o2(0xf7,0xbe), o2(0xf7,0xbf),
+     o2(0xf7,0xc0), o2(0xf7,0xc1), o2(0xf7,0xc2), o2(0xf7,0xc3),
+     o2(0xf7,0xc4), o2(0xf7,0xc5), o2(0xf7,0xc6), o2(0xf7,0xc7),
+     o2(0xf7,0xc8), o2(0xf7,0xc9), o2(0xf7,0xca), o2(0xf7,0xcb),
+     o2(0xf7,0xcc), o2(0xf7,0xcd), o2(0xf7,0xce), o2(0xf7,0xcf),
+     o2(0xf7,0xd0), o2(0xf7,0xd1), o2(0xf7,0xd2), o2(0xf7,0xd3),
+     o2(0xf7,0xd4), o2(0xf7,0xd5), o2(0xf7,0xd6), o2(0xf7,0xd7),
+     o2(0xf7,0xd8), o2(0xf7,0xd9), o2(0xf7,0xda), o2(0xf7,0xdb),
+     o2(0xf7,0xdc),
+
+#define to_Windows_31J_EE_96 WORDINDEX2INFO(25434)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_96_infos,
+
+#define to_Windows_31J_EE_97_infos WORDINDEX2INFO(25436)
+           INVALID, o2(0xf7,0xdd), o2(0xf7,0xde), o2(0xf7,0xdf),
+     o2(0xf7,0xe0), o2(0xf7,0xe1), o2(0xf7,0xe2), o2(0xf7,0xe3),
+     o2(0xf7,0xe4), o2(0xf7,0xe5), o2(0xf7,0xe6), o2(0xf7,0xe7),
+     o2(0xf7,0xe8), o2(0xf7,0xe9), o2(0xf7,0xea), o2(0xf7,0xeb),
+     o2(0xf7,0xec), o2(0xf7,0xed), o2(0xf7,0xee), o2(0xf7,0xef),
+     o2(0xf7,0xf0), o2(0xf7,0xf1), o2(0xf7,0xf2), o2(0xf7,0xf3),
+     o2(0xf7,0xf4), o2(0xf7,0xf5), o2(0xf7,0xf6), o2(0xf7,0xf7),
+     o2(0xf7,0xf8), o2(0xf7,0xf9), o2(0xf7,0xfa), o2(0xf7,0xfb),
+     o2(0xf7,0xfc), o2(0xf8,0x40), o2(0xf8,0x41), o2(0xf8,0x42),
+     o2(0xf8,0x43), o2(0xf8,0x44), o2(0xf8,0x45), o2(0xf8,0x46),
+     o2(0xf8,0x47), o2(0xf8,0x48), o2(0xf8,0x49), o2(0xf8,0x4a),
+     o2(0xf8,0x4b), o2(0xf8,0x4c), o2(0xf8,0x4d), o2(0xf8,0x4e),
+     o2(0xf8,0x4f), o2(0xf8,0x50), o2(0xf8,0x51), o2(0xf8,0x52),
+     o2(0xf8,0x53), o2(0xf8,0x54), o2(0xf8,0x55), o2(0xf8,0x56),
+     o2(0xf8,0x57), o2(0xf8,0x58), o2(0xf8,0x59), o2(0xf8,0x5a),
+     o2(0xf8,0x5b), o2(0xf8,0x5c), o2(0xf8,0x5d), o2(0xf8,0x5e),
+     o2(0xf8,0x5f),
+
+#define to_Windows_31J_EE_97 WORDINDEX2INFO(25501)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_97_infos,
+
+#define to_Windows_31J_EE_98_infos WORDINDEX2INFO(25503)
+           INVALID, o2(0xf8,0x60), o2(0xf8,0x61), o2(0xf8,0x62),
+     o2(0xf8,0x63), o2(0xf8,0x64), o2(0xf8,0x65), o2(0xf8,0x66),
+     o2(0xf8,0x67), o2(0xf8,0x68), o2(0xf8,0x69), o2(0xf8,0x6a),
+     o2(0xf8,0x6b), o2(0xf8,0x6c), o2(0xf8,0x6d), o2(0xf8,0x6e),
+     o2(0xf8,0x6f), o2(0xf8,0x70), o2(0xf8,0x71), o2(0xf8,0x72),
+     o2(0xf8,0x73), o2(0xf8,0x74), o2(0xf8,0x75), o2(0xf8,0x76),
+     o2(0xf8,0x77), o2(0xf8,0x78), o2(0xf8,0x79), o2(0xf8,0x7a),
+     o2(0xf8,0x7b), o2(0xf8,0x7c), o2(0xf8,0x7d), o2(0xf8,0x7e),
+     o2(0xf8,0x80), o2(0xf8,0x81), o2(0xf8,0x82), o2(0xf8,0x83),
+     o2(0xf8,0x84), o2(0xf8,0x85), o2(0xf8,0x86), o2(0xf8,0x87),
+     o2(0xf8,0x88), o2(0xf8,0x89), o2(0xf8,0x8a), o2(0xf8,0x8b),
+     o2(0xf8,0x8c), o2(0xf8,0x8d), o2(0xf8,0x8e), o2(0xf8,0x8f),
+     o2(0xf8,0x90), o2(0xf8,0x91), o2(0xf8,0x92), o2(0xf8,0x93),
+     o2(0xf8,0x94), o2(0xf8,0x95), o2(0xf8,0x96), o2(0xf8,0x97),
+     o2(0xf8,0x98), o2(0xf8,0x99), o2(0xf8,0x9a), o2(0xf8,0x9b),
+     o2(0xf8,0x9c), o2(0xf8,0x9d), o2(0xf8,0x9e), o2(0xf8,0x9f),
+     o2(0xf8,0xa0),
+
+#define to_Windows_31J_EE_98 WORDINDEX2INFO(25568)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_98_infos,
+
+#define to_Windows_31J_EE_99_infos WORDINDEX2INFO(25570)
+           INVALID, o2(0xf8,0xa1), o2(0xf8,0xa2), o2(0xf8,0xa3),
+     o2(0xf8,0xa4), o2(0xf8,0xa5), o2(0xf8,0xa6), o2(0xf8,0xa7),
+     o2(0xf8,0xa8), o2(0xf8,0xa9), o2(0xf8,0xaa), o2(0xf8,0xab),
+     o2(0xf8,0xac), o2(0xf8,0xad), o2(0xf8,0xae), o2(0xf8,0xaf),
+     o2(0xf8,0xb0), o2(0xf8,0xb1), o2(0xf8,0xb2), o2(0xf8,0xb3),
+     o2(0xf8,0xb4), o2(0xf8,0xb5), o2(0xf8,0xb6), o2(0xf8,0xb7),
+     o2(0xf8,0xb8), o2(0xf8,0xb9), o2(0xf8,0xba), o2(0xf8,0xbb),
+     o2(0xf8,0xbc), o2(0xf8,0xbd), o2(0xf8,0xbe), o2(0xf8,0xbf),
+     o2(0xf8,0xc0), o2(0xf8,0xc1), o2(0xf8,0xc2), o2(0xf8,0xc3),
+     o2(0xf8,0xc4), o2(0xf8,0xc5), o2(0xf8,0xc6), o2(0xf8,0xc7),
+     o2(0xf8,0xc8), o2(0xf8,0xc9), o2(0xf8,0xca), o2(0xf8,0xcb),
+     o2(0xf8,0xcc), o2(0xf8,0xcd), o2(0xf8,0xce), o2(0xf8,0xcf),
+     o2(0xf8,0xd0), o2(0xf8,0xd1), o2(0xf8,0xd2), o2(0xf8,0xd3),
+     o2(0xf8,0xd4), o2(0xf8,0xd5), o2(0xf8,0xd6), o2(0xf8,0xd7),
+     o2(0xf8,0xd8), o2(0xf8,0xd9), o2(0xf8,0xda), o2(0xf8,0xdb),
+     o2(0xf8,0xdc), o2(0xf8,0xdd), o2(0xf8,0xde), o2(0xf8,0xdf),
+     o2(0xf8,0xe0),
+
+#define to_Windows_31J_EE_99 WORDINDEX2INFO(25635)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_99_infos,
+
+#define to_Windows_31J_EE_9A_infos WORDINDEX2INFO(25637)
+           INVALID, o2(0xf8,0xe1), o2(0xf8,0xe2), o2(0xf8,0xe3),
+     o2(0xf8,0xe4), o2(0xf8,0xe5), o2(0xf8,0xe6), o2(0xf8,0xe7),
+     o2(0xf8,0xe8), o2(0xf8,0xe9), o2(0xf8,0xea), o2(0xf8,0xeb),
+     o2(0xf8,0xec), o2(0xf8,0xed), o2(0xf8,0xee), o2(0xf8,0xef),
+     o2(0xf8,0xf0), o2(0xf8,0xf1), o2(0xf8,0xf2), o2(0xf8,0xf3),
+     o2(0xf8,0xf4), o2(0xf8,0xf5), o2(0xf8,0xf6), o2(0xf8,0xf7),
+     o2(0xf8,0xf8), o2(0xf8,0xf9), o2(0xf8,0xfa), o2(0xf8,0xfb),
+     o2(0xf8,0xfc), o2(0xf9,0x40), o2(0xf9,0x41), o2(0xf9,0x42),
+     o2(0xf9,0x43), o2(0xf9,0x44), o2(0xf9,0x45), o2(0xf9,0x46),
+     o2(0xf9,0x47), o2(0xf9,0x48), o2(0xf9,0x49), o2(0xf9,0x4a),
+     o2(0xf9,0x4b), o2(0xf9,0x4c), o2(0xf9,0x4d), o2(0xf9,0x4e),
+     o2(0xf9,0x4f), o2(0xf9,0x50), o2(0xf9,0x51), o2(0xf9,0x52),
+     o2(0xf9,0x53), o2(0xf9,0x54), o2(0xf9,0x55), o2(0xf9,0x56),
+     o2(0xf9,0x57), o2(0xf9,0x58), o2(0xf9,0x59), o2(0xf9,0x5a),
+     o2(0xf9,0x5b), o2(0xf9,0x5c), o2(0xf9,0x5d), o2(0xf9,0x5e),
+     o2(0xf9,0x5f), o2(0xf9,0x60), o2(0xf9,0x61), o2(0xf9,0x62),
+     o2(0xf9,0x63),
+
+#define to_Windows_31J_EE_9A WORDINDEX2INFO(25702)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_9A_infos,
+
+#define to_Windows_31J_EE_9B_infos WORDINDEX2INFO(25704)
+           INVALID, o2(0xf9,0x64), o2(0xf9,0x65), o2(0xf9,0x66),
+     o2(0xf9,0x67), o2(0xf9,0x68), o2(0xf9,0x69), o2(0xf9,0x6a),
+     o2(0xf9,0x6b), o2(0xf9,0x6c), o2(0xf9,0x6d), o2(0xf9,0x6e),
+     o2(0xf9,0x6f), o2(0xf9,0x70), o2(0xf9,0x71), o2(0xf9,0x72),
+     o2(0xf9,0x73), o2(0xf9,0x74), o2(0xf9,0x75), o2(0xf9,0x76),
+     o2(0xf9,0x77), o2(0xf9,0x78), o2(0xf9,0x79), o2(0xf9,0x7a),
+     o2(0xf9,0x7b), o2(0xf9,0x7c), o2(0xf9,0x7d), o2(0xf9,0x7e),
+     o2(0xf9,0x80), o2(0xf9,0x81), o2(0xf9,0x82), o2(0xf9,0x83),
+     o2(0xf9,0x84), o2(0xf9,0x85), o2(0xf9,0x86), o2(0xf9,0x87),
+     o2(0xf9,0x88), o2(0xf9,0x89), o2(0xf9,0x8a), o2(0xf9,0x8b),
+     o2(0xf9,0x8c), o2(0xf9,0x8d), o2(0xf9,0x8e), o2(0xf9,0x8f),
+     o2(0xf9,0x90), o2(0xf9,0x91), o2(0xf9,0x92), o2(0xf9,0x93),
+     o2(0xf9,0x94), o2(0xf9,0x95), o2(0xf9,0x96), o2(0xf9,0x97),
+     o2(0xf9,0x98), o2(0xf9,0x99), o2(0xf9,0x9a), o2(0xf9,0x9b),
+     o2(0xf9,0x9c), o2(0xf9,0x9d), o2(0xf9,0x9e), o2(0xf9,0x9f),
+     o2(0xf9,0xa0), o2(0xf9,0xa1), o2(0xf9,0xa2), o2(0xf9,0xa3),
+     o2(0xf9,0xa4),
+
+#define to_Windows_31J_EE_9B WORDINDEX2INFO(25769)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_9B_infos,
+
+#define to_Windows_31J_EE_9C_infos WORDINDEX2INFO(25771)
+           INVALID, o2(0xf9,0xa5), o2(0xf9,0xa6), o2(0xf9,0xa7),
+     o2(0xf9,0xa8), o2(0xf9,0xa9), o2(0xf9,0xaa), o2(0xf9,0xab),
+     o2(0xf9,0xac), o2(0xf9,0xad), o2(0xf9,0xae), o2(0xf9,0xaf),
+     o2(0xf9,0xb0), o2(0xf9,0xb1), o2(0xf9,0xb2), o2(0xf9,0xb3),
+     o2(0xf9,0xb4), o2(0xf9,0xb5), o2(0xf9,0xb6), o2(0xf9,0xb7),
+     o2(0xf9,0xb8), o2(0xf9,0xb9), o2(0xf9,0xba), o2(0xf9,0xbb),
+     o2(0xf9,0xbc), o2(0xf9,0xbd), o2(0xf9,0xbe), o2(0xf9,0xbf),
+     o2(0xf9,0xc0), o2(0xf9,0xc1), o2(0xf9,0xc2), o2(0xf9,0xc3),
+     o2(0xf9,0xc4), o2(0xf9,0xc5), o2(0xf9,0xc6), o2(0xf9,0xc7),
+     o2(0xf9,0xc8), o2(0xf9,0xc9), o2(0xf9,0xca), o2(0xf9,0xcb),
+     o2(0xf9,0xcc), o2(0xf9,0xcd), o2(0xf9,0xce), o2(0xf9,0xcf),
+     o2(0xf9,0xd0), o2(0xf9,0xd1), o2(0xf9,0xd2), o2(0xf9,0xd3),
+     o2(0xf9,0xd4), o2(0xf9,0xd5), o2(0xf9,0xd6), o2(0xf9,0xd7),
+     o2(0xf9,0xd8), o2(0xf9,0xd9), o2(0xf9,0xda), o2(0xf9,0xdb),
+     o2(0xf9,0xdc), o2(0xf9,0xdd), o2(0xf9,0xde), o2(0xf9,0xdf),
+     o2(0xf9,0xe0), o2(0xf9,0xe1), o2(0xf9,0xe2), o2(0xf9,0xe3),
+     o2(0xf9,0xe4),
+
+#define to_Windows_31J_EE_9C WORDINDEX2INFO(25836)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EE_9C_infos,
+
+#define to_Windows_31J_EE_9D_infos WORDINDEX2INFO(25838)
+           INVALID, o2(0xf9,0xe5), o2(0xf9,0xe6), o2(0xf9,0xe7),
+     o2(0xf9,0xe8), o2(0xf9,0xe9), o2(0xf9,0xea), o2(0xf9,0xeb),
+     o2(0xf9,0xec), o2(0xf9,0xed), o2(0xf9,0xee), o2(0xf9,0xef),
+     o2(0xf9,0xf0), o2(0xf9,0xf1), o2(0xf9,0xf2), o2(0xf9,0xf3),
+     o2(0xf9,0xf4), o2(0xf9,0xf5), o2(0xf9,0xf6), o2(0xf9,0xf7),
+     o2(0xf9,0xf8), o2(0xf9,0xf9), o2(0xf9,0xfa), o2(0xf9,0xfb),
+     o2(0xf9,0xfc),         UNDEF,
+
+#define to_Windows_31J_EE_9D WORDINDEX2INFO(25864)
+    to_Windows_31J_EE_9D_offsets,
+    to_Windows_31J_EE_9D_infos,
+
+#define to_Windows_31J_EE_infos WORDINDEX2INFO(25866)
+                  INVALID, to_Windows_31J_EE_80,
+     to_Windows_31J_EE_81, to_Windows_31J_EE_82,
+     to_Windows_31J_EE_83, to_Windows_31J_EE_84,
+     to_Windows_31J_EE_85, to_Windows_31J_EE_86,
+     to_Windows_31J_EE_87, to_Windows_31J_EE_88,
+     to_Windows_31J_EE_89, to_Windows_31J_EE_8A,
+     to_Windows_31J_EE_8B, to_Windows_31J_EE_8C,
+     to_Windows_31J_EE_8D, to_Windows_31J_EE_8E,
+     to_Windows_31J_EE_8F, to_Windows_31J_EE_90,
+     to_Windows_31J_EE_91, to_Windows_31J_EE_92,
+     to_Windows_31J_EE_93, to_Windows_31J_EE_94,
+     to_Windows_31J_EE_95, to_Windows_31J_EE_96,
+     to_Windows_31J_EE_97, to_Windows_31J_EE_98,
+     to_Windows_31J_EE_99, to_Windows_31J_EE_9A,
+     to_Windows_31J_EE_9B, to_Windows_31J_EE_9C,
+     to_Windows_31J_EE_9D,      to_Shift_JIS_C4,
+
+#define to_Windows_31J_EE WORDINDEX2INFO(25898)
+    to_Windows_31J_EE_offsets,
+    to_Windows_31J_EE_infos,
+
+#define to_Windows_31J_EF_A4_infos WORDINDEX2INFO(25900)
+           INVALID,         UNDEF, o2(0xfa,0xe0),
+
+#define to_Windows_31J_EF_A4 WORDINDEX2INFO(25903)
+    to_Windows_31J_EF_A4_offsets,
+    to_Windows_31J_EF_A4_infos,
+
+#define to_Windows_31J_EF_A7_infos WORDINDEX2INFO(25905)
+           INVALID,         UNDEF, o2(0xfb,0xe9),
+
+#define to_Windows_31J_EF_A7 WORDINDEX2INFO(25908)
+    to_Windows_31J_EF_A7_offsets,
+    to_Windows_31J_EF_A7_infos,
+
+#define to_Windows_31J_EF_A8_infos WORDINDEX2INFO(25910)
+           INVALID,         UNDEF, o2(0xfa,0x90), o2(0xfa,0x9b),
+     o2(0xfa,0x9c), o2(0xfa,0xb1), o2(0xfa,0xd8), o2(0xfa,0xe8),
+     o2(0xfa,0xea), o2(0xfb,0x58), o2(0xfb,0x5e), o2(0xfb,0x75),
+     o2(0xfb,0x7d), o2(0xfb,0x7e), o2(0xfb,0x80), o2(0xfb,0x82),
+     o2(0xfb,0x86), o2(0xfb,0x89), o2(0xfb,0x92), o2(0xfb,0x9d),
+     o2(0xfb,0x9f), o2(0xfb,0xa0), o2(0xfb,0xa9), o2(0xfb,0xb1),
+     o2(0xfb,0xb3), o2(0xfb,0xb4), o2(0xfb,0xb7), o2(0xfb,0xd3),
+     o2(0xfb,0xda), o2(0xfb,0xea), o2(0xfb,0xf6), o2(0xfb,0xf7),
+     o2(0xfb,0xf9), o2(0xfc,0x49),
+
+#define to_Windows_31J_EF_A8 WORDINDEX2INFO(25944)
+    to_Windows_31J_EF_A8_offsets,
+    to_Windows_31J_EF_A8_infos,
+
+#define to_Windows_31J_EF_BC_infos WORDINDEX2INFO(25946)
+           INVALID,         UNDEF, o2(0x81,0x49), o2(0xfa,0x57),
+     o2(0x81,0x94), o2(0x81,0x90), o2(0x81,0x93), o2(0x81,0x95),
+     o2(0xfa,0x56), o2(0x81,0x69), o2(0x81,0x6a), o2(0x81,0x96),
+     o2(0x81,0x7b), o2(0x81,0x43), o2(0x81,0x7c), o2(0x81,0x44),
+     o2(0x81,0x5e), o2(0x82,0x4f), o2(0x82,0x50), o2(0x82,0x51),
+     o2(0x82,0x52), o2(0x82,0x53), o2(0x82,0x54), o2(0x82,0x55),
+     o2(0x82,0x56), o2(0x82,0x57), o2(0x82,0x58), o2(0x81,0x46),
+     o2(0x81,0x47), o2(0x81,0x83), o2(0x81,0x81), o2(0x81,0x84),
+     o2(0x81,0x48), o2(0x81,0x97), o2(0x82,0x60), o2(0x82,0x61),
+     o2(0x82,0x62), o2(0x82,0x63), o2(0x82,0x64), o2(0x82,0x65),
+     o2(0x82,0x66), o2(0x82,0x67), o2(0x82,0x68), o2(0x82,0x69),
+     o2(0x82,0x6a), o2(0x82,0x6b), o2(0x82,0x6c), o2(0x82,0x6d),
+     o2(0x82,0x6e), o2(0x82,0x6f), o2(0x82,0x70), o2(0x82,0x71),
+     o2(0x82,0x72), o2(0x82,0x73), o2(0x82,0x74), o2(0x82,0x75),
+     o2(0x82,0x76), o2(0x82,0x77), o2(0x82,0x78), o2(0x82,0x79),
+     o2(0x81,0x6d), o2(0x81,0x5f), o2(0x81,0x6e), o2(0x81,0x4f),
+     o2(0x81,0x51),
+
+#define to_Windows_31J_EF_BC WORDINDEX2INFO(26011)
+    to_Shift_JIS_E3_81_offsets,
+    to_Windows_31J_EF_BC_infos,
+
+#define to_Windows_31J_EF_BD_infos WORDINDEX2INFO(26013)
+           INVALID, o2(0x81,0x4d), o2(0x82,0x81), o2(0x82,0x82),
+     o2(0x82,0x83), o2(0x82,0x84), o2(0x82,0x85), o2(0x82,0x86),
+     o2(0x82,0x87), o2(0x82,0x88), o2(0x82,0x89), o2(0x82,0x8a),
+     o2(0x82,0x8b), o2(0x82,0x8c), o2(0x82,0x8d), o2(0x82,0x8e),
+     o2(0x82,0x8f), o2(0x82,0x90), o2(0x82,0x91), o2(0x82,0x92),
+     o2(0x82,0x93), o2(0x82,0x94), o2(0x82,0x95), o2(0x82,0x96),
+     o2(0x82,0x97), o2(0x82,0x98), o2(0x82,0x99), o2(0x82,0x9a),
+     o2(0x81,0x6f), o2(0x81,0x62), o2(0x81,0x70), o2(0x81,0x60),
+             UNDEF,      o1(0xa1),      o1(0xa2),      o1(0xa3),
+          o1(0xa4),      o1(0xa5),      o1(0xa6),      o1(0xa7),
+          o1(0xa8),      o1(0xa9),      o1(0xaa),      o1(0xab),
+          o1(0xac),      o1(0xad),      o1(0xae),      o1(0xaf),
+          o1(0xb0),      o1(0xb1),      o1(0xb2),      o1(0xb3),
+          o1(0xb4),      o1(0xb5),      o1(0xb6),      o1(0xb7),
+          o1(0xb8),      o1(0xb9),      o1(0xba),      o1(0xbb),
+          o1(0xbc),      o1(0xbd),      o1(0xbe),      o1(0xbf),
+
+#define to_Windows_31J_EF_BD WORDINDEX2INFO(26077)
+    to_Windows_31J_EF_BD_offsets,
+    to_Windows_31J_EF_BD_infos,
+
+#define to_Windows_31J_EF_BF_infos WORDINDEX2INFO(26079)
+           INVALID,         UNDEF, o2(0x81,0x91), o2(0x81,0x92),
+     o2(0x81,0xca), o2(0x81,0x50), o2(0xfa,0x55), o2(0x81,0x8f),
+
+#define to_Windows_31J_EF_BF WORDINDEX2INFO(26087)
+    to_Windows_31J_EF_BF_offsets,
+    to_Windows_31J_EF_BF_infos,
+
+#define to_Windows_31J_EF_infos WORDINDEX2INFO(26089)
+                  INVALID,      to_Shift_JIS_C4,
+     to_Windows_31J_EF_A4, to_Windows_31J_EF_A7,
+     to_Windows_31J_EF_A8, to_Windows_31J_EF_BC,
+     to_Windows_31J_EF_BD,   to_Shift_JIS_EF_BE,
+     to_Windows_31J_EF_BF,
+
+#define to_Windows_31J_EF WORDINDEX2INFO(26098)
+    to_Windows_31J_EF_offsets,
+    to_Windows_31J_EF_infos,
+
+#define to_Windows_31J_infos WORDINDEX2INFO(26100)
+                 NOMAP,           INVALID,
+     to_Windows_31J_C2,   to_Shift_JIS_C3,
+       to_Shift_JIS_C4,   to_Shift_JIS_CE,
+       to_Shift_JIS_CF,   to_Shift_JIS_D0,
+       to_Shift_JIS_D1,   to_Shift_JIS_E0,
+       to_Shift_JIS_E1, to_Windows_31J_E2,
+     to_Windows_31J_E3, to_Windows_31J_E4,
+     to_Windows_31J_E5, to_Windows_31J_E6,
+     to_Windows_31J_E7, to_Windows_31J_E8,
+     to_Windows_31J_E9,   to_Shift_JIS_ED,
+     to_Windows_31J_EE, to_Windows_31J_EF,
+       to_Shift_JIS_F0,   to_Shift_JIS_F1,
+       to_Shift_JIS_F4,
+
+#define to_Windows_31J WORDINDEX2INFO(26125)
+    to_Windows_31J_offsets,
+    to_Windows_31J_infos,
+
+};
+#define TRANSCODE_TABLE_INFO japanese_sjis_byte_array, 39402, japanese_sjis_word_array, 26127, sizeof(unsigned int)
+static const rb_transcoder
+rb_from_Shift_JIS = {
+    "Shift_JIS", "UTF-8", from_Shift_JIS,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_Windows_31J = {
+    "Windows-31J", "UTF-8", from_Windows_31J,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_Shift_JIS = {
+    "UTF-8", "Shift_JIS", to_Shift_JIS,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_Windows_31J = {
+    "UTF-8", "Windows-31J", to_Windows_31J,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+
+
+void
+Init_japanese_sjis(void)
+{
+    rb_register_transcoder(&rb_from_Shift_JIS);
+    rb_register_transcoder(&rb_from_Windows_31J);
+    rb_register_transcoder(&rb_to_Shift_JIS);
+    rb_register_transcoder(&rb_to_Windows_31J);
+
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.trans b/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.trans
new file mode 100644
index 0000000..00eace2
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/japanese_sjis.trans
@@ -0,0 +1,34 @@
+#include "transcode_data.h"
+
+<%
+  transcode_tblgen "Shift_JIS", "UTF-8",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("mskanji", 1, "JISX0201-KANA/UCS") +
+  citrus_decode_mapsrc("mskanji", 2, "JISX0208:1990/UCS")
+
+  transcode_tblgen "Windows-31J", "UTF-8",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("mskanji", 1, "JISX0201-KANA/UCS") +
+  citrus_decode_mapsrc("mskanji", 2,
+    "JISX0208VDC:NEC/UCS,CP932VDC:NEC_IBM/UCS,CP932VDC:IBM/UCS,CP932UDA/UCS,JISX0208:MS/UCS")
+
+
+  transcode_tblgen "UTF-8", "Shift_JIS",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("mskanji", 1, "UCS/JISX0201-KANA") +
+  citrus_decode_mapsrc("mskanji", 2, "UCS/JISX0208:1990")
+
+  transcode_tblgen "UTF-8", "Windows-31J",
+  [["{00-7f}", :nomap]] +
+  citrus_decode_mapsrc("mskanji", 1, "UCS/JISX0201-KANA") +
+  citrus_decode_mapsrc("mskanji", 2,
+    "UCS/JISX0208:MS,UCS/JISX0208VDC:NEC,UCS/CP932VDC:IBM,UCS/CP932VDC:NEC_IBM,UCS/CP932UDA")
+%>
+
+<%= transcode_generated_code %>
+
+void
+Init_japanese_sjis(void)
+{
+<%= transcode_register_code %>
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/koi8-r-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/koi8-r-tbl.rb
new file mode 100644
index 0000000..a1f55ff
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/koi8-r-tbl.rb
@@ -0,0 +1,130 @@
+KOI8_R_TO_UCS_TBL = [
+  ["9A",0xA0],
+  ["BF",0xA9],
+  ["9C",0xB0],
+  ["9D",0xB2],
+  ["9E",0xB7],
+  ["9F",0xF7],
+  ["B3",0x401],
+  ["E1",0x410],
+  ["E2",0x411],
+  ["F7",0x412],
+  ["E7",0x413],
+  ["E4",0x414],
+  ["E5",0x415],
+  ["F6",0x416],
+  ["FA",0x417],
+  ["E9",0x418],
+  ["EA",0x419],
+  ["EB",0x41A],
+  ["EC",0x41B],
+  ["ED",0x41C],
+  ["EE",0x41D],
+  ["EF",0x41E],
+  ["F0",0x41F],
+  ["F2",0x420],
+  ["F3",0x421],
+  ["F4",0x422],
+  ["F5",0x423],
+  ["E6",0x424],
+  ["E8",0x425],
+  ["E3",0x426],
+  ["FE",0x427],
+  ["FB",0x428],
+  ["FD",0x429],
+  ["FF",0x42A],
+  ["F9",0x42B],
+  ["F8",0x42C],
+  ["FC",0x42D],
+  ["E0",0x42E],
+  ["F1",0x42F],
+  ["C1",0x430],
+  ["C2",0x431],
+  ["D7",0x432],
+  ["C7",0x433],
+  ["C4",0x434],
+  ["C5",0x435],
+  ["D6",0x436],
+  ["DA",0x437],
+  ["C9",0x438],
+  ["CA",0x439],
+  ["CB",0x43A],
+  ["CC",0x43B],
+  ["CD",0x43C],
+  ["CE",0x43D],
+  ["CF",0x43E],
+  ["D0",0x43F],
+  ["D2",0x440],
+  ["D3",0x441],
+  ["D4",0x442],
+  ["D5",0x443],
+  ["C6",0x444],
+  ["C8",0x445],
+  ["C3",0x446],
+  ["DE",0x447],
+  ["DB",0x448],
+  ["DD",0x449],
+  ["DF",0x44A],
+  ["D9",0x44B],
+  ["D8",0x44C],
+  ["DC",0x44D],
+  ["C0",0x44E],
+  ["D1",0x44F],
+  ["A3",0x451],
+  ["95",0x2219],
+  ["96",0x221A],
+  ["97",0x2248],
+  ["98",0x2264],
+  ["99",0x2265],
+  ["93",0x2320],
+  ["9B",0x2321],
+  ["80",0x2500],
+  ["81",0x2502],
+  ["82",0x250C],
+  ["83",0x2510],
+  ["84",0x2514],
+  ["85",0x2518],
+  ["86",0x251C],
+  ["87",0x2524],
+  ["88",0x252C],
+  ["89",0x2534],
+  ["8A",0x253C],
+  ["A0",0x2550],
+  ["A1",0x2551],
+  ["A2",0x2552],
+  ["A4",0x2553],
+  ["A5",0x2554],
+  ["A6",0x2555],
+  ["A7",0x2556],
+  ["A8",0x2557],
+  ["A9",0x2558],
+  ["AA",0x2559],
+  ["AB",0x255A],
+  ["AC",0x255B],
+  ["AD",0x255C],
+  ["AE",0x255D],
+  ["AF",0x255E],
+  ["B0",0x255F],
+  ["B1",0x2560],
+  ["B2",0x2561],
+  ["B4",0x2562],
+  ["B5",0x2563],
+  ["B6",0x2564],
+  ["B7",0x2565],
+  ["B8",0x2566],
+  ["B9",0x2567],
+  ["BA",0x2568],
+  ["BB",0x2569],
+  ["BC",0x256A],
+  ["BD",0x256B],
+  ["BE",0x256C],
+  ["8B",0x2580],
+  ["8C",0x2584],
+  ["8D",0x2588],
+  ["8E",0x258C],
+  ["8F",0x2590],
+  ["90",0x2591],
+  ["91",0x2592],
+  ["92",0x2593],
+  ["94",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/koi8-u-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/koi8-u-tbl.rb
new file mode 100644
index 0000000..e87aa1a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/koi8-u-tbl.rb
@@ -0,0 +1,130 @@
+KOI8_U_TO_UCS_TBL = [
+  ["9A",0xA0],
+  ["BF",0xA9],
+  ["9C",0xB0],
+  ["9D",0xB2],
+  ["9E",0xB7],
+  ["9F",0xF7],
+  ["B3",0x401],
+  ["B4",0x404],
+  ["B6",0x406],
+  ["B7",0x407],
+  ["E1",0x410],
+  ["E2",0x411],
+  ["F7",0x412],
+  ["E7",0x413],
+  ["E4",0x414],
+  ["E5",0x415],
+  ["F6",0x416],
+  ["FA",0x417],
+  ["E9",0x418],
+  ["EA",0x419],
+  ["EB",0x41A],
+  ["EC",0x41B],
+  ["ED",0x41C],
+  ["EE",0x41D],
+  ["EF",0x41E],
+  ["F0",0x41F],
+  ["F2",0x420],
+  ["F3",0x421],
+  ["F4",0x422],
+  ["F5",0x423],
+  ["E6",0x424],
+  ["E8",0x425],
+  ["E3",0x426],
+  ["FE",0x427],
+  ["FB",0x428],
+  ["FD",0x429],
+  ["FF",0x42A],
+  ["F9",0x42B],
+  ["F8",0x42C],
+  ["FC",0x42D],
+  ["E0",0x42E],
+  ["F1",0x42F],
+  ["C1",0x430],
+  ["C2",0x431],
+  ["D7",0x432],
+  ["C7",0x433],
+  ["C4",0x434],
+  ["C5",0x435],
+  ["D6",0x436],
+  ["DA",0x437],
+  ["C9",0x438],
+  ["CA",0x439],
+  ["CB",0x43A],
+  ["CC",0x43B],
+  ["CD",0x43C],
+  ["CE",0x43D],
+  ["CF",0x43E],
+  ["D0",0x43F],
+  ["D2",0x440],
+  ["D3",0x441],
+  ["D4",0x442],
+  ["D5",0x443],
+  ["C6",0x444],
+  ["C8",0x445],
+  ["C3",0x446],
+  ["DE",0x447],
+  ["DB",0x448],
+  ["DD",0x449],
+  ["DF",0x44A],
+  ["D9",0x44B],
+  ["D8",0x44C],
+  ["DC",0x44D],
+  ["C0",0x44E],
+  ["D1",0x44F],
+  ["A3",0x451],
+  ["A4",0x454],
+  ["A6",0x456],
+  ["A7",0x457],
+  ["BD",0x490],
+  ["AD",0x491],
+  ["95",0x2219],
+  ["96",0x221A],
+  ["97",0x2248],
+  ["98",0x2264],
+  ["99",0x2265],
+  ["93",0x2320],
+  ["9B",0x2321],
+  ["80",0x2500],
+  ["81",0x2502],
+  ["82",0x250C],
+  ["83",0x2510],
+  ["84",0x2514],
+  ["85",0x2518],
+  ["86",0x251C],
+  ["87",0x2524],
+  ["88",0x252C],
+  ["89",0x2534],
+  ["8A",0x253C],
+  ["A0",0x2550],
+  ["A1",0x2551],
+  ["A2",0x2552],
+  ["A5",0x2554],
+  ["A8",0x2557],
+  ["A9",0x2558],
+  ["AA",0x2559],
+  ["AB",0x255A],
+  ["AC",0x255B],
+  ["AE",0x255D],
+  ["AF",0x255E],
+  ["B0",0x255F],
+  ["B1",0x2560],
+  ["B2",0x2561],
+  ["B5",0x2563],
+  ["B8",0x2566],
+  ["B9",0x2567],
+  ["BA",0x2568],
+  ["BB",0x2569],
+  ["BC",0x256A],
+  ["BE",0x256C],
+  ["8B",0x2580],
+  ["8C",0x2584],
+  ["8D",0x2588],
+  ["8E",0x258C],
+  ["8F",0x2590],
+  ["90",0x2591],
+  ["91",0x2592],
+  ["92",0x2593],
+  ["94",0x25A0],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/korean.c b/lib/ruby-1.9.1-rc1/enc/trans/korean.c
new file mode 100644
index 0000000..3009745
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/korean.c
@@ -0,0 +1,28664 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="korean.trans", len=486, checksum=37558 */
+/* src="euckr-tbl.rb", len=156134, checksum=29369 */
+/* src="cp949-tbl.rb", len=167830, checksum=37452 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+korean_byte_array[40455] = {
+#define to_EUC_KR_C2_offsets 0
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  1,  6,  1,  1,  7,  1,  1,
+      8,  9, 10, 11, 12,  1, 13, 14,   15, 16, 17,  1, 18, 19, 20, 21,
+
+#define to_EUC_KR_C3_offsets 66
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  4,    5,  1,  1,  1,  1,  1,  6,  7,
+      1,  1,  1,  1,  1,  1,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1, 10,   11,  1,  1,  1,  1,  1, 12,  1,
+
+#define to_EUC_KR_C4_offsets 132
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  6,  7,  1,  1,  1,  1,    8,  1,  1,  1,  1,  1,  1,  9,
+
+#define to_EUC_KR_C5_offsets 198
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  5,  6,  7,  4,  4,  4,  4,
+      4,  4,  8,  9,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4, 10, 11,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+
+#define to_EUC_KR_C6_offsets 264
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_CB_offsets 330
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    4,  5,  6,  7,  1,  8,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_CE_offsets 396
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18,  1, 19, 20, 21, 22, 23,   24, 25,  1,  1,  1,  1,  1,  1,
+      1, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+
+#define to_EUC_KR_CF_offsets 462
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_D0_offsets 528
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  5,  6,  7,  8,  9, 10,   11, 12, 13, 14, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_EUC_KR_D1_offsets 594
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_EUC_KR_E0_offsets 660
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_80_offsets 694
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  4,  1,  1,  5,  6,  1,  1,
+      7,  8,  1,  1,  1,  9, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     11,  1, 12, 13,  1,  1,  1,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_81_offsets 760
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+
+#define to_EUC_KR_E2_82_offsets 826
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_84_offsets 892
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  5,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  7,  1,  1,  1,  8,  1,    1,  1,  1,  9,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_85_offsets 958
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    1,  1,  1,  4,  5,  6,  7,  1,
+      8,  9, 10, 11, 12, 13, 14, 15,   16, 17,  1,  1,  1,  1,  1,  1,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_86_offsets 1024
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_87_offsets 1090
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_88_offsets 1156
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  5,    6,  2,  2,  7,  2,  2,  2,  8,
+      2,  9,  2,  2,  2,  2,  2,  2,    2,  2, 10,  2,  2, 11, 12,  2,
+     13,  2,  2,  2,  2, 14,  2, 15,   16, 17, 18, 19, 20,  2, 21,  2,
+      2,  2,  2,  2, 22, 23,  2,  2,    2,  2,  2,  2, 24, 25,  2,  2,
+
+#define to_EUC_KR_E2_89_offsets 1222
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  5,  6,  1,  1,    1,  1,  7,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_8A_offsets 1288
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_8C_offsets 1354
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_91_offsets 1420
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16,  1,
+      1,  1,  1,  1, 17, 18, 19, 20,   21, 22, 23, 24, 25, 26, 27, 28,
+
+#define to_EUC_KR_E2_92_offsets 1486
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  5,  6,  7,  8,
+      9, 10, 11, 12, 13, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+
+#define to_EUC_KR_E2_93_offsets 1552
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_94_offsets 1618
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  6,  7,  8,  9,
+     10, 11, 12, 13, 14, 15, 16, 17,   18, 19, 20, 21, 22, 23, 24, 25,
+     26, 27, 28, 29, 30, 31, 32, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+     42, 43, 44, 45, 46, 47, 48, 49,   50, 51, 52, 53, 54, 55, 56, 57,
+
+#define to_EUC_KR_E2_95_offsets 1684
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+     13, 13, 13, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 13, 13, 13,
+
+#define to_EUC_KR_E2_96_offsets 1750
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  5,  6,  7,  8,  9,   10, 11,  1,  1,  1,  1,  1,  1,
+      1,  1, 12, 13,  1,  1, 14, 15,    1,  1,  1,  1, 16, 17,  1,  1,
+
+#define to_EUC_KR_E2_97_offsets 1816
+128, 191,
+      1,  2,  3,  3,  3,  3,  4,  5,    6,  3,  3,  7,  3,  3,  8,  9,
+     10, 11,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_E2_98_offsets 1882
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  7,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E2_99_offsets 1948
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      4,  5,  2,  6,  7,  8,  2,  9,   10, 11, 12,  2, 13, 14,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E2_offsets 2014
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11,  4, 12,  4,  4,  4,
+      4, 13, 14, 15, 16, 17, 18, 19,   20, 21,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+
+#define to_EUC_KR_E3_80_offsets 2080
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  7,  8,  9, 10, 11, 12, 13,
+     14, 15,  5, 16, 17, 18,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_EUC_KR_E3_81_offsets 2146
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+
+#define to_EUC_KR_E3_82_offsets 2212
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 21, 21, 21,   21, 21, 21, 21, 21, 21, 21, 21,
+     21, 22, 23, 24, 25, 26, 27, 28,   29, 30, 31, 32, 33, 34, 35, 36,
+     37, 38, 39, 40, 41, 42, 43, 44,   45, 46, 47, 48, 49, 50, 51, 52,
+
+#define to_EUC_KR_E3_83_offsets 2278
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   56, 56, 56, 56, 56, 56, 56, 56,
+
+#define to_EUC_KR_E3_84_offsets 2344
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+
+#define to_EUC_KR_E3_86_offsets 2410
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+
+#define to_EUC_KR_E3_88_offsets 2476
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 30, 30,
+     30, 30, 30, 30, 30, 30, 30, 30,   30, 30, 30, 30, 30, 30, 30, 30,
+     30, 30, 30, 30, 30, 30, 30, 30,   30, 30, 30, 30, 30, 30, 30, 30,
+
+#define to_EUC_KR_E3_89_offsets 2542
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27, 28, 29,  1,  1,  1, 30,
+
+#define to_EUC_KR_E3_8E_offsets 2608
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 62,
+
+#define to_EUC_KR_E3_8F_offsets 2674
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 12, 12, 12, 13,
+     14, 12, 12, 15, 12, 12, 16, 12,   17, 12, 12, 18, 19, 20, 12, 12,
+     12, 12, 12, 12, 12, 12, 12, 12,   12, 12, 12, 12, 12, 12, 12, 12,
+     12, 12, 12, 12, 12, 12, 12, 12,   12, 12, 12, 12, 12, 12, 12, 12,
+
+#define to_EUC_KR_E3_offsets 2740
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  8,  8,  8,  8, 11, 12,
+      8,  8,  8,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8,  8,  8,  8,
+      8,  8,  8,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8,  8,  8,  8,
+      8,  8,  8,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8,  8,  8,  8,
+
+#define to_EUC_KR_E4_B8_offsets 2806
+128, 191,
+      1,  2,  3,  4,  3,  3,  3,  5,    6,  7,  8,  9,  3, 10,  3,  3,
+      3, 11,  3,  3, 12, 13, 14,  3,   15, 16,  3,  3,  3,  3, 17,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 18,  3,  3,
+      3,  3, 19,  3,  3,  3,  3,  3,   20, 21,  3, 22,  3,  3,  3,  3,
+
+#define to_EUC_KR_E4_B9_offsets 2872
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  1,    1,  1,  1,  5,  1,  6,  7,  8,
+      1,  1,  1,  1,  1,  1,  9,  1,   10, 11,  1,  1,  1, 12, 13, 14,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1, 16,  1,  1,
+      1,  1,  1, 17,  1,  1, 18, 19,    1,  1,  1,  1,  1,  1, 20,  1,
+
+#define to_EUC_KR_E4_BA_offsets 2938
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    4,  1,  1,  5,  6,  1,  7,  1,
+      8,  9, 10,  1, 11, 12,  1,  1,   13,  1,  1, 14,  1,  1, 15,  1,
+      1, 16, 17,  1, 18, 19, 20,  1,   21,  1,  1, 22, 23, 24, 25,  1,
+      1,  1,  1,  1,  1,  1, 26,  1,    1,  1, 27,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E4_BB_offsets 3004
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  5,    3,  3,  6,  7,  3,  8,  3,  3,
+      3,  3,  3,  3,  9, 10, 11, 12,   13, 14,  3,  3,  3, 15,  3, 16,
+      3,  3,  3, 17, 18, 19,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+     20,  3, 21,  3,  3,  3, 22, 23,    3,  3,  3, 24,  3,  3,  3,  3,
+
+#define to_EUC_KR_E4_BC_offsets 3070
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  4,  5,  1,  6,  7,  8,
+      9, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 11,
+      1,  1,  1,  1, 12,  1, 13,  1,   14,  1, 15,  1, 16, 17,  1,  1,
+
+#define to_EUC_KR_E4_BD_offsets 3136
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  4,    5,  1,  1,  1,  1,  6,  7,  8,
+      9, 10,  1,  1,  1, 11,  1,  1,    1, 12, 13, 14, 15,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 16,  1,  1,  1,  1,  1, 17,
+     18,  1,  1, 19,  1,  1, 20,  1,    1,  1, 21,  1,  1,  1, 22, 23,
+
+#define to_EUC_KR_E4_BE_offsets 3202
+128, 191,
+      1,  2,  1,  3,  4,  1,  5,  1,    6,  1,  7,  8,  1,  9,  1, 10,
+      1, 11,  1,  1,  1,  1, 12,  1,   13,  1,  1, 14,  1, 15,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 16, 17,
+      1,  1,  1,  1,  1, 18, 19,  1,    1,  1,  1,  1,  1,  1,  1, 20,
+
+#define to_EUC_KR_E4_BF_offsets 3268
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  5,  6,  1,  1,  1,  7,  1,
+      1,  8,  1,  9, 10,  1,  1, 11,    1,  1, 12,  1,  1, 13,  1, 14,
+     15, 16,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 17, 18,
+      1, 19,  1, 20,  1, 21,  1,  1,   22,  1, 23,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E4_offsets 3334
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  5,  6,  7,  8,  9,
+
+#define to_EUC_KR_E5_80_offsets 3400
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  4,  1,  5,  1,  6,  1,  1,
+      1,  7,  8,  1,  1,  1,  9,  1,    1, 10, 11,  1, 12,  1, 13, 14,
+      1, 15,  1, 16, 17,  1, 18, 19,   20,  1, 21, 22, 23, 24,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 25,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_81_offsets 3466
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  1,  1,  6,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  1,  8,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1, 10,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 11, 12, 13,  1,   14,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_82_offsets 3532
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  5,  2,  2,  2,  2,  2,  2,    6,  7,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  8,  9,  2,  2,
+      2,  2, 10, 11,  2, 12,  2, 13,    2,  2,  2,  2,  2,  2, 14,  2,
+
+#define to_EUC_KR_E5_83_offsets 3598
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  4,  1,  1,  1,  1,  5,
+      1,  6,  1,  1,  1,  7,  8,  1,    1,  1,  9,  1,  1,  1, 10,  1,
+      1,  1,  1,  1,  1, 11,  1, 12,    1,  1,  1,  1,  1, 13,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1, 16,
+
+#define to_EUC_KR_E5_84_offsets 3664
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  3,    3,  6,  3,  3,  3,  3,  3,  3,
+      3,  3,  7,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  8,
+      3,  9,  3,  3,  3,  3,  3,  3,    3,  3, 10,  3,  3,  3,  3,  3,
+      3,  3, 11,  3,  3,  3,  3, 12,    3,  3, 13,  3, 14,  3,  3,  3,
+
+#define to_EUC_KR_E5_85_offsets 3730
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  3, 11, 12, 13, 14,  3,
+      3,  3, 15,  3,  3,  3,  3,  3,    3,  3,  3,  3, 16,  3,  3,  3,
+      3,  3, 17,  3,  3, 18,  3, 19,   20, 21, 22, 23, 24, 25, 26,  3,
+      3, 27,  3,  3,  3, 28, 29, 30,   31,  3,  3,  3, 32,  3,  3,  3,
+
+#define to_EUC_KR_E5_86_offsets 3796
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  4,  2,  2,  5,  2,  2,
+      2,  2,  6,  2,  2,  7,  2,  8,    2,  2,  2,  2,  2,  2,  2,  2,
+      9,  2,  2,  2,  2, 10,  2,  2,    2,  2, 11,  2, 12,  2,  2,  2,
+      2,  2,  2,  2,  2,  2, 13, 14,    2,  2,  2,  2,  2, 15,  2,  2,
+
+#define to_EUC_KR_E5_87_offsets 3862
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  4,  1,  5,  6,  7,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  9, 10,  1,
+      1, 11,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     12, 13,  1,  1,  1,  1, 14,  1,   15, 16, 17,  1,  1, 18,  1,  1,
+
+#define to_EUC_KR_E5_88_offsets 3928
+128, 191,
+      1,  2,  2,  3,  2,  2,  4,  5,    6,  2,  7,  2,  2,  2,  8,  2,
+      2,  9,  2,  2,  2,  2,  2, 10,    2,  2,  2,  2,  2, 11,  2,  2,
+      2,  2,  2,  2, 12, 13,  2,  2,    2, 14, 15,  2,  2,  2, 16,  2,
+     17,  2,  2,  2,  2,  2, 18, 19,   20, 21, 22, 23,  2,  2,  2,  2,
+
+#define to_EUC_KR_E5_89_offsets 3994
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    1,  1,  4,  5,  6,  7,  1,  1,
+      1,  1,  1,  1,  8,  1,  9,  1,    1,  1,  1, 10,  1, 11,  1,  1,
+      1, 12,  1,  1,  1,  1,  1,  1,    1, 13, 14,  1,  1,  1,  1, 15,
+      1,  1, 16,  1,  1, 17,  1,  1,    1,  1,  1,  1,  1, 18,  1, 19,
+
+#define to_EUC_KR_E5_8A_offsets 4060
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  1,  1,  1,  6,  1,  1,
+      1,  7,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1,  1, 10,
+     11,  1,  1, 12, 13,  1,  1,  1,    1, 14, 15, 16,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 17,  1,
+
+#define to_EUC_KR_E5_8B_offsets 4126
+128, 191,
+      1,  2,  1,  3,  1,  4,  1,  5,    1,  6,  1,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  1,  9, 10,  1,   11, 12,  1, 13,  1, 14, 15, 16,
+      1,  1, 17, 18, 19,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 20,  1, 21,  1,  1,   22,  1, 23, 24,  1,  1, 25, 26,
+
+#define to_EUC_KR_E5_8C_offsets 4192
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  1,  4,  1,  5,
+      6,  1,  1,  1,  1,  7,  8,  9,    1, 10,  1,  1,  1,  1,  1,  1,
+     11, 12,  1, 13,  1,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1, 15,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 16,  1,  1,  1,  1,  1, 17,
+
+#define to_EUC_KR_E5_8D_offsets 4258
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  6,    7,  8,  9,  3,  3, 10,  3,  3,
+      3, 11, 12, 13, 14,  3,  3, 15,    3,  3, 16,  3, 17,  3, 18,  3,
+     19,  3,  3,  3,  3,  3, 20,  3,   21,  3,  3,  3,  3,  3,  3, 22,
+     23, 24,  3,  3, 25, 26,  3, 27,    3,  3,  3,  3,  3, 28,  3, 29,
+
+#define to_EUC_KR_E5_8E_offsets 4324
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  3,  1,  1,  1,  1,    4,  1,  5,  1,  1,  1,  1,  6,
+      7,  1,  1,  1,  1,  8,  9,  1,    1,  1,  1,  1,  1, 10,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_8F_offsets 4390
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  4,  5,  6,  1,  7,  1,  1,
+      1,  1,  1,  1,  8,  1,  9, 10,    1,  1,  1, 11,  1,  1,  1,  1,
+      1, 12, 13, 14, 15, 16,  1,  1,    1, 17, 18, 19, 20, 21,  1, 22,
+     23, 24, 25, 26,  1,  1,  1,  1,   27,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_90_offsets 4456
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  1,  7,  8,  9, 10,
+     11, 12,  1,  1,  1,  1,  1,  1,    1,  1,  1, 13,  1, 14,  1, 15,
+     16,  1,  1,  1,  1,  1, 17,  1,    1, 18,  1, 19,  1,  1,  1,  1,
+      1,  1,  1, 20,  1,  1,  1,  1,   21, 22,  1, 23, 24,  1, 25,  1,
+
+#define to_EUC_KR_E5_91_offsets 4522
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  1,  4,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  1,  1,  1,  1,
+      1,  8,  1,  9,  1, 10,  1,  1,    1,  1,  1, 11, 12, 13,  1,  1,
+
+#define to_EUC_KR_E5_92_offsets 4588
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  2,  2,  4,  2,  5,  2,
+      6,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  7,  2,  2,  2,    8,  2,  2,  9, 10,  2,  2,  2,
+      2,  2,  2, 11,  2,  2,  2,  2,   12,  2,  2,  2,  2, 13,  2,  2,
+
+#define to_EUC_KR_E5_93_offsets 4654
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  6,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  7,  3,  3,  3,  8,  3,  3,    9,  3,  3,  3,  3, 10, 11,  3,
+      3,  3, 12,  3,  3,  3,  3,  3,    3,  3, 13,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_E5_94_offsets 4720
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  1,  1,  1,  5,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  8,
+      1,  9,  1,  1,  1, 10,  1,  1,    1,  1,  1,  1,  1,  1, 11,  1,
+
+#define to_EUC_KR_E5_95_offsets 4786
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  5,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+
+#define to_EUC_KR_E5_96_offsets 4852
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  5,    2,  6,  7,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    8,  9, 10,  2, 11, 12,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 13,    2, 14, 15, 16, 17,  2, 18,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E5_97_offsets 4918
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  1,  5,  1,  6,  1,  1,  7,
+      1,  1,  1,  8,  9,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10, 11,  1,
+
+#define to_EUC_KR_E5_98_offsets 4984
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      1,  1,  7,  1,  8,  1,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_99_offsets 5050
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_9A_offsets 5116
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  4,  1,  5,  1,
+      1,  1,  1,  1,  6,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+
+#define to_EUC_KR_E5_9B_offsets 5182
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  3,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  5,  6,  1,  1,  7,  1,
+      8,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,    1, 10, 11,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_9C_offsets 5248
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  1,  1,  5,  1,  6,  1,  1,
+      1,  1,  7,  8,  1,  1,  9,  1,   10,  1,  1,  1,  1,  1,  1, 11,
+      1,  1,  1,  1,  1,  1,  1,  1,   12,  1,  1,  1,  1, 13,  1,  1,
+     14,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_9D_offsets 5314
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  4,    2,  2,  5,  2,  2,  6,  7,  2,
+      8,  9,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2, 10,  2,  2, 11,  2, 12,  2,    2,  2, 13,  2,  2,  2, 14,  2,
+     15,  2,  2,  2,  2, 16,  2,  2,    2,  2,  2,  2, 17,  2,  2,  2,
+
+#define to_EUC_KR_E5_9E_offsets 5380
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  1,  1,  4,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      6,  1,  7,  8,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_9F_offsets 5446
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  1,  1,  5,  1,  1,  6,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      8,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1, 10,  1,  1, 11,    1, 12, 13,  1, 14,  1,  1,  1,
+
+#define to_EUC_KR_E5_A0_offsets 5512
+128, 191,
+      1,  2,  3,  2,  2,  4,  5,  2,    6,  7,  8,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  9,  2,
+      2, 10,  2,  2, 11,  2,  2, 12,    2,  2, 13,  2,  2,  2,  2, 14,
+     15, 16,  2,  2, 17, 18,  2,  2,    2,  2, 19,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E5_A1_offsets 5578
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  1,  4,
+      1,  5,  1,  1,  6,  1,  1,  7,    8,  1,  9,  1,  1,  1, 10,  1,
+      1, 11, 12,  1, 13,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 14,  1,  1,    1, 15,  1,  1, 16,  1, 17,  1,
+
+#define to_EUC_KR_E5_A2_offsets 5644
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  7,  8,
+      1,  1,  1,  1,  1,  1,  1,  1,    9, 10,  1,  1,  1,  1, 11,  1,
+      1,  1,  1, 12,  1,  1,  1,  1,    1,  1, 13, 14,  1,  1, 15,  1,
+
+#define to_EUC_KR_E5_A3_offsets 5710
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  4,    1,  1,  1,  1,  1,  1,  5,  1,
+      1,  6,  1,  7,  1,  8,  1,  1,    9, 10,  1,  1,  1,  1, 11, 12,
+      1,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1, 14, 15,  1,  1, 16,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 17, 18, 19,  1, 20,  1,  1,
+
+#define to_EUC_KR_E5_A4_offsets 5776
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      1,  1,  1,  1,  3,  4,  5,  1,    1,  6,  7,  1,  8,  1,  1,  1,
+      1,  1,  9,  1,  1,  1,  1, 10,    1, 11, 12, 13,  1, 14, 15,  1,
+      1, 16,  1,  1,  1,  1,  1, 17,    1,  1,  1,  1,  1,  1, 18,  1,
+
+#define to_EUC_KR_E5_A5_offsets 5842
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  1,  1,  1,  6,  7,
+      8,  9,  1,  1, 10, 11,  1, 12,    1,  1, 13,  1,  1,  1,  1,  1,
+     14,  1, 15,  1,  1,  1,  1, 16,    1,  1, 17, 18, 19, 20, 21,  1,
+      1,  1,  1, 22, 23,  1,  1,  1,   24,  1,  1,  1,  1, 25,  1,  1,
+
+#define to_EUC_KR_E5_A6_offsets 5908
+128, 191,
+      1,  1,  2,  3,  4,  1,  1,  1,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  7,  8,    1,  9,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 10,  1,  1,   11,  1,  1,  1, 12,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 13,  1, 14,  1,  1, 15,  1,
+
+#define to_EUC_KR_E5_A7_offsets 5974
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    1,  4,  1,  5,  1,  1,  1,  1,
+      6,  7,  1,  8,  9,  1,  1,  1,    1, 10, 11,  1, 12, 13,  1,  1,
+      1,  1,  1,  1,  1,  1, 14,  1,   15,  1, 16,  1, 17,  1, 18,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   19,  1,  1, 20,  1,  1,  1, 21,
+
+#define to_EUC_KR_E5_A8_offsets 6040
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    5,  1,  1,  6,  7,  1,  1,  8,
+      9,  1,  1,  1,  1, 10,  1,  1,    1, 11,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 12,  1,    1,  1,  1,  1, 13,  1,  1,  1,
+
+#define to_EUC_KR_E5_A9_offsets 6106
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_AA_offsets 6172
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  3,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_AB_offsets 6238
+128, 191,
+      1,  2,  3,  1,  4,  1,  1,  1,    1,  5,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    1,  9,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_AC_offsets 6304
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  1,  4,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  7,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_AD_offsets 6370
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      4,  5,  2,  2,  6,  7,  2,  8,    9,  2, 10,  2, 11, 12,  2, 13,
+      2,  2,  2, 14, 15,  2,  2,  2,    2, 16,  2, 17,  2,  2,  2,  2,
+     18, 19,  2,  2,  2, 20,  2,  2,   21,  2, 22,  2, 23,  2,  2,  2,
+
+#define to_EUC_KR_E5_AE_offsets 6436
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  5,  1,  6,  7,  1,  1,  8,
+      1,  1,  1,  9,  1, 10, 11, 12,   13, 14, 15, 16, 17,  1,  1,  1,
+      1,  1, 18, 19, 20, 21, 22,  1,    1,  1,  1,  1, 23,  1, 24,  1,
+     25,  1,  1, 26, 27, 28, 29,  1,   30, 31,  1,  1,  1,  1,  1, 32,
+
+#define to_EUC_KR_E5_AF_offsets 6502
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    2,  2,  2,  2,  9,  2,  2,  2,
+     10,  2, 11, 12, 13,  2,  2, 14,    2,  2,  2,  2,  2,  2, 15, 16,
+      2, 17, 18,  2, 19, 20, 21, 22,   23, 24,  2, 25, 26,  2, 27, 28,
+      2,  2,  2,  2,  2, 29, 30,  2,   31,  2, 32,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E5_B0_offsets 6568
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  6,  7,  8,  1,  9, 10, 11,
+      1, 12,  1,  1,  1,  1, 13,  1,    1, 14,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 15,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+      1, 17,  1,  1,  1,  1,  1,  1,   18, 19, 20, 21, 22,  1, 23, 24,
+
+#define to_EUC_KR_E5_B1_offsets 6634
+128, 191,
+      1,  2,  2,  2,  2,  3,  4,  2,    5,  2,  2,  6,  2,  7,  8,  2,
+      2,  9,  2,  2,  2, 10,  2,  2,    2,  2,  2, 11,  2,  2,  2,  2,
+     12,  2, 13,  2, 14, 15,  2,  2,    2,  2,  2,  2, 16,  2,  2, 17,
+      2, 18,  2,  2,  2,  2,  2,  2,    2, 19,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E5_B2_offsets 6700
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  5,  1,  6,  7,  1,  1,  1,
+      1,  8,  1,  9,  1, 10,  1, 11,   12,  1, 13,  1,  1,  1, 14,  1,
+
+#define to_EUC_KR_E5_B3_offsets 6766
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  3,  2,  2,  2,  2,  2,  2,
+      4,  2,  2,  2,  2,  2,  2,  2,    5,  2,  2,  2,  2,  2,  2,  6,
+      7,  2,  2,  2,  8,  2,  9,  2,    2,  2,  2, 10,  2, 11,  2,  2,
+
+#define to_EUC_KR_E5_B4_offsets 6832
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  3,  4,  1,
+      1,  5,  1,  1,  6,  1,  7,  8,    1,  9,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,    1, 11,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_B5_offsets 6898
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  6,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_B6_offsets 6964
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  4,  1,  1,
+      5,  1,  6,  1,  1,  1,  1,  1,    1,  1,  7,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  9,  1, 10, 11,  1,  1,
+
+#define to_EUC_KR_E5_B7_offsets 7030
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      1,  1,  3,  1,  1,  1,  4,  1,    1,  1,  1,  1,  1,  5,  6,  1,
+      1,  7,  8,  1,  1,  9, 10, 11,   12,  1,  1, 13,  1,  1, 14,  1,
+      1, 15, 16, 17, 18,  1,  1, 19,    1,  1,  1,  1,  1, 20, 21,  1,
+
+#define to_EUC_KR_E5_B8_offsets 7096
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  7,  1,    1,  8,  1,  9,  1, 10,  1,  1,
+      1,  1,  1,  1,  1, 11,  1,  1,    1,  1,  1, 12,  1, 13,  1,  1,
+      1,  1,  1, 14,  1,  1, 15,  1,   16,  1,  1,  1,  1, 17,  1, 18,
+
+#define to_EUC_KR_E5_B9_offsets 7162
+128, 191,
+      1,  2,  2,  2,  3,  4,  2,  5,    2,  2,  2,  2,  6,  2,  2,  2,
+      2,  2,  2,  2,  2,  7,  2,  2,    2,  2,  2,  2,  2,  2,  2,  8,
+      2,  9, 10, 11,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2, 12, 13, 14,  2,  2, 15,   16, 17,  2, 18, 19, 20, 21,  2,
+
+#define to_EUC_KR_E5_BA_offsets 7228
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  1,  4,  1,  1,  1,  1,  5,
+      1,  1,  1,  1,  1,  6,  1,  7,    1,  1,  8,  1,  9,  1,  1,  1,
+     10,  1,  1,  1,  1,  1, 11, 12,    1,  1,  1, 13,  1, 14,  1,  1,
+      1,  1,  1,  1,  1, 15, 16, 17,   18,  1,  1,  1,  1,  1, 19,  1,
+
+#define to_EUC_KR_E5_BB_offsets 7294
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    3,  4,  5,  1,  1,  1,  1,  1,
+      6,  1,  1,  7,  1,  1,  8,  1,    1,  1,  9, 10,  1,  1,  1, 11,
+     12,  1, 13, 14,  1,  1,  1,  1,    1,  1,  1,  1, 15,  1,  1,  1,
+      1,  1,  1, 16,  1,  1, 17, 18,    1,  1, 19, 20,  1,  1,  1,  1,
+
+#define to_EUC_KR_E5_BC_offsets 7360
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    1,  1,  4,  1,  1,  1,  1,  5,
+      1,  6,  1,  7,  8,  9,  1, 10,   11,  1,  1, 12,  1,  1,  1, 13,
+      1,  1,  1,  1,  1,  1, 14, 15,    1, 16,  1,  1,  1,  1,  1,  1,
+      1, 17,  1,  1,  1, 18,  1,  1,    1,  1, 19,  1, 20,  1,  1,  1,
+
+#define to_EUC_KR_E5_BD_offsets 7426
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  1,  4,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    1,  8,  1,  9,  1,  1,  1,  1,
+      1,  1, 10,  1,  1,  1, 11, 12,    1, 13, 14, 15, 16, 17,  1,  1,
+     18, 19,  1,  1,  1,  1,  1, 20,    1, 21,  1,  1, 22,  1,  1, 23,
+
+#define to_EUC_KR_E5_BE_offsets 7492
+128, 191,
+      1,  2,  3,  3,  3,  4,  3,  5,    3,  3,  6,  7,  8,  3,  3,  3,
+      9, 10, 11,  3,  3,  3,  3, 12,   13, 14,  3,  3,  3,  3, 15,  3,
+     16, 17,  3,  3,  3,  3,  3,  3,   18, 19, 20,  3,  3,  3, 21,  3,
+      3,  3,  3,  3,  3, 22,  3, 23,    3, 24,  3,  3,  3, 25,  3,  3,
+
+#define to_EUC_KR_E5_BF_offsets 7558
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    8,  9,  1,  1,  1,  1,  1,  1,
+     10,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,    1,  1,  1,  1,  1, 13,  1, 14,
+
+#define to_EUC_KR_E6_80_offsets 7624
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      1,  1,  3,  1,  1,  1,  4,  1,    1,  1,  1,  1,  5,  6,  1,  1,
+      7,  8,  1,  1,  1,  9,  1, 10,   11,  1, 12,  1,  1,  1,  1, 13,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_81_offsets 7690
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    1,  1,  1,  1,  1,  5,  1,  1,
+      6,  1,  7,  1,  1,  8,  1,  1,    1,  9,  1,  1,  1, 10,  1,  1,
+      1,  1, 11, 12, 13, 14,  1,  1,   15, 16, 17,  1, 18, 19,  1, 20,
+     21,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_82_offsets 7756
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  1,  6,  1,  7,  1,    1,  1,  8,  9,  1,  1,  1, 10,
+     11,  1,  1, 12, 13,  1,  1, 14,    1,  1,  1,  1,  1,  1,  1,  1,
+     15,  1, 16, 17, 18,  1, 19,  1,   20,  1,  1,  1, 21, 22,  1,  1,
+
+#define to_EUC_KR_E6_83_offsets 7822
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  5,  1,  6,  1,  1,  7,
+      8,  9,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1, 12,  1,  1, 13,  1,    1, 14, 15, 16,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_84_offsets 7888
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  5,  1,  1,  1,  6,  7,  8,
+      1,  1,  1,  1,  1,  9,  1,  1,    1,  1, 10, 11,  1,  1,  1, 12,
+      1,  1,  1,  1,  1,  1,  1, 13,    1,  1,  1,  1,  1,  1,  1,  1,
+     14,  1,  1,  1, 15,  1,  1, 16,    1,  1,  1,  1, 17,  1, 18, 19,
+
+#define to_EUC_KR_E6_85_offsets 7954
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  1,  6,  7,  8,  1,  1,  1,
+      1,  1,  1,  9,  1, 10,  1,  1,   11, 12,  1,  1,  1, 13,  1, 14,
+      1,  1, 15, 16, 17,  1,  1, 18,   19,  1,  1, 20,  1,  1, 21,  1,
+     22,  1,  1,  1,  1,  1, 23, 24,    1,  1,  1,  1,  1, 25, 26,  1,
+
+#define to_EUC_KR_E6_86_offsets 8020
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      6,  7,  1,  1,  8,  1,  1,  1,    9, 10, 11,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1, 13,    1, 14,  1, 15, 16,  1, 17,  1,
+      1,  1, 18,  1,  1,  1, 19,  1,    1,  1, 20,  1,  1,  1, 21,  1,
+
+#define to_EUC_KR_E6_87_offsets 8086
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  3,    4,  5,  6,  7,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  9,  1,  1,  1, 10, 11,   12,  1, 13,  1, 14,  1,  1, 15,
+
+#define to_EUC_KR_E6_88_offsets 8152
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    4,  2,  5,  2,  6,  7,  8,  2,
+      9, 10, 11,  2,  2,  2, 12,  2,    2,  2, 13,  2,  2,  2,  2, 14,
+      2, 15,  2,  2,  2,  2,  2,  2,    2,  2, 16,  2,  2,  2, 17,  2,
+     18, 19,  2,  2, 20,  2, 21,  2,    2,  2,  2,  2,  2,  2, 22, 23,
+
+#define to_EUC_KR_E6_89_offsets 8218
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  7,  3,  8,  3,  3,
+      3,  3,  3,  9,  3,  3,  3,  3,   10,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3, 11,  3,
+      3, 12,  3,  3,  3,  3, 13,  3,    3, 14,  3,  3, 15,  3,  3, 16,
+
+#define to_EUC_KR_E6_8A_offsets 8284
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  4,  5,  2,  2,  2,  2,  2,
+      2,  6,  7,  2,  2,  8,  2,  9,   10,  2,  2, 11,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 12,  2,  2,  2,  2,
+      2, 13,  2,  2,  2, 14,  2,  2,    2, 15,  2,  2, 16, 17,  2,  2,
+
+#define to_EUC_KR_E6_8B_offsets 8350
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  3,    4,  5,  1,  1,  6,  7,  1,  8,
+      9,  1, 10, 11, 12,  1, 13, 14,   15, 16,  1, 17, 18,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 19, 20, 21, 22,
+      1, 23,  1, 24,  1,  1,  1, 25,    1,  1,  1,  1,  1,  1, 26, 27,
+
+#define to_EUC_KR_E6_8C_offsets 8416
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  8,  9,  1, 10, 11,  1,
+
+#define to_EUC_KR_E6_8D_offsets 8482
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  1,  1,  4,
+      5,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  7,    8,  1,  1,  1,  1,  1,  9,  1,
+      1,  1, 10,  1,  1,  1,  1, 11,    1,  1, 12, 13,  1,  1,  1, 14,
+
+#define to_EUC_KR_E6_8E_offsets 8548
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  1,  1,
+      1,  1,  6,  1,  1,  1,  7,  1,    8,  1,  1,  9,  1,  1,  1,  1,
+     10, 11, 12,  1,  1, 13,  1, 14,   15, 16, 17,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_8F_offsets 8614
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  2,  2,  2,  2,  2,  5,
+      6,  2,  2,  2,  2,  2,  7,  2,    2,  2,  8,  9,  2,  2,  2,  2,
+      2, 10,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2, 11, 12,  2,
+      2,  2,  2,  2, 13,  2, 14, 15,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E6_90_offsets 8680
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  3,
+      1,  1,  1,  1,  4,  1,  5,  6,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  1,  9, 10,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 11,  1,  1,  1, 12,  1,
+
+#define to_EUC_KR_E6_91_offsets 8746
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  7,  8,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_92_offsets 8812
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  4,  5,  1,  1,  1,  1,    1,  1,  6,  1,  1,  1,  7,  1,
+      1,  1,  1,  1,  8,  9,  1,  1,    1,  1,  1, 10,  1, 11, 12,  1,
+     13,  1, 14,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_93_offsets 8878
+128, 191,
+      1,  2,  1,  1,  3,  4,  1,  5,    1,  1,  6,  1,  1,  7,  8,  1,
+      1,  1,  9,  1, 10,  1,  1,  1,   11,  1, 12,  1,  1,  1,  1,  1,
+      1, 13, 14,  1,  1, 15, 16, 17,    1,  1,  1,  1, 18,  1,  1,  1,
+      1,  1, 19,  1, 20,  1,  1,  1,    1,  1, 21,  1,  1,  1, 22,  1,
+
+#define to_EUC_KR_E6_94_offsets 8944
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    4,  2,  2,  2,  2,  5,  2,  2,
+      2,  2,  2,  6,  2,  2,  2,  2,    2,  2,  7,  8,  9,  2,  2, 10,
+      2,  2,  2,  2,  2,  2, 11, 12,   13, 14,  2, 15,  2,  2, 16, 17,
+
+#define to_EUC_KR_E6_95_offsets 9010
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  1,  1,  1,  4,  5,  6,
+      1,  7,  1,  1,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1, 10,  1,
+      1,  1, 11, 12,  1,  1, 13,  1,    1,  1,  1,  1, 14, 15,  1,  1,
+      1,  1, 16,  1, 17, 18,  1, 19,   20,  1,  1,  1,  1,  1, 21,  1,
+
+#define to_EUC_KR_E6_96_offsets 9076
+128, 191,
+      1,  1,  2,  3,  1,  4,  1,  5,    1,  1,  1,  1,  6,  1,  1,  1,
+      7,  8,  1,  1,  1,  1,  1,  9,    1, 10,  1, 11, 12,  1,  1, 13,
+      1, 14,  1,  1, 15, 16,  1, 17,    1,  1,  1, 18, 19,  1,  1, 20,
+     21,  1,  1,  1,  1,  1,  1, 22,    1, 23,  1,  1, 24, 25,  1,  1,
+
+#define to_EUC_KR_E6_97_offsets 9142
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  4,  5,  1,  1,  6,
+      1,  1,  7,  1,  1,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1, 10,  1, 11, 12,  1,   13, 14,  1,  1, 15, 16,  1,  1,
+      1, 17,  1,  1, 18,  1,  1,  1,    1,  1, 19, 20, 21, 22,  1, 23,
+
+#define to_EUC_KR_E6_98_offsets 9208
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  4,  5,  1,  6,  1,  7,  8,
+      9, 10,  1, 11, 12, 13,  1,  1,    1,  1,  1,  1,  1,  1, 14, 15,
+     16,  1,  1,  1,  1, 17,  1, 18,   19,  1,  1,  1,  1, 20,  1, 21,
+     22, 23,  1,  1, 24,  1, 25,  1,    1,  1, 26, 27,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_99_offsets 9274
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  6,  1,  7,  1,  1,  1,  8,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  9,  1, 10,  1, 11, 12, 13,
+      1,  1,  1,  1, 14, 15, 16, 17,   18, 19,  1, 20,  1,  1, 21, 22,
+      1,  1,  1, 23, 24,  1, 25, 26,   27,  1, 28,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_9A_offsets 9340
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    4,  5,  1,  1,  1,  1,  6,  1,
+      7,  8,  1,  1,  1,  1,  9, 10,   11,  1,  1,  1,  1, 12,  1,  1,
+     13,  1, 14,  1,  1,  1,  1,  1,    1,  1,  1, 15,  1,  1, 16,  1,
+      1,  1, 17, 18, 19,  1,  1,  1,    1, 20,  1, 21,  1,  1, 22,  1,
+
+#define to_EUC_KR_E6_9B_offsets 9406
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    1,  7,  1,  1,  8,  9,  1,  1,
+     10,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1, 13, 14, 15,  1,  1, 16,   17, 18, 19,  1, 20,  1, 21, 22,
+
+#define to_EUC_KR_E6_9C_offsets 9472
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  2,  2,
+      2,  2,  2,  2,  8,  9,  2, 10,    2,  2,  2, 11,  2, 12, 13, 14,
+      2,  2,  2,  2,  2,  2, 15, 16,   17,  2, 18, 19, 20, 21, 22,  2,
+      2, 23,  2,  2, 24,  2, 25,  2,    2,  2, 26,  2,  2, 27,  2,  2,
+
+#define to_EUC_KR_E6_9D_offsets 9538
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  1,  4,  5,
+      6,  7,  1,  8,  1,  1,  9,  1,    1,  1,  1,  1, 10,  1, 11, 12,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 13,  1, 14,
+     15, 16,  1, 17,  1, 18,  1, 19,    1,  1,  1, 20,  1,  1, 21, 22,
+
+#define to_EUC_KR_E6_9E_offsets 9604
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  4,  1,  1,  1,  5,
+      6,  1,  1,  7,  1,  8,  1,  9,    1,  1, 10,  1, 11, 12,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 13,
+     14,  1,  1, 15,  1,  1, 16, 17,   18,  1,  1,  1,  1,  1, 19,  1,
+
+#define to_EUC_KR_E6_9F_offsets 9670
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+      4,  5,  6,  7,  8,  1,  1,  1,    1,  1,  9,  1,  1, 10,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 11,  1,  1, 12,  1,  1, 13,
+     14, 15,  1, 16, 17, 18, 19,  1,    1,  1,  1, 20,  1,  1, 21,  1,
+
+#define to_EUC_KR_E6_A0_offsets 9736
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  7,  1,  1,  1,  1,  1,    1,  1,  8,  1,  1,  1,  1,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,   10, 11,  1,  1, 12, 13,  1,  1,
+
+#define to_EUC_KR_E6_A1_offsets 9802
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    6,  5,  5,  5,  5,  5,  7,  5,
+      8,  9,  5, 10, 11,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5, 12,  5,  5,
+      5,  5,  5,  5,  5,  5, 13,  5,    5,  5,  5,  5,  5,  5,  5, 14,
+
+#define to_EUC_KR_E6_A2_offsets 9868
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  5,  6,  1,  1,  7,    1,  1,  1,  1,  1,  8,  1,  9,
+      1, 10, 11,  1,  1,  1,  1, 12,   13,  1,  1,  1,  1, 14,  1, 15,
+     16, 17,  1, 18,  1, 19, 20,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_A3_offsets 9934
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  4,  1,  5,  1,  6,  1,  1,
+      1,  1,  7,  1,  1,  8,  1,  9,   10,  1, 11,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1, 14,   15,  1,  1,  1,  1,  1, 16,  1,
+      1,  1, 17,  1,  1,  1,  1,  1,    1, 18, 19,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_A4_offsets 10000
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  4,  5,  2,
+      2,  2,  6,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  7,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  9,  2, 10,
+
+#define to_EUC_KR_E6_A5_offsets 10066
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  3,  4,  5,  1,  6,    1,  7,  8,  1,  1,  1,  9,  1,
+     10, 11, 12, 13,  1,  1,  1,  1,   14,  1,  1, 15,  1, 16, 17, 18,
+      1,  1,  1,  1,  1, 19,  1, 20,   21, 22,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_A6_offsets 10132
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  3,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  5,  1,  6,    1,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  9,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_A7_offsets 10198
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    1,  1,  1,  4,  5,  6,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  9,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 10,  1, 11,  1, 12,
+
+#define to_EUC_KR_E6_A8_offsets 10264
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  4,  1,  5,  1,  1,  1,  6,    1,  7,  1,  1,  1,  1,  8,  9,
+      1, 10,  1, 11,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,   13, 14, 15,  1,  1, 16,  1,  1,
+
+#define to_EUC_KR_E6_A9_offsets 10330
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  4,  1,  1,  1,  1,
+      1,  1,  5,  6,  1,  1,  1,  1,    7,  8,  1,  1,  1,  1,  1,  9,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_AA_offsets 10396
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  4,  2,  2,  2,  5,  6,  2,
+      2,  2,  2,  2,  2,  2,  2,  7,    2,  2,  2,  2,  8,  2,  2,  2,
+      2,  2,  9, 10,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 11,  2,  2,  2,  2,    2,  2,  2, 12,  2,  2,  2,  2,
+
+#define to_EUC_KR_E6_AB_offsets 10462
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  1,  5,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  1,  1,  8,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_AC_offsets 10528
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  3,  1,  4,  1,  1,  1,
+      1,  1,  5,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  9,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1, 10,  1,  1,  1,  1,  1,    1,  1, 11,  1,  1, 12, 13,  1,
+
+#define to_EUC_KR_E6_AD_offsets 10594
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  1,  4,  1,  5,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  8,  9, 10, 11, 12, 13,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+      1,  1, 15,  1,  1,  1,  1, 16,   17,  1,  1, 18,  1,  1,  1, 19,
+
+#define to_EUC_KR_E6_AE_offsets 10660
+128, 191,
+      1,  1,  1,  2,  3,  1,  4,  1,    1,  5,  6,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    8,  1,  1,  1,  1,  1,  9,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 10, 11,
+      1,  1, 12,  1,  1, 13,  1, 14,    1,  1, 15,  1, 16,  1,  1, 17,
+
+#define to_EUC_KR_E6_AF_offsets 10726
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  1,  1,  5,  1,  6,  1,  7,
+      1,  1,  8,  9, 10,  1, 11, 12,   13,  1,  1, 14,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 15, 16,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_B0_offsets 10792
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  1,  1,  8,    9,  1,  1,  1,  1,  1, 10,  1,
+
+#define to_EUC_KR_E6_B1_offsets 10858
+128, 191,
+      1,  2,  3,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  4,
+      6,  4,  4,  4,  4,  7,  4,  8,    4,  4,  9,  4,  4, 10, 11, 12,
+     13,  4,  4,  4,  4,  4,  4,  4,   14,  4, 15,  4,  4, 16,  4,  4,
+     17,  4, 18,  4,  4,  4, 19,  4,    4,  4, 20,  4,  4, 21, 22,  4,
+
+#define to_EUC_KR_E6_B2_offsets 10924
+128, 191,
+      1,  2,  3,  4,  1,  5,  6,  7,    8,  1,  1,  1,  9,  1,  1,  1,
+     10,  1, 11, 12, 13, 14, 15,  1,    1, 16, 17, 18,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 19,  1,  1, 20,  1,
+      1,  1,  1, 21,  1,  1,  1,  1,   22, 23,  1, 24, 25, 26, 27, 28,
+
+#define to_EUC_KR_E6_B3_offsets 10990
+128, 191,
+      1,  2,  3,  1,  4,  1,  1,  1,    1,  5,  6,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  1,  9,  1, 10,    1,  1,  1, 11,  1,  1,  1,  1,
+      1, 12, 13, 14,  1, 15,  1,  1,   16,  1,  1, 17,  1,  1, 18, 19,
+     20,  1,  1, 21,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_B4_offsets 11056
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  5,    1,  6,  1,  7,  1,  1,  8,  1,
+      1,  1,  1,  1,  1,  9,  1, 10,    1, 11, 12,  1,  1,  1,  1,  1,
+      1,  1, 13,  1,  1, 14, 15,  1,   16, 17,  1, 18,  1, 19, 20,  1,
+
+#define to_EUC_KR_E6_B5_offsets 11122
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  3,  4,  1,  5,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  7,  1,    1,  8,  9,  1, 10,  1, 11,  1,
+      1,  1,  1,  1, 12,  1,  1, 13,   14, 15,  1,  1,  1,  1,  1, 16,
+
+#define to_EUC_KR_E6_B6_offsets 11188
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  5,  1,  1,  6,  7,  8,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 12,
+      1,  1, 13,  1,  1, 14,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_B7_offsets 11254
+128, 191,
+      1,  2,  2,  3,  4,  5,  6,  7,    2,  2,  2,  8,  2,  2,  2,  9,
+      2, 10,  2,  2,  2,  2,  2,  2,   11, 12, 13,  2,  2,  2, 14,  2,
+      2, 15,  2,  2,  2,  2,  2,  2,   16,  2, 17, 18,  2,  2, 19,  2,
+      2, 20,  2, 21,  2, 22,  2, 23,   24, 25, 26, 27,  2,  2,  2,  2,
+
+#define to_EUC_KR_E6_B8_offsets 11320
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  4,  5,  1,  1,  1,  6,
+      7,  8,  1,  9, 10, 11, 12,  1,    1,  1,  1, 13, 14, 15,  1, 16,
+      1,  1, 17,  1, 18,  1, 19,  1,   20,  1, 21,  1, 22, 23, 24,  1,
+
+#define to_EUC_KR_E6_B9_offsets 11386
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    1,  1,  4,  1,  1,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  1,    7,  1,  1,  8,  9,  1, 10, 11,
+      1,  1,  1,  1,  1,  1,  1, 12,    1,  1,  1, 13,  1,  1, 14, 15,
+      1,  1, 16, 17,  1,  1,  1,  1,    1,  1, 18,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_BA_offsets 11452
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  4,  5,  1,  6,
+      1,  1,  7,  1,  1,  8,  1,  1,    1,  1,  9, 10,  1,  1,  1, 11,
+      1, 12,  1,  1,  1,  1, 13,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E6_BB_offsets 11518
+128, 191,
+      1,  1,  2,  1,  3,  4,  1,  1,    1,  5,  1,  6,  7,  1,  8,  1,
+      1,  9,  1, 10, 11,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 12,
+      1,  1,  1,  1, 13,  1,  1,  1,   14,  1,  1,  1,  1,  1, 15, 16,
+
+#define to_EUC_KR_E6_BC_offsets 11584
+128, 191,
+      1,  2,  3,  1,  1,  1,  4,  1,    1,  1,  1,  1,  1,  1,  1,  5,
+      1,  6,  1,  1,  7,  8,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      9,  1, 10, 11,  1,  1,  1,  1,    1,  1,  1, 12, 13,  1,  1,  1,
+      1, 14, 15,  1,  1,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1, 17,
+
+#define to_EUC_KR_E6_BD_offsets 11650
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  1,  1,  4,  1,  1,  5,    6,  1,  7,  8,  1,  1,  9, 10,
+      1,  1, 11,  1, 12,  1,  1,  1,    1,  1,  1,  1,  1, 13, 14,  1,
+     15,  1,  1,  1,  1,  1,  1,  1,    1,  1, 16,  1, 17, 18, 19,  1,
+
+#define to_EUC_KR_E6_BE_offsets 11716
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    4,  1,  1,  1,  1,  5,  6,  1,
+      7,  1,  1,  1,  8,  1,  1,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 10, 11,  1,  1, 12,    1,  1,  1,  1,  1,  1, 13, 14,
+      1, 15,  1, 16,  1,  1,  1,  1,    1, 17,  1,  1,  1,  1, 18,  1,
+
+#define to_EUC_KR_E6_BF_offsets 11782
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  6,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  7,  5,  5,    5,  5,  8,  5,  5,  5,  5,  9,
+     10, 11,  5,  5, 12,  5,  5,  5,    5, 13,  5, 14, 15,  5,  5, 16,
+      5, 17,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5, 18,  5,
+
+#define to_EUC_KR_E7_80_offsets 11848
+128, 191,
+      1,  2,  1,  1,  1,  3,  4,  1,    1,  5,  1,  6,  1,  1,  1,  7,
+      1,  8,  1,  1,  1,  9,  1,  1,   10,  1, 11, 12, 13, 14, 15, 16,
+      1,  1,  1, 17,  1,  1,  1, 18,   19,  1,  1,  1,  1,  1,  1, 20,
+      1,  1,  1,  1,  1,  1,  1, 21,    1,  1,  1,  1,  1,  1, 22,  1,
+
+#define to_EUC_KR_E7_81_offsets 11914
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  4,  1,  1,  1,  1,  1,  1,    5,  1,  1,  1,  1,  6,  1,  1,
+      1,  1,  1,  7,  1,  1,  1,  1,    1,  1,  1,  8,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1,  1, 11, 12,  1,  1,
+
+#define to_EUC_KR_E7_82_offsets 11980
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  3,  1,  1,  1,  4,  1,
+      1,  1,  5,  1,  1,  1,  1,  1,    6,  7,  8,  1,  1,  1,  1,  1,
+      1,  9,  1,  1, 10,  1,  1,  1,    1,  1,  1, 11, 12, 13,  1, 14,
+      1,  1,  1, 15,  1,  1,  1, 16,   17, 18,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_83_offsets 12046
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  3,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    5,  6,  1,  1,  1,  7,  1,  8,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  9,  1,  1,  1,  1,  1,  1,    1, 10,  1,  1,  1, 11,  1,  1,
+
+#define to_EUC_KR_E7_84_offsets 12112
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  3,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  6,  1,  1,  1,  7,  1,
+      1,  8,  1,  1,  1,  1,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     10,  1,  1,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_85_offsets 12178
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  4,  1,  5,  1,  6,  1,
+      7,  1,  1,  1,  1,  1,  8,  1,    1,  9,  1,  1, 10,  1, 11,  1,
+      1,  1,  1,  1, 12, 13, 14, 15,    1, 16,  1,  1, 17,  1, 18,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 19,  1,  1,
+
+#define to_EUC_KR_E7_86_offsets 12244
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  3,  4,  1,  1,  1,  1,  5,
+      1,  1,  6,  1,  7,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  9,
+      1,  1, 10,  1,  1,  1,  1,  1,    1,  1,  1,  1, 11,  1,  1,  1,
+      1, 12,  1,  1,  1,  1,  1,  1,    1, 13, 14,  1,  1,  1, 15,  1,
+
+#define to_EUC_KR_E7_87_offsets 12310
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    4,  5,  1,  1,  1,  1,  6,  1,
+      7,  1,  8,  1,  9, 10,  1,  1,    1,  1,  1,  1,  1,  1,  1, 11,
+      1,  1,  1,  1,  1, 12, 13, 14,    1,  1,  1,  1,  1, 15, 16,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 17, 18,  1, 19, 20,
+
+#define to_EUC_KR_E7_88_offsets 12376
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      4,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  5,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  6,  2,  7,  8,  2,  2,
+      9,  2, 10,  2,  2, 11, 12,  2,    2,  2, 13, 14,  2, 15, 16,  2,
+
+#define to_EUC_KR_E7_89_offsets 12442
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    5,  2,  2,  2,  6,  2,  2,  2,
+      2,  2,  7,  2,  2,  2,  2,  2,    8,  9,  2, 10,  2, 11,  2, 12,
+      2, 13, 14,  2,  2,  2,  2, 15,    2, 16,  2,  2,  2,  2,  2,  2,
+      2,  2, 17,  2,  2,  2,  2,  2,    2, 18,  2,  2,  2, 19,  2,  2,
+
+#define to_EUC_KR_E7_8A_offsets 12508
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  4,  3,  3,  3,  3,  5,    3,  3,  3,  3,  6,  3,  3,  7,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_E7_8B_offsets 12574
+128, 191,
+      1,  2,  3,  2,  4,  2,  2,  2,    2,  2,  2,  2,  2,  2,  5,  2,
+      6,  2,  2,  2,  2,  2,  2,  7,    2,  8,  2,  2,  2,  2,  2,  2,
+      2,  9,  2,  2,  2,  2,  2,  2,    2, 10,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   11, 12,  2,  2, 13, 14,  2,  2,
+
+#define to_EUC_KR_E7_8C_offsets 12640
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  4,  5,  6,  1,  1,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  8,  9, 10,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 11, 12,    1,  1,  1,  1,  1,  1, 13, 14,
+
+#define to_EUC_KR_E7_8D_offsets 12706
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  5,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  1,  8,  1,  1,  1,  1,  1,
+      9,  1, 10,  1,  1, 11,  1,  1,   12,  1, 13, 14,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_8E_offsets 12772
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  5,  1,  6,  1,  1,  7,  1,
+      1,  1,  1,  1,  8,  1,  9, 10,   11,  1,  1,  1,  1,  1,  1, 12,
+      1,  1,  1,  1,  1,  1,  1, 13,    1, 14,  1,  1,  1, 15,  1,  1,
+      1,  1, 16, 17,  1,  1,  1,  1,    1, 18,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_8F_offsets 12838
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  4,  5,  2,  6,  7,  2,  8,
+      2,  2,  2,  2,  2,  2,  9,  2,    2, 10,  2,  2,  2, 11, 12,  2,
+     13,  2,  2, 14, 15, 16, 17,  2,    2, 18, 19,  2,  2, 20,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 21,    2, 22,  2,  2,  2, 23, 24,  2,
+
+#define to_EUC_KR_E7_90_offsets 12904
+128, 191,
+      1,  2,  1,  3,  1,  4,  5,  6,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  1,  9,  1,  1,  1,  1,
+     10, 11, 12,  1,  1, 13, 14,  1,   15,  1, 16, 17, 18,  1, 19, 20,
+     21,  1,  1, 22, 23, 24, 25,  1,   26,  1, 27,  1,  1,  1,  1, 28,
+
+#define to_EUC_KR_E7_91_offsets 12970
+128, 191,
+      1,  2,  3,  4,  5,  3,  3,  3,    3,  3,  3,  6,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  7,  3,  8,    3,  9, 10, 11, 12,  3, 13, 14,
+     15,  3, 16,  3, 17, 18,  3,  3,   19, 20, 21,  3,  3,  3,  3, 22,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3, 23,  3,
+
+#define to_EUC_KR_E7_92_offsets 13036
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  4,    1,  5,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  1,  1,  1,  8,  1,  9, 10,
+      1, 11,  1, 12,  1, 13,  1, 14,   15,  1, 16,  1,  1,  1,  1,  1,
+     17,  1, 18,  1,  1, 19,  1,  1,    1, 20,  1,  1,  1, 21,  1, 22,
+
+#define to_EUC_KR_E7_93_offsets 13102
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  3,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  1,  1,  1,    6,  1,  7,  1,  8,  1,  1,  1,
+      9,  1, 10, 11,  1,  1, 12,  1,    1,  1,  1,  1,  1,  1, 13,  1,
+      1,  1,  1,  1,  1,  1,  1, 14,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_94_offsets 13168
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  5,  1,  1,    6,  1,  7,  8,  1,  1,  1,  9,
+      1,  1,  1, 10,  1, 11, 12,  1,   13,  1,  1, 14, 15,  1,  1,  1,
+     16, 17, 18, 19,  1,  1,  1, 20,   21,  1, 22,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_95_offsets 13234
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  3,  1,  1,  4,
+      1,  5,  1,  6,  7,  1,  1,  1,    1,  8,  1,  9, 10, 11,  1,  1,
+      1,  1, 12,  1,  1, 13, 14,  1,    1,  1, 15,  1,  1,  1,  1, 16,
+     17,  1,  1,  1,  1, 18, 19,  1,   20,  1, 21,  1,  1,  1,  1, 22,
+
+#define to_EUC_KR_E7_96_offsets 13300
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  4,  5,  1,  1,  6,  7,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  9,  1,  1,
+      1,  1,  1,  1,  1, 10,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1, 12, 13, 14,  1, 15,  1,  1,   16, 17,  1,  1, 18, 19, 20,  1,
+
+#define to_EUC_KR_E7_97_offsets 13366
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  4,    1,  1,  1,  1,  1,  5,  1,  1,
+      1,  1,  6,  1,  7,  8,  1,  1,    9, 10,  1, 11,  1,  1,  1,  1,
+      1,  1, 12,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     13,  1, 14,  1, 15,  1,  1,  1,    1,  1, 16,  1, 17,  1,  1,  1,
+
+#define to_EUC_KR_E7_98_offsets 13432
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  3,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  4,  2,  2,  2,  2,  2,  5,
+      6,  7,  8,  2,  9,  2, 10,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2, 11,  2,  2,  2,  2,
+
+#define to_EUC_KR_E7_99_offsets 13498
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  4,  1,
+      1,  1,  5,  1,  1,  1,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  7,  1,  1,  8,  1,  1,  1,    1,  9,  1,  1, 10,  1,  1,  1,
+     11,  1, 12,  1,  1,  1,  1,  1,   13,  1,  1, 14, 15, 16, 17,  1,
+
+#define to_EUC_KR_E7_9A_offsets 13564
+128, 191,
+      1,  1,  1,  1,  2,  1,  3,  4,    1,  1,  1,  1,  1,  1,  5,  1,
+      6,  1,  1,  7,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  8,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  9,  1,  1,  1,  1, 10,
+
+#define to_EUC_KR_E7_9B_offsets 13630
+128, 191,
+      1,  1,  2,  3,  1,  1,  4,  1,    5,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  1,    1,  1,  1,  9, 10,  1, 11, 12,
+      1, 13,  1, 14, 15,  1,  1, 16,    1,  1,  1,  1,  1,  1, 17,  1,
+      1,  1, 18,  1, 19,  1,  1,  1,   20,  1,  1,  1, 21,  1, 22,  1,
+
+#define to_EUC_KR_E7_9C_offsets 13696
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    4,  5,  1,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  7,  1,
+      8,  1,  1,  1,  1,  1,  1,  1,    1,  9,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 10,   11,  1, 12,  1, 13,  1,  1,  1,
+
+#define to_EUC_KR_E7_9D_offsets 13762
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  3,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  4,  2,  2,  2,  2,
+      2,  5,  2,  6,  2,  2,  7,  2,    2,  2,  2,  8,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  9,  2,  2,  2,  2, 10, 11,
+
+#define to_EUC_KR_E7_9E_offsets 13828
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  5,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+      8,  1,  1,  9,  1,  1,  1,  1,    1,  1,  1, 10, 11,  1,  1, 12,
+
+#define to_EUC_KR_E7_9F_offsets 13894
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  4,  1,  1,  1,
+      1,  1,  5,  6,  1,  7,  1,  1,    1,  8,  1,  1,  1,  9, 10, 11,
+      1,  1,  1, 12,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_A0_offsets 13960
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  4,  5,  6,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  8,  1,  9,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_A1_offsets 14026
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  4,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  6,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  1,  1,  1,
+
+#define to_EUC_KR_E7_A2_offsets 14092
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  4,  5,  6,  1,
+      1,  7,  1,  1,  1,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  9,  1,  1,  1, 10,    1, 11,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 12, 13, 14,  1,  1,  1,
+
+#define to_EUC_KR_E7_A3_offsets 14158
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  4,  5,  1,  1,  6,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  1,  1,  9,  1,  1, 10,
+      1,  1,  1,  1,  1, 11,  1,  1,    1,  1,  1, 12,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_A4_offsets 14224
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  4,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  5,  6,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  8,  1,  1,  1,  9,  1,
+
+#define to_EUC_KR_E7_A5_offsets 14290
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  3,  3,  3,  3,  3,
+      7,  3,  3,  3,  3,  3,  8,  9,    3,  3, 10, 11, 12, 13, 14,  3,
+     15,  3,  3,  3,  3, 16,  3,  3,   17,  3,  3,  3,  3, 18,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3, 19,  3,  3,  3,  3, 20,
+
+#define to_EUC_KR_E7_A6_offsets 14356
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  4,  5,
+      1,  6,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  8,    1,  1,  9,  1,  1,  1, 10,  1,
+      1, 11,  1, 12,  1,  1,  1,  1,    1, 13,  1,  1,  1, 14, 15, 16,
+
+#define to_EUC_KR_E7_A7_offsets 14422
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  4,  5,  6,  3,  3,  3,  3,
+      3,  7,  8,  3,  3,  9,  3,  3,   10,  3,  3,  3,  3,  3,  3, 11,
+      3,  3,  3,  3, 12,  3, 13, 14,    3, 15,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3, 16,  3,  3,  3,  3,
+
+#define to_EUC_KR_E7_A8_offsets 14488
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    4,  2,  2,  5,  2,  6,  2,  2,
+      2,  2,  2,  2,  7,  2,  2,  8,    2,  9, 10,  2, 11,  2,  2, 12,
+     13,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2, 14,  2,
+      2, 15,  2,  2,  2,  2, 16, 17,    2,  2,  2, 18, 19, 20,  2, 21,
+
+#define to_EUC_KR_E7_A9_offsets 14554
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  4,  2,  2,  2,  5,  6,  2,
+      2,  2,  2,  2,  2,  2,  2,  7,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  8,  9,  2,  2,  2,  2,  2,    2, 10,  2, 11,  2,  2,  2,  2,
+     12,  2,  2,  2, 13,  2, 14,  2,    2, 15, 16,  2,  2, 17,  2, 18,
+
+#define to_EUC_KR_E7_AA_offsets 14620
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  5,  6,  1,  7,  1,  1,    8,  1,  1,  1,  1,  1,  1,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 10, 11,  1,  1,  1, 12, 13,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_AB_offsets 14686
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  1,  5,  6,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  7,    1,  8,  1,  1,  1,  9,  1, 10,
+     11,  1,  1, 12,  1, 13,  1,  1,    1,  1, 14,  1,  1, 15,  1, 16,
+      1,  1,  1,  1,  1,  1, 17,  1,    1, 18, 19,  1,  1,  1,  1, 20,
+
+#define to_EUC_KR_E7_AC_offsets 14752
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+      1,  3,  1,  1,  1,  1,  1,  1,    1,  4,  1,  5,  1,  1,  6,  1,
+      7,  1,  1,  1,  1,  1,  8,  1,    1,  1,  1,  1,  9, 10,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 11,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_AD_offsets 14818
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  4,  5,  6,  1,  7,
+      8,  9, 10,  1, 11,  1, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     13,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 14,  1, 15,  1,
+      1,  1,  1,  1,  1, 16,  1,  1,    1,  1,  1,  1,  1, 17,  1,  1,
+
+#define to_EUC_KR_E7_AE_offsets 14884
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  6,  1,  7,    1,  1,  8,  1,  1,  9,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 11,  1,  1,
+      1, 12,  1,  1, 13,  1,  1,  1,   14,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_AF_offsets 14950
+128, 191,
+      1,  2,  3,  3,  4,  3,  5,  6,    3,  7,  3,  3,  3,  3,  3,  3,
+      3,  3,  8,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      9,  3,  3,  3, 10,  3,  3,  3,    3, 11,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_E7_B0_offsets 15016
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  1,  1,  1,  1,  1,  6,    1,  1,  7,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  9, 10, 11,
+
+#define to_EUC_KR_E7_B1_offsets 15082
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  3,  4,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      5,  1,  1,  1,  6,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_B2_offsets 15148
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  1,  1,  5,  1,  6,    7,  1,  1,  1,  1,  1,  1,  8,
+      1,  1,  1,  1,  1,  9,  1, 10,    1,  1,  1,  1,  1,  1, 11,  1,
+      1, 12, 13, 14,  1,  1,  1,  1,    1, 15,  1,  1,  1,  1, 16,  1,
+
+#define to_EUC_KR_E7_B3_offsets 15214
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      6,  1,  1,  1,  1,  1,  1,  7,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  1,  1,  9,  1,
+
+#define to_EUC_KR_E7_B4_offsets 15280
+128, 191,
+      1,  2,  3,  2,  4,  5,  6,  7,    8,  2,  9, 10,  2, 11,  2,  2,
+     12,  2,  2,  2, 13,  2,  2, 14,   15, 16, 17, 18,  2,  2,  2,  2,
+     19, 20, 21,  2,  2,  2,  2,  2,    2,  2,  2, 22, 23,  2, 24, 25,
+     26,  2,  2, 27,  2, 28,  2,  2,    2, 29, 30,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E7_B5_offsets 15346
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  8,  1,
+      1,  9, 10,  1,  1,  1, 11,  1,   12,  1, 13,  1,  1,  1, 14,  1,
+      1, 15, 16, 17,  1,  1, 18,  1,    1, 19,  1,  1,  1,  1,  1, 20,
+
+#define to_EUC_KR_E7_B6_offsets 15412
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      6,  1,  7,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1, 10, 11,  1, 12, 13,  1,  1,   14,  1, 15, 16,  1, 17, 18, 19,
+
+#define to_EUC_KR_E7_B7_offsets 15478
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  5,  1,    6,  1,  7,  1,  1,  8,  9,  1,
+     10, 11,  1, 12,  1,  1,  1,  1,   13, 14,  1,  1, 15,  1,  1, 16,
+      1,  1,  1,  1, 17,  1,  1,  1,    1,  1,  1, 18,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_B8_offsets 15544
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  4,  1,  1,    1,  1,  1,  5,  1,  6,  7,  8,
+      1,  9,  1, 10,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1, 12, 13,
+      1, 14,  1,  1,  1,  1,  1, 15,    1,  1,  1,  1,  1, 16, 17,  1,
+
+#define to_EUC_KR_E7_B9_offsets 15610
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  6,  1,  7,  8,  1,  1,    1,  1,  1,  1,  1,  1,  9,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1, 11, 12, 13,  1, 14,  1,  1,
+     15,  1,  1,  1,  1,  1,  1,  1,    1, 16,  1,  1, 17,  1,  1,  1,
+
+#define to_EUC_KR_E7_BA_offsets 15676
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  4,
+      1,  1,  1,  5,  1,  1,  6,  1,    7,  1,  1,  8,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_BC_offsets 15742
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  1,  4,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_BD_offsets 15808
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  1,  1,  1,  4,  5,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  6,  7,  1,  1,  8,  1,
+      9,  1, 10,  1,  1, 11,  1, 12,    1, 13,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E7_BE_offsets 15874
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  1,  4,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  7,  1,  1,  1,    1,  1,  8,  1,  1,  1,  9,  1,
+      1,  1,  1,  1, 10,  1,  1,  1,   11, 12,  1,  1,  1,  1,  1,  1,
+      1,  1, 13,  1,  1,  1,  1,  1,   14, 15,  1,  1,  1, 16,  1,  1,
+
+#define to_EUC_KR_E7_BF_offsets 15940
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  1,  4,  1,  5,  1,  6,  1,
+      1,  1,  7,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1, 10,
+     11, 12,  1,  1,  1,  1,  1,  1,    1, 13,  1, 14,  1,  1,  1,  1,
+     15,  1,  1,  1,  1,  1,  1,  1,    1, 16,  1,  1, 17,  1,  1,  1,
+
+#define to_EUC_KR_E8_80_offsets 16006
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  3,    3,  7,  3,  3,  8,  3,  3,  3,
+      9,  3,  3,  3,  3, 10,  3, 11,   12,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 13,  3,  3,
+      3,  3,  3, 14,  3,  3, 15,  3,    3,  3,  3,  3,  3, 16,  3, 17,
+
+#define to_EUC_KR_E8_81_offsets 16072
+128, 191,
+      1,  1,  1,  2,  1,  1,  3,  1,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  5,  1,    6,  1,  7,  1,  1,  1,  8,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  9,
+     10,  1, 11, 12,  1,  1,  1, 13,    1,  1,  1,  1,  1, 14, 15, 16,
+
+#define to_EUC_KR_E8_82_offsets 16138
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  7,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1, 10,  1, 11,  1,  1,
+      1, 12, 13,  1,  1, 14,  1,  1,    1, 15, 16,  1,  1,  1,  1, 17,
+      1, 18, 19,  1, 20,  1,  1,  1,    1,  1, 21,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_83_offsets 16204
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    1,  1,  1,  1,  4,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  6,  7,  1,  1,  8,  1,
+      1,  9,  1,  1, 10, 11,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 12,  1,  1, 13,  1,  1,  1,   14,  1,  1,  1,  1, 15,  1,  1,
+
+#define to_EUC_KR_E8_84_offsets 16270
+128, 191,
+      1,  1,  2,  1,  1,  3,  4,  5,    6,  1,  7,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  9, 10,  1,  1,  1,  1,
+      1,  1,  1, 11,  1,  1,  1,  1,    1, 12,  1, 13,  1,  1,  1, 14,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 15,  1,  1,  1,  1, 16,  1,
+
+#define to_EUC_KR_E8_85_offsets 16336
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  1,  3,  1,
+      4,  5,  1,  1,  6,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  8,  9,  1,    1,  1,  1, 10,  1,  1,  1,  1,
+     11, 12,  1,  1,  1,  1,  1,  1,   13, 14, 15,  1,  1,  1,  1, 16,
+
+#define to_EUC_KR_E8_86_offsets 16402
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  2,  4,  2,  2,  2,  2,  5,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  6,  2,  7,  8,  2,  2,
+      9,  2,  2, 10,  2,  2,  2,  2,   11,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 12,  2, 13,  2,  2,    2,  2, 14,  2,  2, 15, 16, 17,
+
+#define to_EUC_KR_E8_87_offsets 16468
+128, 191,
+      1,  2,  3,  2,  2,  2,  4,  2,    2,  2,  2,  2,  2,  5,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    6,  2,  2,  2,  2,  2,  2,  7,
+      2,  2,  2,  8,  2,  9,  2, 10,   11,  2, 12,  2,  2, 13,  2,  2,
+      2,  2,  2, 14, 15,  2,  2,  2,    2,  2, 16, 17, 18,  2, 19,  2,
+
+#define to_EUC_KR_E8_88_offsets 16534
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    4,  1,  5,  1,  6,  7,  1,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  9, 10,  1, 11, 12,
+      1, 13,  1,  1,  1,  1,  1,  1,    1,  1, 14, 15, 16,  1,  1,  1,
+      1,  1,  1,  1,  1, 17, 18, 19,    1, 20,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_89_offsets 16600
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  4,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  5,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  6,  2,  7,  2,    2,  2,  2,  2,  2,  2,  8,  9,
+      2, 10, 11,  2,  2,  2, 12,  2,   13,  2,  2,  2,  2,  2, 14,  2,
+
+#define to_EUC_KR_E8_8A_offsets 16666
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  3,  4,  1,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  6,  7,  1,  1,  8,  1,  9,
+      1,  1,  1,  1,  1, 10, 11,  1,    1, 12,  1,  1, 13, 14, 15, 16,
+      1, 17,  1, 18,  1,  1,  1, 19,   20, 21,  1, 22, 23, 24,  1, 25,
+
+#define to_EUC_KR_E8_8B_offsets 16732
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  1,  4,  5,  1,  6,    1,  1,  1,  7,  1,  1,  8,  9,
+      1, 10,  1,  1,  1, 11, 12, 13,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 14,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 15, 16,  1,
+
+#define to_EUC_KR_E8_8C_offsets 16798
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    9,  1,  1, 10,  1,  1,  1, 11,
+      1, 12,  1,  1, 13, 14, 15,  1,   16, 17,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_8D_offsets 16864
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  4,  5,  2,  2,  2,  2,  6,
+      2,  7,  8,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  9,  2,  2,  2, 10,    2,  2,  2, 11,  2,  2,  2,  2,
+
+#define to_EUC_KR_E8_8E_offsets 16930
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  5,  1,    6,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  9, 10, 11,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 12,  1,  1,
+
+#define to_EUC_KR_E8_8F_offsets 16996
+128, 191,
+      1,  2,  1,  1,  1,  3,  1,  1,    1,  4,  5,  1,  6,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  8,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 10,  1, 11,  1,  1,  1, 12,
+     13, 14, 15,  1, 16,  1,  1,  1,    1, 17,  1,  1,  1, 18,  1,  1,
+
+#define to_EUC_KR_E8_90_offsets 17062
+128, 191,
+      1,  1,  1,  2,  3,  1,  1,  1,    1,  1,  4,  1,  5,  6,  7,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  9,  1,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,   11,  1,  1,  1,  1, 12,  1,  1,
+
+#define to_EUC_KR_E8_91_offsets 17128
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  1,  4,  1,  1,  1,  1,
+      1,  5,  1,  6,  1,  1,  7,  1,    1,  1,  1,  8,  9,  1,  1, 10,
+      1,  1,  1,  1,  1, 11,  1,  1,    1,  1, 12,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_92_offsets 17194
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  1,  1,    1,  4,  1,  1,  5,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  1,  1,    8,  1,  1,  9, 10,  1,  1, 11,
+
+#define to_EUC_KR_E8_93_offsets 17260
+128, 191,
+      1,  2,  3,  2,  4,  2,  5,  2,    2,  6,  2,  7,  2,  8,  2,  2,
+      2,  9,  2,  2,  2,  2,  2,  2,    2,  2, 10,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 11,  2, 12,  2,
+      2,  2,  2,  2, 13,  2,  2,  2,    2,  2,  2,  2, 14,  2,  2,  2,
+
+#define to_EUC_KR_E8_94_offsets 17326
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  3,  4,  1,  1,  5,    6,  1,  7,  1,  1,  1,  8,  1,
+      1,  9,  1, 10,  1, 11,  1,  1,    1,  1,  1,  1, 12, 13,  1, 14,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 15,  1, 16,
+
+#define to_EUC_KR_E8_95_offsets 17392
+128, 191,
+      1,  2,  1,  3,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  5,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  8,  1,  1,  1,  1,    9, 10, 11,  1,  1, 12,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_96_offsets 17458
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  5,  1,  1,  6,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  1,    9, 10, 11,  1,  1,  1,  1, 12,
+     13,  1,  1,  1,  1,  1,  1,  1,    1,  1, 14,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_97_offsets 17524
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  1,  4,  5,  6,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1, 12, 13,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 14,    1,  1, 15, 16,  1,  1,  1, 17,
+
+#define to_EUC_KR_E8_98_offsets 17590
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  4,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  6,  7,    1,  1,  8,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  9,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 10,
+
+#define to_EUC_KR_E8_99_offsets 17656
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  1,
+      3,  1,  1,  1,  4,  5,  1,  1,    1,  1,  1,  6,  7,  1,  8,  9,
+      1,  1,  1,  1,  1,  1,  1, 10,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 11,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_9A_offsets 17722
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  3,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  6,  1,  1,  1,    1,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_9B_offsets 17788
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  5,  1,  6,  1,  1,  1,  7,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  1,  1,  9,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1, 10,  1,
+
+#define to_EUC_KR_E8_9C_offsets 17854
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    6,  2,  7,  2,  8,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E8_9D_offsets 17920
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  1,
+      1,  1,  1,  1,  1,  3,  1,  4,    1,  1,  1,  1,  1,  1,  1,  5,
+      1,  1,  1,  1,  1,  1,  6,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  9,  1,   10,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_9E_offsets 17986
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  1,    1,  1,  7,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_9F_offsets 18052
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  1,  1,  5,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  7,  1,  8,  1,  1,  9,  1,
+
+#define to_EUC_KR_E8_A0_offsets 18118
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+      1,  1,  4,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  6,  1,  1,  1,  1,  7,  1,    1,  1,  1,  8,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_A1_offsets 18184
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  2,    2,  2,  2,  2,  4,  5,  2,  2,
+      2,  2,  6,  7,  2,  2,  2,  8,    2,  9,  2, 10,  2, 11,  2,  2,
+      2, 12, 13, 14,  2,  2,  2,  2,   15,  2,  2, 16,  2,  2,  2,  2,
+     17,  2, 18,  2,  2,  2,  2, 19,    2,  2,  2,  2,  2,  2, 20, 21,
+
+#define to_EUC_KR_E8_A2_offsets 18250
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    4,  1,  1,  5,  1,  6,  1,  1,
+      1,  1,  7,  1,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1, 10,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1, 11,  1,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_A3_offsets 18316
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  6,  1,  1,    1,  7,  1,  1,  8,  9,  1, 10,
+      1, 11,  1,  1,  1,  1,  1,  1,   12,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 13, 14, 15,  1,  1,   16,  1,  1,  1,  1, 17,  1,  1,
+
+#define to_EUC_KR_E8_A4_offsets 18382
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  4,  5,  1,  1,  1,  1,    6,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  8,  1,  1,    1,  1,  9,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1, 10,  1,   11,  1,  1, 12,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_A5_offsets 18448
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  8,
+
+#define to_EUC_KR_E8_A6_offsets 18514
+128, 191,
+      1,  2,  1,  3,  1,  1,  4,  5,    1,  1,  1,  6,  1,  1,  1,  7,
+      1,  1,  1,  8,  1,  1,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1, 10,  1,  1,  1,  1,  1,  1,    1, 11, 12,  1,  1,  1,  1,  1,
+      1,  1, 13,  1,  1,  1,  1,  1,    1,  1, 14,  1,  1, 15,  1,  1,
+
+#define to_EUC_KR_E8_A7_offsets 18580
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  4,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  5,  2,  2,  2,    6,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E8_A8_offsets 18646
+128, 191,
+      1,  2,  3,  4,  2,  2,  2,  2,    5,  2,  6,  2,  7,  2,  8,  2,
+      2,  2,  2,  9,  2,  2, 10, 11,   12,  2,  2, 13,  2, 14,  2, 15,
+      2,  2,  2, 16,  2, 17,  2,  2,    2,  2, 18,  2,  2, 19,  2,  2,
+      2, 20,  2,  2, 21,  2, 22,  2,    2,  2, 23, 24,  2,  2,  2,  2,
+
+#define to_EUC_KR_E8_A9_offsets 18712
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  4,  1,  1,    1,  1,  1,  5,  1,  1,  6,  1,
+      7,  1,  8,  9,  1,  1, 10,  1,    1, 11,  1,  1,  1, 12, 13,  1,
+     14, 15, 16, 17,  1, 18,  1,  1,    1, 19,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_AA_offsets 18778
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  1,  1,  1,  4,  5,  1,  1,
+      1,  1,  1,  6,  1,  7,  1,  1,    8,  1,  1,  1,  1,  1,  9,  1,
+     10, 11,  1, 12, 13, 14, 15,  1,   16,  1, 17,  1,  1,  1,  1,  1,
+     18,  1, 19,  1,  1,  1,  1,  1,    1, 20,  1,  1, 21,  1, 22, 23,
+
+#define to_EUC_KR_E8_AB_offsets 18844
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    1,  1,  1,  5,  1,  6,  1,  7,
+      1,  1,  8,  1,  1,  1,  9,  1,    1,  1,  1, 10, 11,  1,  1,  1,
+      1, 12,  1,  1,  1,  1, 13, 14,    1,  1, 15, 16,  1, 17, 18,  1,
+      1, 19,  1,  1,  1,  1, 20, 21,   22,  1, 23,  1,  1,  1, 24,  1,
+
+#define to_EUC_KR_E8_AC_offsets 18910
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  4,    4,  4,  4,  4,  4,  4,  6,  4,
+      7,  4,  4,  4,  8,  4,  9, 10,    4, 11, 12, 13,  4, 14,  4,  4,
+     15,  4,  4,  4,  4,  4,  4,  4,   16,  4,  4, 17, 18,  4,  4,  4,
+      4,  4,  4, 19,  4,  4,  4,  4,    4, 20,  4,  4,  4,  4,  4,  4,
+
+#define to_EUC_KR_E8_AD_offsets 18976
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  7,  1,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  9,  1,    1,  1,  1,  1, 10,  1,  1, 11,
+     12,  1,  1,  1, 13,  1,  1, 14,    1,  1,  1,  1,  1, 15,  1,  1,
+
+#define to_EUC_KR_E8_AE_offsets 19042
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  3,  2,  2,  2,  2,  2,
+      4,  2,  5,  6,  2,  2,  7,  2,    2,  2,  8,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E8_B0_offsets 19108
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  3,
+
+#define to_EUC_KR_E8_B1_offsets 19174
+128, 191,
+      1,  2,  1,  1,  1,  1,  3,  1,    4,  1,  5,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  1,  8,  1,  1,  1,  1,  1,
+      1,  9,  1,  1,  1,  1,  1,  1,    1,  1, 10, 11,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 12, 13,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_B2_offsets 19240
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  3,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  5,  6,  1,
+      7,  8,  9,  1,  1,  1,  1, 10,   11, 12, 13, 14, 15,  1,  1, 16,
+     17,  1,  1, 18, 19,  1, 20, 21,   22,  1,  1, 23, 24, 25,  1, 26,
+
+#define to_EUC_KR_E8_B3_offsets 19306
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  6,  9,  6,  6,  6,  6,  6,
+      6, 10,  6, 11,  6,  6,  6,  6,    6,  6, 12,  6, 13,  6, 14,  6,
+     15,  6, 16, 17, 18,  6, 19,  6,    6,  6, 20,  6,  6, 21,  6,  6,
+      6,  6,  6,  6, 22,  6,  6,  6,    6,  6,  6, 23, 24, 25,  6,  6,
+
+#define to_EUC_KR_E8_B4_offsets 19372
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  1,  6,  1,  1,  7,  1,  1,
+      1,  1,  1,  8,  1,  1,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_B5_offsets 19438
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  3,  1,    1,  1,  1,  4,  1,  1,  1,  1,
+      5,  1,  1,  6,  7,  1,  1,  8,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_B6_offsets 19504
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  7,  1,  1,  1,  1,    1,  1,  8,  1,  1,  1,  9,  1,
+
+#define to_EUC_KR_E8_B7_offsets 19570
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  4,  1,  1,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  7,  1,  1,
+      1,  8,  1,  9,  1,  1,  1,  1,   10,  1,  1,  1,  1,  1,  1, 11,
+      1,  1,  1, 12,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_B8_offsets 19636
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  3,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  6,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_B9_offsets 19702
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  4,    5,  6,  7,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  8,  1,  1,  1,  1,  1,  9,
+     10,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 11,  1, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_BA_offsets 19768
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  5,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  6,  7,  8,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_BB_offsets 19834
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  3,  4,  5,  6,  2,  2,
+      2,  2,  7,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  8,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  9,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   10,  2,  2, 11,  2,  2, 12,  2,
+
+#define to_EUC_KR_E8_BC_offsets 19900
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  5,  6,  7,  8,  1,  1,    1,  1,  1,  9, 10, 11, 12, 13,
+      1,  1,  1,  1,  1,  1, 14, 15,    1, 16, 17,  1,  1,  1,  1, 18,
+      1,  1,  1, 19,  1,  1,  1,  1,   20, 21,  1, 22,  1,  1, 23, 24,
+
+#define to_EUC_KR_E8_BD_offsets 19966
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  4,  1,  1,  1,  5,  6,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  7,  1,  8,
+      1,  1,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_BE_offsets 20032
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  3,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  5,  1,    6,  1,  1,  1,  1,  7,  1,  8,
+      9, 10, 11,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E8_BF_offsets 20098
+128, 191,
+      1,  1,  2,  1,  1,  3,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  1,  1,  6,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  1,  8,  9,  1, 10,  1,  1,
+     11,  1, 12,  1,  1,  1,  1, 13,    1, 14,  1,  1,  1, 15,  1,  1,
+
+#define to_EUC_KR_E9_80_offsets 20164
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  5,    8,  5,  5,  9,  5, 10,  5, 11,
+     12, 13,  5,  5, 14, 15,  5, 16,    5, 17, 18,  5,  5, 19, 20, 21,
+     22, 23, 24, 25,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5, 26,  5,
+      5, 27, 28,  5,  5, 29,  5,  5,   30,  5,  5,  5, 31,  5, 32,  5,
+
+#define to_EUC_KR_E9_81_offsets 20230
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  4,    1,  1,  5,  6,  1,  7,  8,  1,
+      9, 10,  1, 11, 12, 13,  1,  1,    1, 14,  1,  1, 15, 16, 17,  1,
+     18, 19,  1, 20,  1,  1,  1,  1,    1, 21,  1,  1,  1, 22, 23, 24,
+      1,  1, 25,  1,  1, 26,  1, 27,   28,  1, 29,  1, 30, 31,  1, 32,
+
+#define to_EUC_KR_E9_82_offsets 20296
+128, 191,
+      1,  2,  3,  4,  5,  6,  6,  7,    8,  6,  9,  6,  6,  6,  6, 10,
+      6, 11,  6,  6,  6, 12,  6,  6,    6, 13,  6,  6,  6,  6,  6,  6,
+      6,  6, 14, 15,  6,  6, 16,  6,   17,  6, 18,  6,  6,  6,  6, 19,
+     20, 21,  6,  6,  6, 22,  6,  6,   23,  6,  6,  6,  6,  6,  6,  6,
+
+#define to_EUC_KR_E9_83_offsets 20362
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    6,  1,  1,  1,  1,  7,  1,  1,
+      1,  1,  1,  1,  1,  8,  1,  1,    1,  1,  1,  1,  1,  9,  1,  1,
+
+#define to_EUC_KR_E9_84_offsets 20428
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  4,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  7,  1,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_85_offsets 20494
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  4,  5,  6,  7,  1,
+      1,  1,  8,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  9,  1,  1,  1,  1,  1,    1, 10, 11,  1, 12,  1,  1,  1,
+      1,  1,  1,  1,  1, 13,  1, 14,   15,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_86_offsets 20560
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  4,  1,  5,  1,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  9,  1, 10, 11,
+      1, 12,  1,  1, 13, 14,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_87_offsets 20626
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    2,  4,  2,  5,  6,  7,  8,  9,
+     10, 11,  2,  2,  2,  2,  2, 12,   13,  2,  2,  2, 14, 15,  2,  2,
+      2,  2,  2, 16,  2,  2,  2, 17,    2,  2, 18,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2, 19,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E9_88_offsets 20692
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      3,  4,  5,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  7,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  9,  1,  1,  1,  1, 10,
+
+#define to_EUC_KR_E9_89_offsets 20758
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  4,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  5,    2,  2,  2,  6,  2,  2,  7,  2,
+      2,  2,  8,  2,  9, 10, 11,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E9_8A_offsets 20824
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  2,  6,  2,  2,  7,  2,    8,  2,  2,  2,  9,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 10,  2,  2, 11, 12,    2, 13,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E9_8B_offsets 20890
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  3,
+      1,  1,  4,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  6,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  1,  1,  1,  8,  1,  1,  1,
+
+#define to_EUC_KR_E9_8C_offsets 20956
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    4,  1,  5,  1,  1,  1,  6,  7,
+      8,  9, 10,  1, 11,  1, 12,  1,   13,  1,  1, 14,  1,  1, 15, 16,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_8D_offsets 21022
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  3,  4,  1,  5,  1,  1,
+      1,  1,  1,  1,  6,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  8,  1,
+      1,  1,  1,  1,  1,  9,  1,  1,    1,  1,  1,  1, 10,  1, 11,  1,
+
+#define to_EUC_KR_E9_8E_offsets 21088
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  4,  1,    1,  1,  5,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  1,  7,    1,  1,  1,  1,  8,  9,  1,  1,
+     10,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_8F_offsets 21154
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  1,
+      1,  5,  1,  1,  6,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_90_offsets 21220
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  4,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_91_offsets 21286
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  4,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  6,  1,  7,
+
+#define to_EUC_KR_E9_95_offsets 21352
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_96_offsets 21418
+128, 191,
+      1,  2,  2,  3,  2,  2,  2,  2,    2,  4,  2,  5,  2,  2,  2,  6,
+      2,  7,  8,  9, 10,  2,  2,  2,   11,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2, 12, 13, 14,  2,  2,   15,  2,  2,  2,  2, 16,  2,  2,
+      2, 17,  2,  2,  2,  2,  2,  2,    2,  2,  2, 18, 19,  2,  2,  2,
+
+#define to_EUC_KR_E9_97_offsets 21484
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  3,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  5,  6,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  8,  9,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_98_offsets 21550
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      1,  1,  6,  1,  1,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  8,
+
+#define to_EUC_KR_E9_99_offsets 21616
+128, 191,
+      1,  2,  3,  2,  4,  2,  2,  2,    2,  2,  2,  5,  6,  7,  2,  2,
+      8,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  9, 10, 11, 12, 13,
+      2,  2, 14, 15, 16,  2,  2,  2,    2,  2, 17,  2,  2,  2,  2,  2,
+     18,  2,  2, 19,  2, 20, 21, 22,   23,  2,  2,  2,  2, 24,  2,  2,
+
+#define to_EUC_KR_E9_9A_offsets 21682
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  4,  5,  1,  6,  7,  1,
+      1,  1,  1,  1,  8,  9,  1,  1,   10, 11,  1, 12, 13,  1,  1,  1,
+      1,  1,  1, 14,  1,  1,  1, 15,   16,  1, 17,  1,  1,  1,  1,  1,
+      1, 18,  1,  1,  1,  1,  1, 19,    1,  1,  1, 20,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_9B_offsets 21748
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  8,  3,  9, 10, 11, 12,  3,
+      3,  3,  3,  3,  3, 13, 14,  3,    3, 15,  3, 16, 17,  3,  3,  3,
+      3,  3, 18, 19,  3,  3,  3,  3,   20, 21, 22,  3,  3,  3,  3, 23,
+     24,  3, 25,  3,  3,  3, 26, 27,    3, 28,  3, 29,  3,  3,  3,  3,
+
+#define to_EUC_KR_E9_9C_offsets 21814
+128, 191,
+      1,  2,  2,  2,  2,  2,  3,  4,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  2,  6,  2,  2,  7,  2,    2,  8,  2,  2,  9,  2, 10,  2,
+      2,  2,  2,  2,  2,  2,  2, 11,    2,  2,  2,  2,  2,  2,  2,  2,
+     12,  2, 13,  2,  2,  2,  2,  2,    2, 14,  2,  2,  2, 15,  2,  2,
+
+#define to_EUC_KR_E9_9D_offsets 21880
+128, 191,
+      1,  1,  2,  1,  3,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  6,  1,    1,  1,  1,  1,  7,  1,  8,  1,
+      1,  9, 10,  1,  1,  1,  1,  1,    1, 11,  1,  1,  1, 12,  1,  1,
+      1,  1,  1,  1, 13,  1,  1, 14,    1,  1, 15,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_9E_offsets 21946
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  2,  1,  3,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  1,  1,  7,  1,  8,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_9F_offsets 22012
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  1,  7,  1,    1,  1,  1,  8,  1,  1,  1,  9,
+
+#define to_EUC_KR_E9_A0_offsets 22078
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  5,    8,  5,  9,  5, 10,  5,  5,  5,
+     11, 12, 13, 14,  5,  5,  5, 15,   16,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5, 17,  5,  5,
+     18,  5,  5,  5,  5,  5,  5,  5,   19, 20,  5, 21,  5,  5,  5,  5,
+
+#define to_EUC_KR_E9_A1_offsets 22144
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  3,  4,  5,  1,
+      1,  1,  1,  1,  6,  1,  1,  1,    7,  1,  8,  1,  1,  1,  9,  1,
+      1,  1,  1,  1,  1, 10,  1, 11,    1,  1,  1, 12,  1,  1,  1, 13,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A2_offsets 22210
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A3_offsets 22276
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  4,  5,  1,  1,  6,
+      1,  7,  8,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  9, 10, 11,
+      1,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1, 13, 14, 15,  1,
+
+#define to_EUC_KR_E9_A4_offsets 22342
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  3,  4,  1,  5,  1,  1,  1,
+      6,  1,  1,  7,  1,  1,  1,  1,    8,  1,  1,  1,  1,  1,  9,  1,
+     10,  1,  1,  1,  1,  1,  1,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A5_offsets 22408
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  1,  4,  5,  6,  1,  1,
+      1,  7,  8,  1,  9,  1,  1, 10,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A6_offsets 22474
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  3,  1,  1,  1,  4,  1,  1,
+      1,  1,  1,  1,  1,  5,  1,  1,    6,  1,  1,  1,  7,  8,  9,  1,
+      1, 10,  1, 11, 12,  1,  1,  1,    1, 13,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A7_offsets 22540
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  5,  1,  1,  6,  1,  1,    1,  7,  1,  1,  1,  8,  1,  9,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 10,  1,  1,
+      1, 11,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 12,
+
+#define to_EUC_KR_E9_A8_offsets 22606
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  1,
+      8,  1,  1,  1,  1,  1,  9, 10,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_A9_offsets 22672
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  2,  5,  2,  2,
+      2,  2,  2,  2,  2,  6,  2,  7,    2,  2,  8,  9,  2,  2,  2, 10,
+      2,  2, 11,  2,  2, 12,  2,  2,    2, 13, 14,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_E9_AA_offsets 22738
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_AB_offsets 22804
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  5,  1,  1,    1,  1,  1,  1,  1,  1,  6,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_AC_offsets 22870
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  4,  1,  1,  1,  1,  1,
+      1,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  1,  1,
+
+#define to_EUC_KR_E9_AD_offsets 22936
+128, 191,
+      1,  2,  3,  4,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  9,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1, 10,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_AE_offsets 23002
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  1,
+      1,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  5,  1,  1,  6,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_AF_offsets 23068
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B0_offsets 23134
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      3,  1,  4,  1,  1,  5,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  1,  1,    1,  1,  1,  8,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B1_offsets 23200
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B3_offsets 23266
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  3,    1,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  5,  6,  1,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B4_offsets 23332
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  4,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  6,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B5_offsets 23398
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  1,  1,
+      4,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  7,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B6_offsets 23464
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  3,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B7_offsets 23530
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  4,  1,  1,  1,  1,  1,    5,  6,  7,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B8_offsets 23596
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  3,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_B9_offsets 23662
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  3,  1,  1,  1,  4,  1,  5,
+
+#define to_EUC_KR_E9_BA_offsets 23728
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  4,    1,  1,  1,  1,  1,  5,  1,  6,
+      1,  1,  1,  1,  1,  7,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  8,  9,  1,  1,    1,  1,  1, 10,  1,  1, 11,  1,
+
+#define to_EUC_KR_E9_BB_offsets 23794
+128, 191,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  3,  4,  1,
+      1,  5,  1,  1,  6,  1,  1,  1,    7,  1,  1,  8,  9,  1, 10,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_BC_offsets 23860
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  1,  4,  1,
+      1,  1,  1,  5,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_BD_offsets 23926
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  4,  1,
+      1,  1,  5,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  6,
+      1,  7,  1,  1,  1,  1,  1,  8,    1,  1,  9,  1, 10,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_BE_offsets 23992
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      3,  1,  1,  1,  1,  4,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_E9_offsets 24058
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 19, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 19, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 19,
+
+#define to_EUC_KR_EA_B0_offsets 24124
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  5,    6,  7,  8,  3,  3,  3,  3,  3,
+      9, 10, 11, 12, 13, 14, 15, 16,    3, 17, 18, 19, 20, 21,  3,  3,
+     22,  3,  3,  3, 23,  3,  3,  3,    3,  3,  3,  3, 24, 25,  3, 26,
+     27, 28,  3,  3,  3,  3,  3,  3,   29, 30,  3,  3, 31,  3,  3,  3,
+
+#define to_EUC_KR_EA_B1_offsets 24190
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  3,  2,  4,  2,  2,
+      2,  2,  2,  2,  5,  2,  2,  2,    6,  2,  2,  2,  7,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  9,  2,  2, 10,  2,  2, 11,   12,  2, 13,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EA_B2_offsets 24256
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  3,    3,  8,  9, 10, 11,  3,  3,  3,
+     12,  3,  3,  3, 13,  3,  3,  3,    3,  3,  3,  3, 14, 15,  3, 16,
+     17, 18,  3,  3,  3,  3,  3,  3,   19, 20, 21,  3, 22,  3,  3, 23,
+     24,  3,  3,  3,  3,  3,  3,  3,   25, 26,  3, 27, 28, 29,  3,  3,
+
+#define to_EUC_KR_EA_B3_offsets 24322
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  7,    1,  1,  1,  1,  1,  1,  1,  1,
+      8,  9,  1,  1, 10,  1,  1, 11,   12,  1, 13,  1, 14,  1,  1, 15,
+     16, 17,  1, 18,  1, 19, 20,  1,    1,  1,  1,  1, 21, 22,  1,  1,
+
+#define to_EUC_KR_EA_B4_offsets 24388
+128, 191,
+      1,  2,  2,  2,  3,  2,  4,  2,    2,  2,  2,  2,  5,  6,  2,  7,
+      2,  8,  2,  2,  2,  2,  2,  2,    9,  2,  2,  2, 10,  2,  2,  2,
+     11,  2,  2,  2,  2,  2,  2,  2,    2, 12,  2,  2, 13, 14,  2,  2,
+      2,  2,  2,  2, 15, 16,  2,  2,   17,  2,  2,  2, 18,  2,  2,  2,
+
+#define to_EUC_KR_EA_B5_offsets 24454
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    8,  1,  1,  1,  1,  1,  1,  1,
+      1,  9,  1, 10,  1,  1,  1,  1,    1,  1,  1,  1, 11, 12,  1,  1,
+     13,  1,  1, 14, 15, 16, 17,  1,    1,  1,  1, 18, 19, 20,  1, 21,
+
+#define to_EUC_KR_EA_B6_offsets 24520
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    4,  5,  1,  1,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1, 11,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EA_B7_offsets 24586
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  8,  3,  3,  3,  3,    3,  3,  3,  3,  9,  3,  3,  3,
+     10,  3,  3,  3, 11,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,   12, 13,  3,  3, 14,  3,  3, 15,
+
+#define to_EUC_KR_EA_B8_offsets 24652
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    4,  5,  3,  6,  3,  7,  3,  3,
+      3,  3,  3,  3,  8,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      9, 10,  3,  3, 11,  3,  3, 12,   13,  3, 14,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EA_B9_offsets 24718
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  3,    3,  3,  7,  3,  8,  9, 10,  3,
+     11,  3,  3,  3, 12,  3, 13,  3,    3,  3,  3,  3, 14, 15,  3, 16,
+     17, 18,  3,  3,  3, 19,  3,  3,   20, 21,  3,  3, 22,  3,  3,  3,
+     23,  3,  3,  3,  3,  3,  3,  3,   24, 25,  3, 26, 27, 28,  3,  3,
+
+#define to_EUC_KR_EA_BA_offsets 24784
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  7,  1,
+
+#define to_EUC_KR_EA_BB_offsets 24850
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  8,  2,  2,  2,  2,  2,  2,    9, 10,  2,  2, 11,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   12,  2,  2, 13,  2, 14,  2,  2,
+      2,  2,  2,  2, 15,  2,  2,  2,   16,  2,  2,  2, 17,  2,  2,  2,
+
+#define to_EUC_KR_EA_BC_offsets 24916
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    3,  1,  1,  1,  1,  4,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+      8,  1,  9,  1, 10,  1,  1,  1,    1,  1,  1,  1, 11, 12,  1, 13,
+
+#define to_EUC_KR_EA_BD_offsets 24982
+128, 191,
+      1,  2,  3,  4,  1,  1,  1,  1,    5,  6,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1, 10, 11,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 12,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EA_BE_offsets 25048
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  2,  2,  2,  2,
+      5,  6,  2,  2,  2,  7,  2,  2,    2,  2,  2,  2,  8,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    9, 10,  2,  2, 11,  2,  2,  2,
+
+#define to_EUC_KR_EA_BF_offsets 25114
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  3,    4,  5,  2,  6,  2,  7,  8,  2,
+      2,  2,  2,  2,  9,  2,  2,  2,    2,  2,  2,  2, 10,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   11, 12,  2,  2,  2,  2,  2,  2,
+     13, 14,  2,  2, 15,  2,  2,  2,   16,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EA_offsets 25180
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+
+#define to_EUC_KR_EB_80_offsets 25246
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    3,  3,  3,  3,  5,  3,  3,  3,
+      6,  3,  3,  3,  7,  3,  3,  3,    3,  3,  3,  3,  8,  9,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,   10,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_81_offsets 25312
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  5,  1,  6,  1,  7,  1,
+      1,  1,  1,  8,  9, 10,  1, 11,    1, 12,  1,  1,  1, 13,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 14, 15,  1,  1,
+
+#define to_EUC_KR_EB_82_offsets 25378
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      2,  7,  2,  2,  2,  2,  2,  2,    8,  9, 10,  2, 11,  2,  2, 12,
+     13, 14, 15,  2,  2,  2,  2,  2,   16, 17,  2, 18, 19, 20, 21, 22,
+      2, 23,  2, 24, 25, 26,  2,  2,   27,  2,  2,  2, 28,  2,  2,  2,
+
+#define to_EUC_KR_EB_83_offsets 25444
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  6,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1,  1,  1,  1,
+     11,  1,  1,  1,  1, 12,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_84_offsets 25510
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  4,  5,  1,  1,  1,
+      6,  1,  7,  8,  1,  1,  1,  1,    9, 10,  1, 11, 12, 13,  1,  1,
+      1,  1,  1, 14, 15, 16,  1,  1,   17,  1,  1,  1, 18,  1,  1,  1,
+      1,  1,  1,  1, 19, 20,  1, 21,   22, 23,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_85_offsets 25576
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  3,  8,  9,  3,  3,   10,  3,  3,  3, 11,  3,  3,  3,
+     12,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,   13, 14,  3,  3, 15,  3,  3,  3,
+
+#define to_EUC_KR_EB_86_offsets 25642
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  2,  2,
+      2,  2,  8,  9, 10,  2,  2,  2,   11,  2,  2,  2, 12,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   13,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_87_offsets 25708
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  9,  1,  1, 10,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1, 12,  1, 13,  1, 14,  1,  1,
+
+#define to_EUC_KR_EB_88_offsets 25774
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  5,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  9,    1, 10,  1,  1,  1,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1, 13,  1,  1,  1,
+
+#define to_EUC_KR_EB_89_offsets 25840
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  3,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    5,  6,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+
+#define to_EUC_KR_EB_8A_offsets 25906
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  4,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  7,  1,  1,  1,    8,  9, 10,  1,  1,  1,  1,  1,
+     11, 12,  1, 13,  1, 14, 15,  1,    1,  1, 16,  1, 17,  1,  1,  1,
+     18,  1,  1,  1, 19,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_8B_offsets 25972
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  1,
+      5,  1,  6,  1,  1,  1,  1,  1,    7,  8,  1,  9,  1, 10,  1,  1,
+      1,  1, 11,  1, 12, 13, 14,  1,   15,  1,  1, 16, 17, 18, 19, 20,
+      1,  1,  1, 21, 22, 23,  1, 24,   25, 26, 27, 28,  1,  1,  1, 29,
+
+#define to_EUC_KR_EB_8C_offsets 26038
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  8,  9, 10,  3,  3,    3,  3,  3,  3, 11,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_8D_offsets 26104
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  1,    5,  1,  1,  6,  7,  1,  8,  9,
+      1,  1,  1,  1, 10, 11,  1, 12,    1, 13,  1, 14,  1,  1, 15,  1,
+     16, 17,  1,  1, 18,  1,  1,  1,   19,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_8E_offsets 26170
+128, 191,
+      1,  2,  3,  4,  5,  6,  3,  3,    3,  3,  3,  3,  7,  3,  3,  3,
+      8,  3,  3,  3,  9,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+     10, 11,  3,  3,  3,  3,  3,  3,   12,  3,  3,  3, 13,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_8F_offsets 26236
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  5,  6,  1,  7,  1,
+      8,  1,  1,  1,  9, 10,  1, 11,    1, 12,  1, 13,  1, 14,  1,  1,
+     15,  1,  1,  1, 16,  1,  1,  1,   17,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 18,  1,  1,  1,
+
+#define to_EUC_KR_EB_90_offsets 26302
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  9,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_91_offsets 26368
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  8,  1,  9,  1,  1,    1,  1,  1,  1, 10,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_92_offsets 26434
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  4,  2,  2,
+      2,  2,  2,  2,  5,  2,  2,  2,    6,  2,  2,  2,  7,  2,  2,  2,
+      2,  2,  2,  2,  2,  8,  2,  9,    2, 10,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_93_offsets 26500
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  2,  2,  2,  2,
+      5,  2,  2,  2,  2,  6,  2,  2,    2,  2,  2,  2,  7,  8,  2,  2,
+      9,  2,  2, 10, 11,  2, 12,  2,    2,  2,  2,  2, 13, 14,  2, 15,
+      2, 16,  2,  2,  2,  2,  2,  2,   17,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_94_offsets 26566
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  5,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  9,   10, 11, 12,  1,  1,  1,  1,  1,
+     13, 14,  1,  1, 15,  1,  1,  1,   16,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_95_offsets 26632
+128, 191,
+      1,  2,  3,  4,  5,  6,  3,  3,    3,  3,  3,  7,  8,  9,  3,  3,
+     10,  3,  3,  3, 11,  3,  3,  3,    3,  3,  3,  3, 12, 13,  3, 14,
+     15, 16,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_96_offsets 26698
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  1,    5,  1,  6,  7,  1,  1,  1,  1,
+      8,  9,  1, 10, 11, 12,  1,  1,    1,  1,  1, 13, 14, 15,  1,  1,
+
+#define to_EUC_KR_EB_97_offsets 26764
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  8,  2,  2,  2,  2,  2,  2,    9,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 10,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_98_offsets 26830
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  6,  1,  1,    1,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_99_offsets 26896
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_9A_offsets 26962
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  1,  1,
+      4,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  6,  7,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_9B_offsets 27028
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_9C_offsets 27094
+128, 191,
+      1,  2,  3,  3,  3,  4,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    5,  6,  3,  3,  7,  3,  3,  8,
+      9,  3,  3,  3,  3,  3,  3,  3,   10, 11,  3, 12,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_9D_offsets 27160
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  6,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  8,  1,  1,  1,    9,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1, 12,  1, 13,  1,  1,    1,  1,  1,  1, 14, 15,  1,  1,
+
+#define to_EUC_KR_EB_9E_offsets 27226
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  8,  9,  2,  2,  2, 10, 11,   12, 13,  2,  2, 14,  2,  2,  2,
+     15,  2,  2,  2,  2,  2,  2,  2,   16, 17,  2, 18, 19, 20,  2,  2,
+      2,  2,  2,  2, 21, 22,  2,  2,   23,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_9F_offsets 27292
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1, 10,
+
+#define to_EUC_KR_EB_A0_offsets 27358
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  4,    5,  6,  3,  3,  7,  3,  3,  3,
+      8,  3,  3,  3,  3,  3,  3,  3,    9, 10,  3, 11,  3, 12,  3,  3,
+      3,  3,  3,  3, 13, 14,  3,  3,   15,  3,  3,  3, 16,  3,  3,  3,
+      3,  3,  3,  3, 17, 18,  3, 19,   20, 21,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_A1_offsets 27424
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  2,  5,  2,  2,  2,  2,    2,  2,  2,  2,  6,  7,  2,  2,
+      8,  2,  2,  2,  9,  2,  2,  2,    2,  2,  2,  2, 10, 11,  2, 12,
+      2, 13,  2,  2,  2,  2,  2,  2,   14,  2,  2,  2, 15,  2,  2,  2,
+
+#define to_EUC_KR_EB_A2_offsets 27490
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  1,  5,  1,  1,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_A3_offsets 27556
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  3,    3,  3,  3,  3,  6,  3,  3,  3,
+      7,  3,  3,  3,  8,  3,  3,  3,    3,  3,  3,  3,  3,  9,  3, 10,
+      3, 11,  3,  3,  3,  3,  3,  3,   12, 13,  3,  3, 14,  3,  3,  3,
+     15,  3,  3,  3,  3,  3,  3,  3,   16, 17,  3, 18,  3, 19,  3,  3,
+
+#define to_EUC_KR_EB_A4_offsets 27622
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  1,
+
+#define to_EUC_KR_EB_A5_offsets 27688
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  5,
+      2,  6,  2,  2,  2,  2,  2,  2,    7,  8,  2,  2,  9,  2,  2,  2,
+     10,  2,  2,  2,  2,  2,  2,  2,   11, 12,  2, 13,  2, 14,  2,  2,
+      2,  2,  2,  2, 15, 16,  2,  2,   17,  2,  2,  2, 18,  2,  2,  2,
+
+#define to_EUC_KR_EB_A6_offsets 27754
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  6,  1,  1,  7,  8,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  9, 10,  1,  1,
+     11,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1, 13, 14,  1, 15,
+
+#define to_EUC_KR_EB_A7_offsets 27820
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  6,  7,
+      8,  9, 10,  1,  1,  1,  1,  1,   11, 12,  1, 13,  1, 14, 15,  1,
+      1, 16,  1, 17, 18, 19,  1,  1,   20,  1,  1,  1, 21,  1,  1,  1,
+      1,  1,  1,  1, 22, 23,  1, 24,   25, 26, 27,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_A8_offsets 27886
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    4,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  5,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    6,  7,  3,  3,  8,  3,  3,  3,
+
+#define to_EUC_KR_EB_A9_offsets 27952
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  8,  2,
+      2,  2,  2,  9, 10, 11,  2,  2,   12,  2,  2,  2, 13,  2,  2,  2,
+      2,  2,  2,  2, 14, 15,  2, 16,   17, 18,  2,  2,  2,  2,  2,  2,
+     19, 20,  2,  2, 21,  2,  2,  2,   22,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_AA_offsets 28018
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    1,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  9, 10,  1,  1,  1,
+     11,  1, 12,  1,  1,  1,  1,  1,   13, 14,  1, 15,  1, 16,  1,  1,
+
+#define to_EUC_KR_EB_AB_offsets 28084
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  1,  1,
+
+#define to_EUC_KR_EB_AC_offsets 28150
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  4,  2,  5,
+      2,  6,  2,  2,  2,  2,  2,  2,    7,  2,  2,  2,  8,  2,  2,  2,
+      9,  2,  2,  2,  2,  2,  2,  2,    2, 10,  2, 11,  2,  2,  2,  2,
+      2,  2,  2,  2, 12, 13, 14,  2,   15,  2,  2, 16, 17, 18, 19,  2,
+
+#define to_EUC_KR_EB_AD_offsets 28216
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  6,  1,  7,
+      8,  1,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1,  1,  1,  1,
+      1, 11,  1, 12,  1,  1,  1,  1,    1,  1,  1,  1, 13,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_AE_offsets 28282
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  3,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    6,  1,  1,  1,  7,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  1,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_AF_offsets 28348
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  2,  2,  2,  2,
+      5,  2,  2,  6,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    7,  8,  2,  2,  9,  2,  2, 10,
+
+#define to_EUC_KR_EB_B0_offsets 28414
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  2,  6,  7,  8,  2,  9,
+      2, 10,  2,  2, 11, 12, 13, 14,   15,  2,  2, 16, 17, 18, 19, 20,
+      2,  2,  2,  2, 21, 22,  2, 23,    2, 24,  2,  2,  2, 25,  2,  2,
+     26, 27,  2,  2, 28,  2,  2,  2,   29,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_B1_offsets 28480
+128, 191,
+      1,  2,  3,  4,  5,  6,  3,  3,    3,  7,  3,  3,  8,  9,  3,  3,
+     10,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3, 11,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_B2_offsets 28546
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  5,  6,  1,  7,  1,
+      1,  1,  1,  1,  8,  9,  1, 10,    1, 11, 12,  1,  1,  1,  1,  1,
+     13, 14,  1,  1, 15,  1,  1, 16,   17,  1,  1,  1,  1,  1,  1,  1,
+     18, 19,  1, 20, 21, 22,  1,  1,    1,  1,  1,  1, 23, 24,  1,  1,
+
+#define to_EUC_KR_EB_B3_offsets 28612
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  4,  2,  5,
+      6,  7,  2,  2,  2,  8,  2,  2,    9,  2,  2,  2, 10,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 11, 12, 13,  2,   14,  2,  2,  2, 15,  2,  2,  2,
+
+#define to_EUC_KR_EB_B4_offsets 28678
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_B5_offsets 28744
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  2,  5,  2,  2,  2,
+      6,  2,  2,  2,  2,  2,  2,  2,    7,  8,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  9,  2,  2,  2,   10,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_B6_offsets 28810
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  5,    6,  7,  8,  3,  3,  3,  3,  3,
+      9, 10,  3, 11,  3, 12,  3,  3,    3, 13, 14,  3, 15,  3,  3,  3,
+      3,  3,  3,  3, 16,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+     17,  3,  3,  3,  3,  3,  3,  3,   18,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_B7_offsets 28876
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  8,  1,  1,  1,    9,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_B8_offsets 28942
+128, 191,
+      1,  2,  2,  3,  2,  4,  2,  2,    2,  2,  2,  2,  5,  6,  2,  2,
+      7,  2,  2,  2,  8,  2,  2,  2,    2,  2,  2,  2,  9, 10,  2, 11,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_B9_offsets 29008
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  6,  1,
+      1,  1,  1,  1,  7,  8,  1,  9,    1, 10, 11, 12,  1,  1,  1,  1,
+     13, 14,  1,  1, 15,  1,  1,  1,   16,  1, 17,  1,  1,  1,  1,  1,
+     18, 19,  1, 20, 21, 22,  1,  1,    1,  1,  1, 23, 24, 25,  1,  1,
+
+#define to_EUC_KR_EB_BA_offsets 29074
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  8,  2,  2,  2,  2,  2,  2,    9, 10,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,   11,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EB_BB_offsets 29140
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  5,    6,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  8,  9, 10,  1,  1,    1,  1,  1,  1, 11,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_BC_offsets 29206
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    5,  6,  1,  7,  8,  9,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_BD_offsets 29272
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  3,  3,  8,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EB_BE_offsets 29338
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EB_BF_offsets 29404
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  3,  4,  1,  1,
+      5,  1,  1,  1,  6,  1,  1,  1,    1,  1,  1,  1,  7,  1,  1,  8,
+      1,  9,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_80_offsets 29470
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+
+#define to_EUC_KR_EC_81_offsets 29536
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_82_offsets 29602
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  8,  1,  9,  1,  1,    1,  1,  1,  1, 10, 11,  1, 12,
+     13,  1,  1, 14, 15, 16, 17,  1,    1,  1,  1,  1, 18, 19,  1, 20,
+
+#define to_EUC_KR_EC_83_offsets 29668
+128, 191,
+      1,  2,  3,  3,  3,  4,  3,  3,    5,  6,  3,  3,  7,  3,  3,  3,
+      8,  3,  3,  3,  3,  3,  3,  3,    9, 10,  3, 11, 12, 13,  3,  3,
+      3,  3,  3,  3, 14, 15,  3,  3,   16,  3,  3,  3, 17,  3,  3,  3,
+      3,  3,  3,  3, 18, 19,  3, 20,    3, 21,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EC_84_offsets 29734
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  2,  2,  2,  2,
+      5,  2,  2,  2,  2,  6,  2,  2,    2,  2,  2,  2,  7,  8,  9, 10,
+     11,  2,  2, 12, 13,  2, 14, 15,    2,  2,  2,  2, 16, 17,  2, 18,
+     19, 20,  2,  2,  2,  2, 21,  2,   22, 23,  2,  2, 24,  2,  2,  2,
+
+#define to_EUC_KR_EC_85_offsets 29800
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  5,  6,  7,  2,  2,
+      2,  2,  2,  2,  8,  9,  2,  2,   10,  2,  2,  2, 11,  2,  2,  2,
+      2,  2,  2,  2, 12, 13,  2, 14,   15, 16,  2,  2,  2,  2,  2,  2,
+     17,  2,  2,  2, 18,  2,  2,  2,   19,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_86_offsets 29866
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  3,  4,  5,  1,
+      6,  1,  1,  1,  7,  1,  8,  1,    1,  1,  1,  1,  9, 10,  1, 11,
+      1, 12,  1,  1,  1, 13,  1,  1,   14, 15,  1,  1, 16,  1,  1,  1,
+     17,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 18,  1,  1,
+
+#define to_EUC_KR_EC_87_offsets 29932
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  6,    7,  1,  1,  1,  1,  1,  1,  1,
+      8,  1,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1,  1,  1,  1,
+     11, 12,  1, 13,  1,  1,  1,  1,    1,  1,  1,  1, 14, 15,  1,  1,
+
+#define to_EUC_KR_EC_88_offsets 29998
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      2,  7,  2,  2,  2,  2,  2,  2,    8,  9,  2,  2, 10,  2,  2, 11,
+     12,  2,  2,  2,  2,  2,  2,  2,   13, 14,  2, 15,  2, 16,  2, 17,
+      2, 18, 19,  2, 20,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_89_offsets 30064
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  8,  1,  1,    1,  1,  1,  1,  9, 10,  1,  1,
+     11,  1,  1,  1, 12,  1,  1,  1,    1,  1,  1,  1, 13, 14,  1, 15,
+
+#define to_EUC_KR_EC_8A_offsets 30130
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  1,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  1,  1,  7,  1,  8,  1,  1,
+      1,  1,  1,  1,  9, 10,  1,  1,   11,  1,  1,  1, 12, 13,  1,  1,
+      1,  1,  1,  1, 14, 15,  1, 16,    1, 17,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_8B_offsets 30196
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  1,  1,
+      4,  1,  1,  5,  6,  1,  1,  1,    1,  1,  1,  7,  8,  9,  1, 10,
+      1, 11,  1,  1,  1,  1, 12,  1,   13, 14,  1, 15, 16,  1,  1,  1,
+
+#define to_EUC_KR_EC_8C_offsets 30262
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  2,  5,  6,  2,  2,
+      2,  2,  2,  7,  8,  9,  2,  2,   10,  2,  2,  2, 11,  2,  2,  2,
+      2,  2,  2,  2, 12, 13,  2,  2,   14, 15,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_8D_offsets 30328
+128, 191,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  1,  1,
+      6,  1,  7,  1,  1,  1,  1,  1,    8,  9,  1,  1, 10, 11,  1,  1,
+
+#define to_EUC_KR_EC_8E_offsets 30394
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_8F_offsets 30460
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  2,  5,  2,  2,  6,
+      7,  2,  8,  2,  2,  2,  2,  2,    9, 10,  2,  2,  2, 11,  2,  2,
+      2,  2,  2,  2, 12, 13,  2,  2,   14,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_90_offsets 30526
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+
+#define to_EUC_KR_EC_91_offsets 30592
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  1,    1,  9,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_92_offsets 30658
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    5,  2,  2,  2,  6,  2,  2,  2,
+
+#define to_EUC_KR_EC_93_offsets 30724
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    6,  1,  7,  1,  1,  1,  1,  8,
+
+#define to_EUC_KR_EC_94_offsets 30790
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  4,  3,  3,  3,
+      5,  3,  3,  3,  6,  3,  3,  3,    3,  3,  3,  3,  7,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    8,  9,  3,  3, 10,  3,  3,  3,
+     11,  3,  3,  3,  3,  3,  3,  3,   12, 13,  3, 14,  3, 15,  3,  3,
+
+#define to_EUC_KR_EC_95_offsets 30856
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  5,  6,  1,  7,  8,  9,  1,
+      1,  1,  1, 10, 11, 12,  1, 13,   14, 15,  1,  1,  1, 16, 17,  1,
+     18, 19,  1,  1, 20,  1,  1,  1,   21,  1,  1,  1,  1,  1,  1,  1,
+     22, 23,  1, 24, 25, 26,  1,  1,    1,  1,  1,  1, 27, 28,  1,  1,
+
+#define to_EUC_KR_EC_96_offsets 30922
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  4,    2,  2,  2,  2,  5,  6,  2,  7,
+      2,  8,  2,  2,  2,  9,  2, 10,   11,  2,  2,  2, 12,  2,  2,  2,
+     13,  2,  2,  2,  2,  2,  2,  2,    2, 14,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2, 15, 16,  2,  2,   17, 18,  2, 19, 20, 21, 22,  2,
+
+#define to_EUC_KR_EC_97_offsets 30988
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  7,  8,  1,  9,  1, 10,  1,
+     11, 12,  1,  1, 13,  1,  1,  1,   14,  1,  1,  1,  1,  1,  1,  1,
+     15, 16,  1, 17,  1, 18,  1,  1,    1,  1,  1,  1, 19, 20, 21,  1,
+     22,  1,  1,  1, 23,  1, 24, 25,    1,  1,  1,  1, 26, 27, 28, 29,
+
+#define to_EUC_KR_EC_98_offsets 31054
+128, 191,
+      1,  2,  3,  3,  3,  4,  5,  6,    7,  3,  3,  3,  8,  3,  3,  3,
+      9,  3,  3,  3,  3,  3,  3,  3,   10, 11,  3, 12, 13,  3,  3,  3,
+      3,  3,  3,  3, 14, 15,  3,  3,   16,  3,  3,  3, 17, 18, 19,  3,
+     20,  3,  3, 21, 22, 23,  3, 24,    3, 25,  3, 26,  3,  3,  3,  3,
+
+#define to_EUC_KR_EC_99_offsets 31120
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  8,  9, 10,  3,  3,    3,  3,  3,  3, 11, 12,  3,  3,
+     13,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3, 14,  3,  3, 15,
+      3, 16,  3,  3,  3,  3,  3,  3,   17, 18,  3,  3, 19,  3,  3,  3,
+
+#define to_EUC_KR_EC_9A_offsets 31186
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  5,  2,  6,  2,  2,
+      2,  2,  2,  2,  7,  8,  2,  2,    9,  2,  2,  2, 10,  2,  2,  2,
+      2,  2,  2,  2, 11, 12,  2, 13,    2, 14,  2,  2,  2,  2,  2,  2,
+     15, 16,  2,  2, 17,  2,  2,  2,   18, 19, 20,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_9B_offsets 31252
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  3,    3,  3,  3,  3,  6,  7,  3,  3,
+      8,  3,  3,  3,  9,  3,  3,  3,    3,  3,  3,  3, 10, 11,  3,  3,
+     12, 13,  3,  3,  3,  3,  3,  3,   14, 15,  3,  3, 16,  3,  3,  3,
+     17,  3,  3,  3,  3,  3,  3,  3,   18, 19,  3,  3,  3, 20,  3,  3,
+
+#define to_EUC_KR_EC_9C_offsets 31318
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  6,  7,  1,  8,    1,  9,  1,  1,  1,  1,  1,  1,
+     10, 11,  1,  1, 12,  1,  1,  1,   13,  1,  1,  1,  1,  1,  1,  1,
+     14, 15,  1, 16,  1, 17,  1, 18,    1,  1,  1,  1, 19, 20,  1,  1,
+
+#define to_EUC_KR_EC_9D_offsets 31384
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  4,  2,  5,  6,  2,  7,
+      2,  8,  9, 10, 11, 12, 13, 14,   15,  2,  2,  2, 16,  2,  2,  2,
+     17,  2,  2,  2,  2,  2,  2,  2,   18,  2,  2, 19,  2,  2,  2,  2,
+      2,  2,  2,  2, 20, 21,  2,  2,   22,  2,  2,  2, 23, 24, 25,  2,
+
+#define to_EUC_KR_EC_9E_offsets 31450
+128, 191,
+      1,  1,  1,  2,  3,  4,  1,  5,    6,  7,  8,  1,  1,  1,  9,  1,
+     10, 11,  1,  1, 12,  1, 13, 14,   15,  1, 16,  1,  1,  1,  1,  1,
+     17, 18,  1, 19, 20, 21, 22,  1,    1,  1,  1,  1, 23, 24,  1,  1,
+     25,  1,  1,  1, 26,  1,  1,  1,    1,  1,  1,  1, 27, 28,  1, 29,
+
+#define to_EUC_KR_EC_9F_offsets 31516
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    4,  5,  3,  3,  6,  3,  7,  3,
+      8,  3,  3,  3,  3,  3,  3,  3,    9,  3,  3,  3,  3, 10,  3,  3,
+      3,  3,  3,  3, 11,  3,  3,  3,   12,  3,  3,  3, 13,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EC_A0_offsets 31582
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  6,  3,  3,  3,  3,  3,
+      7,  8,  3,  9,  3, 10, 11,  3,    3,  3,  3,  3, 12, 13,  3,  3,
+     14,  3,  3,  3, 15,  3,  3,  3,    3,  3,  3,  3, 16, 17,  3, 18,
+      3, 19,  3,  3,  3,  3,  3,  3,   20,  3,  3,  3, 21,  3,  3,  3,
+
+#define to_EUC_KR_EC_A1_offsets 31648
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  2,  5,  6,  2,  2,
+      2,  2,  2,  2,  7,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  9,  2,  2, 10,  2,  2,  2,   11,  2, 12,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_A2_offsets 31714
+128, 191,
+      1,  2,  3,  4,  3,  5,  6,  7,    3,  3,  3,  8,  9, 10,  3,  3,
+      3,  3,  3,  3, 11,  3,  3,  3,    3,  3,  3,  3,  3, 12,  3, 13,
+      3, 14,  3,  3,  3,  3,  3,  3,   15,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3, 16, 17,  3,  3,
+
+#define to_EUC_KR_EC_A3_offsets 31780
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  6,  1,  7,    1,  8,  1,  1,  1,  1,  1,  1,
+      9, 10,  1,  1, 11,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1, 12,  1,  1,    1,  1,  1,  1, 13, 14,  1,  1,
+
+#define to_EUC_KR_EC_A4_offsets 31846
+128, 191,
+      1,  2,  2,  2,  3,  4,  5,  2,    2,  2,  2,  2,  6,  7,  2,  8,
+      2,  9,  2,  2,  2,  2,  2,  2,   10,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 11,  2,  2,  2,
+      2,  2,  2,  2, 12,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_A5_offsets 31912
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  8,  1,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+     10,  1,  1,  1, 11,  1,  1,  1,    1,  1,  1,  1, 12,  1,  1,  1,
+
+#define to_EUC_KR_EC_A6_offsets 31978
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  1,  8,  1,  9,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_A7_offsets 32044
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  5,    6,  3,  7,  3,  3,  3,  3,  3,
+      8,  9,  3, 10,  3, 11, 12,  3,    3, 13, 14,  3, 15, 16,  3,  3,
+     17,  3, 18,  3, 19,  3,  3, 20,    3,  3,  3,  3, 21, 22,  3, 23,
+     24, 25,  3,  3,  3,  3,  3,  3,   26, 27,  3,  3, 28,  3,  3,  3,
+
+#define to_EUC_KR_EC_A8_offsets 32110
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  4,  2,  5,  6,  7,  2,  2,
+      2,  2,  2,  2,  8,  2,  2,  2,    9,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2, 10,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_A9_offsets 32176
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  1,  1,
+      4,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  8,
+      9, 10,  1,  1,  1,  1,  1,  1,   11,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1, 12,  1,  1,
+
+#define to_EUC_KR_EC_AA_offsets 32242
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+
+#define to_EUC_KR_EC_AB_offsets 32308
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      2,  7,  2,  8,  2,  2,  2,  2,    9, 10,  2,  2,  2,  2,  2,  2,
+     11,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2, 12,  2,  2,  2,
+      2,  2,  2,  2, 13,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_AC_offsets 32374
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  4,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_AD_offsets 32440
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  1,  1,  9,  1,  1,
+      1,  1,  1,  1, 10,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,   11, 12,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_AE_offsets 32506
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_AF_offsets 32572
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  1,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B0_offsets 32638
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  1,  1,
+      4,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+      1,  8,  9,  1,  1,  1,  1, 10,   11, 12,  1,  1, 13,  1, 14,  1,
+     15,  1,  1,  1,  1,  1,  1,  1,   16, 17,  1, 18, 19, 20, 21,  1,
+
+#define to_EUC_KR_EC_B1_offsets 32704
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  6,  7,  1,  8,    9, 10,  1,  1,  1,  1,  1,  1,
+     11,  1,  1,  1, 12,  1, 13,  1,   14,  1,  1,  1,  1,  1,  1,  1,
+     15,  1,  1,  1,  1, 16,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B2_offsets 32770
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  1,
+      5,  1,  1,  1,  1,  1,  1,  1,    6,  7,  1,  8,  9, 10,  1,  1,
+      1,  1,  1,  1, 11, 12,  1,  1,   13,  1,  1,  1, 14,  1,  1,  1,
+
+#define to_EUC_KR_EC_B3_offsets 32836
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  1,  9,  1,  1,  1,
+     10,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B4_offsets 32902
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  9,  1, 10,  1,  1,
+      1,  1,  1,  1, 11,  1,  1,  1,   12,  1,  1,  1, 13,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 14,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B5_offsets 32968
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  7,
+      1,  8,  1,  1,  1,  1,  1,  1,    9,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B6_offsets 33034
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  9,    1, 10,  1,  1,  1,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B7_offsets 33100
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    8,  9,  1, 10,  1, 11,  1,  1,
+
+#define to_EUC_KR_EC_B8_offsets 33166
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  1,  9,  1,  1,  1,   10,  1,  1,  1,  1,  1,  1,  1,
+     11, 12,  1, 13,  1, 14,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_B9_offsets 33232
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  5,
+      6,  7,  1,  1,  1,  1,  1,  1,    8,  9,  1, 10,  1, 11,  1,  1,
+      1,  1,  1,  1, 12, 13,  1,  1,   14,  1,  1,  1, 15,  1,  1,  1,
+
+#define to_EUC_KR_EC_BA_offsets 33298
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      6,  7,  1,  1,  8,  1,  1,  1,    9,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1, 12, 13, 14,  1,  1,    1,  1,  1,  1, 15, 16,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_BB_offsets 33364
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  1,  1,    5,  1,  1,  6,  7,  1,  1,  1,
+      1,  1,  1,  1,  8,  9,  1, 10,   11, 12,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_BC_offsets 33430
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  8,  3,  9,  3,  3,    3,  3,  3,  3, 10,  3,  3,  3,
+     11,  3,  3,  3, 12,  3,  3,  3,    3,  3,  3,  3, 13, 14,  3, 15,
+     16, 17,  3,  3,  3,  3,  3,  3,   18,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_EC_BD_offsets 33496
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  6,  7,  1,  8,    1,  9,  1,  1,  1,  1,  1,  1,
+     10, 11,  1,  1, 12,  1,  1,  1,   13,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EC_BE_offsets 33562
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  4,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  2,  2,  2,  2,  2,  2,    6,  2,  2,  2,  2,  2,  2,  2,
+      7,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_EC_BF_offsets 33628
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+      7,  8,  1,  9,  1, 10,  1,  1,    1,  1,  1,  1, 11,  1,  1,  1,
+
+#define to_EUC_KR_ED_80_offsets 33694
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  2,  2,  2,  2,  2,  2,    5,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  6,  2,  2,
+      2,  2,  2,  2,  7,  8,  2,  2,    9,  2,  2,  2, 10,  2,  2,  2,
+
+#define to_EUC_KR_ED_81_offsets 33760
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    1,  5,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    8,  1,  1,  1,  1,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1, 10, 11,  1,  1,
+     12,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1,  1, 14, 15,  1,  1,
+
+#define to_EUC_KR_ED_82_offsets 33826
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  1,  1,    5,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  1,  9,    1, 10,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_83_offsets 33892
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  6,  3,  3,  3,  3,  3,  3,
+      7,  8,  3,  9, 10, 11,  3,  3,    3,  3,  3,  3, 12, 13,  3,  3,
+     14,  3,  3,  3, 15,  3,  3,  3,    3,  3,  3,  3, 16, 17,  3, 18,
+     19, 20,  3,  3,  3,  3,  3,  3,   21,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_EUC_KR_ED_84_offsets 33958
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  5,  1,  1,  1,    6,  1,  7,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_85_offsets 34024
+128, 191,
+      1,  2,  3,  4,  5,  6,  3,  3,    3,  3,  3,  3,  7,  8,  3,  3,
+      9,  3,  3,  3, 10,  3,  3,  3,    3,  3,  3,  3, 11, 12,  3, 13,
+      3, 14,  3,  3,  3,  3,  3,  3,   15,  3,  3,  3, 16,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3, 17,  3,  3,  3,
+
+#define to_EUC_KR_ED_86_offsets 34090
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  6,  1,  1,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+      8,  9,  1, 10,  1, 11,  1,  1,    1,  1, 12,  1, 13,  1,  1,  1,
+
+#define to_EUC_KR_ED_87_offsets 34156
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    3,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  4,  2,  2,  2,    5,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_ED_88_offsets 34222
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  3,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  5,  6,  1,  1,
+      7,  1,  1,  1,  8,  1,  1,  1,    1,  1,  1,  1,  9, 10,  1, 11,
+
+#define to_EUC_KR_ED_89_offsets 34288
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_8A_offsets 34354
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  3,  3,  8,  3,  3,    3,  3,  3,  3,  9,  3,  3,  3,
+     10,  3,  3,  3, 11,  3,  3,  3,    3,  3,  3,  3, 12,  3,  3,  3,
+      3, 13,  3,  3,  3,  3,  3,  3,   14, 15,  3,  3, 16,  3,  3, 17,
+
+#define to_EUC_KR_ED_8B_offsets 34420
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  2,  6,  2,  2,  2,  2,
+      2,  2,  2,  2,  7,  2,  2,  2,    8,  2,  2,  2,  9,  2,  2,  2,
+      2,  2,  2,  2, 10, 11,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+     12, 13,  2,  2, 14,  2,  2,  2,   15,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_ED_8C_offsets 34486
+128, 191,
+      1,  2,  3,  4,  3,  5,  3,  3,    3,  3,  3,  3,  6,  7,  8,  3,
+      9,  3,  3,  3, 10,  3, 11,  3,    3,  3,  3,  3, 12, 13,  3, 14,
+     15, 16,  3,  3,  3, 17,  3,  3,   18, 19,  3,  3, 20,  3,  3,  3,
+     21,  3,  3,  3,  3,  3,  3,  3,   22, 23,  3, 24, 25, 26,  3,  3,
+
+#define to_EUC_KR_ED_8D_offsets 34552
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+
+#define to_EUC_KR_ED_8E_offsets 34618
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      7,  8,  2,  2,  2,  2,  2,  2,    9, 10,  2,  2, 11,  2,  2,  2,
+     12,  2,  2,  2,  2,  2,  2,  2,   13, 14,  2, 15,  2, 16,  2,  2,
+      2,  2,  2,  2, 17,  2,  2,  2,   18,  2,  2,  2, 19,  2,  2,  2,
+
+#define to_EUC_KR_ED_8F_offsets 34684
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  5,  1,  1,  1,  1,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    7,  1,  1,  1,  1,  1,  1,  1,
+      1,  8,  1,  9,  1,  1,  1,  1,    1,  1,  1,  1, 10, 11,  1,  1,
+     12,  1,  1,  1, 13,  1,  1,  1,    1,  1,  1,  1, 14, 15,  1, 16,
+
+#define to_EUC_KR_ED_90_offsets 34750
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  4,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_91_offsets 34816
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  2,
+      5,  2,  2,  2,  6,  2,  2,  2,    2,  2,  2,  2,  2,  7,  2,  8,
+      2,  2,  2,  2,  2,  2,  2,  2,    9, 10,  2,  2, 11,  2,  2, 12,
+
+#define to_EUC_KR_ED_92_offsets 34882
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    4,  5,  2,  6,  2,  7,  2,  2,
+      2,  2,  2,  2,  8,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  9,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_ED_93_offsets 34948
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      3,  1,  1,  1,  4,  1,  1,  1,    1,  1,  1,  1,  5,  1,  1,  6,
+      1,  1,  1,  1,  1,  1,  1,  1,    7,  1,  1,  1,  8,  1,  1,  1,
+      9,  1,  1,  1,  1,  1,  1,  1,   10,  1,  1, 11,  1, 12,  1,  1,
+
+#define to_EUC_KR_ED_94_offsets 35014
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  6,  1,  7,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+
+#define to_EUC_KR_ED_95_offsets 35080
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  4,  5,  2,  6,
+      2,  7,  2,  2,  2,  2,  2,  2,    8,  9,  2,  2, 10,  2,  2,  2,
+     11,  2,  2,  2,  2, 12,  2,  2,   13, 14,  2, 15,  2, 16,  2,  2,
+      2,  2,  2,  2, 17, 18,  2,  2,   19,  2,  2,  2, 20,  2,  2,  2,
+
+#define to_EUC_KR_ED_96_offsets 35146
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  4,    5,  6,  1,  1,  1,  1,  1,  1,
+      7,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  8,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_97_offsets 35212
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  1,
+      5,  1,  6,  1,  1,  1,  1,  1,    7,  8,  1,  9,  1, 10,  1,  1,
+      1,  1,  1,  1, 11, 12,  1,  1,   13,  1,  1,  1, 14,  1,  1,  1,
+      1,  1,  1,  1, 15, 16,  1, 17,    1, 18,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_98_offsets 35278
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  8,  9, 10,  3,  3,    3,  3,  3,  3, 11,  3,  3,  3,
+     12,  3,  3,  3, 13,  3,  3,  3,    3,  3,  3,  3,  3, 14,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,   15, 16,  3,  3, 17,  3,  3,  3,
+
+#define to_EUC_KR_ED_99_offsets 35344
+128, 191,
+      1,  2,  2,  2,  2,  3,  2,  2,    4,  5,  2,  6,  2,  7,  2,  2,
+      2,  8,  2,  2,  9, 10,  2,  2,   11,  2,  2,  2, 12,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2, 13,    2, 14,  2,  2,  2,  2,  2,  2,
+     15, 16,  2,  2, 17,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_EUC_KR_ED_9A_offsets 35410
+128, 191,
+      1,  1,  1,  2,  1,  3,  1,  1,    1,  1,  1,  1,  4,  5,  1,  1,
+      6,  1,  1,  1,  7,  1,  1,  1,    1,  1,  1,  1,  1,  8,  1,  9,
+      1, 10,  1,  1,  1,  1,  1,  1,   11,  1,  1,  1, 12,  1,  1,  1,
+     13,  1,  1,  1,  1,  1,  1,  1,    1, 14,  1, 15,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_9B_offsets 35476
+128, 191,
+      1,  1,  1,  1,  2,  3,  1,  1,    4,  1,  1,  1,  5,  1,  1,  1,
+      1,  6,  1,  1,  7,  1,  1,  8,    1,  9,  1,  1,  1,  1,  1,  1,
+     10,  1,  1,  1, 11,  1,  1,  1,   12,  1,  1,  1,  1,  1,  1,  1,
+     13,  1,  1,  1,  1, 14,  1,  1,    1,  1,  1,  1, 15, 16,  1,  1,
+
+#define to_EUC_KR_ED_9C_offsets 35542
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  2,  2,  2,  2,  2,  2,    5,  6,  2,  2,  7,  2,  2,  2,
+      8,  2,  2,  2,  2,  2,  2,  2,    9, 10,  2, 11,  2, 12,  2,  2,
+      2,  2,  2,  2, 13, 14,  2,  2,   15,  2,  2,  2, 16,  2,  2,  2,
+
+#define to_EUC_KR_ED_9D_offsets 35608
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  3,    1,  4,  1,  1,  1,  1,  1,  1,
+      5,  6,  1,  1,  7,  1,  8,  9,   10, 11,  1,  1,  1,  1,  1,  1,
+     12, 13,  1, 14,  1, 15,  1,  1,    1, 16,  1,  1, 17,  1,  1,  1,
+     18,  1,  1,  1, 19,  1,  1,  1,    1,  1,  1,  1, 20, 21,  1,  1,
+
+#define to_EUC_KR_ED_9E_offsets 35674
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    3,  4,  1,  1,  5,  1,  1,  1,
+      6,  1,  1,  1,  1,  1,  1,  1,    7,  8,  1,  9,  1, 10,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_ED_offsets 35740
+128, 159,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+
+#define to_EUC_KR_EF_BD_offsets 35774
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     32, 32, 32, 32, 32, 32, 32, 32,   32, 32, 32, 32, 32, 32, 32, 32,
+     32, 32, 32, 32, 32, 32, 32, 32,   32, 32, 32, 32, 32, 32, 32, 32,
+
+#define to_EUC_KR_EF_BF_offsets 35840
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  6,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_EF_offsets 35906
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  7,  8,  1,  9,
+
+#define to_EUC_KR_F0_offsets 35972
+144, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_F4_offsets 36022
+128, 143,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_EUC_KR_offsets 36040
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  7,  6,  6,  8,  9,
+     10, 11,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22, 23, 24, 25, 13, 26,
+     27, 28, 28, 28, 29,
+
+#define from_EUC_KR_A1_offsets 36287
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94,
+
+#define from_EUC_KR_A2_offsets 36383
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 70, 70,   70, 70, 70, 70, 70, 70, 70, 70,
+     70, 70, 70, 70, 70, 70, 70, 70,   70, 70, 70, 70, 70, 70,
+
+#define from_EUC_KR_A5_offsets 36479
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 11, 11, 11, 11, 12,
+     13, 14, 15, 16, 17, 18, 19, 20,   21, 11, 11, 11, 11, 11, 11, 11,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+     38, 39, 40, 41, 42, 43, 44, 45,   11, 11, 11, 11, 11, 11, 11, 11,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+     62, 63, 64, 65, 66, 67, 68, 69,   11, 11, 11, 11, 11, 11,
+
+#define from_EUC_KR_A6_offsets 36575
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 69, 69, 69,   69, 69, 69, 69, 69, 69, 69, 69,
+     69, 69, 69, 69, 69, 69, 69, 69,   69, 69, 69, 69, 69, 69,
+
+#define from_EUC_KR_A7_offsets 36671
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     80, 80, 80, 80, 80, 80, 80, 80,   80, 80, 80, 80, 80, 80,
+
+#define from_EUC_KR_A8_offsets 36767
+161, 254,
+      1,  2,  3,  4,  5,  6,  5,  7,    8,  9, 10, 11, 12, 13, 14,  5,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 51, 52, 53, 54,   55, 56, 57, 58, 59, 60, 61, 62,
+     63, 64, 65, 66, 67, 68, 69, 70,   71, 72, 73, 74, 75, 76, 77, 78,
+     79, 80, 81, 82, 83, 84, 85, 86,   87, 88, 89, 90, 91, 92,
+
+#define from_EUC_KR_AA_offsets 36863
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 84, 84, 84, 84,   84, 84, 84, 84, 84, 84,
+
+#define from_EUC_KR_AB_offsets 36959
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 87,   87, 87, 87, 87, 87, 87,
+
+#define from_EUC_KR_AC_offsets 37055
+161, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+     51, 52, 53, 54, 55, 56, 57, 58,   59, 60, 61, 62, 63, 64, 65, 66,
+     67, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34,
+
+#define from_EUC_KR_AD_offsets 37151
+161, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define from_EUC_KR_offsets 37247
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 14, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24, 25, 26, 27, 28, 29, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 14, 40, 41, 42, 43, 44, 45,
+     46, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 59, 60, 61,
+     62, 63, 64, 65, 66, 67, 68, 69,   70, 71, 72, 73, 74, 75, 76, 77,
+     78, 79, 80, 81, 82, 83, 84, 85,   86, 87, 88, 89, 90, 91, 14,
+
+#define to_CP949_C2_offsets 37504
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  3,  1,  1,  4,    5,  1,  6,  1,  1,  7,  8,  1,
+      9, 10, 11, 12, 13,  1, 14, 15,   16, 17, 18,  1, 19, 20, 21, 22,
+
+#define to_CP949_E2_82_offsets 37570
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_CP949_ED_9E_offsets 37636
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 37, 37, 37,   37, 37, 37, 37, 37, 37, 37, 37,
+     37, 37, 37, 37, 37, 37, 37, 37,   37, 37, 37, 37, 37, 37, 37, 37,
+
+#define from_CP949_81_offsets 37702
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,154,155,156,  157,158,159,160,161,162,163,164,
+    165,166,167,168,169,170,171,172,  173,174,175,176,177,178,
+
+#define from_CP949_A2_offsets 37894
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,154,155,156,  156,156,156,156,156,156,156,156,
+    156,156,156,156,156,156,156,156,  156,156,156,156,156,156,
+
+#define from_CP949_A5_offsets 38086
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 95, 95, 95, 95, 96,
+     97, 98, 99,100,101,102,103,104,  105, 95, 95, 95, 95, 95, 95, 95,
+    106,107,108,109,110,111,112,113,  114,115,116,117,118,119,120,121,
+    122,123,124,125,126,127,128,129,   95, 95, 95, 95, 95, 95, 95, 95,
+    130,131,132,133,134,135,136,137,  138,139,140,141,142,143,144,145,
+    146,147,148,149,150,151,152,153,   95, 95, 95, 95, 95, 95,
+
+#define from_CP949_A6_offsets 38278
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,153,153,153,  153,153,153,153,153,153,153,153,
+    153,153,153,153,153,153,153,153,  153,153,153,153,153,153,
+
+#define from_CP949_A7_offsets 38470
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,154,155,156,  157,158,159,160,161,162,163,164,
+    164,164,164,164,164,164,164,164,  164,164,164,164,164,164,
+
+#define from_CP949_A8_offsets 38662
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 89, 91,   92, 93, 94, 95, 96, 97, 98, 89,
+     99,100,101,102,103,104,105,106,  107,108,109,110,111,112,113,114,
+    115,116,117,118,119,120,121,122,  123,124,125,126,127,128,129,130,
+    131,132,133,134,135,136,137,138,  139,140,141,142,143,144,145,146,
+    147,148,149,150,151,152,153,154,  155,156,157,158,159,160,161,162,
+    163,164,165,166,167,168,169,170,  171,172,173,174,175,176,
+
+#define from_CP949_AA_offsets 38854
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,154,155,156,  157,158,159,160,161,162,163,164,
+    165,166,167,168,168,168,168,168,  168,168,168,168,168,168,
+
+#define from_CP949_AB_offsets 39046
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,119,120,121,122,123,124,  125,126,127,128,129,130,131,132,
+    133,134,135,136,137,138,139,140,  141,142,143,144,145,146,147,148,
+    149,150,151,152,153,154,155,156,  157,158,159,160,161,162,163,164,
+    165,166,167,168,169,170,171,171,  171,171,171,171,171,171,
+
+#define from_CP949_AC_offsets 39238
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 86, 87, 88, 89, 90, 91, 92,   93, 94, 95, 96, 97, 98, 99,100,
+    101,102,103,104,105,106,107,108,  109,110,111,112,113,114,115,116,
+    117,118,118,118,118,118,118,118,  118,118,118,118,118,118,118,118,
+    119,120,121,122,123,124,125,126,  127,128,129,130,131,132,133,134,
+    135,136,137,138,139,140,141,142,  143,144,145,146,147,148,149,150,
+    151,118,118,118,118,118,118,118,  118,118,118,118,118,118,
+
+#define from_CP949_AD_offsets 39430
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26,  0,  0,  0,  0,  0,  0,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52,  0,  0,  0,  0,  0,  0,
+     53, 54, 55, 56, 57, 58, 59, 60,   61, 62, 63, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77, 78, 79, 80, 81, 82, 83, 84,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85, 85, 85,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85, 85, 85,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85, 85, 85,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85, 85, 85,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85, 85, 85,
+     85, 85, 85, 85, 85, 85, 85, 85,   85, 85, 85, 85, 85, 85,
+
+#define from_CP949_C6_offsets 39622
+65, 254,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 19, 19, 19, 19, 19,   19, 19,  0,  0,  0,  0,  0,  0,
+     19, 19, 19, 19, 19, 19, 19, 19,   19, 19, 19, 19, 19, 19, 19, 19,
+     19, 19, 19, 19, 19, 19, 19, 19,   19, 19,  0,  0,  0,  0,  0,  0,
+     19, 19, 19, 19, 19, 19, 19, 19,   19, 19, 19, 19, 19, 19, 19, 19,
+     19, 19, 19, 19, 19, 19, 19, 19,   19, 19, 19, 19, 19, 19, 19, 19,
+     20, 21, 22, 23, 24, 25, 26, 27,   28, 29, 30, 31, 32, 33, 34, 35,
+     36, 37, 38, 39, 40, 41, 42, 43,   44, 45, 46, 47, 48, 49, 50, 51,
+     52, 53, 54, 55, 56, 57, 58, 59,   60, 61, 62, 63, 64, 65, 66, 67,
+     68, 69, 70, 71, 72, 73, 74, 75,   76, 77, 78, 79, 80, 81, 82, 83,
+     84, 85, 86, 87, 88, 89, 90, 91,   92, 93, 94, 95, 96, 97, 98, 99,
+    100,101,102,103,104,105,106,107,  108,109,110,111,112,113,
+
+#define from_CP949_C7_offsets 39814
+65, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27, 28, 29, 30, 31, 32, 33,
+     34, 35, 36, 37, 38, 39, 40, 41,   42, 43, 44, 45, 46, 47, 48, 49,
+     50, 51, 52, 53, 54, 55, 56, 57,   58, 59, 60, 61, 62, 63, 64, 65,
+     66, 67, 68, 69, 70, 71, 72, 73,   74, 75, 76, 77, 78, 79, 80, 81,
+     82, 83, 84, 85, 86, 87, 88, 89,   90, 91, 92, 93, 94, 95,
+
+#define from_CP949_C9_offsets 40006
+65, 254,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,
+
+#define from_CP949_offsets 40198
+0, 254,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94, 95, 96,
+     97, 98, 99,100,101,102,103,104,  105,106,107,108,109,110,111,112,
+    113,114,115,116,117,118,119,120,  121,122,123,124,125,126, 74,
+
+};
+static const unsigned int
+korean_word_array[49217] = {
+#define to_EUC_KR_C2_infos WORDINDEX2INFO(0)
+           INVALID,         UNDEF, o2(0xA2,0xAE), o2(0xA2,0xB4),
+     o2(0xA1,0xD7), o2(0xA1,0xA7), o2(0xA8,0xA3), o2(0xA1,0xA9),
+     o2(0xA1,0xC6), o2(0xA1,0xBE), o2(0xA9,0xF7), o2(0xA9,0xF8),
+     o2(0xA2,0xA5), o2(0xA2,0xD2), o2(0xA1,0xA4), o2(0xA2,0xAC),
+     o2(0xA9,0xF6), o2(0xA8,0xAC), o2(0xA8,0xF9), o2(0xA8,0xF6),
+     o2(0xA8,0xFA), o2(0xA2,0xAF),
+
+#define to_EUC_KR_C2 WORDINDEX2INFO(22)
+    to_EUC_KR_C2_offsets,
+    to_EUC_KR_C2_infos,
+
+#define to_EUC_KR_C3_infos WORDINDEX2INFO(24)
+           INVALID,         UNDEF, o2(0xA8,0xA1), o2(0xA8,0xA2),
+     o2(0xA1,0xBF), o2(0xA8,0xAA), o2(0xA8,0xAD), o2(0xA9,0xAC),
+     o2(0xA9,0xA1), o2(0xA9,0xA3), o2(0xA1,0xC0), o2(0xA9,0xAA),
+     o2(0xA9,0xAD),
+
+#define to_EUC_KR_C3 WORDINDEX2INFO(37)
+    to_EUC_KR_C3_offsets,
+    to_EUC_KR_C3_infos,
+
+#define to_EUC_KR_C4_infos WORDINDEX2INFO(39)
+           INVALID,         UNDEF, o2(0xA9,0xA2), o2(0xA8,0xA4),
+     o2(0xA9,0xA4), o2(0xA9,0xA5), o2(0xA8,0xA6), o2(0xA9,0xA6),
+     o2(0xA9,0xA7), o2(0xA8,0xA8),
+
+#define to_EUC_KR_C4 WORDINDEX2INFO(49)
+    to_EUC_KR_C4_offsets,
+    to_EUC_KR_C4_infos,
+
+#define to_EUC_KR_C5_infos WORDINDEX2INFO(51)
+           INVALID, o2(0xA9,0xA8), o2(0xA8,0xA9), o2(0xA9,0xA9),
+             UNDEF, o2(0xA9,0xB0), o2(0xA8,0xAF), o2(0xA9,0xAF),
+     o2(0xA8,0xAB), o2(0xA9,0xAB), o2(0xA8,0xAE), o2(0xA9,0xAE),
+
+#define to_EUC_KR_C5 WORDINDEX2INFO(63)
+    to_EUC_KR_C5_offsets,
+    to_EUC_KR_C5_infos,
+
+#define to_EUC_KR_C6_infos WORDINDEX2INFO(65)
+     INVALID,   UNDEF,
+
+#define to_EUC_KR_C6 WORDINDEX2INFO(67)
+    to_EUC_KR_C6_offsets,
+    to_EUC_KR_C6_infos,
+
+#define to_EUC_KR_CB_infos WORDINDEX2INFO(69)
+           INVALID,         UNDEF, o2(0xA2,0xA7), o2(0xA2,0xB0),
+     o2(0xA2,0xA8), o2(0xA2,0xAB), o2(0xA2,0xAA), o2(0xA2,0xAD),
+     o2(0xA2,0xA9),
+
+#define to_EUC_KR_CB WORDINDEX2INFO(78)
+    to_EUC_KR_CB_offsets,
+    to_EUC_KR_CB_infos,
+
+#define to_EUC_KR_CE_infos WORDINDEX2INFO(80)
+           INVALID,         UNDEF, o2(0xA5,0xC1), o2(0xA5,0xC2),
+     o2(0xA5,0xC3), o2(0xA5,0xC4), o2(0xA5,0xC5), o2(0xA5,0xC6),
+     o2(0xA5,0xC7), o2(0xA5,0xC8), o2(0xA5,0xC9), o2(0xA5,0xCA),
+     o2(0xA5,0xCB), o2(0xA5,0xCC), o2(0xA5,0xCD), o2(0xA5,0xCE),
+     o2(0xA5,0xCF), o2(0xA5,0xD0), o2(0xA5,0xD1), o2(0xA5,0xD2),
+     o2(0xA5,0xD3), o2(0xA5,0xD4), o2(0xA5,0xD5), o2(0xA5,0xD6),
+     o2(0xA5,0xD7), o2(0xA5,0xD8), o2(0xA5,0xE1), o2(0xA5,0xE2),
+     o2(0xA5,0xE3), o2(0xA5,0xE4), o2(0xA5,0xE5), o2(0xA5,0xE6),
+     o2(0xA5,0xE7), o2(0xA5,0xE8), o2(0xA5,0xE9), o2(0xA5,0xEA),
+     o2(0xA5,0xEB), o2(0xA5,0xEC), o2(0xA5,0xED), o2(0xA5,0xEE),
+     o2(0xA5,0xEF),
+
+#define to_EUC_KR_CE WORDINDEX2INFO(121)
+    to_EUC_KR_CE_offsets,
+    to_EUC_KR_CE_infos,
+
+#define to_EUC_KR_CF_infos WORDINDEX2INFO(123)
+           INVALID, o2(0xA5,0xF0), o2(0xA5,0xF1),         UNDEF,
+     o2(0xA5,0xF2), o2(0xA5,0xF3), o2(0xA5,0xF4), o2(0xA5,0xF5),
+     o2(0xA5,0xF6), o2(0xA5,0xF7), o2(0xA5,0xF8),
+
+#define to_EUC_KR_CF WORDINDEX2INFO(134)
+    to_EUC_KR_CF_offsets,
+    to_EUC_KR_CF_infos,
+
+#define to_EUC_KR_D0_infos WORDINDEX2INFO(136)
+           INVALID,         UNDEF, o2(0xAC,0xA7), o2(0xAC,0xA1),
+     o2(0xAC,0xA2), o2(0xAC,0xA3), o2(0xAC,0xA4), o2(0xAC,0xA5),
+     o2(0xAC,0xA6), o2(0xAC,0xA8), o2(0xAC,0xA9), o2(0xAC,0xAA),
+     o2(0xAC,0xAB), o2(0xAC,0xAC), o2(0xAC,0xAD), o2(0xAC,0xAE),
+     o2(0xAC,0xAF), o2(0xAC,0xB0), o2(0xAC,0xB1), o2(0xAC,0xB2),
+     o2(0xAC,0xB3), o2(0xAC,0xB4), o2(0xAC,0xB5), o2(0xAC,0xB6),
+     o2(0xAC,0xB7), o2(0xAC,0xB8), o2(0xAC,0xB9), o2(0xAC,0xBA),
+     o2(0xAC,0xBB), o2(0xAC,0xBC), o2(0xAC,0xBD), o2(0xAC,0xBE),
+     o2(0xAC,0xBF), o2(0xAC,0xC0), o2(0xAC,0xC1), o2(0xAC,0xD1),
+     o2(0xAC,0xD2), o2(0xAC,0xD3), o2(0xAC,0xD4), o2(0xAC,0xD5),
+     o2(0xAC,0xD6), o2(0xAC,0xD8), o2(0xAC,0xD9), o2(0xAC,0xDA),
+     o2(0xAC,0xDB), o2(0xAC,0xDC), o2(0xAC,0xDD), o2(0xAC,0xDE),
+     o2(0xAC,0xDF), o2(0xAC,0xE0), o2(0xAC,0xE1),
+
+#define to_EUC_KR_D0 WORDINDEX2INFO(187)
+    to_EUC_KR_D0_offsets,
+    to_EUC_KR_D0_infos,
+
+#define to_EUC_KR_D1_infos WORDINDEX2INFO(189)
+           INVALID, o2(0xAC,0xE2), o2(0xAC,0xE3), o2(0xAC,0xE4),
+     o2(0xAC,0xE5), o2(0xAC,0xE6), o2(0xAC,0xE7), o2(0xAC,0xE8),
+     o2(0xAC,0xE9), o2(0xAC,0xEA), o2(0xAC,0xEB), o2(0xAC,0xEC),
+     o2(0xAC,0xED), o2(0xAC,0xEE), o2(0xAC,0xEF), o2(0xAC,0xF0),
+     o2(0xAC,0xF1),         UNDEF, o2(0xAC,0xD7),
+
+#define to_EUC_KR_D1 WORDINDEX2INFO(208)
+    to_EUC_KR_D1_offsets,
+    to_EUC_KR_D1_infos,
+
+#define to_EUC_KR_E0_infos WORDINDEX2INFO(210)
+          INVALID, to_EUC_KR_C6,
+
+#define to_EUC_KR_E0 WORDINDEX2INFO(212)
+    to_EUC_KR_E0_offsets,
+    to_EUC_KR_E0_infos,
+
+#define to_EUC_KR_E1 WORDINDEX2INFO(214)
+    to_EUC_KR_C6_offsets,
+    to_EUC_KR_E0_infos,
+
+#define to_EUC_KR_E2_80_infos WORDINDEX2INFO(216)
+           INVALID,         UNDEF, o2(0xA1,0xAA), o2(0xA1,0xAE),
+     o2(0xA1,0xAF), o2(0xA1,0xB0), o2(0xA1,0xB1), o2(0xA2,0xD3),
+     o2(0xA2,0xD4), o2(0xA1,0xA5), o2(0xA1,0xA6), o2(0xA2,0xB6),
+     o2(0xA1,0xC7), o2(0xA1,0xC8), o2(0xA1,0xD8),
+
+#define to_EUC_KR_E2_80 WORDINDEX2INFO(231)
+    to_EUC_KR_E2_80_offsets,
+    to_EUC_KR_E2_80_infos,
+
+#define to_EUC_KR_E2_81_infos WORDINDEX2INFO(233)
+           INVALID,         UNDEF, o2(0xA9,0xF9), o2(0xA9,0xFA),
+
+#define to_EUC_KR_E2_81 WORDINDEX2INFO(237)
+    to_EUC_KR_E2_81_offsets,
+    to_EUC_KR_E2_81_infos,
+
+#define to_EUC_KR_E2_82_infos WORDINDEX2INFO(239)
+           INVALID,         UNDEF, o2(0xA9,0xFB), o2(0xA9,0xFC),
+     o2(0xA9,0xFD), o2(0xA9,0xFE),
+
+#define to_EUC_KR_E2_82 WORDINDEX2INFO(245)
+    to_EUC_KR_E2_82_offsets,
+    to_EUC_KR_E2_82_infos,
+
+#define to_EUC_KR_E2_84_infos WORDINDEX2INFO(247)
+           INVALID,         UNDEF, o2(0xA1,0xC9), o2(0xA2,0xB5),
+     o2(0xA7,0xA4), o2(0xA2,0xE0), o2(0xA2,0xE5), o2(0xA2,0xE2),
+     o2(0xA7,0xD9), o2(0xA1,0xCA),
+
+#define to_EUC_KR_E2_84 WORDINDEX2INFO(257)
+    to_EUC_KR_E2_84_offsets,
+    to_EUC_KR_E2_84_infos,
+
+#define to_EUC_KR_E2_85_infos WORDINDEX2INFO(259)
+           INVALID,         UNDEF, o2(0xA8,0xF7), o2(0xA8,0xF8),
+     o2(0xA8,0xFB), o2(0xA8,0xFC), o2(0xA8,0xFD), o2(0xA8,0xFE),
+     o2(0xA5,0xB0), o2(0xA5,0xB1), o2(0xA5,0xB2), o2(0xA5,0xB3),
+     o2(0xA5,0xB4), o2(0xA5,0xB5), o2(0xA5,0xB6), o2(0xA5,0xB7),
+     o2(0xA5,0xB8), o2(0xA5,0xB9), o2(0xA5,0xA1), o2(0xA5,0xA2),
+     o2(0xA5,0xA3), o2(0xA5,0xA4), o2(0xA5,0xA5), o2(0xA5,0xA6),
+     o2(0xA5,0xA7), o2(0xA5,0xA8), o2(0xA5,0xA9), o2(0xA5,0xAA),
+
+#define to_EUC_KR_E2_85 WORDINDEX2INFO(287)
+    to_EUC_KR_E2_85_offsets,
+    to_EUC_KR_E2_85_infos,
+
+#define to_EUC_KR_E2_86_infos WORDINDEX2INFO(289)
+           INVALID,         UNDEF, o2(0xA1,0xE7), o2(0xA1,0xE8),
+     o2(0xA1,0xE6), o2(0xA1,0xE9), o2(0xA1,0xEA), o2(0xA2,0xD5),
+     o2(0xA2,0xD8), o2(0xA2,0xD6), o2(0xA2,0xD9), o2(0xA2,0xD7),
+
+#define to_EUC_KR_E2_86 WORDINDEX2INFO(301)
+    to_EUC_KR_E2_86_offsets,
+    to_EUC_KR_E2_86_infos,
+
+#define to_EUC_KR_E2_87_infos WORDINDEX2INFO(303)
+           INVALID,         UNDEF, o2(0xA2,0xA1), o2(0xA2,0xA2),
+
+#define to_EUC_KR_E2_87 WORDINDEX2INFO(307)
+    to_EUC_KR_E2_87_offsets,
+    to_EUC_KR_E2_87_infos,
+
+#define to_EUC_KR_E2_88_infos WORDINDEX2INFO(309)
+           INVALID, o2(0xA2,0xA3),         UNDEF, o2(0xA1,0xD3),
+     o2(0xA2,0xA4), o2(0xA1,0xD4), o2(0xA1,0xF4), o2(0xA1,0xF5),
+     o2(0xA2,0xB3), o2(0xA2,0xB2), o2(0xA1,0xEE), o2(0xA1,0xF0),
+     o2(0xA1,0xC4), o2(0xA1,0xD0), o2(0xA1,0xAB), o2(0xA1,0xFC),
+     o2(0xA1,0xFD), o2(0xA1,0xFB), o2(0xA1,0xFA), o2(0xA1,0xF2),
+     o2(0xA1,0xF3), o2(0xA2,0xB1), o2(0xA1,0xC5), o2(0xA1,0xF1),
+     o2(0xA1,0xAD), o2(0xA1,0xEF),
+
+#define to_EUC_KR_E2_88 WORDINDEX2INFO(335)
+    to_EUC_KR_E2_88_offsets,
+    to_EUC_KR_E2_88_infos,
+
+#define to_EUC_KR_E2_89_infos WORDINDEX2INFO(337)
+           INVALID,         UNDEF, o2(0xA1,0xD6), o2(0xA1,0xC1),
+     o2(0xA1,0xD5), o2(0xA1,0xC2), o2(0xA1,0xC3), o2(0xA1,0xEC),
+     o2(0xA1,0xED),
+
+#define to_EUC_KR_E2_89 WORDINDEX2INFO(346)
+    to_EUC_KR_E2_89_offsets,
+    to_EUC_KR_E2_89_infos,
+
+#define to_EUC_KR_E2_8A_infos WORDINDEX2INFO(348)
+           INVALID,         UNDEF, o2(0xA1,0xF8), o2(0xA1,0xF9),
+     o2(0xA1,0xF6), o2(0xA1,0xF7), o2(0xA2,0xC1), o2(0xA1,0xD1),
+
+#define to_EUC_KR_E2_8A WORDINDEX2INFO(356)
+    to_EUC_KR_E2_8A_offsets,
+    to_EUC_KR_E2_8A_infos,
+
+#define to_EUC_KR_E2_8C_infos WORDINDEX2INFO(358)
+           INVALID,         UNDEF, o2(0xA1,0xD2),
+
+#define to_EUC_KR_E2_8C WORDINDEX2INFO(361)
+    to_EUC_KR_E2_8C_offsets,
+    to_EUC_KR_E2_8C_infos,
+
+#define to_EUC_KR_E2_91_infos WORDINDEX2INFO(363)
+           INVALID,         UNDEF, o2(0xA8,0xE7), o2(0xA8,0xE8),
+     o2(0xA8,0xE9), o2(0xA8,0xEA), o2(0xA8,0xEB), o2(0xA8,0xEC),
+     o2(0xA8,0xED), o2(0xA8,0xEE), o2(0xA8,0xEF), o2(0xA8,0xF0),
+     o2(0xA8,0xF1), o2(0xA8,0xF2), o2(0xA8,0xF3), o2(0xA8,0xF4),
+     o2(0xA8,0xF5), o2(0xA9,0xE7), o2(0xA9,0xE8), o2(0xA9,0xE9),
+     o2(0xA9,0xEA), o2(0xA9,0xEB), o2(0xA9,0xEC), o2(0xA9,0xED),
+     o2(0xA9,0xEE), o2(0xA9,0xEF), o2(0xA9,0xF0), o2(0xA9,0xF1),
+     o2(0xA9,0xF2),
+
+#define to_EUC_KR_E2_91 WORDINDEX2INFO(392)
+    to_EUC_KR_E2_91_offsets,
+    to_EUC_KR_E2_91_infos,
+
+#define to_EUC_KR_E2_92_infos WORDINDEX2INFO(394)
+           INVALID, o2(0xA9,0xF3), o2(0xA9,0xF4), o2(0xA9,0xF5),
+             UNDEF, o2(0xA9,0xCD), o2(0xA9,0xCE), o2(0xA9,0xCF),
+     o2(0xA9,0xD0), o2(0xA9,0xD1), o2(0xA9,0xD2), o2(0xA9,0xD3),
+     o2(0xA9,0xD4), o2(0xA9,0xD5), o2(0xA9,0xD6), o2(0xA9,0xD7),
+     o2(0xA9,0xD8), o2(0xA9,0xD9), o2(0xA9,0xDA), o2(0xA9,0xDB),
+     o2(0xA9,0xDC), o2(0xA9,0xDD), o2(0xA9,0xDE), o2(0xA9,0xDF),
+     o2(0xA9,0xE0), o2(0xA9,0xE1), o2(0xA9,0xE2), o2(0xA9,0xE3),
+     o2(0xA9,0xE4), o2(0xA9,0xE5), o2(0xA9,0xE6),
+
+#define to_EUC_KR_E2_92 WORDINDEX2INFO(425)
+    to_EUC_KR_E2_92_offsets,
+    to_EUC_KR_E2_92_infos,
+
+#define to_EUC_KR_E2_93_infos WORDINDEX2INFO(427)
+           INVALID,         UNDEF, o2(0xA8,0xCD), o2(0xA8,0xCE),
+     o2(0xA8,0xCF), o2(0xA8,0xD0), o2(0xA8,0xD1), o2(0xA8,0xD2),
+     o2(0xA8,0xD3), o2(0xA8,0xD4), o2(0xA8,0xD5), o2(0xA8,0xD6),
+     o2(0xA8,0xD7), o2(0xA8,0xD8), o2(0xA8,0xD9), o2(0xA8,0xDA),
+     o2(0xA8,0xDB), o2(0xA8,0xDC), o2(0xA8,0xDD), o2(0xA8,0xDE),
+     o2(0xA8,0xDF), o2(0xA8,0xE0), o2(0xA8,0xE1), o2(0xA8,0xE2),
+     o2(0xA8,0xE3), o2(0xA8,0xE4), o2(0xA8,0xE5), o2(0xA8,0xE6),
+
+#define to_EUC_KR_E2_93 WORDINDEX2INFO(455)
+    to_EUC_KR_E2_93_offsets,
+    to_EUC_KR_E2_93_infos,
+
+#define to_EUC_KR_E2_94_infos WORDINDEX2INFO(457)
+           INVALID, o2(0xA6,0xA1), o2(0xA6,0xAC), o2(0xA6,0xA2),
+     o2(0xA6,0xAD),         UNDEF, o2(0xA6,0xA3), o2(0xA6,0xC8),
+     o2(0xA6,0xC7), o2(0xA6,0xAE), o2(0xA6,0xA4), o2(0xA6,0xC2),
+     o2(0xA6,0xC1), o2(0xA6,0xAF), o2(0xA6,0xA6), o2(0xA6,0xC6),
+     o2(0xA6,0xC5), o2(0xA6,0xB1), o2(0xA6,0xA5), o2(0xA6,0xC4),
+     o2(0xA6,0xC3), o2(0xA6,0xB0), o2(0xA6,0xA7), o2(0xA6,0xBC),
+     o2(0xA6,0xC9), o2(0xA6,0xCA), o2(0xA6,0xB7), o2(0xA6,0xCB),
+     o2(0xA6,0xCC), o2(0xA6,0xB2), o2(0xA6,0xA9), o2(0xA6,0xBE),
+     o2(0xA6,0xCD), o2(0xA6,0xCE), o2(0xA6,0xB9), o2(0xA6,0xCF),
+     o2(0xA6,0xD0), o2(0xA6,0xB4), o2(0xA6,0xA8), o2(0xA6,0xD1),
+     o2(0xA6,0xD2), o2(0xA6,0xB8), o2(0xA6,0xBD), o2(0xA6,0xD3),
+     o2(0xA6,0xD4), o2(0xA6,0xB3), o2(0xA6,0xAA), o2(0xA6,0xD5),
+     o2(0xA6,0xD6), o2(0xA6,0xBA), o2(0xA6,0xBF), o2(0xA6,0xD7),
+     o2(0xA6,0xD8), o2(0xA6,0xB5), o2(0xA6,0xAB), o2(0xA6,0xD9),
+     o2(0xA6,0xDA), o2(0xA6,0xBB),
+
+#define to_EUC_KR_E2_94 WORDINDEX2INFO(515)
+    to_EUC_KR_E2_94_offsets,
+    to_EUC_KR_E2_94_infos,
+
+#define to_EUC_KR_E2_95_infos WORDINDEX2INFO(517)
+           INVALID, o2(0xA6,0xDB), o2(0xA6,0xDC), o2(0xA6,0xC0),
+     o2(0xA6,0xDD), o2(0xA6,0xDE), o2(0xA6,0xDF), o2(0xA6,0xE0),
+     o2(0xA6,0xE1), o2(0xA6,0xE2), o2(0xA6,0xE3), o2(0xA6,0xE4),
+     o2(0xA6,0xB6),         UNDEF,
+
+#define to_EUC_KR_E2_95 WORDINDEX2INFO(531)
+    to_EUC_KR_E2_95_offsets,
+    to_EUC_KR_E2_95_infos,
+
+#define to_EUC_KR_E2_96_infos WORDINDEX2INFO(533)
+           INVALID,         UNDEF, o2(0xA2,0xC6), o2(0xA1,0xE1),
+     o2(0xA1,0xE0), o2(0xA2,0xC3), o2(0xA2,0xC7), o2(0xA2,0xC8),
+     o2(0xA2,0xCB), o2(0xA2,0xCA), o2(0xA2,0xC9), o2(0xA2,0xCC),
+     o2(0xA1,0xE3), o2(0xA1,0xE2), o2(0xA2,0xBA), o2(0xA2,0xB9),
+     o2(0xA1,0xE5), o2(0xA1,0xE4),
+
+#define to_EUC_KR_E2_96 WORDINDEX2INFO(551)
+    to_EUC_KR_E2_96_offsets,
+    to_EUC_KR_E2_96_infos,
+
+#define to_EUC_KR_E2_97_infos WORDINDEX2INFO(553)
+           INVALID, o2(0xA2,0xB8), o2(0xA2,0xB7),         UNDEF,
+     o2(0xA1,0xDF), o2(0xA1,0xDE), o2(0xA2,0xC2), o2(0xA1,0xDB),
+     o2(0xA1,0xDD), o2(0xA1,0xDC), o2(0xA2,0xC4), o2(0xA2,0xC5),
+
+#define to_EUC_KR_E2_97 WORDINDEX2INFO(565)
+    to_EUC_KR_E2_97_offsets,
+    to_EUC_KR_E2_97_infos,
+
+#define to_EUC_KR_E2_98_infos WORDINDEX2INFO(567)
+           INVALID,         UNDEF, o2(0xA1,0xDA), o2(0xA1,0xD9),
+     o2(0xA2,0xCF), o2(0xA2,0xCE), o2(0xA2,0xD0), o2(0xA2,0xD1),
+
+#define to_EUC_KR_E2_98 WORDINDEX2INFO(575)
+    to_EUC_KR_E2_98_offsets,
+    to_EUC_KR_E2_98_infos,
+
+#define to_EUC_KR_E2_99_infos WORDINDEX2INFO(577)
+           INVALID, o2(0xA1,0xCF),         UNDEF, o2(0xA1,0xCE),
+     o2(0xA2,0xBC), o2(0xA2,0xBD), o2(0xA2,0xC0), o2(0xA2,0xBB),
+     o2(0xA2,0xBE), o2(0xA2,0xBF), o2(0xA2,0xCD), o2(0xA2,0xDB),
+     o2(0xA2,0xDC), o2(0xA2,0xDD), o2(0xA2,0xDA),
+
+#define to_EUC_KR_E2_99 WORDINDEX2INFO(592)
+    to_EUC_KR_E2_99_offsets,
+    to_EUC_KR_E2_99_infos,
+
+#define to_EUC_KR_E2_infos WORDINDEX2INFO(594)
+             INVALID, to_EUC_KR_E2_80, to_EUC_KR_E2_81, to_EUC_KR_E2_82,
+        to_EUC_KR_C6, to_EUC_KR_E2_84, to_EUC_KR_E2_85, to_EUC_KR_E2_86,
+     to_EUC_KR_E2_87, to_EUC_KR_E2_88, to_EUC_KR_E2_89, to_EUC_KR_E2_8A,
+     to_EUC_KR_E2_8C, to_EUC_KR_E2_91, to_EUC_KR_E2_92, to_EUC_KR_E2_93,
+     to_EUC_KR_E2_94, to_EUC_KR_E2_95, to_EUC_KR_E2_96, to_EUC_KR_E2_97,
+     to_EUC_KR_E2_98, to_EUC_KR_E2_99,
+
+#define to_EUC_KR_E2 WORDINDEX2INFO(616)
+    to_EUC_KR_E2_offsets,
+    to_EUC_KR_E2_infos,
+
+#define to_EUC_KR_E3_80_infos WORDINDEX2INFO(618)
+           INVALID, o2(0xA1,0xA1), o2(0xA1,0xA2), o2(0xA1,0xA3),
+     o2(0xA1,0xA8),         UNDEF, o2(0xA1,0xB4), o2(0xA1,0xB5),
+     o2(0xA1,0xB6), o2(0xA1,0xB7), o2(0xA1,0xB8), o2(0xA1,0xB9),
+     o2(0xA1,0xBA), o2(0xA1,0xBB), o2(0xA1,0xBC), o2(0xA1,0xBD),
+     o2(0xA1,0xEB), o2(0xA1,0xB2), o2(0xA1,0xB3),
+
+#define to_EUC_KR_E3_80 WORDINDEX2INFO(637)
+    to_EUC_KR_E3_80_offsets,
+    to_EUC_KR_E3_80_infos,
+
+#define to_EUC_KR_E3_81_infos WORDINDEX2INFO(639)
+           INVALID,         UNDEF, o2(0xAA,0xA1), o2(0xAA,0xA2),
+     o2(0xAA,0xA3), o2(0xAA,0xA4), o2(0xAA,0xA5), o2(0xAA,0xA6),
+     o2(0xAA,0xA7), o2(0xAA,0xA8), o2(0xAA,0xA9), o2(0xAA,0xAA),
+     o2(0xAA,0xAB), o2(0xAA,0xAC), o2(0xAA,0xAD), o2(0xAA,0xAE),
+     o2(0xAA,0xAF), o2(0xAA,0xB0), o2(0xAA,0xB1), o2(0xAA,0xB2),
+     o2(0xAA,0xB3), o2(0xAA,0xB4), o2(0xAA,0xB5), o2(0xAA,0xB6),
+     o2(0xAA,0xB7), o2(0xAA,0xB8), o2(0xAA,0xB9), o2(0xAA,0xBA),
+     o2(0xAA,0xBB), o2(0xAA,0xBC), o2(0xAA,0xBD), o2(0xAA,0xBE),
+     o2(0xAA,0xBF), o2(0xAA,0xC0), o2(0xAA,0xC1), o2(0xAA,0xC2),
+     o2(0xAA,0xC3), o2(0xAA,0xC4), o2(0xAA,0xC5), o2(0xAA,0xC6),
+     o2(0xAA,0xC7), o2(0xAA,0xC8), o2(0xAA,0xC9), o2(0xAA,0xCA),
+     o2(0xAA,0xCB), o2(0xAA,0xCC), o2(0xAA,0xCD), o2(0xAA,0xCE),
+     o2(0xAA,0xCF), o2(0xAA,0xD0), o2(0xAA,0xD1), o2(0xAA,0xD2),
+     o2(0xAA,0xD3), o2(0xAA,0xD4), o2(0xAA,0xD5), o2(0xAA,0xD6),
+     o2(0xAA,0xD7), o2(0xAA,0xD8), o2(0xAA,0xD9), o2(0xAA,0xDA),
+     o2(0xAA,0xDB), o2(0xAA,0xDC), o2(0xAA,0xDD), o2(0xAA,0xDE),
+     o2(0xAA,0xDF),
+
+#define to_EUC_KR_E3_81 WORDINDEX2INFO(704)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E3_81_infos,
+
+#define to_EUC_KR_E3_82_infos WORDINDEX2INFO(706)
+           INVALID, o2(0xAA,0xE0), o2(0xAA,0xE1), o2(0xAA,0xE2),
+     o2(0xAA,0xE3), o2(0xAA,0xE4), o2(0xAA,0xE5), o2(0xAA,0xE6),
+     o2(0xAA,0xE7), o2(0xAA,0xE8), o2(0xAA,0xE9), o2(0xAA,0xEA),
+     o2(0xAA,0xEB), o2(0xAA,0xEC), o2(0xAA,0xED), o2(0xAA,0xEE),
+     o2(0xAA,0xEF), o2(0xAA,0xF0), o2(0xAA,0xF1), o2(0xAA,0xF2),
+     o2(0xAA,0xF3),         UNDEF, o2(0xAB,0xA1), o2(0xAB,0xA2),
+     o2(0xAB,0xA3), o2(0xAB,0xA4), o2(0xAB,0xA5), o2(0xAB,0xA6),
+     o2(0xAB,0xA7), o2(0xAB,0xA8), o2(0xAB,0xA9), o2(0xAB,0xAA),
+     o2(0xAB,0xAB), o2(0xAB,0xAC), o2(0xAB,0xAD), o2(0xAB,0xAE),
+     o2(0xAB,0xAF), o2(0xAB,0xB0), o2(0xAB,0xB1), o2(0xAB,0xB2),
+     o2(0xAB,0xB3), o2(0xAB,0xB4), o2(0xAB,0xB5), o2(0xAB,0xB6),
+     o2(0xAB,0xB7), o2(0xAB,0xB8), o2(0xAB,0xB9), o2(0xAB,0xBA),
+     o2(0xAB,0xBB), o2(0xAB,0xBC), o2(0xAB,0xBD), o2(0xAB,0xBE),
+     o2(0xAB,0xBF),
+
+#define to_EUC_KR_E3_82 WORDINDEX2INFO(759)
+    to_EUC_KR_E3_82_offsets,
+    to_EUC_KR_E3_82_infos,
+
+#define to_EUC_KR_E3_83_infos WORDINDEX2INFO(761)
+           INVALID, o2(0xAB,0xC0), o2(0xAB,0xC1), o2(0xAB,0xC2),
+     o2(0xAB,0xC3), o2(0xAB,0xC4), o2(0xAB,0xC5), o2(0xAB,0xC6),
+     o2(0xAB,0xC7), o2(0xAB,0xC8), o2(0xAB,0xC9), o2(0xAB,0xCA),
+     o2(0xAB,0xCB), o2(0xAB,0xCC), o2(0xAB,0xCD), o2(0xAB,0xCE),
+     o2(0xAB,0xCF), o2(0xAB,0xD0), o2(0xAB,0xD1), o2(0xAB,0xD2),
+     o2(0xAB,0xD3), o2(0xAB,0xD4), o2(0xAB,0xD5), o2(0xAB,0xD6),
+     o2(0xAB,0xD7), o2(0xAB,0xD8), o2(0xAB,0xD9), o2(0xAB,0xDA),
+     o2(0xAB,0xDB), o2(0xAB,0xDC), o2(0xAB,0xDD), o2(0xAB,0xDE),
+     o2(0xAB,0xDF), o2(0xAB,0xE0), o2(0xAB,0xE1), o2(0xAB,0xE2),
+     o2(0xAB,0xE3), o2(0xAB,0xE4), o2(0xAB,0xE5), o2(0xAB,0xE6),
+     o2(0xAB,0xE7), o2(0xAB,0xE8), o2(0xAB,0xE9), o2(0xAB,0xEA),
+     o2(0xAB,0xEB), o2(0xAB,0xEC), o2(0xAB,0xED), o2(0xAB,0xEE),
+     o2(0xAB,0xEF), o2(0xAB,0xF0), o2(0xAB,0xF1), o2(0xAB,0xF2),
+     o2(0xAB,0xF3), o2(0xAB,0xF4), o2(0xAB,0xF5), o2(0xAB,0xF6),
+             UNDEF,
+
+#define to_EUC_KR_E3_83 WORDINDEX2INFO(818)
+    to_EUC_KR_E3_83_offsets,
+    to_EUC_KR_E3_83_infos,
+
+#define to_EUC_KR_E3_84_infos WORDINDEX2INFO(820)
+           INVALID,         UNDEF, o2(0xA4,0xA1), o2(0xA4,0xA2),
+     o2(0xA4,0xA3), o2(0xA4,0xA4), o2(0xA4,0xA5), o2(0xA4,0xA6),
+     o2(0xA4,0xA7), o2(0xA4,0xA8), o2(0xA4,0xA9), o2(0xA4,0xAA),
+     o2(0xA4,0xAB), o2(0xA4,0xAC), o2(0xA4,0xAD), o2(0xA4,0xAE),
+     o2(0xA4,0xAF),
+
+#define to_EUC_KR_E3_84 WORDINDEX2INFO(837)
+    to_EUC_KR_E3_84_offsets,
+    to_EUC_KR_E3_84_infos,
+
+#define to_EUC_KR_E3_85_infos WORDINDEX2INFO(839)
+           INVALID, o2(0xA4,0xB0), o2(0xA4,0xB1), o2(0xA4,0xB2),
+     o2(0xA4,0xB3), o2(0xA4,0xB4), o2(0xA4,0xB5), o2(0xA4,0xB6),
+     o2(0xA4,0xB7), o2(0xA4,0xB8), o2(0xA4,0xB9), o2(0xA4,0xBA),
+     o2(0xA4,0xBB), o2(0xA4,0xBC), o2(0xA4,0xBD), o2(0xA4,0xBE),
+     o2(0xA4,0xBF), o2(0xA4,0xC0), o2(0xA4,0xC1), o2(0xA4,0xC2),
+     o2(0xA4,0xC3), o2(0xA4,0xC4), o2(0xA4,0xC5), o2(0xA4,0xC6),
+     o2(0xA4,0xC7), o2(0xA4,0xC8), o2(0xA4,0xC9), o2(0xA4,0xCA),
+     o2(0xA4,0xCB), o2(0xA4,0xCC), o2(0xA4,0xCD), o2(0xA4,0xCE),
+     o2(0xA4,0xCF), o2(0xA4,0xD0), o2(0xA4,0xD1), o2(0xA4,0xD2),
+     o2(0xA4,0xD3), o2(0xA4,0xD4), o2(0xA4,0xD5), o2(0xA4,0xD6),
+     o2(0xA4,0xD7), o2(0xA4,0xD8), o2(0xA4,0xD9), o2(0xA4,0xDA),
+     o2(0xA4,0xDB), o2(0xA4,0xDC), o2(0xA4,0xDD), o2(0xA4,0xDE),
+     o2(0xA4,0xDF), o2(0xA4,0xE0), o2(0xA4,0xE1), o2(0xA4,0xE2),
+     o2(0xA4,0xE3), o2(0xA4,0xE4), o2(0xA4,0xE5), o2(0xA4,0xE6),
+     o2(0xA4,0xE7), o2(0xA4,0xE8), o2(0xA4,0xE9), o2(0xA4,0xEA),
+     o2(0xA4,0xEB), o2(0xA4,0xEC), o2(0xA4,0xED), o2(0xA4,0xEE),
+     o2(0xA4,0xEF),
+
+#define to_EUC_KR_E3_85 WORDINDEX2INFO(904)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E3_85_infos,
+
+#define to_EUC_KR_E3_86_infos WORDINDEX2INFO(906)
+           INVALID, o2(0xA4,0xF0), o2(0xA4,0xF1), o2(0xA4,0xF2),
+     o2(0xA4,0xF3), o2(0xA4,0xF4), o2(0xA4,0xF5), o2(0xA4,0xF6),
+     o2(0xA4,0xF7), o2(0xA4,0xF8), o2(0xA4,0xF9), o2(0xA4,0xFA),
+     o2(0xA4,0xFB), o2(0xA4,0xFC), o2(0xA4,0xFD), o2(0xA4,0xFE),
+             UNDEF,
+
+#define to_EUC_KR_E3_86 WORDINDEX2INFO(923)
+    to_EUC_KR_E3_86_offsets,
+    to_EUC_KR_E3_86_infos,
+
+#define to_EUC_KR_E3_88_infos WORDINDEX2INFO(925)
+           INVALID, o2(0xA9,0xB1), o2(0xA9,0xB2), o2(0xA9,0xB3),
+     o2(0xA9,0xB4), o2(0xA9,0xB5), o2(0xA9,0xB6), o2(0xA9,0xB7),
+     o2(0xA9,0xB8), o2(0xA9,0xB9), o2(0xA9,0xBA), o2(0xA9,0xBB),
+     o2(0xA9,0xBC), o2(0xA9,0xBD), o2(0xA9,0xBE), o2(0xA9,0xBF),
+     o2(0xA9,0xC0), o2(0xA9,0xC1), o2(0xA9,0xC2), o2(0xA9,0xC3),
+     o2(0xA9,0xC4), o2(0xA9,0xC5), o2(0xA9,0xC6), o2(0xA9,0xC7),
+     o2(0xA9,0xC8), o2(0xA9,0xC9), o2(0xA9,0xCA), o2(0xA9,0xCB),
+     o2(0xA9,0xCC), o2(0xA2,0xDF),         UNDEF,
+
+#define to_EUC_KR_E3_88 WORDINDEX2INFO(956)
+    to_EUC_KR_E3_88_offsets,
+    to_EUC_KR_E3_88_infos,
+
+#define to_EUC_KR_E3_89_infos WORDINDEX2INFO(958)
+           INVALID,         UNDEF, o2(0xA8,0xB1), o2(0xA8,0xB2),
+     o2(0xA8,0xB3), o2(0xA8,0xB4), o2(0xA8,0xB5), o2(0xA8,0xB6),
+     o2(0xA8,0xB7), o2(0xA8,0xB8), o2(0xA8,0xB9), o2(0xA8,0xBA),
+     o2(0xA8,0xBB), o2(0xA8,0xBC), o2(0xA8,0xBD), o2(0xA8,0xBE),
+     o2(0xA8,0xBF), o2(0xA8,0xC0), o2(0xA8,0xC1), o2(0xA8,0xC2),
+     o2(0xA8,0xC3), o2(0xA8,0xC4), o2(0xA8,0xC5), o2(0xA8,0xC6),
+     o2(0xA8,0xC7), o2(0xA8,0xC8), o2(0xA8,0xC9), o2(0xA8,0xCA),
+     o2(0xA8,0xCB), o2(0xA8,0xCC), o2(0xA2,0xDE),
+
+#define to_EUC_KR_E3_89 WORDINDEX2INFO(989)
+    to_EUC_KR_E3_89_offsets,
+    to_EUC_KR_E3_89_infos,
+
+#define to_EUC_KR_E3_8E_infos WORDINDEX2INFO(991)
+           INVALID, o2(0xA7,0xC9), o2(0xA7,0xCA), o2(0xA7,0xCB),
+     o2(0xA7,0xCC), o2(0xA7,0xCD),         UNDEF, o2(0xA7,0xBA),
+     o2(0xA7,0xBB), o2(0xA7,0xDC), o2(0xA7,0xDD), o2(0xA7,0xDE),
+     o2(0xA7,0xB6), o2(0xA7,0xB7), o2(0xA7,0xB8), o2(0xA7,0xD4),
+     o2(0xA7,0xD5), o2(0xA7,0xD6), o2(0xA7,0xD7), o2(0xA7,0xD8),
+     o2(0xA7,0xA1), o2(0xA7,0xA2), o2(0xA7,0xA3), o2(0xA7,0xA5),
+     o2(0xA7,0xAB), o2(0xA7,0xAC), o2(0xA7,0xAD), o2(0xA7,0xAE),
+     o2(0xA7,0xAF), o2(0xA7,0xB0), o2(0xA7,0xB1), o2(0xA7,0xB2),
+     o2(0xA7,0xB3), o2(0xA7,0xB4), o2(0xA7,0xA7), o2(0xA7,0xA8),
+     o2(0xA7,0xA9), o2(0xA7,0xAA), o2(0xA7,0xBD), o2(0xA7,0xBE),
+     o2(0xA7,0xE5), o2(0xA7,0xE6), o2(0xA7,0xE7), o2(0xA7,0xE8),
+     o2(0xA7,0xE1), o2(0xA7,0xE2), o2(0xA7,0xE3), o2(0xA7,0xBF),
+     o2(0xA7,0xC0), o2(0xA7,0xC1), o2(0xA7,0xC2), o2(0xA7,0xC3),
+     o2(0xA7,0xC4), o2(0xA7,0xC5), o2(0xA7,0xC6), o2(0xA7,0xC7),
+     o2(0xA7,0xC8), o2(0xA7,0xCE), o2(0xA7,0xCF), o2(0xA7,0xD0),
+     o2(0xA7,0xD1), o2(0xA7,0xD2), o2(0xA7,0xD3),
+
+#define to_EUC_KR_E3_8E WORDINDEX2INFO(1054)
+    to_EUC_KR_E3_8E_offsets,
+    to_EUC_KR_E3_8E_infos,
+
+#define to_EUC_KR_E3_8F_infos WORDINDEX2INFO(1056)
+           INVALID, o2(0xA7,0xDA), o2(0xA7,0xDB), o2(0xA2,0xE3),
+     o2(0xA7,0xEC), o2(0xA7,0xA6), o2(0xA7,0xE0), o2(0xA7,0xEF),
+     o2(0xA2,0xE1), o2(0xA7,0xBC), o2(0xA7,0xED), o2(0xA7,0xB5),
+             UNDEF, o2(0xA7,0xB9), o2(0xA7,0xEA), o2(0xA7,0xEB),
+     o2(0xA7,0xDF), o2(0xA2,0xE4), o2(0xA7,0xE4), o2(0xA7,0xEE),
+     o2(0xA7,0xE9),
+
+#define to_EUC_KR_E3_8F WORDINDEX2INFO(1077)
+    to_EUC_KR_E3_8F_offsets,
+    to_EUC_KR_E3_8F_infos,
+
+#define to_EUC_KR_E3_infos WORDINDEX2INFO(1079)
+             INVALID, to_EUC_KR_E3_80, to_EUC_KR_E3_81, to_EUC_KR_E3_82,
+     to_EUC_KR_E3_83, to_EUC_KR_E3_84, to_EUC_KR_E3_85, to_EUC_KR_E3_86,
+        to_EUC_KR_C6, to_EUC_KR_E3_88, to_EUC_KR_E3_89, to_EUC_KR_E3_8E,
+     to_EUC_KR_E3_8F,
+
+#define to_EUC_KR_E3 WORDINDEX2INFO(1092)
+    to_EUC_KR_E3_offsets,
+    to_EUC_KR_E3_infos,
+
+#define to_EUC_KR_E4_B8_infos WORDINDEX2INFO(1094)
+           INVALID, o2(0xEC,0xE9), o2(0xEF,0xCB),         UNDEF,
+     o2(0xF6,0xD2), o2(0xD8,0xB2), o2(0xED,0xDB), o2(0xDF,0xB2),
+     o2(0xDF,0xBE), o2(0xF9,0xBB), o2(0xDC,0xF4), o2(0xF5,0xE4),
+     o2(0xF3,0xA6), o2(0xDD,0xE0), o2(0xE1,0xA6), o2(0xCE,0xF8),
+     o2(0xDC,0xB0), o2(0xE3,0xAA), o2(0xF1,0xE9), o2(0xCD,0xFA),
+     o2(0xFC,0xAF), o2(0xD3,0xA1), o2(0xF1,0xAB),
+
+#define to_EUC_KR_E4_B8 WORDINDEX2INFO(1117)
+    to_EUC_KR_E4_B8_offsets,
+    to_EUC_KR_E4_B8_infos,
+
+#define to_EUC_KR_E4_B9_infos WORDINDEX2INFO(1119)
+           INVALID,         UNDEF, o2(0xE7,0xD1), o2(0xD2,0xAC),
+     o2(0xCE,0xF9), o2(0xF1,0xFD), o2(0xDE,0xBF), o2(0xFB,0xBA),
+     o2(0xF9,0xB9), o2(0xCE,0xD2), o2(0xE3,0xAB), o2(0xEB,0xE0),
+     o2(0xCE,0xFA), o2(0xCB,0xF7), o2(0xE5,0xA5), o2(0xCA,0xE1),
+     o2(0xD4,0xCC), o2(0xEA,0xE1), o2(0xDC,0xE3), o2(0xDF,0xAD),
+     o2(0xCB,0xEB),
+
+#define to_EUC_KR_E4_B9 WORDINDEX2INFO(1140)
+    to_EUC_KR_E4_B9_offsets,
+    to_EUC_KR_E4_B9_infos,
+
+#define to_EUC_KR_E4_BA_infos WORDINDEX2INFO(1142)
+           INVALID,         UNDEF, o2(0xD5,0xAF), o2(0xD6,0xF5),
+     o2(0xE5,0xF8), o2(0xDE,0xC0), o2(0xEC,0xA3), o2(0xE9,0xCD),
+     o2(0xEA,0xA7), o2(0xE9,0xF6), o2(0xFB,0xBB), o2(0xE7,0xE9),
+     o2(0xEF,0xCC), o2(0xD0,0xE6), o2(0xDE,0xC1), o2(0xE4,0xAC),
+     o2(0xD8,0xCC), o2(0xF9,0xF1), o2(0xCE,0xDF), o2(0xFA,0xA4),
+     o2(0xE6,0xB2), o2(0xFA,0xFB), o2(0xFA,0xBD), o2(0xCC,0xC8),
+     o2(0xEF,0xCD), o2(0xD5,0xD5), o2(0xD3,0xA2), o2(0xEC,0xD1),
+
+#define to_EUC_KR_E4_BA WORDINDEX2INFO(1170)
+    to_EUC_KR_E4_BA_offsets,
+    to_EUC_KR_E4_BA_infos,
+
+#define to_EUC_KR_E4_BB_infos WORDINDEX2INFO(1172)
+           INVALID, o2(0xE4,0xA7), o2(0xEC,0xD2),         UNDEF,
+     o2(0xF6,0xB1), o2(0xCE,0xFB), o2(0xD0,0xD1), o2(0xCB,0xBF),
+     o2(0xED,0xA4), o2(0xED,0xA8), o2(0xDE,0xC2), o2(0xF6,0xE2),
+     o2(0xED,0xDC), o2(0xDC,0xF5), o2(0xE0,0xB9), o2(0xD4,0xCE),
+     o2(0xF4,0xB5), o2(0xD3,0xDB), o2(0xD6,0xB5), o2(0xEC,0xA4),
+     o2(0xE4,0xE6), o2(0xF1,0xEA), o2(0xCB,0xEC), o2(0xCB,0xC0),
+     o2(0xEC,0xF2),
+
+#define to_EUC_KR_E4_BB WORDINDEX2INFO(1197)
+    to_EUC_KR_E4_BB_offsets,
+    to_EUC_KR_E4_BB_infos,
+
+#define to_EUC_KR_E4_BC_infos WORDINDEX2INFO(1199)
+           INVALID,         UNDEF, o2(0xD0,0xEA), o2(0xF9,0xF2),
+     o2(0xEC,0xA5), o2(0xD0,0xDF), o2(0xE7,0xEA), o2(0xD0,0xEB),
+     o2(0xDC,0xD1), o2(0xDB,0xE9), o2(0xFD,0xCC), o2(0xDB,0xD7),
+     o2(0xDA,0xE1), o2(0xD6,0xB6), o2(0xE3,0xDF), o2(0xDE,0xC3),
+     o2(0xDE,0xC4), o2(0xCA,0xA1),
+
+#define to_EUC_KR_E4_BC WORDINDEX2INFO(1217)
+    to_EUC_KR_E4_BC_offsets,
+    to_EUC_KR_E4_BC_infos,
+
+#define to_EUC_KR_E4_BD_infos WORDINDEX2INFO(1219)
+           INVALID,         UNDEF, o2(0xEE,0xEC), o2(0xD3,0xA3),
+     o2(0xEE,0xB7), o2(0xF8,0xCF), o2(0xEA,0xC8), o2(0xEE,0xB8),
+     o2(0xF1,0xAC), o2(0xF1,0xA5), o2(0xE9,0xCE), o2(0xF9,0xBC),
+     o2(0xE5,0xF9), o2(0xEC,0xEA), o2(0xDD,0xD6), o2(0xED,0xC2),
+     o2(0xF8,0xA5), o2(0xE5,0xBA), o2(0xDB,0xD8), o2(0xCA,0xA2),
+     o2(0xD1,0xCD), o2(0xEE,0xED), o2(0xEC,0xEB), o2(0xDE,0xC5),
+
+#define to_EUC_KR_E4_BD WORDINDEX2INFO(1243)
+    to_EUC_KR_E4_BD_offsets,
+    to_EUC_KR_E4_BD_infos,
+
+#define to_EUC_KR_E4_BE_infos WORDINDEX2INFO(1245)
+           INVALID,         UNDEF, o2(0xE3,0xE0), o2(0xCA,0xC9),
+     o2(0xF2,0xE9), o2(0xD5,0xCE), o2(0xF6,0xB6), o2(0xCE,0xC2),
+     o2(0xD6,0xC7), o2(0xE3,0xB4), o2(0xF1,0xAD), o2(0xEA,0xE2),
+     o2(0xD7,0xC2), o2(0xF3,0xA7), o2(0xCD,0xEA), o2(0xEB,0xEE),
+     o2(0xD9,0xB2), o2(0xFD,0xA5), o2(0xF6,0xD5), o2(0xD5,0xE2),
+     o2(0xF8,0xB5),
+
+#define to_EUC_KR_E4_BE WORDINDEX2INFO(1266)
+    to_EUC_KR_E4_BE_offsets,
+    to_EUC_KR_E4_BE_infos,
+
+#define to_EUC_KR_E4_BF_infos WORDINDEX2INFO(1268)
+           INVALID,         UNDEF, o2(0xCC,0xF5), o2(0xF5,0xB5),
+     o2(0xE4,0xAD), o2(0xE7,0xEB), o2(0xF1,0xD5), o2(0xF0,0xBB),
+     o2(0xE9,0xB5), o2(0xCC,0xC9), o2(0xFA,0xD5), o2(0xE1,0xD4),
+     o2(0xD7,0xD6), o2(0xDC,0xC1), o2(0xDE,0xC6), o2(0xFA,0xEF),
+     o2(0xE3,0xE1), o2(0xE1,0xF3), o2(0xDC,0xF6), o2(0xCE,0xFC),
+     o2(0xDB,0xC4), o2(0xF8,0xF1), o2(0xDC,0xE4), o2(0xE5,0xEF),
+
+#define to_EUC_KR_E4_BF WORDINDEX2INFO(1292)
+    to_EUC_KR_E4_BF_offsets,
+    to_EUC_KR_E4_BF_infos,
+
+#define to_EUC_KR_E4_infos WORDINDEX2INFO(1294)
+             INVALID,    to_EUC_KR_C6, to_EUC_KR_E4_B8, to_EUC_KR_E4_B9,
+     to_EUC_KR_E4_BA, to_EUC_KR_E4_BB, to_EUC_KR_E4_BC, to_EUC_KR_E4_BD,
+     to_EUC_KR_E4_BE, to_EUC_KR_E4_BF,
+
+#define to_EUC_KR_E4 WORDINDEX2INFO(1304)
+    to_EUC_KR_E4_offsets,
+    to_EUC_KR_E4_infos,
+
+#define to_EUC_KR_E5_80_infos WORDINDEX2INFO(1306)
+           INVALID,         UNDEF, o2(0xDC,0xB1), o2(0xD5,0xD6),
+     o2(0xF3,0xDA), o2(0xCB,0xC1), o2(0xDB,0xC3), o2(0xD9,0xFA),
+     o2(0xD3,0xEE), o2(0xFA,0xB8), o2(0xFD,0xA6), o2(0xEB,0xEF),
+     o2(0xF4,0xA6), o2(0xCC,0xCA), o2(0xF3,0xA8), o2(0xF3,0xDB),
+     o2(0xDB,0xA7), o2(0xF6,0xB7), o2(0xCF,0xE6), o2(0xF0,0xF2),
+     o2(0xCB,0xDA), o2(0xE7,0xD2), o2(0xD7,0xC3), o2(0xF6,0xF0),
+     o2(0xE8,0xDE), o2(0xE5,0xA6),
+
+#define to_EUC_KR_E5_80 WORDINDEX2INFO(1332)
+    to_EUC_KR_E5_80_offsets,
+    to_EUC_KR_E5_80_infos,
+
+#define to_EUC_KR_E5_81_infos WORDINDEX2INFO(1334)
+           INVALID,         UNDEF, o2(0xE5,0xE7), o2(0xCA,0xA3),
+     o2(0xCC,0xA7), o2(0xEA,0xC9), o2(0xF8,0xB6), o2(0xFA,0xA5),
+     o2(0xF1,0xAE), o2(0xEF,0xCE), o2(0xCB,0xED), o2(0xF6,0xB0),
+     o2(0xEF,0xCF), o2(0xE9,0xCF), o2(0xF7,0xDE),
+
+#define to_EUC_KR_E5_81 WORDINDEX2INFO(1349)
+    to_EUC_KR_E5_81_offsets,
+    to_EUC_KR_E5_81_infos,
+
+#define to_EUC_KR_E5_82_infos WORDINDEX2INFO(1351)
+           INVALID, o2(0xCE,0xD3),         UNDEF, o2(0xDC,0xF7),
+     o2(0xDB,0xA8), o2(0xCB,0xF8), o2(0xDF,0xA1), o2(0xDD,0xE1),
+     o2(0xF5,0xCA), o2(0xE9,0xB6), o2(0xE7,0xEC), o2(0xEE,0xEE),
+     o2(0xF3,0xF0), o2(0xDF,0xBF), o2(0xCC,0xCB),
+
+#define to_EUC_KR_E5_82 WORDINDEX2INFO(1366)
+    to_EUC_KR_E5_82_offsets,
+    to_EUC_KR_E5_82_infos,
+
+#define to_EUC_KR_E5_83_infos WORDINDEX2INFO(1368)
+           INVALID,         UNDEF, o2(0xD0,0xC1), o2(0xF4,0xD2),
+     o2(0xE0,0xBA), o2(0xDF,0xC0), o2(0xCE,0xE0), o2(0xDC,0xD2),
+     o2(0xFD,0xEA), o2(0xD6,0xF6), o2(0xEA,0xCA), o2(0xE8,0xE9),
+     o2(0xE3,0xAC), o2(0xF3,0xD0), o2(0xCA,0xA4), o2(0xDB,0xF8),
+     o2(0xDE,0xC7),
+
+#define to_EUC_KR_E5_83 WORDINDEX2INFO(1385)
+    to_EUC_KR_E5_83_offsets,
+    to_EUC_KR_E5_83_infos,
+
+#define to_EUC_KR_E5_84_infos WORDINDEX2INFO(1387)
+           INVALID, o2(0xEB,0xF0), o2(0xF1,0xD6),         UNDEF,
+     o2(0xE5,0xE2), o2(0xCC,0xCC), o2(0xCB,0xFB), o2(0xEA,0xE3),
+     o2(0xDF,0xC1), o2(0xD6,0xED), o2(0xE9,0xD0), o2(0xEE,0xB9),
+     o2(0xD5,0xE3), o2(0xD1,0xD3), o2(0xE5,0xF0),
+
+#define to_EUC_KR_E5_84 WORDINDEX2INFO(1402)
+    to_EUC_KR_E5_84_offsets,
+    to_EUC_KR_E5_84_infos,
+
+#define to_EUC_KR_E5_85_infos WORDINDEX2INFO(1404)
+           INVALID, o2(0xE8,0xB4), o2(0xEB,0xC3),         UNDEF,
+     o2(0xEA,0xAA), o2(0xFA,0xFC), o2(0xF5,0xF6), o2(0xF0,0xBC),
+     o2(0xFD,0xD4), o2(0xE0,0xBB), o2(0xCE,0xC3), o2(0xD0,0xBA),
+     o2(0xF7,0xBA), o2(0xD8,0xF3), o2(0xF7,0xCD), o2(0xE4,0xAE),
+     o2(0xD4,0xDF), o2(0xD0,0xE7), o2(0xEC,0xFD), o2(0xD2,0xAE),
+     o2(0xEE,0xEF), o2(0xD5,0xD7), o2(0xEA,0xE4), o2(0xF8,0xA2),
+     o2(0xCD,0xEB), o2(0xD7,0xBF), o2(0xFB,0xB1), o2(0xCD,0xEC),
+     o2(0xDC,0xB2), o2(0xD0,0xEC), o2(0xCE,0xFD), o2(0xEE,0xF0),
+     o2(0xCC,0xC2),
+
+#define to_EUC_KR_E5_85 WORDINDEX2INFO(1437)
+    to_EUC_KR_E5_85_offsets,
+    to_EUC_KR_E5_85_infos,
+
+#define to_EUC_KR_E5_86_infos WORDINDEX2INFO(1439)
+           INVALID, o2(0xD0,0xED),         UNDEF, o2(0xE5,0xF7),
+     o2(0xF3,0xFC), o2(0xEE,0xA2), o2(0xD9,0xB3), o2(0xD8,0xF4),
+     o2(0xE9,0xB7), o2(0xCE,0xAE), o2(0xD9,0xA2), o2(0xD8,0xF1),
+     o2(0xD4,0xCF), o2(0xE5,0xA7), o2(0xD5,0xD2), o2(0xD6,0xA9),
+
+#define to_EUC_KR_E5_86 WORDINDEX2INFO(1455)
+    to_EUC_KR_E5_86_offsets,
+    to_EUC_KR_E5_86_infos,
+
+#define to_EUC_KR_E5_87_infos WORDINDEX2INFO(1457)
+           INVALID,         UNDEF, o2(0xF4,0xA2), o2(0xF1,0xD7),
+     o2(0xD5,0xD8), o2(0xF0,0xBD), o2(0xD7,0xD0), o2(0xD4,0xD0),
+     o2(0xD7,0xCF), o2(0xEB,0xEA), o2(0xFD,0xEB), o2(0xDB,0xED),
+     o2(0xFC,0xC5), o2(0xCB,0xC2), o2(0xFD,0xD5), o2(0xF4,0xC8),
+     o2(0xE8,0xEA), o2(0xF5,0xF3), o2(0xF9,0xDE),
+
+#define to_EUC_KR_E5_87 WORDINDEX2INFO(1476)
+    to_EUC_KR_E5_87_offsets,
+    to_EUC_KR_E5_87_infos,
+
+#define to_EUC_KR_E5_88_infos WORDINDEX2INFO(1478)
+           INVALID, o2(0xD3,0xEF),         UNDEF, o2(0xEC,0xD3),
+     o2(0xDD,0xC2), o2(0xEF,0xB7), o2(0xE7,0xD4), o2(0xCA,0xCA),
+     o2(0xD9,0xFB), o2(0xFA,0xFD), o2(0xD6,0xAA), o2(0xF4,0xF8),
+     o2(0xF7,0xF7), o2(0xDC,0xAC), o2(0xD7,0xD7), o2(0xDF,0xA2),
+     o2(0xCE,0xBE), o2(0xD3,0xF0), o2(0xF0,0xA4), o2(0xE1,0xEC),
+     o2(0xCF,0xE7), o2(0xF3,0xCB), o2(0xED,0xA9), o2(0xCA,0xBE),
+
+#define to_EUC_KR_E5_88 WORDINDEX2INFO(1502)
+    to_EUC_KR_E5_88_offsets,
+    to_EUC_KR_E5_88_infos,
+
+#define to_EUC_KR_E5_89_infos WORDINDEX2INFO(1504)
+           INVALID,         UNDEF, o2(0xF4,0xEF), o2(0xF6,0xCE),
+     o2(0xDE,0xFB), o2(0xD0,0xBB), o2(0xD5,0xB7), o2(0xEE,0xF1),
+     o2(0xF4,0xA8), o2(0xDC,0xF8), o2(0xCB,0xA7), o2(0xDA,0xCE),
+     o2(0xE0,0xE6), o2(0xED,0xA5), o2(0xEE,0xF2), o2(0xDC,0xF9),
+     o2(0xF9,0xDC), o2(0xF3,0xDC), o2(0xF8,0xF2), o2(0xF4,0xF9),
+
+#define to_EUC_KR_E5_89 WORDINDEX2INFO(1524)
+    to_EUC_KR_E5_89_offsets,
+    to_EUC_KR_E5_89_infos,
+
+#define to_EUC_KR_E5_8A_infos WORDINDEX2INFO(1526)
+           INVALID,         UNDEF, o2(0xFC,0xF1), o2(0xD0,0xBC),
+     o2(0xDB,0xF9), o2(0xD7,0xB1), o2(0xCB,0xFC), o2(0xF0,0xA5),
+     o2(0xCB,0xFD), o2(0xD5,0xF4), o2(0xCD,0xED), o2(0xCA,0xA5),
+     o2(0xD6,0xAB), o2(0xD0,0xC2), o2(0xF0,0xBE), o2(0xD2,0xBD),
+     o2(0xCC,0xA4), o2(0xFA,0xB6),
+
+#define to_EUC_KR_E5_8A WORDINDEX2INFO(1544)
+    to_EUC_KR_E5_8A_offsets,
+    to_EUC_KR_E5_8A_infos,
+
+#define to_EUC_KR_E5_8B_infos WORDINDEX2INFO(1546)
+           INVALID,         UNDEF, o2(0xCC,0xCD), o2(0xDA,0xFA),
+     o2(0xF6,0xCF), o2(0xE9,0xB8), o2(0xD8,0xF5), o2(0xCC,0xCE),
+     o2(0xD7,0xCD), o2(0xD4,0xD1), o2(0xE9,0xED), o2(0xCA,0xEB),
+     o2(0xD9,0xE2), o2(0xFD,0xB2), o2(0xE3,0xAD), o2(0xD6,0xCC),
+     o2(0xD9,0xB4), o2(0xE1,0xA7), o2(0xEE,0xD3), o2(0xD0,0xC3),
+     o2(0xFD,0xB3), o2(0xD5,0xE4), o2(0xCF,0xE8), o2(0xED,0xC3),
+     o2(0xD0,0xB2), o2(0xCE,0xFE), o2(0xDA,0xA8),
+
+#define to_EUC_KR_E5_8B WORDINDEX2INFO(1573)
+    to_EUC_KR_E5_8B_offsets,
+    to_EUC_KR_E5_8B_infos,
+
+#define to_EUC_KR_E5_8C_infos WORDINDEX2INFO(1575)
+           INVALID,         UNDEF, o2(0xF8,0xD0), o2(0xFD,0xD6),
+     o2(0xF8,0xD1), o2(0xF8,0xD2), o2(0xDC,0xD3), o2(0xDD,0xE2),
+     o2(0xFB,0xF9), o2(0xDD,0xC1), o2(0xE3,0xB5), o2(0xED,0xDD),
+     o2(0xCE,0xC4), o2(0xCB,0xA1), o2(0xDD,0xE3), o2(0xFC,0xDD),
+     o2(0xF9,0xAF), o2(0xD2,0xFB),
+
+#define to_EUC_KR_E5_8C WORDINDEX2INFO(1593)
+    to_EUC_KR_E5_8C_offsets,
+    to_EUC_KR_E5_8C_infos,
+
+#define to_EUC_KR_E5_8D_infos WORDINDEX2INFO(1595)
+           INVALID, o2(0xCF,0xA1), o2(0xE4,0xA8),         UNDEF,
+     o2(0xF4,0xB6), o2(0xEC,0xFE), o2(0xE3,0xAE), o2(0xE7,0xED),
+     o2(0xFD,0xC1), o2(0xDA,0xE2), o2(0xD8,0xB3), o2(0xDD,0xE4),
+     o2(0xF0,0xEF), o2(0xF6,0xF1), o2(0xFA,0xF0), o2(0xD1,0xF5),
+     o2(0xDA,0xCF), o2(0xDC,0xD4), o2(0xDC,0xA6), o2(0xEF,0xBF),
+     o2(0xCE,0xCF), o2(0xE0,0xD9), o2(0xD9,0xD6), o2(0xEC,0xD4),
+     o2(0xEA,0xCB), o2(0xCA,0xBF), o2(0xD5,0xB0), o2(0xCF,0xE9),
+     o2(0xF1,0xED), o2(0xCC,0xCF),
+
+#define to_EUC_KR_E5_8D WORDINDEX2INFO(1625)
+    to_EUC_KR_E5_8D_offsets,
+    to_EUC_KR_E5_8D_infos,
+
+#define to_EUC_KR_E5_8E_infos WORDINDEX2INFO(1627)
+           INVALID,         UNDEF, o2(0xE4,0xF8), o2(0xE4,0xED),
+     o2(0xD7,0xD8), o2(0xFD,0xA7), o2(0xEA,0xAB), o2(0xF6,0xB2),
+     o2(0xCF,0xF0), o2(0xF9,0xBD), o2(0xE6,0xF4), o2(0xCB,0xDB),
+
+#define to_EUC_KR_E5_8E WORDINDEX2INFO(1639)
+    to_EUC_KR_E5_8E_offsets,
+    to_EUC_KR_E5_8E_infos,
+
+#define to_EUC_KR_E5_8F_infos WORDINDEX2INFO(1641)
+           INVALID,         UNDEF, o2(0xF3,0xD1), o2(0xE9,0xD1),
+     o2(0xF3,0xA9), o2(0xD0,0xE0), o2(0xE9,0xD2), o2(0xDA,0xE3),
+     o2(0xE2,0xD2), o2(0xF6,0xA2), o2(0xE1,0xF4), o2(0xDA,0xE4),
+     o2(0xE7,0xD5), o2(0xF5,0xBF), o2(0xCF,0xA2), o2(0xCD,0xAF),
+     o2(0xCF,0xA3), o2(0xCD,0xB0), o2(0xF1,0xFE), o2(0xD0,0xA3),
+     o2(0xE1,0xAF), o2(0xF8,0xA3), o2(0xCA,0xA6), o2(0xF7,0xBB),
+     o2(0xF2,0xEA), o2(0xDE,0xC8), o2(0xE9,0xD3), o2(0xDE,0xC9),
+
+#define to_EUC_KR_E5_8F WORDINDEX2INFO(1669)
+    to_EUC_KR_E5_8F_offsets,
+    to_EUC_KR_E5_8F_infos,
+
+#define to_EUC_KR_E5_90_infos WORDINDEX2INFO(1671)
+           INVALID,         UNDEF, o2(0xFD,0xDE), o2(0xCA,0xC0),
+     o2(0xF9,0xEA), o2(0xD1,0xCE), o2(0xEE,0xD4), o2(0xD4,0xD2),
+     o2(0xD9,0xA3), o2(0xFD,0xA8), o2(0xD7,0xD9), o2(0xF7,0xCE),
+     o2(0xFA,0xBE), o2(0xCF,0xD6), o2(0xD7,0xF0), o2(0xEB,0xE1),
+     o2(0xF8,0xC5), o2(0xDC,0xFA), o2(0xDD,0xC3), o2(0xF9,0xDF),
+     o2(0xE7,0xEF), o2(0xFD,0xE5), o2(0xF6,0xA3), o2(0xD9,0xFC),
+     o2(0xFD,0xA9), o2(0xE7,0xEE),
+
+#define to_EUC_KR_E5_90 WORDINDEX2INFO(1697)
+    to_EUC_KR_E5_90_offsets,
+    to_EUC_KR_E5_90_infos,
+
+#define to_EUC_KR_E5_91_infos WORDINDEX2INFO(1699)
+           INVALID,         UNDEF, o2(0xD5,0xE5), o2(0xEF,0xD0),
+     o2(0xCD,0xB1), o2(0xF7,0xA2), o2(0xF1,0xB2), o2(0xF1,0xB1),
+     o2(0xCD,0xB2), o2(0xDA,0xAB), o2(0xCA,0xA7), o2(0xE3,0xE2),
+     o2(0xFB,0xBC), o2(0xD9,0xA4),
+
+#define to_EUC_KR_E5_91 WORDINDEX2INFO(1713)
+    to_EUC_KR_E5_91_offsets,
+    to_EUC_KR_E5_91_infos,
+
+#define to_EUC_KR_E5_92_infos WORDINDEX2INFO(1715)
+           INVALID, o2(0xEE,0xBA),         UNDEF, o2(0xF8,0xD3),
+     o2(0xFB,0xFA), o2(0xCF,0xA4), o2(0xDC,0xFB), o2(0xF6,0xE3),
+     o2(0xED,0xAA), o2(0xF2,0xA1), o2(0xCE,0xE1), o2(0xFA,0xA6),
+     o2(0xF9,0xE0), o2(0xEC,0xD6),
+
+#define to_EUC_KR_E5_92 WORDINDEX2INFO(1729)
+    to_EUC_KR_E5_92_offsets,
+    to_EUC_KR_E5_92_infos,
+
+#define to_EUC_KR_E5_93_infos WORDINDEX2INFO(1731)
+           INVALID, o2(0xE4,0xEE), o2(0xF9,0xA1),         UNDEF,
+     o2(0xFB,0xEF), o2(0xF9,0xEB), o2(0xEE,0xA3), o2(0xEA,0xAC),
+     o2(0xCA,0xA8), o2(0xF4,0xFA), o2(0xCD,0xD6), o2(0xFC,0xF6),
+     o2(0xF4,0xC9), o2(0xF8,0xD4),
+
+#define to_EUC_KR_E5_93 WORDINDEX2INFO(1745)
+    to_EUC_KR_E5_93_offsets,
+    to_EUC_KR_E5_93_infos,
+
+#define to_EUC_KR_E5_94_infos WORDINDEX2INFO(1747)
+           INVALID,         UNDEF, o2(0xF8,0xA6), o2(0xDE,0xCA),
+     o2(0xF2,0xC6), o2(0xD7,0xDA), o2(0xD3,0xD0), o2(0xD8,0xC5),
+     o2(0xEA,0xE6), o2(0xF3,0xDD), o2(0xE4,0xDA), o2(0xF6,0xE4),
+
+#define to_EUC_KR_E5_94 WORDINDEX2INFO(1759)
+    to_EUC_KR_E5_94_offsets,
+    to_EUC_KR_E5_94_infos,
+
+#define to_EUC_KR_E5_95_infos WORDINDEX2INFO(1761)
+           INVALID,         UNDEF, o2(0xF6,0xF2), o2(0xDF,0xC2),
+     o2(0xD9,0xFD), o2(0xCC,0xF6), o2(0xD3,0xBA), o2(0xE4,0xAF),
+     o2(0xF9,0xE1), o2(0xF0,0xA6),
+
+#define to_EUC_KR_E5_95 WORDINDEX2INFO(1771)
+    to_EUC_KR_E5_95_offsets,
+    to_EUC_KR_E5_95_infos,
+
+#define to_EUC_KR_E5_96_infos WORDINDEX2INFO(1773)
+           INVALID, o2(0xCB,0xD3),         UNDEF, o2(0xE0,0xBC),
+     o2(0xF4,0xCA), o2(0xD4,0xFA), o2(0xFD,0xAA), o2(0xF9,0xE2),
+     o2(0xF4,0xB7), o2(0xFD,0xC2), o2(0xFC,0xB0), o2(0xFD,0xEC),
+     o2(0xCA,0xE2), o2(0xFD,0xBD), o2(0xEA,0xE7), o2(0xDF,0xC3),
+     o2(0xD1,0xD2), o2(0xCE,0xE2), o2(0xD3,0xA4),
+
+#define to_EUC_KR_E5_96 WORDINDEX2INFO(1792)
+    to_EUC_KR_E5_96_offsets,
+    to_EUC_KR_E5_96_infos,
+
+#define to_EUC_KR_E5_97_infos WORDINDEX2INFO(1794)
+           INVALID,         UNDEF, o2(0xFD,0xAB), o2(0xDF,0xE0),
+     o2(0xF2,0xC7), o2(0xE7,0xF0), o2(0xD0,0xEE), o2(0xF3,0xAA),
+     o2(0xDE,0xCB), o2(0xF6,0xB8), o2(0xE1,0xF5), o2(0xF1,0xB3),
+
+#define to_EUC_KR_E5_97 WORDINDEX2INFO(1806)
+    to_EUC_KR_E5_97_offsets,
+    to_EUC_KR_E5_97_infos,
+
+#define to_EUC_KR_E5_98_infos WORDINDEX2INFO(1808)
+           INVALID,         UNDEF, o2(0xF7,0xA3), o2(0xCA,0xA9),
+     o2(0xCF,0xA5), o2(0xDF,0xC4), o2(0xE1,0xB0), o2(0xF0,0xBF),
+     o2(0xF6,0xA4), o2(0xE3,0xB6),
+
+#define to_EUC_KR_E5_98 WORDINDEX2INFO(1818)
+    to_EUC_KR_E5_98_offsets,
+    to_EUC_KR_E5_98_infos,
+
+#define to_EUC_KR_E5_99_infos WORDINDEX2INFO(1820)
+           INVALID,         UNDEF, o2(0xFA,0xC6), o2(0xD0,0xEF),
+     o2(0xFD,0xED), o2(0xDD,0xC4),
+
+#define to_EUC_KR_E5_99 WORDINDEX2INFO(1826)
+    to_EUC_KR_E5_99_offsets,
+    to_EUC_KR_E5_99_infos,
+
+#define to_EUC_KR_E5_9A_infos WORDINDEX2INFO(1828)
+           INVALID,         UNDEF, o2(0xFC,0xF7), o2(0xE6,0xBF),
+     o2(0xDE,0xAD), o2(0xFA,0xBF), o2(0xE5,0xF1), o2(0xED,0xC4),
+
+#define to_EUC_KR_E5_9A WORDINDEX2INFO(1836)
+    to_EUC_KR_E5_9A_offsets,
+    to_EUC_KR_E5_9A_infos,
+
+#define to_EUC_KR_E5_9B_infos WORDINDEX2INFO(1838)
+           INVALID,         UNDEF, o2(0xD2,0xA5), o2(0xFD,0xEE),
+     o2(0xF5,0xB6), o2(0xE1,0xF6), o2(0xDE,0xCC), o2(0xFC,0xDE),
+     o2(0xEC,0xD7), o2(0xCD,0xDD), o2(0xD6,0xB7), o2(0xCD,0xB3),
+
+#define to_EUC_KR_E5_9B WORDINDEX2INFO(1850)
+    to_EUC_KR_E5_9B_offsets,
+    to_EUC_KR_E5_9B_infos,
+
+#define to_EUC_KR_E5_9C_infos WORDINDEX2INFO(1852)
+           INVALID,         UNDEF, o2(0xF8,0xD5), o2(0xE5,0xD8),
+     o2(0xCF,0xEA), o2(0xCF,0xD0), o2(0xEA,0xCC), o2(0xEA,0xAE),
+     o2(0xEA,0xAD), o2(0xD3,0xF1), o2(0xD3,0xA5), o2(0xF7,0xCF),
+     o2(0xEE,0xA4), o2(0xD0,0xA4), o2(0xF2,0xA2), o2(0xD0,0xF0),
+
+#define to_EUC_KR_E5_9C WORDINDEX2INFO(1868)
+    to_EUC_KR_E5_9C_offsets,
+    to_EUC_KR_E5_9C_infos,
+
+#define to_EUC_KR_E5_9D_infos WORDINDEX2INFO(1870)
+           INVALID, o2(0xF2,0xA3),         UNDEF, o2(0xF7,0xF8),
+     o2(0xD0,0xB3), o2(0xDB,0xA9), o2(0xD3,0xBB), o2(0xCA,0xEC),
+     o2(0xF1,0xA6), o2(0xCB,0xD5), o2(0xF7,0xE7), o2(0xCD,0xDE),
+     o2(0xF7,0xA4), o2(0xF8,0xC0), o2(0xD3,0xDD), o2(0xCC,0xD0),
+     o2(0xCF,0xA6), o2(0xF6,0xF3),
+
+#define to_EUC_KR_E5_9D WORDINDEX2INFO(1888)
+    to_EUC_KR_E5_9D_offsets,
+    to_EUC_KR_E5_9D_infos,
+
+#define to_EUC_KR_E5_9E_infos WORDINDEX2INFO(1890)
+           INVALID,         UNDEF, o2(0xE1,0xF7), o2(0xD3,0xDC),
+     o2(0xFA,0xFE), o2(0xFA,0xA7), o2(0xEB,0xD9), o2(0xCF,0xA7),
+     o2(0xEA,0xAF),
+
+#define to_EUC_KR_E5_9E WORDINDEX2INFO(1899)
+    to_EUC_KR_E5_9E_offsets,
+    to_EUC_KR_E5_9E_infos,
+
+#define to_EUC_KR_E5_9F_infos WORDINDEX2INFO(1901)
+           INVALID,         UNDEF, o2(0xE4,0xEF), o2(0xE9,0xB9),
+     o2(0xF1,0xD8), o2(0xD8,0xD8), o2(0xE0,0xF2), o2(0xE6,0xB4),
+     o2(0xDC,0xFC), o2(0xF3,0xF1), o2(0xE3,0xD0), o2(0xF2,0xFB),
+     o2(0xDB,0xC6), o2(0xD0,0xF1), o2(0xD0,0xF2),
+
+#define to_EUC_KR_E5_9F WORDINDEX2INFO(1916)
+    to_EUC_KR_E5_9F_offsets,
+    to_EUC_KR_E5_9F_infos,
+
+#define to_EUC_KR_E5_A0_infos WORDINDEX2INFO(1918)
+           INVALID, o2(0xCF,0xDC),         UNDEF, o2(0xD3,0xD1),
+     o2(0xCC,0xB1), o2(0xF7,0xD8), o2(0xCB,0xA8), o2(0xEB,0xBC),
+     o2(0xE4,0xBE), o2(0xF4,0xDC), o2(0xDC,0xC2), o2(0xF0,0xA7),
+     o2(0xE6,0xC0), o2(0xCA,0xED), o2(0xE8,0xEB), o2(0xE5,0xE8),
+     o2(0xDC,0xC3), o2(0xED,0xDE), o2(0xD3,0xF2), o2(0xCC,0xF7),
+
+#define to_EUC_KR_E5_A0 WORDINDEX2INFO(1938)
+    to_EUC_KR_E5_A0_offsets,
+    to_EUC_KR_E5_A0_infos,
+
+#define to_EUC_KR_E5_A1_infos WORDINDEX2INFO(1940)
+           INVALID,         UNDEF, o2(0xCE,0xD4), o2(0xE7,0xAB),
+     o2(0xCB,0xC3), o2(0xE1,0xB1), o2(0xF7,0xB2), o2(0xD3,0xF3),
+     o2(0xD3,0xD2), o2(0xF5,0xC0), o2(0xDF,0xDD), o2(0xEE,0xF3),
+     o2(0xE7,0xF1), o2(0xFD,0xB4), o2(0xF2,0xC8), o2(0xF3,0xD2),
+     o2(0xEE,0xF4), o2(0xE2,0xD3),
+
+#define to_EUC_KR_E5_A1 WORDINDEX2INFO(1958)
+    to_EUC_KR_E5_A1_offsets,
+    to_EUC_KR_E5_A1_infos,
+
+#define to_EUC_KR_E5_A2_infos WORDINDEX2INFO(1960)
+           INVALID,         UNDEF, o2(0xCC,0xD1), o2(0xDF,0xEA),
+     o2(0xE9,0xBA), o2(0xD9,0xD7), o2(0xF5,0xCD), o2(0xF1,0xF2),
+     o2(0xFA,0xC7), o2(0xD9,0xF8), o2(0xD4,0xC2), o2(0xF6,0xE5),
+     o2(0xDD,0xC5), o2(0xE7,0xF2), o2(0xED,0xDF), o2(0xCA,0xCB),
+
+#define to_EUC_KR_E5_A2 WORDINDEX2INFO(1976)
+    to_EUC_KR_E5_A2_offsets,
+    to_EUC_KR_E5_A2_infos,
+
+#define to_EUC_KR_E5_A3_infos WORDINDEX2INFO(1978)
+           INVALID,         UNDEF, o2(0xDB,0xFA), o2(0xE8,0xB5),
+     o2(0xD3,0xA6), o2(0xFD,0xB5), o2(0xF9,0xC9), o2(0xE4,0xE2),
+     o2(0xFB,0xBD), o2(0xD7,0xA4), o2(0xCE,0xC5), o2(0xCE,0xD5),
+     o2(0xD6,0xE6), o2(0xE5,0xBD), o2(0xDE,0xCD), o2(0xEC,0xF3),
+     o2(0xED,0xE0), o2(0xEC,0xEC), o2(0xFB,0xBE), o2(0xDF,0xEB),
+     o2(0xE1,0xF8),
+
+#define to_EUC_KR_E5_A3 WORDINDEX2INFO(1999)
+    to_EUC_KR_E5_A3_offsets,
+    to_EUC_KR_E5_A3_infos,
+
+#define to_EUC_KR_E5_A4_infos WORDINDEX2INFO(2001)
+           INVALID,         UNDEF, o2(0xF9,0xBE), o2(0xD0,0xF3),
+     o2(0xE0,0xAA), o2(0xE8,0xE2), o2(0xE2,0xD4), o2(0xD2,0xFD),
+     o2(0xE5,0xA8), o2(0xD9,0xD3), o2(0xD3,0xDE), o2(0xF4,0xB8),
+     o2(0xF7,0xBC), o2(0xDC,0xFD), o2(0xE8,0xEC), o2(0xE4,0xE7),
+     o2(0xE3,0xF7), o2(0xEC,0xA8), o2(0xFA,0xF1),
+
+#define to_EUC_KR_E5_A4 WORDINDEX2INFO(2020)
+    to_EUC_KR_E5_A4_offsets,
+    to_EUC_KR_E5_A4_infos,
+
+#define to_EUC_KR_E5_A5_infos WORDINDEX2INFO(2022)
+           INVALID,         UNDEF, o2(0xE5,0xF2), o2(0xD0,0xF4),
+     o2(0xD2,0xAF), o2(0xDC,0xE5), o2(0xD0,0xA5), o2(0xF1,0xB4),
+     o2(0xFC,0xB1), o2(0xCC,0xF8), o2(0xDD,0xC6), o2(0xFA,0xD1),
+     o2(0xF7,0xDF), o2(0xFA,0xA8), o2(0xEE,0xF5), o2(0xDE,0xCE),
+     o2(0xE7,0xF3), o2(0xF7,0xAC), o2(0xEB,0xC4), o2(0xED,0xE1),
+     o2(0xE0,0xAB), o2(0xDD,0xC7), o2(0xD2,0xB3), o2(0xD2,0xBF),
+     o2(0xCA,0xCC), o2(0xFB,0xBF),
+
+#define to_EUC_KR_E5_A5 WORDINDEX2INFO(2048)
+    to_EUC_KR_E5_A5_offsets,
+    to_EUC_KR_E5_A5_infos,
+
+#define to_EUC_KR_E5_A6_infos WORDINDEX2INFO(2050)
+           INVALID,         UNDEF, o2(0xE5,0xFD), o2(0xDD,0xE5),
+     o2(0xD8,0xCD), o2(0xEC,0xF4), o2(0xD0,0xF5), o2(0xE8,0xED),
+     o2(0xD0,0xD2), o2(0xD9,0xD8), o2(0xF6,0xE6), o2(0xDB,0xAA),
+     o2(0xF7,0xE0), o2(0xD8,0xD9), o2(0xF4,0xA3), o2(0xF4,0xDD),
+
+#define to_EUC_KR_E5_A6 WORDINDEX2INFO(2066)
+    to_EUC_KR_E5_A6_offsets,
+    to_EUC_KR_E5_A6_infos,
+
+#define to_EUC_KR_E5_A7_infos WORDINDEX2INFO(2068)
+           INVALID,         UNDEF, o2(0xEF,0xD1), o2(0xD9,0xB5),
+     o2(0xED,0xAB), o2(0xE3,0xB7), o2(0xEE,0xBB), o2(0xCD,0xB4),
+     o2(0xE0,0xF3), o2(0xEA,0xCD), o2(0xEC,0xF5), o2(0xE8,0xEE),
+     o2(0xCB,0xA9), o2(0xF1,0xAF), o2(0xCA,0xCD), o2(0xEC,0xA9),
+     o2(0xF2,0xEB), o2(0xFD,0xEF), o2(0xF9,0xF3), o2(0xE6,0xC1),
+     o2(0xEC,0xD8), o2(0xED,0xAC),
+
+#define to_EUC_KR_E5_A7 WORDINDEX2INFO(2090)
+    to_EUC_KR_E5_A7_offsets,
+    to_EUC_KR_E5_A7_infos,
+
+#define to_EUC_KR_E5_A8_infos WORDINDEX2INFO(2092)
+           INVALID,         UNDEF, o2(0xEA,0xCE), o2(0xE8,0xDF),
+     o2(0xDE,0xCF), o2(0xD2,0xA6), o2(0xE7,0xF4), o2(0xD1,0xD6),
+     o2(0xE6,0xC2), o2(0xE3,0xE3), o2(0xE4,0xB0), o2(0xD8,0xB4),
+     o2(0xF6,0xA5), o2(0xF3,0xDE),
+
+#define to_EUC_KR_E5_A8 WORDINDEX2INFO(2106)
+    to_EUC_KR_E5_A8_offsets,
+    to_EUC_KR_E5_A8_infos,
+
+#define to_EUC_KR_E5_A9_infos WORDINDEX2INFO(2108)
+           INVALID,         UNDEF, o2(0xD7,0xA5), o2(0xF7,0xE8),
+     o2(0xE8,0xC6), o2(0xFB,0xE6), o2(0xDD,0xE6), o2(0xDC,0xFE),
+
+#define to_EUC_KR_E5_A9 WORDINDEX2INFO(2116)
+    to_EUC_KR_E5_A9_offsets,
+    to_EUC_KR_E5_A9_infos,
+
+#define to_EUC_KR_E5_AA_infos WORDINDEX2INFO(2118)
+           INVALID,         UNDEF, o2(0xD8,0xDA), o2(0xDA,0xAC),
+     o2(0xEA,0xB0), o2(0xE3,0xB8),
+
+#define to_EUC_KR_E5_AA WORDINDEX2INFO(2124)
+    to_EUC_KR_E5_AA_offsets,
+    to_EUC_KR_E5_AA_infos,
+
+#define to_EUC_KR_E5_AB_infos WORDINDEX2INFO(2126)
+           INVALID,         UNDEF, o2(0xCA,0xAA), o2(0xE1,0xF9),
+     o2(0xEA,0xB1), o2(0xF2,0xEC), o2(0xFA,0xEE), o2(0xEE,0xD5),
+     o2(0xF9,0xF4), o2(0xD2,0xEC),
+
+#define to_EUC_KR_E5_AB WORDINDEX2INFO(2136)
+    to_EUC_KR_E5_AB_offsets,
+    to_EUC_KR_E5_AB_infos,
+
+#define to_EUC_KR_E5_AC_infos WORDINDEX2INFO(2138)
+           INVALID,         UNDEF, o2(0xFB,0xFB), o2(0xFD,0xF0),
+     o2(0xE0,0xBD), o2(0xCE,0xE3), o2(0xF8,0xC6), o2(0xDE,0xAE),
+
+#define to_EUC_KR_E5_AC WORDINDEX2INFO(2146)
+    to_EUC_KR_E5_AC_offsets,
+    to_EUC_KR_E5_AC_infos,
+
+#define to_EUC_KR_E5_AD_infos WORDINDEX2INFO(2148)
+           INVALID, o2(0xDF,0xC5),         UNDEF, o2(0xE5,0xBE),
+     o2(0xED,0xAD), o2(0xFA,0xEA), o2(0xCD,0xEE), o2(0xED,0xA6),
+     o2(0xED,0xAE), o2(0xF0,0xED), o2(0xDD,0xA1), o2(0xED,0xAF),
+     o2(0xFC,0xF8), o2(0xD8,0xEB), o2(0xCC,0xF9), o2(0xCD,0xB5),
+     o2(0xFA,0xA9), o2(0xE1,0xDD), o2(0xE2,0xD5), o2(0xED,0xCF),
+     o2(0xDD,0xA2), o2(0xF9,0xCA), o2(0xEA,0xE8), o2(0xE5,0xED),
+
+#define to_EUC_KR_E5_AD WORDINDEX2INFO(2172)
+    to_EUC_KR_E5_AD_offsets,
+    to_EUC_KR_E5_AD_infos,
+
+#define to_EUC_KR_E5_AE_infos WORDINDEX2INFO(2174)
+           INVALID,         UNDEF, o2(0xD3,0xEB), o2(0xE9,0xD4),
+     o2(0xE1,0xFA), o2(0xE4,0xCC), o2(0xE1,0xE4), o2(0xE8,0xC7),
+     o2(0xCE,0xDB), o2(0xDC,0xD5), o2(0xF7,0xB5), o2(0xFC,0xF3),
+     o2(0xF0,0xF3), o2(0xCE,0xAF), o2(0xF1,0xB5), o2(0xEF,0xD2),
+     o2(0xE8,0xC8), o2(0xEB,0xF1), o2(0xCB,0xD4), o2(0xE0,0xBE),
+     o2(0xE3,0xF8), o2(0xEA,0xE9), o2(0xFC,0xB2), o2(0xE0,0xF4),
+     o2(0xCF,0xE0), o2(0xEE,0xA5), o2(0xFA,0xAA), o2(0xE6,0xC3),
+     o2(0xE1,0xB2), o2(0xCA,0xAB), o2(0xE3,0xE4), o2(0xE9,0xBB),
+     o2(0xE2,0xD6),
+
+#define to_EUC_KR_E5_AE WORDINDEX2INFO(2207)
+    to_EUC_KR_E5_AE_offsets,
+    to_EUC_KR_E5_AE_infos,
+
+#define to_EUC_KR_E5_AF_infos WORDINDEX2INFO(2209)
+           INVALID, o2(0xF3,0xF2),         UNDEF, o2(0xEE,0xD6),
+     o2(0xEA,0xB2), o2(0xD0,0xF6), o2(0xEC,0xD9), o2(0xDA,0xCB),
+     o2(0xCF,0xA8), o2(0xDD,0xA3), o2(0xD8,0xDB), o2(0xF9,0xCE),
+     o2(0xE9,0xD5), o2(0xE3,0xD1), o2(0xD2,0xBC), o2(0xD8,0xAC),
+     o2(0xF3,0xCC), o2(0xCD,0xFB), o2(0xF6,0xD6), o2(0xE7,0xF5),
+     o2(0xE8,0xEF), o2(0xE3,0xF9), o2(0xD2,0xBB), o2(0xF3,0xF3),
+     o2(0xE3,0xFB), o2(0xDE,0xD0), o2(0xCE,0xB0), o2(0xD6,0xF7),
+     o2(0xF1,0xD9), o2(0xF5,0xC1), o2(0xDC,0xC4), o2(0xF5,0xBB),
+     o2(0xDE,0xD1),
+
+#define to_EUC_KR_E5_AF WORDINDEX2INFO(2242)
+    to_EUC_KR_E5_AF_offsets,
+    to_EUC_KR_E5_AF_infos,
+
+#define to_EUC_KR_E5_B0_infos WORDINDEX2INFO(2244)
+           INVALID,         UNDEF, o2(0xDC,0xE6), o2(0xDE,0xD2),
+     o2(0xED,0xE2), o2(0xEE,0xF6), o2(0xEA,0xCF), o2(0xF0,0xEE),
+     o2(0xE3,0xFC), o2(0xD3,0xDF), o2(0xD3,0xF4), o2(0xE1,0xB3),
+     o2(0xE1,0xB4), o2(0xF4,0xD3), o2(0xDF,0xC6), o2(0xE9,0xD6),
+     o2(0xDB,0xAB), o2(0xF6,0xA6), o2(0xE3,0xB9), o2(0xEB,0xC5),
+     o2(0xF4,0xA9), o2(0xCD,0xB6), o2(0xD2,0xF9), o2(0xDA,0xAD),
+     o2(0xD2,0xE3),
+
+#define to_EUC_KR_E5_B0 WORDINDEX2INFO(2269)
+    to_EUC_KR_E5_B0_offsets,
+    to_EUC_KR_E5_B0_infos,
+
+#define to_EUC_KR_E5_B1_infos WORDINDEX2INFO(2271)
+           INVALID, o2(0xCF,0xD1),         UNDEF, o2(0xCB,0xDC),
+     o2(0xCC,0xFA), o2(0xCF,0xDD), o2(0xE8,0xA9), o2(0xE3,0xBB),
+     o2(0xE3,0xBA), o2(0xE0,0xDA), o2(0xEE,0xF7), o2(0xDC,0xB3),
+     o2(0xD3,0xF5), o2(0xD7,0xA6), o2(0xF6,0xB5), o2(0xD7,0xDB),
+     o2(0xE1,0xD5), o2(0xD4,0xEA), o2(0xDF,0xA3), o2(0xFD,0xDF),
+
+#define to_EUC_KR_E5_B1 WORDINDEX2INFO(2291)
+    to_EUC_KR_E5_B1_offsets,
+    to_EUC_KR_E5_B1_infos,
+
+#define to_EUC_KR_E5_B2_infos WORDINDEX2INFO(2293)
+           INVALID,         UNDEF, o2(0xD0,0xF7), o2(0xED,0xD4),
+     o2(0xCB,0xAA), o2(0xE4,0xDB), o2(0xE1,0xFB), o2(0xCB,0xA2),
+     o2(0xD3,0xE0), o2(0xE4,0xBF), o2(0xFB,0xC0), o2(0xDA,0xBE),
+     o2(0xE4,0xCD), o2(0xD6,0xB9), o2(0xEF,0xC0),
+
+#define to_EUC_KR_E5_B2 WORDINDEX2INFO(2308)
+    to_EUC_KR_E5_B2_offsets,
+    to_EUC_KR_E5_B2_infos,
+
+#define to_EUC_KR_E5_B3_infos WORDINDEX2INFO(2310)
+           INVALID, o2(0xE1,0xFC),         UNDEF, o2(0xF6,0xB9),
+     o2(0xDF,0xC7), o2(0xE4,0xB1), o2(0xDC,0xE7), o2(0xDC,0xE8),
+     o2(0xFA,0xD6), o2(0xD3,0xF6), o2(0xF1,0xDA), o2(0xFA,0xF2),
+
+#define to_EUC_KR_E5_B3 WORDINDEX2INFO(2322)
+    to_EUC_KR_E5_B3_offsets,
+    to_EUC_KR_E5_B3_infos,
+
+#define to_EUC_KR_E5_B4_infos WORDINDEX2INFO(2324)
+           INVALID,         UNDEF, o2(0xE2,0xFD), o2(0xD5,0xCF),
+     o2(0xD0,0xF8), o2(0xCD,0xDF), o2(0xF5,0xCB), o2(0xE4,0xF0),
+     o2(0xCB,0xAB), o2(0xD7,0xC4), o2(0xE2,0xFE), o2(0xDD,0xDA),
+
+#define to_EUC_KR_E5_B4 WORDINDEX2INFO(2336)
+    to_EUC_KR_E5_B4_offsets,
+    to_EUC_KR_E5_B4_infos,
+
+#define to_EUC_KR_E5_B5_infos WORDINDEX2INFO(2338)
+           INVALID,         UNDEF, o2(0xDA,0xAE), o2(0xCA,0xEE),
+     o2(0xD5,0xB9), o2(0xE3,0xA1), o2(0xE8,0xE3), o2(0xF3,0xAB),
+
+#define to_EUC_KR_E5_B5 WORDINDEX2INFO(2346)
+    to_EUC_KR_E5_B5_offsets,
+    to_EUC_KR_E5_B5_infos,
+
+#define to_EUC_KR_E5_B6_infos WORDINDEX2INFO(2348)
+           INVALID,         UNDEF, o2(0xCF,0xA9), o2(0xD3,0xF7),
+     o2(0xD4,0xF1), o2(0xCE,0xE4), o2(0xE8,0xF2), o2(0xE5,0xF5),
+     o2(0xE7,0xAE), o2(0xD6,0xBA), o2(0xDF,0xEC), o2(0xE4,0xC0),
+
+#define to_EUC_KR_E5_B6 WORDINDEX2INFO(2360)
+    to_EUC_KR_E5_B6_offsets,
+    to_EUC_KR_E5_B6_infos,
+
+#define to_EUC_KR_E5_B7_infos WORDINDEX2INFO(2362)
+           INVALID,         UNDEF, o2(0xE8,0xE4), o2(0xD8,0xB5),
+     o2(0xE4,0xDC), o2(0xF4,0xB9), o2(0xF1,0xB6), o2(0xE2,0xDE),
+     o2(0xE1,0xB5), o2(0xCD,0xEF), o2(0xF1,0xA7), o2(0xCE,0xE5),
+     o2(0xCB,0xDD), o2(0xD9,0xE3), o2(0xF3,0xAC), o2(0xD0,0xF9),
+     o2(0xEC,0xAB), o2(0xDE,0xD3), o2(0xF7,0xE9), o2(0xF9,0xF5),
+     o2(0xE1,0xDE), o2(0xCB,0xEE),
+
+#define to_EUC_KR_E5_B7 WORDINDEX2INFO(2384)
+    to_EUC_KR_E5_B7_offsets,
+    to_EUC_KR_E5_B7_infos,
+
+#define to_EUC_KR_E5_B8_infos WORDINDEX2INFO(2386)
+           INVALID,         UNDEF, o2(0xE3,0xBC), o2(0xF8,0xD6),
+     o2(0xDB,0xEE), o2(0xFD,0xF1), o2(0xF7,0xB6), o2(0xF4,0xDE),
+     o2(0xF2,0xED), o2(0xDB,0xD9), o2(0xF0,0xA8), o2(0xE1,0xFD),
+     o2(0xDE,0xD4), o2(0xE0,0xAC), o2(0xED,0xE3), o2(0xD3,0xE1),
+     o2(0xDF,0xC8), o2(0xD9,0xB6), o2(0xFD,0xAC),
+
+#define to_EUC_KR_E5_B8 WORDINDEX2INFO(2405)
+    to_EUC_KR_E5_B8_offsets,
+    to_EUC_KR_E5_B8_infos,
+
+#define to_EUC_KR_E5_B9_infos WORDINDEX2INFO(2407)
+           INVALID, o2(0xEF,0xD3),         UNDEF, o2(0xE4,0xC1),
+     o2(0xF8,0xEB), o2(0xDB,0xAC), o2(0xFC,0xC6), o2(0xD8,0xAD),
+     o2(0xF6,0xBA), o2(0xDB,0xDF), o2(0xD3,0xD3), o2(0xF8,0xC7),
+     o2(0xCA,0xCE), o2(0xF8,0xC1), o2(0xD2,0xB4), o2(0xDC,0xB4),
+     o2(0xFA,0xB9), o2(0xCA,0xCF), o2(0xFC,0xB3), o2(0xEA,0xEA),
+     o2(0xEA,0xEB), o2(0xD0,0xFA),
+
+#define to_EUC_KR_E5_B9 WORDINDEX2INFO(2429)
+    to_EUC_KR_E5_B9_offsets,
+    to_EUC_KR_E5_B9_infos,
+
+#define to_EUC_KR_E5_BA_infos WORDINDEX2INFO(2431)
+           INVALID,         UNDEF, o2(0xED,0xE4), o2(0xDD,0xE7),
+     o2(0xDF,0xC9), o2(0xDF,0xED), o2(0xEE,0xBC), o2(0xEF,0xC1),
+     o2(0xCC,0xD2), o2(0xDD,0xA4), o2(0xDF,0xCA), o2(0xD3,0xF8),
+     o2(0xF1,0xA8), o2(0xCD,0xB7), o2(0xEF,0xD4), o2(0xE4,0xDD),
+     o2(0xDF,0xEE), o2(0xCB,0xAC), o2(0xE9,0xBC), o2(0xEA,0xEC),
+
+#define to_EUC_KR_E5_BA WORDINDEX2INFO(2451)
+    to_EUC_KR_E5_BA_offsets,
+    to_EUC_KR_E5_BA_infos,
+
+#define to_EUC_KR_E5_BB_infos WORDINDEX2INFO(2453)
+           INVALID,         UNDEF, o2(0xDF,0xCB), o2(0xF9,0xBF),
+     o2(0xD6,0xAF), o2(0xD5,0xC6), o2(0xCF,0xAA), o2(0xCE,0xA9),
+     o2(0xD6,0xF8), o2(0xF1,0xB7), o2(0xEE,0xF8), o2(0xD9,0xD9),
+     o2(0xF3,0xDF), o2(0xF8,0xC8), o2(0xCE,0xC6), o2(0xD5,0xE6),
+     o2(0xF4,0xE6), o2(0xE6,0xC5), o2(0xEF,0xD5), o2(0xCB,0xEF),
+     o2(0xFC,0xDF),
+
+#define to_EUC_KR_E5_BB WORDINDEX2INFO(2474)
+    to_EUC_KR_E5_BB_offsets,
+    to_EUC_KR_E5_BB_infos,
+
+#define to_EUC_KR_E5_BC_infos WORDINDEX2INFO(2476)
+           INVALID,         UNDEF, o2(0xDC,0xA7), o2(0xD6,0xE7),
+     o2(0xF8,0xC9), o2(0xE3,0xD2), o2(0xE3,0xBD), o2(0xCF,0xE1),
+     o2(0xF0,0xC0), o2(0xEC,0xDA), o2(0xDD,0xD7), o2(0xFB,0xF0),
+     o2(0xEC,0xAC), o2(0xF0,0xA9), o2(0xFA,0xD7), o2(0xFB,0xC1),
+     o2(0xD2,0xC0), o2(0xE5,0xB0), o2(0xED,0xE5), o2(0xCB,0xAD),
+     o2(0xF9,0xB0),
+
+#define to_EUC_KR_E5_BC WORDINDEX2INFO(2497)
+    to_EUC_KR_E5_BC_offsets,
+    to_EUC_KR_E5_BC_infos,
+
+#define to_EUC_KR_E5_BD_infos WORDINDEX2INFO(2499)
+           INVALID,         UNDEF, o2(0xF7,0xA5), o2(0xCB,0xAE),
+     o2(0xDA,0xAF), o2(0xD8,0xB6), o2(0xD3,0xA7), o2(0xFB,0xB2),
+     o2(0xFD,0xC4), o2(0xEC,0xAD), o2(0xFB,0xA1), o2(0xE5,0xE9),
+     o2(0xE9,0xEE), o2(0xF3,0xF4), o2(0xF8,0xF3), o2(0xF0,0xC1),
+     o2(0xDE,0xAF), o2(0xF8,0xB0), o2(0xF3,0xE0), o2(0xE7,0xAF),
+     o2(0xDB,0xAD), o2(0xE6,0xB5), o2(0xF9,0xA8), o2(0xDD,0xD8),
+
+#define to_EUC_KR_E5_BD WORDINDEX2INFO(2523)
+    to_EUC_KR_E5_BD_offsets,
+    to_EUC_KR_E5_BD_infos,
+
+#define to_EUC_KR_E5_BE_infos WORDINDEX2INFO(2525)
+           INVALID, o2(0xE8,0xD9), o2(0xEF,0xD6),         UNDEF,
+     o2(0xD3,0xE2), o2(0xE2,0xDF), o2(0xFC,0xE0), o2(0xD7,0xC8),
+     o2(0xFD,0xAD), o2(0xDF,0xEF), o2(0xCC,0xD3), o2(0xD3,0xF9),
+     o2(0xD4,0xF0), o2(0xDB,0xC7), o2(0xDE,0xD5), o2(0xF0,0xF4),
+     o2(0xD5,0xD0), o2(0xE5,0xD9), o2(0xFC,0xC7), o2(0xDC,0xD6),
+     o2(0xE2,0xE0), o2(0xDA,0xB0), o2(0xF3,0xA3), o2(0xD3,0xEC),
+     o2(0xF4,0xCB), o2(0xFD,0xC5),
+
+#define to_EUC_KR_E5_BE WORDINDEX2INFO(2551)
+    to_EUC_KR_E5_BE_offsets,
+    to_EUC_KR_E5_BE_infos,
+
+#define to_EUC_KR_E5_BF_infos WORDINDEX2INFO(2553)
+           INVALID,         UNDEF, o2(0xE3,0xFD), o2(0xF9,0xB1),
+     o2(0xD0,0xFB), o2(0xEC,0xDB), o2(0xF5,0xBC), o2(0xF2,0xA4),
+     o2(0xD8,0xCE), o2(0xD8,0xCF), o2(0xF5,0xF7), o2(0xF6,0xE1),
+     o2(0xD2,0xB7), o2(0xFB,0xEC), o2(0xDD,0xC8),
+
+#define to_EUC_KR_E5_BF WORDINDEX2INFO(2568)
+    to_EUC_KR_E5_BF_offsets,
+    to_EUC_KR_E5_BF_infos,
+
+#define to_EUC_KR_E5_infos WORDINDEX2INFO(2570)
+             INVALID, to_EUC_KR_E5_80, to_EUC_KR_E5_81, to_EUC_KR_E5_82,
+     to_EUC_KR_E5_83, to_EUC_KR_E5_84, to_EUC_KR_E5_85, to_EUC_KR_E5_86,
+     to_EUC_KR_E5_87, to_EUC_KR_E5_88, to_EUC_KR_E5_89, to_EUC_KR_E5_8A,
+     to_EUC_KR_E5_8B, to_EUC_KR_E5_8C, to_EUC_KR_E5_8D, to_EUC_KR_E5_8E,
+     to_EUC_KR_E5_8F, to_EUC_KR_E5_90, to_EUC_KR_E5_91, to_EUC_KR_E5_92,
+     to_EUC_KR_E5_93, to_EUC_KR_E5_94, to_EUC_KR_E5_95, to_EUC_KR_E5_96,
+     to_EUC_KR_E5_97, to_EUC_KR_E5_98, to_EUC_KR_E5_99, to_EUC_KR_E5_9A,
+     to_EUC_KR_E5_9B, to_EUC_KR_E5_9C, to_EUC_KR_E5_9D, to_EUC_KR_E5_9E,
+     to_EUC_KR_E5_9F, to_EUC_KR_E5_A0, to_EUC_KR_E5_A1, to_EUC_KR_E5_A2,
+     to_EUC_KR_E5_A3, to_EUC_KR_E5_A4, to_EUC_KR_E5_A5, to_EUC_KR_E5_A6,
+     to_EUC_KR_E5_A7, to_EUC_KR_E5_A8, to_EUC_KR_E5_A9, to_EUC_KR_E5_AA,
+     to_EUC_KR_E5_AB, to_EUC_KR_E5_AC, to_EUC_KR_E5_AD, to_EUC_KR_E5_AE,
+     to_EUC_KR_E5_AF, to_EUC_KR_E5_B0, to_EUC_KR_E5_B1, to_EUC_KR_E5_B2,
+     to_EUC_KR_E5_B3, to_EUC_KR_E5_B4, to_EUC_KR_E5_B5, to_EUC_KR_E5_B6,
+     to_EUC_KR_E5_B7, to_EUC_KR_E5_B8, to_EUC_KR_E5_B9, to_EUC_KR_E5_BA,
+     to_EUC_KR_E5_BB, to_EUC_KR_E5_BC, to_EUC_KR_E5_BD, to_EUC_KR_E5_BE,
+     to_EUC_KR_E5_BF,
+
+#define to_EUC_KR_E5 WORDINDEX2INFO(2635)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E5_infos,
+
+#define to_EUC_KR_E6_80_infos WORDINDEX2INFO(2637)
+           INVALID,         UNDEF, o2(0xE4,0xE8), o2(0xD2,0xC1),
+     o2(0xF8,0xD7), o2(0xD6,0xBB), o2(0xDE,0xD6), o2(0xF7,0xBD),
+     o2(0xEC,0xAE), o2(0xD0,0xE1), o2(0xE0,0xF5), o2(0xEA,0xB3),
+     o2(0xCE,0xD6), o2(0xCC,0xA5),
+
+#define to_EUC_KR_E6_80 WORDINDEX2INFO(2651)
+    to_EUC_KR_E6_80_offsets,
+    to_EUC_KR_E6_80_infos,
+
+#define to_EUC_KR_E6_81_infos WORDINDEX2INFO(2653)
+           INVALID,         UNDEF, o2(0xEC,0xF6), o2(0xE2,0xE1),
+     o2(0xE3,0xBE), o2(0xFC,0xC8), o2(0xCD,0xF0), o2(0xF9,0xF6),
+     o2(0xDF,0xF0), o2(0xE5,0xBF), o2(0xCE,0xBF), o2(0xFC,0xE1),
+     o2(0xED,0xB0), o2(0xFD,0xD1), o2(0xF6,0xBB), o2(0xF9,0xCF),
+     o2(0xEB,0xDA), o2(0xCA,0xC1), o2(0xD2,0xB8), o2(0xCD,0xF1),
+     o2(0xE3,0xD3), o2(0xFD,0xE6),
+
+#define to_EUC_KR_E6_81 WORDINDEX2INFO(2675)
+    to_EUC_KR_E6_81_offsets,
+    to_EUC_KR_E6_81_infos,
+
+#define to_EUC_KR_E6_82_infos WORDINDEX2INFO(2677)
+           INVALID,         UNDEF, o2(0xE6,0xED), o2(0xE3,0xFA),
+     o2(0xF0,0xAA), o2(0xF9,0xD0), o2(0xFC,0xE2), o2(0xF8,0xA7),
+     o2(0xE1,0xE5), o2(0xEE,0xF9), o2(0xE7,0xF6), o2(0xEA,0xED),
+     o2(0xFC,0xB4), o2(0xF5,0xC2), o2(0xD7,0xDC), o2(0xF0,0xF5),
+     o2(0xDD,0xE8), o2(0xD3,0xED), o2(0xF5,0xFC), o2(0xDA,0xBF),
+     o2(0xCC,0xFB), o2(0xD3,0xFA), o2(0xF4,0xA4),
+
+#define to_EUC_KR_E6_82 WORDINDEX2INFO(2700)
+    to_EUC_KR_E6_82_offsets,
+    to_EUC_KR_E6_82_infos,
+
+#define to_EUC_KR_E6_83_infos WORDINDEX2INFO(2702)
+           INVALID,         UNDEF, o2(0xEF,0xD7), o2(0xD4,0xC3),
+     o2(0xFB,0xE3), o2(0xFB,0xED), o2(0xE0,0xAD), o2(0xEA,0xEE),
+     o2(0xFB,0xB3), o2(0xE4,0xC2), o2(0xF6,0xE7), o2(0xD2,0xDD),
+     o2(0xDF,0xCC), o2(0xFC,0xC9), o2(0xE5,0xA9), o2(0xE0,0xF6),
+     o2(0xF6,0xB3),
+
+#define to_EUC_KR_E6_83 WORDINDEX2INFO(2719)
+    to_EUC_KR_E6_83_offsets,
+    to_EUC_KR_E6_83_infos,
+
+#define to_EUC_KR_E6_84_infos WORDINDEX2INFO(2721)
+           INVALID,         UNDEF, o2(0xE1,0xFE), o2(0xCB,0xF0),
+     o2(0xEA,0xEF), o2(0xEA,0xF0), o2(0xDA,0xC0), o2(0xF8,0xB4),
+     o2(0xEB,0xF2), o2(0xE4,0xC3), o2(0xE9,0xD7), o2(0xE4,0xF1),
+     o2(0xCA,0xEF), o2(0xCE,0xD7), o2(0xFC,0xCA), o2(0xF3,0xE1),
+     o2(0xCB,0xC4), o2(0xE3,0xE5), o2(0xCB,0xC5), o2(0xEA,0xB4),
+
+#define to_EUC_KR_E6_84 WORDINDEX2INFO(2741)
+    to_EUC_KR_E6_84_offsets,
+    to_EUC_KR_E6_84_infos,
+
+#define to_EUC_KR_E6_85_infos WORDINDEX2INFO(2743)
+           INVALID,         UNDEF, o2(0xE9,0xBD), o2(0xD7,0xC9),
+     o2(0xEB,0xDB), o2(0xED,0xB1), o2(0xCC,0xC3), o2(0xF7,0xBE),
+     o2(0xFC,0xCB), o2(0xF8,0xF4), o2(0xD9,0xB7), o2(0xF3,0xD3),
+     o2(0xF3,0xD4), o2(0xF7,0xE4), o2(0xF7,0xD1), o2(0xD8,0xB7),
+     o2(0xCE,0xB1), o2(0xCA,0xC2), o2(0xFB,0xB4), o2(0xCB,0xC6),
+     o2(0xF0,0xF6), o2(0xD5,0xE7), o2(0xEA,0xD0), o2(0xCC,0xD4),
+     o2(0xCB,0xAF), o2(0xF4,0xAA), o2(0xE9,0xAF),
+
+#define to_EUC_KR_E6_85 WORDINDEX2INFO(2770)
+    to_EUC_KR_E6_85_offsets,
+    to_EUC_KR_E6_85_infos,
+
+#define to_EUC_KR_E6_86_infos WORDINDEX2INFO(2772)
+           INVALID,         UNDEF, o2(0xF5,0xC3), o2(0xE9,0xD8),
+     o2(0xDD,0xE9), o2(0xF1,0xF3), o2(0xD5,0xFB), o2(0xDE,0xBB),
+     o2(0xF4,0xFB), o2(0xFD,0xF3), o2(0xFD,0xF2), o2(0xF7,0xA6),
+     o2(0xDD,0xC9), o2(0xD4,0xD3), o2(0xCC,0xA8), o2(0xDA,0xC1),
+     o2(0xCC,0xD5), o2(0xD9,0xE4), o2(0xFA,0xCA), o2(0xE5,0xE3),
+     o2(0xD3,0xBC), o2(0xCA,0xF0),
+
+#define to_EUC_KR_E6_86 WORDINDEX2INFO(2794)
+    to_EUC_KR_E6_86_offsets,
+    to_EUC_KR_E6_86_infos,
+
+#define to_EUC_KR_E6_87_infos WORDINDEX2INFO(2796)
+           INVALID,         UNDEF, o2(0xD0,0xC4), o2(0xCA,0xD0),
+     o2(0xFA,0xAB), o2(0xEB,0xEB), o2(0xE7,0xF8), o2(0xD9,0xE5),
+     o2(0xD1,0xD7), o2(0xF3,0xA4), o2(0xD4,0xFB), o2(0xFC,0xE3),
+     o2(0xFA,0xD8), o2(0xF3,0xD5), o2(0xCF,0xAB), o2(0xEB,0xF3),
+
+#define to_EUC_KR_E6_87 WORDINDEX2INFO(2812)
+    to_EUC_KR_E6_87_offsets,
+    to_EUC_KR_E6_87_infos,
+
+#define to_EUC_KR_E6_88_infos WORDINDEX2INFO(2814)
+           INVALID, o2(0xD5,0xFC),         UNDEF, o2(0xD3,0xD4),
+     o2(0xCD,0xFC), o2(0xD9,0xE6), o2(0xE2,0xF9), o2(0xE2,0xA1),
+     o2(0xEB,0xD4), o2(0xE0,0xF7), o2(0xE4,0xB2), o2(0xCC,0xFC),
+     o2(0xFB,0xE4), o2(0xF4,0xAB), o2(0xD0,0xBD), o2(0xCA,0xF1),
+     o2(0xEF,0xB8), o2(0xD7,0xC0), o2(0xEE,0xFA), o2(0xFD,0xF4),
+     o2(0xD3,0xE3), o2(0xFB,0xC2), o2(0xD5,0xE8), o2(0xDB,0xAE),
+
+#define to_EUC_KR_E6_88 WORDINDEX2INFO(2838)
+    to_EUC_KR_E6_88_offsets,
+    to_EUC_KR_E6_88_infos,
+
+#define to_EUC_KR_E6_89_infos WORDINDEX2INFO(2840)
+           INVALID, o2(0xE1,0xB6), o2(0xF8,0xB7),         UNDEF,
+     o2(0xE0,0xBF), o2(0xFB,0xC3), o2(0xDD,0xEA), o2(0xE2,0xA2),
+     o2(0xEE,0xA6), o2(0xF6,0xE8), o2(0xF6,0xF5), o2(0xDD,0xCA),
+     o2(0xD0,0xE2), o2(0xDD,0xA6), o2(0xDD,0xEB), o2(0xE4,0xF9),
+     o2(0xE3,0xAF),
+
+#define to_EUC_KR_E6_89 WORDINDEX2INFO(2857)
+    to_EUC_KR_E6_89_offsets,
+    to_EUC_KR_E6_89_infos,
+
+#define to_EUC_KR_E6_8A_infos WORDINDEX2INFO(2859)
+           INVALID, o2(0xD0,0xFC),         UNDEF, o2(0xF4,0xFC),
+     o2(0xCC,0xBC), o2(0xF7,0xEA), o2(0xE5,0xE4), o2(0xDF,0xF1),
+     o2(0xF7,0xE1), o2(0xF9,0xF7), o2(0xEF,0xB9), o2(0xF8,0xD8),
+     o2(0xF9,0xA9), o2(0xF8,0xD9), o2(0xEE,0xBD), o2(0xD8,0xC6),
+     o2(0xE4,0xE3), o2(0xF5,0xCE),
+
+#define to_EUC_KR_E6_8A WORDINDEX2INFO(2877)
+    to_EUC_KR_E6_8A_offsets,
+    to_EUC_KR_E6_8A_infos,
+
+#define to_EUC_KR_E6_8B_infos WORDINDEX2INFO(2879)
+           INVALID,         UNDEF, o2(0xDD,0xD9), o2(0xD9,0xE7),
+     o2(0xD2,0xB9), o2(0xD5,0xC3), o2(0xDA,0xE5), o2(0xDA,0xD0),
+     o2(0xD1,0xD9), o2(0xCE,0xD8), o2(0xCB,0xDE), o2(0xF4,0xAC),
+     o2(0xDA,0xFB), o2(0xF6,0xE9), o2(0xE8,0xF3), o2(0xCF,0xAC),
+     o2(0xF0,0xF0), o2(0xF4,0xFD), o2(0xDB,0xC8), o2(0xCE,0xC0),
+     o2(0xE3,0xD4), o2(0xD1,0xCF), o2(0xF1,0xF5), o2(0xCD,0xF2),
+     o2(0xCF,0xEB), o2(0xCD,0xB8), o2(0xE3,0xA6), o2(0xD1,0xDA),
+
+#define to_EUC_KR_E6_8B WORDINDEX2INFO(2907)
+    to_EUC_KR_E6_8B_offsets,
+    to_EUC_KR_E6_8B_infos,
+
+#define to_EUC_KR_E6_8C_infos WORDINDEX2INFO(2909)
+           INVALID,         UNDEF, o2(0xF2,0xA5), o2(0xF2,0xA6),
+     o2(0xE4,0xCE), o2(0xD3,0xFB), o2(0xF1,0xA9), o2(0xF2,0xC9),
+     o2(0xEF,0xD8), o2(0xE6,0xC9), o2(0xD8,0xB8), o2(0xFA,0xF3),
+
+#define to_EUC_KR_E6_8C WORDINDEX2INFO(2921)
+    to_EUC_KR_E6_8C_offsets,
+    to_EUC_KR_E6_8C_infos,
+
+#define to_EUC_KR_E6_8D_infos WORDINDEX2INFO(2923)
+           INVALID,         UNDEF, o2(0xF3,0xB5), o2(0xF8,0xA4),
+     o2(0xD1,0xF3), o2(0xE6,0xC8), o2(0xF8,0xDA), o2(0xDC,0xE9),
+     o2(0xDE,0xD7), o2(0xCB,0xDF), o2(0xCF,0xEC), o2(0xF4,0xDF),
+     o2(0xD1,0xF4), o2(0xD2,0xBA), o2(0xDF,0xF2),
+
+#define to_EUC_KR_E6_8D WORDINDEX2INFO(2938)
+    to_EUC_KR_E6_8D_offsets,
+    to_EUC_KR_E6_8D_infos,
+
+#define to_EUC_KR_E6_8E_infos WORDINDEX2INFO(2940)
+           INVALID,         UNDEF, o2(0xE1,0xB7), o2(0xE2,0xA3),
+     o2(0xD3,0xFC), o2(0xED,0xE6), o2(0xDB,0xC9), o2(0xE4,0xFA),
+     o2(0xCF,0xDE), o2(0xCE,0xD0), o2(0xD5,0xD3), o2(0xF3,0xF5),
+     o2(0xF7,0xAE), o2(0xEF,0xC8), o2(0xCD,0xF3), o2(0xF5,0xCF),
+     o2(0xE5,0xF3), o2(0xF0,0xC2),
+
+#define to_EUC_KR_E6_8E WORDINDEX2INFO(2958)
+    to_EUC_KR_E6_8E_offsets,
+    to_EUC_KR_E6_8E_infos,
+
+#define to_EUC_KR_E6_8F_infos WORDINDEX2INFO(2960)
+           INVALID, o2(0xCA,0xD1),         UNDEF, o2(0xEA,0xF1),
+     o2(0xD0,0xA6), o2(0xD9,0xDA), o2(0xF0,0xAB), o2(0xEB,0xE7),
+     o2(0xE5,0xC0), o2(0xFC,0xB5), o2(0xE4,0xC4), o2(0xCC,0xA9),
+     o2(0xFD,0xC6), o2(0xEA,0xB5), o2(0xE5,0xAA), o2(0xDF,0xBA),
+
+#define to_EUC_KR_E6_8F WORDINDEX2INFO(2976)
+    to_EUC_KR_E6_8F_offsets,
+    to_EUC_KR_E6_8F_infos,
+
+#define to_EUC_KR_E6_90_infos WORDINDEX2INFO(2978)
+           INVALID,         UNDEF, o2(0xE1,0xDF), o2(0xDA,0xD1),
+     o2(0xE1,0xB8), o2(0xE8,0xF4), o2(0xD3,0xFD), o2(0xE2,0xA4),
+     o2(0xF2,0xCA), o2(0xDA,0xE6), o2(0xF7,0xB3), o2(0xFD,0xCD),
+     o2(0xF3,0xB6),
+
+#define to_EUC_KR_E6_90 WORDINDEX2INFO(2991)
+    to_EUC_KR_E6_90_offsets,
+    to_EUC_KR_E6_90_infos,
+
+#define to_EUC_KR_E6_91_infos WORDINDEX2INFO(2993)
+           INVALID,         UNDEF, o2(0xEE,0xD7), o2(0xF5,0xC4),
+     o2(0xD8,0xA4), o2(0xF2,0xA7), o2(0xD9,0xB8), o2(0xD9,0xB9),
+     o2(0xEF,0xC9),
+
+#define to_EUC_KR_E6_91 WORDINDEX2INFO(3002)
+    to_EUC_KR_E6_91_offsets,
+    to_EUC_KR_E6_91_infos,
+
+#define to_EUC_KR_E6_92_infos WORDINDEX2INFO(3004)
+           INVALID,         UNDEF, o2(0xD6,0xCE), o2(0xF7,0xCB),
+     o2(0xDF,0xAE), o2(0xE8,0xF5), o2(0xD2,0xB5), o2(0xD3,0xD5),
+     o2(0xF4,0xCC), o2(0xDA,0xFC), o2(0xD9,0xE8), o2(0xF7,0xEB),
+     o2(0xF5,0xC9), o2(0xF3,0xBC), o2(0xDA,0xD2), o2(0xD3,0xB5),
+
+#define to_EUC_KR_E6_92 WORDINDEX2INFO(3020)
+    to_EUC_KR_E6_92_offsets,
+    to_EUC_KR_E6_92_infos,
+
+#define to_EUC_KR_E6_93_infos WORDINDEX2INFO(3022)
+           INVALID,         UNDEF, o2(0xE8,0xB6), o2(0xD6,0xCF),
+     o2(0xF4,0xBA), o2(0xF7,0xC9), o2(0xCC,0xAA), o2(0xF0,0xC3),
+     o2(0xCC,0xD6), o2(0xD0,0xD3), o2(0xD3,0xBD), o2(0xDB,0xFB),
+     o2(0xCB,0xE0), o2(0xD3,0xE4), o2(0xF6,0xF7), o2(0xD5,0xBA),
+     o2(0xF3,0xCD), o2(0xCB,0xE1), o2(0xEB,0xF4), o2(0xF4,0xAD),
+     o2(0xFC,0xAA), o2(0xF7,0xEC), o2(0xE8,0xF6),
+
+#define to_EUC_KR_E6_93 WORDINDEX2INFO(3045)
+    to_EUC_KR_E6_93_offsets,
+    to_EUC_KR_E6_93_infos,
+
+#define to_EUC_KR_E6_94_infos WORDINDEX2INFO(3047)
+           INVALID, o2(0xDA,0xE7),         UNDEF, o2(0xF7,0xCC),
+     o2(0xE5,0xC1), o2(0xE0,0xEE), o2(0xD5,0xFD), o2(0xCE,0xE6),
+     o2(0xFC,0xAB), o2(0xD5,0xBB), o2(0xF2,0xA8), o2(0xE2,0xA5),
+     o2(0xCD,0xB9), o2(0xEA,0xF2), o2(0xCB,0xC7), o2(0xCD,0xF4),
+     o2(0xDB,0xAF), o2(0xEF,0xD9),
+
+#define to_EUC_KR_E6_94 WORDINDEX2INFO(3065)
+    to_EUC_KR_E6_94_offsets,
+    to_EUC_KR_E6_94_infos,
+
+#define to_EUC_KR_E6_95_infos WORDINDEX2INFO(3067)
+           INVALID,         UNDEF, o2(0xCD,0xBA), o2(0xFC,0xF9),
+     o2(0xDF,0xF3), o2(0xCE,0xE7), o2(0xDA,0xC2), o2(0xCF,0xAD),
+     o2(0xE7,0xF9), o2(0xF8,0xA8), o2(0xF3,0xE2), o2(0xCA,0xF2),
+     o2(0xDF,0xA4), o2(0xD4,0xC4), o2(0xCC,0xD7), o2(0xE5,0xC2),
+     o2(0xCD,0xBB), o2(0xEF,0xDA), o2(0xEE,0xD8), o2(0xDD,0xA7),
+     o2(0xE2,0xA6), o2(0xE0,0xC0),
+
+#define to_EUC_KR_E6_95 WORDINDEX2INFO(3089)
+    to_EUC_KR_E6_95_offsets,
+    to_EUC_KR_E6_95_infos,
+
+#define to_EUC_KR_E6_96_infos WORDINDEX2INFO(3091)
+           INVALID,         UNDEF, o2(0xD6,0xB0), o2(0xF8,0xCA),
+     o2(0xFC,0xFA), o2(0xD9,0xFE), o2(0xDE,0xB0), o2(0xDD,0xEC),
+     o2(0xDA,0xE8), o2(0xD4,0xE0), o2(0xD6,0xF9), o2(0xCD,0xD7),
+     o2(0xDE,0xD8), o2(0xF2,0xF8), o2(0xE4,0xD6), o2(0xD0,0xC5),
+     o2(0xF4,0xAE), o2(0xDD,0xA8), o2(0xED,0xC5), o2(0xF3,0xD6),
+     o2(0xDE,0xD9), o2(0xE3,0xE6), o2(0xD3,0xA8), o2(0xDB,0xB0),
+     o2(0xE5,0xDA), o2(0xE3,0xBF),
+
+#define to_EUC_KR_E6_96 WORDINDEX2INFO(3117)
+    to_EUC_KR_E6_96_offsets,
+    to_EUC_KR_E6_96_infos,
+
+#define to_EUC_KR_E6_97_infos WORDINDEX2INFO(3119)
+           INVALID,         UNDEF, o2(0xDB,0xB1), o2(0xD5,0xE9),
+     o2(0xE0,0xC1), o2(0xEF,0xDB), o2(0xF0,0xE9), o2(0xD7,0xB2),
+     o2(0xD0,0xFD), o2(0xD9,0xE9), o2(0xD0,0xFE), o2(0xEC,0xED),
+     o2(0xD3,0xA9), o2(0xF2,0xA9), o2(0xF0,0xC4), o2(0xE2,0xE2),
+     o2(0xE9,0xEF), o2(0xF9,0xD1), o2(0xE9,0xD9), o2(0xE8,0xDA),
+     o2(0xDA,0xC3), o2(0xDA,0xC4), o2(0xD4,0xC5), o2(0xE7,0xFA),
+
+#define to_EUC_KR_E6_97 WORDINDEX2INFO(3143)
+    to_EUC_KR_E6_97_offsets,
+    to_EUC_KR_E6_97_infos,
+
+#define to_EUC_KR_E6_98_infos WORDINDEX2INFO(3145)
+           INVALID,         UNDEF, o2(0xCD,0xE0), o2(0xE3,0xB0),
+     o2(0xDB,0xB2), o2(0xFB,0xC4), o2(0xF3,0xE3), o2(0xD9,0xA5),
+     o2(0xFB,0xE7), o2(0xDD,0xCB), o2(0xD0,0xD4), o2(0xE6,0xB6),
+     o2(0xE0,0xAE), o2(0xFD,0xDA), o2(0xDC,0xB5), o2(0xE0,0xF8),
+     o2(0xE7,0xB1), o2(0xF5,0xF0), o2(0xD8,0xDC), o2(0xED,0xC6),
+     o2(0xE1,0xB9), o2(0xE3,0xC0), o2(0xF9,0xC0), o2(0xE9,0xF0),
+     o2(0xD9,0xDB), o2(0xF3,0xE4), o2(0xDC,0xB6), o2(0xE4,0xE9),
+
+#define to_EUC_KR_E6_98 WORDINDEX2INFO(3173)
+    to_EUC_KR_E6_98_offsets,
+    to_EUC_KR_E6_98_infos,
+
+#define to_EUC_KR_E6_99_infos WORDINDEX2INFO(3175)
+           INVALID,         UNDEF, o2(0xF0,0xC5), o2(0xE3,0xC1),
+     o2(0xFC,0xCC), o2(0xFC,0xCD), o2(0xF2,0xCB), o2(0xF2,0xCC),
+     o2(0xE4,0xCF), o2(0xF1,0xDB), o2(0xFA,0xD9), o2(0xF1,0xB8),
+     o2(0xFD,0xF5), o2(0xE0,0xF9), o2(0xE7,0xFB), o2(0xFC,0xB7),
+     o2(0xFC,0xE4), o2(0xFB,0xC5), o2(0xE3,0xE7), o2(0xD8,0xB9),
+     o2(0xF6,0xF8), o2(0xDC,0xC5), o2(0xCC,0xD8), o2(0xE0,0xAF),
+     o2(0xF4,0xE7), o2(0xEF,0xDC), o2(0xCF,0xFC), o2(0xEF,0xDD),
+     o2(0xF2,0xAA),
+
+#define to_EUC_KR_E6_99 WORDINDEX2INFO(3204)
+    to_EUC_KR_E6_99_offsets,
+    to_EUC_KR_E6_99_infos,
+
+#define to_EUC_KR_E6_9A_infos WORDINDEX2INFO(3206)
+           INVALID,         UNDEF, o2(0xFD,0xBE), o2(0xCA,0xAC),
+     o2(0xFD,0xBB), o2(0xFD,0xC7), o2(0xE7,0xB2), o2(0xEA,0xD1),
+     o2(0xDF,0xF4), o2(0xD1,0xEC), o2(0xE4,0xDE), o2(0xE5,0xC3),
+     o2(0xD9,0xA6), o2(0xCD,0xBC), o2(0xF3,0xE5), o2(0xED,0xD5),
+     o2(0xD9,0xBA), o2(0xED,0xE7), o2(0xFB,0xB5), o2(0xF8,0xEC),
+     o2(0xE0,0xE7), o2(0xCC,0xD9), o2(0xD4,0xC6),
+
+#define to_EUC_KR_E6_9A WORDINDEX2INFO(3229)
+    to_EUC_KR_E6_9A_offsets,
+    to_EUC_KR_E6_9A_infos,
+
+#define to_EUC_KR_E6_9B_infos WORDINDEX2INFO(3231)
+           INVALID,         UNDEF, o2(0xE7,0xA5), o2(0xD5,0xF5),
+     o2(0xD3,0xBE), o2(0xFC,0xFB), o2(0xE4,0xF2), o2(0xDF,0xF5),
+     o2(0xE8,0xF8), o2(0xF8,0xED), o2(0xCE,0xC7), o2(0xFD,0xF6),
+     o2(0xE8,0xD8), o2(0xCD,0xD8), o2(0xE7,0xD6), o2(0xCC,0xDA),
+     o2(0xCA,0xE3), o2(0xDF,0xF6), o2(0xF0,0xC7), o2(0xF0,0xC6),
+     o2(0xD8,0xBA), o2(0xF1,0xF4), o2(0xF4,0xF0),
+
+#define to_EUC_KR_E6_9B WORDINDEX2INFO(3254)
+    to_EUC_KR_E6_9B_offsets,
+    to_EUC_KR_E6_9B_infos,
+
+#define to_EUC_KR_E6_9C_infos WORDINDEX2INFO(3256)
+           INVALID, o2(0xF5,0xCC),         UNDEF, o2(0xFC,0xE5),
+     o2(0xEA,0xC5), o2(0xEA,0xF3), o2(0xDD,0xDB), o2(0xDC,0xD7),
+     o2(0xDE,0xFD), o2(0xF2,0xF9), o2(0xD5,0xC7), o2(0xD8,0xD0),
+     o2(0xF0,0xC8), o2(0xD1,0xA1), o2(0xD1,0xA2), o2(0xD9,0xD4),
+     o2(0xD6,0xE8), o2(0xD9,0xCA), o2(0xDA,0xB1), o2(0xD8,0xC7),
+     o2(0xDC,0xE2), o2(0xF3,0xCE), o2(0xF5,0xF4), o2(0xF1,0xB9),
+     o2(0xDA,0xD3), o2(0xF6,0xEA), o2(0xCF,0xF5), o2(0xFD,0xAE),
+
+#define to_EUC_KR_E6_9C WORDINDEX2INFO(3284)
+    to_EUC_KR_E6_9C_offsets,
+    to_EUC_KR_E6_9C_infos,
+
+#define to_EUC_KR_E6_9D_infos WORDINDEX2INFO(3286)
+           INVALID,         UNDEF, o2(0xCA,0xD2), o2(0xDF,0xB4),
+     o2(0xD7,0xDD), o2(0xFA,0xBA), o2(0xEE,0xA7), o2(0xF5,0xBD),
+     o2(0xF8,0xF5), o2(0xED,0xE8), o2(0xD4,0xE1), o2(0xD1,0xA3),
+     o2(0xE1,0xD6), o2(0xF9,0xF8), o2(0xDB,0xCA), o2(0xCB,0xF9),
+     o2(0xD4,0xD4), o2(0xD9,0xDC), o2(0xEE,0xBE), o2(0xF7,0xED),
+     o2(0xD2,0xEE), o2(0xE1,0xE6), o2(0xF7,0xF9),
+
+#define to_EUC_KR_E6_9D WORDINDEX2INFO(3309)
+    to_EUC_KR_E6_9D_offsets,
+    to_EUC_KR_E6_9D_infos,
+
+#define to_EUC_KR_E6_9E_infos WORDINDEX2INFO(3311)
+           INVALID,         UNDEF, o2(0xDD,0xED), o2(0xE8,0xDB),
+     o2(0xDB,0xB3), o2(0xD1,0xF7), o2(0xE0,0xB0), o2(0xD4,0xE2),
+     o2(0xF6,0xD7), o2(0xD7,0xF9), o2(0xD8,0xDD), o2(0xCD,0xFD),
+     o2(0xF2,0xAB), o2(0xCD,0xBD), o2(0xF8,0xC2), o2(0xF2,0xAC),
+     o2(0xCA,0xAD), o2(0xCA,0xAE), o2(0xCF,0xAE), o2(0xE3,0xC2),
+
+#define to_EUC_KR_E6_9E WORDINDEX2INFO(3331)
+    to_EUC_KR_E6_9E_offsets,
+    to_EUC_KR_E6_9E_infos,
+
+#define to_EUC_KR_E6_9F_infos WORDINDEX2INFO(3333)
+           INVALID,         UNDEF, o2(0xDC,0xB7), o2(0xDB,0xDA),
+     o2(0xD9,0xBB), o2(0xCA,0xF3), o2(0xF6,0xD3), o2(0xE6,0xF8),
+     o2(0xEA,0xF5), o2(0xEA,0xF6), o2(0xF6,0xF9), o2(0xCF,0xAF),
+     o2(0xCA,0xD3), o2(0xCA,0xAF), o2(0xD2,0xB0), o2(0xF1,0xBA),
+     o2(0xD7,0xB3), o2(0xE3,0xC3), o2(0xF3,0xFD), o2(0xDE,0xDA),
+     o2(0xDE,0xDB), o2(0xEF,0xDE),
+
+#define to_EUC_KR_E6_9F WORDINDEX2INFO(3355)
+    to_EUC_KR_E6_9F_offsets,
+    to_EUC_KR_E6_9F_infos,
+
+#define to_EUC_KR_E6_A0_infos WORDINDEX2INFO(3357)
+           INVALID,         UNDEF, o2(0xE2,0xE3), o2(0xEE,0xFB),
+     o2(0xDF,0xF7), o2(0xD7,0xCA), o2(0xCE,0xE8), o2(0xDB,0xDB),
+     o2(0xF1,0xBB), o2(0xE9,0xF1), o2(0xFA,0xB7), o2(0xD0,0xC6),
+     o2(0xCC,0xAB), o2(0xEE,0xA8),
+
+#define to_EUC_KR_E6_A0 WORDINDEX2INFO(3371)
+    to_EUC_KR_E6_A0_offsets,
+    to_EUC_KR_E6_A0_infos,
+
+#define to_EUC_KR_E6_A1_infos WORDINDEX2INFO(3373)
+           INVALID, o2(0xCB,0xFA), o2(0xF9,0xF9), o2(0xCC,0xFD),
+     o2(0xD3,0xFE),         UNDEF, o2(0xE4,0xD0), o2(0xF2,0xEE),
+     o2(0xD4,0xD5), o2(0xDF,0xCD), o2(0xFC,0xB8), o2(0xD1,0xD0),
+     o2(0xF2,0xCD), o2(0xF7,0xD2), o2(0xCA,0xD4),
+
+#define to_EUC_KR_E6_A1 WORDINDEX2INFO(3388)
+    to_EUC_KR_E6_A1_offsets,
+    to_EUC_KR_E6_A1_infos,
+
+#define to_EUC_KR_E6_A2_infos WORDINDEX2INFO(3390)
+           INVALID,         UNDEF, o2(0xD5,0xD9), o2(0xD8,0xDE),
+     o2(0xCD,0xD9), o2(0xEE,0xA9), o2(0xF6,0xBC), o2(0xCC,0xDB),
+     o2(0xF0,0xC9), o2(0xFC,0xFC), o2(0xE8,0xC9), o2(0xF4,0xFE),
+     o2(0xE7,0xFC), o2(0xD7,0xDE), o2(0xDE,0xDC), o2(0xF0,0xAC),
+     o2(0xCC,0xFE), o2(0xCD,0xE1), o2(0xE1,0xBA), o2(0xDB,0xEF),
+     o2(0xDA,0xB2),
+
+#define to_EUC_KR_E6_A2 WORDINDEX2INFO(3411)
+    to_EUC_KR_E6_A2_offsets,
+    to_EUC_KR_E6_A2_infos,
+
+#define to_EUC_KR_E6_A3_infos WORDINDEX2INFO(3413)
+           INVALID,         UNDEF, o2(0xD1,0xA5), o2(0xDC,0xB8),
+     o2(0xD8,0xF6), o2(0xD1,0xA4), o2(0xCD,0xE2), o2(0xDC,0xEA),
+     o2(0xF0,0xF7), o2(0xF0,0xCA), o2(0xD0,0xBE), o2(0xDD,0xDC),
+     o2(0xD4,0xD6), o2(0xD3,0xD6), o2(0xED,0xD0), o2(0xCD,0xA1),
+     o2(0xDF,0xB5), o2(0xDF,0xF8), o2(0xD4,0xA1), o2(0xCE,0xB2),
+
+#define to_EUC_KR_E6_A3 WORDINDEX2INFO(3433)
+    to_EUC_KR_E6_A3_offsets,
+    to_EUC_KR_E6_A3_infos,
+
+#define to_EUC_KR_E6_A4_infos WORDINDEX2INFO(3435)
+           INVALID, o2(0xE8,0xCA),         UNDEF, o2(0xEB,0xF5),
+     o2(0xE3,0xD5), o2(0xF5,0xD0), o2(0xF5,0xA1), o2(0xD9,0xA7),
+     o2(0xE5,0xAB), o2(0xE6,0xCB), o2(0xF5,0xF1),
+
+#define to_EUC_KR_E6_A4 WORDINDEX2INFO(3446)
+    to_EUC_KR_E6_A4_offsets,
+    to_EUC_KR_E6_A4_infos,
+
+#define to_EUC_KR_E6_A5_infos WORDINDEX2INFO(3448)
+           INVALID,         UNDEF, o2(0xE5,0xC5), o2(0xF9,0xA3),
+     o2(0xE0,0xDB), o2(0xF6,0xEB), o2(0xCB,0xF1), o2(0xD9,0xEA),
+     o2(0xF5,0xA2), o2(0xD7,0xD1), o2(0xD1,0xF8), o2(0xEA,0xF8),
+     o2(0xEA,0xF9), o2(0xDA,0xB3), o2(0xEF,0xDF), o2(0xF1,0xEF),
+     o2(0xE5,0xF6), o2(0xEE,0xBF), o2(0xE2,0xE4), o2(0xD0,0xBF),
+     o2(0xFA,0xAC), o2(0xF5,0xD1), o2(0xE7,0xB3),
+
+#define to_EUC_KR_E6_A5 WORDINDEX2INFO(3471)
+    to_EUC_KR_E6_A5_offsets,
+    to_EUC_KR_E6_A5_infos,
+
+#define to_EUC_KR_E6_A6_infos WORDINDEX2INFO(3473)
+           INVALID,         UNDEF, o2(0xE9,0xBE), o2(0xF2,0xCE),
+     o2(0xDB,0xB4), o2(0xFC,0xCE), o2(0xDD,0xEE), o2(0xE7,0xB4),
+     o2(0xD7,0xB4), o2(0xF7,0xB4),
+
+#define to_EUC_KR_E6_A6 WORDINDEX2INFO(3483)
+    to_EUC_KR_E6_A6_offsets,
+    to_EUC_KR_E6_A6_infos,
+
+#define to_EUC_KR_E6_A7_infos WORDINDEX2INFO(3485)
+           INVALID,         UNDEF, o2(0xCD,0xBE), o2(0xDA,0xE9),
+     o2(0xCF,0xB0), o2(0xF7,0xD9), o2(0xF3,0xE6), o2(0xCE,0xD9),
+     o2(0xCE,0xAA), o2(0xCB,0xC8), o2(0xD0,0xA7), o2(0xF0,0xCB),
+     o2(0xD0,0xC7),
+
+#define to_EUC_KR_E6_A7 WORDINDEX2INFO(3498)
+    to_EUC_KR_E6_A7_offsets,
+    to_EUC_KR_E6_A7_infos,
+
+#define to_EUC_KR_E6_A8_infos WORDINDEX2INFO(3500)
+           INVALID,         UNDEF, o2(0xE4,0xC5), o2(0xDB,0xE0),
+     o2(0xD5,0xDA), o2(0xD7,0xA7), o2(0xEE,0xC0), o2(0xF8,0xF6),
+     o2(0xF5,0xD2), o2(0xED,0xE9), o2(0xD9,0xBC), o2(0xE5,0xC6),
+     o2(0xF5,0xA3), o2(0xDA,0xD4), o2(0xE2,0xA7), o2(0xFB,0xFC),
+     o2(0xF1,0xDC),
+
+#define to_EUC_KR_E6_A8 WORDINDEX2INFO(3517)
+    to_EUC_KR_E6_A8_offsets,
+    to_EUC_KR_E6_A8_infos,
+
+#define to_EUC_KR_E6_A9_infos WORDINDEX2INFO(3519)
+           INVALID,         UNDEF, o2(0xCA,0xF4), o2(0xE8,0xFA),
+     o2(0xCE,0xE9), o2(0xE9,0xF8), o2(0xE2,0xE5), o2(0xD0,0xB9),
+     o2(0xD4,0xF2), o2(0xD1,0xA6), o2(0xDF,0xCE), o2(0xFC,0xF4),
+
+#define to_EUC_KR_E6_A9 WORDINDEX2INFO(3531)
+    to_EUC_KR_E6_A9_offsets,
+    to_EUC_KR_E6_A9_infos,
+
+#define to_EUC_KR_E6_AA_infos WORDINDEX2INFO(3533)
+           INVALID, o2(0xD3,0xAA),         UNDEF, o2(0xCC,0xAC),
+     o2(0xEF,0xE0), o2(0xE5,0xE5), o2(0xD0,0xD5), o2(0xDB,0xFC),
+     o2(0xFC,0xE6), o2(0xCB,0xFE), o2(0xED,0xEA), o2(0xDE,0xB1),
+     o2(0xF9,0xE3),
+
+#define to_EUC_KR_E6_AA WORDINDEX2INFO(3546)
+    to_EUC_KR_E6_AA_offsets,
+    to_EUC_KR_E6_AA_infos,
+
+#define to_EUC_KR_E6_AB_infos WORDINDEX2INFO(3548)
+           INVALID,         UNDEF, o2(0xD4,0xA2), o2(0xCF,0xF6),
+     o2(0xD6,0xD0), o2(0xD5,0xEA), o2(0xF1,0xEE), o2(0xFA,0xCB),
+     o2(0xE5,0xA1),
+
+#define to_EUC_KR_E6_AB WORDINDEX2INFO(3557)
+    to_EUC_KR_E6_AB_offsets,
+    to_EUC_KR_E6_AB_infos,
+
+#define to_EUC_KR_E6_AC_infos WORDINDEX2INFO(3559)
+           INVALID,         UNDEF, o2(0xD5,0xB1), o2(0xCF,0xED),
+     o2(0xED,0xEB), o2(0xD5,0xB2), o2(0xD5,0xBC), o2(0xFD,0xE2),
+     o2(0xF3,0xAD), o2(0xFD,0xDB), o2(0xE9,0xB0), o2(0xD1,0xA7),
+     o2(0xFD,0xE3), o2(0xCE,0xB3),
+
+#define to_EUC_KR_E6_AC WORDINDEX2INFO(3573)
+    to_EUC_KR_E6_AC_offsets,
+    to_EUC_KR_E6_AC_infos,
+
+#define to_EUC_KR_E6_AD_infos WORDINDEX2INFO(3575)
+           INVALID,         UNDEF, o2(0xFD,0xE4), o2(0xFA,0xCE),
+     o2(0xCA,0xB0), o2(0xF7,0xA7), o2(0xCF,0xB1), o2(0xE6,0xA2),
+     o2(0xFC,0xB6), o2(0xF2,0xAD), o2(0xEF,0xE1), o2(0xF3,0xAE),
+     o2(0xDC,0xC6), o2(0xD9,0xEB), o2(0xE8,0xE0), o2(0xE1,0xA8),
+     o2(0xD5,0xF6), o2(0xCF,0xFD), o2(0xDE,0xDD), o2(0xD9,0xD1),
+
+#define to_EUC_KR_E6_AD WORDINDEX2INFO(3595)
+    to_EUC_KR_E6_AD_offsets,
+    to_EUC_KR_E6_AD_infos,
+
+#define to_EUC_KR_E6_AE_infos WORDINDEX2INFO(3597)
+           INVALID,         UNDEF, o2(0xE4,0xEA), o2(0xF2,0xCF),
+     o2(0xF7,0xBF), o2(0xE2,0xE6), o2(0xE2,0xA8), o2(0xE3,0xD6),
+     o2(0xED,0xD1), o2(0xE9,0xF9), o2(0xD6,0xB1), o2(0xDE,0xB2),
+     o2(0xE0,0xE8), o2(0xD3,0xAB), o2(0xEB,0xDC), o2(0xDF,0xAF),
+     o2(0xCA,0xC3), o2(0xEE,0xFC),
+
+#define to_EUC_KR_E6_AE WORDINDEX2INFO(3615)
+    to_EUC_KR_E6_AE_offsets,
+    to_EUC_KR_E6_AE_infos,
+
+#define to_EUC_KR_E6_AF_infos WORDINDEX2INFO(3617)
+           INVALID,         UNDEF, o2(0xFD,0xC3), o2(0xEB,0xF6),
+     o2(0xCF,0xB2), o2(0xD9,0xEC), o2(0xD9,0xBD), o2(0xD8,0xDF),
+     o2(0xD4,0xB8), o2(0xEB,0xBE), o2(0xDD,0xEF), o2(0xDD,0xF0),
+     o2(0xDD,0xF1), o2(0xDD,0xF2), o2(0xD9,0xBE), o2(0xFB,0xC6),
+     o2(0xCF,0xB3),
+
+#define to_EUC_KR_E6_AF WORDINDEX2INFO(3634)
+    to_EUC_KR_E6_AF_offsets,
+    to_EUC_KR_E6_AF_infos,
+
+#define to_EUC_KR_E6_B0_infos WORDINDEX2INFO(3636)
+           INVALID,         UNDEF, o2(0xEE,0xFD), o2(0xE4,0xAB),
+     o2(0xDA,0xC5), o2(0xD8,0xEC), o2(0xD1,0xA8), o2(0xE2,0xA9),
+     o2(0xDE,0xBC), o2(0xE7,0xB5), o2(0xDB,0xF0),
+
+#define to_EUC_KR_E6_B0 WORDINDEX2INFO(3647)
+    to_EUC_KR_E6_B0_offsets,
+    to_EUC_KR_E6_B0_infos,
+
+#define to_EUC_KR_E6_B1_infos WORDINDEX2INFO(3649)
+           INVALID, o2(0xEF,0xE2), o2(0xF1,0xF0), o2(0xCF,0xB4),
+             UNDEF, o2(0xDB,0xF1), o2(0xE0,0xB1), o2(0xDF,0xA5),
+     o2(0xF9,0xD2), o2(0xE7,0xFD), o2(0xE6,0xA3), o2(0xFB,0xF1),
+     o2(0xCB,0xB0), o2(0xF2,0xAE), o2(0xCD,0xE7), o2(0xE8,0xDC),
+     o2(0xE7,0xD7), o2(0xF7,0xC0), o2(0xD0,0xE3), o2(0xDA,0xA1),
+     o2(0xCC,0xBD), o2(0xD1,0xA9), o2(0xDD,0xCC),
+
+#define to_EUC_KR_E6_B1 WORDINDEX2INFO(3672)
+    to_EUC_KR_E6_B1_offsets,
+    to_EUC_KR_E6_B1_infos,
+
+#define to_EUC_KR_E6_B2_infos WORDINDEX2INFO(3674)
+           INVALID,         UNDEF, o2(0xE3,0xFE), o2(0xD1,0xAA),
+     o2(0xE8,0xAA), o2(0xEA,0xB6), o2(0xF9,0xFA), o2(0xE6,0xCC),
+     o2(0xF6,0xD8), o2(0xD4,0xC7), o2(0xD9,0xCB), o2(0xD9,0xD2),
+     o2(0xD3,0xCB), o2(0xD8,0xF7), o2(0xDA,0xA9), o2(0xF5,0xF8),
+     o2(0xDE,0xDE), o2(0xF2,0xAF), o2(0xF8,0xA9), o2(0xD8,0xC8),
+     o2(0xEE,0xC1), o2(0xF9,0xC1), o2(0xDD,0xF3), o2(0xEA,0xFA),
+     o2(0xF6,0xBD), o2(0xE1,0xBB), o2(0xCD,0xBF), o2(0xF4,0xD4),
+     o2(0xE6,0xCD),
+
+#define to_EUC_KR_E6_B2 WORDINDEX2INFO(3703)
+    to_EUC_KR_E6_B2_offsets,
+    to_EUC_KR_E6_B2_infos,
+
+#define to_EUC_KR_E6_B3_infos WORDINDEX2INFO(3705)
+           INVALID,         UNDEF, o2(0xFC,0xCF), o2(0xFB,0xA2),
+     o2(0xE0,0xDC), o2(0xF4,0xBB), o2(0xDA,0xD5), o2(0xF9,0xB2),
+     o2(0xFB,0xF2), o2(0xDB,0xF6), o2(0xDE,0xDF), o2(0xDB,0xF2),
+     o2(0xF8,0xDC), o2(0xF7,0xEE), o2(0xEB,0xE8), o2(0xD2,0xFA),
+     o2(0xF1,0xBC), o2(0xFA,0xDA), o2(0xDA,0xEA), o2(0xDA,0xC6),
+     o2(0xF7,0xC1), o2(0xE7,0xB6),
+
+#define to_EUC_KR_E6_B3 WORDINDEX2INFO(3727)
+    to_EUC_KR_E6_B3_offsets,
+    to_EUC_KR_E6_B3_infos,
+
+#define to_EUC_KR_E6_B4_infos WORDINDEX2INFO(3729)
+           INVALID,         UNDEF, o2(0xE5,0xC7), o2(0xD6,0xAC),
+     o2(0xDC,0xC7), o2(0xE1,0xA9), o2(0xE2,0xAA), o2(0xD5,0xA6),
+     o2(0xD4,0xD7), o2(0xF2,0xD0), o2(0xEA,0xFB), o2(0xE0,0xDD),
+     o2(0xFB,0xF3), o2(0xF1,0xBD), o2(0xE2,0xE7), o2(0xFD,0xD7),
+     o2(0xCE,0xC8), o2(0xEA,0xB7), o2(0xFC,0xC0), o2(0xFD,0xE7),
+     o2(0xF7,0xEF),
+
+#define to_EUC_KR_E6_B4 WORDINDEX2INFO(3750)
+    to_EUC_KR_E6_B4_offsets,
+    to_EUC_KR_E6_B4_infos,
+
+#define to_EUC_KR_E6_B5_infos WORDINDEX2INFO(3752)
+           INVALID,         UNDEF, o2(0xD7,0xB5), o2(0xEF,0xBA),
+     o2(0xF1,0xDD), o2(0xDE,0xB3), o2(0xE8,0xCB), o2(0xF8,0xDD),
+     o2(0xFB,0xC7), o2(0xD5,0xC8), o2(0xD7,0xDF), o2(0xDD,0xA9),
+     o2(0xE9,0xB1), o2(0xFA,0xAD), o2(0xF6,0xD9), o2(0xFA,0xF4),
+     o2(0xF8,0xAA),
+
+#define to_EUC_KR_E6_B5 WORDINDEX2INFO(3769)
+    to_EUC_KR_E6_B5_offsets,
+    to_EUC_KR_E6_B5_infos,
+
+#define to_EUC_KR_E6_B6_infos WORDINDEX2INFO(3771)
+           INVALID,         UNDEF, o2(0xE6,0xEE), o2(0xCC,0xDC),
+     o2(0xE1,0xBC), o2(0xE0,0xEF), o2(0xE9,0xBF), o2(0xFC,0xFD),
+     o2(0xE6,0xCE), o2(0xE1,0xD7), o2(0xE6,0xCF), o2(0xF4,0xF1),
+     o2(0xE4,0xF3), o2(0xE4,0xFB), o2(0xF9,0xE4),
+
+#define to_EUC_KR_E6_B6 WORDINDEX2INFO(3786)
+    to_EUC_KR_E6_B6_offsets,
+    to_EUC_KR_E6_B6_infos,
+
+#define to_EUC_KR_E6_B7_infos WORDINDEX2INFO(3788)
+           INVALID, o2(0xEF,0xE3),         UNDEF, o2(0xCF,0xEE),
+     o2(0xF6,0xBE), o2(0xE0,0xB2), o2(0xFC,0xFE), o2(0xD1,0xAB),
+     o2(0xD7,0xFA), o2(0xFB,0xC8), o2(0xE2,0xD7), o2(0xD4,0xA3),
+     o2(0xF0,0xF8), o2(0xD7,0xA8), o2(0xE1,0xE7), o2(0xD3,0xBF),
+     o2(0xEF,0xE4), o2(0xD7,0xC5), o2(0xEB,0xE2), o2(0xFC,0xE7),
+     o2(0xE4,0xA2), o2(0xE2,0xE8), o2(0xE6,0xD0), o2(0xFB,0xE8),
+     o2(0xF4,0xE8), o2(0xE5,0xF4), o2(0xF4,0xBC), o2(0xF4,0xD5),
+
+#define to_EUC_KR_E6_B7 WORDINDEX2INFO(3816)
+    to_EUC_KR_E6_B7_offsets,
+    to_EUC_KR_E6_B7_infos,
+
+#define to_EUC_KR_E6_B8_infos WORDINDEX2INFO(3818)
+           INVALID,         UNDEF, o2(0xDF,0xB6), o2(0xFC,0xB9),
+     o2(0xEE,0xC2), o2(0xCA,0xF5), o2(0xEF,0xE5), o2(0xCB,0xE2),
+     o2(0xD4,0xA4), o2(0xDE,0xE0), o2(0xDA,0xFD), o2(0xE4,0xC6),
+     o2(0xE8,0xBE), o2(0xE0,0xDE), o2(0xF6,0xB4), o2(0xEA,0xD2),
+     o2(0xF9,0xFB), o2(0xE0,0xC2), o2(0xCA,0xE4), o2(0xE7,0xB7),
+     o2(0xEA,0xFD), o2(0xD9,0xDD), o2(0xDA,0xB4), o2(0xEE,0xAA),
+     o2(0xFB,0xE9),
+
+#define to_EUC_KR_E6_B8 WORDINDEX2INFO(3843)
+    to_EUC_KR_E6_B8_offsets,
+    to_EUC_KR_E6_B8_infos,
+
+#define to_EUC_KR_E6_B9_infos WORDINDEX2INFO(3845)
+           INVALID,         UNDEF, o2(0xDB,0xCB), o2(0xDA,0xB5),
+     o2(0xF1,0xBE), o2(0xD3,0xAC), o2(0xFB,0xC9), o2(0xDF,0xCF),
+     o2(0xD3,0xC0), o2(0xE3,0xD7), o2(0xEF,0xE6), o2(0xFC,0xD0),
+     o2(0xE9,0xC0), o2(0xF5,0xD3), o2(0xEC,0xDC), o2(0xF7,0xB7),
+     o2(0xEA,0xB8), o2(0xD1,0xF9), o2(0xDC,0xC8),
+
+#define to_EUC_KR_E6_B9 WORDINDEX2INFO(3864)
+    to_EUC_KR_E6_B9_offsets,
+    to_EUC_KR_E6_B9_infos,
+
+#define to_EUC_KR_E6_BA_infos WORDINDEX2INFO(3866)
+           INVALID,         UNDEF, o2(0xEA,0xB9), o2(0xF1,0xDE),
+     o2(0xD7,0xB6), o2(0xCF,0xB5), o2(0xD9,0xA8), o2(0xEC,0xEE),
+     o2(0xDD,0xAA), o2(0xCD,0xA2), o2(0xE8,0xAE), o2(0xE1,0xBD),
+     o2(0xF2,0xD1), o2(0xE9,0xC1), o2(0xD2,0xFC),
+
+#define to_EUC_KR_E6_BA WORDINDEX2INFO(3881)
+    to_EUC_KR_E6_BA_offsets,
+    to_EUC_KR_E6_BA_infos,
+
+#define to_EUC_KR_E6_BB_infos WORDINDEX2INFO(3883)
+           INVALID,         UNDEF, o2(0xDB,0xB5), o2(0xF3,0xE7),
+     o2(0xD8,0xFE), o2(0xFC,0xD1), o2(0xED,0xB2), o2(0xF4,0xAF),
+     o2(0xFB,0xA3), o2(0xFC,0xC1), o2(0xEE,0xAB), o2(0xD4,0xA5),
+     o2(0xF4,0xF2), o2(0xEE,0xD9), o2(0xFB,0xCA), o2(0xCD,0xE3),
+     o2(0xD8,0xBB),
+
+#define to_EUC_KR_E6_BB WORDINDEX2INFO(3900)
+    to_EUC_KR_E6_BB_offsets,
+    to_EUC_KR_E6_BB_infos,
+
+#define to_EUC_KR_E6_BC_infos WORDINDEX2INFO(3902)
+           INVALID,         UNDEF, o2(0xE5,0xDB), o2(0xF8,0xF7),
+     o2(0xF6,0xD4), o2(0xD7,0xA9), o2(0xCB,0xC9), o2(0xE6,0xD1),
+     o2(0xF0,0xCC), o2(0xD8,0xAE), o2(0xF9,0xD3), o2(0xD5,0xFE),
+     o2(0xD8,0xBC), o2(0xF2,0xB0), o2(0xE2,0xAB), o2(0xF3,0xE8),
+     o2(0xEF,0xC2), o2(0xED,0xEC),
+
+#define to_EUC_KR_E6_BC WORDINDEX2INFO(3920)
+    to_EUC_KR_E6_BC_offsets,
+    to_EUC_KR_E6_BC_infos,
+
+#define to_EUC_KR_E6_BD_infos WORDINDEX2INFO(3922)
+           INVALID,         UNDEF, o2(0xE7,0xB8), o2(0xDA,0xFE),
+     o2(0xCC,0xBE), o2(0xF2,0xFC), o2(0xDA,0xEB), o2(0xE2,0xD8),
+     o2(0xED,0xD6), o2(0xD6,0xD1), o2(0xE0,0xB3), o2(0xFC,0xD2),
+     o2(0xEB,0xC8), o2(0xD3,0xC1), o2(0xF0,0xCD), o2(0xCF,0xF7),
+     o2(0xED,0xD2), o2(0xD4,0xD8), o2(0xDC,0xC9), o2(0xD7,0xF1),
+
+#define to_EUC_KR_E6_BD WORDINDEX2INFO(3942)
+    to_EUC_KR_E6_BD_offsets,
+    to_EUC_KR_E6_BD_infos,
+
+#define to_EUC_KR_E6_BE_infos WORDINDEX2INFO(3944)
+           INVALID,         UNDEF, o2(0xDF,0xBB), o2(0xF3,0xA5),
+     o2(0xF4,0xCD), o2(0xF1,0xBF), o2(0xF8,0xB1), o2(0xE9,0xFA),
+     o2(0xFB,0xCB), o2(0xCA,0xD5), o2(0xF9,0xD4), o2(0xF7,0xCA),
+     o2(0xD6,0xC8), o2(0xFC,0xE8), o2(0xF3,0xBD), o2(0xEE,0xFE),
+     o2(0xE7,0xFE), o2(0xD3,0xC2), o2(0xD3,0xB6),
+
+#define to_EUC_KR_E6_BE WORDINDEX2INFO(3963)
+    to_EUC_KR_E6_BE_offsets,
+    to_EUC_KR_E6_BE_infos,
+
+#define to_EUC_KR_E6_BF_infos WORDINDEX2INFO(3965)
+           INVALID, o2(0xCC,0xAD), o2(0xF6,0xFA), o2(0xD6,0xB2),
+     o2(0xD2,0xD8),         UNDEF, o2(0xE7,0xD8), o2(0xE3,0xA5),
+     o2(0xE7,0xB9), o2(0xF0,0xAD), o2(0xFB,0xCC), o2(0xEB,0xA1),
+     o2(0xD4,0xA6), o2(0xFB,0xCD), o2(0xD5,0xBD), o2(0xF1,0xDF),
+     o2(0xF6,0xFB), o2(0xDE,0xB4), o2(0xD5,0xEB),
+
+#define to_EUC_KR_E6_BF WORDINDEX2INFO(3984)
+    to_EUC_KR_E6_BF_offsets,
+    to_EUC_KR_E6_BF_infos,
+
+#define to_EUC_KR_E6_infos WORDINDEX2INFO(3986)
+             INVALID, to_EUC_KR_E6_80, to_EUC_KR_E6_81, to_EUC_KR_E6_82,
+     to_EUC_KR_E6_83, to_EUC_KR_E6_84, to_EUC_KR_E6_85, to_EUC_KR_E6_86,
+     to_EUC_KR_E6_87, to_EUC_KR_E6_88, to_EUC_KR_E6_89, to_EUC_KR_E6_8A,
+     to_EUC_KR_E6_8B, to_EUC_KR_E6_8C, to_EUC_KR_E6_8D, to_EUC_KR_E6_8E,
+     to_EUC_KR_E6_8F, to_EUC_KR_E6_90, to_EUC_KR_E6_91, to_EUC_KR_E6_92,
+     to_EUC_KR_E6_93, to_EUC_KR_E6_94, to_EUC_KR_E6_95, to_EUC_KR_E6_96,
+     to_EUC_KR_E6_97, to_EUC_KR_E6_98, to_EUC_KR_E6_99, to_EUC_KR_E6_9A,
+     to_EUC_KR_E6_9B, to_EUC_KR_E6_9C, to_EUC_KR_E6_9D, to_EUC_KR_E6_9E,
+     to_EUC_KR_E6_9F, to_EUC_KR_E6_A0, to_EUC_KR_E6_A1, to_EUC_KR_E6_A2,
+     to_EUC_KR_E6_A3, to_EUC_KR_E6_A4, to_EUC_KR_E6_A5, to_EUC_KR_E6_A6,
+     to_EUC_KR_E6_A7, to_EUC_KR_E6_A8, to_EUC_KR_E6_A9, to_EUC_KR_E6_AA,
+     to_EUC_KR_E6_AB, to_EUC_KR_E6_AC, to_EUC_KR_E6_AD, to_EUC_KR_E6_AE,
+     to_EUC_KR_E6_AF, to_EUC_KR_E6_B0, to_EUC_KR_E6_B1, to_EUC_KR_E6_B2,
+     to_EUC_KR_E6_B3, to_EUC_KR_E6_B4, to_EUC_KR_E6_B5, to_EUC_KR_E6_B6,
+     to_EUC_KR_E6_B7, to_EUC_KR_E6_B8, to_EUC_KR_E6_B9, to_EUC_KR_E6_BA,
+     to_EUC_KR_E6_BB, to_EUC_KR_E6_BC, to_EUC_KR_E6_BD, to_EUC_KR_E6_BE,
+     to_EUC_KR_E6_BF,
+
+#define to_EUC_KR_E6 WORDINDEX2INFO(4051)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E6_infos,
+
+#define to_EUC_KR_E7_80_infos WORDINDEX2INFO(4053)
+           INVALID,         UNDEF, o2(0xE5,0xC8), o2(0xFB,0xA4),
+     o2(0xD4,0xB9), o2(0xDE,0xE1), o2(0xE4,0xA3), o2(0xD7,0xB7),
+     o2(0xF8,0xEE), o2(0xDE,0xB5), o2(0xD6,0xD2), o2(0xF9,0xD5),
+     o2(0xE7,0xBA), o2(0xEB,0xD5), o2(0xD5,0xF7), o2(0xEF,0xE7),
+     o2(0xE1,0xBE), o2(0xFA,0xAE), o2(0xD6,0xE9), o2(0xD6,0xEE),
+     o2(0xE7,0xBB), o2(0xEC,0xCB), o2(0xD5,0xB3),
+
+#define to_EUC_KR_E7_80 WORDINDEX2INFO(4076)
+    to_EUC_KR_E7_80_offsets,
+    to_EUC_KR_E7_80_infos,
+
+#define to_EUC_KR_E7_81_infos WORDINDEX2INFO(4078)
+           INVALID,         UNDEF, o2(0xCE,0xB4), o2(0xFB,0xA5),
+     o2(0xE1,0xEE), o2(0xF7,0xA8), o2(0xFB,0xCE), o2(0xD8,0xBD),
+     o2(0xFB,0xFD), o2(0xFC,0xE9), o2(0xCF,0xB6), o2(0xED,0xC7),
+     o2(0xEE,0xAC),
+
+#define to_EUC_KR_E7_81 WORDINDEX2INFO(4091)
+    to_EUC_KR_E7_81_offsets,
+    to_EUC_KR_E7_81_infos,
+
+#define to_EUC_KR_E7_82_infos WORDINDEX2INFO(4093)
+           INVALID,         UNDEF, o2(0xCC,0xDD), o2(0xF6,0xA7),
+     o2(0xE6,0xFA), o2(0xF5,0xA4), o2(0xFD,0xDC), o2(0xED,0xB3),
+     o2(0xCE,0xC9), o2(0xEF,0xE8), o2(0xE1,0xBF), o2(0xFA,0xDB),
+     o2(0xCB,0xE3), o2(0xF7,0xA9), o2(0xFB,0xA6), o2(0xDC,0xB9),
+     o2(0xF1,0xC0), o2(0xED,0xC8), o2(0xEF,0xC3),
+
+#define to_EUC_KR_E7_82 WORDINDEX2INFO(4112)
+    to_EUC_KR_E7_82_offsets,
+    to_EUC_KR_E7_82_infos,
+
+#define to_EUC_KR_E7_83_infos WORDINDEX2INFO(4114)
+           INVALID,         UNDEF, o2(0xD6,0xAD), o2(0xFD,0xCE),
+     o2(0xE8,0xA1), o2(0xFB,0xF4), o2(0xD5,0xA7), o2(0xF1,0xF6),
+     o2(0xE6,0xD3), o2(0xCC,0xDE), o2(0xF8,0xB2), o2(0xDC,0xEB),
+
+#define to_EUC_KR_E7_83 WORDINDEX2INFO(4126)
+    to_EUC_KR_E7_83_offsets,
+    to_EUC_KR_E7_83_infos,
+
+#define to_EUC_KR_E7_84_infos WORDINDEX2INFO(4128)
+           INVALID,         UNDEF, o2(0xFD,0xB6), o2(0xE5,0xEA),
+     o2(0xF1,0xE0), o2(0xDB,0xCC), o2(0xDD,0xCD), o2(0xD4,0xC8),
+     o2(0xD9,0xED), o2(0xF5,0xA5), o2(0xE6,0xFB), o2(0xE6,0xD4),
+
+#define to_EUC_KR_E7_84 WORDINDEX2INFO(4140)
+    to_EUC_KR_E7_84_offsets,
+    to_EUC_KR_E7_84_infos,
+
+#define to_EUC_KR_E7_85_infos WORDINDEX2INFO(4142)
+           INVALID,         UNDEF, o2(0xFD,0xC8), o2(0xD6,0xA1),
+     o2(0xFD,0xBF), o2(0xFC,0xD3), o2(0xEF,0xA1), o2(0xE7,0xBC),
+     o2(0xD1,0xEE), o2(0xE6,0xD5), o2(0xE9,0xF2), o2(0xDF,0xB0),
+     o2(0xD8,0xE0), o2(0xFC,0xBA), o2(0xFD,0xAF), o2(0xF0,0xCE),
+     o2(0xDB,0xE1), o2(0xE5,0xC9), o2(0xED,0xB4), o2(0xE0,0xC3),
+
+#define to_EUC_KR_E7_85 WORDINDEX2INFO(4162)
+    to_EUC_KR_E7_85_offsets,
+    to_EUC_KR_E7_85_infos,
+
+#define to_EUC_KR_E7_86_infos WORDINDEX2INFO(4164)
+           INVALID,         UNDEF, o2(0xE3,0xD8), o2(0xE9,0xFB),
+     o2(0xEA,0xA8), o2(0xFD,0xB7), o2(0xFB,0xA7), o2(0xE9,0xC2),
+     o2(0xFD,0xF7), o2(0xE2,0xD9), o2(0xDC,0xEC), o2(0xE8,0xA2),
+     o2(0xE6,0xF0), o2(0xFD,0xF8), o2(0xFD,0xF9), o2(0xF6,0xBF),
+
+#define to_EUC_KR_E7_86 WORDINDEX2INFO(4180)
+    to_EUC_KR_E7_86_offsets,
+    to_EUC_KR_E7_86_infos,
+
+#define to_EUC_KR_E7_87_infos WORDINDEX2INFO(4182)
+           INVALID,         UNDEF, o2(0xE7,0xA7), o2(0xE6,0xD7),
+     o2(0xD4,0xF3), o2(0xD4,0xC9), o2(0xD6,0xFA), o2(0xD7,0xF2),
+     o2(0xE1,0xC0), o2(0xDB,0xE2), o2(0xE6,0xD8), o2(0xE7,0xBD),
+     o2(0xF0,0xCF), o2(0xF3,0xBE), o2(0xE2,0xAC), o2(0xF5,0xB7),
+     o2(0xE0,0xF0), o2(0xFD,0xB8), o2(0xE3,0xE8), o2(0xD4,0xA7),
+     o2(0xE8,0xFC),
+
+#define to_EUC_KR_E7_87 WORDINDEX2INFO(4203)
+    to_EUC_KR_E7_87_offsets,
+    to_EUC_KR_E7_87_infos,
+
+#define to_EUC_KR_E7_88_infos WORDINDEX2INFO(4205)
+           INVALID, o2(0xFA,0xD2),         UNDEF, o2(0xF8,0xEF),
+     o2(0xD6,0xD3), o2(0xD5,0xB4), o2(0xF0,0xD0), o2(0xF7,0xF0),
+     o2(0xEE,0xB3), o2(0xEA,0xBA), o2(0xEA,0xD3), o2(0xED,0xC9),
+     o2(0xDD,0xAB), o2(0xE5,0xAC), o2(0xFD,0xA1), o2(0xDF,0xD0),
+     o2(0xEC,0xB3),
+
+#define to_EUC_KR_E7_88 WORDINDEX2INFO(4222)
+    to_EUC_KR_E7_88_offsets,
+    to_EUC_KR_E7_88_infos,
+
+#define to_EUC_KR_E7_89_infos WORDINDEX2INFO(4224)
+           INVALID, o2(0xDF,0xD1),         UNDEF, o2(0xED,0xED),
+     o2(0xF8,0xB8), o2(0xF7,0xFA), o2(0xF8,0xAB), o2(0xF4,0xE0),
+     o2(0xD4,0xBA), o2(0xE4,0xB3), o2(0xE9,0xDA), o2(0xDE,0xB6),
+     o2(0xD9,0xBF), o2(0xD9,0xC0), o2(0xD6,0xEF), o2(0xD9,0xCC),
+     o2(0xDA,0xAA), o2(0xDF,0xE5), o2(0xF7,0xE5), o2(0xCC,0xB2),
+
+#define to_EUC_KR_E7_89 WORDINDEX2INFO(4244)
+    to_EUC_KR_E7_89_offsets,
+    to_EUC_KR_E7_89_infos,
+
+#define to_EUC_KR_E7_8A_infos WORDINDEX2INFO(4246)
+           INVALID, o2(0xDF,0xF9), o2(0xD7,0xE0),         UNDEF,
+     o2(0xD4,0xBB), o2(0xFD,0xFA), o2(0xCC,0xB3), o2(0xDB,0xF3),
+
+#define to_EUC_KR_E7_8A WORDINDEX2INFO(4254)
+    to_EUC_KR_E7_8A_offsets,
+    to_EUC_KR_E7_8A_infos,
+
+#define to_EUC_KR_E7_8B_infos WORDINDEX2INFO(4256)
+           INVALID, o2(0xDF,0xD2),         UNDEF, o2(0xCE,0xCA),
+     o2(0xEE,0xDA), o2(0xE4,0xE4), o2(0xFB,0xCF), o2(0xCF,0xB7),
+     o2(0xEE,0xC3), o2(0xCE,0xEA), o2(0xE2,0xAD), o2(0xD7,0xE1),
+     o2(0xFA,0xF5), o2(0xD5,0xC9), o2(0xF8,0xAC),
+
+#define to_EUC_KR_E7_8B WORDINDEX2INFO(4271)
+    to_EUC_KR_E7_8B_offsets,
+    to_EUC_KR_E7_8B_infos,
+
+#define to_EUC_KR_E7_8C_infos WORDINDEX2INFO(4273)
+           INVALID,         UNDEF, o2(0xE7,0xD9), o2(0xF3,0xE9),
+     o2(0xD8,0xED), o2(0xE3,0xC4), o2(0xF0,0xF1), o2(0xE8,0xE5),
+     o2(0xE0,0xFA), o2(0xEE,0xC4), o2(0xD9,0xDE), o2(0xEB,0xA2),
+     o2(0xEB,0xA3), o2(0xFC,0xC2), o2(0xEA,0xBB),
+
+#define to_EUC_KR_E7_8C WORDINDEX2INFO(4288)
+    to_EUC_KR_E7_8C_offsets,
+    to_EUC_KR_E7_8C_infos,
+
+#define to_EUC_KR_E7_8D_infos WORDINDEX2INFO(4290)
+           INVALID,         UNDEF, o2(0xE8,0xAB), o2(0xDE,0xE2),
+     o2(0xED,0xEF), o2(0xE8,0xA3), o2(0xCF,0xF1), o2(0xD4,0xBC),
+     o2(0xFC,0xEA), o2(0xE7,0xBE), o2(0xFC,0xF2), o2(0xD6,0xB4),
+     o2(0xE2,0xAE), o2(0xD3,0xB7), o2(0xFA,0xCC),
+
+#define to_EUC_KR_E7_8D WORDINDEX2INFO(4305)
+    to_EUC_KR_E7_8D_offsets,
+    to_EUC_KR_E7_8D_infos,
+
+#define to_EUC_KR_E7_8E_infos WORDINDEX2INFO(4307)
+           INVALID,         UNDEF, o2(0xFA,0xDC), o2(0xED,0xB5),
+     o2(0xE1,0xE3), o2(0xE8,0xAC), o2(0xE8,0xDD), o2(0xEF,0xE9),
+     o2(0xF4,0xBD), o2(0xCF,0xB8), o2(0xE9,0xDB), o2(0xD1,0xAC),
+     o2(0xDA,0xC7), o2(0xEB,0xC9), o2(0xE8,0xCC), o2(0xDE,0xB7),
+     o2(0xD6,0xBC), o2(0xD3,0xE5), o2(0xFA,0xDD),
+
+#define to_EUC_KR_E7_8E WORDINDEX2INFO(4326)
+    to_EUC_KR_E7_8E_offsets,
+    to_EUC_KR_E7_8E_infos,
+
+#define to_EUC_KR_E7_8F_infos WORDINDEX2INFO(4328)
+           INVALID, o2(0xDA,0xD6),         UNDEF, o2(0xCA,0xB1),
+     o2(0xDA,0xC8), o2(0xDF,0xA6), o2(0xF9,0xB3), o2(0xF2,0xD2),
+     o2(0xCA,0xC4), o2(0xCE,0xCB), o2(0xCD,0xF5), o2(0xFD,0xB0),
+     o2(0xD5,0xA8), o2(0xF1,0xC1), o2(0xE2,0xE9), o2(0xDC,0xCA),
+     o2(0xEC,0xB4), o2(0xFA,0xC0), o2(0xFB,0xA8), o2(0xD0,0xA8),
+     o2(0xDA,0xEC), o2(0xD9,0xEE), o2(0xE0,0xFB), o2(0xEF,0xEA),
+     o2(0xFA,0xDE),
+
+#define to_EUC_KR_E7_8F WORDINDEX2INFO(4353)
+    to_EUC_KR_E7_8F_offsets,
+    to_EUC_KR_E7_8F_infos,
+
+#define to_EUC_KR_E7_90_infos WORDINDEX2INFO(4355)
+           INVALID,         UNDEF, o2(0xE0,0xC4), o2(0xCF,0xB9),
+     o2(0xD5,0xCA), o2(0xD7,0xE2), o2(0xE2,0xAF), o2(0xD7,0xB8),
+     o2(0xE8,0xCD), o2(0xF6,0xDA), o2(0xEF,0xA2), o2(0xE2,0xDA),
+     o2(0xF6,0xFC), o2(0xFB,0xD0), o2(0xD1,0xAD), o2(0xCD,0xE4),
+     o2(0xD1,0xAE), o2(0xDC,0xED), o2(0xE8,0xCE), o2(0xF0,0xF9),
+     o2(0xCE,0xB5), o2(0xE6,0xFC), o2(0xD7,0xFB), o2(0xD0,0xD6),
+     o2(0xDD,0xF5), o2(0xF7,0xF1), o2(0xF6,0xFD), o2(0xDB,0xF7),
+     o2(0xFB,0xEA),
+
+#define to_EUC_KR_E7_90 WORDINDEX2INFO(4384)
+    to_EUC_KR_E7_90_offsets,
+    to_EUC_KR_E7_90_infos,
+
+#define to_EUC_KR_E7_91_infos WORDINDEX2INFO(4386)
+           INVALID, o2(0xE9,0xDC), o2(0xD9,0xC1),         UNDEF,
+     o2(0xF5,0xF2), o2(0xE0,0xC5), o2(0xEA,0xD4), o2(0xF9,0xC2),
+     o2(0xEA,0xBC), o2(0xD2,0xC5), o2(0xFB,0xD1), o2(0xE7,0xC0),
+     o2(0xEB,0xA5), o2(0xDF,0xFA), o2(0xE3,0xA2), o2(0xD7,0xB9),
+     o2(0xE9,0xC3), o2(0xE8,0xFD), o2(0xE8,0xAF), o2(0xF2,0xD3),
+     o2(0xFB,0xA9), o2(0xD8,0xA5), o2(0xD5,0xCB), o2(0xD0,0xC8),
+
+#define to_EUC_KR_E7_91 WORDINDEX2INFO(4410)
+    to_EUC_KR_E7_91_offsets,
+    to_EUC_KR_E7_91_infos,
+
+#define to_EUC_KR_E7_92_infos WORDINDEX2INFO(4412)
+           INVALID,         UNDEF, o2(0xD1,0xAF), o2(0xD7,0xE3),
+     o2(0xE0,0xC6), o2(0xD6,0xA2), o2(0xED,0xF0), o2(0xD7,0xF3),
+     o2(0xFC,0xD4), o2(0xDA,0xD7), o2(0xCC,0xDF), o2(0xF2,0xD4),
+     o2(0xD1,0xB0), o2(0xCC,0xE0), o2(0xDB,0xFD), o2(0xF3,0xBF),
+     o2(0xF0,0xD1), o2(0xFC,0xBB), o2(0xE2,0xB0), o2(0xE6,0xA5),
+     o2(0xE2,0xDB), o2(0xDF,0xDE), o2(0xE0,0xC7),
+
+#define to_EUC_KR_E7_92 WORDINDEX2INFO(4435)
+    to_EUC_KR_E7_92_offsets,
+    to_EUC_KR_E7_92_infos,
+
+#define to_EUC_KR_E7_93_infos WORDINDEX2INFO(4437)
+           INVALID,         UNDEF, o2(0xF2,0xEF), o2(0xCC,0xE1),
+     o2(0xD6,0xEA), o2(0xE7,0xC2), o2(0xCE,0xB6), o2(0xF3,0xC0),
+     o2(0xCD,0xFE), o2(0xFB,0xD2), o2(0xF8,0xF8), o2(0xF7,0xFB),
+     o2(0xE8,0xBF), o2(0xE8,0xB7), o2(0xED,0xB6),
+
+#define to_EUC_KR_E7_93 WORDINDEX2INFO(4452)
+    to_EUC_KR_E7_93_offsets,
+    to_EUC_KR_E7_93_infos,
+
+#define to_EUC_KR_E7_94_infos WORDINDEX2INFO(4454)
+           INVALID,         UNDEF, o2(0xDC,0xBA), o2(0xCC,0xB4),
+     o2(0xF1,0xF7), o2(0xE8,0xB8), o2(0xCA,0xF6), o2(0xE4,0xA4),
+     o2(0xF4,0xD6), o2(0xDF,0xE6), o2(0xDF,0xA7), o2(0xDF,0xE7),
+     o2(0xE1,0xC1), o2(0xE9,0xC4), o2(0xDC,0xCB), o2(0xE9,0xC5),
+     o2(0xEF,0xA3), o2(0xEB,0xA6), o2(0xCB,0xA3), o2(0xE3,0xE9),
+     o2(0xD1,0xFB), o2(0xEF,0xA4), o2(0xEF,0xEB),
+
+#define to_EUC_KR_E7_94 WORDINDEX2INFO(4477)
+    to_EUC_KR_E7_94_offsets,
+    to_EUC_KR_E7_94_infos,
+
+#define to_EUC_KR_E7_95_infos WORDINDEX2INFO(4479)
+           INVALID,         UNDEF, o2(0xD0,0xB4), o2(0xCD,0xA3),
+     o2(0xE8,0xE6), o2(0xEF,0xA5), o2(0xD3,0xCC), o2(0xDA,0xED),
+     o2(0xD7,0xBA), o2(0xF2,0xD5), o2(0xF5,0xE5), o2(0xD9,0xEF),
+     o2(0xF9,0xB4), o2(0xD5,0xD4), o2(0xFD,0xCF), o2(0xDB,0xE3),
+     o2(0xF1,0xE1), o2(0xEC,0xB6), o2(0xFB,0xFE), o2(0xD3,0xD7),
+     o2(0xD1,0xB1), o2(0xCB,0xB1), o2(0xD1,0xB2),
+
+#define to_EUC_KR_E7_95 WORDINDEX2INFO(4502)
+    to_EUC_KR_E7_95_offsets,
+    to_EUC_KR_E7_95_infos,
+
+#define to_EUC_KR_E7_96_infos WORDINDEX2INFO(4504)
+           INVALID,         UNDEF, o2(0xCB,0xB2), o2(0xF1,0xC2),
+     o2(0xF4,0xE1), o2(0xF9,0xB5), o2(0xE1,0xC3), o2(0xE1,0xC2),
+     o2(0xEB,0xF7), o2(0xDF,0xA8), o2(0xCB,0xCA), o2(0xE6,0xB9),
+     o2(0xF8,0xDE), o2(0xF9,0xAA), o2(0xCA,0xF7), o2(0xED,0xB7),
+     o2(0xD3,0xB8), o2(0xF2,0xD6), o2(0xD4,0xD9), o2(0xEE,0xC5),
+     o2(0xF2,0xF0),
+
+#define to_EUC_KR_E7_96 WORDINDEX2INFO(4525)
+    to_EUC_KR_E7_96_offsets,
+    to_EUC_KR_E7_96_infos,
+
+#define to_EUC_KR_E7_97_infos WORDINDEX2INFO(4527)
+           INVALID,         UNDEF, o2(0xCA,0xB2), o2(0xDC,0xBB),
+     o2(0xF1,0xF8), o2(0xEC,0xB7), o2(0xE5,0xCA), o2(0xF6,0xC0),
+     o2(0xFD,0xDD), o2(0xD4,0xE3), o2(0xCC,0xE2), o2(0xF7,0xD4),
+     o2(0xD7,0xE5), o2(0xD3,0xC3), o2(0xD8,0xA6), o2(0xF6,0xC1),
+     o2(0xDD,0xF6), o2(0xCD,0xC0),
+
+#define to_EUC_KR_E7_97 WORDINDEX2INFO(4545)
+    to_EUC_KR_E7_97_offsets,
+    to_EUC_KR_E7_97_infos,
+
+#define to_EUC_KR_E7_98_infos WORDINDEX2INFO(4547)
+           INVALID, o2(0xE5,0xDC),         UNDEF, o2(0xE5,0xCB),
+     o2(0xE1,0xC4), o2(0xE8,0xB0), o2(0xF4,0xB0), o2(0xF3,0xEA),
+     o2(0xDA,0xEE), o2(0xD7,0xBB), o2(0xE2,0xB1), o2(0xD7,0xAA),
+
+#define to_EUC_KR_E7_98 WORDINDEX2INFO(4559)
+    to_EUC_KR_E7_98_offsets,
+    to_EUC_KR_E7_98_infos,
+
+#define to_EUC_KR_E7_99_infos WORDINDEX2INFO(4561)
+           INVALID,         UNDEF, o2(0xD6,0xFB), o2(0xE4,0xDF),
+     o2(0xCA,0xD6), o2(0xEB,0xA8), o2(0xDB,0xFE), o2(0xF6,0xC2),
+     o2(0xEF,0xBB), o2(0xD4,0xFD), o2(0xE0,0xC8), o2(0xE8,0xB9),
+     o2(0xEF,0xA6), o2(0xCD,0xA4), o2(0xD4,0xF4), o2(0xDB,0xA1),
+     o2(0xDB,0xDC), o2(0xDB,0xDD),
+
+#define to_EUC_KR_E7_99 WORDINDEX2INFO(4579)
+    to_EUC_KR_E7_99_offsets,
+    to_EUC_KR_E7_99_infos,
+
+#define to_EUC_KR_E7_9A_infos WORDINDEX2INFO(4581)
+           INVALID,         UNDEF, o2(0xEE,0xDC), o2(0xCB,0xCB),
+     o2(0xFC,0xD5), o2(0xCE,0xEB), o2(0xCD,0xC1), o2(0xFB,0xD3),
+     o2(0xF9,0xAB), o2(0xF5,0xD4), o2(0xD9,0xA9),
+
+#define to_EUC_KR_E7_9A WORDINDEX2INFO(4592)
+    to_EUC_KR_E7_9A_offsets,
+    to_EUC_KR_E7_9A_infos,
+
+#define to_EUC_KR_E7_9B_infos WORDINDEX2INFO(4594)
+           INVALID,         UNDEF, o2(0xE9,0xDD), o2(0xDB,0xCD),
+     o2(0xDD,0xCE), o2(0xE7,0xC3), o2(0xEC,0xCC), o2(0xF9,0xEC),
+     o2(0xCB,0xCC), o2(0xE0,0xFC), o2(0xD4,0xA8), o2(0xED,0xD3),
+     o2(0xD8,0xEF), o2(0xF2,0xD7), o2(0xCA,0xF8), o2(0xDA,0xEF),
+     o2(0xD6,0xD4), o2(0xD9,0xCD), o2(0xD8,0xEE), o2(0xF2,0xC1),
+     o2(0xDF,0xD3), o2(0xDA,0xF0), o2(0xE2,0xEA),
+
+#define to_EUC_KR_E7_9B WORDINDEX2INFO(4617)
+    to_EUC_KR_E7_9B_offsets,
+    to_EUC_KR_E7_9B_infos,
+
+#define to_EUC_KR_E7_9C_infos WORDINDEX2INFO(4619)
+           INVALID,         UNDEF, o2(0xE0,0xFD), o2(0xD8,0xF8),
+     o2(0xF7,0xAF), o2(0xDA,0xB6), o2(0xCA,0xD7), o2(0xF2,0xD8),
+     o2(0xD8,0xF9), o2(0xFA,0xDF), o2(0xCF,0xEF), o2(0xD9,0xC2),
+     o2(0xF0,0xD2), o2(0xE4,0xD1),
+
+#define to_EUC_KR_E7_9C WORDINDEX2INFO(4633)
+    to_EUC_KR_E7_9C_offsets,
+    to_EUC_KR_E7_9C_infos,
+
+#define to_EUC_KR_E7_9D_infos WORDINDEX2INFO(4635)
+           INVALID, o2(0xF3,0xB7),         UNDEF, o2(0xFA,0xE0),
+     o2(0xEF,0xEC), o2(0xE2,0xB2), o2(0xD4,0xBD), o2(0xD9,0xCE),
+     o2(0xF4,0xE2), o2(0xD4,0xA9), o2(0xCD,0xC2), o2(0xE7,0xDA),
+
+#define to_EUC_KR_E7_9D WORDINDEX2INFO(4647)
+    to_EUC_KR_E7_9D_offsets,
+    to_EUC_KR_E7_9D_infos,
+
+#define to_EUC_KR_E7_9E_infos WORDINDEX2INFO(4649)
+           INVALID,         UNDEF, o2(0xF2,0xD9), o2(0xD9,0xAA),
+     o2(0xD8,0xBE), o2(0xDC,0xAD), o2(0xE2,0xEB), o2(0xD6,0xFC),
+     o2(0xCA,0xF9), o2(0xD4,0xDA), o2(0xF4,0xD7), o2(0xCC,0xA1),
+     o2(0xCF,0xBA),
+
+#define to_EUC_KR_E7_9E WORDINDEX2INFO(4662)
+    to_EUC_KR_E7_9E_offsets,
+    to_EUC_KR_E7_9E_infos,
+
+#define to_EUC_KR_E7_9F_infos WORDINDEX2INFO(4664)
+           INVALID,         UNDEF, o2(0xF5,0xB8), o2(0xD9,0xC3),
+     o2(0xD0,0xE8), o2(0xE3,0xC5), o2(0xEB,0xF8), o2(0xF2,0xB1),
+     o2(0xCF,0xBB), o2(0xD3,0xAD), o2(0xE8,0xE1), o2(0xCE,0xEC),
+     o2(0xE0,0xB4),
+
+#define to_EUC_KR_E7_9F WORDINDEX2INFO(4677)
+    to_EUC_KR_E7_9F_offsets,
+    to_EUC_KR_E7_9F_infos,
+
+#define to_EUC_KR_E7_A0_infos WORDINDEX2INFO(4679)
+           INVALID,         UNDEF, o2(0xDE,0xE3), o2(0xDD,0xF7),
+     o2(0xF2,0xB2), o2(0xF3,0xF6), o2(0xF6,0xDB), o2(0xD7,0xFE),
+     o2(0xF8,0xDF), o2(0xF7,0xF2),
+
+#define to_EUC_KR_E7_A0 WORDINDEX2INFO(4689)
+    to_EUC_KR_E7_A0_offsets,
+    to_EUC_KR_E7_A0_infos,
+
+#define to_EUC_KR_E7_A1_infos WORDINDEX2INFO(4691)
+           INVALID,         UNDEF, o2(0xD0,0xA9), o2(0xE6,0xDA),
+     o2(0xF5,0xA6), o2(0xD7,0xBC), o2(0xCC,0xE3), o2(0xE6,0xDB),
+     o2(0xDD,0xDD),
+
+#define to_EUC_KR_E7_A1 WORDINDEX2INFO(4700)
+    to_EUC_KR_E7_A1_offsets,
+    to_EUC_KR_E7_A1_infos,
+
+#define to_EUC_KR_E7_A2_infos WORDINDEX2INFO(4702)
+           INVALID,         UNDEF, o2(0xD1,0xB3), o2(0xEF,0xED),
+     o2(0xD6,0xDE), o2(0xE4,0xF4), o2(0xE1,0xEF), o2(0xDD,0xF8),
+     o2(0xE8,0xCF), o2(0xCA,0xE5), o2(0xDC,0xA1), o2(0xE0,0xB5),
+     o2(0xFC,0xAC), o2(0xFC,0xAD), o2(0xD8,0xA7),
+
+#define to_EUC_KR_E7_A2 WORDINDEX2INFO(4717)
+    to_EUC_KR_E7_A2_offsets,
+    to_EUC_KR_E7_A2_infos,
+
+#define to_EUC_KR_E7_A3_infos WORDINDEX2INFO(4719)
+           INVALID,         UNDEF, o2(0xED,0xB8), o2(0xDB,0xB6),
+     o2(0xD6,0xF0), o2(0xF3,0xAF), o2(0xCD,0xA5), o2(0xDA,0xF1),
+     o2(0xD8,0xA8), o2(0xCC,0xE4), o2(0xD1,0xB4), o2(0xCA,0xD8),
+     o2(0xDA,0xF2),
+
+#define to_EUC_KR_E7_A3 WORDINDEX2INFO(4732)
+    to_EUC_KR_E7_A3_offsets,
+    to_EUC_KR_E7_A3_infos,
+
+#define to_EUC_KR_E7_A4_infos WORDINDEX2INFO(4734)
+           INVALID,         UNDEF, o2(0xF5,0xA7), o2(0xF5,0xA8),
+     o2(0xE6,0xA6), o2(0xD5,0xEC), o2(0xD5,0xF8), o2(0xDA,0xF3),
+     o2(0xE3,0xC6), o2(0xDE,0xE4),
+
+#define to_EUC_KR_E7_A4 WORDINDEX2INFO(4744)
+    to_EUC_KR_E7_A4_offsets,
+    to_EUC_KR_E7_A4_infos,
+
+#define to_EUC_KR_E7_A5_infos WORDINDEX2INFO(4746)
+           INVALID, o2(0xDE,0xE5), o2(0xD1,0xB5),         UNDEF,
+     o2(0xD1,0xB6), o2(0xD1,0xB7), o2(0xF2,0xB3), o2(0xE9,0xDE),
+     o2(0xF0,0xD3), o2(0xF2,0xB4), o2(0xF0,0xD4), o2(0xCB,0xE4),
+     o2(0xFB,0xD4), o2(0xF5,0xE6), o2(0xE3,0xEA), o2(0xDE,0xE6),
+     o2(0xDF,0xD4), o2(0xF8,0xF9), o2(0xF0,0xAE), o2(0xD1,0xB8),
+     o2(0xD6,0xDF),
+
+#define to_EUC_KR_E7_A5 WORDINDEX2INFO(4767)
+    to_EUC_KR_E7_A5_offsets,
+    to_EUC_KR_E7_A5_infos,
+
+#define to_EUC_KR_E7_A6_infos WORDINDEX2INFO(4769)
+           INVALID,         UNDEF, o2(0xD0,0xD7), o2(0xFC,0xA1),
+     o2(0xEF,0xEE), o2(0xDC,0xD8), o2(0xE9,0xDF), o2(0xE5,0xDD),
+     o2(0xFD,0xFB), o2(0xE0,0xC9), o2(0xD6,0xC9), o2(0xD4,0xAA),
+     o2(0xE5,0xCC), o2(0xE9,0xE0), o2(0xD0,0xD8), o2(0xFC,0xA2),
+     o2(0xD4,0xBE),
+
+#define to_EUC_KR_E7_A6 WORDINDEX2INFO(4786)
+    to_EUC_KR_E7_A6_offsets,
+    to_EUC_KR_E7_A6_infos,
+
+#define to_EUC_KR_E7_A7_infos WORDINDEX2INFO(4788)
+           INVALID, o2(0xE2,0xB3), o2(0xDE,0xE7),         UNDEF,
+     o2(0xDC,0xBC), o2(0xD2,0xB6), o2(0xF5,0xD5), o2(0xCE,0xA1),
+     o2(0xF5,0xA9), o2(0xDD,0xF9), o2(0xDD,0xFA), o2(0xF0,0xD5),
+     o2(0xF6,0xDF), o2(0xF2,0xDA), o2(0xE4,0xEB), o2(0xF2,0xF1),
+     o2(0xEC,0xB9),
+
+#define to_EUC_KR_E7_A7 WORDINDEX2INFO(4805)
+    to_EUC_KR_E7_A7_offsets,
+    to_EUC_KR_E7_A7_infos,
+
+#define to_EUC_KR_E7_A8_infos WORDINDEX2INFO(4807)
+           INVALID, o2(0xFD,0xFC),         UNDEF, o2(0xE1,0xAA),
+     o2(0xCA,0xD9), o2(0xEF,0xEF), o2(0xF5,0xAA), o2(0xEC,0xF9),
+     o2(0xF8,0xAD), o2(0xF2,0xC2), o2(0xF6,0xC3), o2(0xD7,0xD2),
+     o2(0xF9,0xA2), o2(0xF0,0xD6), o2(0xF0,0xFA), o2(0xF6,0xE0),
+     o2(0xE9,0xF3), o2(0xF2,0xC3), o2(0xD4,0xAB), o2(0xCA,0xB3),
+     o2(0xCD,0xA6), o2(0xCD,0xC3),
+
+#define to_EUC_KR_E7_A8 WORDINDEX2INFO(4829)
+    to_EUC_KR_E7_A8_offsets,
+    to_EUC_KR_E7_A8_infos,
+
+#define to_EUC_KR_E7_A9_infos WORDINDEX2INFO(4831)
+           INVALID, o2(0xCD,0xDA),         UNDEF, o2(0xD9,0xCF),
+     o2(0xF6,0xC4), o2(0xEE,0xDD), o2(0xE7,0xC4), o2(0xE2,0xB4),
+     o2(0xDF,0xE2), o2(0xE7,0xDB), o2(0xE8,0xB1), o2(0xFC,0xAE),
+     o2(0xE5,0xCD), o2(0xFA,0xEB), o2(0xCF,0xBC), o2(0xCF,0xE2),
+     o2(0xCD,0xF6), o2(0xEF,0xF0), o2(0xF4,0xBE),
+
+#define to_EUC_KR_E7_A9 WORDINDEX2INFO(4850)
+    to_EUC_KR_E7_A9_offsets,
+    to_EUC_KR_E7_A9_infos,
+
+#define to_EUC_KR_E7_AA_infos WORDINDEX2INFO(4852)
+           INVALID,         UNDEF, o2(0xD4,0xCD), o2(0xF3,0xB8),
+     o2(0xE9,0xA1), o2(0xF2,0xF2), o2(0xF3,0xEB), o2(0xF0,0xD7),
+     o2(0xCF,0xD7), o2(0xCF,0xDF), o2(0xE8,0xC0), o2(0xE8,0xC1),
+     o2(0xCF,0xE3), o2(0xE9,0xA2), o2(0xD0,0xAA),
+
+#define to_EUC_KR_E7_AA WORDINDEX2INFO(4867)
+    to_EUC_KR_E7_AA_offsets,
+    to_EUC_KR_E7_AA_infos,
+
+#define to_EUC_KR_E7_AB_infos WORDINDEX2INFO(4869)
+           INVALID,         UNDEF, o2(0xF3,0xC1), o2(0xD0,0xAB),
+     o2(0xD4,0xE4), o2(0xEF,0xBC), o2(0xD8,0xA1), o2(0xD9,0xDF),
+     o2(0xF3,0xD7), o2(0xDC,0xBD), o2(0xCC,0xE5), o2(0xED,0xF1),
+     o2(0xF1,0xE2), o2(0xD4,0xDB), o2(0xE2,0xB5), o2(0xCA,0xE6),
+     o2(0xD3,0xAE), o2(0xCC,0xE6), o2(0xF1,0xD3), o2(0xF5,0xE7),
+     o2(0xCA,0xDA),
+
+#define to_EUC_KR_E7_AB WORDINDEX2INFO(4890)
+    to_EUC_KR_E7_AB_offsets,
+    to_EUC_KR_E7_AB_infos,
+
+#define to_EUC_KR_E7_AC_infos WORDINDEX2INFO(4892)
+           INVALID,         UNDEF, o2(0xFB,0xEE), o2(0xE1,0xC5),
+     o2(0xDF,0xE9), o2(0xEE,0xDE), o2(0xF7,0xC2), o2(0xD8,0xA2),
+     o2(0xDD,0xAC), o2(0xF0,0xAF), o2(0xD6,0xBD), o2(0xE1,0xAB),
+
+#define to_EUC_KR_E7_AC WORDINDEX2INFO(4904)
+    to_EUC_KR_E7_AC_offsets,
+    to_EUC_KR_E7_AC_infos,
+
+#define to_EUC_KR_E7_AD_infos WORDINDEX2INFO(4906)
+           INVALID,         UNDEF, o2(0xF9,0xB6), o2(0xD4,0xF5),
+     o2(0xD0,0xC9), o2(0xEF,0xA7), o2(0xE2,0xEC), o2(0xDB,0xEA),
+     o2(0xCE,0xCC), o2(0xF5,0xE8), o2(0xF7,0xD5), o2(0xD3,0xCD),
+     o2(0xF3,0xFE), o2(0xD0,0xB5), o2(0xE0,0xFE), o2(0xDF,0xFB),
+     o2(0xE6,0xDD), o2(0xE8,0xA4),
+
+#define to_EUC_KR_E7_AD WORDINDEX2INFO(4924)
+    to_EUC_KR_E7_AD_offsets,
+    to_EUC_KR_E7_AD_infos,
+
+#define to_EUC_KR_E7_AE_infos WORDINDEX2INFO(4926)
+           INVALID,         UNDEF, o2(0xCB,0xCD), o2(0xEF,0xA8),
+     o2(0xEE,0xB4), o2(0xDA,0xD8), o2(0xD1,0xB9), o2(0xDF,0xA9),
+     o2(0xF3,0xB0), o2(0xCC,0xC4), o2(0xCE,0xB7), o2(0xEF,0xA9),
+     o2(0xDF,0xD5), o2(0xED,0xD7), o2(0xEE,0xC6),
+
+#define to_EUC_KR_E7_AE WORDINDEX2INFO(4941)
+    to_EUC_KR_E7_AE_offsets,
+    to_EUC_KR_E7_AE_infos,
+
+#define to_EUC_KR_E7_AF_infos WORDINDEX2INFO(4943)
+           INVALID, o2(0xEF,0xBD), o2(0xFC,0xD6),         UNDEF,
+     o2(0xDB,0xF4), o2(0xEF,0xAA), o2(0xF8,0xB9), o2(0xF5,0xE9),
+     o2(0xE3,0xD9), o2(0xE1,0xC6), o2(0xD4,0xBF), o2(0xDE,0xE8),
+
+#define to_EUC_KR_E7_AF WORDINDEX2INFO(4955)
+    to_EUC_KR_E7_AF_offsets,
+    to_EUC_KR_E7_AF_infos,
+
+#define to_EUC_KR_E7_B0_infos WORDINDEX2INFO(4957)
+           INVALID,         UNDEF, o2(0xF0,0xEA), o2(0xF3,0xC2),
+     o2(0xD3,0xAF), o2(0xCA,0xDB), o2(0xFC,0xD7), o2(0xED,0xD8),
+     o2(0xE1,0xC7), o2(0xF4,0xD8), o2(0xD6,0xB3), o2(0xDD,0xAD),
+
+#define to_EUC_KR_E7_B0 WORDINDEX2INFO(4969)
+    to_EUC_KR_E7_B0_offsets,
+    to_EUC_KR_E7_B0_infos,
+
+#define to_EUC_KR_E7_B1_infos WORDINDEX2INFO(4971)
+           INVALID,         UNDEF, o2(0xD5,0xBE), o2(0xF1,0xC3),
+     o2(0xEE,0xDF), o2(0xD6,0xEB), o2(0xF4,0xD9), o2(0xD7,0xE6),
+     o2(0xDA,0xB7),
+
+#define to_EUC_KR_E7_B1 WORDINDEX2INFO(4980)
+    to_EUC_KR_E7_B1_offsets,
+    to_EUC_KR_E7_B1_infos,
+
+#define to_EUC_KR_E7_B2_infos WORDINDEX2INFO(4982)
+           INVALID,         UNDEF, o2(0xDD,0xFB), o2(0xDD,0xCF),
+     o2(0xD8,0xA3), o2(0xDA,0xD9), o2(0xF0,0xD8), o2(0xEF,0xC4),
+     o2(0xE1,0xD8), o2(0xF1,0xD4), o2(0xED,0xF2), o2(0xD5,0xDB),
+     o2(0xD5,0xDC), o2(0xF3,0xC4), o2(0xCB,0xD7), o2(0xE2,0xB6),
+     o2(0xEF,0xF1),
+
+#define to_EUC_KR_E7_B2 WORDINDEX2INFO(4999)
+    to_EUC_KR_E7_B2_offsets,
+    to_EUC_KR_E7_B2_infos,
+
+#define to_EUC_KR_E7_B3_infos WORDINDEX2INFO(5001)
+           INVALID,         UNDEF, o2(0xFB,0xD5), o2(0xD3,0xD8),
+     o2(0xDD,0xD0), o2(0xF0,0xD9), o2(0xCB,0xB3), o2(0xD5,0xDD),
+     o2(0xCD,0xA7), o2(0xD0,0xAC),
+
+#define to_EUC_KR_E7_B3 WORDINDEX2INFO(5011)
+    to_EUC_KR_E7_B3_offsets,
+    to_EUC_KR_E7_B3_infos,
+
+#define to_EUC_KR_E7_B4_infos WORDINDEX2INFO(5013)
+           INVALID, o2(0xD1,0xBA),         UNDEF, o2(0xF1,0xC4),
+     o2(0xE5,0xB3), o2(0xFB,0xF5), o2(0xE9,0xE1), o2(0xFD,0xE0),
+     o2(0xFC,0xBC), o2(0xDA,0xA2), o2(0xDA,0xA3), o2(0xD2,0xA1),
+     o2(0xD2,0xEF), o2(0xE2,0xED), o2(0xDE,0xE9), o2(0xCE,0xDC),
+     o2(0xF2,0xB5), o2(0xD0,0xE4), o2(0xDD,0xD1), o2(0xE1,0xC8),
+     o2(0xDB,0xB7), o2(0xDF,0xE3), o2(0xED,0xB9), o2(0xF1,0xC5),
+     o2(0xF3,0xCF), o2(0xD7,0xAB), o2(0xE1,0xAC), o2(0xE3,0xEB),
+     o2(0xEE,0xC7), o2(0xE1,0xC9), o2(0xCA,0xFA),
+
+#define to_EUC_KR_E7_B4 WORDINDEX2INFO(5044)
+    to_EUC_KR_E7_B4_offsets,
+    to_EUC_KR_E7_B4_infos,
+
+#define to_EUC_KR_E7_B5_infos WORDINDEX2INFO(5046)
+           INVALID,         UNDEF, o2(0xF0,0xFB), o2(0xFA,0xE1),
+     o2(0xF0,0xDA), o2(0xCC,0xE7), o2(0xDA,0xF4), o2(0xCC,0xBF),
+     o2(0xCE,0xED), o2(0xD5,0xA9), o2(0xFA,0xE2), o2(0xD0,0xE5),
+     o2(0xEB,0xD6), o2(0xEC,0xDF), o2(0xDF,0xFC), o2(0xF7,0xD6),
+     o2(0xDE,0xEA), o2(0xCB,0xB4), o2(0xEF,0xBE), o2(0xCC,0xB5),
+     o2(0xCF,0xBD),
+
+#define to_EUC_KR_E7_B5 WORDINDEX2INFO(5067)
+    to_EUC_KR_E7_B5_offsets,
+    to_EUC_KR_E7_B5_infos,
+
+#define to_EUC_KR_E7_B6_infos WORDINDEX2INFO(5069)
+           INVALID,         UNDEF, o2(0xEF,0xF2), o2(0xE2,0xB7),
+     o2(0xCC,0xE8), o2(0xF0,0xFC), o2(0xD6,0xE0), o2(0xF1,0xC6),
+     o2(0xE2,0xB8), o2(0xEB,0xAB), o2(0xCB,0xB5), o2(0xD8,0xD1),
+     o2(0xF4,0xCE), o2(0xF3,0xF7), o2(0xD7,0xC6), o2(0xD1,0xBB),
+     o2(0xF7,0xAA), o2(0xED,0xCA), o2(0xD7,0xD3), o2(0xD8,0xFA),
+
+#define to_EUC_KR_E7_B6 WORDINDEX2INFO(5089)
+    to_EUC_KR_E7_B6_offsets,
+    to_EUC_KR_E7_B6_infos,
+
+#define to_EUC_KR_E7_B7_infos WORDINDEX2INFO(5091)
+           INVALID,         UNDEF, o2(0xF6,0xC5), o2(0xD1,0xCC),
+     o2(0xDD,0xFC), o2(0xDF,0xFD), o2(0xF9,0xE5), o2(0xE0,0xCA),
+     o2(0xF2,0xFD), o2(0xD3,0xB0), o2(0xF4,0xF3), o2(0xDA,0xC9),
+     o2(0xE6,0xDE), o2(0xF8,0xBA), o2(0xE8,0xD0), o2(0xD8,0xFB),
+     o2(0xEA,0xD5), o2(0xD6,0xA3), o2(0xF6,0xC6),
+
+#define to_EUC_KR_E7_B7 WORDINDEX2INFO(5110)
+    to_EUC_KR_E7_B7_offsets,
+    to_EUC_KR_E7_B7_infos,
+
+#define to_EUC_KR_E7_B8_infos WORDINDEX2INFO(5112)
+           INVALID,         UNDEF, o2(0xF2,0xDB), o2(0xE4,0xFC),
+     o2(0xE8,0xB2), o2(0xDA,0xDA), o2(0xF2,0xDC), o2(0xFB,0xD6),
+     o2(0xE9,0xB2), o2(0xEE,0xAD), o2(0xFA,0xE3), o2(0xDC,0xEE),
+     o2(0xF5,0xEA), o2(0xE6,0xE0), o2(0xF0,0xFD), o2(0xD7,0xAC),
+     o2(0xF5,0xC5), o2(0xEE,0xE0),
+
+#define to_EUC_KR_E7_B8 WORDINDEX2INFO(5130)
+    to_EUC_KR_E7_B8_offsets,
+    to_EUC_KR_E7_B8_infos,
+
+#define to_EUC_KR_E7_B9_infos WORDINDEX2INFO(5132)
+           INVALID,         UNDEF, o2(0xDB,0xE5), o2(0xDD,0xDE),
+     o2(0xD9,0xF0), o2(0xE9,0xA3), o2(0xF1,0xF9), o2(0xF2,0xC4),
+     o2(0xE0,0xCB), o2(0xE9,0xA4), o2(0xE2,0xB9), o2(0xE3,0xB1),
+     o2(0xFC,0xEB), o2(0xCD,0xA8), o2(0xCC,0xB6), o2(0xF0,0xDB),
+     o2(0xE6,0xBA), o2(0xCD,0xA9),
+
+#define to_EUC_KR_E7_B9 WORDINDEX2INFO(5150)
+    to_EUC_KR_E7_B9_offsets,
+    to_EUC_KR_E7_B9_infos,
+
+#define to_EUC_KR_E7_BA_infos WORDINDEX2INFO(5152)
+           INVALID,         UNDEF, o2(0xF3,0xC3), o2(0xE1,0xD9),
+     o2(0xEF,0xAB), o2(0xE7,0xC5), o2(0xE0,0xE9), o2(0xF3,0xC5),
+     o2(0xD4,0xC0), o2(0xD5,0xBF),
+
+#define to_EUC_KR_E7_BA WORDINDEX2INFO(5162)
+    to_EUC_KR_E7_BA_offsets,
+    to_EUC_KR_E7_BA_infos,
+
+#define to_EUC_KR_E7_BC_infos WORDINDEX2INFO(5164)
+           INVALID,         UNDEF, o2(0xDD,0xAE), o2(0xF9,0xFC),
+     o2(0xCC,0xC0),
+
+#define to_EUC_KR_E7_BC WORDINDEX2INFO(5169)
+    to_EUC_KR_E7_BC_offsets,
+    to_EUC_KR_E7_BC_infos,
+
+#define to_EUC_KR_E7_BD_infos WORDINDEX2INFO(5171)
+           INVALID,         UNDEF, o2(0xE5,0xA2), o2(0xCE,0xB8),
+     o2(0xD8,0xD2), o2(0xF9,0xD6), o2(0xF1,0xAA), o2(0xCE,0xD1),
+     o2(0xF6,0xC7), o2(0xDB,0xEB), o2(0xDF,0xFE), o2(0xD8,0xE1),
+     o2(0xF7,0xF3), o2(0xD7,0xE7),
+
+#define to_EUC_KR_E7_BD WORDINDEX2INFO(5185)
+    to_EUC_KR_E7_BD_offsets,
+    to_EUC_KR_E7_BD_infos,
+
+#define to_EUC_KR_E7_BE_infos WORDINDEX2INFO(5187)
+           INVALID,         UNDEF, o2(0xD4,0xFE), o2(0xD1,0xBC),
+     o2(0xE5,0xCF), o2(0xCB,0xB6), o2(0xDA,0xB8), o2(0xCD,0xC4),
+     o2(0xD6,0xBE), o2(0xE2,0xBA), o2(0xCF,0xD8), o2(0xE0,0xCC),
+     o2(0xEB,0xF9), o2(0xFD,0xFD), o2(0xD7,0xE8), o2(0xCB,0xD8),
+     o2(0xE9,0xE2),
+
+#define to_EUC_KR_E7_BE WORDINDEX2INFO(5204)
+    to_EUC_KR_E7_BE_offsets,
+    to_EUC_KR_E7_BE_infos,
+
+#define to_EUC_KR_E7_BF_infos WORDINDEX2INFO(5206)
+           INVALID,         UNDEF, o2(0xE8,0xBA), o2(0xE3,0xC7),
+     o2(0xEC,0xCD), o2(0xEC,0xCE), o2(0xD6,0xBF), o2(0xE3,0xA7),
+     o2(0xDF,0xD6), o2(0xFD,0xE8), o2(0xEE,0xE1), o2(0xF6,0xA8),
+     o2(0xDD,0xFD), o2(0xF8,0xBB), o2(0xE8,0xD1), o2(0xF9,0xD7),
+     o2(0xCE,0xEE), o2(0xEC,0xCF),
+
+#define to_EUC_KR_E7_BF WORDINDEX2INFO(5224)
+    to_EUC_KR_E7_BF_offsets,
+    to_EUC_KR_E7_BF_infos,
+
+#define to_EUC_KR_E7_infos WORDINDEX2INFO(5226)
+             INVALID, to_EUC_KR_E7_80, to_EUC_KR_E7_81, to_EUC_KR_E7_82,
+     to_EUC_KR_E7_83, to_EUC_KR_E7_84, to_EUC_KR_E7_85, to_EUC_KR_E7_86,
+     to_EUC_KR_E7_87, to_EUC_KR_E7_88, to_EUC_KR_E7_89, to_EUC_KR_E7_8A,
+     to_EUC_KR_E7_8B, to_EUC_KR_E7_8C, to_EUC_KR_E7_8D, to_EUC_KR_E7_8E,
+     to_EUC_KR_E7_8F, to_EUC_KR_E7_90, to_EUC_KR_E7_91, to_EUC_KR_E7_92,
+     to_EUC_KR_E7_93, to_EUC_KR_E7_94, to_EUC_KR_E7_95, to_EUC_KR_E7_96,
+     to_EUC_KR_E7_97, to_EUC_KR_E7_98, to_EUC_KR_E7_99, to_EUC_KR_E7_9A,
+     to_EUC_KR_E7_9B, to_EUC_KR_E7_9C, to_EUC_KR_E7_9D, to_EUC_KR_E7_9E,
+     to_EUC_KR_E7_9F, to_EUC_KR_E7_A0, to_EUC_KR_E7_A1, to_EUC_KR_E7_A2,
+     to_EUC_KR_E7_A3, to_EUC_KR_E7_A4, to_EUC_KR_E7_A5, to_EUC_KR_E7_A6,
+     to_EUC_KR_E7_A7, to_EUC_KR_E7_A8, to_EUC_KR_E7_A9, to_EUC_KR_E7_AA,
+     to_EUC_KR_E7_AB, to_EUC_KR_E7_AC, to_EUC_KR_E7_AD, to_EUC_KR_E7_AE,
+     to_EUC_KR_E7_AF, to_EUC_KR_E7_B0, to_EUC_KR_E7_B1, to_EUC_KR_E7_B2,
+     to_EUC_KR_E7_B3, to_EUC_KR_E7_B4, to_EUC_KR_E7_B5, to_EUC_KR_E7_B6,
+     to_EUC_KR_E7_B7, to_EUC_KR_E7_B8, to_EUC_KR_E7_B9, to_EUC_KR_E7_BA,
+        to_EUC_KR_C6, to_EUC_KR_E7_BC, to_EUC_KR_E7_BD, to_EUC_KR_E7_BE,
+     to_EUC_KR_E7_BF,
+
+#define to_EUC_KR_E7 WORDINDEX2INFO(5291)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E7_infos,
+
+#define to_EUC_KR_E8_80_infos WORDINDEX2INFO(5293)
+           INVALID, o2(0xE9,0xA5), o2(0xD6,0xD5),         UNDEF,
+     o2(0xCD,0xC5), o2(0xED,0xBA), o2(0xD1,0xBD), o2(0xCF,0xBE),
+     o2(0xEC,0xBB), o2(0xD2,0xB1), o2(0xCC,0xE9), o2(0xD9,0xC4),
+     o2(0xE9,0xFC), o2(0xD1,0xBE), o2(0xEC,0xBC), o2(0xE5,0xAD),
+     o2(0xF7,0xB0), o2(0xCC,0xEA),
+
+#define to_EUC_KR_E8_80 WORDINDEX2INFO(5311)
+    to_EUC_KR_E8_80_offsets,
+    to_EUC_KR_E8_80_infos,
+
+#define to_EUC_KR_E8_81_infos WORDINDEX2INFO(5313)
+           INVALID,         UNDEF, o2(0xD3,0xC4), o2(0xD6,0xC0),
+     o2(0xD6,0xFD), o2(0xE1,0xA1), o2(0xDE,0xBD), o2(0xF6,0xA9),
+     o2(0xDA,0xA4), o2(0xD6,0xA4), o2(0xF5,0xC6), o2(0xE1,0xA2),
+     o2(0xE9,0xC6), o2(0xF2,0xC5), o2(0xF4,0xE9), o2(0xD6,0xEC),
+     o2(0xEB,0xD3),
+
+#define to_EUC_KR_E8_81 WORDINDEX2INFO(5330)
+    to_EUC_KR_E8_81_offsets,
+    to_EUC_KR_E8_81_infos,
+
+#define to_EUC_KR_E8_82_infos WORDINDEX2INFO(5332)
+           INVALID,         UNDEF, o2(0xEC,0xBD), o2(0xE2,0xDC),
+     o2(0xDE,0xEB), o2(0xF0,0xDC), o2(0xEB,0xBF), o2(0xD7,0xCE),
+     o2(0xD1,0xBF), o2(0xF5,0xAB), o2(0xF9,0xFD), o2(0xCA,0xDC),
+     o2(0xCD,0xC6), o2(0xF2,0xB6), o2(0xDD,0xFE), o2(0xCC,0xB7),
+     o2(0xDB,0xB8), o2(0xD0,0xE9), o2(0xCE,0xDD), o2(0xEB,0xC0),
+     o2(0xFD,0xA2), o2(0xF8,0xCB),
+
+#define to_EUC_KR_E8_82 WORDINDEX2INFO(5354)
+    to_EUC_KR_E8_82_offsets,
+    to_EUC_KR_E8_82_infos,
+
+#define to_EUC_KR_E8_83_infos WORDINDEX2INFO(5356)
+           INVALID,         UNDEF, o2(0xEA,0xD6), o2(0xF1,0xB0),
+     o2(0xDB,0xCE), o2(0xF7,0xC3), o2(0xDB,0xCF), o2(0xCB,0xA4),
+     o2(0xF8,0xE0), o2(0xFB,0xD7), o2(0xEB,0xCA), o2(0xE0,0xA1),
+     o2(0xCE,0xCD), o2(0xD4,0xDC), o2(0xFD,0xD8), o2(0xD2,0xF6),
+
+#define to_EUC_KR_E8_83 WORDINDEX2INFO(5372)
+    to_EUC_KR_E8_83_offsets,
+    to_EUC_KR_E8_83_infos,
+
+#define to_EUC_KR_E8_84_infos WORDINDEX2INFO(5374)
+           INVALID,         UNDEF, o2(0xF2,0xB7), o2(0xFA,0xF6),
+     o2(0xF6,0xAA), o2(0xFA,0xF7), o2(0xD8,0xE6), o2(0xF4,0xB1),
+     o2(0xE8,0xD2), o2(0xCA,0xC5), o2(0xCC,0xEB), o2(0xE2,0xEE),
+     o2(0xE2,0xBB), o2(0xF7,0xAD), o2(0xF8,0xE1), o2(0xF3,0xEC),
+     o2(0xDE,0xA1),
+
+#define to_EUC_KR_E8_84 WORDINDEX2INFO(5391)
+    to_EUC_KR_E8_84_offsets,
+    to_EUC_KR_E8_84_infos,
+
+#define to_EUC_KR_E8_85_infos WORDINDEX2INFO(5393)
+           INVALID,         UNDEF, o2(0xE4,0xFD), o2(0xE3,0xEC),
+     o2(0xDD,0xAF), o2(0xDD,0xB0), o2(0xCB,0xB7), o2(0xE8,0xD3),
+     o2(0xE1,0xA3), o2(0xD2,0xE0), o2(0xF0,0xFE), o2(0xE9,0xA6),
+     o2(0xCB,0xF2), o2(0xED,0xF3), o2(0xDC,0xD9), o2(0xE0,0xCD),
+     o2(0xF7,0xDA),
+
+#define to_EUC_KR_E8_85 WORDINDEX2INFO(5410)
+    to_EUC_KR_E8_85_offsets,
+    to_EUC_KR_E8_85_infos,
+
+#define to_EUC_KR_E8_86_infos WORDINDEX2INFO(5412)
+           INVALID, o2(0xDB,0xB9),         UNDEF, o2(0xCC,0xAE),
+     o2(0xDA,0xDB), o2(0xCD,0xC7), o2(0xDD,0xB1), o2(0xD8,0xAF),
+     o2(0xE3,0xA3), o2(0xCE,0xEF), o2(0xF2,0xF3), o2(0xF8,0xB3),
+     o2(0xE0,0xCE), o2(0xF5,0xFD), o2(0xEB,0xEC), o2(0xD3,0xC5),
+     o2(0xFC,0xEC), o2(0xD2,0xDB),
+
+#define to_EUC_KR_E8_86 WORDINDEX2INFO(5430)
+    to_EUC_KR_E8_86_offsets,
+    to_EUC_KR_E8_86_infos,
+
+#define to_EUC_KR_E8_87_infos WORDINDEX2INFO(5432)
+           INVALID, o2(0xD4,0xEB),         UNDEF, o2(0xDE,0xA2),
+     o2(0xE5,0xE6), o2(0xF0,0xB0), o2(0xD5,0xC4), o2(0xED,0xF4),
+     o2(0xE3,0xED), o2(0xE8,0xC2), o2(0xED,0xF5), o2(0xD7,0xFC),
+     o2(0xED,0xBB), o2(0xF6,0xAB), o2(0xF2,0xB8), o2(0xF6,0xC8),
+     o2(0xD3,0xE6), o2(0xF2,0xDD), o2(0xCF,0xBF), o2(0xEB,0xAC),
+
+#define to_EUC_KR_E8_87 WORDINDEX2INFO(5452)
+    to_EUC_KR_E8_87_offsets,
+    to_EUC_KR_E8_87_infos,
+
+#define to_EUC_KR_E8_88_infos WORDINDEX2INFO(5454)
+           INVALID,         UNDEF, o2(0xCF,0xC0), o2(0xE6,0xA8),
+     o2(0xFD,0xE9), o2(0xCF,0xC1), o2(0xE0,0xDF), o2(0xDE,0xEC),
+     o2(0xE0,0xA2), o2(0xF4,0xBF), o2(0xE2,0xEF), o2(0xD9,0xF1),
+     o2(0xF1,0xC7), o2(0xCB,0xB8), o2(0xF9,0xFE), o2(0xDB,0xBA),
+     o2(0xDA,0xF5), o2(0xF6,0xEC), o2(0xDA,0xDC), o2(0xFA,0xE4),
+     o2(0xE0,0xCF),
+
+#define to_EUC_KR_E8_88 WORDINDEX2INFO(5475)
+    to_EUC_KR_E8_88_offsets,
+    to_EUC_KR_E8_88_infos,
+
+#define to_EUC_KR_E8_89_infos WORDINDEX2INFO(5477)
+           INVALID, o2(0xDD,0xB2),         UNDEF, o2(0xE6,0xA9),
+     o2(0xEF,0xF3), o2(0xF3,0xED), o2(0xEB,0xFA), o2(0xF9,0xE6),
+     o2(0xCA,0xDD), o2(0xD5,0xDE), o2(0xCA,0xDE), o2(0xDF,0xE4),
+     o2(0xE6,0xFD), o2(0xF5,0xAC), o2(0xE4,0xF5),
+
+#define to_EUC_KR_E8_89 WORDINDEX2INFO(5492)
+    to_EUC_KR_E8_89_offsets,
+    to_EUC_KR_E8_89_infos,
+
+#define to_EUC_KR_E8_8A_infos WORDINDEX2INFO(5494)
+           INVALID,         UNDEF, o2(0xE9,0xE3), o2(0xED,0xCB),
+     o2(0xCF,0xE4), o2(0xD8,0xD3), o2(0xDD,0xB3), o2(0xD4,0xEC),
+     o2(0xF2,0xB9), o2(0xDF,0xB7), o2(0xCB,0xCE), o2(0xFB,0xD8),
+     o2(0xD0,0xD9), o2(0xDD,0xD2), o2(0xF7,0xF4), o2(0xE7,0xDC),
+     o2(0xE4,0xA5), o2(0xFC,0xA3), o2(0xDB,0xBB), o2(0xF2,0xBA),
+     o2(0xE9,0xFD), o2(0xD0,0xCA), o2(0xF5,0xD6), o2(0xD9,0xC5),
+     o2(0xE4,0xB4), o2(0xED,0xA7),
+
+#define to_EUC_KR_E8_8A WORDINDEX2INFO(5520)
+    to_EUC_KR_E8_8A_offsets,
+    to_EUC_KR_E8_8A_infos,
+
+#define to_EUC_KR_E8_8B_infos WORDINDEX2INFO(5522)
+           INVALID,         UNDEF, o2(0xEA,0xBD), o2(0xE6,0xFE),
+     o2(0xF7,0xC4), o2(0xF5,0xAD), o2(0xD9,0xE0), o2(0xCA,0xB4),
+     o2(0xF8,0xE2), o2(0xCF,0xC2), o2(0xEC,0xBE), o2(0xE5,0xB4),
+     o2(0xCD,0xC8), o2(0xEE,0xC8), o2(0xE7,0xC8), o2(0xCD,0xC9),
+     o2(0xF9,0xB7),
+
+#define to_EUC_KR_E8_8B WORDINDEX2INFO(5539)
+    to_EUC_KR_E8_8B_offsets,
+    to_EUC_KR_E8_8B_infos,
+
+#define to_EUC_KR_E8_8C_infos WORDINDEX2INFO(5541)
+           INVALID,         UNDEF, o2(0xF1,0xE8), o2(0xD9,0xF2),
+     o2(0xDB,0xF5), o2(0xCA,0xB5), o2(0xD9,0xC6), o2(0xD8,0xC9),
+     o2(0xD9,0xAB), o2(0xED,0xBC), o2(0xD8,0xD4), o2(0xDC,0xDA),
+     o2(0xE2,0xBC), o2(0xFC,0xED), o2(0xEC,0xE0), o2(0xD2,0xFE),
+     o2(0xE9,0xC7), o2(0xE6,0xAA),
+
+#define to_EUC_KR_E8_8C WORDINDEX2INFO(5559)
+    to_EUC_KR_E8_8C_offsets,
+    to_EUC_KR_E8_8C_infos,
+
+#define to_EUC_KR_E8_8D_infos WORDINDEX2INFO(5561)
+           INVALID, o2(0xE2,0xF0),         UNDEF, o2(0xFA,0xBB),
+     o2(0xF5,0xAE), o2(0xFB,0xAA), o2(0xEC,0xFB), o2(0xEC,0xBF),
+     o2(0xFC,0xD8), o2(0xD4,0xE5), o2(0xF9,0xC3), o2(0xEE,0xE2),
+
+#define to_EUC_KR_E8_8D WORDINDEX2INFO(5573)
+    to_EUC_KR_E8_8D_offsets,
+    to_EUC_KR_E8_8D_infos,
+
+#define to_EUC_KR_E8_8E_infos WORDINDEX2INFO(5575)
+           INVALID,         UNDEF, o2(0xD7,0xE9), o2(0xED,0xF6),
+     o2(0xDE,0xED), o2(0xCC,0xEC), o2(0xE3,0xEE), o2(0xE8,0xD4),
+     o2(0xFA,0xF8), o2(0xDD,0xB4), o2(0xE4,0xB5), o2(0xD8,0xB0),
+     o2(0xD8,0xD5),
+
+#define to_EUC_KR_E8_8E WORDINDEX2INFO(5588)
+    to_EUC_KR_E8_8E_offsets,
+    to_EUC_KR_E8_8E_infos,
+
+#define to_EUC_KR_E8_8F_infos WORDINDEX2INFO(5590)
+           INVALID,         UNDEF, o2(0xF4,0xEA), o2(0xCE,0xB9),
+     o2(0xD6,0xE1), o2(0xCF,0xD2), o2(0xD0,0xB6), o2(0xCE,0xA2),
+     o2(0xF3,0xEE), o2(0xF3,0xF8), o2(0xDC,0xCC), o2(0xD0,0xCB),
+     o2(0xFC,0xA4), o2(0xCD,0xCA), o2(0xD7,0xD4), o2(0xDE,0xA3),
+     o2(0xE4,0xE0), o2(0xEE,0xC9), o2(0xE2,0xDD),
+
+#define to_EUC_KR_E8_8F WORDINDEX2INFO(5609)
+    to_EUC_KR_E8_8F_offsets,
+    to_EUC_KR_E8_8F_infos,
+
+#define to_EUC_KR_E8_90_infos WORDINDEX2INFO(5611)
+           INVALID,         UNDEF, o2(0xF5,0xFE), o2(0xD4,0xAC),
+     o2(0xD5,0xD1), o2(0xD8,0xF0), o2(0xF8,0xC3), o2(0xEA,0xD7),
+     o2(0xF5,0xD7), o2(0xD8,0xBF), o2(0xFD,0xC0), o2(0xEB,0xAD),
+     o2(0xD5,0xAA),
+
+#define to_EUC_KR_E8_90 WORDINDEX2INFO(5624)
+    to_EUC_KR_E8_90_offsets,
+    to_EUC_KR_E8_90_infos,
+
+#define to_EUC_KR_E8_91_infos WORDINDEX2INFO(5626)
+           INVALID,         UNDEF, o2(0xE7,0xA8), o2(0xEE,0xCA),
+     o2(0xCA,0xE7), o2(0xF8,0xE3), o2(0xD4,0xDD), o2(0xEA,0xD8),
+     o2(0xFB,0xD9), o2(0xED,0xF7), o2(0xE5,0xB5), o2(0xD0,0xAD),
+     o2(0xF1,0xF1),
+
+#define to_EUC_KR_E8_91 WORDINDEX2INFO(5639)
+    to_EUC_KR_E8_91_offsets,
+    to_EUC_KR_E8_91_infos,
+
+#define to_EUC_KR_E8_92_infos WORDINDEX2INFO(5641)
+           INVALID,         UNDEF, o2(0xE2,0xBD), o2(0xE3,0xC8),
+     o2(0xD9,0xD5), o2(0xDF,0xAA), o2(0xDB,0xBC), o2(0xF8,0xE4),
+     o2(0xF1,0xFA), o2(0xE5,0xB6), o2(0xF3,0xEF), o2(0xFB,0xDA),
+
+#define to_EUC_KR_E8_92 WORDINDEX2INFO(5653)
+    to_EUC_KR_E8_92_offsets,
+    to_EUC_KR_E8_92_infos,
+
+#define to_EUC_KR_E8_93_infos WORDINDEX2INFO(5655)
+           INVALID, o2(0xE1,0xE0),         UNDEF, o2(0xD9,0xAC),
+     o2(0xF5,0xEB), o2(0xE0,0xB6), o2(0xE9,0xC8), o2(0xCB,0xCF),
+     o2(0xE3,0xC9), o2(0xDE,0xEE), o2(0xE2,0xBE), o2(0xDC,0xEF),
+     o2(0xD6,0xA5), o2(0xE2,0xF1), o2(0xD6,0xFE),
+
+#define to_EUC_KR_E8_93 WORDINDEX2INFO(5670)
+    to_EUC_KR_E8_93_offsets,
+    to_EUC_KR_E8_93_infos,
+
+#define to_EUC_KR_E8_94_infos WORDINDEX2INFO(5672)
+           INVALID,         UNDEF, o2(0xD9,0xA1), o2(0xD8,0xC0),
+     o2(0xDC,0xDB), o2(0xED,0xBD), o2(0xDF,0xB8), o2(0xEA,0xA5),
+     o2(0xD7,0xAD), o2(0xF3,0xF9), o2(0xED,0xF8), o2(0xF5,0xC7),
+     o2(0xE1,0xCA), o2(0xEB,0xE3), o2(0xF2,0xDE), o2(0xF8,0xCC),
+     o2(0xEA,0xD9),
+
+#define to_EUC_KR_E8_94 WORDINDEX2INFO(5689)
+    to_EUC_KR_E8_94_offsets,
+    to_EUC_KR_E8_94_infos,
+
+#define to_EUC_KR_E8_95_infos WORDINDEX2INFO(5691)
+           INVALID,         UNDEF, o2(0xD3,0xC6), o2(0xDB,0xE6),
+     o2(0xF5,0xAF), o2(0xCE,0xF0), o2(0xE9,0xFE), o2(0xFB,0xB6),
+     o2(0xE2,0xF2), o2(0xCF,0xF2), o2(0xF7,0xB9), o2(0xD9,0xF3),
+     o2(0xE1,0xCB),
+
+#define to_EUC_KR_E8_95 WORDINDEX2INFO(5704)
+    to_EUC_KR_E8_95_offsets,
+    to_EUC_KR_E8_95_infos,
+
+#define to_EUC_KR_E8_96_infos WORDINDEX2INFO(5706)
+           INVALID,         UNDEF, o2(0xDA,0xDD), o2(0xDA,0xB9),
+     o2(0xEB,0xFB), o2(0xCB,0xB9), o2(0xED,0xF9), o2(0xE0,0xE0),
+     o2(0xF4,0xC0), o2(0xFD,0xBC), o2(0xDF,0xB1), o2(0xE3,0xEF),
+     o2(0xE0,0xA3), o2(0xFD,0xB9), o2(0xF0,0xB1),
+
+#define to_EUC_KR_E8_96 WORDINDEX2INFO(5721)
+    to_EUC_KR_E8_96_offsets,
+    to_EUC_KR_E8_96_infos,
+
+#define to_EUC_KR_E8_97_infos WORDINDEX2INFO(5723)
+           INVALID,         UNDEF, o2(0xCD,0xCB), o2(0xED,0xBE),
+     o2(0xD5,0xC0), o2(0xE3,0xF0), o2(0xED,0xFA), o2(0xE9,0xE4),
+     o2(0xD5,0xED), o2(0xE7,0xDD), o2(0xD4,0xF6), o2(0xE5,0xB7),
+     o2(0xDB,0xE7), o2(0xE2,0xBF), o2(0xEE,0xCB), o2(0xD7,0xF4),
+     o2(0xF0,0xDD), o2(0xCE,0xAB),
+
+#define to_EUC_KR_E8_97 WORDINDEX2INFO(5741)
+    to_EUC_KR_E8_97_offsets,
+    to_EUC_KR_E8_97_infos,
+
+#define to_EUC_KR_E8_98_infos WORDINDEX2INFO(5743)
+           INVALID,         UNDEF, o2(0xE7,0xDE), o2(0xD6,0xD6),
+     o2(0xE1,0xCC), o2(0xE8,0xB3), o2(0xE5,0xEE), o2(0xDC,0xA2),
+     o2(0xE0,0xD0), o2(0xD5,0xB5), o2(0xD5,0xA1),
+
+#define to_EUC_KR_E8_98 WORDINDEX2INFO(5754)
+    to_EUC_KR_E8_98_offsets,
+    to_EUC_KR_E8_98_infos,
+
+#define to_EUC_KR_E8_99_infos WORDINDEX2INFO(5756)
+           INVALID,         UNDEF, o2(0xFB,0xDB), o2(0xF9,0xCB),
+     o2(0xCB,0xF3), o2(0xF4,0xA5), o2(0xFA,0xC8), o2(0xD6,0xD7),
+     o2(0xE9,0xE5), o2(0xFB,0xDC), o2(0xFD,0xD0), o2(0xFB,0xF6),
+
+#define to_EUC_KR_E8_99 WORDINDEX2INFO(5768)
+    to_EUC_KR_E8_99_offsets,
+    to_EUC_KR_E8_99_infos,
+
+#define to_EUC_KR_E8_9A_infos WORDINDEX2INFO(5770)
+           INVALID,         UNDEF, o2(0xDA,0xA5), o2(0xDB,0xBD),
+     o2(0xEC,0xE2), o2(0xCD,0xF7), o2(0xF0,0xDE), o2(0xF6,0xC9),
+
+#define to_EUC_KR_E8_9A WORDINDEX2INFO(5778)
+    to_EUC_KR_E8_9A_offsets,
+    to_EUC_KR_E8_9A_infos,
+
+#define to_EUC_KR_E8_9B_infos WORDINDEX2INFO(5780)
+           INVALID,         UNDEF, o2(0xDE,0xEF), o2(0xD3,0xB1),
+     o2(0xFC,0xEE), o2(0xE8,0xC3), o2(0xF1,0xC8), o2(0xCE,0xF1),
+     o2(0xF9,0xED), o2(0xF2,0xF4), o2(0xE4,0xB6),
+
+#define to_EUC_KR_E8_9B WORDINDEX2INFO(5791)
+    to_EUC_KR_E8_9B_offsets,
+    to_EUC_KR_E8_9B_infos,
+
+#define to_EUC_KR_E8_9C_infos WORDINDEX2INFO(5793)
+           INVALID, o2(0xF5,0xB9),         UNDEF, o2(0xDC,0xF0),
+     o2(0xE3,0xF1), o2(0xE8,0xA5), o2(0xF2,0xBB), o2(0xDE,0xA4),
+     o2(0xDA,0xCC),
+
+#define to_EUC_KR_E8_9C WORDINDEX2INFO(5802)
+    to_EUC_KR_E8_9C_offsets,
+    to_EUC_KR_E8_9C_infos,
+
+#define to_EUC_KR_E8_9D_infos WORDINDEX2INFO(5804)
+           INVALID,         UNDEF, o2(0xCA,0xE9), o2(0xE3,0xDA),
+     o2(0xFC,0xD9), o2(0xEA,0xDA), o2(0xF9,0xC4), o2(0xE3,0xA4),
+     o2(0xFB,0xDD), o2(0xEF,0xCA), o2(0xE8,0xC4),
+
+#define to_EUC_KR_E8_9D WORDINDEX2INFO(5815)
+    to_EUC_KR_E8_9D_offsets,
+    to_EUC_KR_E8_9D_infos,
+
+#define to_EUC_KR_E8_9E_infos WORDINDEX2INFO(5817)
+           INVALID,         UNDEF, o2(0xD5,0xCC), o2(0xEB,0xD7),
+     o2(0xD9,0xAD), o2(0xFB,0xAB), o2(0xD3,0xD9), o2(0xD5,0xA2),
+
+#define to_EUC_KR_E8_9E WORDINDEX2INFO(5825)
+    to_EUC_KR_E8_9E_offsets,
+    to_EUC_KR_E8_9E_infos,
+
+#define to_EUC_KR_E8_9F_infos WORDINDEX2INFO(5827)
+           INVALID,         UNDEF, o2(0xF6,0xDE), o2(0xDA,0xF6),
+     o2(0xE0,0xD1), o2(0xE9,0xA8), o2(0xF5,0xF9), o2(0xFA,0xAF),
+     o2(0xEB,0xFC), o2(0xE0,0xEA),
+
+#define to_EUC_KR_E8_9F WORDINDEX2INFO(5837)
+    to_EUC_KR_E8_9F_offsets,
+    to_EUC_KR_E8_9F_infos,
+
+#define to_EUC_KR_E8_A0_infos WORDINDEX2INFO(5839)
+           INVALID,         UNDEF, o2(0xE3,0xB2), o2(0xD5,0xC5),
+     o2(0xF1,0xE3), o2(0xD5,0xEE), o2(0xCD,0xCC), o2(0xED,0xD9),
+     o2(0xD8,0xC1),
+
+#define to_EUC_KR_E8_A0 WORDINDEX2INFO(5848)
+    to_EUC_KR_E8_A0_offsets,
+    to_EUC_KR_E8_A0_infos,
+
+#define to_EUC_KR_E8_A1_infos WORDINDEX2INFO(5850)
+           INVALID, o2(0xFA,0xEC),         UNDEF, o2(0xF1,0xEB),
+     o2(0xFA,0xBC), o2(0xE6,0xE2), o2(0xFA,0xE5), o2(0xE2,0xFA),
+     o2(0xCA,0xB6), o2(0xE4,0xB7), o2(0xEA,0xDB), o2(0xF5,0xFA),
+     o2(0xFB,0xAC), o2(0xCF,0xC3), o2(0xEB,0xFD), o2(0xF8,0xFA),
+     o2(0xDF,0xB9), o2(0xE1,0xF1), o2(0xD2,0xA4), o2(0xF5,0xFB),
+     o2(0xD0,0xDA), o2(0xD0,0xDB),
+
+#define to_EUC_KR_E8_A1 WORDINDEX2INFO(5872)
+    to_EUC_KR_E8_A1_offsets,
+    to_EUC_KR_E8_A1_infos,
+
+#define to_EUC_KR_E8_A2_infos WORDINDEX2INFO(5874)
+           INVALID,         UNDEF, o2(0xEA,0xBE), o2(0xD9,0xB1),
+     o2(0xCA,0xB7), o2(0xD3,0xE7), o2(0xF8,0xE5), o2(0xD3,0xB2),
+     o2(0xE2,0xC0), o2(0xF2,0xDF), o2(0xCD,0xE5), o2(0xF9,0xAC),
+     o2(0xCD,0xCD),
+
+#define to_EUC_KR_E8_A2 WORDINDEX2INFO(5887)
+    to_EUC_KR_E8_A2_offsets,
+    to_EUC_KR_E8_A2_infos,
+
+#define to_EUC_KR_E8_A3_infos WORDINDEX2INFO(5889)
+           INVALID,         UNDEF, o2(0xEE,0xAE), o2(0xD6,0xAE),
+     o2(0xD7,0xEA), o2(0xE7,0xE0), o2(0xEB,0xAE), o2(0xCF,0xD9),
+     o2(0xDC,0xCD), o2(0xED,0xFB), o2(0xDE,0xF0), o2(0xD7,0xEB),
+     o2(0xDE,0xA5), o2(0xDF,0xD7), o2(0xDB,0xD0), o2(0xDB,0xD1),
+     o2(0xD5,0xA3), o2(0xF0,0xB2),
+
+#define to_EUC_KR_E8_A3 WORDINDEX2INFO(5907)
+    to_EUC_KR_E8_A3_offsets,
+    to_EUC_KR_E8_A3_infos,
+
+#define to_EUC_KR_E8_A4_infos WORDINDEX2INFO(5909)
+           INVALID,         UNDEF, o2(0xDC,0xDC), o2(0xCA,0xE8),
+     o2(0xF8,0xE6), o2(0xDC,0xCE), o2(0xEA,0xDC), o2(0xDB,0xD2),
+     o2(0xE9,0xB3), o2(0xF7,0xDB), o2(0xE3,0xA8), o2(0xD7,0xAE),
+     o2(0xE0,0xE1),
+
+#define to_EUC_KR_E8_A4 WORDINDEX2INFO(5922)
+    to_EUC_KR_E8_A4_offsets,
+    to_EUC_KR_E8_A4_infos,
+
+#define to_EUC_KR_E8_A5_infos WORDINDEX2INFO(5924)
+           INVALID,         UNDEF, o2(0xCB,0xBA), o2(0xE5,0xD1),
+     o2(0xD0,0xDC), o2(0xD5,0xC1), o2(0xD8,0xCA), o2(0xE3,0xA9),
+     o2(0xE0,0xA4),
+
+#define to_EUC_KR_E8_A5 WORDINDEX2INFO(5933)
+    to_EUC_KR_E8_A5_offsets,
+    to_EUC_KR_E8_A5_infos,
+
+#define to_EUC_KR_E8_A6_infos WORDINDEX2INFO(5935)
+           INVALID,         UNDEF, o2(0xE9,0xA9), o2(0xD3,0xC7),
+     o2(0xDC,0xDD), o2(0xF8,0xAE), o2(0xCC,0xB8), o2(0xD0,0xAE),
+     o2(0xD8,0xF2), o2(0xE3,0xCA), o2(0xCC,0xAF), o2(0xD4,0xAD),
+     o2(0xF6,0xD1), o2(0xD0,0xCC), o2(0xCA,0xC6), o2(0xD5,0xC2),
+
+#define to_EUC_KR_E8_A6 WORDINDEX2INFO(5951)
+    to_EUC_KR_E8_A6_offsets,
+    to_EUC_KR_E8_A6_infos,
+
+#define to_EUC_KR_E8_A7_infos WORDINDEX2INFO(5953)
+           INVALID, o2(0xCE,0xBA),         UNDEF, o2(0xCA,0xC7),
+     o2(0xFA,0xB0), o2(0xDF,0xD8), o2(0xF5,0xBA),
+
+#define to_EUC_KR_E8_A7 WORDINDEX2INFO(5960)
+    to_EUC_KR_E8_A7_offsets,
+    to_EUC_KR_E8_A7_infos,
+
+#define to_EUC_KR_E8_A8_infos WORDINDEX2INFO(5962)
+           INVALID, o2(0xE5,0xEB),         UNDEF, o2(0xEF,0xF4),
+     o2(0xDD,0xB5), o2(0xCD,0xAA), o2(0xE3,0xF2), o2(0xFB,0xF7),
+     o2(0xF7,0xD0), o2(0xFD,0xBA), o2(0xFD,0xE1), o2(0xF6,0xFE),
+     o2(0xD1,0xC0), o2(0xE8,0xC5), o2(0xE4,0xB8), o2(0xE1,0xE8),
+     o2(0xCC,0xC1), o2(0xD2,0xED), o2(0xDB,0xBE), o2(0xE0,0xE2),
+     o2(0xFA,0xC9), o2(0xE1,0xCD), o2(0xCA,0xB8), o2(0xF2,0xE0),
+     o2(0xF1,0xC9),
+
+#define to_EUC_KR_E8_A8 WORDINDEX2INFO(5987)
+    to_EUC_KR_E8_A8_offsets,
+    to_EUC_KR_E8_A8_infos,
+
+#define to_EUC_KR_E8_A9_infos WORDINDEX2INFO(5989)
+           INVALID,         UNDEF, o2(0xDE,0xF1), o2(0xF0,0xDF),
+     o2(0xF8,0xC4), o2(0xEE,0xCC), o2(0xDE,0xF2), o2(0xE7,0xC9),
+     o2(0xE2,0xF3), o2(0xE7,0xE1), o2(0xE3,0xCB), o2(0xE3,0xCC),
+     o2(0xCF,0xF8), o2(0xEF,0xAC), o2(0xFD,0xFE), o2(0xFC,0xA5),
+     o2(0xFA,0xB1), o2(0xDF,0xD9), o2(0xE0,0xD2), o2(0xF4,0xDA),
+
+#define to_EUC_KR_E8_A9 WORDINDEX2INFO(6009)
+    to_EUC_KR_E8_A9_offsets,
+    to_EUC_KR_E8_A9_infos,
+
+#define to_EUC_KR_E8_AA_infos WORDINDEX2INFO(6011)
+           INVALID,         UNDEF, o2(0xF1,0xCA), o2(0xCE,0xA3),
+     o2(0xF2,0xBC), o2(0xEC,0xE3), o2(0xE0,0xA5), o2(0xF7,0xAB),
+     o2(0xEB,0xAF), o2(0xE5,0xDE), o2(0xE1,0xA4), o2(0xCD,0xAB),
+     o2(0xD9,0xF4), o2(0xE8,0xA6), o2(0xCD,0xCE), o2(0xE1,0xE9),
+     o2(0xFC,0xEF), o2(0xE0,0xE3), o2(0xE2,0xC1), o2(0xCE,0xA4),
+     o2(0xDE,0xA6), o2(0xEB,0xFE), o2(0xEB,0xDD), o2(0xF0,0xE0),
+
+#define to_EUC_KR_E8_AA WORDINDEX2INFO(6035)
+    to_EUC_KR_E8_AA_offsets,
+    to_EUC_KR_E8_AA_infos,
+
+#define to_EUC_KR_E8_AB_infos WORDINDEX2INFO(6037)
+           INVALID,         UNDEF, o2(0xF4,0xDB), o2(0xE2,0xF4),
+     o2(0xD3,0xC8), o2(0xF4,0xEB), o2(0xEE,0xB5), o2(0xF5,0xD8),
+     o2(0xD5,0xDF), o2(0xD6,0xE5), o2(0xEB,0xB0), o2(0xF4,0xE3),
+     o2(0xE3,0xCD), o2(0xF4,0xF4), o2(0xFA,0xB2), o2(0xEF,0xF5),
+     o2(0xCA,0xDF), o2(0xEB,0xB1), o2(0xED,0xBF), o2(0xFD,0xC9),
+     o2(0xE4,0xA6), o2(0xF9,0xA4), o2(0xF0,0xB3), o2(0xE5,0xEC),
+     o2(0xD1,0xE7),
+
+#define to_EUC_KR_E8_AB WORDINDEX2INFO(6062)
+    to_EUC_KR_E8_AB_offsets,
+    to_EUC_KR_E8_AB_infos,
+
+#define to_EUC_KR_E8_AC_infos WORDINDEX2INFO(6064)
+           INVALID, o2(0xD9,0xC7), o2(0xE4,0xD7), o2(0xEA,0xDD),
+             UNDEF, o2(0xD4,0xF7), o2(0xDA,0xBA), o2(0xDA,0xCD),
+     o2(0xF9,0xCC), o2(0xE1,0xDA), o2(0xDB,0xBF), o2(0xCC,0xC5),
+     o2(0xEC,0xD0), o2(0xCB,0xBB), o2(0xDE,0xF3), o2(0xE9,0xAA),
+     o2(0xD9,0xC8), o2(0xEE,0xE3), o2(0xD7,0xBD), o2(0xCF,0xC4),
+     o2(0xD0,0xCD),
+
+#define to_EUC_KR_E8_AC WORDINDEX2INFO(6085)
+    to_EUC_KR_E8_AC_offsets,
+    to_EUC_KR_E8_AC_infos,
+
+#define to_EUC_KR_E8_AD_infos WORDINDEX2INFO(6087)
+           INVALID,         UNDEF, o2(0xFC,0xA6), o2(0xF1,0xFB),
+     o2(0xFD,0xD2), o2(0xD1,0xC1), o2(0xE3,0xDB), o2(0xD3,0xC9),
+     o2(0xDC,0xCF), o2(0xCC,0xED), o2(0xDE,0xA7), o2(0xE6,0xBB),
+     o2(0xEC,0xA1), o2(0xCC,0xB9), o2(0xFB,0xDE), o2(0xE7,0xE2),
+
+#define to_EUC_KR_E8_AD WORDINDEX2INFO(6103)
+    to_EUC_KR_E8_AD_offsets,
+    to_EUC_KR_E8_AD_infos,
+
+#define to_EUC_KR_E8_AE_infos WORDINDEX2INFO(6105)
+           INVALID, o2(0xD4,0xC1),         UNDEF, o2(0xDC,0xA8),
+     o2(0xE2,0xC2), o2(0xF3,0xD8), o2(0xE5,0xD3), o2(0xF3,0xD9),
+     o2(0xF3,0xC6),
+
+#define to_EUC_KR_E8_AE WORDINDEX2INFO(6114)
+    to_EUC_KR_E8_AE_offsets,
+    to_EUC_KR_E8_AE_infos,
+
+#define to_EUC_KR_E8_B0_infos WORDINDEX2INFO(6116)
+           INVALID,         UNDEF, o2(0xCD,0xDB), o2(0xCD,0xAC),
+
+#define to_EUC_KR_E8_B0 WORDINDEX2INFO(6120)
+    to_EUC_KR_E8_B0_offsets,
+    to_EUC_KR_E8_B0_infos,
+
+#define to_EUC_KR_E8_B1_infos WORDINDEX2INFO(6122)
+           INVALID,         UNDEF, o2(0xFC,0xC3), o2(0xD4,0xE7),
+     o2(0xD1,0xC2), o2(0xF9,0xA5), o2(0xE8,0xD5), o2(0xE3,0xCE),
+     o2(0xD4,0xCA), o2(0xDF,0xDA), o2(0xFB,0xDF), o2(0xE7,0xE3),
+     o2(0xF8,0xFB), o2(0xE3,0xCF),
+
+#define to_EUC_KR_E8_B1 WORDINDEX2INFO(6136)
+    to_EUC_KR_E8_B1_offsets,
+    to_EUC_KR_E8_B1_infos,
+
+#define to_EUC_KR_E8_B2_infos WORDINDEX2INFO(6138)
+           INVALID,         UNDEF, o2(0xF5,0xB0), o2(0xD8,0xE7),
+     o2(0xD9,0xC9), o2(0xF8,0xAF), o2(0xEF,0xF6), o2(0xDD,0xB6),
+     o2(0xEE,0xAF), o2(0xCD,0xF8), o2(0xDE,0xB8), o2(0xFC,0xA7),
+     o2(0xF7,0xFC), o2(0xF7,0xB1), o2(0xCE,0xBB), o2(0xF4,0xA1),
+     o2(0xEE,0xCD), o2(0xE1,0xAE), o2(0xEC,0xC3), o2(0xCF,0xFE),
+     o2(0xF8,0xBF), o2(0xD8,0xE2), o2(0xD3,0xE8), o2(0xDE,0xA8),
+     o2(0xF4,0xE4), o2(0xEC,0xC2), o2(0xD9,0xF5),
+
+#define to_EUC_KR_E8_B2 WORDINDEX2INFO(6165)
+    to_EUC_KR_E8_B2_offsets,
+    to_EUC_KR_E8_B2_infos,
+
+#define to_EUC_KR_E8_B3_infos WORDINDEX2INFO(6167)
+           INVALID, o2(0xF9,0xC5), o2(0xDD,0xD3), o2(0xD6,0xF1),
+     o2(0xEC,0xFC), o2(0xFC,0xF0),         UNDEF, o2(0xED,0xC0),
+     o2(0xCA,0xB9), o2(0xEE,0xE4), o2(0xF2,0xE1), o2(0xDE,0xB9),
+     o2(0xD6,0xF2), o2(0xDE,0xF4), o2(0xDF,0xDB), o2(0xDB,0xD3),
+     o2(0xFA,0xE7), o2(0xD8,0xE3), o2(0xF4,0xC1), o2(0xDD,0xB7),
+     o2(0xF2,0xF5), o2(0xD4,0xAE), o2(0xD6,0xF3), o2(0xDD,0xB8),
+     o2(0xCF,0xC5), o2(0xDF,0xDF),
+
+#define to_EUC_KR_E8_B3 WORDINDEX2INFO(6193)
+    to_EUC_KR_E8_B3_offsets,
+    to_EUC_KR_E8_B3_infos,
+
+#define to_EUC_KR_E8_B4_infos WORDINDEX2INFO(6195)
+           INVALID,         UNDEF, o2(0xF2,0xBE), o2(0xF6,0xA1),
+     o2(0xEB,0xCB), o2(0xF1,0xFC), o2(0xF3,0xC7), o2(0xE0,0xEB),
+     o2(0xED,0xFC), o2(0xE1,0xDB),
+
+#define to_EUC_KR_E8_B4 WORDINDEX2INFO(6205)
+    to_EUC_KR_E8_B4_offsets,
+    to_EUC_KR_E8_B4_infos,
+
+#define to_EUC_KR_E8_B5_infos WORDINDEX2INFO(6207)
+           INVALID,         UNDEF, o2(0xEE,0xE5), o2(0xDE,0xF5),
+     o2(0xFA,0xD3), o2(0xF1,0xCB), o2(0xD0,0xAF), o2(0xDD,0xB9),
+     o2(0xD1,0xC3),
+
+#define to_EUC_KR_E8_B5 WORDINDEX2INFO(6216)
+    to_EUC_KR_E8_B5_offsets,
+    to_EUC_KR_E8_B5_infos,
+
+#define to_EUC_KR_E8_B6_infos WORDINDEX2INFO(6218)
+           INVALID,         UNDEF, o2(0xF5,0xB1), o2(0xEA,0xC6),
+     o2(0xF0,0xE1), o2(0xF6,0xAC), o2(0xF5,0xD9), o2(0xF0,0xEB),
+     o2(0xDD,0xBA), o2(0xF2,0xBF),
+
+#define to_EUC_KR_E8_B6 WORDINDEX2INFO(6228)
+    to_EUC_KR_E8_B6_offsets,
+    to_EUC_KR_E8_B6_infos,
+
+#define to_EUC_KR_E8_B7_infos WORDINDEX2INFO(6230)
+           INVALID,         UNDEF, o2(0xF7,0xC5), o2(0xDB,0xA2),
+     o2(0xF2,0xF6), o2(0xCA,0xBA), o2(0xF7,0xF5), o2(0xCB,0xE5),
+     o2(0xEE,0xE6), o2(0xE0,0xD3), o2(0xCE,0xA5), o2(0xD6,0xD8),
+     o2(0xD4,0xAF),
+
+#define to_EUC_KR_E8_B7 WORDINDEX2INFO(6243)
+    to_EUC_KR_E8_B7_offsets,
+    to_EUC_KR_E8_B7_infos,
+
+#define to_EUC_KR_E8_B8_infos WORDINDEX2INFO(6245)
+           INVALID,         UNDEF, o2(0xE9,0xC9), o2(0xD3,0xCE),
+     o2(0xF4,0xC2), o2(0xCB,0xE6), o2(0xF1,0xA1), o2(0xEB,0xB2),
+     o2(0xF1,0xA2),
+
+#define to_EUC_KR_E8_B8 WORDINDEX2INFO(6254)
+    to_EUC_KR_E8_B8_offsets,
+    to_EUC_KR_E8_B8_infos,
+
+#define to_EUC_KR_E8_B9_infos WORDINDEX2INFO(6256)
+           INVALID,         UNDEF, o2(0xEB,0xB3), o2(0xF0,0xB4),
+     o2(0xCB,0xF4), o2(0xD4,0xB0), o2(0xF3,0xB2), o2(0xFB,0xB7),
+     o2(0xF5,0xEC), o2(0xEE,0xE7), o2(0xF4,0xB2), o2(0xF5,0xED),
+     o2(0xCF,0xF3),
+
+#define to_EUC_KR_E8_B9 WORDINDEX2INFO(6269)
+    to_EUC_KR_E8_B9_offsets,
+    to_EUC_KR_E8_B9_infos,
+
+#define to_EUC_KR_E8_BA_infos WORDINDEX2INFO(6271)
+           INVALID,         UNDEF, o2(0xF0,0xE2), o2(0xEE,0xCE),
+     o2(0xF1,0xCC), o2(0xE5,0xB8), o2(0xD7,0xF5), o2(0xE3,0xF3),
+     o2(0xCF,0xE5),
+
+#define to_EUC_KR_E8_BA WORDINDEX2INFO(6280)
+    to_EUC_KR_E8_BA_offsets,
+    to_EUC_KR_E8_BA_infos,
+
+#define to_EUC_KR_E8_BB_infos WORDINDEX2INFO(6282)
+           INVALID, o2(0xCF,0xC6),         UNDEF, o2(0xF3,0xB3),
+     o2(0xE4,0xD8), o2(0xCF,0xF9), o2(0xCF,0xDA), o2(0xFA,0xCD),
+     o2(0xE6,0xE3), o2(0xF2,0xE2), o2(0xF5,0xEE), o2(0xCA,0xBB),
+     o2(0xE3,0xDC),
+
+#define to_EUC_KR_E8_BB WORDINDEX2INFO(6295)
+    to_EUC_KR_E8_BB_offsets,
+    to_EUC_KR_E8_BB_infos,
+
+#define to_EUC_KR_E8_BC_infos WORDINDEX2INFO(6297)
+           INVALID,         UNDEF, o2(0xCE,0xF2), o2(0xD6,0xD9),
+     o2(0xEE,0xB0), o2(0xF4,0xE5), o2(0xD8,0xC2), o2(0xDC,0xD0),
+     o2(0xCC,0xEE), o2(0xD5,0xE0), o2(0xF6,0xCA), o2(0xFD,0xCA),
+     o2(0xD8,0xD6), o2(0xF4,0xCF), o2(0xD6,0xA6), o2(0xDC,0xBE),
+     o2(0xDB,0xD4), o2(0xD7,0xC7), o2(0xF2,0xFE), o2(0xF1,0xCD),
+     o2(0xE2,0xC3), o2(0xDC,0xDE), o2(0xDC,0xDF), o2(0xEF,0xAD),
+     o2(0xE6,0xAB),
+
+#define to_EUC_KR_E8_BC WORDINDEX2INFO(6322)
+    to_EUC_KR_E8_BC_offsets,
+    to_EUC_KR_E8_BC_infos,
+
+#define to_EUC_KR_E8_BD_infos WORDINDEX2INFO(6324)
+           INVALID,         UNDEF, o2(0xF9,0xDD), o2(0xEA,0xBF),
+     o2(0xEF,0xAE), o2(0xF4,0xD0), o2(0xCE,0xF3), o2(0xE6,0xAC),
+     o2(0xCE,0xDE), o2(0xD5,0xF9),
+
+#define to_EUC_KR_E8_BD WORDINDEX2INFO(6334)
+    to_EUC_KR_E8_BD_offsets,
+    to_EUC_KR_E8_BD_infos,
+
+#define to_EUC_KR_E8_BE_infos WORDINDEX2INFO(6336)
+           INVALID,         UNDEF, o2(0xE3,0xF4), o2(0xCD,0xD0),
+     o2(0xD5,0xB8), o2(0xF7,0xFD), o2(0xDC,0xA9), o2(0xDE,0xF6),
+     o2(0xDC,0xAA), o2(0xF2,0xE3), o2(0xE9,0xB4), o2(0xD2,0xDC),
+
+#define to_EUC_KR_E8_BE WORDINDEX2INFO(6348)
+    to_EUC_KR_E8_BE_offsets,
+    to_EUC_KR_E8_BE_infos,
+
+#define to_EUC_KR_E8_BF_infos WORDINDEX2INFO(6350)
+           INVALID,         UNDEF, o2(0xE9,0xE6), o2(0xE3,0xF6),
+     o2(0xE7,0xCA), o2(0xD0,0xCE), o2(0xDA,0xF7), o2(0xCA,0xBC),
+     o2(0xEE,0xE8), o2(0xDA,0xDE), o2(0xF2,0xF7), o2(0xE2,0xFB),
+     o2(0xCC,0xA6), o2(0xDA,0xBB), o2(0xEE,0xE9), o2(0xF5,0xDA),
+
+#define to_EUC_KR_E8_BF WORDINDEX2INFO(6366)
+    to_EUC_KR_E8_BF_offsets,
+    to_EUC_KR_E8_BF_infos,
+
+#define to_EUC_KR_E8_infos WORDINDEX2INFO(6368)
+             INVALID, to_EUC_KR_E8_80, to_EUC_KR_E8_81, to_EUC_KR_E8_82,
+     to_EUC_KR_E8_83, to_EUC_KR_E8_84, to_EUC_KR_E8_85, to_EUC_KR_E8_86,
+     to_EUC_KR_E8_87, to_EUC_KR_E8_88, to_EUC_KR_E8_89, to_EUC_KR_E8_8A,
+     to_EUC_KR_E8_8B, to_EUC_KR_E8_8C, to_EUC_KR_E8_8D, to_EUC_KR_E8_8E,
+     to_EUC_KR_E8_8F, to_EUC_KR_E8_90, to_EUC_KR_E8_91, to_EUC_KR_E8_92,
+     to_EUC_KR_E8_93, to_EUC_KR_E8_94, to_EUC_KR_E8_95, to_EUC_KR_E8_96,
+     to_EUC_KR_E8_97, to_EUC_KR_E8_98, to_EUC_KR_E8_99, to_EUC_KR_E8_9A,
+     to_EUC_KR_E8_9B, to_EUC_KR_E8_9C, to_EUC_KR_E8_9D, to_EUC_KR_E8_9E,
+     to_EUC_KR_E8_9F, to_EUC_KR_E8_A0, to_EUC_KR_E8_A1, to_EUC_KR_E8_A2,
+     to_EUC_KR_E8_A3, to_EUC_KR_E8_A4, to_EUC_KR_E8_A5, to_EUC_KR_E8_A6,
+     to_EUC_KR_E8_A7, to_EUC_KR_E8_A8, to_EUC_KR_E8_A9, to_EUC_KR_E8_AA,
+     to_EUC_KR_E8_AB, to_EUC_KR_E8_AC, to_EUC_KR_E8_AD, to_EUC_KR_E8_AE,
+        to_EUC_KR_C6, to_EUC_KR_E8_B0, to_EUC_KR_E8_B1, to_EUC_KR_E8_B2,
+     to_EUC_KR_E8_B3, to_EUC_KR_E8_B4, to_EUC_KR_E8_B5, to_EUC_KR_E8_B6,
+     to_EUC_KR_E8_B7, to_EUC_KR_E8_B8, to_EUC_KR_E8_B9, to_EUC_KR_E8_BA,
+     to_EUC_KR_E8_BB, to_EUC_KR_E8_BC, to_EUC_KR_E8_BD, to_EUC_KR_E8_BE,
+     to_EUC_KR_E8_BF,
+
+#define to_EUC_KR_E8 WORDINDEX2INFO(6433)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_E8_infos,
+
+#define to_EUC_KR_E9_80_infos WORDINDEX2INFO(6435)
+           INVALID, o2(0xF7,0xDC), o2(0xE1,0xEA), o2(0xCE,0xC1),
+     o2(0xD4,0xB1),         UNDEF, o2(0xFD,0xB1), o2(0xE6,0xBD),
+     o2(0xFB,0xAD), o2(0xF8,0xE7), o2(0xE1,0xCE), o2(0xF7,0xE2),
+     o2(0xF5,0xEF), o2(0xCF,0xC7), o2(0xD4,0xB2), o2(0xCC,0xEF),
+     o2(0xD4,0xE8), o2(0xEE,0xCF), o2(0xF7,0xD7), o2(0xE0,0xA6),
+     o2(0xD6,0xC1), o2(0xE1,0xDC), o2(0xF0,0xE3), o2(0xF1,0xE4),
+     o2(0xDC,0xF1), o2(0xD6,0xA7), o2(0xF4,0xF5), o2(0xF1,0xCE),
+     o2(0xF2,0xE4), o2(0xD0,0xB0), o2(0xEC,0xEF), o2(0xF9,0xBA),
+     o2(0xEB,0xB5),
+
+#define to_EUC_KR_E9_80 WORDINDEX2INFO(6468)
+    to_EUC_KR_E9_80_offsets,
+    to_EUC_KR_E9_80_infos,
+
+#define to_EUC_KR_E9_81_infos WORDINDEX2INFO(6470)
+           INVALID,         UNDEF, o2(0xD4,0xED), o2(0xE2,0xC4),
+     o2(0xE9,0xE7), o2(0xEB,0xB4), o2(0xEA,0xA1), o2(0xF8,0xBC),
+     o2(0xCE,0xA6), o2(0xF9,0xC6), o2(0xFC,0xDA), o2(0xD4,0xB3),
+     o2(0xD3,0xB9), o2(0xEA,0xDE), o2(0xE9,0xAB), o2(0xE1,0xE1),
+     o2(0xD3,0xCF), o2(0xF4,0xF6), o2(0xEA,0xC0), o2(0xE1,0xCF),
+     o2(0xCC,0xBA), o2(0xEE,0xEA), o2(0xF0,0xE4), o2(0xF3,0xB4),
+     o2(0xD4,0xEE), o2(0xF2,0xC0), o2(0xF1,0xE5), o2(0xF4,0xC3),
+     o2(0xE0,0xD4), o2(0xEB,0xB6), o2(0xD7,0xA1), o2(0xCB,0xE8),
+     o2(0xF9,0xAD),
+
+#define to_EUC_KR_E9_81 WORDINDEX2INFO(6503)
+    to_EUC_KR_E9_81_offsets,
+    to_EUC_KR_E9_81_infos,
+
+#define to_EUC_KR_E9_82_infos WORDINDEX2INFO(6505)
+           INVALID, o2(0xE9,0xAD), o2(0xD8,0xE4), o2(0xFA,0xB3),
+     o2(0xE2,0xC5), o2(0xFC,0xBD),         UNDEF, o2(0xEC,0xC4),
+     o2(0xD8,0xB1), o2(0xDC,0xAB), o2(0xD5,0xA4), o2(0xEB,0xE9),
+     o2(0xE8,0xBB), o2(0xD8,0xD7), o2(0xFB,0xAE), o2(0xD1,0xE1),
+     o2(0xDB,0xC0), o2(0xF5,0xBE), o2(0xDE,0xF7), o2(0xCA,0xFB),
+     o2(0xF7,0xC6), o2(0xCF,0xC8), o2(0xE1,0xD0), o2(0xEE,0xD0),
+
+#define to_EUC_KR_E9_82 WORDINDEX2INFO(6529)
+    to_EUC_KR_E9_82_offsets,
+    to_EUC_KR_E9_82_infos,
+
+#define to_EUC_KR_E9_83_infos WORDINDEX2INFO(6531)
+           INVALID,         UNDEF, o2(0xE9,0xF4), o2(0xCE,0xF4),
+     o2(0xD5,0xCD), o2(0xCF,0xDB), o2(0xDD,0xBB), o2(0xCE,0xAC),
+     o2(0xE9,0xE8), o2(0xD4,0xB4),
+
+#define to_EUC_KR_E9_83 WORDINDEX2INFO(6541)
+    to_EUC_KR_E9_83_offsets,
+    to_EUC_KR_E9_83_infos,
+
+#define to_EUC_KR_E9_84_infos WORDINDEX2INFO(6543)
+           INVALID,         UNDEF, o2(0xE4,0xC7), o2(0xF5,0xDB),
+     o2(0xFA,0xC1), o2(0xDE,0xA9), o2(0xD4,0xF8), o2(0xEF,0xF7),
+     o2(0xD3,0xB3),
+
+#define to_EUC_KR_E9_84 WORDINDEX2INFO(6552)
+    to_EUC_KR_E9_84_offsets,
+    to_EUC_KR_E9_84_infos,
+
+#define to_EUC_KR_E9_85_infos WORDINDEX2INFO(6554)
+           INVALID,         UNDEF, o2(0xEB,0xB7), o2(0xEF,0xF8),
+     o2(0xF5,0xDC), o2(0xED,0xCC), o2(0xDB,0xD5), o2(0xF1,0xCF),
+     o2(0xF1,0xD0), o2(0xF5,0xB2), o2(0xD9,0xAE), o2(0xD5,0xAC),
+     o2(0xE2,0xC6), o2(0xFD,0xA3), o2(0xFB,0xE5), o2(0xDF,0xAB),
+
+#define to_EUC_KR_E9_85 WORDINDEX2INFO(6570)
+    to_EUC_KR_E9_85_offsets,
+    to_EUC_KR_E9_85_infos,
+
+#define to_EUC_KR_E9_86_infos WORDINDEX2INFO(6572)
+           INVALID,         UNDEF, o2(0xE2,0xF5), o2(0xF6,0xAD),
+     o2(0xF5,0xB3), o2(0xF0,0xB5), o2(0xE1,0xA5), o2(0xF5,0xDD),
+     o2(0xEC,0xA2), o2(0xED,0xFD), o2(0xF5,0xB4), o2(0xFB,0xB8),
+     o2(0xDB,0xA3), o2(0xD6,0xCA), o2(0xCB,0xD9),
+
+#define to_EUC_KR_E9_86 WORDINDEX2INFO(6587)
+    to_EUC_KR_E9_86_offsets,
+    to_EUC_KR_E9_86_infos,
+
+#define to_EUC_KR_E9_87_infos WORDINDEX2INFO(6589)
+           INVALID, o2(0xE5,0xD4),         UNDEF, o2(0xF3,0xFA),
+     o2(0xEB,0xB8), o2(0xE0,0xB7), o2(0xD7,0xEC), o2(0xF1,0xEC),
+     o2(0xE5,0xAF), o2(0xD5,0xE1), o2(0xD7,0xED), o2(0xD1,0xD1),
+     o2(0xE1,0xF2), o2(0xEF,0xF9), o2(0xDD,0xBC), o2(0xF6,0xDC),
+     o2(0xF0,0xE5), o2(0xF4,0xC4), o2(0xE9,0xE9), o2(0xF3,0xFB),
+
+#define to_EUC_KR_E9_87 WORDINDEX2INFO(6609)
+    to_EUC_KR_E9_87_offsets,
+    to_EUC_KR_E9_87_infos,
+
+#define to_EUC_KR_E9_88_infos WORDINDEX2INFO(6611)
+           INVALID,         UNDEF, o2(0xD4,0xEF), o2(0xCC,0xA2),
+     o2(0xF7,0xFE), o2(0xDF,0xBC), o2(0xEB,0xCD), o2(0xD0,0xB7),
+     o2(0xD6,0xC2), o2(0xE8,0xAD), o2(0xEF,0xAF),
+
+#define to_EUC_KR_E9_88 WORDINDEX2INFO(6622)
+    to_EUC_KR_E9_88_offsets,
+    to_EUC_KR_E9_88_infos,
+
+#define to_EUC_KR_E9_89_infos WORDINDEX2INFO(6624)
+           INVALID, o2(0xCB,0xA5),         UNDEF, o2(0xCB,0xE9),
+     o2(0xFA,0xE8), o2(0xCC,0xC6), o2(0xE6,0xE7), o2(0xEA,0xC7),
+     o2(0xDB,0xA4), o2(0xCF,0xC9), o2(0xE2,0xFC), o2(0xEF,0xFA),
+
+#define to_EUC_KR_E9_89 WORDINDEX2INFO(6636)
+    to_EUC_KR_E9_89_offsets,
+    to_EUC_KR_E9_89_infos,
+
+#define to_EUC_KR_E9_8A_infos WORDINDEX2INFO(6638)
+           INVALID, o2(0xEB,0xDE),         UNDEF, o2(0xF5,0xC8),
+     o2(0xD4,0xDE), o2(0xE0,0xD5), o2(0xEF,0xB0), o2(0xE2,0xC7),
+     o2(0xD9,0xAF), o2(0xF9,0xE7), o2(0xE7,0xE5), o2(0xCF,0xCA),
+     o2(0xE1,0xD1), o2(0xE2,0xC8),
+
+#define to_EUC_KR_E9_8A WORDINDEX2INFO(6652)
+    to_EUC_KR_E9_8A_offsets,
+    to_EUC_KR_E9_8A_infos,
+
+#define to_EUC_KR_E9_8B_infos WORDINDEX2INFO(6654)
+           INVALID,         UNDEF, o2(0xEF,0xFB), o2(0xFA,0xF9),
+     o2(0xDC,0xF2), o2(0xE0,0xA7), o2(0xF8,0xE8), o2(0xCB,0xEA),
+     o2(0xCB,0xBC),
+
+#define to_EUC_KR_E9_8B WORDINDEX2INFO(6663)
+    to_EUC_KR_E9_8B_offsets,
+    to_EUC_KR_E9_8B_infos,
+
+#define to_EUC_KR_E9_8C_infos WORDINDEX2INFO(6665)
+           INVALID,         UNDEF, o2(0xD6,0xE2), o2(0xF5,0xDE),
+     o2(0xF5,0xDF), o2(0xEE,0xB6), o2(0xE2,0xF6), o2(0xD3,0xCA),
+     o2(0xEF,0xFC), o2(0xD1,0xC4), o2(0xEF,0xB1), o2(0xD1,0xC5),
+     o2(0xD0,0xDE), o2(0xD9,0xE1), o2(0xE0,0xB8), o2(0xCD,0xD1),
+     o2(0xF3,0xB9),
+
+#define to_EUC_KR_E9_8C WORDINDEX2INFO(6682)
+    to_EUC_KR_E9_8C_offsets,
+    to_EUC_KR_E9_8C_infos,
+
+#define to_EUC_KR_E9_8D_infos WORDINDEX2INFO(6684)
+           INVALID,         UNDEF, o2(0xE7,0xCC), o2(0xD6,0xA8),
+     o2(0xCE,0xA7), o2(0xD4,0xB5), o2(0xE4,0xC8), o2(0xD3,0xB4),
+     o2(0xEB,0xB9), o2(0xCB,0xF5), o2(0xF6,0xDD), o2(0xF1,0xA3),
+
+#define to_EUC_KR_E9_8D WORDINDEX2INFO(6696)
+    to_EUC_KR_E9_8D_offsets,
+    to_EUC_KR_E9_8D_infos,
+
+#define to_EUC_KR_E9_8E_infos WORDINDEX2INFO(6698)
+           INVALID,         UNDEF, o2(0xCC,0xC7), o2(0xE9,0xCA),
+     o2(0xE1,0xF0), o2(0xF5,0xE0), o2(0xFB,0xAF), o2(0xCB,0xD1),
+     o2(0xFB,0xE0), o2(0xF2,0xE5), o2(0xEC,0xF0),
+
+#define to_EUC_KR_E9_8E WORDINDEX2INFO(6709)
+    to_EUC_KR_E9_8E_offsets,
+    to_EUC_KR_E9_8E_infos,
+
+#define to_EUC_KR_E9_8F_infos WORDINDEX2INFO(6711)
+           INVALID,         UNDEF, o2(0xF0,0xEC), o2(0xEE,0xEB),
+     o2(0xE9,0xCB), o2(0xCC,0xF0), o2(0xD7,0xAF), o2(0xF3,0xA1),
+
+#define to_EUC_KR_E9_8F WORDINDEX2INFO(6719)
+    to_EUC_KR_E9_8F_offsets,
+    to_EUC_KR_E9_8F_infos,
+
+#define to_EUC_KR_E9_90_infos WORDINDEX2INFO(6721)
+           INVALID,         UNDEF, o2(0xFC,0xF5), o2(0xF1,0xA4),
+     o2(0xE0,0xD6), o2(0xEF,0xB2), o2(0xF4,0xD1), o2(0xF7,0xA1),
+
+#define to_EUC_KR_E9_90 WORDINDEX2INFO(6729)
+    to_EUC_KR_E9_90_offsets,
+    to_EUC_KR_E9_90_infos,
+
+#define to_EUC_KR_E9_91_infos WORDINDEX2INFO(6731)
+           INVALID,         UNDEF, o2(0xF1,0xD1), o2(0xCA,0xFC),
+     o2(0xCA,0xFD), o2(0xCE,0xCE), o2(0xF3,0xC8), o2(0xF3,0xBA),
+
+#define to_EUC_KR_E9_91 WORDINDEX2INFO(6739)
+    to_EUC_KR_E9_91_offsets,
+    to_EUC_KR_E9_91_infos,
+
+#define to_EUC_KR_E9_95_infos WORDINDEX2INFO(6741)
+           INVALID,         UNDEF, o2(0xED,0xFE),
+
+#define to_EUC_KR_E9_95 WORDINDEX2INFO(6744)
+    to_EUC_KR_E9_95_offsets,
+    to_EUC_KR_E9_95_infos,
+
+#define to_EUC_KR_E9_96_infos WORDINDEX2INFO(6746)
+           INVALID, o2(0xDA,0xA6),         UNDEF, o2(0xE0,0xEC),
+     o2(0xF8,0xCD), o2(0xCB,0xD2), o2(0xEB,0xCE), o2(0xF9,0xD8),
+     o2(0xF9,0xD9), o2(0xCA,0xE0), o2(0xDA,0xCA), o2(0xCB,0xA6),
+     o2(0xCA,0xC8), o2(0xF9,0xEE), o2(0xDB,0xEC), o2(0xD0,0xB1),
+     o2(0xD5,0xEF), o2(0xE6,0xF3), o2(0xE7,0xA2), o2(0xE4,0xD9),
+
+#define to_EUC_KR_E9_96 WORDINDEX2INFO(6766)
+    to_EUC_KR_E9_96_offsets,
+    to_EUC_KR_E9_96_infos,
+
+#define to_EUC_KR_E9_97_infos WORDINDEX2INFO(6768)
+           INVALID,         UNDEF, o2(0xE4,0xE1), o2(0xFC,0xC4),
+     o2(0xF9,0xEF), o2(0xCF,0xF4), o2(0xF7,0xE6), o2(0xCE,0xBC),
+     o2(0xF4,0xC5), o2(0xDC,0xA3),
+
+#define to_EUC_KR_E9_97 WORDINDEX2INFO(6778)
+    to_EUC_KR_E9_97_offsets,
+    to_EUC_KR_E9_97_infos,
+
+#define to_EUC_KR_E9_98_infos WORDINDEX2INFO(6780)
+           INVALID,         UNDEF, o2(0xDD,0xBD), o2(0xF4,0xC6),
+     o2(0xF8,0xA1), o2(0xE8,0xD6), o2(0xDB,0xC1), o2(0xF0,0xE6),
+     o2(0xE4,0xB9),
+
+#define to_EUC_KR_E9_98 WORDINDEX2INFO(6789)
+    to_EUC_KR_E9_98_offsets,
+    to_EUC_KR_E9_98_infos,
+
+#define to_EUC_KR_E9_99_infos WORDINDEX2INFO(6791)
+           INVALID, o2(0xF6,0xED),         UNDEF, o2(0xF9,0xAE),
+     o2(0xDD,0xBE), o2(0xD7,0xB0), o2(0xD8,0xE8), o2(0xCB,0xBD),
+     o2(0xF9,0xDA), o2(0xF8,0xCE), o2(0xF9,0xF0), o2(0xE0,0xED),
+     o2(0xE3,0xB3), o2(0xF4,0xB3), o2(0xEA,0xC2), o2(0xF2,0xE6),
+     o2(0xF0,0xB6), o2(0xDB,0xD6), o2(0xEB,0xE4), o2(0xF2,0xE7),
+     o2(0xD7,0xD5), o2(0xD4,0xB6), o2(0xF9,0xE8), o2(0xD7,0xC1),
+     o2(0xE5,0xD5),
+
+#define to_EUC_KR_E9_99 WORDINDEX2INFO(6816)
+    to_EUC_KR_E9_99_offsets,
+    to_EUC_KR_E9_99_infos,
+
+#define to_EUC_KR_E9_9A_infos WORDINDEX2INFO(6818)
+           INVALID,         UNDEF, o2(0xE9,0xEA), o2(0xD7,0xCC),
+     o2(0xD3,0xE9), o2(0xE2,0xC9), o2(0xFC,0xDB), o2(0xCD,0xAD),
+     o2(0xCC,0xB0), o2(0xEA,0xA2), o2(0xE4,0xF6), o2(0xD0,0xC0),
+     o2(0xF0,0xB7), o2(0xEE,0xA1), o2(0xD7,0xF6), o2(0xE2,0xCA),
+     o2(0xE2,0xCB), o2(0xFA,0xCF), o2(0xEB,0xDF), o2(0xD6,0xCB),
+     o2(0xF4,0xB4),
+
+#define to_EUC_KR_E9_9A WORDINDEX2INFO(6839)
+    to_EUC_KR_E9_9A_offsets,
+    to_EUC_KR_E9_9A_infos,
+
+#define to_EUC_KR_E9_9B_infos WORDINDEX2INFO(6841)
+           INVALID, o2(0xED,0xCD), o2(0xE4,0xD2),         UNDEF,
+     o2(0xEA,0xA9), o2(0xE4,0xBA), o2(0xF3,0xA2), o2(0xCD,0xD2),
+     o2(0xF6,0xCB), o2(0xF1,0xE6), o2(0xED,0xC1), o2(0xE8,0xBC),
+     o2(0xEE,0xD1), o2(0xF0,0xE7), o2(0xE2,0xCC), o2(0xE4,0xAA),
+     o2(0xF5,0xE1), o2(0xED,0xDA), o2(0xD7,0xEE), o2(0xD1,0xF1),
+     o2(0xE9,0xEB), o2(0xE9,0xEC), o2(0xE0,0xE4), o2(0xDA,0xA7),
+     o2(0xDD,0xD4), o2(0xEA,0xA3), o2(0xD6,0xC3), o2(0xD6,0xF4),
+     o2(0xDA,0xDF), o2(0xEF,0xB3),
+
+#define to_EUC_KR_E9_9B WORDINDEX2INFO(6871)
+    to_EUC_KR_E9_9B_offsets,
+    to_EUC_KR_E9_9B_infos,
+
+#define to_EUC_KR_E9_9C_infos WORDINDEX2INFO(6873)
+           INVALID, o2(0xE2,0xCD),         UNDEF, o2(0xEF,0xFD),
+     o2(0xF2,0xE8), o2(0xEF,0xC5), o2(0xE7,0xE7), o2(0xD7,0xFD),
+     o2(0xE7,0xCE), o2(0xDF,0xDC), o2(0xF9,0xC7), o2(0xD9,0xF6),
+     o2(0xDF,0xAC), o2(0xD6,0xDA), o2(0xDC,0xA4), o2(0xF0,0xB8),
+
+#define to_EUC_KR_E9_9C WORDINDEX2INFO(6889)
+    to_EUC_KR_E9_9C_offsets,
+    to_EUC_KR_E9_9C_infos,
+
+#define to_EUC_KR_E9_9D_infos WORDINDEX2INFO(6891)
+           INVALID,         UNDEF, o2(0xD5,0xFA), o2(0xE4,0xF7),
+     o2(0xD6,0xC4), o2(0xF4,0xEC), o2(0xEF,0xFE), o2(0xF0,0xA1),
+     o2(0xDE,0xAA), o2(0xDA,0xBC), o2(0xD8,0xFC), o2(0xFA,0xD4),
+     o2(0xEC,0xE5), o2(0xFC,0xA8), o2(0xEC,0xE6), o2(0xD8,0xCB),
+
+#define to_EUC_KR_E9_9D WORDINDEX2INFO(6907)
+    to_EUC_KR_E9_9D_offsets,
+    to_EUC_KR_E9_9D_infos,
+
+#define to_EUC_KR_E9_9E_infos WORDINDEX2INFO(6909)
+           INVALID,         UNDEF, o2(0xFB,0xB9), o2(0xE4,0xD3),
+     o2(0xCD,0xF9), o2(0xCF,0xD3), o2(0xCA,0xEA), o2(0xCF,0xD4),
+     o2(0xF8,0xBD),
+
+#define to_EUC_KR_E9_9E WORDINDEX2INFO(6918)
+    to_EUC_KR_E9_9E_offsets,
+    to_EUC_KR_E9_9E_infos,
+
+#define to_EUC_KR_E9_9F_infos WORDINDEX2INFO(6920)
+           INVALID,         UNDEF, o2(0xF4,0xC7), o2(0xEA,0xDF),
+     o2(0xF9,0xDB), o2(0xD4,0xB7), o2(0xEB,0xE5), o2(0xE1,0xD2),
+     o2(0xEA,0xA4), o2(0xFA,0xC2),
+
+#define to_EUC_KR_E9_9F WORDINDEX2INFO(6930)
+    to_EUC_KR_E9_9F_offsets,
+    to_EUC_KR_E9_9F_infos,
+
+#define to_EUC_KR_E9_A0_infos WORDINDEX2INFO(6932)
+           INVALID, o2(0xFB,0xE1), o2(0xFA,0xED), o2(0xF0,0xA2),
+     o2(0xCC,0xF1),         UNDEF, o2(0xFA,0xA3), o2(0xE2,0xF7),
+     o2(0xE2,0xCE), o2(0xE9,0xF5), o2(0xE1,0xEB), o2(0xE7,0xE8),
+     o2(0xE8,0xD7), o2(0xDA,0xF8), o2(0xD4,0xCB), o2(0xF7,0xF6),
+     o2(0xD6,0xC5), o2(0xD4,0xE9), o2(0xFA,0xFA), o2(0xCC,0xF2),
+     o2(0xF7,0xDD), o2(0xDE,0xBA),
+
+#define to_EUC_KR_E9_A0 WORDINDEX2INFO(6954)
+    to_EUC_KR_E9_A0_offsets,
+    to_EUC_KR_E9_A0_infos,
+
+#define to_EUC_KR_E9_A1_infos WORDINDEX2INFO(6956)
+           INVALID,         UNDEF, o2(0xCE,0xA8), o2(0xF0,0xB9),
+     o2(0xE4,0xFE), o2(0xE4,0xC9), o2(0xE4,0xD4), o2(0xEA,0xC3),
+     o2(0xEF,0xB4), o2(0xD7,0xBE), o2(0xFB,0xE2), o2(0xCD,0xD3),
+     o2(0xEF,0xB5), o2(0xFA,0xE9),
+
+#define to_EUC_KR_E9_A1 WORDINDEX2INFO(6970)
+    to_EUC_KR_E9_A1_offsets,
+    to_EUC_KR_E9_A1_infos,
+
+#define to_EUC_KR_E9_A2_infos WORDINDEX2INFO(6972)
+           INVALID,         UNDEF, o2(0xF9,0xA6), o2(0xDF,0xBD),
+     o2(0xF7,0xC7),
+
+#define to_EUC_KR_E9_A2 WORDINDEX2INFO(6977)
+    to_EUC_KR_E9_A2_offsets,
+    to_EUC_KR_E9_A2_infos,
+
+#define to_EUC_KR_E9_A3_infos WORDINDEX2INFO(6979)
+           INVALID,         UNDEF, o2(0xF8,0xFD), o2(0xF8,0xFC),
+     o2(0xDE,0xAB), o2(0xDB,0xE8), o2(0xE3,0xDD), o2(0xE1,0xE2),
+     o2(0xD1,0xC6), o2(0xF6,0xD0), o2(0xEB,0xE6), o2(0xDA,0xF9),
+     o2(0xEC,0xC7), o2(0xDE,0xF8), o2(0xF8,0xE9), o2(0xE3,0xDE),
+
+#define to_EUC_KR_E9_A3 WORDINDEX2INFO(6995)
+    to_EUC_KR_E9_A3_offsets,
+    to_EUC_KR_E9_A3_infos,
+
+#define to_EUC_KR_E9_A4_infos WORDINDEX2INFO(6997)
+           INVALID,         UNDEF, o2(0xCE,0xF5), o2(0xFA,0xC3),
+     o2(0xE5,0xD7), o2(0xEC,0xC8), o2(0xF3,0xC9), o2(0xE4,0xBB),
+     o2(0xE6,0xAE), o2(0xEF,0xB6), o2(0xDC,0xBF), o2(0xCE,0xBD),
+
+#define to_EUC_KR_E9_A4 WORDINDEX2INFO(7009)
+    to_EUC_KR_E9_A4_offsets,
+    to_EUC_KR_E9_A4_infos,
+
+#define to_EUC_KR_E9_A5_infos WORDINDEX2INFO(7011)
+           INVALID,         UNDEF, o2(0xD8,0xC3), o2(0xD0,0xCF),
+     o2(0xCF,0xFA), o2(0xF3,0xCA), o2(0xE0,0xD7), o2(0xD1,0xC7),
+     o2(0xE9,0xAE), o2(0xE8,0xBD), o2(0xFA,0xC4),
+
+#define to_EUC_KR_E9_A5 WORDINDEX2INFO(7022)
+    to_EUC_KR_E9_A5_offsets,
+    to_EUC_KR_E9_A5_infos,
+
+#define to_EUC_KR_E9_A6_infos WORDINDEX2INFO(7024)
+           INVALID,         UNDEF, o2(0xE2,0xCF), o2(0xFA,0xC5),
+     o2(0xF9,0xB8), o2(0xDC,0xE0), o2(0xFB,0xB0), o2(0xD8,0xA9),
+     o2(0xE5,0xDF), o2(0xF9,0xA7), o2(0xF6,0xEE), o2(0xF6,0xCC),
+     o2(0xE2,0xF8), o2(0xEC,0xF1),
+
+#define to_EUC_KR_E9_A6 WORDINDEX2INFO(7038)
+    to_EUC_KR_E9_A6_offsets,
+    to_EUC_KR_E9_A6_infos,
+
+#define to_EUC_KR_E9_A7_infos WORDINDEX2INFO(7040)
+           INVALID,         UNDEF, o2(0xDA,0xE0), o2(0xF1,0xD2),
+     o2(0xD2,0xCC), o2(0xCF,0xCB), o2(0xCA,0xBD), o2(0xDD,0xBF),
+     o2(0xF6,0xEF), o2(0xDE,0xF9), o2(0xFA,0xB4), o2(0xD5,0xAD),
+     o2(0xF1,0xE7),
+
+#define to_EUC_KR_E9_A7 WORDINDEX2INFO(7053)
+    to_EUC_KR_E9_A7_offsets,
+    to_EUC_KR_E9_A7_infos,
+
+#define to_EUC_KR_E9_A8_infos WORDINDEX2INFO(7055)
+           INVALID,         UNDEF, o2(0xDE,0xBE), o2(0xDC,0xC0),
+     o2(0xD1,0xC8), o2(0xD1,0xC9), o2(0xF8,0xBE), o2(0xCB,0xF6),
+     o2(0xD4,0xF9), o2(0xF5,0xE2), o2(0xE1,0xD3),
+
+#define to_EUC_KR_E9_A8 WORDINDEX2INFO(7066)
+    to_EUC_KR_E9_A8_offsets,
+    to_EUC_KR_E9_A8_infos,
+
+#define to_EUC_KR_E9_A9_infos WORDINDEX2INFO(7068)
+           INVALID, o2(0xD8,0xE9),         UNDEF, o2(0xF8,0xFE),
+     o2(0xCF,0xCC), o2(0xFD,0xA4), o2(0xCE,0xF6), o2(0xFA,0xD0),
+     o2(0xCC,0xF3), o2(0xE6,0xBE), o2(0xF6,0xAE), o2(0xD5,0xF0),
+     o2(0xD1,0xCA), o2(0xFC,0xBE), o2(0xD5,0xF1),
+
+#define to_EUC_KR_E9_A9 WORDINDEX2INFO(7083)
+    to_EUC_KR_E9_A9_offsets,
+    to_EUC_KR_E9_A9_infos,
+
+#define to_EUC_KR_E9_AA_infos WORDINDEX2INFO(7085)
+           INVALID,         UNDEF, o2(0xCD,0xE9), o2(0xFA,0xB5),
+
+#define to_EUC_KR_E9_AA WORDINDEX2INFO(7089)
+    to_EUC_KR_E9_AA_offsets,
+    to_EUC_KR_E9_AA_infos,
+
+#define to_EUC_KR_E9_AB_infos WORDINDEX2INFO(7091)
+           INVALID,         UNDEF, o2(0xE2,0xD0), o2(0xF4,0xF7),
+     o2(0xCD,0xD4), o2(0xE7,0xA3), o2(0xDB,0xA5),
+
+#define to_EUC_KR_E9_AB WORDINDEX2INFO(7098)
+    to_EUC_KR_E9_AB_offsets,
+    to_EUC_KR_E9_AB_infos,
+
+#define to_EUC_KR_E9_AC_infos WORDINDEX2INFO(7100)
+           INVALID,         UNDEF, o2(0xE2,0xD1), o2(0xD7,0xA2),
+     o2(0xF7,0xE3), o2(0xEA,0xA6), o2(0xD0,0xA1),
+
+#define to_EUC_KR_E9_AC WORDINDEX2INFO(7107)
+    to_EUC_KR_E9_AC_offsets,
+    to_EUC_KR_E9_AC_infos,
+
+#define to_EUC_KR_E9_AD_infos WORDINDEX2INFO(7109)
+           INVALID,         UNDEF, o2(0xCE,0xDA), o2(0xFB,0xEB),
+     o2(0xDB,0xA6), o2(0xDB,0xDE), o2(0xD8,0xE5), o2(0xEA,0xE0),
+     o2(0xD8,0xAA), o2(0xE5,0xE0), o2(0xD6,0xDB),
+
+#define to_EUC_KR_E9_AD WORDINDEX2INFO(7120)
+    to_EUC_KR_E9_AD_offsets,
+    to_EUC_KR_E9_AD_infos,
+
+#define to_EUC_KR_E9_AE_infos WORDINDEX2INFO(7122)
+           INVALID,         UNDEF, o2(0xEF,0xC6), o2(0xF8,0xEA),
+     o2(0xE4,0xD5), o2(0xCE,0xF7), o2(0xE0,0xD8),
+
+#define to_EUC_KR_E9_AE WORDINDEX2INFO(7129)
+    to_EUC_KR_E9_AE_offsets,
+    to_EUC_KR_E9_AE_infos,
+
+#define to_EUC_KR_E9_AF_infos WORDINDEX2INFO(7131)
+           INVALID,         UNDEF, o2(0xD7,0xEF), o2(0xF4,0xED),
+     o2(0xCD,0xE6), o2(0xCC,0xF4),
+
+#define to_EUC_KR_E9_AF WORDINDEX2INFO(7137)
+    to_EUC_KR_E9_AF_offsets,
+    to_EUC_KR_E9_AF_infos,
+
+#define to_EUC_KR_E9_B0_infos WORDINDEX2INFO(7139)
+           INVALID,         UNDEF, o2(0xF5,0xE3), o2(0xE4,0xCA),
+     o2(0xDC,0xE1), o2(0xF9,0xC8), o2(0xFC,0xBF), o2(0xE8,0xA7),
+     o2(0xD8,0xC4),
+
+#define to_EUC_KR_E9_B0 WORDINDEX2INFO(7148)
+    to_EUC_KR_E9_B0_offsets,
+    to_EUC_KR_E9_B0_infos,
+
+#define to_EUC_KR_E9_B1_infos WORDINDEX2INFO(7150)
+           INVALID,         UNDEF, o2(0xCB,0xBE), o2(0xDC,0xAE),
+     o2(0xD7,0xF7),
+
+#define to_EUC_KR_E9_B1 WORDINDEX2INFO(7155)
+    to_EUC_KR_E9_B1_offsets,
+    to_EUC_KR_E9_B1_infos,
+
+#define to_EUC_KR_E9_B3_infos WORDINDEX2INFO(7157)
+           INVALID,         UNDEF, o2(0xF0,0xE8), o2(0xDD,0xC0),
+     o2(0xCF,0xCD), o2(0xDC,0xF3), o2(0xD9,0xB0), o2(0xE6,0xE9),
+
+#define to_EUC_KR_E9_B3 WORDINDEX2INFO(7165)
+    to_EUC_KR_E9_B3_offsets,
+    to_EUC_KR_E9_B3_infos,
+
+#define to_EUC_KR_E9_B4_infos WORDINDEX2INFO(7167)
+           INVALID,         UNDEF, o2(0xE4,0xBC), o2(0xEA,0xC4),
+     o2(0xE4,0xEC), o2(0xE4,0xE5), o2(0xFB,0xF8),
+
+#define to_EUC_KR_E9_B4 WORDINDEX2INFO(7174)
+    to_EUC_KR_E9_B4_offsets,
+    to_EUC_KR_E9_B4_infos,
+
+#define to_EUC_KR_E9_B5_infos WORDINDEX2INFO(7176)
+           INVALID,         UNDEF, o2(0xCC,0xBB), o2(0xE4,0xBD),
+     o2(0xCD,0xDC), o2(0xD9,0xF7), o2(0xDD,0xDF), o2(0xED,0xCE),
+
+#define to_EUC_KR_E9_B5 WORDINDEX2INFO(7184)
+    to_EUC_KR_E9_B5_offsets,
+    to_EUC_KR_E9_B5_infos,
+
+#define to_EUC_KR_E9_B6_infos WORDINDEX2INFO(7186)
+           INVALID,         UNDEF, o2(0xD9,0xD0), o2(0xE5,0xA3),
+     o2(0xF9,0xCD),
+
+#define to_EUC_KR_E9_B6 WORDINDEX2INFO(7191)
+    to_EUC_KR_E9_B6_offsets,
+    to_EUC_KR_E9_B6_infos,
+
+#define to_EUC_KR_E9_B7_infos WORDINDEX2INFO(7193)
+           INVALID,         UNDEF, o2(0xCD,0xAE), o2(0xCF,0xCE),
+     o2(0xF6,0xAF), o2(0xFD,0xD3), o2(0xEB,0xED), o2(0xD6,0xDC),
+
+#define to_EUC_KR_E9_B7 WORDINDEX2INFO(7201)
+    to_EUC_KR_E9_B7_offsets,
+    to_EUC_KR_E9_B7_infos,
+
+#define to_EUC_KR_E9_B8_infos WORDINDEX2INFO(7203)
+           INVALID,         UNDEF, o2(0xE5,0xA4), o2(0xD5,0xB6),
+
+#define to_EUC_KR_E9_B8 WORDINDEX2INFO(7207)
+    to_EUC_KR_E9_B8_offsets,
+    to_EUC_KR_E9_B8_infos,
+
+#define to_EUC_KR_E9_B9_infos WORDINDEX2INFO(7209)
+           INVALID,         UNDEF, o2(0xD6,0xDD), o2(0xF9,0xE9),
+     o2(0xE7,0xA4), o2(0xD6,0xE3),
+
+#define to_EUC_KR_E9_B9 WORDINDEX2INFO(7215)
+    to_EUC_KR_E9_B9_offsets,
+    to_EUC_KR_E9_B9_infos,
+
+#define to_EUC_KR_E9_BA_infos WORDINDEX2INFO(7217)
+           INVALID,         UNDEF, o2(0xD1,0xCB), o2(0xD6,0xE4),
+     o2(0xD5,0xF2), o2(0xDE,0xFA), o2(0xD7,0xF8), o2(0xD8,0xEA),
+     o2(0xCF,0xD5), o2(0xD8,0xFD), o2(0xD8,0xAB), o2(0xFD,0xCB),
+
+#define to_EUC_KR_E9_BA WORDINDEX2INFO(7229)
+    to_EUC_KR_E9_BA_offsets,
+    to_EUC_KR_E9_BA_infos,
+
+#define to_EUC_KR_E9_BB_infos WORDINDEX2INFO(7231)
+           INVALID,         UNDEF, o2(0xFC,0xDC), o2(0xE0,0xA8),
+     o2(0xD5,0xF3), o2(0xFD,0xD9), o2(0xCC,0xA3), o2(0xD9,0xF9),
+     o2(0xD3,0xEA), o2(0xF5,0xF5), o2(0xEF,0xC7), o2(0xD3,0xDA),
+     o2(0xDA,0xBD),
+
+#define to_EUC_KR_E9_BB WORDINDEX2INFO(7244)
+    to_EUC_KR_E9_BB_offsets,
+    to_EUC_KR_E9_BB_infos,
+
+#define to_EUC_KR_E9_BC_infos WORDINDEX2INFO(7246)
+           INVALID,         UNDEF, o2(0xE8,0xA8), o2(0xDC,0xAF),
+     o2(0xF0,0xA3), o2(0xCD,0xD5), o2(0xE0,0xA9), o2(0xDE,0xAC),
+
+#define to_EUC_KR_E9_BC WORDINDEX2INFO(7254)
+    to_EUC_KR_E9_BC_offsets,
+    to_EUC_KR_E9_BC_infos,
+
+#define to_EUC_KR_E9_BD_infos WORDINDEX2INFO(7256)
+           INVALID,         UNDEF, o2(0xF0,0xBA), o2(0xEE,0xB1),
+     o2(0xEE,0xB2), o2(0xF6,0xCD), o2(0xEE,0xD2), o2(0xD6,0xC6),
+     o2(0xE0,0xE5), o2(0xF3,0xBB), o2(0xE5,0xE1), o2(0xE4,0xCB),
+
+#define to_EUC_KR_E9_BD WORDINDEX2INFO(7268)
+    to_EUC_KR_E9_BD_offsets,
+    to_EUC_KR_E9_BD_infos,
+
+#define to_EUC_KR_E9_BE_infos WORDINDEX2INFO(7270)
+           INVALID,         UNDEF, o2(0xD7,0xA3), o2(0xDB,0xC2),
+     o2(0xCA,0xFE), o2(0xCF,0xCF),
+
+#define to_EUC_KR_E9_BE WORDINDEX2INFO(7276)
+    to_EUC_KR_E9_BE_offsets,
+    to_EUC_KR_E9_BE_infos,
+
+#define to_EUC_KR_E9_infos WORDINDEX2INFO(7278)
+             INVALID, to_EUC_KR_E9_80, to_EUC_KR_E9_81, to_EUC_KR_E9_82,
+     to_EUC_KR_E9_83, to_EUC_KR_E9_84, to_EUC_KR_E9_85, to_EUC_KR_E9_86,
+     to_EUC_KR_E9_87, to_EUC_KR_E9_88, to_EUC_KR_E9_89, to_EUC_KR_E9_8A,
+     to_EUC_KR_E9_8B, to_EUC_KR_E9_8C, to_EUC_KR_E9_8D, to_EUC_KR_E9_8E,
+     to_EUC_KR_E9_8F, to_EUC_KR_E9_90, to_EUC_KR_E9_91,    to_EUC_KR_C6,
+     to_EUC_KR_E9_95, to_EUC_KR_E9_96, to_EUC_KR_E9_97, to_EUC_KR_E9_98,
+     to_EUC_KR_E9_99, to_EUC_KR_E9_9A, to_EUC_KR_E9_9B, to_EUC_KR_E9_9C,
+     to_EUC_KR_E9_9D, to_EUC_KR_E9_9E, to_EUC_KR_E9_9F, to_EUC_KR_E9_A0,
+     to_EUC_KR_E9_A1, to_EUC_KR_E9_A2, to_EUC_KR_E9_A3, to_EUC_KR_E9_A4,
+     to_EUC_KR_E9_A5, to_EUC_KR_E9_A6, to_EUC_KR_E9_A7, to_EUC_KR_E9_A8,
+     to_EUC_KR_E9_A9, to_EUC_KR_E9_AA, to_EUC_KR_E9_AB, to_EUC_KR_E9_AC,
+     to_EUC_KR_E9_AD, to_EUC_KR_E9_AE, to_EUC_KR_E9_AF, to_EUC_KR_E9_B0,
+     to_EUC_KR_E9_B1, to_EUC_KR_E9_B3, to_EUC_KR_E9_B4, to_EUC_KR_E9_B5,
+     to_EUC_KR_E9_B6, to_EUC_KR_E9_B7, to_EUC_KR_E9_B8, to_EUC_KR_E9_B9,
+     to_EUC_KR_E9_BA, to_EUC_KR_E9_BB, to_EUC_KR_E9_BC, to_EUC_KR_E9_BD,
+     to_EUC_KR_E9_BE,
+
+#define to_EUC_KR_E9 WORDINDEX2INFO(7339)
+    to_EUC_KR_E9_offsets,
+    to_EUC_KR_E9_infos,
+
+#define to_EUC_KR_EA_B0_infos WORDINDEX2INFO(7341)
+           INVALID, o2(0xB0,0xA1), o2(0xB0,0xA2),         UNDEF,
+     o2(0xB0,0xA3), o2(0xB0,0xA4), o2(0xB0,0xA5), o2(0xB0,0xA6),
+     o2(0xB0,0xA7), o2(0xB0,0xA8), o2(0xB0,0xA9), o2(0xB0,0xAA),
+     o2(0xB0,0xAB), o2(0xB0,0xAC), o2(0xB0,0xAD), o2(0xB0,0xAE),
+     o2(0xB0,0xAF), o2(0xB0,0xB0), o2(0xB0,0xB1), o2(0xB0,0xB2),
+     o2(0xB0,0xB3), o2(0xB0,0xB4), o2(0xB0,0xB5), o2(0xB0,0xB6),
+     o2(0xB0,0xB7), o2(0xB0,0xB8), o2(0xB0,0xB9), o2(0xB0,0xBA),
+     o2(0xB0,0xBB), o2(0xB0,0xBC), o2(0xB0,0xBD), o2(0xB0,0xBE),
+
+#define to_EUC_KR_EA_B0 WORDINDEX2INFO(7373)
+    to_EUC_KR_EA_B0_offsets,
+    to_EUC_KR_EA_B0_infos,
+
+#define to_EUC_KR_EA_B1_infos WORDINDEX2INFO(7375)
+           INVALID, o2(0xB0,0xBF),         UNDEF, o2(0xB0,0xC0),
+     o2(0xB0,0xC1), o2(0xB0,0xC2), o2(0xB0,0xC3), o2(0xB0,0xC4),
+     o2(0xB0,0xC5), o2(0xB0,0xC6), o2(0xB0,0xC7), o2(0xB0,0xC8),
+     o2(0xB0,0xC9), o2(0xB0,0xCA),
+
+#define to_EUC_KR_EA_B1 WORDINDEX2INFO(7389)
+    to_EUC_KR_EA_B1_offsets,
+    to_EUC_KR_EA_B1_infos,
+
+#define to_EUC_KR_EA_B2_infos WORDINDEX2INFO(7391)
+           INVALID, o2(0xB0,0xCB), o2(0xB0,0xCC),         UNDEF,
+     o2(0xB0,0xCD), o2(0xB0,0xCE), o2(0xB0,0xCF), o2(0xB0,0xD0),
+     o2(0xB0,0xD1), o2(0xB0,0xD2), o2(0xB0,0xD3), o2(0xB0,0xD4),
+     o2(0xB0,0xD5), o2(0xB0,0xD6), o2(0xB0,0xD7), o2(0xB0,0xD8),
+     o2(0xB0,0xD9), o2(0xB0,0xDA), o2(0xB0,0xDB), o2(0xB0,0xDC),
+     o2(0xB0,0xDD), o2(0xB0,0xDE), o2(0xB0,0xDF), o2(0xB0,0xE0),
+     o2(0xB0,0xE1), o2(0xB0,0xE2), o2(0xB0,0xE3), o2(0xB0,0xE4),
+     o2(0xB0,0xE5), o2(0xB0,0xE6),
+
+#define to_EUC_KR_EA_B2 WORDINDEX2INFO(7421)
+    to_EUC_KR_EA_B2_offsets,
+    to_EUC_KR_EA_B2_infos,
+
+#define to_EUC_KR_EA_B3_infos WORDINDEX2INFO(7423)
+           INVALID,         UNDEF, o2(0xB0,0xE7), o2(0xB0,0xE8),
+     o2(0xB0,0xE9), o2(0xB0,0xEA), o2(0xB0,0xEB), o2(0xB0,0xEC),
+     o2(0xB0,0xED), o2(0xB0,0xEE), o2(0xB0,0xEF), o2(0xB0,0xF0),
+     o2(0xB0,0xF1), o2(0xB0,0xF2), o2(0xB0,0xF3), o2(0xB0,0xF4),
+     o2(0xB0,0xF5), o2(0xB0,0xF6), o2(0xB0,0xF7), o2(0xB0,0xF8),
+     o2(0xB0,0xF9), o2(0xB0,0xFA), o2(0xB0,0xFB),
+
+#define to_EUC_KR_EA_B3 WORDINDEX2INFO(7446)
+    to_EUC_KR_EA_B3_offsets,
+    to_EUC_KR_EA_B3_infos,
+
+#define to_EUC_KR_EA_B4_infos WORDINDEX2INFO(7448)
+           INVALID, o2(0xB0,0xFC),         UNDEF, o2(0xB0,0xFD),
+     o2(0xB0,0xFE), o2(0xB1,0xA1), o2(0xB1,0xA2), o2(0xB1,0xA3),
+     o2(0xB1,0xA4), o2(0xB1,0xA5), o2(0xB1,0xA6), o2(0xB1,0xA7),
+     o2(0xB1,0xA8), o2(0xB1,0xA9), o2(0xB1,0xAA), o2(0xB1,0xAB),
+     o2(0xB1,0xAC), o2(0xB1,0xAD), o2(0xB1,0xAE),
+
+#define to_EUC_KR_EA_B4 WORDINDEX2INFO(7467)
+    to_EUC_KR_EA_B4_offsets,
+    to_EUC_KR_EA_B4_infos,
+
+#define to_EUC_KR_EA_B5_infos WORDINDEX2INFO(7469)
+           INVALID,         UNDEF, o2(0xB1,0xAF), o2(0xB1,0xB0),
+     o2(0xB1,0xB1), o2(0xB1,0xB2), o2(0xB1,0xB3), o2(0xB1,0xB4),
+     o2(0xB1,0xB5), o2(0xB1,0xB6), o2(0xB1,0xB7), o2(0xB1,0xB8),
+     o2(0xB1,0xB9), o2(0xB1,0xBA), o2(0xB1,0xBB), o2(0xB1,0xBC),
+     o2(0xB1,0xBD), o2(0xB1,0xBE), o2(0xB1,0xBF), o2(0xB1,0xC0),
+     o2(0xB1,0xC1), o2(0xB1,0xC2),
+
+#define to_EUC_KR_EA_B5 WORDINDEX2INFO(7491)
+    to_EUC_KR_EA_B5_offsets,
+    to_EUC_KR_EA_B5_infos,
+
+#define to_EUC_KR_EA_B6_infos WORDINDEX2INFO(7493)
+           INVALID,         UNDEF, o2(0xB1,0xC3), o2(0xB1,0xC4),
+     o2(0xB1,0xC5), o2(0xB1,0xC6), o2(0xB1,0xC7), o2(0xB1,0xC8),
+     o2(0xB1,0xC9), o2(0xB1,0xCA), o2(0xB1,0xCB), o2(0xB1,0xCC),
+
+#define to_EUC_KR_EA_B6 WORDINDEX2INFO(7505)
+    to_EUC_KR_EA_B6_offsets,
+    to_EUC_KR_EA_B6_infos,
+
+#define to_EUC_KR_EA_B7_infos WORDINDEX2INFO(7507)
+           INVALID, o2(0xB1,0xCD), o2(0xB1,0xCE),         UNDEF,
+     o2(0xB1,0xCF), o2(0xB1,0xD0), o2(0xB1,0xD1), o2(0xB1,0xD2),
+     o2(0xB1,0xD3), o2(0xB1,0xD4), o2(0xB1,0xD5), o2(0xB1,0xD6),
+     o2(0xB1,0xD7), o2(0xB1,0xD8), o2(0xB1,0xD9), o2(0xB1,0xDA),
+
+#define to_EUC_KR_EA_B7 WORDINDEX2INFO(7523)
+    to_EUC_KR_EA_B7_offsets,
+    to_EUC_KR_EA_B7_infos,
+
+#define to_EUC_KR_EA_B8_infos WORDINDEX2INFO(7525)
+           INVALID, o2(0xB1,0xDB), o2(0xB1,0xDC),         UNDEF,
+     o2(0xB1,0xDD), o2(0xB1,0xDE), o2(0xB1,0xDF), o2(0xB1,0xE0),
+     o2(0xB1,0xE1), o2(0xB1,0xE2), o2(0xB1,0xE3), o2(0xB1,0xE4),
+     o2(0xB1,0xE5), o2(0xB1,0xE6), o2(0xB1,0xE7),
+
+#define to_EUC_KR_EA_B8 WORDINDEX2INFO(7540)
+    to_EUC_KR_EA_B8_offsets,
+    to_EUC_KR_EA_B8_infos,
+
+#define to_EUC_KR_EA_B9_infos WORDINDEX2INFO(7542)
+           INVALID, o2(0xB1,0xE8), o2(0xB1,0xE9),         UNDEF,
+     o2(0xB1,0xEA), o2(0xB1,0xEB), o2(0xB1,0xEC), o2(0xB1,0xED),
+     o2(0xB1,0xEE), o2(0xB1,0xEF), o2(0xB1,0xF0), o2(0xB1,0xF1),
+     o2(0xB1,0xF2), o2(0xB1,0xF3), o2(0xB1,0xF4), o2(0xB1,0xF5),
+     o2(0xB1,0xF6), o2(0xB1,0xF7), o2(0xB1,0xF8), o2(0xB1,0xF9),
+     o2(0xB1,0xFA), o2(0xB1,0xFB), o2(0xB1,0xFC), o2(0xB1,0xFD),
+     o2(0xB1,0xFE), o2(0xB2,0xA1), o2(0xB2,0xA2), o2(0xB2,0xA3),
+     o2(0xB2,0xA4),
+
+#define to_EUC_KR_EA_B9 WORDINDEX2INFO(7571)
+    to_EUC_KR_EA_B9_offsets,
+    to_EUC_KR_EA_B9_infos,
+
+#define to_EUC_KR_EA_BA_infos WORDINDEX2INFO(7573)
+           INVALID,         UNDEF, o2(0xB2,0xA5), o2(0xB2,0xA6),
+     o2(0xB2,0xA7), o2(0xB2,0xA8), o2(0xB2,0xA9), o2(0xB2,0xAA),
+
+#define to_EUC_KR_EA_BA WORDINDEX2INFO(7581)
+    to_EUC_KR_EA_BA_offsets,
+    to_EUC_KR_EA_BA_infos,
+
+#define to_EUC_KR_EA_BB_infos WORDINDEX2INFO(7583)
+           INVALID, o2(0xB2,0xAB),         UNDEF, o2(0xB2,0xAC),
+     o2(0xB2,0xAD), o2(0xB2,0xAE), o2(0xB2,0xAF), o2(0xB2,0xB0),
+     o2(0xB2,0xB1), o2(0xB2,0xB2), o2(0xB2,0xB3), o2(0xB2,0xB4),
+     o2(0xB2,0xB5), o2(0xB2,0xB6), o2(0xB2,0xB7), o2(0xB2,0xB8),
+     o2(0xB2,0xB9), o2(0xB2,0xBA),
+
+#define to_EUC_KR_EA_BB WORDINDEX2INFO(7601)
+    to_EUC_KR_EA_BB_offsets,
+    to_EUC_KR_EA_BB_infos,
+
+#define to_EUC_KR_EA_BC_infos WORDINDEX2INFO(7603)
+           INVALID,         UNDEF, o2(0xB2,0xBB), o2(0xB2,0xBC),
+     o2(0xB2,0xBD), o2(0xB2,0xBE), o2(0xB2,0xBF), o2(0xB2,0xC0),
+     o2(0xB2,0xC1), o2(0xB2,0xC2), o2(0xB2,0xC3), o2(0xB2,0xC4),
+     o2(0xB2,0xC5), o2(0xB2,0xC6),
+
+#define to_EUC_KR_EA_BC WORDINDEX2INFO(7617)
+    to_EUC_KR_EA_BC_offsets,
+    to_EUC_KR_EA_BC_infos,
+
+#define to_EUC_KR_EA_BD_infos WORDINDEX2INFO(7619)
+           INVALID,         UNDEF, o2(0xB2,0xC7), o2(0xB2,0xC8),
+     o2(0xB2,0xC9), o2(0xB2,0xCA), o2(0xB2,0xCB), o2(0xB2,0xCC),
+     o2(0xB2,0xCD), o2(0xB2,0xCE), o2(0xB2,0xCF), o2(0xB2,0xD0),
+     o2(0xB2,0xD1),
+
+#define to_EUC_KR_EA_BD WORDINDEX2INFO(7632)
+    to_EUC_KR_EA_BD_offsets,
+    to_EUC_KR_EA_BD_infos,
+
+#define to_EUC_KR_EA_BE_infos WORDINDEX2INFO(7634)
+           INVALID, o2(0xB2,0xD2),         UNDEF, o2(0xB2,0xD3),
+     o2(0xB2,0xD4), o2(0xB2,0xD5), o2(0xB2,0xD6), o2(0xB2,0xD7),
+     o2(0xB2,0xD8), o2(0xB2,0xD9), o2(0xB2,0xDA), o2(0xB2,0xDB),
+
+#define to_EUC_KR_EA_BE WORDINDEX2INFO(7646)
+    to_EUC_KR_EA_BE_offsets,
+    to_EUC_KR_EA_BE_infos,
+
+#define to_EUC_KR_EA_BF_infos WORDINDEX2INFO(7648)
+           INVALID, o2(0xB2,0xDC),         UNDEF, o2(0xB2,0xDD),
+     o2(0xB2,0xDE), o2(0xB2,0xDF), o2(0xB2,0xE0), o2(0xB2,0xE1),
+     o2(0xB2,0xE2), o2(0xB2,0xE3), o2(0xB2,0xE4), o2(0xB2,0xE5),
+     o2(0xB2,0xE6), o2(0xB2,0xE7), o2(0xB2,0xE8), o2(0xB2,0xE9),
+     o2(0xB2,0xEA),
+
+#define to_EUC_KR_EA_BF WORDINDEX2INFO(7665)
+    to_EUC_KR_EA_BF_offsets,
+    to_EUC_KR_EA_BF_infos,
+
+#define to_EUC_KR_EA_infos WORDINDEX2INFO(7667)
+             INVALID,    to_EUC_KR_C6, to_EUC_KR_EA_B0, to_EUC_KR_EA_B1,
+     to_EUC_KR_EA_B2, to_EUC_KR_EA_B3, to_EUC_KR_EA_B4, to_EUC_KR_EA_B5,
+     to_EUC_KR_EA_B6, to_EUC_KR_EA_B7, to_EUC_KR_EA_B8, to_EUC_KR_EA_B9,
+     to_EUC_KR_EA_BA, to_EUC_KR_EA_BB, to_EUC_KR_EA_BC, to_EUC_KR_EA_BD,
+     to_EUC_KR_EA_BE, to_EUC_KR_EA_BF,
+
+#define to_EUC_KR_EA WORDINDEX2INFO(7685)
+    to_EUC_KR_EA_offsets,
+    to_EUC_KR_EA_infos,
+
+#define to_EUC_KR_EB_80_infos WORDINDEX2INFO(7687)
+           INVALID, o2(0xB2,0xEB), o2(0xB2,0xEC),         UNDEF,
+     o2(0xB2,0xED), o2(0xB2,0xEE), o2(0xB2,0xEF), o2(0xB2,0xF0),
+     o2(0xB2,0xF1), o2(0xB2,0xF2), o2(0xB2,0xF3),
+
+#define to_EUC_KR_EB_80 WORDINDEX2INFO(7698)
+    to_EUC_KR_EB_80_offsets,
+    to_EUC_KR_EB_80_infos,
+
+#define to_EUC_KR_EB_81_infos WORDINDEX2INFO(7700)
+           INVALID,         UNDEF, o2(0xB2,0xF4), o2(0xB2,0xF5),
+     o2(0xB2,0xF6), o2(0xB2,0xF7), o2(0xB2,0xF8), o2(0xB2,0xF9),
+     o2(0xB2,0xFA), o2(0xB2,0xFB), o2(0xB2,0xFC), o2(0xB2,0xFD),
+     o2(0xB2,0xFE), o2(0xB3,0xA1), o2(0xB3,0xA2), o2(0xB3,0xA3),
+
+#define to_EUC_KR_EB_81 WORDINDEX2INFO(7716)
+    to_EUC_KR_EB_81_offsets,
+    to_EUC_KR_EB_81_infos,
+
+#define to_EUC_KR_EB_82_infos WORDINDEX2INFO(7718)
+           INVALID, o2(0xB3,0xA4),         UNDEF, o2(0xB3,0xA5),
+     o2(0xB3,0xA6), o2(0xB3,0xA7), o2(0xB3,0xA8), o2(0xB3,0xA9),
+     o2(0xB3,0xAA), o2(0xB3,0xAB), o2(0xB3,0xAC), o2(0xB3,0xAD),
+     o2(0xB3,0xAE), o2(0xB3,0xAF), o2(0xB3,0xB0), o2(0xB3,0xB1),
+     o2(0xB3,0xB2), o2(0xB3,0xB3), o2(0xB3,0xB4), o2(0xB3,0xB5),
+     o2(0xB3,0xB6), o2(0xB3,0xB7), o2(0xB3,0xB8), o2(0xB3,0xB9),
+     o2(0xB3,0xBA), o2(0xB3,0xBB), o2(0xB3,0xBC), o2(0xB3,0xBD),
+     o2(0xB3,0xBE),
+
+#define to_EUC_KR_EB_82 WORDINDEX2INFO(7747)
+    to_EUC_KR_EB_82_offsets,
+    to_EUC_KR_EB_82_infos,
+
+#define to_EUC_KR_EB_83_infos WORDINDEX2INFO(7749)
+           INVALID,         UNDEF, o2(0xB3,0xBF), o2(0xB3,0xC0),
+     o2(0xB3,0xC1), o2(0xB3,0xC2), o2(0xB3,0xC3), o2(0xB3,0xC4),
+     o2(0xB3,0xC5), o2(0xB3,0xC6), o2(0xB3,0xC7), o2(0xB3,0xC8),
+     o2(0xB3,0xC9),
+
+#define to_EUC_KR_EB_83 WORDINDEX2INFO(7762)
+    to_EUC_KR_EB_83_offsets,
+    to_EUC_KR_EB_83_infos,
+
+#define to_EUC_KR_EB_84_infos WORDINDEX2INFO(7764)
+           INVALID,         UNDEF, o2(0xB3,0xCA), o2(0xB3,0xCB),
+     o2(0xB3,0xCC), o2(0xB3,0xCD), o2(0xB3,0xCE), o2(0xB3,0xCF),
+     o2(0xB3,0xD0), o2(0xB3,0xD1), o2(0xB3,0xD2), o2(0xB3,0xD3),
+     o2(0xB3,0xD4), o2(0xB3,0xD5), o2(0xB3,0xD6), o2(0xB3,0xD7),
+     o2(0xB3,0xD8), o2(0xB3,0xD9), o2(0xB3,0xDA), o2(0xB3,0xDB),
+     o2(0xB3,0xDC), o2(0xB3,0xDD), o2(0xB3,0xDE), o2(0xB3,0xDF),
+
+#define to_EUC_KR_EB_84 WORDINDEX2INFO(7788)
+    to_EUC_KR_EB_84_offsets,
+    to_EUC_KR_EB_84_infos,
+
+#define to_EUC_KR_EB_85_infos WORDINDEX2INFO(7790)
+           INVALID, o2(0xB3,0xE0), o2(0xB3,0xE1),         UNDEF,
+     o2(0xB3,0xE2), o2(0xB3,0xE3), o2(0xB3,0xE4), o2(0xB3,0xE5),
+     o2(0xB3,0xE6), o2(0xB3,0xE7), o2(0xB3,0xE8), o2(0xB3,0xE9),
+     o2(0xB3,0xEA), o2(0xB3,0xEB), o2(0xB3,0xEC), o2(0xB3,0xED),
+
+#define to_EUC_KR_EB_85 WORDINDEX2INFO(7806)
+    to_EUC_KR_EB_85_offsets,
+    to_EUC_KR_EB_85_infos,
+
+#define to_EUC_KR_EB_86_infos WORDINDEX2INFO(7808)
+           INVALID, o2(0xB3,0xEE),         UNDEF, o2(0xB3,0xEF),
+     o2(0xB3,0xF0), o2(0xB3,0xF1), o2(0xB3,0xF2), o2(0xB3,0xF3),
+     o2(0xB3,0xF4), o2(0xB3,0xF5), o2(0xB3,0xF6), o2(0xB3,0xF7),
+     o2(0xB3,0xF8), o2(0xB3,0xF9),
+
+#define to_EUC_KR_EB_86 WORDINDEX2INFO(7822)
+    to_EUC_KR_EB_86_offsets,
+    to_EUC_KR_EB_86_infos,
+
+#define to_EUC_KR_EB_87_infos WORDINDEX2INFO(7824)
+           INVALID,         UNDEF, o2(0xB3,0xFA), o2(0xB3,0xFB),
+     o2(0xB3,0xFC), o2(0xB3,0xFD), o2(0xB3,0xFE), o2(0xB4,0xA1),
+     o2(0xB4,0xA2), o2(0xB4,0xA3), o2(0xB4,0xA4), o2(0xB4,0xA5),
+     o2(0xB4,0xA6), o2(0xB4,0xA7), o2(0xB4,0xA8),
+
+#define to_EUC_KR_EB_87 WORDINDEX2INFO(7839)
+    to_EUC_KR_EB_87_offsets,
+    to_EUC_KR_EB_87_infos,
+
+#define to_EUC_KR_EB_88_infos WORDINDEX2INFO(7841)
+           INVALID,         UNDEF, o2(0xB4,0xA9), o2(0xB4,0xAA),
+     o2(0xB4,0xAB), o2(0xB4,0xAC), o2(0xB4,0xAD), o2(0xB4,0xAE),
+     o2(0xB4,0xAF), o2(0xB4,0xB0), o2(0xB4,0xB1), o2(0xB4,0xB2),
+     o2(0xB4,0xB3), o2(0xB4,0xB4),
+
+#define to_EUC_KR_EB_88 WORDINDEX2INFO(7855)
+    to_EUC_KR_EB_88_offsets,
+    to_EUC_KR_EB_88_infos,
+
+#define to_EUC_KR_EB_89_infos WORDINDEX2INFO(7857)
+           INVALID,         UNDEF, o2(0xB4,0xB5), o2(0xB4,0xB6),
+     o2(0xB4,0xB7), o2(0xB4,0xB8), o2(0xB4,0xB9), o2(0xB4,0xBA),
+     o2(0xB4,0xBB), o2(0xB4,0xBC),
+
+#define to_EUC_KR_EB_89 WORDINDEX2INFO(7867)
+    to_EUC_KR_EB_89_offsets,
+    to_EUC_KR_EB_89_infos,
+
+#define to_EUC_KR_EB_8A_infos WORDINDEX2INFO(7869)
+           INVALID,         UNDEF, o2(0xB4,0xBD), o2(0xB4,0xBE),
+     o2(0xB4,0xBF), o2(0xB4,0xC0), o2(0xB4,0xC1), o2(0xB4,0xC2),
+     o2(0xB4,0xC3), o2(0xB4,0xC4), o2(0xB4,0xC5), o2(0xB4,0xC6),
+     o2(0xB4,0xC7), o2(0xB4,0xC8), o2(0xB4,0xC9), o2(0xB4,0xCA),
+     o2(0xB4,0xCB), o2(0xB4,0xCC), o2(0xB4,0xCD), o2(0xB4,0xCE),
+
+#define to_EUC_KR_EB_8A WORDINDEX2INFO(7889)
+    to_EUC_KR_EB_8A_offsets,
+    to_EUC_KR_EB_8A_infos,
+
+#define to_EUC_KR_EB_8B_infos WORDINDEX2INFO(7891)
+           INVALID,         UNDEF, o2(0xB4,0xCF), o2(0xB4,0xD0),
+     o2(0xB4,0xD1), o2(0xB4,0xD2), o2(0xB4,0xD3), o2(0xB4,0xD4),
+     o2(0xB4,0xD5), o2(0xB4,0xD6), o2(0xB4,0xD7), o2(0xB4,0xD8),
+     o2(0xB4,0xD9), o2(0xB4,0xDA), o2(0xB4,0xDB), o2(0xB4,0xDC),
+     o2(0xB4,0xDD), o2(0xB4,0xDE), o2(0xB4,0xDF), o2(0xB4,0xE0),
+     o2(0xB4,0xE1), o2(0xB4,0xE2), o2(0xB4,0xE3), o2(0xB4,0xE4),
+     o2(0xB4,0xE5), o2(0xB4,0xE6), o2(0xB4,0xE7), o2(0xB4,0xE8),
+     o2(0xB4,0xE9), o2(0xB4,0xEA),
+
+#define to_EUC_KR_EB_8B WORDINDEX2INFO(7921)
+    to_EUC_KR_EB_8B_offsets,
+    to_EUC_KR_EB_8B_infos,
+
+#define to_EUC_KR_EB_8C_infos WORDINDEX2INFO(7923)
+           INVALID, o2(0xB4,0xEB), o2(0xB4,0xEC),         UNDEF,
+     o2(0xB4,0xED), o2(0xB4,0xEE), o2(0xB4,0xEF), o2(0xB4,0xF0),
+     o2(0xB4,0xF1), o2(0xB4,0xF2), o2(0xB4,0xF3), o2(0xB4,0xF4),
+
+#define to_EUC_KR_EB_8C WORDINDEX2INFO(7935)
+    to_EUC_KR_EB_8C_offsets,
+    to_EUC_KR_EB_8C_infos,
+
+#define to_EUC_KR_EB_8D_infos WORDINDEX2INFO(7937)
+           INVALID,         UNDEF, o2(0xB4,0xF5), o2(0xB4,0xF6),
+     o2(0xB4,0xF7), o2(0xB4,0xF8), o2(0xB4,0xF9), o2(0xB4,0xFA),
+     o2(0xB4,0xFB), o2(0xB4,0xFC), o2(0xB4,0xFD), o2(0xB4,0xFE),
+     o2(0xB5,0xA1), o2(0xB5,0xA2), o2(0xB5,0xA3), o2(0xB5,0xA4),
+     o2(0xB5,0xA5), o2(0xB5,0xA6), o2(0xB5,0xA7), o2(0xB5,0xA8),
+
+#define to_EUC_KR_EB_8D WORDINDEX2INFO(7957)
+    to_EUC_KR_EB_8D_offsets,
+    to_EUC_KR_EB_8D_infos,
+
+#define to_EUC_KR_EB_8E_infos WORDINDEX2INFO(7959)
+           INVALID, o2(0xB5,0xA9), o2(0xB5,0xAA),         UNDEF,
+     o2(0xB5,0xAB), o2(0xB5,0xAC), o2(0xB5,0xAD), o2(0xB5,0xAE),
+     o2(0xB5,0xAF), o2(0xB5,0xB0), o2(0xB5,0xB1), o2(0xB5,0xB2),
+     o2(0xB5,0xB3), o2(0xB5,0xB4),
+
+#define to_EUC_KR_EB_8E WORDINDEX2INFO(7973)
+    to_EUC_KR_EB_8E_offsets,
+    to_EUC_KR_EB_8E_infos,
+
+#define to_EUC_KR_EB_8F_infos WORDINDEX2INFO(7975)
+           INVALID,         UNDEF, o2(0xB5,0xB5), o2(0xB5,0xB6),
+     o2(0xB5,0xB7), o2(0xB5,0xB8), o2(0xB5,0xB9), o2(0xB5,0xBA),
+     o2(0xB5,0xBB), o2(0xB5,0xBC), o2(0xB5,0xBD), o2(0xB5,0xBE),
+     o2(0xB5,0xBF), o2(0xB5,0xC0), o2(0xB5,0xC1), o2(0xB5,0xC2),
+     o2(0xB5,0xC3), o2(0xB5,0xC4), o2(0xB5,0xC5),
+
+#define to_EUC_KR_EB_8F WORDINDEX2INFO(7994)
+    to_EUC_KR_EB_8F_offsets,
+    to_EUC_KR_EB_8F_infos,
+
+#define to_EUC_KR_EB_90_infos WORDINDEX2INFO(7996)
+           INVALID,         UNDEF, o2(0xB5,0xC6), o2(0xB5,0xC7),
+     o2(0xB5,0xC8), o2(0xB5,0xC9), o2(0xB5,0xCA), o2(0xB5,0xCB),
+     o2(0xB5,0xCC), o2(0xB5,0xCD),
+
+#define to_EUC_KR_EB_90 WORDINDEX2INFO(8006)
+    to_EUC_KR_EB_90_offsets,
+    to_EUC_KR_EB_90_infos,
+
+#define to_EUC_KR_EB_91_infos WORDINDEX2INFO(8008)
+           INVALID,         UNDEF, o2(0xB5,0xCE), o2(0xB5,0xCF),
+     o2(0xB5,0xD0), o2(0xB5,0xD1), o2(0xB5,0xD2), o2(0xB5,0xD3),
+     o2(0xB5,0xD4), o2(0xB5,0xD5), o2(0xB5,0xD6),
+
+#define to_EUC_KR_EB_91 WORDINDEX2INFO(8019)
+    to_EUC_KR_EB_91_offsets,
+    to_EUC_KR_EB_91_infos,
+
+#define to_EUC_KR_EB_92_infos WORDINDEX2INFO(8021)
+           INVALID, o2(0xB5,0xD7),         UNDEF, o2(0xB5,0xD8),
+     o2(0xB5,0xD9), o2(0xB5,0xDA), o2(0xB5,0xDB), o2(0xB5,0xDC),
+     o2(0xB5,0xDD), o2(0xB5,0xDE), o2(0xB5,0xDF),
+
+#define to_EUC_KR_EB_92 WORDINDEX2INFO(8032)
+    to_EUC_KR_EB_92_offsets,
+    to_EUC_KR_EB_92_infos,
+
+#define to_EUC_KR_EB_93_infos WORDINDEX2INFO(8034)
+           INVALID, o2(0xB5,0xE0),         UNDEF, o2(0xB5,0xE1),
+     o2(0xB5,0xE2), o2(0xB5,0xE3), o2(0xB5,0xE4), o2(0xB5,0xE5),
+     o2(0xB5,0xE6), o2(0xB5,0xE7), o2(0xB5,0xE8), o2(0xB5,0xE9),
+     o2(0xB5,0xEA), o2(0xB5,0xEB), o2(0xB5,0xEC), o2(0xB5,0xED),
+     o2(0xB5,0xEE), o2(0xB5,0xEF),
+
+#define to_EUC_KR_EB_93 WORDINDEX2INFO(8052)
+    to_EUC_KR_EB_93_offsets,
+    to_EUC_KR_EB_93_infos,
+
+#define to_EUC_KR_EB_94_infos WORDINDEX2INFO(8054)
+           INVALID,         UNDEF, o2(0xB5,0xF0), o2(0xB5,0xF1),
+     o2(0xB5,0xF2), o2(0xB5,0xF3), o2(0xB5,0xF4), o2(0xB5,0xF5),
+     o2(0xB5,0xF6), o2(0xB5,0xF7), o2(0xB5,0xF8), o2(0xB5,0xF9),
+     o2(0xB5,0xFA), o2(0xB5,0xFB), o2(0xB5,0xFC), o2(0xB5,0xFD),
+     o2(0xB5,0xFE),
+
+#define to_EUC_KR_EB_94 WORDINDEX2INFO(8071)
+    to_EUC_KR_EB_94_offsets,
+    to_EUC_KR_EB_94_infos,
+
+#define to_EUC_KR_EB_95_infos WORDINDEX2INFO(8073)
+           INVALID, o2(0xB6,0xA1), o2(0xB6,0xA2),         UNDEF,
+     o2(0xB6,0xA3), o2(0xB6,0xA4), o2(0xB6,0xA5), o2(0xB6,0xA6),
+     o2(0xB6,0xA7), o2(0xB6,0xA8), o2(0xB6,0xA9), o2(0xB6,0xAA),
+     o2(0xB6,0xAB), o2(0xB6,0xAC), o2(0xB6,0xAD), o2(0xB6,0xAE),
+     o2(0xB6,0xAF),
+
+#define to_EUC_KR_EB_95 WORDINDEX2INFO(8090)
+    to_EUC_KR_EB_95_offsets,
+    to_EUC_KR_EB_95_infos,
+
+#define to_EUC_KR_EB_96_infos WORDINDEX2INFO(8092)
+           INVALID,         UNDEF, o2(0xB6,0xB0), o2(0xB6,0xB1),
+     o2(0xB6,0xB2), o2(0xB6,0xB3), o2(0xB6,0xB4), o2(0xB6,0xB5),
+     o2(0xB6,0xB6), o2(0xB6,0xB7), o2(0xB6,0xB8), o2(0xB6,0xB9),
+     o2(0xB6,0xBA), o2(0xB6,0xBB), o2(0xB6,0xBC), o2(0xB6,0xBD),
+
+#define to_EUC_KR_EB_96 WORDINDEX2INFO(8108)
+    to_EUC_KR_EB_96_offsets,
+    to_EUC_KR_EB_96_infos,
+
+#define to_EUC_KR_EB_97_infos WORDINDEX2INFO(8110)
+           INVALID, o2(0xB6,0xBE),         UNDEF, o2(0xB6,0xBF),
+     o2(0xB6,0xC0), o2(0xB6,0xC1), o2(0xB6,0xC2), o2(0xB6,0xC3),
+     o2(0xB6,0xC4), o2(0xB6,0xC5), o2(0xB6,0xC6),
+
+#define to_EUC_KR_EB_97 WORDINDEX2INFO(8121)
+    to_EUC_KR_EB_97_offsets,
+    to_EUC_KR_EB_97_infos,
+
+#define to_EUC_KR_EB_98_infos WORDINDEX2INFO(8123)
+           INVALID,         UNDEF, o2(0xB6,0xC7), o2(0xB6,0xC8),
+     o2(0xB6,0xC9), o2(0xB6,0xCA), o2(0xB6,0xCB), o2(0xB6,0xCC),
+     o2(0xB6,0xCD),
+
+#define to_EUC_KR_EB_98 WORDINDEX2INFO(8132)
+    to_EUC_KR_EB_98_offsets,
+    to_EUC_KR_EB_98_infos,
+
+#define to_EUC_KR_EB_99_infos WORDINDEX2INFO(8134)
+           INVALID,         UNDEF, o2(0xB6,0xCE), o2(0xB6,0xCF),
+     o2(0xB6,0xD0),
+
+#define to_EUC_KR_EB_99 WORDINDEX2INFO(8139)
+    to_EUC_KR_EB_99_offsets,
+    to_EUC_KR_EB_99_infos,
+
+#define to_EUC_KR_EB_9A_infos WORDINDEX2INFO(8141)
+           INVALID,         UNDEF, o2(0xB6,0xD1), o2(0xB6,0xD2),
+     o2(0xB6,0xD3), o2(0xB6,0xD4), o2(0xB6,0xD5), o2(0xB6,0xD6),
+     o2(0xB6,0xD7),
+
+#define to_EUC_KR_EB_9A WORDINDEX2INFO(8150)
+    to_EUC_KR_EB_9A_offsets,
+    to_EUC_KR_EB_9A_infos,
+
+#define to_EUC_KR_EB_9B_infos WORDINDEX2INFO(8152)
+           INVALID,         UNDEF, o2(0xB6,0xD8), o2(0xB6,0xD9),
+     o2(0xB6,0xDA), o2(0xB6,0xDB),
+
+#define to_EUC_KR_EB_9B WORDINDEX2INFO(8158)
+    to_EUC_KR_EB_9B_offsets,
+    to_EUC_KR_EB_9B_infos,
+
+#define to_EUC_KR_EB_9C_infos WORDINDEX2INFO(8160)
+           INVALID, o2(0xB6,0xDC), o2(0xB6,0xDD),         UNDEF,
+     o2(0xB6,0xDE), o2(0xB6,0xDF), o2(0xB6,0xE0), o2(0xB6,0xE1),
+     o2(0xB6,0xE2), o2(0xB6,0xE3), o2(0xB6,0xE4), o2(0xB6,0xE5),
+     o2(0xB6,0xE6),
+
+#define to_EUC_KR_EB_9C WORDINDEX2INFO(8173)
+    to_EUC_KR_EB_9C_offsets,
+    to_EUC_KR_EB_9C_infos,
+
+#define to_EUC_KR_EB_9D_infos WORDINDEX2INFO(8175)
+           INVALID,         UNDEF, o2(0xB6,0xE7), o2(0xB6,0xE8),
+     o2(0xB6,0xE9), o2(0xB6,0xEA), o2(0xB6,0xEB), o2(0xB6,0xEC),
+     o2(0xB6,0xED), o2(0xB6,0xEE), o2(0xB6,0xEF), o2(0xB6,0xF0),
+     o2(0xB6,0xF1), o2(0xB6,0xF2), o2(0xB6,0xF3), o2(0xB6,0xF4),
+
+#define to_EUC_KR_EB_9D WORDINDEX2INFO(8191)
+    to_EUC_KR_EB_9D_offsets,
+    to_EUC_KR_EB_9D_infos,
+
+#define to_EUC_KR_EB_9E_infos WORDINDEX2INFO(8193)
+           INVALID, o2(0xB6,0xF5),         UNDEF, o2(0xB6,0xF6),
+     o2(0xB6,0xF7), o2(0xB6,0xF8), o2(0xB6,0xF9), o2(0xB6,0xFA),
+     o2(0xB6,0xFB), o2(0xB6,0xFC), o2(0xB6,0xFD), o2(0xB6,0xFE),
+     o2(0xB7,0xA1), o2(0xB7,0xA2), o2(0xB7,0xA3), o2(0xB7,0xA4),
+     o2(0xB7,0xA5), o2(0xB7,0xA6), o2(0xB7,0xA7), o2(0xB7,0xA8),
+     o2(0xB7,0xA9), o2(0xB7,0xAA), o2(0xB7,0xAB), o2(0xB7,0xAC),
+
+#define to_EUC_KR_EB_9E WORDINDEX2INFO(8217)
+    to_EUC_KR_EB_9E_offsets,
+    to_EUC_KR_EB_9E_infos,
+
+#define to_EUC_KR_EB_9F_infos WORDINDEX2INFO(8219)
+           INVALID,         UNDEF, o2(0xB7,0xAD), o2(0xB7,0xAE),
+     o2(0xB7,0xAF), o2(0xB7,0xB0), o2(0xB7,0xB1), o2(0xB7,0xB2),
+     o2(0xB7,0xB3), o2(0xB7,0xB4), o2(0xB7,0xB5),
+
+#define to_EUC_KR_EB_9F WORDINDEX2INFO(8230)
+    to_EUC_KR_EB_9F_offsets,
+    to_EUC_KR_EB_9F_infos,
+
+#define to_EUC_KR_EB_A0_infos WORDINDEX2INFO(8232)
+           INVALID, o2(0xB7,0xB6), o2(0xB7,0xB7),         UNDEF,
+     o2(0xB7,0xB8), o2(0xB7,0xB9), o2(0xB7,0xBA), o2(0xB7,0xBB),
+     o2(0xB7,0xBC), o2(0xB7,0xBD), o2(0xB7,0xBE), o2(0xB7,0xBF),
+     o2(0xB7,0xC0), o2(0xB7,0xC1), o2(0xB7,0xC2), o2(0xB7,0xC3),
+     o2(0xB7,0xC4), o2(0xB7,0xC5), o2(0xB7,0xC6), o2(0xB7,0xC7),
+     o2(0xB7,0xC8), o2(0xB7,0xC9),
+
+#define to_EUC_KR_EB_A0 WORDINDEX2INFO(8254)
+    to_EUC_KR_EB_A0_offsets,
+    to_EUC_KR_EB_A0_infos,
+
+#define to_EUC_KR_EB_A1_infos WORDINDEX2INFO(8256)
+           INVALID, o2(0xB7,0xCA),         UNDEF, o2(0xB7,0xCB),
+     o2(0xB7,0xCC), o2(0xB7,0xCD), o2(0xB7,0xCE), o2(0xB7,0xCF),
+     o2(0xB7,0xD0), o2(0xB7,0xD1), o2(0xB7,0xD2), o2(0xB7,0xD3),
+     o2(0xB7,0xD4), o2(0xB7,0xD5), o2(0xB7,0xD6), o2(0xB7,0xD7),
+
+#define to_EUC_KR_EB_A1 WORDINDEX2INFO(8272)
+    to_EUC_KR_EB_A1_offsets,
+    to_EUC_KR_EB_A1_infos,
+
+#define to_EUC_KR_EB_A2_infos WORDINDEX2INFO(8274)
+           INVALID,         UNDEF, o2(0xB7,0xD8), o2(0xB7,0xD9),
+     o2(0xB7,0xDA), o2(0xB7,0xDB), o2(0xB7,0xDC),
+
+#define to_EUC_KR_EB_A2 WORDINDEX2INFO(8281)
+    to_EUC_KR_EB_A2_offsets,
+    to_EUC_KR_EB_A2_infos,
+
+#define to_EUC_KR_EB_A3_infos WORDINDEX2INFO(8283)
+           INVALID, o2(0xB7,0xDD), o2(0xB7,0xDE),         UNDEF,
+     o2(0xB7,0xDF), o2(0xB7,0xE0), o2(0xB7,0xE1), o2(0xB7,0xE2),
+     o2(0xB7,0xE3), o2(0xB7,0xE4), o2(0xB7,0xE5), o2(0xB7,0xE6),
+     o2(0xB7,0xE7), o2(0xB7,0xE8), o2(0xB7,0xE9), o2(0xB7,0xEA),
+     o2(0xB7,0xEB), o2(0xB7,0xEC), o2(0xB7,0xED), o2(0xB7,0xEE),
+
+#define to_EUC_KR_EB_A3 WORDINDEX2INFO(8303)
+    to_EUC_KR_EB_A3_offsets,
+    to_EUC_KR_EB_A3_infos,
+
+#define to_EUC_KR_EB_A4_infos WORDINDEX2INFO(8305)
+           INVALID,         UNDEF, o2(0xB7,0xEF), o2(0xB7,0xF0),
+     o2(0xB7,0xF1), o2(0xB7,0xF2), o2(0xB7,0xF3),
+
+#define to_EUC_KR_EB_A4 WORDINDEX2INFO(8312)
+    to_EUC_KR_EB_A4_offsets,
+    to_EUC_KR_EB_A4_infos,
+
+#define to_EUC_KR_EB_A5_infos WORDINDEX2INFO(8314)
+           INVALID, o2(0xB7,0xF4),         UNDEF, o2(0xB7,0xF5),
+     o2(0xB7,0xF6), o2(0xB7,0xF7), o2(0xB7,0xF8), o2(0xB7,0xF9),
+     o2(0xB7,0xFA), o2(0xB7,0xFB), o2(0xB7,0xFC), o2(0xB7,0xFD),
+     o2(0xB7,0xFE), o2(0xB8,0xA1), o2(0xB8,0xA2), o2(0xB8,0xA3),
+     o2(0xB8,0xA4), o2(0xB8,0xA5), o2(0xB8,0xA6),
+
+#define to_EUC_KR_EB_A5 WORDINDEX2INFO(8333)
+    to_EUC_KR_EB_A5_offsets,
+    to_EUC_KR_EB_A5_infos,
+
+#define to_EUC_KR_EB_A6_infos WORDINDEX2INFO(8335)
+           INVALID,         UNDEF, o2(0xB8,0xA7), o2(0xB8,0xA8),
+     o2(0xB8,0xA9), o2(0xB8,0xAA), o2(0xB8,0xAB), o2(0xB8,0xAC),
+     o2(0xB8,0xAD), o2(0xB8,0xAE), o2(0xB8,0xAF), o2(0xB8,0xB0),
+     o2(0xB8,0xB1), o2(0xB8,0xB2), o2(0xB8,0xB3), o2(0xB8,0xB4),
+
+#define to_EUC_KR_EB_A6 WORDINDEX2INFO(8351)
+    to_EUC_KR_EB_A6_offsets,
+    to_EUC_KR_EB_A6_infos,
+
+#define to_EUC_KR_EB_A7_infos WORDINDEX2INFO(8353)
+           INVALID,         UNDEF, o2(0xB8,0xB5), o2(0xB8,0xB6),
+     o2(0xB8,0xB7), o2(0xB8,0xB8), o2(0xB8,0xB9), o2(0xB8,0xBA),
+     o2(0xB8,0xBB), o2(0xB8,0xBC), o2(0xB8,0xBD), o2(0xB8,0xBE),
+     o2(0xB8,0xBF), o2(0xB8,0xC0), o2(0xB8,0xC1), o2(0xB8,0xC2),
+     o2(0xB8,0xC3), o2(0xB8,0xC4), o2(0xB8,0xC5), o2(0xB8,0xC6),
+     o2(0xB8,0xC7), o2(0xB8,0xC8), o2(0xB8,0xC9), o2(0xB8,0xCA),
+     o2(0xB8,0xCB), o2(0xB8,0xCC), o2(0xB8,0xCD), o2(0xB8,0xCE),
+
+#define to_EUC_KR_EB_A7 WORDINDEX2INFO(8381)
+    to_EUC_KR_EB_A7_offsets,
+    to_EUC_KR_EB_A7_infos,
+
+#define to_EUC_KR_EB_A8_infos WORDINDEX2INFO(8383)
+           INVALID, o2(0xB8,0xCF), o2(0xB8,0xD0),         UNDEF,
+     o2(0xB8,0xD1), o2(0xB8,0xD2), o2(0xB8,0xD3), o2(0xB8,0xD4),
+     o2(0xB8,0xD5),
+
+#define to_EUC_KR_EB_A8 WORDINDEX2INFO(8392)
+    to_EUC_KR_EB_A8_offsets,
+    to_EUC_KR_EB_A8_infos,
+
+#define to_EUC_KR_EB_A9_infos WORDINDEX2INFO(8394)
+           INVALID, o2(0xB8,0xD6),         UNDEF, o2(0xB8,0xD7),
+     o2(0xB8,0xD8), o2(0xB8,0xD9), o2(0xB8,0xDA), o2(0xB8,0xDB),
+     o2(0xB8,0xDC), o2(0xB8,0xDD), o2(0xB8,0xDE), o2(0xB8,0xDF),
+     o2(0xB8,0xE0), o2(0xB8,0xE1), o2(0xB8,0xE2), o2(0xB8,0xE3),
+     o2(0xB8,0xE4), o2(0xB8,0xE5), o2(0xB8,0xE6), o2(0xB8,0xE7),
+     o2(0xB8,0xE8), o2(0xB8,0xE9), o2(0xB8,0xEA),
+
+#define to_EUC_KR_EB_A9 WORDINDEX2INFO(8417)
+    to_EUC_KR_EB_A9_offsets,
+    to_EUC_KR_EB_A9_infos,
+
+#define to_EUC_KR_EB_AA_infos WORDINDEX2INFO(8419)
+           INVALID,         UNDEF, o2(0xB8,0xEB), o2(0xB8,0xEC),
+     o2(0xB8,0xED), o2(0xB8,0xEE), o2(0xB8,0xEF), o2(0xB8,0xF0),
+     o2(0xB8,0xF1), o2(0xB8,0xF2), o2(0xB8,0xF3), o2(0xB8,0xF4),
+     o2(0xB8,0xF5), o2(0xB8,0xF6), o2(0xB8,0xF7), o2(0xB8,0xF8),
+     o2(0xB8,0xF9),
+
+#define to_EUC_KR_EB_AA WORDINDEX2INFO(8436)
+    to_EUC_KR_EB_AA_offsets,
+    to_EUC_KR_EB_AA_infos,
+
+#define to_EUC_KR_EB_AB_infos WORDINDEX2INFO(8438)
+           INVALID,         UNDEF, o2(0xB8,0xFA), o2(0xB8,0xFB),
+     o2(0xB8,0xFC), o2(0xB8,0xFD), o2(0xB8,0xFE),
+
+#define to_EUC_KR_EB_AB WORDINDEX2INFO(8445)
+    to_EUC_KR_EB_AB_offsets,
+    to_EUC_KR_EB_AB_infos,
+
+#define to_EUC_KR_EB_AC_infos WORDINDEX2INFO(8447)
+           INVALID, o2(0xB9,0xA1),         UNDEF, o2(0xB9,0xA2),
+     o2(0xB9,0xA3), o2(0xB9,0xA4), o2(0xB9,0xA5), o2(0xB9,0xA6),
+     o2(0xB9,0xA7), o2(0xB9,0xA8), o2(0xB9,0xA9), o2(0xB9,0xAA),
+     o2(0xB9,0xAB), o2(0xB9,0xAC), o2(0xB9,0xAD), o2(0xB9,0xAE),
+     o2(0xB9,0xAF), o2(0xB9,0xB0), o2(0xB9,0xB1), o2(0xB9,0xB2),
+
+#define to_EUC_KR_EB_AC WORDINDEX2INFO(8467)
+    to_EUC_KR_EB_AC_offsets,
+    to_EUC_KR_EB_AC_infos,
+
+#define to_EUC_KR_EB_AD_infos WORDINDEX2INFO(8469)
+           INVALID,         UNDEF, o2(0xB9,0xB3), o2(0xB9,0xB4),
+     o2(0xB9,0xB5), o2(0xB9,0xB6), o2(0xB9,0xB7), o2(0xB9,0xB8),
+     o2(0xB9,0xB9), o2(0xB9,0xBA), o2(0xB9,0xBB), o2(0xB9,0xBC),
+     o2(0xB9,0xBD), o2(0xB9,0xBE),
+
+#define to_EUC_KR_EB_AD WORDINDEX2INFO(8483)
+    to_EUC_KR_EB_AD_offsets,
+    to_EUC_KR_EB_AD_infos,
+
+#define to_EUC_KR_EB_AE_infos WORDINDEX2INFO(8485)
+           INVALID,         UNDEF, o2(0xB9,0xBF), o2(0xB9,0xC0),
+     o2(0xB9,0xC1), o2(0xB9,0xC2), o2(0xB9,0xC3), o2(0xB9,0xC4),
+     o2(0xB9,0xC5), o2(0xB9,0xC6),
+
+#define to_EUC_KR_EB_AE WORDINDEX2INFO(8495)
+    to_EUC_KR_EB_AE_offsets,
+    to_EUC_KR_EB_AE_infos,
+
+#define to_EUC_KR_EB_AF_infos WORDINDEX2INFO(8497)
+           INVALID, o2(0xB9,0xC7),         UNDEF, o2(0xB9,0xC8),
+     o2(0xB9,0xC9), o2(0xB9,0xCA), o2(0xB9,0xCB), o2(0xB9,0xCC),
+     o2(0xB9,0xCD), o2(0xB9,0xCE), o2(0xB9,0xCF),
+
+#define to_EUC_KR_EB_AF WORDINDEX2INFO(8508)
+    to_EUC_KR_EB_AF_offsets,
+    to_EUC_KR_EB_AF_infos,
+
+#define to_EUC_KR_EB_B0_infos WORDINDEX2INFO(8510)
+           INVALID, o2(0xB9,0xD0),         UNDEF, o2(0xB9,0xD1),
+     o2(0xB9,0xD2), o2(0xB9,0xD3), o2(0xB9,0xD4), o2(0xB9,0xD5),
+     o2(0xB9,0xD6), o2(0xB9,0xD7), o2(0xB9,0xD8), o2(0xB9,0xD9),
+     o2(0xB9,0xDA), o2(0xB9,0xDB), o2(0xB9,0xDC), o2(0xB9,0xDD),
+     o2(0xB9,0xDE), o2(0xB9,0xDF), o2(0xB9,0xE0), o2(0xB9,0xE1),
+     o2(0xB9,0xE2), o2(0xB9,0xE3), o2(0xB9,0xE4), o2(0xB9,0xE5),
+     o2(0xB9,0xE6), o2(0xB9,0xE7), o2(0xB9,0xE8), o2(0xB9,0xE9),
+     o2(0xB9,0xEA), o2(0xB9,0xEB),
+
+#define to_EUC_KR_EB_B0 WORDINDEX2INFO(8540)
+    to_EUC_KR_EB_B0_offsets,
+    to_EUC_KR_EB_B0_infos,
+
+#define to_EUC_KR_EB_B1_infos WORDINDEX2INFO(8542)
+           INVALID, o2(0xB9,0xEC), o2(0xB9,0xED),         UNDEF,
+     o2(0xB9,0xEE), o2(0xB9,0xEF), o2(0xB9,0xF0), o2(0xB9,0xF1),
+     o2(0xB9,0xF2), o2(0xB9,0xF3), o2(0xB9,0xF4), o2(0xB9,0xF5),
+
+#define to_EUC_KR_EB_B1 WORDINDEX2INFO(8554)
+    to_EUC_KR_EB_B1_offsets,
+    to_EUC_KR_EB_B1_infos,
+
+#define to_EUC_KR_EB_B2_infos WORDINDEX2INFO(8556)
+           INVALID,         UNDEF, o2(0xB9,0xF6), o2(0xB9,0xF7),
+     o2(0xB9,0xF8), o2(0xB9,0xF9), o2(0xB9,0xFA), o2(0xB9,0xFB),
+     o2(0xB9,0xFC), o2(0xB9,0xFD), o2(0xB9,0xFE), o2(0xBA,0xA1),
+     o2(0xBA,0xA2), o2(0xBA,0xA3), o2(0xBA,0xA4), o2(0xBA,0xA5),
+     o2(0xBA,0xA6), o2(0xBA,0xA7), o2(0xBA,0xA8), o2(0xBA,0xA9),
+     o2(0xBA,0xAA), o2(0xBA,0xAB), o2(0xBA,0xAC), o2(0xBA,0xAD),
+     o2(0xBA,0xAE),
+
+#define to_EUC_KR_EB_B2 WORDINDEX2INFO(8581)
+    to_EUC_KR_EB_B2_offsets,
+    to_EUC_KR_EB_B2_infos,
+
+#define to_EUC_KR_EB_B3_infos WORDINDEX2INFO(8583)
+           INVALID, o2(0xBA,0xAF),         UNDEF, o2(0xBA,0xB0),
+     o2(0xBA,0xB1), o2(0xBA,0xB2), o2(0xBA,0xB3), o2(0xBA,0xB4),
+     o2(0xBA,0xB5), o2(0xBA,0xB6), o2(0xBA,0xB7), o2(0xBA,0xB8),
+     o2(0xBA,0xB9), o2(0xBA,0xBA), o2(0xBA,0xBB), o2(0xBA,0xBC),
+
+#define to_EUC_KR_EB_B3 WORDINDEX2INFO(8599)
+    to_EUC_KR_EB_B3_offsets,
+    to_EUC_KR_EB_B3_infos,
+
+#define to_EUC_KR_EB_B4_infos WORDINDEX2INFO(8601)
+           INVALID,         UNDEF, o2(0xBA,0xBD), o2(0xBA,0xBE),
+     o2(0xBA,0xBF), o2(0xBA,0xC0), o2(0xBA,0xC1), o2(0xBA,0xC2),
+     o2(0xBA,0xC3), o2(0xBA,0xC4),
+
+#define to_EUC_KR_EB_B4 WORDINDEX2INFO(8611)
+    to_EUC_KR_EB_B4_offsets,
+    to_EUC_KR_EB_B4_infos,
+
+#define to_EUC_KR_EB_B5_infos WORDINDEX2INFO(8613)
+           INVALID, o2(0xBA,0xC5),         UNDEF, o2(0xBA,0xC6),
+     o2(0xBA,0xC7), o2(0xBA,0xC8), o2(0xBA,0xC9), o2(0xBA,0xCA),
+     o2(0xBA,0xCB), o2(0xBA,0xCC), o2(0xBA,0xCD),
+
+#define to_EUC_KR_EB_B5 WORDINDEX2INFO(8624)
+    to_EUC_KR_EB_B5_offsets,
+    to_EUC_KR_EB_B5_infos,
+
+#define to_EUC_KR_EB_B6_infos WORDINDEX2INFO(8626)
+           INVALID, o2(0xBA,0xCE), o2(0xBA,0xCF),         UNDEF,
+     o2(0xBA,0xD0), o2(0xBA,0xD1), o2(0xBA,0xD2), o2(0xBA,0xD3),
+     o2(0xBA,0xD4), o2(0xBA,0xD5), o2(0xBA,0xD6), o2(0xBA,0xD7),
+     o2(0xBA,0xD8), o2(0xBA,0xD9), o2(0xBA,0xDA), o2(0xBA,0xDB),
+     o2(0xBA,0xDC), o2(0xBA,0xDD), o2(0xBA,0xDE),
+
+#define to_EUC_KR_EB_B6 WORDINDEX2INFO(8645)
+    to_EUC_KR_EB_B6_offsets,
+    to_EUC_KR_EB_B6_infos,
+
+#define to_EUC_KR_EB_B7_infos WORDINDEX2INFO(8647)
+           INVALID,         UNDEF, o2(0xBA,0xDF), o2(0xBA,0xE0),
+     o2(0xBA,0xE1), o2(0xBA,0xE2), o2(0xBA,0xE3), o2(0xBA,0xE4),
+     o2(0xBA,0xE5), o2(0xBA,0xE6),
+
+#define to_EUC_KR_EB_B7 WORDINDEX2INFO(8657)
+    to_EUC_KR_EB_B7_offsets,
+    to_EUC_KR_EB_B7_infos,
+
+#define to_EUC_KR_EB_B8_infos WORDINDEX2INFO(8659)
+           INVALID, o2(0xBA,0xE7),         UNDEF, o2(0xBA,0xE8),
+     o2(0xBA,0xE9), o2(0xBA,0xEA), o2(0xBA,0xEB), o2(0xBA,0xEC),
+     o2(0xBA,0xED), o2(0xBA,0xEE), o2(0xBA,0xEF), o2(0xBA,0xF0),
+
+#define to_EUC_KR_EB_B8 WORDINDEX2INFO(8671)
+    to_EUC_KR_EB_B8_offsets,
+    to_EUC_KR_EB_B8_infos,
+
+#define to_EUC_KR_EB_B9_infos WORDINDEX2INFO(8673)
+           INVALID,         UNDEF, o2(0xBA,0xF1), o2(0xBA,0xF2),
+     o2(0xBA,0xF3), o2(0xBA,0xF4), o2(0xBA,0xF5), o2(0xBA,0xF6),
+     o2(0xBA,0xF7), o2(0xBA,0xF8), o2(0xBA,0xF9), o2(0xBA,0xFA),
+     o2(0xBA,0xFB), o2(0xBA,0xFC), o2(0xBA,0xFD), o2(0xBA,0xFE),
+     o2(0xBB,0xA1), o2(0xBB,0xA2), o2(0xBB,0xA3), o2(0xBB,0xA4),
+     o2(0xBB,0xA5), o2(0xBB,0xA6), o2(0xBB,0xA7), o2(0xBB,0xA8),
+     o2(0xBB,0xA9), o2(0xBB,0xAA),
+
+#define to_EUC_KR_EB_B9 WORDINDEX2INFO(8699)
+    to_EUC_KR_EB_B9_offsets,
+    to_EUC_KR_EB_B9_infos,
+
+#define to_EUC_KR_EB_BA_infos WORDINDEX2INFO(8701)
+           INVALID, o2(0xBB,0xAB),         UNDEF, o2(0xBB,0xAC),
+     o2(0xBB,0xAD), o2(0xBB,0xAE), o2(0xBB,0xAF), o2(0xBB,0xB0),
+     o2(0xBB,0xB1), o2(0xBB,0xB2), o2(0xBB,0xB3), o2(0xBB,0xB4),
+
+#define to_EUC_KR_EB_BA WORDINDEX2INFO(8713)
+    to_EUC_KR_EB_BA_offsets,
+    to_EUC_KR_EB_BA_infos,
+
+#define to_EUC_KR_EB_BB_infos WORDINDEX2INFO(8715)
+           INVALID,         UNDEF, o2(0xBB,0xB5), o2(0xBB,0xB6),
+     o2(0xBB,0xB7), o2(0xBB,0xB8), o2(0xBB,0xB9), o2(0xBB,0xBA),
+     o2(0xBB,0xBB), o2(0xBB,0xBC), o2(0xBB,0xBD), o2(0xBB,0xBE),
+
+#define to_EUC_KR_EB_BB WORDINDEX2INFO(8727)
+    to_EUC_KR_EB_BB_offsets,
+    to_EUC_KR_EB_BB_infos,
+
+#define to_EUC_KR_EB_BC_infos WORDINDEX2INFO(8729)
+           INVALID,         UNDEF, o2(0xBB,0xBF), o2(0xBB,0xC0),
+     o2(0xBB,0xC1), o2(0xBB,0xC2), o2(0xBB,0xC3), o2(0xBB,0xC4),
+     o2(0xBB,0xC5), o2(0xBB,0xC6),
+
+#define to_EUC_KR_EB_BC WORDINDEX2INFO(8739)
+    to_EUC_KR_EB_BC_offsets,
+    to_EUC_KR_EB_BC_infos,
+
+#define to_EUC_KR_EB_BD_infos WORDINDEX2INFO(8741)
+           INVALID, o2(0xBB,0xC7), o2(0xBB,0xC8),         UNDEF,
+     o2(0xBB,0xC9), o2(0xBB,0xCA), o2(0xBB,0xCB), o2(0xBB,0xCC),
+     o2(0xBB,0xCD),
+
+#define to_EUC_KR_EB_BD WORDINDEX2INFO(8750)
+    to_EUC_KR_EB_BD_offsets,
+    to_EUC_KR_EB_BD_infos,
+
+#define to_EUC_KR_EB_BE_infos WORDINDEX2INFO(8752)
+           INVALID,         UNDEF, o2(0xBB,0xCE), o2(0xBB,0xCF),
+
+#define to_EUC_KR_EB_BE WORDINDEX2INFO(8756)
+    to_EUC_KR_EB_BE_offsets,
+    to_EUC_KR_EB_BE_infos,
+
+#define to_EUC_KR_EB_BF_infos WORDINDEX2INFO(8758)
+           INVALID,         UNDEF, o2(0xBB,0xD0), o2(0xBB,0xD1),
+     o2(0xBB,0xD2), o2(0xBB,0xD3), o2(0xBB,0xD4), o2(0xBB,0xD5),
+     o2(0xBB,0xD6), o2(0xBB,0xD7),
+
+#define to_EUC_KR_EB_BF WORDINDEX2INFO(8768)
+    to_EUC_KR_EB_BF_offsets,
+    to_EUC_KR_EB_BF_infos,
+
+#define to_EUC_KR_EB_infos WORDINDEX2INFO(8770)
+             INVALID, to_EUC_KR_EB_80, to_EUC_KR_EB_81, to_EUC_KR_EB_82,
+     to_EUC_KR_EB_83, to_EUC_KR_EB_84, to_EUC_KR_EB_85, to_EUC_KR_EB_86,
+     to_EUC_KR_EB_87, to_EUC_KR_EB_88, to_EUC_KR_EB_89, to_EUC_KR_EB_8A,
+     to_EUC_KR_EB_8B, to_EUC_KR_EB_8C, to_EUC_KR_EB_8D, to_EUC_KR_EB_8E,
+     to_EUC_KR_EB_8F, to_EUC_KR_EB_90, to_EUC_KR_EB_91, to_EUC_KR_EB_92,
+     to_EUC_KR_EB_93, to_EUC_KR_EB_94, to_EUC_KR_EB_95, to_EUC_KR_EB_96,
+     to_EUC_KR_EB_97, to_EUC_KR_EB_98, to_EUC_KR_EB_99, to_EUC_KR_EB_9A,
+     to_EUC_KR_EB_9B, to_EUC_KR_EB_9C, to_EUC_KR_EB_9D, to_EUC_KR_EB_9E,
+     to_EUC_KR_EB_9F, to_EUC_KR_EB_A0, to_EUC_KR_EB_A1, to_EUC_KR_EB_A2,
+     to_EUC_KR_EB_A3, to_EUC_KR_EB_A4, to_EUC_KR_EB_A5, to_EUC_KR_EB_A6,
+     to_EUC_KR_EB_A7, to_EUC_KR_EB_A8, to_EUC_KR_EB_A9, to_EUC_KR_EB_AA,
+     to_EUC_KR_EB_AB, to_EUC_KR_EB_AC, to_EUC_KR_EB_AD, to_EUC_KR_EB_AE,
+     to_EUC_KR_EB_AF, to_EUC_KR_EB_B0, to_EUC_KR_EB_B1, to_EUC_KR_EB_B2,
+     to_EUC_KR_EB_B3, to_EUC_KR_EB_B4, to_EUC_KR_EB_B5, to_EUC_KR_EB_B6,
+     to_EUC_KR_EB_B7, to_EUC_KR_EB_B8, to_EUC_KR_EB_B9, to_EUC_KR_EB_BA,
+     to_EUC_KR_EB_BB, to_EUC_KR_EB_BC, to_EUC_KR_EB_BD, to_EUC_KR_EB_BE,
+     to_EUC_KR_EB_BF,
+
+#define to_EUC_KR_EB WORDINDEX2INFO(8835)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EB_infos,
+
+#define to_EUC_KR_EC_80_infos WORDINDEX2INFO(8837)
+           INVALID,         UNDEF, o2(0xBB,0xD8),
+
+#define to_EUC_KR_EC_80 WORDINDEX2INFO(8840)
+    to_EUC_KR_EC_80_offsets,
+    to_EUC_KR_EC_80_infos,
+
+#define to_EUC_KR_EC_81_infos WORDINDEX2INFO(8842)
+           INVALID,         UNDEF, o2(0xBB,0xD9), o2(0xBB,0xDA),
+     o2(0xBB,0xDB), o2(0xBB,0xDC), o2(0xBB,0xDD), o2(0xBB,0xDE),
+
+#define to_EUC_KR_EC_81 WORDINDEX2INFO(8850)
+    to_EUC_KR_EC_81_offsets,
+    to_EUC_KR_EC_81_infos,
+
+#define to_EUC_KR_EC_82_infos WORDINDEX2INFO(8852)
+           INVALID,         UNDEF, o2(0xBB,0xDF), o2(0xBB,0xE0),
+     o2(0xBB,0xE1), o2(0xBB,0xE2), o2(0xBB,0xE3), o2(0xBB,0xE4),
+     o2(0xBB,0xE5), o2(0xBB,0xE6), o2(0xBB,0xE7), o2(0xBB,0xE8),
+     o2(0xBB,0xE9), o2(0xBB,0xEA), o2(0xBB,0xEB), o2(0xBB,0xEC),
+     o2(0xBB,0xED), o2(0xBB,0xEE), o2(0xBB,0xEF), o2(0xBB,0xF0),
+     o2(0xBB,0xF1),
+
+#define to_EUC_KR_EC_82 WORDINDEX2INFO(8873)
+    to_EUC_KR_EC_82_offsets,
+    to_EUC_KR_EC_82_infos,
+
+#define to_EUC_KR_EC_83_infos WORDINDEX2INFO(8875)
+           INVALID, o2(0xBB,0xF2), o2(0xBB,0xF3),         UNDEF,
+     o2(0xBB,0xF4), o2(0xBB,0xF5), o2(0xBB,0xF6), o2(0xBB,0xF7),
+     o2(0xBB,0xF8), o2(0xBB,0xF9), o2(0xBB,0xFA), o2(0xBB,0xFB),
+     o2(0xBB,0xFC), o2(0xBB,0xFD), o2(0xBB,0xFE), o2(0xBC,0xA1),
+     o2(0xBC,0xA2), o2(0xBC,0xA3), o2(0xBC,0xA4), o2(0xBC,0xA5),
+     o2(0xBC,0xA6), o2(0xBC,0xA7),
+
+#define to_EUC_KR_EC_83 WORDINDEX2INFO(8897)
+    to_EUC_KR_EC_83_offsets,
+    to_EUC_KR_EC_83_infos,
+
+#define to_EUC_KR_EC_84_infos WORDINDEX2INFO(8899)
+           INVALID, o2(0xBC,0xA8),         UNDEF, o2(0xBC,0xA9),
+     o2(0xBC,0xAA), o2(0xBC,0xAB), o2(0xBC,0xAC), o2(0xBC,0xAD),
+     o2(0xBC,0xAE), o2(0xBC,0xAF), o2(0xBC,0xB0), o2(0xBC,0xB1),
+     o2(0xBC,0xB2), o2(0xBC,0xB3), o2(0xBC,0xB4), o2(0xBC,0xB5),
+     o2(0xBC,0xB6), o2(0xBC,0xB7), o2(0xBC,0xB8), o2(0xBC,0xB9),
+     o2(0xBC,0xBA), o2(0xBC,0xBB), o2(0xBC,0xBC), o2(0xBC,0xBD),
+     o2(0xBC,0xBE),
+
+#define to_EUC_KR_EC_84 WORDINDEX2INFO(8924)
+    to_EUC_KR_EC_84_offsets,
+    to_EUC_KR_EC_84_infos,
+
+#define to_EUC_KR_EC_85_infos WORDINDEX2INFO(8926)
+           INVALID, o2(0xBC,0xBF),         UNDEF, o2(0xBC,0xC0),
+     o2(0xBC,0xC1), o2(0xBC,0xC2), o2(0xBC,0xC3), o2(0xBC,0xC4),
+     o2(0xBC,0xC5), o2(0xBC,0xC6), o2(0xBC,0xC7), o2(0xBC,0xC8),
+     o2(0xBC,0xC9), o2(0xBC,0xCA), o2(0xBC,0xCB), o2(0xBC,0xCC),
+     o2(0xBC,0xCD), o2(0xBC,0xCE), o2(0xBC,0xCF), o2(0xBC,0xD0),
+
+#define to_EUC_KR_EC_85 WORDINDEX2INFO(8946)
+    to_EUC_KR_EC_85_offsets,
+    to_EUC_KR_EC_85_infos,
+
+#define to_EUC_KR_EC_86_infos WORDINDEX2INFO(8948)
+           INVALID,         UNDEF, o2(0xBC,0xD1), o2(0xBC,0xD2),
+     o2(0xBC,0xD3), o2(0xBC,0xD4), o2(0xBC,0xD5), o2(0xBC,0xD6),
+     o2(0xBC,0xD7), o2(0xBC,0xD8), o2(0xBC,0xD9), o2(0xBC,0xDA),
+     o2(0xBC,0xDB), o2(0xBC,0xDC), o2(0xBC,0xDD), o2(0xBC,0xDE),
+     o2(0xBC,0xDF), o2(0xBC,0xE0), o2(0xBC,0xE1),
+
+#define to_EUC_KR_EC_86 WORDINDEX2INFO(8967)
+    to_EUC_KR_EC_86_offsets,
+    to_EUC_KR_EC_86_infos,
+
+#define to_EUC_KR_EC_87_infos WORDINDEX2INFO(8969)
+           INVALID,         UNDEF, o2(0xBC,0xE2), o2(0xBC,0xE3),
+     o2(0xBC,0xE4), o2(0xBC,0xE5), o2(0xBC,0xE6), o2(0xBC,0xE7),
+     o2(0xBC,0xE8), o2(0xBC,0xE9), o2(0xBC,0xEA), o2(0xBC,0xEB),
+     o2(0xBC,0xEC), o2(0xBC,0xED), o2(0xBC,0xEE), o2(0xBC,0xEF),
+
+#define to_EUC_KR_EC_87 WORDINDEX2INFO(8985)
+    to_EUC_KR_EC_87_offsets,
+    to_EUC_KR_EC_87_infos,
+
+#define to_EUC_KR_EC_88_infos WORDINDEX2INFO(8987)
+           INVALID, o2(0xBC,0xF0),         UNDEF, o2(0xBC,0xF1),
+     o2(0xBC,0xF2), o2(0xBC,0xF3), o2(0xBC,0xF4), o2(0xBC,0xF5),
+     o2(0xBC,0xF6), o2(0xBC,0xF7), o2(0xBC,0xF8), o2(0xBC,0xF9),
+     o2(0xBC,0xFA), o2(0xBC,0xFB), o2(0xBC,0xFC), o2(0xBC,0xFD),
+     o2(0xBC,0xFE), o2(0xBD,0xA1), o2(0xBD,0xA2), o2(0xBD,0xA3),
+     o2(0xBD,0xA4),
+
+#define to_EUC_KR_EC_88 WORDINDEX2INFO(9008)
+    to_EUC_KR_EC_88_offsets,
+    to_EUC_KR_EC_88_infos,
+
+#define to_EUC_KR_EC_89_infos WORDINDEX2INFO(9010)
+           INVALID,         UNDEF, o2(0xBD,0xA5), o2(0xBD,0xA6),
+     o2(0xBD,0xA7), o2(0xBD,0xA8), o2(0xBD,0xA9), o2(0xBD,0xAA),
+     o2(0xBD,0xAB), o2(0xBD,0xAC), o2(0xBD,0xAD), o2(0xBD,0xAE),
+     o2(0xBD,0xAF), o2(0xBD,0xB0), o2(0xBD,0xB1), o2(0xBD,0xB2),
+
+#define to_EUC_KR_EC_89 WORDINDEX2INFO(9026)
+    to_EUC_KR_EC_89_offsets,
+    to_EUC_KR_EC_89_infos,
+
+#define to_EUC_KR_EC_8A_infos WORDINDEX2INFO(9028)
+           INVALID,         UNDEF, o2(0xBD,0xB3), o2(0xBD,0xB4),
+     o2(0xBD,0xB5), o2(0xBD,0xB6), o2(0xBD,0xB7), o2(0xBD,0xB8),
+     o2(0xBD,0xB9), o2(0xBD,0xBA), o2(0xBD,0xBB), o2(0xBD,0xBC),
+     o2(0xBD,0xBD), o2(0xBD,0xBE), o2(0xBD,0xBF), o2(0xBD,0xC0),
+     o2(0xBD,0xC1), o2(0xBD,0xC2),
+
+#define to_EUC_KR_EC_8A WORDINDEX2INFO(9046)
+    to_EUC_KR_EC_8A_offsets,
+    to_EUC_KR_EC_8A_infos,
+
+#define to_EUC_KR_EC_8B_infos WORDINDEX2INFO(9048)
+           INVALID,         UNDEF, o2(0xBD,0xC3), o2(0xBD,0xC4),
+     o2(0xBD,0xC5), o2(0xBD,0xC6), o2(0xBD,0xC7), o2(0xBD,0xC8),
+     o2(0xBD,0xC9), o2(0xBD,0xCA), o2(0xBD,0xCB), o2(0xBD,0xCC),
+     o2(0xBD,0xCD), o2(0xBD,0xCE), o2(0xBD,0xCF), o2(0xBD,0xD0),
+     o2(0xBD,0xD1),
+
+#define to_EUC_KR_EC_8B WORDINDEX2INFO(9065)
+    to_EUC_KR_EC_8B_offsets,
+    to_EUC_KR_EC_8B_infos,
+
+#define to_EUC_KR_EC_8C_infos WORDINDEX2INFO(9067)
+           INVALID, o2(0xBD,0xD2),         UNDEF, o2(0xBD,0xD3),
+     o2(0xBD,0xD4), o2(0xBD,0xD5), o2(0xBD,0xD6), o2(0xBD,0xD7),
+     o2(0xBD,0xD8), o2(0xBD,0xD9), o2(0xBD,0xDA), o2(0xBD,0xDB),
+     o2(0xBD,0xDC), o2(0xBD,0xDD), o2(0xBD,0xDE), o2(0xBD,0xDF),
+
+#define to_EUC_KR_EC_8C WORDINDEX2INFO(9083)
+    to_EUC_KR_EC_8C_offsets,
+    to_EUC_KR_EC_8C_infos,
+
+#define to_EUC_KR_EC_8D_infos WORDINDEX2INFO(9085)
+           INVALID,         UNDEF, o2(0xBD,0xE0), o2(0xBD,0xE1),
+     o2(0xBD,0xE2), o2(0xBD,0xE3), o2(0xBD,0xE4), o2(0xBD,0xE5),
+     o2(0xBD,0xE6), o2(0xBD,0xE7), o2(0xBD,0xE8), o2(0xBD,0xE9),
+
+#define to_EUC_KR_EC_8D WORDINDEX2INFO(9097)
+    to_EUC_KR_EC_8D_offsets,
+    to_EUC_KR_EC_8D_infos,
+
+#define to_EUC_KR_EC_8E_infos WORDINDEX2INFO(9099)
+           INVALID,         UNDEF, o2(0xBD,0xEA), o2(0xBD,0xEB),
+     o2(0xBD,0xEC),
+
+#define to_EUC_KR_EC_8E WORDINDEX2INFO(9104)
+    to_EUC_KR_EC_8E_offsets,
+    to_EUC_KR_EC_8E_infos,
+
+#define to_EUC_KR_EC_8F_infos WORDINDEX2INFO(9106)
+           INVALID, o2(0xBD,0xED),         UNDEF, o2(0xBD,0xEE),
+     o2(0xBD,0xEF), o2(0xBD,0xF0), o2(0xBD,0xF1), o2(0xBD,0xF2),
+     o2(0xBD,0xF3), o2(0xBD,0xF4), o2(0xBD,0xF5), o2(0xBD,0xF6),
+     o2(0xBD,0xF7), o2(0xBD,0xF8), o2(0xBD,0xF9),
+
+#define to_EUC_KR_EC_8F WORDINDEX2INFO(9121)
+    to_EUC_KR_EC_8F_offsets,
+    to_EUC_KR_EC_8F_infos,
+
+#define to_EUC_KR_EC_90_infos WORDINDEX2INFO(9123)
+           INVALID,         UNDEF, o2(0xBD,0xFA), o2(0xBD,0xFB),
+     o2(0xBD,0xFC), o2(0xBD,0xFD), o2(0xBD,0xFE), o2(0xBE,0xA1),
+     o2(0xBE,0xA2), o2(0xBE,0xA3),
+
+#define to_EUC_KR_EC_90 WORDINDEX2INFO(9133)
+    to_EUC_KR_EC_90_offsets,
+    to_EUC_KR_EC_90_infos,
+
+#define to_EUC_KR_EC_91_infos WORDINDEX2INFO(9135)
+           INVALID,         UNDEF, o2(0xBE,0xA4), o2(0xBE,0xA5),
+     o2(0xBE,0xA6), o2(0xBE,0xA7), o2(0xBE,0xA8), o2(0xBE,0xA9),
+     o2(0xBE,0xAA), o2(0xBE,0xAB),
+
+#define to_EUC_KR_EC_91 WORDINDEX2INFO(9145)
+    to_EUC_KR_EC_91_offsets,
+    to_EUC_KR_EC_91_infos,
+
+#define to_EUC_KR_EC_92_infos WORDINDEX2INFO(9147)
+           INVALID, o2(0xBE,0xAC),         UNDEF, o2(0xBE,0xAD),
+     o2(0xBE,0xAE), o2(0xBE,0xAF), o2(0xBE,0xB0),
+
+#define to_EUC_KR_EC_92 WORDINDEX2INFO(9154)
+    to_EUC_KR_EC_92_offsets,
+    to_EUC_KR_EC_92_infos,
+
+#define to_EUC_KR_EC_93_infos WORDINDEX2INFO(9156)
+           INVALID,         UNDEF, o2(0xBE,0xB1), o2(0xBE,0xB2),
+     o2(0xBE,0xB3), o2(0xBE,0xB4), o2(0xBE,0xB5), o2(0xBE,0xB6),
+     o2(0xBE,0xB7),
+
+#define to_EUC_KR_EC_93 WORDINDEX2INFO(9165)
+    to_EUC_KR_EC_93_offsets,
+    to_EUC_KR_EC_93_infos,
+
+#define to_EUC_KR_EC_94_infos WORDINDEX2INFO(9167)
+           INVALID, o2(0xBE,0xB8), o2(0xBE,0xB9),         UNDEF,
+     o2(0xBE,0xBA), o2(0xBE,0xBB), o2(0xBE,0xBC), o2(0xBE,0xBD),
+     o2(0xBE,0xBE), o2(0xBE,0xBF), o2(0xBE,0xC0), o2(0xBE,0xC1),
+     o2(0xBE,0xC2), o2(0xBE,0xC3), o2(0xBE,0xC4), o2(0xBE,0xC5),
+
+#define to_EUC_KR_EC_94 WORDINDEX2INFO(9183)
+    to_EUC_KR_EC_94_offsets,
+    to_EUC_KR_EC_94_infos,
+
+#define to_EUC_KR_EC_95_infos WORDINDEX2INFO(9185)
+           INVALID,         UNDEF, o2(0xBE,0xC6), o2(0xBE,0xC7),
+     o2(0xBE,0xC8), o2(0xBE,0xC9), o2(0xBE,0xCA), o2(0xBE,0xCB),
+     o2(0xBE,0xCC), o2(0xBE,0xCD), o2(0xBE,0xCE), o2(0xBE,0xCF),
+     o2(0xBE,0xD0), o2(0xBE,0xD1), o2(0xBE,0xD2), o2(0xBE,0xD3),
+     o2(0xBE,0xD4), o2(0xBE,0xD5), o2(0xBE,0xD6), o2(0xBE,0xD7),
+     o2(0xBE,0xD8), o2(0xBE,0xD9), o2(0xBE,0xDA), o2(0xBE,0xDB),
+     o2(0xBE,0xDC), o2(0xBE,0xDD), o2(0xBE,0xDE), o2(0xBE,0xDF),
+     o2(0xBE,0xE0),
+
+#define to_EUC_KR_EC_95 WORDINDEX2INFO(9214)
+    to_EUC_KR_EC_95_offsets,
+    to_EUC_KR_EC_95_infos,
+
+#define to_EUC_KR_EC_96_infos WORDINDEX2INFO(9216)
+           INVALID, o2(0xBE,0xE1),         UNDEF, o2(0xBE,0xE2),
+     o2(0xBE,0xE3), o2(0xBE,0xE4), o2(0xBE,0xE5), o2(0xBE,0xE6),
+     o2(0xBE,0xE7), o2(0xBE,0xE8), o2(0xBE,0xE9), o2(0xBE,0xEA),
+     o2(0xBE,0xEB), o2(0xBE,0xEC), o2(0xBE,0xED), o2(0xBE,0xEE),
+     o2(0xBE,0xEF), o2(0xBE,0xF0), o2(0xBE,0xF1), o2(0xBE,0xF2),
+     o2(0xBE,0xF3), o2(0xBE,0xF4), o2(0xBE,0xF5),
+
+#define to_EUC_KR_EC_96 WORDINDEX2INFO(9239)
+    to_EUC_KR_EC_96_offsets,
+    to_EUC_KR_EC_96_infos,
+
+#define to_EUC_KR_EC_97_infos WORDINDEX2INFO(9241)
+           INVALID,         UNDEF, o2(0xBE,0xF6), o2(0xBE,0xF7),
+     o2(0xBE,0xF8), o2(0xBE,0xF9), o2(0xBE,0xFA), o2(0xBE,0xFB),
+     o2(0xBE,0xFC), o2(0xBE,0xFD), o2(0xBE,0xFE), o2(0xBF,0xA1),
+     o2(0xBF,0xA2), o2(0xBF,0xA3), o2(0xBF,0xA4), o2(0xBF,0xA5),
+     o2(0xBF,0xA6), o2(0xBF,0xA7), o2(0xBF,0xA8), o2(0xBF,0xA9),
+     o2(0xBF,0xAA), o2(0xBF,0xAB), o2(0xBF,0xAC), o2(0xBF,0xAD),
+     o2(0xBF,0xAE), o2(0xBF,0xAF), o2(0xBF,0xB0), o2(0xBF,0xB1),
+     o2(0xBF,0xB2), o2(0xBF,0xB3),
+
+#define to_EUC_KR_EC_97 WORDINDEX2INFO(9271)
+    to_EUC_KR_EC_97_offsets,
+    to_EUC_KR_EC_97_infos,
+
+#define to_EUC_KR_EC_98_infos WORDINDEX2INFO(9273)
+           INVALID, o2(0xBF,0xB4), o2(0xBF,0xB5),         UNDEF,
+     o2(0xBF,0xB6), o2(0xBF,0xB7), o2(0xBF,0xB8), o2(0xBF,0xB9),
+     o2(0xBF,0xBA), o2(0xBF,0xBB), o2(0xBF,0xBC), o2(0xBF,0xBD),
+     o2(0xBF,0xBE), o2(0xBF,0xBF), o2(0xBF,0xC0), o2(0xBF,0xC1),
+     o2(0xBF,0xC2), o2(0xBF,0xC3), o2(0xBF,0xC4), o2(0xBF,0xC5),
+     o2(0xBF,0xC6), o2(0xBF,0xC7), o2(0xBF,0xC8), o2(0xBF,0xC9),
+     o2(0xBF,0xCA), o2(0xBF,0xCB), o2(0xBF,0xCC),
+
+#define to_EUC_KR_EC_98 WORDINDEX2INFO(9300)
+    to_EUC_KR_EC_98_offsets,
+    to_EUC_KR_EC_98_infos,
+
+#define to_EUC_KR_EC_99_infos WORDINDEX2INFO(9302)
+           INVALID, o2(0xBF,0xCD), o2(0xBF,0xCE),         UNDEF,
+     o2(0xBF,0xCF), o2(0xBF,0xD0), o2(0xBF,0xD1), o2(0xBF,0xD2),
+     o2(0xBF,0xD3), o2(0xBF,0xD4), o2(0xBF,0xD5), o2(0xBF,0xD6),
+     o2(0xBF,0xD7), o2(0xBF,0xD8), o2(0xBF,0xD9), o2(0xBF,0xDA),
+     o2(0xBF,0xDB), o2(0xBF,0xDC), o2(0xBF,0xDD), o2(0xBF,0xDE),
+
+#define to_EUC_KR_EC_99 WORDINDEX2INFO(9322)
+    to_EUC_KR_EC_99_offsets,
+    to_EUC_KR_EC_99_infos,
+
+#define to_EUC_KR_EC_9A_infos WORDINDEX2INFO(9324)
+           INVALID, o2(0xBF,0xDF),         UNDEF, o2(0xBF,0xE0),
+     o2(0xBF,0xE1), o2(0xBF,0xE2), o2(0xBF,0xE3), o2(0xBF,0xE4),
+     o2(0xBF,0xE5), o2(0xBF,0xE6), o2(0xBF,0xE7), o2(0xBF,0xE8),
+     o2(0xBF,0xE9), o2(0xBF,0xEA), o2(0xBF,0xEB), o2(0xBF,0xEC),
+     o2(0xBF,0xED), o2(0xBF,0xEE), o2(0xBF,0xEF), o2(0xBF,0xF0),
+     o2(0xBF,0xF1),
+
+#define to_EUC_KR_EC_9A WORDINDEX2INFO(9345)
+    to_EUC_KR_EC_9A_offsets,
+    to_EUC_KR_EC_9A_infos,
+
+#define to_EUC_KR_EC_9B_infos WORDINDEX2INFO(9347)
+           INVALID, o2(0xBF,0xF2), o2(0xBF,0xF3),         UNDEF,
+     o2(0xBF,0xF4), o2(0xBF,0xF5), o2(0xBF,0xF6), o2(0xBF,0xF7),
+     o2(0xBF,0xF8), o2(0xBF,0xF9), o2(0xBF,0xFA), o2(0xBF,0xFB),
+     o2(0xBF,0xFC), o2(0xBF,0xFD), o2(0xBF,0xFE), o2(0xC0,0xA1),
+     o2(0xC0,0xA2), o2(0xC0,0xA3), o2(0xC0,0xA4), o2(0xC0,0xA5),
+     o2(0xC0,0xA6),
+
+#define to_EUC_KR_EC_9B WORDINDEX2INFO(9368)
+    to_EUC_KR_EC_9B_offsets,
+    to_EUC_KR_EC_9B_infos,
+
+#define to_EUC_KR_EC_9C_infos WORDINDEX2INFO(9370)
+           INVALID,         UNDEF, o2(0xC0,0xA7), o2(0xC0,0xA8),
+     o2(0xC0,0xA9), o2(0xC0,0xAA), o2(0xC0,0xAB), o2(0xC0,0xAC),
+     o2(0xC0,0xAD), o2(0xC0,0xAE), o2(0xC0,0xAF), o2(0xC0,0xB0),
+     o2(0xC0,0xB1), o2(0xC0,0xB2), o2(0xC0,0xB3), o2(0xC0,0xB4),
+     o2(0xC0,0xB5), o2(0xC0,0xB6), o2(0xC0,0xB7), o2(0xC0,0xB8),
+     o2(0xC0,0xB9),
+
+#define to_EUC_KR_EC_9C WORDINDEX2INFO(9391)
+    to_EUC_KR_EC_9C_offsets,
+    to_EUC_KR_EC_9C_infos,
+
+#define to_EUC_KR_EC_9D_infos WORDINDEX2INFO(9393)
+           INVALID, o2(0xC0,0xBA),         UNDEF, o2(0xC0,0xBB),
+     o2(0xC0,0xBC), o2(0xC0,0xBD), o2(0xC0,0xBE), o2(0xC0,0xBF),
+     o2(0xC0,0xC0), o2(0xC0,0xC1), o2(0xC0,0xC2), o2(0xC0,0xC3),
+     o2(0xC0,0xC4), o2(0xC0,0xC5), o2(0xC0,0xC6), o2(0xC0,0xC7),
+     o2(0xC0,0xC8), o2(0xC0,0xC9), o2(0xC0,0xCA), o2(0xC0,0xCB),
+     o2(0xC0,0xCC), o2(0xC0,0xCD), o2(0xC0,0xCE), o2(0xC0,0xCF),
+     o2(0xC0,0xD0), o2(0xC0,0xD1),
+
+#define to_EUC_KR_EC_9D WORDINDEX2INFO(9419)
+    to_EUC_KR_EC_9D_offsets,
+    to_EUC_KR_EC_9D_infos,
+
+#define to_EUC_KR_EC_9E_infos WORDINDEX2INFO(9421)
+           INVALID,         UNDEF, o2(0xC0,0xD2), o2(0xC0,0xD3),
+     o2(0xC0,0xD4), o2(0xC0,0xD5), o2(0xC0,0xD6), o2(0xC0,0xD7),
+     o2(0xC0,0xD8), o2(0xC0,0xD9), o2(0xC0,0xDA), o2(0xC0,0xDB),
+     o2(0xC0,0xDC), o2(0xC0,0xDD), o2(0xC0,0xDE), o2(0xC0,0xDF),
+     o2(0xC0,0xE0), o2(0xC0,0xE1), o2(0xC0,0xE2), o2(0xC0,0xE3),
+     o2(0xC0,0xE4), o2(0xC0,0xE5), o2(0xC0,0xE6), o2(0xC0,0xE7),
+     o2(0xC0,0xE8), o2(0xC0,0xE9), o2(0xC0,0xEA), o2(0xC0,0xEB),
+     o2(0xC0,0xEC), o2(0xC0,0xED),
+
+#define to_EUC_KR_EC_9E WORDINDEX2INFO(9451)
+    to_EUC_KR_EC_9E_offsets,
+    to_EUC_KR_EC_9E_infos,
+
+#define to_EUC_KR_EC_9F_infos WORDINDEX2INFO(9453)
+           INVALID, o2(0xC0,0xEE), o2(0xC0,0xEF),         UNDEF,
+     o2(0xC0,0xF0), o2(0xC0,0xF1), o2(0xC0,0xF2), o2(0xC0,0xF3),
+     o2(0xC0,0xF4), o2(0xC0,0xF5), o2(0xC0,0xF6), o2(0xC0,0xF7),
+     o2(0xC0,0xF8), o2(0xC0,0xF9),
+
+#define to_EUC_KR_EC_9F WORDINDEX2INFO(9467)
+    to_EUC_KR_EC_9F_offsets,
+    to_EUC_KR_EC_9F_infos,
+
+#define to_EUC_KR_EC_A0_infos WORDINDEX2INFO(9469)
+           INVALID, o2(0xC0,0xFA), o2(0xC0,0xFB),         UNDEF,
+     o2(0xC0,0xFC), o2(0xC0,0xFD), o2(0xC0,0xFE), o2(0xC1,0xA1),
+     o2(0xC1,0xA2), o2(0xC1,0xA3), o2(0xC1,0xA4), o2(0xC1,0xA5),
+     o2(0xC1,0xA6), o2(0xC1,0xA7), o2(0xC1,0xA8), o2(0xC1,0xA9),
+     o2(0xC1,0xAA), o2(0xC1,0xAB), o2(0xC1,0xAC), o2(0xC1,0xAD),
+     o2(0xC1,0xAE), o2(0xC1,0xAF),
+
+#define to_EUC_KR_EC_A0 WORDINDEX2INFO(9491)
+    to_EUC_KR_EC_A0_offsets,
+    to_EUC_KR_EC_A0_infos,
+
+#define to_EUC_KR_EC_A1_infos WORDINDEX2INFO(9493)
+           INVALID, o2(0xC1,0xB0),         UNDEF, o2(0xC1,0xB1),
+     o2(0xC1,0xB2), o2(0xC1,0xB3), o2(0xC1,0xB4), o2(0xC1,0xB5),
+     o2(0xC1,0xB6), o2(0xC1,0xB7), o2(0xC1,0xB8), o2(0xC1,0xB9),
+     o2(0xC1,0xBA),
+
+#define to_EUC_KR_EC_A1 WORDINDEX2INFO(9506)
+    to_EUC_KR_EC_A1_offsets,
+    to_EUC_KR_EC_A1_infos,
+
+#define to_EUC_KR_EC_A2_infos WORDINDEX2INFO(9508)
+           INVALID, o2(0xC1,0xBB), o2(0xC1,0xBC),         UNDEF,
+     o2(0xC1,0xBD), o2(0xC1,0xBE), o2(0xC1,0xBF), o2(0xC1,0xC0),
+     o2(0xC1,0xC1), o2(0xC1,0xC2), o2(0xC1,0xC3), o2(0xC1,0xC4),
+     o2(0xC1,0xC5), o2(0xC1,0xC6), o2(0xC1,0xC7), o2(0xC1,0xC8),
+     o2(0xC1,0xC9), o2(0xC1,0xCA),
+
+#define to_EUC_KR_EC_A2 WORDINDEX2INFO(9526)
+    to_EUC_KR_EC_A2_offsets,
+    to_EUC_KR_EC_A2_infos,
+
+#define to_EUC_KR_EC_A3_infos WORDINDEX2INFO(9528)
+           INVALID,         UNDEF, o2(0xC1,0xCB), o2(0xC1,0xCC),
+     o2(0xC1,0xCD), o2(0xC1,0xCE), o2(0xC1,0xCF), o2(0xC1,0xD0),
+     o2(0xC1,0xD1), o2(0xC1,0xD2), o2(0xC1,0xD3), o2(0xC1,0xD4),
+     o2(0xC1,0xD5), o2(0xC1,0xD6), o2(0xC1,0xD7),
+
+#define to_EUC_KR_EC_A3 WORDINDEX2INFO(9543)
+    to_EUC_KR_EC_A3_offsets,
+    to_EUC_KR_EC_A3_infos,
+
+#define to_EUC_KR_EC_A4_infos WORDINDEX2INFO(9545)
+           INVALID, o2(0xC1,0xD8),         UNDEF, o2(0xC1,0xD9),
+     o2(0xC1,0xDA), o2(0xC1,0xDB), o2(0xC1,0xDC), o2(0xC1,0xDD),
+     o2(0xC1,0xDE), o2(0xC1,0xDF), o2(0xC1,0xE0), o2(0xC1,0xE1),
+     o2(0xC1,0xE2),
+
+#define to_EUC_KR_EC_A4 WORDINDEX2INFO(9558)
+    to_EUC_KR_EC_A4_offsets,
+    to_EUC_KR_EC_A4_infos,
+
+#define to_EUC_KR_EC_A5_infos WORDINDEX2INFO(9560)
+           INVALID,         UNDEF, o2(0xC1,0xE3), o2(0xC1,0xE4),
+     o2(0xC1,0xE5), o2(0xC1,0xE6), o2(0xC1,0xE7), o2(0xC1,0xE8),
+     o2(0xC1,0xE9), o2(0xC1,0xEA), o2(0xC1,0xEB), o2(0xC1,0xEC),
+     o2(0xC1,0xED),
+
+#define to_EUC_KR_EC_A5 WORDINDEX2INFO(9573)
+    to_EUC_KR_EC_A5_offsets,
+    to_EUC_KR_EC_A5_infos,
+
+#define to_EUC_KR_EC_A6_infos WORDINDEX2INFO(9575)
+           INVALID,         UNDEF, o2(0xC1,0xEE), o2(0xC1,0xEF),
+     o2(0xC1,0xF0), o2(0xC1,0xF1), o2(0xC1,0xF2), o2(0xC1,0xF3),
+     o2(0xC1,0xF4), o2(0xC1,0xF5),
+
+#define to_EUC_KR_EC_A6 WORDINDEX2INFO(9585)
+    to_EUC_KR_EC_A6_offsets,
+    to_EUC_KR_EC_A6_infos,
+
+#define to_EUC_KR_EC_A7_infos WORDINDEX2INFO(9587)
+           INVALID, o2(0xC1,0xF6), o2(0xC1,0xF7),         UNDEF,
+     o2(0xC1,0xF8), o2(0xC1,0xF9), o2(0xC1,0xFA), o2(0xC1,0xFB),
+     o2(0xC1,0xFC), o2(0xC1,0xFD), o2(0xC1,0xFE), o2(0xC2,0xA1),
+     o2(0xC2,0xA2), o2(0xC2,0xA3), o2(0xC2,0xA4), o2(0xC2,0xA5),
+     o2(0xC2,0xA6), o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC2,0xA9),
+     o2(0xC2,0xAA), o2(0xC2,0xAB), o2(0xC2,0xAC), o2(0xC2,0xAD),
+     o2(0xC2,0xAE), o2(0xC2,0xAF), o2(0xC2,0xB0), o2(0xC2,0xB1),
+     o2(0xC2,0xB2),
+
+#define to_EUC_KR_EC_A7 WORDINDEX2INFO(9616)
+    to_EUC_KR_EC_A7_offsets,
+    to_EUC_KR_EC_A7_infos,
+
+#define to_EUC_KR_EC_A8_infos WORDINDEX2INFO(9618)
+           INVALID, o2(0xC2,0xB3),         UNDEF, o2(0xC2,0xB4),
+     o2(0xC2,0xB5), o2(0xC2,0xB6), o2(0xC2,0xB7), o2(0xC2,0xB8),
+     o2(0xC2,0xB9), o2(0xC2,0xBA), o2(0xC2,0xBB),
+
+#define to_EUC_KR_EC_A8 WORDINDEX2INFO(9629)
+    to_EUC_KR_EC_A8_offsets,
+    to_EUC_KR_EC_A8_infos,
+
+#define to_EUC_KR_EC_A9_infos WORDINDEX2INFO(9631)
+           INVALID,         UNDEF, o2(0xC2,0xBC), o2(0xC2,0xBD),
+     o2(0xC2,0xBE), o2(0xC2,0xBF), o2(0xC2,0xC0), o2(0xC2,0xC1),
+     o2(0xC2,0xC2), o2(0xC2,0xC3), o2(0xC2,0xC4), o2(0xC2,0xC5),
+     o2(0xC2,0xC6),
+
+#define to_EUC_KR_EC_A9 WORDINDEX2INFO(9644)
+    to_EUC_KR_EC_A9_offsets,
+    to_EUC_KR_EC_A9_infos,
+
+#define to_EUC_KR_EC_AA_infos WORDINDEX2INFO(9646)
+           INVALID,         UNDEF, o2(0xC2,0xC7), o2(0xC2,0xC8),
+     o2(0xC2,0xC9), o2(0xC2,0xCA),
+
+#define to_EUC_KR_EC_AA WORDINDEX2INFO(9652)
+    to_EUC_KR_EC_AA_offsets,
+    to_EUC_KR_EC_AA_infos,
+
+#define to_EUC_KR_EC_AB_infos WORDINDEX2INFO(9654)
+           INVALID, o2(0xC2,0xCB),         UNDEF, o2(0xC2,0xCC),
+     o2(0xC2,0xCD), o2(0xC2,0xCE), o2(0xC2,0xCF), o2(0xC2,0xD0),
+     o2(0xC2,0xD1), o2(0xC2,0xD2), o2(0xC2,0xD3), o2(0xC2,0xD4),
+     o2(0xC2,0xD5), o2(0xC2,0xD6),
+
+#define to_EUC_KR_EC_AB WORDINDEX2INFO(9668)
+    to_EUC_KR_EC_AB_offsets,
+    to_EUC_KR_EC_AB_infos,
+
+#define to_EUC_KR_EC_AC_infos WORDINDEX2INFO(9670)
+           INVALID,         UNDEF, o2(0xC2,0xD7), o2(0xC2,0xD8),
+     o2(0xC2,0xD9), o2(0xC2,0xDA), o2(0xC2,0xDB), o2(0xC2,0xDC),
+
+#define to_EUC_KR_EC_AC WORDINDEX2INFO(9678)
+    to_EUC_KR_EC_AC_offsets,
+    to_EUC_KR_EC_AC_infos,
+
+#define to_EUC_KR_EC_AD_infos WORDINDEX2INFO(9680)
+           INVALID,         UNDEF, o2(0xC2,0xDD), o2(0xC2,0xDE),
+     o2(0xC2,0xDF), o2(0xC2,0xE0), o2(0xC2,0xE1), o2(0xC2,0xE2),
+     o2(0xC2,0xE3), o2(0xC2,0xE4), o2(0xC2,0xE5), o2(0xC2,0xE6),
+     o2(0xC2,0xE7),
+
+#define to_EUC_KR_EC_AD WORDINDEX2INFO(9693)
+    to_EUC_KR_EC_AD_offsets,
+    to_EUC_KR_EC_AD_infos,
+
+#define to_EUC_KR_EC_AE_infos WORDINDEX2INFO(9695)
+           INVALID,         UNDEF, o2(0xC2,0xE8), o2(0xC2,0xE9),
+
+#define to_EUC_KR_EC_AE WORDINDEX2INFO(9699)
+    to_EUC_KR_EC_AE_offsets,
+    to_EUC_KR_EC_AE_infos,
+
+#define to_EUC_KR_EC_AF_infos WORDINDEX2INFO(9701)
+           INVALID,         UNDEF, o2(0xC2,0xEA), o2(0xC2,0xEB),
+     o2(0xC2,0xEC), o2(0xC2,0xED),
+
+#define to_EUC_KR_EC_AF WORDINDEX2INFO(9707)
+    to_EUC_KR_EC_AF_offsets,
+    to_EUC_KR_EC_AF_infos,
+
+#define to_EUC_KR_EC_B0_infos WORDINDEX2INFO(9709)
+           INVALID,         UNDEF, o2(0xC2,0xEE), o2(0xC2,0xEF),
+     o2(0xC2,0xF0), o2(0xC2,0xF1), o2(0xC2,0xF2), o2(0xC2,0xF3),
+     o2(0xC2,0xF4), o2(0xC2,0xF5), o2(0xC2,0xF6), o2(0xC2,0xF7),
+     o2(0xC2,0xF8), o2(0xC2,0xF9), o2(0xC2,0xFA), o2(0xC2,0xFB),
+     o2(0xC2,0xFC), o2(0xC2,0xFD), o2(0xC2,0xFE), o2(0xC3,0xA1),
+     o2(0xC3,0xA2), o2(0xC3,0xA3),
+
+#define to_EUC_KR_EC_B0 WORDINDEX2INFO(9731)
+    to_EUC_KR_EC_B0_offsets,
+    to_EUC_KR_EC_B0_infos,
+
+#define to_EUC_KR_EC_B1_infos WORDINDEX2INFO(9733)
+           INVALID,         UNDEF, o2(0xC3,0xA4), o2(0xC3,0xA5),
+     o2(0xC3,0xA6), o2(0xC3,0xA7), o2(0xC3,0xA8), o2(0xC3,0xA9),
+     o2(0xC3,0xAA), o2(0xC3,0xAB), o2(0xC3,0xAC), o2(0xC3,0xAD),
+     o2(0xC3,0xAE), o2(0xC3,0xAF), o2(0xC3,0xB0), o2(0xC3,0xB1),
+     o2(0xC3,0xB2),
+
+#define to_EUC_KR_EC_B1 WORDINDEX2INFO(9750)
+    to_EUC_KR_EC_B1_offsets,
+    to_EUC_KR_EC_B1_infos,
+
+#define to_EUC_KR_EC_B2_infos WORDINDEX2INFO(9752)
+           INVALID,         UNDEF, o2(0xC3,0xB3), o2(0xC3,0xB4),
+     o2(0xC3,0xB5), o2(0xC3,0xB6), o2(0xC3,0xB7), o2(0xC3,0xB8),
+     o2(0xC3,0xB9), o2(0xC3,0xBA), o2(0xC3,0xBB), o2(0xC3,0xBC),
+     o2(0xC3,0xBD), o2(0xC3,0xBE), o2(0xC3,0xBF),
+
+#define to_EUC_KR_EC_B2 WORDINDEX2INFO(9767)
+    to_EUC_KR_EC_B2_offsets,
+    to_EUC_KR_EC_B2_infos,
+
+#define to_EUC_KR_EC_B3_infos WORDINDEX2INFO(9769)
+           INVALID,         UNDEF, o2(0xC3,0xC0), o2(0xC3,0xC1),
+     o2(0xC3,0xC2), o2(0xC3,0xC3), o2(0xC3,0xC4), o2(0xC3,0xC5),
+     o2(0xC3,0xC6), o2(0xC3,0xC7), o2(0xC3,0xC8),
+
+#define to_EUC_KR_EC_B3 WORDINDEX2INFO(9780)
+    to_EUC_KR_EC_B3_offsets,
+    to_EUC_KR_EC_B3_infos,
+
+#define to_EUC_KR_EC_B4_infos WORDINDEX2INFO(9782)
+           INVALID,         UNDEF, o2(0xC3,0xC9), o2(0xC3,0xCA),
+     o2(0xC3,0xCB), o2(0xC3,0xCC), o2(0xC3,0xCD), o2(0xC3,0xCE),
+     o2(0xC3,0xCF), o2(0xC3,0xD0), o2(0xC3,0xD1), o2(0xC3,0xD2),
+     o2(0xC3,0xD3), o2(0xC3,0xD4), o2(0xC3,0xD5),
+
+#define to_EUC_KR_EC_B4 WORDINDEX2INFO(9797)
+    to_EUC_KR_EC_B4_offsets,
+    to_EUC_KR_EC_B4_infos,
+
+#define to_EUC_KR_EC_B5_infos WORDINDEX2INFO(9799)
+           INVALID,         UNDEF, o2(0xC3,0xD6), o2(0xC3,0xD7),
+     o2(0xC3,0xD8), o2(0xC3,0xD9), o2(0xC3,0xDA), o2(0xC3,0xDB),
+     o2(0xC3,0xDC), o2(0xC3,0xDD),
+
+#define to_EUC_KR_EC_B5 WORDINDEX2INFO(9809)
+    to_EUC_KR_EC_B5_offsets,
+    to_EUC_KR_EC_B5_infos,
+
+#define to_EUC_KR_EC_B6_infos WORDINDEX2INFO(9811)
+           INVALID,         UNDEF, o2(0xC3,0xDE), o2(0xC3,0xDF),
+     o2(0xC3,0xE0), o2(0xC3,0xE1), o2(0xC3,0xE2), o2(0xC3,0xE3),
+     o2(0xC3,0xE4), o2(0xC3,0xE5), o2(0xC3,0xE6), o2(0xC3,0xE7),
+
+#define to_EUC_KR_EC_B6 WORDINDEX2INFO(9823)
+    to_EUC_KR_EC_B6_offsets,
+    to_EUC_KR_EC_B6_infos,
+
+#define to_EUC_KR_EC_B7_infos WORDINDEX2INFO(9825)
+           INVALID,         UNDEF, o2(0xC3,0xE8), o2(0xC3,0xE9),
+     o2(0xC3,0xEA), o2(0xC3,0xEB), o2(0xC3,0xEC), o2(0xC3,0xED),
+     o2(0xC3,0xEE), o2(0xC3,0xEF), o2(0xC3,0xF0), o2(0xC3,0xF1),
+
+#define to_EUC_KR_EC_B7 WORDINDEX2INFO(9837)
+    to_EUC_KR_EC_B7_offsets,
+    to_EUC_KR_EC_B7_infos,
+
+#define to_EUC_KR_EC_B8_infos WORDINDEX2INFO(9839)
+           INVALID,         UNDEF, o2(0xC3,0xF2), o2(0xC3,0xF3),
+     o2(0xC3,0xF4), o2(0xC3,0xF5), o2(0xC3,0xF6), o2(0xC3,0xF7),
+     o2(0xC3,0xF8), o2(0xC3,0xF9), o2(0xC3,0xFA), o2(0xC3,0xFB),
+     o2(0xC3,0xFC), o2(0xC3,0xFD), o2(0xC3,0xFE),
+
+#define to_EUC_KR_EC_B8 WORDINDEX2INFO(9854)
+    to_EUC_KR_EC_B8_offsets,
+    to_EUC_KR_EC_B8_infos,
+
+#define to_EUC_KR_EC_B9_infos WORDINDEX2INFO(9856)
+           INVALID,         UNDEF, o2(0xC4,0xA1), o2(0xC4,0xA2),
+     o2(0xC4,0xA3), o2(0xC4,0xA4), o2(0xC4,0xA5), o2(0xC4,0xA6),
+     o2(0xC4,0xA7), o2(0xC4,0xA8), o2(0xC4,0xA9), o2(0xC4,0xAA),
+     o2(0xC4,0xAB), o2(0xC4,0xAC), o2(0xC4,0xAD), o2(0xC4,0xAE),
+
+#define to_EUC_KR_EC_B9 WORDINDEX2INFO(9872)
+    to_EUC_KR_EC_B9_offsets,
+    to_EUC_KR_EC_B9_infos,
+
+#define to_EUC_KR_EC_BA_infos WORDINDEX2INFO(9874)
+           INVALID,         UNDEF, o2(0xC4,0xAF), o2(0xC4,0xB0),
+     o2(0xC4,0xB1), o2(0xC4,0xB2), o2(0xC4,0xB3), o2(0xC4,0xB4),
+     o2(0xC4,0xB5), o2(0xC4,0xB6), o2(0xC4,0xB7), o2(0xC4,0xB8),
+     o2(0xC4,0xB9), o2(0xC4,0xBA), o2(0xC4,0xBB), o2(0xC4,0xBC),
+     o2(0xC4,0xBD),
+
+#define to_EUC_KR_EC_BA WORDINDEX2INFO(9891)
+    to_EUC_KR_EC_BA_offsets,
+    to_EUC_KR_EC_BA_infos,
+
+#define to_EUC_KR_EC_BB_infos WORDINDEX2INFO(9893)
+           INVALID,         UNDEF, o2(0xC4,0xBE), o2(0xC4,0xBF),
+     o2(0xC4,0xC0), o2(0xC4,0xC1), o2(0xC4,0xC2), o2(0xC4,0xC3),
+     o2(0xC4,0xC4), o2(0xC4,0xC5), o2(0xC4,0xC6), o2(0xC4,0xC7),
+     o2(0xC4,0xC8),
+
+#define to_EUC_KR_EC_BB WORDINDEX2INFO(9906)
+    to_EUC_KR_EC_BB_offsets,
+    to_EUC_KR_EC_BB_infos,
+
+#define to_EUC_KR_EC_BC_infos WORDINDEX2INFO(9908)
+           INVALID, o2(0xC4,0xC9), o2(0xC4,0xCA),         UNDEF,
+     o2(0xC4,0xCB), o2(0xC4,0xCC), o2(0xC4,0xCD), o2(0xC4,0xCE),
+     o2(0xC4,0xCF), o2(0xC4,0xD0), o2(0xC4,0xD1), o2(0xC4,0xD2),
+     o2(0xC4,0xD3), o2(0xC4,0xD4), o2(0xC4,0xD5), o2(0xC4,0xD6),
+     o2(0xC4,0xD7), o2(0xC4,0xD8), o2(0xC4,0xD9),
+
+#define to_EUC_KR_EC_BC WORDINDEX2INFO(9927)
+    to_EUC_KR_EC_BC_offsets,
+    to_EUC_KR_EC_BC_infos,
+
+#define to_EUC_KR_EC_BD_infos WORDINDEX2INFO(9929)
+           INVALID,         UNDEF, o2(0xC4,0xDA), o2(0xC4,0xDB),
+     o2(0xC4,0xDC), o2(0xC4,0xDD), o2(0xC4,0xDE), o2(0xC4,0xDF),
+     o2(0xC4,0xE0), o2(0xC4,0xE1), o2(0xC4,0xE2), o2(0xC4,0xE3),
+     o2(0xC4,0xE4), o2(0xC4,0xE5),
+
+#define to_EUC_KR_EC_BD WORDINDEX2INFO(9943)
+    to_EUC_KR_EC_BD_offsets,
+    to_EUC_KR_EC_BD_infos,
+
+#define to_EUC_KR_EC_BE_infos WORDINDEX2INFO(9945)
+           INVALID, o2(0xC4,0xE6),         UNDEF, o2(0xC4,0xE7),
+     o2(0xC4,0xE8), o2(0xC4,0xE9), o2(0xC4,0xEA), o2(0xC4,0xEB),
+
+#define to_EUC_KR_EC_BE WORDINDEX2INFO(9953)
+    to_EUC_KR_EC_BE_offsets,
+    to_EUC_KR_EC_BE_infos,
+
+#define to_EUC_KR_EC_BF_infos WORDINDEX2INFO(9955)
+           INVALID,         UNDEF, o2(0xC4,0xEC), o2(0xC4,0xED),
+     o2(0xC4,0xEE), o2(0xC4,0xEF), o2(0xC4,0xF0), o2(0xC4,0xF1),
+     o2(0xC4,0xF2), o2(0xC4,0xF3), o2(0xC4,0xF4), o2(0xC4,0xF5),
+
+#define to_EUC_KR_EC_BF WORDINDEX2INFO(9967)
+    to_EUC_KR_EC_BF_offsets,
+    to_EUC_KR_EC_BF_infos,
+
+#define to_EUC_KR_EC_infos WORDINDEX2INFO(9969)
+             INVALID, to_EUC_KR_EC_80, to_EUC_KR_EC_81, to_EUC_KR_EC_82,
+     to_EUC_KR_EC_83, to_EUC_KR_EC_84, to_EUC_KR_EC_85, to_EUC_KR_EC_86,
+     to_EUC_KR_EC_87, to_EUC_KR_EC_88, to_EUC_KR_EC_89, to_EUC_KR_EC_8A,
+     to_EUC_KR_EC_8B, to_EUC_KR_EC_8C, to_EUC_KR_EC_8D, to_EUC_KR_EC_8E,
+     to_EUC_KR_EC_8F, to_EUC_KR_EC_90, to_EUC_KR_EC_91, to_EUC_KR_EC_92,
+     to_EUC_KR_EC_93, to_EUC_KR_EC_94, to_EUC_KR_EC_95, to_EUC_KR_EC_96,
+     to_EUC_KR_EC_97, to_EUC_KR_EC_98, to_EUC_KR_EC_99, to_EUC_KR_EC_9A,
+     to_EUC_KR_EC_9B, to_EUC_KR_EC_9C, to_EUC_KR_EC_9D, to_EUC_KR_EC_9E,
+     to_EUC_KR_EC_9F, to_EUC_KR_EC_A0, to_EUC_KR_EC_A1, to_EUC_KR_EC_A2,
+     to_EUC_KR_EC_A3, to_EUC_KR_EC_A4, to_EUC_KR_EC_A5, to_EUC_KR_EC_A6,
+     to_EUC_KR_EC_A7, to_EUC_KR_EC_A8, to_EUC_KR_EC_A9, to_EUC_KR_EC_AA,
+     to_EUC_KR_EC_AB, to_EUC_KR_EC_AC, to_EUC_KR_EC_AD, to_EUC_KR_EC_AE,
+     to_EUC_KR_EC_AF, to_EUC_KR_EC_B0, to_EUC_KR_EC_B1, to_EUC_KR_EC_B2,
+     to_EUC_KR_EC_B3, to_EUC_KR_EC_B4, to_EUC_KR_EC_B5, to_EUC_KR_EC_B6,
+     to_EUC_KR_EC_B7, to_EUC_KR_EC_B8, to_EUC_KR_EC_B9, to_EUC_KR_EC_BA,
+     to_EUC_KR_EC_BB, to_EUC_KR_EC_BC, to_EUC_KR_EC_BD, to_EUC_KR_EC_BE,
+     to_EUC_KR_EC_BF,
+
+#define to_EUC_KR_EC WORDINDEX2INFO(10034)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EC_infos,
+
+#define to_EUC_KR_ED_80_infos WORDINDEX2INFO(10036)
+           INVALID, o2(0xC4,0xF6),         UNDEF, o2(0xC4,0xF7),
+     o2(0xC4,0xF8), o2(0xC4,0xF9), o2(0xC4,0xFA), o2(0xC4,0xFB),
+     o2(0xC4,0xFC), o2(0xC4,0xFD), o2(0xC4,0xFE),
+
+#define to_EUC_KR_ED_80 WORDINDEX2INFO(10047)
+    to_EUC_KR_ED_80_offsets,
+    to_EUC_KR_ED_80_infos,
+
+#define to_EUC_KR_ED_81_infos WORDINDEX2INFO(10049)
+           INVALID,         UNDEF, o2(0xC5,0xA1), o2(0xC5,0xA2),
+     o2(0xC5,0xA3), o2(0xC5,0xA4), o2(0xC5,0xA5), o2(0xC5,0xA6),
+     o2(0xC5,0xA7), o2(0xC5,0xA8), o2(0xC5,0xA9), o2(0xC5,0xAA),
+     o2(0xC5,0xAB), o2(0xC5,0xAC), o2(0xC5,0xAD), o2(0xC5,0xAE),
+
+#define to_EUC_KR_ED_81 WORDINDEX2INFO(10065)
+    to_EUC_KR_ED_81_offsets,
+    to_EUC_KR_ED_81_infos,
+
+#define to_EUC_KR_ED_82_infos WORDINDEX2INFO(10067)
+           INVALID,         UNDEF, o2(0xC5,0xAF), o2(0xC5,0xB0),
+     o2(0xC5,0xB1), o2(0xC5,0xB2), o2(0xC5,0xB3), o2(0xC5,0xB4),
+     o2(0xC5,0xB5), o2(0xC5,0xB6), o2(0xC5,0xB7),
+
+#define to_EUC_KR_ED_82 WORDINDEX2INFO(10078)
+    to_EUC_KR_ED_82_offsets,
+    to_EUC_KR_ED_82_infos,
+
+#define to_EUC_KR_ED_83_infos WORDINDEX2INFO(10080)
+           INVALID, o2(0xC5,0xB8), o2(0xC5,0xB9),         UNDEF,
+     o2(0xC5,0xBA), o2(0xC5,0xBB), o2(0xC5,0xBC), o2(0xC5,0xBD),
+     o2(0xC5,0xBE), o2(0xC5,0xBF), o2(0xC5,0xC0), o2(0xC5,0xC1),
+     o2(0xC5,0xC2), o2(0xC5,0xC3), o2(0xC5,0xC4), o2(0xC5,0xC5),
+     o2(0xC5,0xC6), o2(0xC5,0xC7), o2(0xC5,0xC8), o2(0xC5,0xC9),
+     o2(0xC5,0xCA), o2(0xC5,0xCB),
+
+#define to_EUC_KR_ED_83 WORDINDEX2INFO(10102)
+    to_EUC_KR_ED_83_offsets,
+    to_EUC_KR_ED_83_infos,
+
+#define to_EUC_KR_ED_84_infos WORDINDEX2INFO(10104)
+           INVALID,         UNDEF, o2(0xC5,0xCC), o2(0xC5,0xCD),
+     o2(0xC5,0xCE), o2(0xC5,0xCF), o2(0xC5,0xD0), o2(0xC5,0xD1),
+
+#define to_EUC_KR_ED_84 WORDINDEX2INFO(10112)
+    to_EUC_KR_ED_84_offsets,
+    to_EUC_KR_ED_84_infos,
+
+#define to_EUC_KR_ED_85_infos WORDINDEX2INFO(10114)
+           INVALID, o2(0xC5,0xD2), o2(0xC5,0xD3),         UNDEF,
+     o2(0xC5,0xD4), o2(0xC5,0xD5), o2(0xC5,0xD6), o2(0xC5,0xD7),
+     o2(0xC5,0xD8), o2(0xC5,0xD9), o2(0xC5,0xDA), o2(0xC5,0xDB),
+     o2(0xC5,0xDC), o2(0xC5,0xDD), o2(0xC5,0xDE), o2(0xC5,0xDF),
+     o2(0xC5,0xE0), o2(0xC5,0xE1),
+
+#define to_EUC_KR_ED_85 WORDINDEX2INFO(10132)
+    to_EUC_KR_ED_85_offsets,
+    to_EUC_KR_ED_85_infos,
+
+#define to_EUC_KR_ED_86_infos WORDINDEX2INFO(10134)
+           INVALID,         UNDEF, o2(0xC5,0xE2), o2(0xC5,0xE3),
+     o2(0xC5,0xE4), o2(0xC5,0xE5), o2(0xC5,0xE6), o2(0xC5,0xE7),
+     o2(0xC5,0xE8), o2(0xC5,0xE9), o2(0xC5,0xEA), o2(0xC5,0xEB),
+     o2(0xC5,0xEC), o2(0xC5,0xED),
+
+#define to_EUC_KR_ED_86 WORDINDEX2INFO(10148)
+    to_EUC_KR_ED_86_offsets,
+    to_EUC_KR_ED_86_infos,
+
+#define to_EUC_KR_ED_87_infos WORDINDEX2INFO(10150)
+           INVALID, o2(0xC5,0xEE),         UNDEF, o2(0xC5,0xEF),
+     o2(0xC5,0xF0), o2(0xC5,0xF1),
+
+#define to_EUC_KR_ED_87 WORDINDEX2INFO(10156)
+    to_EUC_KR_ED_87_offsets,
+    to_EUC_KR_ED_87_infos,
+
+#define to_EUC_KR_ED_88_infos WORDINDEX2INFO(10158)
+           INVALID,         UNDEF, o2(0xC5,0xF2), o2(0xC5,0xF3),
+     o2(0xC5,0xF4), o2(0xC5,0xF5), o2(0xC5,0xF6), o2(0xC5,0xF7),
+     o2(0xC5,0xF8), o2(0xC5,0xF9), o2(0xC5,0xFA), o2(0xC5,0xFB),
+
+#define to_EUC_KR_ED_88 WORDINDEX2INFO(10170)
+    to_EUC_KR_ED_88_offsets,
+    to_EUC_KR_ED_88_infos,
+
+#define to_EUC_KR_ED_89_infos WORDINDEX2INFO(10172)
+           INVALID,         UNDEF, o2(0xC5,0xFC), o2(0xC5,0xFD),
+     o2(0xC5,0xFE), o2(0xC6,0xA1),
+
+#define to_EUC_KR_ED_89 WORDINDEX2INFO(10178)
+    to_EUC_KR_ED_89_offsets,
+    to_EUC_KR_ED_89_infos,
+
+#define to_EUC_KR_ED_8A_infos WORDINDEX2INFO(10180)
+           INVALID, o2(0xC6,0xA2), o2(0xC6,0xA3),         UNDEF,
+     o2(0xC6,0xA4), o2(0xC6,0xA5), o2(0xC6,0xA6), o2(0xC6,0xA7),
+     o2(0xC6,0xA8), o2(0xC6,0xA9), o2(0xC6,0xAA), o2(0xC6,0xAB),
+     o2(0xC6,0xAC), o2(0xC6,0xAD), o2(0xC6,0xAE), o2(0xC6,0xAF),
+     o2(0xC6,0xB0), o2(0xC6,0xB1),
+
+#define to_EUC_KR_ED_8A WORDINDEX2INFO(10198)
+    to_EUC_KR_ED_8A_offsets,
+    to_EUC_KR_ED_8A_infos,
+
+#define to_EUC_KR_ED_8B_infos WORDINDEX2INFO(10200)
+           INVALID, o2(0xC6,0xB2),         UNDEF, o2(0xC6,0xB3),
+     o2(0xC6,0xB4), o2(0xC6,0xB5), o2(0xC6,0xB6), o2(0xC6,0xB7),
+     o2(0xC6,0xB8), o2(0xC6,0xB9), o2(0xC6,0xBA), o2(0xC6,0xBB),
+     o2(0xC6,0xBC), o2(0xC6,0xBD), o2(0xC6,0xBE), o2(0xC6,0xBF),
+
+#define to_EUC_KR_ED_8B WORDINDEX2INFO(10216)
+    to_EUC_KR_ED_8B_offsets,
+    to_EUC_KR_ED_8B_infos,
+
+#define to_EUC_KR_ED_8C_infos WORDINDEX2INFO(10218)
+           INVALID, o2(0xC6,0xC0), o2(0xC6,0xC1),         UNDEF,
+     o2(0xC6,0xC2), o2(0xC6,0xC3), o2(0xC6,0xC4), o2(0xC6,0xC5),
+     o2(0xC6,0xC6), o2(0xC6,0xC7), o2(0xC6,0xC8), o2(0xC6,0xC9),
+     o2(0xC6,0xCA), o2(0xC6,0xCB), o2(0xC6,0xCC), o2(0xC6,0xCD),
+     o2(0xC6,0xCE), o2(0xC6,0xCF), o2(0xC6,0xD0), o2(0xC6,0xD1),
+     o2(0xC6,0xD2), o2(0xC6,0xD3), o2(0xC6,0xD4), o2(0xC6,0xD5),
+     o2(0xC6,0xD6), o2(0xC6,0xD7), o2(0xC6,0xD8),
+
+#define to_EUC_KR_ED_8C WORDINDEX2INFO(10245)
+    to_EUC_KR_ED_8C_offsets,
+    to_EUC_KR_ED_8C_infos,
+
+#define to_EUC_KR_ED_8D_infos WORDINDEX2INFO(10247)
+           INVALID,         UNDEF, o2(0xC6,0xD9), o2(0xC6,0xDA),
+     o2(0xC6,0xDB), o2(0xC6,0xDC),
+
+#define to_EUC_KR_ED_8D WORDINDEX2INFO(10253)
+    to_EUC_KR_ED_8D_offsets,
+    to_EUC_KR_ED_8D_infos,
+
+#define to_EUC_KR_ED_8E_infos WORDINDEX2INFO(10255)
+           INVALID, o2(0xC6,0xDD),         UNDEF, o2(0xC6,0xDE),
+     o2(0xC6,0xDF), o2(0xC6,0xE0), o2(0xC6,0xE1), o2(0xC6,0xE2),
+     o2(0xC6,0xE3), o2(0xC6,0xE4), o2(0xC6,0xE5), o2(0xC6,0xE6),
+     o2(0xC6,0xE7), o2(0xC6,0xE8), o2(0xC6,0xE9), o2(0xC6,0xEA),
+     o2(0xC6,0xEB), o2(0xC6,0xEC), o2(0xC6,0xED), o2(0xC6,0xEE),
+
+#define to_EUC_KR_ED_8E WORDINDEX2INFO(10275)
+    to_EUC_KR_ED_8E_offsets,
+    to_EUC_KR_ED_8E_infos,
+
+#define to_EUC_KR_ED_8F_infos WORDINDEX2INFO(10277)
+           INVALID,         UNDEF, o2(0xC6,0xEF), o2(0xC6,0xF0),
+     o2(0xC6,0xF1), o2(0xC6,0xF2), o2(0xC6,0xF3), o2(0xC6,0xF4),
+     o2(0xC6,0xF5), o2(0xC6,0xF6), o2(0xC6,0xF7), o2(0xC6,0xF8),
+     o2(0xC6,0xF9), o2(0xC6,0xFA), o2(0xC6,0xFB), o2(0xC6,0xFC),
+     o2(0xC6,0xFD),
+
+#define to_EUC_KR_ED_8F WORDINDEX2INFO(10294)
+    to_EUC_KR_ED_8F_offsets,
+    to_EUC_KR_ED_8F_infos,
+
+#define to_EUC_KR_ED_90_infos WORDINDEX2INFO(10296)
+           INVALID,         UNDEF, o2(0xC6,0xFE), o2(0xC7,0xA1),
+     o2(0xC7,0xA2),
+
+#define to_EUC_KR_ED_90 WORDINDEX2INFO(10301)
+    to_EUC_KR_ED_90_offsets,
+    to_EUC_KR_ED_90_infos,
+
+#define to_EUC_KR_ED_91_infos WORDINDEX2INFO(10303)
+           INVALID, o2(0xC7,0xA3),         UNDEF, o2(0xC7,0xA4),
+     o2(0xC7,0xA5), o2(0xC7,0xA6), o2(0xC7,0xA7), o2(0xC7,0xA8),
+     o2(0xC7,0xA9), o2(0xC7,0xAA), o2(0xC7,0xAB), o2(0xC7,0xAC),
+     o2(0xC7,0xAD),
+
+#define to_EUC_KR_ED_91 WORDINDEX2INFO(10316)
+    to_EUC_KR_ED_91_offsets,
+    to_EUC_KR_ED_91_infos,
+
+#define to_EUC_KR_ED_92_infos WORDINDEX2INFO(10318)
+           INVALID, o2(0xC7,0xAE),         UNDEF, o2(0xC7,0xAF),
+     o2(0xC7,0xB0), o2(0xC7,0xB1), o2(0xC7,0xB2), o2(0xC7,0xB3),
+     o2(0xC7,0xB4), o2(0xC7,0xB5),
+
+#define to_EUC_KR_ED_92 WORDINDEX2INFO(10328)
+    to_EUC_KR_ED_92_offsets,
+    to_EUC_KR_ED_92_infos,
+
+#define to_EUC_KR_ED_93_infos WORDINDEX2INFO(10330)
+           INVALID,         UNDEF, o2(0xC7,0xB6), o2(0xC7,0xB7),
+     o2(0xC7,0xB8), o2(0xC7,0xB9), o2(0xC7,0xBA), o2(0xC7,0xBB),
+     o2(0xC7,0xBC), o2(0xC7,0xBD), o2(0xC7,0xBE), o2(0xC7,0xBF),
+     o2(0xC7,0xC0),
+
+#define to_EUC_KR_ED_93 WORDINDEX2INFO(10343)
+    to_EUC_KR_ED_93_offsets,
+    to_EUC_KR_ED_93_infos,
+
+#define to_EUC_KR_ED_94_infos WORDINDEX2INFO(10345)
+           INVALID,         UNDEF, o2(0xC7,0xC1), o2(0xC7,0xC2),
+     o2(0xC7,0xC3), o2(0xC7,0xC4), o2(0xC7,0xC5), o2(0xC7,0xC6),
+     o2(0xC7,0xC7), o2(0xC7,0xC8),
+
+#define to_EUC_KR_ED_94 WORDINDEX2INFO(10355)
+    to_EUC_KR_ED_94_offsets,
+    to_EUC_KR_ED_94_infos,
+
+#define to_EUC_KR_ED_95_infos WORDINDEX2INFO(10357)
+           INVALID, o2(0xC7,0xC9),         UNDEF, o2(0xC7,0xCA),
+     o2(0xC7,0xCB), o2(0xC7,0xCC), o2(0xC7,0xCD), o2(0xC7,0xCE),
+     o2(0xC7,0xCF), o2(0xC7,0xD0), o2(0xC7,0xD1), o2(0xC7,0xD2),
+     o2(0xC7,0xD3), o2(0xC7,0xD4), o2(0xC7,0xD5), o2(0xC7,0xD6),
+     o2(0xC7,0xD7), o2(0xC7,0xD8), o2(0xC7,0xD9), o2(0xC7,0xDA),
+     o2(0xC7,0xDB),
+
+#define to_EUC_KR_ED_95 WORDINDEX2INFO(10378)
+    to_EUC_KR_ED_95_offsets,
+    to_EUC_KR_ED_95_infos,
+
+#define to_EUC_KR_ED_96_infos WORDINDEX2INFO(10380)
+           INVALID,         UNDEF, o2(0xC7,0xDC), o2(0xC7,0xDD),
+     o2(0xC7,0xDE), o2(0xC7,0xDF), o2(0xC7,0xE0), o2(0xC7,0xE1),
+     o2(0xC7,0xE2),
+
+#define to_EUC_KR_ED_96 WORDINDEX2INFO(10389)
+    to_EUC_KR_ED_96_offsets,
+    to_EUC_KR_ED_96_infos,
+
+#define to_EUC_KR_ED_97_infos WORDINDEX2INFO(10391)
+           INVALID,         UNDEF, o2(0xC7,0xE3), o2(0xC7,0xE4),
+     o2(0xC7,0xE5), o2(0xC7,0xE6), o2(0xC7,0xE7), o2(0xC7,0xE8),
+     o2(0xC7,0xE9), o2(0xC7,0xEA), o2(0xC7,0xEB), o2(0xC7,0xEC),
+     o2(0xC7,0xED), o2(0xC7,0xEE), o2(0xC7,0xEF), o2(0xC7,0xF0),
+     o2(0xC7,0xF1), o2(0xC7,0xF2), o2(0xC7,0xF3),
+
+#define to_EUC_KR_ED_97 WORDINDEX2INFO(10410)
+    to_EUC_KR_ED_97_offsets,
+    to_EUC_KR_ED_97_infos,
+
+#define to_EUC_KR_ED_98_infos WORDINDEX2INFO(10412)
+           INVALID, o2(0xC7,0xF4), o2(0xC7,0xF5),         UNDEF,
+     o2(0xC7,0xF6), o2(0xC7,0xF7), o2(0xC7,0xF8), o2(0xC7,0xF9),
+     o2(0xC7,0xFA), o2(0xC7,0xFB), o2(0xC7,0xFC), o2(0xC7,0xFD),
+     o2(0xC7,0xFE), o2(0xC8,0xA1), o2(0xC8,0xA2), o2(0xC8,0xA3),
+     o2(0xC8,0xA4), o2(0xC8,0xA5),
+
+#define to_EUC_KR_ED_98 WORDINDEX2INFO(10430)
+    to_EUC_KR_ED_98_offsets,
+    to_EUC_KR_ED_98_infos,
+
+#define to_EUC_KR_ED_99_infos WORDINDEX2INFO(10432)
+           INVALID, o2(0xC8,0xA6),         UNDEF, o2(0xC8,0xA7),
+     o2(0xC8,0xA8), o2(0xC8,0xA9), o2(0xC8,0xAA), o2(0xC8,0xAB),
+     o2(0xC8,0xAC), o2(0xC8,0xAD), o2(0xC8,0xAE), o2(0xC8,0xAF),
+     o2(0xC8,0xB0), o2(0xC8,0xB1), o2(0xC8,0xB2), o2(0xC8,0xB3),
+     o2(0xC8,0xB4), o2(0xC8,0xB5),
+
+#define to_EUC_KR_ED_99 WORDINDEX2INFO(10450)
+    to_EUC_KR_ED_99_offsets,
+    to_EUC_KR_ED_99_infos,
+
+#define to_EUC_KR_ED_9A_infos WORDINDEX2INFO(10452)
+           INVALID,         UNDEF, o2(0xC8,0xB6), o2(0xC8,0xB7),
+     o2(0xC8,0xB8), o2(0xC8,0xB9), o2(0xC8,0xBA), o2(0xC8,0xBB),
+     o2(0xC8,0xBC), o2(0xC8,0xBD), o2(0xC8,0xBE), o2(0xC8,0xBF),
+     o2(0xC8,0xC0), o2(0xC8,0xC1), o2(0xC8,0xC2), o2(0xC8,0xC3),
+
+#define to_EUC_KR_ED_9A WORDINDEX2INFO(10468)
+    to_EUC_KR_ED_9A_offsets,
+    to_EUC_KR_ED_9A_infos,
+
+#define to_EUC_KR_ED_9B_infos WORDINDEX2INFO(10470)
+           INVALID,         UNDEF, o2(0xC8,0xC4), o2(0xC8,0xC5),
+     o2(0xC8,0xC6), o2(0xC8,0xC7), o2(0xC8,0xC8), o2(0xC8,0xC9),
+     o2(0xC8,0xCA), o2(0xC8,0xCB), o2(0xC8,0xCC), o2(0xC8,0xCD),
+     o2(0xC8,0xCE), o2(0xC8,0xCF), o2(0xC8,0xD0), o2(0xC8,0xD1),
+     o2(0xC8,0xD2),
+
+#define to_EUC_KR_ED_9B WORDINDEX2INFO(10487)
+    to_EUC_KR_ED_9B_offsets,
+    to_EUC_KR_ED_9B_infos,
+
+#define to_EUC_KR_ED_9C_infos WORDINDEX2INFO(10489)
+           INVALID, o2(0xC8,0xD3),         UNDEF, o2(0xC8,0xD4),
+     o2(0xC8,0xD5), o2(0xC8,0xD6), o2(0xC8,0xD7), o2(0xC8,0xD8),
+     o2(0xC8,0xD9), o2(0xC8,0xDA), o2(0xC8,0xDB), o2(0xC8,0xDC),
+     o2(0xC8,0xDD), o2(0xC8,0xDE), o2(0xC8,0xDF), o2(0xC8,0xE0),
+     o2(0xC8,0xE1),
+
+#define to_EUC_KR_ED_9C WORDINDEX2INFO(10506)
+    to_EUC_KR_ED_9C_offsets,
+    to_EUC_KR_ED_9C_infos,
+
+#define to_EUC_KR_ED_9D_infos WORDINDEX2INFO(10508)
+           INVALID,         UNDEF, o2(0xC8,0xE2), o2(0xC8,0xE3),
+     o2(0xC8,0xE4), o2(0xC8,0xE5), o2(0xC8,0xE6), o2(0xC8,0xE7),
+     o2(0xC8,0xE8), o2(0xC8,0xE9), o2(0xC8,0xEA), o2(0xC8,0xEB),
+     o2(0xC8,0xEC), o2(0xC8,0xED), o2(0xC8,0xEE), o2(0xC8,0xEF),
+     o2(0xC8,0xF0), o2(0xC8,0xF1), o2(0xC8,0xF2), o2(0xC8,0xF3),
+     o2(0xC8,0xF4), o2(0xC8,0xF5),
+
+#define to_EUC_KR_ED_9D WORDINDEX2INFO(10530)
+    to_EUC_KR_ED_9D_offsets,
+    to_EUC_KR_ED_9D_infos,
+
+#define to_EUC_KR_ED_9E_infos WORDINDEX2INFO(10532)
+           INVALID,         UNDEF, o2(0xC8,0xF6), o2(0xC8,0xF7),
+     o2(0xC8,0xF8), o2(0xC8,0xF9), o2(0xC8,0xFA), o2(0xC8,0xFB),
+     o2(0xC8,0xFC), o2(0xC8,0xFD), o2(0xC8,0xFE),
+
+#define to_EUC_KR_ED_9E WORDINDEX2INFO(10543)
+    to_EUC_KR_ED_9E_offsets,
+    to_EUC_KR_ED_9E_infos,
+
+#define to_EUC_KR_ED_infos WORDINDEX2INFO(10545)
+             INVALID, to_EUC_KR_ED_80, to_EUC_KR_ED_81, to_EUC_KR_ED_82,
+     to_EUC_KR_ED_83, to_EUC_KR_ED_84, to_EUC_KR_ED_85, to_EUC_KR_ED_86,
+     to_EUC_KR_ED_87, to_EUC_KR_ED_88, to_EUC_KR_ED_89, to_EUC_KR_ED_8A,
+     to_EUC_KR_ED_8B, to_EUC_KR_ED_8C, to_EUC_KR_ED_8D, to_EUC_KR_ED_8E,
+     to_EUC_KR_ED_8F, to_EUC_KR_ED_90, to_EUC_KR_ED_91, to_EUC_KR_ED_92,
+     to_EUC_KR_ED_93, to_EUC_KR_ED_94, to_EUC_KR_ED_95, to_EUC_KR_ED_96,
+     to_EUC_KR_ED_97, to_EUC_KR_ED_98, to_EUC_KR_ED_99, to_EUC_KR_ED_9A,
+     to_EUC_KR_ED_9B, to_EUC_KR_ED_9C, to_EUC_KR_ED_9D, to_EUC_KR_ED_9E,
+        to_EUC_KR_C6,
+
+#define to_EUC_KR_ED WORDINDEX2INFO(10578)
+    to_EUC_KR_ED_offsets,
+    to_EUC_KR_ED_infos,
+
+#define to_EUC_KR_EF_A4_infos WORDINDEX2INFO(10580)
+           INVALID, o2(0xCB,0xD0), o2(0xCB,0xD6), o2(0xCB,0xE7),
+     o2(0xCD,0xCF), o2(0xCD,0xE8), o2(0xCE,0xAD), o2(0xCF,0xFB),
+     o2(0xD0,0xA2), o2(0xD0,0xB8), o2(0xD0,0xD0), o2(0xD0,0xDD),
+     o2(0xD1,0xD4), o2(0xD1,0xD5), o2(0xD1,0xD8), o2(0xD1,0xDB),
+     o2(0xD1,0xDC), o2(0xD1,0xDD), o2(0xD1,0xDE), o2(0xD1,0xDF),
+     o2(0xD1,0xE0), o2(0xD1,0xE2), o2(0xD1,0xE3), o2(0xD1,0xE4),
+     o2(0xD1,0xE5), o2(0xD1,0xE6), o2(0xD1,0xE8), o2(0xD1,0xE9),
+     o2(0xD1,0xEA), o2(0xD1,0xEB), o2(0xD1,0xED), o2(0xD1,0xEF),
+     o2(0xD1,0xF0), o2(0xD1,0xF2), o2(0xD1,0xF6), o2(0xD1,0xFA),
+     o2(0xD1,0xFC), o2(0xD1,0xFD), o2(0xD1,0xFE), o2(0xD2,0xA2),
+     o2(0xD2,0xA3), o2(0xD2,0xA7), o2(0xD2,0xA8), o2(0xD2,0xA9),
+     o2(0xD2,0xAA), o2(0xD2,0xAB), o2(0xD2,0xAD), o2(0xD2,0xB2),
+     o2(0xD2,0xBE), o2(0xD2,0xC2), o2(0xD2,0xC3), o2(0xD2,0xC4),
+     o2(0xD2,0xC6), o2(0xD2,0xC7), o2(0xD2,0xC8), o2(0xD2,0xC9),
+     o2(0xD2,0xCA), o2(0xD2,0xCB), o2(0xD2,0xCD), o2(0xD2,0xCE),
+     o2(0xD2,0xCF), o2(0xD2,0xD0), o2(0xD2,0xD1), o2(0xD2,0xD2),
+     o2(0xD2,0xD3),
+
+#define to_EUC_KR_EF_A4 WORDINDEX2INFO(10645)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EF_A4_infos,
+
+#define to_EUC_KR_EF_A5_infos WORDINDEX2INFO(10647)
+           INVALID, o2(0xD2,0xD4), o2(0xD2,0xD5), o2(0xD2,0xD6),
+     o2(0xD2,0xD7), o2(0xD2,0xD9), o2(0xD2,0xDA), o2(0xD2,0xDE),
+     o2(0xD2,0xDF), o2(0xD2,0xE1), o2(0xD2,0xE2), o2(0xD2,0xE4),
+     o2(0xD2,0xE5), o2(0xD2,0xE6), o2(0xD2,0xE7), o2(0xD2,0xE8),
+     o2(0xD2,0xE9), o2(0xD2,0xEA), o2(0xD2,0xEB), o2(0xD2,0xF0),
+     o2(0xD2,0xF1), o2(0xD2,0xF2), o2(0xD2,0xF3), o2(0xD2,0xF4),
+     o2(0xD2,0xF5), o2(0xD2,0xF7), o2(0xD2,0xF8), o2(0xD4,0xE6),
+     o2(0xD4,0xFC), o2(0xD5,0xA5), o2(0xD5,0xAB), o2(0xD5,0xAE),
+     o2(0xD6,0xB8), o2(0xD6,0xCD), o2(0xD7,0xCB), o2(0xD7,0xE4),
+     o2(0xDB,0xC5), o2(0xDB,0xE4), o2(0xDC,0xA5), o2(0xDD,0xA5),
+     o2(0xDD,0xD5), o2(0xDD,0xF4), o2(0xDE,0xFC), o2(0xDE,0xFE),
+     o2(0xDF,0xB3), o2(0xDF,0xE1), o2(0xDF,0xE8), o2(0xE0,0xF1),
+     o2(0xE1,0xAD), o2(0xE1,0xED), o2(0xE3,0xF5), o2(0xE4,0xA1),
+     o2(0xE4,0xA9), o2(0xE5,0xAE), o2(0xE5,0xB1), o2(0xE5,0xB2),
+     o2(0xE5,0xB9), o2(0xE5,0xBB), o2(0xE5,0xBC), o2(0xE5,0xC4),
+     o2(0xE5,0xCE), o2(0xE5,0xD0), o2(0xE5,0xD2), o2(0xE5,0xD6),
+     o2(0xE5,0xFA),
+
+#define to_EUC_KR_EF_A5 WORDINDEX2INFO(10712)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EF_A5_infos,
+
+#define to_EUC_KR_EF_A6_infos WORDINDEX2INFO(10714)
+           INVALID, o2(0xE5,0xFB), o2(0xE5,0xFC), o2(0xE5,0xFE),
+     o2(0xE6,0xA1), o2(0xE6,0xA4), o2(0xE6,0xA7), o2(0xE6,0xAD),
+     o2(0xE6,0xAF), o2(0xE6,0xB0), o2(0xE6,0xB1), o2(0xE6,0xB3),
+     o2(0xE6,0xB7), o2(0xE6,0xB8), o2(0xE6,0xBC), o2(0xE6,0xC4),
+     o2(0xE6,0xC6), o2(0xE6,0xC7), o2(0xE6,0xCA), o2(0xE6,0xD2),
+     o2(0xE6,0xD6), o2(0xE6,0xD9), o2(0xE6,0xDC), o2(0xE6,0xDF),
+     o2(0xE6,0xE1), o2(0xE6,0xE4), o2(0xE6,0xE5), o2(0xE6,0xE6),
+     o2(0xE6,0xE8), o2(0xE6,0xEA), o2(0xE6,0xEB), o2(0xE6,0xEC),
+     o2(0xE6,0xEF), o2(0xE6,0xF1), o2(0xE6,0xF2), o2(0xE6,0xF5),
+     o2(0xE6,0xF6), o2(0xE6,0xF7), o2(0xE6,0xF9), o2(0xE7,0xA1),
+     o2(0xE7,0xA6), o2(0xE7,0xA9), o2(0xE7,0xAA), o2(0xE7,0xAC),
+     o2(0xE7,0xAD), o2(0xE7,0xB0), o2(0xE7,0xBF), o2(0xE7,0xC1),
+     o2(0xE7,0xC6), o2(0xE7,0xC7), o2(0xE7,0xCB), o2(0xE7,0xCD),
+     o2(0xE7,0xCF), o2(0xE7,0xD0), o2(0xE7,0xD3), o2(0xE7,0xDF),
+     o2(0xE7,0xE4), o2(0xE7,0xE6), o2(0xE7,0xF7), o2(0xE8,0xE7),
+     o2(0xE8,0xE8), o2(0xE8,0xF0), o2(0xE8,0xF1), o2(0xE8,0xF7),
+     o2(0xE8,0xF9),
+
+#define to_EUC_KR_EF_A6 WORDINDEX2INFO(10779)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EF_A6_infos,
+
+#define to_EUC_KR_EF_A7_infos WORDINDEX2INFO(10781)
+           INVALID, o2(0xE8,0xFB), o2(0xE8,0xFE), o2(0xE9,0xA7),
+     o2(0xE9,0xAC), o2(0xE9,0xCC), o2(0xE9,0xF7), o2(0xEA,0xC1),
+     o2(0xEA,0xE5), o2(0xEA,0xF4), o2(0xEA,0xF7), o2(0xEA,0xFC),
+     o2(0xEA,0xFE), o2(0xEB,0xA4), o2(0xEB,0xA7), o2(0xEB,0xA9),
+     o2(0xEB,0xAA), o2(0xEB,0xBA), o2(0xEB,0xBB), o2(0xEB,0xBD),
+     o2(0xEB,0xC1), o2(0xEB,0xC2), o2(0xEB,0xC6), o2(0xEB,0xC7),
+     o2(0xEB,0xCC), o2(0xEB,0xCF), o2(0xEB,0xD0), o2(0xEB,0xD1),
+     o2(0xEB,0xD2), o2(0xEB,0xD8), o2(0xEC,0xA6), o2(0xEC,0xA7),
+     o2(0xEC,0xAA), o2(0xEC,0xAF), o2(0xEC,0xB0), o2(0xEC,0xB1),
+     o2(0xEC,0xB2), o2(0xEC,0xB5), o2(0xEC,0xB8), o2(0xEC,0xBA),
+     o2(0xEC,0xC0), o2(0xEC,0xC1), o2(0xEC,0xC5), o2(0xEC,0xC6),
+     o2(0xEC,0xC9), o2(0xEC,0xCA), o2(0xEC,0xD5), o2(0xEC,0xDD),
+     o2(0xEC,0xDE), o2(0xEC,0xE1), o2(0xEC,0xE4), o2(0xEC,0xE7),
+     o2(0xEC,0xE8), o2(0xEC,0xF7), o2(0xEC,0xF8), o2(0xEC,0xFA),
+     o2(0xED,0xA1), o2(0xED,0xA2), o2(0xED,0xA3), o2(0xED,0xEE),
+     o2(0xEE,0xDB), o2(0xF2,0xBD), o2(0xF2,0xFA), o2(0xF3,0xB1),
+     o2(0xF4,0xA7),
+
+#define to_EUC_KR_EF_A7 WORDINDEX2INFO(10846)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EF_A7_infos,
+
+#define to_EUC_KR_EF_A8_infos WORDINDEX2INFO(10848)
+           INVALID, o2(0xF4,0xEE), o2(0xF6,0xF4), o2(0xF6,0xF6),
+     o2(0xF7,0xB8), o2(0xF7,0xC8), o2(0xF7,0xD3), o2(0xF8,0xDB),
+     o2(0xF8,0xF0), o2(0xFA,0xA1), o2(0xFA,0xA2), o2(0xFA,0xE6),
+     o2(0xFC,0xA9),         UNDEF,
+
+#define to_EUC_KR_EF_A8 WORDINDEX2INFO(10862)
+    to_EUC_KR_E2_95_offsets,
+    to_EUC_KR_EF_A8_infos,
+
+#define to_EUC_KR_EF_BC_infos WORDINDEX2INFO(10864)
+           INVALID,         UNDEF, o2(0xA3,0xA1), o2(0xA3,0xA2),
+     o2(0xA3,0xA3), o2(0xA3,0xA4), o2(0xA3,0xA5), o2(0xA3,0xA6),
+     o2(0xA3,0xA7), o2(0xA3,0xA8), o2(0xA3,0xA9), o2(0xA3,0xAA),
+     o2(0xA3,0xAB), o2(0xA3,0xAC), o2(0xA3,0xAD), o2(0xA3,0xAE),
+     o2(0xA3,0xAF), o2(0xA3,0xB0), o2(0xA3,0xB1), o2(0xA3,0xB2),
+     o2(0xA3,0xB3), o2(0xA3,0xB4), o2(0xA3,0xB5), o2(0xA3,0xB6),
+     o2(0xA3,0xB7), o2(0xA3,0xB8), o2(0xA3,0xB9), o2(0xA3,0xBA),
+     o2(0xA3,0xBB), o2(0xA3,0xBC), o2(0xA3,0xBD), o2(0xA3,0xBE),
+     o2(0xA3,0xBF), o2(0xA3,0xC0), o2(0xA3,0xC1), o2(0xA3,0xC2),
+     o2(0xA3,0xC3), o2(0xA3,0xC4), o2(0xA3,0xC5), o2(0xA3,0xC6),
+     o2(0xA3,0xC7), o2(0xA3,0xC8), o2(0xA3,0xC9), o2(0xA3,0xCA),
+     o2(0xA3,0xCB), o2(0xA3,0xCC), o2(0xA3,0xCD), o2(0xA3,0xCE),
+     o2(0xA3,0xCF), o2(0xA3,0xD0), o2(0xA3,0xD1), o2(0xA3,0xD2),
+     o2(0xA3,0xD3), o2(0xA3,0xD4), o2(0xA3,0xD5), o2(0xA3,0xD6),
+     o2(0xA3,0xD7), o2(0xA3,0xD8), o2(0xA3,0xD9), o2(0xA3,0xDA),
+     o2(0xA3,0xDB), o2(0xA1,0xAC), o2(0xA3,0xDD), o2(0xA3,0xDE),
+     o2(0xA3,0xDF),
+
+#define to_EUC_KR_EF_BC WORDINDEX2INFO(10929)
+    to_EUC_KR_E3_81_offsets,
+    to_EUC_KR_EF_BC_infos,
+
+#define to_EUC_KR_EF_BD_infos WORDINDEX2INFO(10931)
+           INVALID, o2(0xA3,0xE0), o2(0xA3,0xE1), o2(0xA3,0xE2),
+     o2(0xA3,0xE3), o2(0xA3,0xE4), o2(0xA3,0xE5), o2(0xA3,0xE6),
+     o2(0xA3,0xE7), o2(0xA3,0xE8), o2(0xA3,0xE9), o2(0xA3,0xEA),
+     o2(0xA3,0xEB), o2(0xA3,0xEC), o2(0xA3,0xED), o2(0xA3,0xEE),
+     o2(0xA3,0xEF), o2(0xA3,0xF0), o2(0xA3,0xF1), o2(0xA3,0xF2),
+     o2(0xA3,0xF3), o2(0xA3,0xF4), o2(0xA3,0xF5), o2(0xA3,0xF6),
+     o2(0xA3,0xF7), o2(0xA3,0xF8), o2(0xA3,0xF9), o2(0xA3,0xFA),
+     o2(0xA3,0xFB), o2(0xA3,0xFC), o2(0xA3,0xFD), o2(0xA2,0xA6),
+             UNDEF,
+
+#define to_EUC_KR_EF_BD WORDINDEX2INFO(10964)
+    to_EUC_KR_EF_BD_offsets,
+    to_EUC_KR_EF_BD_infos,
+
+#define to_EUC_KR_EF_BF_infos WORDINDEX2INFO(10966)
+           INVALID,         UNDEF, o2(0xA1,0xCB), o2(0xA1,0xCC),
+     o2(0xA1,0xFE), o2(0xA3,0xFE), o2(0xA1,0xCD), o2(0xA3,0xDC),
+
+#define to_EUC_KR_EF_BF WORDINDEX2INFO(10974)
+    to_EUC_KR_EF_BF_offsets,
+    to_EUC_KR_EF_BF_infos,
+
+#define to_EUC_KR_EF_infos WORDINDEX2INFO(10976)
+             INVALID,    to_EUC_KR_C6, to_EUC_KR_EF_A4, to_EUC_KR_EF_A5,
+     to_EUC_KR_EF_A6, to_EUC_KR_EF_A7, to_EUC_KR_EF_A8, to_EUC_KR_EF_BC,
+     to_EUC_KR_EF_BD, to_EUC_KR_EF_BF,
+
+#define to_EUC_KR_EF WORDINDEX2INFO(10986)
+    to_EUC_KR_EF_offsets,
+    to_EUC_KR_EF_infos,
+
+#define to_EUC_KR_F0_infos WORDINDEX2INFO(10988)
+          INVALID, to_EUC_KR_E1,
+
+#define to_EUC_KR_F0 WORDINDEX2INFO(10990)
+    to_EUC_KR_F0_offsets,
+    to_EUC_KR_F0_infos,
+
+#define to_EUC_KR_F1 WORDINDEX2INFO(10992)
+    to_EUC_KR_C6_offsets,
+    to_EUC_KR_F0_infos,
+
+#define to_EUC_KR_F4 WORDINDEX2INFO(10994)
+    to_EUC_KR_F4_offsets,
+    to_EUC_KR_F0_infos,
+
+#define to_EUC_KR_infos WORDINDEX2INFO(10996)
+            NOMAP,      INVALID, to_EUC_KR_C2, to_EUC_KR_C3,
+     to_EUC_KR_C4, to_EUC_KR_C5, to_EUC_KR_C6, to_EUC_KR_CB,
+     to_EUC_KR_CE, to_EUC_KR_CF, to_EUC_KR_D0, to_EUC_KR_D1,
+     to_EUC_KR_E0, to_EUC_KR_E1, to_EUC_KR_E2, to_EUC_KR_E3,
+     to_EUC_KR_E4, to_EUC_KR_E5, to_EUC_KR_E6, to_EUC_KR_E7,
+     to_EUC_KR_E8, to_EUC_KR_E9, to_EUC_KR_EA, to_EUC_KR_EB,
+     to_EUC_KR_EC, to_EUC_KR_ED, to_EUC_KR_EF, to_EUC_KR_F0,
+     to_EUC_KR_F1, to_EUC_KR_F4,
+
+#define to_EUC_KR WORDINDEX2INFO(11026)
+    to_EUC_KR_offsets,
+    to_EUC_KR_infos,
+
+#define from_EUC_KR_A1_infos WORDINDEX2INFO(11028)
+                INVALID, o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA8),
+     o3(0xE3,0x80,0x83),      o2(0xC2,0xAD),
+     o3(0xE2,0x80,0x95), o3(0xE2,0x88,0xA5),
+     o3(0xEF,0xBC,0xBC), o3(0xE2,0x88,0xBC),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xE2,0x89,0xA0),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x88,0x9E), o3(0xE2,0x88,0xB4),
+          o2(0xC2,0xB0), o3(0xE2,0x80,0xB2),
+     o3(0xE2,0x80,0xB3), o3(0xE2,0x84,0x83),
+     o3(0xE2,0x84,0xAB), o3(0xEF,0xBF,0xA0),
+     o3(0xEF,0xBF,0xA1), o3(0xEF,0xBF,0xA5),
+     o3(0xE2,0x99,0x82), o3(0xE2,0x99,0x80),
+     o3(0xE2,0x88,0xA0), o3(0xE2,0x8A,0xA5),
+     o3(0xE2,0x8C,0x92), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x87), o3(0xE2,0x89,0xA1),
+     o3(0xE2,0x89,0x92),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xBB), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87), o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE2,0x86,0x94), o3(0xE3,0x80,0x93),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+     o3(0xEF,0xBF,0xA2),
+
+#define from_EUC_KR_A1 WORDINDEX2INFO(11123)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_A1_infos,
+
+#define from_EUC_KR_A2_infos WORDINDEX2INFO(11125)
+                INVALID, o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x9E),      o2(0xCB,0x87),
+          o2(0xCB,0x98),      o2(0xCB,0x9D),
+          o2(0xCB,0x9A),      o2(0xCB,0x99),
+          o2(0xC2,0xB8),      o2(0xCB,0x9B),
+          o2(0xC2,0xA1),      o2(0xC2,0xBF),
+          o2(0xCB,0x90), o3(0xE2,0x88,0xAE),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xC2,0xA4), o3(0xE2,0x84,0x89),
+     o3(0xE2,0x80,0xB0), o3(0xE2,0x97,0x81),
+     o3(0xE2,0x97,0x80), o3(0xE2,0x96,0xB7),
+     o3(0xE2,0x96,0xB6), o3(0xE2,0x99,0xA4),
+     o3(0xE2,0x99,0xA0), o3(0xE2,0x99,0xA1),
+     o3(0xE2,0x99,0xA5), o3(0xE2,0x99,0xA7),
+     o3(0xE2,0x99,0xA3), o3(0xE2,0x8A,0x99),
+     o3(0xE2,0x97,0x88), o3(0xE2,0x96,0xA3),
+     o3(0xE2,0x97,0x90), o3(0xE2,0x97,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0xA4),
+     o3(0xE2,0x96,0xA5), o3(0xE2,0x96,0xA8),
+     o3(0xE2,0x96,0xA7), o3(0xE2,0x96,0xA6),
+     o3(0xE2,0x96,0xA9), o3(0xE2,0x99,0xA8),
+     o3(0xE2,0x98,0x8F), o3(0xE2,0x98,0x8E),
+     o3(0xE2,0x98,0x9C), o3(0xE2,0x98,0x9E),
+          o2(0xC2,0xB6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1), o3(0xE2,0x86,0x95),
+     o3(0xE2,0x86,0x97), o3(0xE2,0x86,0x99),
+     o3(0xE2,0x86,0x96), o3(0xE2,0x86,0x98),
+     o3(0xE2,0x99,0xAD), o3(0xE2,0x99,0xA9),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x99,0xAC),
+     o3(0xE3,0x89,0xBF), o3(0xE3,0x88,0x9C),
+     o3(0xE2,0x84,0x96), o3(0xE3,0x8F,0x87),
+     o3(0xE2,0x84,0xA2), o3(0xE3,0x8F,0x82),
+     o3(0xE3,0x8F,0x98), o3(0xE2,0x84,0xA1),
+                  UNDEF,
+
+#define from_EUC_KR_A2 WORDINDEX2INFO(11196)
+    from_EUC_KR_A2_offsets,
+    from_EUC_KR_A2_infos,
+
+#define from_EUC_KR_A3_infos WORDINDEX2INFO(11198)
+                INVALID, o3(0xEF,0xBC,0x81),
+     o3(0xEF,0xBC,0x82), o3(0xEF,0xBC,0x83),
+     o3(0xEF,0xBC,0x84), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x86), o3(0xEF,0xBC,0x87),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0x8B),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8D),
+     o3(0xEF,0xBC,0x8E), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0x90), o3(0xEF,0xBC,0x91),
+     o3(0xEF,0xBC,0x92), o3(0xEF,0xBC,0x93),
+     o3(0xEF,0xBC,0x94), o3(0xEF,0xBC,0x95),
+     o3(0xEF,0xBC,0x96), o3(0xEF,0xBC,0x97),
+     o3(0xEF,0xBC,0x98), o3(0xEF,0xBC,0x99),
+     o3(0xEF,0xBC,0x9A), o3(0xEF,0xBC,0x9B),
+     o3(0xEF,0xBC,0x9C), o3(0xEF,0xBC,0x9D),
+     o3(0xEF,0xBC,0x9E), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0xA0), o3(0xEF,0xBC,0xA1),
+     o3(0xEF,0xBC,0xA2), o3(0xEF,0xBC,0xA3),
+     o3(0xEF,0xBC,0xA4), o3(0xEF,0xBC,0xA5),
+     o3(0xEF,0xBC,0xA6), o3(0xEF,0xBC,0xA7),
+     o3(0xEF,0xBC,0xA8), o3(0xEF,0xBC,0xA9),
+     o3(0xEF,0xBC,0xAA), o3(0xEF,0xBC,0xAB),
+     o3(0xEF,0xBC,0xAC), o3(0xEF,0xBC,0xAD),
+     o3(0xEF,0xBC,0xAE), o3(0xEF,0xBC,0xAF),
+     o3(0xEF,0xBC,0xB0), o3(0xEF,0xBC,0xB1),
+     o3(0xEF,0xBC,0xB2), o3(0xEF,0xBC,0xB3),
+     o3(0xEF,0xBC,0xB4), o3(0xEF,0xBC,0xB5),
+     o3(0xEF,0xBC,0xB6), o3(0xEF,0xBC,0xB7),
+     o3(0xEF,0xBC,0xB8), o3(0xEF,0xBC,0xB9),
+     o3(0xEF,0xBC,0xBA), o3(0xEF,0xBC,0xBB),
+     o3(0xEF,0xBF,0xA6), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBC,0xBF),
+     o3(0xEF,0xBD,0x80), o3(0xEF,0xBD,0x81),
+     o3(0xEF,0xBD,0x82), o3(0xEF,0xBD,0x83),
+     o3(0xEF,0xBD,0x84), o3(0xEF,0xBD,0x85),
+     o3(0xEF,0xBD,0x86), o3(0xEF,0xBD,0x87),
+     o3(0xEF,0xBD,0x88), o3(0xEF,0xBD,0x89),
+     o3(0xEF,0xBD,0x8A), o3(0xEF,0xBD,0x8B),
+     o3(0xEF,0xBD,0x8C), o3(0xEF,0xBD,0x8D),
+     o3(0xEF,0xBD,0x8E), o3(0xEF,0xBD,0x8F),
+     o3(0xEF,0xBD,0x90), o3(0xEF,0xBD,0x91),
+     o3(0xEF,0xBD,0x92), o3(0xEF,0xBD,0x93),
+     o3(0xEF,0xBD,0x94), o3(0xEF,0xBD,0x95),
+     o3(0xEF,0xBD,0x96), o3(0xEF,0xBD,0x97),
+     o3(0xEF,0xBD,0x98), o3(0xEF,0xBD,0x99),
+     o3(0xEF,0xBD,0x9A), o3(0xEF,0xBD,0x9B),
+     o3(0xEF,0xBD,0x9C), o3(0xEF,0xBD,0x9D),
+     o3(0xEF,0xBF,0xA3),
+
+#define from_EUC_KR_A3 WORDINDEX2INFO(11293)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_A3_infos,
+
+#define from_EUC_KR_A4_infos WORDINDEX2INFO(11295)
+                INVALID, o3(0xE3,0x84,0xB1),
+     o3(0xE3,0x84,0xB2), o3(0xE3,0x84,0xB3),
+     o3(0xE3,0x84,0xB4), o3(0xE3,0x84,0xB5),
+     o3(0xE3,0x84,0xB6), o3(0xE3,0x84,0xB7),
+     o3(0xE3,0x84,0xB8), o3(0xE3,0x84,0xB9),
+     o3(0xE3,0x84,0xBA), o3(0xE3,0x84,0xBB),
+     o3(0xE3,0x84,0xBC), o3(0xE3,0x84,0xBD),
+     o3(0xE3,0x84,0xBE), o3(0xE3,0x84,0xBF),
+     o3(0xE3,0x85,0x80), o3(0xE3,0x85,0x81),
+     o3(0xE3,0x85,0x82), o3(0xE3,0x85,0x83),
+     o3(0xE3,0x85,0x84), o3(0xE3,0x85,0x85),
+     o3(0xE3,0x85,0x86), o3(0xE3,0x85,0x87),
+     o3(0xE3,0x85,0x88), o3(0xE3,0x85,0x89),
+     o3(0xE3,0x85,0x8A), o3(0xE3,0x85,0x8B),
+     o3(0xE3,0x85,0x8C), o3(0xE3,0x85,0x8D),
+     o3(0xE3,0x85,0x8E), o3(0xE3,0x85,0x8F),
+     o3(0xE3,0x85,0x90), o3(0xE3,0x85,0x91),
+     o3(0xE3,0x85,0x92), o3(0xE3,0x85,0x93),
+     o3(0xE3,0x85,0x94), o3(0xE3,0x85,0x95),
+     o3(0xE3,0x85,0x96), o3(0xE3,0x85,0x97),
+     o3(0xE3,0x85,0x98), o3(0xE3,0x85,0x99),
+     o3(0xE3,0x85,0x9A), o3(0xE3,0x85,0x9B),
+     o3(0xE3,0x85,0x9C), o3(0xE3,0x85,0x9D),
+     o3(0xE3,0x85,0x9E), o3(0xE3,0x85,0x9F),
+     o3(0xE3,0x85,0xA0), o3(0xE3,0x85,0xA1),
+     o3(0xE3,0x85,0xA2), o3(0xE3,0x85,0xA3),
+     o3(0xE3,0x85,0xA4), o3(0xE3,0x85,0xA5),
+     o3(0xE3,0x85,0xA6), o3(0xE3,0x85,0xA7),
+     o3(0xE3,0x85,0xA8), o3(0xE3,0x85,0xA9),
+     o3(0xE3,0x85,0xAA), o3(0xE3,0x85,0xAB),
+     o3(0xE3,0x85,0xAC), o3(0xE3,0x85,0xAD),
+     o3(0xE3,0x85,0xAE), o3(0xE3,0x85,0xAF),
+     o3(0xE3,0x85,0xB0), o3(0xE3,0x85,0xB1),
+     o3(0xE3,0x85,0xB2), o3(0xE3,0x85,0xB3),
+     o3(0xE3,0x85,0xB4), o3(0xE3,0x85,0xB5),
+     o3(0xE3,0x85,0xB6), o3(0xE3,0x85,0xB7),
+     o3(0xE3,0x85,0xB8), o3(0xE3,0x85,0xB9),
+     o3(0xE3,0x85,0xBA), o3(0xE3,0x85,0xBB),
+     o3(0xE3,0x85,0xBC), o3(0xE3,0x85,0xBD),
+     o3(0xE3,0x85,0xBE), o3(0xE3,0x85,0xBF),
+     o3(0xE3,0x86,0x80), o3(0xE3,0x86,0x81),
+     o3(0xE3,0x86,0x82), o3(0xE3,0x86,0x83),
+     o3(0xE3,0x86,0x84), o3(0xE3,0x86,0x85),
+     o3(0xE3,0x86,0x86), o3(0xE3,0x86,0x87),
+     o3(0xE3,0x86,0x88), o3(0xE3,0x86,0x89),
+     o3(0xE3,0x86,0x8A), o3(0xE3,0x86,0x8B),
+     o3(0xE3,0x86,0x8C), o3(0xE3,0x86,0x8D),
+     o3(0xE3,0x86,0x8E),
+
+#define from_EUC_KR_A4 WORDINDEX2INFO(11390)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_A4_infos,
+
+#define from_EUC_KR_A5_infos WORDINDEX2INFO(11392)
+                INVALID, o3(0xE2,0x85,0xB0),
+     o3(0xE2,0x85,0xB1), o3(0xE2,0x85,0xB2),
+     o3(0xE2,0x85,0xB3), o3(0xE2,0x85,0xB4),
+     o3(0xE2,0x85,0xB5), o3(0xE2,0x85,0xB6),
+     o3(0xE2,0x85,0xB7), o3(0xE2,0x85,0xB8),
+     o3(0xE2,0x85,0xB9),              UNDEF,
+     o3(0xE2,0x85,0xA0), o3(0xE2,0x85,0xA1),
+     o3(0xE2,0x85,0xA2), o3(0xE2,0x85,0xA3),
+     o3(0xE2,0x85,0xA4), o3(0xE2,0x85,0xA5),
+     o3(0xE2,0x85,0xA6), o3(0xE2,0x85,0xA7),
+     o3(0xE2,0x85,0xA8), o3(0xE2,0x85,0xA9),
+          o2(0xCE,0x91),      o2(0xCE,0x92),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x95),      o2(0xCE,0x96),
+          o2(0xCE,0x97),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9B),      o2(0xCE,0x9C),
+          o2(0xCE,0x9D),      o2(0xCE,0x9E),
+          o2(0xCE,0x9F),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1),      o2(0xCE,0xA3),
+          o2(0xCE,0xA4),      o2(0xCE,0xA5),
+          o2(0xCE,0xA6),      o2(0xCE,0xA7),
+          o2(0xCE,0xA8),      o2(0xCE,0xA9),
+          o2(0xCE,0xB1),      o2(0xCE,0xB2),
+          o2(0xCE,0xB3),      o2(0xCE,0xB4),
+          o2(0xCE,0xB5),      o2(0xCE,0xB6),
+          o2(0xCE,0xB7),      o2(0xCE,0xB8),
+          o2(0xCE,0xB9),      o2(0xCE,0xBA),
+          o2(0xCE,0xBB),      o2(0xCE,0xBC),
+          o2(0xCE,0xBD),      o2(0xCE,0xBE),
+          o2(0xCE,0xBF),      o2(0xCF,0x80),
+          o2(0xCF,0x81),      o2(0xCF,0x83),
+          o2(0xCF,0x84),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xCF,0x88),      o2(0xCF,0x89),
+
+#define from_EUC_KR_A5 WORDINDEX2INFO(11462)
+    from_EUC_KR_A5_offsets,
+    from_EUC_KR_A5_infos,
+
+#define from_EUC_KR_A6_infos WORDINDEX2INFO(11464)
+                INVALID, o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x98),
+     o3(0xE2,0x94,0x94), o3(0xE2,0x94,0x9C),
+     o3(0xE2,0x94,0xAC), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xBC),
+     o3(0xE2,0x94,0x81), o3(0xE2,0x94,0x83),
+     o3(0xE2,0x94,0x8F), o3(0xE2,0x94,0x93),
+     o3(0xE2,0x94,0x9B), o3(0xE2,0x94,0x97),
+     o3(0xE2,0x94,0xA3), o3(0xE2,0x94,0xB3),
+     o3(0xE2,0x94,0xAB), o3(0xE2,0x94,0xBB),
+     o3(0xE2,0x95,0x8B), o3(0xE2,0x94,0xA0),
+     o3(0xE2,0x94,0xAF), o3(0xE2,0x94,0xA8),
+     o3(0xE2,0x94,0xB7), o3(0xE2,0x94,0xBF),
+     o3(0xE2,0x94,0x9D), o3(0xE2,0x94,0xB0),
+     o3(0xE2,0x94,0xA5), o3(0xE2,0x94,0xB8),
+     o3(0xE2,0x95,0x82), o3(0xE2,0x94,0x92),
+     o3(0xE2,0x94,0x91), o3(0xE2,0x94,0x9A),
+     o3(0xE2,0x94,0x99), o3(0xE2,0x94,0x96),
+     o3(0xE2,0x94,0x95), o3(0xE2,0x94,0x8E),
+     o3(0xE2,0x94,0x8D), o3(0xE2,0x94,0x9E),
+     o3(0xE2,0x94,0x9F), o3(0xE2,0x94,0xA1),
+     o3(0xE2,0x94,0xA2), o3(0xE2,0x94,0xA6),
+     o3(0xE2,0x94,0xA7), o3(0xE2,0x94,0xA9),
+     o3(0xE2,0x94,0xAA), o3(0xE2,0x94,0xAD),
+     o3(0xE2,0x94,0xAE), o3(0xE2,0x94,0xB1),
+     o3(0xE2,0x94,0xB2), o3(0xE2,0x94,0xB5),
+     o3(0xE2,0x94,0xB6), o3(0xE2,0x94,0xB9),
+     o3(0xE2,0x94,0xBA), o3(0xE2,0x94,0xBD),
+     o3(0xE2,0x94,0xBE), o3(0xE2,0x95,0x80),
+     o3(0xE2,0x95,0x81), o3(0xE2,0x95,0x83),
+     o3(0xE2,0x95,0x84), o3(0xE2,0x95,0x85),
+     o3(0xE2,0x95,0x86), o3(0xE2,0x95,0x87),
+     o3(0xE2,0x95,0x88), o3(0xE2,0x95,0x89),
+     o3(0xE2,0x95,0x8A),              UNDEF,
+
+#define from_EUC_KR_A6 WORDINDEX2INFO(11534)
+    from_EUC_KR_A6_offsets,
+    from_EUC_KR_A6_infos,
+
+#define from_EUC_KR_A7_infos WORDINDEX2INFO(11536)
+                INVALID, o3(0xE3,0x8E,0x95),
+     o3(0xE3,0x8E,0x96), o3(0xE3,0x8E,0x97),
+     o3(0xE2,0x84,0x93), o3(0xE3,0x8E,0x98),
+     o3(0xE3,0x8F,0x84), o3(0xE3,0x8E,0xA3),
+     o3(0xE3,0x8E,0xA4), o3(0xE3,0x8E,0xA5),
+     o3(0xE3,0x8E,0xA6), o3(0xE3,0x8E,0x99),
+     o3(0xE3,0x8E,0x9A), o3(0xE3,0x8E,0x9B),
+     o3(0xE3,0x8E,0x9C), o3(0xE3,0x8E,0x9D),
+     o3(0xE3,0x8E,0x9E), o3(0xE3,0x8E,0x9F),
+     o3(0xE3,0x8E,0xA0), o3(0xE3,0x8E,0xA1),
+     o3(0xE3,0x8E,0xA2), o3(0xE3,0x8F,0x8A),
+     o3(0xE3,0x8E,0x8D), o3(0xE3,0x8E,0x8E),
+     o3(0xE3,0x8E,0x8F), o3(0xE3,0x8F,0x8F),
+     o3(0xE3,0x8E,0x88), o3(0xE3,0x8E,0x89),
+     o3(0xE3,0x8F,0x88), o3(0xE3,0x8E,0xA7),
+     o3(0xE3,0x8E,0xA8), o3(0xE3,0x8E,0xB0),
+     o3(0xE3,0x8E,0xB1), o3(0xE3,0x8E,0xB2),
+     o3(0xE3,0x8E,0xB3), o3(0xE3,0x8E,0xB4),
+     o3(0xE3,0x8E,0xB5), o3(0xE3,0x8E,0xB6),
+     o3(0xE3,0x8E,0xB7), o3(0xE3,0x8E,0xB8),
+     o3(0xE3,0x8E,0xB9), o3(0xE3,0x8E,0x80),
+     o3(0xE3,0x8E,0x81), o3(0xE3,0x8E,0x82),
+     o3(0xE3,0x8E,0x83), o3(0xE3,0x8E,0x84),
+     o3(0xE3,0x8E,0xBA), o3(0xE3,0x8E,0xBB),
+     o3(0xE3,0x8E,0xBC), o3(0xE3,0x8E,0xBD),
+     o3(0xE3,0x8E,0xBE), o3(0xE3,0x8E,0xBF),
+     o3(0xE3,0x8E,0x90), o3(0xE3,0x8E,0x91),
+     o3(0xE3,0x8E,0x92), o3(0xE3,0x8E,0x93),
+     o3(0xE3,0x8E,0x94), o3(0xE2,0x84,0xA6),
+     o3(0xE3,0x8F,0x80), o3(0xE3,0x8F,0x81),
+     o3(0xE3,0x8E,0x8A), o3(0xE3,0x8E,0x8B),
+     o3(0xE3,0x8E,0x8C), o3(0xE3,0x8F,0x96),
+     o3(0xE3,0x8F,0x85), o3(0xE3,0x8E,0xAD),
+     o3(0xE3,0x8E,0xAE), o3(0xE3,0x8E,0xAF),
+     o3(0xE3,0x8F,0x9B), o3(0xE3,0x8E,0xA9),
+     o3(0xE3,0x8E,0xAA), o3(0xE3,0x8E,0xAB),
+     o3(0xE3,0x8E,0xAC), o3(0xE3,0x8F,0x9D),
+     o3(0xE3,0x8F,0x90), o3(0xE3,0x8F,0x93),
+     o3(0xE3,0x8F,0x83), o3(0xE3,0x8F,0x89),
+     o3(0xE3,0x8F,0x9C), o3(0xE3,0x8F,0x86),
+                  UNDEF,
+
+#define from_EUC_KR_A7 WORDINDEX2INFO(11617)
+    from_EUC_KR_A7_offsets,
+    from_EUC_KR_A7_infos,
+
+#define from_EUC_KR_A8_infos WORDINDEX2INFO(11619)
+                INVALID,      o2(0xC3,0x86),
+          o2(0xC3,0x90),      o2(0xC2,0xAA),
+          o2(0xC4,0xA6),              UNDEF,
+          o2(0xC4,0xB2),      o2(0xC4,0xBF),
+          o2(0xC5,0x81),      o2(0xC3,0x98),
+          o2(0xC5,0x92),      o2(0xC2,0xBA),
+          o2(0xC3,0x9E),      o2(0xC5,0xA6),
+          o2(0xC5,0x8A), o3(0xE3,0x89,0xA0),
+     o3(0xE3,0x89,0xA1), o3(0xE3,0x89,0xA2),
+     o3(0xE3,0x89,0xA3), o3(0xE3,0x89,0xA4),
+     o3(0xE3,0x89,0xA5), o3(0xE3,0x89,0xA6),
+     o3(0xE3,0x89,0xA7), o3(0xE3,0x89,0xA8),
+     o3(0xE3,0x89,0xA9), o3(0xE3,0x89,0xAA),
+     o3(0xE3,0x89,0xAB), o3(0xE3,0x89,0xAC),
+     o3(0xE3,0x89,0xAD), o3(0xE3,0x89,0xAE),
+     o3(0xE3,0x89,0xAF), o3(0xE3,0x89,0xB0),
+     o3(0xE3,0x89,0xB1), o3(0xE3,0x89,0xB2),
+     o3(0xE3,0x89,0xB3), o3(0xE3,0x89,0xB4),
+     o3(0xE3,0x89,0xB5), o3(0xE3,0x89,0xB6),
+     o3(0xE3,0x89,0xB7), o3(0xE3,0x89,0xB8),
+     o3(0xE3,0x89,0xB9), o3(0xE3,0x89,0xBA),
+     o3(0xE3,0x89,0xBB), o3(0xE2,0x93,0x90),
+     o3(0xE2,0x93,0x91), o3(0xE2,0x93,0x92),
+     o3(0xE2,0x93,0x93), o3(0xE2,0x93,0x94),
+     o3(0xE2,0x93,0x95), o3(0xE2,0x93,0x96),
+     o3(0xE2,0x93,0x97), o3(0xE2,0x93,0x98),
+     o3(0xE2,0x93,0x99), o3(0xE2,0x93,0x9A),
+     o3(0xE2,0x93,0x9B), o3(0xE2,0x93,0x9C),
+     o3(0xE2,0x93,0x9D), o3(0xE2,0x93,0x9E),
+     o3(0xE2,0x93,0x9F), o3(0xE2,0x93,0xA0),
+     o3(0xE2,0x93,0xA1), o3(0xE2,0x93,0xA2),
+     o3(0xE2,0x93,0xA3), o3(0xE2,0x93,0xA4),
+     o3(0xE2,0x93,0xA5), o3(0xE2,0x93,0xA6),
+     o3(0xE2,0x93,0xA7), o3(0xE2,0x93,0xA8),
+     o3(0xE2,0x93,0xA9), o3(0xE2,0x91,0xA0),
+     o3(0xE2,0x91,0xA1), o3(0xE2,0x91,0xA2),
+     o3(0xE2,0x91,0xA3), o3(0xE2,0x91,0xA4),
+     o3(0xE2,0x91,0xA5), o3(0xE2,0x91,0xA6),
+     o3(0xE2,0x91,0xA7), o3(0xE2,0x91,0xA8),
+     o3(0xE2,0x91,0xA9), o3(0xE2,0x91,0xAA),
+     o3(0xE2,0x91,0xAB), o3(0xE2,0x91,0xAC),
+     o3(0xE2,0x91,0xAD), o3(0xE2,0x91,0xAE),
+          o2(0xC2,0xBD), o3(0xE2,0x85,0x93),
+     o3(0xE2,0x85,0x94),      o2(0xC2,0xBC),
+          o2(0xC2,0xBE), o3(0xE2,0x85,0x9B),
+     o3(0xE2,0x85,0x9C), o3(0xE2,0x85,0x9D),
+     o3(0xE2,0x85,0x9E),
+
+#define from_EUC_KR_A8 WORDINDEX2INFO(11712)
+    from_EUC_KR_A8_offsets,
+    from_EUC_KR_A8_infos,
+
+#define from_EUC_KR_A9_infos WORDINDEX2INFO(11714)
+                INVALID,      o2(0xC3,0xA6),
+          o2(0xC4,0x91),      o2(0xC3,0xB0),
+          o2(0xC4,0xA7),      o2(0xC4,0xB1),
+          o2(0xC4,0xB3),      o2(0xC4,0xB8),
+          o2(0xC5,0x80),      o2(0xC5,0x82),
+          o2(0xC3,0xB8),      o2(0xC5,0x93),
+          o2(0xC3,0x9F),      o2(0xC3,0xBE),
+          o2(0xC5,0xA7),      o2(0xC5,0x8B),
+          o2(0xC5,0x89), o3(0xE3,0x88,0x80),
+     o3(0xE3,0x88,0x81), o3(0xE3,0x88,0x82),
+     o3(0xE3,0x88,0x83), o3(0xE3,0x88,0x84),
+     o3(0xE3,0x88,0x85), o3(0xE3,0x88,0x86),
+     o3(0xE3,0x88,0x87), o3(0xE3,0x88,0x88),
+     o3(0xE3,0x88,0x89), o3(0xE3,0x88,0x8A),
+     o3(0xE3,0x88,0x8B), o3(0xE3,0x88,0x8C),
+     o3(0xE3,0x88,0x8D), o3(0xE3,0x88,0x8E),
+     o3(0xE3,0x88,0x8F), o3(0xE3,0x88,0x90),
+     o3(0xE3,0x88,0x91), o3(0xE3,0x88,0x92),
+     o3(0xE3,0x88,0x93), o3(0xE3,0x88,0x94),
+     o3(0xE3,0x88,0x95), o3(0xE3,0x88,0x96),
+     o3(0xE3,0x88,0x97), o3(0xE3,0x88,0x98),
+     o3(0xE3,0x88,0x99), o3(0xE3,0x88,0x9A),
+     o3(0xE3,0x88,0x9B), o3(0xE2,0x92,0x9C),
+     o3(0xE2,0x92,0x9D), o3(0xE2,0x92,0x9E),
+     o3(0xE2,0x92,0x9F), o3(0xE2,0x92,0xA0),
+     o3(0xE2,0x92,0xA1), o3(0xE2,0x92,0xA2),
+     o3(0xE2,0x92,0xA3), o3(0xE2,0x92,0xA4),
+     o3(0xE2,0x92,0xA5), o3(0xE2,0x92,0xA6),
+     o3(0xE2,0x92,0xA7), o3(0xE2,0x92,0xA8),
+     o3(0xE2,0x92,0xA9), o3(0xE2,0x92,0xAA),
+     o3(0xE2,0x92,0xAB), o3(0xE2,0x92,0xAC),
+     o3(0xE2,0x92,0xAD), o3(0xE2,0x92,0xAE),
+     o3(0xE2,0x92,0xAF), o3(0xE2,0x92,0xB0),
+     o3(0xE2,0x92,0xB1), o3(0xE2,0x92,0xB2),
+     o3(0xE2,0x92,0xB3), o3(0xE2,0x92,0xB4),
+     o3(0xE2,0x92,0xB5), o3(0xE2,0x91,0xB4),
+     o3(0xE2,0x91,0xB5), o3(0xE2,0x91,0xB6),
+     o3(0xE2,0x91,0xB7), o3(0xE2,0x91,0xB8),
+     o3(0xE2,0x91,0xB9), o3(0xE2,0x91,0xBA),
+     o3(0xE2,0x91,0xBB), o3(0xE2,0x91,0xBC),
+     o3(0xE2,0x91,0xBD), o3(0xE2,0x91,0xBE),
+     o3(0xE2,0x91,0xBF), o3(0xE2,0x92,0x80),
+     o3(0xE2,0x92,0x81), o3(0xE2,0x92,0x82),
+          o2(0xC2,0xB9),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3), o3(0xE2,0x81,0xB4),
+     o3(0xE2,0x81,0xBF), o3(0xE2,0x82,0x81),
+     o3(0xE2,0x82,0x82), o3(0xE2,0x82,0x83),
+     o3(0xE2,0x82,0x84),
+
+#define from_EUC_KR_A9 WORDINDEX2INFO(11809)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_A9_infos,
+
+#define from_EUC_KR_AA_infos WORDINDEX2INFO(11811)
+                INVALID, o3(0xE3,0x81,0x81),
+     o3(0xE3,0x81,0x82), o3(0xE3,0x81,0x83),
+     o3(0xE3,0x81,0x84), o3(0xE3,0x81,0x85),
+     o3(0xE3,0x81,0x86), o3(0xE3,0x81,0x87),
+     o3(0xE3,0x81,0x88), o3(0xE3,0x81,0x89),
+     o3(0xE3,0x81,0x8A), o3(0xE3,0x81,0x8B),
+     o3(0xE3,0x81,0x8C), o3(0xE3,0x81,0x8D),
+     o3(0xE3,0x81,0x8E), o3(0xE3,0x81,0x8F),
+     o3(0xE3,0x81,0x90), o3(0xE3,0x81,0x91),
+     o3(0xE3,0x81,0x92), o3(0xE3,0x81,0x93),
+     o3(0xE3,0x81,0x94), o3(0xE3,0x81,0x95),
+     o3(0xE3,0x81,0x96), o3(0xE3,0x81,0x97),
+     o3(0xE3,0x81,0x98), o3(0xE3,0x81,0x99),
+     o3(0xE3,0x81,0x9A), o3(0xE3,0x81,0x9B),
+     o3(0xE3,0x81,0x9C), o3(0xE3,0x81,0x9D),
+     o3(0xE3,0x81,0x9E), o3(0xE3,0x81,0x9F),
+     o3(0xE3,0x81,0xA0), o3(0xE3,0x81,0xA1),
+     o3(0xE3,0x81,0xA2), o3(0xE3,0x81,0xA3),
+     o3(0xE3,0x81,0xA4), o3(0xE3,0x81,0xA5),
+     o3(0xE3,0x81,0xA6), o3(0xE3,0x81,0xA7),
+     o3(0xE3,0x81,0xA8), o3(0xE3,0x81,0xA9),
+     o3(0xE3,0x81,0xAA), o3(0xE3,0x81,0xAB),
+     o3(0xE3,0x81,0xAC), o3(0xE3,0x81,0xAD),
+     o3(0xE3,0x81,0xAE), o3(0xE3,0x81,0xAF),
+     o3(0xE3,0x81,0xB0), o3(0xE3,0x81,0xB1),
+     o3(0xE3,0x81,0xB2), o3(0xE3,0x81,0xB3),
+     o3(0xE3,0x81,0xB4), o3(0xE3,0x81,0xB5),
+     o3(0xE3,0x81,0xB6), o3(0xE3,0x81,0xB7),
+     o3(0xE3,0x81,0xB8), o3(0xE3,0x81,0xB9),
+     o3(0xE3,0x81,0xBA), o3(0xE3,0x81,0xBB),
+     o3(0xE3,0x81,0xBC), o3(0xE3,0x81,0xBD),
+     o3(0xE3,0x81,0xBE), o3(0xE3,0x81,0xBF),
+     o3(0xE3,0x82,0x80), o3(0xE3,0x82,0x81),
+     o3(0xE3,0x82,0x82), o3(0xE3,0x82,0x83),
+     o3(0xE3,0x82,0x84), o3(0xE3,0x82,0x85),
+     o3(0xE3,0x82,0x86), o3(0xE3,0x82,0x87),
+     o3(0xE3,0x82,0x88), o3(0xE3,0x82,0x89),
+     o3(0xE3,0x82,0x8A), o3(0xE3,0x82,0x8B),
+     o3(0xE3,0x82,0x8C), o3(0xE3,0x82,0x8D),
+     o3(0xE3,0x82,0x8E), o3(0xE3,0x82,0x8F),
+     o3(0xE3,0x82,0x90), o3(0xE3,0x82,0x91),
+     o3(0xE3,0x82,0x92), o3(0xE3,0x82,0x93),
+                  UNDEF,
+
+#define from_EUC_KR_AA WORDINDEX2INFO(11896)
+    from_EUC_KR_AA_offsets,
+    from_EUC_KR_AA_infos,
+
+#define from_EUC_KR_AB_infos WORDINDEX2INFO(11898)
+                INVALID, o3(0xE3,0x82,0xA1),
+     o3(0xE3,0x82,0xA2), o3(0xE3,0x82,0xA3),
+     o3(0xE3,0x82,0xA4), o3(0xE3,0x82,0xA5),
+     o3(0xE3,0x82,0xA6), o3(0xE3,0x82,0xA7),
+     o3(0xE3,0x82,0xA8), o3(0xE3,0x82,0xA9),
+     o3(0xE3,0x82,0xAA), o3(0xE3,0x82,0xAB),
+     o3(0xE3,0x82,0xAC), o3(0xE3,0x82,0xAD),
+     o3(0xE3,0x82,0xAE), o3(0xE3,0x82,0xAF),
+     o3(0xE3,0x82,0xB0), o3(0xE3,0x82,0xB1),
+     o3(0xE3,0x82,0xB2), o3(0xE3,0x82,0xB3),
+     o3(0xE3,0x82,0xB4), o3(0xE3,0x82,0xB5),
+     o3(0xE3,0x82,0xB6), o3(0xE3,0x82,0xB7),
+     o3(0xE3,0x82,0xB8), o3(0xE3,0x82,0xB9),
+     o3(0xE3,0x82,0xBA), o3(0xE3,0x82,0xBB),
+     o3(0xE3,0x82,0xBC), o3(0xE3,0x82,0xBD),
+     o3(0xE3,0x82,0xBE), o3(0xE3,0x82,0xBF),
+     o3(0xE3,0x83,0x80), o3(0xE3,0x83,0x81),
+     o3(0xE3,0x83,0x82), o3(0xE3,0x83,0x83),
+     o3(0xE3,0x83,0x84), o3(0xE3,0x83,0x85),
+     o3(0xE3,0x83,0x86), o3(0xE3,0x83,0x87),
+     o3(0xE3,0x83,0x88), o3(0xE3,0x83,0x89),
+     o3(0xE3,0x83,0x8A), o3(0xE3,0x83,0x8B),
+     o3(0xE3,0x83,0x8C), o3(0xE3,0x83,0x8D),
+     o3(0xE3,0x83,0x8E), o3(0xE3,0x83,0x8F),
+     o3(0xE3,0x83,0x90), o3(0xE3,0x83,0x91),
+     o3(0xE3,0x83,0x92), o3(0xE3,0x83,0x93),
+     o3(0xE3,0x83,0x94), o3(0xE3,0x83,0x95),
+     o3(0xE3,0x83,0x96), o3(0xE3,0x83,0x97),
+     o3(0xE3,0x83,0x98), o3(0xE3,0x83,0x99),
+     o3(0xE3,0x83,0x9A), o3(0xE3,0x83,0x9B),
+     o3(0xE3,0x83,0x9C), o3(0xE3,0x83,0x9D),
+     o3(0xE3,0x83,0x9E), o3(0xE3,0x83,0x9F),
+     o3(0xE3,0x83,0xA0), o3(0xE3,0x83,0xA1),
+     o3(0xE3,0x83,0xA2), o3(0xE3,0x83,0xA3),
+     o3(0xE3,0x83,0xA4), o3(0xE3,0x83,0xA5),
+     o3(0xE3,0x83,0xA6), o3(0xE3,0x83,0xA7),
+     o3(0xE3,0x83,0xA8), o3(0xE3,0x83,0xA9),
+     o3(0xE3,0x83,0xAA), o3(0xE3,0x83,0xAB),
+     o3(0xE3,0x83,0xAC), o3(0xE3,0x83,0xAD),
+     o3(0xE3,0x83,0xAE), o3(0xE3,0x83,0xAF),
+     o3(0xE3,0x83,0xB0), o3(0xE3,0x83,0xB1),
+     o3(0xE3,0x83,0xB2), o3(0xE3,0x83,0xB3),
+     o3(0xE3,0x83,0xB4), o3(0xE3,0x83,0xB5),
+     o3(0xE3,0x83,0xB6),              UNDEF,
+
+#define from_EUC_KR_AB WORDINDEX2INFO(11986)
+    from_EUC_KR_AB_offsets,
+    from_EUC_KR_AB_infos,
+
+#define from_EUC_KR_AC_infos WORDINDEX2INFO(11988)
+           INVALID, o2(0xD0,0x90), o2(0xD0,0x91), o2(0xD0,0x92),
+     o2(0xD0,0x93), o2(0xD0,0x94), o2(0xD0,0x95), o2(0xD0,0x81),
+     o2(0xD0,0x96), o2(0xD0,0x97), o2(0xD0,0x98), o2(0xD0,0x99),
+     o2(0xD0,0x9A), o2(0xD0,0x9B), o2(0xD0,0x9C), o2(0xD0,0x9D),
+     o2(0xD0,0x9E), o2(0xD0,0x9F), o2(0xD0,0xA0), o2(0xD0,0xA1),
+     o2(0xD0,0xA2), o2(0xD0,0xA3), o2(0xD0,0xA4), o2(0xD0,0xA5),
+     o2(0xD0,0xA6), o2(0xD0,0xA7), o2(0xD0,0xA8), o2(0xD0,0xA9),
+     o2(0xD0,0xAA), o2(0xD0,0xAB), o2(0xD0,0xAC), o2(0xD0,0xAD),
+     o2(0xD0,0xAE), o2(0xD0,0xAF),         UNDEF, o2(0xD0,0xB0),
+     o2(0xD0,0xB1), o2(0xD0,0xB2), o2(0xD0,0xB3), o2(0xD0,0xB4),
+     o2(0xD0,0xB5), o2(0xD1,0x91), o2(0xD0,0xB6), o2(0xD0,0xB7),
+     o2(0xD0,0xB8), o2(0xD0,0xB9), o2(0xD0,0xBA), o2(0xD0,0xBB),
+     o2(0xD0,0xBC), o2(0xD0,0xBD), o2(0xD0,0xBE), o2(0xD0,0xBF),
+     o2(0xD1,0x80), o2(0xD1,0x81), o2(0xD1,0x82), o2(0xD1,0x83),
+     o2(0xD1,0x84), o2(0xD1,0x85), o2(0xD1,0x86), o2(0xD1,0x87),
+     o2(0xD1,0x88), o2(0xD1,0x89), o2(0xD1,0x8A), o2(0xD1,0x8B),
+     o2(0xD1,0x8C), o2(0xD1,0x8D), o2(0xD1,0x8E), o2(0xD1,0x8F),
+
+#define from_EUC_KR_AC WORDINDEX2INFO(12056)
+    from_EUC_KR_AC_offsets,
+    from_EUC_KR_AC_infos,
+
+#define from_EUC_KR_AD WORDINDEX2INFO(12058)
+    from_EUC_KR_AD_offsets,
+    to_EUC_KR_C6_infos,
+
+#define from_EUC_KR_B0_infos WORDINDEX2INFO(12060)
+                INVALID, o3(0xEA,0xB0,0x80),
+     o3(0xEA,0xB0,0x81), o3(0xEA,0xB0,0x84),
+     o3(0xEA,0xB0,0x87), o3(0xEA,0xB0,0x88),
+     o3(0xEA,0xB0,0x89), o3(0xEA,0xB0,0x8A),
+     o3(0xEA,0xB0,0x90), o3(0xEA,0xB0,0x91),
+     o3(0xEA,0xB0,0x92), o3(0xEA,0xB0,0x93),
+     o3(0xEA,0xB0,0x94), o3(0xEA,0xB0,0x95),
+     o3(0xEA,0xB0,0x96), o3(0xEA,0xB0,0x97),
+     o3(0xEA,0xB0,0x99), o3(0xEA,0xB0,0x9A),
+     o3(0xEA,0xB0,0x9B), o3(0xEA,0xB0,0x9C),
+     o3(0xEA,0xB0,0x9D), o3(0xEA,0xB0,0xA0),
+     o3(0xEA,0xB0,0xA4), o3(0xEA,0xB0,0xAC),
+     o3(0xEA,0xB0,0xAD), o3(0xEA,0xB0,0xAF),
+     o3(0xEA,0xB0,0xB0), o3(0xEA,0xB0,0xB1),
+     o3(0xEA,0xB0,0xB8), o3(0xEA,0xB0,0xB9),
+     o3(0xEA,0xB0,0xBC), o3(0xEA,0xB1,0x80),
+     o3(0xEA,0xB1,0x8B), o3(0xEA,0xB1,0x8D),
+     o3(0xEA,0xB1,0x94), o3(0xEA,0xB1,0x98),
+     o3(0xEA,0xB1,0x9C), o3(0xEA,0xB1,0xB0),
+     o3(0xEA,0xB1,0xB1), o3(0xEA,0xB1,0xB4),
+     o3(0xEA,0xB1,0xB7), o3(0xEA,0xB1,0xB8),
+     o3(0xEA,0xB1,0xBA), o3(0xEA,0xB2,0x80),
+     o3(0xEA,0xB2,0x81), o3(0xEA,0xB2,0x83),
+     o3(0xEA,0xB2,0x84), o3(0xEA,0xB2,0x85),
+     o3(0xEA,0xB2,0x86), o3(0xEA,0xB2,0x89),
+     o3(0xEA,0xB2,0x8A), o3(0xEA,0xB2,0x8B),
+     o3(0xEA,0xB2,0x8C), o3(0xEA,0xB2,0x90),
+     o3(0xEA,0xB2,0x94), o3(0xEA,0xB2,0x9C),
+     o3(0xEA,0xB2,0x9D), o3(0xEA,0xB2,0x9F),
+     o3(0xEA,0xB2,0xA0), o3(0xEA,0xB2,0xA1),
+     o3(0xEA,0xB2,0xA8), o3(0xEA,0xB2,0xA9),
+     o3(0xEA,0xB2,0xAA), o3(0xEA,0xB2,0xAC),
+     o3(0xEA,0xB2,0xAF), o3(0xEA,0xB2,0xB0),
+     o3(0xEA,0xB2,0xB8), o3(0xEA,0xB2,0xB9),
+     o3(0xEA,0xB2,0xBB), o3(0xEA,0xB2,0xBC),
+     o3(0xEA,0xB2,0xBD), o3(0xEA,0xB3,0x81),
+     o3(0xEA,0xB3,0x84), o3(0xEA,0xB3,0x88),
+     o3(0xEA,0xB3,0x8C), o3(0xEA,0xB3,0x95),
+     o3(0xEA,0xB3,0x97), o3(0xEA,0xB3,0xA0),
+     o3(0xEA,0xB3,0xA1), o3(0xEA,0xB3,0xA4),
+     o3(0xEA,0xB3,0xA7), o3(0xEA,0xB3,0xA8),
+     o3(0xEA,0xB3,0xAA), o3(0xEA,0xB3,0xAC),
+     o3(0xEA,0xB3,0xAF), o3(0xEA,0xB3,0xB0),
+     o3(0xEA,0xB3,0xB1), o3(0xEA,0xB3,0xB3),
+     o3(0xEA,0xB3,0xB5), o3(0xEA,0xB3,0xB6),
+     o3(0xEA,0xB3,0xBC), o3(0xEA,0xB3,0xBD),
+     o3(0xEA,0xB4,0x80), o3(0xEA,0xB4,0x84),
+     o3(0xEA,0xB4,0x86),
+
+#define from_EUC_KR_B0 WORDINDEX2INFO(12155)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B0_infos,
+
+#define from_EUC_KR_B1_infos WORDINDEX2INFO(12157)
+                INVALID, o3(0xEA,0xB4,0x8C),
+     o3(0xEA,0xB4,0x8D), o3(0xEA,0xB4,0x8F),
+     o3(0xEA,0xB4,0x91), o3(0xEA,0xB4,0x98),
+     o3(0xEA,0xB4,0x9C), o3(0xEA,0xB4,0xA0),
+     o3(0xEA,0xB4,0xA9), o3(0xEA,0xB4,0xAC),
+     o3(0xEA,0xB4,0xAD), o3(0xEA,0xB4,0xB4),
+     o3(0xEA,0xB4,0xB5), o3(0xEA,0xB4,0xB8),
+     o3(0xEA,0xB4,0xBC), o3(0xEA,0xB5,0x84),
+     o3(0xEA,0xB5,0x85), o3(0xEA,0xB5,0x87),
+     o3(0xEA,0xB5,0x89), o3(0xEA,0xB5,0x90),
+     o3(0xEA,0xB5,0x94), o3(0xEA,0xB5,0x98),
+     o3(0xEA,0xB5,0xA1), o3(0xEA,0xB5,0xA3),
+     o3(0xEA,0xB5,0xAC), o3(0xEA,0xB5,0xAD),
+     o3(0xEA,0xB5,0xB0), o3(0xEA,0xB5,0xB3),
+     o3(0xEA,0xB5,0xB4), o3(0xEA,0xB5,0xB5),
+     o3(0xEA,0xB5,0xB6), o3(0xEA,0xB5,0xBB),
+     o3(0xEA,0xB5,0xBC), o3(0xEA,0xB5,0xBD),
+     o3(0xEA,0xB5,0xBF), o3(0xEA,0xB6,0x81),
+     o3(0xEA,0xB6,0x82), o3(0xEA,0xB6,0x88),
+     o3(0xEA,0xB6,0x89), o3(0xEA,0xB6,0x8C),
+     o3(0xEA,0xB6,0x90), o3(0xEA,0xB6,0x9C),
+     o3(0xEA,0xB6,0x9D), o3(0xEA,0xB6,0xA4),
+     o3(0xEA,0xB6,0xB7), o3(0xEA,0xB7,0x80),
+     o3(0xEA,0xB7,0x81), o3(0xEA,0xB7,0x84),
+     o3(0xEA,0xB7,0x88), o3(0xEA,0xB7,0x90),
+     o3(0xEA,0xB7,0x91), o3(0xEA,0xB7,0x93),
+     o3(0xEA,0xB7,0x9C), o3(0xEA,0xB7,0xA0),
+     o3(0xEA,0xB7,0xA4), o3(0xEA,0xB7,0xB8),
+     o3(0xEA,0xB7,0xB9), o3(0xEA,0xB7,0xBC),
+     o3(0xEA,0xB7,0xBF), o3(0xEA,0xB8,0x80),
+     o3(0xEA,0xB8,0x81), o3(0xEA,0xB8,0x88),
+     o3(0xEA,0xB8,0x89), o3(0xEA,0xB8,0x8B),
+     o3(0xEA,0xB8,0x8D), o3(0xEA,0xB8,0x94),
+     o3(0xEA,0xB8,0xB0), o3(0xEA,0xB8,0xB1),
+     o3(0xEA,0xB8,0xB4), o3(0xEA,0xB8,0xB7),
+     o3(0xEA,0xB8,0xB8), o3(0xEA,0xB8,0xBA),
+     o3(0xEA,0xB9,0x80), o3(0xEA,0xB9,0x81),
+     o3(0xEA,0xB9,0x83), o3(0xEA,0xB9,0x85),
+     o3(0xEA,0xB9,0x86), o3(0xEA,0xB9,0x8A),
+     o3(0xEA,0xB9,0x8C), o3(0xEA,0xB9,0x8D),
+     o3(0xEA,0xB9,0x8E), o3(0xEA,0xB9,0x90),
+     o3(0xEA,0xB9,0x94), o3(0xEA,0xB9,0x96),
+     o3(0xEA,0xB9,0x9C), o3(0xEA,0xB9,0x9D),
+     o3(0xEA,0xB9,0x9F), o3(0xEA,0xB9,0xA0),
+     o3(0xEA,0xB9,0xA1), o3(0xEA,0xB9,0xA5),
+     o3(0xEA,0xB9,0xA8), o3(0xEA,0xB9,0xA9),
+     o3(0xEA,0xB9,0xAC), o3(0xEA,0xB9,0xB0),
+     o3(0xEA,0xB9,0xB8),
+
+#define from_EUC_KR_B1 WORDINDEX2INFO(12252)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B1_infos,
+
+#define from_EUC_KR_B2_infos WORDINDEX2INFO(12254)
+                INVALID, o3(0xEA,0xB9,0xB9),
+     o3(0xEA,0xB9,0xBB), o3(0xEA,0xB9,0xBC),
+     o3(0xEA,0xB9,0xBD), o3(0xEA,0xBA,0x84),
+     o3(0xEA,0xBA,0x85), o3(0xEA,0xBA,0x8C),
+     o3(0xEA,0xBA,0xBC), o3(0xEA,0xBA,0xBD),
+     o3(0xEA,0xBA,0xBE), o3(0xEA,0xBB,0x80),
+     o3(0xEA,0xBB,0x84), o3(0xEA,0xBB,0x8C),
+     o3(0xEA,0xBB,0x8D), o3(0xEA,0xBB,0x8F),
+     o3(0xEA,0xBB,0x90), o3(0xEA,0xBB,0x91),
+     o3(0xEA,0xBB,0x98), o3(0xEA,0xBB,0x99),
+     o3(0xEA,0xBB,0x9C), o3(0xEA,0xBB,0xA8),
+     o3(0xEA,0xBB,0xAB), o3(0xEA,0xBB,0xAD),
+     o3(0xEA,0xBB,0xB4), o3(0xEA,0xBB,0xB8),
+     o3(0xEA,0xBB,0xBC), o3(0xEA,0xBC,0x87),
+     o3(0xEA,0xBC,0x88), o3(0xEA,0xBC,0x8D),
+     o3(0xEA,0xBC,0x90), o3(0xEA,0xBC,0xAC),
+     o3(0xEA,0xBC,0xAD), o3(0xEA,0xBC,0xB0),
+     o3(0xEA,0xBC,0xB2), o3(0xEA,0xBC,0xB4),
+     o3(0xEA,0xBC,0xBC), o3(0xEA,0xBC,0xBD),
+     o3(0xEA,0xBC,0xBF), o3(0xEA,0xBD,0x81),
+     o3(0xEA,0xBD,0x82), o3(0xEA,0xBD,0x83),
+     o3(0xEA,0xBD,0x88), o3(0xEA,0xBD,0x89),
+     o3(0xEA,0xBD,0x90), o3(0xEA,0xBD,0x9C),
+     o3(0xEA,0xBD,0x9D), o3(0xEA,0xBD,0xA4),
+     o3(0xEA,0xBD,0xA5), o3(0xEA,0xBD,0xB9),
+     o3(0xEA,0xBE,0x80), o3(0xEA,0xBE,0x84),
+     o3(0xEA,0xBE,0x88), o3(0xEA,0xBE,0x90),
+     o3(0xEA,0xBE,0x91), o3(0xEA,0xBE,0x95),
+     o3(0xEA,0xBE,0x9C), o3(0xEA,0xBE,0xB8),
+     o3(0xEA,0xBE,0xB9), o3(0xEA,0xBE,0xBC),
+     o3(0xEA,0xBF,0x80), o3(0xEA,0xBF,0x87),
+     o3(0xEA,0xBF,0x88), o3(0xEA,0xBF,0x89),
+     o3(0xEA,0xBF,0x8B), o3(0xEA,0xBF,0x8D),
+     o3(0xEA,0xBF,0x8E), o3(0xEA,0xBF,0x94),
+     o3(0xEA,0xBF,0x9C), o3(0xEA,0xBF,0xA8),
+     o3(0xEA,0xBF,0xA9), o3(0xEA,0xBF,0xB0),
+     o3(0xEA,0xBF,0xB1), o3(0xEA,0xBF,0xB4),
+     o3(0xEA,0xBF,0xB8), o3(0xEB,0x80,0x80),
+     o3(0xEB,0x80,0x81), o3(0xEB,0x80,0x84),
+     o3(0xEB,0x80,0x8C), o3(0xEB,0x80,0x90),
+     o3(0xEB,0x80,0x94), o3(0xEB,0x80,0x9C),
+     o3(0xEB,0x80,0x9D), o3(0xEB,0x80,0xA8),
+     o3(0xEB,0x81,0x84), o3(0xEB,0x81,0x85),
+     o3(0xEB,0x81,0x88), o3(0xEB,0x81,0x8A),
+     o3(0xEB,0x81,0x8C), o3(0xEB,0x81,0x8E),
+     o3(0xEB,0x81,0x93), o3(0xEB,0x81,0x94),
+     o3(0xEB,0x81,0x95), o3(0xEB,0x81,0x97),
+     o3(0xEB,0x81,0x99),
+
+#define from_EUC_KR_B2 WORDINDEX2INFO(12349)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B2_infos,
+
+#define from_EUC_KR_B3_infos WORDINDEX2INFO(12351)
+                INVALID, o3(0xEB,0x81,0x9D),
+     o3(0xEB,0x81,0xBC), o3(0xEB,0x81,0xBD),
+     o3(0xEB,0x82,0x80), o3(0xEB,0x82,0x84),
+     o3(0xEB,0x82,0x8C), o3(0xEB,0x82,0x8D),
+     o3(0xEB,0x82,0x8F), o3(0xEB,0x82,0x91),
+     o3(0xEB,0x82,0x98), o3(0xEB,0x82,0x99),
+     o3(0xEB,0x82,0x9A), o3(0xEB,0x82,0x9C),
+     o3(0xEB,0x82,0x9F), o3(0xEB,0x82,0xA0),
+     o3(0xEB,0x82,0xA1), o3(0xEB,0x82,0xA2),
+     o3(0xEB,0x82,0xA8), o3(0xEB,0x82,0xA9),
+     o3(0xEB,0x82,0xAB), o3(0xEB,0x82,0xAC),
+     o3(0xEB,0x82,0xAD), o3(0xEB,0x82,0xAE),
+     o3(0xEB,0x82,0xAF), o3(0xEB,0x82,0xB1),
+     o3(0xEB,0x82,0xB3), o3(0xEB,0x82,0xB4),
+     o3(0xEB,0x82,0xB5), o3(0xEB,0x82,0xB8),
+     o3(0xEB,0x82,0xBC), o3(0xEB,0x83,0x84),
+     o3(0xEB,0x83,0x85), o3(0xEB,0x83,0x87),
+     o3(0xEB,0x83,0x88), o3(0xEB,0x83,0x89),
+     o3(0xEB,0x83,0x90), o3(0xEB,0x83,0x91),
+     o3(0xEB,0x83,0x94), o3(0xEB,0x83,0x98),
+     o3(0xEB,0x83,0xA0), o3(0xEB,0x83,0xA5),
+     o3(0xEB,0x84,0x88), o3(0xEB,0x84,0x89),
+     o3(0xEB,0x84,0x8B), o3(0xEB,0x84,0x8C),
+     o3(0xEB,0x84,0x90), o3(0xEB,0x84,0x92),
+     o3(0xEB,0x84,0x93), o3(0xEB,0x84,0x98),
+     o3(0xEB,0x84,0x99), o3(0xEB,0x84,0x9B),
+     o3(0xEB,0x84,0x9C), o3(0xEB,0x84,0x9D),
+     o3(0xEB,0x84,0xA3), o3(0xEB,0x84,0xA4),
+     o3(0xEB,0x84,0xA5), o3(0xEB,0x84,0xA8),
+     o3(0xEB,0x84,0xAC), o3(0xEB,0x84,0xB4),
+     o3(0xEB,0x84,0xB5), o3(0xEB,0x84,0xB7),
+     o3(0xEB,0x84,0xB8), o3(0xEB,0x84,0xB9),
+     o3(0xEB,0x85,0x80), o3(0xEB,0x85,0x81),
+     o3(0xEB,0x85,0x84), o3(0xEB,0x85,0x88),
+     o3(0xEB,0x85,0x90), o3(0xEB,0x85,0x91),
+     o3(0xEB,0x85,0x94), o3(0xEB,0x85,0x95),
+     o3(0xEB,0x85,0x98), o3(0xEB,0x85,0x9C),
+     o3(0xEB,0x85,0xA0), o3(0xEB,0x85,0xB8),
+     o3(0xEB,0x85,0xB9), o3(0xEB,0x85,0xBC),
+     o3(0xEB,0x86,0x80), o3(0xEB,0x86,0x82),
+     o3(0xEB,0x86,0x88), o3(0xEB,0x86,0x89),
+     o3(0xEB,0x86,0x8B), o3(0xEB,0x86,0x8D),
+     o3(0xEB,0x86,0x92), o3(0xEB,0x86,0x93),
+     o3(0xEB,0x86,0x94), o3(0xEB,0x86,0x98),
+     o3(0xEB,0x86,0x9C), o3(0xEB,0x86,0xA8),
+     o3(0xEB,0x87,0x8C), o3(0xEB,0x87,0x90),
+     o3(0xEB,0x87,0x94), o3(0xEB,0x87,0x9C),
+     o3(0xEB,0x87,0x9D),
+
+#define from_EUC_KR_B3 WORDINDEX2INFO(12446)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B3_infos,
+
+#define from_EUC_KR_B4_infos WORDINDEX2INFO(12448)
+                INVALID, o3(0xEB,0x87,0x9F),
+     o3(0xEB,0x87,0xA8), o3(0xEB,0x87,0xA9),
+     o3(0xEB,0x87,0xAC), o3(0xEB,0x87,0xB0),
+     o3(0xEB,0x87,0xB9), o3(0xEB,0x87,0xBB),
+     o3(0xEB,0x87,0xBD), o3(0xEB,0x88,0x84),
+     o3(0xEB,0x88,0x85), o3(0xEB,0x88,0x88),
+     o3(0xEB,0x88,0x8B), o3(0xEB,0x88,0x8C),
+     o3(0xEB,0x88,0x94), o3(0xEB,0x88,0x95),
+     o3(0xEB,0x88,0x97), o3(0xEB,0x88,0x99),
+     o3(0xEB,0x88,0xA0), o3(0xEB,0x88,0xB4),
+     o3(0xEB,0x88,0xBC), o3(0xEB,0x89,0x98),
+     o3(0xEB,0x89,0x9C), o3(0xEB,0x89,0xA0),
+     o3(0xEB,0x89,0xA8), o3(0xEB,0x89,0xA9),
+     o3(0xEB,0x89,0xB4), o3(0xEB,0x89,0xB5),
+     o3(0xEB,0x89,0xBC), o3(0xEB,0x8A,0x84),
+     o3(0xEB,0x8A,0x85), o3(0xEB,0x8A,0x89),
+     o3(0xEB,0x8A,0x90), o3(0xEB,0x8A,0x91),
+     o3(0xEB,0x8A,0x94), o3(0xEB,0x8A,0x98),
+     o3(0xEB,0x8A,0x99), o3(0xEB,0x8A,0x9A),
+     o3(0xEB,0x8A,0xA0), o3(0xEB,0x8A,0xA1),
+     o3(0xEB,0x8A,0xA3), o3(0xEB,0x8A,0xA5),
+     o3(0xEB,0x8A,0xA6), o3(0xEB,0x8A,0xAA),
+     o3(0xEB,0x8A,0xAC), o3(0xEB,0x8A,0xB0),
+     o3(0xEB,0x8A,0xB4), o3(0xEB,0x8B,0x88),
+     o3(0xEB,0x8B,0x89), o3(0xEB,0x8B,0x8C),
+     o3(0xEB,0x8B,0x90), o3(0xEB,0x8B,0x92),
+     o3(0xEB,0x8B,0x98), o3(0xEB,0x8B,0x99),
+     o3(0xEB,0x8B,0x9B), o3(0xEB,0x8B,0x9D),
+     o3(0xEB,0x8B,0xA2), o3(0xEB,0x8B,0xA4),
+     o3(0xEB,0x8B,0xA5), o3(0xEB,0x8B,0xA6),
+     o3(0xEB,0x8B,0xA8), o3(0xEB,0x8B,0xAB),
+     o3(0xEB,0x8B,0xAC), o3(0xEB,0x8B,0xAD),
+     o3(0xEB,0x8B,0xAE), o3(0xEB,0x8B,0xAF),
+     o3(0xEB,0x8B,0xB3), o3(0xEB,0x8B,0xB4),
+     o3(0xEB,0x8B,0xB5), o3(0xEB,0x8B,0xB7),
+     o3(0xEB,0x8B,0xB8), o3(0xEB,0x8B,0xB9),
+     o3(0xEB,0x8B,0xBA), o3(0xEB,0x8B,0xBB),
+     o3(0xEB,0x8B,0xBF), o3(0xEB,0x8C,0x80),
+     o3(0xEB,0x8C,0x81), o3(0xEB,0x8C,0x84),
+     o3(0xEB,0x8C,0x88), o3(0xEB,0x8C,0x90),
+     o3(0xEB,0x8C,0x91), o3(0xEB,0x8C,0x93),
+     o3(0xEB,0x8C,0x94), o3(0xEB,0x8C,0x95),
+     o3(0xEB,0x8C,0x9C), o3(0xEB,0x8D,0x94),
+     o3(0xEB,0x8D,0x95), o3(0xEB,0x8D,0x96),
+     o3(0xEB,0x8D,0x98), o3(0xEB,0x8D,0x9B),
+     o3(0xEB,0x8D,0x9C), o3(0xEB,0x8D,0x9E),
+     o3(0xEB,0x8D,0x9F), o3(0xEB,0x8D,0xA4),
+     o3(0xEB,0x8D,0xA5),
+
+#define from_EUC_KR_B4 WORDINDEX2INFO(12543)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B4_infos,
+
+#define from_EUC_KR_B5_infos WORDINDEX2INFO(12545)
+                INVALID, o3(0xEB,0x8D,0xA7),
+     o3(0xEB,0x8D,0xA9), o3(0xEB,0x8D,0xAB),
+     o3(0xEB,0x8D,0xAE), o3(0xEB,0x8D,0xB0),
+     o3(0xEB,0x8D,0xB1), o3(0xEB,0x8D,0xB4),
+     o3(0xEB,0x8D,0xB8), o3(0xEB,0x8E,0x80),
+     o3(0xEB,0x8E,0x81), o3(0xEB,0x8E,0x83),
+     o3(0xEB,0x8E,0x84), o3(0xEB,0x8E,0x85),
+     o3(0xEB,0x8E,0x8C), o3(0xEB,0x8E,0x90),
+     o3(0xEB,0x8E,0x94), o3(0xEB,0x8E,0xA0),
+     o3(0xEB,0x8E,0xA1), o3(0xEB,0x8E,0xA8),
+     o3(0xEB,0x8E,0xAC), o3(0xEB,0x8F,0x84),
+     o3(0xEB,0x8F,0x85), o3(0xEB,0x8F,0x88),
+     o3(0xEB,0x8F,0x8B), o3(0xEB,0x8F,0x8C),
+     o3(0xEB,0x8F,0x8E), o3(0xEB,0x8F,0x90),
+     o3(0xEB,0x8F,0x94), o3(0xEB,0x8F,0x95),
+     o3(0xEB,0x8F,0x97), o3(0xEB,0x8F,0x99),
+     o3(0xEB,0x8F,0x9B), o3(0xEB,0x8F,0x9D),
+     o3(0xEB,0x8F,0xA0), o3(0xEB,0x8F,0xA4),
+     o3(0xEB,0x8F,0xA8), o3(0xEB,0x8F,0xBC),
+     o3(0xEB,0x90,0x90), o3(0xEB,0x90,0x98),
+     o3(0xEB,0x90,0x9C), o3(0xEB,0x90,0xA0),
+     o3(0xEB,0x90,0xA8), o3(0xEB,0x90,0xA9),
+     o3(0xEB,0x90,0xAB), o3(0xEB,0x90,0xB4),
+     o3(0xEB,0x91,0x90), o3(0xEB,0x91,0x91),
+     o3(0xEB,0x91,0x94), o3(0xEB,0x91,0x98),
+     o3(0xEB,0x91,0xA0), o3(0xEB,0x91,0xA1),
+     o3(0xEB,0x91,0xA3), o3(0xEB,0x91,0xA5),
+     o3(0xEB,0x91,0xAC), o3(0xEB,0x92,0x80),
+     o3(0xEB,0x92,0x88), o3(0xEB,0x92,0x9D),
+     o3(0xEB,0x92,0xA4), o3(0xEB,0x92,0xA8),
+     o3(0xEB,0x92,0xAC), o3(0xEB,0x92,0xB5),
+     o3(0xEB,0x92,0xB7), o3(0xEB,0x92,0xB9),
+     o3(0xEB,0x93,0x80), o3(0xEB,0x93,0x84),
+     o3(0xEB,0x93,0x88), o3(0xEB,0x93,0x90),
+     o3(0xEB,0x93,0x95), o3(0xEB,0x93,0x9C),
+     o3(0xEB,0x93,0x9D), o3(0xEB,0x93,0xA0),
+     o3(0xEB,0x93,0xA3), o3(0xEB,0x93,0xA4),
+     o3(0xEB,0x93,0xA6), o3(0xEB,0x93,0xAC),
+     o3(0xEB,0x93,0xAD), o3(0xEB,0x93,0xAF),
+     o3(0xEB,0x93,0xB1), o3(0xEB,0x93,0xB8),
+     o3(0xEB,0x94,0x94), o3(0xEB,0x94,0x95),
+     o3(0xEB,0x94,0x98), o3(0xEB,0x94,0x9B),
+     o3(0xEB,0x94,0x9C), o3(0xEB,0x94,0xA4),
+     o3(0xEB,0x94,0xA5), o3(0xEB,0x94,0xA7),
+     o3(0xEB,0x94,0xA8), o3(0xEB,0x94,0xA9),
+     o3(0xEB,0x94,0xAA), o3(0xEB,0x94,0xB0),
+     o3(0xEB,0x94,0xB1), o3(0xEB,0x94,0xB4),
+     o3(0xEB,0x94,0xB8),
+
+#define from_EUC_KR_B5 WORDINDEX2INFO(12640)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B5_infos,
+
+#define from_EUC_KR_B6_infos WORDINDEX2INFO(12642)
+                INVALID, o3(0xEB,0x95,0x80),
+     o3(0xEB,0x95,0x81), o3(0xEB,0x95,0x83),
+     o3(0xEB,0x95,0x84), o3(0xEB,0x95,0x85),
+     o3(0xEB,0x95,0x8B), o3(0xEB,0x95,0x8C),
+     o3(0xEB,0x95,0x8D), o3(0xEB,0x95,0x90),
+     o3(0xEB,0x95,0x94), o3(0xEB,0x95,0x9C),
+     o3(0xEB,0x95,0x9D), o3(0xEB,0x95,0x9F),
+     o3(0xEB,0x95,0xA0), o3(0xEB,0x95,0xA1),
+     o3(0xEB,0x96,0xA0), o3(0xEB,0x96,0xA1),
+     o3(0xEB,0x96,0xA4), o3(0xEB,0x96,0xA8),
+     o3(0xEB,0x96,0xAA), o3(0xEB,0x96,0xAB),
+     o3(0xEB,0x96,0xB0), o3(0xEB,0x96,0xB1),
+     o3(0xEB,0x96,0xB3), o3(0xEB,0x96,0xB4),
+     o3(0xEB,0x96,0xB5), o3(0xEB,0x96,0xBB),
+     o3(0xEB,0x96,0xBC), o3(0xEB,0x96,0xBD),
+     o3(0xEB,0x97,0x80), o3(0xEB,0x97,0x84),
+     o3(0xEB,0x97,0x8C), o3(0xEB,0x97,0x8D),
+     o3(0xEB,0x97,0x8F), o3(0xEB,0x97,0x90),
+     o3(0xEB,0x97,0x91), o3(0xEB,0x97,0x98),
+     o3(0xEB,0x97,0xAC), o3(0xEB,0x98,0x90),
+     o3(0xEB,0x98,0x91), o3(0xEB,0x98,0x94),
+     o3(0xEB,0x98,0x98), o3(0xEB,0x98,0xA5),
+     o3(0xEB,0x98,0xAC), o3(0xEB,0x98,0xB4),
+     o3(0xEB,0x99,0x88), o3(0xEB,0x99,0xA4),
+     o3(0xEB,0x99,0xA8), o3(0xEB,0x9A,0x9C),
+     o3(0xEB,0x9A,0x9D), o3(0xEB,0x9A,0xA0),
+     o3(0xEB,0x9A,0xA4), o3(0xEB,0x9A,0xAB),
+     o3(0xEB,0x9A,0xAC), o3(0xEB,0x9A,0xB1),
+     o3(0xEB,0x9B,0x94), o3(0xEB,0x9B,0xB0),
+     o3(0xEB,0x9B,0xB4), o3(0xEB,0x9B,0xB8),
+     o3(0xEB,0x9C,0x80), o3(0xEB,0x9C,0x81),
+     o3(0xEB,0x9C,0x85), o3(0xEB,0x9C,0xA8),
+     o3(0xEB,0x9C,0xA9), o3(0xEB,0x9C,0xAC),
+     o3(0xEB,0x9C,0xAF), o3(0xEB,0x9C,0xB0),
+     o3(0xEB,0x9C,0xB8), o3(0xEB,0x9C,0xB9),
+     o3(0xEB,0x9C,0xBB), o3(0xEB,0x9D,0x84),
+     o3(0xEB,0x9D,0x88), o3(0xEB,0x9D,0x8C),
+     o3(0xEB,0x9D,0x94), o3(0xEB,0x9D,0x95),
+     o3(0xEB,0x9D,0xA0), o3(0xEB,0x9D,0xA4),
+     o3(0xEB,0x9D,0xA8), o3(0xEB,0x9D,0xB0),
+     o3(0xEB,0x9D,0xB1), o3(0xEB,0x9D,0xB3),
+     o3(0xEB,0x9D,0xB5), o3(0xEB,0x9D,0xBC),
+     o3(0xEB,0x9D,0xBD), o3(0xEB,0x9E,0x80),
+     o3(0xEB,0x9E,0x84), o3(0xEB,0x9E,0x8C),
+     o3(0xEB,0x9E,0x8D), o3(0xEB,0x9E,0x8F),
+     o3(0xEB,0x9E,0x90), o3(0xEB,0x9E,0x91),
+     o3(0xEB,0x9E,0x92), o3(0xEB,0x9E,0x96),
+     o3(0xEB,0x9E,0x97),
+
+#define from_EUC_KR_B6 WORDINDEX2INFO(12737)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B6_infos,
+
+#define from_EUC_KR_B7_infos WORDINDEX2INFO(12739)
+                INVALID, o3(0xEB,0x9E,0x98),
+     o3(0xEB,0x9E,0x99), o3(0xEB,0x9E,0x9C),
+     o3(0xEB,0x9E,0xA0), o3(0xEB,0x9E,0xA8),
+     o3(0xEB,0x9E,0xA9), o3(0xEB,0x9E,0xAB),
+     o3(0xEB,0x9E,0xAC), o3(0xEB,0x9E,0xAD),
+     o3(0xEB,0x9E,0xB4), o3(0xEB,0x9E,0xB5),
+     o3(0xEB,0x9E,0xB8), o3(0xEB,0x9F,0x87),
+     o3(0xEB,0x9F,0x89), o3(0xEB,0x9F,0xAC),
+     o3(0xEB,0x9F,0xAD), o3(0xEB,0x9F,0xB0),
+     o3(0xEB,0x9F,0xB4), o3(0xEB,0x9F,0xBC),
+     o3(0xEB,0x9F,0xBD), o3(0xEB,0x9F,0xBF),
+     o3(0xEB,0xA0,0x80), o3(0xEB,0xA0,0x81),
+     o3(0xEB,0xA0,0x87), o3(0xEB,0xA0,0x88),
+     o3(0xEB,0xA0,0x89), o3(0xEB,0xA0,0x8C),
+     o3(0xEB,0xA0,0x90), o3(0xEB,0xA0,0x98),
+     o3(0xEB,0xA0,0x99), o3(0xEB,0xA0,0x9B),
+     o3(0xEB,0xA0,0x9D), o3(0xEB,0xA0,0xA4),
+     o3(0xEB,0xA0,0xA5), o3(0xEB,0xA0,0xA8),
+     o3(0xEB,0xA0,0xAC), o3(0xEB,0xA0,0xB4),
+     o3(0xEB,0xA0,0xB5), o3(0xEB,0xA0,0xB7),
+     o3(0xEB,0xA0,0xB8), o3(0xEB,0xA0,0xB9),
+     o3(0xEB,0xA1,0x80), o3(0xEB,0xA1,0x84),
+     o3(0xEB,0xA1,0x91), o3(0xEB,0xA1,0x93),
+     o3(0xEB,0xA1,0x9C), o3(0xEB,0xA1,0x9D),
+     o3(0xEB,0xA1,0xA0), o3(0xEB,0xA1,0xA4),
+     o3(0xEB,0xA1,0xAC), o3(0xEB,0xA1,0xAD),
+     o3(0xEB,0xA1,0xAF), o3(0xEB,0xA1,0xB1),
+     o3(0xEB,0xA1,0xB8), o3(0xEB,0xA1,0xBC),
+     o3(0xEB,0xA2,0x8D), o3(0xEB,0xA2,0xA8),
+     o3(0xEB,0xA2,0xB0), o3(0xEB,0xA2,0xB4),
+     o3(0xEB,0xA2,0xB8), o3(0xEB,0xA3,0x80),
+     o3(0xEB,0xA3,0x81), o3(0xEB,0xA3,0x83),
+     o3(0xEB,0xA3,0x85), o3(0xEB,0xA3,0x8C),
+     o3(0xEB,0xA3,0x90), o3(0xEB,0xA3,0x94),
+     o3(0xEB,0xA3,0x9D), o3(0xEB,0xA3,0x9F),
+     o3(0xEB,0xA3,0xA1), o3(0xEB,0xA3,0xA8),
+     o3(0xEB,0xA3,0xA9), o3(0xEB,0xA3,0xAC),
+     o3(0xEB,0xA3,0xB0), o3(0xEB,0xA3,0xB8),
+     o3(0xEB,0xA3,0xB9), o3(0xEB,0xA3,0xBB),
+     o3(0xEB,0xA3,0xBD), o3(0xEB,0xA4,0x84),
+     o3(0xEB,0xA4,0x98), o3(0xEB,0xA4,0xA0),
+     o3(0xEB,0xA4,0xBC), o3(0xEB,0xA4,0xBD),
+     o3(0xEB,0xA5,0x80), o3(0xEB,0xA5,0x84),
+     o3(0xEB,0xA5,0x8C), o3(0xEB,0xA5,0x8F),
+     o3(0xEB,0xA5,0x91), o3(0xEB,0xA5,0x98),
+     o3(0xEB,0xA5,0x99), o3(0xEB,0xA5,0x9C),
+     o3(0xEB,0xA5,0xA0), o3(0xEB,0xA5,0xA8),
+     o3(0xEB,0xA5,0xA9),
+
+#define from_EUC_KR_B7 WORDINDEX2INFO(12834)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B7_infos,
+
+#define from_EUC_KR_B8_infos WORDINDEX2INFO(12836)
+                INVALID, o3(0xEB,0xA5,0xAB),
+     o3(0xEB,0xA5,0xAD), o3(0xEB,0xA5,0xB4),
+     o3(0xEB,0xA5,0xB5), o3(0xEB,0xA5,0xB8),
+     o3(0xEB,0xA5,0xBC), o3(0xEB,0xA6,0x84),
+     o3(0xEB,0xA6,0x85), o3(0xEB,0xA6,0x87),
+     o3(0xEB,0xA6,0x89), o3(0xEB,0xA6,0x8A),
+     o3(0xEB,0xA6,0x8D), o3(0xEB,0xA6,0x8E),
+     o3(0xEB,0xA6,0xAC), o3(0xEB,0xA6,0xAD),
+     o3(0xEB,0xA6,0xB0), o3(0xEB,0xA6,0xB4),
+     o3(0xEB,0xA6,0xBC), o3(0xEB,0xA6,0xBD),
+     o3(0xEB,0xA6,0xBF), o3(0xEB,0xA7,0x81),
+     o3(0xEB,0xA7,0x88), o3(0xEB,0xA7,0x89),
+     o3(0xEB,0xA7,0x8C), o3(0xEB,0xA7,0x8E),
+     o3(0xEB,0xA7,0x8F), o3(0xEB,0xA7,0x90),
+     o3(0xEB,0xA7,0x91), o3(0xEB,0xA7,0x92),
+     o3(0xEB,0xA7,0x98), o3(0xEB,0xA7,0x99),
+     o3(0xEB,0xA7,0x9B), o3(0xEB,0xA7,0x9D),
+     o3(0xEB,0xA7,0x9E), o3(0xEB,0xA7,0xA1),
+     o3(0xEB,0xA7,0xA3), o3(0xEB,0xA7,0xA4),
+     o3(0xEB,0xA7,0xA5), o3(0xEB,0xA7,0xA8),
+     o3(0xEB,0xA7,0xAC), o3(0xEB,0xA7,0xB4),
+     o3(0xEB,0xA7,0xB5), o3(0xEB,0xA7,0xB7),
+     o3(0xEB,0xA7,0xB8), o3(0xEB,0xA7,0xB9),
+     o3(0xEB,0xA7,0xBA), o3(0xEB,0xA8,0x80),
+     o3(0xEB,0xA8,0x81), o3(0xEB,0xA8,0x88),
+     o3(0xEB,0xA8,0x95), o3(0xEB,0xA8,0xB8),
+     o3(0xEB,0xA8,0xB9), o3(0xEB,0xA8,0xBC),
+     o3(0xEB,0xA9,0x80), o3(0xEB,0xA9,0x82),
+     o3(0xEB,0xA9,0x88), o3(0xEB,0xA9,0x89),
+     o3(0xEB,0xA9,0x8B), o3(0xEB,0xA9,0x8D),
+     o3(0xEB,0xA9,0x8E), o3(0xEB,0xA9,0x93),
+     o3(0xEB,0xA9,0x94), o3(0xEB,0xA9,0x95),
+     o3(0xEB,0xA9,0x98), o3(0xEB,0xA9,0x9C),
+     o3(0xEB,0xA9,0xA4), o3(0xEB,0xA9,0xA5),
+     o3(0xEB,0xA9,0xA7), o3(0xEB,0xA9,0xA8),
+     o3(0xEB,0xA9,0xA9), o3(0xEB,0xA9,0xB0),
+     o3(0xEB,0xA9,0xB1), o3(0xEB,0xA9,0xB4),
+     o3(0xEB,0xA9,0xB8), o3(0xEB,0xAA,0x83),
+     o3(0xEB,0xAA,0x84), o3(0xEB,0xAA,0x85),
+     o3(0xEB,0xAA,0x87), o3(0xEB,0xAA,0x8C),
+     o3(0xEB,0xAA,0xA8), o3(0xEB,0xAA,0xA9),
+     o3(0xEB,0xAA,0xAB), o3(0xEB,0xAA,0xAC),
+     o3(0xEB,0xAA,0xB0), o3(0xEB,0xAA,0xB2),
+     o3(0xEB,0xAA,0xB8), o3(0xEB,0xAA,0xB9),
+     o3(0xEB,0xAA,0xBB), o3(0xEB,0xAA,0xBD),
+     o3(0xEB,0xAB,0x84), o3(0xEB,0xAB,0x88),
+     o3(0xEB,0xAB,0x98), o3(0xEB,0xAB,0x99),
+     o3(0xEB,0xAB,0xBC),
+
+#define from_EUC_KR_B8 WORDINDEX2INFO(12931)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B8_infos,
+
+#define from_EUC_KR_B9_infos WORDINDEX2INFO(12933)
+                INVALID, o3(0xEB,0xAC,0x80),
+     o3(0xEB,0xAC,0x84), o3(0xEB,0xAC,0x8D),
+     o3(0xEB,0xAC,0x8F), o3(0xEB,0xAC,0x91),
+     o3(0xEB,0xAC,0x98), o3(0xEB,0xAC,0x9C),
+     o3(0xEB,0xAC,0xA0), o3(0xEB,0xAC,0xA9),
+     o3(0xEB,0xAC,0xAB), o3(0xEB,0xAC,0xB4),
+     o3(0xEB,0xAC,0xB5), o3(0xEB,0xAC,0xB6),
+     o3(0xEB,0xAC,0xB8), o3(0xEB,0xAC,0xBB),
+     o3(0xEB,0xAC,0xBC), o3(0xEB,0xAC,0xBD),
+     o3(0xEB,0xAC,0xBE), o3(0xEB,0xAD,0x84),
+     o3(0xEB,0xAD,0x85), o3(0xEB,0xAD,0x87),
+     o3(0xEB,0xAD,0x89), o3(0xEB,0xAD,0x8D),
+     o3(0xEB,0xAD,0x8F), o3(0xEB,0xAD,0x90),
+     o3(0xEB,0xAD,0x94), o3(0xEB,0xAD,0x98),
+     o3(0xEB,0xAD,0xA1), o3(0xEB,0xAD,0xA3),
+     o3(0xEB,0xAD,0xAC), o3(0xEB,0xAE,0x88),
+     o3(0xEB,0xAE,0x8C), o3(0xEB,0xAE,0x90),
+     o3(0xEB,0xAE,0xA4), o3(0xEB,0xAE,0xA8),
+     o3(0xEB,0xAE,0xAC), o3(0xEB,0xAE,0xB4),
+     o3(0xEB,0xAE,0xB7), o3(0xEB,0xAF,0x80),
+     o3(0xEB,0xAF,0x84), o3(0xEB,0xAF,0x88),
+     o3(0xEB,0xAF,0x90), o3(0xEB,0xAF,0x93),
+     o3(0xEB,0xAF,0xB8), o3(0xEB,0xAF,0xB9),
+     o3(0xEB,0xAF,0xBC), o3(0xEB,0xAF,0xBF),
+     o3(0xEB,0xB0,0x80), o3(0xEB,0xB0,0x82),
+     o3(0xEB,0xB0,0x88), o3(0xEB,0xB0,0x89),
+     o3(0xEB,0xB0,0x8B), o3(0xEB,0xB0,0x8C),
+     o3(0xEB,0xB0,0x8D), o3(0xEB,0xB0,0x8F),
+     o3(0xEB,0xB0,0x91), o3(0xEB,0xB0,0x94),
+     o3(0xEB,0xB0,0x95), o3(0xEB,0xB0,0x96),
+     o3(0xEB,0xB0,0x97), o3(0xEB,0xB0,0x98),
+     o3(0xEB,0xB0,0x9B), o3(0xEB,0xB0,0x9C),
+     o3(0xEB,0xB0,0x9D), o3(0xEB,0xB0,0x9E),
+     o3(0xEB,0xB0,0x9F), o3(0xEB,0xB0,0xA4),
+     o3(0xEB,0xB0,0xA5), o3(0xEB,0xB0,0xA7),
+     o3(0xEB,0xB0,0xA9), o3(0xEB,0xB0,0xAD),
+     o3(0xEB,0xB0,0xB0), o3(0xEB,0xB0,0xB1),
+     o3(0xEB,0xB0,0xB4), o3(0xEB,0xB0,0xB8),
+     o3(0xEB,0xB1,0x80), o3(0xEB,0xB1,0x81),
+     o3(0xEB,0xB1,0x83), o3(0xEB,0xB1,0x84),
+     o3(0xEB,0xB1,0x85), o3(0xEB,0xB1,0x89),
+     o3(0xEB,0xB1,0x8C), o3(0xEB,0xB1,0x8D),
+     o3(0xEB,0xB1,0x90), o3(0xEB,0xB1,0x9D),
+     o3(0xEB,0xB2,0x84), o3(0xEB,0xB2,0x85),
+     o3(0xEB,0xB2,0x88), o3(0xEB,0xB2,0x8B),
+     o3(0xEB,0xB2,0x8C), o3(0xEB,0xB2,0x8E),
+     o3(0xEB,0xB2,0x94), o3(0xEB,0xB2,0x95),
+     o3(0xEB,0xB2,0x97),
+
+#define from_EUC_KR_B9 WORDINDEX2INFO(13028)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_B9_infos,
+
+#define from_EUC_KR_BA_infos WORDINDEX2INFO(13030)
+                INVALID, o3(0xEB,0xB2,0x99),
+     o3(0xEB,0xB2,0x9A), o3(0xEB,0xB2,0xA0),
+     o3(0xEB,0xB2,0xA1), o3(0xEB,0xB2,0xA4),
+     o3(0xEB,0xB2,0xA7), o3(0xEB,0xB2,0xA8),
+     o3(0xEB,0xB2,0xB0), o3(0xEB,0xB2,0xB1),
+     o3(0xEB,0xB2,0xB3), o3(0xEB,0xB2,0xB4),
+     o3(0xEB,0xB2,0xB5), o3(0xEB,0xB2,0xBC),
+     o3(0xEB,0xB2,0xBD), o3(0xEB,0xB3,0x80),
+     o3(0xEB,0xB3,0x84), o3(0xEB,0xB3,0x8D),
+     o3(0xEB,0xB3,0x8F), o3(0xEB,0xB3,0x90),
+     o3(0xEB,0xB3,0x91), o3(0xEB,0xB3,0x95),
+     o3(0xEB,0xB3,0x98), o3(0xEB,0xB3,0x9C),
+     o3(0xEB,0xB3,0xB4), o3(0xEB,0xB3,0xB5),
+     o3(0xEB,0xB3,0xB6), o3(0xEB,0xB3,0xB8),
+     o3(0xEB,0xB3,0xBC), o3(0xEB,0xB4,0x84),
+     o3(0xEB,0xB4,0x85), o3(0xEB,0xB4,0x87),
+     o3(0xEB,0xB4,0x89), o3(0xEB,0xB4,0x90),
+     o3(0xEB,0xB4,0x94), o3(0xEB,0xB4,0xA4),
+     o3(0xEB,0xB4,0xAC), o3(0xEB,0xB5,0x80),
+     o3(0xEB,0xB5,0x88), o3(0xEB,0xB5,0x89),
+     o3(0xEB,0xB5,0x8C), o3(0xEB,0xB5,0x90),
+     o3(0xEB,0xB5,0x98), o3(0xEB,0xB5,0x99),
+     o3(0xEB,0xB5,0xA4), o3(0xEB,0xB5,0xA8),
+     o3(0xEB,0xB6,0x80), o3(0xEB,0xB6,0x81),
+     o3(0xEB,0xB6,0x84), o3(0xEB,0xB6,0x87),
+     o3(0xEB,0xB6,0x88), o3(0xEB,0xB6,0x89),
+     o3(0xEB,0xB6,0x8A), o3(0xEB,0xB6,0x90),
+     o3(0xEB,0xB6,0x91), o3(0xEB,0xB6,0x93),
+     o3(0xEB,0xB6,0x95), o3(0xEB,0xB6,0x99),
+     o3(0xEB,0xB6,0x9A), o3(0xEB,0xB6,0x9C),
+     o3(0xEB,0xB6,0xA4), o3(0xEB,0xB6,0xB0),
+     o3(0xEB,0xB6,0xB8), o3(0xEB,0xB7,0x94),
+     o3(0xEB,0xB7,0x95), o3(0xEB,0xB7,0x98),
+     o3(0xEB,0xB7,0x9C), o3(0xEB,0xB7,0xA9),
+     o3(0xEB,0xB7,0xB0), o3(0xEB,0xB7,0xB4),
+     o3(0xEB,0xB7,0xB8), o3(0xEB,0xB8,0x80),
+     o3(0xEB,0xB8,0x83), o3(0xEB,0xB8,0x85),
+     o3(0xEB,0xB8,0x8C), o3(0xEB,0xB8,0x8D),
+     o3(0xEB,0xB8,0x90), o3(0xEB,0xB8,0x94),
+     o3(0xEB,0xB8,0x9C), o3(0xEB,0xB8,0x9D),
+     o3(0xEB,0xB8,0x9F), o3(0xEB,0xB9,0x84),
+     o3(0xEB,0xB9,0x85), o3(0xEB,0xB9,0x88),
+     o3(0xEB,0xB9,0x8C), o3(0xEB,0xB9,0x8E),
+     o3(0xEB,0xB9,0x94), o3(0xEB,0xB9,0x95),
+     o3(0xEB,0xB9,0x97), o3(0xEB,0xB9,0x99),
+     o3(0xEB,0xB9,0x9A), o3(0xEB,0xB9,0x9B),
+     o3(0xEB,0xB9,0xA0), o3(0xEB,0xB9,0xA1),
+     o3(0xEB,0xB9,0xA4),
+
+#define from_EUC_KR_BA WORDINDEX2INFO(13125)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BA_infos,
+
+#define from_EUC_KR_BB_infos WORDINDEX2INFO(13127)
+                INVALID, o3(0xEB,0xB9,0xA8),
+     o3(0xEB,0xB9,0xAA), o3(0xEB,0xB9,0xB0),
+     o3(0xEB,0xB9,0xB1), o3(0xEB,0xB9,0xB3),
+     o3(0xEB,0xB9,0xB4), o3(0xEB,0xB9,0xB5),
+     o3(0xEB,0xB9,0xBB), o3(0xEB,0xB9,0xBC),
+     o3(0xEB,0xB9,0xBD), o3(0xEB,0xBA,0x80),
+     o3(0xEB,0xBA,0x84), o3(0xEB,0xBA,0x8C),
+     o3(0xEB,0xBA,0x8D), o3(0xEB,0xBA,0x8F),
+     o3(0xEB,0xBA,0x90), o3(0xEB,0xBA,0x91),
+     o3(0xEB,0xBA,0x98), o3(0xEB,0xBA,0x99),
+     o3(0xEB,0xBA,0xA8), o3(0xEB,0xBB,0x90),
+     o3(0xEB,0xBB,0x91), o3(0xEB,0xBB,0x94),
+     o3(0xEB,0xBB,0x97), o3(0xEB,0xBB,0x98),
+     o3(0xEB,0xBB,0xA0), o3(0xEB,0xBB,0xA3),
+     o3(0xEB,0xBB,0xA4), o3(0xEB,0xBB,0xA5),
+     o3(0xEB,0xBB,0xAC), o3(0xEB,0xBC,0x81),
+     o3(0xEB,0xBC,0x88), o3(0xEB,0xBC,0x89),
+     o3(0xEB,0xBC,0x98), o3(0xEB,0xBC,0x99),
+     o3(0xEB,0xBC,0x9B), o3(0xEB,0xBC,0x9C),
+     o3(0xEB,0xBC,0x9D), o3(0xEB,0xBD,0x80),
+     o3(0xEB,0xBD,0x81), o3(0xEB,0xBD,0x84),
+     o3(0xEB,0xBD,0x88), o3(0xEB,0xBD,0x90),
+     o3(0xEB,0xBD,0x91), o3(0xEB,0xBD,0x95),
+     o3(0xEB,0xBE,0x94), o3(0xEB,0xBE,0xB0),
+     o3(0xEB,0xBF,0x85), o3(0xEB,0xBF,0x8C),
+     o3(0xEB,0xBF,0x8D), o3(0xEB,0xBF,0x90),
+     o3(0xEB,0xBF,0x94), o3(0xEB,0xBF,0x9C),
+     o3(0xEB,0xBF,0x9F), o3(0xEB,0xBF,0xA1),
+     o3(0xEC,0x80,0xBC), o3(0xEC,0x81,0x91),
+     o3(0xEC,0x81,0x98), o3(0xEC,0x81,0x9C),
+     o3(0xEC,0x81,0xA0), o3(0xEC,0x81,0xA8),
+     o3(0xEC,0x81,0xA9), o3(0xEC,0x82,0x90),
+     o3(0xEC,0x82,0x91), o3(0xEC,0x82,0x94),
+     o3(0xEC,0x82,0x98), o3(0xEC,0x82,0xA0),
+     o3(0xEC,0x82,0xA1), o3(0xEC,0x82,0xA3),
+     o3(0xEC,0x82,0xA5), o3(0xEC,0x82,0xAC),
+     o3(0xEC,0x82,0xAD), o3(0xEC,0x82,0xAF),
+     o3(0xEC,0x82,0xB0), o3(0xEC,0x82,0xB3),
+     o3(0xEC,0x82,0xB4), o3(0xEC,0x82,0xB5),
+     o3(0xEC,0x82,0xB6), o3(0xEC,0x82,0xBC),
+     o3(0xEC,0x82,0xBD), o3(0xEC,0x82,0xBF),
+     o3(0xEC,0x83,0x80), o3(0xEC,0x83,0x81),
+     o3(0xEC,0x83,0x85), o3(0xEC,0x83,0x88),
+     o3(0xEC,0x83,0x89), o3(0xEC,0x83,0x8C),
+     o3(0xEC,0x83,0x90), o3(0xEC,0x83,0x98),
+     o3(0xEC,0x83,0x99), o3(0xEC,0x83,0x9B),
+     o3(0xEC,0x83,0x9C), o3(0xEC,0x83,0x9D),
+     o3(0xEC,0x83,0xA4),
+
+#define from_EUC_KR_BB WORDINDEX2INFO(13222)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BB_infos,
+
+#define from_EUC_KR_BC_infos WORDINDEX2INFO(13224)
+                INVALID, o3(0xEC,0x83,0xA5),
+     o3(0xEC,0x83,0xA8), o3(0xEC,0x83,0xAC),
+     o3(0xEC,0x83,0xB4), o3(0xEC,0x83,0xB5),
+     o3(0xEC,0x83,0xB7), o3(0xEC,0x83,0xB9),
+     o3(0xEC,0x84,0x80), o3(0xEC,0x84,0x84),
+     o3(0xEC,0x84,0x88), o3(0xEC,0x84,0x90),
+     o3(0xEC,0x84,0x95), o3(0xEC,0x84,0x9C),
+     o3(0xEC,0x84,0x9D), o3(0xEC,0x84,0x9E),
+     o3(0xEC,0x84,0x9F), o3(0xEC,0x84,0xA0),
+     o3(0xEC,0x84,0xA3), o3(0xEC,0x84,0xA4),
+     o3(0xEC,0x84,0xA6), o3(0xEC,0x84,0xA7),
+     o3(0xEC,0x84,0xAC), o3(0xEC,0x84,0xAD),
+     o3(0xEC,0x84,0xAF), o3(0xEC,0x84,0xB0),
+     o3(0xEC,0x84,0xB1), o3(0xEC,0x84,0xB6),
+     o3(0xEC,0x84,0xB8), o3(0xEC,0x84,0xB9),
+     o3(0xEC,0x84,0xBC), o3(0xEC,0x85,0x80),
+     o3(0xEC,0x85,0x88), o3(0xEC,0x85,0x89),
+     o3(0xEC,0x85,0x8B), o3(0xEC,0x85,0x8C),
+     o3(0xEC,0x85,0x8D), o3(0xEC,0x85,0x94),
+     o3(0xEC,0x85,0x95), o3(0xEC,0x85,0x98),
+     o3(0xEC,0x85,0x9C), o3(0xEC,0x85,0xA4),
+     o3(0xEC,0x85,0xA5), o3(0xEC,0x85,0xA7),
+     o3(0xEC,0x85,0xA8), o3(0xEC,0x85,0xA9),
+     o3(0xEC,0x85,0xB0), o3(0xEC,0x85,0xB4),
+     o3(0xEC,0x85,0xB8), o3(0xEC,0x86,0x85),
+     o3(0xEC,0x86,0x8C), o3(0xEC,0x86,0x8D),
+     o3(0xEC,0x86,0x8E), o3(0xEC,0x86,0x90),
+     o3(0xEC,0x86,0x94), o3(0xEC,0x86,0x96),
+     o3(0xEC,0x86,0x9C), o3(0xEC,0x86,0x9D),
+     o3(0xEC,0x86,0x9F), o3(0xEC,0x86,0xA1),
+     o3(0xEC,0x86,0xA5), o3(0xEC,0x86,0xA8),
+     o3(0xEC,0x86,0xA9), o3(0xEC,0x86,0xAC),
+     o3(0xEC,0x86,0xB0), o3(0xEC,0x86,0xBD),
+     o3(0xEC,0x87,0x84), o3(0xEC,0x87,0x88),
+     o3(0xEC,0x87,0x8C), o3(0xEC,0x87,0x94),
+     o3(0xEC,0x87,0x97), o3(0xEC,0x87,0x98),
+     o3(0xEC,0x87,0xA0), o3(0xEC,0x87,0xA4),
+     o3(0xEC,0x87,0xA8), o3(0xEC,0x87,0xB0),
+     o3(0xEC,0x87,0xB1), o3(0xEC,0x87,0xB3),
+     o3(0xEC,0x87,0xBC), o3(0xEC,0x87,0xBD),
+     o3(0xEC,0x88,0x80), o3(0xEC,0x88,0x84),
+     o3(0xEC,0x88,0x8C), o3(0xEC,0x88,0x8D),
+     o3(0xEC,0x88,0x8F), o3(0xEC,0x88,0x91),
+     o3(0xEC,0x88,0x98), o3(0xEC,0x88,0x99),
+     o3(0xEC,0x88,0x9C), o3(0xEC,0x88,0x9F),
+     o3(0xEC,0x88,0xA0), o3(0xEC,0x88,0xA8),
+     o3(0xEC,0x88,0xA9), o3(0xEC,0x88,0xAB),
+     o3(0xEC,0x88,0xAD),
+
+#define from_EUC_KR_BC WORDINDEX2INFO(13319)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BC_infos,
+
+#define from_EUC_KR_BD_infos WORDINDEX2INFO(13321)
+                INVALID, o3(0xEC,0x88,0xAF),
+     o3(0xEC,0x88,0xB1), o3(0xEC,0x88,0xB2),
+     o3(0xEC,0x88,0xB4), o3(0xEC,0x89,0x88),
+     o3(0xEC,0x89,0x90), o3(0xEC,0x89,0x91),
+     o3(0xEC,0x89,0x94), o3(0xEC,0x89,0x98),
+     o3(0xEC,0x89,0xA0), o3(0xEC,0x89,0xA5),
+     o3(0xEC,0x89,0xAC), o3(0xEC,0x89,0xAD),
+     o3(0xEC,0x89,0xB0), o3(0xEC,0x89,0xB4),
+     o3(0xEC,0x89,0xBC), o3(0xEC,0x89,0xBD),
+     o3(0xEC,0x89,0xBF), o3(0xEC,0x8A,0x81),
+     o3(0xEC,0x8A,0x88), o3(0xEC,0x8A,0x89),
+     o3(0xEC,0x8A,0x90), o3(0xEC,0x8A,0x98),
+     o3(0xEC,0x8A,0x9B), o3(0xEC,0x8A,0x9D),
+     o3(0xEC,0x8A,0xA4), o3(0xEC,0x8A,0xA5),
+     o3(0xEC,0x8A,0xA8), o3(0xEC,0x8A,0xAC),
+     o3(0xEC,0x8A,0xAD), o3(0xEC,0x8A,0xB4),
+     o3(0xEC,0x8A,0xB5), o3(0xEC,0x8A,0xB7),
+     o3(0xEC,0x8A,0xB9), o3(0xEC,0x8B,0x9C),
+     o3(0xEC,0x8B,0x9D), o3(0xEC,0x8B,0xA0),
+     o3(0xEC,0x8B,0xA3), o3(0xEC,0x8B,0xA4),
+     o3(0xEC,0x8B,0xAB), o3(0xEC,0x8B,0xAC),
+     o3(0xEC,0x8B,0xAD), o3(0xEC,0x8B,0xAF),
+     o3(0xEC,0x8B,0xB1), o3(0xEC,0x8B,0xB6),
+     o3(0xEC,0x8B,0xB8), o3(0xEC,0x8B,0xB9),
+     o3(0xEC,0x8B,0xBB), o3(0xEC,0x8B,0xBC),
+     o3(0xEC,0x8C,0x80), o3(0xEC,0x8C,0x88),
+     o3(0xEC,0x8C,0x89), o3(0xEC,0x8C,0x8C),
+     o3(0xEC,0x8C,0x8D), o3(0xEC,0x8C,0x93),
+     o3(0xEC,0x8C,0x94), o3(0xEC,0x8C,0x95),
+     o3(0xEC,0x8C,0x98), o3(0xEC,0x8C,0x9C),
+     o3(0xEC,0x8C,0xA4), o3(0xEC,0x8C,0xA5),
+     o3(0xEC,0x8C,0xA8), o3(0xEC,0x8C,0xA9),
+     o3(0xEC,0x8D,0x85), o3(0xEC,0x8D,0xA8),
+     o3(0xEC,0x8D,0xA9), o3(0xEC,0x8D,0xAC),
+     o3(0xEC,0x8D,0xB0), o3(0xEC,0x8D,0xB2),
+     o3(0xEC,0x8D,0xB8), o3(0xEC,0x8D,0xB9),
+     o3(0xEC,0x8D,0xBC), o3(0xEC,0x8D,0xBD),
+     o3(0xEC,0x8E,0x84), o3(0xEC,0x8E,0x88),
+     o3(0xEC,0x8E,0x8C), o3(0xEC,0x8F,0x80),
+     o3(0xEC,0x8F,0x98), o3(0xEC,0x8F,0x99),
+     o3(0xEC,0x8F,0x9C), o3(0xEC,0x8F,0x9F),
+     o3(0xEC,0x8F,0xA0), o3(0xEC,0x8F,0xA2),
+     o3(0xEC,0x8F,0xA8), o3(0xEC,0x8F,0xA9),
+     o3(0xEC,0x8F,0xAD), o3(0xEC,0x8F,0xB4),
+     o3(0xEC,0x8F,0xB5), o3(0xEC,0x8F,0xB8),
+     o3(0xEC,0x90,0x88), o3(0xEC,0x90,0x90),
+     o3(0xEC,0x90,0xA4), o3(0xEC,0x90,0xAC),
+     o3(0xEC,0x90,0xB0),
+
+#define from_EUC_KR_BD WORDINDEX2INFO(13416)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BD_infos,
+
+#define from_EUC_KR_BE_infos WORDINDEX2INFO(13418)
+                INVALID, o3(0xEC,0x90,0xB4),
+     o3(0xEC,0x90,0xBC), o3(0xEC,0x90,0xBD),
+     o3(0xEC,0x91,0x88), o3(0xEC,0x91,0xA4),
+     o3(0xEC,0x91,0xA5), o3(0xEC,0x91,0xA8),
+     o3(0xEC,0x91,0xAC), o3(0xEC,0x91,0xB4),
+     o3(0xEC,0x91,0xB5), o3(0xEC,0x91,0xB9),
+     o3(0xEC,0x92,0x80), o3(0xEC,0x92,0x94),
+     o3(0xEC,0x92,0x9C), o3(0xEC,0x92,0xB8),
+     o3(0xEC,0x92,0xBC), o3(0xEC,0x93,0xA9),
+     o3(0xEC,0x93,0xB0), o3(0xEC,0x93,0xB1),
+     o3(0xEC,0x93,0xB4), o3(0xEC,0x93,0xB8),
+     o3(0xEC,0x93,0xBA), o3(0xEC,0x93,0xBF),
+     o3(0xEC,0x94,0x80), o3(0xEC,0x94,0x81),
+     o3(0xEC,0x94,0x8C), o3(0xEC,0x94,0x90),
+     o3(0xEC,0x94,0x94), o3(0xEC,0x94,0x9C),
+     o3(0xEC,0x94,0xA8), o3(0xEC,0x94,0xA9),
+     o3(0xEC,0x94,0xAC), o3(0xEC,0x94,0xB0),
+     o3(0xEC,0x94,0xB8), o3(0xEC,0x94,0xB9),
+     o3(0xEC,0x94,0xBB), o3(0xEC,0x94,0xBD),
+     o3(0xEC,0x95,0x84), o3(0xEC,0x95,0x85),
+     o3(0xEC,0x95,0x88), o3(0xEC,0x95,0x89),
+     o3(0xEC,0x95,0x8A), o3(0xEC,0x95,0x8C),
+     o3(0xEC,0x95,0x8D), o3(0xEC,0x95,0x8E),
+     o3(0xEC,0x95,0x93), o3(0xEC,0x95,0x94),
+     o3(0xEC,0x95,0x95), o3(0xEC,0x95,0x97),
+     o3(0xEC,0x95,0x98), o3(0xEC,0x95,0x99),
+     o3(0xEC,0x95,0x9D), o3(0xEC,0x95,0x9E),
+     o3(0xEC,0x95,0xA0), o3(0xEC,0x95,0xA1),
+     o3(0xEC,0x95,0xA4), o3(0xEC,0x95,0xA8),
+     o3(0xEC,0x95,0xB0), o3(0xEC,0x95,0xB1),
+     o3(0xEC,0x95,0xB3), o3(0xEC,0x95,0xB4),
+     o3(0xEC,0x95,0xB5), o3(0xEC,0x95,0xBC),
+     o3(0xEC,0x95,0xBD), o3(0xEC,0x96,0x80),
+     o3(0xEC,0x96,0x84), o3(0xEC,0x96,0x87),
+     o3(0xEC,0x96,0x8C), o3(0xEC,0x96,0x8D),
+     o3(0xEC,0x96,0x8F), o3(0xEC,0x96,0x91),
+     o3(0xEC,0x96,0x95), o3(0xEC,0x96,0x97),
+     o3(0xEC,0x96,0x98), o3(0xEC,0x96,0x9C),
+     o3(0xEC,0x96,0xA0), o3(0xEC,0x96,0xA9),
+     o3(0xEC,0x96,0xB4), o3(0xEC,0x96,0xB5),
+     o3(0xEC,0x96,0xB8), o3(0xEC,0x96,0xB9),
+     o3(0xEC,0x96,0xBB), o3(0xEC,0x96,0xBC),
+     o3(0xEC,0x96,0xBD), o3(0xEC,0x96,0xBE),
+     o3(0xEC,0x97,0x84), o3(0xEC,0x97,0x85),
+     o3(0xEC,0x97,0x86), o3(0xEC,0x97,0x87),
+     o3(0xEC,0x97,0x88), o3(0xEC,0x97,0x89),
+     o3(0xEC,0x97,0x8A), o3(0xEC,0x97,0x8C),
+     o3(0xEC,0x97,0x8E),
+
+#define from_EUC_KR_BE WORDINDEX2INFO(13513)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BE_infos,
+
+#define from_EUC_KR_BF_infos WORDINDEX2INFO(13515)
+                INVALID, o3(0xEC,0x97,0x90),
+     o3(0xEC,0x97,0x91), o3(0xEC,0x97,0x94),
+     o3(0xEC,0x97,0x98), o3(0xEC,0x97,0xA0),
+     o3(0xEC,0x97,0xA1), o3(0xEC,0x97,0xA3),
+     o3(0xEC,0x97,0xA5), o3(0xEC,0x97,0xAC),
+     o3(0xEC,0x97,0xAD), o3(0xEC,0x97,0xAE),
+     o3(0xEC,0x97,0xB0), o3(0xEC,0x97,0xB4),
+     o3(0xEC,0x97,0xB6), o3(0xEC,0x97,0xB7),
+     o3(0xEC,0x97,0xBC), o3(0xEC,0x97,0xBD),
+     o3(0xEC,0x97,0xBE), o3(0xEC,0x97,0xBF),
+     o3(0xEC,0x98,0x80), o3(0xEC,0x98,0x81),
+     o3(0xEC,0x98,0x85), o3(0xEC,0x98,0x86),
+     o3(0xEC,0x98,0x87), o3(0xEC,0x98,0x88),
+     o3(0xEC,0x98,0x8C), o3(0xEC,0x98,0x90),
+     o3(0xEC,0x98,0x98), o3(0xEC,0x98,0x99),
+     o3(0xEC,0x98,0x9B), o3(0xEC,0x98,0x9C),
+     o3(0xEC,0x98,0xA4), o3(0xEC,0x98,0xA5),
+     o3(0xEC,0x98,0xA8), o3(0xEC,0x98,0xAC),
+     o3(0xEC,0x98,0xAD), o3(0xEC,0x98,0xAE),
+     o3(0xEC,0x98,0xB0), o3(0xEC,0x98,0xB3),
+     o3(0xEC,0x98,0xB4), o3(0xEC,0x98,0xB5),
+     o3(0xEC,0x98,0xB7), o3(0xEC,0x98,0xB9),
+     o3(0xEC,0x98,0xBB), o3(0xEC,0x99,0x80),
+     o3(0xEC,0x99,0x81), o3(0xEC,0x99,0x84),
+     o3(0xEC,0x99,0x88), o3(0xEC,0x99,0x90),
+     o3(0xEC,0x99,0x91), o3(0xEC,0x99,0x93),
+     o3(0xEC,0x99,0x94), o3(0xEC,0x99,0x95),
+     o3(0xEC,0x99,0x9C), o3(0xEC,0x99,0x9D),
+     o3(0xEC,0x99,0xA0), o3(0xEC,0x99,0xAC),
+     o3(0xEC,0x99,0xAF), o3(0xEC,0x99,0xB1),
+     o3(0xEC,0x99,0xB8), o3(0xEC,0x99,0xB9),
+     o3(0xEC,0x99,0xBC), o3(0xEC,0x9A,0x80),
+     o3(0xEC,0x9A,0x88), o3(0xEC,0x9A,0x89),
+     o3(0xEC,0x9A,0x8B), o3(0xEC,0x9A,0x8D),
+     o3(0xEC,0x9A,0x94), o3(0xEC,0x9A,0x95),
+     o3(0xEC,0x9A,0x98), o3(0xEC,0x9A,0x9C),
+     o3(0xEC,0x9A,0xA4), o3(0xEC,0x9A,0xA5),
+     o3(0xEC,0x9A,0xA7), o3(0xEC,0x9A,0xA9),
+     o3(0xEC,0x9A,0xB0), o3(0xEC,0x9A,0xB1),
+     o3(0xEC,0x9A,0xB4), o3(0xEC,0x9A,0xB8),
+     o3(0xEC,0x9A,0xB9), o3(0xEC,0x9A,0xBA),
+     o3(0xEC,0x9B,0x80), o3(0xEC,0x9B,0x81),
+     o3(0xEC,0x9B,0x83), o3(0xEC,0x9B,0x85),
+     o3(0xEC,0x9B,0x8C), o3(0xEC,0x9B,0x8D),
+     o3(0xEC,0x9B,0x90), o3(0xEC,0x9B,0x94),
+     o3(0xEC,0x9B,0x9C), o3(0xEC,0x9B,0x9D),
+     o3(0xEC,0x9B,0xA0), o3(0xEC,0x9B,0xA1),
+     o3(0xEC,0x9B,0xA8),
+
+#define from_EUC_KR_BF WORDINDEX2INFO(13610)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_BF_infos,
+
+#define from_EUC_KR_C0_infos WORDINDEX2INFO(13612)
+                INVALID, o3(0xEC,0x9B,0xA9),
+     o3(0xEC,0x9B,0xAC), o3(0xEC,0x9B,0xB0),
+     o3(0xEC,0x9B,0xB8), o3(0xEC,0x9B,0xB9),
+     o3(0xEC,0x9B,0xBD), o3(0xEC,0x9C,0x84),
+     o3(0xEC,0x9C,0x85), o3(0xEC,0x9C,0x88),
+     o3(0xEC,0x9C,0x8C), o3(0xEC,0x9C,0x94),
+     o3(0xEC,0x9C,0x95), o3(0xEC,0x9C,0x97),
+     o3(0xEC,0x9C,0x99), o3(0xEC,0x9C,0xA0),
+     o3(0xEC,0x9C,0xA1), o3(0xEC,0x9C,0xA4),
+     o3(0xEC,0x9C,0xA8), o3(0xEC,0x9C,0xB0),
+     o3(0xEC,0x9C,0xB1), o3(0xEC,0x9C,0xB3),
+     o3(0xEC,0x9C,0xB5), o3(0xEC,0x9C,0xB7),
+     o3(0xEC,0x9C,0xBC), o3(0xEC,0x9C,0xBD),
+     o3(0xEC,0x9D,0x80), o3(0xEC,0x9D,0x84),
+     o3(0xEC,0x9D,0x8A), o3(0xEC,0x9D,0x8C),
+     o3(0xEC,0x9D,0x8D), o3(0xEC,0x9D,0x8F),
+     o3(0xEC,0x9D,0x91), o3(0xEC,0x9D,0x92),
+     o3(0xEC,0x9D,0x93), o3(0xEC,0x9D,0x94),
+     o3(0xEC,0x9D,0x95), o3(0xEC,0x9D,0x96),
+     o3(0xEC,0x9D,0x97), o3(0xEC,0x9D,0x98),
+     o3(0xEC,0x9D,0x9C), o3(0xEC,0x9D,0xA0),
+     o3(0xEC,0x9D,0xA8), o3(0xEC,0x9D,0xAB),
+     o3(0xEC,0x9D,0xB4), o3(0xEC,0x9D,0xB5),
+     o3(0xEC,0x9D,0xB8), o3(0xEC,0x9D,0xBC),
+     o3(0xEC,0x9D,0xBD), o3(0xEC,0x9D,0xBE),
+     o3(0xEC,0x9E,0x83), o3(0xEC,0x9E,0x84),
+     o3(0xEC,0x9E,0x85), o3(0xEC,0x9E,0x87),
+     o3(0xEC,0x9E,0x88), o3(0xEC,0x9E,0x89),
+     o3(0xEC,0x9E,0x8A), o3(0xEC,0x9E,0x8E),
+     o3(0xEC,0x9E,0x90), o3(0xEC,0x9E,0x91),
+     o3(0xEC,0x9E,0x94), o3(0xEC,0x9E,0x96),
+     o3(0xEC,0x9E,0x97), o3(0xEC,0x9E,0x98),
+     o3(0xEC,0x9E,0x9A), o3(0xEC,0x9E,0xA0),
+     o3(0xEC,0x9E,0xA1), o3(0xEC,0x9E,0xA3),
+     o3(0xEC,0x9E,0xA4), o3(0xEC,0x9E,0xA5),
+     o3(0xEC,0x9E,0xA6), o3(0xEC,0x9E,0xAC),
+     o3(0xEC,0x9E,0xAD), o3(0xEC,0x9E,0xB0),
+     o3(0xEC,0x9E,0xB4), o3(0xEC,0x9E,0xBC),
+     o3(0xEC,0x9E,0xBD), o3(0xEC,0x9E,0xBF),
+     o3(0xEC,0x9F,0x80), o3(0xEC,0x9F,0x81),
+     o3(0xEC,0x9F,0x88), o3(0xEC,0x9F,0x89),
+     o3(0xEC,0x9F,0x8C), o3(0xEC,0x9F,0x8E),
+     o3(0xEC,0x9F,0x90), o3(0xEC,0x9F,0x98),
+     o3(0xEC,0x9F,0x9D), o3(0xEC,0x9F,0xA4),
+     o3(0xEC,0x9F,0xA8), o3(0xEC,0x9F,0xAC),
+     o3(0xEC,0xA0,0x80), o3(0xEC,0xA0,0x81),
+     o3(0xEC,0xA0,0x84), o3(0xEC,0xA0,0x88),
+     o3(0xEC,0xA0,0x8A),
+
+#define from_EUC_KR_C0 WORDINDEX2INFO(13707)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C0_infos,
+
+#define from_EUC_KR_C1_infos WORDINDEX2INFO(13709)
+                INVALID, o3(0xEC,0xA0,0x90),
+     o3(0xEC,0xA0,0x91), o3(0xEC,0xA0,0x93),
+     o3(0xEC,0xA0,0x95), o3(0xEC,0xA0,0x96),
+     o3(0xEC,0xA0,0x9C), o3(0xEC,0xA0,0x9D),
+     o3(0xEC,0xA0,0xA0), o3(0xEC,0xA0,0xA4),
+     o3(0xEC,0xA0,0xAC), o3(0xEC,0xA0,0xAD),
+     o3(0xEC,0xA0,0xAF), o3(0xEC,0xA0,0xB1),
+     o3(0xEC,0xA0,0xB8), o3(0xEC,0xA0,0xBC),
+     o3(0xEC,0xA1,0x80), o3(0xEC,0xA1,0x88),
+     o3(0xEC,0xA1,0x89), o3(0xEC,0xA1,0x8C),
+     o3(0xEC,0xA1,0x8D), o3(0xEC,0xA1,0x94),
+     o3(0xEC,0xA1,0xB0), o3(0xEC,0xA1,0xB1),
+     o3(0xEC,0xA1,0xB4), o3(0xEC,0xA1,0xB8),
+     o3(0xEC,0xA1,0xBA), o3(0xEC,0xA2,0x80),
+     o3(0xEC,0xA2,0x81), o3(0xEC,0xA2,0x83),
+     o3(0xEC,0xA2,0x85), o3(0xEC,0xA2,0x86),
+     o3(0xEC,0xA2,0x87), o3(0xEC,0xA2,0x8B),
+     o3(0xEC,0xA2,0x8C), o3(0xEC,0xA2,0x8D),
+     o3(0xEC,0xA2,0x94), o3(0xEC,0xA2,0x9D),
+     o3(0xEC,0xA2,0x9F), o3(0xEC,0xA2,0xA1),
+     o3(0xEC,0xA2,0xA8), o3(0xEC,0xA2,0xBC),
+     o3(0xEC,0xA2,0xBD), o3(0xEC,0xA3,0x84),
+     o3(0xEC,0xA3,0x88), o3(0xEC,0xA3,0x8C),
+     o3(0xEC,0xA3,0x94), o3(0xEC,0xA3,0x95),
+     o3(0xEC,0xA3,0x97), o3(0xEC,0xA3,0x99),
+     o3(0xEC,0xA3,0xA0), o3(0xEC,0xA3,0xA1),
+     o3(0xEC,0xA3,0xA4), o3(0xEC,0xA3,0xB5),
+     o3(0xEC,0xA3,0xBC), o3(0xEC,0xA3,0xBD),
+     o3(0xEC,0xA4,0x80), o3(0xEC,0xA4,0x84),
+     o3(0xEC,0xA4,0x85), o3(0xEC,0xA4,0x86),
+     o3(0xEC,0xA4,0x8C), o3(0xEC,0xA4,0x8D),
+     o3(0xEC,0xA4,0x8F), o3(0xEC,0xA4,0x91),
+     o3(0xEC,0xA4,0x98), o3(0xEC,0xA4,0xAC),
+     o3(0xEC,0xA4,0xB4), o3(0xEC,0xA5,0x90),
+     o3(0xEC,0xA5,0x91), o3(0xEC,0xA5,0x94),
+     o3(0xEC,0xA5,0x98), o3(0xEC,0xA5,0xA0),
+     o3(0xEC,0xA5,0xA1), o3(0xEC,0xA5,0xA3),
+     o3(0xEC,0xA5,0xAC), o3(0xEC,0xA5,0xB0),
+     o3(0xEC,0xA5,0xB4), o3(0xEC,0xA5,0xBC),
+     o3(0xEC,0xA6,0x88), o3(0xEC,0xA6,0x89),
+     o3(0xEC,0xA6,0x8C), o3(0xEC,0xA6,0x90),
+     o3(0xEC,0xA6,0x98), o3(0xEC,0xA6,0x99),
+     o3(0xEC,0xA6,0x9B), o3(0xEC,0xA6,0x9D),
+     o3(0xEC,0xA7,0x80), o3(0xEC,0xA7,0x81),
+     o3(0xEC,0xA7,0x84), o3(0xEC,0xA7,0x87),
+     o3(0xEC,0xA7,0x88), o3(0xEC,0xA7,0x8A),
+     o3(0xEC,0xA7,0x90), o3(0xEC,0xA7,0x91),
+     o3(0xEC,0xA7,0x93),
+
+#define from_EUC_KR_C1 WORDINDEX2INFO(13804)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C1_infos,
+
+#define from_EUC_KR_C2_infos WORDINDEX2INFO(13806)
+                INVALID, o3(0xEC,0xA7,0x95),
+     o3(0xEC,0xA7,0x96), o3(0xEC,0xA7,0x99),
+     o3(0xEC,0xA7,0x9A), o3(0xEC,0xA7,0x9C),
+     o3(0xEC,0xA7,0x9D), o3(0xEC,0xA7,0xA0),
+     o3(0xEC,0xA7,0xA2), o3(0xEC,0xA7,0xA4),
+     o3(0xEC,0xA7,0xA7), o3(0xEC,0xA7,0xAC),
+     o3(0xEC,0xA7,0xAD), o3(0xEC,0xA7,0xAF),
+     o3(0xEC,0xA7,0xB0), o3(0xEC,0xA7,0xB1),
+     o3(0xEC,0xA7,0xB8), o3(0xEC,0xA7,0xB9),
+     o3(0xEC,0xA7,0xBC), o3(0xEC,0xA8,0x80),
+     o3(0xEC,0xA8,0x88), o3(0xEC,0xA8,0x89),
+     o3(0xEC,0xA8,0x8B), o3(0xEC,0xA8,0x8C),
+     o3(0xEC,0xA8,0x8D), o3(0xEC,0xA8,0x94),
+     o3(0xEC,0xA8,0x98), o3(0xEC,0xA8,0xA9),
+     o3(0xEC,0xA9,0x8C), o3(0xEC,0xA9,0x8D),
+     o3(0xEC,0xA9,0x90), o3(0xEC,0xA9,0x94),
+     o3(0xEC,0xA9,0x9C), o3(0xEC,0xA9,0x9D),
+     o3(0xEC,0xA9,0x9F), o3(0xEC,0xA9,0xA0),
+     o3(0xEC,0xA9,0xA1), o3(0xEC,0xA9,0xA8),
+     o3(0xEC,0xA9,0xBD), o3(0xEC,0xAA,0x84),
+     o3(0xEC,0xAA,0x98), o3(0xEC,0xAA,0xBC),
+     o3(0xEC,0xAA,0xBD), o3(0xEC,0xAB,0x80),
+     o3(0xEC,0xAB,0x84), o3(0xEC,0xAB,0x8C),
+     o3(0xEC,0xAB,0x8D), o3(0xEC,0xAB,0x8F),
+     o3(0xEC,0xAB,0x91), o3(0xEC,0xAB,0x93),
+     o3(0xEC,0xAB,0x98), o3(0xEC,0xAB,0x99),
+     o3(0xEC,0xAB,0xA0), o3(0xEC,0xAB,0xAC),
+     o3(0xEC,0xAB,0xB4), o3(0xEC,0xAC,0x88),
+     o3(0xEC,0xAC,0x90), o3(0xEC,0xAC,0x94),
+     o3(0xEC,0xAC,0x98), o3(0xEC,0xAC,0xA0),
+     o3(0xEC,0xAC,0xA1), o3(0xEC,0xAD,0x81),
+     o3(0xEC,0xAD,0x88), o3(0xEC,0xAD,0x89),
+     o3(0xEC,0xAD,0x8C), o3(0xEC,0xAD,0x90),
+     o3(0xEC,0xAD,0x98), o3(0xEC,0xAD,0x99),
+     o3(0xEC,0xAD,0x9D), o3(0xEC,0xAD,0xA4),
+     o3(0xEC,0xAD,0xB8), o3(0xEC,0xAD,0xB9),
+     o3(0xEC,0xAE,0x9C), o3(0xEC,0xAE,0xB8),
+     o3(0xEC,0xAF,0x94), o3(0xEC,0xAF,0xA4),
+     o3(0xEC,0xAF,0xA7), o3(0xEC,0xAF,0xA9),
+     o3(0xEC,0xB0,0x8C), o3(0xEC,0xB0,0x8D),
+     o3(0xEC,0xB0,0x90), o3(0xEC,0xB0,0x94),
+     o3(0xEC,0xB0,0x9C), o3(0xEC,0xB0,0x9D),
+     o3(0xEC,0xB0,0xA1), o3(0xEC,0xB0,0xA2),
+     o3(0xEC,0xB0,0xA7), o3(0xEC,0xB0,0xA8),
+     o3(0xEC,0xB0,0xA9), o3(0xEC,0xB0,0xAC),
+     o3(0xEC,0xB0,0xAE), o3(0xEC,0xB0,0xB0),
+     o3(0xEC,0xB0,0xB8), o3(0xEC,0xB0,0xB9),
+     o3(0xEC,0xB0,0xBB),
+
+#define from_EUC_KR_C2 WORDINDEX2INFO(13901)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C2_infos,
+
+#define from_EUC_KR_C3_infos WORDINDEX2INFO(13903)
+                INVALID, o3(0xEC,0xB0,0xBC),
+     o3(0xEC,0xB0,0xBD), o3(0xEC,0xB0,0xBE),
+     o3(0xEC,0xB1,0x84), o3(0xEC,0xB1,0x85),
+     o3(0xEC,0xB1,0x88), o3(0xEC,0xB1,0x8C),
+     o3(0xEC,0xB1,0x94), o3(0xEC,0xB1,0x95),
+     o3(0xEC,0xB1,0x97), o3(0xEC,0xB1,0x98),
+     o3(0xEC,0xB1,0x99), o3(0xEC,0xB1,0xA0),
+     o3(0xEC,0xB1,0xA4), o3(0xEC,0xB1,0xA6),
+     o3(0xEC,0xB1,0xA8), o3(0xEC,0xB1,0xB0),
+     o3(0xEC,0xB1,0xB5), o3(0xEC,0xB2,0x98),
+     o3(0xEC,0xB2,0x99), o3(0xEC,0xB2,0x9C),
+     o3(0xEC,0xB2,0xA0), o3(0xEC,0xB2,0xA8),
+     o3(0xEC,0xB2,0xA9), o3(0xEC,0xB2,0xAB),
+     o3(0xEC,0xB2,0xAC), o3(0xEC,0xB2,0xAD),
+     o3(0xEC,0xB2,0xB4), o3(0xEC,0xB2,0xB5),
+     o3(0xEC,0xB2,0xB8), o3(0xEC,0xB2,0xBC),
+     o3(0xEC,0xB3,0x84), o3(0xEC,0xB3,0x85),
+     o3(0xEC,0xB3,0x87), o3(0xEC,0xB3,0x89),
+     o3(0xEC,0xB3,0x90), o3(0xEC,0xB3,0x94),
+     o3(0xEC,0xB3,0xA4), o3(0xEC,0xB3,0xAC),
+     o3(0xEC,0xB3,0xB0), o3(0xEC,0xB4,0x81),
+     o3(0xEC,0xB4,0x88), o3(0xEC,0xB4,0x89),
+     o3(0xEC,0xB4,0x8C), o3(0xEC,0xB4,0x90),
+     o3(0xEC,0xB4,0x98), o3(0xEC,0xB4,0x99),
+     o3(0xEC,0xB4,0x9B), o3(0xEC,0xB4,0x9D),
+     o3(0xEC,0xB4,0xA4), o3(0xEC,0xB4,0xA8),
+     o3(0xEC,0xB4,0xAC), o3(0xEC,0xB4,0xB9),
+     o3(0xEC,0xB5,0x9C), o3(0xEC,0xB5,0xA0),
+     o3(0xEC,0xB5,0xA4), o3(0xEC,0xB5,0xAC),
+     o3(0xEC,0xB5,0xAD), o3(0xEC,0xB5,0xAF),
+     o3(0xEC,0xB5,0xB1), o3(0xEC,0xB5,0xB8),
+     o3(0xEC,0xB6,0x88), o3(0xEC,0xB6,0x94),
+     o3(0xEC,0xB6,0x95), o3(0xEC,0xB6,0x98),
+     o3(0xEC,0xB6,0x9C), o3(0xEC,0xB6,0xA4),
+     o3(0xEC,0xB6,0xA5), o3(0xEC,0xB6,0xA7),
+     o3(0xEC,0xB6,0xA9), o3(0xEC,0xB6,0xB0),
+     o3(0xEC,0xB7,0x84), o3(0xEC,0xB7,0x8C),
+     o3(0xEC,0xB7,0x90), o3(0xEC,0xB7,0xA8),
+     o3(0xEC,0xB7,0xAC), o3(0xEC,0xB7,0xB0),
+     o3(0xEC,0xB7,0xB8), o3(0xEC,0xB7,0xB9),
+     o3(0xEC,0xB7,0xBB), o3(0xEC,0xB7,0xBD),
+     o3(0xEC,0xB8,0x84), o3(0xEC,0xB8,0x88),
+     o3(0xEC,0xB8,0x8C), o3(0xEC,0xB8,0x94),
+     o3(0xEC,0xB8,0x99), o3(0xEC,0xB8,0xA0),
+     o3(0xEC,0xB8,0xA1), o3(0xEC,0xB8,0xA4),
+     o3(0xEC,0xB8,0xA8), o3(0xEC,0xB8,0xB0),
+     o3(0xEC,0xB8,0xB1), o3(0xEC,0xB8,0xB3),
+     o3(0xEC,0xB8,0xB5),
+
+#define from_EUC_KR_C3 WORDINDEX2INFO(13998)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C3_infos,
+
+#define from_EUC_KR_C4_infos WORDINDEX2INFO(14000)
+                INVALID, o3(0xEC,0xB9,0x98),
+     o3(0xEC,0xB9,0x99), o3(0xEC,0xB9,0x9C),
+     o3(0xEC,0xB9,0x9F), o3(0xEC,0xB9,0xA0),
+     o3(0xEC,0xB9,0xA1), o3(0xEC,0xB9,0xA8),
+     o3(0xEC,0xB9,0xA9), o3(0xEC,0xB9,0xAB),
+     o3(0xEC,0xB9,0xAD), o3(0xEC,0xB9,0xB4),
+     o3(0xEC,0xB9,0xB5), o3(0xEC,0xB9,0xB8),
+     o3(0xEC,0xB9,0xBC), o3(0xEC,0xBA,0x84),
+     o3(0xEC,0xBA,0x85), o3(0xEC,0xBA,0x87),
+     o3(0xEC,0xBA,0x89), o3(0xEC,0xBA,0x90),
+     o3(0xEC,0xBA,0x91), o3(0xEC,0xBA,0x94),
+     o3(0xEC,0xBA,0x98), o3(0xEC,0xBA,0xA0),
+     o3(0xEC,0xBA,0xA1), o3(0xEC,0xBA,0xA3),
+     o3(0xEC,0xBA,0xA4), o3(0xEC,0xBA,0xA5),
+     o3(0xEC,0xBA,0xAC), o3(0xEC,0xBA,0xAD),
+     o3(0xEC,0xBB,0x81), o3(0xEC,0xBB,0xA4),
+     o3(0xEC,0xBB,0xA5), o3(0xEC,0xBB,0xA8),
+     o3(0xEC,0xBB,0xAB), o3(0xEC,0xBB,0xAC),
+     o3(0xEC,0xBB,0xB4), o3(0xEC,0xBB,0xB5),
+     o3(0xEC,0xBB,0xB7), o3(0xEC,0xBB,0xB8),
+     o3(0xEC,0xBB,0xB9), o3(0xEC,0xBC,0x80),
+     o3(0xEC,0xBC,0x81), o3(0xEC,0xBC,0x84),
+     o3(0xEC,0xBC,0x88), o3(0xEC,0xBC,0x90),
+     o3(0xEC,0xBC,0x91), o3(0xEC,0xBC,0x93),
+     o3(0xEC,0xBC,0x95), o3(0xEC,0xBC,0x9C),
+     o3(0xEC,0xBC,0xA0), o3(0xEC,0xBC,0xA4),
+     o3(0xEC,0xBC,0xAC), o3(0xEC,0xBC,0xAD),
+     o3(0xEC,0xBC,0xAF), o3(0xEC,0xBC,0xB0),
+     o3(0xEC,0xBC,0xB1), o3(0xEC,0xBC,0xB8),
+     o3(0xEC,0xBD,0x94), o3(0xEC,0xBD,0x95),
+     o3(0xEC,0xBD,0x98), o3(0xEC,0xBD,0x9C),
+     o3(0xEC,0xBD,0xA4), o3(0xEC,0xBD,0xA5),
+     o3(0xEC,0xBD,0xA7), o3(0xEC,0xBD,0xA9),
+     o3(0xEC,0xBD,0xB0), o3(0xEC,0xBD,0xB1),
+     o3(0xEC,0xBD,0xB4), o3(0xEC,0xBD,0xB8),
+     o3(0xEC,0xBE,0x80), o3(0xEC,0xBE,0x85),
+     o3(0xEC,0xBE,0x8C), o3(0xEC,0xBE,0xA1),
+     o3(0xEC,0xBE,0xA8), o3(0xEC,0xBE,0xB0),
+     o3(0xEC,0xBF,0x84), o3(0xEC,0xBF,0xA0),
+     o3(0xEC,0xBF,0xA1), o3(0xEC,0xBF,0xA4),
+     o3(0xEC,0xBF,0xA8), o3(0xEC,0xBF,0xB0),
+     o3(0xEC,0xBF,0xB1), o3(0xEC,0xBF,0xB3),
+     o3(0xEC,0xBF,0xB5), o3(0xEC,0xBF,0xBC),
+     o3(0xED,0x80,0x80), o3(0xED,0x80,0x84),
+     o3(0xED,0x80,0x91), o3(0xED,0x80,0x98),
+     o3(0xED,0x80,0xAD), o3(0xED,0x80,0xB4),
+     o3(0xED,0x80,0xB5), o3(0xED,0x80,0xB8),
+     o3(0xED,0x80,0xBC),
+
+#define from_EUC_KR_C4 WORDINDEX2INFO(14095)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C4_infos,
+
+#define from_EUC_KR_C5_infos WORDINDEX2INFO(14097)
+                INVALID, o3(0xED,0x81,0x84),
+     o3(0xED,0x81,0x85), o3(0xED,0x81,0x87),
+     o3(0xED,0x81,0x89), o3(0xED,0x81,0x90),
+     o3(0xED,0x81,0x94), o3(0xED,0x81,0x98),
+     o3(0xED,0x81,0xA0), o3(0xED,0x81,0xAC),
+     o3(0xED,0x81,0xAD), o3(0xED,0x81,0xB0),
+     o3(0xED,0x81,0xB4), o3(0xED,0x81,0xBC),
+     o3(0xED,0x81,0xBD), o3(0xED,0x82,0x81),
+     o3(0xED,0x82,0xA4), o3(0xED,0x82,0xA5),
+     o3(0xED,0x82,0xA8), o3(0xED,0x82,0xAC),
+     o3(0xED,0x82,0xB4), o3(0xED,0x82,0xB5),
+     o3(0xED,0x82,0xB7), o3(0xED,0x82,0xB9),
+     o3(0xED,0x83,0x80), o3(0xED,0x83,0x81),
+     o3(0xED,0x83,0x84), o3(0xED,0x83,0x88),
+     o3(0xED,0x83,0x89), o3(0xED,0x83,0x90),
+     o3(0xED,0x83,0x91), o3(0xED,0x83,0x93),
+     o3(0xED,0x83,0x94), o3(0xED,0x83,0x95),
+     o3(0xED,0x83,0x9C), o3(0xED,0x83,0x9D),
+     o3(0xED,0x83,0xA0), o3(0xED,0x83,0xA4),
+     o3(0xED,0x83,0xAC), o3(0xED,0x83,0xAD),
+     o3(0xED,0x83,0xAF), o3(0xED,0x83,0xB0),
+     o3(0xED,0x83,0xB1), o3(0xED,0x83,0xB8),
+     o3(0xED,0x84,0x8D), o3(0xED,0x84,0xB0),
+     o3(0xED,0x84,0xB1), o3(0xED,0x84,0xB4),
+     o3(0xED,0x84,0xB8), o3(0xED,0x84,0xBA),
+     o3(0xED,0x85,0x80), o3(0xED,0x85,0x81),
+     o3(0xED,0x85,0x83), o3(0xED,0x85,0x84),
+     o3(0xED,0x85,0x85), o3(0xED,0x85,0x8C),
+     o3(0xED,0x85,0x8D), o3(0xED,0x85,0x90),
+     o3(0xED,0x85,0x94), o3(0xED,0x85,0x9C),
+     o3(0xED,0x85,0x9D), o3(0xED,0x85,0x9F),
+     o3(0xED,0x85,0xA1), o3(0xED,0x85,0xA8),
+     o3(0xED,0x85,0xAC), o3(0xED,0x85,0xBC),
+     o3(0xED,0x86,0x84), o3(0xED,0x86,0x88),
+     o3(0xED,0x86,0xA0), o3(0xED,0x86,0xA1),
+     o3(0xED,0x86,0xA4), o3(0xED,0x86,0xA8),
+     o3(0xED,0x86,0xB0), o3(0xED,0x86,0xB1),
+     o3(0xED,0x86,0xB3), o3(0xED,0x86,0xB5),
+     o3(0xED,0x86,0xBA), o3(0xED,0x86,0xBC),
+     o3(0xED,0x87,0x80), o3(0xED,0x87,0x98),
+     o3(0xED,0x87,0xB4), o3(0xED,0x87,0xB8),
+     o3(0xED,0x88,0x87), o3(0xED,0x88,0x89),
+     o3(0xED,0x88,0x90), o3(0xED,0x88,0xAC),
+     o3(0xED,0x88,0xAD), o3(0xED,0x88,0xB0),
+     o3(0xED,0x88,0xB4), o3(0xED,0x88,0xBC),
+     o3(0xED,0x88,0xBD), o3(0xED,0x88,0xBF),
+     o3(0xED,0x89,0x81), o3(0xED,0x89,0x88),
+     o3(0xED,0x89,0x9C),
+
+#define from_EUC_KR_C5 WORDINDEX2INFO(14192)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C5_infos,
+
+#define from_EUC_KR_C6_infos WORDINDEX2INFO(14194)
+                INVALID, o3(0xED,0x89,0xA4),
+     o3(0xED,0x8A,0x80), o3(0xED,0x8A,0x81),
+     o3(0xED,0x8A,0x84), o3(0xED,0x8A,0x88),
+     o3(0xED,0x8A,0x90), o3(0xED,0x8A,0x91),
+     o3(0xED,0x8A,0x95), o3(0xED,0x8A,0x9C),
+     o3(0xED,0x8A,0xA0), o3(0xED,0x8A,0xA4),
+     o3(0xED,0x8A,0xAC), o3(0xED,0x8A,0xB1),
+     o3(0xED,0x8A,0xB8), o3(0xED,0x8A,0xB9),
+     o3(0xED,0x8A,0xBC), o3(0xED,0x8A,0xBF),
+     o3(0xED,0x8B,0x80), o3(0xED,0x8B,0x82),
+     o3(0xED,0x8B,0x88), o3(0xED,0x8B,0x89),
+     o3(0xED,0x8B,0x8B), o3(0xED,0x8B,0x94),
+     o3(0xED,0x8B,0x98), o3(0xED,0x8B,0x9C),
+     o3(0xED,0x8B,0xA4), o3(0xED,0x8B,0xA5),
+     o3(0xED,0x8B,0xB0), o3(0xED,0x8B,0xB1),
+     o3(0xED,0x8B,0xB4), o3(0xED,0x8B,0xB8),
+     o3(0xED,0x8C,0x80), o3(0xED,0x8C,0x81),
+     o3(0xED,0x8C,0x83), o3(0xED,0x8C,0x85),
+     o3(0xED,0x8C,0x8C), o3(0xED,0x8C,0x8D),
+     o3(0xED,0x8C,0x8E), o3(0xED,0x8C,0x90),
+     o3(0xED,0x8C,0x94), o3(0xED,0x8C,0x96),
+     o3(0xED,0x8C,0x9C), o3(0xED,0x8C,0x9D),
+     o3(0xED,0x8C,0x9F), o3(0xED,0x8C,0xA0),
+     o3(0xED,0x8C,0xA1), o3(0xED,0x8C,0xA5),
+     o3(0xED,0x8C,0xA8), o3(0xED,0x8C,0xA9),
+     o3(0xED,0x8C,0xAC), o3(0xED,0x8C,0xB0),
+     o3(0xED,0x8C,0xB8), o3(0xED,0x8C,0xB9),
+     o3(0xED,0x8C,0xBB), o3(0xED,0x8C,0xBC),
+     o3(0xED,0x8C,0xBD), o3(0xED,0x8D,0x84),
+     o3(0xED,0x8D,0x85), o3(0xED,0x8D,0xBC),
+     o3(0xED,0x8D,0xBD), o3(0xED,0x8E,0x80),
+     o3(0xED,0x8E,0x84), o3(0xED,0x8E,0x8C),
+     o3(0xED,0x8E,0x8D), o3(0xED,0x8E,0x8F),
+     o3(0xED,0x8E,0x90), o3(0xED,0x8E,0x91),
+     o3(0xED,0x8E,0x98), o3(0xED,0x8E,0x99),
+     o3(0xED,0x8E,0x9C), o3(0xED,0x8E,0xA0),
+     o3(0xED,0x8E,0xA8), o3(0xED,0x8E,0xA9),
+     o3(0xED,0x8E,0xAB), o3(0xED,0x8E,0xAD),
+     o3(0xED,0x8E,0xB4), o3(0xED,0x8E,0xB8),
+     o3(0xED,0x8E,0xBC), o3(0xED,0x8F,0x84),
+     o3(0xED,0x8F,0x85), o3(0xED,0x8F,0x88),
+     o3(0xED,0x8F,0x89), o3(0xED,0x8F,0x90),
+     o3(0xED,0x8F,0x98), o3(0xED,0x8F,0xA1),
+     o3(0xED,0x8F,0xA3), o3(0xED,0x8F,0xAC),
+     o3(0xED,0x8F,0xAD), o3(0xED,0x8F,0xB0),
+     o3(0xED,0x8F,0xB4), o3(0xED,0x8F,0xBC),
+     o3(0xED,0x8F,0xBD), o3(0xED,0x8F,0xBF),
+     o3(0xED,0x90,0x81),
+
+#define from_EUC_KR_C6 WORDINDEX2INFO(14289)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C6_infos,
+
+#define from_EUC_KR_C7_infos WORDINDEX2INFO(14291)
+                INVALID, o3(0xED,0x90,0x88),
+     o3(0xED,0x90,0x9D), o3(0xED,0x91,0x80),
+     o3(0xED,0x91,0x84), o3(0xED,0x91,0x9C),
+     o3(0xED,0x91,0xA0), o3(0xED,0x91,0xA4),
+     o3(0xED,0x91,0xAD), o3(0xED,0x91,0xAF),
+     o3(0xED,0x91,0xB8), o3(0xED,0x91,0xB9),
+     o3(0xED,0x91,0xBC), o3(0xED,0x91,0xBF),
+     o3(0xED,0x92,0x80), o3(0xED,0x92,0x82),
+     o3(0xED,0x92,0x88), o3(0xED,0x92,0x89),
+     o3(0xED,0x92,0x8B), o3(0xED,0x92,0x8D),
+     o3(0xED,0x92,0x94), o3(0xED,0x92,0xA9),
+     o3(0xED,0x93,0x8C), o3(0xED,0x93,0x90),
+     o3(0xED,0x93,0x94), o3(0xED,0x93,0x9C),
+     o3(0xED,0x93,0x9F), o3(0xED,0x93,0xA8),
+     o3(0xED,0x93,0xAC), o3(0xED,0x93,0xB0),
+     o3(0xED,0x93,0xB8), o3(0xED,0x93,0xBB),
+     o3(0xED,0x93,0xBD), o3(0xED,0x94,0x84),
+     o3(0xED,0x94,0x88), o3(0xED,0x94,0x8C),
+     o3(0xED,0x94,0x94), o3(0xED,0x94,0x95),
+     o3(0xED,0x94,0x97), o3(0xED,0x94,0xBC),
+     o3(0xED,0x94,0xBD), o3(0xED,0x95,0x80),
+     o3(0xED,0x95,0x84), o3(0xED,0x95,0x8C),
+     o3(0xED,0x95,0x8D), o3(0xED,0x95,0x8F),
+     o3(0xED,0x95,0x91), o3(0xED,0x95,0x98),
+     o3(0xED,0x95,0x99), o3(0xED,0x95,0x9C),
+     o3(0xED,0x95,0xA0), o3(0xED,0x95,0xA5),
+     o3(0xED,0x95,0xA8), o3(0xED,0x95,0xA9),
+     o3(0xED,0x95,0xAB), o3(0xED,0x95,0xAD),
+     o3(0xED,0x95,0xB4), o3(0xED,0x95,0xB5),
+     o3(0xED,0x95,0xB8), o3(0xED,0x95,0xBC),
+     o3(0xED,0x96,0x84), o3(0xED,0x96,0x85),
+     o3(0xED,0x96,0x87), o3(0xED,0x96,0x88),
+     o3(0xED,0x96,0x89), o3(0xED,0x96,0x90),
+     o3(0xED,0x96,0xA5), o3(0xED,0x97,0x88),
+     o3(0xED,0x97,0x89), o3(0xED,0x97,0x8C),
+     o3(0xED,0x97,0x90), o3(0xED,0x97,0x92),
+     o3(0xED,0x97,0x98), o3(0xED,0x97,0x99),
+     o3(0xED,0x97,0x9B), o3(0xED,0x97,0x9D),
+     o3(0xED,0x97,0xA4), o3(0xED,0x97,0xA5),
+     o3(0xED,0x97,0xA8), o3(0xED,0x97,0xAC),
+     o3(0xED,0x97,0xB4), o3(0xED,0x97,0xB5),
+     o3(0xED,0x97,0xB7), o3(0xED,0x97,0xB9),
+     o3(0xED,0x98,0x80), o3(0xED,0x98,0x81),
+     o3(0xED,0x98,0x84), o3(0xED,0x98,0x88),
+     o3(0xED,0x98,0x90), o3(0xED,0x98,0x91),
+     o3(0xED,0x98,0x93), o3(0xED,0x98,0x94),
+     o3(0xED,0x98,0x95), o3(0xED,0x98,0x9C),
+     o3(0xED,0x98,0xA0),
+
+#define from_EUC_KR_C7 WORDINDEX2INFO(14386)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C7_infos,
+
+#define from_EUC_KR_C8_infos WORDINDEX2INFO(14388)
+                INVALID, o3(0xED,0x98,0xA4),
+     o3(0xED,0x98,0xAD), o3(0xED,0x98,0xB8),
+     o3(0xED,0x98,0xB9), o3(0xED,0x98,0xBC),
+     o3(0xED,0x99,0x80), o3(0xED,0x99,0x85),
+     o3(0xED,0x99,0x88), o3(0xED,0x99,0x89),
+     o3(0xED,0x99,0x8B), o3(0xED,0x99,0x8D),
+     o3(0xED,0x99,0x91), o3(0xED,0x99,0x94),
+     o3(0xED,0x99,0x95), o3(0xED,0x99,0x98),
+     o3(0xED,0x99,0x9C), o3(0xED,0x99,0xA7),
+     o3(0xED,0x99,0xA9), o3(0xED,0x99,0xB0),
+     o3(0xED,0x99,0xB1), o3(0xED,0x99,0xB4),
+     o3(0xED,0x9A,0x83), o3(0xED,0x9A,0x85),
+     o3(0xED,0x9A,0x8C), o3(0xED,0x9A,0x8D),
+     o3(0xED,0x9A,0x90), o3(0xED,0x9A,0x94),
+     o3(0xED,0x9A,0x9D), o3(0xED,0x9A,0x9F),
+     o3(0xED,0x9A,0xA1), o3(0xED,0x9A,0xA8),
+     o3(0xED,0x9A,0xAC), o3(0xED,0x9A,0xB0),
+     o3(0xED,0x9A,0xB9), o3(0xED,0x9A,0xBB),
+     o3(0xED,0x9B,0x84), o3(0xED,0x9B,0x85),
+     o3(0xED,0x9B,0x88), o3(0xED,0x9B,0x8C),
+     o3(0xED,0x9B,0x91), o3(0xED,0x9B,0x94),
+     o3(0xED,0x9B,0x97), o3(0xED,0x9B,0x99),
+     o3(0xED,0x9B,0xA0), o3(0xED,0x9B,0xA4),
+     o3(0xED,0x9B,0xA8), o3(0xED,0x9B,0xB0),
+     o3(0xED,0x9B,0xB5), o3(0xED,0x9B,0xBC),
+     o3(0xED,0x9B,0xBD), o3(0xED,0x9C,0x80),
+     o3(0xED,0x9C,0x84), o3(0xED,0x9C,0x91),
+     o3(0xED,0x9C,0x98), o3(0xED,0x9C,0x99),
+     o3(0xED,0x9C,0x9C), o3(0xED,0x9C,0xA0),
+     o3(0xED,0x9C,0xA8), o3(0xED,0x9C,0xA9),
+     o3(0xED,0x9C,0xAB), o3(0xED,0x9C,0xAD),
+     o3(0xED,0x9C,0xB4), o3(0xED,0x9C,0xB5),
+     o3(0xED,0x9C,0xB8), o3(0xED,0x9C,0xBC),
+     o3(0xED,0x9D,0x84), o3(0xED,0x9D,0x87),
+     o3(0xED,0x9D,0x89), o3(0xED,0x9D,0x90),
+     o3(0xED,0x9D,0x91), o3(0xED,0x9D,0x94),
+     o3(0xED,0x9D,0x96), o3(0xED,0x9D,0x97),
+     o3(0xED,0x9D,0x98), o3(0xED,0x9D,0x99),
+     o3(0xED,0x9D,0xA0), o3(0xED,0x9D,0xA1),
+     o3(0xED,0x9D,0xA3), o3(0xED,0x9D,0xA5),
+     o3(0xED,0x9D,0xA9), o3(0xED,0x9D,0xAC),
+     o3(0xED,0x9D,0xB0), o3(0xED,0x9D,0xB4),
+     o3(0xED,0x9D,0xBC), o3(0xED,0x9D,0xBD),
+     o3(0xED,0x9E,0x81), o3(0xED,0x9E,0x88),
+     o3(0xED,0x9E,0x89), o3(0xED,0x9E,0x8C),
+     o3(0xED,0x9E,0x90), o3(0xED,0x9E,0x98),
+     o3(0xED,0x9E,0x99), o3(0xED,0x9E,0x9B),
+     o3(0xED,0x9E,0x9D),
+
+#define from_EUC_KR_C8 WORDINDEX2INFO(14483)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_C8_infos,
+
+#define from_EUC_KR_CA_infos WORDINDEX2INFO(14485)
+                INVALID, o3(0xE4,0xBC,0xBD),
+     o3(0xE4,0xBD,0xB3), o3(0xE5,0x81,0x87),
+     o3(0xE5,0x83,0xB9), o3(0xE5,0x8A,0xA0),
+     o3(0xE5,0x8F,0xAF), o3(0xE5,0x91,0xB5),
+     o3(0xE5,0x93,0xA5), o3(0xE5,0x98,0x89),
+     o3(0xE5,0xAB,0x81), o3(0xE5,0xAE,0xB6),
+     o3(0xE6,0x9A,0x87), o3(0xE6,0x9E,0xB6),
+     o3(0xE6,0x9E,0xB7), o3(0xE6,0x9F,0xAF),
+     o3(0xE6,0xAD,0x8C), o3(0xE7,0x8F,0x82),
+     o3(0xE7,0x97,0x82), o3(0xE7,0xA8,0xBC),
+     o3(0xE8,0x8B,0x9B), o3(0xE8,0x8C,0x84),
+     o3(0xE8,0xA1,0x97), o3(0xE8,0xA2,0x88),
+     o3(0xE8,0xA8,0xB6), o3(0xE8,0xB3,0x88),
+     o3(0xE8,0xB7,0x8F), o3(0xE8,0xBB,0xBB),
+     o3(0xE8,0xBF,0xA6), o3(0xE9,0xA7,0x95),
+     o3(0xE5,0x88,0xBB), o3(0xE5,0x8D,0xB4),
+     o3(0xE5,0x90,0x84), o3(0xE6,0x81,0xAA),
+     o3(0xE6,0x85,0xA4), o3(0xE6,0xAE,0xBC),
+     o3(0xE7,0x8F,0x8F), o3(0xE8,0x84,0x9A),
+     o3(0xE8,0xA6,0xBA), o3(0xE8,0xA7,0x92),
+     o3(0xE9,0x96,0xA3), o3(0xE4,0xBE,0x83),
+     o3(0xE5,0x88,0x8A), o3(0xE5,0xA2,0xBE),
+     o3(0xE5,0xA5,0xB8), o3(0xE5,0xA7,0xA6),
+     o3(0xE5,0xB9,0xB2), o3(0xE5,0xB9,0xB9),
+     o3(0xE6,0x87,0x87), o3(0xE6,0x8F,0x80),
+     o3(0xE6,0x9D,0x86), o3(0xE6,0x9F,0xAC),
+     o3(0xE6,0xA1,0xBF), o3(0xE6,0xBE,0x97),
+     o3(0xE7,0x99,0x8E), o3(0xE7,0x9C,0x8B),
+     o3(0xE7,0xA3,0xB5), o3(0xE7,0xA8,0x88),
+     o3(0xE7,0xAB,0xBF), o3(0xE7,0xB0,0xA1),
+     o3(0xE8,0x82,0x9D), o3(0xE8,0x89,0xAE),
+     o3(0xE8,0x89,0xB1), o3(0xE8,0xAB,0xAB),
+     o3(0xE9,0x96,0x93), o3(0xE4,0xB9,0xAB),
+     o3(0xE5,0x96,0x9D), o3(0xE6,0x9B,0xB7),
+     o3(0xE6,0xB8,0xB4), o3(0xE7,0xA2,0xA3),
+     o3(0xE7,0xAB,0xAD), o3(0xE8,0x91,0x9B),
+     o3(0xE8,0xA4,0x90), o3(0xE8,0x9D,0x8E),
+     o3(0xE9,0x9E,0xA8), o3(0xE5,0x8B,0x98),
+     o3(0xE5,0x9D,0x8E), o3(0xE5,0xA0,0xAA),
+     o3(0xE5,0xB5,0x8C), o3(0xE6,0x84,0x9F),
+     o3(0xE6,0x86,0xBE), o3(0xE6,0x88,0xA1),
+     o3(0xE6,0x95,0xA2), o3(0xE6,0x9F,0x91),
+     o3(0xE6,0xA9,0x84), o3(0xE6,0xB8,0x9B),
+     o3(0xE7,0x94,0x98), o3(0xE7,0x96,0xB3),
+     o3(0xE7,0x9B,0xA3), o3(0xE7,0x9E,0xB0),
+     o3(0xE7,0xB4,0xBA), o3(0xE9,0x82,0xAF),
+     o3(0xE9,0x91,0x91), o3(0xE9,0x91,0x92),
+     o3(0xE9,0xBE,0x95),
+
+#define from_EUC_KR_CA WORDINDEX2INFO(14580)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CA_infos,
+
+#define from_EUC_KR_CB_infos WORDINDEX2INFO(14582)
+                INVALID, o3(0xE5,0x8C,0xA3),
+     o3(0xE5,0xB2,0xAC), o3(0xE7,0x94,0xB2),
+     o3(0xE8,0x83,0x9B), o3(0xE9,0x89,0x80),
+     o3(0xE9,0x96,0x98), o3(0xE5,0x89,0x9B),
+     o3(0xE5,0xA0,0x88), o3(0xE5,0xA7,0x9C),
+     o3(0xE5,0xB2,0xA1), o3(0xE5,0xB4,0x97),
+     o3(0xE5,0xBA,0xB7), o3(0xE5,0xBC,0xBA),
+     o3(0xE5,0xBD,0x8A), o3(0xE6,0x85,0xB7),
+     o3(0xE6,0xB1,0x9F), o3(0xE7,0x95,0xBA),
+     o3(0xE7,0x96,0x86), o3(0xE7,0xB3,0xA0),
+     o3(0xE7,0xB5,0xB3), o3(0xE7,0xB6,0xB1),
+     o3(0xE7,0xBE,0x8C), o3(0xE8,0x85,0x94),
+     o3(0xE8,0x88,0xA1), o3(0xE8,0x96,0x91),
+     o3(0xE8,0xA5,0x81), o3(0xE8,0xAC,0x9B),
+     o3(0xE9,0x8B,0xBC), o3(0xE9,0x99,0x8D),
+     o3(0xE9,0xB1,0x87), o3(0xE4,0xBB,0x8B),
+     o3(0xE4,0xBB,0xB7), o3(0xE5,0x80,0x8B),
+     o3(0xE5,0x87,0xB1), o3(0xE5,0xA1,0x8F),
+     o3(0xE6,0x84,0xB7), o3(0xE6,0x84,0xBE),
+     o3(0xE6,0x85,0xA8), o3(0xE6,0x94,0xB9),
+     o3(0xE6,0xA7,0xAA), o3(0xE6,0xBC,0x91),
+     o3(0xE7,0x96,0xA5), o3(0xE7,0x9A,0x86),
+     o3(0xE7,0x9B,0x96), o3(0xE7,0xAE,0x87),
+     o3(0xE8,0x8A,0xA5), o3(0xE8,0x93,0x8B),
+     o3(0xEF,0xA4,0x80), o3(0xE9,0x8E,0xA7),
+     o3(0xE9,0x96,0x8B), o3(0xE5,0x96,0x80),
+     o3(0xE5,0xAE,0xA2), o3(0xE5,0x9D,0x91),
+     o3(0xEF,0xA4,0x81), o3(0xE7,0xB2,0xB3),
+     o3(0xE7,0xBE,0xB9), o3(0xE9,0x86,0xB5),
+     o3(0xE5,0x80,0xA8), o3(0xE5,0x8E,0xBB),
+     o3(0xE5,0xB1,0x85), o3(0xE5,0xB7,0xA8),
+     o3(0xE6,0x8B,0x92), o3(0xE6,0x8D,0xAE),
+     o3(0xE6,0x93,0x9A), o3(0xE6,0x93,0xA7),
+     o3(0xE6,0xB8,0xA0), o3(0xE7,0x82,0xAC),
+     o3(0xE7,0xA5,0x9B), o3(0xE8,0xB7,0x9D),
+     o3(0xE8,0xB8,0x9E), o3(0xEF,0xA4,0x82),
+     o3(0xE9,0x81,0xBD), o3(0xE9,0x89,0x85),
+     o3(0xE9,0x8B,0xB8), o3(0xE4,0xB9,0xBE),
+     o3(0xE4,0xBB,0xB6), o3(0xE5,0x81,0xA5),
+     o3(0xE5,0xB7,0xBE), o3(0xE5,0xBB,0xBA),
+     o3(0xE6,0x84,0x86), o3(0xE6,0xA5,0x97),
+     o3(0xE8,0x85,0xB1), o3(0xE8,0x99,0x94),
+     o3(0xE8,0xB9,0x87), o3(0xE9,0x8D,0xB5),
+     o3(0xE9,0xA8,0xAB), o3(0xE4,0xB9,0x9E),
+     o3(0xE5,0x82,0x91), o3(0xE6,0x9D,0xB0),
+     o3(0xE6,0xA1,0x80), o3(0xE5,0x84,0x89),
+     o3(0xE5,0x8A,0x8D), o3(0xE5,0x8A,0x92),
+     o3(0xE6,0xAA,0xA2),
+
+#define from_EUC_KR_CB WORDINDEX2INFO(14677)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CB_infos,
+
+#define from_EUC_KR_CC_infos WORDINDEX2INFO(14679)
+                INVALID, o3(0xE7,0x9E,0xBC),
+     o3(0xE9,0x88,0x90), o3(0xE9,0xBB,0x94),
+     o3(0xE5,0x8A,0xAB), o3(0xE6,0x80,0xAF),
+     o3(0xE8,0xBF,0xB2), o3(0xE5,0x81,0x88),
+     o3(0xE6,0x86,0xA9), o3(0xE6,0x8F,0xAD),
+     o3(0xE6,0x93,0x8A), o3(0xE6,0xA0,0xBC),
+     o3(0xE6,0xAA,0x84), o3(0xE6,0xBF,0x80),
+     o3(0xE8,0x86,0x88), o3(0xE8,0xA6,0xA1),
+     o3(0xE9,0x9A,0x94), o3(0xE5,0xA0,0x85),
+     o3(0xE7,0x89,0xBD), o3(0xE7,0x8A,0xAC),
+     o3(0xE7,0x94,0x84), o3(0xE7,0xB5,0xB9),
+     o3(0xE7,0xB9,0xAD), o3(0xE8,0x82,0xA9),
+     o3(0xE8,0xA6,0x8B), o3(0xE8,0xAD,0xB4),
+     o3(0xE9,0x81,0xA3), o3(0xE9,0xB5,0x91),
+     o3(0xE6,0x8A,0x89), o3(0xE6,0xB1,0xBA),
+     o3(0xE6,0xBD,0x94), o3(0xE7,0xB5,0x90),
+     o3(0xE7,0xBC,0xBA), o3(0xE8,0xA8,0xA3),
+     o3(0xE5,0x85,0xBC), o3(0xE6,0x85,0x8A),
+     o3(0xE7,0xAE,0x9D), o3(0xE8,0xAC,0x99),
+     o3(0xE9,0x89,0x97), o3(0xE9,0x8E,0x8C),
+     o3(0xE4,0xBA,0xAC), o3(0xE4,0xBF,0x93),
+     o3(0xE5,0x80,0x9E), o3(0xE5,0x82,0xBE),
+     o3(0xE5,0x84,0x86), o3(0xE5,0x8B,0x81),
+     o3(0xE5,0x8B,0x8D), o3(0xE5,0x8D,0xBF),
+     o3(0xE5,0x9D,0xB0), o3(0xE5,0xA2,0x83),
+     o3(0xE5,0xBA,0x9A), o3(0xE5,0xBE,0x91),
+     o3(0xE6,0x85,0xB6), o3(0xE6,0x86,0xAC),
+     o3(0xE6,0x93,0x8E), o3(0xE6,0x95,0xAC),
+     o3(0xE6,0x99,0xAF), o3(0xE6,0x9A,0xBB),
+     o3(0xE6,0x9B,0xB4), o3(0xE6,0xA2,0x97),
+     o3(0xE6,0xB6,0x87), o3(0xE7,0x82,0x85),
+     o3(0xE7,0x83,0xB1), o3(0xE7,0x92,0x9F),
+     o3(0xE7,0x92,0xA5), o3(0xE7,0x93,0x8A),
+     o3(0xE7,0x97,0x99), o3(0xE7,0xA1,0xAC),
+     o3(0xE7,0xA3,0xAC), o3(0xE7,0xAB,0x9F),
+     o3(0xE7,0xAB,0xB6), o3(0xE7,0xB5,0x85),
+     o3(0xE7,0xB6,0x93), o3(0xE8,0x80,0x95),
+     o3(0xE8,0x80,0xBF), o3(0xE8,0x84,0x9B),
+     o3(0xE8,0x8E,0x96), o3(0xE8,0xAD,0xA6),
+     o3(0xE8,0xBC,0x95), o3(0xE9,0x80,0x95),
+     o3(0xE9,0x8F,0xA1), o3(0xE9,0xA0,0x83),
+     o3(0xE9,0xA0,0xB8), o3(0xE9,0xA9,0x9A),
+     o3(0xE9,0xAF,0xA8), o3(0xE4,0xBF,0x82),
+     o3(0xE5,0x95,0x93), o3(0xE5,0xA0,0xBA),
+     o3(0xE5,0xA5,0x91), o3(0xE5,0xAD,0xA3),
+     o3(0xE5,0xB1,0x86), o3(0xE6,0x82,0xB8),
+     o3(0xE6,0x88,0x92), o3(0xE6,0xA1,0x82),
+     o3(0xE6,0xA2,0xB0),
+
+#define from_EUC_KR_CC WORDINDEX2INFO(14774)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CC_infos,
+
+#define from_EUC_KR_CD_infos WORDINDEX2INFO(14776)
+                INVALID, o3(0xE6,0xA3,0xA8),
+     o3(0xE6,0xBA,0xAA), o3(0xE7,0x95,0x8C),
+     o3(0xE7,0x99,0xB8), o3(0xE7,0xA3,0x8E),
+     o3(0xE7,0xA8,0xBD), o3(0xE7,0xB3,0xBB),
+     o3(0xE7,0xB9,0xAB), o3(0xE7,0xB9,0xBC),
+     o3(0xE8,0xA8,0x88), o3(0xE8,0xAA,0xA1),
+     o3(0xE8,0xB0,0xBF), o3(0xE9,0x9A,0x8E),
+     o3(0xE9,0xB7,0x84), o3(0xE5,0x8F,0xA4),
+     o3(0xE5,0x8F,0xA9), o3(0xE5,0x91,0x8A),
+     o3(0xE5,0x91,0xB1), o3(0xE5,0x9B,0xBA),
+     o3(0xE5,0xA7,0x91), o3(0xE5,0xAD,0xA4),
+     o3(0xE5,0xB0,0xBB), o3(0xE5,0xBA,0xAB),
+     o3(0xE6,0x8B,0xB7), o3(0xE6,0x94,0xB7),
+     o3(0xE6,0x95,0x85), o3(0xE6,0x95,0xB2),
+     o3(0xE6,0x9A,0xA0), o3(0xE6,0x9E,0xAF),
+     o3(0xE6,0xA7,0x81), o3(0xE6,0xB2,0xBD),
+     o3(0xE7,0x97,0xBC), o3(0xE7,0x9A,0x90),
+     o3(0xE7,0x9D,0xBE), o3(0xE7,0xA8,0xBF),
+     o3(0xE7,0xBE,0x94), o3(0xE8,0x80,0x83),
+     o3(0xE8,0x82,0xA1), o3(0xE8,0x86,0x8F),
+     o3(0xE8,0x8B,0xA6), o3(0xE8,0x8B,0xBD),
+     o3(0xE8,0x8F,0xB0), o3(0xE8,0x97,0x81),
+     o3(0xE8,0xA0,0xB1), o3(0xE8,0xA2,0xB4),
+     o3(0xE8,0xAA,0xA5), o3(0xEF,0xA4,0x83),
+     o3(0xE8,0xBE,0x9C), o3(0xE9,0x8C,0xAE),
+     o3(0xE9,0x9B,0x87), o3(0xE9,0xA1,0xA7),
+     o3(0xE9,0xAB,0x98), o3(0xE9,0xBC,0x93),
+     o3(0xE5,0x93,0xAD), o3(0xE6,0x96,0x9B),
+     o3(0xE6,0x9B,0xB2), o3(0xE6,0xA2,0x8F),
+     o3(0xE7,0xA9,0x80), o3(0xE8,0xB0,0xB7),
+     o3(0xE9,0xB5,0xA0), o3(0xE5,0x9B,0xB0),
+     o3(0xE5,0x9D,0xA4), o3(0xE5,0xB4,0x91),
+     o3(0xE6,0x98,0x86), o3(0xE6,0xA2,0xB1),
+     o3(0xE6,0xA3,0x8D), o3(0xE6,0xBB,0xBE),
+     o3(0xE7,0x90,0xA8), o3(0xE8,0xA2,0x9E),
+     o3(0xE9,0xAF,0xA4), o3(0xE6,0xB1,0xA8),
+     o3(0xEF,0xA4,0x84), o3(0xE9,0xAA,0xA8),
+     o3(0xE4,0xBE,0x9B), o3(0xE5,0x85,0xAC),
+     o3(0xE5,0x85,0xB1), o3(0xE5,0x8A,0x9F),
+     o3(0xE5,0xAD,0x94), o3(0xE5,0xB7,0xA5),
+     o3(0xE6,0x81,0x90), o3(0xE6,0x81,0xAD),
+     o3(0xE6,0x8B,0xB1), o3(0xE6,0x8E,0xA7),
+     o3(0xE6,0x94,0xBB), o3(0xE7,0x8F,0x99),
+     o3(0xE7,0xA9,0xBA), o3(0xE8,0x9A,0xA3),
+     o3(0xE8,0xB2,0xA2), o3(0xE9,0x9E,0x8F),
+     o3(0xE4,0xB8,0xB2), o3(0xE5,0xAF,0xA1),
+     o3(0xE6,0x88,0x88), o3(0xE6,0x9E,0x9C),
+     o3(0xE7,0x93,0x9C),
+
+#define from_EUC_KR_CD WORDINDEX2INFO(14871)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CD_infos,
+
+#define from_EUC_KR_CE_infos WORDINDEX2INFO(14873)
+                INVALID, o3(0xE7,0xA7,0x91),
+     o3(0xE8,0x8F,0x93), o3(0xE8,0xAA,0x87),
+     o3(0xE8,0xAA,0xB2), o3(0xE8,0xB7,0xA8),
+     o3(0xE9,0x81,0x8E), o3(0xE9,0x8D,0x8B),
+     o3(0xE9,0xA1,0x86), o3(0xE5,0xBB,0x93),
+     o3(0xE6,0xA7,0xA8), o3(0xE8,0x97,0xBF),
+     o3(0xE9,0x83,0xAD), o3(0xEF,0xA4,0x85),
+     o3(0xE5,0x86,0xA0), o3(0xE5,0xAE,0x98),
+     o3(0xE5,0xAF,0xAC), o3(0xE6,0x85,0xA3),
+     o3(0xE6,0xA3,0xBA), o3(0xE6,0xAC,0xBE),
+     o3(0xE7,0x81,0x8C), o3(0xE7,0x90,0xAF),
+     o3(0xE7,0x93,0x98), o3(0xE7,0xAE,0xA1),
+     o3(0xE7,0xBD,0x90), o3(0xE8,0x8F,0x85),
+     o3(0xE8,0xA7,0x80), o3(0xE8,0xB2,0xAB),
+     o3(0xE9,0x97,0x9C), o3(0xE9,0xA4,0xA8),
+     o3(0xE5,0x88,0xAE), o3(0xE6,0x81,0x9D),
+     o3(0xE6,0x8B,0xAC), o3(0xE9,0x80,0x82),
+     o3(0xE4,0xBE,0x8A), o3(0xE5,0x85,0x89),
+     o3(0xE5,0x8C,0xA1), o3(0xE5,0xA3,0x99),
+     o3(0xE5,0xBB,0xA3), o3(0xE6,0x9B,0xA0),
+     o3(0xE6,0xB4,0xB8), o3(0xE7,0x82,0x9A),
+     o3(0xE7,0x8B,0x82), o3(0xE7,0x8F,0x96),
+     o3(0xE7,0xAD,0x90), o3(0xE8,0x83,0xB1),
+     o3(0xE9,0x91,0x9B), o3(0xE5,0x8D,0xA6),
+     o3(0xE6,0x8E,0x9B), o3(0xE7,0xBD,0xAB),
+     o3(0xE4,0xB9,0x96), o3(0xE5,0x82,0x80),
+     o3(0xE5,0xA1,0x8A), o3(0xE5,0xA3,0x9E),
+     o3(0xE6,0x80,0xAA), o3(0xE6,0x84,0xA7),
+     o3(0xE6,0x8B,0x90), o3(0xE6,0xA7,0x90),
+     o3(0xE9,0xAD,0x81), o3(0xE5,0xAE,0x8F),
+     o3(0xE7,0xB4,0x98), o3(0xE8,0x82,0xB1),
+     o3(0xE8,0xBD,0x9F), o3(0xE4,0xBA,0xA4),
+     o3(0xE5,0x83,0x91), o3(0xE5,0x92,0xAC),
+     o3(0xE5,0x96,0xAC), o3(0xE5,0xAC,0x8C),
+     o3(0xE5,0xB6,0xA0), o3(0xE5,0xB7,0xA7),
+     o3(0xE6,0x94,0xAA), o3(0xE6,0x95,0x8E),
+     o3(0xE6,0xA0,0xA1), o3(0xE6,0xA9,0x8B),
+     o3(0xE7,0x8B,0xA1), o3(0xE7,0x9A,0x8E),
+     o3(0xE7,0x9F,0xAF), o3(0xE7,0xB5,0x9E),
+     o3(0xE7,0xBF,0xB9), o3(0xE8,0x86,0xA0),
+     o3(0xE8,0x95,0x8E), o3(0xE8,0x9B,0x9F),
+     o3(0xE8,0xBC,0x83), o3(0xE8,0xBD,0x8E),
+     o3(0xE9,0x83,0x8A), o3(0xE9,0xA4,0x83),
+     o3(0xE9,0xA9,0x95), o3(0xE9,0xAE,0xAB),
+     o3(0xE4,0xB8,0x98), o3(0xE4,0xB9,0x85),
+     o3(0xE4,0xB9,0x9D), o3(0xE4,0xBB,0x87),
+     o3(0xE4,0xBF,0xB1), o3(0xE5,0x85,0xB7),
+     o3(0xE5,0x8B,0xBE),
+
+#define from_EUC_KR_CE WORDINDEX2INFO(14968)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CE_infos,
+
+#define from_EUC_KR_CF_infos WORDINDEX2INFO(14970)
+                INVALID, o3(0xE5,0x8D,0x80),
+     o3(0xE5,0x8F,0xA3), o3(0xE5,0x8F,0xA5),
+     o3(0xE5,0x92,0x8E), o3(0xE5,0x98,0x94),
+     o3(0xE5,0x9D,0xB5), o3(0xE5,0x9E,0xA2),
+     o3(0xE5,0xAF,0x87), o3(0xE5,0xB6,0x87),
+     o3(0xE5,0xBB,0x90), o3(0xE6,0x87,0xBC),
+     o3(0xE6,0x8B,0x98), o3(0xE6,0x95,0x91),
+     o3(0xE6,0x9E,0xB8), o3(0xE6,0x9F,0xA9),
+     o3(0xE6,0xA7,0x8B), o3(0xE6,0xAD,0x90),
+     o3(0xE6,0xAF,0x86), o3(0xE6,0xAF,0xAC),
+     o3(0xE6,0xB1,0x82), o3(0xE6,0xBA,0x9D),
+     o3(0xE7,0x81,0xB8), o3(0xE7,0x8B,0x97),
+     o3(0xE7,0x8E,0x96), o3(0xE7,0x90,0x83),
+     o3(0xE7,0x9E,0xBF), o3(0xE7,0x9F,0xA9),
+     o3(0xE7,0xA9,0xB6), o3(0xE7,0xB5,0xBF),
+     o3(0xE8,0x80,0x89), o3(0xE8,0x87,0xBC),
+     o3(0xE8,0x88,0x85), o3(0xE8,0x88,0x8A),
+     o3(0xE8,0x8B,0x9F), o3(0xE8,0xA1,0xA2),
+     o3(0xE8,0xAC,0xB3), o3(0xE8,0xB3,0xBC),
+     o3(0xE8,0xBB,0x80), o3(0xE9,0x80,0x91),
+     o3(0xE9,0x82,0xB1), o3(0xE9,0x89,0xA4),
+     o3(0xE9,0x8A,0xB6), o3(0xE9,0xA7,0x92),
+     o3(0xE9,0xA9,0x85), o3(0xE9,0xB3,0xA9),
+     o3(0xE9,0xB7,0x97), o3(0xE9,0xBE,0x9C),
+     o3(0xE5,0x9C,0x8B), o3(0xE5,0xB1,0x80),
+     o3(0xE8,0x8F,0x8A), o3(0xE9,0x9E,0xA0),
+     o3(0xE9,0x9E,0xAB), o3(0xE9,0xBA,0xB4),
+     o3(0xE5,0x90,0x9B), o3(0xE7,0xAA,0x98),
+     o3(0xE7,0xBE,0xA4), o3(0xE8,0xA3,0x99),
+     o3(0xE8,0xBB,0x8D), o3(0xE9,0x83,0xA1),
+     o3(0xE5,0xA0,0x80), o3(0xE5,0xB1,0x88),
+     o3(0xE6,0x8E,0x98), o3(0xE7,0xAA,0x9F),
+     o3(0xE5,0xAE,0xAE), o3(0xE5,0xBC,0x93),
+     o3(0xE7,0xA9,0xB9), o3(0xE7,0xAA,0xAE),
+     o3(0xE8,0x8A,0x8E), o3(0xE8,0xBA,0xAC),
+     o3(0xE5,0x80,0xA6), o3(0xE5,0x88,0xB8),
+     o3(0xE5,0x8B,0xB8), o3(0xE5,0x8D,0xB7),
+     o3(0xE5,0x9C,0x88), o3(0xE6,0x8B,0xB3),
+     o3(0xE6,0x8D,0xB2), o3(0xE6,0xAC,0x8A),
+     o3(0xE6,0xB7,0x83), o3(0xE7,0x9C,0xB7),
+     o3(0xE5,0x8E,0xA5), o3(0xE7,0x8D,0x97),
+     o3(0xE8,0x95,0xA8), o3(0xE8,0xB9,0xB6),
+     o3(0xE9,0x97,0x95), o3(0xE6,0x9C,0xBA),
+     o3(0xE6,0xAB,0x83), o3(0xE6,0xBD,0xB0),
+     o3(0xE8,0xA9,0xAD), o3(0xE8,0xBB,0x8C),
+     o3(0xE9,0xA5,0x8B), o3(0xEF,0xA4,0x86),
+     o3(0xE6,0x99,0xB7), o3(0xE6,0xAD,0xB8),
+     o3(0xE8,0xB2,0xB4),
+
+#define from_EUC_KR_CF WORDINDEX2INFO(15065)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_CF_infos,
+
+#define from_EUC_KR_D0_infos WORDINDEX2INFO(15067)
+                INVALID, o3(0xE9,0xAC,0xBC),
+     o3(0xEF,0xA4,0x87), o3(0xE5,0x8F,0xAB),
+     o3(0xE5,0x9C,0xAD), o3(0xE5,0xA5,0x8E),
+     o3(0xE6,0x8F,0x86), o3(0xE6,0xA7,0xBB),
+     o3(0xE7,0x8F,0xAA), o3(0xE7,0xA1,0x85),
+     o3(0xE7,0xAA,0xBA), o3(0xE7,0xAB,0x85),
+     o3(0xE7,0xB3,0xBE), o3(0xE8,0x91,0xB5),
+     o3(0xE8,0xA6,0x8F), o3(0xE8,0xB5,0xB3),
+     o3(0xE9,0x80,0xB5), o3(0xE9,0x96,0xA8),
+     o3(0xE5,0x8B,0xBB), o3(0xE5,0x9D,0x87),
+     o3(0xE7,0x95,0x87), o3(0xE7,0xAD,0xA0),
+     o3(0xE8,0x8F,0x8C), o3(0xE9,0x88,0x9E),
+     o3(0xEF,0xA4,0x88), o3(0xE6,0xA9,0x98),
+     o3(0xE5,0x85,0x8B), o3(0xE5,0x89,0x8B),
+     o3(0xE5,0x8A,0x87), o3(0xE6,0x88,0x9F),
+     o3(0xE6,0xA3,0x98), o3(0xE6,0xA5,0xB5),
+     o3(0xE9,0x9A,0x99), o3(0xE5,0x83,0x85),
+     o3(0xE5,0x8A,0xA4), o3(0xE5,0x8B,0xA4),
+     o3(0xE6,0x87,0x83), o3(0xE6,0x96,0xA4),
+     o3(0xE6,0xA0,0xB9), o3(0xE6,0xA7,0xBF),
+     o3(0xE7,0x91,0xBE), o3(0xE7,0xAD,0x8B),
+     o3(0xE8,0x8A,0xB9), o3(0xE8,0x8F,0xAB),
+     o3(0xE8,0xA6,0xB2), o3(0xE8,0xAC,0xB9),
+     o3(0xE8,0xBF,0x91), o3(0xE9,0xA5,0x89),
+     o3(0xEF,0xA4,0x89), o3(0xE4,0xBB,0x8A),
+     o3(0xE5,0xA6,0x97), o3(0xE6,0x93,0x92),
+     o3(0xE6,0x98,0x91), o3(0xE6,0xAA,0x8E),
+     o3(0xE7,0x90,0xB4), o3(0xE7,0xA6,0x81),
+     o3(0xE7,0xA6,0xBD), o3(0xE8,0x8A,0xA9),
+     o3(0xE8,0xA1,0xBE), o3(0xE8,0xA1,0xBF),
+     o3(0xE8,0xA5,0x9F), o3(0xEF,0xA4,0x8A),
+     o3(0xE9,0x8C,0xA6), o3(0xE4,0xBC,0x8B),
+     o3(0xE5,0x8F,0x8A), o3(0xE6,0x80,0xA5),
+     o3(0xE6,0x89,0xB1), o3(0xE6,0xB1,0xB2),
+     o3(0xE7,0xB4,0x9A), o3(0xE7,0xB5,0xA6),
+     o3(0xE4,0xBA,0x98), o3(0xE5,0x85,0xA2),
+     o3(0xE7,0x9F,0x9C), o3(0xE8,0x82,0xAF),
+     o3(0xE4,0xBC,0x81), o3(0xE4,0xBC,0x8E),
+     o3(0xE5,0x85,0xB6), o3(0xE5,0x86,0x80),
+     o3(0xE5,0x97,0x9C), o3(0xE5,0x99,0xA8),
+     o3(0xE5,0x9C,0xBB), o3(0xE5,0x9F,0xBA),
+     o3(0xE5,0x9F,0xBC), o3(0xE5,0xA4,0x94),
+     o3(0xE5,0xA5,0x87), o3(0xE5,0xA6,0x93),
+     o3(0xE5,0xAF,0x84), o3(0xE5,0xB2,0x90),
+     o3(0xE5,0xB4,0x8E), o3(0xE5,0xB7,0xB1),
+     o3(0xE5,0xB9,0xBE), o3(0xE5,0xBF,0x8C),
+     o3(0xE6,0x8A,0x80), o3(0xE6,0x97,0x97),
+     o3(0xE6,0x97,0xA3),
+
+#define from_EUC_KR_D0 WORDINDEX2INFO(15162)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D0_infos,
+
+#define from_EUC_KR_D1_infos WORDINDEX2INFO(15164)
+                INVALID, o3(0xE6,0x9C,0x9E),
+     o3(0xE6,0x9C,0x9F), o3(0xE6,0x9D,0x9E),
+     o3(0xE6,0xA3,0x8B), o3(0xE6,0xA3,0x84),
+     o3(0xE6,0xA9,0x9F), o3(0xE6,0xAC,0xBA),
+     o3(0xE6,0xB0,0xA3), o3(0xE6,0xB1,0xBD),
+     o3(0xE6,0xB2,0x82), o3(0xE6,0xB7,0x87),
+     o3(0xE7,0x8E,0x98), o3(0xE7,0x90,0xA6),
+     o3(0xE7,0x90,0xAA), o3(0xE7,0x92,0x82),
+     o3(0xE7,0x92,0xA3), o3(0xE7,0x95,0xB8),
+     o3(0xE7,0x95,0xBF), o3(0xE7,0xA2,0x81),
+     o3(0xE7,0xA3,0xAF), o3(0xE7,0xA5,0x81),
+     o3(0xE7,0xA5,0x87), o3(0xE7,0xA5,0x88),
+     o3(0xE7,0xA5,0xBA), o3(0xE7,0xAE,0x95),
+     o3(0xE7,0xB4,0x80), o3(0xE7,0xB6,0xBA),
+     o3(0xE7,0xBE,0x88), o3(0xE8,0x80,0x86),
+     o3(0xE8,0x80,0xAD), o3(0xE8,0x82,0x8C),
+     o3(0xE8,0xA8,0x98), o3(0xE8,0xAD,0x8F),
+     o3(0xE8,0xB1,0x88), o3(0xE8,0xB5,0xB7),
+     o3(0xE9,0x8C,0xA1), o3(0xE9,0x8C,0xA4),
+     o3(0xE9,0xA3,0xA2), o3(0xE9,0xA5,0x91),
+     o3(0xE9,0xA8,0x8E), o3(0xE9,0xA8,0x8F),
+     o3(0xE9,0xA9,0xA5), o3(0xE9,0xBA,0x92),
+     o3(0xE7,0xB7,0x8A), o3(0xE4,0xBD,0xB6),
+     o3(0xE5,0x90,0x89), o3(0xE6,0x8B,0xAE),
+     o3(0xE6,0xA1,0x94), o3(0xE9,0x87,0x91),
+     o3(0xE5,0x96,0xAB), o3(0xE5,0x84,0xBA),
+     o3(0xEF,0xA4,0x8B), o3(0xEF,0xA4,0x8C),
+     o3(0xE5,0xA8,0x9C), o3(0xE6,0x87,0xA6),
+     o3(0xEF,0xA4,0x8D), o3(0xE6,0x8B,0x8F),
+     o3(0xE6,0x8B,0xBF), o3(0xEF,0xA4,0x8E),
+     o3(0xEF,0xA4,0x8F), o3(0xEF,0xA4,0x90),
+     o3(0xEF,0xA4,0x91), o3(0xEF,0xA4,0x92),
+     o3(0xEF,0xA4,0x93), o3(0xE9,0x82,0xA3),
+     o3(0xEF,0xA4,0x94), o3(0xEF,0xA4,0x95),
+     o3(0xEF,0xA4,0x96), o3(0xEF,0xA4,0x97),
+     o3(0xEF,0xA4,0x98), o3(0xE8,0xAB,0xBE),
+     o3(0xEF,0xA4,0x99), o3(0xEF,0xA4,0x9A),
+     o3(0xEF,0xA4,0x9B), o3(0xEF,0xA4,0x9C),
+     o3(0xE6,0x9A,0x96), o3(0xEF,0xA4,0x9D),
+     o3(0xE7,0x85,0x96), o3(0xEF,0xA4,0x9E),
+     o3(0xEF,0xA4,0x9F), o3(0xE9,0x9B,0xA3),
+     o3(0xEF,0xA4,0xA0), o3(0xE6,0x8D,0x8F),
+     o3(0xE6,0x8D,0xBA), o3(0xE5,0x8D,0x97),
+     o3(0xEF,0xA4,0xA1), o3(0xE6,0x9E,0x8F),
+     o3(0xE6,0xA5,0xA0), o3(0xE6,0xB9,0xB3),
+     o3(0xEF,0xA4,0xA2), o3(0xE7,0x94,0xB7),
+     o3(0xEF,0xA4,0xA3), o3(0xEF,0xA4,0xA4),
+     o3(0xEF,0xA4,0xA5),
+
+#define from_EUC_KR_D1 WORDINDEX2INFO(15259)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D1_infos,
+
+#define from_EUC_KR_D2_infos WORDINDEX2INFO(15261)
+                INVALID, o3(0xE7,0xB4,0x8D),
+     o3(0xEF,0xA4,0xA6), o3(0xEF,0xA4,0xA7),
+     o3(0xE8,0xA1,0xB2), o3(0xE5,0x9B,0x8A),
+     o3(0xE5,0xA8,0x98), o3(0xEF,0xA4,0xA8),
+     o3(0xEF,0xA4,0xA9), o3(0xEF,0xA4,0xAA),
+     o3(0xEF,0xA4,0xAB), o3(0xEF,0xA4,0xAC),
+     o3(0xE4,0xB9,0x83), o3(0xEF,0xA4,0xAD),
+     o3(0xE5,0x85,0xA7), o3(0xE5,0xA5,0x88),
+     o3(0xE6,0x9F,0xB0), o3(0xE8,0x80,0x90),
+     o3(0xEF,0xA4,0xAE), o3(0xE5,0xA5,0xB3),
+     o3(0xE5,0xB9,0xB4), o3(0xE6,0x92,0x9A),
+     o3(0xE7,0xA7,0x8A), o3(0xE5,0xBF,0xB5),
+     o3(0xE6,0x81,0xAC), o3(0xE6,0x8B,0x88),
+     o3(0xE6,0x8D,0xBB), o3(0xE5,0xAF,0xA7),
+     o3(0xE5,0xAF,0x97), o3(0xE5,0x8A,0xAA),
+     o3(0xEF,0xA4,0xAF), o3(0xE5,0xA5,0xB4),
+     o3(0xE5,0xBC,0xA9), o3(0xE6,0x80,0x92),
+     o3(0xEF,0xA4,0xB0), o3(0xEF,0xA4,0xB1),
+     o3(0xEF,0xA4,0xB2), o3(0xE7,0x91,0x99),
+     o3(0xEF,0xA4,0xB3), o3(0xEF,0xA4,0xB4),
+     o3(0xEF,0xA4,0xB5), o3(0xEF,0xA4,0xB6),
+     o3(0xEF,0xA4,0xB7), o3(0xEF,0xA4,0xB8),
+     o3(0xE9,0xA7,0x91), o3(0xEF,0xA4,0xB9),
+     o3(0xEF,0xA4,0xBA), o3(0xEF,0xA4,0xBB),
+     o3(0xEF,0xA4,0xBC), o3(0xEF,0xA4,0xBD),
+     o3(0xEF,0xA4,0xBE), o3(0xEF,0xA4,0xBF),
+     o3(0xEF,0xA5,0x80), o3(0xEF,0xA5,0x81),
+     o3(0xEF,0xA5,0x82), o3(0xEF,0xA5,0x83),
+     o3(0xE6,0xBF,0x83), o3(0xEF,0xA5,0x84),
+     o3(0xEF,0xA5,0x85), o3(0xE8,0x86,0xBF),
+     o3(0xE8,0xBE,0xB2), o3(0xE6,0x83,0xB1),
+     o3(0xEF,0xA5,0x86), o3(0xEF,0xA5,0x87),
+     o3(0xE8,0x85,0xA6), o3(0xEF,0xA5,0x88),
+     o3(0xEF,0xA5,0x89), o3(0xE5,0xB0,0xBF),
+     o3(0xEF,0xA5,0x8A), o3(0xEF,0xA5,0x8B),
+     o3(0xEF,0xA5,0x8C), o3(0xEF,0xA5,0x8D),
+     o3(0xEF,0xA5,0x8E), o3(0xEF,0xA5,0x8F),
+     o3(0xEF,0xA5,0x90), o3(0xEF,0xA5,0x91),
+     o3(0xE5,0xAB,0xA9), o3(0xE8,0xA8,0xA5),
+     o3(0xE6,0x9D,0xBB), o3(0xE7,0xB4,0x90),
+     o3(0xEF,0xA5,0x92), o3(0xEF,0xA5,0x93),
+     o3(0xEF,0xA5,0x94), o3(0xEF,0xA5,0x95),
+     o3(0xEF,0xA5,0x96), o3(0xEF,0xA5,0x97),
+     o3(0xE8,0x83,0xBD), o3(0xEF,0xA5,0x98),
+     o3(0xEF,0xA5,0x99), o3(0xE5,0xB0,0xBC),
+     o3(0xE6,0xB3,0xA5), o3(0xE5,0x8C,0xBF),
+     o3(0xE6,0xBA,0xBA), o3(0xE5,0xA4,0x9A),
+     o3(0xE8,0x8C,0xB6),
+
+#define from_EUC_KR_D2 WORDINDEX2INFO(15356)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D2_infos,
+
+#define from_EUC_KR_D3_infos WORDINDEX2INFO(15358)
+                INVALID, o3(0xE4,0xB8,0xB9),
+     o3(0xE4,0xBA,0xB6), o3(0xE4,0xBD,0x86),
+     o3(0xE5,0x96,0xAE), o3(0xE5,0x9C,0x98),
+     o3(0xE5,0xA3,0x87), o3(0xE5,0xBD,0x96),
+     o3(0xE6,0x96,0xB7), o3(0xE6,0x97,0xA6),
+     o3(0xE6,0xAA,0x80), o3(0xE6,0xAE,0xB5),
+     o3(0xE6,0xB9,0x8D), o3(0xE7,0x9F,0xAD),
+     o3(0xE7,0xAB,0xAF), o3(0xE7,0xB0,0x9E),
+     o3(0xE7,0xB7,0x9E), o3(0xE8,0x9B,0x8B),
+     o3(0xE8,0xA2,0x92), o3(0xE9,0x84,0xB2),
+     o3(0xE9,0x8D,0x9B), o3(0xE6,0x92,0xBB),
+     o3(0xE6,0xBE,0xBE), o3(0xE7,0x8D,0xBA),
+     o3(0xE7,0x96,0xB8), o3(0xE9,0x81,0x94),
+     o3(0xE5,0x95,0x96), o3(0xE5,0x9D,0x8D),
+     o3(0xE6,0x86,0xBA), o3(0xE6,0x93,0x94),
+     o3(0xE6,0x9B,0x87), o3(0xE6,0xB7,0xA1),
+     o3(0xE6,0xB9,0x9B), o3(0xE6,0xBD,0xAD),
+     o3(0xE6,0xBE,0xB9), o3(0xE7,0x97,0xB0),
+     o3(0xE8,0x81,0x83), o3(0xE8,0x86,0xBD),
+     o3(0xE8,0x95,0x81), o3(0xE8,0xA6,0x83),
+     o3(0xE8,0xAB,0x87), o3(0xE8,0xAD,0x9A),
+     o3(0xE9,0x8C,0x9F), o3(0xE6,0xB2,0x93),
+     o3(0xE7,0x95,0x93), o3(0xE7,0xAD,0x94),
+     o3(0xE8,0xB8,0x8F), o3(0xE9,0x81,0x9D),
+     o3(0xE5,0x94,0x90), o3(0xE5,0xA0,0x82),
+     o3(0xE5,0xA1,0x98), o3(0xE5,0xB9,0xA2),
+     o3(0xE6,0x88,0x87), o3(0xE6,0x92,0x9E),
+     o3(0xE6,0xA3,0xA0), o3(0xE7,0x95,0xB6),
+     o3(0xE7,0xB3,0x96), o3(0xE8,0x9E,0xB3),
+     o3(0xE9,0xBB,0xA8), o3(0xE4,0xBB,0xA3),
+     o3(0xE5,0x9E,0x88), o3(0xE5,0x9D,0xAE),
+     o3(0xE5,0xA4,0xA7), o3(0xE5,0xB0,0x8D),
+     o3(0xE5,0xB2,0xB1), o3(0xE5,0xB8,0xB6),
+     o3(0xE5,0xBE,0x85), o3(0xE6,0x88,0xB4),
+     o3(0xE6,0x93,0xA1), o3(0xE7,0x8E,0xB3),
+     o3(0xE8,0x87,0xBA), o3(0xE8,0xA2,0x8B),
+     o3(0xE8,0xB2,0xB8), o3(0xE9,0x9A,0x8A),
+     o3(0xE9,0xBB,0x9B), o3(0xE5,0xAE,0x85),
+     o3(0xE5,0xBE,0xB7), o3(0xE6,0x82,0xB3),
+     o3(0xE5,0x80,0x92), o3(0xE5,0x88,0x80),
+     o3(0xE5,0x88,0xB0), o3(0xE5,0x9C,0x96),
+     o3(0xE5,0xA0,0xB5), o3(0xE5,0xA1,0x97),
+     o3(0xE5,0xB0,0x8E), o3(0xE5,0xB1,0xA0),
+     o3(0xE5,0xB3,0xB6), o3(0xE5,0xB6,0x8B),
+     o3(0xE5,0xBA,0xA6), o3(0xE5,0xBE,0x92),
+     o3(0xE6,0x82,0xBC), o3(0xE6,0x8C,0x91),
+     o3(0xE6,0x8E,0x89), o3(0xE6,0x90,0x97),
+     o3(0xE6,0xA1,0x83),
+
+#define from_EUC_KR_D3 WORDINDEX2INFO(15453)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D3_infos,
+
+#define from_EUC_KR_D4_infos WORDINDEX2INFO(15455)
+                INVALID, o3(0xE6,0xA3,0xB9),
+     o3(0xE6,0xAB,0x82), o3(0xE6,0xB7,0x98),
+     o3(0xE6,0xB8,0xA1), o3(0xE6,0xBB,0x94),
+     o3(0xE6,0xBF,0xA4), o3(0xE7,0x87,0xBE),
+     o3(0xE7,0x9B,0x9C), o3(0xE7,0x9D,0xB9),
+     o3(0xE7,0xA6,0xB1), o3(0xE7,0xA8,0xBB),
+     o3(0xE8,0x90,0x84), o3(0xE8,0xA6,0xA9),
+     o3(0xE8,0xB3,0xAD), o3(0xE8,0xB7,0xB3),
+     o3(0xE8,0xB9,0x88), o3(0xE9,0x80,0x83),
+     o3(0xE9,0x80,0x94), o3(0xE9,0x81,0x93),
+     o3(0xE9,0x83,0xBD), o3(0xE9,0x8D,0x8D),
+     o3(0xE9,0x99,0xB6), o3(0xE9,0x9F,0x9C),
+     o3(0xE6,0xAF,0x92), o3(0xE7,0x80,0x86),
+     o3(0xE7,0x89,0x98), o3(0xE7,0x8A,0xA2),
+     o3(0xE7,0x8D,0xA8), o3(0xE7,0x9D,0xA3),
+     o3(0xE7,0xA6,0xBF), o3(0xE7,0xAF,0xA4),
+     o3(0xE7,0xBA,0x9B), o3(0xE8,0xAE,0x80),
+     o3(0xE5,0xA2,0xA9), o3(0xE6,0x83,0x87),
+     o3(0xE6,0x95,0xA6), o3(0xE6,0x97,0xBD),
+     o3(0xE6,0x9A,0xBE), o3(0xE6,0xB2,0x8C),
+     o3(0xE7,0x84,0x9E), o3(0xE7,0x87,0x89),
+     o3(0xE8,0xB1,0x9A), o3(0xE9,0xA0,0x93),
+     o3(0xE4,0xB9,0xAD), o3(0xE7,0xAA,0x81),
+     o3(0xE4,0xBB,0x9D), o3(0xE5,0x86,0xAC),
+     o3(0xE5,0x87,0x8D), o3(0xE5,0x8B,0x95),
+     o3(0xE5,0x90,0x8C), o3(0xE6,0x86,0xA7),
+     o3(0xE6,0x9D,0xB1), o3(0xE6,0xA1,0x90),
+     o3(0xE6,0xA3,0x9F), o3(0xE6,0xB4,0x9E),
+     o3(0xE6,0xBD,0xBC), o3(0xE7,0x96,0xBC),
+     o3(0xE7,0x9E,0xB3), o3(0xE7,0xAB,0xA5),
+     o3(0xE8,0x83,0xB4), o3(0xE8,0x91,0xA3),
+     o3(0xE9,0x8A,0x85), o3(0xE5,0x85,0x9C),
+     o3(0xE6,0x96,0x97), o3(0xE6,0x9D,0x9C),
+     o3(0xE6,0x9E,0x93), o3(0xE7,0x97,0x98),
+     o3(0xE7,0xAB,0x87), o3(0xE8,0x8D,0xB3),
+     o3(0xEF,0xA5,0x9A), o3(0xE8,0xB1,0x86),
+     o3(0xE9,0x80,0x97), o3(0xE9,0xA0,0xAD),
+     o3(0xE5,0xB1,0xAF), o3(0xE8,0x87,0x80),
+     o3(0xE8,0x8A,0x9A), o3(0xE9,0x81,0x81),
+     o3(0xE9,0x81,0xAF), o3(0xE9,0x88,0x8D),
+     o3(0xE5,0xBE,0x97), o3(0xE5,0xB6,0x9D),
+     o3(0xE6,0xA9,0x99), o3(0xE7,0x87,0x88),
+     o3(0xE7,0x99,0xBB), o3(0xE7,0xAD,0x89),
+     o3(0xE8,0x97,0xA4), o3(0xE8,0xAC,0x84),
+     o3(0xE9,0x84,0xA7), o3(0xE9,0xA8,0xB0),
+     o3(0xE5,0x96,0x87), o3(0xE6,0x87,0xB6),
+     o3(0xEF,0xA5,0x9B), o3(0xE7,0x99,0xA9),
+     o3(0xE7,0xBE,0x85),
+
+#define from_EUC_KR_D4 WORDINDEX2INFO(15550)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D4_infos,
+
+#define from_EUC_KR_D5_infos WORDINDEX2INFO(15552)
+                INVALID, o3(0xE8,0x98,0xBF),
+     o3(0xE8,0x9E,0xBA), o3(0xE8,0xA3,0xB8),
+     o3(0xE9,0x82,0x8F), o3(0xEF,0xA5,0x9C),
+     o3(0xE6,0xB4,0x9B), o3(0xE7,0x83,0x99),
+     o3(0xE7,0x8F,0x9E), o3(0xE7,0xB5,0xA1),
+     o3(0xE8,0x90,0xBD), o3(0xEF,0xA5,0x9D),
+     o3(0xE9,0x85,0xAA), o3(0xE9,0xA7,0xB1),
+     o3(0xEF,0xA5,0x9E), o3(0xE4,0xBA,0x82),
+     o3(0xE5,0x8D,0xB5), o3(0xE6,0xAC,0x84),
+     o3(0xE6,0xAC,0x92), o3(0xE7,0x80,0xBE),
+     o3(0xE7,0x88,0x9B), o3(0xE8,0x98,0xAD),
+     o3(0xE9,0xB8,0x9E), o3(0xE5,0x89,0x8C),
+     o3(0xE8,0xBE,0xA3), o3(0xE5,0xB5,0x90),
+     o3(0xE6,0x93,0xA5), o3(0xE6,0x94,0xAC),
+     o3(0xE6,0xAC,0x96), o3(0xE6,0xBF,0xAB),
+     o3(0xE7,0xB1,0x83), o3(0xE7,0xBA,0x9C),
+     o3(0xE8,0x97,0x8D), o3(0xE8,0xA5,0xA4),
+     o3(0xE8,0xA6,0xBD), o3(0xE6,0x8B,0x89),
+     o3(0xE8,0x87,0x98), o3(0xE8,0xA0,0x9F),
+     o3(0xE5,0xBB,0x8A), o3(0xE6,0x9C,0x97),
+     o3(0xE6,0xB5,0xAA), o3(0xE7,0x8B,0xBC),
+     o3(0xE7,0x90,0x85), o3(0xE7,0x91,0xAF),
+     o3(0xE8,0x9E,0x82), o3(0xE9,0x83,0x9E),
+     o3(0xE4,0xBE,0x86), o3(0xE5,0xB4,0x8D),
+     o3(0xE5,0xBE,0xA0), o3(0xE8,0x90,0x8A),
+     o3(0xE5,0x86,0xB7), o3(0xE6,0x8E,0xA0),
+     o3(0xE7,0x95,0xA5), o3(0xE4,0xBA,0xAE),
+     o3(0xE5,0x80,0x86), o3(0xE5,0x85,0xA9),
+     o3(0xE5,0x87,0x89), o3(0xE6,0xA2,0x81),
+     o3(0xE6,0xA8,0x91), o3(0xE7,0xB2,0xAE),
+     o3(0xE7,0xB2,0xB1), o3(0xE7,0xB3,0xA7),
+     o3(0xE8,0x89,0xAF), o3(0xE8,0xAB,0x92),
+     o3(0xE8,0xBC,0x9B), o3(0xE9,0x87,0x8F),
+     o3(0xE4,0xBE,0xB6), o3(0xE5,0x84,0xB7),
+     o3(0xE5,0x8B,0xB5), o3(0xE5,0x91,0x82),
+     o3(0xE5,0xBB,0xAC), o3(0xE6,0x85,0xAE),
+     o3(0xE6,0x88,0xBE), o3(0xE6,0x97,0x85),
+     o3(0xE6,0xAB,0x9A), o3(0xE6,0xBF,0xBE),
+     o3(0xE7,0xA4,0xAA), o3(0xE8,0x97,0x9C),
+     o3(0xE8,0xA0,0xA3), o3(0xE9,0x96,0xAD),
+     o3(0xE9,0xA9,0xA2), o3(0xE9,0xA9,0xAA),
+     o3(0xE9,0xBA,0x97), o3(0xE9,0xBB,0x8E),
+     o3(0xE5,0x8A,0x9B), o3(0xE6,0x9B,0x86),
+     o3(0xE6,0xAD,0xB7), o3(0xE7,0x80,0x9D),
+     o3(0xE7,0xA4,0xAB), o3(0xE8,0xBD,0xA2),
+     o3(0xE9,0x9D,0x82), o3(0xE6,0x86,0x90),
+     o3(0xE6,0x88,0x80), o3(0xE6,0x94,0xA3),
+     o3(0xE6,0xBC,0xA3),
+
+#define from_EUC_KR_D5 WORDINDEX2INFO(15647)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D5_infos,
+
+#define from_EUC_KR_D6_infos WORDINDEX2INFO(15649)
+                INVALID, o3(0xE7,0x85,0x89),
+     o3(0xE7,0x92,0x89), o3(0xE7,0xB7,0xB4),
+     o3(0xE8,0x81,0xAF), o3(0xE8,0x93,0xAE),
+     o3(0xE8,0xBC,0xA6), o3(0xE9,0x80,0xA3),
+     o3(0xE9,0x8D,0x8A), o3(0xE5,0x86,0xBD),
+     o3(0xE5,0x88,0x97), o3(0xE5,0x8A,0xA3),
+     o3(0xE6,0xB4,0x8C), o3(0xE7,0x83,0x88),
+     o3(0xE8,0xA3,0x82), o3(0xE5,0xBB,0x89),
+     o3(0xE6,0x96,0x82), o3(0xE6,0xAE,0xAE),
+     o3(0xE6,0xBF,0x82), o3(0xE7,0xB0,0xBE),
+     o3(0xE7,0x8D,0xB5), o3(0xE4,0xBB,0xA4),
+     o3(0xE4,0xBC,0xB6), o3(0xE5,0x9B,0xB9),
+     o3(0xEF,0xA5,0x9F), o3(0xE5,0xB2,0xBA),
+     o3(0xE5,0xB6,0xBA), o3(0xE6,0x80,0x9C),
+     o3(0xE7,0x8E,0xB2), o3(0xE7,0xAC,0xAD),
+     o3(0xE7,0xBE,0x9A), o3(0xE7,0xBF,0x8E),
+     o3(0xE8,0x81,0x86), o3(0xE9,0x80,0x9E),
+     o3(0xE9,0x88,0xB4), o3(0xE9,0x9B,0xB6),
+     o3(0xE9,0x9D,0x88), o3(0xE9,0xA0,0x98),
+     o3(0xE9,0xBD,0xA1), o3(0xE4,0xBE,0x8B),
+     o3(0xE6,0xBE,0xA7), o3(0xE7,0xA6,0xAE),
+     o3(0xE9,0x86,0xB4), o3(0xE9,0x9A,0xB7),
+     o3(0xE5,0x8B,0x9E), o3(0xEF,0xA5,0xA0),
+     o3(0xE6,0x92,0x88), o3(0xE6,0x93,0x84),
+     o3(0xE6,0xAB,0x93), o3(0xE6,0xBD,0x9E),
+     o3(0xE7,0x80,0x98), o3(0xE7,0x88,0x90),
+     o3(0xE7,0x9B,0xA7), o3(0xE8,0x80,0x81),
+     o3(0xE8,0x98,0x86), o3(0xE8,0x99,0x9C),
+     o3(0xE8,0xB7,0xAF), o3(0xE8,0xBC,0x85),
+     o3(0xE9,0x9C,0xB2), o3(0xE9,0xAD,0xAF),
+     o3(0xE9,0xB7,0xBA), o3(0xE9,0xB9,0xB5),
+     o3(0xE7,0xA2,0x8C), o3(0xE7,0xA5,0xBF),
+     o3(0xE7,0xB6,0xA0), o3(0xE8,0x8F,0x89),
+     o3(0xE9,0x8C,0x84), o3(0xE9,0xB9,0xBF),
+     o3(0xE9,0xBA,0x93), o3(0xE8,0xAB,0x96),
+     o3(0xE5,0xA3,0x9F), o3(0xE5,0xBC,0x84),
+     o3(0xE6,0x9C,0xA7), o3(0xE7,0x80,0xA7),
+     o3(0xE7,0x93,0x8F), o3(0xE7,0xB1,0xA0),
+     o3(0xE8,0x81,0xBE), o3(0xE5,0x84,0xA1),
+     o3(0xE7,0x80,0xA8), o3(0xE7,0x89,0xA2),
+     o3(0xE7,0xA3,0x8A), o3(0xE8,0xB3,0x82),
+     o3(0xE8,0xB3,0x9A), o3(0xE8,0xB3,0xB4),
+     o3(0xE9,0x9B,0xB7), o3(0xE4,0xBA,0x86),
+     o3(0xE5,0x83,0x9A), o3(0xE5,0xAF,0xAE),
+     o3(0xE5,0xBB,0x96), o3(0xE6,0x96,0x99),
+     o3(0xE7,0x87,0x8E), o3(0xE7,0x99,0x82),
+     o3(0xE7,0x9E,0xAD), o3(0xE8,0x81,0x8A),
+     o3(0xE8,0x93,0xBC),
+
+#define from_EUC_KR_D6 WORDINDEX2INFO(15744)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D6_infos,
+
+#define from_EUC_KR_D7_infos WORDINDEX2INFO(15746)
+                INVALID, o3(0xE9,0x81,0xBC),
+     o3(0xE9,0xAC,0xA7), o3(0xE9,0xBE,0x8D),
+     o3(0xE5,0xA3,0x98), o3(0xE5,0xA9,0x81),
+     o3(0xE5,0xB1,0xA2), o3(0xE6,0xA8,0x93),
+     o3(0xE6,0xB7,0x9A), o3(0xE6,0xBC,0x8F),
+     o3(0xE7,0x98,0xBB), o3(0xE7,0xB4,0xAF),
+     o3(0xE7,0xB8,0xB7), o3(0xE8,0x94,0x9E),
+     o3(0xE8,0xA4,0xB8), o3(0xE9,0x8F,0xA4),
+     o3(0xE9,0x99,0x8B), o3(0xE5,0x8A,0x89),
+     o3(0xE6,0x97,0x92), o3(0xE6,0x9F,0xB3),
+     o3(0xE6,0xA6,0xB4), o3(0xE6,0xB5,0x81),
+     o3(0xE6,0xBA,0x9C), o3(0xE7,0x80,0x8F),
+     o3(0xE7,0x90,0x89), o3(0xE7,0x91,0xA0),
+     o3(0xE7,0x95,0x99), o3(0xE7,0x98,0xA4),
+     o3(0xE7,0xA1,0xAB), o3(0xE8,0xAC,0xAC),
+     o3(0xE9,0xA1,0x9E), o3(0xE5,0x85,0xAD),
+     o3(0xE6,0x88,0xAE), o3(0xE9,0x99,0xB8),
+     o3(0xE4,0xBE,0x96), o3(0xE5,0x80,0xAB),
+     o3(0xE5,0xB4,0x99), o3(0xE6,0xB7,0xAA),
+     o3(0xE7,0xB6,0xB8), o3(0xE8,0xBC,0xAA),
+     o3(0xE5,0xBE,0x8B), o3(0xE6,0x85,0x84),
+     o3(0xE6,0xA0,0x97), o3(0xEF,0xA5,0xA1),
+     o3(0xE9,0x9A,0x86), o3(0xE5,0x8B,0x92),
+     o3(0xE8,0x82,0x8B), o3(0xE5,0x87,0x9C),
+     o3(0xE5,0x87,0x8C), o3(0xE6,0xA5,0x9E),
+     o3(0xE7,0xA8,0x9C), o3(0xE7,0xB6,0xBE),
+     o3(0xE8,0x8F,0xB1), o3(0xE9,0x99,0xB5),
+     o3(0xE4,0xBF,0x9A), o3(0xE5,0x88,0xA9),
+     o3(0xE5,0x8E,0x98), o3(0xE5,0x90,0x8F),
+     o3(0xE5,0x94,0x8E), o3(0xE5,0xB1,0xA5),
+     o3(0xE6,0x82,0xA7), o3(0xE6,0x9D,0x8E),
+     o3(0xE6,0xA2,0xA8), o3(0xE6,0xB5,0xAC),
+     o3(0xE7,0x8A,0x81), o3(0xE7,0x8B,0xB8),
+     o3(0xE7,0x90,0x86), o3(0xE7,0x92,0x83),
+     o3(0xEF,0xA5,0xA2), o3(0xE7,0x97,0xA2),
+     o3(0xE7,0xB1,0xAC), o3(0xE7,0xBD,0xB9),
+     o3(0xE7,0xBE,0xB8), o3(0xE8,0x8E,0x89),
+     o3(0xE8,0xA3,0x8F), o3(0xE8,0xA3,0xA1),
+     o3(0xE9,0x87,0x8C), o3(0xE9,0x87,0x90),
+     o3(0xE9,0x9B,0xA2), o3(0xE9,0xAF,0x89),
+     o3(0xE5,0x90,0x9D), o3(0xE6,0xBD,0xBE),
+     o3(0xE7,0x87,0x90), o3(0xE7,0x92,0x98),
+     o3(0xE8,0x97,0xBA), o3(0xE8,0xBA,0xAA),
+     o3(0xE9,0x9A,0xA3), o3(0xE9,0xB1,0x97),
+     o3(0xE9,0xBA,0x9F), o3(0xE6,0x9E,0x97),
+     o3(0xE6,0xB7,0x8B), o3(0xE7,0x90,0xB3),
+     o3(0xE8,0x87,0xA8), o3(0xE9,0x9C,0x96),
+     o3(0xE7,0xA0,0xAC),
+
+#define from_EUC_KR_D7 WORDINDEX2INFO(15841)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D7_infos,
+
+#define from_EUC_KR_D8_infos WORDINDEX2INFO(15843)
+                INVALID, o3(0xE7,0xAB,0x8B),
+     o3(0xE7,0xAC,0xA0), o3(0xE7,0xB2,0x92),
+     o3(0xE6,0x91,0xA9), o3(0xE7,0x91,0xAA),
+     o3(0xE7,0x97,0xB2), o3(0xE7,0xA2,0xBC),
+     o3(0xE7,0xA3,0xA8), o3(0xE9,0xA6,0xAC),
+     o3(0xE9,0xAD,0x94), o3(0xE9,0xBA,0xBB),
+     o3(0xE5,0xAF,0x9E), o3(0xE5,0xB9,0x95),
+     o3(0xE6,0xBC,0xA0), o3(0xE8,0x86,0x9C),
+     o3(0xE8,0x8E,0xAB), o3(0xE9,0x82,0x88),
+     o3(0xE4,0xB8,0x87), o3(0xE5,0x8D,0x8D),
+     o3(0xE5,0xA8,0xA9), o3(0xE5,0xB7,0x92),
+     o3(0xE5,0xBD,0x8E), o3(0xE6,0x85,0xA2),
+     o3(0xE6,0x8C,0xBD), o3(0xE6,0x99,0xA9),
+     o3(0xE6,0x9B,0xBC), o3(0xE6,0xBB,0xBF),
+     o3(0xE6,0xBC,0xAB), o3(0xE7,0x81,0xA3),
+     o3(0xE7,0x9E,0x9E), o3(0xE8,0x90,0xAC),
+     o3(0xE8,0x94,0x93), o3(0xE8,0xA0,0xBB),
+     o3(0xE8,0xBC,0x93), o3(0xE9,0xA5,0x85),
+     o3(0xE9,0xB0,0xBB), o3(0xE5,0x94,0x9C),
+     o3(0xE6,0x8A,0xB9), o3(0xE6,0x9C,0xAB),
+     o3(0xE6,0xB2,0xAB), o3(0xE8,0x8C,0x89),
+     o3(0xE8,0xA5,0xAA), o3(0xE9,0x9D,0xBA),
+     o3(0xE4,0xBA,0xA1), o3(0xE5,0xA6,0x84),
+     o3(0xE5,0xBF,0x98), o3(0xE5,0xBF,0x99),
+     o3(0xE6,0x9C,0x9B), o3(0xE7,0xB6,0xB2),
+     o3(0xE7,0xBD,0x94), o3(0xE8,0x8A,0x92),
+     o3(0xE8,0x8C,0xAB), o3(0xE8,0x8E,0xBD),
+     o3(0xE8,0xBC,0x9E), o3(0xE9,0x82,0x99),
+     o3(0xE5,0x9F,0x8B), o3(0xE5,0xA6,0xB9),
+     o3(0xE5,0xAA,0x92), o3(0xE5,0xAF,0x90),
+     o3(0xE6,0x98,0xA7), o3(0xE6,0x9E,0x9A),
+     o3(0xE6,0xA2,0x85), o3(0xE6,0xAF,0x8F),
+     o3(0xE7,0x85,0xA4), o3(0xE7,0xBD,0xB5),
+     o3(0xE8,0xB2,0xB7), o3(0xE8,0xB3,0xA3),
+     o3(0xE9,0x82,0x81), o3(0xE9,0xAD,0x85),
+     o3(0xE8,0x84,0x88), o3(0xE8,0xB2,0x8A),
+     o3(0xE9,0x99,0x8C), o3(0xE9,0xA9,0x80),
+     o3(0xE9,0xBA,0xA5), o3(0xE5,0xAD,0x9F),
+     o3(0xE6,0xB0,0x93), o3(0xE7,0x8C,0x9B),
+     o3(0xE7,0x9B,0xB2), o3(0xE7,0x9B,0x9F),
+     o3(0xE8,0x90,0x8C), o3(0xE5,0x86,0xAA),
+     o3(0xE8,0xA6,0x93), o3(0xE5,0x85,0x8D),
+     o3(0xE5,0x86,0x95), o3(0xE5,0x8B,0x89),
+     o3(0xE6,0xA3,0x89), o3(0xE6,0xB2,0x94),
+     o3(0xE7,0x9C,0x84), o3(0xE7,0x9C,0xA0),
+     o3(0xE7,0xB6,0xBF), o3(0xE7,0xB7,0xAC),
+     o3(0xE9,0x9D,0xA2), o3(0xE9,0xBA,0xB5),
+     o3(0xE6,0xBB,0x85),
+
+#define from_EUC_KR_D8 WORDINDEX2INFO(15938)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D8_infos,
+
+#define from_EUC_KR_D9_infos WORDINDEX2INFO(15940)
+                INVALID, o3(0xE8,0x94,0x91),
+     o3(0xE5,0x86,0xA5), o3(0xE5,0x90,0x8D),
+     o3(0xE5,0x91,0xBD), o3(0xE6,0x98,0x8E),
+     o3(0xE6,0x9A,0x9D), o3(0xE6,0xA4,0xA7),
+     o3(0xE6,0xBA,0x9F), o3(0xE7,0x9A,0xBF),
+     o3(0xE7,0x9E,0x91), o3(0xE8,0x8C,0x97),
+     o3(0xE8,0x93,0x82), o3(0xE8,0x9E,0x9F),
+     o3(0xE9,0x85,0xA9), o3(0xE9,0x8A,0x98),
+     o3(0xE9,0xB3,0xB4), o3(0xE8,0xA2,0x82),
+     o3(0xE4,0xBE,0xAE), o3(0xE5,0x86,0x92),
+     o3(0xE5,0x8B,0x9F), o3(0xE5,0xA7,0x86),
+     o3(0xE5,0xB8,0xBD), o3(0xE6,0x85,0x95),
+     o3(0xE6,0x91,0xB8), o3(0xE6,0x91,0xB9),
+     o3(0xE6,0x9A,0xAE), o3(0xE6,0x9F,0x90),
+     o3(0xE6,0xA8,0xA1), o3(0xE6,0xAF,0x8D),
+     o3(0xE6,0xAF,0x9B), o3(0xE7,0x89,0x9F),
+     o3(0xE7,0x89,0xA1), o3(0xE7,0x91,0x81),
+     o3(0xE7,0x9C,0xB8), o3(0xE7,0x9F,0x9B),
+     o3(0xE8,0x80,0x97), o3(0xE8,0x8A,0xBC),
+     o3(0xE8,0x8C,0x85), o3(0xE8,0xAC,0x80),
+     o3(0xE8,0xAC,0xA8), o3(0xE8,0xB2,0x8C),
+     o3(0xE6,0x9C,0xA8), o3(0xE6,0xB2,0x90),
+     o3(0xE7,0x89,0xA7), o3(0xE7,0x9B,0xAE),
+     o3(0xE7,0x9D,0xA6), o3(0xE7,0xA9,0x86),
+     o3(0xE9,0xB6,0xA9), o3(0xE6,0xAD,0xBF),
+     o3(0xE6,0xB2,0x92), o3(0xE5,0xA4,0xA2),
+     o3(0xE6,0x9C,0xA6), o3(0xE8,0x92,0x99),
+     o3(0xE5,0x8D,0xAF), o3(0xE5,0xA2,0x93),
+     o3(0xE5,0xA6,0x99), o3(0xE5,0xBB,0x9F),
+     o3(0xE6,0x8F,0x8F), o3(0xE6,0x98,0xB4),
+     o3(0xE6,0x9D,0xB3), o3(0xE6,0xB8,0xBA),
+     o3(0xE7,0x8C,0xAB), o3(0xE7,0xAB,0x97),
+     o3(0xE8,0x8B,0x97), o3(0xE9,0x8C,0xA8),
+     o3(0xE5,0x8B,0x99), o3(0xE5,0xB7,0xAB),
+     o3(0xE6,0x86,0xAE), o3(0xE6,0x87,0x8B),
+     o3(0xE6,0x88,0x8A), o3(0xE6,0x8B,0x87),
+     o3(0xE6,0x92,0xAB), o3(0xE6,0x97,0xA0),
+     o3(0xE6,0xA5,0x99), o3(0xE6,0xAD,0xA6),
+     o3(0xE6,0xAF,0x8B), o3(0xE7,0x84,0xA1),
+     o3(0xE7,0x8F,0xB7), o3(0xE7,0x95,0x9D),
+     o3(0xE7,0xB9,0x86), o3(0xE8,0x88,0x9E),
+     o3(0xE8,0x8C,0x82), o3(0xE8,0x95,0xAA),
+     o3(0xE8,0xAA,0xA3), o3(0xE8,0xB2,0xBF),
+     o3(0xE9,0x9C,0xA7), o3(0xE9,0xB5,0xA1),
+     o3(0xE5,0xA2,0xA8), o3(0xE9,0xBB,0x98),
+     o3(0xE5,0x80,0x91), o3(0xE5,0x88,0x8E),
+     o3(0xE5,0x90,0xBB), o3(0xE5,0x95,0x8F),
+     o3(0xE6,0x96,0x87),
+
+#define from_EUC_KR_D9 WORDINDEX2INFO(16035)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_D9_infos,
+
+#define from_EUC_KR_DA_infos WORDINDEX2INFO(16037)
+                INVALID, o3(0xE6,0xB1,0xB6),
+     o3(0xE7,0xB4,0x8A), o3(0xE7,0xB4,0x8B),
+     o3(0xE8,0x81,0x9E), o3(0xE8,0x9A,0x8A),
+     o3(0xE9,0x96,0x80), o3(0xE9,0x9B,0xAF),
+     o3(0xE5,0x8B,0xBF), o3(0xE6,0xB2,0x95),
+     o3(0xE7,0x89,0xA9), o3(0xE5,0x91,0xB3),
+     o3(0xE5,0xAA,0x9A), o3(0xE5,0xB0,0xBE),
+     o3(0xE5,0xB5,0x8B), o3(0xE5,0xBD,0x8C),
+     o3(0xE5,0xBE,0xAE), o3(0xE6,0x9C,0xAA),
+     o3(0xE6,0xA2,0xB6), o3(0xE6,0xA5,0xA3),
+     o3(0xE6,0xB8,0xBC), o3(0xE6,0xB9,0x84),
+     o3(0xE7,0x9C,0x89), o3(0xE7,0xB1,0xB3),
+     o3(0xE7,0xBE,0x8E), o3(0xE8,0x96,0x87),
+     o3(0xE8,0xAC,0x8E), o3(0xE8,0xBF,0xB7),
+     o3(0xE9,0x9D,0xA1), o3(0xE9,0xBB,0xB4),
+     o3(0xE5,0xB2,0xB7), o3(0xE6,0x82,0xB6),
+     o3(0xE6,0x84,0x8D), o3(0xE6,0x86,0xAB),
+     o3(0xE6,0x95,0x8F), o3(0xE6,0x97,0xBB),
+     o3(0xE6,0x97,0xBC), o3(0xE6,0xB0,0x91),
+     o3(0xE6,0xB3,0xAF), o3(0xE7,0x8E,0x9F),
+     o3(0xE7,0x8F,0x89), o3(0xE7,0xB7,0xA1),
+     o3(0xE9,0x96,0x94), o3(0xE5,0xAF,0x86),
+     o3(0xE8,0x9C,0x9C), o3(0xE8,0xAC,0x90),
+     o3(0xE5,0x89,0x9D), o3(0xE5,0x8D,0x9A),
+     o3(0xE6,0x8B,0x8D), o3(0xE6,0x90,0x8F),
+     o3(0xE6,0x92,0xB2), o3(0xE6,0x9C,0xB4),
+     o3(0xE6,0xA8,0xB8), o3(0xE6,0xB3,0x8A),
+     o3(0xE7,0x8F,0x80), o3(0xE7,0x92,0x9E),
+     o3(0xE7,0xAE,0x94), o3(0xE7,0xB2,0x95),
+     o3(0xE7,0xB8,0x9B), o3(0xE8,0x86,0x8A),
+     o3(0xE8,0x88,0xB6), o3(0xE8,0x96,0x84),
+     o3(0xE8,0xBF,0xAB), o3(0xE9,0x9B,0xB9),
+     o3(0xE9,0xA7,0x81), o3(0xE4,0xBC,0xB4),
+     o3(0xE5,0x8D,0x8A), o3(0xE5,0x8F,0x8D),
+     o3(0xE5,0x8F,0x9B), o3(0xE6,0x8B,0x8C),
+     o3(0xE6,0x90,0xAC), o3(0xE6,0x94,0x80),
+     o3(0xE6,0x96,0x91), o3(0xE6,0xA7,0x83),
+     o3(0xE6,0xB3,0xAE), o3(0xE6,0xBD,0x98),
+     o3(0xE7,0x8F,0xAD), o3(0xE7,0x95,0x94),
+     o3(0xE7,0x98,0xA2), o3(0xE7,0x9B,0xA4),
+     o3(0xE7,0x9B,0xBC), o3(0xE7,0xA3,0x90),
+     o3(0xE7,0xA3,0xBB), o3(0xE7,0xA4,0xAC),
+     o3(0xE7,0xB5,0x86), o3(0xE8,0x88,0xAC),
+     o3(0xE8,0x9F,0xA0), o3(0xE8,0xBF,0x94),
+     o3(0xE9,0xA0,0x92), o3(0xE9,0xA3,0xAF),
+     o3(0xE5,0x8B,0x83), o3(0xE6,0x8B,0x94),
+     o3(0xE6,0x92,0xA5), o3(0xE6,0xB8,0xA4),
+     o3(0xE6,0xBD,0x91),
+
+#define from_EUC_KR_DA WORDINDEX2INFO(16132)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DA_infos,
+
+#define from_EUC_KR_DB_infos WORDINDEX2INFO(16134)
+                INVALID, o3(0xE7,0x99,0xBC),
+     o3(0xE8,0xB7,0x8B), o3(0xE9,0x86,0xB1),
+     o3(0xE9,0x89,0xA2), o3(0xE9,0xAB,0xAE),
+     o3(0xE9,0xAD,0x83), o3(0xE5,0x80,0xA3),
+     o3(0xE5,0x82,0x8D), o3(0xE5,0x9D,0x8A),
+     o3(0xE5,0xA6,0xA8), o3(0xE5,0xB0,0xA8),
+     o3(0xE5,0xB9,0x87), o3(0xE5,0xBD,0xB7),
+     o3(0xE6,0x88,0xBF), o3(0xE6,0x94,0xBE),
+     o3(0xE6,0x96,0xB9), o3(0xE6,0x97,0x81),
+     o3(0xE6,0x98,0x89), o3(0xE6,0x9E,0x8B),
+     o3(0xE6,0xA6,0x9C), o3(0xE6,0xBB,0x82),
+     o3(0xE7,0xA3,0x85), o3(0xE7,0xB4,0xA1),
+     o3(0xE8,0x82,0xAA), o3(0xE8,0x86,0x80),
+     o3(0xE8,0x88,0xAB), o3(0xE8,0x8A,0xB3),
+     o3(0xE8,0x92,0xA1), o3(0xE8,0x9A,0x8C),
+     o3(0xE8,0xA8,0xAA), o3(0xE8,0xAC,0x97),
+     o3(0xE9,0x82,0xA6), o3(0xE9,0x98,0xB2),
+     o3(0xE9,0xBE,0x90), o3(0xE5,0x80,0x8D),
+     o3(0xE4,0xBF,0xB3), o3(0xEF,0xA5,0xA3),
+     o3(0xE5,0x9F,0xB9), o3(0xE5,0xBE,0x98),
+     o3(0xE6,0x8B,0x9C), o3(0xE6,0x8E,0x92),
+     o3(0xE6,0x9D,0xAF), o3(0xE6,0xB9,0x83),
+     o3(0xE7,0x84,0x99), o3(0xE7,0x9B,0x83),
+     o3(0xE8,0x83,0x8C), o3(0xE8,0x83,0x9A),
+     o3(0xE8,0xA3,0xB4), o3(0xE8,0xA3,0xB5),
+     o3(0xE8,0xA4,0x99), o3(0xE8,0xB3,0xA0),
+     o3(0xE8,0xBC,0xA9), o3(0xE9,0x85,0x8D),
+     o3(0xE9,0x99,0xAA), o3(0xE4,0xBC,0xAF),
+     o3(0xE4,0xBD,0xB0), o3(0xE5,0xB8,0x9B),
+     o3(0xE6,0x9F,0x8F), o3(0xE6,0xA0,0xA2),
+     o3(0xE7,0x99,0xBD), o3(0xE7,0x99,0xBE),
+     o3(0xE9,0xAD,0x84), o3(0xE5,0xB9,0xA1),
+     o3(0xE6,0xA8,0x8A), o3(0xE7,0x85,0xA9),
+     o3(0xE7,0x87,0x94), o3(0xE7,0x95,0xAA),
+     o3(0xEF,0xA5,0xA4), o3(0xE7,0xB9,0x81),
+     o3(0xE8,0x95,0x83), o3(0xE8,0x97,0xA9),
+     o3(0xE9,0xA3,0x9C), o3(0xE4,0xBC,0x90),
+     o3(0xE7,0xAD,0x8F), o3(0xE7,0xBD,0xB0),
+     o3(0xE9,0x96,0xA5), o3(0xE5,0x87,0xA1),
+     o3(0xE5,0xB8,0x86), o3(0xE6,0xA2,0xB5),
+     o3(0xE6,0xB0,0xBE), o3(0xE6,0xB1,0x8E),
+     o3(0xE6,0xB3,0x9B), o3(0xE7,0x8A,0xAF),
+     o3(0xE7,0xAF,0x84), o3(0xE8,0x8C,0x83),
+     o3(0xE6,0xB3,0x95), o3(0xE7,0x90,0xBA),
+     o3(0xE5,0x83,0xBB), o3(0xE5,0x8A,0x88),
+     o3(0xE5,0xA3,0x81), o3(0xE6,0x93,0x98),
+     o3(0xE6,0xAA,0x97), o3(0xE7,0x92,0xA7),
+     o3(0xE7,0x99,0x96),
+
+#define from_EUC_KR_DB WORDINDEX2INFO(16229)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DB_infos,
+
+#define from_EUC_KR_DC_infos WORDINDEX2INFO(16231)
+                INVALID, o3(0xE7,0xA2,0xA7),
+     o3(0xE8,0x98,0x97), o3(0xE9,0x97,0xA2),
+     o3(0xE9,0x9C,0xB9), o3(0xEF,0xA5,0xA5),
+     o3(0xE5,0x8D,0x9E), o3(0xE5,0xBC,0x81),
+     o3(0xE8,0xAE,0x8A), o3(0xE8,0xBE,0xA8),
+     o3(0xE8,0xBE,0xAF), o3(0xE9,0x82,0x8A),
+     o3(0xE5,0x88,0xA5), o3(0xE7,0x9E,0xA5),
+     o3(0xE9,0xB1,0x89), o3(0xE9,0xBC,0x88),
+     o3(0xE4,0xB8,0x99), o3(0xE5,0x80,0x82),
+     o3(0xE5,0x85,0xB5), o3(0xE5,0xB1,0x9B),
+     o3(0xE5,0xB9,0xB7), o3(0xE6,0x98,0x9E),
+     o3(0xE6,0x98,0xBA), o3(0xE6,0x9F,0x84),
+     o3(0xE6,0xA3,0x85), o3(0xE7,0x82,0xB3),
+     o3(0xE7,0x94,0x81), o3(0xE7,0x97,0x85),
+     o3(0xE7,0xA7,0x89), o3(0xE7,0xAB,0x9D),
+     o3(0xE8,0xBC,0xA7), o3(0xE9,0xA4,0xA0),
+     o3(0xE9,0xA8,0x88), o3(0xE4,0xBF,0x9D),
+     o3(0xE5,0xA0,0xA1), o3(0xE5,0xA0,0xB1),
+     o3(0xE5,0xAF,0xB6), o3(0xE6,0x99,0xAE),
+     o3(0xE6,0xAD,0xA5), o3(0xE6,0xB4,0x91),
+     o3(0xE6,0xB9,0xBA), o3(0xE6,0xBD,0xBD),
+     o3(0xE7,0x8F,0xA4), o3(0xE7,0x94,0xAB),
+     o3(0xE8,0x8F,0xA9), o3(0xE8,0xA3,0x9C),
+     o3(0xE8,0xA4,0x93), o3(0xE8,0xAD,0x9C),
+     o3(0xE8,0xBC,0x94), o3(0xE4,0xBC,0x8F),
+     o3(0xE5,0x83,0x95), o3(0xE5,0x8C,0x90),
+     o3(0xE5,0x8D,0x9C), o3(0xE5,0xAE,0x93),
+     o3(0xE5,0xBE,0xA9), o3(0xE6,0x9C,0x8D),
+     o3(0xE7,0xA6,0x8F), o3(0xE8,0x85,0xB9),
+     o3(0xE8,0x8C,0xAF), o3(0xE8,0x94,0x94),
+     o3(0xE8,0xA4,0x87), o3(0xE8,0xA6,0x86),
+     o3(0xE8,0xBC,0xB9), o3(0xE8,0xBC,0xBB),
+     o3(0xE9,0xA6,0xA5), o3(0xE9,0xB0,0x92),
+     o3(0xE6,0x9C,0xAC), o3(0xE4,0xB9,0xB6),
+     o3(0xE4,0xBF,0xB8), o3(0xE5,0xA5,0x89),
+     o3(0xE5,0xB0,0x81), o3(0xE5,0xB3,0xAF),
+     o3(0xE5,0xB3,0xB0), o3(0xE6,0x8D,0xA7),
+     o3(0xE6,0xA3,0x92), o3(0xE7,0x83,0xBD),
+     o3(0xE7,0x86,0xA2), o3(0xE7,0x90,0xAB),
+     o3(0xE7,0xB8,0xAB), o3(0xE8,0x93,0xAC),
+     o3(0xE8,0x9C,0x82), o3(0xE9,0x80,0xA2),
+     o3(0xE9,0x8B,0x92), o3(0xE9,0xB3,0xB3),
+     o3(0xE4,0xB8,0x8D), o3(0xE4,0xBB,0x98),
+     o3(0xE4,0xBF,0xAF), o3(0xE5,0x82,0x85),
+     o3(0xE5,0x89,0x96), o3(0xE5,0x89,0xAF),
+     o3(0xE5,0x90,0xA6), o3(0xE5,0x92,0x90),
+     o3(0xE5,0x9F,0xA0), o3(0xE5,0xA4,0xAB),
+     o3(0xE5,0xA9,0xA6),
+
+#define from_EUC_KR_DC WORDINDEX2INFO(16326)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DC_infos,
+
+#define from_EUC_KR_DD_infos WORDINDEX2INFO(16328)
+                INVALID, o3(0xE5,0xAD,0x9A),
+     o3(0xE5,0xAD,0xB5), o3(0xE5,0xAF,0x8C),
+     o3(0xE5,0xBA,0x9C), o3(0xEF,0xA5,0xA6),
+     o3(0xE6,0x89,0xB6), o3(0xE6,0x95,0xB7),
+     o3(0xE6,0x96,0xA7), o3(0xE6,0xB5,0xAE),
+     o3(0xE6,0xBA,0xA5), o3(0xE7,0x88,0xB6),
+     o3(0xE7,0xAC,0xA6), o3(0xE7,0xB0,0xBF),
+     o3(0xE7,0xBC,0xB6), o3(0xE8,0x85,0x90),
+     o3(0xE8,0x85,0x91), o3(0xE8,0x86,0x9A),
+     o3(0xE8,0x89,0x80), o3(0xE8,0x8A,0x99),
+     o3(0xE8,0x8E,0xA9), o3(0xE8,0xA8,0x83),
+     o3(0xE8,0xB2,0xA0), o3(0xE8,0xB3,0xA6),
+     o3(0xE8,0xB3,0xBB), o3(0xE8,0xB5,0xB4),
+     o3(0xE8,0xB6,0xBA), o3(0xE9,0x83,0xA8),
+     o3(0xE9,0x87,0x9C), o3(0xE9,0x98,0x9C),
+     o3(0xE9,0x99,0x84), o3(0xE9,0xA7,0x99),
+     o3(0xE9,0xB3,0xA7), o3(0xE5,0x8C,0x97),
+     o3(0xE5,0x88,0x86), o3(0xE5,0x90,0xA9),
+     o3(0xE5,0x99,0xB4), o3(0xE5,0xA2,0xB3),
+     o3(0xE5,0xA5,0x94), o3(0xE5,0xA5,0xAE),
+     o3(0xE5,0xBF,0xBF), o3(0xE6,0x86,0xA4),
+     o3(0xE6,0x89,0xAE), o3(0xE6,0x98,0x90),
+     o3(0xE6,0xB1,0xBE), o3(0xE7,0x84,0x9A),
+     o3(0xE7,0x9B,0x86), o3(0xE7,0xB2,0x89),
+     o3(0xE7,0xB3,0x9E), o3(0xE7,0xB4,0x9B),
+     o3(0xE8,0x8A,0xAC), o3(0xE8,0xB3,0x81),
+     o3(0xE9,0x9B,0xB0), o3(0xEF,0xA5,0xA7),
+     o3(0xE4,0xBD,0x9B), o3(0xE5,0xBC,0x97),
+     o3(0xE5,0xBD,0xBF), o3(0xE6,0x8B,0x82),
+     o3(0xE5,0xB4,0xA9), o3(0xE6,0x9C,0x8B),
+     o3(0xE6,0xA3,0x9A), o3(0xE7,0xA1,0xBC),
+     o3(0xE7,0xB9,0x83), o3(0xE9,0xB5,0xAC),
+     o3(0xE4,0xB8,0x95), o3(0xE5,0x82,0x99),
+     o3(0xE5,0x8C,0x95), o3(0xE5,0x8C,0xAA),
+     o3(0xE5,0x8D,0x91), o3(0xE5,0xA6,0x83),
+     o3(0xE5,0xA9,0xA2), o3(0xE5,0xBA,0x87),
+     o3(0xE6,0x82,0xB2), o3(0xE6,0x86,0x8A),
+     o3(0xE6,0x89,0x89), o3(0xE6,0x89,0xB9),
+     o3(0xE6,0x96,0x90), o3(0xE6,0x9E,0x87),
+     o3(0xE6,0xA6,0xA7), o3(0xE6,0xAF,0x94),
+     o3(0xE6,0xAF,0x96), o3(0xE6,0xAF,0x97),
+     o3(0xE6,0xAF,0x98), o3(0xE6,0xB2,0xB8),
+     o3(0xEF,0xA5,0xA8), o3(0xE7,0x90,0xB5),
+     o3(0xE7,0x97,0xBA), o3(0xE7,0xA0,0x92),
+     o3(0xE7,0xA2,0x91), o3(0xE7,0xA7,0x95),
+     o3(0xE7,0xA7,0x98), o3(0xE7,0xB2,0x83),
+     o3(0xE7,0xB7,0x8B), o3(0xE7,0xBF,0xA1),
+     o3(0xE8,0x82,0xA5),
+
+#define from_EUC_KR_DD WORDINDEX2INFO(16423)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DD_infos,
+
+#define from_EUC_KR_DE_infos WORDINDEX2INFO(16425)
+                INVALID, o3(0xE8,0x84,0xBE),
+     o3(0xE8,0x87,0x82), o3(0xE8,0x8F,0xB2),
+     o3(0xE8,0x9C,0x9A), o3(0xE8,0xA3,0xA8),
+     o3(0xE8,0xAA,0xB9), o3(0xE8,0xAD,0xAC),
+     o3(0xE8,0xB2,0xBB), o3(0xE9,0x84,0x99),
+     o3(0xE9,0x9D,0x9E), o3(0xE9,0xA3,0x9B),
+     o3(0xE9,0xBC,0xBB), o3(0xE5,0x9A,0xAC),
+     o3(0xE5,0xAC,0xAA), o3(0xE5,0xBD,0xAC),
+     o3(0xE6,0x96,0x8C), o3(0xE6,0xAA,0xB3),
+     o3(0xE6,0xAE,0xAF), o3(0xE6,0xB5,0x9C),
+     o3(0xE6,0xBF,0xB1), o3(0xE7,0x80,0x95),
+     o3(0xE7,0x89,0x9D), o3(0xE7,0x8E,0xAD),
+     o3(0xE8,0xB2,0xA7), o3(0xE8,0xB3,0x93),
+     o3(0xE9,0xA0,0xBB), o3(0xE6,0x86,0x91),
+     o3(0xE6,0xB0,0xB7), o3(0xE8,0x81,0x98),
+     o3(0xE9,0xA8,0x81), o3(0xE4,0xB9,0x8D),
+     o3(0xE4,0xBA,0x8B), o3(0xE4,0xBA,0x9B),
+     o3(0xE4,0xBB,0x95), o3(0xE4,0xBC,0xBA),
+     o3(0xE4,0xBC,0xBC), o3(0xE4,0xBD,0xBF),
+     o3(0xE4,0xBF,0x9F), o3(0xE5,0x83,0xBF),
+     o3(0xE5,0x8F,0xB2), o3(0xE5,0x8F,0xB8),
+     o3(0xE5,0x94,0x86), o3(0xE5,0x97,0xA3),
+     o3(0xE5,0x9B,0x9B), o3(0xE5,0xA3,0xAB),
+     o3(0xE5,0xA5,0xA2), o3(0xE5,0xA8,0x91),
+     o3(0xE5,0xAF,0xAB), o3(0xE5,0xAF,0xBA),
+     o3(0xE5,0xB0,0x84), o3(0xE5,0xB7,0xB3),
+     o3(0xE5,0xB8,0xAB), o3(0xE5,0xBE,0x99),
+     o3(0xE6,0x80,0x9D), o3(0xE6,0x8D,0xA8),
+     o3(0xE6,0x96,0x9C), o3(0xE6,0x96,0xAF),
+     o3(0xE6,0x9F,0xB6), o3(0xE6,0x9F,0xBB),
+     o3(0xE6,0xA2,0xAD), o3(0xE6,0xAD,0xBB),
+     o3(0xE6,0xB2,0x99), o3(0xE6,0xB3,0x97),
+     o3(0xE6,0xB8,0xA3), o3(0xE7,0x80,0x89),
+     o3(0xE7,0x8D,0x85), o3(0xE7,0xA0,0x82),
+     o3(0xE7,0xA4,0xBE), o3(0xE7,0xA5,0x80),
+     o3(0xE7,0xA5,0xA0), o3(0xE7,0xA7,0x81),
+     o3(0xE7,0xAF,0xA9), o3(0xE7,0xB4,0x97),
+     o3(0xE7,0xB5,0xB2), o3(0xE8,0x82,0x86),
+     o3(0xE8,0x88,0x8D), o3(0xE8,0x8E,0x8E),
+     o3(0xE8,0x93,0x91), o3(0xE8,0x9B,0x87),
+     o3(0xE8,0xA3,0x9F), o3(0xE8,0xA9,0x90),
+     o3(0xE8,0xA9,0x9E), o3(0xE8,0xAC,0x9D),
+     o3(0xE8,0xB3,0x9C), o3(0xE8,0xB5,0xA6),
+     o3(0xE8,0xBE,0xAD), o3(0xE9,0x82,0xAA),
+     o3(0xE9,0xA3,0xBC), o3(0xE9,0xA7,0x9F),
+     o3(0xE9,0xBA,0x9D), o3(0xE5,0x89,0x8A),
+     o3(0xEF,0xA5,0xA9), o3(0xE6,0x9C,0x94),
+     o3(0xEF,0xA5,0xAA),
+
+#define from_EUC_KR_DE WORDINDEX2INFO(16520)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DE_infos,
+
+#define from_EUC_KR_DF_infos WORDINDEX2INFO(16522)
+                INVALID, o3(0xE5,0x82,0x98),
+     o3(0xE5,0x88,0xAA), o3(0xE5,0xB1,0xB1),
+     o3(0xE6,0x95,0xA3), o3(0xE6,0xB1,0x95),
+     o3(0xE7,0x8F,0x8A), o3(0xE7,0x94,0xA3),
+     o3(0xE7,0x96,0x9D), o3(0xE7,0xAE,0x97),
+     o3(0xE8,0x92,0x9C), o3(0xE9,0x85,0xB8),
+     o3(0xE9,0x9C,0xB0), o3(0xE4,0xB9,0xB7),
+     o3(0xE6,0x92,0x92), o3(0xE6,0xAE,0xBA),
+     o3(0xE7,0x85,0x9E), o3(0xE8,0x96,0xA9),
+     o3(0xE4,0xB8,0x89), o3(0xEF,0xA5,0xAB),
+     o3(0xE6,0x9D,0x89), o3(0xE6,0xA3,0xAE),
+     o3(0xE6,0xB8,0x97), o3(0xE8,0x8A,0x9F),
+     o3(0xE8,0x94,0x98), o3(0xE8,0xA1,0xAB),
+     o3(0xE6,0x8F,0xB7), o3(0xE6,0xBE,0x81),
+     o3(0xE9,0x88,0x92), o3(0xE9,0xA2,0xAF),
+     o3(0xE4,0xB8,0x8A), o3(0xE5,0x82,0xB7),
+     o3(0xE5,0x83,0x8F), o3(0xE5,0x84,0x9F),
+     o3(0xE5,0x95,0x86), o3(0xE5,0x96,0xAA),
+     o3(0xE5,0x98,0x97), o3(0xE5,0xAD,0x80),
+     o3(0xE5,0xB0,0x99), o3(0xE5,0xB3,0xA0),
+     o3(0xE5,0xB8,0xB8), o3(0xE5,0xBA,0x8A),
+     o3(0xE5,0xBA,0xA0), o3(0xE5,0xBB,0x82),
+     o3(0xE6,0x83,0xB3), o3(0xE6,0xA1,0x91),
+     o3(0xE6,0xA9,0xA1), o3(0xE6,0xB9,0x98),
+     o3(0xE7,0x88,0xBD), o3(0xE7,0x89,0x80),
+     o3(0xE7,0x8B,0x80), o3(0xE7,0x9B,0xB8),
+     o3(0xE7,0xA5,0xA5), o3(0xE7,0xAE,0xB1),
+     o3(0xE7,0xBF,0x94), o3(0xE8,0xA3,0xB3),
+     o3(0xE8,0xA7,0xB4), o3(0xE8,0xA9,0xB3),
+     o3(0xE8,0xB1,0xA1), o3(0xE8,0xB3,0x9E),
+     o3(0xE9,0x9C,0x9C), o3(0xE5,0xA1,0x9E),
+     o3(0xE7,0x92,0xBD), o3(0xE8,0xB3,0xBD),
+     o3(0xE5,0x97,0x87), o3(0xEF,0xA5,0xAC),
+     o3(0xE7,0xA9,0xA1), o3(0xE7,0xB4,0xA2),
+     o3(0xE8,0x89,0xB2), o3(0xE7,0x89,0xB2),
+     o3(0xE7,0x94,0x9F), o3(0xE7,0x94,0xA5),
+     o3(0xEF,0xA5,0xAD), o3(0xE7,0xAC,0x99),
+     o3(0xE5,0xA2,0x85), o3(0xE5,0xA3,0xBB),
+     o3(0xE5,0xB6,0xBC), o3(0xE5,0xBA,0x8F),
+     o3(0xE5,0xBA,0xB6), o3(0xE5,0xBE,0x90),
+     o3(0xE6,0x81,0x95), o3(0xE6,0x8A,0x92),
+     o3(0xE6,0x8D,0xBF), o3(0xE6,0x95,0x8D),
+     o3(0xE6,0x9A,0x91), o3(0xE6,0x9B,0x99),
+     o3(0xE6,0x9B,0xB8), o3(0xE6,0xA0,0x96),
+     o3(0xE6,0xA3,0xB2), o3(0xE7,0x8A,0x80),
+     o3(0xE7,0x91,0x9E), o3(0xE7,0xAD,0xAE),
+     o3(0xE7,0xB5,0xAE), o3(0xE7,0xB7,0x96),
+     o3(0xE7,0xBD,0xB2),
+
+#define from_EUC_KR_DF WORDINDEX2INFO(16617)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_DF_infos,
+
+#define from_EUC_KR_E0_infos WORDINDEX2INFO(16619)
+                INVALID, o3(0xE8,0x83,0xA5),
+     o3(0xE8,0x88,0x92), o3(0xE8,0x96,0xAF),
+     o3(0xE8,0xA5,0xBF), o3(0xE8,0xAA,0x93),
+     o3(0xE9,0x80,0x9D), o3(0xE9,0x8B,0xA4),
+     o3(0xE9,0xBB,0x8D), o3(0xE9,0xBC,0xA0),
+     o3(0xE5,0xA4,0x95), o3(0xE5,0xA5,0xAD),
+     o3(0xE5,0xB8,0xAD), o3(0xE6,0x83,0x9C),
+     o3(0xE6,0x98,0x94), o3(0xE6,0x99,0xB3),
+     o3(0xE6,0x9E,0x90), o3(0xE6,0xB1,0x90),
+     o3(0xE6,0xB7,0x85), o3(0xE6,0xBD,0x9F),
+     o3(0xE7,0x9F,0xB3), o3(0xE7,0xA2,0xA9),
+     o3(0xE8,0x93,0x86), o3(0xE9,0x87,0x8B),
+     o3(0xE9,0x8C,0xAB), o3(0xE4,0xBB,0x99),
+     o3(0xE5,0x83,0x8A), o3(0xE5,0x85,0x88),
+     o3(0xE5,0x96,0x84), o3(0xE5,0xAC,0x8B),
+     o3(0xE5,0xAE,0xA3), o3(0xE6,0x89,0x87),
+     o3(0xE6,0x95,0xBE), o3(0xE6,0x97,0x8B),
+     o3(0xE6,0xB8,0xB2), o3(0xE7,0x85,0xBD),
+     o3(0xE7,0x90,0x81), o3(0xE7,0x91,0x84),
+     o3(0xE7,0x92,0x87), o3(0xE7,0x92,0xBF),
+     o3(0xE7,0x99,0xAC), o3(0xE7,0xA6,0xAA),
+     o3(0xE7,0xB7,0x9A), o3(0xE7,0xB9,0x95),
+     o3(0xE7,0xBE,0xA8), o3(0xE8,0x85,0xBA),
+     o3(0xE8,0x86,0xB3), o3(0xE8,0x88,0xB9),
+     o3(0xE8,0x98,0x9A), o3(0xE8,0x9F,0xAC),
+     o3(0xE8,0xA9,0xB5), o3(0xE8,0xB7,0xA3),
+     o3(0xE9,0x81,0xB8), o3(0xE9,0x8A,0x91),
+     o3(0xE9,0x90,0xA5), o3(0xE9,0xA5,0x8D),
+     o3(0xE9,0xAE,0xAE), o3(0xE5,0x8D,0xA8),
+     o3(0xE5,0xB1,0x91), o3(0xE6,0xA5,0x94),
+     o3(0xE6,0xB3,0x84), o3(0xE6,0xB4,0xA9),
+     o3(0xE6,0xB8,0xAB), o3(0xE8,0x88,0x8C),
+     o3(0xE8,0x96,0x9B), o3(0xE8,0xA4,0xBB),
+     o3(0xE8,0xA8,0xAD), o3(0xE8,0xAA,0xAA),
+     o3(0xE9,0x9B,0xAA), o3(0xE9,0xBD,0xA7),
+     o3(0xE5,0x89,0xA1), o3(0xE6,0x9A,0xB9),
+     o3(0xE6,0xAE,0xB2), o3(0xE7,0xBA,0x96),
+     o3(0xE8,0x9F,0xBE), o3(0xE8,0xB4,0x8D),
+     o3(0xE9,0x96,0x83), o3(0xE9,0x99,0x9D),
+     o3(0xE6,0x94,0x9D), o3(0xE6,0xB6,0x89),
+     o3(0xE7,0x87,0xAE), o3(0xEF,0xA5,0xAE),
+     o3(0xE5,0x9F,0x8E), o3(0xE5,0xA7,0x93),
+     o3(0xE5,0xAE,0xAC), o3(0xE6,0x80,0xA7),
+     o3(0xE6,0x83,0xBA), o3(0xE6,0x88,0x90),
+     o3(0xE6,0x98,0x9F), o3(0xE6,0x99,0x9F),
+     o3(0xE7,0x8C,0xA9), o3(0xE7,0x8F,0xB9),
+     o3(0xE7,0x9B,0x9B), o3(0xE7,0x9C,0x81),
+     o3(0xE7,0xAD,0xAC),
+
+#define from_EUC_KR_E0 WORDINDEX2INFO(16714)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E0_infos,
+
+#define from_EUC_KR_E1_infos WORDINDEX2INFO(16716)
+                INVALID, o3(0xE8,0x81,0x96),
+     o3(0xE8,0x81,0xB2), o3(0xE8,0x85,0xA5),
+     o3(0xE8,0xAA,0xA0), o3(0xE9,0x86,0x92),
+     o3(0xE4,0xB8,0x96), o3(0xE5,0x8B,0xA2),
+     o3(0xE6,0xAD,0xB2), o3(0xE6,0xB4,0x97),
+     o3(0xE7,0xA8,0x85), o3(0xE7,0xAC,0xB9),
+     o3(0xE7,0xB4,0xB0), o3(0xEF,0xA5,0xAF),
+     o3(0xE8,0xB2,0xB0), o3(0xE5,0x8F,0xAC),
+     o3(0xE5,0x98,0xAF), o3(0xE5,0xA1,0x91),
+     o3(0xE5,0xAE,0xB5), o3(0xE5,0xB0,0x8F),
+     o3(0xE5,0xB0,0x91), o3(0xE5,0xB7,0xA2),
+     o3(0xE6,0x89,0x80), o3(0xE6,0x8E,0x83),
+     o3(0xE6,0x90,0x94), o3(0xE6,0x98,0xAD),
+     o3(0xE6,0xA2,0xB3), o3(0xE6,0xB2,0xBC),
+     o3(0xE6,0xB6,0x88), o3(0xE6,0xBA,0xAF),
+     o3(0xE7,0x80,0x9F), o3(0xE7,0x82,0xA4),
+     o3(0xE7,0x87,0x92), o3(0xE7,0x94,0xA6),
+     o3(0xE7,0x96,0x8F), o3(0xE7,0x96,0x8E),
+     o3(0xE7,0x98,0x99), o3(0xE7,0xAC,0x91),
+     o3(0xE7,0xAF,0xA0), o3(0xE7,0xB0,0xAB),
+     o3(0xE7,0xB4,0xA0), o3(0xE7,0xB4,0xB9),
+     o3(0xE8,0x94,0xAC), o3(0xE8,0x95,0xAD),
+     o3(0xE8,0x98,0x87), o3(0xE8,0xA8,0xB4),
+     o3(0xE9,0x80,0x8D), o3(0xE9,0x81,0xA1),
+     o3(0xE9,0x82,0xB5), o3(0xE9,0x8A,0xB7),
+     o3(0xE9,0x9F,0xB6), o3(0xE9,0xA8,0xB7),
+     o3(0xE4,0xBF,0x97), o3(0xE5,0xB1,0xAC),
+     o3(0xE6,0x9D,0x9F), o3(0xE6,0xB6,0x91),
+     o3(0xE7,0xB2,0x9F), o3(0xE7,0xBA,0x8C),
+     o3(0xE8,0xAC,0x96), o3(0xE8,0xB4,0x96),
+     o3(0xE9,0x80,0x9F), o3(0xE5,0xAD,0xAB),
+     o3(0xE5,0xB7,0xBD), o3(0xE6,0x90,0x8D),
+     o3(0xE8,0x93,0x80), o3(0xE9,0x81,0x9C),
+     o3(0xE9,0xA3,0xA1), o3(0xE7,0x8E,0x87),
+     o3(0xE5,0xAE,0x8B), o3(0xE6,0x82,0x9A),
+     o3(0xE6,0x9D,0xBE), o3(0xE6,0xB7,0x9E),
+     o3(0xE8,0xA8,0x9F), o3(0xE8,0xAA,0xA6),
+     o3(0xE9,0x80,0x81), o3(0xE9,0xA0,0x8C),
+     o3(0xE5,0x88,0xB7), o3(0xEF,0xA5,0xB0),
+     o3(0xE7,0x81,0x91), o3(0xE7,0xA2,0x8E),
+     o3(0xE9,0x8E,0x96), o3(0xE8,0xA1,0xB0),
+     o3(0xE9,0x87,0x97), o3(0xE4,0xBF,0xAE),
+     o3(0xE5,0x8F,0x97), o3(0xE5,0x97,0xBD),
+     o3(0xE5,0x9B,0x9A), o3(0xE5,0x9E,0x82),
+     o3(0xE5,0xA3,0xBD), o3(0xE5,0xAB,0x82),
+     o3(0xE5,0xAE,0x88), o3(0xE5,0xB2,0xAB),
+     o3(0xE5,0xB3,0x80), o3(0xE5,0xB8,0xA5),
+     o3(0xE6,0x84,0x81),
+
+#define from_EUC_KR_E1 WORDINDEX2INFO(16811)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E1_infos,
+
+#define from_EUC_KR_E2_infos WORDINDEX2INFO(16813)
+                INVALID, o3(0xE6,0x88,0x8D),
+     o3(0xE6,0x89,0x8B), o3(0xE6,0x8E,0x88),
+     o3(0xE6,0x90,0x9C), o3(0xE6,0x94,0xB6),
+     o3(0xE6,0x95,0xB8), o3(0xE6,0xA8,0xB9),
+     o3(0xE6,0xAE,0x8A), o3(0xE6,0xB0,0xB4),
+     o3(0xE6,0xB4,0x99), o3(0xE6,0xBC,0xB1),
+     o3(0xE7,0x87,0xA7), o3(0xE7,0x8B,0xA9),
+     o3(0xE7,0x8D,0xB8), o3(0xE7,0x90,0x87),
+     o3(0xE7,0x92,0xB2), o3(0xE7,0x98,0xA6),
+     o3(0xE7,0x9D,0xA1), o3(0xE7,0xA7,0x80),
+     o3(0xE7,0xA9,0x97), o3(0xE7,0xAB,0xAA),
+     o3(0xE7,0xB2,0xB9), o3(0xE7,0xB6,0x8F),
+     o3(0xE7,0xB6,0xAC), o3(0xE7,0xB9,0xA1),
+     o3(0xE7,0xBE,0x9E), o3(0xE8,0x84,0xA9),
+     o3(0xE8,0x8C,0xB1), o3(0xE8,0x92,0x90),
+     o3(0xE8,0x93,0x9A), o3(0xE8,0x97,0xAA),
+     o3(0xE8,0xA2,0x96), o3(0xE8,0xAA,0xB0),
+     o3(0xE8,0xAE,0x90), o3(0xE8,0xBC,0xB8),
+     o3(0xE9,0x81,0x82), o3(0xE9,0x82,0x83),
+     o3(0xE9,0x85,0xAC), o3(0xE9,0x8A,0x96),
+     o3(0xE9,0x8A,0xB9), o3(0xE9,0x9A,0x8B),
+     o3(0xE9,0x9A,0xA7), o3(0xE9,0x9A,0xA8),
+     o3(0xE9,0x9B,0x96), o3(0xE9,0x9C,0x80),
+     o3(0xE9,0xA0,0x88), o3(0xE9,0xA6,0x96),
+     o3(0xE9,0xAB,0x93), o3(0xE9,0xAC,0x9A),
+     o3(0xE5,0x8F,0x94), o3(0xE5,0xA1,0xBE),
+     o3(0xE5,0xA4,0x99), o3(0xE5,0xAD,0xB0),
+     o3(0xE5,0xAE,0xBF), o3(0xE6,0xB7,0x91),
+     o3(0xE6,0xBD,0x9A), o3(0xE7,0x86,0x9F),
+     o3(0xE7,0x90,0xA1), o3(0xE7,0x92,0xB9),
+     o3(0xE8,0x82,0x85), o3(0xE8,0x8F,0xBD),
+     o3(0xE5,0xB7,0xA1), o3(0xE5,0xBE,0x87),
+     o3(0xE5,0xBE,0xAA), o3(0xE6,0x81,0x82),
+     o3(0xE6,0x97,0xAC), o3(0xE6,0xA0,0x92),
+     o3(0xE6,0xA5,0xAF), o3(0xE6,0xA9,0x93),
+     o3(0xE6,0xAE,0x89), o3(0xE6,0xB4,0xB5),
+     o3(0xE6,0xB7,0xB3), o3(0xE7,0x8F,0xA3),
+     o3(0xE7,0x9B,0xBE), o3(0xE7,0x9E,0xAC),
+     o3(0xE7,0xAD,0x8D), o3(0xE7,0xB4,0x94),
+     o3(0xE8,0x84,0xA3), o3(0xE8,0x88,0x9C),
+     o3(0xE8,0x8D,0x80), o3(0xE8,0x93,0xB4),
+     o3(0xE8,0x95,0xA3), o3(0xE8,0xA9,0xA2),
+     o3(0xE8,0xAB,0x84), o3(0xE9,0x86,0x87),
+     o3(0xE9,0x8C,0x9E), o3(0xE9,0xA0,0x86),
+     o3(0xE9,0xA6,0xB4), o3(0xE6,0x88,0x8C),
+     o3(0xE8,0xA1,0x93), o3(0xE8,0xBF,0xB0),
+     o3(0xE9,0x89,0xA5), o3(0xE5,0xB4,0x87),
+     o3(0xE5,0xB4,0xA7),
+
+#define from_EUC_KR_E2 WORDINDEX2INFO(16908)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E2_infos,
+
+#define from_EUC_KR_E3_infos WORDINDEX2INFO(16910)
+                INVALID, o3(0xE5,0xB5,0xA9),
+     o3(0xE7,0x91,0x9F), o3(0xE8,0x86,0x9D),
+     o3(0xE8,0x9D,0xA8), o3(0xE6,0xBF,0x95),
+     o3(0xE6,0x8B,0xBE), o3(0xE7,0xBF,0x92),
+     o3(0xE8,0xA4,0xB6), o3(0xE8,0xA5,0xB2),
+     o3(0xE4,0xB8,0x9E), o3(0xE4,0xB9,0x98),
+     o3(0xE5,0x83,0xA7), o3(0xE5,0x8B,0x9D),
+     o3(0xE5,0x8D,0x87), o3(0xE6,0x89,0xBF),
+     o3(0xE6,0x98,0x87), o3(0xE7,0xB9,0xA9),
+     o3(0xE8,0xA0,0x85), o3(0xE9,0x99,0x9E),
+     o3(0xE4,0xBE,0x8D), o3(0xE5,0x8C,0x99),
+     o3(0xE5,0x98,0xB6), o3(0xE5,0xA7,0x8B),
+     o3(0xE5,0xAA,0xA4), o3(0xE5,0xB0,0xB8),
+     o3(0xE5,0xB1,0x8E), o3(0xE5,0xB1,0x8D),
+     o3(0xE5,0xB8,0x82), o3(0xE5,0xBC,0x91),
+     o3(0xE6,0x81,0x83), o3(0xE6,0x96,0xBD),
+     o3(0xE6,0x98,0xAF), o3(0xE6,0x99,0x82),
+     o3(0xE6,0x9E,0xBE), o3(0xE6,0x9F,0xB4),
+     o3(0xE7,0x8C,0x9C), o3(0xE7,0x9F,0xA2),
+     o3(0xE7,0xA4,0xBA), o3(0xE7,0xBF,0x85),
+     o3(0xE8,0x92,0x94), o3(0xE8,0x93,0x8D),
+     o3(0xE8,0xA6,0x96), o3(0xE8,0xA9,0xA6),
+     o3(0xE8,0xA9,0xA9), o3(0xE8,0xAB,0xA1),
+     o3(0xE8,0xB1,0x95), o3(0xE8,0xB1,0xBA),
+     o3(0xE5,0x9F,0xB4), o3(0xE5,0xAF,0x94),
+     o3(0xE5,0xBC,0x8F), o3(0xE6,0x81,0xAF),
+     o3(0xE6,0x8B,0xAD), o3(0xE6,0xA4,0x8D),
+     o3(0xE6,0xAE,0x96), o3(0xE6,0xB9,0x9C),
+     o3(0xE7,0x86,0x84), o3(0xE7,0xAF,0x92),
+     o3(0xE8,0x9D,0x95), o3(0xE8,0xAD,0x98),
+     o3(0xE8,0xBB,0xBE), o3(0xE9,0xA3,0x9F),
+     o3(0xE9,0xA3,0xBE), o3(0xE4,0xBC,0xB8),
+     o3(0xE4,0xBE,0x81), o3(0xE4,0xBF,0xA1),
+     o3(0xE5,0x91,0xBB), o3(0xE5,0xA8,0xA0),
+     o3(0xE5,0xAE,0xB8), o3(0xE6,0x84,0xBC),
+     o3(0xE6,0x96,0xB0), o3(0xE6,0x99,0xA8),
+     o3(0xE7,0x87,0xBC), o3(0xE7,0x94,0xB3),
+     o3(0xE7,0xA5,0x9E), o3(0xE7,0xB4,0xB3),
+     o3(0xE8,0x85,0x8E), o3(0xE8,0x87,0xA3),
+     o3(0xE8,0x8E,0x98), o3(0xE8,0x96,0xAA),
+     o3(0xE8,0x97,0x8E), o3(0xE8,0x9C,0x83),
+     o3(0xE8,0xA8,0x8A), o3(0xE8,0xBA,0xAB),
+     o3(0xE8,0xBE,0x9B), o3(0xEF,0xA5,0xB1),
+     o3(0xE8,0xBF,0x85), o3(0xE5,0xA4,0xB1),
+     o3(0xE5,0xAE,0xA4), o3(0xE5,0xAF,0xA6),
+     o3(0xE6,0x82,0x89), o3(0xE5,0xAF,0xA9),
+     o3(0xE5,0xB0,0x8B), o3(0xE5,0xBF,0x83),
+     o3(0xE6,0xB2,0x81),
+
+#define from_EUC_KR_E3 WORDINDEX2INFO(17005)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E3_infos,
+
+#define from_EUC_KR_E4_infos WORDINDEX2INFO(17007)
+                INVALID, o3(0xEF,0xA5,0xB2),
+     o3(0xE6,0xB7,0xB1), o3(0xE7,0x80,0x8B),
+     o3(0xE7,0x94,0x9A), o3(0xE8,0x8A,0xAF),
+     o3(0xE8,0xAB,0xB6), o3(0xE4,0xBB,0x80),
+     o3(0xE5,0x8D,0x81), o3(0xEF,0xA5,0xB3),
+     o3(0xE9,0x9B,0x99), o3(0xE6,0xB0,0x8F),
+     o3(0xE4,0xBA,0x9E), o3(0xE4,0xBF,0x84),
+     o3(0xE5,0x85,0x92), o3(0xE5,0x95,0x9E),
+     o3(0xE5,0xA8,0xA5), o3(0xE5,0xB3,0xA8),
+     o3(0xE6,0x88,0x91), o3(0xE7,0x89,0x99),
+     o3(0xE8,0x8A,0xBD), o3(0xE8,0x8E,0xAA),
+     o3(0xE8,0x9B,0xBE), o3(0xE8,0xA1,0x99),
+     o3(0xE8,0xA8,0x9D), o3(0xE9,0x98,0xBF),
+     o3(0xE9,0x9B,0x85), o3(0xE9,0xA4,0x93),
+     o3(0xE9,0xB4,0x89), o3(0xE9,0xB5,0x9D),
+     o3(0xE5,0xA0,0x8A), o3(0xE5,0xB2,0xB3),
+     o3(0xE5,0xB6,0xBD), o3(0xE5,0xB9,0x84),
+     o3(0xE6,0x83,0xA1), o3(0xE6,0x84,0x95),
+     o3(0xE6,0x8F,0xA1), o3(0xE6,0xA8,0x82),
+     o3(0xE6,0xB8,0xA5), o3(0xE9,0x84,0x82),
+     o3(0xE9,0x8D,0x94), o3(0xE9,0xA1,0x8E),
+     o3(0xE9,0xB0,0x90), o3(0xE9,0xBD,0xB7),
+     o3(0xE5,0xAE,0x89), o3(0xE5,0xB2,0xB8),
+     o3(0xE6,0x8C,0x89), o3(0xE6,0x99,0x8F),
+     o3(0xE6,0xA1,0x88), o3(0xE7,0x9C,0xBC),
+     o3(0xE9,0x9B,0x81), o3(0xE9,0x9E,0x8D),
+     o3(0xE9,0xA1,0x94), o3(0xE9,0xAE,0x9F),
+     o3(0xE6,0x96,0xA1), o3(0xE8,0xAC,0x81),
+     o3(0xE8,0xBB,0x8B), o3(0xE9,0x96,0xBC),
+     o3(0xE5,0x94,0xB5), o3(0xE5,0xB2,0xA9),
+     o3(0xE5,0xB7,0x96), o3(0xE5,0xBA,0xB5),
+     o3(0xE6,0x9A,0x97), o3(0xE7,0x99,0x8C),
+     o3(0xE8,0x8F,0xB4), o3(0xE9,0x97,0x87),
+     o3(0xE5,0xA3,0x93), o3(0xE6,0x8A,0xBC),
+     o3(0xE7,0x8B,0x8E), o3(0xE9,0xB4,0xA8),
+     o3(0xE4,0xBB,0xB0), o3(0xE5,0xA4,0xAE),
+     o3(0xE6,0x80,0x8F), o3(0xE6,0x98,0xBB),
+     o3(0xE6,0xAE,0x83), o3(0xE7,0xA7,0xA7),
+     o3(0xE9,0xB4,0xA6), o3(0xE5,0x8E,0x93),
+     o3(0xE5,0x93,0x80), o3(0xE5,0x9F,0x83),
+     o3(0xE5,0xB4,0x96), o3(0xE6,0x84,0x9B),
+     o3(0xE6,0x9B,0x96), o3(0xE6,0xB6,0xAF),
+     o3(0xE7,0xA2,0x8D), o3(0xE8,0x89,0xBE),
+     o3(0xE9,0x9A,0x98), o3(0xE9,0x9D,0x84),
+     o3(0xE5,0x8E,0x84), o3(0xE6,0x89,0xBC),
+     o3(0xE6,0x8E,0x96), o3(0xE6,0xB6,0xB2),
+     o3(0xE7,0xB8,0x8A), o3(0xE8,0x85,0x8B),
+     o3(0xE9,0xA1,0x8D),
+
+#define from_EUC_KR_E4 WORDINDEX2INFO(17102)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E4_infos,
+
+#define from_EUC_KR_E5_infos WORDINDEX2INFO(17104)
+                INVALID, o3(0xE6,0xAB,0xBB),
+     o3(0xE7,0xBD,0x8C), o3(0xE9,0xB6,0xAF),
+     o3(0xE9,0xB8,0x9A), o3(0xE4,0xB9,0x9F),
+     o3(0xE5,0x80,0xBB), o3(0xE5,0x86,0xB6),
+     o3(0xE5,0xA4,0x9C), o3(0xE6,0x83,0xB9),
+     o3(0xE6,0x8F,0xB6), o3(0xE6,0xA4,0xB0),
+     o3(0xE7,0x88,0xBA), o3(0xE8,0x80,0xB6),
+     o3(0xEF,0xA5,0xB4), o3(0xE9,0x87,0x8E),
+     o3(0xE5,0xBC,0xB1), o3(0xEF,0xA5,0xB5),
+     o3(0xEF,0xA5,0xB6), o3(0xE7,0xB4,0x84),
+     o3(0xE8,0x8B,0xA5), o3(0xE8,0x91,0xAF),
+     o3(0xE8,0x92,0xBB), o3(0xE8,0x97,0xA5),
+     o3(0xE8,0xBA,0x8D), o3(0xEF,0xA5,0xB7),
+     o3(0xE4,0xBD,0xAF), o3(0xEF,0xA5,0xB8),
+     o3(0xEF,0xA5,0xB9), o3(0xE5,0xA3,0xA4),
+     o3(0xE5,0xAD,0x83), o3(0xE6,0x81,0x99),
+     o3(0xE6,0x8F,0x9A), o3(0xE6,0x94,0x98),
+     o3(0xE6,0x95,0xAD), o3(0xE6,0x9A,0x98),
+     o3(0xEF,0xA5,0xBA), o3(0xE6,0xA5,0x8A),
+     o3(0xE6,0xA8,0xA3), o3(0xE6,0xB4,0x8B),
+     o3(0xE7,0x80,0x81), o3(0xE7,0x85,0xAC),
+     o3(0xE7,0x97,0x92), o3(0xE7,0x98,0x8D),
+     o3(0xE7,0xA6,0xB3), o3(0xE7,0xA9,0xB0),
+     o3(0xEF,0xA5,0xBB), o3(0xE7,0xBE,0x8A),
+     o3(0xEF,0xA5,0xBC), o3(0xE8,0xA5,0x84),
+     o3(0xEF,0xA5,0xBD), o3(0xE8,0xAE,0x93),
+     o3(0xE9,0x87,0x80), o3(0xE9,0x99,0xBD),
+     o3(0xEF,0xA5,0xBE), o3(0xE9,0xA4,0x8A),
+     o3(0xE5,0x9C,0x84), o3(0xE5,0xBE,0xA1),
+     o3(0xE6,0x96,0xBC), o3(0xE6,0xBC,0x81),
+     o3(0xE7,0x98,0x80), o3(0xE7,0xA6,0xA6),
+     o3(0xE8,0xAA,0x9E), o3(0xE9,0xA6,0xAD),
+     o3(0xE9,0xAD,0x9A), o3(0xE9,0xBD,0xAC),
+     o3(0xE5,0x84,0x84), o3(0xE6,0x86,0xB6),
+     o3(0xE6,0x8A,0x91), o3(0xE6,0xAA,0x8D),
+     o3(0xE8,0x87,0x86), o3(0xE5,0x81,0x83),
+     o3(0xE5,0xA0,0xB0), o3(0xE5,0xBD,0xA6),
+     o3(0xE7,0x84,0x89), o3(0xE8,0xA8,0x80),
+     o3(0xE8,0xAB,0xBA), o3(0xE5,0xAD,0xBC),
+     o3(0xE8,0x98,0x96), o3(0xE4,0xBF,0xBA),
+     o3(0xE5,0x84,0xBC), o3(0xE5,0x9A,0xB4),
+     o3(0xE5,0xA5,0x84), o3(0xE6,0x8E,0xA9),
+     o3(0xE6,0xB7,0xB9), o3(0xE5,0xB6,0xAA),
+     o3(0xE6,0xA5,0xAD), o3(0xE5,0x86,0x86),
+     o3(0xE4,0xBA,0x88), o3(0xE4,0xBD,0x99),
+     o3(0xEF,0xA5,0xBF), o3(0xEF,0xA6,0x80),
+     o3(0xEF,0xA6,0x81), o3(0xE5,0xA6,0x82),
+     o3(0xEF,0xA6,0x82),
+
+#define from_EUC_KR_E5 WORDINDEX2INFO(17199)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E5_infos,
+
+#define from_EUC_KR_E6_infos WORDINDEX2INFO(17201)
+                INVALID, o3(0xEF,0xA6,0x83),
+     o3(0xE6,0xAD,0x9F), o3(0xE6,0xB1,0x9D),
+     o3(0xEF,0xA6,0x84), o3(0xE7,0x92,0xB5),
+     o3(0xE7,0xA4,0x96), o3(0xEF,0xA6,0x85),
+     o3(0xE8,0x88,0x87), o3(0xE8,0x89,0x85),
+     o3(0xE8,0x8C,0xB9), o3(0xE8,0xBC,0xBF),
+     o3(0xE8,0xBD,0x9D), o3(0xEF,0xA6,0x86),
+     o3(0xE9,0xA4,0x98), o3(0xEF,0xA6,0x87),
+     o3(0xEF,0xA6,0x88), o3(0xEF,0xA6,0x89),
+     o3(0xE4,0xBA,0xA6), o3(0xEF,0xA6,0x8A),
+     o3(0xE5,0x9F,0x9F), o3(0xE5,0xBD,0xB9),
+     o3(0xE6,0x98,0x93), o3(0xEF,0xA6,0x8B),
+     o3(0xEF,0xA6,0x8C), o3(0xE7,0x96,0xAB),
+     o3(0xE7,0xB9,0xB9), o3(0xE8,0xAD,0xAF),
+     o3(0xEF,0xA6,0x8D), o3(0xE9,0x80,0x86),
+     o3(0xE9,0xA9,0x9B), o3(0xE5,0x9A,0xA5),
+     o3(0xE5,0xA0,0xA7), o3(0xE5,0xA7,0xB8),
+     o3(0xE5,0xA8,0x9F), o3(0xE5,0xAE,0xB4),
+     o3(0xEF,0xA6,0x8E), o3(0xE5,0xBB,0xB6),
+     o3(0xEF,0xA6,0x8F), o3(0xEF,0xA6,0x90),
+     o3(0xE6,0x8D,0x90), o3(0xE6,0x8C,0xBB),
+     o3(0xEF,0xA6,0x91), o3(0xE6,0xA4,0xBD),
+     o3(0xE6,0xB2,0x87), o3(0xE6,0xB2,0xBF),
+     o3(0xE6,0xB6,0x8E), o3(0xE6,0xB6,0x93),
+     o3(0xE6,0xB7,0xB5), o3(0xE6,0xBC,0x94),
+     o3(0xEF,0xA6,0x92), o3(0xE7,0x83,0x9F),
+     o3(0xE7,0x84,0xB6), o3(0xE7,0x85,0x99),
+     o3(0xEF,0xA6,0x93), o3(0xE7,0x87,0x83),
+     o3(0xE7,0x87,0x95), o3(0xEF,0xA6,0x94),
+     o3(0xE7,0xA1,0x8F), o3(0xE7,0xA1,0xAF),
+     o3(0xEF,0xA6,0x95), o3(0xE7,0xAD,0xB5),
+     o3(0xE7,0xB7,0xA3), o3(0xEF,0xA6,0x96),
+     o3(0xE7,0xB8,0xAF), o3(0xEF,0xA6,0x97),
+     o3(0xE8,0xA1,0x8D), o3(0xE8,0xBB,0x9F),
+     o3(0xEF,0xA6,0x98), o3(0xEF,0xA6,0x99),
+     o3(0xEF,0xA6,0x9A), o3(0xE9,0x89,0x9B),
+     o3(0xEF,0xA6,0x9B), o3(0xE9,0xB3,0xB6),
+     o3(0xEF,0xA6,0x9C), o3(0xEF,0xA6,0x9D),
+     o3(0xEF,0xA6,0x9E), o3(0xE6,0x82,0x85),
+     o3(0xE6,0xB6,0x85), o3(0xEF,0xA6,0x9F),
+     o3(0xE7,0x86,0xB1), o3(0xEF,0xA6,0xA0),
+     o3(0xEF,0xA6,0xA1), o3(0xE9,0x96,0xB1),
+     o3(0xE5,0x8E,0xAD), o3(0xEF,0xA6,0xA2),
+     o3(0xEF,0xA6,0xA3), o3(0xEF,0xA6,0xA4),
+     o3(0xE6,0x9F,0x93), o3(0xEF,0xA6,0xA5),
+     o3(0xE7,0x82,0x8E), o3(0xE7,0x84,0xB0),
+     o3(0xE7,0x90,0xB0), o3(0xE8,0x89,0xB6),
+     o3(0xE8,0x8B,0x92),
+
+#define from_EUC_KR_E6 WORDINDEX2INFO(17296)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E6_infos,
+
+#define from_EUC_KR_E7_infos WORDINDEX2INFO(17298)
+                INVALID, o3(0xEF,0xA6,0xA6),
+     o3(0xE9,0x96,0xBB), o3(0xE9,0xAB,0xA5),
+     o3(0xE9,0xB9,0xBD), o3(0xE6,0x9B,0x84),
+     o3(0xEF,0xA6,0xA7), o3(0xE7,0x87,0x81),
+     o3(0xE8,0x91,0x89), o3(0xEF,0xA6,0xA8),
+     o3(0xEF,0xA6,0xA9), o3(0xE5,0xA1,0x8B),
+     o3(0xEF,0xA6,0xAA), o3(0xEF,0xA6,0xAB),
+     o3(0xE5,0xB6,0xB8), o3(0xE5,0xBD,0xB1),
+     o3(0xEF,0xA6,0xAC), o3(0xE6,0x98,0xA0),
+     o3(0xE6,0x9A,0x8E), o3(0xE6,0xA5,0xB9),
+     o3(0xE6,0xA6,0xAE), o3(0xE6,0xB0,0xB8),
+     o3(0xE6,0xB3,0xB3), o3(0xE6,0xB8,0xB6),
+     o3(0xE6,0xBD,0x81), o3(0xE6,0xBF,0x9A),
+     o3(0xE7,0x80,0x9B), o3(0xE7,0x80,0xAF),
+     o3(0xE7,0x85,0x90), o3(0xE7,0x87,0x9F),
+     o3(0xE7,0x8D,0xB0), o3(0xEF,0xA6,0xAD),
+     o3(0xE7,0x91,0x9B), o3(0xEF,0xA6,0xAE),
+     o3(0xE7,0x93,0x94), o3(0xE7,0x9B,0x88),
+     o3(0xE7,0xA9,0x8E), o3(0xE7,0xBA,0x93),
+     o3(0xEF,0xA6,0xAF), o3(0xEF,0xA6,0xB0),
+     o3(0xE8,0x8B,0xB1), o3(0xE8,0xA9,0xA0),
+     o3(0xE8,0xBF,0x8E), o3(0xEF,0xA6,0xB1),
+     o3(0xE9,0x8D,0x88), o3(0xEF,0xA6,0xB2),
+     o3(0xE9,0x9C,0x99), o3(0xEF,0xA6,0xB3),
+     o3(0xEF,0xA6,0xB4), o3(0xE4,0xB9,0x82),
+     o3(0xE5,0x80,0xAA), o3(0xEF,0xA6,0xB5),
+     o3(0xE5,0x88,0x88), o3(0xE5,0x8F,0xA1),
+     o3(0xE6,0x9B,0xB3), o3(0xE6,0xB1,0xAD),
+     o3(0xE6,0xBF,0x8A), o3(0xE7,0x8C,0x8A),
+     o3(0xE7,0x9D,0xBF), o3(0xE7,0xA9,0xA2),
+     o3(0xE8,0x8A,0xAE), o3(0xE8,0x97,0x9D),
+     o3(0xE8,0x98,0x82), o3(0xEF,0xA6,0xB6),
+     o3(0xE8,0xA3,0x94), o3(0xE8,0xA9,0xA3),
+     o3(0xE8,0xAD,0xBD), o3(0xE8,0xB1,0xAB),
+     o3(0xEF,0xA6,0xB7), o3(0xE9,0x8A,0xB3),
+     o3(0xEF,0xA6,0xB8), o3(0xE9,0x9C,0x93),
+     o3(0xE9,0xA0,0x90), o3(0xE4,0xBA,0x94),
+     o3(0xE4,0xBC,0x8D), o3(0xE4,0xBF,0x89),
+     o3(0xE5,0x82,0xB2), o3(0xE5,0x8D,0x88),
+     o3(0xE5,0x90,0xBE), o3(0xE5,0x90,0xB3),
+     o3(0xE5,0x97,0x9A), o3(0xE5,0xA1,0xA2),
+     o3(0xE5,0xA2,0xBA), o3(0xE5,0xA5,0xA7),
+     o3(0xE5,0xA8,0x9B), o3(0xE5,0xAF,0xA4),
+     o3(0xE6,0x82,0x9F), o3(0xEF,0xA6,0xB9),
+     o3(0xE6,0x87,0x8A), o3(0xE6,0x95,0x96),
+     o3(0xE6,0x97,0xBF), o3(0xE6,0x99,0xA4),
+     o3(0xE6,0xA2,0xA7), o3(0xE6,0xB1,0x9A),
+     o3(0xE6,0xBE,0xB3),
+
+#define from_EUC_KR_E7 WORDINDEX2INFO(17393)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E7_infos,
+
+#define from_EUC_KR_E8_infos WORDINDEX2INFO(17395)
+                INVALID, o3(0xE7,0x83,0x8F),
+     o3(0xE7,0x86,0xAC), o3(0xE7,0x8D,0x92),
+     o3(0xE7,0xAD,0xBD), o3(0xE8,0x9C,0x88),
+     o3(0xE8,0xAA,0xA4), o3(0xE9,0xB0,0xB2),
+     o3(0xE9,0xBC,0x87), o3(0xE5,0xB1,0x8B),
+     o3(0xE6,0xB2,0x83), o3(0xE7,0x8D,0x84),
+     o3(0xE7,0x8E,0x89), o3(0xE9,0x88,0xBA),
+     o3(0xE6,0xBA,0xAB), o3(0xE7,0x91,0xA5),
+     o3(0xE7,0x98,0x9F), o3(0xE7,0xA9,0xA9),
+     o3(0xE7,0xB8,0x95), o3(0xE8,0x98,0x8A),
+     o3(0xE5,0x85,0x80), o3(0xE5,0xA3,0x85),
+     o3(0xE6,0x93,0x81), o3(0xE7,0x93,0xAE),
+     o3(0xE7,0x94,0x95), o3(0xE7,0x99,0xB0),
+     o3(0xE7,0xBF,0x81), o3(0xE9,0x82,0x95),
+     o3(0xE9,0x9B,0x8D), o3(0xE9,0xA5,0x94),
+     o3(0xE6,0xB8,0xA6), o3(0xE7,0x93,0xA6),
+     o3(0xE7,0xAA,0xA9), o3(0xE7,0xAA,0xAA),
+     o3(0xE8,0x87,0xA5), o3(0xE8,0x9B,0x99),
+     o3(0xE8,0x9D,0xB8), o3(0xE8,0xA8,0x9B),
+     o3(0xE5,0xA9,0x89), o3(0xE5,0xAE,0x8C),
+     o3(0xE5,0xAE,0x9B), o3(0xE6,0xA2,0xA1),
+     o3(0xE6,0xA4,0x80), o3(0xE6,0xB5,0xA3),
+     o3(0xE7,0x8E,0xA9), o3(0xE7,0x90,0x93),
+     o3(0xE7,0x90,0xAC), o3(0xE7,0xA2,0x97),
+     o3(0xE7,0xB7,0xA9), o3(0xE7,0xBF,0xAB),
+     o3(0xE8,0x84,0x98), o3(0xE8,0x85,0x95),
+     o3(0xE8,0x8E,0x9E), o3(0xE8,0xB1,0x8C),
+     o3(0xE9,0x98,0xAE), o3(0xE9,0xA0,0x91),
+     o3(0xE6,0x9B,0xB0), o3(0xE5,0xBE,0x80),
+     o3(0xE6,0x97,0xBA), o3(0xE6,0x9E,0x89),
+     o3(0xE6,0xB1,0xAA), o3(0xE7,0x8E,0x8B),
+     o3(0xE5,0x80,0xAD), o3(0xE5,0xA8,0x83),
+     o3(0xE6,0xAD,0xAA), o3(0xE7,0x9F,0xAE),
+     o3(0xE5,0xA4,0x96), o3(0xE5,0xB5,0xAC),
+     o3(0xE5,0xB7,0x8D), o3(0xE7,0x8C,0xA5),
+     o3(0xE7,0x95,0x8F), o3(0xEF,0xA6,0xBA),
+     o3(0xEF,0xA6,0xBB), o3(0xE5,0x83,0xA5),
+     o3(0xE5,0x87,0xB9), o3(0xE5,0xA0,0xAF),
+     o3(0xE5,0xA4,0xAD), o3(0xE5,0xA6,0x96),
+     o3(0xE5,0xA7,0x9A), o3(0xE5,0xAF,0xA5),
+     o3(0xEF,0xA6,0xBC), o3(0xEF,0xA6,0xBD),
+     o3(0xE5,0xB6,0xA2), o3(0xE6,0x8B,0x97),
+     o3(0xE6,0x90,0x96), o3(0xE6,0x92,0x93),
+     o3(0xE6,0x93,0xBE), o3(0xEF,0xA6,0xBE),
+     o3(0xE6,0x9B,0x9C), o3(0xEF,0xA6,0xBF),
+     o3(0xE6,0xA9,0x88), o3(0xEF,0xA7,0x80),
+     o3(0xE7,0x87,0xBF), o3(0xE7,0x91,0xA4),
+     o3(0xEF,0xA7,0x81),
+
+#define from_EUC_KR_E8 WORDINDEX2INFO(17490)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E8_infos,
+
+#define from_EUC_KR_E9_infos WORDINDEX2INFO(17492)
+                INVALID, o3(0xE7,0xAA,0x88),
+     o3(0xE7,0xAA,0xAF), o3(0xE7,0xB9,0x87),
+     o3(0xE7,0xB9,0x9E), o3(0xE8,0x80,0x80),
+     o3(0xE8,0x85,0xB0), o3(0xEF,0xA7,0x82),
+     o3(0xE8,0x9F,0xAF), o3(0xE8,0xA6,0x81),
+     o3(0xE8,0xAC,0xA0), o3(0xE9,0x81,0x99),
+     o3(0xEF,0xA7,0x83), o3(0xE9,0x82,0x80),
+     o3(0xE9,0xA5,0x92), o3(0xE6,0x85,0xBE),
+     o3(0xE6,0xAC,0xB2), o3(0xE6,0xB5,0xB4),
+     o3(0xE7,0xB8,0x9F), o3(0xE8,0xA4,0xA5),
+     o3(0xE8,0xBE,0xB1), o3(0xE4,0xBF,0x91),
+     o3(0xE5,0x82,0xAD), o3(0xE5,0x86,0x97),
+     o3(0xE5,0x8B,0x87), o3(0xE5,0x9F,0x87),
+     o3(0xE5,0xA2,0x89), o3(0xE5,0xAE,0xB9),
+     o3(0xE5,0xBA,0xB8), o3(0xE6,0x85,0x82),
+     o3(0xE6,0xA6,0x95), o3(0xE6,0xB6,0x8C),
+     o3(0xE6,0xB9,0xA7), o3(0xE6,0xBA,0xB6),
+     o3(0xE7,0x86,0x94), o3(0xE7,0x91,0xA2),
+     o3(0xE7,0x94,0xA8), o3(0xE7,0x94,0xAC),
+     o3(0xE8,0x81,0xB3), o3(0xE8,0x8C,0xB8),
+     o3(0xE8,0x93,0x89), o3(0xE8,0xB8,0x8A),
+     o3(0xE9,0x8E,0x94), o3(0xE9,0x8F,0x9E),
+     o3(0xEF,0xA7,0x84), o3(0xE4,0xBA,0x8E),
+     o3(0xE4,0xBD,0x91), o3(0xE5,0x81,0xB6),
+     o3(0xE5,0x84,0xAA), o3(0xE5,0x8F,0x88),
+     o3(0xE5,0x8F,0x8B), o3(0xE5,0x8F,0xB3),
+     o3(0xE5,0xAE,0x87), o3(0xE5,0xAF,0x93),
+     o3(0xE5,0xB0,0xA4), o3(0xE6,0x84,0x9A),
+     o3(0xE6,0x86,0x82), o3(0xE6,0x97,0xB4),
+     o3(0xE7,0x89,0x9B), o3(0xE7,0x8E,0x97),
+     o3(0xE7,0x91,0x80), o3(0xE7,0x9B,0x82),
+     o3(0xE7,0xA5,0x90), o3(0xE7,0xA6,0x91),
+     o3(0xE7,0xA6,0xB9), o3(0xE7,0xB4,0x86),
+     o3(0xE7,0xBE,0xBD), o3(0xE8,0x8A,0x8B),
+     o3(0xE8,0x97,0x95), o3(0xE8,0x99,0x9E),
+     o3(0xE8,0xBF,0x82), o3(0xE9,0x81,0x87),
+     o3(0xE9,0x83,0xB5), o3(0xE9,0x87,0xAA),
+     o3(0xE9,0x9A,0x85), o3(0xE9,0x9B,0xA8),
+     o3(0xE9,0x9B,0xA9), o3(0xE5,0x8B,0x96),
+     o3(0xE5,0xBD,0xA7), o3(0xE6,0x97,0xAD),
+     o3(0xE6,0x98,0xB1), o3(0xE6,0xA0,0xAF),
+     o3(0xE7,0x85,0x9C), o3(0xE7,0xA8,0xB6),
+     o3(0xE9,0x83,0x81), o3(0xE9,0xA0,0x8A),
+     o3(0xE4,0xBA,0x91), o3(0xEF,0xA7,0x85),
+     o3(0xE6,0xA9,0x92), o3(0xE6,0xAE,0x9E),
+     o3(0xE6,0xBE,0x90), o3(0xE7,0x86,0x89),
+     o3(0xE8,0x80,0x98), o3(0xE8,0x8A,0xB8),
+     o3(0xE8,0x95,0x93),
+
+#define from_EUC_KR_E9 WORDINDEX2INFO(17587)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_E9_infos,
+
+#define from_EUC_KR_EA_infos WORDINDEX2INFO(17589)
+                INVALID, o3(0xE9,0x81,0x8B),
+     o3(0xE9,0x9A,0x95), o3(0xE9,0x9B,0xB2),
+     o3(0xE9,0x9F,0xBB), o3(0xE8,0x94,0x9A),
+     o3(0xE9,0xAC,0xB1), o3(0xE4,0xBA,0x90),
+     o3(0xE7,0x86,0x8A), o3(0xE9,0x9B,0x84),
+     o3(0xE5,0x85,0x83), o3(0xE5,0x8E,0x9F),
+     o3(0xE5,0x93,0xA1), o3(0xE5,0x9C,0x93),
+     o3(0xE5,0x9C,0x92), o3(0xE5,0x9E,0xA3),
+     o3(0xE5,0xAA,0x9B), o3(0xE5,0xAB,0x84),
+     o3(0xE5,0xAF,0x83), o3(0xE6,0x80,0xA8),
+     o3(0xE6,0x84,0xBF), o3(0xE6,0x8F,0xB4),
+     o3(0xE6,0xB2,0x85), o3(0xE6,0xB4,0xB9),
+     o3(0xE6,0xB9,0xB2), o3(0xE6,0xBA,0x90),
+     o3(0xE7,0x88,0xB0), o3(0xE7,0x8C,0xBF),
+     o3(0xE7,0x91,0x97), o3(0xE8,0x8B,0x91),
+     o3(0xE8,0xA2,0x81), o3(0xE8,0xBD,0x85),
+     o3(0xE9,0x81,0xA0), o3(0xEF,0xA7,0x86),
+     o3(0xE9,0x99,0xA2), o3(0xE9,0xA1,0x98),
+     o3(0xE9,0xB4,0x9B), o3(0xE6,0x9C,0x88),
+     o3(0xE8,0xB6,0x8A), o3(0xE9,0x89,0x9E),
+     o3(0xE4,0xBD,0x8D), o3(0xE5,0x81,0x89),
+     o3(0xE5,0x83,0x9E), o3(0xE5,0x8D,0xB1),
+     o3(0xE5,0x9C,0x8D), o3(0xE5,0xA7,0x94),
+     o3(0xE5,0xA8,0x81), o3(0xE5,0xB0,0x89),
+     o3(0xE6,0x85,0xB0), o3(0xE6,0x9A,0x90),
+     o3(0xE6,0xB8,0xAD), o3(0xE7,0x88,0xB2),
+     o3(0xE7,0x91,0x8B), o3(0xE7,0xB7,0xAF),
+     o3(0xE8,0x83,0x83), o3(0xE8,0x90,0x8E),
+     o3(0xE8,0x91,0xA6), o3(0xE8,0x94,0xBF),
+     o3(0xE8,0x9D,0x9F), o3(0xE8,0xA1,0x9B),
+     o3(0xE8,0xA4,0x98), o3(0xE8,0xAC,0x82),
+     o3(0xE9,0x81,0x95), o3(0xE9,0x9F,0x8B),
+     o3(0xE9,0xAD,0x8F), o3(0xE4,0xB9,0xB3),
+     o3(0xE4,0xBE,0x91), o3(0xE5,0x84,0x92),
+     o3(0xE5,0x85,0xAA), o3(0xEF,0xA7,0x87),
+     o3(0xE5,0x94,0xAF), o3(0xE5,0x96,0xA9),
+     o3(0xE5,0xAD,0xBA), o3(0xE5,0xAE,0xA5),
+     o3(0xE5,0xB9,0xBC), o3(0xE5,0xB9,0xBD),
+     o3(0xE5,0xBA,0xBE), o3(0xE6,0x82,0xA0),
+     o3(0xE6,0x83,0x9F), o3(0xE6,0x84,0x88),
+     o3(0xE6,0x84,0x89), o3(0xE6,0x8F,0x84),
+     o3(0xE6,0x94,0xB8), o3(0xE6,0x9C,0x89),
+     o3(0xEF,0xA7,0x88), o3(0xE6,0x9F,0x94),
+     o3(0xE6,0x9F,0x9A), o3(0xEF,0xA7,0x89),
+     o3(0xE6,0xA5,0xA1), o3(0xE6,0xA5,0xA2),
+     o3(0xE6,0xB2,0xB9), o3(0xE6,0xB4,0xA7),
+     o3(0xEF,0xA7,0x8A), o3(0xE6,0xB8,0xB8),
+     o3(0xEF,0xA7,0x8B),
+
+#define from_EUC_KR_EA WORDINDEX2INFO(17684)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_EA_infos,
+
+#define from_EUC_KR_EB_infos WORDINDEX2INFO(17686)
+                INVALID, o3(0xE6,0xBF,0xA1),
+     o3(0xE7,0x8C,0xB6), o3(0xE7,0x8C,0xB7),
+     o3(0xEF,0xA7,0x8C), o3(0xE7,0x91,0x9C),
+     o3(0xE7,0x94,0xB1), o3(0xEF,0xA7,0x8D),
+     o3(0xE7,0x99,0x92), o3(0xEF,0xA7,0x8E),
+     o3(0xEF,0xA7,0x8F), o3(0xE7,0xB6,0xAD),
+     o3(0xE8,0x87,0xBE), o3(0xE8,0x90,0xB8),
+     o3(0xE8,0xA3,0x95), o3(0xE8,0xAA,0x98),
+     o3(0xE8,0xAB,0x9B), o3(0xE8,0xAB,0xAD),
+     o3(0xE8,0xB8,0xB0), o3(0xE8,0xB9,0x82),
+     o3(0xE9,0x81,0x8A), o3(0xE9,0x80,0xBE),
+     o3(0xE9,0x81,0xBA), o3(0xE9,0x85,0x89),
+     o3(0xE9,0x87,0x89), o3(0xE9,0x8D,0xAE),
+     o3(0xEF,0xA7,0x90), o3(0xEF,0xA7,0x91),
+     o3(0xE5,0xA0,0x89), o3(0xEF,0xA7,0x92),
+     o3(0xE6,0xAF,0x93), o3(0xE8,0x82,0x89),
+     o3(0xE8,0x82,0xB2), o3(0xEF,0xA7,0x93),
+     o3(0xEF,0xA7,0x94), o3(0xE5,0x85,0x81),
+     o3(0xE5,0xA5,0xAB), o3(0xE5,0xB0,0xB9),
+     o3(0xEF,0xA7,0x95), o3(0xEF,0xA7,0x96),
+     o3(0xE6,0xBD,0xA4), o3(0xE7,0x8E,0xA7),
+     o3(0xE8,0x83,0xA4), o3(0xE8,0xB4,0x87),
+     o3(0xEF,0xA7,0x97), o3(0xE9,0x88,0x97),
+     o3(0xE9,0x96,0x8F), o3(0xEF,0xA7,0x98),
+     o3(0xEF,0xA7,0x99), o3(0xEF,0xA7,0x9A),
+     o3(0xEF,0xA7,0x9B), o3(0xE8,0x81,0xBF),
+     o3(0xE6,0x88,0x8E), o3(0xE7,0x80,0x9C),
+     o3(0xE7,0xB5,0xA8), o3(0xE8,0x9E,0x8D),
+     o3(0xEF,0xA7,0x9C), o3(0xE5,0x9E,0xA0),
+     o3(0xE6,0x81,0xA9), o3(0xE6,0x85,0x87),
+     o3(0xE6,0xAE,0xB7), o3(0xE8,0xAA,0xBE),
+     o3(0xE9,0x8A,0x80), o3(0xE9,0x9A,0xB1),
+     o3(0xE4,0xB9,0x99), o3(0xE5,0x90,0x9F),
+     o3(0xE6,0xB7,0xAB), o3(0xE8,0x94,0xAD),
+     o3(0xE9,0x99,0xB0), o3(0xE9,0x9F,0xB3),
+     o3(0xE9,0xA3,0xAE), o3(0xE6,0x8F,0x96),
+     o3(0xE6,0xB3,0xA3), o3(0xE9,0x82,0x91),
+     o3(0xE5,0x87,0x9D), o3(0xE6,0x87,0x89),
+     o3(0xE8,0x86,0xBA), o3(0xE9,0xB7,0xB9),
+     o3(0xE4,0xBE,0x9D), o3(0xE5,0x80,0x9A),
+     o3(0xE5,0x84,0x80), o3(0xE5,0xAE,0x9C),
+     o3(0xE6,0x84,0x8F), o3(0xE6,0x87,0xBF),
+     o3(0xE6,0x93,0xAC), o3(0xE6,0xA4,0x85),
+     o3(0xE6,0xAF,0x85), o3(0xE7,0x96,0x91),
+     o3(0xE7,0x9F,0xA3), o3(0xE7,0xBE,0xA9),
+     o3(0xE8,0x89,0xA4), o3(0xE8,0x96,0x8F),
+     o3(0xE8,0x9F,0xBB), o3(0xE8,0xA1,0xA3),
+     o3(0xE8,0xAA,0xBC),
+
+#define from_EUC_KR_EB WORDINDEX2INFO(17781)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_EB_infos,
+
+#define from_EUC_KR_EC_infos WORDINDEX2INFO(17783)
+                INVALID, o3(0xE8,0xAD,0xB0),
+     o3(0xE9,0x86,0xAB), o3(0xE4,0xBA,0x8C),
+     o3(0xE4,0xBB,0xA5), o3(0xE4,0xBC,0x8A),
+     o3(0xEF,0xA7,0x9D), o3(0xEF,0xA7,0x9E),
+     o3(0xE5,0xA4,0xB7), o3(0xE5,0xA7,0xA8),
+     o3(0xEF,0xA7,0x9F), o3(0xE5,0xB7,0xB2),
+     o3(0xE5,0xBC,0x9B), o3(0xE5,0xBD,0x9B),
+     o3(0xE6,0x80,0xA1), o3(0xEF,0xA7,0xA0),
+     o3(0xEF,0xA7,0xA1), o3(0xEF,0xA7,0xA2),
+     o3(0xEF,0xA7,0xA3), o3(0xE7,0x88,0xBE),
+     o3(0xE7,0x8F,0xA5), o3(0xEF,0xA7,0xA4),
+     o3(0xE7,0x95,0xB0), o3(0xE7,0x97,0x8D),
+     o3(0xEF,0xA7,0xA5), o3(0xE7,0xA7,0xBB),
+     o3(0xEF,0xA7,0xA6), o3(0xE8,0x80,0x8C),
+     o3(0xE8,0x80,0xB3), o3(0xE8,0x82,0x84),
+     o3(0xE8,0x8B,0xA1), o3(0xE8,0x8D,0x91),
+     o3(0xEF,0xA7,0xA7), o3(0xEF,0xA7,0xA8),
+     o3(0xE8,0xB2,0xBD), o3(0xE8,0xB2,0xB3),
+     o3(0xE9,0x82,0x87), o3(0xEF,0xA7,0xA9),
+     o3(0xEF,0xA7,0xAA), o3(0xE9,0xA3,0xB4),
+     o3(0xE9,0xA4,0x8C), o3(0xEF,0xA7,0xAB),
+     o3(0xEF,0xA7,0xAC), o3(0xE7,0x80,0xB7),
+     o3(0xE7,0x9B,0x8A), o3(0xE7,0xBF,0x8A),
+     o3(0xE7,0xBF,0x8C), o3(0xE7,0xBF,0xBC),
+     o3(0xE8,0xAC,0x9A), o3(0xE4,0xBA,0xBA),
+     o3(0xE4,0xBB,0x81), o3(0xE5,0x88,0x83),
+     o3(0xE5,0x8D,0xB0), o3(0xEF,0xA7,0xAD),
+     o3(0xE5,0x92,0xBD), o3(0xE5,0x9B,0xA0),
+     o3(0xE5,0xA7,0xBB), o3(0xE5,0xAF,0x85),
+     o3(0xE5,0xBC,0x95), o3(0xE5,0xBF,0x8D),
+     o3(0xE6,0xB9,0xAE), o3(0xEF,0xA7,0xAE),
+     o3(0xEF,0xA7,0xAF), o3(0xE7,0xB5,0xAA),
+     o3(0xE8,0x8C,0xB5), o3(0xEF,0xA7,0xB0),
+     o3(0xE8,0x9A,0x93), o3(0xE8,0xAA,0x8D),
+     o3(0xEF,0xA7,0xB1), o3(0xE9,0x9D,0xAD),
+     o3(0xE9,0x9D,0xB7), o3(0xEF,0xA7,0xB2),
+     o3(0xEF,0xA7,0xB3), o3(0xE4,0xB8,0x80),
+     o3(0xE4,0xBD,0x9A), o3(0xE4,0xBD,0xBE),
+     o3(0xE5,0xA3,0xB9), o3(0xE6,0x97,0xA5),
+     o3(0xE6,0xBA,0xA2), o3(0xE9,0x80,0xB8),
+     o3(0xE9,0x8E,0xB0), o3(0xE9,0xA6,0xB9),
+     o3(0xE4,0xBB,0xBB), o3(0xE5,0xA3,0xAC),
+     o3(0xE5,0xA6,0x8A), o3(0xE5,0xA7,0x99),
+     o3(0xE6,0x81,0x81), o3(0xEF,0xA7,0xB4),
+     o3(0xEF,0xA7,0xB5), o3(0xE7,0xA8,0x94),
+     o3(0xEF,0xA7,0xB6), o3(0xE8,0x8D,0x8F),
+     o3(0xE8,0xB3,0x83), o3(0xE5,0x85,0xA5),
+     o3(0xE5,0x8D,0x84),
+
+#define from_EUC_KR_EC WORDINDEX2INFO(17878)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_EC_infos,
+
+#define from_EUC_KR_ED_infos WORDINDEX2INFO(17880)
+                INVALID, o3(0xEF,0xA7,0xB7),
+     o3(0xEF,0xA7,0xB8), o3(0xEF,0xA7,0xB9),
+     o3(0xE4,0xBB,0x8D), o3(0xE5,0x89,0xA9),
+     o3(0xE5,0xAD,0x95), o3(0xE8,0x8A,0xBF),
+     o3(0xE4,0xBB,0x94), o3(0xE5,0x88,0xBA),
+     o3(0xE5,0x92,0xA8), o3(0xE5,0xA7,0x89),
+     o3(0xE5,0xA7,0xBF), o3(0xE5,0xAD,0x90),
+     o3(0xE5,0xAD,0x97), o3(0xE5,0xAD,0x9C),
+     o3(0xE6,0x81,0xA3), o3(0xE6,0x85,0x88),
+     o3(0xE6,0xBB,0x8B), o3(0xE7,0x82,0x99),
+     o3(0xE7,0x85,0xAE), o3(0xE7,0x8E,0x86),
+     o3(0xE7,0x93,0xB7), o3(0xE7,0x96,0xB5),
+     o3(0xE7,0xA3,0x81), o3(0xE7,0xB4,0xAB),
+     o3(0xE8,0x80,0x85), o3(0xE8,0x87,0xAA),
+     o3(0xE8,0x8C,0xA8), o3(0xE8,0x94,0x97),
+     o3(0xE8,0x97,0x89), o3(0xE8,0xAB,0xAE),
+     o3(0xE8,0xB3,0x87), o3(0xE9,0x9B,0x8C),
+     o3(0xE4,0xBD,0x9C), o3(0xE5,0x8B,0xBA),
+     o3(0xE5,0x9A,0xBC), o3(0xE6,0x96,0xAB),
+     o3(0xE6,0x98,0xA8), o3(0xE7,0x81,0xBC),
+     o3(0xE7,0x82,0xB8), o3(0xE7,0x88,0xB5),
+     o3(0xE7,0xB6,0xBD), o3(0xE8,0x8A,0x8D),
+     o3(0xE9,0x85,0x8C), o3(0xE9,0x9B,0x80),
+     o3(0xE9,0xB5,0xB2), o3(0xE5,0xAD,0xB1),
+     o3(0xE6,0xA3,0xA7), o3(0xE6,0xAE,0x98),
+     o3(0xE6,0xBD,0xBA), o3(0xE7,0x9B,0x9E),
+     o3(0xE5,0xB2,0x91), o3(0xE6,0x9A,0xAB),
+     o3(0xE6,0xBD,0x9B), o3(0xE7,0xAE,0xB4),
+     o3(0xE7,0xB0,0xAA), o3(0xE8,0xA0,0xB6),
+     o3(0xE9,0x9B,0x9C), o3(0xE4,0xB8,0x88),
+     o3(0xE4,0xBB,0x97), o3(0xE5,0x8C,0xA0),
+     o3(0xE5,0xA0,0xB4), o3(0xE5,0xA2,0xBB),
+     o3(0xE5,0xA3,0xAF), o3(0xE5,0xA5,0xAC),
+     o3(0xE5,0xB0,0x87), o3(0xE5,0xB8,0xB3),
+     o3(0xE5,0xBA,0x84), o3(0xE5,0xBC,0xB5),
+     o3(0xE6,0x8E,0x8C), o3(0xE6,0x9A,0xB2),
+     o3(0xE6,0x9D,0x96), o3(0xE6,0xA8,0x9F),
+     o3(0xE6,0xAA,0xA3), o3(0xE6,0xAC,0x8C),
+     o3(0xE6,0xBC,0xBF), o3(0xE7,0x89,0x86),
+     o3(0xEF,0xA7,0xBA), o3(0xE7,0x8D,0x90),
+     o3(0xE7,0x92,0x8B), o3(0xE7,0xAB,0xA0),
+     o3(0xE7,0xB2,0xA7), o3(0xE8,0x85,0xB8),
+     o3(0xE8,0x87,0x9F), o3(0xE8,0x87,0xA7),
+     o3(0xE8,0x8E,0x8A), o3(0xE8,0x91,0xAC),
+     o3(0xE8,0x94,0xA3), o3(0xE8,0x96,0x94),
+     o3(0xE8,0x97,0x8F), o3(0xE8,0xA3,0x9D),
+     o3(0xE8,0xB4,0x93), o3(0xE9,0x86,0xAC),
+     o3(0xE9,0x95,0xB7),
+
+#define from_EUC_KR_ED WORDINDEX2INFO(17975)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_ED_infos,
+
+#define from_EUC_KR_EE_infos WORDINDEX2INFO(17977)
+                INVALID, o3(0xE9,0x9A,0x9C),
+     o3(0xE5,0x86,0x8D), o3(0xE5,0x93,0x89),
+     o3(0xE5,0x9C,0xA8), o3(0xE5,0xAE,0xB0),
+     o3(0xE6,0x89,0x8D), o3(0xE6,0x9D,0x90),
+     o3(0xE6,0xA0,0xBD), o3(0xE6,0xA2,0x93),
+     o3(0xE6,0xB8,0xBD), o3(0xE6,0xBB,0x93),
+     o3(0xE7,0x81,0xBD), o3(0xE7,0xB8,0xA1),
+     o3(0xE8,0xA3,0x81), o3(0xE8,0xB2,0xA1),
+     o3(0xE8,0xBC,0x89), o3(0xE9,0xBD,0x8B),
+     o3(0xE9,0xBD,0x8E), o3(0xE7,0x88,0xAD),
+     o3(0xE7,0xAE,0x8F), o3(0xE8,0xAB,0x8D),
+     o3(0xE9,0x8C,0x9A), o3(0xE4,0xBD,0x87),
+     o3(0xE4,0xBD,0x8E), o3(0xE5,0x84,0xB2),
+     o3(0xE5,0x92,0x80), o3(0xE5,0xA7,0x90),
+     o3(0xE5,0xBA,0x95), o3(0xE6,0x8A,0xB5),
+     o3(0xE6,0x9D,0xB5), o3(0xE6,0xA5,0xAE),
+     o3(0xE6,0xA8,0x97), o3(0xE6,0xB2,0xAE),
+     o3(0xE6,0xB8,0x9A), o3(0xE7,0x8B,0x99),
+     o3(0xE7,0x8C,0xAA), o3(0xE7,0x96,0xBD),
+     o3(0xE7,0xAE,0xB8), o3(0xE7,0xB4,0xB5),
+     o3(0xE8,0x8B,0xA7), o3(0xE8,0x8F,0xB9),
+     o3(0xE8,0x91,0x97), o3(0xE8,0x97,0xB7),
+     o3(0xE8,0xA9,0x9B), o3(0xE8,0xB2,0xAF),
+     o3(0xE8,0xBA,0x87), o3(0xE9,0x80,0x99),
+     o3(0xE9,0x82,0xB8), o3(0xE9,0x9B,0x8E),
+     o3(0xE9,0xBD,0x9F), o3(0xE5,0x8B,0xA3),
+     o3(0xE5,0x90,0x8A), o3(0xE5,0xAB,0xA1),
+     o3(0xE5,0xAF,0x82), o3(0xE6,0x91,0x98),
+     o3(0xE6,0x95,0xB5), o3(0xE6,0xBB,0xB4),
+     o3(0xE7,0x8B,0x84), o3(0xEF,0xA7,0xBB),
+     o3(0xE7,0x9A,0x84), o3(0xE7,0xA9,0x8D),
+     o3(0xE7,0xAC,0x9B), o3(0xE7,0xB1,0x8D),
+     o3(0xE7,0xB8,0xBE), o3(0xE7,0xBF,0x9F),
+     o3(0xE8,0x8D,0xBB), o3(0xE8,0xAC,0xAB),
+     o3(0xE8,0xB3,0x8A), o3(0xE8,0xB5,0xA4),
+     o3(0xE8,0xB7,0xA1), o3(0xE8,0xB9,0x9F),
+     o3(0xE8,0xBF,0xAA), o3(0xE8,0xBF,0xB9),
+     o3(0xE9,0x81,0xA9), o3(0xE9,0x8F,0x91),
+     o3(0xE4,0xBD,0x83), o3(0xE4,0xBD,0xBA),
+     o3(0xE5,0x82,0xB3), o3(0xE5,0x85,0xA8),
+     o3(0xE5,0x85,0xB8), o3(0xE5,0x89,0x8D),
+     o3(0xE5,0x89,0xAA), o3(0xE5,0xA1,0xA1),
+     o3(0xE5,0xA1,0xBC), o3(0xE5,0xA5,0xA0),
+     o3(0xE5,0xB0,0x88), o3(0xE5,0xB1,0x95),
+     o3(0xE5,0xBB,0x9B), o3(0xE6,0x82,0x9B),
+     o3(0xE6,0x88,0xB0), o3(0xE6,0xA0,0x93),
+     o3(0xE6,0xAE,0xBF), o3(0xE6,0xB0,0x88),
+     o3(0xE6,0xBE,0xB1),
+
+#define from_EUC_KR_EE WORDINDEX2INFO(18072)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_EE_infos,
+
+#define from_EUC_KR_EF_infos WORDINDEX2INFO(18074)
+                INVALID, o3(0xE7,0x85,0x8E),
+     o3(0xE7,0x90,0xA0), o3(0xE7,0x94,0xB0),
+     o3(0xE7,0x94,0xB8), o3(0xE7,0x95,0x91),
+     o3(0xE7,0x99,0xB2), o3(0xE7,0xAD,0x8C),
+     o3(0xE7,0xAE,0x8B), o3(0xE7,0xAE,0xAD),
+     o3(0xE7,0xAF,0x86), o3(0xE7,0xBA,0x8F),
+     o3(0xE8,0xA9,0xAE), o3(0xE8,0xBC,0xBE),
+     o3(0xE8,0xBD,0x89), o3(0xE9,0x88,0xBF),
+     o3(0xE9,0x8A,0x93), o3(0xE9,0x8C,0xA2),
+     o3(0xE9,0x90,0xAB), o3(0xE9,0x9B,0xBB),
+     o3(0xE9,0xA1,0x9A), o3(0xE9,0xA1,0xAB),
+     o3(0xE9,0xA4,0x9E), o3(0xE5,0x88,0x87),
+     o3(0xE6,0x88,0xAA), o3(0xE6,0x8A,0x98),
+     o3(0xE6,0xB5,0x99), o3(0xE7,0x99,0xA4),
+     o3(0xE7,0xAB,0x8A), o3(0xE7,0xAF,0x80),
+     o3(0xE7,0xB5,0xB6), o3(0xE5,0x8D,0xA0),
+     o3(0xE5,0xB2,0xBE), o3(0xE5,0xBA,0x97),
+     o3(0xE6,0xBC,0xB8), o3(0xE7,0x82,0xB9),
+     o3(0xE7,0xB2,0x98), o3(0xE9,0x9C,0x91),
+     o3(0xE9,0xAE,0x8E), o3(0xE9,0xBB,0x9E),
+     o3(0xE6,0x8E,0xA5), o3(0xE6,0x91,0xBA),
+     o3(0xE8,0x9D,0xB6), o3(0xE4,0xB8,0x81),
+     o3(0xE4,0xBA,0x95), o3(0xE4,0xBA,0xAD),
+     o3(0xE5,0x81,0x9C), o3(0xE5,0x81,0xB5),
+     o3(0xE5,0x91,0x88), o3(0xE5,0xA7,0x83),
+     o3(0xE5,0xAE,0x9A), o3(0xE5,0xB9,0x80),
+     o3(0xE5,0xBA,0xAD), o3(0xE5,0xBB,0xB7),
+     o3(0xE5,0xBE,0x81), o3(0xE6,0x83,0x85),
+     o3(0xE6,0x8C,0xBA), o3(0xE6,0x94,0xBF),
+     o3(0xE6,0x95,0xB4), o3(0xE6,0x97,0x8C),
+     o3(0xE6,0x99,0xB6), o3(0xE6,0x99,0xB8),
+     o3(0xE6,0x9F,0xBE), o3(0xE6,0xA5,0xA8),
+     o3(0xE6,0xAA,0x89), o3(0xE6,0xAD,0xA3),
+     o3(0xE6,0xB1,0x80), o3(0xE6,0xB7,0x80),
+     o3(0xE6,0xB7,0xA8), o3(0xE6,0xB8,0x9F),
+     o3(0xE6,0xB9,0x9E), o3(0xE7,0x80,0x9E),
+     o3(0xE7,0x82,0xA1), o3(0xE7,0x8E,0x8E),
+     o3(0xE7,0x8F,0xBD), o3(0xE7,0x94,0xBA),
+     o3(0xE7,0x9D,0x9B), o3(0xE7,0xA2,0x87),
+     o3(0xE7,0xA6,0x8E), o3(0xE7,0xA8,0x8B),
+     o3(0xE7,0xA9,0xBD), o3(0xE7,0xB2,0xBE),
+     o3(0xE7,0xB6,0x8E), o3(0xE8,0x89,0x87),
+     o3(0xE8,0xA8,0x82), o3(0xE8,0xAB,0xAA),
+     o3(0xE8,0xB2,0x9E), o3(0xE9,0x84,0xAD),
+     o3(0xE9,0x85,0x8A), o3(0xE9,0x87,0x98),
+     o3(0xE9,0x89,0xA6), o3(0xE9,0x8B,0x8C),
+     o3(0xE9,0x8C,0xA0), o3(0xE9,0x9C,0x86),
+     o3(0xE9,0x9D,0x96),
+
+#define from_EUC_KR_EF WORDINDEX2INFO(18169)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_EF_infos,
+
+#define from_EUC_KR_F0_infos WORDINDEX2INFO(18171)
+                INVALID, o3(0xE9,0x9D,0x9C),
+     o3(0xE9,0xA0,0x82), o3(0xE9,0xBC,0x8E),
+     o3(0xE5,0x88,0xB6), o3(0xE5,0x8A,0x91),
+     o3(0xE5,0x95,0xBC), o3(0xE5,0xA0,0xA4),
+     o3(0xE5,0xB8,0x9D), o3(0xE5,0xBC,0x9F),
+     o3(0xE6,0x82,0x8C), o3(0xE6,0x8F,0x90),
+     o3(0xE6,0xA2,0xAF), o3(0xE6,0xBF,0x9F),
+     o3(0xE7,0xA5,0xAD), o3(0xE7,0xAC,0xAC),
+     o3(0xE8,0x87,0x8D), o3(0xE8,0x96,0xBA),
+     o3(0xE8,0xA3,0xBD), o3(0xE8,0xAB,0xB8),
+     o3(0xE8,0xB9,0x84), o3(0xE9,0x86,0x8D),
+     o3(0xE9,0x99,0xA4), o3(0xE9,0x9A,0x9B),
+     o3(0xE9,0x9C,0xBD), o3(0xE9,0xA1,0x8C),
+     o3(0xE9,0xBD,0x8A), o3(0xE4,0xBF,0x8E),
+     o3(0xE5,0x85,0x86), o3(0xE5,0x87,0x8B),
+     o3(0xE5,0x8A,0xA9), o3(0xE5,0x98,0xB2),
+     o3(0xE5,0xBC,0x94), o3(0xE5,0xBD,0xAB),
+     o3(0xE6,0x8E,0xAA), o3(0xE6,0x93,0x8D),
+     o3(0xE6,0x97,0xA9), o3(0xE6,0x99,0x81),
+     o3(0xE6,0x9B,0xBA), o3(0xE6,0x9B,0xB9),
+     o3(0xE6,0x9C,0x9D), o3(0xE6,0xA2,0x9D),
+     o3(0xE6,0xA3,0x97), o3(0xE6,0xA7,0xBD),
+     o3(0xE6,0xBC,0x95), o3(0xE6,0xBD,0xAE),
+     o3(0xE7,0x85,0xA7), o3(0xE7,0x87,0xA5),
+     o3(0xE7,0x88,0xAA), o3(0xE7,0x92,0xAA),
+     o3(0xE7,0x9C,0xBA), o3(0xE7,0xA5,0x96),
+     o3(0xE7,0xA5,0x9A), o3(0xE7,0xA7,0x9F),
+     o3(0xE7,0xA8,0xA0), o3(0xE7,0xAA,0x95),
+     o3(0xE7,0xB2,0x97), o3(0xE7,0xB3,0x9F),
+     o3(0xE7,0xB5,0x84), o3(0xE7,0xB9,0xB0),
+     o3(0xE8,0x82,0x87), o3(0xE8,0x97,0xBB),
+     o3(0xE8,0x9A,0xA4), o3(0xE8,0xA9,0x94),
+     o3(0xE8,0xAA,0xBF), o3(0xE8,0xB6,0x99),
+     o3(0xE8,0xBA,0x81), o3(0xE9,0x80,0xA0),
+     o3(0xE9,0x81,0xAD), o3(0xE9,0x87,0xA3),
+     o3(0xE9,0x98,0xBB), o3(0xE9,0x9B,0x95),
+     o3(0xE9,0xB3,0xA5), o3(0xE6,0x97,0x8F),
+     o3(0xE7,0xB0,0x87), o3(0xE8,0xB6,0xB3),
+     o3(0xE9,0x8F,0x83), o3(0xE5,0xAD,0x98),
+     o3(0xE5,0xB0,0x8A), o3(0xE5,0x8D,0x92),
+     o3(0xE6,0x8B,0x99), o3(0xE7,0x8C,0x9D),
+     o3(0xE5,0x80,0xA7), o3(0xE5,0xAE,0x97),
+     o3(0xE5,0xBE,0x9E), o3(0xE6,0x82,0xB0),
+     o3(0xE6,0x85,0xAB), o3(0xE6,0xA3,0x95),
+     o3(0xE6,0xB7,0x99), o3(0xE7,0x90,0xAE),
+     o3(0xE7,0xA8,0xAE), o3(0xE7,0xB5,0x82),
+     o3(0xE7,0xB6,0x9C), o3(0xE7,0xB8,0xB1),
+     o3(0xE8,0x85,0xAB),
+
+#define from_EUC_KR_F0 WORDINDEX2INFO(18266)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F0_infos,
+
+#define from_EUC_KR_F1_infos WORDINDEX2INFO(18268)
+                INVALID, o3(0xE8,0xB8,0xAA),
+     o3(0xE8,0xB8,0xB5), o3(0xE9,0x8D,0xBE),
+     o3(0xE9,0x90,0x98), o3(0xE4,0xBD,0x90),
+     o3(0xE5,0x9D,0x90), o3(0xE5,0xB7,0xA6),
+     o3(0xE5,0xBA,0xA7), o3(0xE6,0x8C,0xAB),
+     o3(0xE7,0xBD,0xAA), o3(0xE4,0xB8,0xBB),
+     o3(0xE4,0xBD,0x8F), o3(0xE4,0xBE,0x8F),
+     o3(0xE5,0x81,0x9A), o3(0xE5,0xA7,0x9D),
+     o3(0xE8,0x83,0x84), o3(0xE5,0x91,0xAA),
+     o3(0xE5,0x91,0xA8), o3(0xE5,0x97,0xBE),
+     o3(0xE5,0xA5,0x8F), o3(0xE5,0xAE,0x99),
+     o3(0xE5,0xB7,0x9E), o3(0xE5,0xBB,0x9A),
+     o3(0xE6,0x99,0x9D), o3(0xE6,0x9C,0xB1),
+     o3(0xE6,0x9F,0xB1), o3(0xE6,0xA0,0xAA),
+     o3(0xE6,0xB3,0xA8), o3(0xE6,0xB4,0xB2),
+     o3(0xE6,0xB9,0x8A), o3(0xE6,0xBE,0x8D),
+     o3(0xE7,0x82,0xB7), o3(0xE7,0x8F,0xA0),
+     o3(0xE7,0x96,0x87), o3(0xE7,0xB1,0x8C),
+     o3(0xE7,0xB4,0x82), o3(0xE7,0xB4,0xAC),
+     o3(0xE7,0xB6,0xA2), o3(0xE8,0x88,0x9F),
+     o3(0xE8,0x9B,0x9B), o3(0xE8,0xA8,0xBB),
+     o3(0xE8,0xAA,0x85), o3(0xE8,0xB5,0xB0),
+     o3(0xE8,0xBA,0x8A), o3(0xE8,0xBC,0xB3),
+     o3(0xE9,0x80,0xB1), o3(0xE9,0x85,0x8E),
+     o3(0xE9,0x85,0x92), o3(0xE9,0x91,0x84),
+     o3(0xE9,0xA7,0x90), o3(0xE7,0xAB,0xB9),
+     o3(0xE7,0xB2,0xA5), o3(0xE4,0xBF,0x8A),
+     o3(0xE5,0x84,0x81), o3(0xE5,0x87,0x86),
+     o3(0xE5,0x9F,0x88), o3(0xE5,0xAF,0xAF),
+     o3(0xE5,0xB3,0xBB), o3(0xE6,0x99,0x99),
+     o3(0xE6,0xA8,0xBD), o3(0xE6,0xB5,0x9A),
+     o3(0xE6,0xBA,0x96), o3(0xE6,0xBF,0xAC),
+     o3(0xE7,0x84,0x8C), o3(0xE7,0x95,0xAF),
+     o3(0xE7,0xAB,0xA3), o3(0xE8,0xA0,0xA2),
+     o3(0xE9,0x80,0xA1), o3(0xE9,0x81,0xB5),
+     o3(0xE9,0x9B,0x8B), o3(0xE9,0xA7,0xBF),
+     o3(0xE8,0x8C,0x81), o3(0xE4,0xB8,0xAD),
+     o3(0xE4,0xBB,0xB2), o3(0xE8,0xA1,0x86),
+     o3(0xE9,0x87,0x8D), o3(0xE5,0x8D,0xBD),
+     o3(0xE6,0xAB,0x9B), o3(0xE6,0xA5,0xAB),
+     o3(0xE6,0xB1,0x81), o3(0xE8,0x91,0xBA),
+     o3(0xE5,0xA2,0x9E), o3(0xE6,0x86,0x8E),
+     o3(0xE6,0x9B,0xBE), o3(0xE6,0x8B,0xAF),
+     o3(0xE7,0x83,0x9D), o3(0xE7,0x94,0x91),
+     o3(0xE7,0x97,0x87), o3(0xE7,0xB9,0x92),
+     o3(0xE8,0x92,0xB8), o3(0xE8,0xAD,0x89),
+     o3(0xE8,0xB4,0x88), o3(0xE4,0xB9,0x8B),
+     o3(0xE5,0x8F,0xAA),
+
+#define from_EUC_KR_F1 WORDINDEX2INFO(18363)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F1_infos,
+
+#define from_EUC_KR_F2_infos WORDINDEX2INFO(18365)
+                INVALID, o3(0xE5,0x92,0xAB),
+     o3(0xE5,0x9C,0xB0), o3(0xE5,0x9D,0x80),
+     o3(0xE5,0xBF,0x97), o3(0xE6,0x8C,0x81),
+     o3(0xE6,0x8C,0x87), o3(0xE6,0x91,0xAF),
+     o3(0xE6,0x94,0xAF), o3(0xE6,0x97,0xA8),
+     o3(0xE6,0x99,0xBA), o3(0xE6,0x9E,0x9D),
+     o3(0xE6,0x9E,0xB3), o3(0xE6,0xAD,0xA2),
+     o3(0xE6,0xB1,0xA0), o3(0xE6,0xB2,0x9A),
+     o3(0xE6,0xBC,0xAC), o3(0xE7,0x9F,0xA5),
+     o3(0xE7,0xA0,0xA5), o3(0xE7,0xA5,0x89),
+     o3(0xE7,0xA5,0x97), o3(0xE7,0xB4,0x99),
+     o3(0xE8,0x82,0xA2), o3(0xE8,0x84,0x82),
+     o3(0xE8,0x87,0xB3), o3(0xE8,0x8A,0x9D),
+     o3(0xE8,0x8A,0xB7), o3(0xE8,0x9C,0x98),
+     o3(0xE8,0xAA,0x8C), o3(0xEF,0xA7,0xBC),
+     o3(0xE8,0xB4,0x84), o3(0xE8,0xB6,0xBE),
+     o3(0xE9,0x81,0xB2), o3(0xE7,0x9B,0xB4),
+     o3(0xE7,0xA8,0x99), o3(0xE7,0xA8,0xB7),
+     o3(0xE7,0xB9,0x94), o3(0xE8,0x81,0xB7),
+     o3(0xE5,0x94,0x87), o3(0xE5,0x97,0x94),
+     o3(0xE5,0xA1,0xB5), o3(0xE6,0x8C,0xAF),
+     o3(0xE6,0x90,0xA2), o3(0xE6,0x99,0x89),
+     o3(0xE6,0x99,0x8B), o3(0xE6,0xA1,0xAD),
+     o3(0xE6,0xA6,0x9B), o3(0xE6,0xAE,0x84),
+     o3(0xE6,0xB4,0xA5), o3(0xE6,0xBA,0xB1),
+     o3(0xE7,0x8F,0x8D), o3(0xE7,0x91,0xA8),
+     o3(0xE7,0x92,0xA1), o3(0xE7,0x95,0x9B),
+     o3(0xE7,0x96,0xB9), o3(0xE7,0x9B,0xA1),
+     o3(0xE7,0x9C,0x9E), o3(0xE7,0x9E,0x8B),
+     o3(0xE7,0xA7,0xA6), o3(0xE7,0xB8,0x89),
+     o3(0xE7,0xB8,0x9D), o3(0xE8,0x87,0xBB),
+     o3(0xE8,0x94,0xAF), o3(0xE8,0xA2,0x97),
+     o3(0xE8,0xA8,0xBA), o3(0xE8,0xB3,0x91),
+     o3(0xE8,0xBB,0xAB), o3(0xE8,0xBE,0xB0),
+     o3(0xE9,0x80,0xB2), o3(0xE9,0x8E,0xAD),
+     o3(0xE9,0x99,0xA3), o3(0xE9,0x99,0xB3),
+     o3(0xE9,0x9C,0x87), o3(0xE4,0xBE,0x84),
+     o3(0xE5,0x8F,0xB1), o3(0xE5,0xA7,0xAA),
+     o3(0xE5,0xAB,0x89), o3(0xE5,0xB8,0x99),
+     o3(0xE6,0xA1,0x8E), o3(0xE7,0x93,0x86),
+     o3(0xE7,0x96,0xBE), o3(0xE7,0xA7,0xA9),
+     o3(0xE7,0xAA,0x92), o3(0xE8,0x86,0xA3),
+     o3(0xE8,0x9B,0xAD), o3(0xE8,0xB3,0xAA),
+     o3(0xE8,0xB7,0x8C), o3(0xE8,0xBF,0xAD),
+     o3(0xE6,0x96,0x9F), o3(0xE6,0x9C,0x95),
+     o3(0xEF,0xA7,0xBD), o3(0xE5,0x9F,0xB7),
+     o3(0xE6,0xBD,0x97), o3(0xE7,0xB7,0x9D),
+     o3(0xE8,0xBC,0xAF),
+
+#define from_EUC_KR_F2 WORDINDEX2INFO(18460)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F2_infos,
+
+#define from_EUC_KR_F3_infos WORDINDEX2INFO(18462)
+                INVALID, o3(0xE9,0x8F,0xB6),
+     o3(0xE9,0x9B,0x86), o3(0xE5,0xBE,0xB5),
+     o3(0xE6,0x87,0xB2), o3(0xE6,0xBE,0x84),
+     o3(0xE4,0xB8,0x94), o3(0xE4,0xBE,0x98),
+     o3(0xE5,0x80,0x9F), o3(0xE5,0x8F,0x89),
+     o3(0xE5,0x97,0x9F), o3(0xE5,0xB5,0xAF),
+     o3(0xE5,0xB7,0xAE), o3(0xE6,0xAC,0xA1),
+     o3(0xE6,0xAD,0xA4), o3(0xE7,0xA3,0x8B),
+     o3(0xE7,0xAE,0x9A), o3(0xEF,0xA7,0xBE),
+     o3(0xE8,0xB9,0x89), o3(0xE8,0xBB,0x8A),
+     o3(0xE9,0x81,0xAE), o3(0xE6,0x8D,0x89),
+     o3(0xE6,0x90,0xBE), o3(0xE7,0x9D,0x80),
+     o3(0xE7,0xAA,0x84), o3(0xE9,0x8C,0xAF),
+     o3(0xE9,0x91,0xBF), o3(0xE9,0xBD,0xAA),
+     o3(0xE6,0x92,0xB0), o3(0xE6,0xBE,0xAF),
+     o3(0xE7,0x87,0xA6), o3(0xE7,0x92,0xA8),
+     o3(0xE7,0x93,0x9A), o3(0xE7,0xAB,0x84),
+     o3(0xE7,0xB0,0x92), o3(0xE7,0xBA,0x82),
+     o3(0xE7,0xB2,0xB2), o3(0xE7,0xBA,0x98),
+     o3(0xE8,0xAE,0x9A), o3(0xE8,0xB4,0x8A),
+     o3(0xE9,0x91,0xBD), o3(0xE9,0xA4,0x90),
+     o3(0xE9,0xA5,0x8C), o3(0xE5,0x88,0xB9),
+     o3(0xE5,0xAF,0x9F), o3(0xE6,0x93,0xA6),
+     o3(0xE6,0x9C,0xAD), o3(0xE7,0xB4,0xAE),
+     o3(0xE5,0x83,0xAD), o3(0xE5,0x8F,0x83),
+     o3(0xE5,0xA1,0xB9), o3(0xE6,0x85,0x98),
+     o3(0xE6,0x85,0x99), o3(0xE6,0x87,0xBA),
+     o3(0xE6,0x96,0xAC), o3(0xE7,0xAB,0x99),
+     o3(0xE8,0xAE,0x92), o3(0xE8,0xAE,0x96),
+     o3(0xE5,0x80,0x89), o3(0xE5,0x80,0xA1),
+     o3(0xE5,0x89,0xB5), o3(0xE5,0x94,0xB1),
+     o3(0xE5,0xA8,0xBC), o3(0xE5,0xBB,0xA0),
+     o3(0xE5,0xBD,0xB0), o3(0xE6,0x84,0xB4),
+     o3(0xE6,0x95,0x9E), o3(0xE6,0x98,0x8C),
+     o3(0xE6,0x98,0xB6), o3(0xE6,0x9A,0xA2),
+     o3(0xE6,0xA7,0x8D), o3(0xE6,0xBB,0x84),
+     o3(0xE6,0xBC,0xB2), o3(0xE7,0x8C,0x96),
+     o3(0xE7,0x98,0xA1), o3(0xE7,0xAA,0x93),
+     o3(0xE8,0x84,0xB9), o3(0xE8,0x89,0x99),
+     o3(0xE8,0x8F,0x96), o3(0xE8,0x92,0xBC),
+     o3(0xE5,0x82,0xB5), o3(0xE5,0x9F,0xB0),
+     o3(0xE5,0xAF,0x80), o3(0xE5,0xAF,0xA8),
+     o3(0xE5,0xBD,0xA9), o3(0xE6,0x8E,0xA1),
+     o3(0xE7,0xA0,0xA6), o3(0xE7,0xB6,0xB5),
+     o3(0xE8,0x8F,0x9C), o3(0xE8,0x94,0xA1),
+     o3(0xE9,0x87,0x87), o3(0xE9,0x87,0xB5),
+     o3(0xE5,0x86,0x8A), o3(0xE6,0x9F,0xB5),
+     o3(0xE7,0xAD,0x96),
+
+#define from_EUC_KR_F3 WORDINDEX2INFO(18557)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F3_infos,
+
+#define from_EUC_KR_F4_infos WORDINDEX2INFO(18559)
+                INVALID, o3(0xE8,0xB2,0xAC),
+     o3(0xE5,0x87,0x84), o3(0xE5,0xA6,0xBB),
+     o3(0xE6,0x82,0xBD), o3(0xE8,0x99,0x95),
+     o3(0xE5,0x80,0x9C), o3(0xEF,0xA7,0xBF),
+     o3(0xE5,0x89,0x94), o3(0xE5,0xB0,0xBA),
+     o3(0xE6,0x85,0xBD), o3(0xE6,0x88,0x9A),
+     o3(0xE6,0x8B,0x93), o3(0xE6,0x93,0xB2),
+     o3(0xE6,0x96,0xA5), o3(0xE6,0xBB,0x8C),
+     o3(0xE7,0x98,0xA0), o3(0xE8,0x84,0x8A),
+     o3(0xE8,0xB9,0xA0), o3(0xE9,0x99,0x9F),
+     o3(0xE9,0x9A,0xBB), o3(0xE4,0xBB,0x9F),
+     o3(0xE5,0x8D,0x83), o3(0xE5,0x96,0x98),
+     o3(0xE5,0xA4,0xA9), o3(0xE5,0xB7,0x9D),
+     o3(0xE6,0x93,0x85), o3(0xE6,0xB3,0x89),
+     o3(0xE6,0xB7,0xBA), o3(0xE7,0x8E,0x94),
+     o3(0xE7,0xA9,0xBF), o3(0xE8,0x88,0x9B),
+     o3(0xE8,0x96,0xA6), o3(0xE8,0xB3,0xA4),
+     o3(0xE8,0xB8,0x90), o3(0xE9,0x81,0xB7),
+     o3(0xE9,0x87,0xA7), o3(0xE9,0x97,0xA1),
+     o3(0xE9,0x98,0xA1), o3(0xE9,0x9F,0x86),
+     o3(0xE5,0x87,0xB8), o3(0xE5,0x93,0xB2),
+     o3(0xE5,0x96,0x86), o3(0xE5,0xBE,0xB9),
+     o3(0xE6,0x92,0xA4), o3(0xE6,0xBE,0x88),
+     o3(0xE7,0xB6,0xB4), o3(0xE8,0xBC,0x9F),
+     o3(0xE8,0xBD,0x8D), o3(0xE9,0x90,0xB5),
+     o3(0xE5,0x83,0x89), o3(0xE5,0xB0,0x96),
+     o3(0xE6,0xB2,0xBE), o3(0xE6,0xB7,0xBB),
+     o3(0xE7,0x94,0x9B), o3(0xE7,0x9E,0xBB),
+     o3(0xE7,0xB0,0xBD), o3(0xE7,0xB1,0xA4),
+     o3(0xE8,0xA9,0xB9), o3(0xE8,0xAB,0x82),
+     o3(0xE5,0xA0,0x9E), o3(0xE5,0xA6,0xBE),
+     o3(0xE5,0xB8,0x96), o3(0xE6,0x8D,0xB7),
+     o3(0xE7,0x89,0x92), o3(0xE7,0x96,0x8A),
+     o3(0xE7,0x9D,0xAB), o3(0xE8,0xAB,0x9C),
+     o3(0xE8,0xB2,0xBC), o3(0xE8,0xBC,0x92),
+     o3(0xE5,0xBB,0xB3), o3(0xE6,0x99,0xB4),
+     o3(0xE6,0xB7,0xB8), o3(0xE8,0x81,0xBD),
+     o3(0xE8,0x8F,0x81), o3(0xE8,0xAB,0x8B),
+     o3(0xE9,0x9D,0x91), o3(0xE9,0xAF,0x96),
+     o3(0xEF,0xA8,0x80), o3(0xE5,0x89,0x83),
+     o3(0xE6,0x9B,0xBF), o3(0xE6,0xB6,0x95),
+     o3(0xE6,0xBB,0xAF), o3(0xE7,0xB7,0xA0),
+     o3(0xE8,0xAB,0xA6), o3(0xE9,0x80,0xAE),
+     o3(0xE9,0x81,0x9E), o3(0xE9,0xAB,0x94),
+     o3(0xE5,0x88,0x9D), o3(0xE5,0x89,0xBF),
+     o3(0xE5,0x93,0xA8), o3(0xE6,0x86,0x94),
+     o3(0xE6,0x8A,0x84), o3(0xE6,0x8B,0x9B),
+     o3(0xE6,0xA2,0xA2),
+
+#define from_EUC_KR_F4 WORDINDEX2INFO(18654)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F4_infos,
+
+#define from_EUC_KR_F5_infos WORDINDEX2INFO(18656)
+                INVALID, o3(0xE6,0xA4,0x92),
+     o3(0xE6,0xA5,0x9A), o3(0xE6,0xA8,0xB5),
+     o3(0xE7,0x82,0x92), o3(0xE7,0x84,0xA6),
+     o3(0xE7,0xA1,0x9D), o3(0xE7,0xA4,0x81),
+     o3(0xE7,0xA4,0x8E), o3(0xE7,0xA7,0x92),
+     o3(0xE7,0xA8,0x8D), o3(0xE8,0x82,0x96),
+     o3(0xE8,0x89,0xB8), o3(0xE8,0x8B,0x95),
+     o3(0xE8,0x8D,0x89), o3(0xE8,0x95,0x89),
+     o3(0xE8,0xB2,0x82), o3(0xE8,0xB6,0x85),
+     o3(0xE9,0x85,0xA2), o3(0xE9,0x86,0x8B),
+     o3(0xE9,0x86,0xAE), o3(0xE4,0xBF,0x83),
+     o3(0xE5,0x9B,0x91), o3(0xE7,0x87,0xAD),
+     o3(0xE7,0x9F,0x97), o3(0xE8,0x9C,0x80),
+     o3(0xE8,0xA7,0xB8), o3(0xE5,0xAF,0xB8),
+     o3(0xE5,0xBF,0x96), o3(0xE6,0x9D,0x91),
+     o3(0xE9,0x82,0xA8), o3(0xE5,0x8F,0xA2),
+     o3(0xE5,0xA1,0x9A), o3(0xE5,0xAF,0xB5),
+     o3(0xE6,0x82,0xA4), o3(0xE6,0x86,0x81),
+     o3(0xE6,0x91,0xA0), o3(0xE7,0xB8,0xBD),
+     o3(0xE8,0x81,0xB0), o3(0xE8,0x94,0xA5),
+     o3(0xE9,0x8A,0x83), o3(0xE6,0x92,0xAE),
+     o3(0xE5,0x82,0xAC), o3(0xE5,0xB4,0x94),
+     o3(0xE6,0x9C,0x80), o3(0xE5,0xA2,0x9C),
+     o3(0xE6,0x8A,0xBD), o3(0xE6,0x8E,0xA8),
+     o3(0xE6,0xA4,0x8E), o3(0xE6,0xA5,0xB8),
+     o3(0xE6,0xA8,0x9E), o3(0xE6,0xB9,0xAB),
+     o3(0xE7,0x9A,0xBA), o3(0xE7,0xA7,0x8B),
+     o3(0xE8,0x8A,0xBB), o3(0xE8,0x90,0xA9),
+     o3(0xE8,0xAB,0x8F), o3(0xE8,0xB6,0xA8),
+     o3(0xE8,0xBF,0xBD), o3(0xE9,0x84,0x92),
+     o3(0xE9,0x85,0x8B), o3(0xE9,0x86,0x9C),
+     o3(0xE9,0x8C,0x90), o3(0xE9,0x8C,0x98),
+     o3(0xE9,0x8E,0x9A), o3(0xE9,0x9B,0x9B),
+     o3(0xE9,0xA8,0xB6), o3(0xE9,0xB0,0x8D),
+     o3(0xE4,0xB8,0x91), o3(0xE7,0x95,0x9C),
+     o3(0xE7,0xA5,0x9D), o3(0xE7,0xAB,0xBA),
+     o3(0xE7,0xAD,0x91), o3(0xE7,0xAF,0x89),
+     o3(0xE7,0xB8,0xAE), o3(0xE8,0x93,0x84),
+     o3(0xE8,0xB9,0x99), o3(0xE8,0xB9,0xB4),
+     o3(0xE8,0xBB,0xB8), o3(0xE9,0x80,0x90),
+     o3(0xE6,0x98,0xA5), o3(0xE6,0xA4,0xBF),
+     o3(0xE7,0x91,0x83), o3(0xE5,0x87,0xBA),
+     o3(0xE6,0x9C,0xAE), o3(0xE9,0xBB,0x9C),
+     o3(0xE5,0x85,0x85), o3(0xE5,0xBF,0xA0),
+     o3(0xE6,0xB2,0x96), o3(0xE8,0x9F,0xB2),
+     o3(0xE8,0xA1,0x9D), o3(0xE8,0xA1,0xB7),
+     o3(0xE6,0x82,0xB4), o3(0xE8,0x86,0xB5),
+     o3(0xE8,0x90,0x83),
+
+#define from_EUC_KR_F5 WORDINDEX2INFO(18751)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F5_infos,
+
+#define from_EUC_KR_F6_infos WORDINDEX2INFO(18753)
+                INVALID, o3(0xE8,0xB4,0x85),
+     o3(0xE5,0x8F,0x96), o3(0xE5,0x90,0xB9),
+     o3(0xE5,0x98,0xB4), o3(0xE5,0xA8,0xB6),
+     o3(0xE5,0xB0,0xB1), o3(0xE7,0x82,0x8A),
+     o3(0xE7,0xBF,0xA0), o3(0xE8,0x81,0x9A),
+     o3(0xE8,0x84,0x86), o3(0xE8,0x87,0xAD),
+     o3(0xE8,0xB6,0xA3), o3(0xE9,0x86,0x89),
+     o3(0xE9,0xA9,0x9F), o3(0xE9,0xB7,0xB2),
+     o3(0xE5,0x81,0xB4), o3(0xE4,0xBB,0x84),
+     o3(0xE5,0x8E,0xA0), o3(0xE6,0x83,0xBB),
+     o3(0xE6,0xB8,0xAC), o3(0xE5,0xB1,0xA4),
+     o3(0xE4,0xBE,0x88), o3(0xE5,0x80,0xA4),
+     o3(0xE5,0x97,0xA4), o3(0xE5,0xB3,0x99),
+     o3(0xE5,0xB9,0x9F), o3(0xE6,0x81,0xA5),
+     o3(0xE6,0xA2,0x94), o3(0xE6,0xB2,0xBB),
+     o3(0xE6,0xB7,0x84), o3(0xE7,0x86,0xBE),
+     o3(0xE7,0x97,0x94), o3(0xE7,0x97,0xB4),
+     o3(0xE7,0x99,0xA1), o3(0xE7,0xA8,0x9A),
+     o3(0xE7,0xA9,0x89), o3(0xE7,0xB7,0x87),
+     o3(0xE7,0xB7,0xBB), o3(0xE7,0xBD,0xAE),
+     o3(0xE8,0x87,0xB4), o3(0xE8,0x9A,0xA9),
+     o3(0xE8,0xBC,0x9C), o3(0xE9,0x9B,0x89),
+     o3(0xE9,0xA6,0xB3), o3(0xE9,0xBD,0x92),
+     o3(0xE5,0x89,0x87), o3(0xE5,0x8B,0x85),
+     o3(0xE9,0xA3,0xAD), o3(0xE8,0xA6,0xAA),
+     o3(0xE4,0xB8,0x83), o3(0xE6,0x9F,0x92),
+     o3(0xE6,0xBC,0x86), o3(0xE4,0xBE,0xB5),
+     o3(0xE5,0xAF,0xA2), o3(0xE6,0x9E,0x95),
+     o3(0xE6,0xB2,0x88), o3(0xE6,0xB5,0xB8),
+     o3(0xE7,0x90,0x9B), o3(0xE7,0xA0,0xA7),
+     o3(0xE9,0x87,0x9D), o3(0xE9,0x8D,0xBC),
+     o3(0xE8,0x9F,0x84), o3(0xE7,0xA7,0xA4),
+     o3(0xE7,0xA8,0xB1), o3(0xE5,0xBF,0xAB),
+     o3(0xE4,0xBB,0x96), o3(0xE5,0x92,0xA4),
+     o3(0xE5,0x94,0xBE), o3(0xE5,0xA2,0xAE),
+     o3(0xE5,0xA6,0xA5), o3(0xE6,0x83,0xB0),
+     o3(0xE6,0x89,0x93), o3(0xE6,0x8B,0x96),
+     o3(0xE6,0x9C,0xB6), o3(0xE6,0xA5,0x95),
+     o3(0xE8,0x88,0xB5), o3(0xE9,0x99,0x80),
+     o3(0xE9,0xA6,0xB1), o3(0xE9,0xA7,0x9D),
+     o3(0xE5,0x80,0xAC), o3(0xE5,0x8D,0x93),
+     o3(0xE5,0x95,0x84), o3(0xE5,0x9D,0xBC),
+     o3(0xEF,0xA8,0x81), o3(0xE6,0x89,0x98),
+     o3(0xEF,0xA8,0x82), o3(0xE6,0x93,0xA2),
+     o3(0xE6,0x99,0xAB), o3(0xE6,0x9F,0x9D),
+     o3(0xE6,0xBF,0x81), o3(0xE6,0xBF,0xAF),
+     o3(0xE7,0x90,0xA2), o3(0xE7,0x90,0xB8),
+     o3(0xE8,0xA8,0x97),
+
+#define from_EUC_KR_F6 WORDINDEX2INFO(18848)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F6_infos,
+
+#define from_EUC_KR_F7_infos WORDINDEX2INFO(18850)
+                INVALID, o3(0xE9,0x90,0xB8),
+     o3(0xE5,0x91,0x91), o3(0xE5,0x98,0x86),
+     o3(0xE5,0x9D,0xA6), o3(0xE5,0xBD,0x88),
+     o3(0xE6,0x86,0x9A), o3(0xE6,0xAD,0x8E),
+     o3(0xE7,0x81,0x98), o3(0xE7,0x82,0xAD),
+     o3(0xE7,0xB6,0xBB), o3(0xE8,0xAA,0x95),
+     o3(0xE5,0xA5,0xAA), o3(0xE8,0x84,0xAB),
+     o3(0xE6,0x8E,0xA2), o3(0xE7,0x9C,0x88),
+     o3(0xE8,0x80,0xBD), o3(0xE8,0xB2,0xAA),
+     o3(0xE5,0xA1,0x94), o3(0xE6,0x90,0xAD),
+     o3(0xE6,0xA6,0xBB), o3(0xE5,0xAE,0x95),
+     o3(0xE5,0xB8,0x91), o3(0xE6,0xB9,0xAF),
+     o3(0xEF,0xA8,0x83), o3(0xE8,0x95,0xA9),
+     o3(0xE5,0x85,0x8C), o3(0xE5,0x8F,0xB0),
+     o3(0xE5,0xA4,0xAA), o3(0xE6,0x80,0xA0),
+     o3(0xE6,0x85,0x8B), o3(0xE6,0xAE,0x86),
+     o3(0xE6,0xB1,0xB0), o3(0xE6,0xB3,0xB0),
+     o3(0xE7,0xAC,0x9E), o3(0xE8,0x83,0x8E),
+     o3(0xE8,0x8B,0x94), o3(0xE8,0xB7,0x86),
+     o3(0xE9,0x82,0xB0), o3(0xE9,0xA2,0xB1),
+     o3(0xEF,0xA8,0x84), o3(0xE6,0x93,0x87),
+     o3(0xE6,0xBE,0xA4), o3(0xE6,0x92,0x91),
+     o3(0xE6,0x94,0x84), o3(0xE5,0x85,0x8E),
+     o3(0xE5,0x90,0x90), o3(0xE5,0x9C,0x9F),
+     o3(0xE8,0xA8,0x8E), o3(0xE6,0x85,0x9F),
+     o3(0xE6,0xA1,0xB6), o3(0xEF,0xA8,0x85),
+     o3(0xE7,0x97,0x9B), o3(0xE7,0xAD,0x92),
+     o3(0xE7,0xB5,0xB1), o3(0xE9,0x80,0x9A),
+     o3(0xE5,0xA0,0x86), o3(0xE6,0xA7,0x8C),
+     o3(0xE8,0x85,0xBF), o3(0xE8,0xA4,0xAA),
+     o3(0xE9,0x80,0x80), o3(0xE9,0xA0,0xB9),
+     o3(0xE5,0x81,0xB8), o3(0xE5,0xA5,0x97),
+     o3(0xE5,0xA6,0xAC), o3(0xE6,0x8A,0x95),
+     o3(0xE9,0x80,0x8F), o3(0xE9,0xAC,0xAA),
+     o3(0xE6,0x85,0x9D), o3(0xE7,0x89,0xB9),
+     o3(0xE9,0x97,0x96), o3(0xE5,0x9D,0xA1),
+     o3(0xE5,0xA9,0x86), o3(0xE5,0xB7,0xB4),
+     o3(0xE6,0x8A,0x8A), o3(0xE6,0x92,0xAD),
+     o3(0xE6,0x93,0xBA), o3(0xE6,0x9D,0xB7),
+     o3(0xE6,0xB3,0xA2), o3(0xE6,0xB4,0xBE),
+     o3(0xE7,0x88,0xAC), o3(0xE7,0x90,0xB6),
+     o3(0xE7,0xA0,0xB4), o3(0xE7,0xBD,0xB7),
+     o3(0xE8,0x8A,0xAD), o3(0xE8,0xB7,0x9B),
+     o3(0xE9,0xA0,0x97), o3(0xE5,0x88,0xA4),
+     o3(0xE5,0x9D,0x82), o3(0xE6,0x9D,0xBF),
+     o3(0xE7,0x89,0x88), o3(0xE7,0x93,0xA3),
+     o3(0xE8,0xB2,0xA9), o3(0xE8,0xBE,0xA6),
+     o3(0xE9,0x88,0x91),
+
+#define from_EUC_KR_F7 WORDINDEX2INFO(18945)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F7_infos,
+
+#define from_EUC_KR_F8_infos WORDINDEX2INFO(18947)
+                INVALID, o3(0xE9,0x98,0xAA),
+     o3(0xE5,0x85,0xAB), o3(0xE5,0x8F,0xAD),
+     o3(0xE6,0x8D,0x8C), o3(0xE4,0xBD,0xA9),
+     o3(0xE5,0x94,0x84), o3(0xE6,0x82,0x96),
+     o3(0xE6,0x95,0x97), o3(0xE6,0xB2,0x9B),
+     o3(0xE6,0xB5,0xBF), o3(0xE7,0x89,0x8C),
+     o3(0xE7,0x8B,0xBD), o3(0xE7,0xA8,0x97),
+     o3(0xE8,0xA6,0x87), o3(0xE8,0xB2,0x9D),
+     o3(0xE5,0xBD,0xAD), o3(0xE6,0xBE,0x8E),
+     o3(0xE7,0x83,0xB9), o3(0xE8,0x86,0xA8),
+     o3(0xE6,0x84,0x8E), o3(0xE4,0xBE,0xBF),
+     o3(0xE5,0x81,0x8F), o3(0xE6,0x89,0x81),
+     o3(0xE7,0x89,0x87), o3(0xE7,0xAF,0x87),
+     o3(0xE7,0xB7,0xA8), o3(0xE7,0xBF,0xA9),
+     o3(0xE9,0x81,0x8D), o3(0xE9,0x9E,0xAD),
+     o3(0xE9,0xA8,0x99), o3(0xE8,0xB2,0xB6),
+     o3(0xE5,0x9D,0xAA), o3(0xE5,0xB9,0xB3),
+     o3(0xE6,0x9E,0xB0), o3(0xE8,0x90,0x8D),
+     o3(0xE8,0xA9,0x95), o3(0xE5,0x90,0xA0),
+     o3(0xE5,0xAC,0x96), o3(0xE5,0xB9,0xA3),
+     o3(0xE5,0xBB,0xA2), o3(0xE5,0xBC,0x8A),
+     o3(0xE6,0x96,0x83), o3(0xE8,0x82,0xBA),
+     o3(0xE8,0x94,0xBD), o3(0xE9,0x96,0x89),
+     o3(0xE9,0x99,0x9B), o3(0xE4,0xBD,0x88),
+     o3(0xE5,0x8C,0x85), o3(0xE5,0x8C,0x8D),
+     o3(0xE5,0x8C,0x8F), o3(0xE5,0x92,0x86),
+     o3(0xE5,0x93,0xBA), o3(0xE5,0x9C,0x83),
+     o3(0xE5,0xB8,0x83), o3(0xE6,0x80,0x96),
+     o3(0xE6,0x8A,0x9B), o3(0xE6,0x8A,0xB1),
+     o3(0xE6,0x8D,0x95), o3(0xEF,0xA8,0x86),
+     o3(0xE6,0xB3,0xA1), o3(0xE6,0xB5,0xA6),
+     o3(0xE7,0x96,0xB1), o3(0xE7,0xA0,0xB2),
+     o3(0xE8,0x83,0x9E), o3(0xE8,0x84,0xAF),
+     o3(0xE8,0x8B,0x9E), o3(0xE8,0x91,0xA1),
+     o3(0xE8,0x92,0xB2), o3(0xE8,0xA2,0x8D),
+     o3(0xE8,0xA4,0x92), o3(0xE9,0x80,0x8B),
+     o3(0xE9,0x8B,0xAA), o3(0xE9,0xA3,0xBD),
+     o3(0xE9,0xAE,0x91), o3(0xE5,0xB9,0x85),
+     o3(0xE6,0x9A,0xB4), o3(0xE6,0x9B,0x9D),
+     o3(0xE7,0x80,0x91), o3(0xE7,0x88,0x86),
+     o3(0xEF,0xA8,0x87), o3(0xE4,0xBF,0xB5),
+     o3(0xE5,0x89,0xBD), o3(0xE5,0xBD,0xAA),
+     o3(0xE6,0x85,0x93), o3(0xE6,0x9D,0x93),
+     o3(0xE6,0xA8,0x99), o3(0xE6,0xBC,0x82),
+     o3(0xE7,0x93,0xA2), o3(0xE7,0xA5,0xA8),
+     o3(0xE8,0xA1,0xA8), o3(0xE8,0xB1,0xB9),
+     o3(0xE9,0xA3,0x87), o3(0xE9,0xA3,0x84),
+     o3(0xE9,0xA9,0x83),
+
+#define from_EUC_KR_F8 WORDINDEX2INFO(19042)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F8_infos,
+
+#define from_EUC_KR_F9_infos WORDINDEX2INFO(19044)
+                INVALID, o3(0xE5,0x93,0x81),
+     o3(0xE7,0xA8,0x9F), o3(0xE6,0xA5,0x93),
+     o3(0xE8,0xAB,0xB7), o3(0xE8,0xB1,0x8A),
+     o3(0xE9,0xA2,0xA8), o3(0xE9,0xA6,0xAE),
+     o3(0xE5,0xBD,0xBC), o3(0xE6,0x8A,0xAB),
+     o3(0xE7,0x96,0xB2), o3(0xE7,0x9A,0xAE),
+     o3(0xE8,0xA2,0xAB), o3(0xE9,0x81,0xBF),
+     o3(0xE9,0x99,0x82), o3(0xE5,0x8C,0xB9),
+     o3(0xE5,0xBC,0xBC), o3(0xE5,0xBF,0x85),
+     o3(0xE6,0xB3,0x8C), o3(0xE7,0x8F,0x8C),
+     o3(0xE7,0x95,0xA2), o3(0xE7,0x96,0x8B),
+     o3(0xE7,0xAD,0x86), o3(0xE8,0x8B,0xBE),
+     o3(0xE9,0xA6,0x9D), o3(0xE4,0xB9,0x8F),
+     o3(0xE9,0x80,0xBC), o3(0xE4,0xB8,0x8B),
+     o3(0xE4,0xBD,0x95), o3(0xE5,0x8E,0xA6),
+     o3(0xE5,0xA4,0x8F), o3(0xE5,0xBB,0x88),
+     o3(0xE6,0x98,0xB0), o3(0xE6,0xB2,0xB3),
+     o3(0xE7,0x91,0x95), o3(0xE8,0x8D,0xB7),
+     o3(0xE8,0x9D,0xA6), o3(0xE8,0xB3,0x80),
+     o3(0xE9,0x81,0x90), o3(0xE9,0x9C,0x9E),
+     o3(0xE9,0xB0,0x95), o3(0xE5,0xA3,0x91),
+     o3(0xE5,0xAD,0xB8), o3(0xE8,0x99,0x90),
+     o3(0xE8,0xAC,0x94), o3(0xE9,0xB6,0xB4),
+     o3(0xE5,0xAF,0x92), o3(0xE6,0x81,0xA8),
+     o3(0xE6,0x82,0x8D), o3(0xE6,0x97,0xB1),
+     o3(0xE6,0xB1,0x97), o3(0xE6,0xBC,0xA2),
+     o3(0xE6,0xBE,0xA3), o3(0xE7,0x80,0x9A),
+     o3(0xE7,0xBD,0x95), o3(0xE7,0xBF,0xB0),
+     o3(0xE9,0x96,0x91), o3(0xE9,0x96,0x92),
+     o3(0xE9,0x99,0x90), o3(0xE9,0x9F,0x93),
+     o3(0xE5,0x89,0xB2), o3(0xE8,0xBD,0x84),
+     o3(0xE5,0x87,0xBD), o3(0xE5,0x90,0xAB),
+     o3(0xE5,0x92,0xB8), o3(0xE5,0x95,0xA3),
+     o3(0xE5,0x96,0x8A), o3(0xE6,0xAA,0xBB),
+     o3(0xE6,0xB6,0xB5), o3(0xE7,0xB7,0x98),
+     o3(0xE8,0x89,0xA6), o3(0xE9,0x8A,0x9C),
+     o3(0xE9,0x99,0xB7), o3(0xE9,0xB9,0xB9),
+     o3(0xE5,0x90,0x88), o3(0xE5,0x93,0x88),
+     o3(0xE7,0x9B,0x92), o3(0xE8,0x9B,0xA4),
+     o3(0xE9,0x96,0xA4), o3(0xE9,0x97,0x94),
+     o3(0xE9,0x99,0x9C), o3(0xE4,0xBA,0xA2),
+     o3(0xE4,0xBC,0x89), o3(0xE5,0xA7,0xAE),
+     o3(0xE5,0xAB,0xA6), o3(0xE5,0xB7,0xB7),
+     o3(0xE6,0x81,0x92), o3(0xE6,0x8A,0x97),
+     o3(0xE6,0x9D,0xAD), o3(0xE6,0xA1,0x81),
+     o3(0xE6,0xB2,0x86), o3(0xE6,0xB8,0xAF),
+     o3(0xE7,0xBC,0xB8), o3(0xE8,0x82,0x9B),
+     o3(0xE8,0x88,0xAA),
+
+#define from_EUC_KR_F9 WORDINDEX2INFO(19139)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_F9_infos,
+
+#define from_EUC_KR_FA_infos WORDINDEX2INFO(19141)
+                INVALID, o3(0xEF,0xA8,0x88),
+     o3(0xEF,0xA8,0x89), o3(0xE9,0xA0,0x85),
+     o3(0xE4,0xBA,0xA5), o3(0xE5,0x81,0x95),
+     o3(0xE5,0x92,0xB3), o3(0xE5,0x9E,0x93),
+     o3(0xE5,0xA5,0x9A), o3(0xE5,0xAD,0xA9),
+     o3(0xE5,0xAE,0xB3), o3(0xE6,0x87,0x88),
+     o3(0xE6,0xA5,0xB7), o3(0xE6,0xB5,0xB7),
+     o3(0xE7,0x80,0xA3), o3(0xE8,0x9F,0xB9),
+     o3(0xE8,0xA7,0xA3), o3(0xE8,0xA9,0xB2),
+     o3(0xE8,0xAB,0xA7), o3(0xE9,0x82,0x82),
+     o3(0xE9,0xA7,0xAD), o3(0xE9,0xAA,0xB8),
+     o3(0xE5,0x8A,0xBE), o3(0xE6,0xA0,0xB8),
+     o3(0xE5,0x80,0x96), o3(0xE5,0xB9,0xB8),
+     o3(0xE6,0x9D,0x8F), o3(0xE8,0x8D,0x87),
+     o3(0xE8,0xA1,0x8C), o3(0xE4,0xBA,0xAB),
+     o3(0xE5,0x90,0x91), o3(0xE5,0x9A,0xAE),
+     o3(0xE7,0x8F,0xA6), o3(0xE9,0x84,0x95),
+     o3(0xE9,0x9F,0xBF), o3(0xE9,0xA4,0x89),
+     o3(0xE9,0xA5,0x97), o3(0xE9,0xA6,0x99),
+     o3(0xE5,0x99,0x93), o3(0xE5,0xA2,0x9F),
+     o3(0xE8,0x99,0x9B), o3(0xE8,0xA8,0xB1),
+     o3(0xE6,0x86,0xB2), o3(0xE6,0xAB,0xB6),
+     o3(0xE7,0x8D,0xBB), o3(0xE8,0xBB,0x92),
+     o3(0xE6,0xAD,0x87), o3(0xE9,0x9A,0xAA),
+     o3(0xE9,0xA9,0x97), o3(0xE5,0xA5,0x95),
+     o3(0xE7,0x88,0x80), o3(0xE8,0xB5,0xAB),
+     o3(0xE9,0x9D,0xA9), o3(0xE4,0xBF,0x94),
+     o3(0xE5,0xB3,0xB4), o3(0xE5,0xBC,0xA6),
+     o3(0xE6,0x87,0xB8), o3(0xE6,0x99,0x9B),
+     o3(0xE6,0xB3,0xAB), o3(0xE7,0x82,0xAB),
+     o3(0xE7,0x8E,0x84), o3(0xE7,0x8E,0xB9),
+     o3(0xE7,0x8F,0xBE), o3(0xE7,0x9C,0xA9),
+     o3(0xE7,0x9D,0x8D), o3(0xE7,0xB5,0x83),
+     o3(0xE7,0xB5,0xA2), o3(0xE7,0xB8,0xA3),
+     o3(0xE8,0x88,0xB7), o3(0xE8,0xA1,0x92),
+     o3(0xEF,0xA8,0x8A), o3(0xE8,0xB3,0xA2),
+     o3(0xE9,0x89,0x89), o3(0xE9,0xA1,0xAF),
+     o3(0xE5,0xAD,0x91), o3(0xE7,0xA9,0xB4),
+     o3(0xE8,0xA1,0x80), o3(0xE9,0xA0,0x81),
+     o3(0xE5,0xAB,0x8C), o3(0xE4,0xBF,0xA0),
+     o3(0xE5,0x8D,0x94), o3(0xE5,0xA4,0xBE),
+     o3(0xE5,0xB3,0xBD), o3(0xE6,0x8C,0xBE),
+     o3(0xE6,0xB5,0xB9), o3(0xE7,0x8B,0xB9),
+     o3(0xE8,0x84,0x85), o3(0xE8,0x84,0x87),
+     o3(0xE8,0x8E,0xA2), o3(0xE9,0x8B,0x8F),
+     o3(0xE9,0xA0,0xB0), o3(0xE4,0xBA,0xA8),
+     o3(0xE5,0x85,0x84), o3(0xE5,0x88,0x91),
+     o3(0xE5,0x9E,0x8B),
+
+#define from_EUC_KR_FA WORDINDEX2INFO(19236)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_FA_infos,
+
+#define from_EUC_KR_FB_infos WORDINDEX2INFO(19238)
+                INVALID, o3(0xE5,0xBD,0xA2),
+     o3(0xE6,0xB3,0x82), o3(0xE6,0xBB,0x8E),
+     o3(0xE7,0x80,0x85), o3(0xE7,0x81,0x90),
+     o3(0xE7,0x82,0xAF), o3(0xE7,0x86,0x92),
+     o3(0xE7,0x8F,0xA9), o3(0xE7,0x91,0xA9),
+     o3(0xE8,0x8D,0x8A), o3(0xE8,0x9E,0xA2),
+     o3(0xE8,0xA1,0xA1), o3(0xE9,0x80,0x88),
+     o3(0xE9,0x82,0xA2), o3(0xE9,0x8E,0xA3),
+     o3(0xE9,0xA6,0xA8), o3(0xE5,0x85,0xAE),
+     o3(0xE5,0xBD,0x97), o3(0xE6,0x83,0xA0),
+     o3(0xE6,0x85,0xA7), o3(0xE6,0x9A,0xB3),
+     o3(0xE8,0x95,0x99), o3(0xE8,0xB9,0x8A),
+     o3(0xE9,0x86,0xAF), o3(0xE9,0x9E,0x8B),
+     o3(0xE4,0xB9,0x8E), o3(0xE4,0xBA,0x92),
+     o3(0xE5,0x91,0xBC), o3(0xE5,0xA3,0x95),
+     o3(0xE5,0xA3,0xBA), o3(0xE5,0xA5,0xBD),
+     o3(0xE5,0xB2,0xB5), o3(0xE5,0xBC,0xA7),
+     o3(0xE6,0x88,0xB6), o3(0xE6,0x89,0x88),
+     o3(0xE6,0x98,0x8A), o3(0xE6,0x99,0xA7),
+     o3(0xE6,0xAF,0xAB), o3(0xE6,0xB5,0xA9),
+     o3(0xE6,0xB7,0x8F), o3(0xE6,0xB9,0x96),
+     o3(0xE6,0xBB,0xB8), o3(0xE6,0xBE,0x94),
+     o3(0xE6,0xBF,0xA0), o3(0xE6,0xBF,0xA9),
+     o3(0xE7,0x81,0x9D), o3(0xE7,0x8B,0x90),
+     o3(0xE7,0x90,0xA5), o3(0xE7,0x91,0x9A),
+     o3(0xE7,0x93,0xA0), o3(0xE7,0x9A,0x93),
+     o3(0xE7,0xA5,0x9C), o3(0xE7,0xB3,0x8A),
+     o3(0xE7,0xB8,0x9E), o3(0xE8,0x83,0xA1),
+     o3(0xE8,0x8A,0xA6), o3(0xE8,0x91,0xAB),
+     o3(0xE8,0x92,0xBF), o3(0xE8,0x99,0x8E),
+     o3(0xE8,0x99,0x9F), o3(0xE8,0x9D,0xB4),
+     o3(0xE8,0xAD,0xB7), o3(0xE8,0xB1,0xAA),
+     o3(0xE9,0x8E,0xAC), o3(0xE9,0xA0,0x80),
+     o3(0xE9,0xA1,0xA5), o3(0xE6,0x83,0x91),
+     o3(0xE6,0x88,0x96), o3(0xE9,0x85,0xB7),
+     o3(0xE5,0xA9,0x9A), o3(0xE6,0x98,0x8F),
+     o3(0xE6,0xB7,0xB7), o3(0xE6,0xB8,0xBE),
+     o3(0xE7,0x90,0xBF), o3(0xE9,0xAD,0x82),
+     o3(0xE5,0xBF,0xBD), o3(0xE6,0x83,0x9A),
+     o3(0xE7,0xAC,0x8F), o3(0xE5,0x93,0x84),
+     o3(0xE5,0xBC,0x98), o3(0xE6,0xB1,0x9E),
+     o3(0xE6,0xB3,0x93), o3(0xE6,0xB4,0xAA),
+     o3(0xE7,0x83,0x98), o3(0xE7,0xB4,0x85),
+     o3(0xE8,0x99,0xB9), o3(0xE8,0xA8,0x8C),
+     o3(0xE9,0xB4,0xBB), o3(0xE5,0x8C,0x96),
+     o3(0xE5,0x92,0x8C), o3(0xE5,0xAC,0x85),
+     o3(0xE6,0xA8,0xBA), o3(0xE7,0x81,0xAB),
+     o3(0xE7,0x95,0xB5),
+
+#define from_EUC_KR_FB WORDINDEX2INFO(19333)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_FB_infos,
+
+#define from_EUC_KR_FC_infos WORDINDEX2INFO(19335)
+                INVALID, o3(0xE7,0xA6,0x8D),
+     o3(0xE7,0xA6,0xBE), o3(0xE8,0x8A,0xB1),
+     o3(0xE8,0x8F,0xAF), o3(0xE8,0xA9,0xB1),
+     o3(0xE8,0xAD,0x81), o3(0xE8,0xB2,0xA8),
+     o3(0xE9,0x9D,0xB4), o3(0xEF,0xA8,0x8B),
+     o3(0xE6,0x93,0xB4), o3(0xE6,0x94,0xAB),
+     o3(0xE7,0xA2,0xBA), o3(0xE7,0xA2,0xBB),
+     o3(0xE7,0xA9,0xAB), o3(0xE4,0xB8,0xB8),
+     o3(0xE5,0x96,0x9A), o3(0xE5,0xA5,0x90),
+     o3(0xE5,0xAE,0xA6), o3(0xE5,0xB9,0xBB),
+     o3(0xE6,0x82,0xA3), o3(0xE6,0x8F,0x9B),
+     o3(0xE6,0xAD,0xA1), o3(0xE6,0x99,0xA5),
+     o3(0xE6,0xA1,0x93), o3(0xE6,0xB8,0x99),
+     o3(0xE7,0x85,0xA5), o3(0xE7,0x92,0xB0),
+     o3(0xE7,0xB4,0x88), o3(0xE9,0x82,0x84),
+     o3(0xE9,0xA9,0xA9), o3(0xE9,0xB0,0xA5),
+     o3(0xE6,0xB4,0xBB), o3(0xE6,0xBB,0x91),
+     o3(0xE7,0x8C,0xBE), o3(0xE8,0xB1,0x81),
+     o3(0xE9,0x97,0x8A), o3(0xE5,0x87,0xB0),
+     o3(0xE5,0xB9,0x8C), o3(0xE5,0xBE,0xA8),
+     o3(0xE6,0x81,0x8D), o3(0xE6,0x83,0xB6),
+     o3(0xE6,0x84,0xB0), o3(0xE6,0x85,0x8C),
+     o3(0xE6,0x99,0x83), o3(0xE6,0x99,0x84),
+     o3(0xE6,0xA6,0xA5), o3(0xE6,0xB3,0x81),
+     o3(0xE6,0xB9,0x9F), o3(0xE6,0xBB,0x89),
+     o3(0xE6,0xBD,0xA2), o3(0xE7,0x85,0x8C),
+     o3(0xE7,0x92,0x9C), o3(0xE7,0x9A,0x87),
+     o3(0xE7,0xAF,0x81), o3(0xE7,0xB0,0xA7),
+     o3(0xE8,0x8D,0x92), o3(0xE8,0x9D,0x97),
+     o3(0xE9,0x81,0x91), o3(0xE9,0x9A,0x8D),
+     o3(0xE9,0xBB,0x83), o3(0xE5,0x8C,0xAF),
+     o3(0xE5,0x9B,0x9E), o3(0xE5,0xBB,0xBB),
+     o3(0xE5,0xBE,0x8A), o3(0xE6,0x81,0xA2),
+     o3(0xE6,0x82,0x94), o3(0xE6,0x87,0xB7),
+     o3(0xE6,0x99,0xA6), o3(0xE6,0x9C,0x83),
+     o3(0xE6,0xAA,0x9C), o3(0xE6,0xB7,0xAE),
+     o3(0xE6,0xBE,0xAE), o3(0xE7,0x81,0xB0),
+     o3(0xE7,0x8D,0xAA), o3(0xE7,0xB9,0xAA),
+     o3(0xE8,0x86,0xBE), o3(0xE8,0x8C,0xB4),
+     o3(0xE8,0x9B,0x94), o3(0xE8,0xAA,0xA8),
+     o3(0xE8,0xB3,0x84), o3(0xE5,0x8A,0x83),
+     o3(0xE7,0x8D,0xB2), o3(0xE5,0xAE,0x96),
+     o3(0xE6,0xA9,0xAB), o3(0xE9,0x90,0x84),
+     o3(0xE5,0x93,0xAE), o3(0xE5,0x9A,0x86),
+     o3(0xE5,0xAD,0x9D), o3(0xE6,0x95,0x88),
+     o3(0xE6,0x96,0x85), o3(0xE6,0x9B,0x89),
+     o3(0xE6,0xA2,0x9F), o3(0xE6,0xB6,0x8D),
+     o3(0xE6,0xB7,0x86),
+
+#define from_EUC_KR_FC WORDINDEX2INFO(19430)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_FC_infos,
+
+#define from_EUC_KR_FD_infos WORDINDEX2INFO(19432)
+                INVALID, o3(0xE7,0x88,0xBB),
+     o3(0xE8,0x82,0xB4), o3(0xE9,0x85,0xB5),
+     o3(0xE9,0xA9,0x8D), o3(0xE4,0xBE,0xAF),
+     o3(0xE5,0x80,0x99), o3(0xE5,0x8E,0x9A),
+     o3(0xE5,0x90,0x8E), o3(0xE5,0x90,0xBC),
+     o3(0xE5,0x96,0x89), o3(0xE5,0x97,0x85),
+     o3(0xE5,0xB8,0xBF), o3(0xE5,0xBE,0x8C),
+     o3(0xE6,0x9C,0xBD), o3(0xE7,0x85,0xA6),
+     o3(0xE7,0x8F,0x9D), o3(0xE9,0x80,0x85),
+     o3(0xE5,0x8B,0x9B), o3(0xE5,0x8B,0xB3),
+     o3(0xE5,0xA1,0xA4), o3(0xE5,0xA3,0x8E),
+     o3(0xE7,0x84,0x84), o3(0xE7,0x86,0x8F),
+     o3(0xE7,0x87,0xBB), o3(0xE8,0x96,0xB0),
+     o3(0xE8,0xA8,0x93), o3(0xE6,0x9A,0x88),
+     o3(0xE8,0x96,0xA8), o3(0xE5,0x96,0xA7),
+     o3(0xE6,0x9A,0x84), o3(0xE7,0x85,0x8A),
+     o3(0xE8,0x90,0xB1), o3(0xE5,0x8D,0x89),
+     o3(0xE5,0x96,0x99), o3(0xE6,0xAF,0x81),
+     o3(0xE5,0xBD,0x99), o3(0xE5,0xBE,0xBD),
+     o3(0xE6,0x8F,0xAE), o3(0xE6,0x9A,0x89),
+     o3(0xE7,0x85,0x87), o3(0xE8,0xAB,0xB1),
+     o3(0xE8,0xBC,0x9D), o3(0xE9,0xBA,0xBE),
+     o3(0xE4,0xBC,0x91), o3(0xE6,0x90,0xBA),
+     o3(0xE7,0x83,0x8B), o3(0xE7,0x95,0xA6),
+     o3(0xE8,0x99,0xA7), o3(0xE6,0x81,0xA4),
+     o3(0xE8,0xAD,0x8E), o3(0xE9,0xB7,0xB8),
+     o3(0xE5,0x85,0x87), o3(0xE5,0x87,0xB6),
+     o3(0xE5,0x8C,0x88), o3(0xE6,0xB4,0xB6),
+     o3(0xE8,0x83,0xB8), o3(0xE9,0xBB,0x91),
+     o3(0xE6,0x98,0x95), o3(0xE6,0xAC,0xA3),
+     o3(0xE7,0x82,0x98), o3(0xE7,0x97,0x95),
+     o3(0xE5,0x90,0x83), o3(0xE5,0xB1,0xB9),
+     o3(0xE7,0xB4,0x87), o3(0xE8,0xA8,0x96),
+     o3(0xE6,0xAC,0xA0), o3(0xE6,0xAC,0xBD),
+     o3(0xE6,0xAD,0x86), o3(0xE5,0x90,0xB8),
+     o3(0xE6,0x81,0xB0), o3(0xE6,0xB4,0xBD),
+     o3(0xE7,0xBF,0x95), o3(0xE8,0x88,0x88),
+     o3(0xE5,0x83,0x96), o3(0xE5,0x87,0x9E),
+     o3(0xE5,0x96,0x9C), o3(0xE5,0x99,0xAB),
+     o3(0xE5,0x9B,0x8D), o3(0xE5,0xA7,0xAC),
+     o3(0xE5,0xAC,0x89), o3(0xE5,0xB8,0x8C),
+     o3(0xE6,0x86,0x99), o3(0xE6,0x86,0x98),
+     o3(0xE6,0x88,0xB1), o3(0xE6,0x99,0x9E),
+     o3(0xE6,0x9B,0xA6), o3(0xE7,0x86,0x99),
+     o3(0xE7,0x86,0xB9), o3(0xE7,0x86,0xBA),
+     o3(0xE7,0x8A,0xA7), o3(0xE7,0xA6,0xA7),
+     o3(0xE7,0xA8,0x80), o3(0xE7,0xBE,0xB2),
+     o3(0xE8,0xA9,0xB0),
+
+#define from_EUC_KR_FD WORDINDEX2INFO(19527)
+    from_EUC_KR_A1_offsets,
+    from_EUC_KR_FD_infos,
+
+#define from_EUC_KR_infos WORDINDEX2INFO(19529)
+              NOMAP,        INVALID, from_EUC_KR_A1, from_EUC_KR_A2,
+     from_EUC_KR_A3, from_EUC_KR_A4, from_EUC_KR_A5, from_EUC_KR_A6,
+     from_EUC_KR_A7, from_EUC_KR_A8, from_EUC_KR_A9, from_EUC_KR_AA,
+     from_EUC_KR_AB, from_EUC_KR_AC, from_EUC_KR_AD, from_EUC_KR_B0,
+     from_EUC_KR_B1, from_EUC_KR_B2, from_EUC_KR_B3, from_EUC_KR_B4,
+     from_EUC_KR_B5, from_EUC_KR_B6, from_EUC_KR_B7, from_EUC_KR_B8,
+     from_EUC_KR_B9, from_EUC_KR_BA, from_EUC_KR_BB, from_EUC_KR_BC,
+     from_EUC_KR_BD, from_EUC_KR_BE, from_EUC_KR_BF, from_EUC_KR_C0,
+     from_EUC_KR_C1, from_EUC_KR_C2, from_EUC_KR_C3, from_EUC_KR_C4,
+     from_EUC_KR_C5, from_EUC_KR_C6, from_EUC_KR_C7, from_EUC_KR_C8,
+     from_EUC_KR_CA, from_EUC_KR_CB, from_EUC_KR_CC, from_EUC_KR_CD,
+     from_EUC_KR_CE, from_EUC_KR_CF, from_EUC_KR_D0, from_EUC_KR_D1,
+     from_EUC_KR_D2, from_EUC_KR_D3, from_EUC_KR_D4, from_EUC_KR_D5,
+     from_EUC_KR_D6, from_EUC_KR_D7, from_EUC_KR_D8, from_EUC_KR_D9,
+     from_EUC_KR_DA, from_EUC_KR_DB, from_EUC_KR_DC, from_EUC_KR_DD,
+     from_EUC_KR_DE, from_EUC_KR_DF, from_EUC_KR_E0, from_EUC_KR_E1,
+     from_EUC_KR_E2, from_EUC_KR_E3, from_EUC_KR_E4, from_EUC_KR_E5,
+     from_EUC_KR_E6, from_EUC_KR_E7, from_EUC_KR_E8, from_EUC_KR_E9,
+     from_EUC_KR_EA, from_EUC_KR_EB, from_EUC_KR_EC, from_EUC_KR_ED,
+     from_EUC_KR_EE, from_EUC_KR_EF, from_EUC_KR_F0, from_EUC_KR_F1,
+     from_EUC_KR_F2, from_EUC_KR_F3, from_EUC_KR_F4, from_EUC_KR_F5,
+     from_EUC_KR_F6, from_EUC_KR_F7, from_EUC_KR_F8, from_EUC_KR_F9,
+     from_EUC_KR_FA, from_EUC_KR_FB, from_EUC_KR_FC, from_EUC_KR_FD,
+
+#define from_EUC_KR WORDINDEX2INFO(19621)
+    from_EUC_KR_offsets,
+    from_EUC_KR_infos,
+
+#define to_CP949_C2_infos WORDINDEX2INFO(19623)
+           INVALID,         UNDEF, o2(0xA2,0xAE), o2(0xA2,0xB4),
+     o2(0xA1,0xD7), o2(0xA1,0xA7), o2(0xA8,0xA3), o2(0xA1,0xA9),
+     o2(0xA2,0xE7), o2(0xA1,0xC6), o2(0xA1,0xBE), o2(0xA9,0xF7),
+     o2(0xA9,0xF8), o2(0xA2,0xA5), o2(0xA2,0xD2), o2(0xA1,0xA4),
+     o2(0xA2,0xAC), o2(0xA9,0xF6), o2(0xA8,0xAC), o2(0xA8,0xF9),
+     o2(0xA8,0xF6), o2(0xA8,0xFA), o2(0xA2,0xAF),
+
+#define to_CP949_C2 WORDINDEX2INFO(19646)
+    to_CP949_C2_offsets,
+    to_CP949_C2_infos,
+
+#define to_CP949_E2_82_infos WORDINDEX2INFO(19648)
+           INVALID,         UNDEF, o2(0xA9,0xFB), o2(0xA9,0xFC),
+     o2(0xA9,0xFD), o2(0xA9,0xFE), o2(0xA2,0xE6),
+
+#define to_CP949_E2_82 WORDINDEX2INFO(19655)
+    to_CP949_E2_82_offsets,
+    to_CP949_E2_82_infos,
+
+#define to_CP949_E2_infos WORDINDEX2INFO(19657)
+             INVALID, to_EUC_KR_E2_80, to_EUC_KR_E2_81,  to_CP949_E2_82,
+        to_EUC_KR_C6, to_EUC_KR_E2_84, to_EUC_KR_E2_85, to_EUC_KR_E2_86,
+     to_EUC_KR_E2_87, to_EUC_KR_E2_88, to_EUC_KR_E2_89, to_EUC_KR_E2_8A,
+     to_EUC_KR_E2_8C, to_EUC_KR_E2_91, to_EUC_KR_E2_92, to_EUC_KR_E2_93,
+     to_EUC_KR_E2_94, to_EUC_KR_E2_95, to_EUC_KR_E2_96, to_EUC_KR_E2_97,
+     to_EUC_KR_E2_98, to_EUC_KR_E2_99,
+
+#define to_CP949_E2 WORDINDEX2INFO(19679)
+    to_EUC_KR_E2_offsets,
+    to_CP949_E2_infos,
+
+#define to_CP949_EA_B0_infos WORDINDEX2INFO(19681)
+           INVALID, o2(0xB0,0xA1), o2(0xB0,0xA2), o2(0x81,0x41),
+     o2(0x81,0x42), o2(0xB0,0xA3), o2(0x81,0x43), o2(0x81,0x44),
+     o2(0xB0,0xA4), o2(0xB0,0xA5), o2(0xB0,0xA6), o2(0xB0,0xA7),
+     o2(0x81,0x45), o2(0x81,0x46), o2(0x81,0x47), o2(0x81,0x48),
+     o2(0x81,0x49), o2(0xB0,0xA8), o2(0xB0,0xA9), o2(0xB0,0xAA),
+     o2(0xB0,0xAB), o2(0xB0,0xAC), o2(0xB0,0xAD), o2(0xB0,0xAE),
+     o2(0xB0,0xAF), o2(0x81,0x4A), o2(0xB0,0xB0), o2(0xB0,0xB1),
+     o2(0xB0,0xB2), o2(0xB0,0xB3), o2(0xB0,0xB4), o2(0x81,0x4B),
+     o2(0x81,0x4C), o2(0xB0,0xB5), o2(0x81,0x4D), o2(0x81,0x4E),
+     o2(0x81,0x4F), o2(0xB0,0xB6), o2(0x81,0x50), o2(0x81,0x51),
+     o2(0x81,0x52), o2(0x81,0x53), o2(0x81,0x54), o2(0x81,0x55),
+     o2(0x81,0x56), o2(0xB0,0xB7), o2(0xB0,0xB8), o2(0x81,0x57),
+     o2(0xB0,0xB9), o2(0xB0,0xBA), o2(0xB0,0xBB), o2(0x81,0x58),
+     o2(0x81,0x59), o2(0x81,0x5A), o2(0x81,0x61), o2(0x81,0x62),
+     o2(0x81,0x63), o2(0xB0,0xBC), o2(0xB0,0xBD), o2(0x81,0x64),
+     o2(0x81,0x65), o2(0xB0,0xBE), o2(0x81,0x66), o2(0x81,0x67),
+     o2(0x81,0x68),
+
+#define to_CP949_EA_B0 WORDINDEX2INFO(19746)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B0_infos,
+
+#define to_CP949_EA_B1_infos WORDINDEX2INFO(19748)
+           INVALID, o2(0xB0,0xBF), o2(0x81,0x69), o2(0x81,0x6A),
+     o2(0x81,0x6B), o2(0x81,0x6C), o2(0x81,0x6D), o2(0x81,0x6E),
+     o2(0x81,0x6F), o2(0x81,0x70), o2(0x81,0x71), o2(0x81,0x72),
+     o2(0xB0,0xC0), o2(0x81,0x73), o2(0xB0,0xC1), o2(0x81,0x74),
+     o2(0x81,0x75), o2(0x81,0x76), o2(0x81,0x77), o2(0x81,0x78),
+     o2(0x81,0x79), o2(0xB0,0xC2), o2(0x81,0x7A), o2(0x81,0x81),
+     o2(0x81,0x82), o2(0xB0,0xC3), o2(0x81,0x83), o2(0x81,0x84),
+     o2(0x81,0x85), o2(0xB0,0xC4), o2(0x81,0x86), o2(0x81,0x87),
+     o2(0x81,0x88), o2(0x81,0x89), o2(0x81,0x8A), o2(0x81,0x8B),
+     o2(0x81,0x8C), o2(0x81,0x8D), o2(0x81,0x8E), o2(0x81,0x8F),
+     o2(0x81,0x90), o2(0x81,0x91), o2(0x81,0x92), o2(0x81,0x93),
+     o2(0x81,0x94), o2(0x81,0x95), o2(0x81,0x96), o2(0x81,0x97),
+     o2(0x81,0x98), o2(0xB0,0xC5), o2(0xB0,0xC6), o2(0x81,0x99),
+     o2(0x81,0x9A), o2(0xB0,0xC7), o2(0x81,0x9B), o2(0x81,0x9C),
+     o2(0xB0,0xC8), o2(0xB0,0xC9), o2(0x81,0x9D), o2(0xB0,0xCA),
+     o2(0x81,0x9E), o2(0x81,0x9F), o2(0x81,0xA0), o2(0x81,0xA1),
+     o2(0x81,0xA2),
+
+#define to_CP949_EA_B1 WORDINDEX2INFO(19813)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B1_infos,
+
+#define to_CP949_EA_B2_infos WORDINDEX2INFO(19815)
+           INVALID, o2(0xB0,0xCB), o2(0xB0,0xCC), o2(0x81,0xA3),
+     o2(0xB0,0xCD), o2(0xB0,0xCE), o2(0xB0,0xCF), o2(0xB0,0xD0),
+     o2(0x81,0xA4), o2(0x81,0xA5), o2(0xB0,0xD1), o2(0xB0,0xD2),
+     o2(0xB0,0xD3), o2(0xB0,0xD4), o2(0x81,0xA6), o2(0x81,0xA7),
+     o2(0x81,0xA8), o2(0xB0,0xD5), o2(0x81,0xA9), o2(0x81,0xAA),
+     o2(0x81,0xAB), o2(0xB0,0xD6), o2(0x81,0xAC), o2(0x81,0xAD),
+     o2(0x81,0xAE), o2(0x81,0xAF), o2(0x81,0xB0), o2(0x81,0xB1),
+     o2(0x81,0xB2), o2(0xB0,0xD7), o2(0xB0,0xD8), o2(0x81,0xB3),
+     o2(0xB0,0xD9), o2(0xB0,0xDA), o2(0xB0,0xDB), o2(0x81,0xB4),
+     o2(0x81,0xB5), o2(0x81,0xB6), o2(0x81,0xB7), o2(0x81,0xB8),
+     o2(0x81,0xB9), o2(0xB0,0xDC), o2(0xB0,0xDD), o2(0xB0,0xDE),
+     o2(0x81,0xBA), o2(0xB0,0xDF), o2(0x81,0xBB), o2(0x81,0xBC),
+     o2(0xB0,0xE0), o2(0xB0,0xE1), o2(0x81,0xBD), o2(0x81,0xBE),
+     o2(0x81,0xBF), o2(0x81,0xC0), o2(0x81,0xC1), o2(0x81,0xC2),
+     o2(0x81,0xC3), o2(0xB0,0xE2), o2(0xB0,0xE3), o2(0x81,0xC4),
+     o2(0xB0,0xE4), o2(0xB0,0xE5), o2(0xB0,0xE6), o2(0x81,0xC5),
+     o2(0x81,0xC6),
+
+#define to_CP949_EA_B2 WORDINDEX2INFO(19880)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B2_infos,
+
+#define to_CP949_EA_B3_infos WORDINDEX2INFO(19882)
+           INVALID, o2(0x81,0xC7), o2(0xB0,0xE7), o2(0x81,0xC8),
+     o2(0x81,0xC9), o2(0xB0,0xE8), o2(0x81,0xCA), o2(0x81,0xCB),
+     o2(0x81,0xCC), o2(0xB0,0xE9), o2(0x81,0xCD), o2(0x81,0xCE),
+     o2(0x81,0xCF), o2(0xB0,0xEA), o2(0x81,0xD0), o2(0x81,0xD1),
+     o2(0x81,0xD2), o2(0x81,0xD3), o2(0x81,0xD4), o2(0x81,0xD5),
+     o2(0x81,0xD6), o2(0x81,0xD7), o2(0xB0,0xEB), o2(0x81,0xD8),
+     o2(0xB0,0xEC), o2(0x81,0xD9), o2(0x81,0xDA), o2(0x81,0xDB),
+     o2(0x81,0xDC), o2(0x81,0xDD), o2(0x81,0xDE), o2(0x81,0xDF),
+     o2(0x81,0xE0), o2(0xB0,0xED), o2(0xB0,0xEE), o2(0x81,0xE1),
+     o2(0x81,0xE2), o2(0xB0,0xEF), o2(0x81,0xE3), o2(0x81,0xE4),
+     o2(0xB0,0xF0), o2(0xB0,0xF1), o2(0x81,0xE5), o2(0xB0,0xF2),
+     o2(0x81,0xE6), o2(0xB0,0xF3), o2(0x81,0xE7), o2(0x81,0xE8),
+     o2(0xB0,0xF4), o2(0xB0,0xF5), o2(0xB0,0xF6), o2(0x81,0xE9),
+     o2(0xB0,0xF7), o2(0x81,0xEA), o2(0xB0,0xF8), o2(0xB0,0xF9),
+     o2(0x81,0xEB), o2(0x81,0xEC), o2(0x81,0xED), o2(0x81,0xEE),
+     o2(0x81,0xEF), o2(0xB0,0xFA), o2(0xB0,0xFB), o2(0x81,0xF0),
+     o2(0x81,0xF1),
+
+#define to_CP949_EA_B3 WORDINDEX2INFO(19947)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B3_infos,
+
+#define to_CP949_EA_B4_infos WORDINDEX2INFO(19949)
+           INVALID, o2(0xB0,0xFC), o2(0x81,0xF2), o2(0x81,0xF3),
+     o2(0x81,0xF4), o2(0xB0,0xFD), o2(0x81,0xF5), o2(0xB0,0xFE),
+     o2(0x81,0xF6), o2(0x81,0xF7), o2(0x81,0xF8), o2(0x81,0xF9),
+     o2(0x81,0xFA), o2(0xB1,0xA1), o2(0xB1,0xA2), o2(0x81,0xFB),
+     o2(0xB1,0xA3), o2(0x81,0xFC), o2(0xB1,0xA4), o2(0x81,0xFD),
+     o2(0x81,0xFE), o2(0x82,0x41), o2(0x82,0x42), o2(0x82,0x43),
+     o2(0x82,0x44), o2(0xB1,0xA5), o2(0x82,0x45), o2(0x82,0x46),
+     o2(0x82,0x47), o2(0xB1,0xA6), o2(0x82,0x48), o2(0x82,0x49),
+     o2(0x82,0x4A), o2(0xB1,0xA7), o2(0x82,0x4B), o2(0x82,0x4C),
+     o2(0x82,0x4D), o2(0x82,0x4E), o2(0x82,0x4F), o2(0x82,0x50),
+     o2(0x82,0x51), o2(0x82,0x52), o2(0xB1,0xA8), o2(0x82,0x53),
+     o2(0x82,0x54), o2(0xB1,0xA9), o2(0xB1,0xAA), o2(0x82,0x55),
+     o2(0x82,0x56), o2(0x82,0x57), o2(0x82,0x58), o2(0x82,0x59),
+     o2(0x82,0x5A), o2(0xB1,0xAB), o2(0xB1,0xAC), o2(0x82,0x61),
+     o2(0x82,0x62), o2(0xB1,0xAD), o2(0x82,0x63), o2(0x82,0x64),
+     o2(0x82,0x65), o2(0xB1,0xAE), o2(0x82,0x66), o2(0x82,0x67),
+     o2(0x82,0x68),
+
+#define to_CP949_EA_B4 WORDINDEX2INFO(20014)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B4_infos,
+
+#define to_CP949_EA_B5_infos WORDINDEX2INFO(20016)
+           INVALID, o2(0x82,0x69), o2(0x82,0x6A), o2(0x82,0x6B),
+     o2(0x82,0x6C), o2(0xB1,0xAF), o2(0xB1,0xB0), o2(0x82,0x6D),
+     o2(0xB1,0xB1), o2(0x82,0x6E), o2(0xB1,0xB2), o2(0x82,0x6F),
+     o2(0x82,0x70), o2(0x82,0x71), o2(0x82,0x72), o2(0x82,0x73),
+     o2(0x82,0x74), o2(0xB1,0xB3), o2(0x82,0x75), o2(0x82,0x76),
+     o2(0x82,0x77), o2(0xB1,0xB4), o2(0x82,0x78), o2(0x82,0x79),
+     o2(0x82,0x7A), o2(0xB1,0xB5), o2(0x82,0x81), o2(0x82,0x82),
+     o2(0x82,0x83), o2(0x82,0x84), o2(0x82,0x85), o2(0x82,0x86),
+     o2(0x82,0x87), o2(0x82,0x88), o2(0xB1,0xB6), o2(0x82,0x89),
+     o2(0xB1,0xB7), o2(0x82,0x8A), o2(0x82,0x8B), o2(0x82,0x8C),
+     o2(0x82,0x8D), o2(0x82,0x8E), o2(0x82,0x8F), o2(0x82,0x90),
+     o2(0x82,0x91), o2(0xB1,0xB8), o2(0xB1,0xB9), o2(0x82,0x92),
+     o2(0x82,0x93), o2(0xB1,0xBA), o2(0x82,0x94), o2(0x82,0x95),
+     o2(0xB1,0xBB), o2(0xB1,0xBC), o2(0xB1,0xBD), o2(0xB1,0xBE),
+     o2(0x82,0x96), o2(0x82,0x97), o2(0x82,0x98), o2(0x82,0x99),
+     o2(0xB1,0xBF), o2(0xB1,0xC0), o2(0xB1,0xC1), o2(0x82,0x9A),
+     o2(0xB1,0xC2),
+
+#define to_CP949_EA_B5 WORDINDEX2INFO(20081)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B5_infos,
+
+#define to_CP949_EA_B6_infos WORDINDEX2INFO(20083)
+           INVALID, o2(0x82,0x9B), o2(0xB1,0xC3), o2(0xB1,0xC4),
+     o2(0x82,0x9C), o2(0x82,0x9D), o2(0x82,0x9E), o2(0x82,0x9F),
+     o2(0x82,0xA0), o2(0xB1,0xC5), o2(0xB1,0xC6), o2(0x82,0xA1),
+     o2(0x82,0xA2), o2(0xB1,0xC7), o2(0x82,0xA3), o2(0x82,0xA4),
+     o2(0x82,0xA5), o2(0xB1,0xC8), o2(0x82,0xA6), o2(0x82,0xA7),
+     o2(0x82,0xA8), o2(0x82,0xA9), o2(0x82,0xAA), o2(0x82,0xAB),
+     o2(0x82,0xAC), o2(0x82,0xAD), o2(0x82,0xAE), o2(0x82,0xAF),
+     o2(0x82,0xB0), o2(0xB1,0xC9), o2(0xB1,0xCA), o2(0x82,0xB1),
+     o2(0x82,0xB2), o2(0x82,0xB3), o2(0x82,0xB4), o2(0x82,0xB5),
+     o2(0x82,0xB6), o2(0xB1,0xCB), o2(0x82,0xB7), o2(0x82,0xB8),
+     o2(0x82,0xB9), o2(0x82,0xBA), o2(0x82,0xBB), o2(0x82,0xBC),
+     o2(0x82,0xBD), o2(0x82,0xBE), o2(0x82,0xBF), o2(0x82,0xC0),
+     o2(0x82,0xC1), o2(0x82,0xC2), o2(0x82,0xC3), o2(0x82,0xC4),
+     o2(0x82,0xC5), o2(0x82,0xC6), o2(0x82,0xC7), o2(0x82,0xC8),
+     o2(0xB1,0xCC), o2(0x82,0xC9), o2(0x82,0xCA), o2(0x82,0xCB),
+     o2(0x82,0xCC), o2(0x82,0xCD), o2(0x82,0xCE), o2(0x82,0xCF),
+     o2(0x82,0xD0),
+
+#define to_CP949_EA_B6 WORDINDEX2INFO(20148)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B6_infos,
+
+#define to_CP949_EA_B7_infos WORDINDEX2INFO(20150)
+           INVALID, o2(0xB1,0xCD), o2(0xB1,0xCE), o2(0x82,0xD1),
+     o2(0x82,0xD2), o2(0xB1,0xCF), o2(0x82,0xD3), o2(0x82,0xD4),
+     o2(0x82,0xD5), o2(0xB1,0xD0), o2(0x82,0xD6), o2(0x82,0xD7),
+     o2(0x82,0xD8), o2(0x82,0xD9), o2(0x82,0xDA), o2(0x82,0xDB),
+     o2(0x82,0xDC), o2(0xB1,0xD1), o2(0xB1,0xD2), o2(0x82,0xDD),
+     o2(0xB1,0xD3), o2(0x82,0xDE), o2(0x82,0xDF), o2(0x82,0xE0),
+     o2(0x82,0xE1), o2(0x82,0xE2), o2(0x82,0xE3), o2(0x82,0xE4),
+     o2(0x82,0xE5), o2(0xB1,0xD4), o2(0x82,0xE6), o2(0x82,0xE7),
+     o2(0x82,0xE8), o2(0xB1,0xD5), o2(0x82,0xE9), o2(0x82,0xEA),
+     o2(0x82,0xEB), o2(0xB1,0xD6), o2(0x82,0xEC), o2(0x82,0xED),
+     o2(0x82,0xEE), o2(0x82,0xEF), o2(0x82,0xF0), o2(0x82,0xF1),
+     o2(0x82,0xF2), o2(0x82,0xF3), o2(0x82,0xF4), o2(0x82,0xF5),
+     o2(0x82,0xF6), o2(0x82,0xF7), o2(0x82,0xF8), o2(0x82,0xF9),
+     o2(0x82,0xFA), o2(0x82,0xFB), o2(0x82,0xFC), o2(0x82,0xFD),
+     o2(0x82,0xFE), o2(0xB1,0xD7), o2(0xB1,0xD8), o2(0x83,0x41),
+     o2(0x83,0x42), o2(0xB1,0xD9), o2(0x83,0x43), o2(0x83,0x44),
+     o2(0xB1,0xDA),
+
+#define to_CP949_EA_B7 WORDINDEX2INFO(20215)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B7_infos,
+
+#define to_CP949_EA_B8_infos WORDINDEX2INFO(20217)
+           INVALID, o2(0xB1,0xDB), o2(0xB1,0xDC), o2(0x83,0x45),
+     o2(0x83,0x46), o2(0x83,0x47), o2(0x83,0x48), o2(0x83,0x49),
+     o2(0x83,0x4A), o2(0xB1,0xDD), o2(0xB1,0xDE), o2(0x83,0x4B),
+     o2(0xB1,0xDF), o2(0x83,0x4C), o2(0xB1,0xE0), o2(0x83,0x4D),
+     o2(0x83,0x4E), o2(0x83,0x4F), o2(0x83,0x50), o2(0x83,0x51),
+     o2(0x83,0x52), o2(0xB1,0xE1), o2(0x83,0x53), o2(0x83,0x54),
+     o2(0x83,0x55), o2(0x83,0x56), o2(0x83,0x57), o2(0x83,0x58),
+     o2(0x83,0x59), o2(0x83,0x5A), o2(0x83,0x61), o2(0x83,0x62),
+     o2(0x83,0x63), o2(0x83,0x64), o2(0x83,0x65), o2(0x83,0x66),
+     o2(0x83,0x67), o2(0x83,0x68), o2(0x83,0x69), o2(0x83,0x6A),
+     o2(0x83,0x6B), o2(0x83,0x6C), o2(0x83,0x6D), o2(0x83,0x6E),
+     o2(0x83,0x6F), o2(0x83,0x70), o2(0x83,0x71), o2(0x83,0x72),
+     o2(0x83,0x73), o2(0xB1,0xE2), o2(0xB1,0xE3), o2(0x83,0x74),
+     o2(0x83,0x75), o2(0xB1,0xE4), o2(0x83,0x76), o2(0x83,0x77),
+     o2(0xB1,0xE5), o2(0xB1,0xE6), o2(0x83,0x78), o2(0xB1,0xE7),
+     o2(0x83,0x79), o2(0x83,0x7A), o2(0x83,0x81), o2(0x83,0x82),
+     o2(0x83,0x83),
+
+#define to_CP949_EA_B8 WORDINDEX2INFO(20282)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B8_infos,
+
+#define to_CP949_EA_B9_infos WORDINDEX2INFO(20284)
+           INVALID, o2(0xB1,0xE8), o2(0xB1,0xE9), o2(0x83,0x84),
+     o2(0xB1,0xEA), o2(0x83,0x85), o2(0xB1,0xEB), o2(0xB1,0xEC),
+     o2(0x83,0x86), o2(0x83,0x87), o2(0x83,0x88), o2(0xB1,0xED),
+     o2(0x83,0x89), o2(0xB1,0xEE), o2(0xB1,0xEF), o2(0xB1,0xF0),
+     o2(0x83,0x8A), o2(0xB1,0xF1), o2(0x83,0x8B), o2(0x83,0x8C),
+     o2(0x83,0x8D), o2(0xB1,0xF2), o2(0x83,0x8E), o2(0xB1,0xF3),
+     o2(0x83,0x8F), o2(0x83,0x90), o2(0x83,0x91), o2(0x83,0x92),
+     o2(0x83,0x93), o2(0xB1,0xF4), o2(0xB1,0xF5), o2(0x83,0x94),
+     o2(0xB1,0xF6), o2(0xB1,0xF7), o2(0xB1,0xF8), o2(0x83,0x95),
+     o2(0x83,0x96), o2(0x83,0x97), o2(0xB1,0xF9), o2(0x83,0x98),
+     o2(0x83,0x99), o2(0xB1,0xFA), o2(0xB1,0xFB), o2(0x83,0x9A),
+     o2(0x83,0x9B), o2(0xB1,0xFC), o2(0x83,0x9C), o2(0x83,0x9D),
+     o2(0x83,0x9E), o2(0xB1,0xFD), o2(0x83,0x9F), o2(0x83,0xA0),
+     o2(0x83,0xA1), o2(0x83,0xA2), o2(0x83,0xA3), o2(0x83,0xA4),
+     o2(0x83,0xA5), o2(0xB1,0xFE), o2(0xB2,0xA1), o2(0x83,0xA6),
+     o2(0xB2,0xA2), o2(0xB2,0xA3), o2(0xB2,0xA4), o2(0x83,0xA7),
+     o2(0x83,0xA8),
+
+#define to_CP949_EA_B9 WORDINDEX2INFO(20349)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_B9_infos,
+
+#define to_CP949_EA_BA_infos WORDINDEX2INFO(20351)
+           INVALID, o2(0x83,0xA9), o2(0x83,0xAA), o2(0x83,0xAB),
+     o2(0x83,0xAC), o2(0xB2,0xA5), o2(0xB2,0xA6), o2(0x83,0xAD),
+     o2(0x83,0xAE), o2(0x83,0xAF), o2(0x83,0xB0), o2(0x83,0xB1),
+     o2(0x83,0xB2), o2(0xB2,0xA7), o2(0x83,0xB3), o2(0x83,0xB4),
+     o2(0x83,0xB5), o2(0x83,0xB6), o2(0x83,0xB7), o2(0x83,0xB8),
+     o2(0x83,0xB9), o2(0x83,0xBA), o2(0x83,0xBB), o2(0x83,0xBC),
+     o2(0x83,0xBD), o2(0x83,0xBE), o2(0x83,0xBF), o2(0x83,0xC0),
+     o2(0x83,0xC1), o2(0x83,0xC2), o2(0x83,0xC3), o2(0x83,0xC4),
+     o2(0x83,0xC5), o2(0x83,0xC6), o2(0x83,0xC7), o2(0x83,0xC8),
+     o2(0x83,0xC9), o2(0x83,0xCA), o2(0x83,0xCB), o2(0x83,0xCC),
+     o2(0x83,0xCD), o2(0x83,0xCE), o2(0x83,0xCF), o2(0x83,0xD0),
+     o2(0x83,0xD1), o2(0x83,0xD2), o2(0x83,0xD3), o2(0x83,0xD4),
+     o2(0x83,0xD5), o2(0x83,0xD6), o2(0x83,0xD7), o2(0x83,0xD8),
+     o2(0x83,0xD9), o2(0x83,0xDA), o2(0x83,0xDB), o2(0x83,0xDC),
+     o2(0x83,0xDD), o2(0x83,0xDE), o2(0x83,0xDF), o2(0x83,0xE0),
+     o2(0x83,0xE1), o2(0xB2,0xA8), o2(0xB2,0xA9), o2(0xB2,0xAA),
+     o2(0x83,0xE2),
+
+#define to_CP949_EA_BA WORDINDEX2INFO(20416)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BA_infos,
+
+#define to_CP949_EA_BB_infos WORDINDEX2INFO(20418)
+           INVALID, o2(0xB2,0xAB), o2(0x83,0xE3), o2(0x83,0xE4),
+     o2(0x83,0xE5), o2(0xB2,0xAC), o2(0x83,0xE6), o2(0x83,0xE7),
+     o2(0x83,0xE8), o2(0x83,0xE9), o2(0x83,0xEA), o2(0x83,0xEB),
+     o2(0x83,0xEC), o2(0xB2,0xAD), o2(0xB2,0xAE), o2(0x83,0xED),
+     o2(0xB2,0xAF), o2(0xB2,0xB0), o2(0xB2,0xB1), o2(0x83,0xEE),
+     o2(0x83,0xEF), o2(0x83,0xF0), o2(0x83,0xF1), o2(0x83,0xF2),
+     o2(0x83,0xF3), o2(0xB2,0xB2), o2(0xB2,0xB3), o2(0x83,0xF4),
+     o2(0x83,0xF5), o2(0xB2,0xB4), o2(0x83,0xF6), o2(0x83,0xF7),
+     o2(0x83,0xF8), o2(0x83,0xF9), o2(0x83,0xFA), o2(0x83,0xFB),
+     o2(0x83,0xFC), o2(0x83,0xFD), o2(0x83,0xFE), o2(0x84,0x41),
+     o2(0x84,0x42), o2(0xB2,0xB5), o2(0x84,0x43), o2(0x84,0x44),
+     o2(0xB2,0xB6), o2(0x84,0x45), o2(0xB2,0xB7), o2(0x84,0x46),
+     o2(0x84,0x47), o2(0x84,0x48), o2(0x84,0x49), o2(0x84,0x4A),
+     o2(0x84,0x4B), o2(0xB2,0xB8), o2(0x84,0x4C), o2(0x84,0x4D),
+     o2(0x84,0x4E), o2(0xB2,0xB9), o2(0x84,0x4F), o2(0x84,0x50),
+     o2(0x84,0x51), o2(0xB2,0xBA), o2(0x84,0x52), o2(0x84,0x53),
+     o2(0x84,0x54),
+
+#define to_CP949_EA_BB WORDINDEX2INFO(20483)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BB_infos,
+
+#define to_CP949_EA_BC_infos WORDINDEX2INFO(20485)
+           INVALID, o2(0x84,0x55), o2(0x84,0x56), o2(0x84,0x57),
+     o2(0x84,0x58), o2(0x84,0x59), o2(0x84,0x5A), o2(0x84,0x61),
+     o2(0xB2,0xBB), o2(0xB2,0xBC), o2(0x84,0x62), o2(0x84,0x63),
+     o2(0x84,0x64), o2(0x84,0x65), o2(0xB2,0xBD), o2(0x84,0x66),
+     o2(0x84,0x67), o2(0xB2,0xBE), o2(0x84,0x68), o2(0x84,0x69),
+     o2(0x84,0x6A), o2(0x84,0x6B), o2(0x84,0x6C), o2(0x84,0x6D),
+     o2(0x84,0x6E), o2(0x84,0x6F), o2(0x84,0x70), o2(0x84,0x71),
+     o2(0x84,0x72), o2(0x84,0x73), o2(0x84,0x74), o2(0x84,0x75),
+     o2(0x84,0x76), o2(0x84,0x77), o2(0x84,0x78), o2(0x84,0x79),
+     o2(0x84,0x7A), o2(0x84,0x81), o2(0x84,0x82), o2(0x84,0x83),
+     o2(0x84,0x84), o2(0x84,0x85), o2(0x84,0x86), o2(0x84,0x87),
+     o2(0x84,0x88), o2(0xB2,0xBF), o2(0xB2,0xC0), o2(0x84,0x89),
+     o2(0x84,0x8A), o2(0xB2,0xC1), o2(0x84,0x8B), o2(0xB2,0xC2),
+     o2(0x84,0x8C), o2(0xB2,0xC3), o2(0x84,0x8D), o2(0x84,0x8E),
+     o2(0x84,0x8F), o2(0x84,0x90), o2(0x84,0x91), o2(0x84,0x92),
+     o2(0x84,0x93), o2(0xB2,0xC4), o2(0xB2,0xC5), o2(0x84,0x94),
+     o2(0xB2,0xC6),
+
+#define to_CP949_EA_BC WORDINDEX2INFO(20550)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BC_infos,
+
+#define to_CP949_EA_BD_infos WORDINDEX2INFO(20552)
+           INVALID, o2(0x84,0x95), o2(0xB2,0xC7), o2(0xB2,0xC8),
+     o2(0xB2,0xC9), o2(0x84,0x96), o2(0x84,0x97), o2(0x84,0x98),
+     o2(0x84,0x99), o2(0xB2,0xCA), o2(0xB2,0xCB), o2(0x84,0x9A),
+     o2(0x84,0x9B), o2(0x84,0x9C), o2(0x84,0x9D), o2(0x84,0x9E),
+     o2(0x84,0x9F), o2(0xB2,0xCC), o2(0x84,0xA0), o2(0x84,0xA1),
+     o2(0x84,0xA2), o2(0x84,0xA3), o2(0x84,0xA4), o2(0x84,0xA5),
+     o2(0x84,0xA6), o2(0x84,0xA7), o2(0x84,0xA8), o2(0x84,0xA9),
+     o2(0x84,0xAA), o2(0xB2,0xCD), o2(0xB2,0xCE), o2(0x84,0xAB),
+     o2(0x84,0xAC), o2(0x84,0xAD), o2(0x84,0xAE), o2(0x84,0xAF),
+     o2(0x84,0xB0), o2(0xB2,0xCF), o2(0xB2,0xD0), o2(0x84,0xB1),
+     o2(0x84,0xB2), o2(0x84,0xB3), o2(0x84,0xB4), o2(0x84,0xB5),
+     o2(0x84,0xB6), o2(0x84,0xB7), o2(0x84,0xB8), o2(0x84,0xB9),
+     o2(0x84,0xBA), o2(0x84,0xBB), o2(0x84,0xBC), o2(0x84,0xBD),
+     o2(0x84,0xBE), o2(0x84,0xBF), o2(0x84,0xC0), o2(0x84,0xC1),
+     o2(0x84,0xC2), o2(0x84,0xC3), o2(0xB2,0xD1), o2(0x84,0xC4),
+     o2(0x84,0xC5), o2(0x84,0xC6), o2(0x84,0xC7), o2(0x84,0xC8),
+     o2(0x84,0xC9),
+
+#define to_CP949_EA_BD WORDINDEX2INFO(20617)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BD_infos,
+
+#define to_CP949_EA_BE_infos WORDINDEX2INFO(20619)
+           INVALID, o2(0xB2,0xD2), o2(0x84,0xCA), o2(0x84,0xCB),
+     o2(0x84,0xCC), o2(0xB2,0xD3), o2(0x84,0xCD), o2(0x84,0xCE),
+     o2(0x84,0xCF), o2(0xB2,0xD4), o2(0x84,0xD0), o2(0x84,0xD1),
+     o2(0x84,0xD2), o2(0x84,0xD3), o2(0x84,0xD4), o2(0x84,0xD5),
+     o2(0x84,0xD6), o2(0xB2,0xD5), o2(0xB2,0xD6), o2(0x84,0xD7),
+     o2(0x84,0xD8), o2(0x84,0xD9), o2(0xB2,0xD7), o2(0x84,0xDA),
+     o2(0x84,0xDB), o2(0x84,0xDC), o2(0x84,0xDD), o2(0x84,0xDE),
+     o2(0x84,0xDF), o2(0xB2,0xD8), o2(0x84,0xE0), o2(0x84,0xE1),
+     o2(0x84,0xE2), o2(0x84,0xE3), o2(0x84,0xE4), o2(0x84,0xE5),
+     o2(0x84,0xE6), o2(0x84,0xE7), o2(0x84,0xE8), o2(0x84,0xE9),
+     o2(0x84,0xEA), o2(0x84,0xEB), o2(0x84,0xEC), o2(0x84,0xED),
+     o2(0x84,0xEE), o2(0x84,0xEF), o2(0x84,0xF0), o2(0x84,0xF1),
+     o2(0x84,0xF2), o2(0x84,0xF3), o2(0x84,0xF4), o2(0x84,0xF5),
+     o2(0x84,0xF6), o2(0x84,0xF7), o2(0x84,0xF8), o2(0x84,0xF9),
+     o2(0x84,0xFA), o2(0xB2,0xD9), o2(0xB2,0xDA), o2(0x84,0xFB),
+     o2(0x84,0xFC), o2(0xB2,0xDB), o2(0x84,0xFD), o2(0x84,0xFE),
+     o2(0x85,0x41),
+
+#define to_CP949_EA_BE WORDINDEX2INFO(20684)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BE_infos,
+
+#define to_CP949_EA_BF_infos WORDINDEX2INFO(20686)
+           INVALID, o2(0xB2,0xDC), o2(0x85,0x42), o2(0x85,0x43),
+     o2(0x85,0x44), o2(0x85,0x45), o2(0x85,0x46), o2(0x85,0x47),
+     o2(0xB2,0xDD), o2(0xB2,0xDE), o2(0xB2,0xDF), o2(0x85,0x48),
+     o2(0xB2,0xE0), o2(0x85,0x49), o2(0xB2,0xE1), o2(0xB2,0xE2),
+     o2(0x85,0x4A), o2(0x85,0x4B), o2(0x85,0x4C), o2(0x85,0x4D),
+     o2(0x85,0x4E), o2(0xB2,0xE3), o2(0x85,0x4F), o2(0x85,0x50),
+     o2(0x85,0x51), o2(0x85,0x52), o2(0x85,0x53), o2(0x85,0x54),
+     o2(0x85,0x55), o2(0xB2,0xE4), o2(0x85,0x56), o2(0x85,0x57),
+     o2(0x85,0x58), o2(0x85,0x59), o2(0x85,0x5A), o2(0x85,0x61),
+     o2(0x85,0x62), o2(0x85,0x63), o2(0x85,0x64), o2(0x85,0x65),
+     o2(0x85,0x66), o2(0xB2,0xE5), o2(0xB2,0xE6), o2(0x85,0x67),
+     o2(0x85,0x68), o2(0x85,0x69), o2(0x85,0x6A), o2(0x85,0x6B),
+     o2(0x85,0x6C), o2(0xB2,0xE7), o2(0xB2,0xE8), o2(0x85,0x6D),
+     o2(0x85,0x6E), o2(0xB2,0xE9), o2(0x85,0x6F), o2(0x85,0x70),
+     o2(0x85,0x71), o2(0xB2,0xEA), o2(0x85,0x72), o2(0x85,0x73),
+     o2(0x85,0x74), o2(0x85,0x75), o2(0x85,0x76), o2(0x85,0x77),
+     o2(0x85,0x78),
+
+#define to_CP949_EA_BF WORDINDEX2INFO(20751)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EA_BF_infos,
+
+#define to_CP949_EA_infos WORDINDEX2INFO(20753)
+            INVALID,   to_EUC_KR_C6, to_CP949_EA_B0, to_CP949_EA_B1,
+     to_CP949_EA_B2, to_CP949_EA_B3, to_CP949_EA_B4, to_CP949_EA_B5,
+     to_CP949_EA_B6, to_CP949_EA_B7, to_CP949_EA_B8, to_CP949_EA_B9,
+     to_CP949_EA_BA, to_CP949_EA_BB, to_CP949_EA_BC, to_CP949_EA_BD,
+     to_CP949_EA_BE, to_CP949_EA_BF,
+
+#define to_CP949_EA WORDINDEX2INFO(20771)
+    to_EUC_KR_EA_offsets,
+    to_CP949_EA_infos,
+
+#define to_CP949_EB_80_infos WORDINDEX2INFO(20773)
+           INVALID, o2(0xB2,0xEB), o2(0xB2,0xEC), o2(0x85,0x79),
+     o2(0x85,0x7A), o2(0xB2,0xED), o2(0x85,0x81), o2(0x85,0x82),
+     o2(0x85,0x83), o2(0x85,0x84), o2(0x85,0x85), o2(0x85,0x86),
+     o2(0x85,0x87), o2(0xB2,0xEE), o2(0x85,0x88), o2(0x85,0x89),
+     o2(0x85,0x8A), o2(0xB2,0xEF), o2(0x85,0x8B), o2(0x85,0x8C),
+     o2(0x85,0x8D), o2(0xB2,0xF0), o2(0x85,0x8E), o2(0x85,0x8F),
+     o2(0x85,0x90), o2(0x85,0x91), o2(0x85,0x92), o2(0x85,0x93),
+     o2(0x85,0x94), o2(0xB2,0xF1), o2(0xB2,0xF2), o2(0x85,0x95),
+     o2(0x85,0x96), o2(0x85,0x97), o2(0x85,0x98), o2(0x85,0x99),
+     o2(0x85,0x9A), o2(0x85,0x9B), o2(0x85,0x9C), o2(0x85,0x9D),
+     o2(0x85,0x9E), o2(0xB2,0xF3), o2(0x85,0x9F), o2(0x85,0xA0),
+     o2(0x85,0xA1), o2(0x85,0xA2), o2(0x85,0xA3), o2(0x85,0xA4),
+     o2(0x85,0xA5), o2(0x85,0xA6), o2(0x85,0xA7), o2(0x85,0xA8),
+     o2(0x85,0xA9), o2(0x85,0xAA), o2(0x85,0xAB), o2(0x85,0xAC),
+     o2(0x85,0xAD), o2(0x85,0xAE), o2(0x85,0xAF), o2(0x85,0xB0),
+     o2(0x85,0xB1), o2(0x85,0xB2), o2(0x85,0xB3), o2(0x85,0xB4),
+     o2(0x85,0xB5),
+
+#define to_CP949_EB_80 WORDINDEX2INFO(20838)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_80_infos,
+
+#define to_CP949_EB_81_infos WORDINDEX2INFO(20840)
+           INVALID, o2(0x85,0xB6), o2(0x85,0xB7), o2(0x85,0xB8),
+     o2(0x85,0xB9), o2(0xB2,0xF4), o2(0xB2,0xF5), o2(0x85,0xBA),
+     o2(0x85,0xBB), o2(0xB2,0xF6), o2(0x85,0xBC), o2(0xB2,0xF7),
+     o2(0x85,0xBD), o2(0xB2,0xF8), o2(0x85,0xBE), o2(0xB2,0xF9),
+     o2(0x85,0xBF), o2(0x85,0xC0), o2(0x85,0xC1), o2(0x85,0xC2),
+     o2(0xB2,0xFA), o2(0xB2,0xFB), o2(0xB2,0xFC), o2(0x85,0xC3),
+     o2(0xB2,0xFD), o2(0x85,0xC4), o2(0xB2,0xFE), o2(0x85,0xC5),
+     o2(0x85,0xC6), o2(0x85,0xC7), o2(0xB3,0xA1), o2(0x85,0xC8),
+     o2(0x85,0xC9), o2(0x85,0xCA), o2(0x85,0xCB), o2(0x85,0xCC),
+     o2(0x85,0xCD), o2(0x85,0xCE), o2(0x85,0xCF), o2(0x85,0xD0),
+     o2(0x85,0xD1), o2(0x85,0xD2), o2(0x85,0xD3), o2(0x85,0xD4),
+     o2(0x85,0xD5), o2(0x85,0xD6), o2(0x85,0xD7), o2(0x85,0xD8),
+     o2(0x85,0xD9), o2(0x85,0xDA), o2(0x85,0xDB), o2(0x85,0xDC),
+     o2(0x85,0xDD), o2(0x85,0xDE), o2(0x85,0xDF), o2(0x85,0xE0),
+     o2(0x85,0xE1), o2(0x85,0xE2), o2(0x85,0xE3), o2(0x85,0xE4),
+     o2(0x85,0xE5), o2(0xB3,0xA2), o2(0xB3,0xA3), o2(0x85,0xE6),
+     o2(0x85,0xE7),
+
+#define to_CP949_EB_81 WORDINDEX2INFO(20905)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_81_infos,
+
+#define to_CP949_EB_82_infos WORDINDEX2INFO(20907)
+           INVALID, o2(0xB3,0xA4), o2(0x85,0xE8), o2(0x85,0xE9),
+     o2(0x85,0xEA), o2(0xB3,0xA5), o2(0x85,0xEB), o2(0x85,0xEC),
+     o2(0x85,0xED), o2(0x85,0xEE), o2(0x85,0xEF), o2(0x85,0xF0),
+     o2(0x85,0xF1), o2(0xB3,0xA6), o2(0xB3,0xA7), o2(0x85,0xF2),
+     o2(0xB3,0xA8), o2(0x85,0xF3), o2(0xB3,0xA9), o2(0x85,0xF4),
+     o2(0x85,0xF5), o2(0x85,0xF6), o2(0x85,0xF7), o2(0x85,0xF8),
+     o2(0x85,0xF9), o2(0xB3,0xAA), o2(0xB3,0xAB), o2(0xB3,0xAC),
+     o2(0x85,0xFA), o2(0xB3,0xAD), o2(0x85,0xFB), o2(0x85,0xFC),
+     o2(0xB3,0xAE), o2(0xB3,0xAF), o2(0xB3,0xB0), o2(0xB3,0xB1),
+     o2(0x85,0xFD), o2(0x85,0xFE), o2(0x86,0x41), o2(0x86,0x42),
+     o2(0x86,0x43), o2(0xB3,0xB2), o2(0xB3,0xB3), o2(0x86,0x44),
+     o2(0xB3,0xB4), o2(0xB3,0xB5), o2(0xB3,0xB6), o2(0xB3,0xB7),
+     o2(0xB3,0xB8), o2(0x86,0x45), o2(0xB3,0xB9), o2(0x86,0x46),
+     o2(0xB3,0xBA), o2(0xB3,0xBB), o2(0xB3,0xBC), o2(0x86,0x47),
+     o2(0x86,0x48), o2(0xB3,0xBD), o2(0x86,0x49), o2(0x86,0x4A),
+     o2(0x86,0x4B), o2(0xB3,0xBE), o2(0x86,0x4C), o2(0x86,0x4D),
+     o2(0x86,0x4E),
+
+#define to_CP949_EB_82 WORDINDEX2INFO(20972)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_82_infos,
+
+#define to_CP949_EB_83_infos WORDINDEX2INFO(20974)
+           INVALID, o2(0x86,0x4F), o2(0x86,0x50), o2(0x86,0x51),
+     o2(0x86,0x52), o2(0xB3,0xBF), o2(0xB3,0xC0), o2(0x86,0x53),
+     o2(0xB3,0xC1), o2(0xB3,0xC2), o2(0xB3,0xC3), o2(0x86,0x54),
+     o2(0x86,0x55), o2(0x86,0x56), o2(0x86,0x57), o2(0x86,0x58),
+     o2(0x86,0x59), o2(0xB3,0xC4), o2(0xB3,0xC5), o2(0x86,0x5A),
+     o2(0x86,0x61), o2(0xB3,0xC6), o2(0x86,0x62), o2(0x86,0x63),
+     o2(0x86,0x64), o2(0xB3,0xC7), o2(0x86,0x65), o2(0x86,0x66),
+     o2(0x86,0x67), o2(0x86,0x68), o2(0x86,0x69), o2(0x86,0x6A),
+     o2(0x86,0x6B), o2(0xB3,0xC8), o2(0x86,0x6C), o2(0x86,0x6D),
+     o2(0x86,0x6E), o2(0x86,0x6F), o2(0xB3,0xC9), o2(0x86,0x70),
+     o2(0x86,0x71), o2(0x86,0x72), o2(0x86,0x73), o2(0x86,0x74),
+     o2(0x86,0x75), o2(0x86,0x76), o2(0x86,0x77), o2(0x86,0x78),
+     o2(0x86,0x79), o2(0x86,0x7A), o2(0x86,0x81), o2(0x86,0x82),
+     o2(0x86,0x83), o2(0x86,0x84), o2(0x86,0x85), o2(0x86,0x86),
+     o2(0x86,0x87), o2(0x86,0x88), o2(0x86,0x89), o2(0x86,0x8A),
+     o2(0x86,0x8B), o2(0x86,0x8C), o2(0x86,0x8D), o2(0x86,0x8E),
+     o2(0x86,0x8F),
+
+#define to_CP949_EB_83 WORDINDEX2INFO(21039)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_83_infos,
+
+#define to_CP949_EB_84_infos WORDINDEX2INFO(21041)
+           INVALID, o2(0x86,0x90), o2(0x86,0x91), o2(0x86,0x92),
+     o2(0x86,0x93), o2(0x86,0x94), o2(0x86,0x95), o2(0x86,0x96),
+     o2(0x86,0x97), o2(0xB3,0xCA), o2(0xB3,0xCB), o2(0x86,0x98),
+     o2(0xB3,0xCC), o2(0xB3,0xCD), o2(0x86,0x99), o2(0x86,0x9A),
+     o2(0x86,0x9B), o2(0xB3,0xCE), o2(0x86,0x9C), o2(0xB3,0xCF),
+     o2(0xB3,0xD0), o2(0x86,0x9D), o2(0x86,0x9E), o2(0x86,0x9F),
+     o2(0x86,0xA0), o2(0xB3,0xD1), o2(0xB3,0xD2), o2(0x86,0xA1),
+     o2(0xB3,0xD3), o2(0xB3,0xD4), o2(0xB3,0xD5), o2(0x86,0xA2),
+     o2(0x86,0xA3), o2(0x86,0xA4), o2(0x86,0xA5), o2(0x86,0xA6),
+     o2(0xB3,0xD6), o2(0xB3,0xD7), o2(0xB3,0xD8), o2(0x86,0xA7),
+     o2(0x86,0xA8), o2(0xB3,0xD9), o2(0x86,0xA9), o2(0x86,0xAA),
+     o2(0x86,0xAB), o2(0xB3,0xDA), o2(0x86,0xAC), o2(0x86,0xAD),
+     o2(0x86,0xAE), o2(0x86,0xAF), o2(0x86,0xB0), o2(0x86,0xB1),
+     o2(0x86,0xB2), o2(0xB3,0xDB), o2(0xB3,0xDC), o2(0x86,0xB3),
+     o2(0xB3,0xDD), o2(0xB3,0xDE), o2(0xB3,0xDF), o2(0x86,0xB4),
+     o2(0x86,0xB5), o2(0x86,0xB6), o2(0x86,0xB7), o2(0x86,0xB8),
+     o2(0x86,0xB9),
+
+#define to_CP949_EB_84 WORDINDEX2INFO(21106)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_84_infos,
+
+#define to_CP949_EB_85_infos WORDINDEX2INFO(21108)
+           INVALID, o2(0xB3,0xE0), o2(0xB3,0xE1), o2(0x86,0xBA),
+     o2(0x86,0xBB), o2(0xB3,0xE2), o2(0x86,0xBC), o2(0x86,0xBD),
+     o2(0x86,0xBE), o2(0xB3,0xE3), o2(0x86,0xBF), o2(0x86,0xC0),
+     o2(0x86,0xC1), o2(0x86,0xC2), o2(0x86,0xC3), o2(0x86,0xC4),
+     o2(0x86,0xC5), o2(0xB3,0xE4), o2(0xB3,0xE5), o2(0x86,0xC6),
+     o2(0x86,0xC7), o2(0xB3,0xE6), o2(0xB3,0xE7), o2(0x86,0xC8),
+     o2(0x86,0xC9), o2(0xB3,0xE8), o2(0x86,0xCA), o2(0x86,0xCB),
+     o2(0x86,0xCC), o2(0xB3,0xE9), o2(0x86,0xCD), o2(0x86,0xCE),
+     o2(0x86,0xCF), o2(0xB3,0xEA), o2(0x86,0xD0), o2(0x86,0xD1),
+     o2(0x86,0xD2), o2(0x86,0xD3), o2(0x86,0xD4), o2(0x86,0xD5),
+     o2(0x86,0xD6), o2(0x86,0xD7), o2(0x86,0xD8), o2(0x86,0xD9),
+     o2(0x86,0xDA), o2(0x86,0xDB), o2(0x86,0xDC), o2(0x86,0xDD),
+     o2(0x86,0xDE), o2(0x86,0xDF), o2(0x86,0xE0), o2(0x86,0xE1),
+     o2(0x86,0xE2), o2(0x86,0xE3), o2(0x86,0xE4), o2(0x86,0xE5),
+     o2(0x86,0xE6), o2(0xB3,0xEB), o2(0xB3,0xEC), o2(0x86,0xE7),
+     o2(0x86,0xE8), o2(0xB3,0xED), o2(0x86,0xE9), o2(0x86,0xEA),
+     o2(0x86,0xEB),
+
+#define to_CP949_EB_85 WORDINDEX2INFO(21173)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_85_infos,
+
+#define to_CP949_EB_86_infos WORDINDEX2INFO(21175)
+           INVALID, o2(0xB3,0xEE), o2(0x86,0xEC), o2(0xB3,0xEF),
+     o2(0x86,0xED), o2(0x86,0xEE), o2(0x86,0xEF), o2(0x86,0xF0),
+     o2(0x86,0xF1), o2(0xB3,0xF0), o2(0xB3,0xF1), o2(0x86,0xF2),
+     o2(0xB3,0xF2), o2(0x86,0xF3), o2(0xB3,0xF3), o2(0x86,0xF4),
+     o2(0x86,0xF5), o2(0x86,0xF6), o2(0x86,0xF7), o2(0xB3,0xF4),
+     o2(0xB3,0xF5), o2(0xB3,0xF6), o2(0x86,0xF8), o2(0x86,0xF9),
+     o2(0x86,0xFA), o2(0xB3,0xF7), o2(0x86,0xFB), o2(0x86,0xFC),
+     o2(0x86,0xFD), o2(0xB3,0xF8), o2(0x86,0xFE), o2(0x87,0x41),
+     o2(0x87,0x42), o2(0x87,0x43), o2(0x87,0x44), o2(0x87,0x45),
+     o2(0x87,0x46), o2(0x87,0x47), o2(0x87,0x48), o2(0x87,0x49),
+     o2(0x87,0x4A), o2(0xB3,0xF9), o2(0x87,0x4B), o2(0x87,0x4C),
+     o2(0x87,0x4D), o2(0x87,0x4E), o2(0x87,0x4F), o2(0x87,0x50),
+     o2(0x87,0x51), o2(0x87,0x52), o2(0x87,0x53), o2(0x87,0x54),
+     o2(0x87,0x55), o2(0x87,0x56), o2(0x87,0x57), o2(0x87,0x58),
+     o2(0x87,0x59), o2(0x87,0x5A), o2(0x87,0x61), o2(0x87,0x62),
+     o2(0x87,0x63), o2(0x87,0x64), o2(0x87,0x65), o2(0x87,0x66),
+     o2(0x87,0x67),
+
+#define to_CP949_EB_86 WORDINDEX2INFO(21240)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_86_infos,
+
+#define to_CP949_EB_87_infos WORDINDEX2INFO(21242)
+           INVALID, o2(0x87,0x68), o2(0x87,0x69), o2(0x87,0x6A),
+     o2(0x87,0x6B), o2(0x87,0x6C), o2(0x87,0x6D), o2(0x87,0x6E),
+     o2(0x87,0x6F), o2(0x87,0x70), o2(0x87,0x71), o2(0x87,0x72),
+     o2(0x87,0x73), o2(0xB3,0xFA), o2(0x87,0x74), o2(0x87,0x75),
+     o2(0x87,0x76), o2(0xB3,0xFB), o2(0x87,0x77), o2(0x87,0x78),
+     o2(0x87,0x79), o2(0xB3,0xFC), o2(0x87,0x7A), o2(0x87,0x81),
+     o2(0x87,0x82), o2(0x87,0x83), o2(0x87,0x84), o2(0x87,0x85),
+     o2(0x87,0x86), o2(0xB3,0xFD), o2(0xB3,0xFE), o2(0x87,0x87),
+     o2(0xB4,0xA1), o2(0x87,0x88), o2(0x87,0x89), o2(0x87,0x8A),
+     o2(0x87,0x8B), o2(0x87,0x8C), o2(0x87,0x8D), o2(0x87,0x8E),
+     o2(0x87,0x8F), o2(0xB4,0xA2), o2(0xB4,0xA3), o2(0x87,0x90),
+     o2(0x87,0x91), o2(0xB4,0xA4), o2(0x87,0x92), o2(0x87,0x93),
+     o2(0x87,0x94), o2(0xB4,0xA5), o2(0x87,0x95), o2(0x87,0x96),
+     o2(0x87,0x97), o2(0x87,0x98), o2(0x87,0x99), o2(0x87,0x9A),
+     o2(0x87,0x9B), o2(0x87,0x9C), o2(0xB4,0xA6), o2(0x87,0x9D),
+     o2(0xB4,0xA7), o2(0x87,0x9E), o2(0xB4,0xA8), o2(0x87,0x9F),
+     o2(0x87,0xA0),
+
+#define to_CP949_EB_87 WORDINDEX2INFO(21307)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_87_infos,
+
+#define to_CP949_EB_88_infos WORDINDEX2INFO(21309)
+           INVALID, o2(0x87,0xA1), o2(0x87,0xA2), o2(0x87,0xA3),
+     o2(0x87,0xA4), o2(0xB4,0xA9), o2(0xB4,0xAA), o2(0x87,0xA5),
+     o2(0x87,0xA6), o2(0xB4,0xAB), o2(0x87,0xA7), o2(0x87,0xA8),
+     o2(0xB4,0xAC), o2(0xB4,0xAD), o2(0x87,0xA9), o2(0x87,0xAA),
+     o2(0x87,0xAB), o2(0x87,0xAC), o2(0x87,0xAD), o2(0x87,0xAE),
+     o2(0x87,0xAF), o2(0xB4,0xAE), o2(0xB4,0xAF), o2(0x87,0xB0),
+     o2(0xB4,0xB0), o2(0x87,0xB1), o2(0xB4,0xB1), o2(0x87,0xB2),
+     o2(0x87,0xB3), o2(0x87,0xB4), o2(0x87,0xB5), o2(0x87,0xB6),
+     o2(0x87,0xB7), o2(0xB4,0xB2), o2(0x87,0xB8), o2(0x87,0xB9),
+     o2(0x87,0xBA), o2(0x87,0xBB), o2(0x87,0xBC), o2(0x87,0xBD),
+     o2(0x87,0xBE), o2(0x87,0xBF), o2(0x87,0xC0), o2(0x87,0xC1),
+     o2(0x87,0xC2), o2(0x87,0xC3), o2(0x87,0xC4), o2(0x87,0xC5),
+     o2(0x87,0xC6), o2(0x87,0xC7), o2(0x87,0xC8), o2(0x87,0xC9),
+     o2(0x87,0xCA), o2(0xB4,0xB3), o2(0x87,0xCB), o2(0x87,0xCC),
+     o2(0x87,0xCD), o2(0x87,0xCE), o2(0x87,0xCF), o2(0x87,0xD0),
+     o2(0x87,0xD1), o2(0xB4,0xB4), o2(0x87,0xD2), o2(0x87,0xD3),
+     o2(0x87,0xD4),
+
+#define to_CP949_EB_88 WORDINDEX2INFO(21374)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_88_infos,
+
+#define to_CP949_EB_89_infos WORDINDEX2INFO(21376)
+           INVALID, o2(0x87,0xD5), o2(0x87,0xD6), o2(0x87,0xD7),
+     o2(0x87,0xD8), o2(0x87,0xD9), o2(0x87,0xDA), o2(0x87,0xDB),
+     o2(0x87,0xDC), o2(0x87,0xDD), o2(0x87,0xDE), o2(0x87,0xDF),
+     o2(0x87,0xE0), o2(0x87,0xE1), o2(0x87,0xE2), o2(0x87,0xE3),
+     o2(0x87,0xE4), o2(0x87,0xE5), o2(0x87,0xE6), o2(0x87,0xE7),
+     o2(0x87,0xE8), o2(0x87,0xE9), o2(0x87,0xEA), o2(0x87,0xEB),
+     o2(0x87,0xEC), o2(0xB4,0xB5), o2(0x87,0xED), o2(0x87,0xEE),
+     o2(0x87,0xEF), o2(0xB4,0xB6), o2(0x87,0xF0), o2(0x87,0xF1),
+     o2(0x87,0xF2), o2(0xB4,0xB7), o2(0x87,0xF3), o2(0x87,0xF4),
+     o2(0x87,0xF5), o2(0x87,0xF6), o2(0x87,0xF7), o2(0x87,0xF8),
+     o2(0x87,0xF9), o2(0xB4,0xB8), o2(0xB4,0xB9), o2(0x87,0xFA),
+     o2(0x87,0xFB), o2(0x87,0xFC), o2(0x87,0xFD), o2(0x87,0xFE),
+     o2(0x88,0x41), o2(0x88,0x42), o2(0x88,0x43), o2(0x88,0x44),
+     o2(0x88,0x45), o2(0xB4,0xBA), o2(0xB4,0xBB), o2(0x88,0x46),
+     o2(0x88,0x47), o2(0x88,0x48), o2(0x88,0x49), o2(0x88,0x4A),
+     o2(0x88,0x4B), o2(0xB4,0xBC), o2(0x88,0x4C), o2(0x88,0x4D),
+     o2(0x88,0x4E),
+
+#define to_CP949_EB_89 WORDINDEX2INFO(21441)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_89_infos,
+
+#define to_CP949_EB_8A_infos WORDINDEX2INFO(21443)
+           INVALID, o2(0x88,0x4F), o2(0x88,0x50), o2(0x88,0x51),
+     o2(0x88,0x52), o2(0xB4,0xBD), o2(0xB4,0xBE), o2(0x88,0x53),
+     o2(0x88,0x54), o2(0x88,0x55), o2(0xB4,0xBF), o2(0x88,0x56),
+     o2(0x88,0x57), o2(0x88,0x58), o2(0x88,0x59), o2(0x88,0x5A),
+     o2(0x88,0x61), o2(0xB4,0xC0), o2(0xB4,0xC1), o2(0x88,0x62),
+     o2(0x88,0x63), o2(0xB4,0xC2), o2(0x88,0x64), o2(0x88,0x65),
+     o2(0x88,0x66), o2(0xB4,0xC3), o2(0xB4,0xC4), o2(0xB4,0xC5),
+     o2(0x88,0x67), o2(0x88,0x68), o2(0x88,0x69), o2(0x88,0x6A),
+     o2(0x88,0x6B), o2(0xB4,0xC6), o2(0xB4,0xC7), o2(0x88,0x6C),
+     o2(0xB4,0xC8), o2(0x88,0x6D), o2(0xB4,0xC9), o2(0xB4,0xCA),
+     o2(0x88,0x6E), o2(0x88,0x6F), o2(0x88,0x70), o2(0xB4,0xCB),
+     o2(0x88,0x71), o2(0xB4,0xCC), o2(0x88,0x72), o2(0x88,0x73),
+     o2(0x88,0x74), o2(0xB4,0xCD), o2(0x88,0x75), o2(0x88,0x76),
+     o2(0x88,0x77), o2(0xB4,0xCE), o2(0x88,0x78), o2(0x88,0x79),
+     o2(0x88,0x7A), o2(0x88,0x81), o2(0x88,0x82), o2(0x88,0x83),
+     o2(0x88,0x84), o2(0x88,0x85), o2(0x88,0x86), o2(0x88,0x87),
+     o2(0x88,0x88),
+
+#define to_CP949_EB_8A WORDINDEX2INFO(21508)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8A_infos,
+
+#define to_CP949_EB_8B_infos WORDINDEX2INFO(21510)
+           INVALID, o2(0x88,0x89), o2(0x88,0x8A), o2(0x88,0x8B),
+     o2(0x88,0x8C), o2(0x88,0x8D), o2(0x88,0x8E), o2(0x88,0x8F),
+     o2(0x88,0x90), o2(0xB4,0xCF), o2(0xB4,0xD0), o2(0x88,0x91),
+     o2(0x88,0x92), o2(0xB4,0xD1), o2(0x88,0x93), o2(0x88,0x94),
+     o2(0x88,0x95), o2(0xB4,0xD2), o2(0x88,0x96), o2(0xB4,0xD3),
+     o2(0x88,0x97), o2(0x88,0x98), o2(0x88,0x99), o2(0x88,0x9A),
+     o2(0x88,0x9B), o2(0xB4,0xD4), o2(0xB4,0xD5), o2(0x88,0x9C),
+     o2(0xB4,0xD6), o2(0x88,0x9D), o2(0xB4,0xD7), o2(0x88,0x9E),
+     o2(0x88,0x9F), o2(0x88,0xA0), o2(0x88,0xA1), o2(0xB4,0xD8),
+     o2(0x88,0xA2), o2(0xB4,0xD9), o2(0xB4,0xDA), o2(0xB4,0xDB),
+     o2(0x88,0xA3), o2(0xB4,0xDC), o2(0x88,0xA4), o2(0x88,0xA5),
+     o2(0xB4,0xDD), o2(0xB4,0xDE), o2(0xB4,0xDF), o2(0xB4,0xE0),
+     o2(0xB4,0xE1), o2(0x88,0xA6), o2(0x88,0xA7), o2(0x88,0xA8),
+     o2(0xB4,0xE2), o2(0xB4,0xE3), o2(0xB4,0xE4), o2(0x88,0xA9),
+     o2(0xB4,0xE5), o2(0xB4,0xE6), o2(0xB4,0xE7), o2(0xB4,0xE8),
+     o2(0xB4,0xE9), o2(0x88,0xAA), o2(0x88,0xAB), o2(0x88,0xAC),
+     o2(0xB4,0xEA),
+
+#define to_CP949_EB_8B WORDINDEX2INFO(21575)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8B_infos,
+
+#define to_CP949_EB_8C_infos WORDINDEX2INFO(21577)
+           INVALID, o2(0xB4,0xEB), o2(0xB4,0xEC), o2(0x88,0xAD),
+     o2(0x88,0xAE), o2(0xB4,0xED), o2(0x88,0xAF), o2(0x88,0xB0),
+     o2(0x88,0xB1), o2(0xB4,0xEE), o2(0x88,0xB2), o2(0x88,0xB3),
+     o2(0x88,0xB4), o2(0x88,0xB5), o2(0x88,0xB6), o2(0x88,0xB7),
+     o2(0x88,0xB8), o2(0xB4,0xEF), o2(0xB4,0xF0), o2(0x88,0xB9),
+     o2(0xB4,0xF1), o2(0xB4,0xF2), o2(0xB4,0xF3), o2(0x88,0xBA),
+     o2(0x88,0xBB), o2(0x88,0xBC), o2(0x88,0xBD), o2(0x88,0xBE),
+     o2(0x88,0xBF), o2(0xB4,0xF4), o2(0x88,0xC0), o2(0x88,0xC1),
+     o2(0x88,0xC2), o2(0x88,0xC3), o2(0x88,0xC4), o2(0x88,0xC5),
+     o2(0x88,0xC6), o2(0x88,0xC7), o2(0x88,0xC8), o2(0x88,0xC9),
+     o2(0x88,0xCA), o2(0x88,0xCB), o2(0x88,0xCC), o2(0x88,0xCD),
+     o2(0x88,0xCE), o2(0x88,0xCF), o2(0x88,0xD0), o2(0x88,0xD1),
+     o2(0x88,0xD2), o2(0x88,0xD3), o2(0x88,0xD4), o2(0x88,0xD5),
+     o2(0x88,0xD6), o2(0x88,0xD7), o2(0x88,0xD8), o2(0x88,0xD9),
+     o2(0x88,0xDA), o2(0x88,0xDB), o2(0x88,0xDC), o2(0x88,0xDD),
+     o2(0x88,0xDE), o2(0x88,0xDF), o2(0x88,0xE0), o2(0x88,0xE1),
+     o2(0x88,0xE2),
+
+#define to_CP949_EB_8C WORDINDEX2INFO(21642)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8C_infos,
+
+#define to_CP949_EB_8D_infos WORDINDEX2INFO(21644)
+           INVALID, o2(0x88,0xE3), o2(0x88,0xE4), o2(0x88,0xE5),
+     o2(0x88,0xE6), o2(0x88,0xE7), o2(0x88,0xE8), o2(0x88,0xE9),
+     o2(0x88,0xEA), o2(0x88,0xEB), o2(0x88,0xEC), o2(0x88,0xED),
+     o2(0x88,0xEE), o2(0x88,0xEF), o2(0x88,0xF0), o2(0x88,0xF1),
+     o2(0x88,0xF2), o2(0x88,0xF3), o2(0x88,0xF4), o2(0x88,0xF5),
+     o2(0x88,0xF6), o2(0xB4,0xF5), o2(0xB4,0xF6), o2(0xB4,0xF7),
+     o2(0x88,0xF7), o2(0xB4,0xF8), o2(0x88,0xF8), o2(0x88,0xF9),
+     o2(0xB4,0xF9), o2(0xB4,0xFA), o2(0x88,0xFA), o2(0xB4,0xFB),
+     o2(0xB4,0xFC), o2(0x88,0xFB), o2(0x88,0xFC), o2(0x88,0xFD),
+     o2(0x88,0xFE), o2(0xB4,0xFD), o2(0xB4,0xFE), o2(0x89,0x41),
+     o2(0xB5,0xA1), o2(0x89,0x42), o2(0xB5,0xA2), o2(0x89,0x43),
+     o2(0xB5,0xA3), o2(0x89,0x44), o2(0x89,0x45), o2(0xB5,0xA4),
+     o2(0x89,0x46), o2(0xB5,0xA5), o2(0xB5,0xA6), o2(0x89,0x47),
+     o2(0x89,0x48), o2(0xB5,0xA7), o2(0x89,0x49), o2(0x89,0x4A),
+     o2(0x89,0x4B), o2(0xB5,0xA8), o2(0x89,0x4C), o2(0x89,0x4D),
+     o2(0x89,0x4E), o2(0x89,0x4F), o2(0x89,0x50), o2(0x89,0x51),
+     o2(0x89,0x52),
+
+#define to_CP949_EB_8D WORDINDEX2INFO(21709)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8D_infos,
+
+#define to_CP949_EB_8E_infos WORDINDEX2INFO(21711)
+           INVALID, o2(0xB5,0xA9), o2(0xB5,0xAA), o2(0x89,0x53),
+     o2(0xB5,0xAB), o2(0xB5,0xAC), o2(0xB5,0xAD), o2(0x89,0x54),
+     o2(0x89,0x55), o2(0x89,0x56), o2(0x89,0x57), o2(0x89,0x58),
+     o2(0x89,0x59), o2(0xB5,0xAE), o2(0x89,0x5A), o2(0x89,0x61),
+     o2(0x89,0x62), o2(0xB5,0xAF), o2(0x89,0x63), o2(0x89,0x64),
+     o2(0x89,0x65), o2(0xB5,0xB0), o2(0x89,0x66), o2(0x89,0x67),
+     o2(0x89,0x68), o2(0x89,0x69), o2(0x89,0x6A), o2(0x89,0x6B),
+     o2(0x89,0x6C), o2(0x89,0x6D), o2(0x89,0x6E), o2(0x89,0x6F),
+     o2(0x89,0x70), o2(0xB5,0xB1), o2(0xB5,0xB2), o2(0x89,0x71),
+     o2(0x89,0x72), o2(0x89,0x73), o2(0x89,0x74), o2(0x89,0x75),
+     o2(0x89,0x76), o2(0xB5,0xB3), o2(0x89,0x77), o2(0x89,0x78),
+     o2(0x89,0x79), o2(0xB5,0xB4), o2(0x89,0x7A), o2(0x89,0x81),
+     o2(0x89,0x82), o2(0x89,0x83), o2(0x89,0x84), o2(0x89,0x85),
+     o2(0x89,0x86), o2(0x89,0x87), o2(0x89,0x88), o2(0x89,0x89),
+     o2(0x89,0x8A), o2(0x89,0x8B), o2(0x89,0x8C), o2(0x89,0x8D),
+     o2(0x89,0x8E), o2(0x89,0x8F), o2(0x89,0x90), o2(0x89,0x91),
+     o2(0x89,0x92),
+
+#define to_CP949_EB_8E WORDINDEX2INFO(21776)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8E_infos,
+
+#define to_CP949_EB_8F_infos WORDINDEX2INFO(21778)
+           INVALID, o2(0x89,0x93), o2(0x89,0x94), o2(0x89,0x95),
+     o2(0x89,0x96), o2(0xB5,0xB5), o2(0xB5,0xB6), o2(0x89,0x97),
+     o2(0x89,0x98), o2(0xB5,0xB7), o2(0x89,0x99), o2(0x89,0x9A),
+     o2(0xB5,0xB8), o2(0xB5,0xB9), o2(0x89,0x9B), o2(0xB5,0xBA),
+     o2(0x89,0x9C), o2(0xB5,0xBB), o2(0x89,0x9D), o2(0x89,0x9E),
+     o2(0x89,0x9F), o2(0xB5,0xBC), o2(0xB5,0xBD), o2(0x89,0xA0),
+     o2(0xB5,0xBE), o2(0x89,0xA1), o2(0xB5,0xBF), o2(0x89,0xA2),
+     o2(0xB5,0xC0), o2(0x89,0xA3), o2(0xB5,0xC1), o2(0x89,0xA4),
+     o2(0x89,0xA5), o2(0xB5,0xC2), o2(0x89,0xA6), o2(0x89,0xA7),
+     o2(0x89,0xA8), o2(0xB5,0xC3), o2(0x89,0xA9), o2(0x89,0xAA),
+     o2(0x89,0xAB), o2(0xB5,0xC4), o2(0x89,0xAC), o2(0x89,0xAD),
+     o2(0x89,0xAE), o2(0x89,0xAF), o2(0x89,0xB0), o2(0x89,0xB1),
+     o2(0x89,0xB2), o2(0x89,0xB3), o2(0x89,0xB4), o2(0x89,0xB5),
+     o2(0x89,0xB6), o2(0x89,0xB7), o2(0x89,0xB8), o2(0x89,0xB9),
+     o2(0x89,0xBA), o2(0x89,0xBB), o2(0x89,0xBC), o2(0x89,0xBD),
+     o2(0x89,0xBE), o2(0xB5,0xC5), o2(0x89,0xBF), o2(0x89,0xC0),
+     o2(0x89,0xC1),
+
+#define to_CP949_EB_8F WORDINDEX2INFO(21843)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_8F_infos,
+
+#define to_CP949_EB_90_infos WORDINDEX2INFO(21845)
+           INVALID, o2(0x89,0xC2), o2(0x89,0xC3), o2(0x89,0xC4),
+     o2(0x89,0xC5), o2(0x89,0xC6), o2(0x89,0xC7), o2(0x89,0xC8),
+     o2(0x89,0xC9), o2(0x89,0xCA), o2(0x89,0xCB), o2(0x89,0xCC),
+     o2(0x89,0xCD), o2(0x89,0xCE), o2(0x89,0xCF), o2(0x89,0xD0),
+     o2(0x89,0xD1), o2(0xB5,0xC6), o2(0x89,0xD2), o2(0x89,0xD3),
+     o2(0x89,0xD4), o2(0x89,0xD5), o2(0x89,0xD6), o2(0x89,0xD7),
+     o2(0x89,0xD8), o2(0xB5,0xC7), o2(0x89,0xD9), o2(0x89,0xDA),
+     o2(0x89,0xDB), o2(0xB5,0xC8), o2(0x89,0xDC), o2(0x89,0xDD),
+     o2(0x89,0xDE), o2(0xB5,0xC9), o2(0x89,0xDF), o2(0x89,0xE0),
+     o2(0x89,0xE1), o2(0x89,0xE2), o2(0x89,0xE3), o2(0x89,0xE4),
+     o2(0x89,0xE5), o2(0xB5,0xCA), o2(0xB5,0xCB), o2(0x89,0xE6),
+     o2(0xB5,0xCC), o2(0x89,0xE7), o2(0x89,0xE8), o2(0x89,0xE9),
+     o2(0x89,0xEA), o2(0x89,0xEB), o2(0x89,0xEC), o2(0x89,0xED),
+     o2(0x89,0xEE), o2(0xB5,0xCD), o2(0x89,0xEF), o2(0x89,0xF0),
+     o2(0x89,0xF1), o2(0x89,0xF2), o2(0x89,0xF3), o2(0x89,0xF4),
+     o2(0x89,0xF5), o2(0x89,0xF6), o2(0x89,0xF7), o2(0x89,0xF8),
+     o2(0x89,0xF9),
+
+#define to_CP949_EB_90 WORDINDEX2INFO(21910)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_90_infos,
+
+#define to_CP949_EB_91_infos WORDINDEX2INFO(21912)
+           INVALID, o2(0x89,0xFA), o2(0x89,0xFB), o2(0x89,0xFC),
+     o2(0x89,0xFD), o2(0x89,0xFE), o2(0x8A,0x41), o2(0x8A,0x42),
+     o2(0x8A,0x43), o2(0x8A,0x44), o2(0x8A,0x45), o2(0x8A,0x46),
+     o2(0x8A,0x47), o2(0x8A,0x48), o2(0x8A,0x49), o2(0x8A,0x4A),
+     o2(0x8A,0x4B), o2(0xB5,0xCE), o2(0xB5,0xCF), o2(0x8A,0x4C),
+     o2(0x8A,0x4D), o2(0xB5,0xD0), o2(0x8A,0x4E), o2(0x8A,0x4F),
+     o2(0x8A,0x50), o2(0xB5,0xD1), o2(0x8A,0x51), o2(0x8A,0x52),
+     o2(0x8A,0x53), o2(0x8A,0x54), o2(0x8A,0x55), o2(0x8A,0x56),
+     o2(0x8A,0x57), o2(0xB5,0xD2), o2(0xB5,0xD3), o2(0x8A,0x58),
+     o2(0xB5,0xD4), o2(0x8A,0x59), o2(0xB5,0xD5), o2(0x8A,0x5A),
+     o2(0x8A,0x61), o2(0x8A,0x62), o2(0x8A,0x63), o2(0x8A,0x64),
+     o2(0x8A,0x65), o2(0xB5,0xD6), o2(0x8A,0x66), o2(0x8A,0x67),
+     o2(0x8A,0x68), o2(0x8A,0x69), o2(0x8A,0x6A), o2(0x8A,0x6B),
+     o2(0x8A,0x6C), o2(0x8A,0x6D), o2(0x8A,0x6E), o2(0x8A,0x6F),
+     o2(0x8A,0x70), o2(0x8A,0x71), o2(0x8A,0x72), o2(0x8A,0x73),
+     o2(0x8A,0x74), o2(0x8A,0x75), o2(0x8A,0x76), o2(0x8A,0x77),
+     o2(0x8A,0x78),
+
+#define to_CP949_EB_91 WORDINDEX2INFO(21977)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_91_infos,
+
+#define to_CP949_EB_92_infos WORDINDEX2INFO(21979)
+           INVALID, o2(0xB5,0xD7), o2(0x8A,0x79), o2(0x8A,0x7A),
+     o2(0x8A,0x81), o2(0x8A,0x82), o2(0x8A,0x83), o2(0x8A,0x84),
+     o2(0x8A,0x85), o2(0xB5,0xD8), o2(0x8A,0x86), o2(0x8A,0x87),
+     o2(0x8A,0x88), o2(0x8A,0x89), o2(0x8A,0x8A), o2(0x8A,0x8B),
+     o2(0x8A,0x8C), o2(0x8A,0x8D), o2(0x8A,0x8E), o2(0x8A,0x8F),
+     o2(0x8A,0x90), o2(0x8A,0x91), o2(0x8A,0x92), o2(0x8A,0x93),
+     o2(0x8A,0x94), o2(0x8A,0x95), o2(0x8A,0x96), o2(0x8A,0x97),
+     o2(0x8A,0x98), o2(0x8A,0x99), o2(0xB5,0xD9), o2(0x8A,0x9A),
+     o2(0x8A,0x9B), o2(0x8A,0x9C), o2(0x8A,0x9D), o2(0x8A,0x9E),
+     o2(0x8A,0x9F), o2(0xB5,0xDA), o2(0x8A,0xA0), o2(0x8A,0xA1),
+     o2(0x8A,0xA2), o2(0xB5,0xDB), o2(0x8A,0xA3), o2(0x8A,0xA4),
+     o2(0x8A,0xA5), o2(0xB5,0xDC), o2(0x8A,0xA6), o2(0x8A,0xA7),
+     o2(0x8A,0xA8), o2(0x8A,0xA9), o2(0x8A,0xAA), o2(0x8A,0xAB),
+     o2(0x8A,0xAC), o2(0x8A,0xAD), o2(0xB5,0xDD), o2(0x8A,0xAE),
+     o2(0xB5,0xDE), o2(0x8A,0xAF), o2(0xB5,0xDF), o2(0x8A,0xB0),
+     o2(0x8A,0xB1), o2(0x8A,0xB2), o2(0x8A,0xB3), o2(0x8A,0xB4),
+     o2(0x8A,0xB5),
+
+#define to_CP949_EB_92 WORDINDEX2INFO(22044)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_92_infos,
+
+#define to_CP949_EB_93_infos WORDINDEX2INFO(22046)
+           INVALID, o2(0xB5,0xE0), o2(0x8A,0xB6), o2(0x8A,0xB7),
+     o2(0x8A,0xB8), o2(0xB5,0xE1), o2(0x8A,0xB9), o2(0x8A,0xBA),
+     o2(0x8A,0xBB), o2(0xB5,0xE2), o2(0x8A,0xBC), o2(0x8A,0xBD),
+     o2(0x8A,0xBE), o2(0x8A,0xBF), o2(0x8A,0xC0), o2(0x8A,0xC1),
+     o2(0x8A,0xC2), o2(0xB5,0xE3), o2(0x8A,0xC3), o2(0x8A,0xC4),
+     o2(0x8A,0xC5), o2(0x8A,0xC6), o2(0xB5,0xE4), o2(0x8A,0xC7),
+     o2(0x8A,0xC8), o2(0x8A,0xC9), o2(0x8A,0xCA), o2(0x8A,0xCB),
+     o2(0x8A,0xCC), o2(0xB5,0xE5), o2(0xB5,0xE6), o2(0x8A,0xCD),
+     o2(0x8A,0xCE), o2(0xB5,0xE7), o2(0x8A,0xCF), o2(0x8A,0xD0),
+     o2(0xB5,0xE8), o2(0xB5,0xE9), o2(0x8A,0xD1), o2(0xB5,0xEA),
+     o2(0x8A,0xD2), o2(0x8A,0xD3), o2(0x8A,0xD4), o2(0x8A,0xD5),
+     o2(0x8A,0xD6), o2(0xB5,0xEB), o2(0xB5,0xEC), o2(0x8A,0xD7),
+     o2(0xB5,0xED), o2(0x8A,0xD8), o2(0xB5,0xEE), o2(0x8A,0xD9),
+     o2(0x8A,0xDA), o2(0x8A,0xDB), o2(0x8A,0xDC), o2(0x8A,0xDD),
+     o2(0x8A,0xDE), o2(0xB5,0xEF), o2(0x8A,0xDF), o2(0x8A,0xE0),
+     o2(0x8A,0xE1), o2(0x8A,0xE2), o2(0x8A,0xE3), o2(0x8A,0xE4),
+     o2(0x8A,0xE5),
+
+#define to_CP949_EB_93 WORDINDEX2INFO(22111)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_93_infos,
+
+#define to_CP949_EB_94_infos WORDINDEX2INFO(22113)
+           INVALID, o2(0x8A,0xE6), o2(0x8A,0xE7), o2(0x8A,0xE8),
+     o2(0x8A,0xE9), o2(0x8A,0xEA), o2(0x8A,0xEB), o2(0x8A,0xEC),
+     o2(0x8A,0xED), o2(0x8A,0xEE), o2(0x8A,0xEF), o2(0x8A,0xF0),
+     o2(0x8A,0xF1), o2(0x8A,0xF2), o2(0x8A,0xF3), o2(0x8A,0xF4),
+     o2(0x8A,0xF5), o2(0x8A,0xF6), o2(0x8A,0xF7), o2(0x8A,0xF8),
+     o2(0x8A,0xF9), o2(0xB5,0xF0), o2(0xB5,0xF1), o2(0x8A,0xFA),
+     o2(0x8A,0xFB), o2(0xB5,0xF2), o2(0x8A,0xFC), o2(0x8A,0xFD),
+     o2(0xB5,0xF3), o2(0xB5,0xF4), o2(0x8A,0xFE), o2(0x8B,0x41),
+     o2(0x8B,0x42), o2(0x8B,0x43), o2(0x8B,0x44), o2(0x8B,0x45),
+     o2(0x8B,0x46), o2(0xB5,0xF5), o2(0xB5,0xF6), o2(0x8B,0x47),
+     o2(0xB5,0xF7), o2(0xB5,0xF8), o2(0xB5,0xF9), o2(0xB5,0xFA),
+     o2(0x8B,0x48), o2(0x8B,0x49), o2(0x8B,0x4A), o2(0x8B,0x4B),
+     o2(0x8B,0x4C), o2(0xB5,0xFB), o2(0xB5,0xFC), o2(0x8B,0x4D),
+     o2(0x8B,0x4E), o2(0xB5,0xFD), o2(0x8B,0x4F), o2(0x8B,0x50),
+     o2(0x8B,0x51), o2(0xB5,0xFE), o2(0x8B,0x52), o2(0x8B,0x53),
+     o2(0x8B,0x54), o2(0x8B,0x55), o2(0x8B,0x56), o2(0x8B,0x57),
+     o2(0x8B,0x58),
+
+#define to_CP949_EB_94 WORDINDEX2INFO(22178)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_94_infos,
+
+#define to_CP949_EB_95_infos WORDINDEX2INFO(22180)
+           INVALID, o2(0xB6,0xA1), o2(0xB6,0xA2), o2(0x8B,0x59),
+     o2(0xB6,0xA3), o2(0xB6,0xA4), o2(0xB6,0xA5), o2(0x8B,0x5A),
+     o2(0x8B,0x61), o2(0x8B,0x62), o2(0x8B,0x63), o2(0x8B,0x64),
+     o2(0xB6,0xA6), o2(0xB6,0xA7), o2(0xB6,0xA8), o2(0x8B,0x65),
+     o2(0x8B,0x66), o2(0xB6,0xA9), o2(0x8B,0x67), o2(0x8B,0x68),
+     o2(0x8B,0x69), o2(0xB6,0xAA), o2(0x8B,0x6A), o2(0x8B,0x6B),
+     o2(0x8B,0x6C), o2(0x8B,0x6D), o2(0x8B,0x6E), o2(0x8B,0x6F),
+     o2(0x8B,0x70), o2(0xB6,0xAB), o2(0xB6,0xAC), o2(0x8B,0x71),
+     o2(0xB6,0xAD), o2(0xB6,0xAE), o2(0xB6,0xAF), o2(0x8B,0x72),
+     o2(0x8B,0x73), o2(0x8B,0x74), o2(0x8B,0x75), o2(0x8B,0x76),
+     o2(0x8B,0x77), o2(0x8B,0x78), o2(0x8B,0x79), o2(0x8B,0x7A),
+     o2(0x8B,0x81), o2(0x8B,0x82), o2(0x8B,0x83), o2(0x8B,0x84),
+     o2(0x8B,0x85), o2(0x8B,0x86), o2(0x8B,0x87), o2(0x8B,0x88),
+     o2(0x8B,0x89), o2(0x8B,0x8A), o2(0x8B,0x8B), o2(0x8B,0x8C),
+     o2(0x8B,0x8D), o2(0x8B,0x8E), o2(0x8B,0x8F), o2(0x8B,0x90),
+     o2(0x8B,0x91), o2(0x8B,0x92), o2(0x8B,0x93), o2(0x8B,0x94),
+     o2(0x8B,0x95),
+
+#define to_CP949_EB_95 WORDINDEX2INFO(22245)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_95_infos,
+
+#define to_CP949_EB_96_infos WORDINDEX2INFO(22247)
+           INVALID, o2(0x8B,0x96), o2(0x8B,0x97), o2(0x8B,0x98),
+     o2(0x8B,0x99), o2(0x8B,0x9A), o2(0x8B,0x9B), o2(0x8B,0x9C),
+     o2(0x8B,0x9D), o2(0x8B,0x9E), o2(0x8B,0x9F), o2(0x8B,0xA0),
+     o2(0x8B,0xA1), o2(0x8B,0xA2), o2(0x8B,0xA3), o2(0x8B,0xA4),
+     o2(0x8B,0xA5), o2(0x8B,0xA6), o2(0x8B,0xA7), o2(0x8B,0xA8),
+     o2(0x8B,0xA9), o2(0x8B,0xAA), o2(0x8B,0xAB), o2(0x8B,0xAC),
+     o2(0x8B,0xAD), o2(0x8B,0xAE), o2(0x8B,0xAF), o2(0x8B,0xB0),
+     o2(0x8B,0xB1), o2(0x8B,0xB2), o2(0x8B,0xB3), o2(0x8B,0xB4),
+     o2(0x8B,0xB5), o2(0xB6,0xB0), o2(0xB6,0xB1), o2(0x8B,0xB6),
+     o2(0x8B,0xB7), o2(0xB6,0xB2), o2(0x8B,0xB8), o2(0x8B,0xB9),
+     o2(0x8B,0xBA), o2(0xB6,0xB3), o2(0x8B,0xBB), o2(0xB6,0xB4),
+     o2(0xB6,0xB5), o2(0x8B,0xBC), o2(0x8B,0xBD), o2(0x8B,0xBE),
+     o2(0x8B,0xBF), o2(0xB6,0xB6), o2(0xB6,0xB7), o2(0x8B,0xC0),
+     o2(0xB6,0xB8), o2(0xB6,0xB9), o2(0xB6,0xBA), o2(0x8B,0xC1),
+     o2(0x8B,0xC2), o2(0x8B,0xC3), o2(0x8B,0xC4), o2(0x8B,0xC5),
+     o2(0xB6,0xBB), o2(0xB6,0xBC), o2(0xB6,0xBD), o2(0x8B,0xC6),
+     o2(0x8B,0xC7),
+
+#define to_CP949_EB_96 WORDINDEX2INFO(22312)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_96_infos,
+
+#define to_CP949_EB_97_infos WORDINDEX2INFO(22314)
+           INVALID, o2(0xB6,0xBE), o2(0x8B,0xC8), o2(0x8B,0xC9),
+     o2(0x8B,0xCA), o2(0xB6,0xBF), o2(0x8B,0xCB), o2(0x8B,0xCC),
+     o2(0x8B,0xCD), o2(0x8B,0xCE), o2(0x8B,0xCF), o2(0x8B,0xD0),
+     o2(0x8B,0xD1), o2(0xB6,0xC0), o2(0xB6,0xC1), o2(0x8B,0xD2),
+     o2(0xB6,0xC2), o2(0xB6,0xC3), o2(0xB6,0xC4), o2(0x8B,0xD3),
+     o2(0x8B,0xD4), o2(0x8B,0xD5), o2(0x8B,0xD6), o2(0x8B,0xD7),
+     o2(0x8B,0xD8), o2(0xB6,0xC5), o2(0x8B,0xD9), o2(0x8B,0xDA),
+     o2(0x8B,0xDB), o2(0x8B,0xDC), o2(0x8B,0xDD), o2(0x8B,0xDE),
+     o2(0x8B,0xDF), o2(0x8B,0xE0), o2(0x8B,0xE1), o2(0x8B,0xE2),
+     o2(0x8B,0xE3), o2(0x8B,0xE4), o2(0x8B,0xE5), o2(0x8B,0xE6),
+     o2(0x8B,0xE7), o2(0x8B,0xE8), o2(0x8B,0xE9), o2(0x8B,0xEA),
+     o2(0x8B,0xEB), o2(0xB6,0xC6), o2(0x8B,0xEC), o2(0x8B,0xED),
+     o2(0x8B,0xEE), o2(0x8B,0xEF), o2(0x8B,0xF0), o2(0x8B,0xF1),
+     o2(0x8B,0xF2), o2(0x8B,0xF3), o2(0x8B,0xF4), o2(0x8B,0xF5),
+     o2(0x8B,0xF6), o2(0x8B,0xF7), o2(0x8B,0xF8), o2(0x8B,0xF9),
+     o2(0x8B,0xFA), o2(0x8B,0xFB), o2(0x8B,0xFC), o2(0x8B,0xFD),
+     o2(0x8B,0xFE),
+
+#define to_CP949_EB_97 WORDINDEX2INFO(22379)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_97_infos,
+
+#define to_CP949_EB_98_infos WORDINDEX2INFO(22381)
+           INVALID, o2(0x8C,0x41), o2(0x8C,0x42), o2(0x8C,0x43),
+     o2(0x8C,0x44), o2(0x8C,0x45), o2(0x8C,0x46), o2(0x8C,0x47),
+     o2(0x8C,0x48), o2(0x8C,0x49), o2(0x8C,0x4A), o2(0x8C,0x4B),
+     o2(0x8C,0x4C), o2(0x8C,0x4D), o2(0x8C,0x4E), o2(0x8C,0x4F),
+     o2(0x8C,0x50), o2(0xB6,0xC7), o2(0xB6,0xC8), o2(0x8C,0x51),
+     o2(0x8C,0x52), o2(0xB6,0xC9), o2(0x8C,0x53), o2(0x8C,0x54),
+     o2(0x8C,0x55), o2(0xB6,0xCA), o2(0x8C,0x56), o2(0x8C,0x57),
+     o2(0x8C,0x58), o2(0x8C,0x59), o2(0x8C,0x5A), o2(0x8C,0x61),
+     o2(0x8C,0x62), o2(0x8C,0x63), o2(0x8C,0x64), o2(0x8C,0x65),
+     o2(0x8C,0x66), o2(0x8C,0x67), o2(0xB6,0xCB), o2(0x8C,0x68),
+     o2(0x8C,0x69), o2(0x8C,0x6A), o2(0x8C,0x6B), o2(0x8C,0x6C),
+     o2(0x8C,0x6D), o2(0xB6,0xCC), o2(0x8C,0x6E), o2(0x8C,0x6F),
+     o2(0x8C,0x70), o2(0x8C,0x71), o2(0x8C,0x72), o2(0x8C,0x73),
+     o2(0x8C,0x74), o2(0xB6,0xCD), o2(0x8C,0x75), o2(0x8C,0x76),
+     o2(0x8C,0x77), o2(0x8C,0x78), o2(0x8C,0x79), o2(0x8C,0x7A),
+     o2(0x8C,0x81), o2(0x8C,0x82), o2(0x8C,0x83), o2(0x8C,0x84),
+     o2(0x8C,0x85),
+
+#define to_CP949_EB_98 WORDINDEX2INFO(22446)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_98_infos,
+
+#define to_CP949_EB_99_infos WORDINDEX2INFO(22448)
+           INVALID, o2(0x8C,0x86), o2(0x8C,0x87), o2(0x8C,0x88),
+     o2(0x8C,0x89), o2(0x8C,0x8A), o2(0x8C,0x8B), o2(0x8C,0x8C),
+     o2(0x8C,0x8D), o2(0xB6,0xCE), o2(0x8C,0x8E), o2(0x8C,0x8F),
+     o2(0x8C,0x90), o2(0x8C,0x91), o2(0x8C,0x92), o2(0x8C,0x93),
+     o2(0x8C,0x94), o2(0x8C,0x95), o2(0x8C,0x96), o2(0x8C,0x97),
+     o2(0x8C,0x98), o2(0x8C,0x99), o2(0x8C,0x9A), o2(0x8C,0x9B),
+     o2(0x8C,0x9C), o2(0x8C,0x9D), o2(0x8C,0x9E), o2(0x8C,0x9F),
+     o2(0x8C,0xA0), o2(0x8C,0xA1), o2(0x8C,0xA2), o2(0x8C,0xA3),
+     o2(0x8C,0xA4), o2(0x8C,0xA5), o2(0x8C,0xA6), o2(0x8C,0xA7),
+     o2(0x8C,0xA8), o2(0xB6,0xCF), o2(0x8C,0xA9), o2(0x8C,0xAA),
+     o2(0x8C,0xAB), o2(0xB6,0xD0), o2(0x8C,0xAC), o2(0x8C,0xAD),
+     o2(0x8C,0xAE), o2(0x8C,0xAF), o2(0x8C,0xB0), o2(0x8C,0xB1),
+     o2(0x8C,0xB2), o2(0x8C,0xB3), o2(0x8C,0xB4), o2(0x8C,0xB5),
+     o2(0x8C,0xB6), o2(0x8C,0xB7), o2(0x8C,0xB8), o2(0x8C,0xB9),
+     o2(0x8C,0xBA), o2(0x8C,0xBB), o2(0x8C,0xBC), o2(0x8C,0xBD),
+     o2(0x8C,0xBE), o2(0x8C,0xBF), o2(0x8C,0xC0), o2(0x8C,0xC1),
+     o2(0x8C,0xC2),
+
+#define to_CP949_EB_99 WORDINDEX2INFO(22513)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_99_infos,
+
+#define to_CP949_EB_9A_infos WORDINDEX2INFO(22515)
+           INVALID, o2(0x8C,0xC3), o2(0x8C,0xC4), o2(0x8C,0xC5),
+     o2(0x8C,0xC6), o2(0x8C,0xC7), o2(0x8C,0xC8), o2(0x8C,0xC9),
+     o2(0x8C,0xCA), o2(0x8C,0xCB), o2(0x8C,0xCC), o2(0x8C,0xCD),
+     o2(0x8C,0xCE), o2(0x8C,0xCF), o2(0x8C,0xD0), o2(0x8C,0xD1),
+     o2(0x8C,0xD2), o2(0x8C,0xD3), o2(0x8C,0xD4), o2(0x8C,0xD5),
+     o2(0x8C,0xD6), o2(0x8C,0xD7), o2(0x8C,0xD8), o2(0x8C,0xD9),
+     o2(0x8C,0xDA), o2(0x8C,0xDB), o2(0x8C,0xDC), o2(0x8C,0xDD),
+     o2(0x8C,0xDE), o2(0xB6,0xD1), o2(0xB6,0xD2), o2(0x8C,0xDF),
+     o2(0x8C,0xE0), o2(0xB6,0xD3), o2(0x8C,0xE1), o2(0x8C,0xE2),
+     o2(0x8C,0xE3), o2(0xB6,0xD4), o2(0x8C,0xE4), o2(0x8C,0xE5),
+     o2(0x8C,0xE6), o2(0x8C,0xE7), o2(0x8C,0xE8), o2(0x8C,0xE9),
+     o2(0xB6,0xD5), o2(0xB6,0xD6), o2(0x8C,0xEA), o2(0x8C,0xEB),
+     o2(0x8C,0xEC), o2(0x8C,0xED), o2(0xB6,0xD7), o2(0x8C,0xEE),
+     o2(0x8C,0xEF), o2(0x8C,0xF0), o2(0x8C,0xF1), o2(0x8C,0xF2),
+     o2(0x8C,0xF3), o2(0x8C,0xF4), o2(0x8C,0xF5), o2(0x8C,0xF6),
+     o2(0x8C,0xF7), o2(0x8C,0xF8), o2(0x8C,0xF9), o2(0x8C,0xFA),
+     o2(0x8C,0xFB),
+
+#define to_CP949_EB_9A WORDINDEX2INFO(22580)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9A_infos,
+
+#define to_CP949_EB_9B_infos WORDINDEX2INFO(22582)
+           INVALID, o2(0x8C,0xFC), o2(0x8C,0xFD), o2(0x8C,0xFE),
+     o2(0x8D,0x41), o2(0x8D,0x42), o2(0x8D,0x43), o2(0x8D,0x44),
+     o2(0x8D,0x45), o2(0x8D,0x46), o2(0x8D,0x47), o2(0x8D,0x48),
+     o2(0x8D,0x49), o2(0x8D,0x4A), o2(0x8D,0x4B), o2(0x8D,0x4C),
+     o2(0x8D,0x4D), o2(0x8D,0x4E), o2(0x8D,0x4F), o2(0x8D,0x50),
+     o2(0x8D,0x51), o2(0xB6,0xD8), o2(0x8D,0x52), o2(0x8D,0x53),
+     o2(0x8D,0x54), o2(0x8D,0x55), o2(0x8D,0x56), o2(0x8D,0x57),
+     o2(0x8D,0x58), o2(0x8D,0x59), o2(0x8D,0x5A), o2(0x8D,0x61),
+     o2(0x8D,0x62), o2(0x8D,0x63), o2(0x8D,0x64), o2(0x8D,0x65),
+     o2(0x8D,0x66), o2(0x8D,0x67), o2(0x8D,0x68), o2(0x8D,0x69),
+     o2(0x8D,0x6A), o2(0x8D,0x6B), o2(0x8D,0x6C), o2(0x8D,0x6D),
+     o2(0x8D,0x6E), o2(0x8D,0x6F), o2(0x8D,0x70), o2(0x8D,0x71),
+     o2(0x8D,0x72), o2(0xB6,0xD9), o2(0x8D,0x73), o2(0x8D,0x74),
+     o2(0x8D,0x75), o2(0xB6,0xDA), o2(0x8D,0x76), o2(0x8D,0x77),
+     o2(0x8D,0x78), o2(0xB6,0xDB), o2(0x8D,0x79), o2(0x8D,0x7A),
+     o2(0x8D,0x81), o2(0x8D,0x82), o2(0x8D,0x83), o2(0x8D,0x84),
+     o2(0x8D,0x85),
+
+#define to_CP949_EB_9B WORDINDEX2INFO(22647)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9B_infos,
+
+#define to_CP949_EB_9C_infos WORDINDEX2INFO(22649)
+           INVALID, o2(0xB6,0xDC), o2(0xB6,0xDD), o2(0x8D,0x86),
+     o2(0x8D,0x87), o2(0x8D,0x88), o2(0xB6,0xDE), o2(0x8D,0x89),
+     o2(0x8D,0x8A), o2(0x8D,0x8B), o2(0x8D,0x8C), o2(0x8D,0x8D),
+     o2(0x8D,0x8E), o2(0x8D,0x8F), o2(0x8D,0x90), o2(0x8D,0x91),
+     o2(0x8D,0x92), o2(0x8D,0x93), o2(0x8D,0x94), o2(0x8D,0x95),
+     o2(0x8D,0x96), o2(0x8D,0x97), o2(0x8D,0x98), o2(0x8D,0x99),
+     o2(0x8D,0x9A), o2(0x8D,0x9B), o2(0x8D,0x9C), o2(0x8D,0x9D),
+     o2(0x8D,0x9E), o2(0x8D,0x9F), o2(0x8D,0xA0), o2(0x8D,0xA1),
+     o2(0x8D,0xA2), o2(0x8D,0xA3), o2(0x8D,0xA4), o2(0x8D,0xA5),
+     o2(0x8D,0xA6), o2(0x8D,0xA7), o2(0x8D,0xA8), o2(0x8D,0xA9),
+     o2(0x8D,0xAA), o2(0xB6,0xDF), o2(0xB6,0xE0), o2(0x8D,0xAB),
+     o2(0x8D,0xAC), o2(0xB6,0xE1), o2(0x8D,0xAD), o2(0x8D,0xAE),
+     o2(0xB6,0xE2), o2(0xB6,0xE3), o2(0x8D,0xAF), o2(0x8D,0xB0),
+     o2(0x8D,0xB1), o2(0x8D,0xB2), o2(0x8D,0xB3), o2(0x8D,0xB4),
+     o2(0x8D,0xB5), o2(0xB6,0xE4), o2(0xB6,0xE5), o2(0x8D,0xB6),
+     o2(0xB6,0xE6), o2(0x8D,0xB7), o2(0x8D,0xB8), o2(0x8D,0xB9),
+     o2(0x8D,0xBA),
+
+#define to_CP949_EB_9C WORDINDEX2INFO(22714)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9C_infos,
+
+#define to_CP949_EB_9D_infos WORDINDEX2INFO(22716)
+           INVALID, o2(0x8D,0xBB), o2(0x8D,0xBC), o2(0x8D,0xBD),
+     o2(0x8D,0xBE), o2(0xB6,0xE7), o2(0x8D,0xBF), o2(0x8D,0xC0),
+     o2(0x8D,0xC1), o2(0xB6,0xE8), o2(0x8D,0xC2), o2(0x8D,0xC3),
+     o2(0x8D,0xC4), o2(0xB6,0xE9), o2(0x8D,0xC5), o2(0x8D,0xC6),
+     o2(0x8D,0xC7), o2(0x8D,0xC8), o2(0x8D,0xC9), o2(0x8D,0xCA),
+     o2(0x8D,0xCB), o2(0xB6,0xEA), o2(0xB6,0xEB), o2(0x8D,0xCC),
+     o2(0x8D,0xCD), o2(0x8D,0xCE), o2(0x8D,0xCF), o2(0x8D,0xD0),
+     o2(0x8D,0xD1), o2(0x8D,0xD2), o2(0x8D,0xD3), o2(0x8D,0xD4),
+     o2(0x8D,0xD5), o2(0xB6,0xEC), o2(0x8D,0xD6), o2(0x8D,0xD7),
+     o2(0x8D,0xD8), o2(0xB6,0xED), o2(0x8D,0xD9), o2(0x8D,0xDA),
+     o2(0x8D,0xDB), o2(0xB6,0xEE), o2(0x8D,0xDC), o2(0x8D,0xDD),
+     o2(0x8D,0xDE), o2(0x8D,0xDF), o2(0x8D,0xE0), o2(0x8D,0xE1),
+     o2(0x8D,0xE2), o2(0xB6,0xEF), o2(0xB6,0xF0), o2(0x8D,0xE3),
+     o2(0xB6,0xF1), o2(0x8D,0xE4), o2(0xB6,0xF2), o2(0x8D,0xE5),
+     o2(0x8D,0xE6), o2(0x8D,0xE7), o2(0x8D,0xE8), o2(0x8D,0xE9),
+     o2(0x8D,0xEA), o2(0xB6,0xF3), o2(0xB6,0xF4), o2(0x8D,0xEB),
+     o2(0x8D,0xEC),
+
+#define to_CP949_EB_9D WORDINDEX2INFO(22781)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9D_infos,
+
+#define to_CP949_EB_9E_infos WORDINDEX2INFO(22783)
+           INVALID, o2(0xB6,0xF5), o2(0x8D,0xED), o2(0x8D,0xEE),
+     o2(0x8D,0xEF), o2(0xB6,0xF6), o2(0x8D,0xF0), o2(0x8D,0xF1),
+     o2(0x8D,0xF2), o2(0x8D,0xF3), o2(0x8D,0xF4), o2(0x8D,0xF5),
+     o2(0x8D,0xF6), o2(0xB6,0xF7), o2(0xB6,0xF8), o2(0x8D,0xF7),
+     o2(0xB6,0xF9), o2(0xB6,0xFA), o2(0xB6,0xFB), o2(0xB6,0xFC),
+     o2(0x8D,0xF8), o2(0x8D,0xF9), o2(0x8D,0xFA), o2(0xB6,0xFD),
+     o2(0xB6,0xFE), o2(0xB7,0xA1), o2(0xB7,0xA2), o2(0x8D,0xFB),
+     o2(0x8D,0xFC), o2(0xB7,0xA3), o2(0x8D,0xFD), o2(0x8D,0xFE),
+     o2(0x8E,0x41), o2(0xB7,0xA4), o2(0x8E,0x42), o2(0x8E,0x43),
+     o2(0x8E,0x44), o2(0x8E,0x45), o2(0x8E,0x46), o2(0x8E,0x47),
+     o2(0x8E,0x48), o2(0xB7,0xA5), o2(0xB7,0xA6), o2(0x8E,0x49),
+     o2(0xB7,0xA7), o2(0xB7,0xA8), o2(0xB7,0xA9), o2(0x8E,0x4A),
+     o2(0x8E,0x4B), o2(0x8E,0x4C), o2(0x8E,0x4D), o2(0x8E,0x4E),
+     o2(0x8E,0x4F), o2(0xB7,0xAA), o2(0xB7,0xAB), o2(0x8E,0x50),
+     o2(0x8E,0x51), o2(0xB7,0xAC), o2(0x8E,0x52), o2(0x8E,0x53),
+     o2(0x8E,0x54), o2(0x8E,0x55), o2(0x8E,0x56), o2(0x8E,0x57),
+     o2(0x8E,0x58),
+
+#define to_CP949_EB_9E WORDINDEX2INFO(22848)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9E_infos,
+
+#define to_CP949_EB_9F_infos WORDINDEX2INFO(22850)
+           INVALID, o2(0x8E,0x59), o2(0x8E,0x5A), o2(0x8E,0x61),
+     o2(0x8E,0x62), o2(0x8E,0x63), o2(0x8E,0x64), o2(0x8E,0x65),
+     o2(0xB7,0xAD), o2(0x8E,0x66), o2(0xB7,0xAE), o2(0x8E,0x67),
+     o2(0x8E,0x68), o2(0x8E,0x69), o2(0x8E,0x6A), o2(0x8E,0x6B),
+     o2(0x8E,0x6C), o2(0x8E,0x6D), o2(0x8E,0x6E), o2(0x8E,0x6F),
+     o2(0x8E,0x70), o2(0x8E,0x71), o2(0x8E,0x72), o2(0x8E,0x73),
+     o2(0x8E,0x74), o2(0x8E,0x75), o2(0x8E,0x76), o2(0x8E,0x77),
+     o2(0x8E,0x78), o2(0x8E,0x79), o2(0x8E,0x7A), o2(0x8E,0x81),
+     o2(0x8E,0x82), o2(0x8E,0x83), o2(0x8E,0x84), o2(0x8E,0x85),
+     o2(0x8E,0x86), o2(0x8E,0x87), o2(0x8E,0x88), o2(0x8E,0x89),
+     o2(0x8E,0x8A), o2(0x8E,0x8B), o2(0x8E,0x8C), o2(0x8E,0x8D),
+     o2(0x8E,0x8E), o2(0xB7,0xAF), o2(0xB7,0xB0), o2(0x8E,0x8F),
+     o2(0x8E,0x90), o2(0xB7,0xB1), o2(0x8E,0x91), o2(0x8E,0x92),
+     o2(0x8E,0x93), o2(0xB7,0xB2), o2(0x8E,0x94), o2(0x8E,0x95),
+     o2(0x8E,0x96), o2(0x8E,0x97), o2(0x8E,0x98), o2(0x8E,0x99),
+     o2(0x8E,0x9A), o2(0xB7,0xB3), o2(0xB7,0xB4), o2(0x8E,0x9B),
+     o2(0xB7,0xB5),
+
+#define to_CP949_EB_9F WORDINDEX2INFO(22915)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_9F_infos,
+
+#define to_CP949_EB_A0_infos WORDINDEX2INFO(22917)
+           INVALID, o2(0xB7,0xB6), o2(0xB7,0xB7), o2(0x8E,0x9C),
+     o2(0x8E,0x9D), o2(0x8E,0x9E), o2(0x8E,0x9F), o2(0x8E,0xA0),
+     o2(0xB7,0xB8), o2(0xB7,0xB9), o2(0xB7,0xBA), o2(0x8E,0xA1),
+     o2(0x8E,0xA2), o2(0xB7,0xBB), o2(0x8E,0xA3), o2(0x8E,0xA4),
+     o2(0x8E,0xA5), o2(0xB7,0xBC), o2(0x8E,0xA6), o2(0x8E,0xA7),
+     o2(0x8E,0xA8), o2(0x8E,0xA9), o2(0x8E,0xAA), o2(0x8E,0xAB),
+     o2(0x8E,0xAC), o2(0xB7,0xBD), o2(0xB7,0xBE), o2(0x8E,0xAD),
+     o2(0xB7,0xBF), o2(0x8E,0xAE), o2(0xB7,0xC0), o2(0x8E,0xAF),
+     o2(0x8E,0xB0), o2(0x8E,0xB1), o2(0x8E,0xB2), o2(0x8E,0xB3),
+     o2(0x8E,0xB4), o2(0xB7,0xC1), o2(0xB7,0xC2), o2(0x8E,0xB5),
+     o2(0x8E,0xB6), o2(0xB7,0xC3), o2(0x8E,0xB7), o2(0x8E,0xB8),
+     o2(0x8E,0xB9), o2(0xB7,0xC4), o2(0x8E,0xBA), o2(0x8E,0xBB),
+     o2(0x8E,0xBC), o2(0x8E,0xBD), o2(0x8E,0xBE), o2(0x8E,0xBF),
+     o2(0x8E,0xC0), o2(0xB7,0xC5), o2(0xB7,0xC6), o2(0x8E,0xC1),
+     o2(0xB7,0xC7), o2(0xB7,0xC8), o2(0xB7,0xC9), o2(0x8E,0xC2),
+     o2(0x8E,0xC3), o2(0x8E,0xC4), o2(0x8E,0xC5), o2(0x8E,0xC6),
+     o2(0x8E,0xC7),
+
+#define to_CP949_EB_A0 WORDINDEX2INFO(22982)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A0_infos,
+
+#define to_CP949_EB_A1_infos WORDINDEX2INFO(22984)
+           INVALID, o2(0xB7,0xCA), o2(0x8E,0xC8), o2(0x8E,0xC9),
+     o2(0x8E,0xCA), o2(0xB7,0xCB), o2(0x8E,0xCB), o2(0x8E,0xCC),
+     o2(0x8E,0xCD), o2(0x8E,0xCE), o2(0x8E,0xCF), o2(0x8E,0xD0),
+     o2(0x8E,0xD1), o2(0x8E,0xD2), o2(0x8E,0xD3), o2(0x8E,0xD4),
+     o2(0x8E,0xD5), o2(0x8E,0xD6), o2(0xB7,0xCC), o2(0x8E,0xD7),
+     o2(0xB7,0xCD), o2(0x8E,0xD8), o2(0x8E,0xD9), o2(0x8E,0xDA),
+     o2(0x8E,0xDB), o2(0x8E,0xDC), o2(0x8E,0xDD), o2(0x8E,0xDE),
+     o2(0x8E,0xDF), o2(0xB7,0xCE), o2(0xB7,0xCF), o2(0x8E,0xE0),
+     o2(0x8E,0xE1), o2(0xB7,0xD0), o2(0x8E,0xE2), o2(0x8E,0xE3),
+     o2(0x8E,0xE4), o2(0xB7,0xD1), o2(0x8E,0xE5), o2(0x8E,0xE6),
+     o2(0x8E,0xE7), o2(0x8E,0xE8), o2(0x8E,0xE9), o2(0x8E,0xEA),
+     o2(0x8E,0xEB), o2(0xB7,0xD2), o2(0xB7,0xD3), o2(0x8E,0xEC),
+     o2(0xB7,0xD4), o2(0x8E,0xED), o2(0xB7,0xD5), o2(0x8E,0xEE),
+     o2(0x8E,0xEF), o2(0x8E,0xF0), o2(0x8E,0xF1), o2(0x8E,0xF2),
+     o2(0x8E,0xF3), o2(0xB7,0xD6), o2(0x8E,0xF4), o2(0x8E,0xF5),
+     o2(0x8E,0xF6), o2(0xB7,0xD7), o2(0x8E,0xF7), o2(0x8E,0xF8),
+     o2(0x8E,0xF9),
+
+#define to_CP949_EB_A1 WORDINDEX2INFO(23049)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A1_infos,
+
+#define to_CP949_EB_A2_infos WORDINDEX2INFO(23051)
+           INVALID, o2(0x8E,0xFA), o2(0x8E,0xFB), o2(0x8E,0xFC),
+     o2(0x8E,0xFD), o2(0x8E,0xFE), o2(0x8F,0x41), o2(0x8F,0x42),
+     o2(0x8F,0x43), o2(0x8F,0x44), o2(0x8F,0x45), o2(0x8F,0x46),
+     o2(0x8F,0x47), o2(0x8F,0x48), o2(0xB7,0xD8), o2(0x8F,0x49),
+     o2(0x8F,0x4A), o2(0x8F,0x4B), o2(0x8F,0x4C), o2(0x8F,0x4D),
+     o2(0x8F,0x4E), o2(0x8F,0x4F), o2(0x8F,0x50), o2(0x8F,0x51),
+     o2(0x8F,0x52), o2(0x8F,0x53), o2(0x8F,0x54), o2(0x8F,0x55),
+     o2(0x8F,0x56), o2(0x8F,0x57), o2(0x8F,0x58), o2(0x8F,0x59),
+     o2(0x8F,0x5A), o2(0x8F,0x61), o2(0x8F,0x62), o2(0x8F,0x63),
+     o2(0x8F,0x64), o2(0x8F,0x65), o2(0x8F,0x66), o2(0x8F,0x67),
+     o2(0x8F,0x68), o2(0xB7,0xD9), o2(0x8F,0x69), o2(0x8F,0x6A),
+     o2(0x8F,0x6B), o2(0x8F,0x6C), o2(0x8F,0x6D), o2(0x8F,0x6E),
+     o2(0x8F,0x6F), o2(0xB7,0xDA), o2(0x8F,0x70), o2(0x8F,0x71),
+     o2(0x8F,0x72), o2(0xB7,0xDB), o2(0x8F,0x73), o2(0x8F,0x74),
+     o2(0x8F,0x75), o2(0xB7,0xDC), o2(0x8F,0x76), o2(0x8F,0x77),
+     o2(0x8F,0x78), o2(0x8F,0x79), o2(0x8F,0x7A), o2(0x8F,0x81),
+     o2(0x8F,0x82),
+
+#define to_CP949_EB_A2 WORDINDEX2INFO(23116)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A2_infos,
+
+#define to_CP949_EB_A3_infos WORDINDEX2INFO(23118)
+           INVALID, o2(0xB7,0xDD), o2(0xB7,0xDE), o2(0x8F,0x83),
+     o2(0xB7,0xDF), o2(0x8F,0x84), o2(0xB7,0xE0), o2(0x8F,0x85),
+     o2(0x8F,0x86), o2(0x8F,0x87), o2(0x8F,0x88), o2(0x8F,0x89),
+     o2(0x8F,0x8A), o2(0xB7,0xE1), o2(0x8F,0x8B), o2(0x8F,0x8C),
+     o2(0x8F,0x8D), o2(0xB7,0xE2), o2(0x8F,0x8E), o2(0x8F,0x8F),
+     o2(0x8F,0x90), o2(0xB7,0xE3), o2(0x8F,0x91), o2(0x8F,0x92),
+     o2(0x8F,0x93), o2(0x8F,0x94), o2(0x8F,0x95), o2(0x8F,0x96),
+     o2(0x8F,0x97), o2(0x8F,0x98), o2(0xB7,0xE4), o2(0x8F,0x99),
+     o2(0xB7,0xE5), o2(0x8F,0x9A), o2(0xB7,0xE6), o2(0x8F,0x9B),
+     o2(0x8F,0x9C), o2(0x8F,0x9D), o2(0x8F,0x9E), o2(0x8F,0x9F),
+     o2(0x8F,0xA0), o2(0xB7,0xE7), o2(0xB7,0xE8), o2(0x8F,0xA1),
+     o2(0x8F,0xA2), o2(0xB7,0xE9), o2(0x8F,0xA3), o2(0x8F,0xA4),
+     o2(0x8F,0xA5), o2(0xB7,0xEA), o2(0x8F,0xA6), o2(0x8F,0xA7),
+     o2(0x8F,0xA8), o2(0x8F,0xA9), o2(0x8F,0xAA), o2(0x8F,0xAB),
+     o2(0x8F,0xAC), o2(0xB7,0xEB), o2(0xB7,0xEC), o2(0x8F,0xAD),
+     o2(0xB7,0xED), o2(0x8F,0xAE), o2(0xB7,0xEE), o2(0x8F,0xAF),
+     o2(0x8F,0xB0),
+
+#define to_CP949_EB_A3 WORDINDEX2INFO(23183)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A3_infos,
+
+#define to_CP949_EB_A4_infos WORDINDEX2INFO(23185)
+           INVALID, o2(0x8F,0xB1), o2(0x8F,0xB2), o2(0x8F,0xB3),
+     o2(0x8F,0xB4), o2(0xB7,0xEF), o2(0x8F,0xB5), o2(0x8F,0xB6),
+     o2(0x8F,0xB7), o2(0x8F,0xB8), o2(0x8F,0xB9), o2(0x8F,0xBA),
+     o2(0x8F,0xBB), o2(0x8F,0xBC), o2(0x8F,0xBD), o2(0x8F,0xBE),
+     o2(0x8F,0xBF), o2(0x8F,0xC0), o2(0x8F,0xC1), o2(0x8F,0xC2),
+     o2(0x8F,0xC3), o2(0x8F,0xC4), o2(0x8F,0xC5), o2(0x8F,0xC6),
+     o2(0x8F,0xC7), o2(0xB7,0xF0), o2(0x8F,0xC8), o2(0x8F,0xC9),
+     o2(0x8F,0xCA), o2(0x8F,0xCB), o2(0x8F,0xCC), o2(0x8F,0xCD),
+     o2(0x8F,0xCE), o2(0xB7,0xF1), o2(0x8F,0xCF), o2(0x8F,0xD0),
+     o2(0x8F,0xD1), o2(0x8F,0xD2), o2(0x8F,0xD3), o2(0x8F,0xD4),
+     o2(0x8F,0xD5), o2(0x8F,0xD6), o2(0x8F,0xD7), o2(0x8F,0xD8),
+     o2(0x8F,0xD9), o2(0x8F,0xDA), o2(0x8F,0xDB), o2(0x8F,0xDC),
+     o2(0x8F,0xDD), o2(0x8F,0xDE), o2(0x8F,0xDF), o2(0x8F,0xE0),
+     o2(0x8F,0xE1), o2(0x8F,0xE2), o2(0x8F,0xE3), o2(0x8F,0xE4),
+     o2(0x8F,0xE5), o2(0x8F,0xE6), o2(0x8F,0xE7), o2(0x8F,0xE8),
+     o2(0x8F,0xE9), o2(0xB7,0xF2), o2(0xB7,0xF3), o2(0x8F,0xEA),
+     o2(0x8F,0xEB),
+
+#define to_CP949_EB_A4 WORDINDEX2INFO(23250)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A4_infos,
+
+#define to_CP949_EB_A5_infos WORDINDEX2INFO(23252)
+           INVALID, o2(0xB7,0xF4), o2(0x8F,0xEC), o2(0x8F,0xED),
+     o2(0x8F,0xEE), o2(0xB7,0xF5), o2(0x8F,0xEF), o2(0x8F,0xF0),
+     o2(0x8F,0xF1), o2(0x8F,0xF2), o2(0x8F,0xF3), o2(0x8F,0xF4),
+     o2(0x8F,0xF5), o2(0xB7,0xF6), o2(0x8F,0xF6), o2(0x8F,0xF7),
+     o2(0xB7,0xF7), o2(0x8F,0xF8), o2(0xB7,0xF8), o2(0x8F,0xF9),
+     o2(0x8F,0xFA), o2(0x8F,0xFB), o2(0x8F,0xFC), o2(0x8F,0xFD),
+     o2(0x8F,0xFE), o2(0xB7,0xF9), o2(0xB7,0xFA), o2(0x90,0x41),
+     o2(0x90,0x42), o2(0xB7,0xFB), o2(0x90,0x43), o2(0x90,0x44),
+     o2(0x90,0x45), o2(0xB7,0xFC), o2(0x90,0x46), o2(0x90,0x47),
+     o2(0x90,0x48), o2(0x90,0x49), o2(0x90,0x4A), o2(0x90,0x4B),
+     o2(0x90,0x4C), o2(0xB7,0xFD), o2(0xB7,0xFE), o2(0x90,0x4D),
+     o2(0xB8,0xA1), o2(0x90,0x4E), o2(0xB8,0xA2), o2(0x90,0x4F),
+     o2(0x90,0x50), o2(0x90,0x51), o2(0x90,0x52), o2(0x90,0x53),
+     o2(0x90,0x54), o2(0xB8,0xA3), o2(0xB8,0xA4), o2(0x90,0x55),
+     o2(0x90,0x56), o2(0xB8,0xA5), o2(0x90,0x57), o2(0x90,0x58),
+     o2(0x90,0x59), o2(0xB8,0xA6), o2(0x90,0x5A), o2(0x90,0x61),
+     o2(0x90,0x62),
+
+#define to_CP949_EB_A5 WORDINDEX2INFO(23317)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A5_infos,
+
+#define to_CP949_EB_A6_infos WORDINDEX2INFO(23319)
+           INVALID, o2(0x90,0x63), o2(0x90,0x64), o2(0x90,0x65),
+     o2(0x90,0x66), o2(0xB8,0xA7), o2(0xB8,0xA8), o2(0x90,0x67),
+     o2(0xB8,0xA9), o2(0x90,0x68), o2(0xB8,0xAA), o2(0xB8,0xAB),
+     o2(0x90,0x69), o2(0x90,0x6A), o2(0xB8,0xAC), o2(0xB8,0xAD),
+     o2(0x90,0x6B), o2(0x90,0x6C), o2(0x90,0x6D), o2(0x90,0x6E),
+     o2(0x90,0x6F), o2(0x90,0x70), o2(0x90,0x71), o2(0x90,0x72),
+     o2(0x90,0x73), o2(0x90,0x74), o2(0x90,0x75), o2(0x90,0x76),
+     o2(0x90,0x77), o2(0x90,0x78), o2(0x90,0x79), o2(0x90,0x7A),
+     o2(0x90,0x81), o2(0x90,0x82), o2(0x90,0x83), o2(0x90,0x84),
+     o2(0x90,0x85), o2(0x90,0x86), o2(0x90,0x87), o2(0x90,0x88),
+     o2(0x90,0x89), o2(0x90,0x8A), o2(0x90,0x8B), o2(0x90,0x8C),
+     o2(0x90,0x8D), o2(0xB8,0xAE), o2(0xB8,0xAF), o2(0x90,0x8E),
+     o2(0x90,0x8F), o2(0xB8,0xB0), o2(0x90,0x90), o2(0x90,0x91),
+     o2(0x90,0x92), o2(0xB8,0xB1), o2(0x90,0x93), o2(0x90,0x94),
+     o2(0x90,0x95), o2(0x90,0x96), o2(0x90,0x97), o2(0x90,0x98),
+     o2(0x90,0x99), o2(0xB8,0xB2), o2(0xB8,0xB3), o2(0x90,0x9A),
+     o2(0xB8,0xB4),
+
+#define to_CP949_EB_A6 WORDINDEX2INFO(23384)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A6_infos,
+
+#define to_CP949_EB_A7_infos WORDINDEX2INFO(23386)
+           INVALID, o2(0x90,0x9B), o2(0xB8,0xB5), o2(0x90,0x9C),
+     o2(0x90,0x9D), o2(0x90,0x9E), o2(0x90,0x9F), o2(0x90,0xA0),
+     o2(0x90,0xA1), o2(0xB8,0xB6), o2(0xB8,0xB7), o2(0x90,0xA2),
+     o2(0x90,0xA3), o2(0xB8,0xB8), o2(0x90,0xA4), o2(0xB8,0xB9),
+     o2(0xB8,0xBA), o2(0xB8,0xBB), o2(0xB8,0xBC), o2(0xB8,0xBD),
+     o2(0x90,0xA5), o2(0x90,0xA6), o2(0x90,0xA7), o2(0x90,0xA8),
+     o2(0x90,0xA9), o2(0xB8,0xBE), o2(0xB8,0xBF), o2(0x90,0xAA),
+     o2(0xB8,0xC0), o2(0x90,0xAB), o2(0xB8,0xC1), o2(0xB8,0xC2),
+     o2(0x90,0xAC), o2(0x90,0xAD), o2(0xB8,0xC3), o2(0x90,0xAE),
+     o2(0xB8,0xC4), o2(0xB8,0xC5), o2(0xB8,0xC6), o2(0x90,0xAF),
+     o2(0x90,0xB0), o2(0xB8,0xC7), o2(0x90,0xB1), o2(0x90,0xB2),
+     o2(0x90,0xB3), o2(0xB8,0xC8), o2(0x90,0xB4), o2(0x90,0xB5),
+     o2(0x90,0xB6), o2(0x90,0xB7), o2(0x90,0xB8), o2(0x90,0xB9),
+     o2(0x90,0xBA), o2(0xB8,0xC9), o2(0xB8,0xCA), o2(0x90,0xBB),
+     o2(0xB8,0xCB), o2(0xB8,0xCC), o2(0xB8,0xCD), o2(0xB8,0xCE),
+     o2(0x90,0xBC), o2(0x90,0xBD), o2(0x90,0xBE), o2(0x90,0xBF),
+     o2(0x90,0xC0),
+
+#define to_CP949_EB_A7 WORDINDEX2INFO(23451)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A7_infos,
+
+#define to_CP949_EB_A8_infos WORDINDEX2INFO(23453)
+           INVALID, o2(0xB8,0xCF), o2(0xB8,0xD0), o2(0x90,0xC1),
+     o2(0x90,0xC2), o2(0x90,0xC3), o2(0x90,0xC4), o2(0x90,0xC5),
+     o2(0x90,0xC6), o2(0xB8,0xD1), o2(0x90,0xC7), o2(0x90,0xC8),
+     o2(0x90,0xC9), o2(0x90,0xCA), o2(0x90,0xCB), o2(0x90,0xCC),
+     o2(0x90,0xCD), o2(0x90,0xCE), o2(0x90,0xCF), o2(0x90,0xD0),
+     o2(0x90,0xD1), o2(0x90,0xD2), o2(0xB8,0xD2), o2(0x90,0xD3),
+     o2(0x90,0xD4), o2(0x90,0xD5), o2(0x90,0xD6), o2(0x90,0xD7),
+     o2(0x90,0xD8), o2(0x90,0xD9), o2(0x90,0xDA), o2(0x90,0xDB),
+     o2(0x90,0xDC), o2(0x90,0xDD), o2(0x90,0xDE), o2(0x90,0xDF),
+     o2(0x90,0xE0), o2(0x90,0xE1), o2(0x90,0xE2), o2(0x90,0xE3),
+     o2(0x90,0xE4), o2(0x90,0xE5), o2(0x90,0xE6), o2(0x90,0xE7),
+     o2(0x90,0xE8), o2(0x90,0xE9), o2(0x90,0xEA), o2(0x90,0xEB),
+     o2(0x90,0xEC), o2(0x90,0xED), o2(0x90,0xEE), o2(0x90,0xEF),
+     o2(0x90,0xF0), o2(0x90,0xF1), o2(0x90,0xF2), o2(0x90,0xF3),
+     o2(0x90,0xF4), o2(0xB8,0xD3), o2(0xB8,0xD4), o2(0x90,0xF5),
+     o2(0x90,0xF6), o2(0xB8,0xD5), o2(0x90,0xF7), o2(0x90,0xF8),
+     o2(0x90,0xF9),
+
+#define to_CP949_EB_A8 WORDINDEX2INFO(23518)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A8_infos,
+
+#define to_CP949_EB_A9_infos WORDINDEX2INFO(23520)
+           INVALID, o2(0xB8,0xD6), o2(0x90,0xFA), o2(0xB8,0xD7),
+     o2(0x90,0xFB), o2(0x90,0xFC), o2(0x90,0xFD), o2(0x90,0xFE),
+     o2(0x91,0x41), o2(0xB8,0xD8), o2(0xB8,0xD9), o2(0x91,0x42),
+     o2(0xB8,0xDA), o2(0x91,0x43), o2(0xB8,0xDB), o2(0xB8,0xDC),
+     o2(0x91,0x44), o2(0x91,0x45), o2(0x91,0x46), o2(0x91,0x47),
+     o2(0xB8,0xDD), o2(0xB8,0xDE), o2(0xB8,0xDF), o2(0x91,0x48),
+     o2(0x91,0x49), o2(0xB8,0xE0), o2(0x91,0x4A), o2(0x91,0x4B),
+     o2(0x91,0x4C), o2(0xB8,0xE1), o2(0x91,0x4D), o2(0x91,0x4E),
+     o2(0x91,0x4F), o2(0x91,0x50), o2(0x91,0x51), o2(0x91,0x52),
+     o2(0x91,0x53), o2(0xB8,0xE2), o2(0xB8,0xE3), o2(0x91,0x54),
+     o2(0xB8,0xE4), o2(0xB8,0xE5), o2(0xB8,0xE6), o2(0x91,0x55),
+     o2(0x91,0x56), o2(0x91,0x57), o2(0x91,0x58), o2(0x91,0x59),
+     o2(0x91,0x5A), o2(0xB8,0xE7), o2(0xB8,0xE8), o2(0x91,0x61),
+     o2(0x91,0x62), o2(0xB8,0xE9), o2(0x91,0x63), o2(0x91,0x64),
+     o2(0x91,0x65), o2(0xB8,0xEA), o2(0x91,0x66), o2(0x91,0x67),
+     o2(0x91,0x68), o2(0x91,0x69), o2(0x91,0x6A), o2(0x91,0x6B),
+     o2(0x91,0x6C),
+
+#define to_CP949_EB_A9 WORDINDEX2INFO(23585)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_A9_infos,
+
+#define to_CP949_EB_AA_infos WORDINDEX2INFO(23587)
+           INVALID, o2(0x91,0x6D), o2(0x91,0x6E), o2(0x91,0x6F),
+     o2(0xB8,0xEB), o2(0xB8,0xEC), o2(0xB8,0xED), o2(0x91,0x70),
+     o2(0xB8,0xEE), o2(0x91,0x71), o2(0x91,0x72), o2(0x91,0x73),
+     o2(0x91,0x74), o2(0xB8,0xEF), o2(0x91,0x75), o2(0x91,0x76),
+     o2(0x91,0x77), o2(0x91,0x78), o2(0x91,0x79), o2(0x91,0x7A),
+     o2(0x91,0x81), o2(0x91,0x82), o2(0x91,0x83), o2(0x91,0x84),
+     o2(0x91,0x85), o2(0x91,0x86), o2(0x91,0x87), o2(0x91,0x88),
+     o2(0x91,0x89), o2(0x91,0x8A), o2(0x91,0x8B), o2(0x91,0x8C),
+     o2(0x91,0x8D), o2(0x91,0x8E), o2(0x91,0x8F), o2(0x91,0x90),
+     o2(0x91,0x91), o2(0x91,0x92), o2(0x91,0x93), o2(0x91,0x94),
+     o2(0x91,0x95), o2(0xB8,0xF0), o2(0xB8,0xF1), o2(0x91,0x96),
+     o2(0xB8,0xF2), o2(0xB8,0xF3), o2(0x91,0x97), o2(0x91,0x98),
+     o2(0x91,0x99), o2(0xB8,0xF4), o2(0x91,0x9A), o2(0xB8,0xF5),
+     o2(0x91,0x9B), o2(0x91,0x9C), o2(0x91,0x9D), o2(0x91,0x9E),
+     o2(0x91,0x9F), o2(0xB8,0xF6), o2(0xB8,0xF7), o2(0x91,0xA0),
+     o2(0xB8,0xF8), o2(0x91,0xA1), o2(0xB8,0xF9), o2(0x91,0xA2),
+     o2(0x91,0xA3),
+
+#define to_CP949_EB_AA WORDINDEX2INFO(23652)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AA_infos,
+
+#define to_CP949_EB_AB_infos WORDINDEX2INFO(23654)
+           INVALID, o2(0x91,0xA4), o2(0x91,0xA5), o2(0x91,0xA6),
+     o2(0x91,0xA7), o2(0xB8,0xFA), o2(0x91,0xA8), o2(0x91,0xA9),
+     o2(0x91,0xAA), o2(0xB8,0xFB), o2(0x91,0xAB), o2(0x91,0xAC),
+     o2(0x91,0xAD), o2(0x91,0xAE), o2(0x91,0xAF), o2(0x91,0xB0),
+     o2(0x91,0xB1), o2(0x91,0xB2), o2(0x91,0xB3), o2(0x91,0xB4),
+     o2(0x91,0xB5), o2(0x91,0xB6), o2(0x91,0xB7), o2(0x91,0xB8),
+     o2(0x91,0xB9), o2(0xB8,0xFC), o2(0xB8,0xFD), o2(0x91,0xBA),
+     o2(0x91,0xBB), o2(0x91,0xBC), o2(0x91,0xBD), o2(0x91,0xBE),
+     o2(0x91,0xBF), o2(0x91,0xC0), o2(0x91,0xC1), o2(0x91,0xC2),
+     o2(0x91,0xC3), o2(0x91,0xC4), o2(0x91,0xC5), o2(0x91,0xC6),
+     o2(0x91,0xC7), o2(0x91,0xC8), o2(0x91,0xC9), o2(0x91,0xCA),
+     o2(0x91,0xCB), o2(0x91,0xCC), o2(0x91,0xCD), o2(0x91,0xCE),
+     o2(0x91,0xCF), o2(0x91,0xD0), o2(0x91,0xD1), o2(0x91,0xD2),
+     o2(0x91,0xD3), o2(0x91,0xD4), o2(0x91,0xD5), o2(0x91,0xD6),
+     o2(0x91,0xD7), o2(0x91,0xD8), o2(0x91,0xD9), o2(0x91,0xDA),
+     o2(0x91,0xDB), o2(0xB8,0xFE), o2(0x91,0xDC), o2(0x91,0xDD),
+     o2(0x91,0xDE),
+
+#define to_CP949_EB_AB WORDINDEX2INFO(23719)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AB_infos,
+
+#define to_CP949_EB_AC_infos WORDINDEX2INFO(23721)
+           INVALID, o2(0xB9,0xA1), o2(0x91,0xDF), o2(0x91,0xE0),
+     o2(0x91,0xE1), o2(0xB9,0xA2), o2(0x91,0xE2), o2(0x91,0xE3),
+     o2(0x91,0xE4), o2(0x91,0xE5), o2(0x91,0xE6), o2(0x91,0xE7),
+     o2(0x91,0xE8), o2(0x91,0xE9), o2(0xB9,0xA3), o2(0x91,0xEA),
+     o2(0xB9,0xA4), o2(0x91,0xEB), o2(0xB9,0xA5), o2(0x91,0xEC),
+     o2(0x91,0xED), o2(0x91,0xEE), o2(0x91,0xEF), o2(0x91,0xF0),
+     o2(0x91,0xF1), o2(0xB9,0xA6), o2(0x91,0xF2), o2(0x91,0xF3),
+     o2(0x91,0xF4), o2(0xB9,0xA7), o2(0x91,0xF5), o2(0x91,0xF6),
+     o2(0x91,0xF7), o2(0xB9,0xA8), o2(0x91,0xF8), o2(0x91,0xF9),
+     o2(0x91,0xFA), o2(0x91,0xFB), o2(0x91,0xFC), o2(0x91,0xFD),
+     o2(0x91,0xFE), o2(0x92,0x41), o2(0xB9,0xA9), o2(0x92,0x42),
+     o2(0xB9,0xAA), o2(0x92,0x43), o2(0x92,0x44), o2(0x92,0x45),
+     o2(0x92,0x46), o2(0x92,0x47), o2(0x92,0x48), o2(0x92,0x49),
+     o2(0x92,0x4A), o2(0xB9,0xAB), o2(0xB9,0xAC), o2(0xB9,0xAD),
+     o2(0x92,0x4B), o2(0xB9,0xAE), o2(0x92,0x4C), o2(0x92,0x4D),
+     o2(0xB9,0xAF), o2(0xB9,0xB0), o2(0xB9,0xB1), o2(0xB9,0xB2),
+     o2(0x92,0x4E),
+
+#define to_CP949_EB_AC WORDINDEX2INFO(23786)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AC_infos,
+
+#define to_CP949_EB_AD_infos WORDINDEX2INFO(23788)
+           INVALID, o2(0x92,0x4F), o2(0x92,0x50), o2(0x92,0x51),
+     o2(0x92,0x52), o2(0xB9,0xB3), o2(0xB9,0xB4), o2(0x92,0x53),
+     o2(0xB9,0xB5), o2(0x92,0x54), o2(0xB9,0xB6), o2(0x92,0x55),
+     o2(0x92,0x56), o2(0x92,0x57), o2(0xB9,0xB7), o2(0x92,0x58),
+     o2(0xB9,0xB8), o2(0xB9,0xB9), o2(0x92,0x59), o2(0x92,0x5A),
+     o2(0x92,0x61), o2(0xB9,0xBA), o2(0x92,0x62), o2(0x92,0x63),
+     o2(0x92,0x64), o2(0xB9,0xBB), o2(0x92,0x65), o2(0x92,0x66),
+     o2(0x92,0x67), o2(0x92,0x68), o2(0x92,0x69), o2(0x92,0x6A),
+     o2(0x92,0x6B), o2(0x92,0x6C), o2(0xB9,0xBC), o2(0x92,0x6D),
+     o2(0xB9,0xBD), o2(0x92,0x6E), o2(0x92,0x6F), o2(0x92,0x70),
+     o2(0x92,0x71), o2(0x92,0x72), o2(0x92,0x73), o2(0x92,0x74),
+     o2(0x92,0x75), o2(0xB9,0xBE), o2(0x92,0x76), o2(0x92,0x77),
+     o2(0x92,0x78), o2(0x92,0x79), o2(0x92,0x7A), o2(0x92,0x81),
+     o2(0x92,0x82), o2(0x92,0x83), o2(0x92,0x84), o2(0x92,0x85),
+     o2(0x92,0x86), o2(0x92,0x87), o2(0x92,0x88), o2(0x92,0x89),
+     o2(0x92,0x8A), o2(0x92,0x8B), o2(0x92,0x8C), o2(0x92,0x8D),
+     o2(0x92,0x8E),
+
+#define to_CP949_EB_AD WORDINDEX2INFO(23853)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AD_infos,
+
+#define to_CP949_EB_AE_infos WORDINDEX2INFO(23855)
+           INVALID, o2(0x92,0x8F), o2(0x92,0x90), o2(0x92,0x91),
+     o2(0x92,0x92), o2(0x92,0x93), o2(0x92,0x94), o2(0x92,0x95),
+     o2(0x92,0x96), o2(0xB9,0xBF), o2(0x92,0x97), o2(0x92,0x98),
+     o2(0x92,0x99), o2(0xB9,0xC0), o2(0x92,0x9A), o2(0x92,0x9B),
+     o2(0x92,0x9C), o2(0xB9,0xC1), o2(0x92,0x9D), o2(0x92,0x9E),
+     o2(0x92,0x9F), o2(0x92,0xA0), o2(0x92,0xA1), o2(0x92,0xA2),
+     o2(0x92,0xA3), o2(0x92,0xA4), o2(0x92,0xA5), o2(0x92,0xA6),
+     o2(0x92,0xA7), o2(0x92,0xA8), o2(0x92,0xA9), o2(0x92,0xAA),
+     o2(0x92,0xAB), o2(0x92,0xAC), o2(0x92,0xAD), o2(0x92,0xAE),
+     o2(0x92,0xAF), o2(0xB9,0xC2), o2(0x92,0xB0), o2(0x92,0xB1),
+     o2(0x92,0xB2), o2(0xB9,0xC3), o2(0x92,0xB3), o2(0x92,0xB4),
+     o2(0x92,0xB5), o2(0xB9,0xC4), o2(0x92,0xB6), o2(0x92,0xB7),
+     o2(0x92,0xB8), o2(0x92,0xB9), o2(0x92,0xBA), o2(0x92,0xBB),
+     o2(0x92,0xBC), o2(0xB9,0xC5), o2(0x92,0xBD), o2(0x92,0xBE),
+     o2(0xB9,0xC6), o2(0x92,0xBF), o2(0x92,0xC0), o2(0x92,0xC1),
+     o2(0x92,0xC2), o2(0x92,0xC3), o2(0x92,0xC4), o2(0x92,0xC5),
+     o2(0x92,0xC6),
+
+#define to_CP949_EB_AE WORDINDEX2INFO(23920)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AE_infos,
+
+#define to_CP949_EB_AF_infos WORDINDEX2INFO(23922)
+           INVALID, o2(0xB9,0xC7), o2(0x92,0xC7), o2(0x92,0xC8),
+     o2(0x92,0xC9), o2(0xB9,0xC8), o2(0x92,0xCA), o2(0x92,0xCB),
+     o2(0x92,0xCC), o2(0xB9,0xC9), o2(0x92,0xCD), o2(0x92,0xCE),
+     o2(0x92,0xCF), o2(0x92,0xD0), o2(0x92,0xD1), o2(0x92,0xD2),
+     o2(0x92,0xD3), o2(0xB9,0xCA), o2(0x92,0xD4), o2(0x92,0xD5),
+     o2(0xB9,0xCB), o2(0x92,0xD6), o2(0x92,0xD7), o2(0x92,0xD8),
+     o2(0x92,0xD9), o2(0x92,0xDA), o2(0x92,0xDB), o2(0x92,0xDC),
+     o2(0x92,0xDD), o2(0x92,0xDE), o2(0x92,0xDF), o2(0x92,0xE0),
+     o2(0x92,0xE1), o2(0x92,0xE2), o2(0x92,0xE3), o2(0x92,0xE4),
+     o2(0x92,0xE5), o2(0x92,0xE6), o2(0x92,0xE7), o2(0x92,0xE8),
+     o2(0x92,0xE9), o2(0x92,0xEA), o2(0x92,0xEB), o2(0x92,0xEC),
+     o2(0x92,0xED), o2(0x92,0xEE), o2(0x92,0xEF), o2(0x92,0xF0),
+     o2(0x92,0xF1), o2(0x92,0xF2), o2(0x92,0xF3), o2(0x92,0xF4),
+     o2(0x92,0xF5), o2(0x92,0xF6), o2(0x92,0xF7), o2(0x92,0xF8),
+     o2(0x92,0xF9), o2(0xB9,0xCC), o2(0xB9,0xCD), o2(0x92,0xFA),
+     o2(0x92,0xFB), o2(0xB9,0xCE), o2(0x92,0xFC), o2(0x92,0xFD),
+     o2(0xB9,0xCF),
+
+#define to_CP949_EB_AF WORDINDEX2INFO(23987)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_AF_infos,
+
+#define to_CP949_EB_B0_infos WORDINDEX2INFO(23989)
+           INVALID, o2(0xB9,0xD0), o2(0x92,0xFE), o2(0xB9,0xD1),
+     o2(0x93,0x41), o2(0x93,0x42), o2(0x93,0x43), o2(0x93,0x44),
+     o2(0x93,0x45), o2(0xB9,0xD2), o2(0xB9,0xD3), o2(0x93,0x46),
+     o2(0xB9,0xD4), o2(0xB9,0xD5), o2(0xB9,0xD6), o2(0x93,0x47),
+     o2(0xB9,0xD7), o2(0x93,0x48), o2(0xB9,0xD8), o2(0x93,0x49),
+     o2(0x93,0x4A), o2(0xB9,0xD9), o2(0xB9,0xDA), o2(0xB9,0xDB),
+     o2(0xB9,0xDC), o2(0xB9,0xDD), o2(0x93,0x4B), o2(0x93,0x4C),
+     o2(0xB9,0xDE), o2(0xB9,0xDF), o2(0xB9,0xE0), o2(0xB9,0xE1),
+     o2(0xB9,0xE2), o2(0x93,0x4D), o2(0x93,0x4E), o2(0x93,0x4F),
+     o2(0x93,0x50), o2(0xB9,0xE3), o2(0xB9,0xE4), o2(0x93,0x51),
+     o2(0xB9,0xE5), o2(0x93,0x52), o2(0xB9,0xE6), o2(0x93,0x53),
+     o2(0x93,0x54), o2(0x93,0x55), o2(0xB9,0xE7), o2(0x93,0x56),
+     o2(0x93,0x57), o2(0xB9,0xE8), o2(0xB9,0xE9), o2(0x93,0x58),
+     o2(0x93,0x59), o2(0xB9,0xEA), o2(0x93,0x5A), o2(0x93,0x61),
+     o2(0x93,0x62), o2(0xB9,0xEB), o2(0x93,0x63), o2(0x93,0x64),
+     o2(0x93,0x65), o2(0x93,0x66), o2(0x93,0x67), o2(0x93,0x68),
+     o2(0x93,0x69),
+
+#define to_CP949_EB_B0 WORDINDEX2INFO(24054)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B0_infos,
+
+#define to_CP949_EB_B1_infos WORDINDEX2INFO(24056)
+           INVALID, o2(0xB9,0xEC), o2(0xB9,0xED), o2(0x93,0x6A),
+     o2(0xB9,0xEE), o2(0xB9,0xEF), o2(0xB9,0xF0), o2(0x93,0x6B),
+     o2(0x93,0x6C), o2(0x93,0x6D), o2(0xB9,0xF1), o2(0x93,0x6E),
+     o2(0x93,0x6F), o2(0xB9,0xF2), o2(0xB9,0xF3), o2(0x93,0x70),
+     o2(0x93,0x71), o2(0xB9,0xF4), o2(0x93,0x72), o2(0x93,0x73),
+     o2(0x93,0x74), o2(0x93,0x75), o2(0x93,0x76), o2(0x93,0x77),
+     o2(0x93,0x78), o2(0x93,0x79), o2(0x93,0x7A), o2(0x93,0x81),
+     o2(0x93,0x82), o2(0x93,0x83), o2(0xB9,0xF5), o2(0x93,0x84),
+     o2(0x93,0x85), o2(0x93,0x86), o2(0x93,0x87), o2(0x93,0x88),
+     o2(0x93,0x89), o2(0x93,0x8A), o2(0x93,0x8B), o2(0x93,0x8C),
+     o2(0x93,0x8D), o2(0x93,0x8E), o2(0x93,0x8F), o2(0x93,0x90),
+     o2(0x93,0x91), o2(0x93,0x92), o2(0x93,0x93), o2(0x93,0x94),
+     o2(0x93,0x95), o2(0x93,0x96), o2(0x93,0x97), o2(0x93,0x98),
+     o2(0x93,0x99), o2(0x93,0x9A), o2(0x93,0x9B), o2(0x93,0x9C),
+     o2(0x93,0x9D), o2(0x93,0x9E), o2(0x93,0x9F), o2(0x93,0xA0),
+     o2(0x93,0xA1), o2(0x93,0xA2), o2(0x93,0xA3), o2(0x93,0xA4),
+     o2(0x93,0xA5),
+
+#define to_CP949_EB_B1 WORDINDEX2INFO(24121)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B1_infos,
+
+#define to_CP949_EB_B2_infos WORDINDEX2INFO(24123)
+           INVALID, o2(0x93,0xA6), o2(0x93,0xA7), o2(0x93,0xA8),
+     o2(0x93,0xA9), o2(0xB9,0xF6), o2(0xB9,0xF7), o2(0x93,0xAA),
+     o2(0x93,0xAB), o2(0xB9,0xF8), o2(0x93,0xAC), o2(0x93,0xAD),
+     o2(0xB9,0xF9), o2(0xB9,0xFA), o2(0x93,0xAE), o2(0xB9,0xFB),
+     o2(0x93,0xAF), o2(0x93,0xB0), o2(0x93,0xB1), o2(0x93,0xB2),
+     o2(0x93,0xB3), o2(0xB9,0xFC), o2(0xB9,0xFD), o2(0x93,0xB4),
+     o2(0xB9,0xFE), o2(0x93,0xB5), o2(0xBA,0xA1), o2(0xBA,0xA2),
+     o2(0x93,0xB6), o2(0x93,0xB7), o2(0x93,0xB8), o2(0x93,0xB9),
+     o2(0x93,0xBA), o2(0xBA,0xA3), o2(0xBA,0xA4), o2(0x93,0xBB),
+     o2(0x93,0xBC), o2(0xBA,0xA5), o2(0x93,0xBD), o2(0x93,0xBE),
+     o2(0xBA,0xA6), o2(0xBA,0xA7), o2(0x93,0xBF), o2(0x93,0xC0),
+     o2(0x93,0xC1), o2(0x93,0xC2), o2(0x93,0xC3), o2(0x93,0xC4),
+     o2(0x93,0xC5), o2(0xBA,0xA8), o2(0xBA,0xA9), o2(0x93,0xC6),
+     o2(0xBA,0xAA), o2(0xBA,0xAB), o2(0xBA,0xAC), o2(0x93,0xC7),
+     o2(0x93,0xC8), o2(0x93,0xC9), o2(0x93,0xCA), o2(0x93,0xCB),
+     o2(0x93,0xCC), o2(0xBA,0xAD), o2(0xBA,0xAE), o2(0x93,0xCD),
+     o2(0x93,0xCE),
+
+#define to_CP949_EB_B2 WORDINDEX2INFO(24188)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B2_infos,
+
+#define to_CP949_EB_B3_infos WORDINDEX2INFO(24190)
+           INVALID, o2(0xBA,0xAF), o2(0x93,0xCF), o2(0x93,0xD0),
+     o2(0x93,0xD1), o2(0xBA,0xB0), o2(0x93,0xD2), o2(0x93,0xD3),
+     o2(0x93,0xD4), o2(0x93,0xD5), o2(0x93,0xD6), o2(0x93,0xD7),
+     o2(0x93,0xD8), o2(0x93,0xD9), o2(0xBA,0xB1), o2(0x93,0xDA),
+     o2(0xBA,0xB2), o2(0xBA,0xB3), o2(0xBA,0xB4), o2(0x93,0xDB),
+     o2(0x93,0xDC), o2(0x93,0xDD), o2(0xBA,0xB5), o2(0x93,0xDE),
+     o2(0x93,0xDF), o2(0xBA,0xB6), o2(0x93,0xE0), o2(0x93,0xE1),
+     o2(0x93,0xE2), o2(0xBA,0xB7), o2(0x93,0xE3), o2(0x93,0xE4),
+     o2(0x93,0xE5), o2(0x93,0xE6), o2(0x93,0xE7), o2(0x93,0xE8),
+     o2(0x93,0xE9), o2(0x93,0xEA), o2(0x93,0xEB), o2(0x93,0xEC),
+     o2(0x93,0xED), o2(0x93,0xEE), o2(0x93,0xEF), o2(0x93,0xF0),
+     o2(0x93,0xF1), o2(0x93,0xF2), o2(0x93,0xF3), o2(0x93,0xF4),
+     o2(0x93,0xF5), o2(0x93,0xF6), o2(0x93,0xF7), o2(0x93,0xF8),
+     o2(0x93,0xF9), o2(0xBA,0xB8), o2(0xBA,0xB9), o2(0xBA,0xBA),
+     o2(0x93,0xFA), o2(0xBA,0xBB), o2(0x93,0xFB), o2(0x93,0xFC),
+     o2(0x93,0xFD), o2(0xBA,0xBC), o2(0x93,0xFE), o2(0x94,0x41),
+     o2(0x94,0x42),
+
+#define to_CP949_EB_B3 WORDINDEX2INFO(24255)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B3_infos,
+
+#define to_CP949_EB_B4_infos WORDINDEX2INFO(24257)
+           INVALID, o2(0x94,0x43), o2(0x94,0x44), o2(0x94,0x45),
+     o2(0x94,0x46), o2(0xBA,0xBD), o2(0xBA,0xBE), o2(0x94,0x47),
+     o2(0xBA,0xBF), o2(0x94,0x48), o2(0xBA,0xC0), o2(0x94,0x49),
+     o2(0x94,0x4A), o2(0x94,0x4B), o2(0x94,0x4C), o2(0x94,0x4D),
+     o2(0x94,0x4E), o2(0xBA,0xC1), o2(0x94,0x4F), o2(0x94,0x50),
+     o2(0x94,0x51), o2(0xBA,0xC2), o2(0x94,0x52), o2(0x94,0x53),
+     o2(0x94,0x54), o2(0x94,0x55), o2(0x94,0x56), o2(0x94,0x57),
+     o2(0x94,0x58), o2(0x94,0x59), o2(0x94,0x5A), o2(0x94,0x61),
+     o2(0x94,0x62), o2(0x94,0x63), o2(0x94,0x64), o2(0x94,0x65),
+     o2(0x94,0x66), o2(0xBA,0xC3), o2(0x94,0x67), o2(0x94,0x68),
+     o2(0x94,0x69), o2(0x94,0x6A), o2(0x94,0x6B), o2(0x94,0x6C),
+     o2(0x94,0x6D), o2(0xBA,0xC4), o2(0x94,0x6E), o2(0x94,0x6F),
+     o2(0x94,0x70), o2(0x94,0x71), o2(0x94,0x72), o2(0x94,0x73),
+     o2(0x94,0x74), o2(0x94,0x75), o2(0x94,0x76), o2(0x94,0x77),
+     o2(0x94,0x78), o2(0x94,0x79), o2(0x94,0x7A), o2(0x94,0x81),
+     o2(0x94,0x82), o2(0x94,0x83), o2(0x94,0x84), o2(0x94,0x85),
+     o2(0x94,0x86),
+
+#define to_CP949_EB_B4 WORDINDEX2INFO(24322)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B4_infos,
+
+#define to_CP949_EB_B5_infos WORDINDEX2INFO(24324)
+           INVALID, o2(0xBA,0xC5), o2(0x94,0x87), o2(0x94,0x88),
+     o2(0x94,0x89), o2(0x94,0x8A), o2(0x94,0x8B), o2(0x94,0x8C),
+     o2(0x94,0x8D), o2(0xBA,0xC6), o2(0xBA,0xC7), o2(0x94,0x8E),
+     o2(0x94,0x8F), o2(0xBA,0xC8), o2(0x94,0x90), o2(0x94,0x91),
+     o2(0x94,0x92), o2(0xBA,0xC9), o2(0x94,0x93), o2(0x94,0x94),
+     o2(0x94,0x95), o2(0x94,0x96), o2(0x94,0x97), o2(0x94,0x98),
+     o2(0x94,0x99), o2(0xBA,0xCA), o2(0xBA,0xCB), o2(0x94,0x9A),
+     o2(0x94,0x9B), o2(0x94,0x9C), o2(0x94,0x9D), o2(0x94,0x9E),
+     o2(0x94,0x9F), o2(0x94,0xA0), o2(0x94,0xA1), o2(0x94,0xA2),
+     o2(0x94,0xA3), o2(0xBA,0xCC), o2(0x94,0xA4), o2(0x94,0xA5),
+     o2(0x94,0xA6), o2(0xBA,0xCD), o2(0x94,0xA7), o2(0x94,0xA8),
+     o2(0x94,0xA9), o2(0x94,0xAA), o2(0x94,0xAB), o2(0x94,0xAC),
+     o2(0x94,0xAD), o2(0x94,0xAE), o2(0x94,0xAF), o2(0x94,0xB0),
+     o2(0x94,0xB1), o2(0x94,0xB2), o2(0x94,0xB3), o2(0x94,0xB4),
+     o2(0x94,0xB5), o2(0x94,0xB6), o2(0x94,0xB7), o2(0x94,0xB8),
+     o2(0x94,0xB9), o2(0x94,0xBA), o2(0x94,0xBB), o2(0x94,0xBC),
+     o2(0x94,0xBD),
+
+#define to_CP949_EB_B5 WORDINDEX2INFO(24389)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B5_infos,
+
+#define to_CP949_EB_B6_infos WORDINDEX2INFO(24391)
+           INVALID, o2(0xBA,0xCE), o2(0xBA,0xCF), o2(0x94,0xBE),
+     o2(0x94,0xBF), o2(0xBA,0xD0), o2(0x94,0xC0), o2(0x94,0xC1),
+     o2(0xBA,0xD1), o2(0xBA,0xD2), o2(0xBA,0xD3), o2(0xBA,0xD4),
+     o2(0x94,0xC2), o2(0x94,0xC3), o2(0x94,0xC4), o2(0x94,0xC5),
+     o2(0x94,0xC6), o2(0xBA,0xD5), o2(0xBA,0xD6), o2(0x94,0xC7),
+     o2(0xBA,0xD7), o2(0x94,0xC8), o2(0xBA,0xD8), o2(0x94,0xC9),
+     o2(0x94,0xCA), o2(0x94,0xCB), o2(0xBA,0xD9), o2(0xBA,0xDA),
+     o2(0x94,0xCC), o2(0xBA,0xDB), o2(0x94,0xCD), o2(0x94,0xCE),
+     o2(0x94,0xCF), o2(0x94,0xD0), o2(0x94,0xD1), o2(0x94,0xD2),
+     o2(0x94,0xD3), o2(0xBA,0xDC), o2(0x94,0xD4), o2(0x94,0xD5),
+     o2(0x94,0xD6), o2(0x94,0xD7), o2(0x94,0xD8), o2(0x94,0xD9),
+     o2(0x94,0xDA), o2(0x94,0xDB), o2(0x94,0xDC), o2(0x94,0xDD),
+     o2(0x94,0xDE), o2(0xBA,0xDD), o2(0x94,0xDF), o2(0x94,0xE0),
+     o2(0x94,0xE1), o2(0x94,0xE2), o2(0x94,0xE3), o2(0x94,0xE4),
+     o2(0x94,0xE5), o2(0xBA,0xDE), o2(0x94,0xE6), o2(0x94,0xE7),
+     o2(0x94,0xE8), o2(0x94,0xE9), o2(0x94,0xEA), o2(0x94,0xEB),
+     o2(0x94,0xEC),
+
+#define to_CP949_EB_B6 WORDINDEX2INFO(24456)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B6_infos,
+
+#define to_CP949_EB_B7_infos WORDINDEX2INFO(24458)
+           INVALID, o2(0x94,0xED), o2(0x94,0xEE), o2(0x94,0xEF),
+     o2(0x94,0xF0), o2(0x94,0xF1), o2(0x94,0xF2), o2(0x94,0xF3),
+     o2(0x94,0xF4), o2(0x94,0xF5), o2(0x94,0xF6), o2(0x94,0xF7),
+     o2(0x94,0xF8), o2(0x94,0xF9), o2(0x94,0xFA), o2(0x94,0xFB),
+     o2(0x94,0xFC), o2(0x94,0xFD), o2(0x94,0xFE), o2(0x95,0x41),
+     o2(0x95,0x42), o2(0xBA,0xDF), o2(0xBA,0xE0), o2(0x95,0x43),
+     o2(0x95,0x44), o2(0xBA,0xE1), o2(0x95,0x45), o2(0x95,0x46),
+     o2(0x95,0x47), o2(0xBA,0xE2), o2(0x95,0x48), o2(0x95,0x49),
+     o2(0x95,0x4A), o2(0x95,0x4B), o2(0x95,0x4C), o2(0x95,0x4D),
+     o2(0x95,0x4E), o2(0x95,0x4F), o2(0x95,0x50), o2(0x95,0x51),
+     o2(0x95,0x52), o2(0x95,0x53), o2(0xBA,0xE3), o2(0x95,0x54),
+     o2(0x95,0x55), o2(0x95,0x56), o2(0x95,0x57), o2(0x95,0x58),
+     o2(0x95,0x59), o2(0xBA,0xE4), o2(0x95,0x5A), o2(0x95,0x61),
+     o2(0x95,0x62), o2(0xBA,0xE5), o2(0x95,0x63), o2(0x95,0x64),
+     o2(0x95,0x65), o2(0xBA,0xE6), o2(0x95,0x66), o2(0x95,0x67),
+     o2(0x95,0x68), o2(0x95,0x69), o2(0x95,0x6A), o2(0x95,0x6B),
+     o2(0x95,0x6C),
+
+#define to_CP949_EB_B7 WORDINDEX2INFO(24523)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B7_infos,
+
+#define to_CP949_EB_B8_infos WORDINDEX2INFO(24525)
+           INVALID, o2(0xBA,0xE7), o2(0x95,0x6D), o2(0x95,0x6E),
+     o2(0xBA,0xE8), o2(0x95,0x6F), o2(0xBA,0xE9), o2(0x95,0x70),
+     o2(0x95,0x71), o2(0x95,0x72), o2(0x95,0x73), o2(0x95,0x74),
+     o2(0x95,0x75), o2(0xBA,0xEA), o2(0xBA,0xEB), o2(0x95,0x76),
+     o2(0x95,0x77), o2(0xBA,0xEC), o2(0x95,0x78), o2(0x95,0x79),
+     o2(0x95,0x7A), o2(0xBA,0xED), o2(0x95,0x81), o2(0x95,0x82),
+     o2(0x95,0x83), o2(0x95,0x84), o2(0x95,0x85), o2(0x95,0x86),
+     o2(0x95,0x87), o2(0xBA,0xEE), o2(0xBA,0xEF), o2(0x95,0x88),
+     o2(0xBA,0xF0), o2(0x95,0x89), o2(0x95,0x8A), o2(0x95,0x8B),
+     o2(0x95,0x8C), o2(0x95,0x8D), o2(0x95,0x8E), o2(0x95,0x8F),
+     o2(0x95,0x90), o2(0x95,0x91), o2(0x95,0x92), o2(0x95,0x93),
+     o2(0x95,0x94), o2(0x95,0x95), o2(0x95,0x96), o2(0x95,0x97),
+     o2(0x95,0x98), o2(0x95,0x99), o2(0x95,0x9A), o2(0x95,0x9B),
+     o2(0x95,0x9C), o2(0x95,0x9D), o2(0x95,0x9E), o2(0x95,0x9F),
+     o2(0x95,0xA0), o2(0x95,0xA1), o2(0x95,0xA2), o2(0x95,0xA3),
+     o2(0x95,0xA4), o2(0x95,0xA5), o2(0x95,0xA6), o2(0x95,0xA7),
+     o2(0x95,0xA8),
+
+#define to_CP949_EB_B8 WORDINDEX2INFO(24590)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B8_infos,
+
+#define to_CP949_EB_B9_infos WORDINDEX2INFO(24592)
+           INVALID, o2(0x95,0xA9), o2(0x95,0xAA), o2(0x95,0xAB),
+     o2(0x95,0xAC), o2(0xBA,0xF1), o2(0xBA,0xF2), o2(0x95,0xAD),
+     o2(0x95,0xAE), o2(0xBA,0xF3), o2(0x95,0xAF), o2(0x95,0xB0),
+     o2(0x95,0xB1), o2(0xBA,0xF4), o2(0x95,0xB2), o2(0xBA,0xF5),
+     o2(0x95,0xB3), o2(0x95,0xB4), o2(0x95,0xB5), o2(0x95,0xB6),
+     o2(0x95,0xB7), o2(0xBA,0xF6), o2(0xBA,0xF7), o2(0x95,0xB8),
+     o2(0xBA,0xF8), o2(0x95,0xB9), o2(0xBA,0xF9), o2(0xBA,0xFA),
+     o2(0xBA,0xFB), o2(0x95,0xBA), o2(0x95,0xBB), o2(0x95,0xBC),
+     o2(0x95,0xBD), o2(0xBA,0xFC), o2(0xBA,0xFD), o2(0x95,0xBE),
+     o2(0x95,0xBF), o2(0xBA,0xFE), o2(0x95,0xC0), o2(0x95,0xC1),
+     o2(0x95,0xC2), o2(0xBB,0xA1), o2(0x95,0xC3), o2(0xBB,0xA2),
+     o2(0x95,0xC4), o2(0x95,0xC5), o2(0x95,0xC6), o2(0x95,0xC7),
+     o2(0x95,0xC8), o2(0xBB,0xA3), o2(0xBB,0xA4), o2(0x95,0xC9),
+     o2(0xBB,0xA5), o2(0xBB,0xA6), o2(0xBB,0xA7), o2(0x95,0xCA),
+     o2(0x95,0xCB), o2(0x95,0xCC), o2(0x95,0xCD), o2(0x95,0xCE),
+     o2(0xBB,0xA8), o2(0xBB,0xA9), o2(0xBB,0xAA), o2(0x95,0xCF),
+     o2(0x95,0xD0),
+
+#define to_CP949_EB_B9 WORDINDEX2INFO(24657)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_B9_infos,
+
+#define to_CP949_EB_BA_infos WORDINDEX2INFO(24659)
+           INVALID, o2(0xBB,0xAB), o2(0x95,0xD1), o2(0x95,0xD2),
+     o2(0x95,0xD3), o2(0xBB,0xAC), o2(0x95,0xD4), o2(0x95,0xD5),
+     o2(0x95,0xD6), o2(0x95,0xD7), o2(0x95,0xD8), o2(0x95,0xD9),
+     o2(0x95,0xDA), o2(0xBB,0xAD), o2(0xBB,0xAE), o2(0x95,0xDB),
+     o2(0xBB,0xAF), o2(0xBB,0xB0), o2(0xBB,0xB1), o2(0x95,0xDC),
+     o2(0x95,0xDD), o2(0x95,0xDE), o2(0x95,0xDF), o2(0x95,0xE0),
+     o2(0x95,0xE1), o2(0xBB,0xB2), o2(0xBB,0xB3), o2(0x95,0xE2),
+     o2(0x95,0xE3), o2(0x95,0xE4), o2(0x95,0xE5), o2(0x95,0xE6),
+     o2(0x95,0xE7), o2(0x95,0xE8), o2(0x95,0xE9), o2(0x95,0xEA),
+     o2(0x95,0xEB), o2(0x95,0xEC), o2(0x95,0xED), o2(0x95,0xEE),
+     o2(0x95,0xEF), o2(0xBB,0xB4), o2(0x95,0xF0), o2(0x95,0xF1),
+     o2(0x95,0xF2), o2(0x95,0xF3), o2(0x95,0xF4), o2(0x95,0xF5),
+     o2(0x95,0xF6), o2(0x95,0xF7), o2(0x95,0xF8), o2(0x95,0xF9),
+     o2(0x95,0xFA), o2(0x95,0xFB), o2(0x95,0xFC), o2(0x95,0xFD),
+     o2(0x95,0xFE), o2(0x96,0x41), o2(0x96,0x42), o2(0x96,0x43),
+     o2(0x96,0x44), o2(0x96,0x45), o2(0x96,0x46), o2(0x96,0x47),
+     o2(0x96,0x48),
+
+#define to_CP949_EB_BA WORDINDEX2INFO(24724)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BA_infos,
+
+#define to_CP949_EB_BB_infos WORDINDEX2INFO(24726)
+           INVALID, o2(0x96,0x49), o2(0x96,0x4A), o2(0x96,0x4B),
+     o2(0x96,0x4C), o2(0x96,0x4D), o2(0x96,0x4E), o2(0x96,0x4F),
+     o2(0x96,0x50), o2(0x96,0x51), o2(0x96,0x52), o2(0x96,0x53),
+     o2(0x96,0x54), o2(0x96,0x55), o2(0x96,0x56), o2(0x96,0x57),
+     o2(0x96,0x58), o2(0xBB,0xB5), o2(0xBB,0xB6), o2(0x96,0x59),
+     o2(0x96,0x5A), o2(0xBB,0xB7), o2(0x96,0x61), o2(0x96,0x62),
+     o2(0xBB,0xB8), o2(0xBB,0xB9), o2(0x96,0x63), o2(0x96,0x64),
+     o2(0x96,0x65), o2(0x96,0x66), o2(0x96,0x67), o2(0x96,0x68),
+     o2(0x96,0x69), o2(0xBB,0xBA), o2(0x96,0x6A), o2(0x96,0x6B),
+     o2(0xBB,0xBB), o2(0xBB,0xBC), o2(0xBB,0xBD), o2(0x96,0x6C),
+     o2(0x96,0x6D), o2(0x96,0x6E), o2(0x96,0x6F), o2(0x96,0x70),
+     o2(0x96,0x71), o2(0xBB,0xBE), o2(0x96,0x72), o2(0x96,0x73),
+     o2(0x96,0x74), o2(0x96,0x75), o2(0x96,0x76), o2(0x96,0x77),
+     o2(0x96,0x78), o2(0x96,0x79), o2(0x96,0x7A), o2(0x96,0x81),
+     o2(0x96,0x82), o2(0x96,0x83), o2(0x96,0x84), o2(0x96,0x85),
+     o2(0x96,0x86), o2(0x96,0x87), o2(0x96,0x88), o2(0x96,0x89),
+     o2(0x96,0x8A),
+
+#define to_CP949_EB_BB WORDINDEX2INFO(24791)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BB_infos,
+
+#define to_CP949_EB_BC_infos WORDINDEX2INFO(24793)
+           INVALID, o2(0x96,0x8B), o2(0xBB,0xBF), o2(0x96,0x8C),
+     o2(0x96,0x8D), o2(0x96,0x8E), o2(0x96,0x8F), o2(0x96,0x90),
+     o2(0x96,0x91), o2(0xBB,0xC0), o2(0xBB,0xC1), o2(0x96,0x92),
+     o2(0x96,0x93), o2(0x96,0x94), o2(0x96,0x95), o2(0x96,0x96),
+     o2(0x96,0x97), o2(0x96,0x98), o2(0x96,0x99), o2(0x96,0x9A),
+     o2(0x96,0x9B), o2(0x96,0x9C), o2(0x96,0x9D), o2(0x96,0x9E),
+     o2(0x96,0x9F), o2(0xBB,0xC2), o2(0xBB,0xC3), o2(0x96,0xA0),
+     o2(0xBB,0xC4), o2(0xBB,0xC5), o2(0xBB,0xC6), o2(0x96,0xA1),
+     o2(0x96,0xA2), o2(0x96,0xA3), o2(0x96,0xA4), o2(0x96,0xA5),
+     o2(0x96,0xA6), o2(0x96,0xA7), o2(0x96,0xA8), o2(0x96,0xA9),
+     o2(0x96,0xAA), o2(0x96,0xAB), o2(0x96,0xAC), o2(0x96,0xAD),
+     o2(0x96,0xAE), o2(0x96,0xAF), o2(0x96,0xB0), o2(0x96,0xB1),
+     o2(0x96,0xB2), o2(0x96,0xB3), o2(0x96,0xB4), o2(0x96,0xB5),
+     o2(0x96,0xB6), o2(0x96,0xB7), o2(0x96,0xB8), o2(0x96,0xB9),
+     o2(0x96,0xBA), o2(0x96,0xBB), o2(0x96,0xBC), o2(0x96,0xBD),
+     o2(0x96,0xBE), o2(0x96,0xBF), o2(0x96,0xC0), o2(0x96,0xC1),
+     o2(0x96,0xC2),
+
+#define to_CP949_EB_BC WORDINDEX2INFO(24858)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BC_infos,
+
+#define to_CP949_EB_BD_infos WORDINDEX2INFO(24860)
+           INVALID, o2(0xBB,0xC7), o2(0xBB,0xC8), o2(0x96,0xC3),
+     o2(0x96,0xC4), o2(0xBB,0xC9), o2(0x96,0xC5), o2(0x96,0xC6),
+     o2(0x96,0xC7), o2(0xBB,0xCA), o2(0x96,0xC8), o2(0x96,0xC9),
+     o2(0x96,0xCA), o2(0x96,0xCB), o2(0x96,0xCC), o2(0x96,0xCD),
+     o2(0x96,0xCE), o2(0xBB,0xCB), o2(0xBB,0xCC), o2(0x96,0xCF),
+     o2(0x96,0xD0), o2(0x96,0xD1), o2(0xBB,0xCD), o2(0x96,0xD2),
+     o2(0x96,0xD3), o2(0x96,0xD4), o2(0x96,0xD5), o2(0x96,0xD6),
+     o2(0x96,0xD7), o2(0x96,0xD8), o2(0x96,0xD9), o2(0x96,0xDA),
+     o2(0x96,0xDB), o2(0x96,0xDC), o2(0x96,0xDD), o2(0x96,0xDE),
+     o2(0x96,0xDF), o2(0x96,0xE0), o2(0x96,0xE1), o2(0x96,0xE2),
+     o2(0x96,0xE3), o2(0x96,0xE4), o2(0x96,0xE5), o2(0x96,0xE6),
+     o2(0x96,0xE7), o2(0x96,0xE8), o2(0x96,0xE9), o2(0x96,0xEA),
+     o2(0x96,0xEB), o2(0x96,0xEC), o2(0x96,0xED), o2(0x96,0xEE),
+     o2(0x96,0xEF), o2(0x96,0xF0), o2(0x96,0xF1), o2(0x96,0xF2),
+     o2(0x96,0xF3), o2(0x96,0xF4), o2(0x96,0xF5), o2(0x96,0xF6),
+     o2(0x96,0xF7), o2(0x96,0xF8), o2(0x96,0xF9), o2(0x96,0xFA),
+     o2(0x96,0xFB),
+
+#define to_CP949_EB_BD WORDINDEX2INFO(24925)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BD_infos,
+
+#define to_CP949_EB_BE_infos WORDINDEX2INFO(24927)
+           INVALID, o2(0x96,0xFC), o2(0x96,0xFD), o2(0x96,0xFE),
+     o2(0x97,0x41), o2(0x97,0x42), o2(0x97,0x43), o2(0x97,0x44),
+     o2(0x97,0x45), o2(0x97,0x46), o2(0x97,0x47), o2(0x97,0x48),
+     o2(0x97,0x49), o2(0x97,0x4A), o2(0x97,0x4B), o2(0x97,0x4C),
+     o2(0x97,0x4D), o2(0x97,0x4E), o2(0x97,0x4F), o2(0x97,0x50),
+     o2(0x97,0x51), o2(0xBB,0xCE), o2(0x97,0x52), o2(0x97,0x53),
+     o2(0x97,0x54), o2(0x97,0x55), o2(0x97,0x56), o2(0x97,0x57),
+     o2(0x97,0x58), o2(0x97,0x59), o2(0x97,0x5A), o2(0x97,0x61),
+     o2(0x97,0x62), o2(0x97,0x63), o2(0x97,0x64), o2(0x97,0x65),
+     o2(0x97,0x66), o2(0x97,0x67), o2(0x97,0x68), o2(0x97,0x69),
+     o2(0x97,0x6A), o2(0x97,0x6B), o2(0x97,0x6C), o2(0x97,0x6D),
+     o2(0x97,0x6E), o2(0x97,0x6F), o2(0x97,0x70), o2(0x97,0x71),
+     o2(0x97,0x72), o2(0xBB,0xCF), o2(0x97,0x73), o2(0x97,0x74),
+     o2(0x97,0x75), o2(0x97,0x76), o2(0x97,0x77), o2(0x97,0x78),
+     o2(0x97,0x79), o2(0x97,0x7A), o2(0x97,0x81), o2(0x97,0x82),
+     o2(0x97,0x83), o2(0x97,0x84), o2(0x97,0x85), o2(0x97,0x86),
+     o2(0x97,0x87),
+
+#define to_CP949_EB_BE WORDINDEX2INFO(24992)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BE_infos,
+
+#define to_CP949_EB_BF_infos WORDINDEX2INFO(24994)
+           INVALID, o2(0x97,0x88), o2(0x97,0x89), o2(0x97,0x8A),
+     o2(0x97,0x8B), o2(0x97,0x8C), o2(0xBB,0xD0), o2(0x97,0x8D),
+     o2(0x97,0x8E), o2(0x97,0x8F), o2(0x97,0x90), o2(0x97,0x91),
+     o2(0x97,0x92), o2(0xBB,0xD1), o2(0xBB,0xD2), o2(0x97,0x93),
+     o2(0x97,0x94), o2(0xBB,0xD3), o2(0x97,0x95), o2(0x97,0x96),
+     o2(0x97,0x97), o2(0xBB,0xD4), o2(0x97,0x98), o2(0x97,0x99),
+     o2(0x97,0x9A), o2(0x97,0x9B), o2(0x97,0x9C), o2(0x97,0x9D),
+     o2(0x97,0x9E), o2(0xBB,0xD5), o2(0x97,0x9F), o2(0x97,0xA0),
+     o2(0xBB,0xD6), o2(0x97,0xA1), o2(0xBB,0xD7), o2(0x97,0xA2),
+     o2(0x97,0xA3), o2(0x97,0xA4), o2(0x97,0xA5), o2(0x97,0xA6),
+     o2(0x97,0xA7), o2(0x97,0xA8), o2(0x97,0xA9), o2(0x97,0xAA),
+     o2(0x97,0xAB), o2(0x97,0xAC), o2(0x97,0xAD), o2(0x97,0xAE),
+     o2(0x97,0xAF), o2(0x97,0xB0), o2(0x97,0xB1), o2(0x97,0xB2),
+     o2(0x97,0xB3), o2(0x97,0xB4), o2(0x97,0xB5), o2(0x97,0xB6),
+     o2(0x97,0xB7), o2(0x97,0xB8), o2(0x97,0xB9), o2(0x97,0xBA),
+     o2(0x97,0xBB), o2(0x97,0xBC), o2(0x97,0xBD), o2(0x97,0xBE),
+     o2(0x97,0xBF),
+
+#define to_CP949_EB_BF WORDINDEX2INFO(25059)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_BF_infos,
+
+#define to_CP949_EB_infos WORDINDEX2INFO(25061)
+            INVALID, to_CP949_EB_80, to_CP949_EB_81, to_CP949_EB_82,
+     to_CP949_EB_83, to_CP949_EB_84, to_CP949_EB_85, to_CP949_EB_86,
+     to_CP949_EB_87, to_CP949_EB_88, to_CP949_EB_89, to_CP949_EB_8A,
+     to_CP949_EB_8B, to_CP949_EB_8C, to_CP949_EB_8D, to_CP949_EB_8E,
+     to_CP949_EB_8F, to_CP949_EB_90, to_CP949_EB_91, to_CP949_EB_92,
+     to_CP949_EB_93, to_CP949_EB_94, to_CP949_EB_95, to_CP949_EB_96,
+     to_CP949_EB_97, to_CP949_EB_98, to_CP949_EB_99, to_CP949_EB_9A,
+     to_CP949_EB_9B, to_CP949_EB_9C, to_CP949_EB_9D, to_CP949_EB_9E,
+     to_CP949_EB_9F, to_CP949_EB_A0, to_CP949_EB_A1, to_CP949_EB_A2,
+     to_CP949_EB_A3, to_CP949_EB_A4, to_CP949_EB_A5, to_CP949_EB_A6,
+     to_CP949_EB_A7, to_CP949_EB_A8, to_CP949_EB_A9, to_CP949_EB_AA,
+     to_CP949_EB_AB, to_CP949_EB_AC, to_CP949_EB_AD, to_CP949_EB_AE,
+     to_CP949_EB_AF, to_CP949_EB_B0, to_CP949_EB_B1, to_CP949_EB_B2,
+     to_CP949_EB_B3, to_CP949_EB_B4, to_CP949_EB_B5, to_CP949_EB_B6,
+     to_CP949_EB_B7, to_CP949_EB_B8, to_CP949_EB_B9, to_CP949_EB_BA,
+     to_CP949_EB_BB, to_CP949_EB_BC, to_CP949_EB_BD, to_CP949_EB_BE,
+     to_CP949_EB_BF,
+
+#define to_CP949_EB WORDINDEX2INFO(25126)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EB_infos,
+
+#define to_CP949_EC_80_infos WORDINDEX2INFO(25128)
+           INVALID, o2(0x97,0xC0), o2(0x97,0xC1), o2(0x97,0xC2),
+     o2(0x97,0xC3), o2(0x97,0xC4), o2(0x97,0xC5), o2(0x97,0xC6),
+     o2(0x97,0xC7), o2(0x97,0xC8), o2(0x97,0xC9), o2(0x97,0xCA),
+     o2(0x97,0xCB), o2(0x97,0xCC), o2(0x97,0xCD), o2(0x97,0xCE),
+     o2(0x97,0xCF), o2(0x97,0xD0), o2(0x97,0xD1), o2(0x97,0xD2),
+     o2(0x97,0xD3), o2(0x97,0xD4), o2(0x97,0xD5), o2(0x97,0xD6),
+     o2(0x97,0xD7), o2(0x97,0xD8), o2(0x97,0xD9), o2(0x97,0xDA),
+     o2(0x97,0xDB), o2(0x97,0xDC), o2(0x97,0xDD), o2(0x97,0xDE),
+     o2(0x97,0xDF), o2(0x97,0xE0), o2(0x97,0xE1), o2(0x97,0xE2),
+     o2(0x97,0xE3), o2(0x97,0xE4), o2(0x97,0xE5), o2(0x97,0xE6),
+     o2(0x97,0xE7), o2(0x97,0xE8), o2(0x97,0xE9), o2(0x97,0xEA),
+     o2(0x97,0xEB), o2(0x97,0xEC), o2(0x97,0xED), o2(0x97,0xEE),
+     o2(0x97,0xEF), o2(0x97,0xF0), o2(0x97,0xF1), o2(0x97,0xF2),
+     o2(0x97,0xF3), o2(0x97,0xF4), o2(0x97,0xF5), o2(0x97,0xF6),
+     o2(0x97,0xF7), o2(0x97,0xF8), o2(0x97,0xF9), o2(0x97,0xFA),
+     o2(0x97,0xFB), o2(0xBB,0xD8), o2(0x97,0xFC), o2(0x97,0xFD),
+     o2(0x97,0xFE),
+
+#define to_CP949_EC_80 WORDINDEX2INFO(25193)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_80_infos,
+
+#define to_CP949_EC_81_infos WORDINDEX2INFO(25195)
+           INVALID, o2(0x98,0x41), o2(0x98,0x42), o2(0x98,0x43),
+     o2(0x98,0x44), o2(0x98,0x45), o2(0x98,0x46), o2(0x98,0x47),
+     o2(0x98,0x48), o2(0x98,0x49), o2(0x98,0x4A), o2(0x98,0x4B),
+     o2(0x98,0x4C), o2(0x98,0x4D), o2(0x98,0x4E), o2(0x98,0x4F),
+     o2(0x98,0x50), o2(0x98,0x51), o2(0xBB,0xD9), o2(0x98,0x52),
+     o2(0x98,0x53), o2(0x98,0x54), o2(0x98,0x55), o2(0x98,0x56),
+     o2(0x98,0x57), o2(0xBB,0xDA), o2(0x98,0x58), o2(0x98,0x59),
+     o2(0x98,0x5A), o2(0xBB,0xDB), o2(0x98,0x61), o2(0x98,0x62),
+     o2(0x98,0x63), o2(0xBB,0xDC), o2(0x98,0x64), o2(0x98,0x65),
+     o2(0x98,0x66), o2(0x98,0x67), o2(0x98,0x68), o2(0x98,0x69),
+     o2(0x98,0x6A), o2(0xBB,0xDD), o2(0xBB,0xDE), o2(0x98,0x6B),
+     o2(0x98,0x6C), o2(0x98,0x6D), o2(0x98,0x6E), o2(0x98,0x6F),
+     o2(0x98,0x70), o2(0x98,0x71), o2(0x98,0x72), o2(0x98,0x73),
+     o2(0x98,0x74), o2(0x98,0x75), o2(0x98,0x76), o2(0x98,0x77),
+     o2(0x98,0x78), o2(0x98,0x79), o2(0x98,0x7A), o2(0x98,0x81),
+     o2(0x98,0x82), o2(0x98,0x83), o2(0x98,0x84), o2(0x98,0x85),
+     o2(0x98,0x86),
+
+#define to_CP949_EC_81 WORDINDEX2INFO(25260)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_81_infos,
+
+#define to_CP949_EC_82_infos WORDINDEX2INFO(25262)
+           INVALID, o2(0x98,0x87), o2(0x98,0x88), o2(0x98,0x89),
+     o2(0x98,0x8A), o2(0x98,0x8B), o2(0x98,0x8C), o2(0x98,0x8D),
+     o2(0x98,0x8E), o2(0x98,0x8F), o2(0x98,0x90), o2(0x98,0x91),
+     o2(0x98,0x92), o2(0x98,0x93), o2(0x98,0x94), o2(0x98,0x95),
+     o2(0x98,0x96), o2(0xBB,0xDF), o2(0xBB,0xE0), o2(0x98,0x97),
+     o2(0x98,0x98), o2(0xBB,0xE1), o2(0x98,0x99), o2(0x98,0x9A),
+     o2(0x98,0x9B), o2(0xBB,0xE2), o2(0x98,0x9C), o2(0x98,0x9D),
+     o2(0x98,0x9E), o2(0x98,0x9F), o2(0x98,0xA0), o2(0x98,0xA1),
+     o2(0x98,0xA2), o2(0xBB,0xE3), o2(0xBB,0xE4), o2(0x98,0xA3),
+     o2(0xBB,0xE5), o2(0x98,0xA4), o2(0xBB,0xE6), o2(0x98,0xA5),
+     o2(0x98,0xA6), o2(0x98,0xA7), o2(0x98,0xA8), o2(0x98,0xA9),
+     o2(0x98,0xAA), o2(0xBB,0xE7), o2(0xBB,0xE8), o2(0x98,0xAB),
+     o2(0xBB,0xE9), o2(0xBB,0xEA), o2(0x98,0xAC), o2(0x98,0xAD),
+     o2(0xBB,0xEB), o2(0xBB,0xEC), o2(0xBB,0xED), o2(0xBB,0xEE),
+     o2(0x98,0xAE), o2(0x98,0xAF), o2(0x98,0xB0), o2(0x98,0xB1),
+     o2(0x98,0xB2), o2(0xBB,0xEF), o2(0xBB,0xF0), o2(0x98,0xB3),
+     o2(0xBB,0xF1),
+
+#define to_CP949_EC_82 WORDINDEX2INFO(25327)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_82_infos,
+
+#define to_CP949_EC_83_infos WORDINDEX2INFO(25329)
+           INVALID, o2(0xBB,0xF2), o2(0xBB,0xF3), o2(0x98,0xB4),
+     o2(0x98,0xB5), o2(0x98,0xB6), o2(0xBB,0xF4), o2(0x98,0xB7),
+     o2(0x98,0xB8), o2(0xBB,0xF5), o2(0xBB,0xF6), o2(0x98,0xB9),
+     o2(0x98,0xBA), o2(0xBB,0xF7), o2(0x98,0xBB), o2(0x98,0xBC),
+     o2(0x98,0xBD), o2(0xBB,0xF8), o2(0x98,0xBE), o2(0x98,0xBF),
+     o2(0x98,0xC0), o2(0x98,0xC1), o2(0x98,0xC2), o2(0x98,0xC3),
+     o2(0x98,0xC4), o2(0xBB,0xF9), o2(0xBB,0xFA), o2(0x98,0xC5),
+     o2(0xBB,0xFB), o2(0xBB,0xFC), o2(0xBB,0xFD), o2(0x98,0xC6),
+     o2(0x98,0xC7), o2(0x98,0xC8), o2(0x98,0xC9), o2(0x98,0xCA),
+     o2(0x98,0xCB), o2(0xBB,0xFE), o2(0xBC,0xA1), o2(0x98,0xCC),
+     o2(0x98,0xCD), o2(0xBC,0xA2), o2(0x98,0xCE), o2(0x98,0xCF),
+     o2(0x98,0xD0), o2(0xBC,0xA3), o2(0x98,0xD1), o2(0x98,0xD2),
+     o2(0x98,0xD3), o2(0x98,0xD4), o2(0x98,0xD5), o2(0x98,0xD6),
+     o2(0x98,0xD7), o2(0xBC,0xA4), o2(0xBC,0xA5), o2(0x98,0xD8),
+     o2(0xBC,0xA6), o2(0x98,0xD9), o2(0xBC,0xA7), o2(0x98,0xDA),
+     o2(0x98,0xDB), o2(0x98,0xDC), o2(0x98,0xDD), o2(0x98,0xDE),
+     o2(0x98,0xDF),
+
+#define to_CP949_EC_83 WORDINDEX2INFO(25394)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_83_infos,
+
+#define to_CP949_EC_84_infos WORDINDEX2INFO(25396)
+           INVALID, o2(0xBC,0xA8), o2(0x98,0xE0), o2(0x98,0xE1),
+     o2(0x98,0xE2), o2(0xBC,0xA9), o2(0x98,0xE3), o2(0x98,0xE4),
+     o2(0x98,0xE5), o2(0xBC,0xAA), o2(0x98,0xE6), o2(0x98,0xE7),
+     o2(0x98,0xE8), o2(0x98,0xE9), o2(0x98,0xEA), o2(0x98,0xEB),
+     o2(0x98,0xEC), o2(0xBC,0xAB), o2(0x98,0xED), o2(0x98,0xEE),
+     o2(0x98,0xEF), o2(0x98,0xF0), o2(0xBC,0xAC), o2(0x98,0xF1),
+     o2(0x98,0xF2), o2(0x98,0xF3), o2(0x98,0xF4), o2(0x98,0xF5),
+     o2(0x98,0xF6), o2(0xBC,0xAD), o2(0xBC,0xAE), o2(0xBC,0xAF),
+     o2(0xBC,0xB0), o2(0xBC,0xB1), o2(0x98,0xF7), o2(0x98,0xF8),
+     o2(0xBC,0xB2), o2(0xBC,0xB3), o2(0x98,0xF9), o2(0xBC,0xB4),
+     o2(0xBC,0xB5), o2(0x98,0xFA), o2(0x98,0xFB), o2(0x98,0xFC),
+     o2(0x98,0xFD), o2(0xBC,0xB6), o2(0xBC,0xB7), o2(0x98,0xFE),
+     o2(0xBC,0xB8), o2(0xBC,0xB9), o2(0xBC,0xBA), o2(0x99,0x41),
+     o2(0x99,0x42), o2(0x99,0x43), o2(0x99,0x44), o2(0xBC,0xBB),
+     o2(0x99,0x45), o2(0xBC,0xBC), o2(0xBC,0xBD), o2(0x99,0x46),
+     o2(0x99,0x47), o2(0xBC,0xBE), o2(0x99,0x48), o2(0x99,0x49),
+     o2(0x99,0x4A),
+
+#define to_CP949_EC_84 WORDINDEX2INFO(25461)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_84_infos,
+
+#define to_CP949_EC_85_infos WORDINDEX2INFO(25463)
+           INVALID, o2(0xBC,0xBF), o2(0x99,0x4B), o2(0x99,0x4C),
+     o2(0x99,0x4D), o2(0x99,0x4E), o2(0x99,0x4F), o2(0x99,0x50),
+     o2(0x99,0x51), o2(0xBC,0xC0), o2(0xBC,0xC1), o2(0x99,0x52),
+     o2(0xBC,0xC2), o2(0xBC,0xC3), o2(0xBC,0xC4), o2(0x99,0x53),
+     o2(0x99,0x54), o2(0x99,0x55), o2(0x99,0x56), o2(0x99,0x57),
+     o2(0x99,0x58), o2(0xBC,0xC5), o2(0xBC,0xC6), o2(0x99,0x59),
+     o2(0x99,0x5A), o2(0xBC,0xC7), o2(0x99,0x61), o2(0x99,0x62),
+     o2(0x99,0x63), o2(0xBC,0xC8), o2(0x99,0x64), o2(0x99,0x65),
+     o2(0x99,0x66), o2(0x99,0x67), o2(0x99,0x68), o2(0x99,0x69),
+     o2(0x99,0x6A), o2(0xBC,0xC9), o2(0xBC,0xCA), o2(0x99,0x6B),
+     o2(0xBC,0xCB), o2(0xBC,0xCC), o2(0xBC,0xCD), o2(0x99,0x6C),
+     o2(0x99,0x6D), o2(0x99,0x6E), o2(0x99,0x6F), o2(0x99,0x70),
+     o2(0x99,0x71), o2(0xBC,0xCE), o2(0x99,0x72), o2(0x99,0x73),
+     o2(0x99,0x74), o2(0xBC,0xCF), o2(0x99,0x75), o2(0x99,0x76),
+     o2(0x99,0x77), o2(0xBC,0xD0), o2(0x99,0x78), o2(0x99,0x79),
+     o2(0x99,0x7A), o2(0x99,0x81), o2(0x99,0x82), o2(0x99,0x83),
+     o2(0x99,0x84),
+
+#define to_CP949_EC_85 WORDINDEX2INFO(25528)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_85_infos,
+
+#define to_CP949_EC_86_infos WORDINDEX2INFO(25530)
+           INVALID, o2(0x99,0x85), o2(0x99,0x86), o2(0x99,0x87),
+     o2(0x99,0x88), o2(0x99,0x89), o2(0xBC,0xD1), o2(0x99,0x8A),
+     o2(0x99,0x8B), o2(0x99,0x8C), o2(0x99,0x8D), o2(0x99,0x8E),
+     o2(0x99,0x8F), o2(0xBC,0xD2), o2(0xBC,0xD3), o2(0xBC,0xD4),
+     o2(0x99,0x90), o2(0xBC,0xD5), o2(0x99,0x91), o2(0x99,0x92),
+     o2(0x99,0x93), o2(0xBC,0xD6), o2(0x99,0x94), o2(0xBC,0xD7),
+     o2(0x99,0x95), o2(0x99,0x96), o2(0x99,0x97), o2(0x99,0x98),
+     o2(0x99,0x99), o2(0xBC,0xD8), o2(0xBC,0xD9), o2(0x99,0x9A),
+     o2(0xBC,0xDA), o2(0x99,0x9B), o2(0xBC,0xDB), o2(0x99,0x9C),
+     o2(0x99,0x9D), o2(0x99,0x9E), o2(0xBC,0xDC), o2(0x99,0x9F),
+     o2(0x99,0xA0), o2(0xBC,0xDD), o2(0xBC,0xDE), o2(0x99,0xA1),
+     o2(0x99,0xA2), o2(0xBC,0xDF), o2(0x99,0xA3), o2(0x99,0xA4),
+     o2(0x99,0xA5), o2(0xBC,0xE0), o2(0x99,0xA6), o2(0x99,0xA7),
+     o2(0x99,0xA8), o2(0x99,0xA9), o2(0x99,0xAA), o2(0x99,0xAB),
+     o2(0x99,0xAC), o2(0x99,0xAD), o2(0x99,0xAE), o2(0x99,0xAF),
+     o2(0x99,0xB0), o2(0x99,0xB1), o2(0xBC,0xE1), o2(0x99,0xB2),
+     o2(0x99,0xB3),
+
+#define to_CP949_EC_86 WORDINDEX2INFO(25595)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_86_infos,
+
+#define to_CP949_EC_87_infos WORDINDEX2INFO(25597)
+           INVALID, o2(0x99,0xB4), o2(0x99,0xB5), o2(0x99,0xB6),
+     o2(0x99,0xB7), o2(0xBC,0xE2), o2(0x99,0xB8), o2(0x99,0xB9),
+     o2(0x99,0xBA), o2(0xBC,0xE3), o2(0x99,0xBB), o2(0x99,0xBC),
+     o2(0x99,0xBD), o2(0xBC,0xE4), o2(0x99,0xBE), o2(0x99,0xBF),
+     o2(0x99,0xC0), o2(0x99,0xC1), o2(0x99,0xC2), o2(0x99,0xC3),
+     o2(0x99,0xC4), o2(0xBC,0xE5), o2(0x99,0xC5), o2(0x99,0xC6),
+     o2(0xBC,0xE6), o2(0xBC,0xE7), o2(0x99,0xC7), o2(0x99,0xC8),
+     o2(0x99,0xC9), o2(0x99,0xCA), o2(0x99,0xCB), o2(0x99,0xCC),
+     o2(0x99,0xCD), o2(0xBC,0xE8), o2(0x99,0xCE), o2(0x99,0xCF),
+     o2(0x99,0xD0), o2(0xBC,0xE9), o2(0x99,0xD1), o2(0x99,0xD2),
+     o2(0x99,0xD3), o2(0xBC,0xEA), o2(0x99,0xD4), o2(0x99,0xD5),
+     o2(0x99,0xD6), o2(0x99,0xD7), o2(0x99,0xD8), o2(0x99,0xD9),
+     o2(0x99,0xDA), o2(0xBC,0xEB), o2(0xBC,0xEC), o2(0x99,0xDB),
+     o2(0xBC,0xED), o2(0x99,0xDC), o2(0x99,0xDD), o2(0x99,0xDE),
+     o2(0x99,0xDF), o2(0x99,0xE0), o2(0x99,0xE1), o2(0x99,0xE2),
+     o2(0x99,0xE3), o2(0xBC,0xEE), o2(0xBC,0xEF), o2(0x99,0xE4),
+     o2(0x99,0xE5),
+
+#define to_CP949_EC_87 WORDINDEX2INFO(25662)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_87_infos,
+
+#define to_CP949_EC_88_infos WORDINDEX2INFO(25664)
+           INVALID, o2(0xBC,0xF0), o2(0x99,0xE6), o2(0x99,0xE7),
+     o2(0x99,0xE8), o2(0xBC,0xF1), o2(0x99,0xE9), o2(0x99,0xEA),
+     o2(0x99,0xEB), o2(0x99,0xEC), o2(0x99,0xED), o2(0x99,0xEE),
+     o2(0x99,0xEF), o2(0xBC,0xF2), o2(0xBC,0xF3), o2(0x99,0xF0),
+     o2(0xBC,0xF4), o2(0x99,0xF1), o2(0xBC,0xF5), o2(0x99,0xF2),
+     o2(0x99,0xF3), o2(0x99,0xF4), o2(0x99,0xF5), o2(0x99,0xF6),
+     o2(0x99,0xF7), o2(0xBC,0xF6), o2(0xBC,0xF7), o2(0x99,0xF8),
+     o2(0x99,0xF9), o2(0xBC,0xF8), o2(0x99,0xFA), o2(0x99,0xFB),
+     o2(0xBC,0xF9), o2(0xBC,0xFA), o2(0x99,0xFC), o2(0x99,0xFD),
+     o2(0x99,0xFE), o2(0x9A,0x41), o2(0x9A,0x42), o2(0x9A,0x43),
+     o2(0x9A,0x44), o2(0xBC,0xFB), o2(0xBC,0xFC), o2(0x9A,0x45),
+     o2(0xBC,0xFD), o2(0x9A,0x46), o2(0xBC,0xFE), o2(0x9A,0x47),
+     o2(0xBD,0xA1), o2(0x9A,0x48), o2(0xBD,0xA2), o2(0xBD,0xA3),
+     o2(0x9A,0x49), o2(0xBD,0xA4), o2(0x9A,0x4A), o2(0x9A,0x4B),
+     o2(0x9A,0x4C), o2(0x9A,0x4D), o2(0x9A,0x4E), o2(0x9A,0x4F),
+     o2(0x9A,0x50), o2(0x9A,0x51), o2(0x9A,0x52), o2(0x9A,0x53),
+     o2(0x9A,0x54),
+
+#define to_CP949_EC_88 WORDINDEX2INFO(25729)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_88_infos,
+
+#define to_CP949_EC_89_infos WORDINDEX2INFO(25731)
+           INVALID, o2(0x9A,0x55), o2(0x9A,0x56), o2(0x9A,0x57),
+     o2(0x9A,0x58), o2(0x9A,0x59), o2(0x9A,0x5A), o2(0x9A,0x61),
+     o2(0x9A,0x62), o2(0xBD,0xA5), o2(0x9A,0x63), o2(0x9A,0x64),
+     o2(0x9A,0x65), o2(0x9A,0x66), o2(0x9A,0x67), o2(0x9A,0x68),
+     o2(0x9A,0x69), o2(0xBD,0xA6), o2(0xBD,0xA7), o2(0x9A,0x6A),
+     o2(0x9A,0x6B), o2(0xBD,0xA8), o2(0x9A,0x6C), o2(0x9A,0x6D),
+     o2(0x9A,0x6E), o2(0xBD,0xA9), o2(0x9A,0x6F), o2(0x9A,0x70),
+     o2(0x9A,0x71), o2(0x9A,0x72), o2(0x9A,0x73), o2(0x9A,0x74),
+     o2(0x9A,0x75), o2(0xBD,0xAA), o2(0x9A,0x76), o2(0x9A,0x77),
+     o2(0x9A,0x78), o2(0x9A,0x79), o2(0xBD,0xAB), o2(0x9A,0x7A),
+     o2(0x9A,0x81), o2(0x9A,0x82), o2(0x9A,0x83), o2(0x9A,0x84),
+     o2(0x9A,0x85), o2(0xBD,0xAC), o2(0xBD,0xAD), o2(0x9A,0x86),
+     o2(0x9A,0x87), o2(0xBD,0xAE), o2(0x9A,0x88), o2(0x9A,0x89),
+     o2(0x9A,0x8A), o2(0xBD,0xAF), o2(0x9A,0x8B), o2(0x9A,0x8C),
+     o2(0x9A,0x8D), o2(0x9A,0x8E), o2(0x9A,0x8F), o2(0x9A,0x90),
+     o2(0x9A,0x91), o2(0xBD,0xB0), o2(0xBD,0xB1), o2(0x9A,0x92),
+     o2(0xBD,0xB2),
+
+#define to_CP949_EC_89 WORDINDEX2INFO(25796)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_89_infos,
+
+#define to_CP949_EC_8A_infos WORDINDEX2INFO(25798)
+           INVALID, o2(0x9A,0x93), o2(0xBD,0xB3), o2(0x9A,0x94),
+     o2(0x9A,0x95), o2(0x9A,0x96), o2(0x9A,0x97), o2(0x9A,0x98),
+     o2(0x9A,0x99), o2(0xBD,0xB4), o2(0xBD,0xB5), o2(0x9A,0x9A),
+     o2(0x9A,0x9B), o2(0x9A,0x9C), o2(0x9A,0x9D), o2(0x9A,0x9E),
+     o2(0x9A,0x9F), o2(0xBD,0xB6), o2(0x9A,0xA0), o2(0x9A,0xA1),
+     o2(0x9A,0xA2), o2(0x9A,0xA3), o2(0x9A,0xA4), o2(0x9A,0xA5),
+     o2(0x9A,0xA6), o2(0xBD,0xB7), o2(0x9A,0xA7), o2(0x9A,0xA8),
+     o2(0xBD,0xB8), o2(0x9A,0xA9), o2(0xBD,0xB9), o2(0x9A,0xAA),
+     o2(0x9A,0xAB), o2(0x9A,0xAC), o2(0x9A,0xAD), o2(0x9A,0xAE),
+     o2(0x9A,0xAF), o2(0xBD,0xBA), o2(0xBD,0xBB), o2(0x9A,0xB0),
+     o2(0x9A,0xB1), o2(0xBD,0xBC), o2(0x9A,0xB2), o2(0x9A,0xB3),
+     o2(0x9A,0xB4), o2(0xBD,0xBD), o2(0xBD,0xBE), o2(0x9A,0xB5),
+     o2(0x9A,0xB6), o2(0x9A,0xB7), o2(0x9A,0xB8), o2(0x9A,0xB9),
+     o2(0x9A,0xBA), o2(0xBD,0xBF), o2(0xBD,0xC0), o2(0x9A,0xBB),
+     o2(0xBD,0xC1), o2(0x9A,0xBC), o2(0xBD,0xC2), o2(0x9A,0xBD),
+     o2(0x9A,0xBE), o2(0x9A,0xBF), o2(0x9A,0xC0), o2(0x9A,0xC1),
+     o2(0x9A,0xC2),
+
+#define to_CP949_EC_8A WORDINDEX2INFO(25863)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8A_infos,
+
+#define to_CP949_EC_8B_infos WORDINDEX2INFO(25865)
+           INVALID, o2(0x9A,0xC3), o2(0x9A,0xC4), o2(0x9A,0xC5),
+     o2(0x9A,0xC6), o2(0x9A,0xC7), o2(0x9A,0xC8), o2(0x9A,0xC9),
+     o2(0x9A,0xCA), o2(0x9A,0xCB), o2(0x9A,0xCC), o2(0x9A,0xCD),
+     o2(0x9A,0xCE), o2(0x9A,0xCF), o2(0x9A,0xD0), o2(0x9A,0xD1),
+     o2(0x9A,0xD2), o2(0x9A,0xD3), o2(0x9A,0xD4), o2(0x9A,0xD5),
+     o2(0x9A,0xD6), o2(0x9A,0xD7), o2(0x9A,0xD8), o2(0x9A,0xD9),
+     o2(0x9A,0xDA), o2(0x9A,0xDB), o2(0x9A,0xDC), o2(0x9A,0xDD),
+     o2(0x9A,0xDE), o2(0xBD,0xC3), o2(0xBD,0xC4), o2(0x9A,0xDF),
+     o2(0x9A,0xE0), o2(0xBD,0xC5), o2(0x9A,0xE1), o2(0x9A,0xE2),
+     o2(0xBD,0xC6), o2(0xBD,0xC7), o2(0x9A,0xE3), o2(0x9A,0xE4),
+     o2(0x9A,0xE5), o2(0x9A,0xE6), o2(0x9A,0xE7), o2(0x9A,0xE8),
+     o2(0xBD,0xC8), o2(0xBD,0xC9), o2(0xBD,0xCA), o2(0x9A,0xE9),
+     o2(0xBD,0xCB), o2(0x9A,0xEA), o2(0xBD,0xCC), o2(0x9A,0xEB),
+     o2(0x9A,0xEC), o2(0x9A,0xED), o2(0x9A,0xEE), o2(0xBD,0xCD),
+     o2(0x9A,0xEF), o2(0xBD,0xCE), o2(0xBD,0xCF), o2(0x9A,0xF0),
+     o2(0xBD,0xD0), o2(0xBD,0xD1), o2(0x9A,0xF1), o2(0x9A,0xF2),
+     o2(0x9A,0xF3),
+
+#define to_CP949_EC_8B WORDINDEX2INFO(25930)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8B_infos,
+
+#define to_CP949_EC_8C_infos WORDINDEX2INFO(25932)
+           INVALID, o2(0xBD,0xD2), o2(0x9A,0xF4), o2(0x9A,0xF5),
+     o2(0x9A,0xF6), o2(0x9A,0xF7), o2(0x9A,0xF8), o2(0x9A,0xF9),
+     o2(0x9A,0xFA), o2(0xBD,0xD3), o2(0xBD,0xD4), o2(0x9A,0xFB),
+     o2(0x9A,0xFC), o2(0xBD,0xD5), o2(0xBD,0xD6), o2(0x9A,0xFD),
+     o2(0x9A,0xFE), o2(0x9B,0x41), o2(0x9B,0x42), o2(0x9B,0x43),
+     o2(0xBD,0xD7), o2(0xBD,0xD8), o2(0xBD,0xD9), o2(0x9B,0x44),
+     o2(0x9B,0x45), o2(0xBD,0xDA), o2(0x9B,0x46), o2(0x9B,0x47),
+     o2(0x9B,0x48), o2(0xBD,0xDB), o2(0x9B,0x49), o2(0x9B,0x4A),
+     o2(0x9B,0x4B), o2(0x9B,0x4C), o2(0x9B,0x4D), o2(0x9B,0x4E),
+     o2(0x9B,0x4F), o2(0xBD,0xDC), o2(0xBD,0xDD), o2(0x9B,0x50),
+     o2(0x9B,0x51), o2(0xBD,0xDE), o2(0xBD,0xDF), o2(0x9B,0x52),
+     o2(0x9B,0x53), o2(0x9B,0x54), o2(0x9B,0x55), o2(0x9B,0x56),
+     o2(0x9B,0x57), o2(0x9B,0x58), o2(0x9B,0x59), o2(0x9B,0x5A),
+     o2(0x9B,0x61), o2(0x9B,0x62), o2(0x9B,0x63), o2(0x9B,0x64),
+     o2(0x9B,0x65), o2(0x9B,0x66), o2(0x9B,0x67), o2(0x9B,0x68),
+     o2(0x9B,0x69), o2(0x9B,0x6A), o2(0x9B,0x6B), o2(0x9B,0x6C),
+     o2(0x9B,0x6D),
+
+#define to_CP949_EC_8C WORDINDEX2INFO(25997)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8C_infos,
+
+#define to_CP949_EC_8D_infos WORDINDEX2INFO(25999)
+           INVALID, o2(0x9B,0x6E), o2(0x9B,0x6F), o2(0x9B,0x70),
+     o2(0x9B,0x71), o2(0x9B,0x72), o2(0xBD,0xE0), o2(0x9B,0x73),
+     o2(0x9B,0x74), o2(0x9B,0x75), o2(0x9B,0x76), o2(0x9B,0x77),
+     o2(0x9B,0x78), o2(0x9B,0x79), o2(0x9B,0x7A), o2(0x9B,0x81),
+     o2(0x9B,0x82), o2(0x9B,0x83), o2(0x9B,0x84), o2(0x9B,0x85),
+     o2(0x9B,0x86), o2(0x9B,0x87), o2(0x9B,0x88), o2(0x9B,0x89),
+     o2(0x9B,0x8A), o2(0x9B,0x8B), o2(0x9B,0x8C), o2(0x9B,0x8D),
+     o2(0x9B,0x8E), o2(0x9B,0x8F), o2(0x9B,0x90), o2(0x9B,0x91),
+     o2(0x9B,0x92), o2(0x9B,0x93), o2(0x9B,0x94), o2(0x9B,0x95),
+     o2(0x9B,0x96), o2(0x9B,0x97), o2(0x9B,0x98), o2(0x9B,0x99),
+     o2(0x9B,0x9A), o2(0xBD,0xE1), o2(0xBD,0xE2), o2(0x9B,0x9B),
+     o2(0x9B,0x9C), o2(0xBD,0xE3), o2(0x9B,0x9D), o2(0x9B,0x9E),
+     o2(0x9B,0x9F), o2(0xBD,0xE4), o2(0x9B,0xA0), o2(0xBD,0xE5),
+     o2(0x9B,0xA1), o2(0x9B,0xA2), o2(0x9B,0xA3), o2(0x9B,0xA4),
+     o2(0x9B,0xA5), o2(0xBD,0xE6), o2(0xBD,0xE7), o2(0x9B,0xA6),
+     o2(0x9B,0xA7), o2(0xBD,0xE8), o2(0xBD,0xE9), o2(0x9B,0xA8),
+     o2(0x9B,0xA9),
+
+#define to_CP949_EC_8D WORDINDEX2INFO(26064)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8D_infos,
+
+#define to_CP949_EC_8E_infos WORDINDEX2INFO(26066)
+           INVALID, o2(0x9B,0xAA), o2(0x9B,0xAB), o2(0x9B,0xAC),
+     o2(0x9B,0xAD), o2(0xBD,0xEA), o2(0x9B,0xAE), o2(0x9B,0xAF),
+     o2(0x9B,0xB0), o2(0xBD,0xEB), o2(0x9B,0xB1), o2(0x9B,0xB2),
+     o2(0x9B,0xB3), o2(0xBD,0xEC), o2(0x9B,0xB4), o2(0x9B,0xB5),
+     o2(0x9B,0xB6), o2(0x9B,0xB7), o2(0x9B,0xB8), o2(0x9B,0xB9),
+     o2(0x9B,0xBA), o2(0x9B,0xBB), o2(0x9B,0xBC), o2(0x9B,0xBD),
+     o2(0x9B,0xBE), o2(0x9B,0xBF), o2(0x9B,0xC0), o2(0x9B,0xC1),
+     o2(0x9B,0xC2), o2(0x9B,0xC3), o2(0x9B,0xC4), o2(0x9B,0xC5),
+     o2(0x9B,0xC6), o2(0x9B,0xC7), o2(0x9B,0xC8), o2(0x9B,0xC9),
+     o2(0x9B,0xCA), o2(0x9B,0xCB), o2(0x9B,0xCC), o2(0x9B,0xCD),
+     o2(0x9B,0xCE), o2(0x9B,0xCF), o2(0x9B,0xD0), o2(0x9B,0xD1),
+     o2(0x9B,0xD2), o2(0x9B,0xD3), o2(0x9B,0xD4), o2(0x9B,0xD5),
+     o2(0x9B,0xD6), o2(0x9B,0xD7), o2(0x9B,0xD8), o2(0x9B,0xD9),
+     o2(0x9B,0xDA), o2(0x9B,0xDB), o2(0x9B,0xDC), o2(0x9B,0xDD),
+     o2(0x9B,0xDE), o2(0x9B,0xDF), o2(0x9B,0xE0), o2(0x9B,0xE1),
+     o2(0x9B,0xE2), o2(0x9B,0xE3), o2(0x9B,0xE4), o2(0x9B,0xE5),
+     o2(0x9B,0xE6),
+
+#define to_CP949_EC_8E WORDINDEX2INFO(26131)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8E_infos,
+
+#define to_CP949_EC_8F_infos WORDINDEX2INFO(26133)
+           INVALID, o2(0xBD,0xED), o2(0x9B,0xE7), o2(0x9B,0xE8),
+     o2(0x9B,0xE9), o2(0x9B,0xEA), o2(0x9B,0xEB), o2(0x9B,0xEC),
+     o2(0x9B,0xED), o2(0x9B,0xEE), o2(0x9B,0xEF), o2(0x9B,0xF0),
+     o2(0x9B,0xF1), o2(0x9B,0xF2), o2(0x9B,0xF3), o2(0x9B,0xF4),
+     o2(0x9B,0xF5), o2(0x9B,0xF6), o2(0x9B,0xF7), o2(0x9B,0xF8),
+     o2(0x9B,0xF9), o2(0x9B,0xFA), o2(0x9B,0xFB), o2(0x9B,0xFC),
+     o2(0x9B,0xFD), o2(0xBD,0xEE), o2(0xBD,0xEF), o2(0x9B,0xFE),
+     o2(0x9C,0x41), o2(0xBD,0xF0), o2(0x9C,0x42), o2(0x9C,0x43),
+     o2(0xBD,0xF1), o2(0xBD,0xF2), o2(0x9C,0x44), o2(0xBD,0xF3),
+     o2(0x9C,0x45), o2(0x9C,0x46), o2(0x9C,0x47), o2(0x9C,0x48),
+     o2(0x9C,0x49), o2(0xBD,0xF4), o2(0xBD,0xF5), o2(0x9C,0x4A),
+     o2(0x9C,0x4B), o2(0x9C,0x4C), o2(0xBD,0xF6), o2(0x9C,0x4D),
+     o2(0x9C,0x4E), o2(0x9C,0x4F), o2(0x9C,0x50), o2(0x9C,0x51),
+     o2(0x9C,0x52), o2(0xBD,0xF7), o2(0xBD,0xF8), o2(0x9C,0x53),
+     o2(0x9C,0x54), o2(0xBD,0xF9), o2(0x9C,0x55), o2(0x9C,0x56),
+     o2(0x9C,0x57), o2(0x9C,0x58), o2(0x9C,0x59), o2(0x9C,0x5A),
+     o2(0x9C,0x61),
+
+#define to_CP949_EC_8F WORDINDEX2INFO(26198)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_8F_infos,
+
+#define to_CP949_EC_90_infos WORDINDEX2INFO(26200)
+           INVALID, o2(0x9C,0x62), o2(0x9C,0x63), o2(0x9C,0x64),
+     o2(0x9C,0x65), o2(0x9C,0x66), o2(0x9C,0x67), o2(0x9C,0x68),
+     o2(0x9C,0x69), o2(0xBD,0xFA), o2(0x9C,0x6A), o2(0x9C,0x6B),
+     o2(0x9C,0x6C), o2(0x9C,0x6D), o2(0x9C,0x6E), o2(0x9C,0x6F),
+     o2(0x9C,0x70), o2(0xBD,0xFB), o2(0x9C,0x71), o2(0x9C,0x72),
+     o2(0x9C,0x73), o2(0x9C,0x74), o2(0x9C,0x75), o2(0x9C,0x76),
+     o2(0x9C,0x77), o2(0x9C,0x78), o2(0x9C,0x79), o2(0x9C,0x7A),
+     o2(0x9C,0x81), o2(0x9C,0x82), o2(0x9C,0x83), o2(0x9C,0x84),
+     o2(0x9C,0x85), o2(0x9C,0x86), o2(0x9C,0x87), o2(0x9C,0x88),
+     o2(0x9C,0x89), o2(0xBD,0xFC), o2(0x9C,0x8A), o2(0x9C,0x8B),
+     o2(0x9C,0x8C), o2(0x9C,0x8D), o2(0x9C,0x8E), o2(0x9C,0x8F),
+     o2(0x9C,0x90), o2(0xBD,0xFD), o2(0x9C,0x91), o2(0x9C,0x92),
+     o2(0x9C,0x93), o2(0xBD,0xFE), o2(0x9C,0x94), o2(0x9C,0x95),
+     o2(0x9C,0x96), o2(0xBE,0xA1), o2(0x9C,0x97), o2(0x9C,0x98),
+     o2(0x9C,0x99), o2(0x9C,0x9A), o2(0x9C,0x9B), o2(0x9C,0x9C),
+     o2(0x9C,0x9D), o2(0xBE,0xA2), o2(0xBE,0xA3), o2(0x9C,0x9E),
+     o2(0x9C,0x9F),
+
+#define to_CP949_EC_90 WORDINDEX2INFO(26265)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_90_infos,
+
+#define to_CP949_EC_91_infos WORDINDEX2INFO(26267)
+           INVALID, o2(0x9C,0xA0), o2(0x9C,0xA1), o2(0x9C,0xA2),
+     o2(0x9C,0xA3), o2(0x9C,0xA4), o2(0x9C,0xA5), o2(0x9C,0xA6),
+     o2(0x9C,0xA7), o2(0xBE,0xA4), o2(0x9C,0xA8), o2(0x9C,0xA9),
+     o2(0x9C,0xAA), o2(0x9C,0xAB), o2(0x9C,0xAC), o2(0x9C,0xAD),
+     o2(0x9C,0xAE), o2(0x9C,0xAF), o2(0x9C,0xB0), o2(0x9C,0xB1),
+     o2(0x9C,0xB2), o2(0x9C,0xB3), o2(0x9C,0xB4), o2(0x9C,0xB5),
+     o2(0x9C,0xB6), o2(0x9C,0xB7), o2(0x9C,0xB8), o2(0x9C,0xB9),
+     o2(0x9C,0xBA), o2(0x9C,0xBB), o2(0x9C,0xBC), o2(0x9C,0xBD),
+     o2(0x9C,0xBE), o2(0x9C,0xBF), o2(0x9C,0xC0), o2(0x9C,0xC1),
+     o2(0x9C,0xC2), o2(0xBE,0xA5), o2(0xBE,0xA6), o2(0x9C,0xC3),
+     o2(0x9C,0xC4), o2(0xBE,0xA7), o2(0x9C,0xC5), o2(0x9C,0xC6),
+     o2(0x9C,0xC7), o2(0xBE,0xA8), o2(0x9C,0xC8), o2(0x9C,0xC9),
+     o2(0x9C,0xCA), o2(0x9C,0xCB), o2(0x9C,0xCC), o2(0x9C,0xCD),
+     o2(0x9C,0xCE), o2(0xBE,0xA9), o2(0xBE,0xAA), o2(0x9C,0xCF),
+     o2(0x9C,0xD0), o2(0x9C,0xD1), o2(0xBE,0xAB), o2(0x9C,0xD2),
+     o2(0x9C,0xD3), o2(0x9C,0xD4), o2(0x9C,0xD5), o2(0x9C,0xD6),
+     o2(0x9C,0xD7),
+
+#define to_CP949_EC_91 WORDINDEX2INFO(26332)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_91_infos,
+
+#define to_CP949_EC_92_infos WORDINDEX2INFO(26334)
+           INVALID, o2(0xBE,0xAC), o2(0x9C,0xD8), o2(0x9C,0xD9),
+     o2(0x9C,0xDA), o2(0x9C,0xDB), o2(0x9C,0xDC), o2(0x9C,0xDD),
+     o2(0x9C,0xDE), o2(0x9C,0xDF), o2(0x9C,0xE0), o2(0x9C,0xE1),
+     o2(0x9C,0xE2), o2(0x9C,0xE3), o2(0x9C,0xE4), o2(0x9C,0xE5),
+     o2(0x9C,0xE6), o2(0x9C,0xE7), o2(0x9C,0xE8), o2(0x9C,0xE9),
+     o2(0x9C,0xEA), o2(0xBE,0xAD), o2(0x9C,0xEB), o2(0x9C,0xEC),
+     o2(0x9C,0xED), o2(0x9C,0xEE), o2(0x9C,0xEF), o2(0x9C,0xF0),
+     o2(0x9C,0xF1), o2(0xBE,0xAE), o2(0x9C,0xF2), o2(0x9C,0xF3),
+     o2(0x9C,0xF4), o2(0x9C,0xF5), o2(0x9C,0xF6), o2(0x9C,0xF7),
+     o2(0x9C,0xF8), o2(0x9C,0xF9), o2(0x9C,0xFA), o2(0x9C,0xFB),
+     o2(0x9C,0xFC), o2(0x9C,0xFD), o2(0x9C,0xFE), o2(0x9D,0x41),
+     o2(0x9D,0x42), o2(0x9D,0x43), o2(0x9D,0x44), o2(0x9D,0x45),
+     o2(0x9D,0x46), o2(0x9D,0x47), o2(0x9D,0x48), o2(0x9D,0x49),
+     o2(0x9D,0x4A), o2(0x9D,0x4B), o2(0x9D,0x4C), o2(0x9D,0x4D),
+     o2(0x9D,0x4E), o2(0xBE,0xAF), o2(0x9D,0x4F), o2(0x9D,0x50),
+     o2(0x9D,0x51), o2(0xBE,0xB0), o2(0x9D,0x52), o2(0x9D,0x53),
+     o2(0x9D,0x54),
+
+#define to_CP949_EC_92 WORDINDEX2INFO(26399)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_92_infos,
+
+#define to_CP949_EC_93_infos WORDINDEX2INFO(26401)
+           INVALID, o2(0x9D,0x55), o2(0x9D,0x56), o2(0x9D,0x57),
+     o2(0x9D,0x58), o2(0x9D,0x59), o2(0x9D,0x5A), o2(0x9D,0x61),
+     o2(0x9D,0x62), o2(0x9D,0x63), o2(0x9D,0x64), o2(0x9D,0x65),
+     o2(0x9D,0x66), o2(0x9D,0x67), o2(0x9D,0x68), o2(0x9D,0x69),
+     o2(0x9D,0x6A), o2(0x9D,0x6B), o2(0x9D,0x6C), o2(0x9D,0x6D),
+     o2(0x9D,0x6E), o2(0x9D,0x6F), o2(0x9D,0x70), o2(0x9D,0x71),
+     o2(0x9D,0x72), o2(0x9D,0x73), o2(0x9D,0x74), o2(0x9D,0x75),
+     o2(0x9D,0x76), o2(0x9D,0x77), o2(0x9D,0x78), o2(0x9D,0x79),
+     o2(0x9D,0x7A), o2(0x9D,0x81), o2(0x9D,0x82), o2(0x9D,0x83),
+     o2(0x9D,0x84), o2(0x9D,0x85), o2(0x9D,0x86), o2(0x9D,0x87),
+     o2(0x9D,0x88), o2(0x9D,0x89), o2(0xBE,0xB1), o2(0x9D,0x8A),
+     o2(0x9D,0x8B), o2(0x9D,0x8C), o2(0x9D,0x8D), o2(0x9D,0x8E),
+     o2(0x9D,0x8F), o2(0xBE,0xB2), o2(0xBE,0xB3), o2(0x9D,0x90),
+     o2(0x9D,0x91), o2(0xBE,0xB4), o2(0x9D,0x92), o2(0x9D,0x93),
+     o2(0x9D,0x94), o2(0xBE,0xB5), o2(0x9D,0x95), o2(0xBE,0xB6),
+     o2(0x9D,0x96), o2(0x9D,0x97), o2(0x9D,0x98), o2(0x9D,0x99),
+     o2(0xBE,0xB7),
+
+#define to_CP949_EC_93 WORDINDEX2INFO(26466)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_93_infos,
+
+#define to_CP949_EC_94_infos WORDINDEX2INFO(26468)
+           INVALID, o2(0xBE,0xB8), o2(0xBE,0xB9), o2(0x9D,0x9A),
+     o2(0x9D,0x9B), o2(0x9D,0x9C), o2(0x9D,0x9D), o2(0x9D,0x9E),
+     o2(0x9D,0x9F), o2(0x9D,0xA0), o2(0x9D,0xA1), o2(0x9D,0xA2),
+     o2(0x9D,0xA3), o2(0xBE,0xBA), o2(0x9D,0xA4), o2(0x9D,0xA5),
+     o2(0x9D,0xA6), o2(0xBE,0xBB), o2(0x9D,0xA7), o2(0x9D,0xA8),
+     o2(0x9D,0xA9), o2(0xBE,0xBC), o2(0x9D,0xAA), o2(0x9D,0xAB),
+     o2(0x9D,0xAC), o2(0x9D,0xAD), o2(0x9D,0xAE), o2(0x9D,0xAF),
+     o2(0x9D,0xB0), o2(0xBE,0xBD), o2(0x9D,0xB1), o2(0x9D,0xB2),
+     o2(0x9D,0xB3), o2(0x9D,0xB4), o2(0x9D,0xB5), o2(0x9D,0xB6),
+     o2(0x9D,0xB7), o2(0x9D,0xB8), o2(0x9D,0xB9), o2(0x9D,0xBA),
+     o2(0x9D,0xBB), o2(0xBE,0xBE), o2(0xBE,0xBF), o2(0x9D,0xBC),
+     o2(0x9D,0xBD), o2(0xBE,0xC0), o2(0x9D,0xBE), o2(0x9D,0xBF),
+     o2(0x9D,0xC0), o2(0xBE,0xC1), o2(0x9D,0xC1), o2(0x9D,0xC2),
+     o2(0x9D,0xC3), o2(0x9D,0xC4), o2(0x9D,0xC5), o2(0x9D,0xC6),
+     o2(0x9D,0xC7), o2(0xBE,0xC2), o2(0xBE,0xC3), o2(0x9D,0xC8),
+     o2(0xBE,0xC4), o2(0x9D,0xC9), o2(0xBE,0xC5), o2(0x9D,0xCA),
+     o2(0x9D,0xCB),
+
+#define to_CP949_EC_94 WORDINDEX2INFO(26533)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_94_infos,
+
+#define to_CP949_EC_95_infos WORDINDEX2INFO(26535)
+           INVALID, o2(0x9D,0xCC), o2(0x9D,0xCD), o2(0x9D,0xCE),
+     o2(0x9D,0xCF), o2(0xBE,0xC6), o2(0xBE,0xC7), o2(0x9D,0xD0),
+     o2(0x9D,0xD1), o2(0xBE,0xC8), o2(0xBE,0xC9), o2(0xBE,0xCA),
+     o2(0x9D,0xD2), o2(0xBE,0xCB), o2(0xBE,0xCC), o2(0xBE,0xCD),
+     o2(0x9D,0xD3), o2(0x9D,0xD4), o2(0x9D,0xD5), o2(0x9D,0xD6),
+     o2(0xBE,0xCE), o2(0xBE,0xCF), o2(0xBE,0xD0), o2(0x9D,0xD7),
+     o2(0xBE,0xD1), o2(0xBE,0xD2), o2(0xBE,0xD3), o2(0x9D,0xD8),
+     o2(0x9D,0xD9), o2(0x9D,0xDA), o2(0xBE,0xD4), o2(0xBE,0xD5),
+     o2(0x9D,0xDB), o2(0xBE,0xD6), o2(0xBE,0xD7), o2(0x9D,0xDC),
+     o2(0x9D,0xDD), o2(0xBE,0xD8), o2(0x9D,0xDE), o2(0x9D,0xDF),
+     o2(0x9D,0xE0), o2(0xBE,0xD9), o2(0x9D,0xE1), o2(0x9D,0xE2),
+     o2(0x9D,0xE3), o2(0x9D,0xE4), o2(0x9D,0xE5), o2(0x9D,0xE6),
+     o2(0x9D,0xE7), o2(0xBE,0xDA), o2(0xBE,0xDB), o2(0x9D,0xE8),
+     o2(0xBE,0xDC), o2(0xBE,0xDD), o2(0xBE,0xDE), o2(0x9D,0xE9),
+     o2(0x9D,0xEA), o2(0x9D,0xEB), o2(0x9D,0xEC), o2(0x9D,0xED),
+     o2(0x9D,0xEE), o2(0xBE,0xDF), o2(0xBE,0xE0), o2(0x9D,0xEF),
+     o2(0x9D,0xF0),
+
+#define to_CP949_EC_95 WORDINDEX2INFO(26600)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_95_infos,
+
+#define to_CP949_EC_96_infos WORDINDEX2INFO(26602)
+           INVALID, o2(0xBE,0xE1), o2(0x9D,0xF1), o2(0x9D,0xF2),
+     o2(0x9D,0xF3), o2(0xBE,0xE2), o2(0x9D,0xF4), o2(0x9D,0xF5),
+     o2(0xBE,0xE3), o2(0x9D,0xF6), o2(0x9D,0xF7), o2(0x9D,0xF8),
+     o2(0x9D,0xF9), o2(0xBE,0xE4), o2(0xBE,0xE5), o2(0x9D,0xFA),
+     o2(0xBE,0xE6), o2(0x9D,0xFB), o2(0xBE,0xE7), o2(0x9D,0xFC),
+     o2(0x9D,0xFD), o2(0x9D,0xFE), o2(0xBE,0xE8), o2(0x9E,0x41),
+     o2(0xBE,0xE9), o2(0xBE,0xEA), o2(0x9E,0x42), o2(0x9E,0x43),
+     o2(0x9E,0x44), o2(0xBE,0xEB), o2(0x9E,0x45), o2(0x9E,0x46),
+     o2(0x9E,0x47), o2(0xBE,0xEC), o2(0x9E,0x48), o2(0x9E,0x49),
+     o2(0x9E,0x4A), o2(0x9E,0x4B), o2(0x9E,0x4C), o2(0x9E,0x4D),
+     o2(0x9E,0x4E), o2(0x9E,0x4F), o2(0xBE,0xED), o2(0x9E,0x50),
+     o2(0x9E,0x51), o2(0x9E,0x52), o2(0x9E,0x53), o2(0x9E,0x54),
+     o2(0x9E,0x55), o2(0x9E,0x56), o2(0x9E,0x57), o2(0x9E,0x58),
+     o2(0x9E,0x59), o2(0xBE,0xEE), o2(0xBE,0xEF), o2(0x9E,0x5A),
+     o2(0x9E,0x61), o2(0xBE,0xF0), o2(0xBE,0xF1), o2(0x9E,0x62),
+     o2(0xBE,0xF2), o2(0xBE,0xF3), o2(0xBE,0xF4), o2(0xBE,0xF5),
+     o2(0x9E,0x63),
+
+#define to_CP949_EC_96 WORDINDEX2INFO(26667)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_96_infos,
+
+#define to_CP949_EC_97_infos WORDINDEX2INFO(26669)
+           INVALID, o2(0x9E,0x64), o2(0x9E,0x65), o2(0x9E,0x66),
+     o2(0x9E,0x67), o2(0xBE,0xF6), o2(0xBE,0xF7), o2(0xBE,0xF8),
+     o2(0xBE,0xF9), o2(0xBE,0xFA), o2(0xBE,0xFB), o2(0xBE,0xFC),
+     o2(0x9E,0x68), o2(0xBE,0xFD), o2(0x9E,0x69), o2(0xBE,0xFE),
+     o2(0x9E,0x6A), o2(0xBF,0xA1), o2(0xBF,0xA2), o2(0x9E,0x6B),
+     o2(0x9E,0x6C), o2(0xBF,0xA3), o2(0x9E,0x6D), o2(0x9E,0x6E),
+     o2(0x9E,0x6F), o2(0xBF,0xA4), o2(0x9E,0x70), o2(0x9E,0x71),
+     o2(0x9E,0x72), o2(0x9E,0x73), o2(0x9E,0x74), o2(0x9E,0x75),
+     o2(0x9E,0x76), o2(0xBF,0xA5), o2(0xBF,0xA6), o2(0x9E,0x77),
+     o2(0xBF,0xA7), o2(0x9E,0x78), o2(0xBF,0xA8), o2(0x9E,0x79),
+     o2(0x9E,0x7A), o2(0x9E,0x81), o2(0x9E,0x82), o2(0x9E,0x83),
+     o2(0x9E,0x84), o2(0xBF,0xA9), o2(0xBF,0xAA), o2(0xBF,0xAB),
+     o2(0x9E,0x85), o2(0xBF,0xAC), o2(0x9E,0x86), o2(0x9E,0x87),
+     o2(0x9E,0x88), o2(0xBF,0xAD), o2(0x9E,0x89), o2(0xBF,0xAE),
+     o2(0xBF,0xAF), o2(0x9E,0x8A), o2(0x9E,0x8B), o2(0x9E,0x8C),
+     o2(0x9E,0x8D), o2(0xBF,0xB0), o2(0xBF,0xB1), o2(0xBF,0xB2),
+     o2(0xBF,0xB3),
+
+#define to_CP949_EC_97 WORDINDEX2INFO(26734)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_97_infos,
+
+#define to_CP949_EC_98_infos WORDINDEX2INFO(26736)
+           INVALID, o2(0xBF,0xB4), o2(0xBF,0xB5), o2(0x9E,0x8E),
+     o2(0x9E,0x8F), o2(0x9E,0x90), o2(0xBF,0xB6), o2(0xBF,0xB7),
+     o2(0xBF,0xB8), o2(0xBF,0xB9), o2(0x9E,0x91), o2(0x9E,0x92),
+     o2(0x9E,0x93), o2(0xBF,0xBA), o2(0x9E,0x94), o2(0x9E,0x95),
+     o2(0x9E,0x96), o2(0xBF,0xBB), o2(0x9E,0x97), o2(0x9E,0x98),
+     o2(0x9E,0x99), o2(0x9E,0x9A), o2(0x9E,0x9B), o2(0x9E,0x9C),
+     o2(0x9E,0x9D), o2(0xBF,0xBC), o2(0xBF,0xBD), o2(0x9E,0x9E),
+     o2(0xBF,0xBE), o2(0xBF,0xBF), o2(0x9E,0x9F), o2(0x9E,0xA0),
+     o2(0x9E,0xA1), o2(0x9E,0xA2), o2(0x9E,0xA3), o2(0x9E,0xA4),
+     o2(0x9E,0xA5), o2(0xBF,0xC0), o2(0xBF,0xC1), o2(0x9E,0xA6),
+     o2(0x9E,0xA7), o2(0xBF,0xC2), o2(0x9E,0xA8), o2(0x9E,0xA9),
+     o2(0x9E,0xAA), o2(0xBF,0xC3), o2(0xBF,0xC4), o2(0xBF,0xC5),
+     o2(0x9E,0xAB), o2(0xBF,0xC6), o2(0x9E,0xAC), o2(0x9E,0xAD),
+     o2(0xBF,0xC7), o2(0xBF,0xC8), o2(0xBF,0xC9), o2(0x9E,0xAE),
+     o2(0xBF,0xCA), o2(0x9E,0xAF), o2(0xBF,0xCB), o2(0x9E,0xB0),
+     o2(0xBF,0xCC), o2(0x9E,0xB1), o2(0x9E,0xB2), o2(0x9E,0xB3),
+     o2(0x9E,0xB4),
+
+#define to_CP949_EC_98 WORDINDEX2INFO(26801)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_98_infos,
+
+#define to_CP949_EC_99_infos WORDINDEX2INFO(26803)
+           INVALID, o2(0xBF,0xCD), o2(0xBF,0xCE), o2(0x9E,0xB5),
+     o2(0x9E,0xB6), o2(0xBF,0xCF), o2(0x9E,0xB7), o2(0x9E,0xB8),
+     o2(0x9E,0xB9), o2(0xBF,0xD0), o2(0x9E,0xBA), o2(0x9E,0xBB),
+     o2(0x9E,0xBC), o2(0x9E,0xBD), o2(0x9E,0xBE), o2(0x9E,0xBF),
+     o2(0x9E,0xC0), o2(0xBF,0xD1), o2(0xBF,0xD2), o2(0x9E,0xC1),
+     o2(0xBF,0xD3), o2(0xBF,0xD4), o2(0xBF,0xD5), o2(0x9E,0xC2),
+     o2(0x9E,0xC3), o2(0x9E,0xC4), o2(0x9E,0xC5), o2(0x9E,0xC6),
+     o2(0x9E,0xC7), o2(0xBF,0xD6), o2(0xBF,0xD7), o2(0x9E,0xC8),
+     o2(0x9E,0xC9), o2(0xBF,0xD8), o2(0x9E,0xCA), o2(0x9E,0xCB),
+     o2(0x9E,0xCC), o2(0x9E,0xCD), o2(0x9E,0xCE), o2(0x9E,0xCF),
+     o2(0x9E,0xD0), o2(0x9E,0xD1), o2(0x9E,0xD2), o2(0x9E,0xD3),
+     o2(0x9E,0xD4), o2(0xBF,0xD9), o2(0x9E,0xD5), o2(0x9E,0xD6),
+     o2(0xBF,0xDA), o2(0x9E,0xD7), o2(0xBF,0xDB), o2(0x9E,0xD8),
+     o2(0x9E,0xD9), o2(0x9E,0xDA), o2(0x9E,0xDB), o2(0x9E,0xDC),
+     o2(0x9E,0xDD), o2(0xBF,0xDC), o2(0xBF,0xDD), o2(0x9E,0xDE),
+     o2(0x9E,0xDF), o2(0xBF,0xDE), o2(0x9E,0xE0), o2(0x9E,0xE1),
+     o2(0x9E,0xE2),
+
+#define to_CP949_EC_99 WORDINDEX2INFO(26868)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_99_infos,
+
+#define to_CP949_EC_9A_infos WORDINDEX2INFO(26870)
+           INVALID, o2(0xBF,0xDF), o2(0x9E,0xE3), o2(0x9E,0xE4),
+     o2(0x9E,0xE5), o2(0x9E,0xE6), o2(0x9E,0xE7), o2(0x9E,0xE8),
+     o2(0x9E,0xE9), o2(0xBF,0xE0), o2(0xBF,0xE1), o2(0x9E,0xEA),
+     o2(0xBF,0xE2), o2(0x9E,0xEB), o2(0xBF,0xE3), o2(0x9E,0xEC),
+     o2(0x9E,0xED), o2(0x9E,0xEE), o2(0x9E,0xEF), o2(0x9E,0xF0),
+     o2(0x9E,0xF1), o2(0xBF,0xE4), o2(0xBF,0xE5), o2(0x9E,0xF2),
+     o2(0x9E,0xF3), o2(0xBF,0xE6), o2(0x9E,0xF4), o2(0x9E,0xF5),
+     o2(0x9E,0xF6), o2(0xBF,0xE7), o2(0x9E,0xF7), o2(0x9E,0xF8),
+     o2(0x9E,0xF9), o2(0x9E,0xFA), o2(0x9E,0xFB), o2(0x9E,0xFC),
+     o2(0x9E,0xFD), o2(0xBF,0xE8), o2(0xBF,0xE9), o2(0x9E,0xFE),
+     o2(0xBF,0xEA), o2(0x9F,0x41), o2(0xBF,0xEB), o2(0x9F,0x42),
+     o2(0x9F,0x43), o2(0x9F,0x44), o2(0x9F,0x45), o2(0x9F,0x46),
+     o2(0x9F,0x47), o2(0xBF,0xEC), o2(0xBF,0xED), o2(0x9F,0x48),
+     o2(0x9F,0x49), o2(0xBF,0xEE), o2(0x9F,0x4A), o2(0x9F,0x4B),
+     o2(0x9F,0x4C), o2(0xBF,0xEF), o2(0xBF,0xF0), o2(0xBF,0xF1),
+     o2(0x9F,0x4D), o2(0x9F,0x4E), o2(0x9F,0x4F), o2(0x9F,0x50),
+     o2(0x9F,0x51),
+
+#define to_CP949_EC_9A WORDINDEX2INFO(26935)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9A_infos,
+
+#define to_CP949_EC_9B_infos WORDINDEX2INFO(26937)
+           INVALID, o2(0xBF,0xF2), o2(0xBF,0xF3), o2(0x9F,0x52),
+     o2(0xBF,0xF4), o2(0x9F,0x53), o2(0xBF,0xF5), o2(0x9F,0x54),
+     o2(0x9F,0x55), o2(0x9F,0x56), o2(0x9F,0x57), o2(0x9F,0x58),
+     o2(0x9F,0x59), o2(0xBF,0xF6), o2(0xBF,0xF7), o2(0x9F,0x5A),
+     o2(0x9F,0x61), o2(0xBF,0xF8), o2(0x9F,0x62), o2(0x9F,0x63),
+     o2(0x9F,0x64), o2(0xBF,0xF9), o2(0x9F,0x65), o2(0x9F,0x66),
+     o2(0x9F,0x67), o2(0x9F,0x68), o2(0x9F,0x69), o2(0x9F,0x6A),
+     o2(0x9F,0x6B), o2(0xBF,0xFA), o2(0xBF,0xFB), o2(0x9F,0x6C),
+     o2(0x9F,0x6D), o2(0xBF,0xFC), o2(0xBF,0xFD), o2(0x9F,0x6E),
+     o2(0x9F,0x6F), o2(0x9F,0x70), o2(0x9F,0x71), o2(0x9F,0x72),
+     o2(0x9F,0x73), o2(0xBF,0xFE), o2(0xC0,0xA1), o2(0x9F,0x74),
+     o2(0x9F,0x75), o2(0xC0,0xA2), o2(0x9F,0x76), o2(0x9F,0x77),
+     o2(0x9F,0x78), o2(0xC0,0xA3), o2(0x9F,0x79), o2(0x9F,0x7A),
+     o2(0x9F,0x81), o2(0x9F,0x82), o2(0x9F,0x83), o2(0x9F,0x84),
+     o2(0x9F,0x85), o2(0xC0,0xA4), o2(0xC0,0xA5), o2(0x9F,0x86),
+     o2(0x9F,0x87), o2(0x9F,0x88), o2(0xC0,0xA6), o2(0x9F,0x89),
+     o2(0x9F,0x8A),
+
+#define to_CP949_EC_9B WORDINDEX2INFO(27002)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9B_infos,
+
+#define to_CP949_EC_9C_infos WORDINDEX2INFO(27004)
+           INVALID, o2(0x9F,0x8B), o2(0x9F,0x8C), o2(0x9F,0x8D),
+     o2(0x9F,0x8E), o2(0xC0,0xA7), o2(0xC0,0xA8), o2(0x9F,0x8F),
+     o2(0x9F,0x90), o2(0xC0,0xA9), o2(0x9F,0x91), o2(0x9F,0x92),
+     o2(0x9F,0x93), o2(0xC0,0xAA), o2(0x9F,0x94), o2(0x9F,0x95),
+     o2(0x9F,0x96), o2(0x9F,0x97), o2(0x9F,0x98), o2(0x9F,0x99),
+     o2(0x9F,0x9A), o2(0xC0,0xAB), o2(0xC0,0xAC), o2(0x9F,0x9B),
+     o2(0xC0,0xAD), o2(0x9F,0x9C), o2(0xC0,0xAE), o2(0x9F,0x9D),
+     o2(0x9F,0x9E), o2(0x9F,0x9F), o2(0x9F,0xA0), o2(0x9F,0xA1),
+     o2(0x9F,0xA2), o2(0xC0,0xAF), o2(0xC0,0xB0), o2(0x9F,0xA3),
+     o2(0x9F,0xA4), o2(0xC0,0xB1), o2(0x9F,0xA5), o2(0x9F,0xA6),
+     o2(0x9F,0xA7), o2(0xC0,0xB2), o2(0x9F,0xA8), o2(0x9F,0xA9),
+     o2(0x9F,0xAA), o2(0x9F,0xAB), o2(0x9F,0xAC), o2(0x9F,0xAD),
+     o2(0x9F,0xAE), o2(0xC0,0xB3), o2(0xC0,0xB4), o2(0x9F,0xAF),
+     o2(0xC0,0xB5), o2(0x9F,0xB0), o2(0xC0,0xB6), o2(0x9F,0xB1),
+     o2(0xC0,0xB7), o2(0x9F,0xB2), o2(0x9F,0xB3), o2(0x9F,0xB4),
+     o2(0x9F,0xB5), o2(0xC0,0xB8), o2(0xC0,0xB9), o2(0x9F,0xB6),
+     o2(0x9F,0xB7),
+
+#define to_CP949_EC_9C WORDINDEX2INFO(27069)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9C_infos,
+
+#define to_CP949_EC_9D_infos WORDINDEX2INFO(27071)
+           INVALID, o2(0xC0,0xBA), o2(0x9F,0xB8), o2(0x9F,0xB9),
+     o2(0x9F,0xBA), o2(0xC0,0xBB), o2(0x9F,0xBB), o2(0x9F,0xBC),
+     o2(0x9F,0xBD), o2(0x9F,0xBE), o2(0x9F,0xBF), o2(0xC0,0xBC),
+     o2(0x9F,0xC0), o2(0xC0,0xBD), o2(0xC0,0xBE), o2(0x9F,0xC1),
+     o2(0xC0,0xBF), o2(0x9F,0xC2), o2(0xC0,0xC0), o2(0xC0,0xC1),
+     o2(0xC0,0xC2), o2(0xC0,0xC3), o2(0xC0,0xC4), o2(0xC0,0xC5),
+     o2(0xC0,0xC6), o2(0xC0,0xC7), o2(0x9F,0xC3), o2(0x9F,0xC4),
+     o2(0x9F,0xC5), o2(0xC0,0xC8), o2(0x9F,0xC6), o2(0x9F,0xC7),
+     o2(0x9F,0xC8), o2(0xC0,0xC9), o2(0x9F,0xC9), o2(0x9F,0xCA),
+     o2(0x9F,0xCB), o2(0x9F,0xCC), o2(0x9F,0xCD), o2(0x9F,0xCE),
+     o2(0x9F,0xCF), o2(0xC0,0xCA), o2(0x9F,0xD0), o2(0x9F,0xD1),
+     o2(0xC0,0xCB), o2(0x9F,0xD2), o2(0x9F,0xD3), o2(0x9F,0xD4),
+     o2(0x9F,0xD5), o2(0x9F,0xD6), o2(0x9F,0xD7), o2(0x9F,0xD8),
+     o2(0x9F,0xD9), o2(0xC0,0xCC), o2(0xC0,0xCD), o2(0x9F,0xDA),
+     o2(0x9F,0xDB), o2(0xC0,0xCE), o2(0x9F,0xDC), o2(0x9F,0xDD),
+     o2(0x9F,0xDE), o2(0xC0,0xCF), o2(0xC0,0xD0), o2(0xC0,0xD1),
+     o2(0x9F,0xDF),
+
+#define to_CP949_EC_9D WORDINDEX2INFO(27136)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9D_infos,
+
+#define to_CP949_EC_9E_infos WORDINDEX2INFO(27138)
+           INVALID, o2(0x9F,0xE0), o2(0x9F,0xE1), o2(0x9F,0xE2),
+     o2(0xC0,0xD2), o2(0xC0,0xD3), o2(0xC0,0xD4), o2(0x9F,0xE3),
+     o2(0xC0,0xD5), o2(0xC0,0xD6), o2(0xC0,0xD7), o2(0xC0,0xD8),
+     o2(0x9F,0xE4), o2(0x9F,0xE5), o2(0x9F,0xE6), o2(0xC0,0xD9),
+     o2(0x9F,0xE7), o2(0xC0,0xDA), o2(0xC0,0xDB), o2(0x9F,0xE8),
+     o2(0x9F,0xE9), o2(0xC0,0xDC), o2(0x9F,0xEA), o2(0xC0,0xDD),
+     o2(0xC0,0xDE), o2(0xC0,0xDF), o2(0x9F,0xEB), o2(0xC0,0xE0),
+     o2(0x9F,0xEC), o2(0x9F,0xED), o2(0x9F,0xEE), o2(0x9F,0xEF),
+     o2(0x9F,0xF0), o2(0xC0,0xE1), o2(0xC0,0xE2), o2(0x9F,0xF1),
+     o2(0xC0,0xE3), o2(0xC0,0xE4), o2(0xC0,0xE5), o2(0xC0,0xE6),
+     o2(0x9F,0xF2), o2(0x9F,0xF3), o2(0x9F,0xF4), o2(0x9F,0xF5),
+     o2(0x9F,0xF6), o2(0xC0,0xE7), o2(0xC0,0xE8), o2(0x9F,0xF7),
+     o2(0x9F,0xF8), o2(0xC0,0xE9), o2(0x9F,0xF9), o2(0x9F,0xFA),
+     o2(0x9F,0xFB), o2(0xC0,0xEA), o2(0x9F,0xFC), o2(0x9F,0xFD),
+     o2(0x9F,0xFE), o2(0xA0,0x41), o2(0xA0,0x42), o2(0xA0,0x43),
+     o2(0xA0,0x44), o2(0xC0,0xEB), o2(0xC0,0xEC), o2(0xA0,0x45),
+     o2(0xC0,0xED),
+
+#define to_CP949_EC_9E WORDINDEX2INFO(27203)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9E_infos,
+
+#define to_CP949_EC_9F_infos WORDINDEX2INFO(27205)
+           INVALID, o2(0xC0,0xEE), o2(0xC0,0xEF), o2(0xA0,0x46),
+     o2(0xA0,0x47), o2(0xA0,0x48), o2(0xA0,0x49), o2(0xA0,0x4A),
+     o2(0xA0,0x4B), o2(0xC0,0xF0), o2(0xC0,0xF1), o2(0xA0,0x4C),
+     o2(0xA0,0x4D), o2(0xC0,0xF2), o2(0xA0,0x4E), o2(0xC0,0xF3),
+     o2(0xA0,0x4F), o2(0xC0,0xF4), o2(0xA0,0x50), o2(0xA0,0x51),
+     o2(0xA0,0x52), o2(0xA0,0x53), o2(0xA0,0x54), o2(0xA0,0x55),
+     o2(0xA0,0x56), o2(0xC0,0xF5), o2(0xA0,0x57), o2(0xA0,0x58),
+     o2(0xA0,0x59), o2(0xA0,0x5A), o2(0xC0,0xF6), o2(0xA0,0x61),
+     o2(0xA0,0x62), o2(0xA0,0x63), o2(0xA0,0x64), o2(0xA0,0x65),
+     o2(0xA0,0x66), o2(0xC0,0xF7), o2(0xA0,0x67), o2(0xA0,0x68),
+     o2(0xA0,0x69), o2(0xC0,0xF8), o2(0xA0,0x6A), o2(0xA0,0x6B),
+     o2(0xA0,0x6C), o2(0xC0,0xF9), o2(0xA0,0x6D), o2(0xA0,0x6E),
+     o2(0xA0,0x6F), o2(0xA0,0x70), o2(0xA0,0x71), o2(0xA0,0x72),
+     o2(0xA0,0x73), o2(0xA0,0x74), o2(0xA0,0x75), o2(0xA0,0x76),
+     o2(0xA0,0x77), o2(0xA0,0x78), o2(0xA0,0x79), o2(0xA0,0x7A),
+     o2(0xA0,0x81), o2(0xA0,0x82), o2(0xA0,0x83), o2(0xA0,0x84),
+     o2(0xA0,0x85),
+
+#define to_CP949_EC_9F WORDINDEX2INFO(27270)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_9F_infos,
+
+#define to_CP949_EC_A0_infos WORDINDEX2INFO(27272)
+           INVALID, o2(0xC0,0xFA), o2(0xC0,0xFB), o2(0xA0,0x86),
+     o2(0xA0,0x87), o2(0xC0,0xFC), o2(0xA0,0x88), o2(0xA0,0x89),
+     o2(0xA0,0x8A), o2(0xC0,0xFD), o2(0xA0,0x8B), o2(0xC0,0xFE),
+     o2(0xA0,0x8C), o2(0xA0,0x8D), o2(0xA0,0x8E), o2(0xA0,0x8F),
+     o2(0xA0,0x90), o2(0xC1,0xA1), o2(0xC1,0xA2), o2(0xA0,0x91),
+     o2(0xC1,0xA3), o2(0xA0,0x92), o2(0xC1,0xA4), o2(0xC1,0xA5),
+     o2(0xA0,0x93), o2(0xA0,0x94), o2(0xA0,0x95), o2(0xA0,0x96),
+     o2(0xA0,0x97), o2(0xC1,0xA6), o2(0xC1,0xA7), o2(0xA0,0x98),
+     o2(0xA0,0x99), o2(0xC1,0xA8), o2(0xA0,0x9A), o2(0xA0,0x9B),
+     o2(0xA0,0x9C), o2(0xC1,0xA9), o2(0xA0,0x9D), o2(0xA0,0x9E),
+     o2(0xA0,0x9F), o2(0xA0,0xA0), o2(0xA0,0xA1), o2(0xA0,0xA2),
+     o2(0xA0,0xA3), o2(0xC1,0xAA), o2(0xC1,0xAB), o2(0xA0,0xA4),
+     o2(0xC1,0xAC), o2(0xA0,0xA5), o2(0xC1,0xAD), o2(0xA0,0xA6),
+     o2(0xA0,0xA7), o2(0xA0,0xA8), o2(0xA0,0xA9), o2(0xA0,0xAA),
+     o2(0xA0,0xAB), o2(0xC1,0xAE), o2(0xA0,0xAC), o2(0xA0,0xAD),
+     o2(0xA0,0xAE), o2(0xC1,0xAF), o2(0xA0,0xAF), o2(0xA0,0xB0),
+     o2(0xA0,0xB1),
+
+#define to_CP949_EC_A0 WORDINDEX2INFO(27337)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A0_infos,
+
+#define to_CP949_EC_A1_infos WORDINDEX2INFO(27339)
+           INVALID, o2(0xC1,0xB0), o2(0xA0,0xB2), o2(0xA0,0xB3),
+     o2(0xA0,0xB4), o2(0xA0,0xB5), o2(0xA0,0xB6), o2(0xA0,0xB7),
+     o2(0xA0,0xB8), o2(0xC1,0xB1), o2(0xC1,0xB2), o2(0xA0,0xB9),
+     o2(0xA0,0xBA), o2(0xC1,0xB3), o2(0xC1,0xB4), o2(0xA0,0xBB),
+     o2(0xA0,0xBC), o2(0xA0,0xBD), o2(0xA0,0xBE), o2(0xA0,0xBF),
+     o2(0xA0,0xC0), o2(0xC1,0xB5), o2(0xA0,0xC1), o2(0xA0,0xC2),
+     o2(0xA0,0xC3), o2(0xA0,0xC4), o2(0xA0,0xC5), o2(0xA0,0xC6),
+     o2(0xA0,0xC7), o2(0xA0,0xC8), o2(0xA0,0xC9), o2(0xA0,0xCA),
+     o2(0xA0,0xCB), o2(0xA0,0xCC), o2(0xA0,0xCD), o2(0xA0,0xCE),
+     o2(0xA0,0xCF), o2(0xA0,0xD0), o2(0xA0,0xD1), o2(0xA0,0xD2),
+     o2(0xA0,0xD3), o2(0xA0,0xD4), o2(0xA0,0xD5), o2(0xA0,0xD6),
+     o2(0xA0,0xD7), o2(0xA0,0xD8), o2(0xA0,0xD9), o2(0xA0,0xDA),
+     o2(0xA0,0xDB), o2(0xC1,0xB6), o2(0xC1,0xB7), o2(0xA0,0xDC),
+     o2(0xA0,0xDD), o2(0xC1,0xB8), o2(0xA0,0xDE), o2(0xA0,0xDF),
+     o2(0xA0,0xE0), o2(0xC1,0xB9), o2(0xA0,0xE1), o2(0xC1,0xBA),
+     o2(0xA0,0xE2), o2(0xA0,0xE3), o2(0xA0,0xE4), o2(0xA0,0xE5),
+     o2(0xA0,0xE6),
+
+#define to_CP949_EC_A1 WORDINDEX2INFO(27404)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A1_infos,
+
+#define to_CP949_EC_A2_infos WORDINDEX2INFO(27406)
+           INVALID, o2(0xC1,0xBB), o2(0xC1,0xBC), o2(0xA0,0xE7),
+     o2(0xC1,0xBD), o2(0xA0,0xE8), o2(0xC1,0xBE), o2(0xC1,0xBF),
+     o2(0xC1,0xC0), o2(0xA0,0xE9), o2(0xA0,0xEA), o2(0xA0,0xEB),
+     o2(0xC1,0xC1), o2(0xC1,0xC2), o2(0xC1,0xC3), o2(0xA0,0xEC),
+     o2(0xA0,0xED), o2(0xA0,0xEE), o2(0xA0,0xEF), o2(0xA0,0xF0),
+     o2(0xA0,0xF1), o2(0xC1,0xC4), o2(0xA0,0xF2), o2(0xA0,0xF3),
+     o2(0xA0,0xF4), o2(0xA0,0xF5), o2(0xA0,0xF6), o2(0xA0,0xF7),
+     o2(0xA0,0xF8), o2(0xA0,0xF9), o2(0xC1,0xC5), o2(0xA0,0xFA),
+     o2(0xC1,0xC6), o2(0xA0,0xFB), o2(0xC1,0xC7), o2(0xA0,0xFC),
+     o2(0xA0,0xFD), o2(0xA0,0xFE), o2(0xA1,0x41), o2(0xA1,0x42),
+     o2(0xA1,0x43), o2(0xC1,0xC8), o2(0xA1,0x44), o2(0xA1,0x45),
+     o2(0xA1,0x46), o2(0xA1,0x47), o2(0xA1,0x48), o2(0xA1,0x49),
+     o2(0xA1,0x4A), o2(0xA1,0x4B), o2(0xA1,0x4C), o2(0xA1,0x4D),
+     o2(0xA1,0x4E), o2(0xA1,0x4F), o2(0xA1,0x50), o2(0xA1,0x51),
+     o2(0xA1,0x52), o2(0xA1,0x53), o2(0xA1,0x54), o2(0xA1,0x55),
+     o2(0xA1,0x56), o2(0xC1,0xC9), o2(0xC1,0xCA), o2(0xA1,0x57),
+     o2(0xA1,0x58),
+
+#define to_CP949_EC_A2 WORDINDEX2INFO(27471)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A2_infos,
+
+#define to_CP949_EC_A3_infos WORDINDEX2INFO(27473)
+           INVALID, o2(0xA1,0x59), o2(0xA1,0x5A), o2(0xA1,0x61),
+     o2(0xA1,0x62), o2(0xC1,0xCB), o2(0xA1,0x63), o2(0xA1,0x64),
+     o2(0xA1,0x65), o2(0xC1,0xCC), o2(0xA1,0x66), o2(0xA1,0x67),
+     o2(0xA1,0x68), o2(0xC1,0xCD), o2(0xA1,0x69), o2(0xA1,0x6A),
+     o2(0xA1,0x6B), o2(0xA1,0x6C), o2(0xA1,0x6D), o2(0xA1,0x6E),
+     o2(0xA1,0x6F), o2(0xC1,0xCE), o2(0xC1,0xCF), o2(0xA1,0x70),
+     o2(0xC1,0xD0), o2(0xA1,0x71), o2(0xC1,0xD1), o2(0xA1,0x72),
+     o2(0xA1,0x73), o2(0xA1,0x74), o2(0xA1,0x75), o2(0xA1,0x76),
+     o2(0xA1,0x77), o2(0xC1,0xD2), o2(0xC1,0xD3), o2(0xA1,0x78),
+     o2(0xA1,0x79), o2(0xC1,0xD4), o2(0xA1,0x7A), o2(0xA1,0x81),
+     o2(0xA1,0x82), o2(0xA1,0x83), o2(0xA1,0x84), o2(0xA1,0x85),
+     o2(0xA1,0x86), o2(0xA1,0x87), o2(0xA1,0x88), o2(0xA1,0x89),
+     o2(0xA1,0x8A), o2(0xA1,0x8B), o2(0xA1,0x8C), o2(0xA1,0x8D),
+     o2(0xA1,0x8E), o2(0xA1,0x8F), o2(0xC1,0xD5), o2(0xA1,0x90),
+     o2(0xA1,0x91), o2(0xA1,0x92), o2(0xA1,0x93), o2(0xA1,0x94),
+     o2(0xA1,0x95), o2(0xC1,0xD6), o2(0xC1,0xD7), o2(0xA1,0x96),
+     o2(0xA1,0x97),
+
+#define to_CP949_EC_A3 WORDINDEX2INFO(27538)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A3_infos,
+
+#define to_CP949_EC_A4_infos WORDINDEX2INFO(27540)
+           INVALID, o2(0xC1,0xD8), o2(0xA1,0x98), o2(0xA1,0x99),
+     o2(0xA1,0x9A), o2(0xC1,0xD9), o2(0xC1,0xDA), o2(0xC1,0xDB),
+     o2(0xA1,0x9B), o2(0xA1,0x9C), o2(0xA1,0x9D), o2(0xA1,0x9E),
+     o2(0xA1,0x9F), o2(0xC1,0xDC), o2(0xC1,0xDD), o2(0xA1,0xA0),
+     o2(0xC1,0xDE), o2(0xA2,0x41), o2(0xC1,0xDF), o2(0xA2,0x42),
+     o2(0xA2,0x43), o2(0xA2,0x44), o2(0xA2,0x45), o2(0xA2,0x46),
+     o2(0xA2,0x47), o2(0xC1,0xE0), o2(0xA2,0x48), o2(0xA2,0x49),
+     o2(0xA2,0x4A), o2(0xA2,0x4B), o2(0xA2,0x4C), o2(0xA2,0x4D),
+     o2(0xA2,0x4E), o2(0xA2,0x4F), o2(0xA2,0x50), o2(0xA2,0x51),
+     o2(0xA2,0x52), o2(0xA2,0x53), o2(0xA2,0x54), o2(0xA2,0x55),
+     o2(0xA2,0x56), o2(0xA2,0x57), o2(0xA2,0x58), o2(0xA2,0x59),
+     o2(0xA2,0x5A), o2(0xC1,0xE1), o2(0xA2,0x61), o2(0xA2,0x62),
+     o2(0xA2,0x63), o2(0xA2,0x64), o2(0xA2,0x65), o2(0xA2,0x66),
+     o2(0xA2,0x67), o2(0xC1,0xE2), o2(0xA2,0x68), o2(0xA2,0x69),
+     o2(0xA2,0x6A), o2(0xA2,0x6B), o2(0xA2,0x6C), o2(0xA2,0x6D),
+     o2(0xA2,0x6E), o2(0xA2,0x6F), o2(0xA2,0x70), o2(0xA2,0x71),
+     o2(0xA2,0x72),
+
+#define to_CP949_EC_A4 WORDINDEX2INFO(27605)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A4_infos,
+
+#define to_CP949_EC_A5_infos WORDINDEX2INFO(27607)
+           INVALID, o2(0xA2,0x73), o2(0xA2,0x74), o2(0xA2,0x75),
+     o2(0xA2,0x76), o2(0xA2,0x77), o2(0xA2,0x78), o2(0xA2,0x79),
+     o2(0xA2,0x7A), o2(0xA2,0x81), o2(0xA2,0x82), o2(0xA2,0x83),
+     o2(0xA2,0x84), o2(0xA2,0x85), o2(0xA2,0x86), o2(0xA2,0x87),
+     o2(0xA2,0x88), o2(0xC1,0xE3), o2(0xC1,0xE4), o2(0xA2,0x89),
+     o2(0xA2,0x8A), o2(0xC1,0xE5), o2(0xA2,0x8B), o2(0xA2,0x8C),
+     o2(0xA2,0x8D), o2(0xC1,0xE6), o2(0xA2,0x8E), o2(0xA2,0x8F),
+     o2(0xA2,0x90), o2(0xA2,0x91), o2(0xA2,0x92), o2(0xA2,0x93),
+     o2(0xA2,0x94), o2(0xC1,0xE7), o2(0xC1,0xE8), o2(0xA2,0x95),
+     o2(0xC1,0xE9), o2(0xA2,0x96), o2(0xA2,0x97), o2(0xA2,0x98),
+     o2(0xA2,0x99), o2(0xA2,0x9A), o2(0xA2,0x9B), o2(0xA2,0x9C),
+     o2(0xA2,0x9D), o2(0xC1,0xEA), o2(0xA2,0x9E), o2(0xA2,0x9F),
+     o2(0xA2,0xA0), o2(0xC1,0xEB), o2(0xA3,0x41), o2(0xA3,0x42),
+     o2(0xA3,0x43), o2(0xC1,0xEC), o2(0xA3,0x44), o2(0xA3,0x45),
+     o2(0xA3,0x46), o2(0xA3,0x47), o2(0xA3,0x48), o2(0xA3,0x49),
+     o2(0xA3,0x4A), o2(0xC1,0xED), o2(0xA3,0x4B), o2(0xA3,0x4C),
+     o2(0xA3,0x4D),
+
+#define to_CP949_EC_A5 WORDINDEX2INFO(27672)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A5_infos,
+
+#define to_CP949_EC_A6_infos WORDINDEX2INFO(27674)
+           INVALID, o2(0xA3,0x4E), o2(0xA3,0x4F), o2(0xA3,0x50),
+     o2(0xA3,0x51), o2(0xA3,0x52), o2(0xA3,0x53), o2(0xA3,0x54),
+     o2(0xA3,0x55), o2(0xC1,0xEE), o2(0xC1,0xEF), o2(0xA3,0x56),
+     o2(0xA3,0x57), o2(0xC1,0xF0), o2(0xA3,0x58), o2(0xA3,0x59),
+     o2(0xA3,0x5A), o2(0xC1,0xF1), o2(0xA3,0x61), o2(0xA3,0x62),
+     o2(0xA3,0x63), o2(0xA3,0x64), o2(0xA3,0x65), o2(0xA3,0x66),
+     o2(0xA3,0x67), o2(0xC1,0xF2), o2(0xC1,0xF3), o2(0xA3,0x68),
+     o2(0xC1,0xF4), o2(0xA3,0x69), o2(0xC1,0xF5), o2(0xA3,0x6A),
+     o2(0xA3,0x6B), o2(0xA3,0x6C), o2(0xA3,0x6D), o2(0xA3,0x6E),
+     o2(0xA3,0x6F), o2(0xA3,0x70), o2(0xA3,0x71), o2(0xA3,0x72),
+     o2(0xA3,0x73), o2(0xA3,0x74), o2(0xA3,0x75), o2(0xA3,0x76),
+     o2(0xA3,0x77), o2(0xA3,0x78), o2(0xA3,0x79), o2(0xA3,0x7A),
+     o2(0xA3,0x81), o2(0xA3,0x82), o2(0xA3,0x83), o2(0xA3,0x84),
+     o2(0xA3,0x85), o2(0xA3,0x86), o2(0xA3,0x87), o2(0xA3,0x88),
+     o2(0xA3,0x89), o2(0xA3,0x8A), o2(0xA3,0x8B), o2(0xA3,0x8C),
+     o2(0xA3,0x8D), o2(0xA3,0x8E), o2(0xA3,0x8F), o2(0xA3,0x90),
+     o2(0xA3,0x91),
+
+#define to_CP949_EC_A6 WORDINDEX2INFO(27739)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A6_infos,
+
+#define to_CP949_EC_A7_infos WORDINDEX2INFO(27741)
+           INVALID, o2(0xC1,0xF6), o2(0xC1,0xF7), o2(0xA3,0x92),
+     o2(0xA3,0x93), o2(0xC1,0xF8), o2(0xA3,0x94), o2(0xA3,0x95),
+     o2(0xC1,0xF9), o2(0xC1,0xFA), o2(0xA3,0x96), o2(0xC1,0xFB),
+     o2(0xA3,0x97), o2(0xA3,0x98), o2(0xA3,0x99), o2(0xA3,0x9A),
+     o2(0xA3,0x9B), o2(0xC1,0xFC), o2(0xC1,0xFD), o2(0xA3,0x9C),
+     o2(0xC1,0xFE), o2(0xA3,0x9D), o2(0xC2,0xA1), o2(0xC2,0xA2),
+     o2(0xA3,0x9E), o2(0xA3,0x9F), o2(0xC2,0xA3), o2(0xC2,0xA4),
+     o2(0xA3,0xA0), o2(0xC2,0xA5), o2(0xC2,0xA6), o2(0xA4,0x41),
+     o2(0xA4,0x42), o2(0xC2,0xA7), o2(0xA4,0x43), o2(0xC2,0xA8),
+     o2(0xA4,0x44), o2(0xC2,0xA9), o2(0xA4,0x45), o2(0xA4,0x46),
+     o2(0xC2,0xAA), o2(0xA4,0x47), o2(0xA4,0x48), o2(0xA4,0x49),
+     o2(0xA4,0x4A), o2(0xC2,0xAB), o2(0xC2,0xAC), o2(0xA4,0x4B),
+     o2(0xC2,0xAD), o2(0xC2,0xAE), o2(0xC2,0xAF), o2(0xA4,0x4C),
+     o2(0xA4,0x4D), o2(0xA4,0x4E), o2(0xA4,0x4F), o2(0xA4,0x50),
+     o2(0xA4,0x51), o2(0xC2,0xB0), o2(0xC2,0xB1), o2(0xA4,0x52),
+     o2(0xA4,0x53), o2(0xC2,0xB2), o2(0xA4,0x54), o2(0xA4,0x55),
+     o2(0xA4,0x56),
+
+#define to_CP949_EC_A7 WORDINDEX2INFO(27806)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A7_infos,
+
+#define to_CP949_EC_A8_infos WORDINDEX2INFO(27808)
+           INVALID, o2(0xC2,0xB3), o2(0xA4,0x57), o2(0xA4,0x58),
+     o2(0xA4,0x59), o2(0xA4,0x5A), o2(0xA4,0x61), o2(0xA4,0x62),
+     o2(0xA4,0x63), o2(0xC2,0xB4), o2(0xC2,0xB5), o2(0xA4,0x64),
+     o2(0xC2,0xB6), o2(0xC2,0xB7), o2(0xC2,0xB8), o2(0xA4,0x65),
+     o2(0xA4,0x66), o2(0xA4,0x67), o2(0xA4,0x68), o2(0xA4,0x69),
+     o2(0xA4,0x6A), o2(0xC2,0xB9), o2(0xA4,0x6B), o2(0xA4,0x6C),
+     o2(0xA4,0x6D), o2(0xC2,0xBA), o2(0xA4,0x6E), o2(0xA4,0x6F),
+     o2(0xA4,0x70), o2(0xA4,0x71), o2(0xA4,0x72), o2(0xA4,0x73),
+     o2(0xA4,0x74), o2(0xA4,0x75), o2(0xA4,0x76), o2(0xA4,0x77),
+     o2(0xA4,0x78), o2(0xA4,0x79), o2(0xA4,0x7A), o2(0xA4,0x81),
+     o2(0xA4,0x82), o2(0xA4,0x83), o2(0xC2,0xBB), o2(0xA4,0x84),
+     o2(0xA4,0x85), o2(0xA4,0x86), o2(0xA4,0x87), o2(0xA4,0x88),
+     o2(0xA4,0x89), o2(0xA4,0x8A), o2(0xA4,0x8B), o2(0xA4,0x8C),
+     o2(0xA4,0x8D), o2(0xA4,0x8E), o2(0xA4,0x8F), o2(0xA4,0x90),
+     o2(0xA4,0x91), o2(0xA4,0x92), o2(0xA4,0x93), o2(0xA4,0x94),
+     o2(0xA4,0x95), o2(0xA4,0x96), o2(0xA4,0x97), o2(0xA4,0x98),
+     o2(0xA4,0x99),
+
+#define to_CP949_EC_A8 WORDINDEX2INFO(27873)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A8_infos,
+
+#define to_CP949_EC_A9_infos WORDINDEX2INFO(27875)
+           INVALID, o2(0xA4,0x9A), o2(0xA4,0x9B), o2(0xA4,0x9C),
+     o2(0xA4,0x9D), o2(0xA4,0x9E), o2(0xA4,0x9F), o2(0xA4,0xA0),
+     o2(0xA5,0x41), o2(0xA5,0x42), o2(0xA5,0x43), o2(0xA5,0x44),
+     o2(0xA5,0x45), o2(0xC2,0xBC), o2(0xC2,0xBD), o2(0xA5,0x46),
+     o2(0xA5,0x47), o2(0xC2,0xBE), o2(0xA5,0x48), o2(0xA5,0x49),
+     o2(0xA5,0x4A), o2(0xC2,0xBF), o2(0xA5,0x4B), o2(0xA5,0x4C),
+     o2(0xA5,0x4D), o2(0xA5,0x4E), o2(0xA5,0x4F), o2(0xA5,0x50),
+     o2(0xA5,0x51), o2(0xC2,0xC0), o2(0xC2,0xC1), o2(0xA5,0x52),
+     o2(0xC2,0xC2), o2(0xC2,0xC3), o2(0xC2,0xC4), o2(0xA5,0x53),
+     o2(0xA5,0x54), o2(0xA5,0x55), o2(0xA5,0x56), o2(0xA5,0x57),
+     o2(0xA5,0x58), o2(0xC2,0xC5), o2(0xA5,0x59), o2(0xA5,0x5A),
+     o2(0xA5,0x61), o2(0xA5,0x62), o2(0xA5,0x63), o2(0xA5,0x64),
+     o2(0xA5,0x65), o2(0xA5,0x66), o2(0xA5,0x67), o2(0xA5,0x68),
+     o2(0xA5,0x69), o2(0xA5,0x6A), o2(0xA5,0x6B), o2(0xA5,0x6C),
+     o2(0xA5,0x6D), o2(0xA5,0x6E), o2(0xA5,0x6F), o2(0xA5,0x70),
+     o2(0xA5,0x71), o2(0xA5,0x72), o2(0xC2,0xC6), o2(0xA5,0x73),
+     o2(0xA5,0x74),
+
+#define to_CP949_EC_A9 WORDINDEX2INFO(27940)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_A9_infos,
+
+#define to_CP949_EC_AA_infos WORDINDEX2INFO(27942)
+           INVALID, o2(0xA5,0x75), o2(0xA5,0x76), o2(0xA5,0x77),
+     o2(0xA5,0x78), o2(0xC2,0xC7), o2(0xA5,0x79), o2(0xA5,0x7A),
+     o2(0xA5,0x81), o2(0xA5,0x82), o2(0xA5,0x83), o2(0xA5,0x84),
+     o2(0xA5,0x85), o2(0xA5,0x86), o2(0xA5,0x87), o2(0xA5,0x88),
+     o2(0xA5,0x89), o2(0xA5,0x8A), o2(0xA5,0x8B), o2(0xA5,0x8C),
+     o2(0xA5,0x8D), o2(0xA5,0x8E), o2(0xA5,0x8F), o2(0xA5,0x90),
+     o2(0xA5,0x91), o2(0xC2,0xC8), o2(0xA5,0x92), o2(0xA5,0x93),
+     o2(0xA5,0x94), o2(0xA5,0x95), o2(0xA5,0x96), o2(0xA5,0x97),
+     o2(0xA5,0x98), o2(0xA5,0x99), o2(0xA5,0x9A), o2(0xA5,0x9B),
+     o2(0xA5,0x9C), o2(0xA5,0x9D), o2(0xA5,0x9E), o2(0xA5,0x9F),
+     o2(0xA5,0xA0), o2(0xA6,0x41), o2(0xA6,0x42), o2(0xA6,0x43),
+     o2(0xA6,0x44), o2(0xA6,0x45), o2(0xA6,0x46), o2(0xA6,0x47),
+     o2(0xA6,0x48), o2(0xA6,0x49), o2(0xA6,0x4A), o2(0xA6,0x4B),
+     o2(0xA6,0x4C), o2(0xA6,0x4D), o2(0xA6,0x4E), o2(0xA6,0x4F),
+     o2(0xA6,0x50), o2(0xA6,0x51), o2(0xA6,0x52), o2(0xA6,0x53),
+     o2(0xA6,0x54), o2(0xC2,0xC9), o2(0xC2,0xCA), o2(0xA6,0x55),
+     o2(0xA6,0x56),
+
+#define to_CP949_EC_AA WORDINDEX2INFO(28007)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AA_infos,
+
+#define to_CP949_EC_AB_infos WORDINDEX2INFO(28009)
+           INVALID, o2(0xC2,0xCB), o2(0xA6,0x57), o2(0xA6,0x58),
+     o2(0xA6,0x59), o2(0xC2,0xCC), o2(0xA6,0x5A), o2(0xA6,0x61),
+     o2(0xA6,0x62), o2(0xA6,0x63), o2(0xA6,0x64), o2(0xA6,0x65),
+     o2(0xA6,0x66), o2(0xC2,0xCD), o2(0xC2,0xCE), o2(0xA6,0x67),
+     o2(0xC2,0xCF), o2(0xA6,0x68), o2(0xC2,0xD0), o2(0xA6,0x69),
+     o2(0xC2,0xD1), o2(0xA6,0x6A), o2(0xA6,0x6B), o2(0xA6,0x6C),
+     o2(0xA6,0x6D), o2(0xC2,0xD2), o2(0xC2,0xD3), o2(0xA6,0x6E),
+     o2(0xA6,0x6F), o2(0xA6,0x70), o2(0xA6,0x71), o2(0xA6,0x72),
+     o2(0xA6,0x73), o2(0xC2,0xD4), o2(0xA6,0x74), o2(0xA6,0x75),
+     o2(0xA6,0x76), o2(0xA6,0x77), o2(0xA6,0x78), o2(0xA6,0x79),
+     o2(0xA6,0x7A), o2(0xA6,0x81), o2(0xA6,0x82), o2(0xA6,0x83),
+     o2(0xA6,0x84), o2(0xC2,0xD5), o2(0xA6,0x85), o2(0xA6,0x86),
+     o2(0xA6,0x87), o2(0xA6,0x88), o2(0xA6,0x89), o2(0xA6,0x8A),
+     o2(0xA6,0x8B), o2(0xC2,0xD6), o2(0xA6,0x8C), o2(0xA6,0x8D),
+     o2(0xA6,0x8E), o2(0xA6,0x8F), o2(0xA6,0x90), o2(0xA6,0x91),
+     o2(0xA6,0x92), o2(0xA6,0x93), o2(0xA6,0x94), o2(0xA6,0x95),
+     o2(0xA6,0x96),
+
+#define to_CP949_EC_AB WORDINDEX2INFO(28074)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AB_infos,
+
+#define to_CP949_EC_AC_infos WORDINDEX2INFO(28076)
+           INVALID, o2(0xA6,0x97), o2(0xA6,0x98), o2(0xA6,0x99),
+     o2(0xA6,0x9A), o2(0xA6,0x9B), o2(0xA6,0x9C), o2(0xA6,0x9D),
+     o2(0xA6,0x9E), o2(0xC2,0xD7), o2(0xA6,0x9F), o2(0xA6,0xA0),
+     o2(0xA7,0x41), o2(0xA7,0x42), o2(0xA7,0x43), o2(0xA7,0x44),
+     o2(0xA7,0x45), o2(0xC2,0xD8), o2(0xA7,0x46), o2(0xA7,0x47),
+     o2(0xA7,0x48), o2(0xC2,0xD9), o2(0xA7,0x49), o2(0xA7,0x4A),
+     o2(0xA7,0x4B), o2(0xC2,0xDA), o2(0xA7,0x4C), o2(0xA7,0x4D),
+     o2(0xA7,0x4E), o2(0xA7,0x4F), o2(0xA7,0x50), o2(0xA7,0x51),
+     o2(0xA7,0x52), o2(0xC2,0xDB), o2(0xC2,0xDC), o2(0xA7,0x53),
+     o2(0xA7,0x54), o2(0xA7,0x55), o2(0xA7,0x56), o2(0xA7,0x57),
+     o2(0xA7,0x58), o2(0xA7,0x59), o2(0xA7,0x5A), o2(0xA7,0x61),
+     o2(0xA7,0x62), o2(0xA7,0x63), o2(0xA7,0x64), o2(0xA7,0x65),
+     o2(0xA7,0x66), o2(0xA7,0x67), o2(0xA7,0x68), o2(0xA7,0x69),
+     o2(0xA7,0x6A), o2(0xA7,0x6B), o2(0xA7,0x6C), o2(0xA7,0x6D),
+     o2(0xA7,0x6E), o2(0xA7,0x6F), o2(0xA7,0x70), o2(0xA7,0x71),
+     o2(0xA7,0x72), o2(0xA7,0x73), o2(0xA7,0x74), o2(0xA7,0x75),
+     o2(0xA7,0x76),
+
+#define to_CP949_EC_AC WORDINDEX2INFO(28141)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AC_infos,
+
+#define to_CP949_EC_AD_infos WORDINDEX2INFO(28143)
+           INVALID, o2(0xA7,0x77), o2(0xC2,0xDD), o2(0xA7,0x78),
+     o2(0xA7,0x79), o2(0xA7,0x7A), o2(0xA7,0x81), o2(0xA7,0x82),
+     o2(0xA7,0x83), o2(0xC2,0xDE), o2(0xC2,0xDF), o2(0xA7,0x84),
+     o2(0xA7,0x85), o2(0xC2,0xE0), o2(0xA7,0x86), o2(0xA7,0x87),
+     o2(0xA7,0x88), o2(0xC2,0xE1), o2(0xA7,0x89), o2(0xA7,0x8A),
+     o2(0xA7,0x8B), o2(0xA7,0x8C), o2(0xA7,0x8D), o2(0xA7,0x8E),
+     o2(0xA7,0x8F), o2(0xC2,0xE2), o2(0xC2,0xE3), o2(0xA7,0x90),
+     o2(0xA7,0x91), o2(0xA7,0x92), o2(0xC2,0xE4), o2(0xA7,0x93),
+     o2(0xA7,0x94), o2(0xA7,0x95), o2(0xA7,0x96), o2(0xA7,0x97),
+     o2(0xA7,0x98), o2(0xC2,0xE5), o2(0xA7,0x99), o2(0xA7,0x9A),
+     o2(0xA7,0x9B), o2(0xA7,0x9C), o2(0xA7,0x9D), o2(0xA7,0x9E),
+     o2(0xA7,0x9F), o2(0xA7,0xA0), o2(0xA8,0x41), o2(0xA8,0x42),
+     o2(0xA8,0x43), o2(0xA8,0x44), o2(0xA8,0x45), o2(0xA8,0x46),
+     o2(0xA8,0x47), o2(0xA8,0x48), o2(0xA8,0x49), o2(0xA8,0x4A),
+     o2(0xA8,0x4B), o2(0xC2,0xE6), o2(0xC2,0xE7), o2(0xA8,0x4C),
+     o2(0xA8,0x4D), o2(0xA8,0x4E), o2(0xA8,0x4F), o2(0xA8,0x50),
+     o2(0xA8,0x51),
+
+#define to_CP949_EC_AD WORDINDEX2INFO(28208)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AD_infos,
+
+#define to_CP949_EC_AE_infos WORDINDEX2INFO(28210)
+           INVALID, o2(0xA8,0x52), o2(0xA8,0x53), o2(0xA8,0x54),
+     o2(0xA8,0x55), o2(0xA8,0x56), o2(0xA8,0x57), o2(0xA8,0x58),
+     o2(0xA8,0x59), o2(0xA8,0x5A), o2(0xA8,0x61), o2(0xA8,0x62),
+     o2(0xA8,0x63), o2(0xA8,0x64), o2(0xA8,0x65), o2(0xA8,0x66),
+     o2(0xA8,0x67), o2(0xA8,0x68), o2(0xA8,0x69), o2(0xA8,0x6A),
+     o2(0xA8,0x6B), o2(0xA8,0x6C), o2(0xA8,0x6D), o2(0xA8,0x6E),
+     o2(0xA8,0x6F), o2(0xA8,0x70), o2(0xA8,0x71), o2(0xA8,0x72),
+     o2(0xA8,0x73), o2(0xC2,0xE8), o2(0xA8,0x74), o2(0xA8,0x75),
+     o2(0xA8,0x76), o2(0xA8,0x77), o2(0xA8,0x78), o2(0xA8,0x79),
+     o2(0xA8,0x7A), o2(0xA8,0x81), o2(0xA8,0x82), o2(0xA8,0x83),
+     o2(0xA8,0x84), o2(0xA8,0x85), o2(0xA8,0x86), o2(0xA8,0x87),
+     o2(0xA8,0x88), o2(0xA8,0x89), o2(0xA8,0x8A), o2(0xA8,0x8B),
+     o2(0xA8,0x8C), o2(0xA8,0x8D), o2(0xA8,0x8E), o2(0xA8,0x8F),
+     o2(0xA8,0x90), o2(0xA8,0x91), o2(0xA8,0x92), o2(0xA8,0x93),
+     o2(0xA8,0x94), o2(0xC2,0xE9), o2(0xA8,0x95), o2(0xA8,0x96),
+     o2(0xA8,0x97), o2(0xA8,0x98), o2(0xA8,0x99), o2(0xA8,0x9A),
+     o2(0xA8,0x9B),
+
+#define to_CP949_EC_AE WORDINDEX2INFO(28275)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AE_infos,
+
+#define to_CP949_EC_AF_infos WORDINDEX2INFO(28277)
+           INVALID, o2(0xA8,0x9C), o2(0xA8,0x9D), o2(0xA8,0x9E),
+     o2(0xA8,0x9F), o2(0xA8,0xA0), o2(0xA9,0x41), o2(0xA9,0x42),
+     o2(0xA9,0x43), o2(0xA9,0x44), o2(0xA9,0x45), o2(0xA9,0x46),
+     o2(0xA9,0x47), o2(0xA9,0x48), o2(0xA9,0x49), o2(0xA9,0x4A),
+     o2(0xA9,0x4B), o2(0xA9,0x4C), o2(0xA9,0x4D), o2(0xA9,0x4E),
+     o2(0xA9,0x4F), o2(0xC2,0xEA), o2(0xA9,0x50), o2(0xA9,0x51),
+     o2(0xA9,0x52), o2(0xA9,0x53), o2(0xA9,0x54), o2(0xA9,0x55),
+     o2(0xA9,0x56), o2(0xA9,0x57), o2(0xA9,0x58), o2(0xA9,0x59),
+     o2(0xA9,0x5A), o2(0xA9,0x61), o2(0xA9,0x62), o2(0xA9,0x63),
+     o2(0xA9,0x64), o2(0xC2,0xEB), o2(0xA9,0x65), o2(0xA9,0x66),
+     o2(0xC2,0xEC), o2(0xA9,0x67), o2(0xC2,0xED), o2(0xA9,0x68),
+     o2(0xA9,0x69), o2(0xA9,0x6A), o2(0xA9,0x6B), o2(0xA9,0x6C),
+     o2(0xA9,0x6D), o2(0xA9,0x6E), o2(0xA9,0x6F), o2(0xA9,0x70),
+     o2(0xA9,0x71), o2(0xA9,0x72), o2(0xA9,0x73), o2(0xA9,0x74),
+     o2(0xA9,0x75), o2(0xA9,0x76), o2(0xA9,0x77), o2(0xA9,0x78),
+     o2(0xA9,0x79), o2(0xA9,0x7A), o2(0xA9,0x81), o2(0xA9,0x82),
+     o2(0xA9,0x83),
+
+#define to_CP949_EC_AF WORDINDEX2INFO(28342)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_AF_infos,
+
+#define to_CP949_EC_B0_infos WORDINDEX2INFO(28344)
+           INVALID, o2(0xA9,0x84), o2(0xA9,0x85), o2(0xA9,0x86),
+     o2(0xA9,0x87), o2(0xA9,0x88), o2(0xA9,0x89), o2(0xA9,0x8A),
+     o2(0xA9,0x8B), o2(0xA9,0x8C), o2(0xA9,0x8D), o2(0xA9,0x8E),
+     o2(0xA9,0x8F), o2(0xC2,0xEE), o2(0xC2,0xEF), o2(0xA9,0x90),
+     o2(0xA9,0x91), o2(0xC2,0xF0), o2(0xA9,0x92), o2(0xA9,0x93),
+     o2(0xA9,0x94), o2(0xC2,0xF1), o2(0xA9,0x95), o2(0xA9,0x96),
+     o2(0xA9,0x97), o2(0xA9,0x98), o2(0xA9,0x99), o2(0xA9,0x9A),
+     o2(0xA9,0x9B), o2(0xC2,0xF2), o2(0xC2,0xF3), o2(0xA9,0x9C),
+     o2(0xA9,0x9D), o2(0xA9,0x9E), o2(0xC2,0xF4), o2(0xC2,0xF5),
+     o2(0xA9,0x9F), o2(0xA9,0xA0), o2(0xAA,0x41), o2(0xAA,0x42),
+     o2(0xC2,0xF6), o2(0xC2,0xF7), o2(0xC2,0xF8), o2(0xAA,0x43),
+     o2(0xAA,0x44), o2(0xC2,0xF9), o2(0xAA,0x45), o2(0xC2,0xFA),
+     o2(0xAA,0x46), o2(0xC2,0xFB), o2(0xAA,0x47), o2(0xAA,0x48),
+     o2(0xAA,0x49), o2(0xAA,0x4A), o2(0xAA,0x4B), o2(0xAA,0x4C),
+     o2(0xAA,0x4D), o2(0xC2,0xFC), o2(0xC2,0xFD), o2(0xAA,0x4E),
+     o2(0xC2,0xFE), o2(0xC3,0xA1), o2(0xC3,0xA2), o2(0xC3,0xA3),
+     o2(0xAA,0x4F),
+
+#define to_CP949_EC_B0 WORDINDEX2INFO(28409)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B0_infos,
+
+#define to_CP949_EC_B1_infos WORDINDEX2INFO(28411)
+           INVALID, o2(0xAA,0x50), o2(0xAA,0x51), o2(0xAA,0x52),
+     o2(0xAA,0x53), o2(0xC3,0xA4), o2(0xC3,0xA5), o2(0xAA,0x54),
+     o2(0xAA,0x55), o2(0xC3,0xA6), o2(0xAA,0x56), o2(0xAA,0x57),
+     o2(0xAA,0x58), o2(0xC3,0xA7), o2(0xAA,0x59), o2(0xAA,0x5A),
+     o2(0xAA,0x61), o2(0xAA,0x62), o2(0xAA,0x63), o2(0xAA,0x64),
+     o2(0xAA,0x65), o2(0xC3,0xA8), o2(0xC3,0xA9), o2(0xAA,0x66),
+     o2(0xC3,0xAA), o2(0xC3,0xAB), o2(0xC3,0xAC), o2(0xAA,0x67),
+     o2(0xAA,0x68), o2(0xAA,0x69), o2(0xAA,0x6A), o2(0xAA,0x6B),
+     o2(0xAA,0x6C), o2(0xC3,0xAD), o2(0xAA,0x6D), o2(0xAA,0x6E),
+     o2(0xAA,0x6F), o2(0xC3,0xAE), o2(0xAA,0x70), o2(0xC3,0xAF),
+     o2(0xAA,0x71), o2(0xC3,0xB0), o2(0xAA,0x72), o2(0xAA,0x73),
+     o2(0xAA,0x74), o2(0xAA,0x75), o2(0xAA,0x76), o2(0xAA,0x77),
+     o2(0xAA,0x78), o2(0xC3,0xB1), o2(0xAA,0x79), o2(0xAA,0x7A),
+     o2(0xAA,0x81), o2(0xAA,0x82), o2(0xC3,0xB2), o2(0xAA,0x83),
+     o2(0xAA,0x84), o2(0xAA,0x85), o2(0xAA,0x86), o2(0xAA,0x87),
+     o2(0xAA,0x88), o2(0xAA,0x89), o2(0xAA,0x8A), o2(0xAA,0x8B),
+     o2(0xAA,0x8C),
+
+#define to_CP949_EC_B1 WORDINDEX2INFO(28476)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B1_infos,
+
+#define to_CP949_EC_B2_infos WORDINDEX2INFO(28478)
+           INVALID, o2(0xAA,0x8D), o2(0xAA,0x8E), o2(0xAA,0x8F),
+     o2(0xAA,0x90), o2(0xAA,0x91), o2(0xAA,0x92), o2(0xAA,0x93),
+     o2(0xAA,0x94), o2(0xAA,0x95), o2(0xAA,0x96), o2(0xAA,0x97),
+     o2(0xAA,0x98), o2(0xAA,0x99), o2(0xAA,0x9A), o2(0xAA,0x9B),
+     o2(0xAA,0x9C), o2(0xAA,0x9D), o2(0xAA,0x9E), o2(0xAA,0x9F),
+     o2(0xAA,0xA0), o2(0xAB,0x41), o2(0xAB,0x42), o2(0xAB,0x43),
+     o2(0xAB,0x44), o2(0xC3,0xB3), o2(0xC3,0xB4), o2(0xAB,0x45),
+     o2(0xAB,0x46), o2(0xC3,0xB5), o2(0xAB,0x47), o2(0xAB,0x48),
+     o2(0xAB,0x49), o2(0xC3,0xB6), o2(0xAB,0x4A), o2(0xAB,0x4B),
+     o2(0xAB,0x4C), o2(0xAB,0x4D), o2(0xAB,0x4E), o2(0xAB,0x4F),
+     o2(0xAB,0x50), o2(0xC3,0xB7), o2(0xC3,0xB8), o2(0xAB,0x51),
+     o2(0xC3,0xB9), o2(0xC3,0xBA), o2(0xC3,0xBB), o2(0xAB,0x52),
+     o2(0xAB,0x53), o2(0xAB,0x54), o2(0xAB,0x55), o2(0xAB,0x56),
+     o2(0xAB,0x57), o2(0xC3,0xBC), o2(0xC3,0xBD), o2(0xAB,0x58),
+     o2(0xAB,0x59), o2(0xC3,0xBE), o2(0xAB,0x5A), o2(0xAB,0x61),
+     o2(0xAB,0x62), o2(0xC3,0xBF), o2(0xAB,0x63), o2(0xAB,0x64),
+     o2(0xAB,0x65),
+
+#define to_CP949_EC_B2 WORDINDEX2INFO(28543)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B2_infos,
+
+#define to_CP949_EC_B3_infos WORDINDEX2INFO(28545)
+           INVALID, o2(0xAB,0x66), o2(0xAB,0x67), o2(0xAB,0x68),
+     o2(0xAB,0x69), o2(0xC3,0xC0), o2(0xC3,0xC1), o2(0xAB,0x6A),
+     o2(0xC3,0xC2), o2(0xAB,0x6B), o2(0xC3,0xC3), o2(0xAB,0x6C),
+     o2(0xAB,0x6D), o2(0xAB,0x6E), o2(0xAB,0x6F), o2(0xAB,0x70),
+     o2(0xAB,0x71), o2(0xC3,0xC4), o2(0xAB,0x72), o2(0xAB,0x73),
+     o2(0xAB,0x74), o2(0xC3,0xC5), o2(0xAB,0x75), o2(0xAB,0x76),
+     o2(0xAB,0x77), o2(0xAB,0x78), o2(0xAB,0x79), o2(0xAB,0x7A),
+     o2(0xAB,0x81), o2(0xAB,0x82), o2(0xAB,0x83), o2(0xAB,0x84),
+     o2(0xAB,0x85), o2(0xAB,0x86), o2(0xAB,0x87), o2(0xAB,0x88),
+     o2(0xAB,0x89), o2(0xC3,0xC6), o2(0xAB,0x8A), o2(0xAB,0x8B),
+     o2(0xAB,0x8C), o2(0xAB,0x8D), o2(0xAB,0x8E), o2(0xAB,0x8F),
+     o2(0xAB,0x90), o2(0xC3,0xC7), o2(0xAB,0x91), o2(0xAB,0x92),
+     o2(0xAB,0x93), o2(0xC3,0xC8), o2(0xAB,0x94), o2(0xAB,0x95),
+     o2(0xAB,0x96), o2(0xAB,0x97), o2(0xAB,0x98), o2(0xAB,0x99),
+     o2(0xAB,0x9A), o2(0xAB,0x9B), o2(0xAB,0x9C), o2(0xAB,0x9D),
+     o2(0xAB,0x9E), o2(0xAB,0x9F), o2(0xAB,0xA0), o2(0xAC,0x41),
+     o2(0xAC,0x42),
+
+#define to_CP949_EC_B3 WORDINDEX2INFO(28610)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B3_infos,
+
+#define to_CP949_EC_B4_infos WORDINDEX2INFO(28612)
+           INVALID, o2(0xAC,0x43), o2(0xC3,0xC9), o2(0xAC,0x44),
+     o2(0xAC,0x45), o2(0xAC,0x46), o2(0xAC,0x47), o2(0xAC,0x48),
+     o2(0xAC,0x49), o2(0xC3,0xCA), o2(0xC3,0xCB), o2(0xAC,0x4A),
+     o2(0xAC,0x4B), o2(0xC3,0xCC), o2(0xAC,0x4C), o2(0xAC,0x4D),
+     o2(0xAC,0x4E), o2(0xC3,0xCD), o2(0xAC,0x4F), o2(0xAC,0x50),
+     o2(0xAC,0x51), o2(0xAC,0x52), o2(0xAC,0x53), o2(0xAC,0x54),
+     o2(0xAC,0x55), o2(0xC3,0xCE), o2(0xC3,0xCF), o2(0xAC,0x56),
+     o2(0xC3,0xD0), o2(0xAC,0x57), o2(0xC3,0xD1), o2(0xAC,0x58),
+     o2(0xAC,0x59), o2(0xAC,0x5A), o2(0xAC,0x61), o2(0xAC,0x62),
+     o2(0xAC,0x63), o2(0xC3,0xD2), o2(0xAC,0x64), o2(0xAC,0x65),
+     o2(0xAC,0x66), o2(0xC3,0xD3), o2(0xAC,0x67), o2(0xAC,0x68),
+     o2(0xAC,0x69), o2(0xC3,0xD4), o2(0xAC,0x6A), o2(0xAC,0x6B),
+     o2(0xAC,0x6C), o2(0xAC,0x6D), o2(0xAC,0x6E), o2(0xAC,0x6F),
+     o2(0xAC,0x70), o2(0xAC,0x71), o2(0xAC,0x72), o2(0xAC,0x73),
+     o2(0xAC,0x74), o2(0xAC,0x75), o2(0xC3,0xD5), o2(0xAC,0x76),
+     o2(0xAC,0x77), o2(0xAC,0x78), o2(0xAC,0x79), o2(0xAC,0x7A),
+     o2(0xAC,0x81),
+
+#define to_CP949_EC_B4 WORDINDEX2INFO(28677)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B4_infos,
+
+#define to_CP949_EC_B5_infos WORDINDEX2INFO(28679)
+           INVALID, o2(0xAC,0x82), o2(0xAC,0x83), o2(0xAC,0x84),
+     o2(0xAC,0x85), o2(0xAC,0x86), o2(0xAC,0x87), o2(0xAC,0x88),
+     o2(0xAC,0x89), o2(0xAC,0x8A), o2(0xAC,0x8B), o2(0xAC,0x8C),
+     o2(0xAC,0x8D), o2(0xAC,0x8E), o2(0xAC,0x8F), o2(0xAC,0x90),
+     o2(0xAC,0x91), o2(0xAC,0x92), o2(0xAC,0x93), o2(0xAC,0x94),
+     o2(0xAC,0x95), o2(0xAC,0x96), o2(0xAC,0x97), o2(0xAC,0x98),
+     o2(0xAC,0x99), o2(0xAC,0x9A), o2(0xAC,0x9B), o2(0xAC,0x9C),
+     o2(0xAC,0x9D), o2(0xC3,0xD6), o2(0xAC,0x9E), o2(0xAC,0x9F),
+     o2(0xAC,0xA0), o2(0xC3,0xD7), o2(0xAD,0x41), o2(0xAD,0x42),
+     o2(0xAD,0x43), o2(0xC3,0xD8), o2(0xAD,0x44), o2(0xAD,0x45),
+     o2(0xAD,0x46), o2(0xAD,0x47), o2(0xAD,0x48), o2(0xAD,0x49),
+     o2(0xAD,0x4A), o2(0xC3,0xD9), o2(0xC3,0xDA), o2(0xAD,0x4B),
+     o2(0xC3,0xDB), o2(0xAD,0x4C), o2(0xC3,0xDC), o2(0xAD,0x4D),
+     o2(0xAD,0x4E), o2(0xAD,0x4F), o2(0xAD,0x50), o2(0xAD,0x51),
+     o2(0xAD,0x52), o2(0xC3,0xDD), o2(0xAD,0x53), o2(0xAD,0x54),
+     o2(0xAD,0x55), o2(0xAD,0x56), o2(0xAD,0x57), o2(0xAD,0x58),
+     o2(0xAD,0x59),
+
+#define to_CP949_EC_B5 WORDINDEX2INFO(28744)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B5_infos,
+
+#define to_CP949_EC_B6_infos WORDINDEX2INFO(28746)
+           INVALID, o2(0xAD,0x5A), o2(0xAD,0x61), o2(0xAD,0x62),
+     o2(0xAD,0x63), o2(0xAD,0x64), o2(0xAD,0x65), o2(0xAD,0x66),
+     o2(0xAD,0x67), o2(0xC3,0xDE), o2(0xAD,0x68), o2(0xAD,0x69),
+     o2(0xAD,0x6A), o2(0xAD,0x6B), o2(0xAD,0x6C), o2(0xAD,0x6D),
+     o2(0xAD,0x6E), o2(0xAD,0x6F), o2(0xAD,0x70), o2(0xAD,0x71),
+     o2(0xAD,0x72), o2(0xC3,0xDF), o2(0xC3,0xE0), o2(0xAD,0x73),
+     o2(0xAD,0x74), o2(0xC3,0xE1), o2(0xAD,0x75), o2(0xAD,0x76),
+     o2(0xAD,0x77), o2(0xC3,0xE2), o2(0xAD,0x78), o2(0xAD,0x79),
+     o2(0xAD,0x7A), o2(0xAD,0x81), o2(0xAD,0x82), o2(0xAD,0x83),
+     o2(0xAD,0x84), o2(0xC3,0xE3), o2(0xC3,0xE4), o2(0xAD,0x85),
+     o2(0xC3,0xE5), o2(0xAD,0x86), o2(0xC3,0xE6), o2(0xAD,0x87),
+     o2(0xAD,0x88), o2(0xAD,0x89), o2(0xAD,0x8A), o2(0xAD,0x8B),
+     o2(0xAD,0x8C), o2(0xC3,0xE7), o2(0xAD,0x8D), o2(0xAD,0x8E),
+     o2(0xAD,0x8F), o2(0xAD,0x90), o2(0xAD,0x91), o2(0xAD,0x92),
+     o2(0xAD,0x93), o2(0xAD,0x94), o2(0xAD,0x95), o2(0xAD,0x96),
+     o2(0xAD,0x97), o2(0xAD,0x98), o2(0xAD,0x99), o2(0xAD,0x9A),
+     o2(0xAD,0x9B),
+
+#define to_CP949_EC_B6 WORDINDEX2INFO(28811)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B6_infos,
+
+#define to_CP949_EC_B7_infos WORDINDEX2INFO(28813)
+           INVALID, o2(0xAD,0x9C), o2(0xAD,0x9D), o2(0xAD,0x9E),
+     o2(0xAD,0x9F), o2(0xC3,0xE8), o2(0xAD,0xA0), o2(0xAE,0x41),
+     o2(0xAE,0x42), o2(0xAE,0x43), o2(0xAE,0x44), o2(0xAE,0x45),
+     o2(0xAE,0x46), o2(0xC3,0xE9), o2(0xAE,0x47), o2(0xAE,0x48),
+     o2(0xAE,0x49), o2(0xC3,0xEA), o2(0xAE,0x4A), o2(0xAE,0x4B),
+     o2(0xAE,0x4C), o2(0xAE,0x4D), o2(0xAE,0x4E), o2(0xAE,0x4F),
+     o2(0xAE,0x50), o2(0xAE,0x51), o2(0xAE,0x52), o2(0xAE,0x53),
+     o2(0xAE,0x54), o2(0xAE,0x55), o2(0xAE,0x56), o2(0xAE,0x57),
+     o2(0xAE,0x58), o2(0xAE,0x59), o2(0xAE,0x5A), o2(0xAE,0x61),
+     o2(0xAE,0x62), o2(0xAE,0x63), o2(0xAE,0x64), o2(0xAE,0x65),
+     o2(0xAE,0x66), o2(0xC3,0xEB), o2(0xAE,0x67), o2(0xAE,0x68),
+     o2(0xAE,0x69), o2(0xC3,0xEC), o2(0xAE,0x6A), o2(0xAE,0x6B),
+     o2(0xAE,0x6C), o2(0xC3,0xED), o2(0xAE,0x6D), o2(0xAE,0x6E),
+     o2(0xAE,0x6F), o2(0xAE,0x70), o2(0xAE,0x71), o2(0xAE,0x72),
+     o2(0xAE,0x73), o2(0xC3,0xEE), o2(0xC3,0xEF), o2(0xAE,0x74),
+     o2(0xC3,0xF0), o2(0xAE,0x75), o2(0xC3,0xF1), o2(0xAE,0x76),
+     o2(0xAE,0x77),
+
+#define to_CP949_EC_B7 WORDINDEX2INFO(28878)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B7_infos,
+
+#define to_CP949_EC_B8_infos WORDINDEX2INFO(28880)
+           INVALID, o2(0xAE,0x78), o2(0xAE,0x79), o2(0xAE,0x7A),
+     o2(0xAE,0x81), o2(0xC3,0xF2), o2(0xAE,0x82), o2(0xAE,0x83),
+     o2(0xAE,0x84), o2(0xC3,0xF3), o2(0xAE,0x85), o2(0xAE,0x86),
+     o2(0xAE,0x87), o2(0xC3,0xF4), o2(0xAE,0x88), o2(0xAE,0x89),
+     o2(0xAE,0x8A), o2(0xAE,0x8B), o2(0xAE,0x8C), o2(0xAE,0x8D),
+     o2(0xAE,0x8E), o2(0xC3,0xF5), o2(0xAE,0x8F), o2(0xAE,0x90),
+     o2(0xAE,0x91), o2(0xAE,0x92), o2(0xC3,0xF6), o2(0xAE,0x93),
+     o2(0xAE,0x94), o2(0xAE,0x95), o2(0xAE,0x96), o2(0xAE,0x97),
+     o2(0xAE,0x98), o2(0xC3,0xF7), o2(0xC3,0xF8), o2(0xAE,0x99),
+     o2(0xAE,0x9A), o2(0xC3,0xF9), o2(0xAE,0x9B), o2(0xAE,0x9C),
+     o2(0xAE,0x9D), o2(0xC3,0xFA), o2(0xAE,0x9E), o2(0xAE,0x9F),
+     o2(0xAE,0xA0), o2(0xAF,0x41), o2(0xAF,0x42), o2(0xAF,0x43),
+     o2(0xAF,0x44), o2(0xC3,0xFB), o2(0xC3,0xFC), o2(0xAF,0x45),
+     o2(0xC3,0xFD), o2(0xAF,0x46), o2(0xC3,0xFE), o2(0xAF,0x47),
+     o2(0xAF,0x48), o2(0xAF,0x49), o2(0xAF,0x4A), o2(0xAF,0x4B),
+     o2(0xAF,0x4C), o2(0xAF,0x4D), o2(0xAF,0x4E), o2(0xAF,0x4F),
+     o2(0xAF,0x50),
+
+#define to_CP949_EC_B8 WORDINDEX2INFO(28945)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B8_infos,
+
+#define to_CP949_EC_B9_infos WORDINDEX2INFO(28947)
+           INVALID, o2(0xAF,0x51), o2(0xAF,0x52), o2(0xAF,0x53),
+     o2(0xAF,0x54), o2(0xAF,0x55), o2(0xAF,0x56), o2(0xAF,0x57),
+     o2(0xAF,0x58), o2(0xAF,0x59), o2(0xAF,0x5A), o2(0xAF,0x61),
+     o2(0xAF,0x62), o2(0xAF,0x63), o2(0xAF,0x64), o2(0xAF,0x65),
+     o2(0xAF,0x66), o2(0xAF,0x67), o2(0xAF,0x68), o2(0xAF,0x69),
+     o2(0xAF,0x6A), o2(0xAF,0x6B), o2(0xAF,0x6C), o2(0xAF,0x6D),
+     o2(0xAF,0x6E), o2(0xC4,0xA1), o2(0xC4,0xA2), o2(0xAF,0x6F),
+     o2(0xAF,0x70), o2(0xC4,0xA3), o2(0xAF,0x71), o2(0xAF,0x72),
+     o2(0xC4,0xA4), o2(0xC4,0xA5), o2(0xC4,0xA6), o2(0xAF,0x73),
+     o2(0xAF,0x74), o2(0xAF,0x75), o2(0xAF,0x76), o2(0xAF,0x77),
+     o2(0xAF,0x78), o2(0xC4,0xA7), o2(0xC4,0xA8), o2(0xAF,0x79),
+     o2(0xC4,0xA9), o2(0xAF,0x7A), o2(0xC4,0xAA), o2(0xAF,0x81),
+     o2(0xAF,0x82), o2(0xAF,0x83), o2(0xAF,0x84), o2(0xAF,0x85),
+     o2(0xAF,0x86), o2(0xC4,0xAB), o2(0xC4,0xAC), o2(0xAF,0x87),
+     o2(0xAF,0x88), o2(0xC4,0xAD), o2(0xAF,0x89), o2(0xAF,0x8A),
+     o2(0xAF,0x8B), o2(0xC4,0xAE), o2(0xAF,0x8C), o2(0xAF,0x8D),
+     o2(0xAF,0x8E),
+
+#define to_CP949_EC_B9 WORDINDEX2INFO(29012)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_B9_infos,
+
+#define to_CP949_EC_BA_infos WORDINDEX2INFO(29014)
+           INVALID, o2(0xAF,0x8F), o2(0xAF,0x90), o2(0xAF,0x91),
+     o2(0xAF,0x92), o2(0xC4,0xAF), o2(0xC4,0xB0), o2(0xAF,0x93),
+     o2(0xC4,0xB1), o2(0xAF,0x94), o2(0xC4,0xB2), o2(0xAF,0x95),
+     o2(0xAF,0x96), o2(0xAF,0x97), o2(0xAF,0x98), o2(0xAF,0x99),
+     o2(0xAF,0x9A), o2(0xC4,0xB3), o2(0xC4,0xB4), o2(0xAF,0x9B),
+     o2(0xAF,0x9C), o2(0xC4,0xB5), o2(0xAF,0x9D), o2(0xAF,0x9E),
+     o2(0xAF,0x9F), o2(0xC4,0xB6), o2(0xAF,0xA0), o2(0xB0,0x41),
+     o2(0xB0,0x42), o2(0xB0,0x43), o2(0xB0,0x44), o2(0xB0,0x45),
+     o2(0xB0,0x46), o2(0xC4,0xB7), o2(0xC4,0xB8), o2(0xB0,0x47),
+     o2(0xC4,0xB9), o2(0xC4,0xBA), o2(0xC4,0xBB), o2(0xB0,0x48),
+     o2(0xB0,0x49), o2(0xB0,0x4A), o2(0xB0,0x4B), o2(0xB0,0x4C),
+     o2(0xB0,0x4D), o2(0xC4,0xBC), o2(0xC4,0xBD), o2(0xB0,0x4E),
+     o2(0xB0,0x4F), o2(0xB0,0x50), o2(0xB0,0x51), o2(0xB0,0x52),
+     o2(0xB0,0x53), o2(0xB0,0x54), o2(0xB0,0x55), o2(0xB0,0x56),
+     o2(0xB0,0x57), o2(0xB0,0x58), o2(0xB0,0x59), o2(0xB0,0x5A),
+     o2(0xB0,0x61), o2(0xB0,0x62), o2(0xB0,0x63), o2(0xB0,0x64),
+     o2(0xB0,0x65),
+
+#define to_CP949_EC_BA WORDINDEX2INFO(29079)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BA_infos,
+
+#define to_CP949_EC_BB_infos WORDINDEX2INFO(29081)
+           INVALID, o2(0xB0,0x66), o2(0xC4,0xBE), o2(0xB0,0x67),
+     o2(0xB0,0x68), o2(0xB0,0x69), o2(0xB0,0x6A), o2(0xB0,0x6B),
+     o2(0xB0,0x6C), o2(0xB0,0x6D), o2(0xB0,0x6E), o2(0xB0,0x6F),
+     o2(0xB0,0x70), o2(0xB0,0x71), o2(0xB0,0x72), o2(0xB0,0x73),
+     o2(0xB0,0x74), o2(0xB0,0x75), o2(0xB0,0x76), o2(0xB0,0x77),
+     o2(0xB0,0x78), o2(0xB0,0x79), o2(0xB0,0x7A), o2(0xB0,0x81),
+     o2(0xB0,0x82), o2(0xB0,0x83), o2(0xB0,0x84), o2(0xB0,0x85),
+     o2(0xB0,0x86), o2(0xB0,0x87), o2(0xB0,0x88), o2(0xB0,0x89),
+     o2(0xB0,0x8A), o2(0xB0,0x8B), o2(0xB0,0x8C), o2(0xB0,0x8D),
+     o2(0xB0,0x8E), o2(0xC4,0xBF), o2(0xC4,0xC0), o2(0xB0,0x8F),
+     o2(0xB0,0x90), o2(0xC4,0xC1), o2(0xB0,0x91), o2(0xB0,0x92),
+     o2(0xC4,0xC2), o2(0xC4,0xC3), o2(0xB0,0x93), o2(0xB0,0x94),
+     o2(0xB0,0x95), o2(0xB0,0x96), o2(0xB0,0x97), o2(0xB0,0x98),
+     o2(0xB0,0x99), o2(0xC4,0xC4), o2(0xC4,0xC5), o2(0xB0,0x9A),
+     o2(0xC4,0xC6), o2(0xC4,0xC7), o2(0xC4,0xC8), o2(0xB0,0x9B),
+     o2(0xB0,0x9C), o2(0xB0,0x9D), o2(0xB0,0x9E), o2(0xB0,0x9F),
+     o2(0xB0,0xA0),
+
+#define to_CP949_EC_BB WORDINDEX2INFO(29146)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BB_infos,
+
+#define to_CP949_EC_BC_infos WORDINDEX2INFO(29148)
+           INVALID, o2(0xC4,0xC9), o2(0xC4,0xCA), o2(0xB1,0x41),
+     o2(0xB1,0x42), o2(0xC4,0xCB), o2(0xB1,0x43), o2(0xB1,0x44),
+     o2(0xB1,0x45), o2(0xC4,0xCC), o2(0xB1,0x46), o2(0xB1,0x47),
+     o2(0xB1,0x48), o2(0xB1,0x49), o2(0xB1,0x4A), o2(0xB1,0x4B),
+     o2(0xB1,0x4C), o2(0xC4,0xCD), o2(0xC4,0xCE), o2(0xB1,0x4D),
+     o2(0xC4,0xCF), o2(0xB1,0x4E), o2(0xC4,0xD0), o2(0xB1,0x4F),
+     o2(0xB1,0x50), o2(0xB1,0x51), o2(0xB1,0x52), o2(0xB1,0x53),
+     o2(0xB1,0x54), o2(0xC4,0xD1), o2(0xB1,0x55), o2(0xB1,0x56),
+     o2(0xB1,0x57), o2(0xC4,0xD2), o2(0xB1,0x58), o2(0xB1,0x59),
+     o2(0xB1,0x5A), o2(0xC4,0xD3), o2(0xB1,0x61), o2(0xB1,0x62),
+     o2(0xB1,0x63), o2(0xB1,0x64), o2(0xB1,0x65), o2(0xB1,0x66),
+     o2(0xB1,0x67), o2(0xC4,0xD4), o2(0xC4,0xD5), o2(0xB1,0x68),
+     o2(0xC4,0xD6), o2(0xC4,0xD7), o2(0xC4,0xD8), o2(0xB1,0x69),
+     o2(0xB1,0x6A), o2(0xB1,0x6B), o2(0xB1,0x6C), o2(0xB1,0x6D),
+     o2(0xB1,0x6E), o2(0xC4,0xD9), o2(0xB1,0x6F), o2(0xB1,0x70),
+     o2(0xB1,0x71), o2(0xB1,0x72), o2(0xB1,0x73), o2(0xB1,0x74),
+     o2(0xB1,0x75),
+
+#define to_CP949_EC_BC WORDINDEX2INFO(29213)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BC_infos,
+
+#define to_CP949_EC_BD_infos WORDINDEX2INFO(29215)
+           INVALID, o2(0xB1,0x76), o2(0xB1,0x77), o2(0xB1,0x78),
+     o2(0xB1,0x79), o2(0xB1,0x7A), o2(0xB1,0x81), o2(0xB1,0x82),
+     o2(0xB1,0x83), o2(0xB1,0x84), o2(0xB1,0x85), o2(0xB1,0x86),
+     o2(0xB1,0x87), o2(0xB1,0x88), o2(0xB1,0x89), o2(0xB1,0x8A),
+     o2(0xB1,0x8B), o2(0xB1,0x8C), o2(0xB1,0x8D), o2(0xB1,0x8E),
+     o2(0xB1,0x8F), o2(0xC4,0xDA), o2(0xC4,0xDB), o2(0xB1,0x90),
+     o2(0xB1,0x91), o2(0xC4,0xDC), o2(0xB1,0x92), o2(0xB1,0x93),
+     o2(0xB1,0x94), o2(0xC4,0xDD), o2(0xB1,0x95), o2(0xB1,0x96),
+     o2(0xB1,0x97), o2(0xB1,0x98), o2(0xB1,0x99), o2(0xB1,0x9A),
+     o2(0xB1,0x9B), o2(0xC4,0xDE), o2(0xC4,0xDF), o2(0xB1,0x9C),
+     o2(0xC4,0xE0), o2(0xB1,0x9D), o2(0xC4,0xE1), o2(0xB1,0x9E),
+     o2(0xB1,0x9F), o2(0xB1,0xA0), o2(0xB2,0x41), o2(0xB2,0x42),
+     o2(0xB2,0x43), o2(0xC4,0xE2), o2(0xC4,0xE3), o2(0xB2,0x44),
+     o2(0xB2,0x45), o2(0xC4,0xE4), o2(0xB2,0x46), o2(0xB2,0x47),
+     o2(0xB2,0x48), o2(0xC4,0xE5), o2(0xB2,0x49), o2(0xB2,0x4A),
+     o2(0xB2,0x4B), o2(0xB2,0x4C), o2(0xB2,0x4D), o2(0xB2,0x4E),
+     o2(0xB2,0x4F),
+
+#define to_CP949_EC_BD WORDINDEX2INFO(29280)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BD_infos,
+
+#define to_CP949_EC_BE_infos WORDINDEX2INFO(29282)
+           INVALID, o2(0xC4,0xE6), o2(0xB2,0x50), o2(0xB2,0x51),
+     o2(0xB2,0x52), o2(0xB2,0x53), o2(0xC4,0xE7), o2(0xB2,0x54),
+     o2(0xB2,0x55), o2(0xB2,0x56), o2(0xB2,0x57), o2(0xB2,0x58),
+     o2(0xB2,0x59), o2(0xC4,0xE8), o2(0xB2,0x5A), o2(0xB2,0x61),
+     o2(0xB2,0x62), o2(0xB2,0x63), o2(0xB2,0x64), o2(0xB2,0x65),
+     o2(0xB2,0x66), o2(0xB2,0x67), o2(0xB2,0x68), o2(0xB2,0x69),
+     o2(0xB2,0x6A), o2(0xB2,0x6B), o2(0xB2,0x6C), o2(0xB2,0x6D),
+     o2(0xB2,0x6E), o2(0xB2,0x6F), o2(0xB2,0x70), o2(0xB2,0x71),
+     o2(0xB2,0x72), o2(0xB2,0x73), o2(0xC4,0xE9), o2(0xB2,0x74),
+     o2(0xB2,0x75), o2(0xB2,0x76), o2(0xB2,0x77), o2(0xB2,0x78),
+     o2(0xB2,0x79), o2(0xC4,0xEA), o2(0xB2,0x7A), o2(0xB2,0x81),
+     o2(0xB2,0x82), o2(0xB2,0x83), o2(0xB2,0x84), o2(0xB2,0x85),
+     o2(0xB2,0x86), o2(0xC4,0xEB), o2(0xB2,0x87), o2(0xB2,0x88),
+     o2(0xB2,0x89), o2(0xB2,0x8A), o2(0xB2,0x8B), o2(0xB2,0x8C),
+     o2(0xB2,0x8D), o2(0xB2,0x8E), o2(0xB2,0x8F), o2(0xB2,0x90),
+     o2(0xB2,0x91), o2(0xB2,0x92), o2(0xB2,0x93), o2(0xB2,0x94),
+     o2(0xB2,0x95),
+
+#define to_CP949_EC_BE WORDINDEX2INFO(29347)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BE_infos,
+
+#define to_CP949_EC_BF_infos WORDINDEX2INFO(29349)
+           INVALID, o2(0xB2,0x96), o2(0xB2,0x97), o2(0xB2,0x98),
+     o2(0xB2,0x99), o2(0xC4,0xEC), o2(0xB2,0x9A), o2(0xB2,0x9B),
+     o2(0xB2,0x9C), o2(0xB2,0x9D), o2(0xB2,0x9E), o2(0xB2,0x9F),
+     o2(0xB2,0xA0), o2(0xB3,0x41), o2(0xB3,0x42), o2(0xB3,0x43),
+     o2(0xB3,0x44), o2(0xB3,0x45), o2(0xB3,0x46), o2(0xB3,0x47),
+     o2(0xB3,0x48), o2(0xB3,0x49), o2(0xB3,0x4A), o2(0xB3,0x4B),
+     o2(0xB3,0x4C), o2(0xB3,0x4D), o2(0xB3,0x4E), o2(0xB3,0x4F),
+     o2(0xB3,0x50), o2(0xB3,0x51), o2(0xB3,0x52), o2(0xB3,0x53),
+     o2(0xB3,0x54), o2(0xC4,0xED), o2(0xC4,0xEE), o2(0xB3,0x55),
+     o2(0xB3,0x56), o2(0xC4,0xEF), o2(0xB3,0x57), o2(0xB3,0x58),
+     o2(0xB3,0x59), o2(0xC4,0xF0), o2(0xB3,0x5A), o2(0xB3,0x61),
+     o2(0xB3,0x62), o2(0xB3,0x63), o2(0xB3,0x64), o2(0xB3,0x65),
+     o2(0xB3,0x66), o2(0xC4,0xF1), o2(0xC4,0xF2), o2(0xB3,0x67),
+     o2(0xC4,0xF3), o2(0xB3,0x68), o2(0xC4,0xF4), o2(0xB3,0x69),
+     o2(0xB3,0x6A), o2(0xB3,0x6B), o2(0xB3,0x6C), o2(0xB3,0x6D),
+     o2(0xB3,0x6E), o2(0xC4,0xF5), o2(0xB3,0x6F), o2(0xB3,0x70),
+     o2(0xB3,0x71),
+
+#define to_CP949_EC_BF WORDINDEX2INFO(29414)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_BF_infos,
+
+#define to_CP949_EC_infos WORDINDEX2INFO(29416)
+            INVALID, to_CP949_EC_80, to_CP949_EC_81, to_CP949_EC_82,
+     to_CP949_EC_83, to_CP949_EC_84, to_CP949_EC_85, to_CP949_EC_86,
+     to_CP949_EC_87, to_CP949_EC_88, to_CP949_EC_89, to_CP949_EC_8A,
+     to_CP949_EC_8B, to_CP949_EC_8C, to_CP949_EC_8D, to_CP949_EC_8E,
+     to_CP949_EC_8F, to_CP949_EC_90, to_CP949_EC_91, to_CP949_EC_92,
+     to_CP949_EC_93, to_CP949_EC_94, to_CP949_EC_95, to_CP949_EC_96,
+     to_CP949_EC_97, to_CP949_EC_98, to_CP949_EC_99, to_CP949_EC_9A,
+     to_CP949_EC_9B, to_CP949_EC_9C, to_CP949_EC_9D, to_CP949_EC_9E,
+     to_CP949_EC_9F, to_CP949_EC_A0, to_CP949_EC_A1, to_CP949_EC_A2,
+     to_CP949_EC_A3, to_CP949_EC_A4, to_CP949_EC_A5, to_CP949_EC_A6,
+     to_CP949_EC_A7, to_CP949_EC_A8, to_CP949_EC_A9, to_CP949_EC_AA,
+     to_CP949_EC_AB, to_CP949_EC_AC, to_CP949_EC_AD, to_CP949_EC_AE,
+     to_CP949_EC_AF, to_CP949_EC_B0, to_CP949_EC_B1, to_CP949_EC_B2,
+     to_CP949_EC_B3, to_CP949_EC_B4, to_CP949_EC_B5, to_CP949_EC_B6,
+     to_CP949_EC_B7, to_CP949_EC_B8, to_CP949_EC_B9, to_CP949_EC_BA,
+     to_CP949_EC_BB, to_CP949_EC_BC, to_CP949_EC_BD, to_CP949_EC_BE,
+     to_CP949_EC_BF,
+
+#define to_CP949_EC WORDINDEX2INFO(29481)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_EC_infos,
+
+#define to_CP949_ED_80_infos WORDINDEX2INFO(29483)
+           INVALID, o2(0xC4,0xF6), o2(0xB3,0x72), o2(0xB3,0x73),
+     o2(0xB3,0x74), o2(0xC4,0xF7), o2(0xB3,0x75), o2(0xB3,0x76),
+     o2(0xB3,0x77), o2(0xB3,0x78), o2(0xB3,0x79), o2(0xB3,0x7A),
+     o2(0xB3,0x81), o2(0xB3,0x82), o2(0xB3,0x83), o2(0xB3,0x84),
+     o2(0xB3,0x85), o2(0xB3,0x86), o2(0xC4,0xF8), o2(0xB3,0x87),
+     o2(0xB3,0x88), o2(0xB3,0x89), o2(0xB3,0x8A), o2(0xB3,0x8B),
+     o2(0xB3,0x8C), o2(0xC4,0xF9), o2(0xB3,0x8D), o2(0xB3,0x8E),
+     o2(0xB3,0x8F), o2(0xB3,0x90), o2(0xB3,0x91), o2(0xB3,0x92),
+     o2(0xB3,0x93), o2(0xB3,0x94), o2(0xB3,0x95), o2(0xB3,0x96),
+     o2(0xB3,0x97), o2(0xB3,0x98), o2(0xB3,0x99), o2(0xB3,0x9A),
+     o2(0xB3,0x9B), o2(0xB3,0x9C), o2(0xB3,0x9D), o2(0xB3,0x9E),
+     o2(0xB3,0x9F), o2(0xB3,0xA0), o2(0xC4,0xFA), o2(0xB4,0x41),
+     o2(0xB4,0x42), o2(0xB4,0x43), o2(0xB4,0x44), o2(0xB4,0x45),
+     o2(0xB4,0x46), o2(0xC4,0xFB), o2(0xC4,0xFC), o2(0xB4,0x47),
+     o2(0xB4,0x48), o2(0xC4,0xFD), o2(0xB4,0x49), o2(0xB4,0x4A),
+     o2(0xB4,0x4B), o2(0xC4,0xFE), o2(0xB4,0x4C), o2(0xB4,0x4D),
+     o2(0xB4,0x4E),
+
+#define to_CP949_ED_80 WORDINDEX2INFO(29548)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_80_infos,
+
+#define to_CP949_ED_81_infos WORDINDEX2INFO(29550)
+           INVALID, o2(0xB4,0x4F), o2(0xB4,0x50), o2(0xB4,0x51),
+     o2(0xB4,0x52), o2(0xC5,0xA1), o2(0xC5,0xA2), o2(0xB4,0x53),
+     o2(0xC5,0xA3), o2(0xB4,0x54), o2(0xC5,0xA4), o2(0xB4,0x55),
+     o2(0xB4,0x56), o2(0xB4,0x57), o2(0xB4,0x58), o2(0xB4,0x59),
+     o2(0xB4,0x5A), o2(0xC5,0xA5), o2(0xB4,0x61), o2(0xB4,0x62),
+     o2(0xB4,0x63), o2(0xC5,0xA6), o2(0xB4,0x64), o2(0xB4,0x65),
+     o2(0xB4,0x66), o2(0xC5,0xA7), o2(0xB4,0x67), o2(0xB4,0x68),
+     o2(0xB4,0x69), o2(0xB4,0x6A), o2(0xB4,0x6B), o2(0xB4,0x6C),
+     o2(0xB4,0x6D), o2(0xC5,0xA8), o2(0xB4,0x6E), o2(0xB4,0x6F),
+     o2(0xB4,0x70), o2(0xB4,0x71), o2(0xB4,0x72), o2(0xB4,0x73),
+     o2(0xB4,0x74), o2(0xB4,0x75), o2(0xB4,0x76), o2(0xB4,0x77),
+     o2(0xB4,0x78), o2(0xC5,0xA9), o2(0xC5,0xAA), o2(0xB4,0x79),
+     o2(0xB4,0x7A), o2(0xC5,0xAB), o2(0xB4,0x81), o2(0xB4,0x82),
+     o2(0xB4,0x83), o2(0xC5,0xAC), o2(0xB4,0x84), o2(0xB4,0x85),
+     o2(0xB4,0x86), o2(0xB4,0x87), o2(0xB4,0x88), o2(0xB4,0x89),
+     o2(0xB4,0x8A), o2(0xC5,0xAD), o2(0xC5,0xAE), o2(0xB4,0x8B),
+     o2(0xB4,0x8C),
+
+#define to_CP949_ED_81 WORDINDEX2INFO(29615)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_81_infos,
+
+#define to_CP949_ED_82_infos WORDINDEX2INFO(29617)
+           INVALID, o2(0xB4,0x8D), o2(0xC5,0xAF), o2(0xB4,0x8E),
+     o2(0xB4,0x8F), o2(0xB4,0x90), o2(0xB4,0x91), o2(0xB4,0x92),
+     o2(0xB4,0x93), o2(0xB4,0x94), o2(0xB4,0x95), o2(0xB4,0x96),
+     o2(0xB4,0x97), o2(0xB4,0x98), o2(0xB4,0x99), o2(0xB4,0x9A),
+     o2(0xB4,0x9B), o2(0xB4,0x9C), o2(0xB4,0x9D), o2(0xB4,0x9E),
+     o2(0xB4,0x9F), o2(0xB4,0xA0), o2(0xB5,0x41), o2(0xB5,0x42),
+     o2(0xB5,0x43), o2(0xB5,0x44), o2(0xB5,0x45), o2(0xB5,0x46),
+     o2(0xB5,0x47), o2(0xB5,0x48), o2(0xB5,0x49), o2(0xB5,0x4A),
+     o2(0xB5,0x4B), o2(0xB5,0x4C), o2(0xB5,0x4D), o2(0xB5,0x4E),
+     o2(0xB5,0x4F), o2(0xC5,0xB0), o2(0xC5,0xB1), o2(0xB5,0x50),
+     o2(0xB5,0x51), o2(0xC5,0xB2), o2(0xB5,0x52), o2(0xB5,0x53),
+     o2(0xB5,0x54), o2(0xC5,0xB3), o2(0xB5,0x55), o2(0xB5,0x56),
+     o2(0xB5,0x57), o2(0xB5,0x58), o2(0xB5,0x59), o2(0xB5,0x5A),
+     o2(0xB5,0x61), o2(0xC5,0xB4), o2(0xC5,0xB5), o2(0xB5,0x62),
+     o2(0xC5,0xB6), o2(0xB5,0x63), o2(0xC5,0xB7), o2(0xB5,0x64),
+     o2(0xB5,0x65), o2(0xB5,0x66), o2(0xB5,0x67), o2(0xB5,0x68),
+     o2(0xB5,0x69),
+
+#define to_CP949_ED_82 WORDINDEX2INFO(29682)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_82_infos,
+
+#define to_CP949_ED_83_infos WORDINDEX2INFO(29684)
+           INVALID, o2(0xC5,0xB8), o2(0xC5,0xB9), o2(0xB5,0x6A),
+     o2(0xB5,0x6B), o2(0xC5,0xBA), o2(0xB5,0x6C), o2(0xB5,0x6D),
+     o2(0xB5,0x6E), o2(0xC5,0xBB), o2(0xC5,0xBC), o2(0xB5,0x6F),
+     o2(0xB5,0x70), o2(0xB5,0x71), o2(0xB5,0x72), o2(0xB5,0x73),
+     o2(0xB5,0x74), o2(0xC5,0xBD), o2(0xC5,0xBE), o2(0xB5,0x75),
+     o2(0xC5,0xBF), o2(0xC5,0xC0), o2(0xC5,0xC1), o2(0xB5,0x76),
+     o2(0xB5,0x77), o2(0xB5,0x78), o2(0xB5,0x79), o2(0xB5,0x7A),
+     o2(0xB5,0x81), o2(0xC5,0xC2), o2(0xC5,0xC3), o2(0xB5,0x82),
+     o2(0xB5,0x83), o2(0xC5,0xC4), o2(0xB5,0x84), o2(0xB5,0x85),
+     o2(0xB5,0x86), o2(0xC5,0xC5), o2(0xB5,0x87), o2(0xB5,0x88),
+     o2(0xB5,0x89), o2(0xB5,0x8A), o2(0xB5,0x8B), o2(0xB5,0x8C),
+     o2(0xB5,0x8D), o2(0xC5,0xC6), o2(0xC5,0xC7), o2(0xB5,0x8E),
+     o2(0xC5,0xC8), o2(0xC5,0xC9), o2(0xC5,0xCA), o2(0xB5,0x8F),
+     o2(0xB5,0x90), o2(0xB5,0x91), o2(0xB5,0x92), o2(0xB5,0x93),
+     o2(0xB5,0x94), o2(0xC5,0xCB), o2(0xB5,0x95), o2(0xB5,0x96),
+     o2(0xB5,0x97), o2(0xB5,0x98), o2(0xB5,0x99), o2(0xB5,0x9A),
+     o2(0xB5,0x9B),
+
+#define to_CP949_ED_83 WORDINDEX2INFO(29749)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_83_infos,
+
+#define to_CP949_ED_84_infos WORDINDEX2INFO(29751)
+           INVALID, o2(0xB5,0x9C), o2(0xB5,0x9D), o2(0xB5,0x9E),
+     o2(0xB5,0x9F), o2(0xB5,0xA0), o2(0xB6,0x41), o2(0xB6,0x42),
+     o2(0xB6,0x43), o2(0xB6,0x44), o2(0xB6,0x45), o2(0xB6,0x46),
+     o2(0xB6,0x47), o2(0xB6,0x48), o2(0xC5,0xCC), o2(0xB6,0x49),
+     o2(0xB6,0x4A), o2(0xB6,0x4B), o2(0xB6,0x4C), o2(0xB6,0x4D),
+     o2(0xB6,0x4E), o2(0xB6,0x4F), o2(0xB6,0x50), o2(0xB6,0x51),
+     o2(0xB6,0x52), o2(0xB6,0x53), o2(0xB6,0x54), o2(0xB6,0x55),
+     o2(0xB6,0x56), o2(0xB6,0x57), o2(0xB6,0x58), o2(0xB6,0x59),
+     o2(0xB6,0x5A), o2(0xB6,0x61), o2(0xB6,0x62), o2(0xB6,0x63),
+     o2(0xB6,0x64), o2(0xB6,0x65), o2(0xB6,0x66), o2(0xB6,0x67),
+     o2(0xB6,0x68), o2(0xB6,0x69), o2(0xB6,0x6A), o2(0xB6,0x6B),
+     o2(0xB6,0x6C), o2(0xB6,0x6D), o2(0xB6,0x6E), o2(0xB6,0x6F),
+     o2(0xB6,0x70), o2(0xC5,0xCD), o2(0xC5,0xCE), o2(0xB6,0x71),
+     o2(0xB6,0x72), o2(0xC5,0xCF), o2(0xB6,0x73), o2(0xB6,0x74),
+     o2(0xB6,0x75), o2(0xC5,0xD0), o2(0xB6,0x76), o2(0xC5,0xD1),
+     o2(0xB6,0x77), o2(0xB6,0x78), o2(0xB6,0x79), o2(0xB6,0x7A),
+     o2(0xB6,0x81),
+
+#define to_CP949_ED_84 WORDINDEX2INFO(29816)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_84_infos,
+
+#define to_CP949_ED_85_infos WORDINDEX2INFO(29818)
+           INVALID, o2(0xC5,0xD2), o2(0xC5,0xD3), o2(0xB6,0x82),
+     o2(0xC5,0xD4), o2(0xC5,0xD5), o2(0xC5,0xD6), o2(0xB6,0x83),
+     o2(0xB6,0x84), o2(0xB6,0x85), o2(0xB6,0x86), o2(0xB6,0x87),
+     o2(0xB6,0x88), o2(0xC5,0xD7), o2(0xC5,0xD8), o2(0xB6,0x89),
+     o2(0xB6,0x8A), o2(0xC5,0xD9), o2(0xB6,0x8B), o2(0xB6,0x8C),
+     o2(0xB6,0x8D), o2(0xC5,0xDA), o2(0xB6,0x8E), o2(0xB6,0x8F),
+     o2(0xB6,0x90), o2(0xB6,0x91), o2(0xB6,0x92), o2(0xB6,0x93),
+     o2(0xB6,0x94), o2(0xC5,0xDB), o2(0xC5,0xDC), o2(0xB6,0x95),
+     o2(0xC5,0xDD), o2(0xB6,0x96), o2(0xC5,0xDE), o2(0xB6,0x97),
+     o2(0xB6,0x98), o2(0xB6,0x99), o2(0xB6,0x9A), o2(0xB6,0x9B),
+     o2(0xB6,0x9C), o2(0xC5,0xDF), o2(0xB6,0x9D), o2(0xB6,0x9E),
+     o2(0xB6,0x9F), o2(0xC5,0xE0), o2(0xB6,0xA0), o2(0xB7,0x41),
+     o2(0xB7,0x42), o2(0xB7,0x43), o2(0xB7,0x44), o2(0xB7,0x45),
+     o2(0xB7,0x46), o2(0xB7,0x47), o2(0xB7,0x48), o2(0xB7,0x49),
+     o2(0xB7,0x4A), o2(0xB7,0x4B), o2(0xB7,0x4C), o2(0xB7,0x4D),
+     o2(0xB7,0x4E), o2(0xC5,0xE1), o2(0xB7,0x4F), o2(0xB7,0x50),
+     o2(0xB7,0x51),
+
+#define to_CP949_ED_85 WORDINDEX2INFO(29883)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_85_infos,
+
+#define to_CP949_ED_86_infos WORDINDEX2INFO(29885)
+           INVALID, o2(0xB7,0x52), o2(0xB7,0x53), o2(0xB7,0x54),
+     o2(0xB7,0x55), o2(0xC5,0xE2), o2(0xB7,0x56), o2(0xB7,0x57),
+     o2(0xB7,0x58), o2(0xC5,0xE3), o2(0xB7,0x59), o2(0xB7,0x5A),
+     o2(0xB7,0x61), o2(0xB7,0x62), o2(0xB7,0x63), o2(0xB7,0x64),
+     o2(0xB7,0x65), o2(0xB7,0x66), o2(0xB7,0x67), o2(0xB7,0x68),
+     o2(0xB7,0x69), o2(0xB7,0x6A), o2(0xB7,0x6B), o2(0xB7,0x6C),
+     o2(0xB7,0x6D), o2(0xB7,0x6E), o2(0xB7,0x6F), o2(0xB7,0x70),
+     o2(0xB7,0x71), o2(0xB7,0x72), o2(0xB7,0x73), o2(0xB7,0x74),
+     o2(0xB7,0x75), o2(0xC5,0xE4), o2(0xC5,0xE5), o2(0xB7,0x76),
+     o2(0xB7,0x77), o2(0xC5,0xE6), o2(0xB7,0x78), o2(0xB7,0x79),
+     o2(0xB7,0x7A), o2(0xC5,0xE7), o2(0xB7,0x81), o2(0xB7,0x82),
+     o2(0xB7,0x83), o2(0xB7,0x84), o2(0xB7,0x85), o2(0xB7,0x86),
+     o2(0xB7,0x87), o2(0xC5,0xE8), o2(0xC5,0xE9), o2(0xB7,0x88),
+     o2(0xC5,0xEA), o2(0xB7,0x89), o2(0xC5,0xEB), o2(0xB7,0x8A),
+     o2(0xB7,0x8B), o2(0xB7,0x8C), o2(0xB7,0x8D), o2(0xC5,0xEC),
+     o2(0xB7,0x8E), o2(0xC5,0xED), o2(0xB7,0x8F), o2(0xB7,0x90),
+     o2(0xB7,0x91),
+
+#define to_CP949_ED_86 WORDINDEX2INFO(29950)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_86_infos,
+
+#define to_CP949_ED_87_infos WORDINDEX2INFO(29952)
+           INVALID, o2(0xC5,0xEE), o2(0xB7,0x92), o2(0xB7,0x93),
+     o2(0xB7,0x94), o2(0xB7,0x95), o2(0xB7,0x96), o2(0xB7,0x97),
+     o2(0xB7,0x98), o2(0xB7,0x99), o2(0xB7,0x9A), o2(0xB7,0x9B),
+     o2(0xB7,0x9C), o2(0xB7,0x9D), o2(0xB7,0x9E), o2(0xB7,0x9F),
+     o2(0xB7,0xA0), o2(0xB8,0x41), o2(0xB8,0x42), o2(0xB8,0x43),
+     o2(0xB8,0x44), o2(0xB8,0x45), o2(0xB8,0x46), o2(0xB8,0x47),
+     o2(0xB8,0x48), o2(0xC5,0xEF), o2(0xB8,0x49), o2(0xB8,0x4A),
+     o2(0xB8,0x4B), o2(0xB8,0x4C), o2(0xB8,0x4D), o2(0xB8,0x4E),
+     o2(0xB8,0x4F), o2(0xB8,0x50), o2(0xB8,0x51), o2(0xB8,0x52),
+     o2(0xB8,0x53), o2(0xB8,0x54), o2(0xB8,0x55), o2(0xB8,0x56),
+     o2(0xB8,0x57), o2(0xB8,0x58), o2(0xB8,0x59), o2(0xB8,0x5A),
+     o2(0xB8,0x61), o2(0xB8,0x62), o2(0xB8,0x63), o2(0xB8,0x64),
+     o2(0xB8,0x65), o2(0xB8,0x66), o2(0xB8,0x67), o2(0xB8,0x68),
+     o2(0xB8,0x69), o2(0xC5,0xF0), o2(0xB8,0x6A), o2(0xB8,0x6B),
+     o2(0xB8,0x6C), o2(0xC5,0xF1), o2(0xB8,0x6D), o2(0xB8,0x6E),
+     o2(0xB8,0x6F), o2(0xB8,0x70), o2(0xB8,0x71), o2(0xB8,0x72),
+     o2(0xB8,0x73),
+
+#define to_CP949_ED_87 WORDINDEX2INFO(30017)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_87_infos,
+
+#define to_CP949_ED_88_infos WORDINDEX2INFO(30019)
+           INVALID, o2(0xB8,0x74), o2(0xB8,0x75), o2(0xB8,0x76),
+     o2(0xB8,0x77), o2(0xB8,0x78), o2(0xB8,0x79), o2(0xB8,0x7A),
+     o2(0xC5,0xF2), o2(0xB8,0x81), o2(0xC5,0xF3), o2(0xB8,0x82),
+     o2(0xB8,0x83), o2(0xB8,0x84), o2(0xB8,0x85), o2(0xB8,0x86),
+     o2(0xB8,0x87), o2(0xC5,0xF4), o2(0xB8,0x88), o2(0xB8,0x89),
+     o2(0xB8,0x8A), o2(0xB8,0x8B), o2(0xB8,0x8C), o2(0xB8,0x8D),
+     o2(0xB8,0x8E), o2(0xB8,0x8F), o2(0xB8,0x90), o2(0xB8,0x91),
+     o2(0xB8,0x92), o2(0xB8,0x93), o2(0xB8,0x94), o2(0xB8,0x95),
+     o2(0xB8,0x96), o2(0xB8,0x97), o2(0xB8,0x98), o2(0xB8,0x99),
+     o2(0xB8,0x9A), o2(0xB8,0x9B), o2(0xB8,0x9C), o2(0xB8,0x9D),
+     o2(0xB8,0x9E), o2(0xB8,0x9F), o2(0xB8,0xA0), o2(0xB9,0x41),
+     o2(0xB9,0x42), o2(0xC5,0xF5), o2(0xC5,0xF6), o2(0xB9,0x43),
+     o2(0xB9,0x44), o2(0xC5,0xF7), o2(0xB9,0x45), o2(0xB9,0x46),
+     o2(0xB9,0x47), o2(0xC5,0xF8), o2(0xB9,0x48), o2(0xB9,0x49),
+     o2(0xB9,0x4A), o2(0xB9,0x4B), o2(0xB9,0x4C), o2(0xB9,0x4D),
+     o2(0xB9,0x4E), o2(0xC5,0xF9), o2(0xC5,0xFA), o2(0xB9,0x4F),
+     o2(0xC5,0xFB),
+
+#define to_CP949_ED_88 WORDINDEX2INFO(30084)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_88_infos,
+
+#define to_CP949_ED_89_infos WORDINDEX2INFO(30086)
+           INVALID, o2(0xB9,0x50), o2(0xC5,0xFC), o2(0xB9,0x51),
+     o2(0xB9,0x52), o2(0xB9,0x53), o2(0xB9,0x54), o2(0xB9,0x55),
+     o2(0xB9,0x56), o2(0xC5,0xFD), o2(0xB9,0x57), o2(0xB9,0x58),
+     o2(0xB9,0x59), o2(0xB9,0x5A), o2(0xB9,0x61), o2(0xB9,0x62),
+     o2(0xB9,0x63), o2(0xB9,0x64), o2(0xB9,0x65), o2(0xB9,0x66),
+     o2(0xB9,0x67), o2(0xB9,0x68), o2(0xB9,0x69), o2(0xB9,0x6A),
+     o2(0xB9,0x6B), o2(0xB9,0x6C), o2(0xB9,0x6D), o2(0xB9,0x6E),
+     o2(0xB9,0x6F), o2(0xC5,0xFE), o2(0xB9,0x70), o2(0xB9,0x71),
+     o2(0xB9,0x72), o2(0xB9,0x73), o2(0xB9,0x74), o2(0xB9,0x75),
+     o2(0xB9,0x76), o2(0xC6,0xA1), o2(0xB9,0x77), o2(0xB9,0x78),
+     o2(0xB9,0x79), o2(0xB9,0x7A), o2(0xB9,0x81), o2(0xB9,0x82),
+     o2(0xB9,0x83), o2(0xB9,0x84), o2(0xB9,0x85), o2(0xB9,0x86),
+     o2(0xB9,0x87), o2(0xB9,0x88), o2(0xB9,0x89), o2(0xB9,0x8A),
+     o2(0xB9,0x8B), o2(0xB9,0x8C), o2(0xB9,0x8D), o2(0xB9,0x8E),
+     o2(0xB9,0x8F), o2(0xB9,0x90), o2(0xB9,0x91), o2(0xB9,0x92),
+     o2(0xB9,0x93), o2(0xB9,0x94), o2(0xB9,0x95), o2(0xB9,0x96),
+     o2(0xB9,0x97),
+
+#define to_CP949_ED_89 WORDINDEX2INFO(30151)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_89_infos,
+
+#define to_CP949_ED_8A_infos WORDINDEX2INFO(30153)
+           INVALID, o2(0xC6,0xA2), o2(0xC6,0xA3), o2(0xB9,0x98),
+     o2(0xB9,0x99), o2(0xC6,0xA4), o2(0xB9,0x9A), o2(0xB9,0x9B),
+     o2(0xB9,0x9C), o2(0xC6,0xA5), o2(0xB9,0x9D), o2(0xB9,0x9E),
+     o2(0xB9,0x9F), o2(0xB9,0xA0), o2(0xBA,0x41), o2(0xBA,0x42),
+     o2(0xBA,0x43), o2(0xC6,0xA6), o2(0xC6,0xA7), o2(0xBA,0x44),
+     o2(0xBA,0x45), o2(0xBA,0x46), o2(0xC6,0xA8), o2(0xBA,0x47),
+     o2(0xBA,0x48), o2(0xBA,0x49), o2(0xBA,0x4A), o2(0xBA,0x4B),
+     o2(0xBA,0x4C), o2(0xC6,0xA9), o2(0xBA,0x4D), o2(0xBA,0x4E),
+     o2(0xBA,0x4F), o2(0xC6,0xAA), o2(0xBA,0x50), o2(0xBA,0x51),
+     o2(0xBA,0x52), o2(0xC6,0xAB), o2(0xBA,0x53), o2(0xBA,0x54),
+     o2(0xBA,0x55), o2(0xBA,0x56), o2(0xBA,0x57), o2(0xBA,0x58),
+     o2(0xBA,0x59), o2(0xC6,0xAC), o2(0xBA,0x5A), o2(0xBA,0x61),
+     o2(0xBA,0x62), o2(0xBA,0x63), o2(0xC6,0xAD), o2(0xBA,0x64),
+     o2(0xBA,0x65), o2(0xBA,0x66), o2(0xBA,0x67), o2(0xBA,0x68),
+     o2(0xBA,0x69), o2(0xC6,0xAE), o2(0xC6,0xAF), o2(0xBA,0x6A),
+     o2(0xBA,0x6B), o2(0xC6,0xB0), o2(0xBA,0x6C), o2(0xBA,0x6D),
+     o2(0xC6,0xB1),
+
+#define to_CP949_ED_8A WORDINDEX2INFO(30218)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8A_infos,
+
+#define to_CP949_ED_8B_infos WORDINDEX2INFO(30220)
+           INVALID, o2(0xC6,0xB2), o2(0xBA,0x6E), o2(0xC6,0xB3),
+     o2(0xBA,0x6F), o2(0xBA,0x70), o2(0xBA,0x71), o2(0xBA,0x72),
+     o2(0xBA,0x73), o2(0xC6,0xB4), o2(0xC6,0xB5), o2(0xBA,0x74),
+     o2(0xC6,0xB6), o2(0xBA,0x75), o2(0xBA,0x76), o2(0xBA,0x77),
+     o2(0xBA,0x78), o2(0xBA,0x79), o2(0xBA,0x7A), o2(0xBA,0x81),
+     o2(0xBA,0x82), o2(0xC6,0xB7), o2(0xBA,0x83), o2(0xBA,0x84),
+     o2(0xBA,0x85), o2(0xC6,0xB8), o2(0xBA,0x86), o2(0xBA,0x87),
+     o2(0xBA,0x88), o2(0xC6,0xB9), o2(0xBA,0x89), o2(0xBA,0x8A),
+     o2(0xBA,0x8B), o2(0xBA,0x8C), o2(0xBA,0x8D), o2(0xBA,0x8E),
+     o2(0xBA,0x8F), o2(0xC6,0xBA), o2(0xC6,0xBB), o2(0xBA,0x90),
+     o2(0xBA,0x91), o2(0xBA,0x92), o2(0xBA,0x93), o2(0xBA,0x94),
+     o2(0xBA,0x95), o2(0xBA,0x96), o2(0xBA,0x97), o2(0xBA,0x98),
+     o2(0xBA,0x99), o2(0xC6,0xBC), o2(0xC6,0xBD), o2(0xBA,0x9A),
+     o2(0xBA,0x9B), o2(0xC6,0xBE), o2(0xBA,0x9C), o2(0xBA,0x9D),
+     o2(0xBA,0x9E), o2(0xC6,0xBF), o2(0xBA,0x9F), o2(0xBA,0xA0),
+     o2(0xBB,0x41), o2(0xBB,0x42), o2(0xBB,0x43), o2(0xBB,0x44),
+     o2(0xBB,0x45),
+
+#define to_CP949_ED_8B WORDINDEX2INFO(30285)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8B_infos,
+
+#define to_CP949_ED_8C_infos WORDINDEX2INFO(30287)
+           INVALID, o2(0xC6,0xC0), o2(0xC6,0xC1), o2(0xBB,0x46),
+     o2(0xC6,0xC2), o2(0xBB,0x47), o2(0xC6,0xC3), o2(0xBB,0x48),
+     o2(0xBB,0x49), o2(0xBB,0x4A), o2(0xBB,0x4B), o2(0xBB,0x4C),
+     o2(0xBB,0x4D), o2(0xC6,0xC4), o2(0xC6,0xC5), o2(0xC6,0xC6),
+     o2(0xBB,0x4E), o2(0xC6,0xC7), o2(0xBB,0x4F), o2(0xBB,0x50),
+     o2(0xBB,0x51), o2(0xC6,0xC8), o2(0xBB,0x52), o2(0xC6,0xC9),
+     o2(0xBB,0x53), o2(0xBB,0x54), o2(0xBB,0x55), o2(0xBB,0x56),
+     o2(0xBB,0x57), o2(0xC6,0xCA), o2(0xC6,0xCB), o2(0xBB,0x58),
+     o2(0xC6,0xCC), o2(0xC6,0xCD), o2(0xC6,0xCE), o2(0xBB,0x59),
+     o2(0xBB,0x5A), o2(0xBB,0x61), o2(0xC6,0xCF), o2(0xBB,0x62),
+     o2(0xBB,0x63), o2(0xC6,0xD0), o2(0xC6,0xD1), o2(0xBB,0x64),
+     o2(0xBB,0x65), o2(0xC6,0xD2), o2(0xBB,0x66), o2(0xBB,0x67),
+     o2(0xBB,0x68), o2(0xC6,0xD3), o2(0xBB,0x69), o2(0xBB,0x6A),
+     o2(0xBB,0x6B), o2(0xBB,0x6C), o2(0xBB,0x6D), o2(0xBB,0x6E),
+     o2(0xBB,0x6F), o2(0xC6,0xD4), o2(0xC6,0xD5), o2(0xBB,0x70),
+     o2(0xC6,0xD6), o2(0xC6,0xD7), o2(0xC6,0xD8), o2(0xBB,0x71),
+     o2(0xBB,0x72),
+
+#define to_CP949_ED_8C WORDINDEX2INFO(30352)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8C_infos,
+
+#define to_CP949_ED_8D_infos WORDINDEX2INFO(30354)
+           INVALID, o2(0xBB,0x73), o2(0xBB,0x74), o2(0xBB,0x75),
+     o2(0xBB,0x76), o2(0xC6,0xD9), o2(0xC6,0xDA), o2(0xBB,0x77),
+     o2(0xBB,0x78), o2(0xBB,0x79), o2(0xBB,0x7A), o2(0xBB,0x81),
+     o2(0xBB,0x82), o2(0xBB,0x83), o2(0xBB,0x84), o2(0xBB,0x85),
+     o2(0xBB,0x86), o2(0xBB,0x87), o2(0xBB,0x88), o2(0xBB,0x89),
+     o2(0xBB,0x8A), o2(0xBB,0x8B), o2(0xBB,0x8C), o2(0xBB,0x8D),
+     o2(0xBB,0x8E), o2(0xBB,0x8F), o2(0xBB,0x90), o2(0xBB,0x91),
+     o2(0xBB,0x92), o2(0xBB,0x93), o2(0xBB,0x94), o2(0xBB,0x95),
+     o2(0xBB,0x96), o2(0xBB,0x97), o2(0xBB,0x98), o2(0xBB,0x99),
+     o2(0xBB,0x9A), o2(0xBB,0x9B), o2(0xBB,0x9C), o2(0xBB,0x9D),
+     o2(0xBB,0x9E), o2(0xBB,0x9F), o2(0xBB,0xA0), o2(0xBC,0x41),
+     o2(0xBC,0x42), o2(0xBC,0x43), o2(0xBC,0x44), o2(0xBC,0x45),
+     o2(0xBC,0x46), o2(0xBC,0x47), o2(0xBC,0x48), o2(0xBC,0x49),
+     o2(0xBC,0x4A), o2(0xBC,0x4B), o2(0xBC,0x4C), o2(0xBC,0x4D),
+     o2(0xBC,0x4E), o2(0xBC,0x4F), o2(0xBC,0x50), o2(0xBC,0x51),
+     o2(0xBC,0x52), o2(0xC6,0xDB), o2(0xC6,0xDC), o2(0xBC,0x53),
+     o2(0xBC,0x54),
+
+#define to_CP949_ED_8D WORDINDEX2INFO(30419)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8D_infos,
+
+#define to_CP949_ED_8E_infos WORDINDEX2INFO(30421)
+           INVALID, o2(0xC6,0xDD), o2(0xBC,0x55), o2(0xBC,0x56),
+     o2(0xBC,0x57), o2(0xC6,0xDE), o2(0xBC,0x58), o2(0xBC,0x59),
+     o2(0xBC,0x5A), o2(0xBC,0x61), o2(0xBC,0x62), o2(0xBC,0x63),
+     o2(0xBC,0x64), o2(0xC6,0xDF), o2(0xC6,0xE0), o2(0xBC,0x65),
+     o2(0xC6,0xE1), o2(0xC6,0xE2), o2(0xC6,0xE3), o2(0xBC,0x66),
+     o2(0xBC,0x67), o2(0xBC,0x68), o2(0xBC,0x69), o2(0xBC,0x6A),
+     o2(0xBC,0x6B), o2(0xC6,0xE4), o2(0xC6,0xE5), o2(0xBC,0x6C),
+     o2(0xBC,0x6D), o2(0xC6,0xE6), o2(0xBC,0x6E), o2(0xBC,0x6F),
+     o2(0xBC,0x70), o2(0xC6,0xE7), o2(0xBC,0x71), o2(0xBC,0x72),
+     o2(0xBC,0x73), o2(0xBC,0x74), o2(0xBC,0x75), o2(0xBC,0x76),
+     o2(0xBC,0x77), o2(0xC6,0xE8), o2(0xC6,0xE9), o2(0xBC,0x78),
+     o2(0xC6,0xEA), o2(0xBC,0x79), o2(0xC6,0xEB), o2(0xBC,0x7A),
+     o2(0xBC,0x81), o2(0xBC,0x82), o2(0xBC,0x83), o2(0xBC,0x84),
+     o2(0xBC,0x85), o2(0xC6,0xEC), o2(0xBC,0x86), o2(0xBC,0x87),
+     o2(0xBC,0x88), o2(0xC6,0xED), o2(0xBC,0x89), o2(0xBC,0x8A),
+     o2(0xBC,0x8B), o2(0xC6,0xEE), o2(0xBC,0x8C), o2(0xBC,0x8D),
+     o2(0xBC,0x8E),
+
+#define to_CP949_ED_8E WORDINDEX2INFO(30486)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8E_infos,
+
+#define to_CP949_ED_8F_infos WORDINDEX2INFO(30488)
+           INVALID, o2(0xBC,0x8F), o2(0xBC,0x90), o2(0xBC,0x91),
+     o2(0xBC,0x92), o2(0xC6,0xEF), o2(0xC6,0xF0), o2(0xBC,0x93),
+     o2(0xBC,0x94), o2(0xC6,0xF1), o2(0xC6,0xF2), o2(0xBC,0x95),
+     o2(0xBC,0x96), o2(0xBC,0x97), o2(0xBC,0x98), o2(0xBC,0x99),
+     o2(0xBC,0x9A), o2(0xC6,0xF3), o2(0xBC,0x9B), o2(0xBC,0x9C),
+     o2(0xBC,0x9D), o2(0xBC,0x9E), o2(0xBC,0x9F), o2(0xBC,0xA0),
+     o2(0xBD,0x41), o2(0xC6,0xF4), o2(0xBD,0x42), o2(0xBD,0x43),
+     o2(0xBD,0x44), o2(0xBD,0x45), o2(0xBD,0x46), o2(0xBD,0x47),
+     o2(0xBD,0x48), o2(0xBD,0x49), o2(0xC6,0xF5), o2(0xBD,0x4A),
+     o2(0xC6,0xF6), o2(0xBD,0x4B), o2(0xBD,0x4C), o2(0xBD,0x4D),
+     o2(0xBD,0x4E), o2(0xBD,0x4F), o2(0xBD,0x50), o2(0xBD,0x51),
+     o2(0xBD,0x52), o2(0xC6,0xF7), o2(0xC6,0xF8), o2(0xBD,0x53),
+     o2(0xBD,0x54), o2(0xC6,0xF9), o2(0xBD,0x55), o2(0xBD,0x56),
+     o2(0xBD,0x57), o2(0xC6,0xFA), o2(0xBD,0x58), o2(0xBD,0x59),
+     o2(0xBD,0x5A), o2(0xBD,0x61), o2(0xBD,0x62), o2(0xBD,0x63),
+     o2(0xBD,0x64), o2(0xC6,0xFB), o2(0xC6,0xFC), o2(0xBD,0x65),
+     o2(0xC6,0xFD),
+
+#define to_CP949_ED_8F WORDINDEX2INFO(30553)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_8F_infos,
+
+#define to_CP949_ED_90_infos WORDINDEX2INFO(30555)
+           INVALID, o2(0xBD,0x66), o2(0xC6,0xFE), o2(0xBD,0x67),
+     o2(0xBD,0x68), o2(0xBD,0x69), o2(0xBD,0x6A), o2(0xBD,0x6B),
+     o2(0xBD,0x6C), o2(0xC7,0xA1), o2(0xBD,0x6D), o2(0xBD,0x6E),
+     o2(0xBD,0x6F), o2(0xBD,0x70), o2(0xBD,0x71), o2(0xBD,0x72),
+     o2(0xBD,0x73), o2(0xBD,0x74), o2(0xBD,0x75), o2(0xBD,0x76),
+     o2(0xBD,0x77), o2(0xBD,0x78), o2(0xBD,0x79), o2(0xBD,0x7A),
+     o2(0xBD,0x81), o2(0xBD,0x82), o2(0xBD,0x83), o2(0xBD,0x84),
+     o2(0xBD,0x85), o2(0xBD,0x86), o2(0xC7,0xA2), o2(0xBD,0x87),
+     o2(0xBD,0x88), o2(0xBD,0x89), o2(0xBD,0x8A), o2(0xBD,0x8B),
+     o2(0xBD,0x8C), o2(0xBD,0x8D), o2(0xBD,0x8E), o2(0xBD,0x8F),
+     o2(0xBD,0x90), o2(0xBD,0x91), o2(0xBD,0x92), o2(0xBD,0x93),
+     o2(0xBD,0x94), o2(0xBD,0x95), o2(0xBD,0x96), o2(0xBD,0x97),
+     o2(0xBD,0x98), o2(0xBD,0x99), o2(0xBD,0x9A), o2(0xBD,0x9B),
+     o2(0xBD,0x9C), o2(0xBD,0x9D), o2(0xBD,0x9E), o2(0xBD,0x9F),
+     o2(0xBD,0xA0), o2(0xBE,0x41), o2(0xBE,0x42), o2(0xBE,0x43),
+     o2(0xBE,0x44), o2(0xBE,0x45), o2(0xBE,0x46), o2(0xBE,0x47),
+     o2(0xBE,0x48),
+
+#define to_CP949_ED_90 WORDINDEX2INFO(30620)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_90_infos,
+
+#define to_CP949_ED_91_infos WORDINDEX2INFO(30622)
+           INVALID, o2(0xC7,0xA3), o2(0xBE,0x49), o2(0xBE,0x4A),
+     o2(0xBE,0x4B), o2(0xC7,0xA4), o2(0xBE,0x4C), o2(0xBE,0x4D),
+     o2(0xBE,0x4E), o2(0xBE,0x4F), o2(0xBE,0x50), o2(0xBE,0x51),
+     o2(0xBE,0x52), o2(0xBE,0x53), o2(0xBE,0x54), o2(0xBE,0x55),
+     o2(0xBE,0x56), o2(0xBE,0x57), o2(0xBE,0x58), o2(0xBE,0x59),
+     o2(0xBE,0x5A), o2(0xBE,0x61), o2(0xBE,0x62), o2(0xBE,0x63),
+     o2(0xBE,0x64), o2(0xBE,0x65), o2(0xBE,0x66), o2(0xBE,0x67),
+     o2(0xBE,0x68), o2(0xC7,0xA5), o2(0xBE,0x69), o2(0xBE,0x6A),
+     o2(0xBE,0x6B), o2(0xC7,0xA6), o2(0xBE,0x6C), o2(0xBE,0x6D),
+     o2(0xBE,0x6E), o2(0xC7,0xA7), o2(0xBE,0x6F), o2(0xBE,0x70),
+     o2(0xBE,0x71), o2(0xBE,0x72), o2(0xBE,0x73), o2(0xBE,0x74),
+     o2(0xBE,0x75), o2(0xBE,0x76), o2(0xC7,0xA8), o2(0xBE,0x77),
+     o2(0xC7,0xA9), o2(0xBE,0x78), o2(0xBE,0x79), o2(0xBE,0x7A),
+     o2(0xBE,0x81), o2(0xBE,0x82), o2(0xBE,0x83), o2(0xBE,0x84),
+     o2(0xBE,0x85), o2(0xC7,0xAA), o2(0xC7,0xAB), o2(0xBE,0x86),
+     o2(0xBE,0x87), o2(0xC7,0xAC), o2(0xBE,0x88), o2(0xBE,0x89),
+     o2(0xC7,0xAD),
+
+#define to_CP949_ED_91 WORDINDEX2INFO(30687)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_91_infos,
+
+#define to_CP949_ED_92_infos WORDINDEX2INFO(30689)
+           INVALID, o2(0xC7,0xAE), o2(0xBE,0x8A), o2(0xC7,0xAF),
+     o2(0xBE,0x8B), o2(0xBE,0x8C), o2(0xBE,0x8D), o2(0xBE,0x8E),
+     o2(0xBE,0x8F), o2(0xC7,0xB0), o2(0xC7,0xB1), o2(0xBE,0x90),
+     o2(0xC7,0xB2), o2(0xBE,0x91), o2(0xC7,0xB3), o2(0xBE,0x92),
+     o2(0xBE,0x93), o2(0xBE,0x94), o2(0xBE,0x95), o2(0xBE,0x96),
+     o2(0xBE,0x97), o2(0xC7,0xB4), o2(0xBE,0x98), o2(0xBE,0x99),
+     o2(0xBE,0x9A), o2(0xBE,0x9B), o2(0xBE,0x9C), o2(0xBE,0x9D),
+     o2(0xBE,0x9E), o2(0xBE,0x9F), o2(0xBE,0xA0), o2(0xBF,0x41),
+     o2(0xBF,0x42), o2(0xBF,0x43), o2(0xBF,0x44), o2(0xBF,0x45),
+     o2(0xBF,0x46), o2(0xBF,0x47), o2(0xBF,0x48), o2(0xBF,0x49),
+     o2(0xBF,0x4A), o2(0xBF,0x4B), o2(0xC7,0xB5), o2(0xBF,0x4C),
+     o2(0xBF,0x4D), o2(0xBF,0x4E), o2(0xBF,0x4F), o2(0xBF,0x50),
+     o2(0xBF,0x51), o2(0xBF,0x52), o2(0xBF,0x53), o2(0xBF,0x54),
+     o2(0xBF,0x55), o2(0xBF,0x56), o2(0xBF,0x57), o2(0xBF,0x58),
+     o2(0xBF,0x59), o2(0xBF,0x5A), o2(0xBF,0x61), o2(0xBF,0x62),
+     o2(0xBF,0x63), o2(0xBF,0x64), o2(0xBF,0x65), o2(0xBF,0x66),
+     o2(0xBF,0x67),
+
+#define to_CP949_ED_92 WORDINDEX2INFO(30754)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_92_infos,
+
+#define to_CP949_ED_93_infos WORDINDEX2INFO(30756)
+           INVALID, o2(0xBF,0x68), o2(0xBF,0x69), o2(0xBF,0x6A),
+     o2(0xBF,0x6B), o2(0xBF,0x6C), o2(0xBF,0x6D), o2(0xBF,0x6E),
+     o2(0xBF,0x6F), o2(0xBF,0x70), o2(0xBF,0x71), o2(0xBF,0x72),
+     o2(0xBF,0x73), o2(0xC7,0xB6), o2(0xBF,0x74), o2(0xBF,0x75),
+     o2(0xBF,0x76), o2(0xC7,0xB7), o2(0xBF,0x77), o2(0xBF,0x78),
+     o2(0xBF,0x79), o2(0xC7,0xB8), o2(0xBF,0x7A), o2(0xBF,0x81),
+     o2(0xBF,0x82), o2(0xBF,0x83), o2(0xBF,0x84), o2(0xBF,0x85),
+     o2(0xBF,0x86), o2(0xC7,0xB9), o2(0xBF,0x87), o2(0xBF,0x88),
+     o2(0xC7,0xBA), o2(0xBF,0x89), o2(0xBF,0x8A), o2(0xBF,0x8B),
+     o2(0xBF,0x8C), o2(0xBF,0x8D), o2(0xBF,0x8E), o2(0xBF,0x8F),
+     o2(0xBF,0x90), o2(0xC7,0xBB), o2(0xBF,0x91), o2(0xBF,0x92),
+     o2(0xBF,0x93), o2(0xC7,0xBC), o2(0xBF,0x94), o2(0xBF,0x95),
+     o2(0xBF,0x96), o2(0xC7,0xBD), o2(0xBF,0x97), o2(0xBF,0x98),
+     o2(0xBF,0x99), o2(0xBF,0x9A), o2(0xBF,0x9B), o2(0xBF,0x9C),
+     o2(0xBF,0x9D), o2(0xC7,0xBE), o2(0xBF,0x9E), o2(0xBF,0x9F),
+     o2(0xC7,0xBF), o2(0xBF,0xA0), o2(0xC7,0xC0), o2(0xC0,0x41),
+     o2(0xC0,0x42),
+
+#define to_CP949_ED_93 WORDINDEX2INFO(30821)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_93_infos,
+
+#define to_CP949_ED_94_infos WORDINDEX2INFO(30823)
+           INVALID, o2(0xC0,0x43), o2(0xC0,0x44), o2(0xC0,0x45),
+     o2(0xC0,0x46), o2(0xC7,0xC1), o2(0xC0,0x47), o2(0xC0,0x48),
+     o2(0xC0,0x49), o2(0xC7,0xC2), o2(0xC0,0x4A), o2(0xC0,0x4B),
+     o2(0xC0,0x4C), o2(0xC7,0xC3), o2(0xC0,0x4D), o2(0xC0,0x4E),
+     o2(0xC0,0x4F), o2(0xC0,0x50), o2(0xC0,0x51), o2(0xC0,0x52),
+     o2(0xC0,0x53), o2(0xC7,0xC4), o2(0xC7,0xC5), o2(0xC0,0x54),
+     o2(0xC7,0xC6), o2(0xC0,0x55), o2(0xC0,0x56), o2(0xC0,0x57),
+     o2(0xC0,0x58), o2(0xC0,0x59), o2(0xC0,0x5A), o2(0xC0,0x61),
+     o2(0xC0,0x62), o2(0xC0,0x63), o2(0xC0,0x64), o2(0xC0,0x65),
+     o2(0xC0,0x66), o2(0xC0,0x67), o2(0xC0,0x68), o2(0xC0,0x69),
+     o2(0xC0,0x6A), o2(0xC0,0x6B), o2(0xC0,0x6C), o2(0xC0,0x6D),
+     o2(0xC0,0x6E), o2(0xC0,0x6F), o2(0xC0,0x70), o2(0xC0,0x71),
+     o2(0xC0,0x72), o2(0xC0,0x73), o2(0xC0,0x74), o2(0xC0,0x75),
+     o2(0xC0,0x76), o2(0xC0,0x77), o2(0xC0,0x78), o2(0xC0,0x79),
+     o2(0xC0,0x7A), o2(0xC0,0x81), o2(0xC0,0x82), o2(0xC0,0x83),
+     o2(0xC0,0x84), o2(0xC7,0xC7), o2(0xC7,0xC8), o2(0xC0,0x85),
+     o2(0xC0,0x86),
+
+#define to_CP949_ED_94 WORDINDEX2INFO(30888)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_94_infos,
+
+#define to_CP949_ED_95_infos WORDINDEX2INFO(30890)
+           INVALID, o2(0xC7,0xC9), o2(0xC0,0x87), o2(0xC0,0x88),
+     o2(0xC0,0x89), o2(0xC7,0xCA), o2(0xC0,0x8A), o2(0xC0,0x8B),
+     o2(0xC0,0x8C), o2(0xC0,0x8D), o2(0xC0,0x8E), o2(0xC0,0x8F),
+     o2(0xC0,0x90), o2(0xC7,0xCB), o2(0xC7,0xCC), o2(0xC0,0x91),
+     o2(0xC7,0xCD), o2(0xC0,0x92), o2(0xC7,0xCE), o2(0xC0,0x93),
+     o2(0xC0,0x94), o2(0xC0,0x95), o2(0xC0,0x96), o2(0xC0,0x97),
+     o2(0xC0,0x98), o2(0xC7,0xCF), o2(0xC7,0xD0), o2(0xC0,0x99),
+     o2(0xC0,0x9A), o2(0xC7,0xD1), o2(0xC0,0x9B), o2(0xC0,0x9C),
+     o2(0xC0,0x9D), o2(0xC7,0xD2), o2(0xC0,0x9E), o2(0xC0,0x9F),
+     o2(0xC0,0xA0), o2(0xC1,0x41), o2(0xC7,0xD3), o2(0xC1,0x42),
+     o2(0xC1,0x43), o2(0xC7,0xD4), o2(0xC7,0xD5), o2(0xC1,0x44),
+     o2(0xC7,0xD6), o2(0xC1,0x45), o2(0xC7,0xD7), o2(0xC1,0x46),
+     o2(0xC1,0x47), o2(0xC1,0x48), o2(0xC1,0x49), o2(0xC1,0x4A),
+     o2(0xC1,0x4B), o2(0xC7,0xD8), o2(0xC7,0xD9), o2(0xC1,0x4C),
+     o2(0xC1,0x4D), o2(0xC7,0xDA), o2(0xC1,0x4E), o2(0xC1,0x4F),
+     o2(0xC1,0x50), o2(0xC7,0xDB), o2(0xC1,0x51), o2(0xC1,0x52),
+     o2(0xC1,0x53),
+
+#define to_CP949_ED_95 WORDINDEX2INFO(30955)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_95_infos,
+
+#define to_CP949_ED_96_infos WORDINDEX2INFO(30957)
+           INVALID, o2(0xC1,0x54), o2(0xC1,0x55), o2(0xC1,0x56),
+     o2(0xC1,0x57), o2(0xC7,0xDC), o2(0xC7,0xDD), o2(0xC1,0x58),
+     o2(0xC7,0xDE), o2(0xC7,0xDF), o2(0xC7,0xE0), o2(0xC1,0x59),
+     o2(0xC1,0x5A), o2(0xC1,0x61), o2(0xC1,0x62), o2(0xC1,0x63),
+     o2(0xC1,0x64), o2(0xC7,0xE1), o2(0xC1,0x65), o2(0xC1,0x66),
+     o2(0xC1,0x67), o2(0xC1,0x68), o2(0xC1,0x69), o2(0xC1,0x6A),
+     o2(0xC1,0x6B), o2(0xC1,0x6C), o2(0xC1,0x6D), o2(0xC1,0x6E),
+     o2(0xC1,0x6F), o2(0xC1,0x70), o2(0xC1,0x71), o2(0xC1,0x72),
+     o2(0xC1,0x73), o2(0xC1,0x74), o2(0xC1,0x75), o2(0xC1,0x76),
+     o2(0xC1,0x77), o2(0xC1,0x78), o2(0xC7,0xE2), o2(0xC1,0x79),
+     o2(0xC1,0x7A), o2(0xC1,0x81), o2(0xC1,0x82), o2(0xC1,0x83),
+     o2(0xC1,0x84), o2(0xC1,0x85), o2(0xC1,0x86), o2(0xC1,0x87),
+     o2(0xC1,0x88), o2(0xC1,0x89), o2(0xC1,0x8A), o2(0xC1,0x8B),
+     o2(0xC1,0x8C), o2(0xC1,0x8D), o2(0xC1,0x8E), o2(0xC1,0x8F),
+     o2(0xC1,0x90), o2(0xC1,0x91), o2(0xC1,0x92), o2(0xC1,0x93),
+     o2(0xC1,0x94), o2(0xC1,0x95), o2(0xC1,0x96), o2(0xC1,0x97),
+     o2(0xC1,0x98),
+
+#define to_CP949_ED_96 WORDINDEX2INFO(31022)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_96_infos,
+
+#define to_CP949_ED_97_infos WORDINDEX2INFO(31024)
+           INVALID, o2(0xC1,0x99), o2(0xC1,0x9A), o2(0xC1,0x9B),
+     o2(0xC1,0x9C), o2(0xC1,0x9D), o2(0xC1,0x9E), o2(0xC1,0x9F),
+     o2(0xC1,0xA0), o2(0xC7,0xE3), o2(0xC7,0xE4), o2(0xC2,0x41),
+     o2(0xC2,0x42), o2(0xC7,0xE5), o2(0xC2,0x43), o2(0xC2,0x44),
+     o2(0xC2,0x45), o2(0xC7,0xE6), o2(0xC2,0x46), o2(0xC7,0xE7),
+     o2(0xC2,0x47), o2(0xC2,0x48), o2(0xC2,0x49), o2(0xC2,0x4A),
+     o2(0xC2,0x4B), o2(0xC7,0xE8), o2(0xC7,0xE9), o2(0xC2,0x4C),
+     o2(0xC7,0xEA), o2(0xC2,0x4D), o2(0xC7,0xEB), o2(0xC2,0x4E),
+     o2(0xC2,0x4F), o2(0xC2,0x50), o2(0xC2,0x51), o2(0xC2,0x52),
+     o2(0xC2,0x53), o2(0xC7,0xEC), o2(0xC7,0xED), o2(0xC2,0x54),
+     o2(0xC2,0x55), o2(0xC7,0xEE), o2(0xC2,0x56), o2(0xC2,0x57),
+     o2(0xC2,0x58), o2(0xC7,0xEF), o2(0xC2,0x59), o2(0xC2,0x5A),
+     o2(0xC2,0x61), o2(0xC2,0x62), o2(0xC2,0x63), o2(0xC2,0x64),
+     o2(0xC2,0x65), o2(0xC7,0xF0), o2(0xC7,0xF1), o2(0xC2,0x66),
+     o2(0xC7,0xF2), o2(0xC2,0x67), o2(0xC7,0xF3), o2(0xC2,0x68),
+     o2(0xC2,0x69), o2(0xC2,0x6A), o2(0xC2,0x6B), o2(0xC2,0x6C),
+     o2(0xC2,0x6D),
+
+#define to_CP949_ED_97 WORDINDEX2INFO(31089)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_97_infos,
+
+#define to_CP949_ED_98_infos WORDINDEX2INFO(31091)
+           INVALID, o2(0xC7,0xF4), o2(0xC7,0xF5), o2(0xC2,0x6E),
+     o2(0xC2,0x6F), o2(0xC7,0xF6), o2(0xC2,0x70), o2(0xC2,0x71),
+     o2(0xC2,0x72), o2(0xC7,0xF7), o2(0xC2,0x73), o2(0xC2,0x74),
+     o2(0xC2,0x75), o2(0xC2,0x76), o2(0xC2,0x77), o2(0xC2,0x78),
+     o2(0xC2,0x79), o2(0xC7,0xF8), o2(0xC7,0xF9), o2(0xC2,0x7A),
+     o2(0xC7,0xFA), o2(0xC7,0xFB), o2(0xC7,0xFC), o2(0xC2,0x81),
+     o2(0xC2,0x82), o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85),
+     o2(0xC2,0x86), o2(0xC7,0xFD), o2(0xC2,0x87), o2(0xC2,0x88),
+     o2(0xC2,0x89), o2(0xC7,0xFE), o2(0xC2,0x8A), o2(0xC2,0x8B),
+     o2(0xC2,0x8C), o2(0xC8,0xA1), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC8,0xA2), o2(0xC2,0x95),
+     o2(0xC2,0x96), o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99),
+     o2(0xC2,0x9A), o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D),
+     o2(0xC2,0x9E), o2(0xC8,0xA3), o2(0xC8,0xA4), o2(0xC2,0x9F),
+     o2(0xC2,0xA0), o2(0xC8,0xA5), o2(0xC3,0x41), o2(0xC3,0x42),
+     o2(0xC3,0x43),
+
+#define to_CP949_ED_98 WORDINDEX2INFO(31156)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_98_infos,
+
+#define to_CP949_ED_99_infos WORDINDEX2INFO(31158)
+           INVALID, o2(0xC8,0xA6), o2(0xC3,0x44), o2(0xC3,0x45),
+     o2(0xC3,0x46), o2(0xC3,0x47), o2(0xC8,0xA7), o2(0xC3,0x48),
+     o2(0xC3,0x49), o2(0xC8,0xA8), o2(0xC8,0xA9), o2(0xC3,0x4A),
+     o2(0xC8,0xAA), o2(0xC3,0x4B), o2(0xC8,0xAB), o2(0xC3,0x4C),
+     o2(0xC3,0x4D), o2(0xC3,0x4E), o2(0xC8,0xAC), o2(0xC3,0x4F),
+     o2(0xC3,0x50), o2(0xC8,0xAD), o2(0xC8,0xAE), o2(0xC3,0x51),
+     o2(0xC3,0x52), o2(0xC8,0xAF), o2(0xC3,0x53), o2(0xC3,0x54),
+     o2(0xC3,0x55), o2(0xC8,0xB0), o2(0xC3,0x56), o2(0xC3,0x57),
+     o2(0xC3,0x58), o2(0xC3,0x59), o2(0xC3,0x5A), o2(0xC3,0x61),
+     o2(0xC3,0x62), o2(0xC3,0x63), o2(0xC3,0x64), o2(0xC3,0x65),
+     o2(0xC8,0xB1), o2(0xC3,0x66), o2(0xC8,0xB2), o2(0xC3,0x67),
+     o2(0xC3,0x68), o2(0xC3,0x69), o2(0xC3,0x6A), o2(0xC3,0x6B),
+     o2(0xC3,0x6C), o2(0xC8,0xB3), o2(0xC8,0xB4), o2(0xC3,0x6D),
+     o2(0xC3,0x6E), o2(0xC8,0xB5), o2(0xC3,0x6F), o2(0xC3,0x70),
+     o2(0xC3,0x71), o2(0xC3,0x72), o2(0xC3,0x73), o2(0xC3,0x74),
+     o2(0xC3,0x75), o2(0xC3,0x76), o2(0xC3,0x77), o2(0xC3,0x78),
+     o2(0xC3,0x79),
+
+#define to_CP949_ED_99 WORDINDEX2INFO(31223)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_99_infos,
+
+#define to_CP949_ED_9A_infos WORDINDEX2INFO(31225)
+           INVALID, o2(0xC3,0x7A), o2(0xC3,0x81), o2(0xC3,0x82),
+     o2(0xC8,0xB6), o2(0xC3,0x83), o2(0xC8,0xB7), o2(0xC3,0x84),
+     o2(0xC3,0x85), o2(0xC3,0x86), o2(0xC3,0x87), o2(0xC3,0x88),
+     o2(0xC3,0x89), o2(0xC8,0xB8), o2(0xC8,0xB9), o2(0xC3,0x8A),
+     o2(0xC3,0x8B), o2(0xC8,0xBA), o2(0xC3,0x8C), o2(0xC3,0x8D),
+     o2(0xC3,0x8E), o2(0xC8,0xBB), o2(0xC3,0x8F), o2(0xC3,0x90),
+     o2(0xC3,0x91), o2(0xC3,0x92), o2(0xC3,0x93), o2(0xC3,0x94),
+     o2(0xC3,0x95), o2(0xC3,0x96), o2(0xC8,0xBC), o2(0xC3,0x97),
+     o2(0xC8,0xBD), o2(0xC3,0x98), o2(0xC8,0xBE), o2(0xC3,0x99),
+     o2(0xC3,0x9A), o2(0xC3,0x9B), o2(0xC3,0x9C), o2(0xC3,0x9D),
+     o2(0xC3,0x9E), o2(0xC8,0xBF), o2(0xC3,0x9F), o2(0xC3,0xA0),
+     o2(0xC4,0x41), o2(0xC8,0xC0), o2(0xC4,0x42), o2(0xC4,0x43),
+     o2(0xC4,0x44), o2(0xC8,0xC1), o2(0xC4,0x45), o2(0xC4,0x46),
+     o2(0xC4,0x47), o2(0xC4,0x48), o2(0xC4,0x49), o2(0xC4,0x4A),
+     o2(0xC4,0x4B), o2(0xC4,0x4C), o2(0xC8,0xC2), o2(0xC4,0x4D),
+     o2(0xC8,0xC3), o2(0xC4,0x4E), o2(0xC4,0x4F), o2(0xC4,0x50),
+     o2(0xC4,0x51),
+
+#define to_CP949_ED_9A WORDINDEX2INFO(31290)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_9A_infos,
+
+#define to_CP949_ED_9B_infos WORDINDEX2INFO(31292)
+           INVALID, o2(0xC4,0x52), o2(0xC4,0x53), o2(0xC4,0x54),
+     o2(0xC4,0x55), o2(0xC8,0xC4), o2(0xC8,0xC5), o2(0xC4,0x56),
+     o2(0xC4,0x57), o2(0xC8,0xC6), o2(0xC4,0x58), o2(0xC4,0x59),
+     o2(0xC4,0x5A), o2(0xC8,0xC7), o2(0xC4,0x61), o2(0xC4,0x62),
+     o2(0xC4,0x63), o2(0xC4,0x64), o2(0xC8,0xC8), o2(0xC4,0x65),
+     o2(0xC4,0x66), o2(0xC8,0xC9), o2(0xC4,0x67), o2(0xC4,0x68),
+     o2(0xC8,0xCA), o2(0xC4,0x69), o2(0xC8,0xCB), o2(0xC4,0x6A),
+     o2(0xC4,0x6B), o2(0xC4,0x6C), o2(0xC4,0x6D), o2(0xC4,0x6E),
+     o2(0xC4,0x6F), o2(0xC8,0xCC), o2(0xC4,0x70), o2(0xC4,0x71),
+     o2(0xC4,0x72), o2(0xC8,0xCD), o2(0xC4,0x73), o2(0xC4,0x74),
+     o2(0xC4,0x75), o2(0xC8,0xCE), o2(0xC4,0x76), o2(0xC4,0x77),
+     o2(0xC4,0x78), o2(0xC4,0x79), o2(0xC4,0x7A), o2(0xC4,0x81),
+     o2(0xC4,0x82), o2(0xC8,0xCF), o2(0xC4,0x83), o2(0xC4,0x84),
+     o2(0xC4,0x85), o2(0xC4,0x86), o2(0xC8,0xD0), o2(0xC4,0x87),
+     o2(0xC4,0x88), o2(0xC4,0x89), o2(0xC4,0x8A), o2(0xC4,0x8B),
+     o2(0xC4,0x8C), o2(0xC8,0xD1), o2(0xC8,0xD2), o2(0xC4,0x8D),
+     o2(0xC4,0x8E),
+
+#define to_CP949_ED_9B WORDINDEX2INFO(31357)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_9B_infos,
+
+#define to_CP949_ED_9C_infos WORDINDEX2INFO(31359)
+           INVALID, o2(0xC8,0xD3), o2(0xC4,0x8F), o2(0xC4,0x90),
+     o2(0xC4,0x91), o2(0xC8,0xD4), o2(0xC4,0x92), o2(0xC4,0x93),
+     o2(0xC4,0x94), o2(0xC4,0x95), o2(0xC4,0x96), o2(0xC4,0x97),
+     o2(0xC4,0x98), o2(0xC4,0x99), o2(0xC4,0x9A), o2(0xC4,0x9B),
+     o2(0xC4,0x9C), o2(0xC4,0x9D), o2(0xC8,0xD5), o2(0xC4,0x9E),
+     o2(0xC4,0x9F), o2(0xC4,0xA0), o2(0xC5,0x41), o2(0xC5,0x42),
+     o2(0xC5,0x43), o2(0xC8,0xD6), o2(0xC8,0xD7), o2(0xC5,0x44),
+     o2(0xC5,0x45), o2(0xC8,0xD8), o2(0xC5,0x46), o2(0xC5,0x47),
+     o2(0xC5,0x48), o2(0xC8,0xD9), o2(0xC5,0x49), o2(0xC5,0x4A),
+     o2(0xC5,0x4B), o2(0xC5,0x4C), o2(0xC5,0x4D), o2(0xC5,0x4E),
+     o2(0xC5,0x4F), o2(0xC8,0xDA), o2(0xC8,0xDB), o2(0xC5,0x50),
+     o2(0xC8,0xDC), o2(0xC5,0x51), o2(0xC8,0xDD), o2(0xC5,0x52),
+     o2(0xC5,0x53), o2(0xC5,0x54), o2(0xC5,0x55), o2(0xC5,0x56),
+     o2(0xC5,0x57), o2(0xC8,0xDE), o2(0xC8,0xDF), o2(0xC5,0x58),
+     o2(0xC5,0x59), o2(0xC8,0xE0), o2(0xC5,0x5A), o2(0xC5,0x61),
+     o2(0xC5,0x62), o2(0xC8,0xE1), o2(0xC5,0x63), o2(0xC5,0x64),
+     o2(0xC5,0x65),
+
+#define to_CP949_ED_9C WORDINDEX2INFO(31424)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_9C_infos,
+
+#define to_CP949_ED_9D_infos WORDINDEX2INFO(31426)
+           INVALID, o2(0xC5,0x66), o2(0xC5,0x67), o2(0xC5,0x68),
+     o2(0xC5,0x69), o2(0xC8,0xE2), o2(0xC5,0x6A), o2(0xC5,0x6B),
+     o2(0xC8,0xE3), o2(0xC5,0x6C), o2(0xC8,0xE4), o2(0xC5,0x6D),
+     o2(0xC5,0x6E), o2(0xC5,0x6F), o2(0xC5,0x70), o2(0xC5,0x71),
+     o2(0xC5,0x72), o2(0xC8,0xE5), o2(0xC8,0xE6), o2(0xC5,0x73),
+     o2(0xC5,0x74), o2(0xC8,0xE7), o2(0xC5,0x75), o2(0xC8,0xE8),
+     o2(0xC8,0xE9), o2(0xC8,0xEA), o2(0xC8,0xEB), o2(0xC5,0x76),
+     o2(0xC5,0x77), o2(0xC5,0x78), o2(0xC5,0x79), o2(0xC5,0x7A),
+     o2(0xC5,0x81), o2(0xC8,0xEC), o2(0xC8,0xED), o2(0xC5,0x82),
+     o2(0xC8,0xEE), o2(0xC5,0x83), o2(0xC8,0xEF), o2(0xC5,0x84),
+     o2(0xC5,0x85), o2(0xC5,0x86), o2(0xC8,0xF0), o2(0xC5,0x87),
+     o2(0xC5,0x88), o2(0xC8,0xF1), o2(0xC5,0x89), o2(0xC5,0x8A),
+     o2(0xC5,0x8B), o2(0xC8,0xF2), o2(0xC5,0x8C), o2(0xC5,0x8D),
+     o2(0xC5,0x8E), o2(0xC8,0xF3), o2(0xC5,0x8F), o2(0xC5,0x90),
+     o2(0xC5,0x91), o2(0xC5,0x92), o2(0xC5,0x93), o2(0xC5,0x94),
+     o2(0xC5,0x95), o2(0xC8,0xF4), o2(0xC8,0xF5), o2(0xC5,0x96),
+     o2(0xC5,0x97),
+
+#define to_CP949_ED_9D WORDINDEX2INFO(31491)
+    to_EUC_KR_E3_81_offsets,
+    to_CP949_ED_9D_infos,
+
+#define to_CP949_ED_9E_infos WORDINDEX2INFO(31493)
+           INVALID, o2(0xC5,0x98), o2(0xC8,0xF6), o2(0xC5,0x99),
+     o2(0xC5,0x9A), o2(0xC5,0x9B), o2(0xC5,0x9C), o2(0xC5,0x9D),
+     o2(0xC5,0x9E), o2(0xC8,0xF7), o2(0xC8,0xF8), o2(0xC5,0x9F),
+     o2(0xC5,0xA0), o2(0xC8,0xF9), o2(0xC6,0x41), o2(0xC6,0x42),
+     o2(0xC6,0x43), o2(0xC8,0xFA), o2(0xC6,0x44), o2(0xC6,0x45),
+     o2(0xC6,0x46), o2(0xC6,0x47), o2(0xC6,0x48), o2(0xC6,0x49),
+     o2(0xC6,0x4A), o2(0xC8,0xFB), o2(0xC8,0xFC), o2(0xC6,0x4B),
+     o2(0xC8,0xFD), o2(0xC6,0x4C), o2(0xC8,0xFE), o2(0xC6,0x4D),
+     o2(0xC6,0x4E), o2(0xC6,0x4F), o2(0xC6,0x50), o2(0xC6,0x51),
+     o2(0xC6,0x52),         UNDEF,
+
+#define to_CP949_ED_9E WORDINDEX2INFO(31531)
+    to_CP949_ED_9E_offsets,
+    to_CP949_ED_9E_infos,
+
+#define to_CP949_ED_infos WORDINDEX2INFO(31533)
+            INVALID, to_CP949_ED_80, to_CP949_ED_81, to_CP949_ED_82,
+     to_CP949_ED_83, to_CP949_ED_84, to_CP949_ED_85, to_CP949_ED_86,
+     to_CP949_ED_87, to_CP949_ED_88, to_CP949_ED_89, to_CP949_ED_8A,
+     to_CP949_ED_8B, to_CP949_ED_8C, to_CP949_ED_8D, to_CP949_ED_8E,
+     to_CP949_ED_8F, to_CP949_ED_90, to_CP949_ED_91, to_CP949_ED_92,
+     to_CP949_ED_93, to_CP949_ED_94, to_CP949_ED_95, to_CP949_ED_96,
+     to_CP949_ED_97, to_CP949_ED_98, to_CP949_ED_99, to_CP949_ED_9A,
+     to_CP949_ED_9B, to_CP949_ED_9C, to_CP949_ED_9D, to_CP949_ED_9E,
+       to_EUC_KR_C6,
+
+#define to_CP949_ED WORDINDEX2INFO(31566)
+    to_EUC_KR_ED_offsets,
+    to_CP949_ED_infos,
+
+#define to_CP949_infos WORDINDEX2INFO(31568)
+            NOMAP,      INVALID,  to_CP949_C2, to_EUC_KR_C3,
+     to_EUC_KR_C4, to_EUC_KR_C5, to_EUC_KR_C6, to_EUC_KR_CB,
+     to_EUC_KR_CE, to_EUC_KR_CF, to_EUC_KR_D0, to_EUC_KR_D1,
+     to_EUC_KR_E0, to_EUC_KR_E1,  to_CP949_E2, to_EUC_KR_E3,
+     to_EUC_KR_E4, to_EUC_KR_E5, to_EUC_KR_E6, to_EUC_KR_E7,
+     to_EUC_KR_E8, to_EUC_KR_E9,  to_CP949_EA,  to_CP949_EB,
+      to_CP949_EC,  to_CP949_ED, to_EUC_KR_EF, to_EUC_KR_F0,
+     to_EUC_KR_F1, to_EUC_KR_F4,
+
+#define to_CP949 WORDINDEX2INFO(31598)
+    to_EUC_KR_offsets,
+    to_CP949_infos,
+
+#define from_CP949_81_infos WORDINDEX2INFO(31600)
+                INVALID, o3(0xEA,0xB0,0x82),
+     o3(0xEA,0xB0,0x83), o3(0xEA,0xB0,0x85),
+     o3(0xEA,0xB0,0x86), o3(0xEA,0xB0,0x8B),
+     o3(0xEA,0xB0,0x8C), o3(0xEA,0xB0,0x8D),
+     o3(0xEA,0xB0,0x8E), o3(0xEA,0xB0,0x8F),
+     o3(0xEA,0xB0,0x98), o3(0xEA,0xB0,0x9E),
+     o3(0xEA,0xB0,0x9F), o3(0xEA,0xB0,0xA1),
+     o3(0xEA,0xB0,0xA2), o3(0xEA,0xB0,0xA3),
+     o3(0xEA,0xB0,0xA5), o3(0xEA,0xB0,0xA6),
+     o3(0xEA,0xB0,0xA7), o3(0xEA,0xB0,0xA8),
+     o3(0xEA,0xB0,0xA9), o3(0xEA,0xB0,0xAA),
+     o3(0xEA,0xB0,0xAB), o3(0xEA,0xB0,0xAE),
+     o3(0xEA,0xB0,0xB2), o3(0xEA,0xB0,0xB3),
+     o3(0xEA,0xB0,0xB4), o3(0xEA,0xB0,0xB5),
+     o3(0xEA,0xB0,0xB6), o3(0xEA,0xB0,0xB7),
+     o3(0xEA,0xB0,0xBA), o3(0xEA,0xB0,0xBB),
+     o3(0xEA,0xB0,0xBD), o3(0xEA,0xB0,0xBE),
+     o3(0xEA,0xB0,0xBF), o3(0xEA,0xB1,0x81),
+     o3(0xEA,0xB1,0x82), o3(0xEA,0xB1,0x83),
+     o3(0xEA,0xB1,0x84), o3(0xEA,0xB1,0x85),
+     o3(0xEA,0xB1,0x86), o3(0xEA,0xB1,0x87),
+     o3(0xEA,0xB1,0x88), o3(0xEA,0xB1,0x89),
+     o3(0xEA,0xB1,0x8A), o3(0xEA,0xB1,0x8C),
+     o3(0xEA,0xB1,0x8E), o3(0xEA,0xB1,0x8F),
+     o3(0xEA,0xB1,0x90), o3(0xEA,0xB1,0x91),
+     o3(0xEA,0xB1,0x92), o3(0xEA,0xB1,0x93),
+     o3(0xEA,0xB1,0x95), o3(0xEA,0xB1,0x96),
+     o3(0xEA,0xB1,0x97), o3(0xEA,0xB1,0x99),
+     o3(0xEA,0xB1,0x9A), o3(0xEA,0xB1,0x9B),
+     o3(0xEA,0xB1,0x9D), o3(0xEA,0xB1,0x9E),
+     o3(0xEA,0xB1,0x9F), o3(0xEA,0xB1,0xA0),
+     o3(0xEA,0xB1,0xA1), o3(0xEA,0xB1,0xA2),
+     o3(0xEA,0xB1,0xA3), o3(0xEA,0xB1,0xA4),
+     o3(0xEA,0xB1,0xA5), o3(0xEA,0xB1,0xA6),
+     o3(0xEA,0xB1,0xA7), o3(0xEA,0xB1,0xA8),
+     o3(0xEA,0xB1,0xA9), o3(0xEA,0xB1,0xAA),
+     o3(0xEA,0xB1,0xAB), o3(0xEA,0xB1,0xAC),
+     o3(0xEA,0xB1,0xAD), o3(0xEA,0xB1,0xAE),
+     o3(0xEA,0xB1,0xAF), o3(0xEA,0xB1,0xB2),
+     o3(0xEA,0xB1,0xB3), o3(0xEA,0xB1,0xB5),
+     o3(0xEA,0xB1,0xB6), o3(0xEA,0xB1,0xB9),
+     o3(0xEA,0xB1,0xBB), o3(0xEA,0xB1,0xBC),
+     o3(0xEA,0xB1,0xBD), o3(0xEA,0xB1,0xBE),
+     o3(0xEA,0xB1,0xBF), o3(0xEA,0xB2,0x82),
+     o3(0xEA,0xB2,0x87), o3(0xEA,0xB2,0x88),
+     o3(0xEA,0xB2,0x8D), o3(0xEA,0xB2,0x8E),
+     o3(0xEA,0xB2,0x8F), o3(0xEA,0xB2,0x91),
+     o3(0xEA,0xB2,0x92), o3(0xEA,0xB2,0x93),
+     o3(0xEA,0xB2,0x95), o3(0xEA,0xB2,0x96),
+     o3(0xEA,0xB2,0x97), o3(0xEA,0xB2,0x98),
+     o3(0xEA,0xB2,0x99), o3(0xEA,0xB2,0x9A),
+     o3(0xEA,0xB2,0x9B), o3(0xEA,0xB2,0x9E),
+     o3(0xEA,0xB2,0xA2), o3(0xEA,0xB2,0xA3),
+     o3(0xEA,0xB2,0xA4), o3(0xEA,0xB2,0xA5),
+     o3(0xEA,0xB2,0xA6), o3(0xEA,0xB2,0xA7),
+     o3(0xEA,0xB2,0xAB), o3(0xEA,0xB2,0xAD),
+     o3(0xEA,0xB2,0xAE), o3(0xEA,0xB2,0xB1),
+     o3(0xEA,0xB2,0xB2), o3(0xEA,0xB2,0xB3),
+     o3(0xEA,0xB2,0xB4), o3(0xEA,0xB2,0xB5),
+     o3(0xEA,0xB2,0xB6), o3(0xEA,0xB2,0xB7),
+     o3(0xEA,0xB2,0xBA), o3(0xEA,0xB2,0xBE),
+     o3(0xEA,0xB2,0xBF), o3(0xEA,0xB3,0x80),
+     o3(0xEA,0xB3,0x82), o3(0xEA,0xB3,0x83),
+     o3(0xEA,0xB3,0x85), o3(0xEA,0xB3,0x86),
+     o3(0xEA,0xB3,0x87), o3(0xEA,0xB3,0x89),
+     o3(0xEA,0xB3,0x8A), o3(0xEA,0xB3,0x8B),
+     o3(0xEA,0xB3,0x8D), o3(0xEA,0xB3,0x8E),
+     o3(0xEA,0xB3,0x8F), o3(0xEA,0xB3,0x90),
+     o3(0xEA,0xB3,0x91), o3(0xEA,0xB3,0x92),
+     o3(0xEA,0xB3,0x93), o3(0xEA,0xB3,0x94),
+     o3(0xEA,0xB3,0x96), o3(0xEA,0xB3,0x98),
+     o3(0xEA,0xB3,0x99), o3(0xEA,0xB3,0x9A),
+     o3(0xEA,0xB3,0x9B), o3(0xEA,0xB3,0x9C),
+     o3(0xEA,0xB3,0x9D), o3(0xEA,0xB3,0x9E),
+     o3(0xEA,0xB3,0x9F), o3(0xEA,0xB3,0xA2),
+     o3(0xEA,0xB3,0xA3), o3(0xEA,0xB3,0xA5),
+     o3(0xEA,0xB3,0xA6), o3(0xEA,0xB3,0xA9),
+     o3(0xEA,0xB3,0xAB), o3(0xEA,0xB3,0xAD),
+     o3(0xEA,0xB3,0xAE), o3(0xEA,0xB3,0xB2),
+     o3(0xEA,0xB3,0xB4), o3(0xEA,0xB3,0xB7),
+     o3(0xEA,0xB3,0xB8), o3(0xEA,0xB3,0xB9),
+     o3(0xEA,0xB3,0xBA), o3(0xEA,0xB3,0xBB),
+     o3(0xEA,0xB3,0xBE), o3(0xEA,0xB3,0xBF),
+     o3(0xEA,0xB4,0x81), o3(0xEA,0xB4,0x82),
+     o3(0xEA,0xB4,0x83), o3(0xEA,0xB4,0x85),
+     o3(0xEA,0xB4,0x87), o3(0xEA,0xB4,0x88),
+     o3(0xEA,0xB4,0x89), o3(0xEA,0xB4,0x8A),
+     o3(0xEA,0xB4,0x8B), o3(0xEA,0xB4,0x8E),
+     o3(0xEA,0xB4,0x90), o3(0xEA,0xB4,0x92),
+     o3(0xEA,0xB4,0x93),
+
+#define from_CP949_81 WORDINDEX2INFO(31779)
+    from_CP949_81_offsets,
+    from_CP949_81_infos,
+
+#define from_CP949_82_infos WORDINDEX2INFO(31781)
+                INVALID, o3(0xEA,0xB4,0x94),
+     o3(0xEA,0xB4,0x95), o3(0xEA,0xB4,0x96),
+     o3(0xEA,0xB4,0x97), o3(0xEA,0xB4,0x99),
+     o3(0xEA,0xB4,0x9A), o3(0xEA,0xB4,0x9B),
+     o3(0xEA,0xB4,0x9D), o3(0xEA,0xB4,0x9E),
+     o3(0xEA,0xB4,0x9F), o3(0xEA,0xB4,0xA1),
+     o3(0xEA,0xB4,0xA2), o3(0xEA,0xB4,0xA3),
+     o3(0xEA,0xB4,0xA4), o3(0xEA,0xB4,0xA5),
+     o3(0xEA,0xB4,0xA6), o3(0xEA,0xB4,0xA7),
+     o3(0xEA,0xB4,0xA8), o3(0xEA,0xB4,0xAA),
+     o3(0xEA,0xB4,0xAB), o3(0xEA,0xB4,0xAE),
+     o3(0xEA,0xB4,0xAF), o3(0xEA,0xB4,0xB0),
+     o3(0xEA,0xB4,0xB1), o3(0xEA,0xB4,0xB2),
+     o3(0xEA,0xB4,0xB3), o3(0xEA,0xB4,0xB6),
+     o3(0xEA,0xB4,0xB7), o3(0xEA,0xB4,0xB9),
+     o3(0xEA,0xB4,0xBA), o3(0xEA,0xB4,0xBB),
+     o3(0xEA,0xB4,0xBD), o3(0xEA,0xB4,0xBE),
+     o3(0xEA,0xB4,0xBF), o3(0xEA,0xB5,0x80),
+     o3(0xEA,0xB5,0x81), o3(0xEA,0xB5,0x82),
+     o3(0xEA,0xB5,0x83), o3(0xEA,0xB5,0x86),
+     o3(0xEA,0xB5,0x88), o3(0xEA,0xB5,0x8A),
+     o3(0xEA,0xB5,0x8B), o3(0xEA,0xB5,0x8C),
+     o3(0xEA,0xB5,0x8D), o3(0xEA,0xB5,0x8E),
+     o3(0xEA,0xB5,0x8F), o3(0xEA,0xB5,0x91),
+     o3(0xEA,0xB5,0x92), o3(0xEA,0xB5,0x93),
+     o3(0xEA,0xB5,0x95), o3(0xEA,0xB5,0x96),
+     o3(0xEA,0xB5,0x97), o3(0xEA,0xB5,0x99),
+     o3(0xEA,0xB5,0x9A), o3(0xEA,0xB5,0x9B),
+     o3(0xEA,0xB5,0x9C), o3(0xEA,0xB5,0x9D),
+     o3(0xEA,0xB5,0x9E), o3(0xEA,0xB5,0x9F),
+     o3(0xEA,0xB5,0xA0), o3(0xEA,0xB5,0xA2),
+     o3(0xEA,0xB5,0xA4), o3(0xEA,0xB5,0xA5),
+     o3(0xEA,0xB5,0xA6), o3(0xEA,0xB5,0xA7),
+     o3(0xEA,0xB5,0xA8), o3(0xEA,0xB5,0xA9),
+     o3(0xEA,0xB5,0xAA), o3(0xEA,0xB5,0xAB),
+     o3(0xEA,0xB5,0xAE), o3(0xEA,0xB5,0xAF),
+     o3(0xEA,0xB5,0xB1), o3(0xEA,0xB5,0xB2),
+     o3(0xEA,0xB5,0xB7), o3(0xEA,0xB5,0xB8),
+     o3(0xEA,0xB5,0xB9), o3(0xEA,0xB5,0xBA),
+     o3(0xEA,0xB5,0xBE), o3(0xEA,0xB6,0x80),
+     o3(0xEA,0xB6,0x83), o3(0xEA,0xB6,0x84),
+     o3(0xEA,0xB6,0x85), o3(0xEA,0xB6,0x86),
+     o3(0xEA,0xB6,0x87), o3(0xEA,0xB6,0x8A),
+     o3(0xEA,0xB6,0x8B), o3(0xEA,0xB6,0x8D),
+     o3(0xEA,0xB6,0x8E), o3(0xEA,0xB6,0x8F),
+     o3(0xEA,0xB6,0x91), o3(0xEA,0xB6,0x92),
+     o3(0xEA,0xB6,0x93), o3(0xEA,0xB6,0x94),
+     o3(0xEA,0xB6,0x95), o3(0xEA,0xB6,0x96),
+     o3(0xEA,0xB6,0x97), o3(0xEA,0xB6,0x98),
+     o3(0xEA,0xB6,0x99), o3(0xEA,0xB6,0x9A),
+     o3(0xEA,0xB6,0x9B), o3(0xEA,0xB6,0x9E),
+     o3(0xEA,0xB6,0x9F), o3(0xEA,0xB6,0xA0),
+     o3(0xEA,0xB6,0xA1), o3(0xEA,0xB6,0xA2),
+     o3(0xEA,0xB6,0xA3), o3(0xEA,0xB6,0xA5),
+     o3(0xEA,0xB6,0xA6), o3(0xEA,0xB6,0xA7),
+     o3(0xEA,0xB6,0xA8), o3(0xEA,0xB6,0xA9),
+     o3(0xEA,0xB6,0xAA), o3(0xEA,0xB6,0xAB),
+     o3(0xEA,0xB6,0xAC), o3(0xEA,0xB6,0xAD),
+     o3(0xEA,0xB6,0xAE), o3(0xEA,0xB6,0xAF),
+     o3(0xEA,0xB6,0xB0), o3(0xEA,0xB6,0xB1),
+     o3(0xEA,0xB6,0xB2), o3(0xEA,0xB6,0xB3),
+     o3(0xEA,0xB6,0xB4), o3(0xEA,0xB6,0xB5),
+     o3(0xEA,0xB6,0xB6), o3(0xEA,0xB6,0xB8),
+     o3(0xEA,0xB6,0xB9), o3(0xEA,0xB6,0xBA),
+     o3(0xEA,0xB6,0xBB), o3(0xEA,0xB6,0xBC),
+     o3(0xEA,0xB6,0xBD), o3(0xEA,0xB6,0xBE),
+     o3(0xEA,0xB6,0xBF), o3(0xEA,0xB7,0x82),
+     o3(0xEA,0xB7,0x83), o3(0xEA,0xB7,0x85),
+     o3(0xEA,0xB7,0x86), o3(0xEA,0xB7,0x87),
+     o3(0xEA,0xB7,0x89), o3(0xEA,0xB7,0x8A),
+     o3(0xEA,0xB7,0x8B), o3(0xEA,0xB7,0x8C),
+     o3(0xEA,0xB7,0x8D), o3(0xEA,0xB7,0x8E),
+     o3(0xEA,0xB7,0x8F), o3(0xEA,0xB7,0x92),
+     o3(0xEA,0xB7,0x94), o3(0xEA,0xB7,0x95),
+     o3(0xEA,0xB7,0x96), o3(0xEA,0xB7,0x97),
+     o3(0xEA,0xB7,0x98), o3(0xEA,0xB7,0x99),
+     o3(0xEA,0xB7,0x9A), o3(0xEA,0xB7,0x9B),
+     o3(0xEA,0xB7,0x9D), o3(0xEA,0xB7,0x9E),
+     o3(0xEA,0xB7,0x9F), o3(0xEA,0xB7,0xA1),
+     o3(0xEA,0xB7,0xA2), o3(0xEA,0xB7,0xA3),
+     o3(0xEA,0xB7,0xA5), o3(0xEA,0xB7,0xA6),
+     o3(0xEA,0xB7,0xA7), o3(0xEA,0xB7,0xA8),
+     o3(0xEA,0xB7,0xA9), o3(0xEA,0xB7,0xAA),
+     o3(0xEA,0xB7,0xAB), o3(0xEA,0xB7,0xAC),
+     o3(0xEA,0xB7,0xAD), o3(0xEA,0xB7,0xAE),
+     o3(0xEA,0xB7,0xAF), o3(0xEA,0xB7,0xB0),
+     o3(0xEA,0xB7,0xB1), o3(0xEA,0xB7,0xB2),
+     o3(0xEA,0xB7,0xB3), o3(0xEA,0xB7,0xB4),
+     o3(0xEA,0xB7,0xB5), o3(0xEA,0xB7,0xB6),
+     o3(0xEA,0xB7,0xB7),
+
+#define from_CP949_82 WORDINDEX2INFO(31960)
+    from_CP949_81_offsets,
+    from_CP949_82_infos,
+
+#define from_CP949_83_infos WORDINDEX2INFO(31962)
+                INVALID, o3(0xEA,0xB7,0xBA),
+     o3(0xEA,0xB7,0xBB), o3(0xEA,0xB7,0xBD),
+     o3(0xEA,0xB7,0xBE), o3(0xEA,0xB8,0x82),
+     o3(0xEA,0xB8,0x83), o3(0xEA,0xB8,0x84),
+     o3(0xEA,0xB8,0x85), o3(0xEA,0xB8,0x86),
+     o3(0xEA,0xB8,0x87), o3(0xEA,0xB8,0x8A),
+     o3(0xEA,0xB8,0x8C), o3(0xEA,0xB8,0x8E),
+     o3(0xEA,0xB8,0x8F), o3(0xEA,0xB8,0x90),
+     o3(0xEA,0xB8,0x91), o3(0xEA,0xB8,0x92),
+     o3(0xEA,0xB8,0x93), o3(0xEA,0xB8,0x95),
+     o3(0xEA,0xB8,0x96), o3(0xEA,0xB8,0x97),
+     o3(0xEA,0xB8,0x98), o3(0xEA,0xB8,0x99),
+     o3(0xEA,0xB8,0x9A), o3(0xEA,0xB8,0x9B),
+     o3(0xEA,0xB8,0x9C), o3(0xEA,0xB8,0x9D),
+     o3(0xEA,0xB8,0x9E), o3(0xEA,0xB8,0x9F),
+     o3(0xEA,0xB8,0xA0), o3(0xEA,0xB8,0xA1),
+     o3(0xEA,0xB8,0xA2), o3(0xEA,0xB8,0xA3),
+     o3(0xEA,0xB8,0xA4), o3(0xEA,0xB8,0xA5),
+     o3(0xEA,0xB8,0xA6), o3(0xEA,0xB8,0xA7),
+     o3(0xEA,0xB8,0xA8), o3(0xEA,0xB8,0xA9),
+     o3(0xEA,0xB8,0xAA), o3(0xEA,0xB8,0xAB),
+     o3(0xEA,0xB8,0xAC), o3(0xEA,0xB8,0xAD),
+     o3(0xEA,0xB8,0xAE), o3(0xEA,0xB8,0xAF),
+     o3(0xEA,0xB8,0xB2), o3(0xEA,0xB8,0xB3),
+     o3(0xEA,0xB8,0xB5), o3(0xEA,0xB8,0xB6),
+     o3(0xEA,0xB8,0xB9), o3(0xEA,0xB8,0xBB),
+     o3(0xEA,0xB8,0xBC), o3(0xEA,0xB8,0xBD),
+     o3(0xEA,0xB8,0xBE), o3(0xEA,0xB8,0xBF),
+     o3(0xEA,0xB9,0x82), o3(0xEA,0xB9,0x84),
+     o3(0xEA,0xB9,0x87), o3(0xEA,0xB9,0x88),
+     o3(0xEA,0xB9,0x89), o3(0xEA,0xB9,0x8B),
+     o3(0xEA,0xB9,0x8F), o3(0xEA,0xB9,0x91),
+     o3(0xEA,0xB9,0x92), o3(0xEA,0xB9,0x93),
+     o3(0xEA,0xB9,0x95), o3(0xEA,0xB9,0x97),
+     o3(0xEA,0xB9,0x98), o3(0xEA,0xB9,0x99),
+     o3(0xEA,0xB9,0x9A), o3(0xEA,0xB9,0x9B),
+     o3(0xEA,0xB9,0x9E), o3(0xEA,0xB9,0xA2),
+     o3(0xEA,0xB9,0xA3), o3(0xEA,0xB9,0xA4),
+     o3(0xEA,0xB9,0xA6), o3(0xEA,0xB9,0xA7),
+     o3(0xEA,0xB9,0xAA), o3(0xEA,0xB9,0xAB),
+     o3(0xEA,0xB9,0xAD), o3(0xEA,0xB9,0xAE),
+     o3(0xEA,0xB9,0xAF), o3(0xEA,0xB9,0xB1),
+     o3(0xEA,0xB9,0xB2), o3(0xEA,0xB9,0xB3),
+     o3(0xEA,0xB9,0xB4), o3(0xEA,0xB9,0xB5),
+     o3(0xEA,0xB9,0xB6), o3(0xEA,0xB9,0xB7),
+     o3(0xEA,0xB9,0xBA), o3(0xEA,0xB9,0xBE),
+     o3(0xEA,0xB9,0xBF), o3(0xEA,0xBA,0x80),
+     o3(0xEA,0xBA,0x81), o3(0xEA,0xBA,0x82),
+     o3(0xEA,0xBA,0x83), o3(0xEA,0xBA,0x86),
+     o3(0xEA,0xBA,0x87), o3(0xEA,0xBA,0x88),
+     o3(0xEA,0xBA,0x89), o3(0xEA,0xBA,0x8A),
+     o3(0xEA,0xBA,0x8B), o3(0xEA,0xBA,0x8D),
+     o3(0xEA,0xBA,0x8E), o3(0xEA,0xBA,0x8F),
+     o3(0xEA,0xBA,0x90), o3(0xEA,0xBA,0x91),
+     o3(0xEA,0xBA,0x92), o3(0xEA,0xBA,0x93),
+     o3(0xEA,0xBA,0x94), o3(0xEA,0xBA,0x95),
+     o3(0xEA,0xBA,0x96), o3(0xEA,0xBA,0x97),
+     o3(0xEA,0xBA,0x98), o3(0xEA,0xBA,0x99),
+     o3(0xEA,0xBA,0x9A), o3(0xEA,0xBA,0x9B),
+     o3(0xEA,0xBA,0x9C), o3(0xEA,0xBA,0x9D),
+     o3(0xEA,0xBA,0x9E), o3(0xEA,0xBA,0x9F),
+     o3(0xEA,0xBA,0xA0), o3(0xEA,0xBA,0xA1),
+     o3(0xEA,0xBA,0xA2), o3(0xEA,0xBA,0xA3),
+     o3(0xEA,0xBA,0xA4), o3(0xEA,0xBA,0xA5),
+     o3(0xEA,0xBA,0xA6), o3(0xEA,0xBA,0xA7),
+     o3(0xEA,0xBA,0xA8), o3(0xEA,0xBA,0xA9),
+     o3(0xEA,0xBA,0xAA), o3(0xEA,0xBA,0xAB),
+     o3(0xEA,0xBA,0xAC), o3(0xEA,0xBA,0xAD),
+     o3(0xEA,0xBA,0xAE), o3(0xEA,0xBA,0xAF),
+     o3(0xEA,0xBA,0xB0), o3(0xEA,0xBA,0xB1),
+     o3(0xEA,0xBA,0xB2), o3(0xEA,0xBA,0xB3),
+     o3(0xEA,0xBA,0xB4), o3(0xEA,0xBA,0xB5),
+     o3(0xEA,0xBA,0xB6), o3(0xEA,0xBA,0xB7),
+     o3(0xEA,0xBA,0xB8), o3(0xEA,0xBA,0xB9),
+     o3(0xEA,0xBA,0xBA), o3(0xEA,0xBA,0xBB),
+     o3(0xEA,0xBA,0xBF), o3(0xEA,0xBB,0x81),
+     o3(0xEA,0xBB,0x82), o3(0xEA,0xBB,0x83),
+     o3(0xEA,0xBB,0x85), o3(0xEA,0xBB,0x86),
+     o3(0xEA,0xBB,0x87), o3(0xEA,0xBB,0x88),
+     o3(0xEA,0xBB,0x89), o3(0xEA,0xBB,0x8A),
+     o3(0xEA,0xBB,0x8B), o3(0xEA,0xBB,0x8E),
+     o3(0xEA,0xBB,0x92), o3(0xEA,0xBB,0x93),
+     o3(0xEA,0xBB,0x94), o3(0xEA,0xBB,0x95),
+     o3(0xEA,0xBB,0x96), o3(0xEA,0xBB,0x97),
+     o3(0xEA,0xBB,0x9A), o3(0xEA,0xBB,0x9B),
+     o3(0xEA,0xBB,0x9D), o3(0xEA,0xBB,0x9E),
+     o3(0xEA,0xBB,0x9F), o3(0xEA,0xBB,0xA0),
+     o3(0xEA,0xBB,0xA1), o3(0xEA,0xBB,0xA2),
+     o3(0xEA,0xBB,0xA3), o3(0xEA,0xBB,0xA4),
+     o3(0xEA,0xBB,0xA5),
+
+#define from_CP949_83 WORDINDEX2INFO(32141)
+    from_CP949_81_offsets,
+    from_CP949_83_infos,
+
+#define from_CP949_84_infos WORDINDEX2INFO(32143)
+                INVALID, o3(0xEA,0xBB,0xA6),
+     o3(0xEA,0xBB,0xA7), o3(0xEA,0xBB,0xA9),
+     o3(0xEA,0xBB,0xAA), o3(0xEA,0xBB,0xAC),
+     o3(0xEA,0xBB,0xAE), o3(0xEA,0xBB,0xAF),
+     o3(0xEA,0xBB,0xB0), o3(0xEA,0xBB,0xB1),
+     o3(0xEA,0xBB,0xB2), o3(0xEA,0xBB,0xB3),
+     o3(0xEA,0xBB,0xB5), o3(0xEA,0xBB,0xB6),
+     o3(0xEA,0xBB,0xB7), o3(0xEA,0xBB,0xB9),
+     o3(0xEA,0xBB,0xBA), o3(0xEA,0xBB,0xBB),
+     o3(0xEA,0xBB,0xBD), o3(0xEA,0xBB,0xBE),
+     o3(0xEA,0xBB,0xBF), o3(0xEA,0xBC,0x80),
+     o3(0xEA,0xBC,0x81), o3(0xEA,0xBC,0x82),
+     o3(0xEA,0xBC,0x83), o3(0xEA,0xBC,0x84),
+     o3(0xEA,0xBC,0x85), o3(0xEA,0xBC,0x86),
+     o3(0xEA,0xBC,0x89), o3(0xEA,0xBC,0x8A),
+     o3(0xEA,0xBC,0x8B), o3(0xEA,0xBC,0x8C),
+     o3(0xEA,0xBC,0x8E), o3(0xEA,0xBC,0x8F),
+     o3(0xEA,0xBC,0x91), o3(0xEA,0xBC,0x92),
+     o3(0xEA,0xBC,0x93), o3(0xEA,0xBC,0x94),
+     o3(0xEA,0xBC,0x95), o3(0xEA,0xBC,0x96),
+     o3(0xEA,0xBC,0x97), o3(0xEA,0xBC,0x98),
+     o3(0xEA,0xBC,0x99), o3(0xEA,0xBC,0x9A),
+     o3(0xEA,0xBC,0x9B), o3(0xEA,0xBC,0x9C),
+     o3(0xEA,0xBC,0x9D), o3(0xEA,0xBC,0x9E),
+     o3(0xEA,0xBC,0x9F), o3(0xEA,0xBC,0xA0),
+     o3(0xEA,0xBC,0xA1), o3(0xEA,0xBC,0xA2),
+     o3(0xEA,0xBC,0xA3), o3(0xEA,0xBC,0xA4),
+     o3(0xEA,0xBC,0xA5), o3(0xEA,0xBC,0xA6),
+     o3(0xEA,0xBC,0xA7), o3(0xEA,0xBC,0xA8),
+     o3(0xEA,0xBC,0xA9), o3(0xEA,0xBC,0xAA),
+     o3(0xEA,0xBC,0xAB), o3(0xEA,0xBC,0xAE),
+     o3(0xEA,0xBC,0xAF), o3(0xEA,0xBC,0xB1),
+     o3(0xEA,0xBC,0xB3), o3(0xEA,0xBC,0xB5),
+     o3(0xEA,0xBC,0xB6), o3(0xEA,0xBC,0xB7),
+     o3(0xEA,0xBC,0xB8), o3(0xEA,0xBC,0xB9),
+     o3(0xEA,0xBC,0xBA), o3(0xEA,0xBC,0xBB),
+     o3(0xEA,0xBC,0xBE), o3(0xEA,0xBD,0x80),
+     o3(0xEA,0xBD,0x84), o3(0xEA,0xBD,0x85),
+     o3(0xEA,0xBD,0x86), o3(0xEA,0xBD,0x87),
+     o3(0xEA,0xBD,0x8A), o3(0xEA,0xBD,0x8B),
+     o3(0xEA,0xBD,0x8C), o3(0xEA,0xBD,0x8D),
+     o3(0xEA,0xBD,0x8E), o3(0xEA,0xBD,0x8F),
+     o3(0xEA,0xBD,0x91), o3(0xEA,0xBD,0x92),
+     o3(0xEA,0xBD,0x93), o3(0xEA,0xBD,0x94),
+     o3(0xEA,0xBD,0x95), o3(0xEA,0xBD,0x96),
+     o3(0xEA,0xBD,0x97), o3(0xEA,0xBD,0x98),
+     o3(0xEA,0xBD,0x99), o3(0xEA,0xBD,0x9A),
+     o3(0xEA,0xBD,0x9B), o3(0xEA,0xBD,0x9E),
+     o3(0xEA,0xBD,0x9F), o3(0xEA,0xBD,0xA0),
+     o3(0xEA,0xBD,0xA1), o3(0xEA,0xBD,0xA2),
+     o3(0xEA,0xBD,0xA3), o3(0xEA,0xBD,0xA6),
+     o3(0xEA,0xBD,0xA7), o3(0xEA,0xBD,0xA8),
+     o3(0xEA,0xBD,0xA9), o3(0xEA,0xBD,0xAA),
+     o3(0xEA,0xBD,0xAB), o3(0xEA,0xBD,0xAC),
+     o3(0xEA,0xBD,0xAD), o3(0xEA,0xBD,0xAE),
+     o3(0xEA,0xBD,0xAF), o3(0xEA,0xBD,0xB0),
+     o3(0xEA,0xBD,0xB1), o3(0xEA,0xBD,0xB2),
+     o3(0xEA,0xBD,0xB3), o3(0xEA,0xBD,0xB4),
+     o3(0xEA,0xBD,0xB5), o3(0xEA,0xBD,0xB6),
+     o3(0xEA,0xBD,0xB7), o3(0xEA,0xBD,0xB8),
+     o3(0xEA,0xBD,0xBA), o3(0xEA,0xBD,0xBB),
+     o3(0xEA,0xBD,0xBC), o3(0xEA,0xBD,0xBD),
+     o3(0xEA,0xBD,0xBE), o3(0xEA,0xBD,0xBF),
+     o3(0xEA,0xBE,0x81), o3(0xEA,0xBE,0x82),
+     o3(0xEA,0xBE,0x83), o3(0xEA,0xBE,0x85),
+     o3(0xEA,0xBE,0x86), o3(0xEA,0xBE,0x87),
+     o3(0xEA,0xBE,0x89), o3(0xEA,0xBE,0x8A),
+     o3(0xEA,0xBE,0x8B), o3(0xEA,0xBE,0x8C),
+     o3(0xEA,0xBE,0x8D), o3(0xEA,0xBE,0x8E),
+     o3(0xEA,0xBE,0x8F), o3(0xEA,0xBE,0x92),
+     o3(0xEA,0xBE,0x93), o3(0xEA,0xBE,0x94),
+     o3(0xEA,0xBE,0x96), o3(0xEA,0xBE,0x97),
+     o3(0xEA,0xBE,0x98), o3(0xEA,0xBE,0x99),
+     o3(0xEA,0xBE,0x9A), o3(0xEA,0xBE,0x9B),
+     o3(0xEA,0xBE,0x9D), o3(0xEA,0xBE,0x9E),
+     o3(0xEA,0xBE,0x9F), o3(0xEA,0xBE,0xA0),
+     o3(0xEA,0xBE,0xA1), o3(0xEA,0xBE,0xA2),
+     o3(0xEA,0xBE,0xA3), o3(0xEA,0xBE,0xA4),
+     o3(0xEA,0xBE,0xA5), o3(0xEA,0xBE,0xA6),
+     o3(0xEA,0xBE,0xA7), o3(0xEA,0xBE,0xA8),
+     o3(0xEA,0xBE,0xA9), o3(0xEA,0xBE,0xAA),
+     o3(0xEA,0xBE,0xAB), o3(0xEA,0xBE,0xAC),
+     o3(0xEA,0xBE,0xAD), o3(0xEA,0xBE,0xAE),
+     o3(0xEA,0xBE,0xAF), o3(0xEA,0xBE,0xB0),
+     o3(0xEA,0xBE,0xB1), o3(0xEA,0xBE,0xB2),
+     o3(0xEA,0xBE,0xB3), o3(0xEA,0xBE,0xB4),
+     o3(0xEA,0xBE,0xB5), o3(0xEA,0xBE,0xB6),
+     o3(0xEA,0xBE,0xB7), o3(0xEA,0xBE,0xBA),
+     o3(0xEA,0xBE,0xBB), o3(0xEA,0xBE,0xBD),
+     o3(0xEA,0xBE,0xBE),
+
+#define from_CP949_84 WORDINDEX2INFO(32322)
+    from_CP949_81_offsets,
+    from_CP949_84_infos,
+
+#define from_CP949_85_infos WORDINDEX2INFO(32324)
+                INVALID, o3(0xEA,0xBE,0xBF),
+     o3(0xEA,0xBF,0x81), o3(0xEA,0xBF,0x82),
+     o3(0xEA,0xBF,0x83), o3(0xEA,0xBF,0x84),
+     o3(0xEA,0xBF,0x85), o3(0xEA,0xBF,0x86),
+     o3(0xEA,0xBF,0x8A), o3(0xEA,0xBF,0x8C),
+     o3(0xEA,0xBF,0x8F), o3(0xEA,0xBF,0x90),
+     o3(0xEA,0xBF,0x91), o3(0xEA,0xBF,0x92),
+     o3(0xEA,0xBF,0x93), o3(0xEA,0xBF,0x95),
+     o3(0xEA,0xBF,0x96), o3(0xEA,0xBF,0x97),
+     o3(0xEA,0xBF,0x98), o3(0xEA,0xBF,0x99),
+     o3(0xEA,0xBF,0x9A), o3(0xEA,0xBF,0x9B),
+     o3(0xEA,0xBF,0x9D), o3(0xEA,0xBF,0x9E),
+     o3(0xEA,0xBF,0x9F), o3(0xEA,0xBF,0xA0),
+     o3(0xEA,0xBF,0xA1), o3(0xEA,0xBF,0xA2),
+     o3(0xEA,0xBF,0xA3), o3(0xEA,0xBF,0xA4),
+     o3(0xEA,0xBF,0xA5), o3(0xEA,0xBF,0xA6),
+     o3(0xEA,0xBF,0xA7), o3(0xEA,0xBF,0xAA),
+     o3(0xEA,0xBF,0xAB), o3(0xEA,0xBF,0xAC),
+     o3(0xEA,0xBF,0xAD), o3(0xEA,0xBF,0xAE),
+     o3(0xEA,0xBF,0xAF), o3(0xEA,0xBF,0xB2),
+     o3(0xEA,0xBF,0xB3), o3(0xEA,0xBF,0xB5),
+     o3(0xEA,0xBF,0xB6), o3(0xEA,0xBF,0xB7),
+     o3(0xEA,0xBF,0xB9), o3(0xEA,0xBF,0xBA),
+     o3(0xEA,0xBF,0xBB), o3(0xEA,0xBF,0xBC),
+     o3(0xEA,0xBF,0xBD), o3(0xEA,0xBF,0xBE),
+     o3(0xEA,0xBF,0xBF), o3(0xEB,0x80,0x82),
+     o3(0xEB,0x80,0x83), o3(0xEB,0x80,0x85),
+     o3(0xEB,0x80,0x86), o3(0xEB,0x80,0x87),
+     o3(0xEB,0x80,0x88), o3(0xEB,0x80,0x89),
+     o3(0xEB,0x80,0x8A), o3(0xEB,0x80,0x8B),
+     o3(0xEB,0x80,0x8D), o3(0xEB,0x80,0x8E),
+     o3(0xEB,0x80,0x8F), o3(0xEB,0x80,0x91),
+     o3(0xEB,0x80,0x92), o3(0xEB,0x80,0x93),
+     o3(0xEB,0x80,0x95), o3(0xEB,0x80,0x96),
+     o3(0xEB,0x80,0x97), o3(0xEB,0x80,0x98),
+     o3(0xEB,0x80,0x99), o3(0xEB,0x80,0x9A),
+     o3(0xEB,0x80,0x9B), o3(0xEB,0x80,0x9E),
+     o3(0xEB,0x80,0x9F), o3(0xEB,0x80,0xA0),
+     o3(0xEB,0x80,0xA1), o3(0xEB,0x80,0xA2),
+     o3(0xEB,0x80,0xA3), o3(0xEB,0x80,0xA4),
+     o3(0xEB,0x80,0xA5), o3(0xEB,0x80,0xA6),
+     o3(0xEB,0x80,0xA7), o3(0xEB,0x80,0xA9),
+     o3(0xEB,0x80,0xAA), o3(0xEB,0x80,0xAB),
+     o3(0xEB,0x80,0xAC), o3(0xEB,0x80,0xAD),
+     o3(0xEB,0x80,0xAE), o3(0xEB,0x80,0xAF),
+     o3(0xEB,0x80,0xB0), o3(0xEB,0x80,0xB1),
+     o3(0xEB,0x80,0xB2), o3(0xEB,0x80,0xB3),
+     o3(0xEB,0x80,0xB4), o3(0xEB,0x80,0xB5),
+     o3(0xEB,0x80,0xB6), o3(0xEB,0x80,0xB7),
+     o3(0xEB,0x80,0xB8), o3(0xEB,0x80,0xB9),
+     o3(0xEB,0x80,0xBA), o3(0xEB,0x80,0xBB),
+     o3(0xEB,0x80,0xBC), o3(0xEB,0x80,0xBD),
+     o3(0xEB,0x80,0xBE), o3(0xEB,0x80,0xBF),
+     o3(0xEB,0x81,0x80), o3(0xEB,0x81,0x81),
+     o3(0xEB,0x81,0x82), o3(0xEB,0x81,0x83),
+     o3(0xEB,0x81,0x86), o3(0xEB,0x81,0x87),
+     o3(0xEB,0x81,0x89), o3(0xEB,0x81,0x8B),
+     o3(0xEB,0x81,0x8D), o3(0xEB,0x81,0x8F),
+     o3(0xEB,0x81,0x90), o3(0xEB,0x81,0x91),
+     o3(0xEB,0x81,0x92), o3(0xEB,0x81,0x96),
+     o3(0xEB,0x81,0x98), o3(0xEB,0x81,0x9A),
+     o3(0xEB,0x81,0x9B), o3(0xEB,0x81,0x9C),
+     o3(0xEB,0x81,0x9E), o3(0xEB,0x81,0x9F),
+     o3(0xEB,0x81,0xA0), o3(0xEB,0x81,0xA1),
+     o3(0xEB,0x81,0xA2), o3(0xEB,0x81,0xA3),
+     o3(0xEB,0x81,0xA4), o3(0xEB,0x81,0xA5),
+     o3(0xEB,0x81,0xA6), o3(0xEB,0x81,0xA7),
+     o3(0xEB,0x81,0xA8), o3(0xEB,0x81,0xA9),
+     o3(0xEB,0x81,0xAA), o3(0xEB,0x81,0xAB),
+     o3(0xEB,0x81,0xAC), o3(0xEB,0x81,0xAD),
+     o3(0xEB,0x81,0xAE), o3(0xEB,0x81,0xAF),
+     o3(0xEB,0x81,0xB0), o3(0xEB,0x81,0xB1),
+     o3(0xEB,0x81,0xB2), o3(0xEB,0x81,0xB3),
+     o3(0xEB,0x81,0xB4), o3(0xEB,0x81,0xB5),
+     o3(0xEB,0x81,0xB6), o3(0xEB,0x81,0xB7),
+     o3(0xEB,0x81,0xB8), o3(0xEB,0x81,0xB9),
+     o3(0xEB,0x81,0xBA), o3(0xEB,0x81,0xBB),
+     o3(0xEB,0x81,0xBE), o3(0xEB,0x81,0xBF),
+     o3(0xEB,0x82,0x81), o3(0xEB,0x82,0x82),
+     o3(0xEB,0x82,0x83), o3(0xEB,0x82,0x85),
+     o3(0xEB,0x82,0x86), o3(0xEB,0x82,0x87),
+     o3(0xEB,0x82,0x88), o3(0xEB,0x82,0x89),
+     o3(0xEB,0x82,0x8A), o3(0xEB,0x82,0x8B),
+     o3(0xEB,0x82,0x8E), o3(0xEB,0x82,0x90),
+     o3(0xEB,0x82,0x92), o3(0xEB,0x82,0x93),
+     o3(0xEB,0x82,0x94), o3(0xEB,0x82,0x95),
+     o3(0xEB,0x82,0x96), o3(0xEB,0x82,0x97),
+     o3(0xEB,0x82,0x9B), o3(0xEB,0x82,0x9D),
+     o3(0xEB,0x82,0x9E), o3(0xEB,0x82,0xA3),
+     o3(0xEB,0x82,0xA4),
+
+#define from_CP949_85 WORDINDEX2INFO(32503)
+    from_CP949_81_offsets,
+    from_CP949_85_infos,
+
+#define from_CP949_86_infos WORDINDEX2INFO(32505)
+                INVALID, o3(0xEB,0x82,0xA5),
+     o3(0xEB,0x82,0xA6), o3(0xEB,0x82,0xA7),
+     o3(0xEB,0x82,0xAA), o3(0xEB,0x82,0xB0),
+     o3(0xEB,0x82,0xB2), o3(0xEB,0x82,0xB6),
+     o3(0xEB,0x82,0xB7), o3(0xEB,0x82,0xB9),
+     o3(0xEB,0x82,0xBA), o3(0xEB,0x82,0xBB),
+     o3(0xEB,0x82,0xBD), o3(0xEB,0x82,0xBE),
+     o3(0xEB,0x82,0xBF), o3(0xEB,0x83,0x80),
+     o3(0xEB,0x83,0x81), o3(0xEB,0x83,0x82),
+     o3(0xEB,0x83,0x83), o3(0xEB,0x83,0x86),
+     o3(0xEB,0x83,0x8A), o3(0xEB,0x83,0x8B),
+     o3(0xEB,0x83,0x8C), o3(0xEB,0x83,0x8D),
+     o3(0xEB,0x83,0x8E), o3(0xEB,0x83,0x8F),
+     o3(0xEB,0x83,0x92), o3(0xEB,0x83,0x93),
+     o3(0xEB,0x83,0x95), o3(0xEB,0x83,0x96),
+     o3(0xEB,0x83,0x97), o3(0xEB,0x83,0x99),
+     o3(0xEB,0x83,0x9A), o3(0xEB,0x83,0x9B),
+     o3(0xEB,0x83,0x9C), o3(0xEB,0x83,0x9D),
+     o3(0xEB,0x83,0x9E), o3(0xEB,0x83,0x9F),
+     o3(0xEB,0x83,0xA1), o3(0xEB,0x83,0xA2),
+     o3(0xEB,0x83,0xA3), o3(0xEB,0x83,0xA4),
+     o3(0xEB,0x83,0xA6), o3(0xEB,0x83,0xA7),
+     o3(0xEB,0x83,0xA8), o3(0xEB,0x83,0xA9),
+     o3(0xEB,0x83,0xAA), o3(0xEB,0x83,0xAB),
+     o3(0xEB,0x83,0xAC), o3(0xEB,0x83,0xAD),
+     o3(0xEB,0x83,0xAE), o3(0xEB,0x83,0xAF),
+     o3(0xEB,0x83,0xB0), o3(0xEB,0x83,0xB1),
+     o3(0xEB,0x83,0xB2), o3(0xEB,0x83,0xB3),
+     o3(0xEB,0x83,0xB4), o3(0xEB,0x83,0xB5),
+     o3(0xEB,0x83,0xB6), o3(0xEB,0x83,0xB7),
+     o3(0xEB,0x83,0xB8), o3(0xEB,0x83,0xB9),
+     o3(0xEB,0x83,0xBA), o3(0xEB,0x83,0xBB),
+     o3(0xEB,0x83,0xBC), o3(0xEB,0x83,0xBD),
+     o3(0xEB,0x83,0xBE), o3(0xEB,0x83,0xBF),
+     o3(0xEB,0x84,0x80), o3(0xEB,0x84,0x81),
+     o3(0xEB,0x84,0x82), o3(0xEB,0x84,0x83),
+     o3(0xEB,0x84,0x84), o3(0xEB,0x84,0x85),
+     o3(0xEB,0x84,0x86), o3(0xEB,0x84,0x87),
+     o3(0xEB,0x84,0x8A), o3(0xEB,0x84,0x8D),
+     o3(0xEB,0x84,0x8E), o3(0xEB,0x84,0x8F),
+     o3(0xEB,0x84,0x91), o3(0xEB,0x84,0x94),
+     o3(0xEB,0x84,0x95), o3(0xEB,0x84,0x96),
+     o3(0xEB,0x84,0x97), o3(0xEB,0x84,0x9A),
+     o3(0xEB,0x84,0x9E), o3(0xEB,0x84,0x9F),
+     o3(0xEB,0x84,0xA0), o3(0xEB,0x84,0xA1),
+     o3(0xEB,0x84,0xA2), o3(0xEB,0x84,0xA6),
+     o3(0xEB,0x84,0xA7), o3(0xEB,0x84,0xA9),
+     o3(0xEB,0x84,0xAA), o3(0xEB,0x84,0xAB),
+     o3(0xEB,0x84,0xAD), o3(0xEB,0x84,0xAE),
+     o3(0xEB,0x84,0xAF), o3(0xEB,0x84,0xB0),
+     o3(0xEB,0x84,0xB1), o3(0xEB,0x84,0xB2),
+     o3(0xEB,0x84,0xB3), o3(0xEB,0x84,0xB6),
+     o3(0xEB,0x84,0xBA), o3(0xEB,0x84,0xBB),
+     o3(0xEB,0x84,0xBC), o3(0xEB,0x84,0xBD),
+     o3(0xEB,0x84,0xBE), o3(0xEB,0x84,0xBF),
+     o3(0xEB,0x85,0x82), o3(0xEB,0x85,0x83),
+     o3(0xEB,0x85,0x85), o3(0xEB,0x85,0x86),
+     o3(0xEB,0x85,0x87), o3(0xEB,0x85,0x89),
+     o3(0xEB,0x85,0x8A), o3(0xEB,0x85,0x8B),
+     o3(0xEB,0x85,0x8C), o3(0xEB,0x85,0x8D),
+     o3(0xEB,0x85,0x8E), o3(0xEB,0x85,0x8F),
+     o3(0xEB,0x85,0x92), o3(0xEB,0x85,0x93),
+     o3(0xEB,0x85,0x96), o3(0xEB,0x85,0x97),
+     o3(0xEB,0x85,0x99), o3(0xEB,0x85,0x9A),
+     o3(0xEB,0x85,0x9B), o3(0xEB,0x85,0x9D),
+     o3(0xEB,0x85,0x9E), o3(0xEB,0x85,0x9F),
+     o3(0xEB,0x85,0xA1), o3(0xEB,0x85,0xA2),
+     o3(0xEB,0x85,0xA3), o3(0xEB,0x85,0xA4),
+     o3(0xEB,0x85,0xA5), o3(0xEB,0x85,0xA6),
+     o3(0xEB,0x85,0xA7), o3(0xEB,0x85,0xA8),
+     o3(0xEB,0x85,0xA9), o3(0xEB,0x85,0xAA),
+     o3(0xEB,0x85,0xAB), o3(0xEB,0x85,0xAC),
+     o3(0xEB,0x85,0xAD), o3(0xEB,0x85,0xAE),
+     o3(0xEB,0x85,0xAF), o3(0xEB,0x85,0xB0),
+     o3(0xEB,0x85,0xB1), o3(0xEB,0x85,0xB2),
+     o3(0xEB,0x85,0xB3), o3(0xEB,0x85,0xB4),
+     o3(0xEB,0x85,0xB5), o3(0xEB,0x85,0xB6),
+     o3(0xEB,0x85,0xB7), o3(0xEB,0x85,0xBA),
+     o3(0xEB,0x85,0xBB), o3(0xEB,0x85,0xBD),
+     o3(0xEB,0x85,0xBE), o3(0xEB,0x85,0xBF),
+     o3(0xEB,0x86,0x81), o3(0xEB,0x86,0x83),
+     o3(0xEB,0x86,0x84), o3(0xEB,0x86,0x85),
+     o3(0xEB,0x86,0x86), o3(0xEB,0x86,0x87),
+     o3(0xEB,0x86,0x8A), o3(0xEB,0x86,0x8C),
+     o3(0xEB,0x86,0x8E), o3(0xEB,0x86,0x8F),
+     o3(0xEB,0x86,0x90), o3(0xEB,0x86,0x91),
+     o3(0xEB,0x86,0x95), o3(0xEB,0x86,0x96),
+     o3(0xEB,0x86,0x97), o3(0xEB,0x86,0x99),
+     o3(0xEB,0x86,0x9A), o3(0xEB,0x86,0x9B),
+     o3(0xEB,0x86,0x9D),
+
+#define from_CP949_86 WORDINDEX2INFO(32684)
+    from_CP949_81_offsets,
+    from_CP949_86_infos,
+
+#define from_CP949_87_infos WORDINDEX2INFO(32686)
+                INVALID, o3(0xEB,0x86,0x9E),
+     o3(0xEB,0x86,0x9F), o3(0xEB,0x86,0xA0),
+     o3(0xEB,0x86,0xA1), o3(0xEB,0x86,0xA2),
+     o3(0xEB,0x86,0xA3), o3(0xEB,0x86,0xA4),
+     o3(0xEB,0x86,0xA5), o3(0xEB,0x86,0xA6),
+     o3(0xEB,0x86,0xA7), o3(0xEB,0x86,0xA9),
+     o3(0xEB,0x86,0xAA), o3(0xEB,0x86,0xAB),
+     o3(0xEB,0x86,0xAC), o3(0xEB,0x86,0xAD),
+     o3(0xEB,0x86,0xAE), o3(0xEB,0x86,0xAF),
+     o3(0xEB,0x86,0xB0), o3(0xEB,0x86,0xB1),
+     o3(0xEB,0x86,0xB2), o3(0xEB,0x86,0xB3),
+     o3(0xEB,0x86,0xB4), o3(0xEB,0x86,0xB5),
+     o3(0xEB,0x86,0xB6), o3(0xEB,0x86,0xB7),
+     o3(0xEB,0x86,0xB8), o3(0xEB,0x86,0xB9),
+     o3(0xEB,0x86,0xBA), o3(0xEB,0x86,0xBB),
+     o3(0xEB,0x86,0xBC), o3(0xEB,0x86,0xBD),
+     o3(0xEB,0x86,0xBE), o3(0xEB,0x86,0xBF),
+     o3(0xEB,0x87,0x80), o3(0xEB,0x87,0x81),
+     o3(0xEB,0x87,0x82), o3(0xEB,0x87,0x83),
+     o3(0xEB,0x87,0x84), o3(0xEB,0x87,0x85),
+     o3(0xEB,0x87,0x86), o3(0xEB,0x87,0x87),
+     o3(0xEB,0x87,0x88), o3(0xEB,0x87,0x89),
+     o3(0xEB,0x87,0x8A), o3(0xEB,0x87,0x8B),
+     o3(0xEB,0x87,0x8D), o3(0xEB,0x87,0x8E),
+     o3(0xEB,0x87,0x8F), o3(0xEB,0x87,0x91),
+     o3(0xEB,0x87,0x92), o3(0xEB,0x87,0x93),
+     o3(0xEB,0x87,0x95), o3(0xEB,0x87,0x96),
+     o3(0xEB,0x87,0x97), o3(0xEB,0x87,0x98),
+     o3(0xEB,0x87,0x99), o3(0xEB,0x87,0x9A),
+     o3(0xEB,0x87,0x9B), o3(0xEB,0x87,0x9E),
+     o3(0xEB,0x87,0xA0), o3(0xEB,0x87,0xA1),
+     o3(0xEB,0x87,0xA2), o3(0xEB,0x87,0xA3),
+     o3(0xEB,0x87,0xA4), o3(0xEB,0x87,0xA5),
+     o3(0xEB,0x87,0xA6), o3(0xEB,0x87,0xA7),
+     o3(0xEB,0x87,0xAA), o3(0xEB,0x87,0xAB),
+     o3(0xEB,0x87,0xAD), o3(0xEB,0x87,0xAE),
+     o3(0xEB,0x87,0xAF), o3(0xEB,0x87,0xB1),
+     o3(0xEB,0x87,0xB2), o3(0xEB,0x87,0xB3),
+     o3(0xEB,0x87,0xB4), o3(0xEB,0x87,0xB5),
+     o3(0xEB,0x87,0xB6), o3(0xEB,0x87,0xB7),
+     o3(0xEB,0x87,0xB8), o3(0xEB,0x87,0xBA),
+     o3(0xEB,0x87,0xBC), o3(0xEB,0x87,0xBE),
+     o3(0xEB,0x87,0xBF), o3(0xEB,0x88,0x80),
+     o3(0xEB,0x88,0x81), o3(0xEB,0x88,0x82),
+     o3(0xEB,0x88,0x83), o3(0xEB,0x88,0x86),
+     o3(0xEB,0x88,0x87), o3(0xEB,0x88,0x89),
+     o3(0xEB,0x88,0x8A), o3(0xEB,0x88,0x8D),
+     o3(0xEB,0x88,0x8E), o3(0xEB,0x88,0x8F),
+     o3(0xEB,0x88,0x90), o3(0xEB,0x88,0x91),
+     o3(0xEB,0x88,0x92), o3(0xEB,0x88,0x93),
+     o3(0xEB,0x88,0x96), o3(0xEB,0x88,0x98),
+     o3(0xEB,0x88,0x9A), o3(0xEB,0x88,0x9B),
+     o3(0xEB,0x88,0x9C), o3(0xEB,0x88,0x9D),
+     o3(0xEB,0x88,0x9E), o3(0xEB,0x88,0x9F),
+     o3(0xEB,0x88,0xA1), o3(0xEB,0x88,0xA2),
+     o3(0xEB,0x88,0xA3), o3(0xEB,0x88,0xA4),
+     o3(0xEB,0x88,0xA5), o3(0xEB,0x88,0xA6),
+     o3(0xEB,0x88,0xA7), o3(0xEB,0x88,0xA8),
+     o3(0xEB,0x88,0xA9), o3(0xEB,0x88,0xAA),
+     o3(0xEB,0x88,0xAB), o3(0xEB,0x88,0xAC),
+     o3(0xEB,0x88,0xAD), o3(0xEB,0x88,0xAE),
+     o3(0xEB,0x88,0xAF), o3(0xEB,0x88,0xB0),
+     o3(0xEB,0x88,0xB1), o3(0xEB,0x88,0xB2),
+     o3(0xEB,0x88,0xB3), o3(0xEB,0x88,0xB5),
+     o3(0xEB,0x88,0xB6), o3(0xEB,0x88,0xB7),
+     o3(0xEB,0x88,0xB8), o3(0xEB,0x88,0xB9),
+     o3(0xEB,0x88,0xBA), o3(0xEB,0x88,0xBB),
+     o3(0xEB,0x88,0xBD), o3(0xEB,0x88,0xBE),
+     o3(0xEB,0x88,0xBF), o3(0xEB,0x89,0x80),
+     o3(0xEB,0x89,0x81), o3(0xEB,0x89,0x82),
+     o3(0xEB,0x89,0x83), o3(0xEB,0x89,0x84),
+     o3(0xEB,0x89,0x85), o3(0xEB,0x89,0x86),
+     o3(0xEB,0x89,0x87), o3(0xEB,0x89,0x88),
+     o3(0xEB,0x89,0x89), o3(0xEB,0x89,0x8A),
+     o3(0xEB,0x89,0x8B), o3(0xEB,0x89,0x8C),
+     o3(0xEB,0x89,0x8D), o3(0xEB,0x89,0x8E),
+     o3(0xEB,0x89,0x8F), o3(0xEB,0x89,0x90),
+     o3(0xEB,0x89,0x91), o3(0xEB,0x89,0x92),
+     o3(0xEB,0x89,0x93), o3(0xEB,0x89,0x94),
+     o3(0xEB,0x89,0x95), o3(0xEB,0x89,0x96),
+     o3(0xEB,0x89,0x97), o3(0xEB,0x89,0x99),
+     o3(0xEB,0x89,0x9A), o3(0xEB,0x89,0x9B),
+     o3(0xEB,0x89,0x9D), o3(0xEB,0x89,0x9E),
+     o3(0xEB,0x89,0x9F), o3(0xEB,0x89,0xA1),
+     o3(0xEB,0x89,0xA2), o3(0xEB,0x89,0xA3),
+     o3(0xEB,0x89,0xA4), o3(0xEB,0x89,0xA5),
+     o3(0xEB,0x89,0xA6), o3(0xEB,0x89,0xA7),
+     o3(0xEB,0x89,0xAA), o3(0xEB,0x89,0xAB),
+     o3(0xEB,0x89,0xAC), o3(0xEB,0x89,0xAD),
+     o3(0xEB,0x89,0xAE),
+
+#define from_CP949_87 WORDINDEX2INFO(32865)
+    from_CP949_81_offsets,
+    from_CP949_87_infos,
+
+#define from_CP949_88_infos WORDINDEX2INFO(32867)
+                INVALID, o3(0xEB,0x89,0xAF),
+     o3(0xEB,0x89,0xB0), o3(0xEB,0x89,0xB1),
+     o3(0xEB,0x89,0xB2), o3(0xEB,0x89,0xB3),
+     o3(0xEB,0x89,0xB6), o3(0xEB,0x89,0xB7),
+     o3(0xEB,0x89,0xB8), o3(0xEB,0x89,0xB9),
+     o3(0xEB,0x89,0xBA), o3(0xEB,0x89,0xBB),
+     o3(0xEB,0x89,0xBD), o3(0xEB,0x89,0xBE),
+     o3(0xEB,0x89,0xBF), o3(0xEB,0x8A,0x80),
+     o3(0xEB,0x8A,0x81), o3(0xEB,0x8A,0x82),
+     o3(0xEB,0x8A,0x83), o3(0xEB,0x8A,0x86),
+     o3(0xEB,0x8A,0x87), o3(0xEB,0x8A,0x88),
+     o3(0xEB,0x8A,0x8A), o3(0xEB,0x8A,0x8B),
+     o3(0xEB,0x8A,0x8C), o3(0xEB,0x8A,0x8D),
+     o3(0xEB,0x8A,0x8E), o3(0xEB,0x8A,0x8F),
+     o3(0xEB,0x8A,0x92), o3(0xEB,0x8A,0x93),
+     o3(0xEB,0x8A,0x95), o3(0xEB,0x8A,0x96),
+     o3(0xEB,0x8A,0x97), o3(0xEB,0x8A,0x9B),
+     o3(0xEB,0x8A,0x9C), o3(0xEB,0x8A,0x9D),
+     o3(0xEB,0x8A,0x9E), o3(0xEB,0x8A,0x9F),
+     o3(0xEB,0x8A,0xA2), o3(0xEB,0x8A,0xA4),
+     o3(0xEB,0x8A,0xA7), o3(0xEB,0x8A,0xA8),
+     o3(0xEB,0x8A,0xA9), o3(0xEB,0x8A,0xAB),
+     o3(0xEB,0x8A,0xAD), o3(0xEB,0x8A,0xAE),
+     o3(0xEB,0x8A,0xAF), o3(0xEB,0x8A,0xB1),
+     o3(0xEB,0x8A,0xB2), o3(0xEB,0x8A,0xB3),
+     o3(0xEB,0x8A,0xB5), o3(0xEB,0x8A,0xB6),
+     o3(0xEB,0x8A,0xB7), o3(0xEB,0x8A,0xB8),
+     o3(0xEB,0x8A,0xB9), o3(0xEB,0x8A,0xBA),
+     o3(0xEB,0x8A,0xBB), o3(0xEB,0x8A,0xBC),
+     o3(0xEB,0x8A,0xBD), o3(0xEB,0x8A,0xBE),
+     o3(0xEB,0x8A,0xBF), o3(0xEB,0x8B,0x80),
+     o3(0xEB,0x8B,0x81), o3(0xEB,0x8B,0x82),
+     o3(0xEB,0x8B,0x83), o3(0xEB,0x8B,0x84),
+     o3(0xEB,0x8B,0x85), o3(0xEB,0x8B,0x86),
+     o3(0xEB,0x8B,0x87), o3(0xEB,0x8B,0x8A),
+     o3(0xEB,0x8B,0x8B), o3(0xEB,0x8B,0x8D),
+     o3(0xEB,0x8B,0x8E), o3(0xEB,0x8B,0x8F),
+     o3(0xEB,0x8B,0x91), o3(0xEB,0x8B,0x93),
+     o3(0xEB,0x8B,0x94), o3(0xEB,0x8B,0x95),
+     o3(0xEB,0x8B,0x96), o3(0xEB,0x8B,0x97),
+     o3(0xEB,0x8B,0x9A), o3(0xEB,0x8B,0x9C),
+     o3(0xEB,0x8B,0x9E), o3(0xEB,0x8B,0x9F),
+     o3(0xEB,0x8B,0xA0), o3(0xEB,0x8B,0xA1),
+     o3(0xEB,0x8B,0xA3), o3(0xEB,0x8B,0xA7),
+     o3(0xEB,0x8B,0xA9), o3(0xEB,0x8B,0xAA),
+     o3(0xEB,0x8B,0xB0), o3(0xEB,0x8B,0xB1),
+     o3(0xEB,0x8B,0xB2), o3(0xEB,0x8B,0xB6),
+     o3(0xEB,0x8B,0xBC), o3(0xEB,0x8B,0xBD),
+     o3(0xEB,0x8B,0xBE), o3(0xEB,0x8C,0x82),
+     o3(0xEB,0x8C,0x83), o3(0xEB,0x8C,0x85),
+     o3(0xEB,0x8C,0x86), o3(0xEB,0x8C,0x87),
+     o3(0xEB,0x8C,0x89), o3(0xEB,0x8C,0x8A),
+     o3(0xEB,0x8C,0x8B), o3(0xEB,0x8C,0x8C),
+     o3(0xEB,0x8C,0x8D), o3(0xEB,0x8C,0x8E),
+     o3(0xEB,0x8C,0x8F), o3(0xEB,0x8C,0x92),
+     o3(0xEB,0x8C,0x96), o3(0xEB,0x8C,0x97),
+     o3(0xEB,0x8C,0x98), o3(0xEB,0x8C,0x99),
+     o3(0xEB,0x8C,0x9A), o3(0xEB,0x8C,0x9B),
+     o3(0xEB,0x8C,0x9D), o3(0xEB,0x8C,0x9E),
+     o3(0xEB,0x8C,0x9F), o3(0xEB,0x8C,0xA0),
+     o3(0xEB,0x8C,0xA1), o3(0xEB,0x8C,0xA2),
+     o3(0xEB,0x8C,0xA3), o3(0xEB,0x8C,0xA4),
+     o3(0xEB,0x8C,0xA5), o3(0xEB,0x8C,0xA6),
+     o3(0xEB,0x8C,0xA7), o3(0xEB,0x8C,0xA8),
+     o3(0xEB,0x8C,0xA9), o3(0xEB,0x8C,0xAA),
+     o3(0xEB,0x8C,0xAB), o3(0xEB,0x8C,0xAC),
+     o3(0xEB,0x8C,0xAD), o3(0xEB,0x8C,0xAE),
+     o3(0xEB,0x8C,0xAF), o3(0xEB,0x8C,0xB0),
+     o3(0xEB,0x8C,0xB1), o3(0xEB,0x8C,0xB2),
+     o3(0xEB,0x8C,0xB3), o3(0xEB,0x8C,0xB4),
+     o3(0xEB,0x8C,0xB5), o3(0xEB,0x8C,0xB6),
+     o3(0xEB,0x8C,0xB7), o3(0xEB,0x8C,0xB8),
+     o3(0xEB,0x8C,0xB9), o3(0xEB,0x8C,0xBA),
+     o3(0xEB,0x8C,0xBB), o3(0xEB,0x8C,0xBC),
+     o3(0xEB,0x8C,0xBD), o3(0xEB,0x8C,0xBE),
+     o3(0xEB,0x8C,0xBF), o3(0xEB,0x8D,0x80),
+     o3(0xEB,0x8D,0x81), o3(0xEB,0x8D,0x82),
+     o3(0xEB,0x8D,0x83), o3(0xEB,0x8D,0x84),
+     o3(0xEB,0x8D,0x85), o3(0xEB,0x8D,0x86),
+     o3(0xEB,0x8D,0x87), o3(0xEB,0x8D,0x88),
+     o3(0xEB,0x8D,0x89), o3(0xEB,0x8D,0x8A),
+     o3(0xEB,0x8D,0x8B), o3(0xEB,0x8D,0x8C),
+     o3(0xEB,0x8D,0x8D), o3(0xEB,0x8D,0x8E),
+     o3(0xEB,0x8D,0x8F), o3(0xEB,0x8D,0x90),
+     o3(0xEB,0x8D,0x91), o3(0xEB,0x8D,0x92),
+     o3(0xEB,0x8D,0x93), o3(0xEB,0x8D,0x97),
+     o3(0xEB,0x8D,0x99), o3(0xEB,0x8D,0x9A),
+     o3(0xEB,0x8D,0x9D), o3(0xEB,0x8D,0xA0),
+     o3(0xEB,0x8D,0xA1), o3(0xEB,0x8D,0xA2),
+     o3(0xEB,0x8D,0xA3),
+
+#define from_CP949_88 WORDINDEX2INFO(33046)
+    from_CP949_81_offsets,
+    from_CP949_88_infos,
+
+#define from_CP949_89_infos WORDINDEX2INFO(33048)
+                INVALID, o3(0xEB,0x8D,0xA6),
+     o3(0xEB,0x8D,0xA8), o3(0xEB,0x8D,0xAA),
+     o3(0xEB,0x8D,0xAC), o3(0xEB,0x8D,0xAD),
+     o3(0xEB,0x8D,0xAF), o3(0xEB,0x8D,0xB2),
+     o3(0xEB,0x8D,0xB3), o3(0xEB,0x8D,0xB5),
+     o3(0xEB,0x8D,0xB6), o3(0xEB,0x8D,0xB7),
+     o3(0xEB,0x8D,0xB9), o3(0xEB,0x8D,0xBA),
+     o3(0xEB,0x8D,0xBB), o3(0xEB,0x8D,0xBC),
+     o3(0xEB,0x8D,0xBD), o3(0xEB,0x8D,0xBE),
+     o3(0xEB,0x8D,0xBF), o3(0xEB,0x8E,0x82),
+     o3(0xEB,0x8E,0x86), o3(0xEB,0x8E,0x87),
+     o3(0xEB,0x8E,0x88), o3(0xEB,0x8E,0x89),
+     o3(0xEB,0x8E,0x8A), o3(0xEB,0x8E,0x8B),
+     o3(0xEB,0x8E,0x8D), o3(0xEB,0x8E,0x8E),
+     o3(0xEB,0x8E,0x8F), o3(0xEB,0x8E,0x91),
+     o3(0xEB,0x8E,0x92), o3(0xEB,0x8E,0x93),
+     o3(0xEB,0x8E,0x95), o3(0xEB,0x8E,0x96),
+     o3(0xEB,0x8E,0x97), o3(0xEB,0x8E,0x98),
+     o3(0xEB,0x8E,0x99), o3(0xEB,0x8E,0x9A),
+     o3(0xEB,0x8E,0x9B), o3(0xEB,0x8E,0x9C),
+     o3(0xEB,0x8E,0x9D), o3(0xEB,0x8E,0x9E),
+     o3(0xEB,0x8E,0x9F), o3(0xEB,0x8E,0xA2),
+     o3(0xEB,0x8E,0xA3), o3(0xEB,0x8E,0xA4),
+     o3(0xEB,0x8E,0xA5), o3(0xEB,0x8E,0xA6),
+     o3(0xEB,0x8E,0xA7), o3(0xEB,0x8E,0xA9),
+     o3(0xEB,0x8E,0xAA), o3(0xEB,0x8E,0xAB),
+     o3(0xEB,0x8E,0xAD), o3(0xEB,0x8E,0xAE),
+     o3(0xEB,0x8E,0xAF), o3(0xEB,0x8E,0xB0),
+     o3(0xEB,0x8E,0xB1), o3(0xEB,0x8E,0xB2),
+     o3(0xEB,0x8E,0xB3), o3(0xEB,0x8E,0xB4),
+     o3(0xEB,0x8E,0xB5), o3(0xEB,0x8E,0xB6),
+     o3(0xEB,0x8E,0xB7), o3(0xEB,0x8E,0xB8),
+     o3(0xEB,0x8E,0xB9), o3(0xEB,0x8E,0xBA),
+     o3(0xEB,0x8E,0xBB), o3(0xEB,0x8E,0xBC),
+     o3(0xEB,0x8E,0xBD), o3(0xEB,0x8E,0xBE),
+     o3(0xEB,0x8E,0xBF), o3(0xEB,0x8F,0x80),
+     o3(0xEB,0x8F,0x81), o3(0xEB,0x8F,0x82),
+     o3(0xEB,0x8F,0x83), o3(0xEB,0x8F,0x86),
+     o3(0xEB,0x8F,0x87), o3(0xEB,0x8F,0x89),
+     o3(0xEB,0x8F,0x8A), o3(0xEB,0x8F,0x8D),
+     o3(0xEB,0x8F,0x8F), o3(0xEB,0x8F,0x91),
+     o3(0xEB,0x8F,0x92), o3(0xEB,0x8F,0x93),
+     o3(0xEB,0x8F,0x96), o3(0xEB,0x8F,0x98),
+     o3(0xEB,0x8F,0x9A), o3(0xEB,0x8F,0x9C),
+     o3(0xEB,0x8F,0x9E), o3(0xEB,0x8F,0x9F),
+     o3(0xEB,0x8F,0xA1), o3(0xEB,0x8F,0xA2),
+     o3(0xEB,0x8F,0xA3), o3(0xEB,0x8F,0xA5),
+     o3(0xEB,0x8F,0xA6), o3(0xEB,0x8F,0xA7),
+     o3(0xEB,0x8F,0xA9), o3(0xEB,0x8F,0xAA),
+     o3(0xEB,0x8F,0xAB), o3(0xEB,0x8F,0xAC),
+     o3(0xEB,0x8F,0xAD), o3(0xEB,0x8F,0xAE),
+     o3(0xEB,0x8F,0xAF), o3(0xEB,0x8F,0xB0),
+     o3(0xEB,0x8F,0xB1), o3(0xEB,0x8F,0xB2),
+     o3(0xEB,0x8F,0xB3), o3(0xEB,0x8F,0xB4),
+     o3(0xEB,0x8F,0xB5), o3(0xEB,0x8F,0xB6),
+     o3(0xEB,0x8F,0xB7), o3(0xEB,0x8F,0xB8),
+     o3(0xEB,0x8F,0xB9), o3(0xEB,0x8F,0xBA),
+     o3(0xEB,0x8F,0xBB), o3(0xEB,0x8F,0xBD),
+     o3(0xEB,0x8F,0xBE), o3(0xEB,0x8F,0xBF),
+     o3(0xEB,0x90,0x80), o3(0xEB,0x90,0x81),
+     o3(0xEB,0x90,0x82), o3(0xEB,0x90,0x83),
+     o3(0xEB,0x90,0x84), o3(0xEB,0x90,0x85),
+     o3(0xEB,0x90,0x86), o3(0xEB,0x90,0x87),
+     o3(0xEB,0x90,0x88), o3(0xEB,0x90,0x89),
+     o3(0xEB,0x90,0x8A), o3(0xEB,0x90,0x8B),
+     o3(0xEB,0x90,0x8C), o3(0xEB,0x90,0x8D),
+     o3(0xEB,0x90,0x8E), o3(0xEB,0x90,0x8F),
+     o3(0xEB,0x90,0x91), o3(0xEB,0x90,0x92),
+     o3(0xEB,0x90,0x93), o3(0xEB,0x90,0x94),
+     o3(0xEB,0x90,0x95), o3(0xEB,0x90,0x96),
+     o3(0xEB,0x90,0x97), o3(0xEB,0x90,0x99),
+     o3(0xEB,0x90,0x9A), o3(0xEB,0x90,0x9B),
+     o3(0xEB,0x90,0x9D), o3(0xEB,0x90,0x9E),
+     o3(0xEB,0x90,0x9F), o3(0xEB,0x90,0xA1),
+     o3(0xEB,0x90,0xA2), o3(0xEB,0x90,0xA3),
+     o3(0xEB,0x90,0xA4), o3(0xEB,0x90,0xA5),
+     o3(0xEB,0x90,0xA6), o3(0xEB,0x90,0xA7),
+     o3(0xEB,0x90,0xAA), o3(0xEB,0x90,0xAC),
+     o3(0xEB,0x90,0xAD), o3(0xEB,0x90,0xAE),
+     o3(0xEB,0x90,0xAF), o3(0xEB,0x90,0xB0),
+     o3(0xEB,0x90,0xB1), o3(0xEB,0x90,0xB2),
+     o3(0xEB,0x90,0xB3), o3(0xEB,0x90,0xB5),
+     o3(0xEB,0x90,0xB6), o3(0xEB,0x90,0xB7),
+     o3(0xEB,0x90,0xB8), o3(0xEB,0x90,0xB9),
+     o3(0xEB,0x90,0xBA), o3(0xEB,0x90,0xBB),
+     o3(0xEB,0x90,0xBC), o3(0xEB,0x90,0xBD),
+     o3(0xEB,0x90,0xBE), o3(0xEB,0x90,0xBF),
+     o3(0xEB,0x91,0x80), o3(0xEB,0x91,0x81),
+     o3(0xEB,0x91,0x82), o3(0xEB,0x91,0x83),
+     o3(0xEB,0x91,0x84),
+
+#define from_CP949_89 WORDINDEX2INFO(33227)
+    from_CP949_81_offsets,
+    from_CP949_89_infos,
+
+#define from_CP949_8A_infos WORDINDEX2INFO(33229)
+                INVALID, o3(0xEB,0x91,0x85),
+     o3(0xEB,0x91,0x86), o3(0xEB,0x91,0x87),
+     o3(0xEB,0x91,0x88), o3(0xEB,0x91,0x89),
+     o3(0xEB,0x91,0x8A), o3(0xEB,0x91,0x8B),
+     o3(0xEB,0x91,0x8C), o3(0xEB,0x91,0x8D),
+     o3(0xEB,0x91,0x8E), o3(0xEB,0x91,0x8F),
+     o3(0xEB,0x91,0x92), o3(0xEB,0x91,0x93),
+     o3(0xEB,0x91,0x95), o3(0xEB,0x91,0x96),
+     o3(0xEB,0x91,0x97), o3(0xEB,0x91,0x99),
+     o3(0xEB,0x91,0x9A), o3(0xEB,0x91,0x9B),
+     o3(0xEB,0x91,0x9C), o3(0xEB,0x91,0x9D),
+     o3(0xEB,0x91,0x9E), o3(0xEB,0x91,0x9F),
+     o3(0xEB,0x91,0xA2), o3(0xEB,0x91,0xA4),
+     o3(0xEB,0x91,0xA6), o3(0xEB,0x91,0xA7),
+     o3(0xEB,0x91,0xA8), o3(0xEB,0x91,0xA9),
+     o3(0xEB,0x91,0xAA), o3(0xEB,0x91,0xAB),
+     o3(0xEB,0x91,0xAD), o3(0xEB,0x91,0xAE),
+     o3(0xEB,0x91,0xAF), o3(0xEB,0x91,0xB0),
+     o3(0xEB,0x91,0xB1), o3(0xEB,0x91,0xB2),
+     o3(0xEB,0x91,0xB3), o3(0xEB,0x91,0xB4),
+     o3(0xEB,0x91,0xB5), o3(0xEB,0x91,0xB6),
+     o3(0xEB,0x91,0xB7), o3(0xEB,0x91,0xB8),
+     o3(0xEB,0x91,0xB9), o3(0xEB,0x91,0xBA),
+     o3(0xEB,0x91,0xBB), o3(0xEB,0x91,0xBC),
+     o3(0xEB,0x91,0xBD), o3(0xEB,0x91,0xBE),
+     o3(0xEB,0x91,0xBF), o3(0xEB,0x92,0x81),
+     o3(0xEB,0x92,0x82), o3(0xEB,0x92,0x83),
+     o3(0xEB,0x92,0x84), o3(0xEB,0x92,0x85),
+     o3(0xEB,0x92,0x86), o3(0xEB,0x92,0x87),
+     o3(0xEB,0x92,0x89), o3(0xEB,0x92,0x8A),
+     o3(0xEB,0x92,0x8B), o3(0xEB,0x92,0x8C),
+     o3(0xEB,0x92,0x8D), o3(0xEB,0x92,0x8E),
+     o3(0xEB,0x92,0x8F), o3(0xEB,0x92,0x90),
+     o3(0xEB,0x92,0x91), o3(0xEB,0x92,0x92),
+     o3(0xEB,0x92,0x93), o3(0xEB,0x92,0x94),
+     o3(0xEB,0x92,0x95), o3(0xEB,0x92,0x96),
+     o3(0xEB,0x92,0x97), o3(0xEB,0x92,0x98),
+     o3(0xEB,0x92,0x99), o3(0xEB,0x92,0x9A),
+     o3(0xEB,0x92,0x9B), o3(0xEB,0x92,0x9C),
+     o3(0xEB,0x92,0x9E), o3(0xEB,0x92,0x9F),
+     o3(0xEB,0x92,0xA0), o3(0xEB,0x92,0xA1),
+     o3(0xEB,0x92,0xA2), o3(0xEB,0x92,0xA3),
+     o3(0xEB,0x92,0xA5), o3(0xEB,0x92,0xA6),
+     o3(0xEB,0x92,0xA7), o3(0xEB,0x92,0xA9),
+     o3(0xEB,0x92,0xAA), o3(0xEB,0x92,0xAB),
+     o3(0xEB,0x92,0xAD), o3(0xEB,0x92,0xAE),
+     o3(0xEB,0x92,0xAF), o3(0xEB,0x92,0xB0),
+     o3(0xEB,0x92,0xB1), o3(0xEB,0x92,0xB2),
+     o3(0xEB,0x92,0xB3), o3(0xEB,0x92,0xB4),
+     o3(0xEB,0x92,0xB6), o3(0xEB,0x92,0xB8),
+     o3(0xEB,0x92,0xBA), o3(0xEB,0x92,0xBB),
+     o3(0xEB,0x92,0xBC), o3(0xEB,0x92,0xBD),
+     o3(0xEB,0x92,0xBE), o3(0xEB,0x92,0xBF),
+     o3(0xEB,0x93,0x81), o3(0xEB,0x93,0x82),
+     o3(0xEB,0x93,0x83), o3(0xEB,0x93,0x85),
+     o3(0xEB,0x93,0x86), o3(0xEB,0x93,0x87),
+     o3(0xEB,0x93,0x89), o3(0xEB,0x93,0x8A),
+     o3(0xEB,0x93,0x8B), o3(0xEB,0x93,0x8C),
+     o3(0xEB,0x93,0x8D), o3(0xEB,0x93,0x8E),
+     o3(0xEB,0x93,0x8F), o3(0xEB,0x93,0x91),
+     o3(0xEB,0x93,0x92), o3(0xEB,0x93,0x93),
+     o3(0xEB,0x93,0x94), o3(0xEB,0x93,0x96),
+     o3(0xEB,0x93,0x97), o3(0xEB,0x93,0x98),
+     o3(0xEB,0x93,0x99), o3(0xEB,0x93,0x9A),
+     o3(0xEB,0x93,0x9B), o3(0xEB,0x93,0x9E),
+     o3(0xEB,0x93,0x9F), o3(0xEB,0x93,0xA1),
+     o3(0xEB,0x93,0xA2), o3(0xEB,0x93,0xA5),
+     o3(0xEB,0x93,0xA7), o3(0xEB,0x93,0xA8),
+     o3(0xEB,0x93,0xA9), o3(0xEB,0x93,0xAA),
+     o3(0xEB,0x93,0xAB), o3(0xEB,0x93,0xAE),
+     o3(0xEB,0x93,0xB0), o3(0xEB,0x93,0xB2),
+     o3(0xEB,0x93,0xB3), o3(0xEB,0x93,0xB4),
+     o3(0xEB,0x93,0xB5), o3(0xEB,0x93,0xB6),
+     o3(0xEB,0x93,0xB7), o3(0xEB,0x93,0xB9),
+     o3(0xEB,0x93,0xBA), o3(0xEB,0x93,0xBB),
+     o3(0xEB,0x93,0xBC), o3(0xEB,0x93,0xBD),
+     o3(0xEB,0x93,0xBE), o3(0xEB,0x93,0xBF),
+     o3(0xEB,0x94,0x80), o3(0xEB,0x94,0x81),
+     o3(0xEB,0x94,0x82), o3(0xEB,0x94,0x83),
+     o3(0xEB,0x94,0x84), o3(0xEB,0x94,0x85),
+     o3(0xEB,0x94,0x86), o3(0xEB,0x94,0x87),
+     o3(0xEB,0x94,0x88), o3(0xEB,0x94,0x89),
+     o3(0xEB,0x94,0x8A), o3(0xEB,0x94,0x8B),
+     o3(0xEB,0x94,0x8C), o3(0xEB,0x94,0x8D),
+     o3(0xEB,0x94,0x8E), o3(0xEB,0x94,0x8F),
+     o3(0xEB,0x94,0x90), o3(0xEB,0x94,0x91),
+     o3(0xEB,0x94,0x92), o3(0xEB,0x94,0x93),
+     o3(0xEB,0x94,0x96), o3(0xEB,0x94,0x97),
+     o3(0xEB,0x94,0x99), o3(0xEB,0x94,0x9A),
+     o3(0xEB,0x94,0x9D),
+
+#define from_CP949_8A WORDINDEX2INFO(33408)
+    from_CP949_81_offsets,
+    from_CP949_8A_infos,
+
+#define from_CP949_8B_infos WORDINDEX2INFO(33410)
+                INVALID, o3(0xEB,0x94,0x9E),
+     o3(0xEB,0x94,0x9F), o3(0xEB,0x94,0xA0),
+     o3(0xEB,0x94,0xA1), o3(0xEB,0x94,0xA2),
+     o3(0xEB,0x94,0xA3), o3(0xEB,0x94,0xA6),
+     o3(0xEB,0x94,0xAB), o3(0xEB,0x94,0xAC),
+     o3(0xEB,0x94,0xAD), o3(0xEB,0x94,0xAE),
+     o3(0xEB,0x94,0xAF), o3(0xEB,0x94,0xB2),
+     o3(0xEB,0x94,0xB3), o3(0xEB,0x94,0xB5),
+     o3(0xEB,0x94,0xB6), o3(0xEB,0x94,0xB7),
+     o3(0xEB,0x94,0xB9), o3(0xEB,0x94,0xBA),
+     o3(0xEB,0x94,0xBB), o3(0xEB,0x94,0xBC),
+     o3(0xEB,0x94,0xBD), o3(0xEB,0x94,0xBE),
+     o3(0xEB,0x94,0xBF), o3(0xEB,0x95,0x82),
+     o3(0xEB,0x95,0x86), o3(0xEB,0x95,0x87),
+     o3(0xEB,0x95,0x88), o3(0xEB,0x95,0x89),
+     o3(0xEB,0x95,0x8A), o3(0xEB,0x95,0x8E),
+     o3(0xEB,0x95,0x8F), o3(0xEB,0x95,0x91),
+     o3(0xEB,0x95,0x92), o3(0xEB,0x95,0x93),
+     o3(0xEB,0x95,0x95), o3(0xEB,0x95,0x96),
+     o3(0xEB,0x95,0x97), o3(0xEB,0x95,0x98),
+     o3(0xEB,0x95,0x99), o3(0xEB,0x95,0x9A),
+     o3(0xEB,0x95,0x9B), o3(0xEB,0x95,0x9E),
+     o3(0xEB,0x95,0xA2), o3(0xEB,0x95,0xA3),
+     o3(0xEB,0x95,0xA4), o3(0xEB,0x95,0xA5),
+     o3(0xEB,0x95,0xA6), o3(0xEB,0x95,0xA7),
+     o3(0xEB,0x95,0xA8), o3(0xEB,0x95,0xA9),
+     o3(0xEB,0x95,0xAA), o3(0xEB,0x95,0xAB),
+     o3(0xEB,0x95,0xAC), o3(0xEB,0x95,0xAD),
+     o3(0xEB,0x95,0xAE), o3(0xEB,0x95,0xAF),
+     o3(0xEB,0x95,0xB0), o3(0xEB,0x95,0xB1),
+     o3(0xEB,0x95,0xB2), o3(0xEB,0x95,0xB3),
+     o3(0xEB,0x95,0xB4), o3(0xEB,0x95,0xB5),
+     o3(0xEB,0x95,0xB6), o3(0xEB,0x95,0xB7),
+     o3(0xEB,0x95,0xB8), o3(0xEB,0x95,0xB9),
+     o3(0xEB,0x95,0xBA), o3(0xEB,0x95,0xBB),
+     o3(0xEB,0x95,0xBC), o3(0xEB,0x95,0xBD),
+     o3(0xEB,0x95,0xBE), o3(0xEB,0x95,0xBF),
+     o3(0xEB,0x96,0x80), o3(0xEB,0x96,0x81),
+     o3(0xEB,0x96,0x82), o3(0xEB,0x96,0x83),
+     o3(0xEB,0x96,0x84), o3(0xEB,0x96,0x85),
+     o3(0xEB,0x96,0x86), o3(0xEB,0x96,0x87),
+     o3(0xEB,0x96,0x88), o3(0xEB,0x96,0x89),
+     o3(0xEB,0x96,0x8A), o3(0xEB,0x96,0x8B),
+     o3(0xEB,0x96,0x8C), o3(0xEB,0x96,0x8D),
+     o3(0xEB,0x96,0x8E), o3(0xEB,0x96,0x8F),
+     o3(0xEB,0x96,0x90), o3(0xEB,0x96,0x91),
+     o3(0xEB,0x96,0x92), o3(0xEB,0x96,0x93),
+     o3(0xEB,0x96,0x94), o3(0xEB,0x96,0x95),
+     o3(0xEB,0x96,0x96), o3(0xEB,0x96,0x97),
+     o3(0xEB,0x96,0x98), o3(0xEB,0x96,0x99),
+     o3(0xEB,0x96,0x9A), o3(0xEB,0x96,0x9B),
+     o3(0xEB,0x96,0x9C), o3(0xEB,0x96,0x9D),
+     o3(0xEB,0x96,0x9E), o3(0xEB,0x96,0x9F),
+     o3(0xEB,0x96,0xA2), o3(0xEB,0x96,0xA3),
+     o3(0xEB,0x96,0xA5), o3(0xEB,0x96,0xA6),
+     o3(0xEB,0x96,0xA7), o3(0xEB,0x96,0xA9),
+     o3(0xEB,0x96,0xAC), o3(0xEB,0x96,0xAD),
+     o3(0xEB,0x96,0xAE), o3(0xEB,0x96,0xAF),
+     o3(0xEB,0x96,0xB2), o3(0xEB,0x96,0xB6),
+     o3(0xEB,0x96,0xB7), o3(0xEB,0x96,0xB8),
+     o3(0xEB,0x96,0xB9), o3(0xEB,0x96,0xBA),
+     o3(0xEB,0x96,0xBE), o3(0xEB,0x96,0xBF),
+     o3(0xEB,0x97,0x81), o3(0xEB,0x97,0x82),
+     o3(0xEB,0x97,0x83), o3(0xEB,0x97,0x85),
+     o3(0xEB,0x97,0x86), o3(0xEB,0x97,0x87),
+     o3(0xEB,0x97,0x88), o3(0xEB,0x97,0x89),
+     o3(0xEB,0x97,0x8A), o3(0xEB,0x97,0x8B),
+     o3(0xEB,0x97,0x8E), o3(0xEB,0x97,0x92),
+     o3(0xEB,0x97,0x93), o3(0xEB,0x97,0x94),
+     o3(0xEB,0x97,0x95), o3(0xEB,0x97,0x96),
+     o3(0xEB,0x97,0x97), o3(0xEB,0x97,0x99),
+     o3(0xEB,0x97,0x9A), o3(0xEB,0x97,0x9B),
+     o3(0xEB,0x97,0x9C), o3(0xEB,0x97,0x9D),
+     o3(0xEB,0x97,0x9E), o3(0xEB,0x97,0x9F),
+     o3(0xEB,0x97,0xA0), o3(0xEB,0x97,0xA1),
+     o3(0xEB,0x97,0xA2), o3(0xEB,0x97,0xA3),
+     o3(0xEB,0x97,0xA4), o3(0xEB,0x97,0xA5),
+     o3(0xEB,0x97,0xA6), o3(0xEB,0x97,0xA7),
+     o3(0xEB,0x97,0xA8), o3(0xEB,0x97,0xA9),
+     o3(0xEB,0x97,0xAA), o3(0xEB,0x97,0xAB),
+     o3(0xEB,0x97,0xAD), o3(0xEB,0x97,0xAE),
+     o3(0xEB,0x97,0xAF), o3(0xEB,0x97,0xB0),
+     o3(0xEB,0x97,0xB1), o3(0xEB,0x97,0xB2),
+     o3(0xEB,0x97,0xB3), o3(0xEB,0x97,0xB4),
+     o3(0xEB,0x97,0xB5), o3(0xEB,0x97,0xB6),
+     o3(0xEB,0x97,0xB7), o3(0xEB,0x97,0xB8),
+     o3(0xEB,0x97,0xB9), o3(0xEB,0x97,0xBA),
+     o3(0xEB,0x97,0xBB), o3(0xEB,0x97,0xBC),
+     o3(0xEB,0x97,0xBD), o3(0xEB,0x97,0xBE),
+     o3(0xEB,0x97,0xBF),
+
+#define from_CP949_8B WORDINDEX2INFO(33589)
+    from_CP949_81_offsets,
+    from_CP949_8B_infos,
+
+#define from_CP949_8C_infos WORDINDEX2INFO(33591)
+                INVALID, o3(0xEB,0x98,0x80),
+     o3(0xEB,0x98,0x81), o3(0xEB,0x98,0x82),
+     o3(0xEB,0x98,0x83), o3(0xEB,0x98,0x84),
+     o3(0xEB,0x98,0x85), o3(0xEB,0x98,0x86),
+     o3(0xEB,0x98,0x87), o3(0xEB,0x98,0x88),
+     o3(0xEB,0x98,0x89), o3(0xEB,0x98,0x8A),
+     o3(0xEB,0x98,0x8B), o3(0xEB,0x98,0x8C),
+     o3(0xEB,0x98,0x8D), o3(0xEB,0x98,0x8E),
+     o3(0xEB,0x98,0x8F), o3(0xEB,0x98,0x92),
+     o3(0xEB,0x98,0x93), o3(0xEB,0x98,0x95),
+     o3(0xEB,0x98,0x96), o3(0xEB,0x98,0x97),
+     o3(0xEB,0x98,0x99), o3(0xEB,0x98,0x9A),
+     o3(0xEB,0x98,0x9B), o3(0xEB,0x98,0x9C),
+     o3(0xEB,0x98,0x9D), o3(0xEB,0x98,0x9E),
+     o3(0xEB,0x98,0x9F), o3(0xEB,0x98,0xA0),
+     o3(0xEB,0x98,0xA1), o3(0xEB,0x98,0xA2),
+     o3(0xEB,0x98,0xA3), o3(0xEB,0x98,0xA4),
+     o3(0xEB,0x98,0xA6), o3(0xEB,0x98,0xA7),
+     o3(0xEB,0x98,0xA8), o3(0xEB,0x98,0xA9),
+     o3(0xEB,0x98,0xAA), o3(0xEB,0x98,0xAB),
+     o3(0xEB,0x98,0xAD), o3(0xEB,0x98,0xAE),
+     o3(0xEB,0x98,0xAF), o3(0xEB,0x98,0xB0),
+     o3(0xEB,0x98,0xB1), o3(0xEB,0x98,0xB2),
+     o3(0xEB,0x98,0xB3), o3(0xEB,0x98,0xB5),
+     o3(0xEB,0x98,0xB6), o3(0xEB,0x98,0xB7),
+     o3(0xEB,0x98,0xB8), o3(0xEB,0x98,0xB9),
+     o3(0xEB,0x98,0xBA), o3(0xEB,0x98,0xBB),
+     o3(0xEB,0x98,0xBC), o3(0xEB,0x98,0xBD),
+     o3(0xEB,0x98,0xBE), o3(0xEB,0x98,0xBF),
+     o3(0xEB,0x99,0x80), o3(0xEB,0x99,0x81),
+     o3(0xEB,0x99,0x82), o3(0xEB,0x99,0x83),
+     o3(0xEB,0x99,0x84), o3(0xEB,0x99,0x85),
+     o3(0xEB,0x99,0x86), o3(0xEB,0x99,0x87),
+     o3(0xEB,0x99,0x89), o3(0xEB,0x99,0x8A),
+     o3(0xEB,0x99,0x8B), o3(0xEB,0x99,0x8C),
+     o3(0xEB,0x99,0x8D), o3(0xEB,0x99,0x8E),
+     o3(0xEB,0x99,0x8F), o3(0xEB,0x99,0x90),
+     o3(0xEB,0x99,0x91), o3(0xEB,0x99,0x92),
+     o3(0xEB,0x99,0x93), o3(0xEB,0x99,0x94),
+     o3(0xEB,0x99,0x95), o3(0xEB,0x99,0x96),
+     o3(0xEB,0x99,0x97), o3(0xEB,0x99,0x98),
+     o3(0xEB,0x99,0x99), o3(0xEB,0x99,0x9A),
+     o3(0xEB,0x99,0x9B), o3(0xEB,0x99,0x9C),
+     o3(0xEB,0x99,0x9D), o3(0xEB,0x99,0x9E),
+     o3(0xEB,0x99,0x9F), o3(0xEB,0x99,0xA0),
+     o3(0xEB,0x99,0xA1), o3(0xEB,0x99,0xA2),
+     o3(0xEB,0x99,0xA3), o3(0xEB,0x99,0xA5),
+     o3(0xEB,0x99,0xA6), o3(0xEB,0x99,0xA7),
+     o3(0xEB,0x99,0xA9), o3(0xEB,0x99,0xAA),
+     o3(0xEB,0x99,0xAB), o3(0xEB,0x99,0xAC),
+     o3(0xEB,0x99,0xAD), o3(0xEB,0x99,0xAE),
+     o3(0xEB,0x99,0xAF), o3(0xEB,0x99,0xB0),
+     o3(0xEB,0x99,0xB1), o3(0xEB,0x99,0xB2),
+     o3(0xEB,0x99,0xB3), o3(0xEB,0x99,0xB4),
+     o3(0xEB,0x99,0xB5), o3(0xEB,0x99,0xB6),
+     o3(0xEB,0x99,0xB7), o3(0xEB,0x99,0xB8),
+     o3(0xEB,0x99,0xB9), o3(0xEB,0x99,0xBA),
+     o3(0xEB,0x99,0xBB), o3(0xEB,0x99,0xBC),
+     o3(0xEB,0x99,0xBD), o3(0xEB,0x99,0xBE),
+     o3(0xEB,0x99,0xBF), o3(0xEB,0x9A,0x80),
+     o3(0xEB,0x9A,0x81), o3(0xEB,0x9A,0x82),
+     o3(0xEB,0x9A,0x83), o3(0xEB,0x9A,0x84),
+     o3(0xEB,0x9A,0x85), o3(0xEB,0x9A,0x86),
+     o3(0xEB,0x9A,0x87), o3(0xEB,0x9A,0x88),
+     o3(0xEB,0x9A,0x89), o3(0xEB,0x9A,0x8A),
+     o3(0xEB,0x9A,0x8B), o3(0xEB,0x9A,0x8C),
+     o3(0xEB,0x9A,0x8D), o3(0xEB,0x9A,0x8E),
+     o3(0xEB,0x9A,0x8F), o3(0xEB,0x9A,0x90),
+     o3(0xEB,0x9A,0x91), o3(0xEB,0x9A,0x92),
+     o3(0xEB,0x9A,0x93), o3(0xEB,0x9A,0x94),
+     o3(0xEB,0x9A,0x95), o3(0xEB,0x9A,0x96),
+     o3(0xEB,0x9A,0x97), o3(0xEB,0x9A,0x98),
+     o3(0xEB,0x9A,0x99), o3(0xEB,0x9A,0x9A),
+     o3(0xEB,0x9A,0x9B), o3(0xEB,0x9A,0x9E),
+     o3(0xEB,0x9A,0x9F), o3(0xEB,0x9A,0xA1),
+     o3(0xEB,0x9A,0xA2), o3(0xEB,0x9A,0xA3),
+     o3(0xEB,0x9A,0xA5), o3(0xEB,0x9A,0xA6),
+     o3(0xEB,0x9A,0xA7), o3(0xEB,0x9A,0xA8),
+     o3(0xEB,0x9A,0xA9), o3(0xEB,0x9A,0xAA),
+     o3(0xEB,0x9A,0xAD), o3(0xEB,0x9A,0xAE),
+     o3(0xEB,0x9A,0xAF), o3(0xEB,0x9A,0xB0),
+     o3(0xEB,0x9A,0xB2), o3(0xEB,0x9A,0xB3),
+     o3(0xEB,0x9A,0xB4), o3(0xEB,0x9A,0xB5),
+     o3(0xEB,0x9A,0xB6), o3(0xEB,0x9A,0xB7),
+     o3(0xEB,0x9A,0xB8), o3(0xEB,0x9A,0xB9),
+     o3(0xEB,0x9A,0xBA), o3(0xEB,0x9A,0xBB),
+     o3(0xEB,0x9A,0xBC), o3(0xEB,0x9A,0xBD),
+     o3(0xEB,0x9A,0xBE), o3(0xEB,0x9A,0xBF),
+     o3(0xEB,0x9B,0x80), o3(0xEB,0x9B,0x81),
+     o3(0xEB,0x9B,0x82),
+
+#define from_CP949_8C WORDINDEX2INFO(33770)
+    from_CP949_81_offsets,
+    from_CP949_8C_infos,
+
+#define from_CP949_8D_infos WORDINDEX2INFO(33772)
+                INVALID, o3(0xEB,0x9B,0x83),
+     o3(0xEB,0x9B,0x84), o3(0xEB,0x9B,0x85),
+     o3(0xEB,0x9B,0x86), o3(0xEB,0x9B,0x87),
+     o3(0xEB,0x9B,0x88), o3(0xEB,0x9B,0x89),
+     o3(0xEB,0x9B,0x8A), o3(0xEB,0x9B,0x8B),
+     o3(0xEB,0x9B,0x8C), o3(0xEB,0x9B,0x8D),
+     o3(0xEB,0x9B,0x8E), o3(0xEB,0x9B,0x8F),
+     o3(0xEB,0x9B,0x90), o3(0xEB,0x9B,0x91),
+     o3(0xEB,0x9B,0x92), o3(0xEB,0x9B,0x93),
+     o3(0xEB,0x9B,0x95), o3(0xEB,0x9B,0x96),
+     o3(0xEB,0x9B,0x97), o3(0xEB,0x9B,0x98),
+     o3(0xEB,0x9B,0x99), o3(0xEB,0x9B,0x9A),
+     o3(0xEB,0x9B,0x9B), o3(0xEB,0x9B,0x9C),
+     o3(0xEB,0x9B,0x9D), o3(0xEB,0x9B,0x9E),
+     o3(0xEB,0x9B,0x9F), o3(0xEB,0x9B,0xA0),
+     o3(0xEB,0x9B,0xA1), o3(0xEB,0x9B,0xA2),
+     o3(0xEB,0x9B,0xA3), o3(0xEB,0x9B,0xA4),
+     o3(0xEB,0x9B,0xA5), o3(0xEB,0x9B,0xA6),
+     o3(0xEB,0x9B,0xA7), o3(0xEB,0x9B,0xA8),
+     o3(0xEB,0x9B,0xA9), o3(0xEB,0x9B,0xAA),
+     o3(0xEB,0x9B,0xAB), o3(0xEB,0x9B,0xAC),
+     o3(0xEB,0x9B,0xAD), o3(0xEB,0x9B,0xAE),
+     o3(0xEB,0x9B,0xAF), o3(0xEB,0x9B,0xB1),
+     o3(0xEB,0x9B,0xB2), o3(0xEB,0x9B,0xB3),
+     o3(0xEB,0x9B,0xB5), o3(0xEB,0x9B,0xB6),
+     o3(0xEB,0x9B,0xB7), o3(0xEB,0x9B,0xB9),
+     o3(0xEB,0x9B,0xBA), o3(0xEB,0x9B,0xBB),
+     o3(0xEB,0x9B,0xBC), o3(0xEB,0x9B,0xBD),
+     o3(0xEB,0x9B,0xBE), o3(0xEB,0x9B,0xBF),
+     o3(0xEB,0x9C,0x82), o3(0xEB,0x9C,0x83),
+     o3(0xEB,0x9C,0x84), o3(0xEB,0x9C,0x86),
+     o3(0xEB,0x9C,0x87), o3(0xEB,0x9C,0x88),
+     o3(0xEB,0x9C,0x89), o3(0xEB,0x9C,0x8A),
+     o3(0xEB,0x9C,0x8B), o3(0xEB,0x9C,0x8C),
+     o3(0xEB,0x9C,0x8D), o3(0xEB,0x9C,0x8E),
+     o3(0xEB,0x9C,0x8F), o3(0xEB,0x9C,0x90),
+     o3(0xEB,0x9C,0x91), o3(0xEB,0x9C,0x92),
+     o3(0xEB,0x9C,0x93), o3(0xEB,0x9C,0x94),
+     o3(0xEB,0x9C,0x95), o3(0xEB,0x9C,0x96),
+     o3(0xEB,0x9C,0x97), o3(0xEB,0x9C,0x98),
+     o3(0xEB,0x9C,0x99), o3(0xEB,0x9C,0x9A),
+     o3(0xEB,0x9C,0x9B), o3(0xEB,0x9C,0x9C),
+     o3(0xEB,0x9C,0x9D), o3(0xEB,0x9C,0x9E),
+     o3(0xEB,0x9C,0x9F), o3(0xEB,0x9C,0xA0),
+     o3(0xEB,0x9C,0xA1), o3(0xEB,0x9C,0xA2),
+     o3(0xEB,0x9C,0xA3), o3(0xEB,0x9C,0xA4),
+     o3(0xEB,0x9C,0xA5), o3(0xEB,0x9C,0xA6),
+     o3(0xEB,0x9C,0xA7), o3(0xEB,0x9C,0xAA),
+     o3(0xEB,0x9C,0xAB), o3(0xEB,0x9C,0xAD),
+     o3(0xEB,0x9C,0xAE), o3(0xEB,0x9C,0xB1),
+     o3(0xEB,0x9C,0xB2), o3(0xEB,0x9C,0xB3),
+     o3(0xEB,0x9C,0xB4), o3(0xEB,0x9C,0xB5),
+     o3(0xEB,0x9C,0xB6), o3(0xEB,0x9C,0xB7),
+     o3(0xEB,0x9C,0xBA), o3(0xEB,0x9C,0xBC),
+     o3(0xEB,0x9C,0xBD), o3(0xEB,0x9C,0xBE),
+     o3(0xEB,0x9C,0xBF), o3(0xEB,0x9D,0x80),
+     o3(0xEB,0x9D,0x81), o3(0xEB,0x9D,0x82),
+     o3(0xEB,0x9D,0x83), o3(0xEB,0x9D,0x85),
+     o3(0xEB,0x9D,0x86), o3(0xEB,0x9D,0x87),
+     o3(0xEB,0x9D,0x89), o3(0xEB,0x9D,0x8A),
+     o3(0xEB,0x9D,0x8B), o3(0xEB,0x9D,0x8D),
+     o3(0xEB,0x9D,0x8E), o3(0xEB,0x9D,0x8F),
+     o3(0xEB,0x9D,0x90), o3(0xEB,0x9D,0x91),
+     o3(0xEB,0x9D,0x92), o3(0xEB,0x9D,0x93),
+     o3(0xEB,0x9D,0x96), o3(0xEB,0x9D,0x97),
+     o3(0xEB,0x9D,0x98), o3(0xEB,0x9D,0x99),
+     o3(0xEB,0x9D,0x9A), o3(0xEB,0x9D,0x9B),
+     o3(0xEB,0x9D,0x9C), o3(0xEB,0x9D,0x9D),
+     o3(0xEB,0x9D,0x9E), o3(0xEB,0x9D,0x9F),
+     o3(0xEB,0x9D,0xA1), o3(0xEB,0x9D,0xA2),
+     o3(0xEB,0x9D,0xA3), o3(0xEB,0x9D,0xA5),
+     o3(0xEB,0x9D,0xA6), o3(0xEB,0x9D,0xA7),
+     o3(0xEB,0x9D,0xA9), o3(0xEB,0x9D,0xAA),
+     o3(0xEB,0x9D,0xAB), o3(0xEB,0x9D,0xAC),
+     o3(0xEB,0x9D,0xAD), o3(0xEB,0x9D,0xAE),
+     o3(0xEB,0x9D,0xAF), o3(0xEB,0x9D,0xB2),
+     o3(0xEB,0x9D,0xB4), o3(0xEB,0x9D,0xB6),
+     o3(0xEB,0x9D,0xB7), o3(0xEB,0x9D,0xB8),
+     o3(0xEB,0x9D,0xB9), o3(0xEB,0x9D,0xBA),
+     o3(0xEB,0x9D,0xBB), o3(0xEB,0x9D,0xBE),
+     o3(0xEB,0x9D,0xBF), o3(0xEB,0x9E,0x81),
+     o3(0xEB,0x9E,0x82), o3(0xEB,0x9E,0x83),
+     o3(0xEB,0x9E,0x85), o3(0xEB,0x9E,0x86),
+     o3(0xEB,0x9E,0x87), o3(0xEB,0x9E,0x88),
+     o3(0xEB,0x9E,0x89), o3(0xEB,0x9E,0x8A),
+     o3(0xEB,0x9E,0x8B), o3(0xEB,0x9E,0x8E),
+     o3(0xEB,0x9E,0x93), o3(0xEB,0x9E,0x94),
+     o3(0xEB,0x9E,0x95), o3(0xEB,0x9E,0x9A),
+     o3(0xEB,0x9E,0x9B), o3(0xEB,0x9E,0x9D),
+     o3(0xEB,0x9E,0x9E),
+
+#define from_CP949_8D WORDINDEX2INFO(33951)
+    from_CP949_81_offsets,
+    from_CP949_8D_infos,
+
+#define from_CP949_8E_infos WORDINDEX2INFO(33953)
+                INVALID, o3(0xEB,0x9E,0x9F),
+     o3(0xEB,0x9E,0xA1), o3(0xEB,0x9E,0xA2),
+     o3(0xEB,0x9E,0xA3), o3(0xEB,0x9E,0xA4),
+     o3(0xEB,0x9E,0xA5), o3(0xEB,0x9E,0xA6),
+     o3(0xEB,0x9E,0xA7), o3(0xEB,0x9E,0xAA),
+     o3(0xEB,0x9E,0xAE), o3(0xEB,0x9E,0xAF),
+     o3(0xEB,0x9E,0xB0), o3(0xEB,0x9E,0xB1),
+     o3(0xEB,0x9E,0xB2), o3(0xEB,0x9E,0xB3),
+     o3(0xEB,0x9E,0xB6), o3(0xEB,0x9E,0xB7),
+     o3(0xEB,0x9E,0xB9), o3(0xEB,0x9E,0xBA),
+     o3(0xEB,0x9E,0xBB), o3(0xEB,0x9E,0xBC),
+     o3(0xEB,0x9E,0xBD), o3(0xEB,0x9E,0xBE),
+     o3(0xEB,0x9E,0xBF), o3(0xEB,0x9F,0x80),
+     o3(0xEB,0x9F,0x81), o3(0xEB,0x9F,0x82),
+     o3(0xEB,0x9F,0x83), o3(0xEB,0x9F,0x84),
+     o3(0xEB,0x9F,0x85), o3(0xEB,0x9F,0x86),
+     o3(0xEB,0x9F,0x88), o3(0xEB,0x9F,0x8A),
+     o3(0xEB,0x9F,0x8B), o3(0xEB,0x9F,0x8C),
+     o3(0xEB,0x9F,0x8D), o3(0xEB,0x9F,0x8E),
+     o3(0xEB,0x9F,0x8F), o3(0xEB,0x9F,0x90),
+     o3(0xEB,0x9F,0x91), o3(0xEB,0x9F,0x92),
+     o3(0xEB,0x9F,0x93), o3(0xEB,0x9F,0x94),
+     o3(0xEB,0x9F,0x95), o3(0xEB,0x9F,0x96),
+     o3(0xEB,0x9F,0x97), o3(0xEB,0x9F,0x98),
+     o3(0xEB,0x9F,0x99), o3(0xEB,0x9F,0x9A),
+     o3(0xEB,0x9F,0x9B), o3(0xEB,0x9F,0x9C),
+     o3(0xEB,0x9F,0x9D), o3(0xEB,0x9F,0x9E),
+     o3(0xEB,0x9F,0x9F), o3(0xEB,0x9F,0xA0),
+     o3(0xEB,0x9F,0xA1), o3(0xEB,0x9F,0xA2),
+     o3(0xEB,0x9F,0xA3), o3(0xEB,0x9F,0xA4),
+     o3(0xEB,0x9F,0xA5), o3(0xEB,0x9F,0xA6),
+     o3(0xEB,0x9F,0xA7), o3(0xEB,0x9F,0xA8),
+     o3(0xEB,0x9F,0xA9), o3(0xEB,0x9F,0xAA),
+     o3(0xEB,0x9F,0xAB), o3(0xEB,0x9F,0xAE),
+     o3(0xEB,0x9F,0xAF), o3(0xEB,0x9F,0xB1),
+     o3(0xEB,0x9F,0xB2), o3(0xEB,0x9F,0xB3),
+     o3(0xEB,0x9F,0xB5), o3(0xEB,0x9F,0xB6),
+     o3(0xEB,0x9F,0xB7), o3(0xEB,0x9F,0xB8),
+     o3(0xEB,0x9F,0xB9), o3(0xEB,0x9F,0xBA),
+     o3(0xEB,0x9F,0xBB), o3(0xEB,0x9F,0xBE),
+     o3(0xEB,0xA0,0x82), o3(0xEB,0xA0,0x83),
+     o3(0xEB,0xA0,0x84), o3(0xEB,0xA0,0x85),
+     o3(0xEB,0xA0,0x86), o3(0xEB,0xA0,0x8A),
+     o3(0xEB,0xA0,0x8B), o3(0xEB,0xA0,0x8D),
+     o3(0xEB,0xA0,0x8E), o3(0xEB,0xA0,0x8F),
+     o3(0xEB,0xA0,0x91), o3(0xEB,0xA0,0x92),
+     o3(0xEB,0xA0,0x93), o3(0xEB,0xA0,0x94),
+     o3(0xEB,0xA0,0x95), o3(0xEB,0xA0,0x96),
+     o3(0xEB,0xA0,0x97), o3(0xEB,0xA0,0x9A),
+     o3(0xEB,0xA0,0x9C), o3(0xEB,0xA0,0x9E),
+     o3(0xEB,0xA0,0x9F), o3(0xEB,0xA0,0xA0),
+     o3(0xEB,0xA0,0xA1), o3(0xEB,0xA0,0xA2),
+     o3(0xEB,0xA0,0xA3), o3(0xEB,0xA0,0xA6),
+     o3(0xEB,0xA0,0xA7), o3(0xEB,0xA0,0xA9),
+     o3(0xEB,0xA0,0xAA), o3(0xEB,0xA0,0xAB),
+     o3(0xEB,0xA0,0xAD), o3(0xEB,0xA0,0xAE),
+     o3(0xEB,0xA0,0xAF), o3(0xEB,0xA0,0xB0),
+     o3(0xEB,0xA0,0xB1), o3(0xEB,0xA0,0xB2),
+     o3(0xEB,0xA0,0xB3), o3(0xEB,0xA0,0xB6),
+     o3(0xEB,0xA0,0xBA), o3(0xEB,0xA0,0xBB),
+     o3(0xEB,0xA0,0xBC), o3(0xEB,0xA0,0xBD),
+     o3(0xEB,0xA0,0xBE), o3(0xEB,0xA0,0xBF),
+     o3(0xEB,0xA1,0x81), o3(0xEB,0xA1,0x82),
+     o3(0xEB,0xA1,0x83), o3(0xEB,0xA1,0x85),
+     o3(0xEB,0xA1,0x86), o3(0xEB,0xA1,0x87),
+     o3(0xEB,0xA1,0x88), o3(0xEB,0xA1,0x89),
+     o3(0xEB,0xA1,0x8A), o3(0xEB,0xA1,0x8B),
+     o3(0xEB,0xA1,0x8C), o3(0xEB,0xA1,0x8D),
+     o3(0xEB,0xA1,0x8E), o3(0xEB,0xA1,0x8F),
+     o3(0xEB,0xA1,0x90), o3(0xEB,0xA1,0x92),
+     o3(0xEB,0xA1,0x94), o3(0xEB,0xA1,0x95),
+     o3(0xEB,0xA1,0x96), o3(0xEB,0xA1,0x97),
+     o3(0xEB,0xA1,0x98), o3(0xEB,0xA1,0x99),
+     o3(0xEB,0xA1,0x9A), o3(0xEB,0xA1,0x9B),
+     o3(0xEB,0xA1,0x9E), o3(0xEB,0xA1,0x9F),
+     o3(0xEB,0xA1,0xA1), o3(0xEB,0xA1,0xA2),
+     o3(0xEB,0xA1,0xA3), o3(0xEB,0xA1,0xA5),
+     o3(0xEB,0xA1,0xA6), o3(0xEB,0xA1,0xA7),
+     o3(0xEB,0xA1,0xA8), o3(0xEB,0xA1,0xA9),
+     o3(0xEB,0xA1,0xAA), o3(0xEB,0xA1,0xAB),
+     o3(0xEB,0xA1,0xAE), o3(0xEB,0xA1,0xB0),
+     o3(0xEB,0xA1,0xB2), o3(0xEB,0xA1,0xB3),
+     o3(0xEB,0xA1,0xB4), o3(0xEB,0xA1,0xB5),
+     o3(0xEB,0xA1,0xB6), o3(0xEB,0xA1,0xB7),
+     o3(0xEB,0xA1,0xB9), o3(0xEB,0xA1,0xBA),
+     o3(0xEB,0xA1,0xBB), o3(0xEB,0xA1,0xBD),
+     o3(0xEB,0xA1,0xBE), o3(0xEB,0xA1,0xBF),
+     o3(0xEB,0xA2,0x80), o3(0xEB,0xA2,0x81),
+     o3(0xEB,0xA2,0x82), o3(0xEB,0xA2,0x83),
+     o3(0xEB,0xA2,0x84),
+
+#define from_CP949_8E WORDINDEX2INFO(34132)
+    from_CP949_81_offsets,
+    from_CP949_8E_infos,
+
+#define from_CP949_8F_infos WORDINDEX2INFO(34134)
+                INVALID, o3(0xEB,0xA2,0x85),
+     o3(0xEB,0xA2,0x86), o3(0xEB,0xA2,0x87),
+     o3(0xEB,0xA2,0x88), o3(0xEB,0xA2,0x89),
+     o3(0xEB,0xA2,0x8A), o3(0xEB,0xA2,0x8B),
+     o3(0xEB,0xA2,0x8C), o3(0xEB,0xA2,0x8E),
+     o3(0xEB,0xA2,0x8F), o3(0xEB,0xA2,0x90),
+     o3(0xEB,0xA2,0x91), o3(0xEB,0xA2,0x92),
+     o3(0xEB,0xA2,0x93), o3(0xEB,0xA2,0x94),
+     o3(0xEB,0xA2,0x95), o3(0xEB,0xA2,0x96),
+     o3(0xEB,0xA2,0x97), o3(0xEB,0xA2,0x98),
+     o3(0xEB,0xA2,0x99), o3(0xEB,0xA2,0x9A),
+     o3(0xEB,0xA2,0x9B), o3(0xEB,0xA2,0x9C),
+     o3(0xEB,0xA2,0x9D), o3(0xEB,0xA2,0x9E),
+     o3(0xEB,0xA2,0x9F), o3(0xEB,0xA2,0xA0),
+     o3(0xEB,0xA2,0xA1), o3(0xEB,0xA2,0xA2),
+     o3(0xEB,0xA2,0xA3), o3(0xEB,0xA2,0xA4),
+     o3(0xEB,0xA2,0xA5), o3(0xEB,0xA2,0xA6),
+     o3(0xEB,0xA2,0xA7), o3(0xEB,0xA2,0xA9),
+     o3(0xEB,0xA2,0xAA), o3(0xEB,0xA2,0xAB),
+     o3(0xEB,0xA2,0xAC), o3(0xEB,0xA2,0xAD),
+     o3(0xEB,0xA2,0xAE), o3(0xEB,0xA2,0xAF),
+     o3(0xEB,0xA2,0xB1), o3(0xEB,0xA2,0xB2),
+     o3(0xEB,0xA2,0xB3), o3(0xEB,0xA2,0xB5),
+     o3(0xEB,0xA2,0xB6), o3(0xEB,0xA2,0xB7),
+     o3(0xEB,0xA2,0xB9), o3(0xEB,0xA2,0xBA),
+     o3(0xEB,0xA2,0xBB), o3(0xEB,0xA2,0xBC),
+     o3(0xEB,0xA2,0xBD), o3(0xEB,0xA2,0xBE),
+     o3(0xEB,0xA2,0xBF), o3(0xEB,0xA3,0x82),
+     o3(0xEB,0xA3,0x84), o3(0xEB,0xA3,0x86),
+     o3(0xEB,0xA3,0x87), o3(0xEB,0xA3,0x88),
+     o3(0xEB,0xA3,0x89), o3(0xEB,0xA3,0x8A),
+     o3(0xEB,0xA3,0x8B), o3(0xEB,0xA3,0x8D),
+     o3(0xEB,0xA3,0x8E), o3(0xEB,0xA3,0x8F),
+     o3(0xEB,0xA3,0x91), o3(0xEB,0xA3,0x92),
+     o3(0xEB,0xA3,0x93), o3(0xEB,0xA3,0x95),
+     o3(0xEB,0xA3,0x96), o3(0xEB,0xA3,0x97),
+     o3(0xEB,0xA3,0x98), o3(0xEB,0xA3,0x99),
+     o3(0xEB,0xA3,0x9A), o3(0xEB,0xA3,0x9B),
+     o3(0xEB,0xA3,0x9C), o3(0xEB,0xA3,0x9E),
+     o3(0xEB,0xA3,0xA0), o3(0xEB,0xA3,0xA2),
+     o3(0xEB,0xA3,0xA3), o3(0xEB,0xA3,0xA4),
+     o3(0xEB,0xA3,0xA5), o3(0xEB,0xA3,0xA6),
+     o3(0xEB,0xA3,0xA7), o3(0xEB,0xA3,0xAA),
+     o3(0xEB,0xA3,0xAB), o3(0xEB,0xA3,0xAD),
+     o3(0xEB,0xA3,0xAE), o3(0xEB,0xA3,0xAF),
+     o3(0xEB,0xA3,0xB1), o3(0xEB,0xA3,0xB2),
+     o3(0xEB,0xA3,0xB3), o3(0xEB,0xA3,0xB4),
+     o3(0xEB,0xA3,0xB5), o3(0xEB,0xA3,0xB6),
+     o3(0xEB,0xA3,0xB7), o3(0xEB,0xA3,0xBA),
+     o3(0xEB,0xA3,0xBC), o3(0xEB,0xA3,0xBE),
+     o3(0xEB,0xA3,0xBF), o3(0xEB,0xA4,0x80),
+     o3(0xEB,0xA4,0x81), o3(0xEB,0xA4,0x82),
+     o3(0xEB,0xA4,0x83), o3(0xEB,0xA4,0x85),
+     o3(0xEB,0xA4,0x86), o3(0xEB,0xA4,0x87),
+     o3(0xEB,0xA4,0x88), o3(0xEB,0xA4,0x89),
+     o3(0xEB,0xA4,0x8A), o3(0xEB,0xA4,0x8B),
+     o3(0xEB,0xA4,0x8C), o3(0xEB,0xA4,0x8D),
+     o3(0xEB,0xA4,0x8E), o3(0xEB,0xA4,0x8F),
+     o3(0xEB,0xA4,0x90), o3(0xEB,0xA4,0x91),
+     o3(0xEB,0xA4,0x92), o3(0xEB,0xA4,0x93),
+     o3(0xEB,0xA4,0x94), o3(0xEB,0xA4,0x95),
+     o3(0xEB,0xA4,0x96), o3(0xEB,0xA4,0x97),
+     o3(0xEB,0xA4,0x99), o3(0xEB,0xA4,0x9A),
+     o3(0xEB,0xA4,0x9B), o3(0xEB,0xA4,0x9C),
+     o3(0xEB,0xA4,0x9D), o3(0xEB,0xA4,0x9E),
+     o3(0xEB,0xA4,0x9F), o3(0xEB,0xA4,0xA1),
+     o3(0xEB,0xA4,0xA2), o3(0xEB,0xA4,0xA3),
+     o3(0xEB,0xA4,0xA4), o3(0xEB,0xA4,0xA5),
+     o3(0xEB,0xA4,0xA6), o3(0xEB,0xA4,0xA7),
+     o3(0xEB,0xA4,0xA8), o3(0xEB,0xA4,0xA9),
+     o3(0xEB,0xA4,0xAA), o3(0xEB,0xA4,0xAB),
+     o3(0xEB,0xA4,0xAC), o3(0xEB,0xA4,0xAD),
+     o3(0xEB,0xA4,0xAE), o3(0xEB,0xA4,0xAF),
+     o3(0xEB,0xA4,0xB0), o3(0xEB,0xA4,0xB1),
+     o3(0xEB,0xA4,0xB2), o3(0xEB,0xA4,0xB3),
+     o3(0xEB,0xA4,0xB4), o3(0xEB,0xA4,0xB5),
+     o3(0xEB,0xA4,0xB6), o3(0xEB,0xA4,0xB7),
+     o3(0xEB,0xA4,0xB8), o3(0xEB,0xA4,0xB9),
+     o3(0xEB,0xA4,0xBA), o3(0xEB,0xA4,0xBB),
+     o3(0xEB,0xA4,0xBE), o3(0xEB,0xA4,0xBF),
+     o3(0xEB,0xA5,0x81), o3(0xEB,0xA5,0x82),
+     o3(0xEB,0xA5,0x83), o3(0xEB,0xA5,0x85),
+     o3(0xEB,0xA5,0x86), o3(0xEB,0xA5,0x87),
+     o3(0xEB,0xA5,0x88), o3(0xEB,0xA5,0x89),
+     o3(0xEB,0xA5,0x8A), o3(0xEB,0xA5,0x8B),
+     o3(0xEB,0xA5,0x8D), o3(0xEB,0xA5,0x8E),
+     o3(0xEB,0xA5,0x90), o3(0xEB,0xA5,0x92),
+     o3(0xEB,0xA5,0x93), o3(0xEB,0xA5,0x94),
+     o3(0xEB,0xA5,0x95), o3(0xEB,0xA5,0x96),
+     o3(0xEB,0xA5,0x97),
+
+#define from_CP949_8F WORDINDEX2INFO(34313)
+    from_CP949_81_offsets,
+    from_CP949_8F_infos,
+
+#define from_CP949_90_infos WORDINDEX2INFO(34315)
+                INVALID, o3(0xEB,0xA5,0x9A),
+     o3(0xEB,0xA5,0x9B), o3(0xEB,0xA5,0x9D),
+     o3(0xEB,0xA5,0x9E), o3(0xEB,0xA5,0x9F),
+     o3(0xEB,0xA5,0xA1), o3(0xEB,0xA5,0xA2),
+     o3(0xEB,0xA5,0xA3), o3(0xEB,0xA5,0xA4),
+     o3(0xEB,0xA5,0xA5), o3(0xEB,0xA5,0xA6),
+     o3(0xEB,0xA5,0xA7), o3(0xEB,0xA5,0xAA),
+     o3(0xEB,0xA5,0xAC), o3(0xEB,0xA5,0xAE),
+     o3(0xEB,0xA5,0xAF), o3(0xEB,0xA5,0xB0),
+     o3(0xEB,0xA5,0xB1), o3(0xEB,0xA5,0xB2),
+     o3(0xEB,0xA5,0xB3), o3(0xEB,0xA5,0xB6),
+     o3(0xEB,0xA5,0xB7), o3(0xEB,0xA5,0xB9),
+     o3(0xEB,0xA5,0xBA), o3(0xEB,0xA5,0xBB),
+     o3(0xEB,0xA5,0xBD), o3(0xEB,0xA5,0xBE),
+     o3(0xEB,0xA5,0xBF), o3(0xEB,0xA6,0x80),
+     o3(0xEB,0xA6,0x81), o3(0xEB,0xA6,0x82),
+     o3(0xEB,0xA6,0x83), o3(0xEB,0xA6,0x86),
+     o3(0xEB,0xA6,0x88), o3(0xEB,0xA6,0x8B),
+     o3(0xEB,0xA6,0x8C), o3(0xEB,0xA6,0x8F),
+     o3(0xEB,0xA6,0x90), o3(0xEB,0xA6,0x91),
+     o3(0xEB,0xA6,0x92), o3(0xEB,0xA6,0x93),
+     o3(0xEB,0xA6,0x94), o3(0xEB,0xA6,0x95),
+     o3(0xEB,0xA6,0x96), o3(0xEB,0xA6,0x97),
+     o3(0xEB,0xA6,0x98), o3(0xEB,0xA6,0x99),
+     o3(0xEB,0xA6,0x9A), o3(0xEB,0xA6,0x9B),
+     o3(0xEB,0xA6,0x9C), o3(0xEB,0xA6,0x9D),
+     o3(0xEB,0xA6,0x9E), o3(0xEB,0xA6,0x9F),
+     o3(0xEB,0xA6,0xA0), o3(0xEB,0xA6,0xA1),
+     o3(0xEB,0xA6,0xA2), o3(0xEB,0xA6,0xA3),
+     o3(0xEB,0xA6,0xA4), o3(0xEB,0xA6,0xA5),
+     o3(0xEB,0xA6,0xA6), o3(0xEB,0xA6,0xA7),
+     o3(0xEB,0xA6,0xA8), o3(0xEB,0xA6,0xA9),
+     o3(0xEB,0xA6,0xAA), o3(0xEB,0xA6,0xAB),
+     o3(0xEB,0xA6,0xAE), o3(0xEB,0xA6,0xAF),
+     o3(0xEB,0xA6,0xB1), o3(0xEB,0xA6,0xB2),
+     o3(0xEB,0xA6,0xB3), o3(0xEB,0xA6,0xB5),
+     o3(0xEB,0xA6,0xB6), o3(0xEB,0xA6,0xB7),
+     o3(0xEB,0xA6,0xB8), o3(0xEB,0xA6,0xB9),
+     o3(0xEB,0xA6,0xBA), o3(0xEB,0xA6,0xBB),
+     o3(0xEB,0xA6,0xBE), o3(0xEB,0xA7,0x80),
+     o3(0xEB,0xA7,0x82), o3(0xEB,0xA7,0x83),
+     o3(0xEB,0xA7,0x84), o3(0xEB,0xA7,0x85),
+     o3(0xEB,0xA7,0x86), o3(0xEB,0xA7,0x87),
+     o3(0xEB,0xA7,0x8A), o3(0xEB,0xA7,0x8B),
+     o3(0xEB,0xA7,0x8D), o3(0xEB,0xA7,0x93),
+     o3(0xEB,0xA7,0x94), o3(0xEB,0xA7,0x95),
+     o3(0xEB,0xA7,0x96), o3(0xEB,0xA7,0x97),
+     o3(0xEB,0xA7,0x9A), o3(0xEB,0xA7,0x9C),
+     o3(0xEB,0xA7,0x9F), o3(0xEB,0xA7,0xA0),
+     o3(0xEB,0xA7,0xA2), o3(0xEB,0xA7,0xA6),
+     o3(0xEB,0xA7,0xA7), o3(0xEB,0xA7,0xA9),
+     o3(0xEB,0xA7,0xAA), o3(0xEB,0xA7,0xAB),
+     o3(0xEB,0xA7,0xAD), o3(0xEB,0xA7,0xAE),
+     o3(0xEB,0xA7,0xAF), o3(0xEB,0xA7,0xB0),
+     o3(0xEB,0xA7,0xB1), o3(0xEB,0xA7,0xB2),
+     o3(0xEB,0xA7,0xB3), o3(0xEB,0xA7,0xB6),
+     o3(0xEB,0xA7,0xBB), o3(0xEB,0xA7,0xBC),
+     o3(0xEB,0xA7,0xBD), o3(0xEB,0xA7,0xBE),
+     o3(0xEB,0xA7,0xBF), o3(0xEB,0xA8,0x82),
+     o3(0xEB,0xA8,0x83), o3(0xEB,0xA8,0x84),
+     o3(0xEB,0xA8,0x85), o3(0xEB,0xA8,0x86),
+     o3(0xEB,0xA8,0x87), o3(0xEB,0xA8,0x89),
+     o3(0xEB,0xA8,0x8A), o3(0xEB,0xA8,0x8B),
+     o3(0xEB,0xA8,0x8C), o3(0xEB,0xA8,0x8D),
+     o3(0xEB,0xA8,0x8E), o3(0xEB,0xA8,0x8F),
+     o3(0xEB,0xA8,0x90), o3(0xEB,0xA8,0x91),
+     o3(0xEB,0xA8,0x92), o3(0xEB,0xA8,0x93),
+     o3(0xEB,0xA8,0x94), o3(0xEB,0xA8,0x96),
+     o3(0xEB,0xA8,0x97), o3(0xEB,0xA8,0x98),
+     o3(0xEB,0xA8,0x99), o3(0xEB,0xA8,0x9A),
+     o3(0xEB,0xA8,0x9B), o3(0xEB,0xA8,0x9C),
+     o3(0xEB,0xA8,0x9D), o3(0xEB,0xA8,0x9E),
+     o3(0xEB,0xA8,0x9F), o3(0xEB,0xA8,0xA0),
+     o3(0xEB,0xA8,0xA1), o3(0xEB,0xA8,0xA2),
+     o3(0xEB,0xA8,0xA3), o3(0xEB,0xA8,0xA4),
+     o3(0xEB,0xA8,0xA5), o3(0xEB,0xA8,0xA6),
+     o3(0xEB,0xA8,0xA7), o3(0xEB,0xA8,0xA8),
+     o3(0xEB,0xA8,0xA9), o3(0xEB,0xA8,0xAA),
+     o3(0xEB,0xA8,0xAB), o3(0xEB,0xA8,0xAC),
+     o3(0xEB,0xA8,0xAD), o3(0xEB,0xA8,0xAE),
+     o3(0xEB,0xA8,0xAF), o3(0xEB,0xA8,0xB0),
+     o3(0xEB,0xA8,0xB1), o3(0xEB,0xA8,0xB2),
+     o3(0xEB,0xA8,0xB3), o3(0xEB,0xA8,0xB4),
+     o3(0xEB,0xA8,0xB5), o3(0xEB,0xA8,0xB6),
+     o3(0xEB,0xA8,0xB7), o3(0xEB,0xA8,0xBA),
+     o3(0xEB,0xA8,0xBB), o3(0xEB,0xA8,0xBD),
+     o3(0xEB,0xA8,0xBE), o3(0xEB,0xA8,0xBF),
+     o3(0xEB,0xA9,0x81), o3(0xEB,0xA9,0x83),
+     o3(0xEB,0xA9,0x84), o3(0xEB,0xA9,0x85),
+     o3(0xEB,0xA9,0x86),
+
+#define from_CP949_90 WORDINDEX2INFO(34494)
+    from_CP949_81_offsets,
+    from_CP949_90_infos,
+
+#define from_CP949_91_infos WORDINDEX2INFO(34496)
+                INVALID, o3(0xEB,0xA9,0x87),
+     o3(0xEB,0xA9,0x8A), o3(0xEB,0xA9,0x8C),
+     o3(0xEB,0xA9,0x8F), o3(0xEB,0xA9,0x90),
+     o3(0xEB,0xA9,0x91), o3(0xEB,0xA9,0x92),
+     o3(0xEB,0xA9,0x96), o3(0xEB,0xA9,0x97),
+     o3(0xEB,0xA9,0x99), o3(0xEB,0xA9,0x9A),
+     o3(0xEB,0xA9,0x9B), o3(0xEB,0xA9,0x9D),
+     o3(0xEB,0xA9,0x9E), o3(0xEB,0xA9,0x9F),
+     o3(0xEB,0xA9,0xA0), o3(0xEB,0xA9,0xA1),
+     o3(0xEB,0xA9,0xA2), o3(0xEB,0xA9,0xA3),
+     o3(0xEB,0xA9,0xA6), o3(0xEB,0xA9,0xAA),
+     o3(0xEB,0xA9,0xAB), o3(0xEB,0xA9,0xAC),
+     o3(0xEB,0xA9,0xAD), o3(0xEB,0xA9,0xAE),
+     o3(0xEB,0xA9,0xAF), o3(0xEB,0xA9,0xB2),
+     o3(0xEB,0xA9,0xB3), o3(0xEB,0xA9,0xB5),
+     o3(0xEB,0xA9,0xB6), o3(0xEB,0xA9,0xB7),
+     o3(0xEB,0xA9,0xB9), o3(0xEB,0xA9,0xBA),
+     o3(0xEB,0xA9,0xBB), o3(0xEB,0xA9,0xBC),
+     o3(0xEB,0xA9,0xBD), o3(0xEB,0xA9,0xBE),
+     o3(0xEB,0xA9,0xBF), o3(0xEB,0xAA,0x80),
+     o3(0xEB,0xAA,0x81), o3(0xEB,0xAA,0x82),
+     o3(0xEB,0xAA,0x86), o3(0xEB,0xAA,0x88),
+     o3(0xEB,0xAA,0x89), o3(0xEB,0xAA,0x8A),
+     o3(0xEB,0xAA,0x8B), o3(0xEB,0xAA,0x8D),
+     o3(0xEB,0xAA,0x8E), o3(0xEB,0xAA,0x8F),
+     o3(0xEB,0xAA,0x90), o3(0xEB,0xAA,0x91),
+     o3(0xEB,0xAA,0x92), o3(0xEB,0xAA,0x93),
+     o3(0xEB,0xAA,0x94), o3(0xEB,0xAA,0x95),
+     o3(0xEB,0xAA,0x96), o3(0xEB,0xAA,0x97),
+     o3(0xEB,0xAA,0x98), o3(0xEB,0xAA,0x99),
+     o3(0xEB,0xAA,0x9A), o3(0xEB,0xAA,0x9B),
+     o3(0xEB,0xAA,0x9C), o3(0xEB,0xAA,0x9D),
+     o3(0xEB,0xAA,0x9E), o3(0xEB,0xAA,0x9F),
+     o3(0xEB,0xAA,0xA0), o3(0xEB,0xAA,0xA1),
+     o3(0xEB,0xAA,0xA2), o3(0xEB,0xAA,0xA3),
+     o3(0xEB,0xAA,0xA4), o3(0xEB,0xAA,0xA5),
+     o3(0xEB,0xAA,0xA6), o3(0xEB,0xAA,0xA7),
+     o3(0xEB,0xAA,0xAA), o3(0xEB,0xAA,0xAD),
+     o3(0xEB,0xAA,0xAE), o3(0xEB,0xAA,0xAF),
+     o3(0xEB,0xAA,0xB1), o3(0xEB,0xAA,0xB3),
+     o3(0xEB,0xAA,0xB4), o3(0xEB,0xAA,0xB5),
+     o3(0xEB,0xAA,0xB6), o3(0xEB,0xAA,0xB7),
+     o3(0xEB,0xAA,0xBA), o3(0xEB,0xAA,0xBC),
+     o3(0xEB,0xAA,0xBE), o3(0xEB,0xAA,0xBF),
+     o3(0xEB,0xAB,0x80), o3(0xEB,0xAB,0x81),
+     o3(0xEB,0xAB,0x82), o3(0xEB,0xAB,0x83),
+     o3(0xEB,0xAB,0x85), o3(0xEB,0xAB,0x86),
+     o3(0xEB,0xAB,0x87), o3(0xEB,0xAB,0x89),
+     o3(0xEB,0xAB,0x8A), o3(0xEB,0xAB,0x8B),
+     o3(0xEB,0xAB,0x8C), o3(0xEB,0xAB,0x8D),
+     o3(0xEB,0xAB,0x8E), o3(0xEB,0xAB,0x8F),
+     o3(0xEB,0xAB,0x90), o3(0xEB,0xAB,0x91),
+     o3(0xEB,0xAB,0x92), o3(0xEB,0xAB,0x93),
+     o3(0xEB,0xAB,0x94), o3(0xEB,0xAB,0x95),
+     o3(0xEB,0xAB,0x96), o3(0xEB,0xAB,0x97),
+     o3(0xEB,0xAB,0x9A), o3(0xEB,0xAB,0x9B),
+     o3(0xEB,0xAB,0x9C), o3(0xEB,0xAB,0x9D),
+     o3(0xEB,0xAB,0x9E), o3(0xEB,0xAB,0x9F),
+     o3(0xEB,0xAB,0xA0), o3(0xEB,0xAB,0xA1),
+     o3(0xEB,0xAB,0xA2), o3(0xEB,0xAB,0xA3),
+     o3(0xEB,0xAB,0xA4), o3(0xEB,0xAB,0xA5),
+     o3(0xEB,0xAB,0xA6), o3(0xEB,0xAB,0xA7),
+     o3(0xEB,0xAB,0xA8), o3(0xEB,0xAB,0xA9),
+     o3(0xEB,0xAB,0xAA), o3(0xEB,0xAB,0xAB),
+     o3(0xEB,0xAB,0xAC), o3(0xEB,0xAB,0xAD),
+     o3(0xEB,0xAB,0xAE), o3(0xEB,0xAB,0xAF),
+     o3(0xEB,0xAB,0xB0), o3(0xEB,0xAB,0xB1),
+     o3(0xEB,0xAB,0xB2), o3(0xEB,0xAB,0xB3),
+     o3(0xEB,0xAB,0xB4), o3(0xEB,0xAB,0xB5),
+     o3(0xEB,0xAB,0xB6), o3(0xEB,0xAB,0xB7),
+     o3(0xEB,0xAB,0xB8), o3(0xEB,0xAB,0xB9),
+     o3(0xEB,0xAB,0xBA), o3(0xEB,0xAB,0xBB),
+     o3(0xEB,0xAB,0xBD), o3(0xEB,0xAB,0xBE),
+     o3(0xEB,0xAB,0xBF), o3(0xEB,0xAC,0x81),
+     o3(0xEB,0xAC,0x82), o3(0xEB,0xAC,0x83),
+     o3(0xEB,0xAC,0x85), o3(0xEB,0xAC,0x86),
+     o3(0xEB,0xAC,0x87), o3(0xEB,0xAC,0x88),
+     o3(0xEB,0xAC,0x89), o3(0xEB,0xAC,0x8A),
+     o3(0xEB,0xAC,0x8B), o3(0xEB,0xAC,0x8C),
+     o3(0xEB,0xAC,0x8E), o3(0xEB,0xAC,0x90),
+     o3(0xEB,0xAC,0x92), o3(0xEB,0xAC,0x93),
+     o3(0xEB,0xAC,0x94), o3(0xEB,0xAC,0x95),
+     o3(0xEB,0xAC,0x96), o3(0xEB,0xAC,0x97),
+     o3(0xEB,0xAC,0x99), o3(0xEB,0xAC,0x9A),
+     o3(0xEB,0xAC,0x9B), o3(0xEB,0xAC,0x9D),
+     o3(0xEB,0xAC,0x9E), o3(0xEB,0xAC,0x9F),
+     o3(0xEB,0xAC,0xA1), o3(0xEB,0xAC,0xA2),
+     o3(0xEB,0xAC,0xA3), o3(0xEB,0xAC,0xA4),
+     o3(0xEB,0xAC,0xA5), o3(0xEB,0xAC,0xA6),
+     o3(0xEB,0xAC,0xA7),
+
+#define from_CP949_91 WORDINDEX2INFO(34675)
+    from_CP949_81_offsets,
+    from_CP949_91_infos,
+
+#define from_CP949_92_infos WORDINDEX2INFO(34677)
+                INVALID, o3(0xEB,0xAC,0xA8),
+     o3(0xEB,0xAC,0xAA), o3(0xEB,0xAC,0xAC),
+     o3(0xEB,0xAC,0xAD), o3(0xEB,0xAC,0xAE),
+     o3(0xEB,0xAC,0xAF), o3(0xEB,0xAC,0xB0),
+     o3(0xEB,0xAC,0xB1), o3(0xEB,0xAC,0xB2),
+     o3(0xEB,0xAC,0xB3), o3(0xEB,0xAC,0xB7),
+     o3(0xEB,0xAC,0xB9), o3(0xEB,0xAC,0xBA),
+     o3(0xEB,0xAC,0xBF), o3(0xEB,0xAD,0x80),
+     o3(0xEB,0xAD,0x81), o3(0xEB,0xAD,0x82),
+     o3(0xEB,0xAD,0x83), o3(0xEB,0xAD,0x86),
+     o3(0xEB,0xAD,0x88), o3(0xEB,0xAD,0x8A),
+     o3(0xEB,0xAD,0x8B), o3(0xEB,0xAD,0x8C),
+     o3(0xEB,0xAD,0x8E), o3(0xEB,0xAD,0x91),
+     o3(0xEB,0xAD,0x92), o3(0xEB,0xAD,0x93),
+     o3(0xEB,0xAD,0x95), o3(0xEB,0xAD,0x96),
+     o3(0xEB,0xAD,0x97), o3(0xEB,0xAD,0x99),
+     o3(0xEB,0xAD,0x9A), o3(0xEB,0xAD,0x9B),
+     o3(0xEB,0xAD,0x9C), o3(0xEB,0xAD,0x9D),
+     o3(0xEB,0xAD,0x9E), o3(0xEB,0xAD,0x9F),
+     o3(0xEB,0xAD,0xA0), o3(0xEB,0xAD,0xA2),
+     o3(0xEB,0xAD,0xA4), o3(0xEB,0xAD,0xA5),
+     o3(0xEB,0xAD,0xA6), o3(0xEB,0xAD,0xA7),
+     o3(0xEB,0xAD,0xA8), o3(0xEB,0xAD,0xA9),
+     o3(0xEB,0xAD,0xAA), o3(0xEB,0xAD,0xAB),
+     o3(0xEB,0xAD,0xAD), o3(0xEB,0xAD,0xAE),
+     o3(0xEB,0xAD,0xAF), o3(0xEB,0xAD,0xB0),
+     o3(0xEB,0xAD,0xB1), o3(0xEB,0xAD,0xB2),
+     o3(0xEB,0xAD,0xB3), o3(0xEB,0xAD,0xB4),
+     o3(0xEB,0xAD,0xB5), o3(0xEB,0xAD,0xB6),
+     o3(0xEB,0xAD,0xB7), o3(0xEB,0xAD,0xB8),
+     o3(0xEB,0xAD,0xB9), o3(0xEB,0xAD,0xBA),
+     o3(0xEB,0xAD,0xBB), o3(0xEB,0xAD,0xBC),
+     o3(0xEB,0xAD,0xBD), o3(0xEB,0xAD,0xBE),
+     o3(0xEB,0xAD,0xBF), o3(0xEB,0xAE,0x80),
+     o3(0xEB,0xAE,0x81), o3(0xEB,0xAE,0x82),
+     o3(0xEB,0xAE,0x83), o3(0xEB,0xAE,0x84),
+     o3(0xEB,0xAE,0x85), o3(0xEB,0xAE,0x86),
+     o3(0xEB,0xAE,0x87), o3(0xEB,0xAE,0x89),
+     o3(0xEB,0xAE,0x8A), o3(0xEB,0xAE,0x8B),
+     o3(0xEB,0xAE,0x8D), o3(0xEB,0xAE,0x8E),
+     o3(0xEB,0xAE,0x8F), o3(0xEB,0xAE,0x91),
+     o3(0xEB,0xAE,0x92), o3(0xEB,0xAE,0x93),
+     o3(0xEB,0xAE,0x94), o3(0xEB,0xAE,0x95),
+     o3(0xEB,0xAE,0x96), o3(0xEB,0xAE,0x97),
+     o3(0xEB,0xAE,0x98), o3(0xEB,0xAE,0x99),
+     o3(0xEB,0xAE,0x9A), o3(0xEB,0xAE,0x9B),
+     o3(0xEB,0xAE,0x9C), o3(0xEB,0xAE,0x9D),
+     o3(0xEB,0xAE,0x9E), o3(0xEB,0xAE,0x9F),
+     o3(0xEB,0xAE,0xA0), o3(0xEB,0xAE,0xA1),
+     o3(0xEB,0xAE,0xA2), o3(0xEB,0xAE,0xA3),
+     o3(0xEB,0xAE,0xA5), o3(0xEB,0xAE,0xA6),
+     o3(0xEB,0xAE,0xA7), o3(0xEB,0xAE,0xA9),
+     o3(0xEB,0xAE,0xAA), o3(0xEB,0xAE,0xAB),
+     o3(0xEB,0xAE,0xAD), o3(0xEB,0xAE,0xAE),
+     o3(0xEB,0xAE,0xAF), o3(0xEB,0xAE,0xB0),
+     o3(0xEB,0xAE,0xB1), o3(0xEB,0xAE,0xB2),
+     o3(0xEB,0xAE,0xB3), o3(0xEB,0xAE,0xB5),
+     o3(0xEB,0xAE,0xB6), o3(0xEB,0xAE,0xB8),
+     o3(0xEB,0xAE,0xB9), o3(0xEB,0xAE,0xBA),
+     o3(0xEB,0xAE,0xBB), o3(0xEB,0xAE,0xBC),
+     o3(0xEB,0xAE,0xBD), o3(0xEB,0xAE,0xBE),
+     o3(0xEB,0xAE,0xBF), o3(0xEB,0xAF,0x81),
+     o3(0xEB,0xAF,0x82), o3(0xEB,0xAF,0x83),
+     o3(0xEB,0xAF,0x85), o3(0xEB,0xAF,0x86),
+     o3(0xEB,0xAF,0x87), o3(0xEB,0xAF,0x89),
+     o3(0xEB,0xAF,0x8A), o3(0xEB,0xAF,0x8B),
+     o3(0xEB,0xAF,0x8C), o3(0xEB,0xAF,0x8D),
+     o3(0xEB,0xAF,0x8E), o3(0xEB,0xAF,0x8F),
+     o3(0xEB,0xAF,0x91), o3(0xEB,0xAF,0x92),
+     o3(0xEB,0xAF,0x94), o3(0xEB,0xAF,0x95),
+     o3(0xEB,0xAF,0x96), o3(0xEB,0xAF,0x97),
+     o3(0xEB,0xAF,0x98), o3(0xEB,0xAF,0x99),
+     o3(0xEB,0xAF,0x9A), o3(0xEB,0xAF,0x9B),
+     o3(0xEB,0xAF,0x9C), o3(0xEB,0xAF,0x9D),
+     o3(0xEB,0xAF,0x9E), o3(0xEB,0xAF,0x9F),
+     o3(0xEB,0xAF,0xA0), o3(0xEB,0xAF,0xA1),
+     o3(0xEB,0xAF,0xA2), o3(0xEB,0xAF,0xA3),
+     o3(0xEB,0xAF,0xA4), o3(0xEB,0xAF,0xA5),
+     o3(0xEB,0xAF,0xA6), o3(0xEB,0xAF,0xA7),
+     o3(0xEB,0xAF,0xA8), o3(0xEB,0xAF,0xA9),
+     o3(0xEB,0xAF,0xAA), o3(0xEB,0xAF,0xAB),
+     o3(0xEB,0xAF,0xAC), o3(0xEB,0xAF,0xAD),
+     o3(0xEB,0xAF,0xAE), o3(0xEB,0xAF,0xAF),
+     o3(0xEB,0xAF,0xB0), o3(0xEB,0xAF,0xB1),
+     o3(0xEB,0xAF,0xB2), o3(0xEB,0xAF,0xB3),
+     o3(0xEB,0xAF,0xB4), o3(0xEB,0xAF,0xB5),
+     o3(0xEB,0xAF,0xB6), o3(0xEB,0xAF,0xB7),
+     o3(0xEB,0xAF,0xBA), o3(0xEB,0xAF,0xBB),
+     o3(0xEB,0xAF,0xBD), o3(0xEB,0xAF,0xBE),
+     o3(0xEB,0xB0,0x81),
+
+#define from_CP949_92 WORDINDEX2INFO(34856)
+    from_CP949_81_offsets,
+    from_CP949_92_infos,
+
+#define from_CP949_93_infos WORDINDEX2INFO(34858)
+                INVALID, o3(0xEB,0xB0,0x83),
+     o3(0xEB,0xB0,0x84), o3(0xEB,0xB0,0x85),
+     o3(0xEB,0xB0,0x86), o3(0xEB,0xB0,0x87),
+     o3(0xEB,0xB0,0x8A), o3(0xEB,0xB0,0x8E),
+     o3(0xEB,0xB0,0x90), o3(0xEB,0xB0,0x92),
+     o3(0xEB,0xB0,0x93), o3(0xEB,0xB0,0x99),
+     o3(0xEB,0xB0,0x9A), o3(0xEB,0xB0,0xA0),
+     o3(0xEB,0xB0,0xA1), o3(0xEB,0xB0,0xA2),
+     o3(0xEB,0xB0,0xA3), o3(0xEB,0xB0,0xA6),
+     o3(0xEB,0xB0,0xA8), o3(0xEB,0xB0,0xAA),
+     o3(0xEB,0xB0,0xAB), o3(0xEB,0xB0,0xAC),
+     o3(0xEB,0xB0,0xAE), o3(0xEB,0xB0,0xAF),
+     o3(0xEB,0xB0,0xB2), o3(0xEB,0xB0,0xB3),
+     o3(0xEB,0xB0,0xB5), o3(0xEB,0xB0,0xB6),
+     o3(0xEB,0xB0,0xB7), o3(0xEB,0xB0,0xB9),
+     o3(0xEB,0xB0,0xBA), o3(0xEB,0xB0,0xBB),
+     o3(0xEB,0xB0,0xBC), o3(0xEB,0xB0,0xBD),
+     o3(0xEB,0xB0,0xBE), o3(0xEB,0xB0,0xBF),
+     o3(0xEB,0xB1,0x82), o3(0xEB,0xB1,0x86),
+     o3(0xEB,0xB1,0x87), o3(0xEB,0xB1,0x88),
+     o3(0xEB,0xB1,0x8A), o3(0xEB,0xB1,0x8B),
+     o3(0xEB,0xB1,0x8E), o3(0xEB,0xB1,0x8F),
+     o3(0xEB,0xB1,0x91), o3(0xEB,0xB1,0x92),
+     o3(0xEB,0xB1,0x93), o3(0xEB,0xB1,0x94),
+     o3(0xEB,0xB1,0x95), o3(0xEB,0xB1,0x96),
+     o3(0xEB,0xB1,0x97), o3(0xEB,0xB1,0x98),
+     o3(0xEB,0xB1,0x99), o3(0xEB,0xB1,0x9A),
+     o3(0xEB,0xB1,0x9B), o3(0xEB,0xB1,0x9C),
+     o3(0xEB,0xB1,0x9E), o3(0xEB,0xB1,0x9F),
+     o3(0xEB,0xB1,0xA0), o3(0xEB,0xB1,0xA1),
+     o3(0xEB,0xB1,0xA2), o3(0xEB,0xB1,0xA3),
+     o3(0xEB,0xB1,0xA4), o3(0xEB,0xB1,0xA5),
+     o3(0xEB,0xB1,0xA6), o3(0xEB,0xB1,0xA7),
+     o3(0xEB,0xB1,0xA8), o3(0xEB,0xB1,0xA9),
+     o3(0xEB,0xB1,0xAA), o3(0xEB,0xB1,0xAB),
+     o3(0xEB,0xB1,0xAC), o3(0xEB,0xB1,0xAD),
+     o3(0xEB,0xB1,0xAE), o3(0xEB,0xB1,0xAF),
+     o3(0xEB,0xB1,0xB0), o3(0xEB,0xB1,0xB1),
+     o3(0xEB,0xB1,0xB2), o3(0xEB,0xB1,0xB3),
+     o3(0xEB,0xB1,0xB4), o3(0xEB,0xB1,0xB5),
+     o3(0xEB,0xB1,0xB6), o3(0xEB,0xB1,0xB7),
+     o3(0xEB,0xB1,0xB8), o3(0xEB,0xB1,0xB9),
+     o3(0xEB,0xB1,0xBA), o3(0xEB,0xB1,0xBB),
+     o3(0xEB,0xB1,0xBC), o3(0xEB,0xB1,0xBD),
+     o3(0xEB,0xB1,0xBE), o3(0xEB,0xB1,0xBF),
+     o3(0xEB,0xB2,0x80), o3(0xEB,0xB2,0x81),
+     o3(0xEB,0xB2,0x82), o3(0xEB,0xB2,0x83),
+     o3(0xEB,0xB2,0x86), o3(0xEB,0xB2,0x87),
+     o3(0xEB,0xB2,0x89), o3(0xEB,0xB2,0x8A),
+     o3(0xEB,0xB2,0x8D), o3(0xEB,0xB2,0x8F),
+     o3(0xEB,0xB2,0x90), o3(0xEB,0xB2,0x91),
+     o3(0xEB,0xB2,0x92), o3(0xEB,0xB2,0x93),
+     o3(0xEB,0xB2,0x96), o3(0xEB,0xB2,0x98),
+     o3(0xEB,0xB2,0x9B), o3(0xEB,0xB2,0x9C),
+     o3(0xEB,0xB2,0x9D), o3(0xEB,0xB2,0x9E),
+     o3(0xEB,0xB2,0x9F), o3(0xEB,0xB2,0xA2),
+     o3(0xEB,0xB2,0xA3), o3(0xEB,0xB2,0xA5),
+     o3(0xEB,0xB2,0xA6), o3(0xEB,0xB2,0xA9),
+     o3(0xEB,0xB2,0xAA), o3(0xEB,0xB2,0xAB),
+     o3(0xEB,0xB2,0xAC), o3(0xEB,0xB2,0xAD),
+     o3(0xEB,0xB2,0xAE), o3(0xEB,0xB2,0xAF),
+     o3(0xEB,0xB2,0xB2), o3(0xEB,0xB2,0xB6),
+     o3(0xEB,0xB2,0xB7), o3(0xEB,0xB2,0xB8),
+     o3(0xEB,0xB2,0xB9), o3(0xEB,0xB2,0xBA),
+     o3(0xEB,0xB2,0xBB), o3(0xEB,0xB2,0xBE),
+     o3(0xEB,0xB2,0xBF), o3(0xEB,0xB3,0x81),
+     o3(0xEB,0xB3,0x82), o3(0xEB,0xB3,0x83),
+     o3(0xEB,0xB3,0x85), o3(0xEB,0xB3,0x86),
+     o3(0xEB,0xB3,0x87), o3(0xEB,0xB3,0x88),
+     o3(0xEB,0xB3,0x89), o3(0xEB,0xB3,0x8A),
+     o3(0xEB,0xB3,0x8B), o3(0xEB,0xB3,0x8C),
+     o3(0xEB,0xB3,0x8E), o3(0xEB,0xB3,0x92),
+     o3(0xEB,0xB3,0x93), o3(0xEB,0xB3,0x94),
+     o3(0xEB,0xB3,0x96), o3(0xEB,0xB3,0x97),
+     o3(0xEB,0xB3,0x99), o3(0xEB,0xB3,0x9A),
+     o3(0xEB,0xB3,0x9B), o3(0xEB,0xB3,0x9D),
+     o3(0xEB,0xB3,0x9E), o3(0xEB,0xB3,0x9F),
+     o3(0xEB,0xB3,0xA0), o3(0xEB,0xB3,0xA1),
+     o3(0xEB,0xB3,0xA2), o3(0xEB,0xB3,0xA3),
+     o3(0xEB,0xB3,0xA4), o3(0xEB,0xB3,0xA5),
+     o3(0xEB,0xB3,0xA6), o3(0xEB,0xB3,0xA7),
+     o3(0xEB,0xB3,0xA8), o3(0xEB,0xB3,0xA9),
+     o3(0xEB,0xB3,0xAA), o3(0xEB,0xB3,0xAB),
+     o3(0xEB,0xB3,0xAC), o3(0xEB,0xB3,0xAD),
+     o3(0xEB,0xB3,0xAE), o3(0xEB,0xB3,0xAF),
+     o3(0xEB,0xB3,0xB0), o3(0xEB,0xB3,0xB1),
+     o3(0xEB,0xB3,0xB2), o3(0xEB,0xB3,0xB3),
+     o3(0xEB,0xB3,0xB7), o3(0xEB,0xB3,0xB9),
+     o3(0xEB,0xB3,0xBA), o3(0xEB,0xB3,0xBB),
+     o3(0xEB,0xB3,0xBD),
+
+#define from_CP949_93 WORDINDEX2INFO(35037)
+    from_CP949_81_offsets,
+    from_CP949_93_infos,
+
+#define from_CP949_94_infos WORDINDEX2INFO(35039)
+                INVALID, o3(0xEB,0xB3,0xBE),
+     o3(0xEB,0xB3,0xBF), o3(0xEB,0xB4,0x80),
+     o3(0xEB,0xB4,0x81), o3(0xEB,0xB4,0x82),
+     o3(0xEB,0xB4,0x83), o3(0xEB,0xB4,0x86),
+     o3(0xEB,0xB4,0x88), o3(0xEB,0xB4,0x8A),
+     o3(0xEB,0xB4,0x8B), o3(0xEB,0xB4,0x8C),
+     o3(0xEB,0xB4,0x8D), o3(0xEB,0xB4,0x8E),
+     o3(0xEB,0xB4,0x8F), o3(0xEB,0xB4,0x91),
+     o3(0xEB,0xB4,0x92), o3(0xEB,0xB4,0x93),
+     o3(0xEB,0xB4,0x95), o3(0xEB,0xB4,0x96),
+     o3(0xEB,0xB4,0x97), o3(0xEB,0xB4,0x98),
+     o3(0xEB,0xB4,0x99), o3(0xEB,0xB4,0x9A),
+     o3(0xEB,0xB4,0x9B), o3(0xEB,0xB4,0x9C),
+     o3(0xEB,0xB4,0x9D), o3(0xEB,0xB4,0x9E),
+     o3(0xEB,0xB4,0x9F), o3(0xEB,0xB4,0xA0),
+     o3(0xEB,0xB4,0xA1), o3(0xEB,0xB4,0xA2),
+     o3(0xEB,0xB4,0xA3), o3(0xEB,0xB4,0xA5),
+     o3(0xEB,0xB4,0xA6), o3(0xEB,0xB4,0xA7),
+     o3(0xEB,0xB4,0xA8), o3(0xEB,0xB4,0xA9),
+     o3(0xEB,0xB4,0xAA), o3(0xEB,0xB4,0xAB),
+     o3(0xEB,0xB4,0xAD), o3(0xEB,0xB4,0xAE),
+     o3(0xEB,0xB4,0xAF), o3(0xEB,0xB4,0xB0),
+     o3(0xEB,0xB4,0xB1), o3(0xEB,0xB4,0xB2),
+     o3(0xEB,0xB4,0xB3), o3(0xEB,0xB4,0xB4),
+     o3(0xEB,0xB4,0xB5), o3(0xEB,0xB4,0xB6),
+     o3(0xEB,0xB4,0xB7), o3(0xEB,0xB4,0xB8),
+     o3(0xEB,0xB4,0xB9), o3(0xEB,0xB4,0xBA),
+     o3(0xEB,0xB4,0xBB), o3(0xEB,0xB4,0xBC),
+     o3(0xEB,0xB4,0xBD), o3(0xEB,0xB4,0xBE),
+     o3(0xEB,0xB4,0xBF), o3(0xEB,0xB5,0x81),
+     o3(0xEB,0xB5,0x82), o3(0xEB,0xB5,0x83),
+     o3(0xEB,0xB5,0x84), o3(0xEB,0xB5,0x85),
+     o3(0xEB,0xB5,0x86), o3(0xEB,0xB5,0x87),
+     o3(0xEB,0xB5,0x8A), o3(0xEB,0xB5,0x8B),
+     o3(0xEB,0xB5,0x8D), o3(0xEB,0xB5,0x8E),
+     o3(0xEB,0xB5,0x8F), o3(0xEB,0xB5,0x91),
+     o3(0xEB,0xB5,0x92), o3(0xEB,0xB5,0x93),
+     o3(0xEB,0xB5,0x94), o3(0xEB,0xB5,0x95),
+     o3(0xEB,0xB5,0x96), o3(0xEB,0xB5,0x97),
+     o3(0xEB,0xB5,0x9A), o3(0xEB,0xB5,0x9B),
+     o3(0xEB,0xB5,0x9C), o3(0xEB,0xB5,0x9D),
+     o3(0xEB,0xB5,0x9E), o3(0xEB,0xB5,0x9F),
+     o3(0xEB,0xB5,0xA0), o3(0xEB,0xB5,0xA1),
+     o3(0xEB,0xB5,0xA2), o3(0xEB,0xB5,0xA3),
+     o3(0xEB,0xB5,0xA5), o3(0xEB,0xB5,0xA6),
+     o3(0xEB,0xB5,0xA7), o3(0xEB,0xB5,0xA9),
+     o3(0xEB,0xB5,0xAA), o3(0xEB,0xB5,0xAB),
+     o3(0xEB,0xB5,0xAC), o3(0xEB,0xB5,0xAD),
+     o3(0xEB,0xB5,0xAE), o3(0xEB,0xB5,0xAF),
+     o3(0xEB,0xB5,0xB0), o3(0xEB,0xB5,0xB1),
+     o3(0xEB,0xB5,0xB2), o3(0xEB,0xB5,0xB3),
+     o3(0xEB,0xB5,0xB4), o3(0xEB,0xB5,0xB5),
+     o3(0xEB,0xB5,0xB6), o3(0xEB,0xB5,0xB7),
+     o3(0xEB,0xB5,0xB8), o3(0xEB,0xB5,0xB9),
+     o3(0xEB,0xB5,0xBA), o3(0xEB,0xB5,0xBB),
+     o3(0xEB,0xB5,0xBC), o3(0xEB,0xB5,0xBD),
+     o3(0xEB,0xB5,0xBE), o3(0xEB,0xB5,0xBF),
+     o3(0xEB,0xB6,0x82), o3(0xEB,0xB6,0x83),
+     o3(0xEB,0xB6,0x85), o3(0xEB,0xB6,0x86),
+     o3(0xEB,0xB6,0x8B), o3(0xEB,0xB6,0x8C),
+     o3(0xEB,0xB6,0x8D), o3(0xEB,0xB6,0x8E),
+     o3(0xEB,0xB6,0x8F), o3(0xEB,0xB6,0x92),
+     o3(0xEB,0xB6,0x94), o3(0xEB,0xB6,0x96),
+     o3(0xEB,0xB6,0x97), o3(0xEB,0xB6,0x98),
+     o3(0xEB,0xB6,0x9B), o3(0xEB,0xB6,0x9D),
+     o3(0xEB,0xB6,0x9E), o3(0xEB,0xB6,0x9F),
+     o3(0xEB,0xB6,0xA0), o3(0xEB,0xB6,0xA1),
+     o3(0xEB,0xB6,0xA2), o3(0xEB,0xB6,0xA3),
+     o3(0xEB,0xB6,0xA5), o3(0xEB,0xB6,0xA6),
+     o3(0xEB,0xB6,0xA7), o3(0xEB,0xB6,0xA8),
+     o3(0xEB,0xB6,0xA9), o3(0xEB,0xB6,0xAA),
+     o3(0xEB,0xB6,0xAB), o3(0xEB,0xB6,0xAC),
+     o3(0xEB,0xB6,0xAD), o3(0xEB,0xB6,0xAE),
+     o3(0xEB,0xB6,0xAF), o3(0xEB,0xB6,0xB1),
+     o3(0xEB,0xB6,0xB2), o3(0xEB,0xB6,0xB3),
+     o3(0xEB,0xB6,0xB4), o3(0xEB,0xB6,0xB5),
+     o3(0xEB,0xB6,0xB6), o3(0xEB,0xB6,0xB7),
+     o3(0xEB,0xB6,0xB9), o3(0xEB,0xB6,0xBA),
+     o3(0xEB,0xB6,0xBB), o3(0xEB,0xB6,0xBC),
+     o3(0xEB,0xB6,0xBD), o3(0xEB,0xB6,0xBE),
+     o3(0xEB,0xB6,0xBF), o3(0xEB,0xB7,0x80),
+     o3(0xEB,0xB7,0x81), o3(0xEB,0xB7,0x82),
+     o3(0xEB,0xB7,0x83), o3(0xEB,0xB7,0x84),
+     o3(0xEB,0xB7,0x85), o3(0xEB,0xB7,0x86),
+     o3(0xEB,0xB7,0x87), o3(0xEB,0xB7,0x88),
+     o3(0xEB,0xB7,0x89), o3(0xEB,0xB7,0x8A),
+     o3(0xEB,0xB7,0x8B), o3(0xEB,0xB7,0x8C),
+     o3(0xEB,0xB7,0x8D), o3(0xEB,0xB7,0x8E),
+     o3(0xEB,0xB7,0x8F), o3(0xEB,0xB7,0x90),
+     o3(0xEB,0xB7,0x91),
+
+#define from_CP949_94 WORDINDEX2INFO(35218)
+    from_CP949_81_offsets,
+    from_CP949_94_infos,
+
+#define from_CP949_95_infos WORDINDEX2INFO(35220)
+                INVALID, o3(0xEB,0xB7,0x92),
+     o3(0xEB,0xB7,0x93), o3(0xEB,0xB7,0x96),
+     o3(0xEB,0xB7,0x97), o3(0xEB,0xB7,0x99),
+     o3(0xEB,0xB7,0x9A), o3(0xEB,0xB7,0x9B),
+     o3(0xEB,0xB7,0x9D), o3(0xEB,0xB7,0x9E),
+     o3(0xEB,0xB7,0x9F), o3(0xEB,0xB7,0xA0),
+     o3(0xEB,0xB7,0xA1), o3(0xEB,0xB7,0xA2),
+     o3(0xEB,0xB7,0xA3), o3(0xEB,0xB7,0xA4),
+     o3(0xEB,0xB7,0xA5), o3(0xEB,0xB7,0xA6),
+     o3(0xEB,0xB7,0xA7), o3(0xEB,0xB7,0xA8),
+     o3(0xEB,0xB7,0xAA), o3(0xEB,0xB7,0xAB),
+     o3(0xEB,0xB7,0xAC), o3(0xEB,0xB7,0xAD),
+     o3(0xEB,0xB7,0xAE), o3(0xEB,0xB7,0xAF),
+     o3(0xEB,0xB7,0xB1), o3(0xEB,0xB7,0xB2),
+     o3(0xEB,0xB7,0xB3), o3(0xEB,0xB7,0xB5),
+     o3(0xEB,0xB7,0xB6), o3(0xEB,0xB7,0xB7),
+     o3(0xEB,0xB7,0xB9), o3(0xEB,0xB7,0xBA),
+     o3(0xEB,0xB7,0xBB), o3(0xEB,0xB7,0xBC),
+     o3(0xEB,0xB7,0xBD), o3(0xEB,0xB7,0xBE),
+     o3(0xEB,0xB7,0xBF), o3(0xEB,0xB8,0x81),
+     o3(0xEB,0xB8,0x82), o3(0xEB,0xB8,0x84),
+     o3(0xEB,0xB8,0x86), o3(0xEB,0xB8,0x87),
+     o3(0xEB,0xB8,0x88), o3(0xEB,0xB8,0x89),
+     o3(0xEB,0xB8,0x8A), o3(0xEB,0xB8,0x8B),
+     o3(0xEB,0xB8,0x8E), o3(0xEB,0xB8,0x8F),
+     o3(0xEB,0xB8,0x91), o3(0xEB,0xB8,0x92),
+     o3(0xEB,0xB8,0x93), o3(0xEB,0xB8,0x95),
+     o3(0xEB,0xB8,0x96), o3(0xEB,0xB8,0x97),
+     o3(0xEB,0xB8,0x98), o3(0xEB,0xB8,0x99),
+     o3(0xEB,0xB8,0x9A), o3(0xEB,0xB8,0x9B),
+     o3(0xEB,0xB8,0x9E), o3(0xEB,0xB8,0xA0),
+     o3(0xEB,0xB8,0xA1), o3(0xEB,0xB8,0xA2),
+     o3(0xEB,0xB8,0xA3), o3(0xEB,0xB8,0xA4),
+     o3(0xEB,0xB8,0xA5), o3(0xEB,0xB8,0xA6),
+     o3(0xEB,0xB8,0xA7), o3(0xEB,0xB8,0xA8),
+     o3(0xEB,0xB8,0xA9), o3(0xEB,0xB8,0xAA),
+     o3(0xEB,0xB8,0xAB), o3(0xEB,0xB8,0xAC),
+     o3(0xEB,0xB8,0xAD), o3(0xEB,0xB8,0xAE),
+     o3(0xEB,0xB8,0xAF), o3(0xEB,0xB8,0xB0),
+     o3(0xEB,0xB8,0xB1), o3(0xEB,0xB8,0xB2),
+     o3(0xEB,0xB8,0xB3), o3(0xEB,0xB8,0xB4),
+     o3(0xEB,0xB8,0xB5), o3(0xEB,0xB8,0xB6),
+     o3(0xEB,0xB8,0xB7), o3(0xEB,0xB8,0xB8),
+     o3(0xEB,0xB8,0xB9), o3(0xEB,0xB8,0xBA),
+     o3(0xEB,0xB8,0xBB), o3(0xEB,0xB8,0xBC),
+     o3(0xEB,0xB8,0xBD), o3(0xEB,0xB8,0xBE),
+     o3(0xEB,0xB8,0xBF), o3(0xEB,0xB9,0x80),
+     o3(0xEB,0xB9,0x81), o3(0xEB,0xB9,0x82),
+     o3(0xEB,0xB9,0x83), o3(0xEB,0xB9,0x86),
+     o3(0xEB,0xB9,0x87), o3(0xEB,0xB9,0x89),
+     o3(0xEB,0xB9,0x8A), o3(0xEB,0xB9,0x8B),
+     o3(0xEB,0xB9,0x8D), o3(0xEB,0xB9,0x8F),
+     o3(0xEB,0xB9,0x90), o3(0xEB,0xB9,0x91),
+     o3(0xEB,0xB9,0x92), o3(0xEB,0xB9,0x93),
+     o3(0xEB,0xB9,0x96), o3(0xEB,0xB9,0x98),
+     o3(0xEB,0xB9,0x9C), o3(0xEB,0xB9,0x9D),
+     o3(0xEB,0xB9,0x9E), o3(0xEB,0xB9,0x9F),
+     o3(0xEB,0xB9,0xA2), o3(0xEB,0xB9,0xA3),
+     o3(0xEB,0xB9,0xA5), o3(0xEB,0xB9,0xA6),
+     o3(0xEB,0xB9,0xA7), o3(0xEB,0xB9,0xA9),
+     o3(0xEB,0xB9,0xAB), o3(0xEB,0xB9,0xAC),
+     o3(0xEB,0xB9,0xAD), o3(0xEB,0xB9,0xAE),
+     o3(0xEB,0xB9,0xAF), o3(0xEB,0xB9,0xB2),
+     o3(0xEB,0xB9,0xB6), o3(0xEB,0xB9,0xB7),
+     o3(0xEB,0xB9,0xB8), o3(0xEB,0xB9,0xB9),
+     o3(0xEB,0xB9,0xBA), o3(0xEB,0xB9,0xBE),
+     o3(0xEB,0xB9,0xBF), o3(0xEB,0xBA,0x81),
+     o3(0xEB,0xBA,0x82), o3(0xEB,0xBA,0x83),
+     o3(0xEB,0xBA,0x85), o3(0xEB,0xBA,0x86),
+     o3(0xEB,0xBA,0x87), o3(0xEB,0xBA,0x88),
+     o3(0xEB,0xBA,0x89), o3(0xEB,0xBA,0x8A),
+     o3(0xEB,0xBA,0x8B), o3(0xEB,0xBA,0x8E),
+     o3(0xEB,0xBA,0x92), o3(0xEB,0xBA,0x93),
+     o3(0xEB,0xBA,0x94), o3(0xEB,0xBA,0x95),
+     o3(0xEB,0xBA,0x96), o3(0xEB,0xBA,0x97),
+     o3(0xEB,0xBA,0x9A), o3(0xEB,0xBA,0x9B),
+     o3(0xEB,0xBA,0x9C), o3(0xEB,0xBA,0x9D),
+     o3(0xEB,0xBA,0x9E), o3(0xEB,0xBA,0x9F),
+     o3(0xEB,0xBA,0xA0), o3(0xEB,0xBA,0xA1),
+     o3(0xEB,0xBA,0xA2), o3(0xEB,0xBA,0xA3),
+     o3(0xEB,0xBA,0xA4), o3(0xEB,0xBA,0xA5),
+     o3(0xEB,0xBA,0xA6), o3(0xEB,0xBA,0xA7),
+     o3(0xEB,0xBA,0xA9), o3(0xEB,0xBA,0xAA),
+     o3(0xEB,0xBA,0xAB), o3(0xEB,0xBA,0xAC),
+     o3(0xEB,0xBA,0xAD), o3(0xEB,0xBA,0xAE),
+     o3(0xEB,0xBA,0xAF), o3(0xEB,0xBA,0xB0),
+     o3(0xEB,0xBA,0xB1), o3(0xEB,0xBA,0xB2),
+     o3(0xEB,0xBA,0xB3), o3(0xEB,0xBA,0xB4),
+     o3(0xEB,0xBA,0xB5), o3(0xEB,0xBA,0xB6),
+     o3(0xEB,0xBA,0xB7),
+
+#define from_CP949_95 WORDINDEX2INFO(35399)
+    from_CP949_81_offsets,
+    from_CP949_95_infos,
+
+#define from_CP949_96_infos WORDINDEX2INFO(35401)
+                INVALID, o3(0xEB,0xBA,0xB8),
+     o3(0xEB,0xBA,0xB9), o3(0xEB,0xBA,0xBA),
+     o3(0xEB,0xBA,0xBB), o3(0xEB,0xBA,0xBC),
+     o3(0xEB,0xBA,0xBD), o3(0xEB,0xBA,0xBE),
+     o3(0xEB,0xBA,0xBF), o3(0xEB,0xBB,0x80),
+     o3(0xEB,0xBB,0x81), o3(0xEB,0xBB,0x82),
+     o3(0xEB,0xBB,0x83), o3(0xEB,0xBB,0x84),
+     o3(0xEB,0xBB,0x85), o3(0xEB,0xBB,0x86),
+     o3(0xEB,0xBB,0x87), o3(0xEB,0xBB,0x88),
+     o3(0xEB,0xBB,0x89), o3(0xEB,0xBB,0x8A),
+     o3(0xEB,0xBB,0x8B), o3(0xEB,0xBB,0x8C),
+     o3(0xEB,0xBB,0x8D), o3(0xEB,0xBB,0x8E),
+     o3(0xEB,0xBB,0x8F), o3(0xEB,0xBB,0x92),
+     o3(0xEB,0xBB,0x93), o3(0xEB,0xBB,0x95),
+     o3(0xEB,0xBB,0x96), o3(0xEB,0xBB,0x99),
+     o3(0xEB,0xBB,0x9A), o3(0xEB,0xBB,0x9B),
+     o3(0xEB,0xBB,0x9C), o3(0xEB,0xBB,0x9D),
+     o3(0xEB,0xBB,0x9E), o3(0xEB,0xBB,0x9F),
+     o3(0xEB,0xBB,0xA1), o3(0xEB,0xBB,0xA2),
+     o3(0xEB,0xBB,0xA6), o3(0xEB,0xBB,0xA7),
+     o3(0xEB,0xBB,0xA8), o3(0xEB,0xBB,0xA9),
+     o3(0xEB,0xBB,0xAA), o3(0xEB,0xBB,0xAB),
+     o3(0xEB,0xBB,0xAD), o3(0xEB,0xBB,0xAE),
+     o3(0xEB,0xBB,0xAF), o3(0xEB,0xBB,0xB0),
+     o3(0xEB,0xBB,0xB1), o3(0xEB,0xBB,0xB2),
+     o3(0xEB,0xBB,0xB3), o3(0xEB,0xBB,0xB4),
+     o3(0xEB,0xBB,0xB5), o3(0xEB,0xBB,0xB6),
+     o3(0xEB,0xBB,0xB7), o3(0xEB,0xBB,0xB8),
+     o3(0xEB,0xBB,0xB9), o3(0xEB,0xBB,0xBA),
+     o3(0xEB,0xBB,0xBB), o3(0xEB,0xBB,0xBC),
+     o3(0xEB,0xBB,0xBD), o3(0xEB,0xBB,0xBE),
+     o3(0xEB,0xBB,0xBF), o3(0xEB,0xBC,0x80),
+     o3(0xEB,0xBC,0x82), o3(0xEB,0xBC,0x83),
+     o3(0xEB,0xBC,0x84), o3(0xEB,0xBC,0x85),
+     o3(0xEB,0xBC,0x86), o3(0xEB,0xBC,0x87),
+     o3(0xEB,0xBC,0x8A), o3(0xEB,0xBC,0x8B),
+     o3(0xEB,0xBC,0x8C), o3(0xEB,0xBC,0x8D),
+     o3(0xEB,0xBC,0x8E), o3(0xEB,0xBC,0x8F),
+     o3(0xEB,0xBC,0x90), o3(0xEB,0xBC,0x91),
+     o3(0xEB,0xBC,0x92), o3(0xEB,0xBC,0x93),
+     o3(0xEB,0xBC,0x94), o3(0xEB,0xBC,0x95),
+     o3(0xEB,0xBC,0x96), o3(0xEB,0xBC,0x97),
+     o3(0xEB,0xBC,0x9A), o3(0xEB,0xBC,0x9E),
+     o3(0xEB,0xBC,0x9F), o3(0xEB,0xBC,0xA0),
+     o3(0xEB,0xBC,0xA1), o3(0xEB,0xBC,0xA2),
+     o3(0xEB,0xBC,0xA3), o3(0xEB,0xBC,0xA4),
+     o3(0xEB,0xBC,0xA5), o3(0xEB,0xBC,0xA6),
+     o3(0xEB,0xBC,0xA7), o3(0xEB,0xBC,0xA8),
+     o3(0xEB,0xBC,0xA9), o3(0xEB,0xBC,0xAA),
+     o3(0xEB,0xBC,0xAB), o3(0xEB,0xBC,0xAC),
+     o3(0xEB,0xBC,0xAD), o3(0xEB,0xBC,0xAE),
+     o3(0xEB,0xBC,0xAF), o3(0xEB,0xBC,0xB0),
+     o3(0xEB,0xBC,0xB1), o3(0xEB,0xBC,0xB2),
+     o3(0xEB,0xBC,0xB3), o3(0xEB,0xBC,0xB4),
+     o3(0xEB,0xBC,0xB5), o3(0xEB,0xBC,0xB6),
+     o3(0xEB,0xBC,0xB7), o3(0xEB,0xBC,0xB8),
+     o3(0xEB,0xBC,0xB9), o3(0xEB,0xBC,0xBA),
+     o3(0xEB,0xBC,0xBB), o3(0xEB,0xBC,0xBC),
+     o3(0xEB,0xBC,0xBD), o3(0xEB,0xBC,0xBE),
+     o3(0xEB,0xBC,0xBF), o3(0xEB,0xBD,0x82),
+     o3(0xEB,0xBD,0x83), o3(0xEB,0xBD,0x85),
+     o3(0xEB,0xBD,0x86), o3(0xEB,0xBD,0x87),
+     o3(0xEB,0xBD,0x89), o3(0xEB,0xBD,0x8A),
+     o3(0xEB,0xBD,0x8B), o3(0xEB,0xBD,0x8C),
+     o3(0xEB,0xBD,0x8D), o3(0xEB,0xBD,0x8E),
+     o3(0xEB,0xBD,0x8F), o3(0xEB,0xBD,0x92),
+     o3(0xEB,0xBD,0x93), o3(0xEB,0xBD,0x94),
+     o3(0xEB,0xBD,0x96), o3(0xEB,0xBD,0x97),
+     o3(0xEB,0xBD,0x98), o3(0xEB,0xBD,0x99),
+     o3(0xEB,0xBD,0x9A), o3(0xEB,0xBD,0x9B),
+     o3(0xEB,0xBD,0x9C), o3(0xEB,0xBD,0x9D),
+     o3(0xEB,0xBD,0x9E), o3(0xEB,0xBD,0x9F),
+     o3(0xEB,0xBD,0xA0), o3(0xEB,0xBD,0xA1),
+     o3(0xEB,0xBD,0xA2), o3(0xEB,0xBD,0xA3),
+     o3(0xEB,0xBD,0xA4), o3(0xEB,0xBD,0xA5),
+     o3(0xEB,0xBD,0xA6), o3(0xEB,0xBD,0xA7),
+     o3(0xEB,0xBD,0xA8), o3(0xEB,0xBD,0xA9),
+     o3(0xEB,0xBD,0xAA), o3(0xEB,0xBD,0xAB),
+     o3(0xEB,0xBD,0xAC), o3(0xEB,0xBD,0xAD),
+     o3(0xEB,0xBD,0xAE), o3(0xEB,0xBD,0xAF),
+     o3(0xEB,0xBD,0xB0), o3(0xEB,0xBD,0xB1),
+     o3(0xEB,0xBD,0xB2), o3(0xEB,0xBD,0xB3),
+     o3(0xEB,0xBD,0xB4), o3(0xEB,0xBD,0xB5),
+     o3(0xEB,0xBD,0xB6), o3(0xEB,0xBD,0xB7),
+     o3(0xEB,0xBD,0xB8), o3(0xEB,0xBD,0xB9),
+     o3(0xEB,0xBD,0xBA), o3(0xEB,0xBD,0xBB),
+     o3(0xEB,0xBD,0xBC), o3(0xEB,0xBD,0xBD),
+     o3(0xEB,0xBD,0xBE), o3(0xEB,0xBD,0xBF),
+     o3(0xEB,0xBE,0x80), o3(0xEB,0xBE,0x81),
+     o3(0xEB,0xBE,0x82),
+
+#define from_CP949_96 WORDINDEX2INFO(35580)
+    from_CP949_81_offsets,
+    from_CP949_96_infos,
+
+#define from_CP949_97_infos WORDINDEX2INFO(35582)
+                INVALID, o3(0xEB,0xBE,0x83),
+     o3(0xEB,0xBE,0x84), o3(0xEB,0xBE,0x85),
+     o3(0xEB,0xBE,0x86), o3(0xEB,0xBE,0x87),
+     o3(0xEB,0xBE,0x88), o3(0xEB,0xBE,0x89),
+     o3(0xEB,0xBE,0x8A), o3(0xEB,0xBE,0x8B),
+     o3(0xEB,0xBE,0x8C), o3(0xEB,0xBE,0x8D),
+     o3(0xEB,0xBE,0x8E), o3(0xEB,0xBE,0x8F),
+     o3(0xEB,0xBE,0x90), o3(0xEB,0xBE,0x91),
+     o3(0xEB,0xBE,0x92), o3(0xEB,0xBE,0x93),
+     o3(0xEB,0xBE,0x95), o3(0xEB,0xBE,0x96),
+     o3(0xEB,0xBE,0x97), o3(0xEB,0xBE,0x98),
+     o3(0xEB,0xBE,0x99), o3(0xEB,0xBE,0x9A),
+     o3(0xEB,0xBE,0x9B), o3(0xEB,0xBE,0x9C),
+     o3(0xEB,0xBE,0x9D), o3(0xEB,0xBE,0x9E),
+     o3(0xEB,0xBE,0x9F), o3(0xEB,0xBE,0xA0),
+     o3(0xEB,0xBE,0xA1), o3(0xEB,0xBE,0xA2),
+     o3(0xEB,0xBE,0xA3), o3(0xEB,0xBE,0xA4),
+     o3(0xEB,0xBE,0xA5), o3(0xEB,0xBE,0xA6),
+     o3(0xEB,0xBE,0xA7), o3(0xEB,0xBE,0xA8),
+     o3(0xEB,0xBE,0xA9), o3(0xEB,0xBE,0xAA),
+     o3(0xEB,0xBE,0xAB), o3(0xEB,0xBE,0xAC),
+     o3(0xEB,0xBE,0xAD), o3(0xEB,0xBE,0xAE),
+     o3(0xEB,0xBE,0xAF), o3(0xEB,0xBE,0xB1),
+     o3(0xEB,0xBE,0xB2), o3(0xEB,0xBE,0xB3),
+     o3(0xEB,0xBE,0xB4), o3(0xEB,0xBE,0xB5),
+     o3(0xEB,0xBE,0xB6), o3(0xEB,0xBE,0xB7),
+     o3(0xEB,0xBE,0xB8), o3(0xEB,0xBE,0xB9),
+     o3(0xEB,0xBE,0xBA), o3(0xEB,0xBE,0xBB),
+     o3(0xEB,0xBE,0xBC), o3(0xEB,0xBE,0xBD),
+     o3(0xEB,0xBE,0xBE), o3(0xEB,0xBE,0xBF),
+     o3(0xEB,0xBF,0x80), o3(0xEB,0xBF,0x81),
+     o3(0xEB,0xBF,0x82), o3(0xEB,0xBF,0x83),
+     o3(0xEB,0xBF,0x84), o3(0xEB,0xBF,0x86),
+     o3(0xEB,0xBF,0x87), o3(0xEB,0xBF,0x88),
+     o3(0xEB,0xBF,0x89), o3(0xEB,0xBF,0x8A),
+     o3(0xEB,0xBF,0x8B), o3(0xEB,0xBF,0x8E),
+     o3(0xEB,0xBF,0x8F), o3(0xEB,0xBF,0x91),
+     o3(0xEB,0xBF,0x92), o3(0xEB,0xBF,0x93),
+     o3(0xEB,0xBF,0x95), o3(0xEB,0xBF,0x96),
+     o3(0xEB,0xBF,0x97), o3(0xEB,0xBF,0x98),
+     o3(0xEB,0xBF,0x99), o3(0xEB,0xBF,0x9A),
+     o3(0xEB,0xBF,0x9B), o3(0xEB,0xBF,0x9D),
+     o3(0xEB,0xBF,0x9E), o3(0xEB,0xBF,0xA0),
+     o3(0xEB,0xBF,0xA2), o3(0xEB,0xBF,0xA3),
+     o3(0xEB,0xBF,0xA4), o3(0xEB,0xBF,0xA5),
+     o3(0xEB,0xBF,0xA6), o3(0xEB,0xBF,0xA7),
+     o3(0xEB,0xBF,0xA8), o3(0xEB,0xBF,0xA9),
+     o3(0xEB,0xBF,0xAA), o3(0xEB,0xBF,0xAB),
+     o3(0xEB,0xBF,0xAC), o3(0xEB,0xBF,0xAD),
+     o3(0xEB,0xBF,0xAE), o3(0xEB,0xBF,0xAF),
+     o3(0xEB,0xBF,0xB0), o3(0xEB,0xBF,0xB1),
+     o3(0xEB,0xBF,0xB2), o3(0xEB,0xBF,0xB3),
+     o3(0xEB,0xBF,0xB4), o3(0xEB,0xBF,0xB5),
+     o3(0xEB,0xBF,0xB6), o3(0xEB,0xBF,0xB7),
+     o3(0xEB,0xBF,0xB8), o3(0xEB,0xBF,0xB9),
+     o3(0xEB,0xBF,0xBA), o3(0xEB,0xBF,0xBB),
+     o3(0xEB,0xBF,0xBC), o3(0xEB,0xBF,0xBD),
+     o3(0xEB,0xBF,0xBE), o3(0xEB,0xBF,0xBF),
+     o3(0xEC,0x80,0x80), o3(0xEC,0x80,0x81),
+     o3(0xEC,0x80,0x82), o3(0xEC,0x80,0x83),
+     o3(0xEC,0x80,0x84), o3(0xEC,0x80,0x85),
+     o3(0xEC,0x80,0x86), o3(0xEC,0x80,0x87),
+     o3(0xEC,0x80,0x88), o3(0xEC,0x80,0x89),
+     o3(0xEC,0x80,0x8A), o3(0xEC,0x80,0x8B),
+     o3(0xEC,0x80,0x8C), o3(0xEC,0x80,0x8D),
+     o3(0xEC,0x80,0x8E), o3(0xEC,0x80,0x8F),
+     o3(0xEC,0x80,0x90), o3(0xEC,0x80,0x91),
+     o3(0xEC,0x80,0x92), o3(0xEC,0x80,0x93),
+     o3(0xEC,0x80,0x94), o3(0xEC,0x80,0x95),
+     o3(0xEC,0x80,0x96), o3(0xEC,0x80,0x97),
+     o3(0xEC,0x80,0x98), o3(0xEC,0x80,0x99),
+     o3(0xEC,0x80,0x9A), o3(0xEC,0x80,0x9B),
+     o3(0xEC,0x80,0x9C), o3(0xEC,0x80,0x9D),
+     o3(0xEC,0x80,0x9E), o3(0xEC,0x80,0x9F),
+     o3(0xEC,0x80,0xA0), o3(0xEC,0x80,0xA1),
+     o3(0xEC,0x80,0xA2), o3(0xEC,0x80,0xA3),
+     o3(0xEC,0x80,0xA4), o3(0xEC,0x80,0xA5),
+     o3(0xEC,0x80,0xA6), o3(0xEC,0x80,0xA7),
+     o3(0xEC,0x80,0xA8), o3(0xEC,0x80,0xA9),
+     o3(0xEC,0x80,0xAA), o3(0xEC,0x80,0xAB),
+     o3(0xEC,0x80,0xAC), o3(0xEC,0x80,0xAD),
+     o3(0xEC,0x80,0xAE), o3(0xEC,0x80,0xAF),
+     o3(0xEC,0x80,0xB0), o3(0xEC,0x80,0xB1),
+     o3(0xEC,0x80,0xB2), o3(0xEC,0x80,0xB3),
+     o3(0xEC,0x80,0xB4), o3(0xEC,0x80,0xB5),
+     o3(0xEC,0x80,0xB6), o3(0xEC,0x80,0xB7),
+     o3(0xEC,0x80,0xB8), o3(0xEC,0x80,0xB9),
+     o3(0xEC,0x80,0xBA), o3(0xEC,0x80,0xBB),
+     o3(0xEC,0x80,0xBD), o3(0xEC,0x80,0xBE),
+     o3(0xEC,0x80,0xBF),
+
+#define from_CP949_97 WORDINDEX2INFO(35761)
+    from_CP949_81_offsets,
+    from_CP949_97_infos,
+
+#define from_CP949_98_infos WORDINDEX2INFO(35763)
+                INVALID, o3(0xEC,0x81,0x80),
+     o3(0xEC,0x81,0x81), o3(0xEC,0x81,0x82),
+     o3(0xEC,0x81,0x83), o3(0xEC,0x81,0x84),
+     o3(0xEC,0x81,0x85), o3(0xEC,0x81,0x86),
+     o3(0xEC,0x81,0x87), o3(0xEC,0x81,0x88),
+     o3(0xEC,0x81,0x89), o3(0xEC,0x81,0x8A),
+     o3(0xEC,0x81,0x8B), o3(0xEC,0x81,0x8C),
+     o3(0xEC,0x81,0x8D), o3(0xEC,0x81,0x8E),
+     o3(0xEC,0x81,0x8F), o3(0xEC,0x81,0x90),
+     o3(0xEC,0x81,0x92), o3(0xEC,0x81,0x93),
+     o3(0xEC,0x81,0x94), o3(0xEC,0x81,0x95),
+     o3(0xEC,0x81,0x96), o3(0xEC,0x81,0x97),
+     o3(0xEC,0x81,0x99), o3(0xEC,0x81,0x9A),
+     o3(0xEC,0x81,0x9B), o3(0xEC,0x81,0x9D),
+     o3(0xEC,0x81,0x9E), o3(0xEC,0x81,0x9F),
+     o3(0xEC,0x81,0xA1), o3(0xEC,0x81,0xA2),
+     o3(0xEC,0x81,0xA3), o3(0xEC,0x81,0xA4),
+     o3(0xEC,0x81,0xA5), o3(0xEC,0x81,0xA6),
+     o3(0xEC,0x81,0xA7), o3(0xEC,0x81,0xAA),
+     o3(0xEC,0x81,0xAB), o3(0xEC,0x81,0xAC),
+     o3(0xEC,0x81,0xAD), o3(0xEC,0x81,0xAE),
+     o3(0xEC,0x81,0xAF), o3(0xEC,0x81,0xB0),
+     o3(0xEC,0x81,0xB1), o3(0xEC,0x81,0xB2),
+     o3(0xEC,0x81,0xB3), o3(0xEC,0x81,0xB4),
+     o3(0xEC,0x81,0xB5), o3(0xEC,0x81,0xB6),
+     o3(0xEC,0x81,0xB7), o3(0xEC,0x81,0xB8),
+     o3(0xEC,0x81,0xB9), o3(0xEC,0x81,0xBA),
+     o3(0xEC,0x81,0xBB), o3(0xEC,0x81,0xBC),
+     o3(0xEC,0x81,0xBD), o3(0xEC,0x81,0xBE),
+     o3(0xEC,0x81,0xBF), o3(0xEC,0x82,0x80),
+     o3(0xEC,0x82,0x81), o3(0xEC,0x82,0x82),
+     o3(0xEC,0x82,0x83), o3(0xEC,0x82,0x84),
+     o3(0xEC,0x82,0x85), o3(0xEC,0x82,0x86),
+     o3(0xEC,0x82,0x87), o3(0xEC,0x82,0x88),
+     o3(0xEC,0x82,0x89), o3(0xEC,0x82,0x8A),
+     o3(0xEC,0x82,0x8B), o3(0xEC,0x82,0x8C),
+     o3(0xEC,0x82,0x8D), o3(0xEC,0x82,0x8E),
+     o3(0xEC,0x82,0x8F), o3(0xEC,0x82,0x92),
+     o3(0xEC,0x82,0x93), o3(0xEC,0x82,0x95),
+     o3(0xEC,0x82,0x96), o3(0xEC,0x82,0x97),
+     o3(0xEC,0x82,0x99), o3(0xEC,0x82,0x9A),
+     o3(0xEC,0x82,0x9B), o3(0xEC,0x82,0x9C),
+     o3(0xEC,0x82,0x9D), o3(0xEC,0x82,0x9E),
+     o3(0xEC,0x82,0x9F), o3(0xEC,0x82,0xA2),
+     o3(0xEC,0x82,0xA4), o3(0xEC,0x82,0xA6),
+     o3(0xEC,0x82,0xA7), o3(0xEC,0x82,0xA8),
+     o3(0xEC,0x82,0xA9), o3(0xEC,0x82,0xAA),
+     o3(0xEC,0x82,0xAB), o3(0xEC,0x82,0xAE),
+     o3(0xEC,0x82,0xB1), o3(0xEC,0x82,0xB2),
+     o3(0xEC,0x82,0xB7), o3(0xEC,0x82,0xB8),
+     o3(0xEC,0x82,0xB9), o3(0xEC,0x82,0xBA),
+     o3(0xEC,0x82,0xBB), o3(0xEC,0x82,0xBE),
+     o3(0xEC,0x83,0x82), o3(0xEC,0x83,0x83),
+     o3(0xEC,0x83,0x84), o3(0xEC,0x83,0x86),
+     o3(0xEC,0x83,0x87), o3(0xEC,0x83,0x8A),
+     o3(0xEC,0x83,0x8B), o3(0xEC,0x83,0x8D),
+     o3(0xEC,0x83,0x8E), o3(0xEC,0x83,0x8F),
+     o3(0xEC,0x83,0x91), o3(0xEC,0x83,0x92),
+     o3(0xEC,0x83,0x93), o3(0xEC,0x83,0x94),
+     o3(0xEC,0x83,0x95), o3(0xEC,0x83,0x96),
+     o3(0xEC,0x83,0x97), o3(0xEC,0x83,0x9A),
+     o3(0xEC,0x83,0x9E), o3(0xEC,0x83,0x9F),
+     o3(0xEC,0x83,0xA0), o3(0xEC,0x83,0xA1),
+     o3(0xEC,0x83,0xA2), o3(0xEC,0x83,0xA3),
+     o3(0xEC,0x83,0xA6), o3(0xEC,0x83,0xA7),
+     o3(0xEC,0x83,0xA9), o3(0xEC,0x83,0xAA),
+     o3(0xEC,0x83,0xAB), o3(0xEC,0x83,0xAD),
+     o3(0xEC,0x83,0xAE), o3(0xEC,0x83,0xAF),
+     o3(0xEC,0x83,0xB0), o3(0xEC,0x83,0xB1),
+     o3(0xEC,0x83,0xB2), o3(0xEC,0x83,0xB3),
+     o3(0xEC,0x83,0xB6), o3(0xEC,0x83,0xB8),
+     o3(0xEC,0x83,0xBA), o3(0xEC,0x83,0xBB),
+     o3(0xEC,0x83,0xBC), o3(0xEC,0x83,0xBD),
+     o3(0xEC,0x83,0xBE), o3(0xEC,0x83,0xBF),
+     o3(0xEC,0x84,0x81), o3(0xEC,0x84,0x82),
+     o3(0xEC,0x84,0x83), o3(0xEC,0x84,0x85),
+     o3(0xEC,0x84,0x86), o3(0xEC,0x84,0x87),
+     o3(0xEC,0x84,0x89), o3(0xEC,0x84,0x8A),
+     o3(0xEC,0x84,0x8B), o3(0xEC,0x84,0x8C),
+     o3(0xEC,0x84,0x8D), o3(0xEC,0x84,0x8E),
+     o3(0xEC,0x84,0x8F), o3(0xEC,0x84,0x91),
+     o3(0xEC,0x84,0x92), o3(0xEC,0x84,0x93),
+     o3(0xEC,0x84,0x94), o3(0xEC,0x84,0x96),
+     o3(0xEC,0x84,0x97), o3(0xEC,0x84,0x98),
+     o3(0xEC,0x84,0x99), o3(0xEC,0x84,0x9A),
+     o3(0xEC,0x84,0x9B), o3(0xEC,0x84,0xA1),
+     o3(0xEC,0x84,0xA2), o3(0xEC,0x84,0xA5),
+     o3(0xEC,0x84,0xA8), o3(0xEC,0x84,0xA9),
+     o3(0xEC,0x84,0xAA), o3(0xEC,0x84,0xAB),
+     o3(0xEC,0x84,0xAE),
+
+#define from_CP949_98 WORDINDEX2INFO(35942)
+    from_CP949_81_offsets,
+    from_CP949_98_infos,
+
+#define from_CP949_99_infos WORDINDEX2INFO(35944)
+                INVALID, o3(0xEC,0x84,0xB2),
+     o3(0xEC,0x84,0xB3), o3(0xEC,0x84,0xB4),
+     o3(0xEC,0x84,0xB5), o3(0xEC,0x84,0xB7),
+     o3(0xEC,0x84,0xBA), o3(0xEC,0x84,0xBB),
+     o3(0xEC,0x84,0xBD), o3(0xEC,0x84,0xBE),
+     o3(0xEC,0x84,0xBF), o3(0xEC,0x85,0x81),
+     o3(0xEC,0x85,0x82), o3(0xEC,0x85,0x83),
+     o3(0xEC,0x85,0x84), o3(0xEC,0x85,0x85),
+     o3(0xEC,0x85,0x86), o3(0xEC,0x85,0x87),
+     o3(0xEC,0x85,0x8A), o3(0xEC,0x85,0x8E),
+     o3(0xEC,0x85,0x8F), o3(0xEC,0x85,0x90),
+     o3(0xEC,0x85,0x91), o3(0xEC,0x85,0x92),
+     o3(0xEC,0x85,0x93), o3(0xEC,0x85,0x96),
+     o3(0xEC,0x85,0x97), o3(0xEC,0x85,0x99),
+     o3(0xEC,0x85,0x9A), o3(0xEC,0x85,0x9B),
+     o3(0xEC,0x85,0x9D), o3(0xEC,0x85,0x9E),
+     o3(0xEC,0x85,0x9F), o3(0xEC,0x85,0xA0),
+     o3(0xEC,0x85,0xA1), o3(0xEC,0x85,0xA2),
+     o3(0xEC,0x85,0xA3), o3(0xEC,0x85,0xA6),
+     o3(0xEC,0x85,0xAA), o3(0xEC,0x85,0xAB),
+     o3(0xEC,0x85,0xAC), o3(0xEC,0x85,0xAD),
+     o3(0xEC,0x85,0xAE), o3(0xEC,0x85,0xAF),
+     o3(0xEC,0x85,0xB1), o3(0xEC,0x85,0xB2),
+     o3(0xEC,0x85,0xB3), o3(0xEC,0x85,0xB5),
+     o3(0xEC,0x85,0xB6), o3(0xEC,0x85,0xB7),
+     o3(0xEC,0x85,0xB9), o3(0xEC,0x85,0xBA),
+     o3(0xEC,0x85,0xBB), o3(0xEC,0x85,0xBC),
+     o3(0xEC,0x85,0xBD), o3(0xEC,0x85,0xBE),
+     o3(0xEC,0x85,0xBF), o3(0xEC,0x86,0x80),
+     o3(0xEC,0x86,0x81), o3(0xEC,0x86,0x82),
+     o3(0xEC,0x86,0x83), o3(0xEC,0x86,0x84),
+     o3(0xEC,0x86,0x86), o3(0xEC,0x86,0x87),
+     o3(0xEC,0x86,0x88), o3(0xEC,0x86,0x89),
+     o3(0xEC,0x86,0x8A), o3(0xEC,0x86,0x8B),
+     o3(0xEC,0x86,0x8F), o3(0xEC,0x86,0x91),
+     o3(0xEC,0x86,0x92), o3(0xEC,0x86,0x93),
+     o3(0xEC,0x86,0x95), o3(0xEC,0x86,0x97),
+     o3(0xEC,0x86,0x98), o3(0xEC,0x86,0x99),
+     o3(0xEC,0x86,0x9A), o3(0xEC,0x86,0x9B),
+     o3(0xEC,0x86,0x9E), o3(0xEC,0x86,0xA0),
+     o3(0xEC,0x86,0xA2), o3(0xEC,0x86,0xA3),
+     o3(0xEC,0x86,0xA4), o3(0xEC,0x86,0xA6),
+     o3(0xEC,0x86,0xA7), o3(0xEC,0x86,0xAA),
+     o3(0xEC,0x86,0xAB), o3(0xEC,0x86,0xAD),
+     o3(0xEC,0x86,0xAE), o3(0xEC,0x86,0xAF),
+     o3(0xEC,0x86,0xB1), o3(0xEC,0x86,0xB2),
+     o3(0xEC,0x86,0xB3), o3(0xEC,0x86,0xB4),
+     o3(0xEC,0x86,0xB5), o3(0xEC,0x86,0xB6),
+     o3(0xEC,0x86,0xB7), o3(0xEC,0x86,0xB8),
+     o3(0xEC,0x86,0xB9), o3(0xEC,0x86,0xBA),
+     o3(0xEC,0x86,0xBB), o3(0xEC,0x86,0xBC),
+     o3(0xEC,0x86,0xBE), o3(0xEC,0x86,0xBF),
+     o3(0xEC,0x87,0x80), o3(0xEC,0x87,0x81),
+     o3(0xEC,0x87,0x82), o3(0xEC,0x87,0x83),
+     o3(0xEC,0x87,0x85), o3(0xEC,0x87,0x86),
+     o3(0xEC,0x87,0x87), o3(0xEC,0x87,0x89),
+     o3(0xEC,0x87,0x8A), o3(0xEC,0x87,0x8B),
+     o3(0xEC,0x87,0x8D), o3(0xEC,0x87,0x8E),
+     o3(0xEC,0x87,0x8F), o3(0xEC,0x87,0x90),
+     o3(0xEC,0x87,0x91), o3(0xEC,0x87,0x92),
+     o3(0xEC,0x87,0x93), o3(0xEC,0x87,0x95),
+     o3(0xEC,0x87,0x96), o3(0xEC,0x87,0x99),
+     o3(0xEC,0x87,0x9A), o3(0xEC,0x87,0x9B),
+     o3(0xEC,0x87,0x9C), o3(0xEC,0x87,0x9D),
+     o3(0xEC,0x87,0x9E), o3(0xEC,0x87,0x9F),
+     o3(0xEC,0x87,0xA1), o3(0xEC,0x87,0xA2),
+     o3(0xEC,0x87,0xA3), o3(0xEC,0x87,0xA5),
+     o3(0xEC,0x87,0xA6), o3(0xEC,0x87,0xA7),
+     o3(0xEC,0x87,0xA9), o3(0xEC,0x87,0xAA),
+     o3(0xEC,0x87,0xAB), o3(0xEC,0x87,0xAC),
+     o3(0xEC,0x87,0xAD), o3(0xEC,0x87,0xAE),
+     o3(0xEC,0x87,0xAF), o3(0xEC,0x87,0xB2),
+     o3(0xEC,0x87,0xB4), o3(0xEC,0x87,0xB5),
+     o3(0xEC,0x87,0xB6), o3(0xEC,0x87,0xB7),
+     o3(0xEC,0x87,0xB8), o3(0xEC,0x87,0xB9),
+     o3(0xEC,0x87,0xBA), o3(0xEC,0x87,0xBB),
+     o3(0xEC,0x87,0xBE), o3(0xEC,0x87,0xBF),
+     o3(0xEC,0x88,0x81), o3(0xEC,0x88,0x82),
+     o3(0xEC,0x88,0x83), o3(0xEC,0x88,0x85),
+     o3(0xEC,0x88,0x86), o3(0xEC,0x88,0x87),
+     o3(0xEC,0x88,0x88), o3(0xEC,0x88,0x89),
+     o3(0xEC,0x88,0x8A), o3(0xEC,0x88,0x8B),
+     o3(0xEC,0x88,0x8E), o3(0xEC,0x88,0x90),
+     o3(0xEC,0x88,0x92), o3(0xEC,0x88,0x93),
+     o3(0xEC,0x88,0x94), o3(0xEC,0x88,0x95),
+     o3(0xEC,0x88,0x96), o3(0xEC,0x88,0x97),
+     o3(0xEC,0x88,0x9A), o3(0xEC,0x88,0x9B),
+     o3(0xEC,0x88,0x9D), o3(0xEC,0x88,0x9E),
+     o3(0xEC,0x88,0xA1), o3(0xEC,0x88,0xA2),
+     o3(0xEC,0x88,0xA3),
+
+#define from_CP949_99 WORDINDEX2INFO(36123)
+    from_CP949_81_offsets,
+    from_CP949_99_infos,
+
+#define from_CP949_9A_infos WORDINDEX2INFO(36125)
+                INVALID, o3(0xEC,0x88,0xA4),
+     o3(0xEC,0x88,0xA5), o3(0xEC,0x88,0xA6),
+     o3(0xEC,0x88,0xA7), o3(0xEC,0x88,0xAA),
+     o3(0xEC,0x88,0xAC), o3(0xEC,0x88,0xAE),
+     o3(0xEC,0x88,0xB0), o3(0xEC,0x88,0xB3),
+     o3(0xEC,0x88,0xB5), o3(0xEC,0x88,0xB6),
+     o3(0xEC,0x88,0xB7), o3(0xEC,0x88,0xB8),
+     o3(0xEC,0x88,0xB9), o3(0xEC,0x88,0xBA),
+     o3(0xEC,0x88,0xBB), o3(0xEC,0x88,0xBC),
+     o3(0xEC,0x88,0xBD), o3(0xEC,0x88,0xBE),
+     o3(0xEC,0x88,0xBF), o3(0xEC,0x89,0x80),
+     o3(0xEC,0x89,0x81), o3(0xEC,0x89,0x82),
+     o3(0xEC,0x89,0x83), o3(0xEC,0x89,0x84),
+     o3(0xEC,0x89,0x85), o3(0xEC,0x89,0x86),
+     o3(0xEC,0x89,0x87), o3(0xEC,0x89,0x89),
+     o3(0xEC,0x89,0x8A), o3(0xEC,0x89,0x8B),
+     o3(0xEC,0x89,0x8C), o3(0xEC,0x89,0x8D),
+     o3(0xEC,0x89,0x8E), o3(0xEC,0x89,0x8F),
+     o3(0xEC,0x89,0x92), o3(0xEC,0x89,0x93),
+     o3(0xEC,0x89,0x95), o3(0xEC,0x89,0x96),
+     o3(0xEC,0x89,0x97), o3(0xEC,0x89,0x99),
+     o3(0xEC,0x89,0x9A), o3(0xEC,0x89,0x9B),
+     o3(0xEC,0x89,0x9C), o3(0xEC,0x89,0x9D),
+     o3(0xEC,0x89,0x9E), o3(0xEC,0x89,0x9F),
+     o3(0xEC,0x89,0xA1), o3(0xEC,0x89,0xA2),
+     o3(0xEC,0x89,0xA3), o3(0xEC,0x89,0xA4),
+     o3(0xEC,0x89,0xA6), o3(0xEC,0x89,0xA7),
+     o3(0xEC,0x89,0xA8), o3(0xEC,0x89,0xA9),
+     o3(0xEC,0x89,0xAA), o3(0xEC,0x89,0xAB),
+     o3(0xEC,0x89,0xAE), o3(0xEC,0x89,0xAF),
+     o3(0xEC,0x89,0xB1), o3(0xEC,0x89,0xB2),
+     o3(0xEC,0x89,0xB3), o3(0xEC,0x89,0xB5),
+     o3(0xEC,0x89,0xB6), o3(0xEC,0x89,0xB7),
+     o3(0xEC,0x89,0xB8), o3(0xEC,0x89,0xB9),
+     o3(0xEC,0x89,0xBA), o3(0xEC,0x89,0xBB),
+     o3(0xEC,0x89,0xBE), o3(0xEC,0x8A,0x80),
+     o3(0xEC,0x8A,0x82), o3(0xEC,0x8A,0x83),
+     o3(0xEC,0x8A,0x84), o3(0xEC,0x8A,0x85),
+     o3(0xEC,0x8A,0x86), o3(0xEC,0x8A,0x87),
+     o3(0xEC,0x8A,0x8A), o3(0xEC,0x8A,0x8B),
+     o3(0xEC,0x8A,0x8C), o3(0xEC,0x8A,0x8D),
+     o3(0xEC,0x8A,0x8E), o3(0xEC,0x8A,0x8F),
+     o3(0xEC,0x8A,0x91), o3(0xEC,0x8A,0x92),
+     o3(0xEC,0x8A,0x93), o3(0xEC,0x8A,0x94),
+     o3(0xEC,0x8A,0x95), o3(0xEC,0x8A,0x96),
+     o3(0xEC,0x8A,0x97), o3(0xEC,0x8A,0x99),
+     o3(0xEC,0x8A,0x9A), o3(0xEC,0x8A,0x9C),
+     o3(0xEC,0x8A,0x9E), o3(0xEC,0x8A,0x9F),
+     o3(0xEC,0x8A,0xA0), o3(0xEC,0x8A,0xA1),
+     o3(0xEC,0x8A,0xA2), o3(0xEC,0x8A,0xA3),
+     o3(0xEC,0x8A,0xA6), o3(0xEC,0x8A,0xA7),
+     o3(0xEC,0x8A,0xA9), o3(0xEC,0x8A,0xAA),
+     o3(0xEC,0x8A,0xAB), o3(0xEC,0x8A,0xAE),
+     o3(0xEC,0x8A,0xAF), o3(0xEC,0x8A,0xB0),
+     o3(0xEC,0x8A,0xB1), o3(0xEC,0x8A,0xB2),
+     o3(0xEC,0x8A,0xB3), o3(0xEC,0x8A,0xB6),
+     o3(0xEC,0x8A,0xB8), o3(0xEC,0x8A,0xBA),
+     o3(0xEC,0x8A,0xBB), o3(0xEC,0x8A,0xBC),
+     o3(0xEC,0x8A,0xBD), o3(0xEC,0x8A,0xBE),
+     o3(0xEC,0x8A,0xBF), o3(0xEC,0x8B,0x80),
+     o3(0xEC,0x8B,0x81), o3(0xEC,0x8B,0x82),
+     o3(0xEC,0x8B,0x83), o3(0xEC,0x8B,0x84),
+     o3(0xEC,0x8B,0x85), o3(0xEC,0x8B,0x86),
+     o3(0xEC,0x8B,0x87), o3(0xEC,0x8B,0x88),
+     o3(0xEC,0x8B,0x89), o3(0xEC,0x8B,0x8A),
+     o3(0xEC,0x8B,0x8B), o3(0xEC,0x8B,0x8C),
+     o3(0xEC,0x8B,0x8D), o3(0xEC,0x8B,0x8E),
+     o3(0xEC,0x8B,0x8F), o3(0xEC,0x8B,0x90),
+     o3(0xEC,0x8B,0x91), o3(0xEC,0x8B,0x92),
+     o3(0xEC,0x8B,0x93), o3(0xEC,0x8B,0x94),
+     o3(0xEC,0x8B,0x95), o3(0xEC,0x8B,0x96),
+     o3(0xEC,0x8B,0x97), o3(0xEC,0x8B,0x98),
+     o3(0xEC,0x8B,0x99), o3(0xEC,0x8B,0x9A),
+     o3(0xEC,0x8B,0x9B), o3(0xEC,0x8B,0x9E),
+     o3(0xEC,0x8B,0x9F), o3(0xEC,0x8B,0xA1),
+     o3(0xEC,0x8B,0xA2), o3(0xEC,0x8B,0xA5),
+     o3(0xEC,0x8B,0xA6), o3(0xEC,0x8B,0xA7),
+     o3(0xEC,0x8B,0xA8), o3(0xEC,0x8B,0xA9),
+     o3(0xEC,0x8B,0xAA), o3(0xEC,0x8B,0xAE),
+     o3(0xEC,0x8B,0xB0), o3(0xEC,0x8B,0xB2),
+     o3(0xEC,0x8B,0xB3), o3(0xEC,0x8B,0xB4),
+     o3(0xEC,0x8B,0xB5), o3(0xEC,0x8B,0xB7),
+     o3(0xEC,0x8B,0xBA), o3(0xEC,0x8B,0xBD),
+     o3(0xEC,0x8B,0xBE), o3(0xEC,0x8B,0xBF),
+     o3(0xEC,0x8C,0x81), o3(0xEC,0x8C,0x82),
+     o3(0xEC,0x8C,0x83), o3(0xEC,0x8C,0x84),
+     o3(0xEC,0x8C,0x85), o3(0xEC,0x8C,0x86),
+     o3(0xEC,0x8C,0x87), o3(0xEC,0x8C,0x8A),
+     o3(0xEC,0x8C,0x8B), o3(0xEC,0x8C,0x8E),
+     o3(0xEC,0x8C,0x8F),
+
+#define from_CP949_9A WORDINDEX2INFO(36304)
+    from_CP949_81_offsets,
+    from_CP949_9A_infos,
+
+#define from_CP949_9B_infos WORDINDEX2INFO(36306)
+                INVALID, o3(0xEC,0x8C,0x90),
+     o3(0xEC,0x8C,0x91), o3(0xEC,0x8C,0x92),
+     o3(0xEC,0x8C,0x96), o3(0xEC,0x8C,0x97),
+     o3(0xEC,0x8C,0x99), o3(0xEC,0x8C,0x9A),
+     o3(0xEC,0x8C,0x9B), o3(0xEC,0x8C,0x9D),
+     o3(0xEC,0x8C,0x9E), o3(0xEC,0x8C,0x9F),
+     o3(0xEC,0x8C,0xA0), o3(0xEC,0x8C,0xA1),
+     o3(0xEC,0x8C,0xA2), o3(0xEC,0x8C,0xA3),
+     o3(0xEC,0x8C,0xA6), o3(0xEC,0x8C,0xA7),
+     o3(0xEC,0x8C,0xAA), o3(0xEC,0x8C,0xAB),
+     o3(0xEC,0x8C,0xAC), o3(0xEC,0x8C,0xAD),
+     o3(0xEC,0x8C,0xAE), o3(0xEC,0x8C,0xAF),
+     o3(0xEC,0x8C,0xB0), o3(0xEC,0x8C,0xB1),
+     o3(0xEC,0x8C,0xB2), o3(0xEC,0x8C,0xB3),
+     o3(0xEC,0x8C,0xB4), o3(0xEC,0x8C,0xB5),
+     o3(0xEC,0x8C,0xB6), o3(0xEC,0x8C,0xB7),
+     o3(0xEC,0x8C,0xB8), o3(0xEC,0x8C,0xB9),
+     o3(0xEC,0x8C,0xBA), o3(0xEC,0x8C,0xBB),
+     o3(0xEC,0x8C,0xBC), o3(0xEC,0x8C,0xBD),
+     o3(0xEC,0x8C,0xBE), o3(0xEC,0x8C,0xBF),
+     o3(0xEC,0x8D,0x80), o3(0xEC,0x8D,0x81),
+     o3(0xEC,0x8D,0x82), o3(0xEC,0x8D,0x83),
+     o3(0xEC,0x8D,0x84), o3(0xEC,0x8D,0x86),
+     o3(0xEC,0x8D,0x87), o3(0xEC,0x8D,0x88),
+     o3(0xEC,0x8D,0x89), o3(0xEC,0x8D,0x8A),
+     o3(0xEC,0x8D,0x8B), o3(0xEC,0x8D,0x8C),
+     o3(0xEC,0x8D,0x8D), o3(0xEC,0x8D,0x8E),
+     o3(0xEC,0x8D,0x8F), o3(0xEC,0x8D,0x90),
+     o3(0xEC,0x8D,0x91), o3(0xEC,0x8D,0x92),
+     o3(0xEC,0x8D,0x93), o3(0xEC,0x8D,0x94),
+     o3(0xEC,0x8D,0x95), o3(0xEC,0x8D,0x96),
+     o3(0xEC,0x8D,0x97), o3(0xEC,0x8D,0x98),
+     o3(0xEC,0x8D,0x99), o3(0xEC,0x8D,0x9A),
+     o3(0xEC,0x8D,0x9B), o3(0xEC,0x8D,0x9C),
+     o3(0xEC,0x8D,0x9D), o3(0xEC,0x8D,0x9E),
+     o3(0xEC,0x8D,0x9F), o3(0xEC,0x8D,0xA0),
+     o3(0xEC,0x8D,0xA1), o3(0xEC,0x8D,0xA2),
+     o3(0xEC,0x8D,0xA3), o3(0xEC,0x8D,0xA4),
+     o3(0xEC,0x8D,0xA5), o3(0xEC,0x8D,0xA6),
+     o3(0xEC,0x8D,0xA7), o3(0xEC,0x8D,0xAA),
+     o3(0xEC,0x8D,0xAB), o3(0xEC,0x8D,0xAD),
+     o3(0xEC,0x8D,0xAE), o3(0xEC,0x8D,0xAF),
+     o3(0xEC,0x8D,0xB1), o3(0xEC,0x8D,0xB3),
+     o3(0xEC,0x8D,0xB4), o3(0xEC,0x8D,0xB5),
+     o3(0xEC,0x8D,0xB6), o3(0xEC,0x8D,0xB7),
+     o3(0xEC,0x8D,0xBA), o3(0xEC,0x8D,0xBB),
+     o3(0xEC,0x8D,0xBE), o3(0xEC,0x8D,0xBF),
+     o3(0xEC,0x8E,0x80), o3(0xEC,0x8E,0x81),
+     o3(0xEC,0x8E,0x82), o3(0xEC,0x8E,0x83),
+     o3(0xEC,0x8E,0x85), o3(0xEC,0x8E,0x86),
+     o3(0xEC,0x8E,0x87), o3(0xEC,0x8E,0x89),
+     o3(0xEC,0x8E,0x8A), o3(0xEC,0x8E,0x8B),
+     o3(0xEC,0x8E,0x8D), o3(0xEC,0x8E,0x8E),
+     o3(0xEC,0x8E,0x8F), o3(0xEC,0x8E,0x90),
+     o3(0xEC,0x8E,0x91), o3(0xEC,0x8E,0x92),
+     o3(0xEC,0x8E,0x93), o3(0xEC,0x8E,0x94),
+     o3(0xEC,0x8E,0x95), o3(0xEC,0x8E,0x96),
+     o3(0xEC,0x8E,0x97), o3(0xEC,0x8E,0x98),
+     o3(0xEC,0x8E,0x99), o3(0xEC,0x8E,0x9A),
+     o3(0xEC,0x8E,0x9B), o3(0xEC,0x8E,0x9C),
+     o3(0xEC,0x8E,0x9D), o3(0xEC,0x8E,0x9E),
+     o3(0xEC,0x8E,0x9F), o3(0xEC,0x8E,0xA0),
+     o3(0xEC,0x8E,0xA1), o3(0xEC,0x8E,0xA2),
+     o3(0xEC,0x8E,0xA3), o3(0xEC,0x8E,0xA4),
+     o3(0xEC,0x8E,0xA5), o3(0xEC,0x8E,0xA6),
+     o3(0xEC,0x8E,0xA7), o3(0xEC,0x8E,0xA8),
+     o3(0xEC,0x8E,0xA9), o3(0xEC,0x8E,0xAA),
+     o3(0xEC,0x8E,0xAB), o3(0xEC,0x8E,0xAC),
+     o3(0xEC,0x8E,0xAD), o3(0xEC,0x8E,0xAE),
+     o3(0xEC,0x8E,0xAF), o3(0xEC,0x8E,0xB0),
+     o3(0xEC,0x8E,0xB1), o3(0xEC,0x8E,0xB2),
+     o3(0xEC,0x8E,0xB3), o3(0xEC,0x8E,0xB4),
+     o3(0xEC,0x8E,0xB5), o3(0xEC,0x8E,0xB6),
+     o3(0xEC,0x8E,0xB7), o3(0xEC,0x8E,0xB8),
+     o3(0xEC,0x8E,0xB9), o3(0xEC,0x8E,0xBA),
+     o3(0xEC,0x8E,0xBB), o3(0xEC,0x8E,0xBC),
+     o3(0xEC,0x8E,0xBD), o3(0xEC,0x8E,0xBE),
+     o3(0xEC,0x8E,0xBF), o3(0xEC,0x8F,0x81),
+     o3(0xEC,0x8F,0x82), o3(0xEC,0x8F,0x83),
+     o3(0xEC,0x8F,0x84), o3(0xEC,0x8F,0x85),
+     o3(0xEC,0x8F,0x86), o3(0xEC,0x8F,0x87),
+     o3(0xEC,0x8F,0x88), o3(0xEC,0x8F,0x89),
+     o3(0xEC,0x8F,0x8A), o3(0xEC,0x8F,0x8B),
+     o3(0xEC,0x8F,0x8C), o3(0xEC,0x8F,0x8D),
+     o3(0xEC,0x8F,0x8E), o3(0xEC,0x8F,0x8F),
+     o3(0xEC,0x8F,0x90), o3(0xEC,0x8F,0x91),
+     o3(0xEC,0x8F,0x92), o3(0xEC,0x8F,0x93),
+     o3(0xEC,0x8F,0x94), o3(0xEC,0x8F,0x95),
+     o3(0xEC,0x8F,0x96), o3(0xEC,0x8F,0x97),
+     o3(0xEC,0x8F,0x9A),
+
+#define from_CP949_9B WORDINDEX2INFO(36485)
+    from_CP949_81_offsets,
+    from_CP949_9B_infos,
+
+#define from_CP949_9C_infos WORDINDEX2INFO(36487)
+                INVALID, o3(0xEC,0x8F,0x9B),
+     o3(0xEC,0x8F,0x9D), o3(0xEC,0x8F,0x9E),
+     o3(0xEC,0x8F,0xA1), o3(0xEC,0x8F,0xA3),
+     o3(0xEC,0x8F,0xA4), o3(0xEC,0x8F,0xA5),
+     o3(0xEC,0x8F,0xA6), o3(0xEC,0x8F,0xA7),
+     o3(0xEC,0x8F,0xAA), o3(0xEC,0x8F,0xAB),
+     o3(0xEC,0x8F,0xAC), o3(0xEC,0x8F,0xAE),
+     o3(0xEC,0x8F,0xAF), o3(0xEC,0x8F,0xB0),
+     o3(0xEC,0x8F,0xB1), o3(0xEC,0x8F,0xB2),
+     o3(0xEC,0x8F,0xB3), o3(0xEC,0x8F,0xB6),
+     o3(0xEC,0x8F,0xB7), o3(0xEC,0x8F,0xB9),
+     o3(0xEC,0x8F,0xBA), o3(0xEC,0x8F,0xBB),
+     o3(0xEC,0x8F,0xBC), o3(0xEC,0x8F,0xBD),
+     o3(0xEC,0x8F,0xBE), o3(0xEC,0x8F,0xBF),
+     o3(0xEC,0x90,0x80), o3(0xEC,0x90,0x81),
+     o3(0xEC,0x90,0x82), o3(0xEC,0x90,0x83),
+     o3(0xEC,0x90,0x84), o3(0xEC,0x90,0x85),
+     o3(0xEC,0x90,0x86), o3(0xEC,0x90,0x87),
+     o3(0xEC,0x90,0x89), o3(0xEC,0x90,0x8A),
+     o3(0xEC,0x90,0x8B), o3(0xEC,0x90,0x8C),
+     o3(0xEC,0x90,0x8D), o3(0xEC,0x90,0x8E),
+     o3(0xEC,0x90,0x8F), o3(0xEC,0x90,0x91),
+     o3(0xEC,0x90,0x92), o3(0xEC,0x90,0x93),
+     o3(0xEC,0x90,0x94), o3(0xEC,0x90,0x95),
+     o3(0xEC,0x90,0x96), o3(0xEC,0x90,0x97),
+     o3(0xEC,0x90,0x98), o3(0xEC,0x90,0x99),
+     o3(0xEC,0x90,0x9A), o3(0xEC,0x90,0x9B),
+     o3(0xEC,0x90,0x9C), o3(0xEC,0x90,0x9D),
+     o3(0xEC,0x90,0x9E), o3(0xEC,0x90,0x9F),
+     o3(0xEC,0x90,0xA0), o3(0xEC,0x90,0xA1),
+     o3(0xEC,0x90,0xA2), o3(0xEC,0x90,0xA3),
+     o3(0xEC,0x90,0xA5), o3(0xEC,0x90,0xA6),
+     o3(0xEC,0x90,0xA7), o3(0xEC,0x90,0xA8),
+     o3(0xEC,0x90,0xA9), o3(0xEC,0x90,0xAA),
+     o3(0xEC,0x90,0xAB), o3(0xEC,0x90,0xAD),
+     o3(0xEC,0x90,0xAE), o3(0xEC,0x90,0xAF),
+     o3(0xEC,0x90,0xB1), o3(0xEC,0x90,0xB2),
+     o3(0xEC,0x90,0xB3), o3(0xEC,0x90,0xB5),
+     o3(0xEC,0x90,0xB6), o3(0xEC,0x90,0xB7),
+     o3(0xEC,0x90,0xB8), o3(0xEC,0x90,0xB9),
+     o3(0xEC,0x90,0xBA), o3(0xEC,0x90,0xBB),
+     o3(0xEC,0x90,0xBE), o3(0xEC,0x90,0xBF),
+     o3(0xEC,0x91,0x80), o3(0xEC,0x91,0x81),
+     o3(0xEC,0x91,0x82), o3(0xEC,0x91,0x83),
+     o3(0xEC,0x91,0x84), o3(0xEC,0x91,0x85),
+     o3(0xEC,0x91,0x86), o3(0xEC,0x91,0x87),
+     o3(0xEC,0x91,0x89), o3(0xEC,0x91,0x8A),
+     o3(0xEC,0x91,0x8B), o3(0xEC,0x91,0x8C),
+     o3(0xEC,0x91,0x8D), o3(0xEC,0x91,0x8E),
+     o3(0xEC,0x91,0x8F), o3(0xEC,0x91,0x90),
+     o3(0xEC,0x91,0x91), o3(0xEC,0x91,0x92),
+     o3(0xEC,0x91,0x93), o3(0xEC,0x91,0x94),
+     o3(0xEC,0x91,0x95), o3(0xEC,0x91,0x96),
+     o3(0xEC,0x91,0x97), o3(0xEC,0x91,0x98),
+     o3(0xEC,0x91,0x99), o3(0xEC,0x91,0x9A),
+     o3(0xEC,0x91,0x9B), o3(0xEC,0x91,0x9C),
+     o3(0xEC,0x91,0x9D), o3(0xEC,0x91,0x9E),
+     o3(0xEC,0x91,0x9F), o3(0xEC,0x91,0xA0),
+     o3(0xEC,0x91,0xA1), o3(0xEC,0x91,0xA2),
+     o3(0xEC,0x91,0xA3), o3(0xEC,0x91,0xA6),
+     o3(0xEC,0x91,0xA7), o3(0xEC,0x91,0xA9),
+     o3(0xEC,0x91,0xAA), o3(0xEC,0x91,0xAB),
+     o3(0xEC,0x91,0xAD), o3(0xEC,0x91,0xAE),
+     o3(0xEC,0x91,0xAF), o3(0xEC,0x91,0xB0),
+     o3(0xEC,0x91,0xB1), o3(0xEC,0x91,0xB2),
+     o3(0xEC,0x91,0xB3), o3(0xEC,0x91,0xB6),
+     o3(0xEC,0x91,0xB7), o3(0xEC,0x91,0xB8),
+     o3(0xEC,0x91,0xBA), o3(0xEC,0x91,0xBB),
+     o3(0xEC,0x91,0xBC), o3(0xEC,0x91,0xBD),
+     o3(0xEC,0x91,0xBE), o3(0xEC,0x91,0xBF),
+     o3(0xEC,0x92,0x81), o3(0xEC,0x92,0x82),
+     o3(0xEC,0x92,0x83), o3(0xEC,0x92,0x84),
+     o3(0xEC,0x92,0x85), o3(0xEC,0x92,0x86),
+     o3(0xEC,0x92,0x87), o3(0xEC,0x92,0x88),
+     o3(0xEC,0x92,0x89), o3(0xEC,0x92,0x8A),
+     o3(0xEC,0x92,0x8B), o3(0xEC,0x92,0x8C),
+     o3(0xEC,0x92,0x8D), o3(0xEC,0x92,0x8E),
+     o3(0xEC,0x92,0x8F), o3(0xEC,0x92,0x90),
+     o3(0xEC,0x92,0x91), o3(0xEC,0x92,0x92),
+     o3(0xEC,0x92,0x93), o3(0xEC,0x92,0x95),
+     o3(0xEC,0x92,0x96), o3(0xEC,0x92,0x97),
+     o3(0xEC,0x92,0x98), o3(0xEC,0x92,0x99),
+     o3(0xEC,0x92,0x9A), o3(0xEC,0x92,0x9B),
+     o3(0xEC,0x92,0x9D), o3(0xEC,0x92,0x9E),
+     o3(0xEC,0x92,0x9F), o3(0xEC,0x92,0xA0),
+     o3(0xEC,0x92,0xA1), o3(0xEC,0x92,0xA2),
+     o3(0xEC,0x92,0xA3), o3(0xEC,0x92,0xA4),
+     o3(0xEC,0x92,0xA5), o3(0xEC,0x92,0xA6),
+     o3(0xEC,0x92,0xA7), o3(0xEC,0x92,0xA8),
+     o3(0xEC,0x92,0xA9),
+
+#define from_CP949_9C WORDINDEX2INFO(36666)
+    from_CP949_81_offsets,
+    from_CP949_9C_infos,
+
+#define from_CP949_9D_infos WORDINDEX2INFO(36668)
+                INVALID, o3(0xEC,0x92,0xAA),
+     o3(0xEC,0x92,0xAB), o3(0xEC,0x92,0xAC),
+     o3(0xEC,0x92,0xAD), o3(0xEC,0x92,0xAE),
+     o3(0xEC,0x92,0xAF), o3(0xEC,0x92,0xB0),
+     o3(0xEC,0x92,0xB1), o3(0xEC,0x92,0xB2),
+     o3(0xEC,0x92,0xB3), o3(0xEC,0x92,0xB4),
+     o3(0xEC,0x92,0xB5), o3(0xEC,0x92,0xB6),
+     o3(0xEC,0x92,0xB7), o3(0xEC,0x92,0xB9),
+     o3(0xEC,0x92,0xBA), o3(0xEC,0x92,0xBB),
+     o3(0xEC,0x92,0xBD), o3(0xEC,0x92,0xBE),
+     o3(0xEC,0x92,0xBF), o3(0xEC,0x93,0x80),
+     o3(0xEC,0x93,0x81), o3(0xEC,0x93,0x82),
+     o3(0xEC,0x93,0x83), o3(0xEC,0x93,0x84),
+     o3(0xEC,0x93,0x85), o3(0xEC,0x93,0x86),
+     o3(0xEC,0x93,0x87), o3(0xEC,0x93,0x88),
+     o3(0xEC,0x93,0x89), o3(0xEC,0x93,0x8A),
+     o3(0xEC,0x93,0x8B), o3(0xEC,0x93,0x8C),
+     o3(0xEC,0x93,0x8D), o3(0xEC,0x93,0x8E),
+     o3(0xEC,0x93,0x8F), o3(0xEC,0x93,0x90),
+     o3(0xEC,0x93,0x91), o3(0xEC,0x93,0x92),
+     o3(0xEC,0x93,0x93), o3(0xEC,0x93,0x94),
+     o3(0xEC,0x93,0x95), o3(0xEC,0x93,0x96),
+     o3(0xEC,0x93,0x97), o3(0xEC,0x93,0x98),
+     o3(0xEC,0x93,0x99), o3(0xEC,0x93,0x9A),
+     o3(0xEC,0x93,0x9B), o3(0xEC,0x93,0x9C),
+     o3(0xEC,0x93,0x9D), o3(0xEC,0x93,0x9E),
+     o3(0xEC,0x93,0x9F), o3(0xEC,0x93,0xA0),
+     o3(0xEC,0x93,0xA1), o3(0xEC,0x93,0xA2),
+     o3(0xEC,0x93,0xA3), o3(0xEC,0x93,0xA4),
+     o3(0xEC,0x93,0xA5), o3(0xEC,0x93,0xA6),
+     o3(0xEC,0x93,0xA7), o3(0xEC,0x93,0xA8),
+     o3(0xEC,0x93,0xAA), o3(0xEC,0x93,0xAB),
+     o3(0xEC,0x93,0xAC), o3(0xEC,0x93,0xAD),
+     o3(0xEC,0x93,0xAE), o3(0xEC,0x93,0xAF),
+     o3(0xEC,0x93,0xB2), o3(0xEC,0x93,0xB3),
+     o3(0xEC,0x93,0xB5), o3(0xEC,0x93,0xB6),
+     o3(0xEC,0x93,0xB7), o3(0xEC,0x93,0xB9),
+     o3(0xEC,0x93,0xBB), o3(0xEC,0x93,0xBC),
+     o3(0xEC,0x93,0xBD), o3(0xEC,0x93,0xBE),
+     o3(0xEC,0x94,0x82), o3(0xEC,0x94,0x83),
+     o3(0xEC,0x94,0x84), o3(0xEC,0x94,0x85),
+     o3(0xEC,0x94,0x86), o3(0xEC,0x94,0x87),
+     o3(0xEC,0x94,0x88), o3(0xEC,0x94,0x89),
+     o3(0xEC,0x94,0x8A), o3(0xEC,0x94,0x8B),
+     o3(0xEC,0x94,0x8D), o3(0xEC,0x94,0x8E),
+     o3(0xEC,0x94,0x8F), o3(0xEC,0x94,0x91),
+     o3(0xEC,0x94,0x92), o3(0xEC,0x94,0x93),
+     o3(0xEC,0x94,0x95), o3(0xEC,0x94,0x96),
+     o3(0xEC,0x94,0x97), o3(0xEC,0x94,0x98),
+     o3(0xEC,0x94,0x99), o3(0xEC,0x94,0x9A),
+     o3(0xEC,0x94,0x9B), o3(0xEC,0x94,0x9D),
+     o3(0xEC,0x94,0x9E), o3(0xEC,0x94,0x9F),
+     o3(0xEC,0x94,0xA0), o3(0xEC,0x94,0xA1),
+     o3(0xEC,0x94,0xA2), o3(0xEC,0x94,0xA3),
+     o3(0xEC,0x94,0xA4), o3(0xEC,0x94,0xA5),
+     o3(0xEC,0x94,0xA6), o3(0xEC,0x94,0xA7),
+     o3(0xEC,0x94,0xAA), o3(0xEC,0x94,0xAB),
+     o3(0xEC,0x94,0xAD), o3(0xEC,0x94,0xAE),
+     o3(0xEC,0x94,0xAF), o3(0xEC,0x94,0xB1),
+     o3(0xEC,0x94,0xB2), o3(0xEC,0x94,0xB3),
+     o3(0xEC,0x94,0xB4), o3(0xEC,0x94,0xB5),
+     o3(0xEC,0x94,0xB6), o3(0xEC,0x94,0xB7),
+     o3(0xEC,0x94,0xBA), o3(0xEC,0x94,0xBC),
+     o3(0xEC,0x94,0xBE), o3(0xEC,0x94,0xBF),
+     o3(0xEC,0x95,0x80), o3(0xEC,0x95,0x81),
+     o3(0xEC,0x95,0x82), o3(0xEC,0x95,0x83),
+     o3(0xEC,0x95,0x86), o3(0xEC,0x95,0x87),
+     o3(0xEC,0x95,0x8B), o3(0xEC,0x95,0x8F),
+     o3(0xEC,0x95,0x90), o3(0xEC,0x95,0x91),
+     o3(0xEC,0x95,0x92), o3(0xEC,0x95,0x96),
+     o3(0xEC,0x95,0x9A), o3(0xEC,0x95,0x9B),
+     o3(0xEC,0x95,0x9C), o3(0xEC,0x95,0x9F),
+     o3(0xEC,0x95,0xA2), o3(0xEC,0x95,0xA3),
+     o3(0xEC,0x95,0xA5), o3(0xEC,0x95,0xA6),
+     o3(0xEC,0x95,0xA7), o3(0xEC,0x95,0xA9),
+     o3(0xEC,0x95,0xAA), o3(0xEC,0x95,0xAB),
+     o3(0xEC,0x95,0xAC), o3(0xEC,0x95,0xAD),
+     o3(0xEC,0x95,0xAE), o3(0xEC,0x95,0xAF),
+     o3(0xEC,0x95,0xB2), o3(0xEC,0x95,0xB6),
+     o3(0xEC,0x95,0xB7), o3(0xEC,0x95,0xB8),
+     o3(0xEC,0x95,0xB9), o3(0xEC,0x95,0xBA),
+     o3(0xEC,0x95,0xBB), o3(0xEC,0x95,0xBE),
+     o3(0xEC,0x95,0xBF), o3(0xEC,0x96,0x81),
+     o3(0xEC,0x96,0x82), o3(0xEC,0x96,0x83),
+     o3(0xEC,0x96,0x85), o3(0xEC,0x96,0x86),
+     o3(0xEC,0x96,0x88), o3(0xEC,0x96,0x89),
+     o3(0xEC,0x96,0x8A), o3(0xEC,0x96,0x8B),
+     o3(0xEC,0x96,0x8E), o3(0xEC,0x96,0x90),
+     o3(0xEC,0x96,0x92), o3(0xEC,0x96,0x93),
+     o3(0xEC,0x96,0x94),
+
+#define from_CP949_9D WORDINDEX2INFO(36847)
+    from_CP949_81_offsets,
+    from_CP949_9D_infos,
+
+#define from_CP949_9E_infos WORDINDEX2INFO(36849)
+                INVALID, o3(0xEC,0x96,0x96),
+     o3(0xEC,0x96,0x99), o3(0xEC,0x96,0x9A),
+     o3(0xEC,0x96,0x9B), o3(0xEC,0x96,0x9D),
+     o3(0xEC,0x96,0x9E), o3(0xEC,0x96,0x9F),
+     o3(0xEC,0x96,0xA1), o3(0xEC,0x96,0xA2),
+     o3(0xEC,0x96,0xA3), o3(0xEC,0x96,0xA4),
+     o3(0xEC,0x96,0xA5), o3(0xEC,0x96,0xA6),
+     o3(0xEC,0x96,0xA7), o3(0xEC,0x96,0xA8),
+     o3(0xEC,0x96,0xAA), o3(0xEC,0x96,0xAB),
+     o3(0xEC,0x96,0xAC), o3(0xEC,0x96,0xAD),
+     o3(0xEC,0x96,0xAE), o3(0xEC,0x96,0xAF),
+     o3(0xEC,0x96,0xB0), o3(0xEC,0x96,0xB1),
+     o3(0xEC,0x96,0xB2), o3(0xEC,0x96,0xB3),
+     o3(0xEC,0x96,0xB6), o3(0xEC,0x96,0xB7),
+     o3(0xEC,0x96,0xBA), o3(0xEC,0x96,0xBF),
+     o3(0xEC,0x97,0x80), o3(0xEC,0x97,0x81),
+     o3(0xEC,0x97,0x82), o3(0xEC,0x97,0x83),
+     o3(0xEC,0x97,0x8B), o3(0xEC,0x97,0x8D),
+     o3(0xEC,0x97,0x8F), o3(0xEC,0x97,0x92),
+     o3(0xEC,0x97,0x93), o3(0xEC,0x97,0x95),
+     o3(0xEC,0x97,0x96), o3(0xEC,0x97,0x97),
+     o3(0xEC,0x97,0x99), o3(0xEC,0x97,0x9A),
+     o3(0xEC,0x97,0x9B), o3(0xEC,0x97,0x9C),
+     o3(0xEC,0x97,0x9D), o3(0xEC,0x97,0x9E),
+     o3(0xEC,0x97,0x9F), o3(0xEC,0x97,0xA2),
+     o3(0xEC,0x97,0xA4), o3(0xEC,0x97,0xA6),
+     o3(0xEC,0x97,0xA7), o3(0xEC,0x97,0xA8),
+     o3(0xEC,0x97,0xA9), o3(0xEC,0x97,0xAA),
+     o3(0xEC,0x97,0xAB), o3(0xEC,0x97,0xAF),
+     o3(0xEC,0x97,0xB1), o3(0xEC,0x97,0xB2),
+     o3(0xEC,0x97,0xB3), o3(0xEC,0x97,0xB5),
+     o3(0xEC,0x97,0xB8), o3(0xEC,0x97,0xB9),
+     o3(0xEC,0x97,0xBA), o3(0xEC,0x97,0xBB),
+     o3(0xEC,0x98,0x82), o3(0xEC,0x98,0x83),
+     o3(0xEC,0x98,0x84), o3(0xEC,0x98,0x89),
+     o3(0xEC,0x98,0x8A), o3(0xEC,0x98,0x8B),
+     o3(0xEC,0x98,0x8D), o3(0xEC,0x98,0x8E),
+     o3(0xEC,0x98,0x8F), o3(0xEC,0x98,0x91),
+     o3(0xEC,0x98,0x92), o3(0xEC,0x98,0x93),
+     o3(0xEC,0x98,0x94), o3(0xEC,0x98,0x95),
+     o3(0xEC,0x98,0x96), o3(0xEC,0x98,0x97),
+     o3(0xEC,0x98,0x9A), o3(0xEC,0x98,0x9D),
+     o3(0xEC,0x98,0x9E), o3(0xEC,0x98,0x9F),
+     o3(0xEC,0x98,0xA0), o3(0xEC,0x98,0xA1),
+     o3(0xEC,0x98,0xA2), o3(0xEC,0x98,0xA3),
+     o3(0xEC,0x98,0xA6), o3(0xEC,0x98,0xA7),
+     o3(0xEC,0x98,0xA9), o3(0xEC,0x98,0xAA),
+     o3(0xEC,0x98,0xAB), o3(0xEC,0x98,0xAF),
+     o3(0xEC,0x98,0xB1), o3(0xEC,0x98,0xB2),
+     o3(0xEC,0x98,0xB6), o3(0xEC,0x98,0xB8),
+     o3(0xEC,0x98,0xBA), o3(0xEC,0x98,0xBC),
+     o3(0xEC,0x98,0xBD), o3(0xEC,0x98,0xBE),
+     o3(0xEC,0x98,0xBF), o3(0xEC,0x99,0x82),
+     o3(0xEC,0x99,0x83), o3(0xEC,0x99,0x85),
+     o3(0xEC,0x99,0x86), o3(0xEC,0x99,0x87),
+     o3(0xEC,0x99,0x89), o3(0xEC,0x99,0x8A),
+     o3(0xEC,0x99,0x8B), o3(0xEC,0x99,0x8C),
+     o3(0xEC,0x99,0x8D), o3(0xEC,0x99,0x8E),
+     o3(0xEC,0x99,0x8F), o3(0xEC,0x99,0x92),
+     o3(0xEC,0x99,0x96), o3(0xEC,0x99,0x97),
+     o3(0xEC,0x99,0x98), o3(0xEC,0x99,0x99),
+     o3(0xEC,0x99,0x9A), o3(0xEC,0x99,0x9B),
+     o3(0xEC,0x99,0x9E), o3(0xEC,0x99,0x9F),
+     o3(0xEC,0x99,0xA1), o3(0xEC,0x99,0xA2),
+     o3(0xEC,0x99,0xA3), o3(0xEC,0x99,0xA4),
+     o3(0xEC,0x99,0xA5), o3(0xEC,0x99,0xA6),
+     o3(0xEC,0x99,0xA7), o3(0xEC,0x99,0xA8),
+     o3(0xEC,0x99,0xA9), o3(0xEC,0x99,0xAA),
+     o3(0xEC,0x99,0xAB), o3(0xEC,0x99,0xAD),
+     o3(0xEC,0x99,0xAE), o3(0xEC,0x99,0xB0),
+     o3(0xEC,0x99,0xB2), o3(0xEC,0x99,0xB3),
+     o3(0xEC,0x99,0xB4), o3(0xEC,0x99,0xB5),
+     o3(0xEC,0x99,0xB6), o3(0xEC,0x99,0xB7),
+     o3(0xEC,0x99,0xBA), o3(0xEC,0x99,0xBB),
+     o3(0xEC,0x99,0xBD), o3(0xEC,0x99,0xBE),
+     o3(0xEC,0x99,0xBF), o3(0xEC,0x9A,0x81),
+     o3(0xEC,0x9A,0x82), o3(0xEC,0x9A,0x83),
+     o3(0xEC,0x9A,0x84), o3(0xEC,0x9A,0x85),
+     o3(0xEC,0x9A,0x86), o3(0xEC,0x9A,0x87),
+     o3(0xEC,0x9A,0x8A), o3(0xEC,0x9A,0x8C),
+     o3(0xEC,0x9A,0x8E), o3(0xEC,0x9A,0x8F),
+     o3(0xEC,0x9A,0x90), o3(0xEC,0x9A,0x91),
+     o3(0xEC,0x9A,0x92), o3(0xEC,0x9A,0x93),
+     o3(0xEC,0x9A,0x96), o3(0xEC,0x9A,0x97),
+     o3(0xEC,0x9A,0x99), o3(0xEC,0x9A,0x9A),
+     o3(0xEC,0x9A,0x9B), o3(0xEC,0x9A,0x9D),
+     o3(0xEC,0x9A,0x9E), o3(0xEC,0x9A,0x9F),
+     o3(0xEC,0x9A,0xA0), o3(0xEC,0x9A,0xA1),
+     o3(0xEC,0x9A,0xA2), o3(0xEC,0x9A,0xA3),
+     o3(0xEC,0x9A,0xA6),
+
+#define from_CP949_9E WORDINDEX2INFO(37028)
+    from_CP949_81_offsets,
+    from_CP949_9E_infos,
+
+#define from_CP949_9F_infos WORDINDEX2INFO(37030)
+                INVALID, o3(0xEC,0x9A,0xA8),
+     o3(0xEC,0x9A,0xAA), o3(0xEC,0x9A,0xAB),
+     o3(0xEC,0x9A,0xAC), o3(0xEC,0x9A,0xAD),
+     o3(0xEC,0x9A,0xAE), o3(0xEC,0x9A,0xAF),
+     o3(0xEC,0x9A,0xB2), o3(0xEC,0x9A,0xB3),
+     o3(0xEC,0x9A,0xB5), o3(0xEC,0x9A,0xB6),
+     o3(0xEC,0x9A,0xB7), o3(0xEC,0x9A,0xBB),
+     o3(0xEC,0x9A,0xBC), o3(0xEC,0x9A,0xBD),
+     o3(0xEC,0x9A,0xBE), o3(0xEC,0x9A,0xBF),
+     o3(0xEC,0x9B,0x82), o3(0xEC,0x9B,0x84),
+     o3(0xEC,0x9B,0x86), o3(0xEC,0x9B,0x87),
+     o3(0xEC,0x9B,0x88), o3(0xEC,0x9B,0x89),
+     o3(0xEC,0x9B,0x8A), o3(0xEC,0x9B,0x8B),
+     o3(0xEC,0x9B,0x8E), o3(0xEC,0x9B,0x8F),
+     o3(0xEC,0x9B,0x91), o3(0xEC,0x9B,0x92),
+     o3(0xEC,0x9B,0x93), o3(0xEC,0x9B,0x95),
+     o3(0xEC,0x9B,0x96), o3(0xEC,0x9B,0x97),
+     o3(0xEC,0x9B,0x98), o3(0xEC,0x9B,0x99),
+     o3(0xEC,0x9B,0x9A), o3(0xEC,0x9B,0x9B),
+     o3(0xEC,0x9B,0x9E), o3(0xEC,0x9B,0x9F),
+     o3(0xEC,0x9B,0xA2), o3(0xEC,0x9B,0xA3),
+     o3(0xEC,0x9B,0xA4), o3(0xEC,0x9B,0xA5),
+     o3(0xEC,0x9B,0xA6), o3(0xEC,0x9B,0xA7),
+     o3(0xEC,0x9B,0xAA), o3(0xEC,0x9B,0xAB),
+     o3(0xEC,0x9B,0xAD), o3(0xEC,0x9B,0xAE),
+     o3(0xEC,0x9B,0xAF), o3(0xEC,0x9B,0xB1),
+     o3(0xEC,0x9B,0xB2), o3(0xEC,0x9B,0xB3),
+     o3(0xEC,0x9B,0xB4), o3(0xEC,0x9B,0xB5),
+     o3(0xEC,0x9B,0xB6), o3(0xEC,0x9B,0xB7),
+     o3(0xEC,0x9B,0xBA), o3(0xEC,0x9B,0xBB),
+     o3(0xEC,0x9B,0xBC), o3(0xEC,0x9B,0xBE),
+     o3(0xEC,0x9B,0xBF), o3(0xEC,0x9C,0x80),
+     o3(0xEC,0x9C,0x81), o3(0xEC,0x9C,0x82),
+     o3(0xEC,0x9C,0x83), o3(0xEC,0x9C,0x86),
+     o3(0xEC,0x9C,0x87), o3(0xEC,0x9C,0x89),
+     o3(0xEC,0x9C,0x8A), o3(0xEC,0x9C,0x8B),
+     o3(0xEC,0x9C,0x8D), o3(0xEC,0x9C,0x8E),
+     o3(0xEC,0x9C,0x8F), o3(0xEC,0x9C,0x90),
+     o3(0xEC,0x9C,0x91), o3(0xEC,0x9C,0x92),
+     o3(0xEC,0x9C,0x93), o3(0xEC,0x9C,0x96),
+     o3(0xEC,0x9C,0x98), o3(0xEC,0x9C,0x9A),
+     o3(0xEC,0x9C,0x9B), o3(0xEC,0x9C,0x9C),
+     o3(0xEC,0x9C,0x9D), o3(0xEC,0x9C,0x9E),
+     o3(0xEC,0x9C,0x9F), o3(0xEC,0x9C,0xA2),
+     o3(0xEC,0x9C,0xA3), o3(0xEC,0x9C,0xA5),
+     o3(0xEC,0x9C,0xA6), o3(0xEC,0x9C,0xA7),
+     o3(0xEC,0x9C,0xA9), o3(0xEC,0x9C,0xAA),
+     o3(0xEC,0x9C,0xAB), o3(0xEC,0x9C,0xAC),
+     o3(0xEC,0x9C,0xAD), o3(0xEC,0x9C,0xAE),
+     o3(0xEC,0x9C,0xAF), o3(0xEC,0x9C,0xB2),
+     o3(0xEC,0x9C,0xB4), o3(0xEC,0x9C,0xB6),
+     o3(0xEC,0x9C,0xB8), o3(0xEC,0x9C,0xB9),
+     o3(0xEC,0x9C,0xBA), o3(0xEC,0x9C,0xBB),
+     o3(0xEC,0x9C,0xBE), o3(0xEC,0x9C,0xBF),
+     o3(0xEC,0x9D,0x81), o3(0xEC,0x9D,0x82),
+     o3(0xEC,0x9D,0x83), o3(0xEC,0x9D,0x85),
+     o3(0xEC,0x9D,0x86), o3(0xEC,0x9D,0x87),
+     o3(0xEC,0x9D,0x88), o3(0xEC,0x9D,0x89),
+     o3(0xEC,0x9D,0x8B), o3(0xEC,0x9D,0x8E),
+     o3(0xEC,0x9D,0x90), o3(0xEC,0x9D,0x99),
+     o3(0xEC,0x9D,0x9A), o3(0xEC,0x9D,0x9B),
+     o3(0xEC,0x9D,0x9D), o3(0xEC,0x9D,0x9E),
+     o3(0xEC,0x9D,0x9F), o3(0xEC,0x9D,0xA1),
+     o3(0xEC,0x9D,0xA2), o3(0xEC,0x9D,0xA3),
+     o3(0xEC,0x9D,0xA4), o3(0xEC,0x9D,0xA5),
+     o3(0xEC,0x9D,0xA6), o3(0xEC,0x9D,0xA7),
+     o3(0xEC,0x9D,0xA9), o3(0xEC,0x9D,0xAA),
+     o3(0xEC,0x9D,0xAC), o3(0xEC,0x9D,0xAD),
+     o3(0xEC,0x9D,0xAE), o3(0xEC,0x9D,0xAF),
+     o3(0xEC,0x9D,0xB0), o3(0xEC,0x9D,0xB1),
+     o3(0xEC,0x9D,0xB2), o3(0xEC,0x9D,0xB3),
+     o3(0xEC,0x9D,0xB6), o3(0xEC,0x9D,0xB7),
+     o3(0xEC,0x9D,0xB9), o3(0xEC,0x9D,0xBA),
+     o3(0xEC,0x9D,0xBB), o3(0xEC,0x9D,0xBF),
+     o3(0xEC,0x9E,0x80), o3(0xEC,0x9E,0x81),
+     o3(0xEC,0x9E,0x82), o3(0xEC,0x9E,0x86),
+     o3(0xEC,0x9E,0x8B), o3(0xEC,0x9E,0x8C),
+     o3(0xEC,0x9E,0x8D), o3(0xEC,0x9E,0x8F),
+     o3(0xEC,0x9E,0x92), o3(0xEC,0x9E,0x93),
+     o3(0xEC,0x9E,0x95), o3(0xEC,0x9E,0x99),
+     o3(0xEC,0x9E,0x9B), o3(0xEC,0x9E,0x9C),
+     o3(0xEC,0x9E,0x9D), o3(0xEC,0x9E,0x9E),
+     o3(0xEC,0x9E,0x9F), o3(0xEC,0x9E,0xA2),
+     o3(0xEC,0x9E,0xA7), o3(0xEC,0x9E,0xA8),
+     o3(0xEC,0x9E,0xA9), o3(0xEC,0x9E,0xAA),
+     o3(0xEC,0x9E,0xAB), o3(0xEC,0x9E,0xAE),
+     o3(0xEC,0x9E,0xAF), o3(0xEC,0x9E,0xB1),
+     o3(0xEC,0x9E,0xB2), o3(0xEC,0x9E,0xB3),
+     o3(0xEC,0x9E,0xB5), o3(0xEC,0x9E,0xB6),
+     o3(0xEC,0x9E,0xB7),
+
+#define from_CP949_9F WORDINDEX2INFO(37209)
+    from_CP949_81_offsets,
+    from_CP949_9F_infos,
+
+#define from_CP949_A0_infos WORDINDEX2INFO(37211)
+                INVALID, o3(0xEC,0x9E,0xB8),
+     o3(0xEC,0x9E,0xB9), o3(0xEC,0x9E,0xBA),
+     o3(0xEC,0x9E,0xBB), o3(0xEC,0x9E,0xBE),
+     o3(0xEC,0x9F,0x82), o3(0xEC,0x9F,0x83),
+     o3(0xEC,0x9F,0x84), o3(0xEC,0x9F,0x85),
+     o3(0xEC,0x9F,0x86), o3(0xEC,0x9F,0x87),
+     o3(0xEC,0x9F,0x8A), o3(0xEC,0x9F,0x8B),
+     o3(0xEC,0x9F,0x8D), o3(0xEC,0x9F,0x8F),
+     o3(0xEC,0x9F,0x91), o3(0xEC,0x9F,0x92),
+     o3(0xEC,0x9F,0x93), o3(0xEC,0x9F,0x94),
+     o3(0xEC,0x9F,0x95), o3(0xEC,0x9F,0x96),
+     o3(0xEC,0x9F,0x97), o3(0xEC,0x9F,0x99),
+     o3(0xEC,0x9F,0x9A), o3(0xEC,0x9F,0x9B),
+     o3(0xEC,0x9F,0x9C), o3(0xEC,0x9F,0x9E),
+     o3(0xEC,0x9F,0x9F), o3(0xEC,0x9F,0xA0),
+     o3(0xEC,0x9F,0xA1), o3(0xEC,0x9F,0xA2),
+     o3(0xEC,0x9F,0xA3), o3(0xEC,0x9F,0xA5),
+     o3(0xEC,0x9F,0xA6), o3(0xEC,0x9F,0xA7),
+     o3(0xEC,0x9F,0xA9), o3(0xEC,0x9F,0xAA),
+     o3(0xEC,0x9F,0xAB), o3(0xEC,0x9F,0xAD),
+     o3(0xEC,0x9F,0xAE), o3(0xEC,0x9F,0xAF),
+     o3(0xEC,0x9F,0xB0), o3(0xEC,0x9F,0xB1),
+     o3(0xEC,0x9F,0xB2), o3(0xEC,0x9F,0xB3),
+     o3(0xEC,0x9F,0xB4), o3(0xEC,0x9F,0xB5),
+     o3(0xEC,0x9F,0xB6), o3(0xEC,0x9F,0xB7),
+     o3(0xEC,0x9F,0xB8), o3(0xEC,0x9F,0xB9),
+     o3(0xEC,0x9F,0xBA), o3(0xEC,0x9F,0xBB),
+     o3(0xEC,0x9F,0xBC), o3(0xEC,0x9F,0xBD),
+     o3(0xEC,0x9F,0xBE), o3(0xEC,0x9F,0xBF),
+     o3(0xEC,0xA0,0x82), o3(0xEC,0xA0,0x83),
+     o3(0xEC,0xA0,0x85), o3(0xEC,0xA0,0x86),
+     o3(0xEC,0xA0,0x87), o3(0xEC,0xA0,0x89),
+     o3(0xEC,0xA0,0x8B), o3(0xEC,0xA0,0x8C),
+     o3(0xEC,0xA0,0x8D), o3(0xEC,0xA0,0x8E),
+     o3(0xEC,0xA0,0x8F), o3(0xEC,0xA0,0x92),
+     o3(0xEC,0xA0,0x94), o3(0xEC,0xA0,0x97),
+     o3(0xEC,0xA0,0x98), o3(0xEC,0xA0,0x99),
+     o3(0xEC,0xA0,0x9A), o3(0xEC,0xA0,0x9B),
+     o3(0xEC,0xA0,0x9E), o3(0xEC,0xA0,0x9F),
+     o3(0xEC,0xA0,0xA1), o3(0xEC,0xA0,0xA2),
+     o3(0xEC,0xA0,0xA3), o3(0xEC,0xA0,0xA5),
+     o3(0xEC,0xA0,0xA6), o3(0xEC,0xA0,0xA7),
+     o3(0xEC,0xA0,0xA8), o3(0xEC,0xA0,0xA9),
+     o3(0xEC,0xA0,0xAA), o3(0xEC,0xA0,0xAB),
+     o3(0xEC,0xA0,0xAE), o3(0xEC,0xA0,0xB0),
+     o3(0xEC,0xA0,0xB2), o3(0xEC,0xA0,0xB3),
+     o3(0xEC,0xA0,0xB4), o3(0xEC,0xA0,0xB5),
+     o3(0xEC,0xA0,0xB6), o3(0xEC,0xA0,0xB7),
+     o3(0xEC,0xA0,0xB9), o3(0xEC,0xA0,0xBA),
+     o3(0xEC,0xA0,0xBB), o3(0xEC,0xA0,0xBD),
+     o3(0xEC,0xA0,0xBE), o3(0xEC,0xA0,0xBF),
+     o3(0xEC,0xA1,0x81), o3(0xEC,0xA1,0x82),
+     o3(0xEC,0xA1,0x83), o3(0xEC,0xA1,0x84),
+     o3(0xEC,0xA1,0x85), o3(0xEC,0xA1,0x86),
+     o3(0xEC,0xA1,0x87), o3(0xEC,0xA1,0x8A),
+     o3(0xEC,0xA1,0x8B), o3(0xEC,0xA1,0x8E),
+     o3(0xEC,0xA1,0x8F), o3(0xEC,0xA1,0x90),
+     o3(0xEC,0xA1,0x91), o3(0xEC,0xA1,0x92),
+     o3(0xEC,0xA1,0x93), o3(0xEC,0xA1,0x95),
+     o3(0xEC,0xA1,0x96), o3(0xEC,0xA1,0x97),
+     o3(0xEC,0xA1,0x98), o3(0xEC,0xA1,0x99),
+     o3(0xEC,0xA1,0x9A), o3(0xEC,0xA1,0x9B),
+     o3(0xEC,0xA1,0x9C), o3(0xEC,0xA1,0x9D),
+     o3(0xEC,0xA1,0x9E), o3(0xEC,0xA1,0x9F),
+     o3(0xEC,0xA1,0xA0), o3(0xEC,0xA1,0xA1),
+     o3(0xEC,0xA1,0xA2), o3(0xEC,0xA1,0xA3),
+     o3(0xEC,0xA1,0xA4), o3(0xEC,0xA1,0xA5),
+     o3(0xEC,0xA1,0xA6), o3(0xEC,0xA1,0xA7),
+     o3(0xEC,0xA1,0xA8), o3(0xEC,0xA1,0xA9),
+     o3(0xEC,0xA1,0xAA), o3(0xEC,0xA1,0xAB),
+     o3(0xEC,0xA1,0xAC), o3(0xEC,0xA1,0xAD),
+     o3(0xEC,0xA1,0xAE), o3(0xEC,0xA1,0xAF),
+     o3(0xEC,0xA1,0xB2), o3(0xEC,0xA1,0xB3),
+     o3(0xEC,0xA1,0xB5), o3(0xEC,0xA1,0xB6),
+     o3(0xEC,0xA1,0xB7), o3(0xEC,0xA1,0xB9),
+     o3(0xEC,0xA1,0xBB), o3(0xEC,0xA1,0xBC),
+     o3(0xEC,0xA1,0xBD), o3(0xEC,0xA1,0xBE),
+     o3(0xEC,0xA1,0xBF), o3(0xEC,0xA2,0x82),
+     o3(0xEC,0xA2,0x84), o3(0xEC,0xA2,0x88),
+     o3(0xEC,0xA2,0x89), o3(0xEC,0xA2,0x8A),
+     o3(0xEC,0xA2,0x8E), o3(0xEC,0xA2,0x8F),
+     o3(0xEC,0xA2,0x90), o3(0xEC,0xA2,0x91),
+     o3(0xEC,0xA2,0x92), o3(0xEC,0xA2,0x93),
+     o3(0xEC,0xA2,0x95), o3(0xEC,0xA2,0x96),
+     o3(0xEC,0xA2,0x97), o3(0xEC,0xA2,0x98),
+     o3(0xEC,0xA2,0x99), o3(0xEC,0xA2,0x9A),
+     o3(0xEC,0xA2,0x9B), o3(0xEC,0xA2,0x9C),
+     o3(0xEC,0xA2,0x9E), o3(0xEC,0xA2,0xA0),
+     o3(0xEC,0xA2,0xA2), o3(0xEC,0xA2,0xA3),
+     o3(0xEC,0xA2,0xA4),
+
+#define from_CP949_A0 WORDINDEX2INFO(37390)
+    from_CP949_81_offsets,
+    from_CP949_A0_infos,
+
+#define from_CP949_A1_infos WORDINDEX2INFO(37392)
+                INVALID, o3(0xEC,0xA2,0xA5),
+     o3(0xEC,0xA2,0xA6), o3(0xEC,0xA2,0xA7),
+     o3(0xEC,0xA2,0xA9), o3(0xEC,0xA2,0xAA),
+     o3(0xEC,0xA2,0xAB), o3(0xEC,0xA2,0xAC),
+     o3(0xEC,0xA2,0xAD), o3(0xEC,0xA2,0xAE),
+     o3(0xEC,0xA2,0xAF), o3(0xEC,0xA2,0xB0),
+     o3(0xEC,0xA2,0xB1), o3(0xEC,0xA2,0xB2),
+     o3(0xEC,0xA2,0xB3), o3(0xEC,0xA2,0xB4),
+     o3(0xEC,0xA2,0xB5), o3(0xEC,0xA2,0xB6),
+     o3(0xEC,0xA2,0xB7), o3(0xEC,0xA2,0xB8),
+     o3(0xEC,0xA2,0xB9), o3(0xEC,0xA2,0xBA),
+     o3(0xEC,0xA2,0xBB), o3(0xEC,0xA2,0xBE),
+     o3(0xEC,0xA2,0xBF), o3(0xEC,0xA3,0x80),
+     o3(0xEC,0xA3,0x81), o3(0xEC,0xA3,0x82),
+     o3(0xEC,0xA3,0x83), o3(0xEC,0xA3,0x85),
+     o3(0xEC,0xA3,0x86), o3(0xEC,0xA3,0x87),
+     o3(0xEC,0xA3,0x89), o3(0xEC,0xA3,0x8A),
+     o3(0xEC,0xA3,0x8B), o3(0xEC,0xA3,0x8D),
+     o3(0xEC,0xA3,0x8E), o3(0xEC,0xA3,0x8F),
+     o3(0xEC,0xA3,0x90), o3(0xEC,0xA3,0x91),
+     o3(0xEC,0xA3,0x92), o3(0xEC,0xA3,0x93),
+     o3(0xEC,0xA3,0x96), o3(0xEC,0xA3,0x98),
+     o3(0xEC,0xA3,0x9A), o3(0xEC,0xA3,0x9B),
+     o3(0xEC,0xA3,0x9C), o3(0xEC,0xA3,0x9D),
+     o3(0xEC,0xA3,0x9E), o3(0xEC,0xA3,0x9F),
+     o3(0xEC,0xA3,0xA2), o3(0xEC,0xA3,0xA3),
+     o3(0xEC,0xA3,0xA5), o3(0xEC,0xA3,0xA6),
+     o3(0xEC,0xA3,0xA7), o3(0xEC,0xA3,0xA8),
+     o3(0xEC,0xA3,0xA9), o3(0xEC,0xA3,0xAA),
+     o3(0xEC,0xA3,0xAB), o3(0xEC,0xA3,0xAC),
+     o3(0xEC,0xA3,0xAD), o3(0xEC,0xA3,0xAE),
+     o3(0xEC,0xA3,0xAF), o3(0xEC,0xA3,0xB0),
+     o3(0xEC,0xA3,0xB1), o3(0xEC,0xA3,0xB2),
+     o3(0xEC,0xA3,0xB3), o3(0xEC,0xA3,0xB4),
+     o3(0xEC,0xA3,0xB6), o3(0xEC,0xA3,0xB7),
+     o3(0xEC,0xA3,0xB8), o3(0xEC,0xA3,0xB9),
+     o3(0xEC,0xA3,0xBA), o3(0xEC,0xA3,0xBB),
+     o3(0xEC,0xA3,0xBE), o3(0xEC,0xA3,0xBF),
+     o3(0xEC,0xA4,0x81), o3(0xEC,0xA4,0x82),
+     o3(0xEC,0xA4,0x83), o3(0xEC,0xA4,0x87),
+     o3(0xEC,0xA4,0x88), o3(0xEC,0xA4,0x89),
+     o3(0xEC,0xA4,0x8A), o3(0xEC,0xA4,0x8B),
+     o3(0xEC,0xA4,0x8E), o3(0xE3,0x80,0x80),
+     o3(0xE3,0x80,0x81), o3(0xE3,0x80,0x82),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0xA5),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA8),
+     o3(0xE3,0x80,0x83),      o2(0xC2,0xAD),
+     o3(0xE2,0x80,0x95), o3(0xE2,0x88,0xA5),
+     o3(0xEF,0xBC,0xBC), o3(0xE2,0x88,0xBC),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE3,0x80,0x94), o3(0xE3,0x80,0x95),
+     o3(0xE3,0x80,0x88), o3(0xE3,0x80,0x89),
+     o3(0xE3,0x80,0x8A), o3(0xE3,0x80,0x8B),
+     o3(0xE3,0x80,0x8C), o3(0xE3,0x80,0x8D),
+     o3(0xE3,0x80,0x8E), o3(0xE3,0x80,0x8F),
+     o3(0xE3,0x80,0x90), o3(0xE3,0x80,0x91),
+          o2(0xC2,0xB1),      o2(0xC3,0x97),
+          o2(0xC3,0xB7), o3(0xE2,0x89,0xA0),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x88,0x9E), o3(0xE2,0x88,0xB4),
+          o2(0xC2,0xB0), o3(0xE2,0x80,0xB2),
+     o3(0xE2,0x80,0xB3), o3(0xE2,0x84,0x83),
+     o3(0xE2,0x84,0xAB), o3(0xEF,0xBF,0xA0),
+     o3(0xEF,0xBF,0xA1), o3(0xEF,0xBF,0xA5),
+     o3(0xE2,0x99,0x82), o3(0xE2,0x99,0x80),
+     o3(0xE2,0x88,0xA0), o3(0xE2,0x8A,0xA5),
+     o3(0xE2,0x8C,0x92), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x87), o3(0xE2,0x89,0xA1),
+     o3(0xE2,0x89,0x92),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xBB), o3(0xE2,0x98,0x86),
+     o3(0xE2,0x98,0x85), o3(0xE2,0x97,0x8B),
+     o3(0xE2,0x97,0x8F), o3(0xE2,0x97,0x8E),
+     o3(0xE2,0x97,0x87), o3(0xE2,0x97,0x86),
+     o3(0xE2,0x96,0xA1), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x96,0xB3), o3(0xE2,0x96,0xB2),
+     o3(0xE2,0x96,0xBD), o3(0xE2,0x96,0xBC),
+     o3(0xE2,0x86,0x92), o3(0xE2,0x86,0x90),
+     o3(0xE2,0x86,0x91), o3(0xE2,0x86,0x93),
+     o3(0xE2,0x86,0x94), o3(0xE3,0x80,0x93),
+     o3(0xE2,0x89,0xAA), o3(0xE2,0x89,0xAB),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x88,0xBD),
+     o3(0xE2,0x88,0x9D), o3(0xE2,0x88,0xB5),
+     o3(0xE2,0x88,0xAB), o3(0xE2,0x88,0xAC),
+     o3(0xE2,0x88,0x88), o3(0xE2,0x88,0x8B),
+     o3(0xE2,0x8A,0x86), o3(0xE2,0x8A,0x87),
+     o3(0xE2,0x8A,0x82), o3(0xE2,0x8A,0x83),
+     o3(0xE2,0x88,0xAA), o3(0xE2,0x88,0xA9),
+     o3(0xE2,0x88,0xA7), o3(0xE2,0x88,0xA8),
+     o3(0xEF,0xBF,0xA2),
+
+#define from_CP949_A1 WORDINDEX2INFO(37571)
+    from_CP949_81_offsets,
+    from_CP949_A1_infos,
+
+#define from_CP949_A2_infos WORDINDEX2INFO(37573)
+                INVALID, o3(0xEC,0xA4,0x90),
+     o3(0xEC,0xA4,0x92), o3(0xEC,0xA4,0x93),
+     o3(0xEC,0xA4,0x94), o3(0xEC,0xA4,0x95),
+     o3(0xEC,0xA4,0x96), o3(0xEC,0xA4,0x97),
+     o3(0xEC,0xA4,0x99), o3(0xEC,0xA4,0x9A),
+     o3(0xEC,0xA4,0x9B), o3(0xEC,0xA4,0x9C),
+     o3(0xEC,0xA4,0x9D), o3(0xEC,0xA4,0x9E),
+     o3(0xEC,0xA4,0x9F), o3(0xEC,0xA4,0xA0),
+     o3(0xEC,0xA4,0xA1), o3(0xEC,0xA4,0xA2),
+     o3(0xEC,0xA4,0xA3), o3(0xEC,0xA4,0xA4),
+     o3(0xEC,0xA4,0xA5), o3(0xEC,0xA4,0xA6),
+     o3(0xEC,0xA4,0xA7), o3(0xEC,0xA4,0xA8),
+     o3(0xEC,0xA4,0xA9), o3(0xEC,0xA4,0xAA),
+     o3(0xEC,0xA4,0xAB), o3(0xEC,0xA4,0xAD),
+     o3(0xEC,0xA4,0xAE), o3(0xEC,0xA4,0xAF),
+     o3(0xEC,0xA4,0xB0), o3(0xEC,0xA4,0xB1),
+     o3(0xEC,0xA4,0xB2), o3(0xEC,0xA4,0xB3),
+     o3(0xEC,0xA4,0xB5), o3(0xEC,0xA4,0xB6),
+     o3(0xEC,0xA4,0xB7), o3(0xEC,0xA4,0xB8),
+     o3(0xEC,0xA4,0xB9), o3(0xEC,0xA4,0xBA),
+     o3(0xEC,0xA4,0xBB), o3(0xEC,0xA4,0xBC),
+     o3(0xEC,0xA4,0xBD), o3(0xEC,0xA4,0xBE),
+     o3(0xEC,0xA4,0xBF), o3(0xEC,0xA5,0x80),
+     o3(0xEC,0xA5,0x81), o3(0xEC,0xA5,0x82),
+     o3(0xEC,0xA5,0x83), o3(0xEC,0xA5,0x84),
+     o3(0xEC,0xA5,0x85), o3(0xEC,0xA5,0x86),
+     o3(0xEC,0xA5,0x87), o3(0xEC,0xA5,0x88),
+     o3(0xEC,0xA5,0x89), o3(0xEC,0xA5,0x8A),
+     o3(0xEC,0xA5,0x8B), o3(0xEC,0xA5,0x8C),
+     o3(0xEC,0xA5,0x8D), o3(0xEC,0xA5,0x8E),
+     o3(0xEC,0xA5,0x8F), o3(0xEC,0xA5,0x92),
+     o3(0xEC,0xA5,0x93), o3(0xEC,0xA5,0x95),
+     o3(0xEC,0xA5,0x96), o3(0xEC,0xA5,0x97),
+     o3(0xEC,0xA5,0x99), o3(0xEC,0xA5,0x9A),
+     o3(0xEC,0xA5,0x9B), o3(0xEC,0xA5,0x9C),
+     o3(0xEC,0xA5,0x9D), o3(0xEC,0xA5,0x9E),
+     o3(0xEC,0xA5,0x9F), o3(0xEC,0xA5,0xA2),
+     o3(0xEC,0xA5,0xA4), o3(0xEC,0xA5,0xA5),
+     o3(0xEC,0xA5,0xA6), o3(0xEC,0xA5,0xA7),
+     o3(0xEC,0xA5,0xA8), o3(0xEC,0xA5,0xA9),
+     o3(0xEC,0xA5,0xAA), o3(0xEC,0xA5,0xAB),
+     o3(0xEC,0xA5,0xAD), o3(0xEC,0xA5,0xAE),
+     o3(0xEC,0xA5,0xAF), o3(0xE2,0x87,0x92),
+     o3(0xE2,0x87,0x94), o3(0xE2,0x88,0x80),
+     o3(0xE2,0x88,0x83),      o2(0xC2,0xB4),
+     o3(0xEF,0xBD,0x9E),      o2(0xCB,0x87),
+          o2(0xCB,0x98),      o2(0xCB,0x9D),
+          o2(0xCB,0x9A),      o2(0xCB,0x99),
+          o2(0xC2,0xB8),      o2(0xCB,0x9B),
+          o2(0xC2,0xA1),      o2(0xC2,0xBF),
+          o2(0xCB,0x90), o3(0xE2,0x88,0xAE),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xC2,0xA4), o3(0xE2,0x84,0x89),
+     o3(0xE2,0x80,0xB0), o3(0xE2,0x97,0x81),
+     o3(0xE2,0x97,0x80), o3(0xE2,0x96,0xB7),
+     o3(0xE2,0x96,0xB6), o3(0xE2,0x99,0xA4),
+     o3(0xE2,0x99,0xA0), o3(0xE2,0x99,0xA1),
+     o3(0xE2,0x99,0xA5), o3(0xE2,0x99,0xA7),
+     o3(0xE2,0x99,0xA3), o3(0xE2,0x8A,0x99),
+     o3(0xE2,0x97,0x88), o3(0xE2,0x96,0xA3),
+     o3(0xE2,0x97,0x90), o3(0xE2,0x97,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0xA4),
+     o3(0xE2,0x96,0xA5), o3(0xE2,0x96,0xA8),
+     o3(0xE2,0x96,0xA7), o3(0xE2,0x96,0xA6),
+     o3(0xE2,0x96,0xA9), o3(0xE2,0x99,0xA8),
+     o3(0xE2,0x98,0x8F), o3(0xE2,0x98,0x8E),
+     o3(0xE2,0x98,0x9C), o3(0xE2,0x98,0x9E),
+          o2(0xC2,0xB6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1), o3(0xE2,0x86,0x95),
+     o3(0xE2,0x86,0x97), o3(0xE2,0x86,0x99),
+     o3(0xE2,0x86,0x96), o3(0xE2,0x86,0x98),
+     o3(0xE2,0x99,0xAD), o3(0xE2,0x99,0xA9),
+     o3(0xE2,0x99,0xAA), o3(0xE2,0x99,0xAC),
+     o3(0xE3,0x89,0xBF), o3(0xE3,0x88,0x9C),
+     o3(0xE2,0x84,0x96), o3(0xE3,0x8F,0x87),
+     o3(0xE2,0x84,0xA2), o3(0xE3,0x8F,0x82),
+     o3(0xE3,0x8F,0x98), o3(0xE2,0x84,0xA1),
+     o3(0xE2,0x82,0xAC),      o2(0xC2,0xAE),
+                  UNDEF,
+
+#define from_CP949_A2 WORDINDEX2INFO(37730)
+    from_CP949_A2_offsets,
+    from_CP949_A2_infos,
+
+#define from_CP949_A3_infos WORDINDEX2INFO(37732)
+                INVALID, o3(0xEC,0xA5,0xB1),
+     o3(0xEC,0xA5,0xB2), o3(0xEC,0xA5,0xB3),
+     o3(0xEC,0xA5,0xB5), o3(0xEC,0xA5,0xB6),
+     o3(0xEC,0xA5,0xB7), o3(0xEC,0xA5,0xB8),
+     o3(0xEC,0xA5,0xB9), o3(0xEC,0xA5,0xBA),
+     o3(0xEC,0xA5,0xBB), o3(0xEC,0xA5,0xBD),
+     o3(0xEC,0xA5,0xBE), o3(0xEC,0xA5,0xBF),
+     o3(0xEC,0xA6,0x80), o3(0xEC,0xA6,0x81),
+     o3(0xEC,0xA6,0x82), o3(0xEC,0xA6,0x83),
+     o3(0xEC,0xA6,0x84), o3(0xEC,0xA6,0x85),
+     o3(0xEC,0xA6,0x86), o3(0xEC,0xA6,0x87),
+     o3(0xEC,0xA6,0x8A), o3(0xEC,0xA6,0x8B),
+     o3(0xEC,0xA6,0x8D), o3(0xEC,0xA6,0x8E),
+     o3(0xEC,0xA6,0x8F), o3(0xEC,0xA6,0x91),
+     o3(0xEC,0xA6,0x92), o3(0xEC,0xA6,0x93),
+     o3(0xEC,0xA6,0x94), o3(0xEC,0xA6,0x95),
+     o3(0xEC,0xA6,0x96), o3(0xEC,0xA6,0x97),
+     o3(0xEC,0xA6,0x9A), o3(0xEC,0xA6,0x9C),
+     o3(0xEC,0xA6,0x9E), o3(0xEC,0xA6,0x9F),
+     o3(0xEC,0xA6,0xA0), o3(0xEC,0xA6,0xA1),
+     o3(0xEC,0xA6,0xA2), o3(0xEC,0xA6,0xA3),
+     o3(0xEC,0xA6,0xA4), o3(0xEC,0xA6,0xA5),
+     o3(0xEC,0xA6,0xA6), o3(0xEC,0xA6,0xA7),
+     o3(0xEC,0xA6,0xA8), o3(0xEC,0xA6,0xA9),
+     o3(0xEC,0xA6,0xAA), o3(0xEC,0xA6,0xAB),
+     o3(0xEC,0xA6,0xAC), o3(0xEC,0xA6,0xAD),
+     o3(0xEC,0xA6,0xAE), o3(0xEC,0xA6,0xAF),
+     o3(0xEC,0xA6,0xB0), o3(0xEC,0xA6,0xB1),
+     o3(0xEC,0xA6,0xB2), o3(0xEC,0xA6,0xB3),
+     o3(0xEC,0xA6,0xB4), o3(0xEC,0xA6,0xB5),
+     o3(0xEC,0xA6,0xB6), o3(0xEC,0xA6,0xB7),
+     o3(0xEC,0xA6,0xB8), o3(0xEC,0xA6,0xB9),
+     o3(0xEC,0xA6,0xBA), o3(0xEC,0xA6,0xBB),
+     o3(0xEC,0xA6,0xBC), o3(0xEC,0xA6,0xBD),
+     o3(0xEC,0xA6,0xBE), o3(0xEC,0xA6,0xBF),
+     o3(0xEC,0xA7,0x82), o3(0xEC,0xA7,0x83),
+     o3(0xEC,0xA7,0x85), o3(0xEC,0xA7,0x86),
+     o3(0xEC,0xA7,0x89), o3(0xEC,0xA7,0x8B),
+     o3(0xEC,0xA7,0x8C), o3(0xEC,0xA7,0x8D),
+     o3(0xEC,0xA7,0x8E), o3(0xEC,0xA7,0x8F),
+     o3(0xEC,0xA7,0x92), o3(0xEC,0xA7,0x94),
+     o3(0xEC,0xA7,0x97), o3(0xEC,0xA7,0x98),
+     o3(0xEC,0xA7,0x9B), o3(0xEF,0xBC,0x81),
+     o3(0xEF,0xBC,0x82), o3(0xEF,0xBC,0x83),
+     o3(0xEF,0xBC,0x84), o3(0xEF,0xBC,0x85),
+     o3(0xEF,0xBC,0x86), o3(0xEF,0xBC,0x87),
+     o3(0xEF,0xBC,0x88), o3(0xEF,0xBC,0x89),
+     o3(0xEF,0xBC,0x8A), o3(0xEF,0xBC,0x8B),
+     o3(0xEF,0xBC,0x8C), o3(0xEF,0xBC,0x8D),
+     o3(0xEF,0xBC,0x8E), o3(0xEF,0xBC,0x8F),
+     o3(0xEF,0xBC,0x90), o3(0xEF,0xBC,0x91),
+     o3(0xEF,0xBC,0x92), o3(0xEF,0xBC,0x93),
+     o3(0xEF,0xBC,0x94), o3(0xEF,0xBC,0x95),
+     o3(0xEF,0xBC,0x96), o3(0xEF,0xBC,0x97),
+     o3(0xEF,0xBC,0x98), o3(0xEF,0xBC,0x99),
+     o3(0xEF,0xBC,0x9A), o3(0xEF,0xBC,0x9B),
+     o3(0xEF,0xBC,0x9C), o3(0xEF,0xBC,0x9D),
+     o3(0xEF,0xBC,0x9E), o3(0xEF,0xBC,0x9F),
+     o3(0xEF,0xBC,0xA0), o3(0xEF,0xBC,0xA1),
+     o3(0xEF,0xBC,0xA2), o3(0xEF,0xBC,0xA3),
+     o3(0xEF,0xBC,0xA4), o3(0xEF,0xBC,0xA5),
+     o3(0xEF,0xBC,0xA6), o3(0xEF,0xBC,0xA7),
+     o3(0xEF,0xBC,0xA8), o3(0xEF,0xBC,0xA9),
+     o3(0xEF,0xBC,0xAA), o3(0xEF,0xBC,0xAB),
+     o3(0xEF,0xBC,0xAC), o3(0xEF,0xBC,0xAD),
+     o3(0xEF,0xBC,0xAE), o3(0xEF,0xBC,0xAF),
+     o3(0xEF,0xBC,0xB0), o3(0xEF,0xBC,0xB1),
+     o3(0xEF,0xBC,0xB2), o3(0xEF,0xBC,0xB3),
+     o3(0xEF,0xBC,0xB4), o3(0xEF,0xBC,0xB5),
+     o3(0xEF,0xBC,0xB6), o3(0xEF,0xBC,0xB7),
+     o3(0xEF,0xBC,0xB8), o3(0xEF,0xBC,0xB9),
+     o3(0xEF,0xBC,0xBA), o3(0xEF,0xBC,0xBB),
+     o3(0xEF,0xBF,0xA6), o3(0xEF,0xBC,0xBD),
+     o3(0xEF,0xBC,0xBE), o3(0xEF,0xBC,0xBF),
+     o3(0xEF,0xBD,0x80), o3(0xEF,0xBD,0x81),
+     o3(0xEF,0xBD,0x82), o3(0xEF,0xBD,0x83),
+     o3(0xEF,0xBD,0x84), o3(0xEF,0xBD,0x85),
+     o3(0xEF,0xBD,0x86), o3(0xEF,0xBD,0x87),
+     o3(0xEF,0xBD,0x88), o3(0xEF,0xBD,0x89),
+     o3(0xEF,0xBD,0x8A), o3(0xEF,0xBD,0x8B),
+     o3(0xEF,0xBD,0x8C), o3(0xEF,0xBD,0x8D),
+     o3(0xEF,0xBD,0x8E), o3(0xEF,0xBD,0x8F),
+     o3(0xEF,0xBD,0x90), o3(0xEF,0xBD,0x91),
+     o3(0xEF,0xBD,0x92), o3(0xEF,0xBD,0x93),
+     o3(0xEF,0xBD,0x94), o3(0xEF,0xBD,0x95),
+     o3(0xEF,0xBD,0x96), o3(0xEF,0xBD,0x97),
+     o3(0xEF,0xBD,0x98), o3(0xEF,0xBD,0x99),
+     o3(0xEF,0xBD,0x9A), o3(0xEF,0xBD,0x9B),
+     o3(0xEF,0xBD,0x9C), o3(0xEF,0xBD,0x9D),
+     o3(0xEF,0xBF,0xA3),
+
+#define from_CP949_A3 WORDINDEX2INFO(37911)
+    from_CP949_81_offsets,
+    from_CP949_A3_infos,
+
+#define from_CP949_A4_infos WORDINDEX2INFO(37913)
+                INVALID, o3(0xEC,0xA7,0x9E),
+     o3(0xEC,0xA7,0x9F), o3(0xEC,0xA7,0xA1),
+     o3(0xEC,0xA7,0xA3), o3(0xEC,0xA7,0xA5),
+     o3(0xEC,0xA7,0xA6), o3(0xEC,0xA7,0xA8),
+     o3(0xEC,0xA7,0xA9), o3(0xEC,0xA7,0xAA),
+     o3(0xEC,0xA7,0xAB), o3(0xEC,0xA7,0xAE),
+     o3(0xEC,0xA7,0xB2), o3(0xEC,0xA7,0xB3),
+     o3(0xEC,0xA7,0xB4), o3(0xEC,0xA7,0xB5),
+     o3(0xEC,0xA7,0xB6), o3(0xEC,0xA7,0xB7),
+     o3(0xEC,0xA7,0xBA), o3(0xEC,0xA7,0xBB),
+     o3(0xEC,0xA7,0xBD), o3(0xEC,0xA7,0xBE),
+     o3(0xEC,0xA7,0xBF), o3(0xEC,0xA8,0x81),
+     o3(0xEC,0xA8,0x82), o3(0xEC,0xA8,0x83),
+     o3(0xEC,0xA8,0x84), o3(0xEC,0xA8,0x85),
+     o3(0xEC,0xA8,0x86), o3(0xEC,0xA8,0x87),
+     o3(0xEC,0xA8,0x8A), o3(0xEC,0xA8,0x8E),
+     o3(0xEC,0xA8,0x8F), o3(0xEC,0xA8,0x90),
+     o3(0xEC,0xA8,0x91), o3(0xEC,0xA8,0x92),
+     o3(0xEC,0xA8,0x93), o3(0xEC,0xA8,0x95),
+     o3(0xEC,0xA8,0x96), o3(0xEC,0xA8,0x97),
+     o3(0xEC,0xA8,0x99), o3(0xEC,0xA8,0x9A),
+     o3(0xEC,0xA8,0x9B), o3(0xEC,0xA8,0x9C),
+     o3(0xEC,0xA8,0x9D), o3(0xEC,0xA8,0x9E),
+     o3(0xEC,0xA8,0x9F), o3(0xEC,0xA8,0xA0),
+     o3(0xEC,0xA8,0xA1), o3(0xEC,0xA8,0xA2),
+     o3(0xEC,0xA8,0xA3), o3(0xEC,0xA8,0xA4),
+     o3(0xEC,0xA8,0xA5), o3(0xEC,0xA8,0xA6),
+     o3(0xEC,0xA8,0xA7), o3(0xEC,0xA8,0xA8),
+     o3(0xEC,0xA8,0xAA), o3(0xEC,0xA8,0xAB),
+     o3(0xEC,0xA8,0xAC), o3(0xEC,0xA8,0xAD),
+     o3(0xEC,0xA8,0xAE), o3(0xEC,0xA8,0xAF),
+     o3(0xEC,0xA8,0xB0), o3(0xEC,0xA8,0xB1),
+     o3(0xEC,0xA8,0xB2), o3(0xEC,0xA8,0xB3),
+     o3(0xEC,0xA8,0xB4), o3(0xEC,0xA8,0xB5),
+     o3(0xEC,0xA8,0xB6), o3(0xEC,0xA8,0xB7),
+     o3(0xEC,0xA8,0xB8), o3(0xEC,0xA8,0xB9),
+     o3(0xEC,0xA8,0xBA), o3(0xEC,0xA8,0xBB),
+     o3(0xEC,0xA8,0xBC), o3(0xEC,0xA8,0xBD),
+     o3(0xEC,0xA8,0xBE), o3(0xEC,0xA8,0xBF),
+     o3(0xEC,0xA9,0x80), o3(0xEC,0xA9,0x81),
+     o3(0xEC,0xA9,0x82), o3(0xEC,0xA9,0x83),
+     o3(0xEC,0xA9,0x84), o3(0xEC,0xA9,0x85),
+     o3(0xEC,0xA9,0x86), o3(0xE3,0x84,0xB1),
+     o3(0xE3,0x84,0xB2), o3(0xE3,0x84,0xB3),
+     o3(0xE3,0x84,0xB4), o3(0xE3,0x84,0xB5),
+     o3(0xE3,0x84,0xB6), o3(0xE3,0x84,0xB7),
+     o3(0xE3,0x84,0xB8), o3(0xE3,0x84,0xB9),
+     o3(0xE3,0x84,0xBA), o3(0xE3,0x84,0xBB),
+     o3(0xE3,0x84,0xBC), o3(0xE3,0x84,0xBD),
+     o3(0xE3,0x84,0xBE), o3(0xE3,0x84,0xBF),
+     o3(0xE3,0x85,0x80), o3(0xE3,0x85,0x81),
+     o3(0xE3,0x85,0x82), o3(0xE3,0x85,0x83),
+     o3(0xE3,0x85,0x84), o3(0xE3,0x85,0x85),
+     o3(0xE3,0x85,0x86), o3(0xE3,0x85,0x87),
+     o3(0xE3,0x85,0x88), o3(0xE3,0x85,0x89),
+     o3(0xE3,0x85,0x8A), o3(0xE3,0x85,0x8B),
+     o3(0xE3,0x85,0x8C), o3(0xE3,0x85,0x8D),
+     o3(0xE3,0x85,0x8E), o3(0xE3,0x85,0x8F),
+     o3(0xE3,0x85,0x90), o3(0xE3,0x85,0x91),
+     o3(0xE3,0x85,0x92), o3(0xE3,0x85,0x93),
+     o3(0xE3,0x85,0x94), o3(0xE3,0x85,0x95),
+     o3(0xE3,0x85,0x96), o3(0xE3,0x85,0x97),
+     o3(0xE3,0x85,0x98), o3(0xE3,0x85,0x99),
+     o3(0xE3,0x85,0x9A), o3(0xE3,0x85,0x9B),
+     o3(0xE3,0x85,0x9C), o3(0xE3,0x85,0x9D),
+     o3(0xE3,0x85,0x9E), o3(0xE3,0x85,0x9F),
+     o3(0xE3,0x85,0xA0), o3(0xE3,0x85,0xA1),
+     o3(0xE3,0x85,0xA2), o3(0xE3,0x85,0xA3),
+     o3(0xE3,0x85,0xA4), o3(0xE3,0x85,0xA5),
+     o3(0xE3,0x85,0xA6), o3(0xE3,0x85,0xA7),
+     o3(0xE3,0x85,0xA8), o3(0xE3,0x85,0xA9),
+     o3(0xE3,0x85,0xAA), o3(0xE3,0x85,0xAB),
+     o3(0xE3,0x85,0xAC), o3(0xE3,0x85,0xAD),
+     o3(0xE3,0x85,0xAE), o3(0xE3,0x85,0xAF),
+     o3(0xE3,0x85,0xB0), o3(0xE3,0x85,0xB1),
+     o3(0xE3,0x85,0xB2), o3(0xE3,0x85,0xB3),
+     o3(0xE3,0x85,0xB4), o3(0xE3,0x85,0xB5),
+     o3(0xE3,0x85,0xB6), o3(0xE3,0x85,0xB7),
+     o3(0xE3,0x85,0xB8), o3(0xE3,0x85,0xB9),
+     o3(0xE3,0x85,0xBA), o3(0xE3,0x85,0xBB),
+     o3(0xE3,0x85,0xBC), o3(0xE3,0x85,0xBD),
+     o3(0xE3,0x85,0xBE), o3(0xE3,0x85,0xBF),
+     o3(0xE3,0x86,0x80), o3(0xE3,0x86,0x81),
+     o3(0xE3,0x86,0x82), o3(0xE3,0x86,0x83),
+     o3(0xE3,0x86,0x84), o3(0xE3,0x86,0x85),
+     o3(0xE3,0x86,0x86), o3(0xE3,0x86,0x87),
+     o3(0xE3,0x86,0x88), o3(0xE3,0x86,0x89),
+     o3(0xE3,0x86,0x8A), o3(0xE3,0x86,0x8B),
+     o3(0xE3,0x86,0x8C), o3(0xE3,0x86,0x8D),
+     o3(0xE3,0x86,0x8E),
+
+#define from_CP949_A4 WORDINDEX2INFO(38092)
+    from_CP949_81_offsets,
+    from_CP949_A4_infos,
+
+#define from_CP949_A5_infos WORDINDEX2INFO(38094)
+                INVALID, o3(0xEC,0xA9,0x87),
+     o3(0xEC,0xA9,0x88), o3(0xEC,0xA9,0x89),
+     o3(0xEC,0xA9,0x8A), o3(0xEC,0xA9,0x8B),
+     o3(0xEC,0xA9,0x8E), o3(0xEC,0xA9,0x8F),
+     o3(0xEC,0xA9,0x91), o3(0xEC,0xA9,0x92),
+     o3(0xEC,0xA9,0x93), o3(0xEC,0xA9,0x95),
+     o3(0xEC,0xA9,0x96), o3(0xEC,0xA9,0x97),
+     o3(0xEC,0xA9,0x98), o3(0xEC,0xA9,0x99),
+     o3(0xEC,0xA9,0x9A), o3(0xEC,0xA9,0x9B),
+     o3(0xEC,0xA9,0x9E), o3(0xEC,0xA9,0xA2),
+     o3(0xEC,0xA9,0xA3), o3(0xEC,0xA9,0xA4),
+     o3(0xEC,0xA9,0xA5), o3(0xEC,0xA9,0xA6),
+     o3(0xEC,0xA9,0xA7), o3(0xEC,0xA9,0xA9),
+     o3(0xEC,0xA9,0xAA), o3(0xEC,0xA9,0xAB),
+     o3(0xEC,0xA9,0xAC), o3(0xEC,0xA9,0xAD),
+     o3(0xEC,0xA9,0xAE), o3(0xEC,0xA9,0xAF),
+     o3(0xEC,0xA9,0xB0), o3(0xEC,0xA9,0xB1),
+     o3(0xEC,0xA9,0xB2), o3(0xEC,0xA9,0xB3),
+     o3(0xEC,0xA9,0xB4), o3(0xEC,0xA9,0xB5),
+     o3(0xEC,0xA9,0xB6), o3(0xEC,0xA9,0xB7),
+     o3(0xEC,0xA9,0xB8), o3(0xEC,0xA9,0xB9),
+     o3(0xEC,0xA9,0xBA), o3(0xEC,0xA9,0xBB),
+     o3(0xEC,0xA9,0xBC), o3(0xEC,0xA9,0xBE),
+     o3(0xEC,0xA9,0xBF), o3(0xEC,0xAA,0x80),
+     o3(0xEC,0xAA,0x81), o3(0xEC,0xAA,0x82),
+     o3(0xEC,0xAA,0x83), o3(0xEC,0xAA,0x85),
+     o3(0xEC,0xAA,0x86), o3(0xEC,0xAA,0x87),
+     o3(0xEC,0xAA,0x88), o3(0xEC,0xAA,0x89),
+     o3(0xEC,0xAA,0x8A), o3(0xEC,0xAA,0x8B),
+     o3(0xEC,0xAA,0x8C), o3(0xEC,0xAA,0x8D),
+     o3(0xEC,0xAA,0x8E), o3(0xEC,0xAA,0x8F),
+     o3(0xEC,0xAA,0x90), o3(0xEC,0xAA,0x91),
+     o3(0xEC,0xAA,0x92), o3(0xEC,0xAA,0x93),
+     o3(0xEC,0xAA,0x94), o3(0xEC,0xAA,0x95),
+     o3(0xEC,0xAA,0x96), o3(0xEC,0xAA,0x97),
+     o3(0xEC,0xAA,0x99), o3(0xEC,0xAA,0x9A),
+     o3(0xEC,0xAA,0x9B), o3(0xEC,0xAA,0x9C),
+     o3(0xEC,0xAA,0x9D), o3(0xEC,0xAA,0x9E),
+     o3(0xEC,0xAA,0x9F), o3(0xEC,0xAA,0xA0),
+     o3(0xEC,0xAA,0xA1), o3(0xEC,0xAA,0xA2),
+     o3(0xEC,0xAA,0xA3), o3(0xEC,0xAA,0xA4),
+     o3(0xEC,0xAA,0xA5), o3(0xEC,0xAA,0xA6),
+     o3(0xEC,0xAA,0xA7), o3(0xE2,0x85,0xB0),
+     o3(0xE2,0x85,0xB1), o3(0xE2,0x85,0xB2),
+     o3(0xE2,0x85,0xB3), o3(0xE2,0x85,0xB4),
+     o3(0xE2,0x85,0xB5), o3(0xE2,0x85,0xB6),
+     o3(0xE2,0x85,0xB7), o3(0xE2,0x85,0xB8),
+     o3(0xE2,0x85,0xB9),              UNDEF,
+     o3(0xE2,0x85,0xA0), o3(0xE2,0x85,0xA1),
+     o3(0xE2,0x85,0xA2), o3(0xE2,0x85,0xA3),
+     o3(0xE2,0x85,0xA4), o3(0xE2,0x85,0xA5),
+     o3(0xE2,0x85,0xA6), o3(0xE2,0x85,0xA7),
+     o3(0xE2,0x85,0xA8), o3(0xE2,0x85,0xA9),
+          o2(0xCE,0x91),      o2(0xCE,0x92),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x95),      o2(0xCE,0x96),
+          o2(0xCE,0x97),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9B),      o2(0xCE,0x9C),
+          o2(0xCE,0x9D),      o2(0xCE,0x9E),
+          o2(0xCE,0x9F),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1),      o2(0xCE,0xA3),
+          o2(0xCE,0xA4),      o2(0xCE,0xA5),
+          o2(0xCE,0xA6),      o2(0xCE,0xA7),
+          o2(0xCE,0xA8),      o2(0xCE,0xA9),
+          o2(0xCE,0xB1),      o2(0xCE,0xB2),
+          o2(0xCE,0xB3),      o2(0xCE,0xB4),
+          o2(0xCE,0xB5),      o2(0xCE,0xB6),
+          o2(0xCE,0xB7),      o2(0xCE,0xB8),
+          o2(0xCE,0xB9),      o2(0xCE,0xBA),
+          o2(0xCE,0xBB),      o2(0xCE,0xBC),
+          o2(0xCE,0xBD),      o2(0xCE,0xBE),
+          o2(0xCE,0xBF),      o2(0xCF,0x80),
+          o2(0xCF,0x81),      o2(0xCF,0x83),
+          o2(0xCF,0x84),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xCF,0x88),      o2(0xCF,0x89),
+
+#define from_CP949_A5 WORDINDEX2INFO(38248)
+    from_CP949_A5_offsets,
+    from_CP949_A5_infos,
+
+#define from_CP949_A6_infos WORDINDEX2INFO(38250)
+                INVALID, o3(0xEC,0xAA,0xA8),
+     o3(0xEC,0xAA,0xA9), o3(0xEC,0xAA,0xAA),
+     o3(0xEC,0xAA,0xAB), o3(0xEC,0xAA,0xAC),
+     o3(0xEC,0xAA,0xAD), o3(0xEC,0xAA,0xAE),
+     o3(0xEC,0xAA,0xAF), o3(0xEC,0xAA,0xB0),
+     o3(0xEC,0xAA,0xB1), o3(0xEC,0xAA,0xB2),
+     o3(0xEC,0xAA,0xB3), o3(0xEC,0xAA,0xB4),
+     o3(0xEC,0xAA,0xB5), o3(0xEC,0xAA,0xB6),
+     o3(0xEC,0xAA,0xB7), o3(0xEC,0xAA,0xB8),
+     o3(0xEC,0xAA,0xB9), o3(0xEC,0xAA,0xBA),
+     o3(0xEC,0xAA,0xBB), o3(0xEC,0xAA,0xBE),
+     o3(0xEC,0xAA,0xBF), o3(0xEC,0xAB,0x81),
+     o3(0xEC,0xAB,0x82), o3(0xEC,0xAB,0x83),
+     o3(0xEC,0xAB,0x85), o3(0xEC,0xAB,0x86),
+     o3(0xEC,0xAB,0x87), o3(0xEC,0xAB,0x88),
+     o3(0xEC,0xAB,0x89), o3(0xEC,0xAB,0x8A),
+     o3(0xEC,0xAB,0x8B), o3(0xEC,0xAB,0x8E),
+     o3(0xEC,0xAB,0x90), o3(0xEC,0xAB,0x92),
+     o3(0xEC,0xAB,0x94), o3(0xEC,0xAB,0x95),
+     o3(0xEC,0xAB,0x96), o3(0xEC,0xAB,0x97),
+     o3(0xEC,0xAB,0x9A), o3(0xEC,0xAB,0x9B),
+     o3(0xEC,0xAB,0x9C), o3(0xEC,0xAB,0x9D),
+     o3(0xEC,0xAB,0x9E), o3(0xEC,0xAB,0x9F),
+     o3(0xEC,0xAB,0xA1), o3(0xEC,0xAB,0xA2),
+     o3(0xEC,0xAB,0xA3), o3(0xEC,0xAB,0xA4),
+     o3(0xEC,0xAB,0xA5), o3(0xEC,0xAB,0xA6),
+     o3(0xEC,0xAB,0xA7), o3(0xEC,0xAB,0xA8),
+     o3(0xEC,0xAB,0xA9), o3(0xEC,0xAB,0xAA),
+     o3(0xEC,0xAB,0xAB), o3(0xEC,0xAB,0xAD),
+     o3(0xEC,0xAB,0xAE), o3(0xEC,0xAB,0xAF),
+     o3(0xEC,0xAB,0xB0), o3(0xEC,0xAB,0xB1),
+     o3(0xEC,0xAB,0xB2), o3(0xEC,0xAB,0xB3),
+     o3(0xEC,0xAB,0xB5), o3(0xEC,0xAB,0xB6),
+     o3(0xEC,0xAB,0xB7), o3(0xEC,0xAB,0xB8),
+     o3(0xEC,0xAB,0xB9), o3(0xEC,0xAB,0xBA),
+     o3(0xEC,0xAB,0xBB), o3(0xEC,0xAB,0xBC),
+     o3(0xEC,0xAB,0xBD), o3(0xEC,0xAB,0xBE),
+     o3(0xEC,0xAB,0xBF), o3(0xEC,0xAC,0x80),
+     o3(0xEC,0xAC,0x81), o3(0xEC,0xAC,0x82),
+     o3(0xEC,0xAC,0x83), o3(0xEC,0xAC,0x84),
+     o3(0xEC,0xAC,0x85), o3(0xEC,0xAC,0x86),
+     o3(0xEC,0xAC,0x87), o3(0xEC,0xAC,0x89),
+     o3(0xEC,0xAC,0x8A), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x98),
+     o3(0xE2,0x94,0x94), o3(0xE2,0x94,0x9C),
+     o3(0xE2,0x94,0xAC), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xBC),
+     o3(0xE2,0x94,0x81), o3(0xE2,0x94,0x83),
+     o3(0xE2,0x94,0x8F), o3(0xE2,0x94,0x93),
+     o3(0xE2,0x94,0x9B), o3(0xE2,0x94,0x97),
+     o3(0xE2,0x94,0xA3), o3(0xE2,0x94,0xB3),
+     o3(0xE2,0x94,0xAB), o3(0xE2,0x94,0xBB),
+     o3(0xE2,0x95,0x8B), o3(0xE2,0x94,0xA0),
+     o3(0xE2,0x94,0xAF), o3(0xE2,0x94,0xA8),
+     o3(0xE2,0x94,0xB7), o3(0xE2,0x94,0xBF),
+     o3(0xE2,0x94,0x9D), o3(0xE2,0x94,0xB0),
+     o3(0xE2,0x94,0xA5), o3(0xE2,0x94,0xB8),
+     o3(0xE2,0x95,0x82), o3(0xE2,0x94,0x92),
+     o3(0xE2,0x94,0x91), o3(0xE2,0x94,0x9A),
+     o3(0xE2,0x94,0x99), o3(0xE2,0x94,0x96),
+     o3(0xE2,0x94,0x95), o3(0xE2,0x94,0x8E),
+     o3(0xE2,0x94,0x8D), o3(0xE2,0x94,0x9E),
+     o3(0xE2,0x94,0x9F), o3(0xE2,0x94,0xA1),
+     o3(0xE2,0x94,0xA2), o3(0xE2,0x94,0xA6),
+     o3(0xE2,0x94,0xA7), o3(0xE2,0x94,0xA9),
+     o3(0xE2,0x94,0xAA), o3(0xE2,0x94,0xAD),
+     o3(0xE2,0x94,0xAE), o3(0xE2,0x94,0xB1),
+     o3(0xE2,0x94,0xB2), o3(0xE2,0x94,0xB5),
+     o3(0xE2,0x94,0xB6), o3(0xE2,0x94,0xB9),
+     o3(0xE2,0x94,0xBA), o3(0xE2,0x94,0xBD),
+     o3(0xE2,0x94,0xBE), o3(0xE2,0x95,0x80),
+     o3(0xE2,0x95,0x81), o3(0xE2,0x95,0x83),
+     o3(0xE2,0x95,0x84), o3(0xE2,0x95,0x85),
+     o3(0xE2,0x95,0x86), o3(0xE2,0x95,0x87),
+     o3(0xE2,0x95,0x88), o3(0xE2,0x95,0x89),
+     o3(0xE2,0x95,0x8A),              UNDEF,
+
+#define from_CP949_A6 WORDINDEX2INFO(38404)
+    from_CP949_A6_offsets,
+    from_CP949_A6_infos,
+
+#define from_CP949_A7_infos WORDINDEX2INFO(38406)
+                INVALID, o3(0xEC,0xAC,0x8B),
+     o3(0xEC,0xAC,0x8C), o3(0xEC,0xAC,0x8D),
+     o3(0xEC,0xAC,0x8E), o3(0xEC,0xAC,0x8F),
+     o3(0xEC,0xAC,0x91), o3(0xEC,0xAC,0x92),
+     o3(0xEC,0xAC,0x93), o3(0xEC,0xAC,0x95),
+     o3(0xEC,0xAC,0x96), o3(0xEC,0xAC,0x97),
+     o3(0xEC,0xAC,0x99), o3(0xEC,0xAC,0x9A),
+     o3(0xEC,0xAC,0x9B), o3(0xEC,0xAC,0x9C),
+     o3(0xEC,0xAC,0x9D), o3(0xEC,0xAC,0x9E),
+     o3(0xEC,0xAC,0x9F), o3(0xEC,0xAC,0xA2),
+     o3(0xEC,0xAC,0xA3), o3(0xEC,0xAC,0xA4),
+     o3(0xEC,0xAC,0xA5), o3(0xEC,0xAC,0xA6),
+     o3(0xEC,0xAC,0xA7), o3(0xEC,0xAC,0xA8),
+     o3(0xEC,0xAC,0xA9), o3(0xEC,0xAC,0xAA),
+     o3(0xEC,0xAC,0xAB), o3(0xEC,0xAC,0xAC),
+     o3(0xEC,0xAC,0xAD), o3(0xEC,0xAC,0xAE),
+     o3(0xEC,0xAC,0xAF), o3(0xEC,0xAC,0xB0),
+     o3(0xEC,0xAC,0xB1), o3(0xEC,0xAC,0xB2),
+     o3(0xEC,0xAC,0xB3), o3(0xEC,0xAC,0xB4),
+     o3(0xEC,0xAC,0xB5), o3(0xEC,0xAC,0xB6),
+     o3(0xEC,0xAC,0xB7), o3(0xEC,0xAC,0xB8),
+     o3(0xEC,0xAC,0xB9), o3(0xEC,0xAC,0xBA),
+     o3(0xEC,0xAC,0xBB), o3(0xEC,0xAC,0xBC),
+     o3(0xEC,0xAC,0xBD), o3(0xEC,0xAC,0xBE),
+     o3(0xEC,0xAC,0xBF), o3(0xEC,0xAD,0x80),
+     o3(0xEC,0xAD,0x82), o3(0xEC,0xAD,0x83),
+     o3(0xEC,0xAD,0x84), o3(0xEC,0xAD,0x85),
+     o3(0xEC,0xAD,0x86), o3(0xEC,0xAD,0x87),
+     o3(0xEC,0xAD,0x8A), o3(0xEC,0xAD,0x8B),
+     o3(0xEC,0xAD,0x8D), o3(0xEC,0xAD,0x8E),
+     o3(0xEC,0xAD,0x8F), o3(0xEC,0xAD,0x91),
+     o3(0xEC,0xAD,0x92), o3(0xEC,0xAD,0x93),
+     o3(0xEC,0xAD,0x94), o3(0xEC,0xAD,0x95),
+     o3(0xEC,0xAD,0x96), o3(0xEC,0xAD,0x97),
+     o3(0xEC,0xAD,0x9A), o3(0xEC,0xAD,0x9B),
+     o3(0xEC,0xAD,0x9C), o3(0xEC,0xAD,0x9E),
+     o3(0xEC,0xAD,0x9F), o3(0xEC,0xAD,0xA0),
+     o3(0xEC,0xAD,0xA1), o3(0xEC,0xAD,0xA2),
+     o3(0xEC,0xAD,0xA3), o3(0xEC,0xAD,0xA5),
+     o3(0xEC,0xAD,0xA6), o3(0xEC,0xAD,0xA7),
+     o3(0xEC,0xAD,0xA8), o3(0xEC,0xAD,0xA9),
+     o3(0xEC,0xAD,0xAA), o3(0xEC,0xAD,0xAB),
+     o3(0xEC,0xAD,0xAC), o3(0xE3,0x8E,0x95),
+     o3(0xE3,0x8E,0x96), o3(0xE3,0x8E,0x97),
+     o3(0xE2,0x84,0x93), o3(0xE3,0x8E,0x98),
+     o3(0xE3,0x8F,0x84), o3(0xE3,0x8E,0xA3),
+     o3(0xE3,0x8E,0xA4), o3(0xE3,0x8E,0xA5),
+     o3(0xE3,0x8E,0xA6), o3(0xE3,0x8E,0x99),
+     o3(0xE3,0x8E,0x9A), o3(0xE3,0x8E,0x9B),
+     o3(0xE3,0x8E,0x9C), o3(0xE3,0x8E,0x9D),
+     o3(0xE3,0x8E,0x9E), o3(0xE3,0x8E,0x9F),
+     o3(0xE3,0x8E,0xA0), o3(0xE3,0x8E,0xA1),
+     o3(0xE3,0x8E,0xA2), o3(0xE3,0x8F,0x8A),
+     o3(0xE3,0x8E,0x8D), o3(0xE3,0x8E,0x8E),
+     o3(0xE3,0x8E,0x8F), o3(0xE3,0x8F,0x8F),
+     o3(0xE3,0x8E,0x88), o3(0xE3,0x8E,0x89),
+     o3(0xE3,0x8F,0x88), o3(0xE3,0x8E,0xA7),
+     o3(0xE3,0x8E,0xA8), o3(0xE3,0x8E,0xB0),
+     o3(0xE3,0x8E,0xB1), o3(0xE3,0x8E,0xB2),
+     o3(0xE3,0x8E,0xB3), o3(0xE3,0x8E,0xB4),
+     o3(0xE3,0x8E,0xB5), o3(0xE3,0x8E,0xB6),
+     o3(0xE3,0x8E,0xB7), o3(0xE3,0x8E,0xB8),
+     o3(0xE3,0x8E,0xB9), o3(0xE3,0x8E,0x80),
+     o3(0xE3,0x8E,0x81), o3(0xE3,0x8E,0x82),
+     o3(0xE3,0x8E,0x83), o3(0xE3,0x8E,0x84),
+     o3(0xE3,0x8E,0xBA), o3(0xE3,0x8E,0xBB),
+     o3(0xE3,0x8E,0xBC), o3(0xE3,0x8E,0xBD),
+     o3(0xE3,0x8E,0xBE), o3(0xE3,0x8E,0xBF),
+     o3(0xE3,0x8E,0x90), o3(0xE3,0x8E,0x91),
+     o3(0xE3,0x8E,0x92), o3(0xE3,0x8E,0x93),
+     o3(0xE3,0x8E,0x94), o3(0xE2,0x84,0xA6),
+     o3(0xE3,0x8F,0x80), o3(0xE3,0x8F,0x81),
+     o3(0xE3,0x8E,0x8A), o3(0xE3,0x8E,0x8B),
+     o3(0xE3,0x8E,0x8C), o3(0xE3,0x8F,0x96),
+     o3(0xE3,0x8F,0x85), o3(0xE3,0x8E,0xAD),
+     o3(0xE3,0x8E,0xAE), o3(0xE3,0x8E,0xAF),
+     o3(0xE3,0x8F,0x9B), o3(0xE3,0x8E,0xA9),
+     o3(0xE3,0x8E,0xAA), o3(0xE3,0x8E,0xAB),
+     o3(0xE3,0x8E,0xAC), o3(0xE3,0x8F,0x9D),
+     o3(0xE3,0x8F,0x90), o3(0xE3,0x8F,0x93),
+     o3(0xE3,0x8F,0x83), o3(0xE3,0x8F,0x89),
+     o3(0xE3,0x8F,0x9C), o3(0xE3,0x8F,0x86),
+                  UNDEF,
+
+#define from_CP949_A7 WORDINDEX2INFO(38571)
+    from_CP949_A7_offsets,
+    from_CP949_A7_infos,
+
+#define from_CP949_A8_infos WORDINDEX2INFO(38573)
+                INVALID, o3(0xEC,0xAD,0xAD),
+     o3(0xEC,0xAD,0xAE), o3(0xEC,0xAD,0xAF),
+     o3(0xEC,0xAD,0xB0), o3(0xEC,0xAD,0xB1),
+     o3(0xEC,0xAD,0xB2), o3(0xEC,0xAD,0xB3),
+     o3(0xEC,0xAD,0xB4), o3(0xEC,0xAD,0xB5),
+     o3(0xEC,0xAD,0xB6), o3(0xEC,0xAD,0xB7),
+     o3(0xEC,0xAD,0xBA), o3(0xEC,0xAD,0xBB),
+     o3(0xEC,0xAD,0xBC), o3(0xEC,0xAD,0xBD),
+     o3(0xEC,0xAD,0xBE), o3(0xEC,0xAD,0xBF),
+     o3(0xEC,0xAE,0x80), o3(0xEC,0xAE,0x81),
+     o3(0xEC,0xAE,0x82), o3(0xEC,0xAE,0x83),
+     o3(0xEC,0xAE,0x84), o3(0xEC,0xAE,0x85),
+     o3(0xEC,0xAE,0x86), o3(0xEC,0xAE,0x87),
+     o3(0xEC,0xAE,0x88), o3(0xEC,0xAE,0x89),
+     o3(0xEC,0xAE,0x8A), o3(0xEC,0xAE,0x8B),
+     o3(0xEC,0xAE,0x8C), o3(0xEC,0xAE,0x8D),
+     o3(0xEC,0xAE,0x8E), o3(0xEC,0xAE,0x8F),
+     o3(0xEC,0xAE,0x90), o3(0xEC,0xAE,0x91),
+     o3(0xEC,0xAE,0x92), o3(0xEC,0xAE,0x93),
+     o3(0xEC,0xAE,0x94), o3(0xEC,0xAE,0x95),
+     o3(0xEC,0xAE,0x96), o3(0xEC,0xAE,0x97),
+     o3(0xEC,0xAE,0x98), o3(0xEC,0xAE,0x99),
+     o3(0xEC,0xAE,0x9A), o3(0xEC,0xAE,0x9B),
+     o3(0xEC,0xAE,0x9D), o3(0xEC,0xAE,0x9E),
+     o3(0xEC,0xAE,0x9F), o3(0xEC,0xAE,0xA0),
+     o3(0xEC,0xAE,0xA1), o3(0xEC,0xAE,0xA2),
+     o3(0xEC,0xAE,0xA3), o3(0xEC,0xAE,0xA4),
+     o3(0xEC,0xAE,0xA5), o3(0xEC,0xAE,0xA6),
+     o3(0xEC,0xAE,0xA7), o3(0xEC,0xAE,0xA8),
+     o3(0xEC,0xAE,0xA9), o3(0xEC,0xAE,0xAA),
+     o3(0xEC,0xAE,0xAB), o3(0xEC,0xAE,0xAC),
+     o3(0xEC,0xAE,0xAD), o3(0xEC,0xAE,0xAE),
+     o3(0xEC,0xAE,0xAF), o3(0xEC,0xAE,0xB0),
+     o3(0xEC,0xAE,0xB1), o3(0xEC,0xAE,0xB2),
+     o3(0xEC,0xAE,0xB3), o3(0xEC,0xAE,0xB4),
+     o3(0xEC,0xAE,0xB5), o3(0xEC,0xAE,0xB6),
+     o3(0xEC,0xAE,0xB7), o3(0xEC,0xAE,0xB9),
+     o3(0xEC,0xAE,0xBA), o3(0xEC,0xAE,0xBB),
+     o3(0xEC,0xAE,0xBC), o3(0xEC,0xAE,0xBD),
+     o3(0xEC,0xAE,0xBE), o3(0xEC,0xAE,0xBF),
+     o3(0xEC,0xAF,0x80), o3(0xEC,0xAF,0x81),
+     o3(0xEC,0xAF,0x82), o3(0xEC,0xAF,0x83),
+     o3(0xEC,0xAF,0x84),      o2(0xC3,0x86),
+          o2(0xC3,0x90),      o2(0xC2,0xAA),
+          o2(0xC4,0xA6),              UNDEF,
+          o2(0xC4,0xB2),      o2(0xC4,0xBF),
+          o2(0xC5,0x81),      o2(0xC3,0x98),
+          o2(0xC5,0x92),      o2(0xC2,0xBA),
+          o2(0xC3,0x9E),      o2(0xC5,0xA6),
+          o2(0xC5,0x8A), o3(0xE3,0x89,0xA0),
+     o3(0xE3,0x89,0xA1), o3(0xE3,0x89,0xA2),
+     o3(0xE3,0x89,0xA3), o3(0xE3,0x89,0xA4),
+     o3(0xE3,0x89,0xA5), o3(0xE3,0x89,0xA6),
+     o3(0xE3,0x89,0xA7), o3(0xE3,0x89,0xA8),
+     o3(0xE3,0x89,0xA9), o3(0xE3,0x89,0xAA),
+     o3(0xE3,0x89,0xAB), o3(0xE3,0x89,0xAC),
+     o3(0xE3,0x89,0xAD), o3(0xE3,0x89,0xAE),
+     o3(0xE3,0x89,0xAF), o3(0xE3,0x89,0xB0),
+     o3(0xE3,0x89,0xB1), o3(0xE3,0x89,0xB2),
+     o3(0xE3,0x89,0xB3), o3(0xE3,0x89,0xB4),
+     o3(0xE3,0x89,0xB5), o3(0xE3,0x89,0xB6),
+     o3(0xE3,0x89,0xB7), o3(0xE3,0x89,0xB8),
+     o3(0xE3,0x89,0xB9), o3(0xE3,0x89,0xBA),
+     o3(0xE3,0x89,0xBB), o3(0xE2,0x93,0x90),
+     o3(0xE2,0x93,0x91), o3(0xE2,0x93,0x92),
+     o3(0xE2,0x93,0x93), o3(0xE2,0x93,0x94),
+     o3(0xE2,0x93,0x95), o3(0xE2,0x93,0x96),
+     o3(0xE2,0x93,0x97), o3(0xE2,0x93,0x98),
+     o3(0xE2,0x93,0x99), o3(0xE2,0x93,0x9A),
+     o3(0xE2,0x93,0x9B), o3(0xE2,0x93,0x9C),
+     o3(0xE2,0x93,0x9D), o3(0xE2,0x93,0x9E),
+     o3(0xE2,0x93,0x9F), o3(0xE2,0x93,0xA0),
+     o3(0xE2,0x93,0xA1), o3(0xE2,0x93,0xA2),
+     o3(0xE2,0x93,0xA3), o3(0xE2,0x93,0xA4),
+     o3(0xE2,0x93,0xA5), o3(0xE2,0x93,0xA6),
+     o3(0xE2,0x93,0xA7), o3(0xE2,0x93,0xA8),
+     o3(0xE2,0x93,0xA9), o3(0xE2,0x91,0xA0),
+     o3(0xE2,0x91,0xA1), o3(0xE2,0x91,0xA2),
+     o3(0xE2,0x91,0xA3), o3(0xE2,0x91,0xA4),
+     o3(0xE2,0x91,0xA5), o3(0xE2,0x91,0xA6),
+     o3(0xE2,0x91,0xA7), o3(0xE2,0x91,0xA8),
+     o3(0xE2,0x91,0xA9), o3(0xE2,0x91,0xAA),
+     o3(0xE2,0x91,0xAB), o3(0xE2,0x91,0xAC),
+     o3(0xE2,0x91,0xAD), o3(0xE2,0x91,0xAE),
+          o2(0xC2,0xBD), o3(0xE2,0x85,0x93),
+     o3(0xE2,0x85,0x94),      o2(0xC2,0xBC),
+          o2(0xC2,0xBE), o3(0xE2,0x85,0x9B),
+     o3(0xE2,0x85,0x9C), o3(0xE2,0x85,0x9D),
+     o3(0xE2,0x85,0x9E),
+
+#define from_CP949_A8 WORDINDEX2INFO(38750)
+    from_CP949_A8_offsets,
+    from_CP949_A8_infos,
+
+#define from_CP949_A9_infos WORDINDEX2INFO(38752)
+                INVALID, o3(0xEC,0xAF,0x85),
+     o3(0xEC,0xAF,0x86), o3(0xEC,0xAF,0x87),
+     o3(0xEC,0xAF,0x88), o3(0xEC,0xAF,0x89),
+     o3(0xEC,0xAF,0x8A), o3(0xEC,0xAF,0x8B),
+     o3(0xEC,0xAF,0x8C), o3(0xEC,0xAF,0x8D),
+     o3(0xEC,0xAF,0x8E), o3(0xEC,0xAF,0x8F),
+     o3(0xEC,0xAF,0x90), o3(0xEC,0xAF,0x91),
+     o3(0xEC,0xAF,0x92), o3(0xEC,0xAF,0x93),
+     o3(0xEC,0xAF,0x95), o3(0xEC,0xAF,0x96),
+     o3(0xEC,0xAF,0x97), o3(0xEC,0xAF,0x98),
+     o3(0xEC,0xAF,0x99), o3(0xEC,0xAF,0x9A),
+     o3(0xEC,0xAF,0x9B), o3(0xEC,0xAF,0x9C),
+     o3(0xEC,0xAF,0x9D), o3(0xEC,0xAF,0x9E),
+     o3(0xEC,0xAF,0x9F), o3(0xEC,0xAF,0xA0),
+     o3(0xEC,0xAF,0xA1), o3(0xEC,0xAF,0xA2),
+     o3(0xEC,0xAF,0xA3), o3(0xEC,0xAF,0xA5),
+     o3(0xEC,0xAF,0xA6), o3(0xEC,0xAF,0xA8),
+     o3(0xEC,0xAF,0xAA), o3(0xEC,0xAF,0xAB),
+     o3(0xEC,0xAF,0xAC), o3(0xEC,0xAF,0xAD),
+     o3(0xEC,0xAF,0xAE), o3(0xEC,0xAF,0xAF),
+     o3(0xEC,0xAF,0xB0), o3(0xEC,0xAF,0xB1),
+     o3(0xEC,0xAF,0xB2), o3(0xEC,0xAF,0xB3),
+     o3(0xEC,0xAF,0xB4), o3(0xEC,0xAF,0xB5),
+     o3(0xEC,0xAF,0xB6), o3(0xEC,0xAF,0xB7),
+     o3(0xEC,0xAF,0xB8), o3(0xEC,0xAF,0xB9),
+     o3(0xEC,0xAF,0xBA), o3(0xEC,0xAF,0xBB),
+     o3(0xEC,0xAF,0xBC), o3(0xEC,0xAF,0xBD),
+     o3(0xEC,0xAF,0xBE), o3(0xEC,0xAF,0xBF),
+     o3(0xEC,0xB0,0x80), o3(0xEC,0xB0,0x81),
+     o3(0xEC,0xB0,0x82), o3(0xEC,0xB0,0x83),
+     o3(0xEC,0xB0,0x84), o3(0xEC,0xB0,0x85),
+     o3(0xEC,0xB0,0x86), o3(0xEC,0xB0,0x87),
+     o3(0xEC,0xB0,0x88), o3(0xEC,0xB0,0x89),
+     o3(0xEC,0xB0,0x8A), o3(0xEC,0xB0,0x8B),
+     o3(0xEC,0xB0,0x8E), o3(0xEC,0xB0,0x8F),
+     o3(0xEC,0xB0,0x91), o3(0xEC,0xB0,0x92),
+     o3(0xEC,0xB0,0x93), o3(0xEC,0xB0,0x95),
+     o3(0xEC,0xB0,0x96), o3(0xEC,0xB0,0x97),
+     o3(0xEC,0xB0,0x98), o3(0xEC,0xB0,0x99),
+     o3(0xEC,0xB0,0x9A), o3(0xEC,0xB0,0x9B),
+     o3(0xEC,0xB0,0x9E), o3(0xEC,0xB0,0x9F),
+     o3(0xEC,0xB0,0xA0), o3(0xEC,0xB0,0xA3),
+     o3(0xEC,0xB0,0xA4),      o2(0xC3,0xA6),
+          o2(0xC4,0x91),      o2(0xC3,0xB0),
+          o2(0xC4,0xA7),      o2(0xC4,0xB1),
+          o2(0xC4,0xB3),      o2(0xC4,0xB8),
+          o2(0xC5,0x80),      o2(0xC5,0x82),
+          o2(0xC3,0xB8),      o2(0xC5,0x93),
+          o2(0xC3,0x9F),      o2(0xC3,0xBE),
+          o2(0xC5,0xA7),      o2(0xC5,0x8B),
+          o2(0xC5,0x89), o3(0xE3,0x88,0x80),
+     o3(0xE3,0x88,0x81), o3(0xE3,0x88,0x82),
+     o3(0xE3,0x88,0x83), o3(0xE3,0x88,0x84),
+     o3(0xE3,0x88,0x85), o3(0xE3,0x88,0x86),
+     o3(0xE3,0x88,0x87), o3(0xE3,0x88,0x88),
+     o3(0xE3,0x88,0x89), o3(0xE3,0x88,0x8A),
+     o3(0xE3,0x88,0x8B), o3(0xE3,0x88,0x8C),
+     o3(0xE3,0x88,0x8D), o3(0xE3,0x88,0x8E),
+     o3(0xE3,0x88,0x8F), o3(0xE3,0x88,0x90),
+     o3(0xE3,0x88,0x91), o3(0xE3,0x88,0x92),
+     o3(0xE3,0x88,0x93), o3(0xE3,0x88,0x94),
+     o3(0xE3,0x88,0x95), o3(0xE3,0x88,0x96),
+     o3(0xE3,0x88,0x97), o3(0xE3,0x88,0x98),
+     o3(0xE3,0x88,0x99), o3(0xE3,0x88,0x9A),
+     o3(0xE3,0x88,0x9B), o3(0xE2,0x92,0x9C),
+     o3(0xE2,0x92,0x9D), o3(0xE2,0x92,0x9E),
+     o3(0xE2,0x92,0x9F), o3(0xE2,0x92,0xA0),
+     o3(0xE2,0x92,0xA1), o3(0xE2,0x92,0xA2),
+     o3(0xE2,0x92,0xA3), o3(0xE2,0x92,0xA4),
+     o3(0xE2,0x92,0xA5), o3(0xE2,0x92,0xA6),
+     o3(0xE2,0x92,0xA7), o3(0xE2,0x92,0xA8),
+     o3(0xE2,0x92,0xA9), o3(0xE2,0x92,0xAA),
+     o3(0xE2,0x92,0xAB), o3(0xE2,0x92,0xAC),
+     o3(0xE2,0x92,0xAD), o3(0xE2,0x92,0xAE),
+     o3(0xE2,0x92,0xAF), o3(0xE2,0x92,0xB0),
+     o3(0xE2,0x92,0xB1), o3(0xE2,0x92,0xB2),
+     o3(0xE2,0x92,0xB3), o3(0xE2,0x92,0xB4),
+     o3(0xE2,0x92,0xB5), o3(0xE2,0x91,0xB4),
+     o3(0xE2,0x91,0xB5), o3(0xE2,0x91,0xB6),
+     o3(0xE2,0x91,0xB7), o3(0xE2,0x91,0xB8),
+     o3(0xE2,0x91,0xB9), o3(0xE2,0x91,0xBA),
+     o3(0xE2,0x91,0xBB), o3(0xE2,0x91,0xBC),
+     o3(0xE2,0x91,0xBD), o3(0xE2,0x91,0xBE),
+     o3(0xE2,0x91,0xBF), o3(0xE2,0x92,0x80),
+     o3(0xE2,0x92,0x81), o3(0xE2,0x92,0x82),
+          o2(0xC2,0xB9),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3), o3(0xE2,0x81,0xB4),
+     o3(0xE2,0x81,0xBF), o3(0xE2,0x82,0x81),
+     o3(0xE2,0x82,0x82), o3(0xE2,0x82,0x83),
+     o3(0xE2,0x82,0x84),
+
+#define from_CP949_A9 WORDINDEX2INFO(38931)
+    from_CP949_81_offsets,
+    from_CP949_A9_infos,
+
+#define from_CP949_AA_infos WORDINDEX2INFO(38933)
+                INVALID, o3(0xEC,0xB0,0xA5),
+     o3(0xEC,0xB0,0xA6), o3(0xEC,0xB0,0xAA),
+     o3(0xEC,0xB0,0xAB), o3(0xEC,0xB0,0xAD),
+     o3(0xEC,0xB0,0xAF), o3(0xEC,0xB0,0xB1),
+     o3(0xEC,0xB0,0xB2), o3(0xEC,0xB0,0xB3),
+     o3(0xEC,0xB0,0xB4), o3(0xEC,0xB0,0xB5),
+     o3(0xEC,0xB0,0xB6), o3(0xEC,0xB0,0xB7),
+     o3(0xEC,0xB0,0xBA), o3(0xEC,0xB0,0xBF),
+     o3(0xEC,0xB1,0x80), o3(0xEC,0xB1,0x81),
+     o3(0xEC,0xB1,0x82), o3(0xEC,0xB1,0x83),
+     o3(0xEC,0xB1,0x86), o3(0xEC,0xB1,0x87),
+     o3(0xEC,0xB1,0x89), o3(0xEC,0xB1,0x8A),
+     o3(0xEC,0xB1,0x8B), o3(0xEC,0xB1,0x8D),
+     o3(0xEC,0xB1,0x8E), o3(0xEC,0xB1,0x8F),
+     o3(0xEC,0xB1,0x90), o3(0xEC,0xB1,0x91),
+     o3(0xEC,0xB1,0x92), o3(0xEC,0xB1,0x93),
+     o3(0xEC,0xB1,0x96), o3(0xEC,0xB1,0x9A),
+     o3(0xEC,0xB1,0x9B), o3(0xEC,0xB1,0x9C),
+     o3(0xEC,0xB1,0x9D), o3(0xEC,0xB1,0x9E),
+     o3(0xEC,0xB1,0x9F), o3(0xEC,0xB1,0xA1),
+     o3(0xEC,0xB1,0xA2), o3(0xEC,0xB1,0xA3),
+     o3(0xEC,0xB1,0xA5), o3(0xEC,0xB1,0xA7),
+     o3(0xEC,0xB1,0xA9), o3(0xEC,0xB1,0xAA),
+     o3(0xEC,0xB1,0xAB), o3(0xEC,0xB1,0xAC),
+     o3(0xEC,0xB1,0xAD), o3(0xEC,0xB1,0xAE),
+     o3(0xEC,0xB1,0xAF), o3(0xEC,0xB1,0xB1),
+     o3(0xEC,0xB1,0xB2), o3(0xEC,0xB1,0xB3),
+     o3(0xEC,0xB1,0xB4), o3(0xEC,0xB1,0xB6),
+     o3(0xEC,0xB1,0xB7), o3(0xEC,0xB1,0xB8),
+     o3(0xEC,0xB1,0xB9), o3(0xEC,0xB1,0xBA),
+     o3(0xEC,0xB1,0xBB), o3(0xEC,0xB1,0xBC),
+     o3(0xEC,0xB1,0xBD), o3(0xEC,0xB1,0xBE),
+     o3(0xEC,0xB1,0xBF), o3(0xEC,0xB2,0x80),
+     o3(0xEC,0xB2,0x81), o3(0xEC,0xB2,0x82),
+     o3(0xEC,0xB2,0x83), o3(0xEC,0xB2,0x84),
+     o3(0xEC,0xB2,0x85), o3(0xEC,0xB2,0x86),
+     o3(0xEC,0xB2,0x87), o3(0xEC,0xB2,0x88),
+     o3(0xEC,0xB2,0x89), o3(0xEC,0xB2,0x8A),
+     o3(0xEC,0xB2,0x8B), o3(0xEC,0xB2,0x8C),
+     o3(0xEC,0xB2,0x8D), o3(0xEC,0xB2,0x8E),
+     o3(0xEC,0xB2,0x8F), o3(0xEC,0xB2,0x90),
+     o3(0xEC,0xB2,0x91), o3(0xEC,0xB2,0x92),
+     o3(0xEC,0xB2,0x93), o3(0xE3,0x81,0x81),
+     o3(0xE3,0x81,0x82), o3(0xE3,0x81,0x83),
+     o3(0xE3,0x81,0x84), o3(0xE3,0x81,0x85),
+     o3(0xE3,0x81,0x86), o3(0xE3,0x81,0x87),
+     o3(0xE3,0x81,0x88), o3(0xE3,0x81,0x89),
+     o3(0xE3,0x81,0x8A), o3(0xE3,0x81,0x8B),
+     o3(0xE3,0x81,0x8C), o3(0xE3,0x81,0x8D),
+     o3(0xE3,0x81,0x8E), o3(0xE3,0x81,0x8F),
+     o3(0xE3,0x81,0x90), o3(0xE3,0x81,0x91),
+     o3(0xE3,0x81,0x92), o3(0xE3,0x81,0x93),
+     o3(0xE3,0x81,0x94), o3(0xE3,0x81,0x95),
+     o3(0xE3,0x81,0x96), o3(0xE3,0x81,0x97),
+     o3(0xE3,0x81,0x98), o3(0xE3,0x81,0x99),
+     o3(0xE3,0x81,0x9A), o3(0xE3,0x81,0x9B),
+     o3(0xE3,0x81,0x9C), o3(0xE3,0x81,0x9D),
+     o3(0xE3,0x81,0x9E), o3(0xE3,0x81,0x9F),
+     o3(0xE3,0x81,0xA0), o3(0xE3,0x81,0xA1),
+     o3(0xE3,0x81,0xA2), o3(0xE3,0x81,0xA3),
+     o3(0xE3,0x81,0xA4), o3(0xE3,0x81,0xA5),
+     o3(0xE3,0x81,0xA6), o3(0xE3,0x81,0xA7),
+     o3(0xE3,0x81,0xA8), o3(0xE3,0x81,0xA9),
+     o3(0xE3,0x81,0xAA), o3(0xE3,0x81,0xAB),
+     o3(0xE3,0x81,0xAC), o3(0xE3,0x81,0xAD),
+     o3(0xE3,0x81,0xAE), o3(0xE3,0x81,0xAF),
+     o3(0xE3,0x81,0xB0), o3(0xE3,0x81,0xB1),
+     o3(0xE3,0x81,0xB2), o3(0xE3,0x81,0xB3),
+     o3(0xE3,0x81,0xB4), o3(0xE3,0x81,0xB5),
+     o3(0xE3,0x81,0xB6), o3(0xE3,0x81,0xB7),
+     o3(0xE3,0x81,0xB8), o3(0xE3,0x81,0xB9),
+     o3(0xE3,0x81,0xBA), o3(0xE3,0x81,0xBB),
+     o3(0xE3,0x81,0xBC), o3(0xE3,0x81,0xBD),
+     o3(0xE3,0x81,0xBE), o3(0xE3,0x81,0xBF),
+     o3(0xE3,0x82,0x80), o3(0xE3,0x82,0x81),
+     o3(0xE3,0x82,0x82), o3(0xE3,0x82,0x83),
+     o3(0xE3,0x82,0x84), o3(0xE3,0x82,0x85),
+     o3(0xE3,0x82,0x86), o3(0xE3,0x82,0x87),
+     o3(0xE3,0x82,0x88), o3(0xE3,0x82,0x89),
+     o3(0xE3,0x82,0x8A), o3(0xE3,0x82,0x8B),
+     o3(0xE3,0x82,0x8C), o3(0xE3,0x82,0x8D),
+     o3(0xE3,0x82,0x8E), o3(0xE3,0x82,0x8F),
+     o3(0xE3,0x82,0x90), o3(0xE3,0x82,0x91),
+     o3(0xE3,0x82,0x92), o3(0xE3,0x82,0x93),
+                  UNDEF,
+
+#define from_CP949_AA WORDINDEX2INFO(39102)
+    from_CP949_AA_offsets,
+    from_CP949_AA_infos,
+
+#define from_CP949_AB_infos WORDINDEX2INFO(39104)
+                INVALID, o3(0xEC,0xB2,0x94),
+     o3(0xEC,0xB2,0x95), o3(0xEC,0xB2,0x96),
+     o3(0xEC,0xB2,0x97), o3(0xEC,0xB2,0x9A),
+     o3(0xEC,0xB2,0x9B), o3(0xEC,0xB2,0x9D),
+     o3(0xEC,0xB2,0x9E), o3(0xEC,0xB2,0x9F),
+     o3(0xEC,0xB2,0xA1), o3(0xEC,0xB2,0xA2),
+     o3(0xEC,0xB2,0xA3), o3(0xEC,0xB2,0xA4),
+     o3(0xEC,0xB2,0xA5), o3(0xEC,0xB2,0xA6),
+     o3(0xEC,0xB2,0xA7), o3(0xEC,0xB2,0xAA),
+     o3(0xEC,0xB2,0xAE), o3(0xEC,0xB2,0xAF),
+     o3(0xEC,0xB2,0xB0), o3(0xEC,0xB2,0xB1),
+     o3(0xEC,0xB2,0xB2), o3(0xEC,0xB2,0xB3),
+     o3(0xEC,0xB2,0xB6), o3(0xEC,0xB2,0xB7),
+     o3(0xEC,0xB2,0xB9), o3(0xEC,0xB2,0xBA),
+     o3(0xEC,0xB2,0xBB), o3(0xEC,0xB2,0xBD),
+     o3(0xEC,0xB2,0xBE), o3(0xEC,0xB2,0xBF),
+     o3(0xEC,0xB3,0x80), o3(0xEC,0xB3,0x81),
+     o3(0xEC,0xB3,0x82), o3(0xEC,0xB3,0x83),
+     o3(0xEC,0xB3,0x86), o3(0xEC,0xB3,0x88),
+     o3(0xEC,0xB3,0x8A), o3(0xEC,0xB3,0x8B),
+     o3(0xEC,0xB3,0x8C), o3(0xEC,0xB3,0x8D),
+     o3(0xEC,0xB3,0x8E), o3(0xEC,0xB3,0x8F),
+     o3(0xEC,0xB3,0x91), o3(0xEC,0xB3,0x92),
+     o3(0xEC,0xB3,0x93), o3(0xEC,0xB3,0x95),
+     o3(0xEC,0xB3,0x96), o3(0xEC,0xB3,0x97),
+     o3(0xEC,0xB3,0x98), o3(0xEC,0xB3,0x99),
+     o3(0xEC,0xB3,0x9A), o3(0xEC,0xB3,0x9B),
+     o3(0xEC,0xB3,0x9C), o3(0xEC,0xB3,0x9D),
+     o3(0xEC,0xB3,0x9E), o3(0xEC,0xB3,0x9F),
+     o3(0xEC,0xB3,0xA0), o3(0xEC,0xB3,0xA1),
+     o3(0xEC,0xB3,0xA2), o3(0xEC,0xB3,0xA3),
+     o3(0xEC,0xB3,0xA5), o3(0xEC,0xB3,0xA6),
+     o3(0xEC,0xB3,0xA7), o3(0xEC,0xB3,0xA8),
+     o3(0xEC,0xB3,0xA9), o3(0xEC,0xB3,0xAA),
+     o3(0xEC,0xB3,0xAB), o3(0xEC,0xB3,0xAD),
+     o3(0xEC,0xB3,0xAE), o3(0xEC,0xB3,0xAF),
+     o3(0xEC,0xB3,0xB1), o3(0xEC,0xB3,0xB2),
+     o3(0xEC,0xB3,0xB3), o3(0xEC,0xB3,0xB4),
+     o3(0xEC,0xB3,0xB5), o3(0xEC,0xB3,0xB6),
+     o3(0xEC,0xB3,0xB7), o3(0xEC,0xB3,0xB8),
+     o3(0xEC,0xB3,0xB9), o3(0xEC,0xB3,0xBA),
+     o3(0xEC,0xB3,0xBB), o3(0xEC,0xB3,0xBC),
+     o3(0xEC,0xB3,0xBD), o3(0xE3,0x82,0xA1),
+     o3(0xE3,0x82,0xA2), o3(0xE3,0x82,0xA3),
+     o3(0xE3,0x82,0xA4), o3(0xE3,0x82,0xA5),
+     o3(0xE3,0x82,0xA6), o3(0xE3,0x82,0xA7),
+     o3(0xE3,0x82,0xA8), o3(0xE3,0x82,0xA9),
+     o3(0xE3,0x82,0xAA), o3(0xE3,0x82,0xAB),
+     o3(0xE3,0x82,0xAC), o3(0xE3,0x82,0xAD),
+     o3(0xE3,0x82,0xAE), o3(0xE3,0x82,0xAF),
+     o3(0xE3,0x82,0xB0), o3(0xE3,0x82,0xB1),
+     o3(0xE3,0x82,0xB2), o3(0xE3,0x82,0xB3),
+     o3(0xE3,0x82,0xB4), o3(0xE3,0x82,0xB5),
+     o3(0xE3,0x82,0xB6), o3(0xE3,0x82,0xB7),
+     o3(0xE3,0x82,0xB8), o3(0xE3,0x82,0xB9),
+     o3(0xE3,0x82,0xBA), o3(0xE3,0x82,0xBB),
+     o3(0xE3,0x82,0xBC), o3(0xE3,0x82,0xBD),
+     o3(0xE3,0x82,0xBE), o3(0xE3,0x82,0xBF),
+     o3(0xE3,0x83,0x80), o3(0xE3,0x83,0x81),
+     o3(0xE3,0x83,0x82), o3(0xE3,0x83,0x83),
+     o3(0xE3,0x83,0x84), o3(0xE3,0x83,0x85),
+     o3(0xE3,0x83,0x86), o3(0xE3,0x83,0x87),
+     o3(0xE3,0x83,0x88), o3(0xE3,0x83,0x89),
+     o3(0xE3,0x83,0x8A), o3(0xE3,0x83,0x8B),
+     o3(0xE3,0x83,0x8C), o3(0xE3,0x83,0x8D),
+     o3(0xE3,0x83,0x8E), o3(0xE3,0x83,0x8F),
+     o3(0xE3,0x83,0x90), o3(0xE3,0x83,0x91),
+     o3(0xE3,0x83,0x92), o3(0xE3,0x83,0x93),
+     o3(0xE3,0x83,0x94), o3(0xE3,0x83,0x95),
+     o3(0xE3,0x83,0x96), o3(0xE3,0x83,0x97),
+     o3(0xE3,0x83,0x98), o3(0xE3,0x83,0x99),
+     o3(0xE3,0x83,0x9A), o3(0xE3,0x83,0x9B),
+     o3(0xE3,0x83,0x9C), o3(0xE3,0x83,0x9D),
+     o3(0xE3,0x83,0x9E), o3(0xE3,0x83,0x9F),
+     o3(0xE3,0x83,0xA0), o3(0xE3,0x83,0xA1),
+     o3(0xE3,0x83,0xA2), o3(0xE3,0x83,0xA3),
+     o3(0xE3,0x83,0xA4), o3(0xE3,0x83,0xA5),
+     o3(0xE3,0x83,0xA6), o3(0xE3,0x83,0xA7),
+     o3(0xE3,0x83,0xA8), o3(0xE3,0x83,0xA9),
+     o3(0xE3,0x83,0xAA), o3(0xE3,0x83,0xAB),
+     o3(0xE3,0x83,0xAC), o3(0xE3,0x83,0xAD),
+     o3(0xE3,0x83,0xAE), o3(0xE3,0x83,0xAF),
+     o3(0xE3,0x83,0xB0), o3(0xE3,0x83,0xB1),
+     o3(0xE3,0x83,0xB2), o3(0xE3,0x83,0xB3),
+     o3(0xE3,0x83,0xB4), o3(0xE3,0x83,0xB5),
+     o3(0xE3,0x83,0xB6),              UNDEF,
+
+#define from_CP949_AB WORDINDEX2INFO(39276)
+    from_CP949_AB_offsets,
+    from_CP949_AB_infos,
+
+#define from_CP949_AC_infos WORDINDEX2INFO(39278)
+                INVALID, o3(0xEC,0xB3,0xBE),
+     o3(0xEC,0xB3,0xBF), o3(0xEC,0xB4,0x80),
+     o3(0xEC,0xB4,0x82), o3(0xEC,0xB4,0x83),
+     o3(0xEC,0xB4,0x84), o3(0xEC,0xB4,0x85),
+     o3(0xEC,0xB4,0x86), o3(0xEC,0xB4,0x87),
+     o3(0xEC,0xB4,0x8A), o3(0xEC,0xB4,0x8B),
+     o3(0xEC,0xB4,0x8D), o3(0xEC,0xB4,0x8E),
+     o3(0xEC,0xB4,0x8F), o3(0xEC,0xB4,0x91),
+     o3(0xEC,0xB4,0x92), o3(0xEC,0xB4,0x93),
+     o3(0xEC,0xB4,0x94), o3(0xEC,0xB4,0x95),
+     o3(0xEC,0xB4,0x96), o3(0xEC,0xB4,0x97),
+     o3(0xEC,0xB4,0x9A), o3(0xEC,0xB4,0x9C),
+     o3(0xEC,0xB4,0x9E), o3(0xEC,0xB4,0x9F),
+     o3(0xEC,0xB4,0xA0), o3(0xEC,0xB4,0xA1),
+     o3(0xEC,0xB4,0xA2), o3(0xEC,0xB4,0xA3),
+     o3(0xEC,0xB4,0xA5), o3(0xEC,0xB4,0xA6),
+     o3(0xEC,0xB4,0xA7), o3(0xEC,0xB4,0xA9),
+     o3(0xEC,0xB4,0xAA), o3(0xEC,0xB4,0xAB),
+     o3(0xEC,0xB4,0xAD), o3(0xEC,0xB4,0xAE),
+     o3(0xEC,0xB4,0xAF), o3(0xEC,0xB4,0xB0),
+     o3(0xEC,0xB4,0xB1), o3(0xEC,0xB4,0xB2),
+     o3(0xEC,0xB4,0xB3), o3(0xEC,0xB4,0xB4),
+     o3(0xEC,0xB4,0xB5), o3(0xEC,0xB4,0xB6),
+     o3(0xEC,0xB4,0xB7), o3(0xEC,0xB4,0xB8),
+     o3(0xEC,0xB4,0xBA), o3(0xEC,0xB4,0xBB),
+     o3(0xEC,0xB4,0xBC), o3(0xEC,0xB4,0xBD),
+     o3(0xEC,0xB4,0xBE), o3(0xEC,0xB4,0xBF),
+     o3(0xEC,0xB5,0x80), o3(0xEC,0xB5,0x81),
+     o3(0xEC,0xB5,0x82), o3(0xEC,0xB5,0x83),
+     o3(0xEC,0xB5,0x84), o3(0xEC,0xB5,0x85),
+     o3(0xEC,0xB5,0x86), o3(0xEC,0xB5,0x87),
+     o3(0xEC,0xB5,0x88), o3(0xEC,0xB5,0x89),
+     o3(0xEC,0xB5,0x8A), o3(0xEC,0xB5,0x8B),
+     o3(0xEC,0xB5,0x8C), o3(0xEC,0xB5,0x8D),
+     o3(0xEC,0xB5,0x8E), o3(0xEC,0xB5,0x8F),
+     o3(0xEC,0xB5,0x90), o3(0xEC,0xB5,0x91),
+     o3(0xEC,0xB5,0x92), o3(0xEC,0xB5,0x93),
+     o3(0xEC,0xB5,0x94), o3(0xEC,0xB5,0x95),
+     o3(0xEC,0xB5,0x96), o3(0xEC,0xB5,0x97),
+     o3(0xEC,0xB5,0x98), o3(0xEC,0xB5,0x99),
+     o3(0xEC,0xB5,0x9A), o3(0xEC,0xB5,0x9B),
+     o3(0xEC,0xB5,0x9D), o3(0xEC,0xB5,0x9E),
+     o3(0xEC,0xB5,0x9F),      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x81),
+          o2(0xD0,0x96),      o2(0xD0,0x97),
+          o2(0xD0,0x98),      o2(0xD0,0x99),
+          o2(0xD0,0x9A),      o2(0xD0,0x9B),
+          o2(0xD0,0x9C),      o2(0xD0,0x9D),
+          o2(0xD0,0x9E),      o2(0xD0,0x9F),
+          o2(0xD0,0xA0),      o2(0xD0,0xA1),
+          o2(0xD0,0xA2),      o2(0xD0,0xA3),
+          o2(0xD0,0xA4),      o2(0xD0,0xA5),
+          o2(0xD0,0xA6),      o2(0xD0,0xA7),
+          o2(0xD0,0xA8),      o2(0xD0,0xA9),
+          o2(0xD0,0xAA),      o2(0xD0,0xAB),
+          o2(0xD0,0xAC),      o2(0xD0,0xAD),
+          o2(0xD0,0xAE),      o2(0xD0,0xAF),
+                  UNDEF,      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD1,0x91),
+          o2(0xD0,0xB6),      o2(0xD0,0xB7),
+          o2(0xD0,0xB8),      o2(0xD0,0xB9),
+          o2(0xD0,0xBA),      o2(0xD0,0xBB),
+          o2(0xD0,0xBC),      o2(0xD0,0xBD),
+          o2(0xD0,0xBE),      o2(0xD0,0xBF),
+          o2(0xD1,0x80),      o2(0xD1,0x81),
+          o2(0xD1,0x82),      o2(0xD1,0x83),
+          o2(0xD1,0x84),      o2(0xD1,0x85),
+          o2(0xD1,0x86),      o2(0xD1,0x87),
+          o2(0xD1,0x88),      o2(0xD1,0x89),
+          o2(0xD1,0x8A),      o2(0xD1,0x8B),
+          o2(0xD1,0x8C),      o2(0xD1,0x8D),
+          o2(0xD1,0x8E),      o2(0xD1,0x8F),
+
+#define from_CP949_AC WORDINDEX2INFO(39430)
+    from_CP949_AC_offsets,
+    from_CP949_AC_infos,
+
+#define from_CP949_AD_infos WORDINDEX2INFO(39432)
+                INVALID, o3(0xEC,0xB5,0xA1),
+     o3(0xEC,0xB5,0xA2), o3(0xEC,0xB5,0xA3),
+     o3(0xEC,0xB5,0xA5), o3(0xEC,0xB5,0xA6),
+     o3(0xEC,0xB5,0xA7), o3(0xEC,0xB5,0xA8),
+     o3(0xEC,0xB5,0xA9), o3(0xEC,0xB5,0xAA),
+     o3(0xEC,0xB5,0xAB), o3(0xEC,0xB5,0xAE),
+     o3(0xEC,0xB5,0xB0), o3(0xEC,0xB5,0xB2),
+     o3(0xEC,0xB5,0xB3), o3(0xEC,0xB5,0xB4),
+     o3(0xEC,0xB5,0xB5), o3(0xEC,0xB5,0xB6),
+     o3(0xEC,0xB5,0xB7), o3(0xEC,0xB5,0xB9),
+     o3(0xEC,0xB5,0xBA), o3(0xEC,0xB5,0xBB),
+     o3(0xEC,0xB5,0xBC), o3(0xEC,0xB5,0xBD),
+     o3(0xEC,0xB5,0xBE), o3(0xEC,0xB5,0xBF),
+     o3(0xEC,0xB6,0x80), o3(0xEC,0xB6,0x81),
+     o3(0xEC,0xB6,0x82), o3(0xEC,0xB6,0x83),
+     o3(0xEC,0xB6,0x84), o3(0xEC,0xB6,0x85),
+     o3(0xEC,0xB6,0x86), o3(0xEC,0xB6,0x87),
+     o3(0xEC,0xB6,0x89), o3(0xEC,0xB6,0x8A),
+     o3(0xEC,0xB6,0x8B), o3(0xEC,0xB6,0x8C),
+     o3(0xEC,0xB6,0x8D), o3(0xEC,0xB6,0x8E),
+     o3(0xEC,0xB6,0x8F), o3(0xEC,0xB6,0x90),
+     o3(0xEC,0xB6,0x91), o3(0xEC,0xB6,0x92),
+     o3(0xEC,0xB6,0x93), o3(0xEC,0xB6,0x96),
+     o3(0xEC,0xB6,0x97), o3(0xEC,0xB6,0x99),
+     o3(0xEC,0xB6,0x9A), o3(0xEC,0xB6,0x9B),
+     o3(0xEC,0xB6,0x9D), o3(0xEC,0xB6,0x9E),
+     o3(0xEC,0xB6,0x9F), o3(0xEC,0xB6,0xA0),
+     o3(0xEC,0xB6,0xA1), o3(0xEC,0xB6,0xA2),
+     o3(0xEC,0xB6,0xA3), o3(0xEC,0xB6,0xA6),
+     o3(0xEC,0xB6,0xA8), o3(0xEC,0xB6,0xAA),
+     o3(0xEC,0xB6,0xAB), o3(0xEC,0xB6,0xAC),
+     o3(0xEC,0xB6,0xAD), o3(0xEC,0xB6,0xAE),
+     o3(0xEC,0xB6,0xAF), o3(0xEC,0xB6,0xB1),
+     o3(0xEC,0xB6,0xB2), o3(0xEC,0xB6,0xB3),
+     o3(0xEC,0xB6,0xB4), o3(0xEC,0xB6,0xB5),
+     o3(0xEC,0xB6,0xB6), o3(0xEC,0xB6,0xB7),
+     o3(0xEC,0xB6,0xB8), o3(0xEC,0xB6,0xB9),
+     o3(0xEC,0xB6,0xBA), o3(0xEC,0xB6,0xBB),
+     o3(0xEC,0xB6,0xBC), o3(0xEC,0xB6,0xBD),
+     o3(0xEC,0xB6,0xBE), o3(0xEC,0xB6,0xBF),
+     o3(0xEC,0xB7,0x80), o3(0xEC,0xB7,0x81),
+     o3(0xEC,0xB7,0x82), o3(0xEC,0xB7,0x83),
+     o3(0xEC,0xB7,0x85),              UNDEF,
+
+#define from_CP949_AD WORDINDEX2INFO(39518)
+    from_CP949_AD_offsets,
+    from_CP949_AD_infos,
+
+#define from_CP949_AE_infos WORDINDEX2INFO(39520)
+                INVALID, o3(0xEC,0xB7,0x86),
+     o3(0xEC,0xB7,0x87), o3(0xEC,0xB7,0x88),
+     o3(0xEC,0xB7,0x89), o3(0xEC,0xB7,0x8A),
+     o3(0xEC,0xB7,0x8B), o3(0xEC,0xB7,0x8D),
+     o3(0xEC,0xB7,0x8E), o3(0xEC,0xB7,0x8F),
+     o3(0xEC,0xB7,0x91), o3(0xEC,0xB7,0x92),
+     o3(0xEC,0xB7,0x93), o3(0xEC,0xB7,0x94),
+     o3(0xEC,0xB7,0x95), o3(0xEC,0xB7,0x96),
+     o3(0xEC,0xB7,0x97), o3(0xEC,0xB7,0x98),
+     o3(0xEC,0xB7,0x99), o3(0xEC,0xB7,0x9A),
+     o3(0xEC,0xB7,0x9B), o3(0xEC,0xB7,0x9C),
+     o3(0xEC,0xB7,0x9D), o3(0xEC,0xB7,0x9E),
+     o3(0xEC,0xB7,0x9F), o3(0xEC,0xB7,0xA0),
+     o3(0xEC,0xB7,0xA1), o3(0xEC,0xB7,0xA2),
+     o3(0xEC,0xB7,0xA3), o3(0xEC,0xB7,0xA4),
+     o3(0xEC,0xB7,0xA5), o3(0xEC,0xB7,0xA6),
+     o3(0xEC,0xB7,0xA7), o3(0xEC,0xB7,0xA9),
+     o3(0xEC,0xB7,0xAA), o3(0xEC,0xB7,0xAB),
+     o3(0xEC,0xB7,0xAD), o3(0xEC,0xB7,0xAE),
+     o3(0xEC,0xB7,0xAF), o3(0xEC,0xB7,0xB1),
+     o3(0xEC,0xB7,0xB2), o3(0xEC,0xB7,0xB3),
+     o3(0xEC,0xB7,0xB4), o3(0xEC,0xB7,0xB5),
+     o3(0xEC,0xB7,0xB6), o3(0xEC,0xB7,0xB7),
+     o3(0xEC,0xB7,0xBA), o3(0xEC,0xB7,0xBC),
+     o3(0xEC,0xB7,0xBE), o3(0xEC,0xB7,0xBF),
+     o3(0xEC,0xB8,0x80), o3(0xEC,0xB8,0x81),
+     o3(0xEC,0xB8,0x82), o3(0xEC,0xB8,0x83),
+     o3(0xEC,0xB8,0x85), o3(0xEC,0xB8,0x86),
+     o3(0xEC,0xB8,0x87), o3(0xEC,0xB8,0x89),
+     o3(0xEC,0xB8,0x8A), o3(0xEC,0xB8,0x8B),
+     o3(0xEC,0xB8,0x8D), o3(0xEC,0xB8,0x8E),
+     o3(0xEC,0xB8,0x8F), o3(0xEC,0xB8,0x90),
+     o3(0xEC,0xB8,0x91), o3(0xEC,0xB8,0x92),
+     o3(0xEC,0xB8,0x93), o3(0xEC,0xB8,0x95),
+     o3(0xEC,0xB8,0x96), o3(0xEC,0xB8,0x97),
+     o3(0xEC,0xB8,0x98), o3(0xEC,0xB8,0x9A),
+     o3(0xEC,0xB8,0x9B), o3(0xEC,0xB8,0x9C),
+     o3(0xEC,0xB8,0x9D), o3(0xEC,0xB8,0x9E),
+     o3(0xEC,0xB8,0x9F), o3(0xEC,0xB8,0xA2),
+     o3(0xEC,0xB8,0xA3), o3(0xEC,0xB8,0xA5),
+     o3(0xEC,0xB8,0xA6), o3(0xEC,0xB8,0xA7),
+     o3(0xEC,0xB8,0xA9), o3(0xEC,0xB8,0xAA),
+     o3(0xEC,0xB8,0xAB),              UNDEF,
+
+#define from_CP949_AE WORDINDEX2INFO(39606)
+    from_CP949_AD_offsets,
+    from_CP949_AE_infos,
+
+#define from_CP949_AF_infos WORDINDEX2INFO(39608)
+                INVALID, o3(0xEC,0xB8,0xAC),
+     o3(0xEC,0xB8,0xAD), o3(0xEC,0xB8,0xAE),
+     o3(0xEC,0xB8,0xAF), o3(0xEC,0xB8,0xB2),
+     o3(0xEC,0xB8,0xB4), o3(0xEC,0xB8,0xB6),
+     o3(0xEC,0xB8,0xB7), o3(0xEC,0xB8,0xB8),
+     o3(0xEC,0xB8,0xB9), o3(0xEC,0xB8,0xBA),
+     o3(0xEC,0xB8,0xBB), o3(0xEC,0xB8,0xBC),
+     o3(0xEC,0xB8,0xBD), o3(0xEC,0xB8,0xBE),
+     o3(0xEC,0xB8,0xBF), o3(0xEC,0xB9,0x80),
+     o3(0xEC,0xB9,0x81), o3(0xEC,0xB9,0x82),
+     o3(0xEC,0xB9,0x83), o3(0xEC,0xB9,0x84),
+     o3(0xEC,0xB9,0x85), o3(0xEC,0xB9,0x86),
+     o3(0xEC,0xB9,0x87), o3(0xEC,0xB9,0x88),
+     o3(0xEC,0xB9,0x89), o3(0xEC,0xB9,0x8A),
+     o3(0xEC,0xB9,0x8B), o3(0xEC,0xB9,0x8C),
+     o3(0xEC,0xB9,0x8D), o3(0xEC,0xB9,0x8E),
+     o3(0xEC,0xB9,0x8F), o3(0xEC,0xB9,0x90),
+     o3(0xEC,0xB9,0x91), o3(0xEC,0xB9,0x92),
+     o3(0xEC,0xB9,0x93), o3(0xEC,0xB9,0x94),
+     o3(0xEC,0xB9,0x95), o3(0xEC,0xB9,0x96),
+     o3(0xEC,0xB9,0x97), o3(0xEC,0xB9,0x9A),
+     o3(0xEC,0xB9,0x9B), o3(0xEC,0xB9,0x9D),
+     o3(0xEC,0xB9,0x9E), o3(0xEC,0xB9,0xA2),
+     o3(0xEC,0xB9,0xA3), o3(0xEC,0xB9,0xA4),
+     o3(0xEC,0xB9,0xA5), o3(0xEC,0xB9,0xA6),
+     o3(0xEC,0xB9,0xA7), o3(0xEC,0xB9,0xAA),
+     o3(0xEC,0xB9,0xAC), o3(0xEC,0xB9,0xAE),
+     o3(0xEC,0xB9,0xAF), o3(0xEC,0xB9,0xB0),
+     o3(0xEC,0xB9,0xB1), o3(0xEC,0xB9,0xB2),
+     o3(0xEC,0xB9,0xB3), o3(0xEC,0xB9,0xB6),
+     o3(0xEC,0xB9,0xB7), o3(0xEC,0xB9,0xB9),
+     o3(0xEC,0xB9,0xBA), o3(0xEC,0xB9,0xBB),
+     o3(0xEC,0xB9,0xBD), o3(0xEC,0xB9,0xBE),
+     o3(0xEC,0xB9,0xBF), o3(0xEC,0xBA,0x80),
+     o3(0xEC,0xBA,0x81), o3(0xEC,0xBA,0x82),
+     o3(0xEC,0xBA,0x83), o3(0xEC,0xBA,0x86),
+     o3(0xEC,0xBA,0x88), o3(0xEC,0xBA,0x8A),
+     o3(0xEC,0xBA,0x8B), o3(0xEC,0xBA,0x8C),
+     o3(0xEC,0xBA,0x8D), o3(0xEC,0xBA,0x8E),
+     o3(0xEC,0xBA,0x8F), o3(0xEC,0xBA,0x92),
+     o3(0xEC,0xBA,0x93), o3(0xEC,0xBA,0x95),
+     o3(0xEC,0xBA,0x96), o3(0xEC,0xBA,0x97),
+     o3(0xEC,0xBA,0x99),              UNDEF,
+
+#define from_CP949_AF WORDINDEX2INFO(39694)
+    from_CP949_AD_offsets,
+    from_CP949_AF_infos,
+
+#define from_CP949_B0_infos WORDINDEX2INFO(39696)
+                INVALID, o3(0xEC,0xBA,0x9A),
+     o3(0xEC,0xBA,0x9B), o3(0xEC,0xBA,0x9C),
+     o3(0xEC,0xBA,0x9D), o3(0xEC,0xBA,0x9E),
+     o3(0xEC,0xBA,0x9F), o3(0xEC,0xBA,0xA2),
+     o3(0xEC,0xBA,0xA6), o3(0xEC,0xBA,0xA7),
+     o3(0xEC,0xBA,0xA8), o3(0xEC,0xBA,0xA9),
+     o3(0xEC,0xBA,0xAA), o3(0xEC,0xBA,0xAB),
+     o3(0xEC,0xBA,0xAE), o3(0xEC,0xBA,0xAF),
+     o3(0xEC,0xBA,0xB0), o3(0xEC,0xBA,0xB1),
+     o3(0xEC,0xBA,0xB2), o3(0xEC,0xBA,0xB3),
+     o3(0xEC,0xBA,0xB4), o3(0xEC,0xBA,0xB5),
+     o3(0xEC,0xBA,0xB6), o3(0xEC,0xBA,0xB7),
+     o3(0xEC,0xBA,0xB8), o3(0xEC,0xBA,0xB9),
+     o3(0xEC,0xBA,0xBA), o3(0xEC,0xBA,0xBB),
+     o3(0xEC,0xBA,0xBC), o3(0xEC,0xBA,0xBD),
+     o3(0xEC,0xBA,0xBE), o3(0xEC,0xBA,0xBF),
+     o3(0xEC,0xBB,0x80), o3(0xEC,0xBB,0x82),
+     o3(0xEC,0xBB,0x83), o3(0xEC,0xBB,0x84),
+     o3(0xEC,0xBB,0x85), o3(0xEC,0xBB,0x86),
+     o3(0xEC,0xBB,0x87), o3(0xEC,0xBB,0x88),
+     o3(0xEC,0xBB,0x89), o3(0xEC,0xBB,0x8A),
+     o3(0xEC,0xBB,0x8B), o3(0xEC,0xBB,0x8C),
+     o3(0xEC,0xBB,0x8D), o3(0xEC,0xBB,0x8E),
+     o3(0xEC,0xBB,0x8F), o3(0xEC,0xBB,0x90),
+     o3(0xEC,0xBB,0x91), o3(0xEC,0xBB,0x92),
+     o3(0xEC,0xBB,0x93), o3(0xEC,0xBB,0x94),
+     o3(0xEC,0xBB,0x95), o3(0xEC,0xBB,0x96),
+     o3(0xEC,0xBB,0x97), o3(0xEC,0xBB,0x98),
+     o3(0xEC,0xBB,0x99), o3(0xEC,0xBB,0x9A),
+     o3(0xEC,0xBB,0x9B), o3(0xEC,0xBB,0x9C),
+     o3(0xEC,0xBB,0x9D), o3(0xEC,0xBB,0x9E),
+     o3(0xEC,0xBB,0x9F), o3(0xEC,0xBB,0xA0),
+     o3(0xEC,0xBB,0xA1), o3(0xEC,0xBB,0xA2),
+     o3(0xEC,0xBB,0xA3), o3(0xEC,0xBB,0xA6),
+     o3(0xEC,0xBB,0xA7), o3(0xEC,0xBB,0xA9),
+     o3(0xEC,0xBB,0xAA), o3(0xEC,0xBB,0xAD),
+     o3(0xEC,0xBB,0xAE), o3(0xEC,0xBB,0xAF),
+     o3(0xEC,0xBB,0xB0), o3(0xEC,0xBB,0xB1),
+     o3(0xEC,0xBB,0xB2), o3(0xEC,0xBB,0xB3),
+     o3(0xEC,0xBB,0xB6), o3(0xEC,0xBB,0xBA),
+     o3(0xEC,0xBB,0xBB), o3(0xEC,0xBB,0xBC),
+     o3(0xEC,0xBB,0xBD), o3(0xEC,0xBB,0xBE),
+     o3(0xEC,0xBB,0xBF), o3(0xEA,0xB0,0x80),
+     o3(0xEA,0xB0,0x81), o3(0xEA,0xB0,0x84),
+     o3(0xEA,0xB0,0x87), o3(0xEA,0xB0,0x88),
+     o3(0xEA,0xB0,0x89), o3(0xEA,0xB0,0x8A),
+     o3(0xEA,0xB0,0x90), o3(0xEA,0xB0,0x91),
+     o3(0xEA,0xB0,0x92), o3(0xEA,0xB0,0x93),
+     o3(0xEA,0xB0,0x94), o3(0xEA,0xB0,0x95),
+     o3(0xEA,0xB0,0x96), o3(0xEA,0xB0,0x97),
+     o3(0xEA,0xB0,0x99), o3(0xEA,0xB0,0x9A),
+     o3(0xEA,0xB0,0x9B), o3(0xEA,0xB0,0x9C),
+     o3(0xEA,0xB0,0x9D), o3(0xEA,0xB0,0xA0),
+     o3(0xEA,0xB0,0xA4), o3(0xEA,0xB0,0xAC),
+     o3(0xEA,0xB0,0xAD), o3(0xEA,0xB0,0xAF),
+     o3(0xEA,0xB0,0xB0), o3(0xEA,0xB0,0xB1),
+     o3(0xEA,0xB0,0xB8), o3(0xEA,0xB0,0xB9),
+     o3(0xEA,0xB0,0xBC), o3(0xEA,0xB1,0x80),
+     o3(0xEA,0xB1,0x8B), o3(0xEA,0xB1,0x8D),
+     o3(0xEA,0xB1,0x94), o3(0xEA,0xB1,0x98),
+     o3(0xEA,0xB1,0x9C), o3(0xEA,0xB1,0xB0),
+     o3(0xEA,0xB1,0xB1), o3(0xEA,0xB1,0xB4),
+     o3(0xEA,0xB1,0xB7), o3(0xEA,0xB1,0xB8),
+     o3(0xEA,0xB1,0xBA), o3(0xEA,0xB2,0x80),
+     o3(0xEA,0xB2,0x81), o3(0xEA,0xB2,0x83),
+     o3(0xEA,0xB2,0x84), o3(0xEA,0xB2,0x85),
+     o3(0xEA,0xB2,0x86), o3(0xEA,0xB2,0x89),
+     o3(0xEA,0xB2,0x8A), o3(0xEA,0xB2,0x8B),
+     o3(0xEA,0xB2,0x8C), o3(0xEA,0xB2,0x90),
+     o3(0xEA,0xB2,0x94), o3(0xEA,0xB2,0x9C),
+     o3(0xEA,0xB2,0x9D), o3(0xEA,0xB2,0x9F),
+     o3(0xEA,0xB2,0xA0), o3(0xEA,0xB2,0xA1),
+     o3(0xEA,0xB2,0xA8), o3(0xEA,0xB2,0xA9),
+     o3(0xEA,0xB2,0xAA), o3(0xEA,0xB2,0xAC),
+     o3(0xEA,0xB2,0xAF), o3(0xEA,0xB2,0xB0),
+     o3(0xEA,0xB2,0xB8), o3(0xEA,0xB2,0xB9),
+     o3(0xEA,0xB2,0xBB), o3(0xEA,0xB2,0xBC),
+     o3(0xEA,0xB2,0xBD), o3(0xEA,0xB3,0x81),
+     o3(0xEA,0xB3,0x84), o3(0xEA,0xB3,0x88),
+     o3(0xEA,0xB3,0x8C), o3(0xEA,0xB3,0x95),
+     o3(0xEA,0xB3,0x97), o3(0xEA,0xB3,0xA0),
+     o3(0xEA,0xB3,0xA1), o3(0xEA,0xB3,0xA4),
+     o3(0xEA,0xB3,0xA7), o3(0xEA,0xB3,0xA8),
+     o3(0xEA,0xB3,0xAA), o3(0xEA,0xB3,0xAC),
+     o3(0xEA,0xB3,0xAF), o3(0xEA,0xB3,0xB0),
+     o3(0xEA,0xB3,0xB1), o3(0xEA,0xB3,0xB3),
+     o3(0xEA,0xB3,0xB5), o3(0xEA,0xB3,0xB6),
+     o3(0xEA,0xB3,0xBC), o3(0xEA,0xB3,0xBD),
+     o3(0xEA,0xB4,0x80), o3(0xEA,0xB4,0x84),
+     o3(0xEA,0xB4,0x86),
+
+#define from_CP949_B0 WORDINDEX2INFO(39875)
+    from_CP949_81_offsets,
+    from_CP949_B0_infos,
+
+#define from_CP949_B1_infos WORDINDEX2INFO(39877)
+                INVALID, o3(0xEC,0xBC,0x82),
+     o3(0xEC,0xBC,0x83), o3(0xEC,0xBC,0x85),
+     o3(0xEC,0xBC,0x86), o3(0xEC,0xBC,0x87),
+     o3(0xEC,0xBC,0x89), o3(0xEC,0xBC,0x8A),
+     o3(0xEC,0xBC,0x8B), o3(0xEC,0xBC,0x8C),
+     o3(0xEC,0xBC,0x8D), o3(0xEC,0xBC,0x8E),
+     o3(0xEC,0xBC,0x8F), o3(0xEC,0xBC,0x92),
+     o3(0xEC,0xBC,0x94), o3(0xEC,0xBC,0x96),
+     o3(0xEC,0xBC,0x97), o3(0xEC,0xBC,0x98),
+     o3(0xEC,0xBC,0x99), o3(0xEC,0xBC,0x9A),
+     o3(0xEC,0xBC,0x9B), o3(0xEC,0xBC,0x9D),
+     o3(0xEC,0xBC,0x9E), o3(0xEC,0xBC,0x9F),
+     o3(0xEC,0xBC,0xA1), o3(0xEC,0xBC,0xA2),
+     o3(0xEC,0xBC,0xA3), o3(0xEC,0xBC,0xA5),
+     o3(0xEC,0xBC,0xA6), o3(0xEC,0xBC,0xA7),
+     o3(0xEC,0xBC,0xA8), o3(0xEC,0xBC,0xA9),
+     o3(0xEC,0xBC,0xAA), o3(0xEC,0xBC,0xAB),
+     o3(0xEC,0xBC,0xAE), o3(0xEC,0xBC,0xB2),
+     o3(0xEC,0xBC,0xB3), o3(0xEC,0xBC,0xB4),
+     o3(0xEC,0xBC,0xB5), o3(0xEC,0xBC,0xB6),
+     o3(0xEC,0xBC,0xB7), o3(0xEC,0xBC,0xB9),
+     o3(0xEC,0xBC,0xBA), o3(0xEC,0xBC,0xBB),
+     o3(0xEC,0xBC,0xBC), o3(0xEC,0xBC,0xBD),
+     o3(0xEC,0xBC,0xBE), o3(0xEC,0xBC,0xBF),
+     o3(0xEC,0xBD,0x80), o3(0xEC,0xBD,0x81),
+     o3(0xEC,0xBD,0x82), o3(0xEC,0xBD,0x83),
+     o3(0xEC,0xBD,0x84), o3(0xEC,0xBD,0x85),
+     o3(0xEC,0xBD,0x86), o3(0xEC,0xBD,0x87),
+     o3(0xEC,0xBD,0x88), o3(0xEC,0xBD,0x89),
+     o3(0xEC,0xBD,0x8A), o3(0xEC,0xBD,0x8B),
+     o3(0xEC,0xBD,0x8C), o3(0xEC,0xBD,0x8D),
+     o3(0xEC,0xBD,0x8E), o3(0xEC,0xBD,0x8F),
+     o3(0xEC,0xBD,0x90), o3(0xEC,0xBD,0x91),
+     o3(0xEC,0xBD,0x92), o3(0xEC,0xBD,0x93),
+     o3(0xEC,0xBD,0x96), o3(0xEC,0xBD,0x97),
+     o3(0xEC,0xBD,0x99), o3(0xEC,0xBD,0x9A),
+     o3(0xEC,0xBD,0x9B), o3(0xEC,0xBD,0x9D),
+     o3(0xEC,0xBD,0x9E), o3(0xEC,0xBD,0x9F),
+     o3(0xEC,0xBD,0xA0), o3(0xEC,0xBD,0xA1),
+     o3(0xEC,0xBD,0xA2), o3(0xEC,0xBD,0xA3),
+     o3(0xEC,0xBD,0xA6), o3(0xEC,0xBD,0xA8),
+     o3(0xEC,0xBD,0xAA), o3(0xEC,0xBD,0xAB),
+     o3(0xEC,0xBD,0xAC), o3(0xEA,0xB4,0x8C),
+     o3(0xEA,0xB4,0x8D), o3(0xEA,0xB4,0x8F),
+     o3(0xEA,0xB4,0x91), o3(0xEA,0xB4,0x98),
+     o3(0xEA,0xB4,0x9C), o3(0xEA,0xB4,0xA0),
+     o3(0xEA,0xB4,0xA9), o3(0xEA,0xB4,0xAC),
+     o3(0xEA,0xB4,0xAD), o3(0xEA,0xB4,0xB4),
+     o3(0xEA,0xB4,0xB5), o3(0xEA,0xB4,0xB8),
+     o3(0xEA,0xB4,0xBC), o3(0xEA,0xB5,0x84),
+     o3(0xEA,0xB5,0x85), o3(0xEA,0xB5,0x87),
+     o3(0xEA,0xB5,0x89), o3(0xEA,0xB5,0x90),
+     o3(0xEA,0xB5,0x94), o3(0xEA,0xB5,0x98),
+     o3(0xEA,0xB5,0xA1), o3(0xEA,0xB5,0xA3),
+     o3(0xEA,0xB5,0xAC), o3(0xEA,0xB5,0xAD),
+     o3(0xEA,0xB5,0xB0), o3(0xEA,0xB5,0xB3),
+     o3(0xEA,0xB5,0xB4), o3(0xEA,0xB5,0xB5),
+     o3(0xEA,0xB5,0xB6), o3(0xEA,0xB5,0xBB),
+     o3(0xEA,0xB5,0xBC), o3(0xEA,0xB5,0xBD),
+     o3(0xEA,0xB5,0xBF), o3(0xEA,0xB6,0x81),
+     o3(0xEA,0xB6,0x82), o3(0xEA,0xB6,0x88),
+     o3(0xEA,0xB6,0x89), o3(0xEA,0xB6,0x8C),
+     o3(0xEA,0xB6,0x90), o3(0xEA,0xB6,0x9C),
+     o3(0xEA,0xB6,0x9D), o3(0xEA,0xB6,0xA4),
+     o3(0xEA,0xB6,0xB7), o3(0xEA,0xB7,0x80),
+     o3(0xEA,0xB7,0x81), o3(0xEA,0xB7,0x84),
+     o3(0xEA,0xB7,0x88), o3(0xEA,0xB7,0x90),
+     o3(0xEA,0xB7,0x91), o3(0xEA,0xB7,0x93),
+     o3(0xEA,0xB7,0x9C), o3(0xEA,0xB7,0xA0),
+     o3(0xEA,0xB7,0xA4), o3(0xEA,0xB7,0xB8),
+     o3(0xEA,0xB7,0xB9), o3(0xEA,0xB7,0xBC),
+     o3(0xEA,0xB7,0xBF), o3(0xEA,0xB8,0x80),
+     o3(0xEA,0xB8,0x81), o3(0xEA,0xB8,0x88),
+     o3(0xEA,0xB8,0x89), o3(0xEA,0xB8,0x8B),
+     o3(0xEA,0xB8,0x8D), o3(0xEA,0xB8,0x94),
+     o3(0xEA,0xB8,0xB0), o3(0xEA,0xB8,0xB1),
+     o3(0xEA,0xB8,0xB4), o3(0xEA,0xB8,0xB7),
+     o3(0xEA,0xB8,0xB8), o3(0xEA,0xB8,0xBA),
+     o3(0xEA,0xB9,0x80), o3(0xEA,0xB9,0x81),
+     o3(0xEA,0xB9,0x83), o3(0xEA,0xB9,0x85),
+     o3(0xEA,0xB9,0x86), o3(0xEA,0xB9,0x8A),
+     o3(0xEA,0xB9,0x8C), o3(0xEA,0xB9,0x8D),
+     o3(0xEA,0xB9,0x8E), o3(0xEA,0xB9,0x90),
+     o3(0xEA,0xB9,0x94), o3(0xEA,0xB9,0x96),
+     o3(0xEA,0xB9,0x9C), o3(0xEA,0xB9,0x9D),
+     o3(0xEA,0xB9,0x9F), o3(0xEA,0xB9,0xA0),
+     o3(0xEA,0xB9,0xA1), o3(0xEA,0xB9,0xA5),
+     o3(0xEA,0xB9,0xA8), o3(0xEA,0xB9,0xA9),
+     o3(0xEA,0xB9,0xAC), o3(0xEA,0xB9,0xB0),
+     o3(0xEA,0xB9,0xB8),
+
+#define from_CP949_B1 WORDINDEX2INFO(40056)
+    from_CP949_81_offsets,
+    from_CP949_B1_infos,
+
+#define from_CP949_B2_infos WORDINDEX2INFO(40058)
+                INVALID, o3(0xEC,0xBD,0xAD),
+     o3(0xEC,0xBD,0xAE), o3(0xEC,0xBD,0xAF),
+     o3(0xEC,0xBD,0xB2), o3(0xEC,0xBD,0xB3),
+     o3(0xEC,0xBD,0xB5), o3(0xEC,0xBD,0xB6),
+     o3(0xEC,0xBD,0xB7), o3(0xEC,0xBD,0xB9),
+     o3(0xEC,0xBD,0xBA), o3(0xEC,0xBD,0xBB),
+     o3(0xEC,0xBD,0xBC), o3(0xEC,0xBD,0xBD),
+     o3(0xEC,0xBD,0xBE), o3(0xEC,0xBD,0xBF),
+     o3(0xEC,0xBE,0x81), o3(0xEC,0xBE,0x82),
+     o3(0xEC,0xBE,0x83), o3(0xEC,0xBE,0x84),
+     o3(0xEC,0xBE,0x86), o3(0xEC,0xBE,0x87),
+     o3(0xEC,0xBE,0x88), o3(0xEC,0xBE,0x89),
+     o3(0xEC,0xBE,0x8A), o3(0xEC,0xBE,0x8B),
+     o3(0xEC,0xBE,0x8D), o3(0xEC,0xBE,0x8E),
+     o3(0xEC,0xBE,0x8F), o3(0xEC,0xBE,0x90),
+     o3(0xEC,0xBE,0x91), o3(0xEC,0xBE,0x92),
+     o3(0xEC,0xBE,0x93), o3(0xEC,0xBE,0x94),
+     o3(0xEC,0xBE,0x95), o3(0xEC,0xBE,0x96),
+     o3(0xEC,0xBE,0x97), o3(0xEC,0xBE,0x98),
+     o3(0xEC,0xBE,0x99), o3(0xEC,0xBE,0x9A),
+     o3(0xEC,0xBE,0x9B), o3(0xEC,0xBE,0x9C),
+     o3(0xEC,0xBE,0x9D), o3(0xEC,0xBE,0x9E),
+     o3(0xEC,0xBE,0x9F), o3(0xEC,0xBE,0xA0),
+     o3(0xEC,0xBE,0xA2), o3(0xEC,0xBE,0xA3),
+     o3(0xEC,0xBE,0xA4), o3(0xEC,0xBE,0xA5),
+     o3(0xEC,0xBE,0xA6), o3(0xEC,0xBE,0xA7),
+     o3(0xEC,0xBE,0xA9), o3(0xEC,0xBE,0xAA),
+     o3(0xEC,0xBE,0xAB), o3(0xEC,0xBE,0xAC),
+     o3(0xEC,0xBE,0xAD), o3(0xEC,0xBE,0xAE),
+     o3(0xEC,0xBE,0xAF), o3(0xEC,0xBE,0xB1),
+     o3(0xEC,0xBE,0xB2), o3(0xEC,0xBE,0xB3),
+     o3(0xEC,0xBE,0xB4), o3(0xEC,0xBE,0xB5),
+     o3(0xEC,0xBE,0xB6), o3(0xEC,0xBE,0xB7),
+     o3(0xEC,0xBE,0xB8), o3(0xEC,0xBE,0xB9),
+     o3(0xEC,0xBE,0xBA), o3(0xEC,0xBE,0xBB),
+     o3(0xEC,0xBE,0xBC), o3(0xEC,0xBE,0xBD),
+     o3(0xEC,0xBE,0xBE), o3(0xEC,0xBE,0xBF),
+     o3(0xEC,0xBF,0x80), o3(0xEC,0xBF,0x81),
+     o3(0xEC,0xBF,0x82), o3(0xEC,0xBF,0x83),
+     o3(0xEC,0xBF,0x85), o3(0xEC,0xBF,0x86),
+     o3(0xEC,0xBF,0x87), o3(0xEC,0xBF,0x88),
+     o3(0xEC,0xBF,0x89), o3(0xEC,0xBF,0x8A),
+     o3(0xEC,0xBF,0x8B), o3(0xEA,0xB9,0xB9),
+     o3(0xEA,0xB9,0xBB), o3(0xEA,0xB9,0xBC),
+     o3(0xEA,0xB9,0xBD), o3(0xEA,0xBA,0x84),
+     o3(0xEA,0xBA,0x85), o3(0xEA,0xBA,0x8C),
+     o3(0xEA,0xBA,0xBC), o3(0xEA,0xBA,0xBD),
+     o3(0xEA,0xBA,0xBE), o3(0xEA,0xBB,0x80),
+     o3(0xEA,0xBB,0x84), o3(0xEA,0xBB,0x8C),
+     o3(0xEA,0xBB,0x8D), o3(0xEA,0xBB,0x8F),
+     o3(0xEA,0xBB,0x90), o3(0xEA,0xBB,0x91),
+     o3(0xEA,0xBB,0x98), o3(0xEA,0xBB,0x99),
+     o3(0xEA,0xBB,0x9C), o3(0xEA,0xBB,0xA8),
+     o3(0xEA,0xBB,0xAB), o3(0xEA,0xBB,0xAD),
+     o3(0xEA,0xBB,0xB4), o3(0xEA,0xBB,0xB8),
+     o3(0xEA,0xBB,0xBC), o3(0xEA,0xBC,0x87),
+     o3(0xEA,0xBC,0x88), o3(0xEA,0xBC,0x8D),
+     o3(0xEA,0xBC,0x90), o3(0xEA,0xBC,0xAC),
+     o3(0xEA,0xBC,0xAD), o3(0xEA,0xBC,0xB0),
+     o3(0xEA,0xBC,0xB2), o3(0xEA,0xBC,0xB4),
+     o3(0xEA,0xBC,0xBC), o3(0xEA,0xBC,0xBD),
+     o3(0xEA,0xBC,0xBF), o3(0xEA,0xBD,0x81),
+     o3(0xEA,0xBD,0x82), o3(0xEA,0xBD,0x83),
+     o3(0xEA,0xBD,0x88), o3(0xEA,0xBD,0x89),
+     o3(0xEA,0xBD,0x90), o3(0xEA,0xBD,0x9C),
+     o3(0xEA,0xBD,0x9D), o3(0xEA,0xBD,0xA4),
+     o3(0xEA,0xBD,0xA5), o3(0xEA,0xBD,0xB9),
+     o3(0xEA,0xBE,0x80), o3(0xEA,0xBE,0x84),
+     o3(0xEA,0xBE,0x88), o3(0xEA,0xBE,0x90),
+     o3(0xEA,0xBE,0x91), o3(0xEA,0xBE,0x95),
+     o3(0xEA,0xBE,0x9C), o3(0xEA,0xBE,0xB8),
+     o3(0xEA,0xBE,0xB9), o3(0xEA,0xBE,0xBC),
+     o3(0xEA,0xBF,0x80), o3(0xEA,0xBF,0x87),
+     o3(0xEA,0xBF,0x88), o3(0xEA,0xBF,0x89),
+     o3(0xEA,0xBF,0x8B), o3(0xEA,0xBF,0x8D),
+     o3(0xEA,0xBF,0x8E), o3(0xEA,0xBF,0x94),
+     o3(0xEA,0xBF,0x9C), o3(0xEA,0xBF,0xA8),
+     o3(0xEA,0xBF,0xA9), o3(0xEA,0xBF,0xB0),
+     o3(0xEA,0xBF,0xB1), o3(0xEA,0xBF,0xB4),
+     o3(0xEA,0xBF,0xB8), o3(0xEB,0x80,0x80),
+     o3(0xEB,0x80,0x81), o3(0xEB,0x80,0x84),
+     o3(0xEB,0x80,0x8C), o3(0xEB,0x80,0x90),
+     o3(0xEB,0x80,0x94), o3(0xEB,0x80,0x9C),
+     o3(0xEB,0x80,0x9D), o3(0xEB,0x80,0xA8),
+     o3(0xEB,0x81,0x84), o3(0xEB,0x81,0x85),
+     o3(0xEB,0x81,0x88), o3(0xEB,0x81,0x8A),
+     o3(0xEB,0x81,0x8C), o3(0xEB,0x81,0x8E),
+     o3(0xEB,0x81,0x93), o3(0xEB,0x81,0x94),
+     o3(0xEB,0x81,0x95), o3(0xEB,0x81,0x97),
+     o3(0xEB,0x81,0x99),
+
+#define from_CP949_B2 WORDINDEX2INFO(40237)
+    from_CP949_81_offsets,
+    from_CP949_B2_infos,
+
+#define from_CP949_B3_infos WORDINDEX2INFO(40239)
+                INVALID, o3(0xEC,0xBF,0x8C),
+     o3(0xEC,0xBF,0x8D), o3(0xEC,0xBF,0x8E),
+     o3(0xEC,0xBF,0x8F), o3(0xEC,0xBF,0x90),
+     o3(0xEC,0xBF,0x91), o3(0xEC,0xBF,0x92),
+     o3(0xEC,0xBF,0x93), o3(0xEC,0xBF,0x94),
+     o3(0xEC,0xBF,0x95), o3(0xEC,0xBF,0x96),
+     o3(0xEC,0xBF,0x97), o3(0xEC,0xBF,0x98),
+     o3(0xEC,0xBF,0x99), o3(0xEC,0xBF,0x9A),
+     o3(0xEC,0xBF,0x9B), o3(0xEC,0xBF,0x9C),
+     o3(0xEC,0xBF,0x9D), o3(0xEC,0xBF,0x9E),
+     o3(0xEC,0xBF,0x9F), o3(0xEC,0xBF,0xA2),
+     o3(0xEC,0xBF,0xA3), o3(0xEC,0xBF,0xA5),
+     o3(0xEC,0xBF,0xA6), o3(0xEC,0xBF,0xA7),
+     o3(0xEC,0xBF,0xA9), o3(0xEC,0xBF,0xAA),
+     o3(0xEC,0xBF,0xAB), o3(0xEC,0xBF,0xAC),
+     o3(0xEC,0xBF,0xAD), o3(0xEC,0xBF,0xAE),
+     o3(0xEC,0xBF,0xAF), o3(0xEC,0xBF,0xB2),
+     o3(0xEC,0xBF,0xB4), o3(0xEC,0xBF,0xB6),
+     o3(0xEC,0xBF,0xB7), o3(0xEC,0xBF,0xB8),
+     o3(0xEC,0xBF,0xB9), o3(0xEC,0xBF,0xBA),
+     o3(0xEC,0xBF,0xBB), o3(0xEC,0xBF,0xBD),
+     o3(0xEC,0xBF,0xBE), o3(0xEC,0xBF,0xBF),
+     o3(0xED,0x80,0x81), o3(0xED,0x80,0x82),
+     o3(0xED,0x80,0x83), o3(0xED,0x80,0x85),
+     o3(0xED,0x80,0x86), o3(0xED,0x80,0x87),
+     o3(0xED,0x80,0x88), o3(0xED,0x80,0x89),
+     o3(0xED,0x80,0x8A), o3(0xED,0x80,0x8B),
+     o3(0xED,0x80,0x8C), o3(0xED,0x80,0x8D),
+     o3(0xED,0x80,0x8E), o3(0xED,0x80,0x8F),
+     o3(0xED,0x80,0x90), o3(0xED,0x80,0x92),
+     o3(0xED,0x80,0x93), o3(0xED,0x80,0x94),
+     o3(0xED,0x80,0x95), o3(0xED,0x80,0x96),
+     o3(0xED,0x80,0x97), o3(0xED,0x80,0x99),
+     o3(0xED,0x80,0x9A), o3(0xED,0x80,0x9B),
+     o3(0xED,0x80,0x9C), o3(0xED,0x80,0x9D),
+     o3(0xED,0x80,0x9E), o3(0xED,0x80,0x9F),
+     o3(0xED,0x80,0xA0), o3(0xED,0x80,0xA1),
+     o3(0xED,0x80,0xA2), o3(0xED,0x80,0xA3),
+     o3(0xED,0x80,0xA4), o3(0xED,0x80,0xA5),
+     o3(0xED,0x80,0xA6), o3(0xED,0x80,0xA7),
+     o3(0xED,0x80,0xA8), o3(0xED,0x80,0xA9),
+     o3(0xED,0x80,0xAA), o3(0xED,0x80,0xAB),
+     o3(0xED,0x80,0xAC), o3(0xEB,0x81,0x9D),
+     o3(0xEB,0x81,0xBC), o3(0xEB,0x81,0xBD),
+     o3(0xEB,0x82,0x80), o3(0xEB,0x82,0x84),
+     o3(0xEB,0x82,0x8C), o3(0xEB,0x82,0x8D),
+     o3(0xEB,0x82,0x8F), o3(0xEB,0x82,0x91),
+     o3(0xEB,0x82,0x98), o3(0xEB,0x82,0x99),
+     o3(0xEB,0x82,0x9A), o3(0xEB,0x82,0x9C),
+     o3(0xEB,0x82,0x9F), o3(0xEB,0x82,0xA0),
+     o3(0xEB,0x82,0xA1), o3(0xEB,0x82,0xA2),
+     o3(0xEB,0x82,0xA8), o3(0xEB,0x82,0xA9),
+     o3(0xEB,0x82,0xAB), o3(0xEB,0x82,0xAC),
+     o3(0xEB,0x82,0xAD), o3(0xEB,0x82,0xAE),
+     o3(0xEB,0x82,0xAF), o3(0xEB,0x82,0xB1),
+     o3(0xEB,0x82,0xB3), o3(0xEB,0x82,0xB4),
+     o3(0xEB,0x82,0xB5), o3(0xEB,0x82,0xB8),
+     o3(0xEB,0x82,0xBC), o3(0xEB,0x83,0x84),
+     o3(0xEB,0x83,0x85), o3(0xEB,0x83,0x87),
+     o3(0xEB,0x83,0x88), o3(0xEB,0x83,0x89),
+     o3(0xEB,0x83,0x90), o3(0xEB,0x83,0x91),
+     o3(0xEB,0x83,0x94), o3(0xEB,0x83,0x98),
+     o3(0xEB,0x83,0xA0), o3(0xEB,0x83,0xA5),
+     o3(0xEB,0x84,0x88), o3(0xEB,0x84,0x89),
+     o3(0xEB,0x84,0x8B), o3(0xEB,0x84,0x8C),
+     o3(0xEB,0x84,0x90), o3(0xEB,0x84,0x92),
+     o3(0xEB,0x84,0x93), o3(0xEB,0x84,0x98),
+     o3(0xEB,0x84,0x99), o3(0xEB,0x84,0x9B),
+     o3(0xEB,0x84,0x9C), o3(0xEB,0x84,0x9D),
+     o3(0xEB,0x84,0xA3), o3(0xEB,0x84,0xA4),
+     o3(0xEB,0x84,0xA5), o3(0xEB,0x84,0xA8),
+     o3(0xEB,0x84,0xAC), o3(0xEB,0x84,0xB4),
+     o3(0xEB,0x84,0xB5), o3(0xEB,0x84,0xB7),
+     o3(0xEB,0x84,0xB8), o3(0xEB,0x84,0xB9),
+     o3(0xEB,0x85,0x80), o3(0xEB,0x85,0x81),
+     o3(0xEB,0x85,0x84), o3(0xEB,0x85,0x88),
+     o3(0xEB,0x85,0x90), o3(0xEB,0x85,0x91),
+     o3(0xEB,0x85,0x94), o3(0xEB,0x85,0x95),
+     o3(0xEB,0x85,0x98), o3(0xEB,0x85,0x9C),
+     o3(0xEB,0x85,0xA0), o3(0xEB,0x85,0xB8),
+     o3(0xEB,0x85,0xB9), o3(0xEB,0x85,0xBC),
+     o3(0xEB,0x86,0x80), o3(0xEB,0x86,0x82),
+     o3(0xEB,0x86,0x88), o3(0xEB,0x86,0x89),
+     o3(0xEB,0x86,0x8B), o3(0xEB,0x86,0x8D),
+     o3(0xEB,0x86,0x92), o3(0xEB,0x86,0x93),
+     o3(0xEB,0x86,0x94), o3(0xEB,0x86,0x98),
+     o3(0xEB,0x86,0x9C), o3(0xEB,0x86,0xA8),
+     o3(0xEB,0x87,0x8C), o3(0xEB,0x87,0x90),
+     o3(0xEB,0x87,0x94), o3(0xEB,0x87,0x9C),
+     o3(0xEB,0x87,0x9D),
+
+#define from_CP949_B3 WORDINDEX2INFO(40418)
+    from_CP949_81_offsets,
+    from_CP949_B3_infos,
+
+#define from_CP949_B4_infos WORDINDEX2INFO(40420)
+                INVALID, o3(0xED,0x80,0xAE),
+     o3(0xED,0x80,0xAF), o3(0xED,0x80,0xB0),
+     o3(0xED,0x80,0xB1), o3(0xED,0x80,0xB2),
+     o3(0xED,0x80,0xB3), o3(0xED,0x80,0xB6),
+     o3(0xED,0x80,0xB7), o3(0xED,0x80,0xB9),
+     o3(0xED,0x80,0xBA), o3(0xED,0x80,0xBB),
+     o3(0xED,0x80,0xBD), o3(0xED,0x80,0xBE),
+     o3(0xED,0x80,0xBF), o3(0xED,0x81,0x80),
+     o3(0xED,0x81,0x81), o3(0xED,0x81,0x82),
+     o3(0xED,0x81,0x83), o3(0xED,0x81,0x86),
+     o3(0xED,0x81,0x88), o3(0xED,0x81,0x8A),
+     o3(0xED,0x81,0x8B), o3(0xED,0x81,0x8C),
+     o3(0xED,0x81,0x8D), o3(0xED,0x81,0x8E),
+     o3(0xED,0x81,0x8F), o3(0xED,0x81,0x91),
+     o3(0xED,0x81,0x92), o3(0xED,0x81,0x93),
+     o3(0xED,0x81,0x95), o3(0xED,0x81,0x96),
+     o3(0xED,0x81,0x97), o3(0xED,0x81,0x99),
+     o3(0xED,0x81,0x9A), o3(0xED,0x81,0x9B),
+     o3(0xED,0x81,0x9C), o3(0xED,0x81,0x9D),
+     o3(0xED,0x81,0x9E), o3(0xED,0x81,0x9F),
+     o3(0xED,0x81,0xA1), o3(0xED,0x81,0xA2),
+     o3(0xED,0x81,0xA3), o3(0xED,0x81,0xA4),
+     o3(0xED,0x81,0xA5), o3(0xED,0x81,0xA6),
+     o3(0xED,0x81,0xA7), o3(0xED,0x81,0xA8),
+     o3(0xED,0x81,0xA9), o3(0xED,0x81,0xAA),
+     o3(0xED,0x81,0xAB), o3(0xED,0x81,0xAE),
+     o3(0xED,0x81,0xAF), o3(0xED,0x81,0xB1),
+     o3(0xED,0x81,0xB2), o3(0xED,0x81,0xB3),
+     o3(0xED,0x81,0xB5), o3(0xED,0x81,0xB6),
+     o3(0xED,0x81,0xB7), o3(0xED,0x81,0xB8),
+     o3(0xED,0x81,0xB9), o3(0xED,0x81,0xBA),
+     o3(0xED,0x81,0xBB), o3(0xED,0x81,0xBE),
+     o3(0xED,0x81,0xBF), o3(0xED,0x82,0x80),
+     o3(0xED,0x82,0x82), o3(0xED,0x82,0x83),
+     o3(0xED,0x82,0x84), o3(0xED,0x82,0x85),
+     o3(0xED,0x82,0x86), o3(0xED,0x82,0x87),
+     o3(0xED,0x82,0x88), o3(0xED,0x82,0x89),
+     o3(0xED,0x82,0x8A), o3(0xED,0x82,0x8B),
+     o3(0xED,0x82,0x8C), o3(0xED,0x82,0x8D),
+     o3(0xED,0x82,0x8E), o3(0xED,0x82,0x8F),
+     o3(0xED,0x82,0x90), o3(0xED,0x82,0x91),
+     o3(0xED,0x82,0x92), o3(0xED,0x82,0x93),
+     o3(0xED,0x82,0x94), o3(0xEB,0x87,0x9F),
+     o3(0xEB,0x87,0xA8), o3(0xEB,0x87,0xA9),
+     o3(0xEB,0x87,0xAC), o3(0xEB,0x87,0xB0),
+     o3(0xEB,0x87,0xB9), o3(0xEB,0x87,0xBB),
+     o3(0xEB,0x87,0xBD), o3(0xEB,0x88,0x84),
+     o3(0xEB,0x88,0x85), o3(0xEB,0x88,0x88),
+     o3(0xEB,0x88,0x8B), o3(0xEB,0x88,0x8C),
+     o3(0xEB,0x88,0x94), o3(0xEB,0x88,0x95),
+     o3(0xEB,0x88,0x97), o3(0xEB,0x88,0x99),
+     o3(0xEB,0x88,0xA0), o3(0xEB,0x88,0xB4),
+     o3(0xEB,0x88,0xBC), o3(0xEB,0x89,0x98),
+     o3(0xEB,0x89,0x9C), o3(0xEB,0x89,0xA0),
+     o3(0xEB,0x89,0xA8), o3(0xEB,0x89,0xA9),
+     o3(0xEB,0x89,0xB4), o3(0xEB,0x89,0xB5),
+     o3(0xEB,0x89,0xBC), o3(0xEB,0x8A,0x84),
+     o3(0xEB,0x8A,0x85), o3(0xEB,0x8A,0x89),
+     o3(0xEB,0x8A,0x90), o3(0xEB,0x8A,0x91),
+     o3(0xEB,0x8A,0x94), o3(0xEB,0x8A,0x98),
+     o3(0xEB,0x8A,0x99), o3(0xEB,0x8A,0x9A),
+     o3(0xEB,0x8A,0xA0), o3(0xEB,0x8A,0xA1),
+     o3(0xEB,0x8A,0xA3), o3(0xEB,0x8A,0xA5),
+     o3(0xEB,0x8A,0xA6), o3(0xEB,0x8A,0xAA),
+     o3(0xEB,0x8A,0xAC), o3(0xEB,0x8A,0xB0),
+     o3(0xEB,0x8A,0xB4), o3(0xEB,0x8B,0x88),
+     o3(0xEB,0x8B,0x89), o3(0xEB,0x8B,0x8C),
+     o3(0xEB,0x8B,0x90), o3(0xEB,0x8B,0x92),
+     o3(0xEB,0x8B,0x98), o3(0xEB,0x8B,0x99),
+     o3(0xEB,0x8B,0x9B), o3(0xEB,0x8B,0x9D),
+     o3(0xEB,0x8B,0xA2), o3(0xEB,0x8B,0xA4),
+     o3(0xEB,0x8B,0xA5), o3(0xEB,0x8B,0xA6),
+     o3(0xEB,0x8B,0xA8), o3(0xEB,0x8B,0xAB),
+     o3(0xEB,0x8B,0xAC), o3(0xEB,0x8B,0xAD),
+     o3(0xEB,0x8B,0xAE), o3(0xEB,0x8B,0xAF),
+     o3(0xEB,0x8B,0xB3), o3(0xEB,0x8B,0xB4),
+     o3(0xEB,0x8B,0xB5), o3(0xEB,0x8B,0xB7),
+     o3(0xEB,0x8B,0xB8), o3(0xEB,0x8B,0xB9),
+     o3(0xEB,0x8B,0xBA), o3(0xEB,0x8B,0xBB),
+     o3(0xEB,0x8B,0xBF), o3(0xEB,0x8C,0x80),
+     o3(0xEB,0x8C,0x81), o3(0xEB,0x8C,0x84),
+     o3(0xEB,0x8C,0x88), o3(0xEB,0x8C,0x90),
+     o3(0xEB,0x8C,0x91), o3(0xEB,0x8C,0x93),
+     o3(0xEB,0x8C,0x94), o3(0xEB,0x8C,0x95),
+     o3(0xEB,0x8C,0x9C), o3(0xEB,0x8D,0x94),
+     o3(0xEB,0x8D,0x95), o3(0xEB,0x8D,0x96),
+     o3(0xEB,0x8D,0x98), o3(0xEB,0x8D,0x9B),
+     o3(0xEB,0x8D,0x9C), o3(0xEB,0x8D,0x9E),
+     o3(0xEB,0x8D,0x9F), o3(0xEB,0x8D,0xA4),
+     o3(0xEB,0x8D,0xA5),
+
+#define from_CP949_B4 WORDINDEX2INFO(40599)
+    from_CP949_81_offsets,
+    from_CP949_B4_infos,
+
+#define from_CP949_B5_infos WORDINDEX2INFO(40601)
+                INVALID, o3(0xED,0x82,0x95),
+     o3(0xED,0x82,0x96), o3(0xED,0x82,0x97),
+     o3(0xED,0x82,0x98), o3(0xED,0x82,0x99),
+     o3(0xED,0x82,0x9A), o3(0xED,0x82,0x9B),
+     o3(0xED,0x82,0x9C), o3(0xED,0x82,0x9D),
+     o3(0xED,0x82,0x9E), o3(0xED,0x82,0x9F),
+     o3(0xED,0x82,0xA0), o3(0xED,0x82,0xA1),
+     o3(0xED,0x82,0xA2), o3(0xED,0x82,0xA3),
+     o3(0xED,0x82,0xA6), o3(0xED,0x82,0xA7),
+     o3(0xED,0x82,0xA9), o3(0xED,0x82,0xAA),
+     o3(0xED,0x82,0xAB), o3(0xED,0x82,0xAD),
+     o3(0xED,0x82,0xAE), o3(0xED,0x82,0xAF),
+     o3(0xED,0x82,0xB0), o3(0xED,0x82,0xB1),
+     o3(0xED,0x82,0xB2), o3(0xED,0x82,0xB3),
+     o3(0xED,0x82,0xB6), o3(0xED,0x82,0xB8),
+     o3(0xED,0x82,0xBA), o3(0xED,0x82,0xBB),
+     o3(0xED,0x82,0xBC), o3(0xED,0x82,0xBD),
+     o3(0xED,0x82,0xBE), o3(0xED,0x82,0xBF),
+     o3(0xED,0x83,0x82), o3(0xED,0x83,0x83),
+     o3(0xED,0x83,0x85), o3(0xED,0x83,0x86),
+     o3(0xED,0x83,0x87), o3(0xED,0x83,0x8A),
+     o3(0xED,0x83,0x8B), o3(0xED,0x83,0x8C),
+     o3(0xED,0x83,0x8D), o3(0xED,0x83,0x8E),
+     o3(0xED,0x83,0x8F), o3(0xED,0x83,0x92),
+     o3(0xED,0x83,0x96), o3(0xED,0x83,0x97),
+     o3(0xED,0x83,0x98), o3(0xED,0x83,0x99),
+     o3(0xED,0x83,0x9A), o3(0xED,0x83,0x9B),
+     o3(0xED,0x83,0x9E), o3(0xED,0x83,0x9F),
+     o3(0xED,0x83,0xA1), o3(0xED,0x83,0xA2),
+     o3(0xED,0x83,0xA3), o3(0xED,0x83,0xA5),
+     o3(0xED,0x83,0xA6), o3(0xED,0x83,0xA7),
+     o3(0xED,0x83,0xA8), o3(0xED,0x83,0xA9),
+     o3(0xED,0x83,0xAA), o3(0xED,0x83,0xAB),
+     o3(0xED,0x83,0xAE), o3(0xED,0x83,0xB2),
+     o3(0xED,0x83,0xB3), o3(0xED,0x83,0xB4),
+     o3(0xED,0x83,0xB5), o3(0xED,0x83,0xB6),
+     o3(0xED,0x83,0xB7), o3(0xED,0x83,0xB9),
+     o3(0xED,0x83,0xBA), o3(0xED,0x83,0xBB),
+     o3(0xED,0x83,0xBC), o3(0xED,0x83,0xBD),
+     o3(0xED,0x83,0xBE), o3(0xED,0x83,0xBF),
+     o3(0xED,0x84,0x80), o3(0xED,0x84,0x81),
+     o3(0xED,0x84,0x82), o3(0xED,0x84,0x83),
+     o3(0xED,0x84,0x84), o3(0xEB,0x8D,0xA7),
+     o3(0xEB,0x8D,0xA9), o3(0xEB,0x8D,0xAB),
+     o3(0xEB,0x8D,0xAE), o3(0xEB,0x8D,0xB0),
+     o3(0xEB,0x8D,0xB1), o3(0xEB,0x8D,0xB4),
+     o3(0xEB,0x8D,0xB8), o3(0xEB,0x8E,0x80),
+     o3(0xEB,0x8E,0x81), o3(0xEB,0x8E,0x83),
+     o3(0xEB,0x8E,0x84), o3(0xEB,0x8E,0x85),
+     o3(0xEB,0x8E,0x8C), o3(0xEB,0x8E,0x90),
+     o3(0xEB,0x8E,0x94), o3(0xEB,0x8E,0xA0),
+     o3(0xEB,0x8E,0xA1), o3(0xEB,0x8E,0xA8),
+     o3(0xEB,0x8E,0xAC), o3(0xEB,0x8F,0x84),
+     o3(0xEB,0x8F,0x85), o3(0xEB,0x8F,0x88),
+     o3(0xEB,0x8F,0x8B), o3(0xEB,0x8F,0x8C),
+     o3(0xEB,0x8F,0x8E), o3(0xEB,0x8F,0x90),
+     o3(0xEB,0x8F,0x94), o3(0xEB,0x8F,0x95),
+     o3(0xEB,0x8F,0x97), o3(0xEB,0x8F,0x99),
+     o3(0xEB,0x8F,0x9B), o3(0xEB,0x8F,0x9D),
+     o3(0xEB,0x8F,0xA0), o3(0xEB,0x8F,0xA4),
+     o3(0xEB,0x8F,0xA8), o3(0xEB,0x8F,0xBC),
+     o3(0xEB,0x90,0x90), o3(0xEB,0x90,0x98),
+     o3(0xEB,0x90,0x9C), o3(0xEB,0x90,0xA0),
+     o3(0xEB,0x90,0xA8), o3(0xEB,0x90,0xA9),
+     o3(0xEB,0x90,0xAB), o3(0xEB,0x90,0xB4),
+     o3(0xEB,0x91,0x90), o3(0xEB,0x91,0x91),
+     o3(0xEB,0x91,0x94), o3(0xEB,0x91,0x98),
+     o3(0xEB,0x91,0xA0), o3(0xEB,0x91,0xA1),
+     o3(0xEB,0x91,0xA3), o3(0xEB,0x91,0xA5),
+     o3(0xEB,0x91,0xAC), o3(0xEB,0x92,0x80),
+     o3(0xEB,0x92,0x88), o3(0xEB,0x92,0x9D),
+     o3(0xEB,0x92,0xA4), o3(0xEB,0x92,0xA8),
+     o3(0xEB,0x92,0xAC), o3(0xEB,0x92,0xB5),
+     o3(0xEB,0x92,0xB7), o3(0xEB,0x92,0xB9),
+     o3(0xEB,0x93,0x80), o3(0xEB,0x93,0x84),
+     o3(0xEB,0x93,0x88), o3(0xEB,0x93,0x90),
+     o3(0xEB,0x93,0x95), o3(0xEB,0x93,0x9C),
+     o3(0xEB,0x93,0x9D), o3(0xEB,0x93,0xA0),
+     o3(0xEB,0x93,0xA3), o3(0xEB,0x93,0xA4),
+     o3(0xEB,0x93,0xA6), o3(0xEB,0x93,0xAC),
+     o3(0xEB,0x93,0xAD), o3(0xEB,0x93,0xAF),
+     o3(0xEB,0x93,0xB1), o3(0xEB,0x93,0xB8),
+     o3(0xEB,0x94,0x94), o3(0xEB,0x94,0x95),
+     o3(0xEB,0x94,0x98), o3(0xEB,0x94,0x9B),
+     o3(0xEB,0x94,0x9C), o3(0xEB,0x94,0xA4),
+     o3(0xEB,0x94,0xA5), o3(0xEB,0x94,0xA7),
+     o3(0xEB,0x94,0xA8), o3(0xEB,0x94,0xA9),
+     o3(0xEB,0x94,0xAA), o3(0xEB,0x94,0xB0),
+     o3(0xEB,0x94,0xB1), o3(0xEB,0x94,0xB4),
+     o3(0xEB,0x94,0xB8),
+
+#define from_CP949_B5 WORDINDEX2INFO(40780)
+    from_CP949_81_offsets,
+    from_CP949_B5_infos,
+
+#define from_CP949_B6_infos WORDINDEX2INFO(40782)
+                INVALID, o3(0xED,0x84,0x85),
+     o3(0xED,0x84,0x86), o3(0xED,0x84,0x87),
+     o3(0xED,0x84,0x88), o3(0xED,0x84,0x89),
+     o3(0xED,0x84,0x8A), o3(0xED,0x84,0x8B),
+     o3(0xED,0x84,0x8C), o3(0xED,0x84,0x8E),
+     o3(0xED,0x84,0x8F), o3(0xED,0x84,0x90),
+     o3(0xED,0x84,0x91), o3(0xED,0x84,0x92),
+     o3(0xED,0x84,0x93), o3(0xED,0x84,0x94),
+     o3(0xED,0x84,0x95), o3(0xED,0x84,0x96),
+     o3(0xED,0x84,0x97), o3(0xED,0x84,0x98),
+     o3(0xED,0x84,0x99), o3(0xED,0x84,0x9A),
+     o3(0xED,0x84,0x9B), o3(0xED,0x84,0x9C),
+     o3(0xED,0x84,0x9D), o3(0xED,0x84,0x9E),
+     o3(0xED,0x84,0x9F), o3(0xED,0x84,0xA0),
+     o3(0xED,0x84,0xA1), o3(0xED,0x84,0xA2),
+     o3(0xED,0x84,0xA3), o3(0xED,0x84,0xA4),
+     o3(0xED,0x84,0xA5), o3(0xED,0x84,0xA6),
+     o3(0xED,0x84,0xA7), o3(0xED,0x84,0xA8),
+     o3(0xED,0x84,0xA9), o3(0xED,0x84,0xAA),
+     o3(0xED,0x84,0xAB), o3(0xED,0x84,0xAC),
+     o3(0xED,0x84,0xAD), o3(0xED,0x84,0xAE),
+     o3(0xED,0x84,0xAF), o3(0xED,0x84,0xB2),
+     o3(0xED,0x84,0xB3), o3(0xED,0x84,0xB5),
+     o3(0xED,0x84,0xB6), o3(0xED,0x84,0xB7),
+     o3(0xED,0x84,0xB9), o3(0xED,0x84,0xBB),
+     o3(0xED,0x84,0xBC), o3(0xED,0x84,0xBD),
+     o3(0xED,0x84,0xBE), o3(0xED,0x84,0xBF),
+     o3(0xED,0x85,0x82), o3(0xED,0x85,0x86),
+     o3(0xED,0x85,0x87), o3(0xED,0x85,0x88),
+     o3(0xED,0x85,0x89), o3(0xED,0x85,0x8A),
+     o3(0xED,0x85,0x8B), o3(0xED,0x85,0x8E),
+     o3(0xED,0x85,0x8F), o3(0xED,0x85,0x91),
+     o3(0xED,0x85,0x92), o3(0xED,0x85,0x93),
+     o3(0xED,0x85,0x95), o3(0xED,0x85,0x96),
+     o3(0xED,0x85,0x97), o3(0xED,0x85,0x98),
+     o3(0xED,0x85,0x99), o3(0xED,0x85,0x9A),
+     o3(0xED,0x85,0x9B), o3(0xED,0x85,0x9E),
+     o3(0xED,0x85,0xA0), o3(0xED,0x85,0xA2),
+     o3(0xED,0x85,0xA3), o3(0xED,0x85,0xA4),
+     o3(0xED,0x85,0xA5), o3(0xED,0x85,0xA6),
+     o3(0xED,0x85,0xA7), o3(0xED,0x85,0xA9),
+     o3(0xED,0x85,0xAA), o3(0xED,0x85,0xAB),
+     o3(0xED,0x85,0xAD), o3(0xEB,0x95,0x80),
+     o3(0xEB,0x95,0x81), o3(0xEB,0x95,0x83),
+     o3(0xEB,0x95,0x84), o3(0xEB,0x95,0x85),
+     o3(0xEB,0x95,0x8B), o3(0xEB,0x95,0x8C),
+     o3(0xEB,0x95,0x8D), o3(0xEB,0x95,0x90),
+     o3(0xEB,0x95,0x94), o3(0xEB,0x95,0x9C),
+     o3(0xEB,0x95,0x9D), o3(0xEB,0x95,0x9F),
+     o3(0xEB,0x95,0xA0), o3(0xEB,0x95,0xA1),
+     o3(0xEB,0x96,0xA0), o3(0xEB,0x96,0xA1),
+     o3(0xEB,0x96,0xA4), o3(0xEB,0x96,0xA8),
+     o3(0xEB,0x96,0xAA), o3(0xEB,0x96,0xAB),
+     o3(0xEB,0x96,0xB0), o3(0xEB,0x96,0xB1),
+     o3(0xEB,0x96,0xB3), o3(0xEB,0x96,0xB4),
+     o3(0xEB,0x96,0xB5), o3(0xEB,0x96,0xBB),
+     o3(0xEB,0x96,0xBC), o3(0xEB,0x96,0xBD),
+     o3(0xEB,0x97,0x80), o3(0xEB,0x97,0x84),
+     o3(0xEB,0x97,0x8C), o3(0xEB,0x97,0x8D),
+     o3(0xEB,0x97,0x8F), o3(0xEB,0x97,0x90),
+     o3(0xEB,0x97,0x91), o3(0xEB,0x97,0x98),
+     o3(0xEB,0x97,0xAC), o3(0xEB,0x98,0x90),
+     o3(0xEB,0x98,0x91), o3(0xEB,0x98,0x94),
+     o3(0xEB,0x98,0x98), o3(0xEB,0x98,0xA5),
+     o3(0xEB,0x98,0xAC), o3(0xEB,0x98,0xB4),
+     o3(0xEB,0x99,0x88), o3(0xEB,0x99,0xA4),
+     o3(0xEB,0x99,0xA8), o3(0xEB,0x9A,0x9C),
+     o3(0xEB,0x9A,0x9D), o3(0xEB,0x9A,0xA0),
+     o3(0xEB,0x9A,0xA4), o3(0xEB,0x9A,0xAB),
+     o3(0xEB,0x9A,0xAC), o3(0xEB,0x9A,0xB1),
+     o3(0xEB,0x9B,0x94), o3(0xEB,0x9B,0xB0),
+     o3(0xEB,0x9B,0xB4), o3(0xEB,0x9B,0xB8),
+     o3(0xEB,0x9C,0x80), o3(0xEB,0x9C,0x81),
+     o3(0xEB,0x9C,0x85), o3(0xEB,0x9C,0xA8),
+     o3(0xEB,0x9C,0xA9), o3(0xEB,0x9C,0xAC),
+     o3(0xEB,0x9C,0xAF), o3(0xEB,0x9C,0xB0),
+     o3(0xEB,0x9C,0xB8), o3(0xEB,0x9C,0xB9),
+     o3(0xEB,0x9C,0xBB), o3(0xEB,0x9D,0x84),
+     o3(0xEB,0x9D,0x88), o3(0xEB,0x9D,0x8C),
+     o3(0xEB,0x9D,0x94), o3(0xEB,0x9D,0x95),
+     o3(0xEB,0x9D,0xA0), o3(0xEB,0x9D,0xA4),
+     o3(0xEB,0x9D,0xA8), o3(0xEB,0x9D,0xB0),
+     o3(0xEB,0x9D,0xB1), o3(0xEB,0x9D,0xB3),
+     o3(0xEB,0x9D,0xB5), o3(0xEB,0x9D,0xBC),
+     o3(0xEB,0x9D,0xBD), o3(0xEB,0x9E,0x80),
+     o3(0xEB,0x9E,0x84), o3(0xEB,0x9E,0x8C),
+     o3(0xEB,0x9E,0x8D), o3(0xEB,0x9E,0x8F),
+     o3(0xEB,0x9E,0x90), o3(0xEB,0x9E,0x91),
+     o3(0xEB,0x9E,0x92), o3(0xEB,0x9E,0x96),
+     o3(0xEB,0x9E,0x97),
+
+#define from_CP949_B6 WORDINDEX2INFO(40961)
+    from_CP949_81_offsets,
+    from_CP949_B6_infos,
+
+#define from_CP949_B7_infos WORDINDEX2INFO(40963)
+                INVALID, o3(0xED,0x85,0xAE),
+     o3(0xED,0x85,0xAF), o3(0xED,0x85,0xB0),
+     o3(0xED,0x85,0xB1), o3(0xED,0x85,0xB2),
+     o3(0xED,0x85,0xB3), o3(0xED,0x85,0xB4),
+     o3(0xED,0x85,0xB5), o3(0xED,0x85,0xB6),
+     o3(0xED,0x85,0xB7), o3(0xED,0x85,0xB8),
+     o3(0xED,0x85,0xB9), o3(0xED,0x85,0xBA),
+     o3(0xED,0x85,0xBB), o3(0xED,0x85,0xBD),
+     o3(0xED,0x85,0xBE), o3(0xED,0x85,0xBF),
+     o3(0xED,0x86,0x80), o3(0xED,0x86,0x81),
+     o3(0xED,0x86,0x82), o3(0xED,0x86,0x83),
+     o3(0xED,0x86,0x85), o3(0xED,0x86,0x86),
+     o3(0xED,0x86,0x87), o3(0xED,0x86,0x89),
+     o3(0xED,0x86,0x8A), o3(0xED,0x86,0x8B),
+     o3(0xED,0x86,0x8C), o3(0xED,0x86,0x8D),
+     o3(0xED,0x86,0x8E), o3(0xED,0x86,0x8F),
+     o3(0xED,0x86,0x90), o3(0xED,0x86,0x91),
+     o3(0xED,0x86,0x92), o3(0xED,0x86,0x93),
+     o3(0xED,0x86,0x94), o3(0xED,0x86,0x95),
+     o3(0xED,0x86,0x96), o3(0xED,0x86,0x97),
+     o3(0xED,0x86,0x98), o3(0xED,0x86,0x99),
+     o3(0xED,0x86,0x9A), o3(0xED,0x86,0x9B),
+     o3(0xED,0x86,0x9C), o3(0xED,0x86,0x9D),
+     o3(0xED,0x86,0x9E), o3(0xED,0x86,0x9F),
+     o3(0xED,0x86,0xA2), o3(0xED,0x86,0xA3),
+     o3(0xED,0x86,0xA5), o3(0xED,0x86,0xA6),
+     o3(0xED,0x86,0xA7), o3(0xED,0x86,0xA9),
+     o3(0xED,0x86,0xAA), o3(0xED,0x86,0xAB),
+     o3(0xED,0x86,0xAC), o3(0xED,0x86,0xAD),
+     o3(0xED,0x86,0xAE), o3(0xED,0x86,0xAF),
+     o3(0xED,0x86,0xB2), o3(0xED,0x86,0xB4),
+     o3(0xED,0x86,0xB6), o3(0xED,0x86,0xB7),
+     o3(0xED,0x86,0xB8), o3(0xED,0x86,0xB9),
+     o3(0xED,0x86,0xBB), o3(0xED,0x86,0xBD),
+     o3(0xED,0x86,0xBE), o3(0xED,0x86,0xBF),
+     o3(0xED,0x87,0x81), o3(0xED,0x87,0x82),
+     o3(0xED,0x87,0x83), o3(0xED,0x87,0x84),
+     o3(0xED,0x87,0x85), o3(0xED,0x87,0x86),
+     o3(0xED,0x87,0x87), o3(0xED,0x87,0x88),
+     o3(0xED,0x87,0x89), o3(0xED,0x87,0x8A),
+     o3(0xED,0x87,0x8B), o3(0xED,0x87,0x8C),
+     o3(0xED,0x87,0x8D), o3(0xED,0x87,0x8E),
+     o3(0xED,0x87,0x8F), o3(0xEB,0x9E,0x98),
+     o3(0xEB,0x9E,0x99), o3(0xEB,0x9E,0x9C),
+     o3(0xEB,0x9E,0xA0), o3(0xEB,0x9E,0xA8),
+     o3(0xEB,0x9E,0xA9), o3(0xEB,0x9E,0xAB),
+     o3(0xEB,0x9E,0xAC), o3(0xEB,0x9E,0xAD),
+     o3(0xEB,0x9E,0xB4), o3(0xEB,0x9E,0xB5),
+     o3(0xEB,0x9E,0xB8), o3(0xEB,0x9F,0x87),
+     o3(0xEB,0x9F,0x89), o3(0xEB,0x9F,0xAC),
+     o3(0xEB,0x9F,0xAD), o3(0xEB,0x9F,0xB0),
+     o3(0xEB,0x9F,0xB4), o3(0xEB,0x9F,0xBC),
+     o3(0xEB,0x9F,0xBD), o3(0xEB,0x9F,0xBF),
+     o3(0xEB,0xA0,0x80), o3(0xEB,0xA0,0x81),
+     o3(0xEB,0xA0,0x87), o3(0xEB,0xA0,0x88),
+     o3(0xEB,0xA0,0x89), o3(0xEB,0xA0,0x8C),
+     o3(0xEB,0xA0,0x90), o3(0xEB,0xA0,0x98),
+     o3(0xEB,0xA0,0x99), o3(0xEB,0xA0,0x9B),
+     o3(0xEB,0xA0,0x9D), o3(0xEB,0xA0,0xA4),
+     o3(0xEB,0xA0,0xA5), o3(0xEB,0xA0,0xA8),
+     o3(0xEB,0xA0,0xAC), o3(0xEB,0xA0,0xB4),
+     o3(0xEB,0xA0,0xB5), o3(0xEB,0xA0,0xB7),
+     o3(0xEB,0xA0,0xB8), o3(0xEB,0xA0,0xB9),
+     o3(0xEB,0xA1,0x80), o3(0xEB,0xA1,0x84),
+     o3(0xEB,0xA1,0x91), o3(0xEB,0xA1,0x93),
+     o3(0xEB,0xA1,0x9C), o3(0xEB,0xA1,0x9D),
+     o3(0xEB,0xA1,0xA0), o3(0xEB,0xA1,0xA4),
+     o3(0xEB,0xA1,0xAC), o3(0xEB,0xA1,0xAD),
+     o3(0xEB,0xA1,0xAF), o3(0xEB,0xA1,0xB1),
+     o3(0xEB,0xA1,0xB8), o3(0xEB,0xA1,0xBC),
+     o3(0xEB,0xA2,0x8D), o3(0xEB,0xA2,0xA8),
+     o3(0xEB,0xA2,0xB0), o3(0xEB,0xA2,0xB4),
+     o3(0xEB,0xA2,0xB8), o3(0xEB,0xA3,0x80),
+     o3(0xEB,0xA3,0x81), o3(0xEB,0xA3,0x83),
+     o3(0xEB,0xA3,0x85), o3(0xEB,0xA3,0x8C),
+     o3(0xEB,0xA3,0x90), o3(0xEB,0xA3,0x94),
+     o3(0xEB,0xA3,0x9D), o3(0xEB,0xA3,0x9F),
+     o3(0xEB,0xA3,0xA1), o3(0xEB,0xA3,0xA8),
+     o3(0xEB,0xA3,0xA9), o3(0xEB,0xA3,0xAC),
+     o3(0xEB,0xA3,0xB0), o3(0xEB,0xA3,0xB8),
+     o3(0xEB,0xA3,0xB9), o3(0xEB,0xA3,0xBB),
+     o3(0xEB,0xA3,0xBD), o3(0xEB,0xA4,0x84),
+     o3(0xEB,0xA4,0x98), o3(0xEB,0xA4,0xA0),
+     o3(0xEB,0xA4,0xBC), o3(0xEB,0xA4,0xBD),
+     o3(0xEB,0xA5,0x80), o3(0xEB,0xA5,0x84),
+     o3(0xEB,0xA5,0x8C), o3(0xEB,0xA5,0x8F),
+     o3(0xEB,0xA5,0x91), o3(0xEB,0xA5,0x98),
+     o3(0xEB,0xA5,0x99), o3(0xEB,0xA5,0x9C),
+     o3(0xEB,0xA5,0xA0), o3(0xEB,0xA5,0xA8),
+     o3(0xEB,0xA5,0xA9),
+
+#define from_CP949_B7 WORDINDEX2INFO(41142)
+    from_CP949_81_offsets,
+    from_CP949_B7_infos,
+
+#define from_CP949_B8_infos WORDINDEX2INFO(41144)
+                INVALID, o3(0xED,0x87,0x90),
+     o3(0xED,0x87,0x91), o3(0xED,0x87,0x92),
+     o3(0xED,0x87,0x93), o3(0xED,0x87,0x94),
+     o3(0xED,0x87,0x95), o3(0xED,0x87,0x96),
+     o3(0xED,0x87,0x97), o3(0xED,0x87,0x99),
+     o3(0xED,0x87,0x9A), o3(0xED,0x87,0x9B),
+     o3(0xED,0x87,0x9C), o3(0xED,0x87,0x9D),
+     o3(0xED,0x87,0x9E), o3(0xED,0x87,0x9F),
+     o3(0xED,0x87,0xA0), o3(0xED,0x87,0xA1),
+     o3(0xED,0x87,0xA2), o3(0xED,0x87,0xA3),
+     o3(0xED,0x87,0xA4), o3(0xED,0x87,0xA5),
+     o3(0xED,0x87,0xA6), o3(0xED,0x87,0xA7),
+     o3(0xED,0x87,0xA8), o3(0xED,0x87,0xA9),
+     o3(0xED,0x87,0xAA), o3(0xED,0x87,0xAB),
+     o3(0xED,0x87,0xAC), o3(0xED,0x87,0xAD),
+     o3(0xED,0x87,0xAE), o3(0xED,0x87,0xAF),
+     o3(0xED,0x87,0xB0), o3(0xED,0x87,0xB1),
+     o3(0xED,0x87,0xB2), o3(0xED,0x87,0xB3),
+     o3(0xED,0x87,0xB5), o3(0xED,0x87,0xB6),
+     o3(0xED,0x87,0xB7), o3(0xED,0x87,0xB9),
+     o3(0xED,0x87,0xBA), o3(0xED,0x87,0xBB),
+     o3(0xED,0x87,0xBC), o3(0xED,0x87,0xBD),
+     o3(0xED,0x87,0xBE), o3(0xED,0x87,0xBF),
+     o3(0xED,0x88,0x80), o3(0xED,0x88,0x81),
+     o3(0xED,0x88,0x82), o3(0xED,0x88,0x83),
+     o3(0xED,0x88,0x84), o3(0xED,0x88,0x85),
+     o3(0xED,0x88,0x86), o3(0xED,0x88,0x88),
+     o3(0xED,0x88,0x8A), o3(0xED,0x88,0x8B),
+     o3(0xED,0x88,0x8C), o3(0xED,0x88,0x8D),
+     o3(0xED,0x88,0x8E), o3(0xED,0x88,0x8F),
+     o3(0xED,0x88,0x91), o3(0xED,0x88,0x92),
+     o3(0xED,0x88,0x93), o3(0xED,0x88,0x94),
+     o3(0xED,0x88,0x95), o3(0xED,0x88,0x96),
+     o3(0xED,0x88,0x97), o3(0xED,0x88,0x98),
+     o3(0xED,0x88,0x99), o3(0xED,0x88,0x9A),
+     o3(0xED,0x88,0x9B), o3(0xED,0x88,0x9C),
+     o3(0xED,0x88,0x9D), o3(0xED,0x88,0x9E),
+     o3(0xED,0x88,0x9F), o3(0xED,0x88,0xA0),
+     o3(0xED,0x88,0xA1), o3(0xED,0x88,0xA2),
+     o3(0xED,0x88,0xA3), o3(0xED,0x88,0xA4),
+     o3(0xED,0x88,0xA5), o3(0xED,0x88,0xA6),
+     o3(0xED,0x88,0xA7), o3(0xED,0x88,0xA8),
+     o3(0xED,0x88,0xA9), o3(0xEB,0xA5,0xAB),
+     o3(0xEB,0xA5,0xAD), o3(0xEB,0xA5,0xB4),
+     o3(0xEB,0xA5,0xB5), o3(0xEB,0xA5,0xB8),
+     o3(0xEB,0xA5,0xBC), o3(0xEB,0xA6,0x84),
+     o3(0xEB,0xA6,0x85), o3(0xEB,0xA6,0x87),
+     o3(0xEB,0xA6,0x89), o3(0xEB,0xA6,0x8A),
+     o3(0xEB,0xA6,0x8D), o3(0xEB,0xA6,0x8E),
+     o3(0xEB,0xA6,0xAC), o3(0xEB,0xA6,0xAD),
+     o3(0xEB,0xA6,0xB0), o3(0xEB,0xA6,0xB4),
+     o3(0xEB,0xA6,0xBC), o3(0xEB,0xA6,0xBD),
+     o3(0xEB,0xA6,0xBF), o3(0xEB,0xA7,0x81),
+     o3(0xEB,0xA7,0x88), o3(0xEB,0xA7,0x89),
+     o3(0xEB,0xA7,0x8C), o3(0xEB,0xA7,0x8E),
+     o3(0xEB,0xA7,0x8F), o3(0xEB,0xA7,0x90),
+     o3(0xEB,0xA7,0x91), o3(0xEB,0xA7,0x92),
+     o3(0xEB,0xA7,0x98), o3(0xEB,0xA7,0x99),
+     o3(0xEB,0xA7,0x9B), o3(0xEB,0xA7,0x9D),
+     o3(0xEB,0xA7,0x9E), o3(0xEB,0xA7,0xA1),
+     o3(0xEB,0xA7,0xA3), o3(0xEB,0xA7,0xA4),
+     o3(0xEB,0xA7,0xA5), o3(0xEB,0xA7,0xA8),
+     o3(0xEB,0xA7,0xAC), o3(0xEB,0xA7,0xB4),
+     o3(0xEB,0xA7,0xB5), o3(0xEB,0xA7,0xB7),
+     o3(0xEB,0xA7,0xB8), o3(0xEB,0xA7,0xB9),
+     o3(0xEB,0xA7,0xBA), o3(0xEB,0xA8,0x80),
+     o3(0xEB,0xA8,0x81), o3(0xEB,0xA8,0x88),
+     o3(0xEB,0xA8,0x95), o3(0xEB,0xA8,0xB8),
+     o3(0xEB,0xA8,0xB9), o3(0xEB,0xA8,0xBC),
+     o3(0xEB,0xA9,0x80), o3(0xEB,0xA9,0x82),
+     o3(0xEB,0xA9,0x88), o3(0xEB,0xA9,0x89),
+     o3(0xEB,0xA9,0x8B), o3(0xEB,0xA9,0x8D),
+     o3(0xEB,0xA9,0x8E), o3(0xEB,0xA9,0x93),
+     o3(0xEB,0xA9,0x94), o3(0xEB,0xA9,0x95),
+     o3(0xEB,0xA9,0x98), o3(0xEB,0xA9,0x9C),
+     o3(0xEB,0xA9,0xA4), o3(0xEB,0xA9,0xA5),
+     o3(0xEB,0xA9,0xA7), o3(0xEB,0xA9,0xA8),
+     o3(0xEB,0xA9,0xA9), o3(0xEB,0xA9,0xB0),
+     o3(0xEB,0xA9,0xB1), o3(0xEB,0xA9,0xB4),
+     o3(0xEB,0xA9,0xB8), o3(0xEB,0xAA,0x83),
+     o3(0xEB,0xAA,0x84), o3(0xEB,0xAA,0x85),
+     o3(0xEB,0xAA,0x87), o3(0xEB,0xAA,0x8C),
+     o3(0xEB,0xAA,0xA8), o3(0xEB,0xAA,0xA9),
+     o3(0xEB,0xAA,0xAB), o3(0xEB,0xAA,0xAC),
+     o3(0xEB,0xAA,0xB0), o3(0xEB,0xAA,0xB2),
+     o3(0xEB,0xAA,0xB8), o3(0xEB,0xAA,0xB9),
+     o3(0xEB,0xAA,0xBB), o3(0xEB,0xAA,0xBD),
+     o3(0xEB,0xAB,0x84), o3(0xEB,0xAB,0x88),
+     o3(0xEB,0xAB,0x98), o3(0xEB,0xAB,0x99),
+     o3(0xEB,0xAB,0xBC),
+
+#define from_CP949_B8 WORDINDEX2INFO(41323)
+    from_CP949_81_offsets,
+    from_CP949_B8_infos,
+
+#define from_CP949_B9_infos WORDINDEX2INFO(41325)
+                INVALID, o3(0xED,0x88,0xAA),
+     o3(0xED,0x88,0xAB), o3(0xED,0x88,0xAE),
+     o3(0xED,0x88,0xAF), o3(0xED,0x88,0xB1),
+     o3(0xED,0x88,0xB2), o3(0xED,0x88,0xB3),
+     o3(0xED,0x88,0xB5), o3(0xED,0x88,0xB6),
+     o3(0xED,0x88,0xB7), o3(0xED,0x88,0xB8),
+     o3(0xED,0x88,0xB9), o3(0xED,0x88,0xBA),
+     o3(0xED,0x88,0xBB), o3(0xED,0x88,0xBE),
+     o3(0xED,0x89,0x80), o3(0xED,0x89,0x82),
+     o3(0xED,0x89,0x83), o3(0xED,0x89,0x84),
+     o3(0xED,0x89,0x85), o3(0xED,0x89,0x86),
+     o3(0xED,0x89,0x87), o3(0xED,0x89,0x89),
+     o3(0xED,0x89,0x8A), o3(0xED,0x89,0x8B),
+     o3(0xED,0x89,0x8C), o3(0xED,0x89,0x8D),
+     o3(0xED,0x89,0x8E), o3(0xED,0x89,0x8F),
+     o3(0xED,0x89,0x90), o3(0xED,0x89,0x91),
+     o3(0xED,0x89,0x92), o3(0xED,0x89,0x93),
+     o3(0xED,0x89,0x94), o3(0xED,0x89,0x95),
+     o3(0xED,0x89,0x96), o3(0xED,0x89,0x97),
+     o3(0xED,0x89,0x98), o3(0xED,0x89,0x99),
+     o3(0xED,0x89,0x9A), o3(0xED,0x89,0x9B),
+     o3(0xED,0x89,0x9D), o3(0xED,0x89,0x9E),
+     o3(0xED,0x89,0x9F), o3(0xED,0x89,0xA0),
+     o3(0xED,0x89,0xA1), o3(0xED,0x89,0xA2),
+     o3(0xED,0x89,0xA3), o3(0xED,0x89,0xA5),
+     o3(0xED,0x89,0xA6), o3(0xED,0x89,0xA7),
+     o3(0xED,0x89,0xA8), o3(0xED,0x89,0xA9),
+     o3(0xED,0x89,0xAA), o3(0xED,0x89,0xAB),
+     o3(0xED,0x89,0xAC), o3(0xED,0x89,0xAD),
+     o3(0xED,0x89,0xAE), o3(0xED,0x89,0xAF),
+     o3(0xED,0x89,0xB0), o3(0xED,0x89,0xB1),
+     o3(0xED,0x89,0xB2), o3(0xED,0x89,0xB3),
+     o3(0xED,0x89,0xB4), o3(0xED,0x89,0xB5),
+     o3(0xED,0x89,0xB6), o3(0xED,0x89,0xB7),
+     o3(0xED,0x89,0xB8), o3(0xED,0x89,0xB9),
+     o3(0xED,0x89,0xBA), o3(0xED,0x89,0xBB),
+     o3(0xED,0x89,0xBC), o3(0xED,0x89,0xBD),
+     o3(0xED,0x89,0xBE), o3(0xED,0x89,0xBF),
+     o3(0xED,0x8A,0x82), o3(0xED,0x8A,0x83),
+     o3(0xED,0x8A,0x85), o3(0xED,0x8A,0x86),
+     o3(0xED,0x8A,0x87), o3(0xED,0x8A,0x89),
+     o3(0xED,0x8A,0x8A), o3(0xED,0x8A,0x8B),
+     o3(0xED,0x8A,0x8C), o3(0xEB,0xAC,0x80),
+     o3(0xEB,0xAC,0x84), o3(0xEB,0xAC,0x8D),
+     o3(0xEB,0xAC,0x8F), o3(0xEB,0xAC,0x91),
+     o3(0xEB,0xAC,0x98), o3(0xEB,0xAC,0x9C),
+     o3(0xEB,0xAC,0xA0), o3(0xEB,0xAC,0xA9),
+     o3(0xEB,0xAC,0xAB), o3(0xEB,0xAC,0xB4),
+     o3(0xEB,0xAC,0xB5), o3(0xEB,0xAC,0xB6),
+     o3(0xEB,0xAC,0xB8), o3(0xEB,0xAC,0xBB),
+     o3(0xEB,0xAC,0xBC), o3(0xEB,0xAC,0xBD),
+     o3(0xEB,0xAC,0xBE), o3(0xEB,0xAD,0x84),
+     o3(0xEB,0xAD,0x85), o3(0xEB,0xAD,0x87),
+     o3(0xEB,0xAD,0x89), o3(0xEB,0xAD,0x8D),
+     o3(0xEB,0xAD,0x8F), o3(0xEB,0xAD,0x90),
+     o3(0xEB,0xAD,0x94), o3(0xEB,0xAD,0x98),
+     o3(0xEB,0xAD,0xA1), o3(0xEB,0xAD,0xA3),
+     o3(0xEB,0xAD,0xAC), o3(0xEB,0xAE,0x88),
+     o3(0xEB,0xAE,0x8C), o3(0xEB,0xAE,0x90),
+     o3(0xEB,0xAE,0xA4), o3(0xEB,0xAE,0xA8),
+     o3(0xEB,0xAE,0xAC), o3(0xEB,0xAE,0xB4),
+     o3(0xEB,0xAE,0xB7), o3(0xEB,0xAF,0x80),
+     o3(0xEB,0xAF,0x84), o3(0xEB,0xAF,0x88),
+     o3(0xEB,0xAF,0x90), o3(0xEB,0xAF,0x93),
+     o3(0xEB,0xAF,0xB8), o3(0xEB,0xAF,0xB9),
+     o3(0xEB,0xAF,0xBC), o3(0xEB,0xAF,0xBF),
+     o3(0xEB,0xB0,0x80), o3(0xEB,0xB0,0x82),
+     o3(0xEB,0xB0,0x88), o3(0xEB,0xB0,0x89),
+     o3(0xEB,0xB0,0x8B), o3(0xEB,0xB0,0x8C),
+     o3(0xEB,0xB0,0x8D), o3(0xEB,0xB0,0x8F),
+     o3(0xEB,0xB0,0x91), o3(0xEB,0xB0,0x94),
+     o3(0xEB,0xB0,0x95), o3(0xEB,0xB0,0x96),
+     o3(0xEB,0xB0,0x97), o3(0xEB,0xB0,0x98),
+     o3(0xEB,0xB0,0x9B), o3(0xEB,0xB0,0x9C),
+     o3(0xEB,0xB0,0x9D), o3(0xEB,0xB0,0x9E),
+     o3(0xEB,0xB0,0x9F), o3(0xEB,0xB0,0xA4),
+     o3(0xEB,0xB0,0xA5), o3(0xEB,0xB0,0xA7),
+     o3(0xEB,0xB0,0xA9), o3(0xEB,0xB0,0xAD),
+     o3(0xEB,0xB0,0xB0), o3(0xEB,0xB0,0xB1),
+     o3(0xEB,0xB0,0xB4), o3(0xEB,0xB0,0xB8),
+     o3(0xEB,0xB1,0x80), o3(0xEB,0xB1,0x81),
+     o3(0xEB,0xB1,0x83), o3(0xEB,0xB1,0x84),
+     o3(0xEB,0xB1,0x85), o3(0xEB,0xB1,0x89),
+     o3(0xEB,0xB1,0x8C), o3(0xEB,0xB1,0x8D),
+     o3(0xEB,0xB1,0x90), o3(0xEB,0xB1,0x9D),
+     o3(0xEB,0xB2,0x84), o3(0xEB,0xB2,0x85),
+     o3(0xEB,0xB2,0x88), o3(0xEB,0xB2,0x8B),
+     o3(0xEB,0xB2,0x8C), o3(0xEB,0xB2,0x8E),
+     o3(0xEB,0xB2,0x94), o3(0xEB,0xB2,0x95),
+     o3(0xEB,0xB2,0x97),
+
+#define from_CP949_B9 WORDINDEX2INFO(41504)
+    from_CP949_81_offsets,
+    from_CP949_B9_infos,
+
+#define from_CP949_BA_infos WORDINDEX2INFO(41506)
+                INVALID, o3(0xED,0x8A,0x8D),
+     o3(0xED,0x8A,0x8E), o3(0xED,0x8A,0x8F),
+     o3(0xED,0x8A,0x92), o3(0xED,0x8A,0x93),
+     o3(0xED,0x8A,0x94), o3(0xED,0x8A,0x96),
+     o3(0xED,0x8A,0x97), o3(0xED,0x8A,0x98),
+     o3(0xED,0x8A,0x99), o3(0xED,0x8A,0x9A),
+     o3(0xED,0x8A,0x9B), o3(0xED,0x8A,0x9D),
+     o3(0xED,0x8A,0x9E), o3(0xED,0x8A,0x9F),
+     o3(0xED,0x8A,0xA1), o3(0xED,0x8A,0xA2),
+     o3(0xED,0x8A,0xA3), o3(0xED,0x8A,0xA5),
+     o3(0xED,0x8A,0xA6), o3(0xED,0x8A,0xA7),
+     o3(0xED,0x8A,0xA8), o3(0xED,0x8A,0xA9),
+     o3(0xED,0x8A,0xAA), o3(0xED,0x8A,0xAB),
+     o3(0xED,0x8A,0xAD), o3(0xED,0x8A,0xAE),
+     o3(0xED,0x8A,0xAF), o3(0xED,0x8A,0xB0),
+     o3(0xED,0x8A,0xB2), o3(0xED,0x8A,0xB3),
+     o3(0xED,0x8A,0xB4), o3(0xED,0x8A,0xB5),
+     o3(0xED,0x8A,0xB6), o3(0xED,0x8A,0xB7),
+     o3(0xED,0x8A,0xBA), o3(0xED,0x8A,0xBB),
+     o3(0xED,0x8A,0xBD), o3(0xED,0x8A,0xBE),
+     o3(0xED,0x8B,0x81), o3(0xED,0x8B,0x83),
+     o3(0xED,0x8B,0x84), o3(0xED,0x8B,0x85),
+     o3(0xED,0x8B,0x86), o3(0xED,0x8B,0x87),
+     o3(0xED,0x8B,0x8A), o3(0xED,0x8B,0x8C),
+     o3(0xED,0x8B,0x8D), o3(0xED,0x8B,0x8E),
+     o3(0xED,0x8B,0x8F), o3(0xED,0x8B,0x90),
+     o3(0xED,0x8B,0x91), o3(0xED,0x8B,0x92),
+     o3(0xED,0x8B,0x93), o3(0xED,0x8B,0x95),
+     o3(0xED,0x8B,0x96), o3(0xED,0x8B,0x97),
+     o3(0xED,0x8B,0x99), o3(0xED,0x8B,0x9A),
+     o3(0xED,0x8B,0x9B), o3(0xED,0x8B,0x9D),
+     o3(0xED,0x8B,0x9E), o3(0xED,0x8B,0x9F),
+     o3(0xED,0x8B,0xA0), o3(0xED,0x8B,0xA1),
+     o3(0xED,0x8B,0xA2), o3(0xED,0x8B,0xA3),
+     o3(0xED,0x8B,0xA6), o3(0xED,0x8B,0xA7),
+     o3(0xED,0x8B,0xA8), o3(0xED,0x8B,0xA9),
+     o3(0xED,0x8B,0xAA), o3(0xED,0x8B,0xAB),
+     o3(0xED,0x8B,0xAC), o3(0xED,0x8B,0xAD),
+     o3(0xED,0x8B,0xAE), o3(0xED,0x8B,0xAF),
+     o3(0xED,0x8B,0xB2), o3(0xED,0x8B,0xB3),
+     o3(0xED,0x8B,0xB5), o3(0xED,0x8B,0xB6),
+     o3(0xED,0x8B,0xB7), o3(0xED,0x8B,0xB9),
+     o3(0xED,0x8B,0xBA), o3(0xEB,0xB2,0x99),
+     o3(0xEB,0xB2,0x9A), o3(0xEB,0xB2,0xA0),
+     o3(0xEB,0xB2,0xA1), o3(0xEB,0xB2,0xA4),
+     o3(0xEB,0xB2,0xA7), o3(0xEB,0xB2,0xA8),
+     o3(0xEB,0xB2,0xB0), o3(0xEB,0xB2,0xB1),
+     o3(0xEB,0xB2,0xB3), o3(0xEB,0xB2,0xB4),
+     o3(0xEB,0xB2,0xB5), o3(0xEB,0xB2,0xBC),
+     o3(0xEB,0xB2,0xBD), o3(0xEB,0xB3,0x80),
+     o3(0xEB,0xB3,0x84), o3(0xEB,0xB3,0x8D),
+     o3(0xEB,0xB3,0x8F), o3(0xEB,0xB3,0x90),
+     o3(0xEB,0xB3,0x91), o3(0xEB,0xB3,0x95),
+     o3(0xEB,0xB3,0x98), o3(0xEB,0xB3,0x9C),
+     o3(0xEB,0xB3,0xB4), o3(0xEB,0xB3,0xB5),
+     o3(0xEB,0xB3,0xB6), o3(0xEB,0xB3,0xB8),
+     o3(0xEB,0xB3,0xBC), o3(0xEB,0xB4,0x84),
+     o3(0xEB,0xB4,0x85), o3(0xEB,0xB4,0x87),
+     o3(0xEB,0xB4,0x89), o3(0xEB,0xB4,0x90),
+     o3(0xEB,0xB4,0x94), o3(0xEB,0xB4,0xA4),
+     o3(0xEB,0xB4,0xAC), o3(0xEB,0xB5,0x80),
+     o3(0xEB,0xB5,0x88), o3(0xEB,0xB5,0x89),
+     o3(0xEB,0xB5,0x8C), o3(0xEB,0xB5,0x90),
+     o3(0xEB,0xB5,0x98), o3(0xEB,0xB5,0x99),
+     o3(0xEB,0xB5,0xA4), o3(0xEB,0xB5,0xA8),
+     o3(0xEB,0xB6,0x80), o3(0xEB,0xB6,0x81),
+     o3(0xEB,0xB6,0x84), o3(0xEB,0xB6,0x87),
+     o3(0xEB,0xB6,0x88), o3(0xEB,0xB6,0x89),
+     o3(0xEB,0xB6,0x8A), o3(0xEB,0xB6,0x90),
+     o3(0xEB,0xB6,0x91), o3(0xEB,0xB6,0x93),
+     o3(0xEB,0xB6,0x95), o3(0xEB,0xB6,0x99),
+     o3(0xEB,0xB6,0x9A), o3(0xEB,0xB6,0x9C),
+     o3(0xEB,0xB6,0xA4), o3(0xEB,0xB6,0xB0),
+     o3(0xEB,0xB6,0xB8), o3(0xEB,0xB7,0x94),
+     o3(0xEB,0xB7,0x95), o3(0xEB,0xB7,0x98),
+     o3(0xEB,0xB7,0x9C), o3(0xEB,0xB7,0xA9),
+     o3(0xEB,0xB7,0xB0), o3(0xEB,0xB7,0xB4),
+     o3(0xEB,0xB7,0xB8), o3(0xEB,0xB8,0x80),
+     o3(0xEB,0xB8,0x83), o3(0xEB,0xB8,0x85),
+     o3(0xEB,0xB8,0x8C), o3(0xEB,0xB8,0x8D),
+     o3(0xEB,0xB8,0x90), o3(0xEB,0xB8,0x94),
+     o3(0xEB,0xB8,0x9C), o3(0xEB,0xB8,0x9D),
+     o3(0xEB,0xB8,0x9F), o3(0xEB,0xB9,0x84),
+     o3(0xEB,0xB9,0x85), o3(0xEB,0xB9,0x88),
+     o3(0xEB,0xB9,0x8C), o3(0xEB,0xB9,0x8E),
+     o3(0xEB,0xB9,0x94), o3(0xEB,0xB9,0x95),
+     o3(0xEB,0xB9,0x97), o3(0xEB,0xB9,0x99),
+     o3(0xEB,0xB9,0x9A), o3(0xEB,0xB9,0x9B),
+     o3(0xEB,0xB9,0xA0), o3(0xEB,0xB9,0xA1),
+     o3(0xEB,0xB9,0xA4),
+
+#define from_CP949_BA WORDINDEX2INFO(41685)
+    from_CP949_81_offsets,
+    from_CP949_BA_infos,
+
+#define from_CP949_BB_infos WORDINDEX2INFO(41687)
+                INVALID, o3(0xED,0x8B,0xBB),
+     o3(0xED,0x8B,0xBC), o3(0xED,0x8B,0xBD),
+     o3(0xED,0x8B,0xBE), o3(0xED,0x8B,0xBF),
+     o3(0xED,0x8C,0x82), o3(0xED,0x8C,0x84),
+     o3(0xED,0x8C,0x86), o3(0xED,0x8C,0x87),
+     o3(0xED,0x8C,0x88), o3(0xED,0x8C,0x89),
+     o3(0xED,0x8C,0x8A), o3(0xED,0x8C,0x8B),
+     o3(0xED,0x8C,0x8F), o3(0xED,0x8C,0x91),
+     o3(0xED,0x8C,0x92), o3(0xED,0x8C,0x93),
+     o3(0xED,0x8C,0x95), o3(0xED,0x8C,0x97),
+     o3(0xED,0x8C,0x98), o3(0xED,0x8C,0x99),
+     o3(0xED,0x8C,0x9A), o3(0xED,0x8C,0x9B),
+     o3(0xED,0x8C,0x9E), o3(0xED,0x8C,0xA2),
+     o3(0xED,0x8C,0xA3), o3(0xED,0x8C,0xA4),
+     o3(0xED,0x8C,0xA6), o3(0xED,0x8C,0xA7),
+     o3(0xED,0x8C,0xAA), o3(0xED,0x8C,0xAB),
+     o3(0xED,0x8C,0xAD), o3(0xED,0x8C,0xAE),
+     o3(0xED,0x8C,0xAF), o3(0xED,0x8C,0xB1),
+     o3(0xED,0x8C,0xB2), o3(0xED,0x8C,0xB3),
+     o3(0xED,0x8C,0xB4), o3(0xED,0x8C,0xB5),
+     o3(0xED,0x8C,0xB6), o3(0xED,0x8C,0xB7),
+     o3(0xED,0x8C,0xBA), o3(0xED,0x8C,0xBE),
+     o3(0xED,0x8C,0xBF), o3(0xED,0x8D,0x80),
+     o3(0xED,0x8D,0x81), o3(0xED,0x8D,0x82),
+     o3(0xED,0x8D,0x83), o3(0xED,0x8D,0x86),
+     o3(0xED,0x8D,0x87), o3(0xED,0x8D,0x88),
+     o3(0xED,0x8D,0x89), o3(0xED,0x8D,0x8A),
+     o3(0xED,0x8D,0x8B), o3(0xED,0x8D,0x8C),
+     o3(0xED,0x8D,0x8D), o3(0xED,0x8D,0x8E),
+     o3(0xED,0x8D,0x8F), o3(0xED,0x8D,0x90),
+     o3(0xED,0x8D,0x91), o3(0xED,0x8D,0x92),
+     o3(0xED,0x8D,0x93), o3(0xED,0x8D,0x94),
+     o3(0xED,0x8D,0x95), o3(0xED,0x8D,0x96),
+     o3(0xED,0x8D,0x97), o3(0xED,0x8D,0x98),
+     o3(0xED,0x8D,0x99), o3(0xED,0x8D,0x9A),
+     o3(0xED,0x8D,0x9B), o3(0xED,0x8D,0x9C),
+     o3(0xED,0x8D,0x9D), o3(0xED,0x8D,0x9E),
+     o3(0xED,0x8D,0x9F), o3(0xED,0x8D,0xA0),
+     o3(0xED,0x8D,0xA1), o3(0xED,0x8D,0xA2),
+     o3(0xED,0x8D,0xA3), o3(0xED,0x8D,0xA4),
+     o3(0xED,0x8D,0xA5), o3(0xED,0x8D,0xA6),
+     o3(0xED,0x8D,0xA7), o3(0xED,0x8D,0xA8),
+     o3(0xED,0x8D,0xA9), o3(0xEB,0xB9,0xA8),
+     o3(0xEB,0xB9,0xAA), o3(0xEB,0xB9,0xB0),
+     o3(0xEB,0xB9,0xB1), o3(0xEB,0xB9,0xB3),
+     o3(0xEB,0xB9,0xB4), o3(0xEB,0xB9,0xB5),
+     o3(0xEB,0xB9,0xBB), o3(0xEB,0xB9,0xBC),
+     o3(0xEB,0xB9,0xBD), o3(0xEB,0xBA,0x80),
+     o3(0xEB,0xBA,0x84), o3(0xEB,0xBA,0x8C),
+     o3(0xEB,0xBA,0x8D), o3(0xEB,0xBA,0x8F),
+     o3(0xEB,0xBA,0x90), o3(0xEB,0xBA,0x91),
+     o3(0xEB,0xBA,0x98), o3(0xEB,0xBA,0x99),
+     o3(0xEB,0xBA,0xA8), o3(0xEB,0xBB,0x90),
+     o3(0xEB,0xBB,0x91), o3(0xEB,0xBB,0x94),
+     o3(0xEB,0xBB,0x97), o3(0xEB,0xBB,0x98),
+     o3(0xEB,0xBB,0xA0), o3(0xEB,0xBB,0xA3),
+     o3(0xEB,0xBB,0xA4), o3(0xEB,0xBB,0xA5),
+     o3(0xEB,0xBB,0xAC), o3(0xEB,0xBC,0x81),
+     o3(0xEB,0xBC,0x88), o3(0xEB,0xBC,0x89),
+     o3(0xEB,0xBC,0x98), o3(0xEB,0xBC,0x99),
+     o3(0xEB,0xBC,0x9B), o3(0xEB,0xBC,0x9C),
+     o3(0xEB,0xBC,0x9D), o3(0xEB,0xBD,0x80),
+     o3(0xEB,0xBD,0x81), o3(0xEB,0xBD,0x84),
+     o3(0xEB,0xBD,0x88), o3(0xEB,0xBD,0x90),
+     o3(0xEB,0xBD,0x91), o3(0xEB,0xBD,0x95),
+     o3(0xEB,0xBE,0x94), o3(0xEB,0xBE,0xB0),
+     o3(0xEB,0xBF,0x85), o3(0xEB,0xBF,0x8C),
+     o3(0xEB,0xBF,0x8D), o3(0xEB,0xBF,0x90),
+     o3(0xEB,0xBF,0x94), o3(0xEB,0xBF,0x9C),
+     o3(0xEB,0xBF,0x9F), o3(0xEB,0xBF,0xA1),
+     o3(0xEC,0x80,0xBC), o3(0xEC,0x81,0x91),
+     o3(0xEC,0x81,0x98), o3(0xEC,0x81,0x9C),
+     o3(0xEC,0x81,0xA0), o3(0xEC,0x81,0xA8),
+     o3(0xEC,0x81,0xA9), o3(0xEC,0x82,0x90),
+     o3(0xEC,0x82,0x91), o3(0xEC,0x82,0x94),
+     o3(0xEC,0x82,0x98), o3(0xEC,0x82,0xA0),
+     o3(0xEC,0x82,0xA1), o3(0xEC,0x82,0xA3),
+     o3(0xEC,0x82,0xA5), o3(0xEC,0x82,0xAC),
+     o3(0xEC,0x82,0xAD), o3(0xEC,0x82,0xAF),
+     o3(0xEC,0x82,0xB0), o3(0xEC,0x82,0xB3),
+     o3(0xEC,0x82,0xB4), o3(0xEC,0x82,0xB5),
+     o3(0xEC,0x82,0xB6), o3(0xEC,0x82,0xBC),
+     o3(0xEC,0x82,0xBD), o3(0xEC,0x82,0xBF),
+     o3(0xEC,0x83,0x80), o3(0xEC,0x83,0x81),
+     o3(0xEC,0x83,0x85), o3(0xEC,0x83,0x88),
+     o3(0xEC,0x83,0x89), o3(0xEC,0x83,0x8C),
+     o3(0xEC,0x83,0x90), o3(0xEC,0x83,0x98),
+     o3(0xEC,0x83,0x99), o3(0xEC,0x83,0x9B),
+     o3(0xEC,0x83,0x9C), o3(0xEC,0x83,0x9D),
+     o3(0xEC,0x83,0xA4),
+
+#define from_CP949_BB WORDINDEX2INFO(41866)
+    from_CP949_81_offsets,
+    from_CP949_BB_infos,
+
+#define from_CP949_BC_infos WORDINDEX2INFO(41868)
+                INVALID, o3(0xED,0x8D,0xAA),
+     o3(0xED,0x8D,0xAB), o3(0xED,0x8D,0xAC),
+     o3(0xED,0x8D,0xAD), o3(0xED,0x8D,0xAE),
+     o3(0xED,0x8D,0xAF), o3(0xED,0x8D,0xB0),
+     o3(0xED,0x8D,0xB1), o3(0xED,0x8D,0xB2),
+     o3(0xED,0x8D,0xB3), o3(0xED,0x8D,0xB4),
+     o3(0xED,0x8D,0xB5), o3(0xED,0x8D,0xB6),
+     o3(0xED,0x8D,0xB7), o3(0xED,0x8D,0xB8),
+     o3(0xED,0x8D,0xB9), o3(0xED,0x8D,0xBA),
+     o3(0xED,0x8D,0xBB), o3(0xED,0x8D,0xBE),
+     o3(0xED,0x8D,0xBF), o3(0xED,0x8E,0x81),
+     o3(0xED,0x8E,0x82), o3(0xED,0x8E,0x83),
+     o3(0xED,0x8E,0x85), o3(0xED,0x8E,0x86),
+     o3(0xED,0x8E,0x87), o3(0xED,0x8E,0x88),
+     o3(0xED,0x8E,0x89), o3(0xED,0x8E,0x8A),
+     o3(0xED,0x8E,0x8B), o3(0xED,0x8E,0x8E),
+     o3(0xED,0x8E,0x92), o3(0xED,0x8E,0x93),
+     o3(0xED,0x8E,0x94), o3(0xED,0x8E,0x95),
+     o3(0xED,0x8E,0x96), o3(0xED,0x8E,0x97),
+     o3(0xED,0x8E,0x9A), o3(0xED,0x8E,0x9B),
+     o3(0xED,0x8E,0x9D), o3(0xED,0x8E,0x9E),
+     o3(0xED,0x8E,0x9F), o3(0xED,0x8E,0xA1),
+     o3(0xED,0x8E,0xA2), o3(0xED,0x8E,0xA3),
+     o3(0xED,0x8E,0xA4), o3(0xED,0x8E,0xA5),
+     o3(0xED,0x8E,0xA6), o3(0xED,0x8E,0xA7),
+     o3(0xED,0x8E,0xAA), o3(0xED,0x8E,0xAC),
+     o3(0xED,0x8E,0xAE), o3(0xED,0x8E,0xAF),
+     o3(0xED,0x8E,0xB0), o3(0xED,0x8E,0xB1),
+     o3(0xED,0x8E,0xB2), o3(0xED,0x8E,0xB3),
+     o3(0xED,0x8E,0xB5), o3(0xED,0x8E,0xB6),
+     o3(0xED,0x8E,0xB7), o3(0xED,0x8E,0xB9),
+     o3(0xED,0x8E,0xBA), o3(0xED,0x8E,0xBB),
+     o3(0xED,0x8E,0xBD), o3(0xED,0x8E,0xBE),
+     o3(0xED,0x8E,0xBF), o3(0xED,0x8F,0x80),
+     o3(0xED,0x8F,0x81), o3(0xED,0x8F,0x82),
+     o3(0xED,0x8F,0x83), o3(0xED,0x8F,0x86),
+     o3(0xED,0x8F,0x87), o3(0xED,0x8F,0x8A),
+     o3(0xED,0x8F,0x8B), o3(0xED,0x8F,0x8C),
+     o3(0xED,0x8F,0x8D), o3(0xED,0x8F,0x8E),
+     o3(0xED,0x8F,0x8F), o3(0xED,0x8F,0x91),
+     o3(0xED,0x8F,0x92), o3(0xED,0x8F,0x93),
+     o3(0xED,0x8F,0x94), o3(0xED,0x8F,0x95),
+     o3(0xED,0x8F,0x96), o3(0xEC,0x83,0xA5),
+     o3(0xEC,0x83,0xA8), o3(0xEC,0x83,0xAC),
+     o3(0xEC,0x83,0xB4), o3(0xEC,0x83,0xB5),
+     o3(0xEC,0x83,0xB7), o3(0xEC,0x83,0xB9),
+     o3(0xEC,0x84,0x80), o3(0xEC,0x84,0x84),
+     o3(0xEC,0x84,0x88), o3(0xEC,0x84,0x90),
+     o3(0xEC,0x84,0x95), o3(0xEC,0x84,0x9C),
+     o3(0xEC,0x84,0x9D), o3(0xEC,0x84,0x9E),
+     o3(0xEC,0x84,0x9F), o3(0xEC,0x84,0xA0),
+     o3(0xEC,0x84,0xA3), o3(0xEC,0x84,0xA4),
+     o3(0xEC,0x84,0xA6), o3(0xEC,0x84,0xA7),
+     o3(0xEC,0x84,0xAC), o3(0xEC,0x84,0xAD),
+     o3(0xEC,0x84,0xAF), o3(0xEC,0x84,0xB0),
+     o3(0xEC,0x84,0xB1), o3(0xEC,0x84,0xB6),
+     o3(0xEC,0x84,0xB8), o3(0xEC,0x84,0xB9),
+     o3(0xEC,0x84,0xBC), o3(0xEC,0x85,0x80),
+     o3(0xEC,0x85,0x88), o3(0xEC,0x85,0x89),
+     o3(0xEC,0x85,0x8B), o3(0xEC,0x85,0x8C),
+     o3(0xEC,0x85,0x8D), o3(0xEC,0x85,0x94),
+     o3(0xEC,0x85,0x95), o3(0xEC,0x85,0x98),
+     o3(0xEC,0x85,0x9C), o3(0xEC,0x85,0xA4),
+     o3(0xEC,0x85,0xA5), o3(0xEC,0x85,0xA7),
+     o3(0xEC,0x85,0xA8), o3(0xEC,0x85,0xA9),
+     o3(0xEC,0x85,0xB0), o3(0xEC,0x85,0xB4),
+     o3(0xEC,0x85,0xB8), o3(0xEC,0x86,0x85),
+     o3(0xEC,0x86,0x8C), o3(0xEC,0x86,0x8D),
+     o3(0xEC,0x86,0x8E), o3(0xEC,0x86,0x90),
+     o3(0xEC,0x86,0x94), o3(0xEC,0x86,0x96),
+     o3(0xEC,0x86,0x9C), o3(0xEC,0x86,0x9D),
+     o3(0xEC,0x86,0x9F), o3(0xEC,0x86,0xA1),
+     o3(0xEC,0x86,0xA5), o3(0xEC,0x86,0xA8),
+     o3(0xEC,0x86,0xA9), o3(0xEC,0x86,0xAC),
+     o3(0xEC,0x86,0xB0), o3(0xEC,0x86,0xBD),
+     o3(0xEC,0x87,0x84), o3(0xEC,0x87,0x88),
+     o3(0xEC,0x87,0x8C), o3(0xEC,0x87,0x94),
+     o3(0xEC,0x87,0x97), o3(0xEC,0x87,0x98),
+     o3(0xEC,0x87,0xA0), o3(0xEC,0x87,0xA4),
+     o3(0xEC,0x87,0xA8), o3(0xEC,0x87,0xB0),
+     o3(0xEC,0x87,0xB1), o3(0xEC,0x87,0xB3),
+     o3(0xEC,0x87,0xBC), o3(0xEC,0x87,0xBD),
+     o3(0xEC,0x88,0x80), o3(0xEC,0x88,0x84),
+     o3(0xEC,0x88,0x8C), o3(0xEC,0x88,0x8D),
+     o3(0xEC,0x88,0x8F), o3(0xEC,0x88,0x91),
+     o3(0xEC,0x88,0x98), o3(0xEC,0x88,0x99),
+     o3(0xEC,0x88,0x9C), o3(0xEC,0x88,0x9F),
+     o3(0xEC,0x88,0xA0), o3(0xEC,0x88,0xA8),
+     o3(0xEC,0x88,0xA9), o3(0xEC,0x88,0xAB),
+     o3(0xEC,0x88,0xAD),
+
+#define from_CP949_BC WORDINDEX2INFO(42047)
+    from_CP949_81_offsets,
+    from_CP949_BC_infos,
+
+#define from_CP949_BD_infos WORDINDEX2INFO(42049)
+                INVALID, o3(0xED,0x8F,0x97),
+     o3(0xED,0x8F,0x99), o3(0xED,0x8F,0x9A),
+     o3(0xED,0x8F,0x9B), o3(0xED,0x8F,0x9C),
+     o3(0xED,0x8F,0x9D), o3(0xED,0x8F,0x9E),
+     o3(0xED,0x8F,0x9F), o3(0xED,0x8F,0xA0),
+     o3(0xED,0x8F,0xA2), o3(0xED,0x8F,0xA4),
+     o3(0xED,0x8F,0xA5), o3(0xED,0x8F,0xA6),
+     o3(0xED,0x8F,0xA7), o3(0xED,0x8F,0xA8),
+     o3(0xED,0x8F,0xA9), o3(0xED,0x8F,0xAA),
+     o3(0xED,0x8F,0xAB), o3(0xED,0x8F,0xAE),
+     o3(0xED,0x8F,0xAF), o3(0xED,0x8F,0xB1),
+     o3(0xED,0x8F,0xB2), o3(0xED,0x8F,0xB3),
+     o3(0xED,0x8F,0xB5), o3(0xED,0x8F,0xB6),
+     o3(0xED,0x8F,0xB7), o3(0xED,0x8F,0xB8),
+     o3(0xED,0x8F,0xB9), o3(0xED,0x8F,0xBA),
+     o3(0xED,0x8F,0xBB), o3(0xED,0x8F,0xBE),
+     o3(0xED,0x90,0x80), o3(0xED,0x90,0x82),
+     o3(0xED,0x90,0x83), o3(0xED,0x90,0x84),
+     o3(0xED,0x90,0x85), o3(0xED,0x90,0x86),
+     o3(0xED,0x90,0x87), o3(0xED,0x90,0x89),
+     o3(0xED,0x90,0x8A), o3(0xED,0x90,0x8B),
+     o3(0xED,0x90,0x8C), o3(0xED,0x90,0x8D),
+     o3(0xED,0x90,0x8E), o3(0xED,0x90,0x8F),
+     o3(0xED,0x90,0x90), o3(0xED,0x90,0x91),
+     o3(0xED,0x90,0x92), o3(0xED,0x90,0x93),
+     o3(0xED,0x90,0x94), o3(0xED,0x90,0x95),
+     o3(0xED,0x90,0x96), o3(0xED,0x90,0x97),
+     o3(0xED,0x90,0x98), o3(0xED,0x90,0x99),
+     o3(0xED,0x90,0x9A), o3(0xED,0x90,0x9B),
+     o3(0xED,0x90,0x9C), o3(0xED,0x90,0x9E),
+     o3(0xED,0x90,0x9F), o3(0xED,0x90,0xA0),
+     o3(0xED,0x90,0xA1), o3(0xED,0x90,0xA2),
+     o3(0xED,0x90,0xA3), o3(0xED,0x90,0xA4),
+     o3(0xED,0x90,0xA5), o3(0xED,0x90,0xA6),
+     o3(0xED,0x90,0xA7), o3(0xED,0x90,0xA8),
+     o3(0xED,0x90,0xA9), o3(0xED,0x90,0xAA),
+     o3(0xED,0x90,0xAB), o3(0xED,0x90,0xAC),
+     o3(0xED,0x90,0xAD), o3(0xED,0x90,0xAE),
+     o3(0xED,0x90,0xAF), o3(0xED,0x90,0xB0),
+     o3(0xED,0x90,0xB1), o3(0xED,0x90,0xB2),
+     o3(0xED,0x90,0xB3), o3(0xED,0x90,0xB4),
+     o3(0xED,0x90,0xB5), o3(0xED,0x90,0xB6),
+     o3(0xED,0x90,0xB7), o3(0xEC,0x88,0xAF),
+     o3(0xEC,0x88,0xB1), o3(0xEC,0x88,0xB2),
+     o3(0xEC,0x88,0xB4), o3(0xEC,0x89,0x88),
+     o3(0xEC,0x89,0x90), o3(0xEC,0x89,0x91),
+     o3(0xEC,0x89,0x94), o3(0xEC,0x89,0x98),
+     o3(0xEC,0x89,0xA0), o3(0xEC,0x89,0xA5),
+     o3(0xEC,0x89,0xAC), o3(0xEC,0x89,0xAD),
+     o3(0xEC,0x89,0xB0), o3(0xEC,0x89,0xB4),
+     o3(0xEC,0x89,0xBC), o3(0xEC,0x89,0xBD),
+     o3(0xEC,0x89,0xBF), o3(0xEC,0x8A,0x81),
+     o3(0xEC,0x8A,0x88), o3(0xEC,0x8A,0x89),
+     o3(0xEC,0x8A,0x90), o3(0xEC,0x8A,0x98),
+     o3(0xEC,0x8A,0x9B), o3(0xEC,0x8A,0x9D),
+     o3(0xEC,0x8A,0xA4), o3(0xEC,0x8A,0xA5),
+     o3(0xEC,0x8A,0xA8), o3(0xEC,0x8A,0xAC),
+     o3(0xEC,0x8A,0xAD), o3(0xEC,0x8A,0xB4),
+     o3(0xEC,0x8A,0xB5), o3(0xEC,0x8A,0xB7),
+     o3(0xEC,0x8A,0xB9), o3(0xEC,0x8B,0x9C),
+     o3(0xEC,0x8B,0x9D), o3(0xEC,0x8B,0xA0),
+     o3(0xEC,0x8B,0xA3), o3(0xEC,0x8B,0xA4),
+     o3(0xEC,0x8B,0xAB), o3(0xEC,0x8B,0xAC),
+     o3(0xEC,0x8B,0xAD), o3(0xEC,0x8B,0xAF),
+     o3(0xEC,0x8B,0xB1), o3(0xEC,0x8B,0xB6),
+     o3(0xEC,0x8B,0xB8), o3(0xEC,0x8B,0xB9),
+     o3(0xEC,0x8B,0xBB), o3(0xEC,0x8B,0xBC),
+     o3(0xEC,0x8C,0x80), o3(0xEC,0x8C,0x88),
+     o3(0xEC,0x8C,0x89), o3(0xEC,0x8C,0x8C),
+     o3(0xEC,0x8C,0x8D), o3(0xEC,0x8C,0x93),
+     o3(0xEC,0x8C,0x94), o3(0xEC,0x8C,0x95),
+     o3(0xEC,0x8C,0x98), o3(0xEC,0x8C,0x9C),
+     o3(0xEC,0x8C,0xA4), o3(0xEC,0x8C,0xA5),
+     o3(0xEC,0x8C,0xA8), o3(0xEC,0x8C,0xA9),
+     o3(0xEC,0x8D,0x85), o3(0xEC,0x8D,0xA8),
+     o3(0xEC,0x8D,0xA9), o3(0xEC,0x8D,0xAC),
+     o3(0xEC,0x8D,0xB0), o3(0xEC,0x8D,0xB2),
+     o3(0xEC,0x8D,0xB8), o3(0xEC,0x8D,0xB9),
+     o3(0xEC,0x8D,0xBC), o3(0xEC,0x8D,0xBD),
+     o3(0xEC,0x8E,0x84), o3(0xEC,0x8E,0x88),
+     o3(0xEC,0x8E,0x8C), o3(0xEC,0x8F,0x80),
+     o3(0xEC,0x8F,0x98), o3(0xEC,0x8F,0x99),
+     o3(0xEC,0x8F,0x9C), o3(0xEC,0x8F,0x9F),
+     o3(0xEC,0x8F,0xA0), o3(0xEC,0x8F,0xA2),
+     o3(0xEC,0x8F,0xA8), o3(0xEC,0x8F,0xA9),
+     o3(0xEC,0x8F,0xAD), o3(0xEC,0x8F,0xB4),
+     o3(0xEC,0x8F,0xB5), o3(0xEC,0x8F,0xB8),
+     o3(0xEC,0x90,0x88), o3(0xEC,0x90,0x90),
+     o3(0xEC,0x90,0xA4), o3(0xEC,0x90,0xAC),
+     o3(0xEC,0x90,0xB0),
+
+#define from_CP949_BD WORDINDEX2INFO(42228)
+    from_CP949_81_offsets,
+    from_CP949_BD_infos,
+
+#define from_CP949_BE_infos WORDINDEX2INFO(42230)
+                INVALID, o3(0xED,0x90,0xB8),
+     o3(0xED,0x90,0xB9), o3(0xED,0x90,0xBA),
+     o3(0xED,0x90,0xBB), o3(0xED,0x90,0xBC),
+     o3(0xED,0x90,0xBD), o3(0xED,0x90,0xBE),
+     o3(0xED,0x90,0xBF), o3(0xED,0x91,0x81),
+     o3(0xED,0x91,0x82), o3(0xED,0x91,0x83),
+     o3(0xED,0x91,0x85), o3(0xED,0x91,0x86),
+     o3(0xED,0x91,0x87), o3(0xED,0x91,0x88),
+     o3(0xED,0x91,0x89), o3(0xED,0x91,0x8A),
+     o3(0xED,0x91,0x8B), o3(0xED,0x91,0x8C),
+     o3(0xED,0x91,0x8D), o3(0xED,0x91,0x8E),
+     o3(0xED,0x91,0x8F), o3(0xED,0x91,0x90),
+     o3(0xED,0x91,0x91), o3(0xED,0x91,0x92),
+     o3(0xED,0x91,0x93), o3(0xED,0x91,0x94),
+     o3(0xED,0x91,0x95), o3(0xED,0x91,0x96),
+     o3(0xED,0x91,0x97), o3(0xED,0x91,0x98),
+     o3(0xED,0x91,0x99), o3(0xED,0x91,0x9A),
+     o3(0xED,0x91,0x9B), o3(0xED,0x91,0x9D),
+     o3(0xED,0x91,0x9E), o3(0xED,0x91,0x9F),
+     o3(0xED,0x91,0xA1), o3(0xED,0x91,0xA2),
+     o3(0xED,0x91,0xA3), o3(0xED,0x91,0xA5),
+     o3(0xED,0x91,0xA6), o3(0xED,0x91,0xA7),
+     o3(0xED,0x91,0xA8), o3(0xED,0x91,0xA9),
+     o3(0xED,0x91,0xAA), o3(0xED,0x91,0xAB),
+     o3(0xED,0x91,0xAC), o3(0xED,0x91,0xAE),
+     o3(0xED,0x91,0xB0), o3(0xED,0x91,0xB1),
+     o3(0xED,0x91,0xB2), o3(0xED,0x91,0xB3),
+     o3(0xED,0x91,0xB4), o3(0xED,0x91,0xB5),
+     o3(0xED,0x91,0xB6), o3(0xED,0x91,0xB7),
+     o3(0xED,0x91,0xBA), o3(0xED,0x91,0xBB),
+     o3(0xED,0x91,0xBD), o3(0xED,0x91,0xBE),
+     o3(0xED,0x92,0x81), o3(0xED,0x92,0x83),
+     o3(0xED,0x92,0x84), o3(0xED,0x92,0x85),
+     o3(0xED,0x92,0x86), o3(0xED,0x92,0x87),
+     o3(0xED,0x92,0x8A), o3(0xED,0x92,0x8C),
+     o3(0xED,0x92,0x8E), o3(0xED,0x92,0x8F),
+     o3(0xED,0x92,0x90), o3(0xED,0x92,0x91),
+     o3(0xED,0x92,0x92), o3(0xED,0x92,0x93),
+     o3(0xED,0x92,0x95), o3(0xED,0x92,0x96),
+     o3(0xED,0x92,0x97), o3(0xED,0x92,0x98),
+     o3(0xED,0x92,0x99), o3(0xED,0x92,0x9A),
+     o3(0xED,0x92,0x9B), o3(0xED,0x92,0x9C),
+     o3(0xED,0x92,0x9D), o3(0xEC,0x90,0xB4),
+     o3(0xEC,0x90,0xBC), o3(0xEC,0x90,0xBD),
+     o3(0xEC,0x91,0x88), o3(0xEC,0x91,0xA4),
+     o3(0xEC,0x91,0xA5), o3(0xEC,0x91,0xA8),
+     o3(0xEC,0x91,0xAC), o3(0xEC,0x91,0xB4),
+     o3(0xEC,0x91,0xB5), o3(0xEC,0x91,0xB9),
+     o3(0xEC,0x92,0x80), o3(0xEC,0x92,0x94),
+     o3(0xEC,0x92,0x9C), o3(0xEC,0x92,0xB8),
+     o3(0xEC,0x92,0xBC), o3(0xEC,0x93,0xA9),
+     o3(0xEC,0x93,0xB0), o3(0xEC,0x93,0xB1),
+     o3(0xEC,0x93,0xB4), o3(0xEC,0x93,0xB8),
+     o3(0xEC,0x93,0xBA), o3(0xEC,0x93,0xBF),
+     o3(0xEC,0x94,0x80), o3(0xEC,0x94,0x81),
+     o3(0xEC,0x94,0x8C), o3(0xEC,0x94,0x90),
+     o3(0xEC,0x94,0x94), o3(0xEC,0x94,0x9C),
+     o3(0xEC,0x94,0xA8), o3(0xEC,0x94,0xA9),
+     o3(0xEC,0x94,0xAC), o3(0xEC,0x94,0xB0),
+     o3(0xEC,0x94,0xB8), o3(0xEC,0x94,0xB9),
+     o3(0xEC,0x94,0xBB), o3(0xEC,0x94,0xBD),
+     o3(0xEC,0x95,0x84), o3(0xEC,0x95,0x85),
+     o3(0xEC,0x95,0x88), o3(0xEC,0x95,0x89),
+     o3(0xEC,0x95,0x8A), o3(0xEC,0x95,0x8C),
+     o3(0xEC,0x95,0x8D), o3(0xEC,0x95,0x8E),
+     o3(0xEC,0x95,0x93), o3(0xEC,0x95,0x94),
+     o3(0xEC,0x95,0x95), o3(0xEC,0x95,0x97),
+     o3(0xEC,0x95,0x98), o3(0xEC,0x95,0x99),
+     o3(0xEC,0x95,0x9D), o3(0xEC,0x95,0x9E),
+     o3(0xEC,0x95,0xA0), o3(0xEC,0x95,0xA1),
+     o3(0xEC,0x95,0xA4), o3(0xEC,0x95,0xA8),
+     o3(0xEC,0x95,0xB0), o3(0xEC,0x95,0xB1),
+     o3(0xEC,0x95,0xB3), o3(0xEC,0x95,0xB4),
+     o3(0xEC,0x95,0xB5), o3(0xEC,0x95,0xBC),
+     o3(0xEC,0x95,0xBD), o3(0xEC,0x96,0x80),
+     o3(0xEC,0x96,0x84), o3(0xEC,0x96,0x87),
+     o3(0xEC,0x96,0x8C), o3(0xEC,0x96,0x8D),
+     o3(0xEC,0x96,0x8F), o3(0xEC,0x96,0x91),
+     o3(0xEC,0x96,0x95), o3(0xEC,0x96,0x97),
+     o3(0xEC,0x96,0x98), o3(0xEC,0x96,0x9C),
+     o3(0xEC,0x96,0xA0), o3(0xEC,0x96,0xA9),
+     o3(0xEC,0x96,0xB4), o3(0xEC,0x96,0xB5),
+     o3(0xEC,0x96,0xB8), o3(0xEC,0x96,0xB9),
+     o3(0xEC,0x96,0xBB), o3(0xEC,0x96,0xBC),
+     o3(0xEC,0x96,0xBD), o3(0xEC,0x96,0xBE),
+     o3(0xEC,0x97,0x84), o3(0xEC,0x97,0x85),
+     o3(0xEC,0x97,0x86), o3(0xEC,0x97,0x87),
+     o3(0xEC,0x97,0x88), o3(0xEC,0x97,0x89),
+     o3(0xEC,0x97,0x8A), o3(0xEC,0x97,0x8C),
+     o3(0xEC,0x97,0x8E),
+
+#define from_CP949_BE WORDINDEX2INFO(42409)
+    from_CP949_81_offsets,
+    from_CP949_BE_infos,
+
+#define from_CP949_BF_infos WORDINDEX2INFO(42411)
+                INVALID, o3(0xED,0x92,0x9E),
+     o3(0xED,0x92,0x9F), o3(0xED,0x92,0xA0),
+     o3(0xED,0x92,0xA1), o3(0xED,0x92,0xA2),
+     o3(0xED,0x92,0xA3), o3(0xED,0x92,0xA4),
+     o3(0xED,0x92,0xA5), o3(0xED,0x92,0xA6),
+     o3(0xED,0x92,0xA7), o3(0xED,0x92,0xA8),
+     o3(0xED,0x92,0xAA), o3(0xED,0x92,0xAB),
+     o3(0xED,0x92,0xAC), o3(0xED,0x92,0xAD),
+     o3(0xED,0x92,0xAE), o3(0xED,0x92,0xAF),
+     o3(0xED,0x92,0xB0), o3(0xED,0x92,0xB1),
+     o3(0xED,0x92,0xB2), o3(0xED,0x92,0xB3),
+     o3(0xED,0x92,0xB4), o3(0xED,0x92,0xB5),
+     o3(0xED,0x92,0xB6), o3(0xED,0x92,0xB7),
+     o3(0xED,0x92,0xB8), o3(0xED,0x92,0xB9),
+     o3(0xED,0x92,0xBA), o3(0xED,0x92,0xBB),
+     o3(0xED,0x92,0xBC), o3(0xED,0x92,0xBD),
+     o3(0xED,0x92,0xBE), o3(0xED,0x92,0xBF),
+     o3(0xED,0x93,0x80), o3(0xED,0x93,0x81),
+     o3(0xED,0x93,0x82), o3(0xED,0x93,0x83),
+     o3(0xED,0x93,0x84), o3(0xED,0x93,0x85),
+     o3(0xED,0x93,0x86), o3(0xED,0x93,0x87),
+     o3(0xED,0x93,0x88), o3(0xED,0x93,0x89),
+     o3(0xED,0x93,0x8A), o3(0xED,0x93,0x8B),
+     o3(0xED,0x93,0x8D), o3(0xED,0x93,0x8E),
+     o3(0xED,0x93,0x8F), o3(0xED,0x93,0x91),
+     o3(0xED,0x93,0x92), o3(0xED,0x93,0x93),
+     o3(0xED,0x93,0x95), o3(0xED,0x93,0x96),
+     o3(0xED,0x93,0x97), o3(0xED,0x93,0x98),
+     o3(0xED,0x93,0x99), o3(0xED,0x93,0x9A),
+     o3(0xED,0x93,0x9B), o3(0xED,0x93,0x9D),
+     o3(0xED,0x93,0x9E), o3(0xED,0x93,0xA0),
+     o3(0xED,0x93,0xA1), o3(0xED,0x93,0xA2),
+     o3(0xED,0x93,0xA3), o3(0xED,0x93,0xA4),
+     o3(0xED,0x93,0xA5), o3(0xED,0x93,0xA6),
+     o3(0xED,0x93,0xA7), o3(0xED,0x93,0xA9),
+     o3(0xED,0x93,0xAA), o3(0xED,0x93,0xAB),
+     o3(0xED,0x93,0xAD), o3(0xED,0x93,0xAE),
+     o3(0xED,0x93,0xAF), o3(0xED,0x93,0xB1),
+     o3(0xED,0x93,0xB2), o3(0xED,0x93,0xB3),
+     o3(0xED,0x93,0xB4), o3(0xED,0x93,0xB5),
+     o3(0xED,0x93,0xB6), o3(0xED,0x93,0xB7),
+     o3(0xED,0x93,0xB9), o3(0xED,0x93,0xBA),
+     o3(0xED,0x93,0xBC), o3(0xEC,0x97,0x90),
+     o3(0xEC,0x97,0x91), o3(0xEC,0x97,0x94),
+     o3(0xEC,0x97,0x98), o3(0xEC,0x97,0xA0),
+     o3(0xEC,0x97,0xA1), o3(0xEC,0x97,0xA3),
+     o3(0xEC,0x97,0xA5), o3(0xEC,0x97,0xAC),
+     o3(0xEC,0x97,0xAD), o3(0xEC,0x97,0xAE),
+     o3(0xEC,0x97,0xB0), o3(0xEC,0x97,0xB4),
+     o3(0xEC,0x97,0xB6), o3(0xEC,0x97,0xB7),
+     o3(0xEC,0x97,0xBC), o3(0xEC,0x97,0xBD),
+     o3(0xEC,0x97,0xBE), o3(0xEC,0x97,0xBF),
+     o3(0xEC,0x98,0x80), o3(0xEC,0x98,0x81),
+     o3(0xEC,0x98,0x85), o3(0xEC,0x98,0x86),
+     o3(0xEC,0x98,0x87), o3(0xEC,0x98,0x88),
+     o3(0xEC,0x98,0x8C), o3(0xEC,0x98,0x90),
+     o3(0xEC,0x98,0x98), o3(0xEC,0x98,0x99),
+     o3(0xEC,0x98,0x9B), o3(0xEC,0x98,0x9C),
+     o3(0xEC,0x98,0xA4), o3(0xEC,0x98,0xA5),
+     o3(0xEC,0x98,0xA8), o3(0xEC,0x98,0xAC),
+     o3(0xEC,0x98,0xAD), o3(0xEC,0x98,0xAE),
+     o3(0xEC,0x98,0xB0), o3(0xEC,0x98,0xB3),
+     o3(0xEC,0x98,0xB4), o3(0xEC,0x98,0xB5),
+     o3(0xEC,0x98,0xB7), o3(0xEC,0x98,0xB9),
+     o3(0xEC,0x98,0xBB), o3(0xEC,0x99,0x80),
+     o3(0xEC,0x99,0x81), o3(0xEC,0x99,0x84),
+     o3(0xEC,0x99,0x88), o3(0xEC,0x99,0x90),
+     o3(0xEC,0x99,0x91), o3(0xEC,0x99,0x93),
+     o3(0xEC,0x99,0x94), o3(0xEC,0x99,0x95),
+     o3(0xEC,0x99,0x9C), o3(0xEC,0x99,0x9D),
+     o3(0xEC,0x99,0xA0), o3(0xEC,0x99,0xAC),
+     o3(0xEC,0x99,0xAF), o3(0xEC,0x99,0xB1),
+     o3(0xEC,0x99,0xB8), o3(0xEC,0x99,0xB9),
+     o3(0xEC,0x99,0xBC), o3(0xEC,0x9A,0x80),
+     o3(0xEC,0x9A,0x88), o3(0xEC,0x9A,0x89),
+     o3(0xEC,0x9A,0x8B), o3(0xEC,0x9A,0x8D),
+     o3(0xEC,0x9A,0x94), o3(0xEC,0x9A,0x95),
+     o3(0xEC,0x9A,0x98), o3(0xEC,0x9A,0x9C),
+     o3(0xEC,0x9A,0xA4), o3(0xEC,0x9A,0xA5),
+     o3(0xEC,0x9A,0xA7), o3(0xEC,0x9A,0xA9),
+     o3(0xEC,0x9A,0xB0), o3(0xEC,0x9A,0xB1),
+     o3(0xEC,0x9A,0xB4), o3(0xEC,0x9A,0xB8),
+     o3(0xEC,0x9A,0xB9), o3(0xEC,0x9A,0xBA),
+     o3(0xEC,0x9B,0x80), o3(0xEC,0x9B,0x81),
+     o3(0xEC,0x9B,0x83), o3(0xEC,0x9B,0x85),
+     o3(0xEC,0x9B,0x8C), o3(0xEC,0x9B,0x8D),
+     o3(0xEC,0x9B,0x90), o3(0xEC,0x9B,0x94),
+     o3(0xEC,0x9B,0x9C), o3(0xEC,0x9B,0x9D),
+     o3(0xEC,0x9B,0xA0), o3(0xEC,0x9B,0xA1),
+     o3(0xEC,0x9B,0xA8),
+
+#define from_CP949_BF WORDINDEX2INFO(42590)
+    from_CP949_81_offsets,
+    from_CP949_BF_infos,
+
+#define from_CP949_C0_infos WORDINDEX2INFO(42592)
+                INVALID, o3(0xED,0x93,0xBE),
+     o3(0xED,0x93,0xBF), o3(0xED,0x94,0x80),
+     o3(0xED,0x94,0x81), o3(0xED,0x94,0x82),
+     o3(0xED,0x94,0x83), o3(0xED,0x94,0x85),
+     o3(0xED,0x94,0x86), o3(0xED,0x94,0x87),
+     o3(0xED,0x94,0x89), o3(0xED,0x94,0x8A),
+     o3(0xED,0x94,0x8B), o3(0xED,0x94,0x8D),
+     o3(0xED,0x94,0x8E), o3(0xED,0x94,0x8F),
+     o3(0xED,0x94,0x90), o3(0xED,0x94,0x91),
+     o3(0xED,0x94,0x92), o3(0xED,0x94,0x93),
+     o3(0xED,0x94,0x96), o3(0xED,0x94,0x98),
+     o3(0xED,0x94,0x99), o3(0xED,0x94,0x9A),
+     o3(0xED,0x94,0x9B), o3(0xED,0x94,0x9C),
+     o3(0xED,0x94,0x9D), o3(0xED,0x94,0x9E),
+     o3(0xED,0x94,0x9F), o3(0xED,0x94,0xA0),
+     o3(0xED,0x94,0xA1), o3(0xED,0x94,0xA2),
+     o3(0xED,0x94,0xA3), o3(0xED,0x94,0xA4),
+     o3(0xED,0x94,0xA5), o3(0xED,0x94,0xA6),
+     o3(0xED,0x94,0xA7), o3(0xED,0x94,0xA8),
+     o3(0xED,0x94,0xA9), o3(0xED,0x94,0xAA),
+     o3(0xED,0x94,0xAB), o3(0xED,0x94,0xAC),
+     o3(0xED,0x94,0xAD), o3(0xED,0x94,0xAE),
+     o3(0xED,0x94,0xAF), o3(0xED,0x94,0xB0),
+     o3(0xED,0x94,0xB1), o3(0xED,0x94,0xB2),
+     o3(0xED,0x94,0xB3), o3(0xED,0x94,0xB4),
+     o3(0xED,0x94,0xB5), o3(0xED,0x94,0xB6),
+     o3(0xED,0x94,0xB7), o3(0xED,0x94,0xB8),
+     o3(0xED,0x94,0xB9), o3(0xED,0x94,0xBA),
+     o3(0xED,0x94,0xBB), o3(0xED,0x94,0xBE),
+     o3(0xED,0x94,0xBF), o3(0xED,0x95,0x81),
+     o3(0xED,0x95,0x82), o3(0xED,0x95,0x83),
+     o3(0xED,0x95,0x85), o3(0xED,0x95,0x86),
+     o3(0xED,0x95,0x87), o3(0xED,0x95,0x88),
+     o3(0xED,0x95,0x89), o3(0xED,0x95,0x8A),
+     o3(0xED,0x95,0x8B), o3(0xED,0x95,0x8E),
+     o3(0xED,0x95,0x90), o3(0xED,0x95,0x92),
+     o3(0xED,0x95,0x93), o3(0xED,0x95,0x94),
+     o3(0xED,0x95,0x95), o3(0xED,0x95,0x96),
+     o3(0xED,0x95,0x97), o3(0xED,0x95,0x9A),
+     o3(0xED,0x95,0x9B), o3(0xED,0x95,0x9D),
+     o3(0xED,0x95,0x9E), o3(0xED,0x95,0x9F),
+     o3(0xED,0x95,0xA1), o3(0xED,0x95,0xA2),
+     o3(0xED,0x95,0xA3), o3(0xEC,0x9B,0xA9),
+     o3(0xEC,0x9B,0xAC), o3(0xEC,0x9B,0xB0),
+     o3(0xEC,0x9B,0xB8), o3(0xEC,0x9B,0xB9),
+     o3(0xEC,0x9B,0xBD), o3(0xEC,0x9C,0x84),
+     o3(0xEC,0x9C,0x85), o3(0xEC,0x9C,0x88),
+     o3(0xEC,0x9C,0x8C), o3(0xEC,0x9C,0x94),
+     o3(0xEC,0x9C,0x95), o3(0xEC,0x9C,0x97),
+     o3(0xEC,0x9C,0x99), o3(0xEC,0x9C,0xA0),
+     o3(0xEC,0x9C,0xA1), o3(0xEC,0x9C,0xA4),
+     o3(0xEC,0x9C,0xA8), o3(0xEC,0x9C,0xB0),
+     o3(0xEC,0x9C,0xB1), o3(0xEC,0x9C,0xB3),
+     o3(0xEC,0x9C,0xB5), o3(0xEC,0x9C,0xB7),
+     o3(0xEC,0x9C,0xBC), o3(0xEC,0x9C,0xBD),
+     o3(0xEC,0x9D,0x80), o3(0xEC,0x9D,0x84),
+     o3(0xEC,0x9D,0x8A), o3(0xEC,0x9D,0x8C),
+     o3(0xEC,0x9D,0x8D), o3(0xEC,0x9D,0x8F),
+     o3(0xEC,0x9D,0x91), o3(0xEC,0x9D,0x92),
+     o3(0xEC,0x9D,0x93), o3(0xEC,0x9D,0x94),
+     o3(0xEC,0x9D,0x95), o3(0xEC,0x9D,0x96),
+     o3(0xEC,0x9D,0x97), o3(0xEC,0x9D,0x98),
+     o3(0xEC,0x9D,0x9C), o3(0xEC,0x9D,0xA0),
+     o3(0xEC,0x9D,0xA8), o3(0xEC,0x9D,0xAB),
+     o3(0xEC,0x9D,0xB4), o3(0xEC,0x9D,0xB5),
+     o3(0xEC,0x9D,0xB8), o3(0xEC,0x9D,0xBC),
+     o3(0xEC,0x9D,0xBD), o3(0xEC,0x9D,0xBE),
+     o3(0xEC,0x9E,0x83), o3(0xEC,0x9E,0x84),
+     o3(0xEC,0x9E,0x85), o3(0xEC,0x9E,0x87),
+     o3(0xEC,0x9E,0x88), o3(0xEC,0x9E,0x89),
+     o3(0xEC,0x9E,0x8A), o3(0xEC,0x9E,0x8E),
+     o3(0xEC,0x9E,0x90), o3(0xEC,0x9E,0x91),
+     o3(0xEC,0x9E,0x94), o3(0xEC,0x9E,0x96),
+     o3(0xEC,0x9E,0x97), o3(0xEC,0x9E,0x98),
+     o3(0xEC,0x9E,0x9A), o3(0xEC,0x9E,0xA0),
+     o3(0xEC,0x9E,0xA1), o3(0xEC,0x9E,0xA3),
+     o3(0xEC,0x9E,0xA4), o3(0xEC,0x9E,0xA5),
+     o3(0xEC,0x9E,0xA6), o3(0xEC,0x9E,0xAC),
+     o3(0xEC,0x9E,0xAD), o3(0xEC,0x9E,0xB0),
+     o3(0xEC,0x9E,0xB4), o3(0xEC,0x9E,0xBC),
+     o3(0xEC,0x9E,0xBD), o3(0xEC,0x9E,0xBF),
+     o3(0xEC,0x9F,0x80), o3(0xEC,0x9F,0x81),
+     o3(0xEC,0x9F,0x88), o3(0xEC,0x9F,0x89),
+     o3(0xEC,0x9F,0x8C), o3(0xEC,0x9F,0x8E),
+     o3(0xEC,0x9F,0x90), o3(0xEC,0x9F,0x98),
+     o3(0xEC,0x9F,0x9D), o3(0xEC,0x9F,0xA4),
+     o3(0xEC,0x9F,0xA8), o3(0xEC,0x9F,0xAC),
+     o3(0xEC,0xA0,0x80), o3(0xEC,0xA0,0x81),
+     o3(0xEC,0xA0,0x84), o3(0xEC,0xA0,0x88),
+     o3(0xEC,0xA0,0x8A),
+
+#define from_CP949_C0 WORDINDEX2INFO(42771)
+    from_CP949_81_offsets,
+    from_CP949_C0_infos,
+
+#define from_CP949_C1_infos WORDINDEX2INFO(42773)
+                INVALID, o3(0xED,0x95,0xA4),
+     o3(0xED,0x95,0xA6), o3(0xED,0x95,0xA7),
+     o3(0xED,0x95,0xAA), o3(0xED,0x95,0xAC),
+     o3(0xED,0x95,0xAE), o3(0xED,0x95,0xAF),
+     o3(0xED,0x95,0xB0), o3(0xED,0x95,0xB1),
+     o3(0xED,0x95,0xB2), o3(0xED,0x95,0xB3),
+     o3(0xED,0x95,0xB6), o3(0xED,0x95,0xB7),
+     o3(0xED,0x95,0xB9), o3(0xED,0x95,0xBA),
+     o3(0xED,0x95,0xBB), o3(0xED,0x95,0xBD),
+     o3(0xED,0x95,0xBE), o3(0xED,0x95,0xBF),
+     o3(0xED,0x96,0x80), o3(0xED,0x96,0x81),
+     o3(0xED,0x96,0x82), o3(0xED,0x96,0x83),
+     o3(0xED,0x96,0x86), o3(0xED,0x96,0x8A),
+     o3(0xED,0x96,0x8B), o3(0xED,0x96,0x8C),
+     o3(0xED,0x96,0x8D), o3(0xED,0x96,0x8E),
+     o3(0xED,0x96,0x8F), o3(0xED,0x96,0x91),
+     o3(0xED,0x96,0x92), o3(0xED,0x96,0x93),
+     o3(0xED,0x96,0x94), o3(0xED,0x96,0x95),
+     o3(0xED,0x96,0x96), o3(0xED,0x96,0x97),
+     o3(0xED,0x96,0x98), o3(0xED,0x96,0x99),
+     o3(0xED,0x96,0x9A), o3(0xED,0x96,0x9B),
+     o3(0xED,0x96,0x9C), o3(0xED,0x96,0x9D),
+     o3(0xED,0x96,0x9E), o3(0xED,0x96,0x9F),
+     o3(0xED,0x96,0xA0), o3(0xED,0x96,0xA1),
+     o3(0xED,0x96,0xA2), o3(0xED,0x96,0xA3),
+     o3(0xED,0x96,0xA4), o3(0xED,0x96,0xA6),
+     o3(0xED,0x96,0xA7), o3(0xED,0x96,0xA8),
+     o3(0xED,0x96,0xA9), o3(0xED,0x96,0xAA),
+     o3(0xED,0x96,0xAB), o3(0xED,0x96,0xAC),
+     o3(0xED,0x96,0xAD), o3(0xED,0x96,0xAE),
+     o3(0xED,0x96,0xAF), o3(0xED,0x96,0xB0),
+     o3(0xED,0x96,0xB1), o3(0xED,0x96,0xB2),
+     o3(0xED,0x96,0xB3), o3(0xED,0x96,0xB4),
+     o3(0xED,0x96,0xB5), o3(0xED,0x96,0xB6),
+     o3(0xED,0x96,0xB7), o3(0xED,0x96,0xB8),
+     o3(0xED,0x96,0xB9), o3(0xED,0x96,0xBA),
+     o3(0xED,0x96,0xBB), o3(0xED,0x96,0xBC),
+     o3(0xED,0x96,0xBD), o3(0xED,0x96,0xBE),
+     o3(0xED,0x96,0xBF), o3(0xED,0x97,0x80),
+     o3(0xED,0x97,0x81), o3(0xED,0x97,0x82),
+     o3(0xED,0x97,0x83), o3(0xED,0x97,0x84),
+     o3(0xED,0x97,0x85), o3(0xED,0x97,0x86),
+     o3(0xED,0x97,0x87), o3(0xEC,0xA0,0x90),
+     o3(0xEC,0xA0,0x91), o3(0xEC,0xA0,0x93),
+     o3(0xEC,0xA0,0x95), o3(0xEC,0xA0,0x96),
+     o3(0xEC,0xA0,0x9C), o3(0xEC,0xA0,0x9D),
+     o3(0xEC,0xA0,0xA0), o3(0xEC,0xA0,0xA4),
+     o3(0xEC,0xA0,0xAC), o3(0xEC,0xA0,0xAD),
+     o3(0xEC,0xA0,0xAF), o3(0xEC,0xA0,0xB1),
+     o3(0xEC,0xA0,0xB8), o3(0xEC,0xA0,0xBC),
+     o3(0xEC,0xA1,0x80), o3(0xEC,0xA1,0x88),
+     o3(0xEC,0xA1,0x89), o3(0xEC,0xA1,0x8C),
+     o3(0xEC,0xA1,0x8D), o3(0xEC,0xA1,0x94),
+     o3(0xEC,0xA1,0xB0), o3(0xEC,0xA1,0xB1),
+     o3(0xEC,0xA1,0xB4), o3(0xEC,0xA1,0xB8),
+     o3(0xEC,0xA1,0xBA), o3(0xEC,0xA2,0x80),
+     o3(0xEC,0xA2,0x81), o3(0xEC,0xA2,0x83),
+     o3(0xEC,0xA2,0x85), o3(0xEC,0xA2,0x86),
+     o3(0xEC,0xA2,0x87), o3(0xEC,0xA2,0x8B),
+     o3(0xEC,0xA2,0x8C), o3(0xEC,0xA2,0x8D),
+     o3(0xEC,0xA2,0x94), o3(0xEC,0xA2,0x9D),
+     o3(0xEC,0xA2,0x9F), o3(0xEC,0xA2,0xA1),
+     o3(0xEC,0xA2,0xA8), o3(0xEC,0xA2,0xBC),
+     o3(0xEC,0xA2,0xBD), o3(0xEC,0xA3,0x84),
+     o3(0xEC,0xA3,0x88), o3(0xEC,0xA3,0x8C),
+     o3(0xEC,0xA3,0x94), o3(0xEC,0xA3,0x95),
+     o3(0xEC,0xA3,0x97), o3(0xEC,0xA3,0x99),
+     o3(0xEC,0xA3,0xA0), o3(0xEC,0xA3,0xA1),
+     o3(0xEC,0xA3,0xA4), o3(0xEC,0xA3,0xB5),
+     o3(0xEC,0xA3,0xBC), o3(0xEC,0xA3,0xBD),
+     o3(0xEC,0xA4,0x80), o3(0xEC,0xA4,0x84),
+     o3(0xEC,0xA4,0x85), o3(0xEC,0xA4,0x86),
+     o3(0xEC,0xA4,0x8C), o3(0xEC,0xA4,0x8D),
+     o3(0xEC,0xA4,0x8F), o3(0xEC,0xA4,0x91),
+     o3(0xEC,0xA4,0x98), o3(0xEC,0xA4,0xAC),
+     o3(0xEC,0xA4,0xB4), o3(0xEC,0xA5,0x90),
+     o3(0xEC,0xA5,0x91), o3(0xEC,0xA5,0x94),
+     o3(0xEC,0xA5,0x98), o3(0xEC,0xA5,0xA0),
+     o3(0xEC,0xA5,0xA1), o3(0xEC,0xA5,0xA3),
+     o3(0xEC,0xA5,0xAC), o3(0xEC,0xA5,0xB0),
+     o3(0xEC,0xA5,0xB4), o3(0xEC,0xA5,0xBC),
+     o3(0xEC,0xA6,0x88), o3(0xEC,0xA6,0x89),
+     o3(0xEC,0xA6,0x8C), o3(0xEC,0xA6,0x90),
+     o3(0xEC,0xA6,0x98), o3(0xEC,0xA6,0x99),
+     o3(0xEC,0xA6,0x9B), o3(0xEC,0xA6,0x9D),
+     o3(0xEC,0xA7,0x80), o3(0xEC,0xA7,0x81),
+     o3(0xEC,0xA7,0x84), o3(0xEC,0xA7,0x87),
+     o3(0xEC,0xA7,0x88), o3(0xEC,0xA7,0x8A),
+     o3(0xEC,0xA7,0x90), o3(0xEC,0xA7,0x91),
+     o3(0xEC,0xA7,0x93),
+
+#define from_CP949_C1 WORDINDEX2INFO(42952)
+    from_CP949_81_offsets,
+    from_CP949_C1_infos,
+
+#define from_CP949_C2_infos WORDINDEX2INFO(42954)
+                INVALID, o3(0xED,0x97,0x8A),
+     o3(0xED,0x97,0x8B), o3(0xED,0x97,0x8D),
+     o3(0xED,0x97,0x8E), o3(0xED,0x97,0x8F),
+     o3(0xED,0x97,0x91), o3(0xED,0x97,0x93),
+     o3(0xED,0x97,0x94), o3(0xED,0x97,0x95),
+     o3(0xED,0x97,0x96), o3(0xED,0x97,0x97),
+     o3(0xED,0x97,0x9A), o3(0xED,0x97,0x9C),
+     o3(0xED,0x97,0x9E), o3(0xED,0x97,0x9F),
+     o3(0xED,0x97,0xA0), o3(0xED,0x97,0xA1),
+     o3(0xED,0x97,0xA2), o3(0xED,0x97,0xA3),
+     o3(0xED,0x97,0xA6), o3(0xED,0x97,0xA7),
+     o3(0xED,0x97,0xA9), o3(0xED,0x97,0xAA),
+     o3(0xED,0x97,0xAB), o3(0xED,0x97,0xAD),
+     o3(0xED,0x97,0xAE), o3(0xED,0x97,0xAF),
+     o3(0xED,0x97,0xB0), o3(0xED,0x97,0xB1),
+     o3(0xED,0x97,0xB2), o3(0xED,0x97,0xB3),
+     o3(0xED,0x97,0xB6), o3(0xED,0x97,0xB8),
+     o3(0xED,0x97,0xBA), o3(0xED,0x97,0xBB),
+     o3(0xED,0x97,0xBC), o3(0xED,0x97,0xBD),
+     o3(0xED,0x97,0xBE), o3(0xED,0x97,0xBF),
+     o3(0xED,0x98,0x82), o3(0xED,0x98,0x83),
+     o3(0xED,0x98,0x85), o3(0xED,0x98,0x86),
+     o3(0xED,0x98,0x87), o3(0xED,0x98,0x89),
+     o3(0xED,0x98,0x8A), o3(0xED,0x98,0x8B),
+     o3(0xED,0x98,0x8C), o3(0xED,0x98,0x8D),
+     o3(0xED,0x98,0x8E), o3(0xED,0x98,0x8F),
+     o3(0xED,0x98,0x92), o3(0xED,0x98,0x96),
+     o3(0xED,0x98,0x97), o3(0xED,0x98,0x98),
+     o3(0xED,0x98,0x99), o3(0xED,0x98,0x9A),
+     o3(0xED,0x98,0x9B), o3(0xED,0x98,0x9D),
+     o3(0xED,0x98,0x9E), o3(0xED,0x98,0x9F),
+     o3(0xED,0x98,0xA1), o3(0xED,0x98,0xA2),
+     o3(0xED,0x98,0xA3), o3(0xED,0x98,0xA5),
+     o3(0xED,0x98,0xA6), o3(0xED,0x98,0xA7),
+     o3(0xED,0x98,0xA8), o3(0xED,0x98,0xA9),
+     o3(0xED,0x98,0xAA), o3(0xED,0x98,0xAB),
+     o3(0xED,0x98,0xAC), o3(0xED,0x98,0xAE),
+     o3(0xED,0x98,0xAF), o3(0xED,0x98,0xB0),
+     o3(0xED,0x98,0xB1), o3(0xED,0x98,0xB2),
+     o3(0xED,0x98,0xB3), o3(0xED,0x98,0xB4),
+     o3(0xED,0x98,0xB5), o3(0xED,0x98,0xB6),
+     o3(0xED,0x98,0xB7), o3(0xED,0x98,0xBA),
+     o3(0xED,0x98,0xBB), o3(0xEC,0xA7,0x95),
+     o3(0xEC,0xA7,0x96), o3(0xEC,0xA7,0x99),
+     o3(0xEC,0xA7,0x9A), o3(0xEC,0xA7,0x9C),
+     o3(0xEC,0xA7,0x9D), o3(0xEC,0xA7,0xA0),
+     o3(0xEC,0xA7,0xA2), o3(0xEC,0xA7,0xA4),
+     o3(0xEC,0xA7,0xA7), o3(0xEC,0xA7,0xAC),
+     o3(0xEC,0xA7,0xAD), o3(0xEC,0xA7,0xAF),
+     o3(0xEC,0xA7,0xB0), o3(0xEC,0xA7,0xB1),
+     o3(0xEC,0xA7,0xB8), o3(0xEC,0xA7,0xB9),
+     o3(0xEC,0xA7,0xBC), o3(0xEC,0xA8,0x80),
+     o3(0xEC,0xA8,0x88), o3(0xEC,0xA8,0x89),
+     o3(0xEC,0xA8,0x8B), o3(0xEC,0xA8,0x8C),
+     o3(0xEC,0xA8,0x8D), o3(0xEC,0xA8,0x94),
+     o3(0xEC,0xA8,0x98), o3(0xEC,0xA8,0xA9),
+     o3(0xEC,0xA9,0x8C), o3(0xEC,0xA9,0x8D),
+     o3(0xEC,0xA9,0x90), o3(0xEC,0xA9,0x94),
+     o3(0xEC,0xA9,0x9C), o3(0xEC,0xA9,0x9D),
+     o3(0xEC,0xA9,0x9F), o3(0xEC,0xA9,0xA0),
+     o3(0xEC,0xA9,0xA1), o3(0xEC,0xA9,0xA8),
+     o3(0xEC,0xA9,0xBD), o3(0xEC,0xAA,0x84),
+     o3(0xEC,0xAA,0x98), o3(0xEC,0xAA,0xBC),
+     o3(0xEC,0xAA,0xBD), o3(0xEC,0xAB,0x80),
+     o3(0xEC,0xAB,0x84), o3(0xEC,0xAB,0x8C),
+     o3(0xEC,0xAB,0x8D), o3(0xEC,0xAB,0x8F),
+     o3(0xEC,0xAB,0x91), o3(0xEC,0xAB,0x93),
+     o3(0xEC,0xAB,0x98), o3(0xEC,0xAB,0x99),
+     o3(0xEC,0xAB,0xA0), o3(0xEC,0xAB,0xAC),
+     o3(0xEC,0xAB,0xB4), o3(0xEC,0xAC,0x88),
+     o3(0xEC,0xAC,0x90), o3(0xEC,0xAC,0x94),
+     o3(0xEC,0xAC,0x98), o3(0xEC,0xAC,0xA0),
+     o3(0xEC,0xAC,0xA1), o3(0xEC,0xAD,0x81),
+     o3(0xEC,0xAD,0x88), o3(0xEC,0xAD,0x89),
+     o3(0xEC,0xAD,0x8C), o3(0xEC,0xAD,0x90),
+     o3(0xEC,0xAD,0x98), o3(0xEC,0xAD,0x99),
+     o3(0xEC,0xAD,0x9D), o3(0xEC,0xAD,0xA4),
+     o3(0xEC,0xAD,0xB8), o3(0xEC,0xAD,0xB9),
+     o3(0xEC,0xAE,0x9C), o3(0xEC,0xAE,0xB8),
+     o3(0xEC,0xAF,0x94), o3(0xEC,0xAF,0xA4),
+     o3(0xEC,0xAF,0xA7), o3(0xEC,0xAF,0xA9),
+     o3(0xEC,0xB0,0x8C), o3(0xEC,0xB0,0x8D),
+     o3(0xEC,0xB0,0x90), o3(0xEC,0xB0,0x94),
+     o3(0xEC,0xB0,0x9C), o3(0xEC,0xB0,0x9D),
+     o3(0xEC,0xB0,0xA1), o3(0xEC,0xB0,0xA2),
+     o3(0xEC,0xB0,0xA7), o3(0xEC,0xB0,0xA8),
+     o3(0xEC,0xB0,0xA9), o3(0xEC,0xB0,0xAC),
+     o3(0xEC,0xB0,0xAE), o3(0xEC,0xB0,0xB0),
+     o3(0xEC,0xB0,0xB8), o3(0xEC,0xB0,0xB9),
+     o3(0xEC,0xB0,0xBB),
+
+#define from_CP949_C2 WORDINDEX2INFO(43133)
+    from_CP949_81_offsets,
+    from_CP949_C2_infos,
+
+#define from_CP949_C3_infos WORDINDEX2INFO(43135)
+                INVALID, o3(0xED,0x98,0xBD),
+     o3(0xED,0x98,0xBE), o3(0xED,0x98,0xBF),
+     o3(0xED,0x99,0x81), o3(0xED,0x99,0x82),
+     o3(0xED,0x99,0x83), o3(0xED,0x99,0x84),
+     o3(0xED,0x99,0x86), o3(0xED,0x99,0x87),
+     o3(0xED,0x99,0x8A), o3(0xED,0x99,0x8C),
+     o3(0xED,0x99,0x8E), o3(0xED,0x99,0x8F),
+     o3(0xED,0x99,0x90), o3(0xED,0x99,0x92),
+     o3(0xED,0x99,0x93), o3(0xED,0x99,0x96),
+     o3(0xED,0x99,0x97), o3(0xED,0x99,0x99),
+     o3(0xED,0x99,0x9A), o3(0xED,0x99,0x9B),
+     o3(0xED,0x99,0x9D), o3(0xED,0x99,0x9E),
+     o3(0xED,0x99,0x9F), o3(0xED,0x99,0xA0),
+     o3(0xED,0x99,0xA1), o3(0xED,0x99,0xA2),
+     o3(0xED,0x99,0xA3), o3(0xED,0x99,0xA4),
+     o3(0xED,0x99,0xA5), o3(0xED,0x99,0xA6),
+     o3(0xED,0x99,0xA8), o3(0xED,0x99,0xAA),
+     o3(0xED,0x99,0xAB), o3(0xED,0x99,0xAC),
+     o3(0xED,0x99,0xAD), o3(0xED,0x99,0xAE),
+     o3(0xED,0x99,0xAF), o3(0xED,0x99,0xB2),
+     o3(0xED,0x99,0xB3), o3(0xED,0x99,0xB5),
+     o3(0xED,0x99,0xB6), o3(0xED,0x99,0xB7),
+     o3(0xED,0x99,0xB8), o3(0xED,0x99,0xB9),
+     o3(0xED,0x99,0xBA), o3(0xED,0x99,0xBB),
+     o3(0xED,0x99,0xBC), o3(0xED,0x99,0xBD),
+     o3(0xED,0x99,0xBE), o3(0xED,0x99,0xBF),
+     o3(0xED,0x9A,0x80), o3(0xED,0x9A,0x81),
+     o3(0xED,0x9A,0x82), o3(0xED,0x9A,0x84),
+     o3(0xED,0x9A,0x86), o3(0xED,0x9A,0x87),
+     o3(0xED,0x9A,0x88), o3(0xED,0x9A,0x89),
+     o3(0xED,0x9A,0x8A), o3(0xED,0x9A,0x8B),
+     o3(0xED,0x9A,0x8E), o3(0xED,0x9A,0x8F),
+     o3(0xED,0x9A,0x91), o3(0xED,0x9A,0x92),
+     o3(0xED,0x9A,0x93), o3(0xED,0x9A,0x95),
+     o3(0xED,0x9A,0x96), o3(0xED,0x9A,0x97),
+     o3(0xED,0x9A,0x98), o3(0xED,0x9A,0x99),
+     o3(0xED,0x9A,0x9A), o3(0xED,0x9A,0x9B),
+     o3(0xED,0x9A,0x9C), o3(0xED,0x9A,0x9E),
+     o3(0xED,0x9A,0xA0), o3(0xED,0x9A,0xA2),
+     o3(0xED,0x9A,0xA3), o3(0xED,0x9A,0xA4),
+     o3(0xED,0x9A,0xA5), o3(0xED,0x9A,0xA6),
+     o3(0xED,0x9A,0xA7), o3(0xED,0x9A,0xA9),
+     o3(0xED,0x9A,0xAA), o3(0xEC,0xB0,0xBC),
+     o3(0xEC,0xB0,0xBD), o3(0xEC,0xB0,0xBE),
+     o3(0xEC,0xB1,0x84), o3(0xEC,0xB1,0x85),
+     o3(0xEC,0xB1,0x88), o3(0xEC,0xB1,0x8C),
+     o3(0xEC,0xB1,0x94), o3(0xEC,0xB1,0x95),
+     o3(0xEC,0xB1,0x97), o3(0xEC,0xB1,0x98),
+     o3(0xEC,0xB1,0x99), o3(0xEC,0xB1,0xA0),
+     o3(0xEC,0xB1,0xA4), o3(0xEC,0xB1,0xA6),
+     o3(0xEC,0xB1,0xA8), o3(0xEC,0xB1,0xB0),
+     o3(0xEC,0xB1,0xB5), o3(0xEC,0xB2,0x98),
+     o3(0xEC,0xB2,0x99), o3(0xEC,0xB2,0x9C),
+     o3(0xEC,0xB2,0xA0), o3(0xEC,0xB2,0xA8),
+     o3(0xEC,0xB2,0xA9), o3(0xEC,0xB2,0xAB),
+     o3(0xEC,0xB2,0xAC), o3(0xEC,0xB2,0xAD),
+     o3(0xEC,0xB2,0xB4), o3(0xEC,0xB2,0xB5),
+     o3(0xEC,0xB2,0xB8), o3(0xEC,0xB2,0xBC),
+     o3(0xEC,0xB3,0x84), o3(0xEC,0xB3,0x85),
+     o3(0xEC,0xB3,0x87), o3(0xEC,0xB3,0x89),
+     o3(0xEC,0xB3,0x90), o3(0xEC,0xB3,0x94),
+     o3(0xEC,0xB3,0xA4), o3(0xEC,0xB3,0xAC),
+     o3(0xEC,0xB3,0xB0), o3(0xEC,0xB4,0x81),
+     o3(0xEC,0xB4,0x88), o3(0xEC,0xB4,0x89),
+     o3(0xEC,0xB4,0x8C), o3(0xEC,0xB4,0x90),
+     o3(0xEC,0xB4,0x98), o3(0xEC,0xB4,0x99),
+     o3(0xEC,0xB4,0x9B), o3(0xEC,0xB4,0x9D),
+     o3(0xEC,0xB4,0xA4), o3(0xEC,0xB4,0xA8),
+     o3(0xEC,0xB4,0xAC), o3(0xEC,0xB4,0xB9),
+     o3(0xEC,0xB5,0x9C), o3(0xEC,0xB5,0xA0),
+     o3(0xEC,0xB5,0xA4), o3(0xEC,0xB5,0xAC),
+     o3(0xEC,0xB5,0xAD), o3(0xEC,0xB5,0xAF),
+     o3(0xEC,0xB5,0xB1), o3(0xEC,0xB5,0xB8),
+     o3(0xEC,0xB6,0x88), o3(0xEC,0xB6,0x94),
+     o3(0xEC,0xB6,0x95), o3(0xEC,0xB6,0x98),
+     o3(0xEC,0xB6,0x9C), o3(0xEC,0xB6,0xA4),
+     o3(0xEC,0xB6,0xA5), o3(0xEC,0xB6,0xA7),
+     o3(0xEC,0xB6,0xA9), o3(0xEC,0xB6,0xB0),
+     o3(0xEC,0xB7,0x84), o3(0xEC,0xB7,0x8C),
+     o3(0xEC,0xB7,0x90), o3(0xEC,0xB7,0xA8),
+     o3(0xEC,0xB7,0xAC), o3(0xEC,0xB7,0xB0),
+     o3(0xEC,0xB7,0xB8), o3(0xEC,0xB7,0xB9),
+     o3(0xEC,0xB7,0xBB), o3(0xEC,0xB7,0xBD),
+     o3(0xEC,0xB8,0x84), o3(0xEC,0xB8,0x88),
+     o3(0xEC,0xB8,0x8C), o3(0xEC,0xB8,0x94),
+     o3(0xEC,0xB8,0x99), o3(0xEC,0xB8,0xA0),
+     o3(0xEC,0xB8,0xA1), o3(0xEC,0xB8,0xA4),
+     o3(0xEC,0xB8,0xA8), o3(0xEC,0xB8,0xB0),
+     o3(0xEC,0xB8,0xB1), o3(0xEC,0xB8,0xB3),
+     o3(0xEC,0xB8,0xB5),
+
+#define from_CP949_C3 WORDINDEX2INFO(43314)
+    from_CP949_81_offsets,
+    from_CP949_C3_infos,
+
+#define from_CP949_C4_infos WORDINDEX2INFO(43316)
+                INVALID, o3(0xED,0x9A,0xAB),
+     o3(0xED,0x9A,0xAD), o3(0xED,0x9A,0xAE),
+     o3(0xED,0x9A,0xAF), o3(0xED,0x9A,0xB1),
+     o3(0xED,0x9A,0xB2), o3(0xED,0x9A,0xB3),
+     o3(0xED,0x9A,0xB4), o3(0xED,0x9A,0xB5),
+     o3(0xED,0x9A,0xB6), o3(0xED,0x9A,0xB7),
+     o3(0xED,0x9A,0xB8), o3(0xED,0x9A,0xBA),
+     o3(0xED,0x9A,0xBC), o3(0xED,0x9A,0xBD),
+     o3(0xED,0x9A,0xBE), o3(0xED,0x9A,0xBF),
+     o3(0xED,0x9B,0x80), o3(0xED,0x9B,0x81),
+     o3(0xED,0x9B,0x82), o3(0xED,0x9B,0x83),
+     o3(0xED,0x9B,0x86), o3(0xED,0x9B,0x87),
+     o3(0xED,0x9B,0x89), o3(0xED,0x9B,0x8A),
+     o3(0xED,0x9B,0x8B), o3(0xED,0x9B,0x8D),
+     o3(0xED,0x9B,0x8E), o3(0xED,0x9B,0x8F),
+     o3(0xED,0x9B,0x90), o3(0xED,0x9B,0x92),
+     o3(0xED,0x9B,0x93), o3(0xED,0x9B,0x95),
+     o3(0xED,0x9B,0x96), o3(0xED,0x9B,0x98),
+     o3(0xED,0x9B,0x9A), o3(0xED,0x9B,0x9B),
+     o3(0xED,0x9B,0x9C), o3(0xED,0x9B,0x9D),
+     o3(0xED,0x9B,0x9E), o3(0xED,0x9B,0x9F),
+     o3(0xED,0x9B,0xA1), o3(0xED,0x9B,0xA2),
+     o3(0xED,0x9B,0xA3), o3(0xED,0x9B,0xA5),
+     o3(0xED,0x9B,0xA6), o3(0xED,0x9B,0xA7),
+     o3(0xED,0x9B,0xA9), o3(0xED,0x9B,0xAA),
+     o3(0xED,0x9B,0xAB), o3(0xED,0x9B,0xAC),
+     o3(0xED,0x9B,0xAD), o3(0xED,0x9B,0xAE),
+     o3(0xED,0x9B,0xAF), o3(0xED,0x9B,0xB1),
+     o3(0xED,0x9B,0xB2), o3(0xED,0x9B,0xB3),
+     o3(0xED,0x9B,0xB4), o3(0xED,0x9B,0xB6),
+     o3(0xED,0x9B,0xB7), o3(0xED,0x9B,0xB8),
+     o3(0xED,0x9B,0xB9), o3(0xED,0x9B,0xBA),
+     o3(0xED,0x9B,0xBB), o3(0xED,0x9B,0xBE),
+     o3(0xED,0x9B,0xBF), o3(0xED,0x9C,0x81),
+     o3(0xED,0x9C,0x82), o3(0xED,0x9C,0x83),
+     o3(0xED,0x9C,0x85), o3(0xED,0x9C,0x86),
+     o3(0xED,0x9C,0x87), o3(0xED,0x9C,0x88),
+     o3(0xED,0x9C,0x89), o3(0xED,0x9C,0x8A),
+     o3(0xED,0x9C,0x8B), o3(0xED,0x9C,0x8C),
+     o3(0xED,0x9C,0x8D), o3(0xED,0x9C,0x8E),
+     o3(0xED,0x9C,0x8F), o3(0xED,0x9C,0x90),
+     o3(0xED,0x9C,0x92), o3(0xED,0x9C,0x93),
+     o3(0xED,0x9C,0x94), o3(0xEC,0xB9,0x98),
+     o3(0xEC,0xB9,0x99), o3(0xEC,0xB9,0x9C),
+     o3(0xEC,0xB9,0x9F), o3(0xEC,0xB9,0xA0),
+     o3(0xEC,0xB9,0xA1), o3(0xEC,0xB9,0xA8),
+     o3(0xEC,0xB9,0xA9), o3(0xEC,0xB9,0xAB),
+     o3(0xEC,0xB9,0xAD), o3(0xEC,0xB9,0xB4),
+     o3(0xEC,0xB9,0xB5), o3(0xEC,0xB9,0xB8),
+     o3(0xEC,0xB9,0xBC), o3(0xEC,0xBA,0x84),
+     o3(0xEC,0xBA,0x85), o3(0xEC,0xBA,0x87),
+     o3(0xEC,0xBA,0x89), o3(0xEC,0xBA,0x90),
+     o3(0xEC,0xBA,0x91), o3(0xEC,0xBA,0x94),
+     o3(0xEC,0xBA,0x98), o3(0xEC,0xBA,0xA0),
+     o3(0xEC,0xBA,0xA1), o3(0xEC,0xBA,0xA3),
+     o3(0xEC,0xBA,0xA4), o3(0xEC,0xBA,0xA5),
+     o3(0xEC,0xBA,0xAC), o3(0xEC,0xBA,0xAD),
+     o3(0xEC,0xBB,0x81), o3(0xEC,0xBB,0xA4),
+     o3(0xEC,0xBB,0xA5), o3(0xEC,0xBB,0xA8),
+     o3(0xEC,0xBB,0xAB), o3(0xEC,0xBB,0xAC),
+     o3(0xEC,0xBB,0xB4), o3(0xEC,0xBB,0xB5),
+     o3(0xEC,0xBB,0xB7), o3(0xEC,0xBB,0xB8),
+     o3(0xEC,0xBB,0xB9), o3(0xEC,0xBC,0x80),
+     o3(0xEC,0xBC,0x81), o3(0xEC,0xBC,0x84),
+     o3(0xEC,0xBC,0x88), o3(0xEC,0xBC,0x90),
+     o3(0xEC,0xBC,0x91), o3(0xEC,0xBC,0x93),
+     o3(0xEC,0xBC,0x95), o3(0xEC,0xBC,0x9C),
+     o3(0xEC,0xBC,0xA0), o3(0xEC,0xBC,0xA4),
+     o3(0xEC,0xBC,0xAC), o3(0xEC,0xBC,0xAD),
+     o3(0xEC,0xBC,0xAF), o3(0xEC,0xBC,0xB0),
+     o3(0xEC,0xBC,0xB1), o3(0xEC,0xBC,0xB8),
+     o3(0xEC,0xBD,0x94), o3(0xEC,0xBD,0x95),
+     o3(0xEC,0xBD,0x98), o3(0xEC,0xBD,0x9C),
+     o3(0xEC,0xBD,0xA4), o3(0xEC,0xBD,0xA5),
+     o3(0xEC,0xBD,0xA7), o3(0xEC,0xBD,0xA9),
+     o3(0xEC,0xBD,0xB0), o3(0xEC,0xBD,0xB1),
+     o3(0xEC,0xBD,0xB4), o3(0xEC,0xBD,0xB8),
+     o3(0xEC,0xBE,0x80), o3(0xEC,0xBE,0x85),
+     o3(0xEC,0xBE,0x8C), o3(0xEC,0xBE,0xA1),
+     o3(0xEC,0xBE,0xA8), o3(0xEC,0xBE,0xB0),
+     o3(0xEC,0xBF,0x84), o3(0xEC,0xBF,0xA0),
+     o3(0xEC,0xBF,0xA1), o3(0xEC,0xBF,0xA4),
+     o3(0xEC,0xBF,0xA8), o3(0xEC,0xBF,0xB0),
+     o3(0xEC,0xBF,0xB1), o3(0xEC,0xBF,0xB3),
+     o3(0xEC,0xBF,0xB5), o3(0xEC,0xBF,0xBC),
+     o3(0xED,0x80,0x80), o3(0xED,0x80,0x84),
+     o3(0xED,0x80,0x91), o3(0xED,0x80,0x98),
+     o3(0xED,0x80,0xAD), o3(0xED,0x80,0xB4),
+     o3(0xED,0x80,0xB5), o3(0xED,0x80,0xB8),
+     o3(0xED,0x80,0xBC),
+
+#define from_CP949_C4 WORDINDEX2INFO(43495)
+    from_CP949_81_offsets,
+    from_CP949_C4_infos,
+
+#define from_CP949_C5_infos WORDINDEX2INFO(43497)
+                INVALID, o3(0xED,0x9C,0x95),
+     o3(0xED,0x9C,0x96), o3(0xED,0x9C,0x97),
+     o3(0xED,0x9C,0x9A), o3(0xED,0x9C,0x9B),
+     o3(0xED,0x9C,0x9D), o3(0xED,0x9C,0x9E),
+     o3(0xED,0x9C,0x9F), o3(0xED,0x9C,0xA1),
+     o3(0xED,0x9C,0xA2), o3(0xED,0x9C,0xA3),
+     o3(0xED,0x9C,0xA4), o3(0xED,0x9C,0xA5),
+     o3(0xED,0x9C,0xA6), o3(0xED,0x9C,0xA7),
+     o3(0xED,0x9C,0xAA), o3(0xED,0x9C,0xAC),
+     o3(0xED,0x9C,0xAE), o3(0xED,0x9C,0xAF),
+     o3(0xED,0x9C,0xB0), o3(0xED,0x9C,0xB1),
+     o3(0xED,0x9C,0xB2), o3(0xED,0x9C,0xB3),
+     o3(0xED,0x9C,0xB6), o3(0xED,0x9C,0xB7),
+     o3(0xED,0x9C,0xB9), o3(0xED,0x9C,0xBA),
+     o3(0xED,0x9C,0xBB), o3(0xED,0x9C,0xBD),
+     o3(0xED,0x9C,0xBE), o3(0xED,0x9C,0xBF),
+     o3(0xED,0x9D,0x80), o3(0xED,0x9D,0x81),
+     o3(0xED,0x9D,0x82), o3(0xED,0x9D,0x83),
+     o3(0xED,0x9D,0x85), o3(0xED,0x9D,0x86),
+     o3(0xED,0x9D,0x88), o3(0xED,0x9D,0x8A),
+     o3(0xED,0x9D,0x8B), o3(0xED,0x9D,0x8C),
+     o3(0xED,0x9D,0x8D), o3(0xED,0x9D,0x8E),
+     o3(0xED,0x9D,0x8F), o3(0xED,0x9D,0x92),
+     o3(0xED,0x9D,0x93), o3(0xED,0x9D,0x95),
+     o3(0xED,0x9D,0x9A), o3(0xED,0x9D,0x9B),
+     o3(0xED,0x9D,0x9C), o3(0xED,0x9D,0x9D),
+     o3(0xED,0x9D,0x9E), o3(0xED,0x9D,0x9F),
+     o3(0xED,0x9D,0xA2), o3(0xED,0x9D,0xA4),
+     o3(0xED,0x9D,0xA6), o3(0xED,0x9D,0xA7),
+     o3(0xED,0x9D,0xA8), o3(0xED,0x9D,0xAA),
+     o3(0xED,0x9D,0xAB), o3(0xED,0x9D,0xAD),
+     o3(0xED,0x9D,0xAE), o3(0xED,0x9D,0xAF),
+     o3(0xED,0x9D,0xB1), o3(0xED,0x9D,0xB2),
+     o3(0xED,0x9D,0xB3), o3(0xED,0x9D,0xB5),
+     o3(0xED,0x9D,0xB6), o3(0xED,0x9D,0xB7),
+     o3(0xED,0x9D,0xB8), o3(0xED,0x9D,0xB9),
+     o3(0xED,0x9D,0xBA), o3(0xED,0x9D,0xBB),
+     o3(0xED,0x9D,0xBE), o3(0xED,0x9D,0xBF),
+     o3(0xED,0x9E,0x80), o3(0xED,0x9E,0x82),
+     o3(0xED,0x9E,0x83), o3(0xED,0x9E,0x84),
+     o3(0xED,0x9E,0x85), o3(0xED,0x9E,0x86),
+     o3(0xED,0x9E,0x87), o3(0xED,0x9E,0x8A),
+     o3(0xED,0x9E,0x8B), o3(0xED,0x81,0x84),
+     o3(0xED,0x81,0x85), o3(0xED,0x81,0x87),
+     o3(0xED,0x81,0x89), o3(0xED,0x81,0x90),
+     o3(0xED,0x81,0x94), o3(0xED,0x81,0x98),
+     o3(0xED,0x81,0xA0), o3(0xED,0x81,0xAC),
+     o3(0xED,0x81,0xAD), o3(0xED,0x81,0xB0),
+     o3(0xED,0x81,0xB4), o3(0xED,0x81,0xBC),
+     o3(0xED,0x81,0xBD), o3(0xED,0x82,0x81),
+     o3(0xED,0x82,0xA4), o3(0xED,0x82,0xA5),
+     o3(0xED,0x82,0xA8), o3(0xED,0x82,0xAC),
+     o3(0xED,0x82,0xB4), o3(0xED,0x82,0xB5),
+     o3(0xED,0x82,0xB7), o3(0xED,0x82,0xB9),
+     o3(0xED,0x83,0x80), o3(0xED,0x83,0x81),
+     o3(0xED,0x83,0x84), o3(0xED,0x83,0x88),
+     o3(0xED,0x83,0x89), o3(0xED,0x83,0x90),
+     o3(0xED,0x83,0x91), o3(0xED,0x83,0x93),
+     o3(0xED,0x83,0x94), o3(0xED,0x83,0x95),
+     o3(0xED,0x83,0x9C), o3(0xED,0x83,0x9D),
+     o3(0xED,0x83,0xA0), o3(0xED,0x83,0xA4),
+     o3(0xED,0x83,0xAC), o3(0xED,0x83,0xAD),
+     o3(0xED,0x83,0xAF), o3(0xED,0x83,0xB0),
+     o3(0xED,0x83,0xB1), o3(0xED,0x83,0xB8),
+     o3(0xED,0x84,0x8D), o3(0xED,0x84,0xB0),
+     o3(0xED,0x84,0xB1), o3(0xED,0x84,0xB4),
+     o3(0xED,0x84,0xB8), o3(0xED,0x84,0xBA),
+     o3(0xED,0x85,0x80), o3(0xED,0x85,0x81),
+     o3(0xED,0x85,0x83), o3(0xED,0x85,0x84),
+     o3(0xED,0x85,0x85), o3(0xED,0x85,0x8C),
+     o3(0xED,0x85,0x8D), o3(0xED,0x85,0x90),
+     o3(0xED,0x85,0x94), o3(0xED,0x85,0x9C),
+     o3(0xED,0x85,0x9D), o3(0xED,0x85,0x9F),
+     o3(0xED,0x85,0xA1), o3(0xED,0x85,0xA8),
+     o3(0xED,0x85,0xAC), o3(0xED,0x85,0xBC),
+     o3(0xED,0x86,0x84), o3(0xED,0x86,0x88),
+     o3(0xED,0x86,0xA0), o3(0xED,0x86,0xA1),
+     o3(0xED,0x86,0xA4), o3(0xED,0x86,0xA8),
+     o3(0xED,0x86,0xB0), o3(0xED,0x86,0xB1),
+     o3(0xED,0x86,0xB3), o3(0xED,0x86,0xB5),
+     o3(0xED,0x86,0xBA), o3(0xED,0x86,0xBC),
+     o3(0xED,0x87,0x80), o3(0xED,0x87,0x98),
+     o3(0xED,0x87,0xB4), o3(0xED,0x87,0xB8),
+     o3(0xED,0x88,0x87), o3(0xED,0x88,0x89),
+     o3(0xED,0x88,0x90), o3(0xED,0x88,0xAC),
+     o3(0xED,0x88,0xAD), o3(0xED,0x88,0xB0),
+     o3(0xED,0x88,0xB4), o3(0xED,0x88,0xBC),
+     o3(0xED,0x88,0xBD), o3(0xED,0x88,0xBF),
+     o3(0xED,0x89,0x81), o3(0xED,0x89,0x88),
+     o3(0xED,0x89,0x9C),
+
+#define from_CP949_C5 WORDINDEX2INFO(43676)
+    from_CP949_81_offsets,
+    from_CP949_C5_infos,
+
+#define from_CP949_C6_infos WORDINDEX2INFO(43678)
+                INVALID, o3(0xED,0x9E,0x8D),
+     o3(0xED,0x9E,0x8E), o3(0xED,0x9E,0x8F),
+     o3(0xED,0x9E,0x91), o3(0xED,0x9E,0x92),
+     o3(0xED,0x9E,0x93), o3(0xED,0x9E,0x94),
+     o3(0xED,0x9E,0x95), o3(0xED,0x9E,0x96),
+     o3(0xED,0x9E,0x97), o3(0xED,0x9E,0x9A),
+     o3(0xED,0x9E,0x9C), o3(0xED,0x9E,0x9E),
+     o3(0xED,0x9E,0x9F), o3(0xED,0x9E,0xA0),
+     o3(0xED,0x9E,0xA1), o3(0xED,0x9E,0xA2),
+     o3(0xED,0x9E,0xA3),              UNDEF,
+     o3(0xED,0x89,0xA4), o3(0xED,0x8A,0x80),
+     o3(0xED,0x8A,0x81), o3(0xED,0x8A,0x84),
+     o3(0xED,0x8A,0x88), o3(0xED,0x8A,0x90),
+     o3(0xED,0x8A,0x91), o3(0xED,0x8A,0x95),
+     o3(0xED,0x8A,0x9C), o3(0xED,0x8A,0xA0),
+     o3(0xED,0x8A,0xA4), o3(0xED,0x8A,0xAC),
+     o3(0xED,0x8A,0xB1), o3(0xED,0x8A,0xB8),
+     o3(0xED,0x8A,0xB9), o3(0xED,0x8A,0xBC),
+     o3(0xED,0x8A,0xBF), o3(0xED,0x8B,0x80),
+     o3(0xED,0x8B,0x82), o3(0xED,0x8B,0x88),
+     o3(0xED,0x8B,0x89), o3(0xED,0x8B,0x8B),
+     o3(0xED,0x8B,0x94), o3(0xED,0x8B,0x98),
+     o3(0xED,0x8B,0x9C), o3(0xED,0x8B,0xA4),
+     o3(0xED,0x8B,0xA5), o3(0xED,0x8B,0xB0),
+     o3(0xED,0x8B,0xB1), o3(0xED,0x8B,0xB4),
+     o3(0xED,0x8B,0xB8), o3(0xED,0x8C,0x80),
+     o3(0xED,0x8C,0x81), o3(0xED,0x8C,0x83),
+     o3(0xED,0x8C,0x85), o3(0xED,0x8C,0x8C),
+     o3(0xED,0x8C,0x8D), o3(0xED,0x8C,0x8E),
+     o3(0xED,0x8C,0x90), o3(0xED,0x8C,0x94),
+     o3(0xED,0x8C,0x96), o3(0xED,0x8C,0x9C),
+     o3(0xED,0x8C,0x9D), o3(0xED,0x8C,0x9F),
+     o3(0xED,0x8C,0xA0), o3(0xED,0x8C,0xA1),
+     o3(0xED,0x8C,0xA5), o3(0xED,0x8C,0xA8),
+     o3(0xED,0x8C,0xA9), o3(0xED,0x8C,0xAC),
+     o3(0xED,0x8C,0xB0), o3(0xED,0x8C,0xB8),
+     o3(0xED,0x8C,0xB9), o3(0xED,0x8C,0xBB),
+     o3(0xED,0x8C,0xBC), o3(0xED,0x8C,0xBD),
+     o3(0xED,0x8D,0x84), o3(0xED,0x8D,0x85),
+     o3(0xED,0x8D,0xBC), o3(0xED,0x8D,0xBD),
+     o3(0xED,0x8E,0x80), o3(0xED,0x8E,0x84),
+     o3(0xED,0x8E,0x8C), o3(0xED,0x8E,0x8D),
+     o3(0xED,0x8E,0x8F), o3(0xED,0x8E,0x90),
+     o3(0xED,0x8E,0x91), o3(0xED,0x8E,0x98),
+     o3(0xED,0x8E,0x99), o3(0xED,0x8E,0x9C),
+     o3(0xED,0x8E,0xA0), o3(0xED,0x8E,0xA8),
+     o3(0xED,0x8E,0xA9), o3(0xED,0x8E,0xAB),
+     o3(0xED,0x8E,0xAD), o3(0xED,0x8E,0xB4),
+     o3(0xED,0x8E,0xB8), o3(0xED,0x8E,0xBC),
+     o3(0xED,0x8F,0x84), o3(0xED,0x8F,0x85),
+     o3(0xED,0x8F,0x88), o3(0xED,0x8F,0x89),
+     o3(0xED,0x8F,0x90), o3(0xED,0x8F,0x98),
+     o3(0xED,0x8F,0xA1), o3(0xED,0x8F,0xA3),
+     o3(0xED,0x8F,0xAC), o3(0xED,0x8F,0xAD),
+     o3(0xED,0x8F,0xB0), o3(0xED,0x8F,0xB4),
+     o3(0xED,0x8F,0xBC), o3(0xED,0x8F,0xBD),
+     o3(0xED,0x8F,0xBF), o3(0xED,0x90,0x81),
+
+#define from_CP949_C6 WORDINDEX2INFO(43792)
+    from_CP949_C6_offsets,
+    from_CP949_C6_infos,
+
+#define from_CP949_C7_infos WORDINDEX2INFO(43794)
+                INVALID,              UNDEF,
+     o3(0xED,0x90,0x88), o3(0xED,0x90,0x9D),
+     o3(0xED,0x91,0x80), o3(0xED,0x91,0x84),
+     o3(0xED,0x91,0x9C), o3(0xED,0x91,0xA0),
+     o3(0xED,0x91,0xA4), o3(0xED,0x91,0xAD),
+     o3(0xED,0x91,0xAF), o3(0xED,0x91,0xB8),
+     o3(0xED,0x91,0xB9), o3(0xED,0x91,0xBC),
+     o3(0xED,0x91,0xBF), o3(0xED,0x92,0x80),
+     o3(0xED,0x92,0x82), o3(0xED,0x92,0x88),
+     o3(0xED,0x92,0x89), o3(0xED,0x92,0x8B),
+     o3(0xED,0x92,0x8D), o3(0xED,0x92,0x94),
+     o3(0xED,0x92,0xA9), o3(0xED,0x93,0x8C),
+     o3(0xED,0x93,0x90), o3(0xED,0x93,0x94),
+     o3(0xED,0x93,0x9C), o3(0xED,0x93,0x9F),
+     o3(0xED,0x93,0xA8), o3(0xED,0x93,0xAC),
+     o3(0xED,0x93,0xB0), o3(0xED,0x93,0xB8),
+     o3(0xED,0x93,0xBB), o3(0xED,0x93,0xBD),
+     o3(0xED,0x94,0x84), o3(0xED,0x94,0x88),
+     o3(0xED,0x94,0x8C), o3(0xED,0x94,0x94),
+     o3(0xED,0x94,0x95), o3(0xED,0x94,0x97),
+     o3(0xED,0x94,0xBC), o3(0xED,0x94,0xBD),
+     o3(0xED,0x95,0x80), o3(0xED,0x95,0x84),
+     o3(0xED,0x95,0x8C), o3(0xED,0x95,0x8D),
+     o3(0xED,0x95,0x8F), o3(0xED,0x95,0x91),
+     o3(0xED,0x95,0x98), o3(0xED,0x95,0x99),
+     o3(0xED,0x95,0x9C), o3(0xED,0x95,0xA0),
+     o3(0xED,0x95,0xA5), o3(0xED,0x95,0xA8),
+     o3(0xED,0x95,0xA9), o3(0xED,0x95,0xAB),
+     o3(0xED,0x95,0xAD), o3(0xED,0x95,0xB4),
+     o3(0xED,0x95,0xB5), o3(0xED,0x95,0xB8),
+     o3(0xED,0x95,0xBC), o3(0xED,0x96,0x84),
+     o3(0xED,0x96,0x85), o3(0xED,0x96,0x87),
+     o3(0xED,0x96,0x88), o3(0xED,0x96,0x89),
+     o3(0xED,0x96,0x90), o3(0xED,0x96,0xA5),
+     o3(0xED,0x97,0x88), o3(0xED,0x97,0x89),
+     o3(0xED,0x97,0x8C), o3(0xED,0x97,0x90),
+     o3(0xED,0x97,0x92), o3(0xED,0x97,0x98),
+     o3(0xED,0x97,0x99), o3(0xED,0x97,0x9B),
+     o3(0xED,0x97,0x9D), o3(0xED,0x97,0xA4),
+     o3(0xED,0x97,0xA5), o3(0xED,0x97,0xA8),
+     o3(0xED,0x97,0xAC), o3(0xED,0x97,0xB4),
+     o3(0xED,0x97,0xB5), o3(0xED,0x97,0xB7),
+     o3(0xED,0x97,0xB9), o3(0xED,0x98,0x80),
+     o3(0xED,0x98,0x81), o3(0xED,0x98,0x84),
+     o3(0xED,0x98,0x88), o3(0xED,0x98,0x90),
+     o3(0xED,0x98,0x91), o3(0xED,0x98,0x93),
+     o3(0xED,0x98,0x94), o3(0xED,0x98,0x95),
+     o3(0xED,0x98,0x9C), o3(0xED,0x98,0xA0),
+
+#define from_CP949_C7 WORDINDEX2INFO(43890)
+    from_CP949_C7_offsets,
+    from_CP949_C7_infos,
+
+#define from_CP949_C8_infos WORDINDEX2INFO(43892)
+                INVALID,              UNDEF,
+     o3(0xED,0x98,0xA4), o3(0xED,0x98,0xAD),
+     o3(0xED,0x98,0xB8), o3(0xED,0x98,0xB9),
+     o3(0xED,0x98,0xBC), o3(0xED,0x99,0x80),
+     o3(0xED,0x99,0x85), o3(0xED,0x99,0x88),
+     o3(0xED,0x99,0x89), o3(0xED,0x99,0x8B),
+     o3(0xED,0x99,0x8D), o3(0xED,0x99,0x91),
+     o3(0xED,0x99,0x94), o3(0xED,0x99,0x95),
+     o3(0xED,0x99,0x98), o3(0xED,0x99,0x9C),
+     o3(0xED,0x99,0xA7), o3(0xED,0x99,0xA9),
+     o3(0xED,0x99,0xB0), o3(0xED,0x99,0xB1),
+     o3(0xED,0x99,0xB4), o3(0xED,0x9A,0x83),
+     o3(0xED,0x9A,0x85), o3(0xED,0x9A,0x8C),
+     o3(0xED,0x9A,0x8D), o3(0xED,0x9A,0x90),
+     o3(0xED,0x9A,0x94), o3(0xED,0x9A,0x9D),
+     o3(0xED,0x9A,0x9F), o3(0xED,0x9A,0xA1),
+     o3(0xED,0x9A,0xA8), o3(0xED,0x9A,0xAC),
+     o3(0xED,0x9A,0xB0), o3(0xED,0x9A,0xB9),
+     o3(0xED,0x9A,0xBB), o3(0xED,0x9B,0x84),
+     o3(0xED,0x9B,0x85), o3(0xED,0x9B,0x88),
+     o3(0xED,0x9B,0x8C), o3(0xED,0x9B,0x91),
+     o3(0xED,0x9B,0x94), o3(0xED,0x9B,0x97),
+     o3(0xED,0x9B,0x99), o3(0xED,0x9B,0xA0),
+     o3(0xED,0x9B,0xA4), o3(0xED,0x9B,0xA8),
+     o3(0xED,0x9B,0xB0), o3(0xED,0x9B,0xB5),
+     o3(0xED,0x9B,0xBC), o3(0xED,0x9B,0xBD),
+     o3(0xED,0x9C,0x80), o3(0xED,0x9C,0x84),
+     o3(0xED,0x9C,0x91), o3(0xED,0x9C,0x98),
+     o3(0xED,0x9C,0x99), o3(0xED,0x9C,0x9C),
+     o3(0xED,0x9C,0xA0), o3(0xED,0x9C,0xA8),
+     o3(0xED,0x9C,0xA9), o3(0xED,0x9C,0xAB),
+     o3(0xED,0x9C,0xAD), o3(0xED,0x9C,0xB4),
+     o3(0xED,0x9C,0xB5), o3(0xED,0x9C,0xB8),
+     o3(0xED,0x9C,0xBC), o3(0xED,0x9D,0x84),
+     o3(0xED,0x9D,0x87), o3(0xED,0x9D,0x89),
+     o3(0xED,0x9D,0x90), o3(0xED,0x9D,0x91),
+     o3(0xED,0x9D,0x94), o3(0xED,0x9D,0x96),
+     o3(0xED,0x9D,0x97), o3(0xED,0x9D,0x98),
+     o3(0xED,0x9D,0x99), o3(0xED,0x9D,0xA0),
+     o3(0xED,0x9D,0xA1), o3(0xED,0x9D,0xA3),
+     o3(0xED,0x9D,0xA5), o3(0xED,0x9D,0xA9),
+     o3(0xED,0x9D,0xAC), o3(0xED,0x9D,0xB0),
+     o3(0xED,0x9D,0xB4), o3(0xED,0x9D,0xBC),
+     o3(0xED,0x9D,0xBD), o3(0xED,0x9E,0x81),
+     o3(0xED,0x9E,0x88), o3(0xED,0x9E,0x89),
+     o3(0xED,0x9E,0x8C), o3(0xED,0x9E,0x90),
+     o3(0xED,0x9E,0x98), o3(0xED,0x9E,0x99),
+     o3(0xED,0x9E,0x9B), o3(0xED,0x9E,0x9D),
+
+#define from_CP949_C8 WORDINDEX2INFO(43988)
+    from_CP949_C7_offsets,
+    from_CP949_C8_infos,
+
+#define from_CP949_C9 WORDINDEX2INFO(43990)
+    from_CP949_C9_offsets,
+    to_EUC_KR_C6_infos,
+
+#define from_CP949_CA_infos WORDINDEX2INFO(43992)
+                INVALID,              UNDEF,
+     o3(0xE4,0xBC,0xBD), o3(0xE4,0xBD,0xB3),
+     o3(0xE5,0x81,0x87), o3(0xE5,0x83,0xB9),
+     o3(0xE5,0x8A,0xA0), o3(0xE5,0x8F,0xAF),
+     o3(0xE5,0x91,0xB5), o3(0xE5,0x93,0xA5),
+     o3(0xE5,0x98,0x89), o3(0xE5,0xAB,0x81),
+     o3(0xE5,0xAE,0xB6), o3(0xE6,0x9A,0x87),
+     o3(0xE6,0x9E,0xB6), o3(0xE6,0x9E,0xB7),
+     o3(0xE6,0x9F,0xAF), o3(0xE6,0xAD,0x8C),
+     o3(0xE7,0x8F,0x82), o3(0xE7,0x97,0x82),
+     o3(0xE7,0xA8,0xBC), o3(0xE8,0x8B,0x9B),
+     o3(0xE8,0x8C,0x84), o3(0xE8,0xA1,0x97),
+     o3(0xE8,0xA2,0x88), o3(0xE8,0xA8,0xB6),
+     o3(0xE8,0xB3,0x88), o3(0xE8,0xB7,0x8F),
+     o3(0xE8,0xBB,0xBB), o3(0xE8,0xBF,0xA6),
+     o3(0xE9,0xA7,0x95), o3(0xE5,0x88,0xBB),
+     o3(0xE5,0x8D,0xB4), o3(0xE5,0x90,0x84),
+     o3(0xE6,0x81,0xAA), o3(0xE6,0x85,0xA4),
+     o3(0xE6,0xAE,0xBC), o3(0xE7,0x8F,0x8F),
+     o3(0xE8,0x84,0x9A), o3(0xE8,0xA6,0xBA),
+     o3(0xE8,0xA7,0x92), o3(0xE9,0x96,0xA3),
+     o3(0xE4,0xBE,0x83), o3(0xE5,0x88,0x8A),
+     o3(0xE5,0xA2,0xBE), o3(0xE5,0xA5,0xB8),
+     o3(0xE5,0xA7,0xA6), o3(0xE5,0xB9,0xB2),
+     o3(0xE5,0xB9,0xB9), o3(0xE6,0x87,0x87),
+     o3(0xE6,0x8F,0x80), o3(0xE6,0x9D,0x86),
+     o3(0xE6,0x9F,0xAC), o3(0xE6,0xA1,0xBF),
+     o3(0xE6,0xBE,0x97), o3(0xE7,0x99,0x8E),
+     o3(0xE7,0x9C,0x8B), o3(0xE7,0xA3,0xB5),
+     o3(0xE7,0xA8,0x88), o3(0xE7,0xAB,0xBF),
+     o3(0xE7,0xB0,0xA1), o3(0xE8,0x82,0x9D),
+     o3(0xE8,0x89,0xAE), o3(0xE8,0x89,0xB1),
+     o3(0xE8,0xAB,0xAB), o3(0xE9,0x96,0x93),
+     o3(0xE4,0xB9,0xAB), o3(0xE5,0x96,0x9D),
+     o3(0xE6,0x9B,0xB7), o3(0xE6,0xB8,0xB4),
+     o3(0xE7,0xA2,0xA3), o3(0xE7,0xAB,0xAD),
+     o3(0xE8,0x91,0x9B), o3(0xE8,0xA4,0x90),
+     o3(0xE8,0x9D,0x8E), o3(0xE9,0x9E,0xA8),
+     o3(0xE5,0x8B,0x98), o3(0xE5,0x9D,0x8E),
+     o3(0xE5,0xA0,0xAA), o3(0xE5,0xB5,0x8C),
+     o3(0xE6,0x84,0x9F), o3(0xE6,0x86,0xBE),
+     o3(0xE6,0x88,0xA1), o3(0xE6,0x95,0xA2),
+     o3(0xE6,0x9F,0x91), o3(0xE6,0xA9,0x84),
+     o3(0xE6,0xB8,0x9B), o3(0xE7,0x94,0x98),
+     o3(0xE7,0x96,0xB3), o3(0xE7,0x9B,0xA3),
+     o3(0xE7,0x9E,0xB0), o3(0xE7,0xB4,0xBA),
+     o3(0xE9,0x82,0xAF), o3(0xE9,0x91,0x91),
+     o3(0xE9,0x91,0x92), o3(0xE9,0xBE,0x95),
+
+#define from_CP949_CA WORDINDEX2INFO(44088)
+    from_CP949_C7_offsets,
+    from_CP949_CA_infos,
+
+#define from_CP949_CB_infos WORDINDEX2INFO(44090)
+                INVALID,              UNDEF,
+     o3(0xE5,0x8C,0xA3), o3(0xE5,0xB2,0xAC),
+     o3(0xE7,0x94,0xB2), o3(0xE8,0x83,0x9B),
+     o3(0xE9,0x89,0x80), o3(0xE9,0x96,0x98),
+     o3(0xE5,0x89,0x9B), o3(0xE5,0xA0,0x88),
+     o3(0xE5,0xA7,0x9C), o3(0xE5,0xB2,0xA1),
+     o3(0xE5,0xB4,0x97), o3(0xE5,0xBA,0xB7),
+     o3(0xE5,0xBC,0xBA), o3(0xE5,0xBD,0x8A),
+     o3(0xE6,0x85,0xB7), o3(0xE6,0xB1,0x9F),
+     o3(0xE7,0x95,0xBA), o3(0xE7,0x96,0x86),
+     o3(0xE7,0xB3,0xA0), o3(0xE7,0xB5,0xB3),
+     o3(0xE7,0xB6,0xB1), o3(0xE7,0xBE,0x8C),
+     o3(0xE8,0x85,0x94), o3(0xE8,0x88,0xA1),
+     o3(0xE8,0x96,0x91), o3(0xE8,0xA5,0x81),
+     o3(0xE8,0xAC,0x9B), o3(0xE9,0x8B,0xBC),
+     o3(0xE9,0x99,0x8D), o3(0xE9,0xB1,0x87),
+     o3(0xE4,0xBB,0x8B), o3(0xE4,0xBB,0xB7),
+     o3(0xE5,0x80,0x8B), o3(0xE5,0x87,0xB1),
+     o3(0xE5,0xA1,0x8F), o3(0xE6,0x84,0xB7),
+     o3(0xE6,0x84,0xBE), o3(0xE6,0x85,0xA8),
+     o3(0xE6,0x94,0xB9), o3(0xE6,0xA7,0xAA),
+     o3(0xE6,0xBC,0x91), o3(0xE7,0x96,0xA5),
+     o3(0xE7,0x9A,0x86), o3(0xE7,0x9B,0x96),
+     o3(0xE7,0xAE,0x87), o3(0xE8,0x8A,0xA5),
+     o3(0xE8,0x93,0x8B), o3(0xEF,0xA4,0x80),
+     o3(0xE9,0x8E,0xA7), o3(0xE9,0x96,0x8B),
+     o3(0xE5,0x96,0x80), o3(0xE5,0xAE,0xA2),
+     o3(0xE5,0x9D,0x91), o3(0xEF,0xA4,0x81),
+     o3(0xE7,0xB2,0xB3), o3(0xE7,0xBE,0xB9),
+     o3(0xE9,0x86,0xB5), o3(0xE5,0x80,0xA8),
+     o3(0xE5,0x8E,0xBB), o3(0xE5,0xB1,0x85),
+     o3(0xE5,0xB7,0xA8), o3(0xE6,0x8B,0x92),
+     o3(0xE6,0x8D,0xAE), o3(0xE6,0x93,0x9A),
+     o3(0xE6,0x93,0xA7), o3(0xE6,0xB8,0xA0),
+     o3(0xE7,0x82,0xAC), o3(0xE7,0xA5,0x9B),
+     o3(0xE8,0xB7,0x9D), o3(0xE8,0xB8,0x9E),
+     o3(0xEF,0xA4,0x82), o3(0xE9,0x81,0xBD),
+     o3(0xE9,0x89,0x85), o3(0xE9,0x8B,0xB8),
+     o3(0xE4,0xB9,0xBE), o3(0xE4,0xBB,0xB6),
+     o3(0xE5,0x81,0xA5), o3(0xE5,0xB7,0xBE),
+     o3(0xE5,0xBB,0xBA), o3(0xE6,0x84,0x86),
+     o3(0xE6,0xA5,0x97), o3(0xE8,0x85,0xB1),
+     o3(0xE8,0x99,0x94), o3(0xE8,0xB9,0x87),
+     o3(0xE9,0x8D,0xB5), o3(0xE9,0xA8,0xAB),
+     o3(0xE4,0xB9,0x9E), o3(0xE5,0x82,0x91),
+     o3(0xE6,0x9D,0xB0), o3(0xE6,0xA1,0x80),
+     o3(0xE5,0x84,0x89), o3(0xE5,0x8A,0x8D),
+     o3(0xE5,0x8A,0x92), o3(0xE6,0xAA,0xA2),
+
+#define from_CP949_CB WORDINDEX2INFO(44186)
+    from_CP949_C7_offsets,
+    from_CP949_CB_infos,
+
+#define from_CP949_CC_infos WORDINDEX2INFO(44188)
+                INVALID,              UNDEF,
+     o3(0xE7,0x9E,0xBC), o3(0xE9,0x88,0x90),
+     o3(0xE9,0xBB,0x94), o3(0xE5,0x8A,0xAB),
+     o3(0xE6,0x80,0xAF), o3(0xE8,0xBF,0xB2),
+     o3(0xE5,0x81,0x88), o3(0xE6,0x86,0xA9),
+     o3(0xE6,0x8F,0xAD), o3(0xE6,0x93,0x8A),
+     o3(0xE6,0xA0,0xBC), o3(0xE6,0xAA,0x84),
+     o3(0xE6,0xBF,0x80), o3(0xE8,0x86,0x88),
+     o3(0xE8,0xA6,0xA1), o3(0xE9,0x9A,0x94),
+     o3(0xE5,0xA0,0x85), o3(0xE7,0x89,0xBD),
+     o3(0xE7,0x8A,0xAC), o3(0xE7,0x94,0x84),
+     o3(0xE7,0xB5,0xB9), o3(0xE7,0xB9,0xAD),
+     o3(0xE8,0x82,0xA9), o3(0xE8,0xA6,0x8B),
+     o3(0xE8,0xAD,0xB4), o3(0xE9,0x81,0xA3),
+     o3(0xE9,0xB5,0x91), o3(0xE6,0x8A,0x89),
+     o3(0xE6,0xB1,0xBA), o3(0xE6,0xBD,0x94),
+     o3(0xE7,0xB5,0x90), o3(0xE7,0xBC,0xBA),
+     o3(0xE8,0xA8,0xA3), o3(0xE5,0x85,0xBC),
+     o3(0xE6,0x85,0x8A), o3(0xE7,0xAE,0x9D),
+     o3(0xE8,0xAC,0x99), o3(0xE9,0x89,0x97),
+     o3(0xE9,0x8E,0x8C), o3(0xE4,0xBA,0xAC),
+     o3(0xE4,0xBF,0x93), o3(0xE5,0x80,0x9E),
+     o3(0xE5,0x82,0xBE), o3(0xE5,0x84,0x86),
+     o3(0xE5,0x8B,0x81), o3(0xE5,0x8B,0x8D),
+     o3(0xE5,0x8D,0xBF), o3(0xE5,0x9D,0xB0),
+     o3(0xE5,0xA2,0x83), o3(0xE5,0xBA,0x9A),
+     o3(0xE5,0xBE,0x91), o3(0xE6,0x85,0xB6),
+     o3(0xE6,0x86,0xAC), o3(0xE6,0x93,0x8E),
+     o3(0xE6,0x95,0xAC), o3(0xE6,0x99,0xAF),
+     o3(0xE6,0x9A,0xBB), o3(0xE6,0x9B,0xB4),
+     o3(0xE6,0xA2,0x97), o3(0xE6,0xB6,0x87),
+     o3(0xE7,0x82,0x85), o3(0xE7,0x83,0xB1),
+     o3(0xE7,0x92,0x9F), o3(0xE7,0x92,0xA5),
+     o3(0xE7,0x93,0x8A), o3(0xE7,0x97,0x99),
+     o3(0xE7,0xA1,0xAC), o3(0xE7,0xA3,0xAC),
+     o3(0xE7,0xAB,0x9F), o3(0xE7,0xAB,0xB6),
+     o3(0xE7,0xB5,0x85), o3(0xE7,0xB6,0x93),
+     o3(0xE8,0x80,0x95), o3(0xE8,0x80,0xBF),
+     o3(0xE8,0x84,0x9B), o3(0xE8,0x8E,0x96),
+     o3(0xE8,0xAD,0xA6), o3(0xE8,0xBC,0x95),
+     o3(0xE9,0x80,0x95), o3(0xE9,0x8F,0xA1),
+     o3(0xE9,0xA0,0x83), o3(0xE9,0xA0,0xB8),
+     o3(0xE9,0xA9,0x9A), o3(0xE9,0xAF,0xA8),
+     o3(0xE4,0xBF,0x82), o3(0xE5,0x95,0x93),
+     o3(0xE5,0xA0,0xBA), o3(0xE5,0xA5,0x91),
+     o3(0xE5,0xAD,0xA3), o3(0xE5,0xB1,0x86),
+     o3(0xE6,0x82,0xB8), o3(0xE6,0x88,0x92),
+     o3(0xE6,0xA1,0x82), o3(0xE6,0xA2,0xB0),
+
+#define from_CP949_CC WORDINDEX2INFO(44284)
+    from_CP949_C7_offsets,
+    from_CP949_CC_infos,
+
+#define from_CP949_CD_infos WORDINDEX2INFO(44286)
+                INVALID,              UNDEF,
+     o3(0xE6,0xA3,0xA8), o3(0xE6,0xBA,0xAA),
+     o3(0xE7,0x95,0x8C), o3(0xE7,0x99,0xB8),
+     o3(0xE7,0xA3,0x8E), o3(0xE7,0xA8,0xBD),
+     o3(0xE7,0xB3,0xBB), o3(0xE7,0xB9,0xAB),
+     o3(0xE7,0xB9,0xBC), o3(0xE8,0xA8,0x88),
+     o3(0xE8,0xAA,0xA1), o3(0xE8,0xB0,0xBF),
+     o3(0xE9,0x9A,0x8E), o3(0xE9,0xB7,0x84),
+     o3(0xE5,0x8F,0xA4), o3(0xE5,0x8F,0xA9),
+     o3(0xE5,0x91,0x8A), o3(0xE5,0x91,0xB1),
+     o3(0xE5,0x9B,0xBA), o3(0xE5,0xA7,0x91),
+     o3(0xE5,0xAD,0xA4), o3(0xE5,0xB0,0xBB),
+     o3(0xE5,0xBA,0xAB), o3(0xE6,0x8B,0xB7),
+     o3(0xE6,0x94,0xB7), o3(0xE6,0x95,0x85),
+     o3(0xE6,0x95,0xB2), o3(0xE6,0x9A,0xA0),
+     o3(0xE6,0x9E,0xAF), o3(0xE6,0xA7,0x81),
+     o3(0xE6,0xB2,0xBD), o3(0xE7,0x97,0xBC),
+     o3(0xE7,0x9A,0x90), o3(0xE7,0x9D,0xBE),
+     o3(0xE7,0xA8,0xBF), o3(0xE7,0xBE,0x94),
+     o3(0xE8,0x80,0x83), o3(0xE8,0x82,0xA1),
+     o3(0xE8,0x86,0x8F), o3(0xE8,0x8B,0xA6),
+     o3(0xE8,0x8B,0xBD), o3(0xE8,0x8F,0xB0),
+     o3(0xE8,0x97,0x81), o3(0xE8,0xA0,0xB1),
+     o3(0xE8,0xA2,0xB4), o3(0xE8,0xAA,0xA5),
+     o3(0xEF,0xA4,0x83), o3(0xE8,0xBE,0x9C),
+     o3(0xE9,0x8C,0xAE), o3(0xE9,0x9B,0x87),
+     o3(0xE9,0xA1,0xA7), o3(0xE9,0xAB,0x98),
+     o3(0xE9,0xBC,0x93), o3(0xE5,0x93,0xAD),
+     o3(0xE6,0x96,0x9B), o3(0xE6,0x9B,0xB2),
+     o3(0xE6,0xA2,0x8F), o3(0xE7,0xA9,0x80),
+     o3(0xE8,0xB0,0xB7), o3(0xE9,0xB5,0xA0),
+     o3(0xE5,0x9B,0xB0), o3(0xE5,0x9D,0xA4),
+     o3(0xE5,0xB4,0x91), o3(0xE6,0x98,0x86),
+     o3(0xE6,0xA2,0xB1), o3(0xE6,0xA3,0x8D),
+     o3(0xE6,0xBB,0xBE), o3(0xE7,0x90,0xA8),
+     o3(0xE8,0xA2,0x9E), o3(0xE9,0xAF,0xA4),
+     o3(0xE6,0xB1,0xA8), o3(0xEF,0xA4,0x84),
+     o3(0xE9,0xAA,0xA8), o3(0xE4,0xBE,0x9B),
+     o3(0xE5,0x85,0xAC), o3(0xE5,0x85,0xB1),
+     o3(0xE5,0x8A,0x9F), o3(0xE5,0xAD,0x94),
+     o3(0xE5,0xB7,0xA5), o3(0xE6,0x81,0x90),
+     o3(0xE6,0x81,0xAD), o3(0xE6,0x8B,0xB1),
+     o3(0xE6,0x8E,0xA7), o3(0xE6,0x94,0xBB),
+     o3(0xE7,0x8F,0x99), o3(0xE7,0xA9,0xBA),
+     o3(0xE8,0x9A,0xA3), o3(0xE8,0xB2,0xA2),
+     o3(0xE9,0x9E,0x8F), o3(0xE4,0xB8,0xB2),
+     o3(0xE5,0xAF,0xA1), o3(0xE6,0x88,0x88),
+     o3(0xE6,0x9E,0x9C), o3(0xE7,0x93,0x9C),
+
+#define from_CP949_CD WORDINDEX2INFO(44382)
+    from_CP949_C7_offsets,
+    from_CP949_CD_infos,
+
+#define from_CP949_CE_infos WORDINDEX2INFO(44384)
+                INVALID,              UNDEF,
+     o3(0xE7,0xA7,0x91), o3(0xE8,0x8F,0x93),
+     o3(0xE8,0xAA,0x87), o3(0xE8,0xAA,0xB2),
+     o3(0xE8,0xB7,0xA8), o3(0xE9,0x81,0x8E),
+     o3(0xE9,0x8D,0x8B), o3(0xE9,0xA1,0x86),
+     o3(0xE5,0xBB,0x93), o3(0xE6,0xA7,0xA8),
+     o3(0xE8,0x97,0xBF), o3(0xE9,0x83,0xAD),
+     o3(0xEF,0xA4,0x85), o3(0xE5,0x86,0xA0),
+     o3(0xE5,0xAE,0x98), o3(0xE5,0xAF,0xAC),
+     o3(0xE6,0x85,0xA3), o3(0xE6,0xA3,0xBA),
+     o3(0xE6,0xAC,0xBE), o3(0xE7,0x81,0x8C),
+     o3(0xE7,0x90,0xAF), o3(0xE7,0x93,0x98),
+     o3(0xE7,0xAE,0xA1), o3(0xE7,0xBD,0x90),
+     o3(0xE8,0x8F,0x85), o3(0xE8,0xA7,0x80),
+     o3(0xE8,0xB2,0xAB), o3(0xE9,0x97,0x9C),
+     o3(0xE9,0xA4,0xA8), o3(0xE5,0x88,0xAE),
+     o3(0xE6,0x81,0x9D), o3(0xE6,0x8B,0xAC),
+     o3(0xE9,0x80,0x82), o3(0xE4,0xBE,0x8A),
+     o3(0xE5,0x85,0x89), o3(0xE5,0x8C,0xA1),
+     o3(0xE5,0xA3,0x99), o3(0xE5,0xBB,0xA3),
+     o3(0xE6,0x9B,0xA0), o3(0xE6,0xB4,0xB8),
+     o3(0xE7,0x82,0x9A), o3(0xE7,0x8B,0x82),
+     o3(0xE7,0x8F,0x96), o3(0xE7,0xAD,0x90),
+     o3(0xE8,0x83,0xB1), o3(0xE9,0x91,0x9B),
+     o3(0xE5,0x8D,0xA6), o3(0xE6,0x8E,0x9B),
+     o3(0xE7,0xBD,0xAB), o3(0xE4,0xB9,0x96),
+     o3(0xE5,0x82,0x80), o3(0xE5,0xA1,0x8A),
+     o3(0xE5,0xA3,0x9E), o3(0xE6,0x80,0xAA),
+     o3(0xE6,0x84,0xA7), o3(0xE6,0x8B,0x90),
+     o3(0xE6,0xA7,0x90), o3(0xE9,0xAD,0x81),
+     o3(0xE5,0xAE,0x8F), o3(0xE7,0xB4,0x98),
+     o3(0xE8,0x82,0xB1), o3(0xE8,0xBD,0x9F),
+     o3(0xE4,0xBA,0xA4), o3(0xE5,0x83,0x91),
+     o3(0xE5,0x92,0xAC), o3(0xE5,0x96,0xAC),
+     o3(0xE5,0xAC,0x8C), o3(0xE5,0xB6,0xA0),
+     o3(0xE5,0xB7,0xA7), o3(0xE6,0x94,0xAA),
+     o3(0xE6,0x95,0x8E), o3(0xE6,0xA0,0xA1),
+     o3(0xE6,0xA9,0x8B), o3(0xE7,0x8B,0xA1),
+     o3(0xE7,0x9A,0x8E), o3(0xE7,0x9F,0xAF),
+     o3(0xE7,0xB5,0x9E), o3(0xE7,0xBF,0xB9),
+     o3(0xE8,0x86,0xA0), o3(0xE8,0x95,0x8E),
+     o3(0xE8,0x9B,0x9F), o3(0xE8,0xBC,0x83),
+     o3(0xE8,0xBD,0x8E), o3(0xE9,0x83,0x8A),
+     o3(0xE9,0xA4,0x83), o3(0xE9,0xA9,0x95),
+     o3(0xE9,0xAE,0xAB), o3(0xE4,0xB8,0x98),
+     o3(0xE4,0xB9,0x85), o3(0xE4,0xB9,0x9D),
+     o3(0xE4,0xBB,0x87), o3(0xE4,0xBF,0xB1),
+     o3(0xE5,0x85,0xB7), o3(0xE5,0x8B,0xBE),
+
+#define from_CP949_CE WORDINDEX2INFO(44480)
+    from_CP949_C7_offsets,
+    from_CP949_CE_infos,
+
+#define from_CP949_CF_infos WORDINDEX2INFO(44482)
+                INVALID,              UNDEF,
+     o3(0xE5,0x8D,0x80), o3(0xE5,0x8F,0xA3),
+     o3(0xE5,0x8F,0xA5), o3(0xE5,0x92,0x8E),
+     o3(0xE5,0x98,0x94), o3(0xE5,0x9D,0xB5),
+     o3(0xE5,0x9E,0xA2), o3(0xE5,0xAF,0x87),
+     o3(0xE5,0xB6,0x87), o3(0xE5,0xBB,0x90),
+     o3(0xE6,0x87,0xBC), o3(0xE6,0x8B,0x98),
+     o3(0xE6,0x95,0x91), o3(0xE6,0x9E,0xB8),
+     o3(0xE6,0x9F,0xA9), o3(0xE6,0xA7,0x8B),
+     o3(0xE6,0xAD,0x90), o3(0xE6,0xAF,0x86),
+     o3(0xE6,0xAF,0xAC), o3(0xE6,0xB1,0x82),
+     o3(0xE6,0xBA,0x9D), o3(0xE7,0x81,0xB8),
+     o3(0xE7,0x8B,0x97), o3(0xE7,0x8E,0x96),
+     o3(0xE7,0x90,0x83), o3(0xE7,0x9E,0xBF),
+     o3(0xE7,0x9F,0xA9), o3(0xE7,0xA9,0xB6),
+     o3(0xE7,0xB5,0xBF), o3(0xE8,0x80,0x89),
+     o3(0xE8,0x87,0xBC), o3(0xE8,0x88,0x85),
+     o3(0xE8,0x88,0x8A), o3(0xE8,0x8B,0x9F),
+     o3(0xE8,0xA1,0xA2), o3(0xE8,0xAC,0xB3),
+     o3(0xE8,0xB3,0xBC), o3(0xE8,0xBB,0x80),
+     o3(0xE9,0x80,0x91), o3(0xE9,0x82,0xB1),
+     o3(0xE9,0x89,0xA4), o3(0xE9,0x8A,0xB6),
+     o3(0xE9,0xA7,0x92), o3(0xE9,0xA9,0x85),
+     o3(0xE9,0xB3,0xA9), o3(0xE9,0xB7,0x97),
+     o3(0xE9,0xBE,0x9C), o3(0xE5,0x9C,0x8B),
+     o3(0xE5,0xB1,0x80), o3(0xE8,0x8F,0x8A),
+     o3(0xE9,0x9E,0xA0), o3(0xE9,0x9E,0xAB),
+     o3(0xE9,0xBA,0xB4), o3(0xE5,0x90,0x9B),
+     o3(0xE7,0xAA,0x98), o3(0xE7,0xBE,0xA4),
+     o3(0xE8,0xA3,0x99), o3(0xE8,0xBB,0x8D),
+     o3(0xE9,0x83,0xA1), o3(0xE5,0xA0,0x80),
+     o3(0xE5,0xB1,0x88), o3(0xE6,0x8E,0x98),
+     o3(0xE7,0xAA,0x9F), o3(0xE5,0xAE,0xAE),
+     o3(0xE5,0xBC,0x93), o3(0xE7,0xA9,0xB9),
+     o3(0xE7,0xAA,0xAE), o3(0xE8,0x8A,0x8E),
+     o3(0xE8,0xBA,0xAC), o3(0xE5,0x80,0xA6),
+     o3(0xE5,0x88,0xB8), o3(0xE5,0x8B,0xB8),
+     o3(0xE5,0x8D,0xB7), o3(0xE5,0x9C,0x88),
+     o3(0xE6,0x8B,0xB3), o3(0xE6,0x8D,0xB2),
+     o3(0xE6,0xAC,0x8A), o3(0xE6,0xB7,0x83),
+     o3(0xE7,0x9C,0xB7), o3(0xE5,0x8E,0xA5),
+     o3(0xE7,0x8D,0x97), o3(0xE8,0x95,0xA8),
+     o3(0xE8,0xB9,0xB6), o3(0xE9,0x97,0x95),
+     o3(0xE6,0x9C,0xBA), o3(0xE6,0xAB,0x83),
+     o3(0xE6,0xBD,0xB0), o3(0xE8,0xA9,0xAD),
+     o3(0xE8,0xBB,0x8C), o3(0xE9,0xA5,0x8B),
+     o3(0xEF,0xA4,0x86), o3(0xE6,0x99,0xB7),
+     o3(0xE6,0xAD,0xB8), o3(0xE8,0xB2,0xB4),
+
+#define from_CP949_CF WORDINDEX2INFO(44578)
+    from_CP949_C7_offsets,
+    from_CP949_CF_infos,
+
+#define from_CP949_D0_infos WORDINDEX2INFO(44580)
+                INVALID,              UNDEF,
+     o3(0xE9,0xAC,0xBC), o3(0xEF,0xA4,0x87),
+     o3(0xE5,0x8F,0xAB), o3(0xE5,0x9C,0xAD),
+     o3(0xE5,0xA5,0x8E), o3(0xE6,0x8F,0x86),
+     o3(0xE6,0xA7,0xBB), o3(0xE7,0x8F,0xAA),
+     o3(0xE7,0xA1,0x85), o3(0xE7,0xAA,0xBA),
+     o3(0xE7,0xAB,0x85), o3(0xE7,0xB3,0xBE),
+     o3(0xE8,0x91,0xB5), o3(0xE8,0xA6,0x8F),
+     o3(0xE8,0xB5,0xB3), o3(0xE9,0x80,0xB5),
+     o3(0xE9,0x96,0xA8), o3(0xE5,0x8B,0xBB),
+     o3(0xE5,0x9D,0x87), o3(0xE7,0x95,0x87),
+     o3(0xE7,0xAD,0xA0), o3(0xE8,0x8F,0x8C),
+     o3(0xE9,0x88,0x9E), o3(0xEF,0xA4,0x88),
+     o3(0xE6,0xA9,0x98), o3(0xE5,0x85,0x8B),
+     o3(0xE5,0x89,0x8B), o3(0xE5,0x8A,0x87),
+     o3(0xE6,0x88,0x9F), o3(0xE6,0xA3,0x98),
+     o3(0xE6,0xA5,0xB5), o3(0xE9,0x9A,0x99),
+     o3(0xE5,0x83,0x85), o3(0xE5,0x8A,0xA4),
+     o3(0xE5,0x8B,0xA4), o3(0xE6,0x87,0x83),
+     o3(0xE6,0x96,0xA4), o3(0xE6,0xA0,0xB9),
+     o3(0xE6,0xA7,0xBF), o3(0xE7,0x91,0xBE),
+     o3(0xE7,0xAD,0x8B), o3(0xE8,0x8A,0xB9),
+     o3(0xE8,0x8F,0xAB), o3(0xE8,0xA6,0xB2),
+     o3(0xE8,0xAC,0xB9), o3(0xE8,0xBF,0x91),
+     o3(0xE9,0xA5,0x89), o3(0xEF,0xA4,0x89),
+     o3(0xE4,0xBB,0x8A), o3(0xE5,0xA6,0x97),
+     o3(0xE6,0x93,0x92), o3(0xE6,0x98,0x91),
+     o3(0xE6,0xAA,0x8E), o3(0xE7,0x90,0xB4),
+     o3(0xE7,0xA6,0x81), o3(0xE7,0xA6,0xBD),
+     o3(0xE8,0x8A,0xA9), o3(0xE8,0xA1,0xBE),
+     o3(0xE8,0xA1,0xBF), o3(0xE8,0xA5,0x9F),
+     o3(0xEF,0xA4,0x8A), o3(0xE9,0x8C,0xA6),
+     o3(0xE4,0xBC,0x8B), o3(0xE5,0x8F,0x8A),
+     o3(0xE6,0x80,0xA5), o3(0xE6,0x89,0xB1),
+     o3(0xE6,0xB1,0xB2), o3(0xE7,0xB4,0x9A),
+     o3(0xE7,0xB5,0xA6), o3(0xE4,0xBA,0x98),
+     o3(0xE5,0x85,0xA2), o3(0xE7,0x9F,0x9C),
+     o3(0xE8,0x82,0xAF), o3(0xE4,0xBC,0x81),
+     o3(0xE4,0xBC,0x8E), o3(0xE5,0x85,0xB6),
+     o3(0xE5,0x86,0x80), o3(0xE5,0x97,0x9C),
+     o3(0xE5,0x99,0xA8), o3(0xE5,0x9C,0xBB),
+     o3(0xE5,0x9F,0xBA), o3(0xE5,0x9F,0xBC),
+     o3(0xE5,0xA4,0x94), o3(0xE5,0xA5,0x87),
+     o3(0xE5,0xA6,0x93), o3(0xE5,0xAF,0x84),
+     o3(0xE5,0xB2,0x90), o3(0xE5,0xB4,0x8E),
+     o3(0xE5,0xB7,0xB1), o3(0xE5,0xB9,0xBE),
+     o3(0xE5,0xBF,0x8C), o3(0xE6,0x8A,0x80),
+     o3(0xE6,0x97,0x97), o3(0xE6,0x97,0xA3),
+
+#define from_CP949_D0 WORDINDEX2INFO(44676)
+    from_CP949_C7_offsets,
+    from_CP949_D0_infos,
+
+#define from_CP949_D1_infos WORDINDEX2INFO(44678)
+                INVALID,              UNDEF,
+     o3(0xE6,0x9C,0x9E), o3(0xE6,0x9C,0x9F),
+     o3(0xE6,0x9D,0x9E), o3(0xE6,0xA3,0x8B),
+     o3(0xE6,0xA3,0x84), o3(0xE6,0xA9,0x9F),
+     o3(0xE6,0xAC,0xBA), o3(0xE6,0xB0,0xA3),
+     o3(0xE6,0xB1,0xBD), o3(0xE6,0xB2,0x82),
+     o3(0xE6,0xB7,0x87), o3(0xE7,0x8E,0x98),
+     o3(0xE7,0x90,0xA6), o3(0xE7,0x90,0xAA),
+     o3(0xE7,0x92,0x82), o3(0xE7,0x92,0xA3),
+     o3(0xE7,0x95,0xB8), o3(0xE7,0x95,0xBF),
+     o3(0xE7,0xA2,0x81), o3(0xE7,0xA3,0xAF),
+     o3(0xE7,0xA5,0x81), o3(0xE7,0xA5,0x87),
+     o3(0xE7,0xA5,0x88), o3(0xE7,0xA5,0xBA),
+     o3(0xE7,0xAE,0x95), o3(0xE7,0xB4,0x80),
+     o3(0xE7,0xB6,0xBA), o3(0xE7,0xBE,0x88),
+     o3(0xE8,0x80,0x86), o3(0xE8,0x80,0xAD),
+     o3(0xE8,0x82,0x8C), o3(0xE8,0xA8,0x98),
+     o3(0xE8,0xAD,0x8F), o3(0xE8,0xB1,0x88),
+     o3(0xE8,0xB5,0xB7), o3(0xE9,0x8C,0xA1),
+     o3(0xE9,0x8C,0xA4), o3(0xE9,0xA3,0xA2),
+     o3(0xE9,0xA5,0x91), o3(0xE9,0xA8,0x8E),
+     o3(0xE9,0xA8,0x8F), o3(0xE9,0xA9,0xA5),
+     o3(0xE9,0xBA,0x92), o3(0xE7,0xB7,0x8A),
+     o3(0xE4,0xBD,0xB6), o3(0xE5,0x90,0x89),
+     o3(0xE6,0x8B,0xAE), o3(0xE6,0xA1,0x94),
+     o3(0xE9,0x87,0x91), o3(0xE5,0x96,0xAB),
+     o3(0xE5,0x84,0xBA), o3(0xEF,0xA4,0x8B),
+     o3(0xEF,0xA4,0x8C), o3(0xE5,0xA8,0x9C),
+     o3(0xE6,0x87,0xA6), o3(0xEF,0xA4,0x8D),
+     o3(0xE6,0x8B,0x8F), o3(0xE6,0x8B,0xBF),
+     o3(0xEF,0xA4,0x8E), o3(0xEF,0xA4,0x8F),
+     o3(0xEF,0xA4,0x90), o3(0xEF,0xA4,0x91),
+     o3(0xEF,0xA4,0x92), o3(0xEF,0xA4,0x93),
+     o3(0xE9,0x82,0xA3), o3(0xEF,0xA4,0x94),
+     o3(0xEF,0xA4,0x95), o3(0xEF,0xA4,0x96),
+     o3(0xEF,0xA4,0x97), o3(0xEF,0xA4,0x98),
+     o3(0xE8,0xAB,0xBE), o3(0xEF,0xA4,0x99),
+     o3(0xEF,0xA4,0x9A), o3(0xEF,0xA4,0x9B),
+     o3(0xEF,0xA4,0x9C), o3(0xE6,0x9A,0x96),
+     o3(0xEF,0xA4,0x9D), o3(0xE7,0x85,0x96),
+     o3(0xEF,0xA4,0x9E), o3(0xEF,0xA4,0x9F),
+     o3(0xE9,0x9B,0xA3), o3(0xEF,0xA4,0xA0),
+     o3(0xE6,0x8D,0x8F), o3(0xE6,0x8D,0xBA),
+     o3(0xE5,0x8D,0x97), o3(0xEF,0xA4,0xA1),
+     o3(0xE6,0x9E,0x8F), o3(0xE6,0xA5,0xA0),
+     o3(0xE6,0xB9,0xB3), o3(0xEF,0xA4,0xA2),
+     o3(0xE7,0x94,0xB7), o3(0xEF,0xA4,0xA3),
+     o3(0xEF,0xA4,0xA4), o3(0xEF,0xA4,0xA5),
+
+#define from_CP949_D1 WORDINDEX2INFO(44774)
+    from_CP949_C7_offsets,
+    from_CP949_D1_infos,
+
+#define from_CP949_D2_infos WORDINDEX2INFO(44776)
+                INVALID,              UNDEF,
+     o3(0xE7,0xB4,0x8D), o3(0xEF,0xA4,0xA6),
+     o3(0xEF,0xA4,0xA7), o3(0xE8,0xA1,0xB2),
+     o3(0xE5,0x9B,0x8A), o3(0xE5,0xA8,0x98),
+     o3(0xEF,0xA4,0xA8), o3(0xEF,0xA4,0xA9),
+     o3(0xEF,0xA4,0xAA), o3(0xEF,0xA4,0xAB),
+     o3(0xEF,0xA4,0xAC), o3(0xE4,0xB9,0x83),
+     o3(0xEF,0xA4,0xAD), o3(0xE5,0x85,0xA7),
+     o3(0xE5,0xA5,0x88), o3(0xE6,0x9F,0xB0),
+     o3(0xE8,0x80,0x90), o3(0xEF,0xA4,0xAE),
+     o3(0xE5,0xA5,0xB3), o3(0xE5,0xB9,0xB4),
+     o3(0xE6,0x92,0x9A), o3(0xE7,0xA7,0x8A),
+     o3(0xE5,0xBF,0xB5), o3(0xE6,0x81,0xAC),
+     o3(0xE6,0x8B,0x88), o3(0xE6,0x8D,0xBB),
+     o3(0xE5,0xAF,0xA7), o3(0xE5,0xAF,0x97),
+     o3(0xE5,0x8A,0xAA), o3(0xEF,0xA4,0xAF),
+     o3(0xE5,0xA5,0xB4), o3(0xE5,0xBC,0xA9),
+     o3(0xE6,0x80,0x92), o3(0xEF,0xA4,0xB0),
+     o3(0xEF,0xA4,0xB1), o3(0xEF,0xA4,0xB2),
+     o3(0xE7,0x91,0x99), o3(0xEF,0xA4,0xB3),
+     o3(0xEF,0xA4,0xB4), o3(0xEF,0xA4,0xB5),
+     o3(0xEF,0xA4,0xB6), o3(0xEF,0xA4,0xB7),
+     o3(0xEF,0xA4,0xB8), o3(0xE9,0xA7,0x91),
+     o3(0xEF,0xA4,0xB9), o3(0xEF,0xA4,0xBA),
+     o3(0xEF,0xA4,0xBB), o3(0xEF,0xA4,0xBC),
+     o3(0xEF,0xA4,0xBD), o3(0xEF,0xA4,0xBE),
+     o3(0xEF,0xA4,0xBF), o3(0xEF,0xA5,0x80),
+     o3(0xEF,0xA5,0x81), o3(0xEF,0xA5,0x82),
+     o3(0xEF,0xA5,0x83), o3(0xE6,0xBF,0x83),
+     o3(0xEF,0xA5,0x84), o3(0xEF,0xA5,0x85),
+     o3(0xE8,0x86,0xBF), o3(0xE8,0xBE,0xB2),
+     o3(0xE6,0x83,0xB1), o3(0xEF,0xA5,0x86),
+     o3(0xEF,0xA5,0x87), o3(0xE8,0x85,0xA6),
+     o3(0xEF,0xA5,0x88), o3(0xEF,0xA5,0x89),
+     o3(0xE5,0xB0,0xBF), o3(0xEF,0xA5,0x8A),
+     o3(0xEF,0xA5,0x8B), o3(0xEF,0xA5,0x8C),
+     o3(0xEF,0xA5,0x8D), o3(0xEF,0xA5,0x8E),
+     o3(0xEF,0xA5,0x8F), o3(0xEF,0xA5,0x90),
+     o3(0xEF,0xA5,0x91), o3(0xE5,0xAB,0xA9),
+     o3(0xE8,0xA8,0xA5), o3(0xE6,0x9D,0xBB),
+     o3(0xE7,0xB4,0x90), o3(0xEF,0xA5,0x92),
+     o3(0xEF,0xA5,0x93), o3(0xEF,0xA5,0x94),
+     o3(0xEF,0xA5,0x95), o3(0xEF,0xA5,0x96),
+     o3(0xEF,0xA5,0x97), o3(0xE8,0x83,0xBD),
+     o3(0xEF,0xA5,0x98), o3(0xEF,0xA5,0x99),
+     o3(0xE5,0xB0,0xBC), o3(0xE6,0xB3,0xA5),
+     o3(0xE5,0x8C,0xBF), o3(0xE6,0xBA,0xBA),
+     o3(0xE5,0xA4,0x9A), o3(0xE8,0x8C,0xB6),
+
+#define from_CP949_D2 WORDINDEX2INFO(44872)
+    from_CP949_C7_offsets,
+    from_CP949_D2_infos,
+
+#define from_CP949_D3_infos WORDINDEX2INFO(44874)
+                INVALID,              UNDEF,
+     o3(0xE4,0xB8,0xB9), o3(0xE4,0xBA,0xB6),
+     o3(0xE4,0xBD,0x86), o3(0xE5,0x96,0xAE),
+     o3(0xE5,0x9C,0x98), o3(0xE5,0xA3,0x87),
+     o3(0xE5,0xBD,0x96), o3(0xE6,0x96,0xB7),
+     o3(0xE6,0x97,0xA6), o3(0xE6,0xAA,0x80),
+     o3(0xE6,0xAE,0xB5), o3(0xE6,0xB9,0x8D),
+     o3(0xE7,0x9F,0xAD), o3(0xE7,0xAB,0xAF),
+     o3(0xE7,0xB0,0x9E), o3(0xE7,0xB7,0x9E),
+     o3(0xE8,0x9B,0x8B), o3(0xE8,0xA2,0x92),
+     o3(0xE9,0x84,0xB2), o3(0xE9,0x8D,0x9B),
+     o3(0xE6,0x92,0xBB), o3(0xE6,0xBE,0xBE),
+     o3(0xE7,0x8D,0xBA), o3(0xE7,0x96,0xB8),
+     o3(0xE9,0x81,0x94), o3(0xE5,0x95,0x96),
+     o3(0xE5,0x9D,0x8D), o3(0xE6,0x86,0xBA),
+     o3(0xE6,0x93,0x94), o3(0xE6,0x9B,0x87),
+     o3(0xE6,0xB7,0xA1), o3(0xE6,0xB9,0x9B),
+     o3(0xE6,0xBD,0xAD), o3(0xE6,0xBE,0xB9),
+     o3(0xE7,0x97,0xB0), o3(0xE8,0x81,0x83),
+     o3(0xE8,0x86,0xBD), o3(0xE8,0x95,0x81),
+     o3(0xE8,0xA6,0x83), o3(0xE8,0xAB,0x87),
+     o3(0xE8,0xAD,0x9A), o3(0xE9,0x8C,0x9F),
+     o3(0xE6,0xB2,0x93), o3(0xE7,0x95,0x93),
+     o3(0xE7,0xAD,0x94), o3(0xE8,0xB8,0x8F),
+     o3(0xE9,0x81,0x9D), o3(0xE5,0x94,0x90),
+     o3(0xE5,0xA0,0x82), o3(0xE5,0xA1,0x98),
+     o3(0xE5,0xB9,0xA2), o3(0xE6,0x88,0x87),
+     o3(0xE6,0x92,0x9E), o3(0xE6,0xA3,0xA0),
+     o3(0xE7,0x95,0xB6), o3(0xE7,0xB3,0x96),
+     o3(0xE8,0x9E,0xB3), o3(0xE9,0xBB,0xA8),
+     o3(0xE4,0xBB,0xA3), o3(0xE5,0x9E,0x88),
+     o3(0xE5,0x9D,0xAE), o3(0xE5,0xA4,0xA7),
+     o3(0xE5,0xB0,0x8D), o3(0xE5,0xB2,0xB1),
+     o3(0xE5,0xB8,0xB6), o3(0xE5,0xBE,0x85),
+     o3(0xE6,0x88,0xB4), o3(0xE6,0x93,0xA1),
+     o3(0xE7,0x8E,0xB3), o3(0xE8,0x87,0xBA),
+     o3(0xE8,0xA2,0x8B), o3(0xE8,0xB2,0xB8),
+     o3(0xE9,0x9A,0x8A), o3(0xE9,0xBB,0x9B),
+     o3(0xE5,0xAE,0x85), o3(0xE5,0xBE,0xB7),
+     o3(0xE6,0x82,0xB3), o3(0xE5,0x80,0x92),
+     o3(0xE5,0x88,0x80), o3(0xE5,0x88,0xB0),
+     o3(0xE5,0x9C,0x96), o3(0xE5,0xA0,0xB5),
+     o3(0xE5,0xA1,0x97), o3(0xE5,0xB0,0x8E),
+     o3(0xE5,0xB1,0xA0), o3(0xE5,0xB3,0xB6),
+     o3(0xE5,0xB6,0x8B), o3(0xE5,0xBA,0xA6),
+     o3(0xE5,0xBE,0x92), o3(0xE6,0x82,0xBC),
+     o3(0xE6,0x8C,0x91), o3(0xE6,0x8E,0x89),
+     o3(0xE6,0x90,0x97), o3(0xE6,0xA1,0x83),
+
+#define from_CP949_D3 WORDINDEX2INFO(44970)
+    from_CP949_C7_offsets,
+    from_CP949_D3_infos,
+
+#define from_CP949_D4_infos WORDINDEX2INFO(44972)
+                INVALID,              UNDEF,
+     o3(0xE6,0xA3,0xB9), o3(0xE6,0xAB,0x82),
+     o3(0xE6,0xB7,0x98), o3(0xE6,0xB8,0xA1),
+     o3(0xE6,0xBB,0x94), o3(0xE6,0xBF,0xA4),
+     o3(0xE7,0x87,0xBE), o3(0xE7,0x9B,0x9C),
+     o3(0xE7,0x9D,0xB9), o3(0xE7,0xA6,0xB1),
+     o3(0xE7,0xA8,0xBB), o3(0xE8,0x90,0x84),
+     o3(0xE8,0xA6,0xA9), o3(0xE8,0xB3,0xAD),
+     o3(0xE8,0xB7,0xB3), o3(0xE8,0xB9,0x88),
+     o3(0xE9,0x80,0x83), o3(0xE9,0x80,0x94),
+     o3(0xE9,0x81,0x93), o3(0xE9,0x83,0xBD),
+     o3(0xE9,0x8D,0x8D), o3(0xE9,0x99,0xB6),
+     o3(0xE9,0x9F,0x9C), o3(0xE6,0xAF,0x92),
+     o3(0xE7,0x80,0x86), o3(0xE7,0x89,0x98),
+     o3(0xE7,0x8A,0xA2), o3(0xE7,0x8D,0xA8),
+     o3(0xE7,0x9D,0xA3), o3(0xE7,0xA6,0xBF),
+     o3(0xE7,0xAF,0xA4), o3(0xE7,0xBA,0x9B),
+     o3(0xE8,0xAE,0x80), o3(0xE5,0xA2,0xA9),
+     o3(0xE6,0x83,0x87), o3(0xE6,0x95,0xA6),
+     o3(0xE6,0x97,0xBD), o3(0xE6,0x9A,0xBE),
+     o3(0xE6,0xB2,0x8C), o3(0xE7,0x84,0x9E),
+     o3(0xE7,0x87,0x89), o3(0xE8,0xB1,0x9A),
+     o3(0xE9,0xA0,0x93), o3(0xE4,0xB9,0xAD),
+     o3(0xE7,0xAA,0x81), o3(0xE4,0xBB,0x9D),
+     o3(0xE5,0x86,0xAC), o3(0xE5,0x87,0x8D),
+     o3(0xE5,0x8B,0x95), o3(0xE5,0x90,0x8C),
+     o3(0xE6,0x86,0xA7), o3(0xE6,0x9D,0xB1),
+     o3(0xE6,0xA1,0x90), o3(0xE6,0xA3,0x9F),
+     o3(0xE6,0xB4,0x9E), o3(0xE6,0xBD,0xBC),
+     o3(0xE7,0x96,0xBC), o3(0xE7,0x9E,0xB3),
+     o3(0xE7,0xAB,0xA5), o3(0xE8,0x83,0xB4),
+     o3(0xE8,0x91,0xA3), o3(0xE9,0x8A,0x85),
+     o3(0xE5,0x85,0x9C), o3(0xE6,0x96,0x97),
+     o3(0xE6,0x9D,0x9C), o3(0xE6,0x9E,0x93),
+     o3(0xE7,0x97,0x98), o3(0xE7,0xAB,0x87),
+     o3(0xE8,0x8D,0xB3), o3(0xEF,0xA5,0x9A),
+     o3(0xE8,0xB1,0x86), o3(0xE9,0x80,0x97),
+     o3(0xE9,0xA0,0xAD), o3(0xE5,0xB1,0xAF),
+     o3(0xE8,0x87,0x80), o3(0xE8,0x8A,0x9A),
+     o3(0xE9,0x81,0x81), o3(0xE9,0x81,0xAF),
+     o3(0xE9,0x88,0x8D), o3(0xE5,0xBE,0x97),
+     o3(0xE5,0xB6,0x9D), o3(0xE6,0xA9,0x99),
+     o3(0xE7,0x87,0x88), o3(0xE7,0x99,0xBB),
+     o3(0xE7,0xAD,0x89), o3(0xE8,0x97,0xA4),
+     o3(0xE8,0xAC,0x84), o3(0xE9,0x84,0xA7),
+     o3(0xE9,0xA8,0xB0), o3(0xE5,0x96,0x87),
+     o3(0xE6,0x87,0xB6), o3(0xEF,0xA5,0x9B),
+     o3(0xE7,0x99,0xA9), o3(0xE7,0xBE,0x85),
+
+#define from_CP949_D4 WORDINDEX2INFO(45068)
+    from_CP949_C7_offsets,
+    from_CP949_D4_infos,
+
+#define from_CP949_D5_infos WORDINDEX2INFO(45070)
+                INVALID,              UNDEF,
+     o3(0xE8,0x98,0xBF), o3(0xE8,0x9E,0xBA),
+     o3(0xE8,0xA3,0xB8), o3(0xE9,0x82,0x8F),
+     o3(0xEF,0xA5,0x9C), o3(0xE6,0xB4,0x9B),
+     o3(0xE7,0x83,0x99), o3(0xE7,0x8F,0x9E),
+     o3(0xE7,0xB5,0xA1), o3(0xE8,0x90,0xBD),
+     o3(0xEF,0xA5,0x9D), o3(0xE9,0x85,0xAA),
+     o3(0xE9,0xA7,0xB1), o3(0xEF,0xA5,0x9E),
+     o3(0xE4,0xBA,0x82), o3(0xE5,0x8D,0xB5),
+     o3(0xE6,0xAC,0x84), o3(0xE6,0xAC,0x92),
+     o3(0xE7,0x80,0xBE), o3(0xE7,0x88,0x9B),
+     o3(0xE8,0x98,0xAD), o3(0xE9,0xB8,0x9E),
+     o3(0xE5,0x89,0x8C), o3(0xE8,0xBE,0xA3),
+     o3(0xE5,0xB5,0x90), o3(0xE6,0x93,0xA5),
+     o3(0xE6,0x94,0xAC), o3(0xE6,0xAC,0x96),
+     o3(0xE6,0xBF,0xAB), o3(0xE7,0xB1,0x83),
+     o3(0xE7,0xBA,0x9C), o3(0xE8,0x97,0x8D),
+     o3(0xE8,0xA5,0xA4), o3(0xE8,0xA6,0xBD),
+     o3(0xE6,0x8B,0x89), o3(0xE8,0x87,0x98),
+     o3(0xE8,0xA0,0x9F), o3(0xE5,0xBB,0x8A),
+     o3(0xE6,0x9C,0x97), o3(0xE6,0xB5,0xAA),
+     o3(0xE7,0x8B,0xBC), o3(0xE7,0x90,0x85),
+     o3(0xE7,0x91,0xAF), o3(0xE8,0x9E,0x82),
+     o3(0xE9,0x83,0x9E), o3(0xE4,0xBE,0x86),
+     o3(0xE5,0xB4,0x8D), o3(0xE5,0xBE,0xA0),
+     o3(0xE8,0x90,0x8A), o3(0xE5,0x86,0xB7),
+     o3(0xE6,0x8E,0xA0), o3(0xE7,0x95,0xA5),
+     o3(0xE4,0xBA,0xAE), o3(0xE5,0x80,0x86),
+     o3(0xE5,0x85,0xA9), o3(0xE5,0x87,0x89),
+     o3(0xE6,0xA2,0x81), o3(0xE6,0xA8,0x91),
+     o3(0xE7,0xB2,0xAE), o3(0xE7,0xB2,0xB1),
+     o3(0xE7,0xB3,0xA7), o3(0xE8,0x89,0xAF),
+     o3(0xE8,0xAB,0x92), o3(0xE8,0xBC,0x9B),
+     o3(0xE9,0x87,0x8F), o3(0xE4,0xBE,0xB6),
+     o3(0xE5,0x84,0xB7), o3(0xE5,0x8B,0xB5),
+     o3(0xE5,0x91,0x82), o3(0xE5,0xBB,0xAC),
+     o3(0xE6,0x85,0xAE), o3(0xE6,0x88,0xBE),
+     o3(0xE6,0x97,0x85), o3(0xE6,0xAB,0x9A),
+     o3(0xE6,0xBF,0xBE), o3(0xE7,0xA4,0xAA),
+     o3(0xE8,0x97,0x9C), o3(0xE8,0xA0,0xA3),
+     o3(0xE9,0x96,0xAD), o3(0xE9,0xA9,0xA2),
+     o3(0xE9,0xA9,0xAA), o3(0xE9,0xBA,0x97),
+     o3(0xE9,0xBB,0x8E), o3(0xE5,0x8A,0x9B),
+     o3(0xE6,0x9B,0x86), o3(0xE6,0xAD,0xB7),
+     o3(0xE7,0x80,0x9D), o3(0xE7,0xA4,0xAB),
+     o3(0xE8,0xBD,0xA2), o3(0xE9,0x9D,0x82),
+     o3(0xE6,0x86,0x90), o3(0xE6,0x88,0x80),
+     o3(0xE6,0x94,0xA3), o3(0xE6,0xBC,0xA3),
+
+#define from_CP949_D5 WORDINDEX2INFO(45166)
+    from_CP949_C7_offsets,
+    from_CP949_D5_infos,
+
+#define from_CP949_D6_infos WORDINDEX2INFO(45168)
+                INVALID,              UNDEF,
+     o3(0xE7,0x85,0x89), o3(0xE7,0x92,0x89),
+     o3(0xE7,0xB7,0xB4), o3(0xE8,0x81,0xAF),
+     o3(0xE8,0x93,0xAE), o3(0xE8,0xBC,0xA6),
+     o3(0xE9,0x80,0xA3), o3(0xE9,0x8D,0x8A),
+     o3(0xE5,0x86,0xBD), o3(0xE5,0x88,0x97),
+     o3(0xE5,0x8A,0xA3), o3(0xE6,0xB4,0x8C),
+     o3(0xE7,0x83,0x88), o3(0xE8,0xA3,0x82),
+     o3(0xE5,0xBB,0x89), o3(0xE6,0x96,0x82),
+     o3(0xE6,0xAE,0xAE), o3(0xE6,0xBF,0x82),
+     o3(0xE7,0xB0,0xBE), o3(0xE7,0x8D,0xB5),
+     o3(0xE4,0xBB,0xA4), o3(0xE4,0xBC,0xB6),
+     o3(0xE5,0x9B,0xB9), o3(0xEF,0xA5,0x9F),
+     o3(0xE5,0xB2,0xBA), o3(0xE5,0xB6,0xBA),
+     o3(0xE6,0x80,0x9C), o3(0xE7,0x8E,0xB2),
+     o3(0xE7,0xAC,0xAD), o3(0xE7,0xBE,0x9A),
+     o3(0xE7,0xBF,0x8E), o3(0xE8,0x81,0x86),
+     o3(0xE9,0x80,0x9E), o3(0xE9,0x88,0xB4),
+     o3(0xE9,0x9B,0xB6), o3(0xE9,0x9D,0x88),
+     o3(0xE9,0xA0,0x98), o3(0xE9,0xBD,0xA1),
+     o3(0xE4,0xBE,0x8B), o3(0xE6,0xBE,0xA7),
+     o3(0xE7,0xA6,0xAE), o3(0xE9,0x86,0xB4),
+     o3(0xE9,0x9A,0xB7), o3(0xE5,0x8B,0x9E),
+     o3(0xEF,0xA5,0xA0), o3(0xE6,0x92,0x88),
+     o3(0xE6,0x93,0x84), o3(0xE6,0xAB,0x93),
+     o3(0xE6,0xBD,0x9E), o3(0xE7,0x80,0x98),
+     o3(0xE7,0x88,0x90), o3(0xE7,0x9B,0xA7),
+     o3(0xE8,0x80,0x81), o3(0xE8,0x98,0x86),
+     o3(0xE8,0x99,0x9C), o3(0xE8,0xB7,0xAF),
+     o3(0xE8,0xBC,0x85), o3(0xE9,0x9C,0xB2),
+     o3(0xE9,0xAD,0xAF), o3(0xE9,0xB7,0xBA),
+     o3(0xE9,0xB9,0xB5), o3(0xE7,0xA2,0x8C),
+     o3(0xE7,0xA5,0xBF), o3(0xE7,0xB6,0xA0),
+     o3(0xE8,0x8F,0x89), o3(0xE9,0x8C,0x84),
+     o3(0xE9,0xB9,0xBF), o3(0xE9,0xBA,0x93),
+     o3(0xE8,0xAB,0x96), o3(0xE5,0xA3,0x9F),
+     o3(0xE5,0xBC,0x84), o3(0xE6,0x9C,0xA7),
+     o3(0xE7,0x80,0xA7), o3(0xE7,0x93,0x8F),
+     o3(0xE7,0xB1,0xA0), o3(0xE8,0x81,0xBE),
+     o3(0xE5,0x84,0xA1), o3(0xE7,0x80,0xA8),
+     o3(0xE7,0x89,0xA2), o3(0xE7,0xA3,0x8A),
+     o3(0xE8,0xB3,0x82), o3(0xE8,0xB3,0x9A),
+     o3(0xE8,0xB3,0xB4), o3(0xE9,0x9B,0xB7),
+     o3(0xE4,0xBA,0x86), o3(0xE5,0x83,0x9A),
+     o3(0xE5,0xAF,0xAE), o3(0xE5,0xBB,0x96),
+     o3(0xE6,0x96,0x99), o3(0xE7,0x87,0x8E),
+     o3(0xE7,0x99,0x82), o3(0xE7,0x9E,0xAD),
+     o3(0xE8,0x81,0x8A), o3(0xE8,0x93,0xBC),
+
+#define from_CP949_D6 WORDINDEX2INFO(45264)
+    from_CP949_C7_offsets,
+    from_CP949_D6_infos,
+
+#define from_CP949_D7_infos WORDINDEX2INFO(45266)
+                INVALID,              UNDEF,
+     o3(0xE9,0x81,0xBC), o3(0xE9,0xAC,0xA7),
+     o3(0xE9,0xBE,0x8D), o3(0xE5,0xA3,0x98),
+     o3(0xE5,0xA9,0x81), o3(0xE5,0xB1,0xA2),
+     o3(0xE6,0xA8,0x93), o3(0xE6,0xB7,0x9A),
+     o3(0xE6,0xBC,0x8F), o3(0xE7,0x98,0xBB),
+     o3(0xE7,0xB4,0xAF), o3(0xE7,0xB8,0xB7),
+     o3(0xE8,0x94,0x9E), o3(0xE8,0xA4,0xB8),
+     o3(0xE9,0x8F,0xA4), o3(0xE9,0x99,0x8B),
+     o3(0xE5,0x8A,0x89), o3(0xE6,0x97,0x92),
+     o3(0xE6,0x9F,0xB3), o3(0xE6,0xA6,0xB4),
+     o3(0xE6,0xB5,0x81), o3(0xE6,0xBA,0x9C),
+     o3(0xE7,0x80,0x8F), o3(0xE7,0x90,0x89),
+     o3(0xE7,0x91,0xA0), o3(0xE7,0x95,0x99),
+     o3(0xE7,0x98,0xA4), o3(0xE7,0xA1,0xAB),
+     o3(0xE8,0xAC,0xAC), o3(0xE9,0xA1,0x9E),
+     o3(0xE5,0x85,0xAD), o3(0xE6,0x88,0xAE),
+     o3(0xE9,0x99,0xB8), o3(0xE4,0xBE,0x96),
+     o3(0xE5,0x80,0xAB), o3(0xE5,0xB4,0x99),
+     o3(0xE6,0xB7,0xAA), o3(0xE7,0xB6,0xB8),
+     o3(0xE8,0xBC,0xAA), o3(0xE5,0xBE,0x8B),
+     o3(0xE6,0x85,0x84), o3(0xE6,0xA0,0x97),
+     o3(0xEF,0xA5,0xA1), o3(0xE9,0x9A,0x86),
+     o3(0xE5,0x8B,0x92), o3(0xE8,0x82,0x8B),
+     o3(0xE5,0x87,0x9C), o3(0xE5,0x87,0x8C),
+     o3(0xE6,0xA5,0x9E), o3(0xE7,0xA8,0x9C),
+     o3(0xE7,0xB6,0xBE), o3(0xE8,0x8F,0xB1),
+     o3(0xE9,0x99,0xB5), o3(0xE4,0xBF,0x9A),
+     o3(0xE5,0x88,0xA9), o3(0xE5,0x8E,0x98),
+     o3(0xE5,0x90,0x8F), o3(0xE5,0x94,0x8E),
+     o3(0xE5,0xB1,0xA5), o3(0xE6,0x82,0xA7),
+     o3(0xE6,0x9D,0x8E), o3(0xE6,0xA2,0xA8),
+     o3(0xE6,0xB5,0xAC), o3(0xE7,0x8A,0x81),
+     o3(0xE7,0x8B,0xB8), o3(0xE7,0x90,0x86),
+     o3(0xE7,0x92,0x83), o3(0xEF,0xA5,0xA2),
+     o3(0xE7,0x97,0xA2), o3(0xE7,0xB1,0xAC),
+     o3(0xE7,0xBD,0xB9), o3(0xE7,0xBE,0xB8),
+     o3(0xE8,0x8E,0x89), o3(0xE8,0xA3,0x8F),
+     o3(0xE8,0xA3,0xA1), o3(0xE9,0x87,0x8C),
+     o3(0xE9,0x87,0x90), o3(0xE9,0x9B,0xA2),
+     o3(0xE9,0xAF,0x89), o3(0xE5,0x90,0x9D),
+     o3(0xE6,0xBD,0xBE), o3(0xE7,0x87,0x90),
+     o3(0xE7,0x92,0x98), o3(0xE8,0x97,0xBA),
+     o3(0xE8,0xBA,0xAA), o3(0xE9,0x9A,0xA3),
+     o3(0xE9,0xB1,0x97), o3(0xE9,0xBA,0x9F),
+     o3(0xE6,0x9E,0x97), o3(0xE6,0xB7,0x8B),
+     o3(0xE7,0x90,0xB3), o3(0xE8,0x87,0xA8),
+     o3(0xE9,0x9C,0x96), o3(0xE7,0xA0,0xAC),
+
+#define from_CP949_D7 WORDINDEX2INFO(45362)
+    from_CP949_C7_offsets,
+    from_CP949_D7_infos,
+
+#define from_CP949_D8_infos WORDINDEX2INFO(45364)
+                INVALID,              UNDEF,
+     o3(0xE7,0xAB,0x8B), o3(0xE7,0xAC,0xA0),
+     o3(0xE7,0xB2,0x92), o3(0xE6,0x91,0xA9),
+     o3(0xE7,0x91,0xAA), o3(0xE7,0x97,0xB2),
+     o3(0xE7,0xA2,0xBC), o3(0xE7,0xA3,0xA8),
+     o3(0xE9,0xA6,0xAC), o3(0xE9,0xAD,0x94),
+     o3(0xE9,0xBA,0xBB), o3(0xE5,0xAF,0x9E),
+     o3(0xE5,0xB9,0x95), o3(0xE6,0xBC,0xA0),
+     o3(0xE8,0x86,0x9C), o3(0xE8,0x8E,0xAB),
+     o3(0xE9,0x82,0x88), o3(0xE4,0xB8,0x87),
+     o3(0xE5,0x8D,0x8D), o3(0xE5,0xA8,0xA9),
+     o3(0xE5,0xB7,0x92), o3(0xE5,0xBD,0x8E),
+     o3(0xE6,0x85,0xA2), o3(0xE6,0x8C,0xBD),
+     o3(0xE6,0x99,0xA9), o3(0xE6,0x9B,0xBC),
+     o3(0xE6,0xBB,0xBF), o3(0xE6,0xBC,0xAB),
+     o3(0xE7,0x81,0xA3), o3(0xE7,0x9E,0x9E),
+     o3(0xE8,0x90,0xAC), o3(0xE8,0x94,0x93),
+     o3(0xE8,0xA0,0xBB), o3(0xE8,0xBC,0x93),
+     o3(0xE9,0xA5,0x85), o3(0xE9,0xB0,0xBB),
+     o3(0xE5,0x94,0x9C), o3(0xE6,0x8A,0xB9),
+     o3(0xE6,0x9C,0xAB), o3(0xE6,0xB2,0xAB),
+     o3(0xE8,0x8C,0x89), o3(0xE8,0xA5,0xAA),
+     o3(0xE9,0x9D,0xBA), o3(0xE4,0xBA,0xA1),
+     o3(0xE5,0xA6,0x84), o3(0xE5,0xBF,0x98),
+     o3(0xE5,0xBF,0x99), o3(0xE6,0x9C,0x9B),
+     o3(0xE7,0xB6,0xB2), o3(0xE7,0xBD,0x94),
+     o3(0xE8,0x8A,0x92), o3(0xE8,0x8C,0xAB),
+     o3(0xE8,0x8E,0xBD), o3(0xE8,0xBC,0x9E),
+     o3(0xE9,0x82,0x99), o3(0xE5,0x9F,0x8B),
+     o3(0xE5,0xA6,0xB9), o3(0xE5,0xAA,0x92),
+     o3(0xE5,0xAF,0x90), o3(0xE6,0x98,0xA7),
+     o3(0xE6,0x9E,0x9A), o3(0xE6,0xA2,0x85),
+     o3(0xE6,0xAF,0x8F), o3(0xE7,0x85,0xA4),
+     o3(0xE7,0xBD,0xB5), o3(0xE8,0xB2,0xB7),
+     o3(0xE8,0xB3,0xA3), o3(0xE9,0x82,0x81),
+     o3(0xE9,0xAD,0x85), o3(0xE8,0x84,0x88),
+     o3(0xE8,0xB2,0x8A), o3(0xE9,0x99,0x8C),
+     o3(0xE9,0xA9,0x80), o3(0xE9,0xBA,0xA5),
+     o3(0xE5,0xAD,0x9F), o3(0xE6,0xB0,0x93),
+     o3(0xE7,0x8C,0x9B), o3(0xE7,0x9B,0xB2),
+     o3(0xE7,0x9B,0x9F), o3(0xE8,0x90,0x8C),
+     o3(0xE5,0x86,0xAA), o3(0xE8,0xA6,0x93),
+     o3(0xE5,0x85,0x8D), o3(0xE5,0x86,0x95),
+     o3(0xE5,0x8B,0x89), o3(0xE6,0xA3,0x89),
+     o3(0xE6,0xB2,0x94), o3(0xE7,0x9C,0x84),
+     o3(0xE7,0x9C,0xA0), o3(0xE7,0xB6,0xBF),
+     o3(0xE7,0xB7,0xAC), o3(0xE9,0x9D,0xA2),
+     o3(0xE9,0xBA,0xB5), o3(0xE6,0xBB,0x85),
+
+#define from_CP949_D8 WORDINDEX2INFO(45460)
+    from_CP949_C7_offsets,
+    from_CP949_D8_infos,
+
+#define from_CP949_D9_infos WORDINDEX2INFO(45462)
+                INVALID,              UNDEF,
+     o3(0xE8,0x94,0x91), o3(0xE5,0x86,0xA5),
+     o3(0xE5,0x90,0x8D), o3(0xE5,0x91,0xBD),
+     o3(0xE6,0x98,0x8E), o3(0xE6,0x9A,0x9D),
+     o3(0xE6,0xA4,0xA7), o3(0xE6,0xBA,0x9F),
+     o3(0xE7,0x9A,0xBF), o3(0xE7,0x9E,0x91),
+     o3(0xE8,0x8C,0x97), o3(0xE8,0x93,0x82),
+     o3(0xE8,0x9E,0x9F), o3(0xE9,0x85,0xA9),
+     o3(0xE9,0x8A,0x98), o3(0xE9,0xB3,0xB4),
+     o3(0xE8,0xA2,0x82), o3(0xE4,0xBE,0xAE),
+     o3(0xE5,0x86,0x92), o3(0xE5,0x8B,0x9F),
+     o3(0xE5,0xA7,0x86), o3(0xE5,0xB8,0xBD),
+     o3(0xE6,0x85,0x95), o3(0xE6,0x91,0xB8),
+     o3(0xE6,0x91,0xB9), o3(0xE6,0x9A,0xAE),
+     o3(0xE6,0x9F,0x90), o3(0xE6,0xA8,0xA1),
+     o3(0xE6,0xAF,0x8D), o3(0xE6,0xAF,0x9B),
+     o3(0xE7,0x89,0x9F), o3(0xE7,0x89,0xA1),
+     o3(0xE7,0x91,0x81), o3(0xE7,0x9C,0xB8),
+     o3(0xE7,0x9F,0x9B), o3(0xE8,0x80,0x97),
+     o3(0xE8,0x8A,0xBC), o3(0xE8,0x8C,0x85),
+     o3(0xE8,0xAC,0x80), o3(0xE8,0xAC,0xA8),
+     o3(0xE8,0xB2,0x8C), o3(0xE6,0x9C,0xA8),
+     o3(0xE6,0xB2,0x90), o3(0xE7,0x89,0xA7),
+     o3(0xE7,0x9B,0xAE), o3(0xE7,0x9D,0xA6),
+     o3(0xE7,0xA9,0x86), o3(0xE9,0xB6,0xA9),
+     o3(0xE6,0xAD,0xBF), o3(0xE6,0xB2,0x92),
+     o3(0xE5,0xA4,0xA2), o3(0xE6,0x9C,0xA6),
+     o3(0xE8,0x92,0x99), o3(0xE5,0x8D,0xAF),
+     o3(0xE5,0xA2,0x93), o3(0xE5,0xA6,0x99),
+     o3(0xE5,0xBB,0x9F), o3(0xE6,0x8F,0x8F),
+     o3(0xE6,0x98,0xB4), o3(0xE6,0x9D,0xB3),
+     o3(0xE6,0xB8,0xBA), o3(0xE7,0x8C,0xAB),
+     o3(0xE7,0xAB,0x97), o3(0xE8,0x8B,0x97),
+     o3(0xE9,0x8C,0xA8), o3(0xE5,0x8B,0x99),
+     o3(0xE5,0xB7,0xAB), o3(0xE6,0x86,0xAE),
+     o3(0xE6,0x87,0x8B), o3(0xE6,0x88,0x8A),
+     o3(0xE6,0x8B,0x87), o3(0xE6,0x92,0xAB),
+     o3(0xE6,0x97,0xA0), o3(0xE6,0xA5,0x99),
+     o3(0xE6,0xAD,0xA6), o3(0xE6,0xAF,0x8B),
+     o3(0xE7,0x84,0xA1), o3(0xE7,0x8F,0xB7),
+     o3(0xE7,0x95,0x9D), o3(0xE7,0xB9,0x86),
+     o3(0xE8,0x88,0x9E), o3(0xE8,0x8C,0x82),
+     o3(0xE8,0x95,0xAA), o3(0xE8,0xAA,0xA3),
+     o3(0xE8,0xB2,0xBF), o3(0xE9,0x9C,0xA7),
+     o3(0xE9,0xB5,0xA1), o3(0xE5,0xA2,0xA8),
+     o3(0xE9,0xBB,0x98), o3(0xE5,0x80,0x91),
+     o3(0xE5,0x88,0x8E), o3(0xE5,0x90,0xBB),
+     o3(0xE5,0x95,0x8F), o3(0xE6,0x96,0x87),
+
+#define from_CP949_D9 WORDINDEX2INFO(45558)
+    from_CP949_C7_offsets,
+    from_CP949_D9_infos,
+
+#define from_CP949_DA_infos WORDINDEX2INFO(45560)
+                INVALID,              UNDEF,
+     o3(0xE6,0xB1,0xB6), o3(0xE7,0xB4,0x8A),
+     o3(0xE7,0xB4,0x8B), o3(0xE8,0x81,0x9E),
+     o3(0xE8,0x9A,0x8A), o3(0xE9,0x96,0x80),
+     o3(0xE9,0x9B,0xAF), o3(0xE5,0x8B,0xBF),
+     o3(0xE6,0xB2,0x95), o3(0xE7,0x89,0xA9),
+     o3(0xE5,0x91,0xB3), o3(0xE5,0xAA,0x9A),
+     o3(0xE5,0xB0,0xBE), o3(0xE5,0xB5,0x8B),
+     o3(0xE5,0xBD,0x8C), o3(0xE5,0xBE,0xAE),
+     o3(0xE6,0x9C,0xAA), o3(0xE6,0xA2,0xB6),
+     o3(0xE6,0xA5,0xA3), o3(0xE6,0xB8,0xBC),
+     o3(0xE6,0xB9,0x84), o3(0xE7,0x9C,0x89),
+     o3(0xE7,0xB1,0xB3), o3(0xE7,0xBE,0x8E),
+     o3(0xE8,0x96,0x87), o3(0xE8,0xAC,0x8E),
+     o3(0xE8,0xBF,0xB7), o3(0xE9,0x9D,0xA1),
+     o3(0xE9,0xBB,0xB4), o3(0xE5,0xB2,0xB7),
+     o3(0xE6,0x82,0xB6), o3(0xE6,0x84,0x8D),
+     o3(0xE6,0x86,0xAB), o3(0xE6,0x95,0x8F),
+     o3(0xE6,0x97,0xBB), o3(0xE6,0x97,0xBC),
+     o3(0xE6,0xB0,0x91), o3(0xE6,0xB3,0xAF),
+     o3(0xE7,0x8E,0x9F), o3(0xE7,0x8F,0x89),
+     o3(0xE7,0xB7,0xA1), o3(0xE9,0x96,0x94),
+     o3(0xE5,0xAF,0x86), o3(0xE8,0x9C,0x9C),
+     o3(0xE8,0xAC,0x90), o3(0xE5,0x89,0x9D),
+     o3(0xE5,0x8D,0x9A), o3(0xE6,0x8B,0x8D),
+     o3(0xE6,0x90,0x8F), o3(0xE6,0x92,0xB2),
+     o3(0xE6,0x9C,0xB4), o3(0xE6,0xA8,0xB8),
+     o3(0xE6,0xB3,0x8A), o3(0xE7,0x8F,0x80),
+     o3(0xE7,0x92,0x9E), o3(0xE7,0xAE,0x94),
+     o3(0xE7,0xB2,0x95), o3(0xE7,0xB8,0x9B),
+     o3(0xE8,0x86,0x8A), o3(0xE8,0x88,0xB6),
+     o3(0xE8,0x96,0x84), o3(0xE8,0xBF,0xAB),
+     o3(0xE9,0x9B,0xB9), o3(0xE9,0xA7,0x81),
+     o3(0xE4,0xBC,0xB4), o3(0xE5,0x8D,0x8A),
+     o3(0xE5,0x8F,0x8D), o3(0xE5,0x8F,0x9B),
+     o3(0xE6,0x8B,0x8C), o3(0xE6,0x90,0xAC),
+     o3(0xE6,0x94,0x80), o3(0xE6,0x96,0x91),
+     o3(0xE6,0xA7,0x83), o3(0xE6,0xB3,0xAE),
+     o3(0xE6,0xBD,0x98), o3(0xE7,0x8F,0xAD),
+     o3(0xE7,0x95,0x94), o3(0xE7,0x98,0xA2),
+     o3(0xE7,0x9B,0xA4), o3(0xE7,0x9B,0xBC),
+     o3(0xE7,0xA3,0x90), o3(0xE7,0xA3,0xBB),
+     o3(0xE7,0xA4,0xAC), o3(0xE7,0xB5,0x86),
+     o3(0xE8,0x88,0xAC), o3(0xE8,0x9F,0xA0),
+     o3(0xE8,0xBF,0x94), o3(0xE9,0xA0,0x92),
+     o3(0xE9,0xA3,0xAF), o3(0xE5,0x8B,0x83),
+     o3(0xE6,0x8B,0x94), o3(0xE6,0x92,0xA5),
+     o3(0xE6,0xB8,0xA4), o3(0xE6,0xBD,0x91),
+
+#define from_CP949_DA WORDINDEX2INFO(45656)
+    from_CP949_C7_offsets,
+    from_CP949_DA_infos,
+
+#define from_CP949_DB_infos WORDINDEX2INFO(45658)
+                INVALID,              UNDEF,
+     o3(0xE7,0x99,0xBC), o3(0xE8,0xB7,0x8B),
+     o3(0xE9,0x86,0xB1), o3(0xE9,0x89,0xA2),
+     o3(0xE9,0xAB,0xAE), o3(0xE9,0xAD,0x83),
+     o3(0xE5,0x80,0xA3), o3(0xE5,0x82,0x8D),
+     o3(0xE5,0x9D,0x8A), o3(0xE5,0xA6,0xA8),
+     o3(0xE5,0xB0,0xA8), o3(0xE5,0xB9,0x87),
+     o3(0xE5,0xBD,0xB7), o3(0xE6,0x88,0xBF),
+     o3(0xE6,0x94,0xBE), o3(0xE6,0x96,0xB9),
+     o3(0xE6,0x97,0x81), o3(0xE6,0x98,0x89),
+     o3(0xE6,0x9E,0x8B), o3(0xE6,0xA6,0x9C),
+     o3(0xE6,0xBB,0x82), o3(0xE7,0xA3,0x85),
+     o3(0xE7,0xB4,0xA1), o3(0xE8,0x82,0xAA),
+     o3(0xE8,0x86,0x80), o3(0xE8,0x88,0xAB),
+     o3(0xE8,0x8A,0xB3), o3(0xE8,0x92,0xA1),
+     o3(0xE8,0x9A,0x8C), o3(0xE8,0xA8,0xAA),
+     o3(0xE8,0xAC,0x97), o3(0xE9,0x82,0xA6),
+     o3(0xE9,0x98,0xB2), o3(0xE9,0xBE,0x90),
+     o3(0xE5,0x80,0x8D), o3(0xE4,0xBF,0xB3),
+     o3(0xEF,0xA5,0xA3), o3(0xE5,0x9F,0xB9),
+     o3(0xE5,0xBE,0x98), o3(0xE6,0x8B,0x9C),
+     o3(0xE6,0x8E,0x92), o3(0xE6,0x9D,0xAF),
+     o3(0xE6,0xB9,0x83), o3(0xE7,0x84,0x99),
+     o3(0xE7,0x9B,0x83), o3(0xE8,0x83,0x8C),
+     o3(0xE8,0x83,0x9A), o3(0xE8,0xA3,0xB4),
+     o3(0xE8,0xA3,0xB5), o3(0xE8,0xA4,0x99),
+     o3(0xE8,0xB3,0xA0), o3(0xE8,0xBC,0xA9),
+     o3(0xE9,0x85,0x8D), o3(0xE9,0x99,0xAA),
+     o3(0xE4,0xBC,0xAF), o3(0xE4,0xBD,0xB0),
+     o3(0xE5,0xB8,0x9B), o3(0xE6,0x9F,0x8F),
+     o3(0xE6,0xA0,0xA2), o3(0xE7,0x99,0xBD),
+     o3(0xE7,0x99,0xBE), o3(0xE9,0xAD,0x84),
+     o3(0xE5,0xB9,0xA1), o3(0xE6,0xA8,0x8A),
+     o3(0xE7,0x85,0xA9), o3(0xE7,0x87,0x94),
+     o3(0xE7,0x95,0xAA), o3(0xEF,0xA5,0xA4),
+     o3(0xE7,0xB9,0x81), o3(0xE8,0x95,0x83),
+     o3(0xE8,0x97,0xA9), o3(0xE9,0xA3,0x9C),
+     o3(0xE4,0xBC,0x90), o3(0xE7,0xAD,0x8F),
+     o3(0xE7,0xBD,0xB0), o3(0xE9,0x96,0xA5),
+     o3(0xE5,0x87,0xA1), o3(0xE5,0xB8,0x86),
+     o3(0xE6,0xA2,0xB5), o3(0xE6,0xB0,0xBE),
+     o3(0xE6,0xB1,0x8E), o3(0xE6,0xB3,0x9B),
+     o3(0xE7,0x8A,0xAF), o3(0xE7,0xAF,0x84),
+     o3(0xE8,0x8C,0x83), o3(0xE6,0xB3,0x95),
+     o3(0xE7,0x90,0xBA), o3(0xE5,0x83,0xBB),
+     o3(0xE5,0x8A,0x88), o3(0xE5,0xA3,0x81),
+     o3(0xE6,0x93,0x98), o3(0xE6,0xAA,0x97),
+     o3(0xE7,0x92,0xA7), o3(0xE7,0x99,0x96),
+
+#define from_CP949_DB WORDINDEX2INFO(45754)
+    from_CP949_C7_offsets,
+    from_CP949_DB_infos,
+
+#define from_CP949_DC_infos WORDINDEX2INFO(45756)
+                INVALID,              UNDEF,
+     o3(0xE7,0xA2,0xA7), o3(0xE8,0x98,0x97),
+     o3(0xE9,0x97,0xA2), o3(0xE9,0x9C,0xB9),
+     o3(0xEF,0xA5,0xA5), o3(0xE5,0x8D,0x9E),
+     o3(0xE5,0xBC,0x81), o3(0xE8,0xAE,0x8A),
+     o3(0xE8,0xBE,0xA8), o3(0xE8,0xBE,0xAF),
+     o3(0xE9,0x82,0x8A), o3(0xE5,0x88,0xA5),
+     o3(0xE7,0x9E,0xA5), o3(0xE9,0xB1,0x89),
+     o3(0xE9,0xBC,0x88), o3(0xE4,0xB8,0x99),
+     o3(0xE5,0x80,0x82), o3(0xE5,0x85,0xB5),
+     o3(0xE5,0xB1,0x9B), o3(0xE5,0xB9,0xB7),
+     o3(0xE6,0x98,0x9E), o3(0xE6,0x98,0xBA),
+     o3(0xE6,0x9F,0x84), o3(0xE6,0xA3,0x85),
+     o3(0xE7,0x82,0xB3), o3(0xE7,0x94,0x81),
+     o3(0xE7,0x97,0x85), o3(0xE7,0xA7,0x89),
+     o3(0xE7,0xAB,0x9D), o3(0xE8,0xBC,0xA7),
+     o3(0xE9,0xA4,0xA0), o3(0xE9,0xA8,0x88),
+     o3(0xE4,0xBF,0x9D), o3(0xE5,0xA0,0xA1),
+     o3(0xE5,0xA0,0xB1), o3(0xE5,0xAF,0xB6),
+     o3(0xE6,0x99,0xAE), o3(0xE6,0xAD,0xA5),
+     o3(0xE6,0xB4,0x91), o3(0xE6,0xB9,0xBA),
+     o3(0xE6,0xBD,0xBD), o3(0xE7,0x8F,0xA4),
+     o3(0xE7,0x94,0xAB), o3(0xE8,0x8F,0xA9),
+     o3(0xE8,0xA3,0x9C), o3(0xE8,0xA4,0x93),
+     o3(0xE8,0xAD,0x9C), o3(0xE8,0xBC,0x94),
+     o3(0xE4,0xBC,0x8F), o3(0xE5,0x83,0x95),
+     o3(0xE5,0x8C,0x90), o3(0xE5,0x8D,0x9C),
+     o3(0xE5,0xAE,0x93), o3(0xE5,0xBE,0xA9),
+     o3(0xE6,0x9C,0x8D), o3(0xE7,0xA6,0x8F),
+     o3(0xE8,0x85,0xB9), o3(0xE8,0x8C,0xAF),
+     o3(0xE8,0x94,0x94), o3(0xE8,0xA4,0x87),
+     o3(0xE8,0xA6,0x86), o3(0xE8,0xBC,0xB9),
+     o3(0xE8,0xBC,0xBB), o3(0xE9,0xA6,0xA5),
+     o3(0xE9,0xB0,0x92), o3(0xE6,0x9C,0xAC),
+     o3(0xE4,0xB9,0xB6), o3(0xE4,0xBF,0xB8),
+     o3(0xE5,0xA5,0x89), o3(0xE5,0xB0,0x81),
+     o3(0xE5,0xB3,0xAF), o3(0xE5,0xB3,0xB0),
+     o3(0xE6,0x8D,0xA7), o3(0xE6,0xA3,0x92),
+     o3(0xE7,0x83,0xBD), o3(0xE7,0x86,0xA2),
+     o3(0xE7,0x90,0xAB), o3(0xE7,0xB8,0xAB),
+     o3(0xE8,0x93,0xAC), o3(0xE8,0x9C,0x82),
+     o3(0xE9,0x80,0xA2), o3(0xE9,0x8B,0x92),
+     o3(0xE9,0xB3,0xB3), o3(0xE4,0xB8,0x8D),
+     o3(0xE4,0xBB,0x98), o3(0xE4,0xBF,0xAF),
+     o3(0xE5,0x82,0x85), o3(0xE5,0x89,0x96),
+     o3(0xE5,0x89,0xAF), o3(0xE5,0x90,0xA6),
+     o3(0xE5,0x92,0x90), o3(0xE5,0x9F,0xA0),
+     o3(0xE5,0xA4,0xAB), o3(0xE5,0xA9,0xA6),
+
+#define from_CP949_DC WORDINDEX2INFO(45852)
+    from_CP949_C7_offsets,
+    from_CP949_DC_infos,
+
+#define from_CP949_DD_infos WORDINDEX2INFO(45854)
+                INVALID,              UNDEF,
+     o3(0xE5,0xAD,0x9A), o3(0xE5,0xAD,0xB5),
+     o3(0xE5,0xAF,0x8C), o3(0xE5,0xBA,0x9C),
+     o3(0xEF,0xA5,0xA6), o3(0xE6,0x89,0xB6),
+     o3(0xE6,0x95,0xB7), o3(0xE6,0x96,0xA7),
+     o3(0xE6,0xB5,0xAE), o3(0xE6,0xBA,0xA5),
+     o3(0xE7,0x88,0xB6), o3(0xE7,0xAC,0xA6),
+     o3(0xE7,0xB0,0xBF), o3(0xE7,0xBC,0xB6),
+     o3(0xE8,0x85,0x90), o3(0xE8,0x85,0x91),
+     o3(0xE8,0x86,0x9A), o3(0xE8,0x89,0x80),
+     o3(0xE8,0x8A,0x99), o3(0xE8,0x8E,0xA9),
+     o3(0xE8,0xA8,0x83), o3(0xE8,0xB2,0xA0),
+     o3(0xE8,0xB3,0xA6), o3(0xE8,0xB3,0xBB),
+     o3(0xE8,0xB5,0xB4), o3(0xE8,0xB6,0xBA),
+     o3(0xE9,0x83,0xA8), o3(0xE9,0x87,0x9C),
+     o3(0xE9,0x98,0x9C), o3(0xE9,0x99,0x84),
+     o3(0xE9,0xA7,0x99), o3(0xE9,0xB3,0xA7),
+     o3(0xE5,0x8C,0x97), o3(0xE5,0x88,0x86),
+     o3(0xE5,0x90,0xA9), o3(0xE5,0x99,0xB4),
+     o3(0xE5,0xA2,0xB3), o3(0xE5,0xA5,0x94),
+     o3(0xE5,0xA5,0xAE), o3(0xE5,0xBF,0xBF),
+     o3(0xE6,0x86,0xA4), o3(0xE6,0x89,0xAE),
+     o3(0xE6,0x98,0x90), o3(0xE6,0xB1,0xBE),
+     o3(0xE7,0x84,0x9A), o3(0xE7,0x9B,0x86),
+     o3(0xE7,0xB2,0x89), o3(0xE7,0xB3,0x9E),
+     o3(0xE7,0xB4,0x9B), o3(0xE8,0x8A,0xAC),
+     o3(0xE8,0xB3,0x81), o3(0xE9,0x9B,0xB0),
+     o3(0xEF,0xA5,0xA7), o3(0xE4,0xBD,0x9B),
+     o3(0xE5,0xBC,0x97), o3(0xE5,0xBD,0xBF),
+     o3(0xE6,0x8B,0x82), o3(0xE5,0xB4,0xA9),
+     o3(0xE6,0x9C,0x8B), o3(0xE6,0xA3,0x9A),
+     o3(0xE7,0xA1,0xBC), o3(0xE7,0xB9,0x83),
+     o3(0xE9,0xB5,0xAC), o3(0xE4,0xB8,0x95),
+     o3(0xE5,0x82,0x99), o3(0xE5,0x8C,0x95),
+     o3(0xE5,0x8C,0xAA), o3(0xE5,0x8D,0x91),
+     o3(0xE5,0xA6,0x83), o3(0xE5,0xA9,0xA2),
+     o3(0xE5,0xBA,0x87), o3(0xE6,0x82,0xB2),
+     o3(0xE6,0x86,0x8A), o3(0xE6,0x89,0x89),
+     o3(0xE6,0x89,0xB9), o3(0xE6,0x96,0x90),
+     o3(0xE6,0x9E,0x87), o3(0xE6,0xA6,0xA7),
+     o3(0xE6,0xAF,0x94), o3(0xE6,0xAF,0x96),
+     o3(0xE6,0xAF,0x97), o3(0xE6,0xAF,0x98),
+     o3(0xE6,0xB2,0xB8), o3(0xEF,0xA5,0xA8),
+     o3(0xE7,0x90,0xB5), o3(0xE7,0x97,0xBA),
+     o3(0xE7,0xA0,0x92), o3(0xE7,0xA2,0x91),
+     o3(0xE7,0xA7,0x95), o3(0xE7,0xA7,0x98),
+     o3(0xE7,0xB2,0x83), o3(0xE7,0xB7,0x8B),
+     o3(0xE7,0xBF,0xA1), o3(0xE8,0x82,0xA5),
+
+#define from_CP949_DD WORDINDEX2INFO(45950)
+    from_CP949_C7_offsets,
+    from_CP949_DD_infos,
+
+#define from_CP949_DE_infos WORDINDEX2INFO(45952)
+                INVALID,              UNDEF,
+     o3(0xE8,0x84,0xBE), o3(0xE8,0x87,0x82),
+     o3(0xE8,0x8F,0xB2), o3(0xE8,0x9C,0x9A),
+     o3(0xE8,0xA3,0xA8), o3(0xE8,0xAA,0xB9),
+     o3(0xE8,0xAD,0xAC), o3(0xE8,0xB2,0xBB),
+     o3(0xE9,0x84,0x99), o3(0xE9,0x9D,0x9E),
+     o3(0xE9,0xA3,0x9B), o3(0xE9,0xBC,0xBB),
+     o3(0xE5,0x9A,0xAC), o3(0xE5,0xAC,0xAA),
+     o3(0xE5,0xBD,0xAC), o3(0xE6,0x96,0x8C),
+     o3(0xE6,0xAA,0xB3), o3(0xE6,0xAE,0xAF),
+     o3(0xE6,0xB5,0x9C), o3(0xE6,0xBF,0xB1),
+     o3(0xE7,0x80,0x95), o3(0xE7,0x89,0x9D),
+     o3(0xE7,0x8E,0xAD), o3(0xE8,0xB2,0xA7),
+     o3(0xE8,0xB3,0x93), o3(0xE9,0xA0,0xBB),
+     o3(0xE6,0x86,0x91), o3(0xE6,0xB0,0xB7),
+     o3(0xE8,0x81,0x98), o3(0xE9,0xA8,0x81),
+     o3(0xE4,0xB9,0x8D), o3(0xE4,0xBA,0x8B),
+     o3(0xE4,0xBA,0x9B), o3(0xE4,0xBB,0x95),
+     o3(0xE4,0xBC,0xBA), o3(0xE4,0xBC,0xBC),
+     o3(0xE4,0xBD,0xBF), o3(0xE4,0xBF,0x9F),
+     o3(0xE5,0x83,0xBF), o3(0xE5,0x8F,0xB2),
+     o3(0xE5,0x8F,0xB8), o3(0xE5,0x94,0x86),
+     o3(0xE5,0x97,0xA3), o3(0xE5,0x9B,0x9B),
+     o3(0xE5,0xA3,0xAB), o3(0xE5,0xA5,0xA2),
+     o3(0xE5,0xA8,0x91), o3(0xE5,0xAF,0xAB),
+     o3(0xE5,0xAF,0xBA), o3(0xE5,0xB0,0x84),
+     o3(0xE5,0xB7,0xB3), o3(0xE5,0xB8,0xAB),
+     o3(0xE5,0xBE,0x99), o3(0xE6,0x80,0x9D),
+     o3(0xE6,0x8D,0xA8), o3(0xE6,0x96,0x9C),
+     o3(0xE6,0x96,0xAF), o3(0xE6,0x9F,0xB6),
+     o3(0xE6,0x9F,0xBB), o3(0xE6,0xA2,0xAD),
+     o3(0xE6,0xAD,0xBB), o3(0xE6,0xB2,0x99),
+     o3(0xE6,0xB3,0x97), o3(0xE6,0xB8,0xA3),
+     o3(0xE7,0x80,0x89), o3(0xE7,0x8D,0x85),
+     o3(0xE7,0xA0,0x82), o3(0xE7,0xA4,0xBE),
+     o3(0xE7,0xA5,0x80), o3(0xE7,0xA5,0xA0),
+     o3(0xE7,0xA7,0x81), o3(0xE7,0xAF,0xA9),
+     o3(0xE7,0xB4,0x97), o3(0xE7,0xB5,0xB2),
+     o3(0xE8,0x82,0x86), o3(0xE8,0x88,0x8D),
+     o3(0xE8,0x8E,0x8E), o3(0xE8,0x93,0x91),
+     o3(0xE8,0x9B,0x87), o3(0xE8,0xA3,0x9F),
+     o3(0xE8,0xA9,0x90), o3(0xE8,0xA9,0x9E),
+     o3(0xE8,0xAC,0x9D), o3(0xE8,0xB3,0x9C),
+     o3(0xE8,0xB5,0xA6), o3(0xE8,0xBE,0xAD),
+     o3(0xE9,0x82,0xAA), o3(0xE9,0xA3,0xBC),
+     o3(0xE9,0xA7,0x9F), o3(0xE9,0xBA,0x9D),
+     o3(0xE5,0x89,0x8A), o3(0xEF,0xA5,0xA9),
+     o3(0xE6,0x9C,0x94), o3(0xEF,0xA5,0xAA),
+
+#define from_CP949_DE WORDINDEX2INFO(46048)
+    from_CP949_C7_offsets,
+    from_CP949_DE_infos,
+
+#define from_CP949_DF_infos WORDINDEX2INFO(46050)
+                INVALID,              UNDEF,
+     o3(0xE5,0x82,0x98), o3(0xE5,0x88,0xAA),
+     o3(0xE5,0xB1,0xB1), o3(0xE6,0x95,0xA3),
+     o3(0xE6,0xB1,0x95), o3(0xE7,0x8F,0x8A),
+     o3(0xE7,0x94,0xA3), o3(0xE7,0x96,0x9D),
+     o3(0xE7,0xAE,0x97), o3(0xE8,0x92,0x9C),
+     o3(0xE9,0x85,0xB8), o3(0xE9,0x9C,0xB0),
+     o3(0xE4,0xB9,0xB7), o3(0xE6,0x92,0x92),
+     o3(0xE6,0xAE,0xBA), o3(0xE7,0x85,0x9E),
+     o3(0xE8,0x96,0xA9), o3(0xE4,0xB8,0x89),
+     o3(0xEF,0xA5,0xAB), o3(0xE6,0x9D,0x89),
+     o3(0xE6,0xA3,0xAE), o3(0xE6,0xB8,0x97),
+     o3(0xE8,0x8A,0x9F), o3(0xE8,0x94,0x98),
+     o3(0xE8,0xA1,0xAB), o3(0xE6,0x8F,0xB7),
+     o3(0xE6,0xBE,0x81), o3(0xE9,0x88,0x92),
+     o3(0xE9,0xA2,0xAF), o3(0xE4,0xB8,0x8A),
+     o3(0xE5,0x82,0xB7), o3(0xE5,0x83,0x8F),
+     o3(0xE5,0x84,0x9F), o3(0xE5,0x95,0x86),
+     o3(0xE5,0x96,0xAA), o3(0xE5,0x98,0x97),
+     o3(0xE5,0xAD,0x80), o3(0xE5,0xB0,0x99),
+     o3(0xE5,0xB3,0xA0), o3(0xE5,0xB8,0xB8),
+     o3(0xE5,0xBA,0x8A), o3(0xE5,0xBA,0xA0),
+     o3(0xE5,0xBB,0x82), o3(0xE6,0x83,0xB3),
+     o3(0xE6,0xA1,0x91), o3(0xE6,0xA9,0xA1),
+     o3(0xE6,0xB9,0x98), o3(0xE7,0x88,0xBD),
+     o3(0xE7,0x89,0x80), o3(0xE7,0x8B,0x80),
+     o3(0xE7,0x9B,0xB8), o3(0xE7,0xA5,0xA5),
+     o3(0xE7,0xAE,0xB1), o3(0xE7,0xBF,0x94),
+     o3(0xE8,0xA3,0xB3), o3(0xE8,0xA7,0xB4),
+     o3(0xE8,0xA9,0xB3), o3(0xE8,0xB1,0xA1),
+     o3(0xE8,0xB3,0x9E), o3(0xE9,0x9C,0x9C),
+     o3(0xE5,0xA1,0x9E), o3(0xE7,0x92,0xBD),
+     o3(0xE8,0xB3,0xBD), o3(0xE5,0x97,0x87),
+     o3(0xEF,0xA5,0xAC), o3(0xE7,0xA9,0xA1),
+     o3(0xE7,0xB4,0xA2), o3(0xE8,0x89,0xB2),
+     o3(0xE7,0x89,0xB2), o3(0xE7,0x94,0x9F),
+     o3(0xE7,0x94,0xA5), o3(0xEF,0xA5,0xAD),
+     o3(0xE7,0xAC,0x99), o3(0xE5,0xA2,0x85),
+     o3(0xE5,0xA3,0xBB), o3(0xE5,0xB6,0xBC),
+     o3(0xE5,0xBA,0x8F), o3(0xE5,0xBA,0xB6),
+     o3(0xE5,0xBE,0x90), o3(0xE6,0x81,0x95),
+     o3(0xE6,0x8A,0x92), o3(0xE6,0x8D,0xBF),
+     o3(0xE6,0x95,0x8D), o3(0xE6,0x9A,0x91),
+     o3(0xE6,0x9B,0x99), o3(0xE6,0x9B,0xB8),
+     o3(0xE6,0xA0,0x96), o3(0xE6,0xA3,0xB2),
+     o3(0xE7,0x8A,0x80), o3(0xE7,0x91,0x9E),
+     o3(0xE7,0xAD,0xAE), o3(0xE7,0xB5,0xAE),
+     o3(0xE7,0xB7,0x96), o3(0xE7,0xBD,0xB2),
+
+#define from_CP949_DF WORDINDEX2INFO(46146)
+    from_CP949_C7_offsets,
+    from_CP949_DF_infos,
+
+#define from_CP949_E0_infos WORDINDEX2INFO(46148)
+                INVALID,              UNDEF,
+     o3(0xE8,0x83,0xA5), o3(0xE8,0x88,0x92),
+     o3(0xE8,0x96,0xAF), o3(0xE8,0xA5,0xBF),
+     o3(0xE8,0xAA,0x93), o3(0xE9,0x80,0x9D),
+     o3(0xE9,0x8B,0xA4), o3(0xE9,0xBB,0x8D),
+     o3(0xE9,0xBC,0xA0), o3(0xE5,0xA4,0x95),
+     o3(0xE5,0xA5,0xAD), o3(0xE5,0xB8,0xAD),
+     o3(0xE6,0x83,0x9C), o3(0xE6,0x98,0x94),
+     o3(0xE6,0x99,0xB3), o3(0xE6,0x9E,0x90),
+     o3(0xE6,0xB1,0x90), o3(0xE6,0xB7,0x85),
+     o3(0xE6,0xBD,0x9F), o3(0xE7,0x9F,0xB3),
+     o3(0xE7,0xA2,0xA9), o3(0xE8,0x93,0x86),
+     o3(0xE9,0x87,0x8B), o3(0xE9,0x8C,0xAB),
+     o3(0xE4,0xBB,0x99), o3(0xE5,0x83,0x8A),
+     o3(0xE5,0x85,0x88), o3(0xE5,0x96,0x84),
+     o3(0xE5,0xAC,0x8B), o3(0xE5,0xAE,0xA3),
+     o3(0xE6,0x89,0x87), o3(0xE6,0x95,0xBE),
+     o3(0xE6,0x97,0x8B), o3(0xE6,0xB8,0xB2),
+     o3(0xE7,0x85,0xBD), o3(0xE7,0x90,0x81),
+     o3(0xE7,0x91,0x84), o3(0xE7,0x92,0x87),
+     o3(0xE7,0x92,0xBF), o3(0xE7,0x99,0xAC),
+     o3(0xE7,0xA6,0xAA), o3(0xE7,0xB7,0x9A),
+     o3(0xE7,0xB9,0x95), o3(0xE7,0xBE,0xA8),
+     o3(0xE8,0x85,0xBA), o3(0xE8,0x86,0xB3),
+     o3(0xE8,0x88,0xB9), o3(0xE8,0x98,0x9A),
+     o3(0xE8,0x9F,0xAC), o3(0xE8,0xA9,0xB5),
+     o3(0xE8,0xB7,0xA3), o3(0xE9,0x81,0xB8),
+     o3(0xE9,0x8A,0x91), o3(0xE9,0x90,0xA5),
+     o3(0xE9,0xA5,0x8D), o3(0xE9,0xAE,0xAE),
+     o3(0xE5,0x8D,0xA8), o3(0xE5,0xB1,0x91),
+     o3(0xE6,0xA5,0x94), o3(0xE6,0xB3,0x84),
+     o3(0xE6,0xB4,0xA9), o3(0xE6,0xB8,0xAB),
+     o3(0xE8,0x88,0x8C), o3(0xE8,0x96,0x9B),
+     o3(0xE8,0xA4,0xBB), o3(0xE8,0xA8,0xAD),
+     o3(0xE8,0xAA,0xAA), o3(0xE9,0x9B,0xAA),
+     o3(0xE9,0xBD,0xA7), o3(0xE5,0x89,0xA1),
+     o3(0xE6,0x9A,0xB9), o3(0xE6,0xAE,0xB2),
+     o3(0xE7,0xBA,0x96), o3(0xE8,0x9F,0xBE),
+     o3(0xE8,0xB4,0x8D), o3(0xE9,0x96,0x83),
+     o3(0xE9,0x99,0x9D), o3(0xE6,0x94,0x9D),
+     o3(0xE6,0xB6,0x89), o3(0xE7,0x87,0xAE),
+     o3(0xEF,0xA5,0xAE), o3(0xE5,0x9F,0x8E),
+     o3(0xE5,0xA7,0x93), o3(0xE5,0xAE,0xAC),
+     o3(0xE6,0x80,0xA7), o3(0xE6,0x83,0xBA),
+     o3(0xE6,0x88,0x90), o3(0xE6,0x98,0x9F),
+     o3(0xE6,0x99,0x9F), o3(0xE7,0x8C,0xA9),
+     o3(0xE7,0x8F,0xB9), o3(0xE7,0x9B,0x9B),
+     o3(0xE7,0x9C,0x81), o3(0xE7,0xAD,0xAC),
+
+#define from_CP949_E0 WORDINDEX2INFO(46244)
+    from_CP949_C7_offsets,
+    from_CP949_E0_infos,
+
+#define from_CP949_E1_infos WORDINDEX2INFO(46246)
+                INVALID,              UNDEF,
+     o3(0xE8,0x81,0x96), o3(0xE8,0x81,0xB2),
+     o3(0xE8,0x85,0xA5), o3(0xE8,0xAA,0xA0),
+     o3(0xE9,0x86,0x92), o3(0xE4,0xB8,0x96),
+     o3(0xE5,0x8B,0xA2), o3(0xE6,0xAD,0xB2),
+     o3(0xE6,0xB4,0x97), o3(0xE7,0xA8,0x85),
+     o3(0xE7,0xAC,0xB9), o3(0xE7,0xB4,0xB0),
+     o3(0xEF,0xA5,0xAF), o3(0xE8,0xB2,0xB0),
+     o3(0xE5,0x8F,0xAC), o3(0xE5,0x98,0xAF),
+     o3(0xE5,0xA1,0x91), o3(0xE5,0xAE,0xB5),
+     o3(0xE5,0xB0,0x8F), o3(0xE5,0xB0,0x91),
+     o3(0xE5,0xB7,0xA2), o3(0xE6,0x89,0x80),
+     o3(0xE6,0x8E,0x83), o3(0xE6,0x90,0x94),
+     o3(0xE6,0x98,0xAD), o3(0xE6,0xA2,0xB3),
+     o3(0xE6,0xB2,0xBC), o3(0xE6,0xB6,0x88),
+     o3(0xE6,0xBA,0xAF), o3(0xE7,0x80,0x9F),
+     o3(0xE7,0x82,0xA4), o3(0xE7,0x87,0x92),
+     o3(0xE7,0x94,0xA6), o3(0xE7,0x96,0x8F),
+     o3(0xE7,0x96,0x8E), o3(0xE7,0x98,0x99),
+     o3(0xE7,0xAC,0x91), o3(0xE7,0xAF,0xA0),
+     o3(0xE7,0xB0,0xAB), o3(0xE7,0xB4,0xA0),
+     o3(0xE7,0xB4,0xB9), o3(0xE8,0x94,0xAC),
+     o3(0xE8,0x95,0xAD), o3(0xE8,0x98,0x87),
+     o3(0xE8,0xA8,0xB4), o3(0xE9,0x80,0x8D),
+     o3(0xE9,0x81,0xA1), o3(0xE9,0x82,0xB5),
+     o3(0xE9,0x8A,0xB7), o3(0xE9,0x9F,0xB6),
+     o3(0xE9,0xA8,0xB7), o3(0xE4,0xBF,0x97),
+     o3(0xE5,0xB1,0xAC), o3(0xE6,0x9D,0x9F),
+     o3(0xE6,0xB6,0x91), o3(0xE7,0xB2,0x9F),
+     o3(0xE7,0xBA,0x8C), o3(0xE8,0xAC,0x96),
+     o3(0xE8,0xB4,0x96), o3(0xE9,0x80,0x9F),
+     o3(0xE5,0xAD,0xAB), o3(0xE5,0xB7,0xBD),
+     o3(0xE6,0x90,0x8D), o3(0xE8,0x93,0x80),
+     o3(0xE9,0x81,0x9C), o3(0xE9,0xA3,0xA1),
+     o3(0xE7,0x8E,0x87), o3(0xE5,0xAE,0x8B),
+     o3(0xE6,0x82,0x9A), o3(0xE6,0x9D,0xBE),
+     o3(0xE6,0xB7,0x9E), o3(0xE8,0xA8,0x9F),
+     o3(0xE8,0xAA,0xA6), o3(0xE9,0x80,0x81),
+     o3(0xE9,0xA0,0x8C), o3(0xE5,0x88,0xB7),
+     o3(0xEF,0xA5,0xB0), o3(0xE7,0x81,0x91),
+     o3(0xE7,0xA2,0x8E), o3(0xE9,0x8E,0x96),
+     o3(0xE8,0xA1,0xB0), o3(0xE9,0x87,0x97),
+     o3(0xE4,0xBF,0xAE), o3(0xE5,0x8F,0x97),
+     o3(0xE5,0x97,0xBD), o3(0xE5,0x9B,0x9A),
+     o3(0xE5,0x9E,0x82), o3(0xE5,0xA3,0xBD),
+     o3(0xE5,0xAB,0x82), o3(0xE5,0xAE,0x88),
+     o3(0xE5,0xB2,0xAB), o3(0xE5,0xB3,0x80),
+     o3(0xE5,0xB8,0xA5), o3(0xE6,0x84,0x81),
+
+#define from_CP949_E1 WORDINDEX2INFO(46342)
+    from_CP949_C7_offsets,
+    from_CP949_E1_infos,
+
+#define from_CP949_E2_infos WORDINDEX2INFO(46344)
+                INVALID,              UNDEF,
+     o3(0xE6,0x88,0x8D), o3(0xE6,0x89,0x8B),
+     o3(0xE6,0x8E,0x88), o3(0xE6,0x90,0x9C),
+     o3(0xE6,0x94,0xB6), o3(0xE6,0x95,0xB8),
+     o3(0xE6,0xA8,0xB9), o3(0xE6,0xAE,0x8A),
+     o3(0xE6,0xB0,0xB4), o3(0xE6,0xB4,0x99),
+     o3(0xE6,0xBC,0xB1), o3(0xE7,0x87,0xA7),
+     o3(0xE7,0x8B,0xA9), o3(0xE7,0x8D,0xB8),
+     o3(0xE7,0x90,0x87), o3(0xE7,0x92,0xB2),
+     o3(0xE7,0x98,0xA6), o3(0xE7,0x9D,0xA1),
+     o3(0xE7,0xA7,0x80), o3(0xE7,0xA9,0x97),
+     o3(0xE7,0xAB,0xAA), o3(0xE7,0xB2,0xB9),
+     o3(0xE7,0xB6,0x8F), o3(0xE7,0xB6,0xAC),
+     o3(0xE7,0xB9,0xA1), o3(0xE7,0xBE,0x9E),
+     o3(0xE8,0x84,0xA9), o3(0xE8,0x8C,0xB1),
+     o3(0xE8,0x92,0x90), o3(0xE8,0x93,0x9A),
+     o3(0xE8,0x97,0xAA), o3(0xE8,0xA2,0x96),
+     o3(0xE8,0xAA,0xB0), o3(0xE8,0xAE,0x90),
+     o3(0xE8,0xBC,0xB8), o3(0xE9,0x81,0x82),
+     o3(0xE9,0x82,0x83), o3(0xE9,0x85,0xAC),
+     o3(0xE9,0x8A,0x96), o3(0xE9,0x8A,0xB9),
+     o3(0xE9,0x9A,0x8B), o3(0xE9,0x9A,0xA7),
+     o3(0xE9,0x9A,0xA8), o3(0xE9,0x9B,0x96),
+     o3(0xE9,0x9C,0x80), o3(0xE9,0xA0,0x88),
+     o3(0xE9,0xA6,0x96), o3(0xE9,0xAB,0x93),
+     o3(0xE9,0xAC,0x9A), o3(0xE5,0x8F,0x94),
+     o3(0xE5,0xA1,0xBE), o3(0xE5,0xA4,0x99),
+     o3(0xE5,0xAD,0xB0), o3(0xE5,0xAE,0xBF),
+     o3(0xE6,0xB7,0x91), o3(0xE6,0xBD,0x9A),
+     o3(0xE7,0x86,0x9F), o3(0xE7,0x90,0xA1),
+     o3(0xE7,0x92,0xB9), o3(0xE8,0x82,0x85),
+     o3(0xE8,0x8F,0xBD), o3(0xE5,0xB7,0xA1),
+     o3(0xE5,0xBE,0x87), o3(0xE5,0xBE,0xAA),
+     o3(0xE6,0x81,0x82), o3(0xE6,0x97,0xAC),
+     o3(0xE6,0xA0,0x92), o3(0xE6,0xA5,0xAF),
+     o3(0xE6,0xA9,0x93), o3(0xE6,0xAE,0x89),
+     o3(0xE6,0xB4,0xB5), o3(0xE6,0xB7,0xB3),
+     o3(0xE7,0x8F,0xA3), o3(0xE7,0x9B,0xBE),
+     o3(0xE7,0x9E,0xAC), o3(0xE7,0xAD,0x8D),
+     o3(0xE7,0xB4,0x94), o3(0xE8,0x84,0xA3),
+     o3(0xE8,0x88,0x9C), o3(0xE8,0x8D,0x80),
+     o3(0xE8,0x93,0xB4), o3(0xE8,0x95,0xA3),
+     o3(0xE8,0xA9,0xA2), o3(0xE8,0xAB,0x84),
+     o3(0xE9,0x86,0x87), o3(0xE9,0x8C,0x9E),
+     o3(0xE9,0xA0,0x86), o3(0xE9,0xA6,0xB4),
+     o3(0xE6,0x88,0x8C), o3(0xE8,0xA1,0x93),
+     o3(0xE8,0xBF,0xB0), o3(0xE9,0x89,0xA5),
+     o3(0xE5,0xB4,0x87), o3(0xE5,0xB4,0xA7),
+
+#define from_CP949_E2 WORDINDEX2INFO(46440)
+    from_CP949_C7_offsets,
+    from_CP949_E2_infos,
+
+#define from_CP949_E3_infos WORDINDEX2INFO(46442)
+                INVALID,              UNDEF,
+     o3(0xE5,0xB5,0xA9), o3(0xE7,0x91,0x9F),
+     o3(0xE8,0x86,0x9D), o3(0xE8,0x9D,0xA8),
+     o3(0xE6,0xBF,0x95), o3(0xE6,0x8B,0xBE),
+     o3(0xE7,0xBF,0x92), o3(0xE8,0xA4,0xB6),
+     o3(0xE8,0xA5,0xB2), o3(0xE4,0xB8,0x9E),
+     o3(0xE4,0xB9,0x98), o3(0xE5,0x83,0xA7),
+     o3(0xE5,0x8B,0x9D), o3(0xE5,0x8D,0x87),
+     o3(0xE6,0x89,0xBF), o3(0xE6,0x98,0x87),
+     o3(0xE7,0xB9,0xA9), o3(0xE8,0xA0,0x85),
+     o3(0xE9,0x99,0x9E), o3(0xE4,0xBE,0x8D),
+     o3(0xE5,0x8C,0x99), o3(0xE5,0x98,0xB6),
+     o3(0xE5,0xA7,0x8B), o3(0xE5,0xAA,0xA4),
+     o3(0xE5,0xB0,0xB8), o3(0xE5,0xB1,0x8E),
+     o3(0xE5,0xB1,0x8D), o3(0xE5,0xB8,0x82),
+     o3(0xE5,0xBC,0x91), o3(0xE6,0x81,0x83),
+     o3(0xE6,0x96,0xBD), o3(0xE6,0x98,0xAF),
+     o3(0xE6,0x99,0x82), o3(0xE6,0x9E,0xBE),
+     o3(0xE6,0x9F,0xB4), o3(0xE7,0x8C,0x9C),
+     o3(0xE7,0x9F,0xA2), o3(0xE7,0xA4,0xBA),
+     o3(0xE7,0xBF,0x85), o3(0xE8,0x92,0x94),
+     o3(0xE8,0x93,0x8D), o3(0xE8,0xA6,0x96),
+     o3(0xE8,0xA9,0xA6), o3(0xE8,0xA9,0xA9),
+     o3(0xE8,0xAB,0xA1), o3(0xE8,0xB1,0x95),
+     o3(0xE8,0xB1,0xBA), o3(0xE5,0x9F,0xB4),
+     o3(0xE5,0xAF,0x94), o3(0xE5,0xBC,0x8F),
+     o3(0xE6,0x81,0xAF), o3(0xE6,0x8B,0xAD),
+     o3(0xE6,0xA4,0x8D), o3(0xE6,0xAE,0x96),
+     o3(0xE6,0xB9,0x9C), o3(0xE7,0x86,0x84),
+     o3(0xE7,0xAF,0x92), o3(0xE8,0x9D,0x95),
+     o3(0xE8,0xAD,0x98), o3(0xE8,0xBB,0xBE),
+     o3(0xE9,0xA3,0x9F), o3(0xE9,0xA3,0xBE),
+     o3(0xE4,0xBC,0xB8), o3(0xE4,0xBE,0x81),
+     o3(0xE4,0xBF,0xA1), o3(0xE5,0x91,0xBB),
+     o3(0xE5,0xA8,0xA0), o3(0xE5,0xAE,0xB8),
+     o3(0xE6,0x84,0xBC), o3(0xE6,0x96,0xB0),
+     o3(0xE6,0x99,0xA8), o3(0xE7,0x87,0xBC),
+     o3(0xE7,0x94,0xB3), o3(0xE7,0xA5,0x9E),
+     o3(0xE7,0xB4,0xB3), o3(0xE8,0x85,0x8E),
+     o3(0xE8,0x87,0xA3), o3(0xE8,0x8E,0x98),
+     o3(0xE8,0x96,0xAA), o3(0xE8,0x97,0x8E),
+     o3(0xE8,0x9C,0x83), o3(0xE8,0xA8,0x8A),
+     o3(0xE8,0xBA,0xAB), o3(0xE8,0xBE,0x9B),
+     o3(0xEF,0xA5,0xB1), o3(0xE8,0xBF,0x85),
+     o3(0xE5,0xA4,0xB1), o3(0xE5,0xAE,0xA4),
+     o3(0xE5,0xAF,0xA6), o3(0xE6,0x82,0x89),
+     o3(0xE5,0xAF,0xA9), o3(0xE5,0xB0,0x8B),
+     o3(0xE5,0xBF,0x83), o3(0xE6,0xB2,0x81),
+
+#define from_CP949_E3 WORDINDEX2INFO(46538)
+    from_CP949_C7_offsets,
+    from_CP949_E3_infos,
+
+#define from_CP949_E4_infos WORDINDEX2INFO(46540)
+                INVALID,              UNDEF,
+     o3(0xEF,0xA5,0xB2), o3(0xE6,0xB7,0xB1),
+     o3(0xE7,0x80,0x8B), o3(0xE7,0x94,0x9A),
+     o3(0xE8,0x8A,0xAF), o3(0xE8,0xAB,0xB6),
+     o3(0xE4,0xBB,0x80), o3(0xE5,0x8D,0x81),
+     o3(0xEF,0xA5,0xB3), o3(0xE9,0x9B,0x99),
+     o3(0xE6,0xB0,0x8F), o3(0xE4,0xBA,0x9E),
+     o3(0xE4,0xBF,0x84), o3(0xE5,0x85,0x92),
+     o3(0xE5,0x95,0x9E), o3(0xE5,0xA8,0xA5),
+     o3(0xE5,0xB3,0xA8), o3(0xE6,0x88,0x91),
+     o3(0xE7,0x89,0x99), o3(0xE8,0x8A,0xBD),
+     o3(0xE8,0x8E,0xAA), o3(0xE8,0x9B,0xBE),
+     o3(0xE8,0xA1,0x99), o3(0xE8,0xA8,0x9D),
+     o3(0xE9,0x98,0xBF), o3(0xE9,0x9B,0x85),
+     o3(0xE9,0xA4,0x93), o3(0xE9,0xB4,0x89),
+     o3(0xE9,0xB5,0x9D), o3(0xE5,0xA0,0x8A),
+     o3(0xE5,0xB2,0xB3), o3(0xE5,0xB6,0xBD),
+     o3(0xE5,0xB9,0x84), o3(0xE6,0x83,0xA1),
+     o3(0xE6,0x84,0x95), o3(0xE6,0x8F,0xA1),
+     o3(0xE6,0xA8,0x82), o3(0xE6,0xB8,0xA5),
+     o3(0xE9,0x84,0x82), o3(0xE9,0x8D,0x94),
+     o3(0xE9,0xA1,0x8E), o3(0xE9,0xB0,0x90),
+     o3(0xE9,0xBD,0xB7), o3(0xE5,0xAE,0x89),
+     o3(0xE5,0xB2,0xB8), o3(0xE6,0x8C,0x89),
+     o3(0xE6,0x99,0x8F), o3(0xE6,0xA1,0x88),
+     o3(0xE7,0x9C,0xBC), o3(0xE9,0x9B,0x81),
+     o3(0xE9,0x9E,0x8D), o3(0xE9,0xA1,0x94),
+     o3(0xE9,0xAE,0x9F), o3(0xE6,0x96,0xA1),
+     o3(0xE8,0xAC,0x81), o3(0xE8,0xBB,0x8B),
+     o3(0xE9,0x96,0xBC), o3(0xE5,0x94,0xB5),
+     o3(0xE5,0xB2,0xA9), o3(0xE5,0xB7,0x96),
+     o3(0xE5,0xBA,0xB5), o3(0xE6,0x9A,0x97),
+     o3(0xE7,0x99,0x8C), o3(0xE8,0x8F,0xB4),
+     o3(0xE9,0x97,0x87), o3(0xE5,0xA3,0x93),
+     o3(0xE6,0x8A,0xBC), o3(0xE7,0x8B,0x8E),
+     o3(0xE9,0xB4,0xA8), o3(0xE4,0xBB,0xB0),
+     o3(0xE5,0xA4,0xAE), o3(0xE6,0x80,0x8F),
+     o3(0xE6,0x98,0xBB), o3(0xE6,0xAE,0x83),
+     o3(0xE7,0xA7,0xA7), o3(0xE9,0xB4,0xA6),
+     o3(0xE5,0x8E,0x93), o3(0xE5,0x93,0x80),
+     o3(0xE5,0x9F,0x83), o3(0xE5,0xB4,0x96),
+     o3(0xE6,0x84,0x9B), o3(0xE6,0x9B,0x96),
+     o3(0xE6,0xB6,0xAF), o3(0xE7,0xA2,0x8D),
+     o3(0xE8,0x89,0xBE), o3(0xE9,0x9A,0x98),
+     o3(0xE9,0x9D,0x84), o3(0xE5,0x8E,0x84),
+     o3(0xE6,0x89,0xBC), o3(0xE6,0x8E,0x96),
+     o3(0xE6,0xB6,0xB2), o3(0xE7,0xB8,0x8A),
+     o3(0xE8,0x85,0x8B), o3(0xE9,0xA1,0x8D),
+
+#define from_CP949_E4 WORDINDEX2INFO(46636)
+    from_CP949_C7_offsets,
+    from_CP949_E4_infos,
+
+#define from_CP949_E5_infos WORDINDEX2INFO(46638)
+                INVALID,              UNDEF,
+     o3(0xE6,0xAB,0xBB), o3(0xE7,0xBD,0x8C),
+     o3(0xE9,0xB6,0xAF), o3(0xE9,0xB8,0x9A),
+     o3(0xE4,0xB9,0x9F), o3(0xE5,0x80,0xBB),
+     o3(0xE5,0x86,0xB6), o3(0xE5,0xA4,0x9C),
+     o3(0xE6,0x83,0xB9), o3(0xE6,0x8F,0xB6),
+     o3(0xE6,0xA4,0xB0), o3(0xE7,0x88,0xBA),
+     o3(0xE8,0x80,0xB6), o3(0xEF,0xA5,0xB4),
+     o3(0xE9,0x87,0x8E), o3(0xE5,0xBC,0xB1),
+     o3(0xEF,0xA5,0xB5), o3(0xEF,0xA5,0xB6),
+     o3(0xE7,0xB4,0x84), o3(0xE8,0x8B,0xA5),
+     o3(0xE8,0x91,0xAF), o3(0xE8,0x92,0xBB),
+     o3(0xE8,0x97,0xA5), o3(0xE8,0xBA,0x8D),
+     o3(0xEF,0xA5,0xB7), o3(0xE4,0xBD,0xAF),
+     o3(0xEF,0xA5,0xB8), o3(0xEF,0xA5,0xB9),
+     o3(0xE5,0xA3,0xA4), o3(0xE5,0xAD,0x83),
+     o3(0xE6,0x81,0x99), o3(0xE6,0x8F,0x9A),
+     o3(0xE6,0x94,0x98), o3(0xE6,0x95,0xAD),
+     o3(0xE6,0x9A,0x98), o3(0xEF,0xA5,0xBA),
+     o3(0xE6,0xA5,0x8A), o3(0xE6,0xA8,0xA3),
+     o3(0xE6,0xB4,0x8B), o3(0xE7,0x80,0x81),
+     o3(0xE7,0x85,0xAC), o3(0xE7,0x97,0x92),
+     o3(0xE7,0x98,0x8D), o3(0xE7,0xA6,0xB3),
+     o3(0xE7,0xA9,0xB0), o3(0xEF,0xA5,0xBB),
+     o3(0xE7,0xBE,0x8A), o3(0xEF,0xA5,0xBC),
+     o3(0xE8,0xA5,0x84), o3(0xEF,0xA5,0xBD),
+     o3(0xE8,0xAE,0x93), o3(0xE9,0x87,0x80),
+     o3(0xE9,0x99,0xBD), o3(0xEF,0xA5,0xBE),
+     o3(0xE9,0xA4,0x8A), o3(0xE5,0x9C,0x84),
+     o3(0xE5,0xBE,0xA1), o3(0xE6,0x96,0xBC),
+     o3(0xE6,0xBC,0x81), o3(0xE7,0x98,0x80),
+     o3(0xE7,0xA6,0xA6), o3(0xE8,0xAA,0x9E),
+     o3(0xE9,0xA6,0xAD), o3(0xE9,0xAD,0x9A),
+     o3(0xE9,0xBD,0xAC), o3(0xE5,0x84,0x84),
+     o3(0xE6,0x86,0xB6), o3(0xE6,0x8A,0x91),
+     o3(0xE6,0xAA,0x8D), o3(0xE8,0x87,0x86),
+     o3(0xE5,0x81,0x83), o3(0xE5,0xA0,0xB0),
+     o3(0xE5,0xBD,0xA6), o3(0xE7,0x84,0x89),
+     o3(0xE8,0xA8,0x80), o3(0xE8,0xAB,0xBA),
+     o3(0xE5,0xAD,0xBC), o3(0xE8,0x98,0x96),
+     o3(0xE4,0xBF,0xBA), o3(0xE5,0x84,0xBC),
+     o3(0xE5,0x9A,0xB4), o3(0xE5,0xA5,0x84),
+     o3(0xE6,0x8E,0xA9), o3(0xE6,0xB7,0xB9),
+     o3(0xE5,0xB6,0xAA), o3(0xE6,0xA5,0xAD),
+     o3(0xE5,0x86,0x86), o3(0xE4,0xBA,0x88),
+     o3(0xE4,0xBD,0x99), o3(0xEF,0xA5,0xBF),
+     o3(0xEF,0xA6,0x80), o3(0xEF,0xA6,0x81),
+     o3(0xE5,0xA6,0x82), o3(0xEF,0xA6,0x82),
+
+#define from_CP949_E5 WORDINDEX2INFO(46734)
+    from_CP949_C7_offsets,
+    from_CP949_E5_infos,
+
+#define from_CP949_E6_infos WORDINDEX2INFO(46736)
+                INVALID,              UNDEF,
+     o3(0xEF,0xA6,0x83), o3(0xE6,0xAD,0x9F),
+     o3(0xE6,0xB1,0x9D), o3(0xEF,0xA6,0x84),
+     o3(0xE7,0x92,0xB5), o3(0xE7,0xA4,0x96),
+     o3(0xEF,0xA6,0x85), o3(0xE8,0x88,0x87),
+     o3(0xE8,0x89,0x85), o3(0xE8,0x8C,0xB9),
+     o3(0xE8,0xBC,0xBF), o3(0xE8,0xBD,0x9D),
+     o3(0xEF,0xA6,0x86), o3(0xE9,0xA4,0x98),
+     o3(0xEF,0xA6,0x87), o3(0xEF,0xA6,0x88),
+     o3(0xEF,0xA6,0x89), o3(0xE4,0xBA,0xA6),
+     o3(0xEF,0xA6,0x8A), o3(0xE5,0x9F,0x9F),
+     o3(0xE5,0xBD,0xB9), o3(0xE6,0x98,0x93),
+     o3(0xEF,0xA6,0x8B), o3(0xEF,0xA6,0x8C),
+     o3(0xE7,0x96,0xAB), o3(0xE7,0xB9,0xB9),
+     o3(0xE8,0xAD,0xAF), o3(0xEF,0xA6,0x8D),
+     o3(0xE9,0x80,0x86), o3(0xE9,0xA9,0x9B),
+     o3(0xE5,0x9A,0xA5), o3(0xE5,0xA0,0xA7),
+     o3(0xE5,0xA7,0xB8), o3(0xE5,0xA8,0x9F),
+     o3(0xE5,0xAE,0xB4), o3(0xEF,0xA6,0x8E),
+     o3(0xE5,0xBB,0xB6), o3(0xEF,0xA6,0x8F),
+     o3(0xEF,0xA6,0x90), o3(0xE6,0x8D,0x90),
+     o3(0xE6,0x8C,0xBB), o3(0xEF,0xA6,0x91),
+     o3(0xE6,0xA4,0xBD), o3(0xE6,0xB2,0x87),
+     o3(0xE6,0xB2,0xBF), o3(0xE6,0xB6,0x8E),
+     o3(0xE6,0xB6,0x93), o3(0xE6,0xB7,0xB5),
+     o3(0xE6,0xBC,0x94), o3(0xEF,0xA6,0x92),
+     o3(0xE7,0x83,0x9F), o3(0xE7,0x84,0xB6),
+     o3(0xE7,0x85,0x99), o3(0xEF,0xA6,0x93),
+     o3(0xE7,0x87,0x83), o3(0xE7,0x87,0x95),
+     o3(0xEF,0xA6,0x94), o3(0xE7,0xA1,0x8F),
+     o3(0xE7,0xA1,0xAF), o3(0xEF,0xA6,0x95),
+     o3(0xE7,0xAD,0xB5), o3(0xE7,0xB7,0xA3),
+     o3(0xEF,0xA6,0x96), o3(0xE7,0xB8,0xAF),
+     o3(0xEF,0xA6,0x97), o3(0xE8,0xA1,0x8D),
+     o3(0xE8,0xBB,0x9F), o3(0xEF,0xA6,0x98),
+     o3(0xEF,0xA6,0x99), o3(0xEF,0xA6,0x9A),
+     o3(0xE9,0x89,0x9B), o3(0xEF,0xA6,0x9B),
+     o3(0xE9,0xB3,0xB6), o3(0xEF,0xA6,0x9C),
+     o3(0xEF,0xA6,0x9D), o3(0xEF,0xA6,0x9E),
+     o3(0xE6,0x82,0x85), o3(0xE6,0xB6,0x85),
+     o3(0xEF,0xA6,0x9F), o3(0xE7,0x86,0xB1),
+     o3(0xEF,0xA6,0xA0), o3(0xEF,0xA6,0xA1),
+     o3(0xE9,0x96,0xB1), o3(0xE5,0x8E,0xAD),
+     o3(0xEF,0xA6,0xA2), o3(0xEF,0xA6,0xA3),
+     o3(0xEF,0xA6,0xA4), o3(0xE6,0x9F,0x93),
+     o3(0xEF,0xA6,0xA5), o3(0xE7,0x82,0x8E),
+     o3(0xE7,0x84,0xB0), o3(0xE7,0x90,0xB0),
+     o3(0xE8,0x89,0xB6), o3(0xE8,0x8B,0x92),
+
+#define from_CP949_E6 WORDINDEX2INFO(46832)
+    from_CP949_C7_offsets,
+    from_CP949_E6_infos,
+
+#define from_CP949_E7_infos WORDINDEX2INFO(46834)
+                INVALID,              UNDEF,
+     o3(0xEF,0xA6,0xA6), o3(0xE9,0x96,0xBB),
+     o3(0xE9,0xAB,0xA5), o3(0xE9,0xB9,0xBD),
+     o3(0xE6,0x9B,0x84), o3(0xEF,0xA6,0xA7),
+     o3(0xE7,0x87,0x81), o3(0xE8,0x91,0x89),
+     o3(0xEF,0xA6,0xA8), o3(0xEF,0xA6,0xA9),
+     o3(0xE5,0xA1,0x8B), o3(0xEF,0xA6,0xAA),
+     o3(0xEF,0xA6,0xAB), o3(0xE5,0xB6,0xB8),
+     o3(0xE5,0xBD,0xB1), o3(0xEF,0xA6,0xAC),
+     o3(0xE6,0x98,0xA0), o3(0xE6,0x9A,0x8E),
+     o3(0xE6,0xA5,0xB9), o3(0xE6,0xA6,0xAE),
+     o3(0xE6,0xB0,0xB8), o3(0xE6,0xB3,0xB3),
+     o3(0xE6,0xB8,0xB6), o3(0xE6,0xBD,0x81),
+     o3(0xE6,0xBF,0x9A), o3(0xE7,0x80,0x9B),
+     o3(0xE7,0x80,0xAF), o3(0xE7,0x85,0x90),
+     o3(0xE7,0x87,0x9F), o3(0xE7,0x8D,0xB0),
+     o3(0xEF,0xA6,0xAD), o3(0xE7,0x91,0x9B),
+     o3(0xEF,0xA6,0xAE), o3(0xE7,0x93,0x94),
+     o3(0xE7,0x9B,0x88), o3(0xE7,0xA9,0x8E),
+     o3(0xE7,0xBA,0x93), o3(0xEF,0xA6,0xAF),
+     o3(0xEF,0xA6,0xB0), o3(0xE8,0x8B,0xB1),
+     o3(0xE8,0xA9,0xA0), o3(0xE8,0xBF,0x8E),
+     o3(0xEF,0xA6,0xB1), o3(0xE9,0x8D,0x88),
+     o3(0xEF,0xA6,0xB2), o3(0xE9,0x9C,0x99),
+     o3(0xEF,0xA6,0xB3), o3(0xEF,0xA6,0xB4),
+     o3(0xE4,0xB9,0x82), o3(0xE5,0x80,0xAA),
+     o3(0xEF,0xA6,0xB5), o3(0xE5,0x88,0x88),
+     o3(0xE5,0x8F,0xA1), o3(0xE6,0x9B,0xB3),
+     o3(0xE6,0xB1,0xAD), o3(0xE6,0xBF,0x8A),
+     o3(0xE7,0x8C,0x8A), o3(0xE7,0x9D,0xBF),
+     o3(0xE7,0xA9,0xA2), o3(0xE8,0x8A,0xAE),
+     o3(0xE8,0x97,0x9D), o3(0xE8,0x98,0x82),
+     o3(0xEF,0xA6,0xB6), o3(0xE8,0xA3,0x94),
+     o3(0xE8,0xA9,0xA3), o3(0xE8,0xAD,0xBD),
+     o3(0xE8,0xB1,0xAB), o3(0xEF,0xA6,0xB7),
+     o3(0xE9,0x8A,0xB3), o3(0xEF,0xA6,0xB8),
+     o3(0xE9,0x9C,0x93), o3(0xE9,0xA0,0x90),
+     o3(0xE4,0xBA,0x94), o3(0xE4,0xBC,0x8D),
+     o3(0xE4,0xBF,0x89), o3(0xE5,0x82,0xB2),
+     o3(0xE5,0x8D,0x88), o3(0xE5,0x90,0xBE),
+     o3(0xE5,0x90,0xB3), o3(0xE5,0x97,0x9A),
+     o3(0xE5,0xA1,0xA2), o3(0xE5,0xA2,0xBA),
+     o3(0xE5,0xA5,0xA7), o3(0xE5,0xA8,0x9B),
+     o3(0xE5,0xAF,0xA4), o3(0xE6,0x82,0x9F),
+     o3(0xEF,0xA6,0xB9), o3(0xE6,0x87,0x8A),
+     o3(0xE6,0x95,0x96), o3(0xE6,0x97,0xBF),
+     o3(0xE6,0x99,0xA4), o3(0xE6,0xA2,0xA7),
+     o3(0xE6,0xB1,0x9A), o3(0xE6,0xBE,0xB3),
+
+#define from_CP949_E7 WORDINDEX2INFO(46930)
+    from_CP949_C7_offsets,
+    from_CP949_E7_infos,
+
+#define from_CP949_E8_infos WORDINDEX2INFO(46932)
+                INVALID,              UNDEF,
+     o3(0xE7,0x83,0x8F), o3(0xE7,0x86,0xAC),
+     o3(0xE7,0x8D,0x92), o3(0xE7,0xAD,0xBD),
+     o3(0xE8,0x9C,0x88), o3(0xE8,0xAA,0xA4),
+     o3(0xE9,0xB0,0xB2), o3(0xE9,0xBC,0x87),
+     o3(0xE5,0xB1,0x8B), o3(0xE6,0xB2,0x83),
+     o3(0xE7,0x8D,0x84), o3(0xE7,0x8E,0x89),
+     o3(0xE9,0x88,0xBA), o3(0xE6,0xBA,0xAB),
+     o3(0xE7,0x91,0xA5), o3(0xE7,0x98,0x9F),
+     o3(0xE7,0xA9,0xA9), o3(0xE7,0xB8,0x95),
+     o3(0xE8,0x98,0x8A), o3(0xE5,0x85,0x80),
+     o3(0xE5,0xA3,0x85), o3(0xE6,0x93,0x81),
+     o3(0xE7,0x93,0xAE), o3(0xE7,0x94,0x95),
+     o3(0xE7,0x99,0xB0), o3(0xE7,0xBF,0x81),
+     o3(0xE9,0x82,0x95), o3(0xE9,0x9B,0x8D),
+     o3(0xE9,0xA5,0x94), o3(0xE6,0xB8,0xA6),
+     o3(0xE7,0x93,0xA6), o3(0xE7,0xAA,0xA9),
+     o3(0xE7,0xAA,0xAA), o3(0xE8,0x87,0xA5),
+     o3(0xE8,0x9B,0x99), o3(0xE8,0x9D,0xB8),
+     o3(0xE8,0xA8,0x9B), o3(0xE5,0xA9,0x89),
+     o3(0xE5,0xAE,0x8C), o3(0xE5,0xAE,0x9B),
+     o3(0xE6,0xA2,0xA1), o3(0xE6,0xA4,0x80),
+     o3(0xE6,0xB5,0xA3), o3(0xE7,0x8E,0xA9),
+     o3(0xE7,0x90,0x93), o3(0xE7,0x90,0xAC),
+     o3(0xE7,0xA2,0x97), o3(0xE7,0xB7,0xA9),
+     o3(0xE7,0xBF,0xAB), o3(0xE8,0x84,0x98),
+     o3(0xE8,0x85,0x95), o3(0xE8,0x8E,0x9E),
+     o3(0xE8,0xB1,0x8C), o3(0xE9,0x98,0xAE),
+     o3(0xE9,0xA0,0x91), o3(0xE6,0x9B,0xB0),
+     o3(0xE5,0xBE,0x80), o3(0xE6,0x97,0xBA),
+     o3(0xE6,0x9E,0x89), o3(0xE6,0xB1,0xAA),
+     o3(0xE7,0x8E,0x8B), o3(0xE5,0x80,0xAD),
+     o3(0xE5,0xA8,0x83), o3(0xE6,0xAD,0xAA),
+     o3(0xE7,0x9F,0xAE), o3(0xE5,0xA4,0x96),
+     o3(0xE5,0xB5,0xAC), o3(0xE5,0xB7,0x8D),
+     o3(0xE7,0x8C,0xA5), o3(0xE7,0x95,0x8F),
+     o3(0xEF,0xA6,0xBA), o3(0xEF,0xA6,0xBB),
+     o3(0xE5,0x83,0xA5), o3(0xE5,0x87,0xB9),
+     o3(0xE5,0xA0,0xAF), o3(0xE5,0xA4,0xAD),
+     o3(0xE5,0xA6,0x96), o3(0xE5,0xA7,0x9A),
+     o3(0xE5,0xAF,0xA5), o3(0xEF,0xA6,0xBC),
+     o3(0xEF,0xA6,0xBD), o3(0xE5,0xB6,0xA2),
+     o3(0xE6,0x8B,0x97), o3(0xE6,0x90,0x96),
+     o3(0xE6,0x92,0x93), o3(0xE6,0x93,0xBE),
+     o3(0xEF,0xA6,0xBE), o3(0xE6,0x9B,0x9C),
+     o3(0xEF,0xA6,0xBF), o3(0xE6,0xA9,0x88),
+     o3(0xEF,0xA7,0x80), o3(0xE7,0x87,0xBF),
+     o3(0xE7,0x91,0xA4), o3(0xEF,0xA7,0x81),
+
+#define from_CP949_E8 WORDINDEX2INFO(47028)
+    from_CP949_C7_offsets,
+    from_CP949_E8_infos,
+
+#define from_CP949_E9_infos WORDINDEX2INFO(47030)
+                INVALID,              UNDEF,
+     o3(0xE7,0xAA,0x88), o3(0xE7,0xAA,0xAF),
+     o3(0xE7,0xB9,0x87), o3(0xE7,0xB9,0x9E),
+     o3(0xE8,0x80,0x80), o3(0xE8,0x85,0xB0),
+     o3(0xEF,0xA7,0x82), o3(0xE8,0x9F,0xAF),
+     o3(0xE8,0xA6,0x81), o3(0xE8,0xAC,0xA0),
+     o3(0xE9,0x81,0x99), o3(0xEF,0xA7,0x83),
+     o3(0xE9,0x82,0x80), o3(0xE9,0xA5,0x92),
+     o3(0xE6,0x85,0xBE), o3(0xE6,0xAC,0xB2),
+     o3(0xE6,0xB5,0xB4), o3(0xE7,0xB8,0x9F),
+     o3(0xE8,0xA4,0xA5), o3(0xE8,0xBE,0xB1),
+     o3(0xE4,0xBF,0x91), o3(0xE5,0x82,0xAD),
+     o3(0xE5,0x86,0x97), o3(0xE5,0x8B,0x87),
+     o3(0xE5,0x9F,0x87), o3(0xE5,0xA2,0x89),
+     o3(0xE5,0xAE,0xB9), o3(0xE5,0xBA,0xB8),
+     o3(0xE6,0x85,0x82), o3(0xE6,0xA6,0x95),
+     o3(0xE6,0xB6,0x8C), o3(0xE6,0xB9,0xA7),
+     o3(0xE6,0xBA,0xB6), o3(0xE7,0x86,0x94),
+     o3(0xE7,0x91,0xA2), o3(0xE7,0x94,0xA8),
+     o3(0xE7,0x94,0xAC), o3(0xE8,0x81,0xB3),
+     o3(0xE8,0x8C,0xB8), o3(0xE8,0x93,0x89),
+     o3(0xE8,0xB8,0x8A), o3(0xE9,0x8E,0x94),
+     o3(0xE9,0x8F,0x9E), o3(0xEF,0xA7,0x84),
+     o3(0xE4,0xBA,0x8E), o3(0xE4,0xBD,0x91),
+     o3(0xE5,0x81,0xB6), o3(0xE5,0x84,0xAA),
+     o3(0xE5,0x8F,0x88), o3(0xE5,0x8F,0x8B),
+     o3(0xE5,0x8F,0xB3), o3(0xE5,0xAE,0x87),
+     o3(0xE5,0xAF,0x93), o3(0xE5,0xB0,0xA4),
+     o3(0xE6,0x84,0x9A), o3(0xE6,0x86,0x82),
+     o3(0xE6,0x97,0xB4), o3(0xE7,0x89,0x9B),
+     o3(0xE7,0x8E,0x97), o3(0xE7,0x91,0x80),
+     o3(0xE7,0x9B,0x82), o3(0xE7,0xA5,0x90),
+     o3(0xE7,0xA6,0x91), o3(0xE7,0xA6,0xB9),
+     o3(0xE7,0xB4,0x86), o3(0xE7,0xBE,0xBD),
+     o3(0xE8,0x8A,0x8B), o3(0xE8,0x97,0x95),
+     o3(0xE8,0x99,0x9E), o3(0xE8,0xBF,0x82),
+     o3(0xE9,0x81,0x87), o3(0xE9,0x83,0xB5),
+     o3(0xE9,0x87,0xAA), o3(0xE9,0x9A,0x85),
+     o3(0xE9,0x9B,0xA8), o3(0xE9,0x9B,0xA9),
+     o3(0xE5,0x8B,0x96), o3(0xE5,0xBD,0xA7),
+     o3(0xE6,0x97,0xAD), o3(0xE6,0x98,0xB1),
+     o3(0xE6,0xA0,0xAF), o3(0xE7,0x85,0x9C),
+     o3(0xE7,0xA8,0xB6), o3(0xE9,0x83,0x81),
+     o3(0xE9,0xA0,0x8A), o3(0xE4,0xBA,0x91),
+     o3(0xEF,0xA7,0x85), o3(0xE6,0xA9,0x92),
+     o3(0xE6,0xAE,0x9E), o3(0xE6,0xBE,0x90),
+     o3(0xE7,0x86,0x89), o3(0xE8,0x80,0x98),
+     o3(0xE8,0x8A,0xB8), o3(0xE8,0x95,0x93),
+
+#define from_CP949_E9 WORDINDEX2INFO(47126)
+    from_CP949_C7_offsets,
+    from_CP949_E9_infos,
+
+#define from_CP949_EA_infos WORDINDEX2INFO(47128)
+                INVALID,              UNDEF,
+     o3(0xE9,0x81,0x8B), o3(0xE9,0x9A,0x95),
+     o3(0xE9,0x9B,0xB2), o3(0xE9,0x9F,0xBB),
+     o3(0xE8,0x94,0x9A), o3(0xE9,0xAC,0xB1),
+     o3(0xE4,0xBA,0x90), o3(0xE7,0x86,0x8A),
+     o3(0xE9,0x9B,0x84), o3(0xE5,0x85,0x83),
+     o3(0xE5,0x8E,0x9F), o3(0xE5,0x93,0xA1),
+     o3(0xE5,0x9C,0x93), o3(0xE5,0x9C,0x92),
+     o3(0xE5,0x9E,0xA3), o3(0xE5,0xAA,0x9B),
+     o3(0xE5,0xAB,0x84), o3(0xE5,0xAF,0x83),
+     o3(0xE6,0x80,0xA8), o3(0xE6,0x84,0xBF),
+     o3(0xE6,0x8F,0xB4), o3(0xE6,0xB2,0x85),
+     o3(0xE6,0xB4,0xB9), o3(0xE6,0xB9,0xB2),
+     o3(0xE6,0xBA,0x90), o3(0xE7,0x88,0xB0),
+     o3(0xE7,0x8C,0xBF), o3(0xE7,0x91,0x97),
+     o3(0xE8,0x8B,0x91), o3(0xE8,0xA2,0x81),
+     o3(0xE8,0xBD,0x85), o3(0xE9,0x81,0xA0),
+     o3(0xEF,0xA7,0x86), o3(0xE9,0x99,0xA2),
+     o3(0xE9,0xA1,0x98), o3(0xE9,0xB4,0x9B),
+     o3(0xE6,0x9C,0x88), o3(0xE8,0xB6,0x8A),
+     o3(0xE9,0x89,0x9E), o3(0xE4,0xBD,0x8D),
+     o3(0xE5,0x81,0x89), o3(0xE5,0x83,0x9E),
+     o3(0xE5,0x8D,0xB1), o3(0xE5,0x9C,0x8D),
+     o3(0xE5,0xA7,0x94), o3(0xE5,0xA8,0x81),
+     o3(0xE5,0xB0,0x89), o3(0xE6,0x85,0xB0),
+     o3(0xE6,0x9A,0x90), o3(0xE6,0xB8,0xAD),
+     o3(0xE7,0x88,0xB2), o3(0xE7,0x91,0x8B),
+     o3(0xE7,0xB7,0xAF), o3(0xE8,0x83,0x83),
+     o3(0xE8,0x90,0x8E), o3(0xE8,0x91,0xA6),
+     o3(0xE8,0x94,0xBF), o3(0xE8,0x9D,0x9F),
+     o3(0xE8,0xA1,0x9B), o3(0xE8,0xA4,0x98),
+     o3(0xE8,0xAC,0x82), o3(0xE9,0x81,0x95),
+     o3(0xE9,0x9F,0x8B), o3(0xE9,0xAD,0x8F),
+     o3(0xE4,0xB9,0xB3), o3(0xE4,0xBE,0x91),
+     o3(0xE5,0x84,0x92), o3(0xE5,0x85,0xAA),
+     o3(0xEF,0xA7,0x87), o3(0xE5,0x94,0xAF),
+     o3(0xE5,0x96,0xA9), o3(0xE5,0xAD,0xBA),
+     o3(0xE5,0xAE,0xA5), o3(0xE5,0xB9,0xBC),
+     o3(0xE5,0xB9,0xBD), o3(0xE5,0xBA,0xBE),
+     o3(0xE6,0x82,0xA0), o3(0xE6,0x83,0x9F),
+     o3(0xE6,0x84,0x88), o3(0xE6,0x84,0x89),
+     o3(0xE6,0x8F,0x84), o3(0xE6,0x94,0xB8),
+     o3(0xE6,0x9C,0x89), o3(0xEF,0xA7,0x88),
+     o3(0xE6,0x9F,0x94), o3(0xE6,0x9F,0x9A),
+     o3(0xEF,0xA7,0x89), o3(0xE6,0xA5,0xA1),
+     o3(0xE6,0xA5,0xA2), o3(0xE6,0xB2,0xB9),
+     o3(0xE6,0xB4,0xA7), o3(0xEF,0xA7,0x8A),
+     o3(0xE6,0xB8,0xB8), o3(0xEF,0xA7,0x8B),
+
+#define from_CP949_EA WORDINDEX2INFO(47224)
+    from_CP949_C7_offsets,
+    from_CP949_EA_infos,
+
+#define from_CP949_EB_infos WORDINDEX2INFO(47226)
+                INVALID,              UNDEF,
+     o3(0xE6,0xBF,0xA1), o3(0xE7,0x8C,0xB6),
+     o3(0xE7,0x8C,0xB7), o3(0xEF,0xA7,0x8C),
+     o3(0xE7,0x91,0x9C), o3(0xE7,0x94,0xB1),
+     o3(0xEF,0xA7,0x8D), o3(0xE7,0x99,0x92),
+     o3(0xEF,0xA7,0x8E), o3(0xEF,0xA7,0x8F),
+     o3(0xE7,0xB6,0xAD), o3(0xE8,0x87,0xBE),
+     o3(0xE8,0x90,0xB8), o3(0xE8,0xA3,0x95),
+     o3(0xE8,0xAA,0x98), o3(0xE8,0xAB,0x9B),
+     o3(0xE8,0xAB,0xAD), o3(0xE8,0xB8,0xB0),
+     o3(0xE8,0xB9,0x82), o3(0xE9,0x81,0x8A),
+     o3(0xE9,0x80,0xBE), o3(0xE9,0x81,0xBA),
+     o3(0xE9,0x85,0x89), o3(0xE9,0x87,0x89),
+     o3(0xE9,0x8D,0xAE), o3(0xEF,0xA7,0x90),
+     o3(0xEF,0xA7,0x91), o3(0xE5,0xA0,0x89),
+     o3(0xEF,0xA7,0x92), o3(0xE6,0xAF,0x93),
+     o3(0xE8,0x82,0x89), o3(0xE8,0x82,0xB2),
+     o3(0xEF,0xA7,0x93), o3(0xEF,0xA7,0x94),
+     o3(0xE5,0x85,0x81), o3(0xE5,0xA5,0xAB),
+     o3(0xE5,0xB0,0xB9), o3(0xEF,0xA7,0x95),
+     o3(0xEF,0xA7,0x96), o3(0xE6,0xBD,0xA4),
+     o3(0xE7,0x8E,0xA7), o3(0xE8,0x83,0xA4),
+     o3(0xE8,0xB4,0x87), o3(0xEF,0xA7,0x97),
+     o3(0xE9,0x88,0x97), o3(0xE9,0x96,0x8F),
+     o3(0xEF,0xA7,0x98), o3(0xEF,0xA7,0x99),
+     o3(0xEF,0xA7,0x9A), o3(0xEF,0xA7,0x9B),
+     o3(0xE8,0x81,0xBF), o3(0xE6,0x88,0x8E),
+     o3(0xE7,0x80,0x9C), o3(0xE7,0xB5,0xA8),
+     o3(0xE8,0x9E,0x8D), o3(0xEF,0xA7,0x9C),
+     o3(0xE5,0x9E,0xA0), o3(0xE6,0x81,0xA9),
+     o3(0xE6,0x85,0x87), o3(0xE6,0xAE,0xB7),
+     o3(0xE8,0xAA,0xBE), o3(0xE9,0x8A,0x80),
+     o3(0xE9,0x9A,0xB1), o3(0xE4,0xB9,0x99),
+     o3(0xE5,0x90,0x9F), o3(0xE6,0xB7,0xAB),
+     o3(0xE8,0x94,0xAD), o3(0xE9,0x99,0xB0),
+     o3(0xE9,0x9F,0xB3), o3(0xE9,0xA3,0xAE),
+     o3(0xE6,0x8F,0x96), o3(0xE6,0xB3,0xA3),
+     o3(0xE9,0x82,0x91), o3(0xE5,0x87,0x9D),
+     o3(0xE6,0x87,0x89), o3(0xE8,0x86,0xBA),
+     o3(0xE9,0xB7,0xB9), o3(0xE4,0xBE,0x9D),
+     o3(0xE5,0x80,0x9A), o3(0xE5,0x84,0x80),
+     o3(0xE5,0xAE,0x9C), o3(0xE6,0x84,0x8F),
+     o3(0xE6,0x87,0xBF), o3(0xE6,0x93,0xAC),
+     o3(0xE6,0xA4,0x85), o3(0xE6,0xAF,0x85),
+     o3(0xE7,0x96,0x91), o3(0xE7,0x9F,0xA3),
+     o3(0xE7,0xBE,0xA9), o3(0xE8,0x89,0xA4),
+     o3(0xE8,0x96,0x8F), o3(0xE8,0x9F,0xBB),
+     o3(0xE8,0xA1,0xA3), o3(0xE8,0xAA,0xBC),
+
+#define from_CP949_EB WORDINDEX2INFO(47322)
+    from_CP949_C7_offsets,
+    from_CP949_EB_infos,
+
+#define from_CP949_EC_infos WORDINDEX2INFO(47324)
+                INVALID,              UNDEF,
+     o3(0xE8,0xAD,0xB0), o3(0xE9,0x86,0xAB),
+     o3(0xE4,0xBA,0x8C), o3(0xE4,0xBB,0xA5),
+     o3(0xE4,0xBC,0x8A), o3(0xEF,0xA7,0x9D),
+     o3(0xEF,0xA7,0x9E), o3(0xE5,0xA4,0xB7),
+     o3(0xE5,0xA7,0xA8), o3(0xEF,0xA7,0x9F),
+     o3(0xE5,0xB7,0xB2), o3(0xE5,0xBC,0x9B),
+     o3(0xE5,0xBD,0x9B), o3(0xE6,0x80,0xA1),
+     o3(0xEF,0xA7,0xA0), o3(0xEF,0xA7,0xA1),
+     o3(0xEF,0xA7,0xA2), o3(0xEF,0xA7,0xA3),
+     o3(0xE7,0x88,0xBE), o3(0xE7,0x8F,0xA5),
+     o3(0xEF,0xA7,0xA4), o3(0xE7,0x95,0xB0),
+     o3(0xE7,0x97,0x8D), o3(0xEF,0xA7,0xA5),
+     o3(0xE7,0xA7,0xBB), o3(0xEF,0xA7,0xA6),
+     o3(0xE8,0x80,0x8C), o3(0xE8,0x80,0xB3),
+     o3(0xE8,0x82,0x84), o3(0xE8,0x8B,0xA1),
+     o3(0xE8,0x8D,0x91), o3(0xEF,0xA7,0xA7),
+     o3(0xEF,0xA7,0xA8), o3(0xE8,0xB2,0xBD),
+     o3(0xE8,0xB2,0xB3), o3(0xE9,0x82,0x87),
+     o3(0xEF,0xA7,0xA9), o3(0xEF,0xA7,0xAA),
+     o3(0xE9,0xA3,0xB4), o3(0xE9,0xA4,0x8C),
+     o3(0xEF,0xA7,0xAB), o3(0xEF,0xA7,0xAC),
+     o3(0xE7,0x80,0xB7), o3(0xE7,0x9B,0x8A),
+     o3(0xE7,0xBF,0x8A), o3(0xE7,0xBF,0x8C),
+     o3(0xE7,0xBF,0xBC), o3(0xE8,0xAC,0x9A),
+     o3(0xE4,0xBA,0xBA), o3(0xE4,0xBB,0x81),
+     o3(0xE5,0x88,0x83), o3(0xE5,0x8D,0xB0),
+     o3(0xEF,0xA7,0xAD), o3(0xE5,0x92,0xBD),
+     o3(0xE5,0x9B,0xA0), o3(0xE5,0xA7,0xBB),
+     o3(0xE5,0xAF,0x85), o3(0xE5,0xBC,0x95),
+     o3(0xE5,0xBF,0x8D), o3(0xE6,0xB9,0xAE),
+     o3(0xEF,0xA7,0xAE), o3(0xEF,0xA7,0xAF),
+     o3(0xE7,0xB5,0xAA), o3(0xE8,0x8C,0xB5),
+     o3(0xEF,0xA7,0xB0), o3(0xE8,0x9A,0x93),
+     o3(0xE8,0xAA,0x8D), o3(0xEF,0xA7,0xB1),
+     o3(0xE9,0x9D,0xAD), o3(0xE9,0x9D,0xB7),
+     o3(0xEF,0xA7,0xB2), o3(0xEF,0xA7,0xB3),
+     o3(0xE4,0xB8,0x80), o3(0xE4,0xBD,0x9A),
+     o3(0xE4,0xBD,0xBE), o3(0xE5,0xA3,0xB9),
+     o3(0xE6,0x97,0xA5), o3(0xE6,0xBA,0xA2),
+     o3(0xE9,0x80,0xB8), o3(0xE9,0x8E,0xB0),
+     o3(0xE9,0xA6,0xB9), o3(0xE4,0xBB,0xBB),
+     o3(0xE5,0xA3,0xAC), o3(0xE5,0xA6,0x8A),
+     o3(0xE5,0xA7,0x99), o3(0xE6,0x81,0x81),
+     o3(0xEF,0xA7,0xB4), o3(0xEF,0xA7,0xB5),
+     o3(0xE7,0xA8,0x94), o3(0xEF,0xA7,0xB6),
+     o3(0xE8,0x8D,0x8F), o3(0xE8,0xB3,0x83),
+     o3(0xE5,0x85,0xA5), o3(0xE5,0x8D,0x84),
+
+#define from_CP949_EC WORDINDEX2INFO(47420)
+    from_CP949_C7_offsets,
+    from_CP949_EC_infos,
+
+#define from_CP949_ED_infos WORDINDEX2INFO(47422)
+                INVALID,              UNDEF,
+     o3(0xEF,0xA7,0xB7), o3(0xEF,0xA7,0xB8),
+     o3(0xEF,0xA7,0xB9), o3(0xE4,0xBB,0x8D),
+     o3(0xE5,0x89,0xA9), o3(0xE5,0xAD,0x95),
+     o3(0xE8,0x8A,0xBF), o3(0xE4,0xBB,0x94),
+     o3(0xE5,0x88,0xBA), o3(0xE5,0x92,0xA8),
+     o3(0xE5,0xA7,0x89), o3(0xE5,0xA7,0xBF),
+     o3(0xE5,0xAD,0x90), o3(0xE5,0xAD,0x97),
+     o3(0xE5,0xAD,0x9C), o3(0xE6,0x81,0xA3),
+     o3(0xE6,0x85,0x88), o3(0xE6,0xBB,0x8B),
+     o3(0xE7,0x82,0x99), o3(0xE7,0x85,0xAE),
+     o3(0xE7,0x8E,0x86), o3(0xE7,0x93,0xB7),
+     o3(0xE7,0x96,0xB5), o3(0xE7,0xA3,0x81),
+     o3(0xE7,0xB4,0xAB), o3(0xE8,0x80,0x85),
+     o3(0xE8,0x87,0xAA), o3(0xE8,0x8C,0xA8),
+     o3(0xE8,0x94,0x97), o3(0xE8,0x97,0x89),
+     o3(0xE8,0xAB,0xAE), o3(0xE8,0xB3,0x87),
+     o3(0xE9,0x9B,0x8C), o3(0xE4,0xBD,0x9C),
+     o3(0xE5,0x8B,0xBA), o3(0xE5,0x9A,0xBC),
+     o3(0xE6,0x96,0xAB), o3(0xE6,0x98,0xA8),
+     o3(0xE7,0x81,0xBC), o3(0xE7,0x82,0xB8),
+     o3(0xE7,0x88,0xB5), o3(0xE7,0xB6,0xBD),
+     o3(0xE8,0x8A,0x8D), o3(0xE9,0x85,0x8C),
+     o3(0xE9,0x9B,0x80), o3(0xE9,0xB5,0xB2),
+     o3(0xE5,0xAD,0xB1), o3(0xE6,0xA3,0xA7),
+     o3(0xE6,0xAE,0x98), o3(0xE6,0xBD,0xBA),
+     o3(0xE7,0x9B,0x9E), o3(0xE5,0xB2,0x91),
+     o3(0xE6,0x9A,0xAB), o3(0xE6,0xBD,0x9B),
+     o3(0xE7,0xAE,0xB4), o3(0xE7,0xB0,0xAA),
+     o3(0xE8,0xA0,0xB6), o3(0xE9,0x9B,0x9C),
+     o3(0xE4,0xB8,0x88), o3(0xE4,0xBB,0x97),
+     o3(0xE5,0x8C,0xA0), o3(0xE5,0xA0,0xB4),
+     o3(0xE5,0xA2,0xBB), o3(0xE5,0xA3,0xAF),
+     o3(0xE5,0xA5,0xAC), o3(0xE5,0xB0,0x87),
+     o3(0xE5,0xB8,0xB3), o3(0xE5,0xBA,0x84),
+     o3(0xE5,0xBC,0xB5), o3(0xE6,0x8E,0x8C),
+     o3(0xE6,0x9A,0xB2), o3(0xE6,0x9D,0x96),
+     o3(0xE6,0xA8,0x9F), o3(0xE6,0xAA,0xA3),
+     o3(0xE6,0xAC,0x8C), o3(0xE6,0xBC,0xBF),
+     o3(0xE7,0x89,0x86), o3(0xEF,0xA7,0xBA),
+     o3(0xE7,0x8D,0x90), o3(0xE7,0x92,0x8B),
+     o3(0xE7,0xAB,0xA0), o3(0xE7,0xB2,0xA7),
+     o3(0xE8,0x85,0xB8), o3(0xE8,0x87,0x9F),
+     o3(0xE8,0x87,0xA7), o3(0xE8,0x8E,0x8A),
+     o3(0xE8,0x91,0xAC), o3(0xE8,0x94,0xA3),
+     o3(0xE8,0x96,0x94), o3(0xE8,0x97,0x8F),
+     o3(0xE8,0xA3,0x9D), o3(0xE8,0xB4,0x93),
+     o3(0xE9,0x86,0xAC), o3(0xE9,0x95,0xB7),
+
+#define from_CP949_ED WORDINDEX2INFO(47518)
+    from_CP949_C7_offsets,
+    from_CP949_ED_infos,
+
+#define from_CP949_EE_infos WORDINDEX2INFO(47520)
+                INVALID,              UNDEF,
+     o3(0xE9,0x9A,0x9C), o3(0xE5,0x86,0x8D),
+     o3(0xE5,0x93,0x89), o3(0xE5,0x9C,0xA8),
+     o3(0xE5,0xAE,0xB0), o3(0xE6,0x89,0x8D),
+     o3(0xE6,0x9D,0x90), o3(0xE6,0xA0,0xBD),
+     o3(0xE6,0xA2,0x93), o3(0xE6,0xB8,0xBD),
+     o3(0xE6,0xBB,0x93), o3(0xE7,0x81,0xBD),
+     o3(0xE7,0xB8,0xA1), o3(0xE8,0xA3,0x81),
+     o3(0xE8,0xB2,0xA1), o3(0xE8,0xBC,0x89),
+     o3(0xE9,0xBD,0x8B), o3(0xE9,0xBD,0x8E),
+     o3(0xE7,0x88,0xAD), o3(0xE7,0xAE,0x8F),
+     o3(0xE8,0xAB,0x8D), o3(0xE9,0x8C,0x9A),
+     o3(0xE4,0xBD,0x87), o3(0xE4,0xBD,0x8E),
+     o3(0xE5,0x84,0xB2), o3(0xE5,0x92,0x80),
+     o3(0xE5,0xA7,0x90), o3(0xE5,0xBA,0x95),
+     o3(0xE6,0x8A,0xB5), o3(0xE6,0x9D,0xB5),
+     o3(0xE6,0xA5,0xAE), o3(0xE6,0xA8,0x97),
+     o3(0xE6,0xB2,0xAE), o3(0xE6,0xB8,0x9A),
+     o3(0xE7,0x8B,0x99), o3(0xE7,0x8C,0xAA),
+     o3(0xE7,0x96,0xBD), o3(0xE7,0xAE,0xB8),
+     o3(0xE7,0xB4,0xB5), o3(0xE8,0x8B,0xA7),
+     o3(0xE8,0x8F,0xB9), o3(0xE8,0x91,0x97),
+     o3(0xE8,0x97,0xB7), o3(0xE8,0xA9,0x9B),
+     o3(0xE8,0xB2,0xAF), o3(0xE8,0xBA,0x87),
+     o3(0xE9,0x80,0x99), o3(0xE9,0x82,0xB8),
+     o3(0xE9,0x9B,0x8E), o3(0xE9,0xBD,0x9F),
+     o3(0xE5,0x8B,0xA3), o3(0xE5,0x90,0x8A),
+     o3(0xE5,0xAB,0xA1), o3(0xE5,0xAF,0x82),
+     o3(0xE6,0x91,0x98), o3(0xE6,0x95,0xB5),
+     o3(0xE6,0xBB,0xB4), o3(0xE7,0x8B,0x84),
+     o3(0xEF,0xA7,0xBB), o3(0xE7,0x9A,0x84),
+     o3(0xE7,0xA9,0x8D), o3(0xE7,0xAC,0x9B),
+     o3(0xE7,0xB1,0x8D), o3(0xE7,0xB8,0xBE),
+     o3(0xE7,0xBF,0x9F), o3(0xE8,0x8D,0xBB),
+     o3(0xE8,0xAC,0xAB), o3(0xE8,0xB3,0x8A),
+     o3(0xE8,0xB5,0xA4), o3(0xE8,0xB7,0xA1),
+     o3(0xE8,0xB9,0x9F), o3(0xE8,0xBF,0xAA),
+     o3(0xE8,0xBF,0xB9), o3(0xE9,0x81,0xA9),
+     o3(0xE9,0x8F,0x91), o3(0xE4,0xBD,0x83),
+     o3(0xE4,0xBD,0xBA), o3(0xE5,0x82,0xB3),
+     o3(0xE5,0x85,0xA8), o3(0xE5,0x85,0xB8),
+     o3(0xE5,0x89,0x8D), o3(0xE5,0x89,0xAA),
+     o3(0xE5,0xA1,0xA1), o3(0xE5,0xA1,0xBC),
+     o3(0xE5,0xA5,0xA0), o3(0xE5,0xB0,0x88),
+     o3(0xE5,0xB1,0x95), o3(0xE5,0xBB,0x9B),
+     o3(0xE6,0x82,0x9B), o3(0xE6,0x88,0xB0),
+     o3(0xE6,0xA0,0x93), o3(0xE6,0xAE,0xBF),
+     o3(0xE6,0xB0,0x88), o3(0xE6,0xBE,0xB1),
+
+#define from_CP949_EE WORDINDEX2INFO(47616)
+    from_CP949_C7_offsets,
+    from_CP949_EE_infos,
+
+#define from_CP949_EF_infos WORDINDEX2INFO(47618)
+                INVALID,              UNDEF,
+     o3(0xE7,0x85,0x8E), o3(0xE7,0x90,0xA0),
+     o3(0xE7,0x94,0xB0), o3(0xE7,0x94,0xB8),
+     o3(0xE7,0x95,0x91), o3(0xE7,0x99,0xB2),
+     o3(0xE7,0xAD,0x8C), o3(0xE7,0xAE,0x8B),
+     o3(0xE7,0xAE,0xAD), o3(0xE7,0xAF,0x86),
+     o3(0xE7,0xBA,0x8F), o3(0xE8,0xA9,0xAE),
+     o3(0xE8,0xBC,0xBE), o3(0xE8,0xBD,0x89),
+     o3(0xE9,0x88,0xBF), o3(0xE9,0x8A,0x93),
+     o3(0xE9,0x8C,0xA2), o3(0xE9,0x90,0xAB),
+     o3(0xE9,0x9B,0xBB), o3(0xE9,0xA1,0x9A),
+     o3(0xE9,0xA1,0xAB), o3(0xE9,0xA4,0x9E),
+     o3(0xE5,0x88,0x87), o3(0xE6,0x88,0xAA),
+     o3(0xE6,0x8A,0x98), o3(0xE6,0xB5,0x99),
+     o3(0xE7,0x99,0xA4), o3(0xE7,0xAB,0x8A),
+     o3(0xE7,0xAF,0x80), o3(0xE7,0xB5,0xB6),
+     o3(0xE5,0x8D,0xA0), o3(0xE5,0xB2,0xBE),
+     o3(0xE5,0xBA,0x97), o3(0xE6,0xBC,0xB8),
+     o3(0xE7,0x82,0xB9), o3(0xE7,0xB2,0x98),
+     o3(0xE9,0x9C,0x91), o3(0xE9,0xAE,0x8E),
+     o3(0xE9,0xBB,0x9E), o3(0xE6,0x8E,0xA5),
+     o3(0xE6,0x91,0xBA), o3(0xE8,0x9D,0xB6),
+     o3(0xE4,0xB8,0x81), o3(0xE4,0xBA,0x95),
+     o3(0xE4,0xBA,0xAD), o3(0xE5,0x81,0x9C),
+     o3(0xE5,0x81,0xB5), o3(0xE5,0x91,0x88),
+     o3(0xE5,0xA7,0x83), o3(0xE5,0xAE,0x9A),
+     o3(0xE5,0xB9,0x80), o3(0xE5,0xBA,0xAD),
+     o3(0xE5,0xBB,0xB7), o3(0xE5,0xBE,0x81),
+     o3(0xE6,0x83,0x85), o3(0xE6,0x8C,0xBA),
+     o3(0xE6,0x94,0xBF), o3(0xE6,0x95,0xB4),
+     o3(0xE6,0x97,0x8C), o3(0xE6,0x99,0xB6),
+     o3(0xE6,0x99,0xB8), o3(0xE6,0x9F,0xBE),
+     o3(0xE6,0xA5,0xA8), o3(0xE6,0xAA,0x89),
+     o3(0xE6,0xAD,0xA3), o3(0xE6,0xB1,0x80),
+     o3(0xE6,0xB7,0x80), o3(0xE6,0xB7,0xA8),
+     o3(0xE6,0xB8,0x9F), o3(0xE6,0xB9,0x9E),
+     o3(0xE7,0x80,0x9E), o3(0xE7,0x82,0xA1),
+     o3(0xE7,0x8E,0x8E), o3(0xE7,0x8F,0xBD),
+     o3(0xE7,0x94,0xBA), o3(0xE7,0x9D,0x9B),
+     o3(0xE7,0xA2,0x87), o3(0xE7,0xA6,0x8E),
+     o3(0xE7,0xA8,0x8B), o3(0xE7,0xA9,0xBD),
+     o3(0xE7,0xB2,0xBE), o3(0xE7,0xB6,0x8E),
+     o3(0xE8,0x89,0x87), o3(0xE8,0xA8,0x82),
+     o3(0xE8,0xAB,0xAA), o3(0xE8,0xB2,0x9E),
+     o3(0xE9,0x84,0xAD), o3(0xE9,0x85,0x8A),
+     o3(0xE9,0x87,0x98), o3(0xE9,0x89,0xA6),
+     o3(0xE9,0x8B,0x8C), o3(0xE9,0x8C,0xA0),
+     o3(0xE9,0x9C,0x86), o3(0xE9,0x9D,0x96),
+
+#define from_CP949_EF WORDINDEX2INFO(47714)
+    from_CP949_C7_offsets,
+    from_CP949_EF_infos,
+
+#define from_CP949_F0_infos WORDINDEX2INFO(47716)
+                INVALID,              UNDEF,
+     o3(0xE9,0x9D,0x9C), o3(0xE9,0xA0,0x82),
+     o3(0xE9,0xBC,0x8E), o3(0xE5,0x88,0xB6),
+     o3(0xE5,0x8A,0x91), o3(0xE5,0x95,0xBC),
+     o3(0xE5,0xA0,0xA4), o3(0xE5,0xB8,0x9D),
+     o3(0xE5,0xBC,0x9F), o3(0xE6,0x82,0x8C),
+     o3(0xE6,0x8F,0x90), o3(0xE6,0xA2,0xAF),
+     o3(0xE6,0xBF,0x9F), o3(0xE7,0xA5,0xAD),
+     o3(0xE7,0xAC,0xAC), o3(0xE8,0x87,0x8D),
+     o3(0xE8,0x96,0xBA), o3(0xE8,0xA3,0xBD),
+     o3(0xE8,0xAB,0xB8), o3(0xE8,0xB9,0x84),
+     o3(0xE9,0x86,0x8D), o3(0xE9,0x99,0xA4),
+     o3(0xE9,0x9A,0x9B), o3(0xE9,0x9C,0xBD),
+     o3(0xE9,0xA1,0x8C), o3(0xE9,0xBD,0x8A),
+     o3(0xE4,0xBF,0x8E), o3(0xE5,0x85,0x86),
+     o3(0xE5,0x87,0x8B), o3(0xE5,0x8A,0xA9),
+     o3(0xE5,0x98,0xB2), o3(0xE5,0xBC,0x94),
+     o3(0xE5,0xBD,0xAB), o3(0xE6,0x8E,0xAA),
+     o3(0xE6,0x93,0x8D), o3(0xE6,0x97,0xA9),
+     o3(0xE6,0x99,0x81), o3(0xE6,0x9B,0xBA),
+     o3(0xE6,0x9B,0xB9), o3(0xE6,0x9C,0x9D),
+     o3(0xE6,0xA2,0x9D), o3(0xE6,0xA3,0x97),
+     o3(0xE6,0xA7,0xBD), o3(0xE6,0xBC,0x95),
+     o3(0xE6,0xBD,0xAE), o3(0xE7,0x85,0xA7),
+     o3(0xE7,0x87,0xA5), o3(0xE7,0x88,0xAA),
+     o3(0xE7,0x92,0xAA), o3(0xE7,0x9C,0xBA),
+     o3(0xE7,0xA5,0x96), o3(0xE7,0xA5,0x9A),
+     o3(0xE7,0xA7,0x9F), o3(0xE7,0xA8,0xA0),
+     o3(0xE7,0xAA,0x95), o3(0xE7,0xB2,0x97),
+     o3(0xE7,0xB3,0x9F), o3(0xE7,0xB5,0x84),
+     o3(0xE7,0xB9,0xB0), o3(0xE8,0x82,0x87),
+     o3(0xE8,0x97,0xBB), o3(0xE8,0x9A,0xA4),
+     o3(0xE8,0xA9,0x94), o3(0xE8,0xAA,0xBF),
+     o3(0xE8,0xB6,0x99), o3(0xE8,0xBA,0x81),
+     o3(0xE9,0x80,0xA0), o3(0xE9,0x81,0xAD),
+     o3(0xE9,0x87,0xA3), o3(0xE9,0x98,0xBB),
+     o3(0xE9,0x9B,0x95), o3(0xE9,0xB3,0xA5),
+     o3(0xE6,0x97,0x8F), o3(0xE7,0xB0,0x87),
+     o3(0xE8,0xB6,0xB3), o3(0xE9,0x8F,0x83),
+     o3(0xE5,0xAD,0x98), o3(0xE5,0xB0,0x8A),
+     o3(0xE5,0x8D,0x92), o3(0xE6,0x8B,0x99),
+     o3(0xE7,0x8C,0x9D), o3(0xE5,0x80,0xA7),
+     o3(0xE5,0xAE,0x97), o3(0xE5,0xBE,0x9E),
+     o3(0xE6,0x82,0xB0), o3(0xE6,0x85,0xAB),
+     o3(0xE6,0xA3,0x95), o3(0xE6,0xB7,0x99),
+     o3(0xE7,0x90,0xAE), o3(0xE7,0xA8,0xAE),
+     o3(0xE7,0xB5,0x82), o3(0xE7,0xB6,0x9C),
+     o3(0xE7,0xB8,0xB1), o3(0xE8,0x85,0xAB),
+
+#define from_CP949_F0 WORDINDEX2INFO(47812)
+    from_CP949_C7_offsets,
+    from_CP949_F0_infos,
+
+#define from_CP949_F1_infos WORDINDEX2INFO(47814)
+                INVALID,              UNDEF,
+     o3(0xE8,0xB8,0xAA), o3(0xE8,0xB8,0xB5),
+     o3(0xE9,0x8D,0xBE), o3(0xE9,0x90,0x98),
+     o3(0xE4,0xBD,0x90), o3(0xE5,0x9D,0x90),
+     o3(0xE5,0xB7,0xA6), o3(0xE5,0xBA,0xA7),
+     o3(0xE6,0x8C,0xAB), o3(0xE7,0xBD,0xAA),
+     o3(0xE4,0xB8,0xBB), o3(0xE4,0xBD,0x8F),
+     o3(0xE4,0xBE,0x8F), o3(0xE5,0x81,0x9A),
+     o3(0xE5,0xA7,0x9D), o3(0xE8,0x83,0x84),
+     o3(0xE5,0x91,0xAA), o3(0xE5,0x91,0xA8),
+     o3(0xE5,0x97,0xBE), o3(0xE5,0xA5,0x8F),
+     o3(0xE5,0xAE,0x99), o3(0xE5,0xB7,0x9E),
+     o3(0xE5,0xBB,0x9A), o3(0xE6,0x99,0x9D),
+     o3(0xE6,0x9C,0xB1), o3(0xE6,0x9F,0xB1),
+     o3(0xE6,0xA0,0xAA), o3(0xE6,0xB3,0xA8),
+     o3(0xE6,0xB4,0xB2), o3(0xE6,0xB9,0x8A),
+     o3(0xE6,0xBE,0x8D), o3(0xE7,0x82,0xB7),
+     o3(0xE7,0x8F,0xA0), o3(0xE7,0x96,0x87),
+     o3(0xE7,0xB1,0x8C), o3(0xE7,0xB4,0x82),
+     o3(0xE7,0xB4,0xAC), o3(0xE7,0xB6,0xA2),
+     o3(0xE8,0x88,0x9F), o3(0xE8,0x9B,0x9B),
+     o3(0xE8,0xA8,0xBB), o3(0xE8,0xAA,0x85),
+     o3(0xE8,0xB5,0xB0), o3(0xE8,0xBA,0x8A),
+     o3(0xE8,0xBC,0xB3), o3(0xE9,0x80,0xB1),
+     o3(0xE9,0x85,0x8E), o3(0xE9,0x85,0x92),
+     o3(0xE9,0x91,0x84), o3(0xE9,0xA7,0x90),
+     o3(0xE7,0xAB,0xB9), o3(0xE7,0xB2,0xA5),
+     o3(0xE4,0xBF,0x8A), o3(0xE5,0x84,0x81),
+     o3(0xE5,0x87,0x86), o3(0xE5,0x9F,0x88),
+     o3(0xE5,0xAF,0xAF), o3(0xE5,0xB3,0xBB),
+     o3(0xE6,0x99,0x99), o3(0xE6,0xA8,0xBD),
+     o3(0xE6,0xB5,0x9A), o3(0xE6,0xBA,0x96),
+     o3(0xE6,0xBF,0xAC), o3(0xE7,0x84,0x8C),
+     o3(0xE7,0x95,0xAF), o3(0xE7,0xAB,0xA3),
+     o3(0xE8,0xA0,0xA2), o3(0xE9,0x80,0xA1),
+     o3(0xE9,0x81,0xB5), o3(0xE9,0x9B,0x8B),
+     o3(0xE9,0xA7,0xBF), o3(0xE8,0x8C,0x81),
+     o3(0xE4,0xB8,0xAD), o3(0xE4,0xBB,0xB2),
+     o3(0xE8,0xA1,0x86), o3(0xE9,0x87,0x8D),
+     o3(0xE5,0x8D,0xBD), o3(0xE6,0xAB,0x9B),
+     o3(0xE6,0xA5,0xAB), o3(0xE6,0xB1,0x81),
+     o3(0xE8,0x91,0xBA), o3(0xE5,0xA2,0x9E),
+     o3(0xE6,0x86,0x8E), o3(0xE6,0x9B,0xBE),
+     o3(0xE6,0x8B,0xAF), o3(0xE7,0x83,0x9D),
+     o3(0xE7,0x94,0x91), o3(0xE7,0x97,0x87),
+     o3(0xE7,0xB9,0x92), o3(0xE8,0x92,0xB8),
+     o3(0xE8,0xAD,0x89), o3(0xE8,0xB4,0x88),
+     o3(0xE4,0xB9,0x8B), o3(0xE5,0x8F,0xAA),
+
+#define from_CP949_F1 WORDINDEX2INFO(47910)
+    from_CP949_C7_offsets,
+    from_CP949_F1_infos,
+
+#define from_CP949_F2_infos WORDINDEX2INFO(47912)
+                INVALID,              UNDEF,
+     o3(0xE5,0x92,0xAB), o3(0xE5,0x9C,0xB0),
+     o3(0xE5,0x9D,0x80), o3(0xE5,0xBF,0x97),
+     o3(0xE6,0x8C,0x81), o3(0xE6,0x8C,0x87),
+     o3(0xE6,0x91,0xAF), o3(0xE6,0x94,0xAF),
+     o3(0xE6,0x97,0xA8), o3(0xE6,0x99,0xBA),
+     o3(0xE6,0x9E,0x9D), o3(0xE6,0x9E,0xB3),
+     o3(0xE6,0xAD,0xA2), o3(0xE6,0xB1,0xA0),
+     o3(0xE6,0xB2,0x9A), o3(0xE6,0xBC,0xAC),
+     o3(0xE7,0x9F,0xA5), o3(0xE7,0xA0,0xA5),
+     o3(0xE7,0xA5,0x89), o3(0xE7,0xA5,0x97),
+     o3(0xE7,0xB4,0x99), o3(0xE8,0x82,0xA2),
+     o3(0xE8,0x84,0x82), o3(0xE8,0x87,0xB3),
+     o3(0xE8,0x8A,0x9D), o3(0xE8,0x8A,0xB7),
+     o3(0xE8,0x9C,0x98), o3(0xE8,0xAA,0x8C),
+     o3(0xEF,0xA7,0xBC), o3(0xE8,0xB4,0x84),
+     o3(0xE8,0xB6,0xBE), o3(0xE9,0x81,0xB2),
+     o3(0xE7,0x9B,0xB4), o3(0xE7,0xA8,0x99),
+     o3(0xE7,0xA8,0xB7), o3(0xE7,0xB9,0x94),
+     o3(0xE8,0x81,0xB7), o3(0xE5,0x94,0x87),
+     o3(0xE5,0x97,0x94), o3(0xE5,0xA1,0xB5),
+     o3(0xE6,0x8C,0xAF), o3(0xE6,0x90,0xA2),
+     o3(0xE6,0x99,0x89), o3(0xE6,0x99,0x8B),
+     o3(0xE6,0xA1,0xAD), o3(0xE6,0xA6,0x9B),
+     o3(0xE6,0xAE,0x84), o3(0xE6,0xB4,0xA5),
+     o3(0xE6,0xBA,0xB1), o3(0xE7,0x8F,0x8D),
+     o3(0xE7,0x91,0xA8), o3(0xE7,0x92,0xA1),
+     o3(0xE7,0x95,0x9B), o3(0xE7,0x96,0xB9),
+     o3(0xE7,0x9B,0xA1), o3(0xE7,0x9C,0x9E),
+     o3(0xE7,0x9E,0x8B), o3(0xE7,0xA7,0xA6),
+     o3(0xE7,0xB8,0x89), o3(0xE7,0xB8,0x9D),
+     o3(0xE8,0x87,0xBB), o3(0xE8,0x94,0xAF),
+     o3(0xE8,0xA2,0x97), o3(0xE8,0xA8,0xBA),
+     o3(0xE8,0xB3,0x91), o3(0xE8,0xBB,0xAB),
+     o3(0xE8,0xBE,0xB0), o3(0xE9,0x80,0xB2),
+     o3(0xE9,0x8E,0xAD), o3(0xE9,0x99,0xA3),
+     o3(0xE9,0x99,0xB3), o3(0xE9,0x9C,0x87),
+     o3(0xE4,0xBE,0x84), o3(0xE5,0x8F,0xB1),
+     o3(0xE5,0xA7,0xAA), o3(0xE5,0xAB,0x89),
+     o3(0xE5,0xB8,0x99), o3(0xE6,0xA1,0x8E),
+     o3(0xE7,0x93,0x86), o3(0xE7,0x96,0xBE),
+     o3(0xE7,0xA7,0xA9), o3(0xE7,0xAA,0x92),
+     o3(0xE8,0x86,0xA3), o3(0xE8,0x9B,0xAD),
+     o3(0xE8,0xB3,0xAA), o3(0xE8,0xB7,0x8C),
+     o3(0xE8,0xBF,0xAD), o3(0xE6,0x96,0x9F),
+     o3(0xE6,0x9C,0x95), o3(0xEF,0xA7,0xBD),
+     o3(0xE5,0x9F,0xB7), o3(0xE6,0xBD,0x97),
+     o3(0xE7,0xB7,0x9D), o3(0xE8,0xBC,0xAF),
+
+#define from_CP949_F2 WORDINDEX2INFO(48008)
+    from_CP949_C7_offsets,
+    from_CP949_F2_infos,
+
+#define from_CP949_F3_infos WORDINDEX2INFO(48010)
+                INVALID,              UNDEF,
+     o3(0xE9,0x8F,0xB6), o3(0xE9,0x9B,0x86),
+     o3(0xE5,0xBE,0xB5), o3(0xE6,0x87,0xB2),
+     o3(0xE6,0xBE,0x84), o3(0xE4,0xB8,0x94),
+     o3(0xE4,0xBE,0x98), o3(0xE5,0x80,0x9F),
+     o3(0xE5,0x8F,0x89), o3(0xE5,0x97,0x9F),
+     o3(0xE5,0xB5,0xAF), o3(0xE5,0xB7,0xAE),
+     o3(0xE6,0xAC,0xA1), o3(0xE6,0xAD,0xA4),
+     o3(0xE7,0xA3,0x8B), o3(0xE7,0xAE,0x9A),
+     o3(0xEF,0xA7,0xBE), o3(0xE8,0xB9,0x89),
+     o3(0xE8,0xBB,0x8A), o3(0xE9,0x81,0xAE),
+     o3(0xE6,0x8D,0x89), o3(0xE6,0x90,0xBE),
+     o3(0xE7,0x9D,0x80), o3(0xE7,0xAA,0x84),
+     o3(0xE9,0x8C,0xAF), o3(0xE9,0x91,0xBF),
+     o3(0xE9,0xBD,0xAA), o3(0xE6,0x92,0xB0),
+     o3(0xE6,0xBE,0xAF), o3(0xE7,0x87,0xA6),
+     o3(0xE7,0x92,0xA8), o3(0xE7,0x93,0x9A),
+     o3(0xE7,0xAB,0x84), o3(0xE7,0xB0,0x92),
+     o3(0xE7,0xBA,0x82), o3(0xE7,0xB2,0xB2),
+     o3(0xE7,0xBA,0x98), o3(0xE8,0xAE,0x9A),
+     o3(0xE8,0xB4,0x8A), o3(0xE9,0x91,0xBD),
+     o3(0xE9,0xA4,0x90), o3(0xE9,0xA5,0x8C),
+     o3(0xE5,0x88,0xB9), o3(0xE5,0xAF,0x9F),
+     o3(0xE6,0x93,0xA6), o3(0xE6,0x9C,0xAD),
+     o3(0xE7,0xB4,0xAE), o3(0xE5,0x83,0xAD),
+     o3(0xE5,0x8F,0x83), o3(0xE5,0xA1,0xB9),
+     o3(0xE6,0x85,0x98), o3(0xE6,0x85,0x99),
+     o3(0xE6,0x87,0xBA), o3(0xE6,0x96,0xAC),
+     o3(0xE7,0xAB,0x99), o3(0xE8,0xAE,0x92),
+     o3(0xE8,0xAE,0x96), o3(0xE5,0x80,0x89),
+     o3(0xE5,0x80,0xA1), o3(0xE5,0x89,0xB5),
+     o3(0xE5,0x94,0xB1), o3(0xE5,0xA8,0xBC),
+     o3(0xE5,0xBB,0xA0), o3(0xE5,0xBD,0xB0),
+     o3(0xE6,0x84,0xB4), o3(0xE6,0x95,0x9E),
+     o3(0xE6,0x98,0x8C), o3(0xE6,0x98,0xB6),
+     o3(0xE6,0x9A,0xA2), o3(0xE6,0xA7,0x8D),
+     o3(0xE6,0xBB,0x84), o3(0xE6,0xBC,0xB2),
+     o3(0xE7,0x8C,0x96), o3(0xE7,0x98,0xA1),
+     o3(0xE7,0xAA,0x93), o3(0xE8,0x84,0xB9),
+     o3(0xE8,0x89,0x99), o3(0xE8,0x8F,0x96),
+     o3(0xE8,0x92,0xBC), o3(0xE5,0x82,0xB5),
+     o3(0xE5,0x9F,0xB0), o3(0xE5,0xAF,0x80),
+     o3(0xE5,0xAF,0xA8), o3(0xE5,0xBD,0xA9),
+     o3(0xE6,0x8E,0xA1), o3(0xE7,0xA0,0xA6),
+     o3(0xE7,0xB6,0xB5), o3(0xE8,0x8F,0x9C),
+     o3(0xE8,0x94,0xA1), o3(0xE9,0x87,0x87),
+     o3(0xE9,0x87,0xB5), o3(0xE5,0x86,0x8A),
+     o3(0xE6,0x9F,0xB5), o3(0xE7,0xAD,0x96),
+
+#define from_CP949_F3 WORDINDEX2INFO(48106)
+    from_CP949_C7_offsets,
+    from_CP949_F3_infos,
+
+#define from_CP949_F4_infos WORDINDEX2INFO(48108)
+                INVALID,              UNDEF,
+     o3(0xE8,0xB2,0xAC), o3(0xE5,0x87,0x84),
+     o3(0xE5,0xA6,0xBB), o3(0xE6,0x82,0xBD),
+     o3(0xE8,0x99,0x95), o3(0xE5,0x80,0x9C),
+     o3(0xEF,0xA7,0xBF), o3(0xE5,0x89,0x94),
+     o3(0xE5,0xB0,0xBA), o3(0xE6,0x85,0xBD),
+     o3(0xE6,0x88,0x9A), o3(0xE6,0x8B,0x93),
+     o3(0xE6,0x93,0xB2), o3(0xE6,0x96,0xA5),
+     o3(0xE6,0xBB,0x8C), o3(0xE7,0x98,0xA0),
+     o3(0xE8,0x84,0x8A), o3(0xE8,0xB9,0xA0),
+     o3(0xE9,0x99,0x9F), o3(0xE9,0x9A,0xBB),
+     o3(0xE4,0xBB,0x9F), o3(0xE5,0x8D,0x83),
+     o3(0xE5,0x96,0x98), o3(0xE5,0xA4,0xA9),
+     o3(0xE5,0xB7,0x9D), o3(0xE6,0x93,0x85),
+     o3(0xE6,0xB3,0x89), o3(0xE6,0xB7,0xBA),
+     o3(0xE7,0x8E,0x94), o3(0xE7,0xA9,0xBF),
+     o3(0xE8,0x88,0x9B), o3(0xE8,0x96,0xA6),
+     o3(0xE8,0xB3,0xA4), o3(0xE8,0xB8,0x90),
+     o3(0xE9,0x81,0xB7), o3(0xE9,0x87,0xA7),
+     o3(0xE9,0x97,0xA1), o3(0xE9,0x98,0xA1),
+     o3(0xE9,0x9F,0x86), o3(0xE5,0x87,0xB8),
+     o3(0xE5,0x93,0xB2), o3(0xE5,0x96,0x86),
+     o3(0xE5,0xBE,0xB9), o3(0xE6,0x92,0xA4),
+     o3(0xE6,0xBE,0x88), o3(0xE7,0xB6,0xB4),
+     o3(0xE8,0xBC,0x9F), o3(0xE8,0xBD,0x8D),
+     o3(0xE9,0x90,0xB5), o3(0xE5,0x83,0x89),
+     o3(0xE5,0xB0,0x96), o3(0xE6,0xB2,0xBE),
+     o3(0xE6,0xB7,0xBB), o3(0xE7,0x94,0x9B),
+     o3(0xE7,0x9E,0xBB), o3(0xE7,0xB0,0xBD),
+     o3(0xE7,0xB1,0xA4), o3(0xE8,0xA9,0xB9),
+     o3(0xE8,0xAB,0x82), o3(0xE5,0xA0,0x9E),
+     o3(0xE5,0xA6,0xBE), o3(0xE5,0xB8,0x96),
+     o3(0xE6,0x8D,0xB7), o3(0xE7,0x89,0x92),
+     o3(0xE7,0x96,0x8A), o3(0xE7,0x9D,0xAB),
+     o3(0xE8,0xAB,0x9C), o3(0xE8,0xB2,0xBC),
+     o3(0xE8,0xBC,0x92), o3(0xE5,0xBB,0xB3),
+     o3(0xE6,0x99,0xB4), o3(0xE6,0xB7,0xB8),
+     o3(0xE8,0x81,0xBD), o3(0xE8,0x8F,0x81),
+     o3(0xE8,0xAB,0x8B), o3(0xE9,0x9D,0x91),
+     o3(0xE9,0xAF,0x96), o3(0xEF,0xA8,0x80),
+     o3(0xE5,0x89,0x83), o3(0xE6,0x9B,0xBF),
+     o3(0xE6,0xB6,0x95), o3(0xE6,0xBB,0xAF),
+     o3(0xE7,0xB7,0xA0), o3(0xE8,0xAB,0xA6),
+     o3(0xE9,0x80,0xAE), o3(0xE9,0x81,0x9E),
+     o3(0xE9,0xAB,0x94), o3(0xE5,0x88,0x9D),
+     o3(0xE5,0x89,0xBF), o3(0xE5,0x93,0xA8),
+     o3(0xE6,0x86,0x94), o3(0xE6,0x8A,0x84),
+     o3(0xE6,0x8B,0x9B), o3(0xE6,0xA2,0xA2),
+
+#define from_CP949_F4 WORDINDEX2INFO(48204)
+    from_CP949_C7_offsets,
+    from_CP949_F4_infos,
+
+#define from_CP949_F5_infos WORDINDEX2INFO(48206)
+                INVALID,              UNDEF,
+     o3(0xE6,0xA4,0x92), o3(0xE6,0xA5,0x9A),
+     o3(0xE6,0xA8,0xB5), o3(0xE7,0x82,0x92),
+     o3(0xE7,0x84,0xA6), o3(0xE7,0xA1,0x9D),
+     o3(0xE7,0xA4,0x81), o3(0xE7,0xA4,0x8E),
+     o3(0xE7,0xA7,0x92), o3(0xE7,0xA8,0x8D),
+     o3(0xE8,0x82,0x96), o3(0xE8,0x89,0xB8),
+     o3(0xE8,0x8B,0x95), o3(0xE8,0x8D,0x89),
+     o3(0xE8,0x95,0x89), o3(0xE8,0xB2,0x82),
+     o3(0xE8,0xB6,0x85), o3(0xE9,0x85,0xA2),
+     o3(0xE9,0x86,0x8B), o3(0xE9,0x86,0xAE),
+     o3(0xE4,0xBF,0x83), o3(0xE5,0x9B,0x91),
+     o3(0xE7,0x87,0xAD), o3(0xE7,0x9F,0x97),
+     o3(0xE8,0x9C,0x80), o3(0xE8,0xA7,0xB8),
+     o3(0xE5,0xAF,0xB8), o3(0xE5,0xBF,0x96),
+     o3(0xE6,0x9D,0x91), o3(0xE9,0x82,0xA8),
+     o3(0xE5,0x8F,0xA2), o3(0xE5,0xA1,0x9A),
+     o3(0xE5,0xAF,0xB5), o3(0xE6,0x82,0xA4),
+     o3(0xE6,0x86,0x81), o3(0xE6,0x91,0xA0),
+     o3(0xE7,0xB8,0xBD), o3(0xE8,0x81,0xB0),
+     o3(0xE8,0x94,0xA5), o3(0xE9,0x8A,0x83),
+     o3(0xE6,0x92,0xAE), o3(0xE5,0x82,0xAC),
+     o3(0xE5,0xB4,0x94), o3(0xE6,0x9C,0x80),
+     o3(0xE5,0xA2,0x9C), o3(0xE6,0x8A,0xBD),
+     o3(0xE6,0x8E,0xA8), o3(0xE6,0xA4,0x8E),
+     o3(0xE6,0xA5,0xB8), o3(0xE6,0xA8,0x9E),
+     o3(0xE6,0xB9,0xAB), o3(0xE7,0x9A,0xBA),
+     o3(0xE7,0xA7,0x8B), o3(0xE8,0x8A,0xBB),
+     o3(0xE8,0x90,0xA9), o3(0xE8,0xAB,0x8F),
+     o3(0xE8,0xB6,0xA8), o3(0xE8,0xBF,0xBD),
+     o3(0xE9,0x84,0x92), o3(0xE9,0x85,0x8B),
+     o3(0xE9,0x86,0x9C), o3(0xE9,0x8C,0x90),
+     o3(0xE9,0x8C,0x98), o3(0xE9,0x8E,0x9A),
+     o3(0xE9,0x9B,0x9B), o3(0xE9,0xA8,0xB6),
+     o3(0xE9,0xB0,0x8D), o3(0xE4,0xB8,0x91),
+     o3(0xE7,0x95,0x9C), o3(0xE7,0xA5,0x9D),
+     o3(0xE7,0xAB,0xBA), o3(0xE7,0xAD,0x91),
+     o3(0xE7,0xAF,0x89), o3(0xE7,0xB8,0xAE),
+     o3(0xE8,0x93,0x84), o3(0xE8,0xB9,0x99),
+     o3(0xE8,0xB9,0xB4), o3(0xE8,0xBB,0xB8),
+     o3(0xE9,0x80,0x90), o3(0xE6,0x98,0xA5),
+     o3(0xE6,0xA4,0xBF), o3(0xE7,0x91,0x83),
+     o3(0xE5,0x87,0xBA), o3(0xE6,0x9C,0xAE),
+     o3(0xE9,0xBB,0x9C), o3(0xE5,0x85,0x85),
+     o3(0xE5,0xBF,0xA0), o3(0xE6,0xB2,0x96),
+     o3(0xE8,0x9F,0xB2), o3(0xE8,0xA1,0x9D),
+     o3(0xE8,0xA1,0xB7), o3(0xE6,0x82,0xB4),
+     o3(0xE8,0x86,0xB5), o3(0xE8,0x90,0x83),
+
+#define from_CP949_F5 WORDINDEX2INFO(48302)
+    from_CP949_C7_offsets,
+    from_CP949_F5_infos,
+
+#define from_CP949_F6_infos WORDINDEX2INFO(48304)
+                INVALID,              UNDEF,
+     o3(0xE8,0xB4,0x85), o3(0xE5,0x8F,0x96),
+     o3(0xE5,0x90,0xB9), o3(0xE5,0x98,0xB4),
+     o3(0xE5,0xA8,0xB6), o3(0xE5,0xB0,0xB1),
+     o3(0xE7,0x82,0x8A), o3(0xE7,0xBF,0xA0),
+     o3(0xE8,0x81,0x9A), o3(0xE8,0x84,0x86),
+     o3(0xE8,0x87,0xAD), o3(0xE8,0xB6,0xA3),
+     o3(0xE9,0x86,0x89), o3(0xE9,0xA9,0x9F),
+     o3(0xE9,0xB7,0xB2), o3(0xE5,0x81,0xB4),
+     o3(0xE4,0xBB,0x84), o3(0xE5,0x8E,0xA0),
+     o3(0xE6,0x83,0xBB), o3(0xE6,0xB8,0xAC),
+     o3(0xE5,0xB1,0xA4), o3(0xE4,0xBE,0x88),
+     o3(0xE5,0x80,0xA4), o3(0xE5,0x97,0xA4),
+     o3(0xE5,0xB3,0x99), o3(0xE5,0xB9,0x9F),
+     o3(0xE6,0x81,0xA5), o3(0xE6,0xA2,0x94),
+     o3(0xE6,0xB2,0xBB), o3(0xE6,0xB7,0x84),
+     o3(0xE7,0x86,0xBE), o3(0xE7,0x97,0x94),
+     o3(0xE7,0x97,0xB4), o3(0xE7,0x99,0xA1),
+     o3(0xE7,0xA8,0x9A), o3(0xE7,0xA9,0x89),
+     o3(0xE7,0xB7,0x87), o3(0xE7,0xB7,0xBB),
+     o3(0xE7,0xBD,0xAE), o3(0xE8,0x87,0xB4),
+     o3(0xE8,0x9A,0xA9), o3(0xE8,0xBC,0x9C),
+     o3(0xE9,0x9B,0x89), o3(0xE9,0xA6,0xB3),
+     o3(0xE9,0xBD,0x92), o3(0xE5,0x89,0x87),
+     o3(0xE5,0x8B,0x85), o3(0xE9,0xA3,0xAD),
+     o3(0xE8,0xA6,0xAA), o3(0xE4,0xB8,0x83),
+     o3(0xE6,0x9F,0x92), o3(0xE6,0xBC,0x86),
+     o3(0xE4,0xBE,0xB5), o3(0xE5,0xAF,0xA2),
+     o3(0xE6,0x9E,0x95), o3(0xE6,0xB2,0x88),
+     o3(0xE6,0xB5,0xB8), o3(0xE7,0x90,0x9B),
+     o3(0xE7,0xA0,0xA7), o3(0xE9,0x87,0x9D),
+     o3(0xE9,0x8D,0xBC), o3(0xE8,0x9F,0x84),
+     o3(0xE7,0xA7,0xA4), o3(0xE7,0xA8,0xB1),
+     o3(0xE5,0xBF,0xAB), o3(0xE4,0xBB,0x96),
+     o3(0xE5,0x92,0xA4), o3(0xE5,0x94,0xBE),
+     o3(0xE5,0xA2,0xAE), o3(0xE5,0xA6,0xA5),
+     o3(0xE6,0x83,0xB0), o3(0xE6,0x89,0x93),
+     o3(0xE6,0x8B,0x96), o3(0xE6,0x9C,0xB6),
+     o3(0xE6,0xA5,0x95), o3(0xE8,0x88,0xB5),
+     o3(0xE9,0x99,0x80), o3(0xE9,0xA6,0xB1),
+     o3(0xE9,0xA7,0x9D), o3(0xE5,0x80,0xAC),
+     o3(0xE5,0x8D,0x93), o3(0xE5,0x95,0x84),
+     o3(0xE5,0x9D,0xBC), o3(0xEF,0xA8,0x81),
+     o3(0xE6,0x89,0x98), o3(0xEF,0xA8,0x82),
+     o3(0xE6,0x93,0xA2), o3(0xE6,0x99,0xAB),
+     o3(0xE6,0x9F,0x9D), o3(0xE6,0xBF,0x81),
+     o3(0xE6,0xBF,0xAF), o3(0xE7,0x90,0xA2),
+     o3(0xE7,0x90,0xB8), o3(0xE8,0xA8,0x97),
+
+#define from_CP949_F6 WORDINDEX2INFO(48400)
+    from_CP949_C7_offsets,
+    from_CP949_F6_infos,
+
+#define from_CP949_F7_infos WORDINDEX2INFO(48402)
+                INVALID,              UNDEF,
+     o3(0xE9,0x90,0xB8), o3(0xE5,0x91,0x91),
+     o3(0xE5,0x98,0x86), o3(0xE5,0x9D,0xA6),
+     o3(0xE5,0xBD,0x88), o3(0xE6,0x86,0x9A),
+     o3(0xE6,0xAD,0x8E), o3(0xE7,0x81,0x98),
+     o3(0xE7,0x82,0xAD), o3(0xE7,0xB6,0xBB),
+     o3(0xE8,0xAA,0x95), o3(0xE5,0xA5,0xAA),
+     o3(0xE8,0x84,0xAB), o3(0xE6,0x8E,0xA2),
+     o3(0xE7,0x9C,0x88), o3(0xE8,0x80,0xBD),
+     o3(0xE8,0xB2,0xAA), o3(0xE5,0xA1,0x94),
+     o3(0xE6,0x90,0xAD), o3(0xE6,0xA6,0xBB),
+     o3(0xE5,0xAE,0x95), o3(0xE5,0xB8,0x91),
+     o3(0xE6,0xB9,0xAF), o3(0xEF,0xA8,0x83),
+     o3(0xE8,0x95,0xA9), o3(0xE5,0x85,0x8C),
+     o3(0xE5,0x8F,0xB0), o3(0xE5,0xA4,0xAA),
+     o3(0xE6,0x80,0xA0), o3(0xE6,0x85,0x8B),
+     o3(0xE6,0xAE,0x86), o3(0xE6,0xB1,0xB0),
+     o3(0xE6,0xB3,0xB0), o3(0xE7,0xAC,0x9E),
+     o3(0xE8,0x83,0x8E), o3(0xE8,0x8B,0x94),
+     o3(0xE8,0xB7,0x86), o3(0xE9,0x82,0xB0),
+     o3(0xE9,0xA2,0xB1), o3(0xEF,0xA8,0x84),
+     o3(0xE6,0x93,0x87), o3(0xE6,0xBE,0xA4),
+     o3(0xE6,0x92,0x91), o3(0xE6,0x94,0x84),
+     o3(0xE5,0x85,0x8E), o3(0xE5,0x90,0x90),
+     o3(0xE5,0x9C,0x9F), o3(0xE8,0xA8,0x8E),
+     o3(0xE6,0x85,0x9F), o3(0xE6,0xA1,0xB6),
+     o3(0xEF,0xA8,0x85), o3(0xE7,0x97,0x9B),
+     o3(0xE7,0xAD,0x92), o3(0xE7,0xB5,0xB1),
+     o3(0xE9,0x80,0x9A), o3(0xE5,0xA0,0x86),
+     o3(0xE6,0xA7,0x8C), o3(0xE8,0x85,0xBF),
+     o3(0xE8,0xA4,0xAA), o3(0xE9,0x80,0x80),
+     o3(0xE9,0xA0,0xB9), o3(0xE5,0x81,0xB8),
+     o3(0xE5,0xA5,0x97), o3(0xE5,0xA6,0xAC),
+     o3(0xE6,0x8A,0x95), o3(0xE9,0x80,0x8F),
+     o3(0xE9,0xAC,0xAA), o3(0xE6,0x85,0x9D),
+     o3(0xE7,0x89,0xB9), o3(0xE9,0x97,0x96),
+     o3(0xE5,0x9D,0xA1), o3(0xE5,0xA9,0x86),
+     o3(0xE5,0xB7,0xB4), o3(0xE6,0x8A,0x8A),
+     o3(0xE6,0x92,0xAD), o3(0xE6,0x93,0xBA),
+     o3(0xE6,0x9D,0xB7), o3(0xE6,0xB3,0xA2),
+     o3(0xE6,0xB4,0xBE), o3(0xE7,0x88,0xAC),
+     o3(0xE7,0x90,0xB6), o3(0xE7,0xA0,0xB4),
+     o3(0xE7,0xBD,0xB7), o3(0xE8,0x8A,0xAD),
+     o3(0xE8,0xB7,0x9B), o3(0xE9,0xA0,0x97),
+     o3(0xE5,0x88,0xA4), o3(0xE5,0x9D,0x82),
+     o3(0xE6,0x9D,0xBF), o3(0xE7,0x89,0x88),
+     o3(0xE7,0x93,0xA3), o3(0xE8,0xB2,0xA9),
+     o3(0xE8,0xBE,0xA6), o3(0xE9,0x88,0x91),
+
+#define from_CP949_F7 WORDINDEX2INFO(48498)
+    from_CP949_C7_offsets,
+    from_CP949_F7_infos,
+
+#define from_CP949_F8_infos WORDINDEX2INFO(48500)
+                INVALID,              UNDEF,
+     o3(0xE9,0x98,0xAA), o3(0xE5,0x85,0xAB),
+     o3(0xE5,0x8F,0xAD), o3(0xE6,0x8D,0x8C),
+     o3(0xE4,0xBD,0xA9), o3(0xE5,0x94,0x84),
+     o3(0xE6,0x82,0x96), o3(0xE6,0x95,0x97),
+     o3(0xE6,0xB2,0x9B), o3(0xE6,0xB5,0xBF),
+     o3(0xE7,0x89,0x8C), o3(0xE7,0x8B,0xBD),
+     o3(0xE7,0xA8,0x97), o3(0xE8,0xA6,0x87),
+     o3(0xE8,0xB2,0x9D), o3(0xE5,0xBD,0xAD),
+     o3(0xE6,0xBE,0x8E), o3(0xE7,0x83,0xB9),
+     o3(0xE8,0x86,0xA8), o3(0xE6,0x84,0x8E),
+     o3(0xE4,0xBE,0xBF), o3(0xE5,0x81,0x8F),
+     o3(0xE6,0x89,0x81), o3(0xE7,0x89,0x87),
+     o3(0xE7,0xAF,0x87), o3(0xE7,0xB7,0xA8),
+     o3(0xE7,0xBF,0xA9), o3(0xE9,0x81,0x8D),
+     o3(0xE9,0x9E,0xAD), o3(0xE9,0xA8,0x99),
+     o3(0xE8,0xB2,0xB6), o3(0xE5,0x9D,0xAA),
+     o3(0xE5,0xB9,0xB3), o3(0xE6,0x9E,0xB0),
+     o3(0xE8,0x90,0x8D), o3(0xE8,0xA9,0x95),
+     o3(0xE5,0x90,0xA0), o3(0xE5,0xAC,0x96),
+     o3(0xE5,0xB9,0xA3), o3(0xE5,0xBB,0xA2),
+     o3(0xE5,0xBC,0x8A), o3(0xE6,0x96,0x83),
+     o3(0xE8,0x82,0xBA), o3(0xE8,0x94,0xBD),
+     o3(0xE9,0x96,0x89), o3(0xE9,0x99,0x9B),
+     o3(0xE4,0xBD,0x88), o3(0xE5,0x8C,0x85),
+     o3(0xE5,0x8C,0x8D), o3(0xE5,0x8C,0x8F),
+     o3(0xE5,0x92,0x86), o3(0xE5,0x93,0xBA),
+     o3(0xE5,0x9C,0x83), o3(0xE5,0xB8,0x83),
+     o3(0xE6,0x80,0x96), o3(0xE6,0x8A,0x9B),
+     o3(0xE6,0x8A,0xB1), o3(0xE6,0x8D,0x95),
+     o3(0xEF,0xA8,0x86), o3(0xE6,0xB3,0xA1),
+     o3(0xE6,0xB5,0xA6), o3(0xE7,0x96,0xB1),
+     o3(0xE7,0xA0,0xB2), o3(0xE8,0x83,0x9E),
+     o3(0xE8,0x84,0xAF), o3(0xE8,0x8B,0x9E),
+     o3(0xE8,0x91,0xA1), o3(0xE8,0x92,0xB2),
+     o3(0xE8,0xA2,0x8D), o3(0xE8,0xA4,0x92),
+     o3(0xE9,0x80,0x8B), o3(0xE9,0x8B,0xAA),
+     o3(0xE9,0xA3,0xBD), o3(0xE9,0xAE,0x91),
+     o3(0xE5,0xB9,0x85), o3(0xE6,0x9A,0xB4),
+     o3(0xE6,0x9B,0x9D), o3(0xE7,0x80,0x91),
+     o3(0xE7,0x88,0x86), o3(0xEF,0xA8,0x87),
+     o3(0xE4,0xBF,0xB5), o3(0xE5,0x89,0xBD),
+     o3(0xE5,0xBD,0xAA), o3(0xE6,0x85,0x93),
+     o3(0xE6,0x9D,0x93), o3(0xE6,0xA8,0x99),
+     o3(0xE6,0xBC,0x82), o3(0xE7,0x93,0xA2),
+     o3(0xE7,0xA5,0xA8), o3(0xE8,0xA1,0xA8),
+     o3(0xE8,0xB1,0xB9), o3(0xE9,0xA3,0x87),
+     o3(0xE9,0xA3,0x84), o3(0xE9,0xA9,0x83),
+
+#define from_CP949_F8 WORDINDEX2INFO(48596)
+    from_CP949_C7_offsets,
+    from_CP949_F8_infos,
+
+#define from_CP949_F9_infos WORDINDEX2INFO(48598)
+                INVALID,              UNDEF,
+     o3(0xE5,0x93,0x81), o3(0xE7,0xA8,0x9F),
+     o3(0xE6,0xA5,0x93), o3(0xE8,0xAB,0xB7),
+     o3(0xE8,0xB1,0x8A), o3(0xE9,0xA2,0xA8),
+     o3(0xE9,0xA6,0xAE), o3(0xE5,0xBD,0xBC),
+     o3(0xE6,0x8A,0xAB), o3(0xE7,0x96,0xB2),
+     o3(0xE7,0x9A,0xAE), o3(0xE8,0xA2,0xAB),
+     o3(0xE9,0x81,0xBF), o3(0xE9,0x99,0x82),
+     o3(0xE5,0x8C,0xB9), o3(0xE5,0xBC,0xBC),
+     o3(0xE5,0xBF,0x85), o3(0xE6,0xB3,0x8C),
+     o3(0xE7,0x8F,0x8C), o3(0xE7,0x95,0xA2),
+     o3(0xE7,0x96,0x8B), o3(0xE7,0xAD,0x86),
+     o3(0xE8,0x8B,0xBE), o3(0xE9,0xA6,0x9D),
+     o3(0xE4,0xB9,0x8F), o3(0xE9,0x80,0xBC),
+     o3(0xE4,0xB8,0x8B), o3(0xE4,0xBD,0x95),
+     o3(0xE5,0x8E,0xA6), o3(0xE5,0xA4,0x8F),
+     o3(0xE5,0xBB,0x88), o3(0xE6,0x98,0xB0),
+     o3(0xE6,0xB2,0xB3), o3(0xE7,0x91,0x95),
+     o3(0xE8,0x8D,0xB7), o3(0xE8,0x9D,0xA6),
+     o3(0xE8,0xB3,0x80), o3(0xE9,0x81,0x90),
+     o3(0xE9,0x9C,0x9E), o3(0xE9,0xB0,0x95),
+     o3(0xE5,0xA3,0x91), o3(0xE5,0xAD,0xB8),
+     o3(0xE8,0x99,0x90), o3(0xE8,0xAC,0x94),
+     o3(0xE9,0xB6,0xB4), o3(0xE5,0xAF,0x92),
+     o3(0xE6,0x81,0xA8), o3(0xE6,0x82,0x8D),
+     o3(0xE6,0x97,0xB1), o3(0xE6,0xB1,0x97),
+     o3(0xE6,0xBC,0xA2), o3(0xE6,0xBE,0xA3),
+     o3(0xE7,0x80,0x9A), o3(0xE7,0xBD,0x95),
+     o3(0xE7,0xBF,0xB0), o3(0xE9,0x96,0x91),
+     o3(0xE9,0x96,0x92), o3(0xE9,0x99,0x90),
+     o3(0xE9,0x9F,0x93), o3(0xE5,0x89,0xB2),
+     o3(0xE8,0xBD,0x84), o3(0xE5,0x87,0xBD),
+     o3(0xE5,0x90,0xAB), o3(0xE5,0x92,0xB8),
+     o3(0xE5,0x95,0xA3), o3(0xE5,0x96,0x8A),
+     o3(0xE6,0xAA,0xBB), o3(0xE6,0xB6,0xB5),
+     o3(0xE7,0xB7,0x98), o3(0xE8,0x89,0xA6),
+     o3(0xE9,0x8A,0x9C), o3(0xE9,0x99,0xB7),
+     o3(0xE9,0xB9,0xB9), o3(0xE5,0x90,0x88),
+     o3(0xE5,0x93,0x88), o3(0xE7,0x9B,0x92),
+     o3(0xE8,0x9B,0xA4), o3(0xE9,0x96,0xA4),
+     o3(0xE9,0x97,0x94), o3(0xE9,0x99,0x9C),
+     o3(0xE4,0xBA,0xA2), o3(0xE4,0xBC,0x89),
+     o3(0xE5,0xA7,0xAE), o3(0xE5,0xAB,0xA6),
+     o3(0xE5,0xB7,0xB7), o3(0xE6,0x81,0x92),
+     o3(0xE6,0x8A,0x97), o3(0xE6,0x9D,0xAD),
+     o3(0xE6,0xA1,0x81), o3(0xE6,0xB2,0x86),
+     o3(0xE6,0xB8,0xAF), o3(0xE7,0xBC,0xB8),
+     o3(0xE8,0x82,0x9B), o3(0xE8,0x88,0xAA),
+
+#define from_CP949_F9 WORDINDEX2INFO(48694)
+    from_CP949_C7_offsets,
+    from_CP949_F9_infos,
+
+#define from_CP949_FA_infos WORDINDEX2INFO(48696)
+                INVALID,              UNDEF,
+     o3(0xEF,0xA8,0x88), o3(0xEF,0xA8,0x89),
+     o3(0xE9,0xA0,0x85), o3(0xE4,0xBA,0xA5),
+     o3(0xE5,0x81,0x95), o3(0xE5,0x92,0xB3),
+     o3(0xE5,0x9E,0x93), o3(0xE5,0xA5,0x9A),
+     o3(0xE5,0xAD,0xA9), o3(0xE5,0xAE,0xB3),
+     o3(0xE6,0x87,0x88), o3(0xE6,0xA5,0xB7),
+     o3(0xE6,0xB5,0xB7), o3(0xE7,0x80,0xA3),
+     o3(0xE8,0x9F,0xB9), o3(0xE8,0xA7,0xA3),
+     o3(0xE8,0xA9,0xB2), o3(0xE8,0xAB,0xA7),
+     o3(0xE9,0x82,0x82), o3(0xE9,0xA7,0xAD),
+     o3(0xE9,0xAA,0xB8), o3(0xE5,0x8A,0xBE),
+     o3(0xE6,0xA0,0xB8), o3(0xE5,0x80,0x96),
+     o3(0xE5,0xB9,0xB8), o3(0xE6,0x9D,0x8F),
+     o3(0xE8,0x8D,0x87), o3(0xE8,0xA1,0x8C),
+     o3(0xE4,0xBA,0xAB), o3(0xE5,0x90,0x91),
+     o3(0xE5,0x9A,0xAE), o3(0xE7,0x8F,0xA6),
+     o3(0xE9,0x84,0x95), o3(0xE9,0x9F,0xBF),
+     o3(0xE9,0xA4,0x89), o3(0xE9,0xA5,0x97),
+     o3(0xE9,0xA6,0x99), o3(0xE5,0x99,0x93),
+     o3(0xE5,0xA2,0x9F), o3(0xE8,0x99,0x9B),
+     o3(0xE8,0xA8,0xB1), o3(0xE6,0x86,0xB2),
+     o3(0xE6,0xAB,0xB6), o3(0xE7,0x8D,0xBB),
+     o3(0xE8,0xBB,0x92), o3(0xE6,0xAD,0x87),
+     o3(0xE9,0x9A,0xAA), o3(0xE9,0xA9,0x97),
+     o3(0xE5,0xA5,0x95), o3(0xE7,0x88,0x80),
+     o3(0xE8,0xB5,0xAB), o3(0xE9,0x9D,0xA9),
+     o3(0xE4,0xBF,0x94), o3(0xE5,0xB3,0xB4),
+     o3(0xE5,0xBC,0xA6), o3(0xE6,0x87,0xB8),
+     o3(0xE6,0x99,0x9B), o3(0xE6,0xB3,0xAB),
+     o3(0xE7,0x82,0xAB), o3(0xE7,0x8E,0x84),
+     o3(0xE7,0x8E,0xB9), o3(0xE7,0x8F,0xBE),
+     o3(0xE7,0x9C,0xA9), o3(0xE7,0x9D,0x8D),
+     o3(0xE7,0xB5,0x83), o3(0xE7,0xB5,0xA2),
+     o3(0xE7,0xB8,0xA3), o3(0xE8,0x88,0xB7),
+     o3(0xE8,0xA1,0x92), o3(0xEF,0xA8,0x8A),
+     o3(0xE8,0xB3,0xA2), o3(0xE9,0x89,0x89),
+     o3(0xE9,0xA1,0xAF), o3(0xE5,0xAD,0x91),
+     o3(0xE7,0xA9,0xB4), o3(0xE8,0xA1,0x80),
+     o3(0xE9,0xA0,0x81), o3(0xE5,0xAB,0x8C),
+     o3(0xE4,0xBF,0xA0), o3(0xE5,0x8D,0x94),
+     o3(0xE5,0xA4,0xBE), o3(0xE5,0xB3,0xBD),
+     o3(0xE6,0x8C,0xBE), o3(0xE6,0xB5,0xB9),
+     o3(0xE7,0x8B,0xB9), o3(0xE8,0x84,0x85),
+     o3(0xE8,0x84,0x87), o3(0xE8,0x8E,0xA2),
+     o3(0xE9,0x8B,0x8F), o3(0xE9,0xA0,0xB0),
+     o3(0xE4,0xBA,0xA8), o3(0xE5,0x85,0x84),
+     o3(0xE5,0x88,0x91), o3(0xE5,0x9E,0x8B),
+
+#define from_CP949_FA WORDINDEX2INFO(48792)
+    from_CP949_C7_offsets,
+    from_CP949_FA_infos,
+
+#define from_CP949_FB_infos WORDINDEX2INFO(48794)
+                INVALID,              UNDEF,
+     o3(0xE5,0xBD,0xA2), o3(0xE6,0xB3,0x82),
+     o3(0xE6,0xBB,0x8E), o3(0xE7,0x80,0x85),
+     o3(0xE7,0x81,0x90), o3(0xE7,0x82,0xAF),
+     o3(0xE7,0x86,0x92), o3(0xE7,0x8F,0xA9),
+     o3(0xE7,0x91,0xA9), o3(0xE8,0x8D,0x8A),
+     o3(0xE8,0x9E,0xA2), o3(0xE8,0xA1,0xA1),
+     o3(0xE9,0x80,0x88), o3(0xE9,0x82,0xA2),
+     o3(0xE9,0x8E,0xA3), o3(0xE9,0xA6,0xA8),
+     o3(0xE5,0x85,0xAE), o3(0xE5,0xBD,0x97),
+     o3(0xE6,0x83,0xA0), o3(0xE6,0x85,0xA7),
+     o3(0xE6,0x9A,0xB3), o3(0xE8,0x95,0x99),
+     o3(0xE8,0xB9,0x8A), o3(0xE9,0x86,0xAF),
+     o3(0xE9,0x9E,0x8B), o3(0xE4,0xB9,0x8E),
+     o3(0xE4,0xBA,0x92), o3(0xE5,0x91,0xBC),
+     o3(0xE5,0xA3,0x95), o3(0xE5,0xA3,0xBA),
+     o3(0xE5,0xA5,0xBD), o3(0xE5,0xB2,0xB5),
+     o3(0xE5,0xBC,0xA7), o3(0xE6,0x88,0xB6),
+     o3(0xE6,0x89,0x88), o3(0xE6,0x98,0x8A),
+     o3(0xE6,0x99,0xA7), o3(0xE6,0xAF,0xAB),
+     o3(0xE6,0xB5,0xA9), o3(0xE6,0xB7,0x8F),
+     o3(0xE6,0xB9,0x96), o3(0xE6,0xBB,0xB8),
+     o3(0xE6,0xBE,0x94), o3(0xE6,0xBF,0xA0),
+     o3(0xE6,0xBF,0xA9), o3(0xE7,0x81,0x9D),
+     o3(0xE7,0x8B,0x90), o3(0xE7,0x90,0xA5),
+     o3(0xE7,0x91,0x9A), o3(0xE7,0x93,0xA0),
+     o3(0xE7,0x9A,0x93), o3(0xE7,0xA5,0x9C),
+     o3(0xE7,0xB3,0x8A), o3(0xE7,0xB8,0x9E),
+     o3(0xE8,0x83,0xA1), o3(0xE8,0x8A,0xA6),
+     o3(0xE8,0x91,0xAB), o3(0xE8,0x92,0xBF),
+     o3(0xE8,0x99,0x8E), o3(0xE8,0x99,0x9F),
+     o3(0xE8,0x9D,0xB4), o3(0xE8,0xAD,0xB7),
+     o3(0xE8,0xB1,0xAA), o3(0xE9,0x8E,0xAC),
+     o3(0xE9,0xA0,0x80), o3(0xE9,0xA1,0xA5),
+     o3(0xE6,0x83,0x91), o3(0xE6,0x88,0x96),
+     o3(0xE9,0x85,0xB7), o3(0xE5,0xA9,0x9A),
+     o3(0xE6,0x98,0x8F), o3(0xE6,0xB7,0xB7),
+     o3(0xE6,0xB8,0xBE), o3(0xE7,0x90,0xBF),
+     o3(0xE9,0xAD,0x82), o3(0xE5,0xBF,0xBD),
+     o3(0xE6,0x83,0x9A), o3(0xE7,0xAC,0x8F),
+     o3(0xE5,0x93,0x84), o3(0xE5,0xBC,0x98),
+     o3(0xE6,0xB1,0x9E), o3(0xE6,0xB3,0x93),
+     o3(0xE6,0xB4,0xAA), o3(0xE7,0x83,0x98),
+     o3(0xE7,0xB4,0x85), o3(0xE8,0x99,0xB9),
+     o3(0xE8,0xA8,0x8C), o3(0xE9,0xB4,0xBB),
+     o3(0xE5,0x8C,0x96), o3(0xE5,0x92,0x8C),
+     o3(0xE5,0xAC,0x85), o3(0xE6,0xA8,0xBA),
+     o3(0xE7,0x81,0xAB), o3(0xE7,0x95,0xB5),
+
+#define from_CP949_FB WORDINDEX2INFO(48890)
+    from_CP949_C7_offsets,
+    from_CP949_FB_infos,
+
+#define from_CP949_FC_infos WORDINDEX2INFO(48892)
+                INVALID,              UNDEF,
+     o3(0xE7,0xA6,0x8D), o3(0xE7,0xA6,0xBE),
+     o3(0xE8,0x8A,0xB1), o3(0xE8,0x8F,0xAF),
+     o3(0xE8,0xA9,0xB1), o3(0xE8,0xAD,0x81),
+     o3(0xE8,0xB2,0xA8), o3(0xE9,0x9D,0xB4),
+     o3(0xEF,0xA8,0x8B), o3(0xE6,0x93,0xB4),
+     o3(0xE6,0x94,0xAB), o3(0xE7,0xA2,0xBA),
+     o3(0xE7,0xA2,0xBB), o3(0xE7,0xA9,0xAB),
+     o3(0xE4,0xB8,0xB8), o3(0xE5,0x96,0x9A),
+     o3(0xE5,0xA5,0x90), o3(0xE5,0xAE,0xA6),
+     o3(0xE5,0xB9,0xBB), o3(0xE6,0x82,0xA3),
+     o3(0xE6,0x8F,0x9B), o3(0xE6,0xAD,0xA1),
+     o3(0xE6,0x99,0xA5), o3(0xE6,0xA1,0x93),
+     o3(0xE6,0xB8,0x99), o3(0xE7,0x85,0xA5),
+     o3(0xE7,0x92,0xB0), o3(0xE7,0xB4,0x88),
+     o3(0xE9,0x82,0x84), o3(0xE9,0xA9,0xA9),
+     o3(0xE9,0xB0,0xA5), o3(0xE6,0xB4,0xBB),
+     o3(0xE6,0xBB,0x91), o3(0xE7,0x8C,0xBE),
+     o3(0xE8,0xB1,0x81), o3(0xE9,0x97,0x8A),
+     o3(0xE5,0x87,0xB0), o3(0xE5,0xB9,0x8C),
+     o3(0xE5,0xBE,0xA8), o3(0xE6,0x81,0x8D),
+     o3(0xE6,0x83,0xB6), o3(0xE6,0x84,0xB0),
+     o3(0xE6,0x85,0x8C), o3(0xE6,0x99,0x83),
+     o3(0xE6,0x99,0x84), o3(0xE6,0xA6,0xA5),
+     o3(0xE6,0xB3,0x81), o3(0xE6,0xB9,0x9F),
+     o3(0xE6,0xBB,0x89), o3(0xE6,0xBD,0xA2),
+     o3(0xE7,0x85,0x8C), o3(0xE7,0x92,0x9C),
+     o3(0xE7,0x9A,0x87), o3(0xE7,0xAF,0x81),
+     o3(0xE7,0xB0,0xA7), o3(0xE8,0x8D,0x92),
+     o3(0xE8,0x9D,0x97), o3(0xE9,0x81,0x91),
+     o3(0xE9,0x9A,0x8D), o3(0xE9,0xBB,0x83),
+     o3(0xE5,0x8C,0xAF), o3(0xE5,0x9B,0x9E),
+     o3(0xE5,0xBB,0xBB), o3(0xE5,0xBE,0x8A),
+     o3(0xE6,0x81,0xA2), o3(0xE6,0x82,0x94),
+     o3(0xE6,0x87,0xB7), o3(0xE6,0x99,0xA6),
+     o3(0xE6,0x9C,0x83), o3(0xE6,0xAA,0x9C),
+     o3(0xE6,0xB7,0xAE), o3(0xE6,0xBE,0xAE),
+     o3(0xE7,0x81,0xB0), o3(0xE7,0x8D,0xAA),
+     o3(0xE7,0xB9,0xAA), o3(0xE8,0x86,0xBE),
+     o3(0xE8,0x8C,0xB4), o3(0xE8,0x9B,0x94),
+     o3(0xE8,0xAA,0xA8), o3(0xE8,0xB3,0x84),
+     o3(0xE5,0x8A,0x83), o3(0xE7,0x8D,0xB2),
+     o3(0xE5,0xAE,0x96), o3(0xE6,0xA9,0xAB),
+     o3(0xE9,0x90,0x84), o3(0xE5,0x93,0xAE),
+     o3(0xE5,0x9A,0x86), o3(0xE5,0xAD,0x9D),
+     o3(0xE6,0x95,0x88), o3(0xE6,0x96,0x85),
+     o3(0xE6,0x9B,0x89), o3(0xE6,0xA2,0x9F),
+     o3(0xE6,0xB6,0x8D), o3(0xE6,0xB7,0x86),
+
+#define from_CP949_FC WORDINDEX2INFO(48988)
+    from_CP949_C7_offsets,
+    from_CP949_FC_infos,
+
+#define from_CP949_FD_infos WORDINDEX2INFO(48990)
+                INVALID,              UNDEF,
+     o3(0xE7,0x88,0xBB), o3(0xE8,0x82,0xB4),
+     o3(0xE9,0x85,0xB5), o3(0xE9,0xA9,0x8D),
+     o3(0xE4,0xBE,0xAF), o3(0xE5,0x80,0x99),
+     o3(0xE5,0x8E,0x9A), o3(0xE5,0x90,0x8E),
+     o3(0xE5,0x90,0xBC), o3(0xE5,0x96,0x89),
+     o3(0xE5,0x97,0x85), o3(0xE5,0xB8,0xBF),
+     o3(0xE5,0xBE,0x8C), o3(0xE6,0x9C,0xBD),
+     o3(0xE7,0x85,0xA6), o3(0xE7,0x8F,0x9D),
+     o3(0xE9,0x80,0x85), o3(0xE5,0x8B,0x9B),
+     o3(0xE5,0x8B,0xB3), o3(0xE5,0xA1,0xA4),
+     o3(0xE5,0xA3,0x8E), o3(0xE7,0x84,0x84),
+     o3(0xE7,0x86,0x8F), o3(0xE7,0x87,0xBB),
+     o3(0xE8,0x96,0xB0), o3(0xE8,0xA8,0x93),
+     o3(0xE6,0x9A,0x88), o3(0xE8,0x96,0xA8),
+     o3(0xE5,0x96,0xA7), o3(0xE6,0x9A,0x84),
+     o3(0xE7,0x85,0x8A), o3(0xE8,0x90,0xB1),
+     o3(0xE5,0x8D,0x89), o3(0xE5,0x96,0x99),
+     o3(0xE6,0xAF,0x81), o3(0xE5,0xBD,0x99),
+     o3(0xE5,0xBE,0xBD), o3(0xE6,0x8F,0xAE),
+     o3(0xE6,0x9A,0x89), o3(0xE7,0x85,0x87),
+     o3(0xE8,0xAB,0xB1), o3(0xE8,0xBC,0x9D),
+     o3(0xE9,0xBA,0xBE), o3(0xE4,0xBC,0x91),
+     o3(0xE6,0x90,0xBA), o3(0xE7,0x83,0x8B),
+     o3(0xE7,0x95,0xA6), o3(0xE8,0x99,0xA7),
+     o3(0xE6,0x81,0xA4), o3(0xE8,0xAD,0x8E),
+     o3(0xE9,0xB7,0xB8), o3(0xE5,0x85,0x87),
+     o3(0xE5,0x87,0xB6), o3(0xE5,0x8C,0x88),
+     o3(0xE6,0xB4,0xB6), o3(0xE8,0x83,0xB8),
+     o3(0xE9,0xBB,0x91), o3(0xE6,0x98,0x95),
+     o3(0xE6,0xAC,0xA3), o3(0xE7,0x82,0x98),
+     o3(0xE7,0x97,0x95), o3(0xE5,0x90,0x83),
+     o3(0xE5,0xB1,0xB9), o3(0xE7,0xB4,0x87),
+     o3(0xE8,0xA8,0x96), o3(0xE6,0xAC,0xA0),
+     o3(0xE6,0xAC,0xBD), o3(0xE6,0xAD,0x86),
+     o3(0xE5,0x90,0xB8), o3(0xE6,0x81,0xB0),
+     o3(0xE6,0xB4,0xBD), o3(0xE7,0xBF,0x95),
+     o3(0xE8,0x88,0x88), o3(0xE5,0x83,0x96),
+     o3(0xE5,0x87,0x9E), o3(0xE5,0x96,0x9C),
+     o3(0xE5,0x99,0xAB), o3(0xE5,0x9B,0x8D),
+     o3(0xE5,0xA7,0xAC), o3(0xE5,0xAC,0x89),
+     o3(0xE5,0xB8,0x8C), o3(0xE6,0x86,0x99),
+     o3(0xE6,0x86,0x98), o3(0xE6,0x88,0xB1),
+     o3(0xE6,0x99,0x9E), o3(0xE6,0x9B,0xA6),
+     o3(0xE7,0x86,0x99), o3(0xE7,0x86,0xB9),
+     o3(0xE7,0x86,0xBA), o3(0xE7,0x8A,0xA7),
+     o3(0xE7,0xA6,0xA7), o3(0xE7,0xA8,0x80),
+     o3(0xE7,0xBE,0xB2), o3(0xE8,0xA9,0xB0),
+
+#define from_CP949_FD WORDINDEX2INFO(49086)
+    from_CP949_C7_offsets,
+    from_CP949_FD_infos,
+
+#define from_CP949_infos WORDINDEX2INFO(49088)
+             NOMAP,       INVALID, from_CP949_81, from_CP949_82,
+     from_CP949_83, from_CP949_84, from_CP949_85, from_CP949_86,
+     from_CP949_87, from_CP949_88, from_CP949_89, from_CP949_8A,
+     from_CP949_8B, from_CP949_8C, from_CP949_8D, from_CP949_8E,
+     from_CP949_8F, from_CP949_90, from_CP949_91, from_CP949_92,
+     from_CP949_93, from_CP949_94, from_CP949_95, from_CP949_96,
+     from_CP949_97, from_CP949_98, from_CP949_99, from_CP949_9A,
+     from_CP949_9B, from_CP949_9C, from_CP949_9D, from_CP949_9E,
+     from_CP949_9F, from_CP949_A0, from_CP949_A1, from_CP949_A2,
+     from_CP949_A3, from_CP949_A4, from_CP949_A5, from_CP949_A6,
+     from_CP949_A7, from_CP949_A8, from_CP949_A9, from_CP949_AA,
+     from_CP949_AB, from_CP949_AC, from_CP949_AD, from_CP949_AE,
+     from_CP949_AF, from_CP949_B0, from_CP949_B1, from_CP949_B2,
+     from_CP949_B3, from_CP949_B4, from_CP949_B5, from_CP949_B6,
+     from_CP949_B7, from_CP949_B8, from_CP949_B9, from_CP949_BA,
+     from_CP949_BB, from_CP949_BC, from_CP949_BD, from_CP949_BE,
+     from_CP949_BF, from_CP949_C0, from_CP949_C1, from_CP949_C2,
+     from_CP949_C3, from_CP949_C4, from_CP949_C5, from_CP949_C6,
+     from_CP949_C7, from_CP949_C8, from_CP949_C9, from_CP949_CA,
+     from_CP949_CB, from_CP949_CC, from_CP949_CD, from_CP949_CE,
+     from_CP949_CF, from_CP949_D0, from_CP949_D1, from_CP949_D2,
+     from_CP949_D3, from_CP949_D4, from_CP949_D5, from_CP949_D6,
+     from_CP949_D7, from_CP949_D8, from_CP949_D9, from_CP949_DA,
+     from_CP949_DB, from_CP949_DC, from_CP949_DD, from_CP949_DE,
+     from_CP949_DF, from_CP949_E0, from_CP949_E1, from_CP949_E2,
+     from_CP949_E3, from_CP949_E4, from_CP949_E5, from_CP949_E6,
+     from_CP949_E7, from_CP949_E8, from_CP949_E9, from_CP949_EA,
+     from_CP949_EB, from_CP949_EC, from_CP949_ED, from_CP949_EE,
+     from_CP949_EF, from_CP949_F0, from_CP949_F1, from_CP949_F2,
+     from_CP949_F3, from_CP949_F4, from_CP949_F5, from_CP949_F6,
+     from_CP949_F7, from_CP949_F8, from_CP949_F9, from_CP949_FA,
+     from_CP949_FB, from_CP949_FC, from_CP949_FD,
+
+#define from_CP949 WORDINDEX2INFO(49215)
+    from_CP949_offsets,
+    from_CP949_infos,
+
+};
+#define TRANSCODE_TABLE_INFO korean_byte_array, 40455, korean_word_array, 49217, sizeof(unsigned int)
+static const rb_transcoder
+rb_to_EUC_KR = {
+    "UTF-8", "EUC-KR", to_EUC_KR,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_EUC_KR = {
+    "EUC-KR", "UTF-8", from_EUC_KR,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_CP949 = {
+    "UTF-8", "CP949", to_CP949,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_CP949 = {
+    "CP949", "UTF-8", from_CP949,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+
+
+void
+Init_korean(void)
+{
+    rb_register_transcoder(&rb_to_EUC_KR);
+    rb_register_transcoder(&rb_from_EUC_KR);
+    rb_register_transcoder(&rb_to_CP949);
+    rb_register_transcoder(&rb_from_CP949);
+
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/korean.trans b/lib/ruby-1.9.1-rc1/enc/trans/korean.trans
new file mode 100644
index 0000000..ef1cdfc
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/korean.trans
@@ -0,0 +1,19 @@
+#include "transcode_data.h"
+
+<%
+  require "euckr-tbl"
+  require "cp949-tbl"
+
+  transcode_tblgen "UTF-8", "EUC-KR", [["{00-7f}", :nomap], *UCS_TO_EUCKR_TBL]
+  transcode_tblgen "EUC-KR", "UTF-8", [["{00-7f}", :nomap], *EUCKR_TO_UCS_TBL]
+  transcode_tblgen "UTF-8", "CP949", [["{00-7f}", :nomap], *UCS_TO_CP949_TBL]
+  transcode_tblgen "CP949", "UTF-8", [["{00-7f}", :nomap], *CP949_TO_UCS_TBL]
+%>
+
+<%= transcode_generated_code %>
+
+void
+Init_korean(void)
+{
+<%= transcode_register_code %>
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/maccroatian-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/maccroatian-tbl.rb
new file mode 100644
index 0000000..359878e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/maccroatian-tbl.rb
@@ -0,0 +1,129 @@
+MACCROATIAN_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["C1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["DB",0xA4],
+  ["A4",0xA7],
+  ["AC",0xA8],
+  ["D9",0xA9],
+  ["BB",0xAA],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["F8",0xAF],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["AB",0xB4],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["E1",0xB7],
+  ["FC",0xB8],
+  ["BC",0xBA],
+  ["DF",0xBB],
+  ["C0",0xBF],
+  ["CB",0xC0],
+  ["E7",0xC1],
+  ["E5",0xC2],
+  ["CC",0xC3],
+  ["80",0xC4],
+  ["81",0xC5],
+  ["DE",0xC6],
+  ["82",0xC7],
+  ["E9",0xC8],
+  ["83",0xC9],
+  ["FD",0xCA],
+  ["FA",0xCB],
+  ["ED",0xCC],
+  ["EA",0xCD],
+  ["EB",0xCE],
+  ["EC",0xCF],
+  ["84",0xD1],
+  ["F1",0xD2],
+  ["EE",0xD3],
+  ["EF",0xD4],
+  ["CD",0xD5],
+  ["85",0xD6],
+  ["AF",0xD8],
+  ["F4",0xD9],
+  ["F2",0xDA],
+  ["F3",0xDB],
+  ["86",0xDC],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["87",0xE1],
+  ["89",0xE2],
+  ["8B",0xE3],
+  ["8A",0xE4],
+  ["8C",0xE5],
+  ["FE",0xE6],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["93",0xEC],
+  ["92",0xED],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["96",0xF1],
+  ["98",0xF2],
+  ["97",0xF3],
+  ["99",0xF4],
+  ["9B",0xF5],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["BF",0xF8],
+  ["9D",0xF9],
+  ["9C",0xFA],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["C6",0x106],
+  ["E6",0x107],
+  ["C8",0x10C],
+  ["E8",0x10D],
+  ["D0",0x110],
+  ["F0",0x111],
+  ["F5",0x131],
+  ["CE",0x152],
+  ["CF",0x153],
+  ["A9",0x160],
+  ["B9",0x161],
+  ["AE",0x17D],
+  ["BE",0x17E],
+  ["C4",0x192],
+  ["F6",0x2C6],
+  ["FF",0x2C7],
+  ["FB",0x2DA],
+  ["F7",0x2DC],
+  ["F9",0x3C0],
+  ["E0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["E2",0x201A],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["E3",0x201E],
+  ["A0",0x2020],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["E4",0x2030],
+  ["DC",0x2039],
+  ["DD",0x203A],
+  ["DA",0x2044],
+  ["AA",0x2122],
+  ["BD",0x2126],
+  ["B6",0x2202],
+  ["B4",0x2206],
+  ["B8",0x220F],
+  ["B7",0x2211],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["BA",0x222B],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+  ["D7",0x25CA],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/maccyrillic-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/maccyrillic-tbl.rb
new file mode 100644
index 0000000..378aa8c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/maccyrillic-tbl.rb
@@ -0,0 +1,130 @@
+MACCYRILLIC_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["FF",0xA4],
+  ["A4",0xA7],
+  ["A9",0xA9],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["C8",0xBB],
+  ["D6",0xF7],
+  ["C4",0x192],
+  ["DD",0x401],
+  ["AB",0x402],
+  ["AE",0x403],
+  ["B8",0x404],
+  ["C1",0x405],
+  ["A7",0x406],
+  ["BA",0x407],
+  ["B7",0x408],
+  ["BC",0x409],
+  ["BE",0x40A],
+  ["CB",0x40B],
+  ["CD",0x40C],
+  ["D8",0x40E],
+  ["DA",0x40F],
+  ["80",0x410],
+  ["81",0x411],
+  ["82",0x412],
+  ["83",0x413],
+  ["84",0x414],
+  ["85",0x415],
+  ["86",0x416],
+  ["87",0x417],
+  ["88",0x418],
+  ["89",0x419],
+  ["8A",0x41A],
+  ["8B",0x41B],
+  ["8C",0x41C],
+  ["8D",0x41D],
+  ["8E",0x41E],
+  ["8F",0x41F],
+  ["90",0x420],
+  ["91",0x421],
+  ["92",0x422],
+  ["93",0x423],
+  ["94",0x424],
+  ["95",0x425],
+  ["96",0x426],
+  ["97",0x427],
+  ["98",0x428],
+  ["99",0x429],
+  ["9A",0x42A],
+  ["9B",0x42B],
+  ["9C",0x42C],
+  ["9D",0x42D],
+  ["9E",0x42E],
+  ["9F",0x42F],
+  ["E0",0x430],
+  ["E1",0x431],
+  ["E2",0x432],
+  ["E3",0x433],
+  ["E4",0x434],
+  ["E5",0x435],
+  ["E6",0x436],
+  ["E7",0x437],
+  ["E8",0x438],
+  ["E9",0x439],
+  ["EA",0x43A],
+  ["EB",0x43B],
+  ["EC",0x43C],
+  ["ED",0x43D],
+  ["EE",0x43E],
+  ["EF",0x43F],
+  ["F0",0x440],
+  ["F1",0x441],
+  ["F2",0x442],
+  ["F3",0x443],
+  ["F4",0x444],
+  ["F5",0x445],
+  ["F6",0x446],
+  ["F7",0x447],
+  ["F8",0x448],
+  ["F9",0x449],
+  ["FA",0x44A],
+  ["FB",0x44B],
+  ["FC",0x44C],
+  ["FD",0x44D],
+  ["FE",0x44E],
+  ["DF",0x44F],
+  ["DE",0x451],
+  ["AC",0x452],
+  ["AF",0x453],
+  ["B9",0x454],
+  ["CF",0x455],
+  ["B4",0x456],
+  ["BB",0x457],
+  ["C0",0x458],
+  ["BD",0x459],
+  ["BF",0x45A],
+  ["CC",0x45B],
+  ["CE",0x45C],
+  ["D9",0x45E],
+  ["DB",0x45F],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["D7",0x201E],
+  ["A0",0x2020],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["DC",0x2116],
+  ["AA",0x2122],
+  ["B6",0x2202],
+  ["C6",0x2206],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/macgreek-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/macgreek-tbl.rb
new file mode 100644
index 0000000..7f75fde
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/macgreek-tbl.rb
@@ -0,0 +1,129 @@
+MACGREEK_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["92",0xA3],
+  ["B4",0xA5],
+  ["9B",0xA6],
+  ["AC",0xA7],
+  ["8C",0xA8],
+  ["A9",0xA9],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["9C",0xAD],
+  ["A8",0xAE],
+  ["AE",0xB0],
+  ["B1",0xB1],
+  ["82",0xB2],
+  ["84",0xB3],
+  ["81",0xB9],
+  ["C8",0xBB],
+  ["97",0xBD],
+  ["80",0xC4],
+  ["83",0xC9],
+  ["85",0xD6],
+  ["86",0xDC],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["89",0xE2],
+  ["8A",0xE4],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["99",0xF4],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["9D",0xF9],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["CF",0x153],
+  ["8B",0x384],
+  ["87",0x385],
+  ["CD",0x386],
+  ["AF",0x387],
+  ["CE",0x388],
+  ["D7",0x389],
+  ["D8",0x38A],
+  ["D9",0x38C],
+  ["DA",0x38E],
+  ["DF",0x38F],
+  ["FD",0x390],
+  ["B0",0x391],
+  ["B5",0x392],
+  ["A1",0x393],
+  ["A2",0x394],
+  ["B6",0x395],
+  ["B7",0x396],
+  ["B8",0x397],
+  ["A3",0x398],
+  ["B9",0x399],
+  ["BA",0x39A],
+  ["A4",0x39B],
+  ["BB",0x39C],
+  ["C1",0x39D],
+  ["A5",0x39E],
+  ["C3",0x39F],
+  ["A6",0x3A0],
+  ["C4",0x3A1],
+  ["AA",0x3A3],
+  ["C6",0x3A4],
+  ["CB",0x3A5],
+  ["BC",0x3A6],
+  ["CC",0x3A7],
+  ["BE",0x3A8],
+  ["BF",0x3A9],
+  ["AB",0x3AA],
+  ["BD",0x3AB],
+  ["C0",0x3AC],
+  ["DB",0x3AD],
+  ["DC",0x3AE],
+  ["DD",0x3AF],
+  ["FE",0x3B0],
+  ["E1",0x3B1],
+  ["E2",0x3B2],
+  ["E7",0x3B3],
+  ["E4",0x3B4],
+  ["E5",0x3B5],
+  ["FA",0x3B6],
+  ["E8",0x3B7],
+  ["F5",0x3B8],
+  ["E9",0x3B9],
+  ["EB",0x3BA],
+  ["EC",0x3BB],
+  ["ED",0x3BC],
+  ["EE",0x3BD],
+  ["EA",0x3BE],
+  ["EF",0x3BF],
+  ["F0",0x3C0],
+  ["F2",0x3C1],
+  ["F7",0x3C2],
+  ["F3",0x3C3],
+  ["F4",0x3C4],
+  ["F9",0x3C5],
+  ["E6",0x3C6],
+  ["F8",0x3C7],
+  ["E3",0x3C8],
+  ["F6",0x3C9],
+  ["FB",0x3CA],
+  ["FC",0x3CB],
+  ["DE",0x3CC],
+  ["E0",0x3CD],
+  ["F1",0x3CE],
+  ["D0",0x2013],
+  ["D1",0x2015],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["A0",0x2020],
+  ["96",0x2022],
+  ["C9",0x2026],
+  ["98",0x2030],
+  ["93",0x2122],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/maciceland-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/maciceland-tbl.rb
new file mode 100644
index 0000000..818d992
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/maciceland-tbl.rb
@@ -0,0 +1,129 @@
+MACICELAND_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["C1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["DB",0xA4],
+  ["B4",0xA5],
+  ["A4",0xA7],
+  ["AC",0xA8],
+  ["A9",0xA9],
+  ["BB",0xAA],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["F8",0xAF],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["AB",0xB4],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["E1",0xB7],
+  ["FC",0xB8],
+  ["BC",0xBA],
+  ["C8",0xBB],
+  ["C0",0xBF],
+  ["CB",0xC0],
+  ["E7",0xC1],
+  ["E5",0xC2],
+  ["CC",0xC3],
+  ["80",0xC4],
+  ["81",0xC5],
+  ["AE",0xC6],
+  ["82",0xC7],
+  ["E9",0xC8],
+  ["83",0xC9],
+  ["E6",0xCA],
+  ["E8",0xCB],
+  ["ED",0xCC],
+  ["EA",0xCD],
+  ["EB",0xCE],
+  ["EC",0xCF],
+  ["DC",0xD0],
+  ["84",0xD1],
+  ["F1",0xD2],
+  ["EE",0xD3],
+  ["EF",0xD4],
+  ["CD",0xD5],
+  ["85",0xD6],
+  ["AF",0xD8],
+  ["F4",0xD9],
+  ["F2",0xDA],
+  ["F3",0xDB],
+  ["86",0xDC],
+  ["A0",0xDD],
+  ["DE",0xDE],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["87",0xE1],
+  ["89",0xE2],
+  ["8B",0xE3],
+  ["8A",0xE4],
+  ["8C",0xE5],
+  ["BE",0xE6],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["93",0xEC],
+  ["92",0xED],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["DD",0xF0],
+  ["96",0xF1],
+  ["98",0xF2],
+  ["97",0xF3],
+  ["99",0xF4],
+  ["9B",0xF5],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["BF",0xF8],
+  ["9D",0xF9],
+  ["9C",0xFA],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["E0",0xFD],
+  ["DF",0xFE],
+  ["D8",0xFF],
+  ["F5",0x131],
+  ["CE",0x152],
+  ["CF",0x153],
+  ["D9",0x178],
+  ["C4",0x192],
+  ["F6",0x2C6],
+  ["FF",0x2C7],
+  ["F9",0x2D8],
+  ["FA",0x2D9],
+  ["FB",0x2DA],
+  ["FE",0x2DB],
+  ["F7",0x2DC],
+  ["FD",0x2DD],
+  ["B9",0x3C0],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["E2",0x201A],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["E3",0x201E],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["E4",0x2030],
+  ["DA",0x2044],
+  ["AA",0x2122],
+  ["BD",0x2126],
+  ["B6",0x2202],
+  ["C6",0x2206],
+  ["B8",0x220F],
+  ["B7",0x2211],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["BA",0x222B],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+  ["D7",0x25CA],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/macroman-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/macroman-tbl.rb
new file mode 100644
index 0000000..8f74eea
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/macroman-tbl.rb
@@ -0,0 +1,129 @@
+MACROMAN_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["C1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["DB",0xA4],
+  ["B4",0xA5],
+  ["A4",0xA7],
+  ["AC",0xA8],
+  ["A9",0xA9],
+  ["BB",0xAA],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["F8",0xAF],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["AB",0xB4],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["E1",0xB7],
+  ["FC",0xB8],
+  ["BC",0xBA],
+  ["C8",0xBB],
+  ["C0",0xBF],
+  ["CB",0xC0],
+  ["E7",0xC1],
+  ["E5",0xC2],
+  ["CC",0xC3],
+  ["80",0xC4],
+  ["81",0xC5],
+  ["AE",0xC6],
+  ["82",0xC7],
+  ["E9",0xC8],
+  ["83",0xC9],
+  ["E6",0xCA],
+  ["E8",0xCB],
+  ["ED",0xCC],
+  ["EA",0xCD],
+  ["EB",0xCE],
+  ["EC",0xCF],
+  ["84",0xD1],
+  ["F1",0xD2],
+  ["EE",0xD3],
+  ["EF",0xD4],
+  ["CD",0xD5],
+  ["85",0xD6],
+  ["AF",0xD8],
+  ["F4",0xD9],
+  ["F2",0xDA],
+  ["F3",0xDB],
+  ["86",0xDC],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["87",0xE1],
+  ["89",0xE2],
+  ["8B",0xE3],
+  ["8A",0xE4],
+  ["8C",0xE5],
+  ["BE",0xE6],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["93",0xEC],
+  ["92",0xED],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["96",0xF1],
+  ["98",0xF2],
+  ["97",0xF3],
+  ["99",0xF4],
+  ["9B",0xF5],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["BF",0xF8],
+  ["9D",0xF9],
+  ["9C",0xFA],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["D8",0xFF],
+  ["F5",0x131],
+  ["CE",0x152],
+  ["CF",0x153],
+  ["D9",0x178],
+  ["C4",0x192],
+  ["F6",0x2C6],
+  ["FF",0x2C7],
+  ["F9",0x2D8],
+  ["FA",0x2D9],
+  ["FB",0x2DA],
+  ["FE",0x2DB],
+  ["F7",0x2DC],
+  ["FD",0x2DD],
+  ["B9",0x3C0],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["E2",0x201A],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["E3",0x201E],
+  ["A0",0x2020],
+  ["E0",0x2021],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["E4",0x2030],
+  ["DC",0x2039],
+  ["DD",0x203A],
+  ["DA",0x2044],
+  ["AA",0x2122],
+  ["BD",0x2126],
+  ["B6",0x2202],
+  ["C6",0x2206],
+  ["B8",0x220F],
+  ["B7",0x2211],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["BA",0x222B],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+  ["D7",0x25CA],
+  ["DE",0xFB01],
+  ["DF",0xFB02],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/macromania-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/macromania-tbl.rb
new file mode 100644
index 0000000..ff95c5e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/macromania-tbl.rb
@@ -0,0 +1,129 @@
+MACROMANIA_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["C1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["DB",0xA4],
+  ["B4",0xA5],
+  ["A4",0xA7],
+  ["AC",0xA8],
+  ["A9",0xA9],
+  ["BB",0xAA],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["F8",0xAF],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["AB",0xB4],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["E1",0xB7],
+  ["FC",0xB8],
+  ["BC",0xBA],
+  ["C8",0xBB],
+  ["C0",0xBF],
+  ["CB",0xC0],
+  ["E7",0xC1],
+  ["E5",0xC2],
+  ["CC",0xC3],
+  ["80",0xC4],
+  ["81",0xC5],
+  ["82",0xC7],
+  ["E9",0xC8],
+  ["83",0xC9],
+  ["E6",0xCA],
+  ["E8",0xCB],
+  ["ED",0xCC],
+  ["EA",0xCD],
+  ["EB",0xCE],
+  ["EC",0xCF],
+  ["84",0xD1],
+  ["F1",0xD2],
+  ["EE",0xD3],
+  ["EF",0xD4],
+  ["CD",0xD5],
+  ["85",0xD6],
+  ["F4",0xD9],
+  ["F2",0xDA],
+  ["F3",0xDB],
+  ["86",0xDC],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["87",0xE1],
+  ["89",0xE2],
+  ["8B",0xE3],
+  ["8A",0xE4],
+  ["8C",0xE5],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["93",0xEC],
+  ["92",0xED],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["96",0xF1],
+  ["98",0xF2],
+  ["97",0xF3],
+  ["99",0xF4],
+  ["9B",0xF5],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["9D",0xF9],
+  ["9C",0xFA],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["D8",0xFF],
+  ["AE",0x102],
+  ["BE",0x103],
+  ["F5",0x131],
+  ["CE",0x152],
+  ["CF",0x153],
+  ["AF",0x15E],
+  ["BF",0x15F],
+  ["DE",0x162],
+  ["DF",0x163],
+  ["D9",0x178],
+  ["C4",0x192],
+  ["F6",0x2C6],
+  ["FF",0x2C7],
+  ["F9",0x2D8],
+  ["FA",0x2D9],
+  ["FB",0x2DA],
+  ["FE",0x2DB],
+  ["F7",0x2DC],
+  ["FD",0x2DD],
+  ["B9",0x3C0],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["E2",0x201A],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["E3",0x201E],
+  ["A0",0x2020],
+  ["E0",0x2021],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["E4",0x2030],
+  ["DC",0x2039],
+  ["DD",0x203A],
+  ["DA",0x2044],
+  ["AA",0x2122],
+  ["BD",0x2126],
+  ["B6",0x2202],
+  ["C6",0x2206],
+  ["B8",0x220F],
+  ["B7",0x2211],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["BA",0x222B],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+  ["D7",0x25CA],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/macturkish-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/macturkish-tbl.rb
new file mode 100644
index 0000000..2358672
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/macturkish-tbl.rb
@@ -0,0 +1,128 @@
+MACTURKISH_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["C1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["B4",0xA5],
+  ["A4",0xA7],
+  ["AC",0xA8],
+  ["A9",0xA9],
+  ["BB",0xAA],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["F8",0xAF],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["AB",0xB4],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["E1",0xB7],
+  ["FC",0xB8],
+  ["BC",0xBA],
+  ["C8",0xBB],
+  ["C0",0xBF],
+  ["CB",0xC0],
+  ["E7",0xC1],
+  ["E5",0xC2],
+  ["CC",0xC3],
+  ["80",0xC4],
+  ["81",0xC5],
+  ["AE",0xC6],
+  ["82",0xC7],
+  ["E9",0xC8],
+  ["83",0xC9],
+  ["E6",0xCA],
+  ["E8",0xCB],
+  ["ED",0xCC],
+  ["EA",0xCD],
+  ["EB",0xCE],
+  ["EC",0xCF],
+  ["84",0xD1],
+  ["F1",0xD2],
+  ["EE",0xD3],
+  ["EF",0xD4],
+  ["CD",0xD5],
+  ["85",0xD6],
+  ["AF",0xD8],
+  ["F4",0xD9],
+  ["F2",0xDA],
+  ["F3",0xDB],
+  ["86",0xDC],
+  ["A7",0xDF],
+  ["88",0xE0],
+  ["87",0xE1],
+  ["89",0xE2],
+  ["8B",0xE3],
+  ["8A",0xE4],
+  ["8C",0xE5],
+  ["BE",0xE6],
+  ["8D",0xE7],
+  ["8F",0xE8],
+  ["8E",0xE9],
+  ["90",0xEA],
+  ["91",0xEB],
+  ["93",0xEC],
+  ["92",0xED],
+  ["94",0xEE],
+  ["95",0xEF],
+  ["96",0xF1],
+  ["98",0xF2],
+  ["97",0xF3],
+  ["99",0xF4],
+  ["9B",0xF5],
+  ["9A",0xF6],
+  ["D6",0xF7],
+  ["BF",0xF8],
+  ["9D",0xF9],
+  ["9C",0xFA],
+  ["9E",0xFB],
+  ["9F",0xFC],
+  ["D8",0xFF],
+  ["DA",0x11E],
+  ["DB",0x11F],
+  ["DC",0x130],
+  ["DD",0x131],
+  ["CE",0x152],
+  ["CF",0x153],
+  ["DE",0x15E],
+  ["DF",0x15F],
+  ["D9",0x178],
+  ["C4",0x192],
+  ["F6",0x2C6],
+  ["FF",0x2C7],
+  ["F9",0x2D8],
+  ["FA",0x2D9],
+  ["FB",0x2DA],
+  ["FE",0x2DB],
+  ["F7",0x2DC],
+  ["FD",0x2DD],
+  ["B9",0x3C0],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["E2",0x201A],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["E3",0x201E],
+  ["A0",0x2020],
+  ["E0",0x2021],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["E4",0x2030],
+  ["AA",0x2122],
+  ["BD",0x2126],
+  ["B6",0x2202],
+  ["C6",0x2206],
+  ["B8",0x220F],
+  ["B7",0x2211],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["BA",0x222B],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+  ["D7",0x25CA],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/macukraine-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/macukraine-tbl.rb
new file mode 100644
index 0000000..6941af6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/macukraine-tbl.rb
@@ -0,0 +1,130 @@
+MACUKRAINE_TO_UCS_TBL = [
+  ["CA",0xA0],
+  ["A3",0xA3],
+  ["FF",0xA4],
+  ["A4",0xA7],
+  ["A9",0xA9],
+  ["C7",0xAB],
+  ["C2",0xAC],
+  ["A8",0xAE],
+  ["A1",0xB0],
+  ["B1",0xB1],
+  ["B5",0xB5],
+  ["A6",0xB6],
+  ["C8",0xBB],
+  ["D6",0xF7],
+  ["C4",0x192],
+  ["DD",0x401],
+  ["AB",0x402],
+  ["AE",0x403],
+  ["B8",0x404],
+  ["C1",0x405],
+  ["A7",0x406],
+  ["BA",0x407],
+  ["B7",0x408],
+  ["BC",0x409],
+  ["BE",0x40A],
+  ["CB",0x40B],
+  ["CD",0x40C],
+  ["D8",0x40E],
+  ["DA",0x40F],
+  ["80",0x410],
+  ["81",0x411],
+  ["82",0x412],
+  ["83",0x413],
+  ["84",0x414],
+  ["85",0x415],
+  ["86",0x416],
+  ["87",0x417],
+  ["88",0x418],
+  ["89",0x419],
+  ["8A",0x41A],
+  ["8B",0x41B],
+  ["8C",0x41C],
+  ["8D",0x41D],
+  ["8E",0x41E],
+  ["8F",0x41F],
+  ["90",0x420],
+  ["91",0x421],
+  ["92",0x422],
+  ["93",0x423],
+  ["94",0x424],
+  ["95",0x425],
+  ["96",0x426],
+  ["97",0x427],
+  ["98",0x428],
+  ["99",0x429],
+  ["9A",0x42A],
+  ["9B",0x42B],
+  ["9C",0x42C],
+  ["9D",0x42D],
+  ["9E",0x42E],
+  ["9F",0x42F],
+  ["E0",0x430],
+  ["E1",0x431],
+  ["E2",0x432],
+  ["E3",0x433],
+  ["E4",0x434],
+  ["E5",0x435],
+  ["E6",0x436],
+  ["E7",0x437],
+  ["E8",0x438],
+  ["E9",0x439],
+  ["EA",0x43A],
+  ["EB",0x43B],
+  ["EC",0x43C],
+  ["ED",0x43D],
+  ["EE",0x43E],
+  ["EF",0x43F],
+  ["F0",0x440],
+  ["F1",0x441],
+  ["F2",0x442],
+  ["F3",0x443],
+  ["F4",0x444],
+  ["F5",0x445],
+  ["F6",0x446],
+  ["F7",0x447],
+  ["F8",0x448],
+  ["F9",0x449],
+  ["FA",0x44A],
+  ["FB",0x44B],
+  ["FC",0x44C],
+  ["FD",0x44D],
+  ["FE",0x44E],
+  ["DF",0x44F],
+  ["DE",0x451],
+  ["AC",0x452],
+  ["AF",0x453],
+  ["B9",0x454],
+  ["CF",0x455],
+  ["B4",0x456],
+  ["BB",0x457],
+  ["C0",0x458],
+  ["BD",0x459],
+  ["BF",0x45A],
+  ["CC",0x45B],
+  ["CE",0x45C],
+  ["D9",0x45E],
+  ["DB",0x45F],
+  ["A2",0x490],
+  ["B6",0x491],
+  ["D0",0x2013],
+  ["D1",0x2014],
+  ["D4",0x2018],
+  ["D5",0x2019],
+  ["D2",0x201C],
+  ["D3",0x201D],
+  ["D7",0x201E],
+  ["A0",0x2020],
+  ["A5",0x2022],
+  ["C9",0x2026],
+  ["DC",0x2116],
+  ["AA",0x2122],
+  ["C6",0x2206],
+  ["C3",0x221A],
+  ["B0",0x221E],
+  ["C5",0x2248],
+  ["AD",0x2260],
+  ["B2",0x2264],
+  ["B3",0x2265],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/make_transdb.rb b/lib/ruby-1.9.1-rc1/enc/trans/make_transdb.rb
new file mode 100644
index 0000000..bbb7a9b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/make_transdb.rb
@@ -0,0 +1,57 @@
+#
+# static const rb_transcoder
+# rb_from_US_ASCII = {
+#     "US-ASCII", "UTF-8", &from_US_ASCII, 1, 0,
+#     NULL, NULL,
+# };
+#
+
+count = 0
+converters = {}
+transdirs = ARGV.dup
+outhdr = transdirs.shift || 'transdb.h'
+transdirs << 'enc/trans' if transdirs.empty?
+
+transdirs = transdirs.sort_by {|td|
+  -td.length
+}.inject([]) {|tds, td|
+  next tds unless File.directory?(td)
+  tds << td if tds.all? {|td2| !File.identical?(td2, td) }
+  tds
+}
+
+files = {}
+names_t = []
+transdirs.each do |transdir|
+  names = Dir.entries(transdir)
+  names_t += names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact
+  names_c = names.map {|n| /(?!\A)\.c\z/ =~ n ? $` : nil }.compact
+  (names_t & names_c).map {|n|
+    "#{n}.c"
+  }.sort_by {|e|
+    e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten
+  }.each do |fn|
+    next if files[fn]
+    files[fn] = true
+    path = File.join(transdir,fn)
+    open(path) do |f|
+      f.each_line do |line|
+        if (/^static const rb_transcoder/ =~ line)..(/"(.*?)"\s*,\s*"(.*?)"/ =~ line)
+          if $1 && $2
+            from_to = "%s to %s" % [$1, $2]
+            if converters[from_to]
+              raise ArgumentError, '%s:%d: transcode "%s" is already registered at %s:%d' %
+              [path, $., from_to, *converters[from_to].values_at(3, 4)]
+            else
+              converters[from_to] = [$1, $2, fn[0..-3], path, $.]
+            end
+          end
+        end
+      end
+    end
+  end
+end
+result = converters.map {|k, v| %[rb_declare_transcoder("%s", "%s", "%s");\n] % v}.join
+open(outhdr, 'wb') do |f|
+  f.print result
+end
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/newline.c b/lib/ruby-1.9.1-rc1/enc/trans/newline.c
new file mode 100644
index 0000000..93267cf
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/newline.c
@@ -0,0 +1,185 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="newline.trans", len=3114, checksum=39279 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+newline_byte_array[516] = {
+#define universal_newline_offsets 0
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define crlf_newline_offsets 258
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  1,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+};
+static const unsigned int
+newline_word_array[11] = {
+#define universal_newline_infos WORDINDEX2INFO(0)
+     FUNso,
+
+#define universal_newline WORDINDEX2INFO(1)
+    universal_newline_offsets,
+    universal_newline_infos,
+
+#define crlf_newline_infos WORDINDEX2INFO(3)
+             NOMAP, o2(0x0d,0x0a),
+
+#define crlf_newline WORDINDEX2INFO(5)
+    crlf_newline_offsets,
+    crlf_newline_infos,
+
+#define cr_newline_infos WORDINDEX2INFO(7)
+        NOMAP, o1(0x0d),
+
+#define cr_newline WORDINDEX2INFO(9)
+    crlf_newline_offsets,
+    cr_newline_infos,
+
+};
+#define TRANSCODE_TABLE_INFO newline_byte_array, 516, newline_word_array, 11, sizeof(unsigned int)
+
+
+#define STATE (sp[0])
+#define NORMAL 0
+#define JUST_AFTER_CR 1
+
+/* no way to access this information, yet. */
+#define NEWLINES_MET (sp[1])
+#define MET_LF          0x01
+#define MET_CRLF        0x02
+#define MET_CR          0x04
+
+static int
+universal_newline_init(void *statep)
+{
+    unsigned char *sp = statep;
+    STATE = NORMAL;
+    NEWLINES_MET = 0;
+    return 0;
+}
+
+static ssize_t
+fun_so_universal_newline(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int len;
+    if (s[0] == '\n') {
+        if (STATE == NORMAL) {
+            NEWLINES_MET |= MET_LF;
+            o[0] = '\n';
+            len = 1;
+        }
+        else { /* JUST_AFTER_CR */
+            NEWLINES_MET |= MET_CRLF;
+            len = 0;
+        }
+        STATE = NORMAL;
+    }
+    else {
+        if (STATE == JUST_AFTER_CR)
+            NEWLINES_MET |= MET_CR;
+        if (s[0] == '\r') {
+            o[0] = '\n';
+            len = 1;
+            STATE = JUST_AFTER_CR;
+        }
+        else {
+            o[0] = s[0];
+            len = 1;
+            STATE = NORMAL;
+        }
+    }
+
+    return len;
+}
+
+static ssize_t
+universal_newline_finish(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    if (STATE == JUST_AFTER_CR)
+        NEWLINES_MET |= MET_CR;
+    STATE = NORMAL;
+    return 0;
+}
+
+static const rb_transcoder
+rb_universal_newline = {
+    "", "universal_newline", universal_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_universal_newline,
+    universal_newline_finish
+};
+
+static const rb_transcoder
+rb_crlf_newline = {
+    "", "crlf_newline", crlf_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL
+};
+
+static const rb_transcoder
+rb_cr_newline = {
+    "", "cr_newline", cr_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL
+};
+
+void
+Init_newline(void)
+{
+    rb_register_transcoder(&rb_universal_newline);
+    rb_register_transcoder(&rb_crlf_newline);
+    rb_register_transcoder(&rb_cr_newline);
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/newline.trans b/lib/ruby-1.9.1-rc1/enc/trans/newline.trans
new file mode 100644
index 0000000..d62034a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/newline.trans
@@ -0,0 +1,131 @@
+#include "transcode_data.h"
+
+<%
+  map_normalize = {}
+  map_normalize["{00-ff}"] = :func_so
+
+  transcode_generate_node(ActionMap.parse(map_normalize), "universal_newline")
+
+  map_crlf = {}
+  map_crlf["{00-09,0b-ff}"] = :nomap
+  map_crlf["0a"] = "0d0a"
+
+  transcode_generate_node(ActionMap.parse(map_crlf), "crlf_newline")
+
+  map_cr = {}
+  map_cr["{00-09,0b-ff}"] = :nomap
+  map_cr["0a"] = "0d"
+
+  transcode_generate_node(ActionMap.parse(map_cr), "cr_newline")
+%>
+
+<%= transcode_generated_code %>
+
+#define STATE (sp[0])
+#define NORMAL 0
+#define JUST_AFTER_CR 1
+
+/* no way to access this information, yet. */
+#define NEWLINES_MET (sp[1])
+#define MET_LF          0x01
+#define MET_CRLF        0x02
+#define MET_CR          0x04
+
+static int
+universal_newline_init(void *statep)
+{
+    unsigned char *sp = statep;
+    STATE = NORMAL;
+    NEWLINES_MET = 0;
+    return 0;
+}
+
+static ssize_t
+fun_so_universal_newline(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    int len;
+    if (s[0] == '\n') {
+        if (STATE == NORMAL) {
+            NEWLINES_MET |= MET_LF;
+            o[0] = '\n';
+            len = 1;
+        }
+        else { /* JUST_AFTER_CR */
+            NEWLINES_MET |= MET_CRLF;
+            len = 0;
+        }
+        STATE = NORMAL;
+    }
+    else {
+        if (STATE == JUST_AFTER_CR)
+            NEWLINES_MET |= MET_CR;
+        if (s[0] == '\r') {
+            o[0] = '\n';
+            len = 1;
+            STATE = JUST_AFTER_CR;
+        }
+        else {
+            o[0] = s[0];
+            len = 1;
+            STATE = NORMAL;
+        }
+    }
+
+    return len;
+}
+
+static ssize_t
+universal_newline_finish(void *statep, unsigned char *o, size_t osize)
+{
+    unsigned char *sp = statep;
+    if (STATE == JUST_AFTER_CR)
+        NEWLINES_MET |= MET_CR;
+    STATE = NORMAL;
+    return 0;
+}
+
+static const rb_transcoder
+rb_universal_newline = {
+    "", "universal_newline", universal_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_universal_newline,
+    universal_newline_finish
+};
+
+static const rb_transcoder
+rb_crlf_newline = {
+    "", "crlf_newline", crlf_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL
+};
+
+static const rb_transcoder
+rb_cr_newline = {
+    "", "cr_newline", cr_newline,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL
+};
+
+void
+Init_newline(void)
+{
+    rb_register_transcoder(&rb_universal_newline);
+    rb_register_transcoder(&rb_crlf_newline);
+    rb_register_transcoder(&rb_cr_newline);
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/single_byte.c b/lib/ruby-1.9.1-rc1/enc/trans/single_byte.c
new file mode 100644
index 0000000..ce55569
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/single_byte.c
@@ -0,0 +1,10186 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="single_byte.trans", len=3464, checksum=27099 */
+/* src="iso-8859-1-tbl.rb", len=1468, checksum=16390 */
+/* src="iso-8859-2-tbl.rb", len=1525, checksum=18386 */
+/* src="iso-8859-3-tbl.rb", len=1391, checksum=11560 */
+/* src="iso-8859-4-tbl.rb", len=1518, checksum=18050 */
+/* src="iso-8859-5-tbl.rb", len=1562, checksum=19680 */
+/* src="iso-8859-6-tbl.rb", len=841, checksum=46155 */
+/* src="iso-8859-7-tbl.rb", len=1505, checksum=17611 */
+/* src="iso-8859-8-tbl.rb", len=961, checksum=53500 */
+/* src="iso-8859-9-tbl.rb", len=1474, checksum=16589 */
+/* src="iso-8859-10-tbl.rb", len=1516, checksum=18011 */
+/* src="iso-8859-11-tbl.rb", len=1436, checksum=14115 */
+/* src="iso-8859-13-tbl.rb", len=1525, checksum=18280 */
+/* src="iso-8859-14-tbl.rb", len=1522, checksum=18993 */
+/* src="iso-8859-15-tbl.rb", len=1478, checksum=16787 */
+/* src="windows-874-tbl.rb", len=1588, checksum=22250 */
+/* src="windows-1250-tbl.rb", len=1965, checksum=42114 */
+/* src="windows-1251-tbl.rb", len=2064, checksum=46709 */
+/* src="windows-1252-tbl.rb", len=1918, checksum=40458 */
+/* src="windows-1253-tbl.rb", len=1802, checksum=33445 */
+/* src="windows-1254-tbl.rb", len=1892, checksum=38891 */
+/* src="windows-1255-tbl.rb", len=2348, checksum=65068 */
+/* src="windows-1256-tbl.rb", len=2055, checksum=47008 */
+/* src="windows-1257-tbl.rb", len=1854, checksum=35975 */
+/* src="ibm437-tbl.rb", len=2080, checksum=48230 */
+/* src="ibm775-tbl.rb", len=2063, checksum=46949 */
+/* src="ibm852-tbl.rb", len=2058, checksum=46856 */
+/* src="ibm855-tbl.rb", len=2095, checksum=48135 */
+/* src="ibm857-tbl.rb", len=1962, checksum=42551 */
+/* src="ibm860-tbl.rb", len=2077, checksum=48067 */
+/* src="ibm861-tbl.rb", len=2080, checksum=48238 */
+/* src="ibm862-tbl.rb", len=2107, checksum=49602 */
+/* src="ibm863-tbl.rb", len=2080, checksum=48225 */
+/* src="ibm865-tbl.rb", len=2080, checksum=48237 */
+/* src="ibm866-tbl.rb", len=2119, checksum=49337 */
+/* src="ibm869-tbl.rb", len=1943, checksum=40988 */
+/* src="maccroatian-tbl.rb", len=2010, checksum=44957 */
+/* src="maccyrillic-tbl.rb", len=2081, checksum=47588 */
+/* src="macgreek-tbl.rb", len=2033, checksum=46246 */
+/* src="maciceland-tbl.rb", len=1998, checksum=44598 */
+/* src="macroman-tbl.rb", len=2008, checksum=44979 */
+/* src="macromania-tbl.rb", len=2012, checksum=45101 */
+/* src="macturkish-tbl.rb", len=1990, checksum=44067 */
+/* src="macukraine-tbl.rb", len=2080, checksum=47514 */
+/* src="koi8-u-tbl.rb", len=2113, checksum=49071 */
+/* src="koi8-r-tbl.rb", len=2121, checksum=49514 */
+/* src="tis-620-tbl.rb", len=1417, checksum=13049 */
+/* src="cp850-tbl.rb", len=2004, checksum=44902 */
+/* src="cp852-tbl.rb", len=2057, checksum=46787 */
+/* src="cp855-tbl.rb", len=2094, checksum=48066 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+single_byte_byte_array[24992] = {
+#define from_US_ASCII_offsets 0
+0, 127,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define to_US_ASCII_C2_offsets 130
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_US_ASCII_E0_offsets 196
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_US_ASCII_ED_offsets 230
+128, 159,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_US_ASCII_F0_offsets 264
+144, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_US_ASCII_F4_offsets 314
+128, 143,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_US_ASCII_offsets 332
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      3,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  5,  4,  4,
+      6,  7,  7,  7,  8,
+
+#define from_ASCII_8BIT_offsets 579
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_ISO_8859_1_offsets 837
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94, 95, 96,
+     97, 98, 99,100,101,102,103,104,  105,106,107,108,109,110,111,112,
+    113,114,115,116,117,118,119,120,  121,122,123,124,125,126,127,128,
+
+#define to_ISO_8859_1_C2_offsets 1095
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+
+#define to_ISO_8859_1_offsets 1161
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      5,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  7,  6,  6,
+      8,  9,  9,  9, 10,
+
+#define to_ISO_8859_2_C2_offsets 1408
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 35, 34, 34, 36,   37, 34, 34, 34, 34, 38, 34, 34,
+     39, 34, 34, 34, 40, 34, 34, 34,   41, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_2_C3_offsets 1474
+128, 191,
+      1,  2,  3,  1,  4,  1,  1,  5,    1,  6,  1,  7,  1,  8,  9,  1,
+      1,  1,  1, 10, 11,  1, 12, 13,    1,  1, 14,  1, 15, 16,  1, 17,
+      1, 18, 19,  1, 20,  1,  1, 21,    1, 22,  1, 23,  1, 24, 25,  1,
+      1,  1,  1, 26, 27,  1, 28, 29,    1,  1, 30,  1, 31, 32,  1,  1,
+
+#define to_ISO_8859_2_C4_offsets 1540
+128, 191,
+      1,  1,  2,  3,  4,  5,  6,  7,    1,  1,  1,  1,  8,  9, 10, 11,
+     12, 13,  1,  1,  1,  1,  1,  1,   14, 15, 16, 17,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1, 18, 19,  1,  1, 20, 21,  1,
+
+#define to_ISO_8859_2_C5_offsets 1606
+128, 191,
+      1,  2,  3,  4,  5,  1,  1,  6,    7,  1,  1,  1,  1,  1,  1,  1,
+      8,  9,  1,  1, 10, 11,  1,  1,   12, 13, 14, 15,  1,  1, 16, 17,
+     18, 19, 20, 21, 22, 23,  1,  1,    1,  1,  1,  1,  1,  1, 24, 25,
+     26, 27,  1,  1,  1,  1,  1,  1,    1, 28, 29, 30, 31, 32, 33,  1,
+
+#define to_ISO_8859_2_CB_offsets 1672
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    3,  4,  1,  5,  1,  6,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_2_offsets 1738
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  7,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      8,  9,  9,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 10,  9,  9,
+     11, 12, 12, 12, 13,
+
+#define from_ISO_8859_3_offsets 1985
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 38, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 38, 62,
+     63, 64, 65, 38, 66, 67, 68, 69,   70, 71, 72, 73, 74, 75, 76, 77,
+     38, 78, 79, 80, 81, 82, 83, 84,   85, 86, 87, 88, 89, 90, 91, 92,
+     93, 94, 95, 38, 96, 97, 98, 99,  100,101,102,103,104,105,106,107,
+     38,108,109,110,111,112,113,114,  115,116,117,118,119,120,121,122,
+
+#define to_ISO_8859_3_C2_offsets 2243
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 35, 36, 34, 34, 37,   38, 34, 34, 34, 34, 39, 34, 34,
+     40, 34, 41, 42, 43, 44, 34, 45,   46, 34, 34, 34, 34, 47, 34, 34,
+
+#define to_ISO_8859_3_C3_offsets 2309
+128, 191,
+      1,  2,  3,  4,  5,  4,  4,  6,    7,  8,  9, 10, 11, 12, 13, 14,
+      4, 15, 16, 17, 18,  4, 19, 20,    4, 21, 22, 23, 24,  4,  4, 25,
+     26, 27, 28,  4, 29,  4,  4, 30,   31, 32, 33, 34, 35, 36, 37, 38,
+      4, 39, 40, 41, 42,  4, 43, 44,    4, 45, 46, 47, 48,  4,  4,  4,
+
+#define to_ISO_8859_3_C4_offsets 2375
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  7,  8,  9,
+     10, 11,  1,  1, 12, 13, 14, 15,    1,  1,  1,  1,  1,  1,  1,  1,
+     16, 17,  1,  1, 18, 19,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_3_C5_offsets 2441
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  6,  7,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  9,  1,  1,  1,
+
+#define to_ISO_8859_3_CB_offsets 2507
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_4_C2_offsets 2573
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 35, 34, 34, 36,   37, 34, 34, 34, 34, 38, 34, 39,
+     40, 34, 34, 34, 41, 34, 34, 34,   42, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_4_C3_offsets 2639
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    1,  8,  1,  9,  1, 10, 11,  1,
+      1,  1,  1,  1, 12, 13, 14, 15,   16,  1, 17, 18, 19,  1,  1, 20,
+      1, 21, 22, 23, 24, 25, 26,  1,    1, 27,  1, 28,  1, 29, 30,  1,
+      1,  1,  1,  1, 31, 32, 33, 34,   35,  1, 36, 37, 38,  1,  1,  1,
+
+#define to_ISO_8859_4_C4_offsets 2705
+128, 191,
+      1,  2,  3,  3,  4,  5,  3,  3,    3,  3,  3,  3,  6,  7,  3,  3,
+      8,  9, 10, 11,  3,  3, 12, 13,   14, 15,  3,  3,  3,  3,  3,  3,
+      3,  3, 16, 17,  3,  3,  3,  3,   18, 19, 20, 21,  3,  3, 22, 23,
+      3,  3,  3,  3,  3,  3, 24, 25,   26,  3,  3, 27, 28,  3,  3,  3,
+
+#define to_ISO_8859_4_C5_offsets 2771
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  4,  5,  6,  7,  1,  1,
+      1,  1,  1,  1,  1,  1,  8,  9,    1,  1,  1,  1,  1,  1,  1,  1,
+     10, 11,  1,  1,  1,  1, 12, 13,   14, 15, 16, 17,  1,  1,  1,  1,
+      1,  1, 18, 19,  1,  1,  1,  1,    1,  1,  1,  1,  1, 20, 21,  1,
+
+#define to_ISO_8859_4_CB_offsets 2837
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  3,  1,  4,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_5_C2_offsets 2903
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 35,   34, 34, 34, 34, 34, 36, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_5_D0_offsets 2969
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  1, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25, 26, 27, 28, 29, 30, 31,
+     32, 33, 34, 35, 36, 37, 38, 39,   40, 41, 42, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 58, 59, 60, 61, 62, 63,
+
+#define to_ISO_8859_5_D1_offsets 3035
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 17, 30, 31,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_ISO_8859_5_E2_84_offsets 3101
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_5_E2_offsets 3167
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_5_offsets 3233
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      4,  5,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  8,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  9,  7,  7,
+     10, 11, 11, 11, 12,
+
+#define from_ISO_8859_6_offsets 3480
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 35, 34, 34, 34,   34, 34, 34, 34, 36, 37, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 38, 34, 34, 34, 39,
+     34, 40, 41, 42, 43, 44, 45, 46,   47, 48, 49, 50, 51, 52, 53, 54,
+     55, 56, 57, 58, 59, 60, 61, 62,   63, 64, 65, 34, 34, 34, 34, 34,
+     66, 67, 68, 69, 70, 71, 72, 73,   74, 75, 76, 77, 78, 79, 80, 81,
+     82, 83, 84, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_6_C2_offsets 3738
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 35, 34, 34, 34,   34, 34, 34, 34, 34, 36, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_6_D8_offsets 3804
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  3,  1,  1,  1,  4,
+      1,  5,  6,  7,  8,  9, 10, 11,   12, 13, 14, 15, 16, 17, 18, 19,
+     20, 21, 22, 23, 24, 25, 26, 27,   28, 29, 30,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_6_D9_offsets 3870
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 20, 20, 20, 20,   20, 20, 20, 20, 20, 20, 20, 20,
+     20, 20, 20, 20, 20, 20, 20, 20,   20, 20, 20, 20, 20, 20, 20, 20,
+     20, 20, 20, 20, 20, 20, 20, 20,   20, 20, 20, 20, 20, 20, 20, 20,
+
+#define to_ISO_8859_6_offsets 3936
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    4,  5,  3,  3,  3,  3,  3,  3,
+      6,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  8,  7,  7,
+      9, 10, 10, 10, 11,
+
+#define from_ISO_8859_7_offsets 4183
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 47, 83, 84, 85, 86, 87,   88, 89, 90, 91, 92, 93, 94, 95,
+     96, 97, 98, 99,100,101,102,103,  104,105,106,107,108,109,110,111,
+    112,113,114,115,116,117,118,119,  120,121,122,123,124,125,126, 47,
+
+#define to_ISO_8859_7_C2_offsets 4441
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 35, 34, 34, 36, 37,   38, 39, 34, 40, 41, 42, 34, 34,
+     43, 44, 45, 46, 34, 34, 34, 47,   34, 34, 34, 48, 34, 49, 34, 34,
+
+#define to_ISO_8859_7_CD_offsets 4507
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_7_CE_offsets 4573
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    5,  6,  7,  1,  8,  1,  9, 10,
+     11, 12, 13, 14, 15, 16, 17, 18,   19, 20, 21, 22, 23, 24, 25, 26,
+     27, 28,  1, 29, 30, 31, 32, 33,   34, 35, 36, 37, 38, 39, 40, 41,
+     42, 43, 44, 45, 46, 47, 48, 49,   50, 51, 52, 53, 54, 55, 56, 57,
+
+#define to_ISO_8859_7_CF_offsets 4639
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+     16, 16, 16, 16, 16, 16, 16, 16,   16, 16, 16, 16, 16, 16, 16, 16,
+
+#define to_ISO_8859_7_E2_80_offsets 4705
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    3,  4,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_7_E2_82_offsets 4771
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_7_E2_offsets 4837
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_ISO_8859_7_offsets 4903
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  4,  5,  6,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define from_ISO_8859_8_offsets 5150
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 34, 34, 92, 93, 34,
+
+#define to_ISO_8859_8_C2_offsets 5408
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 34, 43, 44, 45, 46, 47,
+     48, 49, 50, 51, 52, 53, 54, 55,   56, 57, 34, 58, 59, 60, 61, 34,
+
+#define to_ISO_8859_8_C3_offsets 5474
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_8_D7_offsets 5540
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27, 28,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_8_E2_80_offsets 5606
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  4,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_8_E2_offsets 5672
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_ISO_8859_8_offsets 5738
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  5,    4,  4,  4,  4,  4,  4,  4,  4,
+      6,  7,  8,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  9,  7,  7,
+     10, 11, 11, 11, 12,
+
+#define to_ISO_8859_9_C3_offsets 5985
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 17, 17, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     17, 47, 48, 49, 50, 51, 52, 53,   54, 55, 56, 57, 58, 17, 17, 59,
+
+#define to_ISO_8859_9_C4_offsets 6051
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_9_C5_offsets 6117
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_9_offsets 6183
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      7,  8,  8,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8,  9,  8,  8,
+     10, 11, 11, 11, 12,
+
+#define to_ISO_8859_10_C2_offsets 6430
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 35,   34, 34, 34, 34, 34, 36, 34, 34,
+     37, 34, 34, 34, 34, 34, 34, 38,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_10_C3_offsets 6496
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    1,  8,  1,  9,  1, 10, 11, 12,
+     13,  1,  1, 14, 15, 16, 17,  1,   18,  1, 19, 20, 21, 22, 23, 24,
+      1, 25, 26, 27, 28, 29, 30,  1,    1, 31,  1, 32,  1, 33, 34, 35,
+     36,  1,  1, 37, 38, 39, 40,  1,   41,  1, 42, 43, 44, 45, 46,  1,
+
+#define to_ISO_8859_10_C5_offsets 6562
+128, 191,
+      1,  1,  1,  1,  1,  2,  3,  1,    1,  1,  4,  5,  6,  7,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      8,  9,  1,  1,  1,  1, 10, 11,   12, 13, 14, 15,  1,  1,  1,  1,
+      1,  1, 16, 17,  1,  1,  1,  1,    1,  1,  1,  1,  1, 18, 19,  1,
+
+#define to_ISO_8859_10_E2_80_offsets 6628
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  2,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_10_offsets 6694
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define from_ISO_8859_11_offsets 6941
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 92, 92, 92, 93,
+     94, 95, 96, 97, 98, 99,100,101,  102,103,104,105,106,107,108,109,
+    110,111,112,113,114,115,116,117,  118,119,120,121, 92, 92, 92, 92,
+
+#define to_ISO_8859_11_C2_offsets 7199
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+     34, 34, 34, 34, 34, 34, 34, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_11_E0_B8_offsets 7265
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59,  1,  1,  1,  1, 60,
+
+#define to_ISO_8859_11_E0_B9_offsets 7331
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 29, 29, 29,
+     29, 29, 29, 29, 29, 29, 29, 29,   29, 29, 29, 29, 29, 29, 29, 29,
+     29, 29, 29, 29, 29, 29, 29, 29,   29, 29, 29, 29, 29, 29, 29, 29,
+
+#define to_ISO_8859_11_E0_offsets 7397
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_11_offsets 7431
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      4,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  6,  5,  5,
+      7,  8,  8,  8,  9,
+
+#define to_ISO_8859_13_C2_offsets 7678
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 34, 38, 39,   34, 40, 34, 41, 42, 43, 44, 34,
+     45, 46, 47, 48, 34, 49, 50, 51,   34, 52, 34, 53, 54, 55, 56, 34,
+
+#define to_ISO_8859_13_C3_offsets 7744
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  6,  1,  7,  8,  9,   10,  1,  1,  1, 11,  1,  1, 12,
+      1,  1,  1,  1, 13, 14, 15,  1,    1, 16,  1,  1,  1,  1,  1,  1,
+      1,  1,  1, 17,  1, 18, 19, 20,   21,  1,  1,  1, 22,  1,  1,  1,
+
+#define to_ISO_8859_13_C4_offsets 7810
+128, 191,
+      1,  2,  3,  3,  4,  5,  6,  7,    3,  3,  3,  3,  8,  9,  3,  3,
+      3,  3, 10, 11,  3,  3, 12, 13,   14, 15,  3,  3,  3,  3,  3,  3,
+      3,  3, 16, 17,  3,  3,  3,  3,    3,  3, 18, 19,  3,  3, 20, 21,
+      3,  3,  3,  3,  3,  3, 22, 23,    3,  3,  3, 24, 25,  3,  3,  3,
+
+#define to_ISO_8859_13_C5_offsets 7876
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  1,    1,  1,  1,  1,  8,  9,  1,  1,
+      1,  1,  1,  1,  1,  1, 10, 11,    1,  1, 12, 13,  1,  1,  1,  1,
+     14, 15,  1,  1,  1,  1,  1,  1,    1,  1, 16, 17,  1,  1,  1,  1,
+      1,  1, 18, 19,  1,  1,  1,  1,    1, 20, 21, 22, 23, 24, 25,  1,
+
+#define to_ISO_8859_13_E2_80_offsets 7942
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  3,  4,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_C2_offsets 8008
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 34, 35, 34, 34, 34, 36,   34, 37, 34, 34, 34, 38, 39, 34,
+     34, 34, 34, 34, 34, 34, 40, 34,   34, 34, 34, 34, 34, 34, 34, 34,
+
+#define to_ISO_8859_14_C3_offsets 8074
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 17,   24, 25, 26, 27, 28, 29, 17, 30,
+     31, 32, 33, 34, 35, 36, 37, 38,   39, 40, 41, 42, 43, 44, 45, 46,
+     17, 47, 48, 49, 50, 51, 52, 17,   53, 54, 55, 56, 57, 58, 17, 59,
+
+#define to_ISO_8859_14_C4_offsets 8140
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  3,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_C5_offsets 8206
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_E1_B8_offsets 8272
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  4,  5,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  6,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_E1_B9_offsets 8338
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  4,  5,    3,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  3,  3,  3,  3,  3,  3,    3,  3,  8,  9,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_ISO_8859_14_E1_BA_offsets 8404
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+
+#define to_ISO_8859_14_E1_BB_offsets 8470
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_E1_offsets 8536
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  4,  5,  1,  1,  1,  1,
+
+#define to_ISO_8859_14_offsets 8602
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      7,  8,  9,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 10,  9,  9,
+     11, 12, 12, 12, 13,
+
+#define to_ISO_8859_15_C2_offsets 8849
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 37, 39,   37, 40, 41, 42, 43, 44, 45, 46,
+     47, 48, 49, 50, 37, 51, 52, 53,   37, 54, 55, 56, 37, 37, 37, 57,
+
+#define to_ISO_8859_15_C5_offsets 8915
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  1,  1,  1,  7,  8,  1,
+
+#define to_ISO_8859_15_E2_82_offsets 8981
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_15_E2_offsets 9047
+128, 191,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_ISO_8859_15_offsets 9113
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      6,  7,  8,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  9,  7,  7,
+     10, 11, 11, 11, 12,
+
+#define from_WINDOWS_874_offsets 9360
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  2,  2,  2,  3,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  4,  5,  6,  7,  8,  9, 10,    2,  2,  2,  2,  2,  2,  2,  2,
+     11, 12, 13, 14, 15, 16, 17, 18,   19, 20, 21, 22, 23, 24, 25, 26,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52, 53, 54, 55, 56, 57, 58,
+     59, 60, 61, 62, 63, 64, 65, 66,   67, 68, 69,  2,  2,  2,  2, 70,
+     71, 72, 73, 74, 75, 76, 77, 78,   79, 80, 81, 82, 83, 84, 85, 86,
+     87, 88, 89, 90, 91, 92, 93, 94,   95, 96, 97, 98,  2,  2,  2,  2,
+
+#define to_WINDOWS_874_C2_offsets 9618
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_874_E2_80_offsets 9684
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  1,  1,  6,  7,  1,  1,
+      1,  1,  8,  1,  1,  1,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_874_offsets 9750
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      4,  5,  6,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  7,  5,  5,
+      8,  9,  9,  9, 10,
+
+#define from_WINDOWS_1250_offsets 9997
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  2,  4,  5,  6,  7,    2,  8,  9, 10, 11, 12, 13, 14,
+      2, 15, 16, 17, 18, 19, 20, 21,    2, 22, 23, 24, 25, 26, 27, 28,
+     29, 30, 31, 32, 33, 34, 35, 36,   37, 38, 39, 40, 41, 42, 43, 44,
+     45, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 58, 59, 60,
+     61, 62, 63, 64, 65, 66, 67, 68,   69, 70, 71, 72, 73, 74, 75, 76,
+     77, 78, 79, 80, 81, 82, 83, 84,   85, 86, 87, 88, 89, 90, 91, 92,
+     93, 94, 95, 96, 97, 98, 99,100,  101,102,103,104,105,106,107,108,
+    109,110,111,112,113,114,115,116,  117,118,119,120,121,122,123,124,
+
+#define to_WINDOWS_1250_C2_offsets 10255
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  4,  5,    6,  7,  1,  8,  9, 10, 11,  1,
+     12, 13,  1,  1, 14, 15, 16, 17,   18,  1,  1, 19,  1,  1,  1,  1,
+
+#define to_WINDOWS_1250_E2_80_offsets 10321
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  1,  7,  8,  9,  1,
+     10, 11, 12,  1,  1,  1, 13,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     14,  1,  1,  1,  1,  1,  1,  1,    1, 15, 16,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1250_E2_84_offsets 10387
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1250_E2_offsets 10453
+128, 191,
+      1,  2,  3,  2,  4,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_WINDOWS_1250_offsets 10519
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  6,    6,  6,  6,  7,  6,  6,  6,  6,
+      6,  6,  6,  6,  6,  6,  6,  6,    6,  6,  6,  6,  6,  6,  6,  6,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define to_WINDOWS_1251_C2_offsets 10766
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  4,  5,    1,  6,  1,  7,  8,  9, 10,  1,
+     11, 12,  1,  1,  1, 13, 14, 15,    1,  1,  1, 16,  1,  1,  1,  1,
+
+#define to_WINDOWS_1251_D2_offsets 10832
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1251_E2_84_offsets 10898
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1251_offsets 10964
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      4,  5,  6,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define from_WINDOWS_1252_offsets 11211
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  2, 14,  2,
+      2, 15, 16, 17, 18, 19, 20, 21,   22, 23, 24, 25, 26,  2, 27, 28,
+     29, 30, 31, 32, 33, 34, 35, 36,   37, 38, 39, 40, 41, 42, 43, 44,
+     45, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 58, 59, 60,
+     61, 62, 63, 64, 65, 66, 67, 68,   69, 70, 71, 72, 73, 74, 75, 76,
+     77, 78, 79, 80, 81, 82, 83, 84,   85, 86, 87, 88, 89, 90, 91, 92,
+     93, 94, 95, 96, 97, 98, 99,100,  101,102,103,104,105,106,107,108,
+    109,110,111,112,113,114,115,116,  117,118,119,120,121,122,123,124,
+
+#define to_WINDOWS_1252_C2_offsets 11469
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27, 28, 29, 30, 31, 32, 33,
+
+#define to_WINDOWS_1252_C6_offsets 11535
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1252_CB_offsets 11601
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  3,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1252_offsets 11667
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  4,    4,  4,  4,  7,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define from_WINDOWS_1253_offsets 11914
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    2,  9,  2, 10,  2,  2,  2,  2,
+      2, 11, 12, 13, 14, 15, 16, 17,    2, 18,  2, 19,  2,  2,  2,  2,
+     20, 21, 22, 23, 24, 25, 26, 27,   28, 29,  2, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+     51, 52, 53, 54, 55, 56, 57, 58,   59, 60, 61, 62, 63, 64, 65, 66,
+     67, 68,  2, 69, 70, 71, 72, 73,   74, 75, 76, 77, 78, 79, 80, 81,
+     82, 83, 84, 85, 86, 87, 88, 89,   90, 91, 92, 93, 94, 95, 96, 97,
+     98, 99,100,101,102,103,104,105,  106,107,108,109,110,111,112,  2,
+
+#define to_WINDOWS_1253_C2_offsets 12172
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  3,  4,  5,  6,  7,    8,  9,  1, 10, 11, 12, 13,  1,
+     14, 15, 16, 17,  1, 18, 19, 20,    1,  1,  1, 21,  1, 22,  1,  1,
+
+#define to_WINDOWS_1253_E2_80_offsets 12238
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  4,  1,  1,    5,  6,  7,  1,  8,  9, 10,  1,
+     11, 12, 13,  1,  1,  1, 14,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     15,  1,  1,  1,  1,  1,  1,  1,    1, 16, 17,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1253_offsets 12304
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  4,  3,    3,  3,  3,  3,  3,  3,  5,  6,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define from_WINDOWS_1254_offsets 12551
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13,  2,  2,  2,
+      2, 14, 15, 16, 17, 18, 19, 20,   21, 22, 23, 24, 25,  2,  2, 26,
+     27, 28, 29, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52, 53, 54, 55, 56, 57, 58,
+     59, 60, 61, 62, 63, 64, 65, 66,   67, 68, 69, 70, 71, 72, 73, 74,
+     75, 76, 77, 78, 79, 80, 81, 82,   83, 84, 85, 86, 87, 88, 89, 90,
+     91, 92, 93, 94, 95, 96, 97, 98,   99,100,101,102,103,104,105,106,
+    107,108,109,110,111,112,113,114,  115,116,117,118,119,120,121,122,
+
+#define to_WINDOWS_1254_C5_offsets 12809
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1254_offsets 12875
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    7,  7,  7,  8,  7,  7,  7,  7,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+      9, 10, 11, 10, 10, 10, 10, 10,   10, 10, 10, 10, 10, 12, 10, 10,
+     13, 14, 14, 14, 15,
+
+#define from_WINDOWS_1255_offsets 13122
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10,  2, 11,  2,  2,  2,  2,
+      2, 12, 13, 14, 15, 16, 17, 18,   19, 20,  2, 21,  2,  2,  2,  2,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+     38, 39, 40, 41, 42, 43, 44, 45,   46, 47, 48, 49, 50, 51, 52, 53,
+     54, 55, 56, 57, 58, 59, 60, 61,   62, 63,  2, 64, 65, 66, 67, 68,
+     69, 70, 71, 72, 73, 74, 75, 76,   77,  2,  2,  2,  2,  2,  2,  2,
+     78, 79, 80, 81, 82, 83, 84, 85,   86, 87, 88, 89, 90, 91, 92, 93,
+     94, 95, 96, 97, 98, 99,100,101,  102,103,104,  2,  2,105,106,  2,
+
+#define to_WINDOWS_1255_C2_offsets 13380
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  6,  7,  8,    9, 10,  1, 11, 12, 13, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25,  1, 26, 27, 28, 29, 30,
+
+#define to_WINDOWS_1255_D6_offsets 13446
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11,  1, 12, 13, 14, 15, 16,
+
+#define to_WINDOWS_1255_D7_offsets 13512
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      6,  7,  8,  9, 10, 11, 12, 13,   14, 15, 16, 17, 18, 19, 20, 21,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31, 32,  5,  5,  5,  5,  5,
+     33, 34, 35, 36, 37,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+
+#define to_WINDOWS_1255_E2_80_offsets 13578
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  2,  3,
+      1,  1,  1,  4,  5,  1,  1,  1,    6,  7,  8,  1,  9, 10, 11,  1,
+     12, 13, 14,  1,  1,  1, 15,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     16,  1,  1,  1,  1,  1,  1,  1,    1, 17, 18,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1255_E2_82_offsets 13644
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  3,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1255_EF_AC_offsets 13710
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  2,  1,  3,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  4,  5,  6,  7,  8,  9,
+     10, 11, 12, 13, 14, 15, 16,  1,   17, 18, 19, 20, 21,  1, 22,  1,
+
+#define to_WINDOWS_1255_EF_AD_offsets 13776
+128, 191,
+      1,  2,  3,  4,  5,  3,  6,  7,    8,  9, 10, 11, 12, 13, 14,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_WINDOWS_1255_EF_offsets 13842
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1255_offsets 13908
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  5,  4,    4,  4,  4,  6,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  7,  8,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 10, 10, 10, 10, 10,   10, 10, 10, 10, 10, 12, 10, 13,
+     14, 15, 15, 15, 16,
+
+#define to_WINDOWS_1256_C2_offsets 14155
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  3,  4,  5,  6,  7,  8,    9, 10,  1, 11, 12, 13, 14, 15,
+     16, 17, 18, 19, 20, 21, 22, 23,   24, 25,  1, 26, 27, 28, 29,  1,
+
+#define to_WINDOWS_1256_C3_offsets 14221
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  4,  1,  1,  1,  1,  5,    6,  7,  8,  9,  1,  1, 10, 11,
+      1,  1,  1,  1, 12,  1,  1, 13,    1, 14,  1, 15, 16,  1,  1,  1,
+
+#define to_WINDOWS_1256_C5_offsets 14287
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1256_CB_offsets 14353
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1256_D9_offsets 14419
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 20, 20, 20, 20,   20, 20, 20, 20, 20, 20, 20, 20,
+     20, 20, 20, 20, 20, 20, 20, 20,   20, 20, 20, 20, 20, 20, 20, 20,
+     20, 20, 20, 20, 20, 20, 20, 20,   20, 21, 20, 20, 20, 20, 22, 20,
+
+#define to_WINDOWS_1256_DA_offsets 14485
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    5,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  6,  1,  1,  1,  1,  1,  7,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  8,  1,  1,  1,  9,  1,
+
+#define to_WINDOWS_1256_DB_offsets 14551
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1256_E2_80_offsets 14617
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  2,  3,  4,  5,
+      1,  1,  1,  6,  7,  1,  1,  1,    8,  9, 10,  1, 11, 12, 13,  1,
+     14, 15, 16,  1,  1,  1, 17,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     18,  1,  1,  1,  1,  1,  1,  1,    1, 19, 20,  1,  1,  1,  1,  1,
+
+#define to_WINDOWS_1256_offsets 14683
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  4,    4,  4,  4,  7,  4,  4,  4,  4,
+      4,  4,  4,  4,  4,  4,  4,  4,    8,  9, 10, 11,  4,  4,  4,  4,
+     12, 13, 14, 13, 13, 13, 13, 13,   13, 13, 13, 13, 13, 15, 13, 13,
+     16, 17, 17, 17, 18,
+
+#define from_WINDOWS_1257_offsets 14930
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  2,  4,  5,  6,  7,    2,  8,  2,  9,  2, 10, 11, 12,
+      2, 13, 14, 15, 16, 17, 18, 19,    2, 20,  2, 21,  2, 22, 23,  2,
+     24,  2, 25, 26, 27,  2, 28, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+     38, 39, 40, 41, 42, 43, 44, 45,   46, 47, 48, 49, 50, 51, 52, 53,
+     54, 55, 56, 57, 58, 59, 60, 61,   62, 63, 64, 65, 66, 67, 68, 69,
+     70, 71, 72, 73, 74, 75, 76, 77,   78, 79, 80, 81, 82, 83, 84, 85,
+     86, 87, 88, 89, 90, 91, 92, 93,   94, 95, 96, 97, 98, 99,100,101,
+    102,103,104,105,106,107,108,109,  110,111,112,113,114,115,116,117,
+
+#define to_WINDOWS_1257_C2_offsets 15188
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  3,  4,  5,  1,  6,  7,    8,  9,  1, 10, 11, 12, 13, 14,
+     15, 16, 17, 18, 19, 20, 21, 22,   23, 24,  1, 25, 26, 27, 28,  1,
+
+#define to_IBM437_C2_offsets 15254
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  6,  1,  1,    1,  1,  7,  8,  9,  1,  1,  1,
+     10, 11, 12,  1,  1, 13,  1, 14,    1,  1, 15, 16, 17, 18,  1, 19,
+
+#define to_IBM437_C3_offsets 15320
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    1,  1,  1,  1,  9,  1,  1, 10,
+     11, 12, 13,  1, 14, 15, 16, 17,   18, 19, 20, 21, 22, 23, 24, 25,
+      1, 26, 27, 28, 29,  1, 30, 31,    1, 32, 33, 34, 35,  1,  1, 36,
+
+#define to_IBM437_CE_offsets 15386
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  4,  1,  1,  5,  1,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  7,  1,  1,  8,  9,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_CF_offsets 15452
+128, 191,
+      1,  2,  2,  3,  4,  2,  5,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_IBM437_E2_81_offsets 15518
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  2,
+
+#define to_IBM437_E2_82_offsets 15584
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_E2_88_offsets 15650
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  5,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_E2_89_offsets 15716
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  3,  1,  1,  4,  5,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_E2_8C_offsets 15782
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_E2_94_offsets 15848
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  2,    2,  2,  2,  2,  4,  2,  2,  2,
+      5,  2,  2,  2,  6,  2,  2,  2,    7,  2,  2,  2,  8,  2,  2,  2,
+      2,  2,  2,  2,  9,  2,  2,  2,    2,  2,  2,  2, 10,  2,  2,  2,
+      2,  2,  2,  2, 11,  2,  2,  2,    2,  2,  2,  2, 12,  2,  2,  2,
+
+#define to_IBM437_E2_95_offsets 15914
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  8,  9,   10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25,   26, 27, 28, 29, 30,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_E2_96_offsets 15980
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  5,  2,  2,  2,
+      6,  7,  8,  9,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+     10,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_IBM437_E2_offsets 16046
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    4,  5,  1,  1,  6,  1,  1,  1,
+      1,  1,  1,  1,  7,  8,  9,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM437_offsets 16112
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  5,  4,    4,  4,  4,  4,  4,  4,  6,  7,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define to_IBM775_C2_offsets 16359
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  3,  4,  5,  1,  6,  7,    1,  8,  1,  9, 10, 11, 12,  1,
+     13, 14, 15, 16,  1, 17, 18, 19,    1, 20,  1, 21, 22, 23, 24,  1,
+
+#define to_IBM775_E2_88_offsets 16425
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM775_E2_95_offsets 16491
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  4,  1,  1,  5,    1,  1,  6,  1,  1,  7,  1,  1,
+      8,  1,  1,  9,  1,  1, 10,  1,    1, 11,  1,  1, 12,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM775_E2_offsets 16557
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    3,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  4,  5,  6,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_IBM852_C2_offsets 16623
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  1,  4,    5,  1,  1,  6,  7,  8,  1,  1,
+      9,  1,  1,  1, 10,  1,  1,  1,   11,  1,  1, 12,  1,  1,  1,  1,
+
+#define to_IBM852_E2_96_offsets 16689
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  2,  2,  2,  2,  2,  2,  2,
+      2,  5,  6,  7,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      8,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_IBM852_E2_offsets 16755
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  2,  3,  4,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM855_C2_offsets 16821
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  1,  4,    1,  1,  1,  5,  1,  6,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  7,  1,  1,  1,  1,
+
+#define to_IBM855_E2_offsets 16887
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  5,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_IBM857_offsets 16953
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94, 95, 96,
+     97, 98, 99,100,101,102,103, 86,  104,105,106,107,108,109,110,111,
+    112,113, 86,114,115,116,117,118,  119,120,121,122,123,124,125,126,
+
+#define to_IBM860_C2_offsets 17211
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  1,  1,  1,    1,  1,  6,  7,  8,  1,  1,  1,
+      9, 10, 11,  1,  1, 12,  1, 13,    1,  1, 14, 15, 16, 17,  1, 18,
+
+#define to_IBM860_C3_offsets 17277
+128, 191,
+      1,  2,  3,  4,  5,  5,  5,  6,    7,  8,  9,  5, 10, 11,  5,  5,
+      5, 12, 13, 14, 15, 16,  5,  5,    5, 17, 18,  5, 19,  5,  5, 20,
+     21, 22, 23, 24,  5,  5,  5, 25,   26, 27, 28,  5, 29, 30,  5,  5,
+      5, 31, 32, 33, 34, 35,  5, 36,    5, 37, 38,  5, 39,  5,  5,  5,
+
+#define to_IBM860_E2_8C_offsets 17343
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM860_offsets 17409
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  5,  6,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define to_IBM861_C2_offsets 17656
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  4,  1,  1,  1,  1,    1,  1,  1,  5,  6,  1,  1,  1,
+      7,  8,  9,  1,  1, 10,  1, 11,    1,  1,  1, 12, 13, 14,  1, 15,
+
+#define to_IBM861_C3_offsets 17722
+128, 191,
+      1,  2,  1,  1,  3,  4,  5,  6,    1,  7,  1,  1,  1,  8,  1,  1,
+      9,  1,  1, 10,  1,  1, 11,  1,   12,  1, 13,  1, 14, 15, 16, 17,
+     18, 19, 20,  1, 21, 22, 23, 24,   25, 26, 27, 28,  1, 29,  1,  1,
+     30,  1,  1, 31, 32,  1, 33, 34,   35,  1, 36, 37, 38, 39, 40,  1,
+
+#define to_IBM862_C3_offsets 17788
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  3,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  5,  1,  1,
+      1,  6,  1,  7,  1,  1,  1,  8,    1,  1,  9,  1,  1,  1,  1,  1,
+
+#define to_IBM862_offsets 17854
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  5,  4,    4,  4,  4,  4,  4,  4,  6,  7,
+      4,  4,  4,  4,  4,  4,  4,  8,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 10, 10, 10, 10, 10,   10, 10, 10, 10, 10, 12, 10, 10,
+     13, 14, 14, 14, 15,
+
+#define to_IBM863_C2_offsets 18101
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  3,  4,  5,  1,  6,  7,    8,  1,  1,  9, 10,  1,  1, 11,
+     12, 13, 14, 15, 16, 17, 18, 19,   20,  1,  1, 21, 22, 23, 24,  1,
+
+#define to_IBM863_C3_offsets 18167
+128, 191,
+      1,  2,  3,  2,  2,  2,  2,  4,    5,  6,  7,  8,  2,  2,  9, 10,
+      2,  2,  2,  2, 11,  2,  2,  2,    2, 12,  2, 13, 14,  2,  2, 15,
+     16,  2, 17,  2,  2,  2,  2, 18,   19, 20, 21, 22,  2,  2, 23, 24,
+      2,  2,  2, 25, 26,  2,  2, 27,    2, 28, 29, 30, 31,  2,  2,  2,
+
+#define to_IBM863_E2_80_offsets 18233
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM863_E2_offsets 18299
+128, 191,
+      1,  2,  3,  3,  3,  3,  3,  3,    4,  5,  3,  3,  6,  3,  3,  3,
+      3,  3,  3,  3,  7,  8,  9,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_IBM865_C2_offsets 18365
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  1,  4,  5,  1,  1,  1,    1,  1,  6,  7,  8,  1,  1,  1,
+      9, 10, 11,  1,  1, 12,  1, 13,    1,  1, 14,  1, 15, 16,  1, 17,
+
+#define to_IBM865_C3_offsets 18431
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    1,  6,  1,  1,  1,  1,  1,  1,
+      1,  7,  1,  1,  1,  1,  8,  1,    9,  1,  1,  1, 10,  1,  1, 11,
+     12, 13, 14,  1, 15, 16, 17, 18,   19, 20, 21, 22, 23, 24, 25, 26,
+      1, 27, 28, 29, 30,  1, 31, 32,   33, 34, 35, 36, 37,  1,  1, 38,
+
+#define to_IBM866_C2_offsets 18497
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  3,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  1,  1,  1,  1,  1,  1,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM866_D0_offsets 18563
+128, 191,
+      1,  2,  1,  1,  3,  1,  1,  4,    1,  1,  1,  1,  1,  1,  5,  1,
+      6,  7,  8,  9, 10, 11, 12, 13,   14, 15, 16, 17, 18, 19, 20, 21,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+     38, 39, 40, 41, 42, 43, 44, 45,   46, 47, 48, 49, 50, 51, 52, 53,
+
+#define to_IBM866_D1_offsets 18629
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 19, 17, 17, 20,   17, 17, 17, 17, 17, 17, 21, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_IBM866_E2_88_offsets 18695
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  2,  3,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_IBM866_E2_offsets 18761
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    3,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  4,  5,  6,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_IBM869_offsets 18827
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  2,  1,    3,  4,  5,  6,  7,  8,  9, 10,
+     11, 12, 13,  1,  1, 14, 15, 16,   17, 18, 19, 20, 21, 22, 23, 24,
+     25, 26, 27, 28, 29, 30, 31, 32,   33, 34, 35, 36, 37, 38, 39, 40,
+     41, 42, 43, 44, 45, 46, 47, 48,   49, 50, 51, 52, 53, 54, 55, 56,
+     57, 58, 59, 60, 61, 62, 63, 64,   65, 66, 67, 68, 69, 70, 71, 72,
+     73, 74, 75, 76, 77, 78, 79, 80,   81, 82, 83, 84, 85, 86, 87, 88,
+     89, 90, 91, 92, 93, 94, 95, 96,   97, 98, 99,100,101,102,103,104,
+    105,106,107,108,109,110,111,112,  113,114,115,116,117,118,119,120,
+
+#define to_IBM869_C2_offsets 19085
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  3,  1,  1,  4,  5,    6,  7,  1,  8,  9, 10,  1,  1,
+     11, 12, 13, 14,  1,  1,  1, 15,    1,  1,  1, 16,  1, 17,  1,  1,
+
+#define to_IBM869_E2_offsets 19151
+128, 191,
+      1,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  3,  4,  5,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_IBM869_offsets 19217
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  4,  5,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      6,  7,  8,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  9,  7,  7,
+     10, 11, 11, 11, 12,
+
+#define to_MACCROATIAN_C2_offsets 19464
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  1,  1,  7,    8,  9, 10, 11, 12,  1, 13, 14,
+     15, 16,  1,  1, 17, 18, 19, 20,   21,  1, 22, 23,  1,  1,  1, 24,
+
+#define to_MACCROATIAN_C3_offsets 19530
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 17,   24, 25, 26, 27, 28, 17, 17, 29,
+     30, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     17, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 17, 17, 17,
+
+#define to_MACCROATIAN_C4_offsets 19596
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  1,  4,  5,  1,  1,
+      6,  7,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  8,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_C5_offsets 19662
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      4,  5,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  6,  7,  1,
+
+#define to_MACCROATIAN_CB_offsets 19728
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  4,  1,  5,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_80_offsets 19794
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  1,  7,  8,  9,  1,
+     10,  1, 11,  1,  1,  1, 12,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     13,  1,  1,  1,  1,  1,  1,  1,    1, 14, 15,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_84_offsets 19860
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_88_offsets 19926
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  4,
+      1,  5,  1,  1,  1,  1,  1,  1,    1,  1,  6,  1,  1,  1,  7,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  8,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_89_offsets 19992
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  1,  1,  1,  4,  5,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_97_offsets 20058
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  2,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCROATIAN_E2_offsets 20124
+128, 191,
+      1,  2,  3,  3,  4,  3,  3,  3,    5,  6,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  7,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+      3,  3,  3,  3,  3,  3,  3,  3,    3,  3,  3,  3,  3,  3,  3,  3,
+
+#define to_MACCROATIAN_offsets 20190
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    7,  7,  7,  8,  7,  7,  7,  9,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+     10, 11, 12, 11, 11, 11, 11, 11,   11, 11, 11, 11, 11, 13, 11, 11,
+     14, 15, 15, 15, 16,
+
+#define to_MACCYRILLIC_C2_offsets 20437
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  3,  4,  5,  1,  1,  6,    1,  7,  1,  8,  9,  1, 10,  1,
+     11, 12,  1,  1,  1, 13, 14,  1,    1,  1,  1, 15,  1,  1,  1,  1,
+
+#define to_MACCYRILLIC_C3_offsets 20503
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  2,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCYRILLIC_E2_80_offsets 20569
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  1,  1,  6,  7,  8,  1,
+      9,  1, 10,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCYRILLIC_E2_88_offsets 20635
+128, 191,
+      1,  1,  2,  1,  1,  1,  3,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  4,  1,  1,  1,  5,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACCYRILLIC_E2_offsets 20701
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  5,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_MACCYRILLIC_offsets 20767
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  5,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      6,  7,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define to_MACGREEK_C2_offsets 21014
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  3,  1,  4,  5,  6,    7,  8,  1,  9, 10, 11, 12,  1,
+     13, 14, 15, 16,  1,  1,  1,  1,    1, 17,  1, 18,  1, 19,  1,  1,
+
+#define to_MACGREEK_C3_offsets 21080
+128, 191,
+      1,  1,  1,  1,  2,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  4,  1,    1,  1,  1,  1,  5,  1,  1,  6,
+      7,  1,  8,  1,  9,  1,  1, 10,   11, 12, 13, 14,  1,  1, 15, 16,
+      1,  1,  1,  1, 17,  1, 18, 19,    1, 20,  1, 21, 22,  1,  1,  1,
+
+#define to_MACGREEK_C5_offsets 21146
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACGREEK_CE_offsets 21212
+128, 191,
+      1,  1,  1,  1,  2,  3,  4,  5,    6,  7,  8,  1,  9,  1, 10, 11,
+     12, 13, 14, 15, 16, 17, 18, 19,   20, 21, 22, 23, 24, 25, 26, 27,
+     28, 29,  1, 30, 31, 32, 33, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+     43, 44, 45, 46, 47, 48, 49, 50,   51, 52, 53, 54, 55, 56, 57, 58,
+
+#define to_MACGREEK_E2_80_offsets 21278
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  1,  3,  1,  1,    4,  5,  1,  1,  6,  7,  1,  1,
+      8,  1,  9,  1,  1,  1, 10,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     11,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACGREEK_E2_offsets 21344
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    2,  4,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_MACGREEK_offsets 21410
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  4,  4,    4,  4,  4,  4,  4,  4,  6,  7,
+      4,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define to_MACICELAND_C2_offsets 21657
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  6,  7,  1,  8,    9, 10, 11, 12, 13,  1, 14, 15,
+     16, 17,  1,  1, 18, 19, 20, 21,   22,  1, 23, 24,  1,  1,  1, 25,
+
+#define to_MACICELAND_C4_offsets 21723
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACICELAND_C5_offsets 21789
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACICELAND_CB_offsets 21855
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  3,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    4,  5,  6,  7,  8,  9,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACICELAND_E2_80_offsets 21921
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  1,  7,  8,  9,  1,
+      1,  1, 10,  1,  1,  1, 11,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     12,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACROMAN_C3_offsets 21987
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 17,   24, 25, 26, 27, 28, 17, 17, 29,
+     30, 31, 32, 33, 34, 35, 36, 37,   38, 39, 40, 41, 42, 43, 44, 45,
+     17, 46, 47, 48, 49, 50, 51, 52,   53, 54, 55, 56, 57, 17, 17, 58,
+
+#define to_MACROMAN_EF_AC_offsets 22053
+128, 191,
+      1,  2,  3,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACROMAN_offsets 22119
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  7,    7,  7,  7,  8,  7,  7,  7,  9,
+      7,  7,  7,  7,  7,  7,  7,  7,    7,  7,  7,  7,  7,  7,  7,  7,
+     10, 11, 12, 11, 11, 11, 11, 11,   11, 11, 11, 11, 11, 13, 11, 14,
+     15, 16, 16, 16, 17,
+
+#define to_MACROMANIA_C3_offsets 22366
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+      7, 17, 18, 19, 20, 21, 22,  7,    7, 23, 24, 25, 26,  7,  7, 27,
+     28, 29, 30, 31, 32, 33,  7, 34,   35, 36, 37, 38, 39, 40, 41, 42,
+      7, 43, 44, 45, 46, 47, 48, 49,    7, 50, 51, 52, 53,  7,  7, 54,
+
+#define to_MACROMANIA_C4_offsets 22432
+128, 191,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  4,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACROMANIA_C5_offsets 22498
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  6,  7,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    8,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_MACTURKISH_offsets 22564
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59, 60, 61, 62, 63, 64,
+     65, 66, 67, 68, 69, 70, 71, 72,   73, 74, 75, 76, 77, 78, 79, 80,
+     81, 82, 83, 84, 85, 86, 87, 88,   89, 90, 91, 92, 93, 94, 95, 96,
+     97, 98, 99,100,101,102,103,104,  105,106,107,108,109,110,111,112,
+    113,114,115,116,117,113,118,119,  120,121,122,123,124,125,126,127,
+
+#define to_MACTURKISH_C2_offsets 22822
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  5,  1,  6,  1,  7,    8,  9, 10, 11, 12,  1, 13, 14,
+     15, 16,  1,  1, 17, 18, 19, 20,   21,  1, 22, 23,  1,  1,  1, 24,
+
+#define to_MACTURKISH_C5_offsets 22888
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  4,  5,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    6,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACTURKISH_E2_80_offsets 22954
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  2,  3,  1,  1,  1,    4,  5,  6,  1,  7,  8,  9,  1,
+     10, 11, 12,  1,  1,  1, 13,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+     14,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACTURKISH_E2_offsets 23020
+128, 191,
+      1,  2,  2,  2,  3,  2,  2,  2,    4,  5,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  6,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+
+#define to_MACUKRAINE_C2_offsets 23086
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  3,  4,  1,  1,  5,    1,  6,  1,  7,  8,  1,  9,  1,
+     10, 11,  1,  1,  1, 12, 13,  1,    1,  1,  1, 14,  1,  1,  1,  1,
+
+#define to_MACUKRAINE_E2_88_offsets 23152
+128, 191,
+      1,  1,  1,  1,  1,  1,  2,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  3,  1,  1,  1,  4,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_MACUKRAINE_offsets 23218
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  5,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      6,  7,  8,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      9, 10, 11, 10, 10, 10, 10, 10,   10, 10, 10, 10, 10, 12, 10, 10,
+     13, 14, 14, 14, 15,
+
+#define to_KOI8_U_C2_offsets 23465
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  1,  1,  1,  1,  1,  1,  1,    1,  3,  1,  1,  1,  1,  1,  1,
+      4,  1,  5,  1,  1,  1,  1,  6,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_KOI8_U_D0_offsets 23531
+128, 191,
+      1,  2,  1,  1,  3,  1,  4,  5,    1,  1,  1,  1,  1,  1,  1,  1,
+      6,  7,  8,  9, 10, 11, 12, 13,   14, 15, 16, 17, 18, 19, 20, 21,
+     22, 23, 24, 25, 26, 27, 28, 29,   30, 31, 32, 33, 34, 35, 36, 37,
+     38, 39, 40, 41, 42, 43, 44, 45,   46, 47, 48, 49, 50, 51, 52, 53,
+
+#define to_KOI8_U_D1_offsets 23597
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 19, 17, 20, 21,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_KOI8_U_E2_89_offsets 23663
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  3,  4,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_KOI8_U_E2_95_offsets 23729
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      2,  3,  4,  1,  5,  1,  1,  6,    7,  8,  9, 10,  1, 11, 12, 13,
+     14, 15,  1, 16,  1,  1, 17, 18,   19, 20, 21,  1, 22,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_KOI8_U_E2_offsets 23795
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    2,  3,  1,  1,  4,  1,  1,  1,
+      1,  1,  1,  1,  5,  6,  7,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define to_KOI8_U_offsets 23861
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      5,  6,  7,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      8,  9, 10,  9,  9,  9,  9,  9,    9,  9,  9,  9,  9, 11,  9,  9,
+     12, 13, 13, 13, 14,
+
+#define to_KOI8_R_D0_offsets 24108
+128, 191,
+      1,  2,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      3,  4,  5,  6,  7,  8,  9, 10,   11, 12, 13, 14, 15, 16, 17, 18,
+     19, 20, 21, 22, 23, 24, 25, 26,   27, 28, 29, 30, 31, 32, 33, 34,
+     35, 36, 37, 38, 39, 40, 41, 42,   43, 44, 45, 46, 47, 48, 49, 50,
+
+#define to_KOI8_R_D1_offsets 24174
+128, 191,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+     17, 17, 17, 17, 17, 17, 17, 17,   17, 17, 17, 17, 17, 17, 17, 17,
+
+#define to_KOI8_R_offsets 24240
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      5,  6,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  4,  4,  4,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+#define from_TIS_620_offsets 24487
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  2,  3,  4,  5,  6,  7,  8,    9, 10, 11, 12, 13, 14, 15, 16,
+     17, 18, 19, 20, 21, 22, 23, 24,   25, 26, 27, 28, 29, 30, 31, 32,
+     33, 34, 35, 36, 37, 38, 39, 40,   41, 42, 43, 44, 45, 46, 47, 48,
+     49, 50, 51, 52, 53, 54, 55, 56,   57, 58, 59,  1,  1,  1,  1, 60,
+     61, 62, 63, 64, 65, 66, 67, 68,   69, 70, 71, 72, 73, 74, 75, 76,
+     77, 78, 79, 80, 81, 82, 83, 84,   85, 86, 87, 88,  1,  1,  1,  1,
+
+#define to_CP850_offsets 24745
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  3,  4,  5,  6,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      5,  5,  5,  5,  5,  5,  5,  5,    5,  5,  5,  5,  5,  5,  5,  5,
+      7,  8,  9,  8,  8,  8,  8,  8,    8,  8,  8,  8,  8, 10,  8,  8,
+     11, 12, 12, 12, 13,
+
+};
+static const unsigned int
+single_byte_word_array[12049] = {
+#define from_US_ASCII_infos WORDINDEX2INFO(0)
+       NOMAP, INVALID,
+
+#define from_US_ASCII WORDINDEX2INFO(2)
+    from_US_ASCII_offsets,
+    from_US_ASCII_infos,
+
+#define to_US_ASCII_C2_infos WORDINDEX2INFO(4)
+     INVALID,   UNDEF,
+
+#define to_US_ASCII_C2 WORDINDEX2INFO(6)
+    to_US_ASCII_C2_offsets,
+    to_US_ASCII_C2_infos,
+
+#define to_US_ASCII_E0_infos WORDINDEX2INFO(8)
+            INVALID, to_US_ASCII_C2,
+
+#define to_US_ASCII_E0 WORDINDEX2INFO(10)
+    to_US_ASCII_E0_offsets,
+    to_US_ASCII_E0_infos,
+
+#define to_US_ASCII_E1 WORDINDEX2INFO(12)
+    to_US_ASCII_C2_offsets,
+    to_US_ASCII_E0_infos,
+
+#define to_US_ASCII_ED WORDINDEX2INFO(14)
+    to_US_ASCII_ED_offsets,
+    to_US_ASCII_E0_infos,
+
+#define to_US_ASCII_F0_infos WORDINDEX2INFO(16)
+            INVALID, to_US_ASCII_E1,
+
+#define to_US_ASCII_F0 WORDINDEX2INFO(18)
+    to_US_ASCII_F0_offsets,
+    to_US_ASCII_F0_infos,
+
+#define to_US_ASCII_F1 WORDINDEX2INFO(20)
+    to_US_ASCII_C2_offsets,
+    to_US_ASCII_F0_infos,
+
+#define to_US_ASCII_F4 WORDINDEX2INFO(22)
+    to_US_ASCII_F4_offsets,
+    to_US_ASCII_F0_infos,
+
+#define to_US_ASCII_infos WORDINDEX2INFO(24)
+              NOMAP,        INVALID, to_US_ASCII_C2, to_US_ASCII_E0,
+     to_US_ASCII_E1, to_US_ASCII_ED, to_US_ASCII_F0, to_US_ASCII_F1,
+     to_US_ASCII_F4,
+
+#define to_US_ASCII WORDINDEX2INFO(33)
+    to_US_ASCII_offsets,
+    to_US_ASCII_infos,
+
+#define from_ASCII_8BIT_infos WORDINDEX2INFO(35)
+     NOMAP, UNDEF,
+
+#define from_ASCII_8BIT WORDINDEX2INFO(37)
+    from_ASCII_8BIT_offsets,
+    from_ASCII_8BIT_infos,
+
+#define from_ISO_8859_1_infos WORDINDEX2INFO(39)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0), o2(0xC2,0xA1), o2(0xC2,0xA2),
+     o2(0xC2,0xA3), o2(0xC2,0xA4), o2(0xC2,0xA5), o2(0xC2,0xA6),
+     o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC2,0xA9), o2(0xC2,0xAA),
+     o2(0xC2,0xAB), o2(0xC2,0xAC), o2(0xC2,0xAD), o2(0xC2,0xAE),
+     o2(0xC2,0xAF), o2(0xC2,0xB0), o2(0xC2,0xB1), o2(0xC2,0xB2),
+     o2(0xC2,0xB3), o2(0xC2,0xB4), o2(0xC2,0xB5), o2(0xC2,0xB6),
+     o2(0xC2,0xB7), o2(0xC2,0xB8), o2(0xC2,0xB9), o2(0xC2,0xBA),
+     o2(0xC2,0xBB), o2(0xC2,0xBC), o2(0xC2,0xBD), o2(0xC2,0xBE),
+     o2(0xC2,0xBF), o2(0xC3,0x80), o2(0xC3,0x81), o2(0xC3,0x82),
+     o2(0xC3,0x83), o2(0xC3,0x84), o2(0xC3,0x85), o2(0xC3,0x86),
+     o2(0xC3,0x87), o2(0xC3,0x88), o2(0xC3,0x89), o2(0xC3,0x8A),
+     o2(0xC3,0x8B), o2(0xC3,0x8C), o2(0xC3,0x8D), o2(0xC3,0x8E),
+     o2(0xC3,0x8F), o2(0xC3,0x90), o2(0xC3,0x91), o2(0xC3,0x92),
+     o2(0xC3,0x93), o2(0xC3,0x94), o2(0xC3,0x95), o2(0xC3,0x96),
+     o2(0xC3,0x97), o2(0xC3,0x98), o2(0xC3,0x99), o2(0xC3,0x9A),
+     o2(0xC3,0x9B), o2(0xC3,0x9C), o2(0xC3,0x9D), o2(0xC3,0x9E),
+     o2(0xC3,0x9F), o2(0xC3,0xA0), o2(0xC3,0xA1), o2(0xC3,0xA2),
+     o2(0xC3,0xA3), o2(0xC3,0xA4), o2(0xC3,0xA5), o2(0xC3,0xA6),
+     o2(0xC3,0xA7), o2(0xC3,0xA8), o2(0xC3,0xA9), o2(0xC3,0xAA),
+     o2(0xC3,0xAB), o2(0xC3,0xAC), o2(0xC3,0xAD), o2(0xC3,0xAE),
+     o2(0xC3,0xAF), o2(0xC3,0xB0), o2(0xC3,0xB1), o2(0xC3,0xB2),
+     o2(0xC3,0xB3), o2(0xC3,0xB4), o2(0xC3,0xB5), o2(0xC3,0xB6),
+     o2(0xC3,0xB7), o2(0xC3,0xB8), o2(0xC3,0xB9), o2(0xC3,0xBA),
+     o2(0xC3,0xBB), o2(0xC3,0xBC), o2(0xC3,0xBD), o2(0xC3,0xBE),
+     o2(0xC3,0xBF),
+
+#define from_ISO_8859_1 WORDINDEX2INFO(168)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_1_infos,
+
+#define to_ISO_8859_1_C2_infos WORDINDEX2INFO(170)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0), o1(0xA1), o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAA),
+     o1(0xAB), o1(0xAC), o1(0xAD), o1(0xAE),
+     o1(0xAF), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xB3), o1(0xB4), o1(0xB5), o1(0xB6),
+     o1(0xB7), o1(0xB8), o1(0xB9), o1(0xBA),
+     o1(0xBB), o1(0xBC), o1(0xBD), o1(0xBE),
+     o1(0xBF),
+
+#define to_ISO_8859_1_C2 WORDINDEX2INFO(235)
+    to_ISO_8859_1_C2_offsets,
+    to_ISO_8859_1_C2_infos,
+
+#define to_ISO_8859_1_C3_infos WORDINDEX2INFO(237)
+      INVALID, o1(0xC0), o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC7), o1(0xC8), o1(0xC9), o1(0xCA),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF), o1(0xD0), o1(0xD1), o1(0xD2),
+     o1(0xD3), o1(0xD4), o1(0xD5), o1(0xD6),
+     o1(0xD7), o1(0xD8), o1(0xD9), o1(0xDA),
+     o1(0xDB), o1(0xDC), o1(0xDD), o1(0xDE),
+     o1(0xDF), o1(0xE0), o1(0xE1), o1(0xE2),
+     o1(0xE3), o1(0xE4), o1(0xE5), o1(0xE6),
+     o1(0xE7), o1(0xE8), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF), o1(0xF0), o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFD), o1(0xFE),
+     o1(0xFF),
+
+#define to_ISO_8859_1_C3 WORDINDEX2INFO(302)
+    to_ISO_8859_1_C2_offsets,
+    to_ISO_8859_1_C3_infos,
+
+#define to_ISO_8859_1_infos WORDINDEX2INFO(304)
+                NOMAP,          INVALID, to_ISO_8859_1_C2, to_ISO_8859_1_C3,
+       to_US_ASCII_C2,   to_US_ASCII_E0,   to_US_ASCII_E1,   to_US_ASCII_ED,
+       to_US_ASCII_F0,   to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_1 WORDINDEX2INFO(315)
+    to_ISO_8859_1_offsets,
+    to_ISO_8859_1_infos,
+
+#define from_ISO_8859_2_infos WORDINDEX2INFO(317)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0), o2(0xC4,0x84), o2(0xCB,0x98),
+     o2(0xC5,0x81), o2(0xC2,0xA4), o2(0xC4,0xBD), o2(0xC5,0x9A),
+     o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC5,0xA0), o2(0xC5,0x9E),
+     o2(0xC5,0xA4), o2(0xC5,0xB9), o2(0xC2,0xAD), o2(0xC5,0xBD),
+     o2(0xC5,0xBB), o2(0xC2,0xB0), o2(0xC4,0x85), o2(0xCB,0x9B),
+     o2(0xC5,0x82), o2(0xC2,0xB4), o2(0xC4,0xBE), o2(0xC5,0x9B),
+     o2(0xCB,0x87), o2(0xC2,0xB8), o2(0xC5,0xA1), o2(0xC5,0x9F),
+     o2(0xC5,0xA5), o2(0xC5,0xBA), o2(0xCB,0x9D), o2(0xC5,0xBE),
+     o2(0xC5,0xBC), o2(0xC5,0x94), o2(0xC3,0x81), o2(0xC3,0x82),
+     o2(0xC4,0x82), o2(0xC3,0x84), o2(0xC4,0xB9), o2(0xC4,0x86),
+     o2(0xC3,0x87), o2(0xC4,0x8C), o2(0xC3,0x89), o2(0xC4,0x98),
+     o2(0xC3,0x8B), o2(0xC4,0x9A), o2(0xC3,0x8D), o2(0xC3,0x8E),
+     o2(0xC4,0x8E), o2(0xC4,0x90), o2(0xC5,0x83), o2(0xC5,0x87),
+     o2(0xC3,0x93), o2(0xC3,0x94), o2(0xC5,0x90), o2(0xC3,0x96),
+     o2(0xC3,0x97), o2(0xC5,0x98), o2(0xC5,0xAE), o2(0xC3,0x9A),
+     o2(0xC5,0xB0), o2(0xC3,0x9C), o2(0xC3,0x9D), o2(0xC5,0xA2),
+     o2(0xC3,0x9F), o2(0xC5,0x95), o2(0xC3,0xA1), o2(0xC3,0xA2),
+     o2(0xC4,0x83), o2(0xC3,0xA4), o2(0xC4,0xBA), o2(0xC4,0x87),
+     o2(0xC3,0xA7), o2(0xC4,0x8D), o2(0xC3,0xA9), o2(0xC4,0x99),
+     o2(0xC3,0xAB), o2(0xC4,0x9B), o2(0xC3,0xAD), o2(0xC3,0xAE),
+     o2(0xC4,0x8F), o2(0xC4,0x91), o2(0xC5,0x84), o2(0xC5,0x88),
+     o2(0xC3,0xB3), o2(0xC3,0xB4), o2(0xC5,0x91), o2(0xC3,0xB6),
+     o2(0xC3,0xB7), o2(0xC5,0x99), o2(0xC5,0xAF), o2(0xC3,0xBA),
+     o2(0xC5,0xB1), o2(0xC3,0xBC), o2(0xC3,0xBD), o2(0xC5,0xA3),
+     o2(0xCB,0x99),
+
+#define from_ISO_8859_2 WORDINDEX2INFO(446)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_2_infos,
+
+#define to_ISO_8859_2_C2_infos WORDINDEX2INFO(448)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA4),
+     o1(0xA7), o1(0xA8), o1(0xAD), o1(0xB0),
+     o1(0xB4), o1(0xB8),
+
+#define to_ISO_8859_2_C2 WORDINDEX2INFO(490)
+    to_ISO_8859_2_C2_offsets,
+    to_ISO_8859_2_C2_infos,
+
+#define to_ISO_8859_2_C3_infos WORDINDEX2INFO(492)
+      INVALID,    UNDEF, o1(0xC1), o1(0xC2),
+     o1(0xC4), o1(0xC7), o1(0xC9), o1(0xCB),
+     o1(0xCD), o1(0xCE), o1(0xD3), o1(0xD4),
+     o1(0xD6), o1(0xD7), o1(0xDA), o1(0xDC),
+     o1(0xDD), o1(0xDF), o1(0xE1), o1(0xE2),
+     o1(0xE4), o1(0xE7), o1(0xE9), o1(0xEB),
+     o1(0xED), o1(0xEE), o1(0xF3), o1(0xF4),
+     o1(0xF6), o1(0xF7), o1(0xFA), o1(0xFC),
+     o1(0xFD),
+
+#define to_ISO_8859_2_C3 WORDINDEX2INFO(525)
+    to_ISO_8859_2_C3_offsets,
+    to_ISO_8859_2_C3_infos,
+
+#define to_ISO_8859_2_C4_infos WORDINDEX2INFO(527)
+      INVALID,    UNDEF, o1(0xC3), o1(0xE3),
+     o1(0xA1), o1(0xB1), o1(0xC6), o1(0xE6),
+     o1(0xC8), o1(0xE8), o1(0xCF), o1(0xEF),
+     o1(0xD0), o1(0xF0), o1(0xCA), o1(0xEA),
+     o1(0xCC), o1(0xEC), o1(0xC5), o1(0xE5),
+     o1(0xA5), o1(0xB5),
+
+#define to_ISO_8859_2_C4 WORDINDEX2INFO(549)
+    to_ISO_8859_2_C4_offsets,
+    to_ISO_8859_2_C4_infos,
+
+#define to_ISO_8859_2_C5_infos WORDINDEX2INFO(551)
+      INVALID,    UNDEF, o1(0xA3), o1(0xB3),
+     o1(0xD1), o1(0xF1), o1(0xD2), o1(0xF2),
+     o1(0xD5), o1(0xF5), o1(0xC0), o1(0xE0),
+     o1(0xD8), o1(0xF8), o1(0xA6), o1(0xB6),
+     o1(0xAA), o1(0xBA), o1(0xA9), o1(0xB9),
+     o1(0xDE), o1(0xFE), o1(0xAB), o1(0xBB),
+     o1(0xD9), o1(0xF9), o1(0xDB), o1(0xFB),
+     o1(0xAC), o1(0xBC), o1(0xAF), o1(0xBF),
+     o1(0xAE), o1(0xBE),
+
+#define to_ISO_8859_2_C5 WORDINDEX2INFO(585)
+    to_ISO_8859_2_C5_offsets,
+    to_ISO_8859_2_C5_infos,
+
+#define to_ISO_8859_2_CB_infos WORDINDEX2INFO(587)
+      INVALID,    UNDEF, o1(0xB7), o1(0xA2),
+     o1(0xFF), o1(0xB2), o1(0xBD),
+
+#define to_ISO_8859_2_CB WORDINDEX2INFO(594)
+    to_ISO_8859_2_CB_offsets,
+    to_ISO_8859_2_CB_infos,
+
+#define to_ISO_8859_2_infos WORDINDEX2INFO(596)
+                NOMAP,          INVALID, to_ISO_8859_2_C2, to_ISO_8859_2_C3,
+     to_ISO_8859_2_C4, to_ISO_8859_2_C5,   to_US_ASCII_C2, to_ISO_8859_2_CB,
+       to_US_ASCII_E0,   to_US_ASCII_E1,   to_US_ASCII_ED,   to_US_ASCII_F0,
+       to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_2 WORDINDEX2INFO(610)
+    to_ISO_8859_2_offsets,
+    to_ISO_8859_2_infos,
+
+#define from_ISO_8859_3_infos WORDINDEX2INFO(612)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0), o2(0xC4,0xA6), o2(0xCB,0x98),
+     o2(0xC2,0xA3), o2(0xC2,0xA4),         UNDEF, o2(0xC4,0xA4),
+     o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC4,0xB0), o2(0xC5,0x9E),
+     o2(0xC4,0x9E), o2(0xC4,0xB4), o2(0xC2,0xAD), o2(0xC5,0xBB),
+     o2(0xC2,0xB0), o2(0xC4,0xA7), o2(0xC2,0xB2), o2(0xC2,0xB3),
+     o2(0xC2,0xB4), o2(0xC2,0xB5), o2(0xC4,0xA5), o2(0xC2,0xB7),
+     o2(0xC2,0xB8), o2(0xC4,0xB1), o2(0xC5,0x9F), o2(0xC4,0x9F),
+     o2(0xC4,0xB5), o2(0xC2,0xBD), o2(0xC5,0xBC), o2(0xC3,0x80),
+     o2(0xC3,0x81), o2(0xC3,0x82), o2(0xC3,0x84), o2(0xC4,0x8A),
+     o2(0xC4,0x88), o2(0xC3,0x87), o2(0xC3,0x88), o2(0xC3,0x89),
+     o2(0xC3,0x8A), o2(0xC3,0x8B), o2(0xC3,0x8C), o2(0xC3,0x8D),
+     o2(0xC3,0x8E), o2(0xC3,0x8F), o2(0xC3,0x91), o2(0xC3,0x92),
+     o2(0xC3,0x93), o2(0xC3,0x94), o2(0xC4,0xA0), o2(0xC3,0x96),
+     o2(0xC3,0x97), o2(0xC4,0x9C), o2(0xC3,0x99), o2(0xC3,0x9A),
+     o2(0xC3,0x9B), o2(0xC3,0x9C), o2(0xC5,0xAC), o2(0xC5,0x9C),
+     o2(0xC3,0x9F), o2(0xC3,0xA0), o2(0xC3,0xA1), o2(0xC3,0xA2),
+     o2(0xC3,0xA4), o2(0xC4,0x8B), o2(0xC4,0x89), o2(0xC3,0xA7),
+     o2(0xC3,0xA8), o2(0xC3,0xA9), o2(0xC3,0xAA), o2(0xC3,0xAB),
+     o2(0xC3,0xAC), o2(0xC3,0xAD), o2(0xC3,0xAE), o2(0xC3,0xAF),
+     o2(0xC3,0xB1), o2(0xC3,0xB2), o2(0xC3,0xB3), o2(0xC3,0xB4),
+     o2(0xC4,0xA1), o2(0xC3,0xB6), o2(0xC3,0xB7), o2(0xC4,0x9D),
+     o2(0xC3,0xB9), o2(0xC3,0xBA), o2(0xC3,0xBB), o2(0xC3,0xBC),
+     o2(0xC5,0xAD), o2(0xC5,0x9D), o2(0xCB,0x99),
+
+#define from_ISO_8859_3 WORDINDEX2INFO(735)
+    from_ISO_8859_3_offsets,
+    from_ISO_8859_3_infos,
+
+#define to_ISO_8859_3_C2_infos WORDINDEX2INFO(737)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA3),
+     o1(0xA4), o1(0xA7), o1(0xA8), o1(0xAD),
+     o1(0xB0), o1(0xB2), o1(0xB3), o1(0xB4),
+     o1(0xB5), o1(0xB7), o1(0xB8), o1(0xBD),
+
+#define to_ISO_8859_3_C2 WORDINDEX2INFO(785)
+    to_ISO_8859_3_C2_offsets,
+    to_ISO_8859_3_C2_infos,
+
+#define to_ISO_8859_3_C3_infos WORDINDEX2INFO(787)
+      INVALID, o1(0xC0), o1(0xC1), o1(0xC2),
+        UNDEF, o1(0xC4), o1(0xC7), o1(0xC8),
+     o1(0xC9), o1(0xCA), o1(0xCB), o1(0xCC),
+     o1(0xCD), o1(0xCE), o1(0xCF), o1(0xD1),
+     o1(0xD2), o1(0xD3), o1(0xD4), o1(0xD6),
+     o1(0xD7), o1(0xD9), o1(0xDA), o1(0xDB),
+     o1(0xDC), o1(0xDF), o1(0xE0), o1(0xE1),
+     o1(0xE2), o1(0xE4), o1(0xE7), o1(0xE8),
+     o1(0xE9), o1(0xEA), o1(0xEB), o1(0xEC),
+     o1(0xED), o1(0xEE), o1(0xEF), o1(0xF1),
+     o1(0xF2), o1(0xF3), o1(0xF4), o1(0xF6),
+     o1(0xF7), o1(0xF9), o1(0xFA), o1(0xFB),
+     o1(0xFC),
+
+#define to_ISO_8859_3_C3 WORDINDEX2INFO(836)
+    to_ISO_8859_3_C3_offsets,
+    to_ISO_8859_3_C3_infos,
+
+#define to_ISO_8859_3_C4_infos WORDINDEX2INFO(838)
+      INVALID,    UNDEF, o1(0xC6), o1(0xE6),
+     o1(0xC5), o1(0xE5), o1(0xD8), o1(0xF8),
+     o1(0xAB), o1(0xBB), o1(0xD5), o1(0xF5),
+     o1(0xA6), o1(0xB6), o1(0xA1), o1(0xB1),
+     o1(0xA9), o1(0xB9), o1(0xAC), o1(0xBC),
+
+#define to_ISO_8859_3_C4 WORDINDEX2INFO(858)
+    to_ISO_8859_3_C4_offsets,
+    to_ISO_8859_3_C4_infos,
+
+#define to_ISO_8859_3_C5_infos WORDINDEX2INFO(860)
+      INVALID,    UNDEF, o1(0xDE), o1(0xFE),
+     o1(0xAA), o1(0xBA), o1(0xDD), o1(0xFD),
+     o1(0xAF), o1(0xBF),
+
+#define to_ISO_8859_3_C5 WORDINDEX2INFO(870)
+    to_ISO_8859_3_C5_offsets,
+    to_ISO_8859_3_C5_infos,
+
+#define to_ISO_8859_3_CB_infos WORDINDEX2INFO(872)
+      INVALID,    UNDEF, o1(0xA2), o1(0xFF),
+
+#define to_ISO_8859_3_CB WORDINDEX2INFO(876)
+    to_ISO_8859_3_CB_offsets,
+    to_ISO_8859_3_CB_infos,
+
+#define to_ISO_8859_3_infos WORDINDEX2INFO(878)
+                NOMAP,          INVALID, to_ISO_8859_3_C2, to_ISO_8859_3_C3,
+     to_ISO_8859_3_C4, to_ISO_8859_3_C5,   to_US_ASCII_C2, to_ISO_8859_3_CB,
+       to_US_ASCII_E0,   to_US_ASCII_E1,   to_US_ASCII_ED,   to_US_ASCII_F0,
+       to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_3 WORDINDEX2INFO(892)
+    to_ISO_8859_2_offsets,
+    to_ISO_8859_3_infos,
+
+#define from_ISO_8859_4_infos WORDINDEX2INFO(894)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0), o2(0xC4,0x84), o2(0xC4,0xB8),
+     o2(0xC5,0x96), o2(0xC2,0xA4), o2(0xC4,0xA8), o2(0xC4,0xBB),
+     o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC5,0xA0), o2(0xC4,0x92),
+     o2(0xC4,0xA2), o2(0xC5,0xA6), o2(0xC2,0xAD), o2(0xC5,0xBD),
+     o2(0xC2,0xAF), o2(0xC2,0xB0), o2(0xC4,0x85), o2(0xCB,0x9B),
+     o2(0xC5,0x97), o2(0xC2,0xB4), o2(0xC4,0xA9), o2(0xC4,0xBC),
+     o2(0xCB,0x87), o2(0xC2,0xB8), o2(0xC5,0xA1), o2(0xC4,0x93),
+     o2(0xC4,0xA3), o2(0xC5,0xA7), o2(0xC5,0x8A), o2(0xC5,0xBE),
+     o2(0xC5,0x8B), o2(0xC4,0x80), o2(0xC3,0x81), o2(0xC3,0x82),
+     o2(0xC3,0x83), o2(0xC3,0x84), o2(0xC3,0x85), o2(0xC3,0x86),
+     o2(0xC4,0xAE), o2(0xC4,0x8C), o2(0xC3,0x89), o2(0xC4,0x98),
+     o2(0xC3,0x8B), o2(0xC4,0x96), o2(0xC3,0x8D), o2(0xC3,0x8E),
+     o2(0xC4,0xAA), o2(0xC4,0x90), o2(0xC5,0x85), o2(0xC5,0x8C),
+     o2(0xC4,0xB6), o2(0xC3,0x94), o2(0xC3,0x95), o2(0xC3,0x96),
+     o2(0xC3,0x97), o2(0xC3,0x98), o2(0xC5,0xB2), o2(0xC3,0x9A),
+     o2(0xC3,0x9B), o2(0xC3,0x9C), o2(0xC5,0xA8), o2(0xC5,0xAA),
+     o2(0xC3,0x9F), o2(0xC4,0x81), o2(0xC3,0xA1), o2(0xC3,0xA2),
+     o2(0xC3,0xA3), o2(0xC3,0xA4), o2(0xC3,0xA5), o2(0xC3,0xA6),
+     o2(0xC4,0xAF), o2(0xC4,0x8D), o2(0xC3,0xA9), o2(0xC4,0x99),
+     o2(0xC3,0xAB), o2(0xC4,0x97), o2(0xC3,0xAD), o2(0xC3,0xAE),
+     o2(0xC4,0xAB), o2(0xC4,0x91), o2(0xC5,0x86), o2(0xC5,0x8D),
+     o2(0xC4,0xB7), o2(0xC3,0xB4), o2(0xC3,0xB5), o2(0xC3,0xB6),
+     o2(0xC3,0xB7), o2(0xC3,0xB8), o2(0xC5,0xB3), o2(0xC3,0xBA),
+     o2(0xC3,0xBB), o2(0xC3,0xBC), o2(0xC5,0xA9), o2(0xC5,0xAB),
+     o2(0xCB,0x99),
+
+#define from_ISO_8859_4 WORDINDEX2INFO(1023)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_4_infos,
+
+#define to_ISO_8859_4_C2_infos WORDINDEX2INFO(1025)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA4),
+     o1(0xA7), o1(0xA8), o1(0xAD), o1(0xAF),
+     o1(0xB0), o1(0xB4), o1(0xB8),
+
+#define to_ISO_8859_4_C2 WORDINDEX2INFO(1068)
+    to_ISO_8859_4_C2_offsets,
+    to_ISO_8859_4_C2_infos,
+
+#define to_ISO_8859_4_C3_infos WORDINDEX2INFO(1070)
+      INVALID,    UNDEF, o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC9), o1(0xCB), o1(0xCD), o1(0xCE),
+     o1(0xD4), o1(0xD5), o1(0xD6), o1(0xD7),
+     o1(0xD8), o1(0xDA), o1(0xDB), o1(0xDC),
+     o1(0xDF), o1(0xE1), o1(0xE2), o1(0xE3),
+     o1(0xE4), o1(0xE5), o1(0xE6), o1(0xE9),
+     o1(0xEB), o1(0xED), o1(0xEE), o1(0xF4),
+     o1(0xF5), o1(0xF6), o1(0xF7), o1(0xF8),
+     o1(0xFA), o1(0xFB), o1(0xFC),
+
+#define to_ISO_8859_4_C3 WORDINDEX2INFO(1109)
+    to_ISO_8859_4_C3_offsets,
+    to_ISO_8859_4_C3_infos,
+
+#define to_ISO_8859_4_C4_infos WORDINDEX2INFO(1111)
+      INVALID, o1(0xC0), o1(0xE0),    UNDEF,
+     o1(0xA1), o1(0xB1), o1(0xC8), o1(0xE8),
+     o1(0xD0), o1(0xF0), o1(0xAA), o1(0xBA),
+     o1(0xCC), o1(0xEC), o1(0xCA), o1(0xEA),
+     o1(0xAB), o1(0xBB), o1(0xA5), o1(0xB5),
+     o1(0xCF), o1(0xEF), o1(0xC7), o1(0xE7),
+     o1(0xD3), o1(0xF3), o1(0xA2), o1(0xA6),
+     o1(0xB6),
+
+#define to_ISO_8859_4_C4 WORDINDEX2INFO(1140)
+    to_ISO_8859_4_C4_offsets,
+    to_ISO_8859_4_C4_infos,
+
+#define to_ISO_8859_4_C5_infos WORDINDEX2INFO(1142)
+      INVALID,    UNDEF, o1(0xD1), o1(0xF1),
+     o1(0xBD), o1(0xBF), o1(0xD2), o1(0xF2),
+     o1(0xA3), o1(0xB3), o1(0xA9), o1(0xB9),
+     o1(0xAC), o1(0xBC), o1(0xDD), o1(0xFD),
+     o1(0xDE), o1(0xFE), o1(0xD9), o1(0xF9),
+     o1(0xAE), o1(0xBE),
+
+#define to_ISO_8859_4_C5 WORDINDEX2INFO(1164)
+    to_ISO_8859_4_C5_offsets,
+    to_ISO_8859_4_C5_infos,
+
+#define to_ISO_8859_4_CB_infos WORDINDEX2INFO(1166)
+      INVALID,    UNDEF, o1(0xB7), o1(0xFF),
+     o1(0xB2),
+
+#define to_ISO_8859_4_CB WORDINDEX2INFO(1171)
+    to_ISO_8859_4_CB_offsets,
+    to_ISO_8859_4_CB_infos,
+
+#define to_ISO_8859_4_infos WORDINDEX2INFO(1173)
+                NOMAP,          INVALID, to_ISO_8859_4_C2, to_ISO_8859_4_C3,
+     to_ISO_8859_4_C4, to_ISO_8859_4_C5,   to_US_ASCII_C2, to_ISO_8859_4_CB,
+       to_US_ASCII_E0,   to_US_ASCII_E1,   to_US_ASCII_ED,   to_US_ASCII_F0,
+       to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_4 WORDINDEX2INFO(1187)
+    to_ISO_8859_2_offsets,
+    to_ISO_8859_4_infos,
+
+#define from_ISO_8859_5_infos WORDINDEX2INFO(1189)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+          o2(0xD0,0x81),      o2(0xD0,0x82),
+          o2(0xD0,0x83),      o2(0xD0,0x84),
+          o2(0xD0,0x85),      o2(0xD0,0x86),
+          o2(0xD0,0x87),      o2(0xD0,0x88),
+          o2(0xD0,0x89),      o2(0xD0,0x8A),
+          o2(0xD0,0x8B),      o2(0xD0,0x8C),
+          o2(0xC2,0xAD),      o2(0xD0,0x8E),
+          o2(0xD0,0x8F),      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x96),
+          o2(0xD0,0x97),      o2(0xD0,0x98),
+          o2(0xD0,0x99),      o2(0xD0,0x9A),
+          o2(0xD0,0x9B),      o2(0xD0,0x9C),
+          o2(0xD0,0x9D),      o2(0xD0,0x9E),
+          o2(0xD0,0x9F),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0xA4),
+          o2(0xD0,0xA5),      o2(0xD0,0xA6),
+          o2(0xD0,0xA7),      o2(0xD0,0xA8),
+          o2(0xD0,0xA9),      o2(0xD0,0xAA),
+          o2(0xD0,0xAB),      o2(0xD0,0xAC),
+          o2(0xD0,0xAD),      o2(0xD0,0xAE),
+          o2(0xD0,0xAF),      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD0,0xB6),
+          o2(0xD0,0xB7),      o2(0xD0,0xB8),
+          o2(0xD0,0xB9),      o2(0xD0,0xBA),
+          o2(0xD0,0xBB),      o2(0xD0,0xBC),
+          o2(0xD0,0xBD),      o2(0xD0,0xBE),
+          o2(0xD0,0xBF),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD1,0x84),
+          o2(0xD1,0x85),      o2(0xD1,0x86),
+          o2(0xD1,0x87),      o2(0xD1,0x88),
+          o2(0xD1,0x89),      o2(0xD1,0x8A),
+          o2(0xD1,0x8B),      o2(0xD1,0x8C),
+          o2(0xD1,0x8D),      o2(0xD1,0x8E),
+          o2(0xD1,0x8F), o3(0xE2,0x84,0x96),
+          o2(0xD1,0x91),      o2(0xD1,0x92),
+          o2(0xD1,0x93),      o2(0xD1,0x94),
+          o2(0xD1,0x95),      o2(0xD1,0x96),
+          o2(0xD1,0x97),      o2(0xD1,0x98),
+          o2(0xD1,0x99),      o2(0xD1,0x9A),
+          o2(0xD1,0x9B),      o2(0xD1,0x9C),
+          o2(0xC2,0xA7),      o2(0xD1,0x9E),
+          o2(0xD1,0x9F),
+
+#define from_ISO_8859_5 WORDINDEX2INFO(1318)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_5_infos,
+
+#define to_ISO_8859_5_C2_infos WORDINDEX2INFO(1320)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xFD),
+     o1(0xAD),
+
+#define to_ISO_8859_5_C2 WORDINDEX2INFO(1357)
+    to_ISO_8859_5_C2_offsets,
+    to_ISO_8859_5_C2_infos,
+
+#define to_ISO_8859_5_D0_infos WORDINDEX2INFO(1359)
+      INVALID,    UNDEF, o1(0xA1), o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAA),
+     o1(0xAB), o1(0xAC), o1(0xAE), o1(0xAF),
+     o1(0xB0), o1(0xB1), o1(0xB2), o1(0xB3),
+     o1(0xB4), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xB9), o1(0xBA), o1(0xBB),
+     o1(0xBC), o1(0xBD), o1(0xBE), o1(0xBF),
+     o1(0xC0), o1(0xC1), o1(0xC2), o1(0xC3),
+     o1(0xC4), o1(0xC5), o1(0xC6), o1(0xC7),
+     o1(0xC8), o1(0xC9), o1(0xCA), o1(0xCB),
+     o1(0xCC), o1(0xCD), o1(0xCE), o1(0xCF),
+     o1(0xD0), o1(0xD1), o1(0xD2), o1(0xD3),
+     o1(0xD4), o1(0xD5), o1(0xD6), o1(0xD7),
+     o1(0xD8), o1(0xD9), o1(0xDA), o1(0xDB),
+     o1(0xDC), o1(0xDD), o1(0xDE), o1(0xDF),
+
+#define to_ISO_8859_5_D0 WORDINDEX2INFO(1423)
+    to_ISO_8859_5_D0_offsets,
+    to_ISO_8859_5_D0_infos,
+
+#define to_ISO_8859_5_D1_infos WORDINDEX2INFO(1425)
+      INVALID, o1(0xE0), o1(0xE1), o1(0xE2),
+     o1(0xE3), o1(0xE4), o1(0xE5), o1(0xE6),
+     o1(0xE7), o1(0xE8), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF),    UNDEF, o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFE), o1(0xFF),
+
+#define to_ISO_8859_5_D1 WORDINDEX2INFO(1457)
+    to_ISO_8859_5_D1_offsets,
+    to_ISO_8859_5_D1_infos,
+
+#define to_ISO_8859_5_E2_84_infos WORDINDEX2INFO(1459)
+      INVALID,    UNDEF, o1(0xF0),
+
+#define to_ISO_8859_5_E2_84 WORDINDEX2INFO(1462)
+    to_ISO_8859_5_E2_84_offsets,
+    to_ISO_8859_5_E2_84_infos,
+
+#define to_ISO_8859_5_E2_infos WORDINDEX2INFO(1464)
+                 INVALID,      to_US_ASCII_C2,
+     to_ISO_8859_5_E2_84,
+
+#define to_ISO_8859_5_E2 WORDINDEX2INFO(1467)
+    to_ISO_8859_5_E2_offsets,
+    to_ISO_8859_5_E2_infos,
+
+#define to_ISO_8859_5_infos WORDINDEX2INFO(1469)
+                NOMAP,          INVALID, to_ISO_8859_5_C2,   to_US_ASCII_C2,
+     to_ISO_8859_5_D0, to_ISO_8859_5_D1,   to_US_ASCII_E0,   to_US_ASCII_E1,
+     to_ISO_8859_5_E2,   to_US_ASCII_ED,   to_US_ASCII_F0,   to_US_ASCII_F1,
+       to_US_ASCII_F4,
+
+#define to_ISO_8859_5 WORDINDEX2INFO(1482)
+    to_ISO_8859_5_offsets,
+    to_ISO_8859_5_infos,
+
+#define from_ISO_8859_6_infos WORDINDEX2INFO(1484)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0),         UNDEF, o2(0xC2,0xA4),
+     o2(0xD8,0x8C), o2(0xC2,0xAD), o2(0xD8,0x9B), o2(0xD8,0x9F),
+     o2(0xD8,0xA1), o2(0xD8,0xA2), o2(0xD8,0xA3), o2(0xD8,0xA4),
+     o2(0xD8,0xA5), o2(0xD8,0xA6), o2(0xD8,0xA7), o2(0xD8,0xA8),
+     o2(0xD8,0xA9), o2(0xD8,0xAA), o2(0xD8,0xAB), o2(0xD8,0xAC),
+     o2(0xD8,0xAD), o2(0xD8,0xAE), o2(0xD8,0xAF), o2(0xD8,0xB0),
+     o2(0xD8,0xB1), o2(0xD8,0xB2), o2(0xD8,0xB3), o2(0xD8,0xB4),
+     o2(0xD8,0xB5), o2(0xD8,0xB6), o2(0xD8,0xB7), o2(0xD8,0xB8),
+     o2(0xD8,0xB9), o2(0xD8,0xBA), o2(0xD9,0x80), o2(0xD9,0x81),
+     o2(0xD9,0x82), o2(0xD9,0x83), o2(0xD9,0x84), o2(0xD9,0x85),
+     o2(0xD9,0x86), o2(0xD9,0x87), o2(0xD9,0x88), o2(0xD9,0x89),
+     o2(0xD9,0x8A), o2(0xD9,0x8B), o2(0xD9,0x8C), o2(0xD9,0x8D),
+     o2(0xD9,0x8E), o2(0xD9,0x8F), o2(0xD9,0x90), o2(0xD9,0x91),
+     o2(0xD9,0x92),
+
+#define from_ISO_8859_6 WORDINDEX2INFO(1569)
+    from_ISO_8859_6_offsets,
+    from_ISO_8859_6_infos,
+
+#define to_ISO_8859_6_C2_infos WORDINDEX2INFO(1571)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA4),
+     o1(0xAD),
+
+#define to_ISO_8859_6_C2 WORDINDEX2INFO(1608)
+    to_ISO_8859_6_C2_offsets,
+    to_ISO_8859_6_C2_infos,
+
+#define to_ISO_8859_6_D8_infos WORDINDEX2INFO(1610)
+      INVALID,    UNDEF, o1(0xAC), o1(0xBB),
+     o1(0xBF), o1(0xC1), o1(0xC2), o1(0xC3),
+     o1(0xC4), o1(0xC5), o1(0xC6), o1(0xC7),
+     o1(0xC8), o1(0xC9), o1(0xCA), o1(0xCB),
+     o1(0xCC), o1(0xCD), o1(0xCE), o1(0xCF),
+     o1(0xD0), o1(0xD1), o1(0xD2), o1(0xD3),
+     o1(0xD4), o1(0xD5), o1(0xD6), o1(0xD7),
+     o1(0xD8), o1(0xD9), o1(0xDA),
+
+#define to_ISO_8859_6_D8 WORDINDEX2INFO(1641)
+    to_ISO_8859_6_D8_offsets,
+    to_ISO_8859_6_D8_infos,
+
+#define to_ISO_8859_6_D9_infos WORDINDEX2INFO(1643)
+      INVALID, o1(0xE0), o1(0xE1), o1(0xE2),
+     o1(0xE3), o1(0xE4), o1(0xE5), o1(0xE6),
+     o1(0xE7), o1(0xE8), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF), o1(0xF0), o1(0xF1), o1(0xF2),
+        UNDEF,
+
+#define to_ISO_8859_6_D9 WORDINDEX2INFO(1664)
+    to_ISO_8859_6_D9_offsets,
+    to_ISO_8859_6_D9_infos,
+
+#define to_ISO_8859_6_infos WORDINDEX2INFO(1666)
+                NOMAP,          INVALID, to_ISO_8859_6_C2,   to_US_ASCII_C2,
+     to_ISO_8859_6_D8, to_ISO_8859_6_D9,   to_US_ASCII_E0,   to_US_ASCII_E1,
+       to_US_ASCII_ED,   to_US_ASCII_F0,   to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_6 WORDINDEX2INFO(1678)
+    to_ISO_8859_6_offsets,
+    to_ISO_8859_6_infos,
+
+#define from_ISO_8859_7_infos WORDINDEX2INFO(1680)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+          o2(0xC2,0xA3), o3(0xE2,0x82,0xAC),
+     o3(0xE2,0x82,0xAF),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xCD,0xBA),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),              UNDEF,
+     o3(0xE2,0x80,0x95),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xCE,0x84),
+          o2(0xCE,0x85),      o2(0xCE,0x86),
+          o2(0xC2,0xB7),      o2(0xCE,0x88),
+          o2(0xCE,0x89),      o2(0xCE,0x8A),
+          o2(0xC2,0xBB),      o2(0xCE,0x8C),
+          o2(0xC2,0xBD),      o2(0xCE,0x8E),
+          o2(0xCE,0x8F),      o2(0xCE,0x90),
+          o2(0xCE,0x91),      o2(0xCE,0x92),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x95),      o2(0xCE,0x96),
+          o2(0xCE,0x97),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9B),      o2(0xCE,0x9C),
+          o2(0xCE,0x9D),      o2(0xCE,0x9E),
+          o2(0xCE,0x9F),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1),      o2(0xCE,0xA3),
+          o2(0xCE,0xA4),      o2(0xCE,0xA5),
+          o2(0xCE,0xA6),      o2(0xCE,0xA7),
+          o2(0xCE,0xA8),      o2(0xCE,0xA9),
+          o2(0xCE,0xAA),      o2(0xCE,0xAB),
+          o2(0xCE,0xAC),      o2(0xCE,0xAD),
+          o2(0xCE,0xAE),      o2(0xCE,0xAF),
+          o2(0xCE,0xB0),      o2(0xCE,0xB1),
+          o2(0xCE,0xB2),      o2(0xCE,0xB3),
+          o2(0xCE,0xB4),      o2(0xCE,0xB5),
+          o2(0xCE,0xB6),      o2(0xCE,0xB7),
+          o2(0xCE,0xB8),      o2(0xCE,0xB9),
+          o2(0xCE,0xBA),      o2(0xCE,0xBB),
+          o2(0xCE,0xBC),      o2(0xCE,0xBD),
+          o2(0xCE,0xBE),      o2(0xCE,0xBF),
+          o2(0xCF,0x80),      o2(0xCF,0x81),
+          o2(0xCF,0x82),      o2(0xCF,0x83),
+          o2(0xCF,0x84),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xCF,0x88),      o2(0xCF,0x89),
+          o2(0xCF,0x8A),      o2(0xCF,0x8B),
+          o2(0xCF,0x8C),      o2(0xCF,0x8D),
+          o2(0xCF,0x8E),
+
+#define from_ISO_8859_7 WORDINDEX2INFO(1807)
+    from_ISO_8859_7_offsets,
+    from_ISO_8859_7_infos,
+
+#define to_ISO_8859_7_C2_infos WORDINDEX2INFO(1809)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA3),
+     o1(0xA6), o1(0xA7), o1(0xA8), o1(0xA9),
+     o1(0xAB), o1(0xAC), o1(0xAD), o1(0xB0),
+     o1(0xB1), o1(0xB2), o1(0xB3), o1(0xB7),
+     o1(0xBB), o1(0xBD),
+
+#define to_ISO_8859_7_C2 WORDINDEX2INFO(1859)
+    to_ISO_8859_7_C2_offsets,
+    to_ISO_8859_7_C2_infos,
+
+#define to_ISO_8859_7_CD_infos WORDINDEX2INFO(1861)
+      INVALID,    UNDEF, o1(0xAA),
+
+#define to_ISO_8859_7_CD WORDINDEX2INFO(1864)
+    to_ISO_8859_7_CD_offsets,
+    to_ISO_8859_7_CD_infos,
+
+#define to_ISO_8859_7_CE_infos WORDINDEX2INFO(1866)
+      INVALID,    UNDEF, o1(0xB4), o1(0xB5),
+     o1(0xB6), o1(0xB8), o1(0xB9), o1(0xBA),
+     o1(0xBC), o1(0xBE), o1(0xBF), o1(0xC0),
+     o1(0xC1), o1(0xC2), o1(0xC3), o1(0xC4),
+     o1(0xC5), o1(0xC6), o1(0xC7), o1(0xC8),
+     o1(0xC9), o1(0xCA), o1(0xCB), o1(0xCC),
+     o1(0xCD), o1(0xCE), o1(0xCF), o1(0xD0),
+     o1(0xD1), o1(0xD3), o1(0xD4), o1(0xD5),
+     o1(0xD6), o1(0xD7), o1(0xD8), o1(0xD9),
+     o1(0xDA), o1(0xDB), o1(0xDC), o1(0xDD),
+     o1(0xDE), o1(0xDF), o1(0xE0), o1(0xE1),
+     o1(0xE2), o1(0xE3), o1(0xE4), o1(0xE5),
+     o1(0xE6), o1(0xE7), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEF),
+
+#define to_ISO_8859_7_CE WORDINDEX2INFO(1924)
+    to_ISO_8859_7_CE_offsets,
+    to_ISO_8859_7_CE_infos,
+
+#define to_ISO_8859_7_CF_infos WORDINDEX2INFO(1926)
+      INVALID, o1(0xF0), o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFD), o1(0xFE),
+        UNDEF,
+
+#define to_ISO_8859_7_CF WORDINDEX2INFO(1943)
+    to_ISO_8859_7_CF_offsets,
+    to_ISO_8859_7_CF_infos,
+
+#define to_ISO_8859_7_E2_80_infos WORDINDEX2INFO(1945)
+      INVALID,    UNDEF, o1(0xAF), o1(0xA1),
+     o1(0xA2),
+
+#define to_ISO_8859_7_E2_80 WORDINDEX2INFO(1950)
+    to_ISO_8859_7_E2_80_offsets,
+    to_ISO_8859_7_E2_80_infos,
+
+#define to_ISO_8859_7_E2_82_infos WORDINDEX2INFO(1952)
+      INVALID,    UNDEF, o1(0xA4), o1(0xA5),
+
+#define to_ISO_8859_7_E2_82 WORDINDEX2INFO(1956)
+    to_ISO_8859_7_E2_82_offsets,
+    to_ISO_8859_7_E2_82_infos,
+
+#define to_ISO_8859_7_E2_infos WORDINDEX2INFO(1958)
+                 INVALID, to_ISO_8859_7_E2_80,
+          to_US_ASCII_C2, to_ISO_8859_7_E2_82,
+
+#define to_ISO_8859_7_E2 WORDINDEX2INFO(1962)
+    to_ISO_8859_7_E2_offsets,
+    to_ISO_8859_7_E2_infos,
+
+#define to_ISO_8859_7_infos WORDINDEX2INFO(1964)
+                NOMAP,          INVALID, to_ISO_8859_7_C2,   to_US_ASCII_C2,
+     to_ISO_8859_7_CD, to_ISO_8859_7_CE, to_ISO_8859_7_CF,   to_US_ASCII_E0,
+       to_US_ASCII_E1, to_ISO_8859_7_E2,   to_US_ASCII_ED,   to_US_ASCII_F0,
+       to_US_ASCII_F1,   to_US_ASCII_F4,
+
+#define to_ISO_8859_7 WORDINDEX2INFO(1978)
+    to_ISO_8859_7_offsets,
+    to_ISO_8859_7_infos,
+
+#define from_ISO_8859_8_infos WORDINDEX2INFO(1980)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+                  UNDEF,      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+          o2(0xC2,0xA5),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xC3,0x97),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC2,0xAF),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xC2,0xB4),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC2,0xB8),
+          o2(0xC2,0xB9),      o2(0xC3,0xB7),
+          o2(0xC2,0xBB),      o2(0xC2,0xBC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBE),
+     o3(0xE2,0x80,0x97),      o2(0xD7,0x90),
+          o2(0xD7,0x91),      o2(0xD7,0x92),
+          o2(0xD7,0x93),      o2(0xD7,0x94),
+          o2(0xD7,0x95),      o2(0xD7,0x96),
+          o2(0xD7,0x97),      o2(0xD7,0x98),
+          o2(0xD7,0x99),      o2(0xD7,0x9A),
+          o2(0xD7,0x9B),      o2(0xD7,0x9C),
+          o2(0xD7,0x9D),      o2(0xD7,0x9E),
+          o2(0xD7,0x9F),      o2(0xD7,0xA0),
+          o2(0xD7,0xA1),      o2(0xD7,0xA2),
+          o2(0xD7,0xA3),      o2(0xD7,0xA4),
+          o2(0xD7,0xA5),      o2(0xD7,0xA6),
+          o2(0xD7,0xA7),      o2(0xD7,0xA8),
+          o2(0xD7,0xA9),      o2(0xD7,0xAA),
+     o3(0xE2,0x80,0x8E), o3(0xE2,0x80,0x8F),
+
+#define from_ISO_8859_8 WORDINDEX2INFO(2074)
+    from_ISO_8859_8_offsets,
+    from_ISO_8859_8_infos,
+
+#define to_ISO_8859_8_C2_infos WORDINDEX2INFO(2076)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAB),
+     o1(0xAC), o1(0xAD), o1(0xAE), o1(0xAF),
+     o1(0xB0), o1(0xB1), o1(0xB2), o1(0xB3),
+     o1(0xB4), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xB9), o1(0xBB), o1(0xBC),
+     o1(0xBD), o1(0xBE),
+
+#define to_ISO_8859_8_C2 WORDINDEX2INFO(2138)
+    to_ISO_8859_8_C2_offsets,
+    to_ISO_8859_8_C2_infos,
+
+#define to_ISO_8859_8_C3_infos WORDINDEX2INFO(2140)
+      INVALID,    UNDEF, o1(0xAA), o1(0xBA),
+
+#define to_ISO_8859_8_C3 WORDINDEX2INFO(2144)
+    to_ISO_8859_8_C3_offsets,
+    to_ISO_8859_8_C3_infos,
+
+#define to_ISO_8859_8_D7_infos WORDINDEX2INFO(2146)
+      INVALID,    UNDEF, o1(0xE0), o1(0xE1),
+     o1(0xE2), o1(0xE3), o1(0xE4), o1(0xE5),
+     o1(0xE6), o1(0xE7), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEF), o1(0xF0), o1(0xF1),
+     o1(0xF2), o1(0xF3), o1(0xF4), o1(0xF5),
+     o1(0xF6), o1(0xF7), o1(0xF8), o1(0xF9),
+     o1(0xFA),
+
+#define to_ISO_8859_8_D7 WORDINDEX2INFO(2175)
+    to_ISO_8859_8_D7_offsets,
+    to_ISO_8859_8_D7_infos,
+
+#define to_ISO_8859_8_E2_80_infos WORDINDEX2INFO(2177)
+      INVALID,    UNDEF, o1(0xFD), o1(0xFE),
+     o1(0xDF),
+
+#define to_ISO_8859_8_E2_80 WORDINDEX2INFO(2182)
+    to_ISO_8859_8_E2_80_offsets,
+    to_ISO_8859_8_E2_80_infos,
+
+#define to_ISO_8859_8_E2_infos WORDINDEX2INFO(2184)
+                 INVALID, to_ISO_8859_8_E2_80,
+          to_US_ASCII_C2,
+
+#define to_ISO_8859_8_E2 WORDINDEX2INFO(2187)
+    to_ISO_8859_8_E2_offsets,
+    to_ISO_8859_8_E2_infos,
+
+#define to_ISO_8859_8_infos WORDINDEX2INFO(2189)
+                NOMAP,          INVALID, to_ISO_8859_8_C2, to_ISO_8859_8_C3,
+       to_US_ASCII_C2, to_ISO_8859_8_D7,   to_US_ASCII_E0,   to_US_ASCII_E1,
+     to_ISO_8859_8_E2,   to_US_ASCII_ED,   to_US_ASCII_F0,   to_US_ASCII_F1,
+       to_US_ASCII_F4,
+
+#define to_ISO_8859_8 WORDINDEX2INFO(2202)
+    to_ISO_8859_8_offsets,
+    to_ISO_8859_8_infos,
+
+#define from_ISO_8859_9_infos WORDINDEX2INFO(2204)
+             NOMAP, o2(0xC2,0x80), o2(0xC2,0x81), o2(0xC2,0x82),
+     o2(0xC2,0x83), o2(0xC2,0x84), o2(0xC2,0x85), o2(0xC2,0x86),
+     o2(0xC2,0x87), o2(0xC2,0x88), o2(0xC2,0x89), o2(0xC2,0x8A),
+     o2(0xC2,0x8B), o2(0xC2,0x8C), o2(0xC2,0x8D), o2(0xC2,0x8E),
+     o2(0xC2,0x8F), o2(0xC2,0x90), o2(0xC2,0x91), o2(0xC2,0x92),
+     o2(0xC2,0x93), o2(0xC2,0x94), o2(0xC2,0x95), o2(0xC2,0x96),
+     o2(0xC2,0x97), o2(0xC2,0x98), o2(0xC2,0x99), o2(0xC2,0x9A),
+     o2(0xC2,0x9B), o2(0xC2,0x9C), o2(0xC2,0x9D), o2(0xC2,0x9E),
+     o2(0xC2,0x9F), o2(0xC2,0xA0), o2(0xC2,0xA1), o2(0xC2,0xA2),
+     o2(0xC2,0xA3), o2(0xC2,0xA4), o2(0xC2,0xA5), o2(0xC2,0xA6),
+     o2(0xC2,0xA7), o2(0xC2,0xA8), o2(0xC2,0xA9), o2(0xC2,0xAA),
+     o2(0xC2,0xAB), o2(0xC2,0xAC), o2(0xC2,0xAD), o2(0xC2,0xAE),
+     o2(0xC2,0xAF), o2(0xC2,0xB0), o2(0xC2,0xB1), o2(0xC2,0xB2),
+     o2(0xC2,0xB3), o2(0xC2,0xB4), o2(0xC2,0xB5), o2(0xC2,0xB6),
+     o2(0xC2,0xB7), o2(0xC2,0xB8), o2(0xC2,0xB9), o2(0xC2,0xBA),
+     o2(0xC2,0xBB), o2(0xC2,0xBC), o2(0xC2,0xBD), o2(0xC2,0xBE),
+     o2(0xC2,0xBF), o2(0xC3,0x80), o2(0xC3,0x81), o2(0xC3,0x82),
+     o2(0xC3,0x83), o2(0xC3,0x84), o2(0xC3,0x85), o2(0xC3,0x86),
+     o2(0xC3,0x87), o2(0xC3,0x88), o2(0xC3,0x89), o2(0xC3,0x8A),
+     o2(0xC3,0x8B), o2(0xC3,0x8C), o2(0xC3,0x8D), o2(0xC3,0x8E),
+     o2(0xC3,0x8F), o2(0xC4,0x9E), o2(0xC3,0x91), o2(0xC3,0x92),
+     o2(0xC3,0x93), o2(0xC3,0x94), o2(0xC3,0x95), o2(0xC3,0x96),
+     o2(0xC3,0x97), o2(0xC3,0x98), o2(0xC3,0x99), o2(0xC3,0x9A),
+     o2(0xC3,0x9B), o2(0xC3,0x9C), o2(0xC4,0xB0), o2(0xC5,0x9E),
+     o2(0xC3,0x9F), o2(0xC3,0xA0), o2(0xC3,0xA1), o2(0xC3,0xA2),
+     o2(0xC3,0xA3), o2(0xC3,0xA4), o2(0xC3,0xA5), o2(0xC3,0xA6),
+     o2(0xC3,0xA7), o2(0xC3,0xA8), o2(0xC3,0xA9), o2(0xC3,0xAA),
+     o2(0xC3,0xAB), o2(0xC3,0xAC), o2(0xC3,0xAD), o2(0xC3,0xAE),
+     o2(0xC3,0xAF), o2(0xC4,0x9F), o2(0xC3,0xB1), o2(0xC3,0xB2),
+     o2(0xC3,0xB3), o2(0xC3,0xB4), o2(0xC3,0xB5), o2(0xC3,0xB6),
+     o2(0xC3,0xB7), o2(0xC3,0xB8), o2(0xC3,0xB9), o2(0xC3,0xBA),
+     o2(0xC3,0xBB), o2(0xC3,0xBC), o2(0xC4,0xB1), o2(0xC5,0x9F),
+     o2(0xC3,0xBF),
+
+#define from_ISO_8859_9 WORDINDEX2INFO(2333)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_9_infos,
+
+#define to_ISO_8859_9_C3_infos WORDINDEX2INFO(2335)
+      INVALID, o1(0xC0), o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC7), o1(0xC8), o1(0xC9), o1(0xCA),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF),    UNDEF, o1(0xD1), o1(0xD2),
+     o1(0xD3), o1(0xD4), o1(0xD5), o1(0xD6),
+     o1(0xD7), o1(0xD8), o1(0xD9), o1(0xDA),
+     o1(0xDB), o1(0xDC), o1(0xDF), o1(0xE0),
+     o1(0xE1), o1(0xE2), o1(0xE3), o1(0xE4),
+     o1(0xE5), o1(0xE6), o1(0xE7), o1(0xE8),
+     o1(0xE9), o1(0xEA), o1(0xEB), o1(0xEC),
+     o1(0xED), o1(0xEE), o1(0xEF), o1(0xF1),
+     o1(0xF2), o1(0xF3), o1(0xF4), o1(0xF5),
+     o1(0xF6), o1(0xF7), o1(0xF8), o1(0xF9),
+     o1(0xFA), o1(0xFB), o1(0xFC), o1(0xFF),
+
+#define to_ISO_8859_9_C3 WORDINDEX2INFO(2395)
+    to_ISO_8859_9_C3_offsets,
+    to_ISO_8859_9_C3_infos,
+
+#define to_ISO_8859_9_C4_infos WORDINDEX2INFO(2397)
+      INVALID,    UNDEF, o1(0xD0), o1(0xF0),
+     o1(0xDD), o1(0xFD),
+
+#define to_ISO_8859_9_C4 WORDINDEX2INFO(2403)
+    to_ISO_8859_9_C4_offsets,
+    to_ISO_8859_9_C4_infos,
+
+#define to_ISO_8859_9_C5_infos WORDINDEX2INFO(2405)
+      INVALID,    UNDEF, o1(0xDE), o1(0xFE),
+
+#define to_ISO_8859_9_C5 WORDINDEX2INFO(2409)
+    to_ISO_8859_9_C5_offsets,
+    to_ISO_8859_9_C5_infos,
+
+#define to_ISO_8859_9_infos WORDINDEX2INFO(2411)
+                NOMAP,          INVALID, to_ISO_8859_1_C2, to_ISO_8859_9_C3,
+     to_ISO_8859_9_C4, to_ISO_8859_9_C5,   to_US_ASCII_C2,   to_US_ASCII_E0,
+       to_US_ASCII_E1,   to_US_ASCII_ED,   to_US_ASCII_F0,   to_US_ASCII_F1,
+       to_US_ASCII_F4,
+
+#define to_ISO_8859_9 WORDINDEX2INFO(2424)
+    to_ISO_8859_9_offsets,
+    to_ISO_8859_9_infos,
+
+#define from_ISO_8859_10_infos WORDINDEX2INFO(2426)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+          o2(0xC4,0x84),      o2(0xC4,0x92),
+          o2(0xC4,0xA2),      o2(0xC4,0xAA),
+          o2(0xC4,0xA8),      o2(0xC4,0xB6),
+          o2(0xC2,0xA7),      o2(0xC4,0xBB),
+          o2(0xC4,0x90),      o2(0xC5,0xA0),
+          o2(0xC5,0xA6),      o2(0xC5,0xBD),
+          o2(0xC2,0xAD),      o2(0xC5,0xAA),
+          o2(0xC5,0x8A),      o2(0xC2,0xB0),
+          o2(0xC4,0x85),      o2(0xC4,0x93),
+          o2(0xC4,0xA3),      o2(0xC4,0xAB),
+          o2(0xC4,0xA9),      o2(0xC4,0xB7),
+          o2(0xC2,0xB7),      o2(0xC4,0xBC),
+          o2(0xC4,0x91),      o2(0xC5,0xA1),
+          o2(0xC5,0xA7),      o2(0xC5,0xBE),
+     o3(0xE2,0x80,0x95),      o2(0xC5,0xAB),
+          o2(0xC5,0x8B),      o2(0xC4,0x80),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x83),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x86),
+          o2(0xC4,0xAE),      o2(0xC4,0x8C),
+          o2(0xC3,0x89),      o2(0xC4,0x98),
+          o2(0xC3,0x8B),      o2(0xC4,0x96),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC3,0x8F),      o2(0xC3,0x90),
+          o2(0xC5,0x85),      o2(0xC5,0x8C),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+          o2(0xC5,0xA8),      o2(0xC3,0x98),
+          o2(0xC5,0xB2),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x9C),
+          o2(0xC3,0x9D),      o2(0xC3,0x9E),
+          o2(0xC3,0x9F),      o2(0xC4,0x81),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC3,0xA3),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC3,0xA6),
+          o2(0xC4,0xAF),      o2(0xC4,0x8D),
+          o2(0xC3,0xA9),      o2(0xC4,0x99),
+          o2(0xC3,0xAB),      o2(0xC4,0x97),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB0),
+          o2(0xC5,0x86),      o2(0xC5,0x8D),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+          o2(0xC5,0xA9),      o2(0xC3,0xB8),
+          o2(0xC5,0xB3),      o2(0xC3,0xBA),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+          o2(0xC3,0xBD),      o2(0xC3,0xBE),
+          o2(0xC4,0xB8),
+
+#define from_ISO_8859_10 WORDINDEX2INFO(2555)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_10_infos,
+
+#define to_ISO_8859_10_C2_infos WORDINDEX2INFO(2557)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA7),
+     o1(0xAD), o1(0xB0), o1(0xB7),
+
+#define to_ISO_8859_10_C2 WORDINDEX2INFO(2596)
+    to_ISO_8859_10_C2_offsets,
+    to_ISO_8859_10_C2_infos,
+
+#define to_ISO_8859_10_C3_infos WORDINDEX2INFO(2598)
+      INVALID,    UNDEF, o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC9), o1(0xCB), o1(0xCD), o1(0xCE),
+     o1(0xCF), o1(0xD0), o1(0xD3), o1(0xD4),
+     o1(0xD5), o1(0xD6), o1(0xD8), o1(0xDA),
+     o1(0xDB), o1(0xDC), o1(0xDD), o1(0xDE),
+     o1(0xDF), o1(0xE1), o1(0xE2), o1(0xE3),
+     o1(0xE4), o1(0xE5), o1(0xE6), o1(0xE9),
+     o1(0xEB), o1(0xED), o1(0xEE), o1(0xEF),
+     o1(0xF0), o1(0xF3), o1(0xF4), o1(0xF5),
+     o1(0xF6), o1(0xF8), o1(0xFA), o1(0xFB),
+     o1(0xFC), o1(0xFD), o1(0xFE),
+
+#define to_ISO_8859_10_C3 WORDINDEX2INFO(2645)
+    to_ISO_8859_10_C3_offsets,
+    to_ISO_8859_10_C3_infos,
+
+#define to_ISO_8859_10_C4_infos WORDINDEX2INFO(2647)
+      INVALID, o1(0xC0), o1(0xE0),    UNDEF,
+     o1(0xA1), o1(0xB1), o1(0xC8), o1(0xE8),
+     o1(0xA9), o1(0xB9), o1(0xA2), o1(0xB2),
+     o1(0xCC), o1(0xEC), o1(0xCA), o1(0xEA),
+     o1(0xA3), o1(0xB3), o1(0xA5), o1(0xB5),
+     o1(0xA4), o1(0xB4), o1(0xC7), o1(0xE7),
+     o1(0xA6), o1(0xB6), o1(0xFF), o1(0xA8),
+     o1(0xB8),
+
+#define to_ISO_8859_10_C4 WORDINDEX2INFO(2676)
+    to_ISO_8859_4_C4_offsets,
+    to_ISO_8859_10_C4_infos,
+
+#define to_ISO_8859_10_C5_infos WORDINDEX2INFO(2678)
+      INVALID,    UNDEF, o1(0xD1), o1(0xF1),
+     o1(0xAF), o1(0xBF), o1(0xD2), o1(0xF2),
+     o1(0xAA), o1(0xBA), o1(0xAB), o1(0xBB),
+     o1(0xD7), o1(0xF7), o1(0xAE), o1(0xBE),
+     o1(0xD9), o1(0xF9), o1(0xAC), o1(0xBC),
+
+#define to_ISO_8859_10_C5 WORDINDEX2INFO(2698)
+    to_ISO_8859_10_C5_offsets,
+    to_ISO_8859_10_C5_infos,
+
+#define to_ISO_8859_10_E2_80_infos WORDINDEX2INFO(2700)
+      INVALID,    UNDEF, o1(0xBD),
+
+#define to_ISO_8859_10_E2_80 WORDINDEX2INFO(2703)
+    to_ISO_8859_10_E2_80_offsets,
+    to_ISO_8859_10_E2_80_infos,
+
+#define to_ISO_8859_10_E2_infos WORDINDEX2INFO(2705)
+                  INVALID, to_ISO_8859_10_E2_80,
+           to_US_ASCII_C2,
+
+#define to_ISO_8859_10_E2 WORDINDEX2INFO(2708)
+    to_ISO_8859_8_E2_offsets,
+    to_ISO_8859_10_E2_infos,
+
+#define to_ISO_8859_10_infos WORDINDEX2INFO(2710)
+                 NOMAP,           INVALID,
+     to_ISO_8859_10_C2, to_ISO_8859_10_C3,
+     to_ISO_8859_10_C4, to_ISO_8859_10_C5,
+        to_US_ASCII_C2,    to_US_ASCII_E0,
+        to_US_ASCII_E1, to_ISO_8859_10_E2,
+        to_US_ASCII_ED,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_ISO_8859_10 WORDINDEX2INFO(2724)
+    to_ISO_8859_10_offsets,
+    to_ISO_8859_10_infos,
+
+#define from_ISO_8859_11_infos WORDINDEX2INFO(2726)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+     o3(0xE0,0xB8,0x81), o3(0xE0,0xB8,0x82),
+     o3(0xE0,0xB8,0x83), o3(0xE0,0xB8,0x84),
+     o3(0xE0,0xB8,0x85), o3(0xE0,0xB8,0x86),
+     o3(0xE0,0xB8,0x87), o3(0xE0,0xB8,0x88),
+     o3(0xE0,0xB8,0x89), o3(0xE0,0xB8,0x8A),
+     o3(0xE0,0xB8,0x8B), o3(0xE0,0xB8,0x8C),
+     o3(0xE0,0xB8,0x8D), o3(0xE0,0xB8,0x8E),
+     o3(0xE0,0xB8,0x8F), o3(0xE0,0xB8,0x90),
+     o3(0xE0,0xB8,0x91), o3(0xE0,0xB8,0x92),
+     o3(0xE0,0xB8,0x93), o3(0xE0,0xB8,0x94),
+     o3(0xE0,0xB8,0x95), o3(0xE0,0xB8,0x96),
+     o3(0xE0,0xB8,0x97), o3(0xE0,0xB8,0x98),
+     o3(0xE0,0xB8,0x99), o3(0xE0,0xB8,0x9A),
+     o3(0xE0,0xB8,0x9B), o3(0xE0,0xB8,0x9C),
+     o3(0xE0,0xB8,0x9D), o3(0xE0,0xB8,0x9E),
+     o3(0xE0,0xB8,0x9F), o3(0xE0,0xB8,0xA0),
+     o3(0xE0,0xB8,0xA1), o3(0xE0,0xB8,0xA2),
+     o3(0xE0,0xB8,0xA3), o3(0xE0,0xB8,0xA4),
+     o3(0xE0,0xB8,0xA5), o3(0xE0,0xB8,0xA6),
+     o3(0xE0,0xB8,0xA7), o3(0xE0,0xB8,0xA8),
+     o3(0xE0,0xB8,0xA9), o3(0xE0,0xB8,0xAA),
+     o3(0xE0,0xB8,0xAB), o3(0xE0,0xB8,0xAC),
+     o3(0xE0,0xB8,0xAD), o3(0xE0,0xB8,0xAE),
+     o3(0xE0,0xB8,0xAF), o3(0xE0,0xB8,0xB0),
+     o3(0xE0,0xB8,0xB1), o3(0xE0,0xB8,0xB2),
+     o3(0xE0,0xB8,0xB3), o3(0xE0,0xB8,0xB4),
+     o3(0xE0,0xB8,0xB5), o3(0xE0,0xB8,0xB6),
+     o3(0xE0,0xB8,0xB7), o3(0xE0,0xB8,0xB8),
+     o3(0xE0,0xB8,0xB9), o3(0xE0,0xB8,0xBA),
+                  UNDEF, o3(0xE0,0xB8,0xBF),
+     o3(0xE0,0xB9,0x80), o3(0xE0,0xB9,0x81),
+     o3(0xE0,0xB9,0x82), o3(0xE0,0xB9,0x83),
+     o3(0xE0,0xB9,0x84), o3(0xE0,0xB9,0x85),
+     o3(0xE0,0xB9,0x86), o3(0xE0,0xB9,0x87),
+     o3(0xE0,0xB9,0x88), o3(0xE0,0xB9,0x89),
+     o3(0xE0,0xB9,0x8A), o3(0xE0,0xB9,0x8B),
+     o3(0xE0,0xB9,0x8C), o3(0xE0,0xB9,0x8D),
+     o3(0xE0,0xB9,0x8E), o3(0xE0,0xB9,0x8F),
+     o3(0xE0,0xB9,0x90), o3(0xE0,0xB9,0x91),
+     o3(0xE0,0xB9,0x92), o3(0xE0,0xB9,0x93),
+     o3(0xE0,0xB9,0x94), o3(0xE0,0xB9,0x95),
+     o3(0xE0,0xB9,0x96), o3(0xE0,0xB9,0x97),
+     o3(0xE0,0xB9,0x98), o3(0xE0,0xB9,0x99),
+     o3(0xE0,0xB9,0x9A), o3(0xE0,0xB9,0x9B),
+
+#define from_ISO_8859_11 WORDINDEX2INFO(2848)
+    from_ISO_8859_11_offsets,
+    from_ISO_8859_11_infos,
+
+#define to_ISO_8859_11_C2_infos WORDINDEX2INFO(2850)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF,
+
+#define to_ISO_8859_11_C2 WORDINDEX2INFO(2885)
+    to_ISO_8859_11_C2_offsets,
+    to_ISO_8859_11_C2_infos,
+
+#define to_ISO_8859_11_E0_B8_infos WORDINDEX2INFO(2887)
+      INVALID,    UNDEF, o1(0xA1), o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAA),
+     o1(0xAB), o1(0xAC), o1(0xAD), o1(0xAE),
+     o1(0xAF), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xB3), o1(0xB4), o1(0xB5), o1(0xB6),
+     o1(0xB7), o1(0xB8), o1(0xB9), o1(0xBA),
+     o1(0xBB), o1(0xBC), o1(0xBD), o1(0xBE),
+     o1(0xBF), o1(0xC0), o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC7), o1(0xC8), o1(0xC9), o1(0xCA),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF), o1(0xD0), o1(0xD1), o1(0xD2),
+     o1(0xD3), o1(0xD4), o1(0xD5), o1(0xD6),
+     o1(0xD7), o1(0xD8), o1(0xD9), o1(0xDA),
+     o1(0xDF),
+
+#define to_ISO_8859_11_E0_B8 WORDINDEX2INFO(2948)
+    to_ISO_8859_11_E0_B8_offsets,
+    to_ISO_8859_11_E0_B8_infos,
+
+#define to_ISO_8859_11_E0_B9_infos WORDINDEX2INFO(2950)
+      INVALID, o1(0xE0), o1(0xE1), o1(0xE2),
+     o1(0xE3), o1(0xE4), o1(0xE5), o1(0xE6),
+     o1(0xE7), o1(0xE8), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF), o1(0xF0), o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB),    UNDEF,
+
+#define to_ISO_8859_11_E0_B9 WORDINDEX2INFO(2980)
+    to_ISO_8859_11_E0_B9_offsets,
+    to_ISO_8859_11_E0_B9_infos,
+
+#define to_ISO_8859_11_E0_infos WORDINDEX2INFO(2982)
+                  INVALID,       to_US_ASCII_C2,
+     to_ISO_8859_11_E0_B8, to_ISO_8859_11_E0_B9,
+
+#define to_ISO_8859_11_E0 WORDINDEX2INFO(2986)
+    to_ISO_8859_11_E0_offsets,
+    to_ISO_8859_11_E0_infos,
+
+#define to_ISO_8859_11_infos WORDINDEX2INFO(2988)
+                 NOMAP,           INVALID,
+     to_ISO_8859_11_C2,    to_US_ASCII_C2,
+     to_ISO_8859_11_E0,    to_US_ASCII_E1,
+        to_US_ASCII_ED,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_ISO_8859_11 WORDINDEX2INFO(2998)
+    to_ISO_8859_11_offsets,
+    to_ISO_8859_11_infos,
+
+#define from_ISO_8859_13_infos WORDINDEX2INFO(3000)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+     o3(0xE2,0x80,0x9D),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+     o3(0xE2,0x80,0x9E),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC3,0x98),
+          o2(0xC2,0xA9),      o2(0xC5,0x96),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC3,0x86),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3), o3(0xE2,0x80,0x9C),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC3,0xB8),
+          o2(0xC2,0xB9),      o2(0xC5,0x97),
+          o2(0xC2,0xBB),      o2(0xC2,0xBC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBE),
+          o2(0xC3,0xA6),      o2(0xC4,0x84),
+          o2(0xC4,0xAE),      o2(0xC4,0x80),
+          o2(0xC4,0x86),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC4,0x98),
+          o2(0xC4,0x92),      o2(0xC4,0x8C),
+          o2(0xC3,0x89),      o2(0xC5,0xB9),
+          o2(0xC4,0x96),      o2(0xC4,0xA2),
+          o2(0xC4,0xB6),      o2(0xC4,0xAA),
+          o2(0xC4,0xBB),      o2(0xC5,0xA0),
+          o2(0xC5,0x83),      o2(0xC5,0x85),
+          o2(0xC3,0x93),      o2(0xC5,0x8C),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+          o2(0xC3,0x97),      o2(0xC5,0xB2),
+          o2(0xC5,0x81),      o2(0xC5,0x9A),
+          o2(0xC5,0xAA),      o2(0xC3,0x9C),
+          o2(0xC5,0xBB),      o2(0xC5,0xBD),
+          o2(0xC3,0x9F),      o2(0xC4,0x85),
+          o2(0xC4,0xAF),      o2(0xC4,0x81),
+          o2(0xC4,0x87),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC4,0x99),
+          o2(0xC4,0x93),      o2(0xC4,0x8D),
+          o2(0xC3,0xA9),      o2(0xC5,0xBA),
+          o2(0xC4,0x97),      o2(0xC4,0xA3),
+          o2(0xC4,0xB7),      o2(0xC4,0xAB),
+          o2(0xC4,0xBC),      o2(0xC5,0xA1),
+          o2(0xC5,0x84),      o2(0xC5,0x86),
+          o2(0xC3,0xB3),      o2(0xC5,0x8D),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+          o2(0xC3,0xB7),      o2(0xC5,0xB3),
+          o2(0xC5,0x82),      o2(0xC5,0x9B),
+          o2(0xC5,0xAB),      o2(0xC3,0xBC),
+          o2(0xC5,0xBC),      o2(0xC5,0xBE),
+     o3(0xE2,0x80,0x99),
+
+#define from_ISO_8859_13 WORDINDEX2INFO(3129)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_13_infos,
+
+#define to_ISO_8859_13_C2_infos WORDINDEX2INFO(3131)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA6), o1(0xA7),
+     o1(0xA9), o1(0xAB), o1(0xAC), o1(0xAD),
+     o1(0xAE), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xB3), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB9), o1(0xBB), o1(0xBC), o1(0xBD),
+     o1(0xBE),
+
+#define to_ISO_8859_13_C2 WORDINDEX2INFO(3188)
+    to_ISO_8859_13_C2_offsets,
+    to_ISO_8859_13_C2_infos,
+
+#define to_ISO_8859_13_C3_infos WORDINDEX2INFO(3190)
+      INVALID,    UNDEF, o1(0xC4), o1(0xC5),
+     o1(0xAF), o1(0xC9), o1(0xD3), o1(0xD5),
+     o1(0xD6), o1(0xD7), o1(0xA8), o1(0xDC),
+     o1(0xDF), o1(0xE4), o1(0xE5), o1(0xBF),
+     o1(0xE9), o1(0xF3), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xB8), o1(0xFC),
+
+#define to_ISO_8859_13_C3 WORDINDEX2INFO(3213)
+    to_ISO_8859_13_C3_offsets,
+    to_ISO_8859_13_C3_infos,
+
+#define to_ISO_8859_13_C4_infos WORDINDEX2INFO(3215)
+      INVALID, o1(0xC2), o1(0xE2),    UNDEF,
+     o1(0xC0), o1(0xE0), o1(0xC3), o1(0xE3),
+     o1(0xC8), o1(0xE8), o1(0xC7), o1(0xE7),
+     o1(0xCB), o1(0xEB), o1(0xC6), o1(0xE6),
+     o1(0xCC), o1(0xEC), o1(0xCE), o1(0xEE),
+     o1(0xC1), o1(0xE1), o1(0xCD), o1(0xED),
+     o1(0xCF), o1(0xEF),
+
+#define to_ISO_8859_13_C4 WORDINDEX2INFO(3241)
+    to_ISO_8859_13_C4_offsets,
+    to_ISO_8859_13_C4_infos,
+
+#define to_ISO_8859_13_C5_infos WORDINDEX2INFO(3243)
+      INVALID,    UNDEF, o1(0xD9), o1(0xF9),
+     o1(0xD1), o1(0xF1), o1(0xD2), o1(0xF2),
+     o1(0xD4), o1(0xF4), o1(0xAA), o1(0xBA),
+     o1(0xDA), o1(0xFA), o1(0xD0), o1(0xF0),
+     o1(0xDB), o1(0xFB), o1(0xD8), o1(0xF8),
+     o1(0xCA), o1(0xEA), o1(0xDD), o1(0xFD),
+     o1(0xDE), o1(0xFE),
+
+#define to_ISO_8859_13_C5 WORDINDEX2INFO(3269)
+    to_ISO_8859_13_C5_offsets,
+    to_ISO_8859_13_C5_infos,
+
+#define to_ISO_8859_13_E2_80_infos WORDINDEX2INFO(3271)
+      INVALID,    UNDEF, o1(0xFF), o1(0xB4),
+     o1(0xA1), o1(0xA5),
+
+#define to_ISO_8859_13_E2_80 WORDINDEX2INFO(3277)
+    to_ISO_8859_13_E2_80_offsets,
+    to_ISO_8859_13_E2_80_infos,
+
+#define to_ISO_8859_13_E2_infos WORDINDEX2INFO(3279)
+                  INVALID, to_ISO_8859_13_E2_80,
+           to_US_ASCII_C2,
+
+#define to_ISO_8859_13_E2 WORDINDEX2INFO(3282)
+    to_ISO_8859_8_E2_offsets,
+    to_ISO_8859_13_E2_infos,
+
+#define to_ISO_8859_13_infos WORDINDEX2INFO(3284)
+                 NOMAP,           INVALID,
+     to_ISO_8859_13_C2, to_ISO_8859_13_C3,
+     to_ISO_8859_13_C4, to_ISO_8859_13_C5,
+        to_US_ASCII_C2,    to_US_ASCII_E0,
+        to_US_ASCII_E1, to_ISO_8859_13_E2,
+        to_US_ASCII_ED,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_ISO_8859_13 WORDINDEX2INFO(3298)
+    to_ISO_8859_10_offsets,
+    to_ISO_8859_13_infos,
+
+#define from_ISO_8859_14_infos WORDINDEX2INFO(3300)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+     o3(0xE1,0xB8,0x82), o3(0xE1,0xB8,0x83),
+          o2(0xC2,0xA3),      o2(0xC4,0x8A),
+          o2(0xC4,0x8B), o3(0xE1,0xB8,0x8A),
+          o2(0xC2,0xA7), o3(0xE1,0xBA,0x80),
+          o2(0xC2,0xA9), o3(0xE1,0xBA,0x82),
+     o3(0xE1,0xB8,0x8B), o3(0xE1,0xBB,0xB2),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC5,0xB8), o3(0xE1,0xB8,0x9E),
+     o3(0xE1,0xB8,0x9F),      o2(0xC4,0xA0),
+          o2(0xC4,0xA1), o3(0xE1,0xB9,0x80),
+     o3(0xE1,0xB9,0x81),      o2(0xC2,0xB6),
+     o3(0xE1,0xB9,0x96), o3(0xE1,0xBA,0x81),
+     o3(0xE1,0xB9,0x97), o3(0xE1,0xBA,0x83),
+     o3(0xE1,0xB9,0xA0), o3(0xE1,0xBB,0xB3),
+     o3(0xE1,0xBA,0x84), o3(0xE1,0xBA,0x85),
+     o3(0xE1,0xB9,0xA1),      o2(0xC3,0x80),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x83),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x86),
+          o2(0xC3,0x87),      o2(0xC3,0x88),
+          o2(0xC3,0x89),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x8C),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC3,0x8F),      o2(0xC5,0xB4),
+          o2(0xC3,0x91),      o2(0xC3,0x92),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+     o3(0xE1,0xB9,0xAA),      o2(0xC3,0x98),
+          o2(0xC3,0x99),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x9C),
+          o2(0xC3,0x9D),      o2(0xC5,0xB6),
+          o2(0xC3,0x9F),      o2(0xC3,0xA0),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC3,0xA3),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC3,0xA6),
+          o2(0xC3,0xA7),      o2(0xC3,0xA8),
+          o2(0xC3,0xA9),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAC),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC5,0xB5),
+          o2(0xC3,0xB1),      o2(0xC3,0xB2),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+     o3(0xE1,0xB9,0xAB),      o2(0xC3,0xB8),
+          o2(0xC3,0xB9),      o2(0xC3,0xBA),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+          o2(0xC3,0xBD),      o2(0xC5,0xB7),
+          o2(0xC3,0xBF),
+
+#define from_ISO_8859_14 WORDINDEX2INFO(3429)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_14_infos,
+
+#define to_ISO_8859_14_C2_infos WORDINDEX2INFO(3431)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0),    UNDEF, o1(0xA3),
+     o1(0xA7), o1(0xA9), o1(0xAD), o1(0xAE),
+     o1(0xB6),
+
+#define to_ISO_8859_14_C2 WORDINDEX2INFO(3472)
+    to_ISO_8859_14_C2_offsets,
+    to_ISO_8859_14_C2_infos,
+
+#define to_ISO_8859_14_C3_infos WORDINDEX2INFO(3474)
+      INVALID, o1(0xC0), o1(0xC1), o1(0xC2),
+     o1(0xC3), o1(0xC4), o1(0xC5), o1(0xC6),
+     o1(0xC7), o1(0xC8), o1(0xC9), o1(0xCA),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF),    UNDEF, o1(0xD1), o1(0xD2),
+     o1(0xD3), o1(0xD4), o1(0xD5), o1(0xD6),
+     o1(0xD8), o1(0xD9), o1(0xDA), o1(0xDB),
+     o1(0xDC), o1(0xDD), o1(0xDF), o1(0xE0),
+     o1(0xE1), o1(0xE2), o1(0xE3), o1(0xE4),
+     o1(0xE5), o1(0xE6), o1(0xE7), o1(0xE8),
+     o1(0xE9), o1(0xEA), o1(0xEB), o1(0xEC),
+     o1(0xED), o1(0xEE), o1(0xEF), o1(0xF1),
+     o1(0xF2), o1(0xF3), o1(0xF4), o1(0xF5),
+     o1(0xF6), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFD), o1(0xFF),
+
+#define to_ISO_8859_14_C3 WORDINDEX2INFO(3534)
+    to_ISO_8859_14_C3_offsets,
+    to_ISO_8859_14_C3_infos,
+
+#define to_ISO_8859_14_C4_infos WORDINDEX2INFO(3536)
+      INVALID,    UNDEF, o1(0xA4), o1(0xA5),
+     o1(0xB2), o1(0xB3),
+
+#define to_ISO_8859_14_C4 WORDINDEX2INFO(3542)
+    to_ISO_8859_14_C4_offsets,
+    to_ISO_8859_14_C4_infos,
+
+#define to_ISO_8859_14_C5_infos WORDINDEX2INFO(3544)
+      INVALID,    UNDEF, o1(0xD0), o1(0xF0),
+     o1(0xDE), o1(0xFE), o1(0xAF),
+
+#define to_ISO_8859_14_C5 WORDINDEX2INFO(3551)
+    to_ISO_8859_14_C5_offsets,
+    to_ISO_8859_14_C5_infos,
+
+#define to_ISO_8859_14_E1_B8_infos WORDINDEX2INFO(3553)
+      INVALID,    UNDEF, o1(0xA1), o1(0xA2),
+     o1(0xA6), o1(0xAB), o1(0xB0), o1(0xB1),
+
+#define to_ISO_8859_14_E1_B8 WORDINDEX2INFO(3561)
+    to_ISO_8859_14_E1_B8_offsets,
+    to_ISO_8859_14_E1_B8_infos,
+
+#define to_ISO_8859_14_E1_B9_infos WORDINDEX2INFO(3563)
+      INVALID, o1(0xB4), o1(0xB5),    UNDEF,
+     o1(0xB7), o1(0xB9), o1(0xBB), o1(0xBF),
+     o1(0xD7), o1(0xF7),
+
+#define to_ISO_8859_14_E1_B9 WORDINDEX2INFO(3573)
+    to_ISO_8859_14_E1_B9_offsets,
+    to_ISO_8859_14_E1_B9_infos,
+
+#define to_ISO_8859_14_E1_BA_infos WORDINDEX2INFO(3575)
+      INVALID, o1(0xA8), o1(0xB8), o1(0xAA),
+     o1(0xBA), o1(0xBD), o1(0xBE),    UNDEF,
+
+#define to_ISO_8859_14_E1_BA WORDINDEX2INFO(3583)
+    to_ISO_8859_14_E1_BA_offsets,
+    to_ISO_8859_14_E1_BA_infos,
+
+#define to_ISO_8859_14_E1_BB_infos WORDINDEX2INFO(3585)
+      INVALID,    UNDEF, o1(0xAC), o1(0xBC),
+
+#define to_ISO_8859_14_E1_BB WORDINDEX2INFO(3589)
+    to_ISO_8859_14_E1_BB_offsets,
+    to_ISO_8859_14_E1_BB_infos,
+
+#define to_ISO_8859_14_E1_infos WORDINDEX2INFO(3591)
+                  INVALID,       to_US_ASCII_C2,
+     to_ISO_8859_14_E1_B8, to_ISO_8859_14_E1_B9,
+     to_ISO_8859_14_E1_BA, to_ISO_8859_14_E1_BB,
+
+#define to_ISO_8859_14_E1 WORDINDEX2INFO(3597)
+    to_ISO_8859_14_E1_offsets,
+    to_ISO_8859_14_E1_infos,
+
+#define to_ISO_8859_14_infos WORDINDEX2INFO(3599)
+                 NOMAP,           INVALID,
+     to_ISO_8859_14_C2, to_ISO_8859_14_C3,
+     to_ISO_8859_14_C4, to_ISO_8859_14_C5,
+        to_US_ASCII_C2,    to_US_ASCII_E0,
+     to_ISO_8859_14_E1,    to_US_ASCII_E1,
+        to_US_ASCII_ED,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_ISO_8859_14 WORDINDEX2INFO(3613)
+    to_ISO_8859_14_offsets,
+    to_ISO_8859_14_infos,
+
+#define from_ISO_8859_15_infos WORDINDEX2INFO(3615)
+                  NOMAP,      o2(0xC2,0x80),
+          o2(0xC2,0x81),      o2(0xC2,0x82),
+          o2(0xC2,0x83),      o2(0xC2,0x84),
+          o2(0xC2,0x85),      o2(0xC2,0x86),
+          o2(0xC2,0x87),      o2(0xC2,0x88),
+          o2(0xC2,0x89),      o2(0xC2,0x8A),
+          o2(0xC2,0x8B),      o2(0xC2,0x8C),
+          o2(0xC2,0x8D),      o2(0xC2,0x8E),
+          o2(0xC2,0x8F),      o2(0xC2,0x90),
+          o2(0xC2,0x91),      o2(0xC2,0x92),
+          o2(0xC2,0x93),      o2(0xC2,0x94),
+          o2(0xC2,0x95),      o2(0xC2,0x96),
+          o2(0xC2,0x97),      o2(0xC2,0x98),
+          o2(0xC2,0x99),      o2(0xC2,0x9A),
+          o2(0xC2,0x9B),      o2(0xC2,0x9C),
+          o2(0xC2,0x9D),      o2(0xC2,0x9E),
+          o2(0xC2,0x9F),      o2(0xC2,0xA0),
+          o2(0xC2,0xA1),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3), o3(0xE2,0x82,0xAC),
+          o2(0xC2,0xA5),      o2(0xC5,0xA0),
+          o2(0xC2,0xA7),      o2(0xC5,0xA1),
+          o2(0xC2,0xA9),      o2(0xC2,0xAA),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC2,0xAF),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xC5,0xBD),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC5,0xBE),
+          o2(0xC2,0xB9),      o2(0xC2,0xBA),
+          o2(0xC2,0xBB),      o2(0xC5,0x92),
+          o2(0xC5,0x93),      o2(0xC5,0xB8),
+          o2(0xC2,0xBF),      o2(0xC3,0x80),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x83),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x86),
+          o2(0xC3,0x87),      o2(0xC3,0x88),
+          o2(0xC3,0x89),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x8C),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC3,0x8F),      o2(0xC3,0x90),
+          o2(0xC3,0x91),      o2(0xC3,0x92),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+          o2(0xC3,0x97),      o2(0xC3,0x98),
+          o2(0xC3,0x99),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x9C),
+          o2(0xC3,0x9D),      o2(0xC3,0x9E),
+          o2(0xC3,0x9F),      o2(0xC3,0xA0),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC3,0xA3),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC3,0xA6),
+          o2(0xC3,0xA7),      o2(0xC3,0xA8),
+          o2(0xC3,0xA9),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAC),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB0),
+          o2(0xC3,0xB1),      o2(0xC3,0xB2),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+          o2(0xC3,0xB7),      o2(0xC3,0xB8),
+          o2(0xC3,0xB9),      o2(0xC3,0xBA),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+          o2(0xC3,0xBD),      o2(0xC3,0xBE),
+          o2(0xC3,0xBF),
+
+#define from_ISO_8859_15 WORDINDEX2INFO(3744)
+    from_ISO_8859_1_offsets,
+    from_ISO_8859_15_infos,
+
+#define to_ISO_8859_15_C2_infos WORDINDEX2INFO(3746)
+      INVALID, o1(0x80), o1(0x81), o1(0x82),
+     o1(0x83), o1(0x84), o1(0x85), o1(0x86),
+     o1(0x87), o1(0x88), o1(0x89), o1(0x8A),
+     o1(0x8B), o1(0x8C), o1(0x8D), o1(0x8E),
+     o1(0x8F), o1(0x90), o1(0x91), o1(0x92),
+     o1(0x93), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x97), o1(0x98), o1(0x99), o1(0x9A),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0x9E),
+     o1(0x9F), o1(0xA0), o1(0xA1), o1(0xA2),
+     o1(0xA3),    UNDEF, o1(0xA5), o1(0xA7),
+     o1(0xA9), o1(0xAA), o1(0xAB), o1(0xAC),
+     o1(0xAD), o1(0xAE), o1(0xAF), o1(0xB0),
+     o1(0xB1), o1(0xB2), o1(0xB3), o1(0xB5),
+     o1(0xB6), o1(0xB7), o1(0xB9), o1(0xBA),
+     o1(0xBB), o1(0xBF),
+
+#define to_ISO_8859_15_C2 WORDINDEX2INFO(3804)
+    to_ISO_8859_15_C2_offsets,
+    to_ISO_8859_15_C2_infos,
+
+#define to_ISO_8859_15_C5_infos WORDINDEX2INFO(3806)
+      INVALID,    UNDEF, o1(0xBC), o1(0xBD),
+     o1(0xA6), o1(0xA8), o1(0xBE), o1(0xB4),
+     o1(0xB8),
+
+#define to_ISO_8859_15_C5 WORDINDEX2INFO(3815)
+    to_ISO_8859_15_C5_offsets,
+    to_ISO_8859_15_C5_infos,
+
+#define to_ISO_8859_15_E2_82_infos WORDINDEX2INFO(3817)
+      INVALID,    UNDEF, o1(0xA4),
+
+#define to_ISO_8859_15_E2_82 WORDINDEX2INFO(3820)
+    to_ISO_8859_15_E2_82_offsets,
+    to_ISO_8859_15_E2_82_infos,
+
+#define to_ISO_8859_15_E2_infos WORDINDEX2INFO(3822)
+                  INVALID,       to_US_ASCII_C2,
+     to_ISO_8859_15_E2_82,
+
+#define to_ISO_8859_15_E2 WORDINDEX2INFO(3825)
+    to_ISO_8859_15_E2_offsets,
+    to_ISO_8859_15_E2_infos,
+
+#define to_ISO_8859_15_infos WORDINDEX2INFO(3827)
+                 NOMAP,           INVALID,
+     to_ISO_8859_15_C2,  to_ISO_8859_1_C3,
+        to_US_ASCII_C2, to_ISO_8859_15_C5,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+     to_ISO_8859_15_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_ISO_8859_15 WORDINDEX2INFO(3840)
+    to_ISO_8859_15_offsets,
+    to_ISO_8859_15_infos,
+
+#define from_WINDOWS_874_infos WORDINDEX2INFO(3842)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0xA6),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE2,0x80,0xA2), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94),      o2(0xC2,0xA0),
+     o3(0xE0,0xB8,0x81), o3(0xE0,0xB8,0x82),
+     o3(0xE0,0xB8,0x83), o3(0xE0,0xB8,0x84),
+     o3(0xE0,0xB8,0x85), o3(0xE0,0xB8,0x86),
+     o3(0xE0,0xB8,0x87), o3(0xE0,0xB8,0x88),
+     o3(0xE0,0xB8,0x89), o3(0xE0,0xB8,0x8A),
+     o3(0xE0,0xB8,0x8B), o3(0xE0,0xB8,0x8C),
+     o3(0xE0,0xB8,0x8D), o3(0xE0,0xB8,0x8E),
+     o3(0xE0,0xB8,0x8F), o3(0xE0,0xB8,0x90),
+     o3(0xE0,0xB8,0x91), o3(0xE0,0xB8,0x92),
+     o3(0xE0,0xB8,0x93), o3(0xE0,0xB8,0x94),
+     o3(0xE0,0xB8,0x95), o3(0xE0,0xB8,0x96),
+     o3(0xE0,0xB8,0x97), o3(0xE0,0xB8,0x98),
+     o3(0xE0,0xB8,0x99), o3(0xE0,0xB8,0x9A),
+     o3(0xE0,0xB8,0x9B), o3(0xE0,0xB8,0x9C),
+     o3(0xE0,0xB8,0x9D), o3(0xE0,0xB8,0x9E),
+     o3(0xE0,0xB8,0x9F), o3(0xE0,0xB8,0xA0),
+     o3(0xE0,0xB8,0xA1), o3(0xE0,0xB8,0xA2),
+     o3(0xE0,0xB8,0xA3), o3(0xE0,0xB8,0xA4),
+     o3(0xE0,0xB8,0xA5), o3(0xE0,0xB8,0xA6),
+     o3(0xE0,0xB8,0xA7), o3(0xE0,0xB8,0xA8),
+     o3(0xE0,0xB8,0xA9), o3(0xE0,0xB8,0xAA),
+     o3(0xE0,0xB8,0xAB), o3(0xE0,0xB8,0xAC),
+     o3(0xE0,0xB8,0xAD), o3(0xE0,0xB8,0xAE),
+     o3(0xE0,0xB8,0xAF), o3(0xE0,0xB8,0xB0),
+     o3(0xE0,0xB8,0xB1), o3(0xE0,0xB8,0xB2),
+     o3(0xE0,0xB8,0xB3), o3(0xE0,0xB8,0xB4),
+     o3(0xE0,0xB8,0xB5), o3(0xE0,0xB8,0xB6),
+     o3(0xE0,0xB8,0xB7), o3(0xE0,0xB8,0xB8),
+     o3(0xE0,0xB8,0xB9), o3(0xE0,0xB8,0xBA),
+     o3(0xE0,0xB8,0xBF), o3(0xE0,0xB9,0x80),
+     o3(0xE0,0xB9,0x81), o3(0xE0,0xB9,0x82),
+     o3(0xE0,0xB9,0x83), o3(0xE0,0xB9,0x84),
+     o3(0xE0,0xB9,0x85), o3(0xE0,0xB9,0x86),
+     o3(0xE0,0xB9,0x87), o3(0xE0,0xB9,0x88),
+     o3(0xE0,0xB9,0x89), o3(0xE0,0xB9,0x8A),
+     o3(0xE0,0xB9,0x8B), o3(0xE0,0xB9,0x8C),
+     o3(0xE0,0xB9,0x8D), o3(0xE0,0xB9,0x8E),
+     o3(0xE0,0xB9,0x8F), o3(0xE0,0xB9,0x90),
+     o3(0xE0,0xB9,0x91), o3(0xE0,0xB9,0x92),
+     o3(0xE0,0xB9,0x93), o3(0xE0,0xB9,0x94),
+     o3(0xE0,0xB9,0x95), o3(0xE0,0xB9,0x96),
+     o3(0xE0,0xB9,0x97), o3(0xE0,0xB9,0x98),
+     o3(0xE0,0xB9,0x99), o3(0xE0,0xB9,0x9A),
+     o3(0xE0,0xB9,0x9B),
+
+#define from_WINDOWS_874 WORDINDEX2INFO(3941)
+    from_WINDOWS_874_offsets,
+    from_WINDOWS_874_infos,
+
+#define to_WINDOWS_874_C2_infos WORDINDEX2INFO(3943)
+      INVALID,    UNDEF, o1(0xA0),
+
+#define to_WINDOWS_874_C2 WORDINDEX2INFO(3946)
+    to_WINDOWS_874_C2_offsets,
+    to_WINDOWS_874_C2_infos,
+
+#define to_WINDOWS_874_E2_80_infos WORDINDEX2INFO(3948)
+      INVALID,    UNDEF, o1(0x96), o1(0x97),
+     o1(0x91), o1(0x92), o1(0x93), o1(0x94),
+     o1(0x95), o1(0x85),
+
+#define to_WINDOWS_874_E2_80 WORDINDEX2INFO(3958)
+    to_WINDOWS_874_E2_80_offsets,
+    to_WINDOWS_874_E2_80_infos,
+
+#define to_WINDOWS_874_E2_82_infos WORDINDEX2INFO(3960)
+      INVALID,    UNDEF, o1(0x80),
+
+#define to_WINDOWS_874_E2_82 WORDINDEX2INFO(3963)
+    to_ISO_8859_15_E2_82_offsets,
+    to_WINDOWS_874_E2_82_infos,
+
+#define to_WINDOWS_874_E2_infos WORDINDEX2INFO(3965)
+                  INVALID, to_WINDOWS_874_E2_80,
+           to_US_ASCII_C2, to_WINDOWS_874_E2_82,
+
+#define to_WINDOWS_874_E2 WORDINDEX2INFO(3969)
+    to_ISO_8859_7_E2_offsets,
+    to_WINDOWS_874_E2_infos,
+
+#define to_WINDOWS_874_infos WORDINDEX2INFO(3971)
+                 NOMAP,           INVALID,
+     to_WINDOWS_874_C2,    to_US_ASCII_C2,
+     to_ISO_8859_11_E0,    to_US_ASCII_E1,
+     to_WINDOWS_874_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_WINDOWS_874 WORDINDEX2INFO(3982)
+    to_WINDOWS_874_offsets,
+    to_WINDOWS_874_infos,
+
+#define from_WINDOWS_1250_infos WORDINDEX2INFO(3984)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xA6),
+     o3(0xE2,0x80,0xA0), o3(0xE2,0x80,0xA1),
+     o3(0xE2,0x80,0xB0),      o2(0xC5,0xA0),
+     o3(0xE2,0x80,0xB9),      o2(0xC5,0x9A),
+          o2(0xC5,0xA4),      o2(0xC5,0xBD),
+          o2(0xC5,0xB9), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0xA2),
+     o3(0xE2,0x80,0x93), o3(0xE2,0x80,0x94),
+     o3(0xE2,0x84,0xA2),      o2(0xC5,0xA1),
+     o3(0xE2,0x80,0xBA),      o2(0xC5,0x9B),
+          o2(0xC5,0xA5),      o2(0xC5,0xBE),
+          o2(0xC5,0xBA),      o2(0xC2,0xA0),
+          o2(0xCB,0x87),      o2(0xCB,0x98),
+          o2(0xC5,0x81),      o2(0xC2,0xA4),
+          o2(0xC4,0x84),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xC5,0x9E),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC5,0xBB),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xCB,0x9B),
+          o2(0xC5,0x82),      o2(0xC2,0xB4),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC2,0xB8),
+          o2(0xC4,0x85),      o2(0xC5,0x9F),
+          o2(0xC2,0xBB),      o2(0xC4,0xBD),
+          o2(0xCB,0x9D),      o2(0xC4,0xBE),
+          o2(0xC5,0xBC),      o2(0xC5,0x94),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC4,0x82),      o2(0xC3,0x84),
+          o2(0xC4,0xB9),      o2(0xC4,0x86),
+          o2(0xC3,0x87),      o2(0xC4,0x8C),
+          o2(0xC3,0x89),      o2(0xC4,0x98),
+          o2(0xC3,0x8B),      o2(0xC4,0x9A),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC4,0x8E),      o2(0xC4,0x90),
+          o2(0xC5,0x83),      o2(0xC5,0x87),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC5,0x90),      o2(0xC3,0x96),
+          o2(0xC3,0x97),      o2(0xC5,0x98),
+          o2(0xC5,0xAE),      o2(0xC3,0x9A),
+          o2(0xC5,0xB0),      o2(0xC3,0x9C),
+          o2(0xC3,0x9D),      o2(0xC5,0xA2),
+          o2(0xC3,0x9F),      o2(0xC5,0x95),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC4,0x83),      o2(0xC3,0xA4),
+          o2(0xC4,0xBA),      o2(0xC4,0x87),
+          o2(0xC3,0xA7),      o2(0xC4,0x8D),
+          o2(0xC3,0xA9),      o2(0xC4,0x99),
+          o2(0xC3,0xAB),      o2(0xC4,0x9B),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC4,0x8F),      o2(0xC4,0x91),
+          o2(0xC5,0x84),      o2(0xC5,0x88),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC5,0x91),      o2(0xC3,0xB6),
+          o2(0xC3,0xB7),      o2(0xC5,0x99),
+          o2(0xC5,0xAF),      o2(0xC3,0xBA),
+          o2(0xC5,0xB1),      o2(0xC3,0xBC),
+          o2(0xC3,0xBD),      o2(0xC5,0xA3),
+          o2(0xCB,0x99),
+
+#define from_WINDOWS_1250 WORDINDEX2INFO(4109)
+    from_WINDOWS_1250_offsets,
+    from_WINDOWS_1250_infos,
+
+#define to_WINDOWS_1250_C2_infos WORDINDEX2INFO(4111)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA4),
+     o1(0xA6), o1(0xA7), o1(0xA8), o1(0xA9),
+     o1(0xAB), o1(0xAC), o1(0xAD), o1(0xAE),
+     o1(0xB0), o1(0xB1), o1(0xB4), o1(0xB5),
+     o1(0xB6), o1(0xB7), o1(0xB8), o1(0xBB),
+
+#define to_WINDOWS_1250_C2 WORDINDEX2INFO(4131)
+    to_WINDOWS_1250_C2_offsets,
+    to_WINDOWS_1250_C2_infos,
+
+#define to_WINDOWS_1250_C4_infos WORDINDEX2INFO(4133)
+      INVALID,    UNDEF, o1(0xC3), o1(0xE3),
+     o1(0xA5), o1(0xB9), o1(0xC6), o1(0xE6),
+     o1(0xC8), o1(0xE8), o1(0xCF), o1(0xEF),
+     o1(0xD0), o1(0xF0), o1(0xCA), o1(0xEA),
+     o1(0xCC), o1(0xEC), o1(0xC5), o1(0xE5),
+     o1(0xBC), o1(0xBE),
+
+#define to_WINDOWS_1250_C4 WORDINDEX2INFO(4155)
+    to_ISO_8859_2_C4_offsets,
+    to_WINDOWS_1250_C4_infos,
+
+#define to_WINDOWS_1250_C5_infos WORDINDEX2INFO(4157)
+      INVALID,    UNDEF, o1(0xA3), o1(0xB3),
+     o1(0xD1), o1(0xF1), o1(0xD2), o1(0xF2),
+     o1(0xD5), o1(0xF5), o1(0xC0), o1(0xE0),
+     o1(0xD8), o1(0xF8), o1(0x8C), o1(0x9C),
+     o1(0xAA), o1(0xBA), o1(0x8A), o1(0x9A),
+     o1(0xDE), o1(0xFE), o1(0x8D), o1(0x9D),
+     o1(0xD9), o1(0xF9), o1(0xDB), o1(0xFB),
+     o1(0x8F), o1(0x9F), o1(0xAF), o1(0xBF),
+     o1(0x8E), o1(0x9E),
+
+#define to_WINDOWS_1250_C5 WORDINDEX2INFO(4191)
+    to_ISO_8859_2_C5_offsets,
+    to_WINDOWS_1250_C5_infos,
+
+#define to_WINDOWS_1250_CB_infos WORDINDEX2INFO(4193)
+      INVALID,    UNDEF, o1(0xA1), o1(0xA2),
+     o1(0xFF), o1(0xB2), o1(0xBD),
+
+#define to_WINDOWS_1250_CB WORDINDEX2INFO(4200)
+    to_ISO_8859_2_CB_offsets,
+    to_WINDOWS_1250_CB_infos,
+
+#define to_WINDOWS_1250_E2_80_infos WORDINDEX2INFO(4202)
+      INVALID,    UNDEF, o1(0x96), o1(0x97),
+     o1(0x91), o1(0x92), o1(0x82), o1(0x93),
+     o1(0x94), o1(0x84), o1(0x86), o1(0x87),
+     o1(0x95), o1(0x85), o1(0x89), o1(0x8B),
+     o1(0x9B),
+
+#define to_WINDOWS_1250_E2_80 WORDINDEX2INFO(4219)
+    to_WINDOWS_1250_E2_80_offsets,
+    to_WINDOWS_1250_E2_80_infos,
+
+#define to_WINDOWS_1250_E2_84_infos WORDINDEX2INFO(4221)
+      INVALID,    UNDEF, o1(0x99),
+
+#define to_WINDOWS_1250_E2_84 WORDINDEX2INFO(4224)
+    to_WINDOWS_1250_E2_84_offsets,
+    to_WINDOWS_1250_E2_84_infos,
+
+#define to_WINDOWS_1250_E2_infos WORDINDEX2INFO(4226)
+                   INVALID, to_WINDOWS_1250_E2_80,
+            to_US_ASCII_C2,  to_WINDOWS_874_E2_82,
+     to_WINDOWS_1250_E2_84,
+
+#define to_WINDOWS_1250_E2 WORDINDEX2INFO(4231)
+    to_WINDOWS_1250_E2_offsets,
+    to_WINDOWS_1250_E2_infos,
+
+#define to_WINDOWS_1250_infos WORDINDEX2INFO(4233)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1250_C2,   to_ISO_8859_2_C3,
+     to_WINDOWS_1250_C4, to_WINDOWS_1250_C5,
+         to_US_ASCII_C2, to_WINDOWS_1250_CB,
+         to_US_ASCII_E0,     to_US_ASCII_E1,
+     to_WINDOWS_1250_E2,     to_US_ASCII_ED,
+         to_US_ASCII_F0,     to_US_ASCII_F1,
+         to_US_ASCII_F4,
+
+#define to_WINDOWS_1250 WORDINDEX2INFO(4248)
+    to_WINDOWS_1250_offsets,
+    to_WINDOWS_1250_infos,
+
+#define from_WINDOWS_1251_infos WORDINDEX2INFO(4250)
+                  NOMAP,      o2(0xD0,0x82),
+          o2(0xD0,0x83), o3(0xE2,0x80,0x9A),
+          o2(0xD1,0x93), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1), o3(0xE2,0x82,0xAC),
+     o3(0xE2,0x80,0xB0),      o2(0xD0,0x89),
+     o3(0xE2,0x80,0xB9),      o2(0xD0,0x8A),
+          o2(0xD0,0x8C),      o2(0xD0,0x8B),
+          o2(0xD0,0x8F),      o2(0xD1,0x92),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE2,0x80,0xA2), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94),              UNDEF,
+     o3(0xE2,0x84,0xA2),      o2(0xD1,0x99),
+     o3(0xE2,0x80,0xBA),      o2(0xD1,0x9A),
+          o2(0xD1,0x9C),      o2(0xD1,0x9B),
+          o2(0xD1,0x9F),      o2(0xC2,0xA0),
+          o2(0xD0,0x8E),      o2(0xD1,0x9E),
+          o2(0xD0,0x88),      o2(0xC2,0xA4),
+          o2(0xD2,0x90),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xD0,0x81),
+          o2(0xC2,0xA9),      o2(0xD0,0x84),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xD0,0x87),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xD0,0x86),
+          o2(0xD1,0x96),      o2(0xD2,0x91),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xD1,0x91),
+     o3(0xE2,0x84,0x96),      o2(0xD1,0x94),
+          o2(0xC2,0xBB),      o2(0xD1,0x98),
+          o2(0xD0,0x85),      o2(0xD1,0x95),
+          o2(0xD1,0x97),      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x96),
+          o2(0xD0,0x97),      o2(0xD0,0x98),
+          o2(0xD0,0x99),      o2(0xD0,0x9A),
+          o2(0xD0,0x9B),      o2(0xD0,0x9C),
+          o2(0xD0,0x9D),      o2(0xD0,0x9E),
+          o2(0xD0,0x9F),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0xA4),
+          o2(0xD0,0xA5),      o2(0xD0,0xA6),
+          o2(0xD0,0xA7),      o2(0xD0,0xA8),
+          o2(0xD0,0xA9),      o2(0xD0,0xAA),
+          o2(0xD0,0xAB),      o2(0xD0,0xAC),
+          o2(0xD0,0xAD),      o2(0xD0,0xAE),
+          o2(0xD0,0xAF),      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD0,0xB6),
+          o2(0xD0,0xB7),      o2(0xD0,0xB8),
+          o2(0xD0,0xB9),      o2(0xD0,0xBA),
+          o2(0xD0,0xBB),      o2(0xD0,0xBC),
+          o2(0xD0,0xBD),      o2(0xD0,0xBE),
+          o2(0xD0,0xBF),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD1,0x84),
+          o2(0xD1,0x85),      o2(0xD1,0x86),
+          o2(0xD1,0x87),      o2(0xD1,0x88),
+          o2(0xD1,0x89),      o2(0xD1,0x8A),
+          o2(0xD1,0x8B),      o2(0xD1,0x8C),
+          o2(0xD1,0x8D),      o2(0xD1,0x8E),
+          o2(0xD1,0x8F),
+
+#define from_WINDOWS_1251 WORDINDEX2INFO(4379)
+    from_ISO_8859_1_offsets,
+    from_WINDOWS_1251_infos,
+
+#define to_WINDOWS_1251_C2_infos WORDINDEX2INFO(4381)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA4),
+     o1(0xA6), o1(0xA7), o1(0xA9), o1(0xAB),
+     o1(0xAC), o1(0xAD), o1(0xAE), o1(0xB0),
+     o1(0xB1), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xBB),
+
+#define to_WINDOWS_1251_C2 WORDINDEX2INFO(4398)
+    to_WINDOWS_1251_C2_offsets,
+    to_WINDOWS_1251_C2_infos,
+
+#define to_WINDOWS_1251_D0_infos WORDINDEX2INFO(4400)
+      INVALID,    UNDEF, o1(0xA8), o1(0x80),
+     o1(0x81), o1(0xAA), o1(0xBD), o1(0xB2),
+     o1(0xAF), o1(0xA3), o1(0x8A), o1(0x8C),
+     o1(0x8E), o1(0x8D), o1(0xA1), o1(0x8F),
+     o1(0xC0), o1(0xC1), o1(0xC2), o1(0xC3),
+     o1(0xC4), o1(0xC5), o1(0xC6), o1(0xC7),
+     o1(0xC8), o1(0xC9), o1(0xCA), o1(0xCB),
+     o1(0xCC), o1(0xCD), o1(0xCE), o1(0xCF),
+     o1(0xD0), o1(0xD1), o1(0xD2), o1(0xD3),
+     o1(0xD4), o1(0xD5), o1(0xD6), o1(0xD7),
+     o1(0xD8), o1(0xD9), o1(0xDA), o1(0xDB),
+     o1(0xDC), o1(0xDD), o1(0xDE), o1(0xDF),
+     o1(0xE0), o1(0xE1), o1(0xE2), o1(0xE3),
+     o1(0xE4), o1(0xE5), o1(0xE6), o1(0xE7),
+     o1(0xE8), o1(0xE9), o1(0xEA), o1(0xEB),
+     o1(0xEC), o1(0xED), o1(0xEE), o1(0xEF),
+
+#define to_WINDOWS_1251_D0 WORDINDEX2INFO(4464)
+    to_ISO_8859_5_D0_offsets,
+    to_WINDOWS_1251_D0_infos,
+
+#define to_WINDOWS_1251_D1_infos WORDINDEX2INFO(4466)
+      INVALID, o1(0xF0), o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFD), o1(0xFE),
+     o1(0xFF),    UNDEF, o1(0xB8), o1(0x90),
+     o1(0x83), o1(0xBA), o1(0xBE), o1(0xB3),
+     o1(0xBF), o1(0xBC), o1(0x9A), o1(0x9C),
+     o1(0x9E), o1(0x9D), o1(0xA2), o1(0x9F),
+
+#define to_WINDOWS_1251_D1 WORDINDEX2INFO(4498)
+    to_ISO_8859_5_D1_offsets,
+    to_WINDOWS_1251_D1_infos,
+
+#define to_WINDOWS_1251_D2_infos WORDINDEX2INFO(4500)
+      INVALID,    UNDEF, o1(0xA5), o1(0xB4),
+
+#define to_WINDOWS_1251_D2 WORDINDEX2INFO(4504)
+    to_WINDOWS_1251_D2_offsets,
+    to_WINDOWS_1251_D2_infos,
+
+#define to_WINDOWS_1251_E2_82_infos WORDINDEX2INFO(4506)
+      INVALID,    UNDEF, o1(0x88),
+
+#define to_WINDOWS_1251_E2_82 WORDINDEX2INFO(4509)
+    to_ISO_8859_15_E2_82_offsets,
+    to_WINDOWS_1251_E2_82_infos,
+
+#define to_WINDOWS_1251_E2_84_infos WORDINDEX2INFO(4511)
+      INVALID,    UNDEF, o1(0xB9), o1(0x99),
+
+#define to_WINDOWS_1251_E2_84 WORDINDEX2INFO(4515)
+    to_WINDOWS_1251_E2_84_offsets,
+    to_WINDOWS_1251_E2_84_infos,
+
+#define to_WINDOWS_1251_E2_infos WORDINDEX2INFO(4517)
+                   INVALID, to_WINDOWS_1250_E2_80,
+            to_US_ASCII_C2, to_WINDOWS_1251_E2_82,
+     to_WINDOWS_1251_E2_84,
+
+#define to_WINDOWS_1251_E2 WORDINDEX2INFO(4522)
+    to_WINDOWS_1250_E2_offsets,
+    to_WINDOWS_1251_E2_infos,
+
+#define to_WINDOWS_1251_infos WORDINDEX2INFO(4524)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1251_C2,     to_US_ASCII_C2,
+     to_WINDOWS_1251_D0, to_WINDOWS_1251_D1,
+     to_WINDOWS_1251_D2,     to_US_ASCII_E0,
+         to_US_ASCII_E1, to_WINDOWS_1251_E2,
+         to_US_ASCII_ED,     to_US_ASCII_F0,
+         to_US_ASCII_F1,     to_US_ASCII_F4,
+
+#define to_WINDOWS_1251 WORDINDEX2INFO(4538)
+    to_WINDOWS_1251_offsets,
+    to_WINDOWS_1251_infos,
+
+#define from_WINDOWS_1252_infos WORDINDEX2INFO(4540)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+          o2(0xC6,0x92), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xCB,0x86),
+     o3(0xE2,0x80,0xB0),      o2(0xC5,0xA0),
+     o3(0xE2,0x80,0xB9),      o2(0xC5,0x92),
+          o2(0xC5,0xBD), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0xA2),
+     o3(0xE2,0x80,0x93), o3(0xE2,0x80,0x94),
+          o2(0xCB,0x9C), o3(0xE2,0x84,0xA2),
+          o2(0xC5,0xA1), o3(0xE2,0x80,0xBA),
+          o2(0xC5,0x93),      o2(0xC5,0xBE),
+          o2(0xC5,0xB8),      o2(0xC2,0xA0),
+          o2(0xC2,0xA1),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+          o2(0xC2,0xA5),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xC2,0xAA),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC2,0xAF),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xC2,0xB4),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC2,0xB8),
+          o2(0xC2,0xB9),      o2(0xC2,0xBA),
+          o2(0xC2,0xBB),      o2(0xC2,0xBC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBE),
+          o2(0xC2,0xBF),      o2(0xC3,0x80),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x83),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x86),
+          o2(0xC3,0x87),      o2(0xC3,0x88),
+          o2(0xC3,0x89),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x8C),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC3,0x8F),      o2(0xC3,0x90),
+          o2(0xC3,0x91),      o2(0xC3,0x92),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+          o2(0xC3,0x97),      o2(0xC3,0x98),
+          o2(0xC3,0x99),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x9C),
+          o2(0xC3,0x9D),      o2(0xC3,0x9E),
+          o2(0xC3,0x9F),      o2(0xC3,0xA0),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC3,0xA3),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC3,0xA6),
+          o2(0xC3,0xA7),      o2(0xC3,0xA8),
+          o2(0xC3,0xA9),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAC),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB0),
+          o2(0xC3,0xB1),      o2(0xC3,0xB2),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+          o2(0xC3,0xB7),      o2(0xC3,0xB8),
+          o2(0xC3,0xB9),      o2(0xC3,0xBA),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+          o2(0xC3,0xBD),      o2(0xC3,0xBE),
+          o2(0xC3,0xBF),
+
+#define from_WINDOWS_1252 WORDINDEX2INFO(4665)
+    from_WINDOWS_1252_offsets,
+    from_WINDOWS_1252_infos,
+
+#define to_WINDOWS_1252_C2_infos WORDINDEX2INFO(4667)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA1),
+     o1(0xA2), o1(0xA3), o1(0xA4), o1(0xA5),
+     o1(0xA6), o1(0xA7), o1(0xA8), o1(0xA9),
+     o1(0xAA), o1(0xAB), o1(0xAC), o1(0xAD),
+     o1(0xAE), o1(0xAF), o1(0xB0), o1(0xB1),
+     o1(0xB2), o1(0xB3), o1(0xB4), o1(0xB5),
+     o1(0xB6), o1(0xB7), o1(0xB8), o1(0xB9),
+     o1(0xBA), o1(0xBB), o1(0xBC), o1(0xBD),
+     o1(0xBE), o1(0xBF),
+
+#define to_WINDOWS_1252_C2 WORDINDEX2INFO(4701)
+    to_WINDOWS_1252_C2_offsets,
+    to_WINDOWS_1252_C2_infos,
+
+#define to_WINDOWS_1252_C5_infos WORDINDEX2INFO(4703)
+      INVALID,    UNDEF, o1(0x8C), o1(0x9C),
+     o1(0x8A), o1(0x9A), o1(0x9F), o1(0x8E),
+     o1(0x9E),
+
+#define to_WINDOWS_1252_C5 WORDINDEX2INFO(4712)
+    to_ISO_8859_15_C5_offsets,
+    to_WINDOWS_1252_C5_infos,
+
+#define to_WINDOWS_1252_C6_infos WORDINDEX2INFO(4714)
+      INVALID,    UNDEF, o1(0x83),
+
+#define to_WINDOWS_1252_C6 WORDINDEX2INFO(4717)
+    to_WINDOWS_1252_C6_offsets,
+    to_WINDOWS_1252_C6_infos,
+
+#define to_WINDOWS_1252_CB_infos WORDINDEX2INFO(4719)
+      INVALID,    UNDEF, o1(0x88), o1(0x98),
+
+#define to_WINDOWS_1252_CB WORDINDEX2INFO(4723)
+    to_WINDOWS_1252_CB_offsets,
+    to_WINDOWS_1252_CB_infos,
+
+#define to_WINDOWS_1252_infos WORDINDEX2INFO(4725)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1252_C2,   to_ISO_8859_1_C3,
+         to_US_ASCII_C2, to_WINDOWS_1252_C5,
+     to_WINDOWS_1252_C6, to_WINDOWS_1252_CB,
+         to_US_ASCII_E0,     to_US_ASCII_E1,
+     to_WINDOWS_1250_E2,     to_US_ASCII_ED,
+         to_US_ASCII_F0,     to_US_ASCII_F1,
+         to_US_ASCII_F4,
+
+#define to_WINDOWS_1252 WORDINDEX2INFO(4740)
+    to_WINDOWS_1252_offsets,
+    to_WINDOWS_1252_infos,
+
+#define from_WINDOWS_1253_infos WORDINDEX2INFO(4742)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+          o2(0xC6,0x92), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1), o3(0xE2,0x80,0xB0),
+     o3(0xE2,0x80,0xB9), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0xA2),
+     o3(0xE2,0x80,0x93), o3(0xE2,0x80,0x94),
+     o3(0xE2,0x84,0xA2), o3(0xE2,0x80,0xBA),
+          o2(0xC2,0xA0),      o2(0xCE,0x85),
+          o2(0xCE,0x86),      o2(0xC2,0xA3),
+          o2(0xC2,0xA4),      o2(0xC2,0xA5),
+          o2(0xC2,0xA6),      o2(0xC2,0xA7),
+          o2(0xC2,0xA8),      o2(0xC2,0xA9),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+     o3(0xE2,0x80,0x95),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xCE,0x84),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xCE,0x88),
+          o2(0xCE,0x89),      o2(0xCE,0x8A),
+          o2(0xC2,0xBB),      o2(0xCE,0x8C),
+          o2(0xC2,0xBD),      o2(0xCE,0x8E),
+          o2(0xCE,0x8F),      o2(0xCE,0x90),
+          o2(0xCE,0x91),      o2(0xCE,0x92),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x95),      o2(0xCE,0x96),
+          o2(0xCE,0x97),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9B),      o2(0xCE,0x9C),
+          o2(0xCE,0x9D),      o2(0xCE,0x9E),
+          o2(0xCE,0x9F),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1),      o2(0xCE,0xA3),
+          o2(0xCE,0xA4),      o2(0xCE,0xA5),
+          o2(0xCE,0xA6),      o2(0xCE,0xA7),
+          o2(0xCE,0xA8),      o2(0xCE,0xA9),
+          o2(0xCE,0xAA),      o2(0xCE,0xAB),
+          o2(0xCE,0xAC),      o2(0xCE,0xAD),
+          o2(0xCE,0xAE),      o2(0xCE,0xAF),
+          o2(0xCE,0xB0),      o2(0xCE,0xB1),
+          o2(0xCE,0xB2),      o2(0xCE,0xB3),
+          o2(0xCE,0xB4),      o2(0xCE,0xB5),
+          o2(0xCE,0xB6),      o2(0xCE,0xB7),
+          o2(0xCE,0xB8),      o2(0xCE,0xB9),
+          o2(0xCE,0xBA),      o2(0xCE,0xBB),
+          o2(0xCE,0xBC),      o2(0xCE,0xBD),
+          o2(0xCE,0xBE),      o2(0xCE,0xBF),
+          o2(0xCF,0x80),      o2(0xCF,0x81),
+          o2(0xCF,0x82),      o2(0xCF,0x83),
+          o2(0xCF,0x84),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xCF,0x88),      o2(0xCF,0x89),
+          o2(0xCF,0x8A),      o2(0xCF,0x8B),
+          o2(0xCF,0x8C),      o2(0xCF,0x8D),
+          o2(0xCF,0x8E),
+
+#define from_WINDOWS_1253 WORDINDEX2INFO(4855)
+    from_WINDOWS_1253_offsets,
+    from_WINDOWS_1253_infos,
+
+#define to_WINDOWS_1253_C2_infos WORDINDEX2INFO(4857)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA3),
+     o1(0xA4), o1(0xA5), o1(0xA6), o1(0xA7),
+     o1(0xA8), o1(0xA9), o1(0xAB), o1(0xAC),
+     o1(0xAD), o1(0xAE), o1(0xB0), o1(0xB1),
+     o1(0xB2), o1(0xB3), o1(0xB5), o1(0xB6),
+     o1(0xB7), o1(0xBB), o1(0xBD),
+
+#define to_WINDOWS_1253_C2 WORDINDEX2INFO(4880)
+    to_WINDOWS_1253_C2_offsets,
+    to_WINDOWS_1253_C2_infos,
+
+#define to_WINDOWS_1253_CE_infos WORDINDEX2INFO(4882)
+      INVALID,    UNDEF, o1(0xB4), o1(0xA1),
+     o1(0xA2), o1(0xB8), o1(0xB9), o1(0xBA),
+     o1(0xBC), o1(0xBE), o1(0xBF), o1(0xC0),
+     o1(0xC1), o1(0xC2), o1(0xC3), o1(0xC4),
+     o1(0xC5), o1(0xC6), o1(0xC7), o1(0xC8),
+     o1(0xC9), o1(0xCA), o1(0xCB), o1(0xCC),
+     o1(0xCD), o1(0xCE), o1(0xCF), o1(0xD0),
+     o1(0xD1), o1(0xD3), o1(0xD4), o1(0xD5),
+     o1(0xD6), o1(0xD7), o1(0xD8), o1(0xD9),
+     o1(0xDA), o1(0xDB), o1(0xDC), o1(0xDD),
+     o1(0xDE), o1(0xDF), o1(0xE0), o1(0xE1),
+     o1(0xE2), o1(0xE3), o1(0xE4), o1(0xE5),
+     o1(0xE6), o1(0xE7), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEF),
+
+#define to_WINDOWS_1253_CE WORDINDEX2INFO(4940)
+    to_ISO_8859_7_CE_offsets,
+    to_WINDOWS_1253_CE_infos,
+
+#define to_WINDOWS_1253_E2_80_infos WORDINDEX2INFO(4942)
+      INVALID,    UNDEF, o1(0x96), o1(0x97),
+     o1(0xAF), o1(0x91), o1(0x92), o1(0x82),
+     o1(0x93), o1(0x94), o1(0x84), o1(0x86),
+     o1(0x87), o1(0x95), o1(0x85), o1(0x89),
+     o1(0x8B), o1(0x9B),
+
+#define to_WINDOWS_1253_E2_80 WORDINDEX2INFO(4960)
+    to_WINDOWS_1253_E2_80_offsets,
+    to_WINDOWS_1253_E2_80_infos,
+
+#define to_WINDOWS_1253_E2_infos WORDINDEX2INFO(4962)
+                   INVALID, to_WINDOWS_1253_E2_80,
+            to_US_ASCII_C2,  to_WINDOWS_874_E2_82,
+     to_WINDOWS_1250_E2_84,
+
+#define to_WINDOWS_1253_E2 WORDINDEX2INFO(4967)
+    to_WINDOWS_1250_E2_offsets,
+    to_WINDOWS_1253_E2_infos,
+
+#define to_WINDOWS_1253_infos WORDINDEX2INFO(4969)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1253_C2,     to_US_ASCII_C2,
+     to_WINDOWS_1252_C6, to_WINDOWS_1253_CE,
+       to_ISO_8859_7_CF,     to_US_ASCII_E0,
+         to_US_ASCII_E1, to_WINDOWS_1253_E2,
+         to_US_ASCII_ED,     to_US_ASCII_F0,
+         to_US_ASCII_F1,     to_US_ASCII_F4,
+
+#define to_WINDOWS_1253 WORDINDEX2INFO(4983)
+    to_WINDOWS_1253_offsets,
+    to_WINDOWS_1253_infos,
+
+#define from_WINDOWS_1254_infos WORDINDEX2INFO(4985)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+          o2(0xC6,0x92), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xCB,0x86),
+     o3(0xE2,0x80,0xB0),      o2(0xC5,0xA0),
+     o3(0xE2,0x80,0xB9),      o2(0xC5,0x92),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE2,0x80,0xA2), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94),      o2(0xCB,0x9C),
+     o3(0xE2,0x84,0xA2),      o2(0xC5,0xA1),
+     o3(0xE2,0x80,0xBA),      o2(0xC5,0x93),
+          o2(0xC5,0xB8),      o2(0xC2,0xA0),
+          o2(0xC2,0xA1),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+          o2(0xC2,0xA5),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xC2,0xAA),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC2,0xAF),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xC2,0xB4),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC2,0xB8),
+          o2(0xC2,0xB9),      o2(0xC2,0xBA),
+          o2(0xC2,0xBB),      o2(0xC2,0xBC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBE),
+          o2(0xC2,0xBF),      o2(0xC3,0x80),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x83),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x86),
+          o2(0xC3,0x87),      o2(0xC3,0x88),
+          o2(0xC3,0x89),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x8C),
+          o2(0xC3,0x8D),      o2(0xC3,0x8E),
+          o2(0xC3,0x8F),      o2(0xC4,0x9E),
+          o2(0xC3,0x91),      o2(0xC3,0x92),
+          o2(0xC3,0x93),      o2(0xC3,0x94),
+          o2(0xC3,0x95),      o2(0xC3,0x96),
+          o2(0xC3,0x97),      o2(0xC3,0x98),
+          o2(0xC3,0x99),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x9C),
+          o2(0xC4,0xB0),      o2(0xC5,0x9E),
+          o2(0xC3,0x9F),      o2(0xC3,0xA0),
+          o2(0xC3,0xA1),      o2(0xC3,0xA2),
+          o2(0xC3,0xA3),      o2(0xC3,0xA4),
+          o2(0xC3,0xA5),      o2(0xC3,0xA6),
+          o2(0xC3,0xA7),      o2(0xC3,0xA8),
+          o2(0xC3,0xA9),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAC),
+          o2(0xC3,0xAD),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC4,0x9F),
+          o2(0xC3,0xB1),      o2(0xC3,0xB2),
+          o2(0xC3,0xB3),      o2(0xC3,0xB4),
+          o2(0xC3,0xB5),      o2(0xC3,0xB6),
+          o2(0xC3,0xB7),      o2(0xC3,0xB8),
+          o2(0xC3,0xB9),      o2(0xC3,0xBA),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+          o2(0xC4,0xB1),      o2(0xC5,0x9F),
+          o2(0xC3,0xBF),
+
+#define from_WINDOWS_1254 WORDINDEX2INFO(5108)
+    from_WINDOWS_1254_offsets,
+    from_WINDOWS_1254_infos,
+
+#define to_WINDOWS_1254_C5_infos WORDINDEX2INFO(5110)
+      INVALID,    UNDEF, o1(0x8C), o1(0x9C),
+     o1(0xDE), o1(0xFE), o1(0x8A), o1(0x9A),
+     o1(0x9F),
+
+#define to_WINDOWS_1254_C5 WORDINDEX2INFO(5119)
+    to_WINDOWS_1254_C5_offsets,
+    to_WINDOWS_1254_C5_infos,
+
+#define to_WINDOWS_1254_infos WORDINDEX2INFO(5121)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1252_C2,   to_ISO_8859_9_C3,
+       to_ISO_8859_9_C4, to_WINDOWS_1254_C5,
+     to_WINDOWS_1252_C6,     to_US_ASCII_C2,
+     to_WINDOWS_1252_CB,     to_US_ASCII_E0,
+         to_US_ASCII_E1, to_WINDOWS_1250_E2,
+         to_US_ASCII_ED,     to_US_ASCII_F0,
+         to_US_ASCII_F1,     to_US_ASCII_F4,
+
+#define to_WINDOWS_1254 WORDINDEX2INFO(5137)
+    to_WINDOWS_1254_offsets,
+    to_WINDOWS_1254_infos,
+
+#define from_WINDOWS_1255_infos WORDINDEX2INFO(5139)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+          o2(0xC6,0x92), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xCB,0x86),
+     o3(0xE2,0x80,0xB0), o3(0xE2,0x80,0xB9),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE2,0x80,0xA2), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94),      o2(0xCB,0x9C),
+     o3(0xE2,0x84,0xA2), o3(0xE2,0x80,0xBA),
+          o2(0xC2,0xA0),      o2(0xC2,0xA1),
+          o2(0xC2,0xA2),      o2(0xC2,0xA3),
+     o3(0xE2,0x82,0xAA),      o2(0xC2,0xA5),
+          o2(0xC2,0xA6),      o2(0xC2,0xA7),
+          o2(0xC2,0xA8),      o2(0xC2,0xA9),
+          o2(0xC3,0x97),      o2(0xC2,0xAB),
+          o2(0xC2,0xAC),      o2(0xC2,0xAD),
+          o2(0xC2,0xAE),      o2(0xC2,0xAF),
+          o2(0xC2,0xB0),      o2(0xC2,0xB1),
+          o2(0xC2,0xB2),      o2(0xC2,0xB3),
+          o2(0xC2,0xB4),      o2(0xC2,0xB5),
+          o2(0xC2,0xB6),      o2(0xC2,0xB7),
+          o2(0xC2,0xB8),      o2(0xC2,0xB9),
+          o2(0xC3,0xB7),      o2(0xC2,0xBB),
+          o2(0xC2,0xBC),      o2(0xC2,0xBD),
+          o2(0xC2,0xBE),      o2(0xC2,0xBF),
+          o2(0xD6,0xB0),      o2(0xD6,0xB1),
+          o2(0xD6,0xB2),      o2(0xD6,0xB3),
+          o2(0xD6,0xB4),      o2(0xD6,0xB5),
+          o2(0xD6,0xB6),      o2(0xD6,0xB7),
+          o2(0xD6,0xB8),      o2(0xD6,0xB9),
+          o2(0xD6,0xBB),      o2(0xD6,0xBC),
+          o2(0xD6,0xBD),      o2(0xD6,0xBE),
+          o2(0xD6,0xBF),      o2(0xD7,0x80),
+          o2(0xD7,0x81),      o2(0xD7,0x82),
+          o2(0xD7,0x83),      o2(0xD7,0xB0),
+          o2(0xD7,0xB1),      o2(0xD7,0xB2),
+          o2(0xD7,0xB3),      o2(0xD7,0xB4),
+          o2(0xD7,0x90),      o2(0xD7,0x91),
+          o2(0xD7,0x92),      o2(0xD7,0x93),
+          o2(0xD7,0x94),      o2(0xD7,0x95),
+          o2(0xD7,0x96),      o2(0xD7,0x97),
+          o2(0xD7,0x98),      o2(0xD7,0x99),
+          o2(0xD7,0x9A),      o2(0xD7,0x9B),
+          o2(0xD7,0x9C),      o2(0xD7,0x9D),
+          o2(0xD7,0x9E),      o2(0xD7,0x9F),
+          o2(0xD7,0xA0),      o2(0xD7,0xA1),
+          o2(0xD7,0xA2),      o2(0xD7,0xA3),
+          o2(0xD7,0xA4),      o2(0xD7,0xA5),
+          o2(0xD7,0xA6),      o2(0xD7,0xA7),
+          o2(0xD7,0xA8),      o2(0xD7,0xA9),
+          o2(0xD7,0xAA), o3(0xE2,0x80,0x8E),
+     o3(0xE2,0x80,0x8F),
+
+#define from_WINDOWS_1255 WORDINDEX2INFO(5246)
+    from_WINDOWS_1255_offsets,
+    from_WINDOWS_1255_infos,
+
+#define to_WINDOWS_1255_C2_infos WORDINDEX2INFO(5248)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA1),
+     o1(0xA2), o1(0xA3), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAB),
+     o1(0xAC), o1(0xAD), o1(0xAE), o1(0xAF),
+     o1(0xB0), o1(0xB1), o1(0xB2), o1(0xB3),
+     o1(0xB4), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xB9), o1(0xBB), o1(0xBC),
+     o1(0xBD), o1(0xBE), o1(0xBF),
+
+#define to_WINDOWS_1255_C2 WORDINDEX2INFO(5279)
+    to_WINDOWS_1255_C2_offsets,
+    to_WINDOWS_1255_C2_infos,
+
+#define to_WINDOWS_1255_D6_infos WORDINDEX2INFO(5281)
+      INVALID,    UNDEF, o1(0xC0), o1(0xC1),
+     o1(0xC2), o1(0xC3), o1(0xC4), o1(0xC5),
+     o1(0xC6), o1(0xC7), o1(0xC8), o1(0xC9),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF),
+
+#define to_WINDOWS_1255_D6 WORDINDEX2INFO(5298)
+    to_WINDOWS_1255_D6_offsets,
+    to_WINDOWS_1255_D6_infos,
+
+#define to_WINDOWS_1255_D7_infos WORDINDEX2INFO(5300)
+      INVALID, o1(0xD0), o1(0xD1), o1(0xD2),
+     o1(0xD3),    UNDEF, o1(0xE0), o1(0xE1),
+     o1(0xE2), o1(0xE3), o1(0xE4), o1(0xE5),
+     o1(0xE6), o1(0xE7), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEF), o1(0xF0), o1(0xF1),
+     o1(0xF2), o1(0xF3), o1(0xF4), o1(0xF5),
+     o1(0xF6), o1(0xF7), o1(0xF8), o1(0xF9),
+     o1(0xFA), o1(0xD4), o1(0xD5), o1(0xD6),
+     o1(0xD7), o1(0xD8),
+
+#define to_WINDOWS_1255_D7 WORDINDEX2INFO(5338)
+    to_WINDOWS_1255_D7_offsets,
+    to_WINDOWS_1255_D7_infos,
+
+#define to_WINDOWS_1255_E2_80_infos WORDINDEX2INFO(5340)
+      INVALID,    UNDEF, o1(0xFD), o1(0xFE),
+     o1(0x96), o1(0x97), o1(0x91), o1(0x92),
+     o1(0x82), o1(0x93), o1(0x94), o1(0x84),
+     o1(0x86), o1(0x87), o1(0x95), o1(0x85),
+     o1(0x89), o1(0x8B), o1(0x9B),
+
+#define to_WINDOWS_1255_E2_80 WORDINDEX2INFO(5359)
+    to_WINDOWS_1255_E2_80_offsets,
+    to_WINDOWS_1255_E2_80_infos,
+
+#define to_WINDOWS_1255_E2_82_infos WORDINDEX2INFO(5361)
+      INVALID,    UNDEF, o1(0xA4), o1(0x80),
+
+#define to_WINDOWS_1255_E2_82 WORDINDEX2INFO(5365)
+    to_WINDOWS_1255_E2_82_offsets,
+    to_WINDOWS_1255_E2_82_infos,
+
+#define to_WINDOWS_1255_E2_infos WORDINDEX2INFO(5367)
+                   INVALID, to_WINDOWS_1255_E2_80,
+            to_US_ASCII_C2, to_WINDOWS_1255_E2_82,
+     to_WINDOWS_1250_E2_84,
+
+#define to_WINDOWS_1255_E2 WORDINDEX2INFO(5372)
+    to_WINDOWS_1250_E2_offsets,
+    to_WINDOWS_1255_E2_infos,
+
+#define to_WINDOWS_1255_EF_AC_infos WORDINDEX2INFO(5374)
+                INVALID,              UNDEF,
+          o2(0xE9,0xC4),      o2(0xD6,0xC7),
+          o2(0xF9,0xD1),      o2(0xF9,0xD2),
+     o3(0xF9,0xCC,0xD1), o3(0xF9,0xCC,0xD2),
+          o2(0xE0,0xC7),      o2(0xE0,0xC8),
+          o2(0xE0,0xCC),      o2(0xE1,0xCC),
+          o2(0xE2,0xCC),      o2(0xE3,0xCC),
+          o2(0xE4,0xCC),      o2(0xE5,0xCC),
+          o2(0xE6,0xCC),      o2(0xE8,0xCC),
+          o2(0xE9,0xCC),      o2(0xEA,0xCC),
+          o2(0xEB,0xCC),      o2(0xEC,0xCC),
+          o2(0xEE,0xCC),
+
+#define to_WINDOWS_1255_EF_AC WORDINDEX2INFO(5397)
+    to_WINDOWS_1255_EF_AC_offsets,
+    to_WINDOWS_1255_EF_AC_infos,
+
+#define to_WINDOWS_1255_EF_AD_infos WORDINDEX2INFO(5399)
+           INVALID, o2(0xF0,0xCC), o2(0xF1,0xCC),         UNDEF,
+     o2(0xF3,0xCC), o2(0xF4,0xCC), o2(0xF6,0xCC), o2(0xF7,0xCC),
+     o2(0xF8,0xCC), o2(0xF9,0xCC), o2(0xFA,0xCC), o2(0xE5,0xC9),
+     o2(0xE1,0xCF), o2(0xEB,0xCF), o2(0xF4,0xCF),
+
+#define to_WINDOWS_1255_EF_AD WORDINDEX2INFO(5414)
+    to_WINDOWS_1255_EF_AD_offsets,
+    to_WINDOWS_1255_EF_AD_infos,
+
+#define to_WINDOWS_1255_EF_infos WORDINDEX2INFO(5416)
+                   INVALID,        to_US_ASCII_C2,
+     to_WINDOWS_1255_EF_AC, to_WINDOWS_1255_EF_AD,
+
+#define to_WINDOWS_1255_EF WORDINDEX2INFO(5420)
+    to_WINDOWS_1255_EF_offsets,
+    to_WINDOWS_1255_EF_infos,
+
+#define to_WINDOWS_1255_infos WORDINDEX2INFO(5422)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1255_C2,   to_ISO_8859_8_C3,
+         to_US_ASCII_C2, to_WINDOWS_1252_C6,
+     to_WINDOWS_1252_CB, to_WINDOWS_1255_D6,
+     to_WINDOWS_1255_D7,     to_US_ASCII_E0,
+         to_US_ASCII_E1, to_WINDOWS_1255_E2,
+         to_US_ASCII_ED, to_WINDOWS_1255_EF,
+         to_US_ASCII_F0,     to_US_ASCII_F1,
+         to_US_ASCII_F4,
+
+#define to_WINDOWS_1255 WORDINDEX2INFO(5439)
+    to_WINDOWS_1255_offsets,
+    to_WINDOWS_1255_infos,
+
+#define from_WINDOWS_1256_infos WORDINDEX2INFO(5441)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+          o2(0xD9,0xBE), o3(0xE2,0x80,0x9A),
+          o2(0xC6,0x92), o3(0xE2,0x80,0x9E),
+     o3(0xE2,0x80,0xA6), o3(0xE2,0x80,0xA0),
+     o3(0xE2,0x80,0xA1),      o2(0xCB,0x86),
+     o3(0xE2,0x80,0xB0),      o2(0xD9,0xB9),
+     o3(0xE2,0x80,0xB9),      o2(0xC5,0x92),
+          o2(0xDA,0x86),      o2(0xDA,0x98),
+          o2(0xDA,0x88),      o2(0xDA,0xAF),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+     o3(0xE2,0x80,0x9C), o3(0xE2,0x80,0x9D),
+     o3(0xE2,0x80,0xA2), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94),      o2(0xDA,0xA9),
+     o3(0xE2,0x84,0xA2),      o2(0xDA,0x91),
+     o3(0xE2,0x80,0xBA),      o2(0xC5,0x93),
+     o3(0xE2,0x80,0x8C), o3(0xE2,0x80,0x8D),
+          o2(0xDA,0xBA),      o2(0xC2,0xA0),
+          o2(0xD8,0x8C),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+          o2(0xC2,0xA5),      o2(0xC2,0xA6),
+          o2(0xC2,0xA7),      o2(0xC2,0xA8),
+          o2(0xC2,0xA9),      o2(0xDA,0xBE),
+          o2(0xC2,0xAB),      o2(0xC2,0xAC),
+          o2(0xC2,0xAD),      o2(0xC2,0xAE),
+          o2(0xC2,0xAF),      o2(0xC2,0xB0),
+          o2(0xC2,0xB1),      o2(0xC2,0xB2),
+          o2(0xC2,0xB3),      o2(0xC2,0xB4),
+          o2(0xC2,0xB5),      o2(0xC2,0xB6),
+          o2(0xC2,0xB7),      o2(0xC2,0xB8),
+          o2(0xC2,0xB9),      o2(0xD8,0x9B),
+          o2(0xC2,0xBB),      o2(0xC2,0xBC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBE),
+          o2(0xD8,0x9F),      o2(0xDB,0x81),
+          o2(0xD8,0xA1),      o2(0xD8,0xA2),
+          o2(0xD8,0xA3),      o2(0xD8,0xA4),
+          o2(0xD8,0xA5),      o2(0xD8,0xA6),
+          o2(0xD8,0xA7),      o2(0xD8,0xA8),
+          o2(0xD8,0xA9),      o2(0xD8,0xAA),
+          o2(0xD8,0xAB),      o2(0xD8,0xAC),
+          o2(0xD8,0xAD),      o2(0xD8,0xAE),
+          o2(0xD8,0xAF),      o2(0xD8,0xB0),
+          o2(0xD8,0xB1),      o2(0xD8,0xB2),
+          o2(0xD8,0xB3),      o2(0xD8,0xB4),
+          o2(0xD8,0xB5),      o2(0xD8,0xB6),
+          o2(0xC3,0x97),      o2(0xD8,0xB7),
+          o2(0xD8,0xB8),      o2(0xD8,0xB9),
+          o2(0xD8,0xBA),      o2(0xD9,0x80),
+          o2(0xD9,0x81),      o2(0xD9,0x82),
+          o2(0xD9,0x83),      o2(0xC3,0xA0),
+          o2(0xD9,0x84),      o2(0xC3,0xA2),
+          o2(0xD9,0x85),      o2(0xD9,0x86),
+          o2(0xD9,0x87),      o2(0xD9,0x88),
+          o2(0xC3,0xA7),      o2(0xC3,0xA8),
+          o2(0xC3,0xA9),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xD9,0x89),
+          o2(0xD9,0x8A),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xD9,0x8B),
+          o2(0xD9,0x8C),      o2(0xD9,0x8D),
+          o2(0xD9,0x8E),      o2(0xC3,0xB4),
+          o2(0xD9,0x8F),      o2(0xD9,0x90),
+          o2(0xC3,0xB7),      o2(0xD9,0x91),
+          o2(0xC3,0xB9),      o2(0xD9,0x92),
+          o2(0xC3,0xBB),      o2(0xC3,0xBC),
+     o3(0xE2,0x80,0x8E), o3(0xE2,0x80,0x8F),
+          o2(0xDB,0x92),
+
+#define from_WINDOWS_1256 WORDINDEX2INFO(5570)
+    from_ISO_8859_1_offsets,
+    from_WINDOWS_1256_infos,
+
+#define to_WINDOWS_1256_C2_infos WORDINDEX2INFO(5572)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAB),
+     o1(0xAC), o1(0xAD), o1(0xAE), o1(0xAF),
+     o1(0xB0), o1(0xB1), o1(0xB2), o1(0xB3),
+     o1(0xB4), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xB9), o1(0xBB), o1(0xBC),
+     o1(0xBD), o1(0xBE),
+
+#define to_WINDOWS_1256_C2 WORDINDEX2INFO(5602)
+    to_WINDOWS_1256_C2_offsets,
+    to_WINDOWS_1256_C2_infos,
+
+#define to_WINDOWS_1256_C3_infos WORDINDEX2INFO(5604)
+      INVALID,    UNDEF, o1(0xD7), o1(0xE0),
+     o1(0xE2), o1(0xE7), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEE), o1(0xEF),
+     o1(0xF4), o1(0xF7), o1(0xF9), o1(0xFB),
+     o1(0xFC),
+
+#define to_WINDOWS_1256_C3 WORDINDEX2INFO(5621)
+    to_WINDOWS_1256_C3_offsets,
+    to_WINDOWS_1256_C3_infos,
+
+#define to_WINDOWS_1256_C5_infos WORDINDEX2INFO(5623)
+      INVALID,    UNDEF, o1(0x8C), o1(0x9C),
+
+#define to_WINDOWS_1256_C5 WORDINDEX2INFO(5627)
+    to_WINDOWS_1256_C5_offsets,
+    to_WINDOWS_1256_C5_infos,
+
+#define to_WINDOWS_1256_CB WORDINDEX2INFO(5629)
+    to_WINDOWS_1256_CB_offsets,
+    to_WINDOWS_1251_E2_82_infos,
+
+#define to_WINDOWS_1256_D8_infos WORDINDEX2INFO(5631)
+      INVALID,    UNDEF, o1(0xA1), o1(0xBA),
+     o1(0xBF), o1(0xC1), o1(0xC2), o1(0xC3),
+     o1(0xC4), o1(0xC5), o1(0xC6), o1(0xC7),
+     o1(0xC8), o1(0xC9), o1(0xCA), o1(0xCB),
+     o1(0xCC), o1(0xCD), o1(0xCE), o1(0xCF),
+     o1(0xD0), o1(0xD1), o1(0xD2), o1(0xD3),
+     o1(0xD4), o1(0xD5), o1(0xD6), o1(0xD8),
+     o1(0xD9), o1(0xDA), o1(0xDB),
+
+#define to_WINDOWS_1256_D8 WORDINDEX2INFO(5662)
+    to_ISO_8859_6_D8_offsets,
+    to_WINDOWS_1256_D8_infos,
+
+#define to_WINDOWS_1256_D9_infos WORDINDEX2INFO(5664)
+      INVALID, o1(0xDC), o1(0xDD), o1(0xDE),
+     o1(0xDF), o1(0xE1), o1(0xE3), o1(0xE4),
+     o1(0xE5), o1(0xE6), o1(0xEC), o1(0xED),
+     o1(0xF0), o1(0xF1), o1(0xF2), o1(0xF3),
+     o1(0xF5), o1(0xF6), o1(0xF8), o1(0xFA),
+        UNDEF, o1(0x8A), o1(0x81),
+
+#define to_WINDOWS_1256_D9 WORDINDEX2INFO(5687)
+    to_WINDOWS_1256_D9_offsets,
+    to_WINDOWS_1256_D9_infos,
+
+#define to_WINDOWS_1256_DA_infos WORDINDEX2INFO(5689)
+      INVALID,    UNDEF, o1(0x8D), o1(0x8F),
+     o1(0x9A), o1(0x8E), o1(0x98), o1(0x90),
+     o1(0x9F), o1(0xAA),
+
+#define to_WINDOWS_1256_DA WORDINDEX2INFO(5699)
+    to_WINDOWS_1256_DA_offsets,
+    to_WINDOWS_1256_DA_infos,
+
+#define to_WINDOWS_1256_DB_infos WORDINDEX2INFO(5701)
+      INVALID,    UNDEF, o1(0xC0), o1(0xFF),
+
+#define to_WINDOWS_1256_DB WORDINDEX2INFO(5705)
+    to_WINDOWS_1256_DB_offsets,
+    to_WINDOWS_1256_DB_infos,
+
+#define to_WINDOWS_1256_E2_80_infos WORDINDEX2INFO(5707)
+      INVALID,    UNDEF, o1(0x9D), o1(0x9E),
+     o1(0xFD), o1(0xFE), o1(0x96), o1(0x97),
+     o1(0x91), o1(0x92), o1(0x82), o1(0x93),
+     o1(0x94), o1(0x84), o1(0x86), o1(0x87),
+     o1(0x95), o1(0x85), o1(0x89), o1(0x8B),
+     o1(0x9B),
+
+#define to_WINDOWS_1256_E2_80 WORDINDEX2INFO(5728)
+    to_WINDOWS_1256_E2_80_offsets,
+    to_WINDOWS_1256_E2_80_infos,
+
+#define to_WINDOWS_1256_E2_infos WORDINDEX2INFO(5730)
+                   INVALID, to_WINDOWS_1256_E2_80,
+            to_US_ASCII_C2,  to_WINDOWS_874_E2_82,
+     to_WINDOWS_1250_E2_84,
+
+#define to_WINDOWS_1256_E2 WORDINDEX2INFO(5735)
+    to_WINDOWS_1250_E2_offsets,
+    to_WINDOWS_1256_E2_infos,
+
+#define to_WINDOWS_1256_infos WORDINDEX2INFO(5737)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1256_C2, to_WINDOWS_1256_C3,
+         to_US_ASCII_C2, to_WINDOWS_1256_C5,
+     to_WINDOWS_1252_C6, to_WINDOWS_1256_CB,
+     to_WINDOWS_1256_D8, to_WINDOWS_1256_D9,
+     to_WINDOWS_1256_DA, to_WINDOWS_1256_DB,
+         to_US_ASCII_E0,     to_US_ASCII_E1,
+     to_WINDOWS_1256_E2,     to_US_ASCII_ED,
+         to_US_ASCII_F0,     to_US_ASCII_F1,
+         to_US_ASCII_F4,
+
+#define to_WINDOWS_1256 WORDINDEX2INFO(5756)
+    to_WINDOWS_1256_offsets,
+    to_WINDOWS_1256_infos,
+
+#define from_WINDOWS_1257_infos WORDINDEX2INFO(5758)
+                  NOMAP, o3(0xE2,0x82,0xAC),
+                  UNDEF, o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xA6),
+     o3(0xE2,0x80,0xA0), o3(0xE2,0x80,0xA1),
+     o3(0xE2,0x80,0xB0), o3(0xE2,0x80,0xB9),
+          o2(0xC2,0xA8),      o2(0xCB,0x87),
+          o2(0xC2,0xB8), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0xA2),
+     o3(0xE2,0x80,0x93), o3(0xE2,0x80,0x94),
+     o3(0xE2,0x84,0xA2), o3(0xE2,0x80,0xBA),
+          o2(0xC2,0xAF),      o2(0xCB,0x9B),
+          o2(0xC2,0xA0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA4),
+          o2(0xC2,0xA6),      o2(0xC2,0xA7),
+          o2(0xC3,0x98),      o2(0xC2,0xA9),
+          o2(0xC5,0x96),      o2(0xC2,0xAB),
+          o2(0xC2,0xAC),      o2(0xC2,0xAD),
+          o2(0xC2,0xAE),      o2(0xC3,0x86),
+          o2(0xC2,0xB0),      o2(0xC2,0xB1),
+          o2(0xC2,0xB2),      o2(0xC2,0xB3),
+          o2(0xC2,0xB4),      o2(0xC2,0xB5),
+          o2(0xC2,0xB6),      o2(0xC2,0xB7),
+          o2(0xC3,0xB8),      o2(0xC2,0xB9),
+          o2(0xC5,0x97),      o2(0xC2,0xBB),
+          o2(0xC2,0xBC),      o2(0xC2,0xBD),
+          o2(0xC2,0xBE),      o2(0xC3,0xA6),
+          o2(0xC4,0x84),      o2(0xC4,0xAE),
+          o2(0xC4,0x80),      o2(0xC4,0x86),
+          o2(0xC3,0x84),      o2(0xC3,0x85),
+          o2(0xC4,0x98),      o2(0xC4,0x92),
+          o2(0xC4,0x8C),      o2(0xC3,0x89),
+          o2(0xC5,0xB9),      o2(0xC4,0x96),
+          o2(0xC4,0xA2),      o2(0xC4,0xB6),
+          o2(0xC4,0xAA),      o2(0xC4,0xBB),
+          o2(0xC5,0xA0),      o2(0xC5,0x83),
+          o2(0xC5,0x85),      o2(0xC3,0x93),
+          o2(0xC5,0x8C),      o2(0xC3,0x95),
+          o2(0xC3,0x96),      o2(0xC3,0x97),
+          o2(0xC5,0xB2),      o2(0xC5,0x81),
+          o2(0xC5,0x9A),      o2(0xC5,0xAA),
+          o2(0xC3,0x9C),      o2(0xC5,0xBB),
+          o2(0xC5,0xBD),      o2(0xC3,0x9F),
+          o2(0xC4,0x85),      o2(0xC4,0xAF),
+          o2(0xC4,0x81),      o2(0xC4,0x87),
+          o2(0xC3,0xA4),      o2(0xC3,0xA5),
+          o2(0xC4,0x99),      o2(0xC4,0x93),
+          o2(0xC4,0x8D),      o2(0xC3,0xA9),
+          o2(0xC5,0xBA),      o2(0xC4,0x97),
+          o2(0xC4,0xA3),      o2(0xC4,0xB7),
+          o2(0xC4,0xAB),      o2(0xC4,0xBC),
+          o2(0xC5,0xA1),      o2(0xC5,0x84),
+          o2(0xC5,0x86),      o2(0xC3,0xB3),
+          o2(0xC5,0x8D),      o2(0xC3,0xB5),
+          o2(0xC3,0xB6),      o2(0xC3,0xB7),
+          o2(0xC5,0xB3),      o2(0xC5,0x82),
+          o2(0xC5,0x9B),      o2(0xC5,0xAB),
+          o2(0xC3,0xBC),      o2(0xC5,0xBC),
+          o2(0xC5,0xBE),      o2(0xCB,0x99),
+
+#define from_WINDOWS_1257 WORDINDEX2INFO(5876)
+    from_WINDOWS_1257_offsets,
+    from_WINDOWS_1257_infos,
+
+#define to_WINDOWS_1257_C2_infos WORDINDEX2INFO(5878)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA2),
+     o1(0xA3), o1(0xA4), o1(0xA6), o1(0xA7),
+     o1(0x8D), o1(0xA9), o1(0xAB), o1(0xAC),
+     o1(0xAD), o1(0xAE), o1(0x9D), o1(0xB0),
+     o1(0xB1), o1(0xB2), o1(0xB3), o1(0xB4),
+     o1(0xB5), o1(0xB6), o1(0xB7), o1(0x8F),
+     o1(0xB9), o1(0xBB), o1(0xBC), o1(0xBD),
+     o1(0xBE),
+
+#define to_WINDOWS_1257_C2 WORDINDEX2INFO(5907)
+    to_WINDOWS_1257_C2_offsets,
+    to_WINDOWS_1257_C2_infos,
+
+#define to_WINDOWS_1257_CB_infos WORDINDEX2INFO(5909)
+      INVALID,    UNDEF, o1(0x8E), o1(0xFF),
+     o1(0x9E),
+
+#define to_WINDOWS_1257_CB WORDINDEX2INFO(5914)
+    to_ISO_8859_4_CB_offsets,
+    to_WINDOWS_1257_CB_infos,
+
+#define to_WINDOWS_1257_infos WORDINDEX2INFO(5916)
+                  NOMAP,            INVALID,
+     to_WINDOWS_1257_C2,  to_ISO_8859_13_C3,
+      to_ISO_8859_13_C4,  to_ISO_8859_13_C5,
+         to_US_ASCII_C2, to_WINDOWS_1257_CB,
+         to_US_ASCII_E0,     to_US_ASCII_E1,
+     to_WINDOWS_1250_E2,     to_US_ASCII_ED,
+         to_US_ASCII_F0,     to_US_ASCII_F1,
+         to_US_ASCII_F4,
+
+#define to_WINDOWS_1257 WORDINDEX2INFO(5931)
+    to_WINDOWS_1250_offsets,
+    to_WINDOWS_1257_infos,
+
+#define from_IBM437_infos WORDINDEX2INFO(5933)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA0),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0xAF),      o2(0xC3,0xAE),
+          o2(0xC3,0xAC),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB2),      o2(0xC3,0xBB),
+          o2(0xC3,0xB9),      o2(0xC3,0xBF),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC2,0xA2),      o2(0xC2,0xA3),
+          o2(0xC2,0xA5), o3(0xE2,0x82,0xA7),
+          o2(0xC6,0x92),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC2,0xAA),
+          o2(0xC2,0xBA),      o2(0xC2,0xBF),
+     o3(0xE2,0x8C,0x90),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM437 WORDINDEX2INFO(6062)
+    from_ISO_8859_1_offsets,
+    from_IBM437_infos,
+
+#define to_IBM437_C2_infos WORDINDEX2INFO(6064)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0x9B), o1(0x9C), o1(0x9D), o1(0xA6),
+     o1(0xAE), o1(0xAA), o1(0xF8), o1(0xF1),
+     o1(0xFD), o1(0xE6), o1(0xFA), o1(0xA7),
+     o1(0xAF), o1(0xAC), o1(0xAB), o1(0xA8),
+
+#define to_IBM437_C2 WORDINDEX2INFO(6084)
+    to_IBM437_C2_offsets,
+    to_IBM437_C2_infos,
+
+#define to_IBM437_C3_infos WORDINDEX2INFO(6086)
+      INVALID,    UNDEF, o1(0x8E), o1(0x8F),
+     o1(0x92), o1(0x80), o1(0x90), o1(0xA5),
+     o1(0x99), o1(0x9A), o1(0xE1), o1(0x85),
+     o1(0xA0), o1(0x83), o1(0x84), o1(0x86),
+     o1(0x91), o1(0x87), o1(0x8A), o1(0x82),
+     o1(0x88), o1(0x89), o1(0x8D), o1(0xA1),
+     o1(0x8C), o1(0x8B), o1(0xA4), o1(0x95),
+     o1(0xA2), o1(0x93), o1(0x94), o1(0xF6),
+     o1(0x97), o1(0xA3), o1(0x96), o1(0x81),
+     o1(0x98),
+
+#define to_IBM437_C3 WORDINDEX2INFO(6123)
+    to_IBM437_C3_offsets,
+    to_IBM437_C3_infos,
+
+#define to_IBM437_C6_infos WORDINDEX2INFO(6125)
+      INVALID,    UNDEF, o1(0x9F),
+
+#define to_IBM437_C6 WORDINDEX2INFO(6128)
+    to_WINDOWS_1252_C6_offsets,
+    to_IBM437_C6_infos,
+
+#define to_IBM437_CE_infos WORDINDEX2INFO(6130)
+      INVALID,    UNDEF, o1(0xE2), o1(0xE9),
+     o1(0xE4), o1(0xE8), o1(0xEA), o1(0xE0),
+     o1(0xEB), o1(0xEE),
+
+#define to_IBM437_CE WORDINDEX2INFO(6140)
+    to_IBM437_CE_offsets,
+    to_IBM437_CE_infos,
+
+#define to_IBM437_CF_infos WORDINDEX2INFO(6142)
+      INVALID, o1(0xE3),    UNDEF, o1(0xE5),
+     o1(0xE7), o1(0xED),
+
+#define to_IBM437_CF WORDINDEX2INFO(6148)
+    to_IBM437_CF_offsets,
+    to_IBM437_CF_infos,
+
+#define to_IBM437_E2_81_infos WORDINDEX2INFO(6150)
+      INVALID,    UNDEF, o1(0xFC),
+
+#define to_IBM437_E2_81 WORDINDEX2INFO(6153)
+    to_IBM437_E2_81_offsets,
+    to_IBM437_E2_81_infos,
+
+#define to_IBM437_E2_82_infos WORDINDEX2INFO(6155)
+      INVALID,    UNDEF, o1(0x9E),
+
+#define to_IBM437_E2_82 WORDINDEX2INFO(6158)
+    to_IBM437_E2_82_offsets,
+    to_IBM437_E2_82_infos,
+
+#define to_IBM437_E2_88_infos WORDINDEX2INFO(6160)
+      INVALID,    UNDEF, o1(0xF9), o1(0xFB),
+     o1(0xEC), o1(0xEF),
+
+#define to_IBM437_E2_88 WORDINDEX2INFO(6166)
+    to_IBM437_E2_88_offsets,
+    to_IBM437_E2_88_infos,
+
+#define to_IBM437_E2_89_infos WORDINDEX2INFO(6168)
+      INVALID,    UNDEF, o1(0xF7), o1(0xF0),
+     o1(0xF3), o1(0xF2),
+
+#define to_IBM437_E2_89 WORDINDEX2INFO(6174)
+    to_IBM437_E2_89_offsets,
+    to_IBM437_E2_89_infos,
+
+#define to_IBM437_E2_8C_infos WORDINDEX2INFO(6176)
+      INVALID,    UNDEF, o1(0xA9), o1(0xF4),
+     o1(0xF5),
+
+#define to_IBM437_E2_8C WORDINDEX2INFO(6181)
+    to_IBM437_E2_8C_offsets,
+    to_IBM437_E2_8C_infos,
+
+#define to_IBM437_E2_94_infos WORDINDEX2INFO(6183)
+      INVALID, o1(0xC4),    UNDEF, o1(0xB3),
+     o1(0xDA), o1(0xBF), o1(0xC0), o1(0xD9),
+     o1(0xC3), o1(0xB4), o1(0xC2), o1(0xC1),
+     o1(0xC5),
+
+#define to_IBM437_E2_94 WORDINDEX2INFO(6196)
+    to_IBM437_E2_94_offsets,
+    to_IBM437_E2_94_infos,
+
+#define to_IBM437_E2_95_infos WORDINDEX2INFO(6198)
+      INVALID,    UNDEF, o1(0xCD), o1(0xBA),
+     o1(0xD5), o1(0xD6), o1(0xC9), o1(0xB8),
+     o1(0xB7), o1(0xBB), o1(0xD4), o1(0xD3),
+     o1(0xC8), o1(0xBE), o1(0xBD), o1(0xBC),
+     o1(0xC6), o1(0xC7), o1(0xCC), o1(0xB5),
+     o1(0xB6), o1(0xB9), o1(0xD1), o1(0xD2),
+     o1(0xCB), o1(0xCF), o1(0xD0), o1(0xCA),
+     o1(0xD8), o1(0xD7), o1(0xCE),
+
+#define to_IBM437_E2_95 WORDINDEX2INFO(6229)
+    to_IBM437_E2_95_offsets,
+    to_IBM437_E2_95_infos,
+
+#define to_IBM437_E2_96_infos WORDINDEX2INFO(6231)
+      INVALID, o1(0xDF),    UNDEF, o1(0xDC),
+     o1(0xDB), o1(0xDD), o1(0xDE), o1(0xB0),
+     o1(0xB1), o1(0xB2), o1(0xFE),
+
+#define to_IBM437_E2_96 WORDINDEX2INFO(6242)
+    to_IBM437_E2_96_offsets,
+    to_IBM437_E2_96_infos,
+
+#define to_IBM437_E2_infos WORDINDEX2INFO(6244)
+             INVALID,  to_US_ASCII_C2, to_IBM437_E2_81, to_IBM437_E2_82,
+     to_IBM437_E2_88, to_IBM437_E2_89, to_IBM437_E2_8C, to_IBM437_E2_94,
+     to_IBM437_E2_95, to_IBM437_E2_96,
+
+#define to_IBM437_E2 WORDINDEX2INFO(6254)
+    to_IBM437_E2_offsets,
+    to_IBM437_E2_infos,
+
+#define to_IBM437_infos WORDINDEX2INFO(6256)
+              NOMAP,        INVALID,   to_IBM437_C2,   to_IBM437_C3,
+     to_US_ASCII_C2,   to_IBM437_C6,   to_IBM437_CE,   to_IBM437_CF,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM437_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM437 WORDINDEX2INFO(6271)
+    to_IBM437_offsets,
+    to_IBM437_infos,
+
+#define from_IBM775_infos WORDINDEX2INFO(6273)
+                  NOMAP,      o2(0xC4,0x86),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC4,0x81),      o2(0xC3,0xA4),
+          o2(0xC4,0xA3),      o2(0xC3,0xA5),
+          o2(0xC4,0x87),      o2(0xC5,0x82),
+          o2(0xC4,0x93),      o2(0xC5,0x96),
+          o2(0xC5,0x97),      o2(0xC4,0xAB),
+          o2(0xC5,0xB9),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC5,0x8D),      o2(0xC3,0xB6),
+          o2(0xC4,0xA2),      o2(0xC2,0xA2),
+          o2(0xC5,0x9A),      o2(0xC5,0x9B),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xB8),      o2(0xC2,0xA3),
+          o2(0xC3,0x98),      o2(0xC3,0x97),
+          o2(0xC2,0xA4),      o2(0xC4,0x80),
+          o2(0xC4,0xAA),      o2(0xC3,0xB3),
+          o2(0xC5,0xBB),      o2(0xC5,0xBC),
+          o2(0xC5,0xBA), o3(0xE2,0x80,0x9D),
+          o2(0xC2,0xA6),      o2(0xC2,0xA9),
+          o2(0xC2,0xAE),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC5,0x81),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xC4,0x84),      o2(0xC4,0x8C),
+          o2(0xC4,0x98),      o2(0xC4,0x96),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xC4,0xAE),      o2(0xC5,0xA0),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xC5,0xB2),
+          o2(0xC5,0xAA), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC5,0xBD),      o2(0xC4,0x85),
+          o2(0xC4,0x8D),      o2(0xC4,0x99),
+          o2(0xC4,0x97),      o2(0xC4,0xAF),
+          o2(0xC5,0xA1),      o2(0xC5,0xB3),
+          o2(0xC5,0xAB),      o2(0xC5,0xBE),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xC3,0x93),
+          o2(0xC3,0x9F),      o2(0xC5,0x8C),
+          o2(0xC5,0x83),      o2(0xC3,0xB5),
+          o2(0xC3,0x95),      o2(0xC2,0xB5),
+          o2(0xC5,0x84),      o2(0xC4,0xB6),
+          o2(0xC4,0xB7),      o2(0xC4,0xBB),
+          o2(0xC4,0xBC),      o2(0xC5,0x86),
+          o2(0xC4,0x92),      o2(0xC5,0x85),
+     o3(0xE2,0x80,0x99),      o2(0xC2,0xAD),
+          o2(0xC2,0xB1), o3(0xE2,0x80,0x9C),
+          o2(0xC2,0xBE),      o2(0xC2,0xB6),
+          o2(0xC2,0xA7),      o2(0xC3,0xB7),
+     o3(0xE2,0x80,0x9E),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+          o2(0xC2,0xB9),      o2(0xC2,0xB3),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM775 WORDINDEX2INFO(6402)
+    from_ISO_8859_1_offsets,
+    from_IBM775_infos,
+
+#define to_IBM775_C2_infos WORDINDEX2INFO(6404)
+      INVALID,    UNDEF, o1(0xFF), o1(0x96),
+     o1(0x9C), o1(0x9F), o1(0xA7), o1(0xF5),
+     o1(0xA8), o1(0xAE), o1(0xAA), o1(0xF0),
+     o1(0xA9), o1(0xF8), o1(0xF1), o1(0xFD),
+     o1(0xFC), o1(0xE6), o1(0xF4), o1(0xFA),
+     o1(0xFB), o1(0xAF), o1(0xAC), o1(0xAB),
+     o1(0xF3),
+
+#define to_IBM775_C2 WORDINDEX2INFO(6429)
+    to_IBM775_C2_offsets,
+    to_IBM775_C2_infos,
+
+#define to_IBM775_C3_infos WORDINDEX2INFO(6431)
+      INVALID,    UNDEF, o1(0x8E), o1(0x8F),
+     o1(0x92), o1(0x90), o1(0xE0), o1(0xE5),
+     o1(0x99), o1(0x9E), o1(0x9D), o1(0x9A),
+     o1(0xE1), o1(0x84), o1(0x86), o1(0x91),
+     o1(0x82), o1(0xA2), o1(0xE4), o1(0x94),
+     o1(0xF6), o1(0x9B), o1(0x81),
+
+#define to_IBM775_C3 WORDINDEX2INFO(6454)
+    to_ISO_8859_13_C3_offsets,
+    to_IBM775_C3_infos,
+
+#define to_IBM775_C4_infos WORDINDEX2INFO(6456)
+      INVALID, o1(0xA0), o1(0x83),    UNDEF,
+     o1(0xB5), o1(0xD0), o1(0x80), o1(0x87),
+     o1(0xB6), o1(0xD1), o1(0xED), o1(0x89),
+     o1(0xB8), o1(0xD3), o1(0xB7), o1(0xD2),
+     o1(0x95), o1(0x85), o1(0xA1), o1(0x8C),
+     o1(0xBD), o1(0xD4), o1(0xE8), o1(0xE9),
+     o1(0xEA), o1(0xEB),
+
+#define to_IBM775_C4 WORDINDEX2INFO(6482)
+    to_ISO_8859_13_C4_offsets,
+    to_IBM775_C4_infos,
+
+#define to_IBM775_C5_infos WORDINDEX2INFO(6484)
+      INVALID,    UNDEF, o1(0xAD), o1(0x88),
+     o1(0xE3), o1(0xE7), o1(0xEE), o1(0xEC),
+     o1(0xE2), o1(0x93), o1(0x8A), o1(0x8B),
+     o1(0x97), o1(0x98), o1(0xBE), o1(0xD5),
+     o1(0xC7), o1(0xD7), o1(0xC6), o1(0xD6),
+     o1(0x8D), o1(0xA5), o1(0xA3), o1(0xA4),
+     o1(0xCF), o1(0xD8),
+
+#define to_IBM775_C5 WORDINDEX2INFO(6510)
+    to_ISO_8859_13_C5_offsets,
+    to_IBM775_C5_infos,
+
+#define to_IBM775_E2_80_infos WORDINDEX2INFO(6512)
+      INVALID,    UNDEF, o1(0xEF), o1(0xF2),
+     o1(0xA6), o1(0xF7),
+
+#define to_IBM775_E2_80 WORDINDEX2INFO(6518)
+    to_ISO_8859_13_E2_80_offsets,
+    to_IBM775_E2_80_infos,
+
+#define to_IBM775_E2_88_infos WORDINDEX2INFO(6520)
+      INVALID,    UNDEF, o1(0xF9),
+
+#define to_IBM775_E2_88 WORDINDEX2INFO(6523)
+    to_IBM775_E2_88_offsets,
+    to_IBM775_E2_88_infos,
+
+#define to_IBM775_E2_95_infos WORDINDEX2INFO(6525)
+      INVALID,    UNDEF, o1(0xCD), o1(0xBA),
+     o1(0xC9), o1(0xBB), o1(0xC8), o1(0xBC),
+     o1(0xCC), o1(0xB9), o1(0xCB), o1(0xCA),
+     o1(0xCE),
+
+#define to_IBM775_E2_95 WORDINDEX2INFO(6538)
+    to_IBM775_E2_95_offsets,
+    to_IBM775_E2_95_infos,
+
+#define to_IBM775_E2_infos WORDINDEX2INFO(6540)
+             INVALID, to_IBM775_E2_80,  to_US_ASCII_C2, to_IBM775_E2_88,
+     to_IBM437_E2_94, to_IBM775_E2_95, to_IBM437_E2_96,
+
+#define to_IBM775_E2 WORDINDEX2INFO(6547)
+    to_IBM775_E2_offsets,
+    to_IBM775_E2_infos,
+
+#define to_IBM775_infos WORDINDEX2INFO(6549)
+              NOMAP,        INVALID,   to_IBM775_C2,   to_IBM775_C3,
+       to_IBM775_C4,   to_IBM775_C5, to_US_ASCII_C2, to_US_ASCII_E0,
+     to_US_ASCII_E1,   to_IBM775_E2, to_US_ASCII_ED, to_US_ASCII_F0,
+     to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM775 WORDINDEX2INFO(6563)
+    to_ISO_8859_10_offsets,
+    to_IBM775_infos,
+
+#define from_IBM852_infos WORDINDEX2INFO(6565)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC5,0xAF),      o2(0xC4,0x87),
+          o2(0xC3,0xA7),      o2(0xC5,0x82),
+          o2(0xC3,0xAB),      o2(0xC5,0x90),
+          o2(0xC5,0x91),      o2(0xC3,0xAE),
+          o2(0xC5,0xB9),      o2(0xC3,0x84),
+          o2(0xC4,0x86),      o2(0xC3,0x89),
+          o2(0xC4,0xB9),      o2(0xC4,0xBA),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC4,0xBD),      o2(0xC4,0xBE),
+          o2(0xC5,0x9A),      o2(0xC5,0x9B),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC5,0xA4),      o2(0xC5,0xA5),
+          o2(0xC5,0x81),      o2(0xC3,0x97),
+          o2(0xC4,0x8D),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC4,0x84),
+          o2(0xC4,0x85),      o2(0xC5,0xBD),
+          o2(0xC5,0xBE),      o2(0xC4,0x98),
+          o2(0xC4,0x99),      o2(0xC2,0xAC),
+          o2(0xC5,0xBA),      o2(0xC4,0x8C),
+          o2(0xC5,0x9F),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC4,0x9A),      o2(0xC5,0x9E),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xC5,0xBB),      o2(0xC5,0xBC),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xC4,0x82),
+          o2(0xC4,0x83), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA4),      o2(0xC4,0x91),
+          o2(0xC4,0x90),      o2(0xC4,0x8E),
+          o2(0xC3,0x8B),      o2(0xC4,0x8F),
+          o2(0xC5,0x87),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC4,0x9B),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+          o2(0xC5,0xA2),      o2(0xC5,0xAE),
+     o3(0xE2,0x96,0x80),      o2(0xC3,0x93),
+          o2(0xC3,0x9F),      o2(0xC3,0x94),
+          o2(0xC5,0x83),      o2(0xC5,0x84),
+          o2(0xC5,0x88),      o2(0xC5,0xA0),
+          o2(0xC5,0xA1),      o2(0xC5,0x94),
+          o2(0xC3,0x9A),      o2(0xC5,0x95),
+          o2(0xC5,0xB0),      o2(0xC3,0xBD),
+          o2(0xC3,0x9D),      o2(0xC5,0xA3),
+          o2(0xC2,0xB4),      o2(0xC2,0xAD),
+          o2(0xCB,0x9D),      o2(0xCB,0x9B),
+          o2(0xCB,0x87),      o2(0xCB,0x98),
+          o2(0xC2,0xA7),      o2(0xC3,0xB7),
+          o2(0xC2,0xB8),      o2(0xC2,0xB0),
+          o2(0xC2,0xA8),      o2(0xCB,0x99),
+          o2(0xC5,0xB1),      o2(0xC5,0x98),
+          o2(0xC5,0x99), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM852 WORDINDEX2INFO(6694)
+    from_ISO_8859_1_offsets,
+    from_IBM852_infos,
+
+#define to_IBM852_C2_infos WORDINDEX2INFO(6696)
+      INVALID,    UNDEF, o1(0xFF), o1(0xCF),
+     o1(0xF5), o1(0xF9), o1(0xAE), o1(0xAA),
+     o1(0xF0), o1(0xF8), o1(0xEF), o1(0xF7),
+     o1(0xAF),
+
+#define to_IBM852_C2 WORDINDEX2INFO(6709)
+    to_IBM852_C2_offsets,
+    to_IBM852_C2_infos,
+
+#define to_IBM852_C3_infos WORDINDEX2INFO(6711)
+      INVALID,    UNDEF, o1(0xB5), o1(0xB6),
+     o1(0x8E), o1(0x80), o1(0x90), o1(0xD3),
+     o1(0xD6), o1(0xD7), o1(0xE0), o1(0xE2),
+     o1(0x99), o1(0x9E), o1(0xE9), o1(0x9A),
+     o1(0xED), o1(0xE1), o1(0xA0), o1(0x83),
+     o1(0x84), o1(0x87), o1(0x82), o1(0x89),
+     o1(0xA1), o1(0x8C), o1(0xA2), o1(0x93),
+     o1(0x94), o1(0xF6), o1(0xA3), o1(0x81),
+     o1(0xEC),
+
+#define to_IBM852_C3 WORDINDEX2INFO(6744)
+    to_ISO_8859_2_C3_offsets,
+    to_IBM852_C3_infos,
+
+#define to_IBM852_C4_infos WORDINDEX2INFO(6746)
+      INVALID,    UNDEF, o1(0xC6), o1(0xC7),
+     o1(0xA4), o1(0xA5), o1(0x8F), o1(0x86),
+     o1(0xAC), o1(0x9F), o1(0xD2), o1(0xD4),
+     o1(0xD1), o1(0xD0), o1(0xA8), o1(0xA9),
+     o1(0xB7), o1(0xD8), o1(0x91), o1(0x92),
+     o1(0x95), o1(0x96),
+
+#define to_IBM852_C4 WORDINDEX2INFO(6768)
+    to_ISO_8859_2_C4_offsets,
+    to_IBM852_C4_infos,
+
+#define to_IBM852_C5_infos WORDINDEX2INFO(6770)
+      INVALID,    UNDEF, o1(0x9D), o1(0x88),
+     o1(0xE3), o1(0xE4), o1(0xD5), o1(0xE5),
+     o1(0x8A), o1(0x8B), o1(0xE8), o1(0xEA),
+     o1(0xFC), o1(0xFD), o1(0x97), o1(0x98),
+     o1(0xB8), o1(0xAD), o1(0xE6), o1(0xE7),
+     o1(0xDD), o1(0xEE), o1(0x9B), o1(0x9C),
+     o1(0xDE), o1(0x85), o1(0xEB), o1(0xFB),
+     o1(0x8D), o1(0xAB), o1(0xBD), o1(0xBE),
+     o1(0xA6), o1(0xA7),
+
+#define to_IBM852_C5 WORDINDEX2INFO(6804)
+    to_ISO_8859_2_C5_offsets,
+    to_IBM852_C5_infos,
+
+#define to_IBM852_CB_infos WORDINDEX2INFO(6806)
+      INVALID,    UNDEF, o1(0xF3), o1(0xF4),
+     o1(0xFA), o1(0xF2), o1(0xF1),
+
+#define to_IBM852_CB WORDINDEX2INFO(6813)
+    to_ISO_8859_2_CB_offsets,
+    to_IBM852_CB_infos,
+
+#define to_IBM852_E2_96_infos WORDINDEX2INFO(6815)
+      INVALID, o1(0xDF),    UNDEF, o1(0xDC),
+     o1(0xDB), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xFE),
+
+#define to_IBM852_E2_96 WORDINDEX2INFO(6824)
+    to_IBM852_E2_96_offsets,
+    to_IBM852_E2_96_infos,
+
+#define to_IBM852_E2_infos WORDINDEX2INFO(6826)
+             INVALID,  to_US_ASCII_C2, to_IBM437_E2_94, to_IBM775_E2_95,
+     to_IBM852_E2_96,
+
+#define to_IBM852_E2 WORDINDEX2INFO(6831)
+    to_IBM852_E2_offsets,
+    to_IBM852_E2_infos,
+
+#define to_IBM852_infos WORDINDEX2INFO(6833)
+              NOMAP,        INVALID,   to_IBM852_C2,   to_IBM852_C3,
+       to_IBM852_C4,   to_IBM852_C5, to_US_ASCII_C2,   to_IBM852_CB,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM852_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM852 WORDINDEX2INFO(6848)
+    to_WINDOWS_1250_offsets,
+    to_IBM852_infos,
+
+#define from_IBM855_infos WORDINDEX2INFO(6850)
+                  NOMAP,      o2(0xD1,0x92),
+          o2(0xD0,0x82),      o2(0xD1,0x93),
+          o2(0xD0,0x83),      o2(0xD1,0x91),
+          o2(0xD0,0x81),      o2(0xD1,0x94),
+          o2(0xD0,0x84),      o2(0xD1,0x95),
+          o2(0xD0,0x85),      o2(0xD1,0x96),
+          o2(0xD0,0x86),      o2(0xD1,0x97),
+          o2(0xD0,0x87),      o2(0xD1,0x98),
+          o2(0xD0,0x88),      o2(0xD1,0x99),
+          o2(0xD0,0x89),      o2(0xD1,0x9A),
+          o2(0xD0,0x8A),      o2(0xD1,0x9B),
+          o2(0xD0,0x8B),      o2(0xD1,0x9C),
+          o2(0xD0,0x8C),      o2(0xD1,0x9E),
+          o2(0xD0,0x8E),      o2(0xD1,0x9F),
+          o2(0xD0,0x8F),      o2(0xD1,0x8E),
+          o2(0xD0,0xAE),      o2(0xD1,0x8A),
+          o2(0xD0,0xAA),      o2(0xD0,0xB0),
+          o2(0xD0,0x90),      o2(0xD0,0xB1),
+          o2(0xD0,0x91),      o2(0xD1,0x86),
+          o2(0xD0,0xA6),      o2(0xD0,0xB4),
+          o2(0xD0,0x94),      o2(0xD0,0xB5),
+          o2(0xD0,0x95),      o2(0xD1,0x84),
+          o2(0xD0,0xA4),      o2(0xD0,0xB3),
+          o2(0xD0,0x93),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xD1,0x85),      o2(0xD0,0xA5),
+          o2(0xD0,0xB8),      o2(0xD0,0x98),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xD0,0xB9),      o2(0xD0,0x99),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xD0,0xBA),
+          o2(0xD0,0x9A), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA4),      o2(0xD0,0xBB),
+          o2(0xD0,0x9B),      o2(0xD0,0xBC),
+          o2(0xD0,0x9C),      o2(0xD0,0xBD),
+          o2(0xD0,0x9D),      o2(0xD0,0xBE),
+          o2(0xD0,0x9E),      o2(0xD0,0xBF),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+          o2(0xD0,0x9F),      o2(0xD1,0x8F),
+     o3(0xE2,0x96,0x80),      o2(0xD0,0xAF),
+          o2(0xD1,0x80),      o2(0xD0,0xA0),
+          o2(0xD1,0x81),      o2(0xD0,0xA1),
+          o2(0xD1,0x82),      o2(0xD0,0xA2),
+          o2(0xD1,0x83),      o2(0xD0,0xA3),
+          o2(0xD0,0xB6),      o2(0xD0,0x96),
+          o2(0xD0,0xB2),      o2(0xD0,0x92),
+          o2(0xD1,0x8C),      o2(0xD0,0xAC),
+     o3(0xE2,0x84,0x96),      o2(0xC2,0xAD),
+          o2(0xD1,0x8B),      o2(0xD0,0xAB),
+          o2(0xD0,0xB7),      o2(0xD0,0x97),
+          o2(0xD1,0x88),      o2(0xD0,0xA8),
+          o2(0xD1,0x8D),      o2(0xD0,0xAD),
+          o2(0xD1,0x89),      o2(0xD0,0xA9),
+          o2(0xD1,0x87),      o2(0xD0,0xA7),
+          o2(0xC2,0xA7), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM855 WORDINDEX2INFO(6979)
+    from_ISO_8859_1_offsets,
+    from_IBM855_infos,
+
+#define to_IBM855_C2_infos WORDINDEX2INFO(6981)
+      INVALID,    UNDEF, o1(0xFF), o1(0xCF),
+     o1(0xFD), o1(0xAE), o1(0xF0), o1(0xAF),
+
+#define to_IBM855_C2 WORDINDEX2INFO(6989)
+    to_IBM855_C2_offsets,
+    to_IBM855_C2_infos,
+
+#define to_IBM855_D0_infos WORDINDEX2INFO(6991)
+      INVALID,    UNDEF, o1(0x85), o1(0x81),
+     o1(0x83), o1(0x87), o1(0x89), o1(0x8B),
+     o1(0x8D), o1(0x8F), o1(0x91), o1(0x93),
+     o1(0x95), o1(0x97), o1(0x99), o1(0x9B),
+     o1(0xA1), o1(0xA3), o1(0xEC), o1(0xAD),
+     o1(0xA7), o1(0xA9), o1(0xEA), o1(0xF4),
+     o1(0xB8), o1(0xBE), o1(0xC7), o1(0xD1),
+     o1(0xD3), o1(0xD5), o1(0xD7), o1(0xDD),
+     o1(0xE2), o1(0xE4), o1(0xE6), o1(0xE8),
+     o1(0xAB), o1(0xB6), o1(0xA5), o1(0xFC),
+     o1(0xF6), o1(0xFA), o1(0x9F), o1(0xF2),
+     o1(0xEE), o1(0xF8), o1(0x9D), o1(0xE0),
+     o1(0xA0), o1(0xA2), o1(0xEB), o1(0xAC),
+     o1(0xA6), o1(0xA8), o1(0xE9), o1(0xF3),
+     o1(0xB7), o1(0xBD), o1(0xC6), o1(0xD0),
+     o1(0xD2), o1(0xD4), o1(0xD6), o1(0xD8),
+
+#define to_IBM855_D0 WORDINDEX2INFO(7055)
+    to_ISO_8859_5_D0_offsets,
+    to_IBM855_D0_infos,
+
+#define to_IBM855_D1_infos WORDINDEX2INFO(7057)
+      INVALID, o1(0xE1), o1(0xE3), o1(0xE5),
+     o1(0xE7), o1(0xAA), o1(0xB5), o1(0xA4),
+     o1(0xFB), o1(0xF5), o1(0xF9), o1(0x9E),
+     o1(0xF1), o1(0xED), o1(0xF7), o1(0x9C),
+     o1(0xDE),    UNDEF, o1(0x84), o1(0x80),
+     o1(0x82), o1(0x86), o1(0x88), o1(0x8A),
+     o1(0x8C), o1(0x8E), o1(0x90), o1(0x92),
+     o1(0x94), o1(0x96), o1(0x98), o1(0x9A),
+
+#define to_IBM855_D1 WORDINDEX2INFO(7089)
+    to_ISO_8859_5_D1_offsets,
+    to_IBM855_D1_infos,
+
+#define to_IBM855_E2_84_infos WORDINDEX2INFO(7091)
+      INVALID,    UNDEF, o1(0xEF),
+
+#define to_IBM855_E2_84 WORDINDEX2INFO(7094)
+    to_ISO_8859_5_E2_84_offsets,
+    to_IBM855_E2_84_infos,
+
+#define to_IBM855_E2_infos WORDINDEX2INFO(7096)
+             INVALID,  to_US_ASCII_C2, to_IBM855_E2_84, to_IBM437_E2_94,
+     to_IBM775_E2_95, to_IBM852_E2_96,
+
+#define to_IBM855_E2 WORDINDEX2INFO(7102)
+    to_IBM855_E2_offsets,
+    to_IBM855_E2_infos,
+
+#define to_IBM855_infos WORDINDEX2INFO(7104)
+              NOMAP,        INVALID,   to_IBM855_C2, to_US_ASCII_C2,
+       to_IBM855_D0,   to_IBM855_D1, to_US_ASCII_E0, to_US_ASCII_E1,
+       to_IBM855_E2, to_US_ASCII_ED, to_US_ASCII_F0, to_US_ASCII_F1,
+     to_US_ASCII_F4,
+
+#define to_IBM855 WORDINDEX2INFO(7117)
+    to_ISO_8859_5_offsets,
+    to_IBM855_infos,
+
+#define from_IBM857_infos WORDINDEX2INFO(7119)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA0),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0xAF),      o2(0xC3,0xAE),
+          o2(0xC4,0xB1),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB2),      o2(0xC3,0xBB),
+          o2(0xC3,0xB9),      o2(0xC4,0xB0),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xB8),      o2(0xC2,0xA3),
+          o2(0xC3,0x98),      o2(0xC5,0x9E),
+          o2(0xC5,0x9F),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC4,0x9E),
+          o2(0xC4,0x9F),      o2(0xC2,0xBF),
+          o2(0xC2,0xAE),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x80),      o2(0xC2,0xA9),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xC2,0xA2),      o2(0xC2,0xA5),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xC3,0xA3),
+          o2(0xC3,0x83), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA4),      o2(0xC2,0xBA),
+          o2(0xC2,0xAA),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x88),
+                  UNDEF,      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+          o2(0xC2,0xA6),      o2(0xC3,0x8C),
+     o3(0xE2,0x96,0x80),      o2(0xC3,0x93),
+          o2(0xC3,0x9F),      o2(0xC3,0x94),
+          o2(0xC3,0x92),      o2(0xC3,0xB5),
+          o2(0xC3,0x95),      o2(0xC2,0xB5),
+          o2(0xC3,0x97),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xC3,0xAC),      o2(0xC3,0xBF),
+          o2(0xC2,0xAF),      o2(0xC2,0xB4),
+          o2(0xC2,0xAD),      o2(0xC2,0xB1),
+          o2(0xC2,0xBE),      o2(0xC2,0xB6),
+          o2(0xC2,0xA7),      o2(0xC3,0xB7),
+          o2(0xC2,0xB8),      o2(0xC2,0xB0),
+          o2(0xC2,0xA8),      o2(0xC2,0xB7),
+          o2(0xC2,0xB9),      o2(0xC2,0xB3),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM857 WORDINDEX2INFO(7246)
+    from_IBM857_offsets,
+    from_IBM857_infos,
+
+#define to_IBM857_C2_infos WORDINDEX2INFO(7248)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0xBD), o1(0x9C), o1(0xCF), o1(0xBE),
+     o1(0xDD), o1(0xF5), o1(0xF9), o1(0xB8),
+     o1(0xD1), o1(0xAE), o1(0xAA), o1(0xF0),
+     o1(0xA9), o1(0xEE), o1(0xF8), o1(0xF1),
+     o1(0xFD), o1(0xFC), o1(0xEF), o1(0xE6),
+     o1(0xF4), o1(0xFA), o1(0xF7), o1(0xFB),
+     o1(0xD0), o1(0xAF), o1(0xAC), o1(0xAB),
+     o1(0xF3), o1(0xA8),
+
+#define to_IBM857_C2 WORDINDEX2INFO(7282)
+    to_WINDOWS_1252_C2_offsets,
+    to_IBM857_C2_infos,
+
+#define to_IBM857_C3_infos WORDINDEX2INFO(7284)
+      INVALID, o1(0xB7), o1(0xB5), o1(0xB6),
+     o1(0xC7), o1(0x8E), o1(0x8F), o1(0x92),
+     o1(0x80), o1(0xD4), o1(0x90), o1(0xD2),
+     o1(0xD3), o1(0xDE), o1(0xD6), o1(0xD7),
+     o1(0xD8),    UNDEF, o1(0xA5), o1(0xE3),
+     o1(0xE0), o1(0xE2), o1(0xE5), o1(0x99),
+     o1(0xE8), o1(0x9D), o1(0xEB), o1(0xE9),
+     o1(0xEA), o1(0x9A), o1(0xE1), o1(0x85),
+     o1(0xA0), o1(0x83), o1(0xC6), o1(0x84),
+     o1(0x86), o1(0x91), o1(0x87), o1(0x8A),
+     o1(0x82), o1(0x88), o1(0x89), o1(0xEC),
+     o1(0xA1), o1(0x8C), o1(0x8B), o1(0xA4),
+     o1(0x95), o1(0xA2), o1(0x93), o1(0xE4),
+     o1(0x94), o1(0xF6), o1(0x9B), o1(0x97),
+     o1(0xA3), o1(0x96), o1(0x81), o1(0xED),
+
+#define to_IBM857_C3 WORDINDEX2INFO(7344)
+    to_ISO_8859_9_C3_offsets,
+    to_IBM857_C3_infos,
+
+#define to_IBM857_C4_infos WORDINDEX2INFO(7346)
+      INVALID,    UNDEF, o1(0xA6), o1(0xA7),
+     o1(0x98), o1(0x8D),
+
+#define to_IBM857_C4 WORDINDEX2INFO(7352)
+    to_ISO_8859_9_C4_offsets,
+    to_IBM857_C4_infos,
+
+#define to_IBM857_C5_infos WORDINDEX2INFO(7354)
+      INVALID,    UNDEF, o1(0x9E), o1(0x9F),
+
+#define to_IBM857_C5 WORDINDEX2INFO(7358)
+    to_ISO_8859_9_C5_offsets,
+    to_IBM857_C5_infos,
+
+#define to_IBM857_infos WORDINDEX2INFO(7360)
+              NOMAP,        INVALID,   to_IBM857_C2,   to_IBM857_C3,
+       to_IBM857_C4,   to_IBM857_C5, to_US_ASCII_C2, to_US_ASCII_E0,
+     to_US_ASCII_E1,   to_IBM852_E2, to_US_ASCII_ED, to_US_ASCII_F0,
+     to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM857 WORDINDEX2INFO(7374)
+    to_ISO_8859_10_offsets,
+    to_IBM857_infos,
+
+#define from_IBM860_infos WORDINDEX2INFO(7376)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA3),
+          o2(0xC3,0xA0),      o2(0xC3,0x81),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0x8A),      o2(0xC3,0xA8),
+          o2(0xC3,0x8D),      o2(0xC3,0x94),
+          o2(0xC3,0xAC),      o2(0xC3,0x83),
+          o2(0xC3,0x82),      o2(0xC3,0x89),
+          o2(0xC3,0x80),      o2(0xC3,0x88),
+          o2(0xC3,0xB4),      o2(0xC3,0xB5),
+          o2(0xC3,0xB2),      o2(0xC3,0x9A),
+          o2(0xC3,0xB9),      o2(0xC3,0x8C),
+          o2(0xC3,0x95),      o2(0xC3,0x9C),
+          o2(0xC2,0xA2),      o2(0xC2,0xA3),
+          o2(0xC3,0x99), o3(0xE2,0x82,0xA7),
+          o2(0xC3,0x93),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC2,0xAA),
+          o2(0xC2,0xBA),      o2(0xC2,0xBF),
+          o2(0xC3,0x92),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM860 WORDINDEX2INFO(7505)
+    from_ISO_8859_1_offsets,
+    from_IBM860_infos,
+
+#define to_IBM860_C2_infos WORDINDEX2INFO(7507)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0x9B), o1(0x9C), o1(0xA6), o1(0xAE),
+     o1(0xAA), o1(0xF8), o1(0xF1), o1(0xFD),
+     o1(0xE6), o1(0xFA), o1(0xA7), o1(0xAF),
+     o1(0xAC), o1(0xAB), o1(0xA8),
+
+#define to_IBM860_C2 WORDINDEX2INFO(7526)
+    to_IBM860_C2_offsets,
+    to_IBM860_C2_infos,
+
+#define to_IBM860_C3_infos WORDINDEX2INFO(7528)
+      INVALID, o1(0x91), o1(0x86), o1(0x8F),
+     o1(0x8E),    UNDEF, o1(0x80), o1(0x92),
+     o1(0x90), o1(0x89), o1(0x98), o1(0x8B),
+     o1(0xA5), o1(0xA9), o1(0x9F), o1(0x8C),
+     o1(0x99), o1(0x9D), o1(0x96), o1(0x9A),
+     o1(0xE1), o1(0x85), o1(0xA0), o1(0x83),
+     o1(0x84), o1(0x87), o1(0x8A), o1(0x82),
+     o1(0x88), o1(0x8D), o1(0xA1), o1(0xA4),
+     o1(0x95), o1(0xA2), o1(0x93), o1(0x94),
+     o1(0xF6), o1(0x97), o1(0xA3), o1(0x81),
+
+#define to_IBM860_C3 WORDINDEX2INFO(7568)
+    to_IBM860_C3_offsets,
+    to_IBM860_C3_infos,
+
+#define to_IBM860_E2_8C_infos WORDINDEX2INFO(7570)
+      INVALID,    UNDEF, o1(0xF4), o1(0xF5),
+
+#define to_IBM860_E2_8C WORDINDEX2INFO(7574)
+    to_IBM860_E2_8C_offsets,
+    to_IBM860_E2_8C_infos,
+
+#define to_IBM860_E2_infos WORDINDEX2INFO(7576)
+             INVALID,  to_US_ASCII_C2, to_IBM437_E2_81, to_IBM437_E2_82,
+     to_IBM437_E2_88, to_IBM437_E2_89, to_IBM860_E2_8C, to_IBM437_E2_94,
+     to_IBM437_E2_95, to_IBM437_E2_96,
+
+#define to_IBM860_E2 WORDINDEX2INFO(7586)
+    to_IBM437_E2_offsets,
+    to_IBM860_E2_infos,
+
+#define to_IBM860_infos WORDINDEX2INFO(7588)
+              NOMAP,        INVALID,   to_IBM860_C2,   to_IBM860_C3,
+     to_US_ASCII_C2,   to_IBM437_CE,   to_IBM437_CF, to_US_ASCII_E0,
+     to_US_ASCII_E1,   to_IBM860_E2, to_US_ASCII_ED, to_US_ASCII_F0,
+     to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM860 WORDINDEX2INFO(7602)
+    to_IBM860_offsets,
+    to_IBM860_infos,
+
+#define from_IBM861_infos WORDINDEX2INFO(7604)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA0),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0x90),      o2(0xC3,0xB0),
+          o2(0xC3,0x9E),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xBE),      o2(0xC3,0xBB),
+          o2(0xC3,0x9D),      o2(0xC3,0xBD),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xB8),      o2(0xC2,0xA3),
+          o2(0xC3,0x98), o3(0xE2,0x82,0xA7),
+          o2(0xC6,0x92),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0x81),
+          o2(0xC3,0x8D),      o2(0xC3,0x93),
+          o2(0xC3,0x9A),      o2(0xC2,0xBF),
+     o3(0xE2,0x8C,0x90),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM861 WORDINDEX2INFO(7733)
+    from_ISO_8859_1_offsets,
+    from_IBM861_infos,
+
+#define to_IBM861_C2_infos WORDINDEX2INFO(7735)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0x9C), o1(0xAE), o1(0xAA), o1(0xF8),
+     o1(0xF1), o1(0xFD), o1(0xE6), o1(0xFA),
+     o1(0xAF), o1(0xAC), o1(0xAB), o1(0xA8),
+
+#define to_IBM861_C2 WORDINDEX2INFO(7751)
+    to_IBM861_C2_offsets,
+    to_IBM861_C2_infos,
+
+#define to_IBM861_C3_infos WORDINDEX2INFO(7753)
+      INVALID,    UNDEF, o1(0xA4), o1(0x8E),
+     o1(0x8F), o1(0x92), o1(0x80), o1(0x90),
+     o1(0xA5), o1(0x8B), o1(0xA6), o1(0x99),
+     o1(0x9D), o1(0xA7), o1(0x9A), o1(0x97),
+     o1(0x8D), o1(0xE1), o1(0x85), o1(0xA0),
+     o1(0x83), o1(0x84), o1(0x86), o1(0x91),
+     o1(0x87), o1(0x8A), o1(0x82), o1(0x88),
+     o1(0x89), o1(0xA1), o1(0x8C), o1(0xA2),
+     o1(0x93), o1(0x94), o1(0xF6), o1(0x9B),
+     o1(0xA3), o1(0x96), o1(0x81), o1(0x98),
+     o1(0x95),
+
+#define to_IBM861_C3 WORDINDEX2INFO(7794)
+    to_IBM861_C3_offsets,
+    to_IBM861_C3_infos,
+
+#define to_IBM861_infos WORDINDEX2INFO(7796)
+              NOMAP,        INVALID,   to_IBM861_C2,   to_IBM861_C3,
+     to_US_ASCII_C2,   to_IBM437_C6,   to_IBM437_CE,   to_IBM437_CF,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM437_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM861 WORDINDEX2INFO(7811)
+    to_IBM437_offsets,
+    to_IBM861_infos,
+
+#define from_IBM862_infos WORDINDEX2INFO(7813)
+                  NOMAP,      o2(0xD7,0x90),
+          o2(0xD7,0x91),      o2(0xD7,0x92),
+          o2(0xD7,0x93),      o2(0xD7,0x94),
+          o2(0xD7,0x95),      o2(0xD7,0x96),
+          o2(0xD7,0x97),      o2(0xD7,0x98),
+          o2(0xD7,0x99),      o2(0xD7,0x9A),
+          o2(0xD7,0x9B),      o2(0xD7,0x9C),
+          o2(0xD7,0x9D),      o2(0xD7,0x9E),
+          o2(0xD7,0x9F),      o2(0xD7,0xA0),
+          o2(0xD7,0xA1),      o2(0xD7,0xA2),
+          o2(0xD7,0xA3),      o2(0xD7,0xA4),
+          o2(0xD7,0xA5),      o2(0xD7,0xA6),
+          o2(0xD7,0xA7),      o2(0xD7,0xA8),
+          o2(0xD7,0xA9),      o2(0xD7,0xAA),
+          o2(0xC2,0xA2),      o2(0xC2,0xA3),
+          o2(0xC2,0xA5), o3(0xE2,0x82,0xA7),
+          o2(0xC6,0x92),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC2,0xAA),
+          o2(0xC2,0xBA),      o2(0xC2,0xBF),
+     o3(0xE2,0x8C,0x90),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM862 WORDINDEX2INFO(7942)
+    from_ISO_8859_1_offsets,
+    from_IBM862_infos,
+
+#define to_IBM862_C3_infos WORDINDEX2INFO(7944)
+      INVALID,    UNDEF, o1(0xA5), o1(0xE1),
+     o1(0xA0), o1(0xA1), o1(0xA4), o1(0xA2),
+     o1(0xF6), o1(0xA3),
+
+#define to_IBM862_C3 WORDINDEX2INFO(7954)
+    to_IBM862_C3_offsets,
+    to_IBM862_C3_infos,
+
+#define to_IBM862_D7_infos WORDINDEX2INFO(7956)
+      INVALID,    UNDEF, o1(0x80), o1(0x81),
+     o1(0x82), o1(0x83), o1(0x84), o1(0x85),
+     o1(0x86), o1(0x87), o1(0x88), o1(0x89),
+     o1(0x8A), o1(0x8B), o1(0x8C), o1(0x8D),
+     o1(0x8E), o1(0x8F), o1(0x90), o1(0x91),
+     o1(0x92), o1(0x93), o1(0x94), o1(0x95),
+     o1(0x96), o1(0x97), o1(0x98), o1(0x99),
+     o1(0x9A),
+
+#define to_IBM862_D7 WORDINDEX2INFO(7985)
+    to_ISO_8859_8_D7_offsets,
+    to_IBM862_D7_infos,
+
+#define to_IBM862_infos WORDINDEX2INFO(7987)
+              NOMAP,        INVALID,   to_IBM437_C2,   to_IBM862_C3,
+     to_US_ASCII_C2,   to_IBM437_C6,   to_IBM437_CE,   to_IBM437_CF,
+       to_IBM862_D7, to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM437_E2,
+     to_US_ASCII_ED, to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM862 WORDINDEX2INFO(8003)
+    to_IBM862_offsets,
+    to_IBM862_infos,
+
+#define from_IBM863_infos WORDINDEX2INFO(8005)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0x82),
+          o2(0xC3,0xA0),      o2(0xC2,0xB6),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0xAF),      o2(0xC3,0xAE),
+     o3(0xE2,0x80,0x97),      o2(0xC3,0x80),
+          o2(0xC2,0xA7),      o2(0xC3,0x89),
+          o2(0xC3,0x88),      o2(0xC3,0x8A),
+          o2(0xC3,0xB4),      o2(0xC3,0x8B),
+          o2(0xC3,0x8F),      o2(0xC3,0xBB),
+          o2(0xC3,0xB9),      o2(0xC2,0xA4),
+          o2(0xC3,0x94),      o2(0xC3,0x9C),
+          o2(0xC2,0xA2),      o2(0xC2,0xA3),
+          o2(0xC3,0x99),      o2(0xC3,0x9B),
+          o2(0xC6,0x92),      o2(0xC2,0xA6),
+          o2(0xC2,0xB4),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC2,0xA8),
+          o2(0xC2,0xB8),      o2(0xC2,0xB3),
+          o2(0xC2,0xAF),      o2(0xC3,0x8E),
+     o3(0xE2,0x8C,0x90),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xBE),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM863 WORDINDEX2INFO(8134)
+    from_ISO_8859_1_offsets,
+    from_IBM863_infos,
+
+#define to_IBM863_C2_infos WORDINDEX2INFO(8136)
+      INVALID,    UNDEF, o1(0xFF), o1(0x9B),
+     o1(0x9C), o1(0x98), o1(0xA0), o1(0x8F),
+     o1(0xA4), o1(0xAE), o1(0xAA), o1(0xA7),
+     o1(0xF8), o1(0xF1), o1(0xFD), o1(0xA6),
+     o1(0xA1), o1(0xE6), o1(0x86), o1(0xFA),
+     o1(0xA5), o1(0xAF), o1(0xAC), o1(0xAB),
+     o1(0xAD),
+
+#define to_IBM863_C2 WORDINDEX2INFO(8161)
+    to_IBM863_C2_offsets,
+    to_IBM863_C2_infos,
+
+#define to_IBM863_C3_infos WORDINDEX2INFO(8163)
+      INVALID, o1(0x8E),    UNDEF, o1(0x84),
+     o1(0x80), o1(0x91), o1(0x90), o1(0x92),
+     o1(0x94), o1(0xA8), o1(0x95), o1(0x99),
+     o1(0x9D), o1(0x9E), o1(0x9A), o1(0xE1),
+     o1(0x85), o1(0x83), o1(0x87), o1(0x8A),
+     o1(0x82), o1(0x88), o1(0x89), o1(0x8C),
+     o1(0x8B), o1(0xA2), o1(0x93), o1(0xF6),
+     o1(0x97), o1(0xA3), o1(0x96), o1(0x81),
+
+#define to_IBM863_C3 WORDINDEX2INFO(8195)
+    to_IBM863_C3_offsets,
+    to_IBM863_C3_infos,
+
+#define to_IBM863_E2_80_infos WORDINDEX2INFO(8197)
+      INVALID,    UNDEF, o1(0x8D),
+
+#define to_IBM863_E2_80 WORDINDEX2INFO(8200)
+    to_IBM863_E2_80_offsets,
+    to_IBM863_E2_80_infos,
+
+#define to_IBM863_E2_infos WORDINDEX2INFO(8202)
+             INVALID, to_IBM863_E2_80, to_IBM437_E2_81,  to_US_ASCII_C2,
+     to_IBM437_E2_88, to_IBM437_E2_89, to_IBM437_E2_8C, to_IBM437_E2_94,
+     to_IBM437_E2_95, to_IBM437_E2_96,
+
+#define to_IBM863_E2 WORDINDEX2INFO(8212)
+    to_IBM863_E2_offsets,
+    to_IBM863_E2_infos,
+
+#define to_IBM863_infos WORDINDEX2INFO(8214)
+              NOMAP,        INVALID,   to_IBM863_C2,   to_IBM863_C3,
+     to_US_ASCII_C2,   to_IBM437_C6,   to_IBM437_CE,   to_IBM437_CF,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM863_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM863 WORDINDEX2INFO(8229)
+    to_IBM437_offsets,
+    to_IBM863_infos,
+
+#define from_IBM865_infos WORDINDEX2INFO(8231)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA0),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0xAF),      o2(0xC3,0xAE),
+          o2(0xC3,0xAC),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB2),      o2(0xC3,0xBB),
+          o2(0xC3,0xB9),      o2(0xC3,0xBF),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xB8),      o2(0xC2,0xA3),
+          o2(0xC3,0x98), o3(0xE2,0x82,0xA7),
+          o2(0xC6,0x92),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC2,0xAA),
+          o2(0xC2,0xBA),      o2(0xC2,0xBF),
+     o3(0xE2,0x8C,0x90),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xA4), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB1),
+          o2(0xC3,0x9F),      o2(0xCE,0x93),
+          o2(0xCF,0x80),      o2(0xCE,0xA3),
+          o2(0xCF,0x83),      o2(0xC2,0xB5),
+          o2(0xCF,0x84),      o2(0xCE,0xA6),
+          o2(0xCE,0x98),      o2(0xCE,0xA9),
+          o2(0xCE,0xB4), o3(0xE2,0x88,0x9E),
+          o2(0xCF,0x86),      o2(0xCE,0xB5),
+     o3(0xE2,0x88,0xA9), o3(0xE2,0x89,0xA1),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA5),
+     o3(0xE2,0x89,0xA4), o3(0xE2,0x8C,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC3,0xB7),
+     o3(0xE2,0x89,0x88),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x81,0xBF),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM865 WORDINDEX2INFO(8360)
+    from_ISO_8859_1_offsets,
+    from_IBM865_infos,
+
+#define to_IBM865_C2_infos WORDINDEX2INFO(8362)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0x9C), o1(0xAF), o1(0xA6), o1(0xAE),
+     o1(0xAA), o1(0xF8), o1(0xF1), o1(0xFD),
+     o1(0xE6), o1(0xFA), o1(0xA7), o1(0xAC),
+     o1(0xAB), o1(0xA8),
+
+#define to_IBM865_C2 WORDINDEX2INFO(8380)
+    to_IBM865_C2_offsets,
+    to_IBM865_C2_infos,
+
+#define to_IBM865_C3_infos WORDINDEX2INFO(8382)
+      INVALID,    UNDEF, o1(0x8E), o1(0x8F),
+     o1(0x92), o1(0x80), o1(0x90), o1(0xA5),
+     o1(0x99), o1(0x9D), o1(0x9A), o1(0xE1),
+     o1(0x85), o1(0xA0), o1(0x83), o1(0x84),
+     o1(0x86), o1(0x91), o1(0x87), o1(0x8A),
+     o1(0x82), o1(0x88), o1(0x89), o1(0x8D),
+     o1(0xA1), o1(0x8C), o1(0x8B), o1(0xA4),
+     o1(0x95), o1(0xA2), o1(0x93), o1(0x94),
+     o1(0xF6), o1(0x9B), o1(0x97), o1(0xA3),
+     o1(0x96), o1(0x81), o1(0x98),
+
+#define to_IBM865_C3 WORDINDEX2INFO(8421)
+    to_IBM865_C3_offsets,
+    to_IBM865_C3_infos,
+
+#define to_IBM865_infos WORDINDEX2INFO(8423)
+              NOMAP,        INVALID,   to_IBM865_C2,   to_IBM865_C3,
+     to_US_ASCII_C2,   to_IBM437_C6,   to_IBM437_CE,   to_IBM437_CF,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_IBM437_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_IBM865 WORDINDEX2INFO(8438)
+    to_IBM437_offsets,
+    to_IBM865_infos,
+
+#define from_IBM866_infos WORDINDEX2INFO(8440)
+                  NOMAP,      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x96),
+          o2(0xD0,0x97),      o2(0xD0,0x98),
+          o2(0xD0,0x99),      o2(0xD0,0x9A),
+          o2(0xD0,0x9B),      o2(0xD0,0x9C),
+          o2(0xD0,0x9D),      o2(0xD0,0x9E),
+          o2(0xD0,0x9F),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0xA4),
+          o2(0xD0,0xA5),      o2(0xD0,0xA6),
+          o2(0xD0,0xA7),      o2(0xD0,0xA8),
+          o2(0xD0,0xA9),      o2(0xD0,0xAA),
+          o2(0xD0,0xAB),      o2(0xD0,0xAC),
+          o2(0xD0,0xAD),      o2(0xD0,0xAE),
+          o2(0xD0,0xAF),      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD0,0xB6),
+          o2(0xD0,0xB7),      o2(0xD0,0xB8),
+          o2(0xD0,0xB9),      o2(0xD0,0xBA),
+          o2(0xD0,0xBB),      o2(0xD0,0xBC),
+          o2(0xD0,0xBD),      o2(0xD0,0xBE),
+          o2(0xD0,0xBF), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+     o3(0xE2,0x95,0xA1), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC), o3(0xE2,0x95,0x9E),
+     o3(0xE2,0x95,0x9F), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA4), o3(0xE2,0x95,0xA5),
+     o3(0xE2,0x95,0x99), o3(0xE2,0x95,0x98),
+     o3(0xE2,0x95,0x92), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x8C), o3(0xE2,0x96,0x90),
+     o3(0xE2,0x96,0x80),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD1,0x84),
+          o2(0xD1,0x85),      o2(0xD1,0x86),
+          o2(0xD1,0x87),      o2(0xD1,0x88),
+          o2(0xD1,0x89),      o2(0xD1,0x8A),
+          o2(0xD1,0x8B),      o2(0xD1,0x8C),
+          o2(0xD1,0x8D),      o2(0xD1,0x8E),
+          o2(0xD1,0x8F),      o2(0xD0,0x81),
+          o2(0xD1,0x91),      o2(0xD0,0x84),
+          o2(0xD1,0x94),      o2(0xD0,0x87),
+          o2(0xD1,0x97),      o2(0xD0,0x8E),
+          o2(0xD1,0x9E),      o2(0xC2,0xB0),
+     o3(0xE2,0x88,0x99),      o2(0xC2,0xB7),
+     o3(0xE2,0x88,0x9A), o3(0xE2,0x84,0x96),
+          o2(0xC2,0xA4), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM866 WORDINDEX2INFO(8569)
+    from_ISO_8859_1_offsets,
+    from_IBM866_infos,
+
+#define to_IBM866_C2_infos WORDINDEX2INFO(8571)
+      INVALID,    UNDEF, o1(0xFF), o1(0xFD),
+     o1(0xF8), o1(0xFA),
+
+#define to_IBM866_C2 WORDINDEX2INFO(8577)
+    to_IBM866_C2_offsets,
+    to_IBM866_C2_infos,
+
+#define to_IBM866_D0_infos WORDINDEX2INFO(8579)
+      INVALID,    UNDEF, o1(0xF0), o1(0xF2),
+     o1(0xF4), o1(0xF6), o1(0x80), o1(0x81),
+     o1(0x82), o1(0x83), o1(0x84), o1(0x85),
+     o1(0x86), o1(0x87), o1(0x88), o1(0x89),
+     o1(0x8A), o1(0x8B), o1(0x8C), o1(0x8D),
+     o1(0x8E), o1(0x8F), o1(0x90), o1(0x91),
+     o1(0x92), o1(0x93), o1(0x94), o1(0x95),
+     o1(0x96), o1(0x97), o1(0x98), o1(0x99),
+     o1(0x9A), o1(0x9B), o1(0x9C), o1(0x9D),
+     o1(0x9E), o1(0x9F), o1(0xA0), o1(0xA1),
+     o1(0xA2), o1(0xA3), o1(0xA4), o1(0xA5),
+     o1(0xA6), o1(0xA7), o1(0xA8), o1(0xA9),
+     o1(0xAA), o1(0xAB), o1(0xAC), o1(0xAD),
+     o1(0xAE), o1(0xAF),
+
+#define to_IBM866_D0 WORDINDEX2INFO(8633)
+    to_IBM866_D0_offsets,
+    to_IBM866_D0_infos,
+
+#define to_IBM866_D1_infos WORDINDEX2INFO(8635)
+      INVALID, o1(0xE0), o1(0xE1), o1(0xE2),
+     o1(0xE3), o1(0xE4), o1(0xE5), o1(0xE6),
+     o1(0xE7), o1(0xE8), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF),    UNDEF, o1(0xF1), o1(0xF3),
+     o1(0xF5), o1(0xF7),
+
+#define to_IBM866_D1 WORDINDEX2INFO(8657)
+    to_IBM866_D1_offsets,
+    to_IBM866_D1_infos,
+
+#define to_IBM866_E2_84 WORDINDEX2INFO(8659)
+    to_ISO_8859_5_E2_84_offsets,
+    to_IBM437_E2_81_infos,
+
+#define to_IBM866_E2_88_infos WORDINDEX2INFO(8661)
+      INVALID,    UNDEF, o1(0xF9), o1(0xFB),
+
+#define to_IBM866_E2_88 WORDINDEX2INFO(8665)
+    to_IBM866_E2_88_offsets,
+    to_IBM866_E2_88_infos,
+
+#define to_IBM866_E2_infos WORDINDEX2INFO(8667)
+             INVALID,  to_US_ASCII_C2, to_IBM866_E2_84, to_IBM866_E2_88,
+     to_IBM437_E2_94, to_IBM437_E2_95, to_IBM437_E2_96,
+
+#define to_IBM866_E2 WORDINDEX2INFO(8674)
+    to_IBM866_E2_offsets,
+    to_IBM866_E2_infos,
+
+#define to_IBM866_infos WORDINDEX2INFO(8676)
+              NOMAP,        INVALID,   to_IBM866_C2, to_US_ASCII_C2,
+       to_IBM866_D0,   to_IBM866_D1, to_US_ASCII_E0, to_US_ASCII_E1,
+       to_IBM866_E2, to_US_ASCII_ED, to_US_ASCII_F0, to_US_ASCII_F1,
+     to_US_ASCII_F4,
+
+#define to_IBM866 WORDINDEX2INFO(8689)
+    to_ISO_8859_5_offsets,
+    to_IBM866_infos,
+
+#define from_IBM869_infos WORDINDEX2INFO(8691)
+                  NOMAP,              UNDEF,
+          o2(0xCE,0x86),      o2(0xC2,0xB7),
+          o2(0xC2,0xAC),      o2(0xC2,0xA6),
+     o3(0xE2,0x80,0x98), o3(0xE2,0x80,0x99),
+          o2(0xCE,0x88), o3(0xE2,0x80,0x95),
+          o2(0xCE,0x89),      o2(0xCE,0x8A),
+          o2(0xCE,0xAA),      o2(0xCE,0x8C),
+          o2(0xCE,0x8E),      o2(0xCE,0xAB),
+          o2(0xC2,0xA9),      o2(0xCE,0x8F),
+          o2(0xC2,0xB2),      o2(0xC2,0xB3),
+          o2(0xCE,0xAC),      o2(0xC2,0xA3),
+          o2(0xCE,0xAD),      o2(0xCE,0xAE),
+          o2(0xCE,0xAF),      o2(0xCF,0x8A),
+          o2(0xCE,0x90),      o2(0xCF,0x8C),
+          o2(0xCF,0x8D),      o2(0xCE,0x91),
+          o2(0xCE,0x92),      o2(0xCE,0x93),
+          o2(0xCE,0x94),      o2(0xCE,0x95),
+          o2(0xCE,0x96),      o2(0xCE,0x97),
+          o2(0xC2,0xBD),      o2(0xCE,0x98),
+          o2(0xCE,0x99),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xCE,0x9A),      o2(0xCE,0x9B),
+          o2(0xCE,0x9C),      o2(0xCE,0x9D),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xCE,0x9E),      o2(0xCE,0x9F),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xCE,0xA0),
+          o2(0xCE,0xA1), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xCE,0xA3),      o2(0xCE,0xA4),
+          o2(0xCE,0xA5),      o2(0xCE,0xA6),
+          o2(0xCE,0xA7),      o2(0xCE,0xA8),
+          o2(0xCE,0xA9),      o2(0xCE,0xB1),
+          o2(0xCE,0xB2),      o2(0xCE,0xB3),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+          o2(0xCE,0xB4),      o2(0xCE,0xB5),
+     o3(0xE2,0x96,0x80),      o2(0xCE,0xB6),
+          o2(0xCE,0xB7),      o2(0xCE,0xB8),
+          o2(0xCE,0xB9),      o2(0xCE,0xBA),
+          o2(0xCE,0xBB),      o2(0xCE,0xBC),
+          o2(0xCE,0xBD),      o2(0xCE,0xBE),
+          o2(0xCE,0xBF),      o2(0xCF,0x80),
+          o2(0xCF,0x81),      o2(0xCF,0x83),
+          o2(0xCF,0x82),      o2(0xCF,0x84),
+          o2(0xCE,0x84),      o2(0xC2,0xAD),
+          o2(0xC2,0xB1),      o2(0xCF,0x85),
+          o2(0xCF,0x86),      o2(0xCF,0x87),
+          o2(0xC2,0xA7),      o2(0xCF,0x88),
+          o2(0xCE,0x85),      o2(0xC2,0xB0),
+          o2(0xC2,0xA8),      o2(0xCF,0x89),
+          o2(0xCF,0x8B),      o2(0xCE,0xB0),
+          o2(0xCF,0x8E), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_IBM869 WORDINDEX2INFO(8812)
+    from_IBM869_offsets,
+    from_IBM869_infos,
+
+#define to_IBM869_C2_infos WORDINDEX2INFO(8814)
+      INVALID,    UNDEF, o1(0xFF), o1(0x9C),
+     o1(0x8A), o1(0xF5), o1(0xF9), o1(0x97),
+     o1(0xAE), o1(0x89), o1(0xF0), o1(0xF8),
+     o1(0xF1), o1(0x99), o1(0x9A), o1(0x88),
+     o1(0xAF), o1(0xAB),
+
+#define to_IBM869_C2 WORDINDEX2INFO(8832)
+    to_IBM869_C2_offsets,
+    to_IBM869_C2_infos,
+
+#define to_IBM869_CE_infos WORDINDEX2INFO(8834)
+      INVALID,    UNDEF, o1(0xEF), o1(0xF7),
+     o1(0x86), o1(0x8D), o1(0x8F), o1(0x90),
+     o1(0x92), o1(0x95), o1(0x98), o1(0xA1),
+     o1(0xA4), o1(0xA5), o1(0xA6), o1(0xA7),
+     o1(0xA8), o1(0xA9), o1(0xAA), o1(0xAC),
+     o1(0xAD), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xBD), o1(0xBE), o1(0xC6),
+     o1(0xC7), o1(0xCF), o1(0xD0), o1(0xD1),
+     o1(0xD2), o1(0xD3), o1(0xD4), o1(0xD5),
+     o1(0x91), o1(0x96), o1(0x9B), o1(0x9D),
+     o1(0x9E), o1(0x9F), o1(0xFC), o1(0xD6),
+     o1(0xD7), o1(0xD8), o1(0xDD), o1(0xDE),
+     o1(0xE0), o1(0xE1), o1(0xE2), o1(0xE3),
+     o1(0xE4), o1(0xE5), o1(0xE6), o1(0xE7),
+     o1(0xE8), o1(0xE9),
+
+#define to_IBM869_CE WORDINDEX2INFO(8892)
+    to_ISO_8859_7_CE_offsets,
+    to_IBM869_CE_infos,
+
+#define to_IBM869_CF_infos WORDINDEX2INFO(8894)
+      INVALID, o1(0xEA), o1(0xEB), o1(0xED),
+     o1(0xEC), o1(0xEE), o1(0xF2), o1(0xF3),
+     o1(0xF4), o1(0xF6), o1(0xFA), o1(0xA0),
+     o1(0xFB), o1(0xA2), o1(0xA3), o1(0xFD),
+        UNDEF,
+
+#define to_IBM869_CF WORDINDEX2INFO(8911)
+    to_ISO_8859_7_CF_offsets,
+    to_IBM869_CF_infos,
+
+#define to_IBM869_E2_80_infos WORDINDEX2INFO(8913)
+      INVALID,    UNDEF, o1(0x8E), o1(0x8B),
+     o1(0x8C),
+
+#define to_IBM869_E2_80 WORDINDEX2INFO(8918)
+    to_ISO_8859_7_E2_80_offsets,
+    to_IBM869_E2_80_infos,
+
+#define to_IBM869_E2_infos WORDINDEX2INFO(8920)
+             INVALID, to_IBM869_E2_80,  to_US_ASCII_C2, to_IBM437_E2_94,
+     to_IBM775_E2_95, to_IBM852_E2_96,
+
+#define to_IBM869_E2 WORDINDEX2INFO(8926)
+    to_IBM869_E2_offsets,
+    to_IBM869_E2_infos,
+
+#define to_IBM869_infos WORDINDEX2INFO(8928)
+              NOMAP,        INVALID,   to_IBM869_C2, to_US_ASCII_C2,
+       to_IBM869_CE,   to_IBM869_CF, to_US_ASCII_E0, to_US_ASCII_E1,
+       to_IBM869_E2, to_US_ASCII_ED, to_US_ASCII_F0, to_US_ASCII_F1,
+     to_US_ASCII_F4,
+
+#define to_IBM869 WORDINDEX2INFO(8941)
+    to_IBM869_offsets,
+    to_IBM869_infos,
+
+#define from_MACCROATIAN_infos WORDINDEX2INFO(8943)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x87),
+          o2(0xC3,0x89),      o2(0xC3,0x91),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xA1),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA3),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAD),
+          o2(0xC3,0xAC),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB1),
+          o2(0xC3,0xB3),      o2(0xC3,0xB2),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB5),      o2(0xC3,0xBA),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC5,0xA0), o3(0xE2,0x84,0xA2),
+          o2(0xC2,0xB4),      o2(0xC2,0xA8),
+     o3(0xE2,0x89,0xA0),      o2(0xC5,0xBD),
+          o2(0xC3,0x98), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xC5,0xA1), o3(0xE2,0x88,0xAB),
+          o2(0xC2,0xAA),      o2(0xC2,0xBA),
+     o3(0xE2,0x84,0xA6),      o2(0xC5,0xBE),
+          o2(0xC3,0xB8),      o2(0xC2,0xBF),
+          o2(0xC2,0xA1),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88),      o2(0xC4,0x86),
+          o2(0xC2,0xAB),      o2(0xC4,0x8C),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xC3,0x80),      o2(0xC3,0x83),
+          o2(0xC3,0x95),      o2(0xC5,0x92),
+          o2(0xC5,0x93),      o2(0xC4,0x90),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x97,0x8A),              UNDEF,
+          o2(0xC2,0xA9), o3(0xE2,0x81,0x84),
+          o2(0xC2,0xA4), o3(0xE2,0x80,0xB9),
+     o3(0xE2,0x80,0xBA),      o2(0xC3,0x86),
+          o2(0xC2,0xBB), o3(0xE2,0x80,0x93),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0x82),      o2(0xC4,0x87),
+          o2(0xC3,0x81),      o2(0xC4,0x8D),
+          o2(0xC3,0x88),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+          o2(0xC3,0x8C),      o2(0xC3,0x93),
+          o2(0xC3,0x94),      o2(0xC4,0x91),
+          o2(0xC3,0x92),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xC4,0xB1),      o2(0xCB,0x86),
+          o2(0xCB,0x9C),      o2(0xC2,0xAF),
+          o2(0xCF,0x80),      o2(0xC3,0x8B),
+          o2(0xCB,0x9A),      o2(0xC2,0xB8),
+          o2(0xC3,0x8A),      o2(0xC3,0xA6),
+          o2(0xCB,0x87),
+
+#define from_MACCROATIAN WORDINDEX2INFO(9072)
+    from_ISO_8859_1_offsets,
+    from_MACCROATIAN_infos,
+
+#define to_MACCROATIAN_C2_infos WORDINDEX2INFO(9074)
+      INVALID,    UNDEF, o1(0xCA), o1(0xC1),
+     o1(0xA2), o1(0xA3), o1(0xDB), o1(0xA4),
+     o1(0xAC), o1(0xD9), o1(0xBB), o1(0xC7),
+     o1(0xC2), o1(0xA8), o1(0xF8), o1(0xA1),
+     o1(0xB1), o1(0xAB), o1(0xB5), o1(0xA6),
+     o1(0xE1), o1(0xFC), o1(0xBC), o1(0xDF),
+     o1(0xC0),
+
+#define to_MACCROATIAN_C2 WORDINDEX2INFO(9099)
+    to_MACCROATIAN_C2_offsets,
+    to_MACCROATIAN_C2_infos,
+
+#define to_MACCROATIAN_C3_infos WORDINDEX2INFO(9101)
+      INVALID, o1(0xCB), o1(0xE7), o1(0xE5),
+     o1(0xCC), o1(0x80), o1(0x81), o1(0xDE),
+     o1(0x82), o1(0xE9), o1(0x83), o1(0xFD),
+     o1(0xFA), o1(0xED), o1(0xEA), o1(0xEB),
+     o1(0xEC),    UNDEF, o1(0x84), o1(0xF1),
+     o1(0xEE), o1(0xEF), o1(0xCD), o1(0x85),
+     o1(0xAF), o1(0xF4), o1(0xF2), o1(0xF3),
+     o1(0x86), o1(0xA7), o1(0x88), o1(0x87),
+     o1(0x89), o1(0x8B), o1(0x8A), o1(0x8C),
+     o1(0xFE), o1(0x8D), o1(0x8F), o1(0x8E),
+     o1(0x90), o1(0x91), o1(0x93), o1(0x92),
+     o1(0x94), o1(0x95), o1(0x96), o1(0x98),
+     o1(0x97), o1(0x99), o1(0x9B), o1(0x9A),
+     o1(0xD6), o1(0xBF), o1(0x9D), o1(0x9C),
+     o1(0x9E), o1(0x9F),
+
+#define to_MACCROATIAN_C3 WORDINDEX2INFO(9159)
+    to_MACCROATIAN_C3_offsets,
+    to_MACCROATIAN_C3_infos,
+
+#define to_MACCROATIAN_C4_infos WORDINDEX2INFO(9161)
+      INVALID,    UNDEF, o1(0xC6), o1(0xE6),
+     o1(0xC8), o1(0xE8), o1(0xD0), o1(0xF0),
+     o1(0xF5),
+
+#define to_MACCROATIAN_C4 WORDINDEX2INFO(9170)
+    to_MACCROATIAN_C4_offsets,
+    to_MACCROATIAN_C4_infos,
+
+#define to_MACCROATIAN_C5_infos WORDINDEX2INFO(9172)
+      INVALID,    UNDEF, o1(0xCE), o1(0xCF),
+     o1(0xA9), o1(0xB9), o1(0xAE), o1(0xBE),
+
+#define to_MACCROATIAN_C5 WORDINDEX2INFO(9180)
+    to_MACCROATIAN_C5_offsets,
+    to_MACCROATIAN_C5_infos,
+
+#define to_MACCROATIAN_C6_infos WORDINDEX2INFO(9182)
+      INVALID,    UNDEF, o1(0xC4),
+
+#define to_MACCROATIAN_C6 WORDINDEX2INFO(9185)
+    to_WINDOWS_1252_C6_offsets,
+    to_MACCROATIAN_C6_infos,
+
+#define to_MACCROATIAN_CB_infos WORDINDEX2INFO(9187)
+      INVALID,    UNDEF, o1(0xF6), o1(0xFF),
+     o1(0xFB), o1(0xF7),
+
+#define to_MACCROATIAN_CB WORDINDEX2INFO(9193)
+    to_MACCROATIAN_CB_offsets,
+    to_MACCROATIAN_CB_infos,
+
+#define to_MACCROATIAN_CF_infos WORDINDEX2INFO(9195)
+      INVALID, o1(0xF9),    UNDEF,
+
+#define to_MACCROATIAN_CF WORDINDEX2INFO(9198)
+    to_ISO_8859_8_E2_offsets,
+    to_MACCROATIAN_CF_infos,
+
+#define to_MACCROATIAN_E2_80_infos WORDINDEX2INFO(9200)
+      INVALID,    UNDEF, o1(0xE0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xE2), o1(0xD2),
+     o1(0xD3), o1(0xE3), o1(0xA0), o1(0xA5),
+     o1(0xC9), o1(0xE4), o1(0xDC), o1(0xDD),
+
+#define to_MACCROATIAN_E2_80 WORDINDEX2INFO(9216)
+    to_MACCROATIAN_E2_80_offsets,
+    to_MACCROATIAN_E2_80_infos,
+
+#define to_MACCROATIAN_E2_81_infos WORDINDEX2INFO(9218)
+      INVALID,    UNDEF, o1(0xDA),
+
+#define to_MACCROATIAN_E2_81 WORDINDEX2INFO(9221)
+    to_ISO_8859_5_E2_offsets,
+    to_MACCROATIAN_E2_81_infos,
+
+#define to_MACCROATIAN_E2_84_infos WORDINDEX2INFO(9223)
+      INVALID,    UNDEF, o1(0xAA), o1(0xBD),
+
+#define to_MACCROATIAN_E2_84 WORDINDEX2INFO(9227)
+    to_MACCROATIAN_E2_84_offsets,
+    to_MACCROATIAN_E2_84_infos,
+
+#define to_MACCROATIAN_E2_88_infos WORDINDEX2INFO(9229)
+      INVALID,    UNDEF, o1(0xB6), o1(0xB4),
+     o1(0xB8), o1(0xB7), o1(0xC3), o1(0xB0),
+     o1(0xBA),
+
+#define to_MACCROATIAN_E2_88 WORDINDEX2INFO(9238)
+    to_MACCROATIAN_E2_88_offsets,
+    to_MACCROATIAN_E2_88_infos,
+
+#define to_MACCROATIAN_E2_89_infos WORDINDEX2INFO(9240)
+      INVALID,    UNDEF, o1(0xC5), o1(0xAD),
+     o1(0xB2), o1(0xB3),
+
+#define to_MACCROATIAN_E2_89 WORDINDEX2INFO(9246)
+    to_MACCROATIAN_E2_89_offsets,
+    to_MACCROATIAN_E2_89_infos,
+
+#define to_MACCROATIAN_E2_97_infos WORDINDEX2INFO(9248)
+      INVALID,    UNDEF, o1(0xD7),
+
+#define to_MACCROATIAN_E2_97 WORDINDEX2INFO(9251)
+    to_MACCROATIAN_E2_97_offsets,
+    to_MACCROATIAN_E2_97_infos,
+
+#define to_MACCROATIAN_E2_infos WORDINDEX2INFO(9253)
+                  INVALID, to_MACCROATIAN_E2_80,
+     to_MACCROATIAN_E2_81,       to_US_ASCII_C2,
+     to_MACCROATIAN_E2_84, to_MACCROATIAN_E2_88,
+     to_MACCROATIAN_E2_89, to_MACCROATIAN_E2_97,
+
+#define to_MACCROATIAN_E2 WORDINDEX2INFO(9261)
+    to_MACCROATIAN_E2_offsets,
+    to_MACCROATIAN_E2_infos,
+
+#define to_MACCROATIAN_infos WORDINDEX2INFO(9263)
+                 NOMAP,           INVALID,
+     to_MACCROATIAN_C2, to_MACCROATIAN_C3,
+     to_MACCROATIAN_C4, to_MACCROATIAN_C5,
+     to_MACCROATIAN_C6,    to_US_ASCII_C2,
+     to_MACCROATIAN_CB, to_MACCROATIAN_CF,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+     to_MACCROATIAN_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_MACCROATIAN WORDINDEX2INFO(9280)
+    to_MACCROATIAN_offsets,
+    to_MACCROATIAN_infos,
+
+#define from_MACCYRILLIC_infos WORDINDEX2INFO(9282)
+                  NOMAP,      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x96),
+          o2(0xD0,0x97),      o2(0xD0,0x98),
+          o2(0xD0,0x99),      o2(0xD0,0x9A),
+          o2(0xD0,0x9B),      o2(0xD0,0x9C),
+          o2(0xD0,0x9D),      o2(0xD0,0x9E),
+          o2(0xD0,0x9F),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0xA4),
+          o2(0xD0,0xA5),      o2(0xD0,0xA6),
+          o2(0xD0,0xA7),      o2(0xD0,0xA8),
+          o2(0xD0,0xA9),      o2(0xD0,0xAA),
+          o2(0xD0,0xAB),      o2(0xD0,0xAC),
+          o2(0xD0,0xAD),      o2(0xD0,0xAE),
+          o2(0xD0,0xAF), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xD0,0x86),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xD0,0x82),      o2(0xD1,0x92),
+     o3(0xE2,0x89,0xA0),      o2(0xD0,0x83),
+          o2(0xD1,0x93), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xD1,0x96),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+          o2(0xD0,0x88),      o2(0xD0,0x84),
+          o2(0xD1,0x94),      o2(0xD0,0x87),
+          o2(0xD1,0x97),      o2(0xD0,0x89),
+          o2(0xD1,0x99),      o2(0xD0,0x8A),
+          o2(0xD1,0x9A),      o2(0xD1,0x98),
+          o2(0xD0,0x85),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xD0,0x8B),      o2(0xD1,0x9B),
+          o2(0xD0,0x8C),      o2(0xD1,0x9C),
+          o2(0xD1,0x95), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x80,0x9E),      o2(0xD0,0x8E),
+          o2(0xD1,0x9E),      o2(0xD0,0x8F),
+          o2(0xD1,0x9F), o3(0xE2,0x84,0x96),
+          o2(0xD0,0x81),      o2(0xD1,0x91),
+          o2(0xD1,0x8F),      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD0,0xB6),
+          o2(0xD0,0xB7),      o2(0xD0,0xB8),
+          o2(0xD0,0xB9),      o2(0xD0,0xBA),
+          o2(0xD0,0xBB),      o2(0xD0,0xBC),
+          o2(0xD0,0xBD),      o2(0xD0,0xBE),
+          o2(0xD0,0xBF),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD1,0x84),
+          o2(0xD1,0x85),      o2(0xD1,0x86),
+          o2(0xD1,0x87),      o2(0xD1,0x88),
+          o2(0xD1,0x89),      o2(0xD1,0x8A),
+          o2(0xD1,0x8B),      o2(0xD1,0x8C),
+          o2(0xD1,0x8D),      o2(0xD1,0x8E),
+          o2(0xC2,0xA4),
+
+#define from_MACCYRILLIC WORDINDEX2INFO(9411)
+    from_ISO_8859_1_offsets,
+    from_MACCYRILLIC_infos,
+
+#define to_MACCYRILLIC_C2_infos WORDINDEX2INFO(9413)
+      INVALID,    UNDEF, o1(0xCA), o1(0xA2),
+     o1(0xA3), o1(0xFF), o1(0xA4), o1(0xA9),
+     o1(0xC7), o1(0xC2), o1(0xA8), o1(0xA1),
+     o1(0xB1), o1(0xB5), o1(0xA6), o1(0xC8),
+
+#define to_MACCYRILLIC_C2 WORDINDEX2INFO(9429)
+    to_MACCYRILLIC_C2_offsets,
+    to_MACCYRILLIC_C2_infos,
+
+#define to_MACCYRILLIC_C3_infos WORDINDEX2INFO(9431)
+      INVALID,    UNDEF, o1(0xD6),
+
+#define to_MACCYRILLIC_C3 WORDINDEX2INFO(9434)
+    to_MACCYRILLIC_C3_offsets,
+    to_MACCYRILLIC_C3_infos,
+
+#define to_MACCYRILLIC_D0_infos WORDINDEX2INFO(9436)
+      INVALID,    UNDEF, o1(0xDD), o1(0xAB),
+     o1(0xAE), o1(0xB8), o1(0xC1), o1(0xA7),
+     o1(0xBA), o1(0xB7), o1(0xBC), o1(0xBE),
+     o1(0xCB), o1(0xCD), o1(0xD8), o1(0xDA),
+     o1(0x80), o1(0x81), o1(0x82), o1(0x83),
+     o1(0x84), o1(0x85), o1(0x86), o1(0x87),
+     o1(0x88), o1(0x89), o1(0x8A), o1(0x8B),
+     o1(0x8C), o1(0x8D), o1(0x8E), o1(0x8F),
+     o1(0x90), o1(0x91), o1(0x92), o1(0x93),
+     o1(0x94), o1(0x95), o1(0x96), o1(0x97),
+     o1(0x98), o1(0x99), o1(0x9A), o1(0x9B),
+     o1(0x9C), o1(0x9D), o1(0x9E), o1(0x9F),
+     o1(0xE0), o1(0xE1), o1(0xE2), o1(0xE3),
+     o1(0xE4), o1(0xE5), o1(0xE6), o1(0xE7),
+     o1(0xE8), o1(0xE9), o1(0xEA), o1(0xEB),
+     o1(0xEC), o1(0xED), o1(0xEE), o1(0xEF),
+
+#define to_MACCYRILLIC_D0 WORDINDEX2INFO(9500)
+    to_ISO_8859_5_D0_offsets,
+    to_MACCYRILLIC_D0_infos,
+
+#define to_MACCYRILLIC_D1_infos WORDINDEX2INFO(9502)
+      INVALID, o1(0xF0), o1(0xF1), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xF6),
+     o1(0xF7), o1(0xF8), o1(0xF9), o1(0xFA),
+     o1(0xFB), o1(0xFC), o1(0xFD), o1(0xFE),
+     o1(0xDF),    UNDEF, o1(0xDE), o1(0xAC),
+     o1(0xAF), o1(0xB9), o1(0xCF), o1(0xB4),
+     o1(0xBB), o1(0xC0), o1(0xBD), o1(0xBF),
+     o1(0xCC), o1(0xCE), o1(0xD9), o1(0xDB),
+
+#define to_MACCYRILLIC_D1 WORDINDEX2INFO(9534)
+    to_ISO_8859_5_D1_offsets,
+    to_MACCYRILLIC_D1_infos,
+
+#define to_MACCYRILLIC_E2_80_infos WORDINDEX2INFO(9536)
+      INVALID,    UNDEF, o1(0xD0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xD2), o1(0xD3),
+     o1(0xD7), o1(0xA0), o1(0xA5), o1(0xC9),
+
+#define to_MACCYRILLIC_E2_80 WORDINDEX2INFO(9548)
+    to_MACCYRILLIC_E2_80_offsets,
+    to_MACCYRILLIC_E2_80_infos,
+
+#define to_MACCYRILLIC_E2_84_infos WORDINDEX2INFO(9550)
+      INVALID,    UNDEF, o1(0xDC), o1(0xAA),
+
+#define to_MACCYRILLIC_E2_84 WORDINDEX2INFO(9554)
+    to_WINDOWS_1251_E2_84_offsets,
+    to_MACCYRILLIC_E2_84_infos,
+
+#define to_MACCYRILLIC_E2_88_infos WORDINDEX2INFO(9556)
+      INVALID,    UNDEF, o1(0xB6), o1(0xC6),
+     o1(0xC3), o1(0xB0),
+
+#define to_MACCYRILLIC_E2_88 WORDINDEX2INFO(9562)
+    to_MACCYRILLIC_E2_88_offsets,
+    to_MACCYRILLIC_E2_88_infos,
+
+#define to_MACCYRILLIC_E2_infos WORDINDEX2INFO(9564)
+                  INVALID, to_MACCYRILLIC_E2_80,
+           to_US_ASCII_C2, to_MACCYRILLIC_E2_84,
+     to_MACCYRILLIC_E2_88, to_MACCROATIAN_E2_89,
+
+#define to_MACCYRILLIC_E2 WORDINDEX2INFO(9570)
+    to_MACCYRILLIC_E2_offsets,
+    to_MACCYRILLIC_E2_infos,
+
+#define to_MACCYRILLIC_infos WORDINDEX2INFO(9572)
+                 NOMAP,           INVALID,
+     to_MACCYRILLIC_C2, to_MACCYRILLIC_C3,
+        to_US_ASCII_C2, to_MACCROATIAN_C6,
+     to_MACCYRILLIC_D0, to_MACCYRILLIC_D1,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+     to_MACCYRILLIC_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_MACCYRILLIC WORDINDEX2INFO(9587)
+    to_MACCYRILLIC_offsets,
+    to_MACCYRILLIC_infos,
+
+#define from_MACGREEK_infos WORDINDEX2INFO(9589)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC2,0xB9),      o2(0xC2,0xB2),
+          o2(0xC3,0x89),      o2(0xC2,0xB3),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xCE,0x85),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xCE,0x84),      o2(0xC2,0xA8),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC2,0xA3),
+     o3(0xE2,0x84,0xA2),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF), o3(0xE2,0x80,0xA2),
+          o2(0xC2,0xBD), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC2,0xA6),      o2(0xC2,0xAD),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC), o3(0xE2,0x80,0xA0),
+          o2(0xCE,0x93),      o2(0xCE,0x94),
+          o2(0xCE,0x98),      o2(0xCE,0x9B),
+          o2(0xCE,0x9E),      o2(0xCE,0xA0),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9),      o2(0xCE,0xA3),
+          o2(0xCE,0xAA),      o2(0xC2,0xA7),
+     o3(0xE2,0x89,0xA0),      o2(0xC2,0xB0),
+          o2(0xCE,0x87),      o2(0xCE,0x91),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA5),
+          o2(0xCE,0x92),      o2(0xCE,0x95),
+          o2(0xCE,0x96),      o2(0xCE,0x97),
+          o2(0xCE,0x99),      o2(0xCE,0x9A),
+          o2(0xCE,0x9C),      o2(0xCE,0xA6),
+          o2(0xCE,0xAB),      o2(0xCE,0xA8),
+          o2(0xCE,0xA9),      o2(0xCE,0xAC),
+          o2(0xCE,0x9D),      o2(0xC2,0xAC),
+          o2(0xCE,0x9F),      o2(0xCE,0xA1),
+     o3(0xE2,0x89,0x88),      o2(0xCE,0xA4),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xCE,0xA5),      o2(0xCE,0xA7),
+          o2(0xCE,0x86),      o2(0xCE,0x88),
+          o2(0xC5,0x93), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x95), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+          o2(0xCE,0x89),      o2(0xCE,0x8A),
+          o2(0xCE,0x8C),      o2(0xCE,0x8E),
+          o2(0xCE,0xAD),      o2(0xCE,0xAE),
+          o2(0xCE,0xAF),      o2(0xCF,0x8C),
+          o2(0xCE,0x8F),      o2(0xCF,0x8D),
+          o2(0xCE,0xB1),      o2(0xCE,0xB2),
+          o2(0xCF,0x88),      o2(0xCE,0xB4),
+          o2(0xCE,0xB5),      o2(0xCF,0x86),
+          o2(0xCE,0xB3),      o2(0xCE,0xB7),
+          o2(0xCE,0xB9),      o2(0xCE,0xBE),
+          o2(0xCE,0xBA),      o2(0xCE,0xBB),
+          o2(0xCE,0xBC),      o2(0xCE,0xBD),
+          o2(0xCE,0xBF),      o2(0xCF,0x80),
+          o2(0xCF,0x8E),      o2(0xCF,0x81),
+          o2(0xCF,0x83),      o2(0xCF,0x84),
+          o2(0xCE,0xB8),      o2(0xCF,0x89),
+          o2(0xCF,0x82),      o2(0xCF,0x87),
+          o2(0xCF,0x85),      o2(0xCE,0xB6),
+          o2(0xCF,0x8A),      o2(0xCF,0x8B),
+          o2(0xCE,0x90),      o2(0xCE,0xB0),
+                  UNDEF,
+
+#define from_MACGREEK WORDINDEX2INFO(9718)
+    from_ISO_8859_1_offsets,
+    from_MACGREEK_infos,
+
+#define to_MACGREEK_C2_infos WORDINDEX2INFO(9720)
+      INVALID,    UNDEF, o1(0xCA), o1(0x92),
+     o1(0xB4), o1(0x9B), o1(0xAC), o1(0x8C),
+     o1(0xA9), o1(0xC7), o1(0xC2), o1(0x9C),
+     o1(0xA8), o1(0xAE), o1(0xB1), o1(0x82),
+     o1(0x84), o1(0x81), o1(0xC8), o1(0x97),
+
+#define to_MACGREEK_C2 WORDINDEX2INFO(9740)
+    to_MACGREEK_C2_offsets,
+    to_MACGREEK_C2_infos,
+
+#define to_MACGREEK_C3_infos WORDINDEX2INFO(9742)
+      INVALID,    UNDEF, o1(0x80), o1(0x83),
+     o1(0x85), o1(0x86), o1(0xA7), o1(0x88),
+     o1(0x89), o1(0x8A), o1(0x8D), o1(0x8F),
+     o1(0x8E), o1(0x90), o1(0x91), o1(0x94),
+     o1(0x95), o1(0x99), o1(0x9A), o1(0xD6),
+     o1(0x9D), o1(0x9E), o1(0x9F),
+
+#define to_MACGREEK_C3 WORDINDEX2INFO(9765)
+    to_MACGREEK_C3_offsets,
+    to_MACGREEK_C3_infos,
+
+#define to_MACGREEK_C5_infos WORDINDEX2INFO(9767)
+      INVALID,    UNDEF, o1(0xCF),
+
+#define to_MACGREEK_C5 WORDINDEX2INFO(9770)
+    to_MACGREEK_C5_offsets,
+    to_MACGREEK_C5_infos,
+
+#define to_MACGREEK_CE_infos WORDINDEX2INFO(9772)
+      INVALID,    UNDEF, o1(0x8B), o1(0x87),
+     o1(0xCD), o1(0xAF), o1(0xCE), o1(0xD7),
+     o1(0xD8), o1(0xD9), o1(0xDA), o1(0xDF),
+     o1(0xFD), o1(0xB0), o1(0xB5), o1(0xA1),
+     o1(0xA2), o1(0xB6), o1(0xB7), o1(0xB8),
+     o1(0xA3), o1(0xB9), o1(0xBA), o1(0xA4),
+     o1(0xBB), o1(0xC1), o1(0xA5), o1(0xC3),
+     o1(0xA6), o1(0xC4), o1(0xAA), o1(0xC6),
+     o1(0xCB), o1(0xBC), o1(0xCC), o1(0xBE),
+     o1(0xBF), o1(0xAB), o1(0xBD), o1(0xC0),
+     o1(0xDB), o1(0xDC), o1(0xDD), o1(0xFE),
+     o1(0xE1), o1(0xE2), o1(0xE7), o1(0xE4),
+     o1(0xE5), o1(0xFA), o1(0xE8), o1(0xF5),
+     o1(0xE9), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEA), o1(0xEF),
+
+#define to_MACGREEK_CE WORDINDEX2INFO(9831)
+    to_MACGREEK_CE_offsets,
+    to_MACGREEK_CE_infos,
+
+#define to_MACGREEK_CF_infos WORDINDEX2INFO(9833)
+      INVALID, o1(0xF0), o1(0xF2), o1(0xF7),
+     o1(0xF3), o1(0xF4), o1(0xF9), o1(0xE6),
+     o1(0xF8), o1(0xE3), o1(0xF6), o1(0xFB),
+     o1(0xFC), o1(0xDE), o1(0xE0), o1(0xF1),
+        UNDEF,
+
+#define to_MACGREEK_CF WORDINDEX2INFO(9850)
+    to_ISO_8859_7_CF_offsets,
+    to_MACGREEK_CF_infos,
+
+#define to_MACGREEK_E2_80_infos WORDINDEX2INFO(9852)
+      INVALID,    UNDEF, o1(0xD0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xD2), o1(0xD3),
+     o1(0xA0), o1(0x96), o1(0xC9), o1(0x98),
+
+#define to_MACGREEK_E2_80 WORDINDEX2INFO(9864)
+    to_MACGREEK_E2_80_offsets,
+    to_MACGREEK_E2_80_infos,
+
+#define to_MACGREEK_E2_84_infos WORDINDEX2INFO(9866)
+      INVALID,    UNDEF, o1(0x93),
+
+#define to_MACGREEK_E2_84 WORDINDEX2INFO(9869)
+    to_WINDOWS_1250_E2_84_offsets,
+    to_MACGREEK_E2_84_infos,
+
+#define to_MACGREEK_E2_infos WORDINDEX2INFO(9871)
+                  INVALID,    to_MACGREEK_E2_80,
+           to_US_ASCII_C2,    to_MACGREEK_E2_84,
+     to_MACCROATIAN_E2_89,
+
+#define to_MACGREEK_E2 WORDINDEX2INFO(9876)
+    to_MACGREEK_E2_offsets,
+    to_MACGREEK_E2_infos,
+
+#define to_MACGREEK_infos WORDINDEX2INFO(9878)
+              NOMAP,        INVALID, to_MACGREEK_C2, to_MACGREEK_C3,
+     to_US_ASCII_C2, to_MACGREEK_C5, to_MACGREEK_CE, to_MACGREEK_CF,
+     to_US_ASCII_E0, to_US_ASCII_E1, to_MACGREEK_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_MACGREEK WORDINDEX2INFO(9893)
+    to_MACGREEK_offsets,
+    to_MACGREEK_infos,
+
+#define from_MACICELAND_infos WORDINDEX2INFO(9895)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x87),
+          o2(0xC3,0x89),      o2(0xC3,0x91),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xA1),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA3),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAD),
+          o2(0xC3,0xAC),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB1),
+          o2(0xC3,0xB3),      o2(0xC3,0xB2),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB5),      o2(0xC3,0xBA),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC),      o2(0xC3,0x9D),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xC2,0xB4),      o2(0xC2,0xA8),
+     o3(0xE2,0x89,0xA0),      o2(0xC3,0x86),
+          o2(0xC3,0x98), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA5),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xCF,0x80), o3(0xE2,0x88,0xAB),
+          o2(0xC2,0xAA),      o2(0xC2,0xBA),
+     o3(0xE2,0x84,0xA6),      o2(0xC3,0xA6),
+          o2(0xC3,0xB8),      o2(0xC2,0xBF),
+          o2(0xC2,0xA1),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xC3,0x80),      o2(0xC3,0x83),
+          o2(0xC3,0x95),      o2(0xC5,0x92),
+          o2(0xC5,0x93), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x97,0x8A),      o2(0xC3,0xBF),
+          o2(0xC5,0xB8), o3(0xE2,0x81,0x84),
+          o2(0xC2,0xA4),      o2(0xC3,0x90),
+          o2(0xC3,0xB0),      o2(0xC3,0x9E),
+          o2(0xC3,0xBE),      o2(0xC3,0xBD),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0x82),      o2(0xC3,0x8A),
+          o2(0xC3,0x81),      o2(0xC3,0x8B),
+          o2(0xC3,0x88),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+          o2(0xC3,0x8C),      o2(0xC3,0x93),
+          o2(0xC3,0x94),              UNDEF,
+          o2(0xC3,0x92),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xC4,0xB1),      o2(0xCB,0x86),
+          o2(0xCB,0x9C),      o2(0xC2,0xAF),
+          o2(0xCB,0x98),      o2(0xCB,0x99),
+          o2(0xCB,0x9A),      o2(0xC2,0xB8),
+          o2(0xCB,0x9D),      o2(0xCB,0x9B),
+          o2(0xCB,0x87),
+
+#define from_MACICELAND WORDINDEX2INFO(10024)
+    from_ISO_8859_1_offsets,
+    from_MACICELAND_infos,
+
+#define to_MACICELAND_C2_infos WORDINDEX2INFO(10026)
+      INVALID,    UNDEF, o1(0xCA), o1(0xC1),
+     o1(0xA2), o1(0xA3), o1(0xDB), o1(0xB4),
+     o1(0xA4), o1(0xAC), o1(0xA9), o1(0xBB),
+     o1(0xC7), o1(0xC2), o1(0xA8), o1(0xF8),
+     o1(0xA1), o1(0xB1), o1(0xAB), o1(0xB5),
+     o1(0xA6), o1(0xE1), o1(0xFC), o1(0xBC),
+     o1(0xC8), o1(0xC0),
+
+#define to_MACICELAND_C2 WORDINDEX2INFO(10052)
+    to_MACICELAND_C2_offsets,
+    to_MACICELAND_C2_infos,
+
+#define to_MACICELAND_C3_infos WORDINDEX2INFO(10054)
+      INVALID, o1(0xCB), o1(0xE7), o1(0xE5),
+     o1(0xCC), o1(0x80), o1(0x81), o1(0xAE),
+     o1(0x82), o1(0xE9), o1(0x83), o1(0xE6),
+     o1(0xE8), o1(0xED), o1(0xEA), o1(0xEB),
+     o1(0xEC), o1(0xDC), o1(0x84), o1(0xF1),
+     o1(0xEE), o1(0xEF), o1(0xCD), o1(0x85),
+        UNDEF, o1(0xAF), o1(0xF4), o1(0xF2),
+     o1(0xF3), o1(0x86), o1(0xA0), o1(0xDE),
+     o1(0xA7), o1(0x88), o1(0x87), o1(0x89),
+     o1(0x8B), o1(0x8A), o1(0x8C), o1(0xBE),
+     o1(0x8D), o1(0x8F), o1(0x8E), o1(0x90),
+     o1(0x91), o1(0x93), o1(0x92), o1(0x94),
+     o1(0x95), o1(0xDD), o1(0x96), o1(0x98),
+     o1(0x97), o1(0x99), o1(0x9B), o1(0x9A),
+     o1(0xD6), o1(0xBF), o1(0x9D), o1(0x9C),
+     o1(0x9E), o1(0x9F), o1(0xE0), o1(0xDF),
+     o1(0xD8),
+
+#define to_MACICELAND_C3 WORDINDEX2INFO(10119)
+    to_ISO_8859_1_C2_offsets,
+    to_MACICELAND_C3_infos,
+
+#define to_MACICELAND_C4_infos WORDINDEX2INFO(10121)
+      INVALID,    UNDEF, o1(0xF5),
+
+#define to_MACICELAND_C4 WORDINDEX2INFO(10124)
+    to_MACICELAND_C4_offsets,
+    to_MACICELAND_C4_infos,
+
+#define to_MACICELAND_C5_infos WORDINDEX2INFO(10126)
+      INVALID,    UNDEF, o1(0xCE), o1(0xCF),
+     o1(0xD9),
+
+#define to_MACICELAND_C5 WORDINDEX2INFO(10131)
+    to_MACICELAND_C5_offsets,
+    to_MACICELAND_C5_infos,
+
+#define to_MACICELAND_CB_infos WORDINDEX2INFO(10133)
+      INVALID,    UNDEF, o1(0xF6), o1(0xFF),
+     o1(0xF9), o1(0xFA), o1(0xFB), o1(0xFE),
+     o1(0xF7), o1(0xFD),
+
+#define to_MACICELAND_CB WORDINDEX2INFO(10143)
+    to_MACICELAND_CB_offsets,
+    to_MACICELAND_CB_infos,
+
+#define to_MACICELAND_CF_infos WORDINDEX2INFO(10145)
+      INVALID, o1(0xB9),    UNDEF,
+
+#define to_MACICELAND_CF WORDINDEX2INFO(10148)
+    to_ISO_8859_8_E2_offsets,
+    to_MACICELAND_CF_infos,
+
+#define to_MACICELAND_E2_80_infos WORDINDEX2INFO(10150)
+      INVALID,    UNDEF, o1(0xD0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xE2), o1(0xD2),
+     o1(0xD3), o1(0xE3), o1(0xA5), o1(0xC9),
+     o1(0xE4),
+
+#define to_MACICELAND_E2_80 WORDINDEX2INFO(10163)
+    to_MACICELAND_E2_80_offsets,
+    to_MACICELAND_E2_80_infos,
+
+#define to_MACICELAND_E2_88_infos WORDINDEX2INFO(10165)
+      INVALID,    UNDEF, o1(0xB6), o1(0xC6),
+     o1(0xB8), o1(0xB7), o1(0xC3), o1(0xB0),
+     o1(0xBA),
+
+#define to_MACICELAND_E2_88 WORDINDEX2INFO(10174)
+    to_MACCROATIAN_E2_88_offsets,
+    to_MACICELAND_E2_88_infos,
+
+#define to_MACICELAND_E2_infos WORDINDEX2INFO(10176)
+                  INVALID,  to_MACICELAND_E2_80,
+     to_MACCROATIAN_E2_81,       to_US_ASCII_C2,
+     to_MACCROATIAN_E2_84,  to_MACICELAND_E2_88,
+     to_MACCROATIAN_E2_89, to_MACCROATIAN_E2_97,
+
+#define to_MACICELAND_E2 WORDINDEX2INFO(10184)
+    to_MACCROATIAN_E2_offsets,
+    to_MACICELAND_E2_infos,
+
+#define to_MACICELAND_infos WORDINDEX2INFO(10186)
+                 NOMAP,           INVALID,
+      to_MACICELAND_C2,  to_MACICELAND_C3,
+      to_MACICELAND_C4,  to_MACICELAND_C5,
+     to_MACCROATIAN_C6,    to_US_ASCII_C2,
+      to_MACICELAND_CB,  to_MACICELAND_CF,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+      to_MACICELAND_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_MACICELAND WORDINDEX2INFO(10203)
+    to_MACCROATIAN_offsets,
+    to_MACICELAND_infos,
+
+#define from_MACROMAN_infos WORDINDEX2INFO(10205)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x87),
+          o2(0xC3,0x89),      o2(0xC3,0x91),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xA1),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA3),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAD),
+          o2(0xC3,0xAC),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB1),
+          o2(0xC3,0xB3),      o2(0xC3,0xB2),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB5),      o2(0xC3,0xBA),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xC2,0xB4),      o2(0xC2,0xA8),
+     o3(0xE2,0x89,0xA0),      o2(0xC3,0x86),
+          o2(0xC3,0x98), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA5),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xCF,0x80), o3(0xE2,0x88,0xAB),
+          o2(0xC2,0xAA),      o2(0xC2,0xBA),
+     o3(0xE2,0x84,0xA6),      o2(0xC3,0xA6),
+          o2(0xC3,0xB8),      o2(0xC2,0xBF),
+          o2(0xC2,0xA1),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xC3,0x80),      o2(0xC3,0x83),
+          o2(0xC3,0x95),      o2(0xC5,0x92),
+          o2(0xC5,0x93), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x97,0x8A),      o2(0xC3,0xBF),
+          o2(0xC5,0xB8), o3(0xE2,0x81,0x84),
+          o2(0xC2,0xA4), o3(0xE2,0x80,0xB9),
+     o3(0xE2,0x80,0xBA), o3(0xEF,0xAC,0x81),
+     o3(0xEF,0xAC,0x82), o3(0xE2,0x80,0xA1),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0x82),      o2(0xC3,0x8A),
+          o2(0xC3,0x81),      o2(0xC3,0x8B),
+          o2(0xC3,0x88),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+          o2(0xC3,0x8C),      o2(0xC3,0x93),
+          o2(0xC3,0x94),              UNDEF,
+          o2(0xC3,0x92),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xC4,0xB1),      o2(0xCB,0x86),
+          o2(0xCB,0x9C),      o2(0xC2,0xAF),
+          o2(0xCB,0x98),      o2(0xCB,0x99),
+          o2(0xCB,0x9A),      o2(0xC2,0xB8),
+          o2(0xCB,0x9D),      o2(0xCB,0x9B),
+          o2(0xCB,0x87),
+
+#define from_MACROMAN WORDINDEX2INFO(10334)
+    from_ISO_8859_1_offsets,
+    from_MACROMAN_infos,
+
+#define to_MACROMAN_C3_infos WORDINDEX2INFO(10336)
+      INVALID, o1(0xCB), o1(0xE7), o1(0xE5),
+     o1(0xCC), o1(0x80), o1(0x81), o1(0xAE),
+     o1(0x82), o1(0xE9), o1(0x83), o1(0xE6),
+     o1(0xE8), o1(0xED), o1(0xEA), o1(0xEB),
+     o1(0xEC),    UNDEF, o1(0x84), o1(0xF1),
+     o1(0xEE), o1(0xEF), o1(0xCD), o1(0x85),
+     o1(0xAF), o1(0xF4), o1(0xF2), o1(0xF3),
+     o1(0x86), o1(0xA7), o1(0x88), o1(0x87),
+     o1(0x89), o1(0x8B), o1(0x8A), o1(0x8C),
+     o1(0xBE), o1(0x8D), o1(0x8F), o1(0x8E),
+     o1(0x90), o1(0x91), o1(0x93), o1(0x92),
+     o1(0x94), o1(0x95), o1(0x96), o1(0x98),
+     o1(0x97), o1(0x99), o1(0x9B), o1(0x9A),
+     o1(0xD6), o1(0xBF), o1(0x9D), o1(0x9C),
+     o1(0x9E), o1(0x9F), o1(0xD8),
+
+#define to_MACROMAN_C3 WORDINDEX2INFO(10395)
+    to_MACROMAN_C3_offsets,
+    to_MACROMAN_C3_infos,
+
+#define to_MACROMAN_E2_80_infos WORDINDEX2INFO(10397)
+      INVALID,    UNDEF, o1(0xD0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xE2), o1(0xD2),
+     o1(0xD3), o1(0xE3), o1(0xA0), o1(0xE0),
+     o1(0xA5), o1(0xC9), o1(0xE4), o1(0xDC),
+     o1(0xDD),
+
+#define to_MACROMAN_E2_80 WORDINDEX2INFO(10414)
+    to_WINDOWS_1250_E2_80_offsets,
+    to_MACROMAN_E2_80_infos,
+
+#define to_MACROMAN_E2_infos WORDINDEX2INFO(10416)
+                  INVALID,    to_MACROMAN_E2_80,
+     to_MACCROATIAN_E2_81,       to_US_ASCII_C2,
+     to_MACCROATIAN_E2_84,  to_MACICELAND_E2_88,
+     to_MACCROATIAN_E2_89, to_MACCROATIAN_E2_97,
+
+#define to_MACROMAN_E2 WORDINDEX2INFO(10424)
+    to_MACCROATIAN_E2_offsets,
+    to_MACROMAN_E2_infos,
+
+#define to_MACROMAN_EF_AC_infos WORDINDEX2INFO(10426)
+      INVALID,    UNDEF, o1(0xDE), o1(0xDF),
+
+#define to_MACROMAN_EF_AC WORDINDEX2INFO(10430)
+    to_MACROMAN_EF_AC_offsets,
+    to_MACROMAN_EF_AC_infos,
+
+#define to_MACROMAN_EF_infos WORDINDEX2INFO(10432)
+               INVALID,    to_US_ASCII_C2,
+     to_MACROMAN_EF_AC,
+
+#define to_MACROMAN_EF WORDINDEX2INFO(10435)
+    to_ISO_8859_15_E2_82_offsets,
+    to_MACROMAN_EF_infos,
+
+#define to_MACROMAN_infos WORDINDEX2INFO(10437)
+                 NOMAP,           INVALID,
+      to_MACICELAND_C2,    to_MACROMAN_C3,
+      to_MACICELAND_C4,  to_MACICELAND_C5,
+     to_MACCROATIAN_C6,    to_US_ASCII_C2,
+      to_MACICELAND_CB,  to_MACICELAND_CF,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+        to_MACROMAN_E2,    to_US_ASCII_ED,
+        to_MACROMAN_EF,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_MACROMAN WORDINDEX2INFO(10455)
+    to_MACROMAN_offsets,
+    to_MACROMAN_infos,
+
+#define from_MACROMANIA_infos WORDINDEX2INFO(10457)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x87),
+          o2(0xC3,0x89),      o2(0xC3,0x91),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xA1),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA3),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAD),
+          o2(0xC3,0xAC),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB1),
+          o2(0xC3,0xB3),      o2(0xC3,0xB2),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB5),      o2(0xC3,0xBA),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xC2,0xB4),      o2(0xC2,0xA8),
+     o3(0xE2,0x89,0xA0),      o2(0xC4,0x82),
+          o2(0xC5,0x9E), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA5),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xCF,0x80), o3(0xE2,0x88,0xAB),
+          o2(0xC2,0xAA),      o2(0xC2,0xBA),
+     o3(0xE2,0x84,0xA6),      o2(0xC4,0x83),
+          o2(0xC5,0x9F),      o2(0xC2,0xBF),
+          o2(0xC2,0xA1),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xC3,0x80),      o2(0xC3,0x83),
+          o2(0xC3,0x95),      o2(0xC5,0x92),
+          o2(0xC5,0x93), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x97,0x8A),      o2(0xC3,0xBF),
+          o2(0xC5,0xB8), o3(0xE2,0x81,0x84),
+          o2(0xC2,0xA4), o3(0xE2,0x80,0xB9),
+     o3(0xE2,0x80,0xBA),      o2(0xC5,0xA2),
+          o2(0xC5,0xA3), o3(0xE2,0x80,0xA1),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0x82),      o2(0xC3,0x8A),
+          o2(0xC3,0x81),      o2(0xC3,0x8B),
+          o2(0xC3,0x88),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+          o2(0xC3,0x8C),      o2(0xC3,0x93),
+          o2(0xC3,0x94),              UNDEF,
+          o2(0xC3,0x92),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xC4,0xB1),      o2(0xCB,0x86),
+          o2(0xCB,0x9C),      o2(0xC2,0xAF),
+          o2(0xCB,0x98),      o2(0xCB,0x99),
+          o2(0xCB,0x9A),      o2(0xC2,0xB8),
+          o2(0xCB,0x9D),      o2(0xCB,0x9B),
+          o2(0xCB,0x87),
+
+#define from_MACROMANIA WORDINDEX2INFO(10586)
+    from_ISO_8859_1_offsets,
+    from_MACROMANIA_infos,
+
+#define to_MACROMANIA_C3_infos WORDINDEX2INFO(10588)
+      INVALID, o1(0xCB), o1(0xE7), o1(0xE5),
+     o1(0xCC), o1(0x80), o1(0x81),    UNDEF,
+     o1(0x82), o1(0xE9), o1(0x83), o1(0xE6),
+     o1(0xE8), o1(0xED), o1(0xEA), o1(0xEB),
+     o1(0xEC), o1(0x84), o1(0xF1), o1(0xEE),
+     o1(0xEF), o1(0xCD), o1(0x85), o1(0xF4),
+     o1(0xF2), o1(0xF3), o1(0x86), o1(0xA7),
+     o1(0x88), o1(0x87), o1(0x89), o1(0x8B),
+     o1(0x8A), o1(0x8C), o1(0x8D), o1(0x8F),
+     o1(0x8E), o1(0x90), o1(0x91), o1(0x93),
+     o1(0x92), o1(0x94), o1(0x95), o1(0x96),
+     o1(0x98), o1(0x97), o1(0x99), o1(0x9B),
+     o1(0x9A), o1(0xD6), o1(0x9D), o1(0x9C),
+     o1(0x9E), o1(0x9F), o1(0xD8),
+
+#define to_MACROMANIA_C3 WORDINDEX2INFO(10643)
+    to_MACROMANIA_C3_offsets,
+    to_MACROMANIA_C3_infos,
+
+#define to_MACROMANIA_C4_infos WORDINDEX2INFO(10645)
+      INVALID,    UNDEF, o1(0xAE), o1(0xBE),
+     o1(0xF5),
+
+#define to_MACROMANIA_C4 WORDINDEX2INFO(10650)
+    to_MACROMANIA_C4_offsets,
+    to_MACROMANIA_C4_infos,
+
+#define to_MACROMANIA_C5_infos WORDINDEX2INFO(10652)
+      INVALID,    UNDEF, o1(0xCE), o1(0xCF),
+     o1(0xAF), o1(0xBF), o1(0xDE), o1(0xDF),
+     o1(0xD9),
+
+#define to_MACROMANIA_C5 WORDINDEX2INFO(10661)
+    to_MACROMANIA_C5_offsets,
+    to_MACROMANIA_C5_infos,
+
+#define to_MACROMANIA_infos WORDINDEX2INFO(10663)
+                 NOMAP,           INVALID,
+      to_MACICELAND_C2,  to_MACROMANIA_C3,
+      to_MACROMANIA_C4,  to_MACROMANIA_C5,
+     to_MACCROATIAN_C6,    to_US_ASCII_C2,
+      to_MACICELAND_CB,  to_MACICELAND_CF,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+        to_MACROMAN_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_MACROMANIA WORDINDEX2INFO(10680)
+    to_MACCROATIAN_offsets,
+    to_MACROMANIA_infos,
+
+#define from_MACTURKISH_infos WORDINDEX2INFO(10682)
+                  NOMAP,      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x87),
+          o2(0xC3,0x89),      o2(0xC3,0x91),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xA1),      o2(0xC3,0xA0),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA3),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xA9),
+          o2(0xC3,0xA8),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xAD),
+          o2(0xC3,0xAC),      o2(0xC3,0xAE),
+          o2(0xC3,0xAF),      o2(0xC3,0xB1),
+          o2(0xC3,0xB3),      o2(0xC3,0xB2),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB5),      o2(0xC3,0xBA),
+          o2(0xC3,0xB9),      o2(0xC3,0xBB),
+          o2(0xC3,0xBC), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xC2,0xA2),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xC3,0x9F),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xC2,0xB4),      o2(0xC2,0xA8),
+     o3(0xE2,0x89,0xA0),      o2(0xC3,0x86),
+          o2(0xC3,0x98), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA5),
+          o2(0xC2,0xB5), o3(0xE2,0x88,0x82),
+     o3(0xE2,0x88,0x91), o3(0xE2,0x88,0x8F),
+          o2(0xCF,0x80), o3(0xE2,0x88,0xAB),
+          o2(0xC2,0xAA),      o2(0xC2,0xBA),
+     o3(0xE2,0x84,0xA6),      o2(0xC3,0xA6),
+          o2(0xC3,0xB8),      o2(0xC2,0xBF),
+          o2(0xC2,0xA1),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xC3,0x80),      o2(0xC3,0x83),
+          o2(0xC3,0x95),      o2(0xC5,0x92),
+          o2(0xC5,0x93), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x97,0x8A),      o2(0xC3,0xBF),
+          o2(0xC5,0xB8),      o2(0xC4,0x9E),
+          o2(0xC4,0x9F),      o2(0xC4,0xB0),
+          o2(0xC4,0xB1),      o2(0xC5,0x9E),
+          o2(0xC5,0x9F), o3(0xE2,0x80,0xA1),
+          o2(0xC2,0xB7), o3(0xE2,0x80,0x9A),
+     o3(0xE2,0x80,0x9E), o3(0xE2,0x80,0xB0),
+          o2(0xC3,0x82),      o2(0xC3,0x8A),
+          o2(0xC3,0x81),      o2(0xC3,0x8B),
+          o2(0xC3,0x88),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+          o2(0xC3,0x8C),      o2(0xC3,0x93),
+          o2(0xC3,0x94),              UNDEF,
+          o2(0xC3,0x92),      o2(0xC3,0x9A),
+          o2(0xC3,0x9B),      o2(0xC3,0x99),
+          o2(0xCB,0x86),      o2(0xCB,0x9C),
+          o2(0xC2,0xAF),      o2(0xCB,0x98),
+          o2(0xCB,0x99),      o2(0xCB,0x9A),
+          o2(0xC2,0xB8),      o2(0xCB,0x9D),
+          o2(0xCB,0x9B),      o2(0xCB,0x87),
+
+#define from_MACTURKISH WORDINDEX2INFO(10810)
+    from_MACTURKISH_offsets,
+    from_MACTURKISH_infos,
+
+#define to_MACTURKISH_C2_infos WORDINDEX2INFO(10812)
+      INVALID,    UNDEF, o1(0xCA), o1(0xC1),
+     o1(0xA2), o1(0xA3), o1(0xB4), o1(0xA4),
+     o1(0xAC), o1(0xA9), o1(0xBB), o1(0xC7),
+     o1(0xC2), o1(0xA8), o1(0xF8), o1(0xA1),
+     o1(0xB1), o1(0xAB), o1(0xB5), o1(0xA6),
+     o1(0xE1), o1(0xFC), o1(0xBC), o1(0xC8),
+     o1(0xC0),
+
+#define to_MACTURKISH_C2 WORDINDEX2INFO(10837)
+    to_MACTURKISH_C2_offsets,
+    to_MACTURKISH_C2_infos,
+
+#define to_MACTURKISH_C4_infos WORDINDEX2INFO(10839)
+      INVALID,    UNDEF, o1(0xDA), o1(0xDB),
+     o1(0xDC), o1(0xDD),
+
+#define to_MACTURKISH_C4 WORDINDEX2INFO(10845)
+    to_ISO_8859_9_C4_offsets,
+    to_MACTURKISH_C4_infos,
+
+#define to_MACTURKISH_C5_infos WORDINDEX2INFO(10847)
+      INVALID,    UNDEF, o1(0xCE), o1(0xCF),
+     o1(0xDE), o1(0xDF), o1(0xD9),
+
+#define to_MACTURKISH_C5 WORDINDEX2INFO(10854)
+    to_MACTURKISH_C5_offsets,
+    to_MACTURKISH_C5_infos,
+
+#define to_MACTURKISH_E2_80_infos WORDINDEX2INFO(10856)
+      INVALID,    UNDEF, o1(0xD0), o1(0xD1),
+     o1(0xD4), o1(0xD5), o1(0xE2), o1(0xD2),
+     o1(0xD3), o1(0xE3), o1(0xA0), o1(0xE0),
+     o1(0xA5), o1(0xC9), o1(0xE4),
+
+#define to_MACTURKISH_E2_80 WORDINDEX2INFO(10871)
+    to_MACTURKISH_E2_80_offsets,
+    to_MACTURKISH_E2_80_infos,
+
+#define to_MACTURKISH_E2_infos WORDINDEX2INFO(10873)
+                  INVALID,  to_MACTURKISH_E2_80,
+           to_US_ASCII_C2, to_MACCROATIAN_E2_84,
+      to_MACICELAND_E2_88, to_MACCROATIAN_E2_89,
+     to_MACCROATIAN_E2_97,
+
+#define to_MACTURKISH_E2 WORDINDEX2INFO(10880)
+    to_MACTURKISH_E2_offsets,
+    to_MACTURKISH_E2_infos,
+
+#define to_MACTURKISH_infos WORDINDEX2INFO(10882)
+                 NOMAP,           INVALID,
+      to_MACTURKISH_C2,    to_MACROMAN_C3,
+      to_MACTURKISH_C4,  to_MACTURKISH_C5,
+     to_MACCROATIAN_C6,    to_US_ASCII_C2,
+      to_MACICELAND_CB,  to_MACICELAND_CF,
+        to_US_ASCII_E0,    to_US_ASCII_E1,
+      to_MACTURKISH_E2,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_MACTURKISH WORDINDEX2INFO(10899)
+    to_MACCROATIAN_offsets,
+    to_MACTURKISH_infos,
+
+#define from_MACUKRAINE_infos WORDINDEX2INFO(10901)
+                  NOMAP,      o2(0xD0,0x90),
+          o2(0xD0,0x91),      o2(0xD0,0x92),
+          o2(0xD0,0x93),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0x96),
+          o2(0xD0,0x97),      o2(0xD0,0x98),
+          o2(0xD0,0x99),      o2(0xD0,0x9A),
+          o2(0xD0,0x9B),      o2(0xD0,0x9C),
+          o2(0xD0,0x9D),      o2(0xD0,0x9E),
+          o2(0xD0,0x9F),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0xA4),
+          o2(0xD0,0xA5),      o2(0xD0,0xA6),
+          o2(0xD0,0xA7),      o2(0xD0,0xA8),
+          o2(0xD0,0xA9),      o2(0xD0,0xAA),
+          o2(0xD0,0xAB),      o2(0xD0,0xAC),
+          o2(0xD0,0xAD),      o2(0xD0,0xAE),
+          o2(0xD0,0xAF), o3(0xE2,0x80,0xA0),
+          o2(0xC2,0xB0),      o2(0xD2,0x90),
+          o2(0xC2,0xA3),      o2(0xC2,0xA7),
+     o3(0xE2,0x80,0xA2),      o2(0xC2,0xB6),
+          o2(0xD0,0x86),      o2(0xC2,0xAE),
+          o2(0xC2,0xA9), o3(0xE2,0x84,0xA2),
+          o2(0xD0,0x82),      o2(0xD1,0x92),
+     o3(0xE2,0x89,0xA0),      o2(0xD0,0x83),
+          o2(0xD1,0x93), o3(0xE2,0x88,0x9E),
+          o2(0xC2,0xB1), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xD1,0x96),
+          o2(0xC2,0xB5),      o2(0xD2,0x91),
+          o2(0xD0,0x88),      o2(0xD0,0x84),
+          o2(0xD1,0x94),      o2(0xD0,0x87),
+          o2(0xD1,0x97),      o2(0xD0,0x89),
+          o2(0xD1,0x99),      o2(0xD0,0x8A),
+          o2(0xD1,0x9A),      o2(0xD1,0x98),
+          o2(0xD0,0x85),      o2(0xC2,0xAC),
+     o3(0xE2,0x88,0x9A),      o2(0xC6,0x92),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x88,0x86),
+          o2(0xC2,0xAB),      o2(0xC2,0xBB),
+     o3(0xE2,0x80,0xA6),      o2(0xC2,0xA0),
+          o2(0xD0,0x8B),      o2(0xD1,0x9B),
+          o2(0xD0,0x8C),      o2(0xD1,0x9C),
+          o2(0xD1,0x95), o3(0xE2,0x80,0x93),
+     o3(0xE2,0x80,0x94), o3(0xE2,0x80,0x9C),
+     o3(0xE2,0x80,0x9D), o3(0xE2,0x80,0x98),
+     o3(0xE2,0x80,0x99),      o2(0xC3,0xB7),
+     o3(0xE2,0x80,0x9E),      o2(0xD0,0x8E),
+          o2(0xD1,0x9E),      o2(0xD0,0x8F),
+          o2(0xD1,0x9F), o3(0xE2,0x84,0x96),
+          o2(0xD0,0x81),      o2(0xD1,0x91),
+          o2(0xD1,0x8F),      o2(0xD0,0xB0),
+          o2(0xD0,0xB1),      o2(0xD0,0xB2),
+          o2(0xD0,0xB3),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD0,0xB6),
+          o2(0xD0,0xB7),      o2(0xD0,0xB8),
+          o2(0xD0,0xB9),      o2(0xD0,0xBA),
+          o2(0xD0,0xBB),      o2(0xD0,0xBC),
+          o2(0xD0,0xBD),      o2(0xD0,0xBE),
+          o2(0xD0,0xBF),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD1,0x84),
+          o2(0xD1,0x85),      o2(0xD1,0x86),
+          o2(0xD1,0x87),      o2(0xD1,0x88),
+          o2(0xD1,0x89),      o2(0xD1,0x8A),
+          o2(0xD1,0x8B),      o2(0xD1,0x8C),
+          o2(0xD1,0x8D),      o2(0xD1,0x8E),
+          o2(0xC2,0xA4),
+
+#define from_MACUKRAINE WORDINDEX2INFO(11030)
+    from_ISO_8859_1_offsets,
+    from_MACUKRAINE_infos,
+
+#define to_MACUKRAINE_C2_infos WORDINDEX2INFO(11032)
+      INVALID,    UNDEF, o1(0xCA), o1(0xA3),
+     o1(0xFF), o1(0xA4), o1(0xA9), o1(0xC7),
+     o1(0xC2), o1(0xA8), o1(0xA1), o1(0xB1),
+     o1(0xB5), o1(0xA6), o1(0xC8),
+
+#define to_MACUKRAINE_C2 WORDINDEX2INFO(11047)
+    to_MACUKRAINE_C2_offsets,
+    to_MACUKRAINE_C2_infos,
+
+#define to_MACUKRAINE_D2_infos WORDINDEX2INFO(11049)
+      INVALID,    UNDEF, o1(0xA2), o1(0xB6),
+
+#define to_MACUKRAINE_D2 WORDINDEX2INFO(11053)
+    to_WINDOWS_1251_D2_offsets,
+    to_MACUKRAINE_D2_infos,
+
+#define to_MACUKRAINE_E2_88_infos WORDINDEX2INFO(11055)
+      INVALID,    UNDEF, o1(0xC6), o1(0xC3),
+     o1(0xB0),
+
+#define to_MACUKRAINE_E2_88 WORDINDEX2INFO(11060)
+    to_MACUKRAINE_E2_88_offsets,
+    to_MACUKRAINE_E2_88_infos,
+
+#define to_MACUKRAINE_E2_infos WORDINDEX2INFO(11062)
+                  INVALID, to_MACCYRILLIC_E2_80,
+           to_US_ASCII_C2, to_MACCYRILLIC_E2_84,
+      to_MACUKRAINE_E2_88, to_MACCROATIAN_E2_89,
+
+#define to_MACUKRAINE_E2 WORDINDEX2INFO(11068)
+    to_MACCYRILLIC_E2_offsets,
+    to_MACUKRAINE_E2_infos,
+
+#define to_MACUKRAINE_infos WORDINDEX2INFO(11070)
+                 NOMAP,           INVALID,
+      to_MACUKRAINE_C2, to_MACCYRILLIC_C3,
+        to_US_ASCII_C2, to_MACCROATIAN_C6,
+     to_MACCYRILLIC_D0, to_MACCYRILLIC_D1,
+      to_MACUKRAINE_D2,    to_US_ASCII_E0,
+        to_US_ASCII_E1,  to_MACUKRAINE_E2,
+        to_US_ASCII_ED,    to_US_ASCII_F0,
+        to_US_ASCII_F1,    to_US_ASCII_F4,
+
+#define to_MACUKRAINE WORDINDEX2INFO(11086)
+    to_MACUKRAINE_offsets,
+    to_MACUKRAINE_infos,
+
+#define from_KOI8_U_infos WORDINDEX2INFO(11088)
+                  NOMAP, o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x9C),
+     o3(0xE2,0x94,0xA4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xBC),
+     o3(0xE2,0x96,0x80), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x8C),
+     o3(0xE2,0x96,0x90), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x8C,0xA0), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x88,0x99), o3(0xE2,0x88,0x9A),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC2,0xB0),
+          o2(0xC2,0xB2),      o2(0xC2,0xB7),
+          o2(0xC3,0xB7), o3(0xE2,0x95,0x90),
+     o3(0xE2,0x95,0x91), o3(0xE2,0x95,0x92),
+          o2(0xD1,0x91),      o2(0xD1,0x94),
+     o3(0xE2,0x95,0x94),      o2(0xD1,0x96),
+          o2(0xD1,0x97), o3(0xE2,0x95,0x97),
+     o3(0xE2,0x95,0x98), o3(0xE2,0x95,0x99),
+     o3(0xE2,0x95,0x9A), o3(0xE2,0x95,0x9B),
+          o2(0xD2,0x91), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9E), o3(0xE2,0x95,0x9F),
+     o3(0xE2,0x95,0xA0), o3(0xE2,0x95,0xA1),
+          o2(0xD0,0x81),      o2(0xD0,0x84),
+     o3(0xE2,0x95,0xA3),      o2(0xD0,0x86),
+          o2(0xD0,0x87), o3(0xE2,0x95,0xA6),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA9), o3(0xE2,0x95,0xAA),
+          o2(0xD2,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA9),      o2(0xD1,0x8E),
+          o2(0xD0,0xB0),      o2(0xD0,0xB1),
+          o2(0xD1,0x86),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD1,0x84),
+          o2(0xD0,0xB3),      o2(0xD1,0x85),
+          o2(0xD0,0xB8),      o2(0xD0,0xB9),
+          o2(0xD0,0xBA),      o2(0xD0,0xBB),
+          o2(0xD0,0xBC),      o2(0xD0,0xBD),
+          o2(0xD0,0xBE),      o2(0xD0,0xBF),
+          o2(0xD1,0x8F),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD0,0xB6),
+          o2(0xD0,0xB2),      o2(0xD1,0x8C),
+          o2(0xD1,0x8B),      o2(0xD0,0xB7),
+          o2(0xD1,0x88),      o2(0xD1,0x8D),
+          o2(0xD1,0x89),      o2(0xD1,0x87),
+          o2(0xD1,0x8A),      o2(0xD0,0xAE),
+          o2(0xD0,0x90),      o2(0xD0,0x91),
+          o2(0xD0,0xA6),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0xA4),
+          o2(0xD0,0x93),      o2(0xD0,0xA5),
+          o2(0xD0,0x98),      o2(0xD0,0x99),
+          o2(0xD0,0x9A),      o2(0xD0,0x9B),
+          o2(0xD0,0x9C),      o2(0xD0,0x9D),
+          o2(0xD0,0x9E),      o2(0xD0,0x9F),
+          o2(0xD0,0xAF),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0x96),
+          o2(0xD0,0x92),      o2(0xD0,0xAC),
+          o2(0xD0,0xAB),      o2(0xD0,0x97),
+          o2(0xD0,0xA8),      o2(0xD0,0xAD),
+          o2(0xD0,0xA9),      o2(0xD0,0xA7),
+          o2(0xD0,0xAA),
+
+#define from_KOI8_U WORDINDEX2INFO(11217)
+    from_ISO_8859_1_offsets,
+    from_KOI8_U_infos,
+
+#define to_KOI8_U_C2_infos WORDINDEX2INFO(11219)
+      INVALID,    UNDEF, o1(0x9A), o1(0xBF),
+     o1(0x9C), o1(0x9D), o1(0x9E),
+
+#define to_KOI8_U_C2 WORDINDEX2INFO(11226)
+    to_KOI8_U_C2_offsets,
+    to_KOI8_U_C2_infos,
+
+#define to_KOI8_U_C3 WORDINDEX2INFO(11228)
+    to_MACCYRILLIC_C3_offsets,
+    to_IBM437_C6_infos,
+
+#define to_KOI8_U_D0_infos WORDINDEX2INFO(11230)
+      INVALID,    UNDEF, o1(0xB3), o1(0xB4),
+     o1(0xB6), o1(0xB7), o1(0xE1), o1(0xE2),
+     o1(0xF7), o1(0xE7), o1(0xE4), o1(0xE5),
+     o1(0xF6), o1(0xFA), o1(0xE9), o1(0xEA),
+     o1(0xEB), o1(0xEC), o1(0xED), o1(0xEE),
+     o1(0xEF), o1(0xF0), o1(0xF2), o1(0xF3),
+     o1(0xF4), o1(0xF5), o1(0xE6), o1(0xE8),
+     o1(0xE3), o1(0xFE), o1(0xFB), o1(0xFD),
+     o1(0xFF), o1(0xF9), o1(0xF8), o1(0xFC),
+     o1(0xE0), o1(0xF1), o1(0xC1), o1(0xC2),
+     o1(0xD7), o1(0xC7), o1(0xC4), o1(0xC5),
+     o1(0xD6), o1(0xDA), o1(0xC9), o1(0xCA),
+     o1(0xCB), o1(0xCC), o1(0xCD), o1(0xCE),
+     o1(0xCF), o1(0xD0),
+
+#define to_KOI8_U_D0 WORDINDEX2INFO(11284)
+    to_KOI8_U_D0_offsets,
+    to_KOI8_U_D0_infos,
+
+#define to_KOI8_U_D1_infos WORDINDEX2INFO(11286)
+      INVALID, o1(0xD2), o1(0xD3), o1(0xD4),
+     o1(0xD5), o1(0xC6), o1(0xC8), o1(0xC3),
+     o1(0xDE), o1(0xDB), o1(0xDD), o1(0xDF),
+     o1(0xD9), o1(0xD8), o1(0xDC), o1(0xC0),
+     o1(0xD1),    UNDEF, o1(0xA3), o1(0xA4),
+     o1(0xA6), o1(0xA7),
+
+#define to_KOI8_U_D1 WORDINDEX2INFO(11308)
+    to_KOI8_U_D1_offsets,
+    to_KOI8_U_D1_infos,
+
+#define to_KOI8_U_D2_infos WORDINDEX2INFO(11310)
+      INVALID,    UNDEF, o1(0xBD), o1(0xAD),
+
+#define to_KOI8_U_D2 WORDINDEX2INFO(11314)
+    to_WINDOWS_1251_D2_offsets,
+    to_KOI8_U_D2_infos,
+
+#define to_KOI8_U_E2_88_infos WORDINDEX2INFO(11316)
+      INVALID,    UNDEF, o1(0x95), o1(0x96),
+
+#define to_KOI8_U_E2_88 WORDINDEX2INFO(11320)
+    to_IBM866_E2_88_offsets,
+    to_KOI8_U_E2_88_infos,
+
+#define to_KOI8_U_E2_89_infos WORDINDEX2INFO(11322)
+      INVALID,    UNDEF, o1(0x97), o1(0x98),
+     o1(0x99),
+
+#define to_KOI8_U_E2_89 WORDINDEX2INFO(11327)
+    to_KOI8_U_E2_89_offsets,
+    to_KOI8_U_E2_89_infos,
+
+#define to_KOI8_U_E2_8C_infos WORDINDEX2INFO(11329)
+      INVALID,    UNDEF, o1(0x93), o1(0x9B),
+
+#define to_KOI8_U_E2_8C WORDINDEX2INFO(11333)
+    to_IBM860_E2_8C_offsets,
+    to_KOI8_U_E2_8C_infos,
+
+#define to_KOI8_U_E2_94_infos WORDINDEX2INFO(11335)
+      INVALID, o1(0x80),    UNDEF, o1(0x81),
+     o1(0x82), o1(0x83), o1(0x84), o1(0x85),
+     o1(0x86), o1(0x87), o1(0x88), o1(0x89),
+     o1(0x8A),
+
+#define to_KOI8_U_E2_94 WORDINDEX2INFO(11348)
+    to_IBM437_E2_94_offsets,
+    to_KOI8_U_E2_94_infos,
+
+#define to_KOI8_U_E2_95_infos WORDINDEX2INFO(11350)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA1),
+     o1(0xA2), o1(0xA5), o1(0xA8), o1(0xA9),
+     o1(0xAA), o1(0xAB), o1(0xAC), o1(0xAE),
+     o1(0xAF), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xB5), o1(0xB8), o1(0xB9), o1(0xBA),
+     o1(0xBB), o1(0xBC), o1(0xBE),
+
+#define to_KOI8_U_E2_95 WORDINDEX2INFO(11373)
+    to_KOI8_U_E2_95_offsets,
+    to_KOI8_U_E2_95_infos,
+
+#define to_KOI8_U_E2_96_infos WORDINDEX2INFO(11375)
+      INVALID, o1(0x8B),    UNDEF, o1(0x8C),
+     o1(0x8D), o1(0x8E), o1(0x8F), o1(0x90),
+     o1(0x91), o1(0x92), o1(0x94),
+
+#define to_KOI8_U_E2_96 WORDINDEX2INFO(11386)
+    to_IBM437_E2_96_offsets,
+    to_KOI8_U_E2_96_infos,
+
+#define to_KOI8_U_E2_infos WORDINDEX2INFO(11388)
+             INVALID,  to_US_ASCII_C2, to_KOI8_U_E2_88, to_KOI8_U_E2_89,
+     to_KOI8_U_E2_8C, to_KOI8_U_E2_94, to_KOI8_U_E2_95, to_KOI8_U_E2_96,
+
+#define to_KOI8_U_E2 WORDINDEX2INFO(11396)
+    to_KOI8_U_E2_offsets,
+    to_KOI8_U_E2_infos,
+
+#define to_KOI8_U_infos WORDINDEX2INFO(11398)
+              NOMAP,        INVALID,   to_KOI8_U_C2,   to_KOI8_U_C3,
+     to_US_ASCII_C2,   to_KOI8_U_D0,   to_KOI8_U_D1,   to_KOI8_U_D2,
+     to_US_ASCII_E0, to_US_ASCII_E1,   to_KOI8_U_E2, to_US_ASCII_ED,
+     to_US_ASCII_F0, to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_KOI8_U WORDINDEX2INFO(11413)
+    to_KOI8_U_offsets,
+    to_KOI8_U_infos,
+
+#define from_KOI8_R_infos WORDINDEX2INFO(11415)
+                  NOMAP, o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x9C),
+     o3(0xE2,0x94,0xA4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xBC),
+     o3(0xE2,0x96,0x80), o3(0xE2,0x96,0x84),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x8C),
+     o3(0xE2,0x96,0x90), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x8C,0xA0), o3(0xE2,0x96,0xA0),
+     o3(0xE2,0x88,0x99), o3(0xE2,0x88,0x9A),
+     o3(0xE2,0x89,0x88), o3(0xE2,0x89,0xA4),
+     o3(0xE2,0x89,0xA5),      o2(0xC2,0xA0),
+     o3(0xE2,0x8C,0xA1),      o2(0xC2,0xB0),
+          o2(0xC2,0xB2),      o2(0xC2,0xB7),
+          o2(0xC3,0xB7), o3(0xE2,0x95,0x90),
+     o3(0xE2,0x95,0x91), o3(0xE2,0x95,0x92),
+          o2(0xD1,0x91), o3(0xE2,0x95,0x93),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0x95),
+     o3(0xE2,0x95,0x96), o3(0xE2,0x95,0x97),
+     o3(0xE2,0x95,0x98), o3(0xE2,0x95,0x99),
+     o3(0xE2,0x95,0x9A), o3(0xE2,0x95,0x9B),
+     o3(0xE2,0x95,0x9C), o3(0xE2,0x95,0x9D),
+     o3(0xE2,0x95,0x9E), o3(0xE2,0x95,0x9F),
+     o3(0xE2,0x95,0xA0), o3(0xE2,0x95,0xA1),
+          o2(0xD0,0x81), o3(0xE2,0x95,0xA2),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0xA4),
+     o3(0xE2,0x95,0xA5), o3(0xE2,0x95,0xA6),
+     o3(0xE2,0x95,0xA7), o3(0xE2,0x95,0xA8),
+     o3(0xE2,0x95,0xA9), o3(0xE2,0x95,0xAA),
+     o3(0xE2,0x95,0xAB), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA9),      o2(0xD1,0x8E),
+          o2(0xD0,0xB0),      o2(0xD0,0xB1),
+          o2(0xD1,0x86),      o2(0xD0,0xB4),
+          o2(0xD0,0xB5),      o2(0xD1,0x84),
+          o2(0xD0,0xB3),      o2(0xD1,0x85),
+          o2(0xD0,0xB8),      o2(0xD0,0xB9),
+          o2(0xD0,0xBA),      o2(0xD0,0xBB),
+          o2(0xD0,0xBC),      o2(0xD0,0xBD),
+          o2(0xD0,0xBE),      o2(0xD0,0xBF),
+          o2(0xD1,0x8F),      o2(0xD1,0x80),
+          o2(0xD1,0x81),      o2(0xD1,0x82),
+          o2(0xD1,0x83),      o2(0xD0,0xB6),
+          o2(0xD0,0xB2),      o2(0xD1,0x8C),
+          o2(0xD1,0x8B),      o2(0xD0,0xB7),
+          o2(0xD1,0x88),      o2(0xD1,0x8D),
+          o2(0xD1,0x89),      o2(0xD1,0x87),
+          o2(0xD1,0x8A),      o2(0xD0,0xAE),
+          o2(0xD0,0x90),      o2(0xD0,0x91),
+          o2(0xD0,0xA6),      o2(0xD0,0x94),
+          o2(0xD0,0x95),      o2(0xD0,0xA4),
+          o2(0xD0,0x93),      o2(0xD0,0xA5),
+          o2(0xD0,0x98),      o2(0xD0,0x99),
+          o2(0xD0,0x9A),      o2(0xD0,0x9B),
+          o2(0xD0,0x9C),      o2(0xD0,0x9D),
+          o2(0xD0,0x9E),      o2(0xD0,0x9F),
+          o2(0xD0,0xAF),      o2(0xD0,0xA0),
+          o2(0xD0,0xA1),      o2(0xD0,0xA2),
+          o2(0xD0,0xA3),      o2(0xD0,0x96),
+          o2(0xD0,0x92),      o2(0xD0,0xAC),
+          o2(0xD0,0xAB),      o2(0xD0,0x97),
+          o2(0xD0,0xA8),      o2(0xD0,0xAD),
+          o2(0xD0,0xA9),      o2(0xD0,0xA7),
+          o2(0xD0,0xAA),
+
+#define from_KOI8_R WORDINDEX2INFO(11544)
+    from_ISO_8859_1_offsets,
+    from_KOI8_R_infos,
+
+#define to_KOI8_R_D0_infos WORDINDEX2INFO(11546)
+      INVALID,    UNDEF, o1(0xB3), o1(0xE1),
+     o1(0xE2), o1(0xF7), o1(0xE7), o1(0xE4),
+     o1(0xE5), o1(0xF6), o1(0xFA), o1(0xE9),
+     o1(0xEA), o1(0xEB), o1(0xEC), o1(0xED),
+     o1(0xEE), o1(0xEF), o1(0xF0), o1(0xF2),
+     o1(0xF3), o1(0xF4), o1(0xF5), o1(0xE6),
+     o1(0xE8), o1(0xE3), o1(0xFE), o1(0xFB),
+     o1(0xFD), o1(0xFF), o1(0xF9), o1(0xF8),
+     o1(0xFC), o1(0xE0), o1(0xF1), o1(0xC1),
+     o1(0xC2), o1(0xD7), o1(0xC7), o1(0xC4),
+     o1(0xC5), o1(0xD6), o1(0xDA), o1(0xC9),
+     o1(0xCA), o1(0xCB), o1(0xCC), o1(0xCD),
+     o1(0xCE), o1(0xCF), o1(0xD0),
+
+#define to_KOI8_R_D0 WORDINDEX2INFO(11597)
+    to_KOI8_R_D0_offsets,
+    to_KOI8_R_D0_infos,
+
+#define to_KOI8_R_D1_infos WORDINDEX2INFO(11599)
+      INVALID, o1(0xD2), o1(0xD3), o1(0xD4),
+     o1(0xD5), o1(0xC6), o1(0xC8), o1(0xC3),
+     o1(0xDE), o1(0xDB), o1(0xDD), o1(0xDF),
+     o1(0xD9), o1(0xD8), o1(0xDC), o1(0xC0),
+     o1(0xD1),    UNDEF, o1(0xA3),
+
+#define to_KOI8_R_D1 WORDINDEX2INFO(11618)
+    to_KOI8_R_D1_offsets,
+    to_KOI8_R_D1_infos,
+
+#define to_KOI8_R_E2_95_infos WORDINDEX2INFO(11620)
+      INVALID,    UNDEF, o1(0xA0), o1(0xA1),
+     o1(0xA2), o1(0xA4), o1(0xA5), o1(0xA6),
+     o1(0xA7), o1(0xA8), o1(0xA9), o1(0xAA),
+     o1(0xAB), o1(0xAC), o1(0xAD), o1(0xAE),
+     o1(0xAF), o1(0xB0), o1(0xB1), o1(0xB2),
+     o1(0xB4), o1(0xB5), o1(0xB6), o1(0xB7),
+     o1(0xB8), o1(0xB9), o1(0xBA), o1(0xBB),
+     o1(0xBC), o1(0xBD), o1(0xBE),
+
+#define to_KOI8_R_E2_95 WORDINDEX2INFO(11651)
+    to_IBM437_E2_95_offsets,
+    to_KOI8_R_E2_95_infos,
+
+#define to_KOI8_R_E2_infos WORDINDEX2INFO(11653)
+             INVALID,  to_US_ASCII_C2, to_KOI8_U_E2_88, to_KOI8_U_E2_89,
+     to_KOI8_U_E2_8C, to_KOI8_U_E2_94, to_KOI8_R_E2_95, to_KOI8_U_E2_96,
+
+#define to_KOI8_R_E2 WORDINDEX2INFO(11661)
+    to_KOI8_U_E2_offsets,
+    to_KOI8_R_E2_infos,
+
+#define to_KOI8_R_infos WORDINDEX2INFO(11663)
+              NOMAP,        INVALID,   to_KOI8_U_C2,   to_KOI8_U_C3,
+     to_US_ASCII_C2,   to_KOI8_R_D0,   to_KOI8_R_D1, to_US_ASCII_E0,
+     to_US_ASCII_E1,   to_KOI8_R_E2, to_US_ASCII_ED, to_US_ASCII_F0,
+     to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_KOI8_R WORDINDEX2INFO(11677)
+    to_KOI8_R_offsets,
+    to_KOI8_R_infos,
+
+#define from_TIS_620_infos WORDINDEX2INFO(11679)
+                  NOMAP,              UNDEF,
+     o3(0xE0,0xB8,0x81), o3(0xE0,0xB8,0x82),
+     o3(0xE0,0xB8,0x83), o3(0xE0,0xB8,0x84),
+     o3(0xE0,0xB8,0x85), o3(0xE0,0xB8,0x86),
+     o3(0xE0,0xB8,0x87), o3(0xE0,0xB8,0x88),
+     o3(0xE0,0xB8,0x89), o3(0xE0,0xB8,0x8A),
+     o3(0xE0,0xB8,0x8B), o3(0xE0,0xB8,0x8C),
+     o3(0xE0,0xB8,0x8D), o3(0xE0,0xB8,0x8E),
+     o3(0xE0,0xB8,0x8F), o3(0xE0,0xB8,0x90),
+     o3(0xE0,0xB8,0x91), o3(0xE0,0xB8,0x92),
+     o3(0xE0,0xB8,0x93), o3(0xE0,0xB8,0x94),
+     o3(0xE0,0xB8,0x95), o3(0xE0,0xB8,0x96),
+     o3(0xE0,0xB8,0x97), o3(0xE0,0xB8,0x98),
+     o3(0xE0,0xB8,0x99), o3(0xE0,0xB8,0x9A),
+     o3(0xE0,0xB8,0x9B), o3(0xE0,0xB8,0x9C),
+     o3(0xE0,0xB8,0x9D), o3(0xE0,0xB8,0x9E),
+     o3(0xE0,0xB8,0x9F), o3(0xE0,0xB8,0xA0),
+     o3(0xE0,0xB8,0xA1), o3(0xE0,0xB8,0xA2),
+     o3(0xE0,0xB8,0xA3), o3(0xE0,0xB8,0xA4),
+     o3(0xE0,0xB8,0xA5), o3(0xE0,0xB8,0xA6),
+     o3(0xE0,0xB8,0xA7), o3(0xE0,0xB8,0xA8),
+     o3(0xE0,0xB8,0xA9), o3(0xE0,0xB8,0xAA),
+     o3(0xE0,0xB8,0xAB), o3(0xE0,0xB8,0xAC),
+     o3(0xE0,0xB8,0xAD), o3(0xE0,0xB8,0xAE),
+     o3(0xE0,0xB8,0xAF), o3(0xE0,0xB8,0xB0),
+     o3(0xE0,0xB8,0xB1), o3(0xE0,0xB8,0xB2),
+     o3(0xE0,0xB8,0xB3), o3(0xE0,0xB8,0xB4),
+     o3(0xE0,0xB8,0xB5), o3(0xE0,0xB8,0xB6),
+     o3(0xE0,0xB8,0xB7), o3(0xE0,0xB8,0xB8),
+     o3(0xE0,0xB8,0xB9), o3(0xE0,0xB8,0xBA),
+     o3(0xE0,0xB8,0xBF), o3(0xE0,0xB9,0x80),
+     o3(0xE0,0xB9,0x81), o3(0xE0,0xB9,0x82),
+     o3(0xE0,0xB9,0x83), o3(0xE0,0xB9,0x84),
+     o3(0xE0,0xB9,0x85), o3(0xE0,0xB9,0x86),
+     o3(0xE0,0xB9,0x87), o3(0xE0,0xB9,0x88),
+     o3(0xE0,0xB9,0x89), o3(0xE0,0xB9,0x8A),
+     o3(0xE0,0xB9,0x8B), o3(0xE0,0xB9,0x8C),
+     o3(0xE0,0xB9,0x8D), o3(0xE0,0xB9,0x8E),
+     o3(0xE0,0xB9,0x8F), o3(0xE0,0xB9,0x90),
+     o3(0xE0,0xB9,0x91), o3(0xE0,0xB9,0x92),
+     o3(0xE0,0xB9,0x93), o3(0xE0,0xB9,0x94),
+     o3(0xE0,0xB9,0x95), o3(0xE0,0xB9,0x96),
+     o3(0xE0,0xB9,0x97), o3(0xE0,0xB9,0x98),
+     o3(0xE0,0xB9,0x99), o3(0xE0,0xB9,0x9A),
+     o3(0xE0,0xB9,0x9B),
+
+#define from_TIS_620 WORDINDEX2INFO(11768)
+    from_TIS_620_offsets,
+    from_TIS_620_infos,
+
+#define to_TIS_620_infos WORDINDEX2INFO(11770)
+                 NOMAP,           INVALID,
+        to_US_ASCII_C2, to_ISO_8859_11_E0,
+        to_US_ASCII_E1,    to_US_ASCII_ED,
+        to_US_ASCII_F0,    to_US_ASCII_F1,
+        to_US_ASCII_F4,
+
+#define to_TIS_620 WORDINDEX2INFO(11779)
+    to_US_ASCII_offsets,
+    to_TIS_620_infos,
+
+#define from_CP850_infos WORDINDEX2INFO(11781)
+                  NOMAP,      o2(0xC3,0x87),
+          o2(0xC3,0xBC),      o2(0xC3,0xA9),
+          o2(0xC3,0xA2),      o2(0xC3,0xA4),
+          o2(0xC3,0xA0),      o2(0xC3,0xA5),
+          o2(0xC3,0xA7),      o2(0xC3,0xAA),
+          o2(0xC3,0xAB),      o2(0xC3,0xA8),
+          o2(0xC3,0xAF),      o2(0xC3,0xAE),
+          o2(0xC3,0xAC),      o2(0xC3,0x84),
+          o2(0xC3,0x85),      o2(0xC3,0x89),
+          o2(0xC3,0xA6),      o2(0xC3,0x86),
+          o2(0xC3,0xB4),      o2(0xC3,0xB6),
+          o2(0xC3,0xB2),      o2(0xC3,0xBB),
+          o2(0xC3,0xB9),      o2(0xC3,0xBF),
+          o2(0xC3,0x96),      o2(0xC3,0x9C),
+          o2(0xC3,0xB8),      o2(0xC2,0xA3),
+          o2(0xC3,0x98),      o2(0xC3,0x97),
+          o2(0xC6,0x92),      o2(0xC3,0xA1),
+          o2(0xC3,0xAD),      o2(0xC3,0xB3),
+          o2(0xC3,0xBA),      o2(0xC3,0xB1),
+          o2(0xC3,0x91),      o2(0xC2,0xAA),
+          o2(0xC2,0xBA),      o2(0xC2,0xBF),
+          o2(0xC2,0xAE),      o2(0xC2,0xAC),
+          o2(0xC2,0xBD),      o2(0xC2,0xBC),
+          o2(0xC2,0xA1),      o2(0xC2,0xAB),
+          o2(0xC2,0xBB), o3(0xE2,0x96,0x91),
+     o3(0xE2,0x96,0x92), o3(0xE2,0x96,0x93),
+     o3(0xE2,0x94,0x82), o3(0xE2,0x94,0xA4),
+          o2(0xC3,0x81),      o2(0xC3,0x82),
+          o2(0xC3,0x80),      o2(0xC2,0xA9),
+     o3(0xE2,0x95,0xA3), o3(0xE2,0x95,0x91),
+     o3(0xE2,0x95,0x97), o3(0xE2,0x95,0x9D),
+          o2(0xC2,0xA2),      o2(0xC2,0xA5),
+     o3(0xE2,0x94,0x90), o3(0xE2,0x94,0x94),
+     o3(0xE2,0x94,0xB4), o3(0xE2,0x94,0xAC),
+     o3(0xE2,0x94,0x9C), o3(0xE2,0x94,0x80),
+     o3(0xE2,0x94,0xBC),      o2(0xC3,0xA3),
+          o2(0xC3,0x83), o3(0xE2,0x95,0x9A),
+     o3(0xE2,0x95,0x94), o3(0xE2,0x95,0xA9),
+     o3(0xE2,0x95,0xA6), o3(0xE2,0x95,0xA0),
+     o3(0xE2,0x95,0x90), o3(0xE2,0x95,0xAC),
+          o2(0xC2,0xA4),      o2(0xC3,0xB0),
+          o2(0xC3,0x90),      o2(0xC3,0x8A),
+          o2(0xC3,0x8B),      o2(0xC3,0x88),
+          o2(0xC4,0xB1),      o2(0xC3,0x8D),
+          o2(0xC3,0x8E),      o2(0xC3,0x8F),
+     o3(0xE2,0x94,0x98), o3(0xE2,0x94,0x8C),
+     o3(0xE2,0x96,0x88), o3(0xE2,0x96,0x84),
+          o2(0xC2,0xA6),      o2(0xC3,0x8C),
+     o3(0xE2,0x96,0x80),      o2(0xC3,0x93),
+          o2(0xC3,0x9F),      o2(0xC3,0x94),
+          o2(0xC3,0x92),      o2(0xC3,0xB5),
+          o2(0xC3,0x95),      o2(0xC2,0xB5),
+          o2(0xC3,0xBE),      o2(0xC3,0x9E),
+          o2(0xC3,0x9A),      o2(0xC3,0x9B),
+          o2(0xC3,0x99),      o2(0xC3,0xBD),
+          o2(0xC3,0x9D),      o2(0xC2,0xAF),
+          o2(0xC2,0xB4),      o2(0xC2,0xAD),
+          o2(0xC2,0xB1), o3(0xE2,0x80,0x97),
+          o2(0xC2,0xBE),      o2(0xC2,0xB6),
+          o2(0xC2,0xA7),      o2(0xC3,0xB7),
+          o2(0xC2,0xB8),      o2(0xC2,0xB0),
+          o2(0xC2,0xA8),      o2(0xC2,0xB7),
+          o2(0xC2,0xB9),      o2(0xC2,0xB3),
+          o2(0xC2,0xB2), o3(0xE2,0x96,0xA0),
+          o2(0xC2,0xA0),
+
+#define from_CP850 WORDINDEX2INFO(11910)
+    from_ISO_8859_1_offsets,
+    from_CP850_infos,
+
+#define to_CP850_C2_infos WORDINDEX2INFO(11912)
+      INVALID,    UNDEF, o1(0xFF), o1(0xAD),
+     o1(0xBD), o1(0x9C), o1(0xCF), o1(0xBE),
+     o1(0xDD), o1(0xF5), o1(0xF9), o1(0xB8),
+     o1(0xA6), o1(0xAE), o1(0xAA), o1(0xF0),
+     o1(0xA9), o1(0xEE), o1(0xF8), o1(0xF1),
+     o1(0xFD), o1(0xFC), o1(0xEF), o1(0xE6),
+     o1(0xF4), o1(0xFA), o1(0xF7), o1(0xFB),
+     o1(0xA7), o1(0xAF), o1(0xAC), o1(0xAB),
+     o1(0xF3), o1(0xA8),
+
+#define to_CP850_C2 WORDINDEX2INFO(11946)
+    to_WINDOWS_1252_C2_offsets,
+    to_CP850_C2_infos,
+
+#define to_CP850_C3_infos WORDINDEX2INFO(11948)
+      INVALID, o1(0xB7), o1(0xB5), o1(0xB6),
+     o1(0xC7), o1(0x8E), o1(0x8F), o1(0x92),
+     o1(0x80), o1(0xD4), o1(0x90), o1(0xD2),
+     o1(0xD3), o1(0xDE), o1(0xD6), o1(0xD7),
+     o1(0xD8), o1(0xD1), o1(0xA5), o1(0xE3),
+     o1(0xE0), o1(0xE2), o1(0xE5), o1(0x99),
+     o1(0x9E), o1(0x9D), o1(0xEB), o1(0xE9),
+     o1(0xEA), o1(0x9A), o1(0xED), o1(0xE8),
+     o1(0xE1), o1(0x85), o1(0xA0), o1(0x83),
+     o1(0xC6), o1(0x84), o1(0x86), o1(0x91),
+     o1(0x87), o1(0x8A), o1(0x82), o1(0x88),
+     o1(0x89), o1(0x8D), o1(0xA1), o1(0x8C),
+     o1(0x8B), o1(0xD0), o1(0xA4), o1(0x95),
+     o1(0xA2), o1(0x93), o1(0xE4), o1(0x94),
+     o1(0xF6), o1(0x9B), o1(0x97), o1(0xA3),
+     o1(0x96), o1(0x81), o1(0xEC), o1(0xE7),
+     o1(0x98),
+
+#define to_CP850_C3 WORDINDEX2INFO(12013)
+    to_ISO_8859_1_C2_offsets,
+    to_CP850_C3_infos,
+
+#define to_CP850_C4_infos WORDINDEX2INFO(12015)
+      INVALID,    UNDEF, o1(0xD5),
+
+#define to_CP850_C4 WORDINDEX2INFO(12018)
+    to_MACICELAND_C4_offsets,
+    to_CP850_C4_infos,
+
+#define to_CP850_E2_80_infos WORDINDEX2INFO(12020)
+      INVALID,    UNDEF, o1(0xF2),
+
+#define to_CP850_E2_80 WORDINDEX2INFO(12023)
+    to_IBM863_E2_80_offsets,
+    to_CP850_E2_80_infos,
+
+#define to_CP850_E2_infos WORDINDEX2INFO(12025)
+             INVALID,  to_CP850_E2_80,  to_US_ASCII_C2, to_IBM437_E2_94,
+     to_IBM775_E2_95, to_IBM852_E2_96,
+
+#define to_CP850_E2 WORDINDEX2INFO(12031)
+    to_IBM869_E2_offsets,
+    to_CP850_E2_infos,
+
+#define to_CP850_infos WORDINDEX2INFO(12033)
+              NOMAP,        INVALID,    to_CP850_C2,    to_CP850_C3,
+        to_CP850_C4, to_US_ASCII_C2,   to_IBM437_C6, to_US_ASCII_E0,
+     to_US_ASCII_E1,    to_CP850_E2, to_US_ASCII_ED, to_US_ASCII_F0,
+     to_US_ASCII_F1, to_US_ASCII_F4,
+
+#define to_CP850 WORDINDEX2INFO(12047)
+    to_CP850_offsets,
+    to_CP850_infos,
+
+};
+#define TRANSCODE_TABLE_INFO single_byte_byte_array, 24992, single_byte_word_array, 12049, sizeof(unsigned int)
+static const rb_transcoder
+rb_from_US_ASCII = {
+    "US-ASCII", "UTF-8", from_US_ASCII,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_US_ASCII = {
+    "UTF-8", "US-ASCII", to_US_ASCII,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ASCII_8BIT = {
+    "ASCII-8BIT", "UTF-8", from_ASCII_8BIT,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ASCII_8BIT = {
+    "UTF-8", "ASCII-8BIT", to_US_ASCII,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_1 = {
+    "ISO-8859-1", "UTF-8", from_ISO_8859_1,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_1 = {
+    "UTF-8", "ISO-8859-1", to_ISO_8859_1,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_2 = {
+    "ISO-8859-2", "UTF-8", from_ISO_8859_2,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_2 = {
+    "UTF-8", "ISO-8859-2", to_ISO_8859_2,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_3 = {
+    "ISO-8859-3", "UTF-8", from_ISO_8859_3,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_3 = {
+    "UTF-8", "ISO-8859-3", to_ISO_8859_3,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_4 = {
+    "ISO-8859-4", "UTF-8", from_ISO_8859_4,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_4 = {
+    "UTF-8", "ISO-8859-4", to_ISO_8859_4,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_5 = {
+    "ISO-8859-5", "UTF-8", from_ISO_8859_5,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_5 = {
+    "UTF-8", "ISO-8859-5", to_ISO_8859_5,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_6 = {
+    "ISO-8859-6", "UTF-8", from_ISO_8859_6,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_6 = {
+    "UTF-8", "ISO-8859-6", to_ISO_8859_6,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_7 = {
+    "ISO-8859-7", "UTF-8", from_ISO_8859_7,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_7 = {
+    "UTF-8", "ISO-8859-7", to_ISO_8859_7,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_8 = {
+    "ISO-8859-8", "UTF-8", from_ISO_8859_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_8 = {
+    "UTF-8", "ISO-8859-8", to_ISO_8859_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_9 = {
+    "ISO-8859-9", "UTF-8", from_ISO_8859_9,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    2, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_9 = {
+    "UTF-8", "ISO-8859-9", to_ISO_8859_9,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    2, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_10 = {
+    "ISO-8859-10", "UTF-8", from_ISO_8859_10,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_10 = {
+    "UTF-8", "ISO-8859-10", to_ISO_8859_10,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_11 = {
+    "ISO-8859-11", "UTF-8", from_ISO_8859_11,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_11 = {
+    "UTF-8", "ISO-8859-11", to_ISO_8859_11,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_13 = {
+    "ISO-8859-13", "UTF-8", from_ISO_8859_13,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_13 = {
+    "UTF-8", "ISO-8859-13", to_ISO_8859_13,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_14 = {
+    "ISO-8859-14", "UTF-8", from_ISO_8859_14,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_14 = {
+    "UTF-8", "ISO-8859-14", to_ISO_8859_14,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_ISO_8859_15 = {
+    "ISO-8859-15", "UTF-8", from_ISO_8859_15,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_ISO_8859_15 = {
+    "UTF-8", "ISO-8859-15", to_ISO_8859_15,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_874 = {
+    "WINDOWS-874", "UTF-8", from_WINDOWS_874,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_874 = {
+    "UTF-8", "WINDOWS-874", to_WINDOWS_874,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1250 = {
+    "WINDOWS-1250", "UTF-8", from_WINDOWS_1250,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1250 = {
+    "UTF-8", "WINDOWS-1250", to_WINDOWS_1250,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1251 = {
+    "WINDOWS-1251", "UTF-8", from_WINDOWS_1251,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1251 = {
+    "UTF-8", "WINDOWS-1251", to_WINDOWS_1251,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1252 = {
+    "WINDOWS-1252", "UTF-8", from_WINDOWS_1252,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1252 = {
+    "UTF-8", "WINDOWS-1252", to_WINDOWS_1252,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1253 = {
+    "WINDOWS-1253", "UTF-8", from_WINDOWS_1253,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1253 = {
+    "UTF-8", "WINDOWS-1253", to_WINDOWS_1253,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1254 = {
+    "WINDOWS-1254", "UTF-8", from_WINDOWS_1254,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1254 = {
+    "UTF-8", "WINDOWS-1254", to_WINDOWS_1254,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1255 = {
+    "WINDOWS-1255", "UTF-8", from_WINDOWS_1255,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1255 = {
+    "UTF-8", "WINDOWS-1255", to_WINDOWS_1255,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1256 = {
+    "WINDOWS-1256", "UTF-8", from_WINDOWS_1256,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1256 = {
+    "UTF-8", "WINDOWS-1256", to_WINDOWS_1256,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_WINDOWS_1257 = {
+    "WINDOWS-1257", "UTF-8", from_WINDOWS_1257,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_WINDOWS_1257 = {
+    "UTF-8", "WINDOWS-1257", to_WINDOWS_1257,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM437 = {
+    "IBM437", "UTF-8", from_IBM437,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM437 = {
+    "UTF-8", "IBM437", to_IBM437,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM775 = {
+    "IBM775", "UTF-8", from_IBM775,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM775 = {
+    "UTF-8", "IBM775", to_IBM775,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM852 = {
+    "IBM852", "UTF-8", from_IBM852,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM852 = {
+    "UTF-8", "IBM852", to_IBM852,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM855 = {
+    "IBM855", "UTF-8", from_IBM855,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM855 = {
+    "UTF-8", "IBM855", to_IBM855,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM857 = {
+    "IBM857", "UTF-8", from_IBM857,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM857 = {
+    "UTF-8", "IBM857", to_IBM857,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM860 = {
+    "IBM860", "UTF-8", from_IBM860,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM860 = {
+    "UTF-8", "IBM860", to_IBM860,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM861 = {
+    "IBM861", "UTF-8", from_IBM861,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM861 = {
+    "UTF-8", "IBM861", to_IBM861,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM862 = {
+    "IBM862", "UTF-8", from_IBM862,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM862 = {
+    "UTF-8", "IBM862", to_IBM862,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM863 = {
+    "IBM863", "UTF-8", from_IBM863,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM863 = {
+    "UTF-8", "IBM863", to_IBM863,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM865 = {
+    "IBM865", "UTF-8", from_IBM865,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM865 = {
+    "UTF-8", "IBM865", to_IBM865,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM866 = {
+    "IBM866", "UTF-8", from_IBM866,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM866 = {
+    "UTF-8", "IBM866", to_IBM866,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_IBM869 = {
+    "IBM869", "UTF-8", from_IBM869,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_IBM869 = {
+    "UTF-8", "IBM869", to_IBM869,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACCROATIAN = {
+    "MACCROATIAN", "UTF-8", from_MACCROATIAN,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACCROATIAN = {
+    "UTF-8", "MACCROATIAN", to_MACCROATIAN,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACCYRILLIC = {
+    "MACCYRILLIC", "UTF-8", from_MACCYRILLIC,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACCYRILLIC = {
+    "UTF-8", "MACCYRILLIC", to_MACCYRILLIC,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACGREEK = {
+    "MACGREEK", "UTF-8", from_MACGREEK,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACGREEK = {
+    "UTF-8", "MACGREEK", to_MACGREEK,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACICELAND = {
+    "MACICELAND", "UTF-8", from_MACICELAND,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACICELAND = {
+    "UTF-8", "MACICELAND", to_MACICELAND,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACROMAN = {
+    "MACROMAN", "UTF-8", from_MACROMAN,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACROMAN = {
+    "UTF-8", "MACROMAN", to_MACROMAN,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACROMANIA = {
+    "MACROMANIA", "UTF-8", from_MACROMANIA,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACROMANIA = {
+    "UTF-8", "MACROMANIA", to_MACROMANIA,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACTURKISH = {
+    "MACTURKISH", "UTF-8", from_MACTURKISH,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACTURKISH = {
+    "UTF-8", "MACTURKISH", to_MACTURKISH,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_MACUKRAINE = {
+    "MACUKRAINE", "UTF-8", from_MACUKRAINE,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_MACUKRAINE = {
+    "UTF-8", "MACUKRAINE", to_MACUKRAINE,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_KOI8_U = {
+    "KOI8-U", "UTF-8", from_KOI8_U,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_KOI8_U = {
+    "UTF-8", "KOI8-U", to_KOI8_U,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_KOI8_R = {
+    "KOI8-R", "UTF-8", from_KOI8_R,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_KOI8_R = {
+    "UTF-8", "KOI8-R", to_KOI8_R,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_TIS_620 = {
+    "TIS-620", "UTF-8", from_TIS_620,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_TIS_620 = {
+    "UTF-8", "TIS-620", to_TIS_620,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_CP850 = {
+    "CP850", "UTF-8", from_CP850,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_CP850 = {
+    "UTF-8", "CP850", to_CP850,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_CP852 = {
+    "CP852", "UTF-8", from_IBM852,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_CP852 = {
+    "UTF-8", "CP852", to_IBM852,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_from_CP855 = {
+    "CP855", "UTF-8", from_IBM855,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    1, /* max_input */
+    3, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+static const rb_transcoder
+rb_to_CP855 = {
+    "UTF-8", "CP855", to_IBM855,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    3, /* max_input */
+    1, /* max_output */
+    asciicompat_converter, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
+};
+
+
+void
+Init_single_byte(void)
+{
+    rb_register_transcoder(&rb_from_US_ASCII);
+    rb_register_transcoder(&rb_to_US_ASCII);
+    rb_register_transcoder(&rb_from_ASCII_8BIT);
+    rb_register_transcoder(&rb_to_ASCII_8BIT);
+    rb_register_transcoder(&rb_from_ISO_8859_1);
+    rb_register_transcoder(&rb_to_ISO_8859_1);
+    rb_register_transcoder(&rb_from_ISO_8859_2);
+    rb_register_transcoder(&rb_to_ISO_8859_2);
+    rb_register_transcoder(&rb_from_ISO_8859_3);
+    rb_register_transcoder(&rb_to_ISO_8859_3);
+    rb_register_transcoder(&rb_from_ISO_8859_4);
+    rb_register_transcoder(&rb_to_ISO_8859_4);
+    rb_register_transcoder(&rb_from_ISO_8859_5);
+    rb_register_transcoder(&rb_to_ISO_8859_5);
+    rb_register_transcoder(&rb_from_ISO_8859_6);
+    rb_register_transcoder(&rb_to_ISO_8859_6);
+    rb_register_transcoder(&rb_from_ISO_8859_7);
+    rb_register_transcoder(&rb_to_ISO_8859_7);
+    rb_register_transcoder(&rb_from_ISO_8859_8);
+    rb_register_transcoder(&rb_to_ISO_8859_8);
+    rb_register_transcoder(&rb_from_ISO_8859_9);
+    rb_register_transcoder(&rb_to_ISO_8859_9);
+    rb_register_transcoder(&rb_from_ISO_8859_10);
+    rb_register_transcoder(&rb_to_ISO_8859_10);
+    rb_register_transcoder(&rb_from_ISO_8859_11);
+    rb_register_transcoder(&rb_to_ISO_8859_11);
+    rb_register_transcoder(&rb_from_ISO_8859_13);
+    rb_register_transcoder(&rb_to_ISO_8859_13);
+    rb_register_transcoder(&rb_from_ISO_8859_14);
+    rb_register_transcoder(&rb_to_ISO_8859_14);
+    rb_register_transcoder(&rb_from_ISO_8859_15);
+    rb_register_transcoder(&rb_to_ISO_8859_15);
+    rb_register_transcoder(&rb_from_WINDOWS_874);
+    rb_register_transcoder(&rb_to_WINDOWS_874);
+    rb_register_transcoder(&rb_from_WINDOWS_1250);
+    rb_register_transcoder(&rb_to_WINDOWS_1250);
+    rb_register_transcoder(&rb_from_WINDOWS_1251);
+    rb_register_transcoder(&rb_to_WINDOWS_1251);
+    rb_register_transcoder(&rb_from_WINDOWS_1252);
+    rb_register_transcoder(&rb_to_WINDOWS_1252);
+    rb_register_transcoder(&rb_from_WINDOWS_1253);
+    rb_register_transcoder(&rb_to_WINDOWS_1253);
+    rb_register_transcoder(&rb_from_WINDOWS_1254);
+    rb_register_transcoder(&rb_to_WINDOWS_1254);
+    rb_register_transcoder(&rb_from_WINDOWS_1255);
+    rb_register_transcoder(&rb_to_WINDOWS_1255);
+    rb_register_transcoder(&rb_from_WINDOWS_1256);
+    rb_register_transcoder(&rb_to_WINDOWS_1256);
+    rb_register_transcoder(&rb_from_WINDOWS_1257);
+    rb_register_transcoder(&rb_to_WINDOWS_1257);
+    rb_register_transcoder(&rb_from_IBM437);
+    rb_register_transcoder(&rb_to_IBM437);
+    rb_register_transcoder(&rb_from_IBM775);
+    rb_register_transcoder(&rb_to_IBM775);
+    rb_register_transcoder(&rb_from_IBM852);
+    rb_register_transcoder(&rb_to_IBM852);
+    rb_register_transcoder(&rb_from_IBM855);
+    rb_register_transcoder(&rb_to_IBM855);
+    rb_register_transcoder(&rb_from_IBM857);
+    rb_register_transcoder(&rb_to_IBM857);
+    rb_register_transcoder(&rb_from_IBM860);
+    rb_register_transcoder(&rb_to_IBM860);
+    rb_register_transcoder(&rb_from_IBM861);
+    rb_register_transcoder(&rb_to_IBM861);
+    rb_register_transcoder(&rb_from_IBM862);
+    rb_register_transcoder(&rb_to_IBM862);
+    rb_register_transcoder(&rb_from_IBM863);
+    rb_register_transcoder(&rb_to_IBM863);
+    rb_register_transcoder(&rb_from_IBM865);
+    rb_register_transcoder(&rb_to_IBM865);
+    rb_register_transcoder(&rb_from_IBM866);
+    rb_register_transcoder(&rb_to_IBM866);
+    rb_register_transcoder(&rb_from_IBM869);
+    rb_register_transcoder(&rb_to_IBM869);
+    rb_register_transcoder(&rb_from_MACCROATIAN);
+    rb_register_transcoder(&rb_to_MACCROATIAN);
+    rb_register_transcoder(&rb_from_MACCYRILLIC);
+    rb_register_transcoder(&rb_to_MACCYRILLIC);
+    rb_register_transcoder(&rb_from_MACGREEK);
+    rb_register_transcoder(&rb_to_MACGREEK);
+    rb_register_transcoder(&rb_from_MACICELAND);
+    rb_register_transcoder(&rb_to_MACICELAND);
+    rb_register_transcoder(&rb_from_MACROMAN);
+    rb_register_transcoder(&rb_to_MACROMAN);
+    rb_register_transcoder(&rb_from_MACROMANIA);
+    rb_register_transcoder(&rb_to_MACROMANIA);
+    rb_register_transcoder(&rb_from_MACTURKISH);
+    rb_register_transcoder(&rb_to_MACTURKISH);
+    rb_register_transcoder(&rb_from_MACUKRAINE);
+    rb_register_transcoder(&rb_to_MACUKRAINE);
+    rb_register_transcoder(&rb_from_KOI8_U);
+    rb_register_transcoder(&rb_to_KOI8_U);
+    rb_register_transcoder(&rb_from_KOI8_R);
+    rb_register_transcoder(&rb_to_KOI8_R);
+    rb_register_transcoder(&rb_from_TIS_620);
+    rb_register_transcoder(&rb_to_TIS_620);
+    rb_register_transcoder(&rb_from_CP850);
+    rb_register_transcoder(&rb_to_CP850);
+    rb_register_transcoder(&rb_from_CP852);
+    rb_register_transcoder(&rb_to_CP852);
+    rb_register_transcoder(&rb_from_CP855);
+    rb_register_transcoder(&rb_to_CP855);
+
+}
+
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/single_byte.trans b/lib/ruby-1.9.1-rc1/enc/trans/single_byte.trans
new file mode 100644
index 0000000..0d42740
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/single_byte.trans
@@ -0,0 +1,91 @@
+#include "transcode_data.h"
+
+<%
+  us_ascii_map = [["{00-7f}", :nomap]]
+
+  transcode_tblgen "US-ASCII", "UTF-8", us_ascii_map
+  transcode_tblgen "UTF-8", "US-ASCII", us_ascii_map
+  transcode_tblgen "ASCII-8BIT", "UTF-8", us_ascii_map
+  transcode_tblgen "UTF-8", "ASCII-8BIT", us_ascii_map
+
+  CONTROL1_TO_UCS_TBL = (0x80..0x9f).map {|c| ["%02X" % c, c] }
+
+  # Generate transcoding tables for single byte encoding from
+  # encoding name using table file.
+  #
+  # Conventions:
+  #   name: encoding name as string, UPPER case, hyphens (e.g. 'ISO-8859-3')
+  #   file name: lower case, hyphens, -tbl.rb suffix (e.g. iso-8859-3-tbl.rb)
+  #   variable name: UPPER case, underscores, _TO_UCS_TBL suffix (e.g. ISO_8859_3_TO_UCS_TBL)
+  # If the name starts with "ISO-8859", the C1 control code area is added automatically.
+  def transcode_tblgen_singlebyte (name)
+    require(name.downcase + "-tbl")
+    control1_if_needed = (name =~ /^ISO-8859/) ? CONTROL1_TO_UCS_TBL : []
+    tbl_to_ucs = control1_if_needed + eval(name.gsub(/-/, '_') + "_TO_UCS_TBL")
+    set_valid_byte_pattern(name, '1byte')
+    code = ''
+    code << transcode_tblgen(name, "UTF-8", [["{00-7f}", :nomap], *tbl_to_ucs])
+    code << "\n"
+    code << transcode_tblgen("UTF-8", name, [["{00-7f}", :nomap], *tbl_to_ucs.map {|a,b| [b,a] }])
+    code
+  end
+
+  transcode_tblgen_singlebyte "ISO-8859-1"
+  transcode_tblgen_singlebyte "ISO-8859-2"
+  transcode_tblgen_singlebyte "ISO-8859-3"
+  transcode_tblgen_singlebyte "ISO-8859-4"
+  transcode_tblgen_singlebyte "ISO-8859-5"
+  transcode_tblgen_singlebyte "ISO-8859-6"
+  transcode_tblgen_singlebyte "ISO-8859-7"
+  transcode_tblgen_singlebyte "ISO-8859-8"
+  transcode_tblgen_singlebyte "ISO-8859-9"
+  transcode_tblgen_singlebyte "ISO-8859-10"
+  transcode_tblgen_singlebyte "ISO-8859-11"
+  transcode_tblgen_singlebyte "ISO-8859-13"
+  transcode_tblgen_singlebyte "ISO-8859-14"
+  transcode_tblgen_singlebyte "ISO-8859-15"
+  transcode_tblgen_singlebyte "WINDOWS-874"
+  transcode_tblgen_singlebyte "WINDOWS-1250"
+  transcode_tblgen_singlebyte "WINDOWS-1251"
+  transcode_tblgen_singlebyte "WINDOWS-1252"
+  transcode_tblgen_singlebyte "WINDOWS-1253"
+  transcode_tblgen_singlebyte "WINDOWS-1254"
+  transcode_tblgen_singlebyte "WINDOWS-1255"
+  transcode_tblgen_singlebyte "WINDOWS-1256"
+  transcode_tblgen_singlebyte "WINDOWS-1257"
+  transcode_tblgen_singlebyte "IBM437"
+  transcode_tblgen_singlebyte "IBM775"
+  transcode_tblgen_singlebyte "IBM852"
+  transcode_tblgen_singlebyte "IBM855"
+  transcode_tblgen_singlebyte "IBM857"
+  transcode_tblgen_singlebyte "IBM860"
+  transcode_tblgen_singlebyte "IBM861"
+  transcode_tblgen_singlebyte "IBM862"
+  transcode_tblgen_singlebyte "IBM863"
+  transcode_tblgen_singlebyte "IBM865"
+  transcode_tblgen_singlebyte "IBM866"
+  transcode_tblgen_singlebyte "IBM869"
+  transcode_tblgen_singlebyte "MACCROATIAN"
+  transcode_tblgen_singlebyte "MACCYRILLIC"
+  transcode_tblgen_singlebyte "MACGREEK"
+  transcode_tblgen_singlebyte "MACICELAND"
+  transcode_tblgen_singlebyte "MACROMAN"
+  transcode_tblgen_singlebyte "MACROMANIA"
+  transcode_tblgen_singlebyte "MACTURKISH"
+  transcode_tblgen_singlebyte "MACUKRAINE"
+  transcode_tblgen_singlebyte "KOI8-U"
+  transcode_tblgen_singlebyte "KOI8-R"
+  transcode_tblgen_singlebyte "TIS-620"
+  transcode_tblgen_singlebyte "CP850"
+  transcode_tblgen_singlebyte "CP852"
+  transcode_tblgen_singlebyte "CP855"
+%>
+
+<%= transcode_generated_code %>
+
+void
+Init_single_byte(void)
+{
+<%= transcode_register_code %>
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/tis-620-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/tis-620-tbl.rb
new file mode 100644
index 0000000..a2f6057
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/tis-620-tbl.rb
@@ -0,0 +1,89 @@
+TIS_620_TO_UCS_TBL = [
+  ["A1",0xE01],
+  ["A2",0xE02],
+  ["A3",0xE03],
+  ["A4",0xE04],
+  ["A5",0xE05],
+  ["A6",0xE06],
+  ["A7",0xE07],
+  ["A8",0xE08],
+  ["A9",0xE09],
+  ["AA",0xE0A],
+  ["AB",0xE0B],
+  ["AC",0xE0C],
+  ["AD",0xE0D],
+  ["AE",0xE0E],
+  ["AF",0xE0F],
+  ["B0",0xE10],
+  ["B1",0xE11],
+  ["B2",0xE12],
+  ["B3",0xE13],
+  ["B4",0xE14],
+  ["B5",0xE15],
+  ["B6",0xE16],
+  ["B7",0xE17],
+  ["B8",0xE18],
+  ["B9",0xE19],
+  ["BA",0xE1A],
+  ["BB",0xE1B],
+  ["BC",0xE1C],
+  ["BD",0xE1D],
+  ["BE",0xE1E],
+  ["BF",0xE1F],
+  ["C0",0xE20],
+  ["C1",0xE21],
+  ["C2",0xE22],
+  ["C3",0xE23],
+  ["C4",0xE24],
+  ["C5",0xE25],
+  ["C6",0xE26],
+  ["C7",0xE27],
+  ["C8",0xE28],
+  ["C9",0xE29],
+  ["CA",0xE2A],
+  ["CB",0xE2B],
+  ["CC",0xE2C],
+  ["CD",0xE2D],
+  ["CE",0xE2E],
+  ["CF",0xE2F],
+  ["D0",0xE30],
+  ["D1",0xE31],
+  ["D2",0xE32],
+  ["D3",0xE33],
+  ["D4",0xE34],
+  ["D5",0xE35],
+  ["D6",0xE36],
+  ["D7",0xE37],
+  ["D8",0xE38],
+  ["D9",0xE39],
+  ["DA",0xE3A],
+  ["DF",0xE3F],
+  ["E0",0xE40],
+  ["E1",0xE41],
+  ["E2",0xE42],
+  ["E3",0xE43],
+  ["E4",0xE44],
+  ["E5",0xE45],
+  ["E6",0xE46],
+  ["E7",0xE47],
+  ["E8",0xE48],
+  ["E9",0xE49],
+  ["EA",0xE4A],
+  ["EB",0xE4B],
+  ["EC",0xE4C],
+  ["ED",0xE4D],
+  ["EE",0xE4E],
+  ["EF",0xE4F],
+  ["F0",0xE50],
+  ["F1",0xE51],
+  ["F2",0xE52],
+  ["F3",0xE53],
+  ["F4",0xE54],
+  ["F5",0xE55],
+  ["F6",0xE56],
+  ["F7",0xE57],
+  ["F8",0xE58],
+  ["F9",0xE59],
+  ["FA",0xE5A],
+  ["FB",0xE5B],
+]
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/transdb.c b/lib/ruby-1.9.1-rc1/enc/trans/transdb.c
new file mode 100644
index 0000000..d135f70
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/transdb.c
@@ -0,0 +1,18 @@
+/**********************************************************************
+
+  enc/trans/transdb.c -
+
+  $Author: nobu $
+  created at: Mon Apr  7 15:51:31 2008
+
+  Copyright (C) 2008 Yukihiro Matsumoto
+
+**********************************************************************/
+
+void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib);
+
+void
+Init_transdb(void)
+{
+#include "transdb.h"
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.c b/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.c
new file mode 100644
index 0000000..d722fa2
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.c
@@ -0,0 +1,637 @@
+/* autogenerated. */
+/* src="transcode-tblgen.rb", len=20916, checksum=45137 */
+/* src="utf_16_32.trans", len=10306, checksum=57350 */
+
+#include "transcode_data.h"
+
+
+
+static const unsigned char
+utf_16_32_byte_array[1288] = {
+#define from_UTF_16LE_00_D8_00_offsets 0
+220, 223,
+      1,  1,  1,  1,
+
+#define from_UTF_16LE_00_D8_offsets 6
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define from_UTF_16LE_00_offsets 264
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    1,  1,  1,  1,  2,  2,  2,  2,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define from_UTF_32LE_00_00_00_offsets 522
+0, 0,
+      0,
+
+#define from_UTF_32LE_00_00_offsets 525
+0, 16,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,
+
+#define from_UTF_32LE_00_D8_offsets 544
+1, 16,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_32LE_00_offsets 562
+0, 255,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    1,  1,  1,  1,  1,  1,  1,  1,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+
+#define from_UTF_32BE_00_offsets 820
+0, 16,
+      0,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,
+
+#define from_UTF_8_C2_offsets 839
+128, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_8_E0_offsets 905
+160, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_8_ED_offsets 939
+128, 159,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_8_F0_offsets 973
+144, 191,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_8_F4_offsets 1023
+128, 143,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+
+#define from_UTF_8_offsets 1041
+0, 244,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  1,  1,  1,  1,  1,  1,    1,  1,  1,  1,  1,  1,  1,  1,
+      1,  1,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      2,  2,  2,  2,  2,  2,  2,  2,    2,  2,  2,  2,  2,  2,  2,  2,
+      3,  4,  4,  4,  4,  4,  4,  4,    4,  4,  4,  4,  4,  5,  4,  4,
+      6,  7,  7,  7,  8,
+
+};
+static const unsigned int
+utf_16_32_word_array[94] = {
+#define from_UTF_16LE_00_D8_00_infos WORDINDEX2INFO(0)
+     INVALID,   FUNso,
+
+#define from_UTF_16LE_00_D8_00 WORDINDEX2INFO(2)
+    from_UTF_16LE_00_D8_00_offsets,
+    from_UTF_16LE_00_D8_00_infos,
+
+#define from_UTF_16LE_00_D8_infos WORDINDEX2INFO(4)
+     from_UTF_16LE_00_D8_00,
+
+#define from_UTF_16LE_00_D8 WORDINDEX2INFO(5)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_16LE_00_D8_infos,
+
+#define from_UTF_16LE_00_infos WORDINDEX2INFO(7)
+                   FUNso, from_UTF_16LE_00_D8,
+                 INVALID,
+
+#define from_UTF_16LE_00 WORDINDEX2INFO(10)
+    from_UTF_16LE_00_offsets,
+    from_UTF_16LE_00_infos,
+
+#define from_UTF_16LE_infos WORDINDEX2INFO(12)
+     from_UTF_16LE_00,
+
+#define from_UTF_16LE WORDINDEX2INFO(13)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_16LE_infos,
+
+#define from_UTF_32LE_00_00_00_infos WORDINDEX2INFO(15)
+       FUNso, INVALID,
+
+#define from_UTF_32LE_00_00_00 WORDINDEX2INFO(17)
+    from_UTF_32LE_00_00_00_offsets,
+    from_UTF_32LE_00_00_00_infos,
+
+#define from_UTF_32LE_00_00_infos WORDINDEX2INFO(19)
+     from_UTF_32LE_00_00_00,                INVALID,
+
+#define from_UTF_32LE_00_00 WORDINDEX2INFO(21)
+    from_UTF_32LE_00_00_offsets,
+    from_UTF_32LE_00_00_infos,
+
+#define from_UTF_32LE_00_D8_infos WORDINDEX2INFO(23)
+                    INVALID, from_UTF_32LE_00_00_00,
+
+#define from_UTF_32LE_00_D8 WORDINDEX2INFO(25)
+    from_UTF_32LE_00_D8_offsets,
+    from_UTF_32LE_00_D8_infos,
+
+#define from_UTF_32LE_00_infos WORDINDEX2INFO(27)
+     from_UTF_32LE_00_00, from_UTF_32LE_00_D8,
+
+#define from_UTF_32LE_00 WORDINDEX2INFO(29)
+    from_UTF_32LE_00_offsets,
+    from_UTF_32LE_00_infos,
+
+#define from_UTF_32LE_infos WORDINDEX2INFO(31)
+     from_UTF_32LE_00,
+
+#define from_UTF_32LE WORDINDEX2INFO(32)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_32LE_infos,
+
+#define from_UTF_16BE_00_infos WORDINDEX2INFO(34)
+     FUNso,
+
+#define from_UTF_16BE_00 WORDINDEX2INFO(35)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_16BE_00_infos,
+
+#define from_UTF_16BE_D8_00_infos WORDINDEX2INFO(37)
+              INVALID, from_UTF_16BE_00,
+
+#define from_UTF_16BE_D8_00 WORDINDEX2INFO(39)
+    from_UTF_16LE_00_D8_00_offsets,
+    from_UTF_16BE_D8_00_infos,
+
+#define from_UTF_16BE_D8_infos WORDINDEX2INFO(41)
+     from_UTF_16BE_D8_00,
+
+#define from_UTF_16BE_D8 WORDINDEX2INFO(42)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_16BE_D8_infos,
+
+#define from_UTF_16BE_infos WORDINDEX2INFO(44)
+     from_UTF_16BE_00, from_UTF_16BE_D8,          INVALID,
+
+#define from_UTF_16BE WORDINDEX2INFO(47)
+    from_UTF_16LE_00_offsets,
+    from_UTF_16BE_infos,
+
+#define from_UTF_32BE_00_00_infos WORDINDEX2INFO(49)
+     from_UTF_16BE_00,          INVALID,
+
+#define from_UTF_32BE_00_00 WORDINDEX2INFO(51)
+    from_UTF_32LE_00_offsets,
+    from_UTF_32BE_00_00_infos,
+
+#define from_UTF_32BE_00_01_infos WORDINDEX2INFO(53)
+     from_UTF_16BE_00,
+
+#define from_UTF_32BE_00_01 WORDINDEX2INFO(54)
+    from_UTF_16LE_00_D8_offsets,
+    from_UTF_32BE_00_01_infos,
+
+#define from_UTF_32BE_00_infos WORDINDEX2INFO(56)
+     from_UTF_32BE_00_00, from_UTF_32BE_00_01,
+                 INVALID,
+
+#define from_UTF_32BE_00 WORDINDEX2INFO(59)
+    from_UTF_32BE_00_offsets,
+    from_UTF_32BE_00_infos,
+
+#define from_UTF_32BE_infos WORDINDEX2INFO(61)
+     from_UTF_32BE_00,          INVALID,
+
+#define from_UTF_32BE WORDINDEX2INFO(63)
+    from_UTF_32LE_00_00_00_offsets,
+    from_UTF_32BE_infos,
+
+#define from_UTF_8_C2 WORDINDEX2INFO(65)
+    from_UTF_8_C2_offsets,
+    from_UTF_16LE_00_D8_00_infos,
+
+#define from_UTF_8_E0_infos WORDINDEX2INFO(67)
+           INVALID, from_UTF_8_C2,
+
+#define from_UTF_8_E0 WORDINDEX2INFO(69)
+    from_UTF_8_E0_offsets,
+    from_UTF_8_E0_infos,
+
+#define from_UTF_8_E1 WORDINDEX2INFO(71)
+    from_UTF_8_C2_offsets,
+    from_UTF_8_E0_infos,
+
+#define from_UTF_8_ED WORDINDEX2INFO(73)
+    from_UTF_8_ED_offsets,
+    from_UTF_8_E0_infos,
+
+#define from_UTF_8_F0_infos WORDINDEX2INFO(75)
+           INVALID, from_UTF_8_E1,
+
+#define from_UTF_8_F0 WORDINDEX2INFO(77)
+    from_UTF_8_F0_offsets,
+    from_UTF_8_F0_infos,
+
+#define from_UTF_8_F1 WORDINDEX2INFO(79)
+    from_UTF_8_C2_offsets,
+    from_UTF_8_F0_infos,
+
+#define from_UTF_8_F4 WORDINDEX2INFO(81)
+    from_UTF_8_F4_offsets,
+    from_UTF_8_F0_infos,
+
+#define from_UTF_8_infos WORDINDEX2INFO(83)
+             FUNso,       INVALID, from_UTF_8_C2, from_UTF_8_E0,
+     from_UTF_8_E1, from_UTF_8_ED, from_UTF_8_F0, from_UTF_8_F1,
+     from_UTF_8_F4,
+
+#define from_UTF_8 WORDINDEX2INFO(92)
+    from_UTF_8_offsets,
+    from_UTF_8_infos,
+
+};
+#define TRANSCODE_TABLE_INFO utf_16_32_byte_array, 1288, utf_16_32_word_array, 94, sizeof(unsigned int)
+
+
+static ssize_t
+fun_so_from_utf_16be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[0] && s[1]<0x80) {
+        o[0] = s[1];
+        return 1;
+    }
+    else if (s[0]<0x08) {
+        o[0] = 0xC0 | (s[0]<<2) | (s[1]>>6);
+        o[1] = 0x80 | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF8)!=0xD8) {
+        o[0] = 0xE0 | (s[0]>>4);
+        o[1] = 0x80 | ((s[0]&0x0F)<<2) | (s[1]>>6);
+        o[2] = 0x80 | (s[1]&0x3F);
+        return 3;
+    }
+    else {
+        unsigned int u = (((s[0]&0x03)<<2)|(s[1]>>6)) + 1;
+        o[0] = 0xF0 | (u>>2);
+        o[1] = 0x80 | ((u&0x03)<<4) | ((s[1]>>2)&0x0F);
+        o[2] = 0x80 | ((s[1]&0x03)<<4) | ((s[2]&0x03)<<2) | (s[3]>>6);
+        o[3] = 0x80 | (s[3]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_16be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!(s[0]&0x80)) {
+        o[0] = 0x00;
+        o[1] = s[0];
+        return 2;
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[0] = (s[0]>>2)&0x07;
+        o[1] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[0] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[1] = (s[1]<<6) | (s[2]^0x80);
+        return 2;
+    }
+    else {
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
+        o[0] = 0xD8 | (w>>2);
+        o[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
+        o[2] = 0xDC | ((s[2]>>2)&0x03);
+        o[3] = (s[2]<<6) | (s[3]&~0x80);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_from_utf_16le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[1] && s[0]<0x80) {
+        o[0] = s[0];
+        return 1;
+    }
+    else if (s[1]<0x08) {
+        o[0] = 0xC0 | (s[1]<<2) | (s[0]>>6);
+        o[1] = 0x80 | (s[0]&0x3F);
+        return 2;
+    }
+    else if ((s[1]&0xF8)!=0xD8) {
+        o[0] = 0xE0 | (s[1]>>4);
+        o[1] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+        o[2] = 0x80 | (s[0]&0x3F);
+        return 3;
+    }
+    else {
+        unsigned int u = (((s[1]&0x03)<<2)|(s[0]>>6)) + 1;
+        o[0] = 0xF0 | u>>2;
+        o[1] = 0x80 | ((u&0x03)<<4) | ((s[0]>>2)&0x0F);
+        o[2] = 0x80 | ((s[0]&0x03)<<4) | ((s[3]&0x03)<<2) | (s[2]>>6);
+        o[3] = 0x80 | (s[2]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_16le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!(s[0]&0x80)) {
+        o[1] = 0x00;
+        o[0] = s[0];
+        return 2;
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[1] = (s[0]>>2)&0x07;
+        o[0] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[1] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[0] = (s[1]<<6) | (s[2]^0x80);
+        return 2;
+    }
+    else {
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
+        o[1] = 0xD8 | (w>>2);
+        o[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
+        o[3] = 0xDC | ((s[2]>>2)&0x03);
+        o[2] = (s[2]<<6) | (s[3]&~0x80);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_from_utf_32be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[1]) {
+        if (s[2]==0 && s[3]<0x80) {
+            o[0] = s[3];
+            return 1;
+        }
+        else if (s[2]<0x08) {
+            o[0] = 0xC0 | (s[2]<<2) | (s[3]>>6);
+            o[1] = 0x80 | (s[3]&0x3F);
+            return 2;
+        }
+        else {
+            o[0] = 0xE0 | (s[2]>>4);
+            o[1] = 0x80 | ((s[2]&0x0F)<<2) | (s[3]>>6);
+            o[2] = 0x80 | (s[3]&0x3F);
+            return 3;
+        }
+    }
+    else {
+        o[0] = 0xF0 | (s[1]>>2);
+        o[1] = 0x80 | ((s[1]&0x03)<<4) | (s[2]>>4);
+        o[2] = 0x80 | ((s[2]&0x0F)<<2) | (s[3]>>6);
+        o[3] = 0x80 | (s[3]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_32be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = 0;
+    if (!(s[0]&0x80)) {
+        o[1] = o[2] = 0x00;
+        o[3] = s[0];
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[1] = 0x00;
+        o[2] = (s[0]>>2)&0x07;
+        o[3] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[1] = 0x00;
+        o[2] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[3] = (s[1]<<6) | (s[2]^0x80);
+    }
+    else {
+        o[1] = ((s[0]&0x07)<<2) | ((s[1]>>4)&0x03);
+        o[2] = ((s[1]&0x0F)<<4) | ((s[2]>>2)&0x0F);
+        o[3] = ((s[2]&0x03)<<6) | (s[3]&0x3F);
+    }
+    return 4;
+}
+
+static ssize_t
+fun_so_from_utf_32le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[2]) {
+        if (s[1]==0 && s[0]<0x80) {
+            o[0] = s[0];
+            return 1;
+        }
+        else if (s[1]<0x08) {
+            o[0] = 0xC0 | (s[1]<<2) | (s[0]>>6);
+            o[1] = 0x80 | (s[0]&0x3F);
+            return 2;
+        }
+        else {
+            o[0] = 0xE0 | (s[1]>>4);
+            o[1] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+            o[2] = 0x80 | (s[0]&0x3F);
+            return 3;
+        }
+    }
+    else {
+        o[0] = 0xF0 | (s[2]>>2);
+        o[1] = 0x80 | ((s[2]&0x03)<<4) | (s[1]>>4);
+        o[2] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+        o[3] = 0x80 | (s[0]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_32le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[3] = 0;
+    if (!(s[0]&0x80)) {
+        o[2] = o[1] = 0x00;
+        o[0] = s[0];
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[2] = 0x00;
+        o[1] = (s[0]>>2)&0x07;
+        o[0] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[2] = 0x00;
+        o[1] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[0] = (s[1]<<6) | (s[2]^0x80);
+    }
+    else {
+        o[2] = ((s[0]&0x07)<<2) | ((s[1]>>4)&0x03);
+        o[1] = ((s[1]&0x0F)<<4) | ((s[2]>>2)&0x0F);
+        o[0] = ((s[2]&0x03)<<6) | (s[3]&0x3F);
+    }
+    return 4;
+}
+
+static const rb_transcoder
+rb_from_UTF_16BE = {
+    "UTF-16BE", "UTF-8", from_UTF_16BE,
+    TRANSCODE_TABLE_INFO,
+    2, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_16be
+};
+
+static const rb_transcoder
+rb_to_UTF_16BE = {
+    "UTF-8", "UTF-16BE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_16be
+};
+
+static const rb_transcoder
+rb_from_UTF_16LE = {
+    "UTF-16LE", "UTF-8", from_UTF_16LE,
+    TRANSCODE_TABLE_INFO,
+    2, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_16le
+};
+
+static const rb_transcoder
+rb_to_UTF_16LE = {
+    "UTF-8", "UTF-16LE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_16le
+};
+
+static const rb_transcoder
+rb_from_UTF_32BE = {
+    "UTF-32BE", "UTF-8", from_UTF_32BE,
+    TRANSCODE_TABLE_INFO,
+    4, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_32be
+};
+
+static const rb_transcoder
+rb_to_UTF_32BE = {
+    "UTF-8", "UTF-32BE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_32be
+};
+
+static const rb_transcoder
+rb_from_UTF_32LE = {
+    "UTF-32LE", "UTF-8", from_UTF_32LE,
+    TRANSCODE_TABLE_INFO,
+    4, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_32le
+};
+
+static const rb_transcoder
+rb_to_UTF_32LE = {
+    "UTF-8", "UTF-32LE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_32le
+};
+
+void
+Init_utf_16_32(void)
+{
+    rb_register_transcoder(&rb_from_UTF_16BE);
+    rb_register_transcoder(&rb_to_UTF_16BE);
+    rb_register_transcoder(&rb_from_UTF_16LE);
+    rb_register_transcoder(&rb_to_UTF_16LE);
+    rb_register_transcoder(&rb_from_UTF_32BE);
+    rb_register_transcoder(&rb_to_UTF_32BE);
+    rb_register_transcoder(&rb_from_UTF_32LE);
+    rb_register_transcoder(&rb_to_UTF_32LE);
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.trans b/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.trans
new file mode 100644
index 0000000..1bf6ed0
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/utf_16_32.trans
@@ -0,0 +1,369 @@
+#include "transcode_data.h"
+
+<%
+  map = {}
+  map["{00-ff}{00-d7,e0-ff}"] = :func_so
+  map["{00-ff}{d8-db}{00-ff}{dc-df}"] = :func_so
+  transcode_generate_node(ActionMap.parse(map), "from_UTF_16LE")
+
+  map = {}
+  map["{00-ff}{00-d7,e0-ff}0000"] = :func_so
+  map["{00-ff}{00-ff}{01-10}00"] = :func_so
+  transcode_generate_node(ActionMap.parse(map), "from_UTF_32LE")
+
+  map = {}
+  map["{00-d7,e0-ff}{00-ff}"] = :func_so
+  map["{d8-db}{00-ff}{dc-df}{00-ff}"] = :func_so
+  transcode_generate_node(ActionMap.parse(map), "from_UTF_16BE")
+
+  map = {}
+  map["0000{00-d7,e0-ff}{00-ff}"] = :func_so
+  map["00{01-10}{00-ff}{00-ff}"] = :func_so
+  transcode_generate_node(ActionMap.parse(map), "from_UTF_32BE")
+
+  map = {}
+  map["{00-7f}"] = :func_so
+  map["{c2-df}{80-bf}"] = :func_so
+  map["e0{a0-bf}{80-bf}"] = :func_so
+  map["{e1-ec}{80-bf}{80-bf}"] = :func_so
+  map["ed{80-9f}{80-bf}"] = :func_so
+  map["{ee-ef}{80-bf}{80-bf}"] = :func_so
+  map["f0{90-bf}{80-bf}{80-bf}"] = :func_so
+  map["{f1-f3}{80-bf}{80-bf}{80-bf}"] = :func_so
+  map["f4{80-8f}{80-bf}{80-bf}"] = :func_so
+  am = ActionMap.parse(map)
+  transcode_generate_node(am, "from_UTF_8")
+%>
+
+<%= transcode_generated_code %>
+
+static ssize_t
+fun_so_from_utf_16be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[0] && s[1]<0x80) {
+        o[0] = s[1];
+        return 1;
+    }
+    else if (s[0]<0x08) {
+        o[0] = 0xC0 | (s[0]<<2) | (s[1]>>6);
+        o[1] = 0x80 | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF8)!=0xD8) {
+        o[0] = 0xE0 | (s[0]>>4);
+        o[1] = 0x80 | ((s[0]&0x0F)<<2) | (s[1]>>6);
+        o[2] = 0x80 | (s[1]&0x3F);
+        return 3;
+    }
+    else {
+        unsigned int u = (((s[0]&0x03)<<2)|(s[1]>>6)) + 1;
+        o[0] = 0xF0 | (u>>2);
+        o[1] = 0x80 | ((u&0x03)<<4) | ((s[1]>>2)&0x0F);
+        o[2] = 0x80 | ((s[1]&0x03)<<4) | ((s[2]&0x03)<<2) | (s[3]>>6);
+        o[3] = 0x80 | (s[3]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_16be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!(s[0]&0x80)) {
+        o[0] = 0x00;
+        o[1] = s[0];
+        return 2;
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[0] = (s[0]>>2)&0x07;
+        o[1] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[0] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[1] = (s[1]<<6) | (s[2]^0x80);
+        return 2;
+    }
+    else {
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
+        o[0] = 0xD8 | (w>>2);
+        o[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
+        o[2] = 0xDC | ((s[2]>>2)&0x03);
+        o[3] = (s[2]<<6) | (s[3]&~0x80);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_from_utf_16le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[1] && s[0]<0x80) {
+        o[0] = s[0];
+        return 1;
+    }
+    else if (s[1]<0x08) {
+        o[0] = 0xC0 | (s[1]<<2) | (s[0]>>6);
+        o[1] = 0x80 | (s[0]&0x3F);
+        return 2;
+    }
+    else if ((s[1]&0xF8)!=0xD8) {
+        o[0] = 0xE0 | (s[1]>>4);
+        o[1] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+        o[2] = 0x80 | (s[0]&0x3F);
+        return 3;
+    }
+    else {
+        unsigned int u = (((s[1]&0x03)<<2)|(s[0]>>6)) + 1;
+        o[0] = 0xF0 | u>>2;
+        o[1] = 0x80 | ((u&0x03)<<4) | ((s[0]>>2)&0x0F);
+        o[2] = 0x80 | ((s[0]&0x03)<<4) | ((s[3]&0x03)<<2) | (s[2]>>6);
+        o[3] = 0x80 | (s[2]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_16le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!(s[0]&0x80)) {
+        o[1] = 0x00;
+        o[0] = s[0];
+        return 2;
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[1] = (s[0]>>2)&0x07;
+        o[0] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+        return 2;
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[1] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[0] = (s[1]<<6) | (s[2]^0x80);
+        return 2;
+    }
+    else {
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
+        o[1] = 0xD8 | (w>>2);
+        o[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
+        o[3] = 0xDC | ((s[2]>>2)&0x03);
+        o[2] = (s[2]<<6) | (s[3]&~0x80);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_from_utf_32be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[1]) {
+        if (s[2]==0 && s[3]<0x80) {
+            o[0] = s[3];
+            return 1;
+        }
+        else if (s[2]<0x08) {
+            o[0] = 0xC0 | (s[2]<<2) | (s[3]>>6);
+            o[1] = 0x80 | (s[3]&0x3F);
+            return 2;
+        }
+        else {
+            o[0] = 0xE0 | (s[2]>>4);
+            o[1] = 0x80 | ((s[2]&0x0F)<<2) | (s[3]>>6);
+            o[2] = 0x80 | (s[3]&0x3F);
+            return 3;
+        }
+    }
+    else {
+        o[0] = 0xF0 | (s[1]>>2);
+        o[1] = 0x80 | ((s[1]&0x03)<<4) | (s[2]>>4);
+        o[2] = 0x80 | ((s[2]&0x0F)<<2) | (s[3]>>6);
+        o[3] = 0x80 | (s[3]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_32be(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[0] = 0;
+    if (!(s[0]&0x80)) {
+        o[1] = o[2] = 0x00;
+        o[3] = s[0];
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[1] = 0x00;
+        o[2] = (s[0]>>2)&0x07;
+        o[3] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[1] = 0x00;
+        o[2] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[3] = (s[1]<<6) | (s[2]^0x80);
+    }
+    else {
+        o[1] = ((s[0]&0x07)<<2) | ((s[1]>>4)&0x03);
+        o[2] = ((s[1]&0x0F)<<4) | ((s[2]>>2)&0x0F);
+        o[3] = ((s[2]&0x03)<<6) | (s[3]&0x3F);
+    }
+    return 4;
+}
+
+static ssize_t
+fun_so_from_utf_32le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    if (!s[2]) {
+        if (s[1]==0 && s[0]<0x80) {
+            o[0] = s[0];
+            return 1;
+        }
+        else if (s[1]<0x08) {
+            o[0] = 0xC0 | (s[1]<<2) | (s[0]>>6);
+            o[1] = 0x80 | (s[0]&0x3F);
+            return 2;
+        }
+        else {
+            o[0] = 0xE0 | (s[1]>>4);
+            o[1] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+            o[2] = 0x80 | (s[0]&0x3F);
+            return 3;
+        }
+    }
+    else {
+        o[0] = 0xF0 | (s[2]>>2);
+        o[1] = 0x80 | ((s[2]&0x03)<<4) | (s[1]>>4);
+        o[2] = 0x80 | ((s[1]&0x0F)<<2) | (s[0]>>6);
+        o[3] = 0x80 | (s[0]&0x3F);
+        return 4;
+    }
+}
+
+static ssize_t
+fun_so_to_utf_32le(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
+{
+    o[3] = 0;
+    if (!(s[0]&0x80)) {
+        o[2] = o[1] = 0x00;
+        o[0] = s[0];
+    }
+    else if ((s[0]&0xE0)==0xC0) {
+        o[2] = 0x00;
+        o[1] = (s[0]>>2)&0x07;
+        o[0] = ((s[0]&0x03)<<6) | (s[1]&0x3F);
+    }
+    else if ((s[0]&0xF0)==0xE0) {
+        o[2] = 0x00;
+        o[1] = (s[0]<<4) | ((s[1]>>2)^0x20);
+        o[0] = (s[1]<<6) | (s[2]^0x80);
+    }
+    else {
+        o[2] = ((s[0]&0x07)<<2) | ((s[1]>>4)&0x03);
+        o[1] = ((s[1]&0x0F)<<4) | ((s[2]>>2)&0x0F);
+        o[0] = ((s[2]&0x03)<<6) | (s[3]&0x3F);
+    }
+    return 4;
+}
+
+static const rb_transcoder
+rb_from_UTF_16BE = {
+    "UTF-16BE", "UTF-8", from_UTF_16BE,
+    TRANSCODE_TABLE_INFO,
+    2, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_16be
+};
+
+static const rb_transcoder
+rb_to_UTF_16BE = {
+    "UTF-8", "UTF-16BE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_16be
+};
+
+static const rb_transcoder
+rb_from_UTF_16LE = {
+    "UTF-16LE", "UTF-8", from_UTF_16LE,
+    TRANSCODE_TABLE_INFO,
+    2, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_16le
+};
+
+static const rb_transcoder
+rb_to_UTF_16LE = {
+    "UTF-8", "UTF-16LE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_16le
+};
+
+static const rb_transcoder
+rb_from_UTF_32BE = {
+    "UTF-32BE", "UTF-8", from_UTF_32BE,
+    TRANSCODE_TABLE_INFO,
+    4, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_32be
+};
+
+static const rb_transcoder
+rb_to_UTF_32BE = {
+    "UTF-8", "UTF-32BE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_32be
+};
+
+static const rb_transcoder
+rb_from_UTF_32LE = {
+    "UTF-32LE", "UTF-8", from_UTF_32LE,
+    TRANSCODE_TABLE_INFO,
+    4, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_decoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_from_utf_32le
+};
+
+static const rb_transcoder
+rb_to_UTF_32LE = {
+    "UTF-8", "UTF-32LE", from_UTF_8,
+    TRANSCODE_TABLE_INFO,
+    1, /* input_unit_length */
+    4, /* max_input */
+    4, /* max_output */
+    asciicompat_encoder, /* asciicompat_type */
+    0, NULL, NULL, /* state_size, state_init, state_fini */
+    NULL, NULL, NULL, fun_so_to_utf_32le
+};
+
+void
+Init_utf_16_32(void)
+{
+    rb_register_transcoder(&rb_from_UTF_16BE);
+    rb_register_transcoder(&rb_to_UTF_16BE);
+    rb_register_transcoder(&rb_from_UTF_16LE);
+    rb_register_transcoder(&rb_to_UTF_16LE);
+    rb_register_transcoder(&rb_from_UTF_32BE);
+    rb_register_transcoder(&rb_to_UTF_32BE);
+    rb_register_transcoder(&rb_from_UTF_32LE);
+    rb_register_transcoder(&rb_to_UTF_32LE);
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1250-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1250-tbl.rb
new file mode 100644
index 0000000..52063e1
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1250-tbl.rb
@@ -0,0 +1,125 @@
+WINDOWS_1250_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A4",0xA4],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["BB",0xBB],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C4",0xC4],
+  ["C7",0xC7],
+  ["C9",0xC9],
+  ["CB",0xCB],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["DA",0xDA],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DF",0xDF],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E4",0xE4],
+  ["E7",0xE7],
+  ["E9",0xE9],
+  ["EB",0xEB],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["FA",0xFA],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["C3",0x102],
+  ["E3",0x103],
+  ["A5",0x104],
+  ["B9",0x105],
+  ["C6",0x106],
+  ["E6",0x107],
+  ["C8",0x10C],
+  ["E8",0x10D],
+  ["CF",0x10E],
+  ["EF",0x10F],
+  ["D0",0x110],
+  ["F0",0x111],
+  ["CA",0x118],
+  ["EA",0x119],
+  ["CC",0x11A],
+  ["EC",0x11B],
+  ["C5",0x139],
+  ["E5",0x13A],
+  ["BC",0x13D],
+  ["BE",0x13E],
+  ["A3",0x141],
+  ["B3",0x142],
+  ["D1",0x143],
+  ["F1",0x144],
+  ["D2",0x147],
+  ["F2",0x148],
+  ["D5",0x150],
+  ["F5",0x151],
+  ["C0",0x154],
+  ["E0",0x155],
+  ["D8",0x158],
+  ["F8",0x159],
+  ["8C",0x15A],
+  ["9C",0x15B],
+  ["AA",0x15E],
+  ["BA",0x15F],
+  ["8A",0x160],
+  ["9A",0x161],
+  ["DE",0x162],
+  ["FE",0x163],
+  ["8D",0x164],
+  ["9D",0x165],
+  ["D9",0x16E],
+  ["F9",0x16F],
+  ["DB",0x170],
+  ["FB",0x171],
+  ["8F",0x179],
+  ["9F",0x17A],
+  ["AF",0x17B],
+  ["BF",0x17C],
+  ["8E",0x17D],
+  ["9E",0x17E],
+  ["A1",0x2C7],
+  ["A2",0x2D8],
+  ["FF",0x2D9],
+  ["B2",0x2DB],
+  ["BD",0x2DD],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1251-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1251-tbl.rb
new file mode 100644
index 0000000..870c718
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1251-tbl.rb
@@ -0,0 +1,129 @@
+WINDOWS_1251_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A4",0xA4],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["BB",0xBB],
+  ["A8",0x401],
+  ["80",0x402],
+  ["81",0x403],
+  ["AA",0x404],
+  ["BD",0x405],
+  ["B2",0x406],
+  ["AF",0x407],
+  ["A3",0x408],
+  ["8A",0x409],
+  ["8C",0x40A],
+  ["8E",0x40B],
+  ["8D",0x40C],
+  ["A1",0x40E],
+  ["8F",0x40F],
+  ["C0",0x410],
+  ["C1",0x411],
+  ["C2",0x412],
+  ["C3",0x413],
+  ["C4",0x414],
+  ["C5",0x415],
+  ["C6",0x416],
+  ["C7",0x417],
+  ["C8",0x418],
+  ["C9",0x419],
+  ["CA",0x41A],
+  ["CB",0x41B],
+  ["CC",0x41C],
+  ["CD",0x41D],
+  ["CE",0x41E],
+  ["CF",0x41F],
+  ["D0",0x420],
+  ["D1",0x421],
+  ["D2",0x422],
+  ["D3",0x423],
+  ["D4",0x424],
+  ["D5",0x425],
+  ["D6",0x426],
+  ["D7",0x427],
+  ["D8",0x428],
+  ["D9",0x429],
+  ["DA",0x42A],
+  ["DB",0x42B],
+  ["DC",0x42C],
+  ["DD",0x42D],
+  ["DE",0x42E],
+  ["DF",0x42F],
+  ["E0",0x430],
+  ["E1",0x431],
+  ["E2",0x432],
+  ["E3",0x433],
+  ["E4",0x434],
+  ["E5",0x435],
+  ["E6",0x436],
+  ["E7",0x437],
+  ["E8",0x438],
+  ["E9",0x439],
+  ["EA",0x43A],
+  ["EB",0x43B],
+  ["EC",0x43C],
+  ["ED",0x43D],
+  ["EE",0x43E],
+  ["EF",0x43F],
+  ["F0",0x440],
+  ["F1",0x441],
+  ["F2",0x442],
+  ["F3",0x443],
+  ["F4",0x444],
+  ["F5",0x445],
+  ["F6",0x446],
+  ["F7",0x447],
+  ["F8",0x448],
+  ["F9",0x449],
+  ["FA",0x44A],
+  ["FB",0x44B],
+  ["FC",0x44C],
+  ["FD",0x44D],
+  ["FE",0x44E],
+  ["FF",0x44F],
+  ["B8",0x451],
+  ["90",0x452],
+  ["83",0x453],
+  ["BA",0x454],
+  ["BE",0x455],
+  ["B3",0x456],
+  ["BF",0x457],
+  ["BC",0x458],
+  ["9A",0x459],
+  ["9C",0x45A],
+  ["9E",0x45B],
+  ["9D",0x45C],
+  ["A2",0x45E],
+  ["9F",0x45F],
+  ["A5",0x490],
+  ["B4",0x491],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["88",0x20AC],
+  ["B9",0x2116],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1252-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1252-tbl.rb
new file mode 100644
index 0000000..cefc72d
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1252-tbl.rb
@@ -0,0 +1,125 @@
+WINDOWS_1252_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0xAA],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BA",0xBA],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xBF],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D0",0xD0],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DD",0xDD],
+  ["DE",0xDE],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F0",0xF0],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FD",0xFD],
+  ["FE",0xFE],
+  ["FF",0xFF],
+  ["8C",0x152],
+  ["9C",0x153],
+  ["8A",0x160],
+  ["9A",0x161],
+  ["9F",0x178],
+  ["8E",0x17D],
+  ["9E",0x17E],
+  ["83",0x192],
+  ["88",0x2C6],
+  ["98",0x2DC],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1253-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1253-tbl.rb
new file mode 100644
index 0000000..132edb6
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1253-tbl.rb
@@ -0,0 +1,113 @@
+WINDOWS_1253_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["BB",0xBB],
+  ["BD",0xBD],
+  ["83",0x192],
+  ["B4",0x384],
+  ["A1",0x385],
+  ["A2",0x386],
+  ["B8",0x388],
+  ["B9",0x389],
+  ["BA",0x38A],
+  ["BC",0x38C],
+  ["BE",0x38E],
+  ["BF",0x38F],
+  ["C0",0x390],
+  ["C1",0x391],
+  ["C2",0x392],
+  ["C3",0x393],
+  ["C4",0x394],
+  ["C5",0x395],
+  ["C6",0x396],
+  ["C7",0x397],
+  ["C8",0x398],
+  ["C9",0x399],
+  ["CA",0x39A],
+  ["CB",0x39B],
+  ["CC",0x39C],
+  ["CD",0x39D],
+  ["CE",0x39E],
+  ["CF",0x39F],
+  ["D0",0x3A0],
+  ["D1",0x3A1],
+  ["D3",0x3A3],
+  ["D4",0x3A4],
+  ["D5",0x3A5],
+  ["D6",0x3A6],
+  ["D7",0x3A7],
+  ["D8",0x3A8],
+  ["D9",0x3A9],
+  ["DA",0x3AA],
+  ["DB",0x3AB],
+  ["DC",0x3AC],
+  ["DD",0x3AD],
+  ["DE",0x3AE],
+  ["DF",0x3AF],
+  ["E0",0x3B0],
+  ["E1",0x3B1],
+  ["E2",0x3B2],
+  ["E3",0x3B3],
+  ["E4",0x3B4],
+  ["E5",0x3B5],
+  ["E6",0x3B6],
+  ["E7",0x3B7],
+  ["E8",0x3B8],
+  ["E9",0x3B9],
+  ["EA",0x3BA],
+  ["EB",0x3BB],
+  ["EC",0x3BC],
+  ["ED",0x3BD],
+  ["EE",0x3BE],
+  ["EF",0x3BF],
+  ["F0",0x3C0],
+  ["F1",0x3C1],
+  ["F2",0x3C2],
+  ["F3",0x3C3],
+  ["F4",0x3C4],
+  ["F5",0x3C5],
+  ["F6",0x3C6],
+  ["F7",0x3C7],
+  ["F8",0x3C8],
+  ["F9",0x3C9],
+  ["FA",0x3CA],
+  ["FB",0x3CB],
+  ["FC",0x3CC],
+  ["FD",0x3CD],
+  ["FE",0x3CE],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["AF",0x2015],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1254-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1254-tbl.rb
new file mode 100644
index 0000000..81a747a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1254-tbl.rb
@@ -0,0 +1,123 @@
+WINDOWS_1254_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AA",0xAA],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BA",0xBA],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xBF],
+  ["C0",0xC0],
+  ["C1",0xC1],
+  ["C2",0xC2],
+  ["C3",0xC3],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["C6",0xC6],
+  ["C7",0xC7],
+  ["C8",0xC8],
+  ["C9",0xC9],
+  ["CA",0xCA],
+  ["CB",0xCB],
+  ["CC",0xCC],
+  ["CD",0xCD],
+  ["CE",0xCE],
+  ["CF",0xCF],
+  ["D1",0xD1],
+  ["D2",0xD2],
+  ["D3",0xD3],
+  ["D4",0xD4],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["D8",0xD8],
+  ["D9",0xD9],
+  ["DA",0xDA],
+  ["DB",0xDB],
+  ["DC",0xDC],
+  ["DF",0xDF],
+  ["E0",0xE0],
+  ["E1",0xE1],
+  ["E2",0xE2],
+  ["E3",0xE3],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["E6",0xE6],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EC",0xEC],
+  ["ED",0xED],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F1",0xF1],
+  ["F2",0xF2],
+  ["F3",0xF3],
+  ["F4",0xF4],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["F8",0xF8],
+  ["F9",0xF9],
+  ["FA",0xFA],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["FF",0xFF],
+  ["D0",0x11E],
+  ["F0",0x11F],
+  ["DD",0x130],
+  ["FD",0x131],
+  ["8C",0x152],
+  ["9C",0x153],
+  ["DE",0x15E],
+  ["FE",0x15F],
+  ["8A",0x160],
+  ["9A",0x161],
+  ["9F",0x178],
+  ["83",0x192],
+  ["88",0x2C6],
+  ["98",0x2DC],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1255-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1255-tbl.rb
new file mode 100644
index 0000000..9084a56
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1255-tbl.rb
@@ -0,0 +1,141 @@
+WINDOWS_1255_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xA1],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["BF",0xBF],
+  ["AA",0xD7],
+  ["BA",0xF7],
+  ["83",0x192],
+  ["88",0x2C6],
+  ["98",0x2DC],
+  ["C0",0x5B0],
+  ["C1",0x5B1],
+  ["C2",0x5B2],
+  ["C3",0x5B3],
+  ["C4",0x5B4],
+  ["C5",0x5B5],
+  ["C6",0x5B6],
+  ["C7",0x5B7],
+  ["C8",0x5B8],
+  ["C9",0x5B9],
+  ["CB",0x5BB],
+  ["CC",0x5BC],
+  ["CD",0x5BD],
+  ["CE",0x5BE],
+  ["CF",0x5BF],
+  ["D0",0x5C0],
+  ["D1",0x5C1],
+  ["D2",0x5C2],
+  ["D3",0x5C3],
+  ["E0",0x5D0],
+  ["E1",0x5D1],
+  ["E2",0x5D2],
+  ["E3",0x5D3],
+  ["E4",0x5D4],
+  ["E5",0x5D5],
+  ["E6",0x5D6],
+  ["E7",0x5D7],
+  ["E8",0x5D8],
+  ["E9",0x5D9],
+  ["EA",0x5DA],
+  ["EB",0x5DB],
+  ["EC",0x5DC],
+  ["ED",0x5DD],
+  ["EE",0x5DE],
+  ["EF",0x5DF],
+  ["F0",0x5E0],
+  ["F1",0x5E1],
+  ["F2",0x5E2],
+  ["F3",0x5E3],
+  ["F4",0x5E4],
+  ["F5",0x5E5],
+  ["F6",0x5E6],
+  ["F7",0x5E7],
+  ["F8",0x5E8],
+  ["F9",0x5E9],
+  ["FA",0x5EA],
+  ["D4",0x5F0],
+  ["D5",0x5F1],
+  ["D6",0x5F2],
+  ["D7",0x5F3],
+  ["D8",0x5F4],
+  ["FD",0x200E],
+  ["FE",0x200F],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["A4",0x20AA],
+  ["80",0x20AC],
+  ["99",0x2122],
+  ["E9C4",0xFB1D],
+  ["D6C7",0xFB1F],
+  ["F9D1",0xFB2A],
+  ["F9D2",0xFB2B],
+  ["F9CCD1",0xFB2C],
+  ["F9CCD2",0xFB2D],
+  ["E0C7",0xFB2E],
+  ["E0C8",0xFB2F],
+  ["E0CC",0xFB30],
+  ["E1CC",0xFB31],
+  ["E2CC",0xFB32],
+  ["E3CC",0xFB33],
+  ["E4CC",0xFB34],
+  ["E5CC",0xFB35],
+  ["E6CC",0xFB36],
+  ["E8CC",0xFB38],
+  ["E9CC",0xFB39],
+  ["EACC",0xFB3A],
+  ["EBCC",0xFB3B],
+  ["ECCC",0xFB3C],
+  ["EECC",0xFB3E],
+  ["F0CC",0xFB40],
+  ["F1CC",0xFB41],
+  ["F3CC",0xFB43],
+  ["F4CC",0xFB44],
+  ["F6CC",0xFB46],
+  ["F7CC",0xFB47],
+  ["F8CC",0xFB48],
+  ["F9CC",0xFB49],
+  ["FACC",0xFB4A],
+  ["E5C9",0xFB4B],
+  ["E1CF",0xFB4C],
+  ["EBCF",0xFB4D],
+  ["F4CF",0xFB4E],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1256-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1256-tbl.rb
new file mode 100644
index 0000000..25c5874
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1256-tbl.rb
@@ -0,0 +1,130 @@
+WINDOWS_1256_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A5",0xA5],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["A8",0xA8],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["AF",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["B8",0xB8],
+  ["B9",0xB9],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["D7",0xD7],
+  ["E0",0xE0],
+  ["E2",0xE2],
+  ["E7",0xE7],
+  ["E8",0xE8],
+  ["E9",0xE9],
+  ["EA",0xEA],
+  ["EB",0xEB],
+  ["EE",0xEE],
+  ["EF",0xEF],
+  ["F4",0xF4],
+  ["F7",0xF7],
+  ["F9",0xF9],
+  ["FB",0xFB],
+  ["FC",0xFC],
+  ["8C",0x152],
+  ["9C",0x153],
+  ["83",0x192],
+  ["88",0x2C6],
+  ["A1",0x60C],
+  ["BA",0x61B],
+  ["BF",0x61F],
+  ["C1",0x621],
+  ["C2",0x622],
+  ["C3",0x623],
+  ["C4",0x624],
+  ["C5",0x625],
+  ["C6",0x626],
+  ["C7",0x627],
+  ["C8",0x628],
+  ["C9",0x629],
+  ["CA",0x62A],
+  ["CB",0x62B],
+  ["CC",0x62C],
+  ["CD",0x62D],
+  ["CE",0x62E],
+  ["CF",0x62F],
+  ["D0",0x630],
+  ["D1",0x631],
+  ["D2",0x632],
+  ["D3",0x633],
+  ["D4",0x634],
+  ["D5",0x635],
+  ["D6",0x636],
+  ["D8",0x637],
+  ["D9",0x638],
+  ["DA",0x639],
+  ["DB",0x63A],
+  ["DC",0x640],
+  ["DD",0x641],
+  ["DE",0x642],
+  ["DF",0x643],
+  ["E1",0x644],
+  ["E3",0x645],
+  ["E4",0x646],
+  ["E5",0x647],
+  ["E6",0x648],
+  ["EC",0x649],
+  ["ED",0x64A],
+  ["F0",0x64B],
+  ["F1",0x64C],
+  ["F2",0x64D],
+  ["F3",0x64E],
+  ["F5",0x64F],
+  ["F6",0x650],
+  ["F8",0x651],
+  ["FA",0x652],
+  ["8A",0x679],
+  ["81",0x67E],
+  ["8D",0x686],
+  ["8F",0x688],
+  ["9A",0x691],
+  ["8E",0x698],
+  ["98",0x6A9],
+  ["90",0x6AF],
+  ["9F",0x6BA],
+  ["AA",0x6BE],
+  ["C0",0x6C1],
+  ["FF",0x6D2],
+  ["9D",0x200C],
+  ["9E",0x200D],
+  ["FD",0x200E],
+  ["FE",0x200F],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-1257-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-1257-tbl.rb
new file mode 100644
index 0000000..9e89b2b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-1257-tbl.rb
@@ -0,0 +1,118 @@
+WINDOWS_1257_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A2",0xA2],
+  ["A3",0xA3],
+  ["A4",0xA4],
+  ["A6",0xA6],
+  ["A7",0xA7],
+  ["8D",0xA8],
+  ["A9",0xA9],
+  ["AB",0xAB],
+  ["AC",0xAC],
+  ["AD",0xAD],
+  ["AE",0xAE],
+  ["9D",0xAF],
+  ["B0",0xB0],
+  ["B1",0xB1],
+  ["B2",0xB2],
+  ["B3",0xB3],
+  ["B4",0xB4],
+  ["B5",0xB5],
+  ["B6",0xB6],
+  ["B7",0xB7],
+  ["8F",0xB8],
+  ["B9",0xB9],
+  ["BB",0xBB],
+  ["BC",0xBC],
+  ["BD",0xBD],
+  ["BE",0xBE],
+  ["C4",0xC4],
+  ["C5",0xC5],
+  ["AF",0xC6],
+  ["C9",0xC9],
+  ["D3",0xD3],
+  ["D5",0xD5],
+  ["D6",0xD6],
+  ["D7",0xD7],
+  ["A8",0xD8],
+  ["DC",0xDC],
+  ["DF",0xDF],
+  ["E4",0xE4],
+  ["E5",0xE5],
+  ["BF",0xE6],
+  ["E9",0xE9],
+  ["F3",0xF3],
+  ["F5",0xF5],
+  ["F6",0xF6],
+  ["F7",0xF7],
+  ["B8",0xF8],
+  ["FC",0xFC],
+  ["C2",0x100],
+  ["E2",0x101],
+  ["C0",0x104],
+  ["E0",0x105],
+  ["C3",0x106],
+  ["E3",0x107],
+  ["C8",0x10C],
+  ["E8",0x10D],
+  ["C7",0x112],
+  ["E7",0x113],
+  ["CB",0x116],
+  ["EB",0x117],
+  ["C6",0x118],
+  ["E6",0x119],
+  ["CC",0x122],
+  ["EC",0x123],
+  ["CE",0x12A],
+  ["EE",0x12B],
+  ["C1",0x12E],
+  ["E1",0x12F],
+  ["CD",0x136],
+  ["ED",0x137],
+  ["CF",0x13B],
+  ["EF",0x13C],
+  ["D9",0x141],
+  ["F9",0x142],
+  ["D1",0x143],
+  ["F1",0x144],
+  ["D2",0x145],
+  ["F2",0x146],
+  ["D4",0x14C],
+  ["F4",0x14D],
+  ["AA",0x156],
+  ["BA",0x157],
+  ["DA",0x15A],
+  ["FA",0x15B],
+  ["D0",0x160],
+  ["F0",0x161],
+  ["DB",0x16A],
+  ["FB",0x16B],
+  ["D8",0x172],
+  ["F8",0x173],
+  ["CA",0x179],
+  ["EA",0x17A],
+  ["DD",0x17B],
+  ["FD",0x17C],
+  ["DE",0x17D],
+  ["FE",0x17E],
+  ["8E",0x2C7],
+  ["FF",0x2D9],
+  ["9E",0x2DB],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["82",0x201A],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["84",0x201E],
+  ["86",0x2020],
+  ["87",0x2021],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["89",0x2030],
+  ["8B",0x2039],
+  ["9B",0x203A],
+  ["80",0x20AC],
+  ["99",0x2122],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/trans/windows-874-tbl.rb b/lib/ruby-1.9.1-rc1/enc/trans/windows-874-tbl.rb
new file mode 100644
index 0000000..0552df3
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/trans/windows-874-tbl.rb
@@ -0,0 +1,99 @@
+WINDOWS_874_TO_UCS_TBL = [
+  ["A0",0xA0],
+  ["A1",0xE01],
+  ["A2",0xE02],
+  ["A3",0xE03],
+  ["A4",0xE04],
+  ["A5",0xE05],
+  ["A6",0xE06],
+  ["A7",0xE07],
+  ["A8",0xE08],
+  ["A9",0xE09],
+  ["AA",0xE0A],
+  ["AB",0xE0B],
+  ["AC",0xE0C],
+  ["AD",0xE0D],
+  ["AE",0xE0E],
+  ["AF",0xE0F],
+  ["B0",0xE10],
+  ["B1",0xE11],
+  ["B2",0xE12],
+  ["B3",0xE13],
+  ["B4",0xE14],
+  ["B5",0xE15],
+  ["B6",0xE16],
+  ["B7",0xE17],
+  ["B8",0xE18],
+  ["B9",0xE19],
+  ["BA",0xE1A],
+  ["BB",0xE1B],
+  ["BC",0xE1C],
+  ["BD",0xE1D],
+  ["BE",0xE1E],
+  ["BF",0xE1F],
+  ["C0",0xE20],
+  ["C1",0xE21],
+  ["C2",0xE22],
+  ["C3",0xE23],
+  ["C4",0xE24],
+  ["C5",0xE25],
+  ["C6",0xE26],
+  ["C7",0xE27],
+  ["C8",0xE28],
+  ["C9",0xE29],
+  ["CA",0xE2A],
+  ["CB",0xE2B],
+  ["CC",0xE2C],
+  ["CD",0xE2D],
+  ["CE",0xE2E],
+  ["CF",0xE2F],
+  ["D0",0xE30],
+  ["D1",0xE31],
+  ["D2",0xE32],
+  ["D3",0xE33],
+  ["D4",0xE34],
+  ["D5",0xE35],
+  ["D6",0xE36],
+  ["D7",0xE37],
+  ["D8",0xE38],
+  ["D9",0xE39],
+  ["DA",0xE3A],
+  ["DF",0xE3F],
+  ["E0",0xE40],
+  ["E1",0xE41],
+  ["E2",0xE42],
+  ["E3",0xE43],
+  ["E4",0xE44],
+  ["E5",0xE45],
+  ["E6",0xE46],
+  ["E7",0xE47],
+  ["E8",0xE48],
+  ["E9",0xE49],
+  ["EA",0xE4A],
+  ["EB",0xE4B],
+  ["EC",0xE4C],
+  ["ED",0xE4D],
+  ["EE",0xE4E],
+  ["EF",0xE4F],
+  ["F0",0xE50],
+  ["F1",0xE51],
+  ["F2",0xE52],
+  ["F3",0xE53],
+  ["F4",0xE54],
+  ["F5",0xE55],
+  ["F6",0xE56],
+  ["F7",0xE57],
+  ["F8",0xE58],
+  ["F9",0xE59],
+  ["FA",0xE5A],
+  ["FB",0xE5B],
+  ["96",0x2013],
+  ["97",0x2014],
+  ["91",0x2018],
+  ["92",0x2019],
+  ["93",0x201C],
+  ["94",0x201D],
+  ["95",0x2022],
+  ["85",0x2026],
+  ["80",0x20AC],
+]
\ No newline at end of file
diff --git a/lib/ruby-1.9.1-rc1/enc/unicode.c b/lib/ruby-1.9.1-rc1/enc/unicode.c
new file mode 100644
index 0000000..2dfcbba
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/unicode.c
@@ -0,0 +1,11359 @@
+/**********************************************************************
+  unicode.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regint.h"
+
+#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code,ctype) \
+  ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+#if 0
+#define ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(code,cbit) \
+  ((EncUNICODE_ISO_8859_1_CtypeTable[code] & (cbit)) != 0)
+#endif
+
+static const unsigned short EncUNICODE_ISO_8859_1_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x428c, 0x4289, 0x4288, 0x4288, 0x4288, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0288, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
+  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x30e2, 0x01a0, 0x00a0, 0x00a8, 0x00a0, 0x00a0,
+  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x30e2, 0x00a0, 0x01a0,
+  0x00a0, 0x10a0, 0x30e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x00a0,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x00a0,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+/* 'NEWLINE' */
+static const OnigCodePoint CR_NEWLINE[] = {
+  1,
+  0x000a, 0x000a
+}; /* CR_NEWLINE */
+
+/* 'Alpha': [[:Alpha:]] */
+static const OnigCodePoint CR_Alpha[] = {
+  418,
+  0x0041, 0x005a,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b5, 0x00b5,
+  0x00ba, 0x00ba,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00f6,
+  0x00f8, 0x0241,
+  0x0250, 0x02c1,
+  0x02c6, 0x02d1,
+  0x02e0, 0x02e4,
+  0x02ee, 0x02ee,
+  0x0300, 0x036f,
+  0x037a, 0x037a,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x03f5,
+  0x03f7, 0x0481,
+  0x0483, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x0559,
+  0x0561, 0x0587,
+  0x0591, 0x05b9,
+  0x05bb, 0x05bd,
+  0x05bf, 0x05bf,
+  0x05c1, 0x05c2,
+  0x05c4, 0x05c5,
+  0x05c7, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f2,
+  0x0610, 0x0615,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x066e, 0x06d3,
+  0x06d5, 0x06dc,
+  0x06de, 0x06e8,
+  0x06ea, 0x06ef,
+  0x06fa, 0x06fc,
+  0x06ff, 0x06ff,
+  0x0710, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0963,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09f0, 0x09f1,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a70, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b71, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df3,
+  0x0e01, 0x0e3a,
+  0x0e40, 0x0e4e,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f00,
+  0x0f18, 0x0f19,
+  0x0f35, 0x0f35,
+  0x0f37, 0x0f37,
+  0x0f39, 0x0f39,
+  0x0f3e, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f84,
+  0x0f86, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fc6, 0x0fc6,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1050, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fa,
+  0x10fc, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x135f,
+  0x1380, 0x138f,
+  0x13a0, 0x13f4,
+  0x1401, 0x166c,
+  0x166f, 0x1676,
+  0x1681, 0x169a,
+  0x16a0, 0x16ea,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1734,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17b3,
+  0x17b6, 0x17d3,
+  0x17d7, 0x17d7,
+  0x17dc, 0x17dd,
+  0x180b, 0x180d,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1950, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x1a00, 0x1a1b,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fbc,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fcc,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fe0, 0x1fec,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffc,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x2090, 0x2094,
+  0x20d0, 0x20eb,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210a, 0x2113,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x212f, 0x2131,
+  0x2133, 0x2139,
+  0x213c, 0x213f,
+  0x2145, 0x2149,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2ce4,
+  0x2d00, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x3005, 0x3006,
+  0x302a, 0x302f,
+  0x3031, 0x3035,
+  0x303b, 0x303c,
+  0x3041, 0x3096,
+  0x3099, 0x309a,
+  0x309d, 0x309f,
+  0x30a1, 0x30fa,
+  0x30fc, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x31a0, 0x31b7,
+  0x31f0, 0x31ff,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa800, 0xa827,
+  0xac00, 0xd7a3,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb28,
+  0xfb2a, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfb,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xff21, 0xff3a,
+  0xff41, 0xff5a,
+  0xff66, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10300, 0x1031e,
+  0x10330, 0x10349,
+  0x10380, 0x1039d,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103cf,
+  0x10400, 0x1049d,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a3f,
+  0x1d165, 0x1d169,
+  0x1d16d, 0x1d172,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0x1d242, 0x1d244,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d6c0,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6fa,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d734,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d76e,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d7a8,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0100, 0xe01ef
+}; /* CR_Alpha */
+
+/* 'Blank': [[:Blank:]] */
+static const OnigCodePoint CR_Blank[] = {
+  9,
+  0x0009, 0x0009,
+  0x0020, 0x0020,
+  0x00a0, 0x00a0,
+  0x1680, 0x1680,
+  0x180e, 0x180e,
+  0x2000, 0x200a,
+  0x202f, 0x202f,
+  0x205f, 0x205f,
+  0x3000, 0x3000
+}; /* CR_Blank */
+
+/* 'Cntrl': [[:Cntrl:]] */
+static const OnigCodePoint CR_Cntrl[] = {
+  19,
+  0x0000, 0x001f,
+  0x007f, 0x009f,
+  0x00ad, 0x00ad,
+  0x0600, 0x0603,
+  0x06dd, 0x06dd,
+  0x070f, 0x070f,
+  0x17b4, 0x17b5,
+  0x200b, 0x200f,
+  0x202a, 0x202e,
+  0x2060, 0x2063,
+  0x206a, 0x206f,
+  0xd800, 0xf8ff,
+  0xfeff, 0xfeff,
+  0xfff9, 0xfffb,
+  0x1d173, 0x1d17a,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Cntrl */
+
+/* 'Digit': [[:Digit:]] */
+static const OnigCodePoint CR_Digit[] = {
+  23,
+  0x0030, 0x0039,
+  0x0660, 0x0669,
+  0x06f0, 0x06f9,
+  0x0966, 0x096f,
+  0x09e6, 0x09ef,
+  0x0a66, 0x0a6f,
+  0x0ae6, 0x0aef,
+  0x0b66, 0x0b6f,
+  0x0be6, 0x0bef,
+  0x0c66, 0x0c6f,
+  0x0ce6, 0x0cef,
+  0x0d66, 0x0d6f,
+  0x0e50, 0x0e59,
+  0x0ed0, 0x0ed9,
+  0x0f20, 0x0f29,
+  0x1040, 0x1049,
+  0x17e0, 0x17e9,
+  0x1810, 0x1819,
+  0x1946, 0x194f,
+  0x19d0, 0x19d9,
+  0xff10, 0xff19,
+  0x104a0, 0x104a9,
+  0x1d7ce, 0x1d7ff
+}; /* CR_Digit */
+
+/* 'Graph': [[:Graph:]] */
+static const OnigCodePoint CR_Graph[] = {
+  424,
+  0x0021, 0x007e,
+  0x00a1, 0x0241,
+  0x0250, 0x036f,
+  0x0374, 0x0375,
+  0x037a, 0x037a,
+  0x037e, 0x037e,
+  0x0384, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x055f,
+  0x0561, 0x0587,
+  0x0589, 0x058a,
+  0x0591, 0x05b9,
+  0x05bb, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f4,
+  0x0600, 0x0603,
+  0x060b, 0x0615,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x0660, 0x070d,
+  0x070f, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0970,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09fa,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0af1, 0x0af1,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bfa,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df4,
+  0x0e01, 0x0e3a,
+  0x0e3f, 0x0e5b,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fbe, 0x0fcc,
+  0x0fcf, 0x0fd1,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x137c,
+  0x1380, 0x1399,
+  0x13a0, 0x13f4,
+  0x1401, 0x1676,
+  0x1681, 0x169c,
+  0x16a0, 0x16f0,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1736,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17dd,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x1800, 0x180d,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1940, 0x1940,
+  0x1944, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x19de, 0x1a1b,
+  0x1a1e, 0x1a1f,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fc4,
+  0x1fc6, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fdd, 0x1fef,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffe,
+  0x200b, 0x2027,
+  0x202a, 0x202e,
+  0x2030, 0x205e,
+  0x2060, 0x2063,
+  0x206a, 0x2071,
+  0x2074, 0x208e,
+  0x2090, 0x2094,
+  0x20a0, 0x20b5,
+  0x20d0, 0x20eb,
+  0x2100, 0x214c,
+  0x2153, 0x2183,
+  0x2190, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x2460, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x27c0, 0x27c6,
+  0x27d0, 0x27eb,
+  0x27f0, 0x2b13,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2cea,
+  0x2cf9, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x2ff0, 0x2ffb,
+  0x3001, 0x303f,
+  0x3041, 0x3096,
+  0x3099, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x3190, 0x31b7,
+  0x31c0, 0x31cf,
+  0x31f0, 0x321e,
+  0x3220, 0x3243,
+  0x3250, 0x32fe,
+  0x3300, 0x4db5,
+  0x4dc0, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa490, 0xa4c6,
+  0xa700, 0xa716,
+  0xa800, 0xa82b,
+  0xac00, 0xd7a3,
+  0xe000, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3f,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfd,
+  0xfe00, 0xfe19,
+  0xfe20, 0xfe23,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe66,
+  0xfe68, 0xfe6b,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xfeff, 0xfeff,
+  0xff01, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0xffe0, 0xffe6,
+  0xffe8, 0xffee,
+  0xfff9, 0xfffd,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10100, 0x10102,
+  0x10107, 0x10133,
+  0x10137, 0x1018a,
+  0x10300, 0x1031e,
+  0x10320, 0x10323,
+  0x10330, 0x1034a,
+  0x10380, 0x1039d,
+  0x1039f, 0x103c3,
+  0x103c8, 0x103d5,
+  0x10400, 0x1049d,
+  0x104a0, 0x104a9,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a47,
+  0x10a50, 0x10a58,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d1dd,
+  0x1d200, 0x1d245,
+  0x1d300, 0x1d356,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f,
+  0xe0100, 0xe01ef,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Graph */
+
+/* 'Lower': [[:Lower:]] */
+static const OnigCodePoint CR_Lower[] = {
+  480,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b5, 0x00b5,
+  0x00ba, 0x00ba,
+  0x00df, 0x00f6,
+  0x00f8, 0x00ff,
+  0x0101, 0x0101,
+  0x0103, 0x0103,
+  0x0105, 0x0105,
+  0x0107, 0x0107,
+  0x0109, 0x0109,
+  0x010b, 0x010b,
+  0x010d, 0x010d,
+  0x010f, 0x010f,
+  0x0111, 0x0111,
+  0x0113, 0x0113,
+  0x0115, 0x0115,
+  0x0117, 0x0117,
+  0x0119, 0x0119,
+  0x011b, 0x011b,
+  0x011d, 0x011d,
+  0x011f, 0x011f,
+  0x0121, 0x0121,
+  0x0123, 0x0123,
+  0x0125, 0x0125,
+  0x0127, 0x0127,
+  0x0129, 0x0129,
+  0x012b, 0x012b,
+  0x012d, 0x012d,
+  0x012f, 0x012f,
+  0x0131, 0x0131,
+  0x0133, 0x0133,
+  0x0135, 0x0135,
+  0x0137, 0x0138,
+  0x013a, 0x013a,
+  0x013c, 0x013c,
+  0x013e, 0x013e,
+  0x0140, 0x0140,
+  0x0142, 0x0142,
+  0x0144, 0x0144,
+  0x0146, 0x0146,
+  0x0148, 0x0149,
+  0x014b, 0x014b,
+  0x014d, 0x014d,
+  0x014f, 0x014f,
+  0x0151, 0x0151,
+  0x0153, 0x0153,
+  0x0155, 0x0155,
+  0x0157, 0x0157,
+  0x0159, 0x0159,
+  0x015b, 0x015b,
+  0x015d, 0x015d,
+  0x015f, 0x015f,
+  0x0161, 0x0161,
+  0x0163, 0x0163,
+  0x0165, 0x0165,
+  0x0167, 0x0167,
+  0x0169, 0x0169,
+  0x016b, 0x016b,
+  0x016d, 0x016d,
+  0x016f, 0x016f,
+  0x0171, 0x0171,
+  0x0173, 0x0173,
+  0x0175, 0x0175,
+  0x0177, 0x0177,
+  0x017a, 0x017a,
+  0x017c, 0x017c,
+  0x017e, 0x0180,
+  0x0183, 0x0183,
+  0x0185, 0x0185,
+  0x0188, 0x0188,
+  0x018c, 0x018d,
+  0x0192, 0x0192,
+  0x0195, 0x0195,
+  0x0199, 0x019b,
+  0x019e, 0x019e,
+  0x01a1, 0x01a1,
+  0x01a3, 0x01a3,
+  0x01a5, 0x01a5,
+  0x01a8, 0x01a8,
+  0x01aa, 0x01ab,
+  0x01ad, 0x01ad,
+  0x01b0, 0x01b0,
+  0x01b4, 0x01b4,
+  0x01b6, 0x01b6,
+  0x01b9, 0x01ba,
+  0x01bd, 0x01bf,
+  0x01c6, 0x01c6,
+  0x01c9, 0x01c9,
+  0x01cc, 0x01cc,
+  0x01ce, 0x01ce,
+  0x01d0, 0x01d0,
+  0x01d2, 0x01d2,
+  0x01d4, 0x01d4,
+  0x01d6, 0x01d6,
+  0x01d8, 0x01d8,
+  0x01da, 0x01da,
+  0x01dc, 0x01dd,
+  0x01df, 0x01df,
+  0x01e1, 0x01e1,
+  0x01e3, 0x01e3,
+  0x01e5, 0x01e5,
+  0x01e7, 0x01e7,
+  0x01e9, 0x01e9,
+  0x01eb, 0x01eb,
+  0x01ed, 0x01ed,
+  0x01ef, 0x01f0,
+  0x01f3, 0x01f3,
+  0x01f5, 0x01f5,
+  0x01f9, 0x01f9,
+  0x01fb, 0x01fb,
+  0x01fd, 0x01fd,
+  0x01ff, 0x01ff,
+  0x0201, 0x0201,
+  0x0203, 0x0203,
+  0x0205, 0x0205,
+  0x0207, 0x0207,
+  0x0209, 0x0209,
+  0x020b, 0x020b,
+  0x020d, 0x020d,
+  0x020f, 0x020f,
+  0x0211, 0x0211,
+  0x0213, 0x0213,
+  0x0215, 0x0215,
+  0x0217, 0x0217,
+  0x0219, 0x0219,
+  0x021b, 0x021b,
+  0x021d, 0x021d,
+  0x021f, 0x021f,
+  0x0221, 0x0221,
+  0x0223, 0x0223,
+  0x0225, 0x0225,
+  0x0227, 0x0227,
+  0x0229, 0x0229,
+  0x022b, 0x022b,
+  0x022d, 0x022d,
+  0x022f, 0x022f,
+  0x0231, 0x0231,
+  0x0233, 0x0239,
+  0x023c, 0x023c,
+  0x023f, 0x0240,
+  0x0250, 0x02af,
+  0x0390, 0x0390,
+  0x03ac, 0x03ce,
+  0x03d0, 0x03d1,
+  0x03d5, 0x03d7,
+  0x03d9, 0x03d9,
+  0x03db, 0x03db,
+  0x03dd, 0x03dd,
+  0x03df, 0x03df,
+  0x03e1, 0x03e1,
+  0x03e3, 0x03e3,
+  0x03e5, 0x03e5,
+  0x03e7, 0x03e7,
+  0x03e9, 0x03e9,
+  0x03eb, 0x03eb,
+  0x03ed, 0x03ed,
+  0x03ef, 0x03f3,
+  0x03f5, 0x03f5,
+  0x03f8, 0x03f8,
+  0x03fb, 0x03fc,
+  0x0430, 0x045f,
+  0x0461, 0x0461,
+  0x0463, 0x0463,
+  0x0465, 0x0465,
+  0x0467, 0x0467,
+  0x0469, 0x0469,
+  0x046b, 0x046b,
+  0x046d, 0x046d,
+  0x046f, 0x046f,
+  0x0471, 0x0471,
+  0x0473, 0x0473,
+  0x0475, 0x0475,
+  0x0477, 0x0477,
+  0x0479, 0x0479,
+  0x047b, 0x047b,
+  0x047d, 0x047d,
+  0x047f, 0x047f,
+  0x0481, 0x0481,
+  0x048b, 0x048b,
+  0x048d, 0x048d,
+  0x048f, 0x048f,
+  0x0491, 0x0491,
+  0x0493, 0x0493,
+  0x0495, 0x0495,
+  0x0497, 0x0497,
+  0x0499, 0x0499,
+  0x049b, 0x049b,
+  0x049d, 0x049d,
+  0x049f, 0x049f,
+  0x04a1, 0x04a1,
+  0x04a3, 0x04a3,
+  0x04a5, 0x04a5,
+  0x04a7, 0x04a7,
+  0x04a9, 0x04a9,
+  0x04ab, 0x04ab,
+  0x04ad, 0x04ad,
+  0x04af, 0x04af,
+  0x04b1, 0x04b1,
+  0x04b3, 0x04b3,
+  0x04b5, 0x04b5,
+  0x04b7, 0x04b7,
+  0x04b9, 0x04b9,
+  0x04bb, 0x04bb,
+  0x04bd, 0x04bd,
+  0x04bf, 0x04bf,
+  0x04c2, 0x04c2,
+  0x04c4, 0x04c4,
+  0x04c6, 0x04c6,
+  0x04c8, 0x04c8,
+  0x04ca, 0x04ca,
+  0x04cc, 0x04cc,
+  0x04ce, 0x04ce,
+  0x04d1, 0x04d1,
+  0x04d3, 0x04d3,
+  0x04d5, 0x04d5,
+  0x04d7, 0x04d7,
+  0x04d9, 0x04d9,
+  0x04db, 0x04db,
+  0x04dd, 0x04dd,
+  0x04df, 0x04df,
+  0x04e1, 0x04e1,
+  0x04e3, 0x04e3,
+  0x04e5, 0x04e5,
+  0x04e7, 0x04e7,
+  0x04e9, 0x04e9,
+  0x04eb, 0x04eb,
+  0x04ed, 0x04ed,
+  0x04ef, 0x04ef,
+  0x04f1, 0x04f1,
+  0x04f3, 0x04f3,
+  0x04f5, 0x04f5,
+  0x04f7, 0x04f7,
+  0x04f9, 0x04f9,
+  0x0501, 0x0501,
+  0x0503, 0x0503,
+  0x0505, 0x0505,
+  0x0507, 0x0507,
+  0x0509, 0x0509,
+  0x050b, 0x050b,
+  0x050d, 0x050d,
+  0x050f, 0x050f,
+  0x0561, 0x0587,
+  0x1d00, 0x1d2b,
+  0x1d62, 0x1d77,
+  0x1d79, 0x1d9a,
+  0x1e01, 0x1e01,
+  0x1e03, 0x1e03,
+  0x1e05, 0x1e05,
+  0x1e07, 0x1e07,
+  0x1e09, 0x1e09,
+  0x1e0b, 0x1e0b,
+  0x1e0d, 0x1e0d,
+  0x1e0f, 0x1e0f,
+  0x1e11, 0x1e11,
+  0x1e13, 0x1e13,
+  0x1e15, 0x1e15,
+  0x1e17, 0x1e17,
+  0x1e19, 0x1e19,
+  0x1e1b, 0x1e1b,
+  0x1e1d, 0x1e1d,
+  0x1e1f, 0x1e1f,
+  0x1e21, 0x1e21,
+  0x1e23, 0x1e23,
+  0x1e25, 0x1e25,
+  0x1e27, 0x1e27,
+  0x1e29, 0x1e29,
+  0x1e2b, 0x1e2b,
+  0x1e2d, 0x1e2d,
+  0x1e2f, 0x1e2f,
+  0x1e31, 0x1e31,
+  0x1e33, 0x1e33,
+  0x1e35, 0x1e35,
+  0x1e37, 0x1e37,
+  0x1e39, 0x1e39,
+  0x1e3b, 0x1e3b,
+  0x1e3d, 0x1e3d,
+  0x1e3f, 0x1e3f,
+  0x1e41, 0x1e41,
+  0x1e43, 0x1e43,
+  0x1e45, 0x1e45,
+  0x1e47, 0x1e47,
+  0x1e49, 0x1e49,
+  0x1e4b, 0x1e4b,
+  0x1e4d, 0x1e4d,
+  0x1e4f, 0x1e4f,
+  0x1e51, 0x1e51,
+  0x1e53, 0x1e53,
+  0x1e55, 0x1e55,
+  0x1e57, 0x1e57,
+  0x1e59, 0x1e59,
+  0x1e5b, 0x1e5b,
+  0x1e5d, 0x1e5d,
+  0x1e5f, 0x1e5f,
+  0x1e61, 0x1e61,
+  0x1e63, 0x1e63,
+  0x1e65, 0x1e65,
+  0x1e67, 0x1e67,
+  0x1e69, 0x1e69,
+  0x1e6b, 0x1e6b,
+  0x1e6d, 0x1e6d,
+  0x1e6f, 0x1e6f,
+  0x1e71, 0x1e71,
+  0x1e73, 0x1e73,
+  0x1e75, 0x1e75,
+  0x1e77, 0x1e77,
+  0x1e79, 0x1e79,
+  0x1e7b, 0x1e7b,
+  0x1e7d, 0x1e7d,
+  0x1e7f, 0x1e7f,
+  0x1e81, 0x1e81,
+  0x1e83, 0x1e83,
+  0x1e85, 0x1e85,
+  0x1e87, 0x1e87,
+  0x1e89, 0x1e89,
+  0x1e8b, 0x1e8b,
+  0x1e8d, 0x1e8d,
+  0x1e8f, 0x1e8f,
+  0x1e91, 0x1e91,
+  0x1e93, 0x1e93,
+  0x1e95, 0x1e9b,
+  0x1ea1, 0x1ea1,
+  0x1ea3, 0x1ea3,
+  0x1ea5, 0x1ea5,
+  0x1ea7, 0x1ea7,
+  0x1ea9, 0x1ea9,
+  0x1eab, 0x1eab,
+  0x1ead, 0x1ead,
+  0x1eaf, 0x1eaf,
+  0x1eb1, 0x1eb1,
+  0x1eb3, 0x1eb3,
+  0x1eb5, 0x1eb5,
+  0x1eb7, 0x1eb7,
+  0x1eb9, 0x1eb9,
+  0x1ebb, 0x1ebb,
+  0x1ebd, 0x1ebd,
+  0x1ebf, 0x1ebf,
+  0x1ec1, 0x1ec1,
+  0x1ec3, 0x1ec3,
+  0x1ec5, 0x1ec5,
+  0x1ec7, 0x1ec7,
+  0x1ec9, 0x1ec9,
+  0x1ecb, 0x1ecb,
+  0x1ecd, 0x1ecd,
+  0x1ecf, 0x1ecf,
+  0x1ed1, 0x1ed1,
+  0x1ed3, 0x1ed3,
+  0x1ed5, 0x1ed5,
+  0x1ed7, 0x1ed7,
+  0x1ed9, 0x1ed9,
+  0x1edb, 0x1edb,
+  0x1edd, 0x1edd,
+  0x1edf, 0x1edf,
+  0x1ee1, 0x1ee1,
+  0x1ee3, 0x1ee3,
+  0x1ee5, 0x1ee5,
+  0x1ee7, 0x1ee7,
+  0x1ee9, 0x1ee9,
+  0x1eeb, 0x1eeb,
+  0x1eed, 0x1eed,
+  0x1eef, 0x1eef,
+  0x1ef1, 0x1ef1,
+  0x1ef3, 0x1ef3,
+  0x1ef5, 0x1ef5,
+  0x1ef7, 0x1ef7,
+  0x1ef9, 0x1ef9,
+  0x1f00, 0x1f07,
+  0x1f10, 0x1f15,
+  0x1f20, 0x1f27,
+  0x1f30, 0x1f37,
+  0x1f40, 0x1f45,
+  0x1f50, 0x1f57,
+  0x1f60, 0x1f67,
+  0x1f70, 0x1f7d,
+  0x1f80, 0x1f87,
+  0x1f90, 0x1f97,
+  0x1fa0, 0x1fa7,
+  0x1fb0, 0x1fb4,
+  0x1fb6, 0x1fb7,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fc7,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fd7,
+  0x1fe0, 0x1fe7,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ff7,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x210a, 0x210a,
+  0x210e, 0x210f,
+  0x2113, 0x2113,
+  0x212f, 0x212f,
+  0x2134, 0x2134,
+  0x2139, 0x2139,
+  0x213c, 0x213d,
+  0x2146, 0x2149,
+  0x2c30, 0x2c5e,
+  0x2c81, 0x2c81,
+  0x2c83, 0x2c83,
+  0x2c85, 0x2c85,
+  0x2c87, 0x2c87,
+  0x2c89, 0x2c89,
+  0x2c8b, 0x2c8b,
+  0x2c8d, 0x2c8d,
+  0x2c8f, 0x2c8f,
+  0x2c91, 0x2c91,
+  0x2c93, 0x2c93,
+  0x2c95, 0x2c95,
+  0x2c97, 0x2c97,
+  0x2c99, 0x2c99,
+  0x2c9b, 0x2c9b,
+  0x2c9d, 0x2c9d,
+  0x2c9f, 0x2c9f,
+  0x2ca1, 0x2ca1,
+  0x2ca3, 0x2ca3,
+  0x2ca5, 0x2ca5,
+  0x2ca7, 0x2ca7,
+  0x2ca9, 0x2ca9,
+  0x2cab, 0x2cab,
+  0x2cad, 0x2cad,
+  0x2caf, 0x2caf,
+  0x2cb1, 0x2cb1,
+  0x2cb3, 0x2cb3,
+  0x2cb5, 0x2cb5,
+  0x2cb7, 0x2cb7,
+  0x2cb9, 0x2cb9,
+  0x2cbb, 0x2cbb,
+  0x2cbd, 0x2cbd,
+  0x2cbf, 0x2cbf,
+  0x2cc1, 0x2cc1,
+  0x2cc3, 0x2cc3,
+  0x2cc5, 0x2cc5,
+  0x2cc7, 0x2cc7,
+  0x2cc9, 0x2cc9,
+  0x2ccb, 0x2ccb,
+  0x2ccd, 0x2ccd,
+  0x2ccf, 0x2ccf,
+  0x2cd1, 0x2cd1,
+  0x2cd3, 0x2cd3,
+  0x2cd5, 0x2cd5,
+  0x2cd7, 0x2cd7,
+  0x2cd9, 0x2cd9,
+  0x2cdb, 0x2cdb,
+  0x2cdd, 0x2cdd,
+  0x2cdf, 0x2cdf,
+  0x2ce1, 0x2ce1,
+  0x2ce3, 0x2ce4,
+  0x2d00, 0x2d25,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xff41, 0xff5a,
+  0x10428, 0x1044f,
+  0x1d41a, 0x1d433,
+  0x1d44e, 0x1d454,
+  0x1d456, 0x1d467,
+  0x1d482, 0x1d49b,
+  0x1d4b6, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d4cf,
+  0x1d4ea, 0x1d503,
+  0x1d51e, 0x1d537,
+  0x1d552, 0x1d56b,
+  0x1d586, 0x1d59f,
+  0x1d5ba, 0x1d5d3,
+  0x1d5ee, 0x1d607,
+  0x1d622, 0x1d63b,
+  0x1d656, 0x1d66f,
+  0x1d68a, 0x1d6a5,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6e1,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d71b,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d755,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d78f,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9
+}; /* CR_Lower */
+
+/* 'Print': [[:Print:]] */
+static const OnigCodePoint CR_Print[] = {
+  423,
+  0x0009, 0x000d,
+  0x0020, 0x007e,
+  0x0085, 0x0085,
+  0x00a0, 0x0241,
+  0x0250, 0x036f,
+  0x0374, 0x0375,
+  0x037a, 0x037a,
+  0x037e, 0x037e,
+  0x0384, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x055f,
+  0x0561, 0x0587,
+  0x0589, 0x058a,
+  0x0591, 0x05b9,
+  0x05bb, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f4,
+  0x0600, 0x0603,
+  0x060b, 0x0615,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x0660, 0x070d,
+  0x070f, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0970,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09fa,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0af1, 0x0af1,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bfa,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df4,
+  0x0e01, 0x0e3a,
+  0x0e3f, 0x0e5b,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fbe, 0x0fcc,
+  0x0fcf, 0x0fd1,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x137c,
+  0x1380, 0x1399,
+  0x13a0, 0x13f4,
+  0x1401, 0x1676,
+  0x1680, 0x169c,
+  0x16a0, 0x16f0,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1736,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17dd,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x1800, 0x180e,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1940, 0x1940,
+  0x1944, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x19de, 0x1a1b,
+  0x1a1e, 0x1a1f,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fc4,
+  0x1fc6, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fdd, 0x1fef,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffe,
+  0x2000, 0x2063,
+  0x206a, 0x2071,
+  0x2074, 0x208e,
+  0x2090, 0x2094,
+  0x20a0, 0x20b5,
+  0x20d0, 0x20eb,
+  0x2100, 0x214c,
+  0x2153, 0x2183,
+  0x2190, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x2460, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x27c0, 0x27c6,
+  0x27d0, 0x27eb,
+  0x27f0, 0x2b13,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2cea,
+  0x2cf9, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x2ff0, 0x2ffb,
+  0x3000, 0x303f,
+  0x3041, 0x3096,
+  0x3099, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x3190, 0x31b7,
+  0x31c0, 0x31cf,
+  0x31f0, 0x321e,
+  0x3220, 0x3243,
+  0x3250, 0x32fe,
+  0x3300, 0x4db5,
+  0x4dc0, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa490, 0xa4c6,
+  0xa700, 0xa716,
+  0xa800, 0xa82b,
+  0xac00, 0xd7a3,
+  0xe000, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3f,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfd,
+  0xfe00, 0xfe19,
+  0xfe20, 0xfe23,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe66,
+  0xfe68, 0xfe6b,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xfeff, 0xfeff,
+  0xff01, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0xffe0, 0xffe6,
+  0xffe8, 0xffee,
+  0xfff9, 0xfffd,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10100, 0x10102,
+  0x10107, 0x10133,
+  0x10137, 0x1018a,
+  0x10300, 0x1031e,
+  0x10320, 0x10323,
+  0x10330, 0x1034a,
+  0x10380, 0x1039d,
+  0x1039f, 0x103c3,
+  0x103c8, 0x103d5,
+  0x10400, 0x1049d,
+  0x104a0, 0x104a9,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a47,
+  0x10a50, 0x10a58,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d1dd,
+  0x1d200, 0x1d245,
+  0x1d300, 0x1d356,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f,
+  0xe0100, 0xe01ef,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Print */
+
+/* 'Punct': [[:Punct:]] */
+static const OnigCodePoint CR_Punct[] = {
+  96,
+  0x0021, 0x0023,
+  0x0025, 0x002a,
+  0x002c, 0x002f,
+  0x003a, 0x003b,
+  0x003f, 0x0040,
+  0x005b, 0x005d,
+  0x005f, 0x005f,
+  0x007b, 0x007b,
+  0x007d, 0x007d,
+  0x00a1, 0x00a1,
+  0x00ab, 0x00ab,
+  0x00b7, 0x00b7,
+  0x00bb, 0x00bb,
+  0x00bf, 0x00bf,
+  0x037e, 0x037e,
+  0x0387, 0x0387,
+  0x055a, 0x055f,
+  0x0589, 0x058a,
+  0x05be, 0x05be,
+  0x05c0, 0x05c0,
+  0x05c3, 0x05c3,
+  0x05c6, 0x05c6,
+  0x05f3, 0x05f4,
+  0x060c, 0x060d,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x066a, 0x066d,
+  0x06d4, 0x06d4,
+  0x0700, 0x070d,
+  0x0964, 0x0965,
+  0x0970, 0x0970,
+  0x0df4, 0x0df4,
+  0x0e4f, 0x0e4f,
+  0x0e5a, 0x0e5b,
+  0x0f04, 0x0f12,
+  0x0f3a, 0x0f3d,
+  0x0f85, 0x0f85,
+  0x0fd0, 0x0fd1,
+  0x104a, 0x104f,
+  0x10fb, 0x10fb,
+  0x1361, 0x1368,
+  0x166d, 0x166e,
+  0x169b, 0x169c,
+  0x16eb, 0x16ed,
+  0x1735, 0x1736,
+  0x17d4, 0x17d6,
+  0x17d8, 0x17da,
+  0x1800, 0x180a,
+  0x1944, 0x1945,
+  0x19de, 0x19df,
+  0x1a1e, 0x1a1f,
+  0x2010, 0x2027,
+  0x2030, 0x2043,
+  0x2045, 0x2051,
+  0x2053, 0x205e,
+  0x207d, 0x207e,
+  0x208d, 0x208e,
+  0x2329, 0x232a,
+  0x23b4, 0x23b6,
+  0x2768, 0x2775,
+  0x27c5, 0x27c6,
+  0x27e6, 0x27eb,
+  0x2983, 0x2998,
+  0x29d8, 0x29db,
+  0x29fc, 0x29fd,
+  0x2cf9, 0x2cfc,
+  0x2cfe, 0x2cff,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x3001, 0x3003,
+  0x3008, 0x3011,
+  0x3014, 0x301f,
+  0x3030, 0x3030,
+  0x303d, 0x303d,
+  0x30a0, 0x30a0,
+  0x30fb, 0x30fb,
+  0xfd3e, 0xfd3f,
+  0xfe10, 0xfe19,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe61,
+  0xfe63, 0xfe63,
+  0xfe68, 0xfe68,
+  0xfe6a, 0xfe6b,
+  0xff01, 0xff03,
+  0xff05, 0xff0a,
+  0xff0c, 0xff0f,
+  0xff1a, 0xff1b,
+  0xff1f, 0xff20,
+  0xff3b, 0xff3d,
+  0xff3f, 0xff3f,
+  0xff5b, 0xff5b,
+  0xff5d, 0xff5d,
+  0xff5f, 0xff65,
+  0x10100, 0x10101,
+  0x1039f, 0x1039f,
+  0x10a50, 0x10a58
+}; /* CR_Punct */
+
+/* 'Space': [[:Space:]] */
+static const OnigCodePoint CR_Space[] = {
+  11,
+  0x0009, 0x000d,
+  0x0020, 0x0020,
+  0x0085, 0x0085,
+  0x00a0, 0x00a0,
+  0x1680, 0x1680,
+  0x180e, 0x180e,
+  0x2000, 0x200a,
+  0x2028, 0x2029,
+  0x202f, 0x202f,
+  0x205f, 0x205f,
+  0x3000, 0x3000
+}; /* CR_Space */
+
+/* 'Upper': [[:Upper:]] */
+static const OnigCodePoint CR_Upper[] = {
+  476,
+  0x0041, 0x005a,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00de,
+  0x0100, 0x0100,
+  0x0102, 0x0102,
+  0x0104, 0x0104,
+  0x0106, 0x0106,
+  0x0108, 0x0108,
+  0x010a, 0x010a,
+  0x010c, 0x010c,
+  0x010e, 0x010e,
+  0x0110, 0x0110,
+  0x0112, 0x0112,
+  0x0114, 0x0114,
+  0x0116, 0x0116,
+  0x0118, 0x0118,
+  0x011a, 0x011a,
+  0x011c, 0x011c,
+  0x011e, 0x011e,
+  0x0120, 0x0120,
+  0x0122, 0x0122,
+  0x0124, 0x0124,
+  0x0126, 0x0126,
+  0x0128, 0x0128,
+  0x012a, 0x012a,
+  0x012c, 0x012c,
+  0x012e, 0x012e,
+  0x0130, 0x0130,
+  0x0132, 0x0132,
+  0x0134, 0x0134,
+  0x0136, 0x0136,
+  0x0139, 0x0139,
+  0x013b, 0x013b,
+  0x013d, 0x013d,
+  0x013f, 0x013f,
+  0x0141, 0x0141,
+  0x0143, 0x0143,
+  0x0145, 0x0145,
+  0x0147, 0x0147,
+  0x014a, 0x014a,
+  0x014c, 0x014c,
+  0x014e, 0x014e,
+  0x0150, 0x0150,
+  0x0152, 0x0152,
+  0x0154, 0x0154,
+  0x0156, 0x0156,
+  0x0158, 0x0158,
+  0x015a, 0x015a,
+  0x015c, 0x015c,
+  0x015e, 0x015e,
+  0x0160, 0x0160,
+  0x0162, 0x0162,
+  0x0164, 0x0164,
+  0x0166, 0x0166,
+  0x0168, 0x0168,
+  0x016a, 0x016a,
+  0x016c, 0x016c,
+  0x016e, 0x016e,
+  0x0170, 0x0170,
+  0x0172, 0x0172,
+  0x0174, 0x0174,
+  0x0176, 0x0176,
+  0x0178, 0x0179,
+  0x017b, 0x017b,
+  0x017d, 0x017d,
+  0x0181, 0x0182,
+  0x0184, 0x0184,
+  0x0186, 0x0187,
+  0x0189, 0x018b,
+  0x018e, 0x0191,
+  0x0193, 0x0194,
+  0x0196, 0x0198,
+  0x019c, 0x019d,
+  0x019f, 0x01a0,
+  0x01a2, 0x01a2,
+  0x01a4, 0x01a4,
+  0x01a6, 0x01a7,
+  0x01a9, 0x01a9,
+  0x01ac, 0x01ac,
+  0x01ae, 0x01af,
+  0x01b1, 0x01b3,
+  0x01b5, 0x01b5,
+  0x01b7, 0x01b8,
+  0x01bc, 0x01bc,
+  0x01c4, 0x01c4,
+  0x01c7, 0x01c7,
+  0x01ca, 0x01ca,
+  0x01cd, 0x01cd,
+  0x01cf, 0x01cf,
+  0x01d1, 0x01d1,
+  0x01d3, 0x01d3,
+  0x01d5, 0x01d5,
+  0x01d7, 0x01d7,
+  0x01d9, 0x01d9,
+  0x01db, 0x01db,
+  0x01de, 0x01de,
+  0x01e0, 0x01e0,
+  0x01e2, 0x01e2,
+  0x01e4, 0x01e4,
+  0x01e6, 0x01e6,
+  0x01e8, 0x01e8,
+  0x01ea, 0x01ea,
+  0x01ec, 0x01ec,
+  0x01ee, 0x01ee,
+  0x01f1, 0x01f1,
+  0x01f4, 0x01f4,
+  0x01f6, 0x01f8,
+  0x01fa, 0x01fa,
+  0x01fc, 0x01fc,
+  0x01fe, 0x01fe,
+  0x0200, 0x0200,
+  0x0202, 0x0202,
+  0x0204, 0x0204,
+  0x0206, 0x0206,
+  0x0208, 0x0208,
+  0x020a, 0x020a,
+  0x020c, 0x020c,
+  0x020e, 0x020e,
+  0x0210, 0x0210,
+  0x0212, 0x0212,
+  0x0214, 0x0214,
+  0x0216, 0x0216,
+  0x0218, 0x0218,
+  0x021a, 0x021a,
+  0x021c, 0x021c,
+  0x021e, 0x021e,
+  0x0220, 0x0220,
+  0x0222, 0x0222,
+  0x0224, 0x0224,
+  0x0226, 0x0226,
+  0x0228, 0x0228,
+  0x022a, 0x022a,
+  0x022c, 0x022c,
+  0x022e, 0x022e,
+  0x0230, 0x0230,
+  0x0232, 0x0232,
+  0x023a, 0x023b,
+  0x023d, 0x023e,
+  0x0241, 0x0241,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x038f,
+  0x0391, 0x03a1,
+  0x03a3, 0x03ab,
+  0x03d2, 0x03d4,
+  0x03d8, 0x03d8,
+  0x03da, 0x03da,
+  0x03dc, 0x03dc,
+  0x03de, 0x03de,
+  0x03e0, 0x03e0,
+  0x03e2, 0x03e2,
+  0x03e4, 0x03e4,
+  0x03e6, 0x03e6,
+  0x03e8, 0x03e8,
+  0x03ea, 0x03ea,
+  0x03ec, 0x03ec,
+  0x03ee, 0x03ee,
+  0x03f4, 0x03f4,
+  0x03f7, 0x03f7,
+  0x03f9, 0x03fa,
+  0x03fd, 0x042f,
+  0x0460, 0x0460,
+  0x0462, 0x0462,
+  0x0464, 0x0464,
+  0x0466, 0x0466,
+  0x0468, 0x0468,
+  0x046a, 0x046a,
+  0x046c, 0x046c,
+  0x046e, 0x046e,
+  0x0470, 0x0470,
+  0x0472, 0x0472,
+  0x0474, 0x0474,
+  0x0476, 0x0476,
+  0x0478, 0x0478,
+  0x047a, 0x047a,
+  0x047c, 0x047c,
+  0x047e, 0x047e,
+  0x0480, 0x0480,
+  0x048a, 0x048a,
+  0x048c, 0x048c,
+  0x048e, 0x048e,
+  0x0490, 0x0490,
+  0x0492, 0x0492,
+  0x0494, 0x0494,
+  0x0496, 0x0496,
+  0x0498, 0x0498,
+  0x049a, 0x049a,
+  0x049c, 0x049c,
+  0x049e, 0x049e,
+  0x04a0, 0x04a0,
+  0x04a2, 0x04a2,
+  0x04a4, 0x04a4,
+  0x04a6, 0x04a6,
+  0x04a8, 0x04a8,
+  0x04aa, 0x04aa,
+  0x04ac, 0x04ac,
+  0x04ae, 0x04ae,
+  0x04b0, 0x04b0,
+  0x04b2, 0x04b2,
+  0x04b4, 0x04b4,
+  0x04b6, 0x04b6,
+  0x04b8, 0x04b8,
+  0x04ba, 0x04ba,
+  0x04bc, 0x04bc,
+  0x04be, 0x04be,
+  0x04c0, 0x04c1,
+  0x04c3, 0x04c3,
+  0x04c5, 0x04c5,
+  0x04c7, 0x04c7,
+  0x04c9, 0x04c9,
+  0x04cb, 0x04cb,
+  0x04cd, 0x04cd,
+  0x04d0, 0x04d0,
+  0x04d2, 0x04d2,
+  0x04d4, 0x04d4,
+  0x04d6, 0x04d6,
+  0x04d8, 0x04d8,
+  0x04da, 0x04da,
+  0x04dc, 0x04dc,
+  0x04de, 0x04de,
+  0x04e0, 0x04e0,
+  0x04e2, 0x04e2,
+  0x04e4, 0x04e4,
+  0x04e6, 0x04e6,
+  0x04e8, 0x04e8,
+  0x04ea, 0x04ea,
+  0x04ec, 0x04ec,
+  0x04ee, 0x04ee,
+  0x04f0, 0x04f0,
+  0x04f2, 0x04f2,
+  0x04f4, 0x04f4,
+  0x04f6, 0x04f6,
+  0x04f8, 0x04f8,
+  0x0500, 0x0500,
+  0x0502, 0x0502,
+  0x0504, 0x0504,
+  0x0506, 0x0506,
+  0x0508, 0x0508,
+  0x050a, 0x050a,
+  0x050c, 0x050c,
+  0x050e, 0x050e,
+  0x0531, 0x0556,
+  0x10a0, 0x10c5,
+  0x1e00, 0x1e00,
+  0x1e02, 0x1e02,
+  0x1e04, 0x1e04,
+  0x1e06, 0x1e06,
+  0x1e08, 0x1e08,
+  0x1e0a, 0x1e0a,
+  0x1e0c, 0x1e0c,
+  0x1e0e, 0x1e0e,
+  0x1e10, 0x1e10,
+  0x1e12, 0x1e12,
+  0x1e14, 0x1e14,
+  0x1e16, 0x1e16,
+  0x1e18, 0x1e18,
+  0x1e1a, 0x1e1a,
+  0x1e1c, 0x1e1c,
+  0x1e1e, 0x1e1e,
+  0x1e20, 0x1e20,
+  0x1e22, 0x1e22,
+  0x1e24, 0x1e24,
+  0x1e26, 0x1e26,
+  0x1e28, 0x1e28,
+  0x1e2a, 0x1e2a,
+  0x1e2c, 0x1e2c,
+  0x1e2e, 0x1e2e,
+  0x1e30, 0x1e30,
+  0x1e32, 0x1e32,
+  0x1e34, 0x1e34,
+  0x1e36, 0x1e36,
+  0x1e38, 0x1e38,
+  0x1e3a, 0x1e3a,
+  0x1e3c, 0x1e3c,
+  0x1e3e, 0x1e3e,
+  0x1e40, 0x1e40,
+  0x1e42, 0x1e42,
+  0x1e44, 0x1e44,
+  0x1e46, 0x1e46,
+  0x1e48, 0x1e48,
+  0x1e4a, 0x1e4a,
+  0x1e4c, 0x1e4c,
+  0x1e4e, 0x1e4e,
+  0x1e50, 0x1e50,
+  0x1e52, 0x1e52,
+  0x1e54, 0x1e54,
+  0x1e56, 0x1e56,
+  0x1e58, 0x1e58,
+  0x1e5a, 0x1e5a,
+  0x1e5c, 0x1e5c,
+  0x1e5e, 0x1e5e,
+  0x1e60, 0x1e60,
+  0x1e62, 0x1e62,
+  0x1e64, 0x1e64,
+  0x1e66, 0x1e66,
+  0x1e68, 0x1e68,
+  0x1e6a, 0x1e6a,
+  0x1e6c, 0x1e6c,
+  0x1e6e, 0x1e6e,
+  0x1e70, 0x1e70,
+  0x1e72, 0x1e72,
+  0x1e74, 0x1e74,
+  0x1e76, 0x1e76,
+  0x1e78, 0x1e78,
+  0x1e7a, 0x1e7a,
+  0x1e7c, 0x1e7c,
+  0x1e7e, 0x1e7e,
+  0x1e80, 0x1e80,
+  0x1e82, 0x1e82,
+  0x1e84, 0x1e84,
+  0x1e86, 0x1e86,
+  0x1e88, 0x1e88,
+  0x1e8a, 0x1e8a,
+  0x1e8c, 0x1e8c,
+  0x1e8e, 0x1e8e,
+  0x1e90, 0x1e90,
+  0x1e92, 0x1e92,
+  0x1e94, 0x1e94,
+  0x1ea0, 0x1ea0,
+  0x1ea2, 0x1ea2,
+  0x1ea4, 0x1ea4,
+  0x1ea6, 0x1ea6,
+  0x1ea8, 0x1ea8,
+  0x1eaa, 0x1eaa,
+  0x1eac, 0x1eac,
+  0x1eae, 0x1eae,
+  0x1eb0, 0x1eb0,
+  0x1eb2, 0x1eb2,
+  0x1eb4, 0x1eb4,
+  0x1eb6, 0x1eb6,
+  0x1eb8, 0x1eb8,
+  0x1eba, 0x1eba,
+  0x1ebc, 0x1ebc,
+  0x1ebe, 0x1ebe,
+  0x1ec0, 0x1ec0,
+  0x1ec2, 0x1ec2,
+  0x1ec4, 0x1ec4,
+  0x1ec6, 0x1ec6,
+  0x1ec8, 0x1ec8,
+  0x1eca, 0x1eca,
+  0x1ecc, 0x1ecc,
+  0x1ece, 0x1ece,
+  0x1ed0, 0x1ed0,
+  0x1ed2, 0x1ed2,
+  0x1ed4, 0x1ed4,
+  0x1ed6, 0x1ed6,
+  0x1ed8, 0x1ed8,
+  0x1eda, 0x1eda,
+  0x1edc, 0x1edc,
+  0x1ede, 0x1ede,
+  0x1ee0, 0x1ee0,
+  0x1ee2, 0x1ee2,
+  0x1ee4, 0x1ee4,
+  0x1ee6, 0x1ee6,
+  0x1ee8, 0x1ee8,
+  0x1eea, 0x1eea,
+  0x1eec, 0x1eec,
+  0x1eee, 0x1eee,
+  0x1ef0, 0x1ef0,
+  0x1ef2, 0x1ef2,
+  0x1ef4, 0x1ef4,
+  0x1ef6, 0x1ef6,
+  0x1ef8, 0x1ef8,
+  0x1f08, 0x1f0f,
+  0x1f18, 0x1f1d,
+  0x1f28, 0x1f2f,
+  0x1f38, 0x1f3f,
+  0x1f48, 0x1f4d,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f5f,
+  0x1f68, 0x1f6f,
+  0x1fb8, 0x1fbb,
+  0x1fc8, 0x1fcb,
+  0x1fd8, 0x1fdb,
+  0x1fe8, 0x1fec,
+  0x1ff8, 0x1ffb,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210b, 0x210d,
+  0x2110, 0x2112,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x2130, 0x2131,
+  0x2133, 0x2133,
+  0x213e, 0x213f,
+  0x2145, 0x2145,
+  0x2c00, 0x2c2e,
+  0x2c80, 0x2c80,
+  0x2c82, 0x2c82,
+  0x2c84, 0x2c84,
+  0x2c86, 0x2c86,
+  0x2c88, 0x2c88,
+  0x2c8a, 0x2c8a,
+  0x2c8c, 0x2c8c,
+  0x2c8e, 0x2c8e,
+  0x2c90, 0x2c90,
+  0x2c92, 0x2c92,
+  0x2c94, 0x2c94,
+  0x2c96, 0x2c96,
+  0x2c98, 0x2c98,
+  0x2c9a, 0x2c9a,
+  0x2c9c, 0x2c9c,
+  0x2c9e, 0x2c9e,
+  0x2ca0, 0x2ca0,
+  0x2ca2, 0x2ca2,
+  0x2ca4, 0x2ca4,
+  0x2ca6, 0x2ca6,
+  0x2ca8, 0x2ca8,
+  0x2caa, 0x2caa,
+  0x2cac, 0x2cac,
+  0x2cae, 0x2cae,
+  0x2cb0, 0x2cb0,
+  0x2cb2, 0x2cb2,
+  0x2cb4, 0x2cb4,
+  0x2cb6, 0x2cb6,
+  0x2cb8, 0x2cb8,
+  0x2cba, 0x2cba,
+  0x2cbc, 0x2cbc,
+  0x2cbe, 0x2cbe,
+  0x2cc0, 0x2cc0,
+  0x2cc2, 0x2cc2,
+  0x2cc4, 0x2cc4,
+  0x2cc6, 0x2cc6,
+  0x2cc8, 0x2cc8,
+  0x2cca, 0x2cca,
+  0x2ccc, 0x2ccc,
+  0x2cce, 0x2cce,
+  0x2cd0, 0x2cd0,
+  0x2cd2, 0x2cd2,
+  0x2cd4, 0x2cd4,
+  0x2cd6, 0x2cd6,
+  0x2cd8, 0x2cd8,
+  0x2cda, 0x2cda,
+  0x2cdc, 0x2cdc,
+  0x2cde, 0x2cde,
+  0x2ce0, 0x2ce0,
+  0x2ce2, 0x2ce2,
+  0xff21, 0xff3a,
+  0x10400, 0x10427,
+  0x1d400, 0x1d419,
+  0x1d434, 0x1d44d,
+  0x1d468, 0x1d481,
+  0x1d49c, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b5,
+  0x1d4d0, 0x1d4e9,
+  0x1d504, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d538, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d56c, 0x1d585,
+  0x1d5a0, 0x1d5b9,
+  0x1d5d4, 0x1d5ed,
+  0x1d608, 0x1d621,
+  0x1d63c, 0x1d655,
+  0x1d670, 0x1d689,
+  0x1d6a8, 0x1d6c0,
+  0x1d6e2, 0x1d6fa,
+  0x1d71c, 0x1d734,
+  0x1d756, 0x1d76e,
+  0x1d790, 0x1d7a8
+}; /* CR_Upper */
+
+/* 'XDigit': [[:XDigit:]] */
+static const OnigCodePoint CR_XDigit[] = {
+  3,
+  0x0030, 0x0039,
+  0x0041, 0x0046,
+  0x0061, 0x0066
+}; /* CR_XDigit */
+
+/* 'Word': [[:Word:]] */
+static const OnigCodePoint CR_Word[] = {
+  464,
+  0x0030, 0x0039,
+  0x0041, 0x005a,
+  0x005f, 0x005f,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b2, 0x00b3,
+  0x00b5, 0x00b5,
+  0x00b9, 0x00ba,
+  0x00bc, 0x00be,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00f6,
+  0x00f8, 0x0241,
+  0x0250, 0x02c1,
+  0x02c6, 0x02d1,
+  0x02e0, 0x02e4,
+  0x02ee, 0x02ee,
+  0x0300, 0x036f,
+  0x037a, 0x037a,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x03f5,
+  0x03f7, 0x0481,
+  0x0483, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x0559,
+  0x0561, 0x0587,
+  0x0591, 0x05b9,
+  0x05bb, 0x05bd,
+  0x05bf, 0x05bf,
+  0x05c1, 0x05c2,
+  0x05c4, 0x05c5,
+  0x05c7, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f2,
+  0x0610, 0x0615,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x0660, 0x0669,
+  0x066e, 0x06d3,
+  0x06d5, 0x06dc,
+  0x06de, 0x06e8,
+  0x06ea, 0x06fc,
+  0x06ff, 0x06ff,
+  0x0710, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0963,
+  0x0966, 0x096f,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09f1,
+  0x09f4, 0x09f9,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b6f,
+  0x0b71, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bf2,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df3,
+  0x0e01, 0x0e3a,
+  0x0e40, 0x0e4e,
+  0x0e50, 0x0e59,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f00,
+  0x0f18, 0x0f19,
+  0x0f20, 0x0f33,
+  0x0f35, 0x0f35,
+  0x0f37, 0x0f37,
+  0x0f39, 0x0f39,
+  0x0f3e, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f84,
+  0x0f86, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fc6, 0x0fc6,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1049,
+  0x1050, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fa,
+  0x10fc, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x135f,
+  0x1369, 0x137c,
+  0x1380, 0x138f,
+  0x13a0, 0x13f4,
+  0x1401, 0x166c,
+  0x166f, 0x1676,
+  0x1681, 0x169a,
+  0x16a0, 0x16ea,
+  0x16ee, 0x16f0,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1734,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17b3,
+  0x17b6, 0x17d3,
+  0x17d7, 0x17d7,
+  0x17dc, 0x17dd,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x180b, 0x180d,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1946, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x1a00, 0x1a1b,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fbc,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fcc,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fe0, 0x1fec,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffc,
+  0x203f, 0x2040,
+  0x2054, 0x2054,
+  0x2070, 0x2071,
+  0x2074, 0x2079,
+  0x207f, 0x2089,
+  0x2090, 0x2094,
+  0x20d0, 0x20eb,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210a, 0x2113,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x212f, 0x2131,
+  0x2133, 0x2139,
+  0x213c, 0x213f,
+  0x2145, 0x2149,
+  0x2153, 0x2183,
+  0x2460, 0x249b,
+  0x24ea, 0x24ff,
+  0x2776, 0x2793,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2ce4,
+  0x2cfd, 0x2cfd,
+  0x2d00, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x3005, 0x3007,
+  0x3021, 0x302f,
+  0x3031, 0x3035,
+  0x3038, 0x303c,
+  0x3041, 0x3096,
+  0x3099, 0x309a,
+  0x309d, 0x309f,
+  0x30a1, 0x30fa,
+  0x30fc, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x3192, 0x3195,
+  0x31a0, 0x31b7,
+  0x31f0, 0x31ff,
+  0x3220, 0x3229,
+  0x3251, 0x325f,
+  0x3280, 0x3289,
+  0x32b1, 0x32bf,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa800, 0xa827,
+  0xac00, 0xd7a3,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb28,
+  0xfb2a, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfb,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0xfe33, 0xfe34,
+  0xfe4d, 0xfe4f,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xff10, 0xff19,
+  0xff21, 0xff3a,
+  0xff3f, 0xff3f,
+  0xff41, 0xff5a,
+  0xff66, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10107, 0x10133,
+  0x10140, 0x10178,
+  0x1018a, 0x1018a,
+  0x10300, 0x1031e,
+  0x10320, 0x10323,
+  0x10330, 0x1034a,
+  0x10380, 0x1039d,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103cf,
+  0x103d1, 0x103d5,
+  0x10400, 0x1049d,
+  0x104a0, 0x104a9,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a47,
+  0x1d165, 0x1d169,
+  0x1d16d, 0x1d172,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0x1d242, 0x1d244,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d6c0,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6fa,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d734,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d76e,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d7a8,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0100, 0xe01ef
+}; /* CR_Word */
+
+/* 'Alnum': [[:Alnum:]] */
+static const OnigCodePoint CR_Alnum[] = {
+  436,
+  0x0030, 0x0039,
+  0x0041, 0x005a,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b5, 0x00b5,
+  0x00ba, 0x00ba,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00f6,
+  0x00f8, 0x0241,
+  0x0250, 0x02c1,
+  0x02c6, 0x02d1,
+  0x02e0, 0x02e4,
+  0x02ee, 0x02ee,
+  0x0300, 0x036f,
+  0x037a, 0x037a,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x03f5,
+  0x03f7, 0x0481,
+  0x0483, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x0559,
+  0x0561, 0x0587,
+  0x0591, 0x05b9,
+  0x05bb, 0x05bd,
+  0x05bf, 0x05bf,
+  0x05c1, 0x05c2,
+  0x05c4, 0x05c5,
+  0x05c7, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f2,
+  0x0610, 0x0615,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x0660, 0x0669,
+  0x066e, 0x06d3,
+  0x06d5, 0x06dc,
+  0x06de, 0x06e8,
+  0x06ea, 0x06fc,
+  0x06ff, 0x06ff,
+  0x0710, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0963,
+  0x0966, 0x096f,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09f1,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b6f,
+  0x0b71, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bef,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df3,
+  0x0e01, 0x0e3a,
+  0x0e40, 0x0e4e,
+  0x0e50, 0x0e59,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f00,
+  0x0f18, 0x0f19,
+  0x0f20, 0x0f29,
+  0x0f35, 0x0f35,
+  0x0f37, 0x0f37,
+  0x0f39, 0x0f39,
+  0x0f3e, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f84,
+  0x0f86, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fc6, 0x0fc6,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1049,
+  0x1050, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fa,
+  0x10fc, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x135f,
+  0x1380, 0x138f,
+  0x13a0, 0x13f4,
+  0x1401, 0x166c,
+  0x166f, 0x1676,
+  0x1681, 0x169a,
+  0x16a0, 0x16ea,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1734,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17b3,
+  0x17b6, 0x17d3,
+  0x17d7, 0x17d7,
+  0x17dc, 0x17dd,
+  0x17e0, 0x17e9,
+  0x180b, 0x180d,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1946, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x1a00, 0x1a1b,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fbc,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fcc,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fe0, 0x1fec,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffc,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x2090, 0x2094,
+  0x20d0, 0x20eb,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210a, 0x2113,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x212f, 0x2131,
+  0x2133, 0x2139,
+  0x213c, 0x213f,
+  0x2145, 0x2149,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2ce4,
+  0x2d00, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x3005, 0x3006,
+  0x302a, 0x302f,
+  0x3031, 0x3035,
+  0x303b, 0x303c,
+  0x3041, 0x3096,
+  0x3099, 0x309a,
+  0x309d, 0x309f,
+  0x30a1, 0x30fa,
+  0x30fc, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x31a0, 0x31b7,
+  0x31f0, 0x31ff,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa800, 0xa827,
+  0xac00, 0xd7a3,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb28,
+  0xfb2a, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfb,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xff10, 0xff19,
+  0xff21, 0xff3a,
+  0xff41, 0xff5a,
+  0xff66, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10300, 0x1031e,
+  0x10330, 0x10349,
+  0x10380, 0x1039d,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103cf,
+  0x10400, 0x1049d,
+  0x104a0, 0x104a9,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a3f,
+  0x1d165, 0x1d169,
+  0x1d16d, 0x1d172,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0x1d242, 0x1d244,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d6c0,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6fa,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d734,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d76e,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d7a8,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0100, 0xe01ef
+}; /* CR_Alnum */
+
+/* 'ASCII': [[:ASCII:]] */
+static const OnigCodePoint CR_ASCII[] = {
+  1,
+  0x0000, 0x007f
+}; /* CR_ASCII */
+
+#ifdef USE_UNICODE_PROPERTIES
+
+/* 'Any': - */
+static const OnigCodePoint CR_Any[] = {
+  1,
+  0x0000, 0x10ffff
+}; /* CR_Any */
+
+/* 'Assigned': - */
+static const OnigCodePoint CR_Assigned[] = {
+  420,
+  0x0000, 0x0241,
+  0x0250, 0x036f,
+  0x0374, 0x0375,
+  0x037a, 0x037a,
+  0x037e, 0x037e,
+  0x0384, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x055f,
+  0x0561, 0x0587,
+  0x0589, 0x058a,
+  0x0591, 0x05b9,
+  0x05bb, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f4,
+  0x0600, 0x0603,
+  0x060b, 0x0615,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x0621, 0x063a,
+  0x0640, 0x065e,
+  0x0660, 0x070d,
+  0x070f, 0x074a,
+  0x074d, 0x076d,
+  0x0780, 0x07b1,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0970,
+  0x097d, 0x097d,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09fa,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0af1, 0x0af1,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b71,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bfa,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df4,
+  0x0e01, 0x0e3a,
+  0x0e3f, 0x0e5b,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fbe, 0x0fcc,
+  0x0fcf, 0x0fd1,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1059,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x137c,
+  0x1380, 0x1399,
+  0x13a0, 0x13f4,
+  0x1401, 0x1676,
+  0x1680, 0x169c,
+  0x16a0, 0x16f0,
+  0x1700, 0x170c,
+  0x170e, 0x1714,
+  0x1720, 0x1736,
+  0x1740, 0x1753,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773,
+  0x1780, 0x17dd,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x1800, 0x180e,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1940, 0x1940,
+  0x1944, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x19de, 0x1a1b,
+  0x1a1e, 0x1a1f,
+  0x1d00, 0x1dc3,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fc4,
+  0x1fc6, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fdd, 0x1fef,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffe,
+  0x2000, 0x2063,
+  0x206a, 0x2071,
+  0x2074, 0x208e,
+  0x2090, 0x2094,
+  0x20a0, 0x20b5,
+  0x20d0, 0x20eb,
+  0x2100, 0x214c,
+  0x2153, 0x2183,
+  0x2190, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x2460, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x27c0, 0x27c6,
+  0x27d0, 0x27eb,
+  0x27f0, 0x2b13,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2cea,
+  0x2cf9, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x2ff0, 0x2ffb,
+  0x3000, 0x303f,
+  0x3041, 0x3096,
+  0x3099, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x3190, 0x31b7,
+  0x31c0, 0x31cf,
+  0x31f0, 0x321e,
+  0x3220, 0x3243,
+  0x3250, 0x32fe,
+  0x3300, 0x4db5,
+  0x4dc0, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa490, 0xa4c6,
+  0xa700, 0xa716,
+  0xa800, 0xa82b,
+  0xac00, 0xd7a3,
+  0xd800, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3f,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfd,
+  0xfe00, 0xfe19,
+  0xfe20, 0xfe23,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe66,
+  0xfe68, 0xfe6b,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xfeff, 0xfeff,
+  0xff01, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0xffe0, 0xffe6,
+  0xffe8, 0xffee,
+  0xfff9, 0xfffd,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10100, 0x10102,
+  0x10107, 0x10133,
+  0x10137, 0x1018a,
+  0x10300, 0x1031e,
+  0x10320, 0x10323,
+  0x10330, 0x1034a,
+  0x10380, 0x1039d,
+  0x1039f, 0x103c3,
+  0x103c8, 0x103d5,
+  0x10400, 0x1049d,
+  0x104a0, 0x104a9,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a47,
+  0x10a50, 0x10a58,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d1dd,
+  0x1d200, 0x1d245,
+  0x1d300, 0x1d356,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f,
+  0xe0100, 0xe01ef,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Assigned */
+
+/* 'C': Major Category */
+static const OnigCodePoint CR_C[] = {
+  422,
+  0x0000, 0x001f,
+  0x007f, 0x009f,
+  0x00ad, 0x00ad,
+  0x0242, 0x024f,
+  0x0370, 0x0373,
+  0x0376, 0x0379,
+  0x037b, 0x037d,
+  0x037f, 0x0383,
+  0x038b, 0x038b,
+  0x038d, 0x038d,
+  0x03a2, 0x03a2,
+  0x03cf, 0x03cf,
+  0x0487, 0x0487,
+  0x04cf, 0x04cf,
+  0x04fa, 0x04ff,
+  0x0510, 0x0530,
+  0x0557, 0x0558,
+  0x0560, 0x0560,
+  0x0588, 0x0588,
+  0x058b, 0x0590,
+  0x05ba, 0x05ba,
+  0x05c8, 0x05cf,
+  0x05eb, 0x05ef,
+  0x05f5, 0x060a,
+  0x0616, 0x061a,
+  0x061c, 0x061d,
+  0x0620, 0x0620,
+  0x063b, 0x063f,
+  0x065f, 0x065f,
+  0x06dd, 0x06dd,
+  0x070e, 0x070f,
+  0x074b, 0x074c,
+  0x076e, 0x077f,
+  0x07b2, 0x0900,
+  0x093a, 0x093b,
+  0x094e, 0x094f,
+  0x0955, 0x0957,
+  0x0971, 0x097c,
+  0x097e, 0x0980,
+  0x0984, 0x0984,
+  0x098d, 0x098e,
+  0x0991, 0x0992,
+  0x09a9, 0x09a9,
+  0x09b1, 0x09b1,
+  0x09b3, 0x09b5,
+  0x09ba, 0x09bb,
+  0x09c5, 0x09c6,
+  0x09c9, 0x09ca,
+  0x09cf, 0x09d6,
+  0x09d8, 0x09db,
+  0x09de, 0x09de,
+  0x09e4, 0x09e5,
+  0x09fb, 0x0a00,
+  0x0a04, 0x0a04,
+  0x0a0b, 0x0a0e,
+  0x0a11, 0x0a12,
+  0x0a29, 0x0a29,
+  0x0a31, 0x0a31,
+  0x0a34, 0x0a34,
+  0x0a37, 0x0a37,
+  0x0a3a, 0x0a3b,
+  0x0a3d, 0x0a3d,
+  0x0a43, 0x0a46,
+  0x0a49, 0x0a4a,
+  0x0a4e, 0x0a58,
+  0x0a5d, 0x0a5d,
+  0x0a5f, 0x0a65,
+  0x0a75, 0x0a80,
+  0x0a84, 0x0a84,
+  0x0a8e, 0x0a8e,
+  0x0a92, 0x0a92,
+  0x0aa9, 0x0aa9,
+  0x0ab1, 0x0ab1,
+  0x0ab4, 0x0ab4,
+  0x0aba, 0x0abb,
+  0x0ac6, 0x0ac6,
+  0x0aca, 0x0aca,
+  0x0ace, 0x0acf,
+  0x0ad1, 0x0adf,
+  0x0ae4, 0x0ae5,
+  0x0af0, 0x0af0,
+  0x0af2, 0x0b00,
+  0x0b04, 0x0b04,
+  0x0b0d, 0x0b0e,
+  0x0b11, 0x0b12,
+  0x0b29, 0x0b29,
+  0x0b31, 0x0b31,
+  0x0b34, 0x0b34,
+  0x0b3a, 0x0b3b,
+  0x0b44, 0x0b46,
+  0x0b49, 0x0b4a,
+  0x0b4e, 0x0b55,
+  0x0b58, 0x0b5b,
+  0x0b5e, 0x0b5e,
+  0x0b62, 0x0b65,
+  0x0b72, 0x0b81,
+  0x0b84, 0x0b84,
+  0x0b8b, 0x0b8d,
+  0x0b91, 0x0b91,
+  0x0b96, 0x0b98,
+  0x0b9b, 0x0b9b,
+  0x0b9d, 0x0b9d,
+  0x0ba0, 0x0ba2,
+  0x0ba5, 0x0ba7,
+  0x0bab, 0x0bad,
+  0x0bba, 0x0bbd,
+  0x0bc3, 0x0bc5,
+  0x0bc9, 0x0bc9,
+  0x0bce, 0x0bd6,
+  0x0bd8, 0x0be5,
+  0x0bfb, 0x0c00,
+  0x0c04, 0x0c04,
+  0x0c0d, 0x0c0d,
+  0x0c11, 0x0c11,
+  0x0c29, 0x0c29,
+  0x0c34, 0x0c34,
+  0x0c3a, 0x0c3d,
+  0x0c45, 0x0c45,
+  0x0c49, 0x0c49,
+  0x0c4e, 0x0c54,
+  0x0c57, 0x0c5f,
+  0x0c62, 0x0c65,
+  0x0c70, 0x0c81,
+  0x0c84, 0x0c84,
+  0x0c8d, 0x0c8d,
+  0x0c91, 0x0c91,
+  0x0ca9, 0x0ca9,
+  0x0cb4, 0x0cb4,
+  0x0cba, 0x0cbb,
+  0x0cc5, 0x0cc5,
+  0x0cc9, 0x0cc9,
+  0x0cce, 0x0cd4,
+  0x0cd7, 0x0cdd,
+  0x0cdf, 0x0cdf,
+  0x0ce2, 0x0ce5,
+  0x0cf0, 0x0d01,
+  0x0d04, 0x0d04,
+  0x0d0d, 0x0d0d,
+  0x0d11, 0x0d11,
+  0x0d29, 0x0d29,
+  0x0d3a, 0x0d3d,
+  0x0d44, 0x0d45,
+  0x0d49, 0x0d49,
+  0x0d4e, 0x0d56,
+  0x0d58, 0x0d5f,
+  0x0d62, 0x0d65,
+  0x0d70, 0x0d81,
+  0x0d84, 0x0d84,
+  0x0d97, 0x0d99,
+  0x0db2, 0x0db2,
+  0x0dbc, 0x0dbc,
+  0x0dbe, 0x0dbf,
+  0x0dc7, 0x0dc9,
+  0x0dcb, 0x0dce,
+  0x0dd5, 0x0dd5,
+  0x0dd7, 0x0dd7,
+  0x0de0, 0x0df1,
+  0x0df5, 0x0e00,
+  0x0e3b, 0x0e3e,
+  0x0e5c, 0x0e80,
+  0x0e83, 0x0e83,
+  0x0e85, 0x0e86,
+  0x0e89, 0x0e89,
+  0x0e8b, 0x0e8c,
+  0x0e8e, 0x0e93,
+  0x0e98, 0x0e98,
+  0x0ea0, 0x0ea0,
+  0x0ea4, 0x0ea4,
+  0x0ea6, 0x0ea6,
+  0x0ea8, 0x0ea9,
+  0x0eac, 0x0eac,
+  0x0eba, 0x0eba,
+  0x0ebe, 0x0ebf,
+  0x0ec5, 0x0ec5,
+  0x0ec7, 0x0ec7,
+  0x0ece, 0x0ecf,
+  0x0eda, 0x0edb,
+  0x0ede, 0x0eff,
+  0x0f48, 0x0f48,
+  0x0f6b, 0x0f70,
+  0x0f8c, 0x0f8f,
+  0x0f98, 0x0f98,
+  0x0fbd, 0x0fbd,
+  0x0fcd, 0x0fce,
+  0x0fd2, 0x0fff,
+  0x1022, 0x1022,
+  0x1028, 0x1028,
+  0x102b, 0x102b,
+  0x1033, 0x1035,
+  0x103a, 0x103f,
+  0x105a, 0x109f,
+  0x10c6, 0x10cf,
+  0x10fd, 0x10ff,
+  0x115a, 0x115e,
+  0x11a3, 0x11a7,
+  0x11fa, 0x11ff,
+  0x1249, 0x1249,
+  0x124e, 0x124f,
+  0x1257, 0x1257,
+  0x1259, 0x1259,
+  0x125e, 0x125f,
+  0x1289, 0x1289,
+  0x128e, 0x128f,
+  0x12b1, 0x12b1,
+  0x12b6, 0x12b7,
+  0x12bf, 0x12bf,
+  0x12c1, 0x12c1,
+  0x12c6, 0x12c7,
+  0x12d7, 0x12d7,
+  0x1311, 0x1311,
+  0x1316, 0x1317,
+  0x135b, 0x135e,
+  0x137d, 0x137f,
+  0x139a, 0x139f,
+  0x13f5, 0x1400,
+  0x1677, 0x167f,
+  0x169d, 0x169f,
+  0x16f1, 0x16ff,
+  0x170d, 0x170d,
+  0x1715, 0x171f,
+  0x1737, 0x173f,
+  0x1754, 0x175f,
+  0x176d, 0x176d,
+  0x1771, 0x1771,
+  0x1774, 0x177f,
+  0x17b4, 0x17b5,
+  0x17de, 0x17df,
+  0x17ea, 0x17ef,
+  0x17fa, 0x17ff,
+  0x180f, 0x180f,
+  0x181a, 0x181f,
+  0x1878, 0x187f,
+  0x18aa, 0x18ff,
+  0x191d, 0x191f,
+  0x192c, 0x192f,
+  0x193c, 0x193f,
+  0x1941, 0x1943,
+  0x196e, 0x196f,
+  0x1975, 0x197f,
+  0x19aa, 0x19af,
+  0x19ca, 0x19cf,
+  0x19da, 0x19dd,
+  0x1a1c, 0x1a1d,
+  0x1a20, 0x1cff,
+  0x1dc4, 0x1dff,
+  0x1e9c, 0x1e9f,
+  0x1efa, 0x1eff,
+  0x1f16, 0x1f17,
+  0x1f1e, 0x1f1f,
+  0x1f46, 0x1f47,
+  0x1f4e, 0x1f4f,
+  0x1f58, 0x1f58,
+  0x1f5a, 0x1f5a,
+  0x1f5c, 0x1f5c,
+  0x1f5e, 0x1f5e,
+  0x1f7e, 0x1f7f,
+  0x1fb5, 0x1fb5,
+  0x1fc5, 0x1fc5,
+  0x1fd4, 0x1fd5,
+  0x1fdc, 0x1fdc,
+  0x1ff0, 0x1ff1,
+  0x1ff5, 0x1ff5,
+  0x1fff, 0x1fff,
+  0x200b, 0x200f,
+  0x202a, 0x202e,
+  0x2060, 0x206f,
+  0x2072, 0x2073,
+  0x208f, 0x208f,
+  0x2095, 0x209f,
+  0x20b6, 0x20cf,
+  0x20ec, 0x20ff,
+  0x214d, 0x2152,
+  0x2184, 0x218f,
+  0x23dc, 0x23ff,
+  0x2427, 0x243f,
+  0x244b, 0x245f,
+  0x269d, 0x269f,
+  0x26b2, 0x2700,
+  0x2705, 0x2705,
+  0x270a, 0x270b,
+  0x2728, 0x2728,
+  0x274c, 0x274c,
+  0x274e, 0x274e,
+  0x2753, 0x2755,
+  0x2757, 0x2757,
+  0x275f, 0x2760,
+  0x2795, 0x2797,
+  0x27b0, 0x27b0,
+  0x27bf, 0x27bf,
+  0x27c7, 0x27cf,
+  0x27ec, 0x27ef,
+  0x2b14, 0x2bff,
+  0x2c2f, 0x2c2f,
+  0x2c5f, 0x2c7f,
+  0x2ceb, 0x2cf8,
+  0x2d26, 0x2d2f,
+  0x2d66, 0x2d6e,
+  0x2d70, 0x2d7f,
+  0x2d97, 0x2d9f,
+  0x2da7, 0x2da7,
+  0x2daf, 0x2daf,
+  0x2db7, 0x2db7,
+  0x2dbf, 0x2dbf,
+  0x2dc7, 0x2dc7,
+  0x2dcf, 0x2dcf,
+  0x2dd7, 0x2dd7,
+  0x2ddf, 0x2dff,
+  0x2e18, 0x2e1b,
+  0x2e1e, 0x2e7f,
+  0x2e9a, 0x2e9a,
+  0x2ef4, 0x2eff,
+  0x2fd6, 0x2fef,
+  0x2ffc, 0x2fff,
+  0x3040, 0x3040,
+  0x3097, 0x3098,
+  0x3100, 0x3104,
+  0x312d, 0x3130,
+  0x318f, 0x318f,
+  0x31b8, 0x31bf,
+  0x31d0, 0x31ef,
+  0x321f, 0x321f,
+  0x3244, 0x324f,
+  0x32ff, 0x32ff,
+  0x4db6, 0x4dbf,
+  0x9fbc, 0x9fff,
+  0xa48d, 0xa48f,
+  0xa4c7, 0xa6ff,
+  0xa717, 0xa7ff,
+  0xa82c, 0xabff,
+  0xd7a4, 0xf8ff,
+  0xfa2e, 0xfa2f,
+  0xfa6b, 0xfa6f,
+  0xfada, 0xfaff,
+  0xfb07, 0xfb12,
+  0xfb18, 0xfb1c,
+  0xfb37, 0xfb37,
+  0xfb3d, 0xfb3d,
+  0xfb3f, 0xfb3f,
+  0xfb42, 0xfb42,
+  0xfb45, 0xfb45,
+  0xfbb2, 0xfbd2,
+  0xfd40, 0xfd4f,
+  0xfd90, 0xfd91,
+  0xfdc8, 0xfdef,
+  0xfdfe, 0xfdff,
+  0xfe1a, 0xfe1f,
+  0xfe24, 0xfe2f,
+  0xfe53, 0xfe53,
+  0xfe67, 0xfe67,
+  0xfe6c, 0xfe6f,
+  0xfe75, 0xfe75,
+  0xfefd, 0xff00,
+  0xffbf, 0xffc1,
+  0xffc8, 0xffc9,
+  0xffd0, 0xffd1,
+  0xffd8, 0xffd9,
+  0xffdd, 0xffdf,
+  0xffe7, 0xffe7,
+  0xffef, 0xfffb,
+  0xfffe, 0xffff,
+  0x1000c, 0x1000c,
+  0x10027, 0x10027,
+  0x1003b, 0x1003b,
+  0x1003e, 0x1003e,
+  0x1004e, 0x1004f,
+  0x1005e, 0x1007f,
+  0x100fb, 0x100ff,
+  0x10103, 0x10106,
+  0x10134, 0x10136,
+  0x1018b, 0x102ff,
+  0x1031f, 0x1031f,
+  0x10324, 0x1032f,
+  0x1034b, 0x1037f,
+  0x1039e, 0x1039e,
+  0x103c4, 0x103c7,
+  0x103d6, 0x103ff,
+  0x1049e, 0x1049f,
+  0x104aa, 0x107ff,
+  0x10806, 0x10807,
+  0x10809, 0x10809,
+  0x10836, 0x10836,
+  0x10839, 0x1083b,
+  0x1083d, 0x1083e,
+  0x10840, 0x109ff,
+  0x10a04, 0x10a04,
+  0x10a07, 0x10a0b,
+  0x10a14, 0x10a14,
+  0x10a18, 0x10a18,
+  0x10a34, 0x10a37,
+  0x10a3b, 0x10a3e,
+  0x10a48, 0x10a4f,
+  0x10a59, 0x1cfff,
+  0x1d0f6, 0x1d0ff,
+  0x1d127, 0x1d129,
+  0x1d173, 0x1d17a,
+  0x1d1de, 0x1d1ff,
+  0x1d246, 0x1d2ff,
+  0x1d357, 0x1d3ff,
+  0x1d455, 0x1d455,
+  0x1d49d, 0x1d49d,
+  0x1d4a0, 0x1d4a1,
+  0x1d4a3, 0x1d4a4,
+  0x1d4a7, 0x1d4a8,
+  0x1d4ad, 0x1d4ad,
+  0x1d4ba, 0x1d4ba,
+  0x1d4bc, 0x1d4bc,
+  0x1d4c4, 0x1d4c4,
+  0x1d506, 0x1d506,
+  0x1d50b, 0x1d50c,
+  0x1d515, 0x1d515,
+  0x1d51d, 0x1d51d,
+  0x1d53a, 0x1d53a,
+  0x1d53f, 0x1d53f,
+  0x1d545, 0x1d545,
+  0x1d547, 0x1d549,
+  0x1d551, 0x1d551,
+  0x1d6a6, 0x1d6a7,
+  0x1d7ca, 0x1d7cd,
+  0x1d800, 0x1ffff,
+  0x2a6d7, 0x2f7ff,
+  0x2fa1e, 0xe00ff,
+  0xe01f0, 0x10ffff
+}; /* CR_C */
+
+/* 'Cc': General Category */
+static const OnigCodePoint CR_Cc[] = {
+  2,
+  0x0000, 0x001f,
+  0x007f, 0x009f
+}; /* CR_Cc */
+
+/* 'Cf': General Category */
+static const OnigCodePoint CR_Cf[] = {
+  14,
+  0x00ad, 0x00ad,
+  0x0600, 0x0603,
+  0x06dd, 0x06dd,
+  0x070f, 0x070f,
+  0x17b4, 0x17b5,
+  0x200b, 0x200f,
+  0x202a, 0x202e,
+  0x2060, 0x2063,
+  0x206a, 0x206f,
+  0xfeff, 0xfeff,
+  0xfff9, 0xfffb,
+  0x1d173, 0x1d17a,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f
+}; /* CR_Cf */
+
+/* 'Cn': General Category */
+static const OnigCodePoint CR_Cn[] = {
+  420,
+  0x0242, 0x024f,
+  0x0370, 0x0373,
+  0x0376, 0x0379,
+  0x037b, 0x037d,
+  0x037f, 0x0383,
+  0x038b, 0x038b,
+  0x038d, 0x038d,
+  0x03a2, 0x03a2,
+  0x03cf, 0x03cf,
+  0x0487, 0x0487,
+  0x04cf, 0x04cf,
+  0x04fa, 0x04ff,
+  0x0510, 0x0530,
+  0x0557, 0x0558,
+  0x0560, 0x0560,
+  0x0588, 0x0588,
+  0x058b, 0x0590,
+  0x05ba, 0x05ba,
+  0x05c8, 0x05cf,
+  0x05eb, 0x05ef,
+  0x05f5, 0x05ff,
+  0x0604, 0x060a,
+  0x0616, 0x061a,
+  0x061c, 0x061d,
+  0x0620, 0x0620,
+  0x063b, 0x063f,
+  0x065f, 0x065f,
+  0x070e, 0x070e,
+  0x074b, 0x074c,
+  0x076e, 0x077f,
+  0x07b2, 0x0900,
+  0x093a, 0x093b,
+  0x094e, 0x094f,
+  0x0955, 0x0957,
+  0x0971, 0x097c,
+  0x097e, 0x0980,
+  0x0984, 0x0984,
+  0x098d, 0x098e,
+  0x0991, 0x0992,
+  0x09a9, 0x09a9,
+  0x09b1, 0x09b1,
+  0x09b3, 0x09b5,
+  0x09ba, 0x09bb,
+  0x09c5, 0x09c6,
+  0x09c9, 0x09ca,
+  0x09cf, 0x09d6,
+  0x09d8, 0x09db,
+  0x09de, 0x09de,
+  0x09e4, 0x09e5,
+  0x09fb, 0x0a00,
+  0x0a04, 0x0a04,
+  0x0a0b, 0x0a0e,
+  0x0a11, 0x0a12,
+  0x0a29, 0x0a29,
+  0x0a31, 0x0a31,
+  0x0a34, 0x0a34,
+  0x0a37, 0x0a37,
+  0x0a3a, 0x0a3b,
+  0x0a3d, 0x0a3d,
+  0x0a43, 0x0a46,
+  0x0a49, 0x0a4a,
+  0x0a4e, 0x0a58,
+  0x0a5d, 0x0a5d,
+  0x0a5f, 0x0a65,
+  0x0a75, 0x0a80,
+  0x0a84, 0x0a84,
+  0x0a8e, 0x0a8e,
+  0x0a92, 0x0a92,
+  0x0aa9, 0x0aa9,
+  0x0ab1, 0x0ab1,
+  0x0ab4, 0x0ab4,
+  0x0aba, 0x0abb,
+  0x0ac6, 0x0ac6,
+  0x0aca, 0x0aca,
+  0x0ace, 0x0acf,
+  0x0ad1, 0x0adf,
+  0x0ae4, 0x0ae5,
+  0x0af0, 0x0af0,
+  0x0af2, 0x0b00,
+  0x0b04, 0x0b04,
+  0x0b0d, 0x0b0e,
+  0x0b11, 0x0b12,
+  0x0b29, 0x0b29,
+  0x0b31, 0x0b31,
+  0x0b34, 0x0b34,
+  0x0b3a, 0x0b3b,
+  0x0b44, 0x0b46,
+  0x0b49, 0x0b4a,
+  0x0b4e, 0x0b55,
+  0x0b58, 0x0b5b,
+  0x0b5e, 0x0b5e,
+  0x0b62, 0x0b65,
+  0x0b72, 0x0b81,
+  0x0b84, 0x0b84,
+  0x0b8b, 0x0b8d,
+  0x0b91, 0x0b91,
+  0x0b96, 0x0b98,
+  0x0b9b, 0x0b9b,
+  0x0b9d, 0x0b9d,
+  0x0ba0, 0x0ba2,
+  0x0ba5, 0x0ba7,
+  0x0bab, 0x0bad,
+  0x0bba, 0x0bbd,
+  0x0bc3, 0x0bc5,
+  0x0bc9, 0x0bc9,
+  0x0bce, 0x0bd6,
+  0x0bd8, 0x0be5,
+  0x0bfb, 0x0c00,
+  0x0c04, 0x0c04,
+  0x0c0d, 0x0c0d,
+  0x0c11, 0x0c11,
+  0x0c29, 0x0c29,
+  0x0c34, 0x0c34,
+  0x0c3a, 0x0c3d,
+  0x0c45, 0x0c45,
+  0x0c49, 0x0c49,
+  0x0c4e, 0x0c54,
+  0x0c57, 0x0c5f,
+  0x0c62, 0x0c65,
+  0x0c70, 0x0c81,
+  0x0c84, 0x0c84,
+  0x0c8d, 0x0c8d,
+  0x0c91, 0x0c91,
+  0x0ca9, 0x0ca9,
+  0x0cb4, 0x0cb4,
+  0x0cba, 0x0cbb,
+  0x0cc5, 0x0cc5,
+  0x0cc9, 0x0cc9,
+  0x0cce, 0x0cd4,
+  0x0cd7, 0x0cdd,
+  0x0cdf, 0x0cdf,
+  0x0ce2, 0x0ce5,
+  0x0cf0, 0x0d01,
+  0x0d04, 0x0d04,
+  0x0d0d, 0x0d0d,
+  0x0d11, 0x0d11,
+  0x0d29, 0x0d29,
+  0x0d3a, 0x0d3d,
+  0x0d44, 0x0d45,
+  0x0d49, 0x0d49,
+  0x0d4e, 0x0d56,
+  0x0d58, 0x0d5f,
+  0x0d62, 0x0d65,
+  0x0d70, 0x0d81,
+  0x0d84, 0x0d84,
+  0x0d97, 0x0d99,
+  0x0db2, 0x0db2,
+  0x0dbc, 0x0dbc,
+  0x0dbe, 0x0dbf,
+  0x0dc7, 0x0dc9,
+  0x0dcb, 0x0dce,
+  0x0dd5, 0x0dd5,
+  0x0dd7, 0x0dd7,
+  0x0de0, 0x0df1,
+  0x0df5, 0x0e00,
+  0x0e3b, 0x0e3e,
+  0x0e5c, 0x0e80,
+  0x0e83, 0x0e83,
+  0x0e85, 0x0e86,
+  0x0e89, 0x0e89,
+  0x0e8b, 0x0e8c,
+  0x0e8e, 0x0e93,
+  0x0e98, 0x0e98,
+  0x0ea0, 0x0ea0,
+  0x0ea4, 0x0ea4,
+  0x0ea6, 0x0ea6,
+  0x0ea8, 0x0ea9,
+  0x0eac, 0x0eac,
+  0x0eba, 0x0eba,
+  0x0ebe, 0x0ebf,
+  0x0ec5, 0x0ec5,
+  0x0ec7, 0x0ec7,
+  0x0ece, 0x0ecf,
+  0x0eda, 0x0edb,
+  0x0ede, 0x0eff,
+  0x0f48, 0x0f48,
+  0x0f6b, 0x0f70,
+  0x0f8c, 0x0f8f,
+  0x0f98, 0x0f98,
+  0x0fbd, 0x0fbd,
+  0x0fcd, 0x0fce,
+  0x0fd2, 0x0fff,
+  0x1022, 0x1022,
+  0x1028, 0x1028,
+  0x102b, 0x102b,
+  0x1033, 0x1035,
+  0x103a, 0x103f,
+  0x105a, 0x109f,
+  0x10c6, 0x10cf,
+  0x10fd, 0x10ff,
+  0x115a, 0x115e,
+  0x11a3, 0x11a7,
+  0x11fa, 0x11ff,
+  0x1249, 0x1249,
+  0x124e, 0x124f,
+  0x1257, 0x1257,
+  0x1259, 0x1259,
+  0x125e, 0x125f,
+  0x1289, 0x1289,
+  0x128e, 0x128f,
+  0x12b1, 0x12b1,
+  0x12b6, 0x12b7,
+  0x12bf, 0x12bf,
+  0x12c1, 0x12c1,
+  0x12c6, 0x12c7,
+  0x12d7, 0x12d7,
+  0x1311, 0x1311,
+  0x1316, 0x1317,
+  0x135b, 0x135e,
+  0x137d, 0x137f,
+  0x139a, 0x139f,
+  0x13f5, 0x1400,
+  0x1677, 0x167f,
+  0x169d, 0x169f,
+  0x16f1, 0x16ff,
+  0x170d, 0x170d,
+  0x1715, 0x171f,
+  0x1737, 0x173f,
+  0x1754, 0x175f,
+  0x176d, 0x176d,
+  0x1771, 0x1771,
+  0x1774, 0x177f,
+  0x17de, 0x17df,
+  0x17ea, 0x17ef,
+  0x17fa, 0x17ff,
+  0x180f, 0x180f,
+  0x181a, 0x181f,
+  0x1878, 0x187f,
+  0x18aa, 0x18ff,
+  0x191d, 0x191f,
+  0x192c, 0x192f,
+  0x193c, 0x193f,
+  0x1941, 0x1943,
+  0x196e, 0x196f,
+  0x1975, 0x197f,
+  0x19aa, 0x19af,
+  0x19ca, 0x19cf,
+  0x19da, 0x19dd,
+  0x1a1c, 0x1a1d,
+  0x1a20, 0x1cff,
+  0x1dc4, 0x1dff,
+  0x1e9c, 0x1e9f,
+  0x1efa, 0x1eff,
+  0x1f16, 0x1f17,
+  0x1f1e, 0x1f1f,
+  0x1f46, 0x1f47,
+  0x1f4e, 0x1f4f,
+  0x1f58, 0x1f58,
+  0x1f5a, 0x1f5a,
+  0x1f5c, 0x1f5c,
+  0x1f5e, 0x1f5e,
+  0x1f7e, 0x1f7f,
+  0x1fb5, 0x1fb5,
+  0x1fc5, 0x1fc5,
+  0x1fd4, 0x1fd5,
+  0x1fdc, 0x1fdc,
+  0x1ff0, 0x1ff1,
+  0x1ff5, 0x1ff5,
+  0x1fff, 0x1fff,
+  0x2064, 0x2069,
+  0x2072, 0x2073,
+  0x208f, 0x208f,
+  0x2095, 0x209f,
+  0x20b6, 0x20cf,
+  0x20ec, 0x20ff,
+  0x214d, 0x2152,
+  0x2184, 0x218f,
+  0x23dc, 0x23ff,
+  0x2427, 0x243f,
+  0x244b, 0x245f,
+  0x269d, 0x269f,
+  0x26b2, 0x2700,
+  0x2705, 0x2705,
+  0x270a, 0x270b,
+  0x2728, 0x2728,
+  0x274c, 0x274c,
+  0x274e, 0x274e,
+  0x2753, 0x2755,
+  0x2757, 0x2757,
+  0x275f, 0x2760,
+  0x2795, 0x2797,
+  0x27b0, 0x27b0,
+  0x27bf, 0x27bf,
+  0x27c7, 0x27cf,
+  0x27ec, 0x27ef,
+  0x2b14, 0x2bff,
+  0x2c2f, 0x2c2f,
+  0x2c5f, 0x2c7f,
+  0x2ceb, 0x2cf8,
+  0x2d26, 0x2d2f,
+  0x2d66, 0x2d6e,
+  0x2d70, 0x2d7f,
+  0x2d97, 0x2d9f,
+  0x2da7, 0x2da7,
+  0x2daf, 0x2daf,
+  0x2db7, 0x2db7,
+  0x2dbf, 0x2dbf,
+  0x2dc7, 0x2dc7,
+  0x2dcf, 0x2dcf,
+  0x2dd7, 0x2dd7,
+  0x2ddf, 0x2dff,
+  0x2e18, 0x2e1b,
+  0x2e1e, 0x2e7f,
+  0x2e9a, 0x2e9a,
+  0x2ef4, 0x2eff,
+  0x2fd6, 0x2fef,
+  0x2ffc, 0x2fff,
+  0x3040, 0x3040,
+  0x3097, 0x3098,
+  0x3100, 0x3104,
+  0x312d, 0x3130,
+  0x318f, 0x318f,
+  0x31b8, 0x31bf,
+  0x31d0, 0x31ef,
+  0x321f, 0x321f,
+  0x3244, 0x324f,
+  0x32ff, 0x32ff,
+  0x4db6, 0x4dbf,
+  0x9fbc, 0x9fff,
+  0xa48d, 0xa48f,
+  0xa4c7, 0xa6ff,
+  0xa717, 0xa7ff,
+  0xa82c, 0xabff,
+  0xd7a4, 0xd7ff,
+  0xfa2e, 0xfa2f,
+  0xfa6b, 0xfa6f,
+  0xfada, 0xfaff,
+  0xfb07, 0xfb12,
+  0xfb18, 0xfb1c,
+  0xfb37, 0xfb37,
+  0xfb3d, 0xfb3d,
+  0xfb3f, 0xfb3f,
+  0xfb42, 0xfb42,
+  0xfb45, 0xfb45,
+  0xfbb2, 0xfbd2,
+  0xfd40, 0xfd4f,
+  0xfd90, 0xfd91,
+  0xfdc8, 0xfdef,
+  0xfdfe, 0xfdff,
+  0xfe1a, 0xfe1f,
+  0xfe24, 0xfe2f,
+  0xfe53, 0xfe53,
+  0xfe67, 0xfe67,
+  0xfe6c, 0xfe6f,
+  0xfe75, 0xfe75,
+  0xfefd, 0xfefe,
+  0xff00, 0xff00,
+  0xffbf, 0xffc1,
+  0xffc8, 0xffc9,
+  0xffd0, 0xffd1,
+  0xffd8, 0xffd9,
+  0xffdd, 0xffdf,
+  0xffe7, 0xffe7,
+  0xffef, 0xfff8,
+  0xfffe, 0xffff,
+  0x1000c, 0x1000c,
+  0x10027, 0x10027,
+  0x1003b, 0x1003b,
+  0x1003e, 0x1003e,
+  0x1004e, 0x1004f,
+  0x1005e, 0x1007f,
+  0x100fb, 0x100ff,
+  0x10103, 0x10106,
+  0x10134, 0x10136,
+  0x1018b, 0x102ff,
+  0x1031f, 0x1031f,
+  0x10324, 0x1032f,
+  0x1034b, 0x1037f,
+  0x1039e, 0x1039e,
+  0x103c4, 0x103c7,
+  0x103d6, 0x103ff,
+  0x1049e, 0x1049f,
+  0x104aa, 0x107ff,
+  0x10806, 0x10807,
+  0x10809, 0x10809,
+  0x10836, 0x10836,
+  0x10839, 0x1083b,
+  0x1083d, 0x1083e,
+  0x10840, 0x109ff,
+  0x10a04, 0x10a04,
+  0x10a07, 0x10a0b,
+  0x10a14, 0x10a14,
+  0x10a18, 0x10a18,
+  0x10a34, 0x10a37,
+  0x10a3b, 0x10a3e,
+  0x10a48, 0x10a4f,
+  0x10a59, 0x1cfff,
+  0x1d0f6, 0x1d0ff,
+  0x1d127, 0x1d129,
+  0x1d1de, 0x1d1ff,
+  0x1d246, 0x1d2ff,
+  0x1d357, 0x1d3ff,
+  0x1d455, 0x1d455,
+  0x1d49d, 0x1d49d,
+  0x1d4a0, 0x1d4a1,
+  0x1d4a3, 0x1d4a4,
+  0x1d4a7, 0x1d4a8,
+  0x1d4ad, 0x1d4ad,
+  0x1d4ba, 0x1d4ba,
+  0x1d4bc, 0x1d4bc,
+  0x1d4c4, 0x1d4c4,
+  0x1d506, 0x1d506,
+  0x1d50b, 0x1d50c,
+  0x1d515, 0x1d515,
+  0x1d51d, 0x1d51d,
+  0x1d53a, 0x1d53a,
+  0x1d53f, 0x1d53f,
+  0x1d545, 0x1d545,
+  0x1d547, 0x1d549,
+  0x1d551, 0x1d551,
+  0x1d6a6, 0x1d6a7,
+  0x1d7ca, 0x1d7cd,
+  0x1d800, 0x1ffff,
+  0x2a6d7, 0x2f7ff,
+  0x2fa1e, 0xe0000,
+  0xe0002, 0xe001f,
+  0xe0080, 0xe00ff,
+  0xe01f0, 0xeffff,
+  0xffffe, 0xfffff,
+  0x10fffe, 0x10ffff
+}; /* CR_Cn */
+
+/* 'Co': General Category */
+static const OnigCodePoint CR_Co[] = {
+  3,
+  0xe000, 0xf8ff,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Co */
+
+/* 'Cs': General Category */
+static const OnigCodePoint CR_Cs[] = {
+  1,
+  0xd800, 0xdfff
+}; /* CR_Cs */
+
+/* 'L': Major Category */
+static const OnigCodePoint CR_L[] = {
+  347,
+  0x0041, 0x005a,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b5, 0x00b5,
+  0x00ba, 0x00ba,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00f6,
+  0x00f8, 0x0241,
+  0x0250, 0x02c1,
+  0x02c6, 0x02d1,
+  0x02e0, 0x02e4,
+  0x02ee, 0x02ee,
+  0x037a, 0x037a,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x03f5,
+  0x03f7, 0x0481,
+  0x048a, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x0531, 0x0556,
+  0x0559, 0x0559,
+  0x0561, 0x0587,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f2,
+  0x0621, 0x063a,
+  0x0640, 0x064a,
+  0x066e, 0x066f,
+  0x0671, 0x06d3,
+  0x06d5, 0x06d5,
+  0x06e5, 0x06e6,
+  0x06ee, 0x06ef,
+  0x06fa, 0x06fc,
+  0x06ff, 0x06ff,
+  0x0710, 0x0710,
+  0x0712, 0x072f,
+  0x074d, 0x076d,
+  0x0780, 0x07a5,
+  0x07b1, 0x07b1,
+  0x0904, 0x0939,
+  0x093d, 0x093d,
+  0x0950, 0x0950,
+  0x0958, 0x0961,
+  0x097d, 0x097d,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bd, 0x09bd,
+  0x09ce, 0x09ce,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e1,
+  0x09f0, 0x09f1,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a72, 0x0a74,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abd, 0x0abd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae1,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3d, 0x0b3d,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b71, 0x0b71,
+  0x0b83, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c60, 0x0c61,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbd, 0x0cbd,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d60, 0x0d61,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0e01, 0x0e30,
+  0x0e32, 0x0e33,
+  0x0e40, 0x0e46,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb0,
+  0x0eb2, 0x0eb3,
+  0x0ebd, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f00,
+  0x0f40, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f88, 0x0f8b,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x1050, 0x1055,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fa,
+  0x10fc, 0x10fc,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x1380, 0x138f,
+  0x13a0, 0x13f4,
+  0x1401, 0x166c,
+  0x166f, 0x1676,
+  0x1681, 0x169a,
+  0x16a0, 0x16ea,
+  0x1700, 0x170c,
+  0x170e, 0x1711,
+  0x1720, 0x1731,
+  0x1740, 0x1751,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1780, 0x17b3,
+  0x17d7, 0x17d7,
+  0x17dc, 0x17dc,
+  0x1820, 0x1877,
+  0x1880, 0x18a8,
+  0x1900, 0x191c,
+  0x1950, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19c1, 0x19c7,
+  0x1a00, 0x1a16,
+  0x1d00, 0x1dbf,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fbc,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fcc,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fe0, 0x1fec,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffc,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x2090, 0x2094,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210a, 0x2113,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x212f, 0x2131,
+  0x2133, 0x2139,
+  0x213c, 0x213f,
+  0x2145, 0x2149,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e,
+  0x2c80, 0x2ce4,
+  0x2d00, 0x2d25,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x3005, 0x3006,
+  0x3031, 0x3035,
+  0x303b, 0x303c,
+  0x3041, 0x3096,
+  0x309d, 0x309f,
+  0x30a1, 0x30fa,
+  0x30fc, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x31a0, 0x31b7,
+  0x31f0, 0x31ff,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xa000, 0xa48c,
+  0xa800, 0xa801,
+  0xa803, 0xa805,
+  0xa807, 0xa80a,
+  0xa80c, 0xa822,
+  0xac00, 0xd7a3,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xfb1d, 0xfb1d,
+  0xfb1f, 0xfb28,
+  0xfb2a, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfb,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xff21, 0xff3a,
+  0xff41, 0xff5a,
+  0xff66, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10300, 0x1031e,
+  0x10330, 0x10349,
+  0x10380, 0x1039d,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103cf,
+  0x10400, 0x1049d,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a00,
+  0x10a10, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d6c0,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6fa,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d734,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d76e,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d7a8,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d
+}; /* CR_L */
+
+/* 'Ll': General Category */
+static const OnigCodePoint CR_Ll[] = {
+  480,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00b5, 0x00b5,
+  0x00ba, 0x00ba,
+  0x00df, 0x00f6,
+  0x00f8, 0x00ff,
+  0x0101, 0x0101,
+  0x0103, 0x0103,
+  0x0105, 0x0105,
+  0x0107, 0x0107,
+  0x0109, 0x0109,
+  0x010b, 0x010b,
+  0x010d, 0x010d,
+  0x010f, 0x010f,
+  0x0111, 0x0111,
+  0x0113, 0x0113,
+  0x0115, 0x0115,
+  0x0117, 0x0117,
+  0x0119, 0x0119,
+  0x011b, 0x011b,
+  0x011d, 0x011d,
+  0x011f, 0x011f,
+  0x0121, 0x0121,
+  0x0123, 0x0123,
+  0x0125, 0x0125,
+  0x0127, 0x0127,
+  0x0129, 0x0129,
+  0x012b, 0x012b,
+  0x012d, 0x012d,
+  0x012f, 0x012f,
+  0x0131, 0x0131,
+  0x0133, 0x0133,
+  0x0135, 0x0135,
+  0x0137, 0x0138,
+  0x013a, 0x013a,
+  0x013c, 0x013c,
+  0x013e, 0x013e,
+  0x0140, 0x0140,
+  0x0142, 0x0142,
+  0x0144, 0x0144,
+  0x0146, 0x0146,
+  0x0148, 0x0149,
+  0x014b, 0x014b,
+  0x014d, 0x014d,
+  0x014f, 0x014f,
+  0x0151, 0x0151,
+  0x0153, 0x0153,
+  0x0155, 0x0155,
+  0x0157, 0x0157,
+  0x0159, 0x0159,
+  0x015b, 0x015b,
+  0x015d, 0x015d,
+  0x015f, 0x015f,
+  0x0161, 0x0161,
+  0x0163, 0x0163,
+  0x0165, 0x0165,
+  0x0167, 0x0167,
+  0x0169, 0x0169,
+  0x016b, 0x016b,
+  0x016d, 0x016d,
+  0x016f, 0x016f,
+  0x0171, 0x0171,
+  0x0173, 0x0173,
+  0x0175, 0x0175,
+  0x0177, 0x0177,
+  0x017a, 0x017a,
+  0x017c, 0x017c,
+  0x017e, 0x0180,
+  0x0183, 0x0183,
+  0x0185, 0x0185,
+  0x0188, 0x0188,
+  0x018c, 0x018d,
+  0x0192, 0x0192,
+  0x0195, 0x0195,
+  0x0199, 0x019b,
+  0x019e, 0x019e,
+  0x01a1, 0x01a1,
+  0x01a3, 0x01a3,
+  0x01a5, 0x01a5,
+  0x01a8, 0x01a8,
+  0x01aa, 0x01ab,
+  0x01ad, 0x01ad,
+  0x01b0, 0x01b0,
+  0x01b4, 0x01b4,
+  0x01b6, 0x01b6,
+  0x01b9, 0x01ba,
+  0x01bd, 0x01bf,
+  0x01c6, 0x01c6,
+  0x01c9, 0x01c9,
+  0x01cc, 0x01cc,
+  0x01ce, 0x01ce,
+  0x01d0, 0x01d0,
+  0x01d2, 0x01d2,
+  0x01d4, 0x01d4,
+  0x01d6, 0x01d6,
+  0x01d8, 0x01d8,
+  0x01da, 0x01da,
+  0x01dc, 0x01dd,
+  0x01df, 0x01df,
+  0x01e1, 0x01e1,
+  0x01e3, 0x01e3,
+  0x01e5, 0x01e5,
+  0x01e7, 0x01e7,
+  0x01e9, 0x01e9,
+  0x01eb, 0x01eb,
+  0x01ed, 0x01ed,
+  0x01ef, 0x01f0,
+  0x01f3, 0x01f3,
+  0x01f5, 0x01f5,
+  0x01f9, 0x01f9,
+  0x01fb, 0x01fb,
+  0x01fd, 0x01fd,
+  0x01ff, 0x01ff,
+  0x0201, 0x0201,
+  0x0203, 0x0203,
+  0x0205, 0x0205,
+  0x0207, 0x0207,
+  0x0209, 0x0209,
+  0x020b, 0x020b,
+  0x020d, 0x020d,
+  0x020f, 0x020f,
+  0x0211, 0x0211,
+  0x0213, 0x0213,
+  0x0215, 0x0215,
+  0x0217, 0x0217,
+  0x0219, 0x0219,
+  0x021b, 0x021b,
+  0x021d, 0x021d,
+  0x021f, 0x021f,
+  0x0221, 0x0221,
+  0x0223, 0x0223,
+  0x0225, 0x0225,
+  0x0227, 0x0227,
+  0x0229, 0x0229,
+  0x022b, 0x022b,
+  0x022d, 0x022d,
+  0x022f, 0x022f,
+  0x0231, 0x0231,
+  0x0233, 0x0239,
+  0x023c, 0x023c,
+  0x023f, 0x0240,
+  0x0250, 0x02af,
+  0x0390, 0x0390,
+  0x03ac, 0x03ce,
+  0x03d0, 0x03d1,
+  0x03d5, 0x03d7,
+  0x03d9, 0x03d9,
+  0x03db, 0x03db,
+  0x03dd, 0x03dd,
+  0x03df, 0x03df,
+  0x03e1, 0x03e1,
+  0x03e3, 0x03e3,
+  0x03e5, 0x03e5,
+  0x03e7, 0x03e7,
+  0x03e9, 0x03e9,
+  0x03eb, 0x03eb,
+  0x03ed, 0x03ed,
+  0x03ef, 0x03f3,
+  0x03f5, 0x03f5,
+  0x03f8, 0x03f8,
+  0x03fb, 0x03fc,
+  0x0430, 0x045f,
+  0x0461, 0x0461,
+  0x0463, 0x0463,
+  0x0465, 0x0465,
+  0x0467, 0x0467,
+  0x0469, 0x0469,
+  0x046b, 0x046b,
+  0x046d, 0x046d,
+  0x046f, 0x046f,
+  0x0471, 0x0471,
+  0x0473, 0x0473,
+  0x0475, 0x0475,
+  0x0477, 0x0477,
+  0x0479, 0x0479,
+  0x047b, 0x047b,
+  0x047d, 0x047d,
+  0x047f, 0x047f,
+  0x0481, 0x0481,
+  0x048b, 0x048b,
+  0x048d, 0x048d,
+  0x048f, 0x048f,
+  0x0491, 0x0491,
+  0x0493, 0x0493,
+  0x0495, 0x0495,
+  0x0497, 0x0497,
+  0x0499, 0x0499,
+  0x049b, 0x049b,
+  0x049d, 0x049d,
+  0x049f, 0x049f,
+  0x04a1, 0x04a1,
+  0x04a3, 0x04a3,
+  0x04a5, 0x04a5,
+  0x04a7, 0x04a7,
+  0x04a9, 0x04a9,
+  0x04ab, 0x04ab,
+  0x04ad, 0x04ad,
+  0x04af, 0x04af,
+  0x04b1, 0x04b1,
+  0x04b3, 0x04b3,
+  0x04b5, 0x04b5,
+  0x04b7, 0x04b7,
+  0x04b9, 0x04b9,
+  0x04bb, 0x04bb,
+  0x04bd, 0x04bd,
+  0x04bf, 0x04bf,
+  0x04c2, 0x04c2,
+  0x04c4, 0x04c4,
+  0x04c6, 0x04c6,
+  0x04c8, 0x04c8,
+  0x04ca, 0x04ca,
+  0x04cc, 0x04cc,
+  0x04ce, 0x04ce,
+  0x04d1, 0x04d1,
+  0x04d3, 0x04d3,
+  0x04d5, 0x04d5,
+  0x04d7, 0x04d7,
+  0x04d9, 0x04d9,
+  0x04db, 0x04db,
+  0x04dd, 0x04dd,
+  0x04df, 0x04df,
+  0x04e1, 0x04e1,
+  0x04e3, 0x04e3,
+  0x04e5, 0x04e5,
+  0x04e7, 0x04e7,
+  0x04e9, 0x04e9,
+  0x04eb, 0x04eb,
+  0x04ed, 0x04ed,
+  0x04ef, 0x04ef,
+  0x04f1, 0x04f1,
+  0x04f3, 0x04f3,
+  0x04f5, 0x04f5,
+  0x04f7, 0x04f7,
+  0x04f9, 0x04f9,
+  0x0501, 0x0501,
+  0x0503, 0x0503,
+  0x0505, 0x0505,
+  0x0507, 0x0507,
+  0x0509, 0x0509,
+  0x050b, 0x050b,
+  0x050d, 0x050d,
+  0x050f, 0x050f,
+  0x0561, 0x0587,
+  0x1d00, 0x1d2b,
+  0x1d62, 0x1d77,
+  0x1d79, 0x1d9a,
+  0x1e01, 0x1e01,
+  0x1e03, 0x1e03,
+  0x1e05, 0x1e05,
+  0x1e07, 0x1e07,
+  0x1e09, 0x1e09,
+  0x1e0b, 0x1e0b,
+  0x1e0d, 0x1e0d,
+  0x1e0f, 0x1e0f,
+  0x1e11, 0x1e11,
+  0x1e13, 0x1e13,
+  0x1e15, 0x1e15,
+  0x1e17, 0x1e17,
+  0x1e19, 0x1e19,
+  0x1e1b, 0x1e1b,
+  0x1e1d, 0x1e1d,
+  0x1e1f, 0x1e1f,
+  0x1e21, 0x1e21,
+  0x1e23, 0x1e23,
+  0x1e25, 0x1e25,
+  0x1e27, 0x1e27,
+  0x1e29, 0x1e29,
+  0x1e2b, 0x1e2b,
+  0x1e2d, 0x1e2d,
+  0x1e2f, 0x1e2f,
+  0x1e31, 0x1e31,
+  0x1e33, 0x1e33,
+  0x1e35, 0x1e35,
+  0x1e37, 0x1e37,
+  0x1e39, 0x1e39,
+  0x1e3b, 0x1e3b,
+  0x1e3d, 0x1e3d,
+  0x1e3f, 0x1e3f,
+  0x1e41, 0x1e41,
+  0x1e43, 0x1e43,
+  0x1e45, 0x1e45,
+  0x1e47, 0x1e47,
+  0x1e49, 0x1e49,
+  0x1e4b, 0x1e4b,
+  0x1e4d, 0x1e4d,
+  0x1e4f, 0x1e4f,
+  0x1e51, 0x1e51,
+  0x1e53, 0x1e53,
+  0x1e55, 0x1e55,
+  0x1e57, 0x1e57,
+  0x1e59, 0x1e59,
+  0x1e5b, 0x1e5b,
+  0x1e5d, 0x1e5d,
+  0x1e5f, 0x1e5f,
+  0x1e61, 0x1e61,
+  0x1e63, 0x1e63,
+  0x1e65, 0x1e65,
+  0x1e67, 0x1e67,
+  0x1e69, 0x1e69,
+  0x1e6b, 0x1e6b,
+  0x1e6d, 0x1e6d,
+  0x1e6f, 0x1e6f,
+  0x1e71, 0x1e71,
+  0x1e73, 0x1e73,
+  0x1e75, 0x1e75,
+  0x1e77, 0x1e77,
+  0x1e79, 0x1e79,
+  0x1e7b, 0x1e7b,
+  0x1e7d, 0x1e7d,
+  0x1e7f, 0x1e7f,
+  0x1e81, 0x1e81,
+  0x1e83, 0x1e83,
+  0x1e85, 0x1e85,
+  0x1e87, 0x1e87,
+  0x1e89, 0x1e89,
+  0x1e8b, 0x1e8b,
+  0x1e8d, 0x1e8d,
+  0x1e8f, 0x1e8f,
+  0x1e91, 0x1e91,
+  0x1e93, 0x1e93,
+  0x1e95, 0x1e9b,
+  0x1ea1, 0x1ea1,
+  0x1ea3, 0x1ea3,
+  0x1ea5, 0x1ea5,
+  0x1ea7, 0x1ea7,
+  0x1ea9, 0x1ea9,
+  0x1eab, 0x1eab,
+  0x1ead, 0x1ead,
+  0x1eaf, 0x1eaf,
+  0x1eb1, 0x1eb1,
+  0x1eb3, 0x1eb3,
+  0x1eb5, 0x1eb5,
+  0x1eb7, 0x1eb7,
+  0x1eb9, 0x1eb9,
+  0x1ebb, 0x1ebb,
+  0x1ebd, 0x1ebd,
+  0x1ebf, 0x1ebf,
+  0x1ec1, 0x1ec1,
+  0x1ec3, 0x1ec3,
+  0x1ec5, 0x1ec5,
+  0x1ec7, 0x1ec7,
+  0x1ec9, 0x1ec9,
+  0x1ecb, 0x1ecb,
+  0x1ecd, 0x1ecd,
+  0x1ecf, 0x1ecf,
+  0x1ed1, 0x1ed1,
+  0x1ed3, 0x1ed3,
+  0x1ed5, 0x1ed5,
+  0x1ed7, 0x1ed7,
+  0x1ed9, 0x1ed9,
+  0x1edb, 0x1edb,
+  0x1edd, 0x1edd,
+  0x1edf, 0x1edf,
+  0x1ee1, 0x1ee1,
+  0x1ee3, 0x1ee3,
+  0x1ee5, 0x1ee5,
+  0x1ee7, 0x1ee7,
+  0x1ee9, 0x1ee9,
+  0x1eeb, 0x1eeb,
+  0x1eed, 0x1eed,
+  0x1eef, 0x1eef,
+  0x1ef1, 0x1ef1,
+  0x1ef3, 0x1ef3,
+  0x1ef5, 0x1ef5,
+  0x1ef7, 0x1ef7,
+  0x1ef9, 0x1ef9,
+  0x1f00, 0x1f07,
+  0x1f10, 0x1f15,
+  0x1f20, 0x1f27,
+  0x1f30, 0x1f37,
+  0x1f40, 0x1f45,
+  0x1f50, 0x1f57,
+  0x1f60, 0x1f67,
+  0x1f70, 0x1f7d,
+  0x1f80, 0x1f87,
+  0x1f90, 0x1f97,
+  0x1fa0, 0x1fa7,
+  0x1fb0, 0x1fb4,
+  0x1fb6, 0x1fb7,
+  0x1fbe, 0x1fbe,
+  0x1fc2, 0x1fc4,
+  0x1fc6, 0x1fc7,
+  0x1fd0, 0x1fd3,
+  0x1fd6, 0x1fd7,
+  0x1fe0, 0x1fe7,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ff7,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x210a, 0x210a,
+  0x210e, 0x210f,
+  0x2113, 0x2113,
+  0x212f, 0x212f,
+  0x2134, 0x2134,
+  0x2139, 0x2139,
+  0x213c, 0x213d,
+  0x2146, 0x2149,
+  0x2c30, 0x2c5e,
+  0x2c81, 0x2c81,
+  0x2c83, 0x2c83,
+  0x2c85, 0x2c85,
+  0x2c87, 0x2c87,
+  0x2c89, 0x2c89,
+  0x2c8b, 0x2c8b,
+  0x2c8d, 0x2c8d,
+  0x2c8f, 0x2c8f,
+  0x2c91, 0x2c91,
+  0x2c93, 0x2c93,
+  0x2c95, 0x2c95,
+  0x2c97, 0x2c97,
+  0x2c99, 0x2c99,
+  0x2c9b, 0x2c9b,
+  0x2c9d, 0x2c9d,
+  0x2c9f, 0x2c9f,
+  0x2ca1, 0x2ca1,
+  0x2ca3, 0x2ca3,
+  0x2ca5, 0x2ca5,
+  0x2ca7, 0x2ca7,
+  0x2ca9, 0x2ca9,
+  0x2cab, 0x2cab,
+  0x2cad, 0x2cad,
+  0x2caf, 0x2caf,
+  0x2cb1, 0x2cb1,
+  0x2cb3, 0x2cb3,
+  0x2cb5, 0x2cb5,
+  0x2cb7, 0x2cb7,
+  0x2cb9, 0x2cb9,
+  0x2cbb, 0x2cbb,
+  0x2cbd, 0x2cbd,
+  0x2cbf, 0x2cbf,
+  0x2cc1, 0x2cc1,
+  0x2cc3, 0x2cc3,
+  0x2cc5, 0x2cc5,
+  0x2cc7, 0x2cc7,
+  0x2cc9, 0x2cc9,
+  0x2ccb, 0x2ccb,
+  0x2ccd, 0x2ccd,
+  0x2ccf, 0x2ccf,
+  0x2cd1, 0x2cd1,
+  0x2cd3, 0x2cd3,
+  0x2cd5, 0x2cd5,
+  0x2cd7, 0x2cd7,
+  0x2cd9, 0x2cd9,
+  0x2cdb, 0x2cdb,
+  0x2cdd, 0x2cdd,
+  0x2cdf, 0x2cdf,
+  0x2ce1, 0x2ce1,
+  0x2ce3, 0x2ce4,
+  0x2d00, 0x2d25,
+  0xfb00, 0xfb06,
+  0xfb13, 0xfb17,
+  0xff41, 0xff5a,
+  0x10428, 0x1044f,
+  0x1d41a, 0x1d433,
+  0x1d44e, 0x1d454,
+  0x1d456, 0x1d467,
+  0x1d482, 0x1d49b,
+  0x1d4b6, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d4cf,
+  0x1d4ea, 0x1d503,
+  0x1d51e, 0x1d537,
+  0x1d552, 0x1d56b,
+  0x1d586, 0x1d59f,
+  0x1d5ba, 0x1d5d3,
+  0x1d5ee, 0x1d607,
+  0x1d622, 0x1d63b,
+  0x1d656, 0x1d66f,
+  0x1d68a, 0x1d6a5,
+  0x1d6c2, 0x1d6da,
+  0x1d6dc, 0x1d6e1,
+  0x1d6fc, 0x1d714,
+  0x1d716, 0x1d71b,
+  0x1d736, 0x1d74e,
+  0x1d750, 0x1d755,
+  0x1d770, 0x1d788,
+  0x1d78a, 0x1d78f,
+  0x1d7aa, 0x1d7c2,
+  0x1d7c4, 0x1d7c9
+}; /* CR_Ll */
+
+/* 'Lm': General Category */
+static const OnigCodePoint CR_Lm[] = {
+  26,
+  0x02b0, 0x02c1,
+  0x02c6, 0x02d1,
+  0x02e0, 0x02e4,
+  0x02ee, 0x02ee,
+  0x037a, 0x037a,
+  0x0559, 0x0559,
+  0x0640, 0x0640,
+  0x06e5, 0x06e6,
+  0x0e46, 0x0e46,
+  0x0ec6, 0x0ec6,
+  0x10fc, 0x10fc,
+  0x17d7, 0x17d7,
+  0x1843, 0x1843,
+  0x1d2c, 0x1d61,
+  0x1d78, 0x1d78,
+  0x1d9b, 0x1dbf,
+  0x2090, 0x2094,
+  0x2d6f, 0x2d6f,
+  0x3005, 0x3005,
+  0x3031, 0x3035,
+  0x303b, 0x303b,
+  0x309d, 0x309e,
+  0x30fc, 0x30fe,
+  0xa015, 0xa015,
+  0xff70, 0xff70,
+  0xff9e, 0xff9f
+}; /* CR_Lm */
+
+/* 'Lo': General Category */
+static const OnigCodePoint CR_Lo[] = {
+  245,
+  0x01bb, 0x01bb,
+  0x01c0, 0x01c3,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f2,
+  0x0621, 0x063a,
+  0x0641, 0x064a,
+  0x066e, 0x066f,
+  0x0671, 0x06d3,
+  0x06d5, 0x06d5,
+  0x06ee, 0x06ef,
+  0x06fa, 0x06fc,
+  0x06ff, 0x06ff,
+  0x0710, 0x0710,
+  0x0712, 0x072f,
+  0x074d, 0x076d,
+  0x0780, 0x07a5,
+  0x07b1, 0x07b1,
+  0x0904, 0x0939,
+  0x093d, 0x093d,
+  0x0950, 0x0950,
+  0x0958, 0x0961,
+  0x097d, 0x097d,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bd, 0x09bd,
+  0x09ce, 0x09ce,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e1,
+  0x09f0, 0x09f1,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a72, 0x0a74,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abd, 0x0abd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae1,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3d, 0x0b3d,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b71, 0x0b71,
+  0x0b83, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c60, 0x0c61,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbd, 0x0cbd,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d60, 0x0d61,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0e01, 0x0e30,
+  0x0e32, 0x0e33,
+  0x0e40, 0x0e45,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb0,
+  0x0eb2, 0x0eb3,
+  0x0ebd, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0edc, 0x0edd,
+  0x0f00, 0x0f00,
+  0x0f40, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f88, 0x0f8b,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x1050, 0x1055,
+  0x10d0, 0x10fa,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x1380, 0x138f,
+  0x13a0, 0x13f4,
+  0x1401, 0x166c,
+  0x166f, 0x1676,
+  0x1681, 0x169a,
+  0x16a0, 0x16ea,
+  0x1700, 0x170c,
+  0x170e, 0x1711,
+  0x1720, 0x1731,
+  0x1740, 0x1751,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1780, 0x17b3,
+  0x17dc, 0x17dc,
+  0x1820, 0x1842,
+  0x1844, 0x1877,
+  0x1880, 0x18a8,
+  0x1900, 0x191c,
+  0x1950, 0x196d,
+  0x1970, 0x1974,
+  0x1980, 0x19a9,
+  0x19c1, 0x19c7,
+  0x1a00, 0x1a16,
+  0x2135, 0x2138,
+  0x2d30, 0x2d65,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde,
+  0x3006, 0x3006,
+  0x303c, 0x303c,
+  0x3041, 0x3096,
+  0x309f, 0x309f,
+  0x30a1, 0x30fa,
+  0x30ff, 0x30ff,
+  0x3105, 0x312c,
+  0x3131, 0x318e,
+  0x31a0, 0x31b7,
+  0x31f0, 0x31ff,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xa000, 0xa014,
+  0xa016, 0xa48c,
+  0xa800, 0xa801,
+  0xa803, 0xa805,
+  0xa807, 0xa80a,
+  0xa80c, 0xa822,
+  0xac00, 0xd7a3,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0xfb1d, 0xfb1d,
+  0xfb1f, 0xfb28,
+  0xfb2a, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfb,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc,
+  0xff66, 0xff6f,
+  0xff71, 0xff9d,
+  0xffa0, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa,
+  0x10300, 0x1031e,
+  0x10330, 0x10349,
+  0x10380, 0x1039d,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103cf,
+  0x10450, 0x1049d,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f,
+  0x10a00, 0x10a00,
+  0x10a10, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d
+}; /* CR_Lo */
+
+/* 'Lt': General Category */
+static const OnigCodePoint CR_Lt[] = {
+  10,
+  0x01c5, 0x01c5,
+  0x01c8, 0x01c8,
+  0x01cb, 0x01cb,
+  0x01f2, 0x01f2,
+  0x1f88, 0x1f8f,
+  0x1f98, 0x1f9f,
+  0x1fa8, 0x1faf,
+  0x1fbc, 0x1fbc,
+  0x1fcc, 0x1fcc,
+  0x1ffc, 0x1ffc
+}; /* CR_Lt */
+
+/* 'Lu': General Category */
+static const OnigCodePoint CR_Lu[] = {
+  476,
+  0x0041, 0x005a,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00de,
+  0x0100, 0x0100,
+  0x0102, 0x0102,
+  0x0104, 0x0104,
+  0x0106, 0x0106,
+  0x0108, 0x0108,
+  0x010a, 0x010a,
+  0x010c, 0x010c,
+  0x010e, 0x010e,
+  0x0110, 0x0110,
+  0x0112, 0x0112,
+  0x0114, 0x0114,
+  0x0116, 0x0116,
+  0x0118, 0x0118,
+  0x011a, 0x011a,
+  0x011c, 0x011c,
+  0x011e, 0x011e,
+  0x0120, 0x0120,
+  0x0122, 0x0122,
+  0x0124, 0x0124,
+  0x0126, 0x0126,
+  0x0128, 0x0128,
+  0x012a, 0x012a,
+  0x012c, 0x012c,
+  0x012e, 0x012e,
+  0x0130, 0x0130,
+  0x0132, 0x0132,
+  0x0134, 0x0134,
+  0x0136, 0x0136,
+  0x0139, 0x0139,
+  0x013b, 0x013b,
+  0x013d, 0x013d,
+  0x013f, 0x013f,
+  0x0141, 0x0141,
+  0x0143, 0x0143,
+  0x0145, 0x0145,
+  0x0147, 0x0147,
+  0x014a, 0x014a,
+  0x014c, 0x014c,
+  0x014e, 0x014e,
+  0x0150, 0x0150,
+  0x0152, 0x0152,
+  0x0154, 0x0154,
+  0x0156, 0x0156,
+  0x0158, 0x0158,
+  0x015a, 0x015a,
+  0x015c, 0x015c,
+  0x015e, 0x015e,
+  0x0160, 0x0160,
+  0x0162, 0x0162,
+  0x0164, 0x0164,
+  0x0166, 0x0166,
+  0x0168, 0x0168,
+  0x016a, 0x016a,
+  0x016c, 0x016c,
+  0x016e, 0x016e,
+  0x0170, 0x0170,
+  0x0172, 0x0172,
+  0x0174, 0x0174,
+  0x0176, 0x0176,
+  0x0178, 0x0179,
+  0x017b, 0x017b,
+  0x017d, 0x017d,
+  0x0181, 0x0182,
+  0x0184, 0x0184,
+  0x0186, 0x0187,
+  0x0189, 0x018b,
+  0x018e, 0x0191,
+  0x0193, 0x0194,
+  0x0196, 0x0198,
+  0x019c, 0x019d,
+  0x019f, 0x01a0,
+  0x01a2, 0x01a2,
+  0x01a4, 0x01a4,
+  0x01a6, 0x01a7,
+  0x01a9, 0x01a9,
+  0x01ac, 0x01ac,
+  0x01ae, 0x01af,
+  0x01b1, 0x01b3,
+  0x01b5, 0x01b5,
+  0x01b7, 0x01b8,
+  0x01bc, 0x01bc,
+  0x01c4, 0x01c4,
+  0x01c7, 0x01c7,
+  0x01ca, 0x01ca,
+  0x01cd, 0x01cd,
+  0x01cf, 0x01cf,
+  0x01d1, 0x01d1,
+  0x01d3, 0x01d3,
+  0x01d5, 0x01d5,
+  0x01d7, 0x01d7,
+  0x01d9, 0x01d9,
+  0x01db, 0x01db,
+  0x01de, 0x01de,
+  0x01e0, 0x01e0,
+  0x01e2, 0x01e2,
+  0x01e4, 0x01e4,
+  0x01e6, 0x01e6,
+  0x01e8, 0x01e8,
+  0x01ea, 0x01ea,
+  0x01ec, 0x01ec,
+  0x01ee, 0x01ee,
+  0x01f1, 0x01f1,
+  0x01f4, 0x01f4,
+  0x01f6, 0x01f8,
+  0x01fa, 0x01fa,
+  0x01fc, 0x01fc,
+  0x01fe, 0x01fe,
+  0x0200, 0x0200,
+  0x0202, 0x0202,
+  0x0204, 0x0204,
+  0x0206, 0x0206,
+  0x0208, 0x0208,
+  0x020a, 0x020a,
+  0x020c, 0x020c,
+  0x020e, 0x020e,
+  0x0210, 0x0210,
+  0x0212, 0x0212,
+  0x0214, 0x0214,
+  0x0216, 0x0216,
+  0x0218, 0x0218,
+  0x021a, 0x021a,
+  0x021c, 0x021c,
+  0x021e, 0x021e,
+  0x0220, 0x0220,
+  0x0222, 0x0222,
+  0x0224, 0x0224,
+  0x0226, 0x0226,
+  0x0228, 0x0228,
+  0x022a, 0x022a,
+  0x022c, 0x022c,
+  0x022e, 0x022e,
+  0x0230, 0x0230,
+  0x0232, 0x0232,
+  0x023a, 0x023b,
+  0x023d, 0x023e,
+  0x0241, 0x0241,
+  0x0386, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x038f,
+  0x0391, 0x03a1,
+  0x03a3, 0x03ab,
+  0x03d2, 0x03d4,
+  0x03d8, 0x03d8,
+  0x03da, 0x03da,
+  0x03dc, 0x03dc,
+  0x03de, 0x03de,
+  0x03e0, 0x03e0,
+  0x03e2, 0x03e2,
+  0x03e4, 0x03e4,
+  0x03e6, 0x03e6,
+  0x03e8, 0x03e8,
+  0x03ea, 0x03ea,
+  0x03ec, 0x03ec,
+  0x03ee, 0x03ee,
+  0x03f4, 0x03f4,
+  0x03f7, 0x03f7,
+  0x03f9, 0x03fa,
+  0x03fd, 0x042f,
+  0x0460, 0x0460,
+  0x0462, 0x0462,
+  0x0464, 0x0464,
+  0x0466, 0x0466,
+  0x0468, 0x0468,
+  0x046a, 0x046a,
+  0x046c, 0x046c,
+  0x046e, 0x046e,
+  0x0470, 0x0470,
+  0x0472, 0x0472,
+  0x0474, 0x0474,
+  0x0476, 0x0476,
+  0x0478, 0x0478,
+  0x047a, 0x047a,
+  0x047c, 0x047c,
+  0x047e, 0x047e,
+  0x0480, 0x0480,
+  0x048a, 0x048a,
+  0x048c, 0x048c,
+  0x048e, 0x048e,
+  0x0490, 0x0490,
+  0x0492, 0x0492,
+  0x0494, 0x0494,
+  0x0496, 0x0496,
+  0x0498, 0x0498,
+  0x049a, 0x049a,
+  0x049c, 0x049c,
+  0x049e, 0x049e,
+  0x04a0, 0x04a0,
+  0x04a2, 0x04a2,
+  0x04a4, 0x04a4,
+  0x04a6, 0x04a6,
+  0x04a8, 0x04a8,
+  0x04aa, 0x04aa,
+  0x04ac, 0x04ac,
+  0x04ae, 0x04ae,
+  0x04b0, 0x04b0,
+  0x04b2, 0x04b2,
+  0x04b4, 0x04b4,
+  0x04b6, 0x04b6,
+  0x04b8, 0x04b8,
+  0x04ba, 0x04ba,
+  0x04bc, 0x04bc,
+  0x04be, 0x04be,
+  0x04c0, 0x04c1,
+  0x04c3, 0x04c3,
+  0x04c5, 0x04c5,
+  0x04c7, 0x04c7,
+  0x04c9, 0x04c9,
+  0x04cb, 0x04cb,
+  0x04cd, 0x04cd,
+  0x04d0, 0x04d0,
+  0x04d2, 0x04d2,
+  0x04d4, 0x04d4,
+  0x04d6, 0x04d6,
+  0x04d8, 0x04d8,
+  0x04da, 0x04da,
+  0x04dc, 0x04dc,
+  0x04de, 0x04de,
+  0x04e0, 0x04e0,
+  0x04e2, 0x04e2,
+  0x04e4, 0x04e4,
+  0x04e6, 0x04e6,
+  0x04e8, 0x04e8,
+  0x04ea, 0x04ea,
+  0x04ec, 0x04ec,
+  0x04ee, 0x04ee,
+  0x04f0, 0x04f0,
+  0x04f2, 0x04f2,
+  0x04f4, 0x04f4,
+  0x04f6, 0x04f6,
+  0x04f8, 0x04f8,
+  0x0500, 0x0500,
+  0x0502, 0x0502,
+  0x0504, 0x0504,
+  0x0506, 0x0506,
+  0x0508, 0x0508,
+  0x050a, 0x050a,
+  0x050c, 0x050c,
+  0x050e, 0x050e,
+  0x0531, 0x0556,
+  0x10a0, 0x10c5,
+  0x1e00, 0x1e00,
+  0x1e02, 0x1e02,
+  0x1e04, 0x1e04,
+  0x1e06, 0x1e06,
+  0x1e08, 0x1e08,
+  0x1e0a, 0x1e0a,
+  0x1e0c, 0x1e0c,
+  0x1e0e, 0x1e0e,
+  0x1e10, 0x1e10,
+  0x1e12, 0x1e12,
+  0x1e14, 0x1e14,
+  0x1e16, 0x1e16,
+  0x1e18, 0x1e18,
+  0x1e1a, 0x1e1a,
+  0x1e1c, 0x1e1c,
+  0x1e1e, 0x1e1e,
+  0x1e20, 0x1e20,
+  0x1e22, 0x1e22,
+  0x1e24, 0x1e24,
+  0x1e26, 0x1e26,
+  0x1e28, 0x1e28,
+  0x1e2a, 0x1e2a,
+  0x1e2c, 0x1e2c,
+  0x1e2e, 0x1e2e,
+  0x1e30, 0x1e30,
+  0x1e32, 0x1e32,
+  0x1e34, 0x1e34,
+  0x1e36, 0x1e36,
+  0x1e38, 0x1e38,
+  0x1e3a, 0x1e3a,
+  0x1e3c, 0x1e3c,
+  0x1e3e, 0x1e3e,
+  0x1e40, 0x1e40,
+  0x1e42, 0x1e42,
+  0x1e44, 0x1e44,
+  0x1e46, 0x1e46,
+  0x1e48, 0x1e48,
+  0x1e4a, 0x1e4a,
+  0x1e4c, 0x1e4c,
+  0x1e4e, 0x1e4e,
+  0x1e50, 0x1e50,
+  0x1e52, 0x1e52,
+  0x1e54, 0x1e54,
+  0x1e56, 0x1e56,
+  0x1e58, 0x1e58,
+  0x1e5a, 0x1e5a,
+  0x1e5c, 0x1e5c,
+  0x1e5e, 0x1e5e,
+  0x1e60, 0x1e60,
+  0x1e62, 0x1e62,
+  0x1e64, 0x1e64,
+  0x1e66, 0x1e66,
+  0x1e68, 0x1e68,
+  0x1e6a, 0x1e6a,
+  0x1e6c, 0x1e6c,
+  0x1e6e, 0x1e6e,
+  0x1e70, 0x1e70,
+  0x1e72, 0x1e72,
+  0x1e74, 0x1e74,
+  0x1e76, 0x1e76,
+  0x1e78, 0x1e78,
+  0x1e7a, 0x1e7a,
+  0x1e7c, 0x1e7c,
+  0x1e7e, 0x1e7e,
+  0x1e80, 0x1e80,
+  0x1e82, 0x1e82,
+  0x1e84, 0x1e84,
+  0x1e86, 0x1e86,
+  0x1e88, 0x1e88,
+  0x1e8a, 0x1e8a,
+  0x1e8c, 0x1e8c,
+  0x1e8e, 0x1e8e,
+  0x1e90, 0x1e90,
+  0x1e92, 0x1e92,
+  0x1e94, 0x1e94,
+  0x1ea0, 0x1ea0,
+  0x1ea2, 0x1ea2,
+  0x1ea4, 0x1ea4,
+  0x1ea6, 0x1ea6,
+  0x1ea8, 0x1ea8,
+  0x1eaa, 0x1eaa,
+  0x1eac, 0x1eac,
+  0x1eae, 0x1eae,
+  0x1eb0, 0x1eb0,
+  0x1eb2, 0x1eb2,
+  0x1eb4, 0x1eb4,
+  0x1eb6, 0x1eb6,
+  0x1eb8, 0x1eb8,
+  0x1eba, 0x1eba,
+  0x1ebc, 0x1ebc,
+  0x1ebe, 0x1ebe,
+  0x1ec0, 0x1ec0,
+  0x1ec2, 0x1ec2,
+  0x1ec4, 0x1ec4,
+  0x1ec6, 0x1ec6,
+  0x1ec8, 0x1ec8,
+  0x1eca, 0x1eca,
+  0x1ecc, 0x1ecc,
+  0x1ece, 0x1ece,
+  0x1ed0, 0x1ed0,
+  0x1ed2, 0x1ed2,
+  0x1ed4, 0x1ed4,
+  0x1ed6, 0x1ed6,
+  0x1ed8, 0x1ed8,
+  0x1eda, 0x1eda,
+  0x1edc, 0x1edc,
+  0x1ede, 0x1ede,
+  0x1ee0, 0x1ee0,
+  0x1ee2, 0x1ee2,
+  0x1ee4, 0x1ee4,
+  0x1ee6, 0x1ee6,
+  0x1ee8, 0x1ee8,
+  0x1eea, 0x1eea,
+  0x1eec, 0x1eec,
+  0x1eee, 0x1eee,
+  0x1ef0, 0x1ef0,
+  0x1ef2, 0x1ef2,
+  0x1ef4, 0x1ef4,
+  0x1ef6, 0x1ef6,
+  0x1ef8, 0x1ef8,
+  0x1f08, 0x1f0f,
+  0x1f18, 0x1f1d,
+  0x1f28, 0x1f2f,
+  0x1f38, 0x1f3f,
+  0x1f48, 0x1f4d,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f5f,
+  0x1f68, 0x1f6f,
+  0x1fb8, 0x1fbb,
+  0x1fc8, 0x1fcb,
+  0x1fd8, 0x1fdb,
+  0x1fe8, 0x1fec,
+  0x1ff8, 0x1ffb,
+  0x2102, 0x2102,
+  0x2107, 0x2107,
+  0x210b, 0x210d,
+  0x2110, 0x2112,
+  0x2115, 0x2115,
+  0x2119, 0x211d,
+  0x2124, 0x2124,
+  0x2126, 0x2126,
+  0x2128, 0x2128,
+  0x212a, 0x212d,
+  0x2130, 0x2131,
+  0x2133, 0x2133,
+  0x213e, 0x213f,
+  0x2145, 0x2145,
+  0x2c00, 0x2c2e,
+  0x2c80, 0x2c80,
+  0x2c82, 0x2c82,
+  0x2c84, 0x2c84,
+  0x2c86, 0x2c86,
+  0x2c88, 0x2c88,
+  0x2c8a, 0x2c8a,
+  0x2c8c, 0x2c8c,
+  0x2c8e, 0x2c8e,
+  0x2c90, 0x2c90,
+  0x2c92, 0x2c92,
+  0x2c94, 0x2c94,
+  0x2c96, 0x2c96,
+  0x2c98, 0x2c98,
+  0x2c9a, 0x2c9a,
+  0x2c9c, 0x2c9c,
+  0x2c9e, 0x2c9e,
+  0x2ca0, 0x2ca0,
+  0x2ca2, 0x2ca2,
+  0x2ca4, 0x2ca4,
+  0x2ca6, 0x2ca6,
+  0x2ca8, 0x2ca8,
+  0x2caa, 0x2caa,
+  0x2cac, 0x2cac,
+  0x2cae, 0x2cae,
+  0x2cb0, 0x2cb0,
+  0x2cb2, 0x2cb2,
+  0x2cb4, 0x2cb4,
+  0x2cb6, 0x2cb6,
+  0x2cb8, 0x2cb8,
+  0x2cba, 0x2cba,
+  0x2cbc, 0x2cbc,
+  0x2cbe, 0x2cbe,
+  0x2cc0, 0x2cc0,
+  0x2cc2, 0x2cc2,
+  0x2cc4, 0x2cc4,
+  0x2cc6, 0x2cc6,
+  0x2cc8, 0x2cc8,
+  0x2cca, 0x2cca,
+  0x2ccc, 0x2ccc,
+  0x2cce, 0x2cce,
+  0x2cd0, 0x2cd0,
+  0x2cd2, 0x2cd2,
+  0x2cd4, 0x2cd4,
+  0x2cd6, 0x2cd6,
+  0x2cd8, 0x2cd8,
+  0x2cda, 0x2cda,
+  0x2cdc, 0x2cdc,
+  0x2cde, 0x2cde,
+  0x2ce0, 0x2ce0,
+  0x2ce2, 0x2ce2,
+  0xff21, 0xff3a,
+  0x10400, 0x10427,
+  0x1d400, 0x1d419,
+  0x1d434, 0x1d44d,
+  0x1d468, 0x1d481,
+  0x1d49c, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b5,
+  0x1d4d0, 0x1d4e9,
+  0x1d504, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d538, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d56c, 0x1d585,
+  0x1d5a0, 0x1d5b9,
+  0x1d5d4, 0x1d5ed,
+  0x1d608, 0x1d621,
+  0x1d63c, 0x1d655,
+  0x1d670, 0x1d689,
+  0x1d6a8, 0x1d6c0,
+  0x1d6e2, 0x1d6fa,
+  0x1d71c, 0x1d734,
+  0x1d756, 0x1d76e,
+  0x1d790, 0x1d7a8
+}; /* CR_Lu */
+
+/* 'M': Major Category */
+static const OnigCodePoint CR_M[] = {
+  133,
+  0x0300, 0x036f,
+  0x0483, 0x0486,
+  0x0488, 0x0489,
+  0x0591, 0x05b9,
+  0x05bb, 0x05bd,
+  0x05bf, 0x05bf,
+  0x05c1, 0x05c2,
+  0x05c4, 0x05c5,
+  0x05c7, 0x05c7,
+  0x0610, 0x0615,
+  0x064b, 0x065e,
+  0x0670, 0x0670,
+  0x06d6, 0x06dc,
+  0x06de, 0x06e4,
+  0x06e7, 0x06e8,
+  0x06ea, 0x06ed,
+  0x0711, 0x0711,
+  0x0730, 0x074a,
+  0x07a6, 0x07b0,
+  0x0901, 0x0903,
+  0x093c, 0x093c,
+  0x093e, 0x094d,
+  0x0951, 0x0954,
+  0x0962, 0x0963,
+  0x0981, 0x0983,
+  0x09bc, 0x09bc,
+  0x09be, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09cd,
+  0x09d7, 0x09d7,
+  0x09e2, 0x09e3,
+  0x0a01, 0x0a03,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a70, 0x0a71,
+  0x0a81, 0x0a83,
+  0x0abc, 0x0abc,
+  0x0abe, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ae2, 0x0ae3,
+  0x0b01, 0x0b03,
+  0x0b3c, 0x0b3c,
+  0x0b3e, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b82, 0x0b82,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0c01, 0x0c03,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c82, 0x0c83,
+  0x0cbc, 0x0cbc,
+  0x0cbe, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0d02, 0x0d03,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d82, 0x0d83,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df3,
+  0x0e31, 0x0e31,
+  0x0e34, 0x0e3a,
+  0x0e47, 0x0e4e,
+  0x0eb1, 0x0eb1,
+  0x0eb4, 0x0eb9,
+  0x0ebb, 0x0ebc,
+  0x0ec8, 0x0ecd,
+  0x0f18, 0x0f19,
+  0x0f35, 0x0f35,
+  0x0f37, 0x0f37,
+  0x0f39, 0x0f39,
+  0x0f3e, 0x0f3f,
+  0x0f71, 0x0f84,
+  0x0f86, 0x0f87,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fc6, 0x0fc6,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1056, 0x1059,
+  0x135f, 0x135f,
+  0x1712, 0x1714,
+  0x1732, 0x1734,
+  0x1752, 0x1753,
+  0x1772, 0x1773,
+  0x17b6, 0x17d3,
+  0x17dd, 0x17dd,
+  0x180b, 0x180d,
+  0x18a9, 0x18a9,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x19b0, 0x19c0,
+  0x19c8, 0x19c9,
+  0x1a17, 0x1a1b,
+  0x1dc0, 0x1dc3,
+  0x20d0, 0x20eb,
+  0x302a, 0x302f,
+  0x3099, 0x309a,
+  0xa802, 0xa802,
+  0xa806, 0xa806,
+  0xa80b, 0xa80b,
+  0xa823, 0xa827,
+  0xfb1e, 0xfb1e,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0x10a01, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a0f,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a3f,
+  0x1d165, 0x1d169,
+  0x1d16d, 0x1d172,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0x1d242, 0x1d244,
+  0xe0100, 0xe01ef
+}; /* CR_M */
+
+/* 'Mc': General Category */
+static const OnigCodePoint CR_Mc[] = {
+  63,
+  0x0903, 0x0903,
+  0x093e, 0x0940,
+  0x0949, 0x094c,
+  0x0982, 0x0983,
+  0x09be, 0x09c0,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09cc,
+  0x09d7, 0x09d7,
+  0x0a03, 0x0a03,
+  0x0a3e, 0x0a40,
+  0x0a83, 0x0a83,
+  0x0abe, 0x0ac0,
+  0x0ac9, 0x0ac9,
+  0x0acb, 0x0acc,
+  0x0b02, 0x0b03,
+  0x0b3e, 0x0b3e,
+  0x0b40, 0x0b40,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4c,
+  0x0b57, 0x0b57,
+  0x0bbe, 0x0bbf,
+  0x0bc1, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcc,
+  0x0bd7, 0x0bd7,
+  0x0c01, 0x0c03,
+  0x0c41, 0x0c44,
+  0x0c82, 0x0c83,
+  0x0cbe, 0x0cbe,
+  0x0cc0, 0x0cc4,
+  0x0cc7, 0x0cc8,
+  0x0cca, 0x0ccb,
+  0x0cd5, 0x0cd6,
+  0x0d02, 0x0d03,
+  0x0d3e, 0x0d40,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4c,
+  0x0d57, 0x0d57,
+  0x0d82, 0x0d83,
+  0x0dcf, 0x0dd1,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df3,
+  0x0f3e, 0x0f3f,
+  0x0f7f, 0x0f7f,
+  0x102c, 0x102c,
+  0x1031, 0x1031,
+  0x1038, 0x1038,
+  0x1056, 0x1057,
+  0x17b6, 0x17b6,
+  0x17be, 0x17c5,
+  0x17c7, 0x17c8,
+  0x1923, 0x1926,
+  0x1929, 0x192b,
+  0x1930, 0x1931,
+  0x1933, 0x1938,
+  0x19b0, 0x19c0,
+  0x19c8, 0x19c9,
+  0x1a19, 0x1a1b,
+  0xa802, 0xa802,
+  0xa823, 0xa824,
+  0xa827, 0xa827,
+  0x1d165, 0x1d166,
+  0x1d16d, 0x1d172
+}; /* CR_Mc */
+
+/* 'Me': General Category */
+static const OnigCodePoint CR_Me[] = {
+  4,
+  0x0488, 0x0489,
+  0x06de, 0x06de,
+  0x20dd, 0x20e0,
+  0x20e2, 0x20e4
+}; /* CR_Me */
+
+/* 'Mn': General Category */
+static const OnigCodePoint CR_Mn[] = {
+  124,
+  0x0300, 0x036f,
+  0x0483, 0x0486,
+  0x0591, 0x05b9,
+  0x05bb, 0x05bd,
+  0x05bf, 0x05bf,
+  0x05c1, 0x05c2,
+  0x05c4, 0x05c5,
+  0x05c7, 0x05c7,
+  0x0610, 0x0615,
+  0x064b, 0x065e,
+  0x0670, 0x0670,
+  0x06d6, 0x06dc,
+  0x06df, 0x06e4,
+  0x06e7, 0x06e8,
+  0x06ea, 0x06ed,
+  0x0711, 0x0711,
+  0x0730, 0x074a,
+  0x07a6, 0x07b0,
+  0x0901, 0x0902,
+  0x093c, 0x093c,
+  0x0941, 0x0948,
+  0x094d, 0x094d,
+  0x0951, 0x0954,
+  0x0962, 0x0963,
+  0x0981, 0x0981,
+  0x09bc, 0x09bc,
+  0x09c1, 0x09c4,
+  0x09cd, 0x09cd,
+  0x09e2, 0x09e3,
+  0x0a01, 0x0a02,
+  0x0a3c, 0x0a3c,
+  0x0a41, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a70, 0x0a71,
+  0x0a81, 0x0a82,
+  0x0abc, 0x0abc,
+  0x0ac1, 0x0ac5,
+  0x0ac7, 0x0ac8,
+  0x0acd, 0x0acd,
+  0x0ae2, 0x0ae3,
+  0x0b01, 0x0b01,
+  0x0b3c, 0x0b3c,
+  0x0b3f, 0x0b3f,
+  0x0b41, 0x0b43,
+  0x0b4d, 0x0b4d,
+  0x0b56, 0x0b56,
+  0x0b82, 0x0b82,
+  0x0bc0, 0x0bc0,
+  0x0bcd, 0x0bcd,
+  0x0c3e, 0x0c40,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0cbc, 0x0cbc,
+  0x0cbf, 0x0cbf,
+  0x0cc6, 0x0cc6,
+  0x0ccc, 0x0ccd,
+  0x0d41, 0x0d43,
+  0x0d4d, 0x0d4d,
+  0x0dca, 0x0dca,
+  0x0dd2, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0e31, 0x0e31,
+  0x0e34, 0x0e3a,
+  0x0e47, 0x0e4e,
+  0x0eb1, 0x0eb1,
+  0x0eb4, 0x0eb9,
+  0x0ebb, 0x0ebc,
+  0x0ec8, 0x0ecd,
+  0x0f18, 0x0f19,
+  0x0f35, 0x0f35,
+  0x0f37, 0x0f37,
+  0x0f39, 0x0f39,
+  0x0f71, 0x0f7e,
+  0x0f80, 0x0f84,
+  0x0f86, 0x0f87,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fc6, 0x0fc6,
+  0x102d, 0x1030,
+  0x1032, 0x1032,
+  0x1036, 0x1037,
+  0x1039, 0x1039,
+  0x1058, 0x1059,
+  0x135f, 0x135f,
+  0x1712, 0x1714,
+  0x1732, 0x1734,
+  0x1752, 0x1753,
+  0x1772, 0x1773,
+  0x17b7, 0x17bd,
+  0x17c6, 0x17c6,
+  0x17c9, 0x17d3,
+  0x17dd, 0x17dd,
+  0x180b, 0x180d,
+  0x18a9, 0x18a9,
+  0x1920, 0x1922,
+  0x1927, 0x1928,
+  0x1932, 0x1932,
+  0x1939, 0x193b,
+  0x1a17, 0x1a18,
+  0x1dc0, 0x1dc3,
+  0x20d0, 0x20dc,
+  0x20e1, 0x20e1,
+  0x20e5, 0x20eb,
+  0x302a, 0x302f,
+  0x3099, 0x309a,
+  0xa806, 0xa806,
+  0xa80b, 0xa80b,
+  0xa825, 0xa826,
+  0xfb1e, 0xfb1e,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0x10a01, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a0f,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a3f,
+  0x1d167, 0x1d169,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0x1d242, 0x1d244,
+  0xe0100, 0xe01ef
+}; /* CR_Mn */
+
+/* 'N': Major Category */
+static const OnigCodePoint CR_N[] = {
+  53,
+  0x0030, 0x0039,
+  0x00b2, 0x00b3,
+  0x00b9, 0x00b9,
+  0x00bc, 0x00be,
+  0x0660, 0x0669,
+  0x06f0, 0x06f9,
+  0x0966, 0x096f,
+  0x09e6, 0x09ef,
+  0x09f4, 0x09f9,
+  0x0a66, 0x0a6f,
+  0x0ae6, 0x0aef,
+  0x0b66, 0x0b6f,
+  0x0be6, 0x0bf2,
+  0x0c66, 0x0c6f,
+  0x0ce6, 0x0cef,
+  0x0d66, 0x0d6f,
+  0x0e50, 0x0e59,
+  0x0ed0, 0x0ed9,
+  0x0f20, 0x0f33,
+  0x1040, 0x1049,
+  0x1369, 0x137c,
+  0x16ee, 0x16f0,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x1810, 0x1819,
+  0x1946, 0x194f,
+  0x19d0, 0x19d9,
+  0x2070, 0x2070,
+  0x2074, 0x2079,
+  0x2080, 0x2089,
+  0x2153, 0x2183,
+  0x2460, 0x249b,
+  0x24ea, 0x24ff,
+  0x2776, 0x2793,
+  0x2cfd, 0x2cfd,
+  0x3007, 0x3007,
+  0x3021, 0x3029,
+  0x3038, 0x303a,
+  0x3192, 0x3195,
+  0x3220, 0x3229,
+  0x3251, 0x325f,
+  0x3280, 0x3289,
+  0x32b1, 0x32bf,
+  0xff10, 0xff19,
+  0x10107, 0x10133,
+  0x10140, 0x10178,
+  0x1018a, 0x1018a,
+  0x10320, 0x10323,
+  0x1034a, 0x1034a,
+  0x103d1, 0x103d5,
+  0x104a0, 0x104a9,
+  0x10a40, 0x10a47,
+  0x1d7ce, 0x1d7ff
+}; /* CR_N */
+
+/* 'Nd': General Category */
+static const OnigCodePoint CR_Nd[] = {
+  23,
+  0x0030, 0x0039,
+  0x0660, 0x0669,
+  0x06f0, 0x06f9,
+  0x0966, 0x096f,
+  0x09e6, 0x09ef,
+  0x0a66, 0x0a6f,
+  0x0ae6, 0x0aef,
+  0x0b66, 0x0b6f,
+  0x0be6, 0x0bef,
+  0x0c66, 0x0c6f,
+  0x0ce6, 0x0cef,
+  0x0d66, 0x0d6f,
+  0x0e50, 0x0e59,
+  0x0ed0, 0x0ed9,
+  0x0f20, 0x0f29,
+  0x1040, 0x1049,
+  0x17e0, 0x17e9,
+  0x1810, 0x1819,
+  0x1946, 0x194f,
+  0x19d0, 0x19d9,
+  0xff10, 0xff19,
+  0x104a0, 0x104a9,
+  0x1d7ce, 0x1d7ff
+}; /* CR_Nd */
+
+/* 'Nl': General Category */
+static const OnigCodePoint CR_Nl[] = {
+  8,
+  0x16ee, 0x16f0,
+  0x2160, 0x2183,
+  0x3007, 0x3007,
+  0x3021, 0x3029,
+  0x3038, 0x303a,
+  0x10140, 0x10174,
+  0x1034a, 0x1034a,
+  0x103d1, 0x103d5
+}; /* CR_Nl */
+
+/* 'No': General Category */
+static const OnigCodePoint CR_No[] = {
+  26,
+  0x00b2, 0x00b3,
+  0x00b9, 0x00b9,
+  0x00bc, 0x00be,
+  0x09f4, 0x09f9,
+  0x0bf0, 0x0bf2,
+  0x0f2a, 0x0f33,
+  0x1369, 0x137c,
+  0x17f0, 0x17f9,
+  0x2070, 0x2070,
+  0x2074, 0x2079,
+  0x2080, 0x2089,
+  0x2153, 0x215f,
+  0x2460, 0x249b,
+  0x24ea, 0x24ff,
+  0x2776, 0x2793,
+  0x2cfd, 0x2cfd,
+  0x3192, 0x3195,
+  0x3220, 0x3229,
+  0x3251, 0x325f,
+  0x3280, 0x3289,
+  0x32b1, 0x32bf,
+  0x10107, 0x10133,
+  0x10175, 0x10178,
+  0x1018a, 0x1018a,
+  0x10320, 0x10323,
+  0x10a40, 0x10a47
+}; /* CR_No */
+
+/* 'P': Major Category */
+static const OnigCodePoint CR_P[] = {
+  96,
+  0x0021, 0x0023,
+  0x0025, 0x002a,
+  0x002c, 0x002f,
+  0x003a, 0x003b,
+  0x003f, 0x0040,
+  0x005b, 0x005d,
+  0x005f, 0x005f,
+  0x007b, 0x007b,
+  0x007d, 0x007d,
+  0x00a1, 0x00a1,
+  0x00ab, 0x00ab,
+  0x00b7, 0x00b7,
+  0x00bb, 0x00bb,
+  0x00bf, 0x00bf,
+  0x037e, 0x037e,
+  0x0387, 0x0387,
+  0x055a, 0x055f,
+  0x0589, 0x058a,
+  0x05be, 0x05be,
+  0x05c0, 0x05c0,
+  0x05c3, 0x05c3,
+  0x05c6, 0x05c6,
+  0x05f3, 0x05f4,
+  0x060c, 0x060d,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x066a, 0x066d,
+  0x06d4, 0x06d4,
+  0x0700, 0x070d,
+  0x0964, 0x0965,
+  0x0970, 0x0970,
+  0x0df4, 0x0df4,
+  0x0e4f, 0x0e4f,
+  0x0e5a, 0x0e5b,
+  0x0f04, 0x0f12,
+  0x0f3a, 0x0f3d,
+  0x0f85, 0x0f85,
+  0x0fd0, 0x0fd1,
+  0x104a, 0x104f,
+  0x10fb, 0x10fb,
+  0x1361, 0x1368,
+  0x166d, 0x166e,
+  0x169b, 0x169c,
+  0x16eb, 0x16ed,
+  0x1735, 0x1736,
+  0x17d4, 0x17d6,
+  0x17d8, 0x17da,
+  0x1800, 0x180a,
+  0x1944, 0x1945,
+  0x19de, 0x19df,
+  0x1a1e, 0x1a1f,
+  0x2010, 0x2027,
+  0x2030, 0x2043,
+  0x2045, 0x2051,
+  0x2053, 0x205e,
+  0x207d, 0x207e,
+  0x208d, 0x208e,
+  0x2329, 0x232a,
+  0x23b4, 0x23b6,
+  0x2768, 0x2775,
+  0x27c5, 0x27c6,
+  0x27e6, 0x27eb,
+  0x2983, 0x2998,
+  0x29d8, 0x29db,
+  0x29fc, 0x29fd,
+  0x2cf9, 0x2cfc,
+  0x2cfe, 0x2cff,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x3001, 0x3003,
+  0x3008, 0x3011,
+  0x3014, 0x301f,
+  0x3030, 0x3030,
+  0x303d, 0x303d,
+  0x30a0, 0x30a0,
+  0x30fb, 0x30fb,
+  0xfd3e, 0xfd3f,
+  0xfe10, 0xfe19,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe61,
+  0xfe63, 0xfe63,
+  0xfe68, 0xfe68,
+  0xfe6a, 0xfe6b,
+  0xff01, 0xff03,
+  0xff05, 0xff0a,
+  0xff0c, 0xff0f,
+  0xff1a, 0xff1b,
+  0xff1f, 0xff20,
+  0xff3b, 0xff3d,
+  0xff3f, 0xff3f,
+  0xff5b, 0xff5b,
+  0xff5d, 0xff5d,
+  0xff5f, 0xff65,
+  0x10100, 0x10101,
+  0x1039f, 0x1039f,
+  0x10a50, 0x10a58
+}; /* CR_P */
+
+/* 'Pc': General Category */
+static const OnigCodePoint CR_Pc[] = {
+  6,
+  0x005f, 0x005f,
+  0x203f, 0x2040,
+  0x2054, 0x2054,
+  0xfe33, 0xfe34,
+  0xfe4d, 0xfe4f,
+  0xff3f, 0xff3f
+}; /* CR_Pc */
+
+/* 'Pd': General Category */
+static const OnigCodePoint CR_Pd[] = {
+  12,
+  0x002d, 0x002d,
+  0x058a, 0x058a,
+  0x1806, 0x1806,
+  0x2010, 0x2015,
+  0x2e17, 0x2e17,
+  0x301c, 0x301c,
+  0x3030, 0x3030,
+  0x30a0, 0x30a0,
+  0xfe31, 0xfe32,
+  0xfe58, 0xfe58,
+  0xfe63, 0xfe63,
+  0xff0d, 0xff0d
+}; /* CR_Pd */
+
+/* 'Pe': General Category */
+static const OnigCodePoint CR_Pe[] = {
+  65,
+  0x0029, 0x0029,
+  0x005d, 0x005d,
+  0x007d, 0x007d,
+  0x0f3b, 0x0f3b,
+  0x0f3d, 0x0f3d,
+  0x169c, 0x169c,
+  0x2046, 0x2046,
+  0x207e, 0x207e,
+  0x208e, 0x208e,
+  0x232a, 0x232a,
+  0x23b5, 0x23b5,
+  0x2769, 0x2769,
+  0x276b, 0x276b,
+  0x276d, 0x276d,
+  0x276f, 0x276f,
+  0x2771, 0x2771,
+  0x2773, 0x2773,
+  0x2775, 0x2775,
+  0x27c6, 0x27c6,
+  0x27e7, 0x27e7,
+  0x27e9, 0x27e9,
+  0x27eb, 0x27eb,
+  0x2984, 0x2984,
+  0x2986, 0x2986,
+  0x2988, 0x2988,
+  0x298a, 0x298a,
+  0x298c, 0x298c,
+  0x298e, 0x298e,
+  0x2990, 0x2990,
+  0x2992, 0x2992,
+  0x2994, 0x2994,
+  0x2996, 0x2996,
+  0x2998, 0x2998,
+  0x29d9, 0x29d9,
+  0x29db, 0x29db,
+  0x29fd, 0x29fd,
+  0x3009, 0x3009,
+  0x300b, 0x300b,
+  0x300d, 0x300d,
+  0x300f, 0x300f,
+  0x3011, 0x3011,
+  0x3015, 0x3015,
+  0x3017, 0x3017,
+  0x3019, 0x3019,
+  0x301b, 0x301b,
+  0x301e, 0x301f,
+  0xfd3f, 0xfd3f,
+  0xfe18, 0xfe18,
+  0xfe36, 0xfe36,
+  0xfe38, 0xfe38,
+  0xfe3a, 0xfe3a,
+  0xfe3c, 0xfe3c,
+  0xfe3e, 0xfe3e,
+  0xfe40, 0xfe40,
+  0xfe42, 0xfe42,
+  0xfe44, 0xfe44,
+  0xfe48, 0xfe48,
+  0xfe5a, 0xfe5a,
+  0xfe5c, 0xfe5c,
+  0xfe5e, 0xfe5e,
+  0xff09, 0xff09,
+  0xff3d, 0xff3d,
+  0xff5d, 0xff5d,
+  0xff60, 0xff60,
+  0xff63, 0xff63
+}; /* CR_Pe */
+
+/* 'Pf': General Category */
+static const OnigCodePoint CR_Pf[] = {
+  9,
+  0x00bb, 0x00bb,
+  0x2019, 0x2019,
+  0x201d, 0x201d,
+  0x203a, 0x203a,
+  0x2e03, 0x2e03,
+  0x2e05, 0x2e05,
+  0x2e0a, 0x2e0a,
+  0x2e0d, 0x2e0d,
+  0x2e1d, 0x2e1d
+}; /* CR_Pf */
+
+/* 'Pi': General Category */
+static const OnigCodePoint CR_Pi[] = {
+  10,
+  0x00ab, 0x00ab,
+  0x2018, 0x2018,
+  0x201b, 0x201c,
+  0x201f, 0x201f,
+  0x2039, 0x2039,
+  0x2e02, 0x2e02,
+  0x2e04, 0x2e04,
+  0x2e09, 0x2e09,
+  0x2e0c, 0x2e0c,
+  0x2e1c, 0x2e1c
+}; /* CR_Pi */
+
+/* 'Po': General Category */
+static const OnigCodePoint CR_Po[] = {
+  88,
+  0x0021, 0x0023,
+  0x0025, 0x0027,
+  0x002a, 0x002a,
+  0x002c, 0x002c,
+  0x002e, 0x002f,
+  0x003a, 0x003b,
+  0x003f, 0x0040,
+  0x005c, 0x005c,
+  0x00a1, 0x00a1,
+  0x00b7, 0x00b7,
+  0x00bf, 0x00bf,
+  0x037e, 0x037e,
+  0x0387, 0x0387,
+  0x055a, 0x055f,
+  0x0589, 0x0589,
+  0x05be, 0x05be,
+  0x05c0, 0x05c0,
+  0x05c3, 0x05c3,
+  0x05c6, 0x05c6,
+  0x05f3, 0x05f4,
+  0x060c, 0x060d,
+  0x061b, 0x061b,
+  0x061e, 0x061f,
+  0x066a, 0x066d,
+  0x06d4, 0x06d4,
+  0x0700, 0x070d,
+  0x0964, 0x0965,
+  0x0970, 0x0970,
+  0x0df4, 0x0df4,
+  0x0e4f, 0x0e4f,
+  0x0e5a, 0x0e5b,
+  0x0f04, 0x0f12,
+  0x0f85, 0x0f85,
+  0x0fd0, 0x0fd1,
+  0x104a, 0x104f,
+  0x10fb, 0x10fb,
+  0x1361, 0x1368,
+  0x166d, 0x166e,
+  0x16eb, 0x16ed,
+  0x1735, 0x1736,
+  0x17d4, 0x17d6,
+  0x17d8, 0x17da,
+  0x1800, 0x1805,
+  0x1807, 0x180a,
+  0x1944, 0x1945,
+  0x19de, 0x19df,
+  0x1a1e, 0x1a1f,
+  0x2016, 0x2017,
+  0x2020, 0x2027,
+  0x2030, 0x2038,
+  0x203b, 0x203e,
+  0x2041, 0x2043,
+  0x2047, 0x2051,
+  0x2053, 0x2053,
+  0x2055, 0x205e,
+  0x23b6, 0x23b6,
+  0x2cf9, 0x2cfc,
+  0x2cfe, 0x2cff,
+  0x2e00, 0x2e01,
+  0x2e06, 0x2e08,
+  0x2e0b, 0x2e0b,
+  0x2e0e, 0x2e16,
+  0x3001, 0x3003,
+  0x303d, 0x303d,
+  0x30fb, 0x30fb,
+  0xfe10, 0xfe16,
+  0xfe19, 0xfe19,
+  0xfe30, 0xfe30,
+  0xfe45, 0xfe46,
+  0xfe49, 0xfe4c,
+  0xfe50, 0xfe52,
+  0xfe54, 0xfe57,
+  0xfe5f, 0xfe61,
+  0xfe68, 0xfe68,
+  0xfe6a, 0xfe6b,
+  0xff01, 0xff03,
+  0xff05, 0xff07,
+  0xff0a, 0xff0a,
+  0xff0c, 0xff0c,
+  0xff0e, 0xff0f,
+  0xff1a, 0xff1b,
+  0xff1f, 0xff20,
+  0xff3c, 0xff3c,
+  0xff61, 0xff61,
+  0xff64, 0xff65,
+  0x10100, 0x10101,
+  0x1039f, 0x1039f,
+  0x10a50, 0x10a58
+}; /* CR_Po */
+
+/* 'Ps': General Category */
+static const OnigCodePoint CR_Ps[] = {
+  67,
+  0x0028, 0x0028,
+  0x005b, 0x005b,
+  0x007b, 0x007b,
+  0x0f3a, 0x0f3a,
+  0x0f3c, 0x0f3c,
+  0x169b, 0x169b,
+  0x201a, 0x201a,
+  0x201e, 0x201e,
+  0x2045, 0x2045,
+  0x207d, 0x207d,
+  0x208d, 0x208d,
+  0x2329, 0x2329,
+  0x23b4, 0x23b4,
+  0x2768, 0x2768,
+  0x276a, 0x276a,
+  0x276c, 0x276c,
+  0x276e, 0x276e,
+  0x2770, 0x2770,
+  0x2772, 0x2772,
+  0x2774, 0x2774,
+  0x27c5, 0x27c5,
+  0x27e6, 0x27e6,
+  0x27e8, 0x27e8,
+  0x27ea, 0x27ea,
+  0x2983, 0x2983,
+  0x2985, 0x2985,
+  0x2987, 0x2987,
+  0x2989, 0x2989,
+  0x298b, 0x298b,
+  0x298d, 0x298d,
+  0x298f, 0x298f,
+  0x2991, 0x2991,
+  0x2993, 0x2993,
+  0x2995, 0x2995,
+  0x2997, 0x2997,
+  0x29d8, 0x29d8,
+  0x29da, 0x29da,
+  0x29fc, 0x29fc,
+  0x3008, 0x3008,
+  0x300a, 0x300a,
+  0x300c, 0x300c,
+  0x300e, 0x300e,
+  0x3010, 0x3010,
+  0x3014, 0x3014,
+  0x3016, 0x3016,
+  0x3018, 0x3018,
+  0x301a, 0x301a,
+  0x301d, 0x301d,
+  0xfd3e, 0xfd3e,
+  0xfe17, 0xfe17,
+  0xfe35, 0xfe35,
+  0xfe37, 0xfe37,
+  0xfe39, 0xfe39,
+  0xfe3b, 0xfe3b,
+  0xfe3d, 0xfe3d,
+  0xfe3f, 0xfe3f,
+  0xfe41, 0xfe41,
+  0xfe43, 0xfe43,
+  0xfe47, 0xfe47,
+  0xfe59, 0xfe59,
+  0xfe5b, 0xfe5b,
+  0xfe5d, 0xfe5d,
+  0xff08, 0xff08,
+  0xff3b, 0xff3b,
+  0xff5b, 0xff5b,
+  0xff5f, 0xff5f,
+  0xff62, 0xff62
+}; /* CR_Ps */
+
+/* 'S': Major Category */
+static const OnigCodePoint CR_S[] = {
+  162,
+  0x0024, 0x0024,
+  0x002b, 0x002b,
+  0x003c, 0x003e,
+  0x005e, 0x005e,
+  0x0060, 0x0060,
+  0x007c, 0x007c,
+  0x007e, 0x007e,
+  0x00a2, 0x00a9,
+  0x00ac, 0x00ac,
+  0x00ae, 0x00b1,
+  0x00b4, 0x00b4,
+  0x00b6, 0x00b6,
+  0x00b8, 0x00b8,
+  0x00d7, 0x00d7,
+  0x00f7, 0x00f7,
+  0x02c2, 0x02c5,
+  0x02d2, 0x02df,
+  0x02e5, 0x02ed,
+  0x02ef, 0x02ff,
+  0x0374, 0x0375,
+  0x0384, 0x0385,
+  0x03f6, 0x03f6,
+  0x0482, 0x0482,
+  0x060b, 0x060b,
+  0x060e, 0x060f,
+  0x06e9, 0x06e9,
+  0x06fd, 0x06fe,
+  0x09f2, 0x09f3,
+  0x09fa, 0x09fa,
+  0x0af1, 0x0af1,
+  0x0b70, 0x0b70,
+  0x0bf3, 0x0bfa,
+  0x0e3f, 0x0e3f,
+  0x0f01, 0x0f03,
+  0x0f13, 0x0f17,
+  0x0f1a, 0x0f1f,
+  0x0f34, 0x0f34,
+  0x0f36, 0x0f36,
+  0x0f38, 0x0f38,
+  0x0fbe, 0x0fc5,
+  0x0fc7, 0x0fcc,
+  0x0fcf, 0x0fcf,
+  0x1360, 0x1360,
+  0x1390, 0x1399,
+  0x17db, 0x17db,
+  0x1940, 0x1940,
+  0x19e0, 0x19ff,
+  0x1fbd, 0x1fbd,
+  0x1fbf, 0x1fc1,
+  0x1fcd, 0x1fcf,
+  0x1fdd, 0x1fdf,
+  0x1fed, 0x1fef,
+  0x1ffd, 0x1ffe,
+  0x2044, 0x2044,
+  0x2052, 0x2052,
+  0x207a, 0x207c,
+  0x208a, 0x208c,
+  0x20a0, 0x20b5,
+  0x2100, 0x2101,
+  0x2103, 0x2106,
+  0x2108, 0x2109,
+  0x2114, 0x2114,
+  0x2116, 0x2118,
+  0x211e, 0x2123,
+  0x2125, 0x2125,
+  0x2127, 0x2127,
+  0x2129, 0x2129,
+  0x212e, 0x212e,
+  0x2132, 0x2132,
+  0x213a, 0x213b,
+  0x2140, 0x2144,
+  0x214a, 0x214c,
+  0x2190, 0x2328,
+  0x232b, 0x23b3,
+  0x23b7, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x249c, 0x24e9,
+  0x2500, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2767,
+  0x2794, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x27c0, 0x27c4,
+  0x27d0, 0x27e5,
+  0x27f0, 0x2982,
+  0x2999, 0x29d7,
+  0x29dc, 0x29fb,
+  0x29fe, 0x2b13,
+  0x2ce5, 0x2cea,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x2ff0, 0x2ffb,
+  0x3004, 0x3004,
+  0x3012, 0x3013,
+  0x3020, 0x3020,
+  0x3036, 0x3037,
+  0x303e, 0x303f,
+  0x309b, 0x309c,
+  0x3190, 0x3191,
+  0x3196, 0x319f,
+  0x31c0, 0x31cf,
+  0x3200, 0x321e,
+  0x322a, 0x3243,
+  0x3250, 0x3250,
+  0x3260, 0x327f,
+  0x328a, 0x32b0,
+  0x32c0, 0x32fe,
+  0x3300, 0x33ff,
+  0x4dc0, 0x4dff,
+  0xa490, 0xa4c6,
+  0xa700, 0xa716,
+  0xa828, 0xa82b,
+  0xfb29, 0xfb29,
+  0xfdfc, 0xfdfd,
+  0xfe62, 0xfe62,
+  0xfe64, 0xfe66,
+  0xfe69, 0xfe69,
+  0xff04, 0xff04,
+  0xff0b, 0xff0b,
+  0xff1c, 0xff1e,
+  0xff3e, 0xff3e,
+  0xff40, 0xff40,
+  0xff5c, 0xff5c,
+  0xff5e, 0xff5e,
+  0xffe0, 0xffe6,
+  0xffe8, 0xffee,
+  0xfffc, 0xfffd,
+  0x10102, 0x10102,
+  0x10137, 0x1013f,
+  0x10179, 0x10189,
+  0x103d0, 0x103d0,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d164,
+  0x1d16a, 0x1d16c,
+  0x1d183, 0x1d184,
+  0x1d18c, 0x1d1a9,
+  0x1d1ae, 0x1d1dd,
+  0x1d200, 0x1d241,
+  0x1d245, 0x1d245,
+  0x1d300, 0x1d356,
+  0x1d6c1, 0x1d6c1,
+  0x1d6db, 0x1d6db,
+  0x1d6fb, 0x1d6fb,
+  0x1d715, 0x1d715,
+  0x1d735, 0x1d735,
+  0x1d74f, 0x1d74f,
+  0x1d76f, 0x1d76f,
+  0x1d789, 0x1d789,
+  0x1d7a9, 0x1d7a9,
+  0x1d7c3, 0x1d7c3
+}; /* CR_S */
+
+/* 'Sc': General Category */
+static const OnigCodePoint CR_Sc[] = {
+  14,
+  0x0024, 0x0024,
+  0x00a2, 0x00a5,
+  0x060b, 0x060b,
+  0x09f2, 0x09f3,
+  0x0af1, 0x0af1,
+  0x0bf9, 0x0bf9,
+  0x0e3f, 0x0e3f,
+  0x17db, 0x17db,
+  0x20a0, 0x20b5,
+  0xfdfc, 0xfdfc,
+  0xfe69, 0xfe69,
+  0xff04, 0xff04,
+  0xffe0, 0xffe1,
+  0xffe5, 0xffe6
+}; /* CR_Sc */
+
+/* 'Sk': General Category */
+static const OnigCodePoint CR_Sk[] = {
+  23,
+  0x005e, 0x005e,
+  0x0060, 0x0060,
+  0x00a8, 0x00a8,
+  0x00af, 0x00af,
+  0x00b4, 0x00b4,
+  0x00b8, 0x00b8,
+  0x02c2, 0x02c5,
+  0x02d2, 0x02df,
+  0x02e5, 0x02ed,
+  0x02ef, 0x02ff,
+  0x0374, 0x0375,
+  0x0384, 0x0385,
+  0x1fbd, 0x1fbd,
+  0x1fbf, 0x1fc1,
+  0x1fcd, 0x1fcf,
+  0x1fdd, 0x1fdf,
+  0x1fed, 0x1fef,
+  0x1ffd, 0x1ffe,
+  0x309b, 0x309c,
+  0xa700, 0xa716,
+  0xff3e, 0xff3e,
+  0xff40, 0xff40,
+  0xffe3, 0xffe3
+}; /* CR_Sk */
+
+/* 'Sm': General Category */
+static const OnigCodePoint CR_Sm[] = {
+  59,
+  0x002b, 0x002b,
+  0x003c, 0x003e,
+  0x007c, 0x007c,
+  0x007e, 0x007e,
+  0x00ac, 0x00ac,
+  0x00b1, 0x00b1,
+  0x00d7, 0x00d7,
+  0x00f7, 0x00f7,
+  0x03f6, 0x03f6,
+  0x2044, 0x2044,
+  0x2052, 0x2052,
+  0x207a, 0x207c,
+  0x208a, 0x208c,
+  0x2140, 0x2144,
+  0x214b, 0x214b,
+  0x2190, 0x2194,
+  0x219a, 0x219b,
+  0x21a0, 0x21a0,
+  0x21a3, 0x21a3,
+  0x21a6, 0x21a6,
+  0x21ae, 0x21ae,
+  0x21ce, 0x21cf,
+  0x21d2, 0x21d2,
+  0x21d4, 0x21d4,
+  0x21f4, 0x22ff,
+  0x2308, 0x230b,
+  0x2320, 0x2321,
+  0x237c, 0x237c,
+  0x239b, 0x23b3,
+  0x25b7, 0x25b7,
+  0x25c1, 0x25c1,
+  0x25f8, 0x25ff,
+  0x266f, 0x266f,
+  0x27c0, 0x27c4,
+  0x27d0, 0x27e5,
+  0x27f0, 0x27ff,
+  0x2900, 0x2982,
+  0x2999, 0x29d7,
+  0x29dc, 0x29fb,
+  0x29fe, 0x2aff,
+  0xfb29, 0xfb29,
+  0xfe62, 0xfe62,
+  0xfe64, 0xfe66,
+  0xff0b, 0xff0b,
+  0xff1c, 0xff1e,
+  0xff5c, 0xff5c,
+  0xff5e, 0xff5e,
+  0xffe2, 0xffe2,
+  0xffe9, 0xffec,
+  0x1d6c1, 0x1d6c1,
+  0x1d6db, 0x1d6db,
+  0x1d6fb, 0x1d6fb,
+  0x1d715, 0x1d715,
+  0x1d735, 0x1d735,
+  0x1d74f, 0x1d74f,
+  0x1d76f, 0x1d76f,
+  0x1d789, 0x1d789,
+  0x1d7a9, 0x1d7a9,
+  0x1d7c3, 0x1d7c3
+}; /* CR_Sm */
+
+/* 'So': General Category */
+static const OnigCodePoint CR_So[] = {
+  120,
+  0x00a6, 0x00a7,
+  0x00a9, 0x00a9,
+  0x00ae, 0x00ae,
+  0x00b0, 0x00b0,
+  0x00b6, 0x00b6,
+  0x0482, 0x0482,
+  0x060e, 0x060f,
+  0x06e9, 0x06e9,
+  0x06fd, 0x06fe,
+  0x09fa, 0x09fa,
+  0x0b70, 0x0b70,
+  0x0bf3, 0x0bf8,
+  0x0bfa, 0x0bfa,
+  0x0f01, 0x0f03,
+  0x0f13, 0x0f17,
+  0x0f1a, 0x0f1f,
+  0x0f34, 0x0f34,
+  0x0f36, 0x0f36,
+  0x0f38, 0x0f38,
+  0x0fbe, 0x0fc5,
+  0x0fc7, 0x0fcc,
+  0x0fcf, 0x0fcf,
+  0x1360, 0x1360,
+  0x1390, 0x1399,
+  0x1940, 0x1940,
+  0x19e0, 0x19ff,
+  0x2100, 0x2101,
+  0x2103, 0x2106,
+  0x2108, 0x2109,
+  0x2114, 0x2114,
+  0x2116, 0x2118,
+  0x211e, 0x2123,
+  0x2125, 0x2125,
+  0x2127, 0x2127,
+  0x2129, 0x2129,
+  0x212e, 0x212e,
+  0x2132, 0x2132,
+  0x213a, 0x213b,
+  0x214a, 0x214a,
+  0x214c, 0x214c,
+  0x2195, 0x2199,
+  0x219c, 0x219f,
+  0x21a1, 0x21a2,
+  0x21a4, 0x21a5,
+  0x21a7, 0x21ad,
+  0x21af, 0x21cd,
+  0x21d0, 0x21d1,
+  0x21d3, 0x21d3,
+  0x21d5, 0x21f3,
+  0x2300, 0x2307,
+  0x230c, 0x231f,
+  0x2322, 0x2328,
+  0x232b, 0x237b,
+  0x237d, 0x239a,
+  0x23b7, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x249c, 0x24e9,
+  0x2500, 0x25b6,
+  0x25b8, 0x25c0,
+  0x25c2, 0x25f7,
+  0x2600, 0x266e,
+  0x2670, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2767,
+  0x2794, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x2800, 0x28ff,
+  0x2b00, 0x2b13,
+  0x2ce5, 0x2cea,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x2ff0, 0x2ffb,
+  0x3004, 0x3004,
+  0x3012, 0x3013,
+  0x3020, 0x3020,
+  0x3036, 0x3037,
+  0x303e, 0x303f,
+  0x3190, 0x3191,
+  0x3196, 0x319f,
+  0x31c0, 0x31cf,
+  0x3200, 0x321e,
+  0x322a, 0x3243,
+  0x3250, 0x3250,
+  0x3260, 0x327f,
+  0x328a, 0x32b0,
+  0x32c0, 0x32fe,
+  0x3300, 0x33ff,
+  0x4dc0, 0x4dff,
+  0xa490, 0xa4c6,
+  0xa828, 0xa82b,
+  0xfdfd, 0xfdfd,
+  0xffe4, 0xffe4,
+  0xffe8, 0xffe8,
+  0xffed, 0xffee,
+  0xfffc, 0xfffd,
+  0x10102, 0x10102,
+  0x10137, 0x1013f,
+  0x10179, 0x10189,
+  0x103d0, 0x103d0,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d164,
+  0x1d16a, 0x1d16c,
+  0x1d183, 0x1d184,
+  0x1d18c, 0x1d1a9,
+  0x1d1ae, 0x1d1dd,
+  0x1d200, 0x1d241,
+  0x1d245, 0x1d245,
+  0x1d300, 0x1d356
+}; /* CR_So */
+
+/* 'Z': Major Category */
+static const OnigCodePoint CR_Z[] = {
+  9,
+  0x0020, 0x0020,
+  0x00a0, 0x00a0,
+  0x1680, 0x1680,
+  0x180e, 0x180e,
+  0x2000, 0x200a,
+  0x2028, 0x2029,
+  0x202f, 0x202f,
+  0x205f, 0x205f,
+  0x3000, 0x3000
+}; /* CR_Z */
+
+/* 'Zl': General Category */
+static const OnigCodePoint CR_Zl[] = {
+  1,
+  0x2028, 0x2028
+}; /* CR_Zl */
+
+/* 'Zp': General Category */
+static const OnigCodePoint CR_Zp[] = {
+  1,
+  0x2029, 0x2029
+}; /* CR_Zp */
+
+/* 'Zs': General Category */
+static const OnigCodePoint CR_Zs[] = {
+  8,
+  0x0020, 0x0020,
+  0x00a0, 0x00a0,
+  0x1680, 0x1680,
+  0x180e, 0x180e,
+  0x2000, 0x200a,
+  0x202f, 0x202f,
+  0x205f, 0x205f,
+  0x3000, 0x3000
+}; /* CR_Zs */
+
+/* 'Arabic': Script */
+static const OnigCodePoint CR_Arabic[] = {
+  17,
+  0x060b, 0x060b,
+  0x060d, 0x0615,
+  0x061e, 0x061e,
+  0x0621, 0x063a,
+  0x0641, 0x064a,
+  0x0656, 0x065e,
+  0x066a, 0x066f,
+  0x0671, 0x06dc,
+  0x06de, 0x06ff,
+  0x0750, 0x076d,
+  0xfb50, 0xfbb1,
+  0xfbd3, 0xfd3d,
+  0xfd50, 0xfd8f,
+  0xfd92, 0xfdc7,
+  0xfdf0, 0xfdfc,
+  0xfe70, 0xfe74,
+  0xfe76, 0xfefc
+}; /* CR_Arabic */
+
+/* 'Armenian': Script */
+static const OnigCodePoint CR_Armenian[] = {
+  5,
+  0x0531, 0x0556,
+  0x0559, 0x055f,
+  0x0561, 0x0587,
+  0x058a, 0x058a,
+  0xfb13, 0xfb17
+}; /* CR_Armenian */
+
+/* 'Bengali': Script */
+static const OnigCodePoint CR_Bengali[] = {
+  14,
+  0x0981, 0x0983,
+  0x0985, 0x098c,
+  0x098f, 0x0990,
+  0x0993, 0x09a8,
+  0x09aa, 0x09b0,
+  0x09b2, 0x09b2,
+  0x09b6, 0x09b9,
+  0x09bc, 0x09c4,
+  0x09c7, 0x09c8,
+  0x09cb, 0x09ce,
+  0x09d7, 0x09d7,
+  0x09dc, 0x09dd,
+  0x09df, 0x09e3,
+  0x09e6, 0x09fa
+}; /* CR_Bengali */
+
+/* 'Bopomofo': Script */
+static const OnigCodePoint CR_Bopomofo[] = {
+  2,
+  0x3105, 0x312c,
+  0x31a0, 0x31b7
+}; /* CR_Bopomofo */
+
+/* 'Braille': Script */
+static const OnigCodePoint CR_Braille[] = {
+  1,
+  0x2800, 0x28ff
+}; /* CR_Braille */
+
+/* 'Buginese': Script */
+static const OnigCodePoint CR_Buginese[] = {
+  2,
+  0x1a00, 0x1a1b,
+  0x1a1e, 0x1a1f
+}; /* CR_Buginese */
+
+/* 'Buhid': Script */
+static const OnigCodePoint CR_Buhid[] = {
+  1,
+  0x1740, 0x1753
+}; /* CR_Buhid */
+
+/* 'Canadian_Aboriginal': Script */
+static const OnigCodePoint CR_Canadian_Aboriginal[] = {
+  1,
+  0x1401, 0x1676
+}; /* CR_Canadian_Aboriginal */
+
+/* 'Cherokee': Script */
+static const OnigCodePoint CR_Cherokee[] = {
+  1,
+  0x13a0, 0x13f4
+}; /* CR_Cherokee */
+
+/* 'Common': Script */
+static const OnigCodePoint CR_Common[] = {
+  126,
+  0x0000, 0x0040,
+  0x005b, 0x0060,
+  0x007b, 0x00a9,
+  0x00ab, 0x00b9,
+  0x00bb, 0x00bf,
+  0x00d7, 0x00d7,
+  0x00f7, 0x00f7,
+  0x02b9, 0x02df,
+  0x02e5, 0x02ff,
+  0x037e, 0x037e,
+  0x0387, 0x0387,
+  0x0589, 0x0589,
+  0x0600, 0x0603,
+  0x060c, 0x060c,
+  0x061b, 0x061b,
+  0x061f, 0x061f,
+  0x0640, 0x0640,
+  0x0660, 0x0669,
+  0x06dd, 0x06dd,
+  0x0964, 0x0965,
+  0x0970, 0x0970,
+  0x0e3f, 0x0e3f,
+  0x10fb, 0x10fb,
+  0x16eb, 0x16ed,
+  0x1735, 0x1736,
+  0x2000, 0x200b,
+  0x200e, 0x2063,
+  0x206a, 0x2070,
+  0x2074, 0x207e,
+  0x2080, 0x208e,
+  0x20a0, 0x20b5,
+  0x2100, 0x2125,
+  0x2127, 0x2129,
+  0x212c, 0x214c,
+  0x2153, 0x2183,
+  0x2190, 0x23db,
+  0x2400, 0x2426,
+  0x2440, 0x244a,
+  0x2460, 0x269c,
+  0x26a0, 0x26b1,
+  0x2701, 0x2704,
+  0x2706, 0x2709,
+  0x270c, 0x2727,
+  0x2729, 0x274b,
+  0x274d, 0x274d,
+  0x274f, 0x2752,
+  0x2756, 0x2756,
+  0x2758, 0x275e,
+  0x2761, 0x2794,
+  0x2798, 0x27af,
+  0x27b1, 0x27be,
+  0x27c0, 0x27c6,
+  0x27d0, 0x27eb,
+  0x27f0, 0x27ff,
+  0x2900, 0x2b13,
+  0x2e00, 0x2e17,
+  0x2e1c, 0x2e1d,
+  0x2ff0, 0x2ffb,
+  0x3000, 0x3004,
+  0x3006, 0x3006,
+  0x3008, 0x3020,
+  0x3030, 0x3037,
+  0x303c, 0x303f,
+  0x309b, 0x309c,
+  0x30a0, 0x30a0,
+  0x30fb, 0x30fc,
+  0x3190, 0x319f,
+  0x31c0, 0x31cf,
+  0x3220, 0x3243,
+  0x3250, 0x325f,
+  0x327e, 0x32fe,
+  0x3300, 0x33ff,
+  0x4dc0, 0x4dff,
+  0xa700, 0xa716,
+  0xe000, 0xf8ff,
+  0xfd3e, 0xfd3f,
+  0xfdfd, 0xfdfd,
+  0xfe10, 0xfe19,
+  0xfe30, 0xfe52,
+  0xfe54, 0xfe66,
+  0xfe68, 0xfe6b,
+  0xfeff, 0xfeff,
+  0xff01, 0xff20,
+  0xff3b, 0xff40,
+  0xff5b, 0xff65,
+  0xff70, 0xff70,
+  0xff9e, 0xff9f,
+  0xffe0, 0xffe6,
+  0xffe8, 0xffee,
+  0xfff9, 0xfffd,
+  0x10100, 0x10102,
+  0x10107, 0x10133,
+  0x10137, 0x1013f,
+  0x1d000, 0x1d0f5,
+  0x1d100, 0x1d126,
+  0x1d12a, 0x1d166,
+  0x1d16a, 0x1d17a,
+  0x1d183, 0x1d184,
+  0x1d18c, 0x1d1a9,
+  0x1d1ae, 0x1d1dd,
+  0x1d300, 0x1d356,
+  0x1d400, 0x1d454,
+  0x1d456, 0x1d49c,
+  0x1d49e, 0x1d49f,
+  0x1d4a2, 0x1d4a2,
+  0x1d4a5, 0x1d4a6,
+  0x1d4a9, 0x1d4ac,
+  0x1d4ae, 0x1d4b9,
+  0x1d4bb, 0x1d4bb,
+  0x1d4bd, 0x1d4c3,
+  0x1d4c5, 0x1d505,
+  0x1d507, 0x1d50a,
+  0x1d50d, 0x1d514,
+  0x1d516, 0x1d51c,
+  0x1d51e, 0x1d539,
+  0x1d53b, 0x1d53e,
+  0x1d540, 0x1d544,
+  0x1d546, 0x1d546,
+  0x1d54a, 0x1d550,
+  0x1d552, 0x1d6a5,
+  0x1d6a8, 0x1d7c9,
+  0x1d7ce, 0x1d7ff,
+  0xe0001, 0xe0001,
+  0xe0020, 0xe007f,
+  0xf0000, 0xffffd,
+  0x100000, 0x10fffd
+}; /* CR_Common */
+
+/* 'Coptic': Script */
+static const OnigCodePoint CR_Coptic[] = {
+  3,
+  0x03e2, 0x03ef,
+  0x2c80, 0x2cea,
+  0x2cf9, 0x2cff
+}; /* CR_Coptic */
+
+/* 'Cypriot': Script */
+static const OnigCodePoint CR_Cypriot[] = {
+  6,
+  0x10800, 0x10805,
+  0x10808, 0x10808,
+  0x1080a, 0x10835,
+  0x10837, 0x10838,
+  0x1083c, 0x1083c,
+  0x1083f, 0x1083f
+}; /* CR_Cypriot */
+
+/* 'Cyrillic': Script */
+static const OnigCodePoint CR_Cyrillic[] = {
+  6,
+  0x0400, 0x0486,
+  0x0488, 0x04ce,
+  0x04d0, 0x04f9,
+  0x0500, 0x050f,
+  0x1d2b, 0x1d2b,
+  0x1d78, 0x1d78
+}; /* CR_Cyrillic */
+
+/* 'Deseret': Script */
+static const OnigCodePoint CR_Deseret[] = {
+  1,
+  0x10400, 0x1044f
+}; /* CR_Deseret */
+
+/* 'Devanagari': Script */
+static const OnigCodePoint CR_Devanagari[] = {
+  6,
+  0x0901, 0x0939,
+  0x093c, 0x094d,
+  0x0950, 0x0954,
+  0x0958, 0x0963,
+  0x0966, 0x096f,
+  0x097d, 0x097d
+}; /* CR_Devanagari */
+
+/* 'Ethiopic': Script */
+static const OnigCodePoint CR_Ethiopic[] = {
+  27,
+  0x1200, 0x1248,
+  0x124a, 0x124d,
+  0x1250, 0x1256,
+  0x1258, 0x1258,
+  0x125a, 0x125d,
+  0x1260, 0x1288,
+  0x128a, 0x128d,
+  0x1290, 0x12b0,
+  0x12b2, 0x12b5,
+  0x12b8, 0x12be,
+  0x12c0, 0x12c0,
+  0x12c2, 0x12c5,
+  0x12c8, 0x12d6,
+  0x12d8, 0x1310,
+  0x1312, 0x1315,
+  0x1318, 0x135a,
+  0x135f, 0x137c,
+  0x1380, 0x1399,
+  0x2d80, 0x2d96,
+  0x2da0, 0x2da6,
+  0x2da8, 0x2dae,
+  0x2db0, 0x2db6,
+  0x2db8, 0x2dbe,
+  0x2dc0, 0x2dc6,
+  0x2dc8, 0x2dce,
+  0x2dd0, 0x2dd6,
+  0x2dd8, 0x2dde
+}; /* CR_Ethiopic */
+
+/* 'Georgian': Script */
+static const OnigCodePoint CR_Georgian[] = {
+  4,
+  0x10a0, 0x10c5,
+  0x10d0, 0x10fa,
+  0x10fc, 0x10fc,
+  0x2d00, 0x2d25
+}; /* CR_Georgian */
+
+/* 'Glagolitic': Script */
+static const OnigCodePoint CR_Glagolitic[] = {
+  2,
+  0x2c00, 0x2c2e,
+  0x2c30, 0x2c5e
+}; /* CR_Glagolitic */
+
+/* 'Gothic': Script */
+static const OnigCodePoint CR_Gothic[] = {
+  1,
+  0x10330, 0x1034a
+}; /* CR_Gothic */
+
+/* 'Greek': Script */
+static const OnigCodePoint CR_Greek[] = {
+  31,
+  0x0374, 0x0375,
+  0x037a, 0x037a,
+  0x0384, 0x0386,
+  0x0388, 0x038a,
+  0x038c, 0x038c,
+  0x038e, 0x03a1,
+  0x03a3, 0x03ce,
+  0x03d0, 0x03e1,
+  0x03f0, 0x03ff,
+  0x1d26, 0x1d2a,
+  0x1d5d, 0x1d61,
+  0x1d66, 0x1d6a,
+  0x1f00, 0x1f15,
+  0x1f18, 0x1f1d,
+  0x1f20, 0x1f45,
+  0x1f48, 0x1f4d,
+  0x1f50, 0x1f57,
+  0x1f59, 0x1f59,
+  0x1f5b, 0x1f5b,
+  0x1f5d, 0x1f5d,
+  0x1f5f, 0x1f7d,
+  0x1f80, 0x1fb4,
+  0x1fb6, 0x1fc4,
+  0x1fc6, 0x1fd3,
+  0x1fd6, 0x1fdb,
+  0x1fdd, 0x1fef,
+  0x1ff2, 0x1ff4,
+  0x1ff6, 0x1ffe,
+  0x2126, 0x2126,
+  0x10140, 0x1018a,
+  0x1d200, 0x1d245
+}; /* CR_Greek */
+
+/* 'Gujarati': Script */
+static const OnigCodePoint CR_Gujarati[] = {
+  14,
+  0x0a81, 0x0a83,
+  0x0a85, 0x0a8d,
+  0x0a8f, 0x0a91,
+  0x0a93, 0x0aa8,
+  0x0aaa, 0x0ab0,
+  0x0ab2, 0x0ab3,
+  0x0ab5, 0x0ab9,
+  0x0abc, 0x0ac5,
+  0x0ac7, 0x0ac9,
+  0x0acb, 0x0acd,
+  0x0ad0, 0x0ad0,
+  0x0ae0, 0x0ae3,
+  0x0ae6, 0x0aef,
+  0x0af1, 0x0af1
+}; /* CR_Gujarati */
+
+/* 'Gurmukhi': Script */
+static const OnigCodePoint CR_Gurmukhi[] = {
+  15,
+  0x0a01, 0x0a03,
+  0x0a05, 0x0a0a,
+  0x0a0f, 0x0a10,
+  0x0a13, 0x0a28,
+  0x0a2a, 0x0a30,
+  0x0a32, 0x0a33,
+  0x0a35, 0x0a36,
+  0x0a38, 0x0a39,
+  0x0a3c, 0x0a3c,
+  0x0a3e, 0x0a42,
+  0x0a47, 0x0a48,
+  0x0a4b, 0x0a4d,
+  0x0a59, 0x0a5c,
+  0x0a5e, 0x0a5e,
+  0x0a66, 0x0a74
+}; /* CR_Gurmukhi */
+
+/* 'Han': Script */
+static const OnigCodePoint CR_Han[] = {
+  14,
+  0x2e80, 0x2e99,
+  0x2e9b, 0x2ef3,
+  0x2f00, 0x2fd5,
+  0x3005, 0x3005,
+  0x3007, 0x3007,
+  0x3021, 0x3029,
+  0x3038, 0x303b,
+  0x3400, 0x4db5,
+  0x4e00, 0x9fbb,
+  0xf900, 0xfa2d,
+  0xfa30, 0xfa6a,
+  0xfa70, 0xfad9,
+  0x20000, 0x2a6d6,
+  0x2f800, 0x2fa1d
+}; /* CR_Han */
+
+/* 'Hangul': Script */
+static const OnigCodePoint CR_Hangul[] = {
+  12,
+  0x1100, 0x1159,
+  0x115f, 0x11a2,
+  0x11a8, 0x11f9,
+  0x3131, 0x318e,
+  0x3200, 0x321e,
+  0x3260, 0x327d,
+  0xac00, 0xd7a3,
+  0xffa0, 0xffbe,
+  0xffc2, 0xffc7,
+  0xffca, 0xffcf,
+  0xffd2, 0xffd7,
+  0xffda, 0xffdc
+}; /* CR_Hangul */
+
+/* 'Hanunoo': Script */
+static const OnigCodePoint CR_Hanunoo[] = {
+  1,
+  0x1720, 0x1734
+}; /* CR_Hanunoo */
+
+/* 'Hebrew': Script */
+static const OnigCodePoint CR_Hebrew[] = {
+  10,
+  0x0591, 0x05b9,
+  0x05bb, 0x05c7,
+  0x05d0, 0x05ea,
+  0x05f0, 0x05f4,
+  0xfb1d, 0xfb36,
+  0xfb38, 0xfb3c,
+  0xfb3e, 0xfb3e,
+  0xfb40, 0xfb41,
+  0xfb43, 0xfb44,
+  0xfb46, 0xfb4f
+}; /* CR_Hebrew */
+
+/* 'Hiragana': Script */
+static const OnigCodePoint CR_Hiragana[] = {
+  2,
+  0x3041, 0x3096,
+  0x309d, 0x309f
+}; /* CR_Hiragana */
+
+/* 'Inherited': Script */
+static const OnigCodePoint CR_Inherited[] = {
+  15,
+  0x0300, 0x036f,
+  0x064b, 0x0655,
+  0x0670, 0x0670,
+  0x1dc0, 0x1dc3,
+  0x200c, 0x200d,
+  0x20d0, 0x20eb,
+  0x302a, 0x302f,
+  0x3099, 0x309a,
+  0xfe00, 0xfe0f,
+  0xfe20, 0xfe23,
+  0x1d167, 0x1d169,
+  0x1d17b, 0x1d182,
+  0x1d185, 0x1d18b,
+  0x1d1aa, 0x1d1ad,
+  0xe0100, 0xe01ef
+}; /* CR_Inherited */
+
+/* 'Kannada': Script */
+static const OnigCodePoint CR_Kannada[] = {
+  13,
+  0x0c82, 0x0c83,
+  0x0c85, 0x0c8c,
+  0x0c8e, 0x0c90,
+  0x0c92, 0x0ca8,
+  0x0caa, 0x0cb3,
+  0x0cb5, 0x0cb9,
+  0x0cbc, 0x0cc4,
+  0x0cc6, 0x0cc8,
+  0x0cca, 0x0ccd,
+  0x0cd5, 0x0cd6,
+  0x0cde, 0x0cde,
+  0x0ce0, 0x0ce1,
+  0x0ce6, 0x0cef
+}; /* CR_Kannada */
+
+/* 'Katakana': Script */
+static const OnigCodePoint CR_Katakana[] = {
+  5,
+  0x30a1, 0x30fa,
+  0x30fd, 0x30ff,
+  0x31f0, 0x31ff,
+  0xff66, 0xff6f,
+  0xff71, 0xff9d
+}; /* CR_Katakana */
+
+/* 'Kharoshthi': Script */
+static const OnigCodePoint CR_Kharoshthi[] = {
+  8,
+  0x10a00, 0x10a03,
+  0x10a05, 0x10a06,
+  0x10a0c, 0x10a13,
+  0x10a15, 0x10a17,
+  0x10a19, 0x10a33,
+  0x10a38, 0x10a3a,
+  0x10a3f, 0x10a47,
+  0x10a50, 0x10a58
+}; /* CR_Kharoshthi */
+
+/* 'Khmer': Script */
+static const OnigCodePoint CR_Khmer[] = {
+  4,
+  0x1780, 0x17dd,
+  0x17e0, 0x17e9,
+  0x17f0, 0x17f9,
+  0x19e0, 0x19ff
+}; /* CR_Khmer */
+
+/* 'Lao': Script */
+static const OnigCodePoint CR_Lao[] = {
+  18,
+  0x0e81, 0x0e82,
+  0x0e84, 0x0e84,
+  0x0e87, 0x0e88,
+  0x0e8a, 0x0e8a,
+  0x0e8d, 0x0e8d,
+  0x0e94, 0x0e97,
+  0x0e99, 0x0e9f,
+  0x0ea1, 0x0ea3,
+  0x0ea5, 0x0ea5,
+  0x0ea7, 0x0ea7,
+  0x0eaa, 0x0eab,
+  0x0ead, 0x0eb9,
+  0x0ebb, 0x0ebd,
+  0x0ec0, 0x0ec4,
+  0x0ec6, 0x0ec6,
+  0x0ec8, 0x0ecd,
+  0x0ed0, 0x0ed9,
+  0x0edc, 0x0edd
+}; /* CR_Lao */
+
+/* 'Latin': Script */
+static const OnigCodePoint CR_Latin[] = {
+  23,
+  0x0041, 0x005a,
+  0x0061, 0x007a,
+  0x00aa, 0x00aa,
+  0x00ba, 0x00ba,
+  0x00c0, 0x00d6,
+  0x00d8, 0x00f6,
+  0x00f8, 0x0241,
+  0x0250, 0x02b8,
+  0x02e0, 0x02e4,
+  0x1d00, 0x1d25,
+  0x1d2c, 0x1d5c,
+  0x1d62, 0x1d65,
+  0x1d6b, 0x1d77,
+  0x1d79, 0x1dbf,
+  0x1e00, 0x1e9b,
+  0x1ea0, 0x1ef9,
+  0x2071, 0x2071,
+  0x207f, 0x207f,
+  0x2090, 0x2094,
+  0x212a, 0x212b,
+  0xfb00, 0xfb06,
+  0xff21, 0xff3a,
+  0xff41, 0xff5a
+}; /* CR_Latin */
+
+/* 'Limbu': Script */
+static const OnigCodePoint CR_Limbu[] = {
+  5,
+  0x1900, 0x191c,
+  0x1920, 0x192b,
+  0x1930, 0x193b,
+  0x1940, 0x1940,
+  0x1944, 0x194f
+}; /* CR_Limbu */
+
+/* 'Linear_B': Script */
+static const OnigCodePoint CR_Linear_B[] = {
+  7,
+  0x10000, 0x1000b,
+  0x1000d, 0x10026,
+  0x10028, 0x1003a,
+  0x1003c, 0x1003d,
+  0x1003f, 0x1004d,
+  0x10050, 0x1005d,
+  0x10080, 0x100fa
+}; /* CR_Linear_B */
+
+/* 'Malayalam': Script */
+static const OnigCodePoint CR_Malayalam[] = {
+  11,
+  0x0d02, 0x0d03,
+  0x0d05, 0x0d0c,
+  0x0d0e, 0x0d10,
+  0x0d12, 0x0d28,
+  0x0d2a, 0x0d39,
+  0x0d3e, 0x0d43,
+  0x0d46, 0x0d48,
+  0x0d4a, 0x0d4d,
+  0x0d57, 0x0d57,
+  0x0d60, 0x0d61,
+  0x0d66, 0x0d6f
+}; /* CR_Malayalam */
+
+/* 'Mongolian': Script */
+static const OnigCodePoint CR_Mongolian[] = {
+  4,
+  0x1800, 0x180e,
+  0x1810, 0x1819,
+  0x1820, 0x1877,
+  0x1880, 0x18a9
+}; /* CR_Mongolian */
+
+/* 'Myanmar': Script */
+static const OnigCodePoint CR_Myanmar[] = {
+  6,
+  0x1000, 0x1021,
+  0x1023, 0x1027,
+  0x1029, 0x102a,
+  0x102c, 0x1032,
+  0x1036, 0x1039,
+  0x1040, 0x1059
+}; /* CR_Myanmar */
+
+/* 'New_Tai_Lue': Script */
+static const OnigCodePoint CR_New_Tai_Lue[] = {
+  4,
+  0x1980, 0x19a9,
+  0x19b0, 0x19c9,
+  0x19d0, 0x19d9,
+  0x19de, 0x19df
+}; /* CR_New_Tai_Lue */
+
+/* 'Ogham': Script */
+static const OnigCodePoint CR_Ogham[] = {
+  1,
+  0x1680, 0x169c
+}; /* CR_Ogham */
+
+/* 'Old_Italic': Script */
+static const OnigCodePoint CR_Old_Italic[] = {
+  2,
+  0x10300, 0x1031e,
+  0x10320, 0x10323
+}; /* CR_Old_Italic */
+
+/* 'Old_Persian': Script */
+static const OnigCodePoint CR_Old_Persian[] = {
+  2,
+  0x103a0, 0x103c3,
+  0x103c8, 0x103d5
+}; /* CR_Old_Persian */
+
+/* 'Oriya': Script */
+static const OnigCodePoint CR_Oriya[] = {
+  14,
+  0x0b01, 0x0b03,
+  0x0b05, 0x0b0c,
+  0x0b0f, 0x0b10,
+  0x0b13, 0x0b28,
+  0x0b2a, 0x0b30,
+  0x0b32, 0x0b33,
+  0x0b35, 0x0b39,
+  0x0b3c, 0x0b43,
+  0x0b47, 0x0b48,
+  0x0b4b, 0x0b4d,
+  0x0b56, 0x0b57,
+  0x0b5c, 0x0b5d,
+  0x0b5f, 0x0b61,
+  0x0b66, 0x0b71
+}; /* CR_Oriya */
+
+/* 'Osmanya': Script */
+static const OnigCodePoint CR_Osmanya[] = {
+  2,
+  0x10480, 0x1049d,
+  0x104a0, 0x104a9
+}; /* CR_Osmanya */
+
+/* 'Runic': Script */
+static const OnigCodePoint CR_Runic[] = {
+  2,
+  0x16a0, 0x16ea,
+  0x16ee, 0x16f0
+}; /* CR_Runic */
+
+/* 'Shavian': Script */
+static const OnigCodePoint CR_Shavian[] = {
+  1,
+  0x10450, 0x1047f
+}; /* CR_Shavian */
+
+/* 'Sinhala': Script */
+static const OnigCodePoint CR_Sinhala[] = {
+  11,
+  0x0d82, 0x0d83,
+  0x0d85, 0x0d96,
+  0x0d9a, 0x0db1,
+  0x0db3, 0x0dbb,
+  0x0dbd, 0x0dbd,
+  0x0dc0, 0x0dc6,
+  0x0dca, 0x0dca,
+  0x0dcf, 0x0dd4,
+  0x0dd6, 0x0dd6,
+  0x0dd8, 0x0ddf,
+  0x0df2, 0x0df4
+}; /* CR_Sinhala */
+
+/* 'Syloti_Nagri': Script */
+static const OnigCodePoint CR_Syloti_Nagri[] = {
+  1,
+  0xa800, 0xa82b
+}; /* CR_Syloti_Nagri */
+
+/* 'Syriac': Script */
+static const OnigCodePoint CR_Syriac[] = {
+  3,
+  0x0700, 0x070d,
+  0x070f, 0x074a,
+  0x074d, 0x074f
+}; /* CR_Syriac */
+
+/* 'Tagalog': Script */
+static const OnigCodePoint CR_Tagalog[] = {
+  2,
+  0x1700, 0x170c,
+  0x170e, 0x1714
+}; /* CR_Tagalog */
+
+/* 'Tagbanwa': Script */
+static const OnigCodePoint CR_Tagbanwa[] = {
+  3,
+  0x1760, 0x176c,
+  0x176e, 0x1770,
+  0x1772, 0x1773
+}; /* CR_Tagbanwa */
+
+/* 'Tai_Le': Script */
+static const OnigCodePoint CR_Tai_Le[] = {
+  2,
+  0x1950, 0x196d,
+  0x1970, 0x1974
+}; /* CR_Tai_Le */
+
+/* 'Tamil': Script */
+static const OnigCodePoint CR_Tamil[] = {
+  15,
+  0x0b82, 0x0b83,
+  0x0b85, 0x0b8a,
+  0x0b8e, 0x0b90,
+  0x0b92, 0x0b95,
+  0x0b99, 0x0b9a,
+  0x0b9c, 0x0b9c,
+  0x0b9e, 0x0b9f,
+  0x0ba3, 0x0ba4,
+  0x0ba8, 0x0baa,
+  0x0bae, 0x0bb9,
+  0x0bbe, 0x0bc2,
+  0x0bc6, 0x0bc8,
+  0x0bca, 0x0bcd,
+  0x0bd7, 0x0bd7,
+  0x0be6, 0x0bfa
+}; /* CR_Tamil */
+
+/* 'Telugu': Script */
+static const OnigCodePoint CR_Telugu[] = {
+  12,
+  0x0c01, 0x0c03,
+  0x0c05, 0x0c0c,
+  0x0c0e, 0x0c10,
+  0x0c12, 0x0c28,
+  0x0c2a, 0x0c33,
+  0x0c35, 0x0c39,
+  0x0c3e, 0x0c44,
+  0x0c46, 0x0c48,
+  0x0c4a, 0x0c4d,
+  0x0c55, 0x0c56,
+  0x0c60, 0x0c61,
+  0x0c66, 0x0c6f
+}; /* CR_Telugu */
+
+/* 'Thaana': Script */
+static const OnigCodePoint CR_Thaana[] = {
+  1,
+  0x0780, 0x07b1
+}; /* CR_Thaana */
+
+/* 'Thai': Script */
+static const OnigCodePoint CR_Thai[] = {
+  2,
+  0x0e01, 0x0e3a,
+  0x0e40, 0x0e5b
+}; /* CR_Thai */
+
+/* 'Tibetan': Script */
+static const OnigCodePoint CR_Tibetan[] = {
+  7,
+  0x0f00, 0x0f47,
+  0x0f49, 0x0f6a,
+  0x0f71, 0x0f8b,
+  0x0f90, 0x0f97,
+  0x0f99, 0x0fbc,
+  0x0fbe, 0x0fcc,
+  0x0fcf, 0x0fd1
+}; /* CR_Tibetan */
+
+/* 'Tifinagh': Script */
+static const OnigCodePoint CR_Tifinagh[] = {
+  2,
+  0x2d30, 0x2d65,
+  0x2d6f, 0x2d6f
+}; /* CR_Tifinagh */
+
+/* 'Ugaritic': Script */
+static const OnigCodePoint CR_Ugaritic[] = {
+  2,
+  0x10380, 0x1039d,
+  0x1039f, 0x1039f
+}; /* CR_Ugaritic */
+
+/* 'Yi': Script */
+static const OnigCodePoint CR_Yi[] = {
+  2,
+  0xa000, 0xa48c,
+  0xa490, 0xa4c6
+}; /* CR_Yi */
+
+
+#endif /* USE_UNICODE_PROPERTIES */
+
+
+typedef struct {
+  int n;
+  OnigCodePoint code[3];
+} CodePointList3;
+
+typedef struct {
+  OnigCodePoint  from;
+  CodePointList3 to;
+} CaseFold_11_Type;
+
+typedef struct {
+  OnigCodePoint  from;
+  CodePointList3 to;
+} CaseUnfold_11_Type;
+
+typedef struct {
+  int n;
+  OnigCodePoint code[2];
+} CodePointList2;
+
+typedef struct {
+  OnigCodePoint  from[2];
+  CodePointList2 to;
+} CaseUnfold_12_Type;
+
+typedef struct {
+  OnigCodePoint  from[3];
+  CodePointList2 to;
+} CaseUnfold_13_Type;
+
+static const CaseFold_11_Type CaseFold[] = {
+ { 0x0041, {1, {0x0061}}},
+ { 0x0042, {1, {0x0062}}},
+ { 0x0043, {1, {0x0063}}},
+ { 0x0044, {1, {0x0064}}},
+ { 0x0045, {1, {0x0065}}},
+ { 0x0046, {1, {0x0066}}},
+ { 0x0047, {1, {0x0067}}},
+ { 0x0048, {1, {0x0068}}},
+ { 0x004a, {1, {0x006a}}},
+ { 0x004b, {1, {0x006b}}},
+ { 0x004c, {1, {0x006c}}},
+ { 0x004d, {1, {0x006d}}},
+ { 0x004e, {1, {0x006e}}},
+ { 0x004f, {1, {0x006f}}},
+ { 0x0050, {1, {0x0070}}},
+ { 0x0051, {1, {0x0071}}},
+ { 0x0052, {1, {0x0072}}},
+ { 0x0053, {1, {0x0073}}},
+ { 0x0054, {1, {0x0074}}},
+ { 0x0055, {1, {0x0075}}},
+ { 0x0056, {1, {0x0076}}},
+ { 0x0057, {1, {0x0077}}},
+ { 0x0058, {1, {0x0078}}},
+ { 0x0059, {1, {0x0079}}},
+ { 0x005a, {1, {0x007a}}},
+ { 0x00b5, {1, {0x03bc}}},
+ { 0x00c0, {1, {0x00e0}}},
+ { 0x00c1, {1, {0x00e1}}},
+ { 0x00c2, {1, {0x00e2}}},
+ { 0x00c3, {1, {0x00e3}}},
+ { 0x00c4, {1, {0x00e4}}},
+ { 0x00c5, {1, {0x00e5}}},
+ { 0x00c6, {1, {0x00e6}}},
+ { 0x00c7, {1, {0x00e7}}},
+ { 0x00c8, {1, {0x00e8}}},
+ { 0x00c9, {1, {0x00e9}}},
+ { 0x00ca, {1, {0x00ea}}},
+ { 0x00cb, {1, {0x00eb}}},
+ { 0x00cc, {1, {0x00ec}}},
+ { 0x00cd, {1, {0x00ed}}},
+ { 0x00ce, {1, {0x00ee}}},
+ { 0x00cf, {1, {0x00ef}}},
+ { 0x00d0, {1, {0x00f0}}},
+ { 0x00d1, {1, {0x00f1}}},
+ { 0x00d2, {1, {0x00f2}}},
+ { 0x00d3, {1, {0x00f3}}},
+ { 0x00d4, {1, {0x00f4}}},
+ { 0x00d5, {1, {0x00f5}}},
+ { 0x00d6, {1, {0x00f6}}},
+ { 0x00d8, {1, {0x00f8}}},
+ { 0x00d9, {1, {0x00f9}}},
+ { 0x00da, {1, {0x00fa}}},
+ { 0x00db, {1, {0x00fb}}},
+ { 0x00dc, {1, {0x00fc}}},
+ { 0x00dd, {1, {0x00fd}}},
+ { 0x00de, {1, {0x00fe}}},
+ { 0x00df, {2, {0x0073, 0x0073}}},
+ { 0x0100, {1, {0x0101}}},
+ { 0x0102, {1, {0x0103}}},
+ { 0x0104, {1, {0x0105}}},
+ { 0x0106, {1, {0x0107}}},
+ { 0x0108, {1, {0x0109}}},
+ { 0x010a, {1, {0x010b}}},
+ { 0x010c, {1, {0x010d}}},
+ { 0x010e, {1, {0x010f}}},
+ { 0x0110, {1, {0x0111}}},
+ { 0x0112, {1, {0x0113}}},
+ { 0x0114, {1, {0x0115}}},
+ { 0x0116, {1, {0x0117}}},
+ { 0x0118, {1, {0x0119}}},
+ { 0x011a, {1, {0x011b}}},
+ { 0x011c, {1, {0x011d}}},
+ { 0x011e, {1, {0x011f}}},
+ { 0x0120, {1, {0x0121}}},
+ { 0x0122, {1, {0x0123}}},
+ { 0x0124, {1, {0x0125}}},
+ { 0x0126, {1, {0x0127}}},
+ { 0x0128, {1, {0x0129}}},
+ { 0x012a, {1, {0x012b}}},
+ { 0x012c, {1, {0x012d}}},
+ { 0x012e, {1, {0x012f}}},
+ { 0x0132, {1, {0x0133}}},
+ { 0x0134, {1, {0x0135}}},
+ { 0x0136, {1, {0x0137}}},
+ { 0x0139, {1, {0x013a}}},
+ { 0x013b, {1, {0x013c}}},
+ { 0x013d, {1, {0x013e}}},
+ { 0x013f, {1, {0x0140}}},
+ { 0x0141, {1, {0x0142}}},
+ { 0x0143, {1, {0x0144}}},
+ { 0x0145, {1, {0x0146}}},
+ { 0x0147, {1, {0x0148}}},
+ { 0x0149, {2, {0x02bc, 0x006e}}},
+ { 0x014a, {1, {0x014b}}},
+ { 0x014c, {1, {0x014d}}},
+ { 0x014e, {1, {0x014f}}},
+ { 0x0150, {1, {0x0151}}},
+ { 0x0152, {1, {0x0153}}},
+ { 0x0154, {1, {0x0155}}},
+ { 0x0156, {1, {0x0157}}},
+ { 0x0158, {1, {0x0159}}},
+ { 0x015a, {1, {0x015b}}},
+ { 0x015c, {1, {0x015d}}},
+ { 0x015e, {1, {0x015f}}},
+ { 0x0160, {1, {0x0161}}},
+ { 0x0162, {1, {0x0163}}},
+ { 0x0164, {1, {0x0165}}},
+ { 0x0166, {1, {0x0167}}},
+ { 0x0168, {1, {0x0169}}},
+ { 0x016a, {1, {0x016b}}},
+ { 0x016c, {1, {0x016d}}},
+ { 0x016e, {1, {0x016f}}},
+ { 0x0170, {1, {0x0171}}},
+ { 0x0172, {1, {0x0173}}},
+ { 0x0174, {1, {0x0175}}},
+ { 0x0176, {1, {0x0177}}},
+ { 0x0178, {1, {0x00ff}}},
+ { 0x0179, {1, {0x017a}}},
+ { 0x017b, {1, {0x017c}}},
+ { 0x017d, {1, {0x017e}}},
+ { 0x017f, {1, {0x0073}}},
+ { 0x0181, {1, {0x0253}}},
+ { 0x0182, {1, {0x0183}}},
+ { 0x0184, {1, {0x0185}}},
+ { 0x0186, {1, {0x0254}}},
+ { 0x0187, {1, {0x0188}}},
+ { 0x0189, {1, {0x0256}}},
+ { 0x018a, {1, {0x0257}}},
+ { 0x018b, {1, {0x018c}}},
+ { 0x018e, {1, {0x01dd}}},
+ { 0x018f, {1, {0x0259}}},
+ { 0x0190, {1, {0x025b}}},
+ { 0x0191, {1, {0x0192}}},
+ { 0x0193, {1, {0x0260}}},
+ { 0x0194, {1, {0x0263}}},
+ { 0x0196, {1, {0x0269}}},
+ { 0x0197, {1, {0x0268}}},
+ { 0x0198, {1, {0x0199}}},
+ { 0x019c, {1, {0x026f}}},
+ { 0x019d, {1, {0x0272}}},
+ { 0x019f, {1, {0x0275}}},
+ { 0x01a0, {1, {0x01a1}}},
+ { 0x01a2, {1, {0x01a3}}},
+ { 0x01a4, {1, {0x01a5}}},
+ { 0x01a6, {1, {0x0280}}},
+ { 0x01a7, {1, {0x01a8}}},
+ { 0x01a9, {1, {0x0283}}},
+ { 0x01ac, {1, {0x01ad}}},
+ { 0x01ae, {1, {0x0288}}},
+ { 0x01af, {1, {0x01b0}}},
+ { 0x01b1, {1, {0x028a}}},
+ { 0x01b2, {1, {0x028b}}},
+ { 0x01b3, {1, {0x01b4}}},
+ { 0x01b5, {1, {0x01b6}}},
+ { 0x01b7, {1, {0x0292}}},
+ { 0x01b8, {1, {0x01b9}}},
+ { 0x01bc, {1, {0x01bd}}},
+ { 0x01c4, {1, {0x01c6}}},
+ { 0x01c5, {1, {0x01c6}}},
+ { 0x01c7, {1, {0x01c9}}},
+ { 0x01c8, {1, {0x01c9}}},
+ { 0x01ca, {1, {0x01cc}}},
+ { 0x01cb, {1, {0x01cc}}},
+ { 0x01cd, {1, {0x01ce}}},
+ { 0x01cf, {1, {0x01d0}}},
+ { 0x01d1, {1, {0x01d2}}},
+ { 0x01d3, {1, {0x01d4}}},
+ { 0x01d5, {1, {0x01d6}}},
+ { 0x01d7, {1, {0x01d8}}},
+ { 0x01d9, {1, {0x01da}}},
+ { 0x01db, {1, {0x01dc}}},
+ { 0x01de, {1, {0x01df}}},
+ { 0x01e0, {1, {0x01e1}}},
+ { 0x01e2, {1, {0x01e3}}},
+ { 0x01e4, {1, {0x01e5}}},
+ { 0x01e6, {1, {0x01e7}}},
+ { 0x01e8, {1, {0x01e9}}},
+ { 0x01ea, {1, {0x01eb}}},
+ { 0x01ec, {1, {0x01ed}}},
+ { 0x01ee, {1, {0x01ef}}},
+ { 0x01f0, {2, {0x006a, 0x030c}}},
+ { 0x01f1, {1, {0x01f3}}},
+ { 0x01f2, {1, {0x01f3}}},
+ { 0x01f4, {1, {0x01f5}}},
+ { 0x01f6, {1, {0x0195}}},
+ { 0x01f7, {1, {0x01bf}}},
+ { 0x01f8, {1, {0x01f9}}},
+ { 0x01fa, {1, {0x01fb}}},
+ { 0x01fc, {1, {0x01fd}}},
+ { 0x01fe, {1, {0x01ff}}},
+ { 0x0200, {1, {0x0201}}},
+ { 0x0202, {1, {0x0203}}},
+ { 0x0204, {1, {0x0205}}},
+ { 0x0206, {1, {0x0207}}},
+ { 0x0208, {1, {0x0209}}},
+ { 0x020a, {1, {0x020b}}},
+ { 0x020c, {1, {0x020d}}},
+ { 0x020e, {1, {0x020f}}},
+ { 0x0210, {1, {0x0211}}},
+ { 0x0212, {1, {0x0213}}},
+ { 0x0214, {1, {0x0215}}},
+ { 0x0216, {1, {0x0217}}},
+ { 0x0218, {1, {0x0219}}},
+ { 0x021a, {1, {0x021b}}},
+ { 0x021c, {1, {0x021d}}},
+ { 0x021e, {1, {0x021f}}},
+ { 0x0220, {1, {0x019e}}},
+ { 0x0222, {1, {0x0223}}},
+ { 0x0224, {1, {0x0225}}},
+ { 0x0226, {1, {0x0227}}},
+ { 0x0228, {1, {0x0229}}},
+ { 0x022a, {1, {0x022b}}},
+ { 0x022c, {1, {0x022d}}},
+ { 0x022e, {1, {0x022f}}},
+ { 0x0230, {1, {0x0231}}},
+ { 0x0232, {1, {0x0233}}},
+ { 0x023b, {1, {0x023c}}},
+ { 0x023d, {1, {0x019a}}},
+ { 0x0241, {1, {0x0294}}},
+ { 0x0345, {1, {0x03b9}}},
+ { 0x0386, {1, {0x03ac}}},
+ { 0x0388, {1, {0x03ad}}},
+ { 0x0389, {1, {0x03ae}}},
+ { 0x038a, {1, {0x03af}}},
+ { 0x038c, {1, {0x03cc}}},
+ { 0x038e, {1, {0x03cd}}},
+ { 0x038f, {1, {0x03ce}}},
+ { 0x0390, {3, {0x03b9, 0x0308, 0x0301}}},
+ { 0x0391, {1, {0x03b1}}},
+ { 0x0392, {1, {0x03b2}}},
+ { 0x0393, {1, {0x03b3}}},
+ { 0x0394, {1, {0x03b4}}},
+ { 0x0395, {1, {0x03b5}}},
+ { 0x0396, {1, {0x03b6}}},
+ { 0x0397, {1, {0x03b7}}},
+ { 0x0398, {1, {0x03b8}}},
+ { 0x0399, {1, {0x03b9}}},
+ { 0x039a, {1, {0x03ba}}},
+ { 0x039b, {1, {0x03bb}}},
+ { 0x039c, {1, {0x03bc}}},
+ { 0x039d, {1, {0x03bd}}},
+ { 0x039e, {1, {0x03be}}},
+ { 0x039f, {1, {0x03bf}}},
+ { 0x03a0, {1, {0x03c0}}},
+ { 0x03a1, {1, {0x03c1}}},
+ { 0x03a3, {1, {0x03c3}}},
+ { 0x03a4, {1, {0x03c4}}},
+ { 0x03a5, {1, {0x03c5}}},
+ { 0x03a6, {1, {0x03c6}}},
+ { 0x03a7, {1, {0x03c7}}},
+ { 0x03a8, {1, {0x03c8}}},
+ { 0x03a9, {1, {0x03c9}}},
+ { 0x03aa, {1, {0x03ca}}},
+ { 0x03ab, {1, {0x03cb}}},
+ { 0x03b0, {3, {0x03c5, 0x0308, 0x0301}}},
+ { 0x03c2, {1, {0x03c3}}},
+ { 0x03d0, {1, {0x03b2}}},
+ { 0x03d1, {1, {0x03b8}}},
+ { 0x03d5, {1, {0x03c6}}},
+ { 0x03d6, {1, {0x03c0}}},
+ { 0x03d8, {1, {0x03d9}}},
+ { 0x03da, {1, {0x03db}}},
+ { 0x03dc, {1, {0x03dd}}},
+ { 0x03de, {1, {0x03df}}},
+ { 0x03e0, {1, {0x03e1}}},
+ { 0x03e2, {1, {0x03e3}}},
+ { 0x03e4, {1, {0x03e5}}},
+ { 0x03e6, {1, {0x03e7}}},
+ { 0x03e8, {1, {0x03e9}}},
+ { 0x03ea, {1, {0x03eb}}},
+ { 0x03ec, {1, {0x03ed}}},
+ { 0x03ee, {1, {0x03ef}}},
+ { 0x03f0, {1, {0x03ba}}},
+ { 0x03f1, {1, {0x03c1}}},
+ { 0x03f4, {1, {0x03b8}}},
+ { 0x03f5, {1, {0x03b5}}},
+ { 0x03f7, {1, {0x03f8}}},
+ { 0x03f9, {1, {0x03f2}}},
+ { 0x03fa, {1, {0x03fb}}},
+ { 0x0400, {1, {0x0450}}},
+ { 0x0401, {1, {0x0451}}},
+ { 0x0402, {1, {0x0452}}},
+ { 0x0403, {1, {0x0453}}},
+ { 0x0404, {1, {0x0454}}},
+ { 0x0405, {1, {0x0455}}},
+ { 0x0406, {1, {0x0456}}},
+ { 0x0407, {1, {0x0457}}},
+ { 0x0408, {1, {0x0458}}},
+ { 0x0409, {1, {0x0459}}},
+ { 0x040a, {1, {0x045a}}},
+ { 0x040b, {1, {0x045b}}},
+ { 0x040c, {1, {0x045c}}},
+ { 0x040d, {1, {0x045d}}},
+ { 0x040e, {1, {0x045e}}},
+ { 0x040f, {1, {0x045f}}},
+ { 0x0410, {1, {0x0430}}},
+ { 0x0411, {1, {0x0431}}},
+ { 0x0412, {1, {0x0432}}},
+ { 0x0413, {1, {0x0433}}},
+ { 0x0414, {1, {0x0434}}},
+ { 0x0415, {1, {0x0435}}},
+ { 0x0416, {1, {0x0436}}},
+ { 0x0417, {1, {0x0437}}},
+ { 0x0418, {1, {0x0438}}},
+ { 0x0419, {1, {0x0439}}},
+ { 0x041a, {1, {0x043a}}},
+ { 0x041b, {1, {0x043b}}},
+ { 0x041c, {1, {0x043c}}},
+ { 0x041d, {1, {0x043d}}},
+ { 0x041e, {1, {0x043e}}},
+ { 0x041f, {1, {0x043f}}},
+ { 0x0420, {1, {0x0440}}},
+ { 0x0421, {1, {0x0441}}},
+ { 0x0422, {1, {0x0442}}},
+ { 0x0423, {1, {0x0443}}},
+ { 0x0424, {1, {0x0444}}},
+ { 0x0425, {1, {0x0445}}},
+ { 0x0426, {1, {0x0446}}},
+ { 0x0427, {1, {0x0447}}},
+ { 0x0428, {1, {0x0448}}},
+ { 0x0429, {1, {0x0449}}},
+ { 0x042a, {1, {0x044a}}},
+ { 0x042b, {1, {0x044b}}},
+ { 0x042c, {1, {0x044c}}},
+ { 0x042d, {1, {0x044d}}},
+ { 0x042e, {1, {0x044e}}},
+ { 0x042f, {1, {0x044f}}},
+ { 0x0460, {1, {0x0461}}},
+ { 0x0462, {1, {0x0463}}},
+ { 0x0464, {1, {0x0465}}},
+ { 0x0466, {1, {0x0467}}},
+ { 0x0468, {1, {0x0469}}},
+ { 0x046a, {1, {0x046b}}},
+ { 0x046c, {1, {0x046d}}},
+ { 0x046e, {1, {0x046f}}},
+ { 0x0470, {1, {0x0471}}},
+ { 0x0472, {1, {0x0473}}},
+ { 0x0474, {1, {0x0475}}},
+ { 0x0476, {1, {0x0477}}},
+ { 0x0478, {1, {0x0479}}},
+ { 0x047a, {1, {0x047b}}},
+ { 0x047c, {1, {0x047d}}},
+ { 0x047e, {1, {0x047f}}},
+ { 0x0480, {1, {0x0481}}},
+ { 0x048a, {1, {0x048b}}},
+ { 0x048c, {1, {0x048d}}},
+ { 0x048e, {1, {0x048f}}},
+ { 0x0490, {1, {0x0491}}},
+ { 0x0492, {1, {0x0493}}},
+ { 0x0494, {1, {0x0495}}},
+ { 0x0496, {1, {0x0497}}},
+ { 0x0498, {1, {0x0499}}},
+ { 0x049a, {1, {0x049b}}},
+ { 0x049c, {1, {0x049d}}},
+ { 0x049e, {1, {0x049f}}},
+ { 0x04a0, {1, {0x04a1}}},
+ { 0x04a2, {1, {0x04a3}}},
+ { 0x04a4, {1, {0x04a5}}},
+ { 0x04a6, {1, {0x04a7}}},
+ { 0x04a8, {1, {0x04a9}}},
+ { 0x04aa, {1, {0x04ab}}},
+ { 0x04ac, {1, {0x04ad}}},
+ { 0x04ae, {1, {0x04af}}},
+ { 0x04b0, {1, {0x04b1}}},
+ { 0x04b2, {1, {0x04b3}}},
+ { 0x04b4, {1, {0x04b5}}},
+ { 0x04b6, {1, {0x04b7}}},
+ { 0x04b8, {1, {0x04b9}}},
+ { 0x04ba, {1, {0x04bb}}},
+ { 0x04bc, {1, {0x04bd}}},
+ { 0x04be, {1, {0x04bf}}},
+ { 0x04c1, {1, {0x04c2}}},
+ { 0x04c3, {1, {0x04c4}}},
+ { 0x04c5, {1, {0x04c6}}},
+ { 0x04c7, {1, {0x04c8}}},
+ { 0x04c9, {1, {0x04ca}}},
+ { 0x04cb, {1, {0x04cc}}},
+ { 0x04cd, {1, {0x04ce}}},
+ { 0x04d0, {1, {0x04d1}}},
+ { 0x04d2, {1, {0x04d3}}},
+ { 0x04d4, {1, {0x04d5}}},
+ { 0x04d6, {1, {0x04d7}}},
+ { 0x04d8, {1, {0x04d9}}},
+ { 0x04da, {1, {0x04db}}},
+ { 0x04dc, {1, {0x04dd}}},
+ { 0x04de, {1, {0x04df}}},
+ { 0x04e0, {1, {0x04e1}}},
+ { 0x04e2, {1, {0x04e3}}},
+ { 0x04e4, {1, {0x04e5}}},
+ { 0x04e6, {1, {0x04e7}}},
+ { 0x04e8, {1, {0x04e9}}},
+ { 0x04ea, {1, {0x04eb}}},
+ { 0x04ec, {1, {0x04ed}}},
+ { 0x04ee, {1, {0x04ef}}},
+ { 0x04f0, {1, {0x04f1}}},
+ { 0x04f2, {1, {0x04f3}}},
+ { 0x04f4, {1, {0x04f5}}},
+ { 0x04f6, {1, {0x04f7}}},
+ { 0x04f8, {1, {0x04f9}}},
+ { 0x0500, {1, {0x0501}}},
+ { 0x0502, {1, {0x0503}}},
+ { 0x0504, {1, {0x0505}}},
+ { 0x0506, {1, {0x0507}}},
+ { 0x0508, {1, {0x0509}}},
+ { 0x050a, {1, {0x050b}}},
+ { 0x050c, {1, {0x050d}}},
+ { 0x050e, {1, {0x050f}}},
+ { 0x0531, {1, {0x0561}}},
+ { 0x0532, {1, {0x0562}}},
+ { 0x0533, {1, {0x0563}}},
+ { 0x0534, {1, {0x0564}}},
+ { 0x0535, {1, {0x0565}}},
+ { 0x0536, {1, {0x0566}}},
+ { 0x0537, {1, {0x0567}}},
+ { 0x0538, {1, {0x0568}}},
+ { 0x0539, {1, {0x0569}}},
+ { 0x053a, {1, {0x056a}}},
+ { 0x053b, {1, {0x056b}}},
+ { 0x053c, {1, {0x056c}}},
+ { 0x053d, {1, {0x056d}}},
+ { 0x053e, {1, {0x056e}}},
+ { 0x053f, {1, {0x056f}}},
+ { 0x0540, {1, {0x0570}}},
+ { 0x0541, {1, {0x0571}}},
+ { 0x0542, {1, {0x0572}}},
+ { 0x0543, {1, {0x0573}}},
+ { 0x0544, {1, {0x0574}}},
+ { 0x0545, {1, {0x0575}}},
+ { 0x0546, {1, {0x0576}}},
+ { 0x0547, {1, {0x0577}}},
+ { 0x0548, {1, {0x0578}}},
+ { 0x0549, {1, {0x0579}}},
+ { 0x054a, {1, {0x057a}}},
+ { 0x054b, {1, {0x057b}}},
+ { 0x054c, {1, {0x057c}}},
+ { 0x054d, {1, {0x057d}}},
+ { 0x054e, {1, {0x057e}}},
+ { 0x054f, {1, {0x057f}}},
+ { 0x0550, {1, {0x0580}}},
+ { 0x0551, {1, {0x0581}}},
+ { 0x0552, {1, {0x0582}}},
+ { 0x0553, {1, {0x0583}}},
+ { 0x0554, {1, {0x0584}}},
+ { 0x0555, {1, {0x0585}}},
+ { 0x0556, {1, {0x0586}}},
+ { 0x0587, {2, {0x0565, 0x0582}}},
+ { 0x10a0, {1, {0x2d00}}},
+ { 0x10a1, {1, {0x2d01}}},
+ { 0x10a2, {1, {0x2d02}}},
+ { 0x10a3, {1, {0x2d03}}},
+ { 0x10a4, {1, {0x2d04}}},
+ { 0x10a5, {1, {0x2d05}}},
+ { 0x10a6, {1, {0x2d06}}},
+ { 0x10a7, {1, {0x2d07}}},
+ { 0x10a8, {1, {0x2d08}}},
+ { 0x10a9, {1, {0x2d09}}},
+ { 0x10aa, {1, {0x2d0a}}},
+ { 0x10ab, {1, {0x2d0b}}},
+ { 0x10ac, {1, {0x2d0c}}},
+ { 0x10ad, {1, {0x2d0d}}},
+ { 0x10ae, {1, {0x2d0e}}},
+ { 0x10af, {1, {0x2d0f}}},
+ { 0x10b0, {1, {0x2d10}}},
+ { 0x10b1, {1, {0x2d11}}},
+ { 0x10b2, {1, {0x2d12}}},
+ { 0x10b3, {1, {0x2d13}}},
+ { 0x10b4, {1, {0x2d14}}},
+ { 0x10b5, {1, {0x2d15}}},
+ { 0x10b6, {1, {0x2d16}}},
+ { 0x10b7, {1, {0x2d17}}},
+ { 0x10b8, {1, {0x2d18}}},
+ { 0x10b9, {1, {0x2d19}}},
+ { 0x10ba, {1, {0x2d1a}}},
+ { 0x10bb, {1, {0x2d1b}}},
+ { 0x10bc, {1, {0x2d1c}}},
+ { 0x10bd, {1, {0x2d1d}}},
+ { 0x10be, {1, {0x2d1e}}},
+ { 0x10bf, {1, {0x2d1f}}},
+ { 0x10c0, {1, {0x2d20}}},
+ { 0x10c1, {1, {0x2d21}}},
+ { 0x10c2, {1, {0x2d22}}},
+ { 0x10c3, {1, {0x2d23}}},
+ { 0x10c4, {1, {0x2d24}}},
+ { 0x10c5, {1, {0x2d25}}},
+ { 0x1e00, {1, {0x1e01}}},
+ { 0x1e02, {1, {0x1e03}}},
+ { 0x1e04, {1, {0x1e05}}},
+ { 0x1e06, {1, {0x1e07}}},
+ { 0x1e08, {1, {0x1e09}}},
+ { 0x1e0a, {1, {0x1e0b}}},
+ { 0x1e0c, {1, {0x1e0d}}},
+ { 0x1e0e, {1, {0x1e0f}}},
+ { 0x1e10, {1, {0x1e11}}},
+ { 0x1e12, {1, {0x1e13}}},
+ { 0x1e14, {1, {0x1e15}}},
+ { 0x1e16, {1, {0x1e17}}},
+ { 0x1e18, {1, {0x1e19}}},
+ { 0x1e1a, {1, {0x1e1b}}},
+ { 0x1e1c, {1, {0x1e1d}}},
+ { 0x1e1e, {1, {0x1e1f}}},
+ { 0x1e20, {1, {0x1e21}}},
+ { 0x1e22, {1, {0x1e23}}},
+ { 0x1e24, {1, {0x1e25}}},
+ { 0x1e26, {1, {0x1e27}}},
+ { 0x1e28, {1, {0x1e29}}},
+ { 0x1e2a, {1, {0x1e2b}}},
+ { 0x1e2c, {1, {0x1e2d}}},
+ { 0x1e2e, {1, {0x1e2f}}},
+ { 0x1e30, {1, {0x1e31}}},
+ { 0x1e32, {1, {0x1e33}}},
+ { 0x1e34, {1, {0x1e35}}},
+ { 0x1e36, {1, {0x1e37}}},
+ { 0x1e38, {1, {0x1e39}}},
+ { 0x1e3a, {1, {0x1e3b}}},
+ { 0x1e3c, {1, {0x1e3d}}},
+ { 0x1e3e, {1, {0x1e3f}}},
+ { 0x1e40, {1, {0x1e41}}},
+ { 0x1e42, {1, {0x1e43}}},
+ { 0x1e44, {1, {0x1e45}}},
+ { 0x1e46, {1, {0x1e47}}},
+ { 0x1e48, {1, {0x1e49}}},
+ { 0x1e4a, {1, {0x1e4b}}},
+ { 0x1e4c, {1, {0x1e4d}}},
+ { 0x1e4e, {1, {0x1e4f}}},
+ { 0x1e50, {1, {0x1e51}}},
+ { 0x1e52, {1, {0x1e53}}},
+ { 0x1e54, {1, {0x1e55}}},
+ { 0x1e56, {1, {0x1e57}}},
+ { 0x1e58, {1, {0x1e59}}},
+ { 0x1e5a, {1, {0x1e5b}}},
+ { 0x1e5c, {1, {0x1e5d}}},
+ { 0x1e5e, {1, {0x1e5f}}},
+ { 0x1e60, {1, {0x1e61}}},
+ { 0x1e62, {1, {0x1e63}}},
+ { 0x1e64, {1, {0x1e65}}},
+ { 0x1e66, {1, {0x1e67}}},
+ { 0x1e68, {1, {0x1e69}}},
+ { 0x1e6a, {1, {0x1e6b}}},
+ { 0x1e6c, {1, {0x1e6d}}},
+ { 0x1e6e, {1, {0x1e6f}}},
+ { 0x1e70, {1, {0x1e71}}},
+ { 0x1e72, {1, {0x1e73}}},
+ { 0x1e74, {1, {0x1e75}}},
+ { 0x1e76, {1, {0x1e77}}},
+ { 0x1e78, {1, {0x1e79}}},
+ { 0x1e7a, {1, {0x1e7b}}},
+ { 0x1e7c, {1, {0x1e7d}}},
+ { 0x1e7e, {1, {0x1e7f}}},
+ { 0x1e80, {1, {0x1e81}}},
+ { 0x1e82, {1, {0x1e83}}},
+ { 0x1e84, {1, {0x1e85}}},
+ { 0x1e86, {1, {0x1e87}}},
+ { 0x1e88, {1, {0x1e89}}},
+ { 0x1e8a, {1, {0x1e8b}}},
+ { 0x1e8c, {1, {0x1e8d}}},
+ { 0x1e8e, {1, {0x1e8f}}},
+ { 0x1e90, {1, {0x1e91}}},
+ { 0x1e92, {1, {0x1e93}}},
+ { 0x1e94, {1, {0x1e95}}},
+ { 0x1e96, {2, {0x0068, 0x0331}}},
+ { 0x1e97, {2, {0x0074, 0x0308}}},
+ { 0x1e98, {2, {0x0077, 0x030a}}},
+ { 0x1e99, {2, {0x0079, 0x030a}}},
+ { 0x1e9a, {2, {0x0061, 0x02be}}},
+ { 0x1e9b, {1, {0x1e61}}},
+ { 0x1ea0, {1, {0x1ea1}}},
+ { 0x1ea2, {1, {0x1ea3}}},
+ { 0x1ea4, {1, {0x1ea5}}},
+ { 0x1ea6, {1, {0x1ea7}}},
+ { 0x1ea8, {1, {0x1ea9}}},
+ { 0x1eaa, {1, {0x1eab}}},
+ { 0x1eac, {1, {0x1ead}}},
+ { 0x1eae, {1, {0x1eaf}}},
+ { 0x1eb0, {1, {0x1eb1}}},
+ { 0x1eb2, {1, {0x1eb3}}},
+ { 0x1eb4, {1, {0x1eb5}}},
+ { 0x1eb6, {1, {0x1eb7}}},
+ { 0x1eb8, {1, {0x1eb9}}},
+ { 0x1eba, {1, {0x1ebb}}},
+ { 0x1ebc, {1, {0x1ebd}}},
+ { 0x1ebe, {1, {0x1ebf}}},
+ { 0x1ec0, {1, {0x1ec1}}},
+ { 0x1ec2, {1, {0x1ec3}}},
+ { 0x1ec4, {1, {0x1ec5}}},
+ { 0x1ec6, {1, {0x1ec7}}},
+ { 0x1ec8, {1, {0x1ec9}}},
+ { 0x1eca, {1, {0x1ecb}}},
+ { 0x1ecc, {1, {0x1ecd}}},
+ { 0x1ece, {1, {0x1ecf}}},
+ { 0x1ed0, {1, {0x1ed1}}},
+ { 0x1ed2, {1, {0x1ed3}}},
+ { 0x1ed4, {1, {0x1ed5}}},
+ { 0x1ed6, {1, {0x1ed7}}},
+ { 0x1ed8, {1, {0x1ed9}}},
+ { 0x1eda, {1, {0x1edb}}},
+ { 0x1edc, {1, {0x1edd}}},
+ { 0x1ede, {1, {0x1edf}}},
+ { 0x1ee0, {1, {0x1ee1}}},
+ { 0x1ee2, {1, {0x1ee3}}},
+ { 0x1ee4, {1, {0x1ee5}}},
+ { 0x1ee6, {1, {0x1ee7}}},
+ { 0x1ee8, {1, {0x1ee9}}},
+ { 0x1eea, {1, {0x1eeb}}},
+ { 0x1eec, {1, {0x1eed}}},
+ { 0x1eee, {1, {0x1eef}}},
+ { 0x1ef0, {1, {0x1ef1}}},
+ { 0x1ef2, {1, {0x1ef3}}},
+ { 0x1ef4, {1, {0x1ef5}}},
+ { 0x1ef6, {1, {0x1ef7}}},
+ { 0x1ef8, {1, {0x1ef9}}},
+ { 0x1f08, {1, {0x1f00}}},
+ { 0x1f09, {1, {0x1f01}}},
+ { 0x1f0a, {1, {0x1f02}}},
+ { 0x1f0b, {1, {0x1f03}}},
+ { 0x1f0c, {1, {0x1f04}}},
+ { 0x1f0d, {1, {0x1f05}}},
+ { 0x1f0e, {1, {0x1f06}}},
+ { 0x1f0f, {1, {0x1f07}}},
+ { 0x1f18, {1, {0x1f10}}},
+ { 0x1f19, {1, {0x1f11}}},
+ { 0x1f1a, {1, {0x1f12}}},
+ { 0x1f1b, {1, {0x1f13}}},
+ { 0x1f1c, {1, {0x1f14}}},
+ { 0x1f1d, {1, {0x1f15}}},
+ { 0x1f28, {1, {0x1f20}}},
+ { 0x1f29, {1, {0x1f21}}},
+ { 0x1f2a, {1, {0x1f22}}},
+ { 0x1f2b, {1, {0x1f23}}},
+ { 0x1f2c, {1, {0x1f24}}},
+ { 0x1f2d, {1, {0x1f25}}},
+ { 0x1f2e, {1, {0x1f26}}},
+ { 0x1f2f, {1, {0x1f27}}},
+ { 0x1f38, {1, {0x1f30}}},
+ { 0x1f39, {1, {0x1f31}}},
+ { 0x1f3a, {1, {0x1f32}}},
+ { 0x1f3b, {1, {0x1f33}}},
+ { 0x1f3c, {1, {0x1f34}}},
+ { 0x1f3d, {1, {0x1f35}}},
+ { 0x1f3e, {1, {0x1f36}}},
+ { 0x1f3f, {1, {0x1f37}}},
+ { 0x1f48, {1, {0x1f40}}},
+ { 0x1f49, {1, {0x1f41}}},
+ { 0x1f4a, {1, {0x1f42}}},
+ { 0x1f4b, {1, {0x1f43}}},
+ { 0x1f4c, {1, {0x1f44}}},
+ { 0x1f4d, {1, {0x1f45}}},
+ { 0x1f50, {2, {0x03c5, 0x0313}}},
+ { 0x1f52, {3, {0x03c5, 0x0313, 0x0300}}},
+ { 0x1f54, {3, {0x03c5, 0x0313, 0x0301}}},
+ { 0x1f56, {3, {0x03c5, 0x0313, 0x0342}}},
+ { 0x1f59, {1, {0x1f51}}},
+ { 0x1f5b, {1, {0x1f53}}},
+ { 0x1f5d, {1, {0x1f55}}},
+ { 0x1f5f, {1, {0x1f57}}},
+ { 0x1f68, {1, {0x1f60}}},
+ { 0x1f69, {1, {0x1f61}}},
+ { 0x1f6a, {1, {0x1f62}}},
+ { 0x1f6b, {1, {0x1f63}}},
+ { 0x1f6c, {1, {0x1f64}}},
+ { 0x1f6d, {1, {0x1f65}}},
+ { 0x1f6e, {1, {0x1f66}}},
+ { 0x1f6f, {1, {0x1f67}}},
+ { 0x1f80, {2, {0x1f00, 0x03b9}}},
+ { 0x1f81, {2, {0x1f01, 0x03b9}}},
+ { 0x1f82, {2, {0x1f02, 0x03b9}}},
+ { 0x1f83, {2, {0x1f03, 0x03b9}}},
+ { 0x1f84, {2, {0x1f04, 0x03b9}}},
+ { 0x1f85, {2, {0x1f05, 0x03b9}}},
+ { 0x1f86, {2, {0x1f06, 0x03b9}}},
+ { 0x1f87, {2, {0x1f07, 0x03b9}}},
+ { 0x1f88, {2, {0x1f00, 0x03b9}}},
+ { 0x1f89, {2, {0x1f01, 0x03b9}}},
+ { 0x1f8a, {2, {0x1f02, 0x03b9}}},
+ { 0x1f8b, {2, {0x1f03, 0x03b9}}},
+ { 0x1f8c, {2, {0x1f04, 0x03b9}}},
+ { 0x1f8d, {2, {0x1f05, 0x03b9}}},
+ { 0x1f8e, {2, {0x1f06, 0x03b9}}},
+ { 0x1f8f, {2, {0x1f07, 0x03b9}}},
+ { 0x1f90, {2, {0x1f20, 0x03b9}}},
+ { 0x1f91, {2, {0x1f21, 0x03b9}}},
+ { 0x1f92, {2, {0x1f22, 0x03b9}}},
+ { 0x1f93, {2, {0x1f23, 0x03b9}}},
+ { 0x1f94, {2, {0x1f24, 0x03b9}}},
+ { 0x1f95, {2, {0x1f25, 0x03b9}}},
+ { 0x1f96, {2, {0x1f26, 0x03b9}}},
+ { 0x1f97, {2, {0x1f27, 0x03b9}}},
+ { 0x1f98, {2, {0x1f20, 0x03b9}}},
+ { 0x1f99, {2, {0x1f21, 0x03b9}}},
+ { 0x1f9a, {2, {0x1f22, 0x03b9}}},
+ { 0x1f9b, {2, {0x1f23, 0x03b9}}},
+ { 0x1f9c, {2, {0x1f24, 0x03b9}}},
+ { 0x1f9d, {2, {0x1f25, 0x03b9}}},
+ { 0x1f9e, {2, {0x1f26, 0x03b9}}},
+ { 0x1f9f, {2, {0x1f27, 0x03b9}}},
+ { 0x1fa0, {2, {0x1f60, 0x03b9}}},
+ { 0x1fa1, {2, {0x1f61, 0x03b9}}},
+ { 0x1fa2, {2, {0x1f62, 0x03b9}}},
+ { 0x1fa3, {2, {0x1f63, 0x03b9}}},
+ { 0x1fa4, {2, {0x1f64, 0x03b9}}},
+ { 0x1fa5, {2, {0x1f65, 0x03b9}}},
+ { 0x1fa6, {2, {0x1f66, 0x03b9}}},
+ { 0x1fa7, {2, {0x1f67, 0x03b9}}},
+ { 0x1fa8, {2, {0x1f60, 0x03b9}}},
+ { 0x1fa9, {2, {0x1f61, 0x03b9}}},
+ { 0x1faa, {2, {0x1f62, 0x03b9}}},
+ { 0x1fab, {2, {0x1f63, 0x03b9}}},
+ { 0x1fac, {2, {0x1f64, 0x03b9}}},
+ { 0x1fad, {2, {0x1f65, 0x03b9}}},
+ { 0x1fae, {2, {0x1f66, 0x03b9}}},
+ { 0x1faf, {2, {0x1f67, 0x03b9}}},
+ { 0x1fb2, {2, {0x1f70, 0x03b9}}},
+ { 0x1fb3, {2, {0x03b1, 0x03b9}}},
+ { 0x1fb4, {2, {0x03ac, 0x03b9}}},
+ { 0x1fb6, {2, {0x03b1, 0x0342}}},
+ { 0x1fb7, {3, {0x03b1, 0x0342, 0x03b9}}},
+ { 0x1fb8, {1, {0x1fb0}}},
+ { 0x1fb9, {1, {0x1fb1}}},
+ { 0x1fba, {1, {0x1f70}}},
+ { 0x1fbb, {1, {0x1f71}}},
+ { 0x1fbc, {2, {0x03b1, 0x03b9}}},
+ { 0x1fbe, {1, {0x03b9}}},
+ { 0x1fc2, {2, {0x1f74, 0x03b9}}},
+ { 0x1fc3, {2, {0x03b7, 0x03b9}}},
+ { 0x1fc4, {2, {0x03ae, 0x03b9}}},
+ { 0x1fc6, {2, {0x03b7, 0x0342}}},
+ { 0x1fc7, {3, {0x03b7, 0x0342, 0x03b9}}},
+ { 0x1fc8, {1, {0x1f72}}},
+ { 0x1fc9, {1, {0x1f73}}},
+ { 0x1fca, {1, {0x1f74}}},
+ { 0x1fcb, {1, {0x1f75}}},
+ { 0x1fcc, {2, {0x03b7, 0x03b9}}},
+ { 0x1fd2, {3, {0x03b9, 0x0308, 0x0300}}},
+ { 0x1fd3, {3, {0x03b9, 0x0308, 0x0301}}},
+ { 0x1fd6, {2, {0x03b9, 0x0342}}},
+ { 0x1fd7, {3, {0x03b9, 0x0308, 0x0342}}},
+ { 0x1fd8, {1, {0x1fd0}}},
+ { 0x1fd9, {1, {0x1fd1}}},
+ { 0x1fda, {1, {0x1f76}}},
+ { 0x1fdb, {1, {0x1f77}}},
+ { 0x1fe2, {3, {0x03c5, 0x0308, 0x0300}}},
+ { 0x1fe3, {3, {0x03c5, 0x0308, 0x0301}}},
+ { 0x1fe4, {2, {0x03c1, 0x0313}}},
+ { 0x1fe6, {2, {0x03c5, 0x0342}}},
+ { 0x1fe7, {3, {0x03c5, 0x0308, 0x0342}}},
+ { 0x1fe8, {1, {0x1fe0}}},
+ { 0x1fe9, {1, {0x1fe1}}},
+ { 0x1fea, {1, {0x1f7a}}},
+ { 0x1feb, {1, {0x1f7b}}},
+ { 0x1fec, {1, {0x1fe5}}},
+ { 0x1ff2, {2, {0x1f7c, 0x03b9}}},
+ { 0x1ff3, {2, {0x03c9, 0x03b9}}},
+ { 0x1ff4, {2, {0x03ce, 0x03b9}}},
+ { 0x1ff6, {2, {0x03c9, 0x0342}}},
+ { 0x1ff7, {3, {0x03c9, 0x0342, 0x03b9}}},
+ { 0x1ff8, {1, {0x1f78}}},
+ { 0x1ff9, {1, {0x1f79}}},
+ { 0x1ffa, {1, {0x1f7c}}},
+ { 0x1ffb, {1, {0x1f7d}}},
+ { 0x1ffc, {2, {0x03c9, 0x03b9}}},
+ { 0x2126, {1, {0x03c9}}},
+ { 0x212a, {1, {0x006b}}},
+ { 0x212b, {1, {0x00e5}}},
+ { 0x2160, {1, {0x2170}}},
+ { 0x2161, {1, {0x2171}}},
+ { 0x2162, {1, {0x2172}}},
+ { 0x2163, {1, {0x2173}}},
+ { 0x2164, {1, {0x2174}}},
+ { 0x2165, {1, {0x2175}}},
+ { 0x2166, {1, {0x2176}}},
+ { 0x2167, {1, {0x2177}}},
+ { 0x2168, {1, {0x2178}}},
+ { 0x2169, {1, {0x2179}}},
+ { 0x216a, {1, {0x217a}}},
+ { 0x216b, {1, {0x217b}}},
+ { 0x216c, {1, {0x217c}}},
+ { 0x216d, {1, {0x217d}}},
+ { 0x216e, {1, {0x217e}}},
+ { 0x216f, {1, {0x217f}}},
+ { 0x24b6, {1, {0x24d0}}},
+ { 0x24b7, {1, {0x24d1}}},
+ { 0x24b8, {1, {0x24d2}}},
+ { 0x24b9, {1, {0x24d3}}},
+ { 0x24ba, {1, {0x24d4}}},
+ { 0x24bb, {1, {0x24d5}}},
+ { 0x24bc, {1, {0x24d6}}},
+ { 0x24bd, {1, {0x24d7}}},
+ { 0x24be, {1, {0x24d8}}},
+ { 0x24bf, {1, {0x24d9}}},
+ { 0x24c0, {1, {0x24da}}},
+ { 0x24c1, {1, {0x24db}}},
+ { 0x24c2, {1, {0x24dc}}},
+ { 0x24c3, {1, {0x24dd}}},
+ { 0x24c4, {1, {0x24de}}},
+ { 0x24c5, {1, {0x24df}}},
+ { 0x24c6, {1, {0x24e0}}},
+ { 0x24c7, {1, {0x24e1}}},
+ { 0x24c8, {1, {0x24e2}}},
+ { 0x24c9, {1, {0x24e3}}},
+ { 0x24ca, {1, {0x24e4}}},
+ { 0x24cb, {1, {0x24e5}}},
+ { 0x24cc, {1, {0x24e6}}},
+ { 0x24cd, {1, {0x24e7}}},
+ { 0x24ce, {1, {0x24e8}}},
+ { 0x24cf, {1, {0x24e9}}},
+ { 0x2c00, {1, {0x2c30}}},
+ { 0x2c01, {1, {0x2c31}}},
+ { 0x2c02, {1, {0x2c32}}},
+ { 0x2c03, {1, {0x2c33}}},
+ { 0x2c04, {1, {0x2c34}}},
+ { 0x2c05, {1, {0x2c35}}},
+ { 0x2c06, {1, {0x2c36}}},
+ { 0x2c07, {1, {0x2c37}}},
+ { 0x2c08, {1, {0x2c38}}},
+ { 0x2c09, {1, {0x2c39}}},
+ { 0x2c0a, {1, {0x2c3a}}},
+ { 0x2c0b, {1, {0x2c3b}}},
+ { 0x2c0c, {1, {0x2c3c}}},
+ { 0x2c0d, {1, {0x2c3d}}},
+ { 0x2c0e, {1, {0x2c3e}}},
+ { 0x2c0f, {1, {0x2c3f}}},
+ { 0x2c10, {1, {0x2c40}}},
+ { 0x2c11, {1, {0x2c41}}},
+ { 0x2c12, {1, {0x2c42}}},
+ { 0x2c13, {1, {0x2c43}}},
+ { 0x2c14, {1, {0x2c44}}},
+ { 0x2c15, {1, {0x2c45}}},
+ { 0x2c16, {1, {0x2c46}}},
+ { 0x2c17, {1, {0x2c47}}},
+ { 0x2c18, {1, {0x2c48}}},
+ { 0x2c19, {1, {0x2c49}}},
+ { 0x2c1a, {1, {0x2c4a}}},
+ { 0x2c1b, {1, {0x2c4b}}},
+ { 0x2c1c, {1, {0x2c4c}}},
+ { 0x2c1d, {1, {0x2c4d}}},
+ { 0x2c1e, {1, {0x2c4e}}},
+ { 0x2c1f, {1, {0x2c4f}}},
+ { 0x2c20, {1, {0x2c50}}},
+ { 0x2c21, {1, {0x2c51}}},
+ { 0x2c22, {1, {0x2c52}}},
+ { 0x2c23, {1, {0x2c53}}},
+ { 0x2c24, {1, {0x2c54}}},
+ { 0x2c25, {1, {0x2c55}}},
+ { 0x2c26, {1, {0x2c56}}},
+ { 0x2c27, {1, {0x2c57}}},
+ { 0x2c28, {1, {0x2c58}}},
+ { 0x2c29, {1, {0x2c59}}},
+ { 0x2c2a, {1, {0x2c5a}}},
+ { 0x2c2b, {1, {0x2c5b}}},
+ { 0x2c2c, {1, {0x2c5c}}},
+ { 0x2c2d, {1, {0x2c5d}}},
+ { 0x2c2e, {1, {0x2c5e}}},
+ { 0x2c80, {1, {0x2c81}}},
+ { 0x2c82, {1, {0x2c83}}},
+ { 0x2c84, {1, {0x2c85}}},
+ { 0x2c86, {1, {0x2c87}}},
+ { 0x2c88, {1, {0x2c89}}},
+ { 0x2c8a, {1, {0x2c8b}}},
+ { 0x2c8c, {1, {0x2c8d}}},
+ { 0x2c8e, {1, {0x2c8f}}},
+ { 0x2c90, {1, {0x2c91}}},
+ { 0x2c92, {1, {0x2c93}}},
+ { 0x2c94, {1, {0x2c95}}},
+ { 0x2c96, {1, {0x2c97}}},
+ { 0x2c98, {1, {0x2c99}}},
+ { 0x2c9a, {1, {0x2c9b}}},
+ { 0x2c9c, {1, {0x2c9d}}},
+ { 0x2c9e, {1, {0x2c9f}}},
+ { 0x2ca0, {1, {0x2ca1}}},
+ { 0x2ca2, {1, {0x2ca3}}},
+ { 0x2ca4, {1, {0x2ca5}}},
+ { 0x2ca6, {1, {0x2ca7}}},
+ { 0x2ca8, {1, {0x2ca9}}},
+ { 0x2caa, {1, {0x2cab}}},
+ { 0x2cac, {1, {0x2cad}}},
+ { 0x2cae, {1, {0x2caf}}},
+ { 0x2cb0, {1, {0x2cb1}}},
+ { 0x2cb2, {1, {0x2cb3}}},
+ { 0x2cb4, {1, {0x2cb5}}},
+ { 0x2cb6, {1, {0x2cb7}}},
+ { 0x2cb8, {1, {0x2cb9}}},
+ { 0x2cba, {1, {0x2cbb}}},
+ { 0x2cbc, {1, {0x2cbd}}},
+ { 0x2cbe, {1, {0x2cbf}}},
+ { 0x2cc0, {1, {0x2cc1}}},
+ { 0x2cc2, {1, {0x2cc3}}},
+ { 0x2cc4, {1, {0x2cc5}}},
+ { 0x2cc6, {1, {0x2cc7}}},
+ { 0x2cc8, {1, {0x2cc9}}},
+ { 0x2cca, {1, {0x2ccb}}},
+ { 0x2ccc, {1, {0x2ccd}}},
+ { 0x2cce, {1, {0x2ccf}}},
+ { 0x2cd0, {1, {0x2cd1}}},
+ { 0x2cd2, {1, {0x2cd3}}},
+ { 0x2cd4, {1, {0x2cd5}}},
+ { 0x2cd6, {1, {0x2cd7}}},
+ { 0x2cd8, {1, {0x2cd9}}},
+ { 0x2cda, {1, {0x2cdb}}},
+ { 0x2cdc, {1, {0x2cdd}}},
+ { 0x2cde, {1, {0x2cdf}}},
+ { 0x2ce0, {1, {0x2ce1}}},
+ { 0x2ce2, {1, {0x2ce3}}},
+ { 0xfb00, {2, {0x0066, 0x0066}}},
+ { 0xfb01, {2, {0x0066, 0x0069}}},
+ { 0xfb02, {2, {0x0066, 0x006c}}},
+ { 0xfb03, {3, {0x0066, 0x0066, 0x0069}}},
+ { 0xfb04, {3, {0x0066, 0x0066, 0x006c}}},
+ { 0xfb05, {2, {0x0073, 0x0074}}},
+ { 0xfb06, {2, {0x0073, 0x0074}}},
+ { 0xfb13, {2, {0x0574, 0x0576}}},
+ { 0xfb14, {2, {0x0574, 0x0565}}},
+ { 0xfb15, {2, {0x0574, 0x056b}}},
+ { 0xfb16, {2, {0x057e, 0x0576}}},
+ { 0xfb17, {2, {0x0574, 0x056d}}},
+ { 0xff21, {1, {0xff41}}},
+ { 0xff22, {1, {0xff42}}},
+ { 0xff23, {1, {0xff43}}},
+ { 0xff24, {1, {0xff44}}},
+ { 0xff25, {1, {0xff45}}},
+ { 0xff26, {1, {0xff46}}},
+ { 0xff27, {1, {0xff47}}},
+ { 0xff28, {1, {0xff48}}},
+ { 0xff29, {1, {0xff49}}},
+ { 0xff2a, {1, {0xff4a}}},
+ { 0xff2b, {1, {0xff4b}}},
+ { 0xff2c, {1, {0xff4c}}},
+ { 0xff2d, {1, {0xff4d}}},
+ { 0xff2e, {1, {0xff4e}}},
+ { 0xff2f, {1, {0xff4f}}},
+ { 0xff30, {1, {0xff50}}},
+ { 0xff31, {1, {0xff51}}},
+ { 0xff32, {1, {0xff52}}},
+ { 0xff33, {1, {0xff53}}},
+ { 0xff34, {1, {0xff54}}},
+ { 0xff35, {1, {0xff55}}},
+ { 0xff36, {1, {0xff56}}},
+ { 0xff37, {1, {0xff57}}},
+ { 0xff38, {1, {0xff58}}},
+ { 0xff39, {1, {0xff59}}},
+ { 0xff3a, {1, {0xff5a}}},
+ { 0x10400, {1, {0x10428}}},
+ { 0x10401, {1, {0x10429}}},
+ { 0x10402, {1, {0x1042a}}},
+ { 0x10403, {1, {0x1042b}}},
+ { 0x10404, {1, {0x1042c}}},
+ { 0x10405, {1, {0x1042d}}},
+ { 0x10406, {1, {0x1042e}}},
+ { 0x10407, {1, {0x1042f}}},
+ { 0x10408, {1, {0x10430}}},
+ { 0x10409, {1, {0x10431}}},
+ { 0x1040a, {1, {0x10432}}},
+ { 0x1040b, {1, {0x10433}}},
+ { 0x1040c, {1, {0x10434}}},
+ { 0x1040d, {1, {0x10435}}},
+ { 0x1040e, {1, {0x10436}}},
+ { 0x1040f, {1, {0x10437}}},
+ { 0x10410, {1, {0x10438}}},
+ { 0x10411, {1, {0x10439}}},
+ { 0x10412, {1, {0x1043a}}},
+ { 0x10413, {1, {0x1043b}}},
+ { 0x10414, {1, {0x1043c}}},
+ { 0x10415, {1, {0x1043d}}},
+ { 0x10416, {1, {0x1043e}}},
+ { 0x10417, {1, {0x1043f}}},
+ { 0x10418, {1, {0x10440}}},
+ { 0x10419, {1, {0x10441}}},
+ { 0x1041a, {1, {0x10442}}},
+ { 0x1041b, {1, {0x10443}}},
+ { 0x1041c, {1, {0x10444}}},
+ { 0x1041d, {1, {0x10445}}},
+ { 0x1041e, {1, {0x10446}}},
+ { 0x1041f, {1, {0x10447}}},
+ { 0x10420, {1, {0x10448}}},
+ { 0x10421, {1, {0x10449}}},
+ { 0x10422, {1, {0x1044a}}},
+ { 0x10423, {1, {0x1044b}}},
+ { 0x10424, {1, {0x1044c}}},
+ { 0x10425, {1, {0x1044d}}},
+ { 0x10426, {1, {0x1044e}}},
+ { 0x10427, {1, {0x1044f}}}
+};
+
+static const CaseFold_11_Type CaseFold_Locale[] = {
+ { 0x0049, {1, {0x0069}}},
+ { 0x0130, {2, {0x0069, 0x0307}}}
+};
+
+static const CaseUnfold_11_Type CaseUnfold_11[] = {
+ { 0x0061, {1, {0x0041 }}},
+ { 0x0062, {1, {0x0042 }}},
+ { 0x0063, {1, {0x0043 }}},
+ { 0x0064, {1, {0x0044 }}},
+ { 0x0065, {1, {0x0045 }}},
+ { 0x0066, {1, {0x0046 }}},
+ { 0x0067, {1, {0x0047 }}},
+ { 0x0068, {1, {0x0048 }}},
+ { 0x006a, {1, {0x004a }}},
+ { 0x006b, {2, {0x212a, 0x004b }}},
+ { 0x006c, {1, {0x004c }}},
+ { 0x006d, {1, {0x004d }}},
+ { 0x006e, {1, {0x004e }}},
+ { 0x006f, {1, {0x004f }}},
+ { 0x0070, {1, {0x0050 }}},
+ { 0x0071, {1, {0x0051 }}},
+ { 0x0072, {1, {0x0052 }}},
+ { 0x0073, {2, {0x0053, 0x017f }}},
+ { 0x0074, {1, {0x0054 }}},
+ { 0x0075, {1, {0x0055 }}},
+ { 0x0076, {1, {0x0056 }}},
+ { 0x0077, {1, {0x0057 }}},
+ { 0x0078, {1, {0x0058 }}},
+ { 0x0079, {1, {0x0059 }}},
+ { 0x007a, {1, {0x005a }}},
+ { 0x00e0, {1, {0x00c0 }}},
+ { 0x00e1, {1, {0x00c1 }}},
+ { 0x00e2, {1, {0x00c2 }}},
+ { 0x00e3, {1, {0x00c3 }}},
+ { 0x00e4, {1, {0x00c4 }}},
+ { 0x00e5, {2, {0x212b, 0x00c5 }}},
+ { 0x00e6, {1, {0x00c6 }}},
+ { 0x00e7, {1, {0x00c7 }}},
+ { 0x00e8, {1, {0x00c8 }}},
+ { 0x00e9, {1, {0x00c9 }}},
+ { 0x00ea, {1, {0x00ca }}},
+ { 0x00eb, {1, {0x00cb }}},
+ { 0x00ec, {1, {0x00cc }}},
+ { 0x00ed, {1, {0x00cd }}},
+ { 0x00ee, {1, {0x00ce }}},
+ { 0x00ef, {1, {0x00cf }}},
+ { 0x00f0, {1, {0x00d0 }}},
+ { 0x00f1, {1, {0x00d1 }}},
+ { 0x00f2, {1, {0x00d2 }}},
+ { 0x00f3, {1, {0x00d3 }}},
+ { 0x00f4, {1, {0x00d4 }}},
+ { 0x00f5, {1, {0x00d5 }}},
+ { 0x00f6, {1, {0x00d6 }}},
+ { 0x00f8, {1, {0x00d8 }}},
+ { 0x00f9, {1, {0x00d9 }}},
+ { 0x00fa, {1, {0x00da }}},
+ { 0x00fb, {1, {0x00db }}},
+ { 0x00fc, {1, {0x00dc }}},
+ { 0x00fd, {1, {0x00dd }}},
+ { 0x00fe, {1, {0x00de }}},
+ { 0x00ff, {1, {0x0178 }}},
+ { 0x0101, {1, {0x0100 }}},
+ { 0x0103, {1, {0x0102 }}},
+ { 0x0105, {1, {0x0104 }}},
+ { 0x0107, {1, {0x0106 }}},
+ { 0x0109, {1, {0x0108 }}},
+ { 0x010b, {1, {0x010a }}},
+ { 0x010d, {1, {0x010c }}},
+ { 0x010f, {1, {0x010e }}},
+ { 0x0111, {1, {0x0110 }}},
+ { 0x0113, {1, {0x0112 }}},
+ { 0x0115, {1, {0x0114 }}},
+ { 0x0117, {1, {0x0116 }}},
+ { 0x0119, {1, {0x0118 }}},
+ { 0x011b, {1, {0x011a }}},
+ { 0x011d, {1, {0x011c }}},
+ { 0x011f, {1, {0x011e }}},
+ { 0x0121, {1, {0x0120 }}},
+ { 0x0123, {1, {0x0122 }}},
+ { 0x0125, {1, {0x0124 }}},
+ { 0x0127, {1, {0x0126 }}},
+ { 0x0129, {1, {0x0128 }}},
+ { 0x012b, {1, {0x012a }}},
+ { 0x012d, {1, {0x012c }}},
+ { 0x012f, {1, {0x012e }}},
+ { 0x0133, {1, {0x0132 }}},
+ { 0x0135, {1, {0x0134 }}},
+ { 0x0137, {1, {0x0136 }}},
+ { 0x013a, {1, {0x0139 }}},
+ { 0x013c, {1, {0x013b }}},
+ { 0x013e, {1, {0x013d }}},
+ { 0x0140, {1, {0x013f }}},
+ { 0x0142, {1, {0x0141 }}},
+ { 0x0144, {1, {0x0143 }}},
+ { 0x0146, {1, {0x0145 }}},
+ { 0x0148, {1, {0x0147 }}},
+ { 0x014b, {1, {0x014a }}},
+ { 0x014d, {1, {0x014c }}},
+ { 0x014f, {1, {0x014e }}},
+ { 0x0151, {1, {0x0150 }}},
+ { 0x0153, {1, {0x0152 }}},
+ { 0x0155, {1, {0x0154 }}},
+ { 0x0157, {1, {0x0156 }}},
+ { 0x0159, {1, {0x0158 }}},
+ { 0x015b, {1, {0x015a }}},
+ { 0x015d, {1, {0x015c }}},
+ { 0x015f, {1, {0x015e }}},
+ { 0x0161, {1, {0x0160 }}},
+ { 0x0163, {1, {0x0162 }}},
+ { 0x0165, {1, {0x0164 }}},
+ { 0x0167, {1, {0x0166 }}},
+ { 0x0169, {1, {0x0168 }}},
+ { 0x016b, {1, {0x016a }}},
+ { 0x016d, {1, {0x016c }}},
+ { 0x016f, {1, {0x016e }}},
+ { 0x0171, {1, {0x0170 }}},
+ { 0x0173, {1, {0x0172 }}},
+ { 0x0175, {1, {0x0174 }}},
+ { 0x0177, {1, {0x0176 }}},
+ { 0x017a, {1, {0x0179 }}},
+ { 0x017c, {1, {0x017b }}},
+ { 0x017e, {1, {0x017d }}},
+ { 0x0183, {1, {0x0182 }}},
+ { 0x0185, {1, {0x0184 }}},
+ { 0x0188, {1, {0x0187 }}},
+ { 0x018c, {1, {0x018b }}},
+ { 0x0192, {1, {0x0191 }}},
+ { 0x0195, {1, {0x01f6 }}},
+ { 0x0199, {1, {0x0198 }}},
+ { 0x019a, {1, {0x023d }}},
+ { 0x019e, {1, {0x0220 }}},
+ { 0x01a1, {1, {0x01a0 }}},
+ { 0x01a3, {1, {0x01a2 }}},
+ { 0x01a5, {1, {0x01a4 }}},
+ { 0x01a8, {1, {0x01a7 }}},
+ { 0x01ad, {1, {0x01ac }}},
+ { 0x01b0, {1, {0x01af }}},
+ { 0x01b4, {1, {0x01b3 }}},
+ { 0x01b6, {1, {0x01b5 }}},
+ { 0x01b9, {1, {0x01b8 }}},
+ { 0x01bd, {1, {0x01bc }}},
+ { 0x01bf, {1, {0x01f7 }}},
+ { 0x01c6, {2, {0x01c4, 0x01c5 }}},
+ { 0x01c9, {2, {0x01c7, 0x01c8 }}},
+ { 0x01cc, {2, {0x01ca, 0x01cb }}},
+ { 0x01ce, {1, {0x01cd }}},
+ { 0x01d0, {1, {0x01cf }}},
+ { 0x01d2, {1, {0x01d1 }}},
+ { 0x01d4, {1, {0x01d3 }}},
+ { 0x01d6, {1, {0x01d5 }}},
+ { 0x01d8, {1, {0x01d7 }}},
+ { 0x01da, {1, {0x01d9 }}},
+ { 0x01dc, {1, {0x01db }}},
+ { 0x01dd, {1, {0x018e }}},
+ { 0x01df, {1, {0x01de }}},
+ { 0x01e1, {1, {0x01e0 }}},
+ { 0x01e3, {1, {0x01e2 }}},
+ { 0x01e5, {1, {0x01e4 }}},
+ { 0x01e7, {1, {0x01e6 }}},
+ { 0x01e9, {1, {0x01e8 }}},
+ { 0x01eb, {1, {0x01ea }}},
+ { 0x01ed, {1, {0x01ec }}},
+ { 0x01ef, {1, {0x01ee }}},
+ { 0x01f3, {2, {0x01f1, 0x01f2 }}},
+ { 0x01f5, {1, {0x01f4 }}},
+ { 0x01f9, {1, {0x01f8 }}},
+ { 0x01fb, {1, {0x01fa }}},
+ { 0x01fd, {1, {0x01fc }}},
+ { 0x01ff, {1, {0x01fe }}},
+ { 0x0201, {1, {0x0200 }}},
+ { 0x0203, {1, {0x0202 }}},
+ { 0x0205, {1, {0x0204 }}},
+ { 0x0207, {1, {0x0206 }}},
+ { 0x0209, {1, {0x0208 }}},
+ { 0x020b, {1, {0x020a }}},
+ { 0x020d, {1, {0x020c }}},
+ { 0x020f, {1, {0x020e }}},
+ { 0x0211, {1, {0x0210 }}},
+ { 0x0213, {1, {0x0212 }}},
+ { 0x0215, {1, {0x0214 }}},
+ { 0x0217, {1, {0x0216 }}},
+ { 0x0219, {1, {0x0218 }}},
+ { 0x021b, {1, {0x021a }}},
+ { 0x021d, {1, {0x021c }}},
+ { 0x021f, {1, {0x021e }}},
+ { 0x0223, {1, {0x0222 }}},
+ { 0x0225, {1, {0x0224 }}},
+ { 0x0227, {1, {0x0226 }}},
+ { 0x0229, {1, {0x0228 }}},
+ { 0x022b, {1, {0x022a }}},
+ { 0x022d, {1, {0x022c }}},
+ { 0x022f, {1, {0x022e }}},
+ { 0x0231, {1, {0x0230 }}},
+ { 0x0233, {1, {0x0232 }}},
+ { 0x023c, {1, {0x023b }}},
+ { 0x0253, {1, {0x0181 }}},
+ { 0x0254, {1, {0x0186 }}},
+ { 0x0256, {1, {0x0189 }}},
+ { 0x0257, {1, {0x018a }}},
+ { 0x0259, {1, {0x018f }}},
+ { 0x025b, {1, {0x0190 }}},
+ { 0x0260, {1, {0x0193 }}},
+ { 0x0263, {1, {0x0194 }}},
+ { 0x0268, {1, {0x0197 }}},
+ { 0x0269, {1, {0x0196 }}},
+ { 0x026f, {1, {0x019c }}},
+ { 0x0272, {1, {0x019d }}},
+ { 0x0275, {1, {0x019f }}},
+ { 0x0280, {1, {0x01a6 }}},
+ { 0x0283, {1, {0x01a9 }}},
+ { 0x0288, {1, {0x01ae }}},
+ { 0x028a, {1, {0x01b1 }}},
+ { 0x028b, {1, {0x01b2 }}},
+ { 0x0292, {1, {0x01b7 }}},
+ { 0x0294, {1, {0x0241 }}},
+ { 0x03ac, {1, {0x0386 }}},
+ { 0x03ad, {1, {0x0388 }}},
+ { 0x03ae, {1, {0x0389 }}},
+ { 0x03af, {1, {0x038a }}},
+ { 0x03b1, {1, {0x0391 }}},
+ { 0x03b2, {2, {0x0392, 0x03d0 }}},
+ { 0x03b3, {1, {0x0393 }}},
+ { 0x03b4, {1, {0x0394 }}},
+ { 0x03b5, {2, {0x03f5, 0x0395 }}},
+ { 0x03b6, {1, {0x0396 }}},
+ { 0x03b7, {1, {0x0397 }}},
+ { 0x03b8, {3, {0x03f4, 0x0398, 0x03d1 }}},
+ { 0x03b9, {3, {0x1fbe, 0x0399, 0x0345 }}},
+ { 0x03ba, {2, {0x03f0, 0x039a }}},
+ { 0x03bb, {1, {0x039b }}},
+ { 0x03bc, {2, {0x00b5, 0x039c }}},
+ { 0x03bd, {1, {0x039d }}},
+ { 0x03be, {1, {0x039e }}},
+ { 0x03bf, {1, {0x039f }}},
+ { 0x03c0, {2, {0x03a0, 0x03d6 }}},
+ { 0x03c1, {2, {0x03f1, 0x03a1 }}},
+ { 0x03c3, {2, {0x03a3, 0x03c2 }}},
+ { 0x03c4, {1, {0x03a4 }}},
+ { 0x03c5, {1, {0x03a5 }}},
+ { 0x03c6, {2, {0x03a6, 0x03d5 }}},
+ { 0x03c7, {1, {0x03a7 }}},
+ { 0x03c8, {1, {0x03a8 }}},
+ { 0x03c9, {2, {0x03a9, 0x2126 }}},
+ { 0x03ca, {1, {0x03aa }}},
+ { 0x03cb, {1, {0x03ab }}},
+ { 0x03cc, {1, {0x038c }}},
+ { 0x03cd, {1, {0x038e }}},
+ { 0x03ce, {1, {0x038f }}},
+ { 0x03d9, {1, {0x03d8 }}},
+ { 0x03db, {1, {0x03da }}},
+ { 0x03dd, {1, {0x03dc }}},
+ { 0x03df, {1, {0x03de }}},
+ { 0x03e1, {1, {0x03e0 }}},
+ { 0x03e3, {1, {0x03e2 }}},
+ { 0x03e5, {1, {0x03e4 }}},
+ { 0x03e7, {1, {0x03e6 }}},
+ { 0x03e9, {1, {0x03e8 }}},
+ { 0x03eb, {1, {0x03ea }}},
+ { 0x03ed, {1, {0x03ec }}},
+ { 0x03ef, {1, {0x03ee }}},
+ { 0x03f2, {1, {0x03f9 }}},
+ { 0x03f8, {1, {0x03f7 }}},
+ { 0x03fb, {1, {0x03fa }}},
+ { 0x0430, {1, {0x0410 }}},
+ { 0x0431, {1, {0x0411 }}},
+ { 0x0432, {1, {0x0412 }}},
+ { 0x0433, {1, {0x0413 }}},
+ { 0x0434, {1, {0x0414 }}},
+ { 0x0435, {1, {0x0415 }}},
+ { 0x0436, {1, {0x0416 }}},
+ { 0x0437, {1, {0x0417 }}},
+ { 0x0438, {1, {0x0418 }}},
+ { 0x0439, {1, {0x0419 }}},
+ { 0x043a, {1, {0x041a }}},
+ { 0x043b, {1, {0x041b }}},
+ { 0x043c, {1, {0x041c }}},
+ { 0x043d, {1, {0x041d }}},
+ { 0x043e, {1, {0x041e }}},
+ { 0x043f, {1, {0x041f }}},
+ { 0x0440, {1, {0x0420 }}},
+ { 0x0441, {1, {0x0421 }}},
+ { 0x0442, {1, {0x0422 }}},
+ { 0x0443, {1, {0x0423 }}},
+ { 0x0444, {1, {0x0424 }}},
+ { 0x0445, {1, {0x0425 }}},
+ { 0x0446, {1, {0x0426 }}},
+ { 0x0447, {1, {0x0427 }}},
+ { 0x0448, {1, {0x0428 }}},
+ { 0x0449, {1, {0x0429 }}},
+ { 0x044a, {1, {0x042a }}},
+ { 0x044b, {1, {0x042b }}},
+ { 0x044c, {1, {0x042c }}},
+ { 0x044d, {1, {0x042d }}},
+ { 0x044e, {1, {0x042e }}},
+ { 0x044f, {1, {0x042f }}},
+ { 0x0450, {1, {0x0400 }}},
+ { 0x0451, {1, {0x0401 }}},
+ { 0x0452, {1, {0x0402 }}},
+ { 0x0453, {1, {0x0403 }}},
+ { 0x0454, {1, {0x0404 }}},
+ { 0x0455, {1, {0x0405 }}},
+ { 0x0456, {1, {0x0406 }}},
+ { 0x0457, {1, {0x0407 }}},
+ { 0x0458, {1, {0x0408 }}},
+ { 0x0459, {1, {0x0409 }}},
+ { 0x045a, {1, {0x040a }}},
+ { 0x045b, {1, {0x040b }}},
+ { 0x045c, {1, {0x040c }}},
+ { 0x045d, {1, {0x040d }}},
+ { 0x045e, {1, {0x040e }}},
+ { 0x045f, {1, {0x040f }}},
+ { 0x0461, {1, {0x0460 }}},
+ { 0x0463, {1, {0x0462 }}},
+ { 0x0465, {1, {0x0464 }}},
+ { 0x0467, {1, {0x0466 }}},
+ { 0x0469, {1, {0x0468 }}},
+ { 0x046b, {1, {0x046a }}},
+ { 0x046d, {1, {0x046c }}},
+ { 0x046f, {1, {0x046e }}},
+ { 0x0471, {1, {0x0470 }}},
+ { 0x0473, {1, {0x0472 }}},
+ { 0x0475, {1, {0x0474 }}},
+ { 0x0477, {1, {0x0476 }}},
+ { 0x0479, {1, {0x0478 }}},
+ { 0x047b, {1, {0x047a }}},
+ { 0x047d, {1, {0x047c }}},
+ { 0x047f, {1, {0x047e }}},
+ { 0x0481, {1, {0x0480 }}},
+ { 0x048b, {1, {0x048a }}},
+ { 0x048d, {1, {0x048c }}},
+ { 0x048f, {1, {0x048e }}},
+ { 0x0491, {1, {0x0490 }}},
+ { 0x0493, {1, {0x0492 }}},
+ { 0x0495, {1, {0x0494 }}},
+ { 0x0497, {1, {0x0496 }}},
+ { 0x0499, {1, {0x0498 }}},
+ { 0x049b, {1, {0x049a }}},
+ { 0x049d, {1, {0x049c }}},
+ { 0x049f, {1, {0x049e }}},
+ { 0x04a1, {1, {0x04a0 }}},
+ { 0x04a3, {1, {0x04a2 }}},
+ { 0x04a5, {1, {0x04a4 }}},
+ { 0x04a7, {1, {0x04a6 }}},
+ { 0x04a9, {1, {0x04a8 }}},
+ { 0x04ab, {1, {0x04aa }}},
+ { 0x04ad, {1, {0x04ac }}},
+ { 0x04af, {1, {0x04ae }}},
+ { 0x04b1, {1, {0x04b0 }}},
+ { 0x04b3, {1, {0x04b2 }}},
+ { 0x04b5, {1, {0x04b4 }}},
+ { 0x04b7, {1, {0x04b6 }}},
+ { 0x04b9, {1, {0x04b8 }}},
+ { 0x04bb, {1, {0x04ba }}},
+ { 0x04bd, {1, {0x04bc }}},
+ { 0x04bf, {1, {0x04be }}},
+ { 0x04c2, {1, {0x04c1 }}},
+ { 0x04c4, {1, {0x04c3 }}},
+ { 0x04c6, {1, {0x04c5 }}},
+ { 0x04c8, {1, {0x04c7 }}},
+ { 0x04ca, {1, {0x04c9 }}},
+ { 0x04cc, {1, {0x04cb }}},
+ { 0x04ce, {1, {0x04cd }}},
+ { 0x04d1, {1, {0x04d0 }}},
+ { 0x04d3, {1, {0x04d2 }}},
+ { 0x04d5, {1, {0x04d4 }}},
+ { 0x04d7, {1, {0x04d6 }}},
+ { 0x04d9, {1, {0x04d8 }}},
+ { 0x04db, {1, {0x04da }}},
+ { 0x04dd, {1, {0x04dc }}},
+ { 0x04df, {1, {0x04de }}},
+ { 0x04e1, {1, {0x04e0 }}},
+ { 0x04e3, {1, {0x04e2 }}},
+ { 0x04e5, {1, {0x04e4 }}},
+ { 0x04e7, {1, {0x04e6 }}},
+ { 0x04e9, {1, {0x04e8 }}},
+ { 0x04eb, {1, {0x04ea }}},
+ { 0x04ed, {1, {0x04ec }}},
+ { 0x04ef, {1, {0x04ee }}},
+ { 0x04f1, {1, {0x04f0 }}},
+ { 0x04f3, {1, {0x04f2 }}},
+ { 0x04f5, {1, {0x04f4 }}},
+ { 0x04f7, {1, {0x04f6 }}},
+ { 0x04f9, {1, {0x04f8 }}},
+ { 0x0501, {1, {0x0500 }}},
+ { 0x0503, {1, {0x0502 }}},
+ { 0x0505, {1, {0x0504 }}},
+ { 0x0507, {1, {0x0506 }}},
+ { 0x0509, {1, {0x0508 }}},
+ { 0x050b, {1, {0x050a }}},
+ { 0x050d, {1, {0x050c }}},
+ { 0x050f, {1, {0x050e }}},
+ { 0x0561, {1, {0x0531 }}},
+ { 0x0562, {1, {0x0532 }}},
+ { 0x0563, {1, {0x0533 }}},
+ { 0x0564, {1, {0x0534 }}},
+ { 0x0565, {1, {0x0535 }}},
+ { 0x0566, {1, {0x0536 }}},
+ { 0x0567, {1, {0x0537 }}},
+ { 0x0568, {1, {0x0538 }}},
+ { 0x0569, {1, {0x0539 }}},
+ { 0x056a, {1, {0x053a }}},
+ { 0x056b, {1, {0x053b }}},
+ { 0x056c, {1, {0x053c }}},
+ { 0x056d, {1, {0x053d }}},
+ { 0x056e, {1, {0x053e }}},
+ { 0x056f, {1, {0x053f }}},
+ { 0x0570, {1, {0x0540 }}},
+ { 0x0571, {1, {0x0541 }}},
+ { 0x0572, {1, {0x0542 }}},
+ { 0x0573, {1, {0x0543 }}},
+ { 0x0574, {1, {0x0544 }}},
+ { 0x0575, {1, {0x0545 }}},
+ { 0x0576, {1, {0x0546 }}},
+ { 0x0577, {1, {0x0547 }}},
+ { 0x0578, {1, {0x0548 }}},
+ { 0x0579, {1, {0x0549 }}},
+ { 0x057a, {1, {0x054a }}},
+ { 0x057b, {1, {0x054b }}},
+ { 0x057c, {1, {0x054c }}},
+ { 0x057d, {1, {0x054d }}},
+ { 0x057e, {1, {0x054e }}},
+ { 0x057f, {1, {0x054f }}},
+ { 0x0580, {1, {0x0550 }}},
+ { 0x0581, {1, {0x0551 }}},
+ { 0x0582, {1, {0x0552 }}},
+ { 0x0583, {1, {0x0553 }}},
+ { 0x0584, {1, {0x0554 }}},
+ { 0x0585, {1, {0x0555 }}},
+ { 0x0586, {1, {0x0556 }}},
+ { 0x1e01, {1, {0x1e00 }}},
+ { 0x1e03, {1, {0x1e02 }}},
+ { 0x1e05, {1, {0x1e04 }}},
+ { 0x1e07, {1, {0x1e06 }}},
+ { 0x1e09, {1, {0x1e08 }}},
+ { 0x1e0b, {1, {0x1e0a }}},
+ { 0x1e0d, {1, {0x1e0c }}},
+ { 0x1e0f, {1, {0x1e0e }}},
+ { 0x1e11, {1, {0x1e10 }}},
+ { 0x1e13, {1, {0x1e12 }}},
+ { 0x1e15, {1, {0x1e14 }}},
+ { 0x1e17, {1, {0x1e16 }}},
+ { 0x1e19, {1, {0x1e18 }}},
+ { 0x1e1b, {1, {0x1e1a }}},
+ { 0x1e1d, {1, {0x1e1c }}},
+ { 0x1e1f, {1, {0x1e1e }}},
+ { 0x1e21, {1, {0x1e20 }}},
+ { 0x1e23, {1, {0x1e22 }}},
+ { 0x1e25, {1, {0x1e24 }}},
+ { 0x1e27, {1, {0x1e26 }}},
+ { 0x1e29, {1, {0x1e28 }}},
+ { 0x1e2b, {1, {0x1e2a }}},
+ { 0x1e2d, {1, {0x1e2c }}},
+ { 0x1e2f, {1, {0x1e2e }}},
+ { 0x1e31, {1, {0x1e30 }}},
+ { 0x1e33, {1, {0x1e32 }}},
+ { 0x1e35, {1, {0x1e34 }}},
+ { 0x1e37, {1, {0x1e36 }}},
+ { 0x1e39, {1, {0x1e38 }}},
+ { 0x1e3b, {1, {0x1e3a }}},
+ { 0x1e3d, {1, {0x1e3c }}},
+ { 0x1e3f, {1, {0x1e3e }}},
+ { 0x1e41, {1, {0x1e40 }}},
+ { 0x1e43, {1, {0x1e42 }}},
+ { 0x1e45, {1, {0x1e44 }}},
+ { 0x1e47, {1, {0x1e46 }}},
+ { 0x1e49, {1, {0x1e48 }}},
+ { 0x1e4b, {1, {0x1e4a }}},
+ { 0x1e4d, {1, {0x1e4c }}},
+ { 0x1e4f, {1, {0x1e4e }}},
+ { 0x1e51, {1, {0x1e50 }}},
+ { 0x1e53, {1, {0x1e52 }}},
+ { 0x1e55, {1, {0x1e54 }}},
+ { 0x1e57, {1, {0x1e56 }}},
+ { 0x1e59, {1, {0x1e58 }}},
+ { 0x1e5b, {1, {0x1e5a }}},
+ { 0x1e5d, {1, {0x1e5c }}},
+ { 0x1e5f, {1, {0x1e5e }}},
+ { 0x1e61, {2, {0x1e9b, 0x1e60 }}},
+ { 0x1e63, {1, {0x1e62 }}},
+ { 0x1e65, {1, {0x1e64 }}},
+ { 0x1e67, {1, {0x1e66 }}},
+ { 0x1e69, {1, {0x1e68 }}},
+ { 0x1e6b, {1, {0x1e6a }}},
+ { 0x1e6d, {1, {0x1e6c }}},
+ { 0x1e6f, {1, {0x1e6e }}},
+ { 0x1e71, {1, {0x1e70 }}},
+ { 0x1e73, {1, {0x1e72 }}},
+ { 0x1e75, {1, {0x1e74 }}},
+ { 0x1e77, {1, {0x1e76 }}},
+ { 0x1e79, {1, {0x1e78 }}},
+ { 0x1e7b, {1, {0x1e7a }}},
+ { 0x1e7d, {1, {0x1e7c }}},
+ { 0x1e7f, {1, {0x1e7e }}},
+ { 0x1e81, {1, {0x1e80 }}},
+ { 0x1e83, {1, {0x1e82 }}},
+ { 0x1e85, {1, {0x1e84 }}},
+ { 0x1e87, {1, {0x1e86 }}},
+ { 0x1e89, {1, {0x1e88 }}},
+ { 0x1e8b, {1, {0x1e8a }}},
+ { 0x1e8d, {1, {0x1e8c }}},
+ { 0x1e8f, {1, {0x1e8e }}},
+ { 0x1e91, {1, {0x1e90 }}},
+ { 0x1e93, {1, {0x1e92 }}},
+ { 0x1e95, {1, {0x1e94 }}},
+ { 0x1ea1, {1, {0x1ea0 }}},
+ { 0x1ea3, {1, {0x1ea2 }}},
+ { 0x1ea5, {1, {0x1ea4 }}},
+ { 0x1ea7, {1, {0x1ea6 }}},
+ { 0x1ea9, {1, {0x1ea8 }}},
+ { 0x1eab, {1, {0x1eaa }}},
+ { 0x1ead, {1, {0x1eac }}},
+ { 0x1eaf, {1, {0x1eae }}},
+ { 0x1eb1, {1, {0x1eb0 }}},
+ { 0x1eb3, {1, {0x1eb2 }}},
+ { 0x1eb5, {1, {0x1eb4 }}},
+ { 0x1eb7, {1, {0x1eb6 }}},
+ { 0x1eb9, {1, {0x1eb8 }}},
+ { 0x1ebb, {1, {0x1eba }}},
+ { 0x1ebd, {1, {0x1ebc }}},
+ { 0x1ebf, {1, {0x1ebe }}},
+ { 0x1ec1, {1, {0x1ec0 }}},
+ { 0x1ec3, {1, {0x1ec2 }}},
+ { 0x1ec5, {1, {0x1ec4 }}},
+ { 0x1ec7, {1, {0x1ec6 }}},
+ { 0x1ec9, {1, {0x1ec8 }}},
+ { 0x1ecb, {1, {0x1eca }}},
+ { 0x1ecd, {1, {0x1ecc }}},
+ { 0x1ecf, {1, {0x1ece }}},
+ { 0x1ed1, {1, {0x1ed0 }}},
+ { 0x1ed3, {1, {0x1ed2 }}},
+ { 0x1ed5, {1, {0x1ed4 }}},
+ { 0x1ed7, {1, {0x1ed6 }}},
+ { 0x1ed9, {1, {0x1ed8 }}},
+ { 0x1edb, {1, {0x1eda }}},
+ { 0x1edd, {1, {0x1edc }}},
+ { 0x1edf, {1, {0x1ede }}},
+ { 0x1ee1, {1, {0x1ee0 }}},
+ { 0x1ee3, {1, {0x1ee2 }}},
+ { 0x1ee5, {1, {0x1ee4 }}},
+ { 0x1ee7, {1, {0x1ee6 }}},
+ { 0x1ee9, {1, {0x1ee8 }}},
+ { 0x1eeb, {1, {0x1eea }}},
+ { 0x1eed, {1, {0x1eec }}},
+ { 0x1eef, {1, {0x1eee }}},
+ { 0x1ef1, {1, {0x1ef0 }}},
+ { 0x1ef3, {1, {0x1ef2 }}},
+ { 0x1ef5, {1, {0x1ef4 }}},
+ { 0x1ef7, {1, {0x1ef6 }}},
+ { 0x1ef9, {1, {0x1ef8 }}},
+ { 0x1f00, {1, {0x1f08 }}},
+ { 0x1f01, {1, {0x1f09 }}},
+ { 0x1f02, {1, {0x1f0a }}},
+ { 0x1f03, {1, {0x1f0b }}},
+ { 0x1f04, {1, {0x1f0c }}},
+ { 0x1f05, {1, {0x1f0d }}},
+ { 0x1f06, {1, {0x1f0e }}},
+ { 0x1f07, {1, {0x1f0f }}},
+ { 0x1f10, {1, {0x1f18 }}},
+ { 0x1f11, {1, {0x1f19 }}},
+ { 0x1f12, {1, {0x1f1a }}},
+ { 0x1f13, {1, {0x1f1b }}},
+ { 0x1f14, {1, {0x1f1c }}},
+ { 0x1f15, {1, {0x1f1d }}},
+ { 0x1f20, {1, {0x1f28 }}},
+ { 0x1f21, {1, {0x1f29 }}},
+ { 0x1f22, {1, {0x1f2a }}},
+ { 0x1f23, {1, {0x1f2b }}},
+ { 0x1f24, {1, {0x1f2c }}},
+ { 0x1f25, {1, {0x1f2d }}},
+ { 0x1f26, {1, {0x1f2e }}},
+ { 0x1f27, {1, {0x1f2f }}},
+ { 0x1f30, {1, {0x1f38 }}},
+ { 0x1f31, {1, {0x1f39 }}},
+ { 0x1f32, {1, {0x1f3a }}},
+ { 0x1f33, {1, {0x1f3b }}},
+ { 0x1f34, {1, {0x1f3c }}},
+ { 0x1f35, {1, {0x1f3d }}},
+ { 0x1f36, {1, {0x1f3e }}},
+ { 0x1f37, {1, {0x1f3f }}},
+ { 0x1f40, {1, {0x1f48 }}},
+ { 0x1f41, {1, {0x1f49 }}},
+ { 0x1f42, {1, {0x1f4a }}},
+ { 0x1f43, {1, {0x1f4b }}},
+ { 0x1f44, {1, {0x1f4c }}},
+ { 0x1f45, {1, {0x1f4d }}},
+ { 0x1f51, {1, {0x1f59 }}},
+ { 0x1f53, {1, {0x1f5b }}},
+ { 0x1f55, {1, {0x1f5d }}},
+ { 0x1f57, {1, {0x1f5f }}},
+ { 0x1f60, {1, {0x1f68 }}},
+ { 0x1f61, {1, {0x1f69 }}},
+ { 0x1f62, {1, {0x1f6a }}},
+ { 0x1f63, {1, {0x1f6b }}},
+ { 0x1f64, {1, {0x1f6c }}},
+ { 0x1f65, {1, {0x1f6d }}},
+ { 0x1f66, {1, {0x1f6e }}},
+ { 0x1f67, {1, {0x1f6f }}},
+ { 0x1f70, {1, {0x1fba }}},
+ { 0x1f71, {1, {0x1fbb }}},
+ { 0x1f72, {1, {0x1fc8 }}},
+ { 0x1f73, {1, {0x1fc9 }}},
+ { 0x1f74, {1, {0x1fca }}},
+ { 0x1f75, {1, {0x1fcb }}},
+ { 0x1f76, {1, {0x1fda }}},
+ { 0x1f77, {1, {0x1fdb }}},
+ { 0x1f78, {1, {0x1ff8 }}},
+ { 0x1f79, {1, {0x1ff9 }}},
+ { 0x1f7a, {1, {0x1fea }}},
+ { 0x1f7b, {1, {0x1feb }}},
+ { 0x1f7c, {1, {0x1ffa }}},
+ { 0x1f7d, {1, {0x1ffb }}},
+ { 0x1fb0, {1, {0x1fb8 }}},
+ { 0x1fb1, {1, {0x1fb9 }}},
+ { 0x1fd0, {1, {0x1fd8 }}},
+ { 0x1fd1, {1, {0x1fd9 }}},
+ { 0x1fe0, {1, {0x1fe8 }}},
+ { 0x1fe1, {1, {0x1fe9 }}},
+ { 0x1fe5, {1, {0x1fec }}},
+ { 0x2170, {1, {0x2160 }}},
+ { 0x2171, {1, {0x2161 }}},
+ { 0x2172, {1, {0x2162 }}},
+ { 0x2173, {1, {0x2163 }}},
+ { 0x2174, {1, {0x2164 }}},
+ { 0x2175, {1, {0x2165 }}},
+ { 0x2176, {1, {0x2166 }}},
+ { 0x2177, {1, {0x2167 }}},
+ { 0x2178, {1, {0x2168 }}},
+ { 0x2179, {1, {0x2169 }}},
+ { 0x217a, {1, {0x216a }}},
+ { 0x217b, {1, {0x216b }}},
+ { 0x217c, {1, {0x216c }}},
+ { 0x217d, {1, {0x216d }}},
+ { 0x217e, {1, {0x216e }}},
+ { 0x217f, {1, {0x216f }}},
+ { 0x24d0, {1, {0x24b6 }}},
+ { 0x24d1, {1, {0x24b7 }}},
+ { 0x24d2, {1, {0x24b8 }}},
+ { 0x24d3, {1, {0x24b9 }}},
+ { 0x24d4, {1, {0x24ba }}},
+ { 0x24d5, {1, {0x24bb }}},
+ { 0x24d6, {1, {0x24bc }}},
+ { 0x24d7, {1, {0x24bd }}},
+ { 0x24d8, {1, {0x24be }}},
+ { 0x24d9, {1, {0x24bf }}},
+ { 0x24da, {1, {0x24c0 }}},
+ { 0x24db, {1, {0x24c1 }}},
+ { 0x24dc, {1, {0x24c2 }}},
+ { 0x24dd, {1, {0x24c3 }}},
+ { 0x24de, {1, {0x24c4 }}},
+ { 0x24df, {1, {0x24c5 }}},
+ { 0x24e0, {1, {0x24c6 }}},
+ { 0x24e1, {1, {0x24c7 }}},
+ { 0x24e2, {1, {0x24c8 }}},
+ { 0x24e3, {1, {0x24c9 }}},
+ { 0x24e4, {1, {0x24ca }}},
+ { 0x24e5, {1, {0x24cb }}},
+ { 0x24e6, {1, {0x24cc }}},
+ { 0x24e7, {1, {0x24cd }}},
+ { 0x24e8, {1, {0x24ce }}},
+ { 0x24e9, {1, {0x24cf }}},
+ { 0x2c30, {1, {0x2c00 }}},
+ { 0x2c31, {1, {0x2c01 }}},
+ { 0x2c32, {1, {0x2c02 }}},
+ { 0x2c33, {1, {0x2c03 }}},
+ { 0x2c34, {1, {0x2c04 }}},
+ { 0x2c35, {1, {0x2c05 }}},
+ { 0x2c36, {1, {0x2c06 }}},
+ { 0x2c37, {1, {0x2c07 }}},
+ { 0x2c38, {1, {0x2c08 }}},
+ { 0x2c39, {1, {0x2c09 }}},
+ { 0x2c3a, {1, {0x2c0a }}},
+ { 0x2c3b, {1, {0x2c0b }}},
+ { 0x2c3c, {1, {0x2c0c }}},
+ { 0x2c3d, {1, {0x2c0d }}},
+ { 0x2c3e, {1, {0x2c0e }}},
+ { 0x2c3f, {1, {0x2c0f }}},
+ { 0x2c40, {1, {0x2c10 }}},
+ { 0x2c41, {1, {0x2c11 }}},
+ { 0x2c42, {1, {0x2c12 }}},
+ { 0x2c43, {1, {0x2c13 }}},
+ { 0x2c44, {1, {0x2c14 }}},
+ { 0x2c45, {1, {0x2c15 }}},
+ { 0x2c46, {1, {0x2c16 }}},
+ { 0x2c47, {1, {0x2c17 }}},
+ { 0x2c48, {1, {0x2c18 }}},
+ { 0x2c49, {1, {0x2c19 }}},
+ { 0x2c4a, {1, {0x2c1a }}},
+ { 0x2c4b, {1, {0x2c1b }}},
+ { 0x2c4c, {1, {0x2c1c }}},
+ { 0x2c4d, {1, {0x2c1d }}},
+ { 0x2c4e, {1, {0x2c1e }}},
+ { 0x2c4f, {1, {0x2c1f }}},
+ { 0x2c50, {1, {0x2c20 }}},
+ { 0x2c51, {1, {0x2c21 }}},
+ { 0x2c52, {1, {0x2c22 }}},
+ { 0x2c53, {1, {0x2c23 }}},
+ { 0x2c54, {1, {0x2c24 }}},
+ { 0x2c55, {1, {0x2c25 }}},
+ { 0x2c56, {1, {0x2c26 }}},
+ { 0x2c57, {1, {0x2c27 }}},
+ { 0x2c58, {1, {0x2c28 }}},
+ { 0x2c59, {1, {0x2c29 }}},
+ { 0x2c5a, {1, {0x2c2a }}},
+ { 0x2c5b, {1, {0x2c2b }}},
+ { 0x2c5c, {1, {0x2c2c }}},
+ { 0x2c5d, {1, {0x2c2d }}},
+ { 0x2c5e, {1, {0x2c2e }}},
+ { 0x2c81, {1, {0x2c80 }}},
+ { 0x2c83, {1, {0x2c82 }}},
+ { 0x2c85, {1, {0x2c84 }}},
+ { 0x2c87, {1, {0x2c86 }}},
+ { 0x2c89, {1, {0x2c88 }}},
+ { 0x2c8b, {1, {0x2c8a }}},
+ { 0x2c8d, {1, {0x2c8c }}},
+ { 0x2c8f, {1, {0x2c8e }}},
+ { 0x2c91, {1, {0x2c90 }}},
+ { 0x2c93, {1, {0x2c92 }}},
+ { 0x2c95, {1, {0x2c94 }}},
+ { 0x2c97, {1, {0x2c96 }}},
+ { 0x2c99, {1, {0x2c98 }}},
+ { 0x2c9b, {1, {0x2c9a }}},
+ { 0x2c9d, {1, {0x2c9c }}},
+ { 0x2c9f, {1, {0x2c9e }}},
+ { 0x2ca1, {1, {0x2ca0 }}},
+ { 0x2ca3, {1, {0x2ca2 }}},
+ { 0x2ca5, {1, {0x2ca4 }}},
+ { 0x2ca7, {1, {0x2ca6 }}},
+ { 0x2ca9, {1, {0x2ca8 }}},
+ { 0x2cab, {1, {0x2caa }}},
+ { 0x2cad, {1, {0x2cac }}},
+ { 0x2caf, {1, {0x2cae }}},
+ { 0x2cb1, {1, {0x2cb0 }}},
+ { 0x2cb3, {1, {0x2cb2 }}},
+ { 0x2cb5, {1, {0x2cb4 }}},
+ { 0x2cb7, {1, {0x2cb6 }}},
+ { 0x2cb9, {1, {0x2cb8 }}},
+ { 0x2cbb, {1, {0x2cba }}},
+ { 0x2cbd, {1, {0x2cbc }}},
+ { 0x2cbf, {1, {0x2cbe }}},
+ { 0x2cc1, {1, {0x2cc0 }}},
+ { 0x2cc3, {1, {0x2cc2 }}},
+ { 0x2cc5, {1, {0x2cc4 }}},
+ { 0x2cc7, {1, {0x2cc6 }}},
+ { 0x2cc9, {1, {0x2cc8 }}},
+ { 0x2ccb, {1, {0x2cca }}},
+ { 0x2ccd, {1, {0x2ccc }}},
+ { 0x2ccf, {1, {0x2cce }}},
+ { 0x2cd1, {1, {0x2cd0 }}},
+ { 0x2cd3, {1, {0x2cd2 }}},
+ { 0x2cd5, {1, {0x2cd4 }}},
+ { 0x2cd7, {1, {0x2cd6 }}},
+ { 0x2cd9, {1, {0x2cd8 }}},
+ { 0x2cdb, {1, {0x2cda }}},
+ { 0x2cdd, {1, {0x2cdc }}},
+ { 0x2cdf, {1, {0x2cde }}},
+ { 0x2ce1, {1, {0x2ce0 }}},
+ { 0x2ce3, {1, {0x2ce2 }}},
+ { 0x2d00, {1, {0x10a0 }}},
+ { 0x2d01, {1, {0x10a1 }}},
+ { 0x2d02, {1, {0x10a2 }}},
+ { 0x2d03, {1, {0x10a3 }}},
+ { 0x2d04, {1, {0x10a4 }}},
+ { 0x2d05, {1, {0x10a5 }}},
+ { 0x2d06, {1, {0x10a6 }}},
+ { 0x2d07, {1, {0x10a7 }}},
+ { 0x2d08, {1, {0x10a8 }}},
+ { 0x2d09, {1, {0x10a9 }}},
+ { 0x2d0a, {1, {0x10aa }}},
+ { 0x2d0b, {1, {0x10ab }}},
+ { 0x2d0c, {1, {0x10ac }}},
+ { 0x2d0d, {1, {0x10ad }}},
+ { 0x2d0e, {1, {0x10ae }}},
+ { 0x2d0f, {1, {0x10af }}},
+ { 0x2d10, {1, {0x10b0 }}},
+ { 0x2d11, {1, {0x10b1 }}},
+ { 0x2d12, {1, {0x10b2 }}},
+ { 0x2d13, {1, {0x10b3 }}},
+ { 0x2d14, {1, {0x10b4 }}},
+ { 0x2d15, {1, {0x10b5 }}},
+ { 0x2d16, {1, {0x10b6 }}},
+ { 0x2d17, {1, {0x10b7 }}},
+ { 0x2d18, {1, {0x10b8 }}},
+ { 0x2d19, {1, {0x10b9 }}},
+ { 0x2d1a, {1, {0x10ba }}},
+ { 0x2d1b, {1, {0x10bb }}},
+ { 0x2d1c, {1, {0x10bc }}},
+ { 0x2d1d, {1, {0x10bd }}},
+ { 0x2d1e, {1, {0x10be }}},
+ { 0x2d1f, {1, {0x10bf }}},
+ { 0x2d20, {1, {0x10c0 }}},
+ { 0x2d21, {1, {0x10c1 }}},
+ { 0x2d22, {1, {0x10c2 }}},
+ { 0x2d23, {1, {0x10c3 }}},
+ { 0x2d24, {1, {0x10c4 }}},
+ { 0x2d25, {1, {0x10c5 }}},
+ { 0xff41, {1, {0xff21 }}},
+ { 0xff42, {1, {0xff22 }}},
+ { 0xff43, {1, {0xff23 }}},
+ { 0xff44, {1, {0xff24 }}},
+ { 0xff45, {1, {0xff25 }}},
+ { 0xff46, {1, {0xff26 }}},
+ { 0xff47, {1, {0xff27 }}},
+ { 0xff48, {1, {0xff28 }}},
+ { 0xff49, {1, {0xff29 }}},
+ { 0xff4a, {1, {0xff2a }}},
+ { 0xff4b, {1, {0xff2b }}},
+ { 0xff4c, {1, {0xff2c }}},
+ { 0xff4d, {1, {0xff2d }}},
+ { 0xff4e, {1, {0xff2e }}},
+ { 0xff4f, {1, {0xff2f }}},
+ { 0xff50, {1, {0xff30 }}},
+ { 0xff51, {1, {0xff31 }}},
+ { 0xff52, {1, {0xff32 }}},
+ { 0xff53, {1, {0xff33 }}},
+ { 0xff54, {1, {0xff34 }}},
+ { 0xff55, {1, {0xff35 }}},
+ { 0xff56, {1, {0xff36 }}},
+ { 0xff57, {1, {0xff37 }}},
+ { 0xff58, {1, {0xff38 }}},
+ { 0xff59, {1, {0xff39 }}},
+ { 0xff5a, {1, {0xff3a }}},
+ { 0x10428, {1, {0x10400 }}},
+ { 0x10429, {1, {0x10401 }}},
+ { 0x1042a, {1, {0x10402 }}},
+ { 0x1042b, {1, {0x10403 }}},
+ { 0x1042c, {1, {0x10404 }}},
+ { 0x1042d, {1, {0x10405 }}},
+ { 0x1042e, {1, {0x10406 }}},
+ { 0x1042f, {1, {0x10407 }}},
+ { 0x10430, {1, {0x10408 }}},
+ { 0x10431, {1, {0x10409 }}},
+ { 0x10432, {1, {0x1040a }}},
+ { 0x10433, {1, {0x1040b }}},
+ { 0x10434, {1, {0x1040c }}},
+ { 0x10435, {1, {0x1040d }}},
+ { 0x10436, {1, {0x1040e }}},
+ { 0x10437, {1, {0x1040f }}},
+ { 0x10438, {1, {0x10410 }}},
+ { 0x10439, {1, {0x10411 }}},
+ { 0x1043a, {1, {0x10412 }}},
+ { 0x1043b, {1, {0x10413 }}},
+ { 0x1043c, {1, {0x10414 }}},
+ { 0x1043d, {1, {0x10415 }}},
+ { 0x1043e, {1, {0x10416 }}},
+ { 0x1043f, {1, {0x10417 }}},
+ { 0x10440, {1, {0x10418 }}},
+ { 0x10441, {1, {0x10419 }}},
+ { 0x10442, {1, {0x1041a }}},
+ { 0x10443, {1, {0x1041b }}},
+ { 0x10444, {1, {0x1041c }}},
+ { 0x10445, {1, {0x1041d }}},
+ { 0x10446, {1, {0x1041e }}},
+ { 0x10447, {1, {0x1041f }}},
+ { 0x10448, {1, {0x10420 }}},
+ { 0x10449, {1, {0x10421 }}},
+ { 0x1044a, {1, {0x10422 }}},
+ { 0x1044b, {1, {0x10423 }}},
+ { 0x1044c, {1, {0x10424 }}},
+ { 0x1044d, {1, {0x10425 }}},
+ { 0x1044e, {1, {0x10426 }}},
+ { 0x1044f, {1, {0x10427 }}}
+};
+
+static const CaseUnfold_11_Type CaseUnfold_11_Locale[] = {
+ { 0x0069, {1, {0x0049 }}}
+};
+
+static const CaseUnfold_12_Type CaseUnfold_12[] = {
+ { {0x0061, 0x02be}, {1, {0x1e9a }}},
+ { {0x0066, 0x0066}, {1, {0xfb00 }}},
+ { {0x0066, 0x0069}, {1, {0xfb01 }}},
+ { {0x0066, 0x006c}, {1, {0xfb02 }}},
+ { {0x0068, 0x0331}, {1, {0x1e96 }}},
+ { {0x006a, 0x030c}, {1, {0x01f0 }}},
+ { {0x0073, 0x0073}, {1, {0x00df }}},
+ { {0x0073, 0x0074}, {2, {0xfb05, 0xfb06 }}},
+ { {0x0074, 0x0308}, {1, {0x1e97 }}},
+ { {0x0077, 0x030a}, {1, {0x1e98 }}},
+ { {0x0079, 0x030a}, {1, {0x1e99 }}},
+ { {0x02bc, 0x006e}, {1, {0x0149 }}},
+ { {0x03ac, 0x03b9}, {1, {0x1fb4 }}},
+ { {0x03ae, 0x03b9}, {1, {0x1fc4 }}},
+ { {0x03b1, 0x0342}, {1, {0x1fb6 }}},
+ { {0x03b1, 0x03b9}, {2, {0x1fb3, 0x1fbc }}},
+ { {0x03b7, 0x0342}, {1, {0x1fc6 }}},
+ { {0x03b7, 0x03b9}, {2, {0x1fc3, 0x1fcc }}},
+ { {0x03b9, 0x0342}, {1, {0x1fd6 }}},
+ { {0x03c1, 0x0313}, {1, {0x1fe4 }}},
+ { {0x03c5, 0x0313}, {1, {0x1f50 }}},
+ { {0x03c5, 0x0342}, {1, {0x1fe6 }}},
+ { {0x03c9, 0x0342}, {1, {0x1ff6 }}},
+ { {0x03c9, 0x03b9}, {2, {0x1ff3, 0x1ffc }}},
+ { {0x03ce, 0x03b9}, {1, {0x1ff4 }}},
+ { {0x0565, 0x0582}, {1, {0x0587 }}},
+ { {0x0574, 0x0565}, {1, {0xfb14 }}},
+ { {0x0574, 0x056b}, {1, {0xfb15 }}},
+ { {0x0574, 0x056d}, {1, {0xfb17 }}},
+ { {0x0574, 0x0576}, {1, {0xfb13 }}},
+ { {0x057e, 0x0576}, {1, {0xfb16 }}},
+ { {0x1f00, 0x03b9}, {2, {0x1f88, 0x1f80 }}},
+ { {0x1f01, 0x03b9}, {2, {0x1f81, 0x1f89 }}},
+ { {0x1f02, 0x03b9}, {2, {0x1f82, 0x1f8a }}},
+ { {0x1f03, 0x03b9}, {2, {0x1f83, 0x1f8b }}},
+ { {0x1f04, 0x03b9}, {2, {0x1f84, 0x1f8c }}},
+ { {0x1f05, 0x03b9}, {2, {0x1f85, 0x1f8d }}},
+ { {0x1f06, 0x03b9}, {2, {0x1f86, 0x1f8e }}},
+ { {0x1f07, 0x03b9}, {2, {0x1f87, 0x1f8f }}},
+ { {0x1f20, 0x03b9}, {2, {0x1f90, 0x1f98 }}},
+ { {0x1f21, 0x03b9}, {2, {0x1f91, 0x1f99 }}},
+ { {0x1f22, 0x03b9}, {2, {0x1f92, 0x1f9a }}},
+ { {0x1f23, 0x03b9}, {2, {0x1f93, 0x1f9b }}},
+ { {0x1f24, 0x03b9}, {2, {0x1f94, 0x1f9c }}},
+ { {0x1f25, 0x03b9}, {2, {0x1f95, 0x1f9d }}},
+ { {0x1f26, 0x03b9}, {2, {0x1f96, 0x1f9e }}},
+ { {0x1f27, 0x03b9}, {2, {0x1f97, 0x1f9f }}},
+ { {0x1f60, 0x03b9}, {2, {0x1fa0, 0x1fa8 }}},
+ { {0x1f61, 0x03b9}, {2, {0x1fa1, 0x1fa9 }}},
+ { {0x1f62, 0x03b9}, {2, {0x1fa2, 0x1faa }}},
+ { {0x1f63, 0x03b9}, {2, {0x1fa3, 0x1fab }}},
+ { {0x1f64, 0x03b9}, {2, {0x1fa4, 0x1fac }}},
+ { {0x1f65, 0x03b9}, {2, {0x1fa5, 0x1fad }}},
+ { {0x1f66, 0x03b9}, {2, {0x1fa6, 0x1fae }}},
+ { {0x1f67, 0x03b9}, {2, {0x1fa7, 0x1faf }}},
+ { {0x1f70, 0x03b9}, {1, {0x1fb2 }}},
+ { {0x1f74, 0x03b9}, {1, {0x1fc2 }}},
+ { {0x1f7c, 0x03b9}, {1, {0x1ff2 }}}
+};
+
+static const CaseUnfold_12_Type CaseUnfold_12_Locale[] = {
+ { {0x0069, 0x0307}, {1, {0x0130 }}}
+};
+
+static const CaseUnfold_13_Type CaseUnfold_13[] = {
+ { {0x0066, 0x0066, 0x0069}, {1, {0xfb03 }}},
+ { {0x0066, 0x0066, 0x006c}, {1, {0xfb04 }}},
+ { {0x03b1, 0x0342, 0x03b9}, {1, {0x1fb7 }}},
+ { {0x03b7, 0x0342, 0x03b9}, {1, {0x1fc7 }}},
+ { {0x03b9, 0x0308, 0x0300}, {1, {0x1fd2 }}},
+ { {0x03b9, 0x0308, 0x0301}, {2, {0x0390, 0x1fd3 }}},
+ { {0x03b9, 0x0308, 0x0342}, {1, {0x1fd7 }}},
+ { {0x03c5, 0x0308, 0x0300}, {1, {0x1fe2 }}},
+ { {0x03c5, 0x0308, 0x0301}, {2, {0x03b0, 0x1fe3 }}},
+ { {0x03c5, 0x0308, 0x0342}, {1, {0x1fe7 }}},
+ { {0x03c5, 0x0313, 0x0300}, {1, {0x1f52 }}},
+ { {0x03c5, 0x0313, 0x0301}, {1, {0x1f54 }}},
+ { {0x03c5, 0x0313, 0x0342}, {1, {0x1f56 }}},
+ { {0x03c9, 0x0342, 0x03b9}, {1, {0x1ff7 }}}
+};
+
+
+static PosixBracketEntryType HashEntryData[] = {
+  { (UChar* )"NEWLINE",                0,  7 },
+  { (UChar* )"Alpha",                  1,  5 },
+  { (UChar* )"Blank",                  2,  5 },
+  { (UChar* )"Cntrl",                  3,  5 },
+  { (UChar* )"Digit",                  4,  5 },
+  { (UChar* )"Graph",                  5,  5 },
+  { (UChar* )"Lower",                  6,  5 },
+  { (UChar* )"Print",                  7,  5 },
+  { (UChar* )"Punct",                  8,  5 },
+  { (UChar* )"Space",                  9,  5 },
+  { (UChar* )"Upper",                 10,  5 },
+  { (UChar* )"XDigit",                11,  6 },
+  { (UChar* )"Word",                  12,  4 },
+  { (UChar* )"Alnum",                 13,  5 },
+  { (UChar* )"ASCII",                 14,  5 },
+
+#ifdef USE_UNICODE_PROPERTIES
+  { (UChar* )"Any",                   15,  3 },
+  { (UChar* )"Assigned",              16,  8 },
+  { (UChar* )"C",                     17,  1 },
+  { (UChar* )"Cc",                    18,  2 },
+  { (UChar* )"Cf",                    19,  2 },
+  { (UChar* )"Cn",                    20,  2 },
+  { (UChar* )"Co",                    21,  2 },
+  { (UChar* )"Cs",                    22,  2 },
+  { (UChar* )"L",                     23,  1 },
+  { (UChar* )"Ll",                    24,  2 },
+  { (UChar* )"Lm",                    25,  2 },
+  { (UChar* )"Lo",                    26,  2 },
+  { (UChar* )"Lt",                    27,  2 },
+  { (UChar* )"Lu",                    28,  2 },
+  { (UChar* )"M",                     29,  1 },
+  { (UChar* )"Mc",                    30,  2 },
+  { (UChar* )"Me",                    31,  2 },
+  { (UChar* )"Mn",                    32,  2 },
+  { (UChar* )"N",                     33,  1 },
+  { (UChar* )"Nd",                    34,  2 },
+  { (UChar* )"Nl",                    35,  2 },
+  { (UChar* )"No",                    36,  2 },
+  { (UChar* )"P",                     37,  1 },
+  { (UChar* )"Pc",                    38,  2 },
+  { (UChar* )"Pd",                    39,  2 },
+  { (UChar* )"Pe",                    40,  2 },
+  { (UChar* )"Pf",                    41,  2 },
+  { (UChar* )"Pi",                    42,  2 },
+  { (UChar* )"Po",                    43,  2 },
+  { (UChar* )"Ps",                    44,  2 },
+  { (UChar* )"S",                     45,  1 },
+  { (UChar* )"Sc",                    46,  2 },
+  { (UChar* )"Sk",                    47,  2 },
+  { (UChar* )"Sm",                    48,  2 },
+  { (UChar* )"So",                    49,  2 },
+  { (UChar* )"Z",                     50,  1 },
+  { (UChar* )"Zl",                    51,  2 },
+  { (UChar* )"Zp",                    52,  2 },
+  { (UChar* )"Zs",                    53,  2 },
+  { (UChar* )"Arabic",                54,  6 },
+  { (UChar* )"Armenian",              55,  8 },
+  { (UChar* )"Bengali",               56,  7 },
+  { (UChar* )"Bopomofo",              57,  8 },
+  { (UChar* )"Braille",               58,  7 },
+  { (UChar* )"Buginese",              59,  8 },
+  { (UChar* )"Buhid",                 60,  5 },
+  { (UChar* )"Canadian_Aboriginal",   61, 19 },
+  { (UChar* )"Cherokee",              62,  8 },
+  { (UChar* )"Common",                63,  6 },
+  { (UChar* )"Coptic",                64,  6 },
+  { (UChar* )"Cypriot",               65,  7 },
+  { (UChar* )"Cyrillic",              66,  8 },
+  { (UChar* )"Deseret",               67,  7 },
+  { (UChar* )"Devanagari",            68, 10 },
+  { (UChar* )"Ethiopic",              69,  8 },
+  { (UChar* )"Georgian",              70,  8 },
+  { (UChar* )"Glagolitic",            71, 10 },
+  { (UChar* )"Gothic",                72,  6 },
+  { (UChar* )"Greek",                 73,  5 },
+  { (UChar* )"Gujarati",              74,  8 },
+  { (UChar* )"Gurmukhi",              75,  8 },
+  { (UChar* )"Han",                   76,  3 },
+  { (UChar* )"Hangul",                77,  6 },
+  { (UChar* )"Hanunoo",               78,  7 },
+  { (UChar* )"Hebrew",                79,  6 },
+  { (UChar* )"Hiragana",              80,  8 },
+  { (UChar* )"Inherited",             81,  9 },
+  { (UChar* )"Kannada",               82,  7 },
+  { (UChar* )"Katakana",              83,  8 },
+  { (UChar* )"Kharoshthi",            84, 10 },
+  { (UChar* )"Khmer",                 85,  5 },
+  { (UChar* )"Lao",                   86,  3 },
+  { (UChar* )"Latin",                 87,  5 },
+  { (UChar* )"Limbu",                 88,  5 },
+  { (UChar* )"Linear_B",              89,  8 },
+  { (UChar* )"Malayalam",             90,  9 },
+  { (UChar* )"Mongolian",             91,  9 },
+  { (UChar* )"Myanmar",               92,  7 },
+  { (UChar* )"New_Tai_Lue",           93, 11 },
+  { (UChar* )"Ogham",                 94,  5 },
+  { (UChar* )"Old_Italic",            95, 10 },
+  { (UChar* )"Old_Persian",           96, 11 },
+  { (UChar* )"Oriya",                 97,  5 },
+  { (UChar* )"Osmanya",               98,  7 },
+  { (UChar* )"Runic",                 99,  5 },
+  { (UChar* )"Shavian",              100,  7 },
+  { (UChar* )"Sinhala",              101,  7 },
+  { (UChar* )"Syloti_Nagri",         102, 12 },
+  { (UChar* )"Syriac",               103,  6 },
+  { (UChar* )"Tagalog",              104,  7 },
+  { (UChar* )"Tagbanwa",             105,  8 },
+  { (UChar* )"Tai_Le",               106,  6 },
+  { (UChar* )"Tamil",                107,  5 },
+  { (UChar* )"Telugu",               108,  6 },
+  { (UChar* )"Thaana",               109,  6 },
+  { (UChar* )"Thai",                 110,  4 },
+  { (UChar* )"Tibetan",              111,  7 },
+  { (UChar* )"Tifinagh",             112,  8 },
+  { (UChar* )"Ugaritic",             113,  8 },
+  { (UChar* )"Yi",                   114,  2 },
+#endif /* USE_UNICODE_PROPERTIES */
+  { (UChar* )NULL,                    -1,  0 }
+};
+
+#ifdef USE_UNICODE_PROPERTIES
+#define CODE_RANGES_NUM     115
+#else
+#define CODE_RANGES_NUM      15
+#endif
+
+static const OnigCodePoint* CodeRanges[CODE_RANGES_NUM];
+static int CodeRangeTableInited = 0;
+
+static void init_code_range_array(void) {
+  THREAD_ATOMIC_START;
+
+  CodeRanges[0] = CR_NEWLINE;
+  CodeRanges[1] = CR_Alpha;
+  CodeRanges[2] = CR_Blank;
+  CodeRanges[3] = CR_Cntrl;
+  CodeRanges[4] = CR_Digit;
+  CodeRanges[5] = CR_Graph;
+  CodeRanges[6] = CR_Lower;
+  CodeRanges[7] = CR_Print;
+  CodeRanges[8] = CR_Punct;
+  CodeRanges[9] = CR_Space;
+  CodeRanges[10] = CR_Upper;
+  CodeRanges[11] = CR_XDigit;
+  CodeRanges[12] = CR_Word;
+  CodeRanges[13] = CR_Alnum;
+  CodeRanges[14] = CR_ASCII;
+
+#ifdef USE_UNICODE_PROPERTIES
+  CodeRanges[15] = CR_Any;
+  CodeRanges[16] = CR_Assigned;
+  CodeRanges[17] = CR_C;
+  CodeRanges[18] = CR_Cc;
+  CodeRanges[19] = CR_Cf;
+  CodeRanges[20] = CR_Cn;
+  CodeRanges[21] = CR_Co;
+  CodeRanges[22] = CR_Cs;
+  CodeRanges[23] = CR_L;
+  CodeRanges[24] = CR_Ll;
+  CodeRanges[25] = CR_Lm;
+  CodeRanges[26] = CR_Lo;
+  CodeRanges[27] = CR_Lt;
+  CodeRanges[28] = CR_Lu;
+  CodeRanges[29] = CR_M;
+  CodeRanges[30] = CR_Mc;
+  CodeRanges[31] = CR_Me;
+  CodeRanges[32] = CR_Mn;
+  CodeRanges[33] = CR_N;
+  CodeRanges[34] = CR_Nd;
+  CodeRanges[35] = CR_Nl;
+  CodeRanges[36] = CR_No;
+  CodeRanges[37] = CR_P;
+  CodeRanges[38] = CR_Pc;
+  CodeRanges[39] = CR_Pd;
+  CodeRanges[40] = CR_Pe;
+  CodeRanges[41] = CR_Pf;
+  CodeRanges[42] = CR_Pi;
+  CodeRanges[43] = CR_Po;
+  CodeRanges[44] = CR_Ps;
+  CodeRanges[45] = CR_S;
+  CodeRanges[46] = CR_Sc;
+  CodeRanges[47] = CR_Sk;
+  CodeRanges[48] = CR_Sm;
+  CodeRanges[49] = CR_So;
+  CodeRanges[50] = CR_Z;
+  CodeRanges[51] = CR_Zl;
+  CodeRanges[52] = CR_Zp;
+  CodeRanges[53] = CR_Zs;
+  CodeRanges[54] = CR_Arabic;
+  CodeRanges[55] = CR_Armenian;
+  CodeRanges[56] = CR_Bengali;
+  CodeRanges[57] = CR_Bopomofo;
+  CodeRanges[58] = CR_Braille;
+  CodeRanges[59] = CR_Buginese;
+  CodeRanges[60] = CR_Buhid;
+  CodeRanges[61] = CR_Canadian_Aboriginal;
+  CodeRanges[62] = CR_Cherokee;
+  CodeRanges[63] = CR_Common;
+  CodeRanges[64] = CR_Coptic;
+  CodeRanges[65] = CR_Cypriot;
+  CodeRanges[66] = CR_Cyrillic;
+  CodeRanges[67] = CR_Deseret;
+  CodeRanges[68] = CR_Devanagari;
+  CodeRanges[69] = CR_Ethiopic;
+  CodeRanges[70] = CR_Georgian;
+  CodeRanges[71] = CR_Glagolitic;
+  CodeRanges[72] = CR_Gothic;
+  CodeRanges[73] = CR_Greek;
+  CodeRanges[74] = CR_Gujarati;
+  CodeRanges[75] = CR_Gurmukhi;
+  CodeRanges[76] = CR_Han;
+  CodeRanges[77] = CR_Hangul;
+  CodeRanges[78] = CR_Hanunoo;
+  CodeRanges[79] = CR_Hebrew;
+  CodeRanges[80] = CR_Hiragana;
+  CodeRanges[81] = CR_Inherited;
+  CodeRanges[82] = CR_Kannada;
+  CodeRanges[83] = CR_Katakana;
+  CodeRanges[84] = CR_Kharoshthi;
+  CodeRanges[85] = CR_Khmer;
+  CodeRanges[86] = CR_Lao;
+  CodeRanges[87] = CR_Latin;
+  CodeRanges[88] = CR_Limbu;
+  CodeRanges[89] = CR_Linear_B;
+  CodeRanges[90] = CR_Malayalam;
+  CodeRanges[91] = CR_Mongolian;
+  CodeRanges[92] = CR_Myanmar;
+  CodeRanges[93] = CR_New_Tai_Lue;
+  CodeRanges[94] = CR_Ogham;
+  CodeRanges[95] = CR_Old_Italic;
+  CodeRanges[96] = CR_Old_Persian;
+  CodeRanges[97] = CR_Oriya;
+  CodeRanges[98] = CR_Osmanya;
+  CodeRanges[99] = CR_Runic;
+  CodeRanges[100] = CR_Shavian;
+  CodeRanges[101] = CR_Sinhala;
+  CodeRanges[102] = CR_Syloti_Nagri;
+  CodeRanges[103] = CR_Syriac;
+  CodeRanges[104] = CR_Tagalog;
+  CodeRanges[105] = CR_Tagbanwa;
+  CodeRanges[106] = CR_Tai_Le;
+  CodeRanges[107] = CR_Tamil;
+  CodeRanges[108] = CR_Telugu;
+  CodeRanges[109] = CR_Thaana;
+  CodeRanges[110] = CR_Thai;
+  CodeRanges[111] = CR_Tibetan;
+  CodeRanges[112] = CR_Tifinagh;
+  CodeRanges[113] = CR_Ugaritic;
+  CodeRanges[114] = CR_Yi;
+#endif /* USE_UNICODE_PROPERTIES */
+
+  CodeRangeTableInited = 1;
+  THREAD_ATOMIC_END;
+}
+
+extern int
+onigenc_unicode_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (
+#ifdef USE_UNICODE_PROPERTIES
+      ctype <= ONIGENC_MAX_STD_CTYPE &&
+#endif
+      code < 256) {
+    return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
+  }
+
+  if (ctype >= CODE_RANGES_NUM) {
+    return ONIGERR_TYPE_BUG;
+  }
+
+  if (CodeRangeTableInited == 0) init_code_range_array();
+
+  return onig_is_in_code_range((UChar* )CodeRanges[ctype], code);
+}
+
+
+extern int
+onigenc_unicode_ctype_code_range(int ctype, const OnigCodePoint* ranges[])
+{
+  if (ctype >= CODE_RANGES_NUM) {
+    return ONIGERR_TYPE_BUG;
+  }
+
+  if (CodeRangeTableInited == 0) init_code_range_array();
+
+  *ranges = CodeRanges[ctype];
+
+  return 0;
+}
+
+extern int
+onigenc_utf16_32_get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
+                                      const OnigCodePoint* ranges[],
+				      struct OnigEncodingTypeST* enc ARG_UNUSED)
+{
+  *sb_out = 0x00;
+  return onigenc_unicode_ctype_code_range(ctype, ranges);
+}
+
+#include "ruby/st.h"
+
+#define PROPERTY_NAME_MAX_SIZE    20
+
+static st_table* NameCtypeTable;
+static int NameTableInited = 0;
+
+static int init_name_ctype_table(void)
+{
+  PosixBracketEntryType *pb;
+
+  THREAD_ATOMIC_START;
+
+  NameCtypeTable = onig_st_init_strend_table_with_size(100);
+  if (ONIG_IS_NULL(NameCtypeTable)) return ONIGERR_MEMORY;
+
+  for (pb = HashEntryData; ONIG_IS_NOT_NULL(pb->name); pb++) {
+    onig_st_insert_strend(NameCtypeTable, pb->name, pb->name + pb->len,
+			  (st_data_t )pb->ctype);
+  }
+
+  NameTableInited = 1;
+  THREAD_ATOMIC_END;
+  return 0;
+}
+
+extern int
+onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end)
+{
+  int len;
+  st_data_t ctype;
+  UChar buf[PROPERTY_NAME_MAX_SIZE];
+  UChar *p;
+  OnigCodePoint code;
+
+  p = name;
+  len = 0;
+  while (p < end) {
+    code = ONIGENC_MBC_TO_CODE(enc, p, end);
+    if (code >= 0x80)
+      return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+
+    buf[len++] = (UChar )code;
+    if (len >= PROPERTY_NAME_MAX_SIZE)
+      return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+
+    p += enclen(enc, p, end);
+  }
+
+  buf[len] = 0;
+
+  if (NameTableInited == 0)  init_name_ctype_table();
+
+  if (onig_st_lookup_strend(NameCtypeTable, buf, buf + len,
+			    &ctype) == 0) {
+    return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
+  }
+
+  return ctype;
+}
+
+
+static int
+code2_cmp(OnigCodePoint* x, OnigCodePoint* y)
+{
+  if (x[0] == y[0] && x[1] == y[1]) return 0;
+  return 1;
+}
+
+static int
+code2_hash(OnigCodePoint* x)
+{
+  return (int )(x[0] + x[1]);
+}
+
+static const struct st_hash_type type_code2_hash = {
+  code2_cmp,
+  code2_hash,
+};
+
+static int
+code3_cmp(OnigCodePoint* x, OnigCodePoint* y)
+{
+  if (x[0] == y[0] && x[1] == y[1] && x[2] == y[2]) return 0;
+  return 1;
+}
+
+static int
+code3_hash(OnigCodePoint* x)
+{
+  return (int )(x[0] + x[1] + x[2]);
+}
+
+static const struct st_hash_type type_code3_hash = {
+  code3_cmp,
+  code3_hash,
+};
+
+
+static st_table* FoldTable;    /* fold-1, fold-2, fold-3 */
+static st_table* Unfold1Table;
+static st_table* Unfold2Table;
+static st_table* Unfold3Table;
+static int CaseFoldInited = 0;
+
+static int init_case_fold_table(void)
+{
+  const CaseFold_11_Type   *p;
+  const CaseUnfold_11_Type *p1;
+  const CaseUnfold_12_Type *p2;
+  const CaseUnfold_13_Type *p3;
+  int i;
+
+  THREAD_ATOMIC_START;
+
+  FoldTable = st_init_numtable_with_size(1200);
+  if (ONIG_IS_NULL(FoldTable)) return ONIGERR_MEMORY;
+  for (i = 0; i < (int )(sizeof(CaseFold)/sizeof(CaseFold_11_Type)); i++) {
+    p = &CaseFold[i];
+    st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to));
+  }
+  for (i = 0; i < (int )(sizeof(CaseFold_Locale)/sizeof(CaseFold_11_Type));
+       i++) {
+    p = &CaseFold_Locale[i];
+    st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to));
+  }
+
+  Unfold1Table = st_init_numtable_with_size(1000);
+  if (ONIG_IS_NULL(Unfold1Table)) return ONIGERR_MEMORY;
+
+  for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type));
+       i++) {
+    p1 = &CaseUnfold_11[i];
+    st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to));
+  }
+  for (i = 0;
+       i < (int )(sizeof(CaseUnfold_11_Locale)/sizeof(CaseUnfold_11_Type));
+       i++) {
+    p1 = &CaseUnfold_11_Locale[i];
+    st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to));
+  }
+
+  Unfold2Table = st_init_table_with_size(&type_code2_hash, 200);
+  if (ONIG_IS_NULL(Unfold2Table)) return ONIGERR_MEMORY;
+
+  for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type));
+       i++) {
+    p2 = &CaseUnfold_12[i];
+    st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(&p2->to));
+  }
+  for (i = 0;
+       i < (int )(sizeof(CaseUnfold_12_Locale)/sizeof(CaseUnfold_12_Type));
+       i++) {
+    p2 = &CaseUnfold_12_Locale[i];
+    st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(&p2->to));
+  }
+
+  Unfold3Table = st_init_table_with_size(&type_code3_hash, 30);
+  if (ONIG_IS_NULL(Unfold3Table)) return ONIGERR_MEMORY;
+
+  for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type));
+       i++) {
+    p3 = &CaseUnfold_13[i];
+    st_add_direct(Unfold3Table, (st_data_t )p3->from, (st_data_t )(&p3->to));
+  }
+
+  CaseFoldInited = 1;
+  THREAD_ATOMIC_END;
+  return 0;
+}
+
+extern int
+onigenc_unicode_mbc_case_fold(OnigEncoding enc,
+    OnigCaseFoldType flag ARG_UNUSED, const UChar** pp, const UChar* end,
+    UChar* fold)
+{
+  CodePointList3 *to;
+  OnigCodePoint code;
+  int i, len, rlen;
+  const UChar *p = *pp;
+
+  if (CaseFoldInited == 0) init_case_fold_table();
+
+  code = ONIGENC_MBC_TO_CODE(enc, p, end);
+  len = enclen(enc, p, end);
+  *pp += len;
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+  if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+    if (code == 0x0049) {
+      return ONIGENC_CODE_TO_MBC(enc, 0x0131, fold);
+    }
+    else if (code == 0x0130) {
+      return ONIGENC_CODE_TO_MBC(enc, 0x0069, fold);
+    }
+  }
+#endif
+
+  if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) {
+    if (to->n == 1) {
+      return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold);      
+    }
+#if 0
+    /* NO NEEDS TO CHECK */
+    else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+#else
+    else {
+#endif
+      rlen = 0;
+      for (i = 0; i < to->n; i++) {
+	len = ONIGENC_CODE_TO_MBC(enc, to->code[i], fold);
+	fold += len;
+	rlen += len;
+      }
+      return rlen;
+    }
+  }
+
+  for (i = 0; i < len; i++) {
+    *fold++ = *p++;
+  }
+  return len;
+}
+
+extern int
+onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag,
+				    OnigApplyAllCaseFoldFunc f, void* arg,
+				    OnigEncoding enc ARG_UNUSED)
+{
+  const CaseUnfold_11_Type* p11;
+  OnigCodePoint code;
+  int i, j, k, r;
+
+  /* if (CaseFoldInited == 0) init_case_fold_table(); */
+
+  for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type));
+       i++) {
+    p11 = &CaseUnfold_11[i];
+    for (j = 0; j < p11->to.n; j++) {
+      code = p11->from;
+      r = (*f)(p11->to.code[j], &code, 1, arg);
+      if (r != 0) return r;
+
+      code = p11->to.code[j];
+      r = (*f)(p11->from, &code, 1, arg);
+      if (r != 0) return r;
+
+      for (k = 0; k < j; k++) {
+	r = (*f)(p11->to.code[j], (OnigCodePoint* )(&p11->to.code[k]), 1, arg);
+	if (r != 0) return r;
+
+	r = (*f)(p11->to.code[k], (OnigCodePoint* )(&p11->to.code[j]), 1, arg);
+	if (r != 0) return r;
+      }
+    }
+  }
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+  if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+    code = 0x0131;
+    r = (*f)(0x0049, &code, 1, arg);
+    if (r != 0) return r;
+    code = 0x0049;
+    r = (*f)(0x0131, &code, 1, arg);
+    if (r != 0) return r;
+
+    code = 0x0130;
+    r = (*f)(0x0069, &code, 1, arg);
+    if (r != 0) return r;
+    code = 0x0069;
+    r = (*f)(0x0130, &code, 1, arg);
+    if (r != 0) return r;
+  }
+  else {
+#endif
+    for (i = 0;
+	 i < (int )(sizeof(CaseUnfold_11_Locale)/sizeof(CaseUnfold_11_Type));
+	 i++) {
+      p11 = &CaseUnfold_11_Locale[i];
+      for (j = 0; j < p11->to.n; j++) {
+	code = p11->from;
+	r = (*f)(p11->to.code[j], &code, 1, arg);
+	if (r != 0) return r;
+
+	code = p11->to.code[j];
+	r = (*f)(p11->from, &code, 1, arg);
+	if (r != 0) return r;
+
+	for (k = 0; k < j; k++) {
+	  r = (*f)(p11->to.code[j], (OnigCodePoint* )(&p11->to.code[k]),
+		   1, arg);
+	  if (r != 0) return r;
+
+	  r = (*f)(p11->to.code[k], (OnigCodePoint* )(&p11->to.code[j]),
+		   1, arg);
+	  if (r != 0) return r;
+	}
+      }
+    }
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+  }
+#endif
+
+  if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type));
+	 i++) {
+      for (j = 0; j < CaseUnfold_12[i].to.n; j++) {
+	r = (*f)(CaseUnfold_12[i].to.code[j],
+		 (OnigCodePoint* )CaseUnfold_12[i].from, 2, arg);
+	if (r != 0) return r;	
+
+	for (k = 0; k < CaseUnfold_12[i].to.n; k++) {
+	  if (k == j) continue;
+
+	  r = (*f)(CaseUnfold_12[i].to.code[j],
+		   (OnigCodePoint* )(&CaseUnfold_12[i].to.code[k]), 1, arg);
+	  if (r != 0) return r;
+	}
+      }
+    }
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) == 0) {
+#endif
+      for (i = 0;
+	   i < (int )(sizeof(CaseUnfold_12_Locale)/sizeof(CaseUnfold_12_Type));
+	   i++) {
+	for (j = 0; j < CaseUnfold_12_Locale[i].to.n; j++) {
+	  r = (*f)(CaseUnfold_12_Locale[i].to.code[j],
+		   (OnigCodePoint* )CaseUnfold_12_Locale[i].from, 2, arg);
+	  if (r != 0) return r;	
+
+	  for (k = 0; k < CaseUnfold_12_Locale[i].to.n; k++) {
+	    if (k == j) continue;
+
+	    r = (*f)(CaseUnfold_12_Locale[i].to.code[j],
+		     (OnigCodePoint* )(&CaseUnfold_12_Locale[i].to.code[k]),
+		     1, arg);
+	    if (r != 0) return r;
+	  }
+	}
+      }
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    }
+#endif
+
+    for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type));
+	 i++) {
+      for (j = 0; j < CaseUnfold_13[i].to.n; j++) {
+	r = (*f)(CaseUnfold_13[i].to.code[j],
+		 (OnigCodePoint* )CaseUnfold_13[i].from, 3, arg);
+	if (r != 0) return r;	
+
+	for (k = 0; k < CaseUnfold_13[i].to.n; k++) {
+	  if (k == j) continue;
+
+	  r = (*f)(CaseUnfold_13[i].to.code[j],
+		   (OnigCodePoint* )(&CaseUnfold_13[i].to.code[k]), 1, arg);
+	  if (r != 0) return r;
+	}
+      }
+    }
+  }
+
+  return 0;
+}
+
+extern int
+onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
+    OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end,
+    OnigCaseFoldCodeItem items[])
+{
+  int n, i, j, k, len;
+  OnigCodePoint code, codes[3];
+  CodePointList3 *to, *z3;
+  CodePointList2 *z2;
+
+  if (CaseFoldInited == 0) init_case_fold_table();
+
+  n = 0;
+
+  code = ONIGENC_MBC_TO_CODE(enc, p, end);
+  len = enclen(enc, p, end);
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+  if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+    if (code == 0x0049) {
+      items[0].byte_len = len;
+      items[0].code_len = 1;
+      items[0].code[0]  = 0x0131;
+      return 1;
+    }
+    else if (code == 0x0130) {
+      items[0].byte_len = len;
+      items[0].code_len = 1;
+      items[0].code[0]  = 0x0069;
+      return 1;
+    }
+    else if (code == 0x0131) {
+      items[0].byte_len = len;
+      items[0].code_len = 1;
+      items[0].code[0]  = 0x0049;
+      return 1;
+    }
+    else if (code == 0x0069) {
+      items[0].byte_len = len;
+      items[0].code_len = 1;
+      items[0].code[0]  = 0x0130;
+      return 1;
+    }
+  }
+#endif
+
+  if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) {
+    if (to->n == 1) {
+      OnigCodePoint orig_code = code;
+
+      items[0].byte_len = len;
+      items[0].code_len = 1;
+      items[0].code[0]  = to->code[0];
+      n++;
+
+      code = to->code[0];
+      if (onig_st_lookup(Unfold1Table, (st_data_t )code, (void* )&to) != 0) {
+	for (i = 0; i < to->n; i++) {
+	  if (to->code[i] != orig_code) {
+	    items[n].byte_len = len;
+	    items[n].code_len = 1;
+	    items[n].code[0]  = to->code[i];
+	    n++;
+	  }
+	}
+      }
+    }
+    else if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+      OnigCodePoint cs[3][4];
+      int fn, ncs[3];
+
+      for (fn = 0; fn < to->n; fn++) {
+	cs[fn][0] = to->code[fn];
+	if (onig_st_lookup(Unfold1Table, (st_data_t )cs[fn][0],
+			   (void* )&z3) != 0) {
+	  for (i = 0; i < z3->n; i++) {
+	    cs[fn][i+1] = z3->code[i];
+	  }
+	  ncs[fn] = z3->n + 1;
+	}
+	else
+	  ncs[fn] = 1;
+      }
+
+      if (fn == 2) {
+	for (i = 0; i < ncs[0]; i++) {
+	  for (j = 0; j < ncs[1]; j++) {
+	    items[n].byte_len = len;
+	    items[n].code_len = 2;
+	    items[n].code[0]  = cs[0][i];
+	    items[n].code[1]  = cs[1][j];
+	    n++;
+	  }
+	}
+
+	if (onig_st_lookup(Unfold2Table, (st_data_t )to->code,
+			   (void* )&z2) != 0) {
+	  for (i = 0; i < z2->n; i++) {
+	    if (z2->code[i] == code) continue;
+
+	    items[n].byte_len = len;
+	    items[n].code_len = 1;
+	    items[n].code[0]  = z2->code[i];
+	    n++;
+	  }
+	}
+      }
+      else {
+	for (i = 0; i < ncs[0]; i++) {
+	  for (j = 0; j < ncs[1]; j++) {
+	    for (k = 0; k < ncs[2]; k++) {
+	      items[n].byte_len = len;
+	      items[n].code_len = 3;
+	      items[n].code[0]  = cs[0][i];
+	      items[n].code[1]  = cs[1][j];
+	      items[n].code[2]  = cs[2][k];
+	      n++;
+	    }
+	  }
+	}
+
+	if (onig_st_lookup(Unfold3Table, (st_data_t )to->code,
+			   (void* )&z2) != 0) {
+	  for (i = 0; i < z2->n; i++) {
+	    if (z2->code[i] == code) continue;
+
+	    items[n].byte_len = len;
+	    items[n].code_len = 1;
+	    items[n].code[0]  = z2->code[i];
+	    n++;
+	  }
+	}
+      }
+
+      /* multi char folded code is not head of another folded multi char */
+      flag = 0; /* DISABLE_CASE_FOLD_MULTI_CHAR(flag); */
+    }
+  }
+  else {
+    if (onig_st_lookup(Unfold1Table, (st_data_t )code, (void* )&to) != 0) {
+      for (i = 0; i < to->n; i++) {
+	items[n].byte_len = len;
+	items[n].code_len = 1;
+	items[n].code[0]  = to->code[i];
+	n++;
+      }
+    }
+  }
+
+
+  if ((flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+    p += len;
+    if (p < end) {
+      int clen;
+
+      codes[0] = code;
+      code = ONIGENC_MBC_TO_CODE(enc, p, end);
+      if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0
+	  && to->n == 1) {
+	codes[1] = to->code[0];
+      }
+      else
+	codes[1] = code;
+
+      clen = enclen(enc, p, end);
+      len += clen;
+      if (onig_st_lookup(Unfold2Table, (st_data_t )codes, (void* )&z2) != 0) {
+	for (i = 0; i < z2->n; i++) {
+	  items[n].byte_len = len;
+	  items[n].code_len = 1;
+	  items[n].code[0]  = z2->code[i];
+	  n++;
+	}
+      }
+
+      p += clen;
+      if (p < end) {
+	code = ONIGENC_MBC_TO_CODE(enc, p, end);
+	if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0
+	    && to->n == 1) {
+	  codes[2] = to->code[0];
+	}
+	else
+	  codes[2] = code;
+
+	clen = enclen(enc, p, end);
+	len += clen;
+	if (onig_st_lookup(Unfold3Table, (st_data_t )codes,
+			   (void* )&z2) != 0) {
+	  for (i = 0; i < z2->n; i++) {
+	    items[n].byte_len = len;
+	    items[n].code_len = 1;
+	    items[n].code[0]  = z2->code[i];
+	    n++;
+	  }
+	}
+      }
+    }
+  }
+
+  return n;
+}
diff --git a/lib/ruby-1.9.1-rc1/enc/us_ascii.c b/lib/ruby-1.9.1-rc1/enc/us_ascii.c
new file mode 100644
index 0000000..2e96dd3
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/us_ascii.c
@@ -0,0 +1,31 @@
+#include "regenc.h"
+
+static int
+us_ascii_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
+{
+    if (*p & 0x80)
+        return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+    return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
+}
+
+OnigEncodingDefine(us_ascii, US_ASCII) = {
+  us_ascii_mbc_enc_len,
+  "US-ASCII",/* name */
+  1,           /* max byte length */
+  1,           /* min byte length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  onigenc_ascii_mbc_case_fold,
+  onigenc_ascii_apply_all_case_fold,
+  onigenc_ascii_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  onigenc_ascii_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("ASCII", "US-ASCII")
+ENC_ALIAS("ANSI_X3.4-1968", "US-ASCII")
+ENC_ALIAS("646", "US-ASCII")
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_16be.c b/lib/ruby-1.9.1-rc1/enc/utf_16be.c
new file mode 100644
index 0000000..8d7c8e9
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_16be.c
@@ -0,0 +1,258 @@
+/**********************************************************************
+  utf_16be.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define UTF16_IS_SURROGATE_FIRST(c)    (((c) & 0xfc) == 0xd8)
+#define UTF16_IS_SURROGATE_SECOND(c)   (((c) & 0xfc) == 0xdc)
+#define UTF16_IS_SURROGATE(c)          (((c) & 0xf8) == 0xd8)
+
+static const int EncLen_UTF16[] = {
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static int
+utf16be_mbc_enc_len(const UChar* p, const OnigUChar* e ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  int byte = p[0];
+  if (!UTF16_IS_SURROGATE(byte)) {
+    if (2 <= e-p)
+      return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2);
+    else
+      return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(1);
+  }
+  if (UTF16_IS_SURROGATE_FIRST(byte)) {
+    switch (e-p) {
+      case 1: return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(3);
+      case 2: return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(2);
+      case 3:
+        if (UTF16_IS_SURROGATE_SECOND(p[2]))
+          return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(1);
+        break;
+      default:
+        if (UTF16_IS_SURROGATE_SECOND(p[2]))
+          return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4);
+        break;
+    }
+  }
+  return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static int
+utf16be_is_mbc_newline(const UChar* p, const UChar* end,
+		       OnigEncoding enc)
+{
+  if (p + 1 < end) {
+    if (*(p+1) == 0x0a && *p == 0x00)
+      return 1;
+#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+    if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+	 *(p+1) == 0x0d ||
+#endif
+	 *(p+1) == 0x85) && *p == 0x00)
+      return 1;
+    if (*p == 0x20 && (*(p+1) == 0x29 || *(p+1) == 0x28))
+      return 1;
+#endif
+  }
+  return 0;
+}
+
+static OnigCodePoint
+utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
+		    OnigEncoding enc)
+{
+  OnigCodePoint code;
+
+  if (UTF16_IS_SURROGATE_FIRST(*p)) {
+    code = ((((p[0] - 0xd8) << 2) + ((p[1] & 0xc0) >> 6) + 1) << 16)
+         + ((((p[1] & 0x3f) << 2) + (p[2] - 0xdc)) << 8)
+         + p[3];
+  }
+  else {
+    code = p[0] * 256 + p[1];
+  }
+  return code;
+}
+
+static int
+utf16be_code_to_mbclen(OnigCodePoint code,
+		       OnigEncoding enc)
+{
+  return (code > 0xffff ? 4 : 2);
+}
+
+static int
+utf16be_code_to_mbc(OnigCodePoint code, UChar *buf,
+		    OnigEncoding enc)
+{
+  UChar* p = buf;
+
+  if (code > 0xffff) {
+    unsigned int high = (code >> 10) + 0xD7C0;
+    unsigned int low = (code & 0x3FF) + 0xDC00;
+    *p++ = (high >> 8) & 0xFF;
+    *p++ = high & 0xFF;
+    *p++ = (low >> 8) & 0xFF;
+    *p++ = low & 0xFF;
+    return 4;
+  }
+  else {
+    *p++ = (UChar )((code & 0xff00) >> 8);
+    *p++ = (UChar )(code & 0xff);
+    return 2;
+  }
+}
+
+static int
+utf16be_mbc_case_fold(OnigCaseFoldType flag,
+		      const UChar** pp, const UChar* end, UChar* fold,
+		      OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_ASCII_CODE(*(p+1)) && *p == 0) {
+    p++;
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+      if (*p == 0x49) {
+	*fold++ = 0x01;
+	*fold   = 0x31;
+	(*pp) += 2;
+	return 2;
+      }
+    }
+#endif
+
+    *fold++ = 0;
+    *fold   = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    *pp += 2;
+    return 2;
+  }
+  else
+    return onigenc_unicode_mbc_case_fold(enc, flag,
+					 pp, end, fold);
+}
+
+#if 0
+static int
+utf16be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  const UChar* p = *pp;
+
+  (*pp) += EncLen_UTF16[*p];
+
+  if (*p == 0) {
+    int c, v;
+
+    p++;
+    if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+      return TRUE;
+    }
+
+    c = *p;
+    v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+		(BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+
+    if ((v | BIT_CTYPE_LOWER) != 0) {
+      /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+      if (c >= 0xaa && c <= 0xba)
+	return FALSE;
+      else
+	return TRUE;
+    }
+    return (v != 0 ? TRUE : FALSE);
+  }
+
+  return FALSE;
+}
+#endif
+
+static UChar*
+utf16be_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
+			      OnigEncoding enc ARG_UNUSED)
+{
+  if (s <= start) return (UChar* )s;
+
+  if ((s - start) % 2 == 1) {
+    s--;
+  }
+
+  if (UTF16_IS_SURROGATE_SECOND(*s) && s > start + 1)
+    s -= 2;
+
+  return (UChar* )s;
+}
+
+static int
+utf16be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				   const OnigUChar* p, const OnigUChar* end,
+				   OnigCaseFoldCodeItem items[],
+				   OnigEncoding enc)
+{
+  return onigenc_unicode_get_case_fold_codes_by_str(enc,
+						    flag, p, end, items);
+}
+
+OnigEncodingDefine(utf_16be, UTF_16BE) = {
+  utf16be_mbc_enc_len,
+  "UTF-16BE",   /* name */
+  4,            /* max byte length */
+  2,            /* min byte length */
+  utf16be_is_mbc_newline,
+  utf16be_mbc_to_code,
+  utf16be_code_to_mbclen,
+  utf16be_code_to_mbc,
+  utf16be_mbc_case_fold,
+  onigenc_unicode_apply_all_case_fold,
+  utf16be_get_case_fold_codes_by_str,
+  onigenc_unicode_property_name_to_ctype,
+  onigenc_unicode_is_code_ctype,
+  onigenc_utf16_32_get_ctype_code_range,
+  utf16be_left_adjust_char_head,
+  onigenc_always_false_is_allowed_reverse_match
+};
+ENC_ALIAS("UCS-2BE", "UTF-16BE")
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_16le.c b/lib/ruby-1.9.1-rc1/enc/utf_16le.c
new file mode 100644
index 0000000..c8a1e7a
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_16le.c
@@ -0,0 +1,249 @@
+/**********************************************************************
+  utf_16le.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define UTF16_IS_SURROGATE_FIRST(c)    (((c) & 0xfc) == 0xd8)
+#define UTF16_IS_SURROGATE_SECOND(c)   (((c) & 0xfc) == 0xdc)
+#define UTF16_IS_SURROGATE(c)          (((c) & 0xf8) == 0xd8)
+
+static const int EncLen_UTF16[] = {
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static int
+utf16le_mbc_enc_len(const UChar* p, const OnigUChar* e,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  int len = e-p, byte;
+  if (len < 2)
+    return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(1);
+  byte = p[1];
+  if (!UTF16_IS_SURROGATE(byte)) {
+    return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2);
+  }
+  if (UTF16_IS_SURROGATE_FIRST(byte)) {
+    if (len < 4)
+      return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(4-len);
+    if (UTF16_IS_SURROGATE_SECOND(p[3]))
+      return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4);
+  }
+  return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static int
+utf16le_is_mbc_newline(const UChar* p, const UChar* end,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  if (p + 1 < end) {
+    if (*p == 0x0a && *(p+1) == 0x00)
+      return 1;
+#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+    if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+	 *p == 0x0d ||
+#endif
+	 *p == 0x85) && *(p+1) == 0x00)
+      return 1;
+    if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28))
+      return 1;
+#endif
+  }
+  return 0;
+}
+
+static OnigCodePoint
+utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  OnigCodePoint code;
+  UChar c0 = *p;
+  UChar c1 = *(p+1);
+
+  if (UTF16_IS_SURROGATE_FIRST(c1)) {
+    code = ((((c1 - 0xd8) << 2) + ((c0  & 0xc0) >> 6) + 1) << 16)
+         + ((((c0 & 0x3f) << 2) + (p[3] - 0xdc)) << 8)
+         + p[2];
+  }
+  else {
+    code = c1 * 256 + p[0];
+  }
+  return code;
+}
+
+static int
+utf16le_code_to_mbclen(OnigCodePoint code,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  return (code > 0xffff ? 4 : 2);
+}
+
+static int
+utf16le_code_to_mbc(OnigCodePoint code, UChar *buf,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  UChar* p = buf;
+
+  if (code > 0xffff) {
+    unsigned int high = (code >> 10) + 0xD7C0;
+    unsigned int low = (code & 0x3FF) + 0xDC00;
+    *p++ = high & 0xFF;
+    *p++ = (high >> 8) & 0xFF;
+    *p++ = low & 0xFF;
+    *p++ = (low >> 8) & 0xFF;
+    return 4;
+  }
+  else {
+    *p++ = (UChar )(code & 0xff);
+    *p++ = (UChar )((code & 0xff00) >> 8);
+    return 2;
+  }
+}
+
+static int
+utf16le_mbc_case_fold(OnigCaseFoldType flag,
+		      const UChar** pp, const UChar* end, UChar* fold,
+		      OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0) {
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+      if (*p == 0x49) {
+	*fold++ = 0x31;
+	*fold   = 0x01;
+	(*pp) += 2;
+	return 2;
+      }
+    }
+#endif
+
+    *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    *fold   = 0;
+    *pp += 2;
+    return 2;
+  }
+  else
+    return onigenc_unicode_mbc_case_fold(enc, flag, pp,
+					 end, fold);
+}
+
+#if 0
+static int
+utf16le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
+			 const UChar* end)
+{
+  const UChar* p = *pp;
+
+  (*pp) += EncLen_UTF16[*(p+1)];
+
+  if (*(p+1) == 0) {
+    int c, v;
+
+    if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+      return TRUE;
+    }
+
+    c = *p;
+    v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+                       (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+    if ((v | BIT_CTYPE_LOWER) != 0) {
+      /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+      if (c >= 0xaa && c <= 0xba)
+	return FALSE;
+      else
+	return TRUE;
+    }
+    return (v != 0 ? TRUE : FALSE);
+  }
+
+  return FALSE;
+}
+#endif
+
+static UChar*
+utf16le_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
+			      OnigEncoding enc ARG_UNUSED)
+{
+  if (s <= start) return (UChar* )s;
+
+  if ((s - start) % 2 == 1) {
+    s--;
+  }
+
+  if (UTF16_IS_SURROGATE_SECOND(*(s+1)) && s > start + 1)
+    s -= 2;
+
+  return (UChar* )s;
+}
+
+static int
+utf16le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				   const OnigUChar* p, const OnigUChar* end,
+				   OnigCaseFoldCodeItem items[],
+				   OnigEncoding enc)
+{
+  return onigenc_unicode_get_case_fold_codes_by_str(enc,
+						    flag, p, end, items);
+}
+
+OnigEncodingDefine(utf_16le, UTF_16LE) = {
+  utf16le_mbc_enc_len,
+  "UTF-16LE",   /* name */
+  4,            /* max byte length */
+  2,            /* min byte length */
+  utf16le_is_mbc_newline,
+  utf16le_mbc_to_code,
+  utf16le_code_to_mbclen,
+  utf16le_code_to_mbc,
+  utf16le_mbc_case_fold,
+  onigenc_unicode_apply_all_case_fold,
+  utf16le_get_case_fold_codes_by_str,
+  onigenc_unicode_property_name_to_ctype,
+  onigenc_unicode_is_code_ctype,
+  onigenc_utf16_32_get_ctype_code_range,
+  utf16le_left_adjust_char_head,
+  onigenc_always_false_is_allowed_reverse_match
+};
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_32be.c b/lib/ruby-1.9.1-rc1/enc/utf_32be.c
new file mode 100644
index 0000000..61e7d0f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_32be.c
@@ -0,0 +1,195 @@
+/**********************************************************************
+  utf_32be.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static int
+utf32be_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return 4;
+}
+
+static int
+utf32be_is_mbc_newline(const UChar* p, const UChar* end,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  if (p + 3 < end) {
+    if (*(p+3) == 0x0a && *(p+2) == 0 && *(p+1) == 0 && *p == 0)
+      return 1;
+#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+    if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+	 *(p+3) == 0x0d ||
+#endif
+	 *(p+3) == 0x85)
+	&& *(p+2) == 0 && *(p+1) == 0 && *p == 0x00)
+      return 1;
+    if (*(p+2) == 0x20 && (*(p+3) == 0x29 || *(p+3) == 0x28)
+	&& *(p+1) == 0 && *p == 0)
+      return 1;
+#endif
+  }
+  return 0;
+}
+
+static OnigCodePoint
+utf32be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return (OnigCodePoint )(((p[0] * 256 + p[1]) * 256 + p[2]) * 256 + p[3]);
+}
+
+static int
+utf32be_code_to_mbclen(OnigCodePoint code ARG_UNUSED,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  return 4;
+}
+
+static int
+utf32be_code_to_mbc(OnigCodePoint code, UChar *buf,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  UChar* p = buf;
+
+  *p++ = (UChar )((code & 0xff000000) >>24);
+  *p++ = (UChar )((code & 0xff0000)   >>16);
+  *p++ = (UChar )((code & 0xff00)     >> 8);
+  *p++ = (UChar ) (code & 0xff);
+  return 4;
+}
+
+static int
+utf32be_mbc_case_fold(OnigCaseFoldType flag,
+		      const UChar** pp, const UChar* end, UChar* fold,
+		      OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_ASCII_CODE(*(p+3)) && *(p+2) == 0 && *(p+1) == 0 && *p == 0) {
+    *fold++ = 0;
+    *fold++ = 0;
+
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+      if (*(p+3) == 0x49) {
+	*fold++ = 0x01;
+	*fold   = 0x31;
+	(*pp) += 4;
+	return 4;
+      }
+    }
+#endif
+
+    *fold++ = 0;
+    *fold   = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*(p+3));
+    *pp += 4;
+    return 4;
+  }
+  else
+    return onigenc_unicode_mbc_case_fold(enc, flag, pp,
+					 end, fold);
+}
+
+#if 0
+static int
+utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  const UChar* p = *pp;
+
+  (*pp) += 4;
+
+  if (*(p+2) == 0 && *(p+1) == 0 && *p == 0) {
+    int c, v;
+
+    p += 3;
+    if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+      return TRUE;
+    }
+
+    c = *p;
+    v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+                       (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+    if ((v | BIT_CTYPE_LOWER) != 0) {
+      /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+      if (c >= 0xaa && c <= 0xba)
+	return FALSE;
+      else
+	return TRUE;
+    }
+    return (v != 0 ? TRUE : FALSE);
+  }
+
+  return FALSE;
+}
+#endif
+
+static UChar*
+utf32be_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
+			      OnigEncoding enc ARG_UNUSED)
+{
+  int rem;
+
+  if (s <= start) return (UChar* )s;
+
+  rem = (s - start) % 4;
+  return (UChar* )(s - rem);
+}
+
+static int
+utf32be_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				   const OnigUChar* p, const OnigUChar* end,
+				   OnigCaseFoldCodeItem items[],
+				   OnigEncoding enc)
+{
+  return onigenc_unicode_get_case_fold_codes_by_str(enc,
+						    flag, p, end, items);
+}
+
+OnigEncodingDefine(utf_32be, UTF_32BE) = {
+  utf32be_mbc_enc_len,
+  "UTF-32BE",   /* name */
+  4,            /* max byte length */
+  4,            /* min byte length */
+  utf32be_is_mbc_newline,
+  utf32be_mbc_to_code,
+  utf32be_code_to_mbclen,
+  utf32be_code_to_mbc,
+  utf32be_mbc_case_fold,
+  onigenc_unicode_apply_all_case_fold,
+  utf32be_get_case_fold_codes_by_str,
+  onigenc_unicode_property_name_to_ctype,
+  onigenc_unicode_is_code_ctype,
+  onigenc_utf16_32_get_ctype_code_range,
+  utf32be_left_adjust_char_head,
+  onigenc_always_false_is_allowed_reverse_match
+};
+ENC_ALIAS("UCS-4BE", "UTF-32BE")
+
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_32le.c b/lib/ruby-1.9.1-rc1/enc/utf_32le.c
new file mode 100644
index 0000000..3a0a41b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_32le.c
@@ -0,0 +1,194 @@
+/**********************************************************************
+  utf_32le.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+static int
+utf32le_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return 4;
+}
+
+static int
+utf32le_is_mbc_newline(const UChar* p, const UChar* end,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  if (p + 3 < end) {
+    if (*p == 0x0a && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0)
+      return 1;
+#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+    if ((
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+	 *p == 0x0d ||
+#endif
+	 *p == 0x85)
+	&& *(p+1) == 0x00 && (p+2) == 0x00 && *(p+3) == 0x00)
+      return 1;
+    if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28)
+	&& *(p+2) == 0x00 && *(p+3) == 0x00)
+      return 1;
+#endif
+  }
+  return 0;
+}
+
+static OnigCodePoint
+utf32le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  return (OnigCodePoint )(((p[3] * 256 + p[2]) * 256 + p[1]) * 256 + p[0]);
+}
+
+static int
+utf32le_code_to_mbclen(OnigCodePoint code ARG_UNUSED,
+		       OnigEncoding enc ARG_UNUSED)
+{
+  return 4;
+}
+
+static int
+utf32le_code_to_mbc(OnigCodePoint code, UChar *buf,
+		    OnigEncoding enc ARG_UNUSED)
+{
+  UChar* p = buf;
+
+  *p++ = (UChar ) (code & 0xff);
+  *p++ = (UChar )((code & 0xff00)     >> 8);
+  *p++ = (UChar )((code & 0xff0000)   >>16);
+  *p++ = (UChar )((code & 0xff000000) >>24);
+  return 4;
+}
+
+static int
+utf32le_mbc_case_fold(OnigCaseFoldType flag,
+		      const UChar** pp, const UChar* end, UChar* fold,
+		      OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_ASCII_CODE(*p) && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+      if (*p == 0x49) {
+	*fold++ = 0x31;
+	*fold++ = 0x01;
+      }
+    }
+    else {
+#endif
+      *fold++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+      *fold++ = 0;
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    }
+#endif
+
+    *fold++ = 0;
+    *fold   = 0;
+    *pp += 4;
+    return 4;
+  }
+  else
+    return onigenc_unicode_mbc_case_fold(enc, flag, pp,
+					 end, fold);
+}
+
+#if 0
+static int
+utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
+{
+  const UChar* p = *pp;
+
+  (*pp) += 4;
+
+  if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
+    int c, v;
+
+    if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
+      return TRUE;
+    }
+
+    c = *p;
+    v = ONIGENC_IS_UNICODE_ISO_8859_1_BIT_CTYPE(c,
+                       (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER));
+    if ((v | BIT_CTYPE_LOWER) != 0) {
+      /* 0xaa, 0xb5, 0xba are lower case letter, but can't convert. */
+      if (c >= 0xaa && c <= 0xba)
+	return FALSE;
+      else
+	return TRUE;
+    }
+    return (v != 0 ? TRUE : FALSE);
+  }
+
+  return FALSE;
+}
+#endif
+
+static UChar*
+utf32le_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end,
+			      OnigEncoding enc ARG_UNUSED)
+{
+  int rem;
+
+  if (s <= start) return (UChar* )s;
+
+  rem = (s - start) % 4;
+  return (UChar* )(s - rem);
+}
+
+static int
+utf32le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+				   const OnigUChar* p, const OnigUChar* end,
+				   OnigCaseFoldCodeItem items[],
+				   OnigEncoding enc)
+{
+  return onigenc_unicode_get_case_fold_codes_by_str(enc,
+						    flag, p, end, items);
+}
+
+OnigEncodingDefine(utf_32le, UTF_32LE) = {
+  utf32le_mbc_enc_len,
+  "UTF-32LE",   /* name */
+  4,            /* max byte length */
+  4,            /* min byte length */
+  utf32le_is_mbc_newline,
+  utf32le_mbc_to_code,
+  utf32le_code_to_mbclen,
+  utf32le_code_to_mbc,
+  utf32le_mbc_case_fold,
+  onigenc_unicode_apply_all_case_fold,
+  utf32le_get_case_fold_codes_by_str,
+  onigenc_unicode_property_name_to_ctype,
+  onigenc_unicode_is_code_ctype,
+  onigenc_utf16_32_get_ctype_code_range,
+  utf32le_left_adjust_char_head,
+  onigenc_always_false_is_allowed_reverse_match
+};
+ENC_ALIAS("UCS-4LE", "UTF-32LE")
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_7.h b/lib/ruby-1.9.1-rc1/enc/utf_7.h
new file mode 100644
index 0000000..fa9f06b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_7.h
@@ -0,0 +1,5 @@
+#include "regenc.h"
+/* dummy for unsupported, statefull encoding */
+ENC_DUMMY("UTF-7");
+ENC_ALIAS("CP65000", "UTF-7");
+
diff --git a/lib/ruby-1.9.1-rc1/enc/utf_8.c b/lib/ruby-1.9.1-rc1/enc/utf_8.c
new file mode 100644
index 0000000..3b9387c
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/utf_8.c
@@ -0,0 +1,455 @@
+/**********************************************************************
+  utf_8.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2007  K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define USE_INVALID_CODE_SCHEME
+
+#ifdef USE_INVALID_CODE_SCHEME
+/* virtual codepoint values for invalid encoding byte 0xfe and 0xff */
+#define INVALID_CODE_FE   0xfffffffe
+#define INVALID_CODE_FF   0xffffffff
+#define VALID_CODE_LIMIT  0x7fffffff
+#endif
+
+#define utf8_islead(c)     ((UChar )((c) & 0xc0) != 0x80)
+
+static const int EncLen_UTF8[] = {
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+  4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+typedef enum {
+  FAILURE = -2,
+  ACCEPT,
+  S0, S1, S2, S3,
+  S4, S5, S6, S7
+} state_t;
+#define A ACCEPT
+#define F FAILURE
+static const signed char trans[][0x100] = {
+  { /* S0   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 1 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 2 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 3 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 4 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 5 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 6 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 7 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* d */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* e */ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3,
+    /* f */ 5, 6, 6, 6, 7, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S1   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* 9 */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* a */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* b */ A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S2   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S3   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* b */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S4   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* 9 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S5   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 9 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* a */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* b */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S6   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* 9 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* a */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* b */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+  { /* S7   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
+    /* 0 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 1 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 2 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 3 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 4 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 5 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 6 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 7 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* 8 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+    /* 9 */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* a */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* b */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* c */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* d */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* e */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F,
+    /* f */ F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F 
+  },
+};
+#undef A
+#undef F
+
+static int
+mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+  int firstbyte = *p++;
+  state_t s;
+  s = trans[0][firstbyte];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-1);
+  s = trans[s][*p++];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(2) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-2);
+  s = trans[s][*p++];
+  if (s < 0) return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(3) :
+                                  ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+
+  if (p == e) return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(EncLen_UTF8[firstbyte]-3);
+  s = trans[s][*p++];
+  return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(4) :
+                       ONIGENC_CONSTRUCT_MBCLEN_INVALID();
+}
+
+static int
+is_mbc_newline(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  if (p < end) {
+    if (*p == 0x0a) return 1;
+
+#ifdef USE_UNICODE_ALL_LINE_TERMINATORS
+#ifndef USE_CRNL_AS_LINE_TERMINATOR
+    if (*p == 0x0d) return 1;
+#endif
+    if (p + 1 < end) {
+      if (*(p+1) == 0x85 && *p == 0xc2) /* U+0085 */
+	return 1;
+      if (p + 2 < end) {
+	if ((*(p+2) == 0xa8 || *(p+2) == 0xa9)
+	    && *(p+1) == 0x80 && *p == 0xe2)  /* U+2028, U+2029 */
+	  return 1;
+      }
+    }
+#endif
+  }
+
+  return 0;
+}
+
+static OnigCodePoint
+mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
+{
+  int c, len;
+  OnigCodePoint n;
+
+  len = enclen(enc, p, end);
+  c = *p++;
+  if (len > 1) {
+    len--;
+    n = c & ((1 << (6 - len)) - 1);
+    while (len--) {
+      c = *p++;
+      n = (n << 6) | (c & ((1 << 6) - 1));
+    }
+    return n;
+  }
+  else {
+#ifdef USE_INVALID_CODE_SCHEME
+    if (c > 0xfd) {
+      return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
+    }
+#endif
+    return (OnigCodePoint )c;
+  }
+}
+
+static int
+code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
+{
+  if      ((code & 0xffffff80) == 0) return 1;
+  else if ((code & 0xfffff800) == 0) return 2;
+  else if ((code & 0xffff0000) == 0) return 3;
+  else if ((code & 0xffe00000) == 0) return 4;
+  else if ((code & 0xfc000000) == 0) return 5;
+  else if ((code & 0x80000000) == 0) return 6;
+#ifdef USE_INVALID_CODE_SCHEME
+  else if (code == INVALID_CODE_FE) return 1;
+  else if (code == INVALID_CODE_FF) return 1;
+#endif
+  else
+    return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
+}
+
+static int
+code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc ARG_UNUSED)
+{
+#define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)
+#define UTF8_TRAIL0(code)        (UChar )(((code) & 0x3f) | 0x80)
+
+  if ((code & 0xffffff80) == 0) {
+    *buf = (UChar )code;
+    return 1;
+  }
+  else {
+    UChar *p = buf;
+
+    if ((code & 0xfffff800) == 0) {
+      *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0);
+    }
+    else if ((code & 0xffff0000) == 0) {
+      *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0);
+      *p++ = UTF8_TRAILS(code, 6);
+    }
+    else if ((code & 0xffe00000) == 0) {
+      *p++ = (UChar )(((code>>18) & 0x07) | 0xf0);
+      *p++ = UTF8_TRAILS(code, 12);
+      *p++ = UTF8_TRAILS(code,  6);
+    }
+    else if ((code & 0xfc000000) == 0) {
+      *p++ = (UChar )(((code>>24) & 0x03) | 0xf8);
+      *p++ = UTF8_TRAILS(code, 18);
+      *p++ = UTF8_TRAILS(code, 12);
+      *p++ = UTF8_TRAILS(code,  6);
+    }
+    else if ((code & 0x80000000) == 0) {
+      *p++ = (UChar )(((code>>30) & 0x01) | 0xfc);
+      *p++ = UTF8_TRAILS(code, 24);
+      *p++ = UTF8_TRAILS(code, 18);
+      *p++ = UTF8_TRAILS(code, 12);
+      *p++ = UTF8_TRAILS(code,  6);
+    }
+#ifdef USE_INVALID_CODE_SCHEME
+    else if (code == INVALID_CODE_FE) {
+      *p = 0xfe;
+      return 1;
+    }
+    else if (code == INVALID_CODE_FF) {
+      *p = 0xff;
+      return 1;
+    }
+#endif
+    else {
+      return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
+    }
+
+    *p++ = UTF8_TRAIL0(code);
+    return p - buf;
+  }
+}
+
+static int
+mbc_case_fold(OnigCaseFoldType flag, const UChar** pp,
+		   const UChar* end, UChar* fold, OnigEncoding enc)
+{
+  const UChar* p = *pp;
+
+  if (ONIGENC_IS_MBC_ASCII(p)) {
+#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
+    if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
+      if (*p == 0x49) {
+	*fold++ = 0xc4;
+	*fold   = 0xb1;
+	(*pp)++;
+	return 2;
+      }
+    }
+#endif
+
+    *fold = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
+    (*pp)++;
+    return 1; /* return byte length of converted char to lower */
+  }
+  else {
+    return onigenc_unicode_mbc_case_fold(enc, flag, pp, end, fold);
+  }
+}
+
+
+static int
+get_ctype_code_range(OnigCtype ctype, OnigCodePoint *sb_out,
+			  const OnigCodePoint* ranges[], OnigEncoding enc ARG_UNUSED)
+{
+  *sb_out = 0x80;
+  return onigenc_unicode_ctype_code_range(ctype, ranges);
+}
+
+
+static UChar*
+left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar *p;
+
+  if (s <= start) return (UChar* )s;
+  p = s;
+
+  while (!utf8_islead(*p) && p > start) p--;
+  return (UChar* )p;
+}
+
+static int
+get_case_fold_codes_by_str(OnigCaseFoldType flag,
+    const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[],
+    OnigEncoding enc)
+{
+  return onigenc_unicode_get_case_fold_codes_by_str(enc, flag, p, end, items);
+}
+
+OnigEncodingDefine(utf_8, UTF_8) = {
+  mbc_enc_len,
+  "UTF-8",     /* name */
+  6,           /* max byte length */
+  1,           /* min byte length */
+  is_mbc_newline,
+  mbc_to_code,
+  code_to_mbclen,
+  code_to_mbc,
+  mbc_case_fold,
+  onigenc_unicode_apply_all_case_fold,
+  get_case_fold_codes_by_str,
+  onigenc_unicode_property_name_to_ctype,
+  onigenc_unicode_is_code_ctype,
+  get_ctype_code_range,
+  left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+ENC_ALIAS("CP65001", "UTF-8")
+
+/*
+ * Name: UTF8-MAC
+ * Link: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/BPFileSystem.html
+ * Link: http://developer.apple.com/qa/qa2001/qa1235.html
+ * Link: http://developer.apple.com/jp/qa/qa2001/qa1235.html
+ */
+ENC_REPLICATE("UTF8-MAC", "UTF-8")
+ENC_ALIAS("UTF-8-MAC", "UTF8-MAC")
+
diff --git a/lib/ruby-1.9.1-rc1/enc/windows_1251.c b/lib/ruby-1.9.1-rc1/enc/windows_1251.c
new file mode 100644
index 0000000..1cb4da4
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enc/windows_1251.c
@@ -0,0 +1,208 @@
+/**********************************************************************
+  cp1251.c -  Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2006-2007  Byte      
+ *                          K.Kosako  
+ * 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.
+ *
+ * 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 "regenc.h"
+
+#define ENC_CP1251_TO_LOWER_CASE(c) EncCP1251_ToLowerCaseTable[c]
+#define ENC_IS_CP1251_CTYPE(code,ctype) \
+  ((EncCP1251_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
+
+static const UChar EncCP1251_ToLowerCaseTable[256] = {
+  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+  '\220', '\203', '\202', '\203', '\204', '\205', '\206', '\207',
+  '\210', '\211', '\232', '\213', '\234', '\235', '\236', '\237',
+  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+  '\240', '\242', '\242', '\274', '\244', '\264', '\246', '\247',
+  '\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277',
+  '\260', '\261', '\263', '\263', '\264', '\265', '\266', '\267',
+  '\270', '\271', '\272', '\273', '\274', '\276', '\276', '\277',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
+};
+
+static const unsigned short EncCP1251_CtypeTable[256] = {
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x428c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
+  0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
+  0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
+  0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
+  0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
+  0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
+  0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
+  0x34a2, 0x34a2, 0x01a0, 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
+  0x0000, 0x01a0, 0x34a2, 0x01a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
+  0x0008, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x0280, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0,
+  0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x34a2,
+  0x01a0, 0x01a0, 0x34a2, 0x30e2, 0x30e2, 0x31e2, 0x01a0, 0x01a0,
+  0x30e2, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
+  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
+};
+
+static int
+cp1251_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+             const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower, OnigEncoding enc ARG_UNUSED)
+{
+  const UChar* p = *pp;
+
+  *lower = ENC_CP1251_TO_LOWER_CASE(*p);
+  (*pp)++;
+  return 1;
+}
+
+static int
+cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
+{
+  if (code < 256)
+    return ENC_IS_CP1251_CTYPE(code, ctype);
+  else
+    return FALSE;
+}
+
+static const OnigPairCaseFoldCodes CaseFoldMap[] = {
+  { 0xb8, 0xa8 },
+
+  { 0xe0, 0xc0 },
+  { 0xe1, 0xc1 },
+  { 0xe2, 0xc2 },
+  { 0xe3, 0xc3 },
+  { 0xe4, 0xc4 },
+  { 0xe5, 0xc5 },
+  { 0xe6, 0xc6 },
+  { 0xe7, 0xc7 },
+  { 0xe8, 0xc8 },
+  { 0xe9, 0xc9 },
+  { 0xea, 0xca },
+  { 0xeb, 0xcb },
+  { 0xec, 0xcc },
+  { 0xed, 0xcd },
+  { 0xee, 0xce },
+  { 0xef, 0xcf },
+
+  { 0xf0, 0xd0 },
+  { 0xf1, 0xd1 },
+  { 0xf2, 0xd2 },
+  { 0xf3, 0xd3 },
+  { 0xf4, 0xd4 },
+  { 0xf5, 0xd5 },
+  { 0xf6, 0xd6 },
+  { 0xf7, 0xd7 },
+  { 0xf8, 0xd8 },
+  { 0xf9, 0xd9 },
+  { 0xfa, 0xda },
+  { 0xfb, 0xdb },
+  { 0xfc, 0xdc },
+  { 0xfd, 0xdd },
+  { 0xfe, 0xde },
+  { 0xff, 0xdf }
+};
+
+static int
+cp1251_apply_all_case_fold(OnigCaseFoldType flag,
+			       OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_apply_all_case_fold_with_map(
+             sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+             flag, f, arg);
+}
+
+static int
+cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
+    const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
+{
+  return onigenc_get_case_fold_codes_by_str_with_map(
+	     sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
+	     flag, p, end, items);
+}
+
+OnigEncodingDefine(windows_1251, Windows_1251) = {
+  onigenc_single_byte_mbc_enc_len,
+  "Windows-1251",      /* name */
+  1,             /* max enc length */
+  1,             /* min enc length */
+  onigenc_is_mbc_newline_0x0a,
+  onigenc_single_byte_mbc_to_code,
+  onigenc_single_byte_code_to_mbclen,
+  onigenc_single_byte_code_to_mbc,
+  cp1251_mbc_case_fold,
+  cp1251_apply_all_case_fold,
+  cp1251_get_case_fold_codes_by_str,
+  onigenc_minimum_property_name_to_ctype,
+  cp1251_is_code_ctype,
+  onigenc_not_support_get_ctype_code_range,
+  onigenc_single_byte_left_adjust_char_head,
+  onigenc_always_true_is_allowed_reverse_match
+};
+/*
+ * Name: windows-1251
+ * MIBenum: 2251
+ * Link: http://www.iana.org/assignments/character-sets
+ * Link: http://www.microsoft.com/globaldev/reference/sbcs/1251.mspx
+ * Link: http://en.wikipedia.org/wiki/Windows-1251
+ */
+ENC_ALIAS("CP1251", "Windows-1251")
diff --git a/lib/ruby-1.9.1-rc1/encdb.h b/lib/ruby-1.9.1-rc1/encdb.h
new file mode 100644
index 0000000..771f30d
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/encdb.h
@@ -0,0 +1,147 @@
+ENC_DEFINE("ASCII-8BIT");
+ENC_DEFINE("Big5");
+ENC_DEFINE("CP949");
+ENC_DEFINE("Emacs-Mule");
+ENC_DEFINE("EUC-JP");
+ENC_DEFINE("EUC-KR");
+ENC_DEFINE("EUC-TW");
+ENC_DEFINE("GB18030");
+ENC_DEFINE("GBK");
+ENC_DEFINE("ISO-8859-1");
+ENC_DEFINE("ISO-8859-2");
+ENC_DEFINE("ISO-8859-3");
+ENC_DEFINE("ISO-8859-4");
+ENC_DEFINE("ISO-8859-5");
+ENC_DEFINE("ISO-8859-6");
+ENC_DEFINE("ISO-8859-7");
+ENC_DEFINE("ISO-8859-8");
+ENC_DEFINE("ISO-8859-9");
+ENC_DEFINE("ISO-8859-10");
+ENC_DEFINE("ISO-8859-11");
+ENC_DEFINE("ISO-8859-13");
+ENC_DEFINE("ISO-8859-14");
+ENC_DEFINE("ISO-8859-15");
+ENC_DEFINE("ISO-8859-16");
+ENC_DEFINE("KOI8-R");
+ENC_DEFINE("KOI8-U");
+ENC_DEFINE("Shift_JIS");
+ENC_DEFINE("US-ASCII");
+ENC_DEFINE("UTF-8");
+ENC_DEFINE("UTF-16BE");
+ENC_DEFINE("UTF-16LE");
+ENC_DEFINE("UTF-32BE");
+ENC_DEFINE("UTF-32LE");
+ENC_DEFINE("Windows-1251");
+ENC_ALIAS("BINARY", "ASCII-8BIT");
+ENC_REPLICATE("IBM437", "ASCII-8BIT");
+ENC_ALIAS("CP437", "IBM437");
+ENC_REPLICATE("IBM737", "ASCII-8BIT");
+ENC_ALIAS("CP737", "IBM737");
+ENC_REPLICATE("IBM775", "ASCII-8BIT");
+ENC_ALIAS("CP775", "IBM775");
+ENC_REPLICATE("CP850", "ASCII-8BIT");
+ENC_ALIAS("IBM850", "CP850");
+ENC_REPLICATE("IBM852", "ASCII-8BIT");
+ENC_REPLICATE("CP852", "IBM852");
+ENC_REPLICATE("IBM855", "ASCII-8BIT");
+ENC_REPLICATE("CP855", "IBM855");
+ENC_REPLICATE("IBM857", "ASCII-8BIT");
+ENC_ALIAS("CP857", "IBM857");
+ENC_REPLICATE("IBM860", "ASCII-8BIT");
+ENC_ALIAS("CP860", "IBM860");
+ENC_REPLICATE("IBM861", "ASCII-8BIT");
+ENC_ALIAS("CP861", "IBM861");
+ENC_REPLICATE("IBM862", "ASCII-8BIT");
+ENC_ALIAS("CP862", "IBM862");
+ENC_REPLICATE("IBM863", "ASCII-8BIT");
+ENC_ALIAS("CP863", "IBM863");
+ENC_REPLICATE("IBM864", "ASCII-8BIT");
+ENC_ALIAS("CP864", "IBM864");
+ENC_REPLICATE("IBM865", "ASCII-8BIT");
+ENC_ALIAS("CP865", "IBM865");
+ENC_REPLICATE("IBM866", "ASCII-8BIT");
+ENC_ALIAS("CP866", "IBM866");
+ENC_REPLICATE("IBM869", "ASCII-8BIT");
+ENC_ALIAS("CP869", "IBM869");
+ENC_REPLICATE("Windows-1258", "ASCII-8BIT");
+ENC_ALIAS("CP1258", "Windows-1258");
+ENC_REPLICATE("GB1988", "ASCII-8BIT");
+ENC_REPLICATE("macCentEuro", "ASCII-8BIT");
+ENC_REPLICATE("macCroatian", "ASCII-8BIT");
+ENC_REPLICATE("macCyrillic", "ASCII-8BIT");
+ENC_REPLICATE("macGreek", "ASCII-8BIT");
+ENC_REPLICATE("macIceland", "ASCII-8BIT");
+ENC_REPLICATE("macRoman", "ASCII-8BIT");
+ENC_REPLICATE("macRomania", "ASCII-8BIT");
+ENC_REPLICATE("macThai", "ASCII-8BIT");
+ENC_REPLICATE("macTurkish", "ASCII-8BIT");
+ENC_REPLICATE("macUkraine", "ASCII-8BIT");
+ENC_ALIAS("CP950", "BIG5");
+ENC_REPLICATE("stateless-ISO-2022-JP", "Emacs-Mule");
+ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese Environment Version 1.1 */;
+ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */;
+ENC_ALIAS("euc-jp-ms", "eucJP-ms");
+ENC_REPLICATE("CP51932", "EUC-JP");
+ENC_ALIAS("eucKR", "EUC-KR");
+ENC_ALIAS("eucTW", "EUC-TW");
+ENC_ALIAS("EUC-CN", "GB2312");
+ENC_ALIAS("eucCN", "GB2312");
+ENC_REPLICATE("GB12345", "GB2312");
+ENC_ALIAS("CP936", "GBK");
+ENC_DUMMY("ISO-2022-JP");
+ENC_ALIAS("ISO2022-JP", "ISO-2022-JP");
+ENC_REPLICATE("ISO-2022-JP-2", "ISO-2022-JP");
+ENC_ALIAS("ISO2022-JP2", "ISO-2022-JP-2");
+ENC_ALIAS("ISO8859-1", "ISO-8859-1");
+ENC_REPLICATE("Windows-1252", "ISO-8859-1");
+ENC_ALIAS("CP1252", "Windows-1252");
+ENC_ALIAS("ISO8859-2", "ISO-8859-2");
+ENC_REPLICATE("Windows-1250", "ISO-8859-2");
+ENC_ALIAS("CP1250", "Windows-1250");
+ENC_ALIAS("ISO8859-3", "ISO-8859-3");
+ENC_ALIAS("ISO8859-4", "ISO-8859-4");
+ENC_ALIAS("ISO8859-5", "ISO-8859-5");
+ENC_ALIAS("ISO8859-6", "ISO-8859-6");
+ENC_REPLICATE("Windows-1256", "ISO-8859-6");
+ENC_ALIAS("CP1256", "Windows-1256");
+ENC_ALIAS("ISO8859-7", "ISO-8859-7");
+ENC_REPLICATE("Windows-1253", "ISO-8859-7");
+ENC_ALIAS("CP1253", "Windows-1253");
+ENC_ALIAS("ISO8859-8", "ISO-8859-8");
+ENC_REPLICATE("Windows-1255", "ISO-8859-8");
+ENC_ALIAS("CP1255", "Windows-1255");
+ENC_ALIAS("ISO8859-9", "ISO-8859-9");
+ENC_REPLICATE("Windows-1254", "ISO-8859-9");
+ENC_ALIAS("CP1254", "Windows-1254");
+ENC_ALIAS("ISO8859-10", "ISO-8859-10");
+ENC_ALIAS("ISO8859-11", "ISO-8859-11");
+ENC_REPLICATE("TIS-620", "ISO-8859-11");
+ENC_REPLICATE("Windows-874", "ISO-8859-11");
+ENC_ALIAS("CP874", "Windows-874");
+ENC_ALIAS("ISO8859-13", "ISO-8859-13");
+ENC_REPLICATE("Windows-1257", "ISO-8859-13");
+ENC_ALIAS("CP1257", "Windows-1257");
+ENC_ALIAS("ISO8859-14", "ISO-8859-14");
+ENC_ALIAS("ISO8859-15", "ISO-8859-15");
+ENC_ALIAS("ISO8859-16", "ISO-8859-16");
+ENC_ALIAS("CP878", "KOI8-R");
+ENC_ALIAS("SJIS", "Shift_JIS");
+ENC_REPLICATE("Windows-31J", "Shift_JIS");
+ENC_ALIAS("CP932", "Windows-31J");
+ENC_ALIAS("csWindows31J", "Windows-31J") /* IANA.  IE6 don't accept Windows-31J but csWindows31J. */;
+ENC_REPLICATE("MacJapanese", "Shift_JIS");
+ENC_ALIAS("MacJapan", "MacJapanese");
+ENC_ALIAS("ASCII", "US-ASCII");
+ENC_ALIAS("ANSI_X3.4-1968", "US-ASCII");
+ENC_ALIAS("646", "US-ASCII");
+ENC_DUMMY("UTF-7");
+ENC_ALIAS("CP65000", "UTF-7");
+ENC_ALIAS("CP65001", "UTF-8");
+ENC_REPLICATE("UTF8-MAC", "UTF-8");
+ENC_ALIAS("UTF-8-MAC", "UTF8-MAC");
+ENC_ALIAS("UCS-2BE", "UTF-16BE");
+ENC_ALIAS("UCS-4BE", "UTF-32BE");
+ENC_ALIAS("UCS-4LE", "UTF-32LE");
+ENC_ALIAS("CP1251", "Windows-1251");
+
+#define ENCODING_COUNT 83
diff --git a/lib/ruby-1.9.1-rc1/encoding.c b/lib/ruby-1.9.1-rc1/encoding.c
new file mode 100644
index 0000000..e23e277
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/encoding.c
@@ -0,0 +1,1414 @@
+/**********************************************************************
+
+  encoding.c -
+
+  $Author: yugui $
+  created at: Thu May 24 17:23:27 JST 2007
+
+  Copyright (C) 2007 Yukihiro Matsumoto
+
+**********************************************************************/
+
+#include "ruby/ruby.h"
+#include "ruby/encoding.h"
+#include "regenc.h"
+#include 
+#ifdef HAVE_LANGINFO_H
+#include 
+#endif
+#include "ruby/util.h"
+
+static ID id_encoding;
+VALUE rb_cEncoding;
+static VALUE rb_encoding_list;
+
+struct rb_encoding_entry {
+    const char *name;
+    rb_encoding *enc;
+    rb_encoding *base;
+};
+
+static struct {
+    struct rb_encoding_entry *list;
+    int count;
+    int size;
+    st_table *names;
+} enc_table;
+
+void rb_enc_init(void);
+
+#define ENCODING_COUNT ENCINDEX_BUILTIN_MAX
+#define UNSPECIFIED_ENCODING INT_MAX
+
+#define enc_autoload_p(enc) (!rb_enc_mbmaxlen(enc))
+
+static int load_encoding(const char *name);
+
+static void
+enc_mark(void *ptr)
+{
+}
+
+static VALUE
+enc_new(rb_encoding *encoding)
+{
+    return Data_Wrap_Struct(rb_cEncoding, enc_mark, 0, encoding);
+}
+
+VALUE
+rb_enc_from_encoding(rb_encoding *encoding)
+{
+    VALUE list, enc;
+    int idx;
+
+    if (!encoding) return Qnil;
+    idx = ENC_TO_ENCINDEX(encoding);
+    if (!(list = rb_encoding_list)) {
+	rb_bug("rb_enc_from_encoding(%d\"%s\"): no rb_encoding_list",
+	       idx, rb_enc_name(encoding));
+    }
+    enc = rb_ary_entry(list, idx);
+    if (NIL_P(enc)) {
+	rb_bug("rb_enc_from_encoding(%d\"%s\"): not created yet",
+	       idx, rb_enc_name(encoding));
+    }
+    return enc;
+}
+
+static int enc_autoload(rb_encoding *);
+
+static int
+check_encoding(rb_encoding *enc)
+{
+    int index = rb_enc_to_index(enc);
+    if (rb_enc_from_index(index) != enc)
+	return -1;
+    if (enc_autoload_p(enc)) {
+	index = enc_autoload(enc);
+    }
+    return index;
+}
+
+static int
+enc_check_encoding(VALUE obj)
+{
+    if (SPECIAL_CONST_P(obj) || BUILTIN_TYPE(obj) != T_DATA ||
+	RDATA(obj)->dmark != enc_mark) {
+	return -1;
+    }
+    return check_encoding(RDATA(obj)->data);
+}
+
+static int
+must_encoding(VALUE enc)
+{
+    int index = enc_check_encoding(enc);
+    if (index < 0) {
+	rb_raise(rb_eTypeError, "wrong argument type %s (expected Encoding)",
+		 rb_obj_classname(enc));
+    }
+    return index;
+}
+
+int
+rb_to_encoding_index(VALUE enc)
+{
+    int idx;
+
+    idx = enc_check_encoding(enc);
+    if (idx >= 0) {
+	return idx;
+    }
+    else if (NIL_P(enc = rb_check_string_type(enc))) {
+	return -1;
+    }
+    if (!rb_enc_asciicompat(rb_enc_get(enc))) {
+	return -1;
+    }
+    return rb_enc_find_index(StringValueCStr(enc));
+}
+
+static rb_encoding *
+to_encoding(VALUE enc)
+{
+    int idx;
+
+    StringValue(enc);
+    if (!rb_enc_asciicompat(rb_enc_get(enc))) {
+	rb_raise(rb_eArgError, "invalid name encoding (non ASCII)");
+    }
+    idx = rb_enc_find_index(StringValueCStr(enc));
+    if (idx < 0) {
+	rb_raise(rb_eArgError, "unknown encoding name - %s", RSTRING_PTR(enc));
+    }
+    return rb_enc_from_index(idx);
+}
+
+rb_encoding *
+rb_to_encoding(VALUE enc)
+{
+    if (enc_check_encoding(enc) >= 0) return RDATA(enc)->data;
+    return to_encoding(enc);
+}
+
+void
+rb_gc_mark_encodings(void)
+{
+}
+
+static int
+enc_table_expand(int newsize)
+{
+    struct rb_encoding_entry *ent;
+    int count = newsize;
+
+    if (enc_table.size >= newsize) return newsize;
+    newsize = (newsize + 7) / 8 * 8;
+    ent = realloc(enc_table.list, sizeof(*enc_table.list) * newsize);
+    if (!ent) return -1;
+    memset(ent + enc_table.size, 0, sizeof(*ent)*(newsize - enc_table.size));
+    enc_table.list = ent;
+    enc_table.size = newsize;
+    return count;
+}
+
+static int
+enc_register_at(int index, const char *name, rb_encoding *encoding)
+{
+    struct rb_encoding_entry *ent = &enc_table.list[index];
+    VALUE list;
+
+    if (!ent->name) {
+	ent->name = name = strdup(name);
+    }
+    else if (STRCASECMP(name, ent->name)) {
+	return -1;
+    }
+    if (!ent->enc) {
+	ent->enc = xmalloc(sizeof(rb_encoding));
+    }
+    if (encoding) {
+	*ent->enc = *encoding;
+    }
+    else {
+	memset(ent->enc, 0, sizeof(*ent->enc));
+    }
+    encoding = ent->enc;
+    encoding->name = name;
+    encoding->ruby_encoding_index = index;
+    st_insert(enc_table.names, (st_data_t)name, (st_data_t)index);
+    list = rb_encoding_list;
+    if (list && NIL_P(rb_ary_entry(list, index))) {
+	/* initialize encoding data */
+	rb_ary_store(list, index, enc_new(encoding));
+    }
+    return index;
+}
+
+static int
+enc_register(const char *name, rb_encoding *encoding)
+{
+    int index = enc_table.count;
+
+    if ((index = enc_table_expand(index + 1)) < 0) return -1;
+    enc_table.count = index;
+    return enc_register_at(index - 1, name, encoding);
+}
+
+static void set_encoding_const(const char *, rb_encoding *);
+int rb_enc_registered(const char *name);
+
+int
+rb_enc_register(const char *name, rb_encoding *encoding)
+{
+    int index = rb_enc_registered(name);
+
+    if (index >= 0) {
+	rb_encoding *oldenc = rb_enc_from_index(index);
+	if (STRCASECMP(name, rb_enc_name(oldenc))) {
+	    index = enc_register(name, encoding);
+	}
+	else if (enc_autoload_p(oldenc) || !ENC_DUMMY_P(oldenc)) {
+	    enc_register_at(index, name, encoding);
+	}
+	else {
+	    rb_raise(rb_eArgError, "encoding %s is already registered", name);
+	}
+    }
+    else {
+	index = enc_register(name, encoding);
+	set_encoding_const(name, rb_enc_from_index(index));
+    }
+    return index;
+}
+
+void
+rb_encdb_declare(const char *name)
+{
+    int idx = rb_enc_registered(name);
+    if (idx < 0) {
+	idx = enc_register(name, 0);
+    }
+    set_encoding_const(name, rb_enc_from_index(idx));
+}
+
+static void
+enc_check_duplication(const char *name)
+{
+    if (rb_enc_registered(name) >= 0) {
+	rb_raise(rb_eArgError, "encoding %s is already registered", name);
+    }
+}
+
+static rb_encoding*
+set_base_encoding(int index, rb_encoding *base)
+{
+    rb_encoding *enc = enc_table.list[index].enc;
+
+    enc_table.list[index].base = base;
+    if (rb_enc_dummy_p(base)) ENC_SET_DUMMY(enc);
+    return enc;
+}
+
+int
+rb_enc_replicate(const char *name, rb_encoding *encoding)
+{
+    int idx;
+
+    enc_check_duplication(name);
+    idx = enc_register(name, encoding);
+    set_base_encoding(idx, encoding);
+    set_encoding_const(name, rb_enc_from_index(idx));
+    return idx;
+}
+
+static int
+enc_replicate(int idx, const char *name, rb_encoding *origenc)
+{
+    if (idx < 0) {
+	idx = enc_register(name, origenc);
+    }
+    else {
+	idx = enc_register_at(idx, name, origenc);
+    }
+    if (idx >= 0) {
+	set_base_encoding(idx, origenc);
+	set_encoding_const(name, rb_enc_from_index(idx));
+    }
+    return idx;
+}
+
+int
+rb_encdb_replicate(const char *name, const char *orig)
+{
+    int origidx = rb_enc_registered(orig);
+    int idx = rb_enc_registered(name);
+
+    if (origidx < 0) {
+	origidx = enc_register(orig, 0);
+    }
+    return enc_replicate(idx, name, rb_enc_from_index(origidx));
+}
+
+int
+rb_define_dummy_encoding(const char *name)
+{
+    int index = rb_enc_replicate(name, rb_ascii8bit_encoding());
+    rb_encoding *enc = enc_table.list[index].enc;
+
+    ENC_SET_DUMMY(enc);
+    return index;
+}
+
+int
+rb_encdb_dummy(const char *name)
+{
+    int index = enc_replicate(rb_enc_registered(name), name,
+			      rb_ascii8bit_encoding());
+    rb_encoding *enc = enc_table.list[index].enc;
+
+    ENC_SET_DUMMY(enc);
+    return index;
+}
+
+/*
+ * call-seq:
+ *   enc.dummy? => true or false
+ *
+ * Returns true for dummy encodings.
+ * A dummy encoding is an encoding for which character handling is not properly
+ * implemented.
+ * It is used for stateful encodings.
+ *
+ *   Encoding::ISO_2022_JP.dummy?       #=> true
+ *   Encoding::UTF_8.dummy?             #=> false
+ *
+ */
+static VALUE
+enc_dummy_p(VALUE enc)
+{
+    return ENC_DUMMY_P(enc_table.list[must_encoding(enc)].enc) ? Qtrue : Qfalse;
+}
+
+static const char *
+enc_alias_internal(const char *alias, int idx)
+{
+    alias = strdup(alias);
+    st_insert(enc_table.names, (st_data_t)alias, (st_data_t)idx);
+    return alias;
+}
+
+static int
+enc_alias(const char *alias, int idx)
+{
+    alias = enc_alias_internal(alias, idx);
+    set_encoding_const(alias, rb_enc_from_index(idx));
+    return idx;
+}
+
+int
+rb_enc_alias(const char *alias, const char *orig)
+{
+    int idx;
+
+    enc_check_duplication(alias);
+    if (!enc_table.list) {
+	rb_enc_init();
+    }
+    if ((idx = rb_enc_find_index(orig)) < 0) {
+	return -1;
+    }
+    return enc_alias(alias, idx);
+}
+
+int
+rb_encdb_alias(const char *alias, const char *orig)
+{
+    int idx = rb_enc_registered(orig);
+
+    if (idx < 0) {
+	idx = enc_register(orig, 0);
+    }
+    return enc_alias(alias, idx);
+}
+
+enum {
+    ENCINDEX_ASCII,
+    ENCINDEX_UTF_8,
+    ENCINDEX_US_ASCII,
+    ENCINDEX_BUILTIN_MAX
+};
+
+extern rb_encoding OnigEncodingUTF_8;
+extern rb_encoding OnigEncodingUS_ASCII;
+
+void
+rb_enc_init(void)
+{
+    enc_table_expand(ENCODING_COUNT + 1);
+    if (!enc_table.names) {
+	enc_table.names = st_init_strcasetable();
+    }
+#define ENC_REGISTER(enc) enc_register_at(ENCINDEX_##enc, rb_enc_name(&OnigEncoding##enc), &OnigEncoding##enc)
+    ENC_REGISTER(ASCII);
+    ENC_REGISTER(UTF_8);
+    ENC_REGISTER(US_ASCII);
+#undef ENC_REGISTER
+    enc_table.count = ENCINDEX_BUILTIN_MAX;
+}
+
+rb_encoding *
+rb_enc_from_index(int index)
+{
+    if (!enc_table.list) {
+	rb_enc_init();
+    }
+    if (index < 0 || enc_table.count <= index) {
+	return 0;
+    }
+    return enc_table.list[index].enc;
+}
+
+int
+rb_enc_registered(const char *name)
+{
+    st_data_t idx = 0;
+
+    if (!name) return -1;
+    if (!enc_table.list) return -1;
+    if (st_lookup(enc_table.names, (st_data_t)name, &idx)) {
+	return (int)idx;
+    }
+    return -1;
+}
+
+static VALUE
+require_enc(VALUE enclib)
+{
+    return rb_require_safe(enclib, rb_safe_level());
+}
+
+static int
+load_encoding(const char *name)
+{
+    VALUE enclib = rb_sprintf("enc/%s", name);
+    VALUE verbose = ruby_verbose;
+    VALUE debug = ruby_debug;
+    VALUE loaded;
+    char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib);
+    int idx;
+
+    while (s < e) {
+	if (!ISALNUM(*s)) *s = '_';
+	else if (ISUPPER(*s)) *s = TOLOWER(*s);
+	++s;
+    }
+    OBJ_FREEZE(enclib);
+    ruby_verbose = Qfalse;
+    ruby_debug = Qfalse;
+    loaded = rb_protect(require_enc, enclib, 0);
+    ruby_verbose = verbose;
+    ruby_debug = debug;
+    rb_set_errinfo(Qnil);
+    if (NIL_P(loaded)) return -1;
+    if ((idx = rb_enc_registered(name)) < 0) return -1;
+    if (enc_autoload_p(enc_table.list[idx].enc)) return -1;
+    return idx;
+}
+
+static int
+enc_autoload(rb_encoding *enc)
+{
+    int i;
+    rb_encoding *base = enc_table.list[ENC_TO_ENCINDEX(enc)].base;
+
+    if (base) {
+	i = 0;
+	do {
+	    if (i >= enc_table.count) return -1;
+	} while (enc_table.list[i].enc != base && (++i, 1));
+	if (enc_autoload_p(base)) {
+	    if (enc_autoload(base) < 0) return -1;
+	}
+	i = ENC_TO_ENCINDEX(enc);
+	enc_register_at(i, rb_enc_name(enc), base);
+    }
+    else {
+	i = load_encoding(rb_enc_name(enc));
+    }
+    return i;
+}
+
+int
+rb_enc_find_index(const char *name)
+{
+    int i = rb_enc_registered(name);
+    rb_encoding *enc;
+
+    if (i < 0) {
+	i = load_encoding(name);
+    }
+    else if (!(enc = rb_enc_from_index(i))) {
+	if (i != UNSPECIFIED_ENCODING) {
+	    rb_raise(rb_eArgError, "encoding %s is not registered", name);
+	}
+    }
+    else if (enc_autoload_p(enc)) {
+	if (enc_autoload(enc) < 0) {
+	    rb_warn("failed to load encoding (%s); use ASCII-8BIT instead",
+		    name);
+	    return 0;
+	}
+    }
+    return i;
+}
+
+rb_encoding *
+rb_enc_find(const char *name)
+{
+    int idx = rb_enc_find_index(name);
+    if (idx < 0) idx = 0;
+    return rb_enc_from_index(idx);
+}
+
+static inline int
+enc_capable(VALUE obj)
+{
+    if (SPECIAL_CONST_P(obj)) return Qfalse;
+    switch (BUILTIN_TYPE(obj)) {
+      case T_STRING:
+      case T_REGEXP:
+      case T_FILE:
+	return Qtrue;
+      case T_DATA:
+	if (RDATA(obj)->dmark == enc_mark) return Qtrue;
+      default:
+	return Qfalse;
+    }
+}
+
+ID
+rb_id_encoding(void)
+{
+    CONST_ID(id_encoding, "encoding");
+    return id_encoding;
+}
+
+int
+rb_enc_get_index(VALUE obj)
+{
+    int i = -1;
+    VALUE tmp;
+
+    switch (BUILTIN_TYPE(obj)) {
+        default:
+	case T_STRING:
+	case T_REGEXP:
+	    i = ENCODING_GET_INLINED(obj);
+	    if (i == ENCODING_INLINE_MAX) {
+		VALUE iv;
+
+		iv = rb_ivar_get(obj, rb_id_encoding());
+		i = NUM2INT(iv);
+	    }
+	    break;
+	case T_FILE:
+	    tmp = rb_funcall(obj, rb_intern("internal_encoding"), 0, 0);
+	    if (NIL_P(tmp)) obj = rb_funcall(obj, rb_intern("external_encoding"), 0, 0);
+	    else obj = tmp;
+	    if (NIL_P(obj)) break;
+	case T_DATA:
+	    if (RDATA(obj)->dmark == enc_mark) {
+		i = enc_check_encoding(obj);
+	    }
+	    break;
+    }
+    return i;
+}
+
+void
+rb_enc_set_index(VALUE obj, int idx)
+{
+    if (idx < ENCODING_INLINE_MAX) {
+	ENCODING_SET_INLINED(obj, idx);
+	return;
+    }
+    ENCODING_SET_INLINED(obj, ENCODING_INLINE_MAX);
+    rb_ivar_set(obj, rb_id_encoding(), INT2NUM(idx));
+    return;
+}
+
+VALUE
+rb_enc_associate_index(VALUE obj, int idx)
+{
+/*    enc_check_capable(obj);*/
+    if (rb_enc_get_index(obj) == idx)
+    	return obj;
+    if (!ENC_CODERANGE_ASCIIONLY(obj) ||
+	!rb_enc_asciicompat(rb_enc_from_index(idx))) {
+	ENC_CODERANGE_CLEAR(obj);
+    }
+    rb_enc_set_index(obj, idx);
+    return obj;
+}
+
+VALUE
+rb_enc_associate(VALUE obj, rb_encoding *enc)
+{
+    return rb_enc_associate_index(obj, rb_enc_to_index(enc));
+}
+
+rb_encoding*
+rb_enc_get(VALUE obj)
+{
+    return rb_enc_from_index(rb_enc_get_index(obj));
+}
+
+rb_encoding*
+rb_enc_check(VALUE str1, VALUE str2)
+{
+    rb_encoding *enc = rb_enc_compatible(str1, str2);
+    if (!enc)
+	rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s",
+		 rb_enc_name(rb_enc_get(str1)),
+		 rb_enc_name(rb_enc_get(str2)));
+    return enc;
+}
+
+rb_encoding*
+rb_enc_compatible(VALUE str1, VALUE str2)
+{
+    int idx1, idx2;
+    rb_encoding *enc1, *enc2;
+
+    idx1 = rb_enc_get_index(str1);
+    idx2 = rb_enc_get_index(str2);
+
+    if (idx1 < 0 || idx2 < 0)
+        return 0;
+
+    if (idx1 == idx2) {
+	return rb_enc_from_index(idx1);
+    }
+    enc1 = rb_enc_from_index(idx1);
+    enc2 = rb_enc_from_index(idx2);
+
+    if (TYPE(str2) == T_STRING && RSTRING_LEN(str2) == 0)
+	return enc1;
+    if (TYPE(str1) == T_STRING && RSTRING_LEN(str1) == 0)
+	return enc2;
+    if (!rb_enc_asciicompat(enc1) || !rb_enc_asciicompat(enc2)) {
+	return 0;
+    }
+
+    /* objects whose encoding is the same of contents */
+    if (BUILTIN_TYPE(str2) != T_STRING && idx2 == ENCINDEX_US_ASCII)
+	return enc1;
+    if (BUILTIN_TYPE(str1) != T_STRING && idx1 == ENCINDEX_US_ASCII)
+	return enc2;
+
+    if (BUILTIN_TYPE(str1) != T_STRING) {
+	VALUE tmp = str1;
+	int idx0 = idx1;
+	str1 = str2;
+	str2 = tmp;
+	idx1 = idx2;
+	idx2 = idx0;
+    }
+    if (BUILTIN_TYPE(str1) == T_STRING) {
+	int cr1, cr2;
+
+	cr1 = rb_enc_str_coderange(str1);
+	if (BUILTIN_TYPE(str2) == T_STRING) {
+	    cr2 = rb_enc_str_coderange(str2);
+	    if (cr1 != cr2) {
+		/* may need to handle ENC_CODERANGE_BROKEN */
+		if (cr1 == ENC_CODERANGE_7BIT) return enc2;
+		if (cr2 == ENC_CODERANGE_7BIT) return enc1;
+	    }
+	    if (cr2 == ENC_CODERANGE_7BIT) {
+		if (idx1 == ENCINDEX_ASCII) return enc2;
+		return enc1;
+	    }
+	}
+	if (cr1 == ENC_CODERANGE_7BIT)
+	    return enc2;
+    }
+    return 0;
+}
+
+void
+rb_enc_copy(VALUE obj1, VALUE obj2)
+{
+    rb_enc_associate_index(obj1, rb_enc_get_index(obj2));
+}
+
+
+/*
+ *  call-seq:
+ *     obj.encoding   => encoding
+ *
+ *  Returns the Encoding object that represents the encoding of obj.
+ */
+
+VALUE
+rb_obj_encoding(VALUE obj)
+{
+    rb_encoding *enc = rb_enc_get(obj);
+    if (!enc) {
+	rb_raise(rb_eTypeError, "unknown encoding");
+    }
+    return rb_enc_from_encoding(enc);
+}
+
+int
+rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc)
+{
+    int n = ONIGENC_PRECISE_MBC_ENC_LEN(enc, (UChar*)p, (UChar*)e);
+    if (MBCLEN_CHARFOUND_P(n) && MBCLEN_CHARFOUND_LEN(n) <= e-p)
+        return MBCLEN_CHARFOUND_LEN(n);
+    else {
+        int min = rb_enc_mbminlen(enc);
+        return min <= e-p ? min : e-p;
+    }
+}
+
+int
+rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
+{
+    int n;
+    if (e <= p)
+        return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(1);
+    n = ONIGENC_PRECISE_MBC_ENC_LEN(enc, (UChar*)p, (UChar*)e);
+    if (e-p < n)
+        return ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n-(e-p));
+    return n;
+}
+
+int
+rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
+{
+    unsigned int c, l;
+    if (e <= p)
+        return -1;
+    if (rb_enc_asciicompat(enc)) {
+        c = (unsigned char)*p;
+        if (!ISASCII(c))
+            return -1;
+        if (len) *len = 1;
+        return c;
+    }
+    l = rb_enc_precise_mbclen(p, e, enc);
+    if (!MBCLEN_CHARFOUND_P(l))
+        return -1;
+    c = rb_enc_mbc_to_codepoint(p, e, enc);
+    if (!rb_enc_isascii(c, enc))
+        return -1;
+    if (len) *len = l;
+    return c;
+}
+
+unsigned int
+rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
+{
+    int r;
+    if (e <= p)
+        rb_raise(rb_eArgError, "empty string");
+    r = rb_enc_precise_mbclen(p, e, enc);
+    if (MBCLEN_CHARFOUND_P(r))
+        return rb_enc_mbc_to_codepoint(p, e, enc);
+    else
+	rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
+}
+
+int
+rb_enc_codelen(int c, rb_encoding *enc)
+{
+    int n = ONIGENC_CODE_TO_MBCLEN(enc,c);
+    if (n == 0) {
+	rb_raise(rb_eArgError, "invalid codepoint 0x%x in %s", c, rb_enc_name(enc));
+    }
+    return n;
+}
+
+int
+rb_enc_toupper(int c, rb_encoding *enc)
+{
+    return (ONIGENC_IS_ASCII_CODE(c)?ONIGENC_ASCII_CODE_TO_UPPER_CASE(c):(c));
+}
+
+int
+rb_enc_tolower(int c, rb_encoding *enc)
+{
+    return (ONIGENC_IS_ASCII_CODE(c)?ONIGENC_ASCII_CODE_TO_LOWER_CASE(c):(c));
+}
+
+/*
+ * call-seq:
+ *   enc.inspect => string
+ *
+ * Returns a string which represents the encoding for programmers.
+ *
+ *   Encoding::UTF_8.inspect       #=> "#"
+ *   Encoding::ISO_2022_JP.inspect #=> "#"
+ */
+static VALUE
+enc_inspect(VALUE self)
+{
+    VALUE str = rb_sprintf("#<%s:%s%s>", rb_obj_classname(self),
+		      rb_enc_name((rb_encoding*)DATA_PTR(self)),
+		      (enc_dummy_p(self) ? " (dummy)" : ""));
+    ENCODING_CODERANGE_SET(str, rb_usascii_encindex(), ENC_CODERANGE_7BIT);
+    return str;
+}
+
+/*
+ * call-seq:
+ *   enc.name => string
+ *
+ * Returns the name of the encoding.
+ *
+ *   Encoding::UTF_8.name       => "UTF-8"
+ */
+static VALUE
+enc_name(VALUE self)
+{
+    return rb_usascii_str_new2(rb_enc_name((rb_encoding*)DATA_PTR(self)));
+}
+
+static int
+enc_names_i(st_data_t name, st_data_t idx, st_data_t args)
+{
+    VALUE *arg = (VALUE *)args;
+
+    if ((int)idx == (int)arg[0]) {
+	VALUE str = rb_usascii_str_new2((char *)name);
+	OBJ_FREEZE(str);
+	rb_ary_push(arg[1], str);
+    }
+    return ST_CONTINUE;
+}
+
+/*
+ * call-seq:
+ *   enc.names => array
+ *
+ * Returns the list of name and aliases of the encoding.
+ *
+ *   Encoding::WINDOWS_31J.names => ["Windows-31J", "CP932", "csWindows31J"]
+ */
+static VALUE
+enc_names(VALUE self)
+{
+    VALUE args[2];
+
+    args[0] = (VALUE)rb_to_encoding_index(self);
+    args[1] = rb_ary_new2(0);
+    st_foreach(enc_table.names, enc_names_i, (st_data_t)args);
+    return args[1];
+}
+
+/*
+ * call-seq:
+ *   Encoding.list => [enc1, enc2, ...]
+ *
+ * Returns the list of loaded encodings.
+ *
+ *   Encoding.list
+ *   => [#, #,
+ *       #]
+ *
+ *   Encoding.find("US-ASCII")
+ *   => #
+ *
+ *   Encoding.list
+ *   => [#, #,
+ *       #, #]
+ *
+ */
+static VALUE
+enc_list(VALUE klass)
+{
+    VALUE ary = rb_ary_new2(0);
+    rb_ary_replace(ary, rb_encoding_list);
+    return ary;
+}
+
+/*
+ * call-seq:
+ *   Encoding.find(string) => enc
+ *   Encoding.find(symbol) => enc
+ *
+ * Search the encoding with specified name.
+ * name should be a string or symbol.
+ *
+ *   Encoding.find("US-ASCII")  => #
+ *   Encoding.find(:Shift_JIS)  => #
+ *
+ * An ArgumentError is raised when no encoding with name.
+ * Only +Encoding.find("internal")+ however returns nil when no encoding named "internal",
+ * in other words, when Ruby has no default internal encoding.
+ */
+static VALUE
+enc_find(VALUE klass, VALUE enc)
+{
+    return rb_enc_from_encoding(to_encoding(enc));
+}
+
+/*
+ * call-seq:
+ *   Encoding.compatible?(str1, str2) => enc or nil
+ *
+ * Checks the compatibility of two strings.
+ * If they are compatible, means concatenatable, 
+ * returns an encoding which the concatinated string will be.
+ * If they are not compatible, nil is returned.
+ *
+ *   Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
+ *   => #
+ *
+ *   Encoding.compatible?(
+ *     "\xa1".force_encoding("iso-8859-1"),
+ *     "\xa1\xa1".force_encoding("euc-jp"))
+ *   => nil
+ *
+ */
+static VALUE
+enc_compatible_p(VALUE klass, VALUE str1, VALUE str2)
+{
+    rb_encoding *enc;
+
+    if (!enc_capable(str1)) return Qnil;
+    if (!enc_capable(str2)) return Qnil;
+    enc = rb_enc_compatible(str1, str2);
+    if (!enc) return Qnil;
+    return rb_enc_from_encoding(enc);
+}
+
+/* :nodoc: */
+static VALUE
+enc_dump(int argc, VALUE *argv, VALUE self)
+{
+    rb_scan_args(argc, argv, "01", 0);
+    return enc_name(self);
+}
+
+/* :nodoc: */
+static VALUE
+enc_load(VALUE klass, VALUE str)
+{
+    return enc_find(klass, str);
+}
+
+rb_encoding *
+rb_ascii8bit_encoding(void)
+{
+    if (!enc_table.list) {
+	rb_enc_init();
+    }
+    return enc_table.list[ENCINDEX_ASCII].enc;
+}
+
+int
+rb_ascii8bit_encindex(void)
+{
+    return ENCINDEX_ASCII;
+}
+
+rb_encoding *
+rb_utf8_encoding(void)
+{
+    if (!enc_table.list) {
+	rb_enc_init();
+    }
+    return enc_table.list[ENCINDEX_UTF_8].enc;
+}
+
+int
+rb_utf8_encindex(void)
+{
+    return ENCINDEX_UTF_8;
+}
+
+rb_encoding *
+rb_usascii_encoding(void)
+{
+    if (!enc_table.list) {
+	rb_enc_init();
+    }
+    return enc_table.list[ENCINDEX_US_ASCII].enc;
+}
+
+int
+rb_usascii_encindex(void)
+{
+    return ENCINDEX_US_ASCII;
+}
+
+rb_encoding *
+rb_locale_encoding(void)
+{
+    VALUE charmap = rb_locale_charmap(rb_cEncoding);
+    int idx;
+
+    if (NIL_P(charmap))
+        idx = rb_usascii_encindex();
+    else if ((idx = rb_enc_find_index(StringValueCStr(charmap))) < 0)
+        idx = rb_ascii8bit_encindex();
+
+    if (rb_enc_registered("locale") < 0) enc_alias_internal("locale", idx);
+
+    return rb_enc_from_index(idx);
+}
+
+rb_encoding *
+rb_filesystem_encoding(void)
+{
+    rb_encoding *enc;
+#if defined _WIN32
+    enc = rb_locale_encoding();
+#elif defined __APPLE__
+    enc = rb_enc_find("UTF8-MAC");
+#else
+    enc = rb_default_external_encoding();
+#endif
+    return enc;
+}
+
+struct default_encoding {
+    int index;			/* -2 => not yet set, -1 => nil */
+    rb_encoding *enc;
+};
+
+static int
+enc_set_default_encoding(struct default_encoding *def, VALUE encoding,
+			 const char *name, int defindex)
+{
+    int overridden = Qfalse;
+    if (def->index != -2)
+	/* Already set */
+	overridden = Qtrue;
+
+    if (NIL_P(encoding)) {
+	def->index = -1;
+	def->enc = 0;
+	st_insert(enc_table.names, (st_data_t)strdup(name),
+		  (st_data_t)UNSPECIFIED_ENCODING);
+    }
+    else {
+	def->index = rb_enc_to_index(rb_to_encoding(encoding));
+	if (def->index == ENCINDEX_US_ASCII)
+	    def->index = defindex;
+	def->enc = 0;
+	enc_alias_internal(name, def->index);
+    }
+
+    return overridden;
+}
+
+static struct default_encoding default_external = {0};
+
+rb_encoding *
+rb_default_external_encoding(void)
+{
+    if (default_external.enc) return default_external.enc;
+
+    if (default_external.index >= 0) {
+        default_external.enc = rb_enc_from_index(default_external.index);
+        return default_external.enc;
+    }
+    else {
+        return rb_locale_encoding();
+    }
+}
+
+VALUE
+rb_enc_default_external(void)
+{
+    return rb_enc_from_encoding(rb_default_external_encoding());
+}
+
+/*
+ * call-seq:
+ *   Encoding.default_external => enc
+ *
+ * Returns default external encoding.
+ *
+ * It is initialized by the locale or -E option.
+ */
+static VALUE
+get_default_external(VALUE klass)
+{
+    return rb_enc_default_external();
+}
+
+void
+rb_enc_set_default_external(VALUE encoding)
+{
+    if (NIL_P(encoding)) {
+        rb_raise(rb_eArgError, "default external can not be nil");
+    }
+    enc_set_default_encoding(&default_external, encoding,
+			     "external", ENCINDEX_US_ASCII);
+}
+
+/*
+ * call-seq:
+ *   Encoding.default_external = enc
+ *
+ * Sets default external encoding.
+ */
+static VALUE
+set_default_external(VALUE klass, VALUE encoding)
+{
+    rb_warning("setting Encoding.default_external");
+    rb_enc_set_default_external(encoding);
+    return encoding;
+}
+
+static struct default_encoding default_internal = {-2};
+
+rb_encoding *
+rb_default_internal_encoding(void)
+{
+    if (!default_internal.enc && default_internal.index >= 0) {
+        default_internal.enc = rb_enc_from_index(default_internal.index);
+    }
+    return default_internal.enc; /* can be NULL */
+}
+
+VALUE
+rb_enc_default_internal(void)
+{
+    /* Note: These functions cope with default_internal not being set */
+    return rb_enc_from_encoding(rb_default_internal_encoding());
+}
+
+/*
+ * call-seq:
+ *   Encoding.default_internal => enc
+ *
+ * Returns default internal encoding.
+ *
+ * It is initialized by the source internal_encoding or -E option.
+ */
+static VALUE
+get_default_internal(VALUE klass)
+{
+    return rb_enc_default_internal();
+}
+
+void
+rb_enc_set_default_internal(VALUE encoding)
+{
+    enc_set_default_encoding(&default_internal, encoding,
+			     "internal", ENCINDEX_UTF_8);
+}
+
+/*
+ * call-seq:
+ *   Encoding.default_internal = enc or nil
+ *
+ * Sets default internal encoding.
+ * Or removes default internal encoding when passed nil.
+ */
+static VALUE
+set_default_internal(VALUE klass, VALUE encoding)
+{
+    rb_warning("setting Encoding.default_internal");
+    rb_enc_set_default_internal(encoding);
+    return encoding;
+}
+
+/*
+ * call-seq:
+ *   Encoding.locale_charmap => string
+ *
+ * Returns the locale charmap name.
+ *
+ *   Debian GNU/Linux
+ *     LANG=C
+ *       Encoding.locale_charmap  => "ANSI_X3.4-1968"
+ *     LANG=ja_JP.EUC-JP
+ *       Encoding.locale_charmap  => "EUC-JP"
+ *
+ *   SunOS 5
+ *     LANG=C
+ *       Encoding.locale_charmap  => "646"
+ *     LANG=ja
+ *       Encoding.locale_charmap  => "eucJP"
+ *
+ */
+VALUE
+rb_locale_charmap(VALUE klass)
+{
+#if defined NO_LOCALE_CHARMAP
+    return rb_usascii_str_new2("ASCII-8BIT");
+#elif defined HAVE_LANGINFO_H
+    char *codeset;
+    codeset = nl_langinfo(CODESET);
+    return rb_usascii_str_new2(codeset);
+#elif defined _WIN32
+    return rb_sprintf("CP%d", GetACP());
+#else
+    return Qnil;
+#endif
+}
+
+static void
+set_encoding_const(const char *name, rb_encoding *enc)
+{
+    VALUE encoding = rb_enc_from_encoding(enc);
+    char *s = (char *)name;
+    int haslower = 0, hasupper = 0, valid = 0;
+
+    if (ISDIGIT(*s)) return;
+    if (ISUPPER(*s)) {
+	hasupper = 1;
+	while (*++s && (ISALNUM(*s) || *s == '_')) {
+	    if (ISLOWER(*s)) haslower = 1;
+	}
+    }
+    if (!*s) {
+	valid = 1;
+	rb_define_const(rb_cEncoding, name, encoding);
+    }
+    if (!valid || haslower) {
+	int len = strlen(name) + 1;
+	if (!haslower || !hasupper) {
+	    do {
+		if (ISLOWER(*s)) haslower = 1;
+		if (ISUPPER(*s)) hasupper = 1;
+	    } while (*++s && (!haslower || !hasupper));
+	}
+	MEMCPY(s = ALLOCA_N(char, len), name, char, len);
+	name = s;
+	if (!valid) {
+	    if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
+	    for (; *s; ++s) {
+		if (!ISALNUM(*s)) *s = '_';
+	    }
+	    if (hasupper) {
+		rb_define_const(rb_cEncoding, name, encoding);
+	    }
+	}
+	if (haslower) {
+	    for (s = (char *)name; *s; ++s) {
+		if (ISLOWER(*s)) *s = ONIGENC_ASCII_CODE_TO_UPPER_CASE((int)*s);
+	    }
+	    rb_define_const(rb_cEncoding, name, encoding);
+	}
+    }
+}
+
+static int
+rb_enc_name_list_i(st_data_t name, st_data_t idx, st_data_t arg)
+{
+    VALUE ary = (VALUE)arg;
+    VALUE str = rb_usascii_str_new2((char *)name);
+    OBJ_FREEZE(str);
+    rb_ary_push(ary, str);
+    return ST_CONTINUE;
+}
+
+/*
+ * call-seq:
+ *   Encoding.name_list => ["enc1", "enc2", ...]
+ *
+ * Returns the list of available encoding names.
+ *
+ *   Encoding.name_list
+ *   => ["US-ASCII", "ASCII-8BIT", "UTF-8",
+ *       "ISO-8859-1", "Shift_JIS", "EUC-JP",
+ *       "Windows-31J",
+ *       "BINARY", "CP932", "eucJP"]
+ *
+ * This list doesn't include dummy encodings.
+ *
+ */
+
+static VALUE
+rb_enc_name_list(VALUE klass)
+{
+    VALUE ary = rb_ary_new2(enc_table.names->num_entries);
+    st_foreach(enc_table.names, rb_enc_name_list_i, (st_data_t)ary);
+    return ary;
+}
+
+static int
+rb_enc_aliases_enc_i(st_data_t name, st_data_t orig, st_data_t arg)
+{
+    VALUE *p = (VALUE *)arg;
+    VALUE aliases = p[0], ary = p[1];
+    int idx = (int)orig;
+    VALUE key, str = rb_ary_entry(ary, idx);
+
+    if (NIL_P(str)) {
+	rb_encoding *enc = rb_enc_from_index(idx);
+
+	if (!enc) return ST_CONTINUE;
+	if (STRCASECMP((char*)name, rb_enc_name(enc)) == 0) {
+	    return ST_CONTINUE;
+	}
+	str = rb_usascii_str_new2(rb_enc_name(enc));
+	OBJ_FREEZE(str);
+	rb_ary_store(ary, idx, str);
+    }
+    key = rb_usascii_str_new2((char *)name);
+    OBJ_FREEZE(key);
+    rb_hash_aset(aliases, key, str);
+    return ST_CONTINUE;
+}
+
+/*
+ * call-seq:
+ *   Encoding.aliases => {"alias1" => "orig1", "alias2" => "orig2", ...}
+ *
+ * Returns the hash of available encoding alias and original encoding name.
+ *
+ *   Encoding.aliases
+ *   => {"BINARY"=>"ASCII-8BIT", "ASCII"=>"US-ASCII", "ANSI_X3.4-1986"=>"US-ASCII",
+ *       "SJIS"=>"Shift_JIS", "eucJP"=>"EUC-JP", "CP932"=>"Windows-31J"}
+ *
+ */
+
+static VALUE
+rb_enc_aliases(VALUE klass)
+{
+    VALUE aliases[2];
+    aliases[0] = rb_hash_new();
+    aliases[1] = rb_ary_new();
+    st_foreach(enc_table.names, rb_enc_aliases_enc_i, (st_data_t)aliases);
+    return aliases[0];
+}
+
+void
+Init_Encoding(void)
+{
+#undef rb_intern
+#define rb_intern(str) rb_intern_const(str)
+    VALUE list;
+    int i;
+
+    rb_cEncoding = rb_define_class("Encoding", rb_cObject);
+    rb_undef_alloc_func(rb_cEncoding);
+    rb_define_method(rb_cEncoding, "to_s", enc_name, 0);
+    rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0);
+    rb_define_method(rb_cEncoding, "name", enc_name, 0);
+    rb_define_method(rb_cEncoding, "names", enc_names, 0);
+    rb_define_method(rb_cEncoding, "dummy?", enc_dummy_p, 0);
+    rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0);
+    rb_define_singleton_method(rb_cEncoding, "name_list", rb_enc_name_list, 0);
+    rb_define_singleton_method(rb_cEncoding, "aliases", rb_enc_aliases, 0);
+    rb_define_singleton_method(rb_cEncoding, "find", enc_find, 1);
+    rb_define_singleton_method(rb_cEncoding, "compatible?", enc_compatible_p, 2);
+
+    rb_define_method(rb_cEncoding, "_dump", enc_dump, -1);
+    rb_define_singleton_method(rb_cEncoding, "_load", enc_load, 1);
+
+    rb_define_singleton_method(rb_cEncoding, "default_external", get_default_external, 0);
+    rb_define_singleton_method(rb_cEncoding, "default_external=", set_default_external, 1);
+    rb_define_singleton_method(rb_cEncoding, "default_internal", get_default_internal, 0);
+    rb_define_singleton_method(rb_cEncoding, "default_internal=", set_default_internal, 1);
+    rb_define_singleton_method(rb_cEncoding, "locale_charmap", rb_locale_charmap, 0);
+
+    list = rb_ary_new2(enc_table.count);
+    RBASIC(list)->klass = 0;
+    rb_encoding_list = list;
+    rb_gc_register_mark_object(list);
+
+    for (i = 0; i < enc_table.count; ++i) {
+	rb_ary_push(list, enc_new(enc_table.list[i].enc));
+    }
+}
+
+/* locale insensitive functions */
+
+#define ctype_test(c, ctype) \
+    (rb_isascii(c) && ONIGENC_IS_ASCII_CODE_CTYPE((c), ctype))
+
+int rb_isalnum(int c) { return ctype_test(c, ONIGENC_CTYPE_ALNUM); }
+int rb_isalpha(int c) { return ctype_test(c, ONIGENC_CTYPE_ALPHA); }
+int rb_isblank(int c) { return ctype_test(c, ONIGENC_CTYPE_BLANK); }
+int rb_iscntrl(int c) { return ctype_test(c, ONIGENC_CTYPE_CNTRL); }
+int rb_isdigit(int c) { return ctype_test(c, ONIGENC_CTYPE_DIGIT); }
+int rb_isgraph(int c) { return ctype_test(c, ONIGENC_CTYPE_GRAPH); }
+int rb_islower(int c) { return ctype_test(c, ONIGENC_CTYPE_LOWER); }
+int rb_isprint(int c) { return ctype_test(c, ONIGENC_CTYPE_PRINT); }
+int rb_ispunct(int c) { return ctype_test(c, ONIGENC_CTYPE_PUNCT); }
+int rb_isspace(int c) { return ctype_test(c, ONIGENC_CTYPE_SPACE); }
+int rb_isupper(int c) { return ctype_test(c, ONIGENC_CTYPE_UPPER); }
+int rb_isxdigit(int c) { return ctype_test(c, ONIGENC_CTYPE_XDIGIT); }
+
+int
+rb_tolower(int c)
+{
+    return rb_isascii(c) ? ONIGENC_ASCII_CODE_TO_LOWER_CASE(c) : c;
+}
+
+int
+rb_toupper(int c)
+{
+    return rb_isascii(c) ? ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) : c;
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enum.c b/lib/ruby-1.9.1-rc1/enum.c
new file mode 100644
index 0000000..e29bc1e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enum.c
@@ -0,0 +1,1858 @@
+/**********************************************************************
+
+  enum.c -
+
+  $Author: ko1 $
+  created at: Fri Oct  1 15:15:19 JST 1993
+
+  Copyright (C) 1993-2007 Yukihiro Matsumoto
+
+**********************************************************************/
+
+#include "ruby/ruby.h"
+#include "ruby/util.h"
+#include "node.h"
+
+VALUE rb_mEnumerable;
+static ID id_each, id_eqq, id_cmp, id_next, id_size;
+
+static VALUE
+enum_values_pack(int argc, VALUE *argv)
+{
+    if (argc == 0) return Qnil;
+    if (argc == 1) return argv[0];
+    return rb_ary_new4(argc, argv);
+}
+
+#define ENUM_WANT_SVALUE() do { \
+    i = enum_values_pack(argc, argv); \
+} while (0)
+
+#define enum_yield rb_yield_values2
+
+static VALUE
+grep_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
+	rb_ary_push(arg[1], i);
+    }
+    return Qnil;
+}
+
+static VALUE
+grep_iter_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
+	rb_ary_push(arg[1], rb_yield(i));
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.grep(pattern)                   => array
+ *     enum.grep(pattern) {| obj | block }  => array
+ *
+ *  Returns an array of every element in enum for which
+ *  Pattern === element. If the optional block is
+ *  supplied, each matching element is passed to it, and the block's
+ *  result is stored in the output array.
+ *
+ *     (1..100).grep 38..44   #=> [38, 39, 40, 41, 42, 43, 44]
+ *     c = IO.constants
+ *     c.grep(/SEEK/)         #=> [:SEEK_SET, :SEEK_CUR, :SEEK_END]
+ *     res = c.grep(/SEEK/) {|v| IO.const_get(v) }
+ *     res                    #=> [0, 1, 2]
+ *
+ */
+
+static VALUE
+enum_grep(VALUE obj, VALUE pat)
+{
+    VALUE ary = rb_ary_new();
+    VALUE arg[2];
+
+    arg[0] = pat;
+    arg[1] = ary;
+
+    rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
+
+    return ary;
+}
+
+static VALUE
+count_i(VALUE i, VALUE memop, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE*)memop;
+
+    ENUM_WANT_SVALUE();
+
+    if (rb_equal(i, memo[1])) {
+	memo[0]++;
+    }
+    return Qnil;
+}
+
+static VALUE
+count_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE*)memop;
+
+    if (RTEST(enum_yield(argc, argv))) {
+	memo[0]++;
+    }
+    return Qnil;
+}
+
+static VALUE
+count_all_i(VALUE i, VALUE memop, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE*)memop;
+
+    memo[0]++;
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.count                   => int
+ *     enum.count(item)             => int
+ *     enum.count {| obj | block }  => int
+ *
+ *  Returns the number of items in enum, where #size is called
+ *  if it responds to it, otherwise the items are counted through
+ *  enumeration.  If an argument is given, counts the number of items
+ *  in enum, for which equals to item.  If a block is
+ *  given, counts the number of elements yielding a true value.
+ *
+ *     ary = [1, 2, 4, 2]
+ *     ary.count             # => 4
+ *     ary.count(2)          # => 2
+ *     ary.count{|x|x%2==0}  # => 3
+ *
+ */
+
+static VALUE
+enum_count(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE memo[2];	/* [count, condition value] */
+    rb_block_call_func *func;
+
+    if (argc == 0) {
+	if (rb_block_given_p()) {
+	    func = count_iter_i;
+	}
+	else {
+	    if (rb_respond_to(obj, id_size)) {
+		return rb_funcall(obj, id_size, 0, 0);
+	    }
+	    func = count_all_i;
+	}
+    }
+    else {
+	rb_scan_args(argc, argv, "1", &memo[1]);
+	if (rb_block_given_p()) {
+	    rb_warn("given block not used");
+	}
+        func = count_i;
+    }
+
+    memo[0] = 0;
+    rb_block_call(obj, id_each, 0, 0, func, (VALUE)&memo);
+    return INT2NUM(memo[0]);
+}
+
+static VALUE
+find_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (RTEST(rb_yield(i))) {
+	*memo = i;
+	rb_iter_break();
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.detect(ifnone = nil) {| obj | block }  => obj or nil
+ *     enum.find(ifnone = nil)   {| obj | block }  => obj or nil
+ *
+ *  Passes each entry in enum to block. Returns the
+ *  first for which block is not false.  If no
+ *  object matches, calls ifnone and returns its result when it
+ *  is specified, or returns nil
+ *
+ *     (1..10).detect  {|i| i % 5 == 0 and i % 7 == 0 }   #=> nil
+ *     (1..100).detect {|i| i % 5 == 0 and i % 7 == 0 }   #=> 35
+ *
+ */
+
+static VALUE
+enum_find(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE memo = Qundef;
+    VALUE if_none;
+
+    rb_scan_args(argc, argv, "01", &if_none);
+    RETURN_ENUMERATOR(obj, argc, argv);
+    rb_block_call(obj, id_each, 0, 0, find_i, (VALUE)&memo);
+    if (memo != Qundef) {
+	return memo;
+    }
+    if (!NIL_P(if_none)) {
+	return rb_funcall(if_none, rb_intern("call"), 0, 0);
+    }
+    return Qnil;
+}
+
+static VALUE
+find_index_i(VALUE i, VALUE memop, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE*)memop;
+
+    ENUM_WANT_SVALUE();
+
+    if (rb_equal(i, memo[2])) {
+	memo[0] = UINT2NUM(memo[1]);
+	rb_iter_break();
+    }
+    memo[1]++;
+    return Qnil;
+}
+
+static VALUE
+find_index_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE*)memop;
+
+    if (RTEST(enum_yield(argc, argv))) {
+	memo[0] = UINT2NUM(memo[1]);
+	rb_iter_break();
+    }
+    memo[1]++;
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.find_index(value)            => int or nil
+ *     enum.find_index {| obj | block }  => int or nil
+ *
+ *  Compares each entry in enum with value or passes
+ *  to block.  Returns the index for the first for which the
+ *  evaluated value is non-false.  If no object matches, returns
+ *  nil
+ *
+ *     (1..10).find_index  {|i| i % 5 == 0 and i % 7 == 0 }   #=> nil
+ *     (1..100).find_index {|i| i % 5 == 0 and i % 7 == 0 }   #=> 34
+ *     (1..100).find_index(50)                                #=> 49
+ *
+ */
+
+static VALUE
+enum_find_index(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE memo[3];	/* [return value, current index, condition value] */
+    rb_block_call_func *func;
+
+    if (argc == 0) {
+        RETURN_ENUMERATOR(obj, 0, 0);
+        func = find_index_iter_i;
+    }
+    else {
+	rb_scan_args(argc, argv, "1", &memo[2]);
+	if (rb_block_given_p()) {
+	    rb_warn("given block not used");
+	}
+        func = find_index_i;
+    }
+
+    memo[0] = Qnil;
+    memo[1] = 0;
+    rb_block_call(obj, id_each, 0, 0, func, (VALUE)memo);
+    return memo[0];
+}
+
+static VALUE
+find_all_i(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (RTEST(rb_yield(i))) {
+	rb_ary_push(ary, i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.find_all {| obj | block }  => array
+ *     enum.select   {| obj | block }  => array
+ *
+ *  Returns an array containing all elements of enum for which
+ *  block is not false (see also
+ *  Enumerable#reject).
+ *
+ *     (1..10).find_all {|i|  i % 3 == 0 }   #=> [3, 6, 9]
+ *
+ */
+
+static VALUE
+enum_find_all(VALUE obj)
+{
+    VALUE ary;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    ary = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, find_all_i, ary);
+
+    return ary;
+}
+
+static VALUE
+reject_i(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (!RTEST(rb_yield(i))) {
+	rb_ary_push(ary, i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.reject {| obj | block }  => array
+ *
+ *  Returns an array for all elements of enum for which
+ *  block is false (see also Enumerable#find_all).
+ *
+ *     (1..10).reject {|i|  i % 3 == 0 }   #=> [1, 2, 4, 5, 7, 8, 10]
+ *
+ */
+
+static VALUE
+enum_reject(VALUE obj)
+{
+    VALUE ary;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    ary = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, reject_i, ary);
+
+    return ary;
+}
+
+static VALUE
+collect_i(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    rb_ary_push(ary, enum_yield(argc, argv));
+
+    return Qnil;
+}
+
+static VALUE
+collect_all(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    rb_ary_push(ary, enum_values_pack(argc, argv));
+
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.collect {| obj | block }  => array
+ *     enum.map     {| obj | block }  => array
+ *
+ *  Returns a new array with the results of running block once
+ *  for every element in enum.
+ *
+ *     (1..4).collect {|i| i*i }   #=> [1, 4, 9, 16]
+ *     (1..4).collect { "cat"  }   #=> ["cat", "cat", "cat", "cat"]
+ *
+ */
+
+static VALUE
+enum_collect(VALUE obj)
+{
+    VALUE ary;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    ary = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, collect_i, ary);
+
+    return ary;
+}
+
+/*
+ *  call-seq:
+ *     enum.to_a      =>    array
+ *     enum.entries   =>    array
+ *
+ *  Returns an array containing the items in enum.
+ *
+ *     (1..7).to_a                       #=> [1, 2, 3, 4, 5, 6, 7]
+ *     { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a   #=> [["a", 1], ["b", 2], ["c", 3]]
+ */
+static VALUE
+enum_to_a(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE ary = rb_ary_new();
+
+    rb_block_call(obj, id_each, argc, argv, collect_all, ary);
+
+    return ary;
+}
+
+static VALUE
+inject_i(VALUE i, VALUE p, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE *)p;
+
+    ENUM_WANT_SVALUE();
+
+    if (memo[0] == Qundef) {
+	memo[0] = i;
+    }
+    else {
+	memo[0] = rb_yield_values(2, memo[0], i);
+    }
+    return Qnil;
+}
+
+static VALUE
+inject_op_i(VALUE i, VALUE p, int argc, VALUE *argv)
+{
+    VALUE *memo = (VALUE *)p;
+
+    ENUM_WANT_SVALUE();
+
+    if (memo[0] == Qundef) {
+	memo[0] = i;
+    }
+    else {
+	memo[0] = rb_funcall(memo[0], (ID)memo[1], 1, i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.inject(initial, sym) => obj
+ *     enum.inject(sym)          => obj
+ *     enum.inject(initial) {| memo, obj | block }  => obj
+ *     enum.inject          {| memo, obj | block }  => obj
+ *
+ *     enum.reduce(initial, sym) => obj
+ *     enum.reduce(sym)          => obj
+ *     enum.reduce(initial) {| memo, obj | block }  => obj
+ *     enum.reduce          {| memo, obj | block }  => obj
+ *
+ *  Combines all elements of enum by applying a binary
+ *  operation, specified by a block or a symbol that names a
+ *  method or operator.
+ *
+ *  If you specify a block, then for each element in enum
+ *  the block is passed an accumulator value (memo) and the element.
+ *  If you specify a symbol instead, then each element in the collection
+ *  will be passed to the named method of memo.
+ *  In either case, the result becomes the new value for memo.
+ *  At the end of the iteration, the final value of memo is the
+ *  return value fo the method.
+ *
+ *  If you do not explicitly specify an initial value for memo,
+ *  then uses the first element of collection is used as the initial value
+ *  of memo.
+ *
+ *  Examples:
+ *
+ *     # Sum some numbers
+ *     (5..10).reduce(:+)                            #=> 45
+ *     # Same using a block and inject
+ *     (5..10).inject {|sum, n| sum + n }            #=> 45
+ *     # Multiply some numbers
+ *     (5..10).reduce(1, :*)                         #=> 151200
+ *     # Same using a block
+ *     (5..10).inject(1) {|product, n| product * n } #=> 151200
+ *     # find the longest word
+ *     longest = %w{ cat sheep bear }.inject do |memo,word|
+ *        memo.length > word.length ? memo : word
+ *     end
+ *     longest                                       #=> "sheep"
+ *
+ */
+static VALUE
+enum_inject(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE memo[2];
+    VALUE (*iter)(VALUE, VALUE, int, VALUE*) = inject_i;
+
+    switch (rb_scan_args(argc, argv, "02", &memo[0], &memo[1])) {
+      case 0:
+	memo[0] = Qundef;
+	break;
+      case 1:
+	if (rb_block_given_p()) {
+	    break;
+	}
+	memo[1] = (VALUE)rb_to_id(memo[0]);
+	memo[0] = Qundef;
+	iter = inject_op_i;
+	break;
+      case 2:
+	if (rb_block_given_p()) {
+	    rb_warning("given block not used");
+	}
+	memo[1] = (VALUE)rb_to_id(memo[1]);
+	iter = inject_op_i;
+	break;
+    }
+    rb_block_call(obj, id_each, 0, 0, iter, (VALUE)memo);
+    if (memo[0] == Qundef) return Qnil;
+    return memo[0];
+}
+
+static VALUE
+partition_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (RTEST(rb_yield(i))) {
+	rb_ary_push(ary[0], i);
+    }
+    else {
+	rb_ary_push(ary[1], i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.partition {| obj | block }  => [ true_array, false_array ]
+ *
+ *  Returns two arrays, the first containing the elements of
+ *  enum for which the block evaluates to true, the second
+ *  containing the rest.
+ *
+ *     (1..6).partition {|i| (i&1).zero?}   #=> [[2, 4, 6], [1, 3, 5]]
+ *
+ */
+
+static VALUE
+enum_partition(VALUE obj)
+{
+    VALUE ary[2];
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    ary[0] = rb_ary_new();
+    ary[1] = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, partition_i, (VALUE)ary);
+
+    return rb_assoc_new(ary[0], ary[1]);
+}
+
+static VALUE
+group_by_i(VALUE i, VALUE hash, int argc, VALUE *argv)
+{
+    VALUE group;
+    VALUE values;
+
+    ENUM_WANT_SVALUE();
+
+    group = rb_yield(i);
+    values = rb_hash_aref(hash, group);
+    if (NIL_P(values)) {
+	values = rb_ary_new3(1, i);
+	rb_hash_aset(hash, group, values);
+    }
+    else {
+	rb_ary_push(values, i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.group_by {| obj | block }  => a_hash
+ *
+ *  Returns a hash, which keys are evaluated result from the
+ *  block, and values are arrays of elements in enum
+ *  corresponding to the key.
+ *
+ *     (1..6).group_by {|i| i%3}   #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
+ *
+ */
+
+static VALUE
+enum_group_by(VALUE obj)
+{
+    VALUE hash;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    hash = rb_hash_new();
+    rb_block_call(obj, id_each, 0, 0, group_by_i, hash);
+
+    return hash;
+}
+
+static VALUE
+first_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (NIL_P(ary[0])) {
+	ary[1] = i;
+	rb_iter_break();
+    }
+    else {
+	long n = NUM2LONG(ary[0]);
+
+	if (n <= 0) {
+	    rb_iter_break();
+	}
+	rb_ary_push(ary[1], i);
+	n--;
+	ary[0] = INT2NUM(n);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.first      -> obj or nil
+ *     enum.first(n)   -> an_array
+ *
+ *  Returns the first element, or the first +n+ elements, of the enumerable.
+ *  If the enumerable is empty, the first form returns nil, and the
+ *  second form returns an empty array.
+ *
+ */
+
+static VALUE
+enum_first(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE n, ary[2];
+
+    if (argc == 0) {
+	ary[0] = ary[1] = Qnil;
+    }
+    else {
+	rb_scan_args(argc, argv, "01", &n);
+	ary[0] = n;
+	ary[1] = rb_ary_new2(NUM2LONG(n));
+    }
+    rb_block_call(obj, id_each, 0, 0, first_i, (VALUE)ary);
+
+    return ary[1];
+}
+
+
+/*
+ *  call-seq:
+ *     enum.sort                     => array
+ *     enum.sort {| a, b | block }   => array
+ *
+ *  Returns an array containing the items in enum sorted,
+ *  either according to their own <=> method, or by using
+ *  the results of the supplied block. The block should return -1, 0, or
+ *  +1 depending on the comparison between a and b. As of
+ *  Ruby 1.8, the method Enumerable#sort_by implements a
+ *  built-in Schwartzian Transform, useful when key computation or
+ *  comparison is expensive..
+ *
+ *     %w(rhea kea flea).sort         #=> ["flea", "kea", "rhea"]
+ *     (1..10).sort {|a,b| b <=> a}   #=> [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
+ */
+
+static VALUE
+enum_sort(VALUE obj)
+{
+    return rb_ary_sort(enum_to_a(0, 0, obj));
+}
+
+static VALUE
+sort_by_i(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    NODE *memo;
+
+    ENUM_WANT_SVALUE();
+
+    if (RBASIC(ary)->klass) {
+	rb_raise(rb_eRuntimeError, "sort_by reentered");
+    }
+    /* use NODE_DOT2 as memo(v, v, -) */
+    memo = rb_node_newnode(NODE_DOT2, rb_yield(i), i, 0);
+    rb_ary_push(ary, (VALUE)memo);
+    return Qnil;
+}
+
+static int
+sort_by_cmp(const void *ap, const void *bp, void *data)
+{
+    VALUE a = (*(NODE *const *)ap)->u1.value;
+    VALUE b = (*(NODE *const *)bp)->u1.value;
+    VALUE ary = (VALUE)data;
+
+    if (RBASIC(ary)->klass) {
+	rb_raise(rb_eRuntimeError, "sort_by reentered");
+    }
+    return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
+}
+
+/*
+ *  call-seq:
+ *     enum.sort_by {| obj | block }    => array
+ *
+ *  Sorts enum using a set of keys generated by mapping the
+ *  values in enum through the given block.
+ *
+ *     %w{ apple pear fig }.sort_by {|word| word.length}
+ *                   #=> ["fig", "pear", "apple"]
+ *
+ *  The current implementation of sort_by generates an
+ *  array of tuples containing the original collection element and the
+ *  mapped value. This makes sort_by fairly expensive when
+ *  the keysets are simple
+ *
+ *     require 'benchmark'
+ *     include Benchmark
+ *
+ *     a = (1..100000).map {rand(100000)}
+ *
+ *     bm(10) do |b|
+ *       b.report("Sort")    { a.sort }
+ *       b.report("Sort by") { a.sort_by {|a| a} }
+ *     end
+ *
+ *  produces:
+ *
+ *     user     system      total        real
+ *     Sort        0.180000   0.000000   0.180000 (  0.175469)
+ *     Sort by     1.980000   0.040000   2.020000 (  2.013586)
+ *
+ *  However, consider the case where comparing the keys is a non-trivial
+ *  operation. The following code sorts some files on modification time
+ *  using the basic sort method.
+ *
+ *     files = Dir["*"]
+ *     sorted = files.sort {|a,b| File.new(a).mtime <=> File.new(b).mtime}
+ *     sorted   #=> ["mon", "tues", "wed", "thurs"]
+ *
+ *  This sort is inefficient: it generates two new File
+ *  objects during every comparison. A slightly better technique is to
+ *  use the Kernel#test method to generate the modification
+ *  times directly.
+ *
+ *     files = Dir["*"]
+ *     sorted = files.sort { |a,b|
+ *       test(?M, a) <=> test(?M, b)
+ *     }
+ *     sorted   #=> ["mon", "tues", "wed", "thurs"]
+ *
+ *  This still generates many unnecessary Time objects. A
+ *  more efficient technique is to cache the sort keys (modification
+ *  times in this case) before the sort. Perl users often call this
+ *  approach a Schwartzian Transform, after Randal Schwartz. We
+ *  construct a temporary array, where each element is an array
+ *  containing our sort key along with the filename. We sort this array,
+ *  and then extract the filename from the result.
+ *
+ *     sorted = Dir["*"].collect { |f|
+ *        [test(?M, f), f]
+ *     }.sort.collect { |f| f[1] }
+ *     sorted   #=> ["mon", "tues", "wed", "thurs"]
+ *
+ *  This is exactly what sort_by does internally.
+ *
+ *     sorted = Dir["*"].sort_by {|f| test(?M, f)}
+ *     sorted   #=> ["mon", "tues", "wed", "thurs"]
+ */
+
+static VALUE
+enum_sort_by(VALUE obj)
+{
+    VALUE ary;
+    long i;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    if (TYPE(obj) == T_ARRAY) {
+	ary  = rb_ary_new2(RARRAY_LEN(obj));
+    }
+    else {
+	ary = rb_ary_new();
+    }
+    RBASIC(ary)->klass = 0;
+    rb_block_call(obj, id_each, 0, 0, sort_by_i, ary);
+    if (RARRAY_LEN(ary) > 1) {
+	ruby_qsort(RARRAY_PTR(ary), RARRAY_LEN(ary), sizeof(VALUE),
+		   sort_by_cmp, (void *)ary);
+    }
+    if (RBASIC(ary)->klass) {
+	rb_raise(rb_eRuntimeError, "sort_by reentered");
+    }
+    for (i=0; iu2.value;
+    }
+    RBASIC(ary)->klass = rb_cArray;
+    return ary;
+}
+
+#define DEFINE_ENUMFUNCS(name) \
+static VALUE \
+name##_i(VALUE i, VALUE *memo, int argc, VALUE *argv) \
+{ \
+    return enum_##name##_func(enum_values_pack(argc, argv), memo); \
+} \
+\
+static VALUE \
+name##_iter_i(VALUE i, VALUE *memo, int argc, VALUE *argv) \
+{ \
+    return enum_##name##_func(enum_yield(argc, argv), memo); \
+}
+    
+static VALUE
+enum_all_func(VALUE result, VALUE *memo)
+{
+    if (!RTEST(result)) {
+	*memo = Qfalse;
+	rb_iter_break();
+    }
+    return Qnil;
+}
+
+DEFINE_ENUMFUNCS(all)
+
+/*
+ *  call-seq:
+ *     enum.all? [{|obj| block } ]   => true or false
+ *
+ *  Passes each element of the collection to the given block. The method
+ *  returns true if the block never returns
+ *  false or nil. If the block is not given,
+ *  Ruby adds an implicit block of {|obj| obj} (that is
+ *  all? will return true only if none of the
+ *  collection members are false or nil.)
+ *
+ *     %w{ant bear cat}.all? {|word| word.length >= 3}   #=> true
+ *     %w{ant bear cat}.all? {|word| word.length >= 4}   #=> false
+ *     [ nil, true, 99 ].all?                            #=> false
+ *
+ */
+
+static VALUE
+enum_all(VALUE obj)
+{
+    VALUE result = Qtrue;
+
+    rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
+    return result;
+}
+
+static VALUE
+enum_any_func(VALUE result, VALUE *memo)
+{
+    if (RTEST(result)) {
+	*memo = Qtrue;
+	rb_iter_break();
+    }
+    return Qnil;
+}
+
+DEFINE_ENUMFUNCS(any)
+
+/*
+ *  call-seq:
+ *     enum.any? [{|obj| block } ]   => true or false
+ *
+ *  Passes each element of the collection to the given block. The method
+ *  returns true if the block ever returns a value other
+ *  than false or nil. If the block is not
+ *  given, Ruby adds an implicit block of {|obj| obj} (that
+ *  is any? will return true if at least one
+ *  of the collection members is not false or
+ *  nil.
+ *
+ *     %w{ant bear cat}.any? {|word| word.length >= 3}   #=> true
+ *     %w{ant bear cat}.any? {|word| word.length >= 4}   #=> true
+ *     [ nil, true, 99 ].any?                            #=> true
+ *
+ */
+
+static VALUE
+enum_any(VALUE obj)
+{
+    VALUE result = Qfalse;
+
+    rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
+    return result;
+}
+
+static VALUE
+enum_one_func(VALUE result, VALUE *memo)
+{
+    if (RTEST(result)) {
+	if (*memo == Qundef) {
+	    *memo = Qtrue;
+	}
+	else if (*memo == Qtrue) {
+	    *memo = Qfalse;
+	    rb_iter_break();
+	}
+    }
+    return Qnil;
+}
+
+DEFINE_ENUMFUNCS(one)
+
+/*
+ *  call-seq:
+ *     enum.one? [{|obj| block }]   => true or false
+ *
+ *  Passes each element of the collection to the given block. The method
+ *  returns true if the block returns true
+ *  exactly once. If the block is not given, one? will return
+ *  true only if exactly one of the collection members is
+ *  true.
+ *
+ *     %w{ant bear cat}.one? {|word| word.length == 4}   #=> true
+ *     %w{ant bear cat}.one? {|word| word.length > 4}    #=> false
+ *     %w{ant bear cat}.one? {|word| word.length < 4}    #=> false
+ *     [ nil, true, 99 ].one?                            #=> false
+ *     [ nil, true, false ].one?                         #=> true
+ *
+ */
+
+static VALUE
+enum_one(VALUE obj)
+{
+    VALUE result = Qundef;
+
+    rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
+    if (result == Qundef) return Qfalse;
+    return result;
+}
+
+static VALUE
+enum_none_func(VALUE result, VALUE *memo)
+{
+    if (RTEST(result)) {
+	*memo = Qfalse;
+	rb_iter_break();
+    }
+    return Qnil;
+}
+
+DEFINE_ENUMFUNCS(none)
+
+/*
+ *  call-seq:
+ *     enum.none? [{|obj| block }]   => true or false
+ *
+ *  Passes each element of the collection to the given block. The method
+ *  returns true if the block never returns true
+ *  for all elements. If the block is not given, none? will return
+ *  true only if none of the collection members is true.
+ *
+ *     %w{ant bear cat}.none? {|word| word.length == 5}  #=> true
+ *     %w{ant bear cat}.none? {|word| word.length >= 4}  #=> false
+ *     [].none?                                          #=> true
+ *     [nil].none?                                       #=> true
+ *     [nil,false].none?                                 #=> true
+ */
+static VALUE
+enum_none(VALUE obj)
+{
+    VALUE result = Qtrue;
+
+    rb_block_call(obj, id_each, 0, 0, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
+    return result;
+}
+
+static VALUE
+min_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE cmp;
+
+    ENUM_WANT_SVALUE();
+
+    if (*memo == Qundef) {
+	*memo = i;
+    }
+    else {
+	cmp = rb_funcall(i, id_cmp, 1, *memo);
+	if (rb_cmpint(cmp, i, *memo) < 0) {
+	    *memo = i;
+	}
+    }
+    return Qnil;
+}
+
+static VALUE
+min_ii(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE cmp;
+
+    ENUM_WANT_SVALUE();
+
+    if (*memo == Qundef) {
+	*memo = i;
+    }
+    else {
+	VALUE ary = memo[1];
+	RARRAY_PTR(ary)[0] = i;
+	RARRAY_PTR(ary)[1] = *memo;
+	cmp = rb_yield(ary);
+	if (rb_cmpint(cmp, i, *memo) < 0) {
+	    *memo = i;
+	}
+    }
+    return Qnil;
+}
+
+
+/*
+ *  call-seq:
+ *     enum.min                    => obj
+ *     enum.min {| a,b | block }   => obj
+ *
+ *  Returns the object in enum with the minimum value. The
+ *  first form assumes all objects implement Comparable;
+ *  the second uses the block to return a <=> b.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.min                                  #=> "albatross"
+ *     a.min {|a,b| a.length <=> b.length }   #=> "dog"
+ */
+
+static VALUE
+enum_min(VALUE obj)
+{
+    VALUE result[2];
+
+    result[0] = Qundef;
+    if (rb_block_given_p()) {
+	result[1] = rb_ary_new3(2, Qnil, Qnil);
+	rb_block_call(obj, id_each, 0, 0, min_ii, (VALUE)result);
+    }
+    else {
+	rb_block_call(obj, id_each, 0, 0, min_i, (VALUE)result);
+    }
+    if (result[0] == Qundef) return Qnil;
+    return result[0];
+}
+
+static VALUE
+max_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE cmp;
+
+    ENUM_WANT_SVALUE();
+
+    if (*memo == Qundef) {
+	*memo = i;
+    }
+    else {
+	cmp = rb_funcall(i, id_cmp, 1, *memo);
+	if (rb_cmpint(cmp, i, *memo) > 0) {
+	    *memo = i;
+	}
+    }
+    return Qnil;
+}
+
+static VALUE
+max_ii(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE cmp;
+
+    ENUM_WANT_SVALUE();
+
+    if (*memo == Qundef) {
+	*memo = i;
+    }
+    else {
+	VALUE ary = memo[1];
+	RARRAY_PTR(ary)[0] = i;
+	RARRAY_PTR(ary)[1] = *memo;
+	cmp = rb_yield(ary);
+	if (rb_cmpint(cmp, i, *memo) > 0) {
+	    *memo = i;
+	}
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.max                   => obj
+ *     enum.max {|a,b| block }    => obj
+ *
+ *  Returns the object in _enum_ with the maximum value. The
+ *  first form assumes all objects implement Comparable;
+ *  the second uses the block to return a <=> b.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.max                                  #=> "horse"
+ *     a.max {|a,b| a.length <=> b.length }   #=> "albatross"
+ */
+
+static VALUE
+enum_max(VALUE obj)
+{
+    VALUE result[2];
+
+    result[0] = Qundef;
+    if (rb_block_given_p()) {
+	result[1] = rb_ary_new3(2, Qnil, Qnil);
+	rb_block_call(obj, id_each, 0, 0, max_ii, (VALUE)result);
+    }
+    else {
+	rb_block_call(obj, id_each, 0, 0, max_i, (VALUE)result);
+    }
+    if (result[0] == Qundef) return Qnil;
+    return result[0];
+}
+
+static VALUE
+minmax_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    int n;
+
+    ENUM_WANT_SVALUE();
+
+    if (memo[0] == Qundef) {
+	memo[0] = i;
+	memo[1] = i;
+    }
+    else {
+	n = rb_cmpint(rb_funcall(i, id_cmp, 1, memo[0]), i, memo[0]);
+	if (n < 0) {
+	    memo[0] = i;
+	}
+	n = rb_cmpint(rb_funcall(i, id_cmp, 1, memo[1]), i, memo[1]);
+	if (n > 0) {
+	    memo[1] = i;
+	}
+    }
+    return Qnil;
+}
+
+static VALUE
+minmax_ii(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    int n;
+
+    ENUM_WANT_SVALUE();
+
+    if (memo[0] == Qundef) {
+	memo[0] = i;
+	memo[1] = i;
+    }
+    else {
+	VALUE ary = memo[2];
+
+	RARRAY_PTR(ary)[0] = i;
+	RARRAY_PTR(ary)[1] = memo[0];
+	n = rb_cmpint(rb_yield(ary), i, memo[0]);
+	if (n < 0) {
+	    memo[0] = i;
+	}
+	RARRAY_PTR(ary)[0] = i;
+	RARRAY_PTR(ary)[1] = memo[1];
+	n = rb_cmpint(rb_yield(ary), i, memo[1]);
+	if (n > 0) {
+	    memo[1] = i;
+	}
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.minmax                   => [min,max]
+ *     enum.minmax {|a,b| block }    => [min,max]
+ *
+ *  Returns two elements array which contains the minimum and the
+ *  maximum value in the enumerable.  The first form assumes all
+ *  objects implement Comparable; the second uses the
+ *  block to return a <=> b.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.minmax                                  #=> ["albatross", "horse"]
+ *     a.minmax {|a,b| a.length <=> b.length }   #=> ["dog", "albatross"]
+ */
+
+static VALUE
+enum_minmax(VALUE obj)
+{
+    VALUE result[3];
+    VALUE ary = rb_ary_new3(2, Qnil, Qnil);
+
+    result[0] = Qundef;
+    if (rb_block_given_p()) {
+	result[2] = ary;
+	rb_block_call(obj, id_each, 0, 0, minmax_ii, (VALUE)result);
+    }
+    else {
+	rb_block_call(obj, id_each, 0, 0, minmax_i, (VALUE)result);
+    }
+    if (result[0] != Qundef) {
+        RARRAY_PTR(ary)[0] = result[0];
+        RARRAY_PTR(ary)[1] = result[1];
+    }
+    return ary;
+}
+
+static VALUE
+min_by_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE v;
+
+    ENUM_WANT_SVALUE();
+
+    v = rb_yield(i);
+    if (memo[0] == Qundef) {
+	memo[0] = v;
+	memo[1] = i;
+    }
+    else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) < 0) {
+	memo[0] = v;
+	memo[1] = i;
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.min_by {| obj| block }   => obj
+ *
+ *  Returns the object in enum that gives the minimum
+ *  value from the given block.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.min_by {|x| x.length }   #=> "dog"
+ */
+
+static VALUE
+enum_min_by(VALUE obj)
+{
+    VALUE memo[2];
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    memo[0] = Qundef;
+    memo[1] = Qnil;
+    rb_block_call(obj, id_each, 0, 0, min_by_i, (VALUE)memo);
+    return memo[1];
+}
+
+static VALUE
+max_by_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE v;
+
+    ENUM_WANT_SVALUE();
+
+    v = rb_yield(i);
+    if (memo[0] == Qundef) {
+	memo[0] = v;
+	memo[1] = i;
+    }
+    else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) > 0) {
+	memo[0] = v;
+	memo[1] = i;
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.max_by {| obj| block }   => obj
+ *
+ *  Returns the object in enum that gives the maximum
+ *  value from the given block.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.max_by {|x| x.length }   #=> "albatross"
+ */
+
+static VALUE
+enum_max_by(VALUE obj)
+{
+    VALUE memo[2];
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    memo[0] = Qundef;
+    memo[1] = Qnil;
+    rb_block_call(obj, id_each, 0, 0, max_by_i, (VALUE)memo);
+    return memo[1];
+}
+
+static VALUE
+minmax_by_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+    VALUE v;
+
+    ENUM_WANT_SVALUE();
+
+    v = rb_yield(i);
+    if (memo[0] == Qundef) {
+	memo[0] = v;
+	memo[1] = v;
+	memo[2] = i;
+	memo[3] = i;
+    }
+    else {
+	if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) < 0) {
+	    memo[0] = v;
+	    memo[2] = i;
+	}
+	if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[1]), v, memo[1]) > 0) {
+	    memo[1] = v;
+	    memo[3] = i;
+	}
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.minmax_by {| obj| block }   => [min, max]
+ *
+ *  Returns two elements array array containing the objects in
+ *  enum that gives the minimum and maximum values respectively
+ *  from the given block.
+ *
+ *     a = %w(albatross dog horse)
+ *     a.minmax_by {|x| x.length }   #=> ["dog", "albatross"]
+ */
+
+static VALUE
+enum_minmax_by(VALUE obj)
+{
+    VALUE memo[4];
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+
+    memo[0] = Qundef;
+    memo[1] = Qundef;
+    memo[2] = Qnil;
+    memo[3] = Qnil;
+    rb_block_call(obj, id_each, 0, 0, minmax_by_i, (VALUE)memo);
+    return rb_assoc_new(memo[2], memo[3]);
+}
+
+static VALUE
+member_i(VALUE iter, VALUE *memo, int argc, VALUE *argv)
+{
+    if (rb_equal(enum_values_pack(argc, argv), memo[0])) {
+	memo[1] = Qtrue;
+	rb_iter_break();
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.include?(obj)     => true or false
+ *     enum.member?(obj)      => true or false
+ *
+ *  Returns true if any member of enum equals
+ *  obj. Equality is tested using ==.
+ *
+ *     IO.constants.include? :SEEK_SET          #=> true
+ *     IO.constants.include? :SEEK_NO_FURTHER   #=> false
+ *
+ */
+
+static VALUE
+enum_member(VALUE obj, VALUE val)
+{
+    VALUE memo[2];
+
+    memo[0] = val;
+    memo[1] = Qfalse;
+    rb_block_call(obj, id_each, 0, 0, member_i, (VALUE)memo);
+    return memo[1];
+}
+
+static VALUE
+each_with_index_i(VALUE i, VALUE memo, int argc, VALUE *argv)
+{
+    long n = (*(VALUE *)memo)++;
+
+    return rb_yield_values(2, enum_values_pack(argc, argv), INT2NUM(n));
+}
+
+/*
+ *  call-seq:
+ *     enum.each_with_index {|obj, i| block }  -> enum
+ *
+ *  Calls block with two arguments, the item and its index,
+ *  for each item in enum.  Given arguments are passed through
+ *  to #each().
+ *
+ *     hash = Hash.new
+ *     %w(cat dog wombat).each_with_index {|item, index|
+ *       hash[item] = index
+ *     }
+ *     hash   #=> {"cat"=>0, "dog"=>1, "wombat"=>2}
+ *
+ */
+
+static VALUE
+enum_each_with_index(int argc, VALUE *argv, VALUE obj)
+{
+    long memo;
+
+    RETURN_ENUMERATOR(obj, argc, argv);
+
+    memo = 0;
+    rb_block_call(obj, id_each, argc, argv, each_with_index_i, (VALUE)&memo);
+    return obj;
+}
+
+
+/*
+ *  call-seq:
+ *     enum.reverse_each {|item| block } 
+ *  
+ *  Traverses enum in reverse order.
+ */
+
+static VALUE
+enum_reverse_each(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE ary;
+    long i;
+
+    RETURN_ENUMERATOR(obj, argc, argv);
+
+    ary = enum_to_a(argc, argv, obj);
+
+    for (i = RARRAY_LEN(ary); --i >= 0; ) {
+	rb_yield(RARRAY_PTR(ary)[i]);
+    }
+
+    return obj;
+}
+
+
+static VALUE
+zip_ary(VALUE val, NODE *memo, int argc, VALUE *argv)
+{
+    volatile VALUE result = memo->u1.value;
+    volatile VALUE args = memo->u2.value;
+    int n = memo->u3.cnt++;
+    volatile VALUE tmp;
+    int i;
+
+    tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
+    rb_ary_store(tmp, 0, enum_values_pack(argc, argv));
+    for (i=0; iu1.value;
+    volatile VALUE args = memo->u2.value;
+    volatile VALUE tmp;
+    int i;
+
+    tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
+    rb_ary_store(tmp, 0, enum_values_pack(argc, argv));
+    for (i=0; i enumerator
+ *     enum.zip(arg, ...) {|arr| block }    => nil
+ *
+ *  Takes one element from enum and merges corresponding
+ *  elements from each args.  This generates a sequence of
+ *  n-element arrays, where n is one more than the
+ *  count of arguments.  The length of the resulting sequence will be
+ *  enum#sizeenum#size, nil values are supplied. If
+ *  a block is given, it is invoked for each output array, otherwise
+ *  an array of arrays is returned.
+ *
+ *     a = [ 4, 5, 6 ]
+ *     b = [ 7, 8, 9 ]
+ *
+ *     [1,2,3].zip(a, b)      #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
+ *     [1,2].zip(a,b)         #=> [[1, 4, 7], [2, 5, 8]]
+ *     a.zip([1,2],[8])       #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]
+ *
+ */
+
+static VALUE
+enum_zip(int argc, VALUE *argv, VALUE obj)
+{
+    int i;
+    ID conv;
+    NODE *memo;
+    VALUE result = Qnil;
+    int allary = Qtrue;
+
+    for (i=0; i array
+ *
+ *  Returns first n elements from enum.
+ *
+ *     a = [1, 2, 3, 4, 5, 0]
+ *     a.take(3)             # => [1, 2, 3]
+ *
+ */
+
+static VALUE
+enum_take(VALUE obj, VALUE n)
+{
+    VALUE args[2];
+    long len = NUM2LONG(n);
+
+    if (len < 0) {
+	rb_raise(rb_eArgError, "attempt to take negative size");
+    }
+
+    if (len == 0) return rb_ary_new2(0);
+    args[0] = rb_ary_new();
+    args[1] = len;
+    rb_block_call(obj, id_each, 0, 0, take_i, (VALUE)args);
+    return args[0];
+}
+
+
+static VALUE
+take_while_i(VALUE i, VALUE *ary, int argc, VALUE *argv)
+{
+    if (!RTEST(enum_yield(argc, argv))) rb_iter_break();
+    rb_ary_push(*ary, enum_values_pack(argc, argv));
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.take_while {|arr| block }   => array
+ *
+ *  Passes elements to the block until the block returns nil or false,
+ *  then stops iterating and returns an array of all prior elements.
+ *
+ *     a = [1, 2, 3, 4, 5, 0]
+ *     a.take_while {|i| i < 3 }   # => [1, 2]
+ *
+ */
+
+static VALUE
+enum_take_while(VALUE obj)
+{
+    VALUE ary;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+    ary = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, take_while_i, (VALUE)&ary);
+    return ary;
+}
+
+static VALUE
+drop_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
+{
+    if (arg[1] == 0) {
+	rb_ary_push(arg[0], enum_values_pack(argc, argv));
+    }
+    else {
+	arg[1]--;
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.drop(n)               => array
+ *
+ *  Drops first n elements from enum, and returns rest elements
+ *  in an array.
+ *
+ *     a = [1, 2, 3, 4, 5, 0]
+ *     a.drop(3)             # => [4, 5, 0]
+ *
+ */
+
+static VALUE
+enum_drop(VALUE obj, VALUE n)
+{
+    VALUE args[2];
+    long len = NUM2LONG(n);
+
+    if (len < 0) {
+	rb_raise(rb_eArgError, "attempt to drop negative size");
+    }
+
+    args[1] = len;
+    args[0] = rb_ary_new();
+    rb_block_call(obj, id_each, 0, 0, drop_i, (VALUE)args);
+    return args[0];
+}
+
+
+static VALUE
+drop_while_i(VALUE i, VALUE *args, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    if (!args[1] && !RTEST(rb_yield(i))) {
+	args[1] = Qtrue;
+    }
+    if (args[1]) {
+	rb_ary_push(args[0], i);
+    }
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.drop_while {|arr| block }   => array
+ *
+ *  Drops elements up to, but not including, the first element for
+ *  which the block returns nil or false and returns an array
+ *  containing the remaining elements.
+ *
+ *     a = [1, 2, 3, 4, 5, 0]
+ *     a.drop_while {|i| i < 3 }   # => [3, 4, 5, 0]
+ *
+ */
+
+static VALUE
+enum_drop_while(VALUE obj)
+{
+    VALUE args[2];
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+    args[0] = rb_ary_new();
+    args[1] = Qfalse;
+    rb_block_call(obj, id_each, 0, 0, drop_while_i, (VALUE)args);
+    return args[0];
+}
+
+static VALUE
+cycle_i(VALUE i, VALUE ary, int argc, VALUE *argv)
+{
+    ENUM_WANT_SVALUE();
+
+    rb_ary_push(ary, i);
+    rb_yield(i);
+    return Qnil;
+}
+
+/*
+ *  call-seq:
+ *     enum.cycle {|obj| block }
+ *     enum.cycle(n) {|obj| block }
+ *
+ *  Calls block for each element of enum repeatedly _n_
+ *  times or forever if none or nil is given.  If a non-positive
+ *  number is given or the collection is empty, does nothing.  Returns
+ *  nil if the loop has finished without getting interrupted.
+ *
+ *  Enumerable#cycle saves elements in an internal array so changes
+ *  to enum after the first pass have no effect.
+ *
+ *     a = ["a", "b", "c"]
+ *     a.cycle {|x| puts x }  # print, a, b, c, a, b, c,.. forever.
+ *     a.cycle(2) {|x| puts x }  # print, a, b, c, a, b, c.
+ *
+ */
+
+static VALUE
+enum_cycle(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE ary;
+    VALUE nv = Qnil;
+    long n, i, len;
+
+    rb_scan_args(argc, argv, "01", &nv);
+
+    RETURN_ENUMERATOR(obj, argc, argv);
+    if (NIL_P(nv)) {
+        n = -1;
+    }
+    else {
+        n = NUM2LONG(nv);
+        if (n <= 0) return Qnil;
+    }
+    ary = rb_ary_new();
+    RBASIC(ary)->klass = 0;
+    rb_block_call(obj, id_each, 0, 0, cycle_i, ary);
+    len = RARRAY_LEN(ary);
+    if (len == 0) return Qnil;
+    while (n < 0 || 0 < --n) {
+        for (i=0; iEnumerable mixin provides collection classes with
+ *  several traversal and searching methods, and with the ability to
+ *  sort. The class must provide a method each, which
+ *  yields successive members of the collection. If
+ *  Enumerable#max, #min, or
+ *  #sort is used, the objects in the collection must also
+ *  implement a meaningful <=> operator, as these methods
+ *  rely on an ordering between members of the collection.
+ */
+
+void
+Init_Enumerable(void)
+{
+#undef rb_intern
+#define rb_intern(str) rb_intern_const(str)
+
+    rb_mEnumerable = rb_define_module("Enumerable");
+
+    rb_define_method(rb_mEnumerable, "to_a", enum_to_a, -1);
+    rb_define_method(rb_mEnumerable, "entries", enum_to_a, -1);
+
+    rb_define_method(rb_mEnumerable, "sort", enum_sort, 0);
+    rb_define_method(rb_mEnumerable, "sort_by", enum_sort_by, 0);
+    rb_define_method(rb_mEnumerable, "grep", enum_grep, 1);
+    rb_define_method(rb_mEnumerable, "count", enum_count, -1);
+    rb_define_method(rb_mEnumerable, "find", enum_find, -1);
+    rb_define_method(rb_mEnumerable, "detect", enum_find, -1);
+    rb_define_method(rb_mEnumerable, "find_index", enum_find_index, -1);
+    rb_define_method(rb_mEnumerable, "find_all", enum_find_all, 0);
+    rb_define_method(rb_mEnumerable, "select", enum_find_all, 0);
+    rb_define_method(rb_mEnumerable, "reject", enum_reject, 0);
+    rb_define_method(rb_mEnumerable, "collect", enum_collect, 0);
+    rb_define_method(rb_mEnumerable, "map", enum_collect, 0);
+    rb_define_method(rb_mEnumerable, "inject", enum_inject, -1);
+    rb_define_method(rb_mEnumerable, "reduce", enum_inject, -1);
+    rb_define_method(rb_mEnumerable, "partition", enum_partition, 0);
+    rb_define_method(rb_mEnumerable, "group_by", enum_group_by, 0);
+    rb_define_method(rb_mEnumerable, "first", enum_first, -1);
+    rb_define_method(rb_mEnumerable, "all?", enum_all, 0);
+    rb_define_method(rb_mEnumerable, "any?", enum_any, 0);
+    rb_define_method(rb_mEnumerable, "one?", enum_one, 0);
+    rb_define_method(rb_mEnumerable, "none?", enum_none, 0);
+    rb_define_method(rb_mEnumerable, "min", enum_min, 0);
+    rb_define_method(rb_mEnumerable, "max", enum_max, 0);
+    rb_define_method(rb_mEnumerable, "minmax", enum_minmax, 0);
+    rb_define_method(rb_mEnumerable, "min_by", enum_min_by, 0);
+    rb_define_method(rb_mEnumerable, "max_by", enum_max_by, 0);
+    rb_define_method(rb_mEnumerable, "minmax_by", enum_minmax_by, 0);
+    rb_define_method(rb_mEnumerable, "member?", enum_member, 1);
+    rb_define_method(rb_mEnumerable, "include?", enum_member, 1);
+    rb_define_method(rb_mEnumerable, "each_with_index", enum_each_with_index, -1);
+    rb_define_method(rb_mEnumerable, "reverse_each", enum_reverse_each, -1);
+    rb_define_method(rb_mEnumerable, "zip", enum_zip, -1);
+    rb_define_method(rb_mEnumerable, "take", enum_take, 1);
+    rb_define_method(rb_mEnumerable, "take_while", enum_take_while, 0);
+    rb_define_method(rb_mEnumerable, "drop", enum_drop, 1);
+    rb_define_method(rb_mEnumerable, "drop_while", enum_drop_while, 0);
+    rb_define_method(rb_mEnumerable, "cycle", enum_cycle, -1);
+
+    id_eqq  = rb_intern("===");
+    id_each = rb_intern("each");
+    id_cmp  = rb_intern("<=>");
+    id_next = rb_intern("next");
+    id_size = rb_intern("size");
+}
+
diff --git a/lib/ruby-1.9.1-rc1/enumerator.c b/lib/ruby-1.9.1-rc1/enumerator.c
new file mode 100644
index 0000000..a25ee28
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/enumerator.c
@@ -0,0 +1,810 @@
+/************************************************
+
+  enumerator.c - provides Enumerator class
+
+  $Author: yugui $
+
+  Copyright (C) 2001-2003 Akinori MUSHA
+
+  $Idaemons: /home/cvs/rb/enumerator/enumerator.c,v 1.1.1.1 2001/07/15 10:12:48 knu Exp $
+  $RoughId: enumerator.c,v 1.6 2003/07/27 11:03:24 nobu Exp $
+  $Id: enumerator.c 20712 2008-12-13 01:59:42Z yugui $
+
+************************************************/
+
+#include "ruby/ruby.h"
+
+/*
+ * Document-class: Enumerator
+ *
+ * A class which provides a method `each' to be used as an Enumerable
+ * object.
+ */
+VALUE rb_cEnumerator;
+static VALUE sym_each;
+static ID id_rewind;
+
+VALUE rb_eStopIteration;
+
+struct enumerator {
+    VALUE obj;
+    ID    meth;
+    VALUE args;
+    VALUE fib;
+    VALUE dst;
+    VALUE no_next;
+};
+
+static VALUE rb_cGenerator, rb_cYielder;
+
+struct generator {
+    VALUE proc;
+};
+
+struct yielder {
+    VALUE proc;
+};
+
+static VALUE generator_allocate(VALUE klass);
+static VALUE generator_init(VALUE obj, VALUE proc);
+
+/*
+ * Enumerator
+ */
+static void
+enumerator_mark(void *p)
+{
+    struct enumerator *ptr = p;
+    rb_gc_mark(ptr->obj);
+    rb_gc_mark(ptr->args);
+    rb_gc_mark(ptr->fib);
+    rb_gc_mark(ptr->dst);
+}
+
+static struct enumerator *
+enumerator_ptr(VALUE obj)
+{
+    struct enumerator *ptr;
+
+    Data_Get_Struct(obj, struct enumerator, ptr);
+    if (RDATA(obj)->dmark != enumerator_mark) {
+	rb_raise(rb_eTypeError,
+		 "wrong argument type %s (expected %s)",
+		 rb_obj_classname(obj), rb_class2name(rb_cEnumerator));
+    }
+    if (!ptr || ptr->obj == Qundef) {
+	rb_raise(rb_eArgError, "uninitialized enumerator");
+    }
+    return ptr;
+}
+
+/*
+ *  call-seq:
+ *    obj.to_enum(method = :each, *args)
+ *    obj.enum_for(method = :each, *args)
+ *
+ *  Returns Enumerator.new(self, method, *args).
+ *
+ *  e.g.:
+ *
+ *     str = "xyz"
+ *
+ *     enum = str.enum_for(:each_byte)
+ *     a = enum.map {|b| '%02x' % b } #=> ["78", "79", "7a"]
+ *
+ *     # protects an array from being modified
+ *     a = [1, 2, 3]
+ *     some_method(a.to_enum)
+ *
+ */
+static VALUE
+obj_to_enum(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE meth = sym_each;
+
+    if (argc > 0) {
+	--argc;
+	meth = *argv++;
+    }
+    return rb_enumeratorize(obj, meth, argc, argv);
+}
+
+static VALUE
+each_slice_i(VALUE val, VALUE *memo)
+{
+    VALUE ary = memo[0];
+    VALUE v = Qnil;
+    long size = (long)memo[1];
+
+    rb_ary_push(ary, val);
+
+    if (RARRAY_LEN(ary) == size) {
+	v = rb_yield(ary);
+	memo[0] = rb_ary_new2(size);
+    }
+
+    return v;
+}
+
+/*
+ *  call-seq:
+ *    e.each_slice(n) {...}
+ *    e.each_slice(n)
+ *
+ *  Iterates the given block for each slice of  elements.  If no
+ *  block is given, returns an enumerator.
+ *
+ *  e.g.:
+ *      (1..10).each_slice(3) {|a| p a}
+ *      # outputs below
+ *      [1, 2, 3]
+ *      [4, 5, 6]
+ *      [7, 8, 9]
+ *      [10]
+ *
+ */
+static VALUE
+enum_each_slice(VALUE obj, VALUE n)
+{
+    long size = NUM2LONG(n);
+    VALUE args[2], ary;
+
+    if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");
+    RETURN_ENUMERATOR(obj, 1, &n);
+    args[0] = rb_ary_new2(size);
+    args[1] = (VALUE)size;
+
+    rb_block_call(obj, SYM2ID(sym_each), 0, 0, each_slice_i, (VALUE)args);
+
+    ary = args[0];
+    if (RARRAY_LEN(ary) > 0) rb_yield(ary);
+
+    return Qnil;
+}
+
+static VALUE
+each_cons_i(VALUE val, VALUE *memo)
+{
+    VALUE ary = memo[0];
+    VALUE v = Qnil;
+    long size = (long)memo[1];
+
+    if (RARRAY_LEN(ary) == size) {
+	rb_ary_shift(ary);
+    }
+    rb_ary_push(ary, val);
+    if (RARRAY_LEN(ary) == size) {
+	v = rb_yield(rb_ary_dup(ary));
+    }
+    return v;
+}
+
+/*
+ *  call-seq:
+ *    each_cons(n) {...}
+ *    each_cons(n)
+ *
+ *  Iterates the given block for each array of consecutive 
+ *  elements.  If no block is given, returns an enumerator.
+ *
+ *  e.g.:
+ *      (1..10).each_cons(3) {|a| p a}
+ *      # outputs below
+ *      [1, 2, 3]
+ *      [2, 3, 4]
+ *      [3, 4, 5]
+ *      [4, 5, 6]
+ *      [5, 6, 7]
+ *      [6, 7, 8]
+ *      [7, 8, 9]
+ *      [8, 9, 10]
+ *
+ */
+static VALUE
+enum_each_cons(VALUE obj, VALUE n)
+{
+    long size = NUM2LONG(n);
+    VALUE args[2];
+
+    if (size <= 0) rb_raise(rb_eArgError, "invalid size");
+    RETURN_ENUMERATOR(obj, 1, &n);
+    args[0] = rb_ary_new2(size);
+    args[1] = (VALUE)size;
+
+    rb_block_call(obj, SYM2ID(sym_each), 0, 0, each_cons_i, (VALUE)args);
+
+    return Qnil;
+}
+
+static VALUE
+each_with_object_i(VALUE val, VALUE memo)
+{
+    return rb_yield_values(2, val, memo);
+}
+
+/*
+ *  call-seq:
+ *    each_with_object(obj) {|(*args), memo_obj| ... }
+ *    each_with_object(obj)
+ *
+ *  Iterates the given block for each element with an arbitrary
+ *  object given, and returns the initially given object.
+
+ *  If no block is given, returns an enumerator.
+ *
+ *  e.g.:
+ *      evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
+ *      # => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
+ *
+ */
+static VALUE
+enum_each_with_object(VALUE obj, VALUE memo)
+{
+    RETURN_ENUMERATOR(obj, 1, &memo);
+
+    rb_block_call(obj, SYM2ID(sym_each), 0, 0, each_with_object_i, memo);
+
+    return memo;
+}
+
+static VALUE
+enumerator_allocate(VALUE klass)
+{
+    struct enumerator *ptr;
+    VALUE enum_obj;
+
+    enum_obj = Data_Make_Struct(klass, struct enumerator, enumerator_mark, -1, ptr);
+    ptr->obj = Qundef;
+
+    return enum_obj;
+}
+
+static VALUE
+enumerator_each_i(VALUE v, VALUE enum_obj, int argc, VALUE *argv)
+{
+    return rb_yield_values2(argc, argv);
+}
+
+static VALUE
+enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
+{
+    struct enumerator *ptr;
+
+    Data_Get_Struct(enum_obj, struct enumerator, ptr);
+
+    if (!ptr) {
+	rb_raise(rb_eArgError, "unallocated enumerator");
+    }
+
+    ptr->obj  = obj;
+    ptr->meth = rb_to_id(meth);
+    if (argc) ptr->args = rb_ary_new4(argc, argv);
+    ptr->fib = 0;
+    ptr->dst = Qnil;
+    ptr->no_next = Qfalse;
+
+    return enum_obj;
+}
+
+/*
+ *  call-seq:
+ *    Enumerator.new(obj, method = :each, *args)
+ *    Enumerator.new { |y| ... }
+ *
+ *  Creates a new Enumerator object, which is to be used as an
+ *  Enumerable object iterating in a given way.
+ *
+ *  In the first form, a generated Enumerator iterates over the given
+ *  object using the given method with the given arguments passed.
+ *  Use of this form is discouraged.  Use Kernel#enum_for(), alias
+ *  to_enum, instead.
+ *
+ *    e = Enumerator.new(ObjectSpace, :each_object)
+ *        #-> ObjectSpace.enum_for(:each_object)
+ *
+ *    e.select { |obj| obj.is_a?(Class) }  #=> array of all classes
+ *
+ *  In the second form, iteration is defined by the given block, in
+ *  which a "yielder" object given as block parameter can be used to
+ *  yield a value by calling the +yield+ method, alias +<<+.
+ *
+ *    fib = Enumerator.new { |y|
+ *      a = b = 1
+ *      loop {
+ *        y << a
+ *        a, b = b, a + b
+ *      }
+ *    }
+ *
+ *    p fib.take(10) #=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
+ */
+static VALUE
+enumerator_initialize(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE recv, meth = sym_each;
+
+    if (argc == 0) {
+	if (!rb_block_given_p())
+	    rb_raise(rb_eArgError, "wrong number of argument (0 for 1+)");
+
+	recv = generator_init(generator_allocate(rb_cGenerator), rb_block_proc());
+    } else {
+	recv = *argv++;
+	if (--argc) {
+	    meth = *argv++;
+	    --argc;
+	}
+    }
+
+    return enumerator_init(obj, recv, meth, argc, argv);
+}
+
+/* :nodoc: */
+static VALUE
+enumerator_init_copy(VALUE obj, VALUE orig)
+{
+    struct enumerator *ptr0, *ptr1;
+
+    ptr0 = enumerator_ptr(orig);
+    if (ptr0->fib) {
+	/* Fibers cannot be copied */
+	rb_raise(rb_eTypeError, "can't copy execution context");
+    }
+
+    Data_Get_Struct(obj, struct enumerator, ptr1);
+
+    if (!ptr1) {
+	rb_raise(rb_eArgError, "unallocated enumerator");
+    }
+
+    ptr1->obj  = ptr0->obj;
+    ptr1->meth = ptr0->meth;
+    ptr1->args = ptr0->args;
+    ptr1->fib  = 0;
+
+    return obj;
+}
+
+VALUE
+rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
+{
+    return enumerator_init(enumerator_allocate(rb_cEnumerator), obj, meth, argc, argv);
+}
+
+/*
+ *  call-seq:
+ *    enum.each {...}
+ *
+ *  Iterates the given block using the object and the method specified
+ *  in the first place.  If no block is given, returns self.
+ *
+ */
+static VALUE
+enumerator_each(VALUE obj)
+{
+    struct enumerator *e;
+    int argc = 0;
+    VALUE *argv = 0;
+
+    if (!rb_block_given_p()) return obj;
+    e = enumerator_ptr(obj);
+    if (e->args) {
+	argc = RARRAY_LEN(e->args);
+	argv = RARRAY_PTR(e->args);
+    }
+    return rb_block_call(e->obj, e->meth, argc, argv,
+			 enumerator_each_i, (VALUE)e);
+}
+
+static VALUE
+enumerator_with_index_i(VALUE val, VALUE *memo)
+{
+    val = rb_yield_values(2, val, INT2FIX(*memo));
+    ++*memo;
+    return val;
+}
+
+/*
+ *  call-seq:
+ *    e.with_index {|(*args), idx| ... }
+ *    e.with_index
+ *
+ *  Iterates the given block for each element with an index, which
+ *  start from 0.  If no block is given, returns an enumerator.
+ *
+ */
+static VALUE
+enumerator_with_index(VALUE obj)
+{
+    struct enumerator *e;
+    VALUE memo = 0;
+    int argc = 0;
+    VALUE *argv = 0;
+
+    RETURN_ENUMERATOR(obj, 0, 0);
+    e = enumerator_ptr(obj);
+    if (e->args) {
+	argc = RARRAY_LEN(e->args);
+	argv = RARRAY_PTR(e->args);
+    }
+    return rb_block_call(e->obj, e->meth, argc, argv,
+			 enumerator_with_index_i, (VALUE)&memo);
+}
+
+static VALUE
+enumerator_with_object_i(VALUE val, VALUE memo)
+{
+    return rb_yield_values(2, val, memo);
+}
+
+/*
+ *  call-seq:
+ *    e.with_object(obj) {|(*args), memo_obj| ... }
+ *    e.with_object(obj)
+ *
+ *  Iterates the given block for each element with an arbitrary
+ *  object given, and returns the initially given object.
+ *
+ *  If no block is given, returns an enumerator.
+ *
+ */
+static VALUE
+enumerator_with_object(VALUE obj, VALUE memo)
+{
+    struct enumerator *e;
+    int argc = 0;
+    VALUE *argv = 0;
+
+    RETURN_ENUMERATOR(obj, 1, &memo);
+    e = enumerator_ptr(obj);
+    if (e->args) {
+	argc = RARRAY_LEN(e->args);
+	argv = RARRAY_PTR(e->args);
+    }
+    rb_block_call(e->obj, e->meth, argc, argv,
+		  enumerator_with_object_i, memo);
+
+    return memo;
+}
+
+static VALUE
+next_ii(VALUE i, VALUE obj, int argc, VALUE *argv)
+{
+    rb_fiber_yield(argc, argv);
+    return Qnil;
+}
+
+static VALUE
+next_i(VALUE curr, VALUE obj)
+{
+    struct enumerator *e = enumerator_ptr(obj);
+    VALUE nil = Qnil;
+
+    rb_block_call(obj, rb_intern("each"), 0, 0, next_ii, obj);
+    e->no_next = Qtrue;
+    return rb_fiber_yield(1, &nil);
+}
+
+static void
+next_init(VALUE obj, struct enumerator *e)
+{
+    VALUE curr = rb_fiber_current();
+    e->dst = curr;
+    e->fib = rb_fiber_new(next_i, obj);
+}
+
+/*
+ * call-seq:
+ *   e.next   => object
+ *
+ * Returns the next object in the enumerator, and move the internal
+ * position forward.  When the position reached at the end, internal
+ * position is rewound then StopIteration is raised.
+ *
+ * Note that enumeration sequence by next method does not affect other
+ * non-external enumeration methods, unless underlying iteration
+ * methods itself has side-effect, e.g. IO#each_line.
+ *
+ */
+
+static VALUE
+enumerator_next(VALUE obj)
+{
+    struct enumerator *e = enumerator_ptr(obj);
+    VALUE curr, v;
+    curr = rb_fiber_current();
+
+    if (!e->fib || !rb_fiber_alive_p(e->fib)) {
+	next_init(obj, e);
+    }
+
+    v = rb_fiber_resume(e->fib, 1, &curr);
+    if (e->no_next) {
+	e->fib = 0;
+	e->dst = Qnil;
+	e->no_next = Qfalse;
+	rb_raise(rb_eStopIteration, "iteration reached at end");
+    }
+    return v;
+}
+
+/*
+ * call-seq:
+ *   e.rewind   => e
+ *
+ * Rewinds the enumeration sequence by the next method.
+ *
+ * If the enclosed object responds to a "rewind" method, it is called.
+ */
+
+static VALUE
+enumerator_rewind(VALUE obj)
+{
+    struct enumerator *e = enumerator_ptr(obj);
+
+    if (rb_respond_to(e->obj, id_rewind))
+	rb_funcall(e->obj, id_rewind, 0);
+
+    e->fib = 0;
+    e->dst = Qnil;
+    e->no_next = Qfalse;
+    return obj;
+}
+
+/*
+ * Yielder
+ */
+static void
+yielder_mark(void *p)
+{
+    struct yielder *ptr = p;
+    rb_gc_mark(ptr->proc);
+}
+
+static struct yielder *
+yielder_ptr(VALUE obj)
+{
+    struct yielder *ptr;
+
+    Data_Get_Struct(obj, struct yielder, ptr);
+    if (RDATA(obj)->dmark != yielder_mark) {
+	rb_raise(rb_eTypeError,
+		 "wrong argument type %s (expected %s)",
+		 rb_obj_classname(obj), rb_class2name(rb_cYielder));
+    }
+    if (!ptr || ptr->proc == Qundef) {
+	rb_raise(rb_eArgError, "uninitialized yielder");
+    }
+    return ptr;
+}
+
+/* :nodoc: */
+static VALUE
+yielder_allocate(VALUE klass)
+{
+    struct yielder *ptr;
+    VALUE obj;
+
+    obj = Data_Make_Struct(klass, struct yielder, yielder_mark, -1, ptr);
+    ptr->proc = Qundef;
+
+    return obj;
+}
+
+static VALUE
+yielder_init(VALUE obj, VALUE proc)
+{
+    struct yielder *ptr;
+
+    Data_Get_Struct(obj, struct yielder, ptr);
+
+    if (!ptr) {
+	rb_raise(rb_eArgError, "unallocated yielder");
+    }
+
+    ptr->proc = proc;
+
+    return obj;
+}
+
+/* :nodoc: */
+static VALUE
+yielder_initialize(VALUE obj)
+{
+    rb_need_block();
+
+    return yielder_init(obj, rb_block_proc());
+}
+
+/* :nodoc: */
+static VALUE
+yielder_yield(VALUE obj, VALUE args)
+{
+    struct yielder *ptr = yielder_ptr(obj);
+
+    rb_proc_call(ptr->proc, args);
+
+    return obj;
+}
+
+static VALUE
+yielder_new_i(VALUE dummy)
+{
+    return yielder_init(yielder_allocate(rb_cYielder), rb_block_proc());
+}
+
+static VALUE
+yielder_yield_i(VALUE obj, VALUE memo, int argc, VALUE *argv)
+{
+    return rb_yield_values2(argc, argv);
+}
+
+static VALUE
+yielder_new(void)
+{
+    return rb_iterate(yielder_new_i, (VALUE)0, yielder_yield_i, (VALUE)0);
+}
+
+/*
+ * Generator
+ */
+static void
+generator_mark(void *p)
+{
+    struct generator *ptr = p;
+    rb_gc_mark(ptr->proc);
+}
+
+static struct generator *
+generator_ptr(VALUE obj)
+{
+    struct generator *ptr;
+
+    Data_Get_Struct(obj, struct generator, ptr);
+    if (RDATA(obj)->dmark != generator_mark) {
+	rb_raise(rb_eTypeError,
+		 "wrong argument type %s (expected %s)",
+		 rb_obj_classname(obj), rb_class2name(rb_cGenerator));
+    }
+    if (!ptr || ptr->proc == Qundef) {
+	rb_raise(rb_eArgError, "uninitialized generator");
+    }
+    return ptr;
+}
+
+/* :nodoc: */
+static VALUE
+generator_allocate(VALUE klass)
+{
+    struct generator *ptr;
+    VALUE obj;
+
+    obj = Data_Make_Struct(klass, struct generator, generator_mark, -1, ptr);
+    ptr->proc = Qundef;
+
+    return obj;
+}
+
+static VALUE
+generator_init(VALUE obj, VALUE proc)
+{
+    struct generator *ptr;
+
+    Data_Get_Struct(obj, struct generator, ptr);
+
+    if (!ptr) {
+	rb_raise(rb_eArgError, "unallocated generator");
+    }
+
+    ptr->proc = proc;
+
+    return obj;
+}
+
+VALUE rb_obj_is_proc(VALUE proc);
+
+/* :nodoc: */
+static VALUE
+generator_initialize(int argc, VALUE *argv, VALUE obj)
+{
+    VALUE proc;
+
+    if (argc == 0) {
+	rb_need_block();
+
+	proc = rb_block_proc();
+    } else {
+	rb_scan_args(argc, argv, "1", &proc);
+
+	if (!rb_obj_is_proc(proc))
+	    rb_raise(rb_eTypeError,
+		     "wrong argument type %s (expected Proc)",
+		     rb_obj_classname(proc));
+
+	if (rb_block_given_p()) {
+	    rb_warn("given block not used");
+	}
+    }
+
+    return generator_init(obj, proc);
+}
+
+/* :nodoc: */
+static VALUE
+generator_init_copy(VALUE obj, VALUE orig)
+{
+    struct generator *ptr0, *ptr1;
+
+    ptr0 = generator_ptr(orig);
+
+    Data_Get_Struct(obj, struct generator, ptr1);
+
+    if (!ptr1) {
+	rb_raise(rb_eArgError, "unallocated generator");
+    }
+
+    ptr1->proc = ptr0->proc;
+
+    return obj;
+}
+
+/* :nodoc: */
+static VALUE
+generator_each(VALUE obj)
+{
+    struct generator *ptr = generator_ptr(obj);
+    VALUE yielder;
+
+    yielder = yielder_new();
+
+    rb_proc_call(ptr->proc, rb_ary_new3(1, yielder));
+
+    return obj;
+}
+
+void
+Init_Enumerator(void)
+{
+    rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
+    rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
+
+    rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
+    rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
+    rb_define_method(rb_mEnumerable, "each_with_object", enum_each_with_object, 1);
+
+    rb_cEnumerator = rb_define_class("Enumerator", rb_cObject);
+    rb_include_module(rb_cEnumerator, rb_mEnumerable);
+
+    rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);
+    rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1);
+    rb_define_method(rb_cEnumerator, "initialize_copy", enumerator_init_copy, 1);
+    rb_define_method(rb_cEnumerator, "each", enumerator_each, 0);
+    rb_define_method(rb_cEnumerator, "each_with_index", enumerator_with_index, 0);
+    rb_define_method(rb_cEnumerator, "each_with_object", enumerator_with_object, 1);
+    rb_define_method(rb_cEnumerator, "with_index", enumerator_with_index, 0);
+    rb_define_method(rb_cEnumerator, "with_object", enumerator_with_object, 1);
+    rb_define_method(rb_cEnumerator, "next", enumerator_next, 0);
+    rb_define_method(rb_cEnumerator, "rewind", enumerator_rewind, 0);
+
+    rb_eStopIteration = rb_define_class("StopIteration", rb_eIndexError);
+
+    /* Generator */
+    rb_cGenerator = rb_define_class_under(rb_cEnumerator, "Generator", rb_cObject);
+    rb_include_module(rb_cGenerator, rb_mEnumerable);
+    rb_define_alloc_func(rb_cGenerator, generator_allocate);
+    rb_define_method(rb_cGenerator, "initialize", generator_initialize, -1);
+    rb_define_method(rb_cGenerator, "initialize_copy", generator_init_copy, 1);
+    rb_define_method(rb_cGenerator, "each", generator_each, 0);
+
+    /* Yielder */
+    rb_cYielder = rb_define_class_under(rb_cEnumerator, "Yielder", rb_cObject);
+    rb_define_alloc_func(rb_cYielder, yielder_allocate);
+    rb_define_method(rb_cYielder, "initialize", yielder_initialize, 0);
+    rb_define_method(rb_cYielder, "yield", yielder_yield, -2);
+    rb_define_method(rb_cYielder, "<<", yielder_yield, -2);
+
+    sym_each = ID2SYM(rb_intern("each"));
+    id_rewind = rb_intern("rewind");
+
+    rb_provide("enumerator.so");	/* for backward compatibility */
+}
diff --git a/lib/ruby-1.9.1-rc1/error.c b/lib/ruby-1.9.1-rc1/error.c
new file mode 100644
index 0000000..de3afb2
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/error.c
@@ -0,0 +1,1218 @@
+/**********************************************************************
+
+  error.c -
+
+  $Author: yugui $
+  created at: Mon Aug  9 16:11:34 JST 1993
+
+  Copyright (C) 1993-2007 Yukihiro Matsumoto
+
+**********************************************************************/
+
+#include "ruby/ruby.h"
+#include "ruby/st.h"
+#include "vm_core.h"
+
+#include 
+#include 
+#ifdef HAVE_STDLIB_H
+#include 
+#endif
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+
+extern const char ruby_description[];
+
+static int
+err_position_0(char *buf, long len, const char *file, int line)
+{
+    if (!file) {
+	return 0;
+    }
+    else if (line == 0) {
+	return snprintf(buf, len, "%s: ", file);
+    }
+    else {
+	return snprintf(buf, len, "%s:%d: ", file, line);
+    }
+}
+
+static int
+err_position(char *buf, long len)
+{
+    return err_position_0(buf, len, rb_sourcefile(), rb_sourceline());
+}
+
+static void
+err_snprintf(char *buf, long len, const char *fmt, va_list args)
+{
+    long n;
+
+    n = err_position(buf, len);
+    if (len > n) {
+	vsnprintf((char*)buf+n, len-n, fmt, args);
+    }
+}
+
+static void
+compile_snprintf(char *buf, long len, const char *file, int line, const char *fmt, va_list args)
+{
+    long n;
+
+    n = err_position_0(buf, len, file, line);
+    if (len > n) {
+	vsnprintf((char*)buf+n, len-n, fmt, args);
+    }
+}
+
+static void err_append(const char*);
+
+void
+rb_compile_error(const char *file, int line, const char *fmt, ...)
+{
+    va_list args;
+    char buf[BUFSIZ];
+
+    va_start(args, fmt);
+    compile_snprintf(buf, BUFSIZ, file, line, fmt, args);
+    va_end(args);
+    err_append(buf);
+}
+
+void
+rb_compile_error_append(const char *fmt, ...)
+{
+    va_list args;
+    char buf[BUFSIZ];
+
+    va_start(args, fmt);
+    vsnprintf(buf, BUFSIZ, fmt, args);
+    va_end(args);
+    err_append(buf);
+}
+
+static void
+compile_warn_print(const char *file, int line, const char *fmt, va_list args)
+{
+    char buf[BUFSIZ];
+    int len;
+
+    compile_snprintf(buf, BUFSIZ, file, line, fmt, args);
+    len = strlen(buf);
+    buf[len++] = '\n';
+    rb_write_error2(buf, len);
+}
+
+void
+rb_compile_warn(const char *file, int line, const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+
+    if (NIL_P(ruby_verbose)) return;
+
+    snprintf(buf, BUFSIZ, "warning: %s", fmt);
+
+    va_start(args, fmt);
+    compile_warn_print(file, line, buf, args);
+    va_end(args);
+}
+
+/* rb_compile_warning() reports only in verbose mode */
+void
+rb_compile_warning(const char *file, int line, const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+
+    if (!RTEST(ruby_verbose)) return;
+
+    snprintf(buf, BUFSIZ, "warning: %s", fmt);
+
+    va_start(args, fmt);
+    compile_warn_print(file, line, buf, args);
+    va_end(args);
+}
+
+static void
+warn_print(const char *fmt, va_list args)
+{
+    char buf[BUFSIZ];
+    int len;
+
+    err_snprintf(buf, BUFSIZ, fmt, args);
+    len = strlen(buf);
+    buf[len++] = '\n';
+    rb_write_error2(buf, len);
+}
+
+void
+rb_warn(const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+
+    if (NIL_P(ruby_verbose)) return;
+
+    snprintf(buf, BUFSIZ, "warning: %s", fmt);
+
+    va_start(args, fmt);
+    warn_print(buf, args);
+    va_end(args);
+}
+
+/* rb_warning() reports only in verbose mode */
+void
+rb_warning(const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+
+    if (!RTEST(ruby_verbose)) return;
+
+    snprintf(buf, BUFSIZ, "warning: %s", fmt);
+
+    va_start(args, fmt);
+    warn_print(buf, args);
+    va_end(args);
+}
+
+/*
+ * call-seq:
+ *    warn(msg)   => nil
+ *
+ * Display the given message (followed by a newline) on STDERR unless
+ * warnings are disabled (for example with the -W0 flag).
+ */
+
+static VALUE
+rb_warn_m(VALUE self, VALUE mesg)
+{
+    if (!NIL_P(ruby_verbose)) {
+	rb_io_write(rb_stderr, mesg);
+	rb_io_write(rb_stderr, rb_default_rs);
+    }
+    return Qnil;
+}
+
+void rb_vm_bugreport(void);
+
+static void
+report_bug(const char *file, int line, const char *fmt, va_list args)
+{
+    char buf[BUFSIZ];
+    FILE *out = stderr;
+    int len = err_position_0(buf, BUFSIZ, file, line);
+
+    if (fwrite(buf, 1, len, out) == len ||
+	fwrite(buf, 1, len, (out = stdout)) == len) {
+
+	fputs("[BUG] ", out);
+	vfprintf(out, fmt, args);
+	fprintf(out, "\n%s\n\n", ruby_description);
+
+	rb_vm_bugreport();
+
+	fprintf(out,
+		"[NOTE]\n"
+		"You may encounter a bug of Ruby interpreter. Bug reports are welcome.\n"
+		"For details: http://www.ruby-lang.org/bugreport.html\n\n");
+    }
+}
+
+void
+rb_bug(const char *fmt, ...)
+{
+    va_list args;
+
+    va_start(args, fmt);
+    report_bug(rb_sourcefile(), rb_sourceline(), fmt, args);
+    va_end(args);
+
+    abort();
+}
+
+void
+rb_compile_bug(const char *file, int line, const char *fmt, ...)
+{
+    va_list args;
+
+    va_start(args, fmt);
+    report_bug(file, line, fmt, args);
+    va_end(args);
+
+    abort();
+}
+
+static const struct types {
+    int type;
+    const char *name;
+} builtin_types[] = {
+    {T_NIL,	"nil"},
+    {T_OBJECT,	"Object"},
+    {T_CLASS,	"Class"},
+    {T_ICLASS,	"iClass"},	/* internal use: mixed-in module holder */
+    {T_MODULE,	"Module"},
+    {T_FLOAT,	"Float"},
+    {T_STRING,	"String"},
+    {T_REGEXP,	"Regexp"},
+    {T_ARRAY,	"Array"},
+    {T_FIXNUM,	"Fixnum"},
+    {T_HASH,	"Hash"},
+    {T_STRUCT,	"Struct"},
+    {T_BIGNUM,	"Bignum"},
+    {T_FILE,	"File"},
+    {T_RATIONAL,"Rational"},
+    {T_COMPLEX, "Complex"},
+    {T_TRUE,	"true"},
+    {T_FALSE,	"false"},
+    {T_SYMBOL,	"Symbol"},	/* :symbol */
+    {T_DATA,	"Data"},	/* internal use: wrapped C pointers */
+    {T_MATCH,	"MatchData"},	/* data of $~ */
+    {T_NODE,	"Node"},	/* internal use: syntax tree node */
+    {T_UNDEF,	"undef"},	/* internal use: #undef; should not happen */
+};
+
+void
+rb_check_type(VALUE x, int t)
+{
+    const struct types *type = builtin_types;
+    const struct types *const typeend = builtin_types +
+	sizeof(builtin_types) / sizeof(builtin_types[0]);
+
+    if (x == Qundef) {
+	rb_bug("undef leaked to the Ruby space");
+    }
+
+    if (TYPE(x) != t) {
+	while (type < typeend) {
+	    if (type->type == t) {
+		const char *etype;
+
+		if (NIL_P(x)) {
+		    etype = "nil";
+		}
+		else if (FIXNUM_P(x)) {
+		    etype = "Fixnum";
+		}
+		else if (SYMBOL_P(x)) {
+		    etype = "Symbol";
+		}
+		else if (rb_special_const_p(x)) {
+		    etype = RSTRING_PTR(rb_obj_as_string(x));
+		}
+		else {
+		    etype = rb_obj_classname(x);
+		}
+		rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
+			 etype, type->name);
+	    }
+	    type++;
+	}
+	rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
+    }
+}
+
+/* exception classes */
+#include 
+
+VALUE rb_eException;
+VALUE rb_eSystemExit;
+VALUE rb_eInterrupt;
+VALUE rb_eSignal;
+VALUE rb_eFatal;
+VALUE rb_eStandardError;
+VALUE rb_eRuntimeError;
+VALUE rb_eTypeError;
+VALUE rb_eArgError;
+VALUE rb_eIndexError;
+VALUE rb_eKeyError;
+VALUE rb_eRangeError;
+VALUE rb_eNameError;
+VALUE rb_eEncodingError;
+VALUE rb_eEncCompatError;
+VALUE rb_eNoMethodError;
+VALUE rb_eSecurityError;
+VALUE rb_eNotImpError;
+VALUE rb_eNoMemError;
+VALUE rb_cNameErrorMesg;
+
+VALUE rb_eScriptError;
+VALUE rb_eSyntaxError;
+VALUE rb_eLoadError;
+
+VALUE rb_eSystemCallError;
+VALUE rb_mErrno;
+static VALUE rb_eNOERROR;
+
+VALUE
+rb_exc_new(VALUE etype, const char *ptr, long len)
+{
+    return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
+}
+
+VALUE
+rb_exc_new2(VALUE etype, const char *s)
+{
+    return rb_exc_new(etype, s, strlen(s));
+}
+
+VALUE
+rb_exc_new3(VALUE etype, VALUE str)
+{
+    StringValue(str);
+    return rb_funcall(etype, rb_intern("new"), 1, str);
+}
+
+/*
+ * call-seq:
+ *    Exception.new(msg = nil)   =>  exception
+ *
+ *  Construct a new Exception object, optionally passing in 
+ *  a message.
+ */
+
+static VALUE
+exc_initialize(int argc, VALUE *argv, VALUE exc)
+{
+    VALUE arg;
+
+    rb_scan_args(argc, argv, "01", &arg);
+    rb_iv_set(exc, "mesg", arg);
+    rb_iv_set(exc, "bt", Qnil);
+
+    return exc;
+}
+
+/*
+ *  Document-method: exception
+ *
+ *  call-seq:
+ *     exc.exception(string) -> an_exception or exc
+ *  
+ *  With no argument, or if the argument is the same as the receiver,
+ *  return the receiver. Otherwise, create a new
+ *  exception object of the same class as the receiver, but with a
+ *  message equal to string.to_str.
+ *     
+ */
+
+static VALUE
+exc_exception(int argc, VALUE *argv, VALUE self)
+{
+    VALUE exc;
+
+    if (argc == 0) return self;
+    if (argc == 1 && self == argv[0]) return self;
+    exc = rb_obj_clone(self);
+    exc_initialize(argc, argv, exc);
+
+    return exc;
+}
+
+/*
+ * call-seq:
+ *   exception.to_s   =>  string
+ *
+ * Returns exception's message (or the name of the exception if
+ * no message is set).
+ */
+
+static VALUE
+exc_to_s(VALUE exc)
+{
+    VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
+
+    if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
+    if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
+    return mesg;
+}
+
+/*
+ * call-seq:
+ *   exception.message   =>  string
+ *
+ * Returns the result of invoking exception.to_s.
+ * Normally this returns the exception's message or name. By
+ * supplying a to_str method, exceptions are agreeing to
+ * be used where Strings are expected.
+ */
+
+static VALUE
+exc_message(VALUE exc)
+{
+    return rb_funcall(exc, rb_intern("to_s"), 0, 0);
+}
+
+/*
+ * call-seq:
+ *   exception.inspect   => string
+ *
+ * Return this exception's class name an message
+ */
+
+static VALUE
+exc_inspect(VALUE exc)
+{
+    VALUE str, klass;
+
+    klass = CLASS_OF(exc);
+    exc = rb_obj_as_string(exc);
+    if (RSTRING_LEN(exc) == 0) {
+	return rb_str_dup(rb_class_name(klass));
+    }
+
+    str = rb_str_buf_new2("#<");
+    klass = rb_class_name(klass);
+    rb_str_buf_append(str, klass);
+    rb_str_buf_cat(str, ": ", 2);
+    rb_str_buf_append(str, exc);
+    rb_str_buf_cat(str, ">", 1);
+
+    return str;
+}
+
+/*
+ *  call-seq:
+ *     exception.backtrace    => array
+ *  
+ *  Returns any backtrace associated with the exception. The backtrace
+ *  is an array of strings, each containing either ``filename:lineNo: in
+ *  `method''' or ``filename:lineNo.''
+ *     
+ *     def a
+ *       raise "boom"
+ *     end
+ *     
+ *     def b
+ *       a()
+ *     end
+ *     
+ *     begin
+ *       b()
+ *     rescue => detail
+ *       print detail.backtrace.join("\n")
+ *     end
+ *     
+ *  produces:
+ *     
+ *     prog.rb:2:in `a'
+ *     prog.rb:6:in `b'
+ *     prog.rb:10
+*/
+
+static VALUE
+exc_backtrace(VALUE exc)
+{
+    ID bt;
+
+    CONST_ID(bt, "bt");
+    return rb_attr_get(exc, bt);
+}
+
+VALUE
+rb_check_backtrace(VALUE bt)
+{
+    long i;
+    static const char err[] = "backtrace must be Array of String";
+
+    if (!NIL_P(bt)) {
+	int t = TYPE(bt);
+
+	if (t == T_STRING) return rb_ary_new3(1, bt);
+	if (t != T_ARRAY) {
+	    rb_raise(rb_eTypeError, err);
+	}
+	for (i=0;i  array
+ *  
+ *  Sets the backtrace information associated with exc. The
+ *  argument must be an array of String objects in the
+ *  format described in Exception#backtrace.
+ *     
+ */
+
+static VALUE
+exc_set_backtrace(VALUE exc, VALUE bt)
+{
+    return rb_iv_set(exc, "bt", rb_check_backtrace(bt));
+}
+
+/*
+ *  call-seq:
+ *     exc == obj   => true or false
+ *  
+ *  Equality---If obj is not an Exception, returns
+ *  false. Otherwise, returns true if exc and 
+ *  obj share same class, messages, and backtrace.
+ */
+
+static VALUE
+exc_equal(VALUE exc, VALUE obj)
+{
+    VALUE mesg, backtrace;
+    ID id_mesg;
+
+    if (exc == obj) return Qtrue;
+    CONST_ID(id_mesg, "mesg");
+
+    if (rb_obj_class(exc) != rb_obj_class(obj)) {
+	ID id_message, id_backtrace;
+	CONST_ID(id_message, "message");
+	CONST_ID(id_backtrace, "backtrace");
+
+	if (rb_respond_to(obj, id_message) && rb_respond_to(obj, id_backtrace)) {
+	    mesg = rb_funcall(obj, id_message, 0, 0);
+	    backtrace = rb_funcall(obj, id_backtrace, 0, 0);
+	}
+	else {
+	    return Qfalse;
+	}
+    }
+    else {
+	mesg = rb_attr_get(obj, id_mesg);
+	backtrace = exc_backtrace(obj);
+    }
+
+    if (!rb_equal(rb_attr_get(exc, id_mesg), mesg))
+	return Qfalse;
+    if (!rb_equal(exc_backtrace(exc), backtrace))
+	return Qfalse;
+    return Qtrue;
+}
+
+/*
+ * call-seq:
+ *   SystemExit.new(status=0)   => system_exit
+ *
+ * Create a new +SystemExit+ exception with the given status.
+ */
+
+static VALUE
+exit_initialize(int argc, VALUE *argv, VALUE exc)
+{
+    VALUE status = INT2FIX(EXIT_SUCCESS);
+    if (argc > 0 && FIXNUM_P(argv[0])) {
+	status = *argv++;
+	--argc;
+    }
+    rb_call_super(argc, argv);
+    rb_iv_set(exc, "status", status);
+    return exc;
+}
+
+
+/*
+ * call-seq:
+ *   system_exit.status   => fixnum
+ *
+ * Return the status value associated with this system exit.
+ */
+
+static VALUE
+exit_status(VALUE exc)
+{
+    return rb_attr_get(exc, rb_intern("status"));
+}
+
+
+/*
+ * call-seq:
+ *   system_exit.success?  => true or false
+ *
+ * Returns +true+ if exiting successful, +false+ if not.
+ */
+
+static VALUE
+exit_success_p(VALUE exc)
+{
+    VALUE status = rb_attr_get(exc, rb_intern("status"));
+    if (NIL_P(status)) return Qtrue;
+    if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
+    return Qfalse;
+}
+
+void
+rb_name_error(ID id, const char *fmt, ...)
+{
+    VALUE exc, argv[2];
+    va_list args;
+
+    va_start(args, fmt);
+    argv[0] = rb_vsprintf(fmt, args);
+    va_end(args);
+
+    argv[1] = ID2SYM(id);
+    exc = rb_class_new_instance(2, argv, rb_eNameError);
+    rb_exc_raise(exc);
+}
+
+/*
+ * call-seq:
+ *   NameError.new(msg [, name])  => name_error
+ *
+ * Construct a new NameError exception. If given the name
+ * parameter may subsequently be examined using the NameError.name
+ * method.
+ */
+
+static VALUE
+name_err_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE name;
+
+    name = (argc > 1) ? argv[--argc] : Qnil;
+    rb_call_super(argc, argv);
+    rb_iv_set(self, "name", name);
+    return self;
+}
+
+/*
+ *  call-seq:
+ *    name_error.name    =>  string or nil
+ *
+ *  Return the name associated with this NameError exception.
+ */
+
+static VALUE
+name_err_name(VALUE self)
+{
+    return rb_attr_get(self, rb_intern("name"));
+}
+
+/*
+ * call-seq:
+ *  name_error.to_s   => string
+ *
+ * Produce a nicely-formatted string representing the +NameError+.
+ */
+
+static VALUE
+name_err_to_s(VALUE exc)
+{
+    VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
+    VALUE str = mesg;
+
+    if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
+    StringValue(str);
+    if (str != mesg) {
+	rb_iv_set(exc, "mesg", mesg = str);
+    }
+    if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
+    return mesg;
+}
+
+/*
+ * call-seq:
+ *   NoMethodError.new(msg, name [, args])  => no_method_error
+ *
+ * Construct a NoMethodError exception for a method of the given name
+ * called with the given arguments. The name may be accessed using
+ * the #name method on the resulting object, and the
+ * arguments using the #args method.
+ */
+
+static VALUE
+nometh_err_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE args = (argc > 2) ? argv[--argc] : Qnil;
+    name_err_initialize(argc, argv, self);
+    rb_iv_set(self, "args", args);
+    return self;
+}
+
+/* :nodoc: */
+static void
+name_err_mesg_mark(VALUE *ptr)
+{
+    rb_gc_mark_locations(ptr, ptr+3);
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_new(VALUE obj, VALUE mesg, VALUE recv, VALUE method)
+{
+    VALUE *ptr = ALLOC_N(VALUE, 3);
+
+    ptr[0] = mesg;
+    ptr[1] = recv;
+    ptr[2] = method;
+    return Data_Wrap_Struct(rb_cNameErrorMesg, name_err_mesg_mark, -1, ptr);
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_equal(VALUE obj1, VALUE obj2)
+{
+    VALUE *ptr1, *ptr2;
+    int i;
+
+    if (obj1 == obj2) return Qtrue;
+    if (rb_obj_class(obj2) != rb_cNameErrorMesg)
+	return Qfalse;
+
+    Data_Get_Struct(obj1, VALUE, ptr1);
+    Data_Get_Struct(obj2, VALUE, ptr2);
+    for (i=0; i<3; i++) {
+	if (!rb_equal(ptr1[i], ptr2[i]))
+	    return Qfalse;
+    }
+    return Qtrue;
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_to_str(VALUE obj)
+{
+    VALUE *ptr, mesg;
+    Data_Get_Struct(obj, VALUE, ptr);
+
+    mesg = ptr[0];
+    if (NIL_P(mesg)) return Qnil;
+    else {
+	const char *desc = 0;
+	VALUE d = 0, args[3];
+
+	obj = ptr[1];
+	switch (TYPE(obj)) {
+	  case T_NIL:
+	    desc = "nil";
+	    break;
+	  case T_TRUE:
+	    desc = "true";
+	    break;
+	  case T_FALSE:
+	    desc = "false";
+	    break;
+	  default:
+	    d = rb_protect(rb_inspect, obj, 0);
+	    if (NIL_P(d) || RSTRING_LEN(d) > 65) {
+		d = rb_any_to_s(obj);
+	    }
+	    desc = RSTRING_PTR(d);
+	    break;
+	}
+	if (desc && desc[0] != '#') {
+	    d = rb_str_new2(desc);
+	    rb_str_cat2(d, ":");
+	    rb_str_cat2(d, rb_obj_classname(obj));
+	}
+	args[0] = mesg;
+	args[1] = ptr[2];
+	args[2] = d;
+	mesg = rb_f_sprintf(3, args);
+    }
+    if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
+    return mesg;
+}
+
+/* :nodoc: */
+static VALUE
+name_err_mesg_load(VALUE klass, VALUE str)
+{
+    return str;
+}
+
+/*
+ * call-seq:
+ *   no_method_error.args  => obj
+ *
+ * Return the arguments passed in as the third parameter to
+ * the constructor.
+ */
+
+static VALUE
+nometh_err_args(VALUE self)
+{
+    return rb_attr_get(self, rb_intern("args"));
+}
+
+void
+rb_invalid_str(const char *str, const char *type)
+{
+    VALUE s = rb_str_inspect(rb_str_new2(str));
+
+    rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING_PTR(s));
+}
+
+/* 
+ *  Document-module: Errno
+ *
+ *  Ruby exception objects are subclasses of Exception.
+ *  However, operating systems typically report errors using plain
+ *  integers. Module Errno is created dynamically to map
+ *  these operating system errors to Ruby classes, with each error
+ *  number generating its own subclass of SystemCallError.
+ *  As the subclass is created in module Errno, its name
+ *  will start Errno::.
+ *     
+ *  The names of the Errno:: classes depend on
+ *  the environment in which Ruby runs. On a typical Unix or Windows
+ *  platform, there are Errno classes such as
+ *  Errno::EACCES, Errno::EAGAIN,
+ *  Errno::EINTR, and so on.
+ *     
+ *  The integer operating system error number corresponding to a
+ *  particular error is available as the class constant
+ *  Errno::error::Errno.
+ *     
+ *     Errno::EACCES::Errno   #=> 13
+ *     Errno::EAGAIN::Errno   #=> 11
+ *     Errno::EINTR::Errno    #=> 4
+ *     
+ *  The full list of operating system errors on your particular platform
+ *  are available as the constants of Errno.
+ *
+ *     Errno.constants   #=> :E2BIG, :EACCES, :EADDRINUSE, :EADDRNOTAVAIL, ...
+ */
+
+static st_table *syserr_tbl;
+
+static VALUE
+set_syserr(int n, const char *name)
+{
+    VALUE error;
+
+    if (!st_lookup(syserr_tbl, n, &error)) {
+	error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
+	rb_define_const(error, "Errno", INT2NUM(n));
+	st_add_direct(syserr_tbl, n, error);
+    }
+    else {
+	rb_define_const(rb_mErrno, name, error);
+    }
+    return error;
+}
+
+static VALUE
+get_syserr(int n)
+{
+    VALUE error;
+
+    if (!st_lookup(syserr_tbl, n, &error)) {
+	char name[8];	/* some Windows' errno have 5 digits. */
+
+	snprintf(name, sizeof(name), "E%03d", n);
+	error = set_syserr(n, name);
+    }
+    return error;
+}
+
+/*
+ * call-seq:
+ *   SystemCallError.new(msg, errno)  => system_call_error_subclass
+ *
+ * If _errno_ corresponds to a known system error code, constructs
+ * the appropriate Errno class for that error, otherwise
+ * constructs a generic SystemCallError object. The
+ * error number is subsequently available via the errno
+ * method.
+ */
+
+static VALUE
+syserr_initialize(int argc, VALUE *argv, VALUE self)
+{
+#if !defined(_WIN32)
+    char *strerror();
+#endif
+    const char *err;
+    VALUE mesg, error;
+    VALUE klass = rb_obj_class(self);
+
+    if (klass == rb_eSystemCallError) {
+	rb_scan_args(argc, argv, "11", &mesg, &error);
+	if (argc == 1 && FIXNUM_P(mesg)) {
+	    error = mesg; mesg = Qnil;
+	}
+	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
+	    /* change class */
+	    if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
+		rb_raise(rb_eTypeError, "invalid instance type");
+	    }
+	    RBASIC(self)->klass = klass;
+	}
+    }
+    else {
+	rb_scan_args(argc, argv, "01", &mesg);
+	error = rb_const_get(klass, rb_intern("Errno"));
+    }
+    if (!NIL_P(error)) err = strerror(NUM2LONG(error));
+    else err = "unknown error";
+    if (!NIL_P(mesg)) {
+	VALUE str = mesg;
+
+	StringValue(str);
+	mesg = rb_sprintf("%s - %.*s", err,
+			  (int)RSTRING_LEN(str), RSTRING_PTR(str));
+    }
+    else {
+	mesg = rb_str_new2(err);
+    }
+    rb_call_super(1, &mesg);
+    rb_iv_set(self, "errno", error);
+    return self;
+}
+
+/*
+ * call-seq:
+ *   system_call_error.errno   => fixnum
+ *
+ * Return this SystemCallError's error number.
+ */
+
+static VALUE
+syserr_errno(VALUE self)
+{
+    return rb_attr_get(self, rb_intern("errno"));
+}
+
+/*
+ * call-seq:
+ *   system_call_error === other  => true or false
+ *
+ * Return +true+ if the receiver is a generic +SystemCallError+, or
+ * if the error numbers _self_ and _other_ are the same.
+ */
+
+static VALUE
+syserr_eqq(VALUE self, VALUE exc)
+{
+    VALUE num, e;
+    ID en;
+
+    CONST_ID(en, "errno");
+
+    if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) {
+	if (!rb_respond_to(exc, en)) return Qfalse;
+    }
+    else if (self == rb_eSystemCallError) return Qtrue;
+
+    num = rb_attr_get(exc, rb_intern("errno"));
+    if (NIL_P(num)) {
+	num = rb_funcall(exc, en, 0, 0);
+    }
+    e = rb_const_get(self, rb_intern("Errno"));
+    if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
+	return Qtrue;
+    return Qfalse;
+}
+
+/*
+ *  Descendants of class Exception are used to communicate
+ *  between raise methods and rescue
+ *  statements in begin/end blocks. Exception
+ *  objects carry information about the exception---its type (the
+ *  exception's class name), an optional descriptive string, and
+ *  optional traceback information. Programs may subclass 
+ *  Exception to add additional information.
+ */
+
+void
+Init_Exception(void)
+{
+    rb_eException   = rb_define_class("Exception", rb_cObject);
+    rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
+    rb_define_method(rb_eException, "exception", exc_exception, -1);
+    rb_define_method(rb_eException, "initialize", exc_initialize, -1);
+    rb_define_method(rb_eException, "==", exc_equal, 1);
+    rb_define_method(rb_eException, "to_s", exc_to_s, 0);
+    rb_define_method(rb_eException, "message", exc_message, 0);
+    rb_define_method(rb_eException, "inspect", exc_inspect, 0);
+    rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
+    rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1);
+
+    rb_eSystemExit  = rb_define_class("SystemExit", rb_eException);
+    rb_define_method(rb_eSystemExit, "initialize", exit_initialize, -1);
+    rb_define_method(rb_eSystemExit, "status", exit_status, 0);
+    rb_define_method(rb_eSystemExit, "success?", exit_success_p, 0);
+
+    rb_eFatal  	    = rb_define_class("fatal", rb_eException);
+    rb_eSignal      = rb_define_class("SignalException", rb_eException);
+    rb_eInterrupt   = rb_define_class("Interrupt", rb_eSignal);
+
+    rb_eStandardError = rb_define_class("StandardError", rb_eException);
+    rb_eTypeError     = rb_define_class("TypeError", rb_eStandardError);
+    rb_eArgError      = rb_define_class("ArgumentError", rb_eStandardError);
+    rb_eIndexError    = rb_define_class("IndexError", rb_eStandardError);
+    rb_eKeyError      = rb_define_class("KeyError", rb_eIndexError);
+    rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
+
+    rb_eScriptError = rb_define_class("ScriptError", rb_eException);
+    rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
+    rb_eLoadError   = rb_define_class("LoadError", rb_eScriptError);
+    rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
+
+    rb_eNameError     = rb_define_class("NameError", rb_eStandardError);
+    rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);
+    rb_define_method(rb_eNameError, "name", name_err_name, 0);
+    rb_define_method(rb_eNameError, "to_s", name_err_to_s, 0);
+    rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cData);
+    rb_define_singleton_method(rb_cNameErrorMesg, "!", name_err_mesg_new, 3);
+    rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
+    rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
+    rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);
+    rb_define_singleton_method(rb_cNameErrorMesg, "_load", name_err_mesg_load, 1);
+    rb_eNoMethodError = rb_define_class("NoMethodError", rb_eNameError);
+    rb_define_method(rb_eNoMethodError, "initialize", nometh_err_initialize, -1);
+    rb_define_method(rb_eNoMethodError, "args", nometh_err_args, 0);
+
+    rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
+    rb_eSecurityError = rb_define_class("SecurityError", rb_eException);
+    rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
+    rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError);
+    rb_eEncCompatError = rb_define_class_under(rb_cEncoding, "CompatibilityError", rb_eEncodingError);
+
+    syserr_tbl = st_init_numtable();
+    rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
+    rb_define_method(rb_eSystemCallError, "initialize", syserr_initialize, -1);
+    rb_define_method(rb_eSystemCallError, "errno", syserr_errno, 0);
+    rb_define_singleton_method(rb_eSystemCallError, "===", syserr_eqq, 1);
+
+    rb_mErrno = rb_define_module("Errno");
+
+    rb_define_global_function("warn", rb_warn_m, 1);
+}
+
+void
+rb_raise(VALUE exc, const char *fmt, ...)
+{
+    va_list args;
+    VALUE mesg;
+
+    va_start(args, fmt);
+    mesg = rb_vsprintf(fmt, args);
+    va_end(args);
+    rb_exc_raise(rb_exc_new3(exc, mesg));
+}
+
+void
+rb_loaderror(const char *fmt, ...)
+{
+    va_list args;
+    VALUE mesg;
+
+    va_start(args, fmt);
+    mesg = rb_vsprintf(fmt, args);
+    va_end(args);
+    rb_exc_raise(rb_exc_new3(rb_eLoadError, mesg));
+}
+
+void
+rb_notimplement(void)
+{
+    rb_raise(rb_eNotImpError,
+	     "%s() function is unimplemented on this machine",
+	     rb_id2name(rb_frame_this_func()));
+}
+
+void
+rb_fatal(const char *fmt, ...)
+{
+    va_list args;
+    VALUE mesg;
+
+    va_start(args, fmt);
+    mesg = rb_vsprintf(fmt, args);
+    va_end(args);
+
+    rb_exc_fatal(rb_exc_new3(rb_eFatal, mesg));
+}
+
+void
+rb_sys_fail(const char *mesg)
+{
+    int n = errno;
+    VALUE arg;
+
+    errno = 0;
+    if (n == 0) {
+	rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
+    }
+
+    arg = mesg ? rb_str_new2(mesg) : Qnil;
+    rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
+}
+
+void
+rb_sys_warning(const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+    int errno_save;
+
+    errno_save = errno;
+
+    if (!RTEST(ruby_verbose)) return;
+
+    snprintf(buf, BUFSIZ, "warning: %s", fmt);
+    snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
+
+    va_start(args, fmt);
+    warn_print(buf, args);
+    va_end(args);
+    errno = errno_save;
+}
+
+void
+rb_load_fail(const char *path)
+{
+    rb_loaderror("%s -- %s", strerror(errno), path);
+}
+
+void
+rb_error_frozen(const char *what)
+{
+    rb_raise(rb_eRuntimeError, "can't modify frozen %s", what);
+}
+
+void
+rb_check_frozen(VALUE obj)
+{
+    if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
+}
+
+void Init_syserr(void)
+{
+    rb_eNOERROR = set_syserr(0, "NOERROR");
+#include "known_errors.inc"
+}
+
+static void
+err_append(const char *s)
+{
+    rb_thread_t *th = GET_THREAD();
+    VALUE err = th->errinfo;
+
+    if (th->mild_compile_error) {
+	if (!RTEST(err)) {
+	    err = rb_exc_new2(rb_eSyntaxError, s);
+	    th->errinfo = err;
+	}
+	else {
+	    VALUE str = rb_obj_as_string(err);
+
+	    rb_str_cat2(str, "\n");
+	    rb_str_cat2(str, s);
+	    th->errinfo = rb_exc_new3(rb_eSyntaxError, str);
+	}
+    }
+    else {
+	if (!RTEST(err)) {
+	    err = rb_exc_new2(rb_eSyntaxError, "compile error");
+	    th->errinfo = err;
+	}
+	rb_write_error(s);
+	rb_write_error("\n");
+    }
+}
diff --git a/lib/ruby-1.9.1-rc1/eval.c b/lib/ruby-1.9.1-rc1/eval.c
new file mode 100644
index 0000000..57084ae
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/eval.c
@@ -0,0 +1,1171 @@
+/**********************************************************************
+
+  eval.c -
+
+  $Author: yugui $
+  created at: Thu Jun 10 14:22:17 JST 1993
+
+  Copyright (C) 1993-2007 Yukihiro Matsumoto
+  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
+  Copyright (C) 2000  Information-technology Promotion Agency, Japan
+
+**********************************************************************/
+
+#include "eval_intern.h"
+#include "iseq.h"
+
+VALUE proc_invoke(VALUE, VALUE, VALUE, VALUE);
+VALUE rb_binding_new(void);
+NORETURN(void rb_raise_jump(VALUE));
+
+ID rb_frame_callee(void);
+VALUE rb_eLocalJumpError;
+VALUE rb_eSysStackError;
+
+#define exception_error GET_VM()->special_exceptions[ruby_error_reenter]
+
+#include "eval_error.c"
+#include "eval_jump.c"
+
+/* initialize ruby */
+
+#if defined(__APPLE__)
+#define environ (*_NSGetEnviron())
+#elif !defined(_WIN32)
+extern char **environ;
+#endif
+char **rb_origenviron;
+
+void rb_clear_trace_func(void);
+void rb_thread_stop_timer_thread(void);
+
+void rb_call_inits(void);
+void Init_heap(void);
+void Init_ext(void);
+void Init_BareVM(void);
+
+void
+ruby_init(void)
+{
+    static int initialized = 0;
+    int state;
+
+    if (initialized)
+	return;
+    initialized = 1;
+
+    rb_origenviron = environ;
+
+    Init_stack((void *)&state);
+    Init_BareVM();
+    Init_heap();
+
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	rb_call_inits();
+	ruby_prog_init();
+    }
+    POP_TAG();
+
+    if (state) {
+	error_print();
+	exit(EXIT_FAILURE);
+    }
+    GET_VM()->running = 1;
+}
+
+extern void rb_clear_trace_func(void);
+
+void *
+ruby_options(int argc, char **argv)
+{
+    int state;
+    void *tree = 0;
+
+    Init_stack((void *)&state);
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(GET_THREAD(), tree = ruby_process_options(argc, argv));
+    }
+    else {
+	rb_clear_trace_func();
+	state = error_handle(state);
+	tree = (void *)INT2FIX(state);
+    }
+    POP_TAG();
+    return tree;
+}
+
+static void
+ruby_finalize_0(void)
+{
+    PUSH_TAG();
+    if (EXEC_TAG() == 0) {
+	rb_trap_exit();
+    }
+    POP_TAG();
+    rb_exec_end_proc();
+    rb_clear_trace_func();
+}
+
+static void
+ruby_finalize_1(void)
+{
+    ruby_sig_finalize();
+    GET_THREAD()->errinfo = Qnil;
+    rb_gc_call_finalizer_at_exit();
+}
+
+void
+ruby_finalize(void)
+{
+    ruby_finalize_0();
+    ruby_finalize_1();
+}
+
+void rb_thread_stop_timer_thread(void);
+
+int
+ruby_cleanup(int ex)
+{
+    int state;
+    volatile VALUE errs[2];
+    rb_thread_t *th = GET_THREAD();
+    int nerr;
+
+    errs[1] = th->errinfo;
+    th->safe_level = 0;
+    Init_stack((void *)&state);
+
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(th, ruby_finalize_0());
+    }
+    POP_TAG();
+
+    errs[0] = th->errinfo;
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(th, rb_thread_terminate_all());
+    }
+    else if (ex == 0) {
+	ex = state;
+    }
+    th->errinfo = errs[1];
+    ex = error_handle(ex);
+    ruby_finalize_1();
+    POP_TAG();
+    rb_thread_stop_timer_thread();
+
+    for (nerr = 0; nerr < sizeof(errs) / sizeof(errs[0]); ++nerr) {
+	VALUE err = errs[nerr];
+
+	if (!RTEST(err)) continue;
+
+	/* th->errinfo contains a NODE while break'ing */
+	if (TYPE(err) == T_NODE) continue;
+
+	if (rb_obj_is_kind_of(err, rb_eSystemExit)) {
+	    return sysexit_status(err);
+	}
+	else if (rb_obj_is_kind_of(err, rb_eSignal)) {
+	    VALUE sig = rb_iv_get(err, "signo");
+	    ruby_default_signal(NUM2INT(sig));
+	}
+	else if (ex == 0) {
+	    ex = 1;
+	}
+    }
+
+#if EXIT_SUCCESS != 0 || EXIT_FAILURE != 1
+    switch (ex) {
+#if EXIT_SUCCESS != 0
+      case 0: return EXIT_SUCCESS;
+#endif
+#if EXIT_FAILURE != 1
+      case 1: return EXIT_FAILURE;
+#endif
+    }
+#endif
+
+    return ex;
+}
+
+int
+ruby_exec_node(void *n, const char *file)
+{
+    int state;
+    VALUE iseq = (VALUE)n;
+    rb_thread_t *th = GET_THREAD();
+
+    if (!n) return 0;
+
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(th, {
+	    th->base_block = 0;
+	    rb_iseq_eval_main(iseq);
+	});
+    }
+    POP_TAG();
+    return state;
+}
+
+void
+ruby_stop(int ex)
+{
+    exit(ruby_cleanup(ex));
+}
+
+int
+ruby_run_node(void *n)
+{
+    VALUE v = (VALUE)n;
+
+    switch (v) {
+      case Qtrue:  return EXIT_SUCCESS;
+      case Qfalse: return EXIT_FAILURE;
+    }
+    if (FIXNUM_P(v)) {
+	return FIX2INT(v);
+    }
+    Init_stack((void *)&n);
+    return ruby_cleanup(ruby_exec_node(n, 0));
+}
+
+/*
+ *  call-seq:
+ *     Module.nesting    => array
+ *
+ *  Returns the list of +Modules+ nested at the point of call.
+ *
+ *     module M1
+ *       module M2
+ *         $a = Module.nesting
+ *       end
+ *     end
+ *     $a           #=> [M1::M2, M1]
+ *     $a[0].name   #=> "M1::M2"
+ */
+
+static VALUE
+rb_mod_nesting(void)
+{
+    VALUE ary = rb_ary_new();
+    const NODE *cref = vm_cref();
+
+    while (cref && cref->nd_next) {
+	VALUE klass = cref->nd_clss;
+	if (!NIL_P(klass)) {
+	    rb_ary_push(ary, klass);
+	}
+	cref = cref->nd_next;
+    }
+    return ary;
+}
+
+/*
+ *  call-seq:
+ *     Module.constants   => array
+ *
+ *  Returns an array of the names of all constants defined in the
+ *  system. This list includes the names of all modules and classes.
+ *
+ *     p Module.constants.sort[1..5]
+ *
+ *  produces:
+ *
+ *     ["ARGV", "ArgumentError", "Array", "Bignum", "Binding"]
+ */
+
+static VALUE
+rb_mod_s_constants(int argc, VALUE *argv, VALUE mod)
+{
+    const NODE *cref = vm_cref();
+    VALUE klass;
+    VALUE cbase = 0;
+    void *data = 0;
+
+    if (argc > 0) {
+	return rb_mod_constants(argc, argv, rb_cModule);
+    }
+
+    while (cref) {
+	klass = cref->nd_clss;
+	if (!NIL_P(klass)) {
+	    data = rb_mod_const_at(cref->nd_clss, data);
+	    if (!cbase) {
+		cbase = klass;
+	    }
+	}
+	cref = cref->nd_next;
+    }
+
+    if (cbase) {
+	data = rb_mod_const_of(cbase, data);
+    }
+    return rb_const_list(data);
+}
+
+void
+rb_frozen_class_p(VALUE klass)
+{
+    const char *desc = "something(?!)";
+
+    if (OBJ_FROZEN(klass)) {
+	if (FL_TEST(klass, FL_SINGLETON))
+	    desc = "object";
+	else {
+	    switch (TYPE(klass)) {
+	      case T_MODULE:
+	      case T_ICLASS:
+		desc = "module";
+		break;
+	      case T_CLASS:
+		desc = "class";
+		break;
+	    }
+	}
+	rb_error_frozen(desc);
+    }
+}
+
+NORETURN(static void rb_longjmp(int, VALUE));
+VALUE rb_make_backtrace(void);
+
+static void
+rb_longjmp(int tag, VALUE mesg)
+{
+    VALUE at;
+    VALUE e;
+    rb_thread_t *th = GET_THREAD();
+    const char *file;
+    int line = 0;
+
+    if (rb_thread_set_raised(th)) {
+	th->errinfo = exception_error;
+	JUMP_TAG(TAG_FATAL);
+    }
+
+    if (NIL_P(mesg))
+	mesg = th->errinfo;
+    if (NIL_P(mesg)) {
+	mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
+    }
+
+    file = rb_sourcefile();
+    if (file) line = rb_sourceline();
+    if (file && !NIL_P(mesg)) {
+	at = get_backtrace(mesg);
+	if (NIL_P(at)) {
+	    at = rb_make_backtrace();
+	    if (OBJ_FROZEN(mesg)) {
+		mesg = rb_obj_dup(mesg);
+	    }
+	    set_backtrace(mesg, at);
+	}
+    }
+    if (!NIL_P(mesg)) {
+	th->errinfo = mesg;
+    }
+
+    if (RTEST(ruby_debug) && !NIL_P(e = th->errinfo) &&
+	!rb_obj_is_kind_of(e, rb_eSystemExit)) {
+	int status;
+
+	PUSH_TAG();
+	if ((status = EXEC_TAG()) == 0) {
+	    RB_GC_GUARD(e) = rb_obj_as_string(e);
+	    if (file) {
+		warn_printf("Exception `%s' at %s:%d - %s\n",
+			    rb_obj_classname(th->errinfo),
+			    file, line, RSTRING_PTR(e));
+	    }
+	    else {
+		warn_printf("Exception `%s' - %s\n",
+			    rb_obj_classname(th->errinfo),
+			    RSTRING_PTR(e));
+	    }
+	}
+	POP_TAG();
+	if (status == TAG_FATAL && th->errinfo == exception_error) {
+	    th->errinfo = mesg;
+	}
+	else if (status) {
+	    rb_thread_reset_raised(th);
+	    JUMP_TAG(status);
+	}
+    }
+
+    rb_trap_restore_mask();
+
+    if (tag != TAG_FATAL) {
+	EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self,
+			0 /* TODO: id */, 0 /* TODO: klass */);
+    }
+
+    rb_thread_raised_clear(th);
+    JUMP_TAG(tag);
+}
+
+void
+rb_exc_raise(VALUE mesg)
+{
+    rb_longjmp(TAG_RAISE, mesg);
+}
+
+void
+rb_exc_fatal(VALUE mesg)
+{
+    rb_longjmp(TAG_FATAL, mesg);
+}
+
+void
+rb_interrupt(void)
+{
+    rb_raise(rb_eInterrupt, "%s", "");
+}
+
+static VALUE get_errinfo(void);
+
+/*
+ *  call-seq:
+ *     raise
+ *     raise(string)
+ *     raise(exception [, string [, array]])
+ *     fail
+ *     fail(string)
+ *     fail(exception [, string [, array]])
+ *
+ *  With no arguments, raises the exception in $! or raises
+ *  a RuntimeError if $! is +nil+.
+ *  With a single +String+ argument, raises a
+ *  +RuntimeError+ with the string as a message. Otherwise,
+ *  the first parameter should be the name of an +Exception+
+ *  class (or an object that returns an +Exception+ object when sent
+ *  an +exception+ message). The optional second parameter sets the
+ *  message associated with the exception, and the third parameter is an
+ *  array of callback information. Exceptions are caught by the
+ *  +rescue+ clause of begin...end blocks.
+ *
+ *     raise "Failed to create socket"
+ *     raise ArgumentError, "No parameters", caller
+ */
+
+static VALUE
+rb_f_raise(int argc, VALUE *argv)
+{
+    VALUE err;
+    if (argc == 0) {
+	err = get_errinfo();
+	if (!NIL_P(err)) {
+	    argc = 1;
+	    argv = &err;
+	}
+    }
+    rb_raise_jump(rb_make_exception(argc, argv));
+    return Qnil;		/* not reached */
+}
+
+VALUE
+rb_make_exception(int argc, VALUE *argv)
+{
+    VALUE mesg;
+    ID exception;
+    int n;
+
+    mesg = Qnil;
+    switch (argc) {
+      case 0:
+	break;
+      case 1:
+	if (NIL_P(argv[0]))
+	    break;
+	mesg = rb_check_string_type(argv[0]);
+	if (!NIL_P(mesg)) {
+	    mesg = rb_exc_new3(rb_eRuntimeError, mesg);
+	    break;
+	}
+	n = 0;
+	goto exception_call;
+
+      case 2:
+      case 3:
+	n = 1;
+      exception_call:
+	CONST_ID(exception, "exception");
+	if (!rb_respond_to(argv[0], exception)) {
+	    rb_raise(rb_eTypeError, "exception class/object expected");
+	}
+	mesg = rb_funcall(argv[0], exception, n, argv[1]);
+	break;
+      default:
+	rb_raise(rb_eArgError, "wrong number of arguments");
+	break;
+    }
+    if (argc > 0) {
+	if (!rb_obj_is_kind_of(mesg, rb_eException))
+	    rb_raise(rb_eTypeError, "exception object expected");
+	if (argc > 2)
+	    set_backtrace(mesg, argv[2]);
+    }
+
+    return mesg;
+}
+
+void
+rb_raise_jump(VALUE mesg)
+{
+    rb_thread_t *th = GET_THREAD();
+    th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+    /* TODO: fix me */
+    rb_longjmp(TAG_RAISE, mesg);
+}
+
+void
+rb_jump_tag(int tag)
+{
+    JUMP_TAG(tag);
+}
+
+int
+rb_block_given_p(void)
+{
+    rb_thread_t *th = GET_THREAD();
+
+    if ((th->cfp->lfp[0] & 0x02) == 0 &&
+	GC_GUARDED_PTR_REF(th->cfp->lfp[0])) {
+	return Qtrue;
+    }
+    else {
+	return Qfalse;
+    }
+}
+
+int
+rb_iterator_p()
+{
+    return rb_block_given_p();
+}
+
+/*
+ *  call-seq:
+ *     block_given?   => true or false
+ *     iterator?      => true or false
+ *
+ *  Returns true if yield would execute a
+ *  block in the current context. The iterator? form
+ *  is mildly deprecated.
+ *
+ *     def try
+ *       if block_given?
+ *         yield
+ *       else
+ *         "no block"
+ *       end
+ *     end
+ *     try                  #=> "no block"
+ *     try { "hello" }      #=> "hello"
+ *     try do "hello" end   #=> "hello"
+ */
+
+
+VALUE
+rb_f_block_given_p(void)
+{
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *cfp = th->cfp;
+    cfp = vm_get_ruby_level_caller_cfp(th, RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp));
+
+    if (cfp != 0 &&
+	(cfp->lfp[0] & 0x02) == 0 &&
+	GC_GUARDED_PTR_REF(cfp->lfp[0])) {
+	return Qtrue;
+    }
+    else {
+	return Qfalse;
+    }
+}
+
+VALUE rb_eThreadError;
+
+void
+rb_need_block()
+{
+    if (!rb_block_given_p()) {
+	vm_localjump_error("no block given", Qnil, 0);
+    }
+}
+
+VALUE
+rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
+	   VALUE (* r_proc) (ANYARGS), VALUE data2, ...)
+{
+    int state;
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *cfp = th->cfp;
+    volatile VALUE result;
+    volatile VALUE e_info = th->errinfo;
+    va_list args;
+
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+      retry_entry:
+	result = (*b_proc) (data1);
+    }
+    else {
+	th->cfp = cfp; /* restore */
+
+	if (state == TAG_RAISE) {
+	    int handle = Qfalse;
+	    VALUE eclass;
+
+	    va_init_list(args, data2);
+	    while ((eclass = va_arg(args, VALUE)) != 0) {
+		if (rb_obj_is_kind_of(th->errinfo, eclass)) {
+		    handle = Qtrue;
+		    break;
+		}
+	    }
+	    va_end(args);
+
+	    if (handle) {
+		if (r_proc) {
+		    PUSH_TAG();
+		    if ((state = EXEC_TAG()) == 0) {
+			result = (*r_proc) (data2, th->errinfo);
+		    }
+		    POP_TAG();
+		    if (state == TAG_RETRY) {
+			state = 0;
+			th->errinfo = Qnil;
+			goto retry_entry;
+		    }
+		}
+		else {
+		    result = Qnil;
+		    state = 0;
+		}
+		if (state == 0) {
+		    th->errinfo = e_info;
+		}
+	    }
+	}
+    }
+    POP_TAG();
+    if (state)
+	JUMP_TAG(state);
+
+    return result;
+}
+
+VALUE
+rb_rescue(VALUE (* b_proc)(ANYARGS), VALUE data1,
+	  VALUE (* r_proc)(ANYARGS), VALUE data2)
+{
+    return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError,
+		      (VALUE)0);
+}
+
+VALUE
+rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
+{
+    VALUE result = Qnil;	/* OK */
+    int status;
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *cfp = th->cfp;
+    struct rb_vm_trap_tag trap_tag;
+    rb_jmpbuf_t org_jmpbuf;
+
+    trap_tag.prev = th->trap_tag;
+
+    PUSH_TAG();
+    th->trap_tag = &trap_tag;
+    MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1);
+    if ((status = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
+    }
+    MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
+    th->trap_tag = trap_tag.prev;
+    POP_TAG();
+
+    if (state) {
+	*state = status;
+    }
+    if (status != 0) {
+	th->cfp = cfp;
+	return Qnil;
+    }
+
+    return result;
+}
+
+VALUE
+rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
+{
+    int state;
+    volatile VALUE result = Qnil;
+
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	result = (*b_proc) (data1);
+    }
+    POP_TAG();
+    /* TODO: fix me */
+    /* retval = prot_tag ? prot_tag->retval : Qnil; */     /* save retval */
+    (*e_proc) (data2);
+    if (state)
+	JUMP_TAG(state);
+    return result;
+}
+
+static ID
+frame_func_id(rb_control_frame_t *cfp)
+{
+    rb_iseq_t *iseq = cfp->iseq;
+    if (!iseq) {
+	return cfp->method_id;
+    }
+    while (iseq) {
+	if (RUBY_VM_IFUNC_P(iseq)) {
+	    return rb_intern("");
+	}
+	if (iseq->defined_method_id) {
+	    return iseq->defined_method_id;
+	}
+	if (iseq->local_iseq == iseq) {
+	    break;
+	}
+	iseq = iseq->parent_iseq;
+    }
+    return 0;
+}
+
+ID
+rb_frame_this_func(void)
+{
+    return frame_func_id(GET_THREAD()->cfp);
+}
+
+ID
+rb_frame_callee(void)
+{
+    return frame_func_id(GET_THREAD()->cfp);
+}
+
+static ID
+rb_frame_caller(void)
+{
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+    /* check if prev_cfp can be accessible */
+    if ((void *)(th->stack + th->stack_size) == (void *)(prev_cfp)) {
+        return 0;
+    }
+    return frame_func_id(prev_cfp);
+}
+
+void
+rb_frame_pop(void)
+{
+    rb_thread_t *th = GET_THREAD();
+    th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+}
+
+/*
+ *  call-seq:
+ *     append_features(mod)   => mod
+ *
+ *  When this module is included in another, Ruby calls
+ *  append_features in this module, passing it the
+ *  receiving module in _mod_. Ruby's default implementation is
+ *  to add the constants, methods, and module variables of this module
+ *  to _mod_ if this module has not already been added to
+ *  _mod_ or one of its ancestors. See also Module#include.
+ */
+
+static VALUE
+rb_mod_append_features(VALUE module, VALUE include)
+{
+    switch (TYPE(include)) {
+      case T_CLASS:
+      case T_MODULE:
+	break;
+      default:
+	Check_Type(include, T_CLASS);
+	break;
+    }
+    rb_include_module(include, module);
+
+    return module;
+}
+
+/*
+ *  call-seq:
+ *     include(module, ...)    => self
+ *
+ *  Invokes Module.append_features on each parameter in turn.
+ */
+
+static VALUE
+rb_mod_include(int argc, VALUE *argv, VALUE module)
+{
+    int i;
+
+    for (i = 0; i < argc; i++)
+	Check_Type(argv[i], T_MODULE);
+    while (argc--) {
+	rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
+	rb_funcall(argv[argc], rb_intern("included"), 1, module);
+    }
+    return module;
+}
+
+void
+rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
+{
+    PASS_PASSED_BLOCK();
+    rb_funcall2(obj, idInitialize, argc, argv);
+}
+
+void
+rb_extend_object(VALUE obj, VALUE module)
+{
+    rb_include_module(rb_singleton_class(obj), module);
+}
+
+/*
+ *  call-seq:
+ *     extend_object(obj)    => obj
+ *
+ *  Extends the specified object by adding this module's constants and
+ *  methods (which are added as singleton methods). This is the callback
+ *  method used by Object#extend.
+ *
+ *     module Picky
+ *       def Picky.extend_object(o)
+ *         if String === o
+ *           puts "Can't add Picky to a String"
+ *         else
+ *           puts "Picky added to #{o.class}"
+ *           super
+ *         end
+ *       end
+ *     end
+ *     (s = Array.new).extend Picky  # Call Object.extend
+ *     (s = "quick brown fox").extend Picky
+ *
+ *  produces:
+ *
+ *     Picky added to Array
+ *     Can't add Picky to a String
+ */
+
+static VALUE
+rb_mod_extend_object(VALUE mod, VALUE obj)
+{
+    rb_extend_object(obj, mod);
+    return obj;
+}
+
+/*
+ *  call-seq:
+ *     obj.extend(module, ...)    => obj
+ *
+ *  Adds to _obj_ the instance methods from each module given as a
+ *  parameter.
+ *
+ *     module Mod
+ *       def hello
+ *         "Hello from Mod.\n"
+ *       end
+ *     end
+ *
+ *     class Klass
+ *       def hello
+ *         "Hello from Klass.\n"
+ *       end
+ *     end
+ *
+ *     k = Klass.new
+ *     k.hello         #=> "Hello from Klass.\n"
+ *     k.extend(Mod)   #=> #
+ *     k.hello         #=> "Hello from Mod.\n"
+ */
+
+static VALUE
+rb_obj_extend(int argc, VALUE *argv, VALUE obj)
+{
+    int i;
+
+    if (argc == 0) {
+	rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
+    }
+    for (i = 0; i < argc; i++)
+	Check_Type(argv[i], T_MODULE);
+    while (argc--) {
+	rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
+	rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
+    }
+    return obj;
+}
+
+/*
+ *  call-seq:
+ *     include(module, ...)   => self
+ *
+ *  Invokes Module.append_features
+ *  on each parameter in turn. Effectively adds the methods and constants
+ *  in each module to the receiver.
+ */
+
+static VALUE
+top_include(int argc, VALUE *argv, VALUE self)
+{
+    rb_thread_t *th = GET_THREAD();
+
+    rb_secure(4);
+    if (th->top_wrapper) {
+	rb_warning
+	    ("main#include in the wrapped load is effective only in wrapper module");
+	return rb_mod_include(argc, argv, th->top_wrapper);
+    }
+    return rb_mod_include(argc, argv, rb_cObject);
+}
+
+VALUE rb_f_trace_var();
+VALUE rb_f_untrace_var();
+
+static VALUE *
+errinfo_place(void)
+{
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *cfp = th->cfp;
+    rb_control_frame_t *end_cfp = RUBY_VM_END_CONTROL_FRAME(th);
+
+    while (RUBY_VM_VALID_CONTROL_FRAME_P(cfp, end_cfp)) {
+	if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
+	    if (cfp->iseq->type == ISEQ_TYPE_RESCUE) {
+		return &cfp->dfp[-2];
+	    }
+	    else if (cfp->iseq->type == ISEQ_TYPE_ENSURE &&
+		     TYPE(cfp->dfp[-2]) != T_NODE &&
+		     !FIXNUM_P(cfp->dfp[-2])) {
+		return &cfp->dfp[-2];
+	    }
+	}
+	cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
+    }
+    return 0;
+}
+
+static VALUE
+get_errinfo(void)
+{
+    VALUE *ptr = errinfo_place();
+    if (ptr) {
+	return *ptr;
+    }
+    else {
+	rb_thread_t *th = GET_THREAD();
+	return th->errinfo;
+    }
+}
+
+static VALUE
+errinfo_getter(ID id)
+{
+    return get_errinfo();
+}
+
+#if 0
+static void
+errinfo_setter(VALUE val, ID id, VALUE *var)
+{
+    if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
+	rb_raise(rb_eTypeError, "assigning non-exception to $!");
+    }
+    else {
+	VALUE *ptr = errinfo_place();
+	if (ptr) {
+	    *ptr = val;
+	}
+	else {
+	    rb_raise(rb_eRuntimeError, "errinfo_setter: not in rescue clause.");
+	}
+    }
+}
+#endif
+
+VALUE
+rb_errinfo(void)
+{
+    rb_thread_t *th = GET_THREAD();
+    return th->errinfo;
+}
+
+void
+rb_set_errinfo(VALUE err)
+{
+    if (!NIL_P(err) && !rb_obj_is_kind_of(err, rb_eException)) {
+	rb_raise(rb_eTypeError, "assigning non-exception to $!");
+    }
+    GET_THREAD()->errinfo = err;
+}
+
+VALUE
+rb_rubylevel_errinfo(void)
+{
+    return get_errinfo();
+}
+
+static VALUE
+errat_getter(ID id)
+{
+    VALUE err = get_errinfo();
+    if (!NIL_P(err)) {
+	return get_backtrace(err);
+    }
+    else {
+	return Qnil;
+    }
+}
+
+static void
+errat_setter(VALUE val, ID id, VALUE *var)
+{
+    VALUE err = get_errinfo();
+    if (NIL_P(err)) {
+	rb_raise(rb_eArgError, "$! not set");
+    }
+    set_backtrace(err, val);
+}
+
+int vm_collect_local_variables_in_heap(rb_thread_t *th, VALUE *dfp, VALUE ary);
+
+/*
+ *  call-seq:
+ *     local_variables    => array
+ *
+ *  Returns the names of the current local variables.
+ *
+ *     fred = 1
+ *     for i in 1..10
+ *        # ...
+ *     end
+ *     local_variables   #=> ["fred", "i"]
+ */
+
+static VALUE
+rb_f_local_variables(void)
+{
+    VALUE ary = rb_ary_new();
+    rb_thread_t *th = GET_THREAD();
+    rb_control_frame_t *cfp =
+	vm_get_ruby_level_caller_cfp(th, RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp));
+    int i;
+
+    while (cfp) {
+	if (cfp->iseq) {
+	    for (i = 0; i < cfp->iseq->local_table_size; i++) {
+		ID lid = cfp->iseq->local_table[i];
+		if (lid) {
+		    const char *vname = rb_id2name(lid);
+		    /* should skip temporary variable */
+		    if (vname) {
+			rb_ary_push(ary, ID2SYM(lid));
+		    }
+		}
+	    }
+	}
+	if (cfp->lfp != cfp->dfp) {
+	    /* block */
+	    VALUE *dfp = GC_GUARDED_PTR_REF(cfp->dfp[0]);
+
+	    if (vm_collect_local_variables_in_heap(th, dfp, ary)) {
+		break;
+	    }
+	    else {
+		while (cfp->dfp != dfp) {
+		    cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
+		}
+	    }
+	}
+	else {
+	    break;
+	}
+    }
+    return ary;
+}
+
+
+/*
+ *  call-seq:
+ *     __method__         => symbol
+ *     __callee__         => symbol
+ *
+ *  Returns the name of the current method as a Symbol.
+ *  If called outside of a method, it returns nil.
+ *
+ */
+
+static VALUE
+rb_f_method_name(void)
+{
+    ID fname = rb_frame_caller(); /* need *caller* ID */
+
+    if (fname) {
+	return ID2SYM(fname);
+    }
+    else {
+	return Qnil;
+    }
+}
+
+void
+Init_eval(void)
+{
+    rb_define_virtual_variable("$@", errat_getter, errat_setter);
+    rb_define_virtual_variable("$!", errinfo_getter, 0);
+
+    rb_define_global_function("iterator?", rb_f_block_given_p, 0);
+    rb_define_global_function("block_given?", rb_f_block_given_p, 0);
+
+    rb_define_global_function("raise", rb_f_raise, -1);
+    rb_define_global_function("fail", rb_f_raise, -1);
+
+    rb_define_global_function("global_variables", rb_f_global_variables, 0);	/* in variable.c */
+    rb_define_global_function("local_variables", rb_f_local_variables, 0);
+
+    rb_define_global_function("__method__", rb_f_method_name, 0);
+    rb_define_global_function("__callee__", rb_f_method_name, 0);
+
+    rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1);
+    rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1);
+    rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);
+
+    rb_undef_method(rb_cClass, "module_function");
+
+    {
+	extern void Init_vm_eval(void);
+	extern void Init_eval_method(void);
+	Init_vm_eval();
+	Init_eval_method();
+    }
+
+    rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0);
+    rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, -1);
+
+    rb_define_singleton_method(rb_vm_top_self(), "include", top_include, -1);
+
+    rb_define_method(rb_mKernel, "extend", rb_obj_extend, -1);
+
+    rb_define_global_function("trace_var", rb_f_trace_var, -1);	/* in variable.c */
+    rb_define_global_function("untrace_var", rb_f_untrace_var, -1);	/* in variable.c */
+
+    exception_error = rb_exc_new3(rb_eFatal,
+				  rb_obj_freeze(rb_str_new2("exception reentered")));
+    rb_ivar_set(exception_error, idThrowState, INT2FIX(TAG_FATAL));
+    OBJ_TAINT(exception_error);
+    OBJ_FREEZE(exception_error);
+}
diff --git a/lib/ruby-1.9.1-rc1/eval_error.c b/lib/ruby-1.9.1-rc1/eval_error.c
new file mode 100644
index 0000000..622ae4f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/eval_error.c
@@ -0,0 +1,272 @@
+/* -*-c-*- */
+/*
+ * included by eval.c
+ */
+
+static void
+warn_printf(const char *fmt, ...)
+{
+    char buf[BUFSIZ];
+    va_list args;
+
+    va_init_list(args, fmt);
+    vsnprintf(buf, BUFSIZ, fmt, args);
+    va_end(args);
+    rb_write_error(buf);
+}
+
+#define warn_print(x) rb_write_error(x)
+#define warn_print2(x,l) rb_write_error2(x,l)
+
+static void
+error_pos(void)
+{
+    const char *sourcefile = rb_sourcefile();
+    int sourceline = rb_sourceline();
+
+    if (sourcefile) {
+	if (sourceline == 0) {
+	    warn_printf("%s", sourcefile);
+	}
+	else if (rb_frame_callee()) {
+	    warn_printf("%s:%d:in `%s'", sourcefile, sourceline,
+			rb_id2name(rb_frame_callee()));
+	}
+	else {
+	    warn_printf("%s:%d", sourcefile, sourceline);
+	}
+    }
+}
+
+VALUE rb_check_backtrace(VALUE);
+
+static VALUE
+get_backtrace(VALUE info)
+{
+    if (NIL_P(info))
+	return Qnil;
+    info = rb_funcall(info, rb_intern("backtrace"), 0);
+    if (NIL_P(info))
+	return Qnil;
+    return rb_check_backtrace(info);
+}
+
+VALUE
+rb_get_backtrace(VALUE info)
+{
+    return get_backtrace(info);
+}
+
+static void
+set_backtrace(VALUE info, VALUE bt)
+{
+    rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
+}
+
+static void
+error_print(void)
+{
+    VALUE errat = Qnil;		/* OK */
+    VALUE errinfo = GET_THREAD()->errinfo;
+    volatile VALUE eclass, e;
+    const char *einfo;
+    long elen;
+
+    if (NIL_P(errinfo))
+	return;
+
+    PUSH_TAG();
+    if (EXEC_TAG() == 0) {
+	errat = get_backtrace(errinfo);
+    }
+    else {
+	errat = Qnil;
+    }
+    if (EXEC_TAG())
+	goto error;
+    if (NIL_P(errat)) {
+	const char *file = rb_sourcefile();
+	int line = rb_sourceline();
+	if (file)
+	    warn_printf("%s:%d", file, line);
+	else
+	    warn_printf("%d", line);
+    }
+    else if (RARRAY_LEN(errat) == 0) {
+	error_pos();
+    }
+    else {
+	VALUE mesg = RARRAY_PTR(errat)[0];
+
+	if (NIL_P(mesg))
+	    error_pos();
+	else {
+	    warn_print2(RSTRING_PTR(mesg), RSTRING_LEN(mesg));
+	}
+    }
+
+    eclass = CLASS_OF(errinfo);
+    if (EXEC_TAG() == 0) {
+	e = rb_funcall(errinfo, rb_intern("message"), 0, 0);
+	StringValue(e);
+	einfo = RSTRING_PTR(e);
+	elen = RSTRING_LEN(e);
+    }
+    else {
+	einfo = "";
+	elen = 0;
+    }
+    if (EXEC_TAG())
+	goto error;
+    if (eclass == rb_eRuntimeError && elen == 0) {
+	warn_print(": unhandled exception\n");
+    }
+    else {
+	VALUE epath;
+
+	epath = rb_class_name(eclass);
+	if (elen == 0) {
+	    warn_print(": ");
+	    warn_print2(RSTRING_PTR(epath), RSTRING_LEN(epath));
+	    warn_print("\n");
+	}
+	else {
+	    char *tail = 0;
+	    long len = elen;
+
+	    if (RSTRING_PTR(epath)[0] == '#')
+		epath = 0;
+	    if ((tail = memchr(einfo, '\n', elen)) != 0) {
+		len = tail - einfo;
+		tail++;		/* skip newline */
+	    }
+	    warn_print(": ");
+	    warn_print2(einfo, len);
+	    if (epath) {
+		warn_print(" (");
+		warn_print2(RSTRING_PTR(epath), RSTRING_LEN(epath));
+		warn_print(")\n");
+	    }
+	    if (tail) {
+		warn_print2(tail, elen - len - 1);
+		if (einfo[elen-1] != '\n') warn_print2("\n", 1);
+	    }
+	}
+    }
+
+    if (!NIL_P(errat)) {
+	long i;
+	long len = RARRAY_LEN(errat);
+	VALUE *ptr = RARRAY_PTR(errat);
+        int skip = eclass == rb_eSysStackError;
+	
+#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
+#define TRACE_HEAD 8
+#define TRACE_TAIL 5
+
+	for (i = 1; i < len; i++) {
+	    if (TYPE(ptr[i]) == T_STRING) {
+		warn_printf("\tfrom %s\n", RSTRING_PTR(ptr[i]));
+	    }
+	    if (skip && i == TRACE_HEAD && len > TRACE_MAX) {
+		warn_printf("\t ... %ld levels...\n",
+			    len - TRACE_HEAD - TRACE_TAIL);
+		i = len - TRACE_TAIL;
+	    }
+	}
+    }
+  error:
+    POP_TAG();
+}
+
+void
+ruby_error_print(void)
+{
+    error_print();
+}
+
+void
+rb_print_undef(VALUE klass, ID id, int scope)
+{
+    const char *v;
+
+    switch (scope) {
+      default:
+      case NOEX_PUBLIC: v = ""; break;
+      case NOEX_PRIVATE: v = " private"; break;
+      case NOEX_PROTECTED: v = " protected"; break;
+    }
+    rb_name_error(id, "undefined%s method `%s' for %s `%s'", v,
+		  rb_id2name(id),
+		  (TYPE(klass) == T_MODULE) ? "module" : "class",
+		  rb_class2name(klass));
+}
+
+static int
+sysexit_status(VALUE err)
+{
+    VALUE st = rb_iv_get(err, "status");
+    return NUM2INT(st);
+}
+
+static int
+error_handle(int ex)
+{
+    int status = EXIT_FAILURE;
+    rb_thread_t *th = GET_THREAD();
+
+    if (rb_thread_set_raised(th))
+	return EXIT_FAILURE;
+    switch (ex & TAG_MASK) {
+      case 0:
+	status = EXIT_SUCCESS;
+	break;
+
+      case TAG_RETURN:
+	error_pos();
+	warn_print(": unexpected return\n");
+	break;
+      case TAG_NEXT:
+	error_pos();
+	warn_print(": unexpected next\n");
+	break;
+      case TAG_BREAK:
+	error_pos();
+	warn_print(": unexpected break\n");
+	break;
+      case TAG_REDO:
+	error_pos();
+	warn_print(": unexpected redo\n");
+	break;
+      case TAG_RETRY:
+	error_pos();
+	warn_print(": retry outside of rescue clause\n");
+	break;
+      case TAG_THROW:
+	/* TODO: fix me */
+	error_pos();
+	warn_printf(": unexpected throw\n");
+	break;
+      case TAG_RAISE: {
+	VALUE errinfo = GET_THREAD()->errinfo;
+	if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) {
+	    status = sysexit_status(errinfo);
+	}
+	else if (rb_obj_is_instance_of(errinfo, rb_eSignal)) {
+	    /* no message when exiting by signal */
+	}
+	else {
+	    error_print();
+	}
+	break;
+      }
+      case TAG_FATAL:
+	error_print();
+	break;
+      default:
+	rb_bug("Unknown longjmp status %d", ex);
+	break;
+    }
+    rb_thread_reset_raised(th);
+    return status;
+}
diff --git a/lib/ruby-1.9.1-rc1/eval_intern.h b/lib/ruby-1.9.1-rc1/eval_intern.h
new file mode 100644
index 0000000..a4c4540
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/eval_intern.h
@@ -0,0 +1,209 @@
+#ifndef RUBY_EVAL_INTERN_H
+#define RUBY_EVAL_INTERN_H
+
+#include "ruby/ruby.h"
+#include "vm_core.h"
+
+#define PASS_PASSED_BLOCK_TH(th) do { \
+    (th)->passed_block = GC_GUARDED_PTR_REF((rb_block_t *)(th)->cfp->lfp[0]); \
+    (th)->cfp->flag |= VM_FRAME_FLAG_PASSED; \
+} while (0)
+
+#define PASS_PASSED_BLOCK() do { \
+    rb_thread_t * const __th__ = GET_THREAD(); \
+    PASS_PASSED_BLOCK_TH(__th__); \
+} while (0)
+
+#ifdef HAVE_STDLIB_H
+#include 
+#endif
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
+#include 
+#include 
+
+#ifdef __APPLE__
+#include 
+#endif
+
+/* Make alloca work the best possible way.  */
+#ifdef __GNUC__
+# ifndef atarist
+#  ifndef alloca
+#   define alloca __builtin_alloca
+#  endif
+# endif	/* atarist */
+#else
+# ifdef HAVE_ALLOCA_H
+#  include 
+# else
+#  ifdef _AIX
+#pragma alloca
+#  else
+#   ifndef alloca		/* predefined by HP cc +Olibcalls */
+void *alloca();
+#   endif
+#  endif /* AIX */
+# endif	/* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
+
+#ifndef HAVE_STRING_H
+char *strrchr(const char *, const char);
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include 
+#endif
+
+#ifdef HAVE_NET_SOCKET_H
+#include 
+#endif
+
+#define ruby_setjmp(env) RUBY_SETJMP(env)
+#define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
+#ifdef __CYGWIN__
+int _setjmp(), _longjmp();
+#endif
+
+#include 
+#include 
+#include 
+
+#ifdef HAVE_SYS_SELECT_H
+#include 
+#endif
+
+/*
+  Solaris sys/select.h switches select to select_large_fdset to support larger
+  file descriptors if FD_SETSIZE is larger than 1024 on 32bit environment.
+  But Ruby doesn't change FD_SETSIZE because fd_set is allocated dynamically.
+  So following definition is required to use select_large_fdset.
+*/
+#ifdef HAVE_SELECT_LARGE_FDSET
+#define select(n, r, w, e, t) select_large_fdset(n, r, w, e, t)
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include 
+#endif
+
+#include 
+
+#define SAVE_ROOT_JMPBUF(th, stmt) do \
+  if (ruby_setjmp((th)->root_jmpbuf) == 0) { \
+      stmt; \
+  } \
+  else { \
+      rb_fiber_start(); \
+  } while (0)
+
+#define TH_PUSH_TAG(th) do { \
+  rb_thread_t * const _th = th; \
+  struct rb_vm_tag _tag; \
+  _tag.tag = 0; \
+  _tag.prev = _th->tag; \
+  _th->tag = &_tag;
+
+#define TH_POP_TAG() \
+  _th->tag = _tag.prev; \
+} while (0)
+
+#define TH_POP_TAG2() \
+  _th->tag = _tag.prev
+
+#define PUSH_TAG() TH_PUSH_TAG(GET_THREAD())
+#define POP_TAG()      TH_POP_TAG()
+
+#define TH_EXEC_TAG() ruby_setjmp(_th->tag->buf)
+
+#define EXEC_TAG() \
+  TH_EXEC_TAG()
+
+#define TH_JUMP_TAG(th, st) do { \
+  ruby_longjmp(th->tag->buf,(st)); \
+} while (0)
+
+#define JUMP_TAG(st) TH_JUMP_TAG(GET_THREAD(), st)
+
+enum ruby_tag_type {
+    RUBY_TAG_RETURN	= 0x1,
+    RUBY_TAG_BREAK	= 0x2,
+    RUBY_TAG_NEXT	= 0x3,
+    RUBY_TAG_RETRY	= 0x4,
+    RUBY_TAG_REDO	= 0x5,
+    RUBY_TAG_RAISE	= 0x6,
+    RUBY_TAG_THROW	= 0x7,
+    RUBY_TAG_FATAL	= 0x8,
+    RUBY_TAG_MASK	= 0xf
+};
+#define TAG_RETURN	RUBY_TAG_RETURN
+#define TAG_BREAK	RUBY_TAG_BREAK
+#define TAG_NEXT	RUBY_TAG_NEXT
+#define TAG_RETRY	RUBY_TAG_RETRY
+#define TAG_REDO	RUBY_TAG_REDO
+#define TAG_RAISE	RUBY_TAG_RAISE
+#define TAG_THROW	RUBY_TAG_THROW
+#define TAG_FATAL	RUBY_TAG_FATAL
+#define TAG_MASK	RUBY_TAG_MASK
+
+#define NEW_THROW_OBJECT(val, pt, st) \
+  ((VALUE)NEW_NODE(NODE_LIT, (val), (pt), (st)))
+#define SET_THROWOBJ_CATCH_POINT(obj, val) \
+  (RNODE((obj))->u2.value = (val))
+#define SET_THROWOBJ_STATE(obj, val) \
+  (RNODE((obj))->u3.value = (val))
+
+#define GET_THROWOBJ_VAL(obj)         ((VALUE)RNODE((obj))->u1.value)
+#define GET_THROWOBJ_CATCH_POINT(obj) ((VALUE*)RNODE((obj))->u2.value)
+#define GET_THROWOBJ_STATE(obj)       ((int)RNODE((obj))->u3.value)
+
+#define SCOPE_TEST(f)  (vm_cref()->nd_visi & (f))
+#define SCOPE_CHECK(f) (vm_cref()->nd_visi == (f))
+#define SCOPE_SET(f)   (vm_cref()->nd_visi = (f))
+
+#define CHECK_STACK_OVERFLOW(cfp, margin) do \
+  if (((VALUE *)(cfp)->sp) + (margin) + sizeof(rb_control_frame_t) >= ((VALUE *)cfp)) { \
+      rb_exc_raise(sysstack_error); \
+  } \
+while (0)
+
+void rb_thread_cleanup(void);
+void rb_thread_wait_other_threads(void);
+
+enum {
+    RAISED_EXCEPTION = 1,
+    RAISED_STACKOVERFLOW = 2,
+    RAISED_NOMEMORY = 4
+};
+int rb_thread_set_raised(rb_thread_t *th);
+int rb_thread_reset_raised(rb_thread_t *th);
+#define rb_thread_raised_set(th, f)   ((th)->raised_flag |= (f))
+#define rb_thread_raised_reset(th, f) ((th)->raised_flag &= ~(f))
+#define rb_thread_raised_p(th, f)     (((th)->raised_flag & (f)) != 0)
+#define rb_thread_raised_clear(th)    ((th)->raised_flag = 0)
+
+VALUE rb_f_eval(int argc, VALUE *argv, VALUE self);
+VALUE rb_make_exception(int argc, VALUE *argv);
+
+NORETURN(void rb_fiber_start(void));
+
+NORETURN(void rb_print_undef(VALUE, ID, int));
+NORETURN(void vm_localjump_error(const char *,VALUE, int));
+NORETURN(void vm_jump_tag_but_local_jump(int, VALUE));
+
+VALUE vm_make_jump_tag_but_local_jump(int state, VALUE val);
+NODE *vm_cref(void);
+rb_control_frame_t *vm_get_ruby_level_caller_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
+VALUE rb_obj_is_proc(VALUE);
+VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
+void rb_thread_terminate_all(void);
+VALUE rb_vm_top_self();
+VALUE rb_vm_cbase(void);
+void rb_trap_restore_mask(void);
+
+#endif /* RUBY_EVAL_INTERN_H */
diff --git a/lib/ruby-1.9.1-rc1/eval_jump.c b/lib/ruby-1.9.1-rc1/eval_jump.c
new file mode 100644
index 0000000..f474844
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/eval_jump.c
@@ -0,0 +1,151 @@
+/* -*-c-*- */
+/*
+ * from eval.c
+ */
+
+#include "eval_intern.h"
+
+/* exit */
+
+void
+rb_call_end_proc(VALUE data)
+{
+    rb_proc_call(data, rb_ary_new());
+}
+
+/*
+ *  call-seq:
+ *     at_exit { block } -> proc
+ *
+ *  Converts _block_ to a +Proc+ object (and therefore
+ *  binds it at the point of call) and registers it for execution when
+ *  the program exits. If multiple handlers are registered, they are
+ *  executed in reverse order of registration.
+ *
+ *     def do_at_exit(str1)
+ *       at_exit { print str1 }
+ *     end
+ *     at_exit { puts "cruel world" }
+ *     do_at_exit("goodbye ")
+ *     exit
+ *
+ *  produces:
+ *
+ *     goodbye cruel world
+ */
+
+static VALUE
+rb_f_at_exit(void)
+{
+    VALUE proc;
+
+    if (!rb_block_given_p()) {
+	rb_raise(rb_eArgError, "called without a block");
+    }
+    proc = rb_block_proc();
+    rb_set_end_proc(rb_call_end_proc, proc);
+    return proc;
+}
+
+struct end_proc_data {
+    void (*func) ();
+    VALUE data;
+    int safe;
+    struct end_proc_data *next;
+};
+
+static struct end_proc_data *end_procs, *ephemeral_end_procs, *tmp_end_procs;
+
+void
+rb_set_end_proc(void (*func)(VALUE), VALUE data)
+{
+    struct end_proc_data *link = ALLOC(struct end_proc_data);
+    struct end_proc_data **list;
+    rb_thread_t *th = GET_THREAD();
+
+    if (th->top_wrapper) {
+	list = &ephemeral_end_procs;
+    }
+    else {
+	list = &end_procs;
+    }
+    link->next = *list;
+    link->func = func;
+    link->data = data;
+    link->safe = rb_safe_level();
+    *list = link;
+}
+
+void
+rb_mark_end_proc(void)
+{
+    struct end_proc_data *link;
+
+    link = end_procs;
+    while (link) {
+	rb_gc_mark(link->data);
+	link = link->next;
+    }
+    link = ephemeral_end_procs;
+    while (link) {
+	rb_gc_mark(link->data);
+	link = link->next;
+    }
+    link = tmp_end_procs;
+    while (link) {
+	rb_gc_mark(link->data);
+	link = link->next;
+    }
+}
+
+void
+rb_exec_end_proc(void)
+{
+    struct end_proc_data *link, *tmp;
+    int status;
+    volatile int safe = rb_safe_level();
+
+    while (ephemeral_end_procs) {
+	tmp_end_procs = link = ephemeral_end_procs;
+	ephemeral_end_procs = 0;
+	while (link) {
+	    PUSH_TAG();
+	    if ((status = EXEC_TAG()) == 0) {
+		rb_set_safe_level_force(link->safe);
+		(*link->func) (link->data);
+	    }
+	    POP_TAG();
+	    if (status) {
+		error_handle(status);
+	    }
+	    tmp = link;
+	    tmp_end_procs = link = link->next;
+	    xfree(tmp);
+	}
+    }
+    while (end_procs) {
+	tmp_end_procs = link = end_procs;
+	end_procs = 0;
+	while (link) {
+	    PUSH_TAG();
+	    if ((status = EXEC_TAG()) == 0) {
+		rb_set_safe_level_force(link->safe);
+		(*link->func) (link->data);
+	    }
+	    POP_TAG();
+	    if (status) {
+		error_handle(status);
+	    }
+	    tmp = link;
+	    tmp_end_procs = link = link->next;
+	    xfree(tmp);
+	}
+    }
+    rb_set_safe_level_force(safe);
+}
+
+void
+Init_jump(void)
+{
+    rb_define_global_function("at_exit", rb_f_at_exit, 0);
+}
diff --git a/lib/ruby-1.9.1-rc1/ext/.cvsignore b/lib/ruby-1.9.1-rc1/ext/.cvsignore
new file mode 100644
index 0000000..ab2424f
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/.cvsignore
@@ -0,0 +1,2 @@
+extinit.c
+*.log
diff --git a/lib/ruby-1.9.1-rc1/ext/.document b/lib/ruby-1.9.1-rc1/ext/.document
new file mode 100644
index 0000000..ecfad12
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/.document
@@ -0,0 +1,16 @@
+# Add files to this as they become documented
+
+bigdecimal/bigdecimal.c
+digest/digest.c
+etc/etc.c
+fcntl/fcntl.c
+iconv/iconv.c
+io/wait/wait.c
+nkf/lib/kconv.rb
+nkf/nkf.c
+readline/readline.c
+socket/socket.c
+stringio/stringio.c
+strscan/strscan.c
+win32ole
+zlib/zlib.c
diff --git a/lib/ruby-1.9.1-rc1/ext/Setup b/lib/ruby-1.9.1-rc1/ext/Setup
new file mode 100644
index 0000000..b0f29b9
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/Setup
@@ -0,0 +1,32 @@
+#option nodynamic
+
+#Win32API
+#bigdecimal
+#curses
+#dbm
+#digest
+#digest/md5
+#digest/rmd160
+#digest/sha1
+#digest/sha2
+#dl
+#etc
+#fcntl
+#gdbm
+#iconv
+#io/wait
+#nkf
+#openssl
+#pty
+#racc/cparse
+#readline
+#ripper
+#sdbm
+#socket
+#stringio
+#strscan
+#syck
+#syslog
+#tk
+#win32ole
+#zlib
diff --git a/lib/ruby-1.9.1-rc1/ext/Setup.atheos b/lib/ruby-1.9.1-rc1/ext/Setup.atheos
new file mode 100644
index 0000000..6e0b8ae
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/Setup.atheos
@@ -0,0 +1,33 @@
+option nodynamic
+
+#Win32API
+bigdecimal
+curses
+dbm
+digest
+digest/md5
+digest/rmd160
+digest/sha1
+digest/sha2
+dl
+enumerator
+etc
+fcntl
+gdbm
+iconv
+io/wait
+nkf
+#openssl
+pty
+racc/parse
+readline
+ripper
+sdbm
+socket
+stringio
+strscan
+syck
+syslog
+#tk
+#win32ole
+zlib
diff --git a/lib/ruby-1.9.1-rc1/ext/Setup.emx b/lib/ruby-1.9.1-rc1/ext/Setup.emx
new file mode 100644
index 0000000..fade917
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/Setup.emx
@@ -0,0 +1,33 @@
+option nodynamic
+
+#Win32API
+bigdecimal
+curses
+#dbm
+digest
+digest/md5
+digest/rmd160
+digest/sha1
+digest/sha2
+#dl
+enumerator
+etc
+fcntl
+#gdbm
+#iconv
+#io/wait
+nkf
+#openssl
+#pty
+racc/cparse
+#readline
+#ripper
+#sdbm
+socket
+stringio
+strscan
+#syck
+#syslog
+#tk
+#win32ole
+#zlib
diff --git a/lib/ruby-1.9.1-rc1/ext/Setup.nt b/lib/ruby-1.9.1-rc1/ext/Setup.nt
new file mode 100644
index 0000000..c8574ba
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/Setup.nt
@@ -0,0 +1,33 @@
+#option nodynamic
+
+Win32API
+bigdecimal
+#curses
+#dbm
+digest
+digest/md5
+digest/rmd160
+digest/sha1
+digest/sha2
+dl
+enumerator
+etc
+fcntl
+#gdbm
+#iconv
+#io/wait
+nkf
+#openssl
+#pty
+racc/cparse
+#readline
+#ripper
+sdbm
+socket
+stringio
+strscan
+syck
+#syslog
+#tk
+win32ole
+#zlib
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/.cvsignore b/lib/ruby-1.9.1-rc1/ext/bigdecimal/.cvsignore
new file mode 100644
index 0000000..814345e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/.cvsignore
@@ -0,0 +1,4 @@
+Makefile
+mkmf.log
+*.def
+extconf.h
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/README b/lib/ruby-1.9.1-rc1/ext/bigdecimal/README
new file mode 100644
index 0000000..a233f47
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/README
@@ -0,0 +1,60 @@
+
+  Ruby BIGDECIMAL(Variable Precision) extension library.
+  Copyright (C) 1999  by Shigeo Kobayashi(shigeo@tinyforest.gr.jp)
+
+BigDecimal is copyrighted free software by Shigeo Kobayashi .
+You can redistribute it and/or modify it under either the terms of the GPL
+(see COPYING file), or the conditions below:
+
+  1. You may make and give away verbatim copies of the source form of the
+     software without restriction, provided that you duplicate all of the
+     original copyright notices and associated disclaimers.
+
+  2. You may modify your copy of the software in any way, provided that
+     you do at least ONE of the following:
+
+       a) place your modifications in the Public Domain or otherwise
+          make them Freely Available, such as by posting said
+	  modifications to Usenet or an equivalent medium, or by allowing
+	  the author to include your modifications in the software.
+
+       b) use the modified software only within your corporation or
+          organization.
+
+       c) rename any non-standard executables so the names do not conflict
+	  with standard executables, which must also be provided.
+
+       d) make other distribution arrangements with the author.
+
+  3. You may distribute the software in object code or executable
+     form, provided that you do at least ONE of the following:
+
+       a) distribute the executables and library files of the software,
+	  together with instructions (in the manual page or equivalent)
+	  on where to get the original distribution.
+
+       b) accompany the distribution with the machine-readable source of
+	  the software.
+
+       c) give non-standard executables non-standard names, with
+          instructions on where to get the original software distribution.
+
+       d) make other distribution arrangements with the author.
+
+  4. You may modify and include the part of the software into any other
+     software (possibly commercial).
+
+  5. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+     WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+     PURPOSE.
+
+* The Author
+
+Feel free to send comments and bug reports to the author.  Here is the 
+author's latest mail address:
+
+  shigeo@tinyforest.gr.jp
+
+-------------------------------------------------------
+created at: Thu Dec 22 1999
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.c b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.c
new file mode 100644
index 0000000..93fab7b
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.c
@@ -0,0 +1,4803 @@
+/*
+ *
+ * Ruby BigDecimal(Variable decimal precision) extension library.
+ *
+ * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp)
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file
+ * of this BigDecimal distribution.
+ *
+ *  NOTE: Change log in this source removed to reduce source code size. 
+ *        See rev. 1.25 if needed.
+ *
+ */
+
+#include "ruby/ruby.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "math.h"
+
+#ifdef HAVE_IEEEFP_H
+#include 
+#endif
+ 
+/* #define ENABLE_NUMERIC_STRING */
+
+VALUE rb_cBigDecimal;
+
+#include "bigdecimal.h"
+
+/* MACRO's to guard objects from GC by keeping them in stack */
+#define ENTER(n) volatile VALUE vStack[n];int iStack=0
+#define PUSH(x)  vStack[iStack++] = (unsigned long)(x);
+#define SAVE(p)  PUSH(p->obj);
+#define GUARD_OBJ(p,y) {p=y;SAVE(p);}
+
+/*
+ * ================== Ruby Interface part ==========================
+ */
+#define DoSomeOne(x,y,f) rb_num_coerce_bin(x,y,f)
+
+#if 0
+/* BigDecimal provides arbitrary-precision floating point decimal arithmetic.
+ *
+ * Copyright (C) 2002 by Shigeo Kobayashi .
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file
+ * of the BigDecimal distribution.
+ *
+ * Documented by mathew .
+ *
+ * = Introduction
+ *
+ * Ruby provides built-in support for arbitrary precision integer arithmetic.
+ * For example:
+ *
+ * 42**13   ->   1265437718438866624512
+ *
+ * BigDecimal provides similar support for very large or very accurate floating
+ * point numbers.
+ *
+ * Decimal arithmetic is also useful for general calculation, because it
+ * provides the correct answers people expect--whereas normal binary floating
+ * point arithmetic often introduces subtle errors because of the conversion
+ * between base 10 and base 2. For example, try:
+ *
+ *   sum = 0
+ *   for i in (1..10000)
+ *     sum = sum + 0.0001
+ *   end
+ *   print sum
+ *
+ * and contrast with the output from:
+ *
+ *   require 'bigdecimal'
+ *
+ *   sum = BigDecimal.new("0")
+ *   for i in (1..10000)
+ *     sum = sum + BigDecimal.new("0.0001")
+ *   end
+ *   print sum
+ *
+ * Similarly:
+ *
+ * (BigDecimal.new("1.2") - BigDecimal("1.0")) == BigDecimal("0.2") -> true
+ *
+ * (1.2 - 1.0) == 0.2 -> false
+ *
+ * = Special features of accurate decimal arithmetic
+ *
+ * Because BigDecimal is more accurate than normal binary floating point
+ * arithmetic, it requires some special values.
+ *
+ * == Infinity
+ *
+ * BigDecimal sometimes needs to return infinity, for example if you divide
+ * a value by zero.
+ *
+ * BigDecimal.new("1.0") / BigDecimal.new("0.0")  -> infinity
+ *
+ * BigDecimal.new("-1.0") / BigDecimal.new("0.0")  -> -infinity
+ *
+ * You can represent infinite numbers to BigDecimal using the strings
+ * 'Infinity', '+Infinity' and '-Infinity' (case-sensitive)
+ *
+ * == Not a Number
+ *
+ * When a computation results in an undefined value, the special value NaN
+ * (for 'not a number') is returned.
+ *
+ * Example:
+ *
+ * BigDecimal.new("0.0") / BigDecimal.new("0.0") -> NaN
+ *
+ * You can also create undefined values.  NaN is never considered to be the
+ * same as any other value, even NaN itself:
+ *
+ * n = BigDecimal.new('NaN')
+ *
+ * n == 0.0 -> nil
+ *
+ * n == n -> nil
+ *
+ * == Positive and negative zero
+ *
+ * If a computation results in a value which is too small to be represented as
+ * a BigDecimal within the currently specified limits of precision, zero must
+ * be returned.
+ *
+ * If the value which is too small to be represented is negative, a BigDecimal
+ * value of negative zero is returned. If the value is positive, a value of
+ * positive zero is returned.
+ *
+ * BigDecimal.new("1.0") / BigDecimal.new("-Infinity") -> -0.0
+ *
+ * BigDecimal.new("1.0") / BigDecimal.new("Infinity") -> 0.0
+ *
+ * (See BigDecimal.mode for how to specify limits of precision.)
+ *
+ * Note that -0.0 and 0.0 are considered to be the same for the purposes of
+ * comparison.
+ *
+ * Note also that in mathematics, there is no particular concept of negative 
+ * or positive zero; true mathematical zero has no sign.
+ */
+void
+Init_BigDecimal()
+{
+    /* This is a #if-ed out function to fool Rdoc into documenting the class. */
+    /* The real init function is Init_bigdecimal() further down. */
+}
+#endif
+
+/*
+ * Returns the BigDecimal version number.
+ *
+ * Ruby 1.8.0 returns 1.0.0.
+ * Ruby 1.8.1 thru 1.8.3 return 1.0.1.
+ */
+static VALUE
+BigDecimal_version(VALUE self)
+{
+    /*
+     * 1.0.0: Ruby 1.8.0
+     * 1.0.1: Ruby 1.8.1
+    */
+    return rb_str_new2("1.0.1");
+}
+
+/*
+ *   VP routines used in BigDecimal part 
+ */
+static unsigned short VpGetException(void);
+static void  VpSetException(unsigned short f);
+static void  VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v);
+static int   VpLimitRound(Real *c,U_LONG ixDigit);
+
+/*
+ *  **** BigDecimal part ****
+ */
+
+static void
+BigDecimal_delete(Real *pv)
+{
+    VpFree(pv);
+}
+
+static VALUE
+ToValue(Real *p)
+{
+    if(VpIsNaN(p)) {
+        VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
+    } else if(VpIsPosInf(p)) {
+        VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
+    } else if(VpIsNegInf(p)) {
+        VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
+    }
+    return p->obj;
+}
+
+static Real *
+GetVpValue(VALUE v, int must)
+{
+    Real *pv;
+    VALUE bg;
+    char szD[128];
+
+    switch(TYPE(v))
+    {
+    case T_DATA:
+        if(RDATA(v)->dfree ==(void *) BigDecimal_delete) {
+            Data_Get_Struct(v, Real, pv);
+            return pv;
+        } else {
+            goto SomeOneMayDoIt;
+        }
+        break;
+    case T_FIXNUM:
+        sprintf(szD, "%ld", FIX2LONG(v));
+        return VpCreateRbObject(VpBaseFig() * 2 + 1, szD);
+
+#ifdef ENABLE_NUMERIC_STRING
+    case T_STRING:
+        SafeStringValue(v);
+        return VpCreateRbObject(strlen(RSTRING_PTR(v)) + VpBaseFig() + 1,
+                                RSTRING_PTR(v));
+#endif /* ENABLE_NUMERIC_STRING */
+
+    case T_BIGNUM:
+        bg = rb_big2str(v, 10);
+        return VpCreateRbObject(strlen(RSTRING_PTR(bg)) + VpBaseFig() + 1,
+                                RSTRING_PTR(bg));
+    default:
+        goto SomeOneMayDoIt;
+    }
+
+SomeOneMayDoIt:
+    if(must) {
+        rb_raise(rb_eTypeError, "%s can't be coerced into BigDecimal",
+                    rb_special_const_p(v)?
+                    RSTRING_PTR(rb_inspect(v)):
+                    rb_obj_classname(v)
+                );
+    }
+    return NULL; /* NULL means to coerce */
+}
+
+/* call-seq:
+ * BigDecimal.double_fig
+ *
+ * The BigDecimal.double_fig class method returns the number of digits a
+ * Float number is allowed to have. The result depends upon the CPU and OS
+ * in use.
+ */
+static VALUE
+BigDecimal_double_fig(VALUE self)
+{
+    return INT2FIX(VpDblFig());
+}
+
+/* call-seq:
+ * precs
+ *
+ * Returns an Array of two Integer values.
+ *
+ * The first value is the current number of significant digits in the 
+ * BigDecimal. The second value is the maximum number of significant digits
+ * for the BigDecimal.
+ */
+static VALUE
+BigDecimal_prec(VALUE self)
+{
+    ENTER(1);
+    Real *p;
+    VALUE obj;
+
+    GUARD_OBJ(p,GetVpValue(self,1));
+    obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
+		       INT2NUM(p->MaxPrec*VpBaseFig()));
+    return obj;
+}
+
+static VALUE
+BigDecimal_hash(VALUE self)
+{
+    ENTER(1);
+    Real *p;
+    U_LONG hash,i;
+
+    GUARD_OBJ(p,GetVpValue(self,1));
+    hash = (U_LONG)p->sign;
+    /* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */
+    if(hash==2) {
+        for(i = 0; i < p->Prec;i++) {
+            hash = 31 * hash + p->frac[i];
+            hash ^= p->frac[i];
+        }
+        hash += p->exponent;
+    }
+    return INT2FIX(hash);
+}
+
+static VALUE
+BigDecimal_dump(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *vp;
+    char *psz;
+    VALUE dummy;
+    volatile VALUE dump;
+
+    rb_scan_args(argc, argv, "01", &dummy);
+    GUARD_OBJ(vp,GetVpValue(self,1));
+    dump = rb_str_new(0,VpNumOfChars(vp,"E")+50);
+    psz = RSTRING_PTR(dump);
+    sprintf(psz,"%lu:",VpMaxPrec(vp)*VpBaseFig());
+    VpToString(vp, psz+strlen(psz), 0, 0);
+    rb_str_resize(dump, strlen(psz));
+    return dump;
+}
+
+/*
+ * Internal method used to provide marshalling support. See the Marshal module.
+ */
+static VALUE
+BigDecimal_load(VALUE self, VALUE str)
+{
+    ENTER(2);
+    Real *pv;
+    unsigned char *pch;
+    unsigned char ch;
+    unsigned long m=0;
+
+    SafeStringValue(str);
+    pch = (unsigned char *)RSTRING_PTR(str);
+    /* First get max prec */
+    while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
+        if(!ISDIGIT(ch)) {
+            rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
+        }
+        m = m*10 + (unsigned long)(ch-'0');
+    }
+    if(m>VpBaseFig()) m -= VpBaseFig();
+    GUARD_OBJ(pv,VpNewRbClass(m,(char *)pch,self));
+    m /= VpBaseFig();
+    if(m && pv->MaxPrec>m) pv->MaxPrec = m+1;
+    return ToValue(pv);
+}
+
+ /* call-seq:
+  * BigDecimal.mode(mode, value)
+  *
+  * Controls handling of arithmetic exceptions and rounding. If no value
+  * is supplied, the current value is returned.
+  *
+  * Six values of the mode parameter control the handling of arithmetic
+  * exceptions:
+  *
+  * BigDecimal::EXCEPTION_NaN
+  * BigDecimal::EXCEPTION_INFINITY
+  * BigDecimal::EXCEPTION_UNDERFLOW
+  * BigDecimal::EXCEPTION_OVERFLOW
+  * BigDecimal::EXCEPTION_ZERODIVIDE
+  * BigDecimal::EXCEPTION_ALL
+  *
+  * For each mode parameter above, if the value set is false, computation 
+  * continues after an arithmetic exception of the appropriate type. 
+  * When computation continues, results are as follows:
+  *
+  * EXCEPTION_NaN:: NaN
+  * EXCEPTION_INFINITY:: +infinity or -infinity
+  * EXCEPTION_UNDERFLOW:: 0
+  * EXCEPTION_OVERFLOW:: +infinity or -infinity
+  * EXCEPTION_ZERODIVIDE:: +infinity or -infinity
+  *
+  * One value of the mode parameter controls the rounding of numeric values:
+  * BigDecimal::ROUND_MODE. The values it can take are:
+  *
+  * ROUND_UP:: round away from zero
+  * ROUND_DOWN:: round towards zero (truncate)
+  * ROUND_HALF_UP:: round up if the appropriate digit >= 5, otherwise truncate (default)
+  * ROUND_HALF_DOWN:: round up if the appropriate digit >= 6, otherwise truncate
+  * ROUND_HALF_EVEN:: round towards the even neighbor (Banker's rounding)
+  * ROUND_CEILING:: round towards positive infinity (ceil)
+  * ROUND_FLOOR:: round towards negative infinity (floor)
+  *
+  */
+static VALUE
+BigDecimal_mode(int argc, VALUE *argv, VALUE self)
+{
+    VALUE which;
+    VALUE val;
+    unsigned long f,fo;
+ 
+    if(rb_scan_args(argc,argv,"11",&which,&val)==1) val = Qnil;
+
+    Check_Type(which, T_FIXNUM);
+    f = (unsigned long)FIX2INT(which);
+
+    if(f&VP_EXCEPTION_ALL) {
+        /* Exception mode setting */
+        fo = VpGetException();
+        if(val==Qnil) return INT2FIX(fo);
+        if(val!=Qfalse && val!=Qtrue) {
+            rb_raise(rb_eTypeError, "second argument must be true or false");
+            return Qnil; /* Not reached */
+        }
+        if(f&VP_EXCEPTION_INFINITY) {
+            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
+                           (fo&(~VP_EXCEPTION_INFINITY))));
+        }
+        fo = VpGetException();
+        if(f&VP_EXCEPTION_NaN) {
+            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):
+                           (fo&(~VP_EXCEPTION_NaN))));
+        }
+        fo = VpGetException();
+        if(f&VP_EXCEPTION_UNDERFLOW) {
+            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_UNDERFLOW):
+                           (fo&(~VP_EXCEPTION_UNDERFLOW))));
+        }
+        fo = VpGetException();
+        if(f&VP_EXCEPTION_ZERODIVIDE) {
+            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_ZERODIVIDE):
+                           (fo&(~VP_EXCEPTION_ZERODIVIDE))));
+        }
+        fo = VpGetException();
+        return INT2FIX(fo);
+    }
+    if(VP_ROUND_MODE==f) {
+        /* Rounding mode setting */
+        fo = VpGetRoundMode();
+        if(val==Qnil) return INT2FIX(fo);
+        Check_Type(val, T_FIXNUM);
+        if(!VpIsRoundMode(FIX2INT(val))) {
+            rb_raise(rb_eTypeError, "invalid rounding mode");
+            return Qnil;
+        }
+        fo = VpSetRoundMode((unsigned long)FIX2INT(val));
+        return INT2FIX(fo);
+    }
+    rb_raise(rb_eTypeError, "first argument for BigDecimal#mode invalid");
+    return Qnil;
+}
+
+static U_LONG
+GetAddSubPrec(Real *a, Real *b)
+{
+    U_LONG mxs;
+    U_LONG mx = a->Prec;
+    S_INT d;
+
+    if(!VpIsDef(a) || !VpIsDef(b)) return (-1L);
+    if(mx < b->Prec) mx = b->Prec;
+    if(a->exponent!=b->exponent) {
+        mxs = mx;
+        d = a->exponent - b->exponent;
+        if(d<0) d = -d;
+        mx = mx+(U_LONG)d;
+        if(mxobj = (VALUE)Data_Wrap_Struct(klass, 0, BigDecimal_delete, pv);
+    return pv;
+}
+
+VP_EXPORT Real *
+VpCreateRbObject(U_LONG mx, const char *str)
+{
+    Real *pv = VpAlloc(mx,str);
+    pv->obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);
+    return pv;
+}
+
+/* Returns True if the value is Not a Number */
+static VALUE
+BigDecimal_IsNaN(VALUE self)
+{
+    Real *p = GetVpValue(self,1);
+    if(VpIsNaN(p))  return Qtrue;
+    return Qfalse;
+}
+
+/* Returns True if the value is infinite */
+static VALUE
+BigDecimal_IsInfinite(VALUE self)
+{
+    Real *p = GetVpValue(self,1);
+    if(VpIsPosInf(p)) return INT2FIX(1);
+    if(VpIsNegInf(p)) return INT2FIX(-1);
+    return Qnil;
+}
+
+/* Returns True if the value is finite (not NaN or infinite) */
+static VALUE
+BigDecimal_IsFinite(VALUE self)
+{
+    Real *p = GetVpValue(self,1);
+    if(VpIsNaN(p)) return Qfalse;
+    if(VpIsInf(p)) return Qfalse;
+    return Qtrue;
+}
+
+static void
+BigDecimal_check_num(Real *p)
+{
+    if(VpIsNaN(p)) {
+       VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",1);
+    } else if(VpIsPosInf(p)) {
+       VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",1);
+    } else if(VpIsNegInf(p)) {
+       VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",1);
+    }
+}
+
+/* Returns the value as an integer (Fixnum or Bignum).
+ *
+ * If the BigNumber is infinity or NaN, returns nil.
+ */
+static VALUE
+BigDecimal_to_i(VALUE self)
+{
+    ENTER(5);
+    int e,n,i,nf;
+    U_LONG v,b,j;
+    volatile VALUE str;
+    char *psz,*pch;
+    Real *p;
+
+    GUARD_OBJ(p,GetVpValue(self,1));
+    BigDecimal_check_num(p);
+
+    e = VpExponent10(p);
+    if(e<=0) return INT2FIX(0);
+    nf = VpBaseFig();
+    if(e<=nf) {
+        e = VpGetSign(p)*p->frac[0];
+        return INT2FIX(e);
+    }
+    str = rb_str_new(0, e+nf+2);
+    psz = RSTRING_PTR(str);
+
+    n = (e+nf-1)/nf;
+    pch = psz;
+    if(VpGetSign(p)<0) *pch++ = '-';
+    for(i=0;i=(int)p->Prec) {
+            while(b) {
+                *pch++ = '0';
+                b /= 10;
+            }
+            continue;
+        }
+        v = p->frac[i];
+        while(b) {
+            j = v/b;
+            *pch++ = (char)(j + '0');
+            v -= j*b;
+            b /= 10;
+        }
+    }
+    *pch++ = 0;
+    return rb_cstr2inum(psz,10);
+}
+
+/* Returns a new Float object having approximately the same value as the
+ * BigDecimal number. Normal accuracy limits and built-in errors of binary
+ * Float arithmetic apply.
+ */
+static VALUE
+BigDecimal_to_f(VALUE self)
+{
+    ENTER(1);
+    Real *p;
+    double d;
+    S_LONG e;
+    char *buf;
+    volatile VALUE str;
+
+    GUARD_OBJ(p,GetVpValue(self,1));
+    if(VpVtoD(&d, &e, p)!=1) return rb_float_new(d);
+    str = rb_str_new(0, VpNumOfChars(p,"E"));
+    buf = RSTRING_PTR(str);
+    VpToString(p, buf, 0, 0);
+    errno = 0;
+    d = strtod(buf, 0);
+    if(errno == ERANGE) {
+       VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
+       if(d>0.0) return rb_float_new(DBL_MAX);
+       else      return rb_float_new(-DBL_MAX);
+    }
+    return rb_float_new(d);
+}
+
+
+static VALUE BigDecimal_split(VALUE self);
+
+/* Converts a BigDecimal to a Rational.
+ */
+static VALUE
+BigDecimal_to_r(VALUE self)
+{
+    Real *p;
+    S_LONG sign, power, denomi_power;
+    VALUE a, digits, numerator;
+
+    p = GetVpValue(self,1);
+    BigDecimal_check_num(p);
+
+    sign = VpGetSign(p);
+    power = VpExponent10(p);
+    a = BigDecimal_split(self);
+    digits = RARRAY_PTR(a)[1];
+    denomi_power = power - RSTRING_LEN(digits);
+    numerator = rb_funcall(digits, rb_intern("to_i"), 0);
+    
+    if (sign < 0) {
+	numerator = rb_funcall(numerator, '*', 1, INT2FIX(-1));
+    }
+    if (denomi_power < 0) {
+	return rb_Rational(numerator,
+			   rb_funcall(INT2FIX(10), rb_intern("**"), 1,
+				      INT2FIX(-denomi_power)));
+    }
+    else {
+        return rb_Rational1(rb_funcall(numerator, '*', 1,
+				       rb_funcall(INT2FIX(10), rb_intern("**"), 1,
+						  INT2FIX(denomi_power))));
+    }
+}
+
+/* The coerce method provides support for Ruby type coercion. It is not
+ * enabled by default.
+ * 
+ * This means that binary operations like + * / or - can often be performed 
+ * on a BigDecimal and an object of another type, if the other object can
+ * be coerced into a BigDecimal value.
+ *
+ * e.g.
+ * a = BigDecimal.new("1.0")
+ * b = a / 2.0  -> 0.5
+ *
+ * Note that coercing a String to a BigDecimal is not supported by default;
+ * it requires a special compile-time option when building Ruby.
+ */
+static VALUE
+BigDecimal_coerce(VALUE self, VALUE other)
+{
+    ENTER(2);
+    VALUE obj;
+    Real *b;
+    if(TYPE(other) == T_FLOAT) {
+       obj = rb_assoc_new(other, BigDecimal_to_f(self));
+    } else {
+       GUARD_OBJ(b,GetVpValue(other,1));
+       obj = rb_assoc_new(b->obj, self);
+    }
+    return obj;
+}
+
+static VALUE
+BigDecimal_uplus(VALUE self)
+{
+    return self;
+}
+
+ /* call-seq:
+  * add(value, digits)
+  *
+  * Add the specified value. 
+  *
+  * e.g.
+  *   c = a.add(b,n)
+  *   c = a + b
+  *
+  * digits:: If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to BigDecimal.mode.
+  */
+static VALUE
+BigDecimal_add(VALUE self, VALUE r)
+{
+    ENTER(5);
+    Real *c, *a, *b;
+    U_LONG mx;
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,'+');
+    SAVE(b);
+    if(VpIsNaN(b)) return b->obj;
+    if(VpIsNaN(a)) return a->obj;
+    mx = GetAddSubPrec(a,b);
+    if(mx==(-1L)) {
+        GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
+        VpAddSub(c, a, b, 1);
+    } else {
+        GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+        if(!mx) {
+            VpSetInf(c,VpGetSign(a));
+        } else {
+            VpAddSub(c, a, b, 1);
+        }
+    }
+    return ToValue(c);
+}
+
+ /* call-seq:
+  * sub(value, digits)
+  *
+  * Subtract the specified value. 
+  *
+  * e.g.
+  *   c = a.sub(b,n)
+  *   c = a - b
+  *
+  * digits:: If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to BigDecimal.mode.
+  */
+static VALUE
+BigDecimal_sub(VALUE self, VALUE r)
+{
+    ENTER(5);
+    Real *c, *a, *b;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,'-');
+    SAVE(b);
+
+    if(VpIsNaN(b)) return b->obj;
+    if(VpIsNaN(a)) return a->obj;
+
+    mx = GetAddSubPrec(a,b);
+    if(mx==(-1L)) {
+        GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
+        VpAddSub(c, a, b, -1);
+    } else {
+        GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+        if(!mx) {
+            VpSetInf(c,VpGetSign(a));
+        } else {
+            VpAddSub(c, a, b, -1);
+        }
+    }
+    return ToValue(c);
+}
+
+static VALUE
+BigDecimalCmp(VALUE self, VALUE r,char op)
+{
+    ENTER(5);
+    S_INT e;
+    Real *a, *b;
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) {
+	ID f = 0;
+
+	switch(op)
+	{
+	  case '*': f = rb_intern("<=>");break;
+	  case '=': f = rb_intern("=="); break;
+	  case '!': f = rb_intern("!="); break;
+	  case 'G': f = rb_intern(">="); break;
+	  case 'L': f = rb_intern("<="); break;
+	  case '>': case '<': f = (ID)op; break;
+	}
+	return rb_num_coerce_cmp(self,r,f);
+    }
+    SAVE(b);
+    e = VpComp(a, b);
+    if(e==999) return Qnil;
+    switch(op)
+    {
+    case '*': return   INT2FIX(e); /* any op */
+    case '=': if(e==0) return Qtrue ; return Qfalse;
+    case '!': if(e!=0) return Qtrue ; return Qfalse;
+    case 'G': if(e>=0) return Qtrue ; return Qfalse;
+    case '>': if(e> 0) return Qtrue ; return Qfalse;
+    case 'L': if(e<=0) return Qtrue ; return Qfalse;
+    case '<': if(e< 0) return Qtrue ; return Qfalse;
+    }
+    rb_bug("Undefined operation in BigDecimalCmp()");
+}
+
+/* Returns True if the value is zero. */
+static VALUE
+BigDecimal_zero(VALUE self)
+{
+    Real *a = GetVpValue(self,1);
+    return VpIsZero(a) ? Qtrue : Qfalse;
+}
+
+/* Returns True if the value is non-zero. */
+static VALUE
+BigDecimal_nonzero(VALUE self)
+{
+    Real *a = GetVpValue(self,1);
+    return VpIsZero(a) ? Qnil : self;
+}
+
+/* The comparison operator.
+ * a <=> b is 0 if a == b, 1 if a > b, -1 if a < b.
+ */
+static VALUE
+BigDecimal_comp(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, '*');
+}
+
+/*
+ * Tests for value equality; returns true if the values are equal.
+ *
+ * The == and === operators and the eql? method have the same implementation 
+ * for BigDecimal.
+ *
+ * Values may be coerced to perform the comparison:
+ *
+ * BigDecimal.new('1.0') == 1.0  -> true
+ */
+static VALUE
+BigDecimal_eq(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, '=');
+}
+
+/* call-seq:
+ * a < b
+ *
+ * Returns true if a is less than b. Values may be coerced to perform the
+ * comparison (see ==, coerce).
+ */
+static VALUE
+BigDecimal_lt(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, '<');
+}
+
+/* call-seq:
+ * a <= b
+ *
+ * Returns true if a is less than or equal to b. Values may be coerced to 
+ * perform the comparison (see ==, coerce).
+ */
+static VALUE
+BigDecimal_le(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, 'L');
+}
+
+/* call-seq:
+ * a > b
+ *
+ * Returns true if a is greater than b.  Values may be coerced to 
+ * perform the comparison (see ==, coerce).
+ */
+static VALUE
+BigDecimal_gt(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, '>');
+}
+
+/* call-seq:
+ * a >= b
+ *
+ * Returns true if a is greater than or equal to b. Values may be coerced to 
+ * perform the comparison (see ==, coerce)
+ */
+static VALUE
+BigDecimal_ge(VALUE self, VALUE r)
+{
+    return BigDecimalCmp(self, r, 'G');
+}
+
+static VALUE
+BigDecimal_neg(VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    GUARD_OBJ(a,GetVpValue(self,1));
+    GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
+    VpAsgn(c, a, -1);
+    return ToValue(c);
+}
+
+ /* call-seq:
+  * mult(value, digits)
+  *
+  * Multiply by the specified value. 
+  *
+  * e.g.
+  *   c = a.mult(b,n)
+  *   c = a * b
+  *
+  * digits:: If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to BigDecimal.mode.
+  */
+static VALUE
+BigDecimal_mult(VALUE self, VALUE r)
+{
+    ENTER(5);
+    Real *c, *a, *b;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,'*');
+    SAVE(b);
+
+    mx = a->Prec + b->Prec;
+    GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+    VpMult(c, a, b);
+    return ToValue(c);
+}
+
+static VALUE
+BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
+/* For c = self.div(r): with round operation */
+{
+    ENTER(5);
+    Real *a, *b;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,'/');
+    SAVE(b);
+    *div = b;
+    mx =(a->MaxPrec + b->MaxPrec + 1) * VpBaseFig();
+    GUARD_OBJ((*c),VpCreateRbObject(mx, "#0"));
+    GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+    VpDivd(*c, *res, a, b);
+    return (VALUE)0;
+}
+
+ /* call-seq:
+  * div(value, digits)
+  * quo(value)
+  *
+  * Divide by the specified value. 
+  *
+  * e.g.
+  *   c = a.div(b,n)
+  *
+  * digits:: If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to BigDecimal.mode.
+  * 
+  * If digits is 0, the result is the same as the / operator. If not, the
+  * result is an integer BigDecimal, by analogy with Float#div.
+  *
+  * The alias quo is provided since div(value, 0) is the same as computing
+  * the quotient; see divmod.
+  */
+static VALUE
+BigDecimal_div(VALUE self, VALUE r)
+/* For c = self/r: with round operation */
+{
+    ENTER(5);
+    Real *c=NULL, *res=NULL, *div = NULL;
+    r = BigDecimal_divide(&c, &res, &div, self, r);
+    if(r!=(VALUE)0) return r; /* coerced by other */
+    SAVE(c);SAVE(res);SAVE(div);
+    /* a/b = c + r/b */
+    /* c xxxxx
+       r 00000yyyyy  ==> (y/b)*BASE >= HALF_BASE
+     */
+    /* Round */
+    if(VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
+       VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
+    }
+    return ToValue(c);
+}
+
+/*
+ * %: mod = a%b = a - (a.to_f/b).floor * b
+ * div = (a.to_f/b).floor
+ */
+static VALUE
+BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
+{
+    ENTER(8);
+    Real *c=NULL, *d=NULL, *res=NULL;
+    Real *a, *b;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,rb_intern("divmod"));
+    SAVE(b);
+
+    if(VpIsNaN(a) || VpIsNaN(b)) goto NaN;
+    if(VpIsInf(a) || VpIsInf(b)) goto NaN;
+    if(VpIsZero(b))              goto NaN;
+    if(VpIsZero(a)) {
+       GUARD_OBJ(c,VpCreateRbObject(1, "0"));
+       GUARD_OBJ(d,VpCreateRbObject(1, "0"));
+       *div = d;
+       *mod = c;
+       return (VALUE)0;
+    }
+
+    mx = a->Prec;
+    if(mxPrec) mx = b->Prec;
+    mx =(mx + 1) * VpBaseFig();
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+    VpDivd(c, res, a, b);
+    mx = c->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
+    VpActiveRound(d,c,VP_ROUND_DOWN,0);
+    VpMult(res,d,b);
+    VpAddSub(c,a,res,-1);
+    if(!VpIsZero(c) && (VpGetSign(a)*VpGetSign(b)<0)) {
+        VpAddSub(res,d,VpOne(),-1);
+        VpAddSub(d  ,c,b,       1);
+        *div = res;
+        *mod = d;
+    } else {
+        *div = d;
+        *mod = c;
+    }
+    return (VALUE)0;
+
+NaN:
+    GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
+    GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
+    *div = d;
+    *mod = c;
+    return (VALUE)0;
+}
+
+/* call-seq:
+ * a % b
+ * a.modulo(b)
+ *
+ * Returns the modulus from dividing by b. See divmod.
+ */
+static VALUE
+BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
+{
+    ENTER(3);
+    VALUE obj;
+    Real *div=NULL, *mod=NULL;
+
+    obj = BigDecimal_DoDivmod(self,r,&div,&mod);
+    if(obj!=(VALUE)0) return obj;
+    SAVE(div);SAVE(mod);
+    return ToValue(mod);
+}
+
+static VALUE
+BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
+{
+    ENTER(10);
+    U_LONG mx;
+    Real *a=NULL, *b=NULL, *c=NULL, *res=NULL, *d=NULL, *rr=NULL, *ff=NULL;
+    Real *f=NULL;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    b = GetVpValue(r,0);
+    if(!b) return DoSomeOne(self,r,rb_intern("remainder"));
+    SAVE(b);
+
+    mx  =(a->MaxPrec + b->MaxPrec) *VpBaseFig();
+    GUARD_OBJ(c  ,VpCreateRbObject(mx, "0"));
+    GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+    GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+    GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+
+    VpDivd(c, res, a, b);
+
+    mx = c->Prec *(VpBaseFig() + 1);
+
+    GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
+    GUARD_OBJ(f,VpCreateRbObject(mx, "0"));
+
+    VpActiveRound(d,c,VP_ROUND_DOWN,0); /* 0: round off */
+
+    VpFrac(f, c);
+    VpMult(rr,f,b);
+    VpAddSub(ff,res,rr,1);
+
+    *dv = d;
+    *rv = ff;
+    return (VALUE)0;
+}
+
+/* Returns the remainder from dividing by the value.
+ *
+ * If the values divided are of the same sign, the remainder is the same as
+ * the modulus (see divmod).
+ *
+ * Otherwise, the remainder is the modulus minus the value divided by.
+ */
+static VALUE
+BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
+{
+    VALUE  f;
+    Real  *d,*rv=0;
+    f = BigDecimal_divremain(self,r,&d,&rv);
+    if(f!=(VALUE)0) return f;
+    return ToValue(rv);
+}
+
+/* Divides by the specified value, and returns the quotient and modulus
+ * as BigDecimal numbers. The quotient is rounded towards negative infinity.
+ *
+ * For example:
+ *
+ * require 'bigdecimal'
+ *
+ * a = BigDecimal.new("42")
+ * b = BigDecimal.new("9")
+ *
+ * q,m = a.divmod(b)
+ *
+ * c = q * b + m
+ *
+ * a == c  -> true
+ *
+ * The quotient q is (a/b).floor, and the modulus is the amount that must be 
+ * added to q * b to get a.
+ */
+static VALUE
+BigDecimal_divmod(VALUE self, VALUE r)
+{
+    ENTER(5);
+    VALUE obj;
+    Real *div=NULL, *mod=NULL;
+
+    obj = BigDecimal_DoDivmod(self,r,&div,&mod);
+    if(obj!=(VALUE)0) return obj;
+    SAVE(div);SAVE(mod);
+    obj = rb_assoc_new(ToValue(div), ToValue(mod));
+    return obj;
+}
+
+static VALUE
+BigDecimal_div2(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    VALUE b,n;
+    int na = rb_scan_args(argc,argv,"11",&b,&n);
+    if(na==1) { /* div in Float sense */
+       VALUE obj;
+       Real *div=NULL;
+       Real *mod;
+       obj = BigDecimal_DoDivmod(self,b,&div,&mod);
+       if(obj!=(VALUE)0) return obj;
+       if(VpIsNaN(div) && rb_equal(b, INT2FIX(0))) {
+	   rb_raise(rb_eZeroDivError, "divided by 0");
+       }
+       return BigDecimal_to_i(ToValue(div));
+    } else {    /* div in BigDecimal sense */
+       U_LONG ix = (U_LONG)GetPositiveInt(n);
+       if(ix==0) return BigDecimal_div(self,b);
+       else {
+          Real *res=NULL;
+          Real *av=NULL, *bv=NULL, *cv=NULL;
+          U_LONG mx = (ix+VpBaseFig()*2);
+          U_LONG pl = VpSetPrecLimit(0);
+
+          GUARD_OBJ(cv,VpCreateRbObject(mx,"0"));
+          GUARD_OBJ(av,GetVpValue(self,1));
+          GUARD_OBJ(bv,GetVpValue(b,1));
+          mx = av->Prec + bv->Prec + 2;
+          if(mx <= cv->MaxPrec) mx = cv->MaxPrec+1;
+          GUARD_OBJ(res,VpCreateRbObject((mx * 2  + 2)*VpBaseFig(), "#0"));
+          VpDivd(cv,res,av,bv);
+          VpSetPrecLimit(pl);
+          VpLeftRound(cv,VpGetRoundMode(),ix);
+          return ToValue(cv);
+       }
+    }
+}
+
+static VALUE
+BigDecimal_add2(VALUE self, VALUE b, VALUE n)
+{
+    ENTER(2);
+    Real   *cv;
+    U_LONG mx = (U_LONG)GetPositiveInt(n);
+    if(mx==0) return BigDecimal_add(self,b);
+    else {
+       U_LONG pl = VpSetPrecLimit(0);
+       VALUE   c = BigDecimal_add(self,b);
+       VpSetPrecLimit(pl);
+       GUARD_OBJ(cv,GetVpValue(c,1));
+       VpLeftRound(cv,VpGetRoundMode(),mx);
+       return ToValue(cv);
+    }
+}
+
+static VALUE
+BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
+{
+    ENTER(2);
+    Real *cv;
+    U_LONG mx = (U_LONG)GetPositiveInt(n);
+    if(mx==0) return BigDecimal_sub(self,b);
+    else {
+       U_LONG pl = VpSetPrecLimit(0);
+       VALUE   c = BigDecimal_sub(self,b);
+       VpSetPrecLimit(pl);
+       GUARD_OBJ(cv,GetVpValue(c,1));
+       VpLeftRound(cv,VpGetRoundMode(),mx);
+       return ToValue(cv);
+    }
+}
+
+static VALUE
+BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
+{
+    ENTER(2);
+    Real *cv;
+    U_LONG mx = (U_LONG)GetPositiveInt(n);
+    if(mx==0) return BigDecimal_mult(self,b);
+    else {
+       U_LONG pl = VpSetPrecLimit(0);
+       VALUE   c = BigDecimal_mult(self,b);
+       VpSetPrecLimit(pl);
+       GUARD_OBJ(cv,GetVpValue(c,1));
+       VpLeftRound(cv,VpGetRoundMode(),mx);
+       return ToValue(cv);
+    }
+}
+
+/* Returns the absolute value.
+ *
+ * BigDecimal('5').abs -> 5
+ *
+ * BigDecimal('-3').abs -> 3
+ */
+static VALUE
+BigDecimal_abs(VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpAsgn(c, a, 1);
+    VpChangeSign(c,(S_INT)1);
+    return ToValue(c);
+}
+
+/* call-seq:
+ * sqrt(n)
+ *
+ * Returns the square root of the value.
+ *
+ * If n is specified, returns at least that many significant digits.
+ */
+static VALUE
+BigDecimal_sqrt(VALUE self, VALUE nFig)
+{
+    ENTER(5);
+    Real *c, *a;
+    S_INT mx, n;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+
+    n = GetPositiveInt(nFig) + VpDblFig() + 1;
+    if(mx <= n) mx = n;
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpSqrt(c, a);
+    return ToValue(c);
+}
+
+/* Return the integer part of the number.
+ */
+static VALUE
+BigDecimal_fix(VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpActiveRound(c,a,VP_ROUND_DOWN,0); /* 0: round off */
+    return ToValue(c);
+}
+
+/* call-seq:
+ * round(n,mode)
+ *
+ * Round to the nearest 1 (by default), returning the result as a BigDecimal.
+ *
+ * BigDecimal('3.14159').round -> 3
+ *
+ * BigDecimal('8.7').round -> 9
+ *
+ * If n is specified and positive, the fractional part of the result has no
+ * more than that many digits. 
+ *
+ * If n is specified and negative, at least that many digits to the left of the
+ * decimal point will be 0 in the result.
+ *
+ * BigDecimal('3.14159').round(3) -> 3.142
+ *
+ * BigDecimal('13345.234').round(-2) -> 13300.0
+ *
+ * The value of the optional mode argument can be used to determine how 
+ * rounding is performed; see BigDecimal.mode.
+ */
+static VALUE
+BigDecimal_round(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real   *c, *a;
+    int    iLoc = 0;
+    U_LONG mx;
+    VALUE  vLoc;
+    VALUE  vRound;
+    U_LONG pl;
+
+    int    sw = VpGetRoundMode();
+
+    int na = rb_scan_args(argc,argv,"02",&vLoc,&vRound);
+    switch(na) {
+    case 0:
+        iLoc = 0;
+        break;
+    case 1:
+        Check_Type(vLoc, T_FIXNUM);
+        iLoc = FIX2INT(vLoc);
+        break;
+    case 2:
+        Check_Type(vLoc, T_FIXNUM);
+        iLoc = FIX2INT(vLoc);
+        Check_Type(vRound, T_FIXNUM);
+        sw   = FIX2INT(vRound);
+        if(!VpIsRoundMode(sw)) {
+            rb_raise(rb_eTypeError, "invalid rounding mode");
+            return Qnil;
+        }
+        break;
+    }
+
+    pl = VpSetPrecLimit(0);
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpSetPrecLimit(pl);
+    VpActiveRound(c,a,sw,iLoc);
+    return ToValue(c);
+}
+
+/* call-seq:
+ * truncate(n)
+ *
+ * Truncate to the nearest 1, returning the result as a BigDecimal.
+ *
+ * BigDecimal('3.14159').truncate -> 3
+ *
+ * BigDecimal('8.7').truncate -> 8
+ *
+ * If n is specified and positive, the fractional part of the result has no
+ * more than that many digits. 
+ *
+ * If n is specified and negative, at least that many digits to the left of the
+ * decimal point will be 0 in the result.
+ *
+ * BigDecimal('3.14159').truncate(3) -> 3.141
+ *
+ * BigDecimal('13345.234').truncate(-2) -> 13300.0
+ */
+static VALUE
+BigDecimal_truncate(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    int iLoc;
+    U_LONG mx;
+    VALUE vLoc;
+    U_LONG pl = VpSetPrecLimit(0);
+
+    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+        iLoc = 0;
+    } else {
+        Check_Type(vLoc, T_FIXNUM);
+        iLoc = FIX2INT(vLoc);
+    }
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpSetPrecLimit(pl);
+    VpActiveRound(c,a,VP_ROUND_DOWN,iLoc); /* 0: truncate */
+    return ToValue(c);
+}
+
+/* Return the fractional part of the number.
+ */
+static VALUE
+BigDecimal_frac(VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    U_LONG mx;
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpFrac(c, a);
+    return ToValue(c);
+}
+
+/* call-seq:
+ * floor(n)
+ *
+ * Return the largest integer less than or equal to the value, as a BigDecimal.
+ *
+ * BigDecimal('3.14159').floor -> 3
+ *
+ * BigDecimal('-9.1').floor -> -10
+ *
+ * If n is specified and positive, the fractional part of the result has no
+ * more than that many digits.  
+ *
+ * If n is specified and negative, at least that
+ * many digits to the left of the decimal point will be 0 in the result.
+ *
+ * BigDecimal('3.14159').floor(3) -> 3.141
+ *
+ * BigDecimal('13345.234').floor(-2) -> 13300.0
+ */
+static VALUE
+BigDecimal_floor(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    U_LONG mx;
+    int iLoc;
+    VALUE vLoc;
+    U_LONG pl = VpSetPrecLimit(0);
+
+    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+        iLoc = 0;
+    } else {
+        Check_Type(vLoc, T_FIXNUM);
+        iLoc = FIX2INT(vLoc);
+    }
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpSetPrecLimit(pl);
+    VpActiveRound(c,a,VP_ROUND_FLOOR,iLoc);
+    return ToValue(c);
+}
+
+/* call-seq:
+ * ceil(n)
+ *
+ * Return the smallest integer greater than or equal to the value, as a BigDecimal.
+ *
+ * BigDecimal('3.14159').ceil -> 4
+ *
+ * BigDecimal('-9.1').ceil -> -9
+ *
+ * If n is specified and positive, the fractional part of the result has no
+ * more than that many digits.  
+ *
+ * If n is specified and negative, at least that
+ * many digits to the left of the decimal point will be 0 in the result.
+ *
+ * BigDecimal('3.14159').ceil(3) -> 3.142
+ *
+ * BigDecimal('13345.234').ceil(-2) -> 13400.0
+ */
+static VALUE
+BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *c, *a;
+    U_LONG mx;
+    int iLoc;
+    VALUE vLoc;
+    U_LONG pl = VpSetPrecLimit(0);
+
+    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+        iLoc = 0;
+    } else {
+        Check_Type(vLoc, T_FIXNUM);
+        iLoc = FIX2INT(vLoc);
+    }
+
+    GUARD_OBJ(a,GetVpValue(self,1));
+    mx = a->Prec *(VpBaseFig() + 1);
+    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+    VpSetPrecLimit(pl);
+    VpActiveRound(c,a,VP_ROUND_CEIL,iLoc);
+    return ToValue(c);
+}
+
+/* call-seq:
+ * to_s(s)
+ *
+ * Converts the value to a string.
+ *
+ * The default format looks like  0.xxxxEnn.
+ *
+ * The optional parameter s consists of either an integer; or an optional '+'
+ * or ' ', followed by an optional number, followed by an optional 'E' or 'F'.
+ *
+ * If there is a '+' at the start of s, positive values are returned with
+ * a leading '+'.
+ *
+ * A space at the start of s returns positive values with a leading space.
+ *
+ * If s contains a number, a space is inserted after each group of that many 
+ * fractional digits.
+ *
+ * If s ends with an 'E', engineering notation (0.xxxxEnn) is used.
+ *
+ * If s ends with an 'F', conventional floating point notation is used.
+ *
+ * Examples:
+ *
+ * BigDecimal.new('-123.45678901234567890').to_s('5F') -> '-123.45678 90123 45678 9'
+ *
+ * BigDecimal.new('123.45678901234567890').to_s('+8F') -> '+123.45678901 23456789'
+ *
+ * BigDecimal.new('123.45678901234567890').to_s(' F') -> ' 123.4567890123456789'
+ */
+static VALUE
+BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    int   fmt=0;   /* 0:E format */
+    int   fPlus=0; /* =0:default,=1: set ' ' before digits ,set '+' before digits. */
+    Real  *vp;
+    volatile VALUE str;
+    char  *psz;
+    char   ch;
+    U_LONG nc;
+    S_INT  mc = 0;
+    VALUE  f;
+
+    GUARD_OBJ(vp,GetVpValue(self,1));
+    
+    if(rb_scan_args(argc,argv,"01",&f)==1) {
+        if(TYPE(f)==T_STRING) {
+            SafeStringValue(f);
+            psz = RSTRING_PTR(f);
+            if(*psz==' ') {
+                fPlus = 1; psz++;
+            } else if(*psz=='+') {
+                fPlus = 2; psz++;
+            }
+            while((ch=*psz++)!=0) {
+                if(ISSPACE(ch)) continue;
+                if(!ISDIGIT(ch)) {
+                    if(ch=='F' || ch=='f') fmt = 1; /* F format */
+                    break;
+                }
+                mc = mc * 10 + ch - '0';
+            }
+        } else {
+            mc  = GetPositiveInt(f);
+        }
+    }
+    if(fmt) {
+        nc = VpNumOfChars(vp,"F");
+    } else {
+        nc = VpNumOfChars(vp,"E");
+    }
+    if(mc>0) nc += (nc + mc - 1) / mc + 1;
+
+    str = rb_str_new(0, nc);
+    psz = RSTRING_PTR(str);
+
+    if(fmt) {
+        VpToFString(vp, psz, mc, fPlus);
+    } else {
+        VpToString (vp, psz, mc, fPlus);
+    }
+    rb_str_resize(str, strlen(psz));
+    return str;
+}
+
+/* Splits a BigDecimal number into four parts, returned as an array of values.
+ *
+ * The first value represents the sign of the BigDecimal, and is -1 or 1, or 0
+ * if the BigDecimal is Not a Number.
+ *
+ * The second value is a string representing the significant digits of the
+ * BigDecimal, with no leading zeros.
+ *
+ * The third value is the base used for arithmetic (currently always 10) as an
+ * Integer.
+ *
+ * The fourth value is an Integer exponent.
+ *
+ * If the BigDecimal can be represented as 0.xxxxxx*10**n, then xxxxxx is the 
+ * string of significant digits with no leading zeros, and n is the exponent.
+ *
+ * From these values, you can translate a BigDecimal to a float as follows:
+ *
+ *   sign, significant_digits, base, exponent = a.split
+ *   f = sign * "0.#{significant_digits}".to_f * (base ** exponent)
+ *
+ * (Note that the to_f method is provided as a more convenient way to translate 
+ * a BigDecimal to a Float.)
+ */
+static VALUE
+BigDecimal_split(VALUE self)
+{
+    ENTER(5);
+    Real *vp;
+    VALUE obj,str;
+    S_LONG e;
+    S_LONG s;
+    char *psz1;
+
+    GUARD_OBJ(vp,GetVpValue(self,1));
+    str = rb_str_new(0, VpNumOfChars(vp,"E"));
+    psz1 = RSTRING_PTR(str);
+    VpSzMantissa(vp,psz1);
+    s = 1;
+    if(psz1[0]=='-') {
+	int len = strlen(psz1+1);
+
+	memmove(psz1, psz1+1, len);
+	psz1[len] = '\0';
+        s = -1;
+    }
+    if(psz1[0]=='N') s=0; /* NaN */
+    e = VpExponent10(vp);
+    obj  = rb_ary_new2(4);
+    rb_ary_push(obj, INT2FIX(s));
+    rb_ary_push(obj, str);
+    rb_str_resize(str, strlen(psz1));
+    rb_ary_push(obj, INT2FIX(10));
+    rb_ary_push(obj, INT2NUM(e));
+    return obj;
+}
+
+/* Returns the exponent of the BigDecimal number, as an Integer.
+ *
+ * If the number can be represented as 0.xxxxxx*10**n where xxxxxx is a string
+ * of digits with no leading zeros, then n is the exponent.
+ */
+static VALUE
+BigDecimal_exponent(VALUE self)
+{
+    S_LONG e = VpExponent10(GetVpValue(self,1));
+    return INT2NUM(e);
+}
+
+/* Returns debugging information about the value as a string of comma-separated
+ * values in angle brackets with a leading #:
+ *
+ * BigDecimal.new("1234.5678").inspect ->
+ * "#"
+ *
+ * The first part is the address, the second is the value as a string, and
+ * the final part ss(mm) is the current number of significant digits and the
+ * maximum number of significant digits, respectively.
+ */
+static VALUE
+BigDecimal_inspect(VALUE self)
+{
+    ENTER(5);
+    Real *vp;
+    volatile VALUE obj;
+    unsigned int nc;
+    char *psz, *tmp;
+
+    GUARD_OBJ(vp,GetVpValue(self,1));
+    nc = VpNumOfChars(vp,"E");
+    nc +=(nc + 9) / 10;
+
+    obj = rb_str_new(0, nc+256);
+    psz = RSTRING_PTR(obj);
+    sprintf(psz,"#",VpPrec(vp)*VpBaseFig(),VpMaxPrec(vp)*VpBaseFig());
+    rb_str_resize(obj, strlen(psz));
+    return obj;
+}
+
+/* call-seq:
+ * power(n)
+ *
+ * Returns the value raised to the power of n. Note that n must be an Integer.
+ *
+ * Also available as the operator **
+ */
+static VALUE
+BigDecimal_power(VALUE self, VALUE p)
+{
+    ENTER(5);
+    Real *x, *y;
+    S_LONG mp, ma, n;
+
+    Check_Type(p, T_FIXNUM);
+    n = FIX2INT(p);
+    ma = n;
+    if(ma < 0)  ma = -ma;
+    if(ma == 0) ma = 1;
+
+    GUARD_OBJ(x,GetVpValue(self,1));
+    if(VpIsDef(x)) {
+        mp = x->Prec *(VpBaseFig() + 1);
+        GUARD_OBJ(y,VpCreateRbObject(mp *(ma + 1), "0"));
+    } else {
+        GUARD_OBJ(y,VpCreateRbObject(1, "0"));
+    }
+    VpPower(y, x, n);
+    return ToValue(y);
+}
+
+static VALUE
+BigDecimal_global_new(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *pv;
+    S_LONG mf;
+    VALUE  nFig;
+    VALUE  iniValue;
+
+    if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
+        mf = 0;
+    } else {
+        mf = GetPositiveInt(nFig);
+    }
+    SafeStringValue(iniValue);
+    GUARD_OBJ(pv,VpCreateRbObject(mf, RSTRING_PTR(iniValue)));
+    return ToValue(pv);
+}
+
+ /* call-seq:
+  * new(initial, digits)
+  *
+  * Create a new BigDecimal object.
+  *
+  * initial:: The initial value, as a String. Spaces are ignored, unrecognized characters terminate the value.
+  *
+  * digits:: The number of significant digits, as a Fixnum. If omitted or 0, the number of significant digits is determined from the initial value.
+  *
+  * The actual number of significant digits used in computation is usually
+  * larger than the specified number.
+  */
+static VALUE
+BigDecimal_new(int argc, VALUE *argv, VALUE self)
+{
+    ENTER(5);
+    Real *pv;
+    S_LONG mf;
+    VALUE  nFig;
+    VALUE  iniValue;
+
+    if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
+        mf = 0;
+    } else {
+        mf = GetPositiveInt(nFig);
+    }
+    SafeStringValue(iniValue);
+    GUARD_OBJ(pv,VpNewRbClass(mf, RSTRING_PTR(iniValue),self));
+    return ToValue(pv);
+}
+
+ /* call-seq:
+  * BigDecimal.limit(digits)
+  *
+  * Limit the number of significant digits in newly created BigDecimal 
+  * numbers to the specified value. Rounding is performed as necessary, 
+  * as specified by BigDecimal.mode.
+  *
+  * A limit of 0, the default, means no upper limit.
+  *
+  * The limit specified by this method takes less priority over any limit 
+  * specified to instance methods such as ceil, floor, truncate, or round.
+  */
+static VALUE
+BigDecimal_limit(int argc, VALUE *argv, VALUE self)
+{
+    VALUE  nFig;
+    VALUE  nCur = INT2NUM(VpGetPrecLimit());
+
+    if(rb_scan_args(argc,argv,"01",&nFig)==1) {
+        int nf;
+        if(nFig==Qnil) return nCur;
+        Check_Type(nFig, T_FIXNUM);
+        nf = FIX2INT(nFig);
+        if(nf<0) {
+            rb_raise(rb_eArgError, "argument must be positive");
+        }
+        VpSetPrecLimit(nf);
+    }
+    return nCur;
+}
+
+/* Returns the sign of the value.
+ *
+ * Returns a positive value if > 0, a negative value if < 0, and a 
+ * zero if == 0.
+ *
+ * The specific value returned indicates the type and sign of the BigDecimal, 
+ * as follows:
+ *
+ * BigDecimal::SIGN_NaN:: value is Not a Number
+ * BigDecimal::SIGN_POSITIVE_ZERO:: value is +0
+ * BigDecimal::SIGN_NEGATIVE_ZERO:: value is -0
+ * BigDecimal::SIGN_POSITIVE_INFINITE:: value is +infinity
+ * BigDecimal::SIGN_NEGATIVE_INFINITE:: value is -infinity
+ * BigDecimal::SIGN_POSITIVE_FINITE:: value is positive
+ * BigDecimal::SIGN_NEGATIVE_FINITE:: value is negative
+ */
+static VALUE
+BigDecimal_sign(VALUE self)
+{ /* sign */
+    int s = GetVpValue(self,1)->sign;
+    return INT2FIX(s);
+}
+
+void
+Init_bigdecimal(void)
+{
+    /* Initialize VP routines */
+    VpInit((U_LONG)0);
+
+    /* Class and method registration */
+    rb_cBigDecimal = rb_define_class("BigDecimal",rb_cNumeric);
+
+    /* Global function */
+    rb_define_global_function("BigDecimal", BigDecimal_global_new, -1);
+
+    /* Class methods */
+    rb_define_singleton_method(rb_cBigDecimal, "new", BigDecimal_new, -1);
+    rb_define_singleton_method(rb_cBigDecimal, "mode", BigDecimal_mode, -1);
+    rb_define_singleton_method(rb_cBigDecimal, "limit", BigDecimal_limit, -1);
+    rb_define_singleton_method(rb_cBigDecimal, "double_fig", BigDecimal_double_fig, 0);
+    rb_define_singleton_method(rb_cBigDecimal, "_load", BigDecimal_load, 1);
+    rb_define_singleton_method(rb_cBigDecimal, "ver", BigDecimal_version, 0);
+
+    /* Constants definition */
+
+    /* 
+     * Base value used in internal calculations.  On a 32 bit system, BASE 
+     * is 10000, indicating that calculation is done in groups of 4 digits.  
+     * (If it were larger, BASE**2 wouldn't fit in 32 bits, so you couldn't
+     * guarantee that two groups could always be multiplied together without 
+     * overflow.) 
+     */
+    rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));
+
+    /* Exceptions */
+
+    /*
+     * 0xff: Determines whether overflow, underflow or zero divide result in 
+     * an exception being thrown. See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));
+
+    /* 
+     * 0x02: Determines what happens when the result of a computation is not a 
+     * number (NaN). See BigDecimal.mode. 
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
+
+    /* 
+     * 0x01: Determines what happens when the result of a computation is
+     * infinity.  See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
+
+    /* 
+     * 0x04: Determines what happens when the result of a computation is an
+     * underflow (a result too small to be represented). See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
+
+    /* 
+     * 0x01: Determines what happens when the result of a computation is an
+     * overflow (a result too large to be represented). See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
+
+    /* 
+     * 0x01: Determines what happens when a division by zero is performed.
+     * See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));
+
+    /* 
+     * 0x100: Determines what happens when a result must be rounded in order to
+     * fit in the appropriate number of significant digits. See
+     * BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));
+
+    /* 1: Indicates that values should be rounded away from zero. See
+     * BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
+
+    /* 2: Indicates that values should be rounded towards zero. See
+     * BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
+
+    /* 3: Indicates that digits >= 5 should be rounded up, others rounded down.
+     * See BigDecimal.mode. */
+    rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
+
+    /* 4: Indicates that digits >= 6 should be rounded up, others rounded down.
+     * See BigDecimal.mode.
+     */
+    rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
+    /* 5: Round towards +infinity. See BigDecimal.mode. */
+    rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
+
+    /* 6: Round towards -infinity. See BigDecimal.mode. */
+    rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
+
+    /* 7: Round towards the even neighbor. See BigDecimal.mode. */
+    rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));
+
+    /* 0: Indicates that a value is not a number. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
+
+    /* 1: Indicates that a value is +0. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
+
+    /* -1: Indicates that a value is -0. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
+
+    /* 2: Indicates that a value is positive and finite. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
+
+    /* -2: Indicates that a value is negative and finite. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
+
+    /* 3: Indicates that a value is positive and infinite. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
+
+    /* -3: Indicates that a value is negative and infinite. See BigDecimal.sign. */
+    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
+
+    /* instance methods */
+    rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0);
+
+    rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
+    rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2);
+    rb_define_method(rb_cBigDecimal, "mult", BigDecimal_mult2, 2);
+    rb_define_method(rb_cBigDecimal, "div",BigDecimal_div2, -1);
+    rb_define_method(rb_cBigDecimal, "hash", BigDecimal_hash, 0);
+    rb_define_method(rb_cBigDecimal, "to_s", BigDecimal_to_s, -1);
+    rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0);
+    rb_define_method(rb_cBigDecimal, "to_int", BigDecimal_to_i, 0);
+    rb_define_method(rb_cBigDecimal, "to_r", BigDecimal_to_r, 0);
+    rb_define_method(rb_cBigDecimal, "split", BigDecimal_split, 0);
+    rb_define_method(rb_cBigDecimal, "+", BigDecimal_add, 1);
+    rb_define_method(rb_cBigDecimal, "-", BigDecimal_sub, 1);
+    rb_define_method(rb_cBigDecimal, "+@", BigDecimal_uplus, 0);
+    rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0);
+    rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);
+    rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
+    rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);
+    rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
+    rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);
+    rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1);
+    rb_define_method(rb_cBigDecimal, "divmod", BigDecimal_divmod, 1);
+    /* rb_define_method(rb_cBigDecimal, "dup", BigDecimal_dup, 0); */
+    rb_define_method(rb_cBigDecimal, "to_f", BigDecimal_to_f, 0);
+    rb_define_method(rb_cBigDecimal, "abs", BigDecimal_abs, 0);
+    rb_define_method(rb_cBigDecimal, "sqrt", BigDecimal_sqrt, 1);
+    rb_define_method(rb_cBigDecimal, "fix", BigDecimal_fix, 0);
+    rb_define_method(rb_cBigDecimal, "round", BigDecimal_round, -1);
+    rb_define_method(rb_cBigDecimal, "frac", BigDecimal_frac, 0);
+    rb_define_method(rb_cBigDecimal, "floor", BigDecimal_floor, -1);
+    rb_define_method(rb_cBigDecimal, "ceil", BigDecimal_ceil, -1);
+    rb_define_method(rb_cBigDecimal, "power", BigDecimal_power, 1);
+    rb_define_method(rb_cBigDecimal, "**", BigDecimal_power, 1);
+    rb_define_method(rb_cBigDecimal, "<=>", BigDecimal_comp, 1);
+    rb_define_method(rb_cBigDecimal, "==", BigDecimal_eq, 1);
+    rb_define_method(rb_cBigDecimal, "===", BigDecimal_eq, 1);
+    rb_define_method(rb_cBigDecimal, "eql?", BigDecimal_eq, 1);
+    rb_define_method(rb_cBigDecimal, "<", BigDecimal_lt, 1);
+    rb_define_method(rb_cBigDecimal, "<=", BigDecimal_le, 1);
+    rb_define_method(rb_cBigDecimal, ">", BigDecimal_gt, 1);
+    rb_define_method(rb_cBigDecimal, ">=", BigDecimal_ge, 1);
+    rb_define_method(rb_cBigDecimal, "zero?", BigDecimal_zero, 0);
+    rb_define_method(rb_cBigDecimal, "nonzero?", BigDecimal_nonzero, 0);
+    rb_define_method(rb_cBigDecimal, "coerce", BigDecimal_coerce, 1);
+    rb_define_method(rb_cBigDecimal, "inspect", BigDecimal_inspect, 0);
+    rb_define_method(rb_cBigDecimal, "exponent", BigDecimal_exponent, 0);
+    rb_define_method(rb_cBigDecimal, "sign", BigDecimal_sign, 0);
+    rb_define_method(rb_cBigDecimal, "nan?",      BigDecimal_IsNaN, 0);
+    rb_define_method(rb_cBigDecimal, "infinite?", BigDecimal_IsInfinite, 0);
+    rb_define_method(rb_cBigDecimal, "finite?",   BigDecimal_IsFinite, 0);
+    rb_define_method(rb_cBigDecimal, "truncate",  BigDecimal_truncate, -1);
+    rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1);
+}
+
+/*
+ *
+ *  ============================================================================
+ *
+ *  vp_ routines begin from here.
+ *
+ *  ============================================================================
+ *
+ */
+#ifdef _DEBUG
+/*static int gfDebug = 1;*/         /* Debug switch */
+static int gfCheckVal = 1;      /* Value checking flag in VpNmlz()  */
+#endif /* _DEBUG */
+
+static U_LONG gnPrecLimit = 0;  /* Global upper limit of the precision newly allocated */
+static U_LONG gfRoundMode = VP_ROUND_HALF_UP; /* Mode for general rounding operation   */
+
+#ifndef BASE_FIG
+static U_LONG BASE_FIG = 4;     /* =log10(BASE)  */
+static U_LONG BASE = 10000L;    /* Base value(value must be 10**BASE_FIG) */
+                /* The value of BASE**2 + BASE must be represented */
+                /* within one U_LONG. */
+static U_LONG HALF_BASE = 5000L;/* =BASE/2  */
+static U_LONG BASE1 = 1000L;    /* =BASE/10  */
+#else
+#ifndef BASE
+#error BASE_FIG is defined but BASE is not
+#endif
+#define HALF_BASE (BASE/2)
+#define BASE1 (BASE/10)
+#endif
+#ifndef DBLE_FIG
+#define DBLE_FIG (DBL_DIG+1)    /* figure of double */
+#endif
+
+static Real *VpConstOne;    /* constant 1.0 */
+static Real *VpPt5;        /* constant 0.5 */
+#define maxnr 100UL    /* Maximum iterations for calcurating sqrt. */
+                /* used in VpSqrt() */
+
+/* ETC */
+#define MemCmp(x,y,z) memcmp(x,y,z)
+#define StrCmp(x,y)   strcmp(x,y)
+
+static int VpIsDefOP(Real *c,Real *a,Real *b,int sw);
+static int AddExponent(Real *a,S_INT n);
+static U_LONG VpAddAbs(Real *a,Real *b,Real *c);
+static U_LONG VpSubAbs(Real *a,Real *b,Real *c);
+static U_LONG VpSetPTR(Real *a,Real *b,Real *c,U_LONG *a_pos,U_LONG *b_pos,U_LONG *c_pos,U_LONG *av,U_LONG *bv);
+static int VpNmlz(Real *a);
+static void VpFormatSt(char *psz,S_INT fFmt);
+static int VpRdup(Real *m,U_LONG ind_m);
+
+#ifdef _DEBUG
+static int gnAlloc=0; /* Memory allocation counter */
+#endif /* _DEBUG */
+
+VP_EXPORT void *
+VpMemAlloc(U_LONG mb)
+{
+    void *p = xmalloc((unsigned int)mb);
+    if(!p) {
+        VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
+    }
+    memset(p,0,mb);
+#ifdef _DEBUG
+    gnAlloc++; /* Count allocation call */
+#endif /* _DEBUG */
+    return p;
+}
+
+VP_EXPORT void
+VpFree(Real *pv)
+{
+    if(pv != NULL) {
+        xfree(pv);
+#ifdef _DEBUG
+        gnAlloc--; /* Decrement allocation count */
+        if(gnAlloc==0) {
+            printf(" *************** All memories allocated freed ****************");
+            getchar();
+        }
+        if(gnAlloc<0) {
+            printf(" ??????????? Too many memory free calls(%d) ?????????????\n",gnAlloc);
+            getchar();
+        }
+#endif /* _DEBUG */
+    }
+}
+
+/*
+ * EXCEPTION Handling.
+ */
+static unsigned short gfDoException = 0; /* Exception flag */
+
+static unsigned short
+VpGetException (void)
+{
+    return gfDoException;
+}
+
+static void
+VpSetException(unsigned short f)
+{
+    gfDoException = f;
+}
+
+/* These 2 functions added at v1.1.7 */
+VP_EXPORT U_LONG
+VpGetPrecLimit(void)
+{
+    return gnPrecLimit;
+}
+
+VP_EXPORT U_LONG
+VpSetPrecLimit(U_LONG n)
+{
+    U_LONG s = gnPrecLimit;
+    gnPrecLimit = n;
+    return s;
+}
+
+VP_EXPORT unsigned long
+VpGetRoundMode(void)
+{
+    return gfRoundMode;
+}
+
+VP_EXPORT int
+VpIsRoundMode(unsigned long n)
+{
+    if(n==VP_ROUND_UP      || n==VP_ROUND_DOWN      ||
+       n==VP_ROUND_HALF_UP || n==VP_ROUND_HALF_DOWN ||
+       n==VP_ROUND_CEIL    || n==VP_ROUND_FLOOR     ||
+       n==VP_ROUND_HALF_EVEN
+      ) return 1;
+    return 0;
+}
+
+VP_EXPORT unsigned long
+VpSetRoundMode(unsigned long n)
+{
+    if(VpIsRoundMode(n)) gfRoundMode = n;
+    return gfRoundMode;
+}
+
+/*
+ *  0.0 & 1.0 generator
+ *    These gZero_..... and gOne_..... can be any name
+ *    referenced from nowhere except Zero() and One().
+ *    gZero_..... and gOne_..... must have global scope
+ *    (to let the compiler know they may be changed in outside
+ *    (... but not actually..)).
+ */
+volatile const double gZero_ABCED9B1_CE73__00400511F31D = 0.0;
+volatile const double gOne_ABCED9B4_CE73__00400511F31D  = 1.0;
+static double
+Zero(void)
+{
+    return gZero_ABCED9B1_CE73__00400511F31D;
+}
+
+static double
+One(void)
+{
+    return gOne_ABCED9B4_CE73__00400511F31D;
+}
+
+VP_EXPORT U_LONG
+VpBaseFig(void)
+{
+    return BASE_FIG;
+}
+
+VP_EXPORT U_LONG
+VpDblFig(void)
+{
+    return DBLE_FIG;
+}
+
+VP_EXPORT U_LONG
+VpBaseVal(void)
+{
+    return BASE;
+}
+
+/*
+  ----------------------------------------------------------------
+  Value of sign in Real structure is reserved for future use.
+  short sign;
+                    ==0 : NaN
+                      1 : Positive zero
+                     -1 : Negative zero
+                      2 : Positive number
+                     -2 : Negative number
+                      3 : Positive infinite number
+                     -3 : Negative infinite number
+  ----------------------------------------------------------------
+*/
+
+VP_EXPORT double
+VpGetDoubleNaN(void) /* Returns the value of NaN */
+{
+    static double fNaN = 0.0;
+    if(fNaN==0.0) fNaN = Zero()/Zero();
+    return fNaN;
+}
+
+VP_EXPORT double
+VpGetDoublePosInf(void) /* Returns the value of +Infinity */
+{
+    static double fInf = 0.0;
+    if(fInf==0.0) fInf = One()/Zero();
+    return fInf;
+}
+
+VP_EXPORT double
+VpGetDoubleNegInf(void) /* Returns the value of -Infinity */
+{
+    static double fInf = 0.0;
+    if(fInf==0.0) fInf = -(One()/Zero());
+    return fInf;
+}
+
+VP_EXPORT double
+VpGetDoubleNegZero(void) /* Returns the value of -0 */
+{
+    static double nzero = 1000.0;
+    if(nzero!=0.0) nzero = (One()/VpGetDoubleNegInf());
+    return nzero;
+}
+
+#if 0  /* unused */
+VP_EXPORT int
+VpIsNegDoubleZero(double v)
+{
+    double z = VpGetDoubleNegZero();
+    return MemCmp(&v,&z,sizeof(v))==0;
+}
+#endif
+
+VP_EXPORT int
+VpException(unsigned short f, const char *str,int always)
+{
+    VALUE exc;
+    int   fatal=0;
+
+    if(f==VP_EXCEPTION_OP || f==VP_EXCEPTION_MEMORY) always = 1;
+
+    if(always||(gfDoException&f)) {
+        switch(f)
+        {
+        /*
+        case VP_EXCEPTION_OVERFLOW:
+        */
+        case VP_EXCEPTION_ZERODIVIDE:
+        case VP_EXCEPTION_INFINITY:
+        case VP_EXCEPTION_NaN:
+        case VP_EXCEPTION_UNDERFLOW:
+        case VP_EXCEPTION_OP:
+             exc = rb_eFloatDomainError;
+             goto raise;
+        case VP_EXCEPTION_MEMORY:
+             fatal = 1;
+             goto raise;
+        default:
+             fatal = 1;
+             goto raise;
+        }
+    }
+    return 0; /* 0 Means VpException() raised no exception */
+
+raise:
+    if(fatal) rb_fatal("%s", str);
+    else   rb_raise(exc, "%s", str);
+    return 0;
+}
+
+/* Throw exception or returns 0,when resulting c is Inf or NaN */
+/*  sw=1:+ 2:- 3:* 4:/ */
+static int
+VpIsDefOP(Real *c,Real *a,Real *b,int sw)
+{
+    if(VpIsNaN(a) || VpIsNaN(b)) {
+        /* at least a or b is NaN */
+        VpSetNaN(c);
+        goto NaN;
+    }
+
+    if(VpIsInf(a)) {
+        if(VpIsInf(b)) {
+            switch(sw)
+            {
+            case 1: /* + */
+                if(VpGetSign(a)==VpGetSign(b)) {
+                    VpSetInf(c,VpGetSign(a));
+                    goto Inf;
+                } else {
+                    VpSetNaN(c);
+                    goto NaN;
+                }
+            case 2: /* - */
+                if(VpGetSign(a)!=VpGetSign(b)) {
+                    VpSetInf(c,VpGetSign(a));
+                    goto Inf;
+                } else {
+                    VpSetNaN(c);
+                    goto NaN;
+                }
+                break;
+            case 3: /* * */
+                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+                goto Inf;
+                break;
+            case 4: /* / */
+                VpSetNaN(c);
+                goto NaN;
+            }
+            VpSetNaN(c);
+            goto NaN;
+        }
+        /* Inf op Finite */
+        switch(sw)
+        {
+        case 1: /* + */
+        case 2: /* - */
+                VpSetInf(c,VpGetSign(a));
+                break;
+        case 3: /* * */
+                if(VpIsZero(b)) {
+                    VpSetNaN(c);
+                    goto NaN;
+                }
+                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+                break;
+        case 4: /* / */
+                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+        }
+        goto Inf;
+    }
+
+    if(VpIsInf(b)) {
+        switch(sw)
+        {
+        case 1: /* + */
+                VpSetInf(c,VpGetSign(b));
+                break;
+        case 2: /* - */
+                VpSetInf(c,-VpGetSign(b));
+                break;
+        case 3: /* * */
+                if(VpIsZero(a)) {
+                    VpSetNaN(c);
+                    goto NaN;
+                }
+                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+                break;
+        case 4: /* / */
+                VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+        }
+        goto Inf;
+    }
+    return 1; /* Results OK */
+
+Inf:
+    return VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
+NaN:
+    return VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'",0);
+}
+
+/*
+  ----------------------------------------------------------------
+*/
+
+/*
+ *    returns number of chars needed to represent vp in specified format.
+ */
+VP_EXPORT U_LONG
+VpNumOfChars(Real *vp,const char *pszFmt)
+{
+    S_INT  ex;
+    U_LONG nc;
+
+    if(vp == NULL)   return BASE_FIG*2+6;
+    if(!VpIsDef(vp)) return 32; /* not sure,may be OK */
+
+    switch(*pszFmt)
+    {
+    case 'F':
+         nc = BASE_FIG*(vp->Prec + 1)+2;
+         ex = vp->exponent;
+         if(ex<0) {
+             nc += BASE_FIG*(-ex);
+         } else {
+             if(ex > (S_INT)vp->Prec) {
+                 nc += BASE_FIG*(ex - (S_INT)vp->Prec);
+             }
+         }
+         break;
+    case 'E':
+    default:
+         nc = BASE_FIG*(vp->Prec + 2)+6; /* 3: sign + exponent chars */
+    }
+    return nc;
+}
+
+/*
+ * Initializer for Vp routines and constants used.
+ * [Input]
+ *   BaseVal: Base value(assigned to BASE) for Vp calculation.
+ *   It must be the form BaseVal=10**n.(n=1,2,3,...)
+ *   If Base <= 0L,then the BASE will be calcurated so
+ *   that BASE is as large as possible satisfying the
+ *   relation MaxVal <= BASE*(BASE+1). Where the value
+ *   MaxVal is the largest value which can be represented
+ *   by one U_LONG word(LONG) in the computer used.
+ *
+ * [Returns]
+ * DBLE_FIG   ... OK
+ */
+VP_EXPORT U_LONG
+VpInit(U_LONG BaseVal)
+{
+    /* Setup +/- Inf  NaN -0 */
+    VpGetDoubleNaN();
+    VpGetDoublePosInf();
+    VpGetDoubleNegInf();
+    VpGetDoubleNegZero();
+
+#ifndef BASE_FIG
+    if(BaseVal <= 0) {
+        U_LONG w;
+        /* Base <= 0, then determine Base by calcuration. */
+        BASE = 1;
+        while(
+               (BASE > 0) &&
+               ((w = BASE *(BASE + 1)) > BASE) &&((w / BASE) ==(BASE + 1))
+            ) {
+            BaseVal = BASE;
+            BASE = BaseVal * 10L;
+        }
+    }
+    /* Set Base Values */
+    BASE = BaseVal;
+    HALF_BASE = BASE / 2;
+    BASE1 = BASE / 10;
+    BASE_FIG = 0;
+    while(BaseVal /= 10) ++BASE_FIG;
+#endif
+
+    /* Allocates Vp constants. */
+    VpConstOne = VpAlloc((U_LONG)1, "1");
+    VpPt5 = VpAlloc((U_LONG)1, ".5");
+
+#ifdef _DEBUG
+    gnAlloc = 0;
+#endif /* _DEBUG */
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        printf("VpInit: BaseVal   = %lu\n", BaseVal);
+        printf("  BASE   = %lu\n", BASE);
+        printf("  HALF_BASE = %lu\n", HALF_BASE);
+        printf("  BASE1  = %lu\n", BASE1);
+        printf("  BASE_FIG  = %lu\n", BASE_FIG);
+        printf("  DBLE_FIG  = %lu\n", DBLE_FIG);
+    }
+#endif /* _DEBUG */
+
+    return DBLE_FIG;
+}
+
+VP_EXPORT Real *
+VpOne(void)
+{
+    return VpConstOne;
+}
+
+/* If exponent overflows,then raise exception or returns 0 */
+static int
+AddExponent(Real *a,S_INT n)
+{
+    S_INT e = a->exponent;
+    S_INT m = e+n;
+    S_INT eb,mb;
+    if(e>0) {
+        if(n>0) {
+            mb = m*BASE_FIG;
+            eb = e*BASE_FIG;
+            if(mbeb) goto underflow;
+    }
+    a->exponent = m;
+    return 1;
+
+/* Overflow/Underflow ==> Raise exception or returns 0 */
+underflow:
+    VpSetZero(a,VpGetSign(a));
+    return VpException(VP_EXCEPTION_UNDERFLOW,"Exponent underflow",0);
+
+overflow:
+    VpSetInf(a,VpGetSign(a));
+    return VpException(VP_EXCEPTION_OVERFLOW,"Exponent overflow",0);
+}
+
+/*
+ * Allocates variable.
+ * [Input]
+ *   mx ... allocation unit, if zero then mx is determined by szVal.
+ *    The mx is the number of effective digits can to be stored.
+ *   szVal ... value assigned(char). If szVal==NULL,then zero is assumed.
+ *            If szVal[0]=='#' then Max. Prec. will not be considered(1.1.7),
+ *            full precision specified by szVal is allocated.
+ *
+ * [Returns]
+ *   Pointer to the newly allocated variable, or
+ *   NULL be returned if memory allocation is failed,or any error.
+ */
+VP_EXPORT Real *
+VpAlloc(U_LONG mx, const char *szVal)
+{
+    U_LONG i, ni, ipn, ipf, nf, ipe, ne, nalloc;
+    char v,*psz;
+    int  sign=1;
+    Real *vp = NULL;
+    U_LONG mf = VpGetPrecLimit();
+    volatile VALUE buf;
+
+    mx = (mx + BASE_FIG - 1) / BASE_FIG + 1;    /* Determine allocation unit. */
+    if(szVal) {
+        while(ISSPACE(*szVal)) szVal++;
+        if(*szVal!='#') {
+             if(mf) {
+                mf = (mf + BASE_FIG - 1) / BASE_FIG + 2; /* Needs 1 more for div */
+                if(mx>mf) {
+                    mx = mf;
+                }
+            }
+        } else {
+            ++szVal;
+        }
+    } else {
+       /* necessary to be able to store */
+       /* at least mx digits. */
+       /* szVal==NULL ==> allocate zero value. */
+       vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
+       /* xmalloc() alway returns(or throw interruption) */
+       vp->MaxPrec = mx;    /* set max precision */
+       VpSetZero(vp,1);    /* initialize vp to zero. */
+       return vp;
+    }
+
+    /* Skip all '_' after digit: 2006-6-30 */
+    ni = 0;
+    buf = rb_str_new(0,strlen(szVal)+1);
+    psz = RSTRING_PTR(buf);
+    i   = 0;
+    ipn = 0;
+    while((psz[i]=szVal[ipn])!=0) {
+        if(ISDIGIT(psz[i])) ++ni;
+        if(psz[i]=='_') {
+            if(ni>0) {ipn++;continue;}
+            psz[i]=0;
+            break;
+        }
+        ++i; ++ipn;
+    }
+    /* Skip trailing spaces */
+    while((--i)>0) {
+        if(ISSPACE(psz[i])) psz[i] = 0;
+        else                break;
+    }
+    szVal = psz;
+
+    /* Check on Inf & NaN */
+    if(StrCmp(szVal,SZ_PINF)==0 ||
+       StrCmp(szVal,SZ_INF)==0 ) {
+        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
+        vp->MaxPrec = 1;    /* set max precision */
+        VpSetPosInf(vp);
+        return vp;
+    }
+    if(StrCmp(szVal,SZ_NINF)==0) {
+        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
+        vp->MaxPrec = 1;    /* set max precision */
+        VpSetNegInf(vp);
+        return vp;
+    }
+    if(StrCmp(szVal,SZ_NaN)==0) {
+        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
+        vp->MaxPrec = 1;    /* set max precision */
+        VpSetNaN(vp);
+        return vp;
+    }
+
+    /* check on number szVal[] */
+    ipn = i = 0;
+    if     (szVal[i] == '-') {sign=-1;++i;}
+    else if(szVal[i] == '+')          ++i;
+    /* Skip digits */
+    ni = 0;            /* digits in mantissa */
+    while((v = szVal[i]) != 0) {
+        if(!ISDIGIT(v)) break;
+        ++i;
+        ++ni;
+    }
+    nf  = 0;
+    ipf = 0;
+    ipe = 0;
+    ne  = 0;
+    if(v) {
+        /* other than digit nor \0 */
+        if(szVal[i] == '.') {    /* xxx. */
+            ++i;
+            ipf = i;
+            while((v = szVal[i]) != 0) {    /* get fraction part. */
+                if(!ISDIGIT(v)) break;
+                ++i;
+                ++nf;
+            }
+        }
+        ipe = 0;        /* Exponent */
+
+        switch(szVal[i]) {
+        case '\0': break;
+        case 'e':
+        case 'E':
+        case 'd':
+        case 'D':
+            ++i;
+            ipe = i;
+            v = szVal[i];
+            if((v == '-') ||(v == '+')) ++i;
+            while((v=szVal[i])!=0) {
+                if(!ISDIGIT(v)) break;
+                ++i;
+                ++ne;
+            }
+            break;
+        default:
+            break;
+        }
+    }
+    nalloc =(ni + nf + BASE_FIG - 1) / BASE_FIG + 1;    /* set effective allocation  */
+    /* units for szVal[]  */
+    if(mx <= 0) mx = 1;
+    nalloc = Max(nalloc, mx);
+    mx = nalloc;
+    vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
+    /* xmalloc() alway returns(or throw interruption) */
+    vp->MaxPrec = mx;        /* set max precision */
+    VpSetZero(vp,sign);
+    VpCtoV(vp, &(szVal[ipn]), ni, &(szVal[ipf]), nf, &(szVal[ipe]), ne);
+    return vp;
+}
+
+/*
+ * Assignment(c=a).
+ * [Input]
+ *   a   ... RHSV
+ *   isw ... switch for assignment.
+ *    c = a  when isw > 0
+ *    c = -a when isw < 0
+ *    if c->MaxPrec < a->Prec,then round operation
+ *    will be performed.
+ * [Output]
+ *  c  ... LHSV
+ */
+VP_EXPORT int
+VpAsgn(Real *c, Real *a, int isw)
+{
+    U_LONG n;
+    if(VpIsNaN(a)) {
+        VpSetNaN(c);
+        return 0;
+    }
+    if(VpIsInf(a)) {
+        VpSetInf(c,isw*VpGetSign(a));
+        return 0;
+    }
+
+    /* check if the RHS is zero */
+    if(!VpIsZero(a)) {
+        c->exponent = a->exponent;    /* store  exponent */
+        VpSetSign(c,(isw*VpGetSign(a)));    /* set sign */
+        n =(a->Prec < c->MaxPrec) ?(a->Prec) :(c->MaxPrec);
+        c->Prec = n;
+        memcpy(c->frac, a->frac, n * sizeof(U_LONG));
+        /* Needs round ? */
+        if(isw!=10) {
+            /* Not in ActiveRound */
+            if(c->Prec < a->Prec) {
+               VpInternalRound(c,n,(n>0)?a->frac[n-1]:0,a->frac[n]);
+            } else {
+               VpLimitRound(c,0);
+            }
+        }
+    } else {
+        /* The value of 'a' is zero.  */
+        VpSetZero(c,isw*VpGetSign(a));
+        return 1;
+    }
+    return c->Prec*BASE_FIG;
+}
+
+/*
+ *   c = a + b  when operation =  1 or 2
+ *  = a - b  when operation = -1 or -2.
+ *   Returns number of significant digits of c
+ */
+VP_EXPORT int
+VpAddSub(Real *c, Real *a, Real *b, int operation)
+{
+    S_INT sw, isw;
+    Real *a_ptr, *b_ptr;
+    U_LONG n, na, nb, i;
+    U_LONG mrv;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpAddSub(enter) a=% \n", a);
+        VPrint(stdout, "     b=% \n", b);
+        printf(" operation=%d\n", operation);
+    }
+#endif /* _DEBUG */
+
+    if(!VpIsDefOP(c,a,b,(operation>0)?1:2)) return 0; /* No significant digits */
+
+    /* check if a or b is zero  */
+    if(VpIsZero(a)) {
+        /* a is zero,then assign b to c */
+        if(!VpIsZero(b)) {
+            VpAsgn(c, b, operation);
+        } else {
+            /* Both a and b are zero. */
+            if(VpGetSign(a)<0 && operation*VpGetSign(b)<0) {
+                /* -0 -0 */
+                VpSetZero(c,-1);
+            } else {
+                VpSetZero(c,1);
+            }
+            return 1; /* 0: 1 significant digits */
+        }
+        return c->Prec*BASE_FIG;
+    }
+    if(VpIsZero(b)) {
+        /* b is zero,then assign a to c. */
+        VpAsgn(c, a, 1);
+        return c->Prec*BASE_FIG;
+    }
+
+    if(operation < 0) sw = -1;
+    else              sw =  1;
+
+    /* compare absolute value. As a result,|a_ptr|>=|b_ptr| */
+    if(a->exponent > b->exponent) {
+        a_ptr = a;
+        b_ptr = b;
+    }         /* |a|>|b| */
+    else if(a->exponent < b->exponent) {
+        a_ptr = b;
+        b_ptr = a;
+    }                /* |a|<|b| */
+    else {
+        /* Exponent part of a and b is the same,then compare fraction */
+        /* part */
+        na = a->Prec;
+        nb = b->Prec;
+        n = Min(na, nb);
+        for(i=0;i < n; ++i) {
+            if(a->frac[i] > b->frac[i]) {
+                a_ptr = a;
+                b_ptr = b;
+                goto end_if;
+            } else if(a->frac[i] < b->frac[i]) {
+                a_ptr = b;
+                b_ptr = a;
+                goto end_if;
+            }
+        }
+        if(na > nb) {
+         a_ptr = a;
+            b_ptr = b;
+            goto end_if;
+        } else if(na < nb) {
+            a_ptr = b;
+            b_ptr = a;
+            goto end_if;
+        }
+        /* |a| == |b| */
+        if(VpGetSign(a) + sw *VpGetSign(b) == 0) {
+            VpSetZero(c,1);        /* abs(a)=abs(b) and operation = '-'  */
+            return c->Prec*BASE_FIG;
+        }
+        a_ptr = a;
+        b_ptr = b;
+    }
+
+end_if:
+    isw = VpGetSign(a) + sw *VpGetSign(b);
+    /*
+     *  isw = 0 ...( 1)+(-1),( 1)-( 1),(-1)+(1),(-1)-(-1)
+     *      = 2 ...( 1)+( 1),( 1)-(-1)
+     *      =-2 ...(-1)+(-1),(-1)-( 1)
+     *   If isw==0, then c =(Sign a_ptr)(|a_ptr|-|b_ptr|)
+     *              else c =(Sign ofisw)(|a_ptr|+|b_ptr|)
+    */
+    if(isw) {            /* addition */
+        VpSetSign(c,(S_INT)1);
+        mrv = VpAddAbs(a_ptr, b_ptr, c);
+        VpSetSign(c,isw / 2);
+    } else {            /* subtraction */
+        VpSetSign(c,(S_INT)1);
+        mrv = VpSubAbs(a_ptr, b_ptr, c);
+        if(a_ptr == a) {
+            VpSetSign(c,VpGetSign(a));
+        } else    {
+            VpSetSign(c,VpGetSign(a_ptr) * sw);
+        }
+    }
+    VpInternalRound(c,0,(c->Prec>0)?c->frac[c->Prec-1]:0,mrv);
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpAddSub(result) c=% \n", c);
+        VPrint(stdout, "     a=% \n", a);
+        VPrint(stdout, "     b=% \n", b);
+        printf(" operation=%d\n", operation);
+    }
+#endif /* _DEBUG */
+    return c->Prec*BASE_FIG;
+}
+
+/*
+ * Addition of two variable precisional variables
+ * a and b assuming abs(a)>abs(b).
+ *   c = abs(a) + abs(b) ; where |a|>=|b|
+ */
+static U_LONG
+VpAddAbs(Real *a, Real *b, Real *c)
+{
+    U_LONG word_shift;
+    U_LONG carry;
+    U_LONG ap;
+    U_LONG bp;
+    U_LONG cp;
+    U_LONG a_pos;
+    U_LONG b_pos;
+    U_LONG c_pos;
+    U_LONG av, bv, mrv;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpAddAbs called: a = %\n", a);
+        VPrint(stdout, "     b = %\n", b);
+    }
+#endif /* _DEBUG */
+
+    word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);
+    a_pos = ap;
+    b_pos = bp;
+    c_pos = cp;
+    if(word_shift==-1L) return 0; /* Overflow */
+    if(b_pos == -1L) goto Assign_a;
+
+    mrv = av + bv; /* Most right val. Used for round. */
+
+    /* Just assign the last few digits of b to c because a has no  */
+    /* corresponding digits to be added. */
+    while(b_pos + word_shift > a_pos) {
+        --c_pos;
+        if(b_pos > 0) {
+            c->frac[c_pos] = b->frac[--b_pos];
+        } else {
+            --word_shift;
+            c->frac[c_pos] = 0;
+        }
+    }
+
+    /* Just assign the last few digits of a to c because b has no */
+    /* corresponding digits to be added. */
+    bv = b_pos + word_shift;
+    while(a_pos > bv) {
+        c->frac[--c_pos] = a->frac[--a_pos];
+    }
+    carry = 0;    /* set first carry be zero */
+
+    /* Now perform addition until every digits of b will be */
+    /* exhausted. */
+    while(b_pos > 0) {
+        c->frac[--c_pos] = a->frac[--a_pos] + b->frac[--b_pos] + carry;
+        if(c->frac[c_pos] >= BASE) {
+            c->frac[c_pos] -= BASE;
+            carry = 1;
+        } else {
+            carry = 0;
+        }
+    }
+
+    /* Just assign the first few digits of a with considering */
+    /* the carry obtained so far because b has been exhausted. */
+    while(a_pos > 0) {
+        c->frac[--c_pos] = a->frac[--a_pos] + carry;
+        if(c->frac[c_pos] >= BASE) {
+            c->frac[c_pos] -= BASE;
+            carry = 1;
+        } else {
+            carry = 0;
+        }
+    }
+    if(c_pos) c->frac[c_pos - 1] += carry;
+    goto Exit;
+
+Assign_a:
+    VpAsgn(c, a, 1);
+    mrv = 0;
+
+Exit:
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpAddAbs exit: c=% \n", c);
+    }
+#endif /* _DEBUG */
+    return mrv;
+}
+
+/*
+ * c = abs(a) - abs(b)
+ */
+static U_LONG
+VpSubAbs(Real *a, Real *b, Real *c)
+{
+    U_LONG word_shift;
+    U_LONG mrv;
+    U_LONG borrow;
+    U_LONG ap;
+    U_LONG bp;
+    U_LONG cp;
+    U_LONG a_pos;
+    U_LONG b_pos;
+    U_LONG c_pos;
+    U_LONG av, bv;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpSubAbs called: a = %\n", a);
+        VPrint(stdout, "     b = %\n", b);
+    }
+#endif /* _DEBUG */
+
+    word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);
+    a_pos = ap;
+    b_pos = bp;
+    c_pos = cp;
+    if(word_shift==-1L) return 0; /* Overflow */
+    if(b_pos == -1L) goto Assign_a;
+
+    if(av >= bv) {
+        mrv = av - bv;
+        borrow = 0;
+    } else {
+        mrv    = 0;
+        borrow = 1;
+    }
+
+    /* Just assign the values which are the BASE subtracted by   */
+    /* each of the last few digits of the b because the a has no */
+    /* corresponding digits to be subtracted. */
+    if(b_pos + word_shift > a_pos) {
+        while(b_pos + word_shift > a_pos) {
+            --c_pos;
+            if(b_pos > 0) {
+                c->frac[c_pos] = BASE - b->frac[--b_pos] - borrow;
+            } else {
+                --word_shift;
+                c->frac[c_pos] = BASE - borrow;
+            }
+            borrow = 1;
+        }
+    }
+    /* Just assign the last few digits of a to c because b has no */
+    /* corresponding digits to subtract. */
+
+    bv = b_pos + word_shift;
+    while(a_pos > bv) {
+        c->frac[--c_pos] = a->frac[--a_pos];
+    }
+
+    /* Now perform subtraction until every digits of b will be */
+    /* exhausted. */
+    while(b_pos > 0) {
+        --c_pos;
+        if(a->frac[--a_pos] < b->frac[--b_pos] + borrow) {
+            c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow;
+            borrow = 1;
+        } else {
+            c->frac[c_pos] = a->frac[a_pos] - b->frac[b_pos] - borrow;
+            borrow = 0;
+        }
+    }
+
+    /* Just assign the first few digits of a with considering */
+    /* the borrow obtained so far because b has been exhausted. */
+    while(a_pos > 0) {
+        --c_pos;
+        if(a->frac[--a_pos] < borrow) {
+            c->frac[c_pos] = BASE + a->frac[a_pos] - borrow;
+            borrow = 1;
+        } else {
+            c->frac[c_pos] = a->frac[a_pos] - borrow;
+            borrow = 0;
+        }
+    }
+    if(c_pos) c->frac[c_pos - 1] -= borrow;
+    goto Exit;
+
+Assign_a:
+    VpAsgn(c, a, 1);
+    mrv = 0;
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpSubAbs exit: c=% \n", c);
+    }
+#endif /* _DEBUG */
+    return mrv;
+}
+
+/*
+ * Note: If(av+bv)>= HALF_BASE,then 1 will be added to the least significant
+ *    digit of c(In case of addition).
+ * ------------------------- figure of output -----------------------------------
+ *      a =  xxxxxxxxxxx
+ *      b =    xxxxxxxxxx
+ *      c =xxxxxxxxxxxxxxx
+ *      word_shift =  |   |
+ *      right_word =  |    | (Total digits in RHSV)
+ *      left_word  = |   |   (Total digits in LHSV)
+ *      a_pos      =    |
+ *      b_pos      =     |
+ *      c_pos      =      |
+ */
+static U_LONG
+VpSetPTR(Real *a, Real *b, Real *c, U_LONG *a_pos, U_LONG *b_pos, U_LONG *c_pos, U_LONG *av, U_LONG *bv)
+{
+    U_LONG left_word, right_word, word_shift;
+    c->frac[0] = 0;
+    *av = *bv = 0;
+    word_shift =((a->exponent) -(b->exponent));
+    left_word = b->Prec + word_shift;
+    right_word = Max((a->Prec),left_word);
+    left_word =(c->MaxPrec) - 1;    /* -1 ... prepare for round up */
+    /*
+     * check if 'round' is needed.
+     */
+    if(right_word > left_word) {    /* round ? */
+        /*---------------------------------
+         *  Actual size of a = xxxxxxAxx
+         *  Actual size of b = xxxBxxxxx
+         *  Max. size of   c = xxxxxx
+         *  Round off        =   |-----|
+         *  c_pos            =   |
+         *  right_word       =   |
+         *  a_pos            =    |
+         */
+        *c_pos = right_word = left_word + 1;    /* Set resulting precision */
+        /* be equal to that of c */
+        if((a->Prec) >=(c->MaxPrec)) {
+            /*
+             *   a =  xxxxxxAxxx
+             *   c =  xxxxxx
+             *   a_pos =    |
+             */
+            *a_pos = left_word;
+            *av = a->frac[*a_pos];    /* av is 'A' shown in above. */
+        } else {
+            /*
+             *   a = xxxxxxx
+             *   c = xxxxxxxxxx
+             *  a_pos =     |
+             */
+            *a_pos = a->Prec;
+        }
+        if((b->Prec + word_shift) >= c->MaxPrec) {
+            /*
+             *   a = xxxxxxxxx
+             *   b =  xxxxxxxBxxx
+             *   c = xxxxxxxxxxx
+             *  b_pos =   |
+             */
+            if(c->MaxPrec >=(word_shift + 1)) {
+                *b_pos = c->MaxPrec - word_shift - 1;
+                *bv = b->frac[*b_pos];
+            } else {
+                *b_pos = -1L;
+            }
+        } else {
+            /*
+             *   a = xxxxxxxxxxxxxxxx
+             *   b =  xxxxxx
+             *   c = xxxxxxxxxxxxx
+             *  b_pos =     |
+             */
+            *b_pos = b->Prec;
+        }
+    } else {            /* The MaxPrec of c - 1 > The Prec of a + b  */
+        /*
+         *    a =   xxxxxxx
+         *    b =   xxxxxx
+         *    c = xxxxxxxxxxx
+         *   c_pos =   |
+         */
+        *b_pos = b->Prec;
+        *a_pos = a->Prec;
+        *c_pos = right_word + 1;
+    }
+    c->Prec = *c_pos;
+    c->exponent = a->exponent;
+    if(!AddExponent(c,(S_LONG)1)) return (-1L);
+    return word_shift;
+}
+
+/*
+ * Return number og significant digits
+ *       c = a * b , Where a = a0a1a2 ... an
+ *             b = b0b1b2 ... bm
+ *             c = c0c1c2 ... cl
+ *          a0 a1 ... an   * bm
+ *       a0 a1 ... an   * bm-1
+ *         .   .    .
+ *       .   .   .
+ *        a0 a1 .... an    * b0
+ *      +_____________________________
+ *     c0 c1 c2  ......  cl
+ *     nc      <---|
+ *     MaxAB |--------------------|
+ */
+VP_EXPORT int
+VpMult(Real *c, Real *a, Real *b)
+{
+    U_LONG MxIndA, MxIndB, MxIndAB, MxIndC;
+    U_LONG ind_c, i, ii, nc;
+    U_LONG ind_as, ind_ae, ind_bs, ind_be;
+    U_LONG Carry, s;
+    Real *w;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpMult(Enter): a=% \n", a);
+        VPrint(stdout, "      b=% \n", b);
+    }
+#endif /* _DEBUG */
+
+    if(!VpIsDefOP(c,a,b,3)) return 0; /* No significant digit */
+
+    if(VpIsZero(a) || VpIsZero(b)) {
+        /* at least a or b is zero */
+        VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+        return 1; /* 0: 1 significant digit */
+    }
+
+    if(VpIsOne(a)) {
+        VpAsgn(c, b, VpGetSign(a));
+        goto Exit;
+    }
+    if(VpIsOne(b)) {
+        VpAsgn(c, a, VpGetSign(b));
+        goto Exit;
+    }
+    if((b->Prec) >(a->Prec)) {
+        /* Adjust so that digits(a)>digits(b) */
+        w = a;
+        a = b;
+        b = w;
+    }
+    w = NULL;
+    MxIndA = a->Prec - 1;
+    MxIndB = b->Prec - 1;
+    MxIndC = c->MaxPrec - 1;
+    MxIndAB = a->Prec + b->Prec - 1;
+
+    if(MxIndC < MxIndAB) {    /* The Max. prec. of c < Prec(a)+Prec(b) */
+        w = c;
+        c = VpAlloc((U_LONG)((MxIndAB + 1) * BASE_FIG), "#0");
+        MxIndC = MxIndAB;
+    }
+
+    /* set LHSV c info */
+
+    c->exponent = a->exponent;    /* set exponent */
+    if(!AddExponent(c,b->exponent)) {
+	if(w) VpFree(c);
+	return 0;
+    }
+    VpSetSign(c,VpGetSign(a)*VpGetSign(b));    /* set sign  */
+    Carry = 0;
+    nc = ind_c = MxIndAB;
+    memset(c->frac, 0, (nc + 1) * sizeof(U_LONG));        /* Initialize c  */
+    c->Prec = nc + 1;        /* set precision */
+    for(nc = 0; nc < MxIndAB; ++nc, --ind_c) {
+        if(nc < MxIndB) {    /* The left triangle of the Fig. */
+            ind_as = MxIndA - nc;
+            ind_ae = MxIndA;
+            ind_bs = MxIndB;
+            ind_be = MxIndB - nc;
+        } else if(nc <= MxIndA) {    /* The middle rectangular of the Fig. */
+            ind_as = MxIndA - nc;
+            ind_ae = MxIndA -(nc - MxIndB);
+            ind_bs = MxIndB;
+            ind_be = 0;
+        } else if(nc > MxIndA) {    /*  The right triangle of the Fig. */
+            ind_as = 0;
+            ind_ae = MxIndAB - nc - 1;
+            ind_bs = MxIndB -(nc - MxIndA);
+            ind_be = 0;
+        }
+
+        for(i = ind_as; i <= ind_ae; ++i) {
+            s =((a->frac[i]) *(b->frac[ind_bs--]));
+            Carry = s / BASE;
+            s = s -(Carry * BASE);
+            c->frac[ind_c] += s;
+            if(c->frac[ind_c] >= BASE) {
+                s = c->frac[ind_c] / BASE;
+                Carry += s;
+                c->frac[ind_c] -= (s * BASE);
+            }
+            if(Carry) {
+                ii = ind_c;
+                while((--ii) >= 0) {
+                    c->frac[ii] += Carry;
+                    if(c->frac[ii] >= BASE) {
+                        Carry = c->frac[ii] / BASE;
+                        c->frac[ii] -=(Carry * BASE);
+                    } else {
+                        break;
+                    }
+                }
+            }
+        }
+    }
+    if(w != NULL) {        /* free work variable */
+        VpNmlz(c);
+        VpAsgn(w, c, 1);
+        VpFree(c);
+        c = w;
+    } else {
+        VpLimitRound(c,0);
+    }
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpMult(c=a*b): c=% \n", c);
+        VPrint(stdout, "      a=% \n", a);
+        VPrint(stdout, "      b=% \n", b);
+    }
+#endif /*_DEBUG */
+    return c->Prec*BASE_FIG;
+}
+
+/*
+ *   c = a / b,  remainder = r
+ */
+VP_EXPORT int
+VpDivd(Real *c, Real *r, Real *a, Real *b)
+{
+    U_LONG word_a, word_b, word_c, word_r;
+    U_LONG i, n, ind_a, ind_b, ind_c, ind_r;
+    U_LONG nLoop;
+    U_LONG q, b1, b1p1, b1b2, b1b2p1, r1r2;
+    U_LONG borrow, borrow1, borrow2, qb;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, " VpDivd(c=a/b)  a=% \n", a);
+        VPrint(stdout, "    b=% \n", b);
+    }
+#endif /*_DEBUG */
+
+    VpSetNaN(r);
+    if(!VpIsDefOP(c,a,b,4)) goto Exit;
+    if(VpIsZero(a)&&VpIsZero(b)) {
+        VpSetNaN(c);
+        return VpException(VP_EXCEPTION_NaN,"(VpDivd) 0/0 not defined(NaN)",0);
+    }
+    if(VpIsZero(b)) {
+        VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+        return VpException(VP_EXCEPTION_ZERODIVIDE,"(VpDivd) Divide by zero",0);
+    }
+    if(VpIsZero(a)) {
+        /* numerator a is zero  */
+        VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+        VpSetZero(r,VpGetSign(a)*VpGetSign(b));
+        goto Exit;
+    }
+    if(VpIsOne(b)) {
+        /* divide by one  */
+        VpAsgn(c, a, VpGetSign(b));
+        VpSetZero(r,VpGetSign(a));
+        goto Exit;
+    }
+
+    word_a = a->Prec;
+    word_b = b->Prec;
+    word_c = c->MaxPrec;
+    word_r = r->MaxPrec;
+
+    ind_c = 0;
+    ind_r = 1;
+
+    if(word_a >= word_r) goto space_error;
+
+    r->frac[0] = 0;
+    while(ind_r <= word_a) {
+        r->frac[ind_r] = a->frac[ind_r - 1];
+        ++ind_r;
+    }
+
+    while(ind_r < word_r) r->frac[ind_r++] = 0;
+    while(ind_c < word_c) c->frac[ind_c++] = 0;
+
+    /* initial procedure */
+    b1 = b1p1 = b->frac[0];
+    if(b->Prec <= 1) {
+        b1b2p1 = b1b2 = b1p1 * BASE;
+    } else {
+        b1p1 = b1 + 1;
+        b1b2p1 = b1b2 = b1 * BASE + b->frac[1];
+        if(b->Prec > 2) ++b1b2p1;
+    }
+
+    /* */
+    /* loop start */
+    ind_c = word_r - 1;
+    nLoop = Min(word_c,ind_c);
+    ind_c = 1;
+    while(ind_c < nLoop) {
+        if(r->frac[ind_c] == 0) {
+            ++ind_c;
+            continue;
+        }
+        r1r2 = r->frac[ind_c] * BASE + r->frac[ind_c + 1];
+        if(r1r2 == b1b2) {
+            /* The first two word digits is the same */
+            ind_b = 2;
+            ind_a = ind_c + 2;
+            while(ind_b < word_b) {
+                if(r->frac[ind_a] < b->frac[ind_b]) goto div_b1p1;
+                if(r->frac[ind_a] > b->frac[ind_b]) break;
+                ++ind_a;
+                ++ind_b;
+            }
+            /* The first few word digits of r and b is the same and */
+            /* the first different word digit of w is greater than that */
+            /* of b, so quotinet is 1 and just subtract b from r. */
+            borrow = 0;        /* quotient=1, then just r-b */
+            ind_b = b->Prec - 1;
+            ind_r = ind_c + ind_b;
+            if(ind_r >= word_r) goto space_error;
+            n = ind_b;
+            for(i = 0; i <= n; ++i) {
+                if(r->frac[ind_r] < b->frac[ind_b] + borrow) {
+                    r->frac[ind_r] +=(BASE -(b->frac[ind_b] + borrow));
+                    borrow = 1;
+                } else {
+                    r->frac[ind_r] = r->frac[ind_r] - b->frac[ind_b] - borrow;
+                    borrow = 0;
+                }
+                --ind_r;
+                --ind_b;
+            }
+            ++(c->frac[ind_c]);
+            goto carry;
+        }
+        /* The first two word digits is not the same, */
+        /* then compare magnitude, and divide actually. */
+        if(r1r2 >= b1b2p1) {
+            q = r1r2 / b1b2p1;
+            c->frac[ind_c] += q;
+            ind_r = b->Prec + ind_c - 1;
+            goto sub_mult;
+        }
+
+div_b1p1:
+        if(ind_c + 1 >= word_c) goto out_side;
+        q = r1r2 / b1p1;
+        c->frac[ind_c + 1] += q;
+        ind_r = b->Prec + ind_c;
+
+sub_mult:
+        borrow1 = borrow2 = 0;
+        ind_b = word_b - 1;
+        if(ind_r >= word_r) goto space_error;
+        n = ind_b;
+        for(i = 0; i <= n; ++i) {
+            /* now, perform r = r - q * b */
+            qb = q *(b->frac[ind_b]);
+            if(qb < BASE) borrow1 = 0;
+            else {
+                borrow1 = qb / BASE;
+                qb = qb - borrow1 * BASE;
+            }
+            if(r->frac[ind_r] < qb) {
+                r->frac[ind_r] +=(BASE - qb);
+                borrow2 = borrow2 + borrow1 + 1;
+            } else {
+                r->frac[ind_r] -= qb;
+                borrow2 += borrow1;
+            }
+            if(borrow2) {
+                if(r->frac[ind_r - 1] < borrow2) {
+                    r->frac[ind_r - 1] +=(BASE - borrow2);
+                    borrow2 = 1;
+                } else {
+                    r->frac[ind_r - 1] -= borrow2;
+                    borrow2 = 0;
+                }
+            }
+            --ind_r;
+            --ind_b;
+        }
+
+        r->frac[ind_r] -= borrow2;
+carry:
+        ind_r = ind_c;
+        while(c->frac[ind_r] >= BASE) {
+            c->frac[ind_r] -= BASE;
+            --ind_r;
+            ++(c->frac[ind_r]);
+        }
+    }
+    /* End of operation, now final arrangement */
+out_side:
+    c->Prec = word_c;
+    c->exponent = a->exponent;
+    if(!AddExponent(c,(S_LONG)2))   return 0;
+    if(!AddExponent(c,-(b->exponent))) return 0;
+
+    VpSetSign(c,VpGetSign(a)*VpGetSign(b));
+    VpNmlz(c);            /* normalize c */
+    r->Prec = word_r;
+    r->exponent = a->exponent;
+    if(!AddExponent(r,(S_LONG)1)) return 0;
+    VpSetSign(r,VpGetSign(a));
+    VpNmlz(r);            /* normalize r(remainder) */
+    goto Exit;
+
+space_error:
+#ifdef _DEBUG
+    if(gfDebug) {
+        printf("   word_a=%lu\n", word_a);
+        printf("   word_b=%lu\n", word_b);
+        printf("   word_c=%lu\n", word_c);
+        printf("   word_r=%lu\n", word_r);
+        printf("   ind_r =%lu\n", ind_r);
+    }
+#endif /* _DEBUG */
+    rb_bug("ERROR(VpDivd): space for remainder too small.");
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, " VpDivd(c=a/b), c=% \n", c);
+        VPrint(stdout, "    r=% \n", r);
+    }
+#endif /* _DEBUG */
+    return c->Prec*BASE_FIG;
+}
+
+/*
+ *  Input  a = 00000xxxxxxxx En(5 preceeding zeros)
+ *  Output a = xxxxxxxx En-5
+ */
+static int
+VpNmlz(Real *a)
+{
+    U_LONG ind_a, i;
+
+    if(!VpIsDef(a)) goto NoVal;
+    if(VpIsZero(a)) goto NoVal;
+
+    ind_a = a->Prec;
+    while(ind_a--) {
+        if(a->frac[ind_a]) {
+            a->Prec = ind_a + 1;
+            i = 0;
+            while(a->frac[i] == 0) ++i;        /* skip the first few zeros */
+            if(i) {
+                a->Prec -= i;
+                if(!AddExponent(a,-((S_INT)i))) return 0;
+                memmove(&(a->frac[0]),&(a->frac[i]),(a->Prec)*sizeof(U_LONG));
+            }
+            return 1;
+        }
+    }
+    /* a is zero(no non-zero digit) */
+    VpSetZero(a,VpGetSign(a));
+    return 0;
+
+NoVal:
+    a->frac[0] = 0;
+    a->Prec=1;
+    return 0;
+}
+
+/*
+ *  VpComp = 0  ... if a=b,
+ *   Pos  ... a>b,
+ *   Neg  ... asign - b->sign;
+        else             e = a->sign;
+        if(e>0)   return  1;
+        else if(e<0) return -1;
+        else   return  0;
+    }
+    if(!VpIsDef(b)) {
+        e = -b->sign;
+        if(e>0) return  1;
+        else return -1;
+    }
+    /* Zero check */
+    if(VpIsZero(a)) {
+        if(VpIsZero(b))      return 0; /* both zero */
+        val = -VpGetSign(b);
+        goto Exit;
+    }
+    if(VpIsZero(b)) {
+        val = VpGetSign(a);
+        goto Exit;
+    }
+
+    /* compare sign */
+    if(VpGetSign(a) > VpGetSign(b)) {
+        val = 1;        /* a>b */
+        goto Exit;
+    }
+    if(VpGetSign(a) < VpGetSign(b)) {
+        val = -1;        /* aexponent) >(b->exponent)) {
+        val = VpGetSign(a);
+        goto Exit;
+    }
+    if((a->exponent) <(b->exponent)) {
+        val = -VpGetSign(b);
+        goto Exit;
+    }
+
+    /* a and b have same exponent, then compare significand. */
+    mx =((a->Prec) <(b->Prec)) ?(a->Prec) :(b->Prec);
+    ind = 0;
+    while(ind < mx) {
+        if((a->frac[ind]) >(b->frac[ind])) {
+            val = VpGetSign(a);
+         goto Exit;
+        }
+        if((a->frac[ind]) <(b->frac[ind])) {
+            val = -VpGetSign(b);
+            goto Exit;
+        }
+        ++ind;
+    }
+    if((a->Prec) >(b->Prec)) {
+        val = VpGetSign(a);
+    } else if((a->Prec) <(b->Prec)) {
+        val = -VpGetSign(b);
+    }
+
+Exit:
+    if  (val> 1) val =  1;
+    else if(val<-1) val = -1;
+
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, " VpComp a=%\n", a);
+        VPrint(stdout, "  b=%\n", b);
+        printf("  ans=%d\n", val);
+    }
+#endif /* _DEBUG */
+    return (int)val;
+}
+
+#ifdef _DEBUG
+/*
+ *    cntl_chr ... ASCIIZ Character, print control characters
+ *     Available control codes:
+ *      %  ... VP variable. To print '%', use '%%'.
+ *      \n ... new line
+ *      \b ... backspace
+ *           ... tab
+ *     Note: % must must not appear more than once
+ *    a  ... VP variable to be printed
+ */
+VP_EXPORT int
+VPrint(FILE *fp, char *cntl_chr, Real *a)
+{
+    U_LONG i, j, nc, nd, ZeroSup;
+    U_LONG n, m, e, nn;
+
+    /* Check if NaN & Inf. */
+    if(VpIsNaN(a)) {
+        fprintf(fp,SZ_NaN);
+        return 8;
+    }
+    if(VpIsPosInf(a)) {
+        fprintf(fp,SZ_INF);
+        return 8;
+    }
+    if(VpIsNegInf(a)) {
+        fprintf(fp,SZ_NINF);
+        return 9;
+    }
+    if(VpIsZero(a)) {
+        fprintf(fp,"0.0");
+        return 3;
+    }
+
+    j = 0;
+    nd = nc = 0;        /*  nd : number of digits in fraction part(every 10 digits, */
+    /*    nd<=10). */
+    /*  nc : number of caracters printed  */
+    ZeroSup = 1;        /* Flag not to print the leading zeros as 0.00xxxxEnn */
+    while(*(cntl_chr + j)) {
+        if((*(cntl_chr + j) == '%') &&(*(cntl_chr + j + 1) != '%')) {
+         nc = 0;
+         if(!VpIsZero(a)) {
+                if(VpGetSign(a) < 0) {
+                    fprintf(fp, "-");
+                    ++nc;
+                }
+                nc += fprintf(fp, "0.");
+                n = a->Prec;
+                for(i=0;i < n;++i) {
+		    m = BASE1;
+                    e = a->frac[i];
+                    while(m) {
+                        nn = e / m;
+                        if((!ZeroSup) || nn) {
+                            nc += fprintf(fp, "%lu", nn);    /* The reading zero(s) */
+                            /* as 0.00xx will not */
+                            /* be printed. */
+                            ++nd;
+                            ZeroSup = 0;    /* Set to print succeeding zeros */
+                        }
+                        if(nd >= 10) {    /* print ' ' after every 10 digits */
+                            nd = 0;
+                            nc += fprintf(fp, " ");
+                        }
+                        e = e - nn * m;
+                        m /= 10;
+                    }
+                }
+                nc += fprintf(fp, "E%ld", VpExponent10(a));
+            } else {
+                nc += fprintf(fp, "0.0");
+            }
+        } else {
+            ++nc;
+            if(*(cntl_chr + j) == '\\') {
+                switch(*(cntl_chr + j + 1)) {
+                case 'n':
+                    fprintf(fp, "\n");
+                    ++j;
+                    break;
+                case 't':
+                    fprintf(fp, "\t");
+                    ++j;
+                 break;
+                case 'b':
+                    fprintf(fp, "\n");
+                    ++j;
+                    break;
+                default:
+                    fprintf(fp, "%c", *(cntl_chr + j));
+                    break;
+                }
+            } else {
+                fprintf(fp, "%c", *(cntl_chr + j));
+                if(*(cntl_chr + j) == '%') ++j;
+            }
+        }
+        j++;
+    }
+    return (int)nc;
+}
+#endif /* _DEBUG */
+
+static void
+VpFormatSt(char *psz,S_INT fFmt)
+{
+    U_LONG ie;
+    U_LONG i;
+    S_INT nf = 0;
+    char ch;
+
+    if(fFmt<=0) return;
+
+    ie = strlen(psz);
+    for(i = 0; i < ie; ++i) {
+        ch = psz[i];
+        if(!ch) break;
+        if(ISSPACE(ch) || ch=='-' || ch=='+') continue;
+        if(ch == '.')                { nf = 0;continue;}
+        if(ch == 'E') break;
+        nf++;
+        if(nf > fFmt) {
+            memmove(psz + i + 1, psz + i, ie - i + 1);
+            ++ie;
+            nf = 0;
+            psz[i] = ' ';
+        }
+    }
+}
+
+VP_EXPORT S_LONG
+VpExponent10(Real *a)
+{
+    S_LONG ex;
+    U_LONG n;
+
+    if(!VpHasVal(a)) return 0;
+
+    ex =(a->exponent) * BASE_FIG;
+    n = BASE1;
+    while((a->frac[0] / n) == 0) {
+         --ex;
+         n /= 10;
+    }
+    return ex;
+}
+
+VP_EXPORT void
+VpSzMantissa(Real *a,char *psz)
+{
+    U_LONG i, ZeroSup;
+    U_LONG n, m, e, nn;
+
+    if(VpIsNaN(a)) {
+        sprintf(psz,SZ_NaN);
+        return;
+    }
+    if(VpIsPosInf(a)) {
+        sprintf(psz,SZ_INF);
+        return;
+    }
+    if(VpIsNegInf(a)) {
+        sprintf(psz,SZ_NINF);
+        return;
+    }
+
+    ZeroSup = 1;        /* Flag not to print the leading zeros as 0.00xxxxEnn */
+    if(!VpIsZero(a)) {
+        if(VpGetSign(a) < 0) *psz++ = '-';
+        n = a->Prec;
+        for(i=0;i < n;++i) {
+            m = BASE1;
+            e = a->frac[i];
+            while(m) {
+                nn = e / m;
+                if((!ZeroSup) || nn) {
+                    sprintf(psz, "%lu", nn);    /* The reading zero(s) */
+                    psz += strlen(psz);
+                    /* as 0.00xx will be ignored. */
+                    ZeroSup = 0;    /* Set to print succeeding zeros */
+                }
+                e = e - nn * m;
+                m /= 10;
+            }
+        }
+        *psz = 0;
+        while(psz[-1]=='0') *(--psz) = 0;
+    } else {
+        if(VpIsPosZero(a)) sprintf(psz, "0");
+        else      sprintf(psz, "-0");
+    }
+}
+
+VP_EXPORT int
+VpToSpecialString(Real *a,char *psz,int fPlus)
+/* fPlus =0:default, =1: set ' ' before digits , =2: set '+' before digits. */
+{
+    if(VpIsNaN(a)) {
+        sprintf(psz,SZ_NaN);
+        return 1;
+    }
+
+    if(VpIsPosInf(a)) {
+        if(fPlus==1) {
+           *psz++ = ' ';
+        } else if(fPlus==2) {
+           *psz++ = '+';
+        }
+        sprintf(psz,SZ_INF);
+        return 1;
+    }
+    if(VpIsNegInf(a)) {
+        sprintf(psz,SZ_NINF);
+        return 1;
+    }
+    if(VpIsZero(a)) {
+        if(VpIsPosZero(a)) {
+            if(fPlus==1)      sprintf(psz, " 0.0");
+            else if(fPlus==2) sprintf(psz, "+0.0");
+            else              sprintf(psz, "0.0");
+        } else    sprintf(psz, "-0.0");
+        return 1;
+    }
+    return 0;
+}
+
+VP_EXPORT void
+VpToString(Real *a,char *psz,int fFmt,int fPlus)
+/* fPlus =0:default, =1: set ' ' before digits , =2:set '+' before digits. */
+{
+    U_LONG i, ZeroSup;
+    U_LONG n, m, e, nn;
+    char *pszSav = psz;
+    S_LONG ex;
+
+    if(VpToSpecialString(a,psz,fPlus)) return;
+
+    ZeroSup = 1;    /* Flag not to print the leading zeros as 0.00xxxxEnn */
+
+    if(VpGetSign(a) < 0) *psz++ = '-';
+    else if(fPlus==1)    *psz++ = ' ';
+    else if(fPlus==2)    *psz++ = '+';
+
+    *psz++ = '0';
+    *psz++ = '.';
+    n = a->Prec;
+    for(i=0;i < n;++i) {
+        m = BASE1;
+        e = a->frac[i];
+        while(m) {
+            nn = e / m;
+            if((!ZeroSup) || nn) {
+                sprintf(psz, "%lu", nn);    /* The reading zero(s) */
+                psz += strlen(psz);
+                /* as 0.00xx will be ignored. */
+                ZeroSup = 0;    /* Set to print succeeding zeros */
+            }
+            e = e - nn * m;
+            m /= 10;
+        }
+    }
+    ex =(a->exponent) * BASE_FIG;
+    n = BASE1;
+    while((a->frac[0] / n) == 0) {
+        --ex;
+        n /= 10;
+    }
+    while(psz[-1]=='0') *(--psz) = 0;
+    sprintf(psz, "E%ld", ex);
+    if(fFmt) VpFormatSt(pszSav, fFmt);
+}
+
+VP_EXPORT void
+VpToFString(Real *a,char *psz,int fFmt,int fPlus)
+/* fPlus =0:default,=1: set ' ' before digits ,set '+' before digits. */
+{
+    U_LONG i;
+    U_LONG n, m, e, nn;
+    char *pszSav = psz;
+    S_LONG ex;
+
+    if(VpToSpecialString(a,psz,fPlus)) return;
+
+    if(VpGetSign(a) < 0) *psz++ = '-';
+    else if(fPlus==1)    *psz++ = ' ';
+    else if(fPlus==2)    *psz++ = '+';
+
+    n  = a->Prec;
+    ex = a->exponent;
+    if(ex<=0) {
+       *psz++ = '0';*psz++ = '.';
+       while(ex<0) {
+          for(i=0;i= 0) {
+           sprintf(psz, "%lu", a->frac[i]);
+           psz += strlen(psz);
+       } else {
+           m = BASE1;
+           e = a->frac[i];
+           while(m) {
+               nn = e / m;
+               *psz++ = (char)(nn + '0');
+               e = e - nn * m;
+               m /= 10;
+           }
+       }
+       if(ex == 0) *psz++ = '.';
+    }
+    while(--ex>=0) {
+       m = BASE;
+       while(m/=10) *psz++ = '0';
+       if(ex == 0) *psz++ = '.';
+    }
+    *psz = 0;
+    while(psz[-1]=='0') *(--psz) = 0;
+    if(psz[-1]=='.') sprintf(psz, "0");
+    if(fFmt) VpFormatSt(pszSav, fFmt);
+}
+
+/*
+ *  [Output]
+ *   a[]  ... variable to be assigned the value.
+ *  [Input]
+ *   int_chr[]  ... integer part(may include '+/-').
+ *   ni   ... number of characters in int_chr[],not including '+/-'.
+ *   frac[]  ... fraction part.
+ *   nf   ... number of characters in frac[].
+ *   exp_chr[]  ... exponent part(including '+/-').
+ *   ne   ... number of characters in exp_chr[],not including '+/-'.
+ */
+VP_EXPORT int
+VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, const char *exp_chr, U_LONG ne)
+{
+    U_LONG i, j, ind_a, ma, mi, me;
+    U_LONG loc;
+    S_INT  e,es, eb, ef;
+    S_INT  sign, signe;
+    /* get exponent part */
+    e = 0;
+    ma = a->MaxPrec;
+    mi = ni;
+    me = ne;
+    signe = 1;
+    memset(a->frac, 0, ma * sizeof(U_LONG));
+    if(ne > 0) {
+        i = 0;
+        if(exp_chr[0] == '-') {
+            signe = -1;
+            ++i;
+            ++me;
+        } else if(exp_chr[0] == '+') {
+            ++i;
+            ++me;
+        }
+        while(i < me) {
+            es = e*((S_INT)BASE_FIG);
+            e = e * 10 + exp_chr[i] - '0';
+            if(es>e*((S_INT)BASE_FIG)) {
+                VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
+                sign = 1;
+                if(int_chr[0] == '-') sign = -1;
+                if(signe > 0) VpSetInf(a, sign);
+                else VpSetZero(a, sign);
+                return 1;
+            }
+            ++i;
+        }
+    }
+
+    /* get integer part */
+    i = 0;
+    sign = 1;
+    if(ni >= 0) {
+        if(int_chr[0] == '-') {
+            sign = -1;
+            ++i;
+            ++mi;
+        } else if(int_chr[0] == '+') {
+            ++i;
+            ++mi;
+        }
+    }
+
+    e = signe * e;        /* e: The value of exponent part. */
+    e = e + ni;        /* set actual exponent size. */
+
+    if(e > 0)    signe = 1;
+    else        signe = -1;
+
+    /* Adjust the exponent so that it is the multiple of BASE_FIG. */
+    j = 0;
+    ef = 1;
+    while(ef) {
+        if(e>=0) eb =  e;
+        else  eb = -e;
+        ef = eb / ((S_INT)BASE_FIG);
+        ef = eb - ef * ((S_INT)BASE_FIG);
+        if(ef) {
+            ++j;        /* Means to add one more preceeding zero */
+            ++e;
+        }
+    }
+
+    eb = e / ((S_INT)BASE_FIG);
+
+    ind_a = 0;
+    while(i < mi) {
+        a->frac[ind_a] = 0;
+        while((j < (U_LONG)BASE_FIG) &&(i < mi)) {
+            a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0';
+            ++j;
+            ++i;
+        }
+        if(i < mi) {
+            ++ind_a;
+            if(ind_a >= ma) goto over_flow;
+            j = 0;
+        }
+    }
+    loc = 1;
+
+    /* get fraction part */
+
+    i = 0;
+    while(i < nf) {
+        while((j < (U_LONG)BASE_FIG) &&(i < nf)) {
+            a->frac[ind_a] = a->frac[ind_a] * 10 + frac[i] - '0';
+            ++j;
+            ++i;
+        }
+        if(i < nf) {
+            ++ind_a;
+            if(ind_a >= ma) goto over_flow;
+            j = 0;
+        }
+    }
+    goto Final;
+
+over_flow:
+    rb_warn("Conversion from String to BigDecimal overflow (last few digits discarded).");
+
+Final:
+    if(ind_a >= ma) ind_a = ma - 1;
+    while(j < (U_LONG)BASE_FIG) {
+        a->frac[ind_a] = a->frac[ind_a] * 10;
+        ++j;
+    }
+    a->Prec = ind_a + 1;
+    a->exponent = eb;
+    VpSetSign(a,sign);
+    VpNmlz(a);
+    return 1;
+}
+
+/*
+ * [Input]
+ *   *m  ... Real
+ * [Output]
+ *   *d  ... fraction part of m(d = 0.xxxxxxx). where # of 'x's is fig.
+ *   *e  ... U_LONG,exponent of m.
+ * DBLE_FIG ... Number of digits in a double variable.
+ *
+ *  m -> d*10**e, 0Prec));
+    *d = 0.0;
+    div = 1.;
+    while(ind_m < mm) {
+        div /=(double)((S_INT)BASE);
+        *d = *d +((double) ((S_INT)m->frac[ind_m++])) * div;
+    }
+    *e = m->exponent * ((S_INT)BASE_FIG);
+    *d *= VpGetSign(m);
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, " VpVtoD: m=%\n", m);
+        printf("   d=%e * 10 **%ld\n", *d, *e);
+        printf("   DBLE_FIG = %ld\n", DBLE_FIG);
+    }
+#endif /*_DEBUG */
+    return f;
+}
+
+/*
+ * m <- d
+ */
+VP_EXPORT void
+VpDtoV(Real *m, double d)
+{
+    U_LONG i, ind_m, mm;
+    U_LONG ne;
+    double  val, val2;
+
+    if(isnan(d)) {
+        VpSetNaN(m);
+        goto Exit;
+    }
+    if(isinf(d)) {
+        if(d>0.0) VpSetPosInf(m);
+        else   VpSetNegInf(m);
+        goto Exit;
+    }
+
+    if(d == 0.0) {
+        VpSetZero(m,1);
+        goto Exit;
+    }
+    val =(d > 0.) ? d :(-d);
+    ne = 0;
+    if(val >= 1.0) {
+        while(val >= 1.0) {
+            val /=(double)((S_INT)BASE);
+            ++ne;
+        }
+    } else {
+        val2 = 1.0 /(double)((S_INT)BASE);
+        while(val < val2) {
+            val *=(double)((S_INT)BASE);
+            --ne;
+        }
+    }
+    /* Now val = 0.xxxxx*BASE**ne */
+
+    mm = m->MaxPrec;
+    memset(m->frac, 0, mm * sizeof(U_LONG));
+    for(ind_m = 0;val > 0.0 && ind_m < mm;ind_m++) {
+        val *=(double)((S_INT)BASE);
+        i =(U_LONG) val;
+        val -=(double)((S_INT)i);
+        m->frac[ind_m] = i;
+    }
+    if(ind_m >= mm) ind_m = mm - 1;
+    if(d > 0.0) {
+        VpSetSign(m, (S_INT)1);
+    } else {
+        VpSetSign(m,-(S_INT)1);
+    }
+    m->Prec = ind_m + 1;
+    m->exponent = ne;
+
+    VpInternalRound(m,0,(m->Prec>0)?m->frac[m->Prec-1]:0,
+                      (U_LONG)(val*((double)((S_INT)BASE))));
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        printf("VpDtoV d=%30.30e\n", d);
+        VPrint(stdout, "  m=%\n", m);
+    }
+#endif /* _DEBUG */
+    return;
+}
+
+/*
+ *  m <- ival
+ */
+#if 0  /* unused */
+VP_EXPORT void
+VpItoV(Real *m, S_INT ival)
+{
+    U_LONG mm, ind_m;
+    U_LONG val, v1, v2, v;
+    int isign;
+    S_INT ne;
+
+    if(ival == 0) {
+        VpSetZero(m,1);
+        goto Exit;
+    }
+    isign = 1;
+    val = ival;
+    if(ival < 0) {
+        isign = -1;
+        val =(U_LONG)(-ival);
+    }
+    ne = 0;
+    ind_m = 0;
+    mm = m->MaxPrec;
+    while(ind_m < mm) {
+        m->frac[ind_m] = 0;
+        ++ind_m;
+    }
+    ind_m = 0;
+    while(val > 0) {
+        if(val) {
+         v1 = val;
+         v2 = 1;
+            while(v1 >= BASE) {
+                v1 /= BASE;
+                v2 *= BASE;
+            }
+            val = val - v2 * v1;
+            v = v1;
+        } else {
+            v = 0;
+        }
+        m->frac[ind_m] = v;
+        ++ind_m;
+        ++ne;
+    }
+    m->Prec = ind_m - 1;
+    m->exponent = ne;
+    VpSetSign(m,isign);
+    VpNmlz(m);
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        printf(" VpItoV i=%d\n", ival);
+        VPrint(stdout, "  m=%\n", m);
+    }
+#endif /* _DEBUG */
+    return;
+}
+#endif
+
+/*
+ * y = SQRT(x),  y*y - x =>0
+ */
+VP_EXPORT int
+VpSqrt(Real *y, Real *x)
+{
+    Real *f = NULL;
+    Real *r = NULL;
+    S_LONG y_prec, f_prec;
+    S_LONG n;
+    S_LONG e;
+    S_LONG prec;
+    S_LONG nr;
+    double val;
+
+    /* Zero, NaN or Infinity ? */
+    if(!VpHasVal(x)) {
+        if(VpIsZero(x)||VpGetSign(x)>0) {
+            VpAsgn(y,x,1);
+            goto Exit;
+        }
+        VpSetNaN(y);
+        return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(NaN or negative value)",0);
+        goto Exit;
+    }
+
+     /* Negative ? */
+    if(VpGetSign(x) < 0) {
+        VpSetNaN(y);
+        return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(negative value)",0);
+    }
+
+    /* One ? */
+    if(VpIsOne(x)) {
+        VpSetOne(y);
+        goto Exit;
+    }
+
+    n = (S_LONG)y->MaxPrec;
+    if((S_LONG)x->MaxPrec > n) n = (S_LONG)x->MaxPrec;
+    /* allocate temporally variables  */
+    f = VpAlloc(y->MaxPrec *(BASE_FIG + 2), "#1");
+    r = VpAlloc((n + n) *(BASE_FIG + 2), "#1");
+
+    nr = 0;
+    y_prec = (S_LONG)y->MaxPrec;
+    f_prec = (S_LONG)f->MaxPrec;
+
+    prec = x->exponent;
+    if(prec > 0)    ++prec;
+    else            --prec;
+    prec = prec - (S_LONG)y->MaxPrec;
+    VpVtoD(&val, &e, x);    /* val <- x  */
+    e /= ((S_LONG)BASE_FIG);
+    n = e / 2;
+    if(e - n * 2 != 0) {
+        val /=(double)((S_INT)BASE);
+        n =(e + 1) / 2;
+    }
+    VpDtoV(y, sqrt(val));    /* y <- sqrt(val) */
+    y->exponent += n;
+    n = (DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
+    y->MaxPrec = (U_LONG)Min(n , y_prec);
+    f->MaxPrec = y->MaxPrec + 1;
+    n = y_prec*((S_LONG)BASE_FIG);
+    if((U_LONG)nMaxPrec *= 2;
+        if(y->MaxPrec > (U_LONG)y_prec) y->MaxPrec = (U_LONG)y_prec;
+        f->MaxPrec = y->MaxPrec;
+        VpDivd(f, r, x, y);     /* f = x/y    */
+        VpAddSub(r, f, y, -1);  /* r = f - y  */
+        VpMult(f, VpPt5, r);    /* f = 0.5*r  */
+        if(VpIsZero(f))         goto converge;
+        VpAddSub(r, f, y, 1);   /* r = y + f  */
+        VpAsgn(y, r, 1);        /* y = r      */
+        if(f->exponent <= prec) goto converge;
+    } while(++nr < n);
+    /* */
+#ifdef _DEBUG
+    if(gfDebug) {
+        printf("ERROR(VpSqrt): did not converge within %ld iterations.\n",
+            nr);
+    }
+#endif /* _DEBUG */
+    y->MaxPrec = y_prec;
+
+converge:
+    VpChangeSign(y,(S_INT)1);
+#ifdef _DEBUG
+    if(gfDebug) {
+        VpMult(r, y, y);
+        VpAddSub(f, x, r, -1);
+        printf("VpSqrt: iterations = %lu\n", nr);
+        VPrint(stdout, "  y =% \n", y);
+        VPrint(stdout, "  x =% \n", x);
+        VPrint(stdout, "  x-y*y = % \n", f);
+    }
+#endif /* _DEBUG */
+    y->MaxPrec = y_prec;
+
+Exit:
+    VpFree(f);
+    VpFree(r);
+    return 1;
+}
+
+/*
+ *
+ * nf: digit position for operation.
+ *
+ */
+VP_EXPORT int
+VpMidRound(Real *y, int f, int nf)
+/*
+ * Round reletively from the decimal point.
+ *    f: rounding mode
+ *   nf: digit location to round from the the decimal point.
+ */
+{
+    /* fracf: any positive digit under rounding position? */
+    /* exptoadd: number of digits needed to compensate negative nf */
+    int n,i,ix,ioffset,fracf,exptoadd;
+    U_LONG v,shifter;
+    U_LONG div;
+
+    nf += y->exponent*((int)BASE_FIG);
+    exptoadd=0;
+    if (nf < 0) {
+		/* rounding position too left(large). */
+		if((f!=VP_ROUND_CEIL) && (f!=VP_ROUND_FLOOR)) {
+			VpSetZero(y,VpGetSign(y)); /* truncate everything */
+			return 0;
+		}
+        exptoadd = -nf;
+        nf = 0;
+    }
+
+    /* ix: x->fraq[ix] contains round position */
+    ix = nf/(int)BASE_FIG;
+    if(((U_LONG)ix)>=y->Prec) return 0;  /* rounding position too right(small). */
+    ioffset = nf - ix*((int)BASE_FIG);
+
+    v = y->frac[ix];
+
+    /* drop digits after pointed digit */
+    n = BASE_FIG - ioffset - 1;
+    for(shifter=1,i=0;i 0);
+    v /= shifter;
+    div = v/10;
+    v = v - div*10;
+    if (fracf == 0) {
+        for(i=ix+1;iPrec;i++) {
+            if (y->frac[i]%BASE) {
+                fracf = 1;
+                break;
+            }
+        }
+    }
+    memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(U_LONG));
+    switch(f) {
+    case VP_ROUND_DOWN: /* Truncate */
+         break;
+    case VP_ROUND_UP:   /* Roundup */
+        if(fracf) ++div;
+         break;
+    case VP_ROUND_HALF_UP:   /* Round half up  */
+        if(v>=5) ++div;
+        break;
+    case VP_ROUND_HALF_DOWN: /* Round half down  */
+        if(v>=6) ++div;
+        break;
+    case VP_ROUND_CEIL: /* ceil */
+        if(fracf && (VpGetSign(y)>0)) ++div;
+        break;
+    case VP_ROUND_FLOOR: /* floor */
+        if(fracf && (VpGetSign(y)<0)) ++div;
+        break;
+    case VP_ROUND_HALF_EVEN: /* Banker's rounding */
+        if(v>5) ++div;
+        else if(v==5) {
+            if((U_LONG)i==(BASE_FIG-1)) {
+                if(ix && (y->frac[ix-1]%2)) ++div;
+            } else {
+                if(div%2) ++div;
+            }
+        }
+        break;
+    }
+    for(i=0;i<=n;++i) div *= 10;
+    if(div>=BASE) {
+        if(ix) {
+            y->frac[ix] = 0;
+            VpRdup(y,ix);
+        } else {
+            S_INT s = VpGetSign(y);
+            int e = y->exponent;
+            VpSetOne(y);
+            VpSetSign(y,s);
+            y->exponent = e+1;
+        }
+    } else {
+        y->frac[ix] = div;
+        VpNmlz(y);
+    }
+    if (exptoadd > 0) {
+        y->exponent += exptoadd/BASE_FIG;
+        exptoadd %= BASE_FIG;
+        for(i=0;ifrac[0] *= 10;
+            if (y->frac[0] >= BASE) {
+                y->frac[0] /= BASE;
+                y->exponent++;
+            }
+        }
+    }
+    return 1;
+}
+
+VP_EXPORT int
+VpLeftRound(Real *y, int f, int nf)
+/*
+ * Round from the left hand side of the digits.
+ */
+{
+    U_LONG v;
+    if(!VpHasVal(y)) return 0; /* Unable to round */
+    v = y->frac[0];
+    nf -= VpExponent(y)*BASE_FIG;
+    while((v /= 10) != 0) nf--;
+    nf += (BASE_FIG-1);
+    return VpMidRound(y,f,nf);
+}
+
+VP_EXPORT int 
+VpActiveRound(Real *y, Real *x, int f, int nf)
+{
+    /* First,assign whole value in truncation mode */
+    if(VpAsgn(y, x, 10)<=1) return 0; /* Zero,NaN,or Infinity */
+    return VpMidRound(y,f,nf);
+}
+
+static int
+VpLimitRound(Real *c,U_LONG ixDigit)
+{
+    U_LONG ix = VpGetPrecLimit();
+    if(!VpNmlz(c))    return -1;
+    if(!ix)           return 0;
+    if(!ixDigit) ixDigit = c->Prec-1;
+    if((ix+BASE_FIG-1)/BASE_FIG > ixDigit+1) return 0;
+    return VpLeftRound(c,VpGetRoundMode(),ix);
+}
+
+static void 
+VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v)
+{
+    int f = 0;
+
+    if(VpLimitRound(c,ixDigit)) return;
+    if(!v)                      return;
+
+    v /= BASE1;
+    switch(gfRoundMode) {
+    case VP_ROUND_DOWN:
+        break;
+    case VP_ROUND_UP:
+        if(v)                    f = 1;
+        break;
+    case VP_ROUND_HALF_UP:
+        if(v >= 5)               f = 1;
+        break;
+    case VP_ROUND_HALF_DOWN:
+        if(v >= 6)               f = 1;
+        break;
+    case VP_ROUND_CEIL:  /* ceil */
+        if(v && (VpGetSign(c)>0)) f = 1;
+        break;
+    case VP_ROUND_FLOOR: /* floor */
+        if(v && (VpGetSign(c)<0)) f = 1;
+        break;
+    case VP_ROUND_HALF_EVEN:  /* Banker's rounding */
+        if(v>5) f = 1;
+        else if(v==5 && vPrev%2)  f = 1;
+        break;
+    }
+    if(f) {
+        VpRdup(c,ixDigit);    /* round up */
+        VpNmlz(c);
+    }
+}
+
+/*
+ *  Rounds up m(plus one to final digit of m).
+ */
+static int
+VpRdup(Real *m,U_LONG ind_m)
+{
+    U_LONG carry;
+
+    if(!ind_m) ind_m = m->Prec;
+
+    carry = 1;
+    while(carry > 0 && (ind_m--)) {
+        m->frac[ind_m] += carry;
+        if(m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE;
+        else                       carry = 0;
+    }
+    if(carry > 0) {        /* Overflow,count exponent and set fraction part be 1  */
+        if(!AddExponent(m,(S_LONG)1)) return 0;
+        m->Prec = m->frac[0] = 1;
+    } else {
+        VpNmlz(m);
+    }
+    return 1;
+}
+
+/*
+ *  y = x - fix(x)
+ */
+VP_EXPORT void
+VpFrac(Real *y, Real *x)
+{
+    U_LONG my, ind_y, ind_x;
+
+    if(!VpHasVal(x)) {
+        VpAsgn(y,x,1);
+        goto Exit;
+    }
+
+    if(x->exponent > 0 && (U_LONG)x->exponent >= x->Prec) {
+        VpSetZero(y,VpGetSign(x));
+        goto Exit;
+    } else if(x->exponent <= 0) {
+        VpAsgn(y, x, 1);
+        goto Exit;
+    }
+
+    y->Prec = x->Prec -(U_LONG) x->exponent;
+    y->Prec = Min(y->Prec, y->MaxPrec);
+    y->exponent = 0;
+    VpSetSign(y,VpGetSign(x));
+    ind_y = 0;
+    my = y->Prec;
+    ind_x = x->exponent;
+    while(ind_y < my) {
+        y->frac[ind_y] = x->frac[ind_x];
+        ++ind_y;
+        ++ind_x;
+    }
+    VpNmlz(y);
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpFrac y=%\n", y);
+        VPrint(stdout, "    x=%\n", x);
+    }
+#endif /* _DEBUG */
+    return;
+}
+
+/*
+ *   y = x ** n
+ */
+VP_EXPORT int
+VpPower(Real *y, Real *x, S_INT n)
+{
+    U_LONG s, ss;
+    S_LONG sign;
+    Real *w1 = NULL;
+    Real *w2 = NULL;
+
+    if(VpIsZero(x)) {
+        if(n==0) {
+           VpSetOne(y);
+           goto Exit;
+        }
+        sign = VpGetSign(x);
+        if(n<0) {
+           n = -n;
+           if(sign<0) sign = (n%2)?(-1):(1);
+           VpSetInf (y,sign);
+        } else {
+           if(sign<0) sign = (n%2)?(-1):(1);
+           VpSetZero(y,sign);
+        }
+        goto Exit;
+    }
+    if(VpIsNaN(x)) {
+        VpSetNaN(y);
+        goto Exit;
+    }
+    if(VpIsInf(x)) {
+        if(n==0) {
+            VpSetOne(y);
+            goto Exit;
+        }
+        if(n>0) {
+            VpSetInf(y, (n%2==0 || VpIsPosInf(x)) ? 1 : -1);
+            goto Exit;
+        }
+        VpSetZero(y, (n%2==0 || VpIsPosInf(x)) ? 1 : -1);
+        goto Exit;
+    }
+
+    if((x->exponent == 1) &&(x->Prec == 1) &&(x->frac[0] == 1)) {
+        /* abs(x) = 1 */
+        VpSetOne(y);
+        if(VpGetSign(x) > 0) goto Exit;
+        if((n % 2) == 0) goto Exit;
+        VpSetSign(y,-(S_INT)1);
+        goto Exit;
+    }
+
+    if(n > 0) sign = 1;
+    else if(n < 0) {
+        sign = -1;
+        n = -n;
+    } else {
+        VpSetOne(y);
+        goto Exit;
+    }
+
+    /* Allocate working variables  */
+
+    w1 = VpAlloc((y->MaxPrec + 2) * BASE_FIG, "#0");
+    w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0");
+    /* calculation start */
+
+    VpAsgn(y, x, 1);
+    --n;
+    while(n > 0) {
+        VpAsgn(w1, x, 1);
+        s = 1;
+loop1:  ss = s;
+        s += s;
+        if(s >(U_LONG) n) goto out_loop1;
+        VpMult(w2, w1, w1);
+        VpAsgn(w1, w2, 1);
+        goto loop1;
+out_loop1:
+        n -= ss;
+        VpMult(w2, y, w1);
+        VpAsgn(y, w2, 1);
+    }
+    if(sign < 0) {
+        VpDivd(w1, w2, VpConstOne, y);
+        VpAsgn(y, w1, 1);
+    }
+
+Exit:
+#ifdef _DEBUG
+    if(gfDebug) {
+        VPrint(stdout, "VpPower y=%\n", y);
+        VPrint(stdout, "VpPower x=%\n", x);
+        printf("  n=%d\n", n);
+    }
+#endif /* _DEBUG */
+    VpFree(w2);
+    VpFree(w1);
+    return 1;
+}
+
+#ifdef _DEBUG
+int
+VpVarCheck(Real * v)
+/*
+ * Checks the validity of the Real variable v.
+ * [Input]
+ *   v ... Real *, variable to be checked.
+ * [Returns]
+ *   0  ... correct v.
+ *   other ... error
+ */
+{
+    U_LONG i;
+
+    if(v->MaxPrec <= 0) {
+        printf("ERROR(VpVarCheck): Illegal Max. Precision(=%lu)\n",
+            v->MaxPrec);
+        return 1;
+    }
+    if((v->Prec <= 0) ||((v->Prec) >(v->MaxPrec))) {
+        printf("ERROR(VpVarCheck): Illegal Precision(=%lu)\n", v->Prec);
+        printf("       Max. Prec.=%lu\n", v->MaxPrec);
+        return 2;
+    }
+    for(i = 0; i < v->Prec; ++i) {
+        if((v->frac[i] >= BASE)) {
+            printf("ERROR(VpVarCheck): Illegal fraction\n");
+            printf("       Frac[%ld]=%lu\n", i, v->frac[i]);
+            printf("       Prec.   =%lu\n", v->Prec);
+            printf("       Exp. =%d\n", v->exponent);
+            printf("       BASE =%lu\n", BASE);
+            return 3;
+        }
+    }
+    return 0;
+}
+#endif /* _DEBUG */
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.def b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.def
new file mode 100644
index 0000000..8450e16
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.def
@@ -0,0 +1,2 @@
+EXPORTS
+Init_bigdecimal
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.h b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.h
new file mode 100644
index 0000000..a30a08e
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal.h
@@ -0,0 +1,220 @@
+/*
+ *
+ * Ruby BigDecimal(Variable decimal precision) extension library. 
+ *
+ * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp) 
+ *
+ * You may distribute under the terms of either the GNU General Public 
+ * License or the Artistic License, as specified in the README file 
+ * of this BigDecimal distribution. 
+ *
+ * NOTES:
+ *   2003-03-28 V1.0 checked in.
+ *
+ */
+
+#ifndef  ____BIG_DECIMAL__H____
+#define  ____BIG_DECIMAL__H____
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/*
+ *  NaN & Infinity
+ */
+#define SZ_NaN  "NaN"
+#define SZ_INF  "Infinity"
+#define SZ_PINF "+Infinity"
+#define SZ_NINF "-Infinity"
+
+/*
+ *   #define VP_EXPORT other than static to let VP_ routines 
+ *   be called from outside of this module.
+ */
+#define VP_EXPORT static 
+
+#define U_LONG unsigned long
+#define S_LONG long
+#define U_INT  unsigned int
+#define S_INT  int
+
+/* Exception codes */
+#define VP_EXCEPTION_ALL        ((unsigned short)0x00FF)
+#define VP_EXCEPTION_INFINITY   ((unsigned short)0x0001)
+#define VP_EXCEPTION_NaN        ((unsigned short)0x0002)
+#define VP_EXCEPTION_UNDERFLOW  ((unsigned short)0x0004)
+#define VP_EXCEPTION_OVERFLOW   ((unsigned short)0x0001) /* 0x0008) */
+#define VP_EXCEPTION_ZERODIVIDE ((unsigned short)0x0010)
+
+/* Following 2 exceptions cann't controlled by user */
+#define VP_EXCEPTION_OP         ((unsigned short)0x0020)
+#define VP_EXCEPTION_MEMORY     ((unsigned short)0x0040)
+
+/* Computation mode */
+#define VP_ROUND_MODE            ((unsigned short)0x0100)
+#define VP_ROUND_UP         1
+#define VP_ROUND_DOWN       2
+#define VP_ROUND_HALF_UP    3
+#define VP_ROUND_HALF_DOWN  4
+#define VP_ROUND_CEIL       5
+#define VP_ROUND_FLOOR      6
+#define VP_ROUND_HALF_EVEN  7
+
+#define VP_SIGN_NaN                0 /* NaN                      */
+#define VP_SIGN_POSITIVE_ZERO      1 /* Positive zero            */
+#define VP_SIGN_NEGATIVE_ZERO     -1 /* Negative zero            */
+#define VP_SIGN_POSITIVE_FINITE    2 /* Positive finite number   */
+#define VP_SIGN_NEGATIVE_FINITE   -2 /* Negative finite number   */
+#define VP_SIGN_POSITIVE_INFINITE  3 /* Positive infinite number */
+#define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */
+
+/*
+ * VP representation
+ *  r = 0.xxxxxxxxx *BASE**exponent
+ */
+typedef struct {
+    VALUE  obj;     /* Back pointer(VALUE) for Ruby object.     */
+    U_LONG MaxPrec; /* Maximum precision size                   */
+                    /* This is the actual size of pfrac[]       */
+                    /*(frac[0] to frac[MaxPrec] are available). */
+    U_LONG Prec;    /* Current precision size.                  */
+                    /* This indicates how much the.             */
+                    /* the array frac[] is actually used.       */
+    S_INT  exponent;/* Exponent part.                           */
+    short  sign;    /* Attributes of the value.                 */
+                    /*
+                     *        ==0 : NaN
+                     *          1 : Positive zero
+                     *         -1 : Negative zero
+                     *          2 : Positive number
+                     *         -2 : Negative number
+                     *          3 : Positive infinite number
+                     *         -3 : Negative infinite number
+                     */
+    short  flag;    /* Not used in vp_routines,space for user.  */
+    U_LONG frac[1]; /* Pointer to array of fraction part.       */
+} Real;
+
+/*  
+ *  ------------------
+ *   EXPORTables.
+ *  ------------------
+ */
+
+VP_EXPORT  Real *
+VpNewRbClass(U_LONG mx,char *str,VALUE klass);
+
+VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,const char *str);
+
+VP_EXPORT U_LONG VpBaseFig(void);
+VP_EXPORT U_LONG VpDblFig(void);
+VP_EXPORT U_LONG VpBaseVal(void);
+
+/* Zero,Inf,NaN (isinf(),isnan() used to check) */
+VP_EXPORT double VpGetDoubleNaN(void);
+VP_EXPORT double VpGetDoublePosInf(void);
+VP_EXPORT double VpGetDoubleNegInf(void);
+VP_EXPORT double VpGetDoubleNegZero(void);
+
+/* These 2 functions added at v1.1.7 */
+VP_EXPORT U_LONG VpGetPrecLimit(void);
+VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);
+
+/* Round mode */
+VP_EXPORT int           VpIsRoundMode(unsigned long n);
+VP_EXPORT unsigned long VpGetRoundMode(void);
+VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);
+
+VP_EXPORT int VpException(unsigned short f,const char *str,int always);
+#if 0  /* unused */
+VP_EXPORT int VpIsNegDoubleZero(double v);
+#endif
+VP_EXPORT U_LONG VpNumOfChars(Real *vp,const char *pszFmt);
+VP_EXPORT U_LONG VpInit(U_LONG BaseVal);
+VP_EXPORT void *VpMemAlloc(U_LONG mb);
+VP_EXPORT void VpFree(Real *pv);
+VP_EXPORT Real *VpAlloc(U_LONG mx, const char *szVal);
+VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);
+VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);
+VP_EXPORT int VpMult(Real *c,Real *a,Real *b);
+VP_EXPORT int VpDivd(Real *c,Real *r,Real *a,Real *b);
+VP_EXPORT int VpComp(Real *a,Real *b);
+VP_EXPORT S_LONG VpExponent10(Real *a);
+VP_EXPORT void VpSzMantissa(Real *a,char *psz);
+VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
+VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);
+VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);
+VP_EXPORT int VpCtoV(Real *a,const char *int_chr,U_LONG ni,const char *frac,U_LONG nf,const char *exp_chr,U_LONG ne);
+VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
+VP_EXPORT void VpDtoV(Real *m,double d);
+#if 0  /* unused */
+VP_EXPORT void VpItoV(Real *m,S_INT ival);
+#endif
+VP_EXPORT int VpSqrt(Real *y,Real *x);
+VP_EXPORT int VpActiveRound(Real *y,Real *x,int f,int il);
+VP_EXPORT int VpMidRound(Real *y, int f, int nf);
+VP_EXPORT int VpLeftRound(Real *y, int f, int nf);
+VP_EXPORT void VpFrac(Real *y,Real *x);
+VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);
+
+/* VP constants */
+VP_EXPORT Real *VpOne(void);
+
+/*  
+ *  ------------------
+ *  MACRO definitions.
+ *  ------------------
+ */
+#define Abs(a)     (((a)>= 0)?(a):(-(a)))
+#define Max(a, b)  (((a)>(b))?(a):(b))
+#define Min(a, b)  (((a)>(b))?(b):(a))
+
+#define VpMaxPrec(a)   ((a)->MaxPrec)
+#define VpPrec(a)      ((a)->Prec)
+#define VpGetFlag(a)   ((a)->flag)
+
+/* Sign */
+
+/* VpGetSign(a) returns 1,-1 if a>0,a<0 respectively */
+#define VpGetSign(a) (((a)->sign>0)?1:(-1))
+/* Change sign of a to a>0,a<0 if s = 1,-1 respectively */
+#define VpChangeSign(a,s) {if((s)>0) (a)->sign=(short)Abs((S_LONG)(a)->sign);else (a)->sign=-(short)Abs((S_LONG)(a)->sign);}
+/* Sets sign of a to a>0,a<0 if s = 1,-1 respectively */
+#define VpSetSign(a,s)    {if((s)>0) (a)->sign=(short)VP_SIGN_POSITIVE_FINITE;else (a)->sign=(short)VP_SIGN_NEGATIVE_FINITE;}
+
+/* 1 */
+#define VpSetOne(a)       {(a)->frac[0]=(a)->exponent=(a)->Prec=1;(a)->sign=VP_SIGN_POSITIVE_FINITE;}
+
+/* ZEROs */
+#define VpIsPosZero(a)  ((a)->sign==VP_SIGN_POSITIVE_ZERO)
+#define VpIsNegZero(a)  ((a)->sign==VP_SIGN_NEGATIVE_ZERO)
+#define VpIsZero(a)     (VpIsPosZero(a) || VpIsNegZero(a))
+#define VpSetPosZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_ZERO)
+#define VpSetNegZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_ZERO)
+#define VpSetZero(a,s)  ( ((s)>0)?VpSetPosZero(a):VpSetNegZero(a) )
+
+/* NaN */
+#define VpIsNaN(a)      ((a)->sign==VP_SIGN_NaN)
+#define VpSetNaN(a)     ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NaN)
+
+/* Infinity */
+#define VpIsPosInf(a)   ((a)->sign==VP_SIGN_POSITIVE_INFINITE)
+#define VpIsNegInf(a)   ((a)->sign==VP_SIGN_NEGATIVE_INFINITE)
+#define VpIsInf(a)      (VpIsPosInf(a) || VpIsNegInf(a))
+#define VpIsDef(a)      ( !(VpIsNaN(a)||VpIsInf(a)) )
+#define VpSetPosInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_INFINITE)
+#define VpSetNegInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_INFINITE)
+#define VpSetInf(a,s)   ( ((s)>0)?VpSetPosInf(a):VpSetNegInf(a) )
+#define VpHasVal(a)     (a->frac[0])
+#define VpIsOne(a)      ((a->Prec==1)&&(a->frac[0]==1)&&(a->exponent==1))
+#define VpExponent(a)   (a->exponent)
+#ifdef _DEBUG
+int VpVarCheck(Real * v);
+VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);
+#endif /* _DEBUG */
+
+#if defined(__cplusplus)
+}  /* extern "C" { */
+#endif
+#endif /* ____BIG_DECIMAL__H____ */
diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_en.html b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_en.html
new file mode 100644
index 0000000..c2b86fa
--- /dev/null
+++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_en.html
@@ -0,0 +1,796 @@
+
+
+
+
+
+
+BigDecimal:An extension library for Ruby
+
+
+

BigDecimal(Variable Precision Floating Library for Ruby)

+
+BigDecimal is an extension library for the Ruby interpreter. +Using BigDecimal class, you can obtain any number of significant digits in computation. +For the details about Ruby see:
+ +NOTE:
+ This software is provided "AS IS" and without any express or + implied warranties,including,without limitation,the implied + warranties of merchantibility and fitness for a particular + purpose. For the details,see COPYING and README included in this + distribution. +
+
+ +

Contents

+ +
+ + +

Introduction

+Ruby already has builtin (variable length integer number) class Bignum. Using Bignum class,you can obtain + any integer value in magnitude. But, variable length decimal number class is not yet built in. +This is why I made variable length floating class BigDecimal. +Feel free to send any comments or bug reports to me. +
shigeo@tinyforest.gr.jp +I will try(but can't promise) to fix bugs reported. +
+

Installation

+The Ruby latest version can be downloaded from Official Ruby page. +Once decompress the downloaded Ruby archive,follow the normal installation procedures according to the +documents included. + + +

Usage and methods

+Suppose you already know Ruby programming, +to create BigDecimal objects,the program would like:
+ +
+   require 'bigdecimal'
+   a=BigDecimal::new("0.123456789123456789")
+   b=BigDecimal("123456.78912345678",40)
+   c=a+b
+
+ +

List of methods

+In 32 bits integer system,every 4 digits(in decimal) are computed simultaneously. +This means the number of significant digits in BigDecimal is always a multiple of 4. +

+Some more methods are available in Ruby code (not C code). +Functions such as sin,cos ...,are in math.rb in bigdecimal directory. +To use them,require math.rb as: +

+require "bigdecimal/math.rb"
+
+For details,see the math.rb code and comments. +Other utility methods are in util.rb. +To use util.rb, require it as: +
+require "bigdecimal/util.rb"
+
+For details,see the util.rb code. + +

Class methods

+
    +
  • new
  • +"new" method creates a new BigDecimal object.
    +a=BigDecimal::new(s[,n]) or
    +a=BigDecimal(s[,n]) or
    +where:
    +s: Initial value string. Spaces will be ignored. Any unrecognizable character for +representing initial value terminates the string.
    +n: Maximum number of significant digits of a. n must be a Fixnum object. +If n is omitted or is equal to 0,then the maximum number of significant digits of a is determined from the length of s. +Actual number of digits handled in computations are usually gretaer than n.
    +n is useful when performing divisions like +
    +BigDecimal("1")    / BigDecimal("3")    # => 0.3333333333 33E0
    +BigDecimal("1",10) / BigDecimal("3",10) # => 0.3333333333 3333333333 33333333E0
    +
    +but the resulting digits obtained may differ in future version. +
    + +
  • mode
  • +f = BigDecimal.mode(s[,v])
    +mode method controls BigDecimal computation. If the second argument is not given or is nil,then the value +of current setting is returned. +Following usage are defined.
    +

    [EXCEPTION control]

    +Actions when computation results NaN or Infinity can be defined as follows. +

    +

    +f = BigDecimal::mode(BigDecimal::EXCEPTION_NaN,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_INFINITY,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_UNDERFLOW,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_OVERFLOW,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_ZERODIVIDE,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_ALL,flag)
    +
    +EXCEPTION_NaN controls the execution when computation results to NaN.
    +EXCEPTION_INFINITY controls the execution when computation results to Infinity(}Infinity).
    +EXCEPTION_UNDERFLOW controls the execution when computation underflows.
    +EXCEPTION_OVERFLOW controls the execution when computation overflows.
    +EXCEPTION_ZERODIVIDE controls the execution when zero-division occures.
    +EXCEPTION_ALL controls the execution for any exception defined occures.
    +If the flag is true,then the relating exception is thrown.
    +No exception is thrown when the flag is false(default) and computation +continues with the result:
    +
    +EXCEPTION_NaN results to NaN
    +EXCEPTION_INFINITY results to +Infinity or -Infinity
    +EXCEPTION_UNDERFLOW results to 0.
    +EXCEPTION_OVERFLOW results to +Infinity or -Infinity
    +EXCEPTION_ZERODIVIDE results to +Infinity or -Infinity
    +
    +EXCEPTION_INFINITY,EXCEPTION_OVERFLOW, and EXCEPTION_ZERODIVIDE are + currently the same.
    +The return value of mode method is the value set.
    +If nil is specified for the second argument,then current setting is returned.
    +Suppose the return value of the mode method is f,then + f & BigDecimal::EXCEPTION_NaN !=0 means EXCEPTION_NaN is set to on. +

    +[ROUND error control]

    +Rounding operation can be controlled as: +

    +f = BigDecimal::mode(BigDecimal::ROUND_MODE,flag) +
    +where flag must be one of: + + + + + + + + +
    ROUND_UPround away from zero.
    ROUND_DOWNround towards zero(truncate).
    ROUND_HALF_UPround up if the digit >= 5 otherwise truncated(default).
    ROUND_HALF_DOWNround up if the digit >= 6 otherwise truncated.
    ROUND_HALF_EVENround towards the even neighbor(Banker's rounding). +
    ROUND_CEILINGround towards positive infinity(ceil).
    ROUND_FLOORround towards negative infinity(floor).
    +New rounding mode is returned. If nil is specified for the second argument,then current setting is returned.
    +The digit location for rounding operation can not be specified by this mode method, +use truncate/round/ceil/floor/add/sub/mult/div mthods for each instance instead. +
    + +
  • limit[(n)]
  • +Limits the maximum digits that the newly created BigDecimal objects can hold never exceed n. +This means the rounding operation specified by BigDecimal.mode is +performed if necessary. +limit returns the value before set if n is nil or is not specified. +Zero,the default value,means no upper limit.
    +The limit has no more priority than instance methods such as truncate,round,ceil,floor,add,sub,mult,and div.
    +mf = BigDecimal::limit(n)
    +
    + +
  • double_fig
  • +double_fig is a class method which returns the number of digits +the Float class can have. +
    +  p BigDecimal::double_fig  # ==> 20 (depends on the CPU etc.)
    +
    +The equivalent C programs which calculates the value of +double_fig is: +
    + double v          = 1.0;
    + int    double_fig = 0;
    + while(v + 1.0 > 1.0) {
    +    ++double_fig;
    +    v /= 10;
    + }
    +
    +
    + +
  • BASE
  • +Base value used in the BigDecimal calculation. +On 32 bits integer system,the value of BASE is 10000.
    +b = BigDecimal::BASE
    +
    +
+ +

Instance methods

+
    +
  • +
  • +addition(c = a + b)
    +For the resulting number of significant digits of c,see
    Resulting number of significant digits. + +
    +
  • -
  • +subtraction (c = a - b) or negation (c = -a)
    +For the resulting number of significant digits of c,see Resulting number of significant digits. + +
    +
  • *
  • +multiplication(c = a * b)
    +For the resulting number of significant digits of c,see Resulting number of significant digits. + +
    +
  • /
  • +division(c = a / b)
    +For the resulting number of significant digits of c,see Resulting number of significant digits. +
    + +
  • add(b,n)
  • +c = a.add(b,n)
    +c = a.add(b,n) performs c = a + b.
    +If n is less than the actual significant digits of a + b, +then c is rounded properly according to the BigDecimal.limit.
    +If n is zero,then the result is the same as +'s. +
    +
  • sub(b,n)
  • +c = a.sub(b,n)
    +c = a.sub(b,n) performs c = a - b.
    +If n is less than the actual significant digits of a - b, +then c is rounded properly according to the BigDecimal.limit.
    +If n is zero,then the result is the same as -'s. + +
    +
  • mult(b,n)
  • +c = a.mult(b,n)
    +c = a.mult(b,n) performs c = a * b.
    +If n is less than the actual significant digits of a * b, +then c is rounded properly according to the BigDecimal.limit.
    +If n is zero,then the result is the same as *'s. + +
    +
  • div(b[,n])
  • +c = a.div(b,n)
    +c = a.div(b,n) performs c = a / b.
    +If n is less than the actual significant digits of a / b, +then c is rounded properly according to the BigDecimal.limit.
    +If n is zero,then the result is the same as /'s. +If n is not given,then the result will be an integer(BigDecimal) like Float#div. +
    + +
  • fix
  • +c = a.fix
    +returns integer part of a.
    + +
    +
  • frac
  • +c = a.frac
    +returns fraction part of a.
    + +
    +
  • floor[(n)]
  • +c = a.floor
    +returns the maximum integer value (in BigDecimal) which is less than or equal to a. +
    + c = BigDecimal("1.23456").floor  #  ==> 1
    + c = BigDecimal("-1.23456").floor #  ==> -2
    +
    + +As shown in the following example,an optional integer argument (n) specifying the position +of the target digit can be given.
    +If n> 0,then the (n+1)th digit counted from the decimal point in fraction part is processed(resulting number of fraction part digits is less than or equal to n).
    +If n<0,then the n-th digit counted from the decimal point in integer part is processed(at least n 0's are placed from the decimal point to left). +
    + c = BigDecimal("1.23456").floor(4)   #  ==> 1.2345
    + c = BigDecimal("15.23456").floor(-1) #  ==> 10.0
    +
    + +
    +
  • ceil[(n)]
  • +c = a.ceil
    +returns the minimum integer value (in BigDecimal) which is greater than or equal to a. +
    + c = BigDecimal("1.23456").ceil  #  ==> 2
    + c = BigDecimal("-1.23456").ceil #  ==> -1
    +
    + +As shown in the following example,an optional integer argument (n) specifying the position +of the target digit can be given.
    +If n>0,then the (n+1)th digit counted from the decimal point in fraction part is processed(resulting number of fraction part digits is less than or equal to n).
    +If n<0,then the n-th digit counted from the decimal point in integer part is processed(at least n 0's are placed from the decimal point to left). +
    + c = BigDecimal("1.23456").ceil(4)   # ==> 1.2346
    + c = BigDecimal("15.23456").ceil(-1) # ==> 20.0
    +
    + +
    +
  • round[(n[,b])]
  • +c = a.round
    +round a to the nearest 1(default)D
    +
    + c = BigDecimal("1.23456").round  #  ==> 1
    + c = BigDecimal("-1.23456").round #  ==> -1
    +
    +The rounding operation changes according to BigDecimal::mode(BigDecimal::ROUND_MODE,flag) if specified. + +As shown in the following example,an optional integer argument (n) specifying the position +of the target digit can be given.
    +If n>0,then the (n+1)th digit counted from the decimal point in fraction part is processed(resulting number of fraction part digits is less than or equal to n).
    +If n<0,then the n-th digit counted from the decimal point in integer part is processed(at least n 0's are placed from the decimal point to left). +
    +c = BigDecimal::new("1.23456").round(4)   #  ==> 1.2346
    +c = BigDecimal::new("15.23456").round(-1) #  ==> 20.0
    +
    + +Rounding operation can be specified by setting the second optional argument b with the valid ROUND_MODE.
    +
    +c = BigDecimal::new("1.23456").round(3,BigDecimal::ROUND_HALF_EVEN)   #  ==> 1.234
    +c = BigDecimal::new("1.23356").round(3,BigDecimal::ROUND_HALF_EVEN)   #  ==> 1.234
    +
    + +
    +
  • truncate[(n)]
  • +c = a.truncate
    +truncate a to the nearest 1D
    +As shown in the following example,an optional integer argument (n) specifying the position +of the target digit can be given.
    +If n>0,then the (n+1)th digit counted from the decimal point in fraction part is processed(resulting number of fraction part digits is less than or equal to n).
    +If n<0,then the n-th digit counted from the decimal point in integer part is processed(at least n 0's are placed from the decimal point to left). + +
    +c = BigDecimal::new("1.23456").truncate(4)   #  ==> 1.2345
    +c = BigDecimal::new("15.23456").truncate(-1) #  ==> 10.0
    +
    +
    +
  • abs
  • +c = a.abs
    +returns an absolute value of a.
    + +
    +
  • to_i
  • +changes a to an integer.
    +i = a.to_i
    +i becomes to Fixnum or Bignum. +If a is Infinity or NaN,then i becomes to nil. + +
    +
  • to_s[(n)]
  • +converts to string(default results look like "0.xxxxxEn"). +
    +BigDecimal("1.23456").to_s  #  ==> "0.123456E1"
    +
    +If n(>0) is given,then a space is inserted to each of two parts divided by the decimal point +after every n digits for readability. +
    +BigDecimal("0.1234567890123456789").to_s(10)   #  ==> "0.1234567890 123456789E0"
    +
    +n can be a string representing a positive integer number. +
    +BigDecimal("0.1234567890123456789").to_s("10") #  ==> "0.1234567890 123456789E0"
    +
    +If the first character is '+'(or ' '),then '+'(or ' ') will be set before value string +when the value is positive. +
    +BigDecimal("0.1234567890123456789").to_s(" 10") #  ==> " 0.1234567890 123456789E0"
    +BigDecimal("0.1234567890123456789").to_s("+10") #  ==> "+0.1234567890 123456789E0"
    +BigDecimal("-0.1234567890123456789").to_s("10") #  ==> "-0.1234567890 123456789E0"
    +
    + +At the end of the string,'E'(or 'e') or 'F'(or 'f') can be specified to change +number representation. +
    +BigDecimal("1234567890.123456789").to_s("E")  #  ==> "0.1234567890123456789E10"
    +BigDecimal("1234567890.123456789").to_s("F")  #  ==> "1234567890.123456789"
    +BigDecimal("1234567890.123456789").to_s("5E") #  ==> "0.12345 67890 12345 6789E10"
    +BigDecimal("1234567890.123456789").to_s("5F") #  ==> "12345 67890.12345 6789"
    +
    + +
    +
  • exponent
  • +returns an integer holding exponent value of a.
    +n = a.exponent
    +means a = 0.xxxxxxx*10**n. +
    + +
  • precs
  • +n,m = a.precs
    +prec returns number of significant digits (n) and maximum number of +significant digits (m) of a. +
    + +
  • to_f
  • +Creates a new Float object having (nearly) the same value. +Use split method if you want to convert by yourself. +
    + + +
  • sign
  • +n = a.sign
    +returns positive value if a > 0,negative value if a < 0, +otherwise zero if a == 0.
    +where the value of n means that a is:
    +n = BigDecimal::SIGN_NaN(0) : a is NaN
    +n = BigDecimal::SIGN_POSITIVE_ZERO(1) : a is +0
    +n = BigDecimal::SIGN_NEGATIVE_ZERO(-1) : a is -0
    +n = BigDecimal::SIGN_POSITIVE_FINITE(2) : a is positive
    +n = BigDecimal::SIGN_NEGATIVE_FINITE(-2) : a is negative
    +n = BigDecimal::SIGN_POSITIVE_INFINITE(3) : a is +Infinity
    +n = BigDecimal::SIGN_NEGATIVE_INFINITE(-3) : a is -Infinity
    +The value in () is the actual value,see (Internal structure.
    + +
    +
  • nan?
  • +a.nan? returns True when a is NaN. + +
    +
  • infinite?
  • +a.infinite? returns 1 when a is +‡,-1 when a is -‡, nil otherwise. + +
    +
  • finite?
  • +a.finite? returns true when a is neither ‡ nor NaN. +
    + +
  • zero?
  • +c = a.zero?
    +returns true if a is equal to 0,otherwise returns false
    +
    +
  • nonzero?
  • +c = a.nonzero?
    +returns nil if a is 0,otherwise returns a itself.
    +
    + +
  • split
  • +decomposes a BigDecimal value to 4 parts. +All 4 parts are returned as an array.
    +Parts consist of a sign(0 when the value is NaN,+1 for positive and + -1 for negative value), a string representing fraction part,base value(always 10 currently),and an integer(Fixnum) for exponent respectively. +a=BigDecimal::new("3.14159265")
    +f,x,y,z = a.split
    +where f=+1,x="314159265",y=10 and z=1
    +therefore,you can translate BigDecimal value to Float as:
    +s = "0."+x
    +b = f*(s.to_f)*(y**z)
    + +
    +
  • inspect
  • +is used for debugging output.
    +p a=BigDecimal::new("3.14",10)
    +should produce output like "#<0x112344:'0.314E1',4(12)%gt;". +where "0x112344" is the address, +'0.314E1' is the value,4 is the number of the significant digits, +and 12 is the maximum number of the significant digits +the object can hold. +
    + +
  • sqrt
  • +c = a.sqrt(n)
    +computes square root value of a with significant digit number n at least.
    +
    + +
  • **
  • +c = a ** n
    +returns the value of a powered by n. +n must be an integer.
    + +
    +
  • power
  • +The same as ** method.
    +c = a.power(n)
    +returns the value of a powered by n(c=a**n). +n must be an integer.
    +
    + +
  • divmod,quo,modulo,%,remainder
  • +See,corresponding methods in Float class. +
    + + +
  • <=>
  • +c = a <=> b
    +returns 0 if a==b,1 if a > b,and returns -1 if a < b.
    +
    +
+ +Following methods need no explanation.
+
    +
  • ==
  • +
  • ===
  • +same as ==,used in case statement. +
  • !=
  • +
  • <
  • +
  • <=
  • +
  • >
  • +
  • >=
  • +
+ +
+

About 'coerce'

+For the binary operation like A op B: +
+
1.Both A and B are BigDecimal objects
+
A op B is normally performed.
+
2.A is the BigDecimal object but B is other than BigDecimal object
+
Operation is performed,after B is translated to correcponding BigDecimal object(because BigDecimal supports coerce method).
+
3.A is not the BigDecimal object but B is BigDecimal object
+
If A has coerce mthod,then B will translate A to corresponding +BigDecimal object and the operation is performed,otherwise an error occures.
+
+ +String is not translated to BigDecimal in default. +Uncomment /* #define ENABLE_NUMERIC_STRING */ in bigdecimal.c, compile and install +again if you want to enable string to BigDecimal conversion. +Translation stops without error at the character representing non digit. +For instance,"10XX" is translated to 10,"XXXX" is translated to 0.
+String representing zero or infinity such as "Infinity","+Infinity","-Infinity",and "NaN" can also be translated to BigDecimal unless false is specified by mode method.
+ +BigDecimal class supports coerce method(for the details about coerce method,see Ruby documentations). This means the most binary operation can be performed if the BigDecimal object is at the left hand side of the operation.

+ + For example: +
+  a = BigDecimal.E(20)
+  c = a * "0.123456789123456789123456789" # A String is changed to BigDecimal object.
+
+is performed normally.
+ But,because String does not have coerce method,the following example can not be performed.
+ +
+  a = BigDecimal.E(20)
+  c = "0.123456789123456789123456789" * a # ERROR
+
+ +If you actually have any inconvenience about the error above. +You can define a new class derived from String class, +and define coerce method within the new class.
+ +
+ +

Infinity,Not a Number(NaN),Zero

+Infinite numbers and NaN can be represented by string writing "+Infinity"(or "Infinity"),"-Infinity",and "NaN" respectively in your program. +Infinite numbers can be obtained by 1.0/0.0(=Infinity) or -1.0/0.0(=-Infinity). +

+NaN(Not a number) can be obtained by undefined computation like 0.0/0.0 +or Infinity-Infinity. +Any computation including NaN results to NaN. +Comparisons with NaN never become true,including comparison with NaN itself. +

+Zero has two different variations as +0.0 and -0.0. +But,still, +0.0==-0.0 is true. +

+Computation results including Infinity,NaN,+0.0 or -0.0 become complicated. +Run following program and comfirm the results. +Send me any incorrect result if you find. + +
+ require "bigdecimal"
+ aa  = %w(1 -1 +0.0 -0.0 +Infinity -Infinity NaN)
+ ba  = %w(1 -1 +0.0 -0.0 +Infinity -Infinity NaN)
+ opa = %w(+ - * / <=> > >=  < == != <=)
+ for a in aa
+  for b in ba
+    for op in opa
+      x = BigDecimal::new(a)
+      y = BigDecimal::new(b)
+      eval("ans= x #{op} y;print a,' ',op,' ',b,' ==> ',ans.to_s,\"\n\"")
+    end
+  end
+ end
+
+
+ +
+

Internal structure

+BigDecimal number is defined by the structure Real in BigDecimal.h. +Digits representing a float number are kept in the array frac[] defined in the structure. +In the program,any floating number(BigDecimal number) is represented as:
+ = 0.xxxxxxxxx*BASE**n

+where 'x' is any digit representing mantissa(kept in the array frac[]), +BASE is base value(=10000 in 32 bit integer system), +and n is the exponent value.
+Larger BASE value enables smaller size of the array frac[],and increases computation speed. +The value of BASE is defined ind VpInit(). In 32 bit integer system,this value is +10000. In 64 bit integer system,the value becomes larger. +BigDecimal has not yet been compiled and tested on 64 bit integer system. +It will be very nice if anyone try to run BigDecimal on 64 bit system and + inform me the results. +When BASE is 10000,an element of the array frac[] can have vale of from 0 to 9999. +(up to 4 digits).
+The structure Real is defined in bigdecimal.h as:
+
+  typedef struct {
+     VALUE  obj;     /* Back pointer(VALUE) for Ruby object.         */
+     unsigned long MaxPrec; /* The size of the array frac[]          */
+     unsigned long Prec;    /* Current size of frac[] actually used. */
+     short    sign;         /* Attribute of the value.  */
+                            /*  ==0 : NaN               */
+                            /*    1 : +0                */
+                            /*   -1 : -0                */
+                            /*    2 : Positive number   */
+                            /*   -2 : Negative number   */
+                            /*    3 : +Infinity         */
+                            /*   -3 : -Infinity         */
+     unsigned short flag;   /* Control flag             */
+     int      exponent;     /* Exponent value(0.xxxx*BASE**exponent) */
+     unsigned long frac[1]; /* An araay holding mantissa(Variable)   */
+  } Real;
+
+The decimal value 1234.56784321 is represented as(BASE=10000):
+
+    0.1234 5678 4321*(10000)**1
+
+where frac[0]=1234,frac[1]=5678,frac[2]=4321, +Prec=3,sign=2,exponent=1. MaxPrec can be any value greater than or equal to +Prec. +
+ +
+

Binary or decimal number representation

+I adopted decimal number representation for BigDecimal implementation. +Of cource,binary number representation is common on the most computers. + +

Advantages using decimal representation

+The reason why I adopted decimal number representation for BigDecimal is:
+
+
Easy for debugging +
The floating number 1234.56784321 can be easily represented as:
+ frac[0]=1234,frac[1]=5678,frac[2]=4321,exponent=1,and sign=2. +
Exact representation +
Following program can add all numbers(in decimal) in a file + without any error(no round operation).
+ +
+   file = File::open(....,"r")
+   s = BigDecimal::new("0")
+   while line = file.gets
+      s = s + line
+   end
+
+ +If the internal representation is binary,translation from decimal to +binary is required and the translation error is inevitable. +For example, 0.1 can not exactly be represented in binary.
+0.1 => b1*2**(-1)+b1*2**(-2)+b3*2**(-3)+b4*2**(-4)....
+where b1=0,b2=0,b3=0,b4=1...
+bn(n=1,2,3,...) is infinite series of digit with value of 0 or 1, +and rounding operation is necessary but where we should round the series ? +Of cource,exact "0.1" is printed if the rouding operation is properly done, +
Significant digit we can have is automatically determined +
In binary representation,0.1 can not be represented in finite series of digit. + +But we only need one element(frac[0]=1) in decimal representation. +This means that we can always determine the size of the array frac[] in Real +structure. +
+ +

Disadvantage of decimal representation

+Because most computers have no internal decimal representaion. +Once you use BigDecimal,you need to keep using it without +considering computation cost if exact computation is required. + +

Which is the first input?

+Because most people uses decimal notatin for numeric data representation, +BigDecimal can handle numeric data without loss of translation error. +
+ +
+

Resulting number of significant digits

+For the fundamental arithmetics such as addition,subtraction, +multiplication,and division,I prepared 2 group of methods
+ +

1. +,-,*,/

+For the operation + - * /,you can not specify the resulting +number of significant digits.
+Resulting number of significant digits are defined as:
+1.1 For *,resulting number of significant digits is the sum of the +significant digits of both side of the operator. For / ,resulting number of significant digits is the sum of the +maximum significant digits of both side of the operator.
+1.2 For + and -,resulting number of significant digits is determined so that + no round operation is needed.
+For example, c has more than 100 siginificant digits if c is computed as:
+c = 0.1+0.1*10**(-100)
+
+As +,-,and * are always exact(no round operation is performed unless BigDecimal.limit is specified), +which means more momories are required to keep computation results. +But,the division such as c=1.0/3.0 will always be rounded.
+ +

2. add,sub,mult,div

+The length of the significant digits obtained from +,-,*,/ +is always defined by that of right and left side of the operator. +To specify the length of the significant digits by your self, +use methos add,sub,mult,div. +
+ BigDecimal("2").div(3,12) # 2.0/3.0 => 0.6666666666 67E0
+
+ + +

3. truncate,round,ceil,floor

+Using these methods,you can specify rounding location relatively from +decimal point. +
+ BigDecimal("6.66666666666666").round(12) # => 0.6666666666 667E1
+
+ + + +

4. Example

+Following example compute the ratio of the circumference of a circle to +its dirmeter(pi=3.14159265358979....) using J.Machin's formula. +

+
+#!/usr/local/bin/ruby
+
+require "bigdecimal"
+#
+# Calculates 3.1415.... (the number of times that a circle's diameter
+# will fit around the circle) using J. Machin's formula.
+#
+def big_pi(sig) # sig: Number of significant figures
+  exp    = -sig
+  pi     = BigDecimal::new("0")
+  two    = BigDecimal::new("2")
+  m25    = BigDecimal::new("-0.04")
+  m57121 = BigDecimal::new("-57121")
+
+  u = BigDecimal::new("1")
+  k = BigDecimal::new("1")
+  w = BigDecimal::new("1")
+  t = BigDecimal::new("-80")
+  while (u.nonzero? && u.exponent >= exp) 
+    t   = t*m25
+    u   = t.div(k,sig)
+    pi  = pi + u
+    k   = k+two
+  end
+
+  u = BigDecimal::new("1")
+  k = BigDecimal::new("1")
+  w = BigDecimal::new("1")
+  t = BigDecimal::new("956")
+  while (u.nonzero? && u.exponent >= exp )
+    t   = t.div(m57121,sig)
+    u   = t.div(k,sig)
+    pi  = pi + u
+    k   = k+two
+  end
+  pi
+end
+
+if $0 == __FILE__
+  if ARGV.size == 1
+    print "PI("+ARGV[0]+"):\n"
+    p big_pi(ARGV[0].to_i)
+  else
+    print "TRY: ruby pi.rb 1000 \n"
+  end
+end
+
+
+
+ + +
+Shigeo Kobayashi + +(E-Mail:<shigeo@tinyforest.gr.jp>) + + + + + + + diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_ja.html b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_ja.html new file mode 100644 index 0000000..37bbcbb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/bigdecimal_ja.html @@ -0,0 +1,799 @@ + + + + + + +BigDecimal:An extension library for Ruby + + +

BigDecimal(‰Â•Ï’·•‚“®­”“_‰‰ŽZ—pŠg’£ƒ‰ƒCƒuƒ‰ƒŠ)

+
+BigDecimal ‚̓IƒuƒWƒFƒNƒgŽwŒü‚Ì‹­—͂ȃXƒNƒŠƒvƒgŒ¾Œê‚Å‚ ‚é Ruby ‚ɉ•ϒ·•‚“®¬”“_ +ŒvŽZ‹@”\‚ð’ljÁ‚·‚邽‚ß‚ÌŠg’£ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚·B +Ruby ‚ɂ‚¢‚Ă̏ڂµ‚¢“à—e‚͈ȉº‚ÌURL‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B + +
+

–ÚŽŸ

+ + +
+ +

‚Í‚¶‚ß‚É

+Ruby ‚É‚Í Bignum ‚Æ‚¢‚¤ƒNƒ‰ƒX‚ª‚ ‚èA”•SŒ…‚̐®”‚Å‚àŒvŽZ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +‚½‚¾A”CˆÓŒ…‚Ì•‚“®­”“_‰‰ŽZ—pƒNƒ‰ƒX‚ª–³‚¢‚悤‚Å‚·B‚»‚±‚ŁA +”CˆÓŒ…‚Ì•‚“®­”“_‰‰ŽZ—pŠg’£ƒ‰ƒCƒuƒ‰ƒŠ BigDecimal ‚ðì¬‚µ‚Ü‚µ‚½B +•s‹ï‡‚⏕Œ¾E’ñˆÄ‚ª‚ ‚éê‡‚Ç‚µ‚Ç‚µA +
shigeo@tinyforest.gr.jp +‚Ü‚Å‚¨’m‚点‚­‚¾‚³‚¢B•s‹ï‡‚𒼂·‹C‚Í‘å‚¢‚É‚ ‚è‚Ü‚·B‚½‚¾AŽžŠÔ‚È‚Ç‚ÌŠÖŒW‚Å–ñ‘© +‚Í‚Å‚«‚Ü‚¹‚ñB‚Ü‚½AŒ‹‰Ê‚ɂ‚¢‚Ä‚à•ÛØ‚Å‚«‚é‚à‚Ì‚Å‚Í‚ ‚è‚Ü‚¹‚ñB +—\‚߁A‚²—¹³‚­‚¾‚³‚¢B +

+‚±‚̃vƒƒOƒ‰ƒ€‚́AŽ©—R‚É”z•zE‰ü•Ï‚µ‚č\‚¢‚Ü‚¹‚ñB‚½‚¾‚µA’˜ìŒ ‚Í•úŠü‚µ‚Ä‚¢‚Ü‚¹‚ñB +”z•zE‰ü•Ï“™‚ÌŒ —˜‚Í Ruby ‚Ì‚»‚ê‚ɏ€‚¶‚Ü‚·BÚ‚µ‚­‚Í README ‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢B + +
+

ƒCƒ“ƒXƒg[ƒ‹‚ɂ‚¢‚Ä

+BigDecimal ‚ðŠÜ‚Þ Ruby ‚̍ŐV”Å‚ÍRubyŒöŽ®ƒy[ƒW‚©‚çƒ_ƒEƒ“ƒ[ƒh‚Å‚«‚Ü‚·B +ƒ_ƒEƒ“ƒ[ƒh‚µ‚½ÅV”Å‚ð‰ð“€‚µ‚½‚çA’ʏí‚̃Cƒ“ƒXƒg[ƒ‹Žè‡‚ðŽÀs‚µ‚ĉº‚³‚¢B +Ruby ‚ª³‚µ‚­ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚ê‚΁A“¯Žž‚É BigDecimal ‚à—˜—p‚Å‚«‚é‚悤‚É‚È‚é‚Í‚¸‚Å‚·B +ƒ\[ƒXƒtƒ@ƒCƒ‹‚Í +bigdecimal.c,bigdecimal.h +‚Ì‚QŒÂ‚Ì‚Ý‚Å‚·B
+ +
+ +

Žg—p•û–@‚ƃƒ\ƒbƒh‚̈ꗗ

+uRuby‚ÍŠù‚ɏ‘‚¯‚év‚Æ‚¢‚¤‘O’ñ‚ŁA +
+require 'bigdecimal'
+a=BigDecimal::new("0.123456789123456789")
+b=BigDecimal("123456.78912345678",40)
+c=a+b
+
+
+‚Æ‚¢‚¤‚悤‚ÈŠ´‚¶‚ÅŽg—p‚µ‚Ü‚·B + +

ƒƒ\ƒbƒhˆê——

+ˆÈ‰º‚̃ƒ\ƒbƒh‚ª—˜—p‰Â”\‚Å‚·B +u—LŒøŒ…”v‚Æ‚Í BigDecimal ‚ª¸“x‚ð•ÛØ‚·‚錅”‚Å‚·B +‚Ò‚Á‚½‚è‚Å‚Í‚ ‚è‚Ü‚¹‚ñAŽáŠ±‚Ì—]—T‚ðŽ‚Á‚ÄŒvŽZ‚³‚ê‚Ü‚·B +‚Ü‚½A—Ⴆ‚΂R‚Qƒrƒbƒg‚̃VƒXƒeƒ€‚Å‚Í‚P‚Oi‚Å‚SŒ…–ˆ‚ÉŒvŽZ‚µ‚Ü‚·B]‚Á‚āAŒ»ó‚ł́A +“à•”‚́u—LŒøŒ…”v‚Í‚S‚Ì”{”‚Æ‚È‚Á‚Ä‚¢‚Ü‚·B +

+ˆÈ‰º‚̃ƒ\ƒbƒhˆÈŠO‚É‚àA(C ‚Å‚Í‚È‚¢) Ruby ƒ\[ƒX‚ÌŒ`‚Å +’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚΁A +

+require "bigdecimal/math.rb"
+
+‚Æ‚·‚邱‚ƂŁAsin ‚â cos ‚Æ‚¢‚Á‚½ŠÖ”‚ªŽg—p‚Å‚«‚é‚悤‚É‚È‚è‚Ü‚·B +Žg—p•û–@‚ȂǁAÚ×‚Í math.rb ‚Ì“à—e‚ðŽQÆ‚µ‚ĉº‚³‚¢B + +‚»‚Ì‘¼AFloat ‚Æ‚Ì‘ŠŒÝ•ÏŠ·‚Ȃǂ̃ƒ\ƒbƒh‚ª util.rb ‚ŃTƒ|[ƒg‚³‚ê‚Ä‚¢‚Ü‚·B +—˜—p‚·‚é‚É‚Í +
+require "bigdecimal/util.rb"
+
+‚̂悤‚É‚µ‚Ü‚·BÚ×‚Í util.rb ‚Ì“à—e‚ðŽQÆ‚µ‚ĉº‚³‚¢B + +

ƒNƒ‰ƒXƒƒ\ƒbƒh

+
    +
  • new
  • +V‚µ‚¢ BigDecimal ƒIƒuƒWƒFƒNƒg‚𐶐¬‚µ‚Ü‚·B
    +a=BigDecimal::new(s[,n]) ‚Ü‚½‚Í
    +a=BigDecimal(s[,n])
    +s ‚͐”Žš‚ð•\Œ»‚·‚鏉Šú’l‚𕶎š—ñ‚ÅŽw’肵‚Ü‚·B +ƒXƒy[ƒX‚Í–³Ž‹‚³‚ê‚Ü‚·B‚Ü‚½A”»’f‚Å‚«‚È‚¢•¶Žš‚ªoŒ»‚µ‚½Žž“_‚Å +•¶Žš—ñ‚͏I—¹‚µ‚½‚à‚Ì‚Æ‚Ý‚È‚³‚ê‚Ü‚·B +n ‚Í•K—v‚È—LŒøŒ…”ia ‚̍őå—LŒøŒ…”j‚𐮐”‚ÅŽw’肵‚Ü‚·B +n ‚ª 0 ‚Ü‚½‚͏ȗª‚³‚ꂽ‚Æ‚«‚́An ‚Ì’l‚Í s ‚Ì—LŒøŒ…”‚Æ‚Ý‚È‚³‚ê‚Ü‚·B +s ‚Ì—LŒøŒ…”‚æ‚è n ‚ª¬‚³‚¢‚Æ‚«‚à n=0 ‚Ì‚Æ‚«‚Æ“¯‚¶‚Å‚·B +a ‚̍őå—LŒøŒ…”‚Í n ‚æ‚èŽáŠ±‘å‚¢’l‚ªÌ—p‚³‚ê‚Ü‚·B +Å‘å—LŒøŒ…”‚͈ȉº‚̂悤‚ÈŠ„‚èŽZ‚ðŽÀs‚·‚é‚Æ‚«“™‚ɈӖ¡‚ðŽ‚¿‚Ü‚·B +
    +BigDecimal("1")    / BigDecimal("3")    # => 0.3333333333 33E0
    +BigDecimal("1",10) / BigDecimal("3",10) # => 0.3333333333 3333333333 33333333E0
    +
    +‚½‚¾‚µAŒÂX‚̉‰ŽZ‚É‚¨‚¯‚éÅ‘å—LŒøŒ…” n ‚ÌŽæ‚舵‚¢‚͏«—ˆ‚̃o[ƒWƒ‡ƒ“‚Å +ŽáŠ±•ÏX‚³‚ê‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B +
    + +
  • mode
  • +f = BigDecimal.mode(s[,v])
    +BigDecimal‚ÌŽÀsŒ‹‰Ê‚𐧌䂵‚Ü‚·B‘æ‚Qˆø”‚ðÈ—ªA‚Ü‚½‚Í nil ‚ðŽw’è‚·‚é‚Æ +Œ»ó‚̐ݒè’l‚ª–ß‚è‚Ü‚·B
    +ˆÈ‰º‚ÌŽg—p•û–@‚ª’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B +

    +[—áŠOˆ—]

    +ŒvŽZŒ‹‰Ê‚ª”ñ”(NaN)‚âƒ[ƒ‚É‚æ‚鏜ŽZ‚É‚È‚Á‚½‚Æ‚«‚̏ˆ—‚ð’è‹`‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +

    +f = BigDecimal::mode(BigDecimal::EXCEPTION_NaN,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_INFINITY,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_UNDERFLOW,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_OVERFLOW,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_ZERODIVIDE,flag)
    +f = BigDecimal::mode(BigDecimal::EXCEPTION_ALL,flag)
    +
    + +EXCEPTION_NaN ‚ÍŒ‹‰Ê‚ª NaN ‚É‚È‚Á‚½‚Æ‚«‚ÌŽw’è‚Å‚·B
    +EXCEPTION_INFINITY ‚ÍŒ‹‰Ê‚ª–³ŒÀ‘å(}Infinity)‚É‚È‚Á‚½‚Æ‚«‚ÌŽw’è‚Å‚·B
    +EXCEPTION_UNDERFLOW ‚ÍŽw”•”‚ªƒAƒ“ƒ_[ƒtƒ[‚·‚é‚Æ‚«‚ÌŽw’è‚Å‚·B
    +EXCEPTION_OVERFLOW ‚ÍŽw”•”‚ªƒI[ƒo[ƒtƒ[‚·‚é‚Æ‚«‚ÌŽw’è‚Å‚·B
    +EXCEPTION_ZERODIVIDE ‚̓[ƒ‚É‚æ‚銄‚èŽZ‚ðŽÀs‚µ‚½‚Æ‚«‚ÌŽw’è‚Å‚·B
    +EXCEPTION_ALL ‚́A‰Â”\‚È‘S‚Ăɑ΂µ‚Ĉꊇ‚µ‚Đݒ肷‚é‚Æ‚«‚ÉŽg—p‚µ‚Ü‚·B

    + +flag ‚ª true ‚Ì‚Æ‚«‚́AŽw’肵‚½ó‘Ô‚É‚È‚Á‚½‚Æ‚«‚É—áŠO‚𔭍s‚·‚é‚悤‚É‚È‚è‚Ü‚·B
    +flag ‚ª falseiƒfƒtƒHƒ‹ƒgj‚È‚çA—áŠO‚Í”­s‚³‚ê‚Ü‚¹‚ñBŒvŽZŒ‹‰Ê‚͈ȉº‚̂悤‚É‚È‚è‚Ü‚·B
    +
    +EXCEPTION_NaN ‚Ì‚Æ‚«A”ñ”(NaN)
    +EXCEPTION_INFINITY ‚Ì‚Æ‚«A–³ŒÀ(+ or -Infinity)
    +EXCEPTION_UNDERFLOW ‚Ì‚Æ‚«Aƒ[ƒ
    +EXCEPTION_OVERFLOW ‚Ì‚Æ‚«A+Infinity ‚© -Infinity
    +EXCEPTION_ZERODIVIDE ‚Ì‚Æ‚«A+Infinity ‚© -Infinity
    +
    +EXCEPTION_INFINITYAEXCEPTION_OVERFLOWAEXCEPTION_ZERODIVIDE +‚͍¡‚Ì‚Æ‚±‚듯‚¶‚Å‚·B
    +–ß‚è’l‚́AÝ’èŒã‚Ì’l‚Å‚·Bu’lv‚̈Ӗ¡‚́A—Ⴆ‚Î +BigDecimal::EXCEPTION_NaN‚Ɓu’lv‚Ì & ‚ª ƒ[ƒˆÈŠO‚È‚ç‚Î +EXCEPTION_NaN‚ªÝ’肳‚ê‚Ä‚¢‚é‚Æ‚¢‚¤ˆÓ–¡‚Å‚·B + +

    +[ŠÛ‚ߏˆ—Žw’è]

    +ŒvŽZ“r’†‚ÌŠÛ‚ß‘€ì‚ÌŽw’肪‚Å‚«‚Ü‚·B +

    +f = BigDecimal::mode(BigDecimal::ROUND_MODE,flag) +
    +‚ÌŒ`Ž®‚ÅŽw’肵‚Ü‚·B
    +‚±‚±‚ŁAflag ‚͈ȉº(Š‡ŒÊ“à‚͑Ήž‚·‚éƒCƒ“ƒXƒ^ƒ“ƒXƒƒ\ƒbƒh)‚̈ê‚‚ðŽw’肵‚Ü‚·B + + + + + + + + + +
    ROUND_UP‘S‚Đ؂èã‚°‚Ü‚·B
    ROUND_DOWN‘S‚Đ؂èŽÌ‚Ä‚Ü‚·(truncate)B
    ROUND_HALF_UPŽlŽÌŒÜ“ü‚µ‚Ü‚·(ƒfƒtƒHƒ‹ƒg)B
    ROUND_HALF_DOWNŒÜŽÌ˜Z“ü‚µ‚Ü‚·B
    ROUND_HALF_EVENŽlŽÌ˜Z“ü‚µ‚Ü‚·B‚T‚ÌŽž‚͏ãˆÊ‚PŒ…‚ªŠï”‚ÌŽž‚Ì‚ÝŒJ‚èã‚°‚Ü‚·(Banker's rounding)B
    ROUND_CEILING”’l‚Ì‘å‚«‚¢•û‚ÉŒJ‚èã‚°‚Ü‚·(ceil)B
    ROUND_FLOOR”’l‚̏¬‚³‚¢•û‚ÉŒJ‚艺‚°‚Ü‚·(floor)B
    +–ß‚è’l‚ÍŽw’èŒã‚Ì flag ‚Ì’l‚Å‚·B +‘æ‚Qˆø”‚É nil ‚ðŽw’è‚·‚é‚ƁAŒ»ó‚̐ݒè’l‚ª•Ô‚è‚Ü‚·B +mode ƒƒ\ƒbƒh‚Å‚ÍŠÛ‚ß‘€ì‚̈ʒu‚ðƒ†[ƒU‚ªŽw’è‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB +ŠÛ‚ß‘€ì‚ƈʒu‚ðŽ©•ª‚Ő§Œä‚µ‚½‚¢ê‡‚Í BigDecimal::limit ‚â truncate/round/ceil/floorA +add/sub/mult/div ‚Æ‚¢‚Á‚½ƒCƒ“ƒXƒ^ƒ“ƒXƒƒ\ƒbƒh‚ðŽg—p‚µ‚ĉº‚³‚¢B +
    +
  • limit([n])
  • +¶¬‚³‚ê‚éBigDecimalƒIƒuƒWƒFƒNƒg‚̍ő包”‚ðnŒ…‚ɐ§ŒÀ‚µ‚Ü‚·B +–ß‚è’l‚͐ݒ肷‚é‘O‚Ì’l‚Å‚·BÝ’è’l‚̃fƒtƒHƒ‹ƒg’l‚Í‚O‚ŁAŒ…”–³§ŒÀ‚Æ‚¢‚¤ˆÓ–¡‚Å‚·B +n ‚ðŽw’肵‚È‚¢A‚Ü‚½‚Í n ‚ª nil ‚̏ꍇ‚́AŒ»ó‚̍ő包”‚ª•Ô‚è‚Ü‚·B
    +ŒvŽZ‚𑱍s‚·‚éŠÔ‚ɁA”Žš‚ÌŒ…”‚ª–³§ŒÀ‚É‘‚¦‚Ä‚µ‚Ü‚¤‚悤‚ȏꍇ + limit ‚Å—\‚ߌ…”‚𐧌À‚Å‚«‚Ü‚·B‚±‚̏ꍇ BigDecimal.mode ‚ÅŽw’肳‚ꂽ +ŠÛ‚ߏˆ—‚ªŽÀs‚³‚ê‚Ü‚·B +‚½‚¾‚µAƒCƒ“ƒXƒ^ƒ“ƒXƒƒ\ƒbƒh (truncate/round/ceil/floor/add/sub/mult/div) ‚Ì +Œ…”§ŒÀ‚Í limit ‚æ‚è—Dæ‚³‚ê‚Ü‚·B
    +mf = BigDecimal::limit(n)
    +
    + +
  • double_fig
  • +Ruby ‚Ì Float ƒNƒ‰ƒX‚ª•ÛŽ‚Å‚«‚é—LŒø”Žš‚̐”‚ð•Ô‚µ‚Ü‚·B +
    +  p BigDecimal::double_fig  # ==> 20 (depends on the CPU etc.)
    +
    +double_fig‚͈ȉº‚Ì C ƒvƒƒOƒ‰ƒ€‚ÌŒ‹‰Ê‚Æ“¯‚¶‚Å‚·B +
    + double v          = 1.0;
    + int    double_fig = 0;
    + while(v + 1.0 > 1.0) {
    +    ++double_fig;
    +    v /= 10;
    + }
    +
    +
    + +
  • BASE
  • +“à•”‚ÅŽg—p‚³‚ê‚éŠî”‚Ì’l‚Å‚·B®”‚ª 32 ƒrƒbƒg‚̏ˆ—Œn‚Å‚Í10000‚Å‚·B
    +b = BigDecimal::BASE
    +
    +
+ +

ƒCƒ“ƒXƒ^ƒ“ƒXƒƒ\ƒbƒh

+
    +
  • +
  • +‰ÁŽZic = a + bj
    +c ‚̐¸“x‚ɂ‚¢‚Ắu
    ŒvŽZ¸“x‚ɂ‚¢‚āv‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B +
    + +
  • -
  • +Œ¸ŽZic = a - bjA‚Ü‚½‚Í•„†”½“]ic = -aj
    +c ‚̐¸“x‚ɂ‚¢‚ẮuŒvŽZ¸“x‚ɂ‚¢‚āv‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B + +
    +
  • *
  • +æŽZ(c = a * b)
    +c‚̐¸“x‚Í(a‚̐¸“x)+(b‚̐¸“x)’ö“x‚Å‚·B
    +Ú‚µ‚­‚́uŒvŽZ¸“x‚ɂ‚¢‚āv‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B + +
    +
  • /
  • +œŽZ(c = a / b)
    +c ‚̐¸“x‚ɂ‚¢‚ẮuŒvŽZ¸“x‚ɂ‚¢‚āv‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B + +
    + +
  • add(b,n)
  • +ˆÈ‰º‚̂悤‚ÉŽg—p‚µ‚Ü‚·B
    +c = a.add(b,n)
    +c = a + b ‚ðÅ‘å‚Å n Œ…‚Ü‚ÅŒvŽZ‚µ‚Ü‚·B
    +a + b ‚̐¸“x‚ª n ‚æ‚è‘å‚«‚¢‚Æ‚«‚Í BigDecimal.mode ‚ÅŽw’肳‚ꂽ•û–@‚ÅŠÛ‚ß‚ç‚ê‚Ü‚·B
    +n ‚ªƒ[ƒ‚È‚ç + ‚Æ“¯‚¶‚Å‚·B +
    +
  • sub(b,n)
  • +ˆÈ‰º‚̂悤‚ÉŽg—p‚µ‚Ü‚·B
    +c = a.sub(b,n)
    +c = a - b ‚ðÅ‘å‚Å n Œ…‚Ü‚ÅŒvŽZ‚µ‚Ü‚·B
    +a - b ‚̐¸“x‚ª n ‚æ‚è‘å‚«‚¢‚Æ‚«‚Í BigDecimal.mode ‚ÅŽw’肳‚ꂽ•û–@‚ÅŠÛ‚ß‚ç‚ê‚Ü‚·B
    +n ‚ªƒ[ƒ‚È‚ç - ‚Æ“¯‚¶‚Å‚·B + +
    +
  • mult(b,n)
  • +ˆÈ‰º‚̂悤‚ÉŽg—p‚µ‚Ü‚·B
    +c = a.mult(b,n)
    +c = a * b ‚ðÅ‘å‚Å n Œ…‚Ü‚ÅŒvŽZ‚µ‚Ü‚·B
    +a * b ‚̐¸“x‚ª n ‚æ‚è‘å‚«‚¢‚Æ‚«‚Í BigDecimal.mode ‚ÅŽw’肳‚ꂽ•û–@‚ÅŠÛ‚ß‚ç‚ê‚Ü‚·B
    +n ‚ªƒ[ƒ‚È‚ç * ‚Æ“¯‚¶‚Å‚·B + +
    +
  • div(b[,n])
  • +ˆÈ‰º‚̂悤‚ÉŽg—p‚µ‚Ü‚·B
    +c = a.div(b,n)
    +c = a / b ‚ðÅ‘å‚Å n Œ…‚Ü‚ÅŒvŽZ‚µ‚Ü‚·B +a / b ‚̐¸“x‚ª n ‚æ‚è‘å‚«‚¢‚Æ‚«‚Í BigDecimal.mode ‚ÅŽw’肳‚ꂽ•û–@‚ÅŠÛ‚ß‚ç‚ê‚Ü‚·B
    +n ‚ªƒ[ƒ‚È‚ç / ‚Æ“¯‚¶‚Å‚·B
    +n ‚ªÈ—ª‚³‚ꂽ‚Æ‚«‚Í Float#div ‚Æ“¯—l‚ÉŒ‹‰Ê‚ª®”(BigDecimal)‚É‚È‚è‚Ü‚·B +
    + +
  • fix
  • +a ‚̏¬”“_ˆÈ‰º‚̐؂èŽÌ‚āB
    +c = a.fix +
    +
  • frac
  • +a ‚̐®”•”•ª‚̐؂èŽÌ‚āB
    +c = a.frac +
    + +
  • floor[(n)]
  • +c = a.floor
    +a ˆÈ‰º‚̍ő吮”iBigDecimal ’lj‚ð•Ô‚µ‚Ü‚·B +
    +c = BigDecimal("1.23456").floor  #  ==> 1
    +c = BigDecimal("-1.23456").floor #  ==> -2
    +
    +ˆÈ‰º‚̂悤‚Ɉø” n ‚ð—^‚¦‚邱‚Æ‚à‚Å‚«‚Ü‚·B
    +n>=0 ‚È‚çA¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚𑀍삵‚Ü‚·(­”“_ˆÈ‰º‚ðAÅ‘å n Œ…‚É‚µ‚Ü‚·)B
    +n ‚ª•‰‚Ì‚Æ‚«‚͏¬”“_ˆÈã n Œ…–ڂ𑀍삵‚Ü‚·(¬”“_ˆÊ’u‚©‚獶‚ɏ­‚È‚­‚Æ‚à n ŒÂ‚Ì 0 ‚ª•À‚Ñ‚Ü‚·)B
    +
    + c = BigDecimal("1.23456").floor(4)   #  ==> 1.2345
    + c = BigDecimal("15.23456").floor(-1) #  ==> 10.0
    +
    + +
    +
  • ceil[(n)]
  • +c = a.ceil
    +a ˆÈã‚̐®”‚Ì‚¤‚¿AÅ‚à¬‚³‚¢®”‚ðŒvŽZ‚µA‚»‚Ì’liBigDecimal ’lj‚ð•Ô‚µ‚Ü‚·B +
    +c = BigDecimal("1.23456").ceil  #  ==> 2
    +c = BigDecimal("-1.23456").ceil #  ==> -1
    +
    + +ˆÈ‰º‚̂悤‚Ɉø”‚ð—^‚¦‚āA¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚𑀍삷‚邱‚Æ‚à‚Å‚«‚Ü‚·B
    +n>=0 ‚È‚çA¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚𑀍삵‚Ü‚·(­”“_ˆÈ‰º‚ðAÅ‘å n Œ…‚É‚µ‚Ü‚·)B
    + n ‚ª•‰‚Ì‚Æ‚«‚͏¬”“_ˆÈã n Œ…–Ú‚ð‚𑀍삵‚Ü‚·(¬”“_ˆÊ’u‚©‚獶‚ɏ­‚È‚­‚Æ‚à n ŒÂ‚Ì 0 ‚ª•À‚Ñ‚Ü‚·)B
    +
    + c = BigDecimal("1.23456").ceil(4)   # ==> 1.2346
    + c = BigDecimal("15.23456").ceil(-1) # ==> 20.0
    +
    + +
    +
  • round[(n[,b])]
  • +c = a.round
    + +ƒNƒ‰ƒXƒƒ\ƒbƒh BigDecimal::mode(BigDecimal::ROUND_MODE,flag) ‚ÅŽw’肵‚½ +ROUND_MODE ‚ɏ]‚Á‚ÄŠÛ‚ß‘€ì‚ðŽÀs‚µ‚Ü‚·B +BigDecimal::mode(BigDecimal::ROUND_MODE,flag) ‚ʼn½‚àŽw’肹‚¸A‚©‚Aˆø” +‚ðŽw’肵‚È‚¢ê‡‚́u¬”“_ˆÈ‰º‘æˆêˆÊ‚̐”‚ðŽlŽÌŒÜ“ü‚µ‚Đ®”iBigDecimal ’ljv‚É‚µ‚Ü‚·B
    +
    + c = BigDecimal("1.23456").round  #  ==> 1
    + c = BigDecimal("-1.23456").round #  ==> -1
    +
    + +ˆÈ‰º‚̂悤‚Ɉø”‚ð—^‚¦‚āA¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚𑀍삷‚邱‚Æ‚à‚Å‚«‚Ü‚·B
    +n ‚ª³‚ÌŽž‚́A¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚ðŠÛ‚ß‚Ü‚·(­”“_ˆÈ‰º‚ðAÅ‘å n Œ…‚É‚µ‚Ü‚·)B
    +n ‚ª•‰‚Ì‚Æ‚«‚͏¬”“_ˆÈã n Œ…–Ú‚ðŠÛ‚ß‚Ü‚·(¬”“_ˆÊ’u‚©‚獶‚ɏ­‚È‚­‚Æ‚à n ŒÂ‚Ì 0 ‚ª•À‚Ñ‚Ü‚·)B +
    +c = BigDecimal("1.23456").round(4)   #  ==> 1.2346
    +c = BigDecimal("15.23456").round(-1) #  ==> 20.0
    +
    +‚Q”Ԗڂ̈ø”‚ðŽw’è‚·‚é‚ƁABigDecimal#mode ‚ÌŽw’è‚𖳎‹‚µ‚āAŽw’肳‚ꂽ•û–@‚Å +ŠÛ‚ß‘€ì‚ðŽÀs‚µ‚Ü‚·B +
    +c = BigDecimal("1.23456").round(3,BigDecimal::ROUND_HALF_EVEN)   #  ==> 1.234
    +c = BigDecimal("1.23356").round(3,BigDecimal::ROUND_HALF_EVEN)   #  ==> 1.234
    +
    + +
    +
  • truncate
  • +c = a.truncate
    +¬”“_ˆÈ‰º‚̐”‚ðØ‚èŽÌ‚ĂĐ®”iBigDecimal ’lj‚É‚µ‚Ü‚·B
    +ˆÈ‰º‚̂悤‚Ɉø”‚ð—^‚¦‚āA¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚𑀍삷‚邱‚Æ‚à‚Å‚«‚Ü‚·B
    +n ‚ª³‚ÌŽž‚́A¬”“_ˆÈ‰º n+1 ˆÊ‚̐”Žš‚ðØ‚èŽÌ‚Ä‚Ü‚·(­”“_ˆÈ‰º‚ðAÅ‘å n Œ…‚É‚µ‚Ü‚·)B +n ‚ª•‰‚Ì‚Æ‚«‚͏¬”“_ˆÈã n Œ…–Ú‚ð‚𑀍삵‚Ü‚·(¬”“_ˆÊ’u‚©‚獶‚ɏ­‚È‚­‚Æ‚à n ŒÂ‚Ì 0 ‚ª•À‚Ñ‚Ü‚·)B
    +
    +c = BigDecimal("1.23456").truncate(4)   #  ==> 1.2345
    +c = BigDecimal("15.23456").truncate(-1) #  ==> 10.0
    +
    +
    + + +
  • abs
  • +‚‚̐â‘Î’l
    +c = a.abs
    + +
    +
  • to_i
  • +­”“_ˆÈ‰º‚ðØ‚èŽÌ‚ĂĐ®”‚É•ÏŠ·‚µ‚Ü‚·B
    +i = a.to_i
    +i ‚Í’l‚ɉž‚¶‚Ä Fixnum ‚© Bignum ‚É‚È‚è‚Ü‚·B +a ‚ª Infinity ‚â NaN ‚Ì‚Æ‚«Ai ‚Í nil ‚É‚È‚è‚Ü‚·B +
    +
  • to_f
  • +Float ƒIƒuƒWƒFƒNƒg‚É•ÏŠ·‚µ‚Ü‚·B +‚æ‚è‚«‚ߍׂ©‚¢’l‚ª•K—v‚È‚ç‚Î split ƒƒ\ƒbƒh‚ð—˜—p‚µ‚Ä +‚­‚¾‚³‚¢B +
    +
  • to_s[(n)]
  • +•¶Žš—ñ‚É•ÏŠ·‚µ‚Ü‚·(ƒfƒtƒHƒ‹ƒg‚Í "0.xxxxxEn" ‚ÌŒ`‚É‚È‚è‚Ü‚·jB +
    +BigDecimal("1.23456").to_s  #  ==> "0.123456E1"
    +
    +ˆø” n ‚ɐ³‚̐®”‚ªŽw’肳‚ꂽ‚Æ‚«‚́A­”“_‚Å•ª‚¯‚ç‚ê‚鍶‰E•”•ª‚ðA‚»‚ꂼ‚ê n Œ…–ˆ +‚É‹ó”’‚Å‹æØ‚è‚Ü‚·B +
    +BigDecimal("0.1234567890123456789").to_s(10)   #  ==> "0.1234567890 123456789E0"
    +
    +ˆø” n ‚ɐ³‚̐®”‚ð•\‚·•¶Žš—ñ‚ðŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B +
    +BigDecimal("0.1234567890123456789").to_s("10") #  ==> "0.1234567890 123456789E0"
    +
    +•¶Žš—ñ‚̍ŏ‰‚É '+'i‚Ü‚½‚Í ' 'j‚ð•t‚¯‚é‚ƁA’l‚ª³‚̏ꍇAæ“ª‚É '+'i‚Ü‚½‚Í ' 'j‚ª•t‚«‚Ü‚· +i•‰‚̏ꍇ‚́Aí‚É '-' ‚ª•t‚«‚Ü‚·BjB +
    +BigDecimal("0.1234567890123456789").to_s(" 10") #  ==> " 0.1234567890 123456789E0"
    +BigDecimal("0.1234567890123456789").to_s("+10") #  ==> "+0.1234567890 123456789E0"
    +BigDecimal("-0.1234567890123456789").to_s("10") #  ==> "-0.1234567890 123456789E0"
    +
    + +‚³‚ç‚É•¶Žš—ñ‚̍Ōã‚É E(‚Ü‚½‚Í e) ‚© F(‚Ü‚½‚Í f) ‚ðŽw’è‚·‚邱‚ƂŁAˆÈ‰º‚̂悤‚É +•\Ž¦Œ`Ž®‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +
    +BigDecimal("1234567890.123456789").to_s("E")  #  ==> "0.1234567890123456789E10"
    +BigDecimal("1234567890.123456789").to_s("F")  #  ==> "1234567890.123456789"
    +BigDecimal("1234567890.123456789").to_s("5E") #  ==> "0.12345 67890 12345 6789E10"
    +BigDecimal("1234567890.123456789").to_s("5F") #  ==> "12345 67890.12345 6789"
    +
    + +
    +
  • exponent
  • +Žw”•”‚𐮐”’l‚Å•Ô‚µ‚Ü‚·B +n = a.exponent
    +‚Í a ‚Ì’l‚ª 0.xxxxxxx*10**n ‚ðˆÓ–¡‚µ‚Ü‚·B +
    + +
  • precs
  • +n,m = a.precs
    +a ‚Ì—LŒø”Žš (n) ‚ƍőå—LŒø”Žš (m) ‚Ì”z—ñ‚ð•Ô‚µ‚Ü‚·B + +
    + +
  • sign
  • +’l‚ª³(sign > 0)A•‰(sign < 0)A‚»‚Ì‘¼(sigh==0)‚Å‚ ‚é‚©‚̏î•ñ‚ð•Ô‚µ‚Ü‚·B +n = a.sign
    +‚Æ‚µ‚½‚Æ‚« n ‚Ì’l‚Í a ‚ªˆÈ‰º‚Ì‚Æ‚«‚ðˆÓ–¡‚µ‚Ü‚·B
    +() ‚Ì’†‚̐”Žš‚́AŽÀÛ‚Ì’l‚Å‚·(u“à•”\‘¢v‚ðŽQÆ)B
    +n = BigDecimal::SIGN_NaN(0) : a ‚Í NaN
    +n = BigDecimal::SIGN_POSITIVE_ZERO(1) : a ‚Í +0
    +n = BigDecimal::SIGN_NEGATIVE_ZERO(-1) : a ‚Í -0
    +n = BigDecimal::SIGN_POSITIVE_FINITE(2) : a ‚͐³‚Ì’l
    +n = BigDecimal::SIGN_NEGATIVE_FINITE(-2) : a ‚Í•‰‚Ì’l
    +n = BigDecimal::SIGN_POSITIVE_INFINITE(3) : a ‚Í+Infinity
    +n = BigDecimal::SIGN_NEGATIVE_INFINITE(-3) : a ‚Í-Infinity
    + +
    +
  • nan?
  • +a.nan? ‚Í a ‚ªNaN‚Ì‚Æ‚«^‚ð•Ô‚µ‚Ü‚·B +
    +
  • infinite?
  • +a.infinite? ‚Í a ‚ª+‡‚Ì‚Æ‚« 1 A-‡‚Ì‚Æ‚«‚Í -1A‚»‚êˆÈŠO‚Ì‚Æ‚«‚Í nil ‚ð•Ô‚µ‚Ü‚·B +
    +
  • finite?
  • +a.finite? ‚Í a ‚ª‡‚Ü‚½‚Í NaN ‚Å‚È‚¢‚Æ‚«^‚ð•Ô‚µ‚Ü‚·B +
    + +
  • zero?
  • +a ‚ª 0 ‚È‚ç true ‚É‚È‚è‚Ü‚·B
    +c = a.zero? +
    +
  • nonzero?
  • +a ‚ª 0 ‚È‚ç nilA0 ˆÈŠO‚È‚ç a ‚»‚Ì‚à‚Ì‚ª•Ô‚è‚Ü‚·B
    +c = a.nonzero? + +
    +
  • split
  • +BigDecimal ’l‚ð 0.xxxxxxx*10**n ‚Æ•\Œ»‚µ‚½‚Æ‚«‚ɁA•„†iNaN‚Ì‚Æ‚«‚Í +0A‚»‚êˆÈŠO‚Í+1‚©-1‚É‚È‚è‚Ü‚·jA +‰¼”•”•ª‚Ì•¶Žš—ñi"xxxxxxx"j‚ƁAŠî”i10jAX‚ÉŽw” n ‚ð”z—ñ‚Å +•Ô‚µ‚Ü‚·B
    +a=BigDecimal::new("3.14159265")
    +f,x,y,z = a.split
    +‚Æ‚·‚é‚ƁAf=+1Ax="314159265"Ay=10Az=1‚É‚È‚è‚Ü‚·B
    +]‚Á‚āA
    +s = "0."+x
    +b = f*(s.to_f)*(y**z)
    +‚Å Float ‚É•ÏŠ·‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +
    +
  • inspect
  • +ƒfƒoƒbƒOo—Í‚ÉŽg—p‚³‚ê‚Ü‚·B
    +p a=BigDecimal::new("3.14",10)
    +‚Æ‚·‚é‚ƁA[0x112344:'0.314E1',4(12)]‚̂悤‚ɏo—Í‚³‚ê‚Ü‚·B +Å‰‚Ì16i”‚̓IƒuƒWƒFƒNƒg‚̃AƒhƒŒƒXAŽŸ‚Ì '0.314E1' ‚Í’lA +ŽŸ‚Ì4‚ÍŒ»Ý‚Ì—LŒøŒ…”(•\Ž¦‚æ‚èŽáŠ±‘å‚«‚¢‚±‚Æ‚ª‚ ‚è‚Ü‚·)A +ÅŒã‚̓IƒuƒWƒFƒNƒg‚ªŽæ‚蓾‚éÅ‘包”‚É‚È‚è‚Ü‚·B +
    +
  • **
  • +a ‚Ì n æ‚ðŒvŽZ‚µ‚Ü‚·B‚Ž‚͐®”B
    +c = a ** n
    +Œ‹‰Ê‚Æ‚µ‚Ä c ‚Ì—LŒøŒ…‚Í a ‚Ì n ”{ˆÈã‚É‚È‚é‚Ì‚Å’ˆÓB +
    +
  • power
  • +** ‚Æ“¯‚¶‚ŁAa ‚Ì n æ‚ðŒvŽZ‚µ‚Ü‚·B‚Ž‚͐®”B
    +c = a.power(n)
    +Œ‹‰Ê‚Æ‚µ‚Ä c ‚Ì—LŒøŒ…‚Í a ‚Ì n ”{ˆÈã‚É‚È‚é‚Ì‚Å’ˆÓB +
    +
  • sqrt
  • +a‚Ì—LŒøŒ… n Œ…‚Ì•½•ûªin ‚Ì•½•ûª‚Å‚Í‚ ‚è‚Ü‚¹‚ñj‚ð +ƒjƒ…[ƒgƒ“–@‚ÅŒvŽZ‚µ‚Ü‚·B
    +c = a.sqrt(n)
    +
    + +
  • divmod,quo,modulo,%,remainder
  • +Ú×‚͑Ήž‚·‚é Float ‚ÌŠeƒƒ\ƒbƒh‚ðŽQÆ‚µ‚ĉº‚³‚¢B +
    + +
  • <=>
  • +a==b ‚È‚ç 0Aa > b ‚È‚ç 1Aa < b ‚È‚ç -1 ‚É‚È‚è‚Ü‚·B
    +c = a <=> b +
    +
+Œã‚́A“Ç‚ñ‚ÅŽš‚Ì”@‚­‚Å‚·B
+
    +
  • ==
  • +
  • ===
  • +u==v‚Æ“¯‚¶‚Å‚·‚ª case •¶‚ÅŽg—p‚³‚ê‚Ü‚·B +
  • !=
  • +
  • <
  • +
  • <=
  • +
  • >
  • +
  • >=
  • +
+ +

coerce‚ɂ‚¢‚Ä

+BigDecimal ƒIƒuƒWƒFƒNƒg‚ªŽZp‰‰ŽZŽq‚̍¶‚É‚ ‚é‚Æ‚«‚́ABigDecimal ƒIƒuƒWƒFƒNƒg‚ª +‰E‚É‚ ‚éƒIƒuƒWƒFƒNƒg‚ð(•K—v‚È‚ç) BigDecimal ‚É•ÏŠ·‚µ‚Ä‚©‚çŒvŽZ‚µ‚Ü‚·B +]‚Á‚āABigDecimal ƒIƒuƒWƒFƒNƒgˆÈŠO‚Å‚à”’l‚ðˆÓ–¡‚·‚é‚à‚Ì‚È‚ç‰E‚É’u‚¯‚Î +‰‰ŽZ‚͉”\‚Å‚·B
+‚½‚¾‚µA•¶Žš—ñ‚́i’ʏíj”’l‚ÉŽ©“®•ÏŠ·‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB +•¶Žš—ñ‚𐔒l‚ÉŽ©“®•ÏŠ·‚µ‚½‚¢ê‡‚Í bigfloat.c ‚Ì +u/* #define ENABLE_NUMERIC_STRING */v‚̃Rƒƒ“ƒg‚ðŠO‚µ‚Ä‚©‚çA +ÄƒRƒ“ƒpƒCƒ‹AÄƒCƒ“ƒXƒg[ƒ‹‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B +•¶Žš—ñ‚Ő”’l‚ð—^‚¦‚éê‡‚Í’ˆÓ‚ª•K—v‚Å‚·B”’l‚É•ÏŠ·‚Å‚«‚È‚¢•¶Žš‚ª‚ ‚é‚ƁA +’P‚É•ÏŠ·‚ðŽ~‚߂邾‚¯‚ŃGƒ‰[‚É‚Í‚È‚è‚Ü‚¹‚ñB"10XX"‚È‚ç‚P‚OA"XXXX"‚Í‚O +‚ƈµ‚í‚ê‚Ü‚·B
+
+   a = BigDecimal.E(20)
+   c = a * "0.123456789123456789123456789" # •¶Žš‚ð BigDecimal ‚É•ÏŠ·‚µ‚Ä‚©‚çŒvŽZ
+
+–³ŒÀ‘å‚â”ñ”‚ð•\‚·•¶Žš‚Æ‚µ‚āA"Infinity"A"+Infinity"A"-Infinity"A"NaN" +‚àŽg—p‚Å‚«‚Ü‚·(‘啶ŽšE¬•¶Žš‚ð‹æ•Ê‚µ‚Ü‚·)B‚½‚¾‚µAmode ƒƒ\ƒbƒh‚Å false ‚ð +Žw’肵‚½ê‡‚Í—áŠO‚ª”­¶‚µ‚Ü‚·B +
+‚Ü‚½ABigDecimalƒNƒ‰ƒX‚Í coerceiRuby–{ŽQÆj‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B +]‚Á‚āABigDecimal ƒIƒuƒWƒFƒNƒg‚ª‰E‚É‚ ‚éê‡‚à‘å’ï‚Í‘åä•v‚Å‚·B +‚½‚¾AŒ»Ý‚Ì Ruby ƒCƒ“ƒ^ƒvƒŠƒ^‚ÌŽd—lãA•¶Žš—ñ‚ª¶‚É‚ ‚é‚ÆŒvŽZ‚Å‚«‚Ü‚¹‚ñB
+
+  a = BigDecimal.E(20)
+  c = "0.123456789123456789123456789" * a # ƒGƒ‰[
+
+•K—v«‚ª‚ ‚é‚Æ‚ÍŽv‚¢‚Ü‚¹‚ñ‚ªA‚Ç‚¤‚µ‚Ä‚à‚ÆŒ¾‚¤l‚Í + String ƒIƒuƒWƒFƒNƒg‚ðŒp³‚µ‚½V‚½‚ȃNƒ‰ƒX‚ðì¬‚µ‚Ä‚©‚çA +‚»‚̃Nƒ‰ƒX‚Å coerce ‚ðƒTƒ|[ƒg‚µ‚Ä‚­‚¾‚³‚¢B + +
+ +

–³ŒÀA”ñ”Aƒ[ƒ‚̈µ‚¢

+u–³ŒÀv‚Æ‚Í•\Œ»‚Å‚«‚È‚¢‚­‚ç‚¢‘å‚«‚Ȑ”‚Å‚·B“Á•Ê‚Ɉµ‚¤‚½‚ß‚É + +Infinityi³‚Ì–³ŒÀ‘åj‚â -Infinityi•‰‚Ì–³ŒÀ‘åj‚Æ‚¢‚¤ +‚悤‚É•\‹L‚³‚ê‚Ü‚·B +–³ŒÀ‚Í 1.0/0.0 ‚̂悤‚Ƀ[ƒ‚ÅŠ„‚é‚悤‚ÈŒvŽZ‚ð‚µ‚½‚Æ‚«‚ɐ¶¬‚³‚ê‚Ü‚·B +

+u”ñ”v‚Í 0.0/0.0 ‚â Infinity-Infinity “™‚ÌŒ‹‰Ê‚ª’è‹`‚Å‚«‚È‚¢ +ŒvŽZ‚ð‚µ‚½‚Æ‚«‚ɐ¶¬‚³‚ê‚Ü‚·B”ñ”‚Í NaNiNot a Numberj‚Æ•\‹L‚³‚ê‚Ü‚·B +NaN ‚ðŠÜ‚ÞŒvŽZ‚Í‘S‚Ä NaN ‚É‚È‚è‚Ü‚·B‚Ü‚½ NaN ‚ÍŽ©•ª‚àŠÜ‚߂āA‚Ç‚ñ‚Ȑ” +‚Æ‚àˆê’v‚µ‚Ü‚¹‚ñB +

+ƒ[ƒ‚Í +0.0 ‚Æ -0.0 ‚ª‘¶Ý‚µ‚Ü‚·B‚½‚¾‚µA+0.0==-0.0 ‚Í true ‚Å‚·B +

+InfinityANaNA +0.0 ‚Æ -0.0 “™‚ðŠÜ‚ñ‚¾ŒvŽZŒ‹‰Ê‚Í‘g‚ݍ‡‚킹‚É +‚æ‚è•¡ŽG‚Å‚·B‹»–¡‚Ì‚ ‚él‚́AˆÈ‰º‚̃vƒƒOƒ‰ƒ€‚ðŽÀs‚µ‚ÄŒ‹‰Ê‚ð +Šm”F‚µ‚Ä‚­‚¾‚³‚¢iŒ‹‰Ê‚ɂ‚¢‚āA‹^–â‚âŠÔˆá‚¢‚ð”­Œ©‚³‚ꂽ•û‚Í +‚¨’m‚点Šè‚¢‚Ü‚·jB + +
+
+require "bigdecimal"
+
+aa  = %w(1 -1 +0.0 -0.0 +Infinity -Infinity NaN)
+ba  = %w(1 -1 +0.0 -0.0 +Infinity -Infinity NaN)
+opa = %w(+ - * / <=> > >=  < == != <=)
+
+for a in aa
+  for b in ba
+    for op in opa
+      x = BigDecimal::new(a)
+      y = BigDecimal::new(b)
+      eval("ans= x #{op} y;print a,' ',op,' ',b,' ==> ',ans.to_s,\"\n\"")
+    end
+  end
+end
+
+
+ +
+
+

“à•”\‘¢

+BigDecimal“à•”‚Å•‚“®¬”“_‚͍\‘¢‘Ì(Real)‚Å•\Œ»‚³‚ê‚Ü‚·B +‚»‚Ì‚¤‚¿‰¼”•”‚Í unsigned long ‚Ì”z—ñ(ˆÈ‰º‚̍\‘¢‘Ì—v‘ffrac)‚ÅŠÇ—‚³‚ê‚Ü‚·B +ŠT”O“I‚ɂ́AˆÈ‰º‚̂悤‚É‚È‚è‚Ü‚·B

+ <•‚“®¬”“_”> = 0.xxxxxxxxx*BASE**n

+‚±‚±‚ŁAx‚͉¼”•”‚ð•\‚·”ŽšABASE‚͊i‚P‚Oi‚È‚ç‚P‚OjAn‚ÍŽw”•”‚ð•\‚· +®”’l‚Å‚·BBASE‚ª‘å‚«‚¢‚قǁA‘å‚«‚Ȑ”’l‚ª•\Œ»‚Å‚«‚Ü‚·B‚‚܂èA”z—ñ‚̃TƒCƒY‚ð +­‚È‚­‚Å‚«‚Ü‚·BBASE‚Í‘å‚«‚¢‚Ù‚Ç“s‡‚ª‚æ‚¢‚킯‚Å‚·‚ªAƒfƒoƒbƒO‚Ì‚â‚è‚â‚·‚³‚È‚Ç‚ð +l—¶‚µ‚āA10000‚É‚È‚Á‚Ä‚¢‚Ü‚·iBASE‚ÍVpInit()ŠÖ”‚ÅŽ©“®“I‚ÉŒvŽZ‚µ‚Ü‚·jB +‚±‚ê‚́A32ƒrƒbƒg®”‚̏ꍇ‚Å‚·B64ƒrƒbƒg®”‚̏ꍇ‚Í‚à‚Á‚Æ‘å‚«‚È’l‚É‚È‚è‚Ü‚·B +Žc”O‚È‚ª‚çA64ƒrƒbƒg®”‚ł̃eƒXƒg‚Í‚Ü‚¾‚â‚Á‚Ä‚¢‚Ü‚¹‚ñi‚à‚µA‚â‚ç‚ꂽ•û‚ª‚¢‚ê‚Î +Œ‹‰Ê‚ð‹³‚¦‚Ä‚¢‚½‚¾‚¯‚ê‚΂ ‚肪‚½‚¢‚Å‚·jB +BASE‚ª10000‚Ì‚Æ‚«‚́AˆÈ‰º‚̉¼”•”‚Ì”z—ñ(frac)‚ÌŠe—v‘f‚ɂ͍őå‚Å‚SŒ…‚Ì +”Žš‚ªŠi”[‚³‚ê‚Ü‚·B

+•‚“®¬”“_\‘¢‘Ì(Real)‚͈ȉº‚̂悤‚É‚È‚Á‚Ä‚¢‚Ü‚·B +
+
+  typedef struct {
+     unsigned long MaxPrec; // Å‘吸“x(frac[]‚Ì”z—ñƒTƒCƒY)
+     unsigned long Prec;    // ¸“x(frac[]‚ÌŽg—pƒTƒCƒY)
+     short    sign;         // ˆÈ‰º‚̂悤‚É•„†“™‚̏ó‘Ô‚ð’è‹`‚µ‚Ü‚·B
+                            //  ==0 : NaN
+                            //    1 : +0
+                            //   -1 : -0
+                            //    2 : ³‚Ì’l
+                            //   -2 : •‰‚Ì’l
+                            //    3 : +Infinity
+                            //   -3 : -Infinity
+     unsigned short flag;   // ŠeŽí‚̐§Œäƒtƒ‰ƒbƒO
+     int      exponent;     // Žw”•”‚Ì’l(‰¼”•”*BASE**exponent)
+     unsigned long frac[1]; // ‰¼”•”‚Ì”z—ñ(‰Â•Ï)
+  } Real;
+
+—Ⴆ‚Î 1234.56784321 ‚Æ‚¢‚¤”Žš‚Í(BASE=10000‚È‚ç)
+
+    0.1234 5678 4321*(10000)**1
+
+‚Å‚·‚©‚ç frac[0]=1234Afrac[1]=5678Afrac[2]=4321A +Prec=3Asign=2Aexponent=1 ‚Æ‚È‚è‚Ü‚·BMaxPrec‚Í +Prec ‚æ‚è‘å‚«‚¯‚ê‚΂¢‚­‚Â‚Å‚à‚©‚Ü‚¢‚Ü‚¹‚ñBflag ‚Ì +Žg—p•û–@‚ÍŽÀ‘•‚Ɉˑ¶‚µ‚Ä“à•”‚ÅŽg—p‚³‚ê‚Ü‚·B + +
+
+

2i‚Æ10i

+BigDecimal ‚Í <•‚“®¬”“_”> = 0.xxxxxxxxx*10**n ‚Æ‚¢‚¤10iŒ`Ž®‚Ő”’l‚ð•ÛŽ‚µ‚Ü‚·B +‚µ‚©‚µAŒvŽZ‹@‚Ì•‚“®¬”“_”‚Ì“à•”•\Œ»‚́AŒ¾‚¤‚Ü‚Å‚à‚È‚­ <•‚“®¬”“_”> = 0.bbbbbbbb*2**n ‚Æ‚¢‚¤ +2iŒ`Ž®‚ª•’Ê‚Å‚·(x ‚Í 0 ‚©‚ç 9 ‚܂ŁAb ‚Í 0 ‚© 1 ‚̐”Žš)B +BigDecimal ‚ª‚È‚º10i‚Ì“à•”•\Œ»Œ`Ž®‚ðÌ—p‚µ‚½‚Ì‚©‚ðˆÈ‰º‚Éà–¾‚µ‚Ü‚·B +

10i‚̃ƒŠƒbƒg

+
+
ƒfƒoƒbƒO‚Ì‚µ‚â‚·‚³ +
‚Ü‚¸AƒvƒƒOƒ‰ƒ€ì¬‚ªŠy‚Å‚·Bfrac[0]=1234Afrac[1]=5678Afrac[2]=4321A +exponent=1Asign=2 ‚Ȃ琔’l‚ª 1234.56784321 ‚Å‚ ‚é‚Ì‚ÍŒ©‚ê‚Î’¼‚®‚É•ª‚©‚è‚Ü‚·B + +
10i•\‹L‚³‚ꂽ”’l‚È‚çŠmŽÀ‚É“à•”•\Œ»‚É•ÏŠ·‚Å‚«‚é +
—Ⴆ‚΁AˆÈ‰º‚̂悤‚ȃvƒƒOƒ‰ƒ€‚Í‘S‚­Œë·–³‚µ‚Å +ŒvŽZ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·BˆÈ‰º‚Ì—á‚́Aˆês‚Ɉê‚‚̐”’l +‚ª‘‚¢‚Ä‚ ‚éƒtƒ@ƒCƒ‹ file ‚̍‡Œv”’l‚ð‹‚ß‚é‚à‚Ì‚Å‚·B +
+   file = File::open(....,"r")
+   s = BigDecimal::new("0")
+   while line = file.gets
+      s = s + line
+   end
+
+‚±‚Ì—á‚ð2i”‚Å‚â‚é‚ƌ덷‚ª“ü‚荞‚މ”\«‚ª‚ ‚è‚Ü‚·B +—Ⴆ‚Î 0.1 ‚ð2i‚Å•\Œ»‚·‚é‚Æ 0.1 = b1*2**(-1)+b1*2**(-2)+b3*2**(-3)+b4*2**(-4).... +‚Æ–³ŒÀ‚É‘±‚¢‚Ä‚µ‚Ü‚¢‚Ü‚·(b1=0,b2=0,b3=0,b4=1...)B‚±‚±‚Å bn(n=1,2,3,...) ‚Í +2i‚ð•\Œ»‚·‚é 0 ‚© 1 ‚̐”Žš—ñ‚Å‚·B]‚Á‚āA‚Ç‚±‚©‚Å‘Å‚¿Ø‚é•K—v‚ª‚ ‚è‚Ü‚·B +‚±‚±‚Å•ÏŠ·Œë·‚ª“ü‚è‚Ü‚·B‚à‚¿‚ë‚ñA‚±‚ê‚ðÄ“x10i•\‹L‚É‚µ‚Ĉóü‚·‚é‚悤‚È +ê‡‚Í“KØ‚ÈŠÛ‚ß‘€ìiŽlŽÌŒÜ“üj‚É‚æ‚Á‚ÄÄ‚Ñ "0.1" ‚Æ•\Ž¦‚³‚ê‚Ü‚·B‚µ‚©‚µA +“à•”‚ł͐³Šm‚È 0.1 ‚Å‚Í‚ ‚è‚Ü‚¹‚ñB + +
—LŒøŒ…”‚Í—LŒÀ‚Å‚ ‚éi‚‚܂莩“®Œˆ’è‚Å‚«‚éj +
0.1 ‚ð•\Œ»‚·‚邽‚߂̗̈æ‚Í‚½‚Á‚½ˆê‚‚̔z—ñ—v‘fi frac[0]=1 j‚ōς݂܂·B +”z—ñ—v‘f‚̐”‚Í10i”’l‚©‚玩“®“I‚ÉŒˆ’è‚Å‚«‚Ü‚·B‚±‚ê‚́A‰Â•Ï’·•‚“®¬”“_‰‰ŽZ‚Å‚Í +‘厖‚È‚±‚Æ‚Å‚·B‹t‚É 0.1 ‚ð2i•\Œ»‚µ‚½‚Æ‚«‚É‚Í2i‚Ì—LŒøŒ…‚ð‚¢‚­‚‚ɂ·‚é‚Ì‚© 0.1 ‚ð +Œ©‚½‚¾‚¯‚Å‚ÍŒˆ’è‚Å‚«‚Ü‚¹‚ñB +
+ +

10i‚̃fƒƒŠƒbƒg

+ŽÀ‚͍¡‚܂ł̃ƒŠƒbƒg‚́A‚»‚̂܂܃fƒƒŠƒbƒg‚É‚à‚È‚è‚Ü‚·B +‚»‚à‚»‚àA10i‚ð2i‚É•ÏŠ·‚·‚é‚悤‚È‘€ì‚Í•ÏŠ·Œë· +‚𔺂¤ê‡‚ð‰ñ”ð‚·‚é‚±‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB +‘åŠT‚̃Rƒ“ƒsƒ…[ƒ^‚Í10i‚Ì“à•”•\Œ»‚ðŽ‚Á‚Ä‚¢‚È‚¢‚̂ŁA +BigDecimal ‚ð—˜—p‚µ‚Č덷–³‚µ‚ÌŒvŽZ‚ð‚·‚éê‡‚́AŒvŽZ‘¬“x +‚𖳎‹‚µ‚Ä‚àÅŒã‚Ü‚Å BigDecimal ‚ðŽg—p‘±‚¯‚é•K—v‚ª‚ ‚è‚Ü‚·B + +

Å‰‚͉½‚©H

+Ž©•ª‚ÅŒvŽZ‚·‚é‚Æ‚«‚É‚í‚´‚í‚´2i”‚ðŽg‚¤l‚Í‹É‚ß‚Ä‚Ü‚ê‚Å‚·B +ŒvŽZ‹@‚Ƀf[ƒ^‚ð“ü—Í‚·‚é‚Æ‚«‚à‚Ù‚Æ‚ñ‚ǂ̏ꍇA +10i”‚Å“ü—Í‚µ‚Ü‚·B‚»‚ÌŒ‹‰ÊAdouble “™‚ÌŒvŽZ‹@“à•” +•\Œ»‚͍ŏ‰‚©‚çŒë·‚ª“ü‚Á‚Ä‚¢‚éê‡‚ª‚ ‚è‚Ü‚·B +BigDecimal ‚̓†[ƒU“ü—Í‚ðŒë·–³‚µ‚ÅŽæ‚荞‚Þ‚±‚Æ‚ª‚Å‚«‚Ü‚·B +ƒfƒoƒbƒO‚ª‚µ‚â‚·‚¢‚̂ƁAƒf[ƒ^“Ç‚Ý‚±‚ÝŽž‚Ɍ덷‚ª“ü‚ç‚È‚¢ +‚Æ‚¢‚¤‚Ì‚ªŽÀÛ‚̃ƒŠƒbƒg‚Å‚·B + +
+
+

ŒvŽZ¸“x‚ɂ‚¢‚Ä

+c = a op b ‚Æ‚¢‚¤ŒvŽZ(op ‚Í + - * /)‚ð‚µ‚½‚Æ‚«‚Ì“®ì‚Í +ˆÈ‰º‚̂悤‚É‚È‚è‚Ü‚·B

+‚PDæŽZ‚Í(a ‚Ì—LŒøŒ…”)+(b ‚Ì—LŒøŒ…”)A +œŽZ‚Í(a ‚̍őå—LŒøŒ…”)+(b ‚̍őå—LŒøŒ…”)•ª‚̍ő包”iŽÀÛ‚́A—]—T‚ðŽ‚Á‚āA +‚à‚¤­‚µ‘å‚«‚­‚È‚è‚Ü‚·j‚ðŽ‚Â•Ï” c ‚ðV‚½‚ɐ¶¬‚µ‚Ü‚·B +‰ÁŒ¸ŽZ‚̏ꍇ‚́AŒë·‚ªo‚È‚¢‚¾‚¯‚̐¸“x‚ðŽ‚Â c ‚𐶐¬‚µ‚Ü‚·B—Ⴆ‚Î + c = 0.1+0.1*10**(-100) ‚̂悤‚ȏꍇAc ‚̐¸“x‚Í‚P‚O‚OŒ…ˆÈã‚̐¸“x‚ð +Ž‚‚悤‚É‚È‚è‚Ü‚·B +

+‚QDŽŸ‚É c = a op b ‚ÌŒvŽZ‚ðŽÀs‚µ‚Ü‚·B

+‚±‚̂悤‚ɁA‰ÁŒ¸ŽZ‚ƏæŽZ‚Å‚Ì c ‚Í•K‚¸uŒë·‚ªo‚È‚¢v‚¾‚¯‚̐¸“x‚ð +Ž‚Á‚ж¬‚³‚ê‚Ü‚·(BigDecimal.limit ‚ðŽw’肵‚È‚¢ê‡)B +œŽZ‚Í(a ‚̍őå—LŒøŒ…”)+(b ‚̍őå—LŒøŒ…”)•ª‚̍ő包” +‚ðŽ‚Â c ‚ª¶¬‚³‚ê‚Ü‚·‚ªAc = 1.0/3.0 ‚̂悤‚ÈŒvŽZ‚Å–¾‚ç‚©‚Ȃ悤‚ɁA + c ‚̍ő吸“x‚ð’´‚¦‚é‚Æ‚±‚ë‚ÅŒvŽZ‚ª‘Å‚¿Ø‚ç‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B

+‚¢‚¸‚ê‚É‚¹‚æAc ‚̍ő吸“x‚Í a ‚â b ‚æ‚è‘å‚«‚­‚È‚è‚Ü‚·‚Ì‚Å c ‚ª•K—v‚Æ‚·‚é +ƒƒ‚ƒŠ[—̈æ‚Í‘å‚«‚­‚Ȃ邱‚Æ‚É’ˆÓ‚µ‚ĉº‚³‚¢B +

+’ˆÓFu+,-,*,/v‚Å‚ÍŒ‹‰Ê‚̐¸“xi—LŒøŒ…”j‚ðŽ©•ª‚ÅŽw’è‚Å‚«‚Ü‚¹‚ñB +¸“x‚ðƒRƒ“ƒgƒ[ƒ‹‚µ‚½‚¢ê‡‚́AˆÈ‰º‚̃Cƒ“ƒXƒ^ƒ“ƒXƒƒ\ƒbƒh‚ðŽg—p‚µ‚Ü‚·B
+
    +
  • add,sub,mult,div
  • +‚±‚ê‚ç‚̃ƒ\ƒbƒh‚͐擪(Å¶)‚̐”Žš‚©‚ç‚ÌŒ…”‚ðŽw’è‚Å‚«‚Ü‚·B +
    + BigDecimal("2").div(3,12) # 2.0/3.0 => 0.6666666666 67E0
    +
    +
    +
  • truncate,round,ceil,floor
  • +‚±‚ê‚ç‚̃ƒ\ƒbƒh‚͏¬”“_‚©‚ç‚Ì‘Š‘Έʒu‚ðŽw’肵‚ÄŒ…”‚ðŒˆ’è‚µ‚Ü‚·B +
    + BigDecimal("6.66666666666666").round(12) # => 0.6666666666 667E1
    +
    +
    +
+

Ž©•ª‚Ő¸“x‚ðƒRƒ“ƒgƒ[ƒ‹‚µ‚½‚¢ê‡

+Ž©•ª‚Ő¸“x(—LŒøŒ…”)‚ðƒRƒ“ƒgƒ[ƒ‹‚µ‚½‚¢ê‡‚Í addAsubAmultAdiv “™‚̃ƒ\ƒbƒh +‚ªŽg—p‚Å‚«‚Ü‚·B +ˆÈ‰º‚̉~Žü—¦‚ðŒvŽZ‚·‚éƒvƒƒOƒ‰ƒ€—á‚̂悤‚ɁA +‹‚߂錅”‚ÍŽ©•ª‚ÅŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +

+
+#!/usr/local/bin/ruby
+
+require "bigdecimal"
+#
+# Calculates 3.1415.... (the number of times that a circle's diameter
+# will fit around the circle) using J. Machin's formula.
+#
+def big_pi(sig) # sig: Number of significant figures
+  exp    = -sig
+  pi     = BigDecimal::new("0")
+  two    = BigDecimal::new("2")
+  m25    = BigDecimal::new("-0.04")
+  m57121 = BigDecimal::new("-57121")
+
+  u = BigDecimal::new("1")
+  k = BigDecimal::new("1")
+  w = BigDecimal::new("1")
+  t = BigDecimal::new("-80")
+  while (u.nonzero? && u.exponent >= exp) 
+    t   = t*m25
+    u   = t.div(k,sig)
+    pi  = pi + u
+    k   = k+two
+  end
+
+  u = BigDecimal::new("1")
+  k = BigDecimal::new("1")
+  w = BigDecimal::new("1")
+  t = BigDecimal::new("956")
+  while (u.nonzero? && u.exponent >= exp )
+    t   = t.div(m57121,sig)
+    u   = t.div(k,sig)
+    pi  = pi + u
+    k   = k+two
+  end
+  pi
+end
+
+if $0 == __FILE__
+  if ARGV.size == 1
+    print "PI("+ARGV[0]+"):\n"
+    p big_pi(ARGV[0].to_i)
+  else
+    print "TRY: ruby pi.rb 1000 \n"
+  end
+end
+
+
+
+ + +
+¬—Ñ –ΗY + +(E-Mail:<shigeo@tinyforest.gr.jp>) + + + + + + + diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/depend b/lib/ruby-1.9.1-rc1/ext/bigdecimal/depend new file mode 100644 index 0000000..402cae9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/depend @@ -0,0 +1 @@ +bigdecimal.o: bigdecimal.c bigdecimal.h $(hdrdir)/ruby.h diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/extconf.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/extconf.rb new file mode 100644 index 0000000..0c8b98e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/extconf.rb @@ -0,0 +1,10 @@ +require 'mkmf' + +base_fig = 0 +src = "(BASE * (BASE+1)) / BASE == (BASE+1)" +while try_static_assert(src, nil, "-DBASE=10#{'0'*base_fig}UL") + base_fig += 1 +end +$defs << "-DBASE=1#{'0'*base_fig}UL" << "-DBASE_FIG=#{base_fig}" + +create_makefile('bigdecimal') diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/jacobian.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/jacobian.rb new file mode 100644 index 0000000..8c36ad1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/jacobian.rb @@ -0,0 +1,85 @@ +# +# require 'bigdecimal/jacobian' +# +# Provides methods to compute the Jacobian matrix of a set of equations at a +# point x. In the methods below: +# +# f is an Object which is used to compute the Jacobian matrix of the equations. +# It must provide the following methods: +# +# f.values(x):: returns the values of all functions at x +# +# f.zero:: returns 0.0 +# f.one:: returns 1.0 +# f.two:: returns 1.0 +# f.ten:: returns 10.0 +# +# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. +# +# x is the point at which to compute the Jacobian. +# +# fx is f.values(x). +# +module Jacobian + #-- + def isEqual(a,b,zero=0.0,e=1.0e-8) + aa = a.abs + bb = b.abs + if aa == zero && bb == zero then + true + else + if ((a-b)/(aa+bb)).abs < e then + true + else + false + end + end + end + #++ + + # Computes the derivative of f[i] at x[i]. + # fx is the value of f at x. + def dfdxi(f,fx,x,i) + nRetry = 0 + n = x.size + xSave = x[i] + ok = 0 + ratio = f.ten*f.ten*f.ten + dx = x[i].abs/ratio + dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps) + dx = f.one/f.ten if isEqual(dx,f.zero,f.zero,f.eps) + until ok>0 do + s = f.zero + deriv = [] + if(nRetry>100) then + raise "Singular Jacobian matrix. No change at x[" + i.to_s + "]" + end + dx = dx*f.two + x[i] += dx + fxNew = f.values(x) + for j in 0...n do + if !isEqual(fxNew[j],fx[j],f.zero,f.eps) then + ok += 1 + deriv <<= (fxNew[j]-fx[j])/dx + else + deriv <<= f.zero + end + end + x[i] = xSave + end + deriv + end + + # Computes the Jacobian of f at x. fx is the value of f at x. + def jacobian(f,fx,x) + n = x.size + dfdx = Array::new(n*n) + for i in 0...n do + df = dfdxi(f,fx,x,i) + for j in 0...n do + dfdx[j*n+i] = df[j] + end + end + dfdx + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/ludcmp.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/ludcmp.rb new file mode 100644 index 0000000..8f48887 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/ludcmp.rb @@ -0,0 +1,84 @@ +# +# Solves a*x = b for x, using LU decomposition. +# +module LUSolve + # Performs LU decomposition of the n by n matrix a. + def ludecomp(a,n,zero=0,one=1) + prec = BigDecimal.limit(nil) + ps = [] + scales = [] + for i in 0...n do # pick up largest(abs. val.) element in each row. + ps <<= i + nrmrow = zero + ixn = i*n + for j in 0...n do + biggst = a[ixn+j].abs + nrmrow = biggst if biggst>nrmrow + end + if nrmrow>zero then + scales <<= one.div(nrmrow,prec) + else + raise "Singular matrix" + end + end + n1 = n - 1 + for k in 0...n1 do # Gaussian elimination with partial pivoting. + biggst = zero; + for i in k...n do + size = a[ps[i]*n+k].abs*scales[ps[i]] + if size>biggst then + biggst = size + pividx = i + end + end + raise "Singular matrix" if biggst<=zero + if pividx!=k then + j = ps[k] + ps[k] = ps[pividx] + ps[pividx] = j + end + pivot = a[ps[k]*n+k] + for i in (k+1)...n do + psin = ps[i]*n + a[psin+k] = mult = a[psin+k].div(pivot,prec) + if mult!=zero then + pskn = ps[k]*n + for j in (k+1)...n do + a[psin+j] -= mult.mult(a[pskn+j],prec) + end + end + end + end + raise "Singular matrix" if a[ps[n1]*n+n1] == zero + ps + end + + # Solves a*x = b for x, using LU decomposition. + # + # a is a matrix, b is a constant vector, x is the solution vector. + # + # ps is the pivot, a vector which indicates the permutation of rows performed + # during LU decomposition. + def lusolve(a,b,ps,zero=0.0) + prec = BigDecimal.limit(nil) + n = ps.size + x = [] + for i in 0...n do + dot = zero + psin = ps[i]*n + for j in 0...i do + dot = a[psin+j].mult(x[j],prec) + dot + end + x <<= b[ps[i]] - dot + end + (n-1).downto(0) do |i| + dot = zero + psin = ps[i]*n + for j in (i+1)...n do + dot = a[psin+j].mult(x[j],prec) + dot + end + x[i] = (x[i]-dot).div(a[psin+i],prec) + end + x + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/math.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/math.rb new file mode 100644 index 0000000..f3248a3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/math.rb @@ -0,0 +1,235 @@ +# +#-- +# Contents: +# sqrt(x, prec) +# sin (x, prec) +# cos (x, prec) +# atan(x, prec) Note: |x|<1, x=0.9999 may not converge. +# exp (x, prec) +# log (x, prec) +# PI (prec) +# E (prec) == exp(1.0,prec) +# +# where: +# x ... BigDecimal number to be computed. +# |x| must be small enough to get convergence. +# prec ... Number of digits to be obtained. +#++ +# +# Provides mathematical functions. +# +# Example: +# +# require "bigdecimal" +# require "bigdecimal/math" +# +# include BigMath +# +# a = BigDecimal((PI(100)/2).to_s) +# puts sin(a,100) # -> 0.10000000000000000000......E1 +# +module BigMath + + # Computes the square root of x to the specified number of digits of + # precision. + # + # BigDecimal.new('2').sqrt(16).to_s + # -> "0.14142135623730950488016887242096975E1" + # + def sqrt(x,prec) + x.sqrt(prec) + end + + # Computes the sine of x to the specified number of digits of precision. + # + # If x is infinite or NaN, returns NaN. + def sin(x, prec) + raise ArgumentError, "Zero or negative precision for sin" if prec <= 0 + return BigDecimal("NaN") if x.infinite? || x.nan? + n = prec + BigDecimal.double_fig + one = BigDecimal("1") + two = BigDecimal("2") + x1 = x + x2 = x.mult(x,n) + sign = 1 + y = x + d = y + i = one + z = one + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + sign = -sign + x1 = x2.mult(x1,n) + i += two + z *= (i-one) * i + d = sign * x1.div(z,m) + y += d + end + y + end + + # Computes the cosine of x to the specified number of digits of precision. + # + # If x is infinite or NaN, returns NaN. + def cos(x, prec) + raise ArgumentError, "Zero or negative precision for cos" if prec <= 0 + return BigDecimal("NaN") if x.infinite? || x.nan? + n = prec + BigDecimal.double_fig + one = BigDecimal("1") + two = BigDecimal("2") + x1 = one + x2 = x.mult(x,n) + sign = 1 + y = one + d = y + i = BigDecimal("0") + z = one + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + sign = -sign + x1 = x2.mult(x1,n) + i += two + z *= (i-one) * i + d = sign * x1.div(z,m) + y += d + end + y + end + + # Computes the arctangent of x to the specified number of digits of precision. + # + # If x is infinite or NaN, returns NaN. + # Raises an argument error if x > 1. + def atan(x, prec) + raise ArgumentError, "Zero or negative precision for atan" if prec <= 0 + return BigDecimal("NaN") if x.infinite? || x.nan? + raise ArgumentError, "x.abs must be less than 1.0" if x.abs>=1 + n = prec + BigDecimal.double_fig + y = x + d = y + t = x + r = BigDecimal("3") + x2 = x.mult(x,n) + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + t = -t.mult(x2,n) + d = t.div(r,m) + y += d + r += 2 + end + y + end + + # Computes the value of e (the base of natural logarithms) raised to the + # power of x, to the specified number of digits of precision. + # + # If x is infinite or NaN, returns NaN. + # + # BigMath::exp(BigDecimal.new('1'), 10).to_s + # -> "0.271828182845904523536028752390026306410273E1" + def exp(x, prec) + raise ArgumentError, "Zero or negative precision for exp" if prec <= 0 + return BigDecimal("NaN") if x.infinite? || x.nan? + n = prec + BigDecimal.double_fig + one = BigDecimal("1") + x1 = one + y = one + d = y + z = one + i = 0 + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + x1 = x1.mult(x,n) + i += 1 + z *= i + d = x1.div(z,m) + y += d + end + y + end + + # Computes the natural logarithm of x to the specified number of digits + # of precision. + # + # Returns x if x is infinite or NaN. + # + def log(x, prec) + raise ArgumentError, "Zero or negative argument for log" if x <= 0 || prec <= 0 + return x if x.infinite? || x.nan? + one = BigDecimal("1") + two = BigDecimal("2") + n = prec + BigDecimal.double_fig + x = (x - one).div(x + one,n) + x2 = x.mult(x,n) + y = x + d = y + i = one + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + x = x2.mult(x,n) + i += two + d = x.div(i,m) + y += d + end + y*two + end + + # Computes the value of pi to the specified number of digits of precision. + def PI(prec) + raise ArgumentError, "Zero or negative argument for PI" if prec <= 0 + n = prec + BigDecimal.double_fig + zero = BigDecimal("0") + one = BigDecimal("1") + two = BigDecimal("2") + + m25 = BigDecimal("-0.04") + m57121 = BigDecimal("-57121") + + pi = zero + + d = one + k = one + w = one + t = BigDecimal("-80") + while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + t = t*m25 + d = t.div(k,m) + k = k+two + pi = pi + d + end + + d = one + k = one + w = one + t = BigDecimal("956") + while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + t = t.div(m57121,n) + d = t.div(k,m) + pi = pi + d + k = k+two + end + pi + end + + # Computes e (the base of natural logarithms) to the specified number of + # digits of precision. + def E(prec) + raise ArgumentError, "Zero or negative precision for E" if prec <= 0 + n = prec + BigDecimal.double_fig + one = BigDecimal("1") + y = one + d = y + z = one + i = 0 + while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) + m = BigDecimal.double_fig if m < BigDecimal.double_fig + i += 1 + z *= i + d = one.div(z,m) + y += d + end + y + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/newton.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/newton.rb new file mode 100644 index 0000000..59ac0f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/newton.rb @@ -0,0 +1,77 @@ +# +# newton.rb +# +# Solves the nonlinear algebraic equation system f = 0 by Newton's method. +# This program is not dependent on BigDecimal. +# +# To call: +# n = nlsolve(f,x) +# where n is the number of iterations required, +# x is the initial value vector +# f is an Object which is used to compute the values of the equations to be solved. +# It must provide the following methods: +# +# f.values(x):: returns the values of all functions at x +# +# f.zero:: returns 0.0 +# f.one:: returns 1.0 +# f.two:: returns 1.0 +# f.ten:: returns 10.0 +# +# f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. +# +# On exit, x is the solution vector. +# +require "bigdecimal/ludcmp" +require "bigdecimal/jacobian" + +module Newton + include LUSolve + include Jacobian + + def norm(fv,zero=0.0) + s = zero + n = fv.size + for i in 0...n do + s += fv[i]*fv[i] + end + s + end + + def nlsolve(f,x) + nRetry = 0 + n = x.size + + f0 = f.values(x) + zero = f.zero + one = f.one + two = f.two + p5 = one/two + d = norm(f0,zero) + minfact = f.ten*f.ten*f.ten + minfact = one/minfact + e = f.eps + while d >= e do + nRetry += 1 + # Not yet converged. => Compute Jacobian matrix + dfdx = jacobian(f,f0,x) + # Solve dfdx*dx = -f0 to estimate dx + dx = lusolve(dfdx,f0,ludecomp(dfdx,n,zero,one),zero) + fact = two + xs = x.dup + begin + fact *= p5 + if fact < minfact then + raise "Failed to reduce function values." + end + for i in 0...n do + x[i] = xs[i] - dx[i]*fact + end + f0 = f.values(x) + dn = norm(f0,zero) + end while(dn>=d) + d = dn + end + nRetry + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/util.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/util.rb new file mode 100644 index 0000000..257781f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/lib/bigdecimal/util.rb @@ -0,0 +1,53 @@ +# +# BigDecimal utility library. +# +# To use these functions, require 'bigdecimal/util' +# +# The following methods are provided to convert other types to BigDecimals: +# +# String#to_d -> BigDecimal +# Float#to_d -> BigDecimal +# Rational#to_d -> BigDecimal +# +# The following method is provided to convert BigDecimals to other types: +# +# BigDecimal#to_r -> Rational +# +# ---------------------------------------------------------------------- +# +class Float < Numeric + def to_d + BigDecimal(self.to_s) + end +end + +class String + def to_d + BigDecimal(self) + end +end + +class BigDecimal < Numeric + # Converts a BigDecimal to a String of the form "nnnnnn.mmm". + # This method is deprecated; use BigDecimal#to_s("F") instead. + def to_digits + if self.nan? || self.infinite? || self.zero? + self.to_s + else + i = self.to_i.to_s + s,f,y,z = self.frac.split + i + "." + ("0"*(-z)) + f + end + end +end + +class Rational < Numeric + # Converts a Rational to a BigDecimal + def to_d(nFig=0) + num = self.numerator.to_s + if nFig<=0 + nFig = BigDecimal.double_fig*2+1 + end + BigDecimal.new(num).div(self.denominator,nFig) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/linear.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/linear.rb new file mode 100644 index 0000000..88a62ff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/linear.rb @@ -0,0 +1,71 @@ +#!/usr/local/bin/ruby + +# +# linear.rb +# +# Solves linear equation system(A*x = b) by LU decomposition method. +# where A is a coefficient matrix,x is an answer vector,b is a constant vector. +# +# USAGE: +# ruby linear.rb [input file solved] +# + +require "bigdecimal" +require "bigdecimal/ludcmp" + +# +# NOTE: +# Change following BigDecimal::limit() if needed. +BigDecimal::limit(100) +# + +include LUSolve +def rd_order(na) + printf("Number of equations ?") if(na <= 0) + n = ARGF.gets().to_i +end + +na = ARGV.size +zero = BigDecimal::new("0.0") +one = BigDecimal::new("1.0") + +while (n=rd_order(na))>0 + a = [] + as= [] + b = [] + if na <= 0 + # Read data from console. + printf("\nEnter coefficient matrix element A[i,j]\n"); + for i in 0...n do + for j in 0...n do + printf("A[%d,%d]? ",i,j); s = ARGF.gets + a << BigDecimal::new(s); + as << BigDecimal::new(s); + end + printf("Contatant vector element b[%d] ? ",i); b << BigDecimal::new(ARGF.gets); + end + else + # Read data from specified file. + printf("Coefficient matrix and constant vector.\n"); + for i in 0...n do + s = ARGF.gets + printf("%d) %s",i,s) + s = s.split + for j in 0...n do + a << BigDecimal::new(s[j]); + as << BigDecimal::new(s[j]); + end + b << BigDecimal::new(s[n]); + end + end + x = lusolve(a,b,ludecomp(a,n,zero,one),zero) + printf("Answer(x[i] & (A*x-b)[i]) follows\n") + for i in 0...n do + printf("x[%d]=%s ",i,x[i].to_s) + s = zero + for j in 0...n do + s = s + as[i*n+j]*x[j] + end + printf(" & %s\n",(s-b[i]).to_s) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/nlsolve.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/nlsolve.rb new file mode 100644 index 0000000..7f729e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/nlsolve.rb @@ -0,0 +1,38 @@ +#!/usr/local/bin/ruby + +# +# nlsolve.rb +# An example for solving nonlinear algebraic equation system. +# + +require "bigdecimal" +require "bigdecimal/newton" +include Newton + +class Function + def initialize() + @zero = BigDecimal::new("0.0") + @one = BigDecimal::new("1.0") + @two = BigDecimal::new("2.0") + @ten = BigDecimal::new("10.0") + @eps = BigDecimal::new("1.0e-16") + end + def zero;@zero;end + def one ;@one ;end + def two ;@two ;end + def ten ;@ten ;end + def eps ;@eps ;end + def values(x) # <= defines functions solved + f = [] + f1 = x[0]*x[0] + x[1]*x[1] - @two # f1 = x**2 + y**2 - 2 => 0 + f2 = x[0] - x[1] # f2 = x - y => 0 + f <<= f1 + f <<= f2 + f + end +end + f = BigDecimal::limit(100) + f = Function.new + x = [f.zero,f.zero] # Initial values + n = nlsolve(f,x) + p x diff --git a/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/pi.rb b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/pi.rb new file mode 100644 index 0000000..2f7dd27 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/bigdecimal/sample/pi.rb @@ -0,0 +1,20 @@ +#!/usr/local/bin/ruby + +# +# pi.rb +# +# Calculates 3.1415.... (the number of times that a circle's diameter +# will fit around the circle) using J. Machin's formula. +# + +require "bigdecimal" +require "bigdecimal/math.rb" + +include BigMath + +if ARGV.size == 1 + print "PI("+ARGV[0]+"):\n" + p PI(ARGV[0].to_i) +else + print "TRY: ruby pi.rb 1000 \n" +end diff --git a/lib/ruby-1.9.1-rc1/ext/continuation/continuation.c b/lib/ruby-1.9.1-rc1/ext/continuation/continuation.c new file mode 100644 index 0000000..a1b43b5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/continuation/continuation.c @@ -0,0 +1,8 @@ + +void Init_Continuation_body(void); + +void +Init_continuation(void) +{ + Init_Continuation_body(); +} diff --git a/lib/ruby-1.9.1-rc1/ext/continuation/extconf.rb b/lib/ruby-1.9.1-rc1/ext/continuation/extconf.rb new file mode 100644 index 0000000..17e2d05 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/continuation/extconf.rb @@ -0,0 +1,3 @@ +require 'mkmf' +create_makefile('continuation') + diff --git a/lib/ruby-1.9.1-rc1/ext/coverage/coverage.c b/lib/ruby-1.9.1-rc1/ext/coverage/coverage.c new file mode 100644 index 0000000..145be18 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/coverage/coverage.c @@ -0,0 +1,101 @@ +/************************************************ + + coverage.c - + + $Author: $ + + Copyright (c) 2008 Yusuke Endoh + +************************************************/ + +#include "ruby.h" + +extern VALUE rb_get_coverages(void); +extern void rb_set_coverages(VALUE); +extern void rb_reset_coverages(void); + +/* + * call-seq: + * Coverage.start => nil + * + * Enables coverage measurement. + */ +static VALUE +rb_coverage_start(VALUE klass) +{ + if (!RTEST(rb_get_coverages())) { + VALUE coverages = rb_hash_new(); + RBASIC(coverages)->klass = 0; + rb_set_coverages(coverages); + } + return Qnil; +} + +static int +coverage_result_i(st_data_t key, st_data_t val, st_data_t dummy) +{ + VALUE coverage = (VALUE)val; + RBASIC(coverage)->klass = rb_cArray; + rb_ary_freeze(coverage); + return ST_CONTINUE; +} + +/* + * call-seq: + * Coverage.result => hash + * + * Returns a hash that contains filename as key and coverage array as value + * and disables coverage measurement. + */ +static VALUE +rb_coverage_result(VALUE klass) +{ + VALUE coverages = rb_get_coverages(); + if (!RTEST(coverages)) { + rb_raise(rb_eRuntimeError, "coverage measurement is not enabled"); + } + RBASIC(coverages)->klass = rb_cHash; + st_foreach(RHASH_TBL(coverages), coverage_result_i, 0); + rb_hash_freeze(coverages); + rb_reset_coverages(); + return coverages; +} + +/* Coverage provides coverage measurement feature for Ruby. + * This feature is experimental, so these APIs may be changed in future. + * + * = Usage + * + * (1) require "coverage.so" + * (2) do Coverage.start + * (3) require or load Ruby source file + * (4) Coverage.result will return a hash that contains filename as key and + * coverage array as value. + * + * = Example + * + * [foo.rb] + * s = 0 + * 10.times do |x| + * s += x + * end + * + * if s == 45 + * p :ok + * else + * p :ng + * end + * [EOF] + * + * require "coverage.so" + * Coverage.start + * require "foo.rb" + * p Coverage.result #=> {"foo.rb"=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]} + */ +void +Init_coverage(void) +{ + VALUE rb_mCoverage = rb_define_module("Coverage"); + rb_define_module_function(rb_mCoverage, "start", rb_coverage_start, 0); + rb_define_module_function(rb_mCoverage, "result", rb_coverage_result, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/coverage/extconf.rb b/lib/ruby-1.9.1-rc1/ext/coverage/extconf.rb new file mode 100644 index 0000000..3ebced5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/coverage/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile('coverage') diff --git a/lib/ruby-1.9.1-rc1/ext/curses/.cvsignore b/lib/ruby-1.9.1-rc1/ext/curses/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/curses/curses.c b/lib/ruby-1.9.1-rc1/ext/curses/curses.c new file mode 100644 index 0000000..8e0cc25 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/curses.c @@ -0,0 +1,2064 @@ +/* -*- C -*- + * $Id: curses.c 20507 2008-12-04 08:56:02Z yugui $ + * + * ext/curses/curses.c + * + * by MAEDA Shugo (ender@pic-internet.or.jp) + * modified by Yukihiro Matsumoto (matz@netlab.co.jp), + * Toki Yoshinori, + * Hitoshi Takahashi, + * and Takaaki Tateishi (ttate@kt.jaist.ac.jp) + * + * maintainers: + * - Takaaki Tateishi (ttate@kt.jaist.ac.jp) + */ + +#include "ruby.h" +#include "ruby/io.h" + +#if defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_CURSES_COLR_CURSES_H) +# ifdef HAVE_STDARG_PROTOTYPES +# include +# else +# include +# endif +# include +#else +# include +# if defined(__bsdi__) || defined(__NetBSD__) || defined(__APPLE__) +# if !defined(_maxx) +# define _maxx maxx +# endif +# if !defined(_maxy) +# define _maxy maxy +# endif +# if !defined(_begx) +# define _begx begx +# endif +# if !defined(_begy) +# define _begy begy +# endif +# endif +#endif + +#ifdef HAVE_INIT_COLOR +# define USE_COLOR 1 +#endif + +/* supports only ncurses mouse routines */ +#ifdef NCURSES_MOUSE_VERSION +# define USE_MOUSE 1 +#endif + +#define NUM2CH NUM2CHR +#define CH2FIX CHR2FIX + +static VALUE mCurses; +static VALUE mKey; +static VALUE cWindow; +#ifdef USE_MOUSE +static VALUE cMouseEvent; +#endif + +static VALUE rb_stdscr; + +struct windata { + WINDOW *window; +}; + +#define CHECK(c) c + +static VALUE window_attroff(VALUE obj, VALUE attrs); +static VALUE window_attron(VALUE obj, VALUE attrs); +static VALUE window_attrset(VALUE obj, VALUE attrs); + +static void +no_window(void) +{ + rb_raise(rb_eRuntimeError, "already closed window"); +} + +#define GetWINDOW(obj, winp) do {\ + if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\ + rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\ + Data_Get_Struct(obj, struct windata, winp);\ + if (winp->window == 0) no_window();\ +} while (0) + +static void +free_window(struct windata *winp) +{ + if (winp->window && winp->window != stdscr) delwin(winp->window); + winp->window = 0; + free(winp); +} + +static VALUE +prep_window(VALUE class, WINDOW *window) +{ + VALUE obj; + struct windata *winp; + + if (window == NULL) { + rb_raise(rb_eRuntimeError, "failed to create window"); + } + + obj = rb_obj_alloc(class); + Data_Get_Struct(obj, struct windata, winp); + winp->window = window; + + return obj; +} + +/*-------------------------- module Curses --------------------------*/ + +/* def init_screen */ +static VALUE +curses_init_screen(void) +{ + rb_secure(4); + if (rb_stdscr) return rb_stdscr; + initscr(); + if (stdscr == 0) { + rb_raise(rb_eRuntimeError, "can't initialize curses"); + } + clear(); + rb_stdscr = prep_window(cWindow, stdscr); + return rb_stdscr; +} + +/* def stdscr */ +#define curses_stdscr curses_init_screen + +/* def close_screen */ +static VALUE +curses_close_screen(void) +{ +#ifdef HAVE_ISENDWIN + if (!isendwin()) +#endif + endwin(); + rb_stdscr = 0; + return Qnil; +} + +static void +curses_finalize(VALUE dummy) +{ + if (stdscr +#ifdef HAVE_ISENDWIN + && !isendwin() +#endif + ) + endwin(); + rb_stdscr = 0; + rb_gc_unregister_address(&rb_stdscr); +} + +/* def closed? */ +static VALUE +curses_closed(void) +{ +#ifdef HAVE_ISENDWIN + if (isendwin()) { + return Qtrue; + } + return Qfalse; +#else + rb_notimplement(); +#endif +} + +/* def clear */ +static VALUE +curses_clear(VALUE obj) +{ + curses_stdscr(); + wclear(stdscr); + return Qnil; +} + +/* def clrtoeol */ +static VALUE +curses_clrtoeol(void) +{ + curses_stdscr(); + clrtoeol(); + return Qnil; +} + +/* def refresh */ +static VALUE +curses_refresh(VALUE obj) +{ + curses_stdscr(); + refresh(); + return Qnil; +} + +/* def doupdate */ +static VALUE +curses_doupdate(VALUE obj) +{ + curses_stdscr(); +#ifdef HAVE_DOUPDATE + doupdate(); +#else + refresh(); +#endif + return Qnil; +} + +/* def echo */ +static VALUE +curses_echo(VALUE obj) +{ + curses_stdscr(); + echo(); + return Qnil; +} + +/* def noecho */ +static VALUE +curses_noecho(VALUE obj) +{ + curses_stdscr(); + noecho(); + return Qnil; +} + +/* def raw */ +static VALUE +curses_raw(VALUE obj) +{ + curses_stdscr(); + raw(); + return Qnil; +} + +/* def noraw */ +static VALUE +curses_noraw(VALUE obj) +{ + curses_stdscr(); + noraw(); + return Qnil; +} + +/* def cbreak */ +static VALUE +curses_cbreak(VALUE obj) +{ + curses_stdscr(); + cbreak(); + return Qnil; +} + +/* def nocbreak */ +static VALUE +curses_nocbreak(VALUE obj) +{ + curses_stdscr(); + nocbreak(); + return Qnil; +} + +/* def nl */ +static VALUE +curses_nl(VALUE obj) +{ + curses_stdscr(); + nl(); + return Qnil; +} + +/* def nonl */ +static VALUE +curses_nonl(VALUE obj) +{ + curses_stdscr(); + nonl(); + return Qnil; +} + +/* def beep */ +static VALUE +curses_beep(VALUE obj) +{ +#ifdef HAVE_BEEP + curses_stdscr(); + beep(); +#endif + return Qnil; +} + +/* def flash */ +static VALUE +curses_flash(VALUE obj) +{ +#ifdef HAVE_FLASH + curses_stdscr(); + flash(); +#endif + return Qnil; +} + +static int +curses_char(VALUE c) +{ + if (FIXNUM_P(c)) { + return NUM2INT(c); + } + else { + int cc; + + StringValue(c); + if (RSTRING_LEN(c) == 0 || RSTRING_LEN(c) > 1) { + rb_raise(rb_eArgError, "string not corresponding a character"); + } + cc = RSTRING_PTR(c)[0]; + if (cc > 0x7f) { + rb_raise(rb_eArgError, "no multibyte string supported (yet)"); + } + return cc; + } +} + +/* def ungetch */ +static VALUE +curses_ungetch(VALUE obj, VALUE ch) +{ +#ifdef HAVE_UNGETCH + int c = curses_char(ch); + curses_stdscr(); + ungetch(c); +#else + rb_notimplement(); +#endif + return Qnil; +} + +/* def setpos(y, x) */ +static VALUE +curses_setpos(VALUE obj, VALUE y, VALUE x) +{ + curses_stdscr(); + move(NUM2INT(y), NUM2INT(x)); + return Qnil; +} + +/* def standout */ +static VALUE +curses_standout(VALUE obj) +{ + standout(); + return Qnil; +} + +/* def standend */ +static VALUE +curses_standend(VALUE obj) +{ + standend(); + return Qnil; +} + +/* def inch */ +static VALUE +curses_inch(VALUE obj) +{ + curses_stdscr(); + return CH2FIX(inch()); +} + +/* def addch(ch) */ +static VALUE +curses_addch(VALUE obj, VALUE ch) +{ + curses_stdscr(); + addch(NUM2CH(ch)); + return Qnil; +} + +/* def insch(ch) */ +static VALUE +curses_insch(VALUE obj, VALUE ch) +{ + curses_stdscr(); + insch(NUM2CH(ch)); + return Qnil; +} + +/* def addstr(str) */ +static VALUE +curses_addstr(VALUE obj, VALUE str) +{ + StringValue(str); + str = rb_str_export_locale(str); + curses_stdscr(); + if (!NIL_P(str)) { + addstr(StringValueCStr(str)); + } + return Qnil; +} + +/* def getch */ +static VALUE +curses_getch(VALUE obj) +{ + int c; + + rb_read_check(stdin); + curses_stdscr(); + c = getch(); + if (c == EOF) return Qnil; + if (rb_isprint(c)) { + char ch = (char)c; + + return rb_locale_str_new(&ch, 1); + } + return UINT2NUM(c); +} + +/* def getstr */ +static VALUE +curses_getstr(VALUE obj) +{ + char rtn[1024]; /* This should be big enough.. I hope */ + + rb_read_check(stdin); +#if defined(HAVE_GETNSTR) + getnstr(rtn,1023); +#else + getstr(rtn); +#endif + return rb_locale_str_new_cstr(rtn); +} + +/* def delch */ +static VALUE +curses_delch(VALUE obj) +{ + delch(); + return Qnil; +} + +/* def delelteln */ +static VALUE +curses_deleteln(VALUE obj) +{ +#if defined(HAVE_DELETELN) || defined(deleteln) + deleteln(); +#endif + return Qnil; +} + +/* def insertln */ +static VALUE +curses_insertln(VALUE obj) +{ +#if defined(HAVE_INSERTLN) || defined(insertln) + insertln(); +#endif + return Qnil; +} + +/* def keyname */ +static VALUE +curses_keyname(VALUE obj, VALUE c) +{ +#ifdef HAVE_KEYNAME + int cc = curses_char(c); + const char *name; + + name = keyname(cc); + if (name) { + return rb_str_new_cstr(name); + } + else { + return Qnil; + } +#else + return Qnil; +#endif +} + +static VALUE +curses_lines(void) +{ + return INT2FIX(LINES); +} + +static VALUE +curses_cols(void) +{ + return INT2FIX(COLS); +} + +static VALUE +curses_curs_set(VALUE obj, VALUE visibility) +{ +#ifdef HAVE_CURS_SET + int n; + return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil; +#else + return Qnil; +#endif +} + +static VALUE +curses_scrl(VALUE obj, VALUE n) +{ + /* may have to raise exception on ERR */ +#ifdef HAVE_SCRL + return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +static VALUE +curses_setscrreg(VALUE obj, VALUE top, VALUE bottom) +{ + /* may have to raise exception on ERR */ +#ifdef HAVE_SETSCRREG + return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +static VALUE +curses_attroff(VALUE obj, VALUE attrs) +{ + return window_attroff(rb_stdscr,attrs); + /* return INT2FIX(attroff(NUM2INT(attrs))); */ +} + +static VALUE +curses_attron(VALUE obj, VALUE attrs) +{ + return window_attron(rb_stdscr,attrs); + /* return INT2FIX(attroff(NUM2INT(attrs))); */ +} + +static VALUE +curses_attrset(VALUE obj, VALUE attrs) +{ + return window_attrset(rb_stdscr,attrs); + /* return INT2FIX(attroff(NUM2INT(attrs))); */ +} + +static VALUE +curses_bkgdset(VALUE obj, VALUE ch) +{ +#ifdef HAVE_BKGDSET + bkgdset(NUM2CH(ch)); +#endif + return Qnil; +} + +static VALUE +curses_bkgd(VALUE obj, VALUE ch) +{ +#ifdef HAVE_BKGD + return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +static VALUE +curses_resizeterm(VALUE obj, VALUE lin, VALUE col) +{ +#if defined(HAVE_RESIZETERM) + return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse; +#else + return Qnil; +#endif +} + +#ifdef USE_COLOR +static VALUE +curses_start_color(VALUE obj) +{ + /* may have to raise exception on ERR */ + return (start_color() == OK) ? Qtrue : Qfalse; +} + +static VALUE +curses_init_pair(VALUE obj, VALUE pair, VALUE f, VALUE b) +{ + /* may have to raise exception on ERR */ + return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse; +} + +static VALUE +curses_init_color(VALUE obj, VALUE color, VALUE r, VALUE g, VALUE b) +{ + /* may have to raise exception on ERR */ + return (init_color(NUM2INT(color),NUM2INT(r), + NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse; +} + +static VALUE +curses_has_colors(VALUE obj) +{ + return has_colors() ? Qtrue : Qfalse; +} + +static VALUE +curses_can_change_color(VALUE obj) +{ + return can_change_color() ? Qtrue : Qfalse; +} + +static VALUE +curses_color_content(VALUE obj, VALUE color) +{ + short r,g,b; + + color_content(NUM2INT(color),&r,&g,&b); + return rb_ary_new3(3,INT2FIX(r),INT2FIX(g),INT2FIX(b)); +} + +static VALUE +curses_pair_content(VALUE obj, VALUE pair) +{ + short f,b; + + pair_content(NUM2INT(pair),&f,&b); + return rb_ary_new3(2,INT2FIX(f),INT2FIX(b)); +} + +static VALUE +curses_color_pair(VALUE obj, VALUE attrs) +{ + return INT2FIX(COLOR_PAIR(NUM2INT(attrs))); +} + +static VALUE +curses_pair_number(VALUE obj, VALUE attrs) +{ + return INT2FIX(PAIR_NUMBER(NUM2INT(attrs))); +} +#endif /* USE_COLOR */ + +#ifdef USE_MOUSE +struct mousedata { + MEVENT *mevent; +}; + +static void +no_mevent(void) +{ + rb_raise(rb_eRuntimeError, "no such mouse event"); +} + +#define GetMOUSE(obj, data) do {\ + if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\ + rb_raise(rb_eSecurityError, "Insecure: operation on untainted mouse");\ + Data_Get_Struct(obj, struct mousedata, data);\ + if (data->mevent == 0) no_mevent();\ +} while (0) + +static void +curses_mousedata_free(struct mousedata *mdata) +{ + if (mdata->mevent) + xfree(mdata->mevent); +} + +static VALUE +curses_getmouse(VALUE obj) +{ + struct mousedata *mdata; + VALUE val; + + val = Data_Make_Struct(cMouseEvent,struct mousedata, + 0,curses_mousedata_free,mdata); + mdata->mevent = (MEVENT*)xmalloc(sizeof(MEVENT)); + return (getmouse(mdata->mevent) == OK) ? val : Qnil; +} + +static VALUE +curses_ungetmouse(VALUE obj, VALUE mevent) +{ + struct mousedata *mdata; + + GetMOUSE(mevent,mdata); + return (ungetmouse(mdata->mevent) == OK) ? Qtrue : Qfalse; +} + +static VALUE +curses_mouseinterval(VALUE obj, VALUE interval) +{ + return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse; +} + +static VALUE +curses_mousemask(VALUE obj, VALUE mask) +{ + return INT2NUM(mousemask(NUM2UINT(mask),NULL)); +} + +#define DEFINE_MOUSE_GET_MEMBER(func_name,mem) \ +static VALUE func_name (VALUE mouse) \ +{ \ + struct mousedata *mdata; \ + GetMOUSE(mouse, mdata); \ + return (UINT2NUM(mdata->mevent -> mem)); \ +} + +DEFINE_MOUSE_GET_MEMBER(curs_mouse_id, id) +DEFINE_MOUSE_GET_MEMBER(curs_mouse_x, x) +DEFINE_MOUSE_GET_MEMBER(curs_mouse_y, y) +DEFINE_MOUSE_GET_MEMBER(curs_mouse_z, z) +DEFINE_MOUSE_GET_MEMBER(curs_mouse_bstate, bstate) +#undef define_curs_mouse_member +#endif /* USE_MOUSE */ + +static VALUE +curses_timeout(VALUE obj, VALUE delay) +{ +#ifdef HAVE_TIMEOUT + timeout(NUM2INT(delay)); + return Qnil; +#else + rb_notimplement(); +#endif +} + +static VALUE +curses_def_prog_mode(VALUE obj) +{ +#ifdef HAVE_DEF_PROG_MODE + return def_prog_mode() == OK ? Qtrue : Qfalse; +#else + rb_notimplement(); +#endif +} + +static VALUE +curses_reset_prog_mode(VALUE obj) +{ +#ifdef HAVE_RESET_PROG_MODE + return reset_prog_mode() == OK ? Qtrue : Qfalse; +#else + rb_notimplement(); +#endif +} + +/*-------------------------- class Window --------------------------*/ + +/* def self.allocate */ +static VALUE +window_s_allocate(VALUE class) +{ + struct windata *winp; + + return Data_Make_Struct(class, struct windata, 0, free_window, winp); +} + +/* def initialize(h, w, top, left) */ +static VALUE +window_initialize(VALUE obj, VALUE h, VALUE w, VALUE top, VALUE left) +{ + struct windata *winp; + WINDOW *window; + + rb_secure(4); + curses_init_screen(); + Data_Get_Struct(obj, struct windata, winp); + if (winp->window) delwin(winp->window); + window = newwin(NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left)); + wclear(window); + winp->window = window; + + return obj; +} + +/* def subwin(height, width, top, left) */ +static VALUE +window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left) +{ + struct windata *winp; + WINDOW *window; + VALUE win; + int h, w, t, l; + + h = NUM2INT(height); + w = NUM2INT(width); + t = NUM2INT(top); + l = NUM2INT(left); + GetWINDOW(obj, winp); + window = subwin(winp->window, h, w, t, l); + win = prep_window(rb_obj_class(obj), window); + + return win; +} + +/* def close */ +static VALUE +window_close(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + delwin(winp->window); + winp->window = 0; + + return Qnil; +} + +/* def clear */ +static VALUE +window_clear(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wclear(winp->window); + + return Qnil; +} + +/* def clrtoeol */ +static VALUE +window_clrtoeol(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wclrtoeol(winp->window); + + return Qnil; +} + +/* def refresh */ +static VALUE +window_refresh(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wrefresh(winp->window); + + return Qnil; +} + +/* def noutrefresh */ +static VALUE +window_noutrefresh(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); +#ifdef HAVE_DOUPDATE + wnoutrefresh(winp->window); +#else + wrefresh(winp->window); +#endif + + return Qnil; +} + +/* def move(y, x) */ +static VALUE +window_move(VALUE obj, VALUE y, VALUE x) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + mvwin(winp->window, NUM2INT(y), NUM2INT(x)); + + return Qnil; +} + +/* def setpos(y, x) */ +static VALUE +window_setpos(VALUE obj, VALUE y, VALUE x) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wmove(winp->window, NUM2INT(y), NUM2INT(x)); + return Qnil; +} + +/* def cury */ +static VALUE +window_cury(VALUE obj) +{ + struct windata *winp; + int x, y; + + GetWINDOW(obj, winp); + getyx(winp->window, y, x); + return INT2FIX(y); +} + +/* def curx */ +static VALUE +window_curx(VALUE obj) +{ + struct windata *winp; + int x, y; + + GetWINDOW(obj, winp); + getyx(winp->window, y, x); + return INT2FIX(x); +} + +/* def maxy */ +static VALUE +window_maxy(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); +#if defined(getmaxy) + return INT2FIX(getmaxy(winp->window)); +#elif defined(getmaxyx) + { + int x, y; + getmaxyx(winp->window, y, x); + return INT2FIX(y); + } +#else + return INT2FIX(winp->window->_maxy+1); +#endif +} + +/* def maxx */ +static VALUE +window_maxx(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); +#if defined(getmaxx) + return INT2FIX(getmaxx(winp->window)); +#elif defined(getmaxyx) + { + int x, y; + getmaxyx(winp->window, y, x); + return INT2FIX(x); + } +#else + return INT2FIX(winp->window->_maxx+1); +#endif +} + +/* def begy */ +static VALUE +window_begy(VALUE obj) +{ + struct windata *winp; + int x, y; + + GetWINDOW(obj, winp); +#ifdef getbegyx + getbegyx(winp->window, y, x); + return INT2FIX(y); +#else + return INT2FIX(winp->window->_begy); +#endif +} + +/* def begx */ +static VALUE +window_begx(VALUE obj) +{ + struct windata *winp; + int x, y; + + GetWINDOW(obj, winp); +#ifdef getbegyx + getbegyx(winp->window, y, x); + return INT2FIX(x); +#else + return INT2FIX(winp->window->_begx); +#endif +} + +/* def box(vert, hor) */ +static VALUE +window_box(int argc, VALUE *argv, VALUE self) +{ + struct windata *winp; + VALUE vert, hor, corn; + + rb_scan_args(argc, argv, "21", &vert, &hor, &corn); + + GetWINDOW(self, winp); + box(winp->window, NUM2CH(vert), NUM2CH(hor)); + + if (!NIL_P(corn)) { + int cur_x, cur_y, x, y; + chtype c; + + c = NUM2CH(corn); + getyx(winp->window, cur_y, cur_x); + x = NUM2INT(window_maxx(self)) - 1; + y = NUM2INT(window_maxy(self)) - 1; + wmove(winp->window, 0, 0); + waddch(winp->window, c); + wmove(winp->window, y, 0); + waddch(winp->window, c); + wmove(winp->window, y, x); + waddch(winp->window, c); + wmove(winp->window, 0, x); + waddch(winp->window, c); + wmove(winp->window, cur_y, cur_x); + } + + return Qnil; +} + +/* def standout */ +static VALUE +window_standout(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wstandout(winp->window); + return Qnil; +} + +/* def standend */ +static VALUE +window_standend(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wstandend(winp->window); + return Qnil; +} + +/* def inch */ +static VALUE +window_inch(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + return CH2FIX(winch(winp->window)); +} + +/* def addch(ch) */ +static VALUE +window_addch(VALUE obj, VALUE ch) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + waddch(winp->window, NUM2CH(ch)); + + return Qnil; +} + +/* def insch(ch) */ +static VALUE +window_insch(VALUE obj, VALUE ch) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + winsch(winp->window, NUM2CH(ch)); + + return Qnil; +} + +/* def addstr(str) */ +static VALUE +window_addstr(VALUE obj, VALUE str) +{ + if (!NIL_P(str)) { + struct windata *winp; + + StringValue(str); + str = rb_str_export_locale(str); + GetWINDOW(obj, winp); + waddstr(winp->window, StringValueCStr(str)); + } + return Qnil; +} + +/* def <<(str) */ +static VALUE +window_addstr2(VALUE obj, VALUE str) +{ + window_addstr(obj, str); + return obj; +} + +/* def getch */ +static VALUE +window_getch(VALUE obj) +{ + struct windata *winp; + int c; + + rb_read_check(stdin); + GetWINDOW(obj, winp); + c = wgetch(winp->window); + if (c == EOF) return Qnil; + if (rb_isprint(c)) { + char ch = (char)c; + + return rb_locale_str_new(&ch, 1); + } + return UINT2NUM(c); +} + +/* def getstr */ +static VALUE +window_getstr(VALUE obj) +{ + struct windata *winp; + char rtn[1024]; /* This should be big enough.. I hope */ + + GetWINDOW(obj, winp); + rb_read_check(stdin); +#if defined(HAVE_WGETNSTR) + wgetnstr(winp->window, rtn, 1023); +#else + wgetstr(winp->window, rtn); +#endif + return rb_locale_str_new_cstr(rtn); +} + +/* def delch */ +static VALUE +window_delch(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + wdelch(winp->window); + return Qnil; +} + +/* def delelteln */ +static VALUE +window_deleteln(VALUE obj) +{ +#if defined(HAVE_WDELETELN) || defined(wdeleteln) + struct windata *winp; + + GetWINDOW(obj, winp); + wdeleteln(winp->window); +#endif + return Qnil; +} + +/* def insertln */ +static VALUE +window_insertln(VALUE obj) +{ +#if defined(HAVE_WINSERTLN) || defined(winsertln) + struct windata *winp; + + GetWINDOW(obj, winp); + winsertln(winp->window); +#endif + return Qnil; +} + +static VALUE +window_scrollok(VALUE obj, VALUE bf) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + scrollok(winp->window, RTEST(bf) ? TRUE : FALSE); + return Qnil; +} + +static VALUE +window_idlok(VALUE obj, VALUE bf) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + idlok(winp->window, RTEST(bf) ? TRUE : FALSE); + return Qnil; +} + +static VALUE +window_setscrreg(VALUE obj, VALUE top, VALUE bottom) +{ +#ifdef HAVE_WSETSCRREG + struct windata *winp; + int res; + + GetWINDOW(obj, winp); + res = wsetscrreg(winp->window, NUM2INT(top), NUM2INT(bottom)); + /* may have to raise exception on ERR */ + return (res == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET) +static VALUE +window_color_set(VALUE obj, VALUE col) +{ + struct windata *winp; + int res; + + GetWINDOW(obj, winp); + res = wcolor_set(winp->window, NUM2INT(col), NULL); + return (res == OK) ? Qtrue : Qfalse; +} +#endif /* defined(USE_COLOR) && defined(HAVE_WCOLOR_SET) */ + +static VALUE +window_scroll(VALUE obj) +{ + struct windata *winp; + + GetWINDOW(obj, winp); + /* may have to raise exception on ERR */ + return (scroll(winp->window) == OK) ? Qtrue : Qfalse; +} + +static VALUE +window_scrl(VALUE obj, VALUE n) +{ +#ifdef HAVE_WSCRL + struct windata *winp; + + GetWINDOW(obj, winp); + /* may have to raise exception on ERR */ + return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +static VALUE +window_attroff(VALUE obj, VALUE attrs) +{ +#ifdef HAVE_WATTROFF + struct windata *winp; + + GetWINDOW(obj,winp); + return INT2FIX(wattroff(winp->window,NUM2INT(attrs))); +#else + return Qtrue; +#endif +} + +static VALUE +window_attron(VALUE obj, VALUE attrs) +{ +#ifdef HAVE_WATTRON + struct windata *winp; + VALUE val; + + GetWINDOW(obj,winp); + val = INT2FIX(wattron(winp->window,NUM2INT(attrs))); + if( rb_block_given_p() ){ + rb_yield(val); + wattroff(winp->window,NUM2INT(attrs)); + return val; + } + else{ + return val; + } +#else + return Qtrue; +#endif +} + +static VALUE +window_attrset(VALUE obj, VALUE attrs) +{ +#ifdef HAVE_WATTRSET + struct windata *winp; + + GetWINDOW(obj,winp); + return INT2FIX(wattrset(winp->window,NUM2INT(attrs))); +#else + return Qtrue; +#endif +} + +static VALUE +window_bkgdset(VALUE obj, VALUE ch) +{ +#ifdef HAVE_WBKGDSET + struct windata *winp; + + GetWINDOW(obj,winp); + wbkgdset(winp->window, NUM2CH(ch)); +#endif + return Qnil; +} + +static VALUE +window_bkgd(VALUE obj, VALUE ch) +{ +#ifdef HAVE_WBKGD + struct windata *winp; + + GetWINDOW(obj,winp); + return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse; +#else + return Qfalse; +#endif +} + +static VALUE +window_getbkgd(VALUE obj) +{ +#ifdef HAVE_WGETBKGD + chtype c; + struct windata *winp; + + GetWINDOW(obj,winp); + return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil; +#else + return Qnil; +#endif +} + +static VALUE +window_resize(VALUE obj, VALUE lin, VALUE col) +{ +#if defined(HAVE_WRESIZE) + struct windata *winp; + + GetWINDOW(obj,winp); + return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse; +#else + return Qnil; +#endif +} + + +static VALUE +window_keypad(VALUE obj, VALUE val) +{ +#ifdef HAVE_KEYPAD + struct windata *winp; + + GetWINDOW(obj,winp); + /* keypad() of NetBSD's libcurses returns no value */ +#if defined(__NetBSD__) && !defined(NCURSES_VERSION) + keypad(winp->window,(RTEST(val) ? TRUE : FALSE)); + return Qnil; +#else + /* may have to raise exception on ERR */ + return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ? + Qtrue : Qfalse; +#endif +#else + rb_notimplement(); +#endif /* HAVE_KEYPAD */ +} + +static VALUE +window_nodelay(VALUE obj, VALUE val) +{ +#ifdef HAVE_NODELAY + struct windata *winp; + GetWINDOW(obj,winp); + + /* nodelay() of NetBSD's libcurses returns no value */ +#if defined(__NetBSD__) && !defined(NCURSES_VERSION) + nodelay(winp->window, RTEST(val) ? TRUE : FALSE); + return Qnil; +#else + return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse; +#endif +#else + rb_notimplement(); +#endif +} + +static VALUE +window_timeout(VALUE obj, VALUE delay) +{ +#ifdef HAVE_WTIMEOUT + struct windata *winp; + GetWINDOW(obj,winp); + + wtimeout(winp->window,NUM2INT(delay)); + return Qnil; +#else + rb_notimplement(); +#endif +} + +/*------------------------- Initialization -------------------------*/ +void +Init_curses(void) +{ + mCurses = rb_define_module("Curses"); + mKey = rb_define_module_under(mCurses, "Key"); + + rb_gc_register_address(&rb_stdscr); + +#ifdef USE_MOUSE + cMouseEvent = rb_define_class_under(mCurses,"MouseEvent",rb_cObject); + rb_undef_method(CLASS_OF(cMouseEvent),"new"); + rb_define_method(cMouseEvent, "eid", curs_mouse_id, 0); + rb_define_method(cMouseEvent, "x", curs_mouse_x, 0); + rb_define_method(cMouseEvent, "y", curs_mouse_y, 0); + rb_define_method(cMouseEvent, "z", curs_mouse_z, 0); + rb_define_method(cMouseEvent, "bstate", curs_mouse_bstate, 0); +#endif /* USE_MOUSE */ + + rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0); + rb_define_module_function(mCurses, "close_screen", curses_close_screen, 0); + rb_define_module_function(mCurses, "closed?", curses_closed, 0); + rb_define_module_function(mCurses, "stdscr", curses_stdscr, 0); + rb_define_module_function(mCurses, "refresh", curses_refresh, 0); + rb_define_module_function(mCurses, "doupdate", curses_doupdate, 0); + rb_define_module_function(mCurses, "clear", curses_clear, 0); + rb_define_module_function(mCurses, "clrtoeol", curses_clrtoeol, 0); + rb_define_module_function(mCurses, "echo", curses_echo, 0); + rb_define_module_function(mCurses, "noecho", curses_noecho, 0); + rb_define_module_function(mCurses, "raw", curses_raw, 0); + rb_define_module_function(mCurses, "noraw", curses_noraw, 0); + rb_define_module_function(mCurses, "cbreak", curses_cbreak, 0); + rb_define_module_function(mCurses, "nocbreak", curses_nocbreak, 0); + rb_define_alias(mCurses, "crmode", "cbreak"); + rb_define_alias(mCurses, "nocrmode", "nocbreak"); + rb_define_module_function(mCurses, "nl", curses_nl, 0); + rb_define_module_function(mCurses, "nonl", curses_nonl, 0); + rb_define_module_function(mCurses, "beep", curses_beep, 0); + rb_define_module_function(mCurses, "flash", curses_flash, 0); + rb_define_module_function(mCurses, "ungetch", curses_ungetch, 1); + rb_define_module_function(mCurses, "setpos", curses_setpos, 2); + rb_define_module_function(mCurses, "standout", curses_standout, 0); + rb_define_module_function(mCurses, "standend", curses_standend, 0); + rb_define_module_function(mCurses, "inch", curses_inch, 0); + rb_define_module_function(mCurses, "addch", curses_addch, 1); + rb_define_module_function(mCurses, "insch", curses_insch, 1); + rb_define_module_function(mCurses, "addstr", curses_addstr, 1); + rb_define_module_function(mCurses, "getch", curses_getch, 0); + rb_define_module_function(mCurses, "getstr", curses_getstr, 0); + rb_define_module_function(mCurses, "delch", curses_delch, 0); + rb_define_module_function(mCurses, "deleteln", curses_deleteln, 0); + rb_define_module_function(mCurses, "insertln", curses_insertln, 0); + rb_define_module_function(mCurses, "keyname", curses_keyname, 1); + rb_define_module_function(mCurses, "lines", curses_lines, 0); + rb_define_module_function(mCurses, "cols", curses_cols, 0); + rb_define_module_function(mCurses, "curs_set", curses_curs_set, 1); + rb_define_module_function(mCurses, "scrl", curses_scrl, 1); + rb_define_module_function(mCurses, "setscrreg", curses_setscrreg, 2); + rb_define_module_function(mCurses, "attroff", curses_attroff, 1); + rb_define_module_function(mCurses, "attron", curses_attron, 1); + rb_define_module_function(mCurses, "attrset", curses_attrset, 1); + rb_define_module_function(mCurses, "bkgdset", curses_bkgdset, 1); + rb_define_module_function(mCurses, "bkgd", curses_bkgd, 1); + rb_define_module_function(mCurses, "resizeterm", curses_resizeterm, 2); + rb_define_module_function(mCurses, "resize", curses_resizeterm, 2); +#ifdef USE_COLOR + rb_define_module_function(mCurses, "start_color", curses_start_color, 0); + rb_define_module_function(mCurses, "init_pair", curses_init_pair, 3); + rb_define_module_function(mCurses, "init_color", curses_init_color, 4); + rb_define_module_function(mCurses, "has_colors?", curses_has_colors, 0); + rb_define_module_function(mCurses, "can_change_color?", + curses_can_change_color, 0); + rb_define_module_function(mCurses, "color_content", curses_color_content, 1); + rb_define_module_function(mCurses, "pair_content", curses_pair_content, 1); + rb_define_module_function(mCurses, "color_pair", curses_color_pair, 1); + rb_define_module_function(mCurses, "pair_number", curses_pair_number, 1); +#endif /* USE_COLOR */ +#ifdef USE_MOUSE + rb_define_module_function(mCurses, "getmouse", curses_getmouse, 0); + rb_define_module_function(mCurses, "ungetmouse", curses_ungetmouse, 1); + rb_define_module_function(mCurses, "mouseinterval", curses_mouseinterval, 1); + rb_define_module_function(mCurses, "mousemask", curses_mousemask, 1); +#endif /* USE_MOUSE */ + + rb_define_module_function(mCurses, "timeout=", curses_timeout, 1); + rb_define_module_function(mCurses, "def_prog_mode", curses_def_prog_mode, 0); + rb_define_module_function(mCurses, "reset_prog_mode", curses_reset_prog_mode, 0); + + cWindow = rb_define_class_under(mCurses, "Window", rb_cData); + rb_define_alloc_func(cWindow, window_s_allocate); + rb_define_method(cWindow, "initialize", window_initialize, 4); + rb_define_method(cWindow, "subwin", window_subwin, 4); + rb_define_method(cWindow, "close", window_close, 0); + rb_define_method(cWindow, "clear", window_clear, 0); + rb_define_method(cWindow, "clrtoeol", window_clrtoeol, 0); + rb_define_method(cWindow, "refresh", window_refresh, 0); + rb_define_method(cWindow, "noutrefresh", window_noutrefresh, 0); + rb_define_method(cWindow, "box", window_box, -1); + rb_define_method(cWindow, "move", window_move, 2); + rb_define_method(cWindow, "setpos", window_setpos, 2); +#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET) + rb_define_method(cWindow, "color_set", window_color_set, 1); +#endif /* USE_COLOR && HAVE_WCOLOR_SET */ + rb_define_method(cWindow, "cury", window_cury, 0); + rb_define_method(cWindow, "curx", window_curx, 0); + rb_define_method(cWindow, "maxy", window_maxy, 0); + rb_define_method(cWindow, "maxx", window_maxx, 0); + rb_define_method(cWindow, "begy", window_begy, 0); + rb_define_method(cWindow, "begx", window_begx, 0); + rb_define_method(cWindow, "standout", window_standout, 0); + rb_define_method(cWindow, "standend", window_standend, 0); + rb_define_method(cWindow, "inch", window_inch, 0); + rb_define_method(cWindow, "addch", window_addch, 1); + rb_define_method(cWindow, "insch", window_insch, 1); + rb_define_method(cWindow, "addstr", window_addstr, 1); + rb_define_method(cWindow, "<<", window_addstr2, 1); + rb_define_method(cWindow, "getch", window_getch, 0); + rb_define_method(cWindow, "getstr", window_getstr, 0); + rb_define_method(cWindow, "delch", window_delch, 0); + rb_define_method(cWindow, "deleteln", window_deleteln, 0); + rb_define_method(cWindow, "insertln", window_insertln, 0); + rb_define_method(cWindow, "scroll", window_scroll, 0); + rb_define_method(cWindow, "scrollok", window_scrollok, 1); + rb_define_method(cWindow, "idlok", window_idlok, 1); + rb_define_method(cWindow, "setscrreg", window_setscrreg, 2); + rb_define_method(cWindow, "scrl", window_scrl, 1); + rb_define_method(cWindow, "resize", window_resize, 2); + rb_define_method(cWindow, "keypad", window_keypad, 1); + rb_define_method(cWindow, "keypad=", window_keypad, 1); + + rb_define_method(cWindow, "attroff", window_attroff, 1); + rb_define_method(cWindow, "attron", window_attron, 1); + rb_define_method(cWindow, "attrset", window_attrset, 1); + rb_define_method(cWindow, "bkgdset", window_bkgdset, 1); + rb_define_method(cWindow, "bkgd", window_bkgd, 1); + rb_define_method(cWindow, "getbkgd", window_getbkgd, 0); + + rb_define_method(cWindow, "nodelay=", window_nodelay, 1); + rb_define_method(cWindow, "timeout=", window_timeout, 1); + +#define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c)) + +#ifdef USE_COLOR + rb_curses_define_const(A_ATTRIBUTES); +#ifdef A_NORMAL + rb_curses_define_const(A_NORMAL); +#endif + rb_curses_define_const(A_STANDOUT); + rb_curses_define_const(A_UNDERLINE); + rb_curses_define_const(A_REVERSE); + rb_curses_define_const(A_BLINK); + rb_curses_define_const(A_DIM); + rb_curses_define_const(A_BOLD); + rb_curses_define_const(A_PROTECT); +#ifdef A_INVIS /* for NetBSD */ + rb_curses_define_const(A_INVIS); +#endif + rb_curses_define_const(A_ALTCHARSET); + rb_curses_define_const(A_CHARTEXT); +#ifdef A_HORIZONTAL + rb_curses_define_const(A_HORIZONTAL); +#endif +#ifdef A_LEFT + rb_curses_define_const(A_LEFT); +#endif +#ifdef A_LOW + rb_curses_define_const(A_LOW); +#endif +#ifdef A_RIGHT + rb_curses_define_const(A_RIGHT); +#endif +#ifdef A_TOP + rb_curses_define_const(A_TOP); +#endif +#ifdef A_VERTICAL + rb_curses_define_const(A_VERTICAL); +#endif + rb_curses_define_const(A_COLOR); + +#ifdef COLORS + rb_curses_define_const(COLORS); +#endif + rb_curses_define_const(COLOR_BLACK); + rb_curses_define_const(COLOR_RED); + rb_curses_define_const(COLOR_GREEN); + rb_curses_define_const(COLOR_YELLOW); + rb_curses_define_const(COLOR_BLUE); + rb_curses_define_const(COLOR_MAGENTA); + rb_curses_define_const(COLOR_CYAN); + rb_curses_define_const(COLOR_WHITE); +#endif /* USE_COLOR */ +#ifdef USE_MOUSE +#ifdef BUTTON1_PRESSED + rb_curses_define_const(BUTTON1_PRESSED); +#endif +#ifdef BUTTON1_RELEASED + rb_curses_define_const(BUTTON1_RELEASED); +#endif +#ifdef BUTTON1_CLICKED + rb_curses_define_const(BUTTON1_CLICKED); +#endif +#ifdef BUTTON1_DOUBLE_CLICKED + rb_curses_define_const(BUTTON1_DOUBLE_CLICKED); +#endif +#ifdef BUTTON1_TRIPLE_CLICKED + rb_curses_define_const(BUTTON1_TRIPLE_CLICKED); +#endif +#ifdef BUTTON2_PRESSED + rb_curses_define_const(BUTTON2_PRESSED); +#endif +#ifdef BUTTON2_RELEASED + rb_curses_define_const(BUTTON2_RELEASED); +#endif +#ifdef BUTTON2_CLICKED + rb_curses_define_const(BUTTON2_CLICKED); +#endif +#ifdef BUTTON2_DOUBLE_CLICKED + rb_curses_define_const(BUTTON2_DOUBLE_CLICKED); +#endif +#ifdef BUTTON2_TRIPLE_CLICKED + rb_curses_define_const(BUTTON2_TRIPLE_CLICKED); +#endif +#ifdef BUTTON3_PRESSED + rb_curses_define_const(BUTTON3_PRESSED); +#endif +#ifdef BUTTON3_RELEASED + rb_curses_define_const(BUTTON3_RELEASED); +#endif +#ifdef BUTTON3_CLICKED + rb_curses_define_const(BUTTON3_CLICKED); +#endif +#ifdef BUTTON3_DOUBLE_CLICKED + rb_curses_define_const(BUTTON3_DOUBLE_CLICKED); +#endif +#ifdef BUTTON3_TRIPLE_CLICKED + rb_curses_define_const(BUTTON3_TRIPLE_CLICKED); +#endif +#ifdef BUTTON4_PRESSED + rb_curses_define_const(BUTTON4_PRESSED); +#endif +#ifdef BUTTON4_RELEASED + rb_curses_define_const(BUTTON4_RELEASED); +#endif +#ifdef BUTTON4_CLICKED + rb_curses_define_const(BUTTON4_CLICKED); +#endif +#ifdef BUTTON4_DOUBLE_CLICKED + rb_curses_define_const(BUTTON4_DOUBLE_CLICKED); +#endif +#ifdef BUTTON4_TRIPLE_CLICKED + rb_curses_define_const(BUTTON4_TRIPLE_CLICKED); +#endif +#ifdef BUTTON_SHIFT + rb_curses_define_const(BUTTON_SHIFT); +#endif +#ifdef BUTTON_CTRL + rb_curses_define_const(BUTTON_CTRL); +#endif +#ifdef BUTTON_ALT + rb_curses_define_const(BUTTON_ALT); +#endif +#ifdef ALL_MOUSE_EVENTS + rb_curses_define_const(ALL_MOUSE_EVENTS); +#endif +#ifdef REPORT_MOUSE_POSITION + rb_curses_define_const(REPORT_MOUSE_POSITION); +#endif +#endif /* USE_MOUSE */ + +#if defined(KEY_MOUSE) && defined(USE_MOUSE) + rb_curses_define_const(KEY_MOUSE); + rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE)); +#endif +#ifdef KEY_MIN + rb_curses_define_const(KEY_MIN); + rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN)); +#endif +#ifdef KEY_BREAK + rb_curses_define_const(KEY_BREAK); + rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK)); +#endif +#ifdef KEY_DOWN + rb_curses_define_const(KEY_DOWN); + rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN)); +#endif +#ifdef KEY_UP + rb_curses_define_const(KEY_UP); + rb_define_const(mKey, "UP", INT2NUM(KEY_UP)); +#endif +#ifdef KEY_LEFT + rb_curses_define_const(KEY_LEFT); + rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT)); +#endif +#ifdef KEY_RIGHT + rb_curses_define_const(KEY_RIGHT); + rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT)); +#endif +#ifdef KEY_HOME + rb_curses_define_const(KEY_HOME); + rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME)); +#endif +#ifdef KEY_BACKSPACE + rb_curses_define_const(KEY_BACKSPACE); + rb_define_const(mKey, "BACKSPACE", INT2NUM(KEY_BACKSPACE)); +#endif +#ifdef KEY_F + /* KEY_F(n) : 0 <= n <= 63 */ + { + int i; + char c[8]; + for( i=0; i<64; i++ ){ + sprintf(c, "KEY_F%d", i); + rb_define_const(mCurses, c, INT2NUM(KEY_F(i))); + sprintf(c, "F%d", i); + rb_define_const(mKey, c, INT2NUM(KEY_F(i))); + } + } +#endif +#ifdef KEY_DL + rb_curses_define_const(KEY_DL); + rb_define_const(mKey, "DL", INT2NUM(KEY_DL)); +#endif +#ifdef KEY_IL + rb_curses_define_const(KEY_IL); + rb_define_const(mKey, "IL", INT2NUM(KEY_IL)); +#endif +#ifdef KEY_DC + rb_curses_define_const(KEY_DC); + rb_define_const(mKey, "DC", INT2NUM(KEY_DC)); +#endif +#ifdef KEY_IC + rb_curses_define_const(KEY_IC); + rb_define_const(mKey, "IC", INT2NUM(KEY_IC)); +#endif +#ifdef KEY_EIC + rb_curses_define_const(KEY_EIC); + rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC)); +#endif +#ifdef KEY_CLEAR + rb_curses_define_const(KEY_CLEAR); + rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR)); +#endif +#ifdef KEY_EOS + rb_curses_define_const(KEY_EOS); + rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS)); +#endif +#ifdef KEY_EOL + rb_curses_define_const(KEY_EOL); + rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL)); +#endif +#ifdef KEY_SF + rb_curses_define_const(KEY_SF); + rb_define_const(mKey, "SF", INT2NUM(KEY_SF)); +#endif +#ifdef KEY_SR + rb_curses_define_const(KEY_SR); + rb_define_const(mKey, "SR", INT2NUM(KEY_SR)); +#endif +#ifdef KEY_NPAGE + rb_curses_define_const(KEY_NPAGE); + rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE)); +#endif +#ifdef KEY_PPAGE + rb_curses_define_const(KEY_PPAGE); + rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE)); +#endif +#ifdef KEY_STAB + rb_curses_define_const(KEY_STAB); + rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB)); +#endif +#ifdef KEY_CTAB + rb_curses_define_const(KEY_CTAB); + rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB)); +#endif +#ifdef KEY_CATAB + rb_curses_define_const(KEY_CATAB); + rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB)); +#endif +#ifdef KEY_ENTER + rb_curses_define_const(KEY_ENTER); + rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER)); +#endif +#ifdef KEY_SRESET + rb_curses_define_const(KEY_SRESET); + rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET)); +#endif +#ifdef KEY_RESET + rb_curses_define_const(KEY_RESET); + rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET)); +#endif +#ifdef KEY_PRINT + rb_curses_define_const(KEY_PRINT); + rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT)); +#endif +#ifdef KEY_LL + rb_curses_define_const(KEY_LL); + rb_define_const(mKey, "LL", INT2NUM(KEY_LL)); +#endif +#ifdef KEY_A1 + rb_curses_define_const(KEY_A1); + rb_define_const(mKey, "A1", INT2NUM(KEY_A1)); +#endif +#ifdef KEY_A3 + rb_curses_define_const(KEY_A3); + rb_define_const(mKey, "A3", INT2NUM(KEY_A3)); +#endif +#ifdef KEY_B2 + rb_curses_define_const(KEY_B2); + rb_define_const(mKey, "B2", INT2NUM(KEY_B2)); +#endif +#ifdef KEY_C1 + rb_curses_define_const(KEY_C1); + rb_define_const(mKey, "C1", INT2NUM(KEY_C1)); +#endif +#ifdef KEY_C3 + rb_curses_define_const(KEY_C3); + rb_define_const(mKey, "C3", INT2NUM(KEY_C3)); +#endif +#ifdef KEY_BTAB + rb_curses_define_const(KEY_BTAB); + rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB)); +#endif +#ifdef KEY_BEG + rb_curses_define_const(KEY_BEG); + rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG)); +#endif +#ifdef KEY_CANCEL + rb_curses_define_const(KEY_CANCEL); + rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL)); +#endif +#ifdef KEY_CLOSE + rb_curses_define_const(KEY_CLOSE); + rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE)); +#endif +#ifdef KEY_COMMAND + rb_curses_define_const(KEY_COMMAND); + rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND)); +#endif +#ifdef KEY_COPY + rb_curses_define_const(KEY_COPY); + rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY)); +#endif +#ifdef KEY_CREATE + rb_curses_define_const(KEY_CREATE); + rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE)); +#endif +#ifdef KEY_END + rb_curses_define_const(KEY_END); + rb_define_const(mKey, "END", INT2NUM(KEY_END)); +#endif +#ifdef KEY_EXIT + rb_curses_define_const(KEY_EXIT); + rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT)); +#endif +#ifdef KEY_FIND + rb_curses_define_const(KEY_FIND); + rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND)); +#endif +#ifdef KEY_HELP + rb_curses_define_const(KEY_HELP); + rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP)); +#endif +#ifdef KEY_MARK + rb_curses_define_const(KEY_MARK); + rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK)); +#endif +#ifdef KEY_MESSAGE + rb_curses_define_const(KEY_MESSAGE); + rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE)); +#endif +#ifdef KEY_MOVE + rb_curses_define_const(KEY_MOVE); + rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE)); +#endif +#ifdef KEY_NEXT + rb_curses_define_const(KEY_NEXT); + rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT)); +#endif +#ifdef KEY_OPEN + rb_curses_define_const(KEY_OPEN); + rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN)); +#endif +#ifdef KEY_OPTIONS + rb_curses_define_const(KEY_OPTIONS); + rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS)); +#endif +#ifdef KEY_PREVIOUS + rb_curses_define_const(KEY_PREVIOUS); + rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS)); +#endif +#ifdef KEY_REDO + rb_curses_define_const(KEY_REDO); + rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO)); +#endif +#ifdef KEY_REFERENCE + rb_curses_define_const(KEY_REFERENCE); + rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE)); +#endif +#ifdef KEY_REFRESH + rb_curses_define_const(KEY_REFRESH); + rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH)); +#endif +#ifdef KEY_REPLACE + rb_curses_define_const(KEY_REPLACE); + rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE)); +#endif +#ifdef KEY_RESTART + rb_curses_define_const(KEY_RESTART); + rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART)); +#endif +#ifdef KEY_RESUME + rb_curses_define_const(KEY_RESUME); + rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME)); +#endif +#ifdef KEY_SAVE + rb_curses_define_const(KEY_SAVE); + rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE)); +#endif +#ifdef KEY_SBEG + rb_curses_define_const(KEY_SBEG); + rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG)); +#endif +#ifdef KEY_SCANCEL + rb_curses_define_const(KEY_SCANCEL); + rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL)); +#endif +#ifdef KEY_SCOMMAND + rb_curses_define_const(KEY_SCOMMAND); + rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND)); +#endif +#ifdef KEY_SCOPY + rb_curses_define_const(KEY_SCOPY); + rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY)); +#endif +#ifdef KEY_SCREATE + rb_curses_define_const(KEY_SCREATE); + rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE)); +#endif +#ifdef KEY_SDC + rb_curses_define_const(KEY_SDC); + rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC)); +#endif +#ifdef KEY_SDL + rb_curses_define_const(KEY_SDL); + rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL)); +#endif +#ifdef KEY_SELECT + rb_curses_define_const(KEY_SELECT); + rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT)); +#endif +#ifdef KEY_SEND + rb_curses_define_const(KEY_SEND); + rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND)); +#endif +#ifdef KEY_SEOL + rb_curses_define_const(KEY_SEOL); + rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL)); +#endif +#ifdef KEY_SEXIT + rb_curses_define_const(KEY_SEXIT); + rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT)); +#endif +#ifdef KEY_SFIND + rb_curses_define_const(KEY_SFIND); + rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND)); +#endif +#ifdef KEY_SHELP + rb_curses_define_const(KEY_SHELP); + rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP)); +#endif +#ifdef KEY_SHOME + rb_curses_define_const(KEY_SHOME); + rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME)); +#endif +#ifdef KEY_SIC + rb_curses_define_const(KEY_SIC); + rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC)); +#endif +#ifdef KEY_SLEFT + rb_curses_define_const(KEY_SLEFT); + rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT)); +#endif +#ifdef KEY_SMESSAGE + rb_curses_define_const(KEY_SMESSAGE); + rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE)); +#endif +#ifdef KEY_SMOVE + rb_curses_define_const(KEY_SMOVE); + rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE)); +#endif +#ifdef KEY_SNEXT + rb_curses_define_const(KEY_SNEXT); + rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT)); +#endif +#ifdef KEY_SOPTIONS + rb_curses_define_const(KEY_SOPTIONS); + rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS)); +#endif +#ifdef KEY_SPREVIOUS + rb_curses_define_const(KEY_SPREVIOUS); + rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS)); +#endif +#ifdef KEY_SPRINT + rb_curses_define_const(KEY_SPRINT); + rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT)); +#endif +#ifdef KEY_SREDO + rb_curses_define_const(KEY_SREDO); + rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO)); +#endif +#ifdef KEY_SREPLACE + rb_curses_define_const(KEY_SREPLACE); + rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE)); +#endif +#ifdef KEY_SRIGHT + rb_curses_define_const(KEY_SRIGHT); + rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT)); +#endif +#ifdef KEY_SRSUME + rb_curses_define_const(KEY_SRSUME); + rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME)); +#endif +#ifdef KEY_SSAVE + rb_curses_define_const(KEY_SSAVE); + rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE)); +#endif +#ifdef KEY_SSUSPEND + rb_curses_define_const(KEY_SSUSPEND); + rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND)); +#endif +#ifdef KEY_SUNDO + rb_curses_define_const(KEY_SUNDO); + rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO)); +#endif +#ifdef KEY_SUSPEND + rb_curses_define_const(KEY_SUSPEND); + rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND)); +#endif +#ifdef KEY_UNDO + rb_curses_define_const(KEY_UNDO); + rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO)); +#endif +#ifdef KEY_RESIZE + rb_curses_define_const(KEY_RESIZE); + rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE)); +#endif +#ifdef KEY_MAX + rb_curses_define_const(KEY_MAX); + rb_define_const(mKey, "MAX", INT2NUM(KEY_MAX)); +#endif + { + int c; + char name[] = "KEY_CTRL_x"; + for( c = 'A'; c <= 'Z'; c++ ){ + sprintf(name, "KEY_CTRL_%c", c); + rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1)); + } + } +#undef rb_curses_define_const + + rb_set_end_proc(curses_finalize, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/curses/depend b/lib/ruby-1.9.1-rc1/ext/curses/depend new file mode 100644 index 0000000..ecb79e5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/depend @@ -0,0 +1 @@ +curses.o: curses.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/curses/extconf.rb b/lib/ruby-1.9.1-rc1/ext/curses/extconf.rb new file mode 100644 index 0000000..799d1bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/extconf.rb @@ -0,0 +1,31 @@ +require 'mkmf' + +dir_config('curses') +dir_config('ncurses') +dir_config('termcap') + +make=false +headers = [] +have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM +have_library("tinfo", "tgetent") or have_library("termcap", "tgetent") +if have_header(*curses=%w"ncurses.h") and have_library("ncurses", "initscr") + make=true +elsif have_header(*curses=%w"ncurses/curses.h") and have_library("ncurses", "initscr") + make=true +elsif have_header(*curses=%w"curses_colr/curses.h") and have_library("cur_colr", "initscr") + curses.unshift("varargs.h") + make=true +elsif have_header(*curses=%w"curses.h") and have_library("curses", "initscr") + make=true +end + +if make + for f in %w(beep bkgd bkgdset curs_set deleteln doupdate flash getbkgd getnstr init isendwin keyname keypad resizeterm scrl set setscrreg ungetch wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr wresize wscrl wsetscrreg def_prog_mode reset_prog_mode timeout wtimeout nodelay init_color wcolor_set) + have_func(f) || (have_macro(f, curses) && $defs.push(format("-DHAVE_%s", f.upcase))) + end + flag = "-D_XOPEN_SOURCE_EXTENDED" + if try_static_assert("sizeof(char*)>sizeof(int)", %w[stdio.h stdlib.h]+curses , flag) + $defs << flag + end + create_makefile("curses") +end diff --git a/lib/ruby-1.9.1-rc1/ext/curses/hello.rb b/lib/ruby-1.9.1-rc1/ext/curses/hello.rb new file mode 100644 index 0000000..7f57d80 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/hello.rb @@ -0,0 +1,30 @@ +#!/usr/local/bin/ruby + +require "curses" +include Curses + +def show_message(message) + width = message.length + 6 + win = Window.new(5, width, + (lines - 5) / 2, (cols - width) / 2) + win.box(?|, ?-) + win.setpos(2, 3) + win.addstr(message) + win.refresh + win.getch + win.close +end + +init_screen +begin + crmode +# show_message("Hit any key") + setpos((lines - 5) / 2, (cols - 10) / 2) + addstr("Hit any key") + refresh + getch + show_message("Hello, World!") + refresh +ensure + close_screen +end diff --git a/lib/ruby-1.9.1-rc1/ext/curses/mouse.rb b/lib/ruby-1.9.1-rc1/ext/curses/mouse.rb new file mode 100644 index 0000000..c42bc31 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/mouse.rb @@ -0,0 +1,53 @@ +#!/usr/local/bin/ruby + +require "curses" +include Curses + +def show_message(*msgs) + message = msgs.join + width = message.length + 6 + win = Window.new(5, width, + (lines - 5) / 2, (cols - width) / 2) + win.keypad = true + win.attron(color_pair(COLOR_RED)){ + win.box(?|, ?-, ?+) + } + win.setpos(2, 3) + win.addstr(message) + win.refresh + win.getch + win.close +end + +init_screen +start_color +init_pair(COLOR_BLUE,COLOR_BLUE,COLOR_WHITE) +init_pair(COLOR_RED,COLOR_RED,COLOR_WHITE) +crmode +noecho +stdscr.keypad(true) + +begin + mousemask(BUTTON1_CLICKED|BUTTON2_CLICKED|BUTTON3_CLICKED|BUTTON4_CLICKED) + setpos((lines - 5) / 2, (cols - 10) / 2) + attron(color_pair(COLOR_BLUE)|A_BOLD){ + addstr("click") + } + refresh + while( true ) + c = getch + case c + when KEY_MOUSE + m = getmouse + if( m ) + show_message("getch = #{c.inspect}, ", + "mouse event = #{'0x%x' % m.bstate}, ", + "axis = (#{m.x},#{m.y},#{m.z})") + end + break + end + end + refresh +ensure + close_screen +end diff --git a/lib/ruby-1.9.1-rc1/ext/curses/rain.rb b/lib/ruby-1.9.1-rc1/ext/curses/rain.rb new file mode 100644 index 0000000..36f0f84 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/rain.rb @@ -0,0 +1,76 @@ +#!/usr/local/bin/ruby +# rain for a curses test + +require "curses" +include Curses + +def onsig(sig) + close_screen + exit sig +end + +def ranf + rand(32767).to_f / 32767 +end + +# main # +for i in 1 .. 15 # SIGHUP .. SIGTERM + if trap(i, "SIG_IGN") != 0 then # 0 for SIG_IGN + trap(i) {|sig| onsig(sig) } + end +end + +init_screen +nl +noecho +srand + +xpos = {} +ypos = {} +r = lines - 4 +c = cols - 4 +for i in 0 .. 4 + xpos[i] = (c * ranf).to_i + 2 + ypos[i] = (r * ranf).to_i + 2 +end + +i = 0 +while TRUE + x = (c * ranf).to_i + 2 + y = (r * ranf).to_i + 2 + + + setpos(y, x); addstr(".") + + setpos(ypos[i], xpos[i]); addstr("o") + + i = if i == 0 then 4 else i - 1 end + setpos(ypos[i], xpos[i]); addstr("O") + + i = if i == 0 then 4 else i - 1 end + setpos(ypos[i] - 1, xpos[i]); addstr("-") + setpos(ypos[i], xpos[i] - 1); addstr("|.|") + setpos(ypos[i] + 1, xpos[i]); addstr("-") + + i = if i == 0 then 4 else i - 1 end + setpos(ypos[i] - 2, xpos[i]); addstr("-") + setpos(ypos[i] - 1, xpos[i] - 1); addstr("/ \\") + setpos(ypos[i], xpos[i] - 2); addstr("| O |") + setpos(ypos[i] + 1, xpos[i] - 1); addstr("\\ /") + setpos(ypos[i] + 2, xpos[i]); addstr("-") + + i = if i == 0 then 4 else i - 1 end + setpos(ypos[i] - 2, xpos[i]); addstr(" ") + setpos(ypos[i] - 1, xpos[i] - 1); addstr(" ") + setpos(ypos[i], xpos[i] - 2); addstr(" ") + setpos(ypos[i] + 1, xpos[i] - 1); addstr(" ") + setpos(ypos[i] + 2, xpos[i]); addstr(" ") + + + xpos[i] = x + ypos[i] = y + refresh + sleep(0.5) +end + +# end of main diff --git a/lib/ruby-1.9.1-rc1/ext/curses/view.rb b/lib/ruby-1.9.1-rc1/ext/curses/view.rb new file mode 100644 index 0000000..239f414 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/view.rb @@ -0,0 +1,91 @@ +#!/usr/local/bin/ruby + +require "curses" +include Curses + +# +# main +# + +if ARGV.size != 1 then + printf("usage: view file\n"); + exit +end +begin + fp = open(ARGV[0], "r") +rescue + raise "cannot open file: #{ARGV[1]}" +end + +# signal(SIGINT, finish) + +init_screen +#keypad(stdscr, TRUE) +nonl +cbreak +noecho +#scrollok(stdscr, TRUE) + +# slurp the file +data_lines = [] +fp.each_line { |l| + data_lines.push(l) +} +fp.close + + +lptr = 0 +while TRUE + i = 0 + while i < lines + setpos(i, 0) + #clrtoeol + addstr(data_lines[lptr + i]) #if data_lines[lptr + i] + i += 1 + end + refresh + + explicit = FALSE + n = 0 + while TRUE + c = getch + if c =~ /[0-9]/ + n = 10 * n + c.to_i + else + break + end + end + + n = 1 if !explicit && n == 0 + + case c + when "n" #when KEY_DOWN + i = 0 + while i < n + if lptr + lines < data_lines.size then + lptr += 1 + else + break + end + i += 1 + end + #wscrl(i) + + when "p" #when KEY_UP + i = 0 + while i < n + if lptr > 0 then + lptr -= 1 + else + break + end + i += 1 + end + #wscrl(-i) + + when "q" + break + end + +end +close_screen diff --git a/lib/ruby-1.9.1-rc1/ext/curses/view2.rb b/lib/ruby-1.9.1-rc1/ext/curses/view2.rb new file mode 100644 index 0000000..18d9619 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/curses/view2.rb @@ -0,0 +1,115 @@ +#!/usr/local/bin/ruby + +require "curses" + +if ARGV.size != 1 then + printf("usage: view file\n"); + exit +end +begin + fp = open(ARGV[0], "r") +rescue + raise "cannot open file: #{ARGV[1]}" +end + +# signal(SIGINT, finish) + +Curses.init_screen +Curses.nonl +Curses.cbreak +Curses.noecho + +$screen = Curses.stdscr + +$screen.scrollok(true) +#$screen.keypad(true) + +# slurp the file +$data_lines = [] +fp.each_line { |l| + $data_lines.push(l.chop) +} +fp.close + +$top = 0 +$data_lines[0..$screen.maxy-1].each_with_index{|line, idx| + $screen.setpos(idx, 0) + $screen.addstr(line) +} +$screen.setpos(0,0) +$screen.refresh + +def scroll_up + if( $top > 0 ) + $screen.scrl(-1) + $top -= 1 + str = $data_lines[$top] + if( str ) + $screen.setpos(0, 0) + $screen.addstr(str) + end + return true + else + return false + end +end + +def scroll_down + if( $top + $screen.maxy < $data_lines.length ) + $screen.scrl(1) + $top += 1 + str = $data_lines[$top + $screen.maxy - 1] + if( str ) + $screen.setpos($screen.maxy - 1, 0) + $screen.addstr(str) + end + return true + else + return false + end +end + +while true + result = true + c = Curses.getch + case c + when Curses::KEY_DOWN, Curses::KEY_CTRL_N + result = scroll_down + when Curses::KEY_UP, Curses::KEY_CTRL_P + result = scroll_up + when Curses::KEY_NPAGE, ?\s # white space + for i in 0..($screen.maxy - 2) + if( ! scroll_down ) + if( i == 0 ) + result = false + end + break + end + end + when Curses::KEY_PPAGE + for i in 0..($screen.maxy - 2) + if( ! scroll_up ) + if( i == 0 ) + result = false + end + break + end + end + when Curses::KEY_LEFT, Curses::KEY_CTRL_T + while( scroll_up ) + end + when Curses::KEY_RIGHT, Curses::KEY_CTRL_B + while( scroll_down ) + end + when ?q + break + else + $screen.setpos(0,0) + $screen.addstr("[unknown key `#{Curses.keyname(c)}'=#{c}] ") + end + if( !result ) + Curses.beep + end + $screen.setpos(0,0) +end +Curses.close_screen diff --git a/lib/ruby-1.9.1-rc1/ext/dbm/.cvsignore b/lib/ruby-1.9.1-rc1/ext/dbm/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dbm/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/dbm/dbm.c b/lib/ruby-1.9.1-rc1/ext/dbm/dbm.c new file mode 100644 index 0000000..8589547 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dbm/dbm.c @@ -0,0 +1,745 @@ +/************************************************ + + dbm.c - + + $Author: yugui $ + created at: Mon Jan 24 15:59:52 JST 1994 + + Copyright (C) 1995-2001 Yukihiro Matsumoto + +************************************************/ + +#include "ruby.h" + +#ifdef HAVE_CDEFS_H +# include +#endif +#ifdef HAVE_SYS_CDEFS_H +# include +#endif +#include DBM_HDR +#include +#include + +static VALUE rb_cDBM, rb_eDBMError; + +#define RUBY_DBM_RW_BIT 0x20000000 + +struct dbmdata { + int di_size; + DBM *di_dbm; +}; + +static void +closed_dbm(void) +{ + rb_raise(rb_eDBMError, "closed DBM file"); +} + +#define GetDBM(obj, dbmp) {\ + Data_Get_Struct(obj, struct dbmdata, dbmp);\ + if (dbmp == 0) closed_dbm();\ + if (dbmp->di_dbm == 0) closed_dbm();\ +} + +#define GetDBM2(obj, data, dbm) {\ + GetDBM(obj, data);\ + (dbm) = dbmp->di_dbm;\ +} + +static void +free_dbm(struct dbmdata *dbmp) +{ + if (dbmp) { + if (dbmp->di_dbm) dbm_close(dbmp->di_dbm); + xfree(dbmp); + } +} + +static VALUE +fdbm_close(VALUE obj) +{ + struct dbmdata *dbmp; + + GetDBM(obj, dbmp); + dbm_close(dbmp->di_dbm); + dbmp->di_dbm = 0; + + return Qnil; +} + +static VALUE +fdbm_closed(VALUE obj) +{ + struct dbmdata *dbmp; + + Data_Get_Struct(obj, struct dbmdata, dbmp); + if (dbmp == 0) + return Qtrue; + if (dbmp->di_dbm == 0) + return Qtrue; + + return Qfalse; +} + +static VALUE +fdbm_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, free_dbm, 0); +} + +static VALUE +fdbm_initialize(int argc, VALUE *argv, VALUE obj) +{ + VALUE file, vmode, vflags; + DBM *dbm; + struct dbmdata *dbmp; + int mode, flags = 0; + + if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) { + mode = 0666; /* default value */ + } + else if (NIL_P(vmode)) { + mode = -1; /* return nil if DB not exist */ + } + else { + mode = NUM2INT(vmode); + } + + if (!NIL_P(vflags)) + flags = NUM2INT(vflags); + + FilePathValue(file); + + if (flags & RUBY_DBM_RW_BIT) { + flags &= ~RUBY_DBM_RW_BIT; + dbm = dbm_open(RSTRING_PTR(file), flags, mode); + } + else { + dbm = 0; + if (mode >= 0) { + dbm = dbm_open(RSTRING_PTR(file), O_RDWR|O_CREAT, mode); + } + if (!dbm) { + dbm = dbm_open(RSTRING_PTR(file), O_RDWR, 0); + } + if (!dbm) { + dbm = dbm_open(RSTRING_PTR(file), O_RDONLY, 0); + } + } + + if (!dbm) { + if (mode == -1) return Qnil; + rb_sys_fail(RSTRING_PTR(file)); + } + + dbmp = ALLOC(struct dbmdata); + DATA_PTR(obj) = dbmp; + dbmp->di_dbm = dbm; + dbmp->di_size = -1; + + return obj; +} + +static VALUE +fdbm_s_open(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0); + + if (NIL_P(fdbm_initialize(argc, argv, obj))) { + return Qnil; + } + + if (rb_block_given_p()) { + return rb_ensure(rb_yield, obj, fdbm_close, obj); + } + + return obj; +} + +static VALUE +fdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone) +{ + datum key, value; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + GetDBM2(obj, dbmp, dbm); + value = dbm_fetch(dbm, key); + if (value.dptr == 0) { + if (ifnone == Qnil && rb_block_given_p()) + return rb_yield(rb_tainted_str_new(key.dptr, key.dsize)); + return ifnone; + } + return rb_tainted_str_new(value.dptr, value.dsize); +} + +static VALUE +fdbm_aref(VALUE obj, VALUE keystr) +{ + return fdbm_fetch(obj, keystr, Qnil); +} + +static VALUE +fdbm_fetch_m(int argc, VALUE *argv, VALUE obj) +{ + VALUE keystr, valstr, ifnone; + + rb_scan_args(argc, argv, "11", &keystr, &ifnone); + valstr = fdbm_fetch(obj, keystr, ifnone); + if (argc == 1 && !rb_block_given_p() && NIL_P(valstr)) + rb_raise(rb_eIndexError, "key not found"); + + return valstr; +} + +static VALUE +fdbm_key(VALUE obj, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(valstr); + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + if (val.dsize == RSTRING_LEN(valstr) && + memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0) { + return rb_tainted_str_new(key.dptr, key.dsize); + } + } + return Qnil; +} + +static VALUE +fdbm_index(VALUE hash, VALUE value) +{ + rb_warn("DBM#index is deprecated; use DBM#key"); + return fdbm_key(hash, value); +} + +static VALUE +fdbm_select(VALUE obj) +{ + VALUE new = rb_ary_new(); + datum key, val; + DBM *dbm; + struct dbmdata *dbmp; + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + VALUE assoc, v; + val = dbm_fetch(dbm, key); + assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize), + rb_tainted_str_new(val.dptr, val.dsize)); + v = rb_yield(assoc); + if (RTEST(v)) { + rb_ary_push(new, assoc); + } + GetDBM2(obj, dbmp, dbm); + } + + return new; +} + +static VALUE +fdbm_values_at(int argc, VALUE *argv, VALUE obj) +{ + VALUE new = rb_ary_new2(argc); + int i; + + for (i=0; idi_size = -1; + rb_raise(rb_eDBMError, "dbm_delete failed"); + } + else if (dbmp->di_size >= 0) { + dbmp->di_size--; + } + return valstr; +} + +static VALUE +fdbm_shift(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + + key = dbm_firstkey(dbm); + if (!key.dptr) return Qnil; + val = dbm_fetch(dbm, key); + keystr = rb_tainted_str_new(key.dptr, key.dsize); + valstr = rb_tainted_str_new(val.dptr, val.dsize); + dbm_delete(dbm, key); + + return rb_assoc_new(keystr, valstr); +} + +static VALUE +fdbm_delete_if(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + VALUE ret, ary = rb_ary_new(); + int i, status = 0, n; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + n = dbmp->di_size; + dbmp->di_size = -1; + + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + keystr = rb_tainted_str_new(key.dptr, key.dsize); + valstr = rb_tainted_str_new(val.dptr, val.dsize); + ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status); + if (status != 0) break; + if (RTEST(ret)) rb_ary_push(ary, keystr); + GetDBM2(obj, dbmp, dbm); + } + + for (i = 0; i < RARRAY_LEN(ary); i++) { + keystr = RARRAY_PTR(ary)[i]; + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + if (dbm_delete(dbm, key)) { + rb_raise(rb_eDBMError, "dbm_delete failed"); + } + } + if (status) rb_jump_tag(status); + if (n > 0) dbmp->di_size = n - RARRAY_LEN(ary); + + return obj; +} + +static VALUE +fdbm_clear(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + while (key = dbm_firstkey(dbm), key.dptr) { + if (dbm_delete(dbm, key)) { + rb_raise(rb_eDBMError, "dbm_delete failed"); + } + } + dbmp->di_size = 0; + + return obj; +} + +static VALUE +fdbm_invert(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + VALUE hash = rb_hash_new(); + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + keystr = rb_tainted_str_new(key.dptr, key.dsize); + valstr = rb_tainted_str_new(val.dptr, val.dsize); + rb_hash_aset(hash, valstr, keystr); + } + return hash; +} + +static VALUE fdbm_store(VALUE,VALUE,VALUE); + +static VALUE +update_i(VALUE pair, VALUE dbm) +{ + Check_Type(pair, T_ARRAY); + if (RARRAY_LEN(pair) < 2) { + rb_raise(rb_eArgError, "pair must be [key, value]"); + } + fdbm_store(dbm, RARRAY_PTR(pair)[0], RARRAY_PTR(pair)[1]); + return Qnil; +} + +static VALUE +fdbm_update(VALUE obj, VALUE other) +{ + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +static VALUE +fdbm_replace(VALUE obj, VALUE other) +{ + fdbm_clear(obj); + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +static VALUE +fdbm_store(VALUE obj, VALUE keystr, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + fdbm_modify(obj); + keystr = rb_obj_as_string(keystr); + valstr = rb_obj_as_string(valstr); + + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + if (dbm_store(dbm, key, val, DBM_REPLACE)) { +#ifdef HAVE_DBM_CLEARERR + dbm_clearerr(dbm); +#endif + if (errno == EPERM) rb_sys_fail(0); + rb_raise(rb_eDBMError, "dbm_store failed"); + } + + return valstr; +} + +static VALUE +fdbm_length(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + int i = 0; + + GetDBM2(obj, dbmp, dbm); + if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size); + + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + i++; + } + dbmp->di_size = i; + + return INT2FIX(i); +} + +static VALUE +fdbm_empty_p(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + int i = 0; + + GetDBM2(obj, dbmp, dbm); + if (dbmp->di_size < 0) { + dbm = dbmp->di_dbm; + + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + i++; + } + } + else { + i = dbmp->di_size; + } + if (i == 0) return Qtrue; + return Qfalse; +} + +static VALUE +fdbm_each_value(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + rb_yield(rb_tainted_str_new(val.dptr, val.dsize)); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +static VALUE +fdbm_each_key(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + rb_yield(rb_tainted_str_new(key.dptr, key.dsize)); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +static VALUE +fdbm_each_pair(VALUE obj) +{ + datum key, val; + DBM *dbm; + struct dbmdata *dbmp; + VALUE keystr, valstr; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + keystr = rb_tainted_str_new(key.dptr, key.dsize); + valstr = rb_tainted_str_new(val.dptr, val.dsize); + rb_yield(rb_assoc_new(keystr, valstr)); + GetDBM2(obj, dbmp, dbm); + } + + return obj; +} + +static VALUE +fdbm_keys(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + + ary = rb_ary_new(); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize)); + } + + return ary; +} + +static VALUE +fdbm_values(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize)); + } + + return ary; +} + +static VALUE +fdbm_has_key(VALUE obj, VALUE keystr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + GetDBM2(obj, dbmp, dbm); + val = dbm_fetch(dbm, key); + if (val.dptr) return Qtrue; + return Qfalse; +} + +static VALUE +fdbm_has_value(VALUE obj, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(valstr); + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + if (val.dsize == RSTRING_LEN(valstr) && + memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0) + return Qtrue; + } + return Qfalse; +} + +static VALUE +fdbm_to_a(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize), + rb_tainted_str_new(val.dptr, val.dsize))); + } + + return ary; +} + +static VALUE +fdbm_to_hash(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE hash; + + GetDBM2(obj, dbmp, dbm); + hash = rb_hash_new(); + for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { + val = dbm_fetch(dbm, key); + rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize), + rb_tainted_str_new(val.dptr, val.dsize)); + } + + return hash; +} + +static VALUE +fdbm_reject(VALUE obj) +{ + return rb_hash_delete_if(fdbm_to_hash(obj)); +} + +void +Init_dbm(void) +{ + rb_cDBM = rb_define_class("DBM", rb_cObject); + rb_eDBMError = rb_define_class("DBMError", rb_eStandardError); + rb_include_module(rb_cDBM, rb_mEnumerable); + + rb_define_alloc_func(rb_cDBM, fdbm_alloc); + rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1); + + rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1); + rb_define_method(rb_cDBM, "close", fdbm_close, 0); + rb_define_method(rb_cDBM, "closed?", fdbm_closed, 0); + rb_define_method(rb_cDBM, "[]", fdbm_aref, 1); + rb_define_method(rb_cDBM, "fetch", fdbm_fetch_m, -1); + rb_define_method(rb_cDBM, "[]=", fdbm_store, 2); + rb_define_method(rb_cDBM, "store", fdbm_store, 2); + rb_define_method(rb_cDBM, "index", fdbm_index, 1); + rb_define_method(rb_cDBM, "key", fdbm_key, 1); + rb_define_method(rb_cDBM, "select", fdbm_select, 0); + rb_define_method(rb_cDBM, "values_at", fdbm_values_at, -1); + rb_define_method(rb_cDBM, "length", fdbm_length, 0); + rb_define_method(rb_cDBM, "size", fdbm_length, 0); + rb_define_method(rb_cDBM, "empty?", fdbm_empty_p, 0); + rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0); + rb_define_method(rb_cDBM, "each_value", fdbm_each_value, 0); + rb_define_method(rb_cDBM, "each_key", fdbm_each_key, 0); + rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0); + rb_define_method(rb_cDBM, "keys", fdbm_keys, 0); + rb_define_method(rb_cDBM, "values", fdbm_values, 0); + rb_define_method(rb_cDBM, "shift", fdbm_shift, 0); + rb_define_method(rb_cDBM, "delete", fdbm_delete, 1); + rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0); + rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0); + rb_define_method(rb_cDBM, "reject", fdbm_reject, 0); + rb_define_method(rb_cDBM, "clear", fdbm_clear, 0); + rb_define_method(rb_cDBM,"invert", fdbm_invert, 0); + rb_define_method(rb_cDBM,"update", fdbm_update, 1); + rb_define_method(rb_cDBM,"replace", fdbm_replace, 1); + + rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1); + rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1); + rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1); + rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1); + rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1); + rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1); + + rb_define_method(rb_cDBM, "to_a", fdbm_to_a, 0); + rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0); + + /* flags for dbm_open() */ + rb_define_const(rb_cDBM, "READER", INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT)); + rb_define_const(rb_cDBM, "WRITER", INT2FIX(O_RDWR|RUBY_DBM_RW_BIT)); + rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT)); + rb_define_const(rb_cDBM, "NEWDB", INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT)); + +#ifdef DB_VERSION_STRING + rb_define_const(rb_cDBM, "VERSION", rb_str_new2(DB_VERSION_STRING)); +#else + rb_define_const(rb_cDBM, "VERSION", rb_str_new2("unknown")); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/dbm/depend b/lib/ruby-1.9.1-rc1/ext/dbm/depend new file mode 100644 index 0000000..5fae80b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dbm/depend @@ -0,0 +1 @@ +dbm.o: dbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/dbm/extconf.rb b/lib/ruby-1.9.1-rc1/ext/dbm/extconf.rb new file mode 100644 index 0000000..4d12264 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dbm/extconf.rb @@ -0,0 +1,53 @@ +require 'mkmf' + +dir_config("dbm") + +if dblib = with_config("dbm-type", nil) + dblib = dblib.split(/[ ,]+/) +else + dblib = %w(db db2 db1 dbm gdbm gdbm_compat qdbm) +end + +headers = { + "db" => ["db.h"], + "db1" => ["db1/ndbm.h", "db1.h", "ndbm.h"], + "db2" => ["db2/db.h", "db2.h", "db.h"], + "dbm" => ["ndbm.h"], + "gdbm" => ["gdbm-ndbm.h", "ndbm.h"], + "gdbm_compat" => ["gdbm-ndbm.h", "ndbm.h"], + "qdbm" => ["relic.h"], +} + +def headers.db_check(db) + db_prefix = nil + have_gdbm = false + hsearch = nil + + case db + when /^db2?$/ + db_prefix = "__db_n" + hsearch = "-DDB_DBM_HSEARCH " + when "gdbm" + have_gdbm = true + when "gdbm_compat" + have_gdbm = true + have_library("gdbm") or return false + end + db_prefix ||= "" + + if (have_library(db, db_prefix+"dbm_open") || have_func(db_prefix+"dbm_open")) and + hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, hsearch)} + have_func(db_prefix+"dbm_clearerr") unless have_gdbm + $defs << hsearch if hsearch + $defs << '-DDBM_HDR="<'+hdr+'>"' + true + else + false + end +end + +if dblib.any? {|db| headers.db_check(db)} + have_header("cdefs.h") + have_header("sys/cdefs.h") + create_makefile("dbm") +end diff --git a/lib/ruby-1.9.1-rc1/ext/digest/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/bubblebabble.c b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/bubblebabble.c new file mode 100644 index 0000000..c673a7d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/bubblebabble.c @@ -0,0 +1,142 @@ +/************************************************ + + bubblebabble.c - BubbleBabble encoding support + + $Author: shyouhei $ + created at: Fri Oct 13 18:31:42 JST 2006 + + Copyright (C) 2006 Akinori MUSHA + + $Id: bubblebabble.c 11708 2007-02-12 23:01:19Z shyouhei $ + +************************************************/ + +#include "ruby.h" +#include "digest.h" + +static ID id_digest; + +static VALUE +bubblebabble_str_new(VALUE str_digest) +{ + char *digest; + size_t digest_len; + VALUE str; + char *p; + int i, j, seed = 1; + static const char vowels[] = { + 'a', 'e', 'i', 'o', 'u', 'y' + }; + static const char consonants[] = { + 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm', 'n', + 'p', 'r', 's', 't', 'v', 'z', 'x' + }; + + StringValue(str_digest); + digest = RSTRING_PTR(str_digest); + digest_len = RSTRING_LEN(str_digest); + + if ((LONG_MAX - 2) / 3 < (digest_len | 1)) { + rb_raise(rb_eRuntimeError, "digest string too long"); + } + + str = rb_str_new(0, (digest_len | 1) * 3 + 2); + p = RSTRING_PTR(str); + + i = j = 0; + p[j++] = 'x'; + + for (;;) { + unsigned char byte1, byte2; + + if (i >= digest_len) { + p[j++] = vowels[seed % 6]; + p[j++] = consonants[16]; + p[j++] = vowels[seed / 6]; + break; + } + + byte1 = digest[i++]; + p[j++] = vowels[(((byte1 >> 6) & 3) + seed) % 6]; + p[j++] = consonants[(byte1 >> 2) & 15]; + p[j++] = vowels[((byte1 & 3) + (seed / 6)) % 6]; + + if (i >= digest_len) { + break; + } + + byte2 = digest[i++]; + p[j++] = consonants[(byte2 >> 4) & 15]; + p[j++] = '-'; + p[j++] = consonants[byte2 & 15]; + + seed = (seed * 5 + byte1 * 7 + byte2) % 36; + } + + p[j] = 'x'; + + return str; +} + +/* + * call-seq: + * Digest.bubblebabble(string) -> bubblebabble_string + * + * Returns a BubbleBabble encoded version of a given _string_. + */ +static VALUE +rb_digest_s_bubblebabble(VALUE klass, VALUE str) +{ + return bubblebabble_str_new(str); +} + +/* + * call-seq: + * Digest::Class.bubblebabble(string, ...) -> hash_string + * + * Returns the BubbleBabble encoded hash value of a given _string_. + */ +static VALUE +rb_digest_class_s_bubblebabble(int argc, VALUE *argv, VALUE klass) +{ + return bubblebabble_str_new(rb_funcall2(klass, id_digest, argc, argv)); +} + +/* + * call-seq: + * digest_obj.bubblebabble -> hash_string + * + * Returns the resulting hash value in a Bubblebabble encoded form. + */ +static VALUE +rb_digest_instance_bubblebabble(VALUE self) +{ + return bubblebabble_str_new(rb_funcall(self, id_digest, 0)); +} + +/* + * This module adds some methods to Digest classes to perform + * BubbleBabble encoding. + */ +void +Init_bubblebabble(void) +{ + VALUE mDigest, mDigest_Instance, cDigest_Class; + + rb_require("digest"); + + mDigest = rb_path2class("Digest"); + mDigest_Instance = rb_path2class("Digest::Instance"); + cDigest_Class = rb_path2class("Digest::Class"); + + /* Digest::bubblebabble() */ + rb_define_module_function(mDigest, "bubblebabble", rb_digest_s_bubblebabble, 1); + + /* Digest::Class::bubblebabble() */ + rb_define_singleton_method(cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1); + + /* Digest::Instance#bubblebabble() */ + rb_define_method(mDigest_Instance, "bubblebabble", rb_digest_instance_bubblebabble, 0); + + id_digest = rb_intern("digest"); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/depend b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/depend new file mode 100644 index 0000000..b20148d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/depend @@ -0,0 +1,3 @@ +bubblebabble.o: bubblebabble.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \ + $(srcdir)/../defs.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/extconf.rb new file mode 100644 index 0000000..53cb839 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/bubblebabble/extconf.rb @@ -0,0 +1,6 @@ +require 'mkmf' + +$defs << "-DHAVE_CONFIG_H" +$INCFLAGS << " -I$(srcdir)/.." + +create_makefile('digest/bubblebabble') diff --git a/lib/ruby-1.9.1-rc1/ext/digest/defs.h b/lib/ruby-1.9.1-rc1/ext/digest/defs.h new file mode 100644 index 0000000..d470f95 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/defs.h @@ -0,0 +1,19 @@ +/* -*- C -*- + * $Id: defs.h 15780 2008-03-14 08:04:45Z nobu $ + */ + +#ifndef DEFS_H +#define DEFS_H + +#include "ruby.h" +#include + +#if defined(HAVE_SYS_CDEFS_H) +# include +#endif +#if !defined(__BEGIN_DECLS) +# define __BEGIN_DECLS +# define __END_DECLS +#endif + +#endif /* DEFS_H */ diff --git a/lib/ruby-1.9.1-rc1/ext/digest/depend b/lib/ruby-1.9.1-rc1/ext/digest/depend new file mode 100644 index 0000000..43601a2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/depend @@ -0,0 +1,2 @@ +digest.o: digest.c digest.h $(hdrdir)/ruby.h $(topdir)/config.h \ + $(hdrdir)/defines.h $(hdrdir)/intern.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/digest.c b/lib/ruby-1.9.1-rc1/ext/digest/digest.c new file mode 100644 index 0000000..462b7e1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/digest.c @@ -0,0 +1,642 @@ +/************************************************ + + digest.c - + + $Author: shyouhei $ + created at: Fri May 25 08:57:27 JST 2001 + + Copyright (C) 1995-2001 Yukihiro Matsumoto + Copyright (C) 2001-2006 Akinori MUSHA + + $RoughId: digest.c,v 1.16 2001/07/13 15:38:27 knu Exp $ + $Id: digest.c 17775 2008-07-01 10:36:22Z shyouhei $ + +************************************************/ + +#include "digest.h" + +static VALUE rb_mDigest; +static VALUE rb_mDigest_Instance; +static VALUE rb_cDigest_Class; +static VALUE rb_cDigest_Base; + +static ID id_reset, id_update, id_finish, id_digest, id_hexdigest, id_digest_length; +static ID id_metadata; + +RUBY_EXTERN void Init_digest_base(void); + +/* + * Document-module: Digest + * + * This module provides a framework for message digest libraries. + */ + +static VALUE +hexencode_str_new(VALUE str_digest) +{ + char *digest; + size_t digest_len; + int i; + VALUE str; + char *p; + static const char hex[] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f' + }; + + StringValue(str_digest); + digest = RSTRING_PTR(str_digest); + digest_len = RSTRING_LEN(str_digest); + + if (LONG_MAX / 2 < digest_len) { + rb_raise(rb_eRuntimeError, "digest string too long"); + } + + str = rb_str_new(0, digest_len * 2); + + for (i = 0, p = RSTRING_PTR(str); i < digest_len; i++) { + unsigned char byte = digest[i]; + + p[i + i] = hex[byte >> 4]; + p[i + i + 1] = hex[byte & 0x0f]; + } + + return str; +} + +/* + * call-seq: + * Digest.hexencode(string) -> hexencoded_string + * + * Generates a hex-encoded version of a given _string_. + */ +static VALUE +rb_digest_s_hexencode(VALUE klass, VALUE str) +{ + return hexencode_str_new(str); +} + +/* + * Document-module: Digest::Instance + * + * This module provides instance methods for a digest implementation + * object to calculate message digest values. + */ + +/* + * call-seq: + * digest_obj.update(string) -> digest_obj + * digest_obj << string -> digest_obj + * + * Updates the digest using a given _string_ and returns self. + * + * The update() method and the left-shift operator are overridden by + * each implementation subclass. (One should be an alias for the + * other) + */ +static VALUE +rb_digest_instance_update(VALUE self, VALUE str) +{ + rb_raise(rb_eRuntimeError, "%s does not implement update()", RSTRING_PTR(rb_inspect(self))); +} + +/* + * call-seq: + * digest_obj.instance_eval { finish } -> digest_obj + * + * Finishes the digest and returns the resulting hash value. + * + * This method is overridden by each implementation subclass and often + * made private, because some of those subclasses may leave internal + * data uninitialized. Do not call this method from outside. Use + * #digest!() instead, which ensures that internal data be reset for + * security reasons. + */ +static VALUE +rb_digest_instance_finish(VALUE self) +{ + rb_raise(rb_eRuntimeError, "%s does not implement finish()", RSTRING_PTR(rb_inspect(self))); +} + +/* + * call-seq: + * digest_obj.reset -> digest_obj + * + * Resets the digest to the initial state and returns self. + * + * This method is overridden by each implementation subclass. + */ +static VALUE +rb_digest_instance_reset(VALUE self) +{ + rb_raise(rb_eRuntimeError, "%s does not implement reset()", RSTRING_PTR(rb_inspect(self))); +} + +/* + * call-seq: + * digest_obj.new -> another_digest_obj + * + * Returns a new, initialized copy of the digest object. Equivalent + * to digest_obj.clone().reset(). + */ +static VALUE +rb_digest_instance_new(VALUE self) +{ + VALUE clone = rb_obj_clone(self); + rb_funcall(clone, id_reset, 0); + return clone; +} + +/* + * call-seq: + * digest_obj.digest -> string + * digest_obj.digest(string) -> string + * + * If none is given, returns the resulting hash value of the digest, + * keeping the digest's state. + * + * If a _string_ is given, returns the hash value for the given + * _string_, resetting the digest to the initial state before and + * after the process. + */ +static VALUE +rb_digest_instance_digest(int argc, VALUE *argv, VALUE self) +{ + VALUE str, value; + + if (rb_scan_args(argc, argv, "01", &str) > 0) { + rb_funcall(self, id_reset, 0); + rb_funcall(self, id_update, 1, str); + value = rb_funcall(self, id_finish, 0); + rb_funcall(self, id_reset, 0); + } else { + VALUE clone = rb_obj_clone(self); + + value = rb_funcall(clone, id_finish, 0); + rb_funcall(clone, id_reset, 0); + } + + return value; +} + +/* + * call-seq: + * digest_obj.digest! -> string + * + * Returns the resulting hash value and resets the digest to the + * initial state. + */ +static VALUE +rb_digest_instance_digest_bang(VALUE self) +{ + VALUE value = rb_funcall(self, id_finish, 0); + rb_funcall(self, id_reset, 0); + + return value; +} + +/* + * call-seq: + * digest_obj.hexdigest -> string + * digest_obj.hexdigest(string) -> string + * + * If none is given, returns the resulting hash value of the digest in + * a hex-encoded form, keeping the digest's state. + * + * If a _string_ is given, returns the hash value for the given + * _string_ in a hex-encoded form, resetting the digest to the initial + * state before and after the process. + */ +static VALUE +rb_digest_instance_hexdigest(int argc, VALUE *argv, VALUE self) +{ + VALUE str, value; + + if (rb_scan_args(argc, argv, "01", &str) > 0) { + rb_funcall(self, id_reset, 0); + rb_funcall(self, id_update, 1, str); + value = rb_funcall(self, id_finish, 0); + rb_funcall(self, id_reset, 0); + } else { + VALUE clone = rb_obj_clone(self); + + value = rb_funcall(clone, id_finish, 0); + rb_funcall(clone, id_reset, 0); + } + + return hexencode_str_new(value); +} + +/* + * call-seq: + * digest_obj.hexdigest! -> string + * + * Returns the resulting hash value and resets the digest to the + * initial state. + */ +static VALUE +rb_digest_instance_hexdigest_bang(VALUE self) +{ + VALUE value = rb_funcall(self, id_finish, 0); + rb_funcall(self, id_reset, 0); + + return hexencode_str_new(value); +} + +/* + * call-seq: + * digest_obj.to_s -> string + * + * Returns digest_obj.hexdigest(). + */ +static VALUE +rb_digest_instance_to_s(VALUE self) +{ + return rb_funcall(self, id_hexdigest, 0); +} + +/* + * call-seq: + * digest_obj.inspect -> string + * + * Creates a printable version of the digest object. + */ +static VALUE +rb_digest_instance_inspect(VALUE self) +{ + VALUE str; + size_t digest_len = 32; /* about this size at least */ + const char *cname; + + cname = rb_obj_classname(self); + + /* # */ + str = rb_str_buf_new(2 + strlen(cname) + 2 + digest_len * 2 + 1); + rb_str_buf_cat2(str, "#<"); + rb_str_buf_cat2(str, cname); + rb_str_buf_cat2(str, ": "); + rb_str_buf_append(str, rb_digest_instance_hexdigest(0, 0, self)); + rb_str_buf_cat2(str, ">"); + return str; +} + +/* + * call-seq: + * digest_obj == another_digest_obj -> boolean + * digest_obj == string -> boolean + * + * If a string is given, checks whether it is equal to the hex-encoded + * hash value of the digest object. If another digest instance is + * given, checks whether they have the same hash value. Otherwise + * returns false. + */ +static VALUE +rb_digest_instance_equal(VALUE self, VALUE other) +{ + VALUE str1, str2; + + if (rb_obj_is_kind_of(other, rb_mDigest_Instance) == Qtrue) { + str1 = rb_digest_instance_digest(0, 0, self); + str2 = rb_digest_instance_digest(0, 0, other); + } else { + str1 = rb_digest_instance_to_s(self); + str2 = other; + } + + /* never blindly assume that subclass methods return strings */ + StringValue(str1); + StringValue(str2); + + if (RSTRING_LEN(str1) == RSTRING_LEN(str2) && + rb_str_cmp(str1, str2) == 0) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * digest_obj.digest_length -> integer + * + * Returns the length of the hash value of the digest. + * + * This method should be overridden by each implementation subclass. + * If not, digest_obj.digest().length() is returned. + */ +static VALUE +rb_digest_instance_digest_length(VALUE self) +{ + /* subclasses really should redefine this method */ + VALUE digest = rb_digest_instance_digest(0, 0, self); + + /* never blindly assume that #digest() returns a string */ + StringValue(digest); + return INT2NUM(RSTRING_LEN(digest)); +} + +/* + * call-seq: + * digest_obj.length -> integer + * digest_obj.size -> integer + * + * Returns digest_obj.digest_length(). + */ +static VALUE +rb_digest_instance_length(VALUE self) +{ + return rb_funcall(self, id_digest_length, 0); +} + +/* + * call-seq: + * digest_obj.block_length -> integer + * + * Returns the block length of the digest. + * + * This method is overridden by each implementation subclass. + */ +static VALUE +rb_digest_instance_block_length(VALUE self) +{ + rb_raise(rb_eRuntimeError, "%s does not implement block_length()", RSTRING_PTR(rb_inspect(self))); +} + +/* + * Document-class: Digest::Class + * + * This module stands as a base class for digest implementation + * classes. + */ + +/* + * call-seq: + * Digest::Class.digest(string, *parameters) -> hash_string + * + * Returns the hash value of a given _string_. This is equivalent to + * Digest::Class.new(*parameters).digest(string), where extra + * _parameters_, if any, are passed through to the constructor and the + * _string_ is passed to #digest(). + */ +static VALUE +rb_digest_class_s_digest(int argc, VALUE *argv, VALUE klass) +{ + VALUE str; + volatile VALUE obj; + + if (argc < 1) { + rb_raise(rb_eArgError, "no data given"); + } + + str = *argv++; + argc--; + + StringValue(str); + + obj = rb_obj_alloc(klass); + rb_obj_call_init(obj, argc, argv); + + return rb_funcall(obj, id_digest, 1, str); +} + +/* + * call-seq: + * Digest::Class.hexdigest(string[, ...]) -> hash_string + * + * Returns the hex-encoded hash value of a given _string_. This is + * almost equivalent to + * Digest.hexencode(Digest::Class.new(*parameters).digest(string)). + */ +static VALUE +rb_digest_class_s_hexdigest(int argc, VALUE *argv, VALUE klass) +{ + return hexencode_str_new(rb_funcall2(klass, id_digest, argc, argv)); +} + +/* + * Document-class: Digest::Base + * + * This abstract class provides a common interface to message digest + * implementation classes written in C. + */ + +static rb_digest_metadata_t * +get_digest_base_metadata(VALUE klass) +{ + VALUE p; + VALUE obj; + rb_digest_metadata_t *algo; + + for (p = klass; p; p = RCLASS_SUPER(p)) { + if (rb_ivar_defined(p, id_metadata)) { + obj = rb_ivar_get(p, id_metadata); + break; + } + } + + if (!p) + rb_raise(rb_eRuntimeError, "Digest::Base cannot be directly inherited in Ruby"); + + Data_Get_Struct(obj, rb_digest_metadata_t, algo); + + switch (algo->api_version) { + case 2: + break; + + /* + * put conversion here if possible when API is updated + */ + + default: + rb_raise(rb_eRuntimeError, "Incompatible digest API version"); + } + + return algo; +} + +static VALUE +rb_digest_base_alloc(VALUE klass) +{ + rb_digest_metadata_t *algo; + VALUE obj; + void *pctx; + + if (klass == rb_cDigest_Base) { + rb_raise(rb_eNotImpError, "Digest::Base is an abstract class"); + } + + algo = get_digest_base_metadata(klass); + + pctx = xmalloc(algo->ctx_size); + algo->init_func(pctx); + + obj = Data_Wrap_Struct(klass, 0, xfree, pctx); + + return obj; +} + +/* :nodoc: */ +static VALUE +rb_digest_base_copy(VALUE copy, VALUE obj) +{ + rb_digest_metadata_t *algo; + void *pctx1, *pctx2; + + if (copy == obj) return copy; + + rb_check_frozen(copy); + + algo = get_digest_base_metadata(rb_obj_class(copy)); + + Data_Get_Struct(obj, void, pctx1); + Data_Get_Struct(copy, void, pctx2); + memcpy(pctx2, pctx1, algo->ctx_size); + + return copy; +} + +/* :nodoc: */ +static VALUE +rb_digest_base_reset(VALUE self) +{ + rb_digest_metadata_t *algo; + void *pctx; + + algo = get_digest_base_metadata(rb_obj_class(self)); + + Data_Get_Struct(self, void, pctx); + + algo->init_func(pctx); + + return self; +} + +/* :nodoc: */ +static VALUE +rb_digest_base_update(VALUE self, VALUE str) +{ + rb_digest_metadata_t *algo; + void *pctx; + + algo = get_digest_base_metadata(rb_obj_class(self)); + + Data_Get_Struct(self, void, pctx); + + StringValue(str); + algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str)); + + return self; +} + +/* :nodoc: */ +static VALUE +rb_digest_base_finish(VALUE self) +{ + rb_digest_metadata_t *algo; + void *pctx; + VALUE str; + + algo = get_digest_base_metadata(rb_obj_class(self)); + + Data_Get_Struct(self, void, pctx); + + str = rb_str_new(0, algo->digest_len); + algo->finish_func(pctx, (unsigned char *)RSTRING_PTR(str)); + + /* avoid potential coredump caused by use of a finished context */ + algo->init_func(pctx); + + return str; +} + +/* :nodoc: */ +static VALUE +rb_digest_base_digest_length(VALUE self) +{ + rb_digest_metadata_t *algo; + + algo = get_digest_base_metadata(rb_obj_class(self)); + + return INT2NUM(algo->digest_len); +} + +/* :nodoc: */ +static VALUE +rb_digest_base_block_length(VALUE self) +{ + rb_digest_metadata_t *algo; + + algo = get_digest_base_metadata(rb_obj_class(self)); + + return INT2NUM(algo->block_len); +} + +void +Init_digest(void) +{ + id_reset = rb_intern("reset"); + id_update = rb_intern("update"); + id_finish = rb_intern("finish"); + id_digest = rb_intern("digest"); + id_hexdigest = rb_intern("hexdigest"); + id_digest_length = rb_intern("digest_length"); + + /* + * module Digest + */ + rb_mDigest = rb_define_module("Digest"); + + /* module functions */ + rb_define_module_function(rb_mDigest, "hexencode", rb_digest_s_hexencode, 1); + + /* + * module Digest::Instance + */ + rb_mDigest_Instance = rb_define_module_under(rb_mDigest, "Instance"); + + /* instance methods that should be overridden */ + rb_define_method(rb_mDigest_Instance, "update", rb_digest_instance_update, 1); + rb_define_method(rb_mDigest_Instance, "<<", rb_digest_instance_update, 1); + rb_define_private_method(rb_mDigest_Instance, "finish", rb_digest_instance_finish, 0); + rb_define_method(rb_mDigest_Instance, "reset", rb_digest_instance_reset, 0); + rb_define_method(rb_mDigest_Instance, "digest_length", rb_digest_instance_digest_length, 0); + rb_define_method(rb_mDigest_Instance, "block_length", rb_digest_instance_block_length, 0); + + /* instance methods that may be overridden */ + rb_define_method(rb_mDigest_Instance, "==", rb_digest_instance_equal, 1); + rb_define_method(rb_mDigest_Instance, "inspect", rb_digest_instance_inspect, 0); + + /* instance methods that need not usually be overridden */ + rb_define_method(rb_mDigest_Instance, "new", rb_digest_instance_new, 0); + rb_define_method(rb_mDigest_Instance, "digest", rb_digest_instance_digest, -1); + rb_define_method(rb_mDigest_Instance, "digest!", rb_digest_instance_digest_bang, 0); + rb_define_method(rb_mDigest_Instance, "hexdigest", rb_digest_instance_hexdigest, -1); + rb_define_method(rb_mDigest_Instance, "hexdigest!", rb_digest_instance_hexdigest_bang, 0); + rb_define_method(rb_mDigest_Instance, "to_s", rb_digest_instance_to_s, 0); + rb_define_method(rb_mDigest_Instance, "length", rb_digest_instance_length, 0); + rb_define_method(rb_mDigest_Instance, "size", rb_digest_instance_length, 0); + + /* + * class Digest::Class + */ + rb_cDigest_Class = rb_define_class_under(rb_mDigest, "Class", rb_cObject); + rb_include_module(rb_cDigest_Class, rb_mDigest_Instance); + + /* class methods */ + rb_define_singleton_method(rb_cDigest_Class, "digest", rb_digest_class_s_digest, -1); + rb_define_singleton_method(rb_cDigest_Class, "hexdigest", rb_digest_class_s_hexdigest, -1); + + id_metadata = rb_intern("metadata"); + + /* class Digest::Base < Digest::Class */ + rb_cDigest_Base = rb_define_class_under(rb_mDigest, "Base", rb_cDigest_Class); + + rb_define_alloc_func(rb_cDigest_Base, rb_digest_base_alloc); + + rb_define_method(rb_cDigest_Base, "initialize_copy", rb_digest_base_copy, 1); + rb_define_method(rb_cDigest_Base, "reset", rb_digest_base_reset, 0); + rb_define_method(rb_cDigest_Base, "update", rb_digest_base_update, 1); + rb_define_method(rb_cDigest_Base, "<<", rb_digest_base_update, 1); + rb_define_private_method(rb_cDigest_Base, "finish", rb_digest_base_finish, 0); + rb_define_method(rb_cDigest_Base, "digest_length", rb_digest_base_digest_length, 0); + rb_define_method(rb_cDigest_Base, "block_length", rb_digest_base_block_length, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/digest.h b/lib/ruby-1.9.1-rc1/ext/digest/digest.h new file mode 100644 index 0000000..a108588 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/digest.h @@ -0,0 +1,32 @@ +/************************************************ + + digest.h - header file for ruby digest modules + + $Author: shyouhei $ + created at: Fri May 25 08:54:56 JST 2001 + + + Copyright (C) 2001-2006 Akinori MUSHA + + $RoughId: digest.h,v 1.3 2001/07/13 15:38:27 knu Exp $ + $Id: digest.h 11708 2007-02-12 23:01:19Z shyouhei $ + +************************************************/ + +#include "ruby.h" + +#define RUBY_DIGEST_API_VERSION 2 + +typedef void (*rb_digest_hash_init_func_t)(void *); +typedef void (*rb_digest_hash_update_func_t)(void *, unsigned char *, size_t); +typedef void (*rb_digest_hash_finish_func_t)(void *, unsigned char *); + +typedef struct { + int api_version; + size_t digest_len; + size_t block_len; + size_t ctx_size; + rb_digest_hash_init_func_t init_func; + rb_digest_hash_update_func_t update_func; + rb_digest_hash_finish_func_t finish_func; +} rb_digest_metadata_t; diff --git a/lib/ruby-1.9.1-rc1/ext/digest/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/extconf.rb new file mode 100644 index 0000000..72ceac3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/extconf.rb @@ -0,0 +1,10 @@ +# $RoughId: extconf.rb,v 1.6 2001/07/13 15:38:27 knu Exp $ +# $Id: extconf.rb 12501 2007-06-10 03:06:15Z nobu $ + +require "mkmf" + +$INSTALLFILES = { + "digest.h" => "$(HDRDIR)" +} + +create_makefile("digest") diff --git a/lib/ruby-1.9.1-rc1/ext/digest/lib/digest.rb b/lib/ruby-1.9.1-rc1/ext/digest/lib/digest.rb new file mode 100644 index 0000000..0c4ee3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/lib/digest.rb @@ -0,0 +1,50 @@ +require 'digest.so' + +module Digest + def self.const_missing(name) + case name + when :SHA256, :SHA384, :SHA512 + lib = 'digest/sha2.so' + else + lib = File.join('digest', name.to_s.downcase) + end + + begin + require lib + rescue LoadError => e + raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1) + end + unless Digest.const_defined?(name) + raise NameError, "uninitialized constant Digest::#{name}", caller(1) + end + Digest.const_get(name) + end + + class ::Digest::Class + # creates a digest object and reads a given file, _name_. + # + # p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest + # # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534" + def self.file(name) + new.file(name) + end + end + + module Instance + # updates the digest with the contents of a given file _name_ and + # returns self. + def file(name) + File.open(name, "rb") {|f| + buf = "" + while f.read(16384, buf) + update buf + end + } + self + end + end +end + +def Digest(name) + Digest.const_get(name) +end diff --git a/lib/ruby-1.9.1-rc1/ext/digest/lib/digest/hmac.rb b/lib/ruby-1.9.1-rc1/ext/digest/lib/digest/hmac.rb new file mode 100644 index 0000000..e88a335 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/lib/digest/hmac.rb @@ -0,0 +1,274 @@ +# = digest/hmac.rb +# +# An implementation of HMAC keyed-hashing algorithm +# +# == Overview +# +# This library adds a method named hmac() to Digest classes, which +# creates a Digest class for calculating HMAC digests. +# +# == Examples +# +# require 'digest/hmac' +# +# # one-liner example +# puts Digest::HMAC.hexdigest("data", "hash key", Digest::SHA1) +# +# # rather longer one +# hmac = Digest::HMAC.new("foo", Digest::RMD160) +# +# buf = "" +# while stream.read(16384, buf) +# hmac.update(buf) +# end +# +# puts hmac.bubblebabble +# +# == License +# +# Copyright (c) 2006 Akinori MUSHA +# +# Documentation by Akinori MUSHA +# +# All rights reserved. You can redistribute and/or modify it under +# the same terms as Ruby. +# +# $Id: hmac.rb 14881 2008-01-04 07:26:14Z akr $ +# + +require 'digest' + +module Digest + class HMAC < Digest::Class + def initialize(key, digester) + @md = digester.new + + block_len = @md.block_length + + if key.bytesize > block_len + key = @md.digest(key) + end + + ipad = Array.new(block_len).fill(0x36) + opad = Array.new(block_len).fill(0x5c) + + key.bytes.each_with_index { |c, i| + ipad[i] ^= c + opad[i] ^= c + } + + @key = key.freeze + @ipad = ipad.inject('') { |s, c| s << c.chr }.freeze + @opad = opad.inject('') { |s, c| s << c.chr }.freeze + @md.update(@ipad) + end + + def initialize_copy(other) + @md = other.instance_eval { @md.clone } + end + + def update(text) + @md.update(text) + self + end + alias << update + + def reset + @md.reset + @md.update(@ipad) + self + end + + def finish + d = @md.digest! + @md.update(@opad) + @md.update(d) + @md.digest! + end + private :finish + + def digest_length + @md.digest_length + end + + def block_length + @md.block_length + end + + def inspect + sprintf('#<%s: key=%s, digest=%s>', self.class.name, @key.inspect, @md.inspect.sub(/^\#<(.*)>$/) { $1 }); + end + end +end + +if $0 == __FILE__ + eval DATA.read, nil, $0, __LINE__+4 +end + +__END__ + +require 'test/unit' + +module TM_HMAC + def test_s_hexdigest + cases.each { |h| + digesters.each { |d| + assert_equal(h[:hexdigest], Digest::HMAC.hexdigest(h[:data], h[:key], d)) + } + } + end + + def test_hexdigest + cases.each { |h| + digesters.each { |d| + hmac = Digest::HMAC.new(h[:key], d) + + hmac.update(h[:data]) + + assert_equal(h[:hexdigest], hmac.hexdigest) + } + } + end + + def test_reset + cases.each { |h| + digesters.each { |d| + hmac = Digest::HMAC.new(h[:key], d) + hmac.update("test") + hmac.reset + hmac.update(h[:data]) + + assert_equal(h[:hexdigest], hmac.hexdigest) + } + } + end +end + +class TC_HMAC_MD5 < Test::Unit::TestCase + include TM_HMAC + + def digesters + [Digest::MD5, Digest::MD5.new] + end + + # Taken from RFC 2202: Test Cases for HMAC-MD5 and HMAC-SHA-1 + def cases + [ + { + :key => "\x0b" * 16, + :data => "Hi There", + :hexdigest => "9294727a3638bb1c13f48ef8158bfc9d", + }, { + :key => "Jefe", + :data => "what do ya want for nothing?", + :hexdigest => "750c783e6ab0b503eaa86e310a5db738", + }, { + :key => "\xaa" * 16, + :data => "\xdd" * 50, + :hexdigest => "56be34521d144c88dbb8c733f0e8b3f6", + }, { + :key => "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", + :data => "\xcd" * 50, + :hexdigest => "697eaf0aca3a3aea3a75164746ffaa79", + }, { + :key => "\x0c" * 16, + :data => "Test With Truncation", + :hexdigest => "56461ef2342edc00f9bab995690efd4c", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key - Hash Key First", + :hexdigest => "6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", + :hexdigest => "6f630fad67cda0ee1fb1f562db3aa53e", + } + ] + end +end + +class TC_HMAC_SHA1 < Test::Unit::TestCase + include TM_HMAC + + def digesters + [Digest::SHA1, Digest::SHA1.new] + end + + # Taken from RFC 2202: Test Cases for HMAC-MD5 and HMAC-SHA-1 + def cases + [ + { + :key => "\x0b" * 20, + :data => "Hi There", + :hexdigest => "b617318655057264e28bc0b6fb378c8ef146be00", + }, { + :key => "Jefe", + :data => "what do ya want for nothing?", + :hexdigest => "effcdf6ae5eb2fa2d27416d5f184df9c259a7c79", + }, { + :key => "\xaa" * 20, + :data => "\xdd" * 50, + :hexdigest => "125d7342b9ac11cd91a39af48aa17b4f63f175d3", + }, { + :key => "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", + :data => "\xcd" * 50, + :hexdigest => "4c9007f4026250c6bc8414f9bf50c86c2d7235da", + }, { + :key => "\x0c" * 20, + :data => "Test With Truncation", + :hexdigest => "4c1a03424b55e07fe7f27be1d58bb9324a9a5a04", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key - Hash Key First", + :hexdigest => "aa4ae5e15272d00e95705637ce8a3b55ed402112", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", + :hexdigest => "e8e99d0f45237d786d6bbaa7965c7808bbff1a91", + } + ] + end +end + +class TC_HMAC_RMD160 < Test::Unit::TestCase + include TM_HMAC + + def digesters + [Digest::RMD160, Digest::RMD160.new] + end + + # Taken from RFC 2286: Test Cases for HMAC-RIPEMD160 and HMAC-RIPEMD128 + def cases + [ + { + :key => "\x0b" * 20, + :data => "Hi There", + :hexdigest => "24cb4bd67d20fc1a5d2ed7732dcc39377f0a5668", + }, { + :key => "Jefe", + :data => "what do ya want for nothing?", + :hexdigest => "dda6c0213a485a9e24f4742064a7f033b43c4069", + }, { + :key => "\xaa" * 20, + :data => "\xdd" * 50, + :hexdigest => "b0b105360de759960ab4f35298e116e295d8e7c1", + }, { + :key => "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", + :data => "\xcd" * 50, + :hexdigest => "d5ca862f4d21d5e610e18b4cf1beb97a4365ecf4", + }, { + :key => "\x0c" * 20, + :data => "Test With Truncation", + :hexdigest => "7619693978f91d90539ae786500ff3d8e0518e39", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key - Hash Key First", + :hexdigest => "6466ca07ac5eac29e1bd523e5ada7605b791fd8b", + }, { + :key => "\xaa" * 80, + :data => "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", + :hexdigest => "69ea60798d71616cce5fd0871e23754cd75d5a0a", + } + ] + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/md5/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/depend b/lib/ruby-1.9.1-rc1/ext/digest/md5/depend new file mode 100644 index 0000000..8eaec20 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/depend @@ -0,0 +1,6 @@ +md5.o: md5.c md5.h $(srcdir)/../defs.h $(hdrdir)/ruby.h $(topdir)/config.h \ + $(hdrdir)/defines.h $(hdrdir)/intern.h +md5init.o: md5init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h md5.h \ + $(srcdir)/../defs.h +md5ossl.o: md5ossl.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/md5/extconf.rb new file mode 100644 index 0000000..8a113f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/extconf.rb @@ -0,0 +1,29 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id: extconf.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require "mkmf" + +$defs << "-DHAVE_CONFIG_H" +$INCFLAGS << " -I$(srcdir)/.." + +$objs = [ "md5init.#{$OBJEXT}" ] + +dir_config("openssl") + +if !with_config("bundled-md5") && + have_library("crypto") && have_header("openssl/md5.h") + $objs << "md5ossl.#{$OBJEXT}" + +else + $objs << "md5.#{$OBJEXT}" +end + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +$preload = %w[digest] + +create_makefile("digest/md5") diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.c b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.c new file mode 100644 index 0000000..c637874 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.c @@ -0,0 +1,422 @@ +/* + Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ + +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321. + It is derived directly from the text of the RFC and not from the + reference implementation. + + The original and principal author of md5.c is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 2000-07-03 lpd Patched to eliminate warnings about "constant is + unsigned in ANSI C, signed in traditional"; + made test program self-checking. + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). + 1999-05-03 lpd Original version. + */ + +/* + This code was modified for use in Ruby. + + - Akinori MUSHA + */ + +/*$OrigId: md5c.c,v 1.2 2001/03/26 08:57:14 matz Exp $ */ +/*$RoughId: md5.c,v 1.2 2001/07/13 19:48:41 knu Exp $ */ +/*$Id: md5.c 18459 2008-08-09 23:15:08Z nobu $ */ + +#include "md5.h" + +#ifdef TEST +/* + * Compile with -DTEST to create a self-contained executable test program. + * The test program should print out the same values as given in section + * A.5 of RFC 1321, reproduced below. + */ +#include +int +main() +{ + static const char *const test[7*2] = { + "", "d41d8cd98f00b204e9800998ecf8427e", + "a", "0cc175b9c0f1b6a831c399e269772661", + "abc", "900150983cd24fb0d6963f7d28e17f72", + "message digest", "f96b697d7cb7938d525a2f31aaf161d0", + "abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "d174ab98d277d9f5a5611c2c9f419d9f", + "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a" + }; + int i; + + for (i = 0; i < 7*2; i += 2) { + MD5_CTX state; + uint8_t digest[16]; + char hex_output[16*2 + 1]; + int di; + + MD5_Init(&state); + MD5_Update(&state, (const uint8_t *)test[i], strlen(test[i])); + MD5_Final(digest, &state); + printf("MD5 (\"%s\") = ", test[i]); + for (di = 0; di < 16; ++di) + sprintf(hex_output + di * 2, "%02x", digest[di]); + puts(hex_output); + if (strcmp(hex_output, test[i + 1])) + printf("**** ERROR, should be: %s\n", test[i + 1]); + } + return 0; +} +#endif /* TEST */ + + +/* + * For reference, here is the program that computed the T values. + */ +#ifdef COMPUTE_T_VALUES +#include +int +main() +{ + int i; + for (i = 1; i <= 64; ++i) { + unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i))); + + /* + * The following nonsense is only to avoid compiler warnings about + * "integer constant is unsigned in ANSI C, signed with -traditional". + */ + if (v >> 31) { + printf("#define T%d /* 0x%08lx */ (T_MASK ^ 0x%08lx)\n", i, + v, (unsigned long)(unsigned int)(~v)); + } else { + printf("#define T%d 0x%08lx\n", i, v); + } + } + return 0; +} +#endif /* COMPUTE_T_VALUES */ +/* + * End of T computation program. + */ +#ifdef T_MASK +#undef T_MASK +#endif +#define T_MASK ((uint32_t)~0) +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) +#define T3 0x242070db +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) +#define T6 0x4787c62a +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) +#define T9 0x698098d8 +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) +#define T13 0x6b901122 +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) +#define T16 0x49b40821 +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) +#define T19 0x265e5a51 +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) +#define T22 0x02441453 +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) +#define T25 0x21e1cde6 +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) +#define T28 0x455a14ed +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) +#define T31 0x676f02d9 +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) +#define T35 0x6d9d6122 +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) +#define T38 0x4bdecfa9 +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) +#define T41 0x289b7ec6 +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) +#define T44 0x04881d05 +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) +#define T47 0x1fa27cf8 +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) +#define T50 0x432aff97 +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) +#define T53 0x655b59c3 +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) +#define T57 0x6fa87e4f +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) +#define T60 0x4e0811a1 +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) +#define T63 0x2ad7d2bb +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) + + +static void +md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/) +{ + uint32_t + a = pms->state[0], b = pms->state[1], + c = pms->state[2], d = pms->state[3]; + uint32_t t; + +#ifdef WORDS_BIGENDIAN + + /* + * On big-endian machines, we must arrange the bytes in the right + * order. (This also works on machines of unknown byte order.) + */ + uint32_t X[16]; + const uint8_t *xp = data; + int i; + + for (i = 0; i < 16; ++i, xp += 4) + X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); + +#else + + /* + * On little-endian machines, we can process properly aligned data + * without copying it. + */ + uint32_t xbuf[16]; + const uint32_t *X; + + if (!((data - (const uint8_t *)0) & 3)) { + /* data are properly aligned */ + X = (const uint32_t *)data; + } else { + /* not aligned */ + memcpy(xbuf, data, 64); + X = xbuf; + } +#endif + +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) + + /* Round 1. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ +#define F(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + F(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 7, T1); + SET(d, a, b, c, 1, 12, T2); + SET(c, d, a, b, 2, 17, T3); + SET(b, c, d, a, 3, 22, T4); + SET(a, b, c, d, 4, 7, T5); + SET(d, a, b, c, 5, 12, T6); + SET(c, d, a, b, 6, 17, T7); + SET(b, c, d, a, 7, 22, T8); + SET(a, b, c, d, 8, 7, T9); + SET(d, a, b, c, 9, 12, T10); + SET(c, d, a, b, 10, 17, T11); + SET(b, c, d, a, 11, 22, T12); + SET(a, b, c, d, 12, 7, T13); + SET(d, a, b, c, 13, 12, T14); + SET(c, d, a, b, 14, 17, T15); + SET(b, c, d, a, 15, 22, T16); +#undef SET + + /* Round 2. */ + /* Let [abcd k s i] denote the operation + a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + G(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 1, 5, T17); + SET(d, a, b, c, 6, 9, T18); + SET(c, d, a, b, 11, 14, T19); + SET(b, c, d, a, 0, 20, T20); + SET(a, b, c, d, 5, 5, T21); + SET(d, a, b, c, 10, 9, T22); + SET(c, d, a, b, 15, 14, T23); + SET(b, c, d, a, 4, 20, T24); + SET(a, b, c, d, 9, 5, T25); + SET(d, a, b, c, 14, 9, T26); + SET(c, d, a, b, 3, 14, T27); + SET(b, c, d, a, 8, 20, T28); + SET(a, b, c, d, 13, 5, T29); + SET(d, a, b, c, 2, 9, T30); + SET(c, d, a, b, 7, 14, T31); + SET(b, c, d, a, 12, 20, T32); +#undef SET + + /* Round 3. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + H(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 5, 4, T33); + SET(d, a, b, c, 8, 11, T34); + SET(c, d, a, b, 11, 16, T35); + SET(b, c, d, a, 14, 23, T36); + SET(a, b, c, d, 1, 4, T37); + SET(d, a, b, c, 4, 11, T38); + SET(c, d, a, b, 7, 16, T39); + SET(b, c, d, a, 10, 23, T40); + SET(a, b, c, d, 13, 4, T41); + SET(d, a, b, c, 0, 11, T42); + SET(c, d, a, b, 3, 16, T43); + SET(b, c, d, a, 6, 23, T44); + SET(a, b, c, d, 9, 4, T45); + SET(d, a, b, c, 12, 11, T46); + SET(c, d, a, b, 15, 16, T47); + SET(b, c, d, a, 2, 23, T48); +#undef SET + + /* Round 4. */ + /* Let [abcd k s t] denote the operation + a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ +#define I(x, y, z) ((y) ^ ((x) | ~(z))) +#define SET(a, b, c, d, k, s, Ti)\ + t = a + I(b,c,d) + X[k] + Ti;\ + a = ROTATE_LEFT(t, s) + b + /* Do the following 16 operations. */ + SET(a, b, c, d, 0, 6, T49); + SET(d, a, b, c, 7, 10, T50); + SET(c, d, a, b, 14, 15, T51); + SET(b, c, d, a, 5, 21, T52); + SET(a, b, c, d, 12, 6, T53); + SET(d, a, b, c, 3, 10, T54); + SET(c, d, a, b, 10, 15, T55); + SET(b, c, d, a, 1, 21, T56); + SET(a, b, c, d, 8, 6, T57); + SET(d, a, b, c, 15, 10, T58); + SET(c, d, a, b, 6, 15, T59); + SET(b, c, d, a, 13, 21, T60); + SET(a, b, c, d, 4, 6, T61); + SET(d, a, b, c, 11, 10, T62); + SET(c, d, a, b, 2, 15, T63); + SET(b, c, d, a, 9, 21, T64); +#undef SET + + /* Then perform the following additions. (That is increment each + of the four registers by the value it had before this block + was started.) */ + pms->state[0] += a; + pms->state[1] += b; + pms->state[2] += c; + pms->state[3] += d; +} + +void +MD5_Init(MD5_CTX *pms) +{ + pms->count[0] = pms->count[1] = 0; + pms->state[0] = 0x67452301; + pms->state[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; + pms->state[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; + pms->state[3] = 0x10325476; +} + +void +MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes) +{ + const uint8_t *p = data; + size_t left = nbytes; + size_t offset = (pms->count[0] >> 3) & 63; + uint32_t nbits = (uint32_t)(nbytes << 3); + + if (nbytes <= 0) + return; + + /* Update the message length. */ + pms->count[1] += nbytes >> 29; + pms->count[0] += nbits; + if (pms->count[0] < nbits) + pms->count[1]++; + + /* Process an initial partial block. */ + if (offset) { + size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes); + + memcpy(pms->buffer + offset, p, copy); + if (offset + copy < 64) + return; + p += copy; + left -= copy; + md5_process(pms, pms->buffer); + } + + /* Process full blocks. */ + for (; left >= 64; p += 64, left -= 64) + md5_process(pms, p); + + /* Process a final partial block. */ + if (left) + memcpy(pms->buffer, p, left); +} + +void +MD5_Finish(MD5_CTX *pms, uint8_t *digest) +{ + static const uint8_t pad[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + uint8_t data[8]; + size_t i; + + /* Save the length before padding. */ + for (i = 0; i < 8; ++i) + data[i] = (uint8_t)(pms->count[i >> 2] >> ((i & 3) << 3)); + /* Pad to 56 bytes mod 64. */ + MD5_Update(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); + /* Append the length. */ + MD5_Update(pms, data, 8); + for (i = 0; i < 16; ++i) + digest[i] = (uint8_t)(pms->state[i >> 2] >> ((i & 3) << 3)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.h b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.h new file mode 100644 index 0000000..053a572 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5.h @@ -0,0 +1,80 @@ +/* + Copyright (C) 1999 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ +/* + Independent implementation of MD5 (RFC 1321). + + This code implements the MD5 Algorithm defined in RFC 1321. + It is derived directly from the text of the RFC and not from the + reference implementation. + + The original and principal author of md5.h is L. Peter Deutsch + . Other authors are noted in the change history + that follows (in reverse chronological order): + + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); + added conditionalization for C++ compilation from Martin + Purschke . + 1999-05-03 lpd Original version. + */ + +/* $OrigId: md5.h,v 1.2 2001/03/26 08:57:14 matz Exp $ */ +/* $RoughId: md5.h,v 1.3 2002/02/24 08:14:31 knu Exp $ */ +/* $Id: md5.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#ifndef MD5_INCLUDED +# define MD5_INCLUDED + +#include "defs.h" + +/* + * This code has some adaptations for the Ghostscript environment, but it + * will compile and run correctly in any environment with 8-bit chars and + * 32-bit ints. Specifically, it assumes that if the following are + * defined, they have the same meaning as in Ghostscript: P1, P2, P3. + */ + +/* Define the state of the MD5 Algorithm. */ +typedef struct md5_state_s { + uint32_t count[2]; /* message length in bits, lsw first */ + uint32_t state[4]; /* digest buffer */ + uint8_t buffer[64]; /* accumulate block */ +} MD5_CTX; + +#ifdef RUBY +/* avoid name clash */ +#define MD5_Init rb_Digest_MD5_Init +#define MD5_Update rb_Digest_MD5_Update +#define MD5_Finish rb_Digest_MD5_Finish +#endif + +void MD5_Init _((MD5_CTX *pms)); +void MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes)); +void MD5_Finish _((MD5_CTX *pms, uint8_t *digest)); + +#define MD5_BLOCK_LENGTH 64 +#define MD5_DIGEST_LENGTH 16 +#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) + +#endif /* MD5_INCLUDED */ diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/md5init.c b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5init.c new file mode 100644 index 0000000..35fb3e2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5init.c @@ -0,0 +1,40 @@ +/* $RoughId: md5init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ +/* $Id: md5init.c 19020 2008-09-01 07:48:53Z nobu $ */ + +#include "digest.h" +#if defined(HAVE_OPENSSL_MD5_H) +#include "md5ossl.h" +#else +#include "md5.h" +#endif + +static const rb_digest_metadata_t md5 = { + RUBY_DIGEST_API_VERSION, + MD5_DIGEST_LENGTH, + MD5_BLOCK_LENGTH, + sizeof(MD5_CTX), + (rb_digest_hash_init_func_t)MD5_Init, + (rb_digest_hash_update_func_t)MD5_Update, + (rb_digest_hash_finish_func_t)MD5_Finish, +}; + +/* + * A class for calculating message digests using the MD5 + * Message-Digest Algorithm by RSA Data Security, Inc., described in + * RFC1321. + */ +void +Init_md5() +{ + VALUE mDigest, cDigest_Base, cDigest_MD5; + + rb_require("digest"); + + mDigest = rb_path2class("Digest"); + cDigest_Base = rb_path2class("Digest::Base"); + + cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base); + + rb_ivar_set(cDigest_MD5, rb_intern("metadata"), + Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&md5)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.c b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.c new file mode 100644 index 0000000..29ae404 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.c @@ -0,0 +1,9 @@ +/* $Id: md5ossl.c 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#include "md5ossl.h" + +void +MD5_Finish(MD5_CTX *pctx, unsigned char *digest) +{ + MD5_Final(digest, pctx); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.h b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.h new file mode 100644 index 0000000..2e9b5ef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/md5/md5ossl.h @@ -0,0 +1,13 @@ +/* $Id: md5ossl.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#ifndef MD5OSSL_H_INCLUDED +#define MD5OSSL_H_INCLUDED + +#include +#include + +#define MD5_BLOCK_LENGTH MD5_CBLOCK + +void MD5_Finish(MD5_CTX *pctx, unsigned char *digest); + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/depend b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/depend new file mode 100644 index 0000000..a21d718 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/depend @@ -0,0 +1,6 @@ +rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h +rmd160init.o: rmd160init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \ + rmd160.h $(srcdir)/../defs.h +rmd160ossl.o: rmd160ossl.h $(srcdir)/../defs.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/extconf.rb new file mode 100644 index 0000000..f329c6c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/extconf.rb @@ -0,0 +1,28 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id: extconf.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require "mkmf" + +$defs << "-DNDEBUG" << "-DHAVE_CONFIG_H" +$INCFLAGS << " -I$(srcdir)/.." + +$objs = [ "rmd160init.#{$OBJEXT}" ] + +dir_config("openssl") + +if !with_config("bundled-rmd160") && + have_library("crypto") && have_header("openssl/ripemd.h") + $objs << "rmd160ossl.#{$OBJEXT}" +else + $objs << "rmd160.#{$OBJEXT}" +end + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +$preload = %w[digest] + +create_makefile("digest/rmd160") diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.c b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.c new file mode 100644 index 0000000..3138d25 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.c @@ -0,0 +1,457 @@ +/* $NetBSD: rmd160.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $ */ +/* $RoughId: rmd160.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ +/* $Id: rmd160.c 11708 2007-02-12 23:01:19Z shyouhei $ */ + +/********************************************************************\ + * + * FILE: rmd160.c + * + * CONTENTS: A sample C-implementation of the RIPEMD-160 + * hash-function. + * TARGET: any computer with an ANSI C compiler + * + * AUTHOR: Antoon Bosselaers, ESAT-COSIC + * (Arranged for libc by Todd C. Miller) + * DATE: 1 March 1996 + * VERSION: 1.0 + * + * Copyright (c) Katholieke Universiteit Leuven + * 1996, All Rights Reserved + * +\********************************************************************/ + +#include "rmd160.h" + +#ifndef lint +/* __RCSID("$NetBSD: rmd160.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $"); */ +#endif /* not lint */ + +/* header files */ + +#ifdef HAVE_SYS_ENDIAN_H_ +#include +#endif + +#ifdef HAVE_MACHINE_ENDIAN_H_ +#include +#endif + +/* #include "namespace.h" */ + +#include +#include +#include +#include + +#ifndef _DIAGASSERT +#define _DIAGASSERT(cond) assert(cond) +#endif + + +/********************************************************************/ + +/* macro definitions */ + +/* collect four bytes into one word: */ +#define BYTES_TO_DWORD(strptr) \ + (((uint32_t) *((strptr)+3) << 24) | \ + ((uint32_t) *((strptr)+2) << 16) | \ + ((uint32_t) *((strptr)+1) << 8) | \ + ((uint32_t) *(strptr))) + +/* ROL(x, n) cyclically rotates x over n bits to the left */ +/* x must be of an unsigned 32 bits type and 0 <= n < 32. */ +#define ROL(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* the three basic functions F(), G() and H() */ +#define F(x, y, z) ((x) ^ (y) ^ (z)) +#define G(x, y, z) (((x) & (y)) | (~(x) & (z))) +#define H(x, y, z) (((x) | ~(y)) ^ (z)) +#define I(x, y, z) (((x) & (z)) | ((y) & ~(z))) +#define J(x, y, z) ((x) ^ ((y) | ~(z))) + +/* the eight basic operations FF() through III() */ +#define FF(a, b, c, d, e, x, s) { \ + (a) += F((b), (c), (d)) + (x); \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define GG(a, b, c, d, e, x, s) { \ + (a) += G((b), (c), (d)) + (x) + 0x5a827999U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define HH(a, b, c, d, e, x, s) { \ + (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define II(a, b, c, d, e, x, s) { \ + (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcU; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define JJ(a, b, c, d, e, x, s) { \ + (a) += J((b), (c), (d)) + (x) + 0xa953fd4eU; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define FFF(a, b, c, d, e, x, s) { \ + (a) += F((b), (c), (d)) + (x); \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define GGG(a, b, c, d, e, x, s) { \ + (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define HHH(a, b, c, d, e, x, s) { \ + (a) += H((b), (c), (d)) + (x) + 0x6d703ef3U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define III(a, b, c, d, e, x, s) { \ + (a) += I((b), (c), (d)) + (x) + 0x5c4dd124U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} +#define JJJ(a, b, c, d, e, x, s) { \ + (a) += J((b), (c), (d)) + (x) + 0x50a28be6U; \ + (a) = ROL((a), (s)) + (e); \ + (c) = ROL((c), 10); \ +} + +/********************************************************************/ + +void +RMD160_Init(RMD160_CTX *context) +{ + + _DIAGASSERT(context != NULL); + + /* ripemd-160 initialization constants */ + context->state[0] = 0x67452301U; + context->state[1] = 0xefcdab89U; + context->state[2] = 0x98badcfeU; + context->state[3] = 0x10325476U; + context->state[4] = 0xc3d2e1f0U; + context->length[0] = context->length[1] = 0; + context->buflen = 0; +} + +/********************************************************************/ + +void +RMD160_Transform(uint32_t state[5], const uint32_t block[16]) +{ + uint32_t aa, bb, cc, dd, ee; + uint32_t aaa, bbb, ccc, ddd, eee; + + _DIAGASSERT(state != NULL); + _DIAGASSERT(block != NULL); + + aa = aaa = state[0]; + bb = bbb = state[1]; + cc = ccc = state[2]; + dd = ddd = state[3]; + ee = eee = state[4]; + + /* round 1 */ + FF(aa, bb, cc, dd, ee, block[ 0], 11); + FF(ee, aa, bb, cc, dd, block[ 1], 14); + FF(dd, ee, aa, bb, cc, block[ 2], 15); + FF(cc, dd, ee, aa, bb, block[ 3], 12); + FF(bb, cc, dd, ee, aa, block[ 4], 5); + FF(aa, bb, cc, dd, ee, block[ 5], 8); + FF(ee, aa, bb, cc, dd, block[ 6], 7); + FF(dd, ee, aa, bb, cc, block[ 7], 9); + FF(cc, dd, ee, aa, bb, block[ 8], 11); + FF(bb, cc, dd, ee, aa, block[ 9], 13); + FF(aa, bb, cc, dd, ee, block[10], 14); + FF(ee, aa, bb, cc, dd, block[11], 15); + FF(dd, ee, aa, bb, cc, block[12], 6); + FF(cc, dd, ee, aa, bb, block[13], 7); + FF(bb, cc, dd, ee, aa, block[14], 9); + FF(aa, bb, cc, dd, ee, block[15], 8); + + /* round 2 */ + GG(ee, aa, bb, cc, dd, block[ 7], 7); + GG(dd, ee, aa, bb, cc, block[ 4], 6); + GG(cc, dd, ee, aa, bb, block[13], 8); + GG(bb, cc, dd, ee, aa, block[ 1], 13); + GG(aa, bb, cc, dd, ee, block[10], 11); + GG(ee, aa, bb, cc, dd, block[ 6], 9); + GG(dd, ee, aa, bb, cc, block[15], 7); + GG(cc, dd, ee, aa, bb, block[ 3], 15); + GG(bb, cc, dd, ee, aa, block[12], 7); + GG(aa, bb, cc, dd, ee, block[ 0], 12); + GG(ee, aa, bb, cc, dd, block[ 9], 15); + GG(dd, ee, aa, bb, cc, block[ 5], 9); + GG(cc, dd, ee, aa, bb, block[ 2], 11); + GG(bb, cc, dd, ee, aa, block[14], 7); + GG(aa, bb, cc, dd, ee, block[11], 13); + GG(ee, aa, bb, cc, dd, block[ 8], 12); + + /* round 3 */ + HH(dd, ee, aa, bb, cc, block[ 3], 11); + HH(cc, dd, ee, aa, bb, block[10], 13); + HH(bb, cc, dd, ee, aa, block[14], 6); + HH(aa, bb, cc, dd, ee, block[ 4], 7); + HH(ee, aa, bb, cc, dd, block[ 9], 14); + HH(dd, ee, aa, bb, cc, block[15], 9); + HH(cc, dd, ee, aa, bb, block[ 8], 13); + HH(bb, cc, dd, ee, aa, block[ 1], 15); + HH(aa, bb, cc, dd, ee, block[ 2], 14); + HH(ee, aa, bb, cc, dd, block[ 7], 8); + HH(dd, ee, aa, bb, cc, block[ 0], 13); + HH(cc, dd, ee, aa, bb, block[ 6], 6); + HH(bb, cc, dd, ee, aa, block[13], 5); + HH(aa, bb, cc, dd, ee, block[11], 12); + HH(ee, aa, bb, cc, dd, block[ 5], 7); + HH(dd, ee, aa, bb, cc, block[12], 5); + + /* round 4 */ + II(cc, dd, ee, aa, bb, block[ 1], 11); + II(bb, cc, dd, ee, aa, block[ 9], 12); + II(aa, bb, cc, dd, ee, block[11], 14); + II(ee, aa, bb, cc, dd, block[10], 15); + II(dd, ee, aa, bb, cc, block[ 0], 14); + II(cc, dd, ee, aa, bb, block[ 8], 15); + II(bb, cc, dd, ee, aa, block[12], 9); + II(aa, bb, cc, dd, ee, block[ 4], 8); + II(ee, aa, bb, cc, dd, block[13], 9); + II(dd, ee, aa, bb, cc, block[ 3], 14); + II(cc, dd, ee, aa, bb, block[ 7], 5); + II(bb, cc, dd, ee, aa, block[15], 6); + II(aa, bb, cc, dd, ee, block[14], 8); + II(ee, aa, bb, cc, dd, block[ 5], 6); + II(dd, ee, aa, bb, cc, block[ 6], 5); + II(cc, dd, ee, aa, bb, block[ 2], 12); + + /* round 5 */ + JJ(bb, cc, dd, ee, aa, block[ 4], 9); + JJ(aa, bb, cc, dd, ee, block[ 0], 15); + JJ(ee, aa, bb, cc, dd, block[ 5], 5); + JJ(dd, ee, aa, bb, cc, block[ 9], 11); + JJ(cc, dd, ee, aa, bb, block[ 7], 6); + JJ(bb, cc, dd, ee, aa, block[12], 8); + JJ(aa, bb, cc, dd, ee, block[ 2], 13); + JJ(ee, aa, bb, cc, dd, block[10], 12); + JJ(dd, ee, aa, bb, cc, block[14], 5); + JJ(cc, dd, ee, aa, bb, block[ 1], 12); + JJ(bb, cc, dd, ee, aa, block[ 3], 13); + JJ(aa, bb, cc, dd, ee, block[ 8], 14); + JJ(ee, aa, bb, cc, dd, block[11], 11); + JJ(dd, ee, aa, bb, cc, block[ 6], 8); + JJ(cc, dd, ee, aa, bb, block[15], 5); + JJ(bb, cc, dd, ee, aa, block[13], 6); + + /* parallel round 1 */ + JJJ(aaa, bbb, ccc, ddd, eee, block[ 5], 8); + JJJ(eee, aaa, bbb, ccc, ddd, block[14], 9); + JJJ(ddd, eee, aaa, bbb, ccc, block[ 7], 9); + JJJ(ccc, ddd, eee, aaa, bbb, block[ 0], 11); + JJJ(bbb, ccc, ddd, eee, aaa, block[ 9], 13); + JJJ(aaa, bbb, ccc, ddd, eee, block[ 2], 15); + JJJ(eee, aaa, bbb, ccc, ddd, block[11], 15); + JJJ(ddd, eee, aaa, bbb, ccc, block[ 4], 5); + JJJ(ccc, ddd, eee, aaa, bbb, block[13], 7); + JJJ(bbb, ccc, ddd, eee, aaa, block[ 6], 7); + JJJ(aaa, bbb, ccc, ddd, eee, block[15], 8); + JJJ(eee, aaa, bbb, ccc, ddd, block[ 8], 11); + JJJ(ddd, eee, aaa, bbb, ccc, block[ 1], 14); + JJJ(ccc, ddd, eee, aaa, bbb, block[10], 14); + JJJ(bbb, ccc, ddd, eee, aaa, block[ 3], 12); + JJJ(aaa, bbb, ccc, ddd, eee, block[12], 6); + + /* parallel round 2 */ + III(eee, aaa, bbb, ccc, ddd, block[ 6], 9); + III(ddd, eee, aaa, bbb, ccc, block[11], 13); + III(ccc, ddd, eee, aaa, bbb, block[ 3], 15); + III(bbb, ccc, ddd, eee, aaa, block[ 7], 7); + III(aaa, bbb, ccc, ddd, eee, block[ 0], 12); + III(eee, aaa, bbb, ccc, ddd, block[13], 8); + III(ddd, eee, aaa, bbb, ccc, block[ 5], 9); + III(ccc, ddd, eee, aaa, bbb, block[10], 11); + III(bbb, ccc, ddd, eee, aaa, block[14], 7); + III(aaa, bbb, ccc, ddd, eee, block[15], 7); + III(eee, aaa, bbb, ccc, ddd, block[ 8], 12); + III(ddd, eee, aaa, bbb, ccc, block[12], 7); + III(ccc, ddd, eee, aaa, bbb, block[ 4], 6); + III(bbb, ccc, ddd, eee, aaa, block[ 9], 15); + III(aaa, bbb, ccc, ddd, eee, block[ 1], 13); + III(eee, aaa, bbb, ccc, ddd, block[ 2], 11); + + /* parallel round 3 */ + HHH(ddd, eee, aaa, bbb, ccc, block[15], 9); + HHH(ccc, ddd, eee, aaa, bbb, block[ 5], 7); + HHH(bbb, ccc, ddd, eee, aaa, block[ 1], 15); + HHH(aaa, bbb, ccc, ddd, eee, block[ 3], 11); + HHH(eee, aaa, bbb, ccc, ddd, block[ 7], 8); + HHH(ddd, eee, aaa, bbb, ccc, block[14], 6); + HHH(ccc, ddd, eee, aaa, bbb, block[ 6], 6); + HHH(bbb, ccc, ddd, eee, aaa, block[ 9], 14); + HHH(aaa, bbb, ccc, ddd, eee, block[11], 12); + HHH(eee, aaa, bbb, ccc, ddd, block[ 8], 13); + HHH(ddd, eee, aaa, bbb, ccc, block[12], 5); + HHH(ccc, ddd, eee, aaa, bbb, block[ 2], 14); + HHH(bbb, ccc, ddd, eee, aaa, block[10], 13); + HHH(aaa, bbb, ccc, ddd, eee, block[ 0], 13); + HHH(eee, aaa, bbb, ccc, ddd, block[ 4], 7); + HHH(ddd, eee, aaa, bbb, ccc, block[13], 5); + + /* parallel round 4 */ + GGG(ccc, ddd, eee, aaa, bbb, block[ 8], 15); + GGG(bbb, ccc, ddd, eee, aaa, block[ 6], 5); + GGG(aaa, bbb, ccc, ddd, eee, block[ 4], 8); + GGG(eee, aaa, bbb, ccc, ddd, block[ 1], 11); + GGG(ddd, eee, aaa, bbb, ccc, block[ 3], 14); + GGG(ccc, ddd, eee, aaa, bbb, block[11], 14); + GGG(bbb, ccc, ddd, eee, aaa, block[15], 6); + GGG(aaa, bbb, ccc, ddd, eee, block[ 0], 14); + GGG(eee, aaa, bbb, ccc, ddd, block[ 5], 6); + GGG(ddd, eee, aaa, bbb, ccc, block[12], 9); + GGG(ccc, ddd, eee, aaa, bbb, block[ 2], 12); + GGG(bbb, ccc, ddd, eee, aaa, block[13], 9); + GGG(aaa, bbb, ccc, ddd, eee, block[ 9], 12); + GGG(eee, aaa, bbb, ccc, ddd, block[ 7], 5); + GGG(ddd, eee, aaa, bbb, ccc, block[10], 15); + GGG(ccc, ddd, eee, aaa, bbb, block[14], 8); + + /* parallel round 5 */ + FFF(bbb, ccc, ddd, eee, aaa, block[12] , 8); + FFF(aaa, bbb, ccc, ddd, eee, block[15] , 5); + FFF(eee, aaa, bbb, ccc, ddd, block[10] , 12); + FFF(ddd, eee, aaa, bbb, ccc, block[ 4] , 9); + FFF(ccc, ddd, eee, aaa, bbb, block[ 1] , 12); + FFF(bbb, ccc, ddd, eee, aaa, block[ 5] , 5); + FFF(aaa, bbb, ccc, ddd, eee, block[ 8] , 14); + FFF(eee, aaa, bbb, ccc, ddd, block[ 7] , 6); + FFF(ddd, eee, aaa, bbb, ccc, block[ 6] , 8); + FFF(ccc, ddd, eee, aaa, bbb, block[ 2] , 13); + FFF(bbb, ccc, ddd, eee, aaa, block[13] , 6); + FFF(aaa, bbb, ccc, ddd, eee, block[14] , 5); + FFF(eee, aaa, bbb, ccc, ddd, block[ 0] , 15); + FFF(ddd, eee, aaa, bbb, ccc, block[ 3] , 13); + FFF(ccc, ddd, eee, aaa, bbb, block[ 9] , 11); + FFF(bbb, ccc, ddd, eee, aaa, block[11] , 11); + + /* combine results */ + ddd += cc + state[1]; /* final result for state[0] */ + state[1] = state[2] + dd + eee; + state[2] = state[3] + ee + aaa; + state[3] = state[4] + aa + bbb; + state[4] = state[0] + bb + ccc; + state[0] = ddd; +} + +/********************************************************************/ + +void +RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes) +{ + uint32_t X[16]; + uint32_t ofs = 0; + uint32_t i; +#ifdef WORDS_BIGENDIAN + uint32_t j; +#endif + + _DIAGASSERT(context != NULL); + _DIAGASSERT(data != NULL); + + /* update length[] */ + if (context->length[0] + nbytes < context->length[0]) + context->length[1]++; /* overflow to msb of length */ + context->length[0] += nbytes; + + (void)memset(X, 0, sizeof(X)); + + if ( context->buflen + nbytes < 64 ) + { + (void)memcpy(context->bbuffer + context->buflen, data, nbytes); + context->buflen += nbytes; + } + else + { + /* process first block */ + ofs = 64 - context->buflen; + (void)memcpy(context->bbuffer + context->buflen, data, ofs); +#ifndef WORDS_BIGENDIAN + (void)memcpy(X, context->bbuffer, sizeof(X)); +#else + for (j=0; j < 16; j++) + X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j)); +#endif + RMD160_Transform(context->state, X); + nbytes -= ofs; + + /* process remaining complete blocks */ + for (i = 0; i < (nbytes >> 6); i++) { +#ifndef WORDS_BIGENDIAN + (void)memcpy(X, data + (64 * i) + ofs, sizeof(X)); +#else + for (j=0; j < 16; j++) + X[j] = BYTES_TO_DWORD(data + (64 * i) + (4 * j) + ofs); +#endif + RMD160_Transform(context->state, X); + } + + /* + * Put last bytes from data into context's buffer + */ + context->buflen = nbytes & 63; + memcpy(context->bbuffer, data + (64 * i) + ofs, context->buflen); + } +} + +/********************************************************************/ + +void +RMD160_Finish(RMD160_CTX *context, uint8_t digest[20]) +{ + uint32_t i; + uint32_t X[16]; +#ifdef WORDS_BIGENDIAN + uint32_t j; +#endif + + _DIAGASSERT(digest != NULL); + _DIAGASSERT(context != NULL); + + /* append the bit m_n == 1 */ + context->bbuffer[context->buflen] = (uint8_t)'\200'; + + (void)memset(context->bbuffer + context->buflen + 1, 0, + 63 - context->buflen); +#ifndef WORDS_BIGENDIAN + (void)memcpy(X, context->bbuffer, sizeof(X)); +#else + for (j=0; j < 16; j++) + X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j)); +#endif + if ((context->buflen) > 55) { + /* length goes to next block */ + RMD160_Transform(context->state, X); + (void)memset(X, 0, sizeof(X)); + } + + /* append length in bits */ + X[14] = context->length[0] << 3; + X[15] = (context->length[0] >> 29) | + (context->length[1] << 3); + RMD160_Transform(context->state, X); + + if (digest != NULL) { + for (i = 0; i < 20; i += 4) { + /* extracts the 8 least significant bits. */ + digest[i] = context->state[i>>2]; + digest[i + 1] = (context->state[i>>2] >> 8); + digest[i + 2] = (context->state[i>>2] >> 16); + digest[i + 3] = (context->state[i>>2] >> 24); + } + } +} + +/************************ end of file rmd160.c **********************/ diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.h b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.h new file mode 100644 index 0000000..2c761d1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160.h @@ -0,0 +1,56 @@ +/* $NetBSD: rmd160.h,v 1.2 2000/07/07 10:47:06 ad Exp $ */ +/* $RoughId: rmd160.h,v 1.3 2002/02/24 08:14:31 knu Exp $ */ +/* $Id: rmd160.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +/********************************************************************\ + * + * FILE: rmd160.h + * + * CONTENTS: Header file for a sample C-implementation of the + * RIPEMD-160 hash-function. + * TARGET: any computer with an ANSI C compiler + * + * AUTHOR: Antoon Bosselaers, ESAT-COSIC + * DATE: 1 March 1996 + * VERSION: 1.0 + * + * Copyright (c) Katholieke Universiteit Leuven + * 1996, All Rights Reserved + * +\********************************************************************/ + +/* + * from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp + */ + +#ifndef _RMD160_H_ +#define _RMD160_H_ + +#include "defs.h" + +typedef struct { + uint32_t state[5]; /* state (ABCDE) */ + uint32_t length[2]; /* number of bits */ + uint8_t bbuffer[64]; /* overflow buffer */ + uint32_t buflen; /* number of chars in bbuffer */ +} RMD160_CTX; + +#ifdef RUBY +#define RMD160_Init rb_Digest_RMD160_Init +#define RMD160_Transform rb_Digest_RMD160_Transform +#define RMD160_Update rb_Digest_RMD160_Update +#define RMD160_Finish rb_Digest_RMD160_Finish +#endif + +__BEGIN_DECLS +void RMD160_Init _((RMD160_CTX *)); +void RMD160_Transform _((uint32_t[5], const uint32_t[16])); +void RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t)); +void RMD160_Finish _((RMD160_CTX *, uint8_t[20])); +__END_DECLS + +#define RMD160_BLOCK_LENGTH 64 +#define RMD160_DIGEST_LENGTH 20 +#define RMD160_DIGEST_STRING_LENGTH (RMD160_DIGEST_LENGTH * 2 + 1) + +#endif /* !_RMD160_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160init.c b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160init.c new file mode 100644 index 0000000..d105618 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160init.c @@ -0,0 +1,40 @@ +/* $RoughId: rmd160init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */ +/* $Id: rmd160init.c 19020 2008-09-01 07:48:53Z nobu $ */ + +#include "digest.h" +#if defined(HAVE_OPENSSL_RIPEMD_H) +#include "rmd160ossl.h" +#else +#include "rmd160.h" +#endif + +static const rb_digest_metadata_t rmd160 = { + RUBY_DIGEST_API_VERSION, + RMD160_DIGEST_LENGTH, + RMD160_BLOCK_LENGTH, + sizeof(RMD160_CTX), + (rb_digest_hash_init_func_t)RMD160_Init, + (rb_digest_hash_update_func_t)RMD160_Update, + (rb_digest_hash_finish_func_t)RMD160_Finish, +}; + +/* + * A class for calculating message digests using RIPEMD-160 + * cryptographic hash function, designed by Hans Dobbertin, Antoon + * Bosselaers, and Bart Preneel. + */ +void +Init_rmd160() +{ + VALUE mDigest, cDigest_Base, cDigest_RMD160; + + rb_require("digest"); + + mDigest = rb_path2class("Digest"); + cDigest_Base = rb_path2class("Digest::Base"); + + cDigest_RMD160 = rb_define_class_under(mDigest, "RMD160", cDigest_Base); + + rb_ivar_set(cDigest_RMD160, rb_intern("metadata"), + Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&rmd160)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.c b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.c new file mode 100644 index 0000000..e9e3520 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.c @@ -0,0 +1,8 @@ +/* $Id: rmd160ossl.c 11902 2007-02-27 10:08:39Z knu $ */ + +#include "defs.h" +#include "rmd160ossl.h" + +void RMD160_Finish(RMD160_CTX *ctx, char *buf) { + RIPEMD160_Final((unsigned char *)buf, ctx); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.h b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.h new file mode 100644 index 0000000..a02c182 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/rmd160/rmd160ossl.h @@ -0,0 +1,19 @@ +/* $Id: rmd160ossl.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#ifndef RMD160OSSL_H_INCLUDED +#define RMD160OSSL_H_INCLUDED + +#include +#include + +#define RMD160_CTX RIPEMD160_CTX + +#define RMD160_Init RIPEMD160_Init +#define RMD160_Update RIPEMD160_Update + +#define RMD160_BLOCK_LENGTH RIPEMD160_CBLOCK +#define RMD160_DIGEST_LENGTH RIPEMD160_DIGEST_LENGTH + +void RMD160_Finish(RMD160_CTX *ctx, char *buf); + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/sha1/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/depend b/lib/ruby-1.9.1-rc1/ext/digest/sha1/depend new file mode 100644 index 0000000..6160784 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/depend @@ -0,0 +1,6 @@ +sha1.o: sha1.c sha1.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h +sha1init.o: sha1init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \ + sha1.h $(srcdir)/../defs.h +sha1ossl.o: sha1ossl.h $(srcdir)/../defs.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/sha1/extconf.rb new file mode 100644 index 0000000..eafddce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/extconf.rb @@ -0,0 +1,28 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id: extconf.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require "mkmf" + +$defs << "-DHAVE_CONFIG_H" +$INCFLAGS << " -I$(srcdir)/.." + +$objs = [ "sha1init.#{$OBJEXT}" ] + +dir_config("openssl") + +if !with_config("bundled-sha1") && + have_library("crypto") && have_header("openssl/sha.h") + $objs << "sha1ossl.#{$OBJEXT}" +else + $objs << "sha1.#{$OBJEXT}" +end + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +$preload = %w[digest] + +create_makefile("digest/sha1") diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.c b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.c new file mode 100644 index 0000000..85102c8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.c @@ -0,0 +1,269 @@ +/* $NetBSD: sha1.c,v 1.2 2001/03/22 09:51:48 agc Exp $ */ +/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */ +/* $RoughId: sha1.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ +/* $Id: sha1.c 11708 2007-02-12 23:01:19Z shyouhei $ */ + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + * + * Test Vectors (from FIPS PUB 180-1) + * "abc" + * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D + * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" + * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 + * A million repetitions of "a" + * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F + */ + +#include "sha1.h" + +#define SHA1HANDSOFF /* Copies data before messing with it. */ + +#if defined(_KERNEL) || defined(_STANDALONE) +#include +#include +#define _DIAGASSERT(x) (void)0 +#else +/* #include "namespace.h" */ +#include +#include +#endif + +#ifndef _DIAGASSERT +#define _DIAGASSERT(cond) assert(cond) +#endif + +/* + * XXX Kludge until there is resolution regarding mem*() functions + * XXX in the kernel. + */ +#if defined(_KERNEL) || defined(_STANDALONE) +#define memcpy(s, d, l) bcopy((d), (s), (l)) +#endif + +#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* + * blk0() and blk() perform the initial expand. + * I got the idea of expanding during the round function from SSLeay + */ +#ifndef WORDS_BIGENDIAN +# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ + |(rol(block->l[i],8)&0x00FF00FF)) +#else +# define blk0(i) block->l[i] +#endif +#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ + ^block->l[(i+2)&15]^block->l[i&15],1)) + +/* + * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1 + */ +#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); +#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); +#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); + + +typedef union { + uint8_t c[64]; + uint32_t l[16]; +} CHAR64LONG16; + +#ifdef __sparc_v9__ +void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *); +void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *); +void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *); +void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *); + +#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i) +#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i) +#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i) +#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i) +#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i) + +void +do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block) +{ + nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3); + nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7); + nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11); + nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15); + nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19); +} + +void +do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block) +{ + nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23); + nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27); + nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31); + nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35); + nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39); +} + +void +do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block) +{ + nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43); + nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47); + nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51); + nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55); + nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59); +} + +void +do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block) +{ + nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63); + nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67); + nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71); + nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75); + nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79); +} +#endif + +/* + * Hash a single 512-bit block. This is the core of the algorithm. + */ +void SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]) +{ + uint32_t a, b, c, d, e; + CHAR64LONG16 *block; + +#ifdef SHA1HANDSOFF + CHAR64LONG16 workspace; +#endif + + _DIAGASSERT(buffer != 0); + _DIAGASSERT(state != 0); + +#ifdef SHA1HANDSOFF + block = &workspace; + (void)memcpy(block, buffer, 64); +#else + block = (CHAR64LONG16 *)(void *)buffer; +#endif + + /* Copy context->state[] to working vars */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + +#ifdef __sparc_v9__ + do_R01(&a, &b, &c, &d, &e, block); + do_R2(&a, &b, &c, &d, &e, block); + do_R3(&a, &b, &c, &d, &e, block); + do_R4(&a, &b, &c, &d, &e, block); +#else + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); + R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); + R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); + R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); + R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); + R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); +#endif + + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + + /* Wipe variables */ + a = b = c = d = e = 0; +} + + +/* + * SHA1_Init - Initialize new context + */ +void SHA1_Init(SHA1_CTX *context) +{ + + _DIAGASSERT(context != 0); + + /* SHA1 initialization constants */ + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; + context->state[4] = 0xC3D2E1F0; + context->count[0] = context->count[1] = 0; +} + + +/* + * Run your data through this. + */ +void SHA1_Update(SHA1_CTX *context, const uint8_t *data, size_t len) +{ + uint32_t i, j; + + _DIAGASSERT(context != 0); + _DIAGASSERT(data != 0); + + j = context->count[0]; + if ((context->count[0] += len << 3) < j) + context->count[1] += (len>>29)+1; + j = (j >> 3) & 63; + if ((j + len) > 63) { + (void)memcpy(&context->buffer[j], data, (i = 64-j)); + SHA1_Transform(context->state, context->buffer); + for ( ; i + 63 < len; i += 64) + SHA1_Transform(context->state, &data[i]); + j = 0; + } else { + i = 0; + } + (void)memcpy(&context->buffer[j], &data[i], len - i); +} + + +/* + * Add padding and return the message digest. + */ +void SHA1_Finish(SHA1_CTX* context, uint8_t digest[20]) +{ + size_t i; + uint8_t finalcount[8]; + + _DIAGASSERT(digest != 0); + _DIAGASSERT(context != 0); + + for (i = 0; i < 8; i++) { + finalcount[i] = (uint8_t)((context->count[(i >= 4 ? 0 : 1)] + >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ + } + SHA1_Update(context, (const uint8_t *)"\200", 1); + while ((context->count[0] & 504) != 448) + SHA1_Update(context, (const uint8_t *)"\0", 1); + SHA1_Update(context, finalcount, 8); /* Should cause a SHA1_Transform() */ + + if (digest) { + for (i = 0; i < 20; i++) + digest[i] = (uint8_t) + ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); + } +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.h b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.h new file mode 100644 index 0000000..1080530 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1.h @@ -0,0 +1,39 @@ +/* $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */ +/* $RoughId: sha1.h,v 1.3 2002/02/24 08:14:32 knu Exp $ */ +/* $Id: sha1.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + */ + +#ifndef _SYS_SHA1_H_ +#define _SYS_SHA1_H_ + +#include "defs.h" + +typedef struct { + uint32_t state[5]; + uint32_t count[2]; + uint8_t buffer[64]; +} SHA1_CTX; + +#ifdef RUBY +/* avoid name clash */ +#define SHA1_Transform rb_Digest_SHA1_Transform +#define SHA1_Init rb_Digest_SHA1_Init +#define SHA1_Update rb_Digest_SHA1_Update +#define SHA1_Finish rb_Digest_SHA1_Finish +#endif + +void SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64])); +void SHA1_Init _((SHA1_CTX *context)); +void SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len)); +void SHA1_Finish _((SHA1_CTX *context, uint8_t digest[20])); + +#define SHA1_BLOCK_LENGTH 64 +#define SHA1_DIGEST_LENGTH 20 +#define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1) + +#endif /* _SYS_SHA1_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1init.c b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1init.c new file mode 100644 index 0000000..7e7ea0c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1init.c @@ -0,0 +1,40 @@ +/* $RoughId: sha1init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */ +/* $Id: sha1init.c 19020 2008-09-01 07:48:53Z nobu $ */ + +#include "digest.h" +#if defined(HAVE_OPENSSL_SHA_H) +#include "sha1ossl.h" +#else +#include "sha1.h" +#endif + +static const rb_digest_metadata_t sha1 = { + RUBY_DIGEST_API_VERSION, + SHA1_DIGEST_LENGTH, + SHA1_BLOCK_LENGTH, + sizeof(SHA1_CTX), + (rb_digest_hash_init_func_t)SHA1_Init, + (rb_digest_hash_update_func_t)SHA1_Update, + (rb_digest_hash_finish_func_t)SHA1_Finish, +}; + +/* + * A class for calculating message digests using the SHA-1 Secure Hash + * Algorithm by NIST (the US' National Institute of Standards and + * Technology), described in FIPS PUB 180-1. + */ +void +Init_sha1() +{ + VALUE mDigest, cDigest_Base, cDigest_SHA1; + + rb_require("digest"); + + mDigest = rb_path2class("Digest"); + cDigest_Base = rb_path2class("Digest::Base"); + + cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base); + + rb_ivar_set(cDigest_SHA1, rb_intern("metadata"), + Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&sha1)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.c b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.c new file mode 100644 index 0000000..44615e5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.c @@ -0,0 +1,10 @@ +/* $Id: sha1ossl.c 11902 2007-02-27 10:08:39Z knu $ */ + +#include "defs.h" +#include "sha1ossl.h" + +void +SHA1_Finish(SHA1_CTX *ctx, char *buf) +{ + SHA1_Final((unsigned char *)buf, ctx); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.h b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.h new file mode 100644 index 0000000..fd9c8b1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha1/sha1ossl.h @@ -0,0 +1,20 @@ +/* $Id: sha1ossl.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#ifndef SHA1OSSL_H_INCLUDED +#define SHA1OSSL_H_INCLUDED + +#include +#include + +#define SHA1_CTX SHA_CTX + +#ifdef SHA_BLOCK_LENGTH +#define SHA1_BLOCK_LENGTH SHA_BLOCK_LENGTH +#else +#define SHA1_BLOCK_LENGTH SHA_CBLOCK +#endif +#define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH + +void SHA1_Finish(SHA1_CTX *ctx, char *buf); + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/.cvsignore b/lib/ruby-1.9.1-rc1/ext/digest/sha2/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/depend b/lib/ruby-1.9.1-rc1/ext/digest/sha2/depend new file mode 100644 index 0000000..225d6ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/depend @@ -0,0 +1,5 @@ +sha2.o: sha2.c sha2.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h +sha2init.o: sha2init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \ + $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \ + sha2.h $(srcdir)/../defs.h diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/extconf.rb b/lib/ruby-1.9.1-rc1/ext/digest/sha2/extconf.rb new file mode 100644 index 0000000..5f58c73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/extconf.rb @@ -0,0 +1,24 @@ +# $RoughId: extconf.rb,v 1.4 2001/08/14 19:54:51 knu Exp $ +# $Id: extconf.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require "mkmf" + +$defs << "-DHAVE_CONFIG_H" +$INCFLAGS << " -I$(srcdir)/.." + +$objs = [ + "sha2.#{$OBJEXT}", + "sha2init.#{$OBJEXT}", +] + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +$preload = %w[digest] + +if have_type("uint64_t", "defs.h", $defs.join(' ')) + create_makefile("digest/sha2") +end diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/lib/sha2.rb b/lib/ruby-1.9.1-rc1/ext/digest/sha2/lib/sha2.rb new file mode 100644 index 0000000..c16305d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/lib/sha2.rb @@ -0,0 +1,73 @@ +#-- +# sha2.rb - defines Digest::SHA2 class which wraps up the SHA256, +# SHA384, and SHA512 classes. +#++ +# Copyright (c) 2006 Akinori MUSHA +# +# All rights reserved. You can redistribute and/or modify it under the same +# terms as Ruby. +# +# $Id: sha2.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require 'digest' + +module Digest + # + # A meta digest provider class for SHA256, SHA384 and SHA512. + # + class SHA2 < Digest::Class + # call-seq: + # Digest::SHA2.new(bitlen = 256) -> digest_obj + # + # Creates a new SHA2 hash object with a given bit length. + def initialize(bitlen = 256) + case bitlen + when 256 + @sha2 = Digest::SHA256.new + when 384 + @sha2 = Digest::SHA384.new + when 512 + @sha2 = Digest::SHA512.new + else + raise ArgumentError, "unsupported bit length: %s" % bitlen.inspect + end + @bitlen = bitlen + end + + # :nodoc: + def reset + @sha2.reset + self + end + + # :nodoc: + def update(str) + @sha2.update(str) + self + end + alias << update + + def finish + @sha2.digest! + end + private :finish + + def block_length + @sha2.block_length + end + + def digest_length + @sha2.digest_length + end + + # :nodoc: + def initialize_copy(other) + @sha2 = other.instance_eval { @sha2.clone } + end + + # :nodoc: + def inspect + "#<%s:%d %s>" % [self.class.name, @bitlen, hexdigest] + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.c b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.c new file mode 100644 index 0000000..597a25d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.c @@ -0,0 +1,919 @@ +/* + * sha2.c + * + * Version 1.0.0beta1 + * + * Written by Aaron D. Gifford + * + * Copyright 2000 Aaron D. Gifford. 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. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR 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(S) OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR 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. + * + */ + +/* $RoughId: sha2.c,v 1.3 2002/02/26 22:03:36 knu Exp $ */ +/* $Id: sha2.c 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#include "sha2.h" +#include +#include /* memcpy()/memset() or bcopy()/bzero() */ +#include /* assert() */ + +/* + * ASSERT NOTE: + * Some sanity checking code is included using assert(). On my FreeBSD + * system, this additional code can be removed by compiling with NDEBUG + * defined. Check your own systems manpage on assert() to see how to + * compile WITHOUT the sanity checking code on your system. + * + * UNROLLED TRANSFORM LOOP NOTE: + * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform + * loop version for the hash transform rounds (defined using macros + * later in this file). Either define on the command line, for example: + * + * cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c + * + * or define below: + * + * #define SHA2_UNROLL_TRANSFORM + * + */ + + +/*** SHA-256/384/512 Machine Architecture Definitions *****************/ +typedef uint8_t sha2_byte; /* Exactly 1 byte */ +typedef uint32_t sha2_word32; /* Exactly 4 bytes */ +typedef uint64_t sha2_word64; /* Exactly 8 bytes */ + +#if defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__) +#define ULL(number) number##ULL +#else +#define ULL(number) (uint64_t)(number) +#endif + + +/*** SHA-256/384/512 Various Length Definitions ***********************/ +/* NOTE: Most of these are in sha2.h */ +#define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8) +#define SHA384_SHORT_BLOCK_LENGTH (SHA384_BLOCK_LENGTH - 16) +#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16) + + +/*** ENDIAN REVERSAL MACROS *******************************************/ +#ifndef WORDS_BIGENDIAN +#define REVERSE32(w,x) { \ + sha2_word32 tmp = (w); \ + tmp = (tmp >> 16) | (tmp << 16); \ + (x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \ +} +#define REVERSE64(w,x) { \ + sha2_word64 tmp = (w); \ + tmp = (tmp >> 32) | (tmp << 32); \ + tmp = ((tmp & ULL(0xff00ff00ff00ff00)) >> 8) | \ + ((tmp & ULL(0x00ff00ff00ff00ff)) << 8); \ + (x) = ((tmp & ULL(0xffff0000ffff0000)) >> 16) | \ + ((tmp & ULL(0x0000ffff0000ffff)) << 16); \ +} +#endif + +/* + * Macro for incrementally adding the unsigned 64-bit integer n to the + * unsigned 128-bit integer (represented using a two-element array of + * 64-bit words): + */ +#define ADDINC128(w,n) { \ + (w)[0] += (sha2_word64)(n); \ + if ((w)[0] < (n)) { \ + (w)[1]++; \ + } \ +} + +/* + * Macros for copying blocks of memory and for zeroing out ranges + * of memory. Using these macros makes it easy to switch from + * using memset()/memcpy() and using bzero()/bcopy(). + * + * Please define either SHA2_USE_MEMSET_MEMCPY or define + * SHA2_USE_BZERO_BCOPY depending on which function set you + * choose to use: + */ +#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY) +/* Default to memset()/memcpy() if no option is specified */ +#define SHA2_USE_MEMSET_MEMCPY 1 +#endif +#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY) +/* Abort with an error if BOTH options are defined */ +#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both! +#endif + +#ifdef SHA2_USE_MEMSET_MEMCPY +#define MEMSET_BZERO(p,l) memset((p), 0, (l)) +#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) +#endif +#ifdef SHA2_USE_BZERO_BCOPY +#define MEMSET_BZERO(p,l) bzero((p), (l)) +#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) +#endif + + +/*** THE SIX LOGICAL FUNCTIONS ****************************************/ +/* + * Bit shifting and rotation (used by the six SHA-XYZ logical functions: + * + * NOTE: The naming of R and S appears backwards here (R is a SHIFT and + * S is a ROTATION) because the SHA-256/384/512 description document + * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this + * same "backwards" definition. + */ +/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */ +#define R(b,x) ((x) >> (b)) +/* 32-bit Rotate-right (used in SHA-256): */ +#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b)))) +/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */ +#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b)))) + +/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */ +#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) +#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) + +/* Four of six logical functions used in SHA-256: */ +#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x))) +#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x))) +#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x))) +#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x))) + +/* Four of six logical functions used in SHA-384 and SHA-512: */ +#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x))) +#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x))) +#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x))) +#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x))) + +/*** INTERNAL FUNCTION PROTOTYPES *************************************/ +/* NOTE: These should not be accessed directly from outside this + * library -- they are intended for private internal visibility/use + * only. + */ +void SHA512_Last(SHA512_CTX*); +void SHA256_Transform(SHA256_CTX*, const sha2_word32*); +void SHA512_Transform(SHA512_CTX*, const sha2_word64*); + + +/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ +/* Hash constant words K for SHA-256: */ +const static sha2_word32 K256[64] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, + 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, + 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, + 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, + 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, + 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, + 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, + 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, + 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, + 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, + 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, + 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, + 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; + +/* Initial hash value H for SHA-256: */ +const static sha2_word32 sha256_initial_hash_value[8] = { + 0x6a09e667UL, + 0xbb67ae85UL, + 0x3c6ef372UL, + 0xa54ff53aUL, + 0x510e527fUL, + 0x9b05688cUL, + 0x1f83d9abUL, + 0x5be0cd19UL +}; + +/* Hash constant words K for SHA-384 and SHA-512: */ +const static sha2_word64 K512[80] = { + ULL(0x428a2f98d728ae22), ULL(0x7137449123ef65cd), + ULL(0xb5c0fbcfec4d3b2f), ULL(0xe9b5dba58189dbbc), + ULL(0x3956c25bf348b538), ULL(0x59f111f1b605d019), + ULL(0x923f82a4af194f9b), ULL(0xab1c5ed5da6d8118), + ULL(0xd807aa98a3030242), ULL(0x12835b0145706fbe), + ULL(0x243185be4ee4b28c), ULL(0x550c7dc3d5ffb4e2), + ULL(0x72be5d74f27b896f), ULL(0x80deb1fe3b1696b1), + ULL(0x9bdc06a725c71235), ULL(0xc19bf174cf692694), + ULL(0xe49b69c19ef14ad2), ULL(0xefbe4786384f25e3), + ULL(0x0fc19dc68b8cd5b5), ULL(0x240ca1cc77ac9c65), + ULL(0x2de92c6f592b0275), ULL(0x4a7484aa6ea6e483), + ULL(0x5cb0a9dcbd41fbd4), ULL(0x76f988da831153b5), + ULL(0x983e5152ee66dfab), ULL(0xa831c66d2db43210), + ULL(0xb00327c898fb213f), ULL(0xbf597fc7beef0ee4), + ULL(0xc6e00bf33da88fc2), ULL(0xd5a79147930aa725), + ULL(0x06ca6351e003826f), ULL(0x142929670a0e6e70), + ULL(0x27b70a8546d22ffc), ULL(0x2e1b21385c26c926), + ULL(0x4d2c6dfc5ac42aed), ULL(0x53380d139d95b3df), + ULL(0x650a73548baf63de), ULL(0x766a0abb3c77b2a8), + ULL(0x81c2c92e47edaee6), ULL(0x92722c851482353b), + ULL(0xa2bfe8a14cf10364), ULL(0xa81a664bbc423001), + ULL(0xc24b8b70d0f89791), ULL(0xc76c51a30654be30), + ULL(0xd192e819d6ef5218), ULL(0xd69906245565a910), + ULL(0xf40e35855771202a), ULL(0x106aa07032bbd1b8), + ULL(0x19a4c116b8d2d0c8), ULL(0x1e376c085141ab53), + ULL(0x2748774cdf8eeb99), ULL(0x34b0bcb5e19b48a8), + ULL(0x391c0cb3c5c95a63), ULL(0x4ed8aa4ae3418acb), + ULL(0x5b9cca4f7763e373), ULL(0x682e6ff3d6b2b8a3), + ULL(0x748f82ee5defb2fc), ULL(0x78a5636f43172f60), + ULL(0x84c87814a1f0ab72), ULL(0x8cc702081a6439ec), + ULL(0x90befffa23631e28), ULL(0xa4506cebde82bde9), + ULL(0xbef9a3f7b2c67915), ULL(0xc67178f2e372532b), + ULL(0xca273eceea26619c), ULL(0xd186b8c721c0c207), + ULL(0xeada7dd6cde0eb1e), ULL(0xf57d4f7fee6ed178), + ULL(0x06f067aa72176fba), ULL(0x0a637dc5a2c898a6), + ULL(0x113f9804bef90dae), ULL(0x1b710b35131c471b), + ULL(0x28db77f523047d84), ULL(0x32caab7b40c72493), + ULL(0x3c9ebe0a15c9bebc), ULL(0x431d67c49c100d4c), + ULL(0x4cc5d4becb3e42b6), ULL(0x597f299cfc657e2a), + ULL(0x5fcb6fab3ad6faec), ULL(0x6c44198c4a475817) +}; + +/* Initial hash value H for SHA-384 */ +const static sha2_word64 sha384_initial_hash_value[8] = { + ULL(0xcbbb9d5dc1059ed8), + ULL(0x629a292a367cd507), + ULL(0x9159015a3070dd17), + ULL(0x152fecd8f70e5939), + ULL(0x67332667ffc00b31), + ULL(0x8eb44a8768581511), + ULL(0xdb0c2e0d64f98fa7), + ULL(0x47b5481dbefa4fa4) +}; + +/* Initial hash value H for SHA-512 */ +const static sha2_word64 sha512_initial_hash_value[8] = { + ULL(0x6a09e667f3bcc908), + ULL(0xbb67ae8584caa73b), + ULL(0x3c6ef372fe94f82b), + ULL(0xa54ff53a5f1d36f1), + ULL(0x510e527fade682d1), + ULL(0x9b05688c2b3e6c1f), + ULL(0x1f83d9abfb41bd6b), + ULL(0x5be0cd19137e2179) +}; + + +/*** SHA-256: *********************************************************/ +void SHA256_Init(SHA256_CTX* context) { + if (context == (SHA256_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH); + context->bitcount = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-256 round macros: */ + +#ifndef WORDS_BIGENDIAN + +#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ + REVERSE32(*data++, W256[j]); \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ + K256[j] + W256[j]; \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + + +#else + +#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \ + K256[j] + (W256[j] = *data++); \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + +#endif + +#define ROUND256(a,b,c,d,e,f,g,h) \ + s0 = W256[(j+1)&0x0f]; \ + s0 = sigma0_256(s0); \ + s1 = W256[(j+14)&0x0f]; \ + s1 = sigma1_256(s1); \ + T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \ + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \ + j++ + +void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { + sha2_word32 a, b, c, d, e, f, g, h, s0, s1; + sha2_word32 T1, *W256; + int j; + + W256 = (sha2_word32*)context->buffer; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { + /* Rounds 0 to 15 (unrolled): */ + ROUND256_0_TO_15(a,b,c,d,e,f,g,h); + ROUND256_0_TO_15(h,a,b,c,d,e,f,g); + ROUND256_0_TO_15(g,h,a,b,c,d,e,f); + ROUND256_0_TO_15(f,g,h,a,b,c,d,e); + ROUND256_0_TO_15(e,f,g,h,a,b,c,d); + ROUND256_0_TO_15(d,e,f,g,h,a,b,c); + ROUND256_0_TO_15(c,d,e,f,g,h,a,b); + ROUND256_0_TO_15(b,c,d,e,f,g,h,a); + } while (j < 16); + + /* Now for the remaining rounds to 64: */ + do { + ROUND256(a,b,c,d,e,f,g,h); + ROUND256(h,a,b,c,d,e,f,g); + ROUND256(g,h,a,b,c,d,e,f); + ROUND256(f,g,h,a,b,c,d,e); + ROUND256(e,f,g,h,a,b,c,d); + ROUND256(d,e,f,g,h,a,b,c); + ROUND256(c,d,e,f,g,h,a,b); + ROUND256(b,c,d,e,f,g,h,a); + } while (j < 64); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) { + sha2_word32 a, b, c, d, e, f, g, h, s0, s1; + sha2_word32 T1, T2, *W256; + int j; + + W256 = (sha2_word32*)context->buffer; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { +#ifndef WORDS_BIGENDIAN + /* Copy data while converting to host byte order */ + REVERSE32(*data++,W256[j]); + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j]; +#else + /* Apply the SHA-256 compression function to update a..h with copy */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++); +#endif + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W256[(j+1)&0x0f]; + s0 = sigma0_256(s0); + s1 = W256[(j+14)&0x0f]; + s1 = sigma1_256(s1); + + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 64); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) { + unsigned int freespace, usedspace; + + if (len == 0) { + /* Calling with no data is valid - we do nothing */ + return; + } + + /* Sanity check: */ + assert(context != NULL && data != NULL); + + usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA256_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); + context->bitcount += freespace << 3; + len -= freespace; + data += freespace; + SHA256_Transform(context, (sha2_word32*)context->buffer); + } else { + /* The buffer is not yet full */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, len); + context->bitcount += len << 3; + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA256_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA256_Transform(context, (const sha2_word32*)data); + context->bitcount += SHA256_BLOCK_LENGTH << 3; + len -= SHA256_BLOCK_LENGTH; + data += SHA256_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + MEMCPY_BCOPY(context->buffer, data, len); + context->bitcount += len << 3; + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void SHA256_Finish(SHA256_CTX* context, sha2_byte digest[]) { + sha2_word32 *d = (sha2_word32*)digest; + unsigned int usedspace; + + /* Sanity check: */ + assert(context != NULL); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; +#ifndef WORDS_BIGENDIAN + /* Convert FROM host byte order */ + REVERSE64(context->bitcount,context->bitcount); +#endif + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA256_BLOCK_LENGTH) { + MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA256_Transform(context, (sha2_word32*)context->buffer); + + /* And set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); + } + } else { + /* Set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Set the bit count: */ + *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; + + /* Final transform: */ + SHA256_Transform(context, (sha2_word32*)context->buffer); + +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 8; j++) { + REVERSE32(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH); +#endif + } + + /* Clean up state data: */ + MEMSET_BZERO(context, sizeof(SHA256_CTX)); + usedspace = 0; +} + +/*** SHA-512: *********************************************************/ +void SHA512_Init(SHA512_CTX* context) { + if (context == (SHA512_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH); + context->bitcount[0] = context->bitcount[1] = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-512 round macros: */ +#ifndef WORDS_BIGENDIAN + +#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \ + REVERSE64(*data++, W512[j]); \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \ + K512[j] + W512[j]; \ + (d) += T1, \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \ + j++ + + +#else + +#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \ + K512[j] + (W512[j] = *data++); \ + (d) += T1; \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \ + j++ + +#endif + +#define ROUND512(a,b,c,d,e,f,g,h) \ + s0 = W512[(j+1)&0x0f]; \ + s0 = sigma0_512(s0); \ + s1 = W512[(j+14)&0x0f]; \ + s1 = sigma1_512(s1); \ + T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \ + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \ + j++ + +void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { + sha2_word64 a, b, c, d, e, f, g, h, s0, s1; + sha2_word64 T1, *W512 = (sha2_word64*)context->buffer; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { + ROUND512_0_TO_15(a,b,c,d,e,f,g,h); + ROUND512_0_TO_15(h,a,b,c,d,e,f,g); + ROUND512_0_TO_15(g,h,a,b,c,d,e,f); + ROUND512_0_TO_15(f,g,h,a,b,c,d,e); + ROUND512_0_TO_15(e,f,g,h,a,b,c,d); + ROUND512_0_TO_15(d,e,f,g,h,a,b,c); + ROUND512_0_TO_15(c,d,e,f,g,h,a,b); + ROUND512_0_TO_15(b,c,d,e,f,g,h,a); + } while (j < 16); + + /* Now for the remaining rounds up to 79: */ + do { + ROUND512(a,b,c,d,e,f,g,h); + ROUND512(h,a,b,c,d,e,f,g); + ROUND512(g,h,a,b,c,d,e,f); + ROUND512(f,g,h,a,b,c,d,e); + ROUND512(e,f,g,h,a,b,c,d); + ROUND512(d,e,f,g,h,a,b,c); + ROUND512(c,d,e,f,g,h,a,b); + ROUND512(b,c,d,e,f,g,h,a); + } while (j < 80); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) { + sha2_word64 a, b, c, d, e, f, g, h, s0, s1; + sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = context->state[0]; + b = context->state[1]; + c = context->state[2]; + d = context->state[3]; + e = context->state[4]; + f = context->state[5]; + g = context->state[6]; + h = context->state[7]; + + j = 0; + do { +#ifndef WORDS_BIGENDIAN + /* Convert TO host byte order */ + REVERSE64(*data++, W512[j]); + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j]; +#else + /* Apply the SHA-512 compression function to update a..h with copy */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++); +#endif + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W512[(j+1)&0x0f]; + s0 = sigma0_512(s0); + s1 = W512[(j+14)&0x0f]; + s1 = sigma1_512(s1); + + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 80); + + /* Compute the current intermediate hash value */ + context->state[0] += a; + context->state[1] += b; + context->state[2] += c; + context->state[3] += d; + context->state[4] += e; + context->state[5] += f; + context->state[6] += g; + context->state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) { + unsigned int freespace, usedspace; + + if (len == 0) { + /* Calling with no data is valid - we do nothing */ + return; + } + + /* Sanity check: */ + assert(context != NULL && data != NULL); + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA512_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); + ADDINC128(context->bitcount, freespace << 3); + len -= freespace; + data += freespace; + SHA512_Transform(context, (const sha2_word64*)context->buffer); + } else { + /* The buffer is not yet full */ + MEMCPY_BCOPY(&context->buffer[usedspace], data, len); + ADDINC128(context->bitcount, len << 3); + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA512_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA512_Transform(context, (const sha2_word64*)data); + ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3); + len -= SHA512_BLOCK_LENGTH; + data += SHA512_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + MEMCPY_BCOPY(context->buffer, data, len); + ADDINC128(context->bitcount, len << 3); + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void SHA512_Last(SHA512_CTX* context) { + unsigned int usedspace; + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; +#ifndef WORDS_BIGENDIAN + /* Convert FROM host byte order */ + REVERSE64(context->bitcount[0],context->bitcount[0]); + REVERSE64(context->bitcount[1],context->bitcount[1]); +#endif + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA512_BLOCK_LENGTH) { + MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA512_Transform(context, (const sha2_word64*)context->buffer); + + /* And set-up for the last transform: */ + MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2); + } + } else { + /* Prepare for final transform: */ + MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Store the length of input data (in bits): */ + *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; + *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; + + /* Final transform: */ + SHA512_Transform(context, (const sha2_word64*)context->buffer); +} + +void SHA512_Finish(SHA512_CTX* context, sha2_byte digest[]) { + sha2_word64 *d = (sha2_word64*)digest; + + /* Sanity check: */ + assert(context != NULL); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + SHA512_Last(context); + + /* Save the hash data for output: */ +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 8; j++) { + REVERSE64(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH); +#endif + } + + /* Zero out state data */ + MEMSET_BZERO(context, sizeof(SHA512_CTX)); +} + +/*** SHA-384: *********************************************************/ +void SHA384_Init(SHA384_CTX* context) { + if (context == (SHA384_CTX*)0) { + return; + } + MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH); + MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH); + context->bitcount[0] = context->bitcount[1] = 0; +} + +void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) { + SHA512_Update((SHA512_CTX*)context, data, len); +} + +void SHA384_Finish(SHA384_CTX* context, sha2_byte digest[]) { + sha2_word64 *d = (sha2_word64*)digest; + + /* Sanity check: */ + assert(context != NULL); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != (sha2_byte*)0) { + SHA512_Last((SHA512_CTX*)context); + + /* Save the hash data for output: */ +#ifndef WORDS_BIGENDIAN + { + /* Convert TO host byte order */ + int j; + for (j = 0; j < 6; j++) { + REVERSE64(context->state[j],context->state[j]); + *d++ = context->state[j]; + } + } +#else + MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH); +#endif + } + + /* Zero out state data */ + MEMSET_BZERO(context, sizeof(SHA384_CTX)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.h b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.h new file mode 100644 index 0000000..b83155c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2.h @@ -0,0 +1,109 @@ +/* + * sha2.h + * + * Version 1.0.0beta1 + * + * Written by Aaron D. Gifford + * + * Copyright 2000 Aaron D. Gifford. 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. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR 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(S) OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR 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. + * + */ + +/* $RoughId: sha2.h,v 1.3 2002/02/24 08:14:32 knu Exp $ */ +/* $Id: sha2.h 11708 2007-02-12 23:01:19Z shyouhei $ */ + +#ifndef __SHA2_H__ +#define __SHA2_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "defs.h" + + +/*** SHA-256/384/512 Various Length Definitions ***********************/ +#define SHA256_BLOCK_LENGTH 64 +#define SHA256_DIGEST_LENGTH 32 +#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) +#define SHA384_BLOCK_LENGTH 128 +#define SHA384_DIGEST_LENGTH 48 +#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1) +#define SHA512_BLOCK_LENGTH 128 +#define SHA512_DIGEST_LENGTH 64 +#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) + + +/*** SHA-256/384/512 Context Structures *******************************/ + +typedef struct _SHA256_CTX { + uint32_t state[8]; + uint64_t bitcount; + uint8_t buffer[SHA256_BLOCK_LENGTH]; +} SHA256_CTX; +typedef struct _SHA512_CTX { + uint64_t state[8]; + uint64_t bitcount[2]; + uint8_t buffer[SHA512_BLOCK_LENGTH]; +} SHA512_CTX; + +typedef SHA512_CTX SHA384_CTX; + + +#ifdef RUBY +#define SHA256_Init rb_Digest_SHA256_Init +#define SHA256_Update rb_Digest_SHA256_Update +#define SHA256_Finish rb_Digest_SHA256_Finish + +#define SHA384_Init rb_Digest_SHA384_Init +#define SHA384_Update rb_Digest_SHA384_Update +#define SHA384_Finish rb_Digest_SHA384_Finish + +#define SHA512_Init rb_Digest_SHA512_Init +#define SHA512_Update rb_Digest_SHA512_Update +#define SHA512_Finish rb_Digest_SHA512_Finish +#endif + +/*** SHA-256/384/512 Function Prototypes ******************************/ +void SHA256_Init _((SHA256_CTX *)); +void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t)); +void SHA256_Finish _((SHA256_CTX*, uint8_t[SHA256_DIGEST_LENGTH])); + +void SHA384_Init _((SHA384_CTX*)); +void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t)); +void SHA384_Finish _((SHA384_CTX*, uint8_t[SHA384_DIGEST_LENGTH])); + +void SHA512_Init _((SHA512_CTX*)); +void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t)); +void SHA512_Finish _((SHA512_CTX*, uint8_t[SHA512_DIGEST_LENGTH])); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __SHA2_H__ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2init.c b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2init.c new file mode 100644 index 0000000..9b4b95e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/sha2/sha2init.c @@ -0,0 +1,52 @@ +/* $RoughId: sha2init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */ +/* $Id: sha2init.c 19020 2008-09-01 07:48:53Z nobu $ */ + +#include "digest.h" +#include "sha2.h" + +#define FOREACH_BITLEN(func) func(256) func(384) func(512) + +#define DEFINE_ALGO_METADATA(bitlen) \ +static const rb_digest_metadata_t sha##bitlen = { \ + RUBY_DIGEST_API_VERSION, \ + SHA##bitlen##_DIGEST_LENGTH, \ + SHA##bitlen##_BLOCK_LENGTH, \ + sizeof(SHA##bitlen##_CTX), \ + (rb_digest_hash_init_func_t)SHA##bitlen##_Init, \ + (rb_digest_hash_update_func_t)SHA##bitlen##_Update, \ + (rb_digest_hash_finish_func_t)SHA##bitlen##_Finish, \ +}; + +FOREACH_BITLEN(DEFINE_ALGO_METADATA) + +/* + * Classes for calculating message digests using the SHA-256/384/512 + * Secure Hash Algorithm(s) by NIST (the US' National Institute of + * Standards and Technology), described in FIPS PUB 180-2. + */ +void +Init_sha2() +{ + VALUE mDigest, cDigest_Base; + ID id_metadata; + +#define DECLARE_ALGO_CLASS(bitlen) \ + VALUE cDigest_SHA##bitlen; + + FOREACH_BITLEN(DECLARE_ALGO_CLASS) + + rb_require("digest"); + + id_metadata = rb_intern("metadata"); + + mDigest = rb_path2class("Digest"); + cDigest_Base = rb_path2class("Digest::Base"); + +#define DEFINE_ALGO_CLASS(bitlen) \ + cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \ +\ + rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \ + Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&sha##bitlen)); + + FOREACH_BITLEN(DEFINE_ALGO_CLASS) +} diff --git a/lib/ruby-1.9.1-rc1/ext/digest/test.sh b/lib/ruby-1.9.1-rc1/ext/digest/test.sh new file mode 100644 index 0000000..3d9e1d5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/digest/test.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $RoughId: test.sh,v 1.5 2001/07/13 15:38:27 knu Exp $ +# $Id: test.sh 11708 2007-02-12 23:01:19Z shyouhei $ + +RUBY=${RUBY:=ruby} +MAKE=${MAKE:=make} +CFLAGS=${CFLAGS:=-Wall} + +${RUBY} extconf.rb --with-cflags="${CFLAGS}" +${MAKE} clean +${MAKE} + +for algo in md5 rmd160 sha1 sha2; do + args=--with-cflags="${CFLAGS}" + + if [ $WITH_BUNDLED_ENGINES ]; then + args="$args --with-bundled-$algo" + fi + + (cd $algo && + ${RUBY} extconf.rb $args; + ${MAKE} clean; + ${MAKE}) + ln -sf ../../$algo/$algo.so lib/digest/ +done + +${RUBY} -I. -I./lib ../../test/digest/test_digest.rb + +rm lib/digest/*.so diff --git a/lib/ruby-1.9.1-rc1/ext/dl/.cvsignore b/lib/ruby-1.9.1-rc1/ext/dl/.cvsignore new file mode 100644 index 0000000..6c0b25a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/.cvsignore @@ -0,0 +1,10 @@ +Makefile +mkmf.log +dlconfig.h +dlconfig.rb +callback.h +*.func +*.o +*~ +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/dl/cfunc.c b/lib/ruby-1.9.1-rc1/ext/dl/cfunc.c new file mode 100644 index 0000000..d7051b3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/cfunc.c @@ -0,0 +1,516 @@ +/* -*- C -*- + * $Id: cfunc.c 18496 2008-08-11 11:33:44Z matz $ + */ + +#include +#include +#include "dl.h" + +VALUE rb_cDLCFunc; + +static ID id_last_error; + +static VALUE +rb_dl_get_last_error(VALUE self) +{ + return rb_thread_local_aref(rb_thread_current(), id_last_error); +} + +static VALUE +rb_dl_set_last_error(VALUE self, VALUE val) +{ + rb_thread_local_aset(rb_thread_current(), id_last_error, val); + return Qnil; +} + +#if defined(HAVE_WINDOWS_H) +#include +static ID id_win32_last_error; + +static VALUE +rb_dl_get_win32_last_error(VALUE self) +{ + return rb_thread_local_aref(rb_thread_current(), id_win32_last_error); +} + +static VALUE +rb_dl_set_win32_last_error(VALUE self, VALUE val) +{ + rb_thread_local_aset(rb_thread_current(), id_win32_last_error, val); + return Qnil; +} +#endif + + +void +dlcfunc_free(struct cfunc_data *data) +{ + if( data->name ){ + xfree(data->name); + } + xfree(data); +} + +VALUE +rb_dlcfunc_new(void (*func)(), int type, const char *name, ID calltype) +{ + VALUE val; + struct cfunc_data *data; + + rb_secure(4); + if( func ){ + val = Data_Make_Struct(rb_cDLCFunc, struct cfunc_data, 0, dlcfunc_free, data); + data->ptr = func; + data->name = name ? strdup(name) : NULL; + data->type = type; + data->calltype = calltype; + } + else{ + val = Qnil; + } + + return val; +} + +void * +rb_dlcfunc2ptr(VALUE val) +{ + struct cfunc_data *data; + void * func; + + if( rb_obj_is_kind_of(val, rb_cDLCFunc) ){ + Data_Get_Struct(val, struct cfunc_data, data); + func = data->ptr; + } + else if( val == Qnil ){ + func = NULL; + } + else{ + rb_raise(rb_eTypeError, "DL::CFunc was expected"); + } + + return func; +} + +VALUE +rb_dlcfunc_s_allocate(VALUE klass) +{ + VALUE obj; + struct cfunc_data *data; + + obj = Data_Make_Struct(klass, struct cfunc_data, 0, dlcfunc_free, data); + data->ptr = 0; + data->name = 0; + data->type = 0; + data->calltype = CFUNC_CDECL; + + return obj; +} + +VALUE +rb_dlcfunc_initialize(int argc, VALUE argv[], VALUE self) +{ + VALUE addr, name, type, calltype; + struct cfunc_data *data; + void *saddr; + const char *sname; + + rb_scan_args(argc, argv, "13", &addr, &type, &name, &calltype); + + saddr = (void*)(NUM2PTR(rb_Integer(addr))); + sname = NIL_P(name) ? NULL : StringValuePtr(name); + + Data_Get_Struct(self, struct cfunc_data, data); + if( data->name ) xfree(data->name); + data->ptr = saddr; + data->name = sname ? strdup(sname) : 0; + data->type = (type == Qnil) ? DLTYPE_VOID : NUM2INT(type); + data->calltype = (calltype == Qnil) ? CFUNC_CDECL : SYM2ID(calltype); + + return Qnil; +} + +VALUE +rb_dlcfunc_name(VALUE self) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + return cfunc->name ? rb_tainted_str_new2(cfunc->name) : Qnil; +} + +VALUE +rb_dlcfunc_ctype(VALUE self) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + return INT2NUM(cfunc->type); +} + +VALUE +rb_dlcfunc_set_ctype(VALUE self, VALUE ctype) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + cfunc->type = NUM2INT(ctype); + return ctype; +} + +VALUE +rb_dlcfunc_calltype(VALUE self) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + return ID2SYM(cfunc->calltype); +} + +VALUE +rb_dlcfunc_set_calltype(VALUE self, VALUE sym) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + cfunc->calltype = SYM2ID(sym); + return sym; +} + + +VALUE +rb_dlcfunc_ptr(VALUE self) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + return PTR2NUM(cfunc->ptr); +} + +VALUE +rb_dlcfunc_set_ptr(VALUE self, VALUE addr) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + cfunc->ptr = NUM2PTR(addr); + + return Qnil; +} + +VALUE +rb_dlcfunc_inspect(VALUE self) +{ + VALUE val; + char *str; + int str_size; + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + + str_size = (cfunc->name ? strlen(cfunc->name) : 0) + 100; + str = ruby_xmalloc(str_size); + snprintf(str, str_size - 1, + "#", + cfunc, + cfunc->ptr, + cfunc->type, + cfunc->name ? cfunc->name : ""); + val = rb_tainted_str_new2(str); + ruby_xfree(str); + + return val; +} + + +# define DECL_FUNC_CDECL(f,ret,args) ret (FUNC_CDECL(*f))(args) +# define DECL_FUNC_STDCALL(f,ret,args) ret (FUNC_STDCALL(*f))(args) + +#define CALL_CASE switch( RARRAY_LEN(ary) ){ \ + CASE(0); break; \ + CASE(1); break; CASE(2); break; CASE(3); break; CASE(4); break; CASE(5); break; \ + CASE(6); break; CASE(7); break; CASE(8); break; CASE(9); break; CASE(10);break; \ + CASE(11);break; CASE(12);break; CASE(13);break; CASE(14);break; CASE(15);break; \ + CASE(16);break; CASE(17);break; CASE(18);break; CASE(19);break; CASE(20);break; \ + default: rb_raise(rb_eArgError, "too many arguments"); \ +} + + +VALUE +rb_dlcfunc_call(VALUE self, VALUE ary) +{ + struct cfunc_data *cfunc; + int i; + DLSTACK_TYPE stack[DLSTACK_SIZE]; + VALUE result = Qnil; + + rb_secure_update(self); + + memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE); + Check_Type(ary, T_ARRAY); + + Data_Get_Struct(self, struct cfunc_data, cfunc); + + if( cfunc->ptr == 0 ){ + rb_raise(rb_eDLError, "can't call null-function"); + return Qnil; + } + + for( i = 0; i < RARRAY_LEN(ary); i++ ){ + if( i >= DLSTACK_SIZE ){ + rb_raise(rb_eDLError, "too many arguments (stack overflow)"); + } + rb_check_safe_obj(RARRAY_PTR(ary)[i]); + stack[i] = NUM2LONG(RARRAY_PTR(ary)[i]); + } + + /* calltype == CFUNC_CDECL */ + if( cfunc->calltype == CFUNC_CDECL ){ + switch( cfunc->type ){ + case DLTYPE_VOID: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,void,DLSTACK_PROTO##n) = cfunc->ptr; \ + f(DLSTACK_ARGS##n(stack)); \ + result = Qnil; \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_VOIDP: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,void*,DLSTACK_PROTO##n) = cfunc->ptr; \ + void * ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = PTR2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_CHAR: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,char,DLSTACK_PROTO##n) = cfunc->ptr; \ + char ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = CHR2FIX(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_SHORT: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,short,DLSTACK_PROTO##n) = cfunc->ptr; \ + short ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = INT2NUM((int)ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_INT: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,int,DLSTACK_PROTO##n) = cfunc->ptr; \ + int ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = INT2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_LONG: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,long,DLSTACK_PROTO##n) = cfunc->ptr; \ + long ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = LONG2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; +#if HAVE_LONG_LONG /* used in ruby.h */ + case DLTYPE_LONG_LONG: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,LONG_LONG,DLSTACK_PROTO) = cfunc->ptr; \ + LONG_LONG ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = LL2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; +#endif + case DLTYPE_FLOAT: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,float,DLSTACK_PROTO) = cfunc->ptr; \ + float ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = rb_float_new(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_DOUBLE: +#define CASE(n) case n: { \ + DECL_FUNC_CDECL(f,double,DLSTACK_PROTO) = cfunc->ptr; \ + double ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = rb_float_new(ret); \ +} + CALL_CASE; +#undef CASE + break; + default: + rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type); + } + } + else if( cfunc->calltype == CFUNC_STDCALL ){ + /* calltype == CFUNC_STDCALL */ + switch( cfunc->type ){ + case DLTYPE_VOID: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,void,DLSTACK_PROTO##n) = cfunc->ptr; \ + f(DLSTACK_ARGS##n(stack)); \ + result = Qnil; \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_VOIDP: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,void*,DLSTACK_PROTO##n) = cfunc->ptr; \ + void * ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = PTR2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_CHAR: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,char,DLSTACK_PROTO##n) = cfunc->ptr; \ + char ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = CHR2FIX(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_SHORT: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,short,DLSTACK_PROTO##n) = cfunc->ptr; \ + short ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = INT2NUM((int)ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_INT: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,int,DLSTACK_PROTO##n) = cfunc->ptr; \ + int ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = INT2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_LONG: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,long,DLSTACK_PROTO##n) = cfunc->ptr; \ + long ret; \ + ret = f(DLSTACK_ARGS##n(stack)); \ + result = LONG2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; +#if HAVE_LONG_LONG /* used in ruby.h */ + case DLTYPE_LONG_LONG: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,LONG_LONG,DLSTACK_PROTO) = cfunc->ptr; \ + LONG_LONG ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = LL2NUM(ret); \ +} + CALL_CASE; +#undef CASE + break; +#endif + case DLTYPE_FLOAT: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,float,DLSTACK_PROTO) = cfunc->ptr; \ + float ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = rb_float_new(ret); \ +} + CALL_CASE; +#undef CASE + break; + case DLTYPE_DOUBLE: +#define CASE(n) case n: { \ + DECL_FUNC_STDCALL(f,double,DLSTACK_PROTO) = cfunc->ptr; \ + double ret; \ + ret = f(DLSTACK_ARGS(stack)); \ + result = rb_float_new(ret); \ +} + CALL_CASE; +#undef CASE + break; + default: + rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type); + } + } + else{ + rb_raise(rb_eDLError, +#ifndef LONG_LONG_VALUE + "unsupported call type: %lx", +#else + "unsupported call type: %llx", +#endif + cfunc->calltype); + } + + rb_dl_set_last_error(self, INT2NUM(errno)); +#if defined(HAVE_WINDOWS_H) + rb_dl_set_win32_last_error(self, INT2NUM(GetLastError())); +#endif + + return result; +} + +VALUE +rb_dlcfunc_to_i(VALUE self) +{ + struct cfunc_data *cfunc; + + Data_Get_Struct(self, struct cfunc_data, cfunc); + return PTR2NUM(cfunc->ptr); +} + +void +Init_dlcfunc() +{ + id_last_error = rb_intern("__DL2_LAST_ERROR__"); +#if defined(HAVE_WINDOWS_H) + id_win32_last_error = rb_intern("__DL2_WIN32_LAST_ERROR__"); +#endif + rb_cDLCFunc = rb_define_class_under(rb_mDL, "CFunc", rb_cObject); + rb_define_alloc_func(rb_cDLCFunc, rb_dlcfunc_s_allocate); + rb_define_module_function(rb_cDLCFunc, "last_error", rb_dl_get_last_error, 0); +#if defined(HAVE_WINDOWS_H) + rb_define_module_function(rb_cDLCFunc, "win32_last_error", rb_dl_get_win32_last_error, 0); +#endif + rb_define_method(rb_cDLCFunc, "initialize", rb_dlcfunc_initialize, -1); + rb_define_method(rb_cDLCFunc, "call", rb_dlcfunc_call, 1); + rb_define_method(rb_cDLCFunc, "[]", rb_dlcfunc_call, 1); + rb_define_method(rb_cDLCFunc, "name", rb_dlcfunc_name, 0); + rb_define_method(rb_cDLCFunc, "ctype", rb_dlcfunc_ctype, 0); + rb_define_method(rb_cDLCFunc, "ctype=", rb_dlcfunc_set_ctype, 1); + rb_define_method(rb_cDLCFunc, "calltype", rb_dlcfunc_calltype, 0); + rb_define_method(rb_cDLCFunc, "calltype=", rb_dlcfunc_set_calltype, 1); + rb_define_method(rb_cDLCFunc, "ptr", rb_dlcfunc_ptr, 0); + rb_define_method(rb_cDLCFunc, "ptr=", rb_dlcfunc_set_ptr, 1); + rb_define_method(rb_cDLCFunc, "inspect", rb_dlcfunc_inspect, 0); + rb_define_method(rb_cDLCFunc, "to_s", rb_dlcfunc_inspect, 0); + rb_define_method(rb_cDLCFunc, "to_i", rb_dlcfunc_to_i, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/dl/cptr.c b/lib/ruby-1.9.1-rc1/ext/dl/cptr.c new file mode 100644 index 0000000..1b7413d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/cptr.c @@ -0,0 +1,482 @@ +/* -*- C -*- + * $Id: cptr.c 18510 2008-08-12 05:15:18Z nobu $ + */ + +#include +#include +#include +#include "dl.h" + +VALUE rb_cDLCPtr; + +static ID id_to_ptr; + +static void +dlptr_free(struct ptr_data *data) +{ + if (data->ptr) { + if (data->free) { + (*(data->free))(data->ptr); + } + } +} + +static void +dlptr_mark(struct ptr_data *data) +{ +} + +void +dlptr_init(VALUE val) +{ + struct ptr_data *data; + + Data_Get_Struct(val, struct ptr_data, data); + OBJ_TAINT(val); +} + +VALUE +rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func) +{ + struct ptr_data *data; + VALUE val; + + rb_secure(4); + val = Data_Make_Struct(klass, struct ptr_data, + 0, dlptr_free, data); + data->ptr = ptr; + data->free = func; + data->size = size; + dlptr_init(val); + + return val; +} + +VALUE +rb_dlptr_new(void *ptr, long size, freefunc_t func) +{ + return rb_dlptr_new2(rb_cDLCPtr, ptr, size, func); +} + +VALUE +rb_dlptr_malloc(long size, freefunc_t func) +{ + void *ptr; + + rb_secure(4); + ptr = ruby_xmalloc((size_t)size); + memset(ptr,0,(size_t)size); + return rb_dlptr_new(ptr, size, func); +} + +void * +rb_dlptr2cptr(VALUE val) +{ + struct ptr_data *data; + void *ptr; + + if (rb_obj_is_kind_of(val, rb_cDLCPtr)) { + Data_Get_Struct(val, struct ptr_data, data); + ptr = data->ptr; + } + else if (val == Qnil) { + ptr = NULL; + } + else{ + rb_raise(rb_eTypeError, "DL::PtrData was expected"); + } + + return ptr; +} + +static VALUE +rb_dlptr_s_allocate(VALUE klass) +{ + VALUE obj; + struct ptr_data *data; + + rb_secure(4); + obj = Data_Make_Struct(klass, struct ptr_data, dlptr_mark, dlptr_free, data); + data->ptr = 0; + data->size = 0; + data->free = 0; + + return obj; +} + +static VALUE +rb_dlptr_initialize(int argc, VALUE argv[], VALUE self) +{ + VALUE ptr, sym, size; + struct ptr_data *data; + void *p = NULL; + freefunc_t f = NULL; + long s = 0; + + switch (rb_scan_args(argc, argv, "12", &ptr, &size, &sym)) { + case 1: + p = (void*)(NUM2PTR(rb_Integer(ptr))); + break; + case 2: + p = (void*)(NUM2PTR(rb_Integer(ptr))); + s = NUM2LONG(size); + break; + case 3: + p = (void*)(NUM2PTR(rb_Integer(ptr))); + s = NUM2LONG(size); + f = NIL_P(sym) ? NULL : RCFUNC_DATA(sym)->ptr; + break; + default: + rb_bug("rb_dlptr_initialize"); + } + + if (p) { + Data_Get_Struct(self, struct ptr_data, data); + if (data->ptr && data->free) { + /* Free previous memory. Use of inappropriate initialize may cause SEGV. */ + (*(data->free))(data->ptr); + } + data->ptr = p; + data->size = s; + data->free = f; + } + + return Qnil; +} + +static VALUE +rb_dlptr_s_malloc(int argc, VALUE argv[], VALUE klass) +{ + VALUE size, sym, obj; + int s; + freefunc_t f; + + switch (rb_scan_args(argc, argv, "11", &size, &sym)) { + case 1: + s = NUM2LONG(size); + f = NULL; + break; + case 2: + s = NUM2LONG(size); + f = RCFUNC_DATA(sym)->ptr; + break; + default: + rb_bug("rb_dlptr_s_malloc"); + } + + obj = rb_dlptr_malloc(s,f); + + return obj; +} + +VALUE +rb_dlptr_to_i(VALUE self) +{ + struct ptr_data *data; + + Data_Get_Struct(self, struct ptr_data, data); + return PTR2NUM(data->ptr); +} + +VALUE +rb_dlptr_to_value(VALUE self) +{ + struct ptr_data *data; + Data_Get_Struct(self, struct ptr_data, data); + return (VALUE)(data->ptr); +} + +VALUE +rb_dlptr_ptr(VALUE self) +{ + struct ptr_data *data; + + Data_Get_Struct(self, struct ptr_data, data); + return rb_dlptr_new(*((void**)(data->ptr)),0,0); +} + +VALUE +rb_dlptr_ref(VALUE self) +{ + struct ptr_data *data; + + Data_Get_Struct(self, struct ptr_data, data); + return rb_dlptr_new(&(data->ptr),0,0); +} + +VALUE +rb_dlptr_null_p(VALUE self) +{ + struct ptr_data *data; + + Data_Get_Struct(self, struct ptr_data, data); + return data->ptr ? Qfalse : Qtrue; +} + +VALUE +rb_dlptr_free_set(VALUE self, VALUE val) +{ + struct ptr_data *data; + extern VALUE rb_cDLCFunc; + + Data_Get_Struct(self, struct ptr_data, data); + if( rb_obj_is_kind_of(val, rb_cDLCFunc) == Qtrue ){ + data->free = RCFUNC_DATA(val)->ptr; + } + else{ + data->free = NUM2PTR(rb_Integer(val)); + } + + return Qnil; +} + +VALUE +rb_dlptr_free_get(VALUE self) +{ + struct ptr_data *pdata; + + Data_Get_Struct(self, struct ptr_data, pdata); + + return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free", CFUNC_CDECL); +} + +VALUE +rb_dlptr_to_s(int argc, VALUE argv[], VALUE self) +{ + struct ptr_data *data; + VALUE arg1, val; + int len; + + Data_Get_Struct(self, struct ptr_data, data); + switch (rb_scan_args(argc, argv, "01", &arg1)) { + case 0: + val = rb_tainted_str_new2((char*)(data->ptr)); + break; + case 1: + len = NUM2INT(arg1); + val = rb_tainted_str_new((char*)(data->ptr), len); + break; + default: + rb_bug("rb_dlptr_to_s"); + } + + return val; +} + +VALUE +rb_dlptr_to_str(int argc, VALUE argv[], VALUE self) +{ + struct ptr_data *data; + VALUE arg1, val; + int len; + + Data_Get_Struct(self, struct ptr_data, data); + switch (rb_scan_args(argc, argv, "01", &arg1)) { + case 0: + val = rb_tainted_str_new((char*)(data->ptr),data->size); + break; + case 1: + len = NUM2INT(arg1); + val = rb_tainted_str_new((char*)(data->ptr), len); + break; + default: + rb_bug("rb_dlptr_to_str"); + } + + return val; +} + +VALUE +rb_dlptr_inspect(VALUE self) +{ + struct ptr_data *data; + char str[1024]; + + Data_Get_Struct(self, struct ptr_data, data); + snprintf(str, 1023, "#<%s:%p ptr=%p size=%ld free=%p>", + rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free); + return rb_str_new2(str); +} + +VALUE +rb_dlptr_eql(VALUE self, VALUE other) +{ + void *ptr1, *ptr2; + ptr1 = rb_dlptr2cptr(self); + ptr2 = rb_dlptr2cptr(other); + + return ptr1 == ptr2 ? Qtrue : Qfalse; +} + +VALUE +rb_dlptr_cmp(VALUE self, VALUE other) +{ + void *ptr1, *ptr2; + ptr1 = rb_dlptr2cptr(self); + ptr2 = rb_dlptr2cptr(other); + return PTR2NUM((long)ptr1 - (long)ptr2); +} + +VALUE +rb_dlptr_plus(VALUE self, VALUE other) +{ + void *ptr; + long num, size; + + ptr = rb_dlptr2cptr(self); + size = RPTR_DATA(self)->size; + num = NUM2LONG(other); + return rb_dlptr_new((char *)ptr + num, size - num, 0); +} + +VALUE +rb_dlptr_minus(VALUE self, VALUE other) +{ + void *ptr; + long num, size; + + ptr = rb_dlptr2cptr(self); + size = RPTR_DATA(self)->size; + num = NUM2LONG(other); + return rb_dlptr_new((char *)ptr - num, size + num, 0); +} + +VALUE +rb_dlptr_aref(int argc, VALUE argv[], VALUE self) +{ + VALUE arg0, arg1; + VALUE retval = Qnil; + size_t offset, len; + + switch( rb_scan_args(argc, argv, "11", &arg0, &arg1) ){ + case 1: + offset = NUM2ULONG(arg0); + retval = INT2NUM(*((char*)RPTR_DATA(self)->ptr + offset)); + break; + case 2: + offset = NUM2ULONG(arg0); + len = NUM2ULONG(arg1); + retval = rb_tainted_str_new((char *)RPTR_DATA(self)->ptr + offset, len); + break; + default: + rb_bug("rb_dlptr_aref()"); + } + return retval; +} + +VALUE +rb_dlptr_aset(int argc, VALUE argv[], VALUE self) +{ + VALUE arg0, arg1, arg2; + VALUE retval = Qnil; + size_t offset, len; + void *mem; + + switch( rb_scan_args(argc, argv, "21", &arg0, &arg1, &arg2) ){ + case 2: + offset = NUM2ULONG(arg0); + ((char*)RPTR_DATA(self)->ptr)[offset] = NUM2UINT(arg1); + retval = arg1; + break; + case 3: + offset = NUM2ULONG(arg0); + len = NUM2ULONG(arg1); + if( TYPE(arg2) == T_STRING ){ + mem = StringValuePtr(arg2); + } + else if( rb_obj_is_kind_of(arg2, rb_cDLCPtr) ){ + mem = rb_dlptr2cptr(arg2); + } + else{ + mem = NUM2PTR(arg2); + } + memcpy((char *)RPTR_DATA(self)->ptr + offset, mem, len); + retval = arg2; + break; + default: + rb_bug("rb_dlptr_aset()"); + } + return retval; +} + +VALUE +rb_dlptr_size(int argc, VALUE argv[], VALUE self) +{ + VALUE size; + + if (rb_scan_args(argc, argv, "01", &size) == 0){ + return LONG2NUM(RPTR_DATA(self)->size); + } + else{ + RPTR_DATA(self)->size = NUM2LONG(size); + return size; + } +} + +VALUE +rb_dlptr_s_to_ptr(VALUE self, VALUE val) +{ + VALUE ptr; + + if (rb_obj_is_kind_of(val, rb_cIO) == Qtrue){ + rb_io_t *fptr; + FILE *fp; + GetOpenFile(val, fptr); + fp = rb_io_stdio_file(fptr); + ptr = rb_dlptr_new(fp, 0, NULL); + } + else if (rb_obj_is_kind_of(val, rb_cString) == Qtrue){ + char *str = StringValuePtr(val); + ptr = rb_dlptr_new(str, RSTRING_LEN(val), NULL); + } + else if (rb_respond_to(val, id_to_ptr)){ + VALUE vptr = rb_funcall(val, id_to_ptr, 0); + if (rb_obj_is_kind_of(vptr, rb_cDLCPtr)){ + ptr = vptr; + } + else{ + rb_raise(rb_eDLError, "to_ptr should return a CPtr object"); + } + } + else{ + ptr = rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL); + } + OBJ_INFECT(ptr, val); + return ptr; +} + +void +Init_dlptr() +{ + id_to_ptr = rb_intern("to_ptr"); + + rb_cDLCPtr = rb_define_class_under(rb_mDL, "CPtr", rb_cObject); + rb_define_alloc_func(rb_cDLCPtr, rb_dlptr_s_allocate); + rb_define_singleton_method(rb_cDLCPtr, "malloc", rb_dlptr_s_malloc, -1); + rb_define_singleton_method(rb_cDLCPtr, "to_ptr", rb_dlptr_s_to_ptr, 1); + rb_define_singleton_method(rb_cDLCPtr, "[]", rb_dlptr_s_to_ptr, 1); + rb_define_method(rb_cDLCPtr, "initialize", rb_dlptr_initialize, -1); + rb_define_method(rb_cDLCPtr, "free=", rb_dlptr_free_set, 1); + rb_define_method(rb_cDLCPtr, "free", rb_dlptr_free_get, 0); + rb_define_method(rb_cDLCPtr, "to_i", rb_dlptr_to_i, 0); + rb_define_method(rb_cDLCPtr, "to_value", rb_dlptr_to_value, 0); + rb_define_method(rb_cDLCPtr, "ptr", rb_dlptr_ptr, 0); + rb_define_method(rb_cDLCPtr, "+@", rb_dlptr_ptr, 0); + rb_define_method(rb_cDLCPtr, "ref", rb_dlptr_ref, 0); + rb_define_method(rb_cDLCPtr, "-@", rb_dlptr_ref, 0); + rb_define_method(rb_cDLCPtr, "null?", rb_dlptr_null_p, 0); + rb_define_method(rb_cDLCPtr, "to_s", rb_dlptr_to_s, -1); + rb_define_method(rb_cDLCPtr, "to_str", rb_dlptr_to_str, -1); + rb_define_method(rb_cDLCPtr, "inspect", rb_dlptr_inspect, 0); + rb_define_method(rb_cDLCPtr, "<=>", rb_dlptr_cmp, 1); + rb_define_method(rb_cDLCPtr, "==", rb_dlptr_eql, 1); + rb_define_method(rb_cDLCPtr, "eql?", rb_dlptr_eql, 1); + rb_define_method(rb_cDLCPtr, "+", rb_dlptr_plus, 1); + rb_define_method(rb_cDLCPtr, "-", rb_dlptr_minus, 1); + rb_define_method(rb_cDLCPtr, "[]", rb_dlptr_aref, -1); + rb_define_method(rb_cDLCPtr, "[]=", rb_dlptr_aset, -1); + rb_define_method(rb_cDLCPtr, "size", rb_dlptr_size, -1); + rb_define_method(rb_cDLCPtr, "size=", rb_dlptr_size, -1); + + rb_define_const(rb_mDL, "NULL", rb_dlptr_new(0, 0, 0)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/dl/depend b/lib/ruby-1.9.1-rc1/ext/dl/depend new file mode 100644 index 0000000..1093960 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/depend @@ -0,0 +1,24 @@ +cfunc.o: cfunc.c dl.h $(hdrdir)/ruby.h + +cptr.o: cptr.c dl.h $(hdrdir)/ruby.h $(hdrdir)/io.h + +handle.o: handle.c dl.h $(hdrdir)/ruby.h + +dl.o: dl.c dl.h callback.h $(hdrdir)/ruby.h $(hdrdir)/io.h + +callback-0.o: callback-0.c $(hdrdir)/ruby.h +callback-1.o: callback-1.c $(hdrdir)/ruby.h +callback-2.o: callback-2.c $(hdrdir)/ruby.h +callback-3.o: callback-3.c $(hdrdir)/ruby.h +callback-4.o: callback-4.c $(hdrdir)/ruby.h +callback-5.o: callback-5.c $(hdrdir)/ruby.h +callback-6.o: callback-6.c $(hdrdir)/ruby.h +callback-7.o: callback-7.c $(hdrdir)/ruby.h +callback-8.o: callback-8.c $(hdrdir)/ruby.h + +callback-0.c callback-1.c callback-2.c \ +callback-3.c callback-4.c callback-5.c \ +callback-6.c callback-7.c callback-8.c \ +callback.h: $(srcdir)/mkcallback.rb dl.h + @echo "generating callback.h" + @$(RUBY) $(srcdir)/mkcallback.rb $(srcdir)/dl.h diff --git a/lib/ruby-1.9.1-rc1/ext/dl/dl.c b/lib/ruby-1.9.1-rc1/ext/dl/dl.c new file mode 100644 index 0000000..0427dfb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/dl.c @@ -0,0 +1,137 @@ +#include +#include +#include +#include "dl.h" + +VALUE rb_mDL; +VALUE rb_eDLError; +VALUE rb_eDLTypeError; + +ID rbdl_id_cdecl; +ID rbdl_id_stdcall; + +VALUE +rb_dl_dlopen(int argc, VALUE argv[], VALUE self) +{ + rb_secure(2); + return rb_class_new_instance(argc, argv, rb_cDLHandle); +} + +VALUE +rb_dl_malloc(VALUE self, VALUE size) +{ + void *ptr; + + rb_secure(4); + ptr = (void*)ruby_xmalloc(NUM2INT(size)); + return PTR2NUM(ptr); +} + +VALUE +rb_dl_realloc(VALUE self, VALUE addr, VALUE size) +{ + void *ptr = NUM2PTR(addr); + + rb_secure(4); + ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size)); + return PTR2NUM(ptr); +} + +VALUE +rb_dl_free(VALUE self, VALUE addr) +{ + void *ptr = NUM2PTR(addr); + + rb_secure(4); + ruby_xfree(ptr); + return Qnil; +} + +VALUE +rb_dl_ptr2value(VALUE self, VALUE addr) +{ + rb_secure(4); + return (VALUE)NUM2PTR(addr); +} + +VALUE +rb_dl_value2ptr(VALUE self, VALUE val) +{ + return PTR2NUM((void*)val); +} + +#include "callback.h" + +void +Init_dl() +{ + void Init_dlhandle(); + void Init_dlcfunc(); + void Init_dlptr(); + + rbdl_id_cdecl = rb_intern("cdecl"); + rbdl_id_stdcall = rb_intern("stdcall"); + + rb_mDL = rb_define_module("DL"); + rb_eDLError = rb_define_class_under(rb_mDL, "DLError", rb_eStandardError); + rb_eDLTypeError = rb_define_class_under(rb_mDL, "DLTypeError", rb_eDLError); + + rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK)); + rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE)); + + rb_dl_init_callbacks(); + + rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL)); + rb_define_const(rb_mDL, "RTLD_LAZY", INT2NUM(RTLD_LAZY)); + rb_define_const(rb_mDL, "RTLD_NOW", INT2NUM(RTLD_NOW)); + + rb_define_const(rb_mDL, "TYPE_VOID", INT2NUM(DLTYPE_VOID)); + rb_define_const(rb_mDL, "TYPE_VOIDP", INT2NUM(DLTYPE_VOIDP)); + rb_define_const(rb_mDL, "TYPE_CHAR", INT2NUM(DLTYPE_CHAR)); + rb_define_const(rb_mDL, "TYPE_SHORT", INT2NUM(DLTYPE_SHORT)); + rb_define_const(rb_mDL, "TYPE_INT", INT2NUM(DLTYPE_INT)); + rb_define_const(rb_mDL, "TYPE_LONG", INT2NUM(DLTYPE_LONG)); +#if HAVE_LONG_LONG + rb_define_const(rb_mDL, "TYPE_LONG_LONG", INT2NUM(DLTYPE_LONG_LONG)); +#endif + rb_define_const(rb_mDL, "TYPE_FLOAT", INT2NUM(DLTYPE_FLOAT)); + rb_define_const(rb_mDL, "TYPE_DOUBLE", INT2NUM(DLTYPE_DOUBLE)); + + rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP)); + rb_define_const(rb_mDL, "ALIGN_CHAR", INT2NUM(ALIGN_CHAR)); + rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT)); + rb_define_const(rb_mDL, "ALIGN_INT", INT2NUM(ALIGN_INT)); + rb_define_const(rb_mDL, "ALIGN_LONG", INT2NUM(ALIGN_LONG)); +#if HAVE_LONG_LONG + rb_define_const(rb_mDL, "ALIGN_LONG_LONG", INT2NUM(ALIGN_LONG_LONG)); +#endif + rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT)); + rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE)); + + rb_define_const(rb_mDL, "SIZEOF_VOIDP", INT2NUM(sizeof(void*))); + rb_define_const(rb_mDL, "SIZEOF_CHAR", INT2NUM(sizeof(char))); + rb_define_const(rb_mDL, "SIZEOF_SHORT", INT2NUM(sizeof(short))); + rb_define_const(rb_mDL, "SIZEOF_INT", INT2NUM(sizeof(int))); + rb_define_const(rb_mDL, "SIZEOF_LONG", INT2NUM(sizeof(long))); +#if HAVE_LONG_LONG + rb_define_const(rb_mDL, "SIZEOF_LONG_LONG", INT2NUM(sizeof(LONG_LONG))); +#endif + rb_define_const(rb_mDL, "SIZEOF_FLOAT", INT2NUM(sizeof(float))); + rb_define_const(rb_mDL, "SIZEOF_DOUBLE",INT2NUM(sizeof(double))); + + rb_define_module_function(rb_mDL, "dlwrap", rb_dl_value2ptr, 1); + rb_define_module_function(rb_mDL, "dlunwrap", rb_dl_ptr2value, 1); + + rb_define_module_function(rb_mDL, "dlopen", rb_dl_dlopen, -1); + rb_define_module_function(rb_mDL, "malloc", rb_dl_malloc, 1); + rb_define_module_function(rb_mDL, "realloc", rb_dl_realloc, 2); + rb_define_module_function(rb_mDL, "free", rb_dl_free, 1); + + rb_define_const(rb_mDL, "RUBY_FREE", PTR2NUM(ruby_xfree)); + rb_define_const(rb_mDL, "BUILD_RUBY_PLATFORM", rb_str_new2(RUBY_PLATFORM)); + rb_define_const(rb_mDL, "BUILD_RUBY_VERSION", rb_str_new2(RUBY_VERSION)); + + Init_dlhandle(); + Init_dlcfunc(); + Init_dlptr(); +} diff --git a/lib/ruby-1.9.1-rc1/ext/dl/dl.h b/lib/ruby-1.9.1-rc1/ext/dl/dl.h new file mode 100644 index 0000000..87a5994 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/dl.h @@ -0,0 +1,226 @@ +#ifndef RUBY_DL_H +#define RUBY_DL_H + +#include + +#if !defined(FUNC_CDECL) +# define FUNC_CDECL(x) x +#endif +#if !defined(FUNC_STDCALL) +# define FUNC_STDCALL(x) x +#endif + +#if defined(HAVE_DLFCN_H) +# include +# /* some stranger systems may not define all of these */ +#ifndef RTLD_LAZY +#define RTLD_LAZY 0 +#endif +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif +#ifndef RTLD_NOW +#define RTLD_NOW 0 +#endif +#else +# if defined(HAVE_WINDOWS_H) +# include +# define dlclose(ptr) FreeLibrary((HINSTANCE)ptr) +# define dlopen(name,flag) ((void*)LoadLibrary(name)) +# define dlerror() "unknown error" +# define dlsym(handle,name) ((void*)GetProcAddress(handle,name)) +# define RTLD_LAZY -1 +# define RTLD_NOW -1 +# define RTLD_GLOBAL -1 +# endif +#endif + +#define MAX_CALLBACK 5 +#define DLSTACK_TYPE long +#define DLSTACK_SIZE (20) +#define DLSTACK_PROTO \ + DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\ + DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\ + DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\ + DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE +#define DLSTACK_ARGS(stack) \ + stack[0],stack[1],stack[2],stack[3],stack[4],\ + stack[5],stack[6],stack[7],stack[8],stack[9],\ + stack[10],stack[11],stack[12],stack[13],stack[14],\ + stack[15],stack[16],stack[17],stack[18],stack[19] + +#define DLSTACK_PROTO0 +#define DLSTACK_PROTO1_ DLSTACK_TYPE +#define DLSTACK_PROTO2_ DLSTACK_PROTO1_, DLSTACK_TYPE +#define DLSTACK_PROTO3_ DLSTACK_PROTO2_, DLSTACK_TYPE +#define DLSTACK_PROTO4_ DLSTACK_PROTO3_, DLSTACK_TYPE +#define DLSTACK_PROTO4_ DLSTACK_PROTO3_, DLSTACK_TYPE +#define DLSTACK_PROTO5_ DLSTACK_PROTO4_, DLSTACK_TYPE +#define DLSTACK_PROTO6_ DLSTACK_PROTO5_, DLSTACK_TYPE +#define DLSTACK_PROTO7_ DLSTACK_PROTO6_, DLSTACK_TYPE +#define DLSTACK_PROTO8_ DLSTACK_PROTO7_, DLSTACK_TYPE +#define DLSTACK_PROTO9_ DLSTACK_PROTO8_, DLSTACK_TYPE +#define DLSTACK_PROTO10_ DLSTACK_PROTO9_, DLSTACK_TYPE +#define DLSTACK_PROTO11_ DLSTACK_PROTO10_, DLSTACK_TYPE +#define DLSTACK_PROTO12_ DLSTACK_PROTO11_, DLSTACK_TYPE +#define DLSTACK_PROTO13_ DLSTACK_PROTO12_, DLSTACK_TYPE +#define DLSTACK_PROTO14_ DLSTACK_PROTO13_, DLSTACK_TYPE +#define DLSTACK_PROTO14_ DLSTACK_PROTO13_, DLSTACK_TYPE +#define DLSTACK_PROTO15_ DLSTACK_PROTO14_, DLSTACK_TYPE +#define DLSTACK_PROTO16_ DLSTACK_PROTO15_, DLSTACK_TYPE +#define DLSTACK_PROTO17_ DLSTACK_PROTO16_, DLSTACK_TYPE +#define DLSTACK_PROTO18_ DLSTACK_PROTO17_, DLSTACK_TYPE +#define DLSTACK_PROTO19_ DLSTACK_PROTO18_, DLSTACK_TYPE +#define DLSTACK_PROTO20_ DLSTACK_PROTO19_, DLSTACK_TYPE + +/* + * Add ",..." as the last argument. + * This is required for variable argument functions such + * as fprintf() on x86_64-linux. + * + * http://refspecs.linuxfoundation.org/elf/x86_64-abi-0.95.pdf + * page 19: + * + * For calls that may call functions that use varargs or stdargs + * (prototype-less calls or calls to functions containing ellipsis + * (...) in the declaration) %al is used as hidden argument to + * specify the number of SSE registers used. + */ +#define DLSTACK_PROTO1 DLSTACK_PROTO1_, ... +#define DLSTACK_PROTO2 DLSTACK_PROTO2_, ... +#define DLSTACK_PROTO3 DLSTACK_PROTO3_, ... +#define DLSTACK_PROTO4 DLSTACK_PROTO4_, ... +#define DLSTACK_PROTO4 DLSTACK_PROTO4_, ... +#define DLSTACK_PROTO5 DLSTACK_PROTO5_, ... +#define DLSTACK_PROTO6 DLSTACK_PROTO6_, ... +#define DLSTACK_PROTO7 DLSTACK_PROTO7_, ... +#define DLSTACK_PROTO8 DLSTACK_PROTO8_, ... +#define DLSTACK_PROTO9 DLSTACK_PROTO9_, ... +#define DLSTACK_PROTO10 DLSTACK_PROTO10_, ... +#define DLSTACK_PROTO11 DLSTACK_PROTO11_, ... +#define DLSTACK_PROTO12 DLSTACK_PROTO12_, ... +#define DLSTACK_PROTO13 DLSTACK_PROTO13_, ... +#define DLSTACK_PROTO14 DLSTACK_PROTO14_, ... +#define DLSTACK_PROTO14 DLSTACK_PROTO14_, ... +#define DLSTACK_PROTO15 DLSTACK_PROTO15_, ... +#define DLSTACK_PROTO16 DLSTACK_PROTO16_, ... +#define DLSTACK_PROTO17 DLSTACK_PROTO17_, ... +#define DLSTACK_PROTO18 DLSTACK_PROTO18_, ... +#define DLSTACK_PROTO19 DLSTACK_PROTO19_, ... +#define DLSTACK_PROTO20 DLSTACK_PROTO20_, ... + +#define DLSTACK_ARGS0(stack) +#define DLSTACK_ARGS1(stack) stack[0] +#define DLSTACK_ARGS2(stack) DLSTACK_ARGS1(stack), stack[1] +#define DLSTACK_ARGS3(stack) DLSTACK_ARGS2(stack), stack[2] +#define DLSTACK_ARGS4(stack) DLSTACK_ARGS3(stack), stack[3] +#define DLSTACK_ARGS5(stack) DLSTACK_ARGS4(stack), stack[4] +#define DLSTACK_ARGS6(stack) DLSTACK_ARGS5(stack), stack[5] +#define DLSTACK_ARGS7(stack) DLSTACK_ARGS6(stack), stack[6] +#define DLSTACK_ARGS8(stack) DLSTACK_ARGS7(stack), stack[7] +#define DLSTACK_ARGS9(stack) DLSTACK_ARGS8(stack), stack[8] +#define DLSTACK_ARGS10(stack) DLSTACK_ARGS9(stack), stack[9] +#define DLSTACK_ARGS11(stack) DLSTACK_ARGS10(stack), stack[10] +#define DLSTACK_ARGS12(stack) DLSTACK_ARGS11(stack), stack[11] +#define DLSTACK_ARGS13(stack) DLSTACK_ARGS12(stack), stack[12] +#define DLSTACK_ARGS14(stack) DLSTACK_ARGS13(stack), stack[13] +#define DLSTACK_ARGS15(stack) DLSTACK_ARGS14(stack), stack[14] +#define DLSTACK_ARGS16(stack) DLSTACK_ARGS15(stack), stack[15] +#define DLSTACK_ARGS17(stack) DLSTACK_ARGS16(stack), stack[16] +#define DLSTACK_ARGS18(stack) DLSTACK_ARGS17(stack), stack[17] +#define DLSTACK_ARGS19(stack) DLSTACK_ARGS18(stack), stack[18] +#define DLSTACK_ARGS20(stack) DLSTACK_ARGS19(stack), stack[19] + +extern VALUE rb_mDL; +extern VALUE rb_cDLHandle; +extern VALUE rb_cDLSymbol; +extern VALUE rb_eDLError; +extern VALUE rb_eDLTypeError; + +typedef struct { char c; void *x; } s_voidp; +typedef struct { char c; short x; } s_short; +typedef struct { char c; int x; } s_int; +typedef struct { char c; long x; } s_long; +typedef struct { char c; float x; } s_float; +typedef struct { char c; double x; } s_double; +#if HAVE_LONG_LONG +typedef struct { char c; LONG_LONG x; } s_long_long; +#endif + +#define ALIGN_VOIDP (sizeof(s_voidp) - sizeof(void *)) +#define ALIGN_SHORT (sizeof(s_short) - sizeof(short)) +#define ALIGN_CHAR (1) +#define ALIGN_INT (sizeof(s_int) - sizeof(int)) +#define ALIGN_LONG (sizeof(s_long) - sizeof(long)) +#if HAVE_LONG_LONG +#define ALIGN_LONG_LONG (sizeof(s_long_long) - sizeof(LONG_LONG)) +#endif +#define ALIGN_FLOAT (sizeof(s_float) - sizeof(float)) +#define ALIGN_DOUBLE (sizeof(s_double) - sizeof(double)) + +#define DLALIGN(ptr,offset,align) {\ + while( (((unsigned long)((char *)ptr + offset)) % align) != 0 ) offset++;\ +} + + +#define DLTYPE_VOID 0 +#define DLTYPE_VOIDP 1 +#define DLTYPE_CHAR 2 +#define DLTYPE_SHORT 3 +#define DLTYPE_INT 4 +#define DLTYPE_LONG 5 +#if HAVE_LONG_LONG +#define DLTYPE_LONG_LONG 6 +#endif +#define DLTYPE_FLOAT 7 +#define DLTYPE_DOUBLE 8 +#define MAX_DLTYPE 9 + +#if SIZEOF_VOIDP == SIZEOF_LONG +# define PTR2NUM(x) (ULONG2NUM((unsigned long)(x))) +# define NUM2PTR(x) ((void*)(NUM2ULONG(x))) +#else +/* # error --->> Ruby/DL2 requires sizeof(void*) == sizeof(long) to be compiled. <<--- */ +# define PTR2NUM(x) (ULL2NUM((unsigned long long)(x))) +# define NUM2PTR(x) ((void*)(NUM2ULL(x))) +#endif + +#define BOOL2INT(x) ((x == Qtrue)?1:0) +#define INT2BOOL(x) (x?Qtrue:Qfalse) + +typedef void (*freefunc_t)(void*); + +struct dl_handle { + void *ptr; + int open; + int enable_close; +}; + + +struct cfunc_data { + void *ptr; + char *name; + int type; + ID calltype; +}; +extern ID rbdl_id_cdecl; +extern ID rbdl_id_stdcall; +#define CFUNC_CDECL (rbdl_id_cdecl) +#define CFUNC_STDCALL (rbdl_id_stdcall) + +struct ptr_data { + void *ptr; + long size; + freefunc_t free; +}; + +#define RDL_HANDLE(obj) ((struct dl_handle *)(DATA_PTR(obj))) +#define RCFUNC_DATA(obj) ((struct cfunc_data *)(DATA_PTR(obj))) +#define RPTR_DATA(obj) ((struct ptr_data *)(DATA_PTR(obj))) + +VALUE rb_dlcfunc_new(void (*func)(), int dltype, const char * name, ID calltype); +VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func); +VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func); +VALUE rb_dlptr_malloc(long size, freefunc_t func); + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/dl/extconf.rb b/lib/ruby-1.9.1-rc1/ext/dl/extconf.rb new file mode 100644 index 0000000..c0b8ffd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/extconf.rb @@ -0,0 +1,37 @@ +require 'mkmf' + +if( RbConfig::CONFIG['CC'] =~ /gcc/ ) + $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer" +end + +CALLBACKS = (0..8).map{|i| "callback-#{i}"} +CALLBACK_SRCS = CALLBACKS.map{|basename| "#{basename}.c"} +CALLBACK_OBJS = CALLBACKS.map{|basename| "#{basename}.o"} + +$INSTALLFILES = [ + ["dl.h", "$(HDRDIR)"], +] +$distcleanfiles += [ "callback.h", *CALLBACK_SRCS ] + + +check = true +if( have_header("dlfcn.h") ) + have_library("dl") + check &&= have_func("dlopen") + check &&= have_func("dlclose") + check &&= have_func("dlsym") + have_func("dlerror") +elsif( have_header("windows.h") ) + check &&= have_func("LoadLibrary") + check &&= have_func("FreeLibrary") + check &&= have_func("GetProcAddress") +else + check = false +end + +$objs = %w[ cfunc.o dl.o cptr.o handle.o ] + CALLBACK_OBJS + +if check + $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] + create_makefile("dl") +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/handle.c b/lib/ruby-1.9.1-rc1/ext/dl/handle.c new file mode 100644 index 0000000..a017b9b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/handle.c @@ -0,0 +1,227 @@ +/* -*- C -*- + * $Id: handle.c 11708 2007-02-12 23:01:19Z shyouhei $ + */ + +#include +#include "dl.h" + +VALUE rb_cDLHandle; + +void +dlhandle_free(struct dl_handle *dlhandle) +{ + if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){ + dlclose(dlhandle->ptr); + } +} + +VALUE +rb_dlhandle_close(VALUE self) +{ + struct dl_handle *dlhandle; + + Data_Get_Struct(self, struct dl_handle, dlhandle); + dlhandle->open = 0; + return INT2NUM(dlclose(dlhandle->ptr)); +} + +VALUE +rb_dlhandle_s_allocate(VALUE klass) +{ + VALUE obj; + struct dl_handle *dlhandle; + + obj = Data_Make_Struct(rb_cDLHandle, struct dl_handle, 0, + dlhandle_free, dlhandle); + dlhandle->ptr = 0; + dlhandle->open = 0; + dlhandle->enable_close = 0; + + return obj; +} + +VALUE +rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self) +{ + void *ptr; + struct dl_handle *dlhandle; + VALUE lib, flag; + char *clib; + int cflag; + const char *err; + + switch( rb_scan_args(argc, argv, "02", &lib, &flag) ){ + case 0: + clib = NULL; + cflag = RTLD_LAZY | RTLD_GLOBAL; + break; + case 1: + clib = NIL_P(lib) ? NULL : StringValuePtr(lib); + cflag = RTLD_LAZY | RTLD_GLOBAL; + break; + case 2: + clib = NIL_P(lib) ? NULL : StringValuePtr(lib); + cflag = NUM2INT(flag); + break; + default: + rb_bug("rb_dlhandle_new"); + } + + ptr = dlopen(clib, cflag); +#if defined(HAVE_DLERROR) + if( !ptr && (err = dlerror()) ){ + rb_raise(rb_eDLError, "%s", err); + } +#else + if( !ptr ){ + err = dlerror(); + rb_raise(rb_eDLError, "%s", err); + } +#endif + Data_Get_Struct(self, struct dl_handle, dlhandle); + if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){ + dlclose(dlhandle->ptr); + } + dlhandle->ptr = ptr; + dlhandle->open = 1; + dlhandle->enable_close = 0; + + if( rb_block_given_p() ){ + rb_ensure(rb_yield, self, rb_dlhandle_close, self); + } + + return Qnil; +} + +VALUE +rb_dlhandle_enable_close(VALUE self) +{ + struct dl_handle *dlhandle; + + Data_Get_Struct(self, struct dl_handle, dlhandle); + dlhandle->enable_close = 1; + return Qnil; +} + +VALUE +rb_dlhandle_disable_close(VALUE self) +{ + struct dl_handle *dlhandle; + + Data_Get_Struct(self, struct dl_handle, dlhandle); + dlhandle->enable_close = 0; + return Qnil; +} + +VALUE +rb_dlhandle_to_i(VALUE self) +{ + struct dl_handle *dlhandle; + + Data_Get_Struct(self, struct dl_handle, dlhandle); + return PTR2NUM(dlhandle); +} + +VALUE +rb_dlhandle_sym(VALUE self, VALUE sym) +{ + void (*func)(); + struct dl_handle *dlhandle; + void *handle; + const char *name; + const char *err; + int i; + +#if defined(HAVE_DLERROR) +# define CHECK_DLERROR if( err = dlerror() ){ func = 0; } +#else +# define CHECK_DLERROR +#endif + + rb_secure(2); + + if( sym == Qnil ){ +#if defined(RTLD_NEXT) + name = RTLD_NEXT; +#else + name = NULL; +#endif + } + else{ + name = StringValuePtr(sym); + } + + + Data_Get_Struct(self, struct dl_handle, dlhandle); + if( ! dlhandle->open ){ + rb_raise(rb_eDLError, "closed handle"); + } + handle = dlhandle->ptr; + + func = dlsym(handle, name); + CHECK_DLERROR; + if( !func ){ +#if defined(__CYGWIN__) || defined(WIN32) || defined(__MINGW32__) + { + int len = strlen(name); + char *name_a = (char*)xmalloc(len+2); + strcpy(name_a, name); + name_a[len] = 'A'; + name_a[len+1] = '\0'; + func = dlsym(handle, name_a); + xfree(name_a); + CHECK_DLERROR; + if( !func ){ + for( i = 0; i < 256; i += 4 ){ + int len = strlen(name); + char *name_n = (char*)xmalloc(len+5); + sprintf(name_n, "%s@%d%c", name, i, 0); + func = dlsym(handle, name_n); + xfree(name_n); + CHECK_DLERROR; + if( func ) + { + break; + } + } + CHECK_DLERROR; + if( !func ){ + rb_raise(rb_eDLError, "unknown symbol \"%s\"", name); + } + } + } +#else + for( i = 0; i < 256; i += 4 ){ + int len = strlen(name); + char *name_n = (char*)xmalloc(len+4); + sprintf(name_n, "%s@%d", name, i); + func = dlsym(handle, name_n); + xfree(name_n); + CHECK_DLERROR; + if( func ){ + break; + } + } + CHECK_DLERROR; + if( !func ){ + rb_raise(rb_eDLError, "unknown symbol \"%s\"", name); + } +#endif + } + + return PTR2NUM(func); +} + +void +Init_dlhandle() +{ + rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject); + rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate); + rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1); + rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0); + rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0); + rb_define_method(rb_cDLHandle, "sym", rb_dlhandle_sym, 1); + rb_define_method(rb_cDLHandle, "[]", rb_dlhandle_sym, 1); + rb_define_method(rb_cDLHandle, "disable_close", rb_dlhandle_disable_close, 0); + rb_define_method(rb_cDLHandle, "enable_close", rb_dlhandle_enable_close, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/callback.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/callback.rb new file mode 100644 index 0000000..d0b2c7a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/callback.rb @@ -0,0 +1,69 @@ +require 'dl' +require 'thread' + +module DL + SEM = Mutex.new + + def set_callback_internal(proc_entry, addr_entry, argc, ty, &cbp) + if( argc < 0 ) + raise(ArgumentError, "arity should not be less than 0.") + end + addr = nil + SEM.synchronize{ + ary = proc_entry[ty] + (0...MAX_CALLBACK).each{|n| + idx = (n * DLSTACK_SIZE) + argc + if( ary[idx].nil? ) + ary[idx] = cbp + addr = addr_entry[ty][idx] + break + end + } + } + addr + end + + def set_cdecl_callback(ty, argc, &cbp) + set_callback_internal(CdeclCallbackProcs, CdeclCallbackAddrs, argc, ty, &cbp) + end + + def set_stdcall_callback(ty, argc, &cbp) + set_callback_internal(StdcallCallbackProcs, StdcallCallbackAddrs, argc, ty, &cbp) + end + + def remove_callback_internal(proc_entry, addr_entry, addr, ctype = nil) + index = nil + if( ctype ) + addr_entry[ctype].each_with_index{|xaddr, idx| + if( xaddr == addr ) + index = idx + end + } + else + addr_entry.each{|ty,entry| + entry.each_with_index{|xaddr, idx| + if( xaddr == addr ) + index = idx + end + } + } + end + if( proc_entry[ctype][index] ) + proc_entry[ctype][index] = nil + return true + else + return false + end + end + + def remove_cdecl_callback(addr, ctype = nil) + remove_callback_internal(CdeclCallbackProcs, CdeclCallbackAddrs, addr, ctype) + end + + def remove_stdcall_callback(addr, ctype = nil) + remove_callback_internal(StdcallCallbackProcs, StdcallCallbackAddrs, addr, ctype) + end + + alias set_callback set_cdecl_callback + alias remove_callback remove_cdecl_callback +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/cparser.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/cparser.rb new file mode 100644 index 0000000..c897d1b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/cparser.rb @@ -0,0 +1,109 @@ +module DL + module CParser + def parse_struct_signature(signature, tymap=nil) + if( signature.is_a?(String) ) + signature = signature.split("\s*,\s*") + end + mems = [] + tys = [] + signature.each{|msig| + tks = msig.split(/\s+(\*)?/) + ty = tks[0..-2].join(" ") + member = tks[-1] + + case ty + when /\[(\d+)\]/ + n = $1.to_i + ty.gsub!(/\s*\[\d+\]/,"") + ty = [ty, n] + when /\[\]/ + ty.gsub!(/\s*\[\]/, "*") + end + + case member + when /\[(\d+)\]/ + ty = [ty, $1.to_i] + member.gsub!(/\s*\[\d+\]/,"") + when /\[\]/ + ty = ty + "*" + member.gsub!(/\s*\[\]/, "") + end + + mems.push(member) + tys.push(parse_ctype(ty,tymap)) + } + return tys, mems + end + + def parse_signature(signature, tymap=nil) + tymap ||= {} + signature = signature.gsub(/\s+/, " ").strip + case signature + when /^([\d\w@\*_\s]+)\(([\d\w\*_\s\,\[\]]*)\)$/ + ret = $1 + args = $2 + ret = ret.split(/\s+/) + args = args.split(/\s*,\s*/) + func = ret.pop + if( func =~ /^\*/ ) + func.gsub!(/^\*+/,"") + ret.push("*") + end + ret = ret.join(" ") + return [func, parse_ctype(ret, tymap), args.collect{|arg| parse_ctype(arg, tymap)}] + else + raise(RuntimeError,"can't parse the function prototype: #{proto}") + end + end + + def parse_ctype(ty, tymap=nil) + tymap ||= {} + case ty + when Array + return [parse_ctype(ty[0], tymap), ty[1]] + when "void" + return TYPE_VOID + when "char" + return TYPE_CHAR + when "unsigned char" + return -TYPE_CHAR + when "short" + return TYPE_SHORT + when "unsigned short" + return -TYPE_SHORT + when "int" + return TYPE_INT + when "unsigned int" + return -TYPE_INT + when "long" + return TYPE_LONG + when "unsigned long" + return -TYPE_LONG + when "long long" + if( defined?(TYPE_LONG_LONG) ) + return TYPE_LONG_LONG + else + raise(RuntimeError, "unsupported type: #{ty}") + end + when "unsigned long long" + if( defined?(TYPE_LONG_LONG) ) + return -TYPE_LONG_LONG + else + raise(RuntimeError, "unsupported type: #{ty}") + end + when "float" + return TYPE_FLOAT + when "double" + return TYPE_DOUBLE + when /\*/, /\[\s*\]/ + return TYPE_VOIDP + else + if( tymap[ty] ) + return parse_ctype(tymap[ty], tymap) + else + raise(DLError, "unknown type: #{ty}") + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/func.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/func.rb new file mode 100644 index 0000000..b29aebc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/func.rb @@ -0,0 +1,141 @@ +require 'dl' +require 'dl/callback' +require 'dl/stack' +require 'dl/value' +require 'thread' + +module DL + class Function + include DL + include ValueUtil + + def initialize(cfunc, argtypes, &proc) + @cfunc = cfunc + @stack = Stack.new(argtypes.collect{|ty| ty.abs}) + if( @cfunc.ctype < 0 ) + @cfunc.ctype = @cfunc.ctype.abs + @unsigned = true + end + if( proc ) + bind(&proc) + end + end + + def to_i() + @cfunc.to_i + end + + def call(*args, &block) + funcs = [] + args = wrap_args(args, @stack.types, funcs, &block) + r = @cfunc.call(@stack.pack(args)) + funcs.each{|f| f.unbind_at_call()} + return wrap_result(r) + end + + def wrap_result(r) + case @cfunc.ctype + when TYPE_VOIDP + r = CPtr.new(r) + else + if( @unsigned ) + r = unsigned_value(r, @cfunc.ctype) + end + end + r + end + + def bind(&block) + if( !block ) + raise(RuntimeError, "block must be given.") + end + if( @cfunc.ptr == 0 ) + cb = Proc.new{|*args| + ary = @stack.unpack(args) + @stack.types.each_with_index{|ty, idx| + case ty + when TYPE_VOIDP + ary[idx] = CPtr.new(ary[idx]) + end + } + r = block.call(*ary) + wrap_arg(r, @cfunc.ctype, []) + } + case @cfunc.calltype + when :cdecl + @cfunc.ptr = set_cdecl_callback(@cfunc.ctype, @stack.size, &cb) + when :stdcall + @cfunc.ptr = set_stdcall_callback(@cfunc.ctype, @stack.size, &cb) + else + raise(RuntimeError, "unsupported calltype: #{@cfunc.calltype}") + end + if( @cfunc.ptr == 0 ) + raise(RuntimeException, "can't bind C function.") + end + end + end + + def unbind() + if( @cfunc.ptr != 0 ) + case @cfunc.calltype + when :cdecl + remove_cdecl_callback(@cfunc.ptr, @cfunc.ctype) + when :stdcall + remove_stdcall_callback(@cfunc.ptr, @cfunc.ctype) + else + raise(RuntimeError, "unsupported calltype: #{@cfunc.calltype}") + end + @cfunc.ptr = 0 + end + end + + def bind_at_call(&block) + bind(&block) + end + + def unbind_at_call() + end + end + + class TempFunction < Function + def bind_at_call(&block) + bind(&block) + end + + def unbind_at_call() + unbind() + end + end + + class CarriedFunction < Function + def initialize(cfunc, argtypes, n) + super(cfunc, argtypes) + @carrier = [] + @index = n + @mutex = Mutex.new + end + + def create_carrier(data) + ary = [] + userdata = [ary, data] + @mutex.lock() + @carrier.push(userdata) + return dlwrap(userdata) + end + + def bind_at_call(&block) + userdata = @carrier[-1] + userdata[0].push(block) + bind{|*args| + ptr = args[@index] + if( !ptr ) + raise(RuntimeError, "The index of userdata should be lower than #{args.size}.") + end + userdata = dlunwrap(Integer(ptr)) + args[@index] = userdata[1] + userdata[0][0].call(*args) + } + @mutex.unlock() + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/import.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/import.rb new file mode 100644 index 0000000..4f93468 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/import.rb @@ -0,0 +1,215 @@ +require 'dl' +require 'dl/func.rb' +require 'dl/struct.rb' +require 'dl/cparser.rb' + +module DL + class CompositeHandler + def initialize(handlers) + @handlers = handlers + end + + def handlers() + @handlers + end + + def sym(symbol) + @handlers.each{|handle| + if( handle ) + begin + addr = handle.sym(symbol) + return addr + rescue DLError + end + end + } + return nil + end + + def [](symbol) + sym(symbol) + end + end + + module Importer + include DL + include CParser + extend Importer + + def dlload(*libs) + handles = libs.collect{|lib| + case lib + when nil + nil + when Handle + lib + when Importer + lib.handlers + else + begin + DL.dlopen(lib) + rescue DLError + raise(DLError, "can't load #{lib}") + end + end + }.flatten() + @handler = CompositeHandler.new(handles) + @func_map = {} + @type_alias = {} + end + + def typealias(alias_type, orig_type) + @type_alias[alias_type] = orig_type + end + + def sizeof(ty) + case ty + when String + ty = parse_ctype(ty, @type_alias).abs() + case ty + when TYPE_CHAR + return SIZEOF_CHAR + when TYPE_SHORT + return SIZEOF_SHORT + when TYPE_INT + return SIZEOF_INT + when TYPE_LONG + return SIZEOF_LONG + when TYPE_LONG_LONG + return SIZEOF_LONG_LON + when TYPE_FLOAT + return SIZEOF_FLOAT + when TYPE_DOUBLE + return SIZEOF_DOUBLE + when TYPE_VOIDP + return SIZEOF_VOIDP + else + raise(DLError, "unknown type: #{ty}") + end + when Class + if( ty.instance_methods().include?(:to_ptr) ) + return ty.size() + end + end + return CPtr[ty].size() + end + + def parse_bind_options(opts) + h = {} + prekey = nil + while( opt = opts.shift() ) + case opt + when :stdcall, :cdecl + h[:call_type] = opt + when :carried, :temp, :temporal, :bind + h[:callback_type] = opt + h[:carrier] = opts.shift() + else + h[opt] = true + end + end + h + end + private :parse_bind_options + + def extern(signature, *opts) + symname, ctype, argtype = parse_signature(signature, @type_alias) + opt = parse_bind_options(opts) + f = import_function(symname, ctype, argtype, opt[:call_type]) + name = symname.gsub(/@.+/,'') + @func_map[name] = f + # define_method(name){|*args,&block| f.call(*args,&block)} + module_eval(<<-EOS) + def #{name}(*args, &block) + @func_map['#{name}'].call(*args,&block) + end + EOS + module_function(name) + f + end + + def bind(signature, *opts, &blk) + name, ctype, argtype = parse_signature(signature, @type_alias) + h = parse_bind_options(opts) + case h[:callback_type] + when :bind, nil + f = bind_function(name, ctype, argtype, h[:call_type], &blk) + when :temp, :temporal + f = create_temp_function(name, ctype, argtype, h[:call_type]) + when :carried + f = create_carried_function(name, ctype, argtype, h[:call_type], h[:carrier]) + else + raise(RuntimeError, "unknown callback type: #{h[:callback_type]}") + end + @func_map[name] = f + #define_method(name){|*args,&block| f.call(*args,&block)} + module_eval(<<-EOS) + def #{name}(*args,&block) + @func_map['#{name}'].call(*args,&block) + end + EOS + module_function(name) + f + end + + def struct(signature) + tys, mems = parse_struct_signature(signature, @type_alias) + DL::CStructBuilder.create(CStruct, tys, mems) + end + + def union(signature) + tys, mems = parse_struct_signature(signature, @type_alias) + DL::CStructBuilder.create(CUnion, tys, mems) + end + + def [](name) + @func_map[name] + end + + def create_value(ty, val=nil) + s = struct([ty + " value"]) + ptr = s.malloc() + if( val ) + ptr.value = val + end + return ptr + end + alias value create_value + + def import_value(ty, addr) + s = struct([ty + " value"]) + ptr = s.new(addr) + return ptr + end + + def import_symbol(name) + addr = @handler.sym(name) + if( !addr ) + raise(DLError, "cannot find the symbol: #{name}") + end + CPtr.new(addr) + end + + def import_function(name, ctype, argtype, call_type = nil) + addr = @handler.sym(name) + if( !addr ) + raise(DLError, "cannot find the function: #{name}()") + end + Function.new(CFunc.new(addr, ctype, name, call_type || :cdecl), argtype) + end + + def bind_function(name, ctype, argtype, call_type = nil, &block) + f = Function.new(CFunc.new(0, ctype, name, call_type || :cdecl), argtype) + f.bind(&block) + f + end + + def create_temp_function(name, ctype, argtype, call_type = nil) + TempFunction.new(CFunc.new(0, ctype, name, call_type || :cdecl), argtype) + end + + def create_carried_function(name, ctype, argtype, call_type = nil, n = 0) + CarriedFunction.new(CFunc.new(0, ctype, name, call_type || :cdecl), argtype, n) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/pack.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/pack.rb new file mode 100644 index 0000000..ad91833 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/pack.rb @@ -0,0 +1,173 @@ +require 'dl' + +module DL + module PackInfo + if( defined?(TYPE_LONG_LONG) ) + ALIGN_MAP = { + TYPE_VOIDP => ALIGN_VOIDP, + TYPE_CHAR => ALIGN_CHAR, + TYPE_SHORT => ALIGN_SHORT, + TYPE_INT => ALIGN_INT, + TYPE_LONG => ALIGN_LONG, + TYPE_LONG_LONG => ALIGN_LONG_LONG, + TYPE_FLOAT => ALIGN_FLOAT, + TYPE_DOUBLE => ALIGN_DOUBLE, + -TYPE_CHAR => ALIGN_CHAR, + -TYPE_SHORT => ALIGN_SHORT, + -TYPE_INT => ALIGN_INT, + -TYPE_LONG => ALIGN_LONG, + -TYPE_LONG_LONG => ALIGN_LONG_LONG, + } + + PACK_MAP = { + TYPE_VOIDP => ((SIZEOF_VOIDP == SIZEOF_LONG_LONG) ? "q" : "l!"), + TYPE_CHAR => "c", + TYPE_SHORT => "s!", + TYPE_INT => "i!", + TYPE_LONG => "l!", + TYPE_LONG_LONG => "q", + TYPE_FLOAT => "f", + TYPE_DOUBLE => "d", + -TYPE_CHAR => "c", + -TYPE_SHORT => "s!", + -TYPE_INT => "i!", + -TYPE_LONG => "l!", + -TYPE_LONG_LONG => "q", + } + + SIZE_MAP = { + TYPE_VOIDP => SIZEOF_VOIDP, + TYPE_CHAR => SIZEOF_CHAR, + TYPE_SHORT => SIZEOF_SHORT, + TYPE_INT => SIZEOF_INT, + TYPE_LONG => SIZEOF_LONG, + TYPE_LONG_LONG => SIZEOF_LONG_LONG, + TYPE_FLOAT => SIZEOF_FLOAT, + TYPE_DOUBLE => SIZEOF_DOUBLE, + -TYPE_CHAR => SIZEOF_CHAR, + -TYPE_SHORT => SIZEOF_SHORT, + -TYPE_INT => SIZEOF_INT, + -TYPE_LONG => SIZEOF_LONG, + -TYPE_LONG_LONG => SIZEOF_LONG_LONG, + } + else + ALIGN_MAP = { + TYPE_VOIDP => ALIGN_VOIDP, + TYPE_CHAR => ALIGN_CHAR, + TYPE_SHORT => ALIGN_SHORT, + TYPE_INT => ALIGN_INT, + TYPE_LONG => ALIGN_LONG, + TYPE_FLOAT => ALIGN_FLOAT, + TYPE_DOUBLE => ALIGN_DOUBLE, + -TYPE_CHAR => ALIGN_CHAR, + -TYPE_SHORT => ALIGN_SHORT, + -TYPE_INT => ALIGN_INT, + -TYPE_LONG => ALIGN_LONG, + } + + PACK_MAP = { + TYPE_VOIDP => ((SIZEOF_VOIDP == SIZEOF_LONG_LONG) ? "q" : "l!"), + TYPE_CHAR => "c", + TYPE_SHORT => "s!", + TYPE_INT => "i!", + TYPE_LONG => "l!", + TYPE_FLOAT => "f", + TYPE_DOUBLE => "d", + -TYPE_CHAR => "c", + -TYPE_SHORT => "s!", + -TYPE_INT => "i!", + -TYPE_LONG => "l!", + } + + SIZE_MAP = { + TYPE_VOIDP => SIZEOF_VOIDP, + TYPE_CHAR => SIZEOF_CHAR, + TYPE_SHORT => SIZEOF_SHORT, + TYPE_INT => SIZEOF_INT, + TYPE_LONG => SIZEOF_LONG, + TYPE_FLOAT => SIZEOF_FLOAT, + TYPE_DOUBLE => SIZEOF_DOUBLE, + -TYPE_CHAR => SIZEOF_CHAR, + -TYPE_SHORT => SIZEOF_SHORT, + -TYPE_INT => SIZEOF_INT, + -TYPE_LONG => SIZEOF_LONG, + } + end + + def align(addr, align) + d = addr % align + if( d == 0 ) + addr + else + addr + (align - d) + end + end + module_function :align + end + + class Packer + include PackInfo + + def Packer.[](*types) + Packer.new(types) + end + + def initialize(types) + parse_types(types) + end + + def size() + @size + end + + def pack(ary) + case SIZEOF_VOIDP + when SIZEOF_LONG + ary.pack(@template) + when SIZEOF_LONG + ary.pack(@template) + else + raise(RuntimeError, "sizeof(void*)?") + end + end + + def unpack(ary) + case SIZEOF_VOIDP + when SIZEOF_LONG + ary.join().unpack(@template) + when SIZEOF_LONG_LONG + ary.join().unpack(@template) + else + raise(RuntimeError, "sizeof(void*)?") + end + end + + private + + def parse_types(types) + @template = "" + addr = 0 + types.each{|t| + orig_addr = addr + if( t.is_a?(Array) ) + addr = align(orig_addr, ALIGN_MAP[TYPE_VOIDP]) + else + addr = align(orig_addr, ALIGN_MAP[t]) + end + d = addr - orig_addr + if( d > 0 ) + @template << "x#{d}" + end + if( t.is_a?(Array) ) + @template << (PACK_MAP[t[0]] * t[1]) + addr += (SIZE_MAP[t[0]] * t[1]) + else + @template << PACK_MAP[t] + addr += SIZE_MAP[t] + end + } + addr = align(addr, ALIGN_MAP[TYPE_VOIDP]) + @size = addr + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/stack.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/stack.rb new file mode 100644 index 0000000..99a24bc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/stack.rb @@ -0,0 +1,146 @@ +require 'dl' + +module DL + class Stack + def Stack.[](*types) + Stack.new(types) + end + + def initialize(types) + parse_types(types) + end + + def size() + @size + end + + def types() + @types + end + + def pack(ary) + case SIZEOF_VOIDP + when SIZEOF_LONG + ary.pack(@template).unpack('l!*') + when SIZEOF_LONG_LONG + ary.pack(@template).unpack('q*') + else + raise(RuntimeError, "sizeof(void*)?") + end + end + + def unpack(ary) + case SIZEOF_VOIDP + when SIZEOF_LONG + ary.pack('l!*').unpack(@template) + when SIZEOF_LONG_LONG + ary.pack('q*').unpack(@template) + else + raise(RuntimeError, "sizeof(void*)?") + end + end + + private + + def align(addr, align) + d = addr % align + if( d == 0 ) + addr + else + addr + (align - d) + end + end + +if( defined?(TYPE_LONG_LONG) ) + ALIGN_MAP = { + TYPE_VOIDP => ALIGN_VOIDP, + TYPE_CHAR => ALIGN_VOIDP, + TYPE_SHORT => ALIGN_VOIDP, + TYPE_INT => ALIGN_VOIDP, + TYPE_LONG => ALIGN_VOIDP, + TYPE_LONG_LONG => ALIGN_LONG_LONG, + TYPE_FLOAT => ALIGN_FLOAT, + TYPE_DOUBLE => ALIGN_DOUBLE, + } + + PACK_MAP = { + TYPE_VOIDP => ((SIZEOF_VOIDP == SIZEOF_LONG_LONG)? "q" : "l!"), + TYPE_CHAR => "c", + TYPE_SHORT => "s!", + TYPE_INT => "i!", + TYPE_LONG => "l!", + TYPE_LONG_LONG => "q", + TYPE_FLOAT => "f", + TYPE_DOUBLE => "d", + } + + SIZE_MAP = { + TYPE_VOIDP => SIZEOF_VOIDP, + TYPE_CHAR => SIZEOF_CHAR, + TYPE_SHORT => SIZEOF_SHORT, + TYPE_INT => SIZEOF_INT, + TYPE_LONG => SIZEOF_LONG, + TYPE_LONG_LONG => SIZEOF_LONG_LONG, + TYPE_FLOAT => SIZEOF_FLOAT, + TYPE_DOUBLE => SIZEOF_DOUBLE, + } +else + ALIGN_MAP = { + TYPE_VOIDP => ALIGN_VOIDP, + TYPE_CHAR => ALIGN_VOIDP, + TYPE_SHORT => ALIGN_VOIDP, + TYPE_INT => ALIGN_VOIDP, + TYPE_LONG => ALIGN_VOIDP, + TYPE_FLOAT => ALIGN_FLOAT, + TYPE_DOUBLE => ALIGN_DOUBLE, + } + + PACK_MAP = { + TYPE_VOIDP => ((SIZEOF_VOIDP == SIZEOF_LONG_LONG)? "q" : "l!"), + TYPE_CHAR => "c", + TYPE_SHORT => "s!", + TYPE_INT => "i!", + TYPE_LONG => "l!", + TYPE_FLOAT => "f", + TYPE_DOUBLE => "d", + } + + SIZE_MAP = { + TYPE_VOIDP => SIZEOF_VOIDP, + TYPE_CHAR => SIZEOF_CHAR, + TYPE_SHORT => SIZEOF_SHORT, + TYPE_INT => SIZEOF_INT, + TYPE_LONG => SIZEOF_LONG, + TYPE_FLOAT => SIZEOF_FLOAT, + TYPE_DOUBLE => SIZEOF_DOUBLE, + } +end + + def parse_types(types) + @types = types + @template = "" + addr = 0 + types.each{|t| + addr = add_padding(addr, ALIGN_MAP[t]) + @template << PACK_MAP[t] + addr += SIZE_MAP[t] + } + addr = add_padding(addr, ALIGN_MAP[SIZEOF_VOIDP]) + if( addr % SIZEOF_VOIDP == 0 ) + @size = addr / SIZEOF_VOIDP + else + @size = (addr / SIZEOF_VOIDP) + 1 + end + end + + def add_padding(addr, align) + orig_addr = addr + addr = align(orig_addr, align) + d = addr - orig_addr + if( d > 0 ) + @template << "x#{d}" + end + addr + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/struct.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/struct.rb new file mode 100644 index 0000000..4272b39 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/struct.rb @@ -0,0 +1,213 @@ +require 'dl' +require 'dl/pack.rb' + +module DL + class CStruct + def CStruct.entity_class() + CStructEntity + end + end + + class CUnion + def CUnion.entity_class() + CUnionEntity + end + end + + module CStructBuilder + def create(klass, types, members) + new_class = Class.new(klass){ + define_method(:initialize){|addr| + @entity = klass.entity_class.new(addr, types) + @entity.assign_names(members) + } + define_method(:to_ptr){ @entity } + define_method(:to_i){ @entity.to_i } + members.each{|name| + define_method(name){ @entity[name] } + define_method(name + "="){|val| @entity[name] = val } + } + } + size = klass.entity_class.size(types) + new_class.module_eval(<<-EOS) + def new_class.size() + #{size} + end + def new_class.malloc() + addr = DL.malloc(#{size}) + new(addr) + end + EOS + return new_class + end + module_function :create + end + + class CStructEntity < CPtr + include PackInfo + include ValueUtil + + def CStructEntity.malloc(types, func = nil) + addr = DL.malloc(CStructEntity.size(types)) + CStructEntity.new(addr, types, func) + end + + def CStructEntity.size(types) + offset = 0 + max_align = 0 + types.each_with_index{|t,i| + orig_offset = offset + if( t.is_a?(Array) ) + align = PackInfo::ALIGN_MAP[t[0]] + offset = PackInfo.align(orig_offset, align) + size = offset - orig_offset + offset += (PackInfo::SIZE_MAP[t[0]] * t[1]) + else + align = PackInfo::ALIGN_MAP[t] + offset = PackInfo.align(orig_offset, align) + size = offset - orig_offset + offset += PackInfo::SIZE_MAP[t] + end + if (max_align < align) + max_align = align + end + } + offset = PackInfo.align(offset, max_align) + offset + end + + def initialize(addr, types, func = nil) + set_ctypes(types) + super(addr, @size, func) + end + + def assign_names(members) + @members = members + end + + def set_ctypes(types) + @ctypes = types + @offset = [] + offset = 0 + max_align = 0 + types.each_with_index{|t,i| + orig_offset = offset + if( t.is_a?(Array) ) + align = ALIGN_MAP[t[0]] + else + align = ALIGN_MAP[t] + end + offset = PackInfo.align(orig_offset, align) + size = offset - orig_offset + @offset[i] = offset + if( t.is_a?(Array) ) + offset += (SIZE_MAP[t[0]] * t[1]) + else + offset += SIZE_MAP[t] + end + if (max_align < align) + max_align = align + end + } + offset = PackInfo.align(offset, max_align) + @size = offset + end + + def [](name) + idx = @members.index(name) + if( idx.nil? ) + raise(ArgumentError, "no such member: #{name}") + end + ty = @ctypes[idx] + if( ty.is_a?(Array) ) + r = super(@offset[idx], SIZE_MAP[ty[0]] * ty[1]) + else + r = super(@offset[idx], SIZE_MAP[ty.abs]) + end + packer = Packer.new([ty]) + val = packer.unpack([r]) + case ty + when Array + case ty[0] + when TYPE_VOIDP + val = val.collect{|v| CPtr.new(v)} + end + when TYPE_VOIDP + val = CPtr.new(val[0]) + else + val = val[0] + end + if( ty.is_a?(Integer) && (ty < 0) ) + return unsigned_value(val, ty) + elsif( ty.is_a?(Array) && (ty[0] < 0) ) + return val.collect{|v| unsigned_value(v,ty[0])} + else + return val + end + end + + def []=(name, val) + idx = @members.index(name) + if( idx.nil? ) + raise(ArgumentError, "no such member: #{name}") + end + ty = @ctypes[idx] + packer = Packer.new([ty]) + val = wrap_arg(val, ty, []) + buff = packer.pack([val].flatten()) + super(@offset[idx], buff.size, buff) + if( ty.is_a?(Integer) && (ty < 0) ) + return unsigned_value(val, ty) + elsif( ty.is_a?(Array) && (ty[0] < 0) ) + return val.collect{|v| unsigned_value(v,ty[0])} + else + return val + end + end + + def to_s() + super(@size) + end + end + + class CUnionEntity < CStructEntity + include PackInfo + + def CUnionEntity.malloc(types, func=nil) + addr = DL.malloc(CUnionEntity.size(types)) + CUnionEntity.new(addr, types, func) + end + + def CUnionEntity.size(types) + size = 0 + types.each_with_index{|t,i| + if( t.is_a?(Array) ) + tsize = PackInfo::SIZE_MAP[t[0]] * t[1] + else + tsize = PackInfo::SIZE_MAP[t] + end + if( tsize > size ) + size = tsize + end + } + end + + def set_ctypes(types) + @ctypes = types + @offset = [] + @size = 0 + types.each_with_index{|t,i| + @offset[i] = 0 + if( t.is_a?(Array) ) + size = SIZE_MAP[t[0]] * t[1] + else + size = SIZE_MAP[t] + end + if( size > @size ) + @size = size + end + } + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/types.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/types.rb new file mode 100644 index 0000000..b85ac89 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/types.rb @@ -0,0 +1,40 @@ +module DL + module Win32Types + def included(m) + m.module_eval{ + typealias "DWORD", "unsigned long" + typealias "PDWORD", "unsigned long *" + typealias "WORD", "unsigned short" + typealias "PWORD", "unsigned short *" + typealias "BOOL", "int" + typealias "ATOM", "int" + typealias "BYTE", "unsigned char" + typealias "PBYTE", "unsigned char *" + typealias "UINT", "unsigned int" + typealias "ULONG", "unsigned long" + typealias "UCHAR", "unsigned char" + typealias "HANDLE", "unsigned long" + typealias "PHANDLE", "void*" + typealias "PVOID", "void*" + typealias "LPCSTR", "char*" + typealias "LPSTR", "char*" + typealias "HINSTANCE", "unsigned int" + typealias "HDC", "unsigned int" + typealias "HWND", "unsigned int" + } + end + module_function :included + end + + module BasicTypes + def included(m) + m.module_eval{ + typealias "uint", "unsigned int" + typealias "u_int", "unsigned int" + typealias "ulong", "unsigned long" + typealias "u_long", "unsigned long" + } + end + module_function :included + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/value.rb b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/value.rb new file mode 100644 index 0000000..aa7e0dd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/lib/dl/value.rb @@ -0,0 +1,108 @@ +require 'dl' + +module DL + module ValueUtil + def unsigned_value(val, ty) + case ty.abs + when TYPE_CHAR + [val].pack("c").unpack("C")[0] + when TYPE_SHORT + [val].pack("s!").unpack("S!")[0] + when TYPE_INT + [val].pack("i!").unpack("I!")[0] + when TYPE_LONG + [val].pack("l!").unpack("L!")[0] + when TYPE_LONG_LONG + [val].pack("q!").unpack("Q!")[0] + else + val + end + end + + def signed_value(val, ty) + case ty.abs + when TYPE_CHAR + [val].pack("C").unpack("c")[0] + when TYPE_SHORT + [val].pack("S!").unpack("s!")[0] + when TYPE_INT + [val].pack("I!").unpack("i!")[0] + when TYPE_LONG + [val].pack("L!").unpack("l!")[0] + when TYPE_LONG_LONG + [val].pack("Q!").unpack("q!")[0] + else + val + end + end + + def wrap_args(args, tys, funcs, &block) + result = [] + tys ||= [] + args.each_with_index{|arg, idx| + result.push(wrap_arg(arg, tys[idx], funcs, &block)) + } + result + end + + def wrap_arg(arg, ty, funcs, &block) + funcs ||= [] + case arg + when CPtr + return arg.to_i + when IO + case ty + when TYPE_VOIDP + return CPtr[arg].to_i + else + return arg.to_i + end + when Function + if( block ) + arg.bind_at_call(&block) + funcs.push(arg) + end + return arg.to_i + when String + if( ty.is_a?(Array) ) + return arg.unpack('C*') + else + case SIZEOF_VOIDP + when SIZEOF_LONG + return [arg].pack("p").unpack("l!")[0] + when SIZEOF_LONG_LONG + return [arg].pack("p").unpack("q")[0] + else + raise(RuntimeError, "sizeof(void*)?") + end + end + when Float, Integer + return arg + when Array + if( ty.is_a?(Array) ) # used only by struct + case ty[0] + when TYPE_VOIDP + return arg.collect{|v| Integer(v)} + when TYPE_CHAR + if( arg.is_a?(String) ) + return val.unpack('C*') + end + end + return arg + else + return arg + end + else + if( arg.respond_to?(:to_ptr) ) + return arg.to_ptr.to_i + else + begin + return Integer(arg) + rescue + raise(ArgumentError, "unknown argument type: #{arg.class}") + end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/mkcallback.rb b/lib/ruby-1.9.1-rc1/ext/dl/mkcallback.rb new file mode 100644 index 0000000..8809f69 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/mkcallback.rb @@ -0,0 +1,216 @@ +$out = open("callback.h", "w") + +$dl_h = ARGV[0] || "dl.h" + +# import DLSTACK_SIZE, DLSTACK_ARGS and so on +File.open($dl_h){|f| + pre = "" + f.each{|line| + line.chop! + if( line[-1] == ?\\ ) + line.chop! + line.concat(" ") + pre += line + next + end + if( pre.size > 0 ) + line = pre + line + pre = "" + end + case line + when /#define\s+DLSTACK_SIZE\s+\(?(\d+)\)?/ + DLSTACK_SIZE = $1.to_i + when /#define\s+DLSTACK_ARGS\s+(.+)/ + DLSTACK_ARGS = $1.to_i + when /#define\s+DLTYPE_([A-Z_]+)\s+\(?(\d+)\)?/ + eval("#{$1} = #{$2}") + when /#define\s+MAX_DLTYPE\s+\(?(\d+)\)?/ + MAX_DLTYPE = $1.to_i + when /#define\s+MAX_CALLBACK\s+\(?(\d+)\)?/ + MAX_CALLBACK = $1.to_i + end + } +} + +CDECL = "cdecl" +STDCALL = "stdcall" + +CALLTYPES = [CDECL, STDCALL] + +DLTYPE = { + VOID => { + :name => 'void', + :type => 'void', + :conv => nil, + }, + CHAR => { + :name => 'char', + :type => 'char', + :conv => 'NUM2CHR(%s)' + }, + SHORT => { + :name => 'short', + :type => 'short', + :conv => 'NUM2INT(%s)', + }, + INT => { + :name => 'int', + :type => 'int', + :conv => 'NUM2INT(%s)', + }, + LONG => { + :name => 'long', + :type => 'long', + :conv => 'NUM2LONG(%s)', + }, + LONG_LONG => { + :name => 'long_long', + :type => 'LONG_LONG', + :conv => 'NUM2LL(%s)', + }, + FLOAT => { + :name => 'float', + :type => 'float', + :conv => 'RFLOAT_VALUE(%s)', + }, + DOUBLE => { + :name => 'double', + :type => 'double', + :conv => 'RFLOAT_VALUE(%s)', + }, + VOIDP => { + :name => 'ptr', + :type => 'void *', + :conv => 'NUM2PTR(%s)', + }, +} + + +def func_name(ty, argc, n, calltype) + "rb_dl_callback_#{DLTYPE[ty][:name]}_#{argc}_#{n}_#{calltype}" +end + +$out << (< 0 ? ", args[#{argc}]" : ""}; +#{ + (0...argc).collect{|i| + " args[%d] = LONG2NUM(stack%d);" % [i,i] + }.join("\n") +} + cb = rb_ary_entry(rb_ary_entry(#{proc_entry}, #{ty}), #{(n * DLSTACK_SIZE) + argc}); + ret = rb_funcall2(cb, rb_dl_cb_call, #{argc}, #{argc > 0 ? 'args' : 'NULL'}); + return #{DLTYPE[ty][:conv] ? DLTYPE[ty][:conv] % "ret" : ""}; +} + + EOS +end + +def gen_push_proc_ary(ty, aryname) + sprintf(" rb_ary_push(#{aryname}, rb_ary_new3(%d,%s));", + MAX_CALLBACK * DLSTACK_SIZE, + (0...MAX_CALLBACK).collect{ + (0...DLSTACK_SIZE).collect{ "Qnil" }.join(",") + }.join(",")) +end + +def gen_push_addr_ary(ty, aryname, calltype) + sprintf(" rb_ary_push(#{aryname}, rb_ary_new3(%d,%s));", + MAX_CALLBACK * DLSTACK_SIZE, + (0...MAX_CALLBACK).collect{|i| + (0...DLSTACK_SIZE).collect{|argc| + "PTR2NUM(%s)" % func_name(ty,argc,i,calltype) + }.join(",") + }.join(",")) +end + +def gen_callback_file(ty) + filename = "callback-#{ty}.c" + initname = "rb_dl_init_callbacks_#{ty}" + open(filename, "w") {|f| + f.puts <<-EOS +#include "dl.h" +extern VALUE rb_DLCdeclCallbackAddrs, rb_DLCdeclCallbackProcs; +extern VALUE rb_DLStdcallCallbackAddrs, rb_DLStdcallCallbackProcs; +extern ID rb_dl_cb_call; + EOS + yield f + f.puts <<-EOS +void +#{initname}() +{ +#{gen_push_proc_ary(ty, "rb_DLCdeclCallbackProcs")} +#{gen_push_addr_ary(ty, "rb_DLCdeclCallbackAddrs", CDECL)} +#{gen_push_proc_ary(ty, "rb_DLStdcallCallbackProcs")} +#{gen_push_addr_ary(ty, "rb_DLStdcallCallbackAddrs", STDCALL)} +} + EOS + } + initname +end + +for ty in 0...MAX_DLTYPE + initname = gen_callback_file(ty) {|f| + foreach_proc_entry do |calltype, proc_entry| + for argc in 0...DLSTACK_SIZE + for n in 0...MAX_CALLBACK + f << gencallback(ty, calltype, proc_entry, argc, n) + end + end + end + } + $out << "void #{initname}();\n" +end + +$out << (< ") + exit + end +end + +module DL + class TestBase < Test::Unit::TestCase + include Math + include DL + + def setup + @libc = dlopen(LIBC_SO) + @libm = dlopen(LIBM_SO) + end + + def assert_match(expected, actual, message="") + assert(expected === actual, message) + end + + def assert_positive(actual) + assert(actual > 0) + end + + def assert_zero(actual) + assert(actual == 0) + end + + def assert_negative(actual) + assert(actual < 0) + end + + def test_empty() + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/test/test_dl2.rb b/lib/ruby-1.9.1-rc1/ext/dl/test/test_dl2.rb new file mode 100644 index 0000000..3c854ae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/test/test_dl2.rb @@ -0,0 +1,111 @@ +require 'test_base.rb' +require 'dl/callback' + +module DL +class TestDL < TestBase + def test_call_int() + cfunc = CFunc.new(@libc['atoi'], TYPE_INT, 'atoi') + x = cfunc.call(["100"].pack("p").unpack("l!*")) + assert_equal(100, x) + + cfunc = CFunc.new(@libc['atoi'], TYPE_INT, 'atoi') + x = cfunc.call(["-100"].pack("p").unpack("l!*")) + assert_equal(-100, x) + end + + def test_call_long() + cfunc = CFunc.new(@libc['atol'], TYPE_LONG, 'atol') + x = cfunc.call(["100"].pack("p").unpack("l!*")) + assert_equal(100, x) + cfunc = CFunc.new(@libc['atol'], TYPE_LONG, 'atol') + x = cfunc.call(["-100"].pack("p").unpack("l!*")) + assert_equal(-100, x) + end + + def test_call_double() + cfunc = CFunc.new(@libc['atof'], TYPE_DOUBLE, 'atof') + x = cfunc.call(["0.1"].pack("p").unpack("l!*")) + assert_match(0.09..0.11, x) + + cfunc = CFunc.new(@libc['atof'], TYPE_DOUBLE, 'atof') + x = cfunc.call(["-0.1"].pack("p").unpack("l!*")) + assert_match(-0.11 .. -0.09, x) + end + + def test_sin() + cfunc = CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin') + x = cfunc.call([3.14/2].pack("d").unpack("l!*")) + assert_equal(x, Math.sin(3.14/2)) + + cfunc = CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin') + x = cfunc.call([-3.14/2].pack("d").unpack("l!*")) + assert_equal(Math.sin(-3.14/2), x) + end + + def test_strlen() + cfunc = CFunc.new(@libc['strlen'], TYPE_INT, 'strlen') + x = cfunc.call(["abc"].pack("p").unpack("l!*")) + assert_equal("abc".size, x) + end + + def test_strcpy() + buff = "xxxx" + str = "abc" + cfunc = CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy') + x = cfunc.call([buff,str].pack("pp").unpack("l!*")) + assert_equal("abc\0", buff) + assert_equal("abc\0", CPtr.new(x).to_s(4)) + + buff = "xxxx" + str = "abc" + cfunc = CFunc.new(@libc['strncpy'], TYPE_VOIDP, 'strncpy') + x = cfunc.call([buff,str,3].pack("ppL!").unpack("l!*")) + assert_equal("abcx", buff) + assert_equal("abcx", CPtr.new(x).to_s(4)) + + ptr = CPtr.malloc(4) + str = "abc" + cfunc = CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy') + x = cfunc.call([ptr.to_i,str].pack("l!p").unpack("l!*")) + assert_equal("abc\0", ptr[0,4]) + assert_equal("abc\0", CPtr.new(x).to_s(4)) + end + + def test_callback() + buff = "foobarbaz" + cb = set_callback(TYPE_INT,2){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]} + cfunc = CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort') + cfunc.call([buff, buff.size, 1, cb].pack("pL!L!L!").unpack("l!*")) + assert_equal('aabbfoorz', buff) + end + + def test_dlwrap() + ary = [0,1,2,4,5] + addr = dlwrap(ary) + ary2 = dlunwrap(addr) + assert_equal(ary, ary2) + end + + def test_cptr() + check = Proc.new{|str,ptr| + assert_equal(str.size(), ptr.size()) + assert_equal(str, ptr.to_s()) + assert_equal(str[0,2], ptr.to_s(2)) + assert_equal(str[0,2], ptr[0,2]) + assert_equal(str[1,2], ptr[1,2]) + assert_equal(str[1,0], ptr[1,0]) + assert_equal(str[0].ord, ptr[0]) + assert_equal(str[1].ord, ptr[1]) + } + str = 'abc' + ptr = CPtr[str] + check.call(str, ptr) + str[0] = "c" + ptr[0] = "c".ord + check.call(str, ptr) + str[0,2] = "aa" + ptr[0,2] = "aa" + check.call(str, ptr) + end +end +end # module DL diff --git a/lib/ruby-1.9.1-rc1/ext/dl/test/test_func.rb b/lib/ruby-1.9.1-rc1/ext/dl/test/test_func.rb new file mode 100644 index 0000000..be93771 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/test/test_func.rb @@ -0,0 +1,62 @@ +require 'test_base' +require 'dl/func' + +module DL + class TestFunc < TestBase + def test_strcpy() + f = Function.new(CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy'), + [TYPE_VOIDP, TYPE_VOIDP]) + buff = "000" + str = f.call(buff, "123") + assert_equal("123", buff) + assert_equal("123", str.to_s) + end + + def test_isdigit() + f = Function.new(CFunc.new(@libc['isdigit'], TYPE_INT, 'isdigit'), + [TYPE_INT]) + r1 = f.call(?1.ord) + r2 = f.call(?2.ord) + rr = f.call(?r.ord) + assert_positive(r1) + assert_positive(r2) + assert_zero(rr) + end + + def test_atof() + f = Function.new(CFunc.new(@libc['atof'], TYPE_DOUBLE, 'atof'), + [TYPE_VOIDP]) + r = f.call("12.34") + assert_match(12.00..13.00, r) + end + + def test_strtod() + f = Function.new(CFunc.new(@libc['strtod'], TYPE_DOUBLE, 'strtod'), + [TYPE_VOIDP, TYPE_VOIDP]) + buff1 = "12.34" + buff2 = " " + r = f.call(buff1, buff2) + assert_match(12.00..13.00, r) + end + + def test_qsort1() + cb = Function.new(CFunc.new(0, TYPE_INT, 'qsort'), + [TYPE_VOIDP, TYPE_VOIDP]){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]} + qsort = Function.new(CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort'), + [TYPE_VOIDP, TYPE_INT, TYPE_INT, TYPE_VOIDP]) + buff = "9341" + qsort.call(buff, buff.size, 1, cb) + assert_equal("1349", buff) + end + + def test_qsort2() + cb = TempFunction.new(CFunc.new(0, TYPE_INT, 'qsort'), + [TYPE_VOIDP, TYPE_VOIDP]) + qsort = Function.new(CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort'), + [TYPE_VOIDP, TYPE_INT, TYPE_INT, TYPE_VOIDP]) + buff = "9341" + qsort.call(buff, buff.size, 1, cb){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]} + assert_equal("1349", buff) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/test/test_import.rb b/lib/ruby-1.9.1-rc1/ext/dl/test/test_import.rb new file mode 100644 index 0000000..8514f82 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/test/test_import.rb @@ -0,0 +1,154 @@ +require 'test_base' +require 'dl/import' + +module DL + module LIBC + extend Importer + dlload LIBC_SO, LIBM_SO + + typealias 'string', 'char*' + typealias 'FILE*', 'void*' + + extern "void *strcpy(char*, char*)" + extern "int isdigit(int)" + extern "double atof(string)" + extern "unsigned long strtoul(char*, char **, int)" + extern "int qsort(void*, unsigned long, unsigned long, void*)" + extern "int fprintf(FILE*, char*)" + extern "int gettimeofday(timeval*, timezone*)" rescue nil + + QsortCallback = bind("void *qsort_callback(void*, void*)", :temp) + BoundQsortCallback = bind("void *qsort_callback(void*, void*)"){|ptr1,ptr2| ptr1[0] <=> ptr2[0]} + Timeval = struct [ + "long tv_sec", + "long tv_usec", + ] + Timezone = struct [ + "int tz_minuteswest", + "int tz_dsttime", + ] + MyStruct = struct [ + "short num[5]", + "char c", + "unsigned char buff[7]", + ] + + CallCallback = bind("void call_callback(void*, void*)"){|ptr1, ptr2| + f = Function.new(CFunc.new(ptr1.to_i, DL::TYPE_VOID, ""), [TYPE_VOIDP]) + f.call(ptr2) + } + CarriedFunction = bind("void callback_function(void*)", :carried, 0) + end + + class TestImport < TestBase + def test_malloc() + s1 = LIBC::Timeval.malloc() + s2 = LIBC::Timeval.malloc() + assert_not_equal(s1.to_ptr.to_i, s2.to_ptr.to_i) + end + + def test_sizeof() + assert_equal(DL::SIZEOF_VOIDP, LIBC.sizeof("FILE*")) + assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct)) + end + + def test_unsigned_result() + d = (2 ** 31) + 1 + + r = LIBC.strtoul(d.to_s, 0, 0) + assert_equal(d, r) + end + + def test_io() + if( RUBY_PLATFORM != DL::BUILD_RUBY_PLATFORM ) + return + end + io_in,io_out = IO.pipe() + LIBC.fprintf(io_out, "hello") + io_out.flush() + io_out.close() + str = io_in.read() + io_in.close() + assert_equal("hello", str) + end + + def test_value() + i = LIBC.value('int', 2) + assert_equal(2, i.value) + + d = LIBC.value('double', 2.0) + assert_equal(2.0, d.value) + + ary = LIBC.value('int[3]', [0,1,2]) + assert_equal([0,1,2], ary.value) + end + + def test_carried_function() + data1 = "data" + data2 = nil + LIBC.call_callback(LIBC::CarriedFunction, LIBC::CarriedFunction.create_carrier(data1)){|d| + data2 = d + } + assert_equal(data1, data2) + end + + def test_struct() + s = LIBC::MyStruct.malloc() + s.num = [0,1,2,3,4] + s.c = ?a.ord + s.buff = "012345\377" + assert_equal([0,1,2,3,4], s.num) + assert_equal(?a.ord, s.c) + assert_equal([?0.ord,?1.ord,?2.ord,?3.ord,?4.ord,?5.ord,?\377.ord], s.buff) + end + + def test_gettimeofday() + if( defined?(LIBC.gettimeofday) ) + timeval = LIBC::Timeval.malloc() + timezone = LIBC::Timezone.malloc() + LIBC.gettimeofday(timeval, timezone) + cur = Time.now() + assert(cur.to_i - 2 <= timeval.tv_sec && timeval.tv_sec <= cur.to_i) + end + end + + def test_strcpy() + buff = "000" + str = LIBC.strcpy(buff, "123") + assert_equal("123", buff) + assert_equal("123", str.to_s) + end + + def test_isdigit() + r1 = LIBC.isdigit(?1.ord) + r2 = LIBC.isdigit(?2.ord) + rr = LIBC.isdigit(?r.ord) + assert_positive(r1) + assert_positive(r2) + assert_zero(rr) + end + + def test_atof() + r = LIBC.atof("12.34") + assert_match(12.00..13.00, r) + end + + def test_strtod() + f = Function.new(CFunc.new(@libc['strtod'], TYPE_DOUBLE, 'strtod'), + [TYPE_VOIDP, TYPE_VOIDP]) + buff1 = "12.34" + buff2 = " " + r = f.call(buff1, buff2) + assert_match(12.00..13.00, r) + end + + def test_qsort() + buff = "9341" + LIBC.qsort(buff, buff.size, 1, LIBC::QsortCallback){|ptr1,ptr2| ptr1[0] <=> ptr2[0]} + assert_equal("1349", buff) + buff = "9341" + LIBC.qsort(buff, buff.size, 1, LIBC::BoundQsortCallback) + assert_equal("1349", buff) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/test/test_win32.rb b/lib/ruby-1.9.1-rc1/ext/dl/test/test_win32.rb new file mode 100644 index 0000000..b221028 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/test/test_win32.rb @@ -0,0 +1,53 @@ +require 'test_base' +require 'dl/import' +require 'dl/types' + +module Win32API + extend DL::Importer + + dlload "kernel32.dll" + + include DL::Win32Types + + OSVERSIONINFO = struct [ + "DWORD dwOSVersionInfoSize", + "DWORD dwMajorVersion", + "DWORD dwMinorVersion", + "DWORD dwBuildNumber", + "DWORD dwPlatformId", + "UCHAR szCSDVersion[128]", + ] + + typealias "POSVERSIONINFO", "OSVERSIONINFO*" + + extern "BOOL GetVersionEx(POSVERSIONINFO)", :stdcall + + def get_version_ex() + ptr = OSVERSIONINFO.malloc() + ptr.dwOSVersionInfoSize = OSVERSIONINFO.size + ret = GetVersionEx(ptr) + if( ret ) + ptr + else + nil + end + end + module_function :get_version_ex +end + +module DL +class TestWin32 < TestBase + def test_version() + platform = Win32API.get_version_ex().dwPlatformId + case ENV['OS'] + when 'Windows_NT' + expect = 2 + when /Windows.+/ + expect = 1 + else + expect = 0 + end + assert_equal(expect, platform) + end +end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/win32/extconf.rb b/lib/ruby-1.9.1-rc1/ext/dl/win32/extconf.rb new file mode 100644 index 0000000..a72ca49 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/win32/extconf.rb @@ -0,0 +1,3 @@ +if compiled?('dl') and $mswin||$bccwin||$mingw||$cygwin + create_makefile('win32') +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/Win32API.rb b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/Win32API.rb new file mode 100644 index 0000000..b642e0c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/Win32API.rb @@ -0,0 +1,28 @@ +# -*- ruby -*- +# for backward compatibility +warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: Win32API is deprecated after Ruby 1.9.1; use dl directly instead" if $VERBOSE + +require 'dl' + +class Win32API + DLL = {} + TYPEMAP = {"0" => DL::TYPE_VOID, "S" => DL::TYPE_VOIDP, "I" => DL::TYPE_LONG} + + def initialize(dllname, func, import, export = "0") + @proto = [import].join.tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1') + handle = DLL[dllname] ||= DL.dlopen(dllname) + @func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func) + end + + def call(*args) + import = @proto.split("") + args.each_with_index do |x, i| + args[i], = [x == 0 ? nil : x].pack("p").unpack("l!*") if import[i] == "S" + args[i], = [x].pack("I").unpack("i") if import[i] == "I" + end + ret, = @func.call(args) + return ret || 0 + end + + alias Call call +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/registry.rb b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/registry.rb new file mode 100644 index 0000000..ccdd721 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/registry.rb @@ -0,0 +1,832 @@ +=begin += Win32 Registry I/F +win32/registry is registry accessor library for Win32 platform. +It uses Win32API to call Win32 Registry APIs. + +== example + Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg| + value = reg['foo'] # read a value + value = reg['foo', Win32::Registry::REG_SZ] # read a value with type + type, value = reg.read('foo') # read a value + reg['foo'] = 'bar' # write a value + reg['foo', Win32::Registry::REG_SZ] = 'bar' # write a value with type + reg.write('foo', Win32::Registry::REG_SZ, 'bar') # write a value + + reg.each_value { |name, type, data| ... } # Enumerate values + reg.each_key { |key, wtime| ... } # Enumerate subkeys + + reg.delete_value(name) # Delete a value + reg.delete_key(name) # Delete a subkey + reg.delete_key(name, true) # Delete a subkey recursively + end + += Reference + +== Win32::Registry class + +=== including modules + +* Enumerable +* Registry::Constants + +=== class methods +--- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) +--- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) { |reg| ... } + Open the registry key ((|subkey|)) under ((|key|)). + ((|key|)) is Win32::Registry object of parent key. + You can use predefined key HKEY_* (see (())) + + ((|desired|)) and ((|opt|)) is access mask and key option. + For detail, see (()). + + If block is given, the key is closed automatically. + +--- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) +--- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) { |reg| ... } + Create or open the registry key ((|subkey|)) under ((|key|)). + You can use predefined key HKEY_* (see (())) + + If subkey is already exists, key is opened and Registry#(()) + method will return false. + + If block is given, the key is closed automatically. + +--- Registry.expand_environ(str) + Replace (({%\w+%})) into the environment value of ((|str|)). + This method is used for REG_EXPAND_SZ. + + For detail, see (()) Win32 API. + +--- Registry.type2name(type) + Convert registry type value to readable string. + +--- Registry.wtime2time(wtime) + Convert 64-bit FILETIME integer into Time object. + +--- Registry.time2wtime(time) + Convert Time object or Integer object into 64-bit FILETIME. + +=== instance methods +--- open(subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) + Same as (({Win32::(())(self, subkey, desired, opt)})) + +--- create(subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) + Same as (({Win32::(())(self, subkey, desired, opt)})) + +--- close + Close key. + + After closed, most method raises error. + +--- read(name, *rtype) + Read a registry value named ((|name|)) and return array of + [ ((|type|)), ((|data|)) ]. + When name is nil, the `default' value is read. + + ((|type|)) is value type. (see (())) + ((|data|)) is value data, its class is: + :REG_SZ, REG_EXPAND_SZ + String + :REG_MULTI_SZ + Array of String + :REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD + Integer + :REG_BINARY + String (contains binary data) + + When ((|rtype|)) is specified, the value type must be included by + ((|rtype|)) array, or TypeError is raised. + +--- self[name, *rtype] + Read a registry value named ((|name|)) and return its value data. + The class of value is same as (()) method returns. + + If the value type is REG_EXPAND_SZ, returns value data whose environment + variables are replaced. + If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD, + REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised. + + The meaning of ((|rtype|)) is same as (()) method. + +--- read_s(name) +--- read_i(name) +--- read_bin(name) + Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin) + registry value named ((|name|)). + + If the values type does not match, TypeError is raised. + +--- read_s_expand(name) + Read a REG_SZ or REG_EXPAND_SZ registry value named ((|name|)). + + If the value type is REG_EXPAND_SZ, environment variables are replaced. + Unless the value type is REG_SZ or REG_EXPAND_SZ, TypeError is raised. + +--- write(name, type, data) + Write ((|data|)) to a registry value named ((|name|)). + When name is nil, write to the `default' value. + + ((|type|)) is type value. (see (())) + Class of ((|data|)) must be same as which (()) + method returns. + +--- self[name, wtype = nil] = value + Write ((|value|)) to a registry value named ((|name|)). + + If ((|wtype|)) is specified, the value type is it. + Otherwise, the value type is depend on class of ((|value|)): + :Integer + REG_DWORD + :String + REG_SZ + :Array + REG_MULTI_SZ + +--- write_s(name, value) +--- write_i(name, value) +--- write_bin(name, value) + Write ((|value|)) to a registry value named ((|name|)). + + The value type is REG_SZ(write_s), REG_DWORD(write_i), or + REG_BINARY(write_bin). + +--- each { |name, type, value| ... } +--- each_value { |name, type, value| ... } + Enumerate values. + +--- each_key { |subkey, wtime| ... } + Enumerate subkeys. + + ((|subkey|)) is String which contains name of subkey. + ((|wtime|)) is last write time as FILETIME (64-bit integer). + (see (())) + +--- delete(name) +--- delete_value(name) + Delete a registry value named ((|name|)). + We can not delete the `default' value. + +--- delete_key(name, recursive = false) + Delete a subkey named ((|name|)) and all its values. + + If ((|recursive|)) is false, the subkey must not have subkeys. + Otherwise, this method deletes all subkeys and values recursively. + +--- flush + Write all the attributes into the registry file. + +--- created? + Returns if key is created ((*newly*)). + (see (())) + +--- open? + Returns if key is not closed. + +--- hkey + Returns key handle value. + +--- parent + Win32::Registry object of parent key, or nil if predefeined key. + +--- keyname + Same as ((|subkey|)) value of (()) or + (()) method. + +--- disposition + Disposition value (REG_CREATED_NEW_KEY or REG_OPENED_EXISTING_KEY). + +--- name +--- to_s + Full path of key such as (({'HKEY_CURRENT_USER\SOFTWARE\foo\bar'})). + +--- info + Returns key information as Array of: + :num_keys + The number of subkeys. + :max_key_length + Maximum length of name of subkeys. + :num_values + The number of values. + :max_value_name_length + Maximum length of name of values. + :max_value_length + Maximum length of value of values. + :descriptor_length + Length of security descriptor. + :wtime + Last write time as FILETIME(64-bit integer) + + For detail, see (()) Win32 API. + +--- num_keys +--- max_key_length +--- num_values +--- max_value_name_length +--- max_value_length +--- descriptor_length +--- wtime + Returns an item of key information. + +=== constants +--- HKEY_CLASSES_ROOT +--- HKEY_CURRENT_USER +--- HKEY_LOCAL_MACHINE +--- HKEY_PERFORMANCE_DATA +--- HKEY_CURRENT_CONFIG +--- HKEY_DYN_DATA + Win32::Registry object whose key is predefined key. + For detail, see (()). + +== Win32::Registry::Constants module + +For detail, see (()). + +--- HKEY_* + Predefined key ((*handle*)). + These are Integer, not Win32::Registry. + +--- REG_* + Registry value type. + +--- KEY_* + Security access mask. + +--- KEY_OPTIONS_* + Key options. + +--- REG_CREATED_NEW_KEY +--- REG_OPENED_EXISTING_KEY + If the key is created newly or opened existing key. + See also Registry#(()) method. + +=end + +require 'Win32API' + +module Win32 + class Registry + module Constants + HKEY_CLASSES_ROOT = 0x80000000 + HKEY_CURRENT_USER = 0x80000001 + HKEY_LOCAL_MACHINE = 0x80000002 + HKEY_USERS = 0x80000003 + HKEY_PERFORMANCE_DATA = 0x80000004 + HKEY_PERFORMANCE_TEXT = 0x80000050 + HKEY_PERFORMANCE_NLSTEXT = 0x80000060 + HKEY_CURRENT_CONFIG = 0x80000005 + HKEY_DYN_DATA = 0x80000006 + + REG_NONE = 0 + REG_SZ = 1 + REG_EXPAND_SZ = 2 + REG_BINARY = 3 + REG_DWORD = 4 + REG_DWORD_LITTLE_ENDIAN = 4 + REG_DWORD_BIG_ENDIAN = 5 + REG_LINK = 6 + REG_MULTI_SZ = 7 + REG_RESOURCE_LIST = 8 + REG_FULL_RESOURCE_DESCRIPTOR = 9 + REG_RESOURCE_REQUIREMENTS_LIST = 10 + REG_QWORD = 11 + REG_QWORD_LITTLE_ENDIAN = 11 + + STANDARD_RIGHTS_READ = 0x00020000 + STANDARD_RIGHTS_WRITE = 0x00020000 + KEY_QUERY_VALUE = 0x0001 + KEY_SET_VALUE = 0x0002 + KEY_CREATE_SUB_KEY = 0x0004 + KEY_ENUMERATE_SUB_KEYS = 0x0008 + KEY_NOTIFY = 0x0010 + KEY_CREATE_LINK = 0x0020 + KEY_READ = STANDARD_RIGHTS_READ | + KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY + KEY_WRITE = STANDARD_RIGHTS_WRITE | + KEY_SET_VALUE | KEY_CREATE_SUB_KEY + KEY_EXECUTE = KEY_READ + KEY_ALL_ACCESS = KEY_READ | KEY_WRITE | KEY_CREATE_LINK + + REG_OPTION_RESERVED = 0x0000 + REG_OPTION_NON_VOLATILE = 0x0000 + REG_OPTION_VOLATILE = 0x0001 + REG_OPTION_CREATE_LINK = 0x0002 + REG_OPTION_BACKUP_RESTORE = 0x0004 + REG_OPTION_OPEN_LINK = 0x0008 + REG_LEGAL_OPTION = REG_OPTION_RESERVED | + REG_OPTION_NON_VOLATILE | REG_OPTION_CREATE_LINK | + REG_OPTION_BACKUP_RESTORE | REG_OPTION_OPEN_LINK + + REG_CREATED_NEW_KEY = 1 + REG_OPENED_EXISTING_KEY = 2 + + REG_WHOLE_HIVE_VOLATILE = 0x0001 + REG_REFRESH_HIVE = 0x0002 + REG_NO_LAZY_FLUSH = 0x0004 + REG_FORCE_RESTORE = 0x0008 + + MAX_KEY_LENGTH = 514 + MAX_VALUE_LENGTH = 32768 + end + include Constants + include Enumerable + + # + # Error + # + class Error < ::StandardError + FormatMessageA = Win32API.new('kernel32.dll', 'FormatMessageA', 'LPLLPLP', 'L') + def initialize(code) + @code = code + msg = "\0".force_encoding(Encoding::ASCII_8BIT) * 1024 + len = FormatMessageA.call(0x1200, 0, code, 0, msg, 1024, 0) + msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap)) + super msg.tr("\r", '').chomp + end + attr_reader :code + end + + # + # Predefined Keys + # + class PredefinedKey < Registry + def initialize(hkey, keyname) + @hkey = hkey + @parent = nil + @keyname = keyname + @disposition = REG_OPENED_EXISTING_KEY + end + + # Predefined keys cannot be closed + def close + raise Error.new(5) ## ERROR_ACCESS_DENIED + end + + # Fake class for Registry#open, Registry#create + def class + Registry + end + + # Make all + Constants.constants.grep(/^HKEY_/) do |c| + Registry.const_set c, new(Constants.const_get(c), c) + end + end + + # + # Win32 APIs + # + module API + [ + %w/RegOpenKeyExA LPLLP L/, + %w/RegCreateKeyExA LPLLLLPPP L/, + %w/RegEnumValueA LLPPPPPP L/, + %w/RegEnumKeyExA LLPPLLLP L/, + %w/RegQueryValueExA LPLPPP L/, + %w/RegSetValueExA LPLLPL L/, + %w/RegDeleteValue LP L/, + %w/RegDeleteKey LP L/, + %w/RegFlushKey L L/, + %w/RegCloseKey L L/, + %w/RegQueryInfoKey LPPPPPPPPPPP L/, + ].each do |fn| + const_set fn[0].intern, Win32API.new('advapi32.dll', *fn) + end + + module_function + + def check(result) + raise Error, result, caller(2) if result != 0 + end + + def packdw(dw) + [dw].pack('V') + end + + def unpackdw(dw) + dw += [0].pack('V') + dw.unpack('V')[0] + end + + def packqw(qw) + [ qw & 0xFFFFFFFF, qw >> 32 ].pack('VV') + end + + def unpackqw(qw) + qw = qw.unpack('VV') + (qw[1] << 32) | qw[0] + end + + def OpenKey(hkey, name, opt, desired) + result = packdw(0) + check RegOpenKeyExA.call(hkey, name, opt, desired, result) + unpackdw(result) + end + + def CreateKey(hkey, name, opt, desired) + result = packdw(0) + disp = packdw(0) + check RegCreateKeyExA.call(hkey, name, 0, 0, opt, desired, + 0, result, disp) + [ unpackdw(result), unpackdw(disp) ] + end + + def EnumValue(hkey, index) + name = ' ' * Constants::MAX_KEY_LENGTH + size = packdw(Constants::MAX_KEY_LENGTH) + check RegEnumValueA.call(hkey, index, name, size, 0, 0, 0, 0) + name[0, unpackdw(size)] + end + + def EnumKey(hkey, index) + name = ' ' * Constants::MAX_KEY_LENGTH + size = packdw(Constants::MAX_KEY_LENGTH) + wtime = ' ' * 8 + check RegEnumKeyExA.call(hkey, index, name, size, 0, 0, 0, wtime) + [ name[0, unpackdw(size)], unpackqw(wtime) ] + end + + def QueryValue(hkey, name) + type = packdw(0) + size = packdw(0) + check RegQueryValueExA.call(hkey, name, 0, type, 0, size) + data = ' ' * unpackdw(size) + check RegQueryValueExA.call(hkey, name, 0, type, data, size) + [ unpackdw(type), data[0, unpackdw(size)] ] + end + + def SetValue(hkey, name, type, data, size) + check RegSetValueExA.call(hkey, name, 0, type, data, size) + end + + def DeleteValue(hkey, name) + check RegDeleteValue.call(hkey, name) + end + + def DeleteKey(hkey, name) + check RegDeleteKey.call(hkey, name) + end + + def FlushKey(hkey) + check RegFlushKey.call(hkey) + end + + def CloseKey(hkey) + check RegCloseKey.call(hkey) + end + + def QueryInfoKey(hkey) + subkeys = packdw(0) + maxsubkeylen = packdw(0) + values = packdw(0) + maxvaluenamelen = packdw(0) + maxvaluelen = packdw(0) + secdescs = packdw(0) + wtime = ' ' * 8 + check RegQueryInfoKey.call(hkey, 0, 0, 0, subkeys, maxsubkeylen, 0, + values, maxvaluenamelen, maxvaluelen, secdescs, wtime) + [ unpackdw(subkeys), unpackdw(maxsubkeylen), unpackdw(values), + unpackdw(maxvaluenamelen), unpackdw(maxvaluelen), + unpackdw(secdescs), unpackqw(wtime) ] + end + end + + # + # utility functions + # + def self.expand_environ(str) + str.gsub(/%([^%]+)%/) { ENV[$1] || ENV[$1.upcase] || $& } + end + + @@type2name = { } + %w[ + REG_NONE REG_SZ REG_EXPAND_SZ REG_BINARY REG_DWORD + REG_DWORD_BIG_ENDIAN REG_LINK REG_MULTI_SZ + REG_RESOURCE_LIST REG_FULL_RESOURCE_DESCRIPTOR + REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD + ].each do |type| + @@type2name[Constants.const_get(type)] = type + end + + def self.type2name(type) + @@type2name[type] || type.to_s + end + + def self.wtime2time(wtime) + Time.at((wtime - 116444736000000000) / 10000000) + end + + def self.time2wtime(time) + time.to_i * 10000000 + 116444736000000000 + end + + # + # constructors + # + private_class_method :new + + def self.open(hkey, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) + subkey = subkey.chomp('\\') + newkey = API.OpenKey(hkey.hkey, subkey, opt, desired) + obj = new(newkey, hkey, subkey, REG_OPENED_EXISTING_KEY) + if block_given? + begin + yield obj + ensure + obj.close + end + else + obj + end + end + + def self.create(hkey, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) + newkey, disp = API.CreateKey(hkey.hkey, subkey, opt, desired) + obj = new(newkey, hkey, subkey, disp) + if block_given? + begin + yield obj + ensure + obj.close + end + else + obj + end + end + + # + # finalizer + # + @@final = proc { |hkey| proc { API.CloseKey(hkey[0]) if hkey[0] } } + + # + # initialize + # + def initialize(hkey, parent, keyname, disposition) + @hkey = hkey + @parent = parent + @keyname = keyname + @disposition = disposition + @hkeyfinal = [ hkey ] + ObjectSpace.define_finalizer self, @@final.call(@hkeyfinal) + end + attr_reader :hkey, :parent, :keyname, :disposition + + # + # attributes + # + def created? + @disposition == REG_CREATED_NEW_KEY + end + + def open? + !@hkey.nil? + end + + def name + parent = self + name = @keyname + while parent = parent.parent + name = parent.keyname + '\\' + name + end + name + end + + def inspect + "\#" + end + + # + # marshalling + # + def _dump(depth) + raise TypeError, "can't dump Win32::Registry" + end + + # + # open/close + # + def open(subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED, &blk) + self.class.open(self, subkey, desired, opt, &blk) + end + + def create(subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED, &blk) + self.class.create(self, subkey, desired, opt, &blk) + end + + def close + API.CloseKey(@hkey) + @hkey = @parent = @keyname = nil + @hkeyfinal[0] = nil + end + + # + # iterator + # + def each_value + index = 0 + while true + begin + subkey = API.EnumValue(@hkey, index) + rescue Error + break + end + begin + type, data = read(subkey) + rescue Error + next + end + yield subkey, type, data + index += 1 + end + index + end + alias each each_value + + def each_key + index = 0 + while true + begin + subkey, wtime = API.EnumKey(@hkey, index) + rescue Error + break + end + yield subkey, wtime + index += 1 + end + index + end + + def keys + keys_ary = [] + each_key { |key,| keys_ary << key } + keys_ary + end + + # + # reader + # + def read(name, *rtype) + type, data = API.QueryValue(@hkey, name) + unless rtype.empty? or rtype.include?(type) + raise TypeError, "Type mismatch (expect #{rtype.inspect} but #{type} present)" + end + case type + when REG_SZ, REG_EXPAND_SZ + [ type, data.chop ] + when REG_MULTI_SZ + [ type, data.split(/\0/) ] + when REG_BINARY + [ type, data ] + when REG_DWORD + [ type, API.unpackdw(data) ] + when REG_DWORD_BIG_ENDIAN + [ type, data.unpack('N')[0] ] + when REG_QWORD + [ type, API.unpackqw(data) ] + else + raise TypeError, "Type #{type} is not supported." + end + end + + def [](name, *rtype) + type, data = read(name, *rtype) + case type + when REG_SZ, REG_DWORD, REG_QWORD, REG_MULTI_SZ + data + when REG_EXPAND_SZ + Registry.expand_environ(data) + else + raise TypeError, "Type #{type} is not supported." + end + end + + def read_s(name) + read(name, REG_SZ)[1] + end + + def read_s_expand(name) + type, data = read(name, REG_SZ, REG_EXPAND_SZ) + if type == REG_EXPAND_SZ + Registry.expand_environ(data) + else + data + end + end + + def read_i(name) + read(name, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD)[1] + end + + def read_bin(name) + read(name, REG_BINARY)[1] + end + + # + # writer + # + def write(name, type, data) + case type + when REG_SZ, REG_EXPAND_SZ + data = data.to_s + "\0" + when REG_MULTI_SZ + data = data.to_a.join("\0") + "\0\0" + when REG_BINARY + data = data.to_s + when REG_DWORD + data = API.packdw(data.to_i) + when REG_DWORD_BIG_ENDIAN + data = [data.to_i].pack('N') + when REG_QWORD + data = API.packqw(data.to_i) + else + raise TypeError, "Unsupported type #{type}" + end + API.SetValue(@hkey, name, type, data, data.length) + end + + def []=(name, rtype, value = nil) + if value + write name, rtype, value + else + case value = rtype + when Integer + write name, REG_DWORD, value + when String + write name, REG_SZ, value + when Array + write name, REG_MULTI_SZ, value + else + raise TypeError, "Unexpected type #{value.class}" + end + end + value + end + + def write_s(name, value) + write name, REG_SZ, value.to_s + end + + def write_i(name, value) + write name, REG_DWORD, value.to_i + end + + def write_bin(name, value) + write name, REG_BINARY, value.to_s + end + + # + # delete + # + def delete_value(name) + API.DeleteValue(@hkey, name) + end + alias delete delete_value + + def delete_key(name, recursive = false) + if recursive + open(name, KEY_ALL_ACCESS) do |reg| + reg.keys.each do |key| + begin + reg.delete_key(key, true) + rescue Error + # + end + end + end + API.DeleteKey(@hkey, name) + else + begin + API.EnumKey @hkey, 0 + rescue Error + return API.DeleteKey(@hkey, name) + end + raise Error.new(5) ## ERROR_ACCESS_DENIED + end + end + + # + # flush + # + def flush + API.FlushKey @hkey + end + + # + # key information + # + def info + API.QueryInfoKey(@hkey) + end + %w[ + num_keys max_key_length + num_values max_value_name_length max_value_length + descriptor_length wtime + ].each_with_index do |s, i| + eval <<-__END__ + def #{s} + info[#{i}] + end + __END__ + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/resolv.rb b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/resolv.rb new file mode 100644 index 0000000..4e69f58 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/resolv.rb @@ -0,0 +1,370 @@ +=begin += Win32 DNS and DHCP I/F + +=end + +require 'win32/registry' + +module Win32 + module Resolv + API = Registry::API + + def self.get_hosts_path + path = get_hosts_dir + path = File.expand_path('hosts', path) + File.exist?(path) ? path : nil + end + + def self.get_resolv_info + search, nameserver = get_info + if search.empty? + search = nil + else + search.delete("") + search.uniq! + end + if nameserver.empty? + nameserver = nil + else + nameserver.delete("") + nameserver.delete("0.0.0.0") + nameserver.uniq! + end + [ search, nameserver ] + end + +getv = Win32API.new('kernel32.dll', 'GetVersionExA', 'P', 'L') +info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128 +getv.call(info) +if info.unpack('V5')[4] == 2 # VER_PLATFORM_WIN32_NT +#==================================================================== +# Windows NT +#==================================================================== + module_eval <<-'__EOS__', __FILE__, __LINE__+1 + TCPIP_NT = 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters' + + class << self + private + def get_hosts_dir + Registry::HKEY_LOCAL_MACHINE.open(TCPIP_NT) do |reg| + reg.read_s_expand('DataBasePath') + end + end + + def get_info + search = nil + nameserver = [] + Registry::HKEY_LOCAL_MACHINE.open(TCPIP_NT) do |reg| + begin + slist = reg.read_s('SearchList') + search = slist.split(/,\s*/) unless slist.empty? + rescue Registry::Error + end + + if add_search = search.nil? + search = [] + begin + nvdom = reg.read_s('NV Domain') + unless nvdom.empty? + @search = [ nvdom ] + if reg.read_i('UseDomainNameDevolution') != 0 + if /^[\w\d]+\./ =~ nvdom + devo = $' + end + end + end + rescue Registry::Error + end + end + + reg.open('Interfaces') do |reg| + reg.each_key do |iface,| + reg.open(iface) do |regif| + begin + [ 'NameServer', 'DhcpNameServer' ].each do |key| + begin + ns = regif.read_s(key) + rescue + else + unless ns.empty? + nameserver.concat(ns.split(/[,\s]\s*/)) + break + end + end + end + rescue Registry::Error + end + + if add_search + begin + [ 'Domain', 'DhcpDomain' ].each do |key| + dom = regif.read_s(key) + unless dom.empty? + search.concat(dom.split(/,\s*/)) + break + end + end + rescue Registry::Error + end + end + end + end + end + search << devo if add_search and devo + end + [ search.uniq, nameserver.uniq ] + end + end + __EOS__ +else +#==================================================================== +# Windows 9x +#==================================================================== + module_eval <<-'__EOS__', __FILE__, __LINE__+1 + TCPIP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\MSTCP' + DHCP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\DHCP' + WINDOWS = 'Software\Microsoft\Windows\CurrentVersion' + + class << self + # private + + def get_hosts_dir + Registry::HKEY_LOCAL_MACHINE.open(WINDOWS) do |reg| + reg.read_s_expand('SystemRoot') + end + end + + def get_info + search = [] + nameserver = [] + begin + Registry::HKEY_LOCAL_MACHINE.open(TCPIP_9X) do |reg| + if reg.read_s("EnableDNS") == "1" + domain = reg.read_s("Domain") + ns = reg.read_s("NameServer") + slist = reg.read_s("SearchList") + search << domain unless domain.empty? + search.concat(slist.split(/,\s*/)) + nameserver.concat(ns.split(/[,\s]\s*/)) + end + end + rescue Registry::Error + end + + dhcpinfo = get_dhcpinfo + search.concat(dhcpinfo[0]) + nameserver.concat(dhcpinfo[1]) + [ search, nameserver ] + end + + def get_dhcpinfo + macaddrs = {} + ipaddrs = {} + WsControl.get_iflist.each do |index, macaddr, *ipaddr| + macaddrs[macaddr] = 1 + ipaddr.each { |ipaddr| ipaddrs[ipaddr] = 1 } + end + iflist = [ macaddrs, ipaddrs ] + + search = [] + nameserver = [] + version = -1 + Registry::HKEY_LOCAL_MACHINE.open(DHCP_9X) do |reg| + begin + version = API.unpackdw(reg.read_bin("Version")) + rescue Registry::Error + end + + reg.each_key do |key,| + catch(:not_used) do + reg.open(key) do |regdi| + dom, ns = get_dhcpinfo_key(version, regdi, iflist) + search << dom if dom + nameserver.concat(ns) if ns + end + end + end + end + [ search, nameserver ] + end + + def get_dhcpinfo_95(reg) + dhcp = reg.read_bin("DhcpInfo") + [ + API.unpackdw(dhcp[4..7]), + API.unpackdw(dhcp[8..11]), + 1, + dhcp[45..50], + reg.read_bin("OptionInfo"), + ] + end + + def get_dhcpinfo_98(reg) + [ + API.unpackdw(reg.read_bin("DhcpIPAddress")), + API.unpackdw(reg.read_bin("DhcpSubnetMask")), + API.unpackdw(reg.read_bin("HardwareType")), + reg.read_bin("HardwareAddress"), + reg.read_bin("OptionInfo"), + ] + end + + def get_dhcpinfo_key(version, reg, iflist) + info = case version + when 1 + get_dhcpinfo_95(reg) + when 2 + get_dhcpinfo_98(reg) + else + begin + get_dhcpinfo_98(reg) + rescue Registry::Error + get_dhcpinfo_95(reg) + end + end + ipaddr, netmask, hwtype, macaddr, opt = info + throw :not_used unless + ipaddr and ipaddr != 0 and + netmask and netmask != 0 and + macaddr and macaddr.size == 6 and + hwtype == 1 and + iflist[0][macaddr] and iflist[1][ipaddr] + + size = opt.size + idx = 0 + while idx <= size + opttype = opt[idx] + optsize = opt[idx + 1] + optval = opt[idx + 2, optsize] + case opttype + when 0xFF ## term + break + when 0x0F ## domain + domain = optval.chomp("\0") + when 0x06 ## dns + nameserver = optval.scan(/..../).collect { |addr| + "%d.%d.%d.%d" % addr.unpack('C4') + } + end + idx += optsize + 2 + end + [ domain, nameserver ] + rescue Registry::Error + throw :not_used + end + end + + module WsControl + WsControl = Win32API.new('wsock32.dll', 'WsControl', 'LLPPPP', 'L') + WSAGetLastError = Win32API.new('wsock32.dll', 'WSAGetLastError', 'V', 'L') + + MAX_TDI_ENTITIES = 512 + IPPROTO_TCP = 6 + WSCTL_TCP_QUERY_INFORMATION = 0 + INFO_CLASS_GENERIC = 0x100 + INFO_CLASS_PROTOCOL = 0x200 + INFO_TYPE_PROVIDER = 0x100 + ENTITY_LIST_ID = 0 + GENERIC_ENTITY = 0 + CL_NL_ENTITY = 0x301 + IF_ENTITY = 0x200 + ENTITY_TYPE_ID = 1 + CL_NL_IP = 0x303 + IF_MIB = 0x202 + IF_MIB_STATS_ID = 1 + IP_MIB_ADDRTABLE_ENTRY_ID = 0x102 + + def self.wsctl(tei_entity, tei_instance, + toi_class, toi_type, toi_id, + buffsize) + reqinfo = [ + ## TDIEntityID + tei_entity, tei_instance, + ## TDIObjectID + toi_class, toi_type, toi_id, + ## TCP_REQUEST_INFORMATION_EX + "" + ].pack('VVVVVa16') + reqsize = API.packdw(reqinfo.size) + buff = "\0" * buffsize + buffsize = API.packdw(buffsize) + result = WsControl.call( + IPPROTO_TCP, + WSCTL_TCP_QUERY_INFORMATION, + reqinfo, reqsize, + buff, buffsize) + if result != 0 + raise RuntimeError, "WsControl failed.(#{result})" + end + [ buff, API.unpackdw(buffsize) ] + end + private_class_method :wsctl + + def self.get_iflist + # Get TDI Entity List + entities, size = + wsctl(GENERIC_ENTITY, 0, + INFO_CLASS_GENERIC, + INFO_TYPE_PROVIDER, + ENTITY_LIST_ID, + MAX_TDI_ENTITIES * 8) # sizeof(TDIEntityID) + entities = entities[0, size]. + scan(/.{8}/). + collect { |e| e.unpack('VV') } + + # Get MIB Interface List + iflist = [] + ifcount = 0 + entities.each do |entity, instance| + if( (entity & IF_ENTITY)>0 ) + ifcount += 1 + etype, = wsctl(entity, instance, + INFO_CLASS_GENERIC, + INFO_TYPE_PROVIDER, + ENTITY_TYPE_ID, + 4) + if( (API.unpackdw(etype) & IF_MIB)==IF_MIB ) + ifentry, = wsctl(entity, instance, + INFO_CLASS_PROTOCOL, + INFO_TYPE_PROVIDER, + IF_MIB_STATS_ID, + 21 * 4 + 8 + 130) # sizeof(IFEntry) + iflist << [ + API.unpackdw(ifentry[0,4]), + ifentry[20, 6] + ] + end + end + end + + # Get IP Addresses + entities.each do |entity, instance| + if entity == CL_NL_ENTITY + etype, = wsctl(entity, instance, + INFO_CLASS_GENERIC, + INFO_TYPE_PROVIDER, + ENTITY_TYPE_ID, + 4) + if API.unpackdw(etype) == CL_NL_IP + ipentries, = wsctl(entity, instance, + INFO_CLASS_PROTOCOL, + INFO_TYPE_PROVIDER, + IP_MIB_ADDRTABLE_ENTRY_ID, + 24 * (ifcount+1)) # sizeof(IPAddrEntry) + ipentries.scan(/.{24}/) do |ipentry| + ipaddr, index = ipentry.unpack('VV') + if ifitem = iflist.assoc(index) + ifitem << ipaddr + end + end + end + end + end + iflist + end + end + __EOS__ +end +#==================================================================== + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/sspi.rb b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/sspi.rb new file mode 100644 index 0000000..ef90ae3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/dl/win32/lib/win32/sspi.rb @@ -0,0 +1,330 @@ +# +# = win32/sspi.rb +# +# Copyright (c) 2006-2007 Justin Bailey +# +# Written and maintained by Justin Bailey . +# +# This program is free software. You can re-distribute and/or +# modify this program under the same terms of ruby itself --- +# Ruby Distribution License or GNU General Public License. +# + +require 'Win32API' + +# Implements bindings to Win32 SSPI functions, focused on authentication to a proxy server over HTTP. +module Win32 + module SSPI + # Specifies how credential structure requested will be used. Only SECPKG_CRED_OUTBOUND is used + # here. + SECPKG_CRED_INBOUND = 0x00000001 + SECPKG_CRED_OUTBOUND = 0x00000002 + SECPKG_CRED_BOTH = 0x00000003 + + # Format of token. NETWORK format is used here. + SECURITY_NATIVE_DREP = 0x00000010 + SECURITY_NETWORK_DREP = 0x00000000 + + # InitializeSecurityContext Requirement flags + ISC_REQ_REPLAY_DETECT = 0x00000004 + ISC_REQ_SEQUENCE_DETECT = 0x00000008 + ISC_REQ_CONFIDENTIALITY = 0x00000010 + ISC_REQ_USE_SESSION_KEY = 0x00000020 + ISC_REQ_PROMPT_FOR_CREDS = 0x00000040 + ISC_REQ_CONNECTION = 0x00000800 + + # Win32 API Functions. Uses Win32API to bind methods to constants contained in class. + module API + # Can be called with AcquireCredentialsHandle.call() + AcquireCredentialsHandle = Win32API.new("secur32", "AcquireCredentialsHandle", 'ppLpppppp', 'L') + # Can be called with InitializeSecurityContext.call() + InitializeSecurityContext = Win32API.new("secur32", "InitializeSecurityContext", 'pppLLLpLpppp', 'L') + # Can be called with DeleteSecurityContext.call() + DeleteSecurityContext = Win32API.new("secur32", "DeleteSecurityContext", 'P', 'L') + # Can be called with FreeCredentialsHandle.call() + FreeCredentialsHandle = Win32API.new("secur32", "FreeCredentialsHandle", 'P', 'L') + end + + # SecHandle struct + class SecurityHandle + def upper + @struct.unpack("LL")[1] + end + + def lower + @struct.unpack("LL")[0] + end + + def to_p + @struct ||= "\0" * 8 + end + end + + # Some familiar aliases for the SecHandle structure + CredHandle = CtxtHandle = SecurityHandle + + # TimeStamp struct + class TimeStamp + attr_reader :struct + + def to_p + @struct ||= "\0" * 8 + end + end + + # Creates binary representaiton of a SecBufferDesc structure, + # including the SecBuffer contained inside. + class SecurityBuffer + + SECBUFFER_TOKEN = 2 # Security token + + TOKENBUFSIZE = 12288 + SECBUFFER_VERSION = 0 + + def initialize(buffer = nil) + @buffer = buffer || "\0" * TOKENBUFSIZE + @bufferSize = @buffer.length + @type = SECBUFFER_TOKEN + end + + def bufferSize + unpack + @bufferSize + end + + def bufferType + unpack + @type + end + + def token + unpack + @buffer + end + + def to_p + # Assumption is that when to_p is called we are going to get a packed structure. Therefore, + # set @unpacked back to nil so we know to unpack when accessors are next accessed. + @unpacked = nil + # Assignment of inner structure to variable is very important here. Without it, + # will not be able to unpack changes to the structure. Alternative, nested unpacks, + # does not work (i.e. @struct.unpack("LLP12")[2].unpack("LLP12") results in "no associated pointer") + @sec_buffer ||= [@bufferSize, @type, @buffer].pack("LLP") + @struct ||= [SECBUFFER_VERSION, 1, @sec_buffer].pack("LLP") + end + + private + + # Unpacks the SecurityBufferDesc structure into member variables. We + # only want to do this once per struct, so the struct is deleted + # after unpacking. + def unpack + if ! @unpacked && @sec_buffer && @struct + @bufferSize, @type = @sec_buffer.unpack("LL") + @buffer = @sec_buffer.unpack("LLP#{@bufferSize}")[2] + @struct = nil + @sec_buffer = nil + @unpacked = true + end + end + end + + # SEC_WINNT_AUTH_IDENTITY structure + class Identity + SEC_WINNT_AUTH_IDENTITY_ANSI = 0x1 + + attr_accessor :user, :domain, :password + + def initialize(user = nil, domain = nil, password = nil) + @user = user + @domain = domain + @password = password + @flags = SEC_WINNT_AUTH_IDENTITY_ANSI + end + + def to_p + [@user, @user ? @user.length : 0, + @domain, @domain ? @domain.length : 0, + @password, @password ? @password.length : 0, + @flags].pack("PLPLPLL") + end + end + + # Takes a return result from an SSPI function and interprets the value. + class SSPIResult + # Good results + SEC_E_OK = 0x00000000 + SEC_I_CONTINUE_NEEDED = 0x00090312 + + # These are generally returned by InitializeSecurityContext + SEC_E_INSUFFICIENT_MEMORY = 0x80090300 + SEC_E_INTERNAL_ERROR = 0x80090304 + SEC_E_INVALID_HANDLE = 0x80090301 + SEC_E_INVALID_TOKEN = 0x80090308 + SEC_E_LOGON_DENIED = 0x8009030C + SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311 + SEC_E_NO_CREDENTIALS = 0x8009030E + SEC_E_TARGET_UNKNOWN = 0x80090303 + SEC_E_UNSUPPORTED_FUNCTION = 0x80090302 + SEC_E_WRONG_PRINCIPAL = 0x80090322 + + # These are generally returned by AcquireCredentialsHandle + SEC_E_NOT_OWNER = 0x80090306 + SEC_E_SECPKG_NOT_FOUND = 0x80090305 + SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D + + @@map = {} + constants.each { |v| @@map[self.const_get(v.to_s)] = v } + + attr_reader :value + + def initialize(value) + # convert to unsigned long + value = [value].pack("L").unpack("L").first + raise "#{value.to_s(16)} is not a recognized result" unless @@map.has_key? value + @value = value + end + + def to_s + @@map[@value].to_s + end + + def ok? + @value == SEC_I_CONTINUE_NEEDED || @value == SEC_E_OK + end + + def ==(other) + if other.is_a?(SSPIResult) + @value == other.value + elsif other.is_a?(Fixnum) + @value == @@map[other] + else + false + end + end + end + + # Handles "Negotiate" type authentication. Geared towards authenticating with a proxy server over HTTP + class NegotiateAuth + attr_accessor :credentials, :context, :contextAttributes, :user, :domain + + # Default request flags for SSPI functions + REQUEST_FLAGS = ISC_REQ_CONFIDENTIALITY | ISC_REQ_REPLAY_DETECT | ISC_REQ_CONNECTION + + # NTLM tokens start with this header always. Encoding alone adds "==" and newline, so remove those + B64_TOKEN_PREFIX = ["NTLMSSP"].pack("m").delete("=\n") + + # Given a connection and a request path, performs authentication as the current user and returns + # the response from a GET request. The connnection should be a Net::HTTP object, and it should + # have been constructed using the Net::HTTP.Proxy method, but anything that responds to "get" will work. + # If a user and domain are given, will authenticate as the given user. + # Returns the response received from the get method (usually Net::HTTPResponse) + def NegotiateAuth.proxy_auth_get(http, path, user = nil, domain = nil) + raise "http must respond to :get" unless http.respond_to?(:get) + nego_auth = self.new user, domain + + resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.get_initial_token } + if resp["Proxy-Authenticate"] + resp = http.get path, { "Proxy-Authorization" => "Negotiate " + nego_auth.complete_authentication(resp["Proxy-Authenticate"].split(" ").last.strip) } + end + + resp + end + + # Creates a new instance ready for authentication as the given user in the given domain. + # Defaults to current user and domain as defined by ENV["USERDOMAIN"] and ENV["USERNAME"] if + # no arguments are supplied. + def initialize(user = nil, domain = nil) + if user.nil? && domain.nil? && ENV["USERNAME"].nil? && ENV["USERDOMAIN"].nil? + raise "A username or domain must be supplied since they cannot be retrieved from the environment" + end + + @user = user || ENV["USERNAME"] + @domain = domain || ENV["USERDOMAIN"] + end + + # Gets the initial Negotiate token. Returns it as a base64 encoded string suitable for use in HTTP. Can + # be easily decoded, however. + def get_initial_token + raise "This object is no longer usable because its resources have been freed." if @cleaned_up + get_credentials + + outputBuffer = SecurityBuffer.new + @context = CtxtHandle.new + @contextAttributes = "\0" * 4 + + result = SSPIResult.new(API::InitializeSecurityContext.call(@credentials.to_p, nil, nil, + REQUEST_FLAGS,0, SECURITY_NETWORK_DREP, nil, 0, @context.to_p, outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p)) + + if result.ok? then + return encode_token(outputBuffer.token) + else + raise "Error: #{result.to_s}" + end + end + + # Takes a token and gets the next token in the Negotiate authentication chain. Token can be Base64 encoded or not. + # The token can include the "Negotiate" header and it will be stripped. + # Does not indicate if SEC_I_CONTINUE or SEC_E_OK was returned. + # Token returned is Base64 encoded w/ all new lines removed. + def complete_authentication(token) + raise "This object is no longer usable because its resources have been freed." if @cleaned_up + + # Nil token OK, just set it to empty string + token = "" if token.nil? + + if token.include? "Negotiate" + # If the Negotiate prefix is passed in, assume we are seeing "Negotiate " and get the token. + token = token.split(" ").last + end + + if token.include? B64_TOKEN_PREFIX + # indicates base64 encoded token + token = token.strip.unpack("m")[0] + end + + outputBuffer = SecurityBuffer.new + result = SSPIResult.new(API::InitializeSecurityContext.call(@credentials.to_p, @context.to_p, nil, + REQUEST_FLAGS, 0, SECURITY_NETWORK_DREP, SecurityBuffer.new(token).to_p, 0, + @context.to_p, + outputBuffer.to_p, @contextAttributes, TimeStamp.new.to_p)) + + if result.ok? then + return encode_token(outputBuffer.token) + else + raise "Error: #{result.to_s}" + end + ensure + # need to make sure we don't clean up if we've already cleaned up. + clean_up unless @cleaned_up + end + + private + + def clean_up + # free structures allocated + @cleaned_up = true + API::FreeCredentialsHandle.call(@credentials.to_p) + API::DeleteSecurityContext.call(@context.to_p) + @context = nil + @credentials = nil + @contextAttributes = nil + end + + # Gets credentials based on user, domain or both. If both are nil, an error occurs + def get_credentials + @credentials = CredHandle.new + ts = TimeStamp.new + @identity = Identity.new @user, @domain + result = SSPIResult.new(API::AcquireCredentialsHandle.call(nil, "Negotiate", SECPKG_CRED_OUTBOUND, nil, @identity.to_p, + nil, nil, @credentials.to_p, ts.to_p)) + raise "Error acquire credentials: #{result}" unless result.ok? + end + + def encode_token(t) + # encode64 will add newlines every 60 characters so we need to remove those. + [t].pack("m").delete("\n") + end + end + end +end \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/ext/etc/.cvsignore b/lib/ruby-1.9.1-rc1/ext/etc/.cvsignore new file mode 100644 index 0000000..4088712 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/.cvsignore @@ -0,0 +1,3 @@ +Makefile +mkmf.log +*.def diff --git a/lib/ruby-1.9.1-rc1/ext/etc/depend b/lib/ruby-1.9.1-rc1/ext/etc/depend new file mode 100644 index 0000000..ac70647 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/depend @@ -0,0 +1 @@ +etc.o : etc.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/etc/etc.c b/lib/ruby-1.9.1-rc1/ext/etc/etc.c new file mode 100644 index 0000000..6390d6d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/etc.c @@ -0,0 +1,551 @@ +/************************************************ + + etc.c - + + $Author: nobu $ + created at: Tue Mar 22 18:39:19 JST 1994 + +************************************************/ + +#include "ruby.h" + +#include +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_GETPWENT +#include +#endif + +#ifdef HAVE_GETGRENT +#include +#endif + +#ifndef HAVE_TYPE_UID_T +#define uid_t int +#endif + +static VALUE sPasswd; +#ifdef HAVE_GETGRENT +static VALUE sGroup; +#endif + +#ifndef _WIN32 +char *getenv(); +#endif +char *getlogin(); + +/* Returns the short user name of the currently logged in user. + * Unfortunately, it is often rather easy to fool getlogin(). + * Avoid getlogin() for security-related purposes. + * + * e.g. + * Etc.getlogin -> 'guest' + */ +static VALUE +etc_getlogin(VALUE obj) +{ + char *login; + + rb_secure(4); +#ifdef HAVE_GETLOGIN + login = getlogin(); + if (!login) login = getenv("USER"); +#else + login = getenv("USER"); +#endif + + if (login) + return rb_tainted_str_new2(login); + return Qnil; +} + +#if defined(HAVE_GETPWENT) || defined(HAVE_GETGRENT) +static VALUE +safe_setup_str(const char *str) +{ + if (str == 0) str = ""; + return rb_tainted_str_new2(str); +} +#endif + +#ifdef HAVE_GETPWENT +static VALUE +setup_passwd(struct passwd *pwd) +{ + if (pwd == 0) rb_sys_fail("/etc/passwd"); + return rb_struct_new(sPasswd, + safe_setup_str(pwd->pw_name), +#ifdef HAVE_ST_PW_PASSWD + safe_setup_str(pwd->pw_passwd), +#endif + UIDT2NUM(pwd->pw_uid), + GIDT2NUM(pwd->pw_gid), +#ifdef HAVE_ST_PW_GECOS + safe_setup_str(pwd->pw_gecos), +#endif + safe_setup_str(pwd->pw_dir), + safe_setup_str(pwd->pw_shell), +#ifdef HAVE_ST_PW_CHANGE + INT2NUM(pwd->pw_change), +#endif +#ifdef HAVE_ST_PW_QUOTA + INT2NUM(pwd->pw_quota), +#endif +#ifdef HAVE_ST_PW_AGE + PW_AGE2VAL(pwd->pw_age), +#endif +#ifdef HAVE_ST_PW_CLASS + safe_setup_str(pwd->pw_class), +#endif +#ifdef HAVE_ST_PW_COMMENT + safe_setup_str(pwd->pw_comment), +#endif +#ifdef HAVE_ST_PW_EXPIRE + INT2NUM(pwd->pw_expire), +#endif + 0 /*dummy*/ + ); +} +#endif + +/* Returns the /etc/passwd information for the user with specified integer + * user id (uid). + * + * The information is returned as a Struct::Passwd; see getpwent above for + * details. + * + * e.g. * Etc.getpwuid(0) -> # + */ +static VALUE +etc_getpwuid(int argc, VALUE *argv, VALUE obj) +{ +#if defined(HAVE_GETPWENT) + VALUE id; + uid_t uid; + struct passwd *pwd; + + rb_secure(4); + if (rb_scan_args(argc, argv, "01", &id) == 1) { + uid = NUM2UIDT(id); + } + else { + uid = getuid(); + } + pwd = getpwuid(uid); + if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid); + return setup_passwd(pwd); +#else + return Qnil; +#endif +} + +/* Returns the /etc/passwd information for the user with specified login name. + * + * The information is returned as a Struct::Passwd; see getpwent above for + * details. + * + * e.g. * Etc.getpwnam('root') -> # + */ +static VALUE +etc_getpwnam(VALUE obj, VALUE nam) +{ +#ifdef HAVE_GETPWENT + struct passwd *pwd; + + SafeStringValue(nam); + pwd = getpwnam(RSTRING_PTR(nam)); + if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING_PTR(nam)); + return setup_passwd(pwd); +#else + return Qnil; +#endif +} + +#ifdef HAVE_GETPWENT +static int passwd_blocking = 0; +static VALUE +passwd_ensure(void) +{ + passwd_blocking = Qfalse; + return Qnil; +} + +static VALUE +passwd_iterate(void) +{ + struct passwd *pw; + + setpwent(); + while (pw = getpwent()) { + rb_yield(setup_passwd(pw)); + } + endpwent(); + return Qnil; +} +#endif + +/* Provides a convenient Ruby iterator which executes a block for each entry + * in the /etc/passwd file. + * + * The code block is passed an Struct::Passwd struct; see getpwent above for + * details. + * + * Example: + * + * require 'etc' + * + * Etc.passwd {|u| + * puts u.name + " = " + u.gecos + * } + * + */ +static VALUE +etc_passwd(VALUE obj) +{ +#ifdef HAVE_GETPWENT + struct passwd *pw; + + rb_secure(4); + if (rb_block_given_p()) { + if (passwd_blocking) { + rb_raise(rb_eRuntimeError, "parallel passwd iteration"); + } + passwd_blocking = Qtrue; + rb_ensure(passwd_iterate, 0, passwd_ensure, 0); + } + if (pw = getpwent()) { + return setup_passwd(pw); + } +#endif + return Qnil; +} + +/* Resets the process of reading the /etc/passwd file, so that the next call + * to getpwent will return the first entry again. + */ +static VALUE +etc_setpwent(VALUE obj) +{ +#ifdef HAVE_GETPWENT + setpwent(); +#endif + return Qnil; +} + +/* Ends the process of scanning through the /etc/passwd file begun with + * getpwent, and closes the file. + */ +static VALUE +etc_endpwent(VALUE obj) +{ +#ifdef HAVE_GETPWENT + endpwent(); +#endif + return Qnil; +} + +/* Returns an entry from the /etc/passwd file. The first time it is called it + * opens the file and returns the first entry; each successive call returns + * the next entry, or nil if the end of the file has been reached. + * + * To close the file when processing is complete, call endpwent. + * + * Each entry is returned as a Struct::Passwd: + * + * - Passwd#name contains the short login name of the user as a String. + * + * - Passwd#passwd contains the encrypted password of the user as a String. + * an 'x' is returned if shadow passwords are in use. An '*' is returned + * if the user cannot log in using a password. + * + * - Passwd#uid contains the integer user ID (uid) of the user. + * + * - Passwd#gid contains the integer group ID (gid) of the user's primary group. + * + * - Passwd#gecos contains a longer String description of the user, such as + * a full name. Some Unix systems provide structured information in the + * gecos field, but this is system-dependent. + * + * - Passwd#dir contains the path to the home directory of the user as a String. + * + * - Passwd#shell contains the path to the login shell of the user as a String. + */ +static VALUE +etc_getpwent(VALUE obj) +{ +#ifdef HAVE_GETPWENT + struct passwd *pw; + + if (pw = getpwent()) { + return setup_passwd(pw); + } +#endif + return Qnil; +} + +#ifdef HAVE_GETGRENT +static VALUE +setup_group(struct group *grp) +{ + VALUE mem; + char **tbl; + + mem = rb_ary_new(); + tbl = grp->gr_mem; + while (*tbl) { + rb_ary_push(mem, safe_setup_str(*tbl)); + tbl++; + } + return rb_struct_new(sGroup, + safe_setup_str(grp->gr_name), +#ifdef HAVE_ST_GR_PASSWD + safe_setup_str(grp->gr_passwd), +#endif + GIDT2NUM(grp->gr_gid), + mem); +} +#endif + +/* Returns information about the group with specified integer group id (gid), + * as found in /etc/group. + * + * The information is returned as a Struct::Group; see getgrent above for + * details. + * + * e.g. Etc.getgrgid(100) -> # + * + */ +static VALUE +etc_getgrgid(int argc, VALUE *argv, VALUE obj) +{ +#ifdef HAVE_GETGRENT + VALUE id; + gid_t gid; + struct group *grp; + + rb_secure(4); + if (rb_scan_args(argc, argv, "01", &id) == 1) { + gid = NUM2GIDT(id); + } + else { + gid = getgid(); + } + grp = getgrgid(gid); + if (grp == 0) rb_raise(rb_eArgError, "can't find group for %d", (int)gid); + return setup_group(grp); +#else + return Qnil; +#endif +} + +/* Returns information about the group with specified String name, as found + * in /etc/group. + * + * The information is returned as a Struct::Group; see getgrent above for + * details. + * + * e.g. Etc.getgrnam('users') -> # + * + */ +static VALUE +etc_getgrnam(VALUE obj, VALUE nam) +{ +#ifdef HAVE_GETGRENT + struct group *grp; + + rb_secure(4); + SafeStringValue(nam); + grp = getgrnam(RSTRING_PTR(nam)); + if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING_PTR(nam)); + return setup_group(grp); +#else + return Qnil; +#endif +} + +#ifdef HAVE_GETGRENT +static int group_blocking = 0; +static VALUE +group_ensure(void) +{ + group_blocking = Qfalse; + return Qnil; +} + +static VALUE +group_iterate(void) +{ + struct group *pw; + + setgrent(); + while (pw = getgrent()) { + rb_yield(setup_group(pw)); + } + endgrent(); + return Qnil; +} +#endif + +/* Provides a convenient Ruby iterator which executes a block for each entry + * in the /etc/group file. + * + * The code block is passed an Struct::Group struct; see getgrent above for + * details. + * + * Example: + * + * require 'etc' + * + * Etc.group {|g| + * puts g.name + ": " + g.mem.join(', ') + * } + * + */ +static VALUE +etc_group(VALUE obj) +{ +#ifdef HAVE_GETGRENT + struct group *grp; + + rb_secure(4); + if (rb_block_given_p()) { + if (group_blocking) { + rb_raise(rb_eRuntimeError, "parallel group iteration"); + } + group_blocking = Qtrue; + rb_ensure(group_iterate, 0, group_ensure, 0); + } + if (grp = getgrent()) { + return setup_group(grp); + } +#endif + return Qnil; +} + +/* Resets the process of reading the /etc/group file, so that the next call + * to getgrent will return the first entry again. + */ +static VALUE +etc_setgrent(VALUE obj) +{ +#ifdef HAVE_GETGRENT + setgrent(); +#endif + return Qnil; +} + +/* Ends the process of scanning through the /etc/group file begun by + * getgrent, and closes the file. + */ +static VALUE +etc_endgrent(VALUE obj) +{ +#ifdef HAVE_GETGRENT + endgrent(); +#endif + return Qnil; +} + +/* Returns an entry from the /etc/group file. The first time it is called it + * opens the file and returns the first entry; each successive call returns + * the next entry, or nil if the end of the file has been reached. + * + * To close the file when processing is complete, call endgrent. + * + * Each entry is returned as a Struct::Group: + * + * - Group#name contains the name of the group as a String. + * + * - Group#passwd contains the encrypted password as a String. An 'x' is + * returned if password access to the group is not available; an empty + * string is returned if no password is needed to obtain membership of + * the group. + * + * - Group#gid contains the group's numeric ID as an integer. + * + * - Group#mem is an Array of Strings containing the short login names of the + * members of the group. + */ +static VALUE +etc_getgrent(VALUE obj) +{ +#ifdef HAVE_GETGRENT + struct group *gr; + + if (gr = getgrent()) { + return setup_group(gr); + } +#endif + return Qnil; +} + +/* The etc module provides access to information from the /etc/passwd and + * /etc/group files on Linux and Unix systems. + * + * Documented by mathew . + */ +void +Init_etc(void) +{ + VALUE mEtc; + + mEtc = rb_define_module("Etc"); + rb_define_module_function(mEtc, "getlogin", etc_getlogin, 0); + + rb_define_module_function(mEtc, "getpwuid", etc_getpwuid, -1); + rb_define_module_function(mEtc, "getpwnam", etc_getpwnam, 1); + rb_define_module_function(mEtc, "setpwent", etc_setpwent, 0); + rb_define_module_function(mEtc, "endpwent", etc_endpwent, 0); + rb_define_module_function(mEtc, "getpwent", etc_getpwent, 0); + rb_define_module_function(mEtc, "passwd", etc_passwd, 0); + + rb_define_module_function(mEtc, "getgrgid", etc_getgrgid, -1); + rb_define_module_function(mEtc, "getgrnam", etc_getgrnam, 1); + rb_define_module_function(mEtc, "group", etc_group, 0); + rb_define_module_function(mEtc, "setgrent", etc_setgrent, 0); + rb_define_module_function(mEtc, "endgrent", etc_endgrent, 0); + rb_define_module_function(mEtc, "getgrent", etc_getgrent, 0); + + sPasswd = rb_struct_define("Passwd", + "name", "passwd", "uid", "gid", +#ifdef HAVE_ST_PW_GECOS + "gecos", +#endif + "dir", "shell", +#ifdef HAVE_ST_PW_CHANGE + "change", +#endif +#ifdef HAVE_ST_PW_QUOTA + "quota", +#endif +#ifdef HAVE_ST_PW_AGE + "age", +#endif +#ifdef HAVE_ST_PW_CLASS + "uclass", +#endif +#ifdef HAVE_ST_PW_COMMENT + "comment", +#endif +#ifdef HAVE_ST_PW_EXPIRE + "expire", +#endif + NULL); + rb_define_const(mEtc, "Passwd", sPasswd); + +#ifdef HAVE_GETGRENT + sGroup = rb_struct_define("Group", "name", +#ifdef HAVE_ST_GR_PASSWD + "passwd", +#endif + "gid", "mem", NULL); + + rb_define_const(mEtc, "Group", sGroup); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/etc/etc.txt b/lib/ruby-1.9.1-rc1/ext/etc/etc.txt new file mode 100644 index 0000000..5347901 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/etc.txt @@ -0,0 +1,72 @@ +.\" etc.txt - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995 + +** Etc(Module) + +The module to retrieve information under /etc directory. Available +only on UNIX platforms. All operations defined in this module are +module functions, so that you can include Etc module into your class. + +Module Function: + + getlogin + + returns login name of the user. It this fails, try getpwuid(). + + getpwnam(name) + + searches in /etc/passwd file (or equivalent database), and + returns password entry for the user. The return value is an + passwd structure, which has members described below. + + struct passwd + name # user name(string) + passwd # encrypted password(string) + uid # user ID(integer) + gid # group ID(integer) + gecos # gecos field(string) + dir # home directory(string) + shell # login shell(string) + # members below are optional + change # password change time(integer) + quota # quota value(integer) + age # password age(integer) + class # user access class(string) + comment # comment(string) + expire # account expiration time(integer) + end + + See getpwnam(3) for detail. + + getpwuid([uid]) + + returns passwd entry for the specified user id. If uid is + ommitted, use the value from getuid(). See getpwuid(3) for + detail. + + getgrgid(gid) + + searches in /etc/group file (or equivalent database), and + returns group entry for the group id. The return value is an + group structure, which has members described below. + + struct group + name # group name(string) + passwd # group password(string) + gid # group ID(integer) + mem # array of the group member names + end + + See getgrgid(3) for detail. + + getgrnam(name) + + returns the group entry for the specified name. The return + value is the group structure. See getgrnam(3) for detail. + + group + + iterates over all group entries. + + passwd + + iterates over all passwd entries. diff --git a/lib/ruby-1.9.1-rc1/ext/etc/etc.txt.ja b/lib/ruby-1.9.1-rc1/ext/etc/etc.txt.ja new file mode 100644 index 0000000..2dddcfb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/etc.txt.ja @@ -0,0 +1,72 @@ +.\" etc.txt.ja - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995 + +** Etc(¥â¥¸¥å¡¼¥ë) + +/etc¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤Î¾ðÊó¤òÆÀ¤ë¤¿¤á¤Î¥â¥¸¥å¡¼¥ë¡¥¥¯¥é¥¹¤Ë¥¤¥ó¥¯¥ë¡¼¥É +¤·¤Æ»È¤¦¤³¤È¤â¤Ç¤­¤ë¡¥ + +Module Function: + + getlogin + + ¼«Ê¬¤Îlogin̾¤òÊÖ¤¹¡¥¤³¤ì¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤Ïgetpwuid()¤òÍѤ¤¤ë¤È + Îɤ¤¡¥ + + getpwnam(name) + + /etc/passwd¥Õ¥¡¥¤¥ë(¤¢¤ë¤¤¤ÏDBM¥Õ¥¡¥¤¥ë¤äNIS¥Ç¡¼¥¿¥Ù¡¼¥¹)¤ò¸¡ + º÷¤·¡¤name¤Î̾Á°¤ò»ý¤Äpasswd¥¨¥ó¥È¥ê¤òÊÖ¤¹¡¥Ìá¤êÃͤÏpasswd¹½Â¤ + ÂΤǰʲ¼¤Î¥á¥ó¥Ð¤ò»ý¤Ä¡¥ + + struct passwd + name # ¥æ¡¼¥¶Ì¾(ʸ»úÎó) + passwd # ¥Ñ¥¹¥ï¡¼¥É(ʸ»úÎó) + uid # ¥æ¡¼¥¶ID(À°¿ô) + gid # ¥°¥ë¡¼¥×ID(À°¿ô) + gecos # gecos¥Õ¥£¡¼¥ë¥É(ʸ»úÎó) + dir # ¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê(ʸ»úÎó) + shell # ¥í¥°¥¤¥ó¥·¥§¥ë(ʸ»úÎó) + # °Ê¹ß¤Î¥á¥ó¥Ð¤Ï¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ¤ÏÄ󶡤µ¤ì¤Ê¤¤¡¥ + change # ¥Ñ¥¹¥ï¡¼¥ÉÊѹ¹»þ´Ö(À°¿ô) + quota # ¥¯¥©¡¼¥¿(À°¿ô) + age # ¥¨¡¼¥¸(À°¿ô) + class # ¥æ¡¼¥¶¥¢¥¯¥»¥¹¥¯¥é¥¹(ʸ»úÎó) + comment # ¥³¥á¥ó¥È(ʸ»úÎó) + expire # ¥¢¥«¥¦¥ó¥ÈÍ­¸ú´ü¸Â(À°¿ô) + end + + ¾ÜºÙ¤Ïgetpwnam(3)¤ò»²¾È¤Î¤³¤È¡¥ + + getpwuid([uid]) + + uid¤ò¥æ¡¼¥¶ID¤È¤¹¤ëpasswd¥¨¥ó¥È¥ê¤òÊÖ¤¹¡¥Ìá¤êÃͤÏgetpwnam()¤È + ƱÍͤǤ¢¤ë¡¥°ú¿ô¤ò¾Êά¤·¤¿¾ì¹ç¤Ë¤Ïgetuid()¤ÎÃͤòÍѤ¤¤ë¡¥¾ÜºÙ¤Ï + getpwuid(3)¤ò»²¾È¤Î¤³¤È¡¥ + + getgrgid(gid) + + /etc/group¥Õ¥¡¥¤¥ë(¤¢¤ë¤¤¤Ï¡Ägetpwnam»²¾È)¤ò¸¡º÷¤·¡¤gid¤ò¥°¥ë¡¼ + ¥×ID¤È¤¹¤ë¥°¥ë¡¼¥×¥¨¥ó¥È¥ê¤òÊÖ¤¹¡¥Ìá¤êÃͤÏgroup¹½Â¤ÂΤǰʲ¼¤Î + ¥á¥ó¥Ð¤ò»ý¤Ä¡¥ + + struct group + name # ¥°¥ë¡¼¥×̾(ʸ»úÎó) + passwd # ¥°¥ë¡¼¥×¤Î¥Ñ¥¹¥ï¡¼¥É(ʸ»úÎó) + gid # ¥°¥ë¡¼¥×ID(À°¿ô) + mem # ¥°¥ë¡¼¥×¥á¥ó¥Ð̾¤ÎÇÛÎó + end + + ¾ÜºÙ¤Ïgetgrgid(3)¤ò»²¾È¤Î¤³¤È¡¥ + + getgrnam(name) + + name¤È¤¤¤¦Ì¾Á°¤Î¥°¥ë¡¼¥×¥¨¥ó¥È¥ê¤òÊÖ¤¹¡¥Ìá¤êÃͤÏgetgrgid()¤ÈƱ + ÍͤǤ¢¤ë¡¥¾ÜºÙ¤Ïgetgrnam(3)¤ò»²¾È¡¥ + + group + + Á´¤Æ¤Î¥°¥ë¡¼¥×¥¨¥ó¥È¥ê¤ò½ç¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Î¥¤¥Æ¥ì¡¼¥¿¡¥ + + passwd + + Á´¤Æ¤Îpasswd¥¨¥ó¥È¥ê¤ò½ç¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Î¥¤¥Æ¥ì¡¼¥¿¡¥ diff --git a/lib/ruby-1.9.1-rc1/ext/etc/extconf.rb b/lib/ruby-1.9.1-rc1/ext/etc/extconf.rb new file mode 100644 index 0000000..2914bfb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/etc/extconf.rb @@ -0,0 +1,28 @@ +require 'mkmf' + +have_library("sun", "getpwnam") # NIS (== YP) interface for IRIX 4 +a = have_func("getlogin") +b = have_func("getpwent") +c = have_func("getgrent") +if a or b or c + have_struct_member('struct passwd', 'pw_gecos', 'pwd.h') + have_struct_member('struct passwd', 'pw_change', 'pwd.h') + have_struct_member('struct passwd', 'pw_quota', 'pwd.h') + if have_struct_member('struct passwd', 'pw_age', 'pwd.h') + case what_type?('struct passwd', 'pw_age', 'pwd.h') + when "string" + f = "safe_setup_str" + when "long long" + f = "LL2NUM" + else + f = "INT2NUM" + end + $defs.push("-DPW_AGE2VAL="+f) + end + have_struct_member('struct passwd', 'pw_class', 'pwd.h') + have_struct_member('struct passwd', 'pw_comment', 'pwd.h') unless /cygwin/ === RUBY_PLATFORM + have_struct_member('struct passwd', 'pw_expire', 'pwd.h') + have_struct_member('struct passwd', 'pw_passwd', 'pwd.h') + have_struct_member('struct group', 'gr_passwd', 'grp.h') + create_makefile("etc") +end diff --git a/lib/ruby-1.9.1-rc1/ext/extmk.rb b/lib/ruby-1.9.1-rc1/ext/extmk.rb new file mode 100644 index 0000000..be3ad8d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/extmk.rb @@ -0,0 +1,563 @@ +#! /usr/local/bin/ruby +# -*- ruby -*- + +$extension = nil +$extstatic = nil +$force_static = nil +$install = nil +$destdir = nil +$dryrun = false +$clean = nil +$nodynamic = nil +$extinit = nil +$extobjs = nil +$extflags = "" +$extlibs = nil +$extpath = nil +$ignore = nil +$message = nil + +$progname = $0 +alias $PROGRAM_NAME $0 +alias $0 $progname + +$extlist = [] +$compiled = {} + +srcdir = File.dirname(File.dirname(__FILE__)) +unless defined?(CROSS_COMPILING) and CROSS_COMPILING + $:.replace([File.expand_path("lib", srcdir), Dir.pwd]) +end +$:.unshift(srcdir) +require 'rbconfig' + +$topdir = "." +$top_srcdir = srcdir + +$" << "mkmf.rb" +load File.expand_path("lib/mkmf.rb", srcdir) +require 'optparse/shellwords' + +def sysquote(x) + @quote ||= /os2/ =~ (CROSS_COMPILING || RUBY_PLATFORM) + @quote ? x.quote : x +end + +def extract_makefile(makefile, keep = true) + m = File.read(makefile) + if !(target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1]) + return keep + end + installrb = {} + m.scan(/^install-rb-default:[ \t]*(\S+)\n\1:[ \t]*(\S+)/) {installrb[$2] = $1} + oldrb = installrb.keys.sort + newrb = install_rb(nil, "").collect {|d, *f| f}.flatten.sort + if target_prefix = m[/^target_prefix[ \t]*=[ \t]*\/(.*)/, 1] + target = "#{target_prefix}/#{target}" + end + unless oldrb == newrb + if $extout + newrb.each {|f| installrb.delete(f)} + unless installrb.empty? + config = CONFIG.dup + install_dirs(target_prefix).each {|var, val| config[var] = val} + FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)}, :verbose => true) + end + end + return false + end + $target = target + $extconf_h = m[/^RUBY_EXTCONF_H[ \t]*=[ \t]*(\S+)/, 1] + $static ||= m[/^EXTSTATIC[ \t]*=[ \t]*(\S+)/, 1] || false + /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil + $preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "") + $DLDFLAGS += " " + (m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] || "") + if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1] + s.sub!(/^#{Regexp.quote($LIBRUBYARG)} */, "") + s.sub!(/ *#{Regexp.quote($LIBS)}$/, "") + $libs = s + end + $objs = (m[/^OBJS[ \t]*=[ \t](.*)/, 1] || "").split + $srcs = (m[/^SRCS[ \t]*=[ \t](.*)/, 1] || "").split + $LOCAL_LIBS = m[/^LOCAL_LIBS[ \t]*=[ \t]*(.*)/, 1] || "" + $LIBPATH = Shellwords.shellwords(m[/^libpath[ \t]*=[ \t]*(.*)/, 1] || "") - %w[$(libdir) $(topdir)] + true +end + +def extmake(target) + print "#{$message} #{target}\n" + $stdout.flush + + FileUtils.mkpath target unless File.directory?(target) + begin + dir = Dir.pwd + FileUtils.mkpath target unless File.directory?(target) + Dir.chdir target + top_srcdir = $top_srcdir + topdir = $topdir + hdrdir = $hdrdir + prefix = "../" * (target.count("/")+1) + $top_srcdir = relative_from(top_srcdir, prefix) + $hdrdir = relative_from(hdrdir, prefix) + $topdir = prefix + $topdir + $target = target + $mdir = target + $srcdir = File.join($top_srcdir, "ext", $mdir) + $preload = nil + $objs = "" + $srcs = "" + $compiled[target] = false + makefile = "./Makefile" + ok = File.exist?(makefile) + unless $ignore + rbconfig0 = RbConfig::CONFIG + mkconfig0 = CONFIG + rbconfig = { + "hdrdir" => $hdrdir, + "srcdir" => $srcdir, + "topdir" => $topdir, + } + mkconfig = { + "hdrdir" => ($hdrdir == top_srcdir) ? top_srcdir : "$(top_srcdir)/include", + "srcdir" => "$(top_srcdir)/ext/#{$mdir}", + "topdir" => $topdir, + } + rbconfig0.each_pair {|key, val| rbconfig[key] ||= val.dup} + mkconfig0.each_pair {|key, val| mkconfig[key] ||= val.dup} + RbConfig.module_eval { + remove_const(:CONFIG) + const_set(:CONFIG, rbconfig) + remove_const(:MAKEFILE_CONFIG) + const_set(:MAKEFILE_CONFIG, mkconfig) + } + Object.class_eval { + remove_const(:CONFIG) + const_set(:CONFIG, mkconfig) + } + begin + $extconf_h = nil + ok &&= extract_makefile(makefile) + if (($extconf_h && !File.exist?($extconf_h)) || + !(t = modified?(makefile, MTIMES)) || + ["#{$srcdir}/makefile.rb", "#{$srcdir}/extconf.rb", "#{$srcdir}/depend"].any? {|f| modified?(f, [t])}) + then + ok = false + init_mkmf + Logging::logfile 'mkmf.log' + rm_f makefile + if File.exist?($0 = "#{$srcdir}/makefile.rb") + load $0 + elsif File.exist?($0 = "#{$srcdir}/extconf.rb") + load $0 + else + create_makefile(target) + end + $defs << "-DRUBY_EXPORT" if $static + ok = File.exist?(makefile) + end + rescue SystemExit + # ignore + ensure + rm_f "conftest*" + config = $0 + $0 = $PROGRAM_NAME + end + end + ok = yield(ok) if block_given? + unless ok + open(makefile, "w") do |f| + f.print(*dummy_makefile(CONFIG["srcdir"])) + end + return true + end + args = sysquote($mflags) + unless $destdir.to_s.empty? or $mflags.include?("DESTDIR") + args += [sysquote("DESTDIR=" + relative_from($destdir, "../"+prefix))] + end + if $static + args += ["static"] unless $clean + $extlist.push [$static, $target, File.basename($target), $preload] + end + unless system($make, *args) + $ignore or $continue or return false + end + $compiled[target] = true + if $clean + FileUtils.rm_f("mkmf.log") + if $clean != true + FileUtils.rm_f([makefile, $extconf_h || "extconf.h"]) + end + end + if $static + $extflags ||= "" + $extlibs ||= [] + $extpath ||= [] + unless $mswin + $extflags = ($extflags.split | $DLDFLAGS.split | $LDFLAGS.split).join(" ") + end + $extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split) + $extpath |= $LIBPATH + end + ensure + unless $ignore + RbConfig.module_eval { + remove_const(:CONFIG) + const_set(:CONFIG, rbconfig0) + remove_const(:MAKEFILE_CONFIG) + const_set(:MAKEFILE_CONFIG, mkconfig0) + } + Object.class_eval { + remove_const(:CONFIG) + const_set(:CONFIG, mkconfig0) + } + end + $top_srcdir = top_srcdir + $topdir = topdir + $hdrdir = hdrdir + Dir.chdir dir + end + begin + Dir.rmdir target + target = File.dirname(target) + rescue SystemCallError + break + end while true + true +end + +def compiled?(target) + $compiled[target] +end + +def parse_args() + $mflags = [] + + $optparser ||= OptionParser.new do |opts| + opts.on('-n') {$dryrun = true} + opts.on('--[no-]extension [EXTS]', Array) do |v| + $extension = (v == false ? [] : v) + end + opts.on('--[no-]extstatic [STATIC]', Array) do |v| + if ($extstatic = v) == false + $extstatic = [] + elsif v + $force_static = true if $extstatic.delete("static") + $extstatic = nil if $extstatic.empty? + end + end + opts.on('--dest-dir=DIR') do |v| + $destdir = v + end + opts.on('--extout=DIR') do |v| + $extout = (v unless v.empty?) + end + opts.on('--make=MAKE') do |v| + $make = v || 'make' + end + opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v| + v.grep(/\A([-\w]+)=(.*)/) {$configure_args["--#{$1}"] = $2} + if arg = v.first + arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg + end + $mflags.concat(v) + end + opts.on('--message [MESSAGE]', String) do |v| + $message = v + end + end + begin + $optparser.parse!(ARGV) + rescue OptionParser::InvalidOption => e + retry if /^--/ =~ e.args[0] + $optparser.warn(e) + abort $optparser.to_s + end + + $destdir ||= '' + + $make, *rest = Shellwords.shellwords($make) + $mflags.unshift(*rest) unless rest.empty? + + def $mflags.set?(flag) + grep(/\A-(?!-).*#{flag.chr}/i) { return true } + false + end + def $mflags.defined?(var) + grep(/\A#{var}=(.*)/) {return $1} + false + end + + if $mflags.set?(?n) + $dryrun = true + else + $mflags.unshift '-n' if $dryrun + end + + $continue = $mflags.set?(?k) + if $extout + $extout = '$(topdir)/'+$extout + RbConfig::CONFIG["extout"] = CONFIG["extout"] = $extout + $extout_prefix = $extout ? "$(extout)$(target_prefix)/" : "" + $mflags << "extout=#$extout" << "extout_prefix=#$extout_prefix" + end +end + +parse_args() + +if target = ARGV.shift and /^[a-z-]+$/ =~ target + $mflags.push(target) + case target + when /^(dist|real)?(clean)$/ + target = $2 + $ignore ||= true + $clean = $1 ? $1[0] : true + when /^install\b/ + $install = true + $ignore ||= true + $mflags.unshift("INSTALL_PROG=install -c -p -m 0755", + "INSTALL_DATA=install -c -p -m 0644", + "MAKEDIRS=mkdir -p") if $dryrun + end +end +unless $message + if target + $message = target.sub(/^(\w+)e?\b/, '\1ing').tr('-', ' ') + else + $message = "compiling" + end +end + +EXEEXT = CONFIG['EXEEXT'] +if CROSS_COMPILING + $ruby = $mflags.defined?("MINIRUBY") || CONFIG['MINIRUBY'] +elsif sep = config_string('BUILD_FILE_SEPARATOR') + $ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT +else + $ruby = '$(topdir)/miniruby' + EXEEXT +end +$ruby << " -I'$(topdir)'" +unless CROSS_COMPILING + $ruby << " -I'$(top_srcdir)/lib'" + $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout + $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb" + ENV["RUBYLIB"] = "-" + ENV["RUBYOPT"] = "-r#{File.expand_path('ext/purelib.rb', $top_srcdir)}" +end +$mflags << "ruby=#$ruby" + +MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)} + +# get static-link modules +$static_ext = {} +if $extstatic + $extstatic.each do |t| + target = t + target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM + $static_ext[target] = $static_ext.size + end +end +for dir in ["ext", File::join($top_srcdir, "ext")] + setup = File::join(dir, CONFIG['setup']) + if File.file? setup + f = open(setup) + while line = f.gets() + line.chomp! + line.sub!(/#.*$/, '') + next if /^\s*$/ =~ line + target, opt = line.split(nil, 3) + if target == 'option' + case opt + when 'nodynamic' + $nodynamic = true + end + next + end + target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM + $static_ext[target] = $static_ext.size + end + MTIMES << f.mtime + $setup = setup + f.close + break + end +end unless $extstatic + +ext_prefix = "#{$top_srcdir}/ext" +exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t} +if $extension + exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")} +else + withes, withouts = %w[--with --without].collect {|w| + if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any? + nil + elsif (w = w.grep(String)).empty? + proc {true} + else + proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)} + end + } + if withes + withouts ||= proc {true} + else + withes = proc {false} + withouts ||= withes + end + cond = proc {|ext, *| + cond1 = proc {|n| File.fnmatch(n, ext)} + withes.call(cond1) or !withouts.call(cond1) + } + exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d| + d = File.dirname(d) + d.slice!(0, ext_prefix.length + 1) + d + }.find_all {|ext| + with_config(ext, &cond) + }.sort +end + +if $extout + extout = RbConfig.expand("#{$extout}", RbConfig::CONFIG.merge("topdir"=>$topdir)) + unless $ignore + FileUtils.mkpath(extout) + end +end + +dir = Dir.pwd +FileUtils::makedirs('ext') +Dir::chdir('ext') + +hdrdir = $hdrdir +$hdrdir = ($top_srcdir = relative_from(srcdir, $topdir = "..")) + "/include" +exts.each do |d| + $static = $force_static ? $static_ext[target] : false + + if $ignore or !$nodynamic or $static + extmake(d) or abort + end +end +$top_srcdir = srcdir +$topdir = "." +$hdrdir = hdrdir + +extinit = Struct.new(:c, :o) { + def initialize(src) + super("#{src}.c", "#{src}.#{$OBJEXT}") + end +}.new("extinit") +if $ignore + FileUtils.rm_f(extinit.to_a) if $clean + Dir.chdir ".." + if $clean + Dir.rmdir('ext') rescue nil + if $extout + FileUtils.rm_rf([extout+"/common", extout+"/include/ruby", extout+"/rdoc"]) + FileUtils.rm_rf(extout+"/"+CONFIG["arch"]) + if $clean != true + FileUtils.rm_rf(extout+"/include/"+CONFIG["arch"]) + FileUtils.rm_f($mflags.defined?("INSTALLED_LIST")||ENV["INSTALLED_LIST"]||".installed.list") + Dir.rmdir(extout+"/include") rescue nil + Dir.rmdir(extout) rescue nil + end + end + end + exit +end + +$extinit ||= "" +$extobjs ||= "" +$extpath ||= [] +$extflags ||= "" +$extlibs ||= [] +unless $extlist.empty? + $extinit << "\n" unless $extinit.empty? + list = $extlist.dup + built = [] + while e = list.shift + s,t,i,r = e + if r and !(r -= built).empty? + l = list.size + if (while l > 0; break true if r.include?(list[l-=1][1]) end) + list.insert(l + 1, e) + end + next + end + f = format("%s/%s.%s", s, i, $LIBEXT) + if File.exist?(f) + $extinit << " init(Init_#{i}, \"#{t}.so\");\n" + $extobjs << "ext/#{f} " + built << t + end + end + + src = %{\ +#include "ruby.h" + +#define init(func, name) { \\ + extern void func _((void)); \\ + ruby_init_ext(name, func); \\ +} + +void ruby_init_ext _((const char *name, void (*init)(void))); + +void Init_ext _((void))\n{\n#$extinit} +} + if !modified?(extinit.c, MTIMES) || IO.read(extinit.c) != src + open(extinit.c, "w") {|fe| fe.print src} + end + + $extobjs = "ext/#{extinit.o} #{$extobjs}" + if RUBY_PLATFORM =~ /beos/ + $extflags.delete("-L/usr/local/lib") + end + $extpath.delete("$(topdir)") + $extflags = libpathflag($extpath) << " " << $extflags.strip + conf = [ + ['LIBRUBY_SO_UPDATE', '$(LIBRUBY_EXTS)'], + ['SETUP', $setup], + [enable_config("shared", $enable_shared) ? 'DLDOBJS' : 'EXTOBJS', $extobjs], + ['EXTLIBS', $extlibs.join(' ')], ['EXTLDFLAGS', $extflags] + ].map {|n, v| + "#{n}=#{v}" if v and !(v = v.strip).empty? + }.compact + puts(*conf) + $stdout.flush + $mflags.concat(conf) +else + FileUtils.rm_f(extinit.to_a) +end +rubies = [] +%w[RUBY RUBYW STATIC_RUBY].each {|n| + r = n + if r = arg_config("--"+r.downcase) || config_string(r+"_INSTALL_NAME") + rubies << Config.expand(r+=EXEEXT) + $mflags << "#{n}=#{r}" + end +} + +Dir.chdir ".." +unless $destdir.to_s.empty? + $mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}" +end +puts "making #{rubies.join(', ')}" +$stdout.flush +$mflags.concat(rubies) + +if $nmake == ?b + unless (vars = $mflags.grep(/\A\w+=/n)).empty? + open(mkf = "libruby.mk", "wb") do |tmf| + tmf.puts("!include Makefile") + tmf.puts + tmf.puts(*vars.map {|v| v.sub(/=/, " = ")}) + tmf.puts("PRE_LIBRUBY_UPDATE = del #{mkf}") + end + $mflags.unshift("-f#{mkf}") + vars.each {|flag| flag.sub!(/\A/, "-D")} + end +end +$mflags.unshift("topdir=#$topdir") +ENV.delete("RUBYOPT") +system($make, *sysquote($mflags)) or exit($?.exitstatus) + +#Local variables: +# mode: ruby +#end: diff --git a/lib/ruby-1.9.1-rc1/ext/fcntl/.cvsignore b/lib/ruby-1.9.1-rc1/ext/fcntl/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fcntl/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/fcntl/depend b/lib/ruby-1.9.1-rc1/ext/fcntl/depend new file mode 100644 index 0000000..10eab64 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fcntl/depend @@ -0,0 +1 @@ +fcntl.o: fcntl.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/fcntl/extconf.rb b/lib/ruby-1.9.1-rc1/ext/fcntl/extconf.rb new file mode 100644 index 0000000..8b717d4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fcntl/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile('fcntl') diff --git a/lib/ruby-1.9.1-rc1/ext/fcntl/fcntl.c b/lib/ruby-1.9.1-rc1/ext/fcntl/fcntl.c new file mode 100644 index 0000000..b032620 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fcntl/fcntl.c @@ -0,0 +1,187 @@ +/************************************************ + + fcntl.c - + + $Author: shyouhei $ + created at: Mon Apr 7 18:53:05 JST 1997 + + Copyright (C) 1997-2001 Yukihiro Matsumoto + +************************************************/ + +/************************************************ += NAME + +fcntl - load the C fcntl.h defines + += SYNOPSIS + + require "fcntl" + m = s.fcntl(Fcntl::F_GETFL, 0) + f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m) + += DESCRIPTION + +This module is just a translation of the C file. + += NOTE + +Only #define symbols get translated; you must still correctly +pack up your own arguments to pass as args for locking functions, etc. + +************************************************/ + +#include "ruby.h" +#include + +/* Fcntl loads the constants defined in the system's C header + * file, and used with both the fcntl(2) and open(2) POSIX system calls. + * + * Copyright (C) 1997-2001 Yukihiro Matsumoto + * + * Documented by mathew + * + * = Usage + * + * To perform a fcntl(2) operation, use IO::fcntl in the core classes. + * + * To perform an open(2) operation, use IO::sysopen. + * + * The set of operations and constants available depends upon specific OS + * platform. Some values listed below may not be supported on your system. + * + * The constants supported by Ruby for use with IO::fcntl are: + * + * - F_DUPFD - duplicate a close-on-exec file handle to a non-close-on-exec + * file handle. + * + * - F_GETFD - read the close-on-exec flag of a file handle. + * + * - F_SETFD - set the close-on-exec flag of a file handle. + * + * - FD_CLOEXEC - the value of the close-on-exec flag. + * + * - F_GETFL - get file descriptor flags. + * + * - F_SETFL - set file descriptor flags. + * + * - O_APPEND, O_NONBLOCK, etc (see below) - file descriptor flag + * values for the above. + * + * - F_GETLK - determine whether a given region of a file is locked. + * + * - F_SETLK - acquire a lock on a region of a file. + * + * - F_SETLKW - acquire a lock on a region of a file, waiting if necessary. + * + * - F_RDLCK, F_WRLCK, F_UNLCK - types of lock for the above. + * + * The constants supported by Ruby for use with IO::sysopen are: + * + * - O_APPEND - open file in append mode. + * + * - O_NOCTTY - open tty without it becoming controlling tty. + * + * - O_CREAT - create file if it doesn't exist. + * + * - O_EXCL - used with O_CREAT, fail if file exists. + * + * - O_TRUNC - truncate file on open. + * + * - O_NONBLOCK / O_NDELAY - open in non-blocking mode. + * + * - O_RDONLY - open read-only. + * + * - O_WRONLY - open write-only. + * + * - O_RDWR - open read-write. + * + * - O_ACCMODE - mask to extract read/write flags. + * + * Example: + * + * require 'fcntl' + * + * fd = IO::sysopen('/tmp/tempfile', + * Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT) + * f = IO.open(fd) + * f.syswrite("TEMP DATA") + * f.close + * + */ +void +Init_fcntl() +{ + VALUE mFcntl = rb_define_module("Fcntl"); +#ifdef F_DUPFD + rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD)); +#endif +#ifdef F_GETFD + rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD)); +#endif +#ifdef F_GETLK + rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK)); +#endif +#ifdef F_SETFD + rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD)); +#endif +#ifdef F_GETFL + rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL)); +#endif +#ifdef F_SETFL + rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL)); +#endif +#ifdef F_SETLK + rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK)); +#endif +#ifdef F_SETLKW + rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW)); +#endif +#ifdef FD_CLOEXEC + rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC)); +#endif +#ifdef F_RDLCK + rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK)); +#endif +#ifdef F_UNLCK + rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK)); +#endif +#ifdef F_WRLCK + rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK)); +#endif +#ifdef O_CREAT + rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT)); +#endif +#ifdef O_EXCL + rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL)); +#endif +#ifdef O_NOCTTY + rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY)); +#endif +#ifdef O_TRUNC + rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC)); +#endif +#ifdef O_APPEND + rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND)); +#endif +#ifdef O_NONBLOCK + rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK)); +#endif +#ifdef O_NDELAY + rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY)); +#endif +#ifdef O_RDONLY + rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY)); +#endif +#ifdef O_RDWR + rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR)); +#endif +#ifdef O_WRONLY + rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY)); +#endif +#ifdef O_ACCMODE + rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE)); +#else + rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR)); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/fiber/extconf.rb b/lib/ruby-1.9.1-rc1/ext/fiber/extconf.rb new file mode 100644 index 0000000..904ab94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fiber/extconf.rb @@ -0,0 +1,3 @@ +require 'mkmf' +create_makefile('fiber') + diff --git a/lib/ruby-1.9.1-rc1/ext/fiber/fiber.c b/lib/ruby-1.9.1-rc1/ext/fiber/fiber.c new file mode 100644 index 0000000..7c33a1f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/fiber/fiber.c @@ -0,0 +1,8 @@ + +void Init_Fiber_as_Coroutine(void); + +void +Init_fiber(void) +{ + Init_Fiber_as_Coroutine(); +} diff --git a/lib/ruby-1.9.1-rc1/ext/gdbm/.cvsignore b/lib/ruby-1.9.1-rc1/ext/gdbm/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/gdbm/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/gdbm/README b/lib/ruby-1.9.1-rc1/ext/gdbm/README new file mode 100644 index 0000000..df7a261 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/gdbm/README @@ -0,0 +1 @@ +gdbm ext-library for Ruby 1.3 or later diff --git a/lib/ruby-1.9.1-rc1/ext/gdbm/depend b/lib/ruby-1.9.1-rc1/ext/gdbm/depend new file mode 100644 index 0000000..c080a81 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/gdbm/depend @@ -0,0 +1 @@ +gdbm.o: gdbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/gdbm/extconf.rb b/lib/ruby-1.9.1-rc1/ext/gdbm/extconf.rb new file mode 100644 index 0000000..5a09492 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/gdbm/extconf.rb @@ -0,0 +1,7 @@ +require 'mkmf' + +dir_config("gdbm") +if have_library("gdbm", "gdbm_open") and + have_header("gdbm.h") + create_makefile("gdbm") +end diff --git a/lib/ruby-1.9.1-rc1/ext/gdbm/gdbm.c b/lib/ruby-1.9.1-rc1/ext/gdbm/gdbm.c new file mode 100644 index 0000000..bea4455 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/gdbm/gdbm.c @@ -0,0 +1,1255 @@ +/************************************************ + + gdbm.c - + + $Author: yugui $ + modified at: Mon Jan 24 15:59:52 JST 1994 + + Documentation by Peter Adolphs < futzilogik at users dot sourceforge dot net > + +************************************************/ + +#include "ruby.h" + +#include +#include +#include + +/* + * Document-class: GDBM + * + * == Summary + * + * Ruby extension for GNU dbm (gdbm) -- a simple database engine for storing + * key-value pairs on disk. + * + * == Description + * + * GNU dbm is a library for simple databases. A database is a file that stores + * key-value pairs. Gdbm allows the user to store, retrieve, and delete data by + * key. It furthermore allows a non-sorted traversal of all key-value pairs. + * A gdbm database thus provides the same functionality as a hash. As + * with objects of the Hash class, elements can be accessed with []. + * Furthermore, GDBM mixes in the Enumerable module, thus providing convenient + * methods such as #find, #collect, #map, etc. + * + * A process is allowed to open several different databases at the same time. + * A process can open a database as a "reader" or a "writer". Whereas a reader + * has only read-access to the database, a writer has read- and write-access. + * A database can be accessed either by any number of readers or by exactly one + * writer at the same time. + * + * == Examples + * + * 1. Opening/creating a database, and filling it with some entries: + * + * require 'gdbm' + * + * gdbm = GDBM.new("fruitstore.db") + * gdbm["ananas"] = "3" + * gdbm["banana"] = "8" + * gdbm["cranberry"] = "4909" + * gdbm.close + * + * 2. Reading out a database: + * + * require 'gdbm' + * + * gdbm = GDBM.new("fruitstore.db") + * gdbm.each_pair do |key, value| + * print "#{key}: #{value}\n" + * end + * gdbm.close + * + * produces + * + * banana: 8 + * ananas: 3 + * cranberry: 4909 + * + * == Links + * + * * http://www.gnu.org/software/gdbm/ + */ +static VALUE rb_cGDBM, rb_eGDBMError, rb_eGDBMFatalError; + +#define RUBY_GDBM_RW_BIT 0x20000000 + +#define MY_BLOCK_SIZE (2048) +#define MY_FATAL_FUNC rb_gdbm_fatal +static void +rb_gdbm_fatal(char *msg) +{ + rb_raise(rb_eGDBMFatalError, "%s", msg); +} + +struct dbmdata { + int di_size; + GDBM_FILE di_dbm; +}; + +static void +closed_dbm(void) +{ + rb_raise(rb_eRuntimeError, "closed GDBM file"); +} + +#define GetDBM(obj, dbmp) do {\ + Data_Get_Struct(obj, struct dbmdata, dbmp);\ + if (dbmp == 0) closed_dbm();\ + if (dbmp->di_dbm == 0) closed_dbm();\ +} while (0) + +#define GetDBM2(obj, data, dbm) {\ + GetDBM(obj, data);\ + (dbm) = dbmp->di_dbm;\ +} + +static void +free_dbm(struct dbmdata *dbmp) +{ + if (dbmp) { + if (dbmp->di_dbm) gdbm_close(dbmp->di_dbm); + xfree(dbmp); + } +} + +/* + * call-seq: + * gdbm.close -> nil + * + * Closes the associated database file. + */ +static VALUE +fgdbm_close(VALUE obj) +{ + struct dbmdata *dbmp; + + GetDBM(obj, dbmp); + gdbm_close(dbmp->di_dbm); + dbmp->di_dbm = 0; + + return Qnil; +} + +/* + * call-seq: + * gdbm.closed? -> true or false + * + * Returns true if the associated database file has been closed. + */ +static VALUE +fgdbm_closed(VALUE obj) +{ + struct dbmdata *dbmp; + + Data_Get_Struct(obj, struct dbmdata, dbmp); + if (dbmp == 0) + return Qtrue; + if (dbmp->di_dbm == 0) + return Qtrue; + + return Qfalse; +} + +static VALUE +fgdbm_s_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, free_dbm, 0); +} + +/* + * call-seq: + * GDBM.new(filename, mode = 0666, flags = nil) + * + * Creates a new GDBM instance by opening a gdbm file named _filename_. + * If the file does not exist, a new file with file mode _mode_ will be + * created. _flags_ may be one of the following: + * * *READER* - open as a reader + * * *WRITER* - open as a writer + * * *WRCREAT* - open as a writer; if the database does not exist, create a new one + * * *NEWDB* - open as a writer; overwrite any existing databases + * + * The values *WRITER*, *WRCREAT* and *NEWDB* may be combined with the following + * values by bitwise or: + * * *SYNC* - cause all database operations to be synchronized to the disk + * * *NOLOCK* - do not lock the database file + * + * If no _flags_ are specified, the GDBM object will try to open the database + * file as a writer and will create it if it does not already exist + * (cf. flag WRCREAT). If this fails (for instance, if another process + * has already opened the database as a reader), it will try to open the + * database file as a reader (cf. flag READER). + */ +static VALUE +fgdbm_initialize(int argc, VALUE *argv, VALUE obj) +{ + VALUE file, vmode, vflags; + GDBM_FILE dbm; + struct dbmdata *dbmp; + int mode, flags = 0; + + if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) { + mode = 0666; /* default value */ + } + else if (NIL_P(vmode)) { + mode = -1; /* return nil if DB does not exist */ + } + else { + mode = NUM2INT(vmode); + } + + if (!NIL_P(vflags)) + flags = NUM2INT(vflags); + + SafeStringValue(file); + + if (flags & RUBY_GDBM_RW_BIT) { + flags &= ~RUBY_GDBM_RW_BIT; + dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE, + flags, mode, MY_FATAL_FUNC); + } + else { + dbm = 0; + if (mode >= 0) + dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE, + GDBM_WRCREAT|flags, mode, MY_FATAL_FUNC); + if (!dbm) + dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE, + GDBM_WRITER|flags, 0, MY_FATAL_FUNC); + if (!dbm) + dbm = gdbm_open(RSTRING_PTR(file), MY_BLOCK_SIZE, + GDBM_READER|flags, 0, MY_FATAL_FUNC); + } + + if (!dbm) { + if (mode == -1) return Qnil; + + if (gdbm_errno == GDBM_FILE_OPEN_ERROR || + gdbm_errno == GDBM_CANT_BE_READER || + gdbm_errno == GDBM_CANT_BE_WRITER) + rb_sys_fail(RSTRING_PTR(file)); + else + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + + dbmp = ALLOC(struct dbmdata); + free_dbm(DATA_PTR(obj)); + DATA_PTR(obj) = dbmp; + dbmp->di_dbm = dbm; + dbmp->di_size = -1; + + return obj; +} + +/* + * call-seq: + * GDBM.open(filename, mode = 0666, flags = nil) + * GDBM.open(filename, mode = 0666, flags = nil) { |gdbm| ... } + * + * If called without a block, this is synonymous to GDBM::new. + * If a block is given, the new GDBM instance will be passed to the block + * as a parameter, and the corresponding database file will be closed + * after the execution of the block code has been finished. + * + * Example for an open call with a block: + * + * require 'gdbm' + * GDBM.open("fruitstore.db") do |gdbm| + * gdbm.each_pair do |key, value| + * print "#{key}: #{value}\n" + * end + * end + */ +static VALUE +fgdbm_s_open(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0); + + if (NIL_P(fgdbm_initialize(argc, argv, obj))) { + return Qnil; + } + + if (rb_block_given_p()) { + return rb_ensure(rb_yield, obj, fgdbm_close, obj); + } + + return obj; +} + +static VALUE +rb_gdbm_fetch(GDBM_FILE dbm, datum key) +{ + datum val; + VALUE str; + + val = gdbm_fetch(dbm, key); + if (val.dptr == 0) + return Qnil; + + str = rb_str_new(val.dptr, val.dsize); + free(val.dptr); + OBJ_TAINT(str); + return (VALUE)str; +} + +static VALUE +rb_gdbm_fetch2(GDBM_FILE dbm, VALUE keystr) +{ + datum key; + + StringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + return rb_gdbm_fetch(dbm, key); +} + +static VALUE +rb_gdbm_fetch3(VALUE obj, VALUE keystr) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + + GetDBM2(obj, dbmp, dbm); + return rb_gdbm_fetch2(dbm, keystr); +} + +static VALUE +rb_gdbm_firstkey(GDBM_FILE dbm) +{ + datum key; + VALUE str; + + key = gdbm_firstkey(dbm); + if (key.dptr == 0) + return Qnil; + + str = rb_str_new(key.dptr, key.dsize); + free(key.dptr); + OBJ_TAINT(str); + return str; +} + +static VALUE +rb_gdbm_nextkey(GDBM_FILE dbm, VALUE keystr) +{ + datum key, key2; + VALUE str; + + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + key2 = gdbm_nextkey(dbm, key); + if (key2.dptr == 0) + return Qnil; + + str = rb_str_new(key2.dptr, key2.dsize); + free(key2.dptr); + OBJ_TAINT(str); + return str; +} + +static VALUE +fgdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone) +{ + VALUE valstr; + + valstr = rb_gdbm_fetch3(obj, keystr); + if (NIL_P(valstr)) { + if (ifnone == Qnil && rb_block_given_p()) + return rb_yield(keystr); + return ifnone; + } + return valstr; +} + +/* + * call-seq: + * gdbm[key] -> value + * + * Retrieves the _value_ corresponding to _key_. + */ +static VALUE +fgdbm_aref(VALUE obj, VALUE keystr) +{ + return rb_gdbm_fetch3(obj, keystr); +} + +/* + * call-seq: + * gdbm.fetch(key [, default]) -> value + * + * Retrieves the _value_ corresponding to _key_. If there is no value + * associated with _key_, _default_ will be returned instead. + */ +static VALUE +fgdbm_fetch_m(int argc, VALUE *argv, VALUE obj) +{ + VALUE keystr, valstr, ifnone; + + rb_scan_args(argc, argv, "11", &keystr, &ifnone); + valstr = fgdbm_fetch(obj, keystr, ifnone); + if (argc == 1 && !rb_block_given_p() && NIL_P(valstr)) + rb_raise(rb_eIndexError, "key not found"); + + return valstr; +} + +/* + * call-seq: + * gdbm.key(value) -> key + * + * Returns the _key_ for a given _value_. If several keys may map to the + * same value, the key that is found first will be returned. + */ +static VALUE +fgdbm_key(VALUE obj, VALUE valstr) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, valstr2; + + StringValue(valstr); + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + valstr2 = rb_gdbm_fetch2(dbm, keystr); + if (!NIL_P(valstr2) && + RSTRING_LEN(valstr) == RSTRING_LEN(valstr2) && + memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2), + RSTRING_LEN(valstr)) == 0) { + return keystr; + } + } + return Qnil; +} + +/* :nodoc: */ +static VALUE +fgdbm_index(VALUE obj, VALUE value) +{ + rb_warn("GDBM#index is deprecated; use GDBM#key"); + return fgdbm_key(obj, value); +} + +/* + * call-seq: + * gdbm.select { |value| block } -> array + * + * Returns a new array of all values of the database for which _block_ + * evaluates to true. + */ +static VALUE +fgdbm_select(VALUE obj) +{ + VALUE new = rb_ary_new(); + GDBM_FILE dbm; + struct dbmdata *dbmp; + VALUE keystr; + + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)); + VALUE v = rb_yield(assoc); + + if (RTEST(v)) { + rb_ary_push(new, assoc); + } + GetDBM2(obj, dbmp, dbm); + } + + return new; +} + +/* + * call-seq: + * gdbm.values_at(key, ...) -> array + * + * Returns an array of the values associated with each specified _key_. + */ +static VALUE +fgdbm_values_at(int argc, VALUE *argv, VALUE obj) +{ + VALUE new = rb_ary_new2(argc); + int i; + + for (i=0; idi_size = -1; + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + else if (dbmp->di_size >= 0) { + dbmp->di_size--; + } + return obj; +} + +/* + * call-seq: + * gdbm.delete(key) -> value or nil + * + * Removes the key-value-pair with the specified _key_ from this database and + * returns the corresponding _value_. Returns nil if the database is empty. + */ +static VALUE +fgdbm_delete(VALUE obj, VALUE keystr) +{ + VALUE valstr; + + valstr = fgdbm_fetch(obj, keystr, Qnil); + rb_gdbm_delete(obj, keystr); + return valstr; +} + +/* + * call-seq: + * gdbm.shift -> (key, value) or nil + * + * Removes a key-value-pair from this database and returns it as a + * two-item array [ _key_, _value_ ]. Returns nil if the database is empty. + */ +static VALUE +fgdbm_shift(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, valstr; + + rb_gdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + keystr = rb_gdbm_firstkey(dbm); + if (NIL_P(keystr)) return Qnil; + valstr = rb_gdbm_fetch2(dbm, keystr); + rb_gdbm_delete(obj, keystr); + + return rb_assoc_new(keystr, valstr); +} + +/* + * call-seq: + * gdbm.delete_if { |key, value| block } -> gdbm + * gdbm.reject! { |key, value| block } -> gdbm + * + * Deletes every key-value pair from _gdbm_ for which _block_ evaluates to true. + */ +static VALUE +fgdbm_delete_if(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, valstr; + VALUE ret, ary = rb_ary_new(); + int i, status = 0, n; + + rb_gdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + n = dbmp->di_size; + dbmp->di_size = -1; + + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + valstr = rb_gdbm_fetch2(dbm, keystr); + ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status); + if (status != 0) break; + if (RTEST(ret)) rb_ary_push(ary, keystr); + GetDBM2(obj, dbmp, dbm); + } + + for (i = 0; i < RARRAY_LEN(ary); i++) + rb_gdbm_delete(obj, RARRAY_PTR(ary)[i]); + if (status) rb_jump_tag(status); + if (n > 0) dbmp->di_size = n - RARRAY_LEN(ary); + + return obj; +} + +/* + * call-seq: + * gdbm.clear -> gdbm + * + * Removes all the key-value pairs within _gdbm_. + */ +static VALUE +fgdbm_clear(VALUE obj) +{ + datum key, nextkey; + struct dbmdata *dbmp; + GDBM_FILE dbm; + + rb_gdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + +#if 0 + while (key = gdbm_firstkey(dbm), key.dptr) { + if (gdbm_delete(dbm, key)) { + free(key.dptr); + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + free(key.dptr); + } +#else + while (key = gdbm_firstkey(dbm), key.dptr) { + for (; key.dptr; key = nextkey) { + nextkey = gdbm_nextkey(dbm, key); + if (gdbm_delete(dbm, key)) { + free(key.dptr); + if (nextkey.dptr) free(nextkey.dptr); + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + free(key.dptr); + } + } +#endif + dbmp->di_size = 0; + + return obj; +} + +/* + * call-seq: + * gdbm.invert -> hash + * + * Returns a hash created by using _gdbm_'s values as keys, and the keys + * as values. + */ +static VALUE +fgdbm_invert(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, valstr; + VALUE hash = rb_hash_new(); + + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + valstr = rb_gdbm_fetch2(dbm, keystr); + + rb_hash_aset(hash, valstr, keystr); + } + return hash; +} + +/* + * call-seq: + * gdbm[key]= value -> value + * gdbm.store(key, value) -> value + * + * Associates the value _value_ with the specified _key_. + */ +static VALUE +fgdbm_store(VALUE obj, VALUE keystr, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + GDBM_FILE dbm; + + rb_gdbm_modify(obj); + StringValue(keystr); + StringValue(valstr); + + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + if (gdbm_store(dbm, key, val, GDBM_REPLACE)) { + if (errno == EPERM) rb_sys_fail(0); + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + + return valstr; +} + +static VALUE +update_i(VALUE pair, VALUE dbm) +{ + Check_Type(pair, T_ARRAY); + if (RARRAY_LEN(pair) < 2) { + rb_raise(rb_eArgError, "pair must be [key, value]"); + } + fgdbm_store(dbm, RARRAY_PTR(pair)[0], RARRAY_PTR(pair)[1]); + return Qnil; +} + +/* + * call-seq: + * gdbm.update(other) -> gdbm + * + * Adds the key-value pairs of _other_ to _gdbm_, overwriting entries with + * duplicate keys with those from _other_. _other_ must have an each_pair + * method. + */ +static VALUE +fgdbm_update(VALUE obj, VALUE other) +{ + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +/* + * call-seq: + * gdbm.replace(other) -> gdbm + * + * Replaces the content of _gdbm_ with the key-value pairs of _other_. + * _other_ must have an each_pair method. + */ +static VALUE +fgdbm_replace(VALUE obj, VALUE other) +{ + fgdbm_clear(obj); + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +/* + * call-seq: + * gdbm.length -> fixnum + * gdbm.size -> fixnum + * + * Returns the number of key-value pairs in this database. + */ +static VALUE +fgdbm_length(VALUE obj) +{ + datum key, nextkey; + struct dbmdata *dbmp; + GDBM_FILE dbm; + int i = 0; + + GetDBM2(obj, dbmp, dbm); + if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size); + + for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) { + nextkey = gdbm_nextkey(dbm, key); + free(key.dptr); + i++; + } + dbmp->di_size = i; + + return INT2FIX(i); +} + +/* + * call-seq: + * gdbm.empty? -> true or false + * + * Returns true if the database is empty. + */ +static VALUE +fgdbm_empty_p(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + GDBM_FILE dbm; + + GetDBM(obj, dbmp); + if (dbmp->di_size < 0) { + dbm = dbmp->di_dbm; + + key = gdbm_firstkey(dbm); + if (key.dptr) { + free(key.dptr); + return Qfalse; + } + return Qtrue; + } + + if (dbmp->di_size == 0) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * gdbm.each_value { |value| block } -> gdbm + * + * Executes _block_ for each key in the database, passing the corresponding + * _value_ as a parameter. + */ +static VALUE +fgdbm_each_value(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_yield(rb_gdbm_fetch2(dbm, keystr)); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +/* + * call-seq: + * gdbm.each_key { |key| block } -> gdbm + * + * Executes _block_ for each key in the database, passing the + * _key_ as a parameter. + */ +static VALUE +fgdbm_each_key(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_yield(keystr); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +/* + * call-seq: + * gdbm.each_pair { |key, value| block } -> gdbm + * + * Executes _block_ for each key in the database, passing the _key_ and the + * correspoding _value_ as a parameter. + */ +static VALUE +fgdbm_each_pair(VALUE obj) +{ + GDBM_FILE dbm; + struct dbmdata *dbmp; + VALUE keystr; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr))); + GetDBM2(obj, dbmp, dbm); + } + + return obj; +} + +/* + * call-seq: + * gdbm.keys -> array + * + * Returns an array of all keys of this database. + */ +static VALUE +fgdbm_keys(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_ary_push(ary, keystr); + } + + return ary; +} + +/* + * call-seq: + * gdbm.values -> array + * + * Returns an array of all values of this database. + */ +static VALUE +fgdbm_values(VALUE obj) +{ + datum key, nextkey; + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE valstr, ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) { + nextkey = gdbm_nextkey(dbm, key); + valstr = rb_gdbm_fetch(dbm, key); + free(key.dptr); + rb_ary_push(ary, valstr); + } + + return ary; +} + +/* + * call-seq: + * gdbm.has_key?(k) -> true or false + * gdbm.key?(k) -> true or false + * + * Returns true if the given key _k_ exists within the database. + * Returns false otherwise. + */ +static VALUE +fgdbm_has_key(VALUE obj, VALUE keystr) +{ + datum key; + struct dbmdata *dbmp; + GDBM_FILE dbm; + + StringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + GetDBM2(obj, dbmp, dbm); + if (gdbm_exists(dbm, key)) + return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * gdbm.has_value?(v) -> true or false + * gdbm.value?(v) -> true or false + * + * Returns true if the given value _v_ exists within the database. + * Returns false otherwise. + */ +static VALUE +fgdbm_has_value(VALUE obj, VALUE valstr) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, valstr2; + + StringValue(valstr); + GetDBM2(obj, dbmp, dbm); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + valstr2 = rb_gdbm_fetch2(dbm, keystr); + + if (!NIL_P(valstr2) && + RSTRING_LEN(valstr) == RSTRING_LEN(valstr2) && + memcmp(RSTRING_PTR(valstr), RSTRING_PTR(valstr2), + RSTRING_LEN(valstr)) == 0) { + return Qtrue; + } + } + return Qfalse; +} + +/* + * call-seq: + * gdbm.to_a -> array + * + * Returns an array of all key-value pairs contained in the database. + */ +static VALUE +fgdbm_to_a(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr))); + } + + return ary; +} + +/* + * call-seq: + * gdbm.reorganize -> gdbm + * + * Reorganizes the database file. This operation removes reserved space of + * elements that have already been deleted. It is only useful after a lot of + * deletions in the database. + */ +static VALUE +fgdbm_reorganize(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + + rb_gdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + gdbm_reorganize(dbm); + return obj; +} + +/* + * call-seq: + * gdbm.sync -> gdbm + * + * Unless the _gdbm_ object has been opened with the *SYNC* flag, it is not + * guarenteed that database modification operations are immediately applied to + * the database file. This method ensures that all recent modifications + * to the database are written to the file. Blocks until all writing operations + * to the disk have been finished. + */ +static VALUE +fgdbm_sync(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + + rb_gdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + gdbm_sync(dbm); + return obj; +} + +/* + * call-seq: + * gdbm.cachesize = size -> size + * + * Sets the size of the internal bucket cache to _size_. + */ +static VALUE +fgdbm_set_cachesize(VALUE obj, VALUE val) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + int optval; + + GetDBM2(obj, dbmp, dbm); + optval = FIX2INT(val); + if (gdbm_setopt(dbm, GDBM_CACHESIZE, &optval, sizeof(optval)) == -1) { + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + return val; +} + +/* + * call-seq: + * gdbm.fastmode = boolean -> boolean + * + * Turns the database's fast mode on or off. If fast mode is turned on, gdbm + * does not wait for writes to be flushed to the disk before continuing. + * + * This option is obsolete for gdbm >= 1.8 since fast mode is turned on by + * default. See also: #syncmode= + */ +static VALUE +fgdbm_set_fastmode(VALUE obj, VALUE val) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + int optval; + + GetDBM2(obj, dbmp, dbm); + optval = 0; + if (RTEST(val)) + optval = 1; + + if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) { + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + return val; +} + +/* + * call-seq: + * gdbm.syncmode = boolean -> boolean + * + * Turns the database's synchronization mode on or off. If the synchronization + * mode is turned on, the database's in-memory state will be synchronized to + * disk after every database modification operation. If the synchronization + * mode is turned off, GDBM does not wait for writes to be flushed to the disk + * before continuing. + * + * This option is only available for gdbm >= 1.8 where syncmode is turned off + * by default. See also: #fastmode= + */ +static VALUE +fgdbm_set_syncmode(VALUE obj, VALUE val) +{ +#if !defined(GDBM_SYNCMODE) + fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue); + return val; +#else + struct dbmdata *dbmp; + GDBM_FILE dbm; + int optval; + + GetDBM2(obj, dbmp, dbm); + optval = 0; + if (RTEST(val)) + optval = 1; + + if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) { + rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno)); + } + return val; +#endif +} + +/* + * call-seq: + * gdbm.to_hash -> hash + * + * Returns a hash of all key-value pairs contained in the database. + */ +static VALUE +fgdbm_to_hash(VALUE obj) +{ + struct dbmdata *dbmp; + GDBM_FILE dbm; + VALUE keystr, hash; + + GetDBM2(obj, dbmp, dbm); + hash = rb_hash_new(); + for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); + keystr = rb_gdbm_nextkey(dbm, keystr)) { + + rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr)); + } + + return hash; +} + +/* + * call-seq: + * gdbm.reject { |key, value| block } -> hash + * + * Returns a hash copy of _gdbm_ where all key-value pairs from _gdbm_ for + * which _block_ evaluates to true are removed. See also: #delete_if + */ +static VALUE +fgdbm_reject(VALUE obj) +{ + return rb_hash_delete_if(fgdbm_to_hash(obj)); +} + +void +Init_gdbm(void) +{ + rb_cGDBM = rb_define_class("GDBM", rb_cObject); + rb_eGDBMError = rb_define_class("GDBMError", rb_eStandardError); + rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException); + rb_include_module(rb_cGDBM, rb_mEnumerable); + + rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc); + rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1); + + rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1); + rb_define_method(rb_cGDBM, "close", fgdbm_close, 0); + rb_define_method(rb_cGDBM, "closed?", fgdbm_closed, 0); + rb_define_method(rb_cGDBM, "[]", fgdbm_aref, 1); + rb_define_method(rb_cGDBM, "fetch", fgdbm_fetch_m, -1); + rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2); + rb_define_method(rb_cGDBM, "store", fgdbm_store, 2); + rb_define_method(rb_cGDBM, "index", fgdbm_index, 1); + rb_define_method(rb_cGDBM, "key", fgdbm_key, 1); + rb_define_method(rb_cGDBM, "select", fgdbm_select, 0); + rb_define_method(rb_cGDBM, "values_at", fgdbm_values_at, -1); + rb_define_method(rb_cGDBM, "length", fgdbm_length, 0); + rb_define_method(rb_cGDBM, "size", fgdbm_length, 0); + rb_define_method(rb_cGDBM, "empty?", fgdbm_empty_p, 0); + rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0); + rb_define_method(rb_cGDBM, "each_value", fgdbm_each_value, 0); + rb_define_method(rb_cGDBM, "each_key", fgdbm_each_key, 0); + rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0); + rb_define_method(rb_cGDBM, "keys", fgdbm_keys, 0); + rb_define_method(rb_cGDBM, "values", fgdbm_values, 0); + rb_define_method(rb_cGDBM, "shift", fgdbm_shift, 0); + rb_define_method(rb_cGDBM, "delete", fgdbm_delete, 1); + rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0); + rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0); + rb_define_method(rb_cGDBM, "reject", fgdbm_reject, 0); + rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0); + rb_define_method(rb_cGDBM, "invert", fgdbm_invert, 0); + rb_define_method(rb_cGDBM, "update", fgdbm_update, 1); + rb_define_method(rb_cGDBM, "replace", fgdbm_replace, 1); + rb_define_method(rb_cGDBM, "reorganize", fgdbm_reorganize, 0); + rb_define_method(rb_cGDBM, "sync", fgdbm_sync, 0); + /* rb_define_method(rb_cGDBM, "setopt", fgdbm_setopt, 2); */ + rb_define_method(rb_cGDBM, "cachesize=", fgdbm_set_cachesize, 1); + rb_define_method(rb_cGDBM, "fastmode=", fgdbm_set_fastmode, 1); + rb_define_method(rb_cGDBM, "syncmode=", fgdbm_set_syncmode, 1); + + rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1); + rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1); + rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1); + rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1); + rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1); + rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1); + + rb_define_method(rb_cGDBM, "to_a", fgdbm_to_a, 0); + rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0); + + /* flag for #new and #open: open database as a reader */ + rb_define_const(rb_cGDBM, "READER", INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT)); + /* flag for #new and #open: open database as a writer */ + rb_define_const(rb_cGDBM, "WRITER", INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT)); + /* flag for #new and #open: open database as a writer; if the database does not exist, create a new one */ + rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT)); + /* flag for #new and #open: open database as a writer; overwrite any existing databases */ + rb_define_const(rb_cGDBM, "NEWDB", INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT)); + + /* flag for #new and #open. this flag is obsolete for gdbm >= 1.8 */ + rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST)); + /* this flag is obsolete in gdbm 1.8. + On gdbm 1.8, fast mode is default behavior. */ + + /* gdbm version 1.8 specific */ +#if defined(GDBM_SYNC) + /* flag for #new and #open. only for gdbm >= 1.8 */ + rb_define_const(rb_cGDBM, "SYNC", INT2FIX(GDBM_SYNC)); +#endif +#if defined(GDBM_NOLOCK) + /* flag for #new and #open */ + rb_define_const(rb_cGDBM, "NOLOCK", INT2FIX(GDBM_NOLOCK)); +#endif + /* version of the gdbm library*/ + rb_define_const(rb_cGDBM, "VERSION", rb_str_new2(gdbm_version)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/.cvsignore b/lib/ruby-1.9.1-rc1/ext/iconv/.cvsignore new file mode 100644 index 0000000..66c8f52 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/.cvsignore @@ -0,0 +1,6 @@ +Makefile +mkmf.log +*.def +iconv.rb +config.charset +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/charset_alias.rb b/lib/ruby-1.9.1-rc1/ext/iconv/charset_alias.rb new file mode 100644 index 0000000..d4ed913 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/charset_alias.rb @@ -0,0 +1,103 @@ +#! /usr/bin/ruby +# :stopdoc: +require 'rbconfig' +require 'optparse' + +# http://www.ctan.org/tex-archive/macros/texinfo/texinfo/intl/config.charset +# Fri, 30 May 2003 00:09:00 GMT' + +OS = RbConfig::CONFIG["target_os"] +SHELL = RbConfig::CONFIG['SHELL'] + +class Hash::Ordered < Hash + def [](key) + val = super and val.last + end + def []=(key, val) + ary = fetch(key) {return super(key, [self.size, key, val])} and + ary << val + end + def sort + values.sort.collect {|i, *rest| rest} + end + def each(&block) + sort.each(&block) + end +end + +def charset_alias(config_charset, mapfile, target = OS) + map = Hash::Ordered.new + comments = [] + open(config_charset) do |input| + input.find {|line| /^case "\$os" in/ =~ line} or break + input.find {|line| + /^\s*([-\w\*]+(?:\s*\|\s*[-\w\*]+)*)(?=\))/ =~ line and + $&.split('|').any? {|pattern| File.fnmatch?(pattern.strip, target)} + } or break + input.find do |line| + case line + when /^\s*echo "(?:\$\w+\.)?([-\w*]+)\s+([-\w]+)"/ + sys, can = $1, $2 + can.downcase! + map[can] = sys + false + when /^\s*;;/ + true + else + false + end + end + end + case target + when /linux|-gnu/ + # map.delete('ascii') + when /cygwin|os2-emx/ + # get rid of tilde/yen problem. + map['shift_jis'] = 'cp932' + end + st = Hash.new(0) + map = map.sort.collect do |can, *sys| + if sys.grep(/^en_us(?=.|$)/i) {break true} == true + noen = %r"^(?!en_us)\w+_\w+#{Regexp.new($')}$"i #" + sys.reject! {|s| noen =~ s} + end + sys = sys.first + st[sys] += 1 + [can, sys] + end + st.delete_if {|sys, i| i == 1}.empty? + st.keys.each {|sys| st[sys] = nil} + st.default = nil + writer = proc do |f| + f.puts("require 'iconv.so'") + f.puts + f.puts(comments) + f.puts("class Iconv") + i = 0 + map.each do |can, sys| + if s = st[sys] + sys = s + elsif st.key?(sys) + sys = (st[sys] = "sys#{i+=1}") + " = '#{sys}'.freeze" + else + sys = "'#{sys}'.freeze" + end + f.puts(" charset_map['#{can}'] = #{sys}") + end + f.puts("end") + end + if mapfile + open(mapfile, "w", &writer) + else + writer[STDOUT] + end +end + +target = OS +opt = nil +ARGV.options do |opt| + opt.banner << " config.status map.rb" + opt.on("--target OS") {|t| target = t} + opt.parse! and (1..2) === ARGV.size +end or abort opt.to_s +charset_alias(ARGV[0], ARGV[1], target) diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/depend b/lib/ruby-1.9.1-rc1/ext/iconv/depend new file mode 100644 index 0000000..ac55559 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/depend @@ -0,0 +1,2 @@ +iconv.o: iconv.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h \ + $(hdrdir)/st.h $(hdrdir)/intern.h $(hdrdir)/encoding.h diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/extconf.rb b/lib/ruby-1.9.1-rc1/ext/iconv/extconf.rb new file mode 100644 index 0000000..9632bf4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/extconf.rb @@ -0,0 +1,53 @@ +require 'mkmf' + +dir_config("iconv") + +conf = File.exist?(File.join($srcdir, "config.charset")) +conf = with_config("config-charset", enable_config("config-charset", conf)) + +if have_func("iconv", "iconv.h") or + have_library("iconv", "iconv", "iconv.h") + if checking_for("const of iconv() 2nd argument") do + create_tmpsrc(cpp_include("iconv.h") + "---> iconv(cd,0,0,0,0) <---") + src = xpopen(cpp_command("")) {|f|f.read} + if !(func = src[/^--->\s*(\w+).*\s*<---/, 1]) + Logging::message "iconv function name not found" + false + elsif !(second = src[%r"\b#{func}\s*\(.*?,(.*?),.*?\)\s*;"m, 1]) + Logging::message "prototype for #{func}() not found" + false + else + Logging::message $&+"\n" + /\bconst\b/ =~ second + end + end + $defs.push('-DICONV_INPTR_CONST') + end + have_func("iconvlist", "iconv.h") + have_func("__iconv_free_list", "iconv.h") + if conf + prefix = '$(srcdir)' + prefix = $nmake ? "{#{prefix}}" : "#{prefix}/" + if $extout + wrapper = "$(RUBYARCHDIR)/iconv.rb" + else + wrapper = "./iconv.rb" + $INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]] + end + if String === conf + require 'uri' + scheme = URI.parse(conf).scheme + else + conf = "$(srcdir)/config.charset" + end + $cleanfiles << wrapper + end + create_makefile("iconv") + if conf + open("Makefile", "a") do |mf| + mf.print("\nall: #{wrapper}\n\n#{wrapper}: #{prefix}charset_alias.rb") + mf.print(" ", conf) unless scheme + mf.print("\n\t$(RUBY) $(srcdir)/charset_alias.rb #{conf} $@\n") + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/iconv.c b/lib/ruby-1.9.1-rc1/ext/iconv/iconv.c new file mode 100644 index 0000000..7fc373b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/iconv.c @@ -0,0 +1,1203 @@ +/* -*- mode:c; c-file-style:"ruby" -*- */ +/********************************************************************** + + iconv.c - + + $Author: nobu $ + created at: Wed Dec 1 20:28:09 JST 1999 + + All the files in this distribution are covered under the Ruby's + license (see the file COPYING). + + Documentation by Yukihiro Matsumoto and Gavin Sinclair. + +**********************************************************************/ + +#include "ruby/ruby.h" +#include +#include +#include +#include "ruby/st.h" +#include "ruby/encoding.h" + +/* + * Document-class: Iconv + * + * == Summary + * + * Ruby extension for charset conversion. + * + * == Abstract + * + * Iconv is a wrapper class for the UNIX 95 iconv() function family, + * which translates string between various encoding systems. + * + * See Open Group's on-line documents for more details. + * * iconv.h: http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.h.html + * * iconv_open(): http://www.opengroup.org/onlinepubs/007908799/xsh/iconv_open.html + * * iconv(): http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html + * * iconv_close(): http://www.opengroup.org/onlinepubs/007908799/xsh/iconv_close.html + * + * Which coding systems are available is platform-dependent. + * + * == Examples + * + * 1. Simple conversion between two charsets. + * + * converted_text = Iconv.conv('iso-8859-15', 'utf-8', text) + * + * 2. Instantiate a new Iconv and use method Iconv#iconv. + * + * cd = Iconv.new(to, from) + * begin + * input.each { |s| output << cd.iconv(s) } + * output << cd.iconv(nil) # Don't forget this! + * ensure + * cd.close + * end + * + * 3. Invoke Iconv.open with a block. + * + * Iconv.open(to, from) do |cd| + * input.each { |s| output << cd.iconv(s) } + * output << cd.iconv(nil) + * end + * + * 4. Shorthand for (3). + * + * Iconv.iconv(to, from, *input.to_a) + * + * == Attentions + * + * Even if some extentions of implementation dependent are useful, + * DON'T USE those extentions in libraries and scripts to widely distribute. + * If you want to use those feature, use String#encode. + */ + +/* Invalid value for iconv_t is -1 but 0 for VALUE, I hope VALUE is + big enough to keep iconv_t */ +#define VALUE2ICONV(v) ((iconv_t)((VALUE)(v) ^ -1)) +#define ICONV2VALUE(c) ((VALUE)(c) ^ -1) + +struct iconv_env_t +{ + iconv_t cd; + int argc; + VALUE *argv; + VALUE ret; + int toidx; + VALUE (*append)_((VALUE, VALUE)); +}; + +struct rb_iconv_opt_t +{ + VALUE transliterate; + VALUE discard_ilseq; +}; + +static ID id_transliterate, id_discard_ilseq; + +static VALUE rb_eIconvInvalidEncoding; +static VALUE rb_eIconvFailure; +static VALUE rb_eIconvIllegalSeq; +static VALUE rb_eIconvInvalidChar; +static VALUE rb_eIconvOutOfRange; +static VALUE rb_eIconvBrokenLibrary; + +static ID rb_success, rb_failed; +static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg)); +static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed)); +static VALUE iconv_failure_success _((VALUE self)); +static VALUE iconv_failure_failed _((VALUE self)); + +static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt, int *idx)); +static void iconv_dfree _((void *cd)); +static VALUE iconv_free _((VALUE cd)); +static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)); +static VALUE rb_str_derive _((VALUE str, const char* ptr, int len)); +static VALUE iconv_convert _((iconv_t cd, VALUE str, long start, long length, int toidx, + struct iconv_env_t* env)); +static VALUE iconv_s_allocate _((VALUE klass)); +static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self)); +static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self)); +static VALUE iconv_s_convert _((struct iconv_env_t* env)); +static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self)); +static VALUE iconv_init_state _((VALUE cd)); +static VALUE iconv_finish _((VALUE self)); +static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self)); +static VALUE iconv_conv _((int argc, VALUE *argv, VALUE self)); + +static VALUE charset_map; + +/* + * Document-method: charset_map + * call-seq: Iconv.charset_map + * + * Returns the map from canonical name to system dependent name. + */ +static VALUE +charset_map_get(void) +{ + return charset_map; +} + +static VALUE +strip_glibc_option(VALUE *code) +{ + VALUE val = StringValue(*code); + const char *ptr = RSTRING_PTR(val), *pend = RSTRING_END(val); + const char *slash = memchr(ptr, '/', pend - ptr); + + if (slash && slash < pend - 1 && slash[1] == '/') { + VALUE opt = rb_str_subseq(val, slash - ptr, pend - slash); + val = rb_str_subseq(val, 0, slash - ptr); + *code = val; + return opt; + } + return 0; +} + +static char * +map_charset(VALUE *code) +{ + VALUE val = StringValue(*code); + + if (RHASH_SIZE(charset_map)) { + VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0); + StringValuePtr(key); + if (st_lookup(RHASH_TBL(charset_map), key, &val)) { + *code = val; + } + } + return StringValuePtr(*code); +} + +static iconv_t +iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt, int *idx) +{ + VALUE toopt = strip_glibc_option(&to); + VALUE fromopt = strip_glibc_option(&from); + VALUE toenc = 0, fromenc = 0; + const char* tocode = map_charset(&to); + const char* fromcode = map_charset(&from); + iconv_t cd; + int retry = 0; + + *idx = rb_enc_find_index(tocode); + + if (toopt) { + toenc = rb_str_plus(to, toopt); + tocode = RSTRING_PTR(toenc); + } + if (fromopt) { + fromenc = rb_str_plus(from, fromopt); + fromcode = RSTRING_PTR(fromenc); + } + while ((cd = iconv_open(tocode, fromcode)) == (iconv_t)-1) { + int inval = 0; + switch (errno) { + case EMFILE: + case ENFILE: + case ENOMEM: + if (!retry++) { + rb_gc(); + continue; + } + break; + case EINVAL: + retry = 0; + inval = 1; + if (toenc) { + tocode = RSTRING_PTR(to); + rb_str_resize(toenc, 0); + toenc = 0; + continue; + } + if (fromenc) { + fromcode = RSTRING_PTR(from); + rb_str_resize(fromenc, 0); + fromenc = 0; + continue; + } + break; + } + { + const char *s = inval ? "invalid encoding " : "iconv"; + volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING_LEN(to) + + RSTRING_LEN(from) + 8); + + sprintf(RSTRING_PTR(msg), "%s(\"%s\", \"%s\")", + s, RSTRING_PTR(to), RSTRING_PTR(from)); + s = RSTRING_PTR(msg); + rb_str_set_len(msg, strlen(s)); + if (!inval) rb_sys_fail(s); + iconv_fail(rb_eIconvInvalidEncoding, + Qnil, rb_ary_new3(2, to, from), NULL, s); + } + } + + if (toopt || fromopt) { + if (toopt && fromopt && RTEST(rb_str_equal(toopt, fromopt))) { + fromopt = 0; + } + if (toopt && fromopt) { + rb_warning("encoding option isn't portable: %s, %s", + RSTRING_PTR(toopt) + 2, RSTRING_PTR(fromopt) + 2); + } + else { + rb_warning("encoding option isn't portable: %s", + (toopt ? RSTRING_PTR(toopt) : RSTRING_PTR(fromopt)) + 2); + } + } + + if (opt) { +#ifdef ICONV_SET_TRANSLITERATE + if (opt->transliterate != Qundef) { + int flag = RTEST(opt->transliterate); + rb_warning("encoding option isn't portable: transliterate"); + if (iconvctl(cd, ICONV_SET_TRANSLITERATE, (void *)&flag)) + rb_sys_fail("ICONV_SET_TRANSLITERATE"); + } +#endif +#ifdef ICONV_SET_DISCARD_ILSEQ + if (opt->discard_ilseq != Qundef) { + int flag = RTEST(opt->discard_ilseq); + rb_warning("encoding option isn't portable: discard_ilseq"); + if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&flag)) + rb_sys_fail("ICONV_SET_DISCARD_ILSEQ"); + } +#endif + } + + return cd; +} + +static void +iconv_dfree(void *cd) +{ + iconv_close(VALUE2ICONV(cd)); +} + +#define ICONV_FREE iconv_dfree + +static VALUE +iconv_free(VALUE cd) +{ + if (cd && iconv_close(VALUE2ICONV(cd)) == -1) + rb_sys_fail("iconv_close"); + return Qnil; +} + +static VALUE +check_iconv(VALUE obj) +{ + Check_Type(obj, T_DATA); + if (RDATA(obj)->dfree != ICONV_FREE) { + rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj))); + } + return (VALUE)DATA_PTR(obj); +} + +static VALUE +iconv_try(iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen) +{ +#ifdef ICONV_INPTR_CONST +#define ICONV_INPTR_CAST +#else +#define ICONV_INPTR_CAST (char **) +#endif + size_t ret; + + errno = 0; + ret = iconv(cd, ICONV_INPTR_CAST inptr, inlen, outptr, outlen); + if (ret == (size_t)-1) { + if (!*inlen) + return Qfalse; + switch (errno) { + case E2BIG: + /* try the left in next loop */ + break; + case EILSEQ: + return rb_eIconvIllegalSeq; + case EINVAL: + return rb_eIconvInvalidChar; + case 0: + return rb_eIconvBrokenLibrary; + default: + rb_sys_fail("iconv"); + } + } + else if (*inlen > 0) { + /* something goes wrong */ + return rb_eIconvIllegalSeq; + } + else if (ret) { + return Qnil; /* conversion */ + } + return Qfalse; +} + +#define FAILED_MAXLEN 16 + +static VALUE +iconv_failure_initialize(VALUE error, VALUE mesg, VALUE success, VALUE failed) +{ + rb_call_super(1, &mesg); + rb_ivar_set(error, rb_success, success); + rb_ivar_set(error, rb_failed, failed); + return error; +} + +static VALUE +iconv_fail(VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg) +{ + VALUE args[3]; + + if (mesg && *mesg) { + args[0] = rb_str_new2(mesg); + } + else if (TYPE(failed) != T_STRING || RSTRING_LEN(failed) < FAILED_MAXLEN) { + args[0] = rb_inspect(failed); + } + else { + args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN)); + rb_str_cat2(args[0], "..."); + } + args[1] = success; + args[2] = failed; + if (env) { + args[1] = env->append(rb_obj_dup(env->ret), success); + if (env->argc > 0) { + *(env->argv) = failed; + args[2] = rb_ary_new4(env->argc, env->argv); + } + } + error = rb_class_new_instance(3, args, error); + if (!rb_block_given_p()) rb_exc_raise(error); + rb_set_errinfo(error); + return rb_yield(failed); +} + +static VALUE +rb_str_derive(VALUE str, const char* ptr, int len) +{ + VALUE ret; + + if (NIL_P(str)) + return rb_str_new(ptr, len); + if (RSTRING_PTR(str) + RSTRING_LEN(str) == ptr + len) + ret = rb_str_subseq(str, ptr - RSTRING_PTR(str), len); + else + ret = rb_str_new(ptr, len); + OBJ_INFECT(ret, str); + return ret; +} + +static VALUE +iconv_convert(iconv_t cd, VALUE str, long start, long length, int toidx, struct iconv_env_t* env) +{ + VALUE ret = Qfalse; + VALUE error = Qfalse; + VALUE rescue; + const char *inptr, *instart; + size_t inlen; + /* I believe ONE CHARACTER never exceed this. */ + char buffer[BUFSIZ]; + char *outptr; + size_t outlen; + + if (cd == (iconv_t)-1) + rb_raise(rb_eArgError, "closed iconv"); + + if (NIL_P(str)) { + /* Reset output pointer or something. */ + inptr = ""; + inlen = 0; + outptr = buffer; + outlen = sizeof(buffer); + error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen); + if (RTEST(error)) { + unsigned int i; + rescue = iconv_fail(error, Qnil, Qnil, env, 0); + if (TYPE(rescue) == T_ARRAY) { + str = RARRAY_LEN(rescue) > 0 ? RARRAY_PTR(rescue)[0] : Qnil; + } + if (FIXNUM_P(str) && (i = FIX2INT(str)) <= 0xff) { + char c = i; + str = rb_str_new(&c, 1); + } + else if (!NIL_P(str)) { + StringValue(str); + } + } + + inptr = NULL; + length = 0; + } + else { + int slen; + + StringValue(str); + slen = RSTRING_LEN(str); + inptr = RSTRING_PTR(str); + + inptr += start; + if (length < 0 || length > start + slen) + length = slen - start; + } + instart = inptr; + inlen = length; + + do { + char errmsg[50]; + const char *tmpstart = inptr; + outptr = buffer; + outlen = sizeof(buffer); + + errmsg[0] = 0; + error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen); + + if (0 <= outlen && outlen <= sizeof(buffer)) { + outlen = sizeof(buffer) - outlen; + if (NIL_P(error) || /* something converted */ + outlen > inptr - tmpstart || /* input can't contain output */ + (outlen < inptr - tmpstart && inlen > 0) || /* something skipped */ + memcmp(buffer, tmpstart, outlen)) /* something differs */ + { + if (NIL_P(str)) { + ret = rb_str_new(buffer, outlen); + if (toidx >= 0) rb_enc_associate_index(ret, toidx); + } + else { + if (ret) { + ret = rb_str_buf_cat(ret, instart, tmpstart - instart); + } + else { + ret = rb_str_new(instart, tmpstart - instart); + if (toidx >= 0) rb_enc_associate_index(ret, toidx); + OBJ_INFECT(ret, str); + } + ret = rb_str_buf_cat(ret, buffer, outlen); + instart = inptr; + } + } + else if (!inlen) { + inptr = tmpstart + outlen; + } + } + else { + /* Some iconv() have a bug, return *outlen out of range */ + sprintf(errmsg, "bug?(output length = %ld)", (long)(sizeof(buffer) - outlen)); + error = rb_eIconvOutOfRange; + } + + if (RTEST(error)) { + long len = 0; + + if (!ret) { + ret = rb_str_derive(str, instart, inptr - instart); + if (toidx >= 0) rb_enc_associate_index(ret, toidx); + } + else if (inptr > instart) { + rb_str_cat(ret, instart, inptr - instart); + } + str = rb_str_derive(str, inptr, inlen); + rescue = iconv_fail(error, ret, str, env, errmsg); + if (TYPE(rescue) == T_ARRAY) { + if ((len = RARRAY_LEN(rescue)) > 0) + rb_str_concat(ret, RARRAY_PTR(rescue)[0]); + if (len > 1 && !NIL_P(str = RARRAY_PTR(rescue)[1])) { + StringValue(str); + inlen = length = RSTRING_LEN(str); + instart = inptr = RSTRING_PTR(str); + continue; + } + } + else if (!NIL_P(rescue)) { + rb_str_concat(ret, rescue); + } + break; + } + } while (inlen > 0); + + if (!ret) { + ret = rb_str_derive(str, instart, inptr - instart); + if (toidx >= 0) rb_enc_associate_index(ret, toidx); + } + else if (inptr > instart) { + rb_str_cat(ret, instart, inptr - instart); + } + return ret; +} + +static VALUE +iconv_s_allocate(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0); +} + +static VALUE +get_iconv_opt_i(VALUE i, VALUE arg) +{ + struct rb_iconv_opt_t *opt = (struct rb_iconv_opt_t *)arg; + VALUE name, val; + + (void)opt; + i = rb_Array(i); + name = rb_ary_entry(i, 0); + val = rb_ary_entry(i, 1); + do { + if (SYMBOL_P(name)) { + ID id = SYM2ID(name); + if (id == id_transliterate) { +#ifdef ICONV_SET_TRANSLITERATE + opt->transliterate = val; +#else + rb_notimplement(); +#endif + break; + } + if (id == id_discard_ilseq) { +#ifdef ICONV_SET_DISCARD_ILSEQ + opt->discard_ilseq = val; +#else + rb_notimplement(); +#endif + break; + } + } + else { + const char *s = StringValueCStr(name); + if (strcmp(s, "transliterate") == 0) { +#ifdef ICONV_SET_TRANSLITERATE + opt->transliterate = val; +#else + rb_notimplement(); +#endif + break; + } + if (strcmp(s, "discard_ilseq") == 0) { +#ifdef ICONV_SET_DISCARD_ILSEQ + opt->discard_ilseq = val; +#else + rb_notimplement(); +#endif + break; + } + } + name = rb_inspect(name); + rb_raise(rb_eArgError, "unknown option - %s", StringValueCStr(name)); + } while (0); + return Qnil; +} + +static void +get_iconv_opt(struct rb_iconv_opt_t *opt, VALUE options) +{ + opt->transliterate = Qundef; + opt->discard_ilseq = Qundef; + if (!NIL_P(options)) { + rb_block_call(options, rb_intern("each"), 0, 0, get_iconv_opt_i, (VALUE)opt); + } +} + +#define iconv_ctl(self, func, val) (\ + iconvctl(VALUE2ICONV(check_iconv(self)), func, (void *)&(val)) ? \ + rb_sys_fail(#func) : (void)0) + +/* + * Document-method: new + * call-seq: Iconv.new(to, from, [options]) + * + * Creates new code converter from a coding-system designated with +from+ + * to another one designated with +to+. + * + * === Parameters + * + * +to+:: encoding name for destination + * +from+:: encoding name for source + * +options+:: options for converter + * + * === Exceptions + * + * TypeError:: if +to+ or +from+ aren't String + * InvalidEncoding:: if designated converter couldn't find out + * SystemCallError:: if iconv_open(3) fails + */ +static VALUE +iconv_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE to, from, options; + struct rb_iconv_opt_t opt; + int idx; + + rb_scan_args(argc, argv, "21", &to, &from, &options); + get_iconv_opt(&opt, options); + iconv_free(check_iconv(self)); + DATA_PTR(self) = NULL; + DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt, &idx)); + if (idx >= 0) ENCODING_SET(self, idx); + return self; +} + +/* + * Document-method: open + * call-seq: Iconv.open(to, from) { |iconv| ... } + * + * Equivalent to Iconv.new except that when it is called with a block, it + * yields with the new instance and closes it, and returns the result which + * returned from the block. + */ +static VALUE +iconv_s_open(int argc, VALUE *argv, VALUE self) +{ + VALUE to, from, options, cd; + struct rb_iconv_opt_t opt; + int idx; + + rb_scan_args(argc, argv, "21", &to, &from, &options); + get_iconv_opt(&opt, options); + cd = ICONV2VALUE(iconv_create(to, from, &opt, &idx)); + + self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd); + if (idx >= 0) ENCODING_SET(self, idx); + + if (rb_block_given_p()) { + return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self); + } + else { + return self; + } +} + +static VALUE +iconv_s_convert(struct iconv_env_t* env) +{ + VALUE last = 0; + + for (; env->argc > 0; --env->argc, ++env->argv) { + VALUE s = iconv_convert(env->cd, last = *(env->argv), + 0, -1, env->toidx, env); + env->append(env->ret, s); + } + + if (!NIL_P(last)) { + VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env->toidx, env); + if (RSTRING_LEN(s)) + env->append(env->ret, s); + } + + return env->ret; +} + +/* + * Document-method: Iconv::iconv + * call-seq: Iconv.iconv(to, from, *strs) + * + * Shorthand for + * Iconv.open(to, from) { |cd| + * (strs + [nil]).collect { |s| cd.iconv(s) } + * } + * + * === Parameters + * + * to, from:: see Iconv.new + * strs:: strings to be converted + * + * === Exceptions + * + * Exceptions thrown by Iconv.new, Iconv.open and Iconv#iconv. + */ +static VALUE +iconv_s_iconv(int argc, VALUE *argv, VALUE self) +{ + struct iconv_env_t arg; + + if (argc < 2) /* needs `to' and `from' arguments at least */ + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, 2); + + arg.argc = argc -= 2; + arg.argv = argv + 2; + arg.append = rb_ary_push; + arg.ret = rb_ary_new2(argc); + arg.cd = iconv_create(argv[0], argv[1], NULL, &arg.toidx); + return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd)); +} + +/* + * Document-method: Iconv::conv + * call-seq: Iconv.conv(to, from, str) + * + * Shorthand for + * Iconv.iconv(to, from, str).join + * See Iconv.iconv. + */ +static VALUE +iconv_s_conv(VALUE self, VALUE to, VALUE from, VALUE str) +{ + struct iconv_env_t arg; + + arg.argc = 1; + arg.argv = &str; + arg.append = rb_str_append; + arg.ret = rb_str_new(0, 0); + arg.cd = iconv_create(to, from, NULL, &arg.toidx); + return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd)); +} + +/* + * Document-method: list + * call-seq: Iconv.list {|*aliases| ... } + * + * Iterates each alias sets. + */ + +#ifdef HAVE_ICONVLIST +struct iconv_name_list +{ + unsigned int namescount; + const char *const *names; + VALUE array; +}; + +static VALUE +list_iconv_i(VALUE ptr) +{ + struct iconv_name_list *p = (struct iconv_name_list *)ptr; + unsigned int i, namescount = p->namescount; + const char *const *names = p->names; + VALUE ary = rb_ary_new2(namescount); + + for (i = 0; i < namescount; i++) { + rb_ary_push(ary, rb_str_new2(names[i])); + } + if (p->array) { + return rb_ary_push(p->array, ary); + } + return rb_yield(ary); +} + +static int +list_iconv(unsigned int namescount, const char *const *names, void *data) +{ + int *state = data; + struct iconv_name_list list; + + list.namescount = namescount; + list.names = names; + list.array = ((VALUE *)data)[1]; + rb_protect(list_iconv_i, (VALUE)&list, state); + return *state; +} +#endif + +static VALUE +iconv_s_list(void) +{ +#ifdef HAVE_ICONVLIST + int state; + VALUE args[2]; + + args[1] = rb_block_given_p() ? 0 : rb_ary_new(); + iconvlist(list_iconv, args); + state = *(int *)args; + if (state) rb_jump_tag(state); + if (args[1]) return args[1]; +#elif defined(HAVE___ICONV_FREE_LIST) + char **list; + size_t sz, i; + VALUE ary; + + if (__iconv_get_list(&list, &sz)) return Qnil; + + ary = rb_ary_new2(sz); + for (i = 0; i < sz; i++) { + rb_ary_push(ary, rb_str_new2(list[i])); + } + __iconv_free_list(list, sz); + + if (!rb_block_given_p()) + return ary; + for (i = 0; i < RARRAY_LEN(ary); i++) { + rb_yield(RARRAY_PTR(ary)[i]); + } +#else + rb_notimplement(); +#endif + return Qnil; +} + +/* + * Document-method: close + * + * Finishes conversion. + * + * After calling this, calling Iconv#iconv will cause an exception, but + * multiple calls of #close are guaranteed to end successfully. + * + * Returns a string containing the byte sequence to change the output buffer to + * its initial shift state. + */ +static VALUE +iconv_init_state(VALUE self) +{ + iconv_t cd = VALUE2ICONV((VALUE)DATA_PTR(self)); + DATA_PTR(self) = NULL; + return iconv_convert(cd, Qnil, 0, 0, ENCODING_GET(self), NULL); +} + +static VALUE +iconv_finish(VALUE self) +{ + VALUE cd = check_iconv(self); + + if (!cd) return Qnil; + return rb_ensure(iconv_init_state, self, iconv_free, cd); +} + +/* + * Document-method: Iconv#iconv + * call-seq: iconv(str, start=0, length=-1) + * + * Converts string and returns the result. + * * If +str+ is a String, converts str[start, length] and returns the converted string. + * * If +str+ is +nil+, places converter itself into initial shift state and + * just returns a string containing the byte sequence to change the output + * buffer to its initial shift state. + * * Otherwise, raises an exception. + * + * === Parameters + * + * str:: string to be converted, or nil + * start:: starting offset + * length:: conversion length; nil or -1 means whole the string from start + * + * === Exceptions + * + * * IconvIllegalSequence + * * IconvInvalidCharacter + * * IconvOutOfRange + * + * === Examples + * + * See the Iconv documentation. + */ +static VALUE +iconv_iconv(int argc, VALUE *argv, VALUE self) +{ + VALUE str, n1, n2; + VALUE cd = check_iconv(self); + long start = 0, length = 0, slen = 0; + + rb_scan_args(argc, argv, "12", &str, &n1, &n2); + if (!NIL_P(str)) { + VALUE n = rb_str_length(StringValue(str)); + slen = NUM2LONG(n); + } + if (argc != 2 || !RTEST(rb_range_beg_len(n1, &start, &length, slen, 0))) { + if (NIL_P(n1) || ((start = NUM2LONG(n1)) < 0 ? (start += slen) >= 0 : start < slen)) { + length = NIL_P(n2) ? -1 : NUM2LONG(n2); + } + } + if (start > 0 || length > 0) { + rb_encoding *enc = rb_enc_get(str); + const char *s = RSTRING_PTR(str), *e = s + RSTRING_LEN(str); + const char *ps = s; + if (start > 0) { + start = (ps = rb_enc_nth(s, e, start, enc)) - s; + } + if (length > 0) { + length = rb_enc_nth(ps, e, length, enc) - ps; + } + } + + return iconv_convert(VALUE2ICONV(cd), str, start, length, ENCODING_GET(self), NULL); +} + +/* + * Document-method: conv + * call-seq: conv(str...) + * + * Equivalent to + * + * iconv(nil, str..., nil).join + */ +static VALUE +iconv_conv(int argc, VALUE *argv, VALUE self) +{ + iconv_t cd = VALUE2ICONV(check_iconv(self)); + VALUE str, s; + int toidx = ENCODING_GET(self); + + str = iconv_convert(cd, Qnil, 0, 0, toidx, NULL); + if (argc > 0) { + do { + s = iconv_convert(cd, *argv++, 0, -1, toidx, NULL); + if (RSTRING_LEN(s)) + rb_str_buf_append(str, s); + } while (--argc); + s = iconv_convert(cd, Qnil, 0, 0, toidx, NULL); + if (RSTRING_LEN(s)) + rb_str_buf_append(str, s); + } + + return str; +} + +/* + * Document-method: trivial? + * call-seq: trivial? + * + * Returns trivial flag. + */ +static VALUE +iconv_trivialp(VALUE self) +{ +#ifdef ICONV_TRIVIALP + int trivial = 0; + iconv_ctl(self, ICONV_TRIVIALP, trivial); + if (trivial) return Qtrue; +#else + rb_notimplement(); +#endif + return Qfalse; +} + +/* + * Document-method: transliterate? + * call-seq: transliterate? + * + * Returns transliterate flag. + */ +static VALUE +iconv_get_transliterate(VALUE self) +{ +#ifdef ICONV_GET_TRANSLITERATE + int trans = 0; + iconv_ctl(self, ICONV_GET_TRANSLITERATE, trans); + if (trans) return Qtrue; +#else + rb_notimplement(); +#endif + return Qfalse; +} + +/* + * Document-method: transliterate= + * call-seq: cd.transliterate = flag + * + * Sets transliterate flag. + */ +static VALUE +iconv_set_transliterate(VALUE self, VALUE transliterate) +{ +#ifdef ICONV_SET_TRANSLITERATE + int trans = RTEST(transliterate); + iconv_ctl(self, ICONV_SET_TRANSLITERATE, trans); +#else + rb_notimplement(); +#endif + return self; +} + +/* + * Document-method: discard_ilseq? + * call-seq: discard_ilseq? + * + * Returns discard_ilseq flag. + */ +static VALUE +iconv_get_discard_ilseq(VALUE self) +{ +#ifdef ICONV_GET_DISCARD_ILSEQ + int dis = 0; + iconv_ctl(self, ICONV_GET_DISCARD_ILSEQ, dis); + if (dis) return Qtrue; +#else + rb_notimplement(); +#endif + return Qfalse; +} + +/* + * Document-method: discard_ilseq= + * call-seq: cd.discard_ilseq = flag + * + * Sets discard_ilseq flag. + */ +static VALUE +iconv_set_discard_ilseq(VALUE self, VALUE discard_ilseq) +{ +#ifdef ICONV_SET_DISCARD_ILSEQ + int dis = RTEST(discard_ilseq); + iconv_ctl(self, ICONV_SET_DISCARD_ILSEQ, dis); +#else + rb_notimplement(); +#endif + return self; +} + +/* + * Document-method: ctlmethods + * call-seq: Iconv.ctlmethods => array + * + * Returns available iconvctl() method list. + */ +static VALUE +iconv_s_ctlmethods(VALUE klass) +{ + VALUE ary = rb_ary_new(); +#ifdef ICONV_TRIVIALP + rb_ary_push(ary, ID2SYM(rb_intern("trivial?"))); +#endif +#ifdef ICONV_GET_TRANSLITERATE + rb_ary_push(ary, ID2SYM(rb_intern("transliterate?"))); +#endif +#ifdef ICONV_SET_TRANSLITERATE + rb_ary_push(ary, ID2SYM(rb_intern("transliterate="))); +#endif +#ifdef ICONV_GET_DISCARD_ILSEQ + rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq?"))); +#endif +#ifdef ICONV_SET_DISCARD_ILSEQ + rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq="))); +#endif + return ary; +} + +/* + * Document-class: Iconv::Failure + * + * Base attributes for Iconv exceptions. + */ + +/* + * Document-method: success + * call-seq: success + * + * Returns string(s) translated successfully until the exception occurred. + * * In the case of failure occurred within Iconv.iconv, returned + * value is an array of strings translated successfully preceding + * failure and the last element is string on the way. + */ +static VALUE +iconv_failure_success(VALUE self) +{ + return rb_attr_get(self, rb_success); +} + +/* + * Document-method: failed + * call-seq: failed + * + * Returns substring of the original string passed to Iconv that starts at the + * character caused the exception. + */ +static VALUE +iconv_failure_failed(VALUE self) +{ + return rb_attr_get(self, rb_failed); +} + +/* + * Document-method: inspect + * call-seq: inspect + * + * Returns inspected string like as: #<_class_: _success_, _failed_> + */ +static VALUE +iconv_failure_inspect(VALUE self) +{ + const char *cname = rb_class2name(CLASS_OF(self)); + VALUE success = rb_attr_get(self, rb_success); + VALUE failed = rb_attr_get(self, rb_failed); + VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname); + str = rb_str_buf_cat(str, ": ", 2); + str = rb_str_buf_append(str, rb_inspect(success)); + str = rb_str_buf_cat(str, ", ", 2); + str = rb_str_buf_append(str, rb_inspect(failed)); + return rb_str_buf_cat(str, ">", 1); +} + +/* + * Document-class: Iconv::InvalidEncoding + * + * Requested coding-system is not available on this system. + */ + +/* + * Document-class: Iconv::IllegalSequence + * + * Input conversion stopped due to an input byte that does not belong to + * the input codeset, or the output codeset does not contain the + * character. + */ + +/* + * Document-class: Iconv::InvalidCharacter + * + * Input conversion stopped due to an incomplete character or shift + * sequence at the end of the input buffer. + */ + +/* + * Document-class: Iconv::OutOfRange + * + * Iconv library internal error. Must not occur. + */ + +/* + * Document-class: Iconv::BrokenLibrary + * + * Detected a bug of underlying iconv(3) libray. + * * returns an error without setting errno properly + */ + +void +Init_iconv(void) +{ + VALUE rb_cIconv = rb_define_class("Iconv", rb_cData); + + rb_define_alloc_func(rb_cIconv, iconv_s_allocate); + rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, -1); + rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1); + rb_define_singleton_method(rb_cIconv, "conv", iconv_s_conv, 3); + rb_define_singleton_method(rb_cIconv, "list", iconv_s_list, 0); + rb_define_singleton_method(rb_cIconv, "ctlmethods", iconv_s_ctlmethods, 0); + rb_define_method(rb_cIconv, "initialize", iconv_initialize, -1); + rb_define_method(rb_cIconv, "close", iconv_finish, 0); + rb_define_method(rb_cIconv, "iconv", iconv_iconv, -1); + rb_define_method(rb_cIconv, "conv", iconv_conv, -1); + rb_define_method(rb_cIconv, "trivial?", iconv_trivialp, 0); + rb_define_method(rb_cIconv, "transliterate?", iconv_get_transliterate, 0); + rb_define_method(rb_cIconv, "transliterate=", iconv_set_transliterate, 1); + rb_define_method(rb_cIconv, "discard_ilseq?", iconv_get_discard_ilseq, 0); + rb_define_method(rb_cIconv, "discard_ilseq=", iconv_set_discard_ilseq, 1); + + rb_eIconvFailure = rb_define_module_under(rb_cIconv, "Failure"); + rb_define_method(rb_eIconvFailure, "initialize", iconv_failure_initialize, 3); + rb_define_method(rb_eIconvFailure, "success", iconv_failure_success, 0); + rb_define_method(rb_eIconvFailure, "failed", iconv_failure_failed, 0); + rb_define_method(rb_eIconvFailure, "inspect", iconv_failure_inspect, 0); + + rb_eIconvInvalidEncoding = rb_define_class_under(rb_cIconv, "InvalidEncoding", rb_eArgError); + rb_eIconvIllegalSeq = rb_define_class_under(rb_cIconv, "IllegalSequence", rb_eArgError); + rb_eIconvInvalidChar = rb_define_class_under(rb_cIconv, "InvalidCharacter", rb_eArgError); + rb_eIconvOutOfRange = rb_define_class_under(rb_cIconv, "OutOfRange", rb_eRuntimeError); + rb_eIconvBrokenLibrary = rb_define_class_under(rb_cIconv, "BrokenLibrary", rb_eRuntimeError); + rb_include_module(rb_eIconvInvalidEncoding, rb_eIconvFailure); + rb_include_module(rb_eIconvIllegalSeq, rb_eIconvFailure); + rb_include_module(rb_eIconvInvalidChar, rb_eIconvFailure); + rb_include_module(rb_eIconvOutOfRange, rb_eIconvFailure); + rb_include_module(rb_eIconvBrokenLibrary, rb_eIconvFailure); + + rb_success = rb_intern("success"); + rb_failed = rb_intern("failed"); + id_transliterate = rb_intern("transliterate"); + id_discard_ilseq = rb_intern("discard_ilseq"); + + rb_gc_register_address(&charset_map); + charset_map = rb_hash_new(); + rb_define_singleton_method(rb_cIconv, "charset_map", charset_map_get, 0); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/iconv/mkwrapper.rb b/lib/ruby-1.9.1-rc1/ext/iconv/mkwrapper.rb new file mode 100644 index 0000000..3471850 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/iconv/mkwrapper.rb @@ -0,0 +1,53 @@ +#! /usr/bin/ruby +require 'rbconfig' +require 'optparse' + +# http://www.ctan.org/tex-archive/macros/texinfo/texinfo/intl/config.charset +# Fri, 30 May 2003 00:09:00 GMT' + +HEADER = <") + have_header(ioctl_h = "sys/ioctl.h") or ioctl_h = nil + fionread = %w[sys/ioctl.h sys/filio.h sys/socket.h].find do |h| + have_macro("FIONREAD", [h, ioctl_h].compact) + end + if fionread + $defs << "-DFIONREAD_HEADER=\"<#{fionread}>\"" + create_makefile(target) + end +else + if have_func("rb_w32_ioctlsocket", "ruby.h") + have_func("rb_w32_is_socket", "ruby.h") + create_makefile(target) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/io/wait/lib/nonblock.rb b/lib/ruby-1.9.1-rc1/ext/io/wait/lib/nonblock.rb new file mode 100644 index 0000000..2103fdf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/io/wait/lib/nonblock.rb @@ -0,0 +1,23 @@ +require "fcntl" +class IO + def nonblock? + (fcntl(Fcntl::F_GETFL) & File::NONBLOCK) != 0 + end + + def nonblock=(nb) + f = fcntl(Fcntl::F_GETFL) + if nb + f |= File::NONBLOCK + else + f &= ~File::NONBLOCK + end + fcntl(Fcntl::F_SETFL, f) + end + + def nonblock(nb = true) + nb, self.nonblock = nonblock?, nb + yield + ensure + self.nonblock = nb + end +end if defined?(Fcntl::F_GETFL) diff --git a/lib/ruby-1.9.1-rc1/ext/io/wait/wait.c b/lib/ruby-1.9.1-rc1/ext/io/wait/wait.c new file mode 100644 index 0000000..e82b05c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/io/wait/wait.c @@ -0,0 +1,141 @@ +/********************************************************************** + + io/wait.c - + + $Author: nobu $ + created at: Tue Aug 28 09:08:06 JST 2001 + + All the files in this distribution are covered under the Ruby's + license (see the file COPYING). + +**********************************************************************/ + +#include "ruby.h" +#include "ruby/io.h" + +#include +#if defined(HAVE_SYS_IOCTL_H) +#include +#endif +#if defined(FIONREAD_HEADER) +#include FIONREAD_HEADER +#endif + +#ifdef HAVE_RB_W32_IOCTLSOCKET +#define ioctl ioctlsocket +#define ioctl_arg u_long +#define ioctl_arg2num(i) ULONG2NUM(i) +#else +#define ioctl_arg int +#define ioctl_arg2num(i) INT2NUM(i) +#endif + +#ifdef HAVE_RB_W32_IS_SOCKET +#define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fd) +#else +#define FIONREAD_POSSIBLE_P(fd) ((void)(fd),Qtrue) +#endif + +static VALUE io_ready_p _((VALUE io)); +static VALUE io_wait _((int argc, VALUE *argv, VALUE io)); +void Init_wait _((void)); + +EXTERN struct timeval rb_time_interval _((VALUE time)); + +/* + * call-seq: + * io.ready? -> true, false or nil + * + * Returns non-nil if input available without blocking, or nil. + */ + +static VALUE +io_ready_p(VALUE io) +{ + rb_io_t *fptr; + ioctl_arg n; + + GetOpenFile(io, fptr); + rb_io_check_readable(fptr); + if (rb_io_read_pending(fptr)) return Qtrue; + if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse; + if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0); + if (n > 0) return ioctl_arg2num(n); + return Qnil; +} + +struct wait_readable_arg { + rb_fdset_t fds; + struct timeval *timeout; +}; + +#ifdef HAVE_RB_FD_INIT +static VALUE +wait_readable(VALUE p) +{ + struct wait_readable_arg *arg = (struct wait_readable_arg *)p; + rb_fdset_t *fds = &arg->fds; + + return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout); +} +#endif + +/* + * call-seq: + * io.wait -> IO, true, false or nil + * io.wait(timeout) -> IO, true, false or nil + * + * Waits until input is available or times out and returns self or nil when + * EOF is reached. + */ + +static VALUE +io_wait(int argc, VALUE *argv, VALUE io) +{ + rb_io_t *fptr; + struct wait_readable_arg arg; + int fd, i; + ioctl_arg n; + VALUE timeout; + struct timeval timerec; + + GetOpenFile(io, fptr); + rb_io_check_readable(fptr); + rb_scan_args(argc, argv, "01", &timeout); + if (NIL_P(timeout)) { + arg.timeout = 0; + } + else { + timerec = rb_time_interval(timeout); + arg.timeout = &timerec; + } + + if (rb_io_read_pending(fptr)) return Qtrue; + if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse; + fd = fptr->fd; + rb_fd_init(&arg.fds); + rb_fd_set(fd, &arg.fds); +#ifdef HAVE_RB_FD_INIT + i = (int)rb_ensure(wait_readable, (VALUE)&arg, + (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds); +#else + i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout); +#endif + if (i < 0) + rb_sys_fail(0); + rb_io_check_closed(fptr); + if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0); + if (n > 0) return io; + return Qnil; +} + +/* + * IO wait methods + */ + +void +Init_wait() +{ + rb_define_method(rb_cIO, "ready?", io_ready_p, 0); + rb_define_method(rb_cIO, "wait", io_wait, -1); +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/generator/extconf.rb b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/extconf.rb new file mode 100644 index 0000000..5574151 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/extconf.rb @@ -0,0 +1,9 @@ +require 'mkmf' +require 'rbconfig' + +if CONFIG['CC'] =~ /gcc/ + $CFLAGS += ' -Wall' + #$CFLAGS += ' -O0 -ggdb' +end + +create_makefile 'json/ext/generator' diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/generator/generator.c b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/generator.c new file mode 100644 index 0000000..1f48d3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/generator.c @@ -0,0 +1,874 @@ +#include +#include "ruby.h" +#include "unicode.h" +#include + +#define check_max_nesting(state, depth) do { \ + long current_nesting = 1 + depth; \ + if (state->max_nesting != 0 && current_nesting > state->max_nesting) \ + rb_raise(eNestingError, "nesting of %ld is too deep", current_nesting); \ +} while (0); + +static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject, + mHash, mArray, mInteger, mFloat, mString, mString_Extend, + mTrueClass, mFalseClass, mNilClass, eGeneratorError, + eCircularDatastructure, eNestingError; + +static ID i_to_s, i_to_json, i_new, i_indent, i_space, i_space_before, + i_object_nl, i_array_nl, i_check_circular, i_max_nesting, + i_allow_nan, i_pack, i_unpack, i_create_id, i_extend; + +typedef struct JSON_Generator_StateStruct { + VALUE indent; + VALUE space; + VALUE space_before; + VALUE object_nl; + VALUE array_nl; + int check_circular; + VALUE seen; + VALUE memo; + VALUE depth; + long max_nesting; + int flag; + int allow_nan; +} JSON_Generator_State; + +#define GET_STATE(self) \ + JSON_Generator_State *state; \ + Data_Get_Struct(self, JSON_Generator_State, state); + +/* + * Document-module: JSON::Ext::Generator + * + * This is the JSON generator implemented as a C extension. It can be + * configured to be used by setting + * + * JSON.generator = JSON::Ext::Generator + * + * with the method generator= in JSON. + * + */ + +static int hash_to_json_state_i(VALUE key, VALUE value, VALUE Vstate) +{ + VALUE json, buf, Vdepth; + GET_STATE(Vstate); + buf = state->memo; + Vdepth = state->depth; + + if (key == Qundef) return ST_CONTINUE; + if (state->flag) { + state->flag = 0; + rb_str_buf_cat2(buf, ","); + if (RSTRING_LEN(state->object_nl)) rb_str_buf_append(buf, state->object_nl); + } + if (RSTRING_LEN(state->object_nl)) { + rb_str_buf_append(buf, rb_str_times(state->indent, Vdepth)); + } + json = rb_funcall(rb_funcall(key, i_to_s, 0), i_to_json, 2, Vstate, Vdepth); + Check_Type(json, T_STRING); + rb_str_buf_append(buf, json); + OBJ_INFECT(buf, json); + if (RSTRING_LEN(state->space_before)) { + rb_str_buf_append(buf, state->space_before); + } + rb_str_buf_cat2(buf, ":"); + if (RSTRING_LEN(state->space)) rb_str_buf_append(buf, state->space); + json = rb_funcall(value, i_to_json, 2, Vstate, Vdepth); + Check_Type(json, T_STRING); + state->flag = 1; + rb_str_buf_append(buf, json); + OBJ_INFECT(buf, json); + state->depth = Vdepth; + state->memo = buf; + return ST_CONTINUE; +} + +inline static VALUE mHash_json_transfrom(VALUE self, VALUE Vstate, VALUE Vdepth) { + long depth, len = RHASH_SIZE(self); + VALUE result; + GET_STATE(Vstate); + + depth = 1 + FIX2LONG(Vdepth); + result = rb_str_buf_new(len); + state->memo = result; + state->depth = LONG2FIX(depth); + state->flag = 0; + rb_str_buf_cat2(result, "{"); + if (RSTRING_LEN(state->object_nl)) rb_str_buf_append(result, state->object_nl); + rb_hash_foreach(self, hash_to_json_state_i, Vstate); + if (RSTRING_LEN(state->object_nl)) rb_str_buf_append(result, state->object_nl); + if (RSTRING_LEN(state->object_nl)) { + rb_str_buf_append(result, rb_str_times(state->indent, Vdepth)); + } + rb_str_buf_cat2(result, "}"); + return result; +} + +static int hash_to_json_i(VALUE key, VALUE value, VALUE buf) +{ + VALUE tmp; + + if (key == Qundef) return ST_CONTINUE; + if (RSTRING_LEN(buf) > 1) rb_str_buf_cat2(buf, ","); + tmp = rb_funcall(rb_funcall(key, i_to_s, 0), i_to_json, 0); + Check_Type(tmp, T_STRING); + rb_str_buf_append(buf, tmp); + OBJ_INFECT(buf, tmp); + rb_str_buf_cat2(buf, ":"); + tmp = rb_funcall(value, i_to_json, 0); + Check_Type(tmp, T_STRING); + rb_str_buf_append(buf, tmp); + OBJ_INFECT(buf, tmp); + + return ST_CONTINUE; +} + +/* + * call-seq: to_json(state = nil, depth = 0) + * + * Returns a JSON string containing a JSON object, that is unparsed from + * this Hash instance. + * _state_ is a JSON::State object, that can also be used to configure the + * produced JSON string output further. + * _depth_ is used to find out nesting depth, to indent accordingly. + */ +static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self) +{ + VALUE Vstate, Vdepth, result; + long depth; + + rb_scan_args(argc, argv, "02", &Vstate, &Vdepth); + depth = NIL_P(Vdepth) ? 0 : FIX2LONG(Vdepth); + if (NIL_P(Vstate)) { + long len = RHASH_SIZE(self); + result = rb_str_buf_new(len); + rb_str_buf_cat2(result, "{"); + rb_hash_foreach(self, hash_to_json_i, result); + rb_str_buf_cat2(result, "}"); + } else { + GET_STATE(Vstate); + check_max_nesting(state, depth); + if (state->check_circular) { + VALUE self_id = rb_obj_id(self); + if (RTEST(rb_hash_aref(state->seen, self_id))) { + rb_raise(eCircularDatastructure, + "circular data structures not supported!"); + } + rb_hash_aset(state->seen, self_id, Qtrue); + result = mHash_json_transfrom(self, Vstate, LONG2FIX(depth)); + rb_hash_delete(state->seen, self_id); + } else { + result = mHash_json_transfrom(self, Vstate, LONG2FIX(depth)); + } + } + OBJ_INFECT(result, self); + return result; +} + +inline static VALUE mArray_json_transfrom(VALUE self, VALUE Vstate, VALUE Vdepth) { + long i, len = RARRAY_LEN(self); + VALUE shift, result; + long depth = NIL_P(Vdepth) ? 0 : FIX2LONG(Vdepth); + VALUE delim = rb_str_new2(","); + GET_STATE(Vstate); + + check_max_nesting(state, depth); + if (state->check_circular) { + VALUE self_id = rb_obj_id(self); + rb_hash_aset(state->seen, self_id, Qtrue); + result = rb_str_buf_new(len); + if (RSTRING_LEN(state->array_nl)) rb_str_append(delim, state->array_nl); + shift = rb_str_times(state->indent, LONG2FIX(depth + 1)); + + rb_str_buf_cat2(result, "["); + OBJ_INFECT(result, self); + rb_str_buf_append(result, state->array_nl); + for (i = 0; i < len; i++) { + VALUE element = RARRAY_PTR(self)[i]; + if (RTEST(rb_hash_aref(state->seen, rb_obj_id(element)))) { + rb_raise(eCircularDatastructure, + "circular data structures not supported!"); + } + OBJ_INFECT(result, element); + if (i > 0) rb_str_buf_append(result, delim); + rb_str_buf_append(result, shift); + element = rb_funcall(element, i_to_json, 2, Vstate, LONG2FIX(depth + 1)); + Check_Type(element, T_STRING); + rb_str_buf_append(result, element); + } + if (RSTRING_LEN(state->array_nl)) { + rb_str_buf_append(result, state->array_nl); + rb_str_buf_append(result, rb_str_times(state->indent, LONG2FIX(depth))); + } + rb_str_buf_cat2(result, "]"); + rb_hash_delete(state->seen, self_id); + } else { + result = rb_str_buf_new(len); + OBJ_INFECT(result, self); + if (RSTRING_LEN(state->array_nl)) rb_str_append(delim, state->array_nl); + shift = rb_str_times(state->indent, LONG2FIX(depth + 1)); + + rb_str_buf_cat2(result, "["); + rb_str_buf_append(result, state->array_nl); + for (i = 0; i < len; i++) { + VALUE element = RARRAY_PTR(self)[i]; + OBJ_INFECT(result, element); + if (i > 0) rb_str_buf_append(result, delim); + rb_str_buf_append(result, shift); + element = rb_funcall(element, i_to_json, 2, Vstate, LONG2FIX(depth + 1)); + Check_Type(element, T_STRING); + rb_str_buf_append(result, element); + } + rb_str_buf_append(result, state->array_nl); + if (RSTRING_LEN(state->array_nl)) { + rb_str_buf_append(result, rb_str_times(state->indent, LONG2FIX(depth))); + } + rb_str_buf_cat2(result, "]"); + } + return result; +} + +/* + * call-seq: to_json(state = nil, depth = 0) + * + * Returns a JSON string containing a JSON array, that is unparsed from + * this Array instance. + * _state_ is a JSON::State object, that can also be used to configure the + * produced JSON string output further. + * _depth_ is used to find out nesting depth, to indent accordingly. + */ +static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self) { + VALUE Vstate, Vdepth, result; + + rb_scan_args(argc, argv, "02", &Vstate, &Vdepth); + if (NIL_P(Vstate)) { + long i, len = RARRAY_LEN(self); + result = rb_str_buf_new(2 + 2 * len); + rb_str_buf_cat2(result, "["); + OBJ_INFECT(result, self); + for (i = 0; i < len; i++) { + VALUE element = RARRAY_PTR(self)[i]; + OBJ_INFECT(result, element); + if (i > 0) rb_str_buf_cat2(result, ","); + element = rb_funcall(element, i_to_json, 0); + Check_Type(element, T_STRING); + rb_str_buf_append(result, element); + } + rb_str_buf_cat2(result, "]"); + } else { + result = mArray_json_transfrom(self, Vstate, Vdepth); + } + OBJ_INFECT(result, self); + return result; +} + +/* + * call-seq: to_json(*) + * + * Returns a JSON string representation for this Integer number. + */ +static VALUE mInteger_to_json(int argc, VALUE *argv, VALUE self) +{ + return rb_funcall(self, i_to_s, 0); +} + +/* + * call-seq: to_json(*) + * + * Returns a JSON string representation for this Float number. + */ +static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self) +{ + JSON_Generator_State *state = NULL; + VALUE Vstate, rest, tmp; + double value = RFLOAT_VALUE(self); + rb_scan_args(argc, argv, "01*", &Vstate, &rest); + if (!NIL_P(Vstate)) Data_Get_Struct(Vstate, JSON_Generator_State, state); + if (isinf(value)) { + if (!state || state->allow_nan) { + return rb_funcall(self, i_to_s, 0); + } else { + tmp = rb_funcall(self, i_to_s, 0); + rb_raise(eGeneratorError, "%u: %s not allowed in JSON", __LINE__, StringValueCStr(tmp)); + } + } else if (isnan(value)) { + if (!state || state->allow_nan) { + return rb_funcall(self, i_to_s, 0); + } else { + tmp = rb_funcall(self, i_to_s, 0); + rb_raise(eGeneratorError, "%u: %s not allowed in JSON", __LINE__, StringValueCStr(tmp)); + } + } else { + return rb_funcall(self, i_to_s, 0); + } +} + +/* + * call-seq: String.included(modul) + * + * Extends _modul_ with the String::Extend module. + */ +static VALUE mString_included_s(VALUE self, VALUE modul) { + return rb_funcall(modul, i_extend, 1, mString_Extend); +} + +/* + * call-seq: to_json(*) + * + * This string should be encoded with UTF-8 A call to this method + * returns a JSON string encoded with UTF16 big endian characters as + * \u????. + */ +static VALUE mString_to_json(int argc, VALUE *argv, VALUE self) +{ + VALUE result = rb_str_buf_new(RSTRING_LEN(self)); + rb_str_buf_cat2(result, "\""); + JSON_convert_UTF8_to_JSON(result, self, strictConversion); + rb_str_buf_cat2(result, "\""); + return result; +} + +/* + * call-seq: to_json_raw_object() + * + * This method creates a raw object hash, that can be nested into + * other data structures and will be unparsed as a raw string. This + * method should be used, if you want to convert raw strings to JSON + * instead of UTF-8 strings, e. g. binary data. + */ +static VALUE mString_to_json_raw_object(VALUE self) { + VALUE ary; + VALUE result = rb_hash_new(); + rb_hash_aset(result, rb_funcall(mJSON, i_create_id, 0), rb_class_name(rb_obj_class(self))); + ary = rb_funcall(self, i_unpack, 1, rb_str_new2("C*")); + rb_hash_aset(result, rb_str_new2("raw"), ary); + return result; +} + +/* + * call-seq: to_json_raw(*args) + * + * This method creates a JSON text from the result of a call to + * to_json_raw_object of this String. + */ +static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self) { + VALUE obj = mString_to_json_raw_object(self); + Check_Type(obj, T_HASH); + return mHash_to_json(argc, argv, obj); +} + +/* + * call-seq: json_create(o) + * + * Raw Strings are JSON Objects (the raw bytes are stored in an array for the + * key "raw"). The Ruby String can be created by this module method. + */ +static VALUE mString_Extend_json_create(VALUE self, VALUE o) { + VALUE ary; + Check_Type(o, T_HASH); + ary = rb_hash_aref(o, rb_str_new2("raw")); + return rb_funcall(ary, i_pack, 1, rb_str_new2("C*")); +} + +/* + * call-seq: to_json(state = nil, depth = 0) + * + * Returns a JSON string for true: 'true'. + */ +static VALUE mTrueClass_to_json(int argc, VALUE *argv, VALUE self) +{ + return rb_str_new2("true"); +} + +/* + * call-seq: to_json(state = nil, depth = 0) + * + * Returns a JSON string for false: 'false'. + */ +static VALUE mFalseClass_to_json(int argc, VALUE *argv, VALUE self) +{ + return rb_str_new2("false"); +} + +/* + * call-seq: to_json(state = nil, depth = 0) + * + */ +static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self) +{ + return rb_str_new2("null"); +} + +/* + * call-seq: to_json(*) + * + * Converts this object to a string (calling #to_s), converts + * it to a JSON string, and returns the result. This is a fallback, if no + * special method #to_json was defined for some object. + */ +static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self) +{ + VALUE string = rb_funcall(self, i_to_s, 0); + Check_Type(string, T_STRING); + return mString_to_json(argc, argv, string); +} + +/* + * Document-class: JSON::Ext::Generator::State + * + * This class is used to create State instances, that are use to hold data + * while generating a JSON text from a a Ruby data structure. + */ + +static void State_mark(JSON_Generator_State *state) +{ + rb_gc_mark_maybe(state->indent); + rb_gc_mark_maybe(state->space); + rb_gc_mark_maybe(state->space_before); + rb_gc_mark_maybe(state->object_nl); + rb_gc_mark_maybe(state->array_nl); + rb_gc_mark_maybe(state->seen); + rb_gc_mark_maybe(state->memo); + rb_gc_mark_maybe(state->depth); +} + +static JSON_Generator_State *State_allocate() +{ + JSON_Generator_State *state = ALLOC(JSON_Generator_State); + return state; +} + +static VALUE cState_s_allocate(VALUE klass) +{ + JSON_Generator_State *state = State_allocate(); + return Data_Wrap_Struct(klass, State_mark, -1, state); +} + +/* + * call-seq: configure(opts) + * + * Configure this State instance with the Hash _opts_, and return + * itself. + */ +static inline VALUE cState_configure(VALUE self, VALUE opts) +{ + VALUE tmp; + GET_STATE(self); + tmp = rb_convert_type(opts, T_HASH, "Hash", "to_hash"); + if (NIL_P(tmp)) tmp = rb_convert_type(opts, T_HASH, "Hash", "to_h"); + if (NIL_P(tmp)) { + rb_raise(rb_eArgError, "opts has to be hash like or convertable into a hash"); + } + opts = tmp; + tmp = rb_hash_aref(opts, ID2SYM(i_indent)); + if (RTEST(tmp)) { + Check_Type(tmp, T_STRING); + state->indent = tmp; + } + tmp = rb_hash_aref(opts, ID2SYM(i_space)); + if (RTEST(tmp)) { + Check_Type(tmp, T_STRING); + state->space = tmp; + } + tmp = rb_hash_aref(opts, ID2SYM(i_space_before)); + if (RTEST(tmp)) { + Check_Type(tmp, T_STRING); + state->space_before = tmp; + } + tmp = rb_hash_aref(opts, ID2SYM(i_array_nl)); + if (RTEST(tmp)) { + Check_Type(tmp, T_STRING); + state->array_nl = tmp; + } + tmp = rb_hash_aref(opts, ID2SYM(i_object_nl)); + if (RTEST(tmp)) { + Check_Type(tmp, T_STRING); + state->object_nl = tmp; + } + tmp = ID2SYM(i_check_circular); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + tmp = rb_hash_aref(opts, ID2SYM(i_check_circular)); + state->check_circular = RTEST(tmp); + } else { + state->check_circular = 1; + } + tmp = ID2SYM(i_max_nesting); + state->max_nesting = 19; + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE max_nesting = rb_hash_aref(opts, tmp); + if (RTEST(max_nesting)) { + Check_Type(max_nesting, T_FIXNUM); + state->max_nesting = FIX2LONG(max_nesting); + } else { + state->max_nesting = 0; + } + } + tmp = rb_hash_aref(opts, ID2SYM(i_allow_nan)); + state->allow_nan = RTEST(tmp); + return self; +} + +/* + * call-seq: to_h + * + * Returns the configuration instance variables as a hash, that can be + * passed to the configure method. + */ +static VALUE cState_to_h(VALUE self) +{ + VALUE result = rb_hash_new(); + GET_STATE(self); + rb_hash_aset(result, ID2SYM(i_indent), state->indent); + rb_hash_aset(result, ID2SYM(i_space), state->space); + rb_hash_aset(result, ID2SYM(i_space_before), state->space_before); + rb_hash_aset(result, ID2SYM(i_object_nl), state->object_nl); + rb_hash_aset(result, ID2SYM(i_array_nl), state->array_nl); + rb_hash_aset(result, ID2SYM(i_check_circular), state->check_circular ? Qtrue : Qfalse); + rb_hash_aset(result, ID2SYM(i_allow_nan), state->allow_nan ? Qtrue : Qfalse); + rb_hash_aset(result, ID2SYM(i_max_nesting), LONG2FIX(state->max_nesting)); + return result; +} + + +/* + * call-seq: new(opts = {}) + * + * Instantiates a new State object, configured by _opts_. + * + * _opts_ can have the following keys: + * + * * *indent*: a string used to indent levels (default: ''), + * * *space*: a string that is put after, a : or , delimiter (default: ''), + * * *space_before*: a string that is put before a : pair delimiter (default: ''), + * * *object_nl*: a string that is put at the end of a JSON object (default: ''), + * * *array_nl*: a string that is put at the end of a JSON array (default: ''), + * * *check_circular*: true if checking for circular data structures + * should be done, false (the default) otherwise. + * * *allow_nan*: true if NaN, Infinity, and -Infinity should be + * generated, otherwise an exception is thrown, if these values are + * encountered. This options defaults to false. + */ +static VALUE cState_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE opts; + GET_STATE(self); + + rb_scan_args(argc, argv, "01", &opts); + state->indent = rb_str_new2(""); + state->space = rb_str_new2(""); + state->space_before = rb_str_new2(""); + state->array_nl = rb_str_new2(""); + state->object_nl = rb_str_new2(""); + if (NIL_P(opts)) { + state->check_circular = 1; + state->allow_nan = 0; + state->max_nesting = 19; + } else { + cState_configure(self, opts); + } + state->seen = rb_hash_new(); + state->memo = Qnil; + state->depth = INT2FIX(0); + return self; +} + +/* + * call-seq: from_state(opts) + * + * Creates a State object from _opts_, which ought to be Hash to create a + * new State instance configured by _opts_, something else to create an + * unconfigured instance. If _opts_ is a State object, it is just returned. + */ +static VALUE cState_from_state_s(VALUE self, VALUE opts) +{ + if (rb_obj_is_kind_of(opts, self)) { + return opts; + } else if (rb_obj_is_kind_of(opts, rb_cHash)) { + return rb_funcall(self, i_new, 1, opts); + } else { + return rb_funcall(self, i_new, 0); + } +} + +/* + * call-seq: indent() + * + * This string is used to indent levels in the JSON text. + */ +static VALUE cState_indent(VALUE self) +{ + GET_STATE(self); + return state->indent; +} + +/* + * call-seq: indent=(indent) + * + * This string is used to indent levels in the JSON text. + */ +static VALUE cState_indent_set(VALUE self, VALUE indent) +{ + GET_STATE(self); + Check_Type(indent, T_STRING); + return state->indent = indent; +} + +/* + * call-seq: space() + * + * This string is used to insert a space between the tokens in a JSON + * string. + */ +static VALUE cState_space(VALUE self) +{ + GET_STATE(self); + return state->space; +} + +/* + * call-seq: space=(space) + * + * This string is used to insert a space between the tokens in a JSON + * string. + */ +static VALUE cState_space_set(VALUE self, VALUE space) +{ + GET_STATE(self); + Check_Type(space, T_STRING); + return state->space = space; +} + +/* + * call-seq: space_before() + * + * This string is used to insert a space before the ':' in JSON objects. + */ +static VALUE cState_space_before(VALUE self) +{ + GET_STATE(self); + return state->space_before; +} + +/* + * call-seq: space_before=(space_before) + * + * This string is used to insert a space before the ':' in JSON objects. + */ +static VALUE cState_space_before_set(VALUE self, VALUE space_before) +{ + GET_STATE(self); + Check_Type(space_before, T_STRING); + return state->space_before = space_before; +} + +/* + * call-seq: object_nl() + * + * This string is put at the end of a line that holds a JSON object (or + * Hash). + */ +static VALUE cState_object_nl(VALUE self) +{ + GET_STATE(self); + return state->object_nl; +} + +/* + * call-seq: object_nl=(object_nl) + * + * This string is put at the end of a line that holds a JSON object (or + * Hash). + */ +static VALUE cState_object_nl_set(VALUE self, VALUE object_nl) +{ + GET_STATE(self); + Check_Type(object_nl, T_STRING); + return state->object_nl = object_nl; +} + +/* + * call-seq: array_nl() + * + * This string is put at the end of a line that holds a JSON array. + */ +static VALUE cState_array_nl(VALUE self) +{ + GET_STATE(self); + return state->array_nl; +} + +/* + * call-seq: array_nl=(array_nl) + * + * This string is put at the end of a line that holds a JSON array. + */ +static VALUE cState_array_nl_set(VALUE self, VALUE array_nl) +{ + GET_STATE(self); + Check_Type(array_nl, T_STRING); + return state->array_nl = array_nl; +} + +/* + * call-seq: check_circular? + * + * Returns true, if circular data structures should be checked, + * otherwise returns false. + */ +static VALUE cState_check_circular_p(VALUE self) +{ + GET_STATE(self); + return state->check_circular ? Qtrue : Qfalse; +} + +/* + * call-seq: max_nesting + * + * This integer returns the maximum level of data structure nesting in + * the generated JSON, max_nesting = 0 if no maximum is checked. + */ +static VALUE cState_max_nesting(VALUE self) +{ + GET_STATE(self); + return LONG2FIX(state->max_nesting); +} + +/* + * call-seq: max_nesting=(depth) + * + * This sets the maximum level of data structure nesting in the generated JSON + * to the integer depth, max_nesting = 0 if no maximum should be checked. + */ +static VALUE cState_max_nesting_set(VALUE self, VALUE depth) +{ + GET_STATE(self); + Check_Type(depth, T_FIXNUM); + state->max_nesting = FIX2LONG(depth); + return Qnil; +} + +/* + * call-seq: allow_nan? + * + * Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise + * returns false. + */ +static VALUE cState_allow_nan_p(VALUE self) +{ + GET_STATE(self); + return state->allow_nan ? Qtrue : Qfalse; +} + +/* + * call-seq: seen?(object) + * + * Returns _true_, if _object_ was already seen during this generating run. + */ +static VALUE cState_seen_p(VALUE self, VALUE object) +{ + GET_STATE(self); + return rb_hash_aref(state->seen, rb_obj_id(object)); +} + +/* + * call-seq: remember(object) + * + * Remember _object_, to find out if it was already encountered (if a cyclic + * data structure is rendered). + */ +static VALUE cState_remember(VALUE self, VALUE object) +{ + GET_STATE(self); + return rb_hash_aset(state->seen, rb_obj_id(object), Qtrue); +} + +/* + * call-seq: forget(object) + * + * Forget _object_ for this generating run. + */ +static VALUE cState_forget(VALUE self, VALUE object) +{ + GET_STATE(self); + return rb_hash_delete(state->seen, rb_obj_id(object)); +} + +/* + * + */ +void Init_generator() +{ + rb_require("json/common"); + mJSON = rb_define_module("JSON"); + mExt = rb_define_module_under(mJSON, "Ext"); + mGenerator = rb_define_module_under(mExt, "Generator"); + eGeneratorError = rb_path2class("JSON::GeneratorError"); + eCircularDatastructure = rb_path2class("JSON::CircularDatastructure"); + eNestingError = rb_path2class("JSON::NestingError"); + cState = rb_define_class_under(mGenerator, "State", rb_cObject); + rb_define_alloc_func(cState, cState_s_allocate); + rb_define_singleton_method(cState, "from_state", cState_from_state_s, 1); + rb_define_method(cState, "initialize", cState_initialize, -1); + + rb_define_method(cState, "indent", cState_indent, 0); + rb_define_method(cState, "indent=", cState_indent_set, 1); + rb_define_method(cState, "space", cState_space, 0); + rb_define_method(cState, "space=", cState_space_set, 1); + rb_define_method(cState, "space_before", cState_space_before, 0); + rb_define_method(cState, "space_before=", cState_space_before_set, 1); + rb_define_method(cState, "object_nl", cState_object_nl, 0); + rb_define_method(cState, "object_nl=", cState_object_nl_set, 1); + rb_define_method(cState, "array_nl", cState_array_nl, 0); + rb_define_method(cState, "array_nl=", cState_array_nl_set, 1); + rb_define_method(cState, "check_circular?", cState_check_circular_p, 0); + rb_define_method(cState, "max_nesting", cState_max_nesting, 0); + rb_define_method(cState, "max_nesting=", cState_max_nesting_set, 1); + rb_define_method(cState, "allow_nan?", cState_allow_nan_p, 0); + rb_define_method(cState, "seen?", cState_seen_p, 1); + rb_define_method(cState, "remember", cState_remember, 1); + rb_define_method(cState, "forget", cState_forget, 1); + rb_define_method(cState, "configure", cState_configure, 1); + rb_define_method(cState, "to_h", cState_to_h, 0); + + mGeneratorMethods = rb_define_module_under(mGenerator, "GeneratorMethods"); + mObject = rb_define_module_under(mGeneratorMethods, "Object"); + rb_define_method(mObject, "to_json", mObject_to_json, -1); + mHash = rb_define_module_under(mGeneratorMethods, "Hash"); + rb_define_method(mHash, "to_json", mHash_to_json, -1); + mArray = rb_define_module_under(mGeneratorMethods, "Array"); + rb_define_method(mArray, "to_json", mArray_to_json, -1); + mInteger = rb_define_module_under(mGeneratorMethods, "Integer"); + rb_define_method(mInteger, "to_json", mInteger_to_json, -1); + mFloat = rb_define_module_under(mGeneratorMethods, "Float"); + rb_define_method(mFloat, "to_json", mFloat_to_json, -1); + mString = rb_define_module_under(mGeneratorMethods, "String"); + rb_define_singleton_method(mString, "included", mString_included_s, 1); + rb_define_method(mString, "to_json", mString_to_json, -1); + rb_define_method(mString, "to_json_raw", mString_to_json_raw, -1); + rb_define_method(mString, "to_json_raw_object", mString_to_json_raw_object, 0); + mString_Extend = rb_define_module_under(mString, "Extend"); + rb_define_method(mString_Extend, "json_create", mString_Extend_json_create, 1); + mTrueClass = rb_define_module_under(mGeneratorMethods, "TrueClass"); + rb_define_method(mTrueClass, "to_json", mTrueClass_to_json, -1); + mFalseClass = rb_define_module_under(mGeneratorMethods, "FalseClass"); + rb_define_method(mFalseClass, "to_json", mFalseClass_to_json, -1); + mNilClass = rb_define_module_under(mGeneratorMethods, "NilClass"); + rb_define_method(mNilClass, "to_json", mNilClass_to_json, -1); + + i_to_s = rb_intern("to_s"); + i_to_json = rb_intern("to_json"); + i_new = rb_intern("new"); + i_indent = rb_intern("indent"); + i_space = rb_intern("space"); + i_space_before = rb_intern("space_before"); + i_object_nl = rb_intern("object_nl"); + i_array_nl = rb_intern("array_nl"); + i_check_circular = rb_intern("check_circular"); + i_max_nesting = rb_intern("max_nesting"); + i_allow_nan = rb_intern("allow_nan"); + i_pack = rb_intern("pack"); + i_unpack = rb_intern("unpack"); + i_create_id = rb_intern("create_id"); + i_extend = rb_intern("extend"); +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.c b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.c new file mode 100644 index 0000000..76834ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.c @@ -0,0 +1,182 @@ +#include "unicode.h" + +#define unicode_escape(buffer, character) \ + snprintf(buf, 7, "\\u%04x", (unsigned int) (character)); \ + rb_str_buf_cat(buffer, buf, 6); + +/* + * Copyright 2001-2004 Unicode, Inc. + * + * Disclaimer + * + * This source code is provided as is by Unicode, Inc. No claims are + * made as to fitness for any particular purpose. No warranties of any + * kind are expressed or implied. The recipient agrees to determine + * applicability of information provided. If this file has been + * purchased on magnetic or optical media from Unicode, Inc., the + * sole remedy for any claim will be exchange of defective media + * within 90 days of receipt. + * + * Limitations on Rights to Redistribute This Code + * + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form + * for internal or external distribution as long as this notice + * remains attached. + */ + +/* + * Index into the table below with the first byte of a UTF-8 sequence to + * get the number of trailing bytes that are supposed to follow it. + * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is + * left as-is for anyone who may want to do such conversion, which was + * allowed in earlier algorithms. + */ +static const char trailingBytesForUTF8[256] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 +}; + +/* + * Magic values subtracted from a buffer value during UTF8 conversion. + * This table contains as many values as there might be trailing bytes + * in a UTF-8 sequence. + */ +static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, + 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; + +/* + * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed + * into the first byte, depending on how many bytes follow. There are + * as many entries in this table as there are UTF-8 sequence types. + * (I.e., one byte sequence, two byte... etc.). Remember that sequencs + * for *legal* UTF-8 will be 4 or fewer bytes total. + */ +static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + +/* + * Utility routine to tell whether a sequence of bytes is legal UTF-8. + * This must be called with the length pre-determined by the first byte. + * If not calling this from ConvertUTF8to*, then the length can be set by: + * length = trailingBytesForUTF8[*source]+1; + * and the sequence is illegal right away if there aren't that many bytes + * available. + * If presented with a length > 4, this returns 0. The Unicode + * definition of UTF-8 goes up to 4-byte sequences. + */ + +inline static unsigned char isLegalUTF8(const UTF8 *source, int length) +{ + UTF8 a; + const UTF8 *srcptr = source+length; + switch (length) { + default: return 0; + /* Everything else falls through when "1"... */ + case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; + case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; + case 2: if ((a = (*--srcptr)) > 0xBF) return 0; + + switch (*source) { + /* no fall-through in this inner switch */ + case 0xE0: if (a < 0xA0) return 0; break; + case 0xED: if (a > 0x9F) return 0; break; + case 0xF0: if (a < 0x90) return 0; break; + case 0xF4: if (a > 0x8F) return 0; break; + default: if (a < 0x80) return 0; + } + + case 1: if (*source >= 0x80 && *source < 0xC2) return 0; + } + if (*source > 0xF4) return 0; + return 1; +} + +void JSON_convert_UTF8_to_JSON(VALUE buffer, VALUE string, ConversionFlags flags) +{ + char buf[7]; + const UTF8* source = (UTF8 *) RSTRING_PTR(string); + const UTF8* sourceEnd = source + RSTRING_LEN(string); + + while (source < sourceEnd) { + UTF32 ch = 0; + unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; + if (source + extraBytesToRead >= sourceEnd) { + rb_raise(rb_path2class("JSON::GeneratorError"), + "partial character in source, but hit end"); + } + if (!isLegalUTF8(source, extraBytesToRead+1)) { + rb_raise(rb_path2class("JSON::GeneratorError"), + "source sequence is illegal/malformed"); + } + /* + * The cases all fall through. See "Note A" below. + */ + switch (extraBytesToRead) { + case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + case 3: ch += *source++; ch <<= 6; + case 2: ch += *source++; ch <<= 6; + case 1: ch += *source++; ch <<= 6; + case 0: ch += *source++; + } + ch -= offsetsFromUTF8[extraBytesToRead]; + + if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { + if (flags == strictConversion) { + source -= (extraBytesToRead+1); /* return to the illegal value itself */ + rb_raise(rb_path2class("JSON::GeneratorError"), + "source sequence is illegal/malformed"); + } else { + unicode_escape(buffer, UNI_REPLACEMENT_CHAR); + } + } else { + /* normal case */ + if (ch == '"') { + rb_str_buf_cat2(buffer, "\\\""); + } else if (ch == '\\') { + rb_str_buf_cat2(buffer, "\\\\"); + } else if (ch == '/') { + rb_str_buf_cat2(buffer, "\\/"); + } else if (ch >= 0x20 && ch <= 0x7f) { + rb_str_buf_cat(buffer, (char *) source - 1, 1); + } else if (ch == '\n') { + rb_str_buf_cat2(buffer, "\\n"); + } else if (ch == '\r') { + rb_str_buf_cat2(buffer, "\\r"); + } else if (ch == '\t') { + rb_str_buf_cat2(buffer, "\\t"); + } else if (ch == '\f') { + rb_str_buf_cat2(buffer, "\\f"); + } else if (ch == '\b') { + rb_str_buf_cat2(buffer, "\\b"); + } else if (ch < 0x20) { + unicode_escape(buffer, (UTF16) ch); + } else { + unicode_escape(buffer, (UTF16) ch); + } + } + } else if (ch > UNI_MAX_UTF16) { + if (flags == strictConversion) { + source -= (extraBytesToRead+1); /* return to the start */ + rb_raise(rb_path2class("JSON::GeneratorError"), + "source sequence is illegal/malformed"); + } else { + unicode_escape(buffer, UNI_REPLACEMENT_CHAR); + } + } else { + /* target is a character in range 0xFFFF - 0x10FFFF. */ + ch -= halfBase; + unicode_escape(buffer, (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START)); + unicode_escape(buffer, (UTF16)((ch & halfMask) + UNI_SUR_LOW_START)); + } + } +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.h b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.h new file mode 100644 index 0000000..841474b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/generator/unicode.h @@ -0,0 +1,53 @@ +#include "ruby.h" + +#ifndef _GENERATOR_UNICODE_H_ +#define _GENERATOR_UNICODE_H_ + +typedef enum { + conversionOK = 0, /* conversion successful */ + sourceExhausted, /* partial character in source, but hit end */ + targetExhausted, /* insuff. room in target for conversion */ + sourceIllegal /* source sequence is illegal/malformed */ +} ConversionResult; + +typedef enum { + strictConversion = 0, + lenientConversion +} ConversionFlags; + +typedef unsigned long UTF32; /* at least 32 bits */ +typedef unsigned short UTF16; /* at least 16 bits */ +typedef unsigned char UTF8; /* typically 8 bits */ + +#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD +#define UNI_MAX_BMP (UTF32)0x0000FFFF +#define UNI_MAX_UTF16 (UTF32)0x0010FFFF +#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF +#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF + +#define UNI_SUR_HIGH_START (UTF32)0xD800 +#define UNI_SUR_HIGH_END (UTF32)0xDBFF +#define UNI_SUR_LOW_START (UTF32)0xDC00 +#define UNI_SUR_LOW_END (UTF32)0xDFFF + +static const int halfShift = 10; /* used for shifting by 10 bits */ + +static const UTF32 halfBase = 0x0010000UL; +static const UTF32 halfMask = 0x3FFUL; + +void JSON_convert_UTF8_to_JSON(VALUE buffer, VALUE string, ConversionFlags flags); + +#ifndef RARRAY_PTR +#define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr +#endif +#ifndef RARRAY_LEN +#define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len +#endif +#ifndef RSTRING_PTR +#define RSTRING_PTR(string) RSTRING(string)->ptr +#endif +#ifndef RSTRING_LEN +#define RSTRING_LEN(string) RSTRING(string)->len +#endif + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/parser/extconf.rb b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/extconf.rb new file mode 100644 index 0000000..b56c4e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/extconf.rb @@ -0,0 +1,9 @@ +require 'mkmf' +require 'rbconfig' + +if CONFIG['CC'] =~ /gcc/ + $CFLAGS += ' -Wall' + #$CFLAGS += ' -O0 -ggdb' +end + +create_makefile 'json/ext/parser' diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.c b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.c new file mode 100644 index 0000000..9de618d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.c @@ -0,0 +1,1758 @@ +#line 1 "parser.rl" +#include "ruby.h" +#include "ruby/encoding.h" +#include "unicode.h" + +#define EVIL 0x666 + +static VALUE mJSON, mExt, cParser, eParserError, eNestingError; +static VALUE CNaN, CInfinity, CMinusInfinity; + +static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions, + i_chr, i_max_nesting, i_allow_nan; + +#define MinusInfinity "-Infinity" + +typedef struct JSON_ParserStruct { + VALUE Vsource; + char *source; + long len; + char *memo; + VALUE create_id; + int max_nesting; + int current_nesting; + int allow_nan; +} JSON_Parser; + +static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result); + +#define GET_STRUCT \ + JSON_Parser *json; \ + Data_Get_Struct(self, JSON_Parser, json); + +#line 64 "parser.rl" + + + +#line 44 "parser.c" +static const int JSON_object_start = 1; +static const int JSON_object_first_final = 27; +static const int JSON_object_error = 0; + +static const int JSON_object_en_main = 1; + +#line 97 "parser.rl" + + +static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + VALUE last_name = Qnil; + + if (json->max_nesting && json->current_nesting > json->max_nesting) { + rb_raise(eNestingError, "nesting of %d is to deep", json->current_nesting); + } + + *result = rb_hash_new(); + + +#line 66 "parser.c" + { + cs = JSON_object_start; + } +#line 111 "parser.rl" + +#line 72 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + if ( (*p) == 123 ) + goto st2; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + switch( (*p) ) { + case 13: goto st2; + case 32: goto st2; + case 34: goto tr2; + case 47: goto st23; + case 125: goto tr4; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st2; + goto st0; +tr2: +#line 83 "parser.rl" + { + char *np = JSON_parse_string(json, p, pe, &last_name); + if (np == NULL) { p--; {p++; cs = 3; goto _out;} } else {p = (( np))-1;} + } + goto st3; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: +#line 110 "parser.c" + switch( (*p) ) { + case 13: goto st3; + case 32: goto st3; + case 47: goto st4; + case 58: goto st8; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st3; + goto st0; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + switch( (*p) ) { + case 42: goto st5; + case 47: goto st7; + } + goto st0; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + if ( (*p) == 42 ) + goto st6; + goto st5; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + switch( (*p) ) { + case 42: goto st6; + case 47: goto st3; + } + goto st5; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + if ( (*p) == 10 ) + goto st3; + goto st7; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + switch( (*p) ) { + case 13: goto st8; + case 32: goto st8; + case 34: goto tr11; + case 45: goto tr11; + case 47: goto st19; + case 73: goto tr11; + case 78: goto tr11; + case 91: goto tr11; + case 102: goto tr11; + case 110: goto tr11; + case 116: goto tr11; + case 123: goto tr11; + } + if ( (*p) > 10 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr11; + } else if ( (*p) >= 9 ) + goto st8; + goto st0; +tr11: +#line 72 "parser.rl" + { + VALUE v = Qnil; + char *np = JSON_parse_value(json, p, pe, &v); + if (np == NULL) { + p--; {p++; cs = 9; goto _out;} + } else { + rb_hash_aset(*result, last_name, v); + {p = (( np))-1;} + } + } + goto st9; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: +#line 193 "parser.c" + switch( (*p) ) { + case 13: goto st9; + case 32: goto st9; + case 44: goto st10; + case 47: goto st15; + case 125: goto tr4; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st9; + goto st0; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: + switch( (*p) ) { + case 13: goto st10; + case 32: goto st10; + case 34: goto tr2; + case 47: goto st11; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st10; + goto st0; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + switch( (*p) ) { + case 42: goto st12; + case 47: goto st14; + } + goto st0; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: + if ( (*p) == 42 ) + goto st13; + goto st12; +st13: + if ( ++p == pe ) + goto _test_eof13; +case 13: + switch( (*p) ) { + case 42: goto st13; + case 47: goto st10; + } + goto st12; +st14: + if ( ++p == pe ) + goto _test_eof14; +case 14: + if ( (*p) == 10 ) + goto st10; + goto st14; +st15: + if ( ++p == pe ) + goto _test_eof15; +case 15: + switch( (*p) ) { + case 42: goto st16; + case 47: goto st18; + } + goto st0; +st16: + if ( ++p == pe ) + goto _test_eof16; +case 16: + if ( (*p) == 42 ) + goto st17; + goto st16; +st17: + if ( ++p == pe ) + goto _test_eof17; +case 17: + switch( (*p) ) { + case 42: goto st17; + case 47: goto st9; + } + goto st16; +st18: + if ( ++p == pe ) + goto _test_eof18; +case 18: + if ( (*p) == 10 ) + goto st9; + goto st18; +tr4: +#line 88 "parser.rl" + { p--; {p++; cs = 27; goto _out;} } + goto st27; +st27: + if ( ++p == pe ) + goto _test_eof27; +case 27: +#line 289 "parser.c" + goto st0; +st19: + if ( ++p == pe ) + goto _test_eof19; +case 19: + switch( (*p) ) { + case 42: goto st20; + case 47: goto st22; + } + goto st0; +st20: + if ( ++p == pe ) + goto _test_eof20; +case 20: + if ( (*p) == 42 ) + goto st21; + goto st20; +st21: + if ( ++p == pe ) + goto _test_eof21; +case 21: + switch( (*p) ) { + case 42: goto st21; + case 47: goto st8; + } + goto st20; +st22: + if ( ++p == pe ) + goto _test_eof22; +case 22: + if ( (*p) == 10 ) + goto st8; + goto st22; +st23: + if ( ++p == pe ) + goto _test_eof23; +case 23: + switch( (*p) ) { + case 42: goto st24; + case 47: goto st26; + } + goto st0; +st24: + if ( ++p == pe ) + goto _test_eof24; +case 24: + if ( (*p) == 42 ) + goto st25; + goto st24; +st25: + if ( ++p == pe ) + goto _test_eof25; +case 25: + switch( (*p) ) { + case 42: goto st25; + case 47: goto st2; + } + goto st24; +st26: + if ( ++p == pe ) + goto _test_eof26; +case 26: + if ( (*p) == 10 ) + goto st2; + goto st26; + } + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof18: cs = 18; goto _test_eof; + _test_eof27: cs = 27; goto _test_eof; + _test_eof19: cs = 19; goto _test_eof; + _test_eof20: cs = 20; goto _test_eof; + _test_eof21: cs = 21; goto _test_eof; + _test_eof22: cs = 22; goto _test_eof; + _test_eof23: cs = 23; goto _test_eof; + _test_eof24: cs = 24; goto _test_eof; + _test_eof25: cs = 25; goto _test_eof; + _test_eof26: cs = 26; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 112 "parser.rl" + + if (cs >= JSON_object_first_final) { + if (RTEST(json->create_id)) { + VALUE klassname = rb_hash_aref(*result, json->create_id); + if (!NIL_P(klassname)) { + VALUE klass = rb_path2class(StringValueCStr(klassname)); + if RTEST(rb_funcall(klass, i_json_creatable_p, 0)) { + *result = rb_funcall(klass, i_json_create, 1, *result); + } + } + } + return p + 1; + } else { + return NULL; + } +} + + +#line 405 "parser.c" +static const int JSON_value_start = 1; +static const int JSON_value_first_final = 21; +static const int JSON_value_error = 0; + +static const int JSON_value_en_main = 1; + +#line 210 "parser.rl" + + +static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + +#line 420 "parser.c" + { + cs = JSON_value_start; + } +#line 217 "parser.rl" + +#line 426 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + switch( (*p) ) { + case 34: goto tr0; + case 45: goto tr2; + case 73: goto st2; + case 78: goto st9; + case 91: goto tr5; + case 102: goto st11; + case 110: goto st15; + case 116: goto st18; + case 123: goto tr9; + } + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr2; + goto st0; +st0: +cs = 0; + goto _out; +tr0: +#line 158 "parser.rl" + { + char *np = JSON_parse_string(json, p, pe, result); + if (np == NULL) { p--; {p++; cs = 21; goto _out;} } else {p = (( np))-1;} + } + goto st21; +tr2: +#line 163 "parser.rl" + { + char *np; + if(pe > p + 9 && !strncmp(MinusInfinity, p, 9)) { + if (json->allow_nan) { + *result = CMinusInfinity; + {p = (( p + 10))-1;} + p--; {p++; cs = 21; goto _out;} + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } + } + np = JSON_parse_float(json, p, pe, result); + if (np != NULL) {p = (( np))-1;} + np = JSON_parse_integer(json, p, pe, result); + if (np != NULL) {p = (( np))-1;} + p--; {p++; cs = 21; goto _out;} + } + goto st21; +tr5: +#line 181 "parser.rl" + { + char *np; + json->current_nesting++; + np = JSON_parse_array(json, p, pe, result); + json->current_nesting--; + if (np == NULL) { p--; {p++; cs = 21; goto _out;} } else {p = (( np))-1;} + } + goto st21; +tr9: +#line 189 "parser.rl" + { + char *np; + json->current_nesting++; + np = JSON_parse_object(json, p, pe, result); + json->current_nesting--; + if (np == NULL) { p--; {p++; cs = 21; goto _out;} } else {p = (( np))-1;} + } + goto st21; +tr16: +#line 151 "parser.rl" + { + if (json->allow_nan) { + *result = CInfinity; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p - 8); + } + } + goto st21; +tr18: +#line 144 "parser.rl" + { + if (json->allow_nan) { + *result = CNaN; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p - 2); + } + } + goto st21; +tr22: +#line 138 "parser.rl" + { + *result = Qfalse; + } + goto st21; +tr25: +#line 135 "parser.rl" + { + *result = Qnil; + } + goto st21; +tr28: +#line 141 "parser.rl" + { + *result = Qtrue; + } + goto st21; +st21: + if ( ++p == pe ) + goto _test_eof21; +case 21: +#line 197 "parser.rl" + { p--; {p++; cs = 21; goto _out;} } +#line 541 "parser.c" + goto st0; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + if ( (*p) == 110 ) + goto st3; + goto st0; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: + if ( (*p) == 102 ) + goto st4; + goto st0; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + if ( (*p) == 105 ) + goto st5; + goto st0; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + if ( (*p) == 110 ) + goto st6; + goto st0; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + if ( (*p) == 105 ) + goto st7; + goto st0; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + if ( (*p) == 116 ) + goto st8; + goto st0; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + if ( (*p) == 121 ) + goto tr16; + goto st0; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + if ( (*p) == 97 ) + goto st10; + goto st0; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: + if ( (*p) == 78 ) + goto tr18; + goto st0; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + if ( (*p) == 97 ) + goto st12; + goto st0; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: + if ( (*p) == 108 ) + goto st13; + goto st0; +st13: + if ( ++p == pe ) + goto _test_eof13; +case 13: + if ( (*p) == 115 ) + goto st14; + goto st0; +st14: + if ( ++p == pe ) + goto _test_eof14; +case 14: + if ( (*p) == 101 ) + goto tr22; + goto st0; +st15: + if ( ++p == pe ) + goto _test_eof15; +case 15: + if ( (*p) == 117 ) + goto st16; + goto st0; +st16: + if ( ++p == pe ) + goto _test_eof16; +case 16: + if ( (*p) == 108 ) + goto st17; + goto st0; +st17: + if ( ++p == pe ) + goto _test_eof17; +case 17: + if ( (*p) == 108 ) + goto tr25; + goto st0; +st18: + if ( ++p == pe ) + goto _test_eof18; +case 18: + if ( (*p) == 114 ) + goto st19; + goto st0; +st19: + if ( ++p == pe ) + goto _test_eof19; +case 19: + if ( (*p) == 117 ) + goto st20; + goto st0; +st20: + if ( ++p == pe ) + goto _test_eof20; +case 20: + if ( (*p) == 101 ) + goto tr28; + goto st0; + } + _test_eof21: cs = 21; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof18: cs = 18; goto _test_eof; + _test_eof19: cs = 19; goto _test_eof; + _test_eof20: cs = 20; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 218 "parser.rl" + + if (cs >= JSON_value_first_final) { + return p; + } else { + return NULL; + } +} + + +#line 711 "parser.c" +static const int JSON_integer_start = 1; +static const int JSON_integer_first_final = 5; +static const int JSON_integer_error = 0; + +static const int JSON_integer_en_main = 1; + +#line 234 "parser.rl" + + +static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + +#line 726 "parser.c" + { + cs = JSON_integer_start; + } +#line 241 "parser.rl" + json->memo = p; + +#line 733 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + switch( (*p) ) { + case 45: goto st2; + case 48: goto st3; + } + if ( 49 <= (*p) && (*p) <= 57 ) + goto st4; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + if ( (*p) == 48 ) + goto st3; + if ( 49 <= (*p) && (*p) <= 57 ) + goto st4; + goto st0; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: + if ( 48 <= (*p) && (*p) <= 57 ) + goto st0; + goto tr4; +tr4: +#line 231 "parser.rl" + { p--; {p++; cs = 5; goto _out;} } + goto st5; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: +#line 774 "parser.c" + goto st0; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + if ( 48 <= (*p) && (*p) <= 57 ) + goto st4; + goto tr4; + } + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 243 "parser.rl" + + if (cs >= JSON_integer_first_final) { + long len = p - json->memo; + *result = rb_Integer(rb_str_new(json->memo, len)); + return p + 1; + } else { + return NULL; + } +} + + +#line 804 "parser.c" +static const int JSON_float_start = 1; +static const int JSON_float_first_final = 10; +static const int JSON_float_error = 0; + +static const int JSON_float_en_main = 1; + +#line 265 "parser.rl" + + +static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + +#line 819 "parser.c" + { + cs = JSON_float_start; + } +#line 272 "parser.rl" + json->memo = p; + +#line 826 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + switch( (*p) ) { + case 45: goto st2; + case 48: goto st3; + } + if ( 49 <= (*p) && (*p) <= 57 ) + goto st9; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + if ( (*p) == 48 ) + goto st3; + if ( 49 <= (*p) && (*p) <= 57 ) + goto st9; + goto st0; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: + switch( (*p) ) { + case 46: goto st4; + case 69: goto st6; + case 101: goto st6; + } + goto st0; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + if ( 48 <= (*p) && (*p) <= 57 ) + goto st5; + goto st0; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + switch( (*p) ) { + case 69: goto st6; + case 101: goto st6; + } + if ( (*p) > 46 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st5; + } else if ( (*p) >= 45 ) + goto st0; + goto tr7; +tr7: +#line 259 "parser.rl" + { p--; {p++; cs = 10; goto _out;} } + goto st10; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: +#line 891 "parser.c" + goto st0; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + switch( (*p) ) { + case 43: goto st7; + case 45: goto st7; + } + if ( 48 <= (*p) && (*p) <= 57 ) + goto st8; + goto st0; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + if ( 48 <= (*p) && (*p) <= 57 ) + goto st8; + goto st0; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + switch( (*p) ) { + case 69: goto st0; + case 101: goto st0; + } + if ( (*p) > 46 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st8; + } else if ( (*p) >= 45 ) + goto st0; + goto tr7; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + switch( (*p) ) { + case 46: goto st4; + case 69: goto st6; + case 101: goto st6; + } + if ( 48 <= (*p) && (*p) <= 57 ) + goto st9; + goto st0; + } + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 274 "parser.rl" + + if (cs >= JSON_float_first_final) { + long len = p - json->memo; + *result = rb_Float(rb_str_new(json->memo, len)); + return p + 1; + } else { + return NULL; + } +} + + + +#line 964 "parser.c" +static const int JSON_array_start = 1; +static const int JSON_array_first_final = 17; +static const int JSON_array_error = 0; + +static const int JSON_array_en_main = 1; + +#line 310 "parser.rl" + + +static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + if (json->max_nesting && json->current_nesting > json->max_nesting) { + rb_raise(eNestingError, "nesting of %d is to deep", json->current_nesting); + } + *result = rb_ary_new(); + + +#line 984 "parser.c" + { + cs = JSON_array_start; + } +#line 322 "parser.rl" + +#line 990 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + if ( (*p) == 91 ) + goto st2; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + switch( (*p) ) { + case 13: goto st2; + case 32: goto st2; + case 34: goto tr2; + case 45: goto tr2; + case 47: goto st13; + case 73: goto tr2; + case 78: goto tr2; + case 91: goto tr2; + case 93: goto tr4; + case 102: goto tr2; + case 110: goto tr2; + case 116: goto tr2; + case 123: goto tr2; + } + if ( (*p) > 10 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr2; + } else if ( (*p) >= 9 ) + goto st2; + goto st0; +tr2: +#line 291 "parser.rl" + { + VALUE v = Qnil; + char *np = JSON_parse_value(json, p, pe, &v); + if (np == NULL) { + p--; {p++; cs = 3; goto _out;} + } else { + rb_ary_push(*result, v); + {p = (( np))-1;} + } + } + goto st3; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: +#line 1045 "parser.c" + switch( (*p) ) { + case 13: goto st3; + case 32: goto st3; + case 44: goto st4; + case 47: goto st9; + case 93: goto tr4; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st3; + goto st0; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + switch( (*p) ) { + case 13: goto st4; + case 32: goto st4; + case 34: goto tr2; + case 45: goto tr2; + case 47: goto st5; + case 73: goto tr2; + case 78: goto tr2; + case 91: goto tr2; + case 102: goto tr2; + case 110: goto tr2; + case 116: goto tr2; + case 123: goto tr2; + } + if ( (*p) > 10 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr2; + } else if ( (*p) >= 9 ) + goto st4; + goto st0; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + switch( (*p) ) { + case 42: goto st6; + case 47: goto st8; + } + goto st0; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + if ( (*p) == 42 ) + goto st7; + goto st6; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + switch( (*p) ) { + case 42: goto st7; + case 47: goto st4; + } + goto st6; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + if ( (*p) == 10 ) + goto st4; + goto st8; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + switch( (*p) ) { + case 42: goto st10; + case 47: goto st12; + } + goto st0; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: + if ( (*p) == 42 ) + goto st11; + goto st10; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + switch( (*p) ) { + case 42: goto st11; + case 47: goto st3; + } + goto st10; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: + if ( (*p) == 10 ) + goto st3; + goto st12; +tr4: +#line 302 "parser.rl" + { p--; {p++; cs = 17; goto _out;} } + goto st17; +st17: + if ( ++p == pe ) + goto _test_eof17; +case 17: +#line 1152 "parser.c" + goto st0; +st13: + if ( ++p == pe ) + goto _test_eof13; +case 13: + switch( (*p) ) { + case 42: goto st14; + case 47: goto st16; + } + goto st0; +st14: + if ( ++p == pe ) + goto _test_eof14; +case 14: + if ( (*p) == 42 ) + goto st15; + goto st14; +st15: + if ( ++p == pe ) + goto _test_eof15; +case 15: + switch( (*p) ) { + case 42: goto st15; + case 47: goto st2; + } + goto st14; +st16: + if ( ++p == pe ) + goto _test_eof16; +case 16: + if ( (*p) == 10 ) + goto st2; + goto st16; + } + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; + _test_eof17: cs = 17; goto _test_eof; + _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 323 "parser.rl" + + if(cs >= JSON_array_first_final) { + return p + 1; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } +} + +static VALUE json_string_unescape(char *p, char *pe) +{ + VALUE result = rb_str_buf_new(pe - p + 1); + + while (p < pe) { + if (*p == '\\') { + p++; + if (p >= pe) return Qnil; /* raise an exception later, \ at end */ + switch (*p) { + case '"': + case '\\': + rb_str_buf_cat(result, p, 1); + p++; + break; + case 'b': + rb_str_buf_cat2(result, "\b"); + p++; + break; + case 'f': + rb_str_buf_cat2(result, "\f"); + p++; + break; + case 'n': + rb_str_buf_cat2(result, "\n"); + p++; + break; + case 'r': + rb_str_buf_cat2(result, "\r"); + p++; + break; + case 't': + rb_str_buf_cat2(result, "\t"); + p++; + break; + case 'u': + if (p > pe - 4) { + return Qnil; + } else { + p = JSON_convert_UTF16_to_UTF8(result, p, pe, strictConversion); + } + break; + default: + rb_str_buf_cat(result, p, 1); + p++; + break; + } + } else { + char *q = p; + while (*q != '\\' && q < pe) q++; + rb_str_buf_cat(result, p, q - p); + p = q; + } + } + return result; +} + + +#line 1273 "parser.c" +static const int JSON_string_start = 1; +static const int JSON_string_first_final = 8; +static const int JSON_string_error = 0; + +static const int JSON_string_en_main = 1; + +#line 401 "parser.rl" + + +static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + *result = rb_str_new("", 0); + +#line 1289 "parser.c" + { + cs = JSON_string_start; + } +#line 409 "parser.rl" + json->memo = p; + +#line 1296 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +case 1: + if ( (*p) == 34 ) + goto st2; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + switch( (*p) ) { + case 34: goto tr2; + case 92: goto st3; + } + if ( 0 <= (*p) && (*p) <= 31 ) + goto st0; + goto st2; +tr2: +#line 393 "parser.rl" + { + *result = json_string_unescape(json->memo + 1, p); + if (NIL_P(*result)) { p--; {p++; cs = 8; goto _out;} } else {p = (( p + 1))-1;} + } +#line 398 "parser.rl" + { p--; {p++; cs = 8; goto _out;} } + goto st8; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: +#line 1333 "parser.c" + goto st0; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: + if ( (*p) == 117 ) + goto st4; + if ( 0 <= (*p) && (*p) <= 31 ) + goto st0; + goto st2; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st5; + } else if ( (*p) > 70 ) { + if ( 97 <= (*p) && (*p) <= 102 ) + goto st5; + } else + goto st5; + goto st0; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st6; + } else if ( (*p) > 70 ) { + if ( 97 <= (*p) && (*p) <= 102 ) + goto st6; + } else + goto st6; + goto st0; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st7; + } else if ( (*p) > 70 ) { + if ( 97 <= (*p) && (*p) <= 102 ) + goto st7; + } else + goto st7; + goto st0; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto st2; + } else if ( (*p) > 70 ) { + if ( 97 <= (*p) && (*p) <= 102 ) + goto st2; + } else + goto st2; + goto st0; + } + _test_eof2: cs = 2; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 411 "parser.rl" + + if (cs >= JSON_string_first_final) { + rb_enc_associate(*result, rb_utf8_encoding()); + return p + 1; + } else { + return NULL; + } +} + + + +#line 1419 "parser.c" +static const int JSON_start = 1; +static const int JSON_first_final = 10; +static const int JSON_error = 0; + +static const int JSON_en_main = 1; + +#line 445 "parser.rl" + + +/* + * Document-class: JSON::Ext::Parser + * + * This is the JSON parser implemented as a C extension. It can be configured + * to be used by setting + * + * JSON.parser = JSON::Ext::Parser + * + * with the method parser= in JSON. + * + */ + +/* + * call-seq: new(source, opts => {}) + * + * Creates a new JSON::Ext::Parser instance for the string _source_. + * + * Creates a new JSON::Ext::Parser instance for the string _source_. + * + * It will be configured by the _opts_ hash. _opts_ can have the following + * keys: + * + * _opts_ can have the following keys: + * * *max_nesting*: The maximum depth of nesting allowed in the parsed data + * structures. Disable depth checking with :max_nesting => false|nil|0, it + * defaults to 19. + * * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in + * defiance of RFC 4627 to be parsed by the Parser. This option defaults to + * false. + * * *create_additions*: If set to false, the Parser doesn't create + * additions even if a matchin class and create_id was found. This option + * defaults to true. + */ +static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) +{ + char *ptr; + long len; + VALUE source, opts; + GET_STRUCT; + rb_scan_args(argc, argv, "11", &source, &opts); + source = StringValue(source); + ptr = RSTRING_PTR(source); + len = RSTRING_LEN(source); + if (len < 2) { + rb_raise(eParserError, "A JSON text must at least contain two octets!"); + } + if (!NIL_P(opts)) { + opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash"); + if (NIL_P(opts)) { + rb_raise(rb_eArgError, "opts needs to be like a hash"); + } else { + VALUE tmp = ID2SYM(i_max_nesting); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE max_nesting = rb_hash_aref(opts, tmp); + if (RTEST(max_nesting)) { + Check_Type(max_nesting, T_FIXNUM); + json->max_nesting = FIX2INT(max_nesting); + } else { + json->max_nesting = 0; + } + } else { + json->max_nesting = 19; + } + tmp = ID2SYM(i_allow_nan); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE allow_nan = rb_hash_aref(opts, tmp); + json->allow_nan = RTEST(allow_nan) ? 1 : 0; + } else { + json->allow_nan = 0; + } + tmp = ID2SYM(i_create_additions); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE create_additions = rb_hash_aref(opts, tmp); + if (RTEST(create_additions)) { + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } else { + json->create_id = Qnil; + } + } else { + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } + } + } else { + json->max_nesting = 19; + json->allow_nan = 0; + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } + json->current_nesting = 0; + /* + Convert these? + if (len >= 4 && ptr[0] == 0 && ptr[1] == 0 && ptr[2] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[0] == 0 && ptr[2] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[1] == 0 && ptr[2] == 0 && ptr[3] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[1] == 0 && ptr[3] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } + */ + json->len = len; + json->source = ptr; + json->Vsource = source; + return self; +} + +/* + * call-seq: parse() + * + * Parses the current JSON text _source_ and returns the complete data + * structure as a result. + */ +static VALUE cParser_parse(VALUE self) +{ + char *p, *pe; + int cs = EVIL; + VALUE result = Qnil; + GET_STRUCT; + + +#line 1549 "parser.c" + { + cs = JSON_start; + } +#line 567 "parser.rl" + p = json->source; + pe = p + json->len; + +#line 1557 "parser.c" + { + if ( p == pe ) + goto _test_eof; + switch ( cs ) + { +st1: + if ( ++p == pe ) + goto _test_eof1; +case 1: + switch( (*p) ) { + case 13: goto st1; + case 32: goto st1; + case 47: goto st2; + case 91: goto tr3; + case 123: goto tr4; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st1; + goto st0; +st0: +cs = 0; + goto _out; +st2: + if ( ++p == pe ) + goto _test_eof2; +case 2: + switch( (*p) ) { + case 42: goto st3; + case 47: goto st5; + } + goto st0; +st3: + if ( ++p == pe ) + goto _test_eof3; +case 3: + if ( (*p) == 42 ) + goto st4; + goto st3; +st4: + if ( ++p == pe ) + goto _test_eof4; +case 4: + switch( (*p) ) { + case 42: goto st4; + case 47: goto st1; + } + goto st3; +st5: + if ( ++p == pe ) + goto _test_eof5; +case 5: + if ( (*p) == 10 ) + goto st1; + goto st5; +tr3: +#line 434 "parser.rl" + { + char *np; + json->current_nesting = 1; + np = JSON_parse_array(json, p, pe, &result); + if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;} + } + goto st10; +tr4: +#line 427 "parser.rl" + { + char *np; + json->current_nesting = 1; + np = JSON_parse_object(json, p, pe, &result); + if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;} + } + goto st10; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: +#line 1634 "parser.c" + switch( (*p) ) { + case 13: goto st10; + case 32: goto st10; + case 47: goto st6; + } + if ( 9 <= (*p) && (*p) <= 10 ) + goto st10; + goto st0; +st6: + if ( ++p == pe ) + goto _test_eof6; +case 6: + switch( (*p) ) { + case 42: goto st7; + case 47: goto st9; + } + goto st0; +st7: + if ( ++p == pe ) + goto _test_eof7; +case 7: + if ( (*p) == 42 ) + goto st8; + goto st7; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + switch( (*p) ) { + case 42: goto st8; + case 47: goto st10; + } + goto st7; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + if ( (*p) == 10 ) + goto st10; + goto st9; + } + _test_eof1: cs = 1; goto _test_eof; + _test_eof2: cs = 2; goto _test_eof; + _test_eof3: cs = 3; goto _test_eof; + _test_eof4: cs = 4; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; + + _test_eof: {} + _out: {} + } +#line 570 "parser.rl" + + if (cs >= JSON_first_final && p == pe) { + return result; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } +} + +inline static JSON_Parser *JSON_allocate() +{ + JSON_Parser *json = ALLOC(JSON_Parser); + MEMZERO(json, JSON_Parser, 1); + return json; +} + +static void JSON_mark(JSON_Parser *json) +{ + rb_gc_mark_maybe(json->Vsource); + rb_gc_mark_maybe(json->create_id); +} + +static void JSON_free(JSON_Parser *json) +{ + ruby_xfree(json); +} + +static VALUE cJSON_parser_s_allocate(VALUE klass) +{ + JSON_Parser *json = JSON_allocate(); + return Data_Wrap_Struct(klass, JSON_mark, JSON_free, json); +} + +/* + * call-seq: source() + * + * Returns a copy of the current _source_ string, that was used to construct + * this Parser. + */ +static VALUE cParser_source(VALUE self) +{ + GET_STRUCT; + return rb_str_dup(json->Vsource); +} + +void Init_parser() +{ + rb_require("json/common"); + mJSON = rb_define_module("JSON"); + mExt = rb_define_module_under(mJSON, "Ext"); + cParser = rb_define_class_under(mExt, "Parser", rb_cObject); + eParserError = rb_path2class("JSON::ParserError"); + eNestingError = rb_path2class("JSON::NestingError"); + rb_define_alloc_func(cParser, cJSON_parser_s_allocate); + rb_define_method(cParser, "initialize", cParser_initialize, -1); + rb_define_method(cParser, "parse", cParser_parse, 0); + rb_define_method(cParser, "source", cParser_source, 0); + + CNaN = rb_const_get(mJSON, rb_intern("NaN")); + CInfinity = rb_const_get(mJSON, rb_intern("Infinity")); + CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity")); + + i_json_creatable_p = rb_intern("json_creatable?"); + i_json_create = rb_intern("json_create"); + i_create_id = rb_intern("create_id"); + i_create_additions = rb_intern("create_additions"); + i_chr = rb_intern("chr"); + i_max_nesting = rb_intern("max_nesting"); + i_allow_nan = rb_intern("allow_nan"); +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.rl b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.rl new file mode 100644 index 0000000..8325a93 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/parser.rl @@ -0,0 +1,636 @@ +#include "ruby.h" +#include "unicode.h" + +#define EVIL 0x666 + +static VALUE mJSON, mExt, cParser, eParserError, eNestingError; +static VALUE CNaN, CInfinity, CMinusInfinity; + +static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions, + i_chr, i_max_nesting, i_allow_nan; + +#define MinusInfinity "-Infinity" + +typedef struct JSON_ParserStruct { + VALUE Vsource; + char *source; + long len; + char *memo; + VALUE create_id; + int max_nesting; + int current_nesting; + int allow_nan; +} JSON_Parser; + +static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result); +static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result); + +#define GET_STRUCT \ + JSON_Parser *json; \ + Data_Get_Struct(self, JSON_Parser, json); + +%%{ + machine JSON_common; + + cr = '\n'; + cr_neg = [^\n]; + ws = [ \t\r\n]; + c_comment = '/*' ( any* - (any* '*/' any* ) ) '*/'; + cpp_comment = '//' cr_neg* cr; + comment = c_comment | cpp_comment; + ignore = ws | comment; + name_separator = ':'; + value_separator = ','; + Vnull = 'null'; + Vfalse = 'false'; + Vtrue = 'true'; + VNaN = 'NaN'; + VInfinity = 'Infinity'; + VMinusInfinity = '-Infinity'; + begin_value = [nft"\-[{NI] | digit; + begin_object = '{'; + end_object = '}'; + begin_array = '['; + end_array = ']'; + begin_string = '"'; + begin_name = begin_string; + begin_number = digit | '-'; +}%% + +%%{ + machine JSON_object; + include JSON_common; + + write data; + + action parse_value { + VALUE v = Qnil; + char *np = JSON_parse_value(json, fpc, pe, &v); + if (np == NULL) { + fhold; fbreak; + } else { + rb_hash_aset(*result, last_name, v); + fexec np; + } + } + + action parse_name { + char *np = JSON_parse_string(json, fpc, pe, &last_name); + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + action exit { fhold; fbreak; } + + a_pair = ignore* begin_name >parse_name + ignore* name_separator ignore* + begin_value >parse_value; + + main := begin_object + (a_pair (ignore* value_separator a_pair)*)? + ignore* end_object @exit; +}%% + +static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + VALUE last_name = Qnil; + + if (json->max_nesting && json->current_nesting > json->max_nesting) { + rb_raise(eNestingError, "nesting of %d is to deep", json->current_nesting); + } + + *result = rb_hash_new(); + + %% write init; + %% write exec; + + if (cs >= JSON_object_first_final) { + if (RTEST(json->create_id)) { + VALUE klassname = rb_hash_aref(*result, json->create_id); + if (!NIL_P(klassname)) { + VALUE klass = rb_path2class(StringValueCStr(klassname)); + if RTEST(rb_funcall(klass, i_json_creatable_p, 0)) { + *result = rb_funcall(klass, i_json_create, 1, *result); + } + } + } + return p + 1; + } else { + return NULL; + } +} + +%%{ + machine JSON_value; + include JSON_common; + + write data; + + action parse_null { + *result = Qnil; + } + action parse_false { + *result = Qfalse; + } + action parse_true { + *result = Qtrue; + } + action parse_nan { + if (json->allow_nan) { + *result = CNaN; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p - 2); + } + } + action parse_infinity { + if (json->allow_nan) { + *result = CInfinity; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p - 8); + } + } + action parse_string { + char *np = JSON_parse_string(json, fpc, pe, result); + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + action parse_number { + char *np; + if(pe > fpc + 9 && !strncmp(MinusInfinity, fpc, 9)) { + if (json->allow_nan) { + *result = CMinusInfinity; + fexec p + 10; + fhold; fbreak; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } + } + np = JSON_parse_float(json, fpc, pe, result); + if (np != NULL) fexec np; + np = JSON_parse_integer(json, fpc, pe, result); + if (np != NULL) fexec np; + fhold; fbreak; + } + + action parse_array { + char *np; + json->current_nesting++; + np = JSON_parse_array(json, fpc, pe, result); + json->current_nesting--; + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + action parse_object { + char *np; + json->current_nesting++; + np = JSON_parse_object(json, fpc, pe, result); + json->current_nesting--; + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + action exit { fhold; fbreak; } + +main := ( + Vnull @parse_null | + Vfalse @parse_false | + Vtrue @parse_true | + VNaN @parse_nan | + VInfinity @parse_infinity | + begin_number >parse_number | + begin_string >parse_string | + begin_array >parse_array | + begin_object >parse_object + ) %*exit; +}%% + +static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + %% write init; + %% write exec; + + if (cs >= JSON_value_first_final) { + return p; + } else { + return NULL; + } +} + +%%{ + machine JSON_integer; + + write data; + + action exit { fhold; fbreak; } + + main := '-'? ('0' | [1-9][0-9]*) (^[0-9] @exit); +}%% + +static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + %% write init; + json->memo = p; + %% write exec; + + if (cs >= JSON_integer_first_final) { + long len = p - json->memo; + *result = rb_Integer(rb_str_new(json->memo, len)); + return p + 1; + } else { + return NULL; + } +} + +%%{ + machine JSON_float; + include JSON_common; + + write data; + + action exit { fhold; fbreak; } + + main := '-'? ( + (('0' | [1-9][0-9]*) '.' [0-9]+ ([Ee] [+\-]?[0-9]+)?) + | (('0' | [1-9][0-9]*) ([Ee] [+\-]?[0-9]+)) + ) (^[0-9Ee.\-] @exit ); +}%% + +static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + %% write init; + json->memo = p; + %% write exec; + + if (cs >= JSON_float_first_final) { + long len = p - json->memo; + *result = rb_Float(rb_str_new(json->memo, len)); + return p + 1; + } else { + return NULL; + } +} + + +%%{ + machine JSON_array; + include JSON_common; + + write data; + + action parse_value { + VALUE v = Qnil; + char *np = JSON_parse_value(json, fpc, pe, &v); + if (np == NULL) { + fhold; fbreak; + } else { + rb_ary_push(*result, v); + fexec np; + } + } + + action exit { fhold; fbreak; } + + next_element = value_separator ignore* begin_value >parse_value; + + main := begin_array ignore* + ((begin_value >parse_value ignore*) + (ignore* next_element ignore*)*)? + end_array @exit; +}%% + +static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + if (json->max_nesting && json->current_nesting > json->max_nesting) { + rb_raise(eNestingError, "nesting of %d is to deep", json->current_nesting); + } + *result = rb_ary_new(); + + %% write init; + %% write exec; + + if(cs >= JSON_array_first_final) { + return p + 1; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } +} + +static VALUE json_string_unescape(char *p, char *pe) +{ + VALUE result = rb_str_buf_new(pe - p + 1); + + while (p < pe) { + if (*p == '\\') { + p++; + if (p >= pe) return Qnil; /* raise an exception later, \ at end */ + switch (*p) { + case '"': + case '\\': + rb_str_buf_cat(result, p, 1); + p++; + break; + case 'b': + rb_str_buf_cat2(result, "\b"); + p++; + break; + case 'f': + rb_str_buf_cat2(result, "\f"); + p++; + break; + case 'n': + rb_str_buf_cat2(result, "\n"); + p++; + break; + case 'r': + rb_str_buf_cat2(result, "\r"); + p++; + break; + case 't': + rb_str_buf_cat2(result, "\t"); + p++; + break; + case 'u': + if (p > pe - 4) { + return Qnil; + } else { + p = JSON_convert_UTF16_to_UTF8(result, p, pe, strictConversion); + } + break; + default: + rb_str_buf_cat(result, p, 1); + p++; + break; + } + } else { + char *q = p; + while (*q != '\\' && q < pe) q++; + rb_str_buf_cat(result, p, q - p); + p = q; + } + } + return result; +} + +%%{ + machine JSON_string; + include JSON_common; + + write data; + + action parse_string { + *result = json_string_unescape(json->memo + 1, p); + if (NIL_P(*result)) { fhold; fbreak; } else fexec p + 1; + } + + action exit { fhold; fbreak; } + + main := '"' ((^(["\\] | 0..0x1f) | '\\'["\\/bfnrt] | '\\u'[0-9a-fA-F]{4} | '\\'^(["\\/bfnrtu]|0..0x1f))* %parse_string) '"' @exit; +}%% + +static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result) +{ + int cs = EVIL; + + *result = rb_str_new("", 0); + %% write init; + json->memo = p; + %% write exec; + + if (cs >= JSON_string_first_final) { + return p + 1; + } else { + return NULL; + } +} + + +%%{ + machine JSON; + + write data; + + include JSON_common; + + action parse_object { + char *np; + json->current_nesting = 1; + np = JSON_parse_object(json, fpc, pe, &result); + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + action parse_array { + char *np; + json->current_nesting = 1; + np = JSON_parse_array(json, fpc, pe, &result); + if (np == NULL) { fhold; fbreak; } else fexec np; + } + + main := ignore* ( + begin_object >parse_object | + begin_array >parse_array + ) ignore*; +}%% + +/* + * Document-class: JSON::Ext::Parser + * + * This is the JSON parser implemented as a C extension. It can be configured + * to be used by setting + * + * JSON.parser = JSON::Ext::Parser + * + * with the method parser= in JSON. + * + */ + +/* + * call-seq: new(source, opts => {}) + * + * Creates a new JSON::Ext::Parser instance for the string _source_. + * + * Creates a new JSON::Ext::Parser instance for the string _source_. + * + * It will be configured by the _opts_ hash. _opts_ can have the following + * keys: + * + * _opts_ can have the following keys: + * * *max_nesting*: The maximum depth of nesting allowed in the parsed data + * structures. Disable depth checking with :max_nesting => false|nil|0, it + * defaults to 19. + * * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in + * defiance of RFC 4627 to be parsed by the Parser. This option defaults to + * false. + * * *create_additions*: If set to false, the Parser doesn't create + * additions even if a matchin class and create_id was found. This option + * defaults to true. + */ +static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) +{ + char *ptr; + long len; + VALUE source, opts; + GET_STRUCT; + rb_scan_args(argc, argv, "11", &source, &opts); + source = StringValue(source); + ptr = RSTRING_PTR(source); + len = RSTRING_LEN(source); + if (len < 2) { + rb_raise(eParserError, "A JSON text must at least contain two octets!"); + } + if (!NIL_P(opts)) { + opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash"); + if (NIL_P(opts)) { + rb_raise(rb_eArgError, "opts needs to be like a hash"); + } else { + VALUE tmp = ID2SYM(i_max_nesting); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE max_nesting = rb_hash_aref(opts, tmp); + if (RTEST(max_nesting)) { + Check_Type(max_nesting, T_FIXNUM); + json->max_nesting = FIX2INT(max_nesting); + } else { + json->max_nesting = 0; + } + } else { + json->max_nesting = 19; + } + tmp = ID2SYM(i_allow_nan); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE allow_nan = rb_hash_aref(opts, tmp); + json->allow_nan = RTEST(allow_nan) ? 1 : 0; + } else { + json->allow_nan = 0; + } + tmp = ID2SYM(i_create_additions); + if (st_lookup(RHASH_TBL(opts), tmp, 0)) { + VALUE create_additions = rb_hash_aref(opts, tmp); + if (RTEST(create_additions)) { + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } else { + json->create_id = Qnil; + } + } else { + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } + } + } else { + json->max_nesting = 19; + json->allow_nan = 0; + json->create_id = rb_funcall(mJSON, i_create_id, 0); + } + json->current_nesting = 0; + /* + Convert these? + if (len >= 4 && ptr[0] == 0 && ptr[1] == 0 && ptr[2] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[0] == 0 && ptr[2] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[1] == 0 && ptr[2] == 0 && ptr[3] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } else if (len >= 4 && ptr[1] == 0 && ptr[3] == 0) { + rb_raise(eParserError, "Only UTF8 octet streams are supported atm!"); + } + */ + json->len = len; + json->source = ptr; + json->Vsource = source; + return self; +} + +/* + * call-seq: parse() + * + * Parses the current JSON text _source_ and returns the complete data + * structure as a result. + */ +static VALUE cParser_parse(VALUE self) +{ + char *p, *pe; + int cs = EVIL; + VALUE result = Qnil; + GET_STRUCT; + + %% write init; + p = json->source; + pe = p + json->len; + %% write exec; + + if (cs >= JSON_first_final && p == pe) { + return result; + } else { + rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + } +} + +inline static JSON_Parser *JSON_allocate() +{ + JSON_Parser *json = ALLOC(JSON_Parser); + MEMZERO(json, JSON_Parser, 1); + return json; +} + +static void JSON_mark(JSON_Parser *json) +{ + rb_gc_mark_maybe(json->Vsource); + rb_gc_mark_maybe(json->create_id); +} + +static void JSON_free(JSON_Parser *json) +{ + ruby_xfree(json); +} + +static VALUE cJSON_parser_s_allocate(VALUE klass) +{ + JSON_Parser *json = JSON_allocate(); + return Data_Wrap_Struct(klass, JSON_mark, JSON_free, json); +} + +/* + * call-seq: source() + * + * Returns a copy of the current _source_ string, that was used to construct + * this Parser. + */ +static VALUE cParser_source(VALUE self) +{ + GET_STRUCT; + return rb_str_dup(json->Vsource); +} + +void Init_parser() +{ + rb_require("json/common"); + mJSON = rb_define_module("JSON"); + mExt = rb_define_module_under(mJSON, "Ext"); + cParser = rb_define_class_under(mExt, "Parser", rb_cObject); + eParserError = rb_path2class("JSON::ParserError"); + eNestingError = rb_path2class("JSON::NestingError"); + rb_define_alloc_func(cParser, cJSON_parser_s_allocate); + rb_define_method(cParser, "initialize", cParser_initialize, -1); + rb_define_method(cParser, "parse", cParser_parse, 0); + rb_define_method(cParser, "source", cParser_source, 0); + + CNaN = rb_const_get(mJSON, rb_intern("NaN")); + CInfinity = rb_const_get(mJSON, rb_intern("Infinity")); + CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity")); + + i_json_creatable_p = rb_intern("json_creatable?"); + i_json_create = rb_intern("json_create"); + i_create_id = rb_intern("create_id"); + i_create_additions = rb_intern("create_additions"); + i_chr = rb_intern("chr"); + i_max_nesting = rb_intern("max_nesting"); + i_allow_nan = rb_intern("allow_nan"); +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.c b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.c new file mode 100644 index 0000000..b2f1e58 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.c @@ -0,0 +1,154 @@ +#include "unicode.h" + +/* + * Copyright 2001-2004 Unicode, Inc. + * + * Disclaimer + * + * This source code is provided as is by Unicode, Inc. No claims are + * made as to fitness for any particular purpose. No warranties of any + * kind are expressed or implied. The recipient agrees to determine + * applicability of information provided. If this file has been + * purchased on magnetic or optical media from Unicode, Inc., the + * sole remedy for any claim will be exchange of defective media + * within 90 days of receipt. + * + * Limitations on Rights to Redistribute This Code + * + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form + * for internal or external distribution as long as this notice + * remains attached. + */ + +/* + * Index into the table below with the first byte of a UTF-8 sequence to + * get the number of trailing bytes that are supposed to follow it. + * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is + * left as-is for anyone who may want to do such conversion, which was + * allowed in earlier algorithms. + */ +static const char trailingBytesForUTF8[256] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 +}; + +/* + * Magic values subtracted from a buffer value during UTF8 conversion. + * This table contains as many values as there might be trailing bytes + * in a UTF-8 sequence. + */ +static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, + 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; + +/* + * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed + * into the first byte, depending on how many bytes follow. There are + * as many entries in this table as there are UTF-8 sequence types. + * (I.e., one byte sequence, two byte... etc.). Remember that sequencs + * for *legal* UTF-8 will be 4 or fewer bytes total. + */ +static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + +char *JSON_convert_UTF16_to_UTF8 ( + VALUE buffer, + char *source, + char *sourceEnd, + ConversionFlags flags) +{ + UTF16 *tmp, *tmpPtr, *tmpEnd; + char buf[5]; + long n = 0, i; + char *p = source - 1; + + while (p < sourceEnd && p[0] == '\\' && p[1] == 'u') { + p += 6; + n++; + } + p = source + 1; + buf[4] = 0; + tmpPtr = tmp = ALLOC_N(UTF16, n); + tmpEnd = tmp + n; + for (i = 0; i < n; i++) { + buf[0] = *p++; + buf[1] = *p++; + buf[2] = *p++; + buf[3] = *p++; + tmpPtr[i] = strtol(buf, NULL, 16); + p += 2; + } + + while (tmpPtr < tmpEnd) { + UTF32 ch; + unsigned short bytesToWrite = 0; + const UTF32 byteMask = 0xBF; + const UTF32 byteMark = 0x80; + ch = *tmpPtr++; + /* If we have a surrogate pair, convert to UTF32 first. */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { + /* If the 16 bits following the high surrogate are in the source + * buffer... */ + if (tmpPtr < tmpEnd) { + UTF32 ch2 = *tmpPtr; + /* If it's a low surrogate, convert to UTF32. */ + if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { + ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + + (ch2 - UNI_SUR_LOW_START) + halfBase; + ++tmpPtr; + } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ + ruby_xfree(tmp); + rb_raise(rb_path2class("JSON::ParserError"), + "source sequence is illegal/malformed near %s", source); + } + } else { /* We don't have the 16 bits following the high surrogate. */ + ruby_xfree(tmp); + rb_raise(rb_path2class("JSON::ParserError"), + "partial character in source, but hit end near %s", source); + break; + } + } else if (flags == strictConversion) { + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { + ruby_xfree(tmp); + rb_raise(rb_path2class("JSON::ParserError"), + "source sequence is illegal/malformed near %s", source); + } + } + /* Figure out how many bytes the result will require */ + if (ch < (UTF32) 0x80) { + bytesToWrite = 1; + } else if (ch < (UTF32) 0x800) { + bytesToWrite = 2; + } else if (ch < (UTF32) 0x10000) { + bytesToWrite = 3; + } else if (ch < (UTF32) 0x110000) { + bytesToWrite = 4; + } else { + bytesToWrite = 3; + ch = UNI_REPLACEMENT_CHAR; + } + + buf[0] = 0; + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + p = buf + bytesToWrite; + switch (bytesToWrite) { /* note: everything falls through. */ + case 4: *--p = (UTF8) ((ch | byteMark) & byteMask); ch >>= 6; + case 3: *--p = (UTF8) ((ch | byteMark) & byteMask); ch >>= 6; + case 2: *--p = (UTF8) ((ch | byteMark) & byteMask); ch >>= 6; + case 1: *--p = (UTF8) (ch | firstByteMark[bytesToWrite]); + } + rb_str_buf_cat(buffer, p, bytesToWrite); + } + ruby_xfree(tmp); + source += 5 + (n - 1) * 6; + return source; +} diff --git a/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.h b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.h new file mode 100644 index 0000000..155da0c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/ext/parser/unicode.h @@ -0,0 +1,58 @@ + +#ifndef _PARSER_UNICODE_H_ +#define _PARSER_UNICODE_H_ + +#include "ruby.h" + +typedef unsigned long UTF32; /* at least 32 bits */ +typedef unsigned short UTF16; /* at least 16 bits */ +typedef unsigned char UTF8; /* typically 8 bits */ + +#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD +#define UNI_MAX_BMP (UTF32)0x0000FFFF +#define UNI_MAX_UTF16 (UTF32)0x0010FFFF +#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF +#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF + +#define UNI_SUR_HIGH_START (UTF32)0xD800 +#define UNI_SUR_HIGH_END (UTF32)0xDBFF +#define UNI_SUR_LOW_START (UTF32)0xDC00 +#define UNI_SUR_LOW_END (UTF32)0xDFFF + +static const int halfShift = 10; /* used for shifting by 10 bits */ + +static const UTF32 halfBase = 0x0010000UL; +static const UTF32 halfMask = 0x3FFUL; + +typedef enum { + conversionOK = 0, /* conversion successful */ + sourceExhausted, /* partial character in source, but hit end */ + targetExhausted, /* insuff. room in target for conversion */ + sourceIllegal /* source sequence is illegal/malformed */ +} ConversionResult; + +typedef enum { + strictConversion = 0, + lenientConversion +} ConversionFlags; + +char *JSON_convert_UTF16_to_UTF8 ( + VALUE buffer, + char *source, + char *sourceEnd, + ConversionFlags flags); + +#ifndef RARRAY_PTR +#define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr +#endif +#ifndef RARRAY_LEN +#define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len +#endif +#ifndef RSTRING_PTR +#define RSTRING_PTR(string) RSTRING(string)->ptr +#endif +#ifndef RSTRING_LEN +#define RSTRING_LEN(string) RSTRING(string)->len +#endif + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/json/extconf.rb b/lib/ruby-1.9.1-rc1/ext/json/extconf.rb new file mode 100644 index 0000000..850798c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/extconf.rb @@ -0,0 +1,3 @@ +require 'mkmf' +create_makefile('json') + diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json.rb new file mode 100644 index 0000000..3b0b711 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json.rb @@ -0,0 +1,235 @@ +require 'json/common' +# = json - JSON for Ruby +# +# == Description +# +# This is a implementation of the JSON specification according to RFC 4627 +# (http://www.ietf.org/rfc/rfc4627.txt). Starting from version 1.0.0 on there +# will be two variants available: +# +# * A pure ruby variant, that relies on the iconv and the stringscan +# extensions, which are both part of the ruby standard library. +# * The quite a bit faster C extension variant, which is in parts implemented +# in C and comes with its own unicode conversion functions and a parser +# generated by the ragel state machine compiler +# (http://www.cs.queensu.ca/~thurston/ragel). +# +# Both variants of the JSON generator escape all non-ASCII an control +# characters with \uXXXX escape sequences, and support UTF-16 surrogate pairs +# in order to be able to generate the whole range of unicode code points. This +# means that generated JSON text is encoded as UTF-8 (because ASCII is a subset +# of UTF-8) and at the same time avoids decoding problems for receiving +# endpoints, that don't expect UTF-8 encoded texts. On the negative side this +# may lead to a bit longer strings than necessarry. +# +# All strings, that are to be encoded as JSON strings, should be UTF-8 byte +# sequences on the Ruby side. To encode raw binary strings, that aren't UTF-8 +# encoded, please use the to_json_raw_object method of String (which produces +# an object, that contains a byte array) and decode the result on the receiving +# endpoint. +# +# == Author +# +# Florian Frank +# +# == License +# +# This software is distributed under the same license as Ruby itself, see +# http://www.ruby-lang.org/en/LICENSE.txt. +# +# == Download +# +# The latest version of this library can be downloaded at +# +# * http://rubyforge.org/frs?group_id=953 +# +# Online Documentation should be located at +# +# * http://json.rubyforge.org +# +# == Usage +# +# To use JSON you can +# require 'json' +# to load the installed variant (either the extension 'json' or the pure +# variant 'json_pure'). If you have installed the extension variant, you can +# pick either the extension variant or the pure variant by typing +# require 'json/ext' +# or +# require 'json/pure' +# +# You can choose to load a set of common additions to ruby core's objects if +# you +# require 'json/add/core' +# +# After requiring this you can, e. g., serialise/deserialise Ruby ranges: +# +# JSON JSON(1..10) # => 1..10 +# +# To find out how to add JSON support to other or your own classes, read the +# Examples section below. +# +# To get the best compatibility to rails' JSON implementation, you can +# require 'json/add/rails' +# +# Both of the additions attempt to require 'json' (like above) first, if it has +# not been required yet. +# +# == Speed Comparisons +# +# I have created some benchmark results (see the benchmarks subdir of the +# package) for the JSON-Parser to estimate the speed up in the C extension: +# +# JSON::Pure::Parser:: 28.90 calls/second +# JSON::Ext::Parser:: 505.50 calls/second +# +# This is ca. 17.5 times the speed of the pure Ruby implementation. +# +# I have benchmarked the JSON-Generator as well. This generates a few more +# values, because there are different modes, that also influence the achieved +# speed: +# +# * JSON::Pure::Generator: +# generate:: 35.06 calls/second +# pretty_generate:: 34.00 calls/second +# fast_generate:: 41.06 calls/second +# +# * JSON::Ext::Generator: +# generate:: 492.11 calls/second +# pretty_generate:: 348.85 calls/second +# fast_generate:: 541.60 calls/second +# +# * Speedup Ext/Pure: +# generate safe:: 14.0 times +# generate pretty:: 10.3 times +# generate fast:: 13.2 times +# +# The rails framework includes a generator as well, also it seems to be rather +# slow: I measured only 23.87 calls/second which is slower than any of my pure +# generator results. Here a comparison of the different speedups with the Rails +# measurement as the divisor: +# +# * Speedup Pure/Rails: +# generate safe:: 1.5 times +# generate pretty:: 1.4 times +# generate fast:: 1.7 times +# +# * Speedup Ext/Rails: +# generate safe:: 20.6 times +# generate pretty:: 14.6 times +# generate fast:: 22.7 times +# +# To achieve the fastest JSON text output, you can use the +# fast_generate/fast_unparse methods. Beware, that this will disable the +# checking for circular Ruby data structures, which may cause JSON to go into +# an infinite loop. +# +# == Examples +# +# To create a JSON text from a ruby data structure, you +# can call JSON.generate (or JSON.unparse) like that: +# +# json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10] +# # => "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]" +# +# To create a valid JSON text you have to make sure, that the output is +# embedded in either a JSON array [] or a JSON object {}. The easiest way to do +# this, is by putting your values in a Ruby Array or Hash instance. +# +# To get back a ruby data structure from a JSON text, you have to call +# JSON.parse on it: +# +# JSON.parse json +# # => [1, 2, {"a"=>3.141}, false, true, nil, "4..10"] +# +# Note, that the range from the original data structure is a simple +# string now. The reason for this is, that JSON doesn't support ranges +# or arbitrary classes. In this case the json library falls back to call +# Object#to_json, which is the same as #to_s.to_json. +# +# It's possible to add JSON support serialization to arbitrary classes by +# simply implementing a more specialized version of the #to_json method, that +# should return a JSON object (a hash converted to JSON with #to_json) like +# this (don't forget the *a for all the arguments): +# +# class Range +# def to_json(*a) +# { +# 'json_class' => self.class.name, # = 'Range' +# 'data' => [ first, last, exclude_end? ] +# }.to_json(*a) +# end +# end +# +# The hash key 'json_class' is the class, that will be asked to deserialise the +# JSON representation later. In this case it's 'Range', but any namespace of +# the form 'A::B' or '::A::B' will do. All other keys are arbitrary and can be +# used to store the necessary data to configure the object to be deserialised. +# +# If a the key 'json_class' is found in a JSON object, the JSON parser checks +# if the given class responds to the json_create class method. If so, it is +# called with the JSON object converted to a Ruby hash. So a range can +# be deserialised by implementing Range.json_create like this: +# +# class Range +# def self.json_create(o) +# new(*o['data']) +# end +# end +# +# Now it possible to serialise/deserialise ranges as well: +# +# json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10] +# # => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]" +# JSON.parse json +# # => [1, 2, {"a"=>3.141}, false, true, nil, 4..10] +# +# JSON.generate always creates the shortest possible string representation of a +# ruby data structure in one line. This good for data storage or network +# protocols, but not so good for humans to read. Fortunately there's also +# JSON.pretty_generate (or JSON.pretty_generate) that creates a more +# readable output: +# +# puts JSON.pretty_generate([1, 2, {"a"=>3.141}, false, true, nil, 4..10]) +# [ +# 1, +# 2, +# { +# "a": 3.141 +# }, +# false, +# true, +# null, +# { +# "json_class": "Range", +# "data": [ +# 4, +# 10, +# false +# ] +# } +# ] +# +# There are also the methods Kernel#j for unparse, and Kernel#jj for +# pretty_unparse output to the console, that work analogous to Core Ruby's p +# and the pp library's pp methods. +# +# The script tools/server.rb contains a small example if you want to test, how +# receiving a JSON object from a webrick server in your browser with the +# javasript prototype library (http://www.prototypejs.org) works. +# +module JSON + require 'json/version' + + if VARIANT_BINARY + require 'json/ext' + else + begin + require 'json/ext' + rescue LoadError + require 'json/pure' + end + end + + JSON_LOADED = true +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/Array.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Array.xpm new file mode 100644 index 0000000..27c4801 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Array.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * Array_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" .......... ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .......... ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/FalseClass.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/FalseClass.xpm new file mode 100644 index 0000000..25ce608 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/FalseClass.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * False_xpm[] = { +"16 16 2 1", +" c None", +". c #FF0000", +" ", +" ", +" ", +" ...... ", +" . ", +" . ", +" . ", +" ...... ", +" . ", +" . ", +" . ", +" . ", +" . ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/Hash.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Hash.xpm new file mode 100644 index 0000000..cd8f6f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Hash.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * Hash_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" . . ", +" . . ", +" . . ", +" ......... ", +" . . ", +" . . ", +" ......... ", +" . . ", +" . . ", +" . . ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/Key.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Key.xpm new file mode 100644 index 0000000..9fd7281 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Key.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static char * Key_xpm[] = { +"16 16 54 1", +" c None", +". c #110007", +"+ c #0E0900", +"@ c #000013", +"# c #070600", +"$ c #F6F006", +"% c #ECE711", +"& c #E5EE00", +"* c #16021E", +"= c #120900", +"- c #EDF12B", +"; c #000033", +"> c #0F0000", +", c #FFFE03", +"' c #E6E500", +") c #16021B", +"! c #F7F502", +"~ c #000E00", +"{ c #130000", +"] c #FFF000", +"^ c #FFE711", +"/ c #140005", +"( c #190025", +"_ c #E9DD27", +": c #E7DC04", +"< c #FFEC09", +"[ c #FFE707", +"} c #FFDE10", +"| c #150021", +"1 c #160700", +"2 c #FAF60E", +"3 c #EFE301", +"4 c #FEF300", +"5 c #E7E000", +"6 c #FFFF08", +"7 c #0E0206", +"8 c #040000", +"9 c #03052E", +"0 c #041212", +"a c #070300", +"b c #F2E713", +"c c #F9DE13", +"d c #36091E", +"e c #00001C", +"f c #1F0010", +"g c #FFF500", +"h c #DEDE00", +"i c #050A00", +"j c #FAF14A", +"k c #F5F200", +"l c #040404", +"m c #1A0D00", +"n c #EDE43D", +"o c #ECE007", +" ", +" ", +" .+@ ", +" #$%&* ", +" =-;>,') ", +" >!~{]^/ ", +" (_:<[}| ", +" 1234567 ", +" 890abcd ", +" efghi ", +" >jkl ", +" mnol ", +" >kl ", +" ll ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/NilClass.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/NilClass.xpm new file mode 100644 index 0000000..3509f06 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/NilClass.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * False_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" ... ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" ... ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/Numeric.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Numeric.xpm new file mode 100644 index 0000000..e071e2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/Numeric.xpm @@ -0,0 +1,28 @@ +/* XPM */ +static char * Numeric_xpm[] = { +"16 16 9 1", +" c None", +". c #FF0000", +"+ c #0000FF", +"@ c #0023DB", +"# c #00EA14", +"$ c #00FF00", +"% c #004FAF", +"& c #0028D6", +"* c #00F20C", +" ", +" ", +" ", +" ... +++@#$$$$ ", +" .+ %& $$ ", +" . + $ ", +" . + $$ ", +" . ++$$$$ ", +" . + $$ ", +" . + $ ", +" . + $ ", +" . + $ $$ ", +" .....++++*$$ ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/String.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/String.xpm new file mode 100644 index 0000000..f79a89c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/String.xpm @@ -0,0 +1,96 @@ +/* XPM */ +static char * String_xpm[] = { +"16 16 77 1", +" c None", +". c #000000", +"+ c #040404", +"@ c #080806", +"# c #090606", +"$ c #EEEAE1", +"% c #E7E3DA", +"& c #E0DBD1", +"* c #D4B46F", +"= c #0C0906", +"- c #E3C072", +"; c #E4C072", +"> c #060505", +", c #0B0A08", +"' c #D5B264", +") c #D3AF5A", +"! c #080602", +"~ c #E1B863", +"{ c #DDB151", +"] c #DBAE4A", +"^ c #DDB152", +"/ c #DDB252", +"( c #070705", +"_ c #0C0A07", +": c #D3A33B", +"< c #020201", +"[ c #DAAA41", +"} c #040302", +"| c #E4D9BF", +"1 c #0B0907", +"2 c #030201", +"3 c #020200", +"4 c #C99115", +"5 c #080704", +"6 c #DBC8A2", +"7 c #E7D7B4", +"8 c #E0CD9E", +"9 c #080601", +"0 c #040400", +"a c #010100", +"b c #0B0B08", +"c c #DCBF83", +"d c #DCBC75", +"e c #DEB559", +"f c #040301", +"g c #BC8815", +"h c #120E07", +"i c #060402", +"j c #0A0804", +"k c #D4A747", +"l c #D6A12F", +"m c #0E0C05", +"n c #C8C1B0", +"o c #1D1B15", +"p c #D7AD51", +"q c #070502", +"r c #080804", +"s c #BC953B", +"t c #C4BDAD", +"u c #0B0807", +"v c #DBAC47", +"w c #1B150A", +"x c #B78A2C", +"y c #D8A83C", +"z c #D4A338", +"A c #0F0B03", +"B c #181105", +"C c #C59325", +"D c #C18E1F", +"E c #060600", +"F c #CC992D", +"G c #B98B25", +"H c #B3831F", +"I c #C08C1C", +"J c #060500", +"K c #0E0C03", +"L c #0D0A00", +" ", +" .+@# ", +" .$%&*= ", +" .-;>,')! ", +" .~. .{]. ", +" .^/. (_:< ", +" .[.}|$12 ", +" 345678}90 ", +" a2bcdefgh ", +" ijkl.mno ", +" tv_nsec + object['n'] = usec * 1000 + end + if respond_to?(:tv_nsec) + at(*object.values_at('s', 'n')) + else + at(object['s'], object['n'] / 1000) + end + end + + def to_json(*args) + { + 'json_class' => self.class.name, + 's' => tv_sec, + 'n' => respond_to?(:tv_nsec) ? tv_nsec : tv_usec * 1000 + }.to_json(*args) + end +end + +class Date + def self.json_create(object) + civil(*object.values_at('y', 'm', 'd', 'sg')) + end + + alias start sg unless method_defined?(:start) + + def to_json(*args) + { + 'json_class' => self.class.name, + 'y' => year, + 'm' => month, + 'd' => day, + 'sg' => start, + }.to_json(*args) + end +end + +class DateTime + def self.json_create(object) + args = object.values_at('y', 'm', 'd', 'H', 'M', 'S') + of_a, of_b = object['of'].split('/') + if of_b and of_b != '0' + args << Rational(of_a.to_i, of_b.to_i) + else + args << of_a + end + args << object['sg'] + civil(*args) + end + + alias start sg unless method_defined?(:start) + + def to_json(*args) + { + 'json_class' => self.class.name, + 'y' => year, + 'm' => month, + 'd' => day, + 'H' => hour, + 'M' => min, + 'S' => sec, + 'of' => offset.to_s, + 'sg' => start, + }.to_json(*args) + end +end + +class Range + def self.json_create(object) + new(*object['a']) + end + + def to_json(*args) + { + 'json_class' => self.class.name, + 'a' => [ first, last, exclude_end? ] + }.to_json(*args) + end +end + +class Struct + def self.json_create(object) + new(*object['v']) + end + + def to_json(*args) + klass = self.class.name + klass.nil? and raise JSON::JSONError, "Only named structs are supported!" + { + 'json_class' => klass, + 'v' => values, + }.to_json(*args) + end +end + +class Exception + def self.json_create(object) + result = new(object['m']) + result.set_backtrace object['b'] + result + end + + def to_json(*args) + { + 'json_class' => self.class.name, + 'm' => message, + 'b' => backtrace, + }.to_json(*args) + end +end + +class Regexp + def self.json_create(object) + new(object['s'], object['o']) + end + + def to_json(*) + { + 'json_class' => self.class.name, + 'o' => options, + 's' => source, + }.to_json + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/add/rails.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/add/rails.rb new file mode 100644 index 0000000..e86ed1a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/add/rails.rb @@ -0,0 +1,58 @@ +# This file contains implementations of rails custom objects for +# serialisation/deserialisation. + +unless Object.const_defined?(:JSON) and ::JSON.const_defined?(:JSON_LOADED) and + ::JSON::JSON_LOADED + require 'json' +end + +class Object + def self.json_create(object) + obj = new + for key, value in object + next if key == 'json_class' + instance_variable_set "@#{key}", value + end + obj + end + + def to_json(*a) + result = { + 'json_class' => self.class.name + } + instance_variables.inject(result) do |r, name| + r[name[1..-1]] = instance_variable_get name + r + end + result.to_json(*a) + end +end + +class Symbol + def to_json(*a) + to_s.to_json(*a) + end +end + +module Enumerable + def to_json(*a) + to_a.to_json(*a) + end +end + +# class Regexp +# def to_json(*) +# inspect +# end +# end +# +# The above rails definition has some problems: +# +# 1. { 'foo' => /bar/ }.to_json # => "{foo: /bar/}" +# This isn't valid JSON, because the regular expression syntax is not +# defined in RFC 4627. (And unquoted strings are disallowed there, too.) +# Though it is valid Javascript. +# +# 2. { 'foo' => /bar/mix }.to_json # => "{foo: /bar/mix}" +# This isn't even valid Javascript. + diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/common.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/common.rb new file mode 100644 index 0000000..499fcc0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/common.rb @@ -0,0 +1,354 @@ +require 'json/version' + +module JSON + class << self + # If _object_ is string-like parse the string and return the parsed result + # as a Ruby data structure. Otherwise generate a JSON text from the Ruby + # data structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively, see + # generate and parse for their documentation. + def [](object, opts = {}) + if object.respond_to? :to_str + JSON.parse(object.to_str, opts => {}) + else + JSON.generate(object, opts => {}) + end + end + + # Returns the JSON parser class, that is used by JSON. This might be either + # JSON::Ext::Parser or JSON::Pure::Parser. + attr_reader :parser + + # Set the JSON parser class _parser_ to be used by JSON. + def parser=(parser) # :nodoc: + @parser = parser + remove_const :Parser if const_defined? :Parser + const_set :Parser, parser + end + + # Return the constant located at _path_. The format of _path_ has to be + # either ::A::B::C or A::B::C. In any case A has to be located at the top + # level (absolute namespace path?). If there doesn't exist a constant at + # the given path, an ArgumentError is raised. + def deep_const_get(path) # :nodoc: + path = path.to_s + path.split(/::/).inject(Object) do |p, c| + case + when c.empty? then p + when p.const_defined?(c) then p.const_get(c) + else raise ArgumentError, "can't find const #{path}" + end + end + end + + # Set the module _generator_ to be used by JSON. + def generator=(generator) # :nodoc: + @generator = generator + generator_methods = generator::GeneratorMethods + for const in generator_methods.constants + klass = deep_const_get(const) + modul = generator_methods.const_get(const) + klass.class_eval do + instance_methods(false).each do |m| + m.to_s == 'to_json' and remove_method m + end + include modul + end + end + self.state = generator::State + const_set :State, self.state + end + + # Returns the JSON generator modul, that is used by JSON. This might be + # either JSON::Ext::Generator or JSON::Pure::Generator. + attr_reader :generator + + # Returns the JSON generator state class, that is used by JSON. This might + # be either JSON::Ext::Generator::State or JSON::Pure::Generator::State. + attr_accessor :state + + # This is create identifier, that is used to decide, if the _json_create_ + # hook of a class should be called. It defaults to 'json_class'. + attr_accessor :create_id + end + self.create_id = 'json_class' + + NaN = (-1.0) ** 0.5 + + Infinity = 1.0/0 + + MinusInfinity = -Infinity + + # The base exception for JSON errors. + class JSONError < StandardError; end + + # This exception is raised, if a parser error occurs. + class ParserError < JSONError; end + + # This exception is raised, if the nesting of parsed datastructures is too + # deep. + class NestingError < ParserError; end + + # This exception is raised, if a generator or unparser error occurs. + class GeneratorError < JSONError; end + # For backwards compatibility + UnparserError = GeneratorError + + # If a circular data structure is encountered while unparsing + # this exception is raised. + class CircularDatastructure < GeneratorError; end + + # This exception is raised, if the required unicode support is missing on the + # system. Usually this means, that the iconv library is not installed. + class MissingUnicodeSupport < JSONError; end + + module_function + + # Parse the JSON string _source_ into a Ruby data structure and return it. + # + # _opts_ can have the following + # keys: + # * *max_nesting*: The maximum depth of nesting allowed in the parsed data + # structures. Disable depth checking with :max_nesting => false, it defaults + # to 19. + # * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in + # defiance of RFC 4627 to be parsed by the Parser. This option defaults + # to false. + # * *create_additions*: If set to false, the Parser doesn't create + # additions even if a matchin class and create_id was found. This option + # defaults to true. + def parse(source, opts = {}) + JSON.parser.new(source, opts).parse + end + + # Parse the JSON string _source_ into a Ruby data structure and return it. + # The bang version of the parse method, defaults to the more dangerous values + # for the _opts_ hash, so be sure only to parse trusted _source_ strings. + # + # _opts_ can have the following keys: + # * *max_nesting*: The maximum depth of nesting allowed in the parsed data + # structures. Enable depth checking with :max_nesting => anInteger. The parse! + # methods defaults to not doing max depth checking: This can be dangerous, + # if someone wants to fill up your stack. + # * *allow_nan*: If set to true, allow NaN, Infinity, and -Infinity in + # defiance of RFC 4627 to be parsed by the Parser. This option defaults + # to true. + # * *create_additions*: If set to false, the Parser doesn't create + # additions even if a matchin class and create_id was found. This option + # defaults to true. + def parse!(source, opts = {}) + opts = { + :max_nesting => false, + :allow_nan => true + }.update(opts) + JSON.parser.new(source, opts).parse + end + + # Unparse the Ruby data structure _obj_ into a single line JSON string and + # return it. _state_ is + # * a JSON::State object, + # * or a Hash like object (responding to to_hash), + # * an object convertible into a hash by a to_h method, + # that is used as or to configure a State object. + # + # It defaults to a state object, that creates the shortest possible JSON text + # in one line, checks for circular data structures and doesn't allow NaN, + # Infinity, and -Infinity. + # + # A _state_ hash can have the following keys: + # * *indent*: a string used to indent levels (default: ''), + # * *space*: a string that is put after, a : or , delimiter (default: ''), + # * *space_before*: a string that is put before a : pair delimiter (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *array_nl*: a string that is put at the end of a JSON array (default: ''), + # * *check_circular*: true if checking for circular data structures + # should be done (the default), false otherwise. + # * *allow_nan*: true if NaN, Infinity, and -Infinity should be + # generated, otherwise an exception is thrown, if these values are + # encountered. This options defaults to false. + # * *max_nesting*: The maximum depth of nesting allowed in the data + # structures from which JSON is to be generated. Disable depth checking + # with :max_nesting => false, it defaults to 19. + # + # See also the fast_generate for the fastest creation method with the least + # amount of sanity checks, and the pretty_generate method for some + # defaults for a pretty output. + def generate(obj, state = nil) + if state + state = State.from_state(state) + else + state = State.new + end + obj.to_json(state) + end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + alias unparse generate + module_function :unparse + # :startdoc: + + # Unparse the Ruby data structure _obj_ into a single line JSON string and + # return it. This method disables the checks for circles in Ruby objects, and + # also generates NaN, Infinity, and, -Infinity float values. + # + # *WARNING*: Be careful not to pass any Ruby data structures with circles as + # _obj_ argument, because this will cause JSON to go into an infinite loop. + def fast_generate(obj) + obj.to_json(nil) + end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + alias fast_unparse fast_generate + module_function :fast_unparse + # :startdoc: + + # Unparse the Ruby data structure _obj_ into a JSON string and return it. The + # returned string is a prettier form of the string returned by #unparse. + # + # The _opts_ argument can be used to configure the generator, see the + # generate method for a more detailed explanation. + def pretty_generate(obj, opts = nil) + state = JSON.state.new( + :indent => ' ', + :space => ' ', + :object_nl => "\n", + :array_nl => "\n", + :check_circular => true + ) + if opts + if opts.respond_to? :to_hash + opts = opts.to_hash + elsif opts.respond_to? :to_h + opts = opts.to_h + else + raise TypeError, "can't convert #{opts.class} into Hash" + end + state.configure(opts) + end + obj.to_json(state) + end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + alias pretty_unparse pretty_generate + module_function :pretty_unparse + # :startdoc: + + # Load a ruby data structure from a JSON _source_ and return it. A source can + # either be a string-like object, an IO like object, or an object responding + # to the read method. If _proc_ was given, it will be called with any nested + # Ruby object as an argument recursively in depth first order. + # + # This method is part of the implementation of the load/dump interface of + # Marshal and YAML. + def load(source, proc = nil) + if source.respond_to? :to_str + source = source.to_str + elsif source.respond_to? :to_io + source = source.to_io.read + else + source = source.read + end + result = parse(source, :max_nesting => false, :allow_nan => true) + recurse_proc(result, &proc) if proc + result + end + + def recurse_proc(result, &proc) + case result + when Array + result.each { |x| recurse_proc x, &proc } + proc.call result + when Hash + result.each { |x, y| recurse_proc x, &proc; recurse_proc y, &proc } + proc.call result + else + proc.call result + end + end + private :recurse_proc + module_function :recurse_proc + + alias restore load + module_function :restore + + # Dumps _obj_ as a JSON string, i.e. calls generate on the object and returns + # the result. + # + # If anIO (an IO like object or an object that responds to the write method) + # was given, the resulting JSON is written to it. + # + # If the number of nested arrays or objects exceeds _limit_ an ArgumentError + # exception is raised. This argument is similar (but not exactly the + # same!) to the _limit_ argument in Marshal.dump. + # + # This method is part of the implementation of the load/dump interface of + # Marshal and YAML. + def dump(obj, anIO = nil, limit = nil) + if anIO and limit.nil? + anIO = anIO.to_io if anIO.respond_to?(:to_io) + unless anIO.respond_to?(:write) + limit = anIO + anIO = nil + end + end + limit ||= 0 + result = generate(obj, :allow_nan => true, :max_nesting => limit) + if anIO + anIO.write result + anIO + else + result + end + rescue JSON::NestingError + raise ArgumentError, "exceed depth limit" + end +end + +module ::Kernel + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + def j(*objs) + objs.each do |obj| + puts JSON::generate(obj, :allow_nan => true, :max_nesting => false) + end + nil + end + + # Ouputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + def jj(*objs) + objs.each do |obj| + puts JSON::pretty_generate(obj, :allow_nan => true, :max_nesting => false) + end + nil + end + + # If _object_ is string-like parse the string and return the parsed result as + # a Ruby data structure. Otherwise generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively, see + # generate and parse for their documentation. + def JSON(object, opts = {}) + if object.respond_to? :to_str + JSON.parse(object.to_str, opts) + else + JSON.generate(object, opts) + end + end +end + +class ::Class + # Returns true, if this class can be used to create an instance + # from a serialised JSON string. The class has to implement a class + # method _json_create_ that expects a hash as first parameter, which includes + # the required data. + def json_creatable? + respond_to?(:json_create) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/editor.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/editor.rb new file mode 100644 index 0000000..12a7f94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/editor.rb @@ -0,0 +1,1362 @@ +# To use the GUI JSON editor, start the edit_json.rb executable script. It +# requires ruby-gtk to be installed. + +require 'gtk2' +require 'iconv' +require 'json' +require 'rbconfig' +require 'open-uri' + +module JSON + module Editor + include Gtk + + # Beginning of the editor window title + TITLE = 'JSON Editor'.freeze + + # Columns constants + ICON_COL, TYPE_COL, CONTENT_COL = 0, 1, 2 + + # JSON primitive types (Containers) + CONTAINER_TYPES = %w[Array Hash].sort + # All JSON primitive types + ALL_TYPES = (%w[TrueClass FalseClass Numeric String NilClass] + + CONTAINER_TYPES).sort + + # The Nodes necessary for the tree representation of a JSON document + ALL_NODES = (ALL_TYPES + %w[Key]).sort + + DEFAULT_DIALOG_KEY_PRESS_HANDLER = lambda do |dialog, event| + case event.keyval + when Gdk::Keyval::GDK_Return + dialog.response Dialog::RESPONSE_ACCEPT + when Gdk::Keyval::GDK_Escape + dialog.response Dialog::RESPONSE_REJECT + end + end + + # Returns the Gdk::Pixbuf of the icon named _name_ from the icon cache. + def Editor.fetch_icon(name) + @icon_cache ||= {} + unless @icon_cache.key?(name) + path = File.dirname(__FILE__) + @icon_cache[name] = Gdk::Pixbuf.new(File.join(path, name + '.xpm')) + end + @icon_cache[name] + end + + # Opens an error dialog on top of _window_ showing the error message + # _text_. + def Editor.error_dialog(window, text) + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::ERROR, + MessageDialog::BUTTONS_CLOSE, text) + dialog.show_all + dialog.run + rescue TypeError + dialog = MessageDialog.new(Editor.window, Dialog::MODAL, + MessageDialog::ERROR, + MessageDialog::BUTTONS_CLOSE, text) + dialog.show_all + dialog.run + ensure + dialog.destroy if dialog + end + + # Opens a yes/no question dialog on top of _window_ showing the error + # message _text_. If yes was answered _true_ is returned, otherwise + # _false_. + def Editor.question_dialog(window, text) + dialog = MessageDialog.new(window, Dialog::MODAL, + MessageDialog::QUESTION, + MessageDialog::BUTTONS_YES_NO, text) + dialog.show_all + dialog.run do |response| + return Gtk::Dialog::RESPONSE_YES === response + end + ensure + dialog.destroy if dialog + end + + # Convert the tree model starting from Gtk::TreeIter _iter_ into a Ruby + # data structure and return it. + def Editor.model2data(iter) + return nil if iter.nil? + case iter.type + when 'Hash' + hash = {} + iter.each { |c| hash[c.content] = Editor.model2data(c.first_child) } + hash + when 'Array' + array = Array.new(iter.n_children) + iter.each_with_index { |c, i| array[i] = Editor.model2data(c) } + array + when 'Key' + iter.content + when 'String' + iter.content + when 'Numeric' + content = iter.content + if /\./.match(content) + content.to_f + else + content.to_i + end + when 'TrueClass' + true + when 'FalseClass' + false + when 'NilClass' + nil + else + fail "Unknown type found in model: #{iter.type}" + end + end + + # Convert the Ruby data structure _data_ into tree model data for Gtk and + # returns the whole model. If the parameter _model_ wasn't given a new + # Gtk::TreeStore is created as the model. The _parent_ parameter specifies + # the parent node (iter, Gtk:TreeIter instance) to which the data is + # appended, alternativeley the result of the yielded block is used as iter. + def Editor.data2model(data, model = nil, parent = nil) + model ||= TreeStore.new(Gdk::Pixbuf, String, String) + iter = if block_given? + yield model + else + model.append(parent) + end + case data + when Hash + iter.type = 'Hash' + data.sort.each do |key, value| + pair_iter = model.append(iter) + pair_iter.type = 'Key' + pair_iter.content = key.to_s + Editor.data2model(value, model, pair_iter) + end + when Array + iter.type = 'Array' + data.each do |value| + Editor.data2model(value, model, iter) + end + when Numeric + iter.type = 'Numeric' + iter.content = data.to_s + when String, true, false, nil + iter.type = data.class.name + iter.content = data.nil? ? 'null' : data.to_s + else + iter.type = 'String' + iter.content = data.to_s + end + model + end + + # The Gtk::TreeIter class is reopened and some auxiliary methods are added. + class Gtk::TreeIter + include Enumerable + + # Traverse each of this Gtk::TreeIter instance's children + # and yield to them. + def each + n_children.times { |i| yield nth_child(i) } + end + + # Recursively traverse all nodes of this Gtk::TreeIter's subtree + # (including self) and yield to them. + def recursive_each(&block) + yield self + each do |i| + i.recursive_each(&block) + end + end + + # Remove the subtree of this Gtk::TreeIter instance from the + # model _model_. + def remove_subtree(model) + while current = first_child + model.remove(current) + end + end + + # Returns the type of this node. + def type + self[TYPE_COL] + end + + # Sets the type of this node to _value_. This implies setting + # the respective icon accordingly. + def type=(value) + self[TYPE_COL] = value + self[ICON_COL] = Editor.fetch_icon(value) + end + + # Returns the content of this node. + def content + self[CONTENT_COL] + end + + # Sets the content of this node to _value_. + def content=(value) + self[CONTENT_COL] = value + end + end + + # This module bundles some method, that can be used to create a menu. It + # should be included into the class in question. + module MenuExtension + include Gtk + + # Creates a Menu, that includes MenuExtension. _treeview_ is the + # Gtk::TreeView, on which it operates. + def initialize(treeview) + @treeview = treeview + @menu = Menu.new + end + + # Returns the Gtk::TreeView of this menu. + attr_reader :treeview + + # Returns the menu. + attr_reader :menu + + # Adds a Gtk::SeparatorMenuItem to this instance's #menu. + def add_separator + menu.append SeparatorMenuItem.new + end + + # Adds a Gtk::MenuItem to this instance's #menu. _label_ is the label + # string, _klass_ is the item type, and _callback_ is the procedure, that + # is called if the _item_ is activated. + def add_item(label, keyval = nil, klass = MenuItem, &callback) + label = "#{label} (C-#{keyval.chr})" if keyval + item = klass.new(label) + item.signal_connect(:activate, &callback) + if keyval + self.signal_connect(:'key-press-event') do |item, event| + if event.state & Gdk::Window::ModifierType::CONTROL_MASK != 0 and + event.keyval == keyval + callback.call item + end + end + end + menu.append item + item + end + + # This method should be implemented in subclasses to create the #menu of + # this instance. It has to be called after an instance of this class is + # created, to build the menu. + def create + raise NotImplementedError + end + + def method_missing(*a, &b) + treeview.__send__(*a, &b) + end + end + + # This class creates the popup menu, that opens when clicking onto the + # treeview. + class PopUpMenu + include MenuExtension + + # Change the type or content of the selected node. + def change_node(item) + if current = selection.selected + parent = current.parent + old_type, old_content = current.type, current.content + if ALL_TYPES.include?(old_type) + @clipboard_data = Editor.model2data(current) + type, content = ask_for_element(parent, current.type, + current.content) + if type + current.type, current.content = type, content + current.remove_subtree(model) + toplevel.display_status("Changed a node in tree.") + window.change + end + else + toplevel.display_status( + "Cannot change node of type #{old_type} in tree!") + end + end + end + + # Cut the selected node and its subtree, and save it into the + # clipboard. + def cut_node(item) + if current = selection.selected + if current and current.type == 'Key' + @clipboard_data = { + current.content => Editor.model2data(current.first_child) + } + else + @clipboard_data = Editor.model2data(current) + end + model.remove(current) + window.change + toplevel.display_status("Cut a node from tree.") + end + end + + # Copy the selected node and its subtree, and save it into the + # clipboard. + def copy_node(item) + if current = selection.selected + if current and current.type == 'Key' + @clipboard_data = { + current.content => Editor.model2data(current.first_child) + } + else + @clipboard_data = Editor.model2data(current) + end + window.change + toplevel.display_status("Copied a node from tree.") + end + end + + # Paste the data in the clipboard into the selected Array or Hash by + # appending it. + def paste_node_appending(item) + if current = selection.selected + if @clipboard_data + case current.type + when 'Array' + Editor.data2model(@clipboard_data, model, current) + expand_collapse(current) + when 'Hash' + if @clipboard_data.is_a? Hash + parent = current.parent + hash = Editor.model2data(current) + model.remove(current) + hash.update(@clipboard_data) + Editor.data2model(hash, model, parent) + if parent + expand_collapse(parent) + elsif @expanded + expand_all + end + window.change + else + toplevel.display_status( + "Cannot paste non-#{current.type} data into '#{current.type}'!") + end + else + toplevel.display_status( + "Cannot paste node below '#{current.type}'!") + end + else + toplevel.display_status("Nothing to paste in clipboard!") + end + else + toplevel.display_status("Append a node into the root first!") + end + end + + # Paste the data in the clipboard into the selected Array inserting it + # before the selected element. + def paste_node_inserting_before(item) + if current = selection.selected + if @clipboard_data + parent = current.parent or return + parent_type = parent.type + if parent_type == 'Array' + selected_index = parent.each_with_index do |c, i| + break i if c == current + end + Editor.data2model(@clipboard_data, model, parent) do |m| + m.insert_before(parent, current) + end + expand_collapse(current) + toplevel.display_status("Inserted an element to " + + "'#{parent_type}' before index #{selected_index}.") + window.change + else + toplevel.display_status( + "Cannot insert node below '#{parent_type}'!") + end + else + toplevel.display_status("Nothing to paste in clipboard!") + end + else + toplevel.display_status("Append a node into the root first!") + end + end + + # Append a new node to the selected Hash or Array. + def append_new_node(item) + if parent = selection.selected + parent_type = parent.type + case parent_type + when 'Hash' + key, type, content = ask_for_hash_pair(parent) + key or return + iter = create_node(parent, 'Key', key) + iter = create_node(iter, type, content) + toplevel.display_status( + "Added a (key, value)-pair to '#{parent_type}'.") + window.change + when 'Array' + type, content = ask_for_element(parent) + type or return + iter = create_node(parent, type, content) + window.change + toplevel.display_status("Appendend an element to '#{parent_type}'.") + else + toplevel.display_status("Cannot append to '#{parent_type}'!") + end + else + type, content = ask_for_element + type or return + iter = create_node(nil, type, content) + window.change + end + end + + # Insert a new node into an Array before the selected element. + def insert_new_node(item) + if current = selection.selected + parent = current.parent or return + parent_parent = parent.parent + parent_type = parent.type + if parent_type == 'Array' + selected_index = parent.each_with_index do |c, i| + break i if c == current + end + type, content = ask_for_element(parent) + type or return + iter = model.insert_before(parent, current) + iter.type, iter.content = type, content + toplevel.display_status("Inserted an element to " + + "'#{parent_type}' before index #{selected_index}.") + window.change + else + toplevel.display_status( + "Cannot insert node below '#{parent_type}'!") + end + else + toplevel.display_status("Append a node into the root first!") + end + end + + # Recursively collapse/expand a subtree starting from the selected node. + def collapse_expand(item) + if current = selection.selected + if row_expanded?(current.path) + collapse_row(current.path) + else + expand_row(current.path, true) + end + else + toplevel.display_status("Append a node into the root first!") + end + end + + # Create the menu. + def create + add_item("Change node", ?n, &method(:change_node)) + add_separator + add_item("Cut node", ?X, &method(:cut_node)) + add_item("Copy node", ?C, &method(:copy_node)) + add_item("Paste node (appending)", ?A, &method(:paste_node_appending)) + add_item("Paste node (inserting before)", ?I, + &method(:paste_node_inserting_before)) + add_separator + add_item("Append new node", ?a, &method(:append_new_node)) + add_item("Insert new node before", ?i, &method(:insert_new_node)) + add_separator + add_item("Collapse/Expand node (recursively)", ?e, + &method(:collapse_expand)) + + menu.show_all + signal_connect(:button_press_event) do |widget, event| + if event.kind_of? Gdk::EventButton and event.button == 3 + menu.popup(nil, nil, event.button, event.time) + end + end + signal_connect(:popup_menu) do + menu.popup(nil, nil, 0, Gdk::Event::CURRENT_TIME) + end + end + end + + # This class creates the File pulldown menu. + class FileMenu + include MenuExtension + + # Clear the model and filename, but ask to save the JSON document, if + # unsaved changes have occured. + def new(item) + window.clear + end + + # Open a file and load it into the editor. Ask to save the JSON document + # first, if unsaved changes have occured. + def open(item) + window.file_open + end + + def open_location(item) + window.location_open + end + + # Revert the current JSON document in the editor to the saved version. + def revert(item) + window.instance_eval do + @filename and file_open(@filename) + end + end + + # Save the current JSON document. + def save(item) + window.file_save + end + + # Save the current JSON document under the given filename. + def save_as(item) + window.file_save_as + end + + # Quit the editor, after asking to save any unsaved changes first. + def quit(item) + window.quit + end + + # Create the menu. + def create + title = MenuItem.new('File') + title.submenu = menu + add_item('New', &method(:new)) + add_item('Open', ?o, &method(:open)) + add_item('Open location', ?l, &method(:open_location)) + add_item('Revert', &method(:revert)) + add_separator + add_item('Save', ?s, &method(:save)) + add_item('Save As', ?S, &method(:save_as)) + add_separator + add_item('Quit', ?q, &method(:quit)) + title + end + end + + # This class creates the Edit pulldown menu. + class EditMenu + include MenuExtension + + # Copy data from model into primary clipboard. + def copy(item) + data = Editor.model2data(model.iter_first) + json = JSON.pretty_generate(data, :max_nesting => false) + c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY) + c.text = json + end + + # Copy json text from primary clipboard into model. + def paste(item) + c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY) + if json = c.wait_for_text + window.ask_save if @changed + begin + window.edit json + rescue JSON::ParserError + window.clear + end + end + end + + # Find a string in all nodes' contents and select the found node in the + # treeview. + def find(item) + @search = ask_for_find_term(@search) or return + iter = model.get_iter('0') or return + iter.recursive_each do |i| + if @iter + if @iter != i + next + else + @iter = nil + next + end + elsif @search.match(i[CONTENT_COL]) + set_cursor(i.path, nil, false) + @iter = i + break + end + end + end + + # Repeat the last search given by #find. + def find_again(item) + @search or return + iter = model.get_iter('0') + iter.recursive_each do |i| + if @iter + if @iter != i + next + else + @iter = nil + next + end + elsif @search.match(i[CONTENT_COL]) + set_cursor(i.path, nil, false) + @iter = i + break + end + end + end + + # Sort (Reverse sort) all elements of the selected array by the given + # expression. _x_ is the element in question. + def sort(item) + if current = selection.selected + if current.type == 'Array' + parent = current.parent + ary = Editor.model2data(current) + order, reverse = ask_for_order + order or return + begin + block = eval "lambda { |x| #{order} }" + if reverse + ary.sort! { |a,b| block[b] <=> block[a] } + else + ary.sort! { |a,b| block[a] <=> block[b] } + end + rescue => e + Editor.error_dialog(self, "Failed to sort Array with #{order}: #{e}!") + else + Editor.data2model(ary, model, parent) do |m| + m.insert_before(parent, current) + end + model.remove(current) + expand_collapse(parent) + window.change + toplevel.display_status("Array has been sorted.") + end + else + toplevel.display_status("Only Array nodes can be sorted!") + end + else + toplevel.display_status("Select an Array to sort first!") + end + end + + # Create the menu. + def create + title = MenuItem.new('Edit') + title.submenu = menu + add_item('Copy', ?c, &method(:copy)) + add_item('Paste', ?v, &method(:paste)) + add_separator + add_item('Find', ?f, &method(:find)) + add_item('Find Again', ?g, &method(:find_again)) + add_separator + add_item('Sort', ?S, &method(:sort)) + title + end + end + + class OptionsMenu + include MenuExtension + + # Collapse/Expand all nodes by default. + def collapsed_nodes(item) + if expanded + self.expanded = false + collapse_all + else + self.expanded = true + expand_all + end + end + + # Toggle pretty saving mode on/off. + def pretty_saving(item) + @pretty_item.toggled + window.change + end + + attr_reader :pretty_item + + # Create the menu. + def create + title = MenuItem.new('Options') + title.submenu = menu + add_item('Collapsed nodes', nil, CheckMenuItem, &method(:collapsed_nodes)) + @pretty_item = add_item('Pretty saving', nil, CheckMenuItem, + &method(:pretty_saving)) + @pretty_item.active = true + window.unchange + title + end + end + + # This class inherits from Gtk::TreeView, to configure it and to add a lot + # of behaviour to it. + class JSONTreeView < Gtk::TreeView + include Gtk + + # Creates a JSONTreeView instance, the parameter _window_ is + # a MainWindow instance and used for self delegation. + def initialize(window) + @window = window + super(TreeStore.new(Gdk::Pixbuf, String, String)) + self.selection.mode = SELECTION_BROWSE + + @expanded = false + self.headers_visible = false + add_columns + add_popup_menu + end + + # Returns the MainWindow instance of this JSONTreeView. + attr_reader :window + + # Returns true, if nodes are autoexpanding, false otherwise. + attr_accessor :expanded + + private + + def add_columns + cell = CellRendererPixbuf.new + column = TreeViewColumn.new('Icon', cell, + 'pixbuf' => ICON_COL + ) + append_column(column) + + cell = CellRendererText.new + column = TreeViewColumn.new('Type', cell, + 'text' => TYPE_COL + ) + append_column(column) + + cell = CellRendererText.new + cell.editable = true + column = TreeViewColumn.new('Content', cell, + 'text' => CONTENT_COL + ) + cell.signal_connect(:edited, &method(:cell_edited)) + append_column(column) + end + + def unify_key(iter, key) + return unless iter.type == 'Key' + parent = iter.parent + if parent.any? { |c| c != iter and c.content == key } + old_key = key + i = 0 + begin + key = sprintf("%s.%d", old_key, i += 1) + end while parent.any? { |c| c != iter and c.content == key } + end + iter.content = key + end + + def cell_edited(cell, path, value) + iter = model.get_iter(path) + case iter.type + when 'Key' + unify_key(iter, value) + toplevel.display_status('Key has been changed.') + when 'FalseClass' + value.downcase! + if value == 'true' + iter.type, iter.content = 'TrueClass', 'true' + end + when 'TrueClass' + value.downcase! + if value == 'false' + iter.type, iter.content = 'FalseClass', 'false' + end + when 'Numeric' + iter.content = (Integer(value) rescue Float(value) rescue 0).to_s + when 'String' + iter.content = value + when 'Hash', 'Array' + return + else + fail "Unknown type found in model: #{iter.type}" + end + window.change + end + + def configure_value(value, type) + value.editable = false + case type + when 'Array', 'Hash' + value.text = '' + when 'TrueClass' + value.text = 'true' + when 'FalseClass' + value.text = 'false' + when 'NilClass' + value.text = 'null' + when 'Numeric', 'String' + value.text ||= '' + value.editable = true + else + raise ArgumentError, "unknown type '#{type}' encountered" + end + end + + def add_popup_menu + menu = PopUpMenu.new(self) + menu.create + end + + public + + # Create a _type_ node with content _content_, and add it to _parent_ + # in the model. If _parent_ is nil, create a new model and put it into + # the editor treeview. + def create_node(parent, type, content) + iter = if parent + model.append(parent) + else + new_model = Editor.data2model(nil) + toplevel.view_new_model(new_model) + new_model.iter_first + end + iter.type, iter.content = type, content + expand_collapse(parent) if parent + iter + end + + # Ask for a hash key, value pair to be added to the Hash node _parent_. + def ask_for_hash_pair(parent) + key_input = type_input = value_input = nil + + dialog = Dialog.new("New (key, value) pair for Hash", nil, nil, + [ Stock::OK, Dialog::RESPONSE_ACCEPT ], + [ Stock::CANCEL, Dialog::RESPONSE_REJECT ] + ) + dialog.width_request = 640 + + hbox = HBox.new(false, 5) + hbox.pack_start(Label.new("Key:"), false) + hbox.pack_start(key_input = Entry.new) + key_input.text = @key || '' + dialog.vbox.pack_start(hbox, false) + key_input.signal_connect(:activate) do + if parent.any? { |c| c.content == key_input.text } + toplevel.display_status('Key already exists in Hash!') + key_input.text = '' + else + toplevel.display_status('Key has been changed.') + end + end + + hbox = HBox.new(false, 5) + hbox.pack_start(Label.new("Type:"), false) + hbox.pack_start(type_input = ComboBox.new(true)) + ALL_TYPES.each { |t| type_input.append_text(t) } + type_input.active = @type || 0 + dialog.vbox.pack_start(hbox, false) + + type_input.signal_connect(:changed) do + value_input.editable = false + case ALL_TYPES[type_input.active] + when 'Array', 'Hash' + value_input.text = '' + when 'TrueClass' + value_input.text = 'true' + when 'FalseClass' + value_input.text = 'false' + when 'NilClass' + value_input.text = 'null' + else + value_input.text = '' + value_input.editable = true + end + end + + hbox = HBox.new(false, 5) + hbox.pack_start(Label.new("Value:"), false) + hbox.pack_start(value_input = Entry.new) + value_input.width_chars = 60 + value_input.text = @value || '' + dialog.vbox.pack_start(hbox, false) + + dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) + dialog.show_all + self.focus = dialog + dialog.run do |response| + if response == Dialog::RESPONSE_ACCEPT + @key = key_input.text + type = ALL_TYPES[@type = type_input.active] + content = value_input.text + return @key, type, content + end + end + return + ensure + dialog.destroy + end + + # Ask for an element to be appended _parent_. + def ask_for_element(parent = nil, default_type = nil, value_text = @content) + type_input = value_input = nil + + dialog = Dialog.new( + "New element into #{parent ? parent.type : 'root'}", + nil, nil, + [ Stock::OK, Dialog::RESPONSE_ACCEPT ], + [ Stock::CANCEL, Dialog::RESPONSE_REJECT ] + ) + hbox = HBox.new(false, 5) + hbox.pack_start(Label.new("Type:"), false) + hbox.pack_start(type_input = ComboBox.new(true)) + default_active = 0 + types = parent ? ALL_TYPES : CONTAINER_TYPES + types.each_with_index do |t, i| + type_input.append_text(t) + if t == default_type + default_active = i + end + end + type_input.active = default_active + dialog.vbox.pack_start(hbox, false) + type_input.signal_connect(:changed) do + configure_value(value_input, types[type_input.active]) + end + + hbox = HBox.new(false, 5) + hbox.pack_start(Label.new("Value:"), false) + hbox.pack_start(value_input = Entry.new) + value_input.width_chars = 60 + value_input.text = value_text if value_text + configure_value(value_input, types[type_input.active]) + + dialog.vbox.pack_start(hbox, false) + + dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) + dialog.show_all + self.focus = dialog + dialog.run do |response| + if response == Dialog::RESPONSE_ACCEPT + type = types[type_input.active] + @content = case type + when 'Numeric' + Integer(value_input.text) rescue Float(value_input.text) rescue 0 + else + value_input.text + end.to_s + return type, @content + end + end + return + ensure + dialog.destroy if dialog + end + + # Ask for an order criteria for sorting, using _x_ for the element in + # question. Returns the order criterium, and true/false for reverse + # sorting. + def ask_for_order + dialog = Dialog.new( + "Give an order criterium for 'x'.", + nil, nil, + [ Stock::OK, Dialog::RESPONSE_ACCEPT ], + [ Stock::CANCEL, Dialog::RESPONSE_REJECT ] + ) + hbox = HBox.new(false, 5) + + hbox.pack_start(Label.new("Order:"), false) + hbox.pack_start(order_input = Entry.new) + order_input.text = @order || 'x' + order_input.width_chars = 60 + + hbox.pack_start(reverse_checkbox = CheckButton.new('Reverse'), false) + + dialog.vbox.pack_start(hbox, false) + + dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) + dialog.show_all + self.focus = dialog + dialog.run do |response| + if response == Dialog::RESPONSE_ACCEPT + return @order = order_input.text, reverse_checkbox.active? + end + end + return + ensure + dialog.destroy if dialog + end + + # Ask for a find term to search for in the tree. Returns the term as a + # string. + def ask_for_find_term(search = nil) + dialog = Dialog.new( + "Find a node matching regex in tree.", + nil, nil, + [ Stock::OK, Dialog::RESPONSE_ACCEPT ], + [ Stock::CANCEL, Dialog::RESPONSE_REJECT ] + ) + hbox = HBox.new(false, 5) + + hbox.pack_start(Label.new("Regex:"), false) + hbox.pack_start(regex_input = Entry.new) + hbox.pack_start(icase_checkbox = CheckButton.new('Icase'), false) + regex_input.width_chars = 60 + if search + regex_input.text = search.source + icase_checkbox.active = search.casefold? + end + + dialog.vbox.pack_start(hbox, false) + + dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) + dialog.show_all + self.focus = dialog + dialog.run do |response| + if response == Dialog::RESPONSE_ACCEPT + begin + return Regexp.new(regex_input.text, icase_checkbox.active? ? Regexp::IGNORECASE : 0) + rescue => e + Editor.error_dialog(self, "Evaluation of regex /#{regex_input.text}/ failed: #{e}!") + return + end + end + end + return + ensure + dialog.destroy if dialog + end + + # Expand or collapse row pointed to by _iter_ according + # to the #expanded attribute. + def expand_collapse(iter) + if expanded + expand_row(iter.path, true) + else + collapse_row(iter.path) + end + end + end + + # The editor main window + class MainWindow < Gtk::Window + include Gtk + + def initialize(encoding) + @changed = false + @encoding = encoding + super(TOPLEVEL) + display_title + set_default_size(800, 600) + signal_connect(:delete_event) { quit } + + vbox = VBox.new(false, 0) + add(vbox) + #vbox.border_width = 0 + + @treeview = JSONTreeView.new(self) + @treeview.signal_connect(:'cursor-changed') do + display_status('') + end + + menu_bar = create_menu_bar + vbox.pack_start(menu_bar, false, false, 0) + + sw = ScrolledWindow.new(nil, nil) + sw.shadow_type = SHADOW_ETCHED_IN + sw.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + vbox.pack_start(sw, true, true, 0) + sw.add(@treeview) + + @status_bar = Statusbar.new + vbox.pack_start(@status_bar, false, false, 0) + + @filename ||= nil + if @filename + data = read_data(@filename) + view_new_model Editor.data2model(data) + end + + signal_connect(:button_release_event) do |_,event| + if event.button == 2 + c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY) + if url = c.wait_for_text + location_open url + end + false + else + true + end + end + end + + # Creates the menu bar with the pulldown menus and returns it. + def create_menu_bar + menu_bar = MenuBar.new + @file_menu = FileMenu.new(@treeview) + menu_bar.append @file_menu.create + @edit_menu = EditMenu.new(@treeview) + menu_bar.append @edit_menu.create + @options_menu = OptionsMenu.new(@treeview) + menu_bar.append @options_menu.create + menu_bar + end + + # Sets editor status to changed, to indicate that the edited data + # containts unsaved changes. + def change + @changed = true + display_title + end + + # Sets editor status to unchanged, to indicate that the edited data + # doesn't containt unsaved changes. + def unchange + @changed = false + display_title + end + + # Puts a new model _model_ into the Gtk::TreeView to be edited. + def view_new_model(model) + @treeview.model = model + @treeview.expanded = true + @treeview.expand_all + unchange + end + + # Displays _text_ in the status bar. + def display_status(text) + @cid ||= nil + @status_bar.pop(@cid) if @cid + @cid = @status_bar.get_context_id('dummy') + @status_bar.push(@cid, text) + end + + # Opens a dialog, asking, if changes should be saved to a file. + def ask_save + if Editor.question_dialog(self, + "Unsaved changes to JSON model. Save?") + if @filename + file_save + else + file_save_as + end + end + end + + # Quit this editor, that is, leave this editor's main loop. + def quit + ask_save if @changed + if Gtk.main_level > 0 + destroy + Gtk.main_quit + end + nil + end + + # Display the new title according to the editor's current state. + def display_title + title = TITLE.dup + title << ": #@filename" if @filename + title << " *" if @changed + self.title = title + end + + # Clear the current model, after asking to save all unsaved changes. + def clear + ask_save if @changed + @filename = nil + self.view_new_model nil + end + + def check_pretty_printed(json) + pretty = !!((nl_index = json.index("\n")) && nl_index != json.size - 1) + @options_menu.pretty_item.active = pretty + end + private :check_pretty_printed + + # Open the data at the location _uri_, if given. Otherwise open a dialog + # to ask for the _uri_. + def location_open(uri = nil) + uri = ask_for_location unless uri + uri or return + ask_save if @changed + data = load_location(uri) or return + view_new_model Editor.data2model(data) + end + + # Open the file _filename_ or call the #select_file method to ask for a + # filename. + def file_open(filename = nil) + filename = select_file('Open as a JSON file') unless filename + data = load_file(filename) or return + view_new_model Editor.data2model(data) + end + + # Edit the string _json_ in the editor. + def edit(json) + if json.respond_to? :read + json = json.read + end + data = parse_json json + view_new_model Editor.data2model(data) + end + + # Save the current file. + def file_save + if @filename + store_file(@filename) + else + file_save_as + end + end + + # Save the current file as the filename + def file_save_as + filename = select_file('Save as a JSON file') + store_file(filename) + end + + # Store the current JSON document to _path_. + def store_file(path) + if path + data = Editor.model2data(@treeview.model.iter_first) + File.open(path + '.tmp', 'wb') do |output| + data or break + if @options_menu.pretty_item.active? + output.puts JSON.pretty_generate(data, :max_nesting => false) + else + output.write JSON.generate(data, :max_nesting => false) + end + end + File.rename path + '.tmp', path + @filename = path + toplevel.display_status("Saved data to '#@filename'.") + unchange + end + rescue SystemCallError => e + Editor.error_dialog(self, "Failed to store JSON file: #{e}!") + end + + # Load the file named _filename_ into the editor as a JSON document. + def load_file(filename) + if filename + if File.directory?(filename) + Editor.error_dialog(self, "Try to select a JSON file!") + nil + else + @filename = filename + if data = read_data(filename) + toplevel.display_status("Loaded data from '#@filename'.") + end + display_title + data + end + end + end + + # Load the data at location _uri_ into the editor as a JSON document. + def load_location(uri) + data = read_data(uri) or return + @filename = nil + toplevel.display_status("Loaded data from '#{uri}'.") + display_title + data + end + + def parse_json(json) + check_pretty_printed(json) + if @encoding && !/^utf8$/i.match(@encoding) + iconverter = Iconv.new('utf8', @encoding) + json = iconverter.iconv(json) + end + JSON::parse(json, :max_nesting => false, :create_additions => false) + end + private :parse_json + + # Read a JSON document from the file named _filename_, parse it into a + # ruby data structure, and return the data. + def read_data(filename) + open(filename) do |f| + json = f.read + return parse_json(json) + end + rescue => e + Editor.error_dialog(self, "Failed to parse JSON file: #{e}!") + return + end + + # Open a file selecton dialog, displaying _message_, and return the + # selected filename or nil, if no file was selected. + def select_file(message) + filename = nil + fs = FileSelection.new(message) + fs.set_modal(true) + @default_dir = File.join(Dir.pwd, '') unless @default_dir + fs.set_filename(@default_dir) + fs.set_transient_for(self) + fs.signal_connect(:destroy) { Gtk.main_quit } + fs.ok_button.signal_connect(:clicked) do + filename = fs.filename + @default_dir = File.join(File.dirname(filename), '') + fs.destroy + Gtk.main_quit + end + fs.cancel_button.signal_connect(:clicked) do + fs.destroy + Gtk.main_quit + end + fs.show_all + Gtk.main + filename + end + + # Ask for location URI a to load data from. Returns the URI as a string. + def ask_for_location + dialog = Dialog.new( + "Load data from location...", + nil, nil, + [ Stock::OK, Dialog::RESPONSE_ACCEPT ], + [ Stock::CANCEL, Dialog::RESPONSE_REJECT ] + ) + hbox = HBox.new(false, 5) + + hbox.pack_start(Label.new("Location:"), false) + hbox.pack_start(location_input = Entry.new) + location_input.width_chars = 60 + location_input.text = @location || '' + + dialog.vbox.pack_start(hbox, false) + + dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER) + dialog.show_all + dialog.run do |response| + if response == Dialog::RESPONSE_ACCEPT + return @location = location_input.text + end + end + return + ensure + dialog.destroy if dialog + end + end + + class << self + # Starts a JSON Editor. If a block was given, it yields + # to the JSON::Editor::MainWindow instance. + def start(encoding = 'utf8') # :yield: window + Gtk.init + @window = Editor::MainWindow.new(encoding) + @window.icon_list = [ Editor.fetch_icon('json') ] + yield @window if block_given? + @window.show_all + Gtk.main + end + + # Edit the string _json_ with encoding _encoding_ in the editor. + def edit(json, encoding = 'utf8') + start(encoding) do |window| + window.edit json + end + end + + attr_reader :window + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/ext.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/ext.rb new file mode 100644 index 0000000..ff4fa42 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/ext.rb @@ -0,0 +1,13 @@ +require 'json/common' + +module JSON + # This module holds all the modules/classes that implement JSON's + # functionality as C extensions. + module Ext + require 'json/ext/parser' + require 'json/ext/generator' + $DEBUG and warn "Using c extension for JSON." + JSON.parser = Parser + JSON.generator = Generator + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/json.xpm b/lib/ruby-1.9.1-rc1/ext/json/lib/json/json.xpm new file mode 100644 index 0000000..2cb626b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/json.xpm @@ -0,0 +1,1499 @@ +/* XPM */ +static char * json_xpm[] = { +"64 64 1432 2", +" c None", +". c #641839", +"+ c #CF163C", +"@ c #D31C3B", +"# c #E11A38", +"$ c #5F242D", +"% c #320C22", +"& c #9B532D", +"* c #F32E34", +"= c #820F33", +"- c #4B0F34", +"; c #8E1237", +"> c #944029", +", c #961325", +"' c #A00C24", +") c #872C23", +"! c #694021", +"~ c #590D1F", +"{ c #420528", +"] c #D85A2D", +"^ c #7E092B", +"/ c #0E0925", +"( c #0D081F", +"_ c #0F081E", +": c #12071F", +"< c #360620", +"[ c #682A21", +"} c #673F21", +"| c #780E21", +"1 c #A82320", +"2 c #8D1D1F", +"3 c #970127", +"4 c #0D0123", +"5 c #0D0324", +"6 c #3B1E28", +"7 c #C28429", +"8 c #0C0523", +"9 c #0C041E", +"0 c #0E031A", +"a c #11031A", +"b c #13031B", +"c c #13031C", +"d c #11031D", +"e c #19051E", +"f c #390E20", +"g c #9C0C20", +"h c #C00721", +"i c #980320", +"j c #14031E", +"k c #CD9F32", +"l c #C29F2E", +"m c #0F0325", +"n c #0D0321", +"o c #0E0324", +"p c #D08329", +"q c #9D1B27", +"r c #1C0320", +"s c #0D011A", +"t c #120117", +"u c #130017", +"v c #150018", +"w c #160119", +"x c #17021A", +"y c #15021B", +"z c #11021E", +"A c #0F021F", +"B c #8C1821", +"C c #CF4522", +"D c #831821", +"E c #BA7033", +"F c #EDB339", +"G c #C89733", +"H c #280727", +"I c #0F051F", +"J c #0E0420", +"K c #591F27", +"L c #E47129", +"M c #612224", +"N c #0C021D", +"O c #120018", +"P c #140017", +"Q c #170017", +"R c #190018", +"S c #1B0019", +"T c #1B011A", +"U c #18011B", +"V c #15011C", +"W c #12031E", +"X c #460A21", +"Y c #A13823", +"Z c #784323", +"` c #5A0C21", +" . c #BC4530", +".. c #EB5B38", +"+. c #CE4E3B", +"@. c #DD9334", +"#. c #751A27", +"$. c #11071E", +"%. c #0F041C", +"&. c #1E0824", +"*. c #955A28", +"=. c #9A5027", +"-. c #1E0321", +";. c #11011A", +">. c #140018", +",. c #180018", +"'. c #1F001A", +"). c #20001B", +"!. c #1E001A", +"~. c #1B001A", +"{. c #16021B", +"]. c #16041E", +"^. c #220622", +"/. c #5F3525", +"(. c #DE5724", +"_. c #611021", +":. c #0F0925", +"<. c #D1892E", +"[. c #F27036", +"}. c #EC633B", +"|. c #DA293C", +"1. c #E64833", +"2. c #912226", +"3. c #11081C", +"4. c #110419", +"5. c #0F041E", +"6. c #451425", +"7. c #BF6F28", +"8. c #332225", +"9. c #0E021E", +"0. c #13001B", +"a. c #17001A", +"b. c #1C001B", +"c. c #21001C", +"d. c #23001C", +"e. c #21001B", +"f. c #19021A", +"g. c #17041E", +"h. c #150721", +"i. c #602424", +"j. c #D51223", +"k. c #540820", +"l. c #D04D2D", +"m. c #EA8933", +"n. c #875637", +"o. c #88543A", +"p. c #E5923A", +"q. c #891931", +"r. c #130B25", +"s. c #10051B", +"t. c #110217", +"u. c #12021A", +"v. c #761826", +"w. c #E2A728", +"x. c #300224", +"y. c #10011E", +"z. c #16001B", +"A. c #1B001B", +"B. c #21001A", +"C. c #1E0019", +"D. c #1D0019", +"E. c #1A011A", +"F. c #17031C", +"G. c #120720", +"H. c #4E0822", +"I. c #670721", +"J. c #C07630", +"K. c #F59734", +"L. c #BE1B35", +"M. c #0E1435", +"N. c #522037", +"O. c #DB8039", +"P. c #D45933", +"Q. c #420927", +"R. c #0F041D", +"S. c #140118", +"T. c #13021D", +"U. c #100423", +"V. c #7B6227", +"W. c #C04326", +"X. c #0E0020", +"Y. c #13001D", +"Z. c #18001B", +"`. c #1E001B", +" + c #22001C", +".+ c #22001B", +"++ c #1B011B", +"@+ c #16041D", +"#+ c #130520", +"$+ c #860521", +"%+ c #710520", +"&+ c #670A2A", +"*+ c #A66431", +"=+ c #E97536", +"-+ c #F8833A", +";+ c #F77A3A", +">+ c #C45337", +",+ c #0A1C35", +"'+ c #993638", +")+ c #F7863B", +"!+ c #F49736", +"~+ c #94462B", +"{+ c #0E031F", +"]+ c #130119", +"^+ c #160018", +"/+ c #16011B", +"(+ c #15021F", +"_+ c #120123", +":+ c #A65C28", +"<+ c #5C4D23", +"[+ c #0F001F", +"}+ c #14001D", +"|+ c #1A001B", +"1+ c #1F001B", +"2+ c #24001D", +"3+ c #25001D", +"4+ c #24001C", +"5+ c #1F001C", +"6+ c #1A011C", +"7+ c #16021E", +"8+ c #3F0421", +"9+ c #BC0522", +"0+ c #1C041E", +"a+ c #7F5531", +"b+ c #E68A38", +"c+ c #F8933E", +"d+ c #FA7942", +"e+ c #FB7543", +"f+ c #FA6F41", +"g+ c #F1793D", +"h+ c #7D3B3A", +"i+ c #28263B", +"j+ c #D45441", +"k+ c #F8A238", +"l+ c #996B2D", +"m+ c #0E0421", +"n+ c #12011A", +"o+ c #180019", +"p+ c #17001C", +"q+ c #12001F", +"r+ c #4C2B2A", +"s+ c #DB8130", +"t+ c #540023", +"u+ c #0F0120", +"v+ c #16011C", +"w+ c #22001D", +"x+ c #25001F", +"y+ c #26001F", +"z+ c #25001E", +"A+ c #24001E", +"B+ c #1D001C", +"C+ c #18011D", +"D+ c #16031F", +"E+ c #3C0522", +"F+ c #9B0821", +"G+ c #13041E", +"H+ c #F6462E", +"I+ c #E6AB37", +"J+ c #E7A03E", +"K+ c #FA9F44", +"L+ c #FB8A48", +"M+ c #FD7A4A", +"N+ c #FD794A", +"O+ c #FD7748", +"P+ c #FD7E45", +"Q+ c #FD8343", +"R+ c #FB5D42", +"S+ c #6E3A40", +"T+ c #EE8A37", +"U+ c #7E252B", +"V+ c #100520", +"W+ c #13011A", +"X+ c #170019", +"Y+ c #15001C", +"Z+ c #0F0020", +"`+ c #564427", +" @ c #E0BA29", +".@ c #5E2B25", +"+@ c #10011F", +"@@ c #17011C", +"#@ c #1E001D", +"$@ c #23001F", +"%@ c #250020", +"&@ c #24001F", +"*@ c #23001E", +"=@ c #21001E", +"-@ c #1B001C", +";@ c #17021D", +">@ c #14041E", +",@ c #AC0B25", +"'@ c #5E1420", +")@ c #F28635", +"!@ c #C2733E", +"~@ c #984C44", +"{@ c #EA9148", +"]@ c #FB844B", +"^@ c #FD7E4C", +"/@ c #FE7E4C", +"(@ c #FE7E4B", +"_@ c #FE7749", +":@ c #FD7148", +"<@ c #FB7D46", +"[@ c #F89641", +"}@ c #B95634", +"|@ c #0D0927", +"1@ c #11041D", +"2@ c #150119", +"3@ c #180017", +"4@ c #16001A", +"5@ c #13001E", +"6@ c #110023", +"7@ c #944C29", +"8@ c #EE6229", +"9@ c #3D0324", +"0@ c #12021F", +"a@ c #19011D", +"b@ c #21001F", +"c@ c #22001F", +"d@ c #20001E", +"e@ c #1F001D", +"f@ c #1C001C", +"g@ c #19011C", +"h@ c #3D1621", +"i@ c #B53622", +"j@ c #31061F", +"k@ c #841D34", +"l@ c #F2703F", +"m@ c #C14445", +"n@ c #E67349", +"o@ c #FB8E4B", +"p@ c #FD834C", +"q@ c #FE834D", +"r@ c #FE834C", +"s@ c #FE804C", +"t@ c #FD814B", +"u@ c #FB7D49", +"v@ c #F79B43", +"w@ c #AF1234", +"x@ c #0D0625", +"y@ c #13021C", +"z@ c #1A0019", +"A@ c #190019", +"B@ c #410225", +"C@ c #D39729", +"D@ c #AA5927", +"E@ c #0E0422", +"F@ c #15021E", +"G@ c #1A011D", +"H@ c #1D001D", +"I@ c #15031D", +"J@ c #240820", +"K@ c #A01023", +"L@ c #670B21", +"M@ c #3D0D33", +"N@ c #E63C3E", +"O@ c #EF7C45", +"P@ c #F59048", +"Q@ c #FB944A", +"R@ c #FD904A", +"S@ c #FE8E4B", +"T@ c #FE854A", +"U@ c #FE854B", +"V@ c #FE884C", +"W@ c #FC954B", +"X@ c #F8AB45", +"Y@ c #C37A35", +"Z@ c #0D0425", +"`@ c #13011B", +" # c #170018", +".# c #1A0018", +"+# c #1C0019", +"@# c #15001B", +"## c #100120", +"$# c #311F25", +"%# c #E68E28", +"&# c #7A1425", +"*# c #130321", +"=# c #17011E", +"-# c #1A001D", +";# c #19001B", +"># c #16021C", +",# c #130521", +"'# c #6F3123", +")# c #6D3022", +"!# c #C89433", +"~# c #EA7E3E", +"{# c #DB2943", +"]# c #EF7745", +"^# c #FB8544", +"/# c #FD9A43", +"(# c #FE9941", +"_# c #FE9D43", +":# c #FEA548", +"<# c #FEAE49", +"[# c #FCB944", +"}# c #CA9F35", +"|# c #0E0225", +"1# c #11001B", +"2# c #160019", +"3# c #12011B", +"4# c #0F0220", +"5# c #351D26", +"6# c #D85B28", +"7# c #6C0F26", +"8# c #190121", +"9# c #1B001E", +"0# c #1A001C", +"a# c #1D001B", +"b# c #130220", +"c# c #703A23", +"d# c #713A23", +"e# c #140327", +"f# c #411B36", +"g# c #C8713E", +"h# c #7A3A3F", +"i# c #CE2C3C", +"j# c #E77338", +"k# c #9C6535", +"l# c #9C6233", +"m# c #9C6332", +"n# c #9C6A35", +"o# c #C37D3C", +"p# c #FEAC41", +"q# c #FEC23E", +"r# c #826330", +"s# c #100122", +"t# c #120019", +"u# c #150017", +"v# c #190017", +"w# c #1B0018", +"x# c #12001A", +"y# c #10021F", +"z# c #1A0326", +"A# c #5F292A", +"B# c #7B4E29", +"C# c #3C0E25", +"D# c #1A0020", +"E# c #14021F", +"F# c #723B23", +"G# c #14001A", +"H# c #58042A", +"I# c #A28337", +"J# c #C8813B", +"K# c #B14B38", +"L# c #761231", +"M# c #5A132A", +"N# c #0D0726", +"O# c #0C0623", +"P# c #0B0723", +"Q# c #0B0A26", +"R# c #321C2D", +"S# c #C45B33", +"T# c #FEBB33", +"U# c #13052A", +"V# c #13011F", +"W# c #160017", +"X# c #15001A", +"Y# c #12001D", +"Z# c #94062A", +"`# c #630D2C", +" $ c #85292B", +".$ c #AA5E29", +"+$ c #1F0123", +"@$ c #19011F", +"#$ c #1E001C", +"$$ c #15031F", +"%$ c #712122", +"&$ c #712223", +"*$ c #14011B", +"=$ c #110321", +"-$ c #AF0C2B", +";$ c #E7D534", +">$ c #EAC934", +",$ c #84582D", +"'$ c #1B0824", +")$ c #11041E", +"!$ c #10021B", +"~$ c #100119", +"{$ c #100218", +"]$ c #0F041A", +"^$ c #0E0720", +"/$ c #2C1026", +"($ c #D8A328", +"_$ c #140322", +":$ c #160016", +"<$ c #14001F", +"[$ c #120024", +"}$ c #100128", +"|$ c #3C032F", +"1$ c #2C062E", +"2$ c #29022B", +"3$ c #A31D29", +"4$ c #976A25", +"5$ c #1A0321", +"6$ c #17031E", +"7$ c #1B021D", +"8$ c #20001C", +"9$ c #14041F", +"0$ c #703422", +"a$ c #6F3522", +"b$ c #8D0328", +"c$ c #920329", +"d$ c #0F0326", +"e$ c #100321", +"f$ c #11021B", +"g$ c #130117", +"h$ c #140016", +"i$ c #150015", +"j$ c #140015", +"k$ c #130116", +"l$ c #120219", +"m$ c #11031C", +"n$ c #12031D", +"o$ c #170016", +"p$ c #160020", +"q$ c #250029", +"r$ c #670033", +"s$ c #DCA238", +"t$ c #F5C736", +"u$ c #9A732E", +"v$ c #110227", +"w$ c #110324", +"x$ c #811924", +"y$ c #A04323", +"z$ c #250721", +"A$ c #1A041F", +"B$ c #1E011D", +"C$ c #1C011C", +"D$ c #18031D", +"E$ c #130721", +"F$ c #6F3623", +"G$ c #6B3622", +"H$ c #1A001A", +"I$ c #14011F", +"J$ c #12011E", +"K$ c #11011C", +"L$ c #140117", +"M$ c #170015", +"N$ c #150016", +"O$ c #120119", +"P$ c #11011B", +"Q$ c #11001A", +"R$ c #130018", +"S$ c #170118", +"T$ c #170119", +"U$ c #18021E", +"V$ c #1A0126", +"W$ c #6F2332", +"X$ c #E5563B", +"Y$ c #F1B83F", +"Z$ c #F6CC38", +"`$ c #9D7A2D", +" % c #130123", +".% c #130320", +"+% c #2A0721", +"@% c #B00E24", +"#% c #7D0B23", +"$% c #1F0522", +"%% c #1E0220", +"&% c #1D011E", +"*% c #1A031E", +"=% c #15051F", +"-% c #241322", +";% c #A32F23", +">% c #670E21", +",% c #1C001A", +"'% c #19001A", +")% c #180016", +"!% c #160118", +"~% c #140219", +"{% c #11021C", +"]% c #10021E", +"^% c #0F011D", +"/% c #170117", +"(% c #160219", +"_% c #17041D", +":% c #190523", +"<% c #8C042E", +"[% c #B65838", +"}% c #E9D73F", +"|% c #EED43E", +"1% c #D85538", +"2% c #493129", +"3% c #130120", +"4% c #15021D", +"5% c #330822", +"6% c #8A0825", +"7% c #3C0424", +"8% c #1E0322", +"9% c #1C0321", +"0% c #180421", +"a% c #130822", +"b% c #AF2D24", +"c% c #BC5623", +"d% c #2F071F", +"e% c #1A041C", +"f% c #1C031C", +"g% c #1D011C", +"h% c #160117", +"i% c #150419", +"j% c #12081D", +"k% c #0F0923", +"l% c #A77027", +"m% c #A60525", +"n% c #11021A", +"o% c #130218", +"p% c #150319", +"q% c #16061D", +"r% c #180923", +"s% c #9C1D2B", +"t% c #A32636", +"u% c #A66E3B", +"v% c #4B2E3C", +"w% c #412C36", +"x% c #36012D", +"y% c #140123", +"z% c #17001E", +"A% c #19011B", +"B% c #1A0421", +"C% c #340425", +"D% c #9E0326", +"E% c #1F0424", +"F% c #1C0524", +"G% c #180724", +"H% c #A91024", +"I% c #D55D24", +"J% c #90071E", +"K% c #3C051D", +"L% c #1C021C", +"M% c #1C011A", +"N% c #1D001A", +"O% c #160116", +"P% c #150216", +"Q% c #140217", +"R% c #140618", +"S% c #120D1D", +"T% c #231925", +"U% c #B16A2E", +"V% c #FDAC34", +"W% c #D58631", +"X% c #280E2A", +"Y% c #0D0A23", +"Z% c #0F0920", +"`% c #120C21", +" & c #1F1026", +".& c #A3352E", +"+& c #EE9F36", +"@& c #5D2A3C", +"#& c #960D3C", +"$& c #970638", +"%& c #A00330", +"&& c #4D0126", +"*& c #1C001F", +"=& c #280120", +"-& c #290223", +";& c #1F0425", +">& c #260726", +",& c #340A26", +"'& c #850925", +")& c #3A0823", +"!& c #82071D", +"~& c #5E071D", +"{& c #18051C", +"]& c #18021A", +"^& c #190118", +"/& c #160217", +"(& c #150418", +"_& c #130618", +":& c #110718", +"<& c #10081A", +"[& c #110D1D", +"}& c #291C24", +"|& c #A73B2D", +"1& c #FD6B36", +"2& c #FD853C", +"3& c #FD863B", +"4& c #C24A35", +"5& c #6B442F", +"6& c #6D302D", +"7& c #6E252E", +"8& c #8E3B32", +"9& c #DE7739", +"0& c #F48E3F", +"a& c #DD8D41", +"b& c #854F3D", +"c& c #7E2D35", +"d& c #33082B", +"e& c #1C0222", +"f& c #20001F", +"g& c #1F0222", +"h& c #1A0524", +"i& c #440C27", +"j& c #BC1427", +"k& c #20041B", +"l& c #53061C", +"m& c #25071B", +"n& c #11061A", +"o& c #130418", +"p& c #140317", +"q& c #150217", +"r& c #160318", +"s& c #12051B", +"t& c #100C1D", +"u& c #0E101E", +"v& c #0C121F", +"w& c #0C1321", +"x& c #781725", +"y& c #B25D2C", +"z& c #FA6335", +"A& c #FD633C", +"B& c #FE6D42", +"C& c #FE7C42", +"D& c #FE813F", +"E& c #FE873C", +"F& c #FD743B", +"G& c #FB683B", +"H& c #FA7A3E", +"I& c #F98242", +"J& c #F97844", +"K& c #F98943", +"L& c #F79C3D", +"M& c #A25133", +"N& c #280B28", +"O& c #1D021F", +"P& c #1F011C", +"Q& c #280321", +"R& c #1C0724", +"S& c #3F1C27", +"T& c #D33C27", +"U& c #0E061B", +"V& c #0C091C", +"W& c #0C0A1B", +"X& c #0E091A", +"Y& c #11081B", +"Z& c #100A20", +"`& c #0E0D23", +" * c #551227", +".* c #B21829", +"+* c #C42329", +"@* c #C62C29", +"#* c #C55429", +"$* c #E76F2B", +"%* c #F14232", +"&* c #F95E3A", +"** c #FC6740", +"=* c #FE6E45", +"-* c #FE7246", +";* c #FE7545", +">* c #FE7744", +",* c #FD7745", +"'* c #FD7845", +")* c #FD7847", +"!* c #FD7948", +"~* c #FD7B44", +"{* c #FC7C3B", +"]* c #6F3130", +"^* c #140B24", +"/* c #19031D", +"(* c #1C011B", +"_* c #5A011F", +":* c #B70421", +"<* c #380824", +"[* c #3E2626", +"}* c #9F5626", +"|* c #13051E", +"1* c #360A21", +"2* c #361223", +"3* c #371724", +"4* c #381824", +"5* c #3B1524", +"6* c #3E1E26", +"7* c #471A29", +"8* c #DB252E", +"9* c #ED2733", +"0* c #EE5436", +"a* c #F04237", +"b* c #F33934", +"c* c #F53D2F", +"d* c #D7312B", +"e* c #AF212B", +"f* c #3A2C31", +"g* c #F65F39", +"h* c #FB6F41", +"i* c #FD6D45", +"j* c #FE7047", +"k* c #FE7647", +"l* c #FE7847", +"m* c #FE7848", +"n* c #FE7748", +"o* c #FE7948", +"p* c #FE7C48", +"q* c #FE7C47", +"r* c #FE7642", +"s* c #FE7439", +"t* c #6D332C", +"u* c #100B21", +"v* c #16031B", +"w* c #2B001B", +"x* c #22011F", +"y* c #220521", +"z* c #1B0A23", +"A* c #421425", +"B* c #951924", +"C* c #381023", +"D* c #E94028", +"E* c #E7302B", +"F* c #EF432D", +"G* c #F4302E", +"H* c #F32C30", +"I* c #CB4432", +"J* c #DD3235", +"K* c #EF4B3A", +"L* c #F0333E", +"M* c #CC3D3F", +"N* c #E4313C", +"O* c #F34834", +"P* c #D13E2C", +"Q* c #431825", +"R* c #0E1424", +"S* c #3C202C", +"T* c #F15537", +"U* c #F97140", +"V* c #FC6E45", +"W* c #FE7547", +"X* c #FE7947", +"Y* c #FE7B48", +"Z* c #FE7D48", +"`* c #FE8047", +" = c #FE7A42", +".= c #FE7A38", +"+= c #6D442B", +"@= c #0F0B21", +"#= c #15031A", +"$= c #49001B", +"%= c #2F001C", +"&= c #21021E", +"*= c #220620", +"== c #1B0D23", +"-= c #641625", +";= c #951823", +">= c #390F25", +",= c #AC3A2A", +"'= c #B6492E", +")= c #ED7531", +"!= c #F45A34", +"~= c #F54C36", +"{= c #C72D39", +"]= c #DE283C", +"^= c #F33B40", +"/= c #F34142", +"(= c #D0393F", +"_= c #E72E39", +":= c #DB3C2E", +"<= c #461724", +"[= c #0F0D1E", +"}= c #140B1E", +"|= c #341427", +"1= c #CB4834", +"2= c #F7743F", +"3= c #FB7145", +"4= c #FE7747", +"5= c #FE7A47", +"6= c #FF7B48", +"7= c #FF7C48", +"8= c #FE7F47", +"9= c #FE8247", +"0= c #FE8642", +"a= c #FE8439", +"b= c #6D442D", +"c= c #0F0A21", +"d= c #14031A", +"e= c #20031D", +"f= c #210821", +"g= c #191024", +"h= c #CC1C25", +"i= c #961423", +"j= c #2C162C", +"k= c #BD242E", +"l= c #EF2C31", +"m= c #F54C34", +"n= c #F34037", +"o= c #F5353A", +"p= c #F7413D", +"q= c #F8423D", +"r= c #F93A39", +"s= c #F95731", +"t= c #341425", +"u= c #110A1D", +"v= c #140619", +"w= c #18051B", +"x= c #200F26", +"y= c #864833", +"z= c #F8773F", +"A= c #FC7445", +"B= c #FF7E48", +"C= c #FF7E49", +"D= c #FF7D49", +"E= c #FF7D48", +"F= c #FE8347", +"G= c #FE8743", +"H= c #FE893B", +"I= c #6E452F", +"J= c #100E23", +"K= c #14041A", +"L= c #55041D", +"M= c #540921", +"N= c #161124", +"O= c #CE6A25", +"P= c #3F1129", +"Q= c #170A29", +"R= c #0F0F29", +"S= c #15132B", +"T= c #1E182D", +"U= c #A82B3D", +"V= c #CB6633", +"W= c #CC6932", +"X= c #CC3D2D", +"Y= c #331225", +"Z= c #0F091C", +"`= c #120417", +" - c #160216", +".- c #190419", +"+- c #210F26", +"@- c #8C4934", +"#- c #F97A40", +"$- c #FC7545", +"%- c #FF7B49", +"&- c #FE7D46", +"*- c #FE7E43", +"=- c #FD7B3E", +"-- c #FA6934", +";- c #532328", +">- c #130B1D", +",- c #150519", +"'- c #14041C", +")- c #120920", +"!- c #C43624", +"~- c #A21E23", +"{- c #F87C30", +"]- c #C9302D", +"^- c #300F2A", +"/- c #591129", +"(- c #171328", +"_- c #171628", +":- c #141829", +"<- c #101A2B", +"[- c #0F172B", +"}- c #0F1226", +"|- c #0E0C20", +"1- c #100619", +"2- c #140316", +"3- c #19051B", +"4- c #3C1428", +"5- c #E04B36", +"6- c #FA7B41", +"7- c #FD7346", +"8- c #FE7548", +"9- c #FF7849", +"0- c #FF7749", +"a- c #FE7B47", +"b- c #FE7945", +"c- c #FC7740", +"d- c #FA7E39", +"e- c #C1432F", +"f- c #131523", +"g- c #130A1C", +"h- c #420621", +"i- c #D08423", +"j- c #F87739", +"k- c #C03D37", +"l- c #962B34", +"m- c #A14332", +"n- c #E54B30", +"o- c #9E3E2F", +"p- c #7F262E", +"q- c #922D2E", +"r- c #9C4B2E", +"s- c #65212C", +"t- c #101628", +"u- c #101022", +"v- c #11091C", +"w- c #130619", +"x- c #160A1E", +"y- c #43252C", +"z- c #F66439", +"A- c #FA6942", +"B- c #FD6C47", +"C- c #FE6E48", +"D- c #FE6F48", +"E- c #FE7049", +"F- c #FE714A", +"G- c #FE744A", +"H- c #FE7846", +"I- c #FD7243", +"J- c #FC703E", +"K- c #FA6C37", +"L- c #81312B", +"M- c #121123", +"N- c #15071D", +"O- c #16031A", +"P- c #17021B", +"Q- c #8F3D22", +"R- c #F8393E", +"S- c #E42A3D", +"T- c #E7473B", +"U- c #FB503B", +"V- c #FB4F3A", +"W- c #F95439", +"X- c #ED4C38", +"Y- c #F45938", +"Z- c #FB6537", +"`- c #EA5236", +" ; c #CE6232", +".; c #CD392C", +"+; c #181425", +"@; c #120F21", +"#; c #130D20", +"$; c #151225", +"%; c #903431", +"&; c #F8703D", +"*; c #FB6344", +"=; c #FD6748", +"-; c #FE6849", +";; c #FE6949", +">; c #FE6A49", +",; c #FE6C4A", +"'; c #FE704A", +"); c #FE734A", +"!; c #FE7449", +"~; c #FE7347", +"{; c #FE7145", +"]; c #FD6C42", +"^; c #FD753D", +"/; c #F36E35", +"(; c #CB452C", +"_; c #600D24", +":; c #1C061F", +"<; c #1E031F", +"[; c #5B3821", +"}; c #CE9822", +"|; c #FA4341", +"1; c #FB4341", +"2; c #FC4541", +"3; c #FC4542", +"4; c #FC4143", +"5; c #FC4D42", +"6; c #FB5042", +"7; c #FB5342", +"8; c #FC5242", +"9; c #FD4F40", +"0; c #FD503E", +"a; c #FB6339", +"b; c #F45E33", +"c; c #A12A2E", +"d; c #401E2C", +"e; c #452D2F", +"f; c #F74F38", +"g; c #FA5940", +"h; c #FC6245", +"i; c #FE6447", +"j; c #FE6449", +"k; c #FE6549", +"l; c #FE6749", +"m; c #FE6B49", +"n; c #FE6D49", +"o; c #FE6D48", +"p; c #FE6D47", +"q; c #FE6D45", +"r; c #FE6C44", +"s; c #FE6A42", +"t; c #FE663C", +"u; c #FC6233", +"v; c #752129", +"w; c #1F0922", +"x; c #750520", +"y; c #81061F", +"z; c #FA3D42", +"A; c #FB4142", +"B; c #FD4543", +"C; c #FD4844", +"D; c #FD4A45", +"E; c #FD4D45", +"F; c #FD5045", +"G; c #FD5345", +"H; c #FE5346", +"I; c #FE5445", +"J; c #FD5444", +"K; c #FC4F41", +"L; c #FA513D", +"M; c #F95339", +"N; c #F63736", +"O; c #F75737", +"P; c #F95F3B", +"Q; c #FB5840", +"R; c #FD5F43", +"S; c #FE6345", +"T; c #FE6547", +"U; c #FE6548", +"V; c #FE6448", +"W; c #FE6248", +"X; c #FE6348", +"Y; c #FE6748", +"Z; c #FE6848", +"`; c #FE6846", +" > c #FE6A45", +".> c #FE6D43", +"+> c #FE703F", +"@> c #FC6F36", +"#> c #6F302B", +"$> c #140A22", +"%> c #FA3B42", +"&> c #FC4243", +"*> c #FD4744", +"=> c #FE4A45", +"-> c #FE4C47", +";> c #FE4D47", +">> c #FE5047", +",> c #FE5347", +"'> c #FE5447", +")> c #FD5246", +"!> c #FB503F", +"~> c #FA543D", +"{> c #9B3D3B", +"]> c #A3433B", +"^> c #F9683D", +"/> c #FC6940", +"(> c #FE6342", +"_> c #FE6645", +":> c #FE6646", +"<> c #FE6147", +"[> c #FE6048", +"}> c #FE6148", +"|> c #FE6746", +"1> c #FE6A46", +"2> c #FE6F45", +"3> c #FE7441", +"4> c #FC7D39", +"5> c #6C422E", +"6> c #0F0F23", +"7> c #FA4142", +"8> c #FC4643", +"9> c #FE4D46", +"0> c #FE4E47", +"a> c #FE4F48", +"b> c #FE5148", +"c> c #FE5348", +"d> c #FE5548", +"e> c #FE5247", +"f> c #FD5445", +"g> c #FC5544", +"h> c #F96041", +"i> c #D33F3D", +"j> c #392D39", +"k> c #973C38", +"l> c #F94E3A", +"m> c #FD693E", +"n> c #FE6C43", +"o> c #FE6047", +"p> c #FE5D47", +"q> c #FE5E48", +"r> c #FE6948", +"s> c #FE6947", +"t> c #FE6B47", +"u> c #FE6E46", +"v> c #FD6D43", +"w> c #FB723D", +"x> c #D54A33", +"y> c #301C29", +"z> c #FB4A42", +"A> c #FD4B44", +"B> c #FE4F47", +"C> c #FE5048", +"D> c #FE5648", +"E> c #FE5848", +"F> c #FE5747", +"G> c #FE5547", +"H> c #FC5945", +"I> c #F95742", +"J> c #F3543D", +"K> c #A33336", +"L> c #302032", +"M> c #152433", +"N> c #CD3E38", +"O> c #FD5A3F", +"P> c #FE6343", +"Q> c #FE6446", +"R> c #FE6247", +"S> c #FE6A47", +"T> c #FC6542", +"U> c #FB6A3B", +"V> c #FA6D34", +"W> c #D73C2D", +"X> c #442428", +"Y> c #281323", +"Z> c #FD4E42", +"`> c #FD4D43", +" , c #FE4D45", +"., c #FE5248", +"+, c #FE5947", +"@, c #FE5C47", +"#, c #FE5B47", +"$, c #FE5A47", +"%, c #FE5847", +"&, c #FC5C45", +"*, c #F95B43", +"=, c #F3613F", +"-, c #E74F37", +";, c #8C2431", +">, c #161E2F", +",, c #CD4E33", +"', c #FD503A", +"), c #FE5D40", +"!, c #FE6445", +"~, c #FE6946", +"{, c #FE6847", +"], c #FE6747", +"^, c #FD6644", +"/, c #FD6241", +"(, c #FD5B3D", +"_, c #FE6739", +":, c #FE6135", +"<, c #AB4830", +"[, c #733E2A", +"}, c #161224", +"|, c #FC4E42", +"1, c #FE4D44", +"2, c #FE4E46", +"3, c #FE5147", +"4, c #FE5E47", +"5, c #FD5C46", +"6, c #FA5B44", +"7, c #F45441", +"8, c #EB393A", +"9, c #CC3433", +"0, c #47212F", +"a, c #59242F", +"b, c #FC6734", +"c, c #FC6F3A", +"d, c #FC723E", +"e, c #FD6540", +"f, c #FE6442", +"g, c #FE6643", +"h, c #FE6944", +"i, c #FE6546", +"j, c #FE6444", +"k, c #FE6143", +"l, c #FE5E41", +"m, c #FE613F", +"n, c #FE683C", +"o, c #FE7937", +"p, c #A25030", +"q, c #692629", +"r, c #151122", +"s, c #FA573F", +"t, c #FB4D40", +"u, c #FC4F43", +"v, c #FE5246", +"w, c #FF6347", +"x, c #FE5F48", +"y, c #F65942", +"z, c #F0493D", +"A, c #ED3736", +"B, c #73262F", +"C, c #10152C", +"D, c #3B292F", +"E, c #363034", +"F, c #AC3938", +"G, c #FC6B3B", +"H, c #FD763C", +"I, c #FE6D3F", +"J, c #FE6341", +"K, c #FE6642", +"L, c #FE6745", +"M, c #FE6245", +"N, c #FE6244", +"O, c #FE6841", +"P, c #FF683B", +"Q, c #EC7035", +"R, c #D0412D", +"S, c #3A1627", +"T, c #CF3938", +"U, c #F6543C", +"V, c #FB5040", +"W, c #FD5544", +"X, c #FE5A48", +"Y, c #FE5D48", +"Z, c #FE5F47", +"`, c #FF6147", +" ' c #FD5C45", +".' c #FB5B43", +"+' c #FA5A42", +"@' c #F76040", +"#' c #F4623D", +"$' c #F26D38", +"%' c #EC4130", +"&' c #380E2B", +"*' c #13122C", +"=' c #362D31", +"-' c #353435", +";' c #352E37", +">' c #2D3337", +",' c #CC5838", +"'' c #CD6F3A", +")' c #CE6E3D", +"!' c #FE793F", +"~' c #FD7541", +"{' c #FD6243", +"]' c #FE6545", +"^' c #FF6543", +"/' c #FF6240", +"(' c #FE723B", +"_' c #FE8034", +":' c #442D2C", +"<' c #311725", +"[' c #222830", +"}' c #B73B36", +"|' c #F94C3D", +"1' c #FD5543", +"2' c #FE5B48", +"3' c #FF5E47", +"4' c #FE5C48", +"5' c #FC5B44", +"6' c #F95640", +"7' c #C34E3D", +"8' c #A45A3A", +"9' c #F37438", +"0' c #F28935", +"a' c #AF422F", +"b' c #240D2B", +"c' c #88292F", +"d' c #FA8E34", +"e' c #FC7E38", +"f' c #FC5939", +"g' c #694A37", +"h' c #693437", +"i' c #382638", +"j' c #142439", +"k' c #9F483A", +"l' c #C45E3C", +"m' c #FD7240", +"n' c #FF6645", +"o' c #FF6245", +"p' c #FF6045", +"q' c #FF6146", +"r' c #FF6246", +"s' c #FF6446", +"t' c #FF6545", +"u' c #FE763F", +"v' c #FE7237", +"w' c #C65331", +"x' c #3D272A", +"y' c #0D1E2B", +"z' c #683032", +"A' c #F9453A", +"B' c #FD5341", +"C' c #FE5A46", +"D' c #FF5A48", +"E' c #FE5948", +"F' c #FD5A47", +"G' c #FC5D43", +"H' c #F95B3D", +"I' c #713F37", +"J' c #1E2D32", +"K' c #C44531", +"L' c #EF7A2F", +"M' c #6B2E2C", +"N' c #0F0E2C", +"O' c #F56633", +"P' c #FA803A", +"Q' c #FC673E", +"R' c #FD673E", +"S' c #FC6F3C", +"T' c #FA6E3B", +"U' c #C6633A", +"V' c #A06739", +"W' c #835638", +"X' c #381F38", +"Y' c #713B38", +"Z' c #7B503C", +"`' c #FE7741", +" ) c #FE7344", +".) c #FE6D46", +"+) c #FF6946", +"@) c #FF5E46", +"#) c #FF5D46", +"$) c #FF5D47", +"%) c #FF5F48", +"&) c #FF6248", +"*) c #FE6941", +"=) c #FC783C", +"-) c #C46B35", +";) c #892730", +">) c #111629", +",) c #1F2630", +"') c #AD3939", +")) c #FC5D41", +"!) c #FE5946", +"~) c #FF5848", +"{) c #FE5549", +"]) c #FC5E42", +"^) c #FA673B", +"/) c #DB7033", +"() c #392E2B", +"_) c #311A28", +":) c #3C2127", +"<) c #1D1027", +"[) c #92102C", +"}) c #F58336", +"|) c #FA673E", +"1) c #FD6642", +"2) c #FD5A41", +"3) c #FC6D41", +"4) c #FC6D3F", +"5) c #FD683E", +"6) c #F38C39", +"7) c #CE6535", +"8) c #612E34", +"9) c #1D2637", +"0) c #71513E", +"a) c #FF6847", +"b) c #FF5F47", +"c) c #FF5A46", +"d) c #FF5847", +"e) c #FF5748", +"f) c #FF594A", +"g) c #FF5E4B", +"h) c #FE654C", +"i) c #FE694B", +"j) c #FE6B48", +"k) c #FC6A43", +"l) c #F7683E", +"m) c #EC6E39", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . + @ # $ % ", +" & * = - ; > , ' ) ! ~ ", +" { ] ^ / ( _ : < [ } | 1 2 ", +" 3 4 5 6 7 8 9 0 a b c d e f g h i j ", +" k l m n o p q r s t u v w x y z A B C D ", +" E F G H I J K L M N O P Q R S T U V W X Y Z ` ", +" ...+.@.#.$.%.&.*.=.-.;.>.,.S '.).!.~.{.].^./.(._. ", +" :.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.!.S f.g.h.i.j.k. ", +" l.m.n.o.p.q.r.s.t.u.J v.w.x.y.z.A.c.d.d.B.C.D.E.F.G.H.I. ", +" J.K.L.M.N.O.P.Q.R.t S.T.U.V.W.X.Y.Z.`. +d.d..+B.'.++@+#+$+%+ ", +" &+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+d.2+3+4+d.5+6+7+8+9+0+ ", +" a+b+c+d+e+f+g+h+i+j+k+l+m+n+^+o+p+q+r+s+t+u+v+b.w+x+y+z+A+w+B+C+D+E+F+G+ ", +" H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+Q ,.X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@#@-@;@>@,@'@ ", +" )@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@R ,.4@5@6@7@8@9@0@a@#@b@c@=@d@e@f@g@>@h@i@j@ ", +" k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@^+R S z@A@z.q+B@C@D@E@F@G@H@#@e@#@#@f@g@I@J@K@L@ ", +" M@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@ #.#+#+#S A@@###$#%#&#*#=#-#f@B+B+B+f@;#>#,#'#)# ", +" !#~#{#]#^#/#(#(#_#:#<#[#}#|#1#^+.#S +#+#z@2#3#4#5#6#7#8#9#0#A.B+B+a#A.@@b#c#d# ", +" e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#.#w#S R ^+x#y#z#A#B#C#D#-#A.a#`.`.b.g@E#d#F# ", +" G#0@H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#>.W#3@v#R R X+X#Y#s#Z#`# $.$+$@$g@f@5+5+#$6+$$%$&$ ", +" *$=$-$;$>$,$'$)$!$~${$]$^$/$($_$*$u#:$Q 3@,.X+z.<$[$}$|$1$2$3$4$5$6$7$e@8$#$G@9$0$a$ ", +" ,.4@E#b$c$d$e$f$g$h$i$j$k$l$m$n$`@>.:$o$3@,. #a.p$q$r$s$t$u$v$w$x$y$z$A$B$#@C$D$E$F$G$ ", +" R S H$v+I$J$K$n+L$:$o$o$M$N$L$O$P$Q$R$N$o$3@S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>% ", +" E.,%~.'%Z.4@v W#o$)%)%)%Q !%~%{%]%^%Q$u u#/%(%_%:%<%[%}%|%1%2%3%4%=%5%6%7%8%9%0%a%b%c%d% ", +" e%f%g%a#,%,%z@R 3@3@3@)%Q h%i%j%k%l%m%{+n%o%p%q%r%s%t%u%v%w%x%y%z%A%*%B%C%D%E%F%G%H%I% ", +" J%K%L%M%N%D.S v#)%)%O%P%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&f@a##@=&-&;&>&,&'&)& ", +" !&~&{&]&^&.#w#^&/%/&(&_&:&<&[&}&|&1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&e@1+5+e@f&g&h&i&j& ", +" k&l&m&n&o&p&q&r&i%s&3.t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&1+`.e@f&Q&R&S&T& ", +" 0 U&V&W&X&<&Y&j%Z&`& *.*+*@*#*$*%*&***=*-*;*>*>*,*'*)*!*~*{*]*^*/*(*a#B+#@_*:*<*[*}* ", +" |*1*2*3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*E.w*d.e@x*y*z*A*B* ", +" C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*V*W*l*X*o*o*Y*Z*`* =.=+=@=#='%$=%=e@&=*===-=;= ", +" >=,='=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=p*6=6=7=8=9=0=a=b=c=d=A@~.b.B+e=f=g=h=i= ", +" j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=A=5=Z*B=C=D=E=8=F=G=H=I=J=K=S$R z@'%L=M=N=O= ", +" P=Q=R=S=T=U=V=W=X=Y=Z=`= -.-+-@-#-$-5=p*E=D=%-%-q*&-*-=---;->-,-/%3@^+'-)-!-~- ", +" {-]-^-/-(-_-:-<-[-}-|-1-2- -3-4-5-6-7-8-n*m*9-0-9-o*a-b-c-d-e-f-g-(&h%w c h-i- ", +" j-k-l-m-n-o-p-q-r-s-t-u-v-w-,-x-y-z-A-B-C-D-E-E-F-G-_@m*H-I-J-K-L-M-N-O-P-(+Q- ", +" R-S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;$;%;&;*;=;-;-;;;>;,;';);!;~;{;];^;/;(;_;:;<;[;}; ", +" |;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;f;g;h;i;j;j;k;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y; ", +" z;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;k;Y;Z;`; >r;.>+>@>#>$> ", +" %>&>*>=>->;>>>,>'>,>)>F;8;!>~>{>]>^>/>(>_>:>i;<>[>X;}>i;|>1>q;2>3>4>5>6> ", +" 7>8>=>9>0>a>b>c>d>,>e>e>f>g>h>i>j>k>l>m>n>:>i;o>p>q>W;r>s>t>p;u>v>w>x>y> ", +" z>A>9>0>B>C>c>D>E>F>G>G>F>H>I>J>K>L>M>N>O>P>Q>R>o>R>T;s>S>S>S>t>1>T>U>V>W>X>Y> ", +" Z>`> ,9>B>.,D>+,@,#,$,%,$,&,*,=,-,;,>,,,',),P>!,!,_>~,t>s>{,],{,],^,/,(,_,:,<,[,}, ", +" |,`>1,2,3,G>+,4,o>o>4,@,@,5,6,7,8,9,0,a,b,c,d,e,f,g,h, >~,|>T;T;T;i,j,k,l,m,n,o,p,q,r, ", +" s,t,u,v,G>%,@,o>w,R>x,p>@,5,6,y,z,A,B,C,D,E,F,G,H,I,J,K,L,L,i,i;i;i;Q>S;M,N,P>O,P,Q,R,S, ", +" T,U,V,W,%,X,Y,Z,`,[>q>@, '.'+'@'#'$'%'&'*'='-';'>',''')'!'~'{'N,i,:>_>]'M,M,Q>_>^'/'('_':'<' ", +" ['}'|'1'$,X,2'p>3'4'2'@,5'6'7'8'9'0'a'b'c'd'e'f'g'h'i'j'k'l'd,m'g, > >n'o'p'q'r's't'.>u'v'w'x' ", +" y'z'A'B'C'X,X,2'D'E'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'X'Y'Z'`' ).)+)r'@)#)$)%)&)l;1>*)=)-);) ", +" >),)')))!)X,E'X,~){)d>!)])^)/)()_):)<)[)})|)1)f,2)3)4)5)6)7)8)9)0)*--*a)b)c)d)e)f)g)h)i)j)k)l)m) ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure.rb new file mode 100644 index 0000000..6af8705 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure.rb @@ -0,0 +1,22 @@ +require 'json/common' +require 'json/pure/parser' +require 'json/pure/generator' + +module JSON + # Swap consecutive bytes of _string_ in place. + def self.swap!(string) # :nodoc: + 0.upto(string.size / 2) do |i| + break unless string[2 * i + 1] + string[2 * i], string[2 * i + 1] = string[2 * i + 1], string[2 * i] + end + string + end + + # This module holds all the modules/classes that implement JSON's + # functionality in pure ruby. + module Pure + $DEBUG and warn "Using pure library for JSON." + JSON.parser = Parser + JSON.generator = Generator + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/generator.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/generator.rb new file mode 100644 index 0000000..9c7cfac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/generator.rb @@ -0,0 +1,394 @@ +module JSON + MAP = { + "\x0" => '\u0000', + "\x1" => '\u0001', + "\x2" => '\u0002', + "\x3" => '\u0003', + "\x4" => '\u0004', + "\x5" => '\u0005', + "\x6" => '\u0006', + "\x7" => '\u0007', + "\b" => '\b', + "\t" => '\t', + "\n" => '\n', + "\xb" => '\u000b', + "\f" => '\f', + "\r" => '\r', + "\xe" => '\u000e', + "\xf" => '\u000f', + "\x10" => '\u0010', + "\x11" => '\u0011', + "\x12" => '\u0012', + "\x13" => '\u0013', + "\x14" => '\u0014', + "\x15" => '\u0015', + "\x16" => '\u0016', + "\x17" => '\u0017', + "\x18" => '\u0018', + "\x19" => '\u0019', + "\x1a" => '\u001a', + "\x1b" => '\u001b', + "\x1c" => '\u001c', + "\x1d" => '\u001d', + "\x1e" => '\u001e', + "\x1f" => '\u001f', + '"' => '\"', + '\\' => '\\\\', + '/' => '\/', + } # :nodoc: + + # Convert a UTF8 encoded Ruby string _string_ to a JSON string, encoded with + # UTF16 big endian characters as \u????, and return it. + def utf8_to_json(string) # :nodoc: + string = string.dup.force_encoding(Encoding::ASCII_8BIT) + string.gsub!(/["\\\/\x0-\x1f]/) { MAP[$&] } + string.gsub!(/( + (?: + [\xc2-\xdf][\x80-\xbf] | + [\xe0-\xef][\x80-\xbf]{2} | + [\xf0-\xf4][\x80-\xbf]{3} + )+ | + [\x80-\xc1\xf5-\xff] # invalid + )/nx) { |c| + c.size == 1 and raise GeneratorError, "invalid utf8 byte: '#{c}'" + c.unpack("U*").map{|c| + c>0xFFFF ? ('\ud%03x\ud%03x'%[0x7C0+c/1024,0xC00+c%1024]) : ('\u%04x'%c) + }.join("") + } + string + end + module_function :utf8_to_json + + module Pure + module Generator + # This class is used to create State instances, that are use to hold data + # while generating a JSON text from a a Ruby data structure. + class State + # Creates a State object from _opts_, which ought to be Hash to create + # a new State instance configured by _opts_, something else to create + # an unconfigured instance. If _opts_ is a State object, it is just + # returned. + def self.from_state(opts) + case opts + when self + opts + when Hash + new(opts) + else + new + end + end + + # Instantiates a new State object, configured by _opts_. + # + # _opts_ can have the following keys: + # + # * *indent*: a string used to indent levels (default: ''), + # * *space*: a string that is put after, a : or , delimiter (default: ''), + # * *space_before*: a string that is put before a : pair delimiter (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *array_nl*: a string that is put at the end of a JSON array (default: ''), + # * *check_circular*: true if checking for circular data structures + # should be done (the default), false otherwise. + # * *check_circular*: true if checking for circular data structures + # should be done, false (the default) otherwise. + # * *allow_nan*: true if NaN, Infinity, and -Infinity should be + # generated, otherwise an exception is thrown, if these values are + # encountered. This options defaults to false. + def initialize(opts = {}) + @seen = {} + @indent = '' + @space = '' + @space_before = '' + @object_nl = '' + @array_nl = '' + @check_circular = true + @allow_nan = false + configure opts + end + + # This string is used to indent levels in the JSON text. + attr_accessor :indent + + # This string is used to insert a space between the tokens in a JSON + # string. + attr_accessor :space + + # This string is used to insert a space before the ':' in JSON objects. + attr_accessor :space_before + + # This string is put at the end of a line that holds a JSON object (or + # Hash). + attr_accessor :object_nl + + # This string is put at the end of a line that holds a JSON array. + attr_accessor :array_nl + + # This integer returns the maximum level of data structure nesting in + # the generated JSON, max_nesting = 0 if no maximum is checked. + attr_accessor :max_nesting + + def check_max_nesting(depth) # :nodoc: + return if @max_nesting.zero? + current_nesting = depth + 1 + current_nesting > @max_nesting and + raise NestingError, "nesting of #{current_nesting} is too deep" + end + + # Returns true, if circular data structures should be checked, + # otherwise returns false. + def check_circular? + @check_circular + end + + # Returns true if NaN, Infinity, and -Infinity should be considered as + # valid JSON and output. + def allow_nan? + @allow_nan + end + + # Returns _true_, if _object_ was already seen during this generating + # run. + def seen?(object) + @seen.key?(object.__id__) + end + + # Remember _object_, to find out if it was already encountered (if a + # cyclic data structure is if a cyclic data structure is rendered). + def remember(object) + @seen[object.__id__] = true + end + + # Forget _object_ for this generating run. + def forget(object) + @seen.delete object.__id__ + end + + # Configure this State instance with the Hash _opts_, and return + # itself. + def configure(opts) + @indent = opts[:indent] if opts.key?(:indent) + @space = opts[:space] if opts.key?(:space) + @space_before = opts[:space_before] if opts.key?(:space_before) + @object_nl = opts[:object_nl] if opts.key?(:object_nl) + @array_nl = opts[:array_nl] if opts.key?(:array_nl) + @check_circular = !!opts[:check_circular] if opts.key?(:check_circular) + @allow_nan = !!opts[:allow_nan] if opts.key?(:allow_nan) + if !opts.key?(:max_nesting) # defaults to 19 + @max_nesting = 19 + elsif opts[:max_nesting] + @max_nesting = opts[:max_nesting] + else + @max_nesting = 0 + end + self + end + + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + def to_h + result = {} + for iv in %w[indent space space_before object_nl array_nl check_circular allow_nan max_nesting] + result[iv.intern] = instance_variable_get("@#{iv}") + end + result + end + end + + module GeneratorMethods + module Object + # Converts this object to a string (calling #to_s), converts + # it to a JSON string, and returns the result. This is a fallback, if no + # special method #to_json was defined for some object. + def to_json(*) to_s.to_json end + end + + module Hash + # Returns a JSON string containing a JSON object, that is unparsed from + # this Hash instance. + # _state_ is a JSON::State object, that can also be used to configure the + # produced JSON string output further. + # _depth_ is used to find out nesting depth, to indent accordingly. + def to_json(state = nil, depth = 0, *) + if state + state = JSON.state.from_state(state) + state.check_max_nesting(depth) + json_check_circular(state) { json_transform(state, depth) } + else + json_transform(state, depth) + end + end + + private + + def json_check_circular(state) + if state and state.check_circular? + state.seen?(self) and raise JSON::CircularDatastructure, + "circular data structures not supported!" + state.remember self + end + yield + ensure + state and state.forget self + end + + def json_shift(state, depth) + state and not state.object_nl.empty? or return '' + state.indent * depth + end + + def json_transform(state, depth) + delim = ',' + delim << state.object_nl if state + result = '{' + result << state.object_nl if state + result << map { |key,value| + s = json_shift(state, depth + 1) + s << key.to_s.to_json(state, depth + 1) + s << state.space_before if state + s << ':' + s << state.space if state + s << value.to_json(state, depth + 1) + }.join(delim) + result << state.object_nl if state + result << json_shift(state, depth) + result << '}' + result + end + end + + module Array + # Returns a JSON string containing a JSON array, that is unparsed from + # this Array instance. + # _state_ is a JSON::State object, that can also be used to configure the + # produced JSON string output further. + # _depth_ is used to find out nesting depth, to indent accordingly. + def to_json(state = nil, depth = 0, *) + if state + state = JSON.state.from_state(state) + state.check_max_nesting(depth) + json_check_circular(state) { json_transform(state, depth) } + else + json_transform(state, depth) + end + end + + private + + def json_check_circular(state) + if state and state.check_circular? + state.seen?(self) and raise JSON::CircularDatastructure, + "circular data structures not supported!" + state.remember self + end + yield + ensure + state and state.forget self + end + + def json_shift(state, depth) + state and not state.array_nl.empty? or return '' + state.indent * depth + end + + def json_transform(state, depth) + delim = ',' + delim << state.array_nl if state + result = '[' + result << state.array_nl if state + result << map { |value| + json_shift(state, depth + 1) << value.to_json(state, depth + 1) + }.join(delim) + result << state.array_nl if state + result << json_shift(state, depth) + result << ']' + result + end + end + + module Integer + # Returns a JSON string representation for this Integer number. + def to_json(*) to_s end + end + + module Float + # Returns a JSON string representation for this Float number. + def to_json(state = nil, *) + case + when infinite? + if !state || state.allow_nan? + to_s + else + raise GeneratorError, "#{self} not allowed in JSON" + end + when nan? + if !state || state.allow_nan? + to_s + else + raise GeneratorError, "#{self} not allowed in JSON" + end + else + to_s + end + end + end + + module String + # This string should be encoded with UTF-8 A call to this method + # returns a JSON string encoded with UTF16 big endian characters as + # \u????. + def to_json(*) + '"' << JSON.utf8_to_json(self) << '"' + end + + # Module that holds the extinding methods if, the String module is + # included. + module Extend + # Raw Strings are JSON Objects (the raw bytes are stored in an array for the + # key "raw"). The Ruby String can be created by this module method. + def json_create(o) + o['raw'].pack('C*') + end + end + + # Extends _modul_ with the String::Extend module. + def self.included(modul) + modul.extend Extend + end + + # This method creates a raw object hash, that can be nested into + # other data structures and will be unparsed as a raw string. This + # method should be used, if you want to convert raw strings to JSON + # instead of UTF-8 strings, e. g. binary data. + def to_json_raw_object + { + JSON.create_id => self.class.name, + 'raw' => self.unpack('C*'), + } + end + + # This method creates a JSON text from the result of + # a call to to_json_raw_object of this String. + def to_json_raw(*args) + to_json_raw_object.to_json(*args) + end + end + + module TrueClass + # Returns a JSON string for true: 'true'. + def to_json(*) 'true' end + end + + module FalseClass + # Returns a JSON string for false: 'false'. + def to_json(*) 'false' end + end + + module NilClass + # Returns a JSON string for nil: 'null'. + def to_json(*) 'null' end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/parser.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/parser.rb new file mode 100644 index 0000000..9c3fea9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/pure/parser.rb @@ -0,0 +1,269 @@ +require 'strscan' + +module JSON + module Pure + # This class implements the JSON parser that is used to parse a JSON string + # into a Ruby data structure. + class Parser < StringScanner + STRING = /" ((?:[^\x0-\x1f"\\] | + \\["\\\/bfnrt] | + \\u[0-9a-fA-F]{4} | + \\[\x20-\xff])*) + "/nx + INTEGER = /(-?0|-?[1-9]\d*)/ + FLOAT = /(-? + (?:0|[1-9]\d*) + (?: + \.\d+(?i:e[+-]?\d+) | + \.\d+ | + (?i:e[+-]?\d+) + ) + )/x + NAN = /NaN/ + INFINITY = /Infinity/ + MINUS_INFINITY = /-Infinity/ + OBJECT_OPEN = /\{/ + OBJECT_CLOSE = /\}/ + ARRAY_OPEN = /\[/ + ARRAY_CLOSE = /\]/ + PAIR_DELIMITER = /:/ + COLLECTION_DELIMITER = /,/ + TRUE = /true/ + FALSE = /false/ + NULL = /null/ + IGNORE = %r( + (?: + //[^\n\r]*[\n\r]| # line comments + /\* # c-style comments + (?: + [^*/]| # normal chars + /[^*]| # slashes that do not start a nested comment + \*[^/]| # asterisks that do not end this comment + /(?=\*/) # single slash before this comment's end + )* + \*/ # the End of this comment + |[ \t\r\n]+ # whitespaces: space, horicontal tab, lf, cr + )+ + )mx + + UNPARSED = Object.new + + # Creates a new JSON::Pure::Parser instance for the string _source_. + # + # It will be configured by the _opts_ hash. _opts_ can have the following + # keys: + # * *max_nesting*: The maximum depth of nesting allowed in the parsed data + # structures. Disable depth checking with :max_nesting => false|nil|0, + # it defaults to 19. + # * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in + # defiance of RFC 4627 to be parsed by the Parser. This option defaults + # to false. + # * *create_additions*: If set to false, the Parser doesn't create + # additions even if a matchin class and create_id was found. This option + # defaults to true. + def initialize(source, opts = {}) + super + if !opts.key?(:max_nesting) # defaults to 19 + @max_nesting = 19 + elsif opts[:max_nesting] + @max_nesting = opts[:max_nesting] + else + @max_nesting = 0 + end + @allow_nan = !!opts[:allow_nan] + ca = true + ca = opts[:create_additions] if opts.key?(:create_additions) + @create_id = ca ? JSON.create_id : nil + end + + alias source string + + # Parses the current JSON string _source_ and returns the complete data + # structure as a result. + def parse + reset + obj = nil + until eos? + case + when scan(OBJECT_OPEN) + obj and raise ParserError, "source '#{peek(20)}' not in JSON!" + @current_nesting = 1 + obj = parse_object + when scan(ARRAY_OPEN) + obj and raise ParserError, "source '#{peek(20)}' not in JSON!" + @current_nesting = 1 + obj = parse_array + when skip(IGNORE) + ; + else + raise ParserError, "source '#{peek(20)}' not in JSON!" + end + end + obj or raise ParserError, "source did not contain any JSON!" + obj + end + + private + + # Unescape characters in strings. + UNESCAPE_MAP = Hash.new { |h, k| h[k] = k.chr } + UNESCAPE_MAP.update({ + ?" => '"', + ?\\ => '\\', + ?/ => '/', + ?b => "\b", + ?f => "\f", + ?n => "\n", + ?r => "\r", + ?t => "\t", + ?u => nil, + }) + + def parse_string + if scan(STRING) + return '' if self[1].empty? + self[1].gsub(%r((?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff]))n) do |c| + if u = UNESCAPE_MAP[$&[1]] + u + else # \uXXXX + res = [] + stack = nil + [c.delete!('\\\\u')].pack("H*").unpack("n*").each do |c| + case c + when 0xD800..0xDBFF + raise JSON::ParserError, "partial character in source" if stack + stack = c + when 0xDC00..0xDFFF + raise JSON::ParserError, + "partial character in source" unless (0xD800..0xDBFF).include?(stack) + res << (stack << 10) - 0x35fdc00 + c + stack = nil + else + raise JSON::ParserError, "partial character in source" if stack + res << c + end + end + raise JSON::ParserError, "partial character in source" if stack + res.pack("U*") + end + end.force_encoding("UTF-8") + else + UNPARSED + end + end + + def parse_value + case + when scan(FLOAT) + Float(self[1]) + when scan(INTEGER) + Integer(self[1]) + when scan(TRUE) + true + when scan(FALSE) + false + when scan(NULL) + nil + when (string = parse_string) != UNPARSED + string + when scan(ARRAY_OPEN) + @current_nesting += 1 + ary = parse_array + @current_nesting -= 1 + ary + when scan(OBJECT_OPEN) + @current_nesting += 1 + obj = parse_object + @current_nesting -= 1 + obj + when @allow_nan && scan(NAN) + NaN + when @allow_nan && scan(INFINITY) + Infinity + when @allow_nan && scan(MINUS_INFINITY) + MinusInfinity + else + UNPARSED + end + end + + def parse_array + raise NestingError, "nesting of #@current_nesting is to deep" if + @max_nesting.nonzero? && @current_nesting > @max_nesting + result = [] + delim = false + until eos? + case + when (value = parse_value) != UNPARSED + delim = false + result << value + skip(IGNORE) + if scan(COLLECTION_DELIMITER) + delim = true + elsif match?(ARRAY_CLOSE) + ; + else + raise ParserError, "expected ',' or ']' in array at '#{peek(20)}'!" + end + when scan(ARRAY_CLOSE) + if delim + raise ParserError, "expected next element in array at '#{peek(20)}'!" + end + break + when skip(IGNORE) + ; + else + raise ParserError, "unexpected token in array at '#{peek(20)}'!" + end + end + result + end + + def parse_object + raise NestingError, "nesting of #@current_nesting is to deep" if + @max_nesting.nonzero? && @current_nesting > @max_nesting + result = {} + delim = false + until eos? + case + when (string = parse_string) != UNPARSED + skip(IGNORE) + unless scan(PAIR_DELIMITER) + raise ParserError, "expected ':' in object at '#{peek(20)}'!" + end + skip(IGNORE) + unless (value = parse_value).equal? UNPARSED + result[string] = value + delim = false + skip(IGNORE) + if scan(COLLECTION_DELIMITER) + delim = true + elsif match?(OBJECT_CLOSE) + ; + else + raise ParserError, "expected ',' or '}' in object at '#{peek(20)}'!" + end + else + raise ParserError, "expected value in object at '#{peek(20)}'!" + end + when scan(OBJECT_CLOSE) + if delim + raise ParserError, "expected next name, value pair in object at '#{peek(20)}'!" + end + if @create_id and klassname = result[@create_id] + klass = JSON.deep_const_get klassname + break unless klass and klass.json_creatable? + result = klass.json_create(result) + end + break + when skip(IGNORE) + ; + else + raise ParserError, "unexpected token in object at '#{peek(20)}'!" + end + end + result + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/json/lib/json/version.rb b/lib/ruby-1.9.1-rc1/ext/json/lib/json/version.rb new file mode 100644 index 0000000..acf8217 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/json/lib/json/version.rb @@ -0,0 +1,9 @@ +module JSON + # JSON version + VERSION = '1.1.3' + VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: + VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: + VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: + VERSION_BUILD = VERSION_ARRAY[2] # :nodoc: + VARIANT_BINARY = false +end diff --git a/lib/ruby-1.9.1-rc1/ext/mathn/complex/complex.c b/lib/ruby-1.9.1-rc1/ext/mathn/complex/complex.c new file mode 100644 index 0000000..dce4949 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/mathn/complex/complex.c @@ -0,0 +1,7 @@ +extern void nucomp_canonicalization(int); + +void +Init_complex(void) +{ + nucomp_canonicalization(1); +} diff --git a/lib/ruby-1.9.1-rc1/ext/mathn/complex/extconf.rb b/lib/ruby-1.9.1-rc1/ext/mathn/complex/extconf.rb new file mode 100644 index 0000000..d4d14ff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/mathn/complex/extconf.rb @@ -0,0 +1,3 @@ +require "mkmf" + +create_makefile "mathn/complex" diff --git a/lib/ruby-1.9.1-rc1/ext/mathn/rational/extconf.rb b/lib/ruby-1.9.1-rc1/ext/mathn/rational/extconf.rb new file mode 100644 index 0000000..ba76306 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/mathn/rational/extconf.rb @@ -0,0 +1,3 @@ +require "mkmf" + +create_makefile "mathn/rational" diff --git a/lib/ruby-1.9.1-rc1/ext/mathn/rational/rational.c b/lib/ruby-1.9.1-rc1/ext/mathn/rational/rational.c new file mode 100644 index 0000000..2ac5999 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/mathn/rational/rational.c @@ -0,0 +1,7 @@ +extern void nurat_canonicalization(int); + +void +Init_rational(void) +{ + nurat_canonicalization(1); +} diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/.cvsignore b/lib/ruby-1.9.1-rc1/ext/nkf/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/depend b/lib/ruby-1.9.1-rc1/ext/nkf/depend new file mode 100644 index 0000000..0ed8fea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/depend @@ -0,0 +1 @@ +nkf.o : nkf.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(srcdir)/nkf-utf8/nkf.c $(srcdir)/nkf-utf8/utf8tbl.c $(srcdir)/nkf-utf8/config.h diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/extconf.rb b/lib/ruby-1.9.1-rc1/ext/nkf/extconf.rb new file mode 100644 index 0000000..710662f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile('nkf') diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/lib/kconv.rb b/lib/ruby-1.9.1-rc1/ext/nkf/lib/kconv.rb new file mode 100644 index 0000000..f2c9489 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/lib/kconv.rb @@ -0,0 +1,282 @@ +# +# kconv.rb - Kanji Converter. +# +# $Id: kconv.rb 15050 2008-01-14 14:37:29Z naruse $ +# +# ---- +# +# kconv.rb implements the Kconv class for Kanji Converter. Additionally, +# some methods in String classes are added to allow easy conversion. +# + +require 'nkf' + +# +# Kanji Converter for Ruby. +# +module Kconv + # + # Public Constants + # + + #Constant of Encoding + + # Auto-Detect + AUTO = NKF::AUTO + # ISO-2022-JP + JIS = NKF::JIS + # EUC-JP + EUC = NKF::EUC + # Shift_JIS + SJIS = NKF::SJIS + # BINARY + BINARY = NKF::BINARY + # NOCONV + NOCONV = NKF::NOCONV + # ASCII + ASCII = NKF::ASCII + # UTF-8 + UTF8 = NKF::UTF8 + # UTF-16 + UTF16 = NKF::UTF16 + # UTF-32 + UTF32 = NKF::UTF32 + # UNKNOWN + UNKNOWN = NKF::UNKNOWN + + # + # Public Methods + # + + # call-seq: + # Kconv.kconv(str, to_enc, from_enc=nil) + # + # Convert str to out_code. + # out_code and in_code are given as constants of Kconv. + def kconv(str, to_enc, from_enc=nil) + opt = '' + opt += ' --ic=' + from_enc.to_s if from_enc + opt += ' --oc=' + to_enc.to_s if to_enc + + ::NKF::nkf(opt, str) + end + module_function :kconv + + # + # Encode to + # + + # call-seq: + # Kconv.tojis(str) => string + # + # Convert str to ISO-2022-JP + def tojis(str) + kconv(str, JIS) + end + module_function :tojis + + # call-seq: + # Kconv.toeuc(str) => string + # + # Convert str to EUC-JP + def toeuc(str) + kconv(str, EUC) + end + module_function :toeuc + + # call-seq: + # Kconv.tosjis(str) => string + # + # Convert str to Shift_JIS + def tosjis(str) + kconv(str, SJIS) + end + module_function :tosjis + + # call-seq: + # Kconv.toutf8(str) => string + # + # Convert str to UTF-8 + def toutf8(str) + kconv(str, UTF8) + end + module_function :toutf8 + + # call-seq: + # Kconv.toutf16(str) => string + # + # Convert str to UTF-16 + def toutf16(str) + kconv(str, UTF16) + end + module_function :toutf16 + + # call-seq: + # Kconv.toutf32(str) => string + # + # Convert str to UTF-32 + def toutf32(str) + kconv(str, UTF32) + end + module_function :toutf32 + + # call-seq: + # Kconv.tolocale => string + # + # Convert self to locale encoding + def tolocale(str) + kconv(str, Encoding.locale_charmap) + end + module_function :tolocale + + # + # guess + # + + # call-seq: + # Kconv.guess(str) => encoding + # + # Guess input encoding by NKF.guess + def guess(str) + ::NKF::guess(str) + end + module_function :guess + + # + # isEncoding + # + + # call-seq: + # Kconv.iseuc(str) => true or false + # + # Returns whether input encoding is EUC-JP or not. + # + # *Note* don't expect this return value is MatchData. + def iseuc(str) + str.dup.force_encoding(EUC).valid_encoding? + end + module_function :iseuc + + # call-seq: + # Kconv.issjis(str) => true or false + # + # Returns whether input encoding is Shift_JIS or not. + def issjis(str) + str.dup.force_encoding(SJIS).valid_encoding? + end + module_function :issjis + + # call-seq: + # Kconv.isjis(str) => true or false + # + # Returns whether input encoding is ISO-2022-JP or not. + def isjis(str) + /\A [\t\n\r\x20-\x7E]* + (?: + (?:\x1b \x28 I [\x21-\x7E]* + |\x1b \x28 J [\x21-\x7E]* + |\x1b \x24 @ (?:[\x21-\x7E]{2})* + |\x1b \x24 B (?:[\x21-\x7E]{2})* + |\x1b \x24 \x28 D (?:[\x21-\x7E]{2})* + )* + \x1b \x28 B [\t\n\r\x20-\x7E]* + )* + \z/nox =~ str.dup.force_encoding('BINARY') ? true : false + end + module_function :isjis + + # call-seq: + # Kconv.isutf8(str) => true or false + # + # Returns whether input encoding is UTF-8 or not. + def isutf8(str) + str.dup.force_encoding(UTF8).valid_encoding? + end + module_function :isutf8 +end + +class String + # call-seq: + # String#kconv(to_enc, from_enc) + # + # Convert self to out_code. + # out_code and in_code are given as constants of Kconv. + def kconv(to_enc, from_enc=nil) + form_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0] + Kconv::kconv(self, to_enc, from_enc) + end + + # + # to Encoding + # + + # call-seq: + # String#tojis => string + # + # Convert self to ISO-2022-JP + def tojis; Kconv.tojis(self) end + + # call-seq: + # String#toeuc => string + # + # Convert self to EUC-JP + def toeuc; Kconv.toeuc(self) end + + # call-seq: + # String#tosjis => string + # + # Convert self to Shift_JIS + def tosjis; Kconv.tosjis(self) end + + # call-seq: + # String#toutf8 => string + # + # Convert self to UTF-8 + def toutf8; Kconv.toutf8(self) end + + # call-seq: + # String#toutf16 => string + # + # Convert self to UTF-16 + def toutf16; Kconv.toutf16(self) end + + # call-seq: + # String#toutf32 => string + # + # Convert self to UTF-32 + def toutf32; Kconv.toutf32(self) end + + # call-seq: + # String#tolocale => string + # + # Convert self to locale encoding + def tolocale; Kconv.tolocale(self) end + + # + # is Encoding + # + + # call-seq: + # String#iseuc => true or false + # + # Returns whether self's encoding is EUC-JP or not. + def iseuc; Kconv.iseuc(self) end + + # call-seq: + # String#issjis => true or false + # + # Returns whether self's encoding is Shift_JIS or not. + def issjis; Kconv.issjis(self) end + + # call-seq: + # String#isjis => true or false + # + # Returns whether self's encoding is ISO-2022-JP or not. + def isjis; Kconv.isjis(self) end + + # call-seq: + # String#isutf8 => true or false + # + # Returns whether self's encoding is UTF-8 or not. + def isutf8; Kconv.isutf8(self) end +end diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/config.h b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/config.h new file mode 100644 index 0000000..752ed38 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/config.h @@ -0,0 +1,51 @@ +#ifndef _CONFIG_H_ +#define _CONFIG_H_ + +/* UTF8 input and output */ +#define UTF8_INPUT_ENABLE +#define UTF8_OUTPUT_ENABLE + +/* invert characters invalid in Shift_JIS to CP932 */ +#define SHIFTJIS_CP932 + +/* fix input encoding when given by option */ +#define INPUT_CODE_FIX + +/* --overwrite option */ +/* by Satoru Takabayashi */ +#define OVERWRITE + +/* --cap-input, --url-input option */ +#define INPUT_OPTION + +/* --numchar-input option */ +#define NUMCHAR_OPTION + +/* --debug, --no-output option */ +#define CHECK_OPTION + +/* JIS X0212 */ +#define X0212_ENABLE + +/* --exec-in, --exec-out option + * require pipe, fork, execvp and so on. + * please undef this on MS-DOS, MinGW + * this is still buggy arround child process + */ +/* #define EXEC_IO */ + +/* Unicode Normalization */ +#define UNICODE_NORMALIZATION + +/* + * Select Default Output Encoding + * + */ + +/* #define DEFAULT_CODE_JIS */ +/* #define DEFAULT_CODE_SJIS */ +/* #define DEFAULT_CODE_WINDOWS_31J */ +/* #define DEFAULT_CODE_EUC */ +/* #define DEFAULT_CODE_UTF8 */ + +#endif /* _CONFIG_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.c b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.c new file mode 100644 index 0000000..f4c1266 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.c @@ -0,0 +1,6570 @@ +/** Network Kanji Filter. (PDS Version) + ** -*- coding: ISO-2022-JP -*- + ************************************************************************ + ** Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA) + ** $BO"Mm@h!'(B $B!J3t!KIY;NDL8&5f=j!!%=%U%H#38&!!;T@n!!;j(B + ** $B!J(BE-Mail Address: ichikawa@flab.fujitsu.co.jp$B!K(B + ** Copyright (C) 1996,1998 + ** Copyright (C) 2002 + ** $BO"Mm@h!'(B $BN05eBg3X>pJs9)3X2J(B $B2OLn(B $B??<#(B mime/X0208 support + ** $B!J(BE-Mail Address: kono@ie.u-ryukyu.ac.jp$B!K(B + ** $BO"Mm@h!'(B COW for DOS & Win16 & Win32 & OS/2 + ** $B!J(BE-Mail Address: GHG00637@niftyserve.or.p$B!K(B + ** + ** $B$3$N%=!<%9$N$$$+$J$kJ#e5-$KH?$7$J$$HO0O$G5v2D$7$^$9!#(B + ** $B%P%$%J%j$NG[I[$N:]$K$O(Bversion message$B$rJ]B8$9$k$3$H$r>r7o$H$7$^$9!#(B + ** $B$3$N%W%m%0%i%`$K$D$$$F$OFC$K2?$NJ]>Z$b$7$J$$!"0-$7$+$i$:!#(B + ** + ** Everyone is permitted to do anything on this program + ** including copying, modifying, improving, + ** as long as you don't try to pretend that you wrote it. + ** i.e., the above copyright notice has to appear in all copies. + ** Binary distribution requires original version messages. + ** You don't have to ask before copying, redistribution or publishing. + ** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. + ***********************************************************************/ + +/*********************************************************************** + * $B8=:_!"(Bnkf $B$O(B SorceForge $B$K$F%a%s%F%J%s%9$,B3$1$i$l$F$$$^$9!#(B + * http://sourceforge.jp/projects/nkf/ + ***********************************************************************/ +#define NKF_IDENT "$Id: nkf.c 20185 2008-11-11 08:41:20Z yugui $" +#define NKF_VERSION "2.0.8" +#define NKF_RELEASE_DATE "2008-11-07" +#define COPY_RIGHT \ + "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),2000 S. Kono, COW\n" \ + "Copyright (C) 2002-2008 Kono, Furukawa, Naruse, mastodon" + +#include "config.h" +#include "nkf.h" +#include "utf8tbl.h" +#ifdef __WIN32__ +#include +#include +#endif +#if defined(__OS2__) +# define INCL_DOS +# define INCL_DOSERRORS +# include +#endif + +/* state of output_mode and input_mode + + c2 0 means ASCII + JIS_X_0201_1976_K + ISO_8859_1 + JIS_X_0208 + EOF all termination + c1 32bit data + + */ + +/* MIME ENCODE */ + +#define FIXED_MIME 7 +#define STRICT_MIME 8 + +/* byte order */ +enum byte_order { + ENDIAN_BIG = 1, + ENDIAN_LITTLE = 2, + ENDIAN_2143 = 3, + ENDIAN_3412 = 4 +}; + +/* ASCII CODE */ + +#define BS 0x08 +#define TAB 0x09 +#define LF 0x0a +#define CR 0x0d +#define ESC 0x1b +#define SP 0x20 +#define DEL 0x7f +#define SI 0x0f +#define SO 0x0e +#define SS2 0x8e +#define SS3 0x8f +#define CRLF 0x0D0A + + +/* encodings */ + +enum nkf_encodings { + ASCII, + ISO_8859_1, + ISO_2022_JP, + CP50220, + CP50221, + CP50222, + ISO_2022_JP_1, + ISO_2022_JP_3, + ISO_2022_JP_2004, + SHIFT_JIS, + WINDOWS_31J, + CP10001, + EUC_JP, + EUCJP_NKF, + CP51932, + EUCJP_MS, + EUCJP_ASCII, + SHIFT_JISX0213, + SHIFT_JIS_2004, + EUC_JISX0213, + EUC_JIS_2004, + UTF_8, + UTF_8N, + UTF_8_BOM, + UTF8_MAC, + UTF_16, + UTF_16BE, + UTF_16BE_BOM, + UTF_16LE, + UTF_16LE_BOM, + UTF_32, + UTF_32BE, + UTF_32BE_BOM, + UTF_32LE, + UTF_32LE_BOM, + BINARY, + NKF_ENCODING_TABLE_SIZE, + JIS_X_0201_1976_K = 0x1013, /* I */ /* JIS C 6220-1969 */ + /* JIS_X_0201_1976_R = 0x1014, */ /* J */ /* JIS C 6220-1969 */ + /* JIS_X_0208_1978 = 0x1040, */ /* @ */ /* JIS C 6226-1978 */ + /* JIS_X_0208_1983 = 0x1087, */ /* B */ /* JIS C 6226-1983 */ + JIS_X_0208 = 0x1168, /* @B */ + JIS_X_0212 = 0x1159, /* D */ + /* JIS_X_0213_2000_1 = 0x1228, */ /* O */ + JIS_X_0213_2 = 0x1229, /* P */ + JIS_X_0213_1 = 0x1233, /* Q */ +}; + +static nkf_char s_iconv(nkf_char c2, nkf_char c1, nkf_char c0); +static nkf_char e_iconv(nkf_char c2, nkf_char c1, nkf_char c0); +static nkf_char w_iconv(nkf_char c2, nkf_char c1, nkf_char c0); +static nkf_char w_iconv16(nkf_char c2, nkf_char c1, nkf_char c0); +static nkf_char w_iconv32(nkf_char c2, nkf_char c1, nkf_char c0); +static void j_oconv(nkf_char c2, nkf_char c1); +static void s_oconv(nkf_char c2, nkf_char c1); +static void e_oconv(nkf_char c2, nkf_char c1); +static void w_oconv(nkf_char c2, nkf_char c1); +static void w_oconv16(nkf_char c2, nkf_char c1); +static void w_oconv32(nkf_char c2, nkf_char c1); + +typedef struct { + const char *name; + nkf_char (*iconv)(nkf_char c2, nkf_char c1, nkf_char c0); + void (*oconv)(nkf_char c2, nkf_char c1); +} nkf_native_encoding; + +nkf_native_encoding NkfEncodingASCII = { "ASCII", e_iconv, e_oconv }; +nkf_native_encoding NkfEncodingISO_2022_JP = { "ISO-2022-JP", e_iconv, j_oconv }; +nkf_native_encoding NkfEncodingShift_JIS = { "Shift_JIS", s_iconv, s_oconv }; +nkf_native_encoding NkfEncodingEUC_JP = { "EUC-JP", e_iconv, e_oconv }; +nkf_native_encoding NkfEncodingUTF_8 = { "UTF-8", w_iconv, w_oconv }; +nkf_native_encoding NkfEncodingUTF_16 = { "UTF-16", w_iconv16, w_oconv16 }; +nkf_native_encoding NkfEncodingUTF_32 = { "UTF-32", w_iconv32, w_oconv32 }; + +typedef struct { + const int id; + const char *name; + const nkf_native_encoding *base_encoding; +} nkf_encoding; + +nkf_encoding nkf_encoding_table[] = { + {ASCII, "US-ASCII", &NkfEncodingASCII}, + {ISO_8859_1, "ISO-8859-1", &NkfEncodingASCII}, + {ISO_2022_JP, "ISO-2022-JP", &NkfEncodingISO_2022_JP}, + {CP50220, "CP50220", &NkfEncodingISO_2022_JP}, + {CP50221, "CP50221", &NkfEncodingISO_2022_JP}, + {CP50222, "CP50222", &NkfEncodingISO_2022_JP}, + {ISO_2022_JP_1, "ISO-2022-JP-1", &NkfEncodingISO_2022_JP}, + {ISO_2022_JP_3, "ISO-2022-JP-3", &NkfEncodingISO_2022_JP}, + {ISO_2022_JP_2004, "ISO-2022-JP-2004", &NkfEncodingISO_2022_JP}, + {SHIFT_JIS, "Shift_JIS", &NkfEncodingShift_JIS}, + {WINDOWS_31J, "Windows-31J", &NkfEncodingShift_JIS}, + {CP10001, "CP10001", &NkfEncodingShift_JIS}, + {EUC_JP, "EUC-JP", &NkfEncodingEUC_JP}, + {EUCJP_NKF, "eucJP-nkf", &NkfEncodingEUC_JP}, + {CP51932, "CP51932", &NkfEncodingEUC_JP}, + {EUCJP_MS, "eucJP-MS", &NkfEncodingEUC_JP}, + {EUCJP_ASCII, "eucJP-ASCII", &NkfEncodingEUC_JP}, + {SHIFT_JISX0213, "Shift_JISX0213", &NkfEncodingShift_JIS}, + {SHIFT_JIS_2004, "Shift_JIS-2004", &NkfEncodingShift_JIS}, + {EUC_JISX0213, "EUC-JISX0213", &NkfEncodingEUC_JP}, + {EUC_JIS_2004, "EUC-JIS-2004", &NkfEncodingEUC_JP}, + {UTF_8, "UTF-8", &NkfEncodingUTF_8}, + {UTF_8N, "UTF-8N", &NkfEncodingUTF_8}, + {UTF_8_BOM, "UTF-8-BOM", &NkfEncodingUTF_8}, + {UTF8_MAC, "UTF8-MAC", &NkfEncodingUTF_8}, + {UTF_16, "UTF-16", &NkfEncodingUTF_16}, + {UTF_16BE, "UTF-16BE", &NkfEncodingUTF_16}, + {UTF_16BE_BOM, "UTF-16BE-BOM", &NkfEncodingUTF_16}, + {UTF_16LE, "UTF-16LE", &NkfEncodingUTF_16}, + {UTF_16LE_BOM, "UTF-16LE-BOM", &NkfEncodingUTF_16}, + {UTF_32, "UTF-32", &NkfEncodingUTF_32}, + {UTF_32BE, "UTF-32BE", &NkfEncodingUTF_32}, + {UTF_32BE_BOM, "UTF-32BE-BOM", &NkfEncodingUTF_32}, + {UTF_32LE, "UTF-32LE", &NkfEncodingUTF_32}, + {UTF_32LE_BOM, "UTF-32LE-BOM", &NkfEncodingUTF_32}, + {BINARY, "BINARY", &NkfEncodingASCII}, + {-1, NULL, NULL} +}; + +struct { + const char *name; + const int id; +} encoding_name_to_id_table[] = { + {"US-ASCII", ASCII}, + {"ASCII", ASCII}, + {"ISO-2022-JP", ISO_2022_JP}, + {"ISO2022JP-CP932", CP50220}, + {"CP50220", CP50220}, + {"CP50221", CP50221}, + {"CSISO2022JP", CP50221}, + {"CP50222", CP50222}, + {"ISO-2022-JP-1", ISO_2022_JP_1}, + {"ISO-2022-JP-3", ISO_2022_JP_3}, + {"ISO-2022-JP-2004", ISO_2022_JP_2004}, + {"SHIFT_JIS", SHIFT_JIS}, + {"SJIS", SHIFT_JIS}, + {"WINDOWS-31J", WINDOWS_31J}, + {"CSWINDOWS31J", WINDOWS_31J}, + {"CP932", WINDOWS_31J}, + {"MS932", WINDOWS_31J}, + {"CP10001", CP10001}, + {"EUCJP", EUC_JP}, + {"EUC-JP", EUC_JP}, + {"EUCJP-NKF", EUCJP_NKF}, + {"CP51932", CP51932}, + {"EUC-JP-MS", EUCJP_MS}, + {"EUCJP-MS", EUCJP_MS}, + {"EUCJPMS", EUCJP_MS}, + {"EUC-JP-ASCII", EUCJP_ASCII}, + {"EUCJP-ASCII", EUCJP_ASCII}, + {"SHIFT_JISX0213", SHIFT_JISX0213}, + {"SHIFT_JIS-2004", SHIFT_JIS_2004}, + {"EUC-JISX0213", EUC_JISX0213}, + {"EUC-JIS-2004", EUC_JIS_2004}, + {"UTF-8", UTF_8}, + {"UTF-8N", UTF_8N}, + {"UTF-8-BOM", UTF_8_BOM}, + {"UTF8-MAC", UTF8_MAC}, + {"UTF-8-MAC", UTF8_MAC}, + {"UTF-16", UTF_16}, + {"UTF-16BE", UTF_16BE}, + {"UTF-16BE-BOM", UTF_16BE_BOM}, + {"UTF-16LE", UTF_16LE}, + {"UTF-16LE-BOM", UTF_16LE_BOM}, + {"UTF-32", UTF_32}, + {"UTF-32BE", UTF_32BE}, + {"UTF-32BE-BOM", UTF_32BE_BOM}, + {"UTF-32LE", UTF_32LE}, + {"UTF-32LE-BOM", UTF_32LE_BOM}, + {"BINARY", BINARY}, + {NULL, -1} +}; + +#if defined(DEFAULT_CODE_JIS) +#define DEFAULT_ENCIDX ISO_2022_JP +#elif defined(DEFAULT_CODE_SJIS) +#define DEFAULT_ENCIDX SHIFT_JIS +#elif defined(DEFAULT_CODE_WINDOWS_31J) +#define DEFAULT_ENCIDX WINDOWS_31J +#elif defined(DEFAULT_CODE_EUC) +#define DEFAULT_ENCIDX EUC_JP +#elif defined(DEFAULT_CODE_UTF8) +#define DEFAULT_ENCIDX UTF_8 +#endif + + +#define is_alnum(c) \ + (('a'<=c && c<='z')||('A'<= c && c<='Z')||('0'<=c && c<='9')) + +/* I don't trust portablity of toupper */ +#define nkf_toupper(c) (('a'<=c && c<='z')?(c-('a'-'A')):c) +#define nkf_isoctal(c) ('0'<=c && c<='7') +#define nkf_isdigit(c) ('0'<=c && c<='9') +#define nkf_isxdigit(c) (nkf_isdigit(c) || ('a'<=c && c<='f') || ('A'<=c && c <= 'F')) +#define nkf_isblank(c) (c == SP || c == TAB) +#define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == LF) +#define nkf_isalpha(c) (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')) +#define nkf_isalnum(c) (nkf_isdigit(c) || nkf_isalpha(c)) +#define nkf_isprint(c) (SP<=c && c<='~') +#define nkf_isgraph(c) ('!'<=c && c<='~') +#define hex2bin(c) (('0'<=c&&c<='9') ? (c-'0') : \ + ('A'<=c&&c<='F') ? (c-'A'+10) : \ + ('a'<=c&&c<='f') ? (c-'a'+10) : 0) +#define bin2hex(c) ("0123456789ABCDEF"[c&15]) +#define is_eucg3(c2) (((unsigned short)c2 >> 8) == SS3) +#define nkf_noescape_mime(c) ((c == CR) || (c == LF) || \ + ((c > SP) && (c < DEL) && (c != '?') && (c != '=') && (c != '_') \ + && (c != '(') && (c != ')') && (c != '.') && (c != 0x22))) + +#define is_ibmext_in_sjis(c2) (CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END) +#define nkf_byte_jisx0201_katakana_p(c) (SP <= c && c < (0xE0&0x7F)) + +#define HOLD_SIZE 1024 +#if defined(INT_IS_SHORT) +#define IOBUF_SIZE 2048 +#else +#define IOBUF_SIZE 16384 +#endif + +#define DEFAULT_J 'B' +#define DEFAULT_R 'B' + + +#define GETA1 0x22 +#define GETA2 0x2e + + +/* MIME preprocessor */ + +#ifdef EASYWIN /*Easy Win */ +extern POINT _BufferSize; +#endif + +struct input_code{ + const char *name; + nkf_char stat; + nkf_char score; + nkf_char index; + nkf_char buf[3]; + void (*status_func)(struct input_code *, nkf_char); + nkf_char (*iconv_func)(nkf_char c2, nkf_char c1, nkf_char c0); + int _file_stat; +}; + +static const char *input_codename = NULL; /* NULL: unestablished, "": BINARY */ +static nkf_encoding *input_encoding = NULL; +static nkf_encoding *output_encoding = NULL; + +#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE) +/* UCS Mapping + * 0: Shift_JIS, eucJP-ascii + * 1: eucJP-ms + * 2: CP932, CP51932 + * 3: CP10001 + */ +#define UCS_MAP_ASCII 0 +#define UCS_MAP_MS 1 +#define UCS_MAP_CP932 2 +#define UCS_MAP_CP10001 3 +static int ms_ucs_map_f = UCS_MAP_ASCII; +#endif +#ifdef UTF8_INPUT_ENABLE +/* no NEC special, NEC-selected IBM extended and IBM extended characters */ +static int no_cp932ext_f = FALSE; +/* ignore ZERO WIDTH NO-BREAK SPACE */ +static int no_best_fit_chars_f = FALSE; +static int input_endian = ENDIAN_BIG; +static nkf_char unicode_subchar = '?'; /* the regular substitution character */ +static void (*encode_fallback)(nkf_char c) = NULL; +static void w_status(struct input_code *, nkf_char); +#endif +#ifdef UTF8_OUTPUT_ENABLE +static int output_bom_f = FALSE; +static int output_endian = ENDIAN_BIG; +#endif + +static void std_putc(nkf_char c); +static nkf_char std_getc(FILE *f); +static nkf_char std_ungetc(nkf_char c,FILE *f); + +static nkf_char broken_getc(FILE *f); +static nkf_char broken_ungetc(nkf_char c,FILE *f); + +static nkf_char mime_getc(FILE *f); + +static void mime_putc(nkf_char c); + +/* buffers */ + +#if !defined(PERL_XS) && !defined(WIN32DLL) +static unsigned char stdibuf[IOBUF_SIZE]; +static unsigned char stdobuf[IOBUF_SIZE]; +#endif + +/* flags */ +static int unbuf_f = FALSE; +static int estab_f = FALSE; +static int nop_f = FALSE; +static int binmode_f = TRUE; /* binary mode */ +static int rot_f = FALSE; /* rot14/43 mode */ +static int hira_f = FALSE; /* hira/kata henkan */ +static int alpha_f = FALSE; /* convert JIx0208 alphbet to ASCII */ +static int mime_f = MIME_DECODE_DEFAULT; /* convert MIME B base64 or Q */ +static int mime_decode_f = FALSE; /* mime decode is explicitly on */ +static int mimebuf_f = FALSE; /* MIME buffered input */ +static int broken_f = FALSE; /* convert ESC-less broken JIS */ +static int iso8859_f = FALSE; /* ISO8859 through */ +static int mimeout_f = FALSE; /* base64 mode */ +static int x0201_f = X0201_DEFAULT; /* convert JIS X 0201 */ +static int iso2022jp_f = FALSE; /* replace non ISO-2022-JP with GETA */ + +#ifdef UNICODE_NORMALIZATION +static int nfc_f = FALSE; +static nkf_char (*i_nfc_getc)(FILE *) = std_getc; /* input of ugetc */ +static nkf_char (*i_nfc_ungetc)(nkf_char c ,FILE *f) = std_ungetc; +#endif + +#ifdef INPUT_OPTION +static int cap_f = FALSE; +static nkf_char (*i_cgetc)(FILE *) = std_getc; /* input of cgetc */ +static nkf_char (*i_cungetc)(nkf_char c ,FILE *f) = std_ungetc; + +static int url_f = FALSE; +static nkf_char (*i_ugetc)(FILE *) = std_getc; /* input of ugetc */ +static nkf_char (*i_uungetc)(nkf_char c ,FILE *f) = std_ungetc; +#endif + +#define PREFIX_EUCG3 NKF_INT32_C(0x8F00) +#define CLASS_MASK NKF_INT32_C(0xFF000000) +#define CLASS_UNICODE NKF_INT32_C(0x01000000) +#define VALUE_MASK NKF_INT32_C(0x00FFFFFF) +#define UNICODE_BMP_MAX NKF_INT32_C(0x0000FFFF) +#define UNICODE_MAX NKF_INT32_C(0x0010FFFF) +#define nkf_char_euc3_new(c) ((c) | PREFIX_EUCG3) +#define nkf_char_unicode_new(c) ((c) | CLASS_UNICODE) +#define nkf_char_unicode_p(c) ((c & CLASS_MASK) == CLASS_UNICODE) +#define nkf_char_unicode_bmp_p(c) ((c & VALUE_MASK) <= UNICODE_BMP_MAX) +#define nkf_char_unicode_value_p(c) ((c & VALUE_MASK) <= UNICODE_MAX) + +#ifdef NUMCHAR_OPTION +static int numchar_f = FALSE; +static nkf_char (*i_ngetc)(FILE *) = std_getc; /* input of ugetc */ +static nkf_char (*i_nungetc)(nkf_char c ,FILE *f) = std_ungetc; +#endif + +#ifdef CHECK_OPTION +static int noout_f = FALSE; +static void no_putc(nkf_char c); +static int debug_f = FALSE; +static void debug(const char *str); +static nkf_char (*iconv_for_check)(nkf_char c2,nkf_char c1,nkf_char c0) = 0; +#endif + +static int guess_f = 0; /* 0: OFF, 1: ON, 2: VERBOSE */ +static void set_input_codename(const char *codename); + +#ifdef EXEC_IO +static int exec_f = 0; +#endif + +#ifdef SHIFTJIS_CP932 +/* invert IBM extended characters to others */ +static int cp51932_f = FALSE; + +/* invert NEC-selected IBM extended characters to IBM extended characters */ +static int cp932inv_f = TRUE; + +/* static nkf_char cp932_conv(nkf_char c2, nkf_char c1); */ +#endif /* SHIFTJIS_CP932 */ + +static int x0212_f = FALSE; +static int x0213_f = FALSE; + +static unsigned char prefix_table[256]; + +static void e_status(struct input_code *, nkf_char); +static void s_status(struct input_code *, nkf_char); + +struct input_code input_code_list[] = { + {"EUC-JP", 0, 0, 0, {0, 0, 0}, e_status, e_iconv, 0}, + {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0}, +#ifdef UTF8_INPUT_ENABLE + {"UTF-8", 0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0}, +#endif + {0} +}; + +static int mimeout_mode = 0; /* 0, -1, 'Q', 'B', 1, 2 */ +static int base64_count = 0; + +/* X0208 -> ASCII converter */ + +/* fold parameter */ +static int f_line = 0; /* chars in line */ +static int f_prev = 0; +static int fold_preserve_f = FALSE; /* preserve new lines */ +static int fold_f = FALSE; +static int fold_len = 0; + +/* options */ +static unsigned char kanji_intro = DEFAULT_J; +static unsigned char ascii_intro = DEFAULT_R; + +/* Folding */ + +#define FOLD_MARGIN 10 +#define DEFAULT_FOLD 60 + +static int fold_margin = FOLD_MARGIN; + +/* process default */ + +static nkf_char +no_connection2(nkf_char c2, nkf_char c1, nkf_char c0) +{ + fprintf(stderr,"nkf internal module connection failure.\n"); + exit(1); + return 0; /* LINT */ +} + +static void +no_connection(nkf_char c2, nkf_char c1) +{ + no_connection2(c2,c1,0); +} + +static nkf_char (*iconv)(nkf_char c2,nkf_char c1,nkf_char c0) = no_connection2; +static void (*oconv)(nkf_char c2,nkf_char c1) = no_connection; + +static void (*o_zconv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_fconv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_eol_conv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_rot_conv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_hira_conv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_base64conv)(nkf_char c2,nkf_char c1) = no_connection; +static void (*o_iso2022jp_check_conv)(nkf_char c2,nkf_char c1) = no_connection; + +/* static redirections */ + +static void (*o_putc)(nkf_char c) = std_putc; + +static nkf_char (*i_getc)(FILE *f) = std_getc; /* general input */ +static nkf_char (*i_ungetc)(nkf_char c,FILE *f) =std_ungetc; + +static nkf_char (*i_bgetc)(FILE *) = std_getc; /* input of mgetc */ +static nkf_char (*i_bungetc)(nkf_char c ,FILE *f) = std_ungetc; + +static void (*o_mputc)(nkf_char c) = std_putc ; /* output of mputc */ + +static nkf_char (*i_mgetc)(FILE *) = std_getc; /* input of mgetc */ +static nkf_char (*i_mungetc)(nkf_char c ,FILE *f) = std_ungetc; + +/* for strict mime */ +static nkf_char (*i_mgetc_buf)(FILE *) = std_getc; /* input of mgetc_buf */ +static nkf_char (*i_mungetc_buf)(nkf_char c,FILE *f) = std_ungetc; + +/* Global states */ +static int output_mode = ASCII; /* output kanji mode */ +static int input_mode = ASCII; /* input kanji mode */ +static int mime_decode_mode = FALSE; /* MIME mode B base64, Q hex */ + +/* X0201 / X0208 conversion tables */ + +/* X0201 kana conversion table */ +/* 90-9F A0-DF */ +static const unsigned char cv[]= { + 0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57, + 0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21, + 0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29, + 0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43, + 0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26, + 0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d, + 0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35, + 0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d, + 0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46, + 0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c, + 0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52, + 0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e, + 0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62, + 0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69, + 0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d, + 0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c, + 0x00,0x00}; + + +/* X0201 kana conversion table for daguten */ +/* 90-9F A0-DF */ +static const unsigned char dv[]= { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x74, + 0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e, + 0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36, + 0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e, + 0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47, + 0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53, + 0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; + +/* X0201 kana conversion table for han-daguten */ +/* 90-9F A0-DF */ +static const unsigned char ev[]= { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54, + 0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00}; + + +/* X0208 kigou conversion table */ +/* 0x8140 - 0x819e */ +static const unsigned char fv[] = { + + 0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a, + 0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00, + 0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f, + 0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27, + 0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d, + 0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00, + 0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 +} ; + + + +static int option_mode = 0; +static int file_out_f = FALSE; +#ifdef OVERWRITE +static int overwrite_f = FALSE; +static int preserve_time_f = FALSE; +static int backup_f = FALSE; +static char *backup_suffix = ""; +#endif + +static int eolmode_f = 0; /* CR, LF, CRLF */ +static int input_eol = 0; /* 0: unestablished, EOF: MIXED */ +static nkf_char prev_cr = 0; /* CR or 0 */ +#ifdef EASYWIN /*Easy Win */ +static int end_check; +#endif /*Easy Win */ + +#define STD_GC_BUFSIZE (256) +nkf_char std_gc_buf[STD_GC_BUFSIZE]; +nkf_char std_gc_ndx; + +static int +nkf_str_caseeql(const char *src, const char *target) +{ + int i; + for (i = 0; src[i] && target[i]; i++) { + if (nkf_toupper(src[i]) != nkf_toupper(target[i])) return FALSE; + } + if (src[i] || target[i]) return FALSE; + else return TRUE; +} + +static nkf_encoding* +nkf_enc_from_index(int idx) +{ + if (idx < 0 || NKF_ENCODING_TABLE_SIZE <= idx) { + return 0; + } + return &nkf_encoding_table[idx]; +} + +static int +nkf_enc_find_index(const char *name) +{ + int i; + if (name[0] == 'X' && *(name+1) == '-') name += 2; + for (i = 0; encoding_name_to_id_table[i].id >= 0; i++) { + if (nkf_str_caseeql(encoding_name_to_id_table[i].name, name)) { + return encoding_name_to_id_table[i].id; + } + } + return -1; +} + +static nkf_encoding* +nkf_enc_find(const char *name) +{ + int idx = -1; + idx = nkf_enc_find_index(name); + if (idx < 0) return 0; + return nkf_enc_from_index(idx); +} + +#define nkf_enc_name(enc) (enc)->name +#define nkf_enc_to_index(enc) (enc)->id +#define nkf_enc_to_base_encoding(enc) (enc)->base_encoding +#define nkf_enc_to_iconv(enc) nkf_enc_to_base_encoding(enc)->iconv +#define nkf_enc_to_oconv(enc) nkf_enc_to_base_encoding(enc)->oconv +#define nkf_enc_asciicompat(enc) (\ + nkf_enc_to_base_encoding(enc) == &NkfEncodingASCII ||\ + nkf_enc_to_base_encoding(enc) == &NkfEncodingISO_2022_JP) +#define nkf_enc_unicode_p(enc) (\ + nkf_enc_to_base_encoding(enc) == &NkfEncodingUTF_8 ||\ + nkf_enc_to_base_encoding(enc) == &NkfEncodingUTF_16 ||\ + nkf_enc_to_base_encoding(enc) == &NkfEncodingUTF_32) +#define nkf_enc_cp5022x_p(enc) (\ + nkf_enc_to_index(enc) == CP50220 ||\ + nkf_enc_to_index(enc) == CP50221 ||\ + nkf_enc_to_index(enc) == CP50222) + +#ifdef DEFAULT_CODE_LOCALE +static char* +nkf_locale_charmap() +{ +#ifdef HAVE_LANGINFO_H + return nl_langinfo(CODESET); +#elif defined(__WIN32__) + char buf[16]; + char *str; + int len = sprintf(buf, "CP%d", GetACP()); + if (len > 0) { + str = malloc(len + 1); + strcpy(str, buf); + str[len] = '\0'; + return str; + } + else return NULL; +#elif defined(__OS2__) +# if defined(INT_IS_SHORT) + /* OS/2 1.x */ + return NULL; +# else + /* OS/2 32bit */ + static char buf[16]; + ULONG ulCP[1], ulncp; + DosQueryCp(sizeof(ulCP), ulCP, &ulncp); + if (ulCP[0] == 932 || ulCP[0] == 943) + strcpy(buf, "Shift_JIS"); + else + sprintf(buf, "CP%lu", ulCP[0]); + return buf; +# endif +#else + return NULL; +#endif +} + +static nkf_encoding* +nkf_locale_encoding() +{ + nkf_encoding *enc = 0; + char *encname = nkf_locale_charmap(); + if (encname) + enc = nkf_enc_find(encname); + return enc; +} +#endif /* DEFAULT_CODE_LOCALE */ + +static nkf_encoding* +nkf_utf8_encoding() +{ + return &nkf_encoding_table[UTF_8]; +} + +static nkf_encoding* +nkf_default_encoding() +{ + nkf_encoding *enc = 0; +#ifdef DEFAULT_CODE_LOCALE + enc = nkf_locale_encoding(); +#elif defined(DEFAULT_ENCIDX) + enc = nkf_enc_from_index(DEFAULT_ENCIDX); +#endif + if (!enc) enc = nkf_utf8_encoding(); + return enc; +} + +#ifndef PERL_XS +#ifdef WIN32DLL +#define fprintf dllprintf +#endif + +static void +version(void) +{ + fprintf(HELP_OUTPUT,"Network Kanji Filter Version " NKF_VERSION " (" NKF_RELEASE_DATE ") \n" COPY_RIGHT "\n"); +} + +static void +usage(void) +{ + fprintf(HELP_OUTPUT, + "USAGE: nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n" + "Flags:\n" + "b,u Output is buffered (DEFAULT),Output is unbuffered\n" + "j,s,e,w Output code is ISO-2022-JP, Shift JIS, EUC-JP, UTF-8N\n" +#ifdef UTF8_OUTPUT_ENABLE + " After 'w' you can add more options. -w[ 8 [0], 16 [[BL] [0]] ]\n" +#endif + "J,S,E,W Input assumption is JIS 7 bit , Shift JIS, EUC-JP, UTF-8\n" +#ifdef UTF8_INPUT_ENABLE + " After 'W' you can add more options. -W[ 8, 16 [BL] ] \n" +#endif + "t no conversion\n" + "i[@B] Specify the Esc Seq for JIS X 0208-1978/83 (DEFAULT B)\n" + "o[BJH] Specify the Esc Seq for ASCII/Roman (DEFAULT B)\n" + "r {de/en}crypt ROT13/47\n" + "h 1 katakana->hiragana, 2 hiragana->katakana, 3 both\n" + "m[BQSN0] MIME decode [B:base64,Q:quoted,S:strict,N:non-strict,0:no decode]\n" + "M[BQ] MIME encode [B:base64 Q:quoted]\n" + "l ISO8859-1 (Latin-1) support\n" + "f/F Folding: -f60 or -f or -f60-10 (fold margin 10) F preserve nl\n" + "Z[0-4] Default/0: Convert JISX0208 Alphabet to ASCII\n" + " 1: Kankaku to one space 2: to two spaces 3: HTML Entity\n" + " 4: JISX0208 Katakana to JISX0201 Katakana\n" + "X,x Assume X0201 kana in MS-Kanji, -x preserves X0201\n" + "B[0-2] Broken input 0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL\n" +#ifdef MSDOS + "T Text mode output\n" +#endif + "O Output to File (DEFAULT 'nkf.out')\n" + "I Convert non ISO-2022-JP charactor to GETA\n" + "d,c Convert line breaks -d: LF -c: CRLF\n" + "-L[uwm] line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n" + "v, V Show this usage. V: show configuration\n" + "\n" + "Long name options\n" + " --ic= --oc=\n" + " Specify the input or output codeset\n" + " --fj --unix --mac --windows\n" + " --jis --euc --sjis --utf8 --utf16 --mime --base64\n" + " Convert for the system or code\n" + " --hiragana --katakana --katakana-hiragana\n" + " To Hiragana/Katakana Conversion\n" + " --prefix= Insert escape before troublesome characters of Shift_JIS\n" +#ifdef INPUT_OPTION + " --cap-input, --url-input Convert hex after ':' or '%%'\n" +#endif +#ifdef NUMCHAR_OPTION + " --numchar-input Convert Unicode Character Reference\n" +#endif +#ifdef UTF8_INPUT_ENABLE + " --fb-{skip, html, xml, perl, java, subchar}\n" + " Specify how nkf handles unassigned characters\n" +#endif +#ifdef OVERWRITE + " --in-place[=SUFFIX] --overwrite[=SUFFIX]\n" + " Overwrite original listed files by filtered result\n" + " --overwrite preserves timestamp of original files\n" +#endif + " -g --guess Guess the input code\n" + " --help --version Show this help/the version\n" + " For more information, see also man nkf\n" + "\n"); + version(); +} + +static void +show_configuration(void) +{ + fprintf(HELP_OUTPUT, + "Summary of my nkf " NKF_VERSION " (" NKF_RELEASE_DATE ") configuration:\n" + " nkf identity:\n" + " " NKF_IDENT "\n" + " Compile-time options:\n" + " Compiled at: " __DATE__ " " __TIME__ "\n" + ); + fprintf(HELP_OUTPUT, + " Default output encoding: " +#ifdef DEFAULT_CODE_LOCALE + "LOCALE (%s)\n", nkf_enc_name(nkf_default_encoding()) +#elif defined(DEFAULT_ENCIDX) + "CONFIG (%s)\n", nkf_enc_name(nkf_default_encoding()) +#else + "NONE\n" +#endif + ); + fprintf(HELP_OUTPUT, + " Default output end of line: " +#if DEFAULT_NEWLINE == CR + "CR" +#elif DEFAULT_NEWLINE == CRLF + "CRLF" +#else + "LF" +#endif + "\n" + " Decode MIME encoded string: " +#if MIME_DECODE_DEFAULT + "ON" +#else + "OFF" +#endif + "\n" + " Convert JIS X 0201 Katakana: " +#if X0201_DEFAULT + "ON" +#else + "OFF" +#endif + "\n" + " --help, --version output: " +#if HELP_OUTPUT_HELP_OUTPUT + "HELP_OUTPUT" +#else + "STDOUT" +#endif + "\n"); +} +#endif /*PERL_XS*/ + +#ifdef OVERWRITE +static char* +get_backup_filename(const char *suffix, const char *filename) +{ + char *backup_filename; + int asterisk_count = 0; + int i, j; + int filename_length = strlen(filename); + + for(i = 0; suffix[i]; i++){ + if(suffix[i] == '*') asterisk_count++; + } + + if(asterisk_count){ + backup_filename = malloc(strlen(suffix) + (asterisk_count * (filename_length - 1)) + 1); + if (!backup_filename){ + perror("Can't malloc backup filename."); + return NULL; + } + + for(i = 0, j = 0; suffix[i];){ + if(suffix[i] == '*'){ + backup_filename[j] = '\0'; + strncat(backup_filename, filename, filename_length); + i++; + j += filename_length; + }else{ + backup_filename[j++] = suffix[i++]; + } + } + backup_filename[j] = '\0'; + }else{ + j = filename_length + strlen(suffix); + backup_filename = malloc(j + 1); + strcpy(backup_filename, filename); + strcat(backup_filename, suffix); + backup_filename[j] = '\0'; + } + return backup_filename; +} +#endif + +#ifdef UTF8_INPUT_ENABLE +static void +nkf_each_char_to_hex(void (*f)(nkf_char c2,nkf_char c1), nkf_char c) +{ + int shift = 20; + c &= VALUE_MASK; + while(shift >= 0){ + if(c >= 1<= 0){ + (*f)(0, bin2hex(c>>shift)); + shift -= 4; + } + }else{ + shift -= 4; + } + } + return; +} + +static void +encode_fallback_html(nkf_char c) +{ + (*oconv)(0, '&'); + (*oconv)(0, '#'); + c &= VALUE_MASK; + if(c >= NKF_INT32_C(1000000)) + (*oconv)(0, 0x30+(c/NKF_INT32_C(1000000))%10); + if(c >= NKF_INT32_C(100000)) + (*oconv)(0, 0x30+(c/NKF_INT32_C(100000) )%10); + if(c >= 10000) + (*oconv)(0, 0x30+(c/10000 )%10); + if(c >= 1000) + (*oconv)(0, 0x30+(c/1000 )%10); + if(c >= 100) + (*oconv)(0, 0x30+(c/100 )%10); + if(c >= 10) + (*oconv)(0, 0x30+(c/10 )%10); + if(c >= 0) + (*oconv)(0, 0x30+ c %10); + (*oconv)(0, ';'); + return; +} + +static void +encode_fallback_xml(nkf_char c) +{ + (*oconv)(0, '&'); + (*oconv)(0, '#'); + (*oconv)(0, 'x'); + nkf_each_char_to_hex(oconv, c); + (*oconv)(0, ';'); + return; +} + +static void +encode_fallback_java(nkf_char c) +{ + (*oconv)(0, '\\'); + c &= VALUE_MASK; + if(!nkf_char_unicode_bmp_p(c)){ + (*oconv)(0, 'U'); + (*oconv)(0, '0'); + (*oconv)(0, '0'); + (*oconv)(0, bin2hex(c>>20)); + (*oconv)(0, bin2hex(c>>16)); + }else{ + (*oconv)(0, 'u'); + } + (*oconv)(0, bin2hex(c>>12)); + (*oconv)(0, bin2hex(c>> 8)); + (*oconv)(0, bin2hex(c>> 4)); + (*oconv)(0, bin2hex(c )); + return; +} + +static void +encode_fallback_perl(nkf_char c) +{ + (*oconv)(0, '\\'); + (*oconv)(0, 'x'); + (*oconv)(0, '{'); + nkf_each_char_to_hex(oconv, c); + (*oconv)(0, '}'); + return; +} + +static void +encode_fallback_subchar(nkf_char c) +{ + c = unicode_subchar; + (*oconv)((c>>8)&0xFF, c&0xFF); + return; +} +#endif + +static const struct { + const char *name; + const char *alias; +} long_option[] = { + {"ic=", ""}, + {"oc=", ""}, + {"base64","jMB"}, + {"euc","e"}, + {"euc-input","E"}, + {"fj","jm"}, + {"help","v"}, + {"jis","j"}, + {"jis-input","J"}, + {"mac","sLm"}, + {"mime","jM"}, + {"mime-input","m"}, + {"msdos","sLw"}, + {"sjis","s"}, + {"sjis-input","S"}, + {"unix","eLu"}, + {"version","V"}, + {"windows","sLw"}, + {"hiragana","h1"}, + {"katakana","h2"}, + {"katakana-hiragana","h3"}, + {"guess=", ""}, + {"guess", "g2"}, + {"cp932", ""}, + {"no-cp932", ""}, +#ifdef X0212_ENABLE + {"x0212", ""}, +#endif +#ifdef UTF8_OUTPUT_ENABLE + {"utf8", "w"}, + {"utf16", "w16"}, + {"ms-ucs-map", ""}, + {"fb-skip", ""}, + {"fb-html", ""}, + {"fb-xml", ""}, + {"fb-perl", ""}, + {"fb-java", ""}, + {"fb-subchar", ""}, + {"fb-subchar=", ""}, +#endif +#ifdef UTF8_INPUT_ENABLE + {"utf8-input", "W"}, + {"utf16-input", "W16"}, + {"no-cp932ext", ""}, + {"no-best-fit-chars",""}, +#endif +#ifdef UNICODE_NORMALIZATION + {"utf8mac-input", ""}, +#endif +#ifdef OVERWRITE + {"overwrite", ""}, + {"overwrite=", ""}, + {"in-place", ""}, + {"in-place=", ""}, +#endif +#ifdef INPUT_OPTION + {"cap-input", ""}, + {"url-input", ""}, +#endif +#ifdef NUMCHAR_OPTION + {"numchar-input", ""}, +#endif +#ifdef CHECK_OPTION + {"no-output", ""}, + {"debug", ""}, +#endif +#ifdef SHIFTJIS_CP932 + {"cp932inv", ""}, +#endif +#ifdef EXEC_IO + {"exec-in", ""}, + {"exec-out", ""}, +#endif + {"prefix=", ""}, +}; + +static void +set_input_encoding(nkf_encoding *enc) +{ + switch (nkf_enc_to_index(enc)) { + case ISO_8859_1: + iso8859_f = TRUE; + break; + case CP50220: + case CP50221: + case CP50222: +#ifdef SHIFTJIS_CP932 + cp51932_f = TRUE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case ISO_2022_JP_1: + x0212_f = TRUE; + break; + case ISO_2022_JP_3: + x0212_f = TRUE; + x0213_f = TRUE; + break; + case ISO_2022_JP_2004: + x0212_f = TRUE; + x0213_f = TRUE; + break; + case SHIFT_JIS: + break; + case WINDOWS_31J: +#ifdef SHIFTJIS_CP932 + cp51932_f = TRUE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + break; + case CP10001: +#ifdef SHIFTJIS_CP932 + cp51932_f = TRUE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP10001; +#endif + break; + case EUC_JP: + break; + case EUCJP_NKF: + break; + case CP51932: +#ifdef SHIFTJIS_CP932 + cp51932_f = TRUE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case EUCJP_MS: +#ifdef SHIFTJIS_CP932 + cp51932_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_MS; +#endif + break; + case EUCJP_ASCII: +#ifdef SHIFTJIS_CP932 + cp51932_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_ASCII; +#endif + break; + case SHIFT_JISX0213: + case SHIFT_JIS_2004: + x0213_f = TRUE; +#ifdef SHIFTJIS_CP932 + cp51932_f = FALSE; +#endif + break; + case EUC_JISX0213: + case EUC_JIS_2004: + x0213_f = TRUE; +#ifdef SHIFTJIS_CP932 + cp51932_f = FALSE; +#endif + break; +#ifdef UTF8_INPUT_ENABLE +#ifdef UNICODE_NORMALIZATION + case UTF8_MAC: + nfc_f = TRUE; + break; +#endif + case UTF_16: + case UTF_16BE: + case UTF_16BE_BOM: + input_endian = ENDIAN_BIG; + break; + case UTF_16LE: + case UTF_16LE_BOM: + input_endian = ENDIAN_LITTLE; + break; + case UTF_32: + case UTF_32BE: + case UTF_32BE_BOM: + input_endian = ENDIAN_BIG; + break; + case UTF_32LE: + case UTF_32LE_BOM: + input_endian = ENDIAN_LITTLE; + break; +#endif + } +} + +static void +set_output_encoding(nkf_encoding *enc) +{ + switch (nkf_enc_to_index(enc)) { + case CP50220: + x0201_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case CP50221: +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case ISO_2022_JP_1: + x0212_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif + break; + case ISO_2022_JP_3: + x0212_f = TRUE; + x0213_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif + break; + case SHIFT_JIS: + break; + case WINDOWS_31J: +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case CP10001: +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP10001; +#endif + break; + case EUC_JP: + x0212_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_ASCII; +#endif + break; + case EUCJP_NKF: + x0212_f = FALSE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_ASCII; +#endif + break; + case CP51932: +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_CP932; +#endif + break; + case EUCJP_MS: + x0212_f = TRUE; +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_MS; +#endif + break; + case EUCJP_ASCII: + x0212_f = TRUE; +#ifdef UTF8_OUTPUT_ENABLE + ms_ucs_map_f = UCS_MAP_ASCII; +#endif + break; + case SHIFT_JISX0213: + case SHIFT_JIS_2004: + x0213_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif + break; + case EUC_JISX0213: + case EUC_JIS_2004: + x0212_f = TRUE; + x0213_f = TRUE; +#ifdef SHIFTJIS_CP932 + if (cp932inv_f == TRUE) cp932inv_f = FALSE; +#endif + break; +#ifdef UTF8_OUTPUT_ENABLE + case UTF_8_BOM: + output_bom_f = TRUE; + break; + case UTF_16: + case UTF_16BE_BOM: + output_bom_f = TRUE; + break; + case UTF_16LE: + output_endian = ENDIAN_LITTLE; + output_bom_f = FALSE; + break; + case UTF_16LE_BOM: + output_endian = ENDIAN_LITTLE; + output_bom_f = TRUE; + break; + case UTF_32BE_BOM: + output_bom_f = TRUE; + break; + case UTF_32LE: + output_endian = ENDIAN_LITTLE; + output_bom_f = FALSE; + break; + case UTF_32LE_BOM: + output_endian = ENDIAN_LITTLE; + output_bom_f = TRUE; + break; +#endif + } +} + +static struct input_code* +find_inputcode_byfunc(nkf_char (*iconv_func)(nkf_char c2,nkf_char c1,nkf_char c0)) +{ + if (iconv_func){ + struct input_code *p = input_code_list; + while (p->name){ + if (iconv_func == p->iconv_func){ + return p; + } + p++; + } + } + return 0; +} + +static void +set_iconv(nkf_char f, nkf_char (*iconv_func)(nkf_char c2,nkf_char c1,nkf_char c0)) +{ +#ifdef INPUT_CODE_FIX + if (f || !input_encoding) +#endif + if (estab_f != f){ + estab_f = f; + } + + if (iconv_func +#ifdef INPUT_CODE_FIX + && (f == -TRUE || !input_encoding) /* -TRUE means "FORCE" */ +#endif + ){ + iconv = iconv_func; + } +#ifdef CHECK_OPTION + if (estab_f && iconv_for_check != iconv){ + struct input_code *p = find_inputcode_byfunc(iconv); + if (p){ + set_input_codename(p->name); + debug(p->name); + } + iconv_for_check = iconv; + } +#endif +} + +#ifdef X0212_ENABLE +static nkf_char +x0212_shift(nkf_char c) +{ + nkf_char ret = c; + c &= 0x7f; + if (is_eucg3(ret)){ + if (0x75 <= c && c <= 0x7f){ + ret = c + (0x109 - 0x75); + } + }else{ + if (0x75 <= c && c <= 0x7f){ + ret = c + (0x113 - 0x75); + } + } + return ret; +} + + +static nkf_char +x0212_unshift(nkf_char c) +{ + nkf_char ret = c; + if (0x7f <= c && c <= 0x88){ + ret = c + (0x75 - 0x7f); + }else if (0x89 <= c && c <= 0x92){ + ret = PREFIX_EUCG3 | 0x80 | (c + (0x75 - 0x89)); + } + return ret; +} +#endif /* X0212_ENABLE */ + +static nkf_char +e2s_conv(nkf_char c2, nkf_char c1, nkf_char *p2, nkf_char *p1) +{ + nkf_char ndx; + if (is_eucg3(c2)){ + ndx = c2 & 0x7f; + if (x0213_f){ + if((0x21 <= ndx && ndx <= 0x2F)){ + if (p2) *p2 = ((ndx - 1) >> 1) + 0xec - ndx / 8 * 3; + if (p1) *p1 = c1 + ((ndx & 1) ? ((c1 < 0x60) ? 0x1f : 0x20) : 0x7e); + return 0; + }else if(0x6E <= ndx && ndx <= 0x7E){ + if (p2) *p2 = ((ndx - 1) >> 1) + 0xbe; + if (p1) *p1 = c1 + ((ndx & 1) ? ((c1 < 0x60) ? 0x1f : 0x20) : 0x7e); + return 0; + } + return 1; + } +#ifdef X0212_ENABLE + else if(nkf_isgraph(ndx)){ + nkf_char val = 0; + const unsigned short *ptr; + ptr = x0212_shiftjis[ndx - 0x21]; + if (ptr){ + val = ptr[(c1 & 0x7f) - 0x21]; + } + if (val){ + c2 = val >> 8; + c1 = val & 0xff; + if (p2) *p2 = c2; + if (p1) *p1 = c1; + return 0; + } + c2 = x0212_shift(c2); + } +#endif /* X0212_ENABLE */ + } + if(0x7F < c2) return 1; + if (p2) *p2 = ((c2 - 1) >> 1) + ((c2 <= 0x5e) ? 0x71 : 0xb1); + if (p1) *p1 = c1 + ((c2 & 1) ? ((c1 < 0x60) ? 0x1f : 0x20) : 0x7e); + return 0; +} + +static nkf_char +s2e_conv(nkf_char c2, nkf_char c1, nkf_char *p2, nkf_char *p1) +{ +#if defined(SHIFTJIS_CP932) || defined(X0212_ENABLE) + nkf_char val; +#endif + static const char shift_jisx0213_s1a3_table[5][2] ={ { 1, 8}, { 3, 4}, { 5,12}, {13,14}, {15, 0} }; + if (0xFC < c1) return 1; +#ifdef SHIFTJIS_CP932 + if (!cp932inv_f && is_ibmext_in_sjis(c2)){ + val = shiftjis_cp932[c2 - CP932_TABLE_BEGIN][c1 - 0x40]; + if (val){ + c2 = val >> 8; + c1 = val & 0xff; + } + } + if (cp932inv_f + && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){ + val = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40]; + if (val){ + c2 = val >> 8; + c1 = val & 0xff; + } + } +#endif /* SHIFTJIS_CP932 */ +#ifdef X0212_ENABLE + if (!x0213_f && is_ibmext_in_sjis(c2)){ + val = shiftjis_x0212[c2 - 0xfa][c1 - 0x40]; + if (val){ + if (val > 0x7FFF){ + c2 = PREFIX_EUCG3 | ((val >> 8) & 0x7f); + c1 = val & 0xff; + }else{ + c2 = val >> 8; + c1 = val & 0xff; + } + if (p2) *p2 = c2; + if (p1) *p1 = c1; + return 0; + } + } +#endif + if(c2 >= 0x80){ + if(x0213_f && c2 >= 0xF0){ + if(c2 <= 0xF3 || (c2 == 0xF4 && c1 < 0x9F)){ /* k=1, 3<=k<=5, k=8, 12<=k<=15 */ + c2 = PREFIX_EUCG3 | 0x20 | shift_jisx0213_s1a3_table[c2 - 0xF0][0x9E < c1]; + }else{ /* 78<=k<=94 */ + c2 = PREFIX_EUCG3 | (c2 * 2 - 0x17B); + if (0x9E < c1) c2++; + } + }else{ +#define SJ0162 0x00e1 /* 01 - 62 ku offset */ +#define SJ6394 0x0161 /* 63 - 94 ku offset */ + c2 = c2 + c2 - ((c2 <= 0x9F) ? SJ0162 : SJ6394); + if (0x9E < c1) c2++; + } + if (c1 < 0x9F) + c1 = c1 - ((c1 > DEL) ? SP : 0x1F); + else { + c1 = c1 - 0x7E; + } + } + +#ifdef X0212_ENABLE + c2 = x0212_unshift(c2); +#endif + if (p2) *p2 = c2; + if (p1) *p1 = c1; + return 0; +} + +#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE) +static void +nkf_unicode_to_utf8(nkf_char val, nkf_char *p1, nkf_char *p2, nkf_char *p3, nkf_char *p4) +{ + val &= VALUE_MASK; + if (val < 0x80){ + *p1 = val; + *p2 = 0; + *p3 = 0; + *p4 = 0; + }else if (val < 0x800){ + *p1 = 0xc0 | (val >> 6); + *p2 = 0x80 | (val & 0x3f); + *p3 = 0; + *p4 = 0; + } else if (nkf_char_unicode_bmp_p(val)) { + *p1 = 0xe0 | (val >> 12); + *p2 = 0x80 | ((val >> 6) & 0x3f); + *p3 = 0x80 | ( val & 0x3f); + *p4 = 0; + } else if (nkf_char_unicode_value_p(val)) { + *p1 = 0xe0 | (val >> 16); + *p2 = 0x80 | ((val >> 12) & 0x3f); + *p3 = 0x80 | ((val >> 6) & 0x3f); + *p4 = 0x80 | ( val & 0x3f); + } else { + *p1 = 0; + *p2 = 0; + *p3 = 0; + *p4 = 0; + } +} + +static nkf_char +nkf_utf8_to_unicode(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4) +{ + nkf_char wc; + if (c1 <= 0x7F) { + /* single byte */ + wc = c1; + } + else if (c1 <= 0xC3) { + /* trail byte or invalid */ + return -1; + } + else if (c1 <= 0xDF) { + /* 2 bytes */ + wc = (c1 & 0x1F) << 6; + wc |= (c2 & 0x3F); + } + else if (c1 <= 0xEF) { + /* 3 bytes */ + wc = (c1 & 0x0F) << 12; + wc |= (c2 & 0x3F) << 6; + wc |= (c3 & 0x3F); + } + else if (c2 <= 0xF4) { + /* 4 bytes */ + wc = (c1 & 0x0F) << 18; + wc |= (c2 & 0x3F) << 12; + wc |= (c3 & 0x3F) << 6; + wc |= (c4 & 0x3F); + } + else { + return -1; + } + return wc; +} +#endif + +#ifdef UTF8_INPUT_ENABLE +static int +unicode_to_jis_common2(nkf_char c1, nkf_char c0, + const unsigned short *const *pp, nkf_char psize, + nkf_char *p2, nkf_char *p1) +{ + nkf_char c2; + const unsigned short *p; + unsigned short val; + + if (pp == 0) return 1; + + c1 -= 0x80; + if (c1 < 0 || psize <= c1) return 1; + p = pp[c1]; + if (p == 0) return 1; + + c0 -= 0x80; + if (c0 < 0 || sizeof_utf8_to_euc_C2 <= c0) return 1; + val = p[c0]; + if (val == 0) return 1; + if (no_cp932ext_f && ( + (val>>8) == 0x2D || /* NEC special characters */ + val > NKF_INT32_C(0xF300) /* IBM extended characters */ + )) return 1; + + c2 = val >> 8; + if (val > 0x7FFF){ + c2 &= 0x7f; + c2 |= PREFIX_EUCG3; + } + if (c2 == SO) c2 = JIS_X_0201_1976_K; + c1 = val & 0xFF; + if (p2) *p2 = c2; + if (p1) *p1 = c1; + return 0; +} + +static int +unicode_to_jis_common(nkf_char c2, nkf_char c1, nkf_char c0, nkf_char *p2, nkf_char *p1) +{ + const unsigned short *const *pp; + const unsigned short *const *const *ppp; + static const char no_best_fit_chars_table_C2[] = + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 2, 1, 1, 2, + 0, 0, 1, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1}; + static const char no_best_fit_chars_table_C2_ms[] = + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0}; + static const char no_best_fit_chars_table_932_C2[] = + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}; + static const char no_best_fit_chars_table_932_C3[] = + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}; + nkf_char ret = 0; + + if(c2 < 0x80){ + *p2 = 0; + *p1 = c2; + }else if(c2 < 0xe0){ + if(no_best_fit_chars_f){ + if(ms_ucs_map_f == UCS_MAP_CP932){ + switch(c2){ + case 0xC2: + if(no_best_fit_chars_table_932_C2[c1&0x3F]) return 1; + break; + case 0xC3: + if(no_best_fit_chars_table_932_C3[c1&0x3F]) return 1; + break; + } + }else if(!cp932inv_f){ + switch(c2){ + case 0xC2: + if(no_best_fit_chars_table_C2[c1&0x3F]) return 1; + break; + case 0xC3: + if(no_best_fit_chars_table_932_C3[c1&0x3F]) return 1; + break; + } + }else if(ms_ucs_map_f == UCS_MAP_MS){ + if(c2 == 0xC2 && no_best_fit_chars_table_C2_ms[c1&0x3F]) return 1; + }else if(ms_ucs_map_f == UCS_MAP_CP10001){ + switch(c2){ + case 0xC2: + switch(c1){ + case 0xA2: + case 0xA3: + case 0xA5: + case 0xA6: + case 0xAC: + case 0xAF: + case 0xB8: + return 1; + } + break; + } + } + } + pp = + ms_ucs_map_f == UCS_MAP_CP932 ? utf8_to_euc_2bytes_932 : + ms_ucs_map_f == UCS_MAP_MS ? utf8_to_euc_2bytes_ms : + ms_ucs_map_f == UCS_MAP_CP10001 ? utf8_to_euc_2bytes_mac : + utf8_to_euc_2bytes; + ret = unicode_to_jis_common2(c2, c1, pp, sizeof_utf8_to_euc_2bytes, p2, p1); + }else if(c0 < 0xF0){ + if(no_best_fit_chars_f){ + if(ms_ucs_map_f == UCS_MAP_CP932){ + if(c2 == 0xE3 && c1 == 0x82 && c0 == 0x94) return 1; + }else if(ms_ucs_map_f == UCS_MAP_MS){ + switch(c2){ + case 0xE2: + switch(c1){ + case 0x80: + if(c0 == 0x94 || c0 == 0x96 || c0 == 0xBE) return 1; + break; + case 0x88: + if(c0 == 0x92) return 1; + break; + } + break; + case 0xE3: + if(c1 == 0x80 || c0 == 0x9C) return 1; + break; + } + }else if(ms_ucs_map_f == UCS_MAP_CP10001){ + switch(c2){ + case 0xE3: + switch(c1){ + case 0x82: + if(c0 == 0x94) return 1; + break; + case 0x83: + if(c0 == 0xBB) return 1; + break; + } + break; + } + }else{ + switch(c2){ + case 0xE2: + switch(c1){ + case 0x80: + if(c0 == 0x95) return 1; + break; + case 0x88: + if(c0 == 0xA5) return 1; + break; + } + break; + case 0xEF: + switch(c1){ + case 0xBC: + if(c0 == 0x8D) return 1; + break; + case 0xBD: + if(c0 == 0x9E && !cp932inv_f) return 1; + break; + case 0xBF: + if(0xA0 <= c0 && c0 <= 0xA5) return 1; + break; + } + break; + } + } + } + ppp = + ms_ucs_map_f == UCS_MAP_CP932 ? utf8_to_euc_3bytes_932 : + ms_ucs_map_f == UCS_MAP_MS ? utf8_to_euc_3bytes_ms : + ms_ucs_map_f == UCS_MAP_CP10001 ? utf8_to_euc_3bytes_mac : + utf8_to_euc_3bytes; + ret = unicode_to_jis_common2(c1, c0, ppp[c2 - 0xE0], sizeof_utf8_to_euc_C2, p2, p1); + }else return -1; +#ifdef SHIFTJIS_CP932 + if (!ret && !cp932inv_f && is_eucg3(*p2)) { + nkf_char s2, s1; + if (e2s_conv(*p2, *p1, &s2, &s1) == 0) { + s2e_conv(s2, s1, p2, p1); + }else{ + ret = 1; + } + } +#endif + return ret; +} + +#ifdef UTF8_OUTPUT_ENABLE +static nkf_char +e2w_conv(nkf_char c2, nkf_char c1) +{ + const unsigned short *p; + + if (c2 == JIS_X_0201_1976_K) { + if (ms_ucs_map_f == UCS_MAP_CP10001) { + switch (c1) { + case 0x20: + return 0xA0; + case 0x7D: + return 0xA9; + } + } + p = euc_to_utf8_1byte; +#ifdef X0212_ENABLE + } else if (is_eucg3(c2)){ + if(ms_ucs_map_f == UCS_MAP_ASCII&& c2 == NKF_INT32_C(0x8F22) && c1 == 0x43){ + return 0xA6; + } + c2 = (c2&0x7f) - 0x21; + if (0<=c2 && c2 0){ + if (p2) *p2 = 0; + if (p1) *p1 = nkf_char_unicode_new(nkf_utf8_to_unicode(c2, c1, c0, 0)); + ret = 0; + } +#endif + } + return ret; +} + +#ifdef UTF8_INPUT_ENABLE +static nkf_char +w16e_conv(nkf_char val, nkf_char *p2, nkf_char *p1) +{ + nkf_char c1, c2, c3, c4; + nkf_char ret = 0; + val &= VALUE_MASK; + if (val < 0x80) { + *p2 = 0; + *p1 = val; + } + else if (nkf_char_unicode_bmp_p(val)){ + nkf_unicode_to_utf8(val, &c1, &c2, &c3, &c4); + ret = unicode_to_jis_common(c1, c2, c3, p2, p1); + if (ret > 0){ + *p2 = 0; + *p1 = nkf_char_unicode_new(val); + ret = 0; + } + } + else { + *p2 = 0; + *p1 = nkf_char_unicode_new(val); + } + return ret; +} +#endif + +static nkf_char +e_iconv(nkf_char c2, nkf_char c1, nkf_char c0) +{ + if (c2 == JIS_X_0201_1976_K || c2 == SS2){ + if (iso2022jp_f && !x0201_f) { + c2 = GETA1; c1 = GETA2; + } else { + c2 = JIS_X_0201_1976_K; + c1 &= 0x7f; + } +#ifdef X0212_ENABLE + }else if (c2 == 0x8f){ + if (c0 == 0){ + return -1; + } + if (!cp51932_f && !x0213_f && 0xF5 <= c1 && c1 <= 0xFE && 0xA1 <= c0 && c0 <= 0xFE) { + /* encoding is eucJP-ms, so invert to Unicode Private User Area */ + c1 = nkf_char_unicode_new((c1 - 0xF5) * 94 + c0 - 0xA1 + 0xE3AC); + c2 = 0; + } else { + c2 = (c2 << 8) | (c1 & 0x7f); + c1 = c0 & 0x7f; +#ifdef SHIFTJIS_CP932 + if (cp51932_f){ + nkf_char s2, s1; + if (e2s_conv(c2, c1, &s2, &s1) == 0){ + s2e_conv(s2, s1, &c2, &c1); + if (c2 < 0x100){ + c1 &= 0x7f; + c2 &= 0x7f; + } + } + } +#endif /* SHIFTJIS_CP932 */ + } +#endif /* X0212_ENABLE */ + } else if ((c2 == EOF) || (c2 == 0) || c2 < SP || c2 == ISO_8859_1) { + /* NOP */ + } else { + if (!cp51932_f && ms_ucs_map_f && 0xF5 <= c2 && c2 <= 0xFE && 0xA1 <= c1 && c1 <= 0xFE) { + /* encoding is eucJP-ms, so invert to Unicode Private User Area */ + c1 = nkf_char_unicode_new((c2 - 0xF5) * 94 + c1 - 0xA1 + 0xE000); + c2 = 0; + } else { + c1 &= 0x7f; + c2 &= 0x7f; +#ifdef SHIFTJIS_CP932 + if (cp51932_f && 0x79 <= c2 && c2 <= 0x7c){ + nkf_char s2, s1; + if (e2s_conv(c2, c1, &s2, &s1) == 0){ + s2e_conv(s2, s1, &c2, &c1); + if (c2 < 0x100){ + c1 &= 0x7f; + c2 &= 0x7f; + } + } + } +#endif /* SHIFTJIS_CP932 */ + } + } + (*oconv)(c2, c1); + return 0; +} + +static nkf_char +s_iconv(nkf_char c2, nkf_char c1, nkf_char c0) +{ + if (c2 == JIS_X_0201_1976_K || (0xA1 <= c2 && c2 <= 0xDF)) { + if (iso2022jp_f && !x0201_f) { + c2 = GETA1; c1 = GETA2; + } else { + c1 &= 0x7f; + } + } else if ((c2 == EOF) || (c2 == 0) || c2 < SP) { + /* NOP */ + } else if (!x0213_f && 0xF0 <= c2 && c2 <= 0xF9 && 0x40 <= c1 && c1 <= 0xFC) { + /* CP932 UDC */ + if(c1 == 0x7F) return 0; + c1 = nkf_char_unicode_new((c2 - 0xF0) * 188 + (c1 - 0x40 - (0x7E < c1)) + 0xE000); + c2 = 0; + } else { + nkf_char ret = s2e_conv(c2, c1, &c2, &c1); + if (ret) return ret; + } + (*oconv)(c2, c1); + return 0; +} + +static nkf_char +w_iconv(nkf_char c1, nkf_char c2, nkf_char c3) +{ + nkf_char ret = 0, c4 = 0; + static const char w_iconv_utf8_1st_byte[] = + { /* 0xC0 - 0xFF */ + 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 33, + 40, 41, 41, 41, 42, 43, 43, 43, 50, 50, 50, 50, 60, 60, 70, 70}; + + if (c3 > 0xFF) { + c4 = c3 & 0xFF; + c3 >>= 8; + } + + if (c1 < 0 || 0xff < c1) { + }else if (c1 == 0) { /* 0 : 1 byte*/ + c3 = 0; + } else if ((c1 & 0xC0) == 0x80) { /* 0x80-0xbf : trail byte */ + return 0; + } else{ + switch (w_iconv_utf8_1st_byte[c1 - 0xC0]) { + case 21: + if (c2 < 0x80 || 0xBF < c2) return 0; + break; + case 30: + if (c3 == 0) return -1; + if (c2 < 0xA0 || 0xBF < c2 || (c3 & 0xC0) != 0x80) + return 0; + break; + case 31: + case 33: + if (c3 == 0) return -1; + if ((c2 & 0xC0) != 0x80 || (c3 & 0xC0) != 0x80) + return 0; + break; + case 32: + if (c3 == 0) return -1; + if (c2 < 0x80 || 0x9F < c2 || (c3 & 0xC0) != 0x80) + return 0; + break; + case 40: + if (c3 == 0) return -2; + if (c2 < 0x90 || 0xBF < c2 || (c3 & 0xC0) != 0x80 || (c4 & 0xC0) != 0x80) + return 0; + break; + case 41: + if (c3 == 0) return -2; + if (c2 < 0x80 || 0xBF < c2 || (c3 & 0xC0) != 0x80 || (c4 & 0xC0) != 0x80) + return 0; + break; + case 42: + if (c3 == 0) return -2; + if (c2 < 0x80 || 0x8F < c2 || (c3 & 0xC0) != 0x80 || (c4 & 0xC0) != 0x80) + return 0; + break; + default: + return 0; + break; + } + } + if (c1 == 0 || c1 == EOF){ + } else if ((c1 & 0xf8) == 0xf0) { /* 4 bytes */ + c2 = nkf_char_unicode_new(nkf_utf8_to_unicode(c1, c2, c3, c4)); + c1 = 0; + } else { + ret = w2e_conv(c1, c2, c3, &c1, &c2); + } + if (ret == 0){ + (*oconv)(c1, c2); + } + return ret; +} + +#define NKF_ICONV_INVALID_CODE_RANGE -13 +static size_t +unicode_iconv(nkf_char wc) +{ + nkf_char c1, c2; + int ret = 0; + + if (wc < 0x80) { + c2 = 0; + c1 = wc; + }else if ((wc>>11) == 27) { + /* unpaired surrogate */ + return NKF_ICONV_INVALID_CODE_RANGE; + }else if (wc < 0xFFFF) { + ret = w16e_conv(wc, &c2, &c1); + if (ret) return ret; + }else if (wc < 0x10FFFF) { + c2 = 0; + c1 = nkf_char_unicode_new(wc); + } else { + return NKF_ICONV_INVALID_CODE_RANGE; + } + (*oconv)(c2, c1); + return 0; +} + +#define NKF_ICONV_NEED_ONE_MORE_BYTE -1 +#define NKF_ICONV_NEED_TWO_MORE_BYTES -2 +#define UTF16_TO_UTF32(lead, trail) (((lead) << 10) + (trail) - NKF_INT32_C(0x35FDC00)) +static size_t +nkf_iconv_utf_16(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4) +{ + nkf_char wc; + + if (c1 == EOF) { + (*oconv)(EOF, 0); + return 0; + } + + if (input_endian == ENDIAN_BIG) { + if (0xD8 <= c1 && c1 <= 0xDB) { + if (0xDC <= c3 && c3 <= 0xDF) { + wc = UTF16_TO_UTF32(c1 << 8 | c2, c3 << 8 | c4); + } else return NKF_ICONV_NEED_TWO_MORE_BYTES; + } else { + wc = c1 << 8 | c2; + } + } else { + if (0xD8 <= c2 && c2 <= 0xDB) { + if (0xDC <= c4 && c4 <= 0xDF) { + wc = UTF16_TO_UTF32(c2 << 8 | c1, c4 << 8 | c3); + } else return NKF_ICONV_NEED_TWO_MORE_BYTES; + } else { + wc = c2 << 8 | c1; + } + } + + return (*unicode_iconv)(wc); +} + +static nkf_char +w_iconv16(nkf_char c2, nkf_char c1, nkf_char c0) +{ + return 0; +} + +static nkf_char +w_iconv32(nkf_char c2, nkf_char c1, nkf_char c0) +{ + return 0; +} + +static size_t +nkf_iconv_utf_32(nkf_char c1, nkf_char c2, nkf_char c3, nkf_char c4) +{ + nkf_char wc; + + if (c1 == EOF) { + (*oconv)(EOF, 0); + return 0; + } + + switch(input_endian){ + case ENDIAN_BIG: + wc = c2 << 16 | c3 << 8 | c4; + break; + case ENDIAN_LITTLE: + wc = c3 << 16 | c2 << 8 | c1; + break; + case ENDIAN_2143: + wc = c1 << 16 | c4 << 8 | c3; + break; + case ENDIAN_3412: + wc = c4 << 16 | c1 << 8 | c2; + break; + default: + return NKF_ICONV_INVALID_CODE_RANGE; + } + + return (*unicode_iconv)(wc); +} +#endif + +#define output_ascii_escape_sequence(mode) do { \ + if (output_mode != ASCII && output_mode != ISO_8859_1) { \ + (*o_putc)(ESC); \ + (*o_putc)('('); \ + (*o_putc)(ascii_intro); \ + output_mode = mode; \ + } \ + } while (0) + +static void +output_escape_sequence(int mode) +{ + if (output_mode == mode) + return; + switch(mode) { + case ISO_8859_1: + (*o_putc)(ESC); + (*o_putc)('.'); + (*o_putc)('A'); + break; + case JIS_X_0201_1976_K: + (*o_putc)(ESC); + (*o_putc)('('); + (*o_putc)('I'); + break; + case JIS_X_0208: + (*o_putc)(ESC); + (*o_putc)('$'); + (*o_putc)(kanji_intro); + break; + case JIS_X_0212: + (*o_putc)(ESC); + (*o_putc)('$'); + (*o_putc)('('); + (*o_putc)('D'); + break; + case JIS_X_0213_1: + (*o_putc)(ESC); + (*o_putc)('$'); + (*o_putc)('('); + (*o_putc)('Q'); + break; + case JIS_X_0213_2: + (*o_putc)(ESC); + (*o_putc)('$'); + (*o_putc)('('); + (*o_putc)('P'); + break; + } + output_mode = mode; +} + +static void +j_oconv(nkf_char c2, nkf_char c1) +{ +#ifdef NUMCHAR_OPTION + if (c2 == 0 && nkf_char_unicode_p(c1)){ + w16e_conv(c1, &c2, &c1); + if (c2 == 0 && nkf_char_unicode_p(c1)){ + c2 = c1 & VALUE_MASK; + if (ms_ucs_map_f && 0xE000 <= c2 && c2 <= 0xE757) { + /* CP5022x UDC */ + c1 &= 0xFFF; + c2 = 0x7F + c1 / 94; + c1 = 0x21 + c1 % 94; + } else { + if (encode_fallback) (*encode_fallback)(c1); + return; + } + } + } +#endif + if (c2 == 0) { + output_ascii_escape_sequence(ASCII); + (*o_putc)(c1); + } + else if (c2 == EOF) { + output_ascii_escape_sequence(ASCII); + (*o_putc)(EOF); + } + else if (c2 == ISO_8859_1) { + output_ascii_escape_sequence(ISO_8859_1); + (*o_putc)(c1|0x80); + } + else if (c2 == JIS_X_0201_1976_K) { + output_escape_sequence(JIS_X_0201_1976_K); + (*o_putc)(c1); +#ifdef X0212_ENABLE + } else if (is_eucg3(c2)){ + output_escape_sequence(x0213_f ? JIS_X_0213_2 : JIS_X_0212); + (*o_putc)(c2 & 0x7f); + (*o_putc)(c1); +#endif + } else { + if(ms_ucs_map_f + ? c2<0x20 || 0x92 0x3e); + (*o_putc)(c2); + (*o_putc)(c1); + return; + } else { + if(encode_fallback)(*encode_fallback)(c1); + return; + } + } + } +#endif + if (c2 == EOF) { + (*o_putc)(EOF); + return; + } else if (c2 == 0) { + output_mode = ASCII; + (*o_putc)(c1); + } else if (c2 == JIS_X_0201_1976_K) { + output_mode = SHIFT_JIS; + (*o_putc)(c1|0x80); + } else if (c2 == ISO_8859_1) { + output_mode = ISO_8859_1; + (*o_putc)(c1 | 0x080); +#ifdef X0212_ENABLE + } else if (is_eucg3(c2)){ + output_mode = SHIFT_JIS; + if (e2s_conv(c2, c1, &c2, &c1) == 0){ + (*o_putc)(c2); + (*o_putc)(c1); + } +#endif + } else { + if (!nkf_isprint(c1) || !nkf_isprint(c2)) { + set_iconv(FALSE, 0); + return; /* too late to rescue this char */ + } + output_mode = SHIFT_JIS; + e2s_conv(c2, c1, &c2, &c1); + +#ifdef SHIFTJIS_CP932 + if (cp932inv_f + && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){ + nkf_char c = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40]; + if (c){ + c2 = c >> 8; + c1 = c & 0xff; + } + } +#endif /* SHIFTJIS_CP932 */ + + (*o_putc)(c2); + if (prefix_table[(unsigned char)c1]){ + (*o_putc)(prefix_table[(unsigned char)c1]); + } + (*o_putc)(c1); + } +} + +#ifdef UTF8_OUTPUT_ENABLE +static void +w_oconv(nkf_char c2, nkf_char c1) +{ + nkf_char c3, c4; + nkf_char val; + + if (output_bom_f) { + output_bom_f = FALSE; + (*o_putc)('\357'); + (*o_putc)('\273'); + (*o_putc)('\277'); + } + + if (c2 == EOF) { + (*o_putc)(EOF); + return; + } + + if (c2 == 0 && nkf_char_unicode_p(c1)){ + val = c1 & VALUE_MASK; + nkf_unicode_to_utf8(val, &c1, &c2, &c3, &c4); + (*o_putc)(c1); + if (c2) (*o_putc)(c2); + if (c3) (*o_putc)(c3); + if (c4) (*o_putc)(c4); + return; + } + + if (c2 == 0) { + (*o_putc)(c1); + } else { + val = e2w_conv(c2, c1); + if (val){ + nkf_unicode_to_utf8(val, &c1, &c2, &c3, &c4); + (*o_putc)(c1); + if (c2) (*o_putc)(c2); + if (c3) (*o_putc)(c3); + if (c4) (*o_putc)(c4); + } + } +} + +static void +w_oconv16(nkf_char c2, nkf_char c1) +{ + if (output_bom_f) { + output_bom_f = FALSE; + if (output_endian == ENDIAN_LITTLE){ + (*o_putc)(0xFF); + (*o_putc)(0xFE); + }else{ + (*o_putc)(0xFE); + (*o_putc)(0xFF); + } + } + + if (c2 == EOF) { + (*o_putc)(EOF); + return; + } + + if (c2 == 0 && nkf_char_unicode_p(c1)) { + if (nkf_char_unicode_bmp_p(c1)) { + c2 = (c1 >> 8) & 0xff; + c1 &= 0xff; + } else { + c1 &= VALUE_MASK; + if (c1 <= UNICODE_MAX) { + c2 = (c1 >> 10) + NKF_INT32_C(0xD7C0); /* high surrogate */ + c1 = (c1 & 0x3FF) + NKF_INT32_C(0xDC00); /* low surrogate */ + if (output_endian == ENDIAN_LITTLE){ + (*o_putc)(c2 & 0xff); + (*o_putc)((c2 >> 8) & 0xff); + (*o_putc)(c1 & 0xff); + (*o_putc)((c1 >> 8) & 0xff); + }else{ + (*o_putc)((c2 >> 8) & 0xff); + (*o_putc)(c2 & 0xff); + (*o_putc)((c1 >> 8) & 0xff); + (*o_putc)(c1 & 0xff); + } + } + return; + } + } else if (c2) { + nkf_char val = e2w_conv(c2, c1); + c2 = (val >> 8) & 0xff; + c1 = val & 0xff; + if (!val) return; + } + + if (output_endian == ENDIAN_LITTLE){ + (*o_putc)(c1); + (*o_putc)(c2); + }else{ + (*o_putc)(c2); + (*o_putc)(c1); + } +} + +static void +w_oconv32(nkf_char c2, nkf_char c1) +{ + if (output_bom_f) { + output_bom_f = FALSE; + if (output_endian == ENDIAN_LITTLE){ + (*o_putc)(0xFF); + (*o_putc)(0xFE); + (*o_putc)(0); + (*o_putc)(0); + }else{ + (*o_putc)(0); + (*o_putc)(0); + (*o_putc)(0xFE); + (*o_putc)(0xFF); + } + } + + if (c2 == EOF) { + (*o_putc)(EOF); + return; + } + + if (c2 == ISO_8859_1) { + c1 |= 0x80; + } else if (c2 == 0 && nkf_char_unicode_p(c1)) { + c1 &= VALUE_MASK; + } else if (c2) { + c1 = e2w_conv(c2, c1); + if (!c1) return; + } + if (output_endian == ENDIAN_LITTLE){ + (*o_putc)( c1 & 0xFF); + (*o_putc)((c1 >> 8) & 0xFF); + (*o_putc)((c1 >> 16) & 0xFF); + (*o_putc)(0); + }else{ + (*o_putc)(0); + (*o_putc)((c1 >> 16) & 0xFF); + (*o_putc)((c1 >> 8) & 0xFF); + (*o_putc)( c1 & 0xFF); + } +} +#endif + +#define SCORE_L2 (1) /* $BBh(B2$B?e=`4A;z(B */ +#define SCORE_KANA (SCORE_L2 << 1) /* $B$$$o$f$kH>3Q%+%J(B */ +#define SCORE_DEPEND (SCORE_KANA << 1) /* $B5!score |= score; + } +} + +static void +clr_code_score(struct input_code *ptr, nkf_char score) +{ + if (ptr){ + ptr->score &= ~score; + } +} + +static void +code_score(struct input_code *ptr) +{ + nkf_char c2 = ptr->buf[0]; +#ifdef UTF8_OUTPUT_ENABLE + nkf_char c1 = ptr->buf[1]; +#endif + if (c2 < 0){ + set_code_score(ptr, SCORE_ERROR); + }else if (c2 == SS2){ + set_code_score(ptr, SCORE_KANA); + }else if (c2 == 0x8f){ + set_code_score(ptr, SCORE_X0212); +#ifdef UTF8_OUTPUT_ENABLE + }else if (!e2w_conv(c2, c1)){ + set_code_score(ptr, SCORE_NO_EXIST); +#endif + }else if ((c2 & 0x70) == 0x20){ + set_code_score(ptr, score_table_A0[c2 & 0x0f]); + }else if ((c2 & 0x70) == 0x70){ + set_code_score(ptr, score_table_F0[c2 & 0x0f]); + }else if ((c2 & 0x70) >= 0x50){ + set_code_score(ptr, SCORE_L2); + } +} + +static void +status_disable(struct input_code *ptr) +{ + ptr->stat = -1; + ptr->buf[0] = -1; + code_score(ptr); + if (iconv == ptr->iconv_func) set_iconv(FALSE, 0); +} + +static void +status_push_ch(struct input_code *ptr, nkf_char c) +{ + ptr->buf[ptr->index++] = c; +} + +static void +status_clear(struct input_code *ptr) +{ + ptr->stat = 0; + ptr->index = 0; +} + +static void +status_reset(struct input_code *ptr) +{ + status_clear(ptr); + ptr->score = SCORE_INIT; +} + +static void +status_reinit(struct input_code *ptr) +{ + status_reset(ptr); + ptr->_file_stat = 0; +} + +static void +status_check(struct input_code *ptr, nkf_char c) +{ + if (c <= DEL && estab_f){ + status_reset(ptr); + } +} + +static void +s_status(struct input_code *ptr, nkf_char c) +{ + switch(ptr->stat){ + case -1: + status_check(ptr, c); + break; + case 0: + if (c <= DEL){ + break; + }else if (nkf_char_unicode_p(c)){ + break; + }else if (0xa1 <= c && c <= 0xdf){ + status_push_ch(ptr, SS2); + status_push_ch(ptr, c); + code_score(ptr); + status_clear(ptr); + }else if ((0x81 <= c && c < 0xa0) || (0xe0 <= c && c <= 0xea)){ + ptr->stat = 1; + status_push_ch(ptr, c); + }else if (0xed <= c && c <= 0xee){ + ptr->stat = 3; + status_push_ch(ptr, c); +#ifdef SHIFTJIS_CP932 + }else if (is_ibmext_in_sjis(c)){ + ptr->stat = 2; + status_push_ch(ptr, c); +#endif /* SHIFTJIS_CP932 */ +#ifdef X0212_ENABLE + }else if (0xf0 <= c && c <= 0xfc){ + ptr->stat = 1; + status_push_ch(ptr, c); +#endif /* X0212_ENABLE */ + }else{ + status_disable(ptr); + } + break; + case 1: + if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){ + status_push_ch(ptr, c); + s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]); + code_score(ptr); + status_clear(ptr); + }else{ + status_disable(ptr); + } + break; + case 2: +#ifdef SHIFTJIS_CP932 + if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)) { + status_push_ch(ptr, c); + if (s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]) == 0) { + set_code_score(ptr, SCORE_CP932); + status_clear(ptr); + break; + } + } +#endif /* SHIFTJIS_CP932 */ + status_disable(ptr); + break; + case 3: + if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){ + status_push_ch(ptr, c); + s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]); + set_code_score(ptr, SCORE_CP932); + status_clear(ptr); + }else{ + status_disable(ptr); + } + break; + } +} + +static void +e_status(struct input_code *ptr, nkf_char c) +{ + switch (ptr->stat){ + case -1: + status_check(ptr, c); + break; + case 0: + if (c <= DEL){ + break; + }else if (nkf_char_unicode_p(c)){ + break; + }else if (SS2 == c || (0xa1 <= c && c <= 0xfe)){ + ptr->stat = 1; + status_push_ch(ptr, c); +#ifdef X0212_ENABLE + }else if (0x8f == c){ + ptr->stat = 2; + status_push_ch(ptr, c); +#endif /* X0212_ENABLE */ + }else{ + status_disable(ptr); + } + break; + case 1: + if (0xa1 <= c && c <= 0xfe){ + status_push_ch(ptr, c); + code_score(ptr); + status_clear(ptr); + }else{ + status_disable(ptr); + } + break; +#ifdef X0212_ENABLE + case 2: + if (0xa1 <= c && c <= 0xfe){ + ptr->stat = 1; + status_push_ch(ptr, c); + }else{ + status_disable(ptr); + } +#endif /* X0212_ENABLE */ + } +} + +#ifdef UTF8_INPUT_ENABLE +static void +w_status(struct input_code *ptr, nkf_char c) +{ + switch (ptr->stat){ + case -1: + status_check(ptr, c); + break; + case 0: + if (c <= DEL){ + break; + }else if (nkf_char_unicode_p(c)){ + break; + }else if (0xc0 <= c && c <= 0xdf){ + ptr->stat = 1; + status_push_ch(ptr, c); + }else if (0xe0 <= c && c <= 0xef){ + ptr->stat = 2; + status_push_ch(ptr, c); + }else if (0xf0 <= c && c <= 0xf4){ + ptr->stat = 3; + status_push_ch(ptr, c); + }else{ + status_disable(ptr); + } + break; + case 1: + case 2: + if (0x80 <= c && c <= 0xbf){ + status_push_ch(ptr, c); + if (ptr->index > ptr->stat){ + int bom = (ptr->buf[0] == 0xef && ptr->buf[1] == 0xbb + && ptr->buf[2] == 0xbf); + w2e_conv(ptr->buf[0], ptr->buf[1], ptr->buf[2], + &ptr->buf[0], &ptr->buf[1]); + if (!bom){ + code_score(ptr); + } + status_clear(ptr); + } + }else{ + status_disable(ptr); + } + break; + case 3: + if (0x80 <= c && c <= 0xbf){ + if (ptr->index < ptr->stat){ + status_push_ch(ptr, c); + } else { + status_clear(ptr); + } + }else{ + status_disable(ptr); + } + break; + } +} +#endif + +static void +code_status(nkf_char c) +{ + int action_flag = 1; + struct input_code *result = 0; + struct input_code *p = input_code_list; + while (p->name){ + if (!p->status_func) { + ++p; + continue; + } + if (!p->status_func) + continue; + (p->status_func)(p, c); + if (p->stat > 0){ + action_flag = 0; + }else if(p->stat == 0){ + if (result){ + action_flag = 0; + }else{ + result = p; + } + } + ++p; + } + + if (action_flag){ + if (result && !estab_f){ + set_iconv(TRUE, result->iconv_func); + }else if (c <= DEL){ + struct input_code *ptr = input_code_list; + while (ptr->name){ + status_reset(ptr); + ++ptr; + } + } + } +} + +#ifndef WIN32DLL +static nkf_char +std_getc(FILE *f) +{ + if (std_gc_ndx){ + return std_gc_buf[--std_gc_ndx]; + } + return getc(f); +} +#endif /*WIN32DLL*/ + +static nkf_char +std_ungetc(nkf_char c, FILE *f) +{ + if (std_gc_ndx == STD_GC_BUFSIZE){ + return EOF; + } + std_gc_buf[std_gc_ndx++] = c; + return c; +} + +#ifndef WIN32DLL +static void +std_putc(nkf_char c) +{ + if(c!=EOF) + putchar(c); +} +#endif /*WIN32DLL*/ + +static unsigned char hold_buf[HOLD_SIZE*2]; +static int hold_count = 0; +static nkf_char +push_hold_buf(nkf_char c2) +{ + if (hold_count >= HOLD_SIZE*2) + return (EOF); + hold_buf[hold_count++] = (unsigned char)c2; + return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count); +} + +static int +h_conv(FILE *f, int c1, int c2) +{ + int ret, c4, c3; + int hold_index; + + + /** it must NOT be in the kanji shifte sequence */ + /** it must NOT be written in JIS7 */ + /** and it must be after 2 byte 8bit code */ + + hold_count = 0; + push_hold_buf(c1); + push_hold_buf(c2); + + while ((c2 = (*i_getc)(f)) != EOF) { + if (c2 == ESC){ + (*i_ungetc)(c2,f); + break; + } + code_status(c2); + if (push_hold_buf(c2) == EOF || estab_f) { + break; + } + } + + if (!estab_f) { + struct input_code *p = input_code_list; + struct input_code *result = p; + if (c2 == EOF) { + code_status(c2); + } + while (p->name) { + if (p->status_func && p->score < result->score) { + result = p; + } + p++; + } + set_iconv(TRUE, result->iconv_func); + } + + + /** now, + ** 1) EOF is detected, or + ** 2) Code is established, or + ** 3) Buffer is FULL (but last word is pushed) + ** + ** in 1) and 3) cases, we continue to use + ** Kanji codes by oconv and leave estab_f unchanged. + **/ + + ret = c2; + hold_index = 0; + while (hold_index < hold_count){ + c1 = hold_buf[hold_index++]; + if (c1 <= DEL){ + (*iconv)(0, c1, 0); + continue; + }else if (iconv == s_iconv && 0xa1 <= c1 && c1 <= 0xdf){ + (*iconv)(JIS_X_0201_1976_K, c1, 0); + continue; + } + if (hold_index < hold_count){ + c2 = hold_buf[hold_index++]; + }else{ + c2 = (*i_getc)(f); + if (c2 == EOF){ + c4 = EOF; + break; + } + code_status(c2); + } + c3 = 0; + switch ((*iconv)(c1, c2, 0)) { /* can be EUC/SJIS/UTF-8 */ + case -2: + /* 4 bytes UTF-8 */ + if (hold_index < hold_count){ + c3 = hold_buf[hold_index++]; + } else if ((c3 = (*i_getc)(f)) == EOF) { + ret = EOF; + break; + } else { + code_status(c3); + if (hold_index < hold_count){ + c4 = hold_buf[hold_index++]; + } else if ((c4 = (*i_getc)(f)) == EOF) { + c3 = ret = EOF; + break; + } else { + code_status(c4); + (*iconv)(c1, c2, (c3<<8)|c4); + } + } + break; + case -1: + /* 3 bytes EUC or UTF-8 */ + if (hold_index < hold_count){ + c3 = hold_buf[hold_index++]; + } else if ((c3 = (*i_getc)(f)) == EOF) { + ret = EOF; + break; + } else { + code_status(c3); + } + (*iconv)(c1, c2, c3); + break; + } + if (c3 == EOF) break; + } + return ret; +} + +/* + * Check and Ignore BOM + */ +static void +check_bom(FILE *f) +{ + int c2; + switch(c2 = (*i_getc)(f)){ + case 0x00: + if((c2 = (*i_getc)(f)) == 0x00){ + if((c2 = (*i_getc)(f)) == 0xFE){ + if((c2 = (*i_getc)(f)) == 0xFF){ + if(!input_encoding){ + set_iconv(TRUE, w_iconv32); + } + if (iconv == w_iconv32) { + input_endian = ENDIAN_BIG; + return; + } + (*i_ungetc)(0xFF,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xFE,f); + }else if(c2 == 0xFF){ + if((c2 = (*i_getc)(f)) == 0xFE){ + if(!input_encoding){ + set_iconv(TRUE, w_iconv32); + } + if (iconv == w_iconv32) { + input_endian = ENDIAN_2143; + return; + } + (*i_ungetc)(0xFF,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xFF,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0x00,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0x00,f); + break; + case 0xEF: + if((c2 = (*i_getc)(f)) == 0xBB){ + if((c2 = (*i_getc)(f)) == 0xBF){ + if(!input_encoding){ + set_iconv(TRUE, w_iconv); + } + if (iconv == w_iconv) { + return; + } + (*i_ungetc)(0xBF,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xBB,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xEF,f); + break; + case 0xFE: + if((c2 = (*i_getc)(f)) == 0xFF){ + if((c2 = (*i_getc)(f)) == 0x00){ + if((c2 = (*i_getc)(f)) == 0x00){ + if(!input_encoding){ + set_iconv(TRUE, w_iconv32); + } + if (iconv == w_iconv32) { + input_endian = ENDIAN_3412; + return; + } + (*i_ungetc)(0x00,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0x00,f); + }else (*i_ungetc)(c2,f); + if(!input_encoding){ + set_iconv(TRUE, w_iconv16); + } + if (iconv == w_iconv16) { + input_endian = ENDIAN_BIG; + return; + } + (*i_ungetc)(0xFF,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xFE,f); + break; + case 0xFF: + if((c2 = (*i_getc)(f)) == 0xFE){ + if((c2 = (*i_getc)(f)) == 0x00){ + if((c2 = (*i_getc)(f)) == 0x00){ + if(!input_encoding){ + set_iconv(TRUE, w_iconv32); + } + if (iconv == w_iconv32) { + input_endian = ENDIAN_LITTLE; + return; + } + (*i_ungetc)(0x00,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0x00,f); + }else (*i_ungetc)(c2,f); + if(!input_encoding){ + set_iconv(TRUE, w_iconv16); + } + if (iconv == w_iconv16) { + input_endian = ENDIAN_LITTLE; + return; + } + (*i_ungetc)(0xFE,f); + }else (*i_ungetc)(c2,f); + (*i_ungetc)(0xFF,f); + break; + default: + (*i_ungetc)(c2,f); + break; + } +} + +static struct { + int count; + nkf_char status; + nkf_char buf[3]; +} broken_state; + +static void +init_broken_state(void) +{ + memset(&broken_state, 0, sizeof(broken_state)); +} + +static void +push_broken_buf(c) +{ + broken_state.buf[broken_state.count++] = c; +} + +static nkf_char +pop_broken_buf(void) +{ + return broken_state.buf[--broken_state.count]; +} + +static nkf_char +broken_getc(FILE *f) +{ + nkf_char c, c1; + + if (broken_state.count > 0) { + return pop_broken_buf(); + } + c = (*i_bgetc)(f); + if (c=='$' && broken_state.status != ESC + && (input_mode == ASCII || input_mode == JIS_X_0201_1976_K)) { + c1= (*i_bgetc)(f); + broken_state.status = 0; + if (c1=='@'|| c1=='B') { + push_broken_buf(c1); + push_broken_buf(c); + return ESC; + } else { + (*i_bungetc)(c1,f); + return c; + } + } else if (c=='(' && broken_state.status != ESC + && (input_mode == JIS_X_0208 || input_mode == JIS_X_0201_1976_K)) { + c1= (*i_bgetc)(f); + broken_state.status = 0; + if (c1=='J'|| c1=='B') { + push_broken_buf(c1); + push_broken_buf(c); + return ESC; + } else { + (*i_bungetc)(c1,f); + return c; + } + } else { + broken_state.status = c; + return c; + } +} + +static nkf_char +broken_ungetc(nkf_char c, FILE *f) +{ + if (broken_state.count < 2) + push_broken_buf(c); + return c; +} + +static void +eol_conv(nkf_char c2, nkf_char c1) +{ + if (guess_f && input_eol != EOF) { + if (c2 == 0 && c1 == LF) { + if (!input_eol) input_eol = prev_cr ? CRLF : LF; + else if (input_eol != (prev_cr ? CRLF : LF)) input_eol = EOF; + } else if (c2 == 0 && c1 == CR && input_eol == LF) input_eol = EOF; + else if (!prev_cr); + else if (!input_eol) input_eol = CR; + else if (input_eol != CR) input_eol = EOF; + } + if (prev_cr || (c2 == 0 && c1 == LF)) { + prev_cr = 0; + if (eolmode_f != LF) (*o_eol_conv)(0, CR); + if (eolmode_f != CR) (*o_eol_conv)(0, LF); + } + if (c2 == 0 && c1 == CR) prev_cr = CR; + else if (c2 != 0 || c1 != LF) (*o_eol_conv)(c2, c1); +} + +/* + Return value of fold_conv() + + LF add newline and output char + CR add newline and output nothing + SP space + 0 skip + 1 (or else) normal output + + fold state in prev (previous character) + + >0x80 Japanese (X0208/X0201) + <0x80 ASCII + LF new line + SP space + + This fold algorthm does not preserve heading space in a line. + This is the main difference from fmt. + */ + +#define char_size(c2,c1) (c2?2:1) + +static void +fold_conv(nkf_char c2, nkf_char c1) +{ + nkf_char prev0; + nkf_char fold_state; + + if (c1== CR && !fold_preserve_f) { + fold_state=0; /* ignore cr */ + }else if (c1== LF&&f_prev==CR && fold_preserve_f) { + f_prev = LF; + fold_state=0; /* ignore cr */ + } else if (c1== BS) { + if (f_line>0) f_line--; + fold_state = 1; + } else if (c2==EOF && f_line != 0) { /* close open last line */ + fold_state = LF; + } else if ((c1==LF && !fold_preserve_f) + || ((c1==CR||(c1==LF&&f_prev!=CR)) + && fold_preserve_f)) { + /* new line */ + if (fold_preserve_f) { + f_prev = c1; + f_line = 0; + fold_state = CR; + } else if ((f_prev == c1 && !fold_preserve_f) + || (f_prev == LF && fold_preserve_f) + ) { /* duplicate newline */ + if (f_line) { + f_line = 0; + fold_state = LF; /* output two newline */ + } else { + f_line = 0; + fold_state = 1; + } + } else { + if (f_prev&0x80) { /* Japanese? */ + f_prev = c1; + fold_state = 0; /* ignore given single newline */ + } else if (f_prev==SP) { + fold_state = 0; + } else { + f_prev = c1; + if (++f_line<=fold_len) + fold_state = SP; + else { + f_line = 0; + fold_state = CR; /* fold and output nothing */ + } + } + } + } else if (c1=='\f') { + f_prev = LF; + f_line = 0; + fold_state = LF; /* output newline and clear */ + } else if ( (c2==0 && c1==SP)|| + (c2==0 && c1==TAB)|| + (c2=='!'&& c1=='!')) { + /* X0208 kankaku or ascii space */ + if (f_prev == SP) { + fold_state = 0; /* remove duplicate spaces */ + } else { + f_prev = SP; + if (++f_line<=fold_len) + fold_state = SP; /* output ASCII space only */ + else { + f_prev = SP; f_line = 0; + fold_state = CR; /* fold and output nothing */ + } + } + } else { + prev0 = f_prev; /* we still need this one... , but almost done */ + f_prev = c1; + if (c2 || c2 == JIS_X_0201_1976_K) + f_prev |= 0x80; /* this is Japanese */ + f_line += char_size(c2,c1); + if (f_line<=fold_len) { /* normal case */ + fold_state = 1; + } else { + if (f_line>fold_len+fold_margin) { /* too many kinsoku suspension */ + f_line = char_size(c2,c1); + fold_state = LF; /* We can't wait, do fold now */ + } else if (c2 == JIS_X_0201_1976_K) { + /* simple kinsoku rules return 1 means no folding */ + if (c1==(0xde&0x7f)) fold_state = 1; /* $B!+(B*/ + else if (c1==(0xdf&0x7f)) fold_state = 1; /* $B!,(B*/ + else if (c1==(0xa4&0x7f)) fold_state = 1; /* $B!#(B*/ + else if (c1==(0xa3&0x7f)) fold_state = 1; /* $B!$(B*/ + else if (c1==(0xa1&0x7f)) fold_state = 1; /* $B!W(B*/ + else if (c1==(0xb0&0x7f)) fold_state = 1; /* - */ + else if (SP<=c1 && c1<=(0xdf&0x7f)) { /* X0201 */ + f_line = 1; + fold_state = LF;/* add one new f_line before this character */ + } else { + f_line = 1; + fold_state = LF;/* add one new f_line before this character */ + } + } else if (c2==0) { + /* kinsoku point in ASCII */ + if ( c1==')'|| /* { [ ( */ + c1==']'|| + c1=='}'|| + c1=='.'|| + c1==','|| + c1=='!'|| + c1=='?'|| + c1=='/'|| + c1==':'|| + c1==';') { + fold_state = 1; + /* just after special */ + } else if (!is_alnum(prev0)) { + f_line = char_size(c2,c1); + fold_state = LF; + } else if ((prev0==SP) || /* ignored new f_line */ + (prev0==LF)|| /* ignored new f_line */ + (prev0&0x80)) { /* X0208 - ASCII */ + f_line = char_size(c2,c1); + fold_state = LF;/* add one new f_line before this character */ + } else { + fold_state = 1; /* default no fold in ASCII */ + } + } else { + if (c2=='!') { + if (c1=='"') fold_state = 1; /* $B!"(B */ + else if (c1=='#') fold_state = 1; /* $B!#(B */ + else if (c1=='W') fold_state = 1; /* $B!W(B */ + else if (c1=='K') fold_state = 1; /* $B!K(B */ + else if (c1=='$') fold_state = 1; /* $B!$(B */ + else if (c1=='%') fold_state = 1; /* $B!%(B */ + else if (c1=='\'') fold_state = 1; /* $B!\(B */ + else if (c1=='(') fold_state = 1; /* $B!((B */ + else if (c1==')') fold_state = 1; /* $B!)(B */ + else if (c1=='*') fold_state = 1; /* $B!*(B */ + else if (c1=='+') fold_state = 1; /* $B!+(B */ + else if (c1==',') fold_state = 1; /* $B!,(B */ + /* default no fold in kinsoku */ + else { + fold_state = LF; + f_line = char_size(c2,c1); + /* add one new f_line before this character */ + } + } else { + f_line = char_size(c2,c1); + fold_state = LF; + /* add one new f_line before this character */ + } + } + } + } + /* terminator process */ + switch(fold_state) { + case LF: + OCONV_NEWLINE((*o_fconv)); + (*o_fconv)(c2,c1); + break; + case 0: + return; + case CR: + OCONV_NEWLINE((*o_fconv)); + break; + case TAB: + case SP: + (*o_fconv)(0,SP); + break; + default: + (*o_fconv)(c2,c1); + } +} + +static nkf_char z_prev2=0,z_prev1=0; + +static void +z_conv(nkf_char c2, nkf_char c1) +{ + + /* if (c2) c1 &= 0x7f; assertion */ + + if (c2 == JIS_X_0201_1976_K && (c1 == 0x20 || c1 == 0x7D || c1 == 0x7E)) { + (*o_zconv)(c2,c1); + return; + } + + if (x0201_f) { + if (z_prev2 == JIS_X_0201_1976_K) { + if (c2 == JIS_X_0201_1976_K) { + if (c1 == (0xde&0x7f)) { /* $BByE@(B */ + z_prev2 = 0; + (*o_zconv)(dv[(z_prev1-SP)*2], dv[(z_prev1-SP)*2+1]); + return; + } else if (c1 == (0xdf&0x7f) && ev[(z_prev1-SP)*2]) { /* $BH>ByE@(B */ + z_prev2 = 0; + (*o_zconv)(ev[(z_prev1-SP)*2], ev[(z_prev1-SP)*2+1]); + return; + } + } + z_prev2 = 0; + (*o_zconv)(cv[(z_prev1-SP)*2], cv[(z_prev1-SP)*2+1]); + } + if (c2 == JIS_X_0201_1976_K) { + if (dv[(c1-SP)*2] || ev[(c1-SP)*2]) { + /* wait for $BByE@(B or $BH>ByE@(B */ + z_prev1 = c1; + z_prev2 = c2; + return; + } else { + (*o_zconv)(cv[(c1-SP)*2], cv[(c1-SP)*2+1]); + return; + } + } + } + + if (c2 == EOF) { + (*o_zconv)(c2, c1); + return; + } + + if (alpha_f&1 && c2 == 0x23) { + /* JISX0208 Alphabet */ + c2 = 0; + } else if (c2 == 0x21) { + /* JISX0208 Kigou */ + if (0x21==c1) { + if (alpha_f&2) { + c2 = 0; + c1 = SP; + } else if (alpha_f&4) { + (*o_zconv)(0, SP); + (*o_zconv)(0, SP); + return; + } + } else if (alpha_f&1 && 0x20': entity = ">"; break; + case '<': entity = "<"; break; + case '\"': entity = """; break; + case '&': entity = "&"; break; + } + if (entity){ + while (*entity) (*o_zconv)(0, *entity++); + return; + } + } + + if (alpha_f & 16) { + /* JIS X 0208 Katakana to JIS X 0201 Katakana */ + if (c2 == 0x21) { + char c = 0; + switch (c1) { + case 0x23: + /* U+3002 (0x8142) Ideographic Full Stop -> U+FF61 (0xA1) Halfwidth Ideographic Full Stop */ + c = 0xA1; + break; + case 0x56: + /* U+300C (0x8175) Left Corner Bracket -> U+FF62 (0xA2) Halfwidth Left Corner Bracket */ + c = 0xA2; + break; + case 0x57: + /* U+300D (0x8176) Right Corner Bracket -> U+FF63 (0xA3) Halfwidth Right Corner Bracket */ + c = 0xA3; + break; + case 0x22: + /* U+3001 (0x8141) Ideographic Comma -> U+FF64 (0xA4) Halfwidth Ideographic Comma */ + c = 0xA4; + break; + case 0x26: + /* U+30FB (0x8145) Katakana Middle Dot -> U+FF65 (0xA5) Halfwidth Katakana Middle Dot */ + c = 0xA5; + break; + case 0x3C: + /* U+30FC (0x815B) Katakana-Hiragana Prolonged Sound Mark -> U+FF70 (0xB0) Halfwidth Katakana-Hiragana Prolonged Sound Mark */ + c = 0xB0; + break; + case 0x2B: + /* U+309B (0x814A) Katakana-Hiragana Voiced Sound Mark -> U+FF9E (0xDE) Halfwidth Katakana Voiced Sound Mark */ + c = 0xDE; + break; + case 0x2C: + /* U+309C (0x814B) Katakana-Hiragana Semi-Voiced Sound Mark -> U+FF9F (0xDF) Halfwidth Katakana Semi-Voiced Sound Mark */ + c = 0xDF; + break; + } + if (c) { + (*o_zconv)(JIS_X_0201_1976_K, c); + return; + } + } else if (c2 == 0x25) { + /* JISX0208 Katakana */ + static const int fullwidth_to_halfwidth[] = + { + 0x0000, 0x2700, 0x3100, 0x2800, 0x3200, 0x2900, 0x3300, 0x2A00, + 0x3400, 0x2B00, 0x3500, 0x3600, 0x365E, 0x3700, 0x375E, 0x3800, + 0x385E, 0x3900, 0x395E, 0x3A00, 0x3A5E, 0x3B00, 0x3B5E, 0x3C00, + 0x3C5E, 0x3D00, 0x3D5E, 0x3E00, 0x3E5E, 0x3F00, 0x3F5E, 0x4000, + 0x405E, 0x4100, 0x415E, 0x2F00, 0x4200, 0x425E, 0x4300, 0x435E, + 0x4400, 0x445E, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900, 0x4A00, + 0x4A5E, 0x4A5F, 0x4B00, 0x4B5E, 0x4B5F, 0x4C00, 0x4C5E, 0x4C5F, + 0x4D00, 0x4D5E, 0x4D5F, 0x4E00, 0x4E5E, 0x4E5F, 0x4F00, 0x5000, + 0x5100, 0x5200, 0x5300, 0x2C00, 0x5400, 0x2D00, 0x5500, 0x2E00, + 0x5600, 0x5700, 0x5800, 0x5900, 0x5A00, 0x5B00, 0x0000, 0x5C00, + 0x0000, 0x0000, 0x2600, 0x5D00, 0x335E, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 + }; + if (fullwidth_to_halfwidth[c1-0x20]){ + c2 = fullwidth_to_halfwidth[c1-0x20]; + (*o_zconv)(JIS_X_0201_1976_K, c2>>8); + if (c2 & 0xFF) { + (*o_zconv)(JIS_X_0201_1976_K, c2&0xFF); + } + return; + } + } + } + (*o_zconv)(c2,c1); +} + + +#define rot13(c) ( \ + ( c < 'A') ? c: \ + (c <= 'M') ? (c + 13): \ + (c <= 'Z') ? (c - 13): \ + (c < 'a') ? (c): \ + (c <= 'm') ? (c + 13): \ + (c <= 'z') ? (c - 13): \ + (c) \ + ) + +#define rot47(c) ( \ + ( c < '!') ? c: \ + ( c <= 'O') ? (c + 47) : \ + ( c <= '~') ? (c - 47) : \ + c \ + ) + +static void +rot_conv(nkf_char c2, nkf_char c1) +{ + if (c2 == 0 || c2 == JIS_X_0201_1976_K || c2 == ISO_8859_1) { + c1 = rot13(c1); + } else if (c2) { + c1 = rot47(c1); + c2 = rot47(c2); + } + (*o_rot_conv)(c2,c1); +} + +static void +hira_conv(nkf_char c2, nkf_char c1) +{ + if (hira_f & 1) { + if (c2 == 0x25) { + if (0x20 < c1 && c1 < 0x74) { + c2 = 0x24; + (*o_hira_conv)(c2,c1); + return; + } else if (c1 == 0x74 && nkf_enc_unicode_p(output_encoding)) { + c2 = 0; + c1 = nkf_char_unicode_new(0x3094); + (*o_hira_conv)(c2,c1); + return; + } + } else if (c2 == 0x21 && (c1 == 0x33 || c1 == 0x34)) { + c1 += 2; + (*o_hira_conv)(c2,c1); + return; + } + } + if (hira_f & 2) { + if (c2 == 0 && c1 == nkf_char_unicode_new(0x3094)) { + c2 = 0x25; + c1 = 0x74; + } else if (c2 == 0x24 && 0x20 < c1 && c1 < 0x74) { + c2 = 0x25; + } else if (c2 == 0x21 && (c1 == 0x35 || c1 == 0x36)) { + c1 -= 2; + } + } + (*o_hira_conv)(c2,c1); +} + + +static void +iso2022jp_check_conv(nkf_char c2, nkf_char c1) +{ +#define RANGE_NUM_MAX 18 + static const nkf_char range[RANGE_NUM_MAX][2] = { + {0x222f, 0x2239,}, + {0x2242, 0x2249,}, + {0x2251, 0x225b,}, + {0x226b, 0x2271,}, + {0x227a, 0x227d,}, + {0x2321, 0x232f,}, + {0x233a, 0x2340,}, + {0x235b, 0x2360,}, + {0x237b, 0x237e,}, + {0x2474, 0x247e,}, + {0x2577, 0x257e,}, + {0x2639, 0x2640,}, + {0x2659, 0x267e,}, + {0x2742, 0x2750,}, + {0x2772, 0x277e,}, + {0x2841, 0x287e,}, + {0x4f54, 0x4f7e,}, + {0x7425, 0x747e}, + }; + nkf_char i; + nkf_char start, end, c; + + if(c2 >= 0x00 && c2 <= 0x20 && c1 >= 0x7f && c1 <= 0xff) { + c2 = GETA1; + c1 = GETA2; + } + if((c2 >= 0x29 && c2 <= 0x2f) || (c2 >= 0x75 && c2 <= 0x7e)) { + c2 = GETA1; + c1 = GETA2; + } + + for (i = 0; i < RANGE_NUM_MAX; i++) { + start = range[i][0]; + end = range[i][1]; + c = (c2 << 8) + c1; + if (c >= start && c <= end) { + c2 = GETA1; + c1 = GETA2; + } + } + (*o_iso2022jp_check_conv)(c2,c1); +} + + +/* This converts =?ISO-2022-JP?B?HOGE HOGE?= */ + +static const unsigned char *mime_pattern[] = { + (const unsigned char *)"\075?EUC-JP?B?", + (const unsigned char *)"\075?SHIFT_JIS?B?", + (const unsigned char *)"\075?ISO-8859-1?Q?", + (const unsigned char *)"\075?ISO-8859-1?B?", + (const unsigned char *)"\075?ISO-2022-JP?B?", + (const unsigned char *)"\075?ISO-2022-JP?Q?", +#if defined(UTF8_INPUT_ENABLE) + (const unsigned char *)"\075?UTF-8?B?", + (const unsigned char *)"\075?UTF-8?Q?", +#endif + (const unsigned char *)"\075?US-ASCII?Q?", + NULL +}; + + +/* $B3:Ev$9$k%3!<%I$NM%@hEY$r>e$2$k$?$a$NL\0u(B */ +nkf_char (*mime_priority_func[])(nkf_char c2, nkf_char c1, nkf_char c0) = { + e_iconv, s_iconv, 0, 0, 0, 0, +#if defined(UTF8_INPUT_ENABLE) + w_iconv, w_iconv, +#endif + 0, +}; + +static const nkf_char mime_encode[] = { + EUC_JP, SHIFT_JIS, ISO_8859_1, ISO_8859_1, JIS_X_0208, JIS_X_0201_1976_K, +#if defined(UTF8_INPUT_ENABLE) + UTF_8, UTF_8, +#endif + ASCII, + 0 +}; + +static const nkf_char mime_encode_method[] = { + 'B', 'B','Q', 'B', 'B', 'Q', +#if defined(UTF8_INPUT_ENABLE) + 'B', 'Q', +#endif + 'Q', + 0 +}; + + +/* MIME preprocessor fifo */ + +#define MIME_BUF_SIZE (1024) /* 2^n ring buffer */ +#define MIME_BUF_MASK (MIME_BUF_SIZE-1) +#define mime_input_buf(n) mime_input_state.buf[(n)&MIME_BUF_MASK] +static struct { + unsigned char buf[MIME_BUF_SIZE]; + unsigned int top; + unsigned int last; /* decoded */ + unsigned int input; /* undecoded */ +} mime_input_state; +static nkf_char (*mime_iconv_back)(nkf_char c2,nkf_char c1,nkf_char c0) = NULL; + +#define MAXRECOVER 20 + +static void +mime_input_buf_unshift(nkf_char c) +{ + mime_input_buf(--mime_input_state.top) = (unsigned char)c; +} + +static nkf_char +mime_ungetc(nkf_char c, FILE *f) +{ + mime_input_buf_unshift(c); + return c; +} + +static nkf_char +mime_ungetc_buf(nkf_char c, FILE *f) +{ + if (mimebuf_f) + (*i_mungetc_buf)(c,f); + else + mime_input_buf(--mime_input_state.input) = (unsigned char)c; + return c; +} + +static nkf_char +mime_getc_buf(FILE *f) +{ + /* we don't keep eof of mime_input_buf, becase it contains ?= as + a terminator. It was checked in mime_integrity. */ + return ((mimebuf_f)? + (*i_mgetc_buf)(f):mime_input_buf(mime_input_state.input++)); +} + +static void +switch_mime_getc(void) +{ + if (i_getc!=mime_getc) { + i_mgetc = i_getc; i_getc = mime_getc; + i_mungetc = i_ungetc; i_ungetc = mime_ungetc; + if(mime_f==STRICT_MIME) { + i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf; + i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf; + } + } +} + +static void +unswitch_mime_getc(void) +{ + if(mime_f==STRICT_MIME) { + i_mgetc = i_mgetc_buf; + i_mungetc = i_mungetc_buf; + } + i_getc = i_mgetc; + i_ungetc = i_mungetc; + if(mime_iconv_back)set_iconv(FALSE, mime_iconv_back); + mime_iconv_back = NULL; +} + +static nkf_char +mime_integrity(FILE *f, const unsigned char *p) +{ + nkf_char c,d; + unsigned int q; + /* In buffered mode, read until =? or NL or buffer full + */ + mime_input_state.input = mime_input_state.top; + mime_input_state.last = mime_input_state.top; + + while(*p) mime_input_buf(mime_input_state.input++) = *p++; + d = 0; + q = mime_input_state.input; + while((c=(*i_getc)(f))!=EOF) { + if (((mime_input_state.input-mime_input_state.top)&MIME_BUF_MASK)==0) { + break; /* buffer full */ + } + if (c=='=' && d=='?') { + /* checked. skip header, start decode */ + mime_input_buf(mime_input_state.input++) = (unsigned char)c; + /* mime_last_input = mime_input_state.input; */ + mime_input_state.input = q; + switch_mime_getc(); + return 1; + } + if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c)))) + break; + /* Should we check length mod 4? */ + mime_input_buf(mime_input_state.input++) = (unsigned char)c; + d=c; + } + /* In case of Incomplete MIME, no MIME decode */ + mime_input_buf(mime_input_state.input++) = (unsigned char)c; + mime_input_state.last = mime_input_state.input; /* point undecoded buffer */ + mime_decode_mode = 1; /* no decode on mime_input_buf last in mime_getc */ + switch_mime_getc(); /* anyway we need buffered getc */ + return 1; +} + +static nkf_char +mime_begin_strict(FILE *f) +{ + nkf_char c1 = 0; + int i,j,k; + const unsigned char *p,*q; + nkf_char r[MAXRECOVER]; /* recovery buffer, max mime pattern length */ + + mime_decode_mode = FALSE; + /* =? has been checked */ + j = 0; + p = mime_pattern[j]; + r[0]='='; r[1]='?'; + + for(i=2;p[i]>SP;i++) { /* start at =? */ + if (((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i]) { + /* pattern fails, try next one */ + q = p; + while (mime_pattern[++j]) { + p = mime_pattern[j]; + for(k=2;k i */ + if (p[k]!=q[k]) break; + if (k==i && nkf_toupper(c1)==p[k]) break; + } + p = mime_pattern[j]; + if (p) continue; /* found next one, continue */ + /* all fails, output from recovery buffer */ + (*i_ungetc)(c1,f); + for(j=0;jscore & (SCORE_DEPEND|SCORE_CP932)) + input_codename = "CP932"; + } else if (strcmp(input_codename, "EUC-JP") == 0) { + if (p->score & (SCORE_X0212)) + input_codename = "EUCJP-MS"; + else if (p->score & (SCORE_DEPEND|SCORE_CP932)) + input_codename = "CP51932"; + } else if (strcmp(input_codename, "ISO-2022-JP") == 0) { + if (p->score & (SCORE_KANA)) + input_codename = "CP50221"; + else if (p->score & (SCORE_DEPEND|SCORE_CP932)) + input_codename = "CP50220"; + } + } + return input_codename; +} + +#if !defined(PERL_XS) && !defined(WIN32DLL) +static void +print_guessed_code(char *filename) +{ + if (filename != NULL) printf("%s: ", filename); + if (input_codename && !*input_codename) { + printf("BINARY\n"); + } else { + input_codename = get_guessed_code(); + if (guess_f == 1) { + printf("%s\n", input_codename); + } else { + printf("%s%s\n", + input_codename, + input_eol == CR ? " (CR)" : + input_eol == LF ? " (LF)" : + input_eol == CRLF ? " (CRLF)" : + input_eol == EOF ? " (MIXED NL)" : + ""); + } + } +} +#endif /*WIN32DLL*/ + +#ifdef INPUT_OPTION + +static nkf_char +hex_getc(nkf_char ch, FILE *f, nkf_char (*g)(FILE *f), nkf_char (*u)(nkf_char c, FILE *f)) +{ + nkf_char c1, c2, c3; + c1 = (*g)(f); + if (c1 != ch){ + return c1; + } + c2 = (*g)(f); + if (!nkf_isxdigit(c2)){ + (*u)(c2, f); + return c1; + } + c3 = (*g)(f); + if (!nkf_isxdigit(c3)){ + (*u)(c2, f); + (*u)(c3, f); + return c1; + } + return (hex2bin(c2) << 4) | hex2bin(c3); +} + +static nkf_char +cap_getc(FILE *f) +{ + return hex_getc(':', f, i_cgetc, i_cungetc); +} + +static nkf_char +cap_ungetc(nkf_char c, FILE *f) +{ + return (*i_cungetc)(c, f); +} + +static nkf_char +url_getc(FILE *f) +{ + return hex_getc('%', f, i_ugetc, i_uungetc); +} + +static nkf_char +url_ungetc(nkf_char c, FILE *f) +{ + return (*i_uungetc)(c, f); +} +#endif + +#ifdef NUMCHAR_OPTION +static nkf_char +numchar_getc(FILE *f) +{ + nkf_char (*g)(FILE *) = i_ngetc; + nkf_char (*u)(nkf_char c ,FILE *f) = i_nungetc; + int i = 0, j; + nkf_char buf[12]; + long c = -1; + + buf[i] = (*g)(f); + if (buf[i] == '&'){ + buf[++i] = (*g)(f); + if (buf[i] == '#'){ + c = 0; + buf[++i] = (*g)(f); + if (buf[i] == 'x' || buf[i] == 'X'){ + for (j = 0; j < 7; j++){ + buf[++i] = (*g)(f); + if (!nkf_isxdigit(buf[i])){ + if (buf[i] != ';'){ + c = -1; + } + break; + } + c <<= 4; + c |= hex2bin(buf[i]); + } + }else{ + for (j = 0; j < 8; j++){ + if (j){ + buf[++i] = (*g)(f); + } + if (!nkf_isdigit(buf[i])){ + if (buf[i] != ';'){ + c = -1; + } + break; + } + c *= 10; + c += hex2bin(buf[i]); + } + } + } + } + if (c != -1){ + return nkf_char_unicode_new(c); + } + while (i > 0){ + (*u)(buf[i], f); + --i; + } + return buf[0]; +} + +static nkf_char +numchar_ungetc(nkf_char c, FILE *f) +{ + return (*i_nungetc)(c, f); +} +#endif + +#ifdef UNICODE_NORMALIZATION + +/* Normalization Form C */ +static nkf_char +nfc_getc(FILE *f) +{ + nkf_char (*g)(FILE *f) = i_nfc_getc; + nkf_char (*u)(nkf_char c ,FILE *f) = i_nfc_ungetc; + int i=0, j, k=1, lower, upper; + nkf_char buf[9]; + const unsigned char *array; + + buf[i] = (*g)(f); + while (k > 0 && ((buf[i] & 0xc0) != 0x80)){ + lower=0, upper=NORMALIZATION_TABLE_LENGTH-1; + while (upper >= lower) { + j = (lower+upper) / 2; + array = normalization_table[j].nfd; + for (k=0; k < NORMALIZATION_TABLE_NFD_LENGTH && array[k]; k++){ + if (array[k] != buf[k]){ + array[k] < buf[k] ? (lower = j + 1) : (upper = j - 1); + k = 0; + break; + } else if (k >= i) + buf[++i] = (*g)(f); + } + if (k > 0){ + array = normalization_table[j].nfc; + for (i=0; i < NORMALIZATION_TABLE_NFC_LENGTH && array[i]; i++) + buf[i] = (nkf_char)(array[i]); + i--; + break; + } + } + while (i > 0) + (*u)(buf[i--], f); + } + return buf[0]; +} + +static nkf_char +nfc_ungetc(nkf_char c, FILE *f) +{ + return (*i_nfc_ungetc)(c, f); +} +#endif /* UNICODE_NORMALIZATION */ + + +static nkf_char +base64decode(nkf_char c) +{ + int i; + if (c > '@') { + if (c < '[') { + i = c - 'A'; /* A..Z 0-25 */ + } else if (c == '_') { + i = '?' /* 63 */ ; /* _ 63 */ + } else { + i = c - 'G' /* - 'a' + 26 */ ; /* a..z 26-51 */ + } + } else if (c > '/') { + i = c - '0' + '4' /* - '0' + 52 */ ; /* 0..9 52-61 */ + } else if (c == '+' || c == '-') { + i = '>' /* 62 */ ; /* + and - 62 */ + } else { + i = '?' /* 63 */ ; /* / 63 */ + } + return (i); +} + +static nkf_char +mime_getc(FILE *f) +{ + nkf_char c1, c2, c3, c4, cc; + nkf_char t1, t2, t3, t4, mode, exit_mode; + nkf_char lwsp_count; + char *lwsp_buf; + char *lwsp_buf_new; + nkf_char lwsp_size = 128; + + if (mime_input_state.top != mime_input_state.last) { /* Something is in FIFO */ + return mime_input_buf(mime_input_state.top++); + } + if (mime_decode_mode==1 ||mime_decode_mode==FALSE) { + mime_decode_mode=FALSE; + unswitch_mime_getc(); + return (*i_getc)(f); + } + + if (mimebuf_f == FIXED_MIME) + exit_mode = mime_decode_mode; + else + exit_mode = FALSE; + if (mime_decode_mode == 'Q') { + if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF); + restart_mime_q: + if (c1=='_' && mimebuf_f != FIXED_MIME) return SP; + if (c1<=SP || DEL<=c1) { + mime_decode_mode = exit_mode; /* prepare for quit */ + return c1; + } + if (c1!='=' && (c1!='?' || mimebuf_f == FIXED_MIME)) { + return c1; + } + + mime_decode_mode = exit_mode; /* prepare for quit */ + if ((c2 = (*i_mgetc)(f)) == EOF) return (EOF); + if (c1=='?'&&c2=='=' && mimebuf_f != FIXED_MIME) { + /* end Q encoding */ + input_mode = exit_mode; + lwsp_count = 0; + lwsp_buf = malloc((lwsp_size+5)*sizeof(char)); + if (lwsp_buf==NULL) { + perror("can't malloc"); + return -1; + } + while ((c1=(*i_getc)(f))!=EOF) { + switch (c1) { + case LF: + case CR: + if (c1==LF) { + if ((c1=(*i_getc)(f))!=EOF && (c1==SP||c1==TAB)) { + i_ungetc(SP,f); + continue; + } else { + i_ungetc(c1,f); + } + c1 = LF; + } else { + if ((c1=(*i_getc)(f))!=EOF && c1 == LF) { + if ((c1=(*i_getc)(f))!=EOF && (c1==SP||c1==TAB)) { + i_ungetc(SP,f); + continue; + } else { + i_ungetc(c1,f); + } + i_ungetc(LF,f); + } else { + i_ungetc(c1,f); + } + c1 = CR; + } + break; + case SP: + case TAB: + lwsp_buf[lwsp_count] = (unsigned char)c1; + if (lwsp_count++>lwsp_size){ + lwsp_size <<= 1; + lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char)); + if (lwsp_buf_new==NULL) { + free(lwsp_buf); + perror("can't realloc"); + return -1; + } + lwsp_buf = lwsp_buf_new; + } + continue; + } + break; + } + if (lwsp_count > 0 && (c1 != '=' || (lwsp_buf[lwsp_count-1] != SP && lwsp_buf[lwsp_count-1] != TAB))) { + i_ungetc(c1,f); + for(lwsp_count--;lwsp_count>0;lwsp_count--) + i_ungetc(lwsp_buf[lwsp_count],f); + c1 = lwsp_buf[0]; + } + free(lwsp_buf); + return c1; + } + if (c1=='='&&c2lwsp_size){ + lwsp_size <<= 1; + lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char)); + if (lwsp_buf_new==NULL) { + free(lwsp_buf); + perror("can't realloc"); + return -1; + } + lwsp_buf = lwsp_buf_new; + } + continue; + } + break; + } + if (lwsp_count > 0 && (c1 != '=' || (lwsp_buf[lwsp_count-1] != SP && lwsp_buf[lwsp_count-1] != TAB))) { + i_ungetc(c1,f); + for(lwsp_count--;lwsp_count>0;lwsp_count--) + i_ungetc(lwsp_buf[lwsp_count],f); + c1 = lwsp_buf[0]; + } + free(lwsp_buf); + return c1; + } + mime_c3_retry: + if ((c3 = (*i_mgetc)(f))<=SP) { + if (c3==EOF) + return (EOF); + if (mime_f != STRICT_MIME) goto mime_c3_retry; + if (mimebuf_f!=FIXED_MIME) input_mode = ASCII; + return c3; + } + mime_c4_retry: + if ((c4 = (*i_mgetc)(f))<=SP) { + if (c4==EOF) + return (EOF); + if (mime_f != STRICT_MIME) goto mime_c4_retry; + if (mimebuf_f!=FIXED_MIME) input_mode = ASCII; + return c4; + } + + mime_decode_mode = mode; /* still in MIME sigh... */ + + /* BASE 64 decoding */ + + t1 = 0x3f & base64decode(c1); + t2 = 0x3f & base64decode(c2); + t3 = 0x3f & base64decode(c3); + t4 = 0x3f & base64decode(c4); + cc = ((t1 << 2) & 0x0fc) | ((t2 >> 4) & 0x03); + if (c2 != '=') { + mime_input_buf(mime_input_state.last++) = (unsigned char)cc; + cc = ((t2 << 4) & 0x0f0) | ((t3 >> 2) & 0x0f); + if (c3 != '=') { + mime_input_buf(mime_input_state.last++) = (unsigned char)cc; + cc = ((t3 << 6) & 0x0c0) | (t4 & 0x3f); + if (c4 != '=') + mime_input_buf(mime_input_state.last++) = (unsigned char)cc; + } + } else { + return c1; + } + return mime_input_buf(mime_input_state.top++); +} + +static const char basis_64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +#define MIMEOUT_BUF_LENGTH (60) +static struct { + char buf[MIMEOUT_BUF_LENGTH+1]; + int count; + nkf_char state; +} mimeout_state; + +/*nkf_char mime_lastchar2, mime_lastchar1;*/ + +static void +open_mime(nkf_char mode) +{ + const unsigned char *p; + int i; + int j; + p = mime_pattern[0]; + for(i=0;mime_pattern[i];i++) { + if (mode == mime_encode[i]) { + p = mime_pattern[i]; + break; + } + } + mimeout_mode = mime_encode_method[i]; + i = 0; + if (base64_count>45) { + if (mimeout_state.count>0 && nkf_isblank(mimeout_state.buf[i])){ + (*o_mputc)(mimeout_state.buf[i]); + i++; + } + PUT_NEWLINE((*o_mputc)); + (*o_mputc)(SP); + base64_count = 1; + if (mimeout_state.count>0 + && (mimeout_state.buf[i]==SP || mimeout_state.buf[i]==TAB + || mimeout_state.buf[i]==CR || mimeout_state.buf[i]==LF)) { + i++; + } + } + for (;i 0){ + if (c2 == EOF){ + if (base64_count + mimeout_state.count/3*4> 73){ + (*o_base64conv)(EOF,0); + OCONV_NEWLINE((*o_base64conv)); + (*o_base64conv)(0,SP); + base64_count = 1; + } + } else { + if (base64_count + mimeout_state.count/3*4> 66) { + (*o_base64conv)(EOF,0); + OCONV_NEWLINE((*o_base64conv)); + (*o_base64conv)(0,SP); + base64_count = 1; + mimeout_mode = -1; + } + } + } else if (c2) { + if (c2 != EOF && base64_count + mimeout_state.count/3*4> 60) { + mimeout_mode = (output_mode==ASCII ||output_mode == ISO_8859_1) ? 'Q' : 'B'; + open_mime(output_mode); + (*o_base64conv)(EOF,0); + OCONV_NEWLINE((*o_base64conv)); + (*o_base64conv)(0,SP); + base64_count = 1; + mimeout_mode = -1; + } + } +} + +static void +close_mime(void) +{ + (*o_mputc)('?'); + (*o_mputc)('='); + base64_count += 2; + mimeout_mode = 0; +} + +static void +eof_mime(void) +{ + switch(mimeout_mode) { + case 'Q': + case 'B': + break; + case 2: + (*o_mputc)(basis_64[((mimeout_state.state & 0x3)<< 4)]); + (*o_mputc)('='); + (*o_mputc)('='); + base64_count += 3; + break; + case 1: + (*o_mputc)(basis_64[((mimeout_state.state & 0xF) << 2)]); + (*o_mputc)('='); + base64_count += 2; + break; + } + if (mimeout_mode > 0) { + if (mimeout_f!=FIXED_MIME) { + close_mime(); + } else if (mimeout_mode != 'Q') + mimeout_mode = 'B'; + } +} + +static void +mimeout_addchar(nkf_char c) +{ + switch(mimeout_mode) { + case 'Q': + if (c==CR||c==LF) { + (*o_mputc)(c); + base64_count = 0; + } else if(!nkf_isalnum(c)) { + (*o_mputc)('='); + (*o_mputc)(bin2hex(((c>>4)&0xf))); + (*o_mputc)(bin2hex((c&0xf))); + base64_count += 3; + } else { + (*o_mputc)(c); + base64_count++; + } + break; + case 'B': + mimeout_state.state=c; + (*o_mputc)(basis_64[c>>2]); + mimeout_mode=2; + base64_count ++; + break; + case 2: + (*o_mputc)(basis_64[((mimeout_state.state & 0x3)<< 4) | ((c & 0xF0) >> 4)]); + mimeout_state.state=c; + mimeout_mode=1; + base64_count ++; + break; + case 1: + (*o_mputc)(basis_64[((mimeout_state.state & 0xF) << 2) | ((c & 0xC0) >>6)]); + (*o_mputc)(basis_64[c & 0x3F]); + mimeout_mode='B'; + base64_count += 2; + break; + default: + (*o_mputc)(c); + base64_count++; + break; + } +} + +static void +mime_putc(nkf_char c) +{ + int i, j; + nkf_char lastchar; + + if (mimeout_f == FIXED_MIME){ + if (mimeout_mode == 'Q'){ + if (base64_count > 71){ + if (c!=CR && c!=LF) { + (*o_mputc)('='); + PUT_NEWLINE((*o_mputc)); + } + base64_count = 0; + } + }else{ + if (base64_count > 71){ + eof_mime(); + PUT_NEWLINE((*o_mputc)); + base64_count = 0; + } + if (c == EOF) { /* c==EOF */ + eof_mime(); + } + } + if (c != EOF) { /* c==EOF */ + mimeout_addchar(c); + } + return; + } + + /* mimeout_f != FIXED_MIME */ + + if (c == EOF) { /* c==EOF */ + if (mimeout_mode == -1 && mimeout_state.count > 1) open_mime(output_mode); + j = mimeout_state.count; + mimeout_state.count = 0; + i = 0; + if (mimeout_mode > 0) { + if (!nkf_isblank(mimeout_state.buf[j-1])) { + for (;i 0){ + lastchar = mimeout_state.buf[mimeout_state.count - 1]; + }else{ + lastchar = -1; + } + + if (mimeout_mode=='Q') { + if (c <= DEL && (output_mode==ASCII ||output_mode == ISO_8859_1)) { + if (c == CR || c == LF) { + close_mime(); + (*o_mputc)(c); + base64_count = 0; + return; + } else if (c <= SP) { + close_mime(); + if (base64_count > 70) { + PUT_NEWLINE((*o_mputc)); + base64_count = 0; + } + if (!nkf_isblank(c)) { + (*o_mputc)(SP); + base64_count++; + } + } else { + if (base64_count > 70) { + close_mime(); + PUT_NEWLINE((*o_mputc)); + (*o_mputc)(SP); + base64_count = 1; + open_mime(output_mode); + } + if (!nkf_noescape_mime(c)) { + mimeout_addchar(c); + return; + } + } + (*o_mputc)(c); + base64_count++; + } + return; + } + + if (mimeout_mode <= 0) { + if (c <= DEL && (output_mode==ASCII ||output_mode == ISO_8859_1)) { + if (nkf_isspace(c)) { + int flag = 0; + if (mimeout_mode == -1) { + flag = 1; + } + if (c==CR || c==LF) { + if (flag) { + open_mime(output_mode); + output_mode = 0; + } else { + base64_count = 0; + } + } + for (i=0;i 1 + && base64_count + mimeout_state.count > 76 + && mimeout_state.buf[0] != CR && mimeout_state.buf[0] != LF){ + PUT_NEWLINE((*o_mputc)); + base64_count = 0; + if (!nkf_isspace(mimeout_state.buf[0])){ + (*o_mputc)(SP); + base64_count++; + } + } + mimeout_state.buf[mimeout_state.count++] = (char)c; + if (mimeout_state.count>MIMEOUT_BUF_LENGTH) { + open_mime(output_mode); + } + } + return; + }else{ + if (lastchar==CR || lastchar == LF){ + for (i=0;iMIMEOUT_BUF_LENGTH) { + eof_mime(); + for (i=0;i0 && SPMIMEOUT_BUF_LENGTH) { + j = mimeout_state.count; + mimeout_state.count = 0; + for (i=0;i0) { + j = mimeout_state.count; + mimeout_state.count = 0; + for (i=0;iinput_buffer_size = IOBUF_SIZE; + converter->input_buffer = malloc(converter->input_buffer_size); + if (converter->input_buffer == NULL) + perror("can't malloc"); + + converter->output_buffer_size = IOBUF_SIZE * 2; + converter->output_buffer = malloc(converter->output_buffer_size); + if (converter->output_buffer == NULL) + perror("can't malloc"); + + converter->cd = iconv_open(tocode, fromcode); + if (converter->cd == (iconv_t)-1) + { + switch (errno) { + case EINVAL: + perror(fprintf("iconv doesn't support %s to %s conversion.", fromcode, tocode)); + return -1; + default: + perror("can't iconv_open"); + } + } +} + +static size_t +nkf_iconv_convert(nkf_iconv_t *converter, FILE *input) +{ + size_t invalid = (size_t)0; + char *input_buffer = converter->input_buffer; + size_t input_length = (size_t)0; + char *output_buffer = converter->output_buffer; + size_t output_length = converter->output_buffer_size; + int c; + + do { + if (c != EOF) { + while ((c = (*i_getc)(f)) != EOF) { + input_buffer[input_length++] = c; + if (input_length < converter->input_buffer_size) break; + } + } + + size_t ret = iconv(converter->cd, &input_buffer, &input_length, &output_buffer, &output_length); + while (output_length-- > 0) { + (*o_putc)(output_buffer[converter->output_buffer_size-output_length]); + } + if (ret == (size_t) - 1) { + switch (errno) { + case EINVAL: + if (input_buffer != converter->input_buffer) + memmove(converter->input_buffer, input_buffer, input_length); + break; + case E2BIG: + converter->output_buffer_size *= 2; + output_buffer = realloc(converter->outbuf, converter->output_buffer_size); + if (output_buffer == NULL) { + perror("can't realloc"); + return -1; + } + converter->output_buffer = output_buffer; + break; + default: + perror("can't iconv"); + return -1; + } + } else { + invalid += ret; + } + } while (1); + + return invalid; +} + + +static void +nkf_iconv_close(nkf_iconv_t *convert) +{ + free(converter->inbuf); + free(converter->outbuf); + iconv_close(converter->cd); +} +#endif + + +static void +reinit(void) +{ + { + struct input_code *p = input_code_list; + while (p->name){ + status_reinit(p++); + } + } + unbuf_f = FALSE; + estab_f = FALSE; + nop_f = FALSE; + binmode_f = TRUE; + rot_f = FALSE; + hira_f = FALSE; + alpha_f = FALSE; + mime_f = MIME_DECODE_DEFAULT; + mime_decode_f = FALSE; + mimebuf_f = FALSE; + broken_f = FALSE; + iso8859_f = FALSE; + mimeout_f = FALSE; + x0201_f = X0201_DEFAULT; + iso2022jp_f = FALSE; +#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE) + ms_ucs_map_f = UCS_MAP_ASCII; +#endif +#ifdef UTF8_INPUT_ENABLE + no_cp932ext_f = FALSE; + no_best_fit_chars_f = FALSE; + encode_fallback = NULL; + unicode_subchar = '?'; + input_endian = ENDIAN_BIG; +#endif +#ifdef UTF8_OUTPUT_ENABLE + output_bom_f = FALSE; + output_endian = ENDIAN_BIG; +#endif +#ifdef UNICODE_NORMALIZATION + nfc_f = FALSE; +#endif +#ifdef INPUT_OPTION + cap_f = FALSE; + url_f = FALSE; + numchar_f = FALSE; +#endif +#ifdef CHECK_OPTION + noout_f = FALSE; + debug_f = FALSE; +#endif + guess_f = 0; +#ifdef EXEC_IO + exec_f = 0; +#endif +#ifdef SHIFTJIS_CP932 + cp51932_f = TRUE; + cp932inv_f = TRUE; +#endif +#ifdef X0212_ENABLE + x0212_f = FALSE; + x0213_f = FALSE; +#endif + { + int i; + for (i = 0; i < 256; i++){ + prefix_table[i] = 0; + } + } + hold_count = 0; + mimeout_state.count = 0; + mimeout_mode = 0; + base64_count = 0; + f_line = 0; + f_prev = 0; + fold_preserve_f = FALSE; + fold_f = FALSE; + fold_len = 0; + kanji_intro = DEFAULT_J; + ascii_intro = DEFAULT_R; + fold_margin = FOLD_MARGIN; + o_zconv = no_connection; + o_fconv = no_connection; + o_eol_conv = no_connection; + o_rot_conv = no_connection; + o_hira_conv = no_connection; + o_base64conv = no_connection; + o_iso2022jp_check_conv = no_connection; + o_putc = std_putc; + i_getc = std_getc; + i_ungetc = std_ungetc; + i_bgetc = std_getc; + i_bungetc = std_ungetc; + o_mputc = std_putc; + i_mgetc = std_getc; + i_mungetc = std_ungetc; + i_mgetc_buf = std_getc; + i_mungetc_buf = std_ungetc; + output_mode = ASCII; + input_mode = ASCII; + mime_decode_mode = FALSE; + file_out_f = FALSE; + eolmode_f = 0; + input_eol = 0; + prev_cr = 0; + option_mode = 0; + init_broken_state(); + z_prev2=0,z_prev1=0; +#ifdef CHECK_OPTION + iconv_for_check = 0; +#endif + input_codename = NULL; + input_encoding = NULL; + output_encoding = NULL; +#ifdef WIN32DLL + reinitdll(); +#endif /*WIN32DLL*/ +} + +static int +module_connection(void) +{ + if (input_encoding) set_input_encoding(input_encoding); + if (!output_encoding) { + output_encoding = nkf_default_encoding(); + } + if (!output_encoding) { + if (noout_f || guess_f) output_encoding = nkf_enc_from_index(ISO_2022_JP); + else return -1; + } + set_output_encoding(output_encoding); + oconv = nkf_enc_to_oconv(output_encoding); + o_putc = std_putc; + + /* replace continucation module, from output side */ + + /* output redicrection */ +#ifdef CHECK_OPTION + if (noout_f || guess_f){ + o_putc = no_putc; + } +#endif + if (mimeout_f) { + o_mputc = o_putc; + o_putc = mime_putc; + if (mimeout_f == TRUE) { + o_base64conv = oconv; oconv = base64_conv; + } + /* base64_count = 0; */ + } + + if (eolmode_f || guess_f) { + o_eol_conv = oconv; oconv = eol_conv; + } + if (rot_f) { + o_rot_conv = oconv; oconv = rot_conv; + } + if (iso2022jp_f) { + o_iso2022jp_check_conv = oconv; oconv = iso2022jp_check_conv; + } + if (hira_f) { + o_hira_conv = oconv; oconv = hira_conv; + } + if (fold_f) { + o_fconv = oconv; oconv = fold_conv; + f_line = 0; + } + if (alpha_f || x0201_f) { + o_zconv = oconv; oconv = z_conv; + } + + i_getc = std_getc; + i_ungetc = std_ungetc; + /* input redicrection */ +#ifdef INPUT_OPTION + if (cap_f){ + i_cgetc = i_getc; i_getc = cap_getc; + i_cungetc = i_ungetc; i_ungetc= cap_ungetc; + } + if (url_f){ + i_ugetc = i_getc; i_getc = url_getc; + i_uungetc = i_ungetc; i_ungetc= url_ungetc; + } +#endif +#ifdef NUMCHAR_OPTION + if (numchar_f){ + i_ngetc = i_getc; i_getc = numchar_getc; + i_nungetc = i_ungetc; i_ungetc= numchar_ungetc; + } +#endif +#ifdef UNICODE_NORMALIZATION + if (nfc_f){ + i_nfc_getc = i_getc; i_getc = nfc_getc; + i_nfc_ungetc = i_ungetc; i_ungetc= nfc_ungetc; + } +#endif + if (mime_f && mimebuf_f==FIXED_MIME) { + i_mgetc = i_getc; i_getc = mime_getc; + i_mungetc = i_ungetc; i_ungetc = mime_ungetc; + } + if (broken_f & 1) { + i_bgetc = i_getc; i_getc = broken_getc; + i_bungetc = i_ungetc; i_ungetc = broken_ungetc; + } + if (input_encoding) { + set_iconv(-TRUE, nkf_enc_to_iconv(input_encoding)); + } else { + set_iconv(FALSE, e_iconv); + } + + { + struct input_code *p = input_code_list; + while (p->name){ + status_reinit(p++); + } + } + return 0; +} + +/* + Conversion main loop. Code detection only. + */ + +#if !defined(PERL_XS) && !defined(WIN32DLL) +static nkf_char +noconvert(FILE *f) +{ + nkf_char c; + + if (nop_f == 2) + module_connection(); + while ((c = (*i_getc)(f)) != EOF) + (*o_putc)(c); + (*o_putc)(EOF); + return 1; +} +#endif + +#define NEXT continue /* no output, get next */ +#define SKIP c2=0;continue /* no output, get next */ +#define MORE c2=c1;continue /* need one more byte */ +#define SEND ; /* output c1 and c2, get next */ +#define LAST break /* end of loop, go closing */ +#define set_input_mode(mode) do { \ + input_mode = mode; \ + shift_mode = 0; \ + set_input_codename("ISO-2022-JP"); \ + debug("ISO-2022-JP"); \ +} while (0) + +static int +kanji_convert(FILE *f) +{ + nkf_char c1=0, c2=0, c3=0, c4=0; + int shift_mode = 0; /* 0, 1, 2, 3 */ + int g2 = 0; + int is_8bit = FALSE; + + if (input_encoding && !nkf_enc_asciicompat(input_encoding)) { + is_8bit = TRUE; + } + + input_mode = ASCII; + output_mode = ASCII; + + if (module_connection() < 0) { +#if !defined(PERL_XS) && !defined(WIN32DLL) + fprintf(stderr, "no output encoding given\n"); +#endif + return -1; + } + check_bom(f); + +#ifdef UTF8_INPUT_ENABLE + if(iconv == w_iconv32){ + while ((c1 = (*i_getc)(f)) != EOF && + (c2 = (*i_getc)(f)) != EOF && + (c3 = (*i_getc)(f)) != EOF && + (c4 = (*i_getc)(f)) != EOF) { + nkf_iconv_utf_32(c1, c2, c3, c4); + } + (*i_ungetc)(EOF, f); + } + else if (iconv == w_iconv16) { + while ((c1 = (*i_getc)(f)) != EOF && + (c2 = (*i_getc)(f)) != EOF) { + if (nkf_iconv_utf_16(c1, c2, 0, 0) == -2 && + (c3 = (*i_getc)(f)) != EOF && + (c4 = (*i_getc)(f)) != EOF) { + nkf_iconv_utf_16(c1, c2, c3, c4); + } + } + (*i_ungetc)(EOF, f); + } +#endif + + while ((c1 = (*i_getc)(f)) != EOF) { +#ifdef INPUT_CODE_FIX + if (!input_encoding) +#endif + code_status(c1); + if (c2) { + /* second byte */ + if (c2 > DEL) { + /* in case of 8th bit is on */ + if (!estab_f&&!mime_decode_mode) { + /* in case of not established yet */ + /* It is still ambiguious */ + if (h_conv(f, c2, c1)==EOF) { + LAST; + } + else { + SKIP; + } + } + else { + /* in case of already established */ + if (c1 < 0x40) { + /* ignore bogus code */ + SKIP; + } else { + SEND; + } + } + } + else { + /* 2nd byte of 7 bit code or SJIS */ + SEND; + } + } + else if (nkf_char_unicode_p(c1)) { + (*oconv)(0, c1); + NEXT; + } + else { + /* first byte */ + if (input_mode == JIS_X_0208 && DEL <= c1 && c1 < 0x92) { + /* CP5022x */ + MORE; + } else if (c1 > DEL) { + /* 8 bit code */ + if (!estab_f && !iso8859_f) { + /* not established yet */ + MORE; + } else { /* estab_f==TRUE */ + if (iso8859_f) { + c2 = ISO_8859_1; + c1 &= 0x7f; + SEND; + } + else if ((iconv == s_iconv && 0xA0 <= c1 && c1 <= 0xDF) || + (ms_ucs_map_f == UCS_MAP_CP10001 && (c1 == 0xFD || c1 == 0xFE))) { + /* JIS X 0201 */ + c2 = JIS_X_0201_1976_K; + c1 &= 0x7f; + SEND; + } + else { + /* already established */ + MORE; + } + } + } else if (SP < c1 && c1 < DEL) { + /* in case of Roman characters */ + if (shift_mode) { + /* output 1 shifted byte */ + if (iso8859_f) { + c2 = ISO_8859_1; + SEND; + } else if (nkf_byte_jisx0201_katakana_p(c1)){ + /* output 1 shifted byte */ + c2 = JIS_X_0201_1976_K; + SEND; + } else { + /* look like bogus code */ + SKIP; + } + } else if (input_mode == JIS_X_0208 || input_mode == JIS_X_0212 || + input_mode == JIS_X_0213_1 || input_mode == JIS_X_0213_2) { + /* in case of Kanji shifted */ + MORE; + } else if (c1 == '=' && mime_f && !mime_decode_mode) { + /* Check MIME code */ + if ((c1 = (*i_getc)(f)) == EOF) { + (*oconv)(0, '='); + LAST; + } else if (c1 == '?') { + /* =? is mime conversion start sequence */ + if(mime_f == STRICT_MIME) { + /* check in real detail */ + if (mime_begin_strict(f) == EOF) + LAST; + SKIP; + } else if (mime_begin(f) == EOF) + LAST; + SKIP; + } else { + (*oconv)(0, '='); + (*i_ungetc)(c1,f); + SKIP; + } + } else { + /* normal ASCII code */ + SEND; + } + } else if (c1 == SI && (!is_8bit || mime_decode_mode)) { + shift_mode = 0; + SKIP; + } else if (c1 == SO && (!is_8bit || mime_decode_mode)) { + shift_mode = 1; + SKIP; + } else if (c1 == ESC && (!is_8bit || mime_decode_mode)) { + if ((c1 = (*i_getc)(f)) == EOF) { + /* (*oconv)(0, ESC); don't send bogus code */ + LAST; + } + else if (c1 == '&') { + /* IRR */ + if ((c1 = (*i_getc)(f)) == EOF) { + LAST; + } else { + SKIP; + } + } + else if (c1 == '$') { + /* GZDMx */ + if ((c1 = (*i_getc)(f)) == EOF) { + /* don't send bogus code + (*oconv)(0, ESC); + (*oconv)(0, '$'); */ + LAST; + } else if (c1 == '@' || c1 == 'B') { + /* JIS X 0208 */ + set_input_mode(JIS_X_0208); + SKIP; + } else if (c1 == '(') { + /* GZDM4 */ + if ((c1 = (*i_getc)(f)) == EOF) { + /* don't send bogus code + (*oconv)(0, ESC); + (*oconv)(0, '$'); + (*oconv)(0, '('); + */ + LAST; + } else if (c1 == '@'|| c1 == 'B') { + /* JIS X 0208 */ + set_input_mode(JIS_X_0208); + SKIP; +#ifdef X0212_ENABLE + } else if (c1 == 'D'){ + set_input_mode(JIS_X_0212); + SKIP; +#endif /* X0212_ENABLE */ + } else if (c1 == 'O' || c1 == 'Q'){ + set_input_mode(JIS_X_0213_1); + SKIP; + } else if (c1 == 'P'){ + set_input_mode(JIS_X_0213_2); + SKIP; + } else { + /* could be some special code */ + (*oconv)(0, ESC); + (*oconv)(0, '$'); + (*oconv)(0, '('); + (*oconv)(0, c1); + SKIP; + } + } else if (broken_f&0x2) { + /* accept any ESC-(-x as broken code ... */ + input_mode = JIS_X_0208; + shift_mode = 0; + SKIP; + } else { + (*oconv)(0, ESC); + (*oconv)(0, '$'); + (*oconv)(0, c1); + SKIP; + } + } else if (c1 == '(') { + /* GZD4 */ + if ((c1 = (*i_getc)(f)) == EOF) { + /* don't send bogus code + (*oconv)(0, ESC); + (*oconv)(0, '('); */ + LAST; + } + else if (c1 == 'I') { + /* JIS X 0201 Katakana */ + set_input_mode(JIS_X_0201_1976_K); + SKIP; + } + else if (c1 == 'B' || c1 == 'J' || c1 == 'H') { + /* ISO-646IRV:1983 or JIS X 0201 Roman or JUNET */ + set_input_mode(ASCII); + SKIP; + } + else if (broken_f&0x2) { + set_input_mode(ASCII); + SKIP; + } + else { + (*oconv)(0, ESC); + (*oconv)(0, '('); + SEND; + } + } + else if (c1 == '.') { + /* G2D6 */ + if ((c1 = (*i_getc)(f)) == EOF) { + LAST; + } + else if (c1 == 'A') { + /* ISO-8859-1 */ + g2 = ISO_8859_1; + SKIP; + } + else { + (*oconv)(0, ESC); + (*oconv)(0, '.'); + SEND; + } + } + else if (c1 == 'N') { + /* SS2 */ + c1 = (*i_getc)(f); + if (g2 == ISO_8859_1) { + c2 = ISO_8859_1; + SEND; + }else{ + (*i_ungetc)(c1, f); + /* lonely ESC */ + (*oconv)(0, ESC); + SEND; + } + } + else { + /* lonely ESC */ + (*oconv)(0, ESC); + SEND; + } + } else if (c1 == ESC && iconv == s_iconv) { + /* ESC in Shift_JIS */ + if ((c1 = (*i_getc)(f)) == EOF) { + /* (*oconv)(0, ESC); don't send bogus code */ + LAST; + } else if (c1 == '$') { + /* J-PHONE emoji */ + if ((c1 = (*i_getc)(f)) == EOF) { + LAST; + } else if (('E' <= c1 && c1 <= 'G') || + ('O' <= c1 && c1 <= 'Q')) { + /* + NUM : 0 1 2 3 4 5 + BYTE: G E F O P Q + C%7 : 1 6 0 2 3 4 + C%7 : 0 1 2 3 4 5 6 + NUM : 2 0 3 4 5 X 1 + */ + static const nkf_char jphone_emoji_first_table[7] = + {0xE1E0, 0xDFE0, 0xE2E0, 0xE3E0, 0xE4E0, 0xDFE0, 0xE0E0}; + c3 = nkf_char_unicode_new(jphone_emoji_first_table[c1 % 7]); + if ((c1 = (*i_getc)(f)) == EOF) LAST; + while (SP <= c1 && c1 <= 'z') { + (*oconv)(0, c1 + c3); + if ((c1 = (*i_getc)(f)) == EOF) LAST; + } + SKIP; + } + else { + (*oconv)(0, ESC); + (*oconv)(0, '$'); + SEND; + } + } + else { + /* lonely ESC */ + (*oconv)(0, ESC); + SEND; + } + } else if (c1 == LF || c1 == CR) { + if (broken_f&4) { + input_mode = ASCII; set_iconv(FALSE, 0); + SEND; + } else if (mime_decode_f && !mime_decode_mode){ + if (c1 == LF) { + if ((c1=(*i_getc)(f))!=EOF && c1 == SP) { + i_ungetc(SP,f); + continue; + } else { + i_ungetc(c1,f); + } + c1 = LF; + SEND; + } else { /* if (c1 == CR)*/ + if ((c1=(*i_getc)(f))!=EOF) { + if (c1==SP) { + i_ungetc(SP,f); + continue; + } else if (c1 == LF && (c1=(*i_getc)(f))!=EOF && c1 == SP) { + i_ungetc(SP,f); + continue; + } else { + i_ungetc(c1,f); + } + i_ungetc(LF,f); + } else { + i_ungetc(c1,f); + } + c1 = CR; + SEND; + } + } + } else + SEND; + } + /* send: */ + switch(input_mode){ + case ASCII: + switch ((*iconv)(c2, c1, 0)) { /* can be EUC / SJIS / UTF-8 */ + case -2: + /* 4 bytes UTF-8 */ + if ((c3 = (*i_getc)(f)) != EOF) { + code_status(c3); + c3 <<= 8; + if ((c4 = (*i_getc)(f)) != EOF) { + code_status(c4); + (*iconv)(c2, c1, c3|c4); + } + } + break; + case -1: + /* 3 bytes EUC or UTF-8 */ + if ((c3 = (*i_getc)(f)) != EOF) { + code_status(c3); + (*iconv)(c2, c1, c3); + } + break; + } + break; + case JIS_X_0208: + case JIS_X_0213_1: + if (ms_ucs_map_f && + 0x7F <= c2 && c2 <= 0x92 && + 0x21 <= c1 && c1 <= 0x7E) { + /* CP932 UDC */ + c1 = nkf_char_unicode_new((c2 - 0x7F) * 94 + c1 - 0x21 + 0xE000); + c2 = 0; + } + (*oconv)(c2, c1); /* this is JIS, not SJIS/EUC case */ + break; +#ifdef X0212_ENABLE + case JIS_X_0212: + (*oconv)(PREFIX_EUCG3 | c2, c1); + break; +#endif /* X0212_ENABLE */ + case JIS_X_0213_2: + (*oconv)(PREFIX_EUCG3 | c2, c1); + break; + default: + (*oconv)(input_mode, c1); /* other special case */ + } + + c2 = 0; + c3 = 0; + continue; + /* goto next_word */ + } + + /* epilogue */ + (*iconv)(EOF, 0, 0); + if (!input_codename) + { + if (is_8bit) { + struct input_code *p = input_code_list; + struct input_code *result = p; + while (p->name){ + if (p->score < result->score) result = p; + ++p; + } + set_input_codename(result->name); +#ifdef CHECK_OPTION + debug(result->name); +#endif + } + } + return 0; +} + +/* + * int options(unsigned char *cp) + * + * return values: + * 0: success + * -1: ArgumentError + */ +static int +options(unsigned char *cp) +{ + nkf_char i, j; + unsigned char *p; + unsigned char *cp_back = NULL; + nkf_encoding *enc; + + if (option_mode==1) + return 0; + while(*cp && *cp++!='-'); + while (*cp || cp_back) { + if(!*cp){ + cp = cp_back; + cp_back = NULL; + continue; + } + p = 0; + switch (*cp++) { + case '-': /* literal options */ + if (!*cp || *cp == SP) { /* ignore the rest of arguments */ + option_mode = 1; + return 0; + } + for (i=0;ihiragana + bit:2 hiragana->katakana + */ + if ('9'>= *cp && *cp>='0') + hira_f |= (*cp++ -'0'); + else + hira_f |= 1; + continue; + case 'r': + rot_f = TRUE; + continue; +#if defined(MSDOS) || defined(__OS2__) + case 'T': + binmode_f = FALSE; + continue; +#endif +#ifndef PERL_XS + case 'V': + show_configuration(); + exit(1); + break; + case 'v': + usage(); + exit(1); + break; +#endif +#ifdef UTF8_OUTPUT_ENABLE + case 'w': /* UTF-8 output */ + if (cp[0] == '8') { + cp++; + if (cp[0] == '0'){ + cp++; + output_encoding = nkf_enc_from_index(UTF_8N); + } else { + output_bom_f = TRUE; + output_encoding = nkf_enc_from_index(UTF_8_BOM); + } + } else { + int enc_idx; + if ('1'== cp[0] && '6'==cp[1]) { + cp += 2; + enc_idx = UTF_16; + } else if ('3'== cp[0] && '2'==cp[1]) { + cp += 2; + enc_idx = UTF_32; + } else { + output_encoding = nkf_enc_from_index(UTF_8); + continue; + } + if (cp[0]=='L') { + cp++; + output_endian = ENDIAN_LITTLE; + } else if (cp[0] == 'B') { + cp++; + } else { + output_encoding = nkf_enc_from_index(enc_idx); + continue; + } + if (cp[0] == '0'){ + cp++; + enc_idx = enc_idx == UTF_16 + ? (output_endian == ENDIAN_LITTLE ? UTF_16LE : UTF_16BE) + : (output_endian == ENDIAN_LITTLE ? UTF_32LE : UTF_32BE); + } else { + output_bom_f = TRUE; + enc_idx = enc_idx == UTF_16 + ? (output_endian == ENDIAN_LITTLE ? UTF_16LE_BOM : UTF_16BE_BOM) + : (output_endian == ENDIAN_LITTLE ? UTF_32LE_BOM : UTF_32BE_BOM); + } + output_encoding = nkf_enc_from_index(enc_idx); + } + continue; +#endif +#ifdef UTF8_INPUT_ENABLE + case 'W': /* UTF input */ + if (cp[0] == '8') { + cp++; + input_encoding = nkf_enc_from_index(UTF_8); + }else{ + int enc_idx; + if ('1'== cp[0] && '6'==cp[1]) { + cp += 2; + input_endian = ENDIAN_BIG; + enc_idx = UTF_16; + } else if ('3'== cp[0] && '2'==cp[1]) { + cp += 2; + input_endian = ENDIAN_BIG; + enc_idx = UTF_32; + } else { + input_encoding = nkf_enc_from_index(UTF_8); + continue; + } + if (cp[0]=='L') { + cp++; + input_endian = ENDIAN_LITTLE; + } else if (cp[0] == 'B') { + cp++; + input_endian = ENDIAN_BIG; + } + enc_idx = (enc_idx == UTF_16 + ? (input_endian == ENDIAN_LITTLE ? UTF_16LE : UTF_16BE) + : (input_endian == ENDIAN_LITTLE ? UTF_32LE : UTF_32BE)); + input_encoding = nkf_enc_from_index(enc_idx); + } + continue; +#endif + /* Input code assumption */ + case 'J': /* ISO-2022-JP input */ + input_encoding = nkf_enc_from_index(ISO_2022_JP); + continue; + case 'E': /* EUC-JP input */ + input_encoding = nkf_enc_from_index(EUCJP_NKF); + continue; + case 'S': /* Windows-31J input */ + input_encoding = nkf_enc_from_index(WINDOWS_31J); + continue; + case 'Z': /* Convert X0208 alphabet to asii */ + /* alpha_f + bit:0 Convert JIS X 0208 Alphabet to ASCII + bit:1 Convert Kankaku to one space + bit:2 Convert Kankaku to two spaces + bit:3 Convert HTML Entity + bit:4 Convert JIS X 0208 Katakana to JIS X 0201 Katakana + */ + while ('0'<= *cp && *cp <='9') { + alpha_f |= 1 << (*cp++ - '0'); + } + if (!alpha_f) alpha_f = 1; + continue; + case 'x': /* Convert X0201 kana to X0208 or X0201 Conversion */ + x0201_f = FALSE; /* No X0201->X0208 conversion */ + /* accept X0201 + ESC-(-I in JIS, EUC, MS Kanji + SI/SO in JIS, EUC, MS Kanji + SS2 in EUC, JIS, not in MS Kanji + MS Kanji (0xa0-0xdf) + output X0201 + ESC-(-I in JIS (0x20-0x5f) + SS2 in EUC (0xa0-0xdf) + 0xa0-0xd in MS Kanji (0xa0-0xdf) + */ + continue; + case 'X': /* Convert X0201 kana to X0208 */ + x0201_f = TRUE; + continue; + case 'F': /* prserve new lines */ + fold_preserve_f = TRUE; + case 'f': /* folding -f60 or -f */ + fold_f = TRUE; + fold_len = 0; + while('0'<= *cp && *cp <='9') { /* we don't use atoi here */ + fold_len *= 10; + fold_len += *cp++ - '0'; + } + if (!(0= *cp && *cp>='0') + broken_f |= 1<<(*cp++ -'0'); + else + broken_f |= TRUE; + continue; +#ifndef PERL_XS + case 'O':/* for Output file */ + file_out_f = TRUE; + continue; +#endif + case 'c':/* add cr code */ + eolmode_f = CRLF; + continue; + case 'd':/* delete cr code */ + eolmode_f = LF; + continue; + case 'I': /* ISO-2022-JP output */ + iso2022jp_f = TRUE; + continue; + case 'L': /* line mode */ + if (*cp=='u') { /* unix */ + eolmode_f = LF; cp++; + } else if (*cp=='m') { /* mac */ + eolmode_f = CR; cp++; + } else if (*cp=='w') { /* windows */ + eolmode_f = CRLF; cp++; + } else if (*cp=='0') { /* no conversion */ + eolmode_f = 0; cp++; + } + continue; +#ifndef PERL_XS + case 'g': + if ('2' <= *cp && *cp <= '9') { + guess_f = 2; + cp++; + } else if (*cp == '0' || *cp == '1') { + guess_f = 1; + cp++; + } else { + guess_f = 1; + } + continue; +#endif + case SP: + /* module muliple options in a string are allowed for Perl moudle */ + while(*cp && *cp++!='-'); + continue; + default: +#if !defined(PERL_XS) && !defined(WIN32DLL) + fprintf(stderr, "unknown option: -%c\n", *(cp-1)); +#endif + /* bogus option but ignored */ + return -1; + } + } + return 0; +} + +#ifdef WIN32DLL +#include "nkf32dll.c" +#elif defined(PERL_XS) +#else /* WIN32DLL */ +int +main(int argc, char **argv) +{ + FILE *fin; + unsigned char *cp; + + char *outfname = NULL; + char *origfname; + +#ifdef EASYWIN /*Easy Win */ + _BufferSize.y = 400;/*Set Scroll Buffer Size*/ +#endif +#ifdef DEFAULT_CODE_LOCALE + setlocale(LC_CTYPE, ""); +#endif + for (argc--,argv++; (argc > 0) && **argv == '-'; argc--, argv++) { + cp = (unsigned char *)*argv; + options(cp); +#ifdef EXEC_IO + if (exec_f){ + int fds[2], pid; + if (pipe(fds) < 0 || (pid = fork()) < 0){ + abort(); + } + if (pid == 0){ + if (exec_f > 0){ + close(fds[0]); + dup2(fds[1], 1); + }else{ + close(fds[1]); + dup2(fds[0], 0); + } + execvp(argv[1], &argv[1]); + } + if (exec_f > 0){ + close(fds[1]); + dup2(fds[0], 0); + }else{ + close(fds[0]); + dup2(fds[1], 1); + } + argc = 0; + break; + } +#endif + } + + if (guess_f) { +#ifdef CHECK_OPTION + int debug_f_back = debug_f; +#endif +#ifdef EXEC_IO + int exec_f_back = exec_f; +#endif +#ifdef X0212_ENABLE + int x0212_f_back = x0212_f; +#endif + int x0213_f_back = x0213_f; + int guess_f_back = guess_f; + reinit(); + guess_f = guess_f_back; + mime_f = FALSE; +#ifdef CHECK_OPTION + debug_f = debug_f_back; +#endif +#ifdef EXEC_IO + exec_f = exec_f_back; +#endif + x0212_f = x0212_f_back; + x0213_f = x0213_f_back; + } + + if (binmode_f == TRUE) +#if defined(__OS2__) && (defined(__IBMC__) || defined(__IBMCPP__)) + if (freopen("","wb",stdout) == NULL) + return (-1); +#else + setbinmode(stdout); +#endif + + if (unbuf_f) + setbuf(stdout, (char *) NULL); + else + setvbuffer(stdout, (char *) stdobuf, IOBUF_SIZE); + + if (argc == 0) { + if (binmode_f == TRUE) +#if defined(__OS2__) && (defined(__IBMC__) || defined(__IBMCPP__)) + if (freopen("","rb",stdin) == NULL) return (-1); +#else + setbinmode(stdin); +#endif + setvbuffer(stdin, (char *) stdibuf, IOBUF_SIZE); + if (nop_f) + noconvert(stdin); + else { + kanji_convert(stdin); + if (guess_f) print_guessed_code(NULL); + } + } else { + int nfiles = argc; + int is_argument_error = FALSE; + while (argc--) { + input_codename = NULL; + input_eol = 0; +#ifdef CHECK_OPTION + iconv_for_check = 0; +#endif + if ((fin = fopen((origfname = *argv++), "r")) == NULL) { + perror(*(argv-1)); + is_argument_error = TRUE; + continue; + } else { +#ifdef OVERWRITE + int fd = 0; + int fd_backup = 0; +#endif + + /* reopen file for stdout */ + if (file_out_f == TRUE) { +#ifdef OVERWRITE + if (overwrite_f){ + outfname = malloc(strlen(origfname) + + strlen(".nkftmpXXXXXX") + + 1); + if (!outfname){ + perror(origfname); + return -1; + } + strcpy(outfname, origfname); +#ifdef MSDOS + { + int i; + for (i = strlen(outfname); i; --i){ + if (outfname[i - 1] == '/' + || outfname[i - 1] == '\\'){ + break; + } + } + outfname[i] = '\0'; + } + strcat(outfname, "ntXXXXXX"); + mktemp(outfname); + fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, + S_IREAD | S_IWRITE); +#else + strcat(outfname, ".nkftmpXXXXXX"); + fd = mkstemp(outfname); +#endif + if (fd < 0 + || (fd_backup = dup(fileno(stdout))) < 0 + || dup2(fd, fileno(stdout)) < 0 + ){ + perror(origfname); + return -1; + } + }else +#endif + if(argc == 1) { + outfname = *argv++; + argc--; + } else { + outfname = "nkf.out"; + } + + if(freopen(outfname, "w", stdout) == NULL) { + perror (outfname); + return (-1); + } + if (binmode_f == TRUE) { +#if defined(__OS2__) && (defined(__IBMC__) || defined(__IBMCPP__)) + if (freopen("","wb",stdout) == NULL) + return (-1); +#else + setbinmode(stdout); +#endif + } + } + if (binmode_f == TRUE) +#if defined(__OS2__) && (defined(__IBMC__) || defined(__IBMCPP__)) + if (freopen("","rb",fin) == NULL) + return (-1); +#else + setbinmode(fin); +#endif + setvbuffer(fin, (char *) stdibuf, IOBUF_SIZE); + if (nop_f) + noconvert(fin); + else { + char *filename = NULL; + kanji_convert(fin); + if (nfiles > 1) filename = origfname; + if (guess_f) print_guessed_code(filename); + } + fclose(fin); +#ifdef OVERWRITE + if (overwrite_f) { + struct stat sb; +#if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__) && !defined(__WATCOMC__) && !defined(__EMX__) && !defined(__OS2__) && !defined(__DJGPP__) + time_t tb[2]; +#else + struct utimbuf tb; +#endif + + fflush(stdout); + close(fd); + if (dup2(fd_backup, fileno(stdout)) < 0){ + perror("dup2"); + } + if (stat(origfname, &sb)) { + fprintf(stderr, "Can't stat %s\n", origfname); + } + /* $B%Q!<%_%C%7%g%s$rI|85(B */ + if (chmod(outfname, sb.st_mode)) { + fprintf(stderr, "Can't set permission %s\n", outfname); + } + + /* $B%?%$%`%9%?%s%W$rI|85(B */ + if(preserve_time_f){ +#if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__) && !defined(__WATCOMC__) && !defined(__EMX__) && !defined(__OS2__) && !defined(__DJGPP__) + tb[0] = tb[1] = sb.st_mtime; + if (utime(outfname, tb)) { + fprintf(stderr, "Can't set timestamp %s\n", outfname); + } +#else + tb.actime = sb.st_atime; + tb.modtime = sb.st_mtime; + if (utime(outfname, &tb)) { + fprintf(stderr, "Can't set timestamp %s\n", outfname); + } +#endif + } + if(backup_f){ + char *backup_filename = get_backup_filename(backup_suffix, origfname); +#ifdef MSDOS + unlink(backup_filename); +#endif + if (rename(origfname, backup_filename)) { + perror(backup_filename); + fprintf(stderr, "Can't rename %s to %s\n", + origfname, backup_filename); + } + free(backup_filename); + }else{ +#ifdef MSDOS + if (unlink(origfname)){ + perror(origfname); + } +#endif + } + if (rename(outfname, origfname)) { + perror(origfname); + fprintf(stderr, "Can't rename %s to %s\n", + outfname, origfname); + } + free(outfname); + } +#endif + } + } + if (is_argument_error) + return(-1); + } +#ifdef EASYWIN /*Easy Win */ + if (file_out_f == FALSE) + scanf("%d",&end_check); + else + fclose(stdout); +#else /* for Other OS */ + if (file_out_f == TRUE) + fclose(stdout); +#endif /*Easy Win */ + return (0); +} +#endif /* WIN32DLL */ diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.h b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.h new file mode 100644 index 0000000..0998837 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/nkf.h @@ -0,0 +1,192 @@ +/* + * + * nkf.h - Header file for nkf + * + * $Id: nkf.h 20185 2008-11-11 08:41:20Z yugui $ + */ + +#ifndef NKF_H + +/* Wrapper of configurations */ + +#ifndef MIME_DECODE_DEFAULT +#define MIME_DECODE_DEFAULT STRICT_MIME +#endif +#ifndef X0201_DEFAULT +#define X0201_DEFAULT TRUE +#endif + +#if DEFAULT_NEWLINE == 0x0D0A +#define PUT_NEWLINE(func) do {\ + func(0x0D);\ + func(0x0A);\ +} while (0) +#define OCONV_NEWLINE(func) do {\ + func(0, 0x0D);\ + func(0, 0x0A);\ +} while (0) +#elif DEFAULT_NEWLINE == 0x0D +#define PUT_NEWLINE(func) func(0x0D) +#define OCONV_NEWLINE(func) func(0, 0x0D) +#else +#define DEFAULT_NEWLINE 0x0A +#define PUT_NEWLINE(func) func(0x0A) +#define OCONV_NEWLINE(func) func(0, 0x0A) +#endif +#ifdef HELP_OUTPUT_STDERR +#define HELP_OUTPUT stderr +#else +#define HELP_OUTPUT stdout +#endif + + +/* Compatibility definitions */ + +#ifdef nkf_char +#elif defined(INT_IS_SHORT) +typedef long nkf_char; +#define NKF_INT32_C(n) (n##L) +#else +typedef int nkf_char; +#define NKF_INT32_C(n) (n) +#endif + +#if (defined(__TURBOC__) || defined(_MSC_VER) || defined(LSI_C) || (defined(__WATCOMC__) && defined(__386__) && !defined(__LINUX__)) || defined(__MINGW32__) || defined(__EMX__) || defined(__MSDOS__) || defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__)) && !defined(MSDOS) +#define MSDOS +#if (defined(__Win32__) || defined(_WIN32)) && !defined(__WIN32__) +#define __WIN32__ +#endif +#endif + +#ifdef PERL_XS +#undef OVERWRITE +#endif + +#ifndef PERL_XS +#include +#endif + +#include +#include + +#if defined(MSDOS) || defined(__OS2__) +#include +#include +#if defined(_MSC_VER) || defined(__WATCOMC__) +#define mktemp _mktemp +#endif +#endif + +#ifdef MSDOS +#ifdef LSI_C +#define setbinmode(fp) fsetbin(fp) +#elif defined(__DJGPP__) +#include +void setbinmode(FILE *fp) +{ + /* we do not use libc's setmode(), which changes COOKED/RAW mode in device. */ + int fd, m; + fd = fileno(fp); + m = (__file_handle_modes[fd] & (~O_TEXT)) | O_BINARY; + __file_handle_set(fd, m); +} +#else /* Microsoft C, Turbo C */ +#define setbinmode(fp) setmode(fileno(fp), O_BINARY) +#endif +#else /* UNIX */ +#define setbinmode(fp) +#endif + +#ifdef _IOFBF /* SysV and MSDOS, Windows */ +#define setvbuffer(fp, buf, size) setvbuf(fp, buf, _IOFBF, size) +#else /* BSD */ +#define setvbuffer(fp, buf, size) setbuffer(fp, buf, size) +#endif + +/*Borland C++ 4.5 EasyWin*/ +#if defined(__TURBOC__) && defined(_Windows) && !defined(__WIN32__) /*Easy Win */ +#define EASYWIN +#ifndef __WIN16__ +#define __WIN16__ +#endif +#include +#endif + +#ifdef OVERWRITE +/* added by satoru@isoternet.org */ +#if defined(__EMX__) +#include +#endif +#include +#if !defined(MSDOS) || defined(__DJGPP__) /* UNIX, djgpp */ +#include +#if defined(__WATCOMC__) +#include +#else +#include +#endif +#else /* defined(MSDOS) */ +#ifdef __WIN32__ +#ifdef __BORLANDC__ /* BCC32 */ +#include +#else /* !defined(__BORLANDC__) */ +#include +#endif /* (__BORLANDC__) */ +#else /* !defined(__WIN32__) */ +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__) || defined(__OS2__) || defined(__EMX__) || defined(__IBMC__) || defined(__IBMCPP__) /* VC++, MinGW, Watcom, emx+gcc, IBM VAC++ */ +#include +#elif defined(__TURBOC__) /* BCC */ +#include +#elif defined(LSI_C) /* LSI C */ +#endif /* (__WIN32__) */ +#endif +#endif +#endif + +#if !defined(DEFAULT_CODE_JIS) && !defined(DEFAULT_CODE_SJIS) && \ + !defined(DEFAULT_CODE_WINDOWS_31J) && !defined(DEFAULT_CODE_EUC) && \ + !defined(DEFAULT_CODE_UTF8) && !defined(DEFAULT_CODE_LOCALE) +#define DEFAULT_CODE_LOCALE +#endif + +#ifdef DEFAULT_CODE_LOCALE + +#if defined(__WIN32__) /* not win32 should be posix */ +# ifndef HAVE_LOCALE_H +# define HAVE_LOCALE_H +# endif +#elif defined(__OS2__) +# undef HAVE_LANGINFO_H /* We do not use kLIBC's langinfo. */ +# ifndef HAVE_LOCALE_H +# define HAVE_LOCALE_H +# endif +#elif defined(MSDOS) +# ifndef HAVE_LOCALE_H +# define HAVE_LOCALE_H +# endif +#else +# ifndef HAVE_LANGINFO_H +# define HAVE_LANGINFO_H +# endif +# ifndef HAVE_LOCALE_H +# define HAVE_LOCALE_H +# endif +#endif + +#ifdef HAVE_LANGINFO_H +#include +#endif +#ifdef HAVE_LOCALE_H +#include +#endif + +#endif /* DEFAULT_CODE_LOCALE */ + +#define FALSE 0 +#define TRUE 1 + +#ifdef WIN32DLL +#include "nkf32.h" +#endif + +#endif /* NKF_H */ diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.c b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.c new file mode 100644 index 0000000..fd4167d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.c @@ -0,0 +1,8754 @@ +/* + * utf8tbl.c - Convertion Table for nkf + * + * $Id: utf8tbl.c 19683 2008-10-05 01:10:41Z naruse $ + */ + +#include "config.h" +#include "utf8tbl.h" + +#ifdef UTF8_OUTPUT_ENABLE +static const unsigned short euc_to_utf8_A1[] = { + 0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A, + 0xFF1B, 0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8, + 0xFF3E, 0x203E, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003, + 0x4EDD, 0x3005, 0x3006, 0x3007, 0x30FC, 0x2014, 0x2010, 0xFF0F, + 0xFF3C, 0x301C, 0x2016, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019, + 0x201C, 0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D, + 0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D, + 0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0x2212, 0x00B1, 0x00D7, + 0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E, + 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0x00A5, + 0xFF04, 0x00A2, 0x00A3, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20, + 0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7, +}; + +/* Microsoft UCS Mapping Compatible */ +static const unsigned short euc_to_utf8_A1_ms[] = { + 0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A, + 0xFF1B, 0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8, + 0xFF3E, 0xFFE3, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003, + 0x4EDD, 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F, + 0xFF3C, 0xFF5E, 0x2225, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019, + 0x201C, 0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D, + 0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D, + 0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0xFF0D, 0x00B1, 0x00D7, + 0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E, + 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5, + 0xFF04, 0xFFE0, 0xFFE1, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20, + 0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7, +}; +static const unsigned short euc_to_utf8_A2[] = { + 0x25C6, 0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC, + 0x203B, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283, + 0x222A, 0x2229, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2227, 0x2228, 0x00AC, 0x21D2, 0x21D4, 0x2200, + 0x2203, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2220, 0x22A5, 0x2312, 0x2202, + 0x2207, 0x2261, 0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D, + 0x2235, 0x222B, 0x222C, 0, 0, 0, 0, 0, + 0, 0, 0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020, + 0x2021, 0x00B6, 0, 0, 0, 0, 0x25EF, +}; + +/* Microsoft UCS Mapping Compatible */ +static const unsigned short euc_to_utf8_A2_ms[] = { + 0x25C6, 0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC, + 0x203B, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283, + 0x222A, 0x2229, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2227, 0x2228, 0xFFE2, 0x21D2, 0x21D4, 0x2200, + 0x2203, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2220, 0x22A5, 0x2312, 0x2202, + 0x2207, 0x2261, 0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D, + 0x2235, 0x222B, 0x222C, 0, 0, 0, 0, 0, + 0, 0, 0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020, + 0x2021, 0x00B6, 0, 0, 0, 0, 0x25EF, +}; +static const unsigned short euc_to_utf8_A3[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, + 0xFF18, 0xFF19, 0, 0, 0, 0, 0, 0, + 0, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, + 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, + 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, + 0xFF38, 0xFF39, 0xFF3A, 0, 0, 0, 0, 0, + 0, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, + 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, + 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, + 0xFF58, 0xFF59, 0xFF5A, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A4[] = { + 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, + 0x3048, 0x3049, 0x304A, 0x304B, 0x304C, 0x304D, 0x304E, 0x304F, + 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, + 0x3058, 0x3059, 0x305A, 0x305B, 0x305C, 0x305D, 0x305E, 0x305F, + 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, + 0x3068, 0x3069, 0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F, + 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, + 0x3078, 0x3079, 0x307A, 0x307B, 0x307C, 0x307D, 0x307E, 0x307F, + 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, + 0x3088, 0x3089, 0x308A, 0x308B, 0x308C, 0x308D, 0x308E, 0x308F, + 0x3090, 0x3091, 0x3092, 0x3093, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A5[] = { + 0x30A1, 0x30A2, 0x30A3, 0x30A4, 0x30A5, 0x30A6, 0x30A7, + 0x30A8, 0x30A9, 0x30AA, 0x30AB, 0x30AC, 0x30AD, 0x30AE, 0x30AF, + 0x30B0, 0x30B1, 0x30B2, 0x30B3, 0x30B4, 0x30B5, 0x30B6, 0x30B7, + 0x30B8, 0x30B9, 0x30BA, 0x30BB, 0x30BC, 0x30BD, 0x30BE, 0x30BF, + 0x30C0, 0x30C1, 0x30C2, 0x30C3, 0x30C4, 0x30C5, 0x30C6, 0x30C7, + 0x30C8, 0x30C9, 0x30CA, 0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF, + 0x30D0, 0x30D1, 0x30D2, 0x30D3, 0x30D4, 0x30D5, 0x30D6, 0x30D7, + 0x30D8, 0x30D9, 0x30DA, 0x30DB, 0x30DC, 0x30DD, 0x30DE, 0x30DF, + 0x30E0, 0x30E1, 0x30E2, 0x30E3, 0x30E4, 0x30E5, 0x30E6, 0x30E7, + 0x30E8, 0x30E9, 0x30EA, 0x30EB, 0x30EC, 0x30ED, 0x30EE, 0x30EF, + 0x30F0, 0x30F1, 0x30F2, 0x30F3, 0x30F4, 0x30F5, 0x30F6, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A6[] = { + 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, + 0x03A9, 0, 0, 0, 0, 0, 0, 0, + 0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, + 0x03C9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A7[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, + 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, + 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, + 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, + 0x042E, 0x042F, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, + 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, + 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, + 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, + 0x044E, 0x044F, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A8[] = { + 0x2500, 0x2502, 0x250C, 0x2510, 0x2518, 0x2514, 0x251C, + 0x252C, 0x2524, 0x2534, 0x253C, 0x2501, 0x2503, 0x250F, 0x2513, + 0x251B, 0x2517, 0x2523, 0x2533, 0x252B, 0x253B, 0x254B, 0x2520, + 0x252F, 0x2528, 0x2537, 0x253F, 0x251D, 0x2530, 0x2525, 0x2538, + 0x2542, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_A9[] = { + 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, + 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, + 0x246F, 0x2470, 0x2471, 0x2472, 0x2473, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x2474, + 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247A, 0x247B, 0x247C, + 0x247D, 0x247E, 0x247F, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, + 0x2485, 0x2486, 0x2487, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2776, 0x2777, 0x2778, + 0x2779, 0x277A, 0x277B, 0x277C, 0x277D, 0x277E, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2488, 0x2489, 0x248A, 0x248B, 0x248C, 0x248D, + 0x248E, 0x248F, 0x2490, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_AA[] = { + 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, + 0x2167, 0x2168, 0x2169, 0x216A, 0x216B, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2170, 0x2171, 0x2172, + 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, + 0x217B, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x249C, 0x249D, 0x249E, + 0x249F, 0x24A0, 0x24A1, 0x24A2, 0x24A3, 0x24A4, 0x24A5, 0x24A6, + 0x24A7, 0x24A8, 0x24A9, 0x24AA, 0x24AB, 0x24AC, 0x24AD, 0x24AE, + 0x24AF, 0x24B0, 0x24B1, 0x24B2, 0x24B3, 0x24B4, 0x24B5, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_AB[] = { + 0x339C, 0x339F, 0x339D, 0x33A0, 0x33A4, 0, 0x33A1, + 0x33A5, 0x339E, 0x33A2, 0x338E, 0, 0x338F, 0x33C4, 0x3396, + 0x3397, 0x2113, 0x3398, 0x33B3, 0x33B2, 0x33B1, 0x33B0, 0x2109, + 0x33D4, 0x33CB, 0x3390, 0x3385, 0x3386, 0x3387, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2116, 0x33CD, 0x2121, 0, +}; +static const unsigned short euc_to_utf8_AC[] = { + 0x2664, 0x2667, 0x2661, 0x2662, 0x2660, 0x2663, 0x2665, + 0x2666, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x3020, 0x260E, 0x3004, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x261E, 0x261C, 0x261D, 0x261F, 0x21C6, 0x21C4, 0x21C5, + 0, 0x21E8, 0x21E6, 0x21E7, 0x21E9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_AC_mac[] = { + 0x2664, 0x2667, 0x2661, 0x2662, 0x2660, 0x2663, 0x2665, + 0x2666, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x3020, 0x260E, 0x3004, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x261E, 0x261C, 0x261D, 0x261F, 0x21C6, 0x21C4, 0x21C5, + 0, 0x21E8, 0x21E6, 0x21E7, 0x21E9, 0x2192, 0x2190, 0x2191, + 0x2193, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_AD[] = { + 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, + 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, + 0x246F, 0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162, + 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0, + 0x3349, 0x3314, 0x3322, 0x334D, 0x3318, 0x3327, 0x3303, 0x3336, + 0x3351, 0x3357, 0x330D, 0x3326, 0x3323, 0x332B, 0x334A, 0x333B, + 0x339C, 0x339D, 0x339E, 0x338E, 0x338F, 0x33C4, 0x33A1, 0, + 0, 0, 0, 0, 0, 0, 0, 0x337B, + 0x301D, 0x301F, 0x2116, 0x33CD, 0x2121, 0x32A4, 0x32A5, 0x32A6, + 0x32A7, 0x32A8, 0x3231, 0x3232, 0x3239, 0x337E, 0x337D, 0x337C, + 0x2252, 0x2261, 0x222B, 0x222E, 0x2211, 0x221A, 0x22A5, 0x2220, + 0x221F, 0x22BF, 0x2235, 0x2229, 0x222A, 0, 0x3299, +}; +static const unsigned short euc_to_utf8_AD_mac[] = { + 0x65E5, 0x6708, 0x706B, 0x6C34, 0x6728, 0x91D1, 0x571F, + 0x796D, 0x795D, 0x81EA, 0x81F3, 0x3239, 0x547C, 0x3231, 0x8CC7, + 0x540D, 0x3232, 0x5B66, 0x8CA1, 0x793E, 0x7279, 0x76E3, 0x4F01, + 0x5354, 0x52B4, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0, + 0x3349, 0x3314, 0x3322, 0x334D, 0x3318, 0x3327, 0x3303, 0x3336, + 0x3351, 0x3357, 0x330D, 0x3326, 0x3323, 0x332B, 0x334A, 0x333B, + 0x339C, 0x339D, 0x339E, 0x338E, 0x338F, 0x33C4, 0x33A1, 0, + 0, 0, 0, 0, 0, 0, 0, 0x337B, + 0x301D, 0x301F, 0x2116, 0x33CD, 0x2121, 0x32A4, 0x32A5, 0x32A6, + 0x32A7, 0x32A8, 0x3231, 0x3232, 0x3239, 0x337E, 0x337D, 0x337C, + 0x2252, 0x5927, 0x5C0F, 0x32A4, 0x32A5, 0x32A6, 0x32A7, 0x32A8, + 0x533B, 0x8CA1, 0x512A, 0x52B4, 0x5370, 0x63A7, 0x79D8, +}; +static const unsigned short euc_to_utf8_AE[] = { + 0x3349, 0x3322, 0x334D, 0x3314, 0x3316, 0x3305, 0x3333, + 0x334E, 0x3303, 0x3336, 0x3318, 0x3315, 0x3327, 0x3351, 0x334A, + 0x3339, 0x3357, 0x330D, 0x3342, 0x3323, 0x3326, 0x333B, 0x332B, + 0, 0, 0, 0, 0, 0, 0, 0x3300, + 0x331E, 0x332A, 0x3331, 0x3347, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x337E, + 0x337D, 0x337C, 0x337B, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x337F, 0, 0, +}; +static const unsigned short euc_to_utf8_AF[] = { + 0x222E, 0x221F, 0x22BF, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x301D, 0x301F, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x3094, 0, 0x30F7, 0x30F8, 0x30F9, 0x30FA, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_B0[] = { + 0x4E9C, 0x5516, 0x5A03, 0x963F, 0x54C0, 0x611B, 0x6328, + 0x59F6, 0x9022, 0x8475, 0x831C, 0x7A50, 0x60AA, 0x63E1, 0x6E25, + 0x65ED, 0x8466, 0x82A6, 0x9BF5, 0x6893, 0x5727, 0x65A1, 0x6271, + 0x5B9B, 0x59D0, 0x867B, 0x98F4, 0x7D62, 0x7DBE, 0x9B8E, 0x6216, + 0x7C9F, 0x88B7, 0x5B89, 0x5EB5, 0x6309, 0x6697, 0x6848, 0x95C7, + 0x978D, 0x674F, 0x4EE5, 0x4F0A, 0x4F4D, 0x4F9D, 0x5049, 0x56F2, + 0x5937, 0x59D4, 0x5A01, 0x5C09, 0x60DF, 0x610F, 0x6170, 0x6613, + 0x6905, 0x70BA, 0x754F, 0x7570, 0x79FB, 0x7DAD, 0x7DEF, 0x80C3, + 0x840E, 0x8863, 0x8B02, 0x9055, 0x907A, 0x533B, 0x4E95, 0x4EA5, + 0x57DF, 0x80B2, 0x90C1, 0x78EF, 0x4E00, 0x58F1, 0x6EA2, 0x9038, + 0x7A32, 0x8328, 0x828B, 0x9C2F, 0x5141, 0x5370, 0x54BD, 0x54E1, + 0x56E0, 0x59FB, 0x5F15, 0x98F2, 0x6DEB, 0x80E4, 0x852D, +}; +static const unsigned short euc_to_utf8_B1[] = { + 0x9662, 0x9670, 0x96A0, 0x97FB, 0x540B, 0x53F3, 0x5B87, + 0x70CF, 0x7FBD, 0x8FC2, 0x96E8, 0x536F, 0x9D5C, 0x7ABA, 0x4E11, + 0x7893, 0x81FC, 0x6E26, 0x5618, 0x5504, 0x6B1D, 0x851A, 0x9C3B, + 0x59E5, 0x53A9, 0x6D66, 0x74DC, 0x958F, 0x5642, 0x4E91, 0x904B, + 0x96F2, 0x834F, 0x990C, 0x53E1, 0x55B6, 0x5B30, 0x5F71, 0x6620, + 0x66F3, 0x6804, 0x6C38, 0x6CF3, 0x6D29, 0x745B, 0x76C8, 0x7A4E, + 0x9834, 0x82F1, 0x885B, 0x8A60, 0x92ED, 0x6DB2, 0x75AB, 0x76CA, + 0x99C5, 0x60A6, 0x8B01, 0x8D8A, 0x95B2, 0x698E, 0x53AD, 0x5186, + 0x5712, 0x5830, 0x5944, 0x5BB4, 0x5EF6, 0x6028, 0x63A9, 0x63F4, + 0x6CBF, 0x6F14, 0x708E, 0x7114, 0x7159, 0x71D5, 0x733F, 0x7E01, + 0x8276, 0x82D1, 0x8597, 0x9060, 0x925B, 0x9D1B, 0x5869, 0x65BC, + 0x6C5A, 0x7525, 0x51F9, 0x592E, 0x5965, 0x5F80, 0x5FDC, +}; +static const unsigned short euc_to_utf8_B2[] = { + 0x62BC, 0x65FA, 0x6A2A, 0x6B27, 0x6BB4, 0x738B, 0x7FC1, + 0x8956, 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, + 0x5C4B, 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, + 0x6069, 0x6E29, 0x7A4F, 0x97F3, 0x4E0B, 0x5316, 0x4EEE, 0x4F55, + 0x4F3D, 0x4FA1, 0x4F73, 0x52A0, 0x53EF, 0x5609, 0x590F, 0x5AC1, + 0x5BB6, 0x5BE1, 0x79D1, 0x6687, 0x679C, 0x67B6, 0x6B4C, 0x6CB3, + 0x706B, 0x73C2, 0x798D, 0x79BE, 0x7A3C, 0x7B87, 0x82B1, 0x82DB, + 0x8304, 0x8377, 0x83EF, 0x83D3, 0x8766, 0x8AB2, 0x5629, 0x8CA8, + 0x8FE6, 0x904E, 0x971E, 0x868A, 0x4FC4, 0x5CE8, 0x6211, 0x7259, + 0x753B, 0x81E5, 0x82BD, 0x86FE, 0x8CC0, 0x96C5, 0x9913, 0x99D5, + 0x4ECB, 0x4F1A, 0x89E3, 0x56DE, 0x584A, 0x58CA, 0x5EFB, 0x5FEB, + 0x602A, 0x6094, 0x6062, 0x61D0, 0x6212, 0x62D0, 0x6539, +}; +static const unsigned short euc_to_utf8_B3[] = { + 0x9B41, 0x6666, 0x68B0, 0x6D77, 0x7070, 0x754C, 0x7686, + 0x7D75, 0x82A5, 0x87F9, 0x958B, 0x968E, 0x8C9D, 0x51F1, 0x52BE, + 0x5916, 0x54B3, 0x5BB3, 0x5D16, 0x6168, 0x6982, 0x6DAF, 0x788D, + 0x84CB, 0x8857, 0x8A72, 0x93A7, 0x9AB8, 0x6D6C, 0x99A8, 0x86D9, + 0x57A3, 0x67FF, 0x86CE, 0x920E, 0x5283, 0x5687, 0x5404, 0x5ED3, + 0x62E1, 0x64B9, 0x683C, 0x6838, 0x6BBB, 0x7372, 0x78BA, 0x7A6B, + 0x899A, 0x89D2, 0x8D6B, 0x8F03, 0x90ED, 0x95A3, 0x9694, 0x9769, + 0x5B66, 0x5CB3, 0x697D, 0x984D, 0x984E, 0x639B, 0x7B20, 0x6A2B, + 0x6A7F, 0x68B6, 0x9C0D, 0x6F5F, 0x5272, 0x559D, 0x6070, 0x62EC, + 0x6D3B, 0x6E07, 0x6ED1, 0x845B, 0x8910, 0x8F44, 0x4E14, 0x9C39, + 0x53F6, 0x691B, 0x6A3A, 0x9784, 0x682A, 0x515C, 0x7AC3, 0x84B2, + 0x91DC, 0x938C, 0x565B, 0x9D28, 0x6822, 0x8305, 0x8431, +}; +static const unsigned short euc_to_utf8_B4[] = { + 0x7CA5, 0x5208, 0x82C5, 0x74E6, 0x4E7E, 0x4F83, 0x51A0, + 0x5BD2, 0x520A, 0x52D8, 0x52E7, 0x5DFB, 0x559A, 0x582A, 0x59E6, + 0x5B8C, 0x5B98, 0x5BDB, 0x5E72, 0x5E79, 0x60A3, 0x611F, 0x6163, + 0x61BE, 0x63DB, 0x6562, 0x67D1, 0x6853, 0x68FA, 0x6B3E, 0x6B53, + 0x6C57, 0x6F22, 0x6F97, 0x6F45, 0x74B0, 0x7518, 0x76E3, 0x770B, + 0x7AFF, 0x7BA1, 0x7C21, 0x7DE9, 0x7F36, 0x7FF0, 0x809D, 0x8266, + 0x839E, 0x89B3, 0x8ACC, 0x8CAB, 0x9084, 0x9451, 0x9593, 0x9591, + 0x95A2, 0x9665, 0x97D3, 0x9928, 0x8218, 0x4E38, 0x542B, 0x5CB8, + 0x5DCC, 0x73A9, 0x764C, 0x773C, 0x5CA9, 0x7FEB, 0x8D0B, 0x96C1, + 0x9811, 0x9854, 0x9858, 0x4F01, 0x4F0E, 0x5371, 0x559C, 0x5668, + 0x57FA, 0x5947, 0x5B09, 0x5BC4, 0x5C90, 0x5E0C, 0x5E7E, 0x5FCC, + 0x63EE, 0x673A, 0x65D7, 0x65E2, 0x671F, 0x68CB, 0x68C4, +}; +static const unsigned short euc_to_utf8_B5[] = { + 0x6A5F, 0x5E30, 0x6BC5, 0x6C17, 0x6C7D, 0x757F, 0x7948, + 0x5B63, 0x7A00, 0x7D00, 0x5FBD, 0x898F, 0x8A18, 0x8CB4, 0x8D77, + 0x8ECC, 0x8F1D, 0x98E2, 0x9A0E, 0x9B3C, 0x4E80, 0x507D, 0x5100, + 0x5993, 0x5B9C, 0x622F, 0x6280, 0x64EC, 0x6B3A, 0x72A0, 0x7591, + 0x7947, 0x7FA9, 0x87FB, 0x8ABC, 0x8B70, 0x63AC, 0x83CA, 0x97A0, + 0x5409, 0x5403, 0x55AB, 0x6854, 0x6A58, 0x8A70, 0x7827, 0x6775, + 0x9ECD, 0x5374, 0x5BA2, 0x811A, 0x8650, 0x9006, 0x4E18, 0x4E45, + 0x4EC7, 0x4F11, 0x53CA, 0x5438, 0x5BAE, 0x5F13, 0x6025, 0x6551, + 0x673D, 0x6C42, 0x6C72, 0x6CE3, 0x7078, 0x7403, 0x7A76, 0x7AAE, + 0x7B08, 0x7D1A, 0x7CFE, 0x7D66, 0x65E7, 0x725B, 0x53BB, 0x5C45, + 0x5DE8, 0x62D2, 0x62E0, 0x6319, 0x6E20, 0x865A, 0x8A31, 0x8DDD, + 0x92F8, 0x6F01, 0x79A6, 0x9B5A, 0x4EA8, 0x4EAB, 0x4EAC, +}; +static const unsigned short euc_to_utf8_B6[] = { + 0x4F9B, 0x4FA0, 0x50D1, 0x5147, 0x7AF6, 0x5171, 0x51F6, + 0x5354, 0x5321, 0x537F, 0x53EB, 0x55AC, 0x5883, 0x5CE1, 0x5F37, + 0x5F4A, 0x602F, 0x6050, 0x606D, 0x631F, 0x6559, 0x6A4B, 0x6CC1, + 0x72C2, 0x72ED, 0x77EF, 0x80F8, 0x8105, 0x8208, 0x854E, 0x90F7, + 0x93E1, 0x97FF, 0x9957, 0x9A5A, 0x4EF0, 0x51DD, 0x5C2D, 0x6681, + 0x696D, 0x5C40, 0x66F2, 0x6975, 0x7389, 0x6850, 0x7C81, 0x50C5, + 0x52E4, 0x5747, 0x5DFE, 0x9326, 0x65A4, 0x6B23, 0x6B3D, 0x7434, + 0x7981, 0x79BD, 0x7B4B, 0x7DCA, 0x82B9, 0x83CC, 0x887F, 0x895F, + 0x8B39, 0x8FD1, 0x91D1, 0x541F, 0x9280, 0x4E5D, 0x5036, 0x53E5, + 0x533A, 0x72D7, 0x7396, 0x77E9, 0x82E6, 0x8EAF, 0x99C6, 0x99C8, + 0x99D2, 0x5177, 0x611A, 0x865E, 0x55B0, 0x7A7A, 0x5076, 0x5BD3, + 0x9047, 0x9685, 0x4E32, 0x6ADB, 0x91E7, 0x5C51, 0x5C48, +}; +static const unsigned short euc_to_utf8_B7[] = { + 0x6398, 0x7A9F, 0x6C93, 0x9774, 0x8F61, 0x7AAA, 0x718A, + 0x9688, 0x7C82, 0x6817, 0x7E70, 0x6851, 0x936C, 0x52F2, 0x541B, + 0x85AB, 0x8A13, 0x7FA4, 0x8ECD, 0x90E1, 0x5366, 0x8888, 0x7941, + 0x4FC2, 0x50BE, 0x5211, 0x5144, 0x5553, 0x572D, 0x73EA, 0x578B, + 0x5951, 0x5F62, 0x5F84, 0x6075, 0x6176, 0x6167, 0x61A9, 0x63B2, + 0x643A, 0x656C, 0x666F, 0x6842, 0x6E13, 0x7566, 0x7A3D, 0x7CFB, + 0x7D4C, 0x7D99, 0x7E4B, 0x7F6B, 0x830E, 0x834A, 0x86CD, 0x8A08, + 0x8A63, 0x8B66, 0x8EFD, 0x981A, 0x9D8F, 0x82B8, 0x8FCE, 0x9BE8, + 0x5287, 0x621F, 0x6483, 0x6FC0, 0x9699, 0x6841, 0x5091, 0x6B20, + 0x6C7A, 0x6F54, 0x7A74, 0x7D50, 0x8840, 0x8A23, 0x6708, 0x4EF6, + 0x5039, 0x5026, 0x5065, 0x517C, 0x5238, 0x5263, 0x55A7, 0x570F, + 0x5805, 0x5ACC, 0x5EFA, 0x61B2, 0x61F8, 0x62F3, 0x6372, +}; +static const unsigned short euc_to_utf8_B8[] = { + 0x691C, 0x6A29, 0x727D, 0x72AC, 0x732E, 0x7814, 0x786F, + 0x7D79, 0x770C, 0x80A9, 0x898B, 0x8B19, 0x8CE2, 0x8ED2, 0x9063, + 0x9375, 0x967A, 0x9855, 0x9A13, 0x9E78, 0x5143, 0x539F, 0x53B3, + 0x5E7B, 0x5F26, 0x6E1B, 0x6E90, 0x7384, 0x73FE, 0x7D43, 0x8237, + 0x8A00, 0x8AFA, 0x9650, 0x4E4E, 0x500B, 0x53E4, 0x547C, 0x56FA, + 0x59D1, 0x5B64, 0x5DF1, 0x5EAB, 0x5F27, 0x6238, 0x6545, 0x67AF, + 0x6E56, 0x72D0, 0x7CCA, 0x88B4, 0x80A1, 0x80E1, 0x83F0, 0x864E, + 0x8A87, 0x8DE8, 0x9237, 0x96C7, 0x9867, 0x9F13, 0x4E94, 0x4E92, + 0x4F0D, 0x5348, 0x5449, 0x543E, 0x5A2F, 0x5F8C, 0x5FA1, 0x609F, + 0x68A7, 0x6A8E, 0x745A, 0x7881, 0x8A9E, 0x8AA4, 0x8B77, 0x9190, + 0x4E5E, 0x9BC9, 0x4EA4, 0x4F7C, 0x4FAF, 0x5019, 0x5016, 0x5149, + 0x516C, 0x529F, 0x52B9, 0x52FE, 0x539A, 0x53E3, 0x5411, +}; +static const unsigned short euc_to_utf8_B9[] = { + 0x540E, 0x5589, 0x5751, 0x57A2, 0x597D, 0x5B54, 0x5B5D, + 0x5B8F, 0x5DE5, 0x5DE7, 0x5DF7, 0x5E78, 0x5E83, 0x5E9A, 0x5EB7, + 0x5F18, 0x6052, 0x614C, 0x6297, 0x62D8, 0x63A7, 0x653B, 0x6602, + 0x6643, 0x66F4, 0x676D, 0x6821, 0x6897, 0x69CB, 0x6C5F, 0x6D2A, + 0x6D69, 0x6E2F, 0x6E9D, 0x7532, 0x7687, 0x786C, 0x7A3F, 0x7CE0, + 0x7D05, 0x7D18, 0x7D5E, 0x7DB1, 0x8015, 0x8003, 0x80AF, 0x80B1, + 0x8154, 0x818F, 0x822A, 0x8352, 0x884C, 0x8861, 0x8B1B, 0x8CA2, + 0x8CFC, 0x90CA, 0x9175, 0x9271, 0x783F, 0x92FC, 0x95A4, 0x964D, + 0x9805, 0x9999, 0x9AD8, 0x9D3B, 0x525B, 0x52AB, 0x53F7, 0x5408, + 0x58D5, 0x62F7, 0x6FE0, 0x8C6A, 0x8F5F, 0x9EB9, 0x514B, 0x523B, + 0x544A, 0x56FD, 0x7A40, 0x9177, 0x9D60, 0x9ED2, 0x7344, 0x6F09, + 0x8170, 0x7511, 0x5FFD, 0x60DA, 0x9AA8, 0x72DB, 0x8FBC, +}; +static const unsigned short euc_to_utf8_BA[] = { + 0x6B64, 0x9803, 0x4ECA, 0x56F0, 0x5764, 0x58BE, 0x5A5A, + 0x6068, 0x61C7, 0x660F, 0x6606, 0x6839, 0x68B1, 0x6DF7, 0x75D5, + 0x7D3A, 0x826E, 0x9B42, 0x4E9B, 0x4F50, 0x53C9, 0x5506, 0x5D6F, + 0x5DE6, 0x5DEE, 0x67FB, 0x6C99, 0x7473, 0x7802, 0x8A50, 0x9396, + 0x88DF, 0x5750, 0x5EA7, 0x632B, 0x50B5, 0x50AC, 0x518D, 0x6700, + 0x54C9, 0x585E, 0x59BB, 0x5BB0, 0x5F69, 0x624D, 0x63A1, 0x683D, + 0x6B73, 0x6E08, 0x707D, 0x91C7, 0x7280, 0x7815, 0x7826, 0x796D, + 0x658E, 0x7D30, 0x83DC, 0x88C1, 0x8F09, 0x969B, 0x5264, 0x5728, + 0x6750, 0x7F6A, 0x8CA1, 0x51B4, 0x5742, 0x962A, 0x583A, 0x698A, + 0x80B4, 0x54B2, 0x5D0E, 0x57FC, 0x7895, 0x9DFA, 0x4F5C, 0x524A, + 0x548B, 0x643E, 0x6628, 0x6714, 0x67F5, 0x7A84, 0x7B56, 0x7D22, + 0x932F, 0x685C, 0x9BAD, 0x7B39, 0x5319, 0x518A, 0x5237, +}; +static const unsigned short euc_to_utf8_BB[] = { + 0x5BDF, 0x62F6, 0x64AE, 0x64E6, 0x672D, 0x6BBA, 0x85A9, + 0x96D1, 0x7690, 0x9BD6, 0x634C, 0x9306, 0x9BAB, 0x76BF, 0x6652, + 0x4E09, 0x5098, 0x53C2, 0x5C71, 0x60E8, 0x6492, 0x6563, 0x685F, + 0x71E6, 0x73CA, 0x7523, 0x7B97, 0x7E82, 0x8695, 0x8B83, 0x8CDB, + 0x9178, 0x9910, 0x65AC, 0x66AB, 0x6B8B, 0x4ED5, 0x4ED4, 0x4F3A, + 0x4F7F, 0x523A, 0x53F8, 0x53F2, 0x55E3, 0x56DB, 0x58EB, 0x59CB, + 0x59C9, 0x59FF, 0x5B50, 0x5C4D, 0x5E02, 0x5E2B, 0x5FD7, 0x601D, + 0x6307, 0x652F, 0x5B5C, 0x65AF, 0x65BD, 0x65E8, 0x679D, 0x6B62, + 0x6B7B, 0x6C0F, 0x7345, 0x7949, 0x79C1, 0x7CF8, 0x7D19, 0x7D2B, + 0x80A2, 0x8102, 0x81F3, 0x8996, 0x8A5E, 0x8A69, 0x8A66, 0x8A8C, + 0x8AEE, 0x8CC7, 0x8CDC, 0x96CC, 0x98FC, 0x6B6F, 0x4E8B, 0x4F3C, + 0x4F8D, 0x5150, 0x5B57, 0x5BFA, 0x6148, 0x6301, 0x6642, +}; +static const unsigned short euc_to_utf8_BC[] = { + 0x6B21, 0x6ECB, 0x6CBB, 0x723E, 0x74BD, 0x75D4, 0x78C1, + 0x793A, 0x800C, 0x8033, 0x81EA, 0x8494, 0x8F9E, 0x6C50, 0x9E7F, + 0x5F0F, 0x8B58, 0x9D2B, 0x7AFA, 0x8EF8, 0x5B8D, 0x96EB, 0x4E03, + 0x53F1, 0x57F7, 0x5931, 0x5AC9, 0x5BA4, 0x6089, 0x6E7F, 0x6F06, + 0x75BE, 0x8CEA, 0x5B9F, 0x8500, 0x7BE0, 0x5072, 0x67F4, 0x829D, + 0x5C61, 0x854A, 0x7E1E, 0x820E, 0x5199, 0x5C04, 0x6368, 0x8D66, + 0x659C, 0x716E, 0x793E, 0x7D17, 0x8005, 0x8B1D, 0x8ECA, 0x906E, + 0x86C7, 0x90AA, 0x501F, 0x52FA, 0x5C3A, 0x6753, 0x707C, 0x7235, + 0x914C, 0x91C8, 0x932B, 0x82E5, 0x5BC2, 0x5F31, 0x60F9, 0x4E3B, + 0x53D6, 0x5B88, 0x624B, 0x6731, 0x6B8A, 0x72E9, 0x73E0, 0x7A2E, + 0x816B, 0x8DA3, 0x9152, 0x9996, 0x5112, 0x53D7, 0x546A, 0x5BFF, + 0x6388, 0x6A39, 0x7DAC, 0x9700, 0x56DA, 0x53CE, 0x5468, +}; +static const unsigned short euc_to_utf8_BD[] = { + 0x5B97, 0x5C31, 0x5DDE, 0x4FEE, 0x6101, 0x62FE, 0x6D32, + 0x79C0, 0x79CB, 0x7D42, 0x7E4D, 0x7FD2, 0x81ED, 0x821F, 0x8490, + 0x8846, 0x8972, 0x8B90, 0x8E74, 0x8F2F, 0x9031, 0x914B, 0x916C, + 0x96C6, 0x919C, 0x4EC0, 0x4F4F, 0x5145, 0x5341, 0x5F93, 0x620E, + 0x67D4, 0x6C41, 0x6E0B, 0x7363, 0x7E26, 0x91CD, 0x9283, 0x53D4, + 0x5919, 0x5BBF, 0x6DD1, 0x795D, 0x7E2E, 0x7C9B, 0x587E, 0x719F, + 0x51FA, 0x8853, 0x8FF0, 0x4FCA, 0x5CFB, 0x6625, 0x77AC, 0x7AE3, + 0x821C, 0x99FF, 0x51C6, 0x5FAA, 0x65EC, 0x696F, 0x6B89, 0x6DF3, + 0x6E96, 0x6F64, 0x76FE, 0x7D14, 0x5DE1, 0x9075, 0x9187, 0x9806, + 0x51E6, 0x521D, 0x6240, 0x6691, 0x66D9, 0x6E1A, 0x5EB6, 0x7DD2, + 0x7F72, 0x66F8, 0x85AF, 0x85F7, 0x8AF8, 0x52A9, 0x53D9, 0x5973, + 0x5E8F, 0x5F90, 0x6055, 0x92E4, 0x9664, 0x50B7, 0x511F, +}; +static const unsigned short euc_to_utf8_BE[] = { + 0x52DD, 0x5320, 0x5347, 0x53EC, 0x54E8, 0x5546, 0x5531, + 0x5617, 0x5968, 0x59BE, 0x5A3C, 0x5BB5, 0x5C06, 0x5C0F, 0x5C11, + 0x5C1A, 0x5E84, 0x5E8A, 0x5EE0, 0x5F70, 0x627F, 0x6284, 0x62DB, + 0x638C, 0x6377, 0x6607, 0x660C, 0x662D, 0x6676, 0x677E, 0x68A2, + 0x6A1F, 0x6A35, 0x6CBC, 0x6D88, 0x6E09, 0x6E58, 0x713C, 0x7126, + 0x7167, 0x75C7, 0x7701, 0x785D, 0x7901, 0x7965, 0x79F0, 0x7AE0, + 0x7B11, 0x7CA7, 0x7D39, 0x8096, 0x83D6, 0x848B, 0x8549, 0x885D, + 0x88F3, 0x8A1F, 0x8A3C, 0x8A54, 0x8A73, 0x8C61, 0x8CDE, 0x91A4, + 0x9266, 0x937E, 0x9418, 0x969C, 0x9798, 0x4E0A, 0x4E08, 0x4E1E, + 0x4E57, 0x5197, 0x5270, 0x57CE, 0x5834, 0x58CC, 0x5B22, 0x5E38, + 0x60C5, 0x64FE, 0x6761, 0x6756, 0x6D44, 0x72B6, 0x7573, 0x7A63, + 0x84B8, 0x8B72, 0x91B8, 0x9320, 0x5631, 0x57F4, 0x98FE, +}; +static const unsigned short euc_to_utf8_BF[] = { + 0x62ED, 0x690D, 0x6B96, 0x71ED, 0x7E54, 0x8077, 0x8272, + 0x89E6, 0x98DF, 0x8755, 0x8FB1, 0x5C3B, 0x4F38, 0x4FE1, 0x4FB5, + 0x5507, 0x5A20, 0x5BDD, 0x5BE9, 0x5FC3, 0x614E, 0x632F, 0x65B0, + 0x664B, 0x68EE, 0x699B, 0x6D78, 0x6DF1, 0x7533, 0x75B9, 0x771F, + 0x795E, 0x79E6, 0x7D33, 0x81E3, 0x82AF, 0x85AA, 0x89AA, 0x8A3A, + 0x8EAB, 0x8F9B, 0x9032, 0x91DD, 0x9707, 0x4EBA, 0x4EC1, 0x5203, + 0x5875, 0x58EC, 0x5C0B, 0x751A, 0x5C3D, 0x814E, 0x8A0A, 0x8FC5, + 0x9663, 0x976D, 0x7B25, 0x8ACF, 0x9808, 0x9162, 0x56F3, 0x53A8, + 0x9017, 0x5439, 0x5782, 0x5E25, 0x63A8, 0x6C34, 0x708A, 0x7761, + 0x7C8B, 0x7FE0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968F, + 0x745E, 0x9AC4, 0x5D07, 0x5D69, 0x6570, 0x67A2, 0x8DA8, 0x96DB, + 0x636E, 0x6749, 0x6919, 0x83C5, 0x9817, 0x96C0, 0x88FE, +}; +static const unsigned short euc_to_utf8_C0[] = { + 0x6F84, 0x647A, 0x5BF8, 0x4E16, 0x702C, 0x755D, 0x662F, + 0x51C4, 0x5236, 0x52E2, 0x59D3, 0x5F81, 0x6027, 0x6210, 0x653F, + 0x6574, 0x661F, 0x6674, 0x68F2, 0x6816, 0x6B63, 0x6E05, 0x7272, + 0x751F, 0x76DB, 0x7CBE, 0x8056, 0x58F0, 0x88FD, 0x897F, 0x8AA0, + 0x8A93, 0x8ACB, 0x901D, 0x9192, 0x9752, 0x9759, 0x6589, 0x7A0E, + 0x8106, 0x96BB, 0x5E2D, 0x60DC, 0x621A, 0x65A5, 0x6614, 0x6790, + 0x77F3, 0x7A4D, 0x7C4D, 0x7E3E, 0x810A, 0x8CAC, 0x8D64, 0x8DE1, + 0x8E5F, 0x78A9, 0x5207, 0x62D9, 0x63A5, 0x6442, 0x6298, 0x8A2D, + 0x7A83, 0x7BC0, 0x8AAC, 0x96EA, 0x7D76, 0x820C, 0x8749, 0x4ED9, + 0x5148, 0x5343, 0x5360, 0x5BA3, 0x5C02, 0x5C16, 0x5DDD, 0x6226, + 0x6247, 0x64B0, 0x6813, 0x6834, 0x6CC9, 0x6D45, 0x6D17, 0x67D3, + 0x6F5C, 0x714E, 0x717D, 0x65CB, 0x7A7F, 0x7BAD, 0x7DDA, +}; +static const unsigned short euc_to_utf8_C1[] = { + 0x7E4A, 0x7FA8, 0x817A, 0x821B, 0x8239, 0x85A6, 0x8A6E, + 0x8CCE, 0x8DF5, 0x9078, 0x9077, 0x92AD, 0x9291, 0x9583, 0x9BAE, + 0x524D, 0x5584, 0x6F38, 0x7136, 0x5168, 0x7985, 0x7E55, 0x81B3, + 0x7CCE, 0x564C, 0x5851, 0x5CA8, 0x63AA, 0x66FE, 0x66FD, 0x695A, + 0x72D9, 0x758F, 0x758E, 0x790E, 0x7956, 0x79DF, 0x7C97, 0x7D20, + 0x7D44, 0x8607, 0x8A34, 0x963B, 0x9061, 0x9F20, 0x50E7, 0x5275, + 0x53CC, 0x53E2, 0x5009, 0x55AA, 0x58EE, 0x594F, 0x723D, 0x5B8B, + 0x5C64, 0x531D, 0x60E3, 0x60F3, 0x635C, 0x6383, 0x633F, 0x63BB, + 0x64CD, 0x65E9, 0x66F9, 0x5DE3, 0x69CD, 0x69FD, 0x6F15, 0x71E5, + 0x4E89, 0x75E9, 0x76F8, 0x7A93, 0x7CDF, 0x7DCF, 0x7D9C, 0x8061, + 0x8349, 0x8358, 0x846C, 0x84BC, 0x85FB, 0x88C5, 0x8D70, 0x9001, + 0x906D, 0x9397, 0x971C, 0x9A12, 0x50CF, 0x5897, 0x618E, +}; +static const unsigned short euc_to_utf8_C2[] = { + 0x81D3, 0x8535, 0x8D08, 0x9020, 0x4FC3, 0x5074, 0x5247, + 0x5373, 0x606F, 0x6349, 0x675F, 0x6E2C, 0x8DB3, 0x901F, 0x4FD7, + 0x5C5E, 0x8CCA, 0x65CF, 0x7D9A, 0x5352, 0x8896, 0x5176, 0x63C3, + 0x5B58, 0x5B6B, 0x5C0A, 0x640D, 0x6751, 0x905C, 0x4ED6, 0x591A, + 0x592A, 0x6C70, 0x8A51, 0x553E, 0x5815, 0x59A5, 0x60F0, 0x6253, + 0x67C1, 0x8235, 0x6955, 0x9640, 0x99C4, 0x9A28, 0x4F53, 0x5806, + 0x5BFE, 0x8010, 0x5CB1, 0x5E2F, 0x5F85, 0x6020, 0x614B, 0x6234, + 0x66FF, 0x6CF0, 0x6EDE, 0x80CE, 0x817F, 0x82D4, 0x888B, 0x8CB8, + 0x9000, 0x902E, 0x968A, 0x9EDB, 0x9BDB, 0x4EE3, 0x53F0, 0x5927, + 0x7B2C, 0x918D, 0x984C, 0x9DF9, 0x6EDD, 0x7027, 0x5353, 0x5544, + 0x5B85, 0x6258, 0x629E, 0x62D3, 0x6CA2, 0x6FEF, 0x7422, 0x8A17, + 0x9438, 0x6FC1, 0x8AFE, 0x8338, 0x51E7, 0x86F8, 0x53EA, +}; +static const unsigned short euc_to_utf8_C3[] = { + 0x53E9, 0x4F46, 0x9054, 0x8FB0, 0x596A, 0x8131, 0x5DFD, + 0x7AEA, 0x8FBF, 0x68DA, 0x8C37, 0x72F8, 0x9C48, 0x6A3D, 0x8AB0, + 0x4E39, 0x5358, 0x5606, 0x5766, 0x62C5, 0x63A2, 0x65E6, 0x6B4E, + 0x6DE1, 0x6E5B, 0x70AD, 0x77ED, 0x7AEF, 0x7BAA, 0x7DBB, 0x803D, + 0x80C6, 0x86CB, 0x8A95, 0x935B, 0x56E3, 0x58C7, 0x5F3E, 0x65AD, + 0x6696, 0x6A80, 0x6BB5, 0x7537, 0x8AC7, 0x5024, 0x77E5, 0x5730, + 0x5F1B, 0x6065, 0x667A, 0x6C60, 0x75F4, 0x7A1A, 0x7F6E, 0x81F4, + 0x8718, 0x9045, 0x99B3, 0x7BC9, 0x755C, 0x7AF9, 0x7B51, 0x84C4, + 0x9010, 0x79E9, 0x7A92, 0x8336, 0x5AE1, 0x7740, 0x4E2D, 0x4EF2, + 0x5B99, 0x5FE0, 0x62BD, 0x663C, 0x67F1, 0x6CE8, 0x866B, 0x8877, + 0x8A3B, 0x914E, 0x92F3, 0x99D0, 0x6A17, 0x7026, 0x732A, 0x82E7, + 0x8457, 0x8CAF, 0x4E01, 0x5146, 0x51CB, 0x558B, 0x5BF5, +}; +static const unsigned short euc_to_utf8_C4[] = { + 0x5E16, 0x5E33, 0x5E81, 0x5F14, 0x5F35, 0x5F6B, 0x5FB4, + 0x61F2, 0x6311, 0x66A2, 0x671D, 0x6F6E, 0x7252, 0x753A, 0x773A, + 0x8074, 0x8139, 0x8178, 0x8776, 0x8ABF, 0x8ADC, 0x8D85, 0x8DF3, + 0x929A, 0x9577, 0x9802, 0x9CE5, 0x52C5, 0x6357, 0x76F4, 0x6715, + 0x6C88, 0x73CD, 0x8CC3, 0x93AE, 0x9673, 0x6D25, 0x589C, 0x690E, + 0x69CC, 0x8FFD, 0x939A, 0x75DB, 0x901A, 0x585A, 0x6802, 0x63B4, + 0x69FB, 0x4F43, 0x6F2C, 0x67D8, 0x8FBB, 0x8526, 0x7DB4, 0x9354, + 0x693F, 0x6F70, 0x576A, 0x58F7, 0x5B2C, 0x7D2C, 0x722A, 0x540A, + 0x91E3, 0x9DB4, 0x4EAD, 0x4F4E, 0x505C, 0x5075, 0x5243, 0x8C9E, + 0x5448, 0x5824, 0x5B9A, 0x5E1D, 0x5E95, 0x5EAD, 0x5EF7, 0x5F1F, + 0x608C, 0x62B5, 0x633A, 0x63D0, 0x68AF, 0x6C40, 0x7887, 0x798E, + 0x7A0B, 0x7DE0, 0x8247, 0x8A02, 0x8AE6, 0x8E44, 0x9013, +}; +static const unsigned short euc_to_utf8_C5[] = { + 0x90B8, 0x912D, 0x91D8, 0x9F0E, 0x6CE5, 0x6458, 0x64E2, + 0x6575, 0x6EF4, 0x7684, 0x7B1B, 0x9069, 0x93D1, 0x6EBA, 0x54F2, + 0x5FB9, 0x64A4, 0x8F4D, 0x8FED, 0x9244, 0x5178, 0x586B, 0x5929, + 0x5C55, 0x5E97, 0x6DFB, 0x7E8F, 0x751C, 0x8CBC, 0x8EE2, 0x985B, + 0x70B9, 0x4F1D, 0x6BBF, 0x6FB1, 0x7530, 0x96FB, 0x514E, 0x5410, + 0x5835, 0x5857, 0x59AC, 0x5C60, 0x5F92, 0x6597, 0x675C, 0x6E21, + 0x767B, 0x83DF, 0x8CED, 0x9014, 0x90FD, 0x934D, 0x7825, 0x783A, + 0x52AA, 0x5EA6, 0x571F, 0x5974, 0x6012, 0x5012, 0x515A, 0x51AC, + 0x51CD, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5B95, 0x5CF6, + 0x5D8B, 0x60BC, 0x6295, 0x642D, 0x6771, 0x6843, 0x68BC, 0x68DF, + 0x76D7, 0x6DD8, 0x6E6F, 0x6D9B, 0x706F, 0x71C8, 0x5F53, 0x75D8, + 0x7977, 0x7B49, 0x7B54, 0x7B52, 0x7CD6, 0x7D71, 0x5230, +}; +static const unsigned short euc_to_utf8_C6[] = { + 0x8463, 0x8569, 0x85E4, 0x8A0E, 0x8B04, 0x8C46, 0x8E0F, + 0x9003, 0x900F, 0x9419, 0x9676, 0x982D, 0x9A30, 0x95D8, 0x50CD, + 0x52D5, 0x540C, 0x5802, 0x5C0E, 0x61A7, 0x649E, 0x6D1E, 0x77B3, + 0x7AE5, 0x80F4, 0x8404, 0x9053, 0x9285, 0x5CE0, 0x9D07, 0x533F, + 0x5F97, 0x5FB3, 0x6D9C, 0x7279, 0x7763, 0x79BF, 0x7BE4, 0x6BD2, + 0x72EC, 0x8AAD, 0x6803, 0x6A61, 0x51F8, 0x7A81, 0x6934, 0x5C4A, + 0x9CF6, 0x82EB, 0x5BC5, 0x9149, 0x701E, 0x5678, 0x5C6F, 0x60C7, + 0x6566, 0x6C8C, 0x8C5A, 0x9041, 0x9813, 0x5451, 0x66C7, 0x920D, + 0x5948, 0x90A3, 0x5185, 0x4E4D, 0x51EA, 0x8599, 0x8B0E, 0x7058, + 0x637A, 0x934B, 0x6962, 0x99B4, 0x7E04, 0x7577, 0x5357, 0x6960, + 0x8EDF, 0x96E3, 0x6C5D, 0x4E8C, 0x5C3C, 0x5F10, 0x8FE9, 0x5302, + 0x8CD1, 0x8089, 0x8679, 0x5EFF, 0x65E5, 0x4E73, 0x5165, +}; +static const unsigned short euc_to_utf8_C7[] = { + 0x5982, 0x5C3F, 0x97EE, 0x4EFB, 0x598A, 0x5FCD, 0x8A8D, + 0x6FE1, 0x79B0, 0x7962, 0x5BE7, 0x8471, 0x732B, 0x71B1, 0x5E74, + 0x5FF5, 0x637B, 0x649A, 0x71C3, 0x7C98, 0x4E43, 0x5EFC, 0x4E4B, + 0x57DC, 0x56A2, 0x60A9, 0x6FC3, 0x7D0D, 0x80FD, 0x8133, 0x81BF, + 0x8FB2, 0x8997, 0x86A4, 0x5DF4, 0x628A, 0x64AD, 0x8987, 0x6777, + 0x6CE2, 0x6D3E, 0x7436, 0x7834, 0x5A46, 0x7F75, 0x82AD, 0x99AC, + 0x4FF3, 0x5EC3, 0x62DD, 0x6392, 0x6557, 0x676F, 0x76C3, 0x724C, + 0x80CC, 0x80BA, 0x8F29, 0x914D, 0x500D, 0x57F9, 0x5A92, 0x6885, + 0x6973, 0x7164, 0x72FD, 0x8CB7, 0x58F2, 0x8CE0, 0x966A, 0x9019, + 0x877F, 0x79E4, 0x77E7, 0x8429, 0x4F2F, 0x5265, 0x535A, 0x62CD, + 0x67CF, 0x6CCA, 0x767D, 0x7B94, 0x7C95, 0x8236, 0x8584, 0x8FEB, + 0x66DD, 0x6F20, 0x7206, 0x7E1B, 0x83AB, 0x99C1, 0x9EA6, +}; +static const unsigned short euc_to_utf8_C8[] = { + 0x51FD, 0x7BB1, 0x7872, 0x7BB8, 0x8087, 0x7B48, 0x6AE8, + 0x5E61, 0x808C, 0x7551, 0x7560, 0x516B, 0x9262, 0x6E8C, 0x767A, + 0x9197, 0x9AEA, 0x4F10, 0x7F70, 0x629C, 0x7B4F, 0x95A5, 0x9CE9, + 0x567A, 0x5859, 0x86E4, 0x96BC, 0x4F34, 0x5224, 0x534A, 0x53CD, + 0x53DB, 0x5E06, 0x642C, 0x6591, 0x677F, 0x6C3E, 0x6C4E, 0x7248, + 0x72AF, 0x73ED, 0x7554, 0x7E41, 0x822C, 0x85E9, 0x8CA9, 0x7BC4, + 0x91C6, 0x7169, 0x9812, 0x98EF, 0x633D, 0x6669, 0x756A, 0x76E4, + 0x78D0, 0x8543, 0x86EE, 0x532A, 0x5351, 0x5426, 0x5983, 0x5E87, + 0x5F7C, 0x60B2, 0x6249, 0x6279, 0x62AB, 0x6590, 0x6BD4, 0x6CCC, + 0x75B2, 0x76AE, 0x7891, 0x79D8, 0x7DCB, 0x7F77, 0x80A5, 0x88AB, + 0x8AB9, 0x8CBB, 0x907F, 0x975E, 0x98DB, 0x6A0B, 0x7C38, 0x5099, + 0x5C3E, 0x5FAE, 0x6787, 0x6BD8, 0x7435, 0x7709, 0x7F8E, +}; +static const unsigned short euc_to_utf8_C9[] = { + 0x9F3B, 0x67CA, 0x7A17, 0x5339, 0x758B, 0x9AED, 0x5F66, + 0x819D, 0x83F1, 0x8098, 0x5F3C, 0x5FC5, 0x7562, 0x7B46, 0x903C, + 0x6867, 0x59EB, 0x5A9B, 0x7D10, 0x767E, 0x8B2C, 0x4FF5, 0x5F6A, + 0x6A19, 0x6C37, 0x6F02, 0x74E2, 0x7968, 0x8868, 0x8A55, 0x8C79, + 0x5EDF, 0x63CF, 0x75C5, 0x79D2, 0x82D7, 0x9328, 0x92F2, 0x849C, + 0x86ED, 0x9C2D, 0x54C1, 0x5F6C, 0x658C, 0x6D5C, 0x7015, 0x8CA7, + 0x8CD3, 0x983B, 0x654F, 0x74F6, 0x4E0D, 0x4ED8, 0x57E0, 0x592B, + 0x5A66, 0x5BCC, 0x51A8, 0x5E03, 0x5E9C, 0x6016, 0x6276, 0x6577, + 0x65A7, 0x666E, 0x6D6E, 0x7236, 0x7B26, 0x8150, 0x819A, 0x8299, + 0x8B5C, 0x8CA0, 0x8CE6, 0x8D74, 0x961C, 0x9644, 0x4FAE, 0x64AB, + 0x6B66, 0x821E, 0x8461, 0x856A, 0x90E8, 0x5C01, 0x6953, 0x98A8, + 0x847A, 0x8557, 0x4F0F, 0x526F, 0x5FA9, 0x5E45, 0x670D, +}; +static const unsigned short euc_to_utf8_CA[] = { + 0x798F, 0x8179, 0x8907, 0x8986, 0x6DF5, 0x5F17, 0x6255, + 0x6CB8, 0x4ECF, 0x7269, 0x9B92, 0x5206, 0x543B, 0x5674, 0x58B3, + 0x61A4, 0x626E, 0x711A, 0x596E, 0x7C89, 0x7CDE, 0x7D1B, 0x96F0, + 0x6587, 0x805E, 0x4E19, 0x4F75, 0x5175, 0x5840, 0x5E63, 0x5E73, + 0x5F0A, 0x67C4, 0x4E26, 0x853D, 0x9589, 0x965B, 0x7C73, 0x9801, + 0x50FB, 0x58C1, 0x7656, 0x78A7, 0x5225, 0x77A5, 0x8511, 0x7B86, + 0x504F, 0x5909, 0x7247, 0x7BC7, 0x7DE8, 0x8FBA, 0x8FD4, 0x904D, + 0x4FBF, 0x52C9, 0x5A29, 0x5F01, 0x97AD, 0x4FDD, 0x8217, 0x92EA, + 0x5703, 0x6355, 0x6B69, 0x752B, 0x88DC, 0x8F14, 0x7A42, 0x52DF, + 0x5893, 0x6155, 0x620A, 0x66AE, 0x6BCD, 0x7C3F, 0x83E9, 0x5023, + 0x4FF8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5B9D, 0x5CF0, 0x5CEF, + 0x5D29, 0x5E96, 0x62B1, 0x6367, 0x653E, 0x65B9, 0x670B, +}; +static const unsigned short euc_to_utf8_CB[] = { + 0x6CD5, 0x6CE1, 0x70F9, 0x7832, 0x7E2B, 0x80DE, 0x82B3, + 0x840C, 0x84EC, 0x8702, 0x8912, 0x8A2A, 0x8C4A, 0x90A6, 0x92D2, + 0x98FD, 0x9CF3, 0x9D6C, 0x4E4F, 0x4EA1, 0x508D, 0x5256, 0x574A, + 0x59A8, 0x5E3D, 0x5FD8, 0x5FD9, 0x623F, 0x66B4, 0x671B, 0x67D0, + 0x68D2, 0x5192, 0x7D21, 0x80AA, 0x81A8, 0x8B00, 0x8C8C, 0x8CBF, + 0x927E, 0x9632, 0x5420, 0x982C, 0x5317, 0x50D5, 0x535C, 0x58A8, + 0x64B2, 0x6734, 0x7267, 0x7766, 0x7A46, 0x91E6, 0x52C3, 0x6CA1, + 0x6B86, 0x5800, 0x5E4C, 0x5954, 0x672C, 0x7FFB, 0x51E1, 0x76C6, + 0x6469, 0x78E8, 0x9B54, 0x9EBB, 0x57CB, 0x59B9, 0x6627, 0x679A, + 0x6BCE, 0x54E9, 0x69D9, 0x5E55, 0x819C, 0x6795, 0x9BAA, 0x67FE, + 0x9C52, 0x685D, 0x4EA6, 0x4FE3, 0x53C8, 0x62B9, 0x672B, 0x6CAB, + 0x8FC4, 0x4FAD, 0x7E6D, 0x9EBF, 0x4E07, 0x6162, 0x6E80, +}; +static const unsigned short euc_to_utf8_CC[] = { + 0x6F2B, 0x8513, 0x5473, 0x672A, 0x9B45, 0x5DF3, 0x7B95, + 0x5CAC, 0x5BC6, 0x871C, 0x6E4A, 0x84D1, 0x7A14, 0x8108, 0x5999, + 0x7C8D, 0x6C11, 0x7720, 0x52D9, 0x5922, 0x7121, 0x725F, 0x77DB, + 0x9727, 0x9D61, 0x690B, 0x5A7F, 0x5A18, 0x51A5, 0x540D, 0x547D, + 0x660E, 0x76DF, 0x8FF7, 0x9298, 0x9CF4, 0x59EA, 0x725D, 0x6EC5, + 0x514D, 0x68C9, 0x7DBF, 0x7DEC, 0x9762, 0x9EBA, 0x6478, 0x6A21, + 0x8302, 0x5984, 0x5B5F, 0x6BDB, 0x731B, 0x76F2, 0x7DB2, 0x8017, + 0x8499, 0x5132, 0x6728, 0x9ED9, 0x76EE, 0x6762, 0x52FF, 0x9905, + 0x5C24, 0x623B, 0x7C7E, 0x8CB0, 0x554F, 0x60B6, 0x7D0B, 0x9580, + 0x5301, 0x4E5F, 0x51B6, 0x591C, 0x723A, 0x8036, 0x91CE, 0x5F25, + 0x77E2, 0x5384, 0x5F79, 0x7D04, 0x85AC, 0x8A33, 0x8E8D, 0x9756, + 0x67F3, 0x85AE, 0x9453, 0x6109, 0x6108, 0x6CB9, 0x7652, +}; +static const unsigned short euc_to_utf8_CD[] = { + 0x8AED, 0x8F38, 0x552F, 0x4F51, 0x512A, 0x52C7, 0x53CB, + 0x5BA5, 0x5E7D, 0x60A0, 0x6182, 0x63D6, 0x6709, 0x67DA, 0x6E67, + 0x6D8C, 0x7336, 0x7337, 0x7531, 0x7950, 0x88D5, 0x8A98, 0x904A, + 0x9091, 0x90F5, 0x96C4, 0x878D, 0x5915, 0x4E88, 0x4F59, 0x4E0E, + 0x8A89, 0x8F3F, 0x9810, 0x50AD, 0x5E7C, 0x5996, 0x5BB9, 0x5EB8, + 0x63DA, 0x63FA, 0x64C1, 0x66DC, 0x694A, 0x69D8, 0x6D0B, 0x6EB6, + 0x7194, 0x7528, 0x7AAF, 0x7F8A, 0x8000, 0x8449, 0x84C9, 0x8981, + 0x8B21, 0x8E0A, 0x9065, 0x967D, 0x990A, 0x617E, 0x6291, 0x6B32, + 0x6C83, 0x6D74, 0x7FCC, 0x7FFC, 0x6DC0, 0x7F85, 0x87BA, 0x88F8, + 0x6765, 0x83B1, 0x983C, 0x96F7, 0x6D1B, 0x7D61, 0x843D, 0x916A, + 0x4E71, 0x5375, 0x5D50, 0x6B04, 0x6FEB, 0x85CD, 0x862D, 0x89A7, + 0x5229, 0x540F, 0x5C65, 0x674E, 0x68A8, 0x7406, 0x7483, +}; +static const unsigned short euc_to_utf8_CE[] = { + 0x75E2, 0x88CF, 0x88E1, 0x91CC, 0x96E2, 0x9678, 0x5F8B, + 0x7387, 0x7ACB, 0x844E, 0x63A0, 0x7565, 0x5289, 0x6D41, 0x6E9C, + 0x7409, 0x7559, 0x786B, 0x7C92, 0x9686, 0x7ADC, 0x9F8D, 0x4FB6, + 0x616E, 0x65C5, 0x865C, 0x4E86, 0x4EAE, 0x50DA, 0x4E21, 0x51CC, + 0x5BEE, 0x6599, 0x6881, 0x6DBC, 0x731F, 0x7642, 0x77AD, 0x7A1C, + 0x7CE7, 0x826F, 0x8AD2, 0x907C, 0x91CF, 0x9675, 0x9818, 0x529B, + 0x7DD1, 0x502B, 0x5398, 0x6797, 0x6DCB, 0x71D0, 0x7433, 0x81E8, + 0x8F2A, 0x96A3, 0x9C57, 0x9E9F, 0x7460, 0x5841, 0x6D99, 0x7D2F, + 0x985E, 0x4EE4, 0x4F36, 0x4F8B, 0x51B7, 0x52B1, 0x5DBA, 0x601C, + 0x73B2, 0x793C, 0x82D3, 0x9234, 0x96B7, 0x96F6, 0x970A, 0x9E97, + 0x9F62, 0x66A6, 0x6B74, 0x5217, 0x52A3, 0x70C8, 0x88C2, 0x5EC9, + 0x604B, 0x6190, 0x6F23, 0x7149, 0x7C3E, 0x7DF4, 0x806F, +}; +static const unsigned short euc_to_utf8_CF[] = { + 0x84EE, 0x9023, 0x932C, 0x5442, 0x9B6F, 0x6AD3, 0x7089, + 0x8CC2, 0x8DEF, 0x9732, 0x52B4, 0x5A41, 0x5ECA, 0x5F04, 0x6717, + 0x697C, 0x6994, 0x6D6A, 0x6F0F, 0x7262, 0x72FC, 0x7BED, 0x8001, + 0x807E, 0x874B, 0x90CE, 0x516D, 0x9E93, 0x7984, 0x808B, 0x9332, + 0x8AD6, 0x502D, 0x548C, 0x8A71, 0x6B6A, 0x8CC4, 0x8107, 0x60D1, + 0x67A0, 0x9DF2, 0x4E99, 0x4E98, 0x9C10, 0x8A6B, 0x85C1, 0x8568, + 0x6900, 0x6E7E, 0x7897, 0x8155, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_D0[] = { + 0x5F0C, 0x4E10, 0x4E15, 0x4E2A, 0x4E31, 0x4E36, 0x4E3C, + 0x4E3F, 0x4E42, 0x4E56, 0x4E58, 0x4E82, 0x4E85, 0x8C6B, 0x4E8A, + 0x8212, 0x5F0D, 0x4E8E, 0x4E9E, 0x4E9F, 0x4EA0, 0x4EA2, 0x4EB0, + 0x4EB3, 0x4EB6, 0x4ECE, 0x4ECD, 0x4EC4, 0x4EC6, 0x4EC2, 0x4ED7, + 0x4EDE, 0x4EED, 0x4EDF, 0x4EF7, 0x4F09, 0x4F5A, 0x4F30, 0x4F5B, + 0x4F5D, 0x4F57, 0x4F47, 0x4F76, 0x4F88, 0x4F8F, 0x4F98, 0x4F7B, + 0x4F69, 0x4F70, 0x4F91, 0x4F6F, 0x4F86, 0x4F96, 0x5118, 0x4FD4, + 0x4FDF, 0x4FCE, 0x4FD8, 0x4FDB, 0x4FD1, 0x4FDA, 0x4FD0, 0x4FE4, + 0x4FE5, 0x501A, 0x5028, 0x5014, 0x502A, 0x5025, 0x5005, 0x4F1C, + 0x4FF6, 0x5021, 0x5029, 0x502C, 0x4FFE, 0x4FEF, 0x5011, 0x5006, + 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505A, 0x5056, + 0x506C, 0x5078, 0x5080, 0x509A, 0x5085, 0x50B4, 0x50B2, +}; +static const unsigned short euc_to_utf8_D1[] = { + 0x50C9, 0x50CA, 0x50B3, 0x50C2, 0x50D6, 0x50DE, 0x50E5, + 0x50ED, 0x50E3, 0x50EE, 0x50F9, 0x50F5, 0x5109, 0x5101, 0x5102, + 0x5116, 0x5115, 0x5114, 0x511A, 0x5121, 0x513A, 0x5137, 0x513C, + 0x513B, 0x513F, 0x5140, 0x5152, 0x514C, 0x5154, 0x5162, 0x7AF8, + 0x5169, 0x516A, 0x516E, 0x5180, 0x5182, 0x56D8, 0x518C, 0x5189, + 0x518F, 0x5191, 0x5193, 0x5195, 0x5196, 0x51A4, 0x51A6, 0x51A2, + 0x51A9, 0x51AA, 0x51AB, 0x51B3, 0x51B1, 0x51B2, 0x51B0, 0x51B5, + 0x51BD, 0x51C5, 0x51C9, 0x51DB, 0x51E0, 0x8655, 0x51E9, 0x51ED, + 0x51F0, 0x51F5, 0x51FE, 0x5204, 0x520B, 0x5214, 0x520E, 0x5227, + 0x522A, 0x522E, 0x5233, 0x5239, 0x524F, 0x5244, 0x524B, 0x524C, + 0x525E, 0x5254, 0x526A, 0x5274, 0x5269, 0x5273, 0x527F, 0x527D, + 0x528D, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8FA8, +}; +static const unsigned short euc_to_utf8_D2[] = { + 0x8FA7, 0x52AC, 0x52AD, 0x52BC, 0x52B5, 0x52C1, 0x52CD, + 0x52D7, 0x52DE, 0x52E3, 0x52E6, 0x98ED, 0x52E0, 0x52F3, 0x52F5, + 0x52F8, 0x52F9, 0x5306, 0x5308, 0x7538, 0x530D, 0x5310, 0x530F, + 0x5315, 0x531A, 0x5323, 0x532F, 0x5331, 0x5333, 0x5338, 0x5340, + 0x5346, 0x5345, 0x4E17, 0x5349, 0x534D, 0x51D6, 0x535E, 0x5369, + 0x536E, 0x5918, 0x537B, 0x5377, 0x5382, 0x5396, 0x53A0, 0x53A6, + 0x53A5, 0x53AE, 0x53B0, 0x53B6, 0x53C3, 0x7C12, 0x96D9, 0x53DF, + 0x66FC, 0x71EE, 0x53EE, 0x53E8, 0x53ED, 0x53FA, 0x5401, 0x543D, + 0x5440, 0x542C, 0x542D, 0x543C, 0x542E, 0x5436, 0x5429, 0x541D, + 0x544E, 0x548F, 0x5475, 0x548E, 0x545F, 0x5471, 0x5477, 0x5470, + 0x5492, 0x547B, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54C7, + 0x54A2, 0x54B8, 0x54A5, 0x54AC, 0x54C4, 0x54C8, 0x54A8, +}; +static const unsigned short euc_to_utf8_D3[] = { + 0x54AB, 0x54C2, 0x54A4, 0x54BE, 0x54BC, 0x54D8, 0x54E5, + 0x54E6, 0x550F, 0x5514, 0x54FD, 0x54EE, 0x54ED, 0x54FA, 0x54E2, + 0x5539, 0x5540, 0x5563, 0x554C, 0x552E, 0x555C, 0x5545, 0x5556, + 0x5557, 0x5538, 0x5533, 0x555D, 0x5599, 0x5580, 0x54AF, 0x558A, + 0x559F, 0x557B, 0x557E, 0x5598, 0x559E, 0x55AE, 0x557C, 0x5583, + 0x55A9, 0x5587, 0x55A8, 0x55DA, 0x55C5, 0x55DF, 0x55C4, 0x55DC, + 0x55E4, 0x55D4, 0x5614, 0x55F7, 0x5616, 0x55FE, 0x55FD, 0x561B, + 0x55F9, 0x564E, 0x5650, 0x71DF, 0x5634, 0x5636, 0x5632, 0x5638, + 0x566B, 0x5664, 0x562F, 0x566C, 0x566A, 0x5686, 0x5680, 0x568A, + 0x56A0, 0x5694, 0x568F, 0x56A5, 0x56AE, 0x56B6, 0x56B4, 0x56C2, + 0x56BC, 0x56C1, 0x56C3, 0x56C0, 0x56C8, 0x56CE, 0x56D1, 0x56D3, + 0x56D7, 0x56EE, 0x56F9, 0x5700, 0x56FF, 0x5704, 0x5709, +}; +static const unsigned short euc_to_utf8_D4[] = { + 0x5708, 0x570B, 0x570D, 0x5713, 0x5718, 0x5716, 0x55C7, + 0x571C, 0x5726, 0x5737, 0x5738, 0x574E, 0x573B, 0x5740, 0x574F, + 0x5769, 0x57C0, 0x5788, 0x5761, 0x577F, 0x5789, 0x5793, 0x57A0, + 0x57B3, 0x57A4, 0x57AA, 0x57B0, 0x57C3, 0x57C6, 0x57D4, 0x57D2, + 0x57D3, 0x580A, 0x57D6, 0x57E3, 0x580B, 0x5819, 0x581D, 0x5872, + 0x5821, 0x5862, 0x584B, 0x5870, 0x6BC0, 0x5852, 0x583D, 0x5879, + 0x5885, 0x58B9, 0x589F, 0x58AB, 0x58BA, 0x58DE, 0x58BB, 0x58B8, + 0x58AE, 0x58C5, 0x58D3, 0x58D1, 0x58D7, 0x58D9, 0x58D8, 0x58E5, + 0x58DC, 0x58E4, 0x58DF, 0x58EF, 0x58FA, 0x58F9, 0x58FB, 0x58FC, + 0x58FD, 0x5902, 0x590A, 0x5910, 0x591B, 0x68A6, 0x5925, 0x592C, + 0x592D, 0x5932, 0x5938, 0x593E, 0x7AD2, 0x5955, 0x5950, 0x594E, + 0x595A, 0x5958, 0x5962, 0x5960, 0x5967, 0x596C, 0x5969, +}; +static const unsigned short euc_to_utf8_D5[] = { + 0x5978, 0x5981, 0x599D, 0x4F5E, 0x4FAB, 0x59A3, 0x59B2, + 0x59C6, 0x59E8, 0x59DC, 0x598D, 0x59D9, 0x59DA, 0x5A25, 0x5A1F, + 0x5A11, 0x5A1C, 0x5A09, 0x5A1A, 0x5A40, 0x5A6C, 0x5A49, 0x5A35, + 0x5A36, 0x5A62, 0x5A6A, 0x5A9A, 0x5ABC, 0x5ABE, 0x5ACB, 0x5AC2, + 0x5ABD, 0x5AE3, 0x5AD7, 0x5AE6, 0x5AE9, 0x5AD6, 0x5AFA, 0x5AFB, + 0x5B0C, 0x5B0B, 0x5B16, 0x5B32, 0x5AD0, 0x5B2A, 0x5B36, 0x5B3E, + 0x5B43, 0x5B45, 0x5B40, 0x5B51, 0x5B55, 0x5B5A, 0x5B5B, 0x5B65, + 0x5B69, 0x5B70, 0x5B73, 0x5B75, 0x5B78, 0x6588, 0x5B7A, 0x5B80, + 0x5B83, 0x5BA6, 0x5BB8, 0x5BC3, 0x5BC7, 0x5BC9, 0x5BD4, 0x5BD0, + 0x5BE4, 0x5BE6, 0x5BE2, 0x5BDE, 0x5BE5, 0x5BEB, 0x5BF0, 0x5BF6, + 0x5BF3, 0x5C05, 0x5C07, 0x5C08, 0x5C0D, 0x5C13, 0x5C20, 0x5C22, + 0x5C28, 0x5C38, 0x5C39, 0x5C41, 0x5C46, 0x5C4E, 0x5C53, +}; +static const unsigned short euc_to_utf8_D6[] = { + 0x5C50, 0x5C4F, 0x5B71, 0x5C6C, 0x5C6E, 0x4E62, 0x5C76, + 0x5C79, 0x5C8C, 0x5C91, 0x5C94, 0x599B, 0x5CAB, 0x5CBB, 0x5CB6, + 0x5CBC, 0x5CB7, 0x5CC5, 0x5CBE, 0x5CC7, 0x5CD9, 0x5CE9, 0x5CFD, + 0x5CFA, 0x5CED, 0x5D8C, 0x5CEA, 0x5D0B, 0x5D15, 0x5D17, 0x5D5C, + 0x5D1F, 0x5D1B, 0x5D11, 0x5D14, 0x5D22, 0x5D1A, 0x5D19, 0x5D18, + 0x5D4C, 0x5D52, 0x5D4E, 0x5D4B, 0x5D6C, 0x5D73, 0x5D76, 0x5D87, + 0x5D84, 0x5D82, 0x5DA2, 0x5D9D, 0x5DAC, 0x5DAE, 0x5DBD, 0x5D90, + 0x5DB7, 0x5DBC, 0x5DC9, 0x5DCD, 0x5DD3, 0x5DD2, 0x5DD6, 0x5DDB, + 0x5DEB, 0x5DF2, 0x5DF5, 0x5E0B, 0x5E1A, 0x5E19, 0x5E11, 0x5E1B, + 0x5E36, 0x5E37, 0x5E44, 0x5E43, 0x5E40, 0x5E4E, 0x5E57, 0x5E54, + 0x5E5F, 0x5E62, 0x5E64, 0x5E47, 0x5E75, 0x5E76, 0x5E7A, 0x9EBC, + 0x5E7F, 0x5EA0, 0x5EC1, 0x5EC2, 0x5EC8, 0x5ED0, 0x5ECF, +}; +static const unsigned short euc_to_utf8_D7[] = { + 0x5ED6, 0x5EE3, 0x5EDD, 0x5EDA, 0x5EDB, 0x5EE2, 0x5EE1, + 0x5EE8, 0x5EE9, 0x5EEC, 0x5EF1, 0x5EF3, 0x5EF0, 0x5EF4, 0x5EF8, + 0x5EFE, 0x5F03, 0x5F09, 0x5F5D, 0x5F5C, 0x5F0B, 0x5F11, 0x5F16, + 0x5F29, 0x5F2D, 0x5F38, 0x5F41, 0x5F48, 0x5F4C, 0x5F4E, 0x5F2F, + 0x5F51, 0x5F56, 0x5F57, 0x5F59, 0x5F61, 0x5F6D, 0x5F73, 0x5F77, + 0x5F83, 0x5F82, 0x5F7F, 0x5F8A, 0x5F88, 0x5F91, 0x5F87, 0x5F9E, + 0x5F99, 0x5F98, 0x5FA0, 0x5FA8, 0x5FAD, 0x5FBC, 0x5FD6, 0x5FFB, + 0x5FE4, 0x5FF8, 0x5FF1, 0x5FDD, 0x60B3, 0x5FFF, 0x6021, 0x6060, + 0x6019, 0x6010, 0x6029, 0x600E, 0x6031, 0x601B, 0x6015, 0x602B, + 0x6026, 0x600F, 0x603A, 0x605A, 0x6041, 0x606A, 0x6077, 0x605F, + 0x604A, 0x6046, 0x604D, 0x6063, 0x6043, 0x6064, 0x6042, 0x606C, + 0x606B, 0x6059, 0x6081, 0x608D, 0x60E7, 0x6083, 0x609A, +}; +static const unsigned short euc_to_utf8_D8[] = { + 0x6084, 0x609B, 0x6096, 0x6097, 0x6092, 0x60A7, 0x608B, + 0x60E1, 0x60B8, 0x60E0, 0x60D3, 0x60B4, 0x5FF0, 0x60BD, 0x60C6, + 0x60B5, 0x60D8, 0x614D, 0x6115, 0x6106, 0x60F6, 0x60F7, 0x6100, + 0x60F4, 0x60FA, 0x6103, 0x6121, 0x60FB, 0x60F1, 0x610D, 0x610E, + 0x6147, 0x613E, 0x6128, 0x6127, 0x614A, 0x613F, 0x613C, 0x612C, + 0x6134, 0x613D, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, + 0x615A, 0x616B, 0x6174, 0x616F, 0x6165, 0x6171, 0x615F, 0x615D, + 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61AC, 0x6194, 0x619A, + 0x618A, 0x6191, 0x61AB, 0x61AE, 0x61CC, 0x61CA, 0x61C9, 0x61F7, + 0x61C8, 0x61C3, 0x61C6, 0x61BA, 0x61CB, 0x7F79, 0x61CD, 0x61E6, + 0x61E3, 0x61F6, 0x61FA, 0x61F4, 0x61FF, 0x61FD, 0x61FC, 0x61FE, + 0x6200, 0x6208, 0x6209, 0x620D, 0x620C, 0x6214, 0x621B, +}; +static const unsigned short euc_to_utf8_D9[] = { + 0x621E, 0x6221, 0x622A, 0x622E, 0x6230, 0x6232, 0x6233, + 0x6241, 0x624E, 0x625E, 0x6263, 0x625B, 0x6260, 0x6268, 0x627C, + 0x6282, 0x6289, 0x627E, 0x6292, 0x6293, 0x6296, 0x62D4, 0x6283, + 0x6294, 0x62D7, 0x62D1, 0x62BB, 0x62CF, 0x62FF, 0x62C6, 0x64D4, + 0x62C8, 0x62DC, 0x62CC, 0x62CA, 0x62C2, 0x62C7, 0x629B, 0x62C9, + 0x630C, 0x62EE, 0x62F1, 0x6327, 0x6302, 0x6308, 0x62EF, 0x62F5, + 0x6350, 0x633E, 0x634D, 0x641C, 0x634F, 0x6396, 0x638E, 0x6380, + 0x63AB, 0x6376, 0x63A3, 0x638F, 0x6389, 0x639F, 0x63B5, 0x636B, + 0x6369, 0x63BE, 0x63E9, 0x63C0, 0x63C6, 0x63E3, 0x63C9, 0x63D2, + 0x63F6, 0x63C4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, + 0x651D, 0x6417, 0x6428, 0x640F, 0x6467, 0x646F, 0x6476, 0x644E, + 0x652A, 0x6495, 0x6493, 0x64A5, 0x64A9, 0x6488, 0x64BC, +}; +static const unsigned short euc_to_utf8_DA[] = { + 0x64DA, 0x64D2, 0x64C5, 0x64C7, 0x64BB, 0x64D8, 0x64C2, + 0x64F1, 0x64E7, 0x8209, 0x64E0, 0x64E1, 0x62AC, 0x64E3, 0x64EF, + 0x652C, 0x64F6, 0x64F4, 0x64F2, 0x64FA, 0x6500, 0x64FD, 0x6518, + 0x651C, 0x6505, 0x6524, 0x6523, 0x652B, 0x6534, 0x6535, 0x6537, + 0x6536, 0x6538, 0x754B, 0x6548, 0x6556, 0x6555, 0x654D, 0x6558, + 0x655E, 0x655D, 0x6572, 0x6578, 0x6582, 0x6583, 0x8B8A, 0x659B, + 0x659F, 0x65AB, 0x65B7, 0x65C3, 0x65C6, 0x65C1, 0x65C4, 0x65CC, + 0x65D2, 0x65DB, 0x65D9, 0x65E0, 0x65E1, 0x65F1, 0x6772, 0x660A, + 0x6603, 0x65FB, 0x6773, 0x6635, 0x6636, 0x6634, 0x661C, 0x664F, + 0x6644, 0x6649, 0x6641, 0x665E, 0x665D, 0x6664, 0x6667, 0x6668, + 0x665F, 0x6662, 0x6670, 0x6683, 0x6688, 0x668E, 0x6689, 0x6684, + 0x6698, 0x669D, 0x66C1, 0x66B9, 0x66C9, 0x66BE, 0x66BC, +}; +static const unsigned short euc_to_utf8_DB[] = { + 0x66C4, 0x66B8, 0x66D6, 0x66DA, 0x66E0, 0x663F, 0x66E6, + 0x66E9, 0x66F0, 0x66F5, 0x66F7, 0x670F, 0x6716, 0x671E, 0x6726, + 0x6727, 0x9738, 0x672E, 0x673F, 0x6736, 0x6741, 0x6738, 0x6737, + 0x6746, 0x675E, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, + 0x67A9, 0x677C, 0x676A, 0x678C, 0x678B, 0x67A6, 0x67A1, 0x6785, + 0x67B7, 0x67EF, 0x67B4, 0x67EC, 0x67B3, 0x67E9, 0x67B8, 0x67E4, + 0x67DE, 0x67DD, 0x67E2, 0x67EE, 0x67B9, 0x67CE, 0x67C6, 0x67E7, + 0x6A9C, 0x681E, 0x6846, 0x6829, 0x6840, 0x684D, 0x6832, 0x684E, + 0x68B3, 0x682B, 0x6859, 0x6863, 0x6877, 0x687F, 0x689F, 0x688F, + 0x68AD, 0x6894, 0x689D, 0x689B, 0x6883, 0x6AAE, 0x68B9, 0x6874, + 0x68B5, 0x68A0, 0x68BA, 0x690F, 0x688D, 0x687E, 0x6901, 0x68CA, + 0x6908, 0x68D8, 0x6922, 0x6926, 0x68E1, 0x690C, 0x68CD, +}; +static const unsigned short euc_to_utf8_DC[] = { + 0x68D4, 0x68E7, 0x68D5, 0x6936, 0x6912, 0x6904, 0x68D7, + 0x68E3, 0x6925, 0x68F9, 0x68E0, 0x68EF, 0x6928, 0x692A, 0x691A, + 0x6923, 0x6921, 0x68C6, 0x6979, 0x6977, 0x695C, 0x6978, 0x696B, + 0x6954, 0x697E, 0x696E, 0x6939, 0x6974, 0x693D, 0x6959, 0x6930, + 0x6961, 0x695E, 0x695D, 0x6981, 0x696A, 0x69B2, 0x69AE, 0x69D0, + 0x69BF, 0x69C1, 0x69D3, 0x69BE, 0x69CE, 0x5BE8, 0x69CA, 0x69DD, + 0x69BB, 0x69C3, 0x69A7, 0x6A2E, 0x6991, 0x69A0, 0x699C, 0x6995, + 0x69B4, 0x69DE, 0x69E8, 0x6A02, 0x6A1B, 0x69FF, 0x6B0A, 0x69F9, + 0x69F2, 0x69E7, 0x6A05, 0x69B1, 0x6A1E, 0x69ED, 0x6A14, 0x69EB, + 0x6A0A, 0x6A12, 0x6AC1, 0x6A23, 0x6A13, 0x6A44, 0x6A0C, 0x6A72, + 0x6A36, 0x6A78, 0x6A47, 0x6A62, 0x6A59, 0x6A66, 0x6A48, 0x6A38, + 0x6A22, 0x6A90, 0x6A8D, 0x6AA0, 0x6A84, 0x6AA2, 0x6AA3, +}; +static const unsigned short euc_to_utf8_DD[] = { + 0x6A97, 0x8617, 0x6ABB, 0x6AC3, 0x6AC2, 0x6AB8, 0x6AB3, + 0x6AAC, 0x6ADE, 0x6AD1, 0x6ADF, 0x6AAA, 0x6ADA, 0x6AEA, 0x6AFB, + 0x6B05, 0x8616, 0x6AFA, 0x6B12, 0x6B16, 0x9B31, 0x6B1F, 0x6B38, + 0x6B37, 0x76DC, 0x6B39, 0x98EE, 0x6B47, 0x6B43, 0x6B49, 0x6B50, + 0x6B59, 0x6B54, 0x6B5B, 0x6B5F, 0x6B61, 0x6B78, 0x6B79, 0x6B7F, + 0x6B80, 0x6B84, 0x6B83, 0x6B8D, 0x6B98, 0x6B95, 0x6B9E, 0x6BA4, + 0x6BAA, 0x6BAB, 0x6BAF, 0x6BB2, 0x6BB1, 0x6BB3, 0x6BB7, 0x6BBC, + 0x6BC6, 0x6BCB, 0x6BD3, 0x6BDF, 0x6BEC, 0x6BEB, 0x6BF3, 0x6BEF, + 0x9EBE, 0x6C08, 0x6C13, 0x6C14, 0x6C1B, 0x6C24, 0x6C23, 0x6C5E, + 0x6C55, 0x6C62, 0x6C6A, 0x6C82, 0x6C8D, 0x6C9A, 0x6C81, 0x6C9B, + 0x6C7E, 0x6C68, 0x6C73, 0x6C92, 0x6C90, 0x6CC4, 0x6CF1, 0x6CD3, + 0x6CBD, 0x6CD7, 0x6CC5, 0x6CDD, 0x6CAE, 0x6CB1, 0x6CBE, +}; +static const unsigned short euc_to_utf8_DE[] = { + 0x6CBA, 0x6CDB, 0x6CEF, 0x6CD9, 0x6CEA, 0x6D1F, 0x884D, + 0x6D36, 0x6D2B, 0x6D3D, 0x6D38, 0x6D19, 0x6D35, 0x6D33, 0x6D12, + 0x6D0C, 0x6D63, 0x6D93, 0x6D64, 0x6D5A, 0x6D79, 0x6D59, 0x6D8E, + 0x6D95, 0x6FE4, 0x6D85, 0x6DF9, 0x6E15, 0x6E0A, 0x6DB5, 0x6DC7, + 0x6DE6, 0x6DB8, 0x6DC6, 0x6DEC, 0x6DDE, 0x6DCC, 0x6DE8, 0x6DD2, + 0x6DC5, 0x6DFA, 0x6DD9, 0x6DE4, 0x6DD5, 0x6DEA, 0x6DEE, 0x6E2D, + 0x6E6E, 0x6E2E, 0x6E19, 0x6E72, 0x6E5F, 0x6E3E, 0x6E23, 0x6E6B, + 0x6E2B, 0x6E76, 0x6E4D, 0x6E1F, 0x6E43, 0x6E3A, 0x6E4E, 0x6E24, + 0x6EFF, 0x6E1D, 0x6E38, 0x6E82, 0x6EAA, 0x6E98, 0x6EC9, 0x6EB7, + 0x6ED3, 0x6EBD, 0x6EAF, 0x6EC4, 0x6EB2, 0x6ED4, 0x6ED5, 0x6E8F, + 0x6EA5, 0x6EC2, 0x6E9F, 0x6F41, 0x6F11, 0x704C, 0x6EEC, 0x6EF8, + 0x6EFE, 0x6F3F, 0x6EF2, 0x6F31, 0x6EEF, 0x6F32, 0x6ECC, +}; +static const unsigned short euc_to_utf8_DF[] = { + 0x6F3E, 0x6F13, 0x6EF7, 0x6F86, 0x6F7A, 0x6F78, 0x6F81, + 0x6F80, 0x6F6F, 0x6F5B, 0x6FF3, 0x6F6D, 0x6F82, 0x6F7C, 0x6F58, + 0x6F8E, 0x6F91, 0x6FC2, 0x6F66, 0x6FB3, 0x6FA3, 0x6FA1, 0x6FA4, + 0x6FB9, 0x6FC6, 0x6FAA, 0x6FDF, 0x6FD5, 0x6FEC, 0x6FD4, 0x6FD8, + 0x6FF1, 0x6FEE, 0x6FDB, 0x7009, 0x700B, 0x6FFA, 0x7011, 0x7001, + 0x700F, 0x6FFE, 0x701B, 0x701A, 0x6F74, 0x701D, 0x7018, 0x701F, + 0x7030, 0x703E, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70AF, + 0x70F1, 0x70AC, 0x70B8, 0x70B3, 0x70AE, 0x70DF, 0x70CB, 0x70DD, + 0x70D9, 0x7109, 0x70FD, 0x711C, 0x7119, 0x7165, 0x7155, 0x7188, + 0x7166, 0x7162, 0x714C, 0x7156, 0x716C, 0x718F, 0x71FB, 0x7184, + 0x7195, 0x71A8, 0x71AC, 0x71D7, 0x71B9, 0x71BE, 0x71D2, 0x71C9, + 0x71D4, 0x71CE, 0x71E0, 0x71EC, 0x71E7, 0x71F5, 0x71FC, +}; +static const unsigned short euc_to_utf8_E0[] = { + 0x71F9, 0x71FF, 0x720D, 0x7210, 0x721B, 0x7228, 0x722D, + 0x722C, 0x7230, 0x7232, 0x723B, 0x723C, 0x723F, 0x7240, 0x7246, + 0x724B, 0x7258, 0x7274, 0x727E, 0x7282, 0x7281, 0x7287, 0x7292, + 0x7296, 0x72A2, 0x72A7, 0x72B9, 0x72B2, 0x72C3, 0x72C6, 0x72C4, + 0x72CE, 0x72D2, 0x72E2, 0x72E0, 0x72E1, 0x72F9, 0x72F7, 0x500F, + 0x7317, 0x730A, 0x731C, 0x7316, 0x731D, 0x7334, 0x732F, 0x7329, + 0x7325, 0x733E, 0x734E, 0x734F, 0x9ED8, 0x7357, 0x736A, 0x7368, + 0x7370, 0x7378, 0x7375, 0x737B, 0x737A, 0x73C8, 0x73B3, 0x73CE, + 0x73BB, 0x73C0, 0x73E5, 0x73EE, 0x73DE, 0x74A2, 0x7405, 0x746F, + 0x7425, 0x73F8, 0x7432, 0x743A, 0x7455, 0x743F, 0x745F, 0x7459, + 0x7441, 0x745C, 0x7469, 0x7470, 0x7463, 0x746A, 0x7476, 0x747E, + 0x748B, 0x749E, 0x74A7, 0x74CA, 0x74CF, 0x74D4, 0x73F1, +}; +static const unsigned short euc_to_utf8_E1[] = { + 0x74E0, 0x74E3, 0x74E7, 0x74E9, 0x74EE, 0x74F2, 0x74F0, + 0x74F1, 0x74F8, 0x74F7, 0x7504, 0x7503, 0x7505, 0x750C, 0x750E, + 0x750D, 0x7515, 0x7513, 0x751E, 0x7526, 0x752C, 0x753C, 0x7544, + 0x754D, 0x754A, 0x7549, 0x755B, 0x7546, 0x755A, 0x7569, 0x7564, + 0x7567, 0x756B, 0x756D, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, + 0x758A, 0x7589, 0x7582, 0x7594, 0x759A, 0x759D, 0x75A5, 0x75A3, + 0x75C2, 0x75B3, 0x75C3, 0x75B5, 0x75BD, 0x75B8, 0x75BC, 0x75B1, + 0x75CD, 0x75CA, 0x75D2, 0x75D9, 0x75E3, 0x75DE, 0x75FE, 0x75FF, + 0x75FC, 0x7601, 0x75F0, 0x75FA, 0x75F2, 0x75F3, 0x760B, 0x760D, + 0x7609, 0x761F, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, + 0x7630, 0x763B, 0x7647, 0x7648, 0x7646, 0x765C, 0x7658, 0x7661, + 0x7662, 0x7668, 0x7669, 0x766A, 0x7667, 0x766C, 0x7670, +}; +static const unsigned short euc_to_utf8_E2[] = { + 0x7672, 0x7676, 0x7678, 0x767C, 0x7680, 0x7683, 0x7688, + 0x768B, 0x768E, 0x7696, 0x7693, 0x7699, 0x769A, 0x76B0, 0x76B4, + 0x76B8, 0x76B9, 0x76BA, 0x76C2, 0x76CD, 0x76D6, 0x76D2, 0x76DE, + 0x76E1, 0x76E5, 0x76E7, 0x76EA, 0x862F, 0x76FB, 0x7708, 0x7707, + 0x7704, 0x7729, 0x7724, 0x771E, 0x7725, 0x7726, 0x771B, 0x7737, + 0x7738, 0x7747, 0x775A, 0x7768, 0x776B, 0x775B, 0x7765, 0x777F, + 0x777E, 0x7779, 0x778E, 0x778B, 0x7791, 0x77A0, 0x779E, 0x77B0, + 0x77B6, 0x77B9, 0x77BF, 0x77BC, 0x77BD, 0x77BB, 0x77C7, 0x77CD, + 0x77D7, 0x77DA, 0x77DC, 0x77E3, 0x77EE, 0x77FC, 0x780C, 0x7812, + 0x7926, 0x7820, 0x792A, 0x7845, 0x788E, 0x7874, 0x7886, 0x787C, + 0x789A, 0x788C, 0x78A3, 0x78B5, 0x78AA, 0x78AF, 0x78D1, 0x78C6, + 0x78CB, 0x78D4, 0x78BE, 0x78BC, 0x78C5, 0x78CA, 0x78EC, +}; +static const unsigned short euc_to_utf8_E3[] = { + 0x78E7, 0x78DA, 0x78FD, 0x78F4, 0x7907, 0x7912, 0x7911, + 0x7919, 0x792C, 0x792B, 0x7940, 0x7960, 0x7957, 0x795F, 0x795A, + 0x7955, 0x7953, 0x797A, 0x797F, 0x798A, 0x799D, 0x79A7, 0x9F4B, + 0x79AA, 0x79AE, 0x79B3, 0x79B9, 0x79BA, 0x79C9, 0x79D5, 0x79E7, + 0x79EC, 0x79E1, 0x79E3, 0x7A08, 0x7A0D, 0x7A18, 0x7A19, 0x7A20, + 0x7A1F, 0x7980, 0x7A31, 0x7A3B, 0x7A3E, 0x7A37, 0x7A43, 0x7A57, + 0x7A49, 0x7A61, 0x7A62, 0x7A69, 0x9F9D, 0x7A70, 0x7A79, 0x7A7D, + 0x7A88, 0x7A97, 0x7A95, 0x7A98, 0x7A96, 0x7AA9, 0x7AC8, 0x7AB0, + 0x7AB6, 0x7AC5, 0x7AC4, 0x7ABF, 0x9083, 0x7AC7, 0x7ACA, 0x7ACD, + 0x7ACF, 0x7AD5, 0x7AD3, 0x7AD9, 0x7ADA, 0x7ADD, 0x7AE1, 0x7AE2, + 0x7AE6, 0x7AED, 0x7AF0, 0x7B02, 0x7B0F, 0x7B0A, 0x7B06, 0x7B33, + 0x7B18, 0x7B19, 0x7B1E, 0x7B35, 0x7B28, 0x7B36, 0x7B50, +}; +static const unsigned short euc_to_utf8_E4[] = { + 0x7B7A, 0x7B04, 0x7B4D, 0x7B0B, 0x7B4C, 0x7B45, 0x7B75, + 0x7B65, 0x7B74, 0x7B67, 0x7B70, 0x7B71, 0x7B6C, 0x7B6E, 0x7B9D, + 0x7B98, 0x7B9F, 0x7B8D, 0x7B9C, 0x7B9A, 0x7B8B, 0x7B92, 0x7B8F, + 0x7B5D, 0x7B99, 0x7BCB, 0x7BC1, 0x7BCC, 0x7BCF, 0x7BB4, 0x7BC6, + 0x7BDD, 0x7BE9, 0x7C11, 0x7C14, 0x7BE6, 0x7BE5, 0x7C60, 0x7C00, + 0x7C07, 0x7C13, 0x7BF3, 0x7BF7, 0x7C17, 0x7C0D, 0x7BF6, 0x7C23, + 0x7C27, 0x7C2A, 0x7C1F, 0x7C37, 0x7C2B, 0x7C3D, 0x7C4C, 0x7C43, + 0x7C54, 0x7C4F, 0x7C40, 0x7C50, 0x7C58, 0x7C5F, 0x7C64, 0x7C56, + 0x7C65, 0x7C6C, 0x7C75, 0x7C83, 0x7C90, 0x7CA4, 0x7CAD, 0x7CA2, + 0x7CAB, 0x7CA1, 0x7CA8, 0x7CB3, 0x7CB2, 0x7CB1, 0x7CAE, 0x7CB9, + 0x7CBD, 0x7CC0, 0x7CC5, 0x7CC2, 0x7CD8, 0x7CD2, 0x7CDC, 0x7CE2, + 0x9B3B, 0x7CEF, 0x7CF2, 0x7CF4, 0x7CF6, 0x7CFA, 0x7D06, +}; +static const unsigned short euc_to_utf8_E5[] = { + 0x7D02, 0x7D1C, 0x7D15, 0x7D0A, 0x7D45, 0x7D4B, 0x7D2E, + 0x7D32, 0x7D3F, 0x7D35, 0x7D46, 0x7D73, 0x7D56, 0x7D4E, 0x7D72, + 0x7D68, 0x7D6E, 0x7D4F, 0x7D63, 0x7D93, 0x7D89, 0x7D5B, 0x7D8F, + 0x7D7D, 0x7D9B, 0x7DBA, 0x7DAE, 0x7DA3, 0x7DB5, 0x7DC7, 0x7DBD, + 0x7DAB, 0x7E3D, 0x7DA2, 0x7DAF, 0x7DDC, 0x7DB8, 0x7D9F, 0x7DB0, + 0x7DD8, 0x7DDD, 0x7DE4, 0x7DDE, 0x7DFB, 0x7DF2, 0x7DE1, 0x7E05, + 0x7E0A, 0x7E23, 0x7E21, 0x7E12, 0x7E31, 0x7E1F, 0x7E09, 0x7E0B, + 0x7E22, 0x7E46, 0x7E66, 0x7E3B, 0x7E35, 0x7E39, 0x7E43, 0x7E37, + 0x7E32, 0x7E3A, 0x7E67, 0x7E5D, 0x7E56, 0x7E5E, 0x7E59, 0x7E5A, + 0x7E79, 0x7E6A, 0x7E69, 0x7E7C, 0x7E7B, 0x7E83, 0x7DD5, 0x7E7D, + 0x8FAE, 0x7E7F, 0x7E88, 0x7E89, 0x7E8C, 0x7E92, 0x7E90, 0x7E93, + 0x7E94, 0x7E96, 0x7E8E, 0x7E9B, 0x7E9C, 0x7F38, 0x7F3A, +}; +static const unsigned short euc_to_utf8_E6[] = { + 0x7F45, 0x7F4C, 0x7F4D, 0x7F4E, 0x7F50, 0x7F51, 0x7F55, + 0x7F54, 0x7F58, 0x7F5F, 0x7F60, 0x7F68, 0x7F69, 0x7F67, 0x7F78, + 0x7F82, 0x7F86, 0x7F83, 0x7F88, 0x7F87, 0x7F8C, 0x7F94, 0x7F9E, + 0x7F9D, 0x7F9A, 0x7FA3, 0x7FAF, 0x7FB2, 0x7FB9, 0x7FAE, 0x7FB6, + 0x7FB8, 0x8B71, 0x7FC5, 0x7FC6, 0x7FCA, 0x7FD5, 0x7FD4, 0x7FE1, + 0x7FE6, 0x7FE9, 0x7FF3, 0x7FF9, 0x98DC, 0x8006, 0x8004, 0x800B, + 0x8012, 0x8018, 0x8019, 0x801C, 0x8021, 0x8028, 0x803F, 0x803B, + 0x804A, 0x8046, 0x8052, 0x8058, 0x805A, 0x805F, 0x8062, 0x8068, + 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807D, 0x807F, 0x8084, + 0x8086, 0x8085, 0x809B, 0x8093, 0x809A, 0x80AD, 0x5190, 0x80AC, + 0x80DB, 0x80E5, 0x80D9, 0x80DD, 0x80C4, 0x80DA, 0x80D6, 0x8109, + 0x80EF, 0x80F1, 0x811B, 0x8129, 0x8123, 0x812F, 0x814B, +}; +static const unsigned short euc_to_utf8_E7[] = { + 0x968B, 0x8146, 0x813E, 0x8153, 0x8151, 0x80FC, 0x8171, + 0x816E, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818A, 0x8180, + 0x8182, 0x81A0, 0x8195, 0x81A4, 0x81A3, 0x815F, 0x8193, 0x81A9, + 0x81B0, 0x81B5, 0x81BE, 0x81B8, 0x81BD, 0x81C0, 0x81C2, 0x81BA, + 0x81C9, 0x81CD, 0x81D1, 0x81D9, 0x81D8, 0x81C8, 0x81DA, 0x81DF, + 0x81E0, 0x81E7, 0x81FA, 0x81FB, 0x81FE, 0x8201, 0x8202, 0x8205, + 0x8207, 0x820A, 0x820D, 0x8210, 0x8216, 0x8229, 0x822B, 0x8238, + 0x8233, 0x8240, 0x8259, 0x8258, 0x825D, 0x825A, 0x825F, 0x8264, + 0x8262, 0x8268, 0x826A, 0x826B, 0x822E, 0x8271, 0x8277, 0x8278, + 0x827E, 0x828D, 0x8292, 0x82AB, 0x829F, 0x82BB, 0x82AC, 0x82E1, + 0x82E3, 0x82DF, 0x82D2, 0x82F4, 0x82F3, 0x82FA, 0x8393, 0x8303, + 0x82FB, 0x82F9, 0x82DE, 0x8306, 0x82DC, 0x8309, 0x82D9, +}; +static const unsigned short euc_to_utf8_E8[] = { + 0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, + 0x8350, 0x8345, 0x832F, 0x832B, 0x8317, 0x8318, 0x8385, 0x839A, + 0x83AA, 0x839F, 0x83A2, 0x8396, 0x8323, 0x838E, 0x8387, 0x838A, + 0x837C, 0x83B5, 0x8373, 0x8375, 0x83A0, 0x8389, 0x83A8, 0x83F4, + 0x8413, 0x83EB, 0x83CE, 0x83FD, 0x8403, 0x83D8, 0x840B, 0x83C1, + 0x83F7, 0x8407, 0x83E0, 0x83F2, 0x840D, 0x8422, 0x8420, 0x83BD, + 0x8438, 0x8506, 0x83FB, 0x846D, 0x842A, 0x843C, 0x855A, 0x8484, + 0x8477, 0x846B, 0x84AD, 0x846E, 0x8482, 0x8469, 0x8446, 0x842C, + 0x846F, 0x8479, 0x8435, 0x84CA, 0x8462, 0x84B9, 0x84BF, 0x849F, + 0x84D9, 0x84CD, 0x84BB, 0x84DA, 0x84D0, 0x84C1, 0x84C6, 0x84D6, + 0x84A1, 0x8521, 0x84FF, 0x84F4, 0x8517, 0x8518, 0x852C, 0x851F, + 0x8515, 0x8514, 0x84FC, 0x8540, 0x8563, 0x8558, 0x8548, +}; +static const unsigned short euc_to_utf8_E9[] = { + 0x8541, 0x8602, 0x854B, 0x8555, 0x8580, 0x85A4, 0x8588, + 0x8591, 0x858A, 0x85A8, 0x856D, 0x8594, 0x859B, 0x85EA, 0x8587, + 0x859C, 0x8577, 0x857E, 0x8590, 0x85C9, 0x85BA, 0x85CF, 0x85B9, + 0x85D0, 0x85D5, 0x85DD, 0x85E5, 0x85DC, 0x85F9, 0x860A, 0x8613, + 0x860B, 0x85FE, 0x85FA, 0x8606, 0x8622, 0x861A, 0x8630, 0x863F, + 0x864D, 0x4E55, 0x8654, 0x865F, 0x8667, 0x8671, 0x8693, 0x86A3, + 0x86A9, 0x86AA, 0x868B, 0x868C, 0x86B6, 0x86AF, 0x86C4, 0x86C6, + 0x86B0, 0x86C9, 0x8823, 0x86AB, 0x86D4, 0x86DE, 0x86E9, 0x86EC, + 0x86DF, 0x86DB, 0x86EF, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, + 0x86FB, 0x8711, 0x8709, 0x870D, 0x86F9, 0x870A, 0x8734, 0x873F, + 0x8737, 0x873B, 0x8725, 0x8729, 0x871A, 0x8760, 0x875F, 0x8778, + 0x874C, 0x874E, 0x8774, 0x8757, 0x8768, 0x876E, 0x8759, +}; +static const unsigned short euc_to_utf8_EA[] = { + 0x8753, 0x8763, 0x876A, 0x8805, 0x87A2, 0x879F, 0x8782, + 0x87AF, 0x87CB, 0x87BD, 0x87C0, 0x87D0, 0x96D6, 0x87AB, 0x87C4, + 0x87B3, 0x87C7, 0x87C6, 0x87BB, 0x87EF, 0x87F2, 0x87E0, 0x880F, + 0x880D, 0x87FE, 0x87F6, 0x87F7, 0x880E, 0x87D2, 0x8811, 0x8816, + 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883B, + 0x8844, 0x8842, 0x8852, 0x8859, 0x885E, 0x8862, 0x886B, 0x8881, + 0x887E, 0x889E, 0x8875, 0x887D, 0x88B5, 0x8872, 0x8882, 0x8897, + 0x8892, 0x88AE, 0x8899, 0x88A2, 0x888D, 0x88A4, 0x88B0, 0x88BF, + 0x88B1, 0x88C3, 0x88C4, 0x88D4, 0x88D8, 0x88D9, 0x88DD, 0x88F9, + 0x8902, 0x88FC, 0x88F4, 0x88E8, 0x88F2, 0x8904, 0x890C, 0x890A, + 0x8913, 0x8943, 0x891E, 0x8925, 0x892A, 0x892B, 0x8941, 0x8944, + 0x893B, 0x8936, 0x8938, 0x894C, 0x891D, 0x8960, 0x895E, +}; +static const unsigned short euc_to_utf8_EB[] = { + 0x8966, 0x8964, 0x896D, 0x896A, 0x896F, 0x8974, 0x8977, + 0x897E, 0x8983, 0x8988, 0x898A, 0x8993, 0x8998, 0x89A1, 0x89A9, + 0x89A6, 0x89AC, 0x89AF, 0x89B2, 0x89BA, 0x89BD, 0x89BF, 0x89C0, + 0x89DA, 0x89DC, 0x89DD, 0x89E7, 0x89F4, 0x89F8, 0x8A03, 0x8A16, + 0x8A10, 0x8A0C, 0x8A1B, 0x8A1D, 0x8A25, 0x8A36, 0x8A41, 0x8A5B, + 0x8A52, 0x8A46, 0x8A48, 0x8A7C, 0x8A6D, 0x8A6C, 0x8A62, 0x8A85, + 0x8A82, 0x8A84, 0x8AA8, 0x8AA1, 0x8A91, 0x8AA5, 0x8AA6, 0x8A9A, + 0x8AA3, 0x8AC4, 0x8ACD, 0x8AC2, 0x8ADA, 0x8AEB, 0x8AF3, 0x8AE7, + 0x8AE4, 0x8AF1, 0x8B14, 0x8AE0, 0x8AE2, 0x8AF7, 0x8ADE, 0x8ADB, + 0x8B0C, 0x8B07, 0x8B1A, 0x8AE1, 0x8B16, 0x8B10, 0x8B17, 0x8B20, + 0x8B33, 0x97AB, 0x8B26, 0x8B2B, 0x8B3E, 0x8B28, 0x8B41, 0x8B4C, + 0x8B4F, 0x8B4E, 0x8B49, 0x8B56, 0x8B5B, 0x8B5A, 0x8B6B, +}; +static const unsigned short euc_to_utf8_EC[] = { + 0x8B5F, 0x8B6C, 0x8B6F, 0x8B74, 0x8B7D, 0x8B80, 0x8B8C, + 0x8B8E, 0x8B92, 0x8B93, 0x8B96, 0x8B99, 0x8B9A, 0x8C3A, 0x8C41, + 0x8C3F, 0x8C48, 0x8C4C, 0x8C4E, 0x8C50, 0x8C55, 0x8C62, 0x8C6C, + 0x8C78, 0x8C7A, 0x8C82, 0x8C89, 0x8C85, 0x8C8A, 0x8C8D, 0x8C8E, + 0x8C94, 0x8C7C, 0x8C98, 0x621D, 0x8CAD, 0x8CAA, 0x8CBD, 0x8CB2, + 0x8CB3, 0x8CAE, 0x8CB6, 0x8CC8, 0x8CC1, 0x8CE4, 0x8CE3, 0x8CDA, + 0x8CFD, 0x8CFA, 0x8CFB, 0x8D04, 0x8D05, 0x8D0A, 0x8D07, 0x8D0F, + 0x8D0D, 0x8D10, 0x9F4E, 0x8D13, 0x8CCD, 0x8D14, 0x8D16, 0x8D67, + 0x8D6D, 0x8D71, 0x8D73, 0x8D81, 0x8D99, 0x8DC2, 0x8DBE, 0x8DBA, + 0x8DCF, 0x8DDA, 0x8DD6, 0x8DCC, 0x8DDB, 0x8DCB, 0x8DEA, 0x8DEB, + 0x8DDF, 0x8DE3, 0x8DFC, 0x8E08, 0x8E09, 0x8DFF, 0x8E1D, 0x8E1E, + 0x8E10, 0x8E1F, 0x8E42, 0x8E35, 0x8E30, 0x8E34, 0x8E4A, +}; +static const unsigned short euc_to_utf8_ED[] = { + 0x8E47, 0x8E49, 0x8E4C, 0x8E50, 0x8E48, 0x8E59, 0x8E64, + 0x8E60, 0x8E2A, 0x8E63, 0x8E55, 0x8E76, 0x8E72, 0x8E7C, 0x8E81, + 0x8E87, 0x8E85, 0x8E84, 0x8E8B, 0x8E8A, 0x8E93, 0x8E91, 0x8E94, + 0x8E99, 0x8EAA, 0x8EA1, 0x8EAC, 0x8EB0, 0x8EC6, 0x8EB1, 0x8EBE, + 0x8EC5, 0x8EC8, 0x8ECB, 0x8EDB, 0x8EE3, 0x8EFC, 0x8EFB, 0x8EEB, + 0x8EFE, 0x8F0A, 0x8F05, 0x8F15, 0x8F12, 0x8F19, 0x8F13, 0x8F1C, + 0x8F1F, 0x8F1B, 0x8F0C, 0x8F26, 0x8F33, 0x8F3B, 0x8F39, 0x8F45, + 0x8F42, 0x8F3E, 0x8F4C, 0x8F49, 0x8F46, 0x8F4E, 0x8F57, 0x8F5C, + 0x8F62, 0x8F63, 0x8F64, 0x8F9C, 0x8F9F, 0x8FA3, 0x8FAD, 0x8FAF, + 0x8FB7, 0x8FDA, 0x8FE5, 0x8FE2, 0x8FEA, 0x8FEF, 0x9087, 0x8FF4, + 0x9005, 0x8FF9, 0x8FFA, 0x9011, 0x9015, 0x9021, 0x900D, 0x901E, + 0x9016, 0x900B, 0x9027, 0x9036, 0x9035, 0x9039, 0x8FF8, +}; +static const unsigned short euc_to_utf8_EE[] = { + 0x904F, 0x9050, 0x9051, 0x9052, 0x900E, 0x9049, 0x903E, + 0x9056, 0x9058, 0x905E, 0x9068, 0x906F, 0x9076, 0x96A8, 0x9072, + 0x9082, 0x907D, 0x9081, 0x9080, 0x908A, 0x9089, 0x908F, 0x90A8, + 0x90AF, 0x90B1, 0x90B5, 0x90E2, 0x90E4, 0x6248, 0x90DB, 0x9102, + 0x9112, 0x9119, 0x9132, 0x9130, 0x914A, 0x9156, 0x9158, 0x9163, + 0x9165, 0x9169, 0x9173, 0x9172, 0x918B, 0x9189, 0x9182, 0x91A2, + 0x91AB, 0x91AF, 0x91AA, 0x91B5, 0x91B4, 0x91BA, 0x91C0, 0x91C1, + 0x91C9, 0x91CB, 0x91D0, 0x91D6, 0x91DF, 0x91E1, 0x91DB, 0x91FC, + 0x91F5, 0x91F6, 0x921E, 0x91FF, 0x9214, 0x922C, 0x9215, 0x9211, + 0x925E, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923F, + 0x924B, 0x9250, 0x929C, 0x9296, 0x9293, 0x929B, 0x925A, 0x92CF, + 0x92B9, 0x92B7, 0x92E9, 0x930F, 0x92FA, 0x9344, 0x932E, +}; +static const unsigned short euc_to_utf8_EF[] = { + 0x9319, 0x9322, 0x931A, 0x9323, 0x933A, 0x9335, 0x933B, + 0x935C, 0x9360, 0x937C, 0x936E, 0x9356, 0x93B0, 0x93AC, 0x93AD, + 0x9394, 0x93B9, 0x93D6, 0x93D7, 0x93E8, 0x93E5, 0x93D8, 0x93C3, + 0x93DD, 0x93D0, 0x93C8, 0x93E4, 0x941A, 0x9414, 0x9413, 0x9403, + 0x9407, 0x9410, 0x9436, 0x942B, 0x9435, 0x9421, 0x943A, 0x9441, + 0x9452, 0x9444, 0x945B, 0x9460, 0x9462, 0x945E, 0x946A, 0x9229, + 0x9470, 0x9475, 0x9477, 0x947D, 0x945A, 0x947C, 0x947E, 0x9481, + 0x947F, 0x9582, 0x9587, 0x958A, 0x9594, 0x9596, 0x9598, 0x9599, + 0x95A0, 0x95A8, 0x95A7, 0x95AD, 0x95BC, 0x95BB, 0x95B9, 0x95BE, + 0x95CA, 0x6FF6, 0x95C3, 0x95CD, 0x95CC, 0x95D5, 0x95D4, 0x95D6, + 0x95DC, 0x95E1, 0x95E5, 0x95E2, 0x9621, 0x9628, 0x962E, 0x962F, + 0x9642, 0x964C, 0x964F, 0x964B, 0x9677, 0x965C, 0x965E, +}; +static const unsigned short euc_to_utf8_F0[] = { + 0x965D, 0x965F, 0x9666, 0x9672, 0x966C, 0x968D, 0x9698, + 0x9695, 0x9697, 0x96AA, 0x96A7, 0x96B1, 0x96B2, 0x96B0, 0x96B4, + 0x96B6, 0x96B8, 0x96B9, 0x96CE, 0x96CB, 0x96C9, 0x96CD, 0x894D, + 0x96DC, 0x970D, 0x96D5, 0x96F9, 0x9704, 0x9706, 0x9708, 0x9713, + 0x970E, 0x9711, 0x970F, 0x9716, 0x9719, 0x9724, 0x972A, 0x9730, + 0x9739, 0x973D, 0x973E, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, + 0x975C, 0x9760, 0x9764, 0x9766, 0x9768, 0x52D2, 0x976B, 0x9771, + 0x9779, 0x9785, 0x977C, 0x9781, 0x977A, 0x9786, 0x978B, 0x978F, + 0x9790, 0x979C, 0x97A8, 0x97A6, 0x97A3, 0x97B3, 0x97B4, 0x97C3, + 0x97C6, 0x97C8, 0x97CB, 0x97DC, 0x97ED, 0x9F4F, 0x97F2, 0x7ADF, + 0x97F6, 0x97F5, 0x980F, 0x980C, 0x9838, 0x9824, 0x9821, 0x9837, + 0x983D, 0x9846, 0x984F, 0x984B, 0x986B, 0x986F, 0x9870, +}; +static const unsigned short euc_to_utf8_F1[] = { + 0x9871, 0x9874, 0x9873, 0x98AA, 0x98AF, 0x98B1, 0x98B6, + 0x98C4, 0x98C3, 0x98C6, 0x98E9, 0x98EB, 0x9903, 0x9909, 0x9912, + 0x9914, 0x9918, 0x9921, 0x991D, 0x991E, 0x9924, 0x9920, 0x992C, + 0x992E, 0x993D, 0x993E, 0x9942, 0x9949, 0x9945, 0x9950, 0x994B, + 0x9951, 0x9952, 0x994C, 0x9955, 0x9997, 0x9998, 0x99A5, 0x99AD, + 0x99AE, 0x99BC, 0x99DF, 0x99DB, 0x99DD, 0x99D8, 0x99D1, 0x99ED, + 0x99EE, 0x99F1, 0x99F2, 0x99FB, 0x99F8, 0x9A01, 0x9A0F, 0x9A05, + 0x99E2, 0x9A19, 0x9A2B, 0x9A37, 0x9A45, 0x9A42, 0x9A40, 0x9A43, + 0x9A3E, 0x9A55, 0x9A4D, 0x9A5B, 0x9A57, 0x9A5F, 0x9A62, 0x9A65, + 0x9A64, 0x9A69, 0x9A6B, 0x9A6A, 0x9AAD, 0x9AB0, 0x9ABC, 0x9AC0, + 0x9ACF, 0x9AD1, 0x9AD3, 0x9AD4, 0x9ADE, 0x9ADF, 0x9AE2, 0x9AE3, + 0x9AE6, 0x9AEF, 0x9AEB, 0x9AEE, 0x9AF4, 0x9AF1, 0x9AF7, +}; +static const unsigned short euc_to_utf8_F2[] = { + 0x9AFB, 0x9B06, 0x9B18, 0x9B1A, 0x9B1F, 0x9B22, 0x9B23, + 0x9B25, 0x9B27, 0x9B28, 0x9B29, 0x9B2A, 0x9B2E, 0x9B2F, 0x9B32, + 0x9B44, 0x9B43, 0x9B4F, 0x9B4D, 0x9B4E, 0x9B51, 0x9B58, 0x9B74, + 0x9B93, 0x9B83, 0x9B91, 0x9B96, 0x9B97, 0x9B9F, 0x9BA0, 0x9BA8, + 0x9BB4, 0x9BC0, 0x9BCA, 0x9BB9, 0x9BC6, 0x9BCF, 0x9BD1, 0x9BD2, + 0x9BE3, 0x9BE2, 0x9BE4, 0x9BD4, 0x9BE1, 0x9C3A, 0x9BF2, 0x9BF1, + 0x9BF0, 0x9C15, 0x9C14, 0x9C09, 0x9C13, 0x9C0C, 0x9C06, 0x9C08, + 0x9C12, 0x9C0A, 0x9C04, 0x9C2E, 0x9C1B, 0x9C25, 0x9C24, 0x9C21, + 0x9C30, 0x9C47, 0x9C32, 0x9C46, 0x9C3E, 0x9C5A, 0x9C60, 0x9C67, + 0x9C76, 0x9C78, 0x9CE7, 0x9CEC, 0x9CF0, 0x9D09, 0x9D08, 0x9CEB, + 0x9D03, 0x9D06, 0x9D2A, 0x9D26, 0x9DAF, 0x9D23, 0x9D1F, 0x9D44, + 0x9D15, 0x9D12, 0x9D41, 0x9D3F, 0x9D3E, 0x9D46, 0x9D48, +}; +static const unsigned short euc_to_utf8_F3[] = { + 0x9D5D, 0x9D5E, 0x9D64, 0x9D51, 0x9D50, 0x9D59, 0x9D72, + 0x9D89, 0x9D87, 0x9DAB, 0x9D6F, 0x9D7A, 0x9D9A, 0x9DA4, 0x9DA9, + 0x9DB2, 0x9DC4, 0x9DC1, 0x9DBB, 0x9DB8, 0x9DBA, 0x9DC6, 0x9DCF, + 0x9DC2, 0x9DD9, 0x9DD3, 0x9DF8, 0x9DE6, 0x9DED, 0x9DEF, 0x9DFD, + 0x9E1A, 0x9E1B, 0x9E1E, 0x9E75, 0x9E79, 0x9E7D, 0x9E81, 0x9E88, + 0x9E8B, 0x9E8C, 0x9E92, 0x9E95, 0x9E91, 0x9E9D, 0x9EA5, 0x9EA9, + 0x9EB8, 0x9EAA, 0x9EAD, 0x9761, 0x9ECC, 0x9ECE, 0x9ECF, 0x9ED0, + 0x9ED4, 0x9EDC, 0x9EDE, 0x9EDD, 0x9EE0, 0x9EE5, 0x9EE8, 0x9EEF, + 0x9EF4, 0x9EF6, 0x9EF7, 0x9EF9, 0x9EFB, 0x9EFC, 0x9EFD, 0x9F07, + 0x9F08, 0x76B7, 0x9F15, 0x9F21, 0x9F2C, 0x9F3E, 0x9F4A, 0x9F52, + 0x9F54, 0x9F63, 0x9F5F, 0x9F60, 0x9F61, 0x9F66, 0x9F67, 0x9F6C, + 0x9F6A, 0x9F77, 0x9F72, 0x9F76, 0x9F95, 0x9F9C, 0x9FA0, +}; +static const unsigned short euc_to_utf8_F4[] = { + 0x582F, 0x69C7, 0x9059, 0x7464, 0x51DC, 0x7199, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_F5[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFE33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFE31, 0, 0, + 0, 0, 0, 0, 0, 0xFE30, 0, 0, + 0, 0, 0xFE35, 0xFE36, 0xFE39, 0xFE3A, 0, 0, + 0xFE37, 0xFE38, 0xFE3F, 0xFE40, 0xFE3D, 0xFE3E, 0xFE41, 0xFE42, + 0xFE43, 0xFE44, 0xFE3B, 0xFE3C, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_F9[] = { + 0x7E8A, 0x891C, 0x9348, 0x9288, 0x84DC, 0x4FC9, 0x70BB, + 0x6631, 0x68C8, 0x92F9, 0x66FB, 0x5F45, 0x4E28, 0x4EE1, 0x4EFC, + 0x4F00, 0x4F03, 0x4F39, 0x4F56, 0x4F92, 0x4F8A, 0x4F9A, 0x4F94, + 0x4FCD, 0x5040, 0x5022, 0x4FFF, 0x501E, 0x5046, 0x5070, 0x5042, + 0x5094, 0x50F4, 0x50D8, 0x514A, 0x5164, 0x519D, 0x51BE, 0x51EC, + 0x5215, 0x529C, 0x52A6, 0x52C0, 0x52DB, 0x5300, 0x5307, 0x5324, + 0x5372, 0x5393, 0x53B2, 0x53DD, 0xFA0E, 0x549C, 0x548A, 0x54A9, + 0x54FF, 0x5586, 0x5759, 0x5765, 0x57AC, 0x57C8, 0x57C7, 0xFA0F, + 0xFA10, 0x589E, 0x58B2, 0x590B, 0x5953, 0x595B, 0x595D, 0x5963, + 0x59A4, 0x59BA, 0x5B56, 0x5BC0, 0x752F, 0x5BD8, 0x5BEC, 0x5C1E, + 0x5CA6, 0x5CBA, 0x5CF5, 0x5D27, 0x5D53, 0xFA11, 0x5D42, 0x5D6D, + 0x5DB8, 0x5DB9, 0x5DD0, 0x5F21, 0x5F34, 0x5F67, 0x5FB7, +}; +static const unsigned short euc_to_utf8_FA[] = { + 0x5FDE, 0x605D, 0x6085, 0x608A, 0x60DE, 0x60D5, 0x6120, + 0x60F2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62A6, 0x63F5, + 0x6460, 0x649D, 0x64CE, 0x654E, 0x6600, 0x6615, 0x663B, 0x6609, + 0x662E, 0x661E, 0x6624, 0x6665, 0x6657, 0x6659, 0xFA12, 0x6673, + 0x6699, 0x66A0, 0x66B2, 0x66BF, 0x66FA, 0x670E, 0xF929, 0x6766, + 0x67BB, 0x6852, 0x67C0, 0x6801, 0x6844, 0x68CF, 0xFA13, 0x6968, + 0xFA14, 0x6998, 0x69E2, 0x6A30, 0x6A6B, 0x6A46, 0x6A73, 0x6A7E, + 0x6AE2, 0x6AE4, 0x6BD6, 0x6C3F, 0x6C5C, 0x6C86, 0x6C6F, 0x6CDA, + 0x6D04, 0x6D87, 0x6D6F, 0x6D96, 0x6DAC, 0x6DCF, 0x6DF8, 0x6DF2, + 0x6DFC, 0x6E39, 0x6E5C, 0x6E27, 0x6E3C, 0x6EBF, 0x6F88, 0x6FB5, + 0x6FF5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70AB, 0x710F, 0x7104, + 0x715C, 0x7146, 0x7147, 0xFA15, 0x71C1, 0x71FE, 0x72B1, +}; +static const unsigned short euc_to_utf8_FB[] = { + 0x72BE, 0x7324, 0xFA16, 0x7377, 0x73BD, 0x73C9, 0x73D6, + 0x73E3, 0x73D2, 0x7407, 0x73F5, 0x7426, 0x742A, 0x7429, 0x742E, + 0x7462, 0x7489, 0x749F, 0x7501, 0x756F, 0x7682, 0x769C, 0x769E, + 0x769B, 0x76A6, 0xFA17, 0x7746, 0x52AF, 0x7821, 0x784E, 0x7864, + 0x787A, 0x7930, 0xFA18, 0xFA19, 0xFA1A, 0x7994, 0xFA1B, 0x799B, + 0x7AD1, 0x7AE7, 0xFA1C, 0x7AEB, 0x7B9E, 0xFA1D, 0x7D48, 0x7D5C, + 0x7DB7, 0x7DA0, 0x7DD6, 0x7E52, 0x7F47, 0x7FA1, 0xFA1E, 0x8301, + 0x8362, 0x837F, 0x83C7, 0x83F6, 0x8448, 0x84B4, 0x8553, 0x8559, + 0x856B, 0xFA1F, 0x85B0, 0xFA20, 0xFA21, 0x8807, 0x88F5, 0x8A12, + 0x8A37, 0x8A79, 0x8AA7, 0x8ABE, 0x8ADF, 0xFA22, 0x8AF6, 0x8B53, + 0x8B7F, 0x8CF0, 0x8CF4, 0x8D12, 0x8D76, 0xFA23, 0x8ECF, 0xFA24, + 0xFA25, 0x9067, 0x90DE, 0xFA26, 0x9115, 0x9127, 0x91DA, +}; +static const unsigned short euc_to_utf8_FC[] = { + 0x91D7, 0x91DE, 0x91ED, 0x91EE, 0x91E4, 0x91E5, 0x9206, + 0x9210, 0x920A, 0x923A, 0x9240, 0x923C, 0x924E, 0x9259, 0x9251, + 0x9239, 0x9267, 0x92A7, 0x9277, 0x9278, 0x92E7, 0x92D7, 0x92D9, + 0x92D0, 0xFA27, 0x92D5, 0x92E0, 0x92D3, 0x9325, 0x9321, 0x92FB, + 0xFA28, 0x931E, 0x92FF, 0x931D, 0x9302, 0x9370, 0x9357, 0x93A4, + 0x93C6, 0x93DE, 0x93F8, 0x9431, 0x9445, 0x9448, 0x9592, 0xF9DC, + 0xFA29, 0x969D, 0x96AF, 0x9733, 0x973B, 0x9743, 0x974D, 0x974F, + 0x9751, 0x9755, 0x9857, 0x9865, 0xFA2A, 0xFA2B, 0x9927, 0xFA2C, + 0x999E, 0x9A4E, 0x9AD9, 0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1, + 0x9BBB, 0x9C00, 0x9D70, 0x9D6B, 0xFA2D, 0x9E19, 0x9ED1, 0, + 0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, + 0x2177, 0x2178, 0x2179, 0xFFE2, 0x00A6, 0xFF07, 0xFF02, +}; + +/* Microsoft UCS Mapping Compatible */ +static const unsigned short euc_to_utf8_FC_ms[] = { + 0x91D7, 0x91DE, 0x91ED, 0x91EE, 0x91E4, 0x91E5, 0x9206, + 0x9210, 0x920A, 0x923A, 0x9240, 0x923C, 0x924E, 0x9259, 0x9251, + 0x9239, 0x9267, 0x92A7, 0x9277, 0x9278, 0x92E7, 0x92D7, 0x92D9, + 0x92D0, 0xFA27, 0x92D5, 0x92E0, 0x92D3, 0x9325, 0x9321, 0x92FB, + 0xFA28, 0x931E, 0x92FF, 0x931D, 0x9302, 0x9370, 0x9357, 0x93A4, + 0x93C6, 0x93DE, 0x93F8, 0x9431, 0x9445, 0x9448, 0x9592, 0xF9DC, + 0xFA29, 0x969D, 0x96AF, 0x9733, 0x973B, 0x9743, 0x974D, 0x974F, + 0x9751, 0x9755, 0x9857, 0x9865, 0xFA2A, 0xFA2B, 0x9927, 0xFA2C, + 0x999E, 0x9A4E, 0x9AD9, 0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1, + 0x9BBB, 0x9C00, 0x9D70, 0x9D6B, 0xFA2D, 0x9E19, 0x9ED1, 0, + 0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, + 0x2177, 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02, +}; + +#ifdef X0212_ENABLE +static const unsigned short euc_to_utf8_8FA2[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x02D8, + 0x02C7, 0x00B8, 0x02D9, 0x02DD, 0x00AF, 0x02DB, 0x02DA, 0xFF5E, + 0x0384, 0x0385, 0, 0, 0, 0, 0, 0, + 0, 0, 0x00A1, 0xFFE4, 0x00BF, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x00BA, 0x00AA, 0x00A9, 0x00AE, 0x2122, + 0x00A4, 0x2116, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_8FA6[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x0386, 0x0388, 0x0389, 0x038A, 0x03AA, 0, 0x038C, + 0, 0x038E, 0x03AB, 0, 0x038F, 0, 0, 0, + 0, 0x03AC, 0x03AD, 0x03AE, 0x03AF, 0x03CA, 0x0390, 0x03CC, + 0x03C2, 0x03CD, 0x03CB, 0x03B0, 0x03CE, 0, 0, +}; +static const unsigned short euc_to_utf8_8FA7[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x040E, 0x040F, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x045E, 0x045F, +}; +static const unsigned short euc_to_utf8_8FA9[] = { + 0x00C6, 0x0110, 0, 0x0126, 0, 0x0132, 0, + 0x0141, 0x013F, 0, 0x014A, 0x00D8, 0x0152, 0, 0x0166, + 0x00DE, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x00E6, 0x0111, 0x00F0, 0x0127, 0x0131, 0x0133, 0x0138, + 0x0142, 0x0140, 0x0149, 0x014B, 0x00F8, 0x0153, 0x00DF, 0x0167, + 0x00FE, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_8FAA[] = { + 0x00C1, 0x00C0, 0x00C4, 0x00C2, 0x0102, 0x01CD, 0x0100, + 0x0104, 0x00C5, 0x00C3, 0x0106, 0x0108, 0x010C, 0x00C7, 0x010A, + 0x010E, 0x00C9, 0x00C8, 0x00CB, 0x00CA, 0x011A, 0x0116, 0x0112, + 0x0118, 0, 0x011C, 0x011E, 0x0122, 0x0120, 0x0124, 0x00CD, + 0x00CC, 0x00CF, 0x00CE, 0x01CF, 0x0130, 0x012A, 0x012E, 0x0128, + 0x0134, 0x0136, 0x0139, 0x013D, 0x013B, 0x0143, 0x0147, 0x0145, + 0x00D1, 0x00D3, 0x00D2, 0x00D6, 0x00D4, 0x01D1, 0x0150, 0x014C, + 0x00D5, 0x0154, 0x0158, 0x0156, 0x015A, 0x015C, 0x0160, 0x015E, + 0x0164, 0x0162, 0x00DA, 0x00D9, 0x00DC, 0x00DB, 0x016C, 0x01D3, + 0x0170, 0x016A, 0x0172, 0x016E, 0x0168, 0x01D7, 0x01DB, 0x01D9, + 0x01D5, 0x0174, 0x00DD, 0x0178, 0x0176, 0x0179, 0x017D, 0x017B, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_8FAB[] = { + 0x00E1, 0x00E0, 0x00E4, 0x00E2, 0x0103, 0x01CE, 0x0101, + 0x0105, 0x00E5, 0x00E3, 0x0107, 0x0109, 0x010D, 0x00E7, 0x010B, + 0x010F, 0x00E9, 0x00E8, 0x00EB, 0x00EA, 0x011B, 0x0117, 0x0113, + 0x0119, 0x01F5, 0x011D, 0x011F, 0, 0x0121, 0x0125, 0x00ED, + 0x00EC, 0x00EF, 0x00EE, 0x01D0, 0, 0x012B, 0x012F, 0x0129, + 0x0135, 0x0137, 0x013A, 0x013E, 0x013C, 0x0144, 0x0148, 0x0146, + 0x00F1, 0x00F3, 0x00F2, 0x00F6, 0x00F4, 0x01D2, 0x0151, 0x014D, + 0x00F5, 0x0155, 0x0159, 0x0157, 0x015B, 0x015D, 0x0161, 0x015F, + 0x0165, 0x0163, 0x00FA, 0x00F9, 0x00FC, 0x00FB, 0x016D, 0x01D4, + 0x0171, 0x016B, 0x0173, 0x016F, 0x0169, 0x01D8, 0x01DC, 0x01DA, + 0x01D6, 0x0175, 0x00FD, 0x00FF, 0x0177, 0x017A, 0x017E, 0x017C, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_8FB0[] = { + 0x4E02, 0x4E04, 0x4E05, 0x4E0C, 0x4E12, 0x4E1F, 0x4E23, + 0x4E24, 0x4E28, 0x4E2B, 0x4E2E, 0x4E2F, 0x4E30, 0x4E35, 0x4E40, + 0x4E41, 0x4E44, 0x4E47, 0x4E51, 0x4E5A, 0x4E5C, 0x4E63, 0x4E68, + 0x4E69, 0x4E74, 0x4E75, 0x4E79, 0x4E7F, 0x4E8D, 0x4E96, 0x4E97, + 0x4E9D, 0x4EAF, 0x4EB9, 0x4EC3, 0x4ED0, 0x4EDA, 0x4EDB, 0x4EE0, + 0x4EE1, 0x4EE2, 0x4EE8, 0x4EEF, 0x4EF1, 0x4EF3, 0x4EF5, 0x4EFD, + 0x4EFE, 0x4EFF, 0x4F00, 0x4F02, 0x4F03, 0x4F08, 0x4F0B, 0x4F0C, + 0x4F12, 0x4F15, 0x4F16, 0x4F17, 0x4F19, 0x4F2E, 0x4F31, 0x4F60, + 0x4F33, 0x4F35, 0x4F37, 0x4F39, 0x4F3B, 0x4F3E, 0x4F40, 0x4F42, + 0x4F48, 0x4F49, 0x4F4B, 0x4F4C, 0x4F52, 0x4F54, 0x4F56, 0x4F58, + 0x4F5F, 0x4F63, 0x4F6A, 0x4F6C, 0x4F6E, 0x4F71, 0x4F77, 0x4F78, + 0x4F79, 0x4F7A, 0x4F7D, 0x4F7E, 0x4F81, 0x4F82, 0x4F84, +}; +static const unsigned short euc_to_utf8_8FB1[] = { + 0x4F85, 0x4F89, 0x4F8A, 0x4F8C, 0x4F8E, 0x4F90, 0x4F92, + 0x4F93, 0x4F94, 0x4F97, 0x4F99, 0x4F9A, 0x4F9E, 0x4F9F, 0x4FB2, + 0x4FB7, 0x4FB9, 0x4FBB, 0x4FBC, 0x4FBD, 0x4FBE, 0x4FC0, 0x4FC1, + 0x4FC5, 0x4FC6, 0x4FC8, 0x4FC9, 0x4FCB, 0x4FCC, 0x4FCD, 0x4FCF, + 0x4FD2, 0x4FDC, 0x4FE0, 0x4FE2, 0x4FF0, 0x4FF2, 0x4FFC, 0x4FFD, + 0x4FFF, 0x5000, 0x5001, 0x5004, 0x5007, 0x500A, 0x500C, 0x500E, + 0x5010, 0x5013, 0x5017, 0x5018, 0x501B, 0x501C, 0x501D, 0x501E, + 0x5022, 0x5027, 0x502E, 0x5030, 0x5032, 0x5033, 0x5035, 0x5040, + 0x5041, 0x5042, 0x5045, 0x5046, 0x504A, 0x504C, 0x504E, 0x5051, + 0x5052, 0x5053, 0x5057, 0x5059, 0x505F, 0x5060, 0x5062, 0x5063, + 0x5066, 0x5067, 0x506A, 0x506D, 0x5070, 0x5071, 0x503B, 0x5081, + 0x5083, 0x5084, 0x5086, 0x508A, 0x508E, 0x508F, 0x5090, +}; +static const unsigned short euc_to_utf8_8FB2[] = { + 0x5092, 0x5093, 0x5094, 0x5096, 0x509B, 0x509C, 0x509E, + 0x509F, 0x50A0, 0x50A1, 0x50A2, 0x50AA, 0x50AF, 0x50B0, 0x50B9, + 0x50BA, 0x50BD, 0x50C0, 0x50C3, 0x50C4, 0x50C7, 0x50CC, 0x50CE, + 0x50D0, 0x50D3, 0x50D4, 0x50D8, 0x50DC, 0x50DD, 0x50DF, 0x50E2, + 0x50E4, 0x50E6, 0x50E8, 0x50E9, 0x50EF, 0x50F1, 0x50F6, 0x50FA, + 0x50FE, 0x5103, 0x5106, 0x5107, 0x5108, 0x510B, 0x510C, 0x510D, + 0x510E, 0x50F2, 0x5110, 0x5117, 0x5119, 0x511B, 0x511C, 0x511D, + 0x511E, 0x5123, 0x5127, 0x5128, 0x512C, 0x512D, 0x512F, 0x5131, + 0x5133, 0x5134, 0x5135, 0x5138, 0x5139, 0x5142, 0x514A, 0x514F, + 0x5153, 0x5155, 0x5157, 0x5158, 0x515F, 0x5164, 0x5166, 0x517E, + 0x5183, 0x5184, 0x518B, 0x518E, 0x5198, 0x519D, 0x51A1, 0x51A3, + 0x51AD, 0x51B8, 0x51BA, 0x51BC, 0x51BE, 0x51BF, 0x51C2, +}; +static const unsigned short euc_to_utf8_8FB3[] = { + 0x51C8, 0x51CF, 0x51D1, 0x51D2, 0x51D3, 0x51D5, 0x51D8, + 0x51DE, 0x51E2, 0x51E5, 0x51EE, 0x51F2, 0x51F3, 0x51F4, 0x51F7, + 0x5201, 0x5202, 0x5205, 0x5212, 0x5213, 0x5215, 0x5216, 0x5218, + 0x5222, 0x5228, 0x5231, 0x5232, 0x5235, 0x523C, 0x5245, 0x5249, + 0x5255, 0x5257, 0x5258, 0x525A, 0x525C, 0x525F, 0x5260, 0x5261, + 0x5266, 0x526E, 0x5277, 0x5278, 0x5279, 0x5280, 0x5282, 0x5285, + 0x528A, 0x528C, 0x5293, 0x5295, 0x5296, 0x5297, 0x5298, 0x529A, + 0x529C, 0x52A4, 0x52A5, 0x52A6, 0x52A7, 0x52AF, 0x52B0, 0x52B6, + 0x52B7, 0x52B8, 0x52BA, 0x52BB, 0x52BD, 0x52C0, 0x52C4, 0x52C6, + 0x52C8, 0x52CC, 0x52CF, 0x52D1, 0x52D4, 0x52D6, 0x52DB, 0x52DC, + 0x52E1, 0x52E5, 0x52E8, 0x52E9, 0x52EA, 0x52EC, 0x52F0, 0x52F1, + 0x52F4, 0x52F6, 0x52F7, 0x5300, 0x5303, 0x530A, 0x530B, +}; +static const unsigned short euc_to_utf8_8FB4[] = { + 0x530C, 0x5311, 0x5313, 0x5318, 0x531B, 0x531C, 0x531E, + 0x531F, 0x5325, 0x5327, 0x5328, 0x5329, 0x532B, 0x532C, 0x532D, + 0x5330, 0x5332, 0x5335, 0x533C, 0x533D, 0x533E, 0x5342, 0x534C, + 0x534B, 0x5359, 0x535B, 0x5361, 0x5363, 0x5365, 0x536C, 0x536D, + 0x5372, 0x5379, 0x537E, 0x5383, 0x5387, 0x5388, 0x538E, 0x5393, + 0x5394, 0x5399, 0x539D, 0x53A1, 0x53A4, 0x53AA, 0x53AB, 0x53AF, + 0x53B2, 0x53B4, 0x53B5, 0x53B7, 0x53B8, 0x53BA, 0x53BD, 0x53C0, + 0x53C5, 0x53CF, 0x53D2, 0x53D3, 0x53D5, 0x53DA, 0x53DD, 0x53DE, + 0x53E0, 0x53E6, 0x53E7, 0x53F5, 0x5402, 0x5413, 0x541A, 0x5421, + 0x5427, 0x5428, 0x542A, 0x542F, 0x5431, 0x5434, 0x5435, 0x5443, + 0x5444, 0x5447, 0x544D, 0x544F, 0x545E, 0x5462, 0x5464, 0x5466, + 0x5467, 0x5469, 0x546B, 0x546D, 0x546E, 0x5474, 0x547F, +}; +static const unsigned short euc_to_utf8_8FB5[] = { + 0x5481, 0x5483, 0x5485, 0x5488, 0x5489, 0x548D, 0x5491, + 0x5495, 0x5496, 0x549C, 0x549F, 0x54A1, 0x54A6, 0x54A7, 0x54A9, + 0x54AA, 0x54AD, 0x54AE, 0x54B1, 0x54B7, 0x54B9, 0x54BA, 0x54BB, + 0x54BF, 0x54C6, 0x54CA, 0x54CD, 0x54CE, 0x54E0, 0x54EA, 0x54EC, + 0x54EF, 0x54F6, 0x54FC, 0x54FE, 0x54FF, 0x5500, 0x5501, 0x5505, + 0x5508, 0x5509, 0x550C, 0x550D, 0x550E, 0x5515, 0x552A, 0x552B, + 0x5532, 0x5535, 0x5536, 0x553B, 0x553C, 0x553D, 0x5541, 0x5547, + 0x5549, 0x554A, 0x554D, 0x5550, 0x5551, 0x5558, 0x555A, 0x555B, + 0x555E, 0x5560, 0x5561, 0x5564, 0x5566, 0x557F, 0x5581, 0x5582, + 0x5586, 0x5588, 0x558E, 0x558F, 0x5591, 0x5592, 0x5593, 0x5594, + 0x5597, 0x55A3, 0x55A4, 0x55AD, 0x55B2, 0x55BF, 0x55C1, 0x55C3, + 0x55C6, 0x55C9, 0x55CB, 0x55CC, 0x55CE, 0x55D1, 0x55D2, +}; +static const unsigned short euc_to_utf8_8FB6[] = { + 0x55D3, 0x55D7, 0x55D8, 0x55DB, 0x55DE, 0x55E2, 0x55E9, + 0x55F6, 0x55FF, 0x5605, 0x5608, 0x560A, 0x560D, 0x560E, 0x560F, + 0x5610, 0x5611, 0x5612, 0x5619, 0x562C, 0x5630, 0x5633, 0x5635, + 0x5637, 0x5639, 0x563B, 0x563C, 0x563D, 0x563F, 0x5640, 0x5641, + 0x5643, 0x5644, 0x5646, 0x5649, 0x564B, 0x564D, 0x564F, 0x5654, + 0x565E, 0x5660, 0x5661, 0x5662, 0x5663, 0x5666, 0x5669, 0x566D, + 0x566F, 0x5671, 0x5672, 0x5675, 0x5684, 0x5685, 0x5688, 0x568B, + 0x568C, 0x5695, 0x5699, 0x569A, 0x569D, 0x569E, 0x569F, 0x56A6, + 0x56A7, 0x56A8, 0x56A9, 0x56AB, 0x56AC, 0x56AD, 0x56B1, 0x56B3, + 0x56B7, 0x56BE, 0x56C5, 0x56C9, 0x56CA, 0x56CB, 0x56CF, 0x56D0, + 0x56CC, 0x56CD, 0x56D9, 0x56DC, 0x56DD, 0x56DF, 0x56E1, 0x56E4, + 0x56E5, 0x56E6, 0x56E7, 0x56E8, 0x56F1, 0x56EB, 0x56ED, +}; +static const unsigned short euc_to_utf8_8FB7[] = { + 0x56F6, 0x56F7, 0x5701, 0x5702, 0x5707, 0x570A, 0x570C, + 0x5711, 0x5715, 0x571A, 0x571B, 0x571D, 0x5720, 0x5722, 0x5723, + 0x5724, 0x5725, 0x5729, 0x572A, 0x572C, 0x572E, 0x572F, 0x5733, + 0x5734, 0x573D, 0x573E, 0x573F, 0x5745, 0x5746, 0x574C, 0x574D, + 0x5752, 0x5762, 0x5765, 0x5767, 0x5768, 0x576B, 0x576D, 0x576E, + 0x576F, 0x5770, 0x5771, 0x5773, 0x5774, 0x5775, 0x5777, 0x5779, + 0x577A, 0x577B, 0x577C, 0x577E, 0x5781, 0x5783, 0x578C, 0x5794, + 0x5797, 0x5799, 0x579A, 0x579C, 0x579D, 0x579E, 0x579F, 0x57A1, + 0x5795, 0x57A7, 0x57A8, 0x57A9, 0x57AC, 0x57B8, 0x57BD, 0x57C7, + 0x57C8, 0x57CC, 0x57CF, 0x57D5, 0x57DD, 0x57DE, 0x57E4, 0x57E6, + 0x57E7, 0x57E9, 0x57ED, 0x57F0, 0x57F5, 0x57F6, 0x57F8, 0x57FD, + 0x57FE, 0x57FF, 0x5803, 0x5804, 0x5808, 0x5809, 0x57E1, +}; +static const unsigned short euc_to_utf8_8FB8[] = { + 0x580C, 0x580D, 0x581B, 0x581E, 0x581F, 0x5820, 0x5826, + 0x5827, 0x582D, 0x5832, 0x5839, 0x583F, 0x5849, 0x584C, 0x584D, + 0x584F, 0x5850, 0x5855, 0x585F, 0x5861, 0x5864, 0x5867, 0x5868, + 0x5878, 0x587C, 0x587F, 0x5880, 0x5881, 0x5887, 0x5888, 0x5889, + 0x588A, 0x588C, 0x588D, 0x588F, 0x5890, 0x5894, 0x5896, 0x589D, + 0x58A0, 0x58A1, 0x58A2, 0x58A6, 0x58A9, 0x58B1, 0x58B2, 0x58C4, + 0x58BC, 0x58C2, 0x58C8, 0x58CD, 0x58CE, 0x58D0, 0x58D2, 0x58D4, + 0x58D6, 0x58DA, 0x58DD, 0x58E1, 0x58E2, 0x58E9, 0x58F3, 0x5905, + 0x5906, 0x590B, 0x590C, 0x5912, 0x5913, 0x5914, 0x8641, 0x591D, + 0x5921, 0x5923, 0x5924, 0x5928, 0x592F, 0x5930, 0x5933, 0x5935, + 0x5936, 0x593F, 0x5943, 0x5946, 0x5952, 0x5953, 0x5959, 0x595B, + 0x595D, 0x595E, 0x595F, 0x5961, 0x5963, 0x596B, 0x596D, +}; +static const unsigned short euc_to_utf8_8FB9[] = { + 0x596F, 0x5972, 0x5975, 0x5976, 0x5979, 0x597B, 0x597C, + 0x598B, 0x598C, 0x598E, 0x5992, 0x5995, 0x5997, 0x599F, 0x59A4, + 0x59A7, 0x59AD, 0x59AE, 0x59AF, 0x59B0, 0x59B3, 0x59B7, 0x59BA, + 0x59BC, 0x59C1, 0x59C3, 0x59C4, 0x59C8, 0x59CA, 0x59CD, 0x59D2, + 0x59DD, 0x59DE, 0x59DF, 0x59E3, 0x59E4, 0x59E7, 0x59EE, 0x59EF, + 0x59F1, 0x59F2, 0x59F4, 0x59F7, 0x5A00, 0x5A04, 0x5A0C, 0x5A0D, + 0x5A0E, 0x5A12, 0x5A13, 0x5A1E, 0x5A23, 0x5A24, 0x5A27, 0x5A28, + 0x5A2A, 0x5A2D, 0x5A30, 0x5A44, 0x5A45, 0x5A47, 0x5A48, 0x5A4C, + 0x5A50, 0x5A55, 0x5A5E, 0x5A63, 0x5A65, 0x5A67, 0x5A6D, 0x5A77, + 0x5A7A, 0x5A7B, 0x5A7E, 0x5A8B, 0x5A90, 0x5A93, 0x5A96, 0x5A99, + 0x5A9C, 0x5A9E, 0x5A9F, 0x5AA0, 0x5AA2, 0x5AA7, 0x5AAC, 0x5AB1, + 0x5AB2, 0x5AB3, 0x5AB5, 0x5AB8, 0x5ABA, 0x5ABB, 0x5ABF, +}; +static const unsigned short euc_to_utf8_8FBA[] = { + 0x5AC4, 0x5AC6, 0x5AC8, 0x5ACF, 0x5ADA, 0x5ADC, 0x5AE0, + 0x5AE5, 0x5AEA, 0x5AEE, 0x5AF5, 0x5AF6, 0x5AFD, 0x5B00, 0x5B01, + 0x5B08, 0x5B17, 0x5B34, 0x5B19, 0x5B1B, 0x5B1D, 0x5B21, 0x5B25, + 0x5B2D, 0x5B38, 0x5B41, 0x5B4B, 0x5B4C, 0x5B52, 0x5B56, 0x5B5E, + 0x5B68, 0x5B6E, 0x5B6F, 0x5B7C, 0x5B7D, 0x5B7E, 0x5B7F, 0x5B81, + 0x5B84, 0x5B86, 0x5B8A, 0x5B8E, 0x5B90, 0x5B91, 0x5B93, 0x5B94, + 0x5B96, 0x5BA8, 0x5BA9, 0x5BAC, 0x5BAD, 0x5BAF, 0x5BB1, 0x5BB2, + 0x5BB7, 0x5BBA, 0x5BBC, 0x5BC0, 0x5BC1, 0x5BCD, 0x5BCF, 0x5BD6, + 0x5BD7, 0x5BD8, 0x5BD9, 0x5BDA, 0x5BE0, 0x5BEF, 0x5BF1, 0x5BF4, + 0x5BFD, 0x5C0C, 0x5C17, 0x5C1E, 0x5C1F, 0x5C23, 0x5C26, 0x5C29, + 0x5C2B, 0x5C2C, 0x5C2E, 0x5C30, 0x5C32, 0x5C35, 0x5C36, 0x5C59, + 0x5C5A, 0x5C5C, 0x5C62, 0x5C63, 0x5C67, 0x5C68, 0x5C69, +}; +static const unsigned short euc_to_utf8_8FBB[] = { + 0x5C6D, 0x5C70, 0x5C74, 0x5C75, 0x5C7A, 0x5C7B, 0x5C7C, + 0x5C7D, 0x5C87, 0x5C88, 0x5C8A, 0x5C8F, 0x5C92, 0x5C9D, 0x5C9F, + 0x5CA0, 0x5CA2, 0x5CA3, 0x5CA6, 0x5CAA, 0x5CB2, 0x5CB4, 0x5CB5, + 0x5CBA, 0x5CC9, 0x5CCB, 0x5CD2, 0x5CDD, 0x5CD7, 0x5CEE, 0x5CF1, + 0x5CF2, 0x5CF4, 0x5D01, 0x5D06, 0x5D0D, 0x5D12, 0x5D2B, 0x5D23, + 0x5D24, 0x5D26, 0x5D27, 0x5D31, 0x5D34, 0x5D39, 0x5D3D, 0x5D3F, + 0x5D42, 0x5D43, 0x5D46, 0x5D48, 0x5D55, 0x5D51, 0x5D59, 0x5D4A, + 0x5D5F, 0x5D60, 0x5D61, 0x5D62, 0x5D64, 0x5D6A, 0x5D6D, 0x5D70, + 0x5D79, 0x5D7A, 0x5D7E, 0x5D7F, 0x5D81, 0x5D83, 0x5D88, 0x5D8A, + 0x5D92, 0x5D93, 0x5D94, 0x5D95, 0x5D99, 0x5D9B, 0x5D9F, 0x5DA0, + 0x5DA7, 0x5DAB, 0x5DB0, 0x5DB4, 0x5DB8, 0x5DB9, 0x5DC3, 0x5DC7, + 0x5DCB, 0x5DD0, 0x5DCE, 0x5DD8, 0x5DD9, 0x5DE0, 0x5DE4, +}; +static const unsigned short euc_to_utf8_8FBC[] = { + 0x5DE9, 0x5DF8, 0x5DF9, 0x5E00, 0x5E07, 0x5E0D, 0x5E12, + 0x5E14, 0x5E15, 0x5E18, 0x5E1F, 0x5E20, 0x5E2E, 0x5E28, 0x5E32, + 0x5E35, 0x5E3E, 0x5E4B, 0x5E50, 0x5E49, 0x5E51, 0x5E56, 0x5E58, + 0x5E5B, 0x5E5C, 0x5E5E, 0x5E68, 0x5E6A, 0x5E6B, 0x5E6C, 0x5E6D, + 0x5E6E, 0x5E70, 0x5E80, 0x5E8B, 0x5E8E, 0x5EA2, 0x5EA4, 0x5EA5, + 0x5EA8, 0x5EAA, 0x5EAC, 0x5EB1, 0x5EB3, 0x5EBD, 0x5EBE, 0x5EBF, + 0x5EC6, 0x5ECC, 0x5ECB, 0x5ECE, 0x5ED1, 0x5ED2, 0x5ED4, 0x5ED5, + 0x5EDC, 0x5EDE, 0x5EE5, 0x5EEB, 0x5F02, 0x5F06, 0x5F07, 0x5F08, + 0x5F0E, 0x5F19, 0x5F1C, 0x5F1D, 0x5F21, 0x5F22, 0x5F23, 0x5F24, + 0x5F28, 0x5F2B, 0x5F2C, 0x5F2E, 0x5F30, 0x5F34, 0x5F36, 0x5F3B, + 0x5F3D, 0x5F3F, 0x5F40, 0x5F44, 0x5F45, 0x5F47, 0x5F4D, 0x5F50, + 0x5F54, 0x5F58, 0x5F5B, 0x5F60, 0x5F63, 0x5F64, 0x5F67, +}; +static const unsigned short euc_to_utf8_8FBD[] = { + 0x5F6F, 0x5F72, 0x5F74, 0x5F75, 0x5F78, 0x5F7A, 0x5F7D, + 0x5F7E, 0x5F89, 0x5F8D, 0x5F8F, 0x5F96, 0x5F9C, 0x5F9D, 0x5FA2, + 0x5FA7, 0x5FAB, 0x5FA4, 0x5FAC, 0x5FAF, 0x5FB0, 0x5FB1, 0x5FB8, + 0x5FC4, 0x5FC7, 0x5FC8, 0x5FC9, 0x5FCB, 0x5FD0, 0x5FD1, 0x5FD2, + 0x5FD3, 0x5FD4, 0x5FDE, 0x5FE1, 0x5FE2, 0x5FE8, 0x5FE9, 0x5FEA, + 0x5FEC, 0x5FED, 0x5FEE, 0x5FEF, 0x5FF2, 0x5FF3, 0x5FF6, 0x5FFA, + 0x5FFC, 0x6007, 0x600A, 0x600D, 0x6013, 0x6014, 0x6017, 0x6018, + 0x601A, 0x601F, 0x6024, 0x602D, 0x6033, 0x6035, 0x6040, 0x6047, + 0x6048, 0x6049, 0x604C, 0x6051, 0x6054, 0x6056, 0x6057, 0x605D, + 0x6061, 0x6067, 0x6071, 0x607E, 0x607F, 0x6082, 0x6086, 0x6088, + 0x608A, 0x608E, 0x6091, 0x6093, 0x6095, 0x6098, 0x609D, 0x609E, + 0x60A2, 0x60A4, 0x60A5, 0x60A8, 0x60B0, 0x60B1, 0x60B7, +}; +static const unsigned short euc_to_utf8_8FBE[] = { + 0x60BB, 0x60BE, 0x60C2, 0x60C4, 0x60C8, 0x60C9, 0x60CA, + 0x60CB, 0x60CE, 0x60CF, 0x60D4, 0x60D5, 0x60D9, 0x60DB, 0x60DD, + 0x60DE, 0x60E2, 0x60E5, 0x60F2, 0x60F5, 0x60F8, 0x60FC, 0x60FD, + 0x6102, 0x6107, 0x610A, 0x610C, 0x6110, 0x6111, 0x6112, 0x6113, + 0x6114, 0x6116, 0x6117, 0x6119, 0x611C, 0x611E, 0x6122, 0x612A, + 0x612B, 0x6130, 0x6131, 0x6135, 0x6136, 0x6137, 0x6139, 0x6141, + 0x6145, 0x6146, 0x6149, 0x615E, 0x6160, 0x616C, 0x6172, 0x6178, + 0x617B, 0x617C, 0x617F, 0x6180, 0x6181, 0x6183, 0x6184, 0x618B, + 0x618D, 0x6192, 0x6193, 0x6197, 0x6198, 0x619C, 0x619D, 0x619F, + 0x61A0, 0x61A5, 0x61A8, 0x61AA, 0x61AD, 0x61B8, 0x61B9, 0x61BC, + 0x61C0, 0x61C1, 0x61C2, 0x61CE, 0x61CF, 0x61D5, 0x61DC, 0x61DD, + 0x61DE, 0x61DF, 0x61E1, 0x61E2, 0x61E7, 0x61E9, 0x61E5, +}; +static const unsigned short euc_to_utf8_8FBF[] = { + 0x61EC, 0x61ED, 0x61EF, 0x6201, 0x6203, 0x6204, 0x6207, + 0x6213, 0x6215, 0x621C, 0x6220, 0x6222, 0x6223, 0x6227, 0x6229, + 0x622B, 0x6239, 0x623D, 0x6242, 0x6243, 0x6244, 0x6246, 0x624C, + 0x6250, 0x6251, 0x6252, 0x6254, 0x6256, 0x625A, 0x625C, 0x6264, + 0x626D, 0x626F, 0x6273, 0x627A, 0x627D, 0x628D, 0x628E, 0x628F, + 0x6290, 0x62A6, 0x62A8, 0x62B3, 0x62B6, 0x62B7, 0x62BA, 0x62BE, + 0x62BF, 0x62C4, 0x62CE, 0x62D5, 0x62D6, 0x62DA, 0x62EA, 0x62F2, + 0x62F4, 0x62FC, 0x62FD, 0x6303, 0x6304, 0x630A, 0x630B, 0x630D, + 0x6310, 0x6313, 0x6316, 0x6318, 0x6329, 0x632A, 0x632D, 0x6335, + 0x6336, 0x6339, 0x633C, 0x6341, 0x6342, 0x6343, 0x6344, 0x6346, + 0x634A, 0x634B, 0x634E, 0x6352, 0x6353, 0x6354, 0x6358, 0x635B, + 0x6365, 0x6366, 0x636C, 0x636D, 0x6371, 0x6374, 0x6375, +}; +static const unsigned short euc_to_utf8_8FC0[] = { + 0x6378, 0x637C, 0x637D, 0x637F, 0x6382, 0x6384, 0x6387, + 0x638A, 0x6390, 0x6394, 0x6395, 0x6399, 0x639A, 0x639E, 0x63A4, + 0x63A6, 0x63AD, 0x63AE, 0x63AF, 0x63BD, 0x63C1, 0x63C5, 0x63C8, + 0x63CE, 0x63D1, 0x63D3, 0x63D4, 0x63D5, 0x63DC, 0x63E0, 0x63E5, + 0x63EA, 0x63EC, 0x63F2, 0x63F3, 0x63F5, 0x63F8, 0x63F9, 0x6409, + 0x640A, 0x6410, 0x6412, 0x6414, 0x6418, 0x641E, 0x6420, 0x6422, + 0x6424, 0x6425, 0x6429, 0x642A, 0x642F, 0x6430, 0x6435, 0x643D, + 0x643F, 0x644B, 0x644F, 0x6451, 0x6452, 0x6453, 0x6454, 0x645A, + 0x645B, 0x645C, 0x645D, 0x645F, 0x6460, 0x6461, 0x6463, 0x646D, + 0x6473, 0x6474, 0x647B, 0x647D, 0x6485, 0x6487, 0x648F, 0x6490, + 0x6491, 0x6498, 0x6499, 0x649B, 0x649D, 0x649F, 0x64A1, 0x64A3, + 0x64A6, 0x64A8, 0x64AC, 0x64B3, 0x64BD, 0x64BE, 0x64BF, +}; +static const unsigned short euc_to_utf8_8FC1[] = { + 0x64C4, 0x64C9, 0x64CA, 0x64CB, 0x64CC, 0x64CE, 0x64D0, + 0x64D1, 0x64D5, 0x64D7, 0x64E4, 0x64E5, 0x64E9, 0x64EA, 0x64ED, + 0x64F0, 0x64F5, 0x64F7, 0x64FB, 0x64FF, 0x6501, 0x6504, 0x6508, + 0x6509, 0x650A, 0x650F, 0x6513, 0x6514, 0x6516, 0x6519, 0x651B, + 0x651E, 0x651F, 0x6522, 0x6526, 0x6529, 0x652E, 0x6531, 0x653A, + 0x653C, 0x653D, 0x6543, 0x6547, 0x6549, 0x6550, 0x6552, 0x6554, + 0x655F, 0x6560, 0x6567, 0x656B, 0x657A, 0x657D, 0x6581, 0x6585, + 0x658A, 0x6592, 0x6595, 0x6598, 0x659D, 0x65A0, 0x65A3, 0x65A6, + 0x65AE, 0x65B2, 0x65B3, 0x65B4, 0x65BF, 0x65C2, 0x65C8, 0x65C9, + 0x65CE, 0x65D0, 0x65D4, 0x65D6, 0x65D8, 0x65DF, 0x65F0, 0x65F2, + 0x65F4, 0x65F5, 0x65F9, 0x65FE, 0x65FF, 0x6600, 0x6604, 0x6608, + 0x6609, 0x660D, 0x6611, 0x6612, 0x6615, 0x6616, 0x661D, +}; +static const unsigned short euc_to_utf8_8FC2[] = { + 0x661E, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629, + 0x662A, 0x662B, 0x662C, 0x662E, 0x6630, 0x6631, 0x6633, 0x6639, + 0x6637, 0x6640, 0x6645, 0x6646, 0x664A, 0x664C, 0x6651, 0x664E, + 0x6657, 0x6658, 0x6659, 0x665B, 0x665C, 0x6660, 0x6661, 0x66FB, + 0x666A, 0x666B, 0x666C, 0x667E, 0x6673, 0x6675, 0x667F, 0x6677, + 0x6678, 0x6679, 0x667B, 0x6680, 0x667C, 0x668B, 0x668C, 0x668D, + 0x6690, 0x6692, 0x6699, 0x669A, 0x669B, 0x669C, 0x669F, 0x66A0, + 0x66A4, 0x66AD, 0x66B1, 0x66B2, 0x66B5, 0x66BB, 0x66BF, 0x66C0, + 0x66C2, 0x66C3, 0x66C8, 0x66CC, 0x66CE, 0x66CF, 0x66D4, 0x66DB, + 0x66DF, 0x66E8, 0x66EB, 0x66EC, 0x66EE, 0x66FA, 0x6705, 0x6707, + 0x670E, 0x6713, 0x6719, 0x671C, 0x6720, 0x6722, 0x6733, 0x673E, + 0x6745, 0x6747, 0x6748, 0x674C, 0x6754, 0x6755, 0x675D, +}; +static const unsigned short euc_to_utf8_8FC3[] = { + 0x6766, 0x676C, 0x676E, 0x6774, 0x6776, 0x677B, 0x6781, + 0x6784, 0x678E, 0x678F, 0x6791, 0x6793, 0x6796, 0x6798, 0x6799, + 0x679B, 0x67B0, 0x67B1, 0x67B2, 0x67B5, 0x67BB, 0x67BC, 0x67BD, + 0x67F9, 0x67C0, 0x67C2, 0x67C3, 0x67C5, 0x67C8, 0x67C9, 0x67D2, + 0x67D7, 0x67D9, 0x67DC, 0x67E1, 0x67E6, 0x67F0, 0x67F2, 0x67F6, + 0x67F7, 0x6852, 0x6814, 0x6819, 0x681D, 0x681F, 0x6828, 0x6827, + 0x682C, 0x682D, 0x682F, 0x6830, 0x6831, 0x6833, 0x683B, 0x683F, + 0x6844, 0x6845, 0x684A, 0x684C, 0x6855, 0x6857, 0x6858, 0x685B, + 0x686B, 0x686E, 0x686F, 0x6870, 0x6871, 0x6872, 0x6875, 0x6879, + 0x687A, 0x687B, 0x687C, 0x6882, 0x6884, 0x6886, 0x6888, 0x6896, + 0x6898, 0x689A, 0x689C, 0x68A1, 0x68A3, 0x68A5, 0x68A9, 0x68AA, + 0x68AE, 0x68B2, 0x68BB, 0x68C5, 0x68C8, 0x68CC, 0x68CF, +}; +static const unsigned short euc_to_utf8_8FC4[] = { + 0x68D0, 0x68D1, 0x68D3, 0x68D6, 0x68D9, 0x68DC, 0x68DD, + 0x68E5, 0x68E8, 0x68EA, 0x68EB, 0x68EC, 0x68ED, 0x68F0, 0x68F1, + 0x68F5, 0x68F6, 0x68FB, 0x68FC, 0x68FD, 0x6906, 0x6909, 0x690A, + 0x6910, 0x6911, 0x6913, 0x6916, 0x6917, 0x6931, 0x6933, 0x6935, + 0x6938, 0x693B, 0x6942, 0x6945, 0x6949, 0x694E, 0x6957, 0x695B, + 0x6963, 0x6964, 0x6965, 0x6966, 0x6968, 0x6969, 0x696C, 0x6970, + 0x6971, 0x6972, 0x697A, 0x697B, 0x697F, 0x6980, 0x698D, 0x6992, + 0x6996, 0x6998, 0x69A1, 0x69A5, 0x69A6, 0x69A8, 0x69AB, 0x69AD, + 0x69AF, 0x69B7, 0x69B8, 0x69BA, 0x69BC, 0x69C5, 0x69C8, 0x69D1, + 0x69D6, 0x69D7, 0x69E2, 0x69E5, 0x69EE, 0x69EF, 0x69F1, 0x69F3, + 0x69F5, 0x69FE, 0x6A00, 0x6A01, 0x6A03, 0x6A0F, 0x6A11, 0x6A15, + 0x6A1A, 0x6A1D, 0x6A20, 0x6A24, 0x6A28, 0x6A30, 0x6A32, +}; +static const unsigned short euc_to_utf8_8FC5[] = { + 0x6A34, 0x6A37, 0x6A3B, 0x6A3E, 0x6A3F, 0x6A45, 0x6A46, + 0x6A49, 0x6A4A, 0x6A4E, 0x6A50, 0x6A51, 0x6A52, 0x6A55, 0x6A56, + 0x6A5B, 0x6A64, 0x6A67, 0x6A6A, 0x6A71, 0x6A73, 0x6A7E, 0x6A81, + 0x6A83, 0x6A86, 0x6A87, 0x6A89, 0x6A8B, 0x6A91, 0x6A9B, 0x6A9D, + 0x6A9E, 0x6A9F, 0x6AA5, 0x6AAB, 0x6AAF, 0x6AB0, 0x6AB1, 0x6AB4, + 0x6ABD, 0x6ABE, 0x6ABF, 0x6AC6, 0x6AC9, 0x6AC8, 0x6ACC, 0x6AD0, + 0x6AD4, 0x6AD5, 0x6AD6, 0x6ADC, 0x6ADD, 0x6AE4, 0x6AE7, 0x6AEC, + 0x6AF0, 0x6AF1, 0x6AF2, 0x6AFC, 0x6AFD, 0x6B02, 0x6B03, 0x6B06, + 0x6B07, 0x6B09, 0x6B0F, 0x6B10, 0x6B11, 0x6B17, 0x6B1B, 0x6B1E, + 0x6B24, 0x6B28, 0x6B2B, 0x6B2C, 0x6B2F, 0x6B35, 0x6B36, 0x6B3B, + 0x6B3F, 0x6B46, 0x6B4A, 0x6B4D, 0x6B52, 0x6B56, 0x6B58, 0x6B5D, + 0x6B60, 0x6B67, 0x6B6B, 0x6B6E, 0x6B70, 0x6B75, 0x6B7D, +}; +static const unsigned short euc_to_utf8_8FC6[] = { + 0x6B7E, 0x6B82, 0x6B85, 0x6B97, 0x6B9B, 0x6B9F, 0x6BA0, + 0x6BA2, 0x6BA3, 0x6BA8, 0x6BA9, 0x6BAC, 0x6BAD, 0x6BAE, 0x6BB0, + 0x6BB8, 0x6BB9, 0x6BBD, 0x6BBE, 0x6BC3, 0x6BC4, 0x6BC9, 0x6BCC, + 0x6BD6, 0x6BDA, 0x6BE1, 0x6BE3, 0x6BE6, 0x6BE7, 0x6BEE, 0x6BF1, + 0x6BF7, 0x6BF9, 0x6BFF, 0x6C02, 0x6C04, 0x6C05, 0x6C09, 0x6C0D, + 0x6C0E, 0x6C10, 0x6C12, 0x6C19, 0x6C1F, 0x6C26, 0x6C27, 0x6C28, + 0x6C2C, 0x6C2E, 0x6C33, 0x6C35, 0x6C36, 0x6C3A, 0x6C3B, 0x6C3F, + 0x6C4A, 0x6C4B, 0x6C4D, 0x6C4F, 0x6C52, 0x6C54, 0x6C59, 0x6C5B, + 0x6C5C, 0x6C6B, 0x6C6D, 0x6C6F, 0x6C74, 0x6C76, 0x6C78, 0x6C79, + 0x6C7B, 0x6C85, 0x6C86, 0x6C87, 0x6C89, 0x6C94, 0x6C95, 0x6C97, + 0x6C98, 0x6C9C, 0x6C9F, 0x6CB0, 0x6CB2, 0x6CB4, 0x6CC2, 0x6CC6, + 0x6CCD, 0x6CCF, 0x6CD0, 0x6CD1, 0x6CD2, 0x6CD4, 0x6CD6, +}; +static const unsigned short euc_to_utf8_8FC7[] = { + 0x6CDA, 0x6CDC, 0x6CE0, 0x6CE7, 0x6CE9, 0x6CEB, 0x6CEC, + 0x6CEE, 0x6CF2, 0x6CF4, 0x6D04, 0x6D07, 0x6D0A, 0x6D0E, 0x6D0F, + 0x6D11, 0x6D13, 0x6D1A, 0x6D26, 0x6D27, 0x6D28, 0x6C67, 0x6D2E, + 0x6D2F, 0x6D31, 0x6D39, 0x6D3C, 0x6D3F, 0x6D57, 0x6D5E, 0x6D5F, + 0x6D61, 0x6D65, 0x6D67, 0x6D6F, 0x6D70, 0x6D7C, 0x6D82, 0x6D87, + 0x6D91, 0x6D92, 0x6D94, 0x6D96, 0x6D97, 0x6D98, 0x6DAA, 0x6DAC, + 0x6DB4, 0x6DB7, 0x6DB9, 0x6DBD, 0x6DBF, 0x6DC4, 0x6DC8, 0x6DCA, + 0x6DCE, 0x6DCF, 0x6DD6, 0x6DDB, 0x6DDD, 0x6DDF, 0x6DE0, 0x6DE2, + 0x6DE5, 0x6DE9, 0x6DEF, 0x6DF0, 0x6DF4, 0x6DF6, 0x6DFC, 0x6E00, + 0x6E04, 0x6E1E, 0x6E22, 0x6E27, 0x6E32, 0x6E36, 0x6E39, 0x6E3B, + 0x6E3C, 0x6E44, 0x6E45, 0x6E48, 0x6E49, 0x6E4B, 0x6E4F, 0x6E51, + 0x6E52, 0x6E53, 0x6E54, 0x6E57, 0x6E5C, 0x6E5D, 0x6E5E, +}; +static const unsigned short euc_to_utf8_8FC8[] = { + 0x6E62, 0x6E63, 0x6E68, 0x6E73, 0x6E7B, 0x6E7D, 0x6E8D, + 0x6E93, 0x6E99, 0x6EA0, 0x6EA7, 0x6EAD, 0x6EAE, 0x6EB1, 0x6EB3, + 0x6EBB, 0x6EBF, 0x6EC0, 0x6EC1, 0x6EC3, 0x6EC7, 0x6EC8, 0x6ECA, + 0x6ECD, 0x6ECE, 0x6ECF, 0x6EEB, 0x6EED, 0x6EEE, 0x6EF9, 0x6EFB, + 0x6EFD, 0x6F04, 0x6F08, 0x6F0A, 0x6F0C, 0x6F0D, 0x6F16, 0x6F18, + 0x6F1A, 0x6F1B, 0x6F26, 0x6F29, 0x6F2A, 0x6F2F, 0x6F30, 0x6F33, + 0x6F36, 0x6F3B, 0x6F3C, 0x6F2D, 0x6F4F, 0x6F51, 0x6F52, 0x6F53, + 0x6F57, 0x6F59, 0x6F5A, 0x6F5D, 0x6F5E, 0x6F61, 0x6F62, 0x6F68, + 0x6F6C, 0x6F7D, 0x6F7E, 0x6F83, 0x6F87, 0x6F88, 0x6F8B, 0x6F8C, + 0x6F8D, 0x6F90, 0x6F92, 0x6F93, 0x6F94, 0x6F96, 0x6F9A, 0x6F9F, + 0x6FA0, 0x6FA5, 0x6FA6, 0x6FA7, 0x6FA8, 0x6FAE, 0x6FAF, 0x6FB0, + 0x6FB5, 0x6FB6, 0x6FBC, 0x6FC5, 0x6FC7, 0x6FC8, 0x6FCA, +}; +static const unsigned short euc_to_utf8_8FC9[] = { + 0x6FDA, 0x6FDE, 0x6FE8, 0x6FE9, 0x6FF0, 0x6FF5, 0x6FF9, + 0x6FFC, 0x6FFD, 0x7000, 0x7005, 0x7006, 0x7007, 0x700D, 0x7017, + 0x7020, 0x7023, 0x702F, 0x7034, 0x7037, 0x7039, 0x703C, 0x7043, + 0x7044, 0x7048, 0x7049, 0x704A, 0x704B, 0x7054, 0x7055, 0x705D, + 0x705E, 0x704E, 0x7064, 0x7065, 0x706C, 0x706E, 0x7075, 0x7076, + 0x707E, 0x7081, 0x7085, 0x7086, 0x7094, 0x7095, 0x7096, 0x7097, + 0x7098, 0x709B, 0x70A4, 0x70AB, 0x70B0, 0x70B1, 0x70B4, 0x70B7, + 0x70CA, 0x70D1, 0x70D3, 0x70D4, 0x70D5, 0x70D6, 0x70D8, 0x70DC, + 0x70E4, 0x70FA, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x710B, + 0x710C, 0x710F, 0x711E, 0x7120, 0x712B, 0x712D, 0x712F, 0x7130, + 0x7131, 0x7138, 0x7141, 0x7145, 0x7146, 0x7147, 0x714A, 0x714B, + 0x7150, 0x7152, 0x7157, 0x715A, 0x715C, 0x715E, 0x7160, +}; +static const unsigned short euc_to_utf8_8FCA[] = { + 0x7168, 0x7179, 0x7180, 0x7185, 0x7187, 0x718C, 0x7192, + 0x719A, 0x719B, 0x71A0, 0x71A2, 0x71AF, 0x71B0, 0x71B2, 0x71B3, + 0x71BA, 0x71BF, 0x71C0, 0x71C1, 0x71C4, 0x71CB, 0x71CC, 0x71D3, + 0x71D6, 0x71D9, 0x71DA, 0x71DC, 0x71F8, 0x71FE, 0x7200, 0x7207, + 0x7208, 0x7209, 0x7213, 0x7217, 0x721A, 0x721D, 0x721F, 0x7224, + 0x722B, 0x722F, 0x7234, 0x7238, 0x7239, 0x7241, 0x7242, 0x7243, + 0x7245, 0x724E, 0x724F, 0x7250, 0x7253, 0x7255, 0x7256, 0x725A, + 0x725C, 0x725E, 0x7260, 0x7263, 0x7268, 0x726B, 0x726E, 0x726F, + 0x7271, 0x7277, 0x7278, 0x727B, 0x727C, 0x727F, 0x7284, 0x7289, + 0x728D, 0x728E, 0x7293, 0x729B, 0x72A8, 0x72AD, 0x72AE, 0x72B1, + 0x72B4, 0x72BE, 0x72C1, 0x72C7, 0x72C9, 0x72CC, 0x72D5, 0x72D6, + 0x72D8, 0x72DF, 0x72E5, 0x72F3, 0x72F4, 0x72FA, 0x72FB, +}; +static const unsigned short euc_to_utf8_8FCB[] = { + 0x72FE, 0x7302, 0x7304, 0x7305, 0x7307, 0x730B, 0x730D, + 0x7312, 0x7313, 0x7318, 0x7319, 0x731E, 0x7322, 0x7324, 0x7327, + 0x7328, 0x732C, 0x7331, 0x7332, 0x7335, 0x733A, 0x733B, 0x733D, + 0x7343, 0x734D, 0x7350, 0x7352, 0x7356, 0x7358, 0x735D, 0x735E, + 0x735F, 0x7360, 0x7366, 0x7367, 0x7369, 0x736B, 0x736C, 0x736E, + 0x736F, 0x7371, 0x7377, 0x7379, 0x737C, 0x7380, 0x7381, 0x7383, + 0x7385, 0x7386, 0x738E, 0x7390, 0x7393, 0x7395, 0x7397, 0x7398, + 0x739C, 0x739E, 0x739F, 0x73A0, 0x73A2, 0x73A5, 0x73A6, 0x73AA, + 0x73AB, 0x73AD, 0x73B5, 0x73B7, 0x73B9, 0x73BC, 0x73BD, 0x73BF, + 0x73C5, 0x73C6, 0x73C9, 0x73CB, 0x73CC, 0x73CF, 0x73D2, 0x73D3, + 0x73D6, 0x73D9, 0x73DD, 0x73E1, 0x73E3, 0x73E6, 0x73E7, 0x73E9, + 0x73F4, 0x73F5, 0x73F7, 0x73F9, 0x73FA, 0x73FB, 0x73FD, +}; +static const unsigned short euc_to_utf8_8FCC[] = { + 0x73FF, 0x7400, 0x7401, 0x7404, 0x7407, 0x740A, 0x7411, + 0x741A, 0x741B, 0x7424, 0x7426, 0x7428, 0x7429, 0x742A, 0x742B, + 0x742C, 0x742D, 0x742E, 0x742F, 0x7430, 0x7431, 0x7439, 0x7440, + 0x7443, 0x7444, 0x7446, 0x7447, 0x744B, 0x744D, 0x7451, 0x7452, + 0x7457, 0x745D, 0x7462, 0x7466, 0x7467, 0x7468, 0x746B, 0x746D, + 0x746E, 0x7471, 0x7472, 0x7480, 0x7481, 0x7485, 0x7486, 0x7487, + 0x7489, 0x748F, 0x7490, 0x7491, 0x7492, 0x7498, 0x7499, 0x749A, + 0x749C, 0x749F, 0x74A0, 0x74A1, 0x74A3, 0x74A6, 0x74A8, 0x74A9, + 0x74AA, 0x74AB, 0x74AE, 0x74AF, 0x74B1, 0x74B2, 0x74B5, 0x74B9, + 0x74BB, 0x74BF, 0x74C8, 0x74C9, 0x74CC, 0x74D0, 0x74D3, 0x74D8, + 0x74DA, 0x74DB, 0x74DE, 0x74DF, 0x74E4, 0x74E8, 0x74EA, 0x74EB, + 0x74EF, 0x74F4, 0x74FA, 0x74FB, 0x74FC, 0x74FF, 0x7506, +}; +static const unsigned short euc_to_utf8_8FCD[] = { + 0x7512, 0x7516, 0x7517, 0x7520, 0x7521, 0x7524, 0x7527, + 0x7529, 0x752A, 0x752F, 0x7536, 0x7539, 0x753D, 0x753E, 0x753F, + 0x7540, 0x7543, 0x7547, 0x7548, 0x754E, 0x7550, 0x7552, 0x7557, + 0x755E, 0x755F, 0x7561, 0x756F, 0x7571, 0x7579, 0x757A, 0x757B, + 0x757C, 0x757D, 0x757E, 0x7581, 0x7585, 0x7590, 0x7592, 0x7593, + 0x7595, 0x7599, 0x759C, 0x75A2, 0x75A4, 0x75B4, 0x75BA, 0x75BF, + 0x75C0, 0x75C1, 0x75C4, 0x75C6, 0x75CC, 0x75CE, 0x75CF, 0x75D7, + 0x75DC, 0x75DF, 0x75E0, 0x75E1, 0x75E4, 0x75E7, 0x75EC, 0x75EE, + 0x75EF, 0x75F1, 0x75F9, 0x7600, 0x7602, 0x7603, 0x7604, 0x7607, + 0x7608, 0x760A, 0x760C, 0x760F, 0x7612, 0x7613, 0x7615, 0x7616, + 0x7619, 0x761B, 0x761C, 0x761D, 0x761E, 0x7623, 0x7625, 0x7626, + 0x7629, 0x762D, 0x7632, 0x7633, 0x7635, 0x7638, 0x7639, +}; +static const unsigned short euc_to_utf8_8FCE[] = { + 0x763A, 0x763C, 0x764A, 0x7640, 0x7641, 0x7643, 0x7644, + 0x7645, 0x7649, 0x764B, 0x7655, 0x7659, 0x765F, 0x7664, 0x7665, + 0x766D, 0x766E, 0x766F, 0x7671, 0x7674, 0x7681, 0x7685, 0x768C, + 0x768D, 0x7695, 0x769B, 0x769C, 0x769D, 0x769F, 0x76A0, 0x76A2, + 0x76A3, 0x76A4, 0x76A5, 0x76A6, 0x76A7, 0x76A8, 0x76AA, 0x76AD, + 0x76BD, 0x76C1, 0x76C5, 0x76C9, 0x76CB, 0x76CC, 0x76CE, 0x76D4, + 0x76D9, 0x76E0, 0x76E6, 0x76E8, 0x76EC, 0x76F0, 0x76F1, 0x76F6, + 0x76F9, 0x76FC, 0x7700, 0x7706, 0x770A, 0x770E, 0x7712, 0x7714, + 0x7715, 0x7717, 0x7719, 0x771A, 0x771C, 0x7722, 0x7728, 0x772D, + 0x772E, 0x772F, 0x7734, 0x7735, 0x7736, 0x7739, 0x773D, 0x773E, + 0x7742, 0x7745, 0x7746, 0x774A, 0x774D, 0x774E, 0x774F, 0x7752, + 0x7756, 0x7757, 0x775C, 0x775E, 0x775F, 0x7760, 0x7762, +}; +static const unsigned short euc_to_utf8_8FCF[] = { + 0x7764, 0x7767, 0x776A, 0x776C, 0x7770, 0x7772, 0x7773, + 0x7774, 0x777A, 0x777D, 0x7780, 0x7784, 0x778C, 0x778D, 0x7794, + 0x7795, 0x7796, 0x779A, 0x779F, 0x77A2, 0x77A7, 0x77AA, 0x77AE, + 0x77AF, 0x77B1, 0x77B5, 0x77BE, 0x77C3, 0x77C9, 0x77D1, 0x77D2, + 0x77D5, 0x77D9, 0x77DE, 0x77DF, 0x77E0, 0x77E4, 0x77E6, 0x77EA, + 0x77EC, 0x77F0, 0x77F1, 0x77F4, 0x77F8, 0x77FB, 0x7805, 0x7806, + 0x7809, 0x780D, 0x780E, 0x7811, 0x781D, 0x7821, 0x7822, 0x7823, + 0x782D, 0x782E, 0x7830, 0x7835, 0x7837, 0x7843, 0x7844, 0x7847, + 0x7848, 0x784C, 0x784E, 0x7852, 0x785C, 0x785E, 0x7860, 0x7861, + 0x7863, 0x7864, 0x7868, 0x786A, 0x786E, 0x787A, 0x787E, 0x788A, + 0x788F, 0x7894, 0x7898, 0x78A1, 0x789D, 0x789E, 0x789F, 0x78A4, + 0x78A8, 0x78AC, 0x78AD, 0x78B0, 0x78B1, 0x78B2, 0x78B3, +}; +static const unsigned short euc_to_utf8_8FD0[] = { + 0x78BB, 0x78BD, 0x78BF, 0x78C7, 0x78C8, 0x78C9, 0x78CC, + 0x78CE, 0x78D2, 0x78D3, 0x78D5, 0x78D6, 0x78E4, 0x78DB, 0x78DF, + 0x78E0, 0x78E1, 0x78E6, 0x78EA, 0x78F2, 0x78F3, 0x7900, 0x78F6, + 0x78F7, 0x78FA, 0x78FB, 0x78FF, 0x7906, 0x790C, 0x7910, 0x791A, + 0x791C, 0x791E, 0x791F, 0x7920, 0x7925, 0x7927, 0x7929, 0x792D, + 0x7931, 0x7934, 0x7935, 0x793B, 0x793D, 0x793F, 0x7944, 0x7945, + 0x7946, 0x794A, 0x794B, 0x794F, 0x7951, 0x7954, 0x7958, 0x795B, + 0x795C, 0x7967, 0x7969, 0x796B, 0x7972, 0x7979, 0x797B, 0x797C, + 0x797E, 0x798B, 0x798C, 0x7991, 0x7993, 0x7994, 0x7995, 0x7996, + 0x7998, 0x799B, 0x799C, 0x79A1, 0x79A8, 0x79A9, 0x79AB, 0x79AF, + 0x79B1, 0x79B4, 0x79B8, 0x79BB, 0x79C2, 0x79C4, 0x79C7, 0x79C8, + 0x79CA, 0x79CF, 0x79D4, 0x79D6, 0x79DA, 0x79DD, 0x79DE, +}; +static const unsigned short euc_to_utf8_8FD1[] = { + 0x79E0, 0x79E2, 0x79E5, 0x79EA, 0x79EB, 0x79ED, 0x79F1, + 0x79F8, 0x79FC, 0x7A02, 0x7A03, 0x7A07, 0x7A09, 0x7A0A, 0x7A0C, + 0x7A11, 0x7A15, 0x7A1B, 0x7A1E, 0x7A21, 0x7A27, 0x7A2B, 0x7A2D, + 0x7A2F, 0x7A30, 0x7A34, 0x7A35, 0x7A38, 0x7A39, 0x7A3A, 0x7A44, + 0x7A45, 0x7A47, 0x7A48, 0x7A4C, 0x7A55, 0x7A56, 0x7A59, 0x7A5C, + 0x7A5D, 0x7A5F, 0x7A60, 0x7A65, 0x7A67, 0x7A6A, 0x7A6D, 0x7A75, + 0x7A78, 0x7A7E, 0x7A80, 0x7A82, 0x7A85, 0x7A86, 0x7A8A, 0x7A8B, + 0x7A90, 0x7A91, 0x7A94, 0x7A9E, 0x7AA0, 0x7AA3, 0x7AAC, 0x7AB3, + 0x7AB5, 0x7AB9, 0x7ABB, 0x7ABC, 0x7AC6, 0x7AC9, 0x7ACC, 0x7ACE, + 0x7AD1, 0x7ADB, 0x7AE8, 0x7AE9, 0x7AEB, 0x7AEC, 0x7AF1, 0x7AF4, + 0x7AFB, 0x7AFD, 0x7AFE, 0x7B07, 0x7B14, 0x7B1F, 0x7B23, 0x7B27, + 0x7B29, 0x7B2A, 0x7B2B, 0x7B2D, 0x7B2E, 0x7B2F, 0x7B30, +}; +static const unsigned short euc_to_utf8_8FD2[] = { + 0x7B31, 0x7B34, 0x7B3D, 0x7B3F, 0x7B40, 0x7B41, 0x7B47, + 0x7B4E, 0x7B55, 0x7B60, 0x7B64, 0x7B66, 0x7B69, 0x7B6A, 0x7B6D, + 0x7B6F, 0x7B72, 0x7B73, 0x7B77, 0x7B84, 0x7B89, 0x7B8E, 0x7B90, + 0x7B91, 0x7B96, 0x7B9B, 0x7B9E, 0x7BA0, 0x7BA5, 0x7BAC, 0x7BAF, + 0x7BB0, 0x7BB2, 0x7BB5, 0x7BB6, 0x7BBA, 0x7BBB, 0x7BBC, 0x7BBD, + 0x7BC2, 0x7BC5, 0x7BC8, 0x7BCA, 0x7BD4, 0x7BD6, 0x7BD7, 0x7BD9, + 0x7BDA, 0x7BDB, 0x7BE8, 0x7BEA, 0x7BF2, 0x7BF4, 0x7BF5, 0x7BF8, + 0x7BF9, 0x7BFA, 0x7BFC, 0x7BFE, 0x7C01, 0x7C02, 0x7C03, 0x7C04, + 0x7C06, 0x7C09, 0x7C0B, 0x7C0C, 0x7C0E, 0x7C0F, 0x7C19, 0x7C1B, + 0x7C20, 0x7C25, 0x7C26, 0x7C28, 0x7C2C, 0x7C31, 0x7C33, 0x7C34, + 0x7C36, 0x7C39, 0x7C3A, 0x7C46, 0x7C4A, 0x7C55, 0x7C51, 0x7C52, + 0x7C53, 0x7C59, 0x7C5A, 0x7C5B, 0x7C5C, 0x7C5D, 0x7C5E, +}; +static const unsigned short euc_to_utf8_8FD3[] = { + 0x7C61, 0x7C63, 0x7C67, 0x7C69, 0x7C6D, 0x7C6E, 0x7C70, + 0x7C72, 0x7C79, 0x7C7C, 0x7C7D, 0x7C86, 0x7C87, 0x7C8F, 0x7C94, + 0x7C9E, 0x7CA0, 0x7CA6, 0x7CB0, 0x7CB6, 0x7CB7, 0x7CBA, 0x7CBB, + 0x7CBC, 0x7CBF, 0x7CC4, 0x7CC7, 0x7CC8, 0x7CC9, 0x7CCD, 0x7CCF, + 0x7CD3, 0x7CD4, 0x7CD5, 0x7CD7, 0x7CD9, 0x7CDA, 0x7CDD, 0x7CE6, + 0x7CE9, 0x7CEB, 0x7CF5, 0x7D03, 0x7D07, 0x7D08, 0x7D09, 0x7D0F, + 0x7D11, 0x7D12, 0x7D13, 0x7D16, 0x7D1D, 0x7D1E, 0x7D23, 0x7D26, + 0x7D2A, 0x7D2D, 0x7D31, 0x7D3C, 0x7D3D, 0x7D3E, 0x7D40, 0x7D41, + 0x7D47, 0x7D48, 0x7D4D, 0x7D51, 0x7D53, 0x7D57, 0x7D59, 0x7D5A, + 0x7D5C, 0x7D5D, 0x7D65, 0x7D67, 0x7D6A, 0x7D70, 0x7D78, 0x7D7A, + 0x7D7B, 0x7D7F, 0x7D81, 0x7D82, 0x7D83, 0x7D85, 0x7D86, 0x7D88, + 0x7D8B, 0x7D8C, 0x7D8D, 0x7D91, 0x7D96, 0x7D97, 0x7D9D, +}; +static const unsigned short euc_to_utf8_8FD4[] = { + 0x7D9E, 0x7DA6, 0x7DA7, 0x7DAA, 0x7DB3, 0x7DB6, 0x7DB7, + 0x7DB9, 0x7DC2, 0x7DC3, 0x7DC4, 0x7DC5, 0x7DC6, 0x7DCC, 0x7DCD, + 0x7DCE, 0x7DD7, 0x7DD9, 0x7E00, 0x7DE2, 0x7DE5, 0x7DE6, 0x7DEA, + 0x7DEB, 0x7DED, 0x7DF1, 0x7DF5, 0x7DF6, 0x7DF9, 0x7DFA, 0x7E08, + 0x7E10, 0x7E11, 0x7E15, 0x7E17, 0x7E1C, 0x7E1D, 0x7E20, 0x7E27, + 0x7E28, 0x7E2C, 0x7E2D, 0x7E2F, 0x7E33, 0x7E36, 0x7E3F, 0x7E44, + 0x7E45, 0x7E47, 0x7E4E, 0x7E50, 0x7E52, 0x7E58, 0x7E5F, 0x7E61, + 0x7E62, 0x7E65, 0x7E6B, 0x7E6E, 0x7E6F, 0x7E73, 0x7E78, 0x7E7E, + 0x7E81, 0x7E86, 0x7E87, 0x7E8A, 0x7E8D, 0x7E91, 0x7E95, 0x7E98, + 0x7E9A, 0x7E9D, 0x7E9E, 0x7F3C, 0x7F3B, 0x7F3D, 0x7F3E, 0x7F3F, + 0x7F43, 0x7F44, 0x7F47, 0x7F4F, 0x7F52, 0x7F53, 0x7F5B, 0x7F5C, + 0x7F5D, 0x7F61, 0x7F63, 0x7F64, 0x7F65, 0x7F66, 0x7F6D, +}; +static const unsigned short euc_to_utf8_8FD5[] = { + 0x7F71, 0x7F7D, 0x7F7E, 0x7F7F, 0x7F80, 0x7F8B, 0x7F8D, + 0x7F8F, 0x7F90, 0x7F91, 0x7F96, 0x7F97, 0x7F9C, 0x7FA1, 0x7FA2, + 0x7FA6, 0x7FAA, 0x7FAD, 0x7FB4, 0x7FBC, 0x7FBF, 0x7FC0, 0x7FC3, + 0x7FC8, 0x7FCE, 0x7FCF, 0x7FDB, 0x7FDF, 0x7FE3, 0x7FE5, 0x7FE8, + 0x7FEC, 0x7FEE, 0x7FEF, 0x7FF2, 0x7FFA, 0x7FFD, 0x7FFE, 0x7FFF, + 0x8007, 0x8008, 0x800A, 0x800D, 0x800E, 0x800F, 0x8011, 0x8013, + 0x8014, 0x8016, 0x801D, 0x801E, 0x801F, 0x8020, 0x8024, 0x8026, + 0x802C, 0x802E, 0x8030, 0x8034, 0x8035, 0x8037, 0x8039, 0x803A, + 0x803C, 0x803E, 0x8040, 0x8044, 0x8060, 0x8064, 0x8066, 0x806D, + 0x8071, 0x8075, 0x8081, 0x8088, 0x808E, 0x809C, 0x809E, 0x80A6, + 0x80A7, 0x80AB, 0x80B8, 0x80B9, 0x80C8, 0x80CD, 0x80CF, 0x80D2, + 0x80D4, 0x80D5, 0x80D7, 0x80D8, 0x80E0, 0x80ED, 0x80EE, +}; +static const unsigned short euc_to_utf8_8FD6[] = { + 0x80F0, 0x80F2, 0x80F3, 0x80F6, 0x80F9, 0x80FA, 0x80FE, + 0x8103, 0x810B, 0x8116, 0x8117, 0x8118, 0x811C, 0x811E, 0x8120, + 0x8124, 0x8127, 0x812C, 0x8130, 0x8135, 0x813A, 0x813C, 0x8145, + 0x8147, 0x814A, 0x814C, 0x8152, 0x8157, 0x8160, 0x8161, 0x8167, + 0x8168, 0x8169, 0x816D, 0x816F, 0x8177, 0x8181, 0x8190, 0x8184, + 0x8185, 0x8186, 0x818B, 0x818E, 0x8196, 0x8198, 0x819B, 0x819E, + 0x81A2, 0x81AE, 0x81B2, 0x81B4, 0x81BB, 0x81CB, 0x81C3, 0x81C5, + 0x81CA, 0x81CE, 0x81CF, 0x81D5, 0x81D7, 0x81DB, 0x81DD, 0x81DE, + 0x81E1, 0x81E4, 0x81EB, 0x81EC, 0x81F0, 0x81F1, 0x81F2, 0x81F5, + 0x81F6, 0x81F8, 0x81F9, 0x81FD, 0x81FF, 0x8200, 0x8203, 0x820F, + 0x8213, 0x8214, 0x8219, 0x821A, 0x821D, 0x8221, 0x8222, 0x8228, + 0x8232, 0x8234, 0x823A, 0x8243, 0x8244, 0x8245, 0x8246, +}; +static const unsigned short euc_to_utf8_8FD7[] = { + 0x824B, 0x824E, 0x824F, 0x8251, 0x8256, 0x825C, 0x8260, + 0x8263, 0x8267, 0x826D, 0x8274, 0x827B, 0x827D, 0x827F, 0x8280, + 0x8281, 0x8283, 0x8284, 0x8287, 0x8289, 0x828A, 0x828E, 0x8291, + 0x8294, 0x8296, 0x8298, 0x829A, 0x829B, 0x82A0, 0x82A1, 0x82A3, + 0x82A4, 0x82A7, 0x82A8, 0x82A9, 0x82AA, 0x82AE, 0x82B0, 0x82B2, + 0x82B4, 0x82B7, 0x82BA, 0x82BC, 0x82BE, 0x82BF, 0x82C6, 0x82D0, + 0x82D5, 0x82DA, 0x82E0, 0x82E2, 0x82E4, 0x82E8, 0x82EA, 0x82ED, + 0x82EF, 0x82F6, 0x82F7, 0x82FD, 0x82FE, 0x8300, 0x8301, 0x8307, + 0x8308, 0x830A, 0x830B, 0x8354, 0x831B, 0x831D, 0x831E, 0x831F, + 0x8321, 0x8322, 0x832C, 0x832D, 0x832E, 0x8330, 0x8333, 0x8337, + 0x833A, 0x833C, 0x833D, 0x8342, 0x8343, 0x8344, 0x8347, 0x834D, + 0x834E, 0x8351, 0x8355, 0x8356, 0x8357, 0x8370, 0x8378, +}; +static const unsigned short euc_to_utf8_8FD8[] = { + 0x837D, 0x837F, 0x8380, 0x8382, 0x8384, 0x8386, 0x838D, + 0x8392, 0x8394, 0x8395, 0x8398, 0x8399, 0x839B, 0x839C, 0x839D, + 0x83A6, 0x83A7, 0x83A9, 0x83AC, 0x83BE, 0x83BF, 0x83C0, 0x83C7, + 0x83C9, 0x83CF, 0x83D0, 0x83D1, 0x83D4, 0x83DD, 0x8353, 0x83E8, + 0x83EA, 0x83F6, 0x83F8, 0x83F9, 0x83FC, 0x8401, 0x8406, 0x840A, + 0x840F, 0x8411, 0x8415, 0x8419, 0x83AD, 0x842F, 0x8439, 0x8445, + 0x8447, 0x8448, 0x844A, 0x844D, 0x844F, 0x8451, 0x8452, 0x8456, + 0x8458, 0x8459, 0x845A, 0x845C, 0x8460, 0x8464, 0x8465, 0x8467, + 0x846A, 0x8470, 0x8473, 0x8474, 0x8476, 0x8478, 0x847C, 0x847D, + 0x8481, 0x8485, 0x8492, 0x8493, 0x8495, 0x849E, 0x84A6, 0x84A8, + 0x84A9, 0x84AA, 0x84AF, 0x84B1, 0x84B4, 0x84BA, 0x84BD, 0x84BE, + 0x84C0, 0x84C2, 0x84C7, 0x84C8, 0x84CC, 0x84CF, 0x84D3, +}; +static const unsigned short euc_to_utf8_8FD9[] = { + 0x84DC, 0x84E7, 0x84EA, 0x84EF, 0x84F0, 0x84F1, 0x84F2, + 0x84F7, 0x8532, 0x84FA, 0x84FB, 0x84FD, 0x8502, 0x8503, 0x8507, + 0x850C, 0x850E, 0x8510, 0x851C, 0x851E, 0x8522, 0x8523, 0x8524, + 0x8525, 0x8527, 0x852A, 0x852B, 0x852F, 0x8533, 0x8534, 0x8536, + 0x853F, 0x8546, 0x854F, 0x8550, 0x8551, 0x8552, 0x8553, 0x8556, + 0x8559, 0x855C, 0x855D, 0x855E, 0x855F, 0x8560, 0x8561, 0x8562, + 0x8564, 0x856B, 0x856F, 0x8579, 0x857A, 0x857B, 0x857D, 0x857F, + 0x8581, 0x8585, 0x8586, 0x8589, 0x858B, 0x858C, 0x858F, 0x8593, + 0x8598, 0x859D, 0x859F, 0x85A0, 0x85A2, 0x85A5, 0x85A7, 0x85B4, + 0x85B6, 0x85B7, 0x85B8, 0x85BC, 0x85BD, 0x85BE, 0x85BF, 0x85C2, + 0x85C7, 0x85CA, 0x85CB, 0x85CE, 0x85AD, 0x85D8, 0x85DA, 0x85DF, + 0x85E0, 0x85E6, 0x85E8, 0x85ED, 0x85F3, 0x85F6, 0x85FC, +}; +static const unsigned short euc_to_utf8_8FDA[] = { + 0x85FF, 0x8600, 0x8604, 0x8605, 0x860D, 0x860E, 0x8610, + 0x8611, 0x8612, 0x8618, 0x8619, 0x861B, 0x861E, 0x8621, 0x8627, + 0x8629, 0x8636, 0x8638, 0x863A, 0x863C, 0x863D, 0x8640, 0x8642, + 0x8646, 0x8652, 0x8653, 0x8656, 0x8657, 0x8658, 0x8659, 0x865D, + 0x8660, 0x8661, 0x8662, 0x8663, 0x8664, 0x8669, 0x866C, 0x866F, + 0x8675, 0x8676, 0x8677, 0x867A, 0x868D, 0x8691, 0x8696, 0x8698, + 0x869A, 0x869C, 0x86A1, 0x86A6, 0x86A7, 0x86A8, 0x86AD, 0x86B1, + 0x86B3, 0x86B4, 0x86B5, 0x86B7, 0x86B8, 0x86B9, 0x86BF, 0x86C0, + 0x86C1, 0x86C3, 0x86C5, 0x86D1, 0x86D2, 0x86D5, 0x86D7, 0x86DA, + 0x86DC, 0x86E0, 0x86E3, 0x86E5, 0x86E7, 0x8688, 0x86FA, 0x86FC, + 0x86FD, 0x8704, 0x8705, 0x8707, 0x870B, 0x870E, 0x870F, 0x8710, + 0x8713, 0x8714, 0x8719, 0x871E, 0x871F, 0x8721, 0x8723, +}; +static const unsigned short euc_to_utf8_8FDB[] = { + 0x8728, 0x872E, 0x872F, 0x8731, 0x8732, 0x8739, 0x873A, + 0x873C, 0x873D, 0x873E, 0x8740, 0x8743, 0x8745, 0x874D, 0x8758, + 0x875D, 0x8761, 0x8764, 0x8765, 0x876F, 0x8771, 0x8772, 0x877B, + 0x8783, 0x8784, 0x8785, 0x8786, 0x8787, 0x8788, 0x8789, 0x878B, + 0x878C, 0x8790, 0x8793, 0x8795, 0x8797, 0x8798, 0x8799, 0x879E, + 0x87A0, 0x87A3, 0x87A7, 0x87AC, 0x87AD, 0x87AE, 0x87B1, 0x87B5, + 0x87BE, 0x87BF, 0x87C1, 0x87C8, 0x87C9, 0x87CA, 0x87CE, 0x87D5, + 0x87D6, 0x87D9, 0x87DA, 0x87DC, 0x87DF, 0x87E2, 0x87E3, 0x87E4, + 0x87EA, 0x87EB, 0x87ED, 0x87F1, 0x87F3, 0x87F8, 0x87FA, 0x87FF, + 0x8801, 0x8803, 0x8806, 0x8809, 0x880A, 0x880B, 0x8810, 0x8819, + 0x8812, 0x8813, 0x8814, 0x8818, 0x881A, 0x881B, 0x881C, 0x881E, + 0x881F, 0x8828, 0x882D, 0x882E, 0x8830, 0x8832, 0x8835, +}; +static const unsigned short euc_to_utf8_8FDC[] = { + 0x883A, 0x883C, 0x8841, 0x8843, 0x8845, 0x8848, 0x8849, + 0x884A, 0x884B, 0x884E, 0x8851, 0x8855, 0x8856, 0x8858, 0x885A, + 0x885C, 0x885F, 0x8860, 0x8864, 0x8869, 0x8871, 0x8879, 0x887B, + 0x8880, 0x8898, 0x889A, 0x889B, 0x889C, 0x889F, 0x88A0, 0x88A8, + 0x88AA, 0x88BA, 0x88BD, 0x88BE, 0x88C0, 0x88CA, 0x88CB, 0x88CC, + 0x88CD, 0x88CE, 0x88D1, 0x88D2, 0x88D3, 0x88DB, 0x88DE, 0x88E7, + 0x88EF, 0x88F0, 0x88F1, 0x88F5, 0x88F7, 0x8901, 0x8906, 0x890D, + 0x890E, 0x890F, 0x8915, 0x8916, 0x8918, 0x8919, 0x891A, 0x891C, + 0x8920, 0x8926, 0x8927, 0x8928, 0x8930, 0x8931, 0x8932, 0x8935, + 0x8939, 0x893A, 0x893E, 0x8940, 0x8942, 0x8945, 0x8946, 0x8949, + 0x894F, 0x8952, 0x8957, 0x895A, 0x895B, 0x895C, 0x8961, 0x8962, + 0x8963, 0x896B, 0x896E, 0x8970, 0x8973, 0x8975, 0x897A, +}; +static const unsigned short euc_to_utf8_8FDD[] = { + 0x897B, 0x897C, 0x897D, 0x8989, 0x898D, 0x8990, 0x8994, + 0x8995, 0x899B, 0x899C, 0x899F, 0x89A0, 0x89A5, 0x89B0, 0x89B4, + 0x89B5, 0x89B6, 0x89B7, 0x89BC, 0x89D4, 0x89D5, 0x89D6, 0x89D7, + 0x89D8, 0x89E5, 0x89E9, 0x89EB, 0x89ED, 0x89F1, 0x89F3, 0x89F6, + 0x89F9, 0x89FD, 0x89FF, 0x8A04, 0x8A05, 0x8A07, 0x8A0F, 0x8A11, + 0x8A12, 0x8A14, 0x8A15, 0x8A1E, 0x8A20, 0x8A22, 0x8A24, 0x8A26, + 0x8A2B, 0x8A2C, 0x8A2F, 0x8A35, 0x8A37, 0x8A3D, 0x8A3E, 0x8A40, + 0x8A43, 0x8A45, 0x8A47, 0x8A49, 0x8A4D, 0x8A4E, 0x8A53, 0x8A56, + 0x8A57, 0x8A58, 0x8A5C, 0x8A5D, 0x8A61, 0x8A65, 0x8A67, 0x8A75, + 0x8A76, 0x8A77, 0x8A79, 0x8A7A, 0x8A7B, 0x8A7E, 0x8A7F, 0x8A80, + 0x8A83, 0x8A86, 0x8A8B, 0x8A8F, 0x8A90, 0x8A92, 0x8A96, 0x8A97, + 0x8A99, 0x8A9F, 0x8AA7, 0x8AA9, 0x8AAE, 0x8AAF, 0x8AB3, +}; +static const unsigned short euc_to_utf8_8FDE[] = { + 0x8AB6, 0x8AB7, 0x8ABB, 0x8ABE, 0x8AC3, 0x8AC6, 0x8AC8, + 0x8AC9, 0x8ACA, 0x8AD1, 0x8AD3, 0x8AD4, 0x8AD5, 0x8AD7, 0x8ADD, + 0x8ADF, 0x8AEC, 0x8AF0, 0x8AF4, 0x8AF5, 0x8AF6, 0x8AFC, 0x8AFF, + 0x8B05, 0x8B06, 0x8B0B, 0x8B11, 0x8B1C, 0x8B1E, 0x8B1F, 0x8B0A, + 0x8B2D, 0x8B30, 0x8B37, 0x8B3C, 0x8B42, 0x8B43, 0x8B44, 0x8B45, + 0x8B46, 0x8B48, 0x8B52, 0x8B53, 0x8B54, 0x8B59, 0x8B4D, 0x8B5E, + 0x8B63, 0x8B6D, 0x8B76, 0x8B78, 0x8B79, 0x8B7C, 0x8B7E, 0x8B81, + 0x8B84, 0x8B85, 0x8B8B, 0x8B8D, 0x8B8F, 0x8B94, 0x8B95, 0x8B9C, + 0x8B9E, 0x8B9F, 0x8C38, 0x8C39, 0x8C3D, 0x8C3E, 0x8C45, 0x8C47, + 0x8C49, 0x8C4B, 0x8C4F, 0x8C51, 0x8C53, 0x8C54, 0x8C57, 0x8C58, + 0x8C5B, 0x8C5D, 0x8C59, 0x8C63, 0x8C64, 0x8C66, 0x8C68, 0x8C69, + 0x8C6D, 0x8C73, 0x8C75, 0x8C76, 0x8C7B, 0x8C7E, 0x8C86, +}; +static const unsigned short euc_to_utf8_8FDF[] = { + 0x8C87, 0x8C8B, 0x8C90, 0x8C92, 0x8C93, 0x8C99, 0x8C9B, + 0x8C9C, 0x8CA4, 0x8CB9, 0x8CBA, 0x8CC5, 0x8CC6, 0x8CC9, 0x8CCB, + 0x8CCF, 0x8CD6, 0x8CD5, 0x8CD9, 0x8CDD, 0x8CE1, 0x8CE8, 0x8CEC, + 0x8CEF, 0x8CF0, 0x8CF2, 0x8CF5, 0x8CF7, 0x8CF8, 0x8CFE, 0x8CFF, + 0x8D01, 0x8D03, 0x8D09, 0x8D12, 0x8D17, 0x8D1B, 0x8D65, 0x8D69, + 0x8D6C, 0x8D6E, 0x8D7F, 0x8D82, 0x8D84, 0x8D88, 0x8D8D, 0x8D90, + 0x8D91, 0x8D95, 0x8D9E, 0x8D9F, 0x8DA0, 0x8DA6, 0x8DAB, 0x8DAC, + 0x8DAF, 0x8DB2, 0x8DB5, 0x8DB7, 0x8DB9, 0x8DBB, 0x8DC0, 0x8DC5, + 0x8DC6, 0x8DC7, 0x8DC8, 0x8DCA, 0x8DCE, 0x8DD1, 0x8DD4, 0x8DD5, + 0x8DD7, 0x8DD9, 0x8DE4, 0x8DE5, 0x8DE7, 0x8DEC, 0x8DF0, 0x8DBC, + 0x8DF1, 0x8DF2, 0x8DF4, 0x8DFD, 0x8E01, 0x8E04, 0x8E05, 0x8E06, + 0x8E0B, 0x8E11, 0x8E14, 0x8E16, 0x8E20, 0x8E21, 0x8E22, +}; +static const unsigned short euc_to_utf8_8FE0[] = { + 0x8E23, 0x8E26, 0x8E27, 0x8E31, 0x8E33, 0x8E36, 0x8E37, + 0x8E38, 0x8E39, 0x8E3D, 0x8E40, 0x8E41, 0x8E4B, 0x8E4D, 0x8E4E, + 0x8E4F, 0x8E54, 0x8E5B, 0x8E5C, 0x8E5D, 0x8E5E, 0x8E61, 0x8E62, + 0x8E69, 0x8E6C, 0x8E6D, 0x8E6F, 0x8E70, 0x8E71, 0x8E79, 0x8E7A, + 0x8E7B, 0x8E82, 0x8E83, 0x8E89, 0x8E90, 0x8E92, 0x8E95, 0x8E9A, + 0x8E9B, 0x8E9D, 0x8E9E, 0x8EA2, 0x8EA7, 0x8EA9, 0x8EAD, 0x8EAE, + 0x8EB3, 0x8EB5, 0x8EBA, 0x8EBB, 0x8EC0, 0x8EC1, 0x8EC3, 0x8EC4, + 0x8EC7, 0x8ECF, 0x8ED1, 0x8ED4, 0x8EDC, 0x8EE8, 0x8EEE, 0x8EF0, + 0x8EF1, 0x8EF7, 0x8EF9, 0x8EFA, 0x8EED, 0x8F00, 0x8F02, 0x8F07, + 0x8F08, 0x8F0F, 0x8F10, 0x8F16, 0x8F17, 0x8F18, 0x8F1E, 0x8F20, + 0x8F21, 0x8F23, 0x8F25, 0x8F27, 0x8F28, 0x8F2C, 0x8F2D, 0x8F2E, + 0x8F34, 0x8F35, 0x8F36, 0x8F37, 0x8F3A, 0x8F40, 0x8F41, +}; +static const unsigned short euc_to_utf8_8FE1[] = { + 0x8F43, 0x8F47, 0x8F4F, 0x8F51, 0x8F52, 0x8F53, 0x8F54, + 0x8F55, 0x8F58, 0x8F5D, 0x8F5E, 0x8F65, 0x8F9D, 0x8FA0, 0x8FA1, + 0x8FA4, 0x8FA5, 0x8FA6, 0x8FB5, 0x8FB6, 0x8FB8, 0x8FBE, 0x8FC0, + 0x8FC1, 0x8FC6, 0x8FCA, 0x8FCB, 0x8FCD, 0x8FD0, 0x8FD2, 0x8FD3, + 0x8FD5, 0x8FE0, 0x8FE3, 0x8FE4, 0x8FE8, 0x8FEE, 0x8FF1, 0x8FF5, + 0x8FF6, 0x8FFB, 0x8FFE, 0x9002, 0x9004, 0x9008, 0x900C, 0x9018, + 0x901B, 0x9028, 0x9029, 0x902F, 0x902A, 0x902C, 0x902D, 0x9033, + 0x9034, 0x9037, 0x903F, 0x9043, 0x9044, 0x904C, 0x905B, 0x905D, + 0x9062, 0x9066, 0x9067, 0x906C, 0x9070, 0x9074, 0x9079, 0x9085, + 0x9088, 0x908B, 0x908C, 0x908E, 0x9090, 0x9095, 0x9097, 0x9098, + 0x9099, 0x909B, 0x90A0, 0x90A1, 0x90A2, 0x90A5, 0x90B0, 0x90B2, + 0x90B3, 0x90B4, 0x90B6, 0x90BD, 0x90CC, 0x90BE, 0x90C3, +}; +static const unsigned short euc_to_utf8_8FE2[] = { + 0x90C4, 0x90C5, 0x90C7, 0x90C8, 0x90D5, 0x90D7, 0x90D8, + 0x90D9, 0x90DC, 0x90DD, 0x90DF, 0x90E5, 0x90D2, 0x90F6, 0x90EB, + 0x90EF, 0x90F0, 0x90F4, 0x90FE, 0x90FF, 0x9100, 0x9104, 0x9105, + 0x9106, 0x9108, 0x910D, 0x9110, 0x9114, 0x9116, 0x9117, 0x9118, + 0x911A, 0x911C, 0x911E, 0x9120, 0x9125, 0x9122, 0x9123, 0x9127, + 0x9129, 0x912E, 0x912F, 0x9131, 0x9134, 0x9136, 0x9137, 0x9139, + 0x913A, 0x913C, 0x913D, 0x9143, 0x9147, 0x9148, 0x914F, 0x9153, + 0x9157, 0x9159, 0x915A, 0x915B, 0x9161, 0x9164, 0x9167, 0x916D, + 0x9174, 0x9179, 0x917A, 0x917B, 0x9181, 0x9183, 0x9185, 0x9186, + 0x918A, 0x918E, 0x9191, 0x9193, 0x9194, 0x9195, 0x9198, 0x919E, + 0x91A1, 0x91A6, 0x91A8, 0x91AC, 0x91AD, 0x91AE, 0x91B0, 0x91B1, + 0x91B2, 0x91B3, 0x91B6, 0x91BB, 0x91BC, 0x91BD, 0x91BF, +}; +static const unsigned short euc_to_utf8_8FE3[] = { + 0x91C2, 0x91C3, 0x91C5, 0x91D3, 0x91D4, 0x91D7, 0x91D9, + 0x91DA, 0x91DE, 0x91E4, 0x91E5, 0x91E9, 0x91EA, 0x91EC, 0x91ED, + 0x91EE, 0x91EF, 0x91F0, 0x91F1, 0x91F7, 0x91F9, 0x91FB, 0x91FD, + 0x9200, 0x9201, 0x9204, 0x9205, 0x9206, 0x9207, 0x9209, 0x920A, + 0x920C, 0x9210, 0x9212, 0x9213, 0x9216, 0x9218, 0x921C, 0x921D, + 0x9223, 0x9224, 0x9225, 0x9226, 0x9228, 0x922E, 0x922F, 0x9230, + 0x9233, 0x9235, 0x9236, 0x9238, 0x9239, 0x923A, 0x923C, 0x923E, + 0x9240, 0x9242, 0x9243, 0x9246, 0x9247, 0x924A, 0x924D, 0x924E, + 0x924F, 0x9251, 0x9258, 0x9259, 0x925C, 0x925D, 0x9260, 0x9261, + 0x9265, 0x9267, 0x9268, 0x9269, 0x926E, 0x926F, 0x9270, 0x9275, + 0x9276, 0x9277, 0x9278, 0x9279, 0x927B, 0x927C, 0x927D, 0x927F, + 0x9288, 0x9289, 0x928A, 0x928D, 0x928E, 0x9292, 0x9297, +}; +static const unsigned short euc_to_utf8_8FE4[] = { + 0x9299, 0x929F, 0x92A0, 0x92A4, 0x92A5, 0x92A7, 0x92A8, + 0x92AB, 0x92AF, 0x92B2, 0x92B6, 0x92B8, 0x92BA, 0x92BB, 0x92BC, + 0x92BD, 0x92BF, 0x92C0, 0x92C1, 0x92C2, 0x92C3, 0x92C5, 0x92C6, + 0x92C7, 0x92C8, 0x92CB, 0x92CC, 0x92CD, 0x92CE, 0x92D0, 0x92D3, + 0x92D5, 0x92D7, 0x92D8, 0x92D9, 0x92DC, 0x92DD, 0x92DF, 0x92E0, + 0x92E1, 0x92E3, 0x92E5, 0x92E7, 0x92E8, 0x92EC, 0x92EE, 0x92F0, + 0x92F9, 0x92FB, 0x92FF, 0x9300, 0x9302, 0x9308, 0x930D, 0x9311, + 0x9314, 0x9315, 0x931C, 0x931D, 0x931E, 0x931F, 0x9321, 0x9324, + 0x9325, 0x9327, 0x9329, 0x932A, 0x9333, 0x9334, 0x9336, 0x9337, + 0x9347, 0x9348, 0x9349, 0x9350, 0x9351, 0x9352, 0x9355, 0x9357, + 0x9358, 0x935A, 0x935E, 0x9364, 0x9365, 0x9367, 0x9369, 0x936A, + 0x936D, 0x936F, 0x9370, 0x9371, 0x9373, 0x9374, 0x9376, +}; +static const unsigned short euc_to_utf8_8FE5[] = { + 0x937A, 0x937D, 0x937F, 0x9380, 0x9381, 0x9382, 0x9388, + 0x938A, 0x938B, 0x938D, 0x938F, 0x9392, 0x9395, 0x9398, 0x939B, + 0x939E, 0x93A1, 0x93A3, 0x93A4, 0x93A6, 0x93A8, 0x93AB, 0x93B4, + 0x93B5, 0x93B6, 0x93BA, 0x93A9, 0x93C1, 0x93C4, 0x93C5, 0x93C6, + 0x93C7, 0x93C9, 0x93CA, 0x93CB, 0x93CC, 0x93CD, 0x93D3, 0x93D9, + 0x93DC, 0x93DE, 0x93DF, 0x93E2, 0x93E6, 0x93E7, 0x93F9, 0x93F7, + 0x93F8, 0x93FA, 0x93FB, 0x93FD, 0x9401, 0x9402, 0x9404, 0x9408, + 0x9409, 0x940D, 0x940E, 0x940F, 0x9415, 0x9416, 0x9417, 0x941F, + 0x942E, 0x942F, 0x9431, 0x9432, 0x9433, 0x9434, 0x943B, 0x943F, + 0x943D, 0x9443, 0x9445, 0x9448, 0x944A, 0x944C, 0x9455, 0x9459, + 0x945C, 0x945F, 0x9461, 0x9463, 0x9468, 0x946B, 0x946D, 0x946E, + 0x946F, 0x9471, 0x9472, 0x9484, 0x9483, 0x9578, 0x9579, +}; +static const unsigned short euc_to_utf8_8FE6[] = { + 0x957E, 0x9584, 0x9588, 0x958C, 0x958D, 0x958E, 0x959D, + 0x959E, 0x959F, 0x95A1, 0x95A6, 0x95A9, 0x95AB, 0x95AC, 0x95B4, + 0x95B6, 0x95BA, 0x95BD, 0x95BF, 0x95C6, 0x95C8, 0x95C9, 0x95CB, + 0x95D0, 0x95D1, 0x95D2, 0x95D3, 0x95D9, 0x95DA, 0x95DD, 0x95DE, + 0x95DF, 0x95E0, 0x95E4, 0x95E6, 0x961D, 0x961E, 0x9622, 0x9624, + 0x9625, 0x9626, 0x962C, 0x9631, 0x9633, 0x9637, 0x9638, 0x9639, + 0x963A, 0x963C, 0x963D, 0x9641, 0x9652, 0x9654, 0x9656, 0x9657, + 0x9658, 0x9661, 0x966E, 0x9674, 0x967B, 0x967C, 0x967E, 0x967F, + 0x9681, 0x9682, 0x9683, 0x9684, 0x9689, 0x9691, 0x9696, 0x969A, + 0x969D, 0x969F, 0x96A4, 0x96A5, 0x96A6, 0x96A9, 0x96AE, 0x96AF, + 0x96B3, 0x96BA, 0x96CA, 0x96D2, 0x5DB2, 0x96D8, 0x96DA, 0x96DD, + 0x96DE, 0x96DF, 0x96E9, 0x96EF, 0x96F1, 0x96FA, 0x9702, +}; +static const unsigned short euc_to_utf8_8FE7[] = { + 0x9703, 0x9705, 0x9709, 0x971A, 0x971B, 0x971D, 0x9721, + 0x9722, 0x9723, 0x9728, 0x9731, 0x9733, 0x9741, 0x9743, 0x974A, + 0x974E, 0x974F, 0x9755, 0x9757, 0x9758, 0x975A, 0x975B, 0x9763, + 0x9767, 0x976A, 0x976E, 0x9773, 0x9776, 0x9777, 0x9778, 0x977B, + 0x977D, 0x977F, 0x9780, 0x9789, 0x9795, 0x9796, 0x9797, 0x9799, + 0x979A, 0x979E, 0x979F, 0x97A2, 0x97AC, 0x97AE, 0x97B1, 0x97B2, + 0x97B5, 0x97B6, 0x97B8, 0x97B9, 0x97BA, 0x97BC, 0x97BE, 0x97BF, + 0x97C1, 0x97C4, 0x97C5, 0x97C7, 0x97C9, 0x97CA, 0x97CC, 0x97CD, + 0x97CE, 0x97D0, 0x97D1, 0x97D4, 0x97D7, 0x97D8, 0x97D9, 0x97DD, + 0x97DE, 0x97E0, 0x97DB, 0x97E1, 0x97E4, 0x97EF, 0x97F1, 0x97F4, + 0x97F7, 0x97F8, 0x97FA, 0x9807, 0x980A, 0x9819, 0x980D, 0x980E, + 0x9814, 0x9816, 0x981C, 0x981E, 0x9820, 0x9823, 0x9826, +}; +static const unsigned short euc_to_utf8_8FE8[] = { + 0x982B, 0x982E, 0x982F, 0x9830, 0x9832, 0x9833, 0x9835, + 0x9825, 0x983E, 0x9844, 0x9847, 0x984A, 0x9851, 0x9852, 0x9853, + 0x9856, 0x9857, 0x9859, 0x985A, 0x9862, 0x9863, 0x9865, 0x9866, + 0x986A, 0x986C, 0x98AB, 0x98AD, 0x98AE, 0x98B0, 0x98B4, 0x98B7, + 0x98B8, 0x98BA, 0x98BB, 0x98BF, 0x98C2, 0x98C5, 0x98C8, 0x98CC, + 0x98E1, 0x98E3, 0x98E5, 0x98E6, 0x98E7, 0x98EA, 0x98F3, 0x98F6, + 0x9902, 0x9907, 0x9908, 0x9911, 0x9915, 0x9916, 0x9917, 0x991A, + 0x991B, 0x991C, 0x991F, 0x9922, 0x9926, 0x9927, 0x992B, 0x9931, + 0x9932, 0x9933, 0x9934, 0x9935, 0x9939, 0x993A, 0x993B, 0x993C, + 0x9940, 0x9941, 0x9946, 0x9947, 0x9948, 0x994D, 0x994E, 0x9954, + 0x9958, 0x9959, 0x995B, 0x995C, 0x995E, 0x995F, 0x9960, 0x999B, + 0x999D, 0x999F, 0x99A6, 0x99B0, 0x99B1, 0x99B2, 0x99B5, +}; +static const unsigned short euc_to_utf8_8FE9[] = { + 0x99B9, 0x99BA, 0x99BD, 0x99BF, 0x99C3, 0x99C9, 0x99D3, + 0x99D4, 0x99D9, 0x99DA, 0x99DC, 0x99DE, 0x99E7, 0x99EA, 0x99EB, + 0x99EC, 0x99F0, 0x99F4, 0x99F5, 0x99F9, 0x99FD, 0x99FE, 0x9A02, + 0x9A03, 0x9A04, 0x9A0B, 0x9A0C, 0x9A10, 0x9A11, 0x9A16, 0x9A1E, + 0x9A20, 0x9A22, 0x9A23, 0x9A24, 0x9A27, 0x9A2D, 0x9A2E, 0x9A33, + 0x9A35, 0x9A36, 0x9A38, 0x9A47, 0x9A41, 0x9A44, 0x9A4A, 0x9A4B, + 0x9A4C, 0x9A4E, 0x9A51, 0x9A54, 0x9A56, 0x9A5D, 0x9AAA, 0x9AAC, + 0x9AAE, 0x9AAF, 0x9AB2, 0x9AB4, 0x9AB5, 0x9AB6, 0x9AB9, 0x9ABB, + 0x9ABE, 0x9ABF, 0x9AC1, 0x9AC3, 0x9AC6, 0x9AC8, 0x9ACE, 0x9AD0, + 0x9AD2, 0x9AD5, 0x9AD6, 0x9AD7, 0x9ADB, 0x9ADC, 0x9AE0, 0x9AE4, + 0x9AE5, 0x9AE7, 0x9AE9, 0x9AEC, 0x9AF2, 0x9AF3, 0x9AF5, 0x9AF9, + 0x9AFA, 0x9AFD, 0x9AFF, 0x9B00, 0x9B01, 0x9B02, 0x9B03, +}; +static const unsigned short euc_to_utf8_8FEA[] = { + 0x9B04, 0x9B05, 0x9B08, 0x9B09, 0x9B0B, 0x9B0C, 0x9B0D, + 0x9B0E, 0x9B10, 0x9B12, 0x9B16, 0x9B19, 0x9B1B, 0x9B1C, 0x9B20, + 0x9B26, 0x9B2B, 0x9B2D, 0x9B33, 0x9B34, 0x9B35, 0x9B37, 0x9B39, + 0x9B3A, 0x9B3D, 0x9B48, 0x9B4B, 0x9B4C, 0x9B55, 0x9B56, 0x9B57, + 0x9B5B, 0x9B5E, 0x9B61, 0x9B63, 0x9B65, 0x9B66, 0x9B68, 0x9B6A, + 0x9B6B, 0x9B6C, 0x9B6D, 0x9B6E, 0x9B73, 0x9B75, 0x9B77, 0x9B78, + 0x9B79, 0x9B7F, 0x9B80, 0x9B84, 0x9B85, 0x9B86, 0x9B87, 0x9B89, + 0x9B8A, 0x9B8B, 0x9B8D, 0x9B8F, 0x9B90, 0x9B94, 0x9B9A, 0x9B9D, + 0x9B9E, 0x9BA6, 0x9BA7, 0x9BA9, 0x9BAC, 0x9BB0, 0x9BB1, 0x9BB2, + 0x9BB7, 0x9BB8, 0x9BBB, 0x9BBC, 0x9BBE, 0x9BBF, 0x9BC1, 0x9BC7, + 0x9BC8, 0x9BCE, 0x9BD0, 0x9BD7, 0x9BD8, 0x9BDD, 0x9BDF, 0x9BE5, + 0x9BE7, 0x9BEA, 0x9BEB, 0x9BEF, 0x9BF3, 0x9BF7, 0x9BF8, +}; +static const unsigned short euc_to_utf8_8FEB[] = { + 0x9BF9, 0x9BFA, 0x9BFD, 0x9BFF, 0x9C00, 0x9C02, 0x9C0B, + 0x9C0F, 0x9C11, 0x9C16, 0x9C18, 0x9C19, 0x9C1A, 0x9C1C, 0x9C1E, + 0x9C22, 0x9C23, 0x9C26, 0x9C27, 0x9C28, 0x9C29, 0x9C2A, 0x9C31, + 0x9C35, 0x9C36, 0x9C37, 0x9C3D, 0x9C41, 0x9C43, 0x9C44, 0x9C45, + 0x9C49, 0x9C4A, 0x9C4E, 0x9C4F, 0x9C50, 0x9C53, 0x9C54, 0x9C56, + 0x9C58, 0x9C5B, 0x9C5D, 0x9C5E, 0x9C5F, 0x9C63, 0x9C69, 0x9C6A, + 0x9C5C, 0x9C6B, 0x9C68, 0x9C6E, 0x9C70, 0x9C72, 0x9C75, 0x9C77, + 0x9C7B, 0x9CE6, 0x9CF2, 0x9CF7, 0x9CF9, 0x9D0B, 0x9D02, 0x9D11, + 0x9D17, 0x9D18, 0x9D1C, 0x9D1D, 0x9D1E, 0x9D2F, 0x9D30, 0x9D32, + 0x9D33, 0x9D34, 0x9D3A, 0x9D3C, 0x9D45, 0x9D3D, 0x9D42, 0x9D43, + 0x9D47, 0x9D4A, 0x9D53, 0x9D54, 0x9D5F, 0x9D63, 0x9D62, 0x9D65, + 0x9D69, 0x9D6A, 0x9D6B, 0x9D70, 0x9D76, 0x9D77, 0x9D7B, +}; +static const unsigned short euc_to_utf8_8FEC[] = { + 0x9D7C, 0x9D7E, 0x9D83, 0x9D84, 0x9D86, 0x9D8A, 0x9D8D, + 0x9D8E, 0x9D92, 0x9D93, 0x9D95, 0x9D96, 0x9D97, 0x9D98, 0x9DA1, + 0x9DAA, 0x9DAC, 0x9DAE, 0x9DB1, 0x9DB5, 0x9DB9, 0x9DBC, 0x9DBF, + 0x9DC3, 0x9DC7, 0x9DC9, 0x9DCA, 0x9DD4, 0x9DD5, 0x9DD6, 0x9DD7, + 0x9DDA, 0x9DDE, 0x9DDF, 0x9DE0, 0x9DE5, 0x9DE7, 0x9DE9, 0x9DEB, + 0x9DEE, 0x9DF0, 0x9DF3, 0x9DF4, 0x9DFE, 0x9E0A, 0x9E02, 0x9E07, + 0x9E0E, 0x9E10, 0x9E11, 0x9E12, 0x9E15, 0x9E16, 0x9E19, 0x9E1C, + 0x9E1D, 0x9E7A, 0x9E7B, 0x9E7C, 0x9E80, 0x9E82, 0x9E83, 0x9E84, + 0x9E85, 0x9E87, 0x9E8E, 0x9E8F, 0x9E96, 0x9E98, 0x9E9B, 0x9E9E, + 0x9EA4, 0x9EA8, 0x9EAC, 0x9EAE, 0x9EAF, 0x9EB0, 0x9EB3, 0x9EB4, + 0x9EB5, 0x9EC6, 0x9EC8, 0x9ECB, 0x9ED5, 0x9EDF, 0x9EE4, 0x9EE7, + 0x9EEC, 0x9EED, 0x9EEE, 0x9EF0, 0x9EF1, 0x9EF2, 0x9EF5, +}; +static const unsigned short euc_to_utf8_8FED[] = { + 0x9EF8, 0x9EFF, 0x9F02, 0x9F03, 0x9F09, 0x9F0F, 0x9F10, + 0x9F11, 0x9F12, 0x9F14, 0x9F16, 0x9F17, 0x9F19, 0x9F1A, 0x9F1B, + 0x9F1F, 0x9F22, 0x9F26, 0x9F2A, 0x9F2B, 0x9F2F, 0x9F31, 0x9F32, + 0x9F34, 0x9F37, 0x9F39, 0x9F3A, 0x9F3C, 0x9F3D, 0x9F3F, 0x9F41, + 0x9F43, 0x9F44, 0x9F45, 0x9F46, 0x9F47, 0x9F53, 0x9F55, 0x9F56, + 0x9F57, 0x9F58, 0x9F5A, 0x9F5D, 0x9F5E, 0x9F68, 0x9F69, 0x9F6D, + 0x9F6E, 0x9F6F, 0x9F70, 0x9F71, 0x9F73, 0x9F75, 0x9F7A, 0x9F7D, + 0x9F8F, 0x9F90, 0x9F91, 0x9F92, 0x9F94, 0x9F96, 0x9F97, 0x9F9E, + 0x9FA1, 0x9FA2, 0x9FA3, 0x9FA5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short euc_to_utf8_8FF3[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, + 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x2160, 0x2161, +}; +static const unsigned short euc_to_utf8_8FF4[] = { + 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, + 0x2169, 0xff07, 0xff02, 0x3231, 0x2116, 0x2121, 0x70bb, 0x4efc, + 0x50f4, 0x51ec, 0x5307, 0x5324, 0xfa0e, 0x548a, 0x5759, 0xfa0f, + 0xfa10, 0x589e, 0x5bec, 0x5cf5, 0x5d53, 0xfa11, 0x5fb7, 0x6085, + 0x6120, 0x654e, 0x663b, 0x6665, 0xfa12, 0xf929, 0x6801, 0xfa13, + 0xfa14, 0x6a6b, 0x6ae2, 0x6df8, 0x6df2, 0x7028, 0xfa15, 0xfa16, + 0x7501, 0x7682, 0x769e, 0xfa17, 0x7930, 0xfa18, 0xfa19, 0xfa1a, + 0xfa1b, 0x7ae7, 0xfa1c, 0xfa1d, 0x7da0, 0x7dd6, 0xfa1e, 0x8362, + 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0xfa22, 0x8b7f, 0x8cf4, + 0x8d76, 0xfa23, 0xfa24, 0xfa25, 0x90de, 0xfa26, 0x9115, 0xfa27, + 0xfa28, 0x9592, 0xf9dc, 0xfa29, 0x973b, 0x974d, 0x9751, 0xfa2a, + 0xfa2b, 0xfa2c, 0x999e, 0x9ad9, 0x9b72, 0xfa2d, 0x9ed1, +}; +#endif /* X0212_ENABLE */ + +const unsigned short euc_to_utf8_1byte[] = { + 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, + 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F, + 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, + 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, + 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87, + 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F, + 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97, + 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x00A9, 0x2122, +}; +const unsigned short *const euc_to_utf8_2bytes[] = { + euc_to_utf8_A1, euc_to_utf8_A2, euc_to_utf8_A3, + euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7, + euc_to_utf8_A8, euc_to_utf8_A9, euc_to_utf8_AA, euc_to_utf8_AB, + euc_to_utf8_AC, euc_to_utf8_AD, euc_to_utf8_AE, euc_to_utf8_AF, + euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3, + euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7, + euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB, + euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF, + euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3, + euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7, + euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB, + euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF, + euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3, + euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7, + euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB, + euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF, + euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3, + euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7, + euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB, + euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF, + euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3, + euc_to_utf8_F4, euc_to_utf8_F5, 0, 0, + 0, euc_to_utf8_F9, euc_to_utf8_FA, euc_to_utf8_FB, + euc_to_utf8_FC, 0, 0, +}; +/* Microsoft UCS Mapping Compatible */ +const unsigned short *const euc_to_utf8_2bytes_ms[] = { + euc_to_utf8_A1_ms, euc_to_utf8_A2_ms, euc_to_utf8_A3, + euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7, + euc_to_utf8_A8, euc_to_utf8_A9, euc_to_utf8_AA, euc_to_utf8_AB, + euc_to_utf8_AC, euc_to_utf8_AD, euc_to_utf8_AE, euc_to_utf8_AF, + euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3, + euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7, + euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB, + euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF, + euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3, + euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7, + euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB, + euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF, + euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3, + euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7, + euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB, + euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF, + euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3, + euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7, + euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB, + euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF, + euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3, + euc_to_utf8_F4, euc_to_utf8_F5, 0, 0, + 0, euc_to_utf8_F9, euc_to_utf8_FA, euc_to_utf8_FB, + euc_to_utf8_FC_ms, 0, 0, +}; +/* CP10001 */ +const unsigned short *const euc_to_utf8_2bytes_mac[] = { + euc_to_utf8_A1_ms, euc_to_utf8_A2_ms, euc_to_utf8_A3, + euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7, + euc_to_utf8_A8, euc_to_utf8_A9, euc_to_utf8_AA, euc_to_utf8_AB, + euc_to_utf8_AC_mac, euc_to_utf8_AD_mac, euc_to_utf8_AE, euc_to_utf8_AF, + euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3, + euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7, + euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB, + euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF, + euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3, + euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7, + euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB, + euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF, + euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3, + euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7, + euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB, + euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF, + euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3, + euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7, + euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB, + euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF, + euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3, + euc_to_utf8_F4, euc_to_utf8_F5, 0, 0, + 0, euc_to_utf8_F9, euc_to_utf8_FA, euc_to_utf8_FB, + euc_to_utf8_FC_ms, 0, 0, +}; + +#ifdef X0212_ENABLE +const unsigned short *const x0212_to_utf8_2bytes[] = { + 0, euc_to_utf8_8FA2, 0, + 0, 0, euc_to_utf8_8FA6, euc_to_utf8_8FA7, + 0, euc_to_utf8_8FA9, euc_to_utf8_8FAA, euc_to_utf8_8FAB, + 0, 0, 0, 0, + euc_to_utf8_8FB0, euc_to_utf8_8FB1, euc_to_utf8_8FB2, euc_to_utf8_8FB3, + euc_to_utf8_8FB4, euc_to_utf8_8FB5, euc_to_utf8_8FB6, euc_to_utf8_8FB7, + euc_to_utf8_8FB8, euc_to_utf8_8FB9, euc_to_utf8_8FBA, euc_to_utf8_8FBB, + euc_to_utf8_8FBC, euc_to_utf8_8FBD, euc_to_utf8_8FBE, euc_to_utf8_8FBF, + euc_to_utf8_8FC0, euc_to_utf8_8FC1, euc_to_utf8_8FC2, euc_to_utf8_8FC3, + euc_to_utf8_8FC4, euc_to_utf8_8FC5, euc_to_utf8_8FC6, euc_to_utf8_8FC7, + euc_to_utf8_8FC8, euc_to_utf8_8FC9, euc_to_utf8_8FCA, euc_to_utf8_8FCB, + euc_to_utf8_8FCC, euc_to_utf8_8FCD, euc_to_utf8_8FCE, euc_to_utf8_8FCF, + euc_to_utf8_8FD0, euc_to_utf8_8FD1, euc_to_utf8_8FD2, euc_to_utf8_8FD3, + euc_to_utf8_8FD4, euc_to_utf8_8FD5, euc_to_utf8_8FD6, euc_to_utf8_8FD7, + euc_to_utf8_8FD8, euc_to_utf8_8FD9, euc_to_utf8_8FDA, euc_to_utf8_8FDB, + euc_to_utf8_8FDC, euc_to_utf8_8FDD, euc_to_utf8_8FDE, euc_to_utf8_8FDF, + euc_to_utf8_8FE0, euc_to_utf8_8FE1, euc_to_utf8_8FE2, euc_to_utf8_8FE3, + euc_to_utf8_8FE4, euc_to_utf8_8FE5, euc_to_utf8_8FE6, euc_to_utf8_8FE7, + euc_to_utf8_8FE8, euc_to_utf8_8FE9, euc_to_utf8_8FEA, euc_to_utf8_8FEB, + euc_to_utf8_8FEC, euc_to_utf8_8FED, 0, 0, + 0, 0, 0, euc_to_utf8_8FF3, + euc_to_utf8_8FF4, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0,}; +#endif /* X0212_ENABLE */ +#endif /* UTF8_OUTPUT_ENABLE */ + +#ifdef UTF8_INPUT_ENABLE +static const unsigned short utf8_to_euc_C2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xA242, 0x2171, 0x2172, 0xA270, 0x216F, 0xA243, 0x2178, + 0x212F, 0xA26D, 0xA26C, 0, 0x224C, 0, 0xA26E, 0xA234, + 0x216B, 0x215E, 0, 0, 0x212D, 0, 0x2279, 0, + 0xA231, 0, 0xA26B, 0, 0, 0, 0, 0xA244, +}; +static const unsigned short utf8_to_euc_C2_ms[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xA242, 0x2171, 0x2172, 0xA270, 0x5C, 0xA243, 0x2178, + 0x212F, 0xA26D, 0xA26C, 0, 0x224C, 0, 0xA26E, 0xA234, + 0x216B, 0x215E, 0, 0, 0x212D, 0, 0x2279, 0, + 0xA231, 0, 0xA26B, 0, 0, 0, 0, 0xA244, +}; +static const unsigned short utf8_to_euc_C2_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x00A0, 0xA242, 0x2171, 0x2172, 0xA270, 0x5C, 0xA243, 0x2178, + 0x212F, 0x00FD, 0xA26C, 0, 0x224C, 0, 0xA26E, 0xA234, + 0x216B, 0x215E, 0, 0, 0x212D, 0, 0x2279, 0, + 0xA231, 0, 0xA26B, 0, 0, 0, 0, 0xA244, +}; +static const unsigned short utf8_to_euc_C2_932[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x21, 0x2171, 0x2172, 0, 0x5C, 0x7C, 0x2178, + 0x212F, 0x63, 0x61, 0x2263, 0x224C, 0x2D, 0x52, 0x2131, + 0x216B, 0x215E, 0x32, 0x33, 0x212D, 0x264C, 0x2279, 0x2126, + 0x2124, 0x31, 0x6F, 0x2264, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_C3[] = { + 0xAA22, 0xAA21, 0xAA24, 0xAA2A, 0xAA23, 0xAA29, 0xA921, 0xAA2E, + 0xAA32, 0xAA31, 0xAA34, 0xAA33, 0xAA40, 0xAA3F, 0xAA42, 0xAA41, + 0, 0xAA50, 0xAA52, 0xAA51, 0xAA54, 0xAA58, 0xAA53, 0x215F, + 0xA92C, 0xAA63, 0xAA62, 0xAA65, 0xAA64, 0xAA72, 0xA930, 0xA94E, + 0xAB22, 0xAB21, 0xAB24, 0xAB2A, 0xAB23, 0xAB29, 0xA941, 0xAB2E, + 0xAB32, 0xAB31, 0xAB34, 0xAB33, 0xAB40, 0xAB3F, 0xAB42, 0xAB41, + 0xA943, 0xAB50, 0xAB52, 0xAB51, 0xAB54, 0xAB58, 0xAB53, 0x2160, + 0xA94C, 0xAB63, 0xAB62, 0xAB65, 0xAB64, 0xAB72, 0xA950, 0xAB73, +}; +static const unsigned short utf8_to_euc_C3_932[] = { + 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, + 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, + 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x215F, + 0x4F, 0x55, 0x55, 0x55, 0x55, 0x59, 0x54, 0x73, + 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, + 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, + 0x64, 0x6E, 0x6F, 0x6F, 0x6F, 0x6F, 0x6F, 0x2160, + 0x6F, 0x75, 0x75, 0x75, 0x75, 0x79, 0x74, 0x79, +}; +static const unsigned short utf8_to_euc_C4[] = { + 0xAA27, 0xAB27, 0xAA25, 0xAB25, 0xAA28, 0xAB28, 0xAA2B, 0xAB2B, + 0xAA2C, 0xAB2C, 0xAA2F, 0xAB2F, 0xAA2D, 0xAB2D, 0xAA30, 0xAB30, + 0xA922, 0xA942, 0xAA37, 0xAB37, 0, 0, 0xAA36, 0xAB36, + 0xAA38, 0xAB38, 0xAA35, 0xAB35, 0xAA3A, 0xAB3A, 0xAA3B, 0xAB3B, + 0xAA3D, 0xAB3D, 0xAA3C, 0, 0xAA3E, 0xAB3E, 0xA924, 0xA944, + 0xAA47, 0xAB47, 0xAA45, 0xAB45, 0, 0, 0xAA46, 0xAB46, + 0xAA44, 0xA945, 0xA926, 0xA946, 0xAA48, 0xAB48, 0xAA49, 0xAB49, + 0xA947, 0xAA4A, 0xAB4A, 0xAA4C, 0xAB4C, 0xAA4B, 0xAB4B, 0xA929, +}; +static const unsigned short utf8_to_euc_C5[] = { + 0xA949, 0xA928, 0xA948, 0xAA4D, 0xAB4D, 0xAA4F, 0xAB4F, 0xAA4E, + 0xAB4E, 0xA94A, 0xA92B, 0xA94B, 0xAA57, 0xAB57, 0, 0, + 0xAA56, 0xAB56, 0xA92D, 0xA94D, 0xAA59, 0xAB59, 0xAA5B, 0xAB5B, + 0xAA5A, 0xAB5A, 0xAA5C, 0xAB5C, 0xAA5D, 0xAB5D, 0xAA5F, 0xAB5F, + 0xAA5E, 0xAB5E, 0xAA61, 0xAB61, 0xAA60, 0xAB60, 0xA92F, 0xA94F, + 0xAA6C, 0xAB6C, 0xAA69, 0xAB69, 0xAA66, 0xAB66, 0xAA6B, 0xAB6B, + 0xAA68, 0xAB68, 0xAA6A, 0xAB6A, 0xAA71, 0xAB71, 0xAA74, 0xAB74, + 0xAA73, 0xAA75, 0xAB75, 0xAA77, 0xAB77, 0xAA76, 0xAB76, 0, +}; +static const unsigned short utf8_to_euc_C7[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xAA26, 0xAB26, 0xAA43, + 0xAB43, 0xAA55, 0xAB55, 0xAA67, 0xAB67, 0xAA70, 0xAB70, 0xAA6D, + 0xAB6D, 0xAA6F, 0xAB6F, 0xAA6E, 0xAB6E, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xAB39, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_CB[] = { + 0, 0, 0, 0, 0, 0, 0, 0xA230, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xA22F, 0xA232, 0xA236, 0xA235, 0, 0xA233, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_CE[] = { + 0, 0, 0, 0, 0xA238, 0xA239, 0xA661, 0, + 0xA662, 0xA663, 0xA664, 0, 0xA667, 0, 0xA669, 0xA66C, + 0xA676, 0x2621, 0x2622, 0x2623, 0x2624, 0x2625, 0x2626, 0x2627, + 0x2628, 0x2629, 0x262A, 0x262B, 0x262C, 0x262D, 0x262E, 0x262F, + 0x2630, 0x2631, 0, 0x2632, 0x2633, 0x2634, 0x2635, 0x2636, + 0x2637, 0x2638, 0xA665, 0xA66A, 0xA671, 0xA672, 0xA673, 0xA674, + 0xA67B, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645, 0x2646, 0x2647, + 0x2648, 0x2649, 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F, +}; +static const unsigned short utf8_to_euc_CF[] = { + 0x2650, 0x2651, 0xA678, 0x2652, 0x2653, 0x2654, 0x2655, 0x2656, + 0x2657, 0x2658, 0xA675, 0xA67A, 0xA677, 0xA679, 0xA67C, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_D0[] = { + 0, 0x2727, 0xA742, 0xA743, 0xA744, 0xA745, 0xA746, 0xA747, + 0xA748, 0xA749, 0xA74A, 0xA74B, 0xA74C, 0, 0xA74D, 0xA74E, + 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2728, 0x2729, + 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F, 0x2730, 0x2731, + 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, 0x2738, 0x2739, + 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F, 0x2740, 0x2741, + 0x2751, 0x2752, 0x2753, 0x2754, 0x2755, 0x2756, 0x2758, 0x2759, + 0x275A, 0x275B, 0x275C, 0x275D, 0x275E, 0x275F, 0x2760, 0x2761, +}; +static const unsigned short utf8_to_euc_D1[] = { + 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2768, 0x2769, + 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F, 0x2770, 0x2771, + 0, 0x2757, 0xA772, 0xA773, 0xA774, 0xA775, 0xA776, 0xA777, + 0xA778, 0xA779, 0xA77A, 0xA77B, 0xA77C, 0, 0xA77D, 0xA77E, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E280[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x213E, 0, 0, 0, 0x213D, 0x213D, 0x2142, 0, + 0x2146, 0x2147, 0, 0, 0x2148, 0x2149, 0, 0, + 0x2277, 0x2278, 0, 0, 0, 0x2145, 0x2144, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2273, 0, 0x216C, 0x216D, 0, 0, 0, 0, + 0, 0, 0, 0x2228, 0, 0, 0x2131, 0, +}; +static const unsigned short utf8_to_euc_E280_ms[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x213E, 0, 0, 0, 0x213D, 0x213D, 0x2142, 0, + 0x2146, 0x2147, 0, 0, 0x2148, 0x2149, 0, 0, + 0x2277, 0x2278, 0, 0, 0, 0x2145, 0x2144, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2273, 0, 0x216C, 0x216D, 0, 0, 0, 0, + 0, 0, 0, 0x2228, 0, 0, 0x7E, 0, +}; +static const unsigned short utf8_to_euc_E280_932[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x213E, 0, 0, 0, 0, 0x213D, 0, 0, + 0x2146, 0x2147, 0, 0, 0x2148, 0x2149, 0, 0, + 0x2277, 0x2278, 0, 0, 0, 0x2145, 0x2144, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2273, 0, 0x216C, 0x216D, 0, 0, 0, 0, + 0, 0, 0, 0x2228, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E284[] = { + 0, 0, 0, 0x216E, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2D62, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2D64, 0xA26F, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2272, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E284_mac[] = { + 0, 0, 0, 0x216E, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2B7B, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2B7D, 0x00FE, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2272, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E285[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2D35, 0x2D36, 0x2D37, 0x2D38, 0x2D39, 0x2D3A, 0x2D3B, 0x2D3C, + 0x2D3D, 0x2D3E, 0, 0, 0, 0, 0, 0, + 0xF373, 0xF374, 0xF375, 0xF376, 0xF377, 0xF378, 0xF379, 0xF37A, + 0xF37B, 0xF37C, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E285_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2A21, 0x2A22, 0x2A23, 0x2A24, 0x2A25, 0x2A26, 0x2A27, 0x2A28, + 0x2A29, 0x2A2A, 0, 0, 0, 0, 0, 0, + 0x2A35, 0x2A36, 0x2A37, 0x2A38, 0x2A39, 0x2A3A, 0x2A3B, 0x2A3C, + 0x2A3D, 0x2A3E, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E286[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x222B, 0x222C, 0x222A, 0x222D, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E287[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x224D, 0, 0x224E, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E288[] = { + 0x224F, 0, 0x225F, 0x2250, 0, 0, 0, 0x2260, + 0x223A, 0, 0, 0x223B, 0, 0, 0, 0, + 0, 0x2D74, 0x215D, 0, 0, 0, 0, 0, + 0, 0, 0x2265, 0, 0, 0x2267, 0x2167, 0x2D78, + 0x225C, 0, 0, 0, 0, 0x2142, 0, 0x224A, + 0x224B, 0x2241, 0x2240, 0x2269, 0x226A, 0, 0x2D73, 0, + 0, 0, 0, 0, 0x2168, 0x2268, 0, 0, + 0, 0, 0, 0, 0, 0x2266, 0, 0, +}; +static const unsigned short utf8_to_euc_E288_932[] = { + 0x224F, 0, 0x225F, 0x2250, 0, 0, 0, 0x2260, + 0x223A, 0, 0, 0x223B, 0, 0, 0, 0, + 0, 0x2D74, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2265, 0, 0, 0x2267, 0x2167, 0x2D78, + 0x225C, 0, 0, 0, 0, 0x2142, 0, 0x224A, + 0x224B, 0x2241, 0x2240, 0x2269, 0x226A, 0, 0x2D73, 0, + 0, 0, 0, 0, 0x2168, 0x2268, 0, 0, + 0, 0, 0, 0, 0, 0x2266, 0, 0, +}; +static const unsigned short utf8_to_euc_E288_mac[] = { + 0x224F, 0, 0x225F, 0x2250, 0, 0, 0, 0x2260, + 0x223A, 0, 0, 0x223B, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2265, 0, 0, 0x2267, 0x2167, 0x2F22, + 0x225C, 0, 0, 0, 0, 0x2142, 0, 0x224A, + 0x224B, 0x2241, 0x2240, 0x2269, 0x226A, 0, 0x2F21, 0, + 0, 0, 0, 0, 0x2168, 0x2268, 0, 0, + 0, 0, 0, 0, 0, 0x2266, 0, 0, +}; +static const unsigned short utf8_to_euc_E289[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2262, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2162, 0x2261, 0, 0, 0, 0, 0x2165, 0x2166, + 0, 0, 0x2263, 0x2264, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E28A[] = { + 0, 0, 0x223E, 0x223F, 0, 0, 0x223C, 0x223D, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x225D, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x2D79, +}; +static const unsigned short utf8_to_euc_E28A_mac[] = { + 0, 0, 0x223E, 0x223F, 0, 0, 0x223C, 0x223D, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x225D, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x2F23, +}; +static const unsigned short utf8_to_euc_E28C[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x225E, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E291[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2D21, 0x2D22, 0x2D23, 0x2D24, 0x2D25, 0x2D26, 0x2D27, 0x2D28, + 0x2D29, 0x2D2A, 0x2D2B, 0x2D2C, 0x2D2D, 0x2D2E, 0x2D2F, 0x2D30, + 0x2D31, 0x2D32, 0x2D33, 0x2D34, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E291_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2921, 0x2922, 0x2923, 0x2924, 0x2925, 0x2926, 0x2927, 0x2928, + 0x2929, 0x292A, 0x292B, 0x292C, 0x292D, 0x292E, 0x292F, 0x2930, + 0x2931, 0x2932, 0x2933, 0x2934, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E294[] = { + 0x2821, 0x282C, 0x2822, 0x282D, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2823, 0, 0, 0x282E, + 0x2824, 0, 0, 0x282F, 0x2826, 0, 0, 0x2831, + 0x2825, 0, 0, 0x2830, 0x2827, 0x283C, 0, 0, + 0x2837, 0, 0, 0x2832, 0x2829, 0x283E, 0, 0, + 0x2839, 0, 0, 0x2834, 0x2828, 0, 0, 0x2838, + 0x283D, 0, 0, 0x2833, 0x282A, 0, 0, 0x283A, + 0x283F, 0, 0, 0x2835, 0x282B, 0, 0, 0x283B, +}; +static const unsigned short utf8_to_euc_E295[] = { + 0, 0, 0x2840, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2836, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E296[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2223, 0x2222, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2225, 0x2224, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2227, 0x2226, 0, 0, +}; +static const unsigned short utf8_to_euc_E297[] = { + 0, 0, 0, 0, 0, 0, 0x2221, 0x217E, + 0, 0, 0, 0x217B, 0, 0, 0x217D, 0x217C, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x227E, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E298[] = { + 0, 0, 0, 0, 0, 0x217A, 0x2179, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E299[] = { + 0x216A, 0, 0x2169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2276, 0, 0, 0x2275, 0, 0x2274, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E380[] = { + 0x2121, 0x2122, 0x2123, 0x2137, 0, 0x2139, 0x213A, 0x213B, + 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, + 0x215A, 0x215B, 0x2229, 0x222E, 0x214C, 0x214D, 0, 0, + 0, 0, 0, 0, 0x2141, 0x2D60, 0, 0x2D61, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E380_932[] = { + 0x2121, 0x2122, 0x2123, 0x2137, 0, 0x2139, 0x213A, 0x213B, + 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, + 0x215A, 0x215B, 0x2229, 0x222E, 0x214C, 0x214D, 0, 0, + 0, 0, 0, 0, 0, 0x2D60, 0, 0x2D61, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E381[] = { + 0, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427, + 0x2428, 0x2429, 0x242A, 0x242B, 0x242C, 0x242D, 0x242E, 0x242F, + 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437, + 0x2438, 0x2439, 0x243A, 0x243B, 0x243C, 0x243D, 0x243E, 0x243F, + 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447, + 0x2448, 0x2449, 0x244A, 0x244B, 0x244C, 0x244D, 0x244E, 0x244F, + 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457, + 0x2458, 0x2459, 0x245A, 0x245B, 0x245C, 0x245D, 0x245E, 0x245F, +}; +static const unsigned short utf8_to_euc_E382[] = { + 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, + 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F, + 0x2470, 0x2471, 0x2472, 0x2473, 0, 0, 0, 0, + 0, 0, 0, 0x212B, 0x212C, 0x2135, 0x2136, 0, + 0, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527, + 0x2528, 0x2529, 0x252A, 0x252B, 0x252C, 0x252D, 0x252E, 0x252F, + 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537, + 0x2538, 0x2539, 0x253A, 0x253B, 0x253C, 0x253D, 0x253E, 0x253F, +}; +static const unsigned short utf8_to_euc_E382_932[] = { + 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, + 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F, + 0x2470, 0x2471, 0x2472, 0x2473, 0x2574, 0, 0, 0, + 0, 0, 0, 0x212B, 0x212C, 0x2135, 0x2136, 0, + 0, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527, + 0x2528, 0x2529, 0x252A, 0x252B, 0x252C, 0x252D, 0x252E, 0x252F, + 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537, + 0x2538, 0x2539, 0x253A, 0x253B, 0x253C, 0x253D, 0x253E, 0x253F, +}; +static const unsigned short utf8_to_euc_E383[] = { + 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, + 0x2548, 0x2549, 0x254A, 0x254B, 0x254C, 0x254D, 0x254E, 0x254F, + 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, + 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, 0x255F, + 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, + 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x256D, 0x256E, 0x256F, + 0x2570, 0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576, 0, + 0, 0, 0, 0x2126, 0x213C, 0x2133, 0x2134, 0, +}; +static const unsigned short utf8_to_euc_E388[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2D6A, 0x2D6B, 0, 0, 0, 0, 0, + 0, 0x2D6C, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E388_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2D2E, 0x2D31, 0, 0, 0, 0, 0, + 0, 0x2D2C, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38A[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2D65, 0x2D66, 0x2D67, 0x2D68, + 0x2D69, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38A_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2D73, 0x2D74, 0x2D75, 0x2D76, + 0x2D77, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38C[] = { + 0, 0, 0, 0x2D46, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2D4A, 0, 0, + 0, 0, 0, 0, 0x2D41, 0, 0, 0, + 0x2D44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2D42, 0x2D4C, 0, 0, 0x2D4B, 0x2D45, + 0, 0, 0, 0x2D4D, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2D47, 0, + 0, 0, 0, 0x2D4F, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38C_mac[] = { + 0, 0, 0, 0x2E29, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2E32, 0, 0, + 0, 0, 0, 0, 0x2E24, 0, 0, 0, + 0x2E2B, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x2E22, 0x2E34, 0, 0, 0x2E35, 0x2E2D, + 0, 0, 0, 0x2E37, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2E2A, 0, + 0, 0, 0, 0x2E36, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38D[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2D40, 0x2D4E, 0, 0, 0x2D43, 0, 0, + 0, 0x2D48, 0, 0, 0, 0, 0, 0x2D49, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2D5F, 0x2D6F, 0x2D6E, 0x2D6D, 0, +}; +static const unsigned short utf8_to_euc_E38D_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x2E21, 0x2E2F, 0, 0, 0x2E23, 0, 0, + 0, 0x2E2E, 0, 0, 0, 0, 0, 0x2E31, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x2E6A, 0x2E69, 0x2E68, 0x2E67, 0, +}; +static const unsigned short utf8_to_euc_E38E[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2D53, 0x2D54, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2D50, 0x2D51, 0x2D52, 0, + 0, 0x2D56, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38E_mac[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x2B2B, 0x2B2D, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x2B21, 0x2B23, 0x2B29, 0, + 0, 0x2B27, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38F[] = { + 0, 0, 0, 0, 0x2D55, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2D63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E38F_mac[] = { + 0, 0, 0, 0, 0x2B2E, 0, 0, 0, + 0, 0, 0, 0, 0, 0x2B7C, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E4B8[] = { + 0x306C, 0x437A, 0xB021, 0x3C37, 0xB022, 0xB023, 0, 0x4B7C, + 0x3E66, 0x3B30, 0x3E65, 0x323C, 0xB024, 0x4954, 0x4D3F, 0, + 0x5022, 0x312F, 0xB025, 0, 0x336E, 0x5023, 0x4024, 0x5242, + 0x3556, 0x4A3A, 0, 0, 0, 0, 0x3E67, 0xB026, + 0, 0x4E3E, 0, 0xB027, 0xB028, 0, 0x4A42, 0, + 0xB029, 0, 0x5024, 0xB02A, 0, 0x4366, 0xB02B, 0xB02C, + 0xB02D, 0x5025, 0x367A, 0, 0, 0xB02E, 0x5026, 0, + 0x345D, 0x4330, 0, 0x3C67, 0x5027, 0, 0, 0x5028, +}; +static const unsigned short utf8_to_euc_E4B9[] = { + 0xB02F, 0xB030, 0x5029, 0x4735, 0xB031, 0x3557, 0, 0xB032, + 0, 0, 0, 0x4737, 0, 0x4663, 0x3843, 0x4B33, + 0, 0xB033, 0, 0, 0, 0x6949, 0x502A, 0x3E68, + 0x502B, 0x3235, 0xB034, 0, 0xB035, 0x3665, 0x3870, 0x4C69, + 0, 0, 0x5626, 0xB036, 0, 0, 0, 0, + 0xB037, 0xB038, 0, 0, 0, 0, 0, 0, + 0, 0x4D70, 0, 0x467D, 0xB039, 0xB03A, 0, 0, + 0, 0xB03B, 0, 0, 0, 0, 0x3425, 0xB03C, +}; +static const unsigned short utf8_to_euc_E4BA[] = { + 0x3535, 0, 0x502C, 0, 0, 0x502D, 0x4E3B, 0, + 0x4D3D, 0x4168, 0x502F, 0x3B76, 0x4673, 0xB03D, 0x5032, 0, + 0, 0x313E, 0x385F, 0, 0x385E, 0x3066, 0xB03E, 0xB03F, + 0x4F4B, 0x4F4A, 0, 0x3A33, 0x3021, 0xB040, 0x5033, 0x5034, + 0x5035, 0x4B34, 0x5036, 0, 0x3872, 0x3067, 0x4B72, 0, + 0x357C, 0, 0, 0x357D, 0x357E, 0x4462, 0x4E3C, 0xB041, + 0x5037, 0, 0, 0x5038, 0, 0, 0x5039, 0, + 0, 0xB042, 0x3F4D, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E4BB[] = { + 0x3D3A, 0x3F4E, 0x503E, 0xB043, 0x503C, 0, 0x503D, 0x3558, + 0, 0, 0x3A23, 0x3270, 0, 0x503B, 0x503A, 0x4A29, + 0xB044, 0, 0, 0, 0x3B46, 0x3B45, 0x423E, 0x503F, + 0x4955, 0x4067, 0xB045, 0xB046, 0, 0x2138, 0x5040, 0x5042, + 0xB047, 0xB048, 0xB049, 0x4265, 0x4E61, 0x304A, 0, 0, + 0xB04A, 0, 0, 0, 0, 0x5041, 0x323E, 0xB04B, + 0x3644, 0xB04C, 0x4367, 0xB04D, 0, 0xB04E, 0x376F, 0x5043, + 0, 0, 0, 0x4724, 0xF42F, 0xB04F, 0xB050, 0xB051, +}; +static const unsigned short utf8_to_euc_E4BC[] = { + 0xB052, 0x346B, 0xB053, 0xB054, 0, 0, 0, 0, + 0xB055, 0x5044, 0x304B, 0xB056, 0xB057, 0x3860, 0x346C, 0x497A, + 0x4832, 0x3559, 0xB058, 0, 0, 0xB059, 0xB05A, 0xB05B, + 0, 0xB05C, 0x3271, 0, 0x5067, 0x4541, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xB05D, 0x476C, + 0x5046, 0xB05E, 0, 0xB060, 0x483C, 0xB061, 0x4E62, 0xB062, + 0x3F2D, 0xB063, 0x3B47, 0xB064, 0x3B77, 0x3240, 0xB065, 0, +}; +static const unsigned short utf8_to_euc_E4BD[] = { + 0xB066, 0, 0xB067, 0x4451, 0, 0, 0x4322, 0x504A, + 0xB068, 0xB069, 0, 0xB06A, 0xB06B, 0x304C, 0x4463, 0x3D3B, + 0x3A34, 0x4D24, 0xB06C, 0x424E, 0xB06D, 0x323F, 0xB06E, 0x5049, + 0xB06F, 0x4D3E, 0x5045, 0x5047, 0x3A6E, 0x5048, 0x5524, 0xB070, + 0xB05F, 0, 0, 0xB071, 0, 0, 0, 0, + 0, 0x5050, 0xB072, 0, 0xB073, 0, 0xB074, 0x5053, + 0x5051, 0xB075, 0, 0x3242, 0, 0x4A3B, 0x504B, 0xB076, + 0xB077, 0xB078, 0xB079, 0x504F, 0x3873, 0xB07A, 0xB07B, 0x3B48, +}; +static const unsigned short utf8_to_euc_E4BE[] = { + 0, 0xB07C, 0xB07D, 0x3426, 0xB07E, 0xB121, 0x5054, 0, + 0x504C, 0xB122, 0xB123, 0x4E63, 0xB124, 0x3B78, 0xB125, 0x504D, + 0xB126, 0x5052, 0xB127, 0xB128, 0xB129, 0, 0x5055, 0xB12A, + 0x504E, 0xB12B, 0xB12C, 0x3621, 0, 0x304D, 0xB12D, 0xB12E, + 0x3622, 0x3241, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x5525, 0, 0x4B79, 0x496E, 0x3874, + 0, 0, 0xB12F, 0, 0, 0x3F2F, 0x4E37, 0xB130, + 0, 0xB131, 0, 0xB132, 0xB133, 0xB134, 0xB135, 0x4A58, +}; +static const unsigned short utf8_to_euc_E4BF[] = { + 0xB136, 0xB137, 0x3738, 0x4225, 0x3264, 0xB138, 0xB139, 0, + 0xB13A, 0xB13B, 0x3D53, 0xB13C, 0xB13D, 0xB13E, 0x5059, 0xB13F, + 0x505E, 0x505C, 0xB140, 0, 0x5057, 0, 0, 0x422F, + 0x505A, 0, 0x505D, 0x505B, 0xB141, 0x4A5D, 0, 0x5058, + 0xB142, 0x3F2E, 0xB143, 0x4B73, 0x505F, 0x5060, 0, 0, + 0, 0, 0, 0, 0, 0, 0x3D24, 0x506D, + 0xB144, 0, 0xB145, 0x4750, 0, 0x4936, 0x5068, 0, + 0x4A70, 0, 0x3236, 0, 0xB146, 0xB147, 0x506C, 0xB148, +}; +static const unsigned short utf8_to_euc_E580[] = { + 0xB149, 0xB14A, 0, 0, 0xB14B, 0x5066, 0x506F, 0xB14C, + 0, 0x4152, 0xB14D, 0x3844, 0xB14E, 0x475C, 0xB14F, 0x6047, + 0xB150, 0x506E, 0x455D, 0xB151, 0x5063, 0, 0x3876, 0xB152, + 0xB153, 0x3875, 0x5061, 0xB154, 0xB155, 0xB156, 0xB157, 0x3C5A, + 0, 0x5069, 0xB158, 0x4A6F, 0x434D, 0x5065, 0x3771, 0xB159, + 0x5062, 0x506A, 0x5064, 0x4E51, 0x506B, 0x4F41, 0xB15A, 0, + 0xB15B, 0, 0xB15C, 0xB15D, 0, 0xB15E, 0x3666, 0, + 0, 0x3770, 0, 0xB176, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E581[] = { + 0xB15F, 0xB160, 0xB161, 0x5070, 0, 0xB162, 0xB163, 0x5071, + 0x5075, 0x304E, 0xB164, 0, 0xB165, 0, 0xB166, 0x4A50, + 0x5074, 0xB167, 0xB168, 0xB169, 0, 0x5073, 0x5077, 0xB16A, + 0, 0xB16B, 0x5076, 0, 0x4464, 0, 0, 0xB16C, + 0xB16D, 0, 0xB16E, 0xB16F, 0, 0x3772, 0xB170, 0xB171, + 0, 0, 0xB172, 0, 0x5078, 0xB173, 0, 0, + 0xB174, 0xB175, 0x3C45, 0, 0x4226, 0x4465, 0x3676, 0, + 0x5079, 0, 0, 0, 0, 0x3536, 0, 0, +}; +static const unsigned short utf8_to_euc_E582[] = { + 0x507A, 0xB177, 0, 0xB178, 0xB179, 0x507C, 0xB17A, 0, + 0, 0, 0xB17B, 0, 0, 0x4B35, 0xB17C, 0xB17D, + 0xB17E, 0x3766, 0xB221, 0xB222, 0xB223, 0, 0xB224, 0, + 0x3B31, 0x4877, 0x507B, 0xB225, 0xB226, 0, 0xB227, 0xB228, + 0xB229, 0xB22A, 0xB22B, 0, 0, 0, 0, 0, + 0, 0, 0xB22C, 0, 0x3A45, 0x4D43, 0, 0xB22D, + 0xB22E, 0, 0x507E, 0x5123, 0x507D, 0x3A44, 0, 0x3D7D, + 0, 0xB22F, 0xB230, 0, 0, 0xB231, 0x3739, 0, +}; +static const unsigned short utf8_to_euc_E583[] = { + 0xB232, 0, 0x5124, 0xB233, 0xB234, 0x364F, 0, 0xB235, + 0, 0x5121, 0x5122, 0, 0xB236, 0x462F, 0xB237, 0x417C, + 0xB238, 0x3623, 0, 0xB239, 0xB23A, 0x4B4D, 0x5125, 0, + 0xB23B, 0, 0x4E3D, 0, 0xB23C, 0xB23D, 0x5126, 0xB23E, + 0, 0, 0xB23F, 0x5129, 0xB240, 0x5127, 0xB241, 0x414E, + 0xB242, 0xB243, 0, 0, 0, 0x5128, 0x512A, 0xB244, + 0, 0xB245, 0xB251, 0, 0xF430, 0x512C, 0xB246, 0, + 0, 0x512B, 0xB247, 0x4A48, 0, 0, 0xB248, 0, +}; +static const unsigned short utf8_to_euc_E584[] = { + 0x3537, 0x512E, 0x512F, 0xB249, 0x322F, 0, 0xB24A, 0xB24B, + 0xB24C, 0x512D, 0, 0xB24D, 0xB24E, 0xB24F, 0xB250, 0, + 0xB252, 0, 0x3C74, 0, 0x5132, 0x5131, 0x5130, 0xB253, + 0x5056, 0xB254, 0x5133, 0xB255, 0xB256, 0xB257, 0xB258, 0x3D7E, + 0, 0x5134, 0, 0xB259, 0, 0, 0, 0xB25A, + 0xB25B, 0, 0x4D25, 0, 0xB25C, 0xB25D, 0, 0xB25E, + 0, 0xB25F, 0x4C59, 0xB260, 0xB261, 0xB262, 0, 0x5136, + 0xB263, 0xB264, 0x5135, 0x5138, 0x5137, 0, 0, 0x5139, +}; +static const unsigned short utf8_to_euc_E585[] = { + 0x513A, 0x3074, 0xB265, 0x3835, 0x373B, 0x3D3C, 0x437B, 0x3624, + 0x4068, 0x3877, 0xB266, 0x396E, 0x513C, 0x4C48, 0x4546, 0xB267, + 0x3B79, 0, 0x513B, 0xB268, 0x513D, 0xB269, 0, 0xB26A, + 0xB26B, 0, 0x455E, 0, 0x3375, 0, 0, 0xB26C, + 0, 0, 0x513E, 0, 0xB26D, 0x467E, 0xB26E, 0, + 0x4134, 0x5140, 0x5141, 0x482C, 0x3878, 0x4F3B, 0x5142, 0, + 0, 0x3626, 0, 0, 0, 0x4A3C, 0x4236, 0x3671, + 0x4535, 0, 0, 0, 0x3773, 0, 0xB26F, 0, +}; +static const unsigned short utf8_to_euc_E586[] = { + 0x5143, 0, 0x5144, 0xB270, 0xB271, 0x4662, 0x315F, 0, + 0, 0x5147, 0x3A7D, 0xB272, 0x5146, 0x3A46, 0xB273, 0x5148, + 0x666E, 0x5149, 0x4B41, 0x514A, 0, 0x514B, 0x514C, 0x3E69, + 0xB274, 0x3C4C, 0, 0, 0, 0xB275, 0, 0, + 0x3427, 0xB276, 0x514F, 0xB277, 0x514D, 0x4C3D, 0x514E, 0, + 0x495A, 0x5150, 0x5151, 0x5152, 0x455F, 0xB278, 0, 0, + 0x5156, 0x5154, 0x5155, 0x5153, 0x3A63, 0x5157, 0x4C6A, 0x4E64, + 0xB279, 0, 0xB27A, 0, 0xB27B, 0x5158, 0xB27C, 0xB27D, +}; +static const unsigned short utf8_to_euc_E587[] = { + 0, 0, 0xB27E, 0, 0x4028, 0x5159, 0x3D5A, 0, + 0xB321, 0x515A, 0, 0x437C, 0x4E3F, 0x4560, 0, 0xB322, + 0, 0xB323, 0xB324, 0xB325, 0, 0xB326, 0x5245, 0, + 0xB327, 0, 0, 0x515B, 0x7425, 0x3645, 0xB328, 0, + 0x515C, 0x4B5E, 0xB329, 0, 0, 0xB32A, 0x3D68, 0x427C, + 0, 0x515E, 0x4664, 0, 0xF431, 0x515F, 0xB32B, 0, + 0x5160, 0x332E, 0xB32C, 0xB32D, 0xB32E, 0x5161, 0x3627, 0xB32F, + 0x464C, 0x317A, 0x3D50, 0, 0, 0x4821, 0x5162, 0, +}; +static const unsigned short utf8_to_euc_E588[] = { + 0x4561, 0xB330, 0xB331, 0x3F4F, 0x5163, 0xB332, 0x4A2C, 0x405A, + 0x3422, 0, 0x3429, 0x5164, 0, 0, 0x5166, 0, + 0, 0x373A, 0xB333, 0xB334, 0x5165, 0xB335, 0xB336, 0x4E73, + 0xB337, 0, 0, 0, 0, 0x3D69, 0, 0, + 0, 0, 0xB338, 0, 0x483D, 0x4A4C, 0, 0x5167, + 0xB339, 0x4D78, 0x5168, 0, 0, 0, 0x5169, 0, + 0x457E, 0xB33A, 0xB33B, 0x516A, 0, 0xB33C, 0x4029, 0x3A7E, + 0x3774, 0x516B, 0x3B49, 0x396F, 0xB33D, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E589[] = { + 0, 0, 0, 0x4466, 0x516D, 0xB33E, 0, 0x4227, + 0, 0xB33F, 0x3A6F, 0x516E, 0x516F, 0x4130, 0, 0x516C, + 0, 0, 0, 0, 0x5171, 0xB340, 0x4B36, 0xB341, + 0xB342, 0, 0xB343, 0x3964, 0xB344, 0, 0x5170, 0xB345, + 0xB346, 0xB347, 0, 0x3775, 0x3A5E, 0x476D, 0xB348, 0, + 0, 0x5174, 0x5172, 0, 0, 0, 0xB349, 0x497B, + 0x3E6A, 0x517B, 0x3364, 0x5175, 0x5173, 0x414F, 0, 0xB34A, + 0xB34B, 0xB34C, 0, 0, 0, 0x5177, 0, 0x5176, +}; +static const unsigned short utf8_to_euc_E58A[] = { + 0xB34D, 0, 0xB34E, 0x3344, 0, 0xB34F, 0, 0x3760, + 0x517C, 0x4E2D, 0xB350, 0, 0xB351, 0x5178, 0, 0, + 0, 0x517D, 0x517A, 0xB352, 0x5179, 0xB353, 0xB354, 0xB355, + 0xB356, 0, 0xB357, 0x4E4F, 0xB358, 0, 0, 0x3879, + 0x3243, 0, 0, 0x4E74, 0xB359, 0xB35A, 0xB35B, 0xB35C, + 0, 0x3D75, 0x4558, 0x3965, 0x5222, 0x5223, 0, 0xB35D, + 0xB35E, 0x4E65, 0, 0, 0x4F2B, 0x5225, 0xB35F, 0xB360, + 0xB361, 0x387A, 0xB362, 0xB363, 0x5224, 0xB364, 0x332F, 0, +}; +static const unsigned short utf8_to_euc_E58B[] = { + 0xB365, 0x5226, 0, 0x4B56, 0xB366, 0x443C, 0xB367, 0x4D26, + 0xB368, 0x4A59, 0, 0, 0xB369, 0x5227, 0, 0xB36A, + 0, 0xB36B, 0x7055, 0, 0xB36C, 0x4630, 0xB36D, 0x5228, + 0x342A, 0x4C33, 0, 0xB36E, 0xB36F, 0x3E21, 0x5229, 0x4A67, + 0x522D, 0xB370, 0x402A, 0x522A, 0x3650, 0xB371, 0x522B, 0x342B, + 0xB372, 0xB373, 0xB374, 0, 0xB375, 0, 0, 0, + 0xB376, 0xB377, 0x372E, 0x522E, 0xB378, 0x522F, 0xB379, 0xB37A, + 0x5230, 0x5231, 0x3C5B, 0, 0, 0, 0x387B, 0x4C5E, +}; +static const unsigned short utf8_to_euc_E58C[] = { + 0xB37B, 0x4C68, 0x4677, 0xB37C, 0, 0x4A71, 0x5232, 0xF432, + 0x5233, 0, 0xB37D, 0xB37E, 0xB421, 0x5235, 0, 0x5237, + 0x5236, 0xB422, 0, 0xB423, 0, 0x5238, 0x323D, 0x4B4C, + 0xB424, 0x3A7C, 0x5239, 0xB425, 0xB426, 0x4159, 0xB427, 0xB428, + 0x3E22, 0x3629, 0, 0x523A, 0xF433, 0xB429, 0, 0xB42A, + 0xB42B, 0xB42C, 0x485B, 0xB42D, 0xB42E, 0xB42F, 0, 0x523B, + 0xB430, 0x523C, 0xB431, 0x523D, 0, 0xB432, 0, 0, + 0x523E, 0x4924, 0x3668, 0x3065, 0xB433, 0xB434, 0xB435, 0x463F, +}; +static const unsigned short utf8_to_euc_E58D[] = { + 0x523F, 0x3D3D, 0xB436, 0x4069, 0, 0x5241, 0x5240, 0x3E23, + 0x3861, 0x5243, 0x483E, 0xB438, 0xB437, 0x5244, 0, 0, + 0, 0x485C, 0x4234, 0x426E, 0x3628, 0, 0, 0x466E, + 0x4331, 0xB439, 0x476E, 0xB43A, 0x4B4E, 0, 0x5246, 0, + 0x406A, 0xB43B, 0, 0xB43C, 0, 0xB43D, 0x3735, 0, + 0, 0x5247, 0, 0, 0xB43E, 0xB43F, 0x5248, 0x312C, + 0x3075, 0x346D, 0xB440, 0x4228, 0x3551, 0x4D71, 0, 0x524B, + 0x3237, 0xB441, 0, 0x524A, 0, 0, 0xB442, 0x362A, +}; +static const unsigned short utf8_to_euc_E58E[] = { + 0, 0, 0x524C, 0xB443, 0x4C71, 0, 0, 0xB444, + 0xB445, 0, 0, 0, 0, 0, 0xB446, 0, + 0, 0, 0, 0xB447, 0xB448, 0, 0x524D, 0, + 0x4E52, 0xB449, 0x387C, 0, 0, 0xB44A, 0, 0x3836, + 0x524E, 0xB44B, 0, 0, 0xB44C, 0x5250, 0x524F, 0, + 0x3F5F, 0x3139, 0xB44D, 0xB44E, 0, 0x315E, 0x5251, 0xB44F, + 0x5252, 0, 0xB450, 0x3837, 0xB451, 0xB452, 0x5253, 0xB453, + 0xB454, 0, 0xB455, 0x356E, 0, 0xB456, 0, 0, +}; +static const unsigned short utf8_to_euc_E58F[] = { + 0xB457, 0, 0x3B32, 0x5254, 0, 0xB458, 0, 0, + 0x4B74, 0x3A35, 0x355A, 0x4D27, 0x4150, 0x483F, 0x3C7D, 0xB459, + 0, 0, 0xB45A, 0xB45B, 0x3D47, 0xB45C, 0x3C68, 0x3C75, + 0, 0x3D76, 0xB45D, 0x4840, 0, 0xB45E, 0xB45F, 0x5257, + 0xB460, 0x3143, 0x4151, 0x387D, 0x3845, 0x3667, 0xB461, 0xB462, + 0x525B, 0x4321, 0x427E, 0x362B, 0x3E24, 0x525C, 0x525A, 0x3244, + 0x4266, 0x3C38, 0x3B4B, 0x3126, 0, 0xB463, 0x3370, 0x3966, + 0x3B4A, 0, 0x525D, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E590[] = { + 0, 0x525E, 0xB464, 0x3549, 0x3346, 0, 0, 0, + 0x3967, 0x3548, 0x445F, 0x3125, 0x4631, 0x4C3E, 0x3921, 0x4D79, + 0x4547, 0x387E, 0, 0xB465, 0, 0, 0, 0, + 0, 0, 0xB466, 0x372F, 0, 0x5267, 0, 0x3663, + 0x4B4A, 0xB467, 0, 0, 0, 0, 0x485D, 0xB468, + 0xB469, 0x5266, 0xB46A, 0x345E, 0x5261, 0x5262, 0x5264, 0xB46B, + 0, 0xB46C, 0, 0, 0xB46D, 0xB46E, 0x5265, 0, + 0x355B, 0x3F61, 0, 0x4A2D, 0x5263, 0x525F, 0x3863, 0, +}; +static const unsigned short utf8_to_euc_E591[] = { + 0x5260, 0, 0x4F24, 0xB46F, 0xB470, 0, 0x4A72, 0xB471, + 0x4468, 0x3862, 0x3970, 0, 0, 0xB472, 0x5268, 0xB473, + 0, 0x465D, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xB474, 0x526C, + 0, 0, 0xB475, 0, 0xB476, 0, 0xB477, 0xB478, + 0x3C7E, 0xB479, 0x3C76, 0xB47A, 0, 0xB47B, 0xB47C, 0, + 0x526F, 0x526D, 0, 0x4C23, 0xB47D, 0x526A, 0x5273, 0x526E, + 0, 0, 0, 0x5271, 0x3846, 0x4C3F, 0, 0xB47E, +}; +static const unsigned short utf8_to_euc_E592[] = { + 0x5272, 0xB521, 0, 0xB522, 0x5274, 0xB523, 0x5276, 0, + 0xB524, 0xB525, 0xF435, 0x3A70, 0x4F42, 0xB526, 0x526B, 0x5269, + 0x5275, 0xB527, 0x5270, 0, 0, 0xB528, 0xB529, 0, + 0, 0, 0, 0, 0xB52A, 0, 0, 0xB52B, + 0, 0xB52C, 0x5278, 0, 0x5323, 0x527A, 0xB52D, 0xB52E, + 0x527E, 0xB52F, 0xB530, 0x5321, 0x527B, 0xB531, 0xB532, 0x533E, + 0, 0xB533, 0x3A69, 0x3331, 0, 0, 0, 0xB534, + 0x5279, 0xB535, 0xB536, 0xB537, 0x5325, 0x3076, 0x5324, 0xB538, +}; +static const unsigned short utf8_to_euc_E593[] = { + 0x3025, 0x494A, 0x5322, 0, 0x527C, 0, 0xB539, 0x5277, + 0x527D, 0x3A48, 0xB53A, 0, 0, 0xB53B, 0xB53C, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x5326, 0, 0, 0, 0, 0, 0, 0, + 0xB53D, 0x3077, 0x532F, 0, 0, 0x5327, 0x5328, 0, + 0x3E25, 0x4B69, 0xB53E, 0, 0xB53F, 0x532D, 0x532C, 0xB540, + 0, 0, 0x452F, 0, 0, 0, 0xB541, 0, + 0, 0, 0x532E, 0, 0xB542, 0x532B, 0xB543, 0xB544, +}; +static const unsigned short utf8_to_euc_E594[] = { + 0xB545, 0xB546, 0, 0, 0x3134, 0xB547, 0x3A36, 0x3F30, + 0xB548, 0xB549, 0, 0, 0xB54A, 0xB54B, 0xB54C, 0x5329, + 0x4562, 0, 0, 0, 0x532A, 0xB54D, 0x3022, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xB54E, 0xB54F, 0, 0, 0x5334, 0x4D23, + 0, 0x3E27, 0xB550, 0x533A, 0, 0xB551, 0xB552, 0, + 0x5339, 0x5330, 0, 0xB553, 0xB554, 0xB555, 0x4243, 0, +}; +static const unsigned short utf8_to_euc_E595[] = { + 0x5331, 0xB556, 0, 0, 0x426F, 0x5336, 0x3E26, 0xB557, + 0, 0xB558, 0xB559, 0, 0x5333, 0xB55A, 0, 0x4C64, + 0xB55B, 0xB55C, 0, 0x373C, 0, 0, 0x5337, 0x5338, + 0xB55D, 0, 0xB55E, 0xB55F, 0x5335, 0x533B, 0xB560, 0, + 0xB561, 0xB562, 0, 0x5332, 0xB563, 0, 0xB564, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x5341, 0x5346, 0, 0x5342, 0xB565, +}; +static const unsigned short utf8_to_euc_E596[] = { + 0x533D, 0xB566, 0xB567, 0x5347, 0x4131, 0, 0xB568, 0x5349, + 0xB569, 0x3922, 0x533F, 0x437D, 0, 0, 0xB56A, 0xB56B, + 0, 0xB56C, 0xB56D, 0xB56E, 0xB56F, 0, 0, 0xB570, + 0x5343, 0x533C, 0x342D, 0, 0x346E, 0x3365, 0x5344, 0x5340, + 0, 0, 0, 0xB571, 0xB572, 0, 0, 0x3776, + 0x534A, 0x5348, 0x4153, 0x354A, 0x362C, 0xB573, 0x5345, 0, + 0x3674, 0, 0xB574, 0, 0, 0, 0x3144, 0, + 0, 0, 0, 0, 0, 0, 0, 0xB575, +}; +static const unsigned short utf8_to_euc_E597[] = { + 0, 0xB576, 0, 0xB577, 0x534E, 0x534C, 0xB578, 0x5427, + 0, 0xB579, 0, 0xB57A, 0xB57B, 0, 0xB57C, 0, + 0, 0xB57D, 0xB57E, 0xB621, 0x5351, 0, 0, 0xB622, + 0xB623, 0, 0x534B, 0xB624, 0x534F, 0, 0xB625, 0x534D, + 0, 0, 0xB626, 0x3B4C, 0x5350, 0, 0, 0, + 0, 0xB627, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xB628, 0x5353, + 0, 0x5358, 0, 0, 0, 0x5356, 0x5355, 0xB629, +}; +static const unsigned short utf8_to_euc_E598[] = { + 0, 0, 0, 0, 0, 0xB62A, 0x4332, 0, + 0xB62B, 0x3245, 0xB62C, 0, 0, 0xB62D, 0xB62E, 0xB62F, + 0xB630, 0xB631, 0xB632, 0, 0x5352, 0, 0x5354, 0x3E28, + 0x3133, 0xB633, 0, 0x5357, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x325E, 0, 0, 0xB634, 0, 0, 0x5362, + 0xB635, 0x3E7C, 0x535E, 0xB636, 0x535C, 0xB637, 0x535D, 0xB638, + 0x535F, 0xB639, 0, 0xB63A, 0xB63B, 0xB63C, 0, 0xB63D, +}; +static const unsigned short utf8_to_euc_E599[] = { + 0xB63E, 0xB63F, 0x313D, 0xB640, 0xB641, 0, 0xB642, 0, + 0, 0xB643, 0, 0xB644, 0x4139, 0xB645, 0x5359, 0xB646, + 0x535A, 0, 0, 0, 0xB647, 0, 0, 0, + 0, 0, 0, 0x337A, 0, 0, 0xB648, 0, + 0xB649, 0xB64A, 0xB64B, 0xB64C, 0x5361, 0, 0xB64D, 0, + 0x346F, 0xB64E, 0x5364, 0x5360, 0x5363, 0xB64F, 0, 0xB650, + 0, 0xB651, 0xB652, 0, 0x4A2E, 0xB653, 0, 0, + 0x4655, 0, 0x4838, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E59A[] = { + 0x5366, 0, 0, 0, 0xB654, 0xB655, 0x5365, 0x3345, + 0xB656, 0, 0x5367, 0xB657, 0xB658, 0, 0, 0x536A, + 0, 0, 0, 0, 0x5369, 0xB659, 0, 0, + 0, 0xB65A, 0xB65B, 0, 0, 0xB65C, 0xB65D, 0xB65E, + 0x5368, 0, 0x4739, 0, 0, 0x536B, 0xB65F, 0xB660, + 0xB661, 0xB662, 0, 0xB663, 0xB664, 0xB665, 0x536C, 0, + 0, 0xB666, 0, 0xB667, 0x536E, 0, 0x536D, 0xB668, + 0, 0, 0, 0, 0x5370, 0, 0xB669, 0, +}; +static const unsigned short utf8_to_euc_E59B[] = { + 0x5373, 0x5371, 0x536F, 0x5372, 0, 0xB66A, 0, 0, + 0x5374, 0xB66B, 0xB66C, 0xB66D, 0xB670, 0xB671, 0x5375, 0xB66E, + 0xB66F, 0x5376, 0, 0x5377, 0, 0, 0, 0x5378, + 0x5145, 0xB672, 0x3C7C, 0x3B4D, 0xB673, 0xB674, 0x3273, 0xB675, + 0x3078, 0xB676, 0, 0x4344, 0xB677, 0xB678, 0xB679, 0xB67A, + 0xB67B, 0, 0, 0xB67D, 0, 0xB67E, 0x5379, 0, + 0x3A24, 0xB67C, 0x304F, 0x3F5E, 0, 0, 0xB721, 0xB722, + 0, 0x537A, 0x3847, 0, 0, 0x3971, 0, 0x537C, +}; +static const unsigned short utf8_to_euc_E59C[] = { + 0x537B, 0xB723, 0xB724, 0x4A60, 0x537D, 0, 0, 0xB725, + 0x5421, 0x537E, 0xB726, 0x5422, 0xB727, 0x5423, 0, 0x3777, + 0, 0xB728, 0x3160, 0x5424, 0, 0xB729, 0x5426, 0, + 0x5425, 0, 0xB72A, 0xB72B, 0x5428, 0xB72C, 0, 0x455A, + 0xB72D, 0, 0xB72E, 0xB72F, 0xB730, 0xB731, 0x5429, 0x3035, + 0x3A5F, 0xB732, 0xB733, 0, 0xB734, 0x373D, 0xB735, 0xB736, + 0x434F, 0, 0, 0xB737, 0xB738, 0, 0, 0x542A, + 0x542B, 0, 0, 0x542D, 0, 0xB739, 0xB73A, 0xB73B, +}; +static const unsigned short utf8_to_euc_E59D[] = { + 0x542E, 0, 0x3A64, 0, 0, 0xB73C, 0xB73D, 0x3651, + 0, 0, 0x4B37, 0, 0xB73E, 0xB73F, 0x542C, 0x542F, + 0x3A41, 0x3923, 0xB740, 0, 0, 0, 0, 0, + 0, 0xF436, 0, 0, 0, 0, 0, 0, + 0, 0x5433, 0xB741, 0, 0x3A25, 0xB742, 0x4333, 0xB743, + 0xB744, 0x5430, 0x445A, 0xB745, 0, 0xB746, 0xB747, 0xB748, + 0xB749, 0xB74A, 0, 0xB74B, 0xB74C, 0xB74D, 0, 0xB74E, + 0, 0xB74F, 0xB750, 0xB751, 0xB752, 0, 0xB753, 0x5434, +}; +static const unsigned short utf8_to_euc_E59E[] = { + 0, 0xB754, 0x3F62, 0xB755, 0, 0, 0, 0, + 0x5432, 0x5435, 0, 0x373F, 0xB756, 0, 0, 0, + 0, 0, 0, 0x5436, 0xB757, 0xB760, 0, 0xB758, + 0, 0xB759, 0xB75A, 0, 0xB75B, 0xB75C, 0xB75D, 0xB75E, + 0x5437, 0xB75F, 0x3924, 0x3340, 0x5439, 0, 0, 0xB761, + 0xB762, 0xB763, 0x543A, 0, 0xB764, 0, 0, 0, + 0x543B, 0, 0, 0x5438, 0, 0, 0, 0, + 0xB765, 0, 0, 0, 0, 0xB766, 0, 0, +}; +static const unsigned short utf8_to_euc_E59F[] = { + 0x5431, 0, 0, 0x543C, 0, 0, 0x543D, 0xB767, + 0xB768, 0, 0, 0x4B64, 0xB769, 0, 0x3E6B, 0xB76A, + 0, 0, 0x543F, 0x5440, 0x543E, 0xB76B, 0x5442, 0, + 0, 0, 0, 0, 0x4738, 0xB76C, 0xB76D, 0x3068, + 0x4956, 0xB77E, 0, 0x5443, 0xB76E, 0, 0xB76F, 0xB770, + 0, 0xB771, 0, 0, 0, 0xB772, 0, 0, + 0xB773, 0, 0, 0, 0x3E7D, 0xB774, 0xB775, 0x3C39, + 0xB776, 0x475D, 0x3470, 0, 0x3A6B, 0xB777, 0xB778, 0xB779, +}; +static const unsigned short utf8_to_euc_E5A0[] = { + 0x4B59, 0, 0x4632, 0xB77A, 0xB77B, 0x3778, 0x424F, 0, + 0xB77C, 0xB77D, 0x5441, 0x5444, 0xB821, 0xB822, 0, 0, + 0, 0, 0, 0, 0, 0x4244, 0, 0, + 0, 0x5445, 0, 0xB823, 0, 0x5446, 0xB824, 0xB825, + 0xB826, 0x5448, 0, 0, 0x4469, 0, 0xB827, 0xB828, + 0, 0, 0x342E, 0, 0, 0xB829, 0, 0x7421, + 0x3161, 0x4A73, 0xB82A, 0, 0x3E6C, 0x4548, 0, 0, + 0, 0xB82B, 0x3A66, 0, 0, 0x544E, 0, 0xB82C, +}; +static const unsigned short utf8_to_euc_E5A1[] = { + 0x4A3D, 0x4E5D, 0, 0, 0, 0, 0, 0, + 0, 0xB82D, 0x3274, 0x544A, 0xB82E, 0xB82F, 0, 0xB830, + 0xB831, 0x413A, 0x544D, 0, 0x4563, 0xB832, 0, 0x4549, + 0x4564, 0x4839, 0x444D, 0, 0, 0, 0x3A49, 0xB833, + 0, 0xB834, 0x5449, 0, 0xB835, 0, 0, 0xB836, + 0xB837, 0x3176, 0, 0x4536, 0, 0, 0, 0, + 0x544B, 0, 0x5447, 0, 0, 0x3F50, 0, 0, + 0xB838, 0x544F, 0, 0, 0xB839, 0, 0x3D4E, 0xB83A, +}; +static const unsigned short utf8_to_euc_E5A2[] = { + 0xB83B, 0xB83C, 0, 0x362D, 0, 0x5450, 0, 0xB83D, + 0xB83E, 0xB83F, 0xB840, 0, 0xB841, 0xB842, 0, 0xB843, + 0xB844, 0, 0, 0x4A68, 0xB845, 0, 0xB846, 0x417D, + 0, 0, 0, 0, 0x4446, 0xB847, 0xF439, 0x5452, + 0xB848, 0xB849, 0xB84A, 0, 0, 0, 0xB84B, 0, + 0x4B4F, 0xB84C, 0, 0x5453, 0, 0, 0x5458, 0, + 0, 0xB84D, 0xB84E, 0x4A2F, 0, 0, 0, 0, + 0x5457, 0x5451, 0x5454, 0x5456, 0xB850, 0, 0x3A26, 0, +}; +static const unsigned short utf8_to_euc_E5A3[] = { + 0, 0x4A49, 0xB851, 0, 0xB84F, 0x5459, 0, 0x4345, + 0xB852, 0, 0x3275, 0, 0x3E6D, 0xB853, 0xB854, 0, + 0xB855, 0x545B, 0xB856, 0x545A, 0xB857, 0x3968, 0xB858, 0x545C, + 0x545E, 0x545D, 0xB859, 0, 0x5460, 0xB85A, 0x5455, 0x5462, + 0, 0xB85B, 0xB85C, 0, 0x5461, 0x545F, 0, 0, + 0, 0xB85D, 0, 0x3B4E, 0x3F51, 0, 0x4154, 0x5463, + 0x403C, 0x306D, 0x4764, 0xB85E, 0, 0, 0, 0x445B, + 0, 0x5465, 0x5464, 0x5466, 0x5467, 0x5468, 0, 0, +}; +static const unsigned short utf8_to_euc_E5A4[] = { + 0, 0, 0x5469, 0, 0, 0xB85F, 0xB860, 0, + 0, 0x4A51, 0x546A, 0xB861, 0xB862, 0, 0, 0x3246, + 0x546B, 0, 0xB863, 0xB864, 0xB865, 0x4D3C, 0x3330, 0, + 0x5249, 0x3D48, 0x423F, 0x546C, 0x4C6B, 0xB867, 0, 0, + 0, 0xB868, 0x4C34, 0xB869, 0xB86A, 0x546E, 0, 0x4267, + 0xB86B, 0x4537, 0x4240, 0x4957, 0x546F, 0x5470, 0x317B, 0xB86C, + 0xB86D, 0x3C3A, 0x5471, 0xB86E, 0, 0xB86F, 0xB870, 0x3050, + 0x5472, 0, 0, 0, 0, 0, 0x5473, 0xB871, +}; +static const unsigned short utf8_to_euc_E5A5[] = { + 0, 0, 0, 0xB872, 0x3162, 0, 0xB873, 0x3471, + 0x4660, 0x4A74, 0, 0, 0, 0, 0x5477, 0x4155, + 0x5476, 0x3740, 0xB874, 0xB875, 0x4B5B, 0x5475, 0, 0x4565, + 0x5479, 0xB876, 0x5478, 0xB877, 0, 0xB878, 0xB879, 0xB87A, + 0x547B, 0xB87B, 0x547A, 0xB87C, 0, 0x317C, 0, 0x547C, + 0x3E29, 0x547E, 0x4325, 0xB87D, 0x547D, 0xB87E, 0x4A33, 0xB921, + 0, 0, 0xB922, 0x3D77, 0x455B, 0xB923, 0xB924, 0, + 0x5521, 0xB925, 0, 0xB926, 0xB927, 0x3925, 0, 0, +}; +static const unsigned short utf8_to_euc_E5A6[] = { + 0, 0x5522, 0x4721, 0x485E, 0x4C51, 0, 0, 0, + 0, 0, 0x4725, 0xB928, 0xB929, 0x552B, 0xB92A, 0, + 0, 0, 0xB92B, 0x3538, 0, 0xB92C, 0x4D45, 0xB92D, + 0, 0x4C2F, 0, 0x562C, 0, 0x5523, 0, 0xB92E, + 0, 0, 0, 0x5526, 0xB92F, 0x4245, 0, 0xB930, + 0x4B38, 0, 0, 0, 0x454A, 0xB931, 0xB932, 0xB933, + 0xB934, 0, 0x5527, 0xB935, 0, 0, 0, 0xB936, + 0, 0x4B65, 0xB937, 0x3A4A, 0xB938, 0, 0x3E2A, 0, +}; +static const unsigned short utf8_to_euc_E5A7[] = { + 0, 0xB939, 0, 0xB93A, 0xB93B, 0, 0x5528, 0, + 0xB93C, 0x3B50, 0xB93D, 0x3B4F, 0, 0xB93E, 0, 0, + 0x3039, 0x3848, 0xB93F, 0x402B, 0x3051, 0, 0, 0, + 0, 0x552C, 0x552D, 0, 0x552A, 0xB940, 0xB941, 0xB942, + 0, 0, 0, 0xB943, 0xB944, 0x3138, 0x342F, 0xB945, + 0x5529, 0, 0x4C45, 0x4931, 0, 0, 0xB946, 0xB947, + 0, 0xB948, 0xB949, 0, 0xB94A, 0, 0x3028, 0xB94B, + 0, 0, 0, 0x3079, 0, 0, 0, 0x3B51, +}; +static const unsigned short utf8_to_euc_E5A8[] = { + 0xB94C, 0x3052, 0, 0x3023, 0xB94D, 0, 0, 0, + 0, 0x5532, 0, 0, 0xB94E, 0xB94F, 0xB950, 0, + 0, 0x5530, 0xB951, 0xB952, 0, 0, 0, 0, + 0x4C3C, 0, 0x5533, 0, 0x5531, 0, 0xB953, 0x552F, + 0x3F31, 0, 0, 0xB954, 0xB955, 0x552E, 0, 0xB956, + 0xB957, 0x4A5A, 0xB958, 0, 0, 0xB959, 0, 0x3864, + 0xB95A, 0, 0, 0, 0, 0x5537, 0x5538, 0, + 0, 0, 0, 0, 0x3E2B, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E5A9[] = { + 0x5534, 0x4F2C, 0, 0, 0xB95B, 0xB95C, 0x474C, 0xB95D, + 0xB95E, 0x5536, 0, 0, 0xB95F, 0, 0, 0, + 0xB960, 0, 0, 0, 0, 0xB961, 0, 0, + 0, 0, 0x3A27, 0, 0, 0, 0xB962, 0, + 0, 0, 0x5539, 0xB963, 0, 0xB964, 0x4958, 0xB965, + 0, 0, 0x553A, 0, 0x5535, 0xB966, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xB967, + 0, 0, 0xB968, 0xB969, 0, 0, 0xB96A, 0x4C3B, +}; +static const unsigned short utf8_to_euc_E5AA[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xB96B, 0, 0, 0, 0, + 0xB96C, 0, 0x475E, 0xB96D, 0, 0, 0xB96E, 0, + 0, 0xB96F, 0x553B, 0x4932, 0xB970, 0, 0xB971, 0xB972, + 0xB973, 0, 0xB974, 0, 0, 0, 0, 0xB975, + 0, 0, 0, 0, 0xB976, 0, 0, 0, + 0, 0xB977, 0xB978, 0xB979, 0, 0xB97A, 0, 0, + 0xB97B, 0, 0xB97C, 0xB97D, 0x553C, 0x5540, 0x553D, 0xB97E, +}; +static const unsigned short utf8_to_euc_E5AB[] = { + 0, 0x3247, 0x553F, 0, 0xBA21, 0, 0xBA22, 0, + 0xBA23, 0x3C3B, 0, 0x553E, 0x3779, 0, 0, 0xBA24, + 0x554C, 0, 0, 0, 0, 0, 0x5545, 0x5542, + 0, 0, 0xBA25, 0, 0xBA26, 0, 0, 0, + 0xBA27, 0x4364, 0, 0x5541, 0, 0xBA28, 0x5543, 0, + 0, 0x5544, 0xBA29, 0, 0, 0, 0xBA2A, 0, + 0, 0, 0, 0, 0, 0xBA2B, 0xBA2C, 0, + 0, 0, 0x5546, 0x5547, 0, 0xBA2D, 0, 0, +}; +static const unsigned short utf8_to_euc_E5AC[] = { + 0xBA2E, 0xBA2F, 0, 0, 0, 0, 0, 0, + 0xBA30, 0x3472, 0, 0x5549, 0x5548, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x554A, 0xBA31, + 0, 0xBA33, 0, 0xBA34, 0, 0xBA35, 0, 0, + 0, 0xBA36, 0x3E6E, 0, 0, 0xBA37, 0, 0, + 0, 0, 0x554D, 0, 0x445C, 0xBA38, 0, 0, + 0x3145, 0, 0x554B, 0, 0xBA32, 0, 0x554E, 0, + 0xBA39, 0, 0, 0, 0, 0, 0x554F, 0, +}; +static const unsigned short utf8_to_euc_E5AD[] = { + 0x5552, 0xBA3A, 0, 0x5550, 0, 0x5551, 0, 0, + 0, 0, 0, 0xBA3B, 0xBA3C, 0, 0, 0, + 0x3B52, 0x5553, 0xBA3D, 0, 0x3926, 0x5554, 0xBA3E, 0x3B7A, + 0x4238, 0, 0x5555, 0x5556, 0x3B5A, 0x3927, 0xBA3F, 0x4C52, + 0, 0, 0, 0x3528, 0x3849, 0x5557, 0x3358, 0, + 0xBA40, 0x5558, 0, 0x4239, 0, 0, 0xBA41, 0xBA42, + 0x5559, 0x5623, 0, 0x555A, 0, 0x555B, 0, 0, + 0x555C, 0, 0x555E, 0, 0xBA43, 0xBA44, 0xBA45, 0xBA46, +}; +static const unsigned short utf8_to_euc_E5AE[] = { + 0x555F, 0xBA47, 0, 0x5560, 0xBA48, 0x4270, 0xBA49, 0x3127, + 0x3C69, 0x3042, 0xBA4A, 0x4157, 0x3430, 0x3C35, 0xBA4B, 0x3928, + 0xBA4C, 0xBA4D, 0, 0xBA4E, 0xBA4F, 0x4566, 0xBA50, 0x3D21, + 0x3431, 0x4368, 0x446A, 0x3038, 0x3539, 0x4A75, 0, 0x3C42, + 0, 0, 0x3552, 0x406B, 0x3C3C, 0x4D28, 0x5561, 0, + 0xBA51, 0xBA52, 0, 0, 0xBA53, 0xBA54, 0x355C, 0xBA55, + 0x3A4B, 0xBA56, 0xBA57, 0x3332, 0x3163, 0x3E2C, 0x3248, 0xBA58, + 0x5562, 0x4D46, 0xBA59, 0, 0xBA5A, 0, 0, 0x3D49, +}; +static const unsigned short utf8_to_euc_E5AF[] = { + 0xBA5B, 0xBA5C, 0x3C64, 0x5563, 0x3473, 0x4652, 0x4C29, 0x5564, + 0, 0x5565, 0, 0, 0x4959, 0xBA5D, 0, 0xBA5E, + 0x5567, 0, 0x3428, 0x3677, 0x5566, 0, 0xBA5F, 0xBA60, + 0xBA61, 0xBA62, 0xBA63, 0x3432, 0, 0x3F32, 0x556B, 0x3B21, + 0xBA64, 0x3249, 0x556A, 0, 0x5568, 0x556C, 0x5569, 0x472B, + 0x5C4D, 0x3F33, 0, 0x556D, 0xF43A, 0, 0x4E40, 0xBA65, + 0x556E, 0xBA66, 0, 0x5570, 0xBA67, 0x437E, 0x556F, 0, + 0x4023, 0, 0x3B7B, 0, 0, 0xBA68, 0x4250, 0x3C77, +}; +static const unsigned short utf8_to_euc_E5B0[] = { + 0, 0x4975, 0x406C, 0, 0x3C4D, 0x5571, 0x3E2D, 0x5572, + 0x5573, 0x3053, 0x423A, 0x3F52, 0xBA69, 0x5574, 0x4633, 0x3E2E, + 0, 0x3E2F, 0, 0x5575, 0, 0, 0x406D, 0xBA6A, + 0, 0, 0x3E30, 0, 0, 0, 0xBA6B, 0xBA6C, + 0x5576, 0, 0x5577, 0xBA6D, 0x4C60, 0, 0xBA6E, 0, + 0x5578, 0xBA6F, 0, 0xBA70, 0xBA71, 0x3646, 0xBA72, 0, + 0xBA73, 0x3D22, 0xBA74, 0, 0, 0xBA75, 0xBA76, 0, + 0x5579, 0x557A, 0x3C5C, 0x3F2C, 0x4674, 0x3F54, 0x4878, 0x4722, +}; +static const unsigned short utf8_to_euc_E5B1[] = { + 0x3649, 0x557B, 0, 0, 0, 0x356F, 0x557C, 0, + 0x367E, 0, 0x464F, 0x3230, 0, 0x3B53, 0x557D, 0x5622, + 0x5621, 0x367D, 0, 0x557E, 0, 0x4538, 0, 0, + 0, 0xBA77, 0xBA78, 0, 0xBA79, 0, 0x4230, 0, + 0x454B, 0x3C48, 0xBA7A, 0xBA7B, 0x4158, 0x4D7A, 0, 0xBA7C, + 0xBA7D, 0xBA7E, 0, 0, 0x5624, 0xBB21, 0x5625, 0x4656, + 0xBB22, 0x3B33, 0, 0, 0xBB23, 0xBB24, 0x5627, 0, + 0, 0x5628, 0xBB25, 0xBB26, 0xBB27, 0xBB28, 0, 0, +}; +static const unsigned short utf8_to_euc_E5B2[] = { + 0, 0, 0, 0, 0, 0, 0, 0xBB29, + 0xBB2A, 0, 0xBB2B, 0, 0x5629, 0, 0, 0xBB2C, + 0x3474, 0x562A, 0xBB2D, 0, 0x562B, 0, 0, 0, + 0, 0, 0, 0, 0, 0xBB2E, 0, 0xBB2F, + 0xBB30, 0x322C, 0xBB31, 0xBB32, 0, 0, 0xBB33, 0, + 0x413B, 0x3464, 0xBB34, 0x562D, 0x4C28, 0, 0, 0, + 0, 0x4252, 0xBB35, 0x3359, 0xBB36, 0xBB37, 0x562F, 0x5631, + 0x345F, 0, 0xBB38, 0x562E, 0x5630, 0, 0x5633, 0, +}; +static const unsigned short utf8_to_euc_E5B3[] = { + 0, 0, 0, 0, 0, 0x5632, 0, 0x5634, + 0, 0xBB39, 0, 0xBB3A, 0, 0, 0, 0, + 0, 0, 0xBB3B, 0, 0, 0, 0, 0xBB3D, + 0, 0x5635, 0, 0, 0, 0xBB3C, 0, 0, + 0x463D, 0x362E, 0, 0, 0, 0, 0, 0, + 0x3265, 0x5636, 0x563B, 0, 0, 0x5639, 0xBB3E, 0x4A77, + 0x4A76, 0xBB3F, 0xBB40, 0, 0xBB41, 0xF43B, 0x4567, 0, + 0, 0, 0x5638, 0x3D54, 0, 0x5637, 0, 0, +}; +static const unsigned short utf8_to_euc_E5B4[] = { + 0, 0xBB42, 0, 0, 0, 0, 0xBB43, 0x3F72, + 0, 0, 0, 0x563C, 0, 0xBB44, 0x3A6A, 0, + 0, 0x5642, 0xBB45, 0, 0x5643, 0x563D, 0x3333, 0x563E, + 0x5647, 0x5646, 0x5645, 0x5641, 0, 0, 0, 0x5640, + 0, 0, 0x5644, 0xBB47, 0xBB48, 0, 0xBB49, 0xBB4A, + 0, 0x4A78, 0, 0xBB46, 0, 0, 0, 0, + 0, 0xBB4B, 0, 0, 0xBB4C, 0, 0, 0, + 0, 0xBB4D, 0, 0, 0, 0xBB4E, 0, 0xBB4F, +}; +static const unsigned short utf8_to_euc_E5B5[] = { + 0, 0, 0xBB50, 0xBB51, 0, 0, 0xBB52, 0, + 0xBB53, 0, 0xBB57, 0x564B, 0x5648, 0, 0x564A, 0, + 0x4D72, 0xBB55, 0x5649, 0xF43C, 0, 0xBB54, 0, 0, + 0, 0xBB56, 0, 0, 0x563F, 0, 0, 0xBB58, + 0xBB59, 0xBB5A, 0xBB5B, 0, 0xBB5C, 0, 0, 0, + 0, 0x3F73, 0xBB5D, 0, 0x564C, 0xBB5E, 0, 0x3A37, + 0xBB5F, 0, 0, 0x564D, 0, 0, 0x564E, 0, + 0, 0xBB60, 0xBB61, 0, 0, 0, 0xBB62, 0xBB63, +}; +static const unsigned short utf8_to_euc_E5B6[] = { + 0, 0xBB64, 0x5651, 0xBB65, 0x5650, 0, 0, 0x564F, + 0xBB66, 0, 0xBB67, 0x4568, 0x563A, 0, 0, 0, + 0x5657, 0, 0xBB68, 0xBB69, 0xBB6A, 0xBB6B, 0, 0, + 0, 0xBB6C, 0, 0xBB6D, 0, 0x5653, 0, 0xBB6E, + 0xBB6F, 0, 0x5652, 0, 0, 0, 0, 0xBB70, + 0, 0, 0, 0xBB71, 0x5654, 0, 0x5655, 0, + 0xBB72, 0, 0xE674, 0, 0xBB73, 0, 0, 0x5658, + 0xBB74, 0xBB75, 0x4E66, 0, 0x5659, 0x5656, 0, 0, +}; +static const unsigned short utf8_to_euc_E5B7[] = { + 0, 0, 0, 0xBB76, 0, 0, 0, 0xBB77, + 0, 0x565A, 0, 0xBB78, 0x3460, 0x565B, 0xBB7A, 0, + 0xBB79, 0, 0x565D, 0x565C, 0, 0, 0x565E, 0, + 0xBB7B, 0xBB7C, 0, 0x565F, 0, 0x406E, 0x3D23, 0, + 0xBB7D, 0x3D64, 0, 0x4163, 0xBB7E, 0x3929, 0x3A38, 0x392A, + 0x3570, 0xBC21, 0, 0x5660, 0, 0, 0x3A39, 0, + 0, 0x384A, 0x5661, 0x4C26, 0x4743, 0x5662, 0, 0x392B, + 0xBC22, 0xBC23, 0, 0x342C, 0, 0x4327, 0x3652, 0, +}; +static const unsigned short utf8_to_euc_E5B8[] = { + 0xBC24, 0, 0x3B54, 0x495B, 0, 0, 0x4841, 0xBC25, + 0, 0, 0, 0x5663, 0x3475, 0xBC26, 0, 0, + 0, 0x5666, 0xBC27, 0, 0xBC28, 0xBC29, 0x4421, 0, + 0xBC2A, 0x5665, 0x5664, 0x5667, 0, 0x446B, 0, 0xBC2B, + 0xBC2C, 0, 0, 0, 0, 0x3F63, 0, 0, + 0xBC2E, 0, 0, 0x3B55, 0, 0x404A, 0xBC2D, 0x4253, + 0x3522, 0, 0xBC2F, 0x4422, 0, 0xBC30, 0x5668, 0x5669, + 0x3E6F, 0, 0, 0, 0, 0x4B39, 0xBC31, 0, +}; +static const unsigned short utf8_to_euc_E5B9[] = { + 0x566C, 0, 0, 0x566B, 0x566A, 0x497D, 0, 0x5673, + 0, 0xBC34, 0, 0xBC32, 0x4B5A, 0, 0x566D, 0, + 0xBC33, 0xBC35, 0, 0, 0x566F, 0x4B6B, 0xBC36, 0x566E, + 0xBC37, 0, 0, 0xBC38, 0xBC39, 0, 0xBC3A, 0x5670, + 0, 0x4828, 0x5671, 0x4A3E, 0x5672, 0, 0, 0, + 0xBC3B, 0, 0xBC3C, 0xBC3D, 0xBC3E, 0xBC3F, 0xBC40, 0, + 0xBC41, 0, 0x3433, 0x4A3F, 0x472F, 0x5674, 0x5675, 0, + 0x392C, 0x3434, 0x5676, 0x3838, 0x4D44, 0x4D29, 0x3476, 0x5678, +}; +static const unsigned short utf8_to_euc_E5BA[] = { + 0xBC42, 0x4423, 0, 0x392D, 0x3E31, 0, 0, 0x485F, + 0, 0, 0x3E32, 0xBC43, 0, 0, 0xBC44, 0x3D78, + 0, 0, 0, 0, 0, 0x446C, 0x4A79, 0x4539, + 0, 0, 0x392E, 0, 0x495C, 0, 0, 0, + 0x5679, 0, 0xBC45, 0, 0xBC46, 0xBC47, 0x4559, 0x3A42, + 0xBC48, 0, 0xBC49, 0x384B, 0xBC4A, 0x446D, 0, 0, + 0, 0xBC4B, 0, 0xBC4C, 0, 0x3043, 0x3D6E, 0x392F, + 0x4D47, 0, 0, 0, 0, 0xBC4D, 0xBC4E, 0xBC4F, +}; +static const unsigned short utf8_to_euc_E5BB[] = { + 0, 0x567A, 0x567B, 0x4751, 0, 0, 0xBC50, 0, + 0x567C, 0x4E77, 0x4F2D, 0xBC52, 0xBC51, 0, 0xBC53, 0x567E, + 0x567D, 0xBC54, 0xBC55, 0x3347, 0xBC56, 0xBC57, 0x5721, 0, + 0, 0, 0x5724, 0x5725, 0xBC58, 0x5723, 0xBC59, 0x4940, + 0x3E33, 0x5727, 0x5726, 0x5722, 0, 0xBC5A, 0, 0, + 0x5728, 0x5729, 0, 0xBC5B, 0x572A, 0, 0, 0, + 0x572D, 0x572B, 0, 0x572C, 0x572E, 0, 0x3164, 0x446E, + 0x572F, 0, 0x377A, 0x3276, 0x4736, 0, 0x5730, 0x467B, +}; +static const unsigned short utf8_to_euc_E5BC[] = { + 0, 0x4A5B, 0xBC5C, 0x5731, 0x4F2E, 0, 0xBC5D, 0xBC5E, + 0xBC5F, 0x5732, 0x4A40, 0x5735, 0x5021, 0x5031, 0xBC60, 0x3C30, + 0x4675, 0x5736, 0, 0x355D, 0x4424, 0x307A, 0x5737, 0x4A26, + 0x3930, 0xBC61, 0, 0x4350, 0xBC62, 0xBC63, 0, 0x446F, + 0, 0xBC64, 0xBC65, 0xBC66, 0xBC67, 0x4C6F, 0x3839, 0x384C, + 0xBC68, 0x5738, 0, 0xBC69, 0xBC6A, 0x5739, 0xBC6B, 0x573F, + 0xBC6C, 0x3C65, 0, 0, 0xBC6D, 0x4425, 0xBC6E, 0x362F, + 0x573A, 0, 0, 0xBC6F, 0x492B, 0xBC70, 0x4346, 0xBC71, +}; +static const unsigned short utf8_to_euc_E5BD[] = { + 0xBC72, 0x573B, 0, 0, 0xBC73, 0xBC74, 0, 0xBC75, + 0x573C, 0, 0x3630, 0, 0x573D, 0xBC76, 0x573E, 0, + 0xBC77, 0x5740, 0, 0x4576, 0xBC78, 0, 0x5741, 0x5742, + 0xBC79, 0x5743, 0, 0xBC7A, 0x5734, 0x5733, 0, 0, + 0xBC7B, 0x5744, 0x3741, 0xBC7C, 0xBC7D, 0, 0x4927, 0xBC7E, + 0, 0x3A4C, 0x4937, 0x4426, 0x494B, 0x5745, 0, 0xBD21, + 0x3E34, 0x3146, 0xBD22, 0x5746, 0xBD23, 0xBD24, 0, 0x5747, + 0xBD25, 0x4C72, 0xBD26, 0, 0x4860, 0xBD27, 0xBD28, 0x574A, +}; +static const unsigned short utf8_to_euc_E5BE[] = { + 0x317D, 0x402C, 0x5749, 0x5748, 0x3742, 0x4254, 0, 0x574E, + 0x574C, 0xBD29, 0x574B, 0x4E27, 0x3865, 0xBD2A, 0, 0xBD2B, + 0x3D79, 0x574D, 0x454C, 0x3D3E, 0, 0, 0xBD2C, 0x4640, + 0x5751, 0x5750, 0, 0, 0xBD2D, 0xBD2E, 0x574F, 0, + 0x5752, 0x3866, 0xBD2F, 0, 0xBD32, 0, 0, 0xBD30, + 0x5753, 0x497C, 0x3D5B, 0xBD31, 0xBD33, 0x5754, 0x4879, 0xBD34, + 0xBD35, 0xBD36, 0, 0x4641, 0x4427, 0, 0, 0xF43E, + 0xBD37, 0x4530, 0, 0, 0x5755, 0x352B, 0, 0, +}; +static const unsigned short utf8_to_euc_E5BF[] = { + 0, 0, 0, 0x3F34, 0xBD38, 0x492C, 0, 0xBD39, + 0xBD3A, 0xBD3B, 0, 0xBD3C, 0x3477, 0x4726, 0, 0, + 0xBD3D, 0xBD3E, 0xBD3F, 0xBD40, 0xBD41, 0, 0x5756, 0x3B56, + 0x4B3A, 0x4B3B, 0, 0, 0x317E, 0x575B, 0xBD42, 0, + 0x4369, 0xBD43, 0xBD44, 0, 0x5758, 0, 0, 0, + 0xBD45, 0xBD46, 0xBD47, 0x3277, 0xBD48, 0xBD49, 0xBD4A, 0xBD4B, + 0x582D, 0x575A, 0xBD4C, 0xBD4D, 0, 0x4730, 0xBD4E, 0, + 0x5759, 0, 0xBD4F, 0x5757, 0xBD50, 0x397A, 0, 0x575D, +}; +static const unsigned short utf8_to_euc_E680[] = { + 0, 0, 0, 0, 0, 0, 0, 0xBD51, + 0, 0, 0xBD52, 0, 0, 0xBD53, 0x5763, 0x5769, + 0x5761, 0, 0x455C, 0xBD54, 0xBD55, 0x5766, 0x495D, 0xBD56, + 0xBD57, 0x5760, 0xBD58, 0x5765, 0x4E67, 0x3B57, 0, 0xBD59, + 0x4255, 0x575E, 0, 0, 0xBD5A, 0x355E, 0x5768, 0x402D, + 0x3165, 0x5762, 0x3278, 0x5767, 0, 0xBD5B, 0, 0x3631, + 0, 0x5764, 0, 0xBD5C, 0, 0xBD5D, 0, 0, + 0, 0, 0x576A, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E681[] = { + 0xBD5E, 0x576C, 0x5776, 0x5774, 0, 0, 0x5771, 0xBD5F, + 0xBD60, 0xBD61, 0x5770, 0x4E78, 0xBD62, 0x5772, 0, 0, + 0x3632, 0xBD63, 0x3931, 0, 0xBD64, 0x3D7A, 0xBD65, 0xBD66, + 0, 0x5779, 0x576B, 0, 0, 0xBD67, 0, 0x576F, + 0x575F, 0xBD68, 0x327A, 0x5773, 0x5775, 0x4351, 0, 0xBD69, + 0x3A28, 0x3238, 0x576D, 0x5778, 0x5777, 0x3633, 0, 0x4229, + 0x3366, 0xBD6A, 0, 0, 0, 0x3743, 0, 0x576E, + 0, 0, 0, 0, 0, 0, 0xBD6B, 0xBD6C, +}; +static const unsigned short utf8_to_euc_E682[] = { + 0, 0x577A, 0xBD6D, 0x577D, 0x5821, 0xF43F, 0xBD6E, 0, + 0xBD6F, 0x3C3D, 0xBD70, 0x5827, 0x4470, 0x577B, 0xBD71, 0, + 0, 0xBD72, 0x5825, 0xBD73, 0x3279, 0xBD74, 0x5823, 0x5824, + 0xBD75, 0, 0x577E, 0x5822, 0, 0xBD76, 0xBD77, 0x3867, + 0x4D2A, 0, 0xBD78, 0x3435, 0xBD79, 0xBD7A, 0x3159, 0x5826, + 0xBD7B, 0x473A, 0x302D, 0, 0, 0, 0, 0, + 0xBD7C, 0xBD7D, 0x4861, 0x575C, 0x582C, 0x5830, 0x4C65, 0xBD7E, + 0x5829, 0, 0, 0xBE21, 0x4569, 0x582E, 0xBE22, 0, +}; +static const unsigned short utf8_to_euc_E683[] = { + 0, 0, 0xBE23, 0, 0xBE24, 0x3E70, 0x582F, 0x4657, + 0xBE25, 0xBE26, 0xBE27, 0xBE28, 0, 0, 0xBE29, 0xBE2A, + 0, 0x4F47, 0, 0x582B, 0xBE2B, 0xBE2C, 0, 0, + 0x5831, 0xBE2D, 0x397B, 0xBE2E, 0x404B, 0xBE2F, 0xBE30, 0x3054, + 0x582A, 0x5828, 0xBE31, 0x415A, 0, 0xBE32, 0, 0x577C, + 0x3B34, 0, 0, 0, 0, 0, 0, 0, + 0x4246, 0x583D, 0xBE33, 0x415B, 0x5838, 0xBE34, 0x5835, 0x5836, + 0xBE35, 0x3C66, 0x5839, 0x583C, 0xBE36, 0xBE37, 0, 0, +}; +static const unsigned short utf8_to_euc_E684[] = { + 0x5837, 0x3D25, 0xBE38, 0x583A, 0, 0, 0x5834, 0xBE39, + 0x4C7C, 0x4C7B, 0xBE3A, 0, 0xBE3B, 0x583E, 0x583F, 0x3055, + 0xBE3C, 0xBE3D, 0xBE3E, 0xBE3F, 0xBE40, 0x5833, 0xBE41, 0xBE42, + 0, 0xBE43, 0x3672, 0x3026, 0xBE44, 0, 0xBE45, 0x3436, + 0xF440, 0x583B, 0xBE46, 0, 0, 0, 0, 0x5843, + 0x5842, 0, 0xBE47, 0xBE48, 0x5847, 0, 0, 0, + 0xBE49, 0xBE4A, 0, 0, 0x5848, 0xBE4B, 0xBE4C, 0xBE4D, + 0, 0xBE4E, 0, 0, 0x5846, 0x5849, 0x5841, 0x5845, +}; +static const unsigned short utf8_to_euc_E685[] = { + 0, 0xBE4F, 0x584A, 0, 0x584B, 0xBE50, 0xBE51, 0x5840, + 0x3B7C, 0xBE52, 0x5844, 0x4256, 0x3932, 0x5832, 0x3F35, 0, + 0, 0, 0, 0x5858, 0, 0x4A69, 0, 0, + 0x584E, 0x584F, 0x5850, 0, 0, 0x5857, 0xBE53, 0x5856, + 0xBE54, 0, 0x4B7D, 0x3437, 0, 0x5854, 0, 0x3745, + 0x3334, 0, 0, 0x5851, 0xBE55, 0, 0x4E38, 0x5853, + 0x3056, 0x5855, 0xBE56, 0x584C, 0x5852, 0x5859, 0x3744, 0x584D, + 0xBE57, 0, 0, 0xBE58, 0xBE59, 0, 0x4D5D, 0xBE5A, +}; +static const unsigned short utf8_to_euc_E686[] = { + 0xBE5B, 0xBE5C, 0x4D2B, 0xBE5D, 0xBE5E, 0, 0, 0x585C, + 0, 0, 0x5860, 0xBE5F, 0, 0xBE60, 0x417E, 0, + 0x4E79, 0x5861, 0xBE61, 0xBE62, 0x585E, 0, 0x585B, 0xBE63, + 0xBE64, 0x585A, 0x585F, 0, 0xBE65, 0xBE66, 0, 0xBE67, + 0xBE68, 0, 0, 0, 0x4A30, 0xBE69, 0, 0x4634, + 0xBE6A, 0x3746, 0xBE6B, 0x5862, 0x585D, 0xBE6C, 0x5863, 0, + 0, 0, 0x377B, 0, 0, 0, 0x3231, 0, + 0xBE6D, 0xBE6E, 0x586B, 0, 0xBE6F, 0, 0x3438, 0, +}; +static const unsigned short utf8_to_euc_E687[] = { + 0xBE70, 0xBE71, 0xBE72, 0x5869, 0, 0, 0x586A, 0x3A29, + 0x5868, 0x5866, 0x5865, 0x586C, 0x5864, 0x586E, 0xBE73, 0xBE74, + 0x327B, 0, 0, 0, 0, 0xBE75, 0, 0, + 0, 0, 0, 0, 0xBE76, 0xBE77, 0xBE78, 0xBE79, + 0, 0xBE7A, 0xBE7B, 0x5870, 0, 0xBE7E, 0x586F, 0xBE7C, + 0, 0xBE7D, 0, 0, 0xBF21, 0xBF22, 0, 0xBF23, + 0, 0, 0x4428, 0, 0x5873, 0, 0x5871, 0x5867, + 0x377C, 0, 0x5872, 0, 0x5876, 0x5875, 0x5877, 0x5874, +}; +static const unsigned short utf8_to_euc_E688[] = { + 0x5878, 0xBF24, 0, 0xBF25, 0xBF26, 0, 0, 0xBF27, + 0x5879, 0x587A, 0x4A6A, 0, 0x587C, 0x587B, 0x3D3F, 0, + 0x402E, 0x3266, 0x327C, 0xBF28, 0x587D, 0xBF29, 0x303F, 0, + 0, 0, 0x404C, 0x587E, 0xBF2A, 0x6C43, 0x5921, 0x3761, + 0xBF2B, 0x5922, 0xBF2C, 0xBF2D, 0, 0, 0x406F, 0xBF2E, + 0, 0xBF2F, 0x5923, 0xBF30, 0, 0, 0x5924, 0x353A, + 0x5925, 0, 0x5926, 0x5927, 0x4257, 0, 0, 0, + 0x384D, 0xBF31, 0, 0x4C61, 0, 0xBF32, 0, 0x4B3C, +}; +static const unsigned short utf8_to_euc_E689[] = { + 0x3D6A, 0x5928, 0xBF33, 0xBF34, 0xBF35, 0, 0xBF36, 0x4070, + 0x6E3D, 0x4862, 0, 0x3C6A, 0xBF37, 0x3A4D, 0x5929, 0, + 0xBF38, 0xBF39, 0xBF3A, 0x4247, 0xBF3B, 0x4A27, 0xBF3C, 0, + 0x4271, 0, 0xBF3D, 0x592C, 0xBF3E, 0, 0x592A, 0, + 0x592D, 0, 0, 0x592B, 0xBF3F, 0, 0, 0, + 0x592E, 0, 0, 0, 0, 0xBF40, 0x4A31, 0xBF41, + 0, 0x3037, 0, 0xBF42, 0, 0, 0x495E, 0, + 0, 0x4863, 0xBF43, 0, 0x592F, 0xBF44, 0x5932, 0x3E35, +}; +static const unsigned short utf8_to_euc_E68A[] = { + 0x353B, 0, 0x5930, 0x5937, 0x3E36, 0, 0, 0, + 0, 0x5931, 0x4744, 0, 0, 0xBF45, 0xBF46, 0xBF47, + 0xBF48, 0x4D5E, 0x5933, 0x5934, 0x5938, 0x456A, 0x5935, 0x3933, + 0x405E, 0, 0, 0x5946, 0x4834, 0, 0x4272, 0, + 0, 0, 0, 0, 0, 0, 0xBF49, 0, + 0xBF4A, 0, 0, 0x4864, 0x5A2D, 0, 0, 0, + 0, 0x4A7A, 0, 0xBF4B, 0, 0x4471, 0xBF4C, 0xBF4D, + 0, 0x4B75, 0xBF4E, 0x593B, 0x3221, 0x436A, 0xBF4F, 0xBF50, +}; +static const unsigned short utf8_to_euc_E68B[] = { + 0, 0, 0x5944, 0, 0xBF51, 0x4334, 0x593E, 0x5945, + 0x5940, 0x5947, 0x5943, 0, 0x5942, 0x476F, 0xBF52, 0x593C, + 0x327D, 0x593A, 0x3571, 0x4273, 0x5936, 0xBF53, 0xBF54, 0x5939, + 0x3934, 0x405B, 0xBF55, 0x3E37, 0x5941, 0x4752, 0, 0, + 0x3572, 0x3348, 0, 0, 0, 0, 0, 0, + 0, 0, 0xBF56, 0, 0x3367, 0x3F21, 0x5949, 0x594E, + 0, 0x594A, 0xBF57, 0x377D, 0xBF58, 0x594F, 0x3B22, 0x3969, + 0, 0, 0, 0, 0xBF59, 0xBF5A, 0x3D26, 0x593D, +}; +static const unsigned short utf8_to_euc_E68C[] = { + 0, 0x3B7D, 0x594C, 0xBF5B, 0xBF5C, 0, 0, 0x3B58, + 0x594D, 0x3044, 0xBF5D, 0xBF5E, 0x5948, 0xBF5F, 0, 0, + 0xBF60, 0x4429, 0, 0xBF61, 0, 0, 0xBF62, 0, + 0xBF63, 0x3573, 0, 0, 0, 0, 0, 0x3634, + 0, 0, 0, 0, 0, 0, 0, 0x594B, + 0x3027, 0xBF64, 0xBF65, 0x3A43, 0, 0xBF66, 0, 0x3F36, + 0, 0, 0, 0, 0, 0xBF67, 0xBF68, 0, + 0, 0xBF69, 0x4472, 0, 0xBF6A, 0x4854, 0x5951, 0x415E, +}; +static const unsigned short utf8_to_euc_E68D[] = { + 0, 0xBF6B, 0xBF6C, 0xBF6D, 0xBF6E, 0, 0xBF6F, 0, + 0, 0x422A, 0xBF70, 0xBF71, 0x3B2B, 0x5952, 0xBF72, 0x5954, + 0x5950, 0, 0xBF73, 0xBF74, 0xBF75, 0x4A61, 0, 0x443D, + 0xBF76, 0, 0, 0xBF77, 0x415C, 0, 0, 0, + 0, 0, 0, 0, 0, 0xBF78, 0xBF79, 0x4A7B, + 0x3C4E, 0x5960, 0, 0x595F, 0xBF7A, 0xBF7B, 0x3F78, 0, + 0, 0xBF7C, 0x377E, 0, 0xBF7D, 0xBF7E, 0x5959, 0x3E39, + 0xC021, 0, 0x4668, 0x4731, 0xC022, 0xC023, 0, 0xC024, +}; +static const unsigned short utf8_to_euc_E68E[] = { + 0x5957, 0, 0xC025, 0x415D, 0xC026, 0, 0, 0xC027, + 0x3C78, 0x595C, 0xC028, 0, 0x3E38, 0, 0x5956, 0x595B, + 0xC029, 0, 0x4753, 0, 0xC02A, 0xC02B, 0x5955, 0, + 0x3721, 0xC02C, 0xC02D, 0x335D, 0, 0, 0xC02E, 0x595D, + 0x4E2B, 0x3A4E, 0x4335, 0x595A, 0xC02F, 0x405C, 0xC030, 0x3935, + 0x3F64, 0x3166, 0x413C, 0x5958, 0x3545, 0xC031, 0xC032, 0xC033, + 0, 0, 0x3747, 0, 0x444F, 0x595E, 0, 0, + 0, 0, 0, 0x415F, 0, 0xC034, 0x5961, 0, +}; +static const unsigned short utf8_to_euc_E68F[] = { + 0x5963, 0xC035, 0, 0x4237, 0x5969, 0xC036, 0x5964, 0, + 0xC037, 0x5966, 0, 0, 0, 0, 0xC038, 0x4941, + 0x4473, 0xC039, 0x5967, 0xC03A, 0xC03B, 0xC03C, 0x4D2C, 0, + 0, 0, 0x4D48, 0x3439, 0xC03D, 0, 0, 0, + 0xC03E, 0x302E, 0, 0x5965, 0, 0xC03F, 0, 0, + 0, 0x5962, 0xC040, 0, 0xC041, 0, 0x3478, 0, + 0, 0, 0xC042, 0xC043, 0x3167, 0xC044, 0x5968, 0, + 0xC045, 0xC046, 0x4D49, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E690[] = { + 0, 0, 0, 0, 0, 0, 0x596C, 0, + 0, 0xC047, 0xC048, 0, 0, 0x423B, 0, 0x5973, + 0xC049, 0, 0xC04A, 0x596D, 0xC04B, 0, 0x596A, 0x5971, + 0xC04C, 0, 0, 0, 0x5953, 0, 0xC04D, 0, + 0xC04E, 0, 0xC04F, 0, 0xC050, 0xC051, 0x596E, 0, + 0x5972, 0xC052, 0xC053, 0, 0x4842, 0x456B, 0, 0xC054, + 0xC055, 0, 0, 0, 0x596B, 0xC056, 0x596F, 0, + 0, 0, 0x3748, 0, 0, 0xC057, 0x3A71, 0xC058, +}; +static const unsigned short utf8_to_euc_E691[] = { + 0, 0, 0x405D, 0, 0, 0, 0, 0, + 0, 0, 0, 0xC059, 0, 0, 0x5977, 0xC05A, + 0, 0xC05B, 0xC05C, 0xC05D, 0xC05E, 0, 0, 0, + 0x4526, 0, 0xC05F, 0xC060, 0xC061, 0xC062, 0, 0xC063, + 0xC064, 0xC065, 0, 0xC066, 0, 0, 0, 0x5974, + 0, 0x4B60, 0, 0, 0, 0xC067, 0, 0x5975, + 0, 0, 0, 0xC068, 0xC069, 0, 0x5976, 0, + 0x4C4E, 0, 0x4022, 0xC06A, 0, 0xC06B, 0, 0, +}; +static const unsigned short utf8_to_euc_E692[] = { + 0, 0, 0, 0x3762, 0, 0xC06C, 0, 0xC06D, + 0x597D, 0, 0, 0, 0, 0, 0, 0xC06E, + 0xC06F, 0xC070, 0x3B35, 0x597A, 0, 0x5979, 0, 0, + 0xC071, 0xC072, 0x4732, 0xC073, 0, 0xC074, 0x4635, 0xC075, + 0, 0xC076, 0, 0xC077, 0x4531, 0x597B, 0xC078, 0, + 0xC079, 0x597C, 0, 0x496F, 0xC07A, 0x4745, 0x3B23, 0, + 0x4071, 0, 0x4B50, 0xC07B, 0, 0, 0, 0, + 0, 0x3349, 0, 0x5A25, 0x597E, 0xC07C, 0xC07D, 0xC07E, +}; +static const unsigned short utf8_to_euc_E693[] = { + 0, 0x4D4A, 0x5A27, 0, 0xC121, 0x5A23, 0, 0x5A24, + 0, 0xC122, 0xC123, 0xC124, 0xC125, 0x4160, 0xC126, 0, + 0xC127, 0xC128, 0x5A22, 0, 0x593F, 0xC129, 0, 0xC12A, + 0x5A26, 0, 0x5A21, 0, 0, 0, 0, 0, + 0x5A2B, 0x5A2C, 0x4527, 0x5A2E, 0xC12B, 0xC12C, 0x3B24, 0x5A29, + 0, 0xC12D, 0xC12E, 0, 0x353C, 0xC12F, 0, 0x5A2F, + 0xC130, 0x5A28, 0x5A33, 0, 0x5A32, 0xC131, 0x5A31, 0xC132, + 0, 0, 0x5A34, 0xC133, 0, 0x5A36, 0x3E71, 0xC134, +}; +static const unsigned short utf8_to_euc_E694[] = { + 0x5A35, 0xC135, 0, 0, 0xC136, 0x5A39, 0, 0, + 0xC137, 0xC138, 0xC139, 0, 0, 0, 0, 0xC13A, + 0, 0, 0, 0xC13B, 0xC13C, 0, 0xC13D, 0, + 0x5A37, 0xC13E, 0, 0xC13F, 0x5A38, 0x5970, 0xC140, 0xC141, + 0, 0, 0xC142, 0x5A3B, 0x5A3A, 0, 0xC143, 0, + 0, 0xC144, 0x5978, 0x5A3C, 0x5A30, 0, 0xC145, 0x3B59, + 0, 0xC146, 0, 0, 0x5A3D, 0x5A3E, 0x5A40, 0x5A3F, + 0x5A41, 0x327E, 0xC147, 0x3936, 0xC148, 0xC149, 0x4A7C, 0x402F, +}; +static const unsigned short utf8_to_euc_E695[] = { + 0, 0, 0, 0xC14A, 0, 0x384E, 0, 0xC14B, + 0x5A43, 0xC14C, 0, 0, 0, 0x5A46, 0xF441, 0x4952, + 0xC14D, 0x355F, 0xC14E, 0, 0xC14F, 0x5A45, 0x5A44, 0x4754, + 0x5A47, 0x3635, 0, 0, 0, 0x5A49, 0x5A48, 0xC150, + 0xC151, 0, 0x343A, 0x3B36, 0, 0, 0x4658, 0xC152, + 0, 0, 0, 0xC153, 0x3749, 0, 0, 0, + 0x3F74, 0, 0x5A4A, 0, 0x4030, 0x4528, 0, 0x495F, + 0x5A4B, 0, 0xC154, 0, 0, 0xC155, 0, 0, +}; +static const unsigned short utf8_to_euc_E696[] = { + 0, 0xC156, 0x5A4C, 0x5A4D, 0, 0xC157, 0, 0x4A38, + 0x555D, 0x4046, 0xC158, 0, 0x494C, 0, 0x3A58, 0, + 0x4865, 0x4843, 0xC159, 0, 0, 0xC15A, 0, 0x454D, + 0xC15B, 0x4E41, 0, 0x5A4F, 0x3C50, 0xC15C, 0, 0x5A50, + 0xC15D, 0x3036, 0, 0xC15E, 0x3654, 0x404D, 0xC15F, 0x4960, + 0, 0, 0, 0x5A51, 0x3B42, 0x4347, 0xC160, 0x3B5B, + 0x3F37, 0, 0xC161, 0xC162, 0xC163, 0, 0, 0x5A52, + 0, 0x4A7D, 0, 0, 0x3177, 0x3B5C, 0, 0xC164, +}; +static const unsigned short utf8_to_euc_E697[] = { + 0, 0x5A55, 0xC165, 0x5A53, 0x5A56, 0x4E39, 0x5A54, 0, + 0xC166, 0xC167, 0, 0x407B, 0x5A57, 0, 0xC168, 0x4232, + 0xC169, 0, 0x5A58, 0, 0xC16A, 0, 0xC16B, 0x347A, + 0xC16C, 0x5A5A, 0, 0x5A59, 0, 0, 0, 0xC16D, + 0x5A5B, 0x5A5C, 0x347B, 0, 0, 0x467C, 0x4336, 0x356C, + 0x3B5D, 0x4161, 0, 0, 0x3D5C, 0x3030, 0, 0, + 0xC16E, 0x5A5D, 0xC16F, 0, 0xC170, 0xC171, 0, 0, + 0, 0xC172, 0x3222, 0x5A61, 0, 0, 0xC173, 0xC174, +}; +static const unsigned short utf8_to_euc_E698[] = { + 0xC175, 0, 0x3937, 0x5A60, 0xC176, 0, 0x3A2B, 0x3E3A, + 0xC177, 0xC178, 0x5A5F, 0, 0x3E3B, 0xC179, 0x4C40, 0x3A2A, + 0, 0xC17A, 0xC17B, 0x3057, 0x404E, 0xC17C, 0xC17D, 0, + 0, 0, 0, 0, 0x5A66, 0xC17E, 0xC221, 0x4031, + 0x3147, 0xC222, 0xC223, 0xC224, 0xC225, 0x3D55, 0xC226, 0x4B66, + 0x3A72, 0xC227, 0xC228, 0xC229, 0xC22A, 0x3E3C, 0xC22B, 0x4027, + 0xC22C, 0xC22D, 0, 0xC22E, 0x5A65, 0x5A63, 0x5A64, 0xC230, + 0, 0xC22F, 0, 0xF442, 0x436B, 0, 0, 0x5B26, +}; +static const unsigned short utf8_to_euc_E699[] = { + 0xC231, 0x5A6A, 0x3B7E, 0x3938, 0x5A68, 0xC232, 0xC233, 0, + 0, 0x5A69, 0xC234, 0x3F38, 0xC235, 0, 0xC237, 0x5A67, + 0, 0xC236, 0x3B2F, 0, 0, 0, 0, 0xC238, + 0xC239, 0xC23A, 0, 0xC23B, 0xC23C, 0x5A6C, 0x5A6B, 0x5A70, + 0xC23D, 0xC23E, 0x5A71, 0, 0x5A6D, 0xF443, 0x3322, 0x5A6E, + 0x5A6F, 0x4855, 0xC240, 0xC241, 0xC242, 0, 0x4961, 0x374A, + 0x5A72, 0, 0, 0xC244, 0x4032, 0xC245, 0x3E3D, 0xC247, + 0xC248, 0xC249, 0x4352, 0xC24A, 0xC24C, 0, 0xC243, 0xC246, +}; +static const unsigned short utf8_to_euc_E69A[] = { + 0xC24B, 0x3647, 0, 0x5A73, 0x5A77, 0, 0, 0x324B, + 0x5A74, 0x5A76, 0, 0xC24D, 0xC24E, 0xC24F, 0x5A75, 0, + 0xC250, 0x3D6B, 0xC251, 0, 0, 0, 0x4348, 0x3045, + 0x5A78, 0xC252, 0xC253, 0xC254, 0xC255, 0x5A79, 0, 0xC256, + 0xC257, 0, 0x442A, 0, 0xC258, 0, 0x4E71, 0, + 0, 0, 0, 0x3B43, 0, 0xC259, 0x4A6B, 0, + 0, 0xC25A, 0xC25B, 0, 0x4B3D, 0xC25C, 0, 0, + 0x5B22, 0x5A7B, 0, 0xC25D, 0x5A7E, 0, 0x5A7D, 0xC25E, +}; +static const unsigned short utf8_to_euc_E69B[] = { + 0xC25F, 0x5A7A, 0xC260, 0xC261, 0x5B21, 0, 0, 0x465E, + 0xC262, 0x5A7C, 0, 0, 0xC263, 0, 0xC264, 0xC265, + 0, 0, 0, 0, 0xC266, 0, 0x5B23, 0, + 0, 0x3D6C, 0x5B24, 0xC267, 0x4D4B, 0x4778, 0, 0xC268, + 0x5B25, 0, 0, 0, 0, 0, 0x5B27, 0, + 0xC269, 0x5B28, 0, 0xC26A, 0xC26B, 0, 0xC26C, 0, + 0x5B29, 0, 0x364A, 0x3148, 0x3939, 0x5B2A, 0, 0x5B2B, + 0x3D71, 0x4162, 0xC26D, 0xC23F, 0x5258, 0x413E, 0x413D, 0x4258, +}; +static const unsigned short utf8_to_euc_E69C[] = { + 0x3A47, 0, 0, 0x5072, 0, 0xC26E, 0, 0xC26F, + 0x376E, 0x4D2D, 0, 0x4A7E, 0, 0x497E, 0xC270, 0x5B2C, + 0, 0, 0, 0xC271, 0x3A73, 0x443F, 0x5B2D, 0x4F2F, + 0, 0xC272, 0, 0x4B3E, 0xC273, 0x442B, 0x5B2E, 0x347C, + 0xC274, 0, 0xC275, 0, 0, 0, 0x5B2F, 0x5B30, + 0x4C5A, 0, 0x4C24, 0x4B76, 0x4B5C, 0x3B25, 0x5B32, 0, + 0, 0x3C6B, 0, 0xC276, 0x4B51, 0, 0x5B34, 0x5B37, + 0x5B36, 0, 0x3479, 0, 0, 0x3560, 0xC277, 0x5B33, +}; +static const unsigned short utf8_to_euc_E69D[] = { + 0, 0x5B35, 0, 0, 0, 0xC278, 0x5B38, 0xC279, + 0xC27A, 0x3F79, 0, 0, 0xC27B, 0, 0x4D7B, 0x3049, + 0x3A60, 0x423C, 0, 0x3C5D, 0xC27C, 0xC27D, 0x3E73, 0, + 0, 0x5B3B, 0, 0, 0x454E, 0xC27E, 0x5B39, 0x422B, + 0x5B3A, 0x3E72, 0x4C5D, 0x5B3C, 0x5B3D, 0x4D68, 0xC321, 0, + 0, 0, 0x5B42, 0, 0xC322, 0x393A, 0xC323, 0x4755, + 0x5B3F, 0x456C, 0x5A5E, 0x5A62, 0xC324, 0x354F, 0xC325, 0x4747, + 0, 0, 0, 0xC326, 0x5B41, 0, 0x3E3E, 0x4844, +}; +static const unsigned short utf8_to_euc_E69E[] = { + 0, 0xC327, 0, 0, 0xC328, 0x5B47, 0, 0x487A, + 0, 0x5B3E, 0, 0x5B44, 0x5B43, 0, 0xC329, 0xC32A, + 0x404F, 0xC32B, 0, 0xC32C, 0, 0x4B6D, 0xC32D, 0x4E53, + 0xC32E, 0xC32F, 0x4B67, 0xC330, 0x324C, 0x3B5E, 0, 0, + 0x4F48, 0x5B46, 0x3F75, 0, 0, 0, 0x5B45, 0, + 0, 0x5B40, 0, 0, 0, 0, 0, 0x384F, + 0xC331, 0xC332, 0xC333, 0x5B4C, 0x5B4A, 0xC334, 0x324D, 0x5B48, + 0x5B4E, 0x5B54, 0, 0xC335, 0xC336, 0xC337, 0, 0, +}; +static const unsigned short utf8_to_euc_E69F[] = { + 0xC339, 0x4248, 0xC33A, 0xC33B, 0x4A41, 0xC33C, 0x5B56, 0, + 0xC33D, 0xC33E, 0x4922, 0, 0, 0, 0x5B55, 0x4770, + 0x4B3F, 0x343B, 0xC33F, 0x4077, 0x3D40, 0, 0, 0xC340, + 0x4453, 0xC341, 0x4D2E, 0, 0xC342, 0x5B51, 0x5B50, 0, + 0, 0xC343, 0x5B52, 0, 0x5B4F, 0, 0xC344, 0x5B57, + 0, 0x5B4D, 0, 0, 0x5B4B, 0, 0x5B53, 0x5B49, + 0xC345, 0x436C, 0xC346, 0x4C78, 0x3C46, 0x3A74, 0xC347, 0xC348, + 0, 0xC338, 0, 0x3A3A, 0, 0, 0x4B6F, 0x3341, +}; +static const unsigned short utf8_to_euc_E6A0[] = { + 0, 0xF446, 0x444E, 0x464A, 0x3149, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x4072, 0xC34A, 0, 0x4034, 0x372A, + 0, 0xC34B, 0, 0, 0, 0xC34C, 0x5B59, 0xC34D, + 0, 0x393B, 0x337C, 0, 0, 0, 0, 0xC34F, + 0xC34E, 0x5B5B, 0x3374, 0x5B61, 0xC350, 0xC351, 0, 0xC352, + 0xC353, 0xC354, 0x5B5E, 0xC355, 0x4073, 0, 0, 0, + 0x334B, 0x3A2C, 0, 0xC356, 0x334A, 0x3A4F, 0, 0xC357, +}; +static const unsigned short utf8_to_euc_E6A1[] = { + 0x5B5C, 0x3765, 0x374B, 0x456D, 0xC358, 0xC359, 0x5B5A, 0, + 0x3046, 0, 0xC35A, 0, 0xC35B, 0x5B5D, 0x5B5F, 0, + 0x364D, 0x372C, 0xC349, 0x343C, 0x354B, 0xC35C, 0, 0xC35D, + 0xC35E, 0x5B62, 0, 0xC35F, 0x3A79, 0x4B71, 0, 0x3B37, + 0, 0, 0, 0x5B63, 0, 0, 0, 0x4930, + 0, 0, 0, 0xC360, 0, 0, 0xC361, 0xC362, + 0xC363, 0xC364, 0xC365, 0, 0x5B6F, 0xC366, 0x3233, 0x5B64, + 0, 0xC367, 0xC368, 0xC369, 0xC36A, 0, 0x5B75, 0x5B65, +}; +static const unsigned short utf8_to_euc_E6A2[] = { + 0, 0x4E42, 0xC36B, 0x5B6C, 0xC36C, 0x475F, 0xC36D, 0, + 0xC36E, 0, 0, 0, 0, 0x5B74, 0, 0x5B67, + 0, 0, 0, 0x3034, 0x5B69, 0, 0xC36F, 0x393C, + 0xC370, 0, 0xC371, 0x5B6B, 0xC372, 0x5B6A, 0, 0x5B66, + 0x5B71, 0xC373, 0x3E3F, 0xC374, 0, 0xC375, 0x546D, 0x3868, + 0x4D7C, 0xC376, 0xC377, 0, 0, 0x5B68, 0xC378, 0x4474, + 0x3323, 0x3A2D, 0xC379, 0x5B60, 0, 0x5B70, 0x3361, 0, + 0, 0x5B6E, 0x5B72, 0xC37A, 0x456E, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E6A3[] = { + 0, 0, 0, 0, 0x347E, 0xC37B, 0x5C32, 0, + 0xC37C, 0x4C49, 0x5B77, 0x347D, 0xC37D, 0x5B7E, 0, 0xC37E, + 0xC421, 0xC422, 0x4B40, 0xC423, 0x5C21, 0x5C23, 0xC424, 0x5C27, + 0x5B79, 0xC425, 0x432A, 0, 0xC426, 0xC427, 0, 0x456F, + 0x5C2B, 0x5B7C, 0, 0x5C28, 0, 0xC428, 0, 0x5C22, + 0xC429, 0, 0xC42A, 0xC42B, 0xC42C, 0xC42D, 0x3F39, 0x5C2C, + 0xC42E, 0xC42F, 0x4033, 0, 0, 0xC430, 0xC431, 0, + 0, 0x5C2A, 0x343D, 0xC432, 0xC433, 0xC434, 0, 0, +}; +static const unsigned short utf8_to_euc_E6A4[] = { + 0x4F50, 0x5B76, 0, 0, 0x5C26, 0x3058, 0xC435, 0, + 0x5B78, 0xC436, 0xC437, 0x4C3A, 0x5B7D, 0x3F22, 0x4447, 0x5B73, + 0xC438, 0xC439, 0x5C25, 0xC43A, 0, 0, 0xC43B, 0xC43C, + 0, 0x3F7A, 0x5C2F, 0x3371, 0x3821, 0, 0, 0, + 0, 0x5C31, 0x5B7A, 0x5C30, 0, 0x5C29, 0x5B7B, 0, + 0x5C2D, 0, 0x5C2E, 0, 0, 0, 0, 0, + 0x5C3F, 0xC43D, 0, 0xC43E, 0x464E, 0xC43F, 0x5C24, 0, + 0xC440, 0x5C3B, 0, 0xC441, 0, 0x5C3D, 0, 0x4458, +}; +static const unsigned short utf8_to_euc_E6A5[] = { + 0, 0, 0xC442, 0, 0, 0xC443, 0, 0, + 0, 0xC444, 0x4D4C, 0, 0, 0, 0xC445, 0, + 0, 0, 0, 0x4976, 0x5C38, 0x424A, 0, 0xC446, + 0, 0x5C3E, 0x413F, 0xC447, 0x5C35, 0x5C42, 0x5C41, 0, + 0x466F, 0x5C40, 0x466A, 0xC448, 0xC449, 0xC44A, 0xC44B, 0, + 0xC44C, 0xC44D, 0x5C44, 0x5C37, 0xC44E, 0x3648, 0x5C3A, 0x3D5D, + 0xC44F, 0xC450, 0xC451, 0x4760, 0x5C3C, 0x364B, 0, 0x5C34, + 0x5C36, 0x5C33, 0xC452, 0xC453, 0x4F30, 0x335A, 0x5C39, 0xC454, +}; +static const unsigned short utf8_to_euc_E6A6[] = { + 0xC455, 0x5C43, 0x3335, 0, 0, 0, 0, 0, + 0, 0, 0x3A67, 0, 0, 0xC456, 0x315D, 0, + 0, 0x5C54, 0xC457, 0, 0x4F31, 0x5C57, 0xC458, 0, + 0xC459, 0, 0, 0x3F3A, 0x5C56, 0, 0, 0, + 0x5C55, 0xC45A, 0, 0, 0, 0xC45B, 0xC45C, 0x5C52, + 0xC45D, 0, 0, 0xC45E, 0, 0xC45F, 0x5C46, 0xC460, + 0, 0x5C63, 0x5C45, 0, 0x5C58, 0, 0, 0xC461, + 0xC462, 0, 0xC463, 0x5C50, 0xC464, 0, 0x5C4B, 0x5C48, +}; +static const unsigned short utf8_to_euc_E6A7[] = { + 0, 0x5C49, 0, 0x5C51, 0, 0xC465, 0, 0x7422, + 0xC466, 0, 0x5C4E, 0x393D, 0x4448, 0x4164, 0x5C4C, 0, + 0x5C47, 0xC467, 0, 0x5C4A, 0, 0, 0xC468, 0xC469, + 0x4D4D, 0x4B6A, 0, 0, 0, 0x5C4F, 0x5C59, 0, + 0, 0, 0xC46A, 0, 0, 0xC46B, 0, 0x5C61, + 0x5C5A, 0, 0, 0x5C67, 0, 0x5C65, 0xC46C, 0xC46D, + 0, 0xC46E, 0x5C60, 0xC46F, 0, 0xC470, 0, 0, + 0, 0x5C5F, 0, 0x4450, 0, 0x4165, 0xC471, 0x5C5D, +}; +static const unsigned short utf8_to_euc_E6A8[] = { + 0xC472, 0xC473, 0x5C5B, 0xC474, 0, 0x5C62, 0, 0, + 0, 0, 0x5C68, 0x4875, 0x5C6E, 0, 0, 0xC475, + 0, 0xC476, 0x5C69, 0x5C6C, 0x5C66, 0xC477, 0, 0x4374, + 0, 0x4938, 0xC478, 0x5C5C, 0, 0xC479, 0x5C64, 0x3E40, + 0xC47A, 0x4C4F, 0x5C78, 0x5C6B, 0xC47B, 0, 0, 0, + 0xC47C, 0x3822, 0x3223, 0x335F, 0, 0, 0x5C53, 0, + 0xC47D, 0, 0xC47E, 0, 0xC521, 0x3E41, 0x5C70, 0xC522, + 0x5C77, 0x3C79, 0x3372, 0xC523, 0, 0x432E, 0xC524, 0xC525, +}; +static const unsigned short utf8_to_euc_E6A9[] = { + 0, 0, 0, 0, 0x5C6D, 0xC526, 0xC527, 0x5C72, + 0x5C76, 0xC528, 0xC529, 0x3636, 0, 0, 0xC52A, 0, + 0xC52B, 0xC52C, 0xC52D, 0, 0, 0xC52E, 0xC52F, 0, + 0x354C, 0x5C74, 0, 0xC530, 0, 0, 0, 0x3521, + 0, 0x464B, 0x5C73, 0, 0xC531, 0, 0x5C75, 0xC532, + 0, 0, 0xC533, 0xF449, 0, 0, 0, 0, + 0, 0xC534, 0x5C6F, 0xC535, 0, 0, 0, 0, + 0x5C71, 0, 0, 0, 0, 0, 0xC536, 0x3360, +}; +static const unsigned short utf8_to_euc_E6AA[] = { + 0x4349, 0xC537, 0, 0xC538, 0x5C7C, 0, 0xC539, 0xC53A, + 0, 0xC53B, 0, 0xC53C, 0, 0x5C7A, 0x3869, 0, + 0x5C79, 0xC53D, 0, 0, 0, 0, 0, 0x5D21, + 0, 0, 0, 0xC53E, 0x5B58, 0xC53F, 0xC540, 0xC541, + 0x5C7B, 0, 0x5C7D, 0x5C7E, 0, 0xC542, 0, 0, + 0, 0, 0x5D2C, 0xC543, 0x5D28, 0, 0x5B6D, 0xC544, + 0xC545, 0xC546, 0, 0x5D27, 0xC547, 0, 0, 0, + 0x5D26, 0, 0, 0x5D23, 0, 0xC548, 0xC549, 0xC54A, +}; +static const unsigned short utf8_to_euc_E6AB[] = { + 0, 0x5C6A, 0x5D25, 0x5D24, 0, 0, 0xC54B, 0, + 0xC54D, 0xC54C, 0, 0, 0xC54E, 0, 0, 0, + 0xC54F, 0x5D2A, 0, 0x4F26, 0xC550, 0xC551, 0xC552, 0, + 0, 0, 0x5D2D, 0x367B, 0xC553, 0xC554, 0x5D29, 0x5D2B, + 0, 0, 0xF44A, 0, 0xC555, 0, 0, 0xC556, + 0x4827, 0, 0x5D2E, 0, 0xC557, 0, 0, 0, + 0xC558, 0xC559, 0xC55A, 0, 0, 0, 0, 0, + 0, 0, 0x5D32, 0x5D2F, 0xC55B, 0xC55C, 0, 0, +}; +static const unsigned short utf8_to_euc_E6AC[] = { + 0, 0, 0xC55D, 0xC55E, 0x4D73, 0x5D30, 0xC55F, 0xC560, + 0, 0xC561, 0x5C5E, 0, 0, 0, 0, 0xC562, + 0xC563, 0xC564, 0x5D33, 0, 0, 0, 0x5D34, 0xC565, + 0, 0, 0, 0xC566, 0, 0x3135, 0xC567, 0x5D36, + 0x3767, 0x3C21, 0, 0x3655, 0xC568, 0, 0, 0x3224, + 0xC569, 0, 0, 0xC56A, 0xC56B, 0, 0, 0xC56C, + 0, 0, 0x4D5F, 0, 0, 0xC56D, 0xC56E, 0x5D38, + 0x5D37, 0x5D3A, 0x353D, 0xC56F, 0, 0x3656, 0x343E, 0xC570, +}; +static const unsigned short utf8_to_euc_E6AD[] = { + 0, 0, 0, 0x5D3D, 0, 0, 0xC571, 0x5D3C, + 0, 0x5D3E, 0xC572, 0, 0x324E, 0xC573, 0x4337, 0, + 0x5D3F, 0, 0xC574, 0x343F, 0x5D41, 0, 0xC575, 0, + 0xC576, 0x5D40, 0, 0x5D42, 0, 0xC577, 0, 0x5D43, + 0xC578, 0x5D44, 0x3B5F, 0x4035, 0x3A21, 0, 0x4970, 0xC579, + 0, 0x4A62, 0x4F44, 0xC57A, 0, 0, 0xC57B, 0x3B75, + 0xC57C, 0, 0, 0x3A50, 0x4E72, 0xC57D, 0, 0, + 0x5D45, 0x5D46, 0, 0x3B60, 0, 0xC57E, 0xC621, 0x5D47, +}; +static const unsigned short utf8_to_euc_E6AE[] = { + 0x5D48, 0, 0xC622, 0x5D4A, 0x5D49, 0xC623, 0x4B58, 0, + 0, 0x3D5E, 0x3C6C, 0x3B44, 0, 0x5D4B, 0, 0, + 0, 0, 0, 0, 0, 0x5D4D, 0x3F23, 0xC624, + 0x5D4C, 0, 0, 0xC625, 0, 0, 0x5D4E, 0xC626, + 0xC627, 0, 0xC628, 0xC629, 0x5D4F, 0, 0, 0, + 0xC62A, 0xC62B, 0x5D50, 0x5D51, 0xC62C, 0xC62D, 0xC62E, 0x5D52, + 0xC62F, 0x5D54, 0x5D53, 0x5D55, 0x3225, 0x434A, 0, 0x5D56, + 0xC630, 0xC631, 0x3B26, 0x334C, 0x5D57, 0xC632, 0xC633, 0x4542, +}; +static const unsigned short utf8_to_euc_E6AF[] = { + 0x544C, 0, 0, 0xC634, 0xC635, 0x3523, 0x5D58, 0, + 0, 0xC636, 0, 0x5D59, 0xC637, 0x4A6C, 0x4B68, 0, + 0, 0, 0x4647, 0x5D5A, 0x4866, 0, 0xC638, 0, + 0x487B, 0, 0xC639, 0x4C53, 0, 0, 0, 0x5D5B, + 0, 0xC63A, 0, 0xC63B, 0, 0, 0xC63C, 0xC63D, + 0, 0, 0, 0x5D5D, 0x5D5C, 0, 0xC63E, 0x5D5F, + 0, 0xC63F, 0, 0x5D5E, 0, 0, 0, 0xC640, + 0, 0xC641, 0, 0, 0, 0, 0, 0xC642, +}; +static const unsigned short utf8_to_euc_E6B0[] = { + 0, 0, 0xC643, 0, 0xC644, 0xC645, 0, 0, + 0x5D61, 0xC646, 0, 0, 0, 0xC647, 0xC648, 0x3B61, + 0xC649, 0x4C31, 0xC64A, 0x5D62, 0x5D63, 0, 0, 0x3524, + 0, 0xC64B, 0, 0x5D64, 0, 0, 0, 0xC64C, + 0, 0, 0, 0x5D66, 0x5D65, 0, 0xC64D, 0xC64E, + 0xC64F, 0, 0, 0, 0xC650, 0, 0xC651, 0, + 0, 0, 0, 0xC652, 0x3F65, 0xC653, 0xC654, 0x4939, + 0x314A, 0, 0xC655, 0xC656, 0, 0, 0x4845, 0xC657, +}; +static const unsigned short utf8_to_euc_E6B1[] = { + 0x4475, 0x3D41, 0x3561, 0, 0, 0, 0, 0, + 0, 0, 0xC658, 0xC659, 0, 0xC65A, 0x4846, 0xC65B, + 0x3C2E, 0, 0xC65C, 0, 0xC65D, 0x5D68, 0, 0x3440, + 0, 0xC65E, 0x3178, 0xC65F, 0xC660, 0x4672, 0x5D67, 0x393E, + 0x4353, 0, 0x5D69, 0, 0, 0, 0, 0xC736, + 0x5D71, 0, 0x5D6A, 0xC661, 0, 0xC662, 0, 0xC663, + 0x4241, 0, 0x3562, 0x5D72, 0xC664, 0, 0xC665, 0, + 0xC666, 0xC667, 0x3768, 0xC668, 0, 0x3525, 0x5D70, 0, +}; +static const unsigned short utf8_to_euc_E6B2[] = { + 0, 0x5D6E, 0x5D6B, 0x4D60, 0, 0xC669, 0xC66A, 0xC66B, + 0x4440, 0xC66C, 0, 0, 0x4659, 0x5D6C, 0, 0, + 0x5D74, 0, 0x5D73, 0x3723, 0xC66D, 0xC66E, 0x322D, 0xC66F, + 0xC670, 0x3A3B, 0x5D6D, 0x5D6F, 0xC671, 0, 0, 0xC672, + 0, 0x4B57, 0x4274, 0, 0, 0, 0, 0, + 0, 0, 0, 0x4B77, 0, 0, 0x5D7C, 0, + 0xC673, 0x5D7D, 0xC674, 0x324F, 0xC675, 0, 0, 0, + 0x4A28, 0x4C7D, 0x5E21, 0x3C23, 0x3E42, 0x5D78, 0x5D7E, 0x3168, +}; +static const unsigned short utf8_to_euc_E6B3[] = { + 0, 0x3637, 0xC676, 0, 0x5D75, 0x5D7A, 0xC677, 0, + 0, 0x4074, 0x4771, 0, 0x4867, 0xC678, 0, 0xC679, + 0xC67A, 0xC67B, 0xC67C, 0x5D77, 0xC67D, 0x4B21, 0xC67E, 0x5D79, + 0, 0x5E24, 0xC721, 0x5E22, 0xC722, 0x5D7B, 0, 0, + 0xC723, 0x4B22, 0x4748, 0x3563, 0, 0x4525, 0, 0xC724, + 0x436D, 0xC725, 0x5E25, 0xC726, 0xC727, 0, 0xC728, 0x5E23, + 0x4259, 0x5D76, 0xC729, 0x314B, 0xC72A, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E6B4[] = { + 0, 0, 0, 0, 0xC72B, 0, 0, 0xC72C, + 0, 0, 0xC72D, 0x4D4E, 0x5E30, 0, 0xC72E, 0xC72F, + 0, 0xC730, 0x5E2F, 0xC731, 0, 0, 0, 0x4076, + 0, 0x5E2C, 0xC732, 0x4D6C, 0, 0, 0x4636, 0x5E26, + 0, 0, 0, 0, 0, 0x4445, 0xC733, 0xC734, + 0xC735, 0x314C, 0x393F, 0x5E29, 0, 0, 0xC737, 0xC738, + 0, 0xC739, 0x3D27, 0x5E2E, 0, 0x5E2D, 0x5E28, 0, + 0x5E2B, 0xC73A, 0, 0x3368, 0xC73B, 0x5E2A, 0x4749, 0xC73C, +}; +static const unsigned short utf8_to_euc_E6B5[] = { + 0, 0x4E2E, 0, 0, 0x3E74, 0x4075, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xC73D, + 0, 0x5E36, 0x5E34, 0, 0x494D, 0, 0xC73E, 0xC73F, + 0, 0xC740, 0, 0x5E31, 0x5E33, 0xC741, 0x313A, 0xC742, + 0, 0x3940, 0x4F32, 0, 0x333D, 0, 0x4962, 0xC743, + 0xC744, 0, 0, 0, 0x4D61, 0, 0, 0x3324, + 0x3F3B, 0x5E35, 0, 0, 0xC745, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E6B6[] = { + 0, 0, 0xC746, 0, 0, 0x5E3A, 0, 0xC747, + 0x3E43, 0, 0, 0, 0x4D30, 0, 0x5E37, 0, + 0, 0xC748, 0xC749, 0x5E32, 0xC74A, 0x5E38, 0xC74B, 0xC74C, + 0xC74D, 0x4E5E, 0, 0x4573, 0x4642, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xC74E, 0, 0xC74F, 0, 0, 0x3336, + 0, 0, 0x3155, 0, 0xC750, 0x5E3E, 0, 0xC751, + 0x5E41, 0xC752, 0, 0, 0x4E43, 0xC753, 0, 0xC754, +}; +static const unsigned short utf8_to_euc_E6B7[] = { + 0x4D64, 0, 0, 0, 0xC755, 0x5E48, 0x5E42, 0x5E3F, + 0xC756, 0, 0xC757, 0x4E54, 0x5E45, 0, 0xC758, 0xC759, + 0, 0x3D4A, 0x5E47, 0, 0, 0x5E4C, 0xC75A, 0, + 0x4571, 0x5E4A, 0, 0xC75B, 0, 0xC75C, 0x5E44, 0xC75D, + 0xC75E, 0x4338, 0xC75F, 0, 0x5E4B, 0xC760, 0x5E40, 0, + 0x5E46, 0xC761, 0x5E4D, 0x307C, 0x5E43, 0, 0x5E4E, 0xC762, + 0xC763, 0x3F3C, 0xF44C, 0x3D5F, 0xC764, 0x4A25, 0xC765, 0x3A2E, + 0xF44B, 0x5E3B, 0x5E49, 0x453A, 0xC766, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E6B8[] = { + 0xC767, 0, 0, 0, 0xC768, 0x4036, 0, 0x3369, + 0x3A51, 0x3E44, 0x5E3D, 0x3D42, 0, 0, 0, 0, + 0, 0, 0, 0x374C, 0, 0x5E3C, 0, 0, + 0, 0x5E52, 0x3D6D, 0x383A, 0, 0x5E61, 0xC769, 0x5E5B, + 0x3574, 0x454F, 0xC76A, 0x5E56, 0x5E5F, 0x302F, 0x3132, 0xC76B, + 0, 0x3239, 0, 0x5E58, 0x422C, 0x5E4F, 0x5E51, 0x3941, + 0, 0, 0xC76C, 0, 0, 0, 0xC76D, 0, + 0x5E62, 0xC76E, 0x5E5D, 0xC76F, 0xC770, 0, 0x5E55, 0, +}; +static const unsigned short utf8_to_euc_E6B9[] = { + 0, 0, 0, 0x5E5C, 0xC771, 0xC772, 0, 0, + 0xC773, 0xC774, 0x4C2B, 0xC775, 0, 0x5E5A, 0x5E5E, 0xC776, + 0, 0xC777, 0xC778, 0xC779, 0xC77A, 0, 0x3850, 0xC77B, + 0x3E45, 0, 0, 0x4339, 0xC77C, 0xC77D, 0xC77E, 0x5E54, + 0, 0, 0xC821, 0xC822, 0, 0, 0, 0x4D2F, + 0xC823, 0, 0, 0x5E57, 0, 0, 0x5E50, 0x4572, + 0, 0, 0x5E53, 0xC824, 0, 0, 0x5E59, 0, + 0, 0, 0, 0xC825, 0, 0xC826, 0x4F51, 0x3C3E, +}; +static const unsigned short utf8_to_euc_E6BA[] = { + 0x4B7E, 0, 0x5E63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x482E, 0xC827, 0, 0x5E6F, + 0x383B, 0, 0, 0xC828, 0, 0, 0x3D60, 0, + 0x5E65, 0xC829, 0, 0, 0x4E2F, 0x3942, 0, 0x5E72, + 0xC82A, 0, 0x306E, 0, 0, 0x5E70, 0, 0xC82B, + 0, 0, 0x5E64, 0, 0, 0xC82C, 0xC82D, 0x5E6A, + 0, 0xC82E, 0x5E6C, 0xC82F, 0, 0, 0x4D4F, 0x5E67, + 0, 0, 0x452E, 0xC830, 0, 0x5E69, 0, 0xC831, +}; +static const unsigned short utf8_to_euc_E6BB[] = { + 0xC832, 0xC833, 0x5E71, 0xC834, 0x5E6B, 0x4C47, 0, 0xC835, + 0xC836, 0x5E66, 0xC837, 0x3C22, 0x5E7E, 0xC838, 0xC839, 0xC83A, + 0, 0x336A, 0, 0x5E68, 0x5E6D, 0x5E6E, 0, 0, + 0, 0, 0, 0, 0, 0x426C, 0x425A, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xC83B, 0x5E76, 0xC83C, 0xC83D, 0x5E7C, + 0, 0, 0x5E7A, 0, 0x4529, 0, 0, 0x5F23, + 0x5E77, 0xC83E, 0, 0xC83F, 0, 0xC840, 0x5E78, 0x5E60, +}; +static const unsigned short utf8_to_euc_E6BC[] = { + 0, 0x3579, 0x493A, 0, 0xC841, 0, 0x3C3F, 0, + 0xC842, 0x3977, 0xC843, 0, 0xC844, 0xC845, 0, 0x4F33, + 0, 0x5E74, 0, 0x5F22, 0x3169, 0x4166, 0xC846, 0, + 0xC847, 0, 0xC848, 0xC849, 0, 0, 0, 0, + 0x4779, 0, 0x3441, 0x4E7A, 0, 0, 0xC84A, 0, + 0, 0xC84B, 0xC84C, 0x4C21, 0x4452, 0xC853, 0, 0xC84D, + 0xC84E, 0x5E7B, 0x5E7D, 0xC84F, 0, 0, 0xC850, 0, + 0x4132, 0, 0, 0xC851, 0xC852, 0, 0x5F21, 0x5E79, +}; +static const unsigned short utf8_to_euc_E6BD[] = { + 0, 0x5E73, 0, 0, 0, 0x3443, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xC854, + 0, 0xC855, 0xC856, 0xC857, 0x3769, 0, 0, 0xC858, + 0x5F2F, 0xC859, 0xC85A, 0x5F2A, 0x4078, 0xC85B, 0xC85C, 0x3363, + 0, 0xC85D, 0xC85E, 0, 0x3D61, 0, 0x5F33, 0, + 0xC85F, 0, 0, 0, 0xC860, 0x5F2C, 0x442C, 0x5F29, + 0x4459, 0, 0, 0, 0x5F4C, 0, 0, 0, + 0x5F26, 0, 0x5F25, 0, 0x5F2E, 0xC861, 0xC862, 0, +}; +static const unsigned short utf8_to_euc_E6BE[] = { + 0x5F28, 0x5F27, 0x5F2D, 0xC863, 0x4021, 0, 0x5F24, 0xC864, + 0xC865, 0, 0, 0xC866, 0xC867, 0xC868, 0x5F30, 0, + 0xC869, 0x5F31, 0xC86A, 0xC86B, 0xC86C, 0, 0xC86D, 0x3442, + 0, 0, 0xC86E, 0, 0, 0, 0, 0xC86F, + 0xC870, 0x5F36, 0, 0x5F35, 0x5F37, 0xC871, 0xC872, 0xC873, + 0xC874, 0, 0x5F3A, 0, 0, 0, 0xC875, 0xC876, + 0xC877, 0x4543, 0, 0x5F34, 0, 0xC878, 0xC879, 0, + 0, 0x5F38, 0, 0, 0xC87A, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E6BF[] = { + 0x3763, 0x4279, 0x5F32, 0x473B, 0, 0xC87B, 0x5F39, 0xC87C, + 0xC87D, 0, 0xC87E, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x5F3E, 0x5F3C, 0, 0, + 0x5F3F, 0, 0xC921, 0x5F42, 0, 0, 0xC922, 0x5F3B, + 0x396A, 0x4728, 0, 0, 0x5E39, 0, 0, 0, + 0xC923, 0xC924, 0, 0x4D74, 0x5F3D, 0, 0x5F41, 0x4275, + 0xC925, 0x5F40, 0, 0x5F2B, 0, 0xC926, 0x6F69, 0, + 0, 0xC927, 0x5F45, 0, 0xC928, 0xC929, 0x5F49, 0, +}; +static const unsigned short utf8_to_euc_E780[] = { + 0xC92A, 0x5F47, 0, 0, 0, 0xC92B, 0xC92C, 0xC92D, + 0, 0x5F43, 0, 0x5F44, 0, 0xC92E, 0, 0x5F48, + 0, 0x5F46, 0, 0, 0, 0x494E, 0, 0xC92F, + 0x5F4E, 0, 0x5F4B, 0x5F4A, 0, 0x5F4D, 0x4654, 0x5F4F, + 0xC930, 0, 0, 0xC931, 0, 0, 0x4375, 0x426D, + 0xF44D, 0, 0, 0, 0x4025, 0, 0, 0xC932, + 0x5F50, 0, 0x5F52, 0, 0xC933, 0, 0, 0xC934, + 0, 0xC935, 0, 0, 0xC936, 0, 0x5F51, 0, +}; +static const unsigned short utf8_to_euc_E781[] = { + 0, 0, 0, 0xC937, 0xC938, 0, 0, 0, + 0xC939, 0xC93A, 0xC93B, 0xC93C, 0x5E75, 0, 0xC941, 0, + 0, 0x5F53, 0, 0, 0xC93D, 0xC93E, 0, 0, + 0x4667, 0, 0, 0, 0, 0xC93F, 0xC940, 0, + 0, 0, 0, 0x5F54, 0xC942, 0xC943, 0, 0, + 0, 0, 0, 0x3250, 0xC944, 0, 0xC945, 0x4574, + 0x3325, 0, 0, 0, 0, 0xC946, 0xC947, 0, + 0x3564, 0, 0, 0, 0x3C5E, 0x3A52, 0xC948, 0, +}; +static const unsigned short utf8_to_euc_E782[] = { + 0, 0xC949, 0, 0, 0, 0xC94A, 0xC94B, 0, + 0, 0x4F27, 0x3F66, 0, 0, 0, 0x316A, 0, + 0, 0, 0x5F56, 0, 0xC94C, 0xC94D, 0xC94E, 0xC94F, + 0xC950, 0x5F55, 0, 0xC951, 0, 0, 0, 0, + 0, 0, 0, 0, 0xC952, 0, 0, 0, + 0, 0, 0, 0xC953, 0x5F59, 0x433A, 0x5F5C, 0x5F57, + 0xC954, 0xC955, 0, 0x5F5B, 0xC956, 0, 0, 0xC957, + 0x5F5A, 0x4540, 0x3059, 0xF42E, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E783[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0x4E75, 0, 0xC958, 0x5F5E, 0, 0, 0, 0x3128, + 0, 0xC959, 0, 0xC95A, 0xC95B, 0xC95C, 0xC95D, 0, + 0xC95E, 0x5F60, 0, 0, 0xC95F, 0x5F5F, 0, 0x5F5D, + 0, 0, 0, 0, 0xC960, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x5F58, 0, 0, 0, 0, 0, 0, + 0, 0x4B23, 0xC961, 0, 0, 0x5F62, 0, 0, +}; +static const unsigned short utf8_to_euc_E784[] = { + 0, 0, 0, 0xC962, 0xC963, 0xC964, 0xC965, 0xC966, + 0, 0x5F61, 0, 0xC967, 0xC968, 0, 0, 0xC969, + 0, 0, 0, 0, 0x316B, 0, 0, 0, + 0, 0x5F64, 0x4A32, 0, 0x5F63, 0, 0xC96A, 0, + 0xC96B, 0x4C35, 0, 0, 0, 0, 0x3E47, 0, + 0, 0, 0, 0xC96C, 0, 0xC96D, 0, 0xC96E, + 0xC96F, 0xC970, 0, 0, 0, 0, 0x4133, 0, + 0xC971, 0, 0, 0, 0x3E46, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E785[] = { + 0, 0xC972, 0, 0, 0, 0xC973, 0xC974, 0xC975, + 0, 0x4E7B, 0xC976, 0xC977, 0x5F6A, 0, 0x4079, 0, + 0xC978, 0, 0xC979, 0, 0, 0x5F66, 0x5F6B, 0xC97A, + 0, 0x316C, 0xC97B, 0, 0xC97C, 0, 0xC97D, 0, + 0xC97E, 0, 0x5F69, 0, 0x4761, 0x5F65, 0x5F68, 0x3E48, + 0xCA21, 0x4851, 0, 0, 0x5F6C, 0, 0x3C51, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xCA22, 0, 0, 0, 0x407A, 0, 0, +}; +static const unsigned short utf8_to_euc_E786[] = { + 0xCA23, 0, 0, 0, 0x5F6F, 0xCA24, 0, 0xCA25, + 0x5F67, 0, 0x3727, 0, 0xCA26, 0, 0, 0x5F6D, + 0, 0, 0xCA27, 0, 0x4D50, 0x5F70, 0, 0, + 0, 0x7426, 0xCA28, 0xCA29, 0, 0, 0, 0x3D4F, + 0xCA2A, 0, 0xCA2B, 0, 0, 0, 0, 0, + 0x5F71, 0, 0, 0, 0x5F72, 0, 0, 0xCA2C, + 0xCA2D, 0x472E, 0xCA2E, 0xCA2F, 0, 0, 0, 0, + 0, 0x5F74, 0xCA30, 0, 0, 0, 0x5F75, 0xCA31, +}; +static const unsigned short utf8_to_euc_E787[] = { + 0xCA32, 0xCA33, 0, 0x4733, 0xCA34, 0, 0, 0, + 0x4575, 0x5F77, 0, 0xCA35, 0xCA36, 0, 0x5F79, 0, + 0x4E55, 0, 0x5F76, 0xCA37, 0x5F78, 0x316D, 0xCA38, 0x5F73, + 0, 0xCA39, 0xCA3A, 0, 0xCA3B, 0, 0, 0x535B, + 0x5F7A, 0, 0, 0, 0, 0x4167, 0x3B38, 0x5F7C, + 0, 0, 0, 0, 0x5F7B, 0x3F24, 0x5259, 0, + 0, 0, 0, 0, 0, 0x5F7D, 0, 0, + 0xCA3C, 0x6021, 0, 0x5F6E, 0x5F7E, 0, 0xCA3D, 0x6022, +}; +static const unsigned short utf8_to_euc_E788[] = { + 0xCA3E, 0, 0, 0, 0, 0, 0x477A, 0xCA3F, + 0xCA40, 0xCA41, 0, 0, 0, 0x6023, 0, 0, + 0x6024, 0, 0, 0xCA42, 0, 0, 0, 0xCA43, + 0, 0, 0xCA44, 0x6025, 0, 0xCA45, 0, 0xCA46, + 0, 0, 0, 0, 0xCA47, 0, 0, 0, + 0x6026, 0, 0x445E, 0xCA48, 0x6028, 0x6027, 0, 0xCA49, + 0x6029, 0, 0x602A, 0, 0xCA4A, 0x3C5F, 0x4963, 0, + 0xCA4B, 0xCA4C, 0x4C6C, 0x602B, 0x602C, 0x4156, 0x3C24, 0x602D, +}; +static const unsigned short utf8_to_euc_E789[] = { + 0x602E, 0xCA4D, 0xCA4E, 0xCA4F, 0, 0xCA50, 0x602F, 0x4A52, + 0x4847, 0, 0, 0x6030, 0x4757, 0, 0xCA51, 0xCA52, + 0xCA53, 0, 0x442D, 0xCA54, 0, 0xCA55, 0xCA56, 0, + 0x6031, 0x3267, 0xCA57, 0x356D, 0xCA58, 0x4C46, 0xCA59, 0x4C36, + 0xCA5A, 0x3234, 0x4F34, 0xCA5B, 0, 0, 0, 0x4B52, + 0xCA5C, 0x4A2A, 0, 0xCA5D, 0, 0, 0xCA5E, 0xCA5F, + 0, 0xCA60, 0x4037, 0, 0x6032, 0, 0, 0xCA61, + 0xCA62, 0x4643, 0, 0xCA63, 0xCA64, 0x3823, 0x6033, 0xCA65, +}; +static const unsigned short utf8_to_euc_E78A[] = { + 0x3A54, 0x6035, 0x6034, 0, 0xCA66, 0, 0, 0x6036, + 0, 0xCA67, 0, 0, 0, 0xCA68, 0xCA69, 0, + 0, 0, 0x6037, 0xCA6A, 0, 0, 0x6038, 0, + 0, 0, 0, 0xCA6B, 0, 0, 0, 0, + 0x353E, 0, 0x6039, 0, 0, 0, 0, 0x603A, + 0xCA6C, 0, 0, 0, 0x3824, 0xCA6D, 0xCA6E, 0x4848, + 0, 0xCA6F, 0x603C, 0, 0xCA70, 0, 0x3E75, 0, + 0, 0x603B, 0, 0, 0, 0, 0xCA71, 0, +}; +static const unsigned short utf8_to_euc_E78B[] = { + 0, 0xCA72, 0x3638, 0x603D, 0x603F, 0, 0x603E, 0xCA73, + 0, 0xCA74, 0, 0, 0xCA75, 0, 0x6040, 0, + 0x3851, 0, 0x6041, 0, 0, 0xCA76, 0xCA77, 0x3669, + 0xCA78, 0x4140, 0, 0x397D, 0, 0, 0, 0xCA79, + 0x6043, 0x6044, 0x6042, 0, 0, 0xCA7A, 0, 0, + 0, 0x3C6D, 0, 0, 0x4648, 0x3639, 0, 0, + 0, 0, 0, 0xCA7B, 0xCA7C, 0, 0, 0x6046, + 0x432C, 0x6045, 0xCA7D, 0xCA7E, 0x4F35, 0x4762, 0xCB21, 0, +}; +static const unsigned short utf8_to_euc_E78C[] = { + 0, 0, 0xCB22, 0, 0xCB23, 0xCB24, 0, 0xCB25, + 0, 0, 0x6049, 0xCB26, 0, 0xCB27, 0, 0, + 0, 0, 0xCB28, 0xCB29, 0, 0, 0x604B, 0x6048, + 0xCB2A, 0xCB2B, 0, 0x4C54, 0x604A, 0x604C, 0xCB2C, 0x4E44, + 0, 0, 0xCB2D, 0, 0xCB2E, 0x6050, 0, 0xCB2F, + 0xCB30, 0x604F, 0x4376, 0x472D, 0xCB31, 0, 0x3825, 0x604E, + 0, 0xCB32, 0xCB33, 0, 0x604D, 0xCB34, 0x4D31, 0x4D32, + 0, 0, 0xCB35, 0xCB36, 0, 0xCB37, 0x6051, 0x316E, +}; +static const unsigned short utf8_to_euc_E78D[] = { + 0, 0, 0, 0xCB38, 0x3976, 0x3B62, 0, 0, + 0, 0, 0, 0, 0, 0xCB39, 0x6052, 0x6053, + 0xCB3A, 0, 0xCB3B, 0, 0, 0, 0xCB3C, 0x6055, + 0xCB3D, 0, 0, 0, 0, 0xCB3E, 0xCB3F, 0xCB40, + 0xCB41, 0, 0, 0x3D43, 0, 0, 0xCB42, 0xCB43, + 0x6057, 0xCB44, 0x6056, 0xCB45, 0xCB46, 0, 0xCB47, 0xCB48, + 0x6058, 0xCB49, 0x334D, 0, 0, 0x605A, 0, 0xCB4A, + 0x6059, 0xCB4B, 0x605C, 0x605B, 0xCB4C, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E78E[] = { + 0xCB4D, 0xCB4E, 0, 0xCB4F, 0x383C, 0xCB50, 0xCB51, 0x4E28, + 0, 0x364C, 0, 0x3226, 0, 0, 0xCB52, 0, + 0xCB53, 0, 0, 0xCB54, 0, 0xCB55, 0x366A, 0xCB56, + 0xCB57, 0, 0, 0, 0xCB58, 0, 0xCB59, 0xCB5A, + 0xCB5B, 0, 0xCB5C, 0, 0, 0xCB5D, 0xCB5E, 0, + 0, 0x3461, 0xCB5F, 0xCB60, 0, 0xCB61, 0, 0, + 0, 0, 0x4E68, 0x605E, 0, 0xCB62, 0, 0xCB63, + 0, 0xCB64, 0, 0x6060, 0xCB65, 0xCB66, 0, 0xCB67, +}; +static const unsigned short utf8_to_euc_E78F[] = { + 0x6061, 0, 0x3251, 0, 0, 0xCB68, 0xCB69, 0, + 0x605D, 0xCB6A, 0x3B39, 0xCB6B, 0xCB6C, 0x4441, 0x605F, 0xCB6D, + 0, 0, 0xCB6E, 0xCB6F, 0, 0, 0xCB70, 0, + 0, 0xCB71, 0, 0, 0, 0xCB72, 0x6064, 0, + 0x3C6E, 0xCB73, 0, 0xCB74, 0, 0x6062, 0xCB75, 0xCB76, + 0, 0xCB77, 0x373E, 0, 0, 0x4849, 0x6063, 0, + 0, 0x607E, 0, 0, 0xCB78, 0xCB79, 0, 0xCB7A, + 0x6069, 0xCB7B, 0xCB7C, 0xCB7D, 0, 0xCB7E, 0x383D, 0xCC21, +}; +static const unsigned short utf8_to_euc_E790[] = { + 0xCC22, 0xCC23, 0, 0x3565, 0xCC24, 0x6066, 0x4D7D, 0xCC25, + 0, 0x4E30, 0xCC26, 0, 0, 0, 0, 0, + 0, 0xCC27, 0, 0, 0, 0, 0, 0, + 0, 0, 0xCC28, 0xCC29, 0, 0, 0, 0, + 0, 0, 0x4276, 0, 0xCC2A, 0x6068, 0xCC2B, 0, + 0xCC2C, 0xCC2D, 0xCC2E, 0xCC2F, 0xCC30, 0xCC31, 0xCC32, 0xCC33, + 0xCC34, 0xCC35, 0x606A, 0x4E56, 0x3657, 0x487C, 0x474A, 0, + 0, 0xCC36, 0x606B, 0, 0, 0, 0, 0x606D, +}; +static const unsigned short utf8_to_euc_E791[] = { + 0xCC37, 0x6070, 0, 0xCC38, 0xCC39, 0, 0xCC3A, 0xCC3B, + 0, 0, 0, 0xCC3C, 0, 0xCC3D, 0, 0, + 0, 0xCC3E, 0xCC3F, 0, 0, 0x606C, 0, 0xCC40, + 0, 0x606F, 0x386A, 0x314D, 0x6071, 0xCC41, 0x3F70, 0x606E, + 0x4E5C, 0, 0xCC42, 0x6074, 0x7424, 0, 0xCC43, 0xCC44, + 0xCC45, 0x6072, 0x6075, 0xCC46, 0, 0xCC47, 0xCC48, 0x6067, + 0x6073, 0xCC49, 0xCC4A, 0x3A3C, 0, 0, 0x6076, 0, + 0, 0, 0, 0, 0, 0, 0x6077, 0, +}; +static const unsigned short utf8_to_euc_E792[] = { + 0xCC4B, 0xCC4C, 0, 0x4D7E, 0, 0xCC4D, 0xCC4E, 0xCC4F, + 0, 0xCC50, 0, 0x6078, 0, 0, 0, 0xCC51, + 0xCC52, 0xCC53, 0xCC54, 0, 0, 0, 0, 0, + 0xCC55, 0xCC56, 0xCC57, 0, 0xCC58, 0, 0x6079, 0xCC59, + 0xCC5A, 0xCC5B, 0x6065, 0xCC5C, 0, 0, 0xCC5D, 0x607A, + 0xCC5E, 0xCC5F, 0xCC60, 0xCC61, 0, 0, 0xCC62, 0xCC63, + 0x3444, 0xCC64, 0xCC65, 0, 0, 0xCC66, 0, 0, + 0, 0xCC67, 0, 0xCC68, 0, 0x3C25, 0, 0xCC69, +}; +static const unsigned short utf8_to_euc_E793[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0xCC6A, 0xCC6B, 0x607B, 0, 0xCC6C, 0, 0, 0x607C, + 0xCC6D, 0, 0, 0xCC6E, 0x607D, 0, 0, 0, + 0xCC6F, 0, 0xCC70, 0xCC71, 0x313B, 0, 0xCC72, 0xCC73, + 0x6121, 0, 0x493B, 0x6122, 0xCC74, 0, 0x3424, 0x6123, + 0xCC75, 0x6124, 0xCC76, 0xCC77, 0, 0, 0x6125, 0xCC78, + 0x6127, 0x6128, 0x6126, 0, 0xCC79, 0, 0x4953, 0x612A, + 0x6129, 0, 0xCC7A, 0xCC7B, 0xCC7C, 0, 0, 0xCC7D, +}; +static const unsigned short utf8_to_euc_E794[] = { + 0, 0xF450, 0, 0x612C, 0x612B, 0x612D, 0xCC7E, 0, + 0, 0, 0, 0, 0x612E, 0x6130, 0x612F, 0, + 0, 0x3979, 0xCD21, 0x6132, 0, 0x6131, 0xCD22, 0xCD23, + 0x3445, 0, 0x3F53, 0, 0x453C, 0, 0x6133, 0x4038, + 0xCD24, 0xCD25, 0, 0x3B3A, 0xCD26, 0x3179, 0x6134, 0xCD27, + 0x4D51, 0xCD28, 0xCD29, 0x4A63, 0x6135, 0, 0, 0xCD2A, + 0x4544, 0x4D33, 0x3943, 0x3F3D, 0, 0, 0xCD2B, 0x434B, + 0x5234, 0xCD2C, 0x442E, 0x3268, 0x6136, 0xCD2D, 0xCD2E, 0xCD2F, +}; +static const unsigned short utf8_to_euc_E795[] = { + 0xCD30, 0, 0, 0xCD31, 0x6137, 0, 0x613C, 0xCD32, + 0xCD33, 0x613A, 0x6139, 0x5A42, 0x3326, 0x6138, 0xCD34, 0x305A, + 0xCD35, 0x482A, 0xCD36, 0, 0x484A, 0, 0, 0xCD37, + 0, 0x4E31, 0x613D, 0x613B, 0x435C, 0x4026, 0xCD38, 0xCD39, + 0x482B, 0xCD3A, 0x492D, 0, 0x613F, 0x4E2C, 0x374D, 0x6140, + 0, 0x613E, 0x4856, 0x6141, 0, 0x6142, 0, 0xCD3B, + 0x305B, 0xCD3C, 0, 0x3E76, 0x6147, 0, 0x6144, 0x466D, + 0x6143, 0xCD3D, 0xCD3E, 0xCD3F, 0xCD40, 0xCD41, 0xCD42, 0x3526, +}; +static const unsigned short utf8_to_euc_E796[] = { + 0, 0xCD43, 0x614A, 0, 0, 0xCD44, 0x6145, 0x6146, + 0, 0x6149, 0x6148, 0x4925, 0, 0, 0x4142, 0x4141, + 0xCD45, 0x353F, 0xCD46, 0xCD47, 0x614B, 0xCD48, 0, 0, + 0, 0xCD49, 0x614C, 0, 0xCD4A, 0x614D, 0, 0, + 0, 0, 0xCD4B, 0x614F, 0xCD4C, 0x614E, 0, 0, + 0, 0, 0, 0x3156, 0, 0, 0, 0, + 0, 0x6157, 0x4868, 0x6151, 0xCD4D, 0x6153, 0, 0, + 0x6155, 0x3F3E, 0xCD4E, 0, 0x6156, 0x6154, 0x3C40, 0xCD4F, +}; +static const unsigned short utf8_to_euc_E797[] = { + 0xCD50, 0xCD51, 0x6150, 0x6152, 0xCD52, 0x4942, 0xCD53, 0x3E49, + 0, 0, 0x6159, 0, 0xCD54, 0x6158, 0xCD55, 0xCD56, + 0, 0, 0x615A, 0, 0x3C26, 0x3A2F, 0, 0xCD57, + 0x4577, 0x615B, 0, 0x444B, 0xCD58, 0, 0x615D, 0xCD59, + 0xCD5A, 0xCD5B, 0x4E21, 0x615C, 0xCD5C, 0, 0, 0xCD5D, + 0, 0x4169, 0, 0, 0xCD5E, 0, 0xCD5F, 0xCD60, + 0x6162, 0xCD61, 0x6164, 0x6165, 0x4354, 0, 0, 0, + 0, 0xCD62, 0x6163, 0, 0x6160, 0, 0x615E, 0x615F, +}; +static const unsigned short utf8_to_euc_E798[] = { + 0xCD63, 0x6161, 0xCD64, 0xCD65, 0xCD66, 0, 0, 0xCD67, + 0xCD68, 0x6168, 0xCD69, 0x6166, 0xCD6A, 0x6167, 0, 0xCD6B, + 0, 0, 0xCD6C, 0xCD6D, 0, 0xCD6E, 0xCD6F, 0, + 0, 0xCD70, 0, 0xCD71, 0xCD72, 0xCD73, 0xCD74, 0x6169, + 0x616B, 0x616C, 0x616D, 0xCD75, 0x616E, 0xCD76, 0xCD77, 0x616A, + 0, 0xCD78, 0, 0, 0, 0xCD79, 0, 0, + 0x6170, 0, 0xCD7A, 0xCD7B, 0x616F, 0xCD7C, 0, 0, + 0xCD7D, 0xCD7E, 0xCE21, 0x6171, 0xCE22, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E799[] = { + 0xCE24, 0xCE25, 0x4E45, 0xCE26, 0xCE27, 0xCE28, 0x6174, 0x6172, + 0x6173, 0xCE29, 0xCE23, 0xCE2A, 0x3462, 0, 0, 0, + 0, 0, 0x4C7E, 0, 0, 0xCE2B, 0x4A4A, 0, + 0x6176, 0xCE2C, 0, 0, 0x6175, 0, 0, 0xCE2D, + 0, 0x6177, 0x6178, 0, 0xCE2E, 0xCE2F, 0, 0x617C, + 0x6179, 0x617A, 0x617B, 0, 0x617D, 0xCE30, 0xCE31, 0xCE32, + 0x617E, 0xCE33, 0x6221, 0, 0xCE34, 0, 0x6222, 0, + 0x6223, 0, 0x482F, 0x4550, 0x6224, 0x4772, 0x4934, 0, +}; +static const unsigned short utf8_to_euc_E79A[] = { + 0x6225, 0xCE35, 0xF451, 0x6226, 0x452A, 0xCE36, 0x3327, 0x3944, + 0x6227, 0, 0, 0x6228, 0xCE37, 0xCE38, 0x6229, 0, + 0x3B29, 0, 0, 0x622B, 0, 0xCE39, 0x622A, 0, + 0, 0x622C, 0x622D, 0xCE3A, 0xCE3B, 0xCE3C, 0xF452, 0xCE3D, + 0xCE3E, 0, 0xCE3F, 0xCE40, 0xCE41, 0xCE42, 0xCE43, 0xCE44, + 0xCE45, 0, 0xCE46, 0, 0, 0xCE47, 0x4869, 0, + 0x622E, 0, 0, 0, 0x622F, 0, 0, 0x7369, + 0x6230, 0x6231, 0x6232, 0, 0, 0xCE48, 0, 0x3B2E, +}; +static const unsigned short utf8_to_euc_E79B[] = { + 0, 0xCE49, 0x6233, 0x4756, 0, 0xCE4A, 0x4B5F, 0, + 0x314E, 0xCE4B, 0x3157, 0xCE4C, 0xCE4D, 0x6234, 0xCE4E, 0, + 0, 0, 0x6236, 0, 0xCE4F, 0, 0x6235, 0x4570, + 0, 0xCE50, 0, 0x4039, 0x5D39, 0, 0x6237, 0x4C41, + 0xCE51, 0x6238, 0, 0x3446, 0x4857, 0x6239, 0xCE52, 0x623A, + 0xCE53, 0, 0x623B, 0, 0xCE54, 0, 0x4C5C, 0, + 0xCE55, 0xCE56, 0x4C55, 0, 0x443E, 0, 0xCE57, 0, + 0x416A, 0xCE58, 0, 0x623D, 0xCE59, 0, 0x3D62, 0, +}; +static const unsigned short utf8_to_euc_E79C[] = { + 0xCE5A, 0x3E4A, 0, 0, 0x6240, 0, 0xCE5B, 0x623F, + 0x623E, 0x487D, 0xCE5C, 0x3447, 0x3829, 0, 0xCE5D, 0, + 0, 0, 0xCE5E, 0, 0xCE5F, 0xCE60, 0, 0xCE61, + 0, 0xCE62, 0xCE63, 0x6246, 0xCE64, 0, 0x6243, 0x3F3F, + 0x4C32, 0, 0xCE65, 0, 0x6242, 0x6244, 0x6245, 0, + 0xCE66, 0x6241, 0, 0, 0, 0xCE67, 0xCE68, 0xCE69, + 0, 0, 0, 0, 0xCE6A, 0xCE6B, 0xCE6C, 0x6247, + 0x6248, 0xCE6D, 0x442F, 0, 0x3463, 0xCE6E, 0xCE6F, 0, +}; +static const unsigned short utf8_to_euc_E79D[] = { + 0x4365, 0, 0xCE70, 0, 0, 0xCE71, 0xCE72, 0x6249, + 0, 0, 0xCE73, 0, 0, 0xCE74, 0xCE75, 0xCE76, + 0, 0, 0xCE77, 0, 0, 0, 0xCE78, 0xCE79, + 0, 0, 0x624A, 0x624D, 0xCE7A, 0, 0xCE7B, 0xCE7C, + 0xCE7D, 0x3F67, 0xCE7E, 0x4644, 0xCF21, 0x624E, 0x4B53, 0xCF22, + 0x624B, 0, 0xCF23, 0x624C, 0xCF24, 0, 0, 0, + 0xCF25, 0, 0xCF26, 0xCF27, 0xCF28, 0, 0, 0, + 0, 0x6251, 0xCF29, 0, 0, 0xCF2A, 0x6250, 0x624F, +}; +static const unsigned short utf8_to_euc_E79E[] = { + 0xCF2B, 0, 0, 0, 0xCF2C, 0, 0, 0, + 0, 0, 0, 0x6253, 0xCF2D, 0xCF2E, 0x6252, 0, + 0, 0x6254, 0, 0, 0xCF2F, 0xCF30, 0xCF31, 0, + 0, 0, 0xCF32, 0, 0, 0, 0x6256, 0xCF33, + 0x6255, 0, 0xCF34, 0, 0, 0x4A4D, 0, 0xCF35, + 0, 0, 0xCF36, 0, 0x3D56, 0x4E46, 0xCF37, 0xCF38, + 0x6257, 0xCF39, 0, 0x4637, 0, 0xCF3A, 0x6258, 0, + 0, 0x6259, 0, 0x625D, 0x625B, 0x625C, 0xCF3B, 0x625A, +}; +static const unsigned short utf8_to_euc_E79F[] = { + 0, 0, 0, 0xCF3C, 0, 0, 0, 0x625E, + 0, 0xCF3D, 0, 0, 0, 0x625F, 0, 0, + 0, 0xCF3E, 0xCF3F, 0, 0, 0xCF40, 0, 0x6260, + 0, 0xCF41, 0x6261, 0x4C37, 0x6262, 0, 0xCF42, 0xCF43, + 0xCF44, 0, 0x4C70, 0x6263, 0xCF45, 0x434E, 0xCF46, 0x476A, + 0, 0x366B, 0xCF47, 0, 0xCF48, 0x433B, 0x6264, 0x363A, + 0xCF49, 0xCF4A, 0, 0x4050, 0xCF4B, 0, 0, 0, + 0xCF4C, 0, 0, 0xCF4D, 0x6265, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E7A0[] = { + 0, 0, 0x3A3D, 0, 0, 0xCF4E, 0xCF4F, 0, + 0, 0xCF50, 0, 0, 0x6266, 0xCF51, 0xCF52, 0, + 0, 0xCF53, 0x6267, 0, 0x3826, 0x3A55, 0, 0, + 0, 0, 0, 0, 0, 0xCF54, 0, 0, + 0x6269, 0xCF55, 0xCF56, 0xCF57, 0, 0x4556, 0x3A56, 0x354E, + 0, 0, 0, 0, 0, 0xCF58, 0xCF59, 0, + 0xCF5A, 0, 0x4B24, 0, 0x474B, 0xCF5B, 0, 0xCF5C, + 0, 0, 0x4557, 0, 0, 0, 0, 0x395C, +}; +static const unsigned short utf8_to_euc_E7A1[] = { + 0, 0, 0, 0xCF5D, 0xCF5E, 0x626B, 0, 0xCF5F, + 0xCF60, 0, 0, 0, 0xCF61, 0, 0xCF62, 0, + 0, 0, 0xCF63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xCF64, 0x3E4B, 0xCF65, 0, + 0xCF66, 0xCF67, 0, 0xCF68, 0xCF69, 0, 0, 0, + 0xCF6A, 0, 0xCF6B, 0x4E32, 0x3945, 0, 0xCF6C, 0x3827, + 0, 0, 0x4823, 0, 0x626D, 0, 0, 0, + 0, 0, 0xCF6D, 0, 0x626F, 0, 0xCF6E, 0, +}; +static const unsigned short utf8_to_euc_E7A2[] = { + 0, 0x386B, 0, 0, 0, 0, 0x626E, 0x4476, + 0, 0, 0xCF6F, 0, 0x6271, 0x3337, 0x626C, 0xCF70, + 0, 0x486A, 0, 0x3130, 0xCF71, 0x3A6C, 0, 0x4F52, + 0xCF72, 0, 0x6270, 0, 0, 0xCF74, 0xCF75, 0xCF76, + 0, 0xCF73, 0, 0x6272, 0xCF77, 0, 0, 0x4A4B, + 0xCF78, 0x4059, 0x6274, 0, 0xCF79, 0xCF7A, 0, 0x6275, + 0xCF7B, 0xCF7C, 0xCF7D, 0xCF7E, 0, 0x6273, 0, 0, + 0, 0, 0x334E, 0xD021, 0x627B, 0xD022, 0x627A, 0xD023, +}; +static const unsigned short utf8_to_euc_E7A3[] = { + 0, 0x3C27, 0, 0, 0, 0x627C, 0x6277, 0xD024, + 0xD025, 0xD026, 0x627D, 0x6278, 0xD027, 0, 0xD028, 0, + 0x4858, 0x6276, 0xD029, 0xD02A, 0x6279, 0xD02B, 0xD02C, 0, + 0, 0, 0x6322, 0xD02E, 0, 0, 0, 0xD02F, + 0xD030, 0xD031, 0, 0, 0xD02D, 0, 0xD032, 0x6321, + 0x4B61, 0, 0xD033, 0, 0x627E, 0, 0, 0x306B, + 0, 0, 0xD034, 0xD035, 0x6324, 0, 0xD037, 0xD038, + 0, 0, 0xD039, 0xD03A, 0, 0x6323, 0, 0xD03B, +}; +static const unsigned short utf8_to_euc_E7A4[] = { + 0xD036, 0x3E4C, 0, 0, 0, 0, 0xD03C, 0x6325, + 0, 0, 0, 0, 0xD03D, 0, 0x4143, 0, + 0xD03E, 0x6327, 0x6326, 0, 0, 0, 0, 0, + 0, 0x6328, 0xD03F, 0, 0xD040, 0, 0xD041, 0xD042, + 0xD043, 0, 0, 0, 0, 0xD044, 0x6268, 0xD045, + 0, 0xD046, 0x626A, 0x632A, 0x6329, 0xD047, 0, 0, + 0xF454, 0xD048, 0, 0, 0xD049, 0xD04A, 0, 0, + 0, 0, 0x3C28, 0xD04B, 0x4E69, 0xD04C, 0x3C52, 0xD04D, +}; +static const unsigned short utf8_to_euc_E7A5[] = { + 0x632B, 0x3737, 0, 0, 0xD04E, 0xD04F, 0xD050, 0x3540, + 0x3527, 0x3B63, 0xD051, 0xD052, 0, 0, 0, 0xD053, + 0x4D34, 0xD054, 0, 0x6331, 0xD055, 0x6330, 0x4144, 0x632D, + 0xD056, 0, 0x632F, 0xD057, 0xD058, 0x3D4B, 0x3F40, 0x632E, + 0x632C, 0, 0x472A, 0, 0, 0x3E4D, 0, 0xD059, + 0x493C, 0xD05A, 0, 0xD05B, 0, 0x3A57, 0, 0, + 0, 0, 0xD05C, 0, 0, 0, 0, 0x4578, + 0, 0xD05D, 0x6332, 0xD05E, 0xD05F, 0, 0xD060, 0x6333, +}; +static const unsigned short utf8_to_euc_E7A6[] = { + 0x6349, 0x3658, 0, 0, 0x4F3D, 0x4135, 0, 0, + 0, 0, 0x6334, 0xD061, 0xD062, 0x3252, 0x4477, 0x4A21, + 0, 0xD063, 0, 0xD064, 0xD065, 0xD066, 0xD067, 0, + 0xD068, 0, 0, 0xD069, 0xD06A, 0x6335, 0, 0, + 0, 0xD06B, 0, 0, 0, 0, 0x357A, 0x6336, + 0xD06C, 0xD06D, 0x6338, 0xD06E, 0, 0, 0x6339, 0xD06F, + 0x4729, 0xD070, 0, 0x633A, 0xD071, 0, 0, 0, + 0xD072, 0x633B, 0x633C, 0xD073, 0, 0x3659, 0x3253, 0x4645, +}; +static const unsigned short utf8_to_euc_E7A7[] = { + 0x3D28, 0x3B64, 0xD074, 0, 0xD075, 0, 0, 0xD076, + 0xD077, 0x633D, 0xD078, 0x3D29, 0, 0, 0, 0xD079, + 0, 0x324A, 0x4943, 0, 0xD07A, 0x633E, 0xD07B, 0, + 0x486B, 0, 0xD07C, 0, 0, 0xD07D, 0xD07E, 0x4145, + 0xD121, 0x6341, 0xD122, 0x6342, 0x4769, 0xD123, 0x3F41, 0x633F, + 0, 0x4361, 0xD124, 0xD125, 0x6340, 0xD126, 0, 0, + 0x3E4E, 0xD127, 0, 0, 0, 0, 0, 0, + 0xD128, 0, 0, 0x305C, 0xD129, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E7A8[] = { + 0x3529, 0, 0xD12A, 0xD12B, 0, 0, 0, 0xD12C, + 0x6343, 0xD12D, 0xD12E, 0x4478, 0xD12F, 0x6344, 0x4047, 0, + 0, 0xD130, 0, 0, 0x4C2D, 0xD131, 0, 0x4923, + 0x6345, 0x6346, 0x4355, 0xD132, 0x4E47, 0, 0xD133, 0x6348, + 0x6347, 0xD134, 0, 0, 0, 0, 0, 0xD135, + 0, 0, 0, 0xD136, 0, 0xD137, 0x3C6F, 0xD138, + 0xD139, 0x634A, 0x3070, 0, 0xD13A, 0xD13B, 0, 0x634D, + 0xD13C, 0xD13D, 0xD13E, 0x634B, 0x3254, 0x374E, 0x634C, 0x3946, +}; +static const unsigned short utf8_to_euc_E7A9[] = { + 0x3972, 0, 0x4A66, 0x634E, 0xD13F, 0xD140, 0x4B54, 0xD141, + 0xD142, 0x6350, 0, 0, 0xD143, 0x4051, 0x314F, 0x323A, + 0x302C, 0, 0, 0, 0, 0xD144, 0xD145, 0x634F, + 0, 0xD146, 0, 0, 0xD147, 0xD148, 0, 0xD149, + 0xD14A, 0x6351, 0x6352, 0x3E77, 0, 0xD14B, 0, 0xD14C, + 0, 0x6353, 0xD14D, 0x334F, 0, 0xD14E, 0, 0, + 0x6355, 0, 0, 0, 0x376A, 0xD14F, 0x3566, 0, + 0xD150, 0x6356, 0x3675, 0, 0, 0x6357, 0xD151, 0x407C, +}; +static const unsigned short utf8_to_euc_E7AA[] = { + 0xD152, 0x464D, 0xD153, 0x4060, 0x3A75, 0xD154, 0xD155, 0, + 0x6358, 0, 0xD156, 0xD157, 0, 0, 0, 0, + 0xD158, 0xD159, 0x4362, 0x416B, 0xD15A, 0x635A, 0x635C, 0x6359, + 0x635B, 0, 0, 0, 0, 0, 0xD15B, 0x3722, + 0xD15C, 0, 0, 0xD15D, 0, 0, 0, 0, + 0, 0x635D, 0x3726, 0, 0xD15E, 0, 0x3567, 0x4D52, + 0x635F, 0, 0, 0xD15F, 0, 0xD160, 0x6360, 0, + 0, 0xD161, 0x312E, 0xD162, 0xD163, 0, 0, 0x6363, +}; +static const unsigned short utf8_to_euc_E7AB[] = { + 0, 0, 0, 0x3376, 0x6362, 0x6361, 0xD164, 0x6365, + 0x635E, 0xD165, 0x6366, 0x4E29, 0xD166, 0x6367, 0xD167, 0x6368, + 0, 0xD168, 0x5474, 0x636A, 0, 0x6369, 0, 0, + 0, 0x636B, 0x636C, 0xD169, 0x4E35, 0x636D, 0, 0x706F, + 0x3E4F, 0x636E, 0x636F, 0x3D57, 0, 0x4638, 0x6370, 0xF459, + 0xD16A, 0xD16B, 0x4328, 0xD16C, 0xD16D, 0x6371, 0, 0x433C, + 0x6372, 0xD16E, 0, 0, 0xD16F, 0, 0x3625, 0, + 0x513F, 0x435D, 0x3C33, 0xD170, 0, 0xD171, 0xD172, 0x3448, +}; +static const unsigned short utf8_to_euc_E7AC[] = { + 0, 0, 0x6373, 0, 0x6422, 0, 0x6376, 0xD173, + 0x3568, 0, 0x6375, 0x6424, 0, 0, 0, 0x6374, + 0, 0x3E50, 0, 0, 0xD174, 0, 0, 0, + 0x6378, 0x6379, 0, 0x452B, 0, 0, 0x637A, 0xD175, + 0x335E, 0, 0, 0xD176, 0, 0x3F5A, 0x4964, 0xD177, + 0x637C, 0xD178, 0xD179, 0xD17A, 0x4268, 0xD17B, 0xD17C, 0xD17D, + 0xD17E, 0xD221, 0, 0x6377, 0xD222, 0x637B, 0x637D, 0, + 0, 0x3A7B, 0, 0, 0, 0xD223, 0, 0xD224, +}; +static const unsigned short utf8_to_euc_E7AD[] = { + 0xD225, 0xD226, 0, 0, 0, 0x6426, 0x492E, 0xD227, + 0x4826, 0x4579, 0, 0x365A, 0x6425, 0x6423, 0xD228, 0x4835, + 0x637E, 0x435E, 0x457B, 0, 0x457A, 0xD229, 0x3A76, 0, + 0, 0, 0, 0, 0, 0x6438, 0, 0, + 0xD22A, 0, 0, 0, 0xD22B, 0x6428, 0xD22C, 0x642A, + 0, 0xD22D, 0xD22E, 0, 0x642D, 0xD22F, 0x642E, 0xD230, + 0x642B, 0x642C, 0xD231, 0xD232, 0x6429, 0x6427, 0, 0xD233, + 0, 0, 0x6421, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E7AE[] = { + 0, 0, 0, 0, 0xD234, 0, 0x4A4F, 0x3255, + 0, 0xD235, 0, 0x6435, 0, 0x6432, 0xD236, 0x6437, + 0xD237, 0xD238, 0x6436, 0, 0x4773, 0x4C27, 0xD239, 0x3B3B, + 0x6430, 0x6439, 0x6434, 0xD23A, 0x6433, 0x642F, 0xD23B, 0x6431, + 0xD23C, 0x3449, 0, 0, 0, 0xD23D, 0, 0, + 0, 0, 0x433D, 0, 0xD23E, 0x407D, 0, 0xD23F, + 0xD240, 0x4822, 0xD241, 0, 0x643E, 0xD242, 0xD243, 0, + 0x4824, 0, 0xD244, 0xD245, 0xD246, 0xD247, 0, 0, +}; +static const unsigned short utf8_to_euc_E7AF[] = { + 0x4061, 0x643B, 0xD248, 0, 0x484F, 0xD249, 0x643F, 0x4A53, + 0xD24A, 0x435B, 0xD24B, 0x643A, 0x643C, 0, 0, 0x643D, + 0, 0, 0, 0, 0xD24C, 0, 0xD24D, 0xD24E, + 0, 0xD24F, 0xD250, 0xD251, 0, 0x6440, 0, 0, + 0x3C44, 0, 0, 0, 0x4646, 0x6445, 0x6444, 0, + 0xD252, 0x6441, 0xD253, 0, 0, 0x4F36, 0, 0, + 0, 0, 0xD254, 0x644A, 0xD255, 0xD256, 0x644E, 0x644B, + 0xD257, 0xD258, 0xD259, 0, 0xD25A, 0, 0xD25B, 0, +}; +static const unsigned short utf8_to_euc_E7B0[] = { + 0x6447, 0xD25C, 0xD25D, 0xD25E, 0xD25F, 0, 0xD260, 0x6448, + 0, 0xD261, 0, 0xD262, 0xD263, 0x644D, 0xD264, 0xD265, + 0, 0x6442, 0x5255, 0x6449, 0x6443, 0, 0, 0x644C, + 0, 0xD266, 0, 0xD267, 0, 0, 0, 0x6452, + 0xD268, 0x344A, 0, 0x644F, 0, 0xD269, 0xD26A, 0x6450, + 0xD26B, 0, 0x6451, 0x6454, 0xD26C, 0, 0, 0, + 0, 0xD26D, 0, 0xD26E, 0xD26F, 0, 0xD270, 0x6453, + 0x4876, 0xD271, 0xD272, 0, 0, 0x6455, 0x4E7C, 0x4A6D, +}; +static const unsigned short utf8_to_euc_E7B1[] = { + 0x645A, 0, 0, 0x6457, 0, 0, 0xD273, 0, + 0, 0, 0xD274, 0, 0x6456, 0x4052, 0, 0x6459, + 0x645B, 0xD276, 0xD277, 0xD278, 0x6458, 0xD275, 0x645F, 0, + 0x645C, 0xD279, 0xD27A, 0xD27B, 0xD27C, 0xD27D, 0xD27E, 0x645D, + 0x6446, 0xD321, 0, 0xD322, 0x645E, 0x6460, 0, 0xD323, + 0, 0xD324, 0, 0, 0x6461, 0xD325, 0xD326, 0, + 0xD327, 0, 0xD328, 0x4A46, 0, 0x6462, 0, 0, + 0, 0xD329, 0, 0, 0xD32A, 0xD32B, 0x4C62, 0, +}; +static const unsigned short utf8_to_euc_E7B2[] = { + 0, 0x364E, 0x3729, 0x6463, 0, 0, 0xD32C, 0xD32D, + 0, 0x4A34, 0, 0x3F68, 0, 0x4C30, 0, 0xD32E, + 0x6464, 0, 0x4E33, 0, 0xD32F, 0x4774, 0, 0x4146, + 0x4734, 0, 0, 0x3D4D, 0, 0, 0xD330, 0x3040, + 0xD331, 0x6469, 0x6467, 0, 0x6465, 0x3421, 0xD332, 0x3E51, + 0x646A, 0, 0, 0x6468, 0, 0x6466, 0x646E, 0, + 0xD333, 0x646D, 0x646C, 0x646B, 0, 0, 0xD334, 0xD335, + 0, 0x646F, 0xD336, 0xD337, 0xD338, 0x6470, 0x403A, 0xD339, +}; +static const unsigned short utf8_to_euc_E7B3[] = { + 0x6471, 0, 0x6473, 0, 0xD33A, 0x6472, 0, 0xD33B, + 0xD33C, 0xD33D, 0x3852, 0, 0, 0xD33E, 0x4138, 0xD33F, + 0, 0, 0x6475, 0xD340, 0xD341, 0xD342, 0x457C, 0xD343, + 0x6474, 0xD344, 0xD345, 0, 0x6476, 0xD346, 0x4A35, 0x416C, + 0x3947, 0, 0x6477, 0, 0, 0, 0xD347, 0x4E48, + 0, 0xD348, 0, 0xD349, 0, 0, 0, 0x6479, + 0, 0, 0x647A, 0, 0x647B, 0xD34A, 0x647C, 0, + 0x3B65, 0, 0x647D, 0x374F, 0, 0, 0x356A, 0, +}; +static const unsigned short utf8_to_euc_E7B4[] = { + 0x352A, 0, 0x6521, 0xD34B, 0x4C73, 0x3948, 0x647E, 0xD34C, + 0xD34D, 0xD34E, 0x6524, 0x4C66, 0, 0x473C, 0, 0xD34F, + 0x4933, 0xD350, 0xD351, 0xD352, 0x3D63, 0x6523, 0xD353, 0x3C53, + 0x3949, 0x3B66, 0x3569, 0x4A36, 0x6522, 0xD354, 0xD355, 0, + 0x4147, 0x4B42, 0x3A77, 0xD356, 0, 0, 0xD357, 0, + 0, 0, 0xD358, 0x3B67, 0x445D, 0xD359, 0x6527, 0x4E5F, + 0x3A59, 0xD35A, 0x6528, 0x3F42, 0, 0x652A, 0, 0, + 0, 0x3E52, 0x3A30, 0, 0xD35B, 0xD35C, 0xD35D, 0x6529, +}; +static const unsigned short utf8_to_euc_E7B5[] = { + 0xD35E, 0xD35F, 0x3D2A, 0x383E, 0x4148, 0x6525, 0x652B, 0xD360, + 0xD361, 0, 0, 0x6526, 0x3750, 0xD362, 0x652E, 0x6532, + 0x376B, 0xD363, 0, 0xD364, 0, 0, 0x652D, 0xD365, + 0, 0xD366, 0xD367, 0x6536, 0xD368, 0xD369, 0x394A, 0, + 0, 0x4D6D, 0x303C, 0x6533, 0, 0xD36A, 0x356B, 0xD36B, + 0x6530, 0, 0xD36C, 0, 0, 0, 0x6531, 0, + 0xD36D, 0x457D, 0x652F, 0x652C, 0, 0x3328, 0x4064, 0, + 0xD36E, 0x3828, 0xD36F, 0xD370, 0, 0x6538, 0, 0xD371, +}; +static const unsigned short utf8_to_euc_E7B6[] = { + 0, 0xD372, 0xD373, 0xD374, 0, 0xD375, 0xD376, 0, + 0xD377, 0x6535, 0, 0xD378, 0xD379, 0xD37A, 0, 0x6537, + 0, 0xD37B, 0, 0x6534, 0, 0, 0xD37C, 0xD37D, + 0, 0x3751, 0x4233, 0x6539, 0x416E, 0xD37E, 0xD421, 0x6546, + 0xF45C, 0, 0x6542, 0x653C, 0, 0, 0xD422, 0xD423, + 0, 0, 0xD424, 0x6540, 0x3C7A, 0x305D, 0x653B, 0x6543, + 0x6547, 0x394B, 0x4C56, 0xD425, 0x4456, 0x653D, 0xD426, 0xD427, + 0x6545, 0xD428, 0x653A, 0x433E, 0, 0x653F, 0x303D, 0x4C4A, +}; +static const unsigned short utf8_to_euc_E7B7[] = { + 0, 0, 0xD429, 0xD42A, 0xD42B, 0xD42C, 0xD42D, 0x653E, + 0, 0, 0x365B, 0x486C, 0xD42E, 0xD42F, 0xD430, 0x416D, + 0, 0x4E50, 0x3D6F, 0, 0, 0x656E, 0xF45D, 0xD431, + 0x6548, 0xD432, 0x407E, 0, 0x6544, 0x6549, 0x654B, 0, + 0x4479, 0x654E, 0xD434, 0, 0x654A, 0xD435, 0xD436, 0, + 0x4A54, 0x344B, 0xD437, 0xD438, 0x4C4B, 0xD439, 0, 0x305E, + 0, 0xD43A, 0x654D, 0, 0x4E7D, 0xD43B, 0xD43C, 0, + 0, 0xD43D, 0xD43E, 0x654C, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E7B8[] = { + 0xD433, 0x316F, 0, 0, 0x466C, 0x654F, 0, 0, + 0xD43F, 0x6556, 0x6550, 0x6557, 0, 0, 0, 0, + 0xD440, 0xD441, 0x6553, 0, 0, 0xD442, 0, 0xD443, + 0, 0, 0, 0x477B, 0xD444, 0xD445, 0x3C4A, 0x6555, + 0xD446, 0x6552, 0x6558, 0x6551, 0, 0, 0x3D44, 0xD447, + 0xD448, 0, 0, 0x4B25, 0xD449, 0xD44A, 0x3D4C, 0xD44B, + 0, 0x6554, 0x6560, 0xD44C, 0, 0x655C, 0xD44D, 0x655F, + 0, 0x655D, 0x6561, 0x655B, 0, 0x6541, 0x4053, 0xD44E, +}; +static const unsigned short utf8_to_euc_E7B9[] = { + 0, 0x484B, 0, 0x655E, 0xD44F, 0xD450, 0x6559, 0xD451, + 0, 0, 0x4121, 0x3752, 0, 0x3D2B, 0xD452, 0, + 0xD453, 0, 0xD454, 0, 0x3F25, 0x4136, 0x6564, 0, + 0xD455, 0x6566, 0x6567, 0, 0, 0x6563, 0x6565, 0xD456, + 0, 0xD457, 0xD458, 0, 0, 0xD459, 0x655A, 0x6562, + 0, 0x656A, 0x6569, 0xD45A, 0, 0x4B7A, 0xD45B, 0xD45C, + 0x372B, 0, 0, 0xD45D, 0, 0, 0, 0, + 0xD45E, 0x6568, 0, 0x656C, 0x656B, 0x656F, 0xD45F, 0x6571, +}; +static const unsigned short utf8_to_euc_E7BA[] = { + 0, 0xD460, 0x3B3C, 0x656D, 0, 0, 0xD461, 0xD462, + 0x6572, 0x6573, 0xD463, 0, 0x6574, 0xD464, 0x657A, 0x453B, + 0x6576, 0xD465, 0x6575, 0x6577, 0x6578, 0xD466, 0x6579, 0, + 0xD467, 0, 0xD468, 0x657B, 0x657C, 0xD469, 0xD46A, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E7BC[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x344C, 0, + 0x657D, 0, 0x657E, 0xD46C, 0xD46B, 0xD46D, 0xD46E, 0xD46F, +}; +static const unsigned short utf8_to_euc_E7BD[] = { + 0, 0, 0, 0xD470, 0xD471, 0x6621, 0, 0xD472, + 0, 0, 0, 0, 0x6622, 0x6623, 0x6624, 0xD473, + 0x6625, 0x6626, 0xD474, 0xD475, 0x6628, 0x6627, 0, 0, + 0x6629, 0, 0, 0xD476, 0xD477, 0xD478, 0, 0x662A, + 0x662B, 0xD479, 0, 0xD47A, 0xD47B, 0xD47C, 0xD47D, 0x662E, + 0x662C, 0x662D, 0x3A61, 0x3753, 0, 0xD47E, 0x4356, 0, + 0x4833, 0xD521, 0x3D70, 0, 0, 0x474D, 0, 0x486D, + 0x662F, 0x586D, 0, 0, 0, 0xD522, 0xD523, 0xD524, +}; +static const unsigned short utf8_to_euc_E7BE[] = { + 0xD525, 0, 0x6630, 0x6632, 0, 0x4D65, 0x6631, 0x6634, + 0x6633, 0, 0x4D53, 0xD526, 0x6635, 0xD527, 0x487E, 0xD528, + 0xD529, 0xD52A, 0, 0, 0x6636, 0, 0xD52B, 0xD52C, + 0, 0, 0x6639, 0, 0xD52D, 0x6638, 0x6637, 0, + 0, 0xD52E, 0xD52F, 0x663A, 0x3732, 0, 0xD530, 0, + 0x4122, 0x3541, 0xD531, 0, 0, 0xD532, 0x663E, 0x663B, + 0, 0, 0x663C, 0, 0xD533, 0, 0x663F, 0, + 0x6640, 0x663D, 0, 0, 0xD534, 0x3129, 0, 0xD535, +}; +static const unsigned short utf8_to_euc_E7BF[] = { + 0xD536, 0x3227, 0, 0xD537, 0, 0x6642, 0x6643, 0, + 0xD538, 0, 0x6644, 0, 0x4D62, 0, 0xD539, 0xD53A, + 0, 0, 0x3D2C, 0, 0x6646, 0x6645, 0, 0, + 0, 0, 0, 0xD53B, 0, 0, 0, 0xD53C, + 0x3F69, 0x6647, 0, 0xD53D, 0, 0xD53E, 0x6648, 0, + 0xD53F, 0x6649, 0, 0x3465, 0xD540, 0, 0xD541, 0xD542, + 0x344D, 0, 0xD543, 0x664A, 0, 0, 0, 0, + 0, 0x664B, 0xD544, 0x4B5D, 0x4D63, 0xD545, 0xD546, 0xD547, +}; +static const unsigned short utf8_to_euc_E880[] = { + 0x4D54, 0x4F37, 0, 0x394D, 0x664E, 0x3C54, 0x664D, 0xD548, + 0xD549, 0, 0xD54A, 0x664F, 0x3C29, 0xD54B, 0xD54C, 0xD54D, + 0x4251, 0xD54E, 0x6650, 0xD54F, 0xD550, 0x394C, 0xD551, 0x4C57, + 0x6651, 0x6652, 0, 0, 0x6653, 0xD552, 0xD553, 0xD554, + 0xD555, 0x6654, 0, 0, 0xD556, 0, 0xD557, 0, + 0x6655, 0, 0, 0, 0xD558, 0, 0xD559, 0, + 0xD55A, 0, 0, 0x3C2A, 0xD55B, 0xD55C, 0x4C6D, 0xD55D, + 0, 0xD55E, 0xD55F, 0x6657, 0xD560, 0x433F, 0xD561, 0x6656, +}; +static const unsigned short utf8_to_euc_E881[] = { + 0xD562, 0, 0, 0, 0xD563, 0, 0x6659, 0, + 0, 0, 0x6658, 0, 0, 0, 0, 0, + 0, 0, 0x665A, 0, 0, 0, 0x403B, 0, + 0x665B, 0, 0x665C, 0, 0, 0, 0x4A39, 0x665D, + 0xD564, 0x416F, 0x665E, 0, 0xD565, 0, 0xD566, 0, + 0x665F, 0, 0, 0, 0, 0xD567, 0, 0x4E7E, + 0x6662, 0xD568, 0x6661, 0x6660, 0x4430, 0xD569, 0x6663, 0x3F26, + 0, 0x6664, 0, 0, 0, 0x6665, 0x4F38, 0x6666, +}; +static const unsigned short utf8_to_euc_E882[] = { + 0, 0xD56A, 0, 0, 0x6667, 0x6669, 0x6668, 0x4825, + 0xD56B, 0x4679, 0, 0x4F3E, 0x4829, 0, 0xD56C, 0, + 0, 0, 0, 0x666B, 0, 0, 0x3E53, 0, + 0x492A, 0, 0x666C, 0x666A, 0xD56D, 0x344E, 0xD56E, 0, + 0, 0x3854, 0x3B68, 0, 0, 0x486E, 0xD56F, 0xD570, + 0, 0x382A, 0x4B43, 0xD571, 0x666F, 0x666D, 0, 0x394E, + 0, 0x394F, 0x3069, 0, 0x3A68, 0, 0, 0, + 0xD572, 0xD573, 0x4759, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E883[] = { + 0, 0, 0, 0x305F, 0x6674, 0, 0x4340, 0, + 0xD574, 0, 0, 0, 0x4758, 0xD575, 0x425B, 0xD576, + 0, 0, 0xD577, 0, 0xD578, 0xD579, 0x6676, 0xD57A, + 0xD57B, 0x6672, 0x6675, 0x6670, 0, 0x6673, 0x4B26, 0, + 0xD57C, 0x3855, 0, 0, 0x307D, 0x6671, 0, 0, + 0, 0, 0, 0, 0, 0xD57D, 0xD57E, 0x6678, + 0xD621, 0x6679, 0xD622, 0xD623, 0x4639, 0, 0xD624, 0, + 0x363B, 0xD625, 0xD626, 0, 0x6726, 0x473D, 0xD627, 0, +}; +static const unsigned short utf8_to_euc_E884[] = { + 0, 0, 0x3B69, 0xD628, 0, 0x363C, 0x4048, 0x4F46, + 0x4C2E, 0x6677, 0x4054, 0xD629, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xD62A, 0xD62B, + 0xD62C, 0, 0x3553, 0x667A, 0xD62D, 0, 0xD62E, 0, + 0xD62F, 0, 0, 0x667C, 0xD630, 0, 0, 0xD631, + 0, 0x667B, 0, 0, 0xD632, 0, 0, 0x667D, + 0xD633, 0x4326, 0, 0x473E, 0, 0xD634, 0, 0, + 0, 0x4431, 0xD635, 0, 0xD636, 0, 0x6723, 0, +}; +static const unsigned short utf8_to_euc_E885[] = { + 0, 0, 0, 0, 0, 0xD637, 0x6722, 0xD638, + 0, 0, 0xD639, 0x667E, 0xD63A, 0, 0x3F55, 0, + 0x4965, 0x6725, 0xD63B, 0x6724, 0x3950, 0x4F53, 0, 0xD63C, + 0, 0, 0, 0, 0, 0, 0, 0x6735, + 0xD63D, 0xD63E, 0, 0, 0, 0x6729, 0x672A, 0xD63F, + 0xD640, 0xD641, 0, 0x3C70, 0, 0xD642, 0x6728, 0xD643, + 0x3978, 0x6727, 0, 0, 0x672B, 0, 0, 0xD644, + 0x4432, 0x4A22, 0x4123, 0, 0, 0, 0, 0x425C, +}; +static const unsigned short utf8_to_euc_E886[] = { + 0x672F, 0xD645, 0x6730, 0x672C, 0xD647, 0xD648, 0xD649, 0, + 0x672D, 0, 0x672E, 0xD64A, 0, 0, 0xD64B, 0x3951, + 0xD646, 0, 0, 0x6736, 0, 0x6732, 0xD64C, 0, + 0xD64D, 0, 0x4966, 0xD64E, 0x4B6C, 0x4928, 0xD64F, 0, + 0x6731, 0, 0xD650, 0x6734, 0x6733, 0, 0, 0, + 0x4B44, 0x6737, 0, 0, 0, 0, 0xD651, 0, + 0x6738, 0, 0xD652, 0x4137, 0xD653, 0x6739, 0, 0, + 0x673B, 0, 0x673F, 0xD654, 0, 0x673C, 0x673A, 0x473F, +}; +static const unsigned short utf8_to_euc_E887[] = { + 0x673D, 0, 0x673E, 0xD656, 0, 0xD657, 0x3232, 0, + 0x6745, 0x6740, 0xD658, 0xD655, 0, 0x6741, 0xD659, 0xD65A, + 0, 0x6742, 0, 0x4221, 0, 0xD65B, 0, 0xD65C, + 0x6744, 0x6743, 0x6746, 0xD65D, 0, 0xD65E, 0xD65F, 0x6747, + 0x6748, 0xD660, 0, 0x3F43, 0xD661, 0x3269, 0, 0x6749, + 0x4E57, 0, 0x3C2B, 0xD662, 0xD663, 0x3D2D, 0, 0, + 0xD664, 0xD665, 0xD666, 0x3B6A, 0x4357, 0xD667, 0xD668, 0, + 0xD669, 0xD66A, 0x674A, 0x674B, 0x3131, 0xD66B, 0x674C, 0xD66C, +}; +static const unsigned short utf8_to_euc_E888[] = { + 0xD66D, 0x674D, 0x674E, 0xD66E, 0, 0x674F, 0, 0x6750, + 0x363D, 0x5A2A, 0x6751, 0, 0x4065, 0x6752, 0x3C4B, 0xD66F, + 0x6753, 0, 0x5030, 0xD670, 0xD671, 0, 0x6754, 0x4A5E, + 0x345C, 0xD672, 0xD673, 0x4124, 0x3D58, 0xD674, 0x4971, 0x3D2E, + 0, 0xD675, 0xD676, 0, 0, 0, 0, 0, + 0xD677, 0x6755, 0x3952, 0x6756, 0x484C, 0, 0x6764, 0, + 0, 0, 0xD678, 0x6758, 0xD679, 0x4249, 0x4775, 0x383F, + 0x6757, 0x4125, 0xD67A, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E889[] = { + 0x6759, 0, 0, 0xD67B, 0xD67C, 0xD67D, 0xD67E, 0x447A, + 0, 0, 0, 0xD721, 0, 0, 0xD722, 0xD723, + 0, 0xD724, 0, 0, 0, 0, 0xD725, 0, + 0x675B, 0x675A, 0x675D, 0, 0xD726, 0x675C, 0, 0x675E, + 0xD727, 0, 0x6760, 0xD728, 0x675F, 0, 0x344F, 0xD729, + 0x6761, 0, 0x6762, 0x6763, 0, 0xD72A, 0x3A31, 0x4E49, + 0, 0x6765, 0x3F27, 0, 0xD72B, 0, 0x3170, 0x6766, + 0x6767, 0, 0, 0xD72C, 0, 0xD72D, 0x6768, 0xD72E, +}; +static const unsigned short utf8_to_euc_E88A[] = { + 0xD72F, 0xD730, 0, 0xD731, 0xD732, 0, 0, 0xD733, + 0, 0xD734, 0xD735, 0x3072, 0, 0x6769, 0xD736, 0, + 0, 0xD737, 0x676A, 0, 0xD738, 0, 0xD739, 0, + 0xD73A, 0x4967, 0xD73B, 0xD73C, 0, 0x3C47, 0, 0x676C, + 0xD73D, 0xD73E, 0, 0xD73F, 0xD740, 0x3329, 0x3032, 0xD741, + 0xD742, 0xD743, 0xD744, 0x676B, 0x676E, 0x474E, 0xD745, 0x3F44, + 0xD746, 0x3256, 0xD747, 0x4B27, 0xD748, 0, 0, 0xD749, + 0x375D, 0x365C, 0xD74A, 0x676D, 0xD74B, 0x326A, 0xD74C, 0xD74D, +}; +static const unsigned short utf8_to_euc_E88B[] = { + 0, 0, 0, 0, 0, 0x3423, 0xD74E, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xD74F, 0x3171, 0x6772, 0x4E6A, 0x425D, 0xD750, 0, 0x4944, + 0, 0x677E, 0xD751, 0x3257, 0x677C, 0, 0x677A, 0x6771, + 0xD752, 0x676F, 0xD753, 0x6770, 0xD754, 0x3C63, 0x366C, 0x4377, + 0xD755, 0, 0xD756, 0x4651, 0, 0xD757, 0, 0xD758, + 0, 0x3151, 0, 0x6774, 0x6773, 0, 0xD759, 0xD75A, + 0, 0x6779, 0x6775, 0x6778, 0, 0xD75B, 0xD75C, 0, +}; +static const unsigned short utf8_to_euc_E88C[] = { + 0xD75D, 0xD75E, 0x4C50, 0x6777, 0x3258, 0x337D, 0x677B, 0xD75F, + 0xD760, 0x677D, 0xD761, 0xD762, 0, 0, 0x3754, 0, + 0, 0, 0, 0, 0, 0, 0x6823, 0x682C, + 0x682D, 0, 0, 0xD764, 0x302B, 0xD765, 0xD766, 0xD767, + 0, 0xD768, 0xD769, 0x6834, 0, 0, 0, 0, + 0x3071, 0, 0, 0x682B, 0xD76A, 0xD76B, 0xD76C, 0x682A, + 0xD76D, 0x6825, 0x6824, 0xD76E, 0x6822, 0x6821, 0x4363, 0xD76F, + 0x427B, 0x6827, 0xD770, 0, 0xD771, 0xD772, 0, 0, +}; +static const unsigned short utf8_to_euc_E88D[] = { + 0x6826, 0, 0xD773, 0xD774, 0xD775, 0x6829, 0, 0xD776, + 0, 0x4170, 0x3755, 0, 0, 0xD777, 0xD778, 0x3141, + 0x6828, 0xD779, 0x3953, 0xD83E, 0xD763, 0xD77A, 0xD77B, 0xD77C, + 0x4171, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xF45F, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xD77D, 0, 0, 0x683A, 0, 0x683B, 0, 0x3259, + 0xD77E, 0, 0, 0x322E, 0x6838, 0xD821, 0, 0xD822, +}; +static const unsigned short utf8_to_euc_E88E[] = { + 0xD823, 0, 0xD824, 0, 0xD825, 0x682E, 0xD826, 0x6836, + 0, 0x683D, 0x6837, 0, 0, 0xD827, 0x6835, 0, + 0, 0, 0xD828, 0x6776, 0xD829, 0xD82A, 0x6833, 0, + 0xD82B, 0xD82C, 0x682F, 0xD82D, 0xD82E, 0xD82F, 0x3450, 0x6831, + 0x683C, 0, 0x6832, 0, 0, 0, 0xD830, 0xD831, + 0x683E, 0xD832, 0x6830, 0x477C, 0xD833, 0xD84C, 0, 0, + 0, 0x4D69, 0, 0, 0, 0x6839, 0, 0, + 0, 0, 0, 0, 0, 0x684F, 0xD834, 0xD835, +}; +static const unsigned short utf8_to_euc_E88F[] = { + 0xD836, 0x6847, 0, 0, 0, 0x3F7B, 0, 0xD837, + 0, 0xD838, 0x3546, 0, 0x365D, 0, 0x6842, 0xD839, + 0xD83A, 0xD83B, 0, 0x325B, 0xD83C, 0, 0x3E54, 0, + 0x6845, 0, 0, 0, 0x3A5A, 0xD83D, 0, 0x4551, + 0x684A, 0, 0, 0, 0, 0, 0, 0, + 0xD83F, 0x4A6E, 0xD840, 0x6841, 0, 0, 0, 0x325A, + 0x3856, 0x4929, 0x684B, 0, 0x683F, 0, 0xD841, 0x6848, + 0xD842, 0xD843, 0, 0x6852, 0xD844, 0x6843, 0, 0, +}; +static const unsigned short utf8_to_euc_E890[] = { + 0, 0xD845, 0, 0x6844, 0x463A, 0, 0xD846, 0x6849, + 0, 0, 0xD847, 0x6846, 0x4B28, 0x684C, 0x3060, 0xD848, + 0, 0xD849, 0, 0x6840, 0, 0xD84A, 0, 0, + 0, 0xD84B, 0, 0, 0, 0, 0, 0, + 0x684E, 0, 0x684D, 0, 0, 0, 0, 0, + 0, 0x476B, 0x6854, 0, 0x685F, 0, 0, 0xD84D, + 0, 0x337E, 0, 0, 0, 0x6862, 0, 0, + 0x6850, 0xD84E, 0, 0, 0x6855, 0x4D6E, 0, 0, +}; +static const unsigned short utf8_to_euc_E891[] = { + 0, 0, 0, 0, 0, 0xD84F, 0x685E, 0xD850, + 0xD851, 0x4D55, 0xD852, 0, 0, 0xD853, 0x4E2A, 0xD854, + 0, 0xD855, 0xD856, 0, 0, 0, 0xD857, 0x4378, + 0xD858, 0xD859, 0xD85A, 0x336B, 0xD85B, 0, 0, 0, + 0xD85C, 0x4972, 0x6864, 0x4621, 0xD85D, 0xD85E, 0x3031, 0xD85F, + 0, 0x685D, 0xD860, 0x6859, 0x4172, 0x6853, 0x685B, 0x6860, + 0xD861, 0x472C, 0, 0xD862, 0xD863, 0x302A, 0xD864, 0x6858, + 0xD865, 0x6861, 0x4978, 0, 0xD866, 0xD867, 0, 0, +}; +static const unsigned short utf8_to_euc_E892[] = { + 0, 0xD868, 0x685C, 0, 0x6857, 0xD869, 0, 0, + 0, 0, 0, 0x3E55, 0, 0, 0, 0, + 0x3D2F, 0, 0xD86A, 0xD86B, 0x3C2C, 0xD86C, 0, 0, + 0, 0x4C58, 0, 0, 0x4947, 0, 0xD86D, 0x6867, + 0, 0x6870, 0, 0, 0, 0, 0xD86E, 0, + 0xD86F, 0xD870, 0xD871, 0, 0, 0x685A, 0, 0xD872, + 0, 0xD873, 0x3377, 0, 0xD874, 0, 0, 0, + 0x3E78, 0x6865, 0xD875, 0x686A, 0x4173, 0xD876, 0xD877, 0x6866, +}; +static const unsigned short utf8_to_euc_E893[] = { + 0xD878, 0x686D, 0xD879, 0, 0x435F, 0, 0x686E, 0xD87A, + 0xD87B, 0x4D56, 0x6863, 0x3338, 0xD87C, 0x6869, 0, 0xD87D, + 0x686C, 0x4C2C, 0, 0xD87E, 0, 0, 0x686F, 0, + 0, 0x6868, 0x686B, 0, 0xD921, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xD922, + 0, 0, 0xD923, 0, 0x4B29, 0, 0x4F21, 0xD924, + 0xD925, 0xD926, 0xD927, 0, 0x6873, 0, 0, 0xD928, + 0, 0, 0xD92A, 0xD92B, 0x687A, 0xD92C, 0, 0x6872, +}; +static const unsigned short utf8_to_euc_E894[] = { + 0x3C43, 0, 0xD92D, 0xD92E, 0, 0, 0x6851, 0xD92F, + 0, 0, 0, 0, 0xD930, 0, 0xD931, 0, + 0xD932, 0x4A4E, 0, 0x4C22, 0x6879, 0x6878, 0, 0x6874, + 0x6875, 0, 0x3136, 0, 0xD933, 0, 0xD934, 0x6877, + 0, 0x6871, 0xD935, 0xD936, 0xD937, 0xD938, 0x4455, 0xD939, + 0, 0, 0xD93A, 0xD93B, 0x6876, 0x307E, 0, 0xD93C, + 0, 0, 0xD929, 0xD93D, 0xD93E, 0x4222, 0xD93F, 0, + 0, 0, 0, 0, 0, 0x4A43, 0, 0xD940, +}; +static const unsigned short utf8_to_euc_E895[] = { + 0x687B, 0x6921, 0, 0x4859, 0, 0, 0xD941, 0, + 0x687E, 0x3E56, 0x3C49, 0x6923, 0, 0, 0x363E, 0xD942, + 0xD943, 0xD944, 0xD945, 0xD946, 0, 0x6924, 0xD947, 0x4979, + 0x687D, 0xD948, 0x6856, 0, 0xD949, 0xD94A, 0xD94B, 0xD94C, + 0xD94D, 0xD94E, 0xD94F, 0x687C, 0xD950, 0, 0, 0, + 0x4F4F, 0x4622, 0x4973, 0xD951, 0, 0x692B, 0, 0xD952, + 0, 0, 0, 0, 0, 0, 0, 0x6931, + 0, 0xD953, 0xD954, 0xD955, 0, 0xD956, 0x6932, 0xD957, +}; +static const unsigned short utf8_to_euc_E896[] = { + 0x6925, 0xD958, 0, 0, 0x4776, 0xD959, 0xD95A, 0x692F, + 0x6927, 0xD95B, 0x6929, 0xD95C, 0xD95D, 0, 0, 0xD95E, + 0x6933, 0x6928, 0, 0xD95F, 0x692C, 0, 0, 0x3172, + 0xD960, 0x4665, 0, 0x692D, 0x6930, 0xD961, 0, 0xD962, + 0xD963, 0, 0xD964, 0, 0x6926, 0xD965, 0x4126, 0xD966, + 0x692A, 0x3B27, 0x3F45, 0x3730, 0x4C74, 0xD974, 0x4C79, 0x3D72, + 0xF461, 0, 0, 0, 0xD967, 0, 0xD968, 0xD969, + 0xD96A, 0x6937, 0x6935, 0, 0xD96B, 0xD96C, 0xD96D, 0xD96E, +}; +static const unsigned short utf8_to_euc_E897[] = { + 0, 0x4F4E, 0xD96F, 0, 0, 0, 0, 0xD970, + 0, 0x6934, 0xD971, 0xD972, 0, 0x4D75, 0xD973, 0x6936, + 0x6938, 0, 0, 0, 0, 0x6939, 0, 0, + 0xD975, 0, 0xD976, 0, 0x693C, 0x693A, 0, 0xD977, + 0xD978, 0, 0, 0, 0x4623, 0x693B, 0xD979, 0, + 0xD97A, 0x484D, 0x692E, 0, 0, 0xD97B, 0, 0, + 0, 0, 0, 0xD97C, 0, 0, 0xD97D, 0x3D73, + 0, 0x693D, 0x6942, 0x4174, 0xD97E, 0, 0x6941, 0xDA21, +}; +static const unsigned short utf8_to_euc_E898[] = { + 0xDA22, 0, 0x6922, 0, 0xDA23, 0xDA24, 0x6943, 0x4149, + 0, 0, 0x693E, 0x6940, 0, 0xDA25, 0xDA26, 0, + 0xDA27, 0xDA28, 0xDA29, 0x693F, 0, 0, 0x5D31, 0x5D22, + 0xDA2A, 0xDA2B, 0x6945, 0xDA2C, 0, 0, 0xDA2D, 0, + 0, 0xDA2E, 0x6944, 0, 0, 0, 0, 0xDA2F, + 0, 0xDA30, 0, 0, 0, 0x4D76, 0, 0x623C, + 0x6946, 0, 0, 0, 0, 0, 0xDA31, 0, + 0xDA32, 0, 0xDA33, 0, 0xDA34, 0xDA35, 0, 0x6947, +}; +static const unsigned short utf8_to_euc_E899[] = { + 0xDA36, 0xB866, 0xDA37, 0, 0, 0, 0xDA38, 0, + 0, 0, 0, 0, 0, 0x6948, 0x3857, 0, + 0x3554, 0, 0xDA39, 0xDA3A, 0x694A, 0x515D, 0xDA3B, 0xDA3C, + 0xDA3D, 0xDA3E, 0x3575, 0, 0x4E3A, 0xDA3F, 0x3673, 0x694B, + 0xDA40, 0xDA41, 0xDA42, 0xDA43, 0xDA44, 0, 0, 0x694C, + 0, 0xDA45, 0, 0x436E, 0xDA46, 0, 0, 0xDA47, + 0, 0x694D, 0, 0, 0, 0xDA48, 0xDA49, 0xDA4A, + 0, 0x467A, 0xDA4B, 0x303A, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E89A[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0xDA6D, 0, 0x3263, 0x6952, 0x6953, 0xDA4C, 0, 0, + 0, 0xDA4D, 0, 0x694E, 0, 0x3B3D, 0xDA4E, 0, + 0xDA4F, 0, 0xDA50, 0, 0xDA51, 0, 0, 0, + 0, 0xDA52, 0, 0x694F, 0x4742, 0, 0xDA53, 0xDA54, + 0xDA55, 0x6950, 0x6951, 0x695B, 0, 0xDA56, 0, 0x6955, + 0x6958, 0xDA57, 0, 0xDA58, 0xDA59, 0xDA5A, 0x6954, 0xDA5B, + 0xDA5C, 0xDA5D, 0, 0, 0, 0, 0, 0xDA5E, +}; +static const unsigned short utf8_to_euc_E89B[] = { + 0xDA5F, 0xDA60, 0, 0xDA61, 0x6956, 0xDA62, 0x6957, 0x3C58, + 0, 0x6959, 0, 0x4341, 0, 0x3756, 0x3342, 0, + 0, 0xDA63, 0xDA64, 0, 0x695C, 0xDA65, 0, 0xDA66, + 0, 0x333F, 0xDA67, 0x6961, 0xDA68, 0, 0x695D, 0x6960, + 0xDA69, 0, 0, 0xDA6A, 0x483A, 0xDA6B, 0, 0xDA6C, + 0, 0x695E, 0, 0, 0x695F, 0x4948, 0x485A, 0x6962, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x427D, 0x696C, 0xDA6E, 0x6968, 0xDA6F, 0xDA70, 0x326B, 0, +}; +static const unsigned short utf8_to_euc_E89C[] = { + 0x6966, 0, 0x4B2A, 0x6967, 0xDA71, 0xDA72, 0x6964, 0xDA73, + 0x6965, 0x696A, 0x696D, 0xDA74, 0, 0x696B, 0xDA75, 0xDA76, + 0xDA77, 0x6969, 0x6963, 0xDA78, 0xDA79, 0, 0, 0, + 0x4358, 0xDA7A, 0x6974, 0, 0x4C2A, 0, 0xDA7B, 0xDA7C, + 0, 0xDA7D, 0, 0xDA7E, 0, 0x6972, 0, 0, + 0xDB21, 0x6973, 0, 0, 0, 0, 0xDB22, 0xDB23, + 0, 0xDB24, 0xDB25, 0, 0x696E, 0, 0, 0x6970, + 0, 0xDB26, 0xDB27, 0x6971, 0xDB28, 0xDB29, 0xDB2A, 0x696F, +}; +static const unsigned short utf8_to_euc_E89D[] = { + 0xDB2B, 0, 0, 0xDB2C, 0, 0xDB2D, 0, 0, + 0, 0x4066, 0, 0x4F39, 0x6978, 0xDB2E, 0x6979, 0, + 0, 0, 0, 0x6A21, 0, 0x3F2A, 0, 0x697B, + 0xDB2F, 0x697E, 0, 0, 0, 0xDB30, 0, 0x6976, + 0x6975, 0xDB31, 0, 0x6A22, 0xDB32, 0xDB33, 0x325C, 0, + 0x697C, 0, 0x6A23, 0, 0, 0, 0x697D, 0xDB34, + 0, 0xDB35, 0xDB36, 0, 0x697A, 0, 0x4433, 0, + 0x6977, 0, 0, 0xDB37, 0, 0, 0, 0x4768, +}; +static const unsigned short utf8_to_euc_E89E[] = { + 0, 0, 0x6A27, 0xDB38, 0xDB39, 0xDB3A, 0xDB3B, 0xDB3C, + 0xDB3D, 0xDB3E, 0, 0xDB3F, 0xDB40, 0x4D3B, 0, 0, + 0xDB41, 0, 0, 0xDB42, 0, 0xDB43, 0, 0xDB44, + 0xDB45, 0xDB46, 0, 0, 0, 0, 0xDB47, 0x6A26, + 0xDB48, 0, 0x6A25, 0xDB49, 0, 0, 0, 0xDB4A, + 0, 0, 0, 0x6A2E, 0xDB4B, 0xDB4C, 0xDB4D, 0x6A28, + 0, 0xDB4E, 0, 0x6A30, 0, 0xDB4F, 0, 0, + 0, 0, 0x4D66, 0x6A33, 0, 0x6A2A, 0xDB50, 0xDB51, +}; +static const unsigned short utf8_to_euc_E89F[] = { + 0x6A2B, 0xDB52, 0, 0, 0x6A2F, 0, 0x6A32, 0x6A31, + 0xDB53, 0xDB54, 0xDB55, 0x6A29, 0, 0, 0xDB56, 0, + 0x6A2C, 0, 0x6A3D, 0, 0, 0xDB57, 0xDB58, 0, + 0, 0xDB59, 0xDB5A, 0, 0xDB5B, 0, 0, 0xDB5C, + 0x6A36, 0, 0xDB5D, 0xDB5E, 0xDB5F, 0, 0, 0, + 0, 0, 0xDB60, 0xDB61, 0, 0xDB62, 0, 0x6A34, + 0, 0xDB63, 0x6A35, 0xDB64, 0, 0, 0x6A3A, 0x6A3B, + 0xDB65, 0x332A, 0xDB66, 0x3542, 0, 0, 0x6A39, 0xDB67, +}; +static const unsigned short utf8_to_euc_E8A0[] = { + 0, 0xDB68, 0, 0xDB69, 0, 0x6A24, 0xDB6A, 0xF464, + 0, 0xDB6B, 0xDB6C, 0xDB6D, 0, 0x6A38, 0x6A3C, 0x6A37, + 0xDB6E, 0x6A3E, 0xDB70, 0xDB71, 0xDB72, 0x6A40, 0x6A3F, 0, + 0xDB73, 0xDB6F, 0xDB74, 0xDB75, 0xDB76, 0, 0xDB77, 0xDB78, + 0, 0x6A42, 0x6A41, 0x695A, 0, 0, 0, 0x6A46, + 0xDB79, 0, 0, 0, 0, 0xDB7A, 0xDB7B, 0, + 0xDB7C, 0x6A43, 0xDB7D, 0, 0, 0xDB7E, 0x6A44, 0, + 0, 0x6A45, 0xDC21, 0x6A47, 0xDC22, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E8A1[] = { + 0x376C, 0xDC23, 0x6A49, 0xDC24, 0x6A48, 0xDC25, 0x3D30, 0, + 0xDC26, 0xDC27, 0xDC28, 0xDC29, 0x3954, 0x5E27, 0xDC2A, 0, + 0, 0xDC2B, 0x6A4A, 0x3D51, 0, 0xDC2C, 0xDC2D, 0x3339, + 0xDC2E, 0x6A4B, 0xDC2F, 0x3152, 0xDC30, 0x3E57, 0x6A4C, 0xDC31, + 0xDC32, 0x3955, 0x6A4D, 0x3061, 0xDC33, 0, 0, 0, + 0x493D, 0xDC34, 0, 0x6A4E, 0, 0, 0, 0, + 0x3F6A, 0xDC35, 0x6A55, 0, 0, 0x6A52, 0, 0x436F, + 0, 0xDC36, 0, 0xDC37, 0, 0x6A53, 0x6A50, 0x365E, +}; +static const unsigned short utf8_to_euc_E8A2[] = { + 0xDC38, 0x6A4F, 0x6A56, 0, 0, 0, 0, 0, + 0x3736, 0, 0, 0x425E, 0, 0x6A5C, 0, 0, + 0, 0, 0x6A58, 0, 0, 0, 0x4235, 0x6A57, + 0xDC39, 0x6A5A, 0xDC3A, 0xDC3B, 0xDC3C, 0, 0x6A51, 0xDC3D, + 0xDC3E, 0, 0x6A5B, 0, 0x6A5D, 0, 0, 0, + 0xDC3F, 0, 0xDC40, 0x486F, 0, 0, 0x6A59, 0, + 0x6A5E, 0x6A60, 0, 0, 0x3853, 0x6A54, 0, 0x3041, + 0, 0, 0xDC41, 0, 0, 0xDC42, 0xDC43, 0x6A5F, +}; +static const unsigned short utf8_to_euc_E8A3[] = { + 0xDC44, 0x3A5B, 0x4E76, 0x6A61, 0x6A62, 0x4175, 0, 0, + 0, 0, 0xDC45, 0xDC46, 0xDC47, 0xDC48, 0xDC49, 0x4E22, + 0, 0xDC4A, 0xDC4B, 0xDC4C, 0x6A63, 0x4D35, 0, 0, + 0x6A64, 0x6A65, 0, 0xDC4D, 0x4A64, 0x6A66, 0xDC4E, 0x3A40, + 0, 0x4E23, 0, 0, 0, 0, 0, 0xDC4F, + 0x6A6B, 0, 0, 0, 0, 0, 0, 0xDC50, + 0xDC51, 0xDC52, 0x6A6C, 0x3E58, 0x6A6A, 0xDC53, 0, 0xDC54, + 0x4D67, 0x6A67, 0, 0, 0x6A69, 0x403D, 0x3F7E, 0, +}; +static const unsigned short utf8_to_euc_E8A4[] = { + 0, 0xDC55, 0x6A68, 0, 0x6A6D, 0, 0xDC56, 0x4A23, + 0, 0, 0x6A6F, 0, 0x6A6E, 0xDC57, 0xDC58, 0xDC59, + 0x336C, 0, 0x4B2B, 0x6A70, 0, 0xDC5A, 0xDC5B, 0, + 0xDC5C, 0xDC5D, 0xDC5E, 0, 0xDC5F, 0x6A7C, 0x6A72, 0, + 0xDC60, 0, 0, 0, 0, 0x6A73, 0xDC61, 0xDC62, + 0xDC63, 0, 0x6A74, 0x6A75, 0, 0, 0, 0, + 0xDC64, 0xDC65, 0xDC66, 0, 0, 0xDC67, 0x6A79, 0, + 0x6A7A, 0xDC68, 0xDC69, 0x6A78, 0, 0, 0xDC6A, 0, +}; +static const unsigned short utf8_to_euc_E8A5[] = { + 0xDC6B, 0x6A76, 0xDC6C, 0x6A71, 0x6A77, 0xDC6D, 0xDC6E, 0, + 0, 0xDC6F, 0, 0, 0x6A7B, 0x7037, 0, 0xDC70, + 0, 0, 0xDC71, 0, 0, 0, 0x3228, 0xDC72, + 0, 0, 0xDC73, 0xDC74, 0xDC75, 0, 0x6A7E, 0x365F, + 0x6A7D, 0xDC76, 0xDC77, 0xDC78, 0x6B22, 0, 0x6B21, 0, + 0, 0, 0x6B24, 0xDC79, 0, 0x6B23, 0xDC7A, 0x6B25, + 0xDC7B, 0, 0x3D31, 0xDC7C, 0x6B26, 0xDC7D, 0, 0x6B27, + 0, 0, 0xDC7E, 0xDD21, 0xDD22, 0xDD23, 0x6B28, 0x403E, +}; +static const unsigned short utf8_to_euc_E8A6[] = { + 0, 0x4D57, 0, 0x6B29, 0, 0, 0x4A24, 0x4746, + 0x6B2A, 0xDD24, 0x6B2B, 0x382B, 0, 0xDD25, 0, 0x352C, + 0xDD26, 0, 0, 0x6B2C, 0xDD27, 0xDD28, 0x3B6B, 0x4741, + 0x6B2D, 0, 0x3350, 0xDD29, 0xDD2A, 0, 0, 0xDD2B, + 0xDD2C, 0x6B2E, 0, 0, 0, 0xDD2D, 0x6B30, 0x4D77, + 0, 0x6B2F, 0x3F46, 0, 0x6B31, 0, 0, 0x6B32, + 0xDD2E, 0, 0x6B33, 0x3451, 0xDD2F, 0xDD30, 0xDD31, 0xDD32, + 0, 0, 0x6B34, 0, 0xDD33, 0x6B35, 0, 0x6B36, +}; +static const unsigned short utf8_to_euc_E8A7[] = { + 0x6B37, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x3351, 0, 0xDD34, 0xDD35, 0xDD36, 0xDD37, + 0xDD38, 0, 0x6B38, 0, 0x6B39, 0x6B3A, 0, 0, + 0, 0, 0, 0x3272, 0, 0xDD39, 0x3F28, 0x6B3B, + 0, 0xDD3A, 0, 0xDD3B, 0, 0xDD3C, 0, 0, + 0, 0xDD3D, 0, 0xDD3E, 0x6B3C, 0, 0xDD3F, 0, + 0x6B3D, 0xDD40, 0, 0, 0, 0xDD41, 0, 0xDD42, +}; +static const unsigned short utf8_to_euc_E8A8[] = { + 0x3840, 0, 0x447B, 0x6B3E, 0xDD43, 0xDD44, 0, 0xDD45, + 0x3757, 0, 0x3F56, 0, 0x6B41, 0, 0x4624, 0xDD46, + 0x6B40, 0xDD47, 0xDD48, 0x3731, 0xDD49, 0xDD4A, 0x6B3F, 0x4277, + 0x352D, 0, 0, 0x6B42, 0, 0x6B43, 0xDD4B, 0x3E59, + 0xDD4C, 0, 0xDD4D, 0x376D, 0xDD4E, 0x6B44, 0xDD4F, 0, + 0, 0, 0x4B2C, 0xDD50, 0xDD51, 0x405F, 0, 0xDD52, + 0, 0x3576, 0, 0x4C75, 0x414A, 0xDD53, 0x6B45, 0xDD54, + 0, 0, 0x3F47, 0x4370, 0x3E5A, 0xDD55, 0xDD56, 0, +}; +static const unsigned short utf8_to_euc_E8A9[] = { + 0xDD57, 0x6B46, 0, 0xDD58, 0, 0xDD59, 0x6B49, 0xDD5A, + 0x6B4A, 0xDD5B, 0, 0, 0, 0xDD5C, 0xDD5D, 0, + 0x3A3E, 0x4242, 0x6B48, 0xDD5E, 0x3E5B, 0x493E, 0xDD5F, 0xDD60, + 0xDD61, 0, 0, 0x6B47, 0xDD62, 0xDD63, 0x3B6C, 0, + 0x3153, 0xDD64, 0x6B4E, 0x3758, 0, 0xDD65, 0x3B6E, 0xDD66, + 0, 0x3B6D, 0, 0x4F4D, 0x6B4D, 0x6B4C, 0x4127, 0, + 0x354D, 0x4F43, 0x333A, 0x3E5C, 0, 0xDD67, 0xDD68, 0xDD69, + 0, 0xDD6A, 0xDD6B, 0xDD6C, 0x6B4B, 0, 0xDD6D, 0xDD6E, +}; +static const unsigned short utf8_to_euc_E8AA[] = { + 0xDD6F, 0, 0x6B50, 0xDD70, 0x6B51, 0x6B4F, 0xDD71, 0x3858, + 0, 0x4D40, 0, 0xDD72, 0x3B6F, 0x4727, 0, 0xDD73, + 0xDD74, 0x6B54, 0xDD75, 0x4040, 0, 0x4342, 0xDD76, 0xDD77, + 0x4D36, 0xDD78, 0x6B57, 0, 0, 0, 0x386C, 0xDD79, + 0x403F, 0x6B53, 0, 0x6B58, 0x386D, 0x6B55, 0x6B56, 0xDD7A, + 0x6B52, 0xDD7B, 0, 0, 0x4062, 0x4649, 0xDD7C, 0xDD7D, + 0x432F, 0, 0x325D, 0xDD7E, 0, 0, 0xDE21, 0xDE22, + 0, 0x4870, 0, 0xDE23, 0x3543, 0, 0xDE24, 0x4434, +}; +static const unsigned short utf8_to_euc_E8AB[] = { + 0, 0, 0x6B5B, 0xDE25, 0x6B59, 0, 0xDE26, 0x434C, + 0xDE27, 0xDE28, 0xDE29, 0x4041, 0x3452, 0x6B5A, 0, 0x3F5B, + 0, 0xDE2A, 0x4E4A, 0xDE2B, 0xDE2C, 0xDE2D, 0x4F40, 0xDE2E, + 0, 0, 0x6B5C, 0x6B67, 0x4435, 0xDE2F, 0x6B66, 0xDE30, + 0x6B63, 0x6B6B, 0x6B64, 0, 0x6B60, 0, 0x447C, 0x6B5F, + 0, 0, 0, 0x6B5D, 0xDE31, 0x4D21, 0x3B70, 0, + 0xDE32, 0x6B61, 0, 0x6B5E, 0xDE33, 0xDE34, 0xDE35, 0x6B65, + 0x3D74, 0, 0x3841, 0, 0xDE36, 0, 0x427A, 0xDE37, +}; +static const unsigned short utf8_to_euc_E8AC[] = { + 0x4B45, 0x315A, 0x3062, 0, 0x4625, 0xDE38, 0xDE39, 0x6B69, + 0, 0, 0xDE3F, 0xDE3A, 0x6B68, 0, 0x4666, 0, + 0x6B6D, 0xDE3B, 0, 0, 0x6B62, 0, 0x6B6C, 0x6B6E, + 0, 0x382C, 0x6B6A, 0x3956, 0xDE3C, 0x3C55, 0xDE3D, 0xDE3E, + 0x6B6F, 0x4D58, 0, 0, 0, 0, 0x6B72, 0, + 0x6B75, 0, 0, 0x6B73, 0x4935, 0xDE40, 0, 0, + 0xDE41, 0, 0, 0x6B70, 0, 0, 0, 0xDE42, + 0, 0x3660, 0, 0, 0xDE43, 0, 0x6B74, 0, +}; +static const unsigned short utf8_to_euc_E8AD[] = { + 0, 0x6B76, 0xDE44, 0xDE45, 0xDE46, 0xDE47, 0xDE48, 0, + 0xDE49, 0x6B7A, 0, 0, 0x6B77, 0xDE4E, 0x6B79, 0x6B78, + 0, 0, 0xDE4A, 0xDE4B, 0xDE4C, 0, 0x6B7B, 0, + 0x3C31, 0xDE4D, 0x6B7D, 0x6B7C, 0x4968, 0, 0xDE4F, 0x6C21, + 0, 0, 0, 0xDE50, 0, 0, 0x3759, 0, + 0, 0, 0, 0x6B7E, 0x6C22, 0xDE51, 0, 0x6C23, + 0x3544, 0x6641, 0x3E79, 0, 0x6C24, 0, 0xDE52, 0x386E, + 0xDE53, 0xDE54, 0, 0, 0xDE55, 0x6C25, 0xDE56, 0xF466, +}; +static const unsigned short utf8_to_euc_E8AE[] = { + 0x6C26, 0xDE57, 0, 0x3B3E, 0xDE58, 0xDE59, 0, 0, + 0, 0, 0x5A4E, 0xDE5A, 0x6C27, 0xDE5B, 0x6C28, 0xDE5C, + 0x3D32, 0, 0x6C29, 0x6C2A, 0xDE5D, 0xDE5E, 0x6C2B, 0, + 0, 0x6C2C, 0x6C2D, 0, 0xDE5F, 0, 0xDE60, 0xDE61, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E8B0[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x432B, + 0xDE62, 0xDE63, 0x6C2E, 0, 0, 0xDE64, 0xDE65, 0x6C30, +}; +static const unsigned short utf8_to_euc_E8B1[] = { + 0, 0x6C2F, 0, 0, 0, 0xDE66, 0x4626, 0xDE67, + 0x6C31, 0xDE68, 0x4B2D, 0xDE69, 0x6C32, 0, 0x6C33, 0xDE6A, + 0x6C34, 0xDE6B, 0, 0xDE6C, 0xDE6D, 0x6C35, 0, 0xDE6E, + 0xDE6F, 0xDE72, 0x465A, 0xDE70, 0, 0xDE71, 0, 0, + 0, 0x3E5D, 0x6C36, 0xDE73, 0xDE74, 0, 0xDE75, 0, + 0xDE76, 0xDE77, 0x396B, 0x502E, 0x6C37, 0xDE78, 0, 0, + 0, 0, 0, 0xDE79, 0, 0xDE7A, 0xDE7B, 0, + 0x6C38, 0x493F, 0x6C39, 0xDE7C, 0x6C41, 0, 0xDE7D, 0, +}; +static const unsigned short utf8_to_euc_E8B2[] = { + 0, 0, 0x6C3A, 0, 0, 0x6C3C, 0xDE7E, 0xDF21, + 0, 0x6C3B, 0x6C3D, 0xDF22, 0x4B46, 0x6C3E, 0x6C3F, 0, + 0xDF23, 0, 0xDF24, 0xDF25, 0x6C40, 0, 0, 0, + 0x6C42, 0xDF26, 0, 0xDF27, 0xDF28, 0x332D, 0x4467, 0, + 0x4969, 0x3A62, 0x3957, 0, 0xDF29, 0, 0, 0x494F, + 0x325F, 0x484E, 0x6C45, 0x3453, 0x4055, 0x6C44, 0x6C49, 0x4379, + 0x4C63, 0, 0x6C47, 0x6C48, 0x352E, 0, 0x6C4A, 0x4763, + 0x425F, 0xDF2A, 0xDF2B, 0x4871, 0x453D, 0x6C46, 0, 0x4B47, +}; +static const unsigned short utf8_to_euc_E8B3[] = { + 0x326C, 0x6C4C, 0x4F28, 0x4442, 0x4F45, 0xDF2C, 0xDF2D, 0x3B71, + 0x6C4B, 0xDF2E, 0x4231, 0xDF2F, 0, 0x6C5C, 0x4128, 0xDF30, + 0, 0x4678, 0, 0x4950, 0, 0xDF32, 0xDF31, 0, + 0, 0xDF33, 0x6C4F, 0x3B3F, 0x3B72, 0xDF34, 0x3E5E, 0, + 0x4765, 0xDF35, 0x382D, 0x6C4E, 0x6C4D, 0, 0x496A, 0, + 0xDF36, 0, 0x3C41, 0, 0xDF37, 0x4552, 0, 0xDF38, + 0xDF39, 0, 0xDF3A, 0, 0xF467, 0xDF3B, 0, 0xDF3C, + 0xDF3D, 0, 0x6C51, 0x6C52, 0x3958, 0x6C50, 0xDF3E, 0xDF3F, +}; +static const unsigned short utf8_to_euc_E8B4[] = { + 0, 0xDF40, 0, 0xDF41, 0x6C53, 0x6C54, 0, 0x6C56, + 0x4223, 0xDF42, 0x6C55, 0x3466, 0, 0x6C58, 0, 0x6C57, + 0x6C59, 0, 0xDF43, 0x6C5B, 0x6C5D, 0, 0x6C5E, 0xDF44, + 0, 0, 0, 0xDF45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E8B5[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x4056, 0xDF46, 0x3C4F, 0x6C5F, + 0, 0xDF47, 0, 0x3352, 0xDF48, 0x6C60, 0xDF49, 0, + 0x4176, 0x6C61, 0, 0x6C62, 0x496B, 0, 0xF468, 0x352F, + 0, 0, 0, 0, 0, 0, 0, 0xDF4A, +}; +static const unsigned short utf8_to_euc_E8B6[] = { + 0, 0x6C63, 0xDF4B, 0, 0xDF4C, 0x4436, 0, 0, + 0xDF4D, 0, 0x315B, 0, 0, 0xDF4E, 0, 0, + 0xDF4F, 0xDF50, 0, 0, 0, 0xDF51, 0, 0, + 0, 0x6C64, 0, 0, 0, 0, 0xDF52, 0xDF53, + 0xDF54, 0, 0, 0x3C71, 0, 0, 0xDF55, 0, + 0x3F76, 0, 0, 0xDF56, 0xDF57, 0, 0, 0xDF58, + 0, 0, 0xDF59, 0x422D, 0, 0xDF5A, 0, 0xDF5B, + 0, 0xDF5C, 0x6C67, 0xDF5D, 0xDF6F, 0, 0x6C66, 0, +}; +static const unsigned short utf8_to_euc_E8B7[] = { + 0xDF5E, 0, 0x6C65, 0, 0, 0xDF5F, 0xDF60, 0xDF61, + 0xDF62, 0, 0xDF63, 0x6C6D, 0x6C6B, 0, 0xDF64, 0x6C68, + 0, 0xDF65, 0, 0, 0xDF66, 0xDF67, 0x6C6A, 0xDF68, + 0, 0xDF69, 0x6C69, 0x6C6C, 0, 0x3577, 0, 0x6C70, + 0, 0x4057, 0, 0x6C71, 0xDF6A, 0xDF6B, 0, 0xDF6C, + 0x3859, 0, 0x6C6E, 0x6C6F, 0xDF6D, 0, 0, 0x4F29, + 0xDF6E, 0xDF70, 0xDF71, 0x4437, 0xDF72, 0x4129, 0, 0, + 0, 0, 0, 0, 0x6C72, 0xDF73, 0, 0x6C75, +}; +static const unsigned short utf8_to_euc_E8B8[] = { + 0, 0xDF74, 0, 0, 0xDF75, 0xDF76, 0xDF77, 0, + 0x6C73, 0x6C74, 0x4D59, 0xDF78, 0, 0, 0, 0x4627, + 0x6C78, 0xDF79, 0, 0, 0xDF7A, 0, 0xDF7B, 0, + 0, 0, 0, 0, 0, 0x6C76, 0x6C77, 0x6C79, + 0xDF7C, 0xDF7D, 0xDF7E, 0xE021, 0, 0, 0xE022, 0xE023, + 0, 0, 0x6D29, 0, 0, 0, 0, 0, + 0x6C7C, 0xE024, 0, 0xE025, 0x6C7D, 0x6C7B, 0xE026, 0xE027, + 0xE028, 0xE029, 0, 0, 0, 0xE02A, 0, 0, +}; +static const unsigned short utf8_to_euc_E8B9[] = { + 0xE02B, 0xE02C, 0x6C7A, 0, 0x447D, 0, 0, 0x6D21, + 0x6D25, 0x6D22, 0x6C7E, 0xE02D, 0x6D23, 0xE02E, 0xE02F, 0xE030, + 0x6D24, 0, 0, 0, 0xE031, 0x6D2B, 0, 0, + 0, 0x6D26, 0, 0xE032, 0xE033, 0xE034, 0xE035, 0x4058, + 0x6D28, 0xE036, 0xE037, 0x6D2A, 0x6D27, 0, 0, 0, + 0, 0xE038, 0, 0, 0xE039, 0xE03A, 0, 0xE03B, + 0xE03C, 0xE03D, 0x6D2D, 0, 0x3D33, 0, 0x6D2C, 0, + 0, 0xE03E, 0xE03F, 0xE040, 0x6D2E, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E8BA[] = { + 0, 0x6D2F, 0xE041, 0xE042, 0x6D32, 0x6D31, 0, 0x6D30, + 0, 0xE043, 0x6D34, 0x6D33, 0, 0x4C76, 0, 0, + 0xE044, 0x6D36, 0xE045, 0x6D35, 0x6D37, 0xE046, 0, 0, + 0, 0x6D38, 0xE047, 0xE048, 0, 0xE049, 0xE04A, 0, + 0, 0x6D3A, 0xE04B, 0, 0, 0, 0, 0xE04C, + 0, 0xE04D, 0x6D39, 0x3F48, 0x6D3B, 0xE04E, 0xE04F, 0x366D, + 0x6D3C, 0x6D3E, 0, 0xE050, 0, 0xE051, 0, 0, + 0, 0, 0xE052, 0xE053, 0, 0, 0x6D3F, 0, +}; +static const unsigned short utf8_to_euc_E8BB[] = { + 0xE054, 0xE055, 0, 0xE056, 0xE057, 0x6D40, 0x6D3D, 0xE058, + 0x6D41, 0, 0x3C56, 0x6D42, 0x3530, 0x3733, 0, 0xE059, + 0, 0xE05A, 0x382E, 0, 0xE05B, 0, 0, 0, + 0, 0, 0, 0x6D43, 0xE05C, 0, 0, 0x4670, + 0, 0, 0x453E, 0x6D44, 0, 0, 0, 0, + 0xE05D, 0, 0, 0x6D47, 0, 0xE064, 0xE05E, 0, + 0xE05F, 0xE060, 0, 0, 0, 0, 0, 0xE061, + 0x3C34, 0xE062, 0xE063, 0x6D46, 0x6D45, 0x375A, 0x6D48, 0, +}; +static const unsigned short utf8_to_euc_E8BC[] = { + 0xE065, 0, 0xE066, 0x3353, 0, 0x6D4A, 0, 0xE067, + 0xE068, 0x3A5C, 0x6D49, 0, 0x6D52, 0, 0, 0xE069, + 0xE06A, 0, 0x6D4C, 0x6D4E, 0x4A65, 0x6D4B, 0xE06B, 0xE06C, + 0xE06D, 0x6D4D, 0, 0x6D51, 0x6D4F, 0x3531, 0xE06E, 0x6D50, + 0xE06F, 0xE070, 0, 0xE071, 0, 0xE072, 0x6D53, 0xE073, + 0xE074, 0x475A, 0x4E58, 0, 0xE075, 0xE076, 0xE077, 0x3D34, + 0, 0, 0, 0x6D54, 0xE078, 0xE079, 0xE07A, 0xE07B, + 0x4D22, 0x6D56, 0xE07C, 0x6D55, 0, 0, 0x6D59, 0x4D41, +}; +static const unsigned short utf8_to_euc_E8BD[] = { + 0xE07D, 0xE07E, 0x6D58, 0xE121, 0x336D, 0x6D57, 0x6D5C, 0xE122, + 0, 0x6D5B, 0, 0, 0x6D5A, 0x4532, 0x6D5D, 0xE123, + 0, 0xE124, 0xE125, 0xE126, 0xE127, 0xE128, 0, 0x6D5E, + 0xE129, 0, 0, 0, 0x6D5F, 0xE12A, 0xE12B, 0x396C, + 0, 0x3725, 0x6D60, 0x6D61, 0x6D62, 0xE12C, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E8BE[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x3F49, 0x6D63, 0xE12D, 0x3C2D, 0x6D64, + 0xE12E, 0xE12F, 0, 0x6D65, 0xE130, 0xE131, 0xE132, 0x5221, + 0x517E, 0, 0, 0, 0, 0x6D66, 0x6570, 0x6D67, + 0x4324, 0x3F2B, 0x4740, 0, 0, 0xE133, 0xE134, 0x6D68, + 0xE135, 0, 0x4A55, 0x4454, 0x397E, 0, 0xE136, 0x4329, +}; +static const unsigned short utf8_to_euc_E8BF[] = { + 0xE137, 0xE138, 0x312A, 0, 0x4B78, 0x3F57, 0xE139, 0, + 0, 0, 0xE13A, 0xE13B, 0, 0xE13C, 0x375E, 0, + 0xE13D, 0x3661, 0xE13E, 0xE13F, 0x4A56, 0xE140, 0, 0, + 0, 0, 0x6D69, 0, 0, 0, 0, 0, + 0xE141, 0, 0x6D6B, 0xE142, 0xE143, 0x6D6A, 0x3260, 0, + 0xE144, 0x4676, 0x6D6C, 0x4777, 0, 0x4533, 0xE145, 0x6D6D, + 0x3D52, 0xE146, 0, 0, 0x6D6F, 0xE147, 0xE148, 0x4C42, + 0x6D7E, 0x6D71, 0x6D72, 0xE149, 0, 0x4449, 0xE14A, 0, +}; +static const unsigned short utf8_to_euc_E980[] = { + 0x4260, 0x4177, 0xE14B, 0x4628, 0xE14C, 0x6D70, 0x3555, 0, + 0xE14D, 0, 0, 0x6D79, 0xE14E, 0x6D76, 0x6E25, 0x4629, + 0x4360, 0x6D73, 0, 0x447E, 0x4553, 0x6D74, 0x6D78, 0x3F60, + 0xE14F, 0x4767, 0x444C, 0xE150, 0, 0x4042, 0x6D77, 0x422E, + 0x4224, 0x6D75, 0x3029, 0x4F22, 0, 0, 0, 0x6D7A, + 0xE151, 0xE152, 0xE154, 0, 0xE155, 0xE156, 0x4261, 0xE153, + 0, 0x3D35, 0x3F4A, 0xE157, 0xE158, 0x6D7C, 0x6D7B, 0xE159, + 0x306F, 0x6D7D, 0, 0, 0x492F, 0, 0x6E27, 0xE15A, +}; +static const unsigned short utf8_to_euc_E981[] = { + 0, 0x465B, 0x3F6B, 0xE15B, 0xE15C, 0x4359, 0, 0x3678, + 0, 0x6E26, 0x4D37, 0x313F, 0xE15D, 0x4A57, 0x3261, 0x6E21, + 0x6E22, 0x6E23, 0x6E24, 0x463B, 0x4323, 0x3063, 0x6E28, 0, + 0x6E29, 0x7423, 0, 0xE15E, 0x423D, 0xE15F, 0x6E2A, 0, + 0x3173, 0x414C, 0xE160, 0x382F, 0, 0x4D5A, 0xE161, 0xE162, + 0x6E2B, 0x452C, 0, 0, 0xE163, 0x4178, 0x3C57, 0x6E2C, + 0xE164, 0, 0x6E2F, 0, 0xE165, 0x3D65, 0x6E2D, 0x412B, + 0x412A, 0xE166, 0x3064, 0, 0x4E4B, 0x6E31, 0, 0x4872, +}; +static const unsigned short utf8_to_euc_E982[] = { + 0x6E33, 0x6E32, 0x6E30, 0x6364, 0x3454, 0xE167, 0, 0x6D6E, + 0xE168, 0x6E35, 0x6E34, 0xE169, 0xE16A, 0, 0xE16B, 0x6E36, + 0xE16C, 0x4D38, 0, 0, 0, 0xE16D, 0, 0xE16E, + 0xE16F, 0xE170, 0, 0xE171, 0, 0, 0, 0, + 0xE172, 0xE173, 0xE174, 0x4661, 0, 0xE175, 0x4B2E, 0, + 0x6E37, 0, 0x3C59, 0, 0, 0, 0, 0x6E38, + 0xE176, 0x6E39, 0xE177, 0xE178, 0xE179, 0x6E3A, 0xE17A, 0, + 0x4521, 0, 0, 0, 0, 0xE17B, 0xE17D, 0, +}; +static const unsigned short utf8_to_euc_E983[] = { + 0, 0x306A, 0, 0xE17E, 0xE221, 0xE222, 0, 0xE223, + 0xE224, 0, 0x3959, 0, 0xE17C, 0, 0x4F3A, 0, + 0, 0, 0xE22D, 0, 0, 0xE225, 0, 0xE226, + 0xE227, 0xE228, 0, 0x6E3E, 0xE229, 0xE22A, 0xF46C, 0xE22B, + 0, 0x3734, 0x6E3B, 0, 0x6E3C, 0xE22C, 0, 0, + 0x4974, 0, 0, 0xE22F, 0, 0x3354, 0, 0xE230, + 0xE231, 0, 0, 0, 0xE232, 0x4D39, 0xE22E, 0x363F, + 0, 0, 0, 0, 0, 0x4554, 0xE233, 0xE234, +}; +static const unsigned short utf8_to_euc_E984[] = { + 0xE235, 0, 0x6E3F, 0, 0xE236, 0xE237, 0xE238, 0, + 0xE239, 0, 0, 0, 0, 0xE23A, 0, 0, + 0xE23B, 0, 0x6E40, 0, 0xE23C, 0xF46E, 0xE23D, 0xE23E, + 0xE23F, 0x6E41, 0xE240, 0, 0xE241, 0, 0xE242, 0, + 0xE243, 0, 0xE245, 0xE246, 0, 0xE244, 0, 0xE247, + 0, 0xE248, 0, 0, 0, 0x4522, 0xE249, 0xE24A, + 0x6E43, 0xE24B, 0x6E42, 0, 0xE24C, 0, 0xE24D, 0xE24E, + 0, 0xE24F, 0xE250, 0, 0xE251, 0xE252, 0, 0, +}; +static const unsigned short utf8_to_euc_E985[] = { + 0, 0, 0, 0xE253, 0, 0, 0, 0xE254, + 0xE255, 0x4653, 0x6E44, 0x3D36, 0x3C60, 0x475B, 0x4371, 0xE256, + 0, 0, 0x3C72, 0xE257, 0x3F6C, 0, 0x6E45, 0xE258, + 0x6E46, 0xE259, 0xE25A, 0xE25B, 0, 0, 0, 0, + 0, 0xE25C, 0x3F5D, 0x6E47, 0xE25D, 0x6E48, 0, 0xE25E, + 0, 0x6E49, 0x4D6F, 0, 0x3D37, 0xE25F, 0, 0, + 0, 0, 0x6E4B, 0x6E4A, 0xE260, 0x395A, 0, 0x3973, + 0x3B40, 0xE261, 0xE262, 0xE263, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E986[] = { + 0, 0xE264, 0x6E4E, 0xE265, 0, 0xE266, 0xE267, 0x3D66, + 0, 0x6E4D, 0xE268, 0x6E4C, 0, 0x4269, 0xE269, 0, + 0x386F, 0xE26A, 0x4043, 0xE26B, 0xE26C, 0xE26D, 0, 0x4830, + 0xE26E, 0, 0, 0, 0x3D39, 0, 0xE26F, 0, + 0, 0xE270, 0x6E4F, 0, 0x3E5F, 0, 0xE271, 0, + 0xE272, 0, 0x6E52, 0x6E50, 0xE273, 0xE274, 0xE275, 0x6E51, + 0xE276, 0xE277, 0xE278, 0xE279, 0x6E54, 0x6E53, 0xE27A, 0, + 0x3E7A, 0, 0x6E55, 0xE27B, 0xE27C, 0xE27D, 0, 0xE27E, +}; +static const unsigned short utf8_to_euc_E987[] = { + 0x6E56, 0x6E57, 0xE321, 0xE322, 0, 0xE323, 0x4850, 0x3A53, + 0x3C61, 0x6E58, 0, 0x6E59, 0x4E24, 0x3D45, 0x4C6E, 0x4E4C, + 0x6E5A, 0x3662, 0, 0xE324, 0xE325, 0, 0x6E5B, 0xE326, + 0x4523, 0xE327, 0xE328, 0x6E5E, 0x3378, 0x3F4B, 0xE329, 0x6E5C, + 0, 0x6E5D, 0, 0x4460, 0xE32A, 0xE32B, 0x4B55, 0x367C, + 0, 0xE32C, 0xE32D, 0, 0xE32E, 0xE32F, 0xE330, 0xE331, + 0xE332, 0xE333, 0, 0, 0, 0x6E60, 0x6E61, 0xE334, + 0, 0xE335, 0, 0xE336, 0x6E5F, 0xE337, 0, 0x6E63, +}; +static const unsigned short utf8_to_euc_E988[] = { + 0xE338, 0xE339, 0, 0, 0xE33A, 0xE33B, 0xE33C, 0xE33D, + 0, 0xE33E, 0xE33F, 0, 0xE340, 0x465F, 0x3343, 0, + 0xE341, 0x6E67, 0xE342, 0xE343, 0x6E64, 0x6E66, 0xE344, 0, + 0xE345, 0, 0, 0, 0xE346, 0xE347, 0x6E62, 0, + 0, 0, 0, 0xE348, 0xE349, 0xE34A, 0xE34B, 0, + 0xE34C, 0x6F4F, 0, 0, 0x6E65, 0, 0xE34D, 0xE34E, + 0xE34F, 0, 0, 0xE350, 0x4E6B, 0xE351, 0xE352, 0x385A, + 0xE353, 0xE354, 0xE355, 0, 0xE356, 0, 0xE357, 0x6E6F, +}; +static const unsigned short utf8_to_euc_E989[] = { + 0xE358, 0, 0xE359, 0xE35A, 0x4534, 0x6E6A, 0xE35B, 0xE35C, + 0x6E6D, 0x6E6B, 0xE35D, 0x6E70, 0, 0xE35E, 0xE35F, 0xE360, + 0x6E71, 0xE361, 0, 0, 0, 0, 0, 0x6E69, + 0xE362, 0xE363, 0x6E76, 0x3174, 0xE364, 0xE365, 0x6E68, 0, + 0xE366, 0xE367, 0x482D, 0, 0x6E6C, 0xE368, 0x3E60, 0xE369, + 0xE36A, 0xE36B, 0, 0, 0, 0, 0xE36C, 0xE36D, + 0xE36E, 0x395B, 0, 0, 0, 0xE36F, 0xE370, 0xE371, + 0xE372, 0xE373, 0, 0xE374, 0xE375, 0xE376, 0x4B48, 0xE377, +}; +static const unsigned short utf8_to_euc_E98A[] = { + 0x3664, 0, 0, 0x3D46, 0, 0x463C, 0, 0, + 0xE378, 0xE379, 0xE37A, 0, 0, 0xE37B, 0xE37C, 0, + 0, 0x412D, 0xE37D, 0x6E74, 0, 0x6E6E, 0x6E73, 0xE37E, + 0x4C43, 0xE421, 0x4438, 0x6E75, 0x6E72, 0, 0, 0xE422, + 0xE423, 0, 0, 0, 0xE424, 0xE425, 0, 0xE426, + 0xE427, 0, 0, 0xE428, 0, 0x412C, 0, 0xE429, + 0, 0, 0xE42A, 0, 0, 0, 0xE42B, 0x6E79, + 0xE42C, 0x6E78, 0xE42D, 0xE42E, 0xE42F, 0xE430, 0, 0xE431, +}; +static const unsigned short utf8_to_euc_E98B[] = { + 0xE432, 0xE433, 0xE434, 0xE435, 0, 0xE436, 0xE437, 0xE438, + 0xE439, 0, 0, 0xE43A, 0xE43B, 0xE43C, 0xE43D, 0x6E77, + 0xE43E, 0, 0x4B2F, 0xE43F, 0, 0xE440, 0, 0xE441, + 0xE442, 0xE443, 0, 0, 0xE444, 0xE445, 0, 0xE446, + 0xE447, 0xE448, 0, 0xE449, 0x3D7B, 0xE44A, 0, 0xE44B, + 0xE44C, 0x6E7A, 0x4A5F, 0, 0xE44D, 0x3154, 0xE44E, 0, + 0xE44F, 0, 0x4946, 0x4372, 0, 0, 0, 0, + 0x3578, 0xE450, 0x6E7C, 0xE451, 0x395D, 0, 0, 0xE452, +}; +static const unsigned short utf8_to_euc_E98C[] = { + 0xE453, 0, 0xE454, 0, 0, 0, 0x3B2C, 0, + 0xE455, 0, 0, 0, 0, 0xE456, 0, 0x6E7B, + 0x3F6D, 0xE457, 0, 0, 0xE458, 0xE459, 0, 0, + 0x3F6E, 0x6F21, 0x6F23, 0, 0xE45A, 0xE45B, 0xE45C, 0xE45D, + 0x3E7B, 0xE45E, 0x6F22, 0x6F24, 0xE45F, 0xE460, 0x3653, 0xE461, + 0x4945, 0xE462, 0xE463, 0x3C62, 0x4F23, 0, 0x6E7E, 0x3A78, + 0, 0, 0x4F3F, 0xE464, 0xE465, 0x6F26, 0xE466, 0xE467, + 0, 0, 0x6F25, 0x6F27, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E98D[] = { + 0, 0, 0, 0, 0x6E7D, 0, 0, 0xE468, + 0xE469, 0xE46A, 0, 0x4669, 0, 0x4555, 0, 0, + 0xE46B, 0xE46C, 0xE46D, 0, 0x4457, 0xE46E, 0x6F2C, 0xE46F, + 0xE470, 0, 0xE471, 0x4343, 0x6F28, 0, 0xE472, 0, + 0x6F29, 0, 0, 0, 0xE473, 0xE474, 0, 0xE475, + 0, 0xE476, 0xE477, 0, 0x372D, 0xE478, 0x6F2B, 0xE479, + 0xE47A, 0xE47B, 0, 0xE47C, 0xE47D, 0x3830, 0xE47E, 0, + 0, 0, 0xE521, 0, 0x6F2A, 0xE522, 0x3E61, 0xE523, +}; +static const unsigned short utf8_to_euc_E98E[] = { + 0xE524, 0xE525, 0xE526, 0, 0, 0, 0, 0, + 0xE527, 0, 0xE528, 0xE529, 0x3379, 0xE52A, 0, 0xE52B, + 0, 0, 0xE52C, 0, 0x6F30, 0xE52D, 0x3A3F, 0x4179, + 0xE52E, 0, 0x444A, 0xE52F, 0, 0, 0xE530, 0, + 0, 0xE531, 0, 0xE532, 0xE533, 0, 0xE534, 0x333B, + 0xE535, 0xE53B, 0, 0xE536, 0x6F2E, 0x6F2F, 0x4443, 0, + 0x6F2D, 0, 0, 0, 0xE537, 0xE538, 0xE539, 0, + 0, 0x6F31, 0xE53A, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E98F[] = { + 0, 0xE53C, 0, 0x6F37, 0xE53D, 0xE53E, 0xE53F, 0xE540, + 0x6F3A, 0xE541, 0xE542, 0xE543, 0xE544, 0xE545, 0, 0, + 0x6F39, 0x452D, 0, 0xE546, 0, 0, 0x6F32, 0x6F33, + 0x6F36, 0xE547, 0, 0, 0xE548, 0x6F38, 0xE549, 0xE54A, + 0, 0x3640, 0xE54B, 0, 0x6F3B, 0x6F35, 0xE54C, 0xE54D, + 0x6F34, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xE54F, + 0xE550, 0xE54E, 0xE551, 0xE552, 0, 0xE553, 0, 0, +}; +static const unsigned short utf8_to_euc_E990[] = { + 0, 0xE554, 0xE555, 0x6F3F, 0xE556, 0, 0, 0x6F40, + 0xE557, 0xE558, 0, 0, 0, 0xE559, 0xE55A, 0xE55B, + 0x6F41, 0, 0, 0x6F3E, 0x6F3D, 0xE55C, 0xE55D, 0xE55E, + 0x3E62, 0x462A, 0x6F3C, 0, 0, 0, 0, 0xE55F, + 0, 0x6F45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x6F43, 0, 0, 0xE560, 0xE561, + 0, 0xE562, 0xE563, 0xE564, 0xE565, 0x6F44, 0x6F42, 0, + 0x4278, 0, 0x6F46, 0xE566, 0, 0xE568, 0, 0xE567, +}; +static const unsigned short utf8_to_euc_E991[] = { + 0, 0x6F47, 0, 0xE569, 0x6F49, 0xE56A, 0, 0, + 0xE56B, 0, 0xE56C, 0, 0xE56D, 0, 0, 0, + 0, 0x3455, 0x6F48, 0x4C7A, 0, 0xE56E, 0, 0, + 0, 0xE56F, 0x6F54, 0x6F4A, 0xE570, 0, 0x6F4D, 0xE571, + 0x6F4B, 0xE572, 0x6F4C, 0xE573, 0, 0, 0, 0, + 0xE574, 0, 0x6F4E, 0xE575, 0, 0xE576, 0xE577, 0xE578, + 0x6F50, 0xE579, 0xE57A, 0, 0, 0x6F51, 0, 0x6F52, + 0, 0, 0, 0, 0x6F55, 0x6F53, 0x6F56, 0x6F58, +}; +static const unsigned short utf8_to_euc_E992[] = { + 0, 0x6F57, 0, 0xE57C, 0xE57B, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E995[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0x4439, + 0xE57D, 0xE57E, 0, 0, 0, 0, 0xE621, 0, +}; +static const unsigned short utf8_to_euc_E996[] = { + 0x4C67, 0, 0x6F59, 0x412E, 0xE622, 0, 0, 0x6F5A, + 0xE623, 0x4A44, 0x6F5B, 0x332B, 0xE624, 0xE625, 0xE626, 0x313C, + 0, 0x3457, 0xF471, 0x3456, 0x6F5C, 0, 0x6F5D, 0, + 0x6F5E, 0x6F5F, 0, 0, 0, 0xE627, 0xE628, 0xE629, + 0x6F60, 0xE62A, 0x3458, 0x3355, 0x395E, 0x4836, 0xE62B, 0x6F62, + 0x6F61, 0xE62C, 0, 0xE62D, 0xE62E, 0x6F63, 0, 0, + 0, 0, 0x315C, 0, 0xE62F, 0, 0xE630, 0, + 0, 0x6F66, 0xE631, 0x6F65, 0x6F64, 0xE632, 0x6F67, 0xE633, +}; +static const unsigned short utf8_to_euc_E997[] = { + 0, 0, 0, 0x6F6A, 0, 0, 0xE634, 0x3047, + 0xE635, 0xE636, 0x6F68, 0xE637, 0x6F6C, 0x6F6B, 0, 0, + 0xE638, 0xE639, 0xE63A, 0xE63B, 0x6F6E, 0x6F6D, 0x6F6F, 0, + 0x462E, 0xE63C, 0xE63D, 0, 0x6F70, 0xE63E, 0xE63F, 0xE640, + 0xE641, 0x6F71, 0x6F73, 0, 0xE642, 0x6F72, 0xE643, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E998[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x496C, 0xE644, 0xE645, 0, + 0, 0x6F74, 0xE646, 0, 0xE647, 0xE648, 0xE649, 0, + 0x6F75, 0, 0x3A65, 0, 0xE64A, 0, 0x6F76, 0x6F77, + 0, 0xE64B, 0x4B49, 0xE64C, 0, 0, 0, 0xE64D, + 0xE64E, 0xE64F, 0xE650, 0x414B, 0xE651, 0xE652, 0, 0x3024, +}; +static const unsigned short utf8_to_euc_E999[] = { + 0x424B, 0xE653, 0x6F78, 0, 0x496D, 0, 0, 0, + 0, 0, 0, 0x6F7B, 0x6F79, 0x395F, 0, 0x6F7A, + 0x3842, 0, 0xE654, 0, 0xE655, 0, 0xE656, 0xE657, + 0xE658, 0, 0, 0x4A45, 0x6F7D, 0x7021, 0x6F7E, 0x7022, + 0, 0xE659, 0x3121, 0x3F58, 0x3D7C, 0x3459, 0x7023, 0, + 0, 0, 0x4766, 0, 0x7025, 0, 0xE65A, 0, + 0x3122, 0, 0x7024, 0x4444, 0xE65B, 0x4E4D, 0x462B, 0x6F7C, + 0x4E26, 0, 0x3831, 0xE65C, 0xE65D, 0x4D5B, 0xE65E, 0xE65F, +}; +static const unsigned short utf8_to_euc_E99A[] = { + 0, 0xE660, 0xE661, 0xE662, 0xE663, 0x3679, 0x4E34, 0, + 0x3728, 0xE664, 0x4262, 0x6721, 0, 0x7026, 0x332C, 0x3F6F, + 0, 0xE665, 0, 0, 0x3356, 0x7028, 0xE666, 0x7029, + 0x7027, 0x3764, 0xE667, 0x3A5D, 0x3E63, 0xE668, 0, 0xE669, + 0x3123, 0, 0, 0x4E59, 0xE66A, 0xE66B, 0xE66C, 0x702B, + 0x6E2E, 0xE66D, 0x702A, 0, 0, 0, 0xE66E, 0xE66F, + 0x702E, 0x702C, 0x702D, 0xE670, 0x702F, 0, 0x7030, 0x4E6C, + 0x7031, 0x7032, 0xE671, 0x4049, 0x483B, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E99B[] = { + 0x3F7D, 0x3467, 0, 0, 0x4D3A, 0x326D, 0x3D38, 0x385B, + 0, 0x7035, 0xE672, 0x7034, 0x3B73, 0x7036, 0x7033, 0, + 0, 0x3B28, 0xE673, 0, 0, 0x703A, 0x6A2D, 0, + 0xE675, 0x5256, 0xE676, 0x3F77, 0x7038, 0xE677, 0xE678, 0xE679, + 0, 0, 0x4E25, 0x4671, 0, 0, 0, 0, + 0x312B, 0xE67A, 0x4063, 0x3C36, 0, 0, 0, 0xE67B, + 0x4A37, 0xE67C, 0x3140, 0, 0, 0, 0x4E6D, 0x4D6B, + 0, 0x703B, 0xE67D, 0x4545, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E99C[] = { + 0x3C7B, 0, 0xE67E, 0xE721, 0x703C, 0xE722, 0x703D, 0x3F4C, + 0x703E, 0xE723, 0x4E6E, 0, 0, 0x7039, 0x7040, 0x7042, + 0, 0x7041, 0, 0x703F, 0, 0, 0x7043, 0, + 0, 0x7044, 0xE724, 0xE725, 0x417A, 0xE726, 0x3262, 0, + 0, 0xE727, 0xE728, 0xE729, 0x7045, 0, 0, 0x4C38, + 0xE72A, 0, 0x7046, 0, 0, 0, 0, 0, + 0x7047, 0xE72B, 0x4F2A, 0xE72C, 0, 0, 0, 0, + 0x5B31, 0x7048, 0, 0xF474, 0, 0x7049, 0x704A, 0, +}; +static const unsigned short utf8_to_euc_E99D[] = { + 0, 0xE72D, 0x704E, 0xE72E, 0x704B, 0, 0x704C, 0, + 0x704D, 0x704F, 0xE72F, 0, 0, 0xF475, 0xE730, 0xE731, + 0, 0xF476, 0x4044, 0, 0, 0xE732, 0x4C77, 0xE733, + 0xE734, 0x4045, 0xE735, 0xE736, 0x7050, 0, 0x4873, 0, + 0x7051, 0x7353, 0x4C4C, 0xE737, 0x7052, 0, 0x7053, 0xE738, + 0x7054, 0x3357, 0xE739, 0x7056, 0, 0x3F59, 0xE73A, 0, + 0, 0x7057, 0, 0xE73B, 0x3724, 0, 0xE73C, 0xE73D, + 0xE73E, 0x7058, 0x705C, 0xE73F, 0x705A, 0xE740, 0, 0xE741, +}; +static const unsigned short utf8_to_euc_E99E[] = { + 0xE742, 0x705B, 0, 0, 0x3373, 0x7059, 0x705D, 0, + 0, 0xE743, 0, 0x705E, 0, 0x3048, 0, 0x705F, + 0x7060, 0, 0, 0, 0, 0xE744, 0xE745, 0xE746, + 0x3E64, 0xE747, 0xE748, 0, 0x7061, 0, 0xE749, 0xE74A, + 0x3547, 0, 0xE74B, 0x7064, 0, 0, 0x7063, 0, + 0x7062, 0, 0, 0x6B71, 0xE74C, 0x4A5C, 0xE74D, 0, + 0, 0xE74E, 0xE74F, 0x7065, 0x7066, 0xE750, 0xE751, 0, + 0xE752, 0xE753, 0xE754, 0, 0xE755, 0, 0xE756, 0xE757, +}; +static const unsigned short utf8_to_euc_E99F[] = { + 0, 0xE758, 0, 0x7067, 0xE759, 0xE75A, 0x7068, 0xE75B, + 0x7069, 0xE75C, 0xE75D, 0x706A, 0xE75E, 0xE75F, 0xE760, 0, + 0xE761, 0xE762, 0, 0x345A, 0xE763, 0, 0, 0xE764, + 0xE765, 0xE766, 0, 0xE76A, 0x706B, 0xE767, 0xE768, 0, + 0xE769, 0xE76B, 0, 0, 0xE76C, 0, 0, 0, + 0, 0, 0, 0, 0, 0x706C, 0x4723, 0xE76D, + 0, 0xE76E, 0x706E, 0x323B, 0xE76F, 0x7071, 0x7070, 0xE770, + 0xE771, 0, 0xE772, 0x3124, 0, 0, 0, 0x3641, +}; +static const unsigned short utf8_to_euc_E9A0[] = { + 0, 0x4A47, 0x443A, 0x3A22, 0, 0x3960, 0x3D67, 0xE773, + 0x3F5C, 0, 0xE774, 0, 0x7073, 0xE776, 0xE777, 0x7072, + 0x4D42, 0x3468, 0x4852, 0x465C, 0xE778, 0, 0xE779, 0x3F7C, + 0x4E4E, 0xE775, 0x375B, 0, 0xE77A, 0, 0xE77B, 0, + 0xE77C, 0x7076, 0, 0xE77D, 0x7075, 0xE828, 0xE77E, 0, + 0, 0, 0, 0xE821, 0x4B4B, 0x462C, 0xE822, 0xE823, + 0xE824, 0, 0xE825, 0xE826, 0x3150, 0xE827, 0, 0x7077, + 0x7074, 0, 0, 0x4951, 0x4D6A, 0x7078, 0xE829, 0, +}; +static const unsigned short utf8_to_euc_E9A1[] = { + 0, 0, 0, 0, 0xE82A, 0, 0x7079, 0xE82B, + 0, 0, 0xE82C, 0x707B, 0x426A, 0x335B, 0x335C, 0x707A, + 0, 0xE82D, 0xE82E, 0xE82F, 0x3469, 0x3832, 0xE830, 0xE831, + 0x346A, 0xE832, 0xE833, 0x453F, 0, 0, 0x4E60, 0, + 0, 0, 0xE834, 0xE835, 0, 0xE836, 0xE837, 0x385C, + 0, 0, 0xE838, 0x707C, 0xE839, 0, 0, 0x707D, + 0x707E, 0x7121, 0, 0x7123, 0x7122, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9A2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x4977, 0, 0x7124, 0xE83A, 0, 0xE83B, 0xE83C, 0x7125, + 0xE83D, 0x7126, 0, 0, 0xE83E, 0, 0x7127, 0xE83F, + 0xE840, 0, 0xE841, 0xE842, 0, 0, 0, 0xE843, +}; +static const unsigned short utf8_to_euc_E9A3[] = { + 0, 0, 0xE844, 0x7129, 0x7128, 0xE845, 0x712A, 0, + 0xE846, 0, 0, 0, 0xE847, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0x4874, 0x664C, 0, 0, 0x3F29, + 0, 0xE848, 0x3532, 0xE849, 0, 0xE84A, 0xE84B, 0xE84C, + 0, 0x712B, 0xE84D, 0x712C, 0, 0x522C, 0x5D3B, 0x4853, + 0, 0, 0x307B, 0xE84E, 0x303B, 0, 0xE84F, 0, + 0, 0, 0, 0, 0x3B74, 0x4B30, 0x3E7E, 0, +}; +static const unsigned short utf8_to_euc_E9A4[] = { + 0, 0, 0xE850, 0x712D, 0, 0x4C5F, 0, 0xE851, + 0xE852, 0x712E, 0x4D5C, 0, 0x3142, 0, 0, 0, + 0x3B41, 0xE853, 0x712F, 0x326E, 0x7130, 0xE854, 0xE855, 0xE856, + 0x7131, 0, 0xE857, 0xE858, 0xE859, 0x7133, 0x7134, 0xE85A, + 0x7136, 0x7132, 0xE85B, 0, 0x7135, 0, 0xE85C, 0xE85D, + 0x345B, 0, 0, 0xE85E, 0x7137, 0, 0x7138, 0, + 0, 0xE85F, 0xE860, 0xE861, 0xE862, 0xE863, 0, 0, + 0, 0xE864, 0xE865, 0xE866, 0xE867, 0x7139, 0x713A, 0, +}; +static const unsigned short utf8_to_euc_E9A5[] = { + 0xE868, 0xE869, 0x713B, 0, 0, 0x713D, 0xE86A, 0xE86B, + 0xE86C, 0x713C, 0, 0x713F, 0x7142, 0xE86D, 0xE86E, 0, + 0x713E, 0x7140, 0x7141, 0, 0xE86F, 0x7143, 0, 0x3642, + 0xE870, 0xE871, 0, 0xE872, 0xE873, 0, 0xE874, 0xE875, + 0xE876, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9A6[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0x3C73, 0x7144, + 0x7145, 0x3961, 0, 0xE877, 0, 0xE878, 0xF47A, 0xE879, + 0, 0, 0, 0, 0, 0x7146, 0xE87A, 0, + 0x333E, 0, 0, 0, 0x474F, 0x7147, 0x7148, 0, + 0xE87B, 0xE87C, 0xE87D, 0x435A, 0x466B, 0xE87E, 0, 0, + 0, 0xE921, 0xE922, 0, 0x7149, 0xE923, 0, 0xE924, +}; +static const unsigned short utf8_to_euc_E9A7[] = { + 0, 0x477D, 0, 0xE925, 0x424C, 0x3158, 0x366E, 0, + 0x366F, 0xE926, 0, 0, 0, 0, 0, 0, + 0x4373, 0x714E, 0x3670, 0xE927, 0xE928, 0x326F, 0, 0, + 0x714D, 0xE929, 0xE92A, 0x714B, 0xE92B, 0x714C, 0xE92C, 0x714A, + 0, 0, 0x7158, 0, 0, 0, 0, 0xE92D, + 0, 0, 0xE92E, 0xE92F, 0xE930, 0x714F, 0x7150, 0, + 0xE931, 0x7151, 0x7152, 0, 0xE932, 0xE933, 0, 0, + 0x7154, 0xE934, 0, 0x7153, 0, 0xE935, 0xE936, 0x3D59, +}; +static const unsigned short utf8_to_euc_E9A8[] = { + 0, 0x7155, 0xE937, 0xE938, 0xE939, 0x7157, 0, 0, + 0, 0, 0, 0xE93A, 0xE93B, 0, 0x3533, 0x7156, + 0xE93C, 0xE93D, 0x417B, 0x3833, 0, 0, 0xE93E, 0, + 0, 0x7159, 0, 0, 0, 0, 0xE93F, 0, + 0xE940, 0, 0xE941, 0xE942, 0xE943, 0, 0, 0xE944, + 0x424D, 0, 0, 0x715A, 0, 0xE945, 0xE946, 0, + 0x462D, 0, 0, 0xE947, 0, 0xE948, 0xE949, 0x715B, + 0xE94A, 0, 0, 0, 0, 0, 0x7160, 0, +}; +static const unsigned short utf8_to_euc_E9A9[] = { + 0x715E, 0xE94C, 0x715D, 0x715F, 0xE94D, 0x715C, 0, 0xE94B, + 0, 0, 0xE94E, 0xE94F, 0xE950, 0x7162, 0xE951, 0, + 0, 0xE952, 0, 0, 0xE953, 0x7161, 0xE954, 0x7164, + 0, 0, 0x3643, 0x7163, 0, 0xE955, 0, 0x7165, + 0, 0, 0x7166, 0, 0x7168, 0x7167, 0, 0, + 0, 0x7169, 0x716B, 0x716A, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9AA[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x397C, 0, 0xE956, 0, 0xE957, 0x716C, 0xE958, 0xE959, + 0x716D, 0, 0xE95A, 0, 0xE95B, 0xE95C, 0xE95D, 0, + 0x333C, 0xE95E, 0, 0xE95F, 0x716E, 0, 0xE960, 0xE961, +}; +static const unsigned short utf8_to_euc_E9AB[] = { + 0x716F, 0xE962, 0, 0xE963, 0x3F71, 0, 0xE964, 0, + 0xE965, 0, 0, 0, 0, 0, 0xE966, 0x7170, + 0xE967, 0x7171, 0xE968, 0x7172, 0x7173, 0xE969, 0xE96A, 0xE96B, + 0x3962, 0xF47B, 0, 0xE96C, 0xE96D, 0, 0x7174, 0x7175, + 0xE96E, 0, 0x7176, 0x7177, 0xE96F, 0xE970, 0x7178, 0xE971, + 0, 0xE972, 0x4831, 0x717A, 0xE973, 0x4926, 0x717B, 0x7179, + 0, 0x717D, 0xE974, 0xE975, 0x717C, 0xE976, 0, 0x717E, + 0, 0xE977, 0xE978, 0x7221, 0, 0xE979, 0, 0xE97A, +}; +static const unsigned short utf8_to_euc_E9AC[] = { + 0xE97B, 0xE97C, 0xE97D, 0xE97E, 0xEA21, 0xEA22, 0x7222, 0, + 0xEA23, 0xEA24, 0, 0xEA25, 0xEA26, 0xEA27, 0xEA28, 0, + 0xEA29, 0, 0xEA2A, 0, 0, 0, 0xEA2B, 0, + 0x7223, 0xEA2C, 0x7224, 0xEA2D, 0xEA2E, 0, 0, 0x7225, + 0xEA2F, 0, 0x7226, 0x7227, 0, 0x7228, 0xEA30, 0x7229, + 0x722A, 0x722B, 0x722C, 0xEA31, 0, 0xEA32, 0x722D, 0x722E, + 0, 0x5D35, 0x722F, 0xEA33, 0xEA34, 0xEA35, 0, 0xEA36, + 0, 0xEA37, 0xEA38, 0x6478, 0x3534, 0xEA39, 0, 0, +}; +static const unsigned short utf8_to_euc_E9AD[] = { + 0, 0x3321, 0x3A32, 0x7231, 0x7230, 0x4C25, 0, 0, + 0xEA3A, 0, 0, 0xEA3B, 0xEA3C, 0x7233, 0x7234, 0x7232, + 0, 0x7235, 0, 0, 0x4B62, 0xEA3D, 0xEA3E, 0xEA3F, + 0x7236, 0, 0x357B, 0xEA40, 0, 0, 0xEA41, 0, + 0, 0xEA42, 0, 0xEA43, 0, 0xEA44, 0xEA45, 0, + 0xEA46, 0, 0xEA47, 0xEA48, 0xEA49, 0xEA4A, 0xEA4B, 0x4F25, + 0, 0, 0xF47C, 0xEA4C, 0x7237, 0xEA4D, 0, 0xEA4E, + 0xEA4F, 0xEA50, 0, 0, 0, 0, 0, 0xEA51, +}; +static const unsigned short utf8_to_euc_E9AE[] = { + 0xEA52, 0, 0, 0x7239, 0xEA53, 0xEA54, 0xEA55, 0xEA56, + 0, 0xEA57, 0xEA58, 0xEA59, 0, 0xEA5A, 0x303E, 0xEA5B, + 0xEA5C, 0x723A, 0x4A2B, 0x7238, 0xEA5D, 0, 0x723B, 0x723C, + 0, 0, 0xEA5E, 0, 0, 0xEA5F, 0xEA60, 0x723D, + 0x723E, 0, 0, 0, 0, 0, 0xEA61, 0xEA62, + 0x723F, 0xEA63, 0x4B6E, 0x3B2D, 0xEA64, 0x3A7A, 0x412F, 0, + 0xEA65, 0xEA66, 0xEA67, 0, 0x7240, 0, 0, 0xEA68, + 0xEA69, 0x7243, 0, 0xEA6A, 0xEA6B, 0, 0xEA6C, 0xEA6D, +}; +static const unsigned short utf8_to_euc_E9AF[] = { + 0x7241, 0xEA6E, 0, 0, 0, 0, 0x7244, 0xEA6F, + 0xEA70, 0x3871, 0x7242, 0, 0, 0, 0xEA71, 0x7245, + 0xEA72, 0x7246, 0x7247, 0, 0x724B, 0, 0x3B2A, 0xEA73, + 0xEA74, 0, 0, 0x4264, 0, 0xEA75, 0, 0xEA76, + 0, 0x724C, 0x7249, 0x7248, 0x724A, 0xEA77, 0, 0xEA78, + 0x375F, 0, 0xEA79, 0xEA7A, 0, 0, 0, 0xEA7B, + 0x7250, 0x724F, 0x724E, 0xEA7C, 0, 0x3033, 0, 0xEA7D, + 0xEA7E, 0xEB21, 0xEB22, 0, 0, 0xEB23, 0, 0xEB24, +}; +static const unsigned short utf8_to_euc_E9B0[] = { + 0xEB25, 0, 0xEB26, 0, 0x725A, 0, 0x7256, 0, + 0x7257, 0x7253, 0x7259, 0xEB27, 0x7255, 0x3362, 0, 0xEB28, + 0x4F4C, 0xEB29, 0x7258, 0x7254, 0x7252, 0x7251, 0xEB2A, 0, + 0xEB2B, 0xEB2C, 0xEB2D, 0x725C, 0xEB2E, 0, 0xEB2F, 0, + 0, 0x725F, 0xEB30, 0xEB31, 0x725E, 0x725D, 0xEB32, 0xEB33, + 0xEB34, 0xEB35, 0xEB36, 0, 0, 0x4949, 0x725B, 0x3073, + 0x7260, 0xEB37, 0x7262, 0, 0, 0xEB38, 0xEB39, 0xEB3A, + 0, 0x336F, 0x724D, 0x3137, 0, 0xEB3B, 0x7264, 0, +}; +static const unsigned short utf8_to_euc_E9B1[] = { + 0, 0xEB3C, 0, 0xEB3D, 0xEB3E, 0xEB3F, 0x7263, 0x7261, + 0x432D, 0xEB40, 0xEB41, 0, 0, 0, 0xEB42, 0xEB43, + 0xEB44, 0, 0x4B70, 0xEB45, 0xEB46, 0, 0xEB47, 0x4E5A, + 0xEB48, 0, 0x7265, 0xEB49, 0xEB50, 0xEB4A, 0xEB4B, 0xEB4C, + 0x7266, 0, 0, 0xEB4D, 0, 0, 0, 0x7267, + 0xEB52, 0xEB4E, 0xEB4F, 0xEB51, 0, 0, 0xEB53, 0, + 0xEB54, 0, 0xEB55, 0, 0, 0xEB56, 0x7268, 0xEB57, + 0x7269, 0, 0, 0xEB58, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9B3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x443B, 0xEB59, 0x726A, + 0, 0x4837, 0, 0x726F, 0x726B, 0, 0, 0, + 0x726C, 0, 0xEB5A, 0x4B31, 0x4C44, 0, 0x4650, 0xEB5B, + 0, 0xEB5C, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9B4[] = { + 0, 0, 0xEB5E, 0x7270, 0, 0, 0x7271, 0x463E, + 0x726E, 0x726D, 0, 0xEB5D, 0, 0, 0x322A, 0, + 0, 0xEB5F, 0x7279, 0, 0, 0x7278, 0, 0xEB60, + 0xEB61, 0, 0, 0x3175, 0xEB62, 0xEB63, 0xEB64, 0x7276, + 0, 0, 0, 0x7275, 0, 0, 0x7273, 0, + 0x337B, 0, 0x7272, 0x3C32, 0x3229, 0, 0, 0xEB65, + 0xEB66, 0, 0xEB67, 0xEB68, 0xEB69, 0, 0, 0, + 0, 0, 0xEB6A, 0x3963, 0xEB6B, 0xEB6D, 0x727C, 0x727B, +}; +static const unsigned short utf8_to_euc_E9B5[] = { + 0, 0x727A, 0xEB6E, 0xEB6F, 0x7277, 0xEB6C, 0x727D, 0xEB70, + 0x727E, 0, 0xEB71, 0, 0, 0, 0, 0, + 0x7325, 0x7324, 0, 0xEB72, 0xEB73, 0, 0, 0, + 0, 0x7326, 0, 0, 0x312D, 0x7321, 0x7322, 0xEB74, + 0x3974, 0x4C39, 0xEB76, 0xEB75, 0x7323, 0xEB77, 0, 0, + 0, 0xEB78, 0xEB79, 0xEB7A, 0x4B32, 0, 0, 0x732B, + 0xEB7B, 0, 0x7327, 0, 0, 0, 0xEB7C, 0xEB7D, + 0, 0, 0x732C, 0xEB7E, 0xEC21, 0, 0xEC22, 0, +}; +static const unsigned short utf8_to_euc_E9B6[] = { + 0, 0, 0, 0xEC23, 0xEC24, 0, 0xEC25, 0x7329, + 0, 0x7328, 0xEC26, 0, 0, 0xEC27, 0xEC28, 0x375C, + 0, 0, 0xEC29, 0xEC2A, 0, 0xEC2B, 0xEC2C, 0xEC2D, + 0xEC2E, 0, 0x732D, 0, 0, 0, 0, 0, + 0, 0xEC2F, 0, 0, 0x732E, 0, 0, 0, + 0, 0x732F, 0xEC30, 0x732A, 0xEC31, 0, 0xEC32, 0x7274, + 0, 0xEC33, 0x7330, 0, 0x4461, 0xEC34, 0, 0, + 0x7334, 0xEC35, 0x7335, 0x7333, 0xEC36, 0, 0, 0xEC37, +}; +static const unsigned short utf8_to_euc_E9B7[] = { + 0, 0x7332, 0x7338, 0xEC38, 0x7331, 0, 0x7336, 0xEC39, + 0, 0xEC3A, 0xEC3B, 0, 0, 0, 0, 0x7337, + 0, 0, 0, 0x733A, 0xEC3C, 0xEC3D, 0xEC3E, 0xEC3F, + 0, 0x7339, 0xEC40, 0, 0, 0, 0xEC41, 0xEC42, + 0xEC43, 0, 0, 0, 0, 0xEC44, 0x733C, 0xEC45, + 0, 0xEC46, 0, 0xEC47, 0, 0x733D, 0xEC48, 0x733E, + 0xEC49, 0, 0x4F49, 0xEC4A, 0xEC4B, 0, 0, 0, + 0x733B, 0x426B, 0x3A6D, 0, 0, 0x733F, 0xEC4C, 0, +}; +static const unsigned short utf8_to_euc_E9B8[] = { + 0, 0, 0xEC4E, 0, 0, 0, 0, 0xEC4F, + 0, 0, 0xEC4D, 0, 0, 0, 0xEC50, 0, + 0xEC51, 0xEC52, 0xEC53, 0, 0, 0xEC54, 0xEC55, 0, + 0, 0xEC56, 0x7340, 0x7341, 0xEC57, 0xEC58, 0x7342, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_E9B9[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x7343, 0, 0, + 0x3834, 0x7344, 0xEC59, 0xEC5A, 0xEC5B, 0x7345, 0, 0x3C2F, +}; +static const unsigned short utf8_to_euc_E9BA[] = { + 0xEC5C, 0x7346, 0xEC5D, 0xEC5E, 0xEC5F, 0xEC60, 0, 0xEC61, + 0x7347, 0, 0, 0x7348, 0x7349, 0, 0xEC62, 0xEC63, + 0, 0x734C, 0x734A, 0x4F3C, 0, 0x734B, 0xEC64, 0x4E6F, + 0xEC65, 0, 0, 0xEC66, 0, 0x734D, 0xEC67, 0x4E5B, + 0, 0, 0, 0, 0xEC68, 0x734E, 0x477E, 0, + 0xEC69, 0x734F, 0x7351, 0, 0xEC6A, 0x7352, 0xEC6B, 0xEC6C, + 0xEC6D, 0, 0, 0xEC6E, 0xEC6F, 0xEC70, 0, 0, + 0x7350, 0x396D, 0x4C4D, 0x4B63, 0x5677, 0, 0x5D60, 0x4B7B, +}; +static const unsigned short utf8_to_euc_E9BB[] = { + 0, 0, 0, 0, 0x322B, 0, 0xEC71, 0, + 0xEC72, 0, 0, 0xEC73, 0x7354, 0x3550, 0x7355, 0x7356, + 0x7357, 0xF47E, 0x3975, 0, 0x7358, 0xEC74, 0, 0, + 0x6054, 0x4C5B, 0, 0x4263, 0x7359, 0x735B, 0x735A, 0xEC75, + 0x735C, 0, 0, 0, 0xEC76, 0x735D, 0, 0xEC77, + 0x735E, 0, 0, 0, 0xEC78, 0xEC79, 0xEC7A, 0x735F, + 0xEC7B, 0xEC7C, 0xEC7D, 0, 0x7360, 0xEC7E, 0x7361, 0x7362, + 0xED21, 0x7363, 0, 0x7364, 0x7365, 0x7366, 0, 0xED22, +}; +static const unsigned short utf8_to_euc_E9BC[] = { + 0, 0, 0xED23, 0xED24, 0, 0, 0, 0x7367, + 0x7368, 0xED25, 0, 0, 0, 0, 0x4524, 0xED26, + 0xED27, 0xED28, 0xED29, 0x385D, 0xED2A, 0x736A, 0xED2B, 0xED2C, + 0, 0xED2D, 0xED2E, 0xED2F, 0, 0, 0, 0xED30, + 0x414D, 0x736B, 0xED31, 0, 0, 0, 0xED32, 0, + 0, 0, 0xED33, 0xED34, 0x736C, 0, 0, 0xED35, + 0, 0xED36, 0xED37, 0, 0xED38, 0, 0, 0xED39, + 0, 0xED3A, 0xED3B, 0x4921, 0xED3C, 0xED3D, 0x736D, 0xED3E, +}; +static const unsigned short utf8_to_euc_E9BD[] = { + 0, 0xED3F, 0, 0xED40, 0xED41, 0xED42, 0xED43, 0xED44, + 0, 0, 0x736E, 0x6337, 0, 0, 0x6C5A, 0x706D, + 0, 0, 0x736F, 0xED45, 0x7370, 0xED46, 0xED47, 0xED48, + 0xED49, 0, 0xED4A, 0, 0, 0xED4B, 0xED4C, 0x7372, + 0x7373, 0x7374, 0x4E70, 0x7371, 0, 0, 0x7375, 0x7376, + 0xED4D, 0xED4E, 0x7378, 0, 0x7377, 0xED4F, 0xED50, 0xED51, + 0xED52, 0xED53, 0x737A, 0xED54, 0, 0xED55, 0x737B, 0x7379, + 0, 0, 0xED56, 0, 0, 0xED57, 0, 0, +}; +static const unsigned short utf8_to_euc_E9BE[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0x4E36, 0, 0xED58, + 0xED59, 0xED5A, 0xED5B, 0, 0xED5C, 0x737C, 0xED5D, 0xED5E, + 0, 0, 0, 0, 0x737D, 0x6354, 0xED5F, 0, + 0x737E, 0xED60, 0xED61, 0xED62, 0, 0xED63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_EFA4[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xF445, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_EFA7[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xF472, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_EFA8[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xF434, 0xF437, + 0xF438, 0xF43D, 0xF444, 0xF447, 0xF448, 0xF44E, 0xF44F, 0xF453, + 0xF455, 0xF456, 0xF457, 0xF458, 0xF45A, 0xF45B, 0xF45E, 0xF460, + 0xF462, 0xF463, 0xF465, 0xF469, 0xF46A, 0xF46B, 0xF46D, 0xF46F, + 0xF470, 0xF473, 0xF477, 0xF478, 0xF479, 0xF47D, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_EFBC[] = { + 0, 0x212A, 0xF42A, 0x2174, 0x2170, 0x2173, 0x2175, 0xF429, + 0x214A, 0x214B, 0x2176, 0x215C, 0x2124, 0x215D, 0x2125, 0x213F, + 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337, + 0x2338, 0x2339, 0x2127, 0x2128, 0x2163, 0x2161, 0x2164, 0x2129, + 0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347, + 0x2348, 0x2349, 0x234A, 0x234B, 0x234C, 0x234D, 0x234E, 0x234F, + 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357, + 0x2358, 0x2359, 0x235A, 0x214E, 0x2140, 0x214F, 0x2130, 0x2132, +}; +static const unsigned short utf8_to_euc_EFBD[] = { + 0x212E, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, + 0x2368, 0x2369, 0x236A, 0x236B, 0x236C, 0x236D, 0x236E, 0x236F, + 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, + 0x2378, 0x2379, 0x237A, 0x2150, 0x2143, 0x2151, 0xA237, 0, + 0, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F, + 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, + 0x0E38, 0x0E39, 0x0E3A, 0x0E3B, 0x0E3C, 0x0E3D, 0x0E3E, 0x0E3F, +}; +static const unsigned short utf8_to_euc_EFBD_ms[] = { + 0x212E, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367, + 0x2368, 0x2369, 0x236A, 0x236B, 0x236C, 0x236D, 0x236E, 0x236F, + 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377, + 0x2378, 0x2379, 0x237A, 0x2150, 0x2143, 0x2151, 0x2141, 0, + 0, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F, + 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, + 0x0E38, 0x0E39, 0x0E3A, 0x0E3B, 0x0E3C, 0x0E3D, 0x0E3E, 0x0E3F, +}; +static const unsigned short utf8_to_euc_EFBE[] = { + 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, + 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F, + 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, + 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x0E5C, 0x0E5D, 0x0E5E, 0x0E5F, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short utf8_to_euc_EFBF[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0x2171, 0x2172, 0x224C, 0x2131, 0xA243, 0x216F, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E2[] = { + utf8_to_euc_E280, 0, 0, 0, + utf8_to_euc_E284, utf8_to_euc_E285, utf8_to_euc_E286, utf8_to_euc_E287, + utf8_to_euc_E288, utf8_to_euc_E289, utf8_to_euc_E28A, 0, + utf8_to_euc_E28C, 0, 0, 0, + 0, utf8_to_euc_E291, 0, 0, + utf8_to_euc_E294, utf8_to_euc_E295, utf8_to_euc_E296, utf8_to_euc_E297, + utf8_to_euc_E298, utf8_to_euc_E299, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E2_ms[] = { + utf8_to_euc_E280_ms, 0, 0, 0, + utf8_to_euc_E284, utf8_to_euc_E285, utf8_to_euc_E286, utf8_to_euc_E287, + utf8_to_euc_E288, utf8_to_euc_E289, utf8_to_euc_E28A, 0, + utf8_to_euc_E28C, 0, 0, 0, + 0, utf8_to_euc_E291, 0, 0, + utf8_to_euc_E294, utf8_to_euc_E295, utf8_to_euc_E296, utf8_to_euc_E297, + utf8_to_euc_E298, utf8_to_euc_E299, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E2_932[] = { + utf8_to_euc_E280_932, 0, 0, 0, + utf8_to_euc_E284, utf8_to_euc_E285, utf8_to_euc_E286, utf8_to_euc_E287, + utf8_to_euc_E288_932, utf8_to_euc_E289, utf8_to_euc_E28A, 0, + utf8_to_euc_E28C, 0, 0, 0, + 0, utf8_to_euc_E291, 0, 0, + utf8_to_euc_E294, utf8_to_euc_E295, utf8_to_euc_E296, utf8_to_euc_E297, + utf8_to_euc_E298, utf8_to_euc_E299, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E2_mac[] = { + utf8_to_euc_E280_932, 0, 0, 0, + utf8_to_euc_E284_mac, utf8_to_euc_E285_mac, utf8_to_euc_E286, utf8_to_euc_E287, + utf8_to_euc_E288_mac, utf8_to_euc_E289, utf8_to_euc_E28A_mac, 0, + utf8_to_euc_E28C, 0, 0, 0, + 0, utf8_to_euc_E291_mac, 0, 0, + utf8_to_euc_E294, utf8_to_euc_E295, utf8_to_euc_E296, utf8_to_euc_E297, + utf8_to_euc_E298, utf8_to_euc_E299, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E3[] = { + utf8_to_euc_E380, utf8_to_euc_E381, utf8_to_euc_E382, utf8_to_euc_E383, + 0, 0, 0, 0, + utf8_to_euc_E388, 0, utf8_to_euc_E38A, 0, + utf8_to_euc_E38C, utf8_to_euc_E38D, utf8_to_euc_E38E, utf8_to_euc_E38F, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E3_932[] = { + utf8_to_euc_E380_932, utf8_to_euc_E381, utf8_to_euc_E382_932, utf8_to_euc_E383, + 0, 0, 0, 0, + utf8_to_euc_E388, 0, utf8_to_euc_E38A, 0, + utf8_to_euc_E38C, utf8_to_euc_E38D, utf8_to_euc_E38E, utf8_to_euc_E38F, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E3_mac[] = { + utf8_to_euc_E380_932, utf8_to_euc_E381, utf8_to_euc_E382_932, utf8_to_euc_E383, + 0, 0, 0, 0, + utf8_to_euc_E388_mac, 0, utf8_to_euc_E38A_mac, 0, + utf8_to_euc_E38C_mac, utf8_to_euc_E38D_mac, utf8_to_euc_E38E_mac, utf8_to_euc_E38F_mac, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +static const unsigned short *const utf8_to_euc_E4[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + utf8_to_euc_E4B8, utf8_to_euc_E4B9, utf8_to_euc_E4BA, utf8_to_euc_E4BB, + utf8_to_euc_E4BC, utf8_to_euc_E4BD, utf8_to_euc_E4BE, utf8_to_euc_E4BF, +}; +static const unsigned short *const utf8_to_euc_E5[] = { + utf8_to_euc_E580, utf8_to_euc_E581, utf8_to_euc_E582, utf8_to_euc_E583, + utf8_to_euc_E584, utf8_to_euc_E585, utf8_to_euc_E586, utf8_to_euc_E587, + utf8_to_euc_E588, utf8_to_euc_E589, utf8_to_euc_E58A, utf8_to_euc_E58B, + utf8_to_euc_E58C, utf8_to_euc_E58D, utf8_to_euc_E58E, utf8_to_euc_E58F, + utf8_to_euc_E590, utf8_to_euc_E591, utf8_to_euc_E592, utf8_to_euc_E593, + utf8_to_euc_E594, utf8_to_euc_E595, utf8_to_euc_E596, utf8_to_euc_E597, + utf8_to_euc_E598, utf8_to_euc_E599, utf8_to_euc_E59A, utf8_to_euc_E59B, + utf8_to_euc_E59C, utf8_to_euc_E59D, utf8_to_euc_E59E, utf8_to_euc_E59F, + utf8_to_euc_E5A0, utf8_to_euc_E5A1, utf8_to_euc_E5A2, utf8_to_euc_E5A3, + utf8_to_euc_E5A4, utf8_to_euc_E5A5, utf8_to_euc_E5A6, utf8_to_euc_E5A7, + utf8_to_euc_E5A8, utf8_to_euc_E5A9, utf8_to_euc_E5AA, utf8_to_euc_E5AB, + utf8_to_euc_E5AC, utf8_to_euc_E5AD, utf8_to_euc_E5AE, utf8_to_euc_E5AF, + utf8_to_euc_E5B0, utf8_to_euc_E5B1, utf8_to_euc_E5B2, utf8_to_euc_E5B3, + utf8_to_euc_E5B4, utf8_to_euc_E5B5, utf8_to_euc_E5B6, utf8_to_euc_E5B7, + utf8_to_euc_E5B8, utf8_to_euc_E5B9, utf8_to_euc_E5BA, utf8_to_euc_E5BB, + utf8_to_euc_E5BC, utf8_to_euc_E5BD, utf8_to_euc_E5BE, utf8_to_euc_E5BF, +}; +static const unsigned short *const utf8_to_euc_E6[] = { + utf8_to_euc_E680, utf8_to_euc_E681, utf8_to_euc_E682, utf8_to_euc_E683, + utf8_to_euc_E684, utf8_to_euc_E685, utf8_to_euc_E686, utf8_to_euc_E687, + utf8_to_euc_E688, utf8_to_euc_E689, utf8_to_euc_E68A, utf8_to_euc_E68B, + utf8_to_euc_E68C, utf8_to_euc_E68D, utf8_to_euc_E68E, utf8_to_euc_E68F, + utf8_to_euc_E690, utf8_to_euc_E691, utf8_to_euc_E692, utf8_to_euc_E693, + utf8_to_euc_E694, utf8_to_euc_E695, utf8_to_euc_E696, utf8_to_euc_E697, + utf8_to_euc_E698, utf8_to_euc_E699, utf8_to_euc_E69A, utf8_to_euc_E69B, + utf8_to_euc_E69C, utf8_to_euc_E69D, utf8_to_euc_E69E, utf8_to_euc_E69F, + utf8_to_euc_E6A0, utf8_to_euc_E6A1, utf8_to_euc_E6A2, utf8_to_euc_E6A3, + utf8_to_euc_E6A4, utf8_to_euc_E6A5, utf8_to_euc_E6A6, utf8_to_euc_E6A7, + utf8_to_euc_E6A8, utf8_to_euc_E6A9, utf8_to_euc_E6AA, utf8_to_euc_E6AB, + utf8_to_euc_E6AC, utf8_to_euc_E6AD, utf8_to_euc_E6AE, utf8_to_euc_E6AF, + utf8_to_euc_E6B0, utf8_to_euc_E6B1, utf8_to_euc_E6B2, utf8_to_euc_E6B3, + utf8_to_euc_E6B4, utf8_to_euc_E6B5, utf8_to_euc_E6B6, utf8_to_euc_E6B7, + utf8_to_euc_E6B8, utf8_to_euc_E6B9, utf8_to_euc_E6BA, utf8_to_euc_E6BB, + utf8_to_euc_E6BC, utf8_to_euc_E6BD, utf8_to_euc_E6BE, utf8_to_euc_E6BF, +}; +static const unsigned short *const utf8_to_euc_E7[] = { + utf8_to_euc_E780, utf8_to_euc_E781, utf8_to_euc_E782, utf8_to_euc_E783, + utf8_to_euc_E784, utf8_to_euc_E785, utf8_to_euc_E786, utf8_to_euc_E787, + utf8_to_euc_E788, utf8_to_euc_E789, utf8_to_euc_E78A, utf8_to_euc_E78B, + utf8_to_euc_E78C, utf8_to_euc_E78D, utf8_to_euc_E78E, utf8_to_euc_E78F, + utf8_to_euc_E790, utf8_to_euc_E791, utf8_to_euc_E792, utf8_to_euc_E793, + utf8_to_euc_E794, utf8_to_euc_E795, utf8_to_euc_E796, utf8_to_euc_E797, + utf8_to_euc_E798, utf8_to_euc_E799, utf8_to_euc_E79A, utf8_to_euc_E79B, + utf8_to_euc_E79C, utf8_to_euc_E79D, utf8_to_euc_E79E, utf8_to_euc_E79F, + utf8_to_euc_E7A0, utf8_to_euc_E7A1, utf8_to_euc_E7A2, utf8_to_euc_E7A3, + utf8_to_euc_E7A4, utf8_to_euc_E7A5, utf8_to_euc_E7A6, utf8_to_euc_E7A7, + utf8_to_euc_E7A8, utf8_to_euc_E7A9, utf8_to_euc_E7AA, utf8_to_euc_E7AB, + utf8_to_euc_E7AC, utf8_to_euc_E7AD, utf8_to_euc_E7AE, utf8_to_euc_E7AF, + utf8_to_euc_E7B0, utf8_to_euc_E7B1, utf8_to_euc_E7B2, utf8_to_euc_E7B3, + utf8_to_euc_E7B4, utf8_to_euc_E7B5, utf8_to_euc_E7B6, utf8_to_euc_E7B7, + utf8_to_euc_E7B8, utf8_to_euc_E7B9, utf8_to_euc_E7BA, 0, + utf8_to_euc_E7BC, utf8_to_euc_E7BD, utf8_to_euc_E7BE, utf8_to_euc_E7BF, +}; +static const unsigned short *const utf8_to_euc_E8[] = { + utf8_to_euc_E880, utf8_to_euc_E881, utf8_to_euc_E882, utf8_to_euc_E883, + utf8_to_euc_E884, utf8_to_euc_E885, utf8_to_euc_E886, utf8_to_euc_E887, + utf8_to_euc_E888, utf8_to_euc_E889, utf8_to_euc_E88A, utf8_to_euc_E88B, + utf8_to_euc_E88C, utf8_to_euc_E88D, utf8_to_euc_E88E, utf8_to_euc_E88F, + utf8_to_euc_E890, utf8_to_euc_E891, utf8_to_euc_E892, utf8_to_euc_E893, + utf8_to_euc_E894, utf8_to_euc_E895, utf8_to_euc_E896, utf8_to_euc_E897, + utf8_to_euc_E898, utf8_to_euc_E899, utf8_to_euc_E89A, utf8_to_euc_E89B, + utf8_to_euc_E89C, utf8_to_euc_E89D, utf8_to_euc_E89E, utf8_to_euc_E89F, + utf8_to_euc_E8A0, utf8_to_euc_E8A1, utf8_to_euc_E8A2, utf8_to_euc_E8A3, + utf8_to_euc_E8A4, utf8_to_euc_E8A5, utf8_to_euc_E8A6, utf8_to_euc_E8A7, + utf8_to_euc_E8A8, utf8_to_euc_E8A9, utf8_to_euc_E8AA, utf8_to_euc_E8AB, + utf8_to_euc_E8AC, utf8_to_euc_E8AD, utf8_to_euc_E8AE, 0, + utf8_to_euc_E8B0, utf8_to_euc_E8B1, utf8_to_euc_E8B2, utf8_to_euc_E8B3, + utf8_to_euc_E8B4, utf8_to_euc_E8B5, utf8_to_euc_E8B6, utf8_to_euc_E8B7, + utf8_to_euc_E8B8, utf8_to_euc_E8B9, utf8_to_euc_E8BA, utf8_to_euc_E8BB, + utf8_to_euc_E8BC, utf8_to_euc_E8BD, utf8_to_euc_E8BE, utf8_to_euc_E8BF, +}; +static const unsigned short *const utf8_to_euc_E9[] = { + utf8_to_euc_E980, utf8_to_euc_E981, utf8_to_euc_E982, utf8_to_euc_E983, + utf8_to_euc_E984, utf8_to_euc_E985, utf8_to_euc_E986, utf8_to_euc_E987, + utf8_to_euc_E988, utf8_to_euc_E989, utf8_to_euc_E98A, utf8_to_euc_E98B, + utf8_to_euc_E98C, utf8_to_euc_E98D, utf8_to_euc_E98E, utf8_to_euc_E98F, + utf8_to_euc_E990, utf8_to_euc_E991, utf8_to_euc_E992, 0, + 0, utf8_to_euc_E995, utf8_to_euc_E996, utf8_to_euc_E997, + utf8_to_euc_E998, utf8_to_euc_E999, utf8_to_euc_E99A, utf8_to_euc_E99B, + utf8_to_euc_E99C, utf8_to_euc_E99D, utf8_to_euc_E99E, utf8_to_euc_E99F, + utf8_to_euc_E9A0, utf8_to_euc_E9A1, utf8_to_euc_E9A2, utf8_to_euc_E9A3, + utf8_to_euc_E9A4, utf8_to_euc_E9A5, utf8_to_euc_E9A6, utf8_to_euc_E9A7, + utf8_to_euc_E9A8, utf8_to_euc_E9A9, utf8_to_euc_E9AA, utf8_to_euc_E9AB, + utf8_to_euc_E9AC, utf8_to_euc_E9AD, utf8_to_euc_E9AE, utf8_to_euc_E9AF, + utf8_to_euc_E9B0, utf8_to_euc_E9B1, 0, utf8_to_euc_E9B3, + utf8_to_euc_E9B4, utf8_to_euc_E9B5, utf8_to_euc_E9B6, utf8_to_euc_E9B7, + utf8_to_euc_E9B8, utf8_to_euc_E9B9, utf8_to_euc_E9BA, utf8_to_euc_E9BB, + utf8_to_euc_E9BC, utf8_to_euc_E9BD, utf8_to_euc_E9BE, 0, +}; +static const unsigned short *const utf8_to_euc_EF[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + utf8_to_euc_EFA4, 0, 0, utf8_to_euc_EFA7, + utf8_to_euc_EFA8, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + utf8_to_euc_EFBC, utf8_to_euc_EFBD, utf8_to_euc_EFBE, utf8_to_euc_EFBF, +}; +static const unsigned short *const utf8_to_euc_EF_ms[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + utf8_to_euc_EFA4, 0, 0, utf8_to_euc_EFA7, + utf8_to_euc_EFA8, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + utf8_to_euc_EFBC, utf8_to_euc_EFBD_ms, utf8_to_euc_EFBE, utf8_to_euc_EFBF, +}; +const unsigned short *const utf8_to_euc_2bytes[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, utf8_to_euc_C2, utf8_to_euc_C3, + utf8_to_euc_C4, utf8_to_euc_C5, 0, utf8_to_euc_C7, + 0, 0, 0, utf8_to_euc_CB, + 0, 0, utf8_to_euc_CE, utf8_to_euc_CF, + utf8_to_euc_D0, utf8_to_euc_D1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +const unsigned short *const utf8_to_euc_2bytes_ms[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, utf8_to_euc_C2_ms, utf8_to_euc_C3, + utf8_to_euc_C4, utf8_to_euc_C5, 0, utf8_to_euc_C7, + 0, 0, 0, utf8_to_euc_CB, + 0, 0, utf8_to_euc_CE, utf8_to_euc_CF, + utf8_to_euc_D0, utf8_to_euc_D1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +const unsigned short *const utf8_to_euc_2bytes_932[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, utf8_to_euc_C2_932, utf8_to_euc_C3_932, + utf8_to_euc_C4, utf8_to_euc_C5, 0, utf8_to_euc_C7, + 0, 0, 0, utf8_to_euc_CB, + 0, 0, utf8_to_euc_CE, utf8_to_euc_CF, + utf8_to_euc_D0, utf8_to_euc_D1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +const unsigned short *const utf8_to_euc_2bytes_mac[] = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, utf8_to_euc_C2_mac, utf8_to_euc_C3, + utf8_to_euc_C4, utf8_to_euc_C5, 0, utf8_to_euc_C7, + 0, 0, 0, utf8_to_euc_CB, + 0, 0, utf8_to_euc_CE, utf8_to_euc_CF, + utf8_to_euc_D0, utf8_to_euc_D1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; +const unsigned short *const *const utf8_to_euc_3bytes[] = { + 0, 0, utf8_to_euc_E2, utf8_to_euc_E3, + utf8_to_euc_E4, utf8_to_euc_E5, utf8_to_euc_E6, utf8_to_euc_E7, + utf8_to_euc_E8, utf8_to_euc_E9, 0, 0, + 0, 0, 0, utf8_to_euc_EF, +}; +const unsigned short *const *const utf8_to_euc_3bytes_ms[] = { + 0, 0, utf8_to_euc_E2_ms, utf8_to_euc_E3, + utf8_to_euc_E4, utf8_to_euc_E5, utf8_to_euc_E6, utf8_to_euc_E7, + utf8_to_euc_E8, utf8_to_euc_E9, 0, 0, + 0, 0, 0, utf8_to_euc_EF_ms, +}; +const unsigned short *const *const utf8_to_euc_3bytes_932[] = { + 0, 0, utf8_to_euc_E2_932, utf8_to_euc_E3_932, + utf8_to_euc_E4, utf8_to_euc_E5, utf8_to_euc_E6, utf8_to_euc_E7, + utf8_to_euc_E8, utf8_to_euc_E9, 0, 0, + 0, 0, 0, utf8_to_euc_EF_ms, +}; +const unsigned short *const *const utf8_to_euc_3bytes_mac[] = { + 0, 0, utf8_to_euc_E2_mac, utf8_to_euc_E3_mac, + utf8_to_euc_E4, utf8_to_euc_E5, utf8_to_euc_E6, utf8_to_euc_E7, + utf8_to_euc_E8, utf8_to_euc_E9, 0, 0, + 0, 0, 0, utf8_to_euc_EF_ms, +}; + +#ifdef UNICODE_NORMALIZATION + +/* Normalization Table by Apple */ +/* http://developer.apple.com/technotes/tn/tn1150table.html */ + +const struct normalization_pair normalization_table[] = { + {{0xcd,0xbe}, {0x3b}}, + {{0xc3,0x80}, {0x41,0xcc,0x80,0x00}}, + {{0xc3,0x81}, {0x41,0xcc,0x81}}, + {{0xc3,0x82}, {0x41,0xcc,0x82}}, + {{0xe1,0xba,0xa6}, {0x41,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xba,0xa4}, {0x41,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xba,0xaa}, {0x41,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xba,0xa8}, {0x41,0xcc,0x82,0xcc,0x89}}, + {{0xc3,0x83}, {0x41,0xcc,0x83}}, + {{0xc4,0x80}, {0x41,0xcc,0x84}}, + {{0xc4,0x82}, {0x41,0xcc,0x86}}, + {{0xe1,0xba,0xb0}, {0x41,0xcc,0x86,0xcc,0x80}}, + {{0xe1,0xba,0xae}, {0x41,0xcc,0x86,0xcc,0x81}}, + {{0xe1,0xba,0xb4}, {0x41,0xcc,0x86,0xcc,0x83}}, + {{0xe1,0xba,0xb2}, {0x41,0xcc,0x86,0xcc,0x89}}, + {{0xc7,0xa0}, {0x41,0xcc,0x87,0xcc,0x84}}, + {{0xc3,0x84}, {0x41,0xcc,0x88}}, + {{0xc7,0x9e}, {0x41,0xcc,0x88,0xcc,0x84}}, + {{0xe1,0xba,0xa2}, {0x41,0xcc,0x89}}, + {{0xc3,0x85}, {0x41,0xcc,0x8a}}, + {{0xc7,0xba}, {0x41,0xcc,0x8a,0xcc,0x81}}, + {{0xc7,0x8d}, {0x41,0xcc,0x8c}}, + {{0xc8,0x80}, {0x41,0xcc,0x8f}}, + {{0xc8,0x82}, {0x41,0xcc,0x91}}, + {{0xe1,0xba,0xa0}, {0x41,0xcc,0xa3}}, + {{0xe1,0xba,0xac}, {0x41,0xcc,0xa3,0xcc,0x82}}, + {{0xe1,0xba,0xb6}, {0x41,0xcc,0xa3,0xcc,0x86}}, + {{0xe1,0xb8,0x80}, {0x41,0xcc,0xa5}}, + {{0xc4,0x84}, {0x41,0xcc,0xa8}}, + {{0xe1,0xb8,0x82}, {0x42,0xcc,0x87}}, + {{0xe1,0xb8,0x84}, {0x42,0xcc,0xa3}}, + {{0xe1,0xb8,0x86}, {0x42,0xcc,0xb1}}, + {{0xc4,0x86}, {0x43,0xcc,0x81}}, + {{0xc4,0x88}, {0x43,0xcc,0x82}}, + {{0xc4,0x8a}, {0x43,0xcc,0x87}}, + {{0xc4,0x8c}, {0x43,0xcc,0x8c}}, + {{0xc3,0x87}, {0x43,0xcc,0xa7}}, + {{0xe1,0xb8,0x88}, {0x43,0xcc,0xa7,0xcc,0x81}}, + {{0xe1,0xb8,0x8a}, {0x44,0xcc,0x87}}, + {{0xc4,0x8e}, {0x44,0xcc,0x8c}}, + {{0xe1,0xb8,0x8c}, {0x44,0xcc,0xa3}}, + {{0xe1,0xb8,0x90}, {0x44,0xcc,0xa7}}, + {{0xe1,0xb8,0x92}, {0x44,0xcc,0xad}}, + {{0xe1,0xb8,0x8e}, {0x44,0xcc,0xb1}}, + {{0xc3,0x88}, {0x45,0xcc,0x80}}, + {{0xc3,0x89}, {0x45,0xcc,0x81}}, + {{0xc3,0x8a}, {0x45,0xcc,0x82}}, + {{0xe1,0xbb,0x80}, {0x45,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xba,0xbe}, {0x45,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xbb,0x84}, {0x45,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xbb,0x82}, {0x45,0xcc,0x82,0xcc,0x89}}, + {{0xe1,0xba,0xbc}, {0x45,0xcc,0x83}}, + {{0xc4,0x92}, {0x45,0xcc,0x84}}, + {{0xe1,0xb8,0x94}, {0x45,0xcc,0x84,0xcc,0x80}}, + {{0xe1,0xb8,0x96}, {0x45,0xcc,0x84,0xcc,0x81}}, + {{0xc4,0x94}, {0x45,0xcc,0x86}}, + {{0xc4,0x96}, {0x45,0xcc,0x87}}, + {{0xc3,0x8b}, {0x45,0xcc,0x88}}, + {{0xe1,0xba,0xba}, {0x45,0xcc,0x89}}, + {{0xc4,0x9a}, {0x45,0xcc,0x8c}}, + {{0xc8,0x84}, {0x45,0xcc,0x8f}}, + {{0xc8,0x86}, {0x45,0xcc,0x91}}, + {{0xe1,0xba,0xb8}, {0x45,0xcc,0xa3}}, + {{0xe1,0xbb,0x86}, {0x45,0xcc,0xa3,0xcc,0x82}}, + {{0xe1,0xb8,0x9c}, {0x45,0xcc,0xa7,0xcc,0x86}}, + {{0xc4,0x98}, {0x45,0xcc,0xa8}}, + {{0xe1,0xb8,0x98}, {0x45,0xcc,0xad}}, + {{0xe1,0xb8,0x9a}, {0x45,0xcc,0xb0}}, + {{0xe1,0xb8,0x9e}, {0x46,0xcc,0x87}}, + {{0xc7,0xb4}, {0x47,0xcc,0x81}}, + {{0xc4,0x9c}, {0x47,0xcc,0x82}}, + {{0xe1,0xb8,0xa0}, {0x47,0xcc,0x84}}, + {{0xc4,0x9e}, {0x47,0xcc,0x86}}, + {{0xc4,0xa0}, {0x47,0xcc,0x87}}, + {{0xc7,0xa6}, {0x47,0xcc,0x8c}}, + {{0xc4,0xa2}, {0x47,0xcc,0xa7}}, + {{0xc4,0xa4}, {0x48,0xcc,0x82}}, + {{0xe1,0xb8,0xa2}, {0x48,0xcc,0x87}}, + {{0xe1,0xb8,0xa6}, {0x48,0xcc,0x88}}, + {{0xe1,0xb8,0xa4}, {0x48,0xcc,0xa3}}, + {{0xe1,0xb8,0xa8}, {0x48,0xcc,0xa7}}, + {{0xe1,0xb8,0xaa}, {0x48,0xcc,0xae}}, + {{0xc3,0x8c}, {0x49,0xcc,0x80}}, + {{0xc3,0x8d}, {0x49,0xcc,0x81}}, + {{0xc3,0x8e}, {0x49,0xcc,0x82}}, + {{0xc4,0xa8}, {0x49,0xcc,0x83}}, + {{0xc4,0xaa}, {0x49,0xcc,0x84}}, + {{0xc4,0xac}, {0x49,0xcc,0x86}}, + {{0xc4,0xb0}, {0x49,0xcc,0x87}}, + {{0xc3,0x8f}, {0x49,0xcc,0x88}}, + {{0xe1,0xb8,0xae}, {0x49,0xcc,0x88,0xcc,0x81}}, + {{0xe1,0xbb,0x88}, {0x49,0xcc,0x89}}, + {{0xc7,0x8f}, {0x49,0xcc,0x8c}}, + {{0xc8,0x88}, {0x49,0xcc,0x8f}}, + {{0xc8,0x8a}, {0x49,0xcc,0x91}}, + {{0xe1,0xbb,0x8a}, {0x49,0xcc,0xa3}}, + {{0xc4,0xae}, {0x49,0xcc,0xa8}}, + {{0xe1,0xb8,0xac}, {0x49,0xcc,0xb0}}, + {{0xc4,0xb4}, {0x4a,0xcc,0x82}}, + {{0xe1,0xb8,0xb0}, {0x4b,0xcc,0x81}}, + {{0xc7,0xa8}, {0x4b,0xcc,0x8c}}, + {{0xe1,0xb8,0xb2}, {0x4b,0xcc,0xa3}}, + {{0xc4,0xb6}, {0x4b,0xcc,0xa7}}, + {{0xe1,0xb8,0xb4}, {0x4b,0xcc,0xb1}}, + {{0xc4,0xb9}, {0x4c,0xcc,0x81}}, + {{0xc4,0xbd}, {0x4c,0xcc,0x8c}}, + {{0xe1,0xb8,0xb6}, {0x4c,0xcc,0xa3}}, + {{0xe1,0xb8,0xb8}, {0x4c,0xcc,0xa3,0xcc,0x84}}, + {{0xc4,0xbb}, {0x4c,0xcc,0xa7}}, + {{0xe1,0xb8,0xbc}, {0x4c,0xcc,0xad}}, + {{0xe1,0xb8,0xba}, {0x4c,0xcc,0xb1}}, + {{0xe1,0xb8,0xbe}, {0x4d,0xcc,0x81}}, + {{0xe1,0xb9,0x80}, {0x4d,0xcc,0x87}}, + {{0xe1,0xb9,0x82}, {0x4d,0xcc,0xa3}}, + {{0xc5,0x83}, {0x4e,0xcc,0x81}}, + {{0xc3,0x91}, {0x4e,0xcc,0x83}}, + {{0xe1,0xb9,0x84}, {0x4e,0xcc,0x87}}, + {{0xc5,0x87}, {0x4e,0xcc,0x8c}}, + {{0xe1,0xb9,0x86}, {0x4e,0xcc,0xa3}}, + {{0xc5,0x85}, {0x4e,0xcc,0xa7}}, + {{0xe1,0xb9,0x8a}, {0x4e,0xcc,0xad}}, + {{0xe1,0xb9,0x88}, {0x4e,0xcc,0xb1}}, + {{0xc3,0x92}, {0x4f,0xcc,0x80}}, + {{0xc3,0x93}, {0x4f,0xcc,0x81}}, + {{0xc3,0x94}, {0x4f,0xcc,0x82}}, + {{0xe1,0xbb,0x92}, {0x4f,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xbb,0x90}, {0x4f,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xbb,0x96}, {0x4f,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xbb,0x94}, {0x4f,0xcc,0x82,0xcc,0x89}}, + {{0xc3,0x95}, {0x4f,0xcc,0x83}}, + {{0xe1,0xb9,0x8c}, {0x4f,0xcc,0x83,0xcc,0x81}}, + {{0xe1,0xb9,0x8e}, {0x4f,0xcc,0x83,0xcc,0x88}}, + {{0xc5,0x8c}, {0x4f,0xcc,0x84}}, + {{0xe1,0xb9,0x90}, {0x4f,0xcc,0x84,0xcc,0x80}}, + {{0xe1,0xb9,0x92}, {0x4f,0xcc,0x84,0xcc,0x81}}, + {{0xc5,0x8e}, {0x4f,0xcc,0x86}}, + {{0xc3,0x96}, {0x4f,0xcc,0x88}}, + {{0xe1,0xbb,0x8e}, {0x4f,0xcc,0x89}}, + {{0xc5,0x90}, {0x4f,0xcc,0x8b}}, + {{0xc7,0x91}, {0x4f,0xcc,0x8c}}, + {{0xc8,0x8c}, {0x4f,0xcc,0x8f}}, + {{0xc8,0x8e}, {0x4f,0xcc,0x91}}, + {{0xc6,0xa0}, {0x4f,0xcc,0x9b}}, + {{0xe1,0xbb,0x9c}, {0x4f,0xcc,0x9b,0xcc,0x80}}, + {{0xe1,0xbb,0x9a}, {0x4f,0xcc,0x9b,0xcc,0x81}}, + {{0xe1,0xbb,0xa0}, {0x4f,0xcc,0x9b,0xcc,0x83}}, + {{0xe1,0xbb,0x9e}, {0x4f,0xcc,0x9b,0xcc,0x89}}, + {{0xe1,0xbb,0xa2}, {0x4f,0xcc,0x9b,0xcc,0xa3}}, + {{0xe1,0xbb,0x8c}, {0x4f,0xcc,0xa3}}, + {{0xe1,0xbb,0x98}, {0x4f,0xcc,0xa3,0xcc,0x82}}, + {{0xc7,0xaa}, {0x4f,0xcc,0xa8}}, + {{0xc7,0xac}, {0x4f,0xcc,0xa8,0xcc,0x84}}, + {{0xe1,0xb9,0x94}, {0x50,0xcc,0x81}}, + {{0xe1,0xb9,0x96}, {0x50,0xcc,0x87}}, + {{0xc5,0x94}, {0x52,0xcc,0x81}}, + {{0xe1,0xb9,0x98}, {0x52,0xcc,0x87}}, + {{0xc5,0x98}, {0x52,0xcc,0x8c}}, + {{0xc8,0x90}, {0x52,0xcc,0x8f}}, + {{0xc8,0x92}, {0x52,0xcc,0x91}}, + {{0xe1,0xb9,0x9a}, {0x52,0xcc,0xa3}}, + {{0xe1,0xb9,0x9c}, {0x52,0xcc,0xa3,0xcc,0x84}}, + {{0xc5,0x96}, {0x52,0xcc,0xa7}}, + {{0xe1,0xb9,0x9e}, {0x52,0xcc,0xb1}}, + {{0xc5,0x9a}, {0x53,0xcc,0x81}}, + {{0xe1,0xb9,0xa4}, {0x53,0xcc,0x81,0xcc,0x87}}, + {{0xc5,0x9c}, {0x53,0xcc,0x82}}, + {{0xe1,0xb9,0xa0}, {0x53,0xcc,0x87}}, + {{0xc5,0xa0}, {0x53,0xcc,0x8c}}, + {{0xe1,0xb9,0xa6}, {0x53,0xcc,0x8c,0xcc,0x87}}, + {{0xe1,0xb9,0xa2}, {0x53,0xcc,0xa3}}, + {{0xe1,0xb9,0xa8}, {0x53,0xcc,0xa3,0xcc,0x87}}, + {{0xc5,0x9e}, {0x53,0xcc,0xa7}}, + {{0xe1,0xb9,0xaa}, {0x54,0xcc,0x87}}, + {{0xc5,0xa4}, {0x54,0xcc,0x8c}}, + {{0xe1,0xb9,0xac}, {0x54,0xcc,0xa3}}, + {{0xc5,0xa2}, {0x54,0xcc,0xa7}}, + {{0xe1,0xb9,0xb0}, {0x54,0xcc,0xad}}, + {{0xe1,0xb9,0xae}, {0x54,0xcc,0xb1}}, + {{0xc3,0x99}, {0x55,0xcc,0x80}}, + {{0xc3,0x9a}, {0x55,0xcc,0x81}}, + {{0xc3,0x9b}, {0x55,0xcc,0x82}}, + {{0xc5,0xa8}, {0x55,0xcc,0x83}}, + {{0xe1,0xb9,0xb8}, {0x55,0xcc,0x83,0xcc,0x81}}, + {{0xc5,0xaa}, {0x55,0xcc,0x84}}, + {{0xe1,0xb9,0xba}, {0x55,0xcc,0x84,0xcc,0x88}}, + {{0xc5,0xac}, {0x55,0xcc,0x86}}, + {{0xc3,0x9c}, {0x55,0xcc,0x88}}, + {{0xc7,0x9b}, {0x55,0xcc,0x88,0xcc,0x80}}, + {{0xc7,0x97}, {0x55,0xcc,0x88,0xcc,0x81}}, + {{0xc7,0x95}, {0x55,0xcc,0x88,0xcc,0x84}}, + {{0xc7,0x99}, {0x55,0xcc,0x88,0xcc,0x8c}}, + {{0xe1,0xbb,0xa6}, {0x55,0xcc,0x89}}, + {{0xc5,0xae}, {0x55,0xcc,0x8a}}, + {{0xc5,0xb0}, {0x55,0xcc,0x8b}}, + {{0xc7,0x93}, {0x55,0xcc,0x8c}}, + {{0xc8,0x94}, {0x55,0xcc,0x8f}}, + {{0xc8,0x96}, {0x55,0xcc,0x91}}, + {{0xc6,0xaf}, {0x55,0xcc,0x9b}}, + {{0xe1,0xbb,0xaa}, {0x55,0xcc,0x9b,0xcc,0x80}}, + {{0xe1,0xbb,0xa8}, {0x55,0xcc,0x9b,0xcc,0x81}}, + {{0xe1,0xbb,0xae}, {0x55,0xcc,0x9b,0xcc,0x83}}, + {{0xe1,0xbb,0xac}, {0x55,0xcc,0x9b,0xcc,0x89}}, + {{0xe1,0xbb,0xb0}, {0x55,0xcc,0x9b,0xcc,0xa3}}, + {{0xe1,0xbb,0xa4}, {0x55,0xcc,0xa3}}, + {{0xe1,0xb9,0xb2}, {0x55,0xcc,0xa4}}, + {{0xc5,0xb2}, {0x55,0xcc,0xa8}}, + {{0xe1,0xb9,0xb6}, {0x55,0xcc,0xad}}, + {{0xe1,0xb9,0xb4}, {0x55,0xcc,0xb0}}, + {{0xe1,0xb9,0xbc}, {0x56,0xcc,0x83}}, + {{0xe1,0xb9,0xbe}, {0x56,0xcc,0xa3}}, + {{0xe1,0xba,0x80}, {0x57,0xcc,0x80}}, + {{0xe1,0xba,0x82}, {0x57,0xcc,0x81}}, + {{0xc5,0xb4}, {0x57,0xcc,0x82}}, + {{0xe1,0xba,0x86}, {0x57,0xcc,0x87}}, + {{0xe1,0xba,0x84}, {0x57,0xcc,0x88}}, + {{0xe1,0xba,0x88}, {0x57,0xcc,0xa3}}, + {{0xe1,0xba,0x8a}, {0x58,0xcc,0x87}}, + {{0xe1,0xba,0x8c}, {0x58,0xcc,0x88}}, + {{0xe1,0xbb,0xb2}, {0x59,0xcc,0x80}}, + {{0xc3,0x9d}, {0x59,0xcc,0x81}}, + {{0xc5,0xb6}, {0x59,0xcc,0x82}}, + {{0xe1,0xbb,0xb8}, {0x59,0xcc,0x83}}, + {{0xe1,0xba,0x8e}, {0x59,0xcc,0x87}}, + {{0xc5,0xb8}, {0x59,0xcc,0x88}}, + {{0xe1,0xbb,0xb6}, {0x59,0xcc,0x89}}, + {{0xe1,0xbb,0xb4}, {0x59,0xcc,0xa3}}, + {{0xc5,0xb9}, {0x5a,0xcc,0x81}}, + {{0xe1,0xba,0x90}, {0x5a,0xcc,0x82}}, + {{0xc5,0xbb}, {0x5a,0xcc,0x87}}, + {{0xc5,0xbd}, {0x5a,0xcc,0x8c}}, + {{0xe1,0xba,0x92}, {0x5a,0xcc,0xa3}}, + {{0xe1,0xba,0x94}, {0x5a,0xcc,0xb1}}, + {{0xe1,0xbf,0xaf}, {0x60}}, + {{0xc3,0xa0}, {0x61,0xcc,0x80}}, + {{0xc3,0xa1}, {0x61,0xcc,0x81}}, + {{0xc3,0xa2}, {0x61,0xcc,0x82}}, + {{0xe1,0xba,0xa7}, {0x61,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xba,0xa5}, {0x61,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xba,0xab}, {0x61,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xba,0xa9}, {0x61,0xcc,0x82,0xcc,0x89}}, + {{0xc3,0xa3}, {0x61,0xcc,0x83}}, + {{0xc4,0x81}, {0x61,0xcc,0x84}}, + {{0xc4,0x83}, {0x61,0xcc,0x86}}, + {{0xe1,0xba,0xb1}, {0x61,0xcc,0x86,0xcc,0x80}}, + {{0xe1,0xba,0xaf}, {0x61,0xcc,0x86,0xcc,0x81}}, + {{0xe1,0xba,0xb5}, {0x61,0xcc,0x86,0xcc,0x83}}, + {{0xe1,0xba,0xb3}, {0x61,0xcc,0x86,0xcc,0x89}}, + {{0xc7,0xa1}, {0x61,0xcc,0x87,0xcc,0x84}}, + {{0xc3,0xa4}, {0x61,0xcc,0x88}}, + {{0xc7,0x9f}, {0x61,0xcc,0x88,0xcc,0x84}}, + {{0xe1,0xba,0xa3}, {0x61,0xcc,0x89}}, + {{0xc3,0xa5}, {0x61,0xcc,0x8a}}, + {{0xc7,0xbb}, {0x61,0xcc,0x8a,0xcc,0x81}}, + {{0xc7,0x8e}, {0x61,0xcc,0x8c}}, + {{0xc8,0x81}, {0x61,0xcc,0x8f}}, + {{0xc8,0x83}, {0x61,0xcc,0x91}}, + {{0xe1,0xba,0xa1}, {0x61,0xcc,0xa3}}, + {{0xe1,0xba,0xad}, {0x61,0xcc,0xa3,0xcc,0x82}}, + {{0xe1,0xba,0xb7}, {0x61,0xcc,0xa3,0xcc,0x86}}, + {{0xe1,0xb8,0x81}, {0x61,0xcc,0xa5}}, + {{0xc4,0x85}, {0x61,0xcc,0xa8}}, + {{0xe1,0xb8,0x83}, {0x62,0xcc,0x87}}, + {{0xe1,0xb8,0x85}, {0x62,0xcc,0xa3}}, + {{0xe1,0xb8,0x87}, {0x62,0xcc,0xb1}}, + {{0xc4,0x87}, {0x63,0xcc,0x81}}, + {{0xc4,0x89}, {0x63,0xcc,0x82}}, + {{0xc4,0x8b}, {0x63,0xcc,0x87}}, + {{0xc4,0x8d}, {0x63,0xcc,0x8c}}, + {{0xc3,0xa7}, {0x63,0xcc,0xa7}}, + {{0xe1,0xb8,0x89}, {0x63,0xcc,0xa7,0xcc,0x81}}, + {{0xe1,0xb8,0x8b}, {0x64,0xcc,0x87}}, + {{0xc4,0x8f}, {0x64,0xcc,0x8c}}, + {{0xe1,0xb8,0x8d}, {0x64,0xcc,0xa3}}, + {{0xe1,0xb8,0x91}, {0x64,0xcc,0xa7}}, + {{0xe1,0xb8,0x93}, {0x64,0xcc,0xad}}, + {{0xe1,0xb8,0x8f}, {0x64,0xcc,0xb1}}, + {{0xc3,0xa8}, {0x65,0xcc,0x80}}, + {{0xc3,0xa9}, {0x65,0xcc,0x81}}, + {{0xc3,0xaa}, {0x65,0xcc,0x82}}, + {{0xe1,0xbb,0x81}, {0x65,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xba,0xbf}, {0x65,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xbb,0x85}, {0x65,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xbb,0x83}, {0x65,0xcc,0x82,0xcc,0x89}}, + {{0xe1,0xba,0xbd}, {0x65,0xcc,0x83}}, + {{0xc4,0x93}, {0x65,0xcc,0x84}}, + {{0xe1,0xb8,0x95}, {0x65,0xcc,0x84,0xcc,0x80}}, + {{0xe1,0xb8,0x97}, {0x65,0xcc,0x84,0xcc,0x81}}, + {{0xc4,0x95}, {0x65,0xcc,0x86}}, + {{0xc4,0x97}, {0x65,0xcc,0x87}}, + {{0xc3,0xab}, {0x65,0xcc,0x88}}, + {{0xe1,0xba,0xbb}, {0x65,0xcc,0x89}}, + {{0xc4,0x9b}, {0x65,0xcc,0x8c}}, + {{0xc8,0x85}, {0x65,0xcc,0x8f}}, + {{0xc8,0x87}, {0x65,0xcc,0x91}}, + {{0xe1,0xba,0xb9}, {0x65,0xcc,0xa3}}, + {{0xe1,0xbb,0x87}, {0x65,0xcc,0xa3,0xcc,0x82}}, + {{0xe1,0xb8,0x9d}, {0x65,0xcc,0xa7,0xcc,0x86}}, + {{0xc4,0x99}, {0x65,0xcc,0xa8}}, + {{0xe1,0xb8,0x99}, {0x65,0xcc,0xad}}, + {{0xe1,0xb8,0x9b}, {0x65,0xcc,0xb0}}, + {{0xe1,0xb8,0x9f}, {0x66,0xcc,0x87}}, + {{0xc7,0xb5}, {0x67,0xcc,0x81}}, + {{0xc4,0x9d}, {0x67,0xcc,0x82}}, + {{0xe1,0xb8,0xa1}, {0x67,0xcc,0x84}}, + {{0xc4,0x9f}, {0x67,0xcc,0x86}}, + {{0xc4,0xa1}, {0x67,0xcc,0x87}}, + {{0xc7,0xa7}, {0x67,0xcc,0x8c}}, + {{0xc4,0xa3}, {0x67,0xcc,0xa7}}, + {{0xc4,0xa5}, {0x68,0xcc,0x82}}, + {{0xe1,0xb8,0xa3}, {0x68,0xcc,0x87}}, + {{0xe1,0xb8,0xa7}, {0x68,0xcc,0x88}}, + {{0xe1,0xb8,0xa5}, {0x68,0xcc,0xa3}}, + {{0xe1,0xb8,0xa9}, {0x68,0xcc,0xa7}}, + {{0xe1,0xb8,0xab}, {0x68,0xcc,0xae}}, + {{0xe1,0xba,0x96}, {0x68,0xcc,0xb1}}, + {{0xc3,0xac}, {0x69,0xcc,0x80}}, + {{0xc3,0xad}, {0x69,0xcc,0x81}}, + {{0xc3,0xae}, {0x69,0xcc,0x82}}, + {{0xc4,0xa9}, {0x69,0xcc,0x83}}, + {{0xc4,0xab}, {0x69,0xcc,0x84}}, + {{0xc4,0xad}, {0x69,0xcc,0x86}}, + {{0xc3,0xaf}, {0x69,0xcc,0x88}}, + {{0xe1,0xb8,0xaf}, {0x69,0xcc,0x88,0xcc,0x81}}, + {{0xe1,0xbb,0x89}, {0x69,0xcc,0x89}}, + {{0xc7,0x90}, {0x69,0xcc,0x8c}}, + {{0xc8,0x89}, {0x69,0xcc,0x8f}}, + {{0xc8,0x8b}, {0x69,0xcc,0x91}}, + {{0xe1,0xbb,0x8b}, {0x69,0xcc,0xa3}}, + {{0xc4,0xaf}, {0x69,0xcc,0xa8}}, + {{0xe1,0xb8,0xad}, {0x69,0xcc,0xb0}}, + {{0xc4,0xb5}, {0x6a,0xcc,0x82}}, + {{0xc7,0xb0}, {0x6a,0xcc,0x8c}}, + {{0xe1,0xb8,0xb1}, {0x6b,0xcc,0x81}}, + {{0xc7,0xa9}, {0x6b,0xcc,0x8c}}, + {{0xe1,0xb8,0xb3}, {0x6b,0xcc,0xa3}}, + {{0xc4,0xb7}, {0x6b,0xcc,0xa7}}, + {{0xe1,0xb8,0xb5}, {0x6b,0xcc,0xb1}}, + {{0xc4,0xba}, {0x6c,0xcc,0x81}}, + {{0xc4,0xbe}, {0x6c,0xcc,0x8c}}, + {{0xe1,0xb8,0xb7}, {0x6c,0xcc,0xa3}}, + {{0xe1,0xb8,0xb9}, {0x6c,0xcc,0xa3,0xcc,0x84}}, + {{0xc4,0xbc}, {0x6c,0xcc,0xa7}}, + {{0xe1,0xb8,0xbd}, {0x6c,0xcc,0xad}}, + {{0xe1,0xb8,0xbb}, {0x6c,0xcc,0xb1}}, + {{0xe1,0xb8,0xbf}, {0x6d,0xcc,0x81}}, + {{0xe1,0xb9,0x81}, {0x6d,0xcc,0x87}}, + {{0xe1,0xb9,0x83}, {0x6d,0xcc,0xa3}}, + {{0xc5,0x84}, {0x6e,0xcc,0x81}}, + {{0xc3,0xb1}, {0x6e,0xcc,0x83}}, + {{0xe1,0xb9,0x85}, {0x6e,0xcc,0x87}}, + {{0xc5,0x88}, {0x6e,0xcc,0x8c}}, + {{0xe1,0xb9,0x87}, {0x6e,0xcc,0xa3}}, + {{0xc5,0x86}, {0x6e,0xcc,0xa7}}, + {{0xe1,0xb9,0x8b}, {0x6e,0xcc,0xad}}, + {{0xe1,0xb9,0x89}, {0x6e,0xcc,0xb1}}, + {{0xc3,0xb2}, {0x6f,0xcc,0x80}}, + {{0xc3,0xb3}, {0x6f,0xcc,0x81}}, + {{0xc3,0xb4}, {0x6f,0xcc,0x82}}, + {{0xe1,0xbb,0x93}, {0x6f,0xcc,0x82,0xcc,0x80}}, + {{0xe1,0xbb,0x91}, {0x6f,0xcc,0x82,0xcc,0x81}}, + {{0xe1,0xbb,0x97}, {0x6f,0xcc,0x82,0xcc,0x83}}, + {{0xe1,0xbb,0x95}, {0x6f,0xcc,0x82,0xcc,0x89}}, + {{0xc3,0xb5}, {0x6f,0xcc,0x83}}, + {{0xe1,0xb9,0x8d}, {0x6f,0xcc,0x83,0xcc,0x81}}, + {{0xe1,0xb9,0x8f}, {0x6f,0xcc,0x83,0xcc,0x88}}, + {{0xc5,0x8d}, {0x6f,0xcc,0x84}}, + {{0xe1,0xb9,0x91}, {0x6f,0xcc,0x84,0xcc,0x80}}, + {{0xe1,0xb9,0x93}, {0x6f,0xcc,0x84,0xcc,0x81}}, + {{0xc5,0x8f}, {0x6f,0xcc,0x86}}, + {{0xc3,0xb6}, {0x6f,0xcc,0x88}}, + {{0xe1,0xbb,0x8f}, {0x6f,0xcc,0x89}}, + {{0xc5,0x91}, {0x6f,0xcc,0x8b}}, + {{0xc7,0x92}, {0x6f,0xcc,0x8c}}, + {{0xc8,0x8d}, {0x6f,0xcc,0x8f}}, + {{0xc8,0x8f}, {0x6f,0xcc,0x91}}, + {{0xc6,0xa1}, {0x6f,0xcc,0x9b}}, + {{0xe1,0xbb,0x9d}, {0x6f,0xcc,0x9b,0xcc,0x80}}, + {{0xe1,0xbb,0x9b}, {0x6f,0xcc,0x9b,0xcc,0x81}}, + {{0xe1,0xbb,0xa1}, {0x6f,0xcc,0x9b,0xcc,0x83}}, + {{0xe1,0xbb,0x9f}, {0x6f,0xcc,0x9b,0xcc,0x89}}, + {{0xe1,0xbb,0xa3}, {0x6f,0xcc,0x9b,0xcc,0xa3}}, + {{0xe1,0xbb,0x8d}, {0x6f,0xcc,0xa3}}, + {{0xe1,0xbb,0x99}, {0x6f,0xcc,0xa3,0xcc,0x82}}, + {{0xc7,0xab}, {0x6f,0xcc,0xa8}}, + {{0xc7,0xad}, {0x6f,0xcc,0xa8,0xcc,0x84}}, + {{0xe1,0xb9,0x95}, {0x70,0xcc,0x81}}, + {{0xe1,0xb9,0x97}, {0x70,0xcc,0x87}}, + {{0xc5,0x95}, {0x72,0xcc,0x81}}, + {{0xe1,0xb9,0x99}, {0x72,0xcc,0x87}}, + {{0xc5,0x99}, {0x72,0xcc,0x8c}}, + {{0xc8,0x91}, {0x72,0xcc,0x8f}}, + {{0xc8,0x93}, {0x72,0xcc,0x91}}, + {{0xe1,0xb9,0x9b}, {0x72,0xcc,0xa3}}, + {{0xe1,0xb9,0x9d}, {0x72,0xcc,0xa3,0xcc,0x84}}, + {{0xc5,0x97}, {0x72,0xcc,0xa7}}, + {{0xe1,0xb9,0x9f}, {0x72,0xcc,0xb1}}, + {{0xc5,0x9b}, {0x73,0xcc,0x81}}, + {{0xe1,0xb9,0xa5}, {0x73,0xcc,0x81,0xcc,0x87}}, + {{0xc5,0x9d}, {0x73,0xcc,0x82}}, + {{0xe1,0xb9,0xa1}, {0x73,0xcc,0x87}}, + {{0xc5,0xa1}, {0x73,0xcc,0x8c}}, + {{0xe1,0xb9,0xa7}, {0x73,0xcc,0x8c,0xcc,0x87}}, + {{0xe1,0xb9,0xa3}, {0x73,0xcc,0xa3}}, + {{0xe1,0xb9,0xa9}, {0x73,0xcc,0xa3,0xcc,0x87}}, + {{0xc5,0x9f}, {0x73,0xcc,0xa7}}, + {{0xe1,0xb9,0xab}, {0x74,0xcc,0x87}}, + {{0xe1,0xba,0x97}, {0x74,0xcc,0x88}}, + {{0xc5,0xa5}, {0x74,0xcc,0x8c}}, + {{0xe1,0xb9,0xad}, {0x74,0xcc,0xa3}}, + {{0xc5,0xa3}, {0x74,0xcc,0xa7}}, + {{0xe1,0xb9,0xb1}, {0x74,0xcc,0xad}}, + {{0xe1,0xb9,0xaf}, {0x74,0xcc,0xb1}}, + {{0xc3,0xb9}, {0x75,0xcc,0x80}}, + {{0xc3,0xba}, {0x75,0xcc,0x81}}, + {{0xc3,0xbb}, {0x75,0xcc,0x82}}, + {{0xc5,0xa9}, {0x75,0xcc,0x83}}, + {{0xe1,0xb9,0xb9}, {0x75,0xcc,0x83,0xcc,0x81}}, + {{0xc5,0xab}, {0x75,0xcc,0x84}}, + {{0xe1,0xb9,0xbb}, {0x75,0xcc,0x84,0xcc,0x88}}, + {{0xc5,0xad}, {0x75,0xcc,0x86}}, + {{0xc3,0xbc}, {0x75,0xcc,0x88}}, + {{0xc7,0x9c}, {0x75,0xcc,0x88,0xcc,0x80}}, + {{0xc7,0x98}, {0x75,0xcc,0x88,0xcc,0x81}}, + {{0xc7,0x96}, {0x75,0xcc,0x88,0xcc,0x84}}, + {{0xc7,0x9a}, {0x75,0xcc,0x88,0xcc,0x8c}}, + {{0xe1,0xbb,0xa7}, {0x75,0xcc,0x89}}, + {{0xc5,0xaf}, {0x75,0xcc,0x8a}}, + {{0xc5,0xb1}, {0x75,0xcc,0x8b}}, + {{0xc7,0x94}, {0x75,0xcc,0x8c}}, + {{0xc8,0x95}, {0x75,0xcc,0x8f}}, + {{0xc8,0x97}, {0x75,0xcc,0x91}}, + {{0xc6,0xb0}, {0x75,0xcc,0x9b}}, + {{0xe1,0xbb,0xab}, {0x75,0xcc,0x9b,0xcc,0x80}}, + {{0xe1,0xbb,0xa9}, {0x75,0xcc,0x9b,0xcc,0x81}}, + {{0xe1,0xbb,0xaf}, {0x75,0xcc,0x9b,0xcc,0x83}}, + {{0xe1,0xbb,0xad}, {0x75,0xcc,0x9b,0xcc,0x89}}, + {{0xe1,0xbb,0xb1}, {0x75,0xcc,0x9b,0xcc,0xa3}}, + {{0xe1,0xbb,0xa5}, {0x75,0xcc,0xa3}}, + {{0xe1,0xb9,0xb3}, {0x75,0xcc,0xa4}}, + {{0xc5,0xb3}, {0x75,0xcc,0xa8}}, + {{0xe1,0xb9,0xb7}, {0x75,0xcc,0xad}}, + {{0xe1,0xb9,0xb5}, {0x75,0xcc,0xb0}}, + {{0xe1,0xb9,0xbd}, {0x76,0xcc,0x83}}, + {{0xe1,0xb9,0xbf}, {0x76,0xcc,0xa3}}, + {{0xe1,0xba,0x81}, {0x77,0xcc,0x80}}, + {{0xe1,0xba,0x83}, {0x77,0xcc,0x81}}, + {{0xc5,0xb5}, {0x77,0xcc,0x82}}, + {{0xe1,0xba,0x87}, {0x77,0xcc,0x87}}, + {{0xe1,0xba,0x85}, {0x77,0xcc,0x88}}, + {{0xe1,0xba,0x98}, {0x77,0xcc,0x8a}}, + {{0xe1,0xba,0x89}, {0x77,0xcc,0xa3}}, + {{0xe1,0xba,0x8b}, {0x78,0xcc,0x87}}, + {{0xe1,0xba,0x8d}, {0x78,0xcc,0x88}}, + {{0xe1,0xbb,0xb3}, {0x79,0xcc,0x80}}, + {{0xc3,0xbd}, {0x79,0xcc,0x81}}, + {{0xc5,0xb7}, {0x79,0xcc,0x82}}, + {{0xe1,0xbb,0xb9}, {0x79,0xcc,0x83}}, + {{0xe1,0xba,0x8f}, {0x79,0xcc,0x87}}, + {{0xc3,0xbf}, {0x79,0xcc,0x88}}, + {{0xe1,0xbb,0xb7}, {0x79,0xcc,0x89}}, + {{0xe1,0xba,0x99}, {0x79,0xcc,0x8a}}, + {{0xe1,0xbb,0xb5}, {0x79,0xcc,0xa3}}, + {{0xc5,0xba}, {0x7a,0xcc,0x81}}, + {{0xe1,0xba,0x91}, {0x7a,0xcc,0x82}}, + {{0xc5,0xbc}, {0x7a,0xcc,0x87}}, + {{0xc5,0xbe}, {0x7a,0xcc,0x8c}}, + {{0xe1,0xba,0x93}, {0x7a,0xcc,0xa3}}, + {{0xe1,0xba,0x95}, {0x7a,0xcc,0xb1}}, + {{0xe1,0xbf,0xad}, {0xc2,0xa8,0xcc,0x80}}, + {{0xe1,0xbf,0xae}, {0xc2,0xa8,0xcc,0x81}}, + {{0xce,0x85}, {0xc2,0xa8,0xcc,0x8d}}, + {{0xe1,0xbf,0x81}, {0xc2,0xa8,0xcd,0x82}}, + {{0xe1,0xbf,0xbd}, {0xc2,0xb4}}, + {{0xce,0x87}, {0xc2,0xb7}}, + {{0xd3,0x94}, {0xc3,0x86}}, + {{0xc7,0xbc}, {0xc3,0x86,0xcc,0x81}}, + {{0xc7,0xa2}, {0xc3,0x86,0xcc,0x84}}, + {{0xc7,0xbe}, {0xc3,0x98,0xcc,0x81}}, + {{0xd3,0x95}, {0xc3,0xa6}}, + {{0xc7,0xbd}, {0xc3,0xa6,0xcc,0x81}}, + {{0xc7,0xa3}, {0xc3,0xa6,0xcc,0x84}}, + {{0xc7,0xbf}, {0xc3,0xb8,0xcc,0x81}}, + {{0xe1,0xba,0x9b}, {0xc5,0xbf,0xcc,0x87}}, + {{0xd3,0x98}, {0xc6,0x8f}}, + {{0xd3,0x9a}, {0xc6,0x8f,0xcc,0x88}}, + {{0xd3,0xa8}, {0xc6,0x9f}}, + {{0xd3,0xaa}, {0xc6,0x9f,0xcc,0x88}}, + {{0xd3,0xa0}, {0xc6,0xb7}}, + {{0xc7,0xae}, {0xc6,0xb7,0xcc,0x8c}}, + {{0xd3,0x99}, {0xc9,0x99}}, + {{0xd3,0x9b}, {0xc9,0x99,0xcc,0x88}}, + {{0xd3,0xa9}, {0xc9,0xb5}}, + {{0xd3,0xab}, {0xc9,0xb5,0xcc,0x88}}, + {{0xd3,0xa1}, {0xca,0x92}}, + {{0xc7,0xaf}, {0xca,0x92,0xcc,0x8c}}, + {{0xcd,0xb4}, {0xca,0xb9}}, + {{0xcd,0x80}, {0xcc,0x80}}, + {{0xcd,0x81}, {0xcc,0x81}}, + {{0xcc,0x90}, {0xcc,0x86,0xcc,0x87}}, + {{0xcd,0x84}, {0xcc,0x88,0xcc,0x8d}}, + {{0xcd,0x83}, {0xcc,0x93}}, + {{0xe1,0xbe,0xba}, {0xce,0x91,0xcc,0x80}}, + {{0xe1,0xbe,0xbb}, {0xce,0x91,0xcc,0x81}}, + {{0xe1,0xbe,0xb9}, {0xce,0x91,0xcc,0x84}}, + {{0xe1,0xbe,0xb8}, {0xce,0x91,0xcc,0x86}}, + {{0xce,0x86}, {0xce,0x91,0xcc,0x8d}}, + {{0xe1,0xbc,0x88}, {0xce,0x91,0xcc,0x93}}, + {{0xe1,0xbc,0x8a}, {0xce,0x91,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0x8c}, {0xce,0x91,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0x8e}, {0xce,0x91,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0x89}, {0xce,0x91,0xcc,0x94}}, + {{0xe1,0xbc,0x8b}, {0xce,0x91,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0x8d}, {0xce,0x91,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0x8f}, {0xce,0x91,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbe,0xbc}, {0xce,0x91,0xcd,0x85}}, + {{0xe1,0xbe,0x88}, {0xce,0x91,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0x8a}, {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0x8c}, {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0x8e}, {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0x89}, {0xce,0x91,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0x8b}, {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0x8d}, {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0x8f}, {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x88}, {0xce,0x95,0xcc,0x80}}, + {{0xe1,0xbf,0x89}, {0xce,0x95,0xcc,0x81}}, + {{0xce,0x88}, {0xce,0x95,0xcc,0x8d}}, + {{0xe1,0xbc,0x98}, {0xce,0x95,0xcc,0x93}}, + {{0xe1,0xbc,0x9a}, {0xce,0x95,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0x9c}, {0xce,0x95,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0x99}, {0xce,0x95,0xcc,0x94}}, + {{0xe1,0xbc,0x9b}, {0xce,0x95,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0x9d}, {0xce,0x95,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbf,0x8a}, {0xce,0x97,0xcc,0x80}}, + {{0xe1,0xbf,0x8b}, {0xce,0x97,0xcc,0x81}}, + {{0xce,0x89}, {0xce,0x97,0xcc,0x8d}}, + {{0xe1,0xbc,0xa8}, {0xce,0x97,0xcc,0x93}}, + {{0xe1,0xbc,0xaa}, {0xce,0x97,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0xac}, {0xce,0x97,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0xae}, {0xce,0x97,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0xa9}, {0xce,0x97,0xcc,0x94}}, + {{0xe1,0xbc,0xab}, {0xce,0x97,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0xad}, {0xce,0x97,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0xaf}, {0xce,0x97,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x8c}, {0xce,0x97,0xcd,0x85}}, + {{0xe1,0xbe,0x98}, {0xce,0x97,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0x9a}, {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0x9c}, {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0x9e}, {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0x99}, {0xce,0x97,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0x9b}, {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0x9d}, {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0x9f}, {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x9a}, {0xce,0x99,0xcc,0x80}}, + {{0xe1,0xbf,0x9b}, {0xce,0x99,0xcc,0x81}}, + {{0xe1,0xbf,0x99}, {0xce,0x99,0xcc,0x84}}, + {{0xe1,0xbf,0x98}, {0xce,0x99,0xcc,0x86}}, + {{0xce,0xaa}, {0xce,0x99,0xcc,0x88}}, + {{0xce,0x8a}, {0xce,0x99,0xcc,0x8d}}, + {{0xe1,0xbc,0xb8}, {0xce,0x99,0xcc,0x93}}, + {{0xe1,0xbc,0xba}, {0xce,0x99,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0xbc}, {0xce,0x99,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0xbe}, {0xce,0x99,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0xb9}, {0xce,0x99,0xcc,0x94}}, + {{0xe1,0xbc,0xbb}, {0xce,0x99,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0xbd}, {0xce,0x99,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0xbf}, {0xce,0x99,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xb8}, {0xce,0x9f,0xcc,0x80}}, + {{0xe1,0xbf,0xb9}, {0xce,0x9f,0xcc,0x81}}, + {{0xce,0x8c}, {0xce,0x9f,0xcc,0x8d}}, + {{0xe1,0xbd,0x88}, {0xce,0x9f,0xcc,0x93}}, + {{0xe1,0xbd,0x8a}, {0xce,0x9f,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbd,0x8c}, {0xce,0x9f,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbd,0x89}, {0xce,0x9f,0xcc,0x94}}, + {{0xe1,0xbd,0x8b}, {0xce,0x9f,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0x8d}, {0xce,0x9f,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbf,0xac}, {0xce,0xa1,0xcc,0x94}}, + {{0xe1,0xbf,0xaa}, {0xce,0xa5,0xcc,0x80}}, + {{0xe1,0xbf,0xab}, {0xce,0xa5,0xcc,0x81}}, + {{0xe1,0xbf,0xa9}, {0xce,0xa5,0xcc,0x84}}, + {{0xe1,0xbf,0xa8}, {0xce,0xa5,0xcc,0x86}}, + {{0xce,0xab}, {0xce,0xa5,0xcc,0x88}}, + {{0xce,0x8e}, {0xce,0xa5,0xcc,0x8d}}, + {{0xe1,0xbd,0x99}, {0xce,0xa5,0xcc,0x94}}, + {{0xe1,0xbd,0x9b}, {0xce,0xa5,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0x9d}, {0xce,0xa5,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbd,0x9f}, {0xce,0xa5,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xba}, {0xce,0xa9,0xcc,0x80}}, + {{0xe1,0xbf,0xbb}, {0xce,0xa9,0xcc,0x81}}, + {{0xce,0x8f}, {0xce,0xa9,0xcc,0x8d}}, + {{0xe1,0xbd,0xa8}, {0xce,0xa9,0xcc,0x93}}, + {{0xe1,0xbd,0xaa}, {0xce,0xa9,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbd,0xac}, {0xce,0xa9,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbd,0xae}, {0xce,0xa9,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbd,0xa9}, {0xce,0xa9,0xcc,0x94}}, + {{0xe1,0xbd,0xab}, {0xce,0xa9,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0xad}, {0xce,0xa9,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbd,0xaf}, {0xce,0xa9,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xbc}, {0xce,0xa9,0xcd,0x85}}, + {{0xe1,0xbe,0xa8}, {0xce,0xa9,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0xaa}, {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0xac}, {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0xae}, {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0xa9}, {0xce,0xa9,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0xab}, {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0xad}, {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0xaf}, {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbd,0xb0}, {0xce,0xb1,0xcc,0x80}}, + {{0xe1,0xbd,0xb1}, {0xce,0xb1,0xcc,0x81}}, + {{0xe1,0xbe,0xb1}, {0xce,0xb1,0xcc,0x84}}, + {{0xe1,0xbe,0xb0}, {0xce,0xb1,0xcc,0x86}}, + {{0xce,0xac}, {0xce,0xb1,0xcc,0x8d}}, + {{0xe1,0xbc,0x80}, {0xce,0xb1,0xcc,0x93}}, + {{0xe1,0xbc,0x82}, {0xce,0xb1,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0x84}, {0xce,0xb1,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0x86}, {0xce,0xb1,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0x81}, {0xce,0xb1,0xcc,0x94}}, + {{0xe1,0xbc,0x83}, {0xce,0xb1,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0x85}, {0xce,0xb1,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0x87}, {0xce,0xb1,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbe,0xb6}, {0xce,0xb1,0xcd,0x82}}, + {{0xe1,0xbe,0xb3}, {0xce,0xb1,0xcd,0x85}}, + {{0xe1,0xbe,0xb2}, {0xce,0xb1,0xcd,0x85,0xcc,0x80}}, + {{0xe1,0xbe,0xb4}, {0xce,0xb1,0xcd,0x85,0xcc,0x81}}, + {{0xe1,0xbe,0x80}, {0xce,0xb1,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0x82}, {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0x84}, {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0x86}, {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0x81}, {0xce,0xb1,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0x83}, {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0x85}, {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0x87}, {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbe,0xb7}, {0xce,0xb1,0xcd,0x85,0xcd,0x82}}, + {{0xe1,0xbd,0xb2}, {0xce,0xb5,0xcc,0x80}}, + {{0xe1,0xbd,0xb3}, {0xce,0xb5,0xcc,0x81}}, + {{0xce,0xad}, {0xce,0xb5,0xcc,0x8d}}, + {{0xe1,0xbc,0x90}, {0xce,0xb5,0xcc,0x93}}, + {{0xe1,0xbc,0x92}, {0xce,0xb5,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0x94}, {0xce,0xb5,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0x91}, {0xce,0xb5,0xcc,0x94}}, + {{0xe1,0xbc,0x93}, {0xce,0xb5,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0x95}, {0xce,0xb5,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbd,0xb4}, {0xce,0xb7,0xcc,0x80}}, + {{0xe1,0xbd,0xb5}, {0xce,0xb7,0xcc,0x81}}, + {{0xce,0xae}, {0xce,0xb7,0xcc,0x8d}}, + {{0xe1,0xbc,0xa0}, {0xce,0xb7,0xcc,0x93}}, + {{0xe1,0xbc,0xa2}, {0xce,0xb7,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0xa4}, {0xce,0xb7,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0xa6}, {0xce,0xb7,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0xa1}, {0xce,0xb7,0xcc,0x94}}, + {{0xe1,0xbc,0xa3}, {0xce,0xb7,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0xa5}, {0xce,0xb7,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0xa7}, {0xce,0xb7,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x86}, {0xce,0xb7,0xcd,0x82}}, + {{0xe1,0xbf,0x83}, {0xce,0xb7,0xcd,0x85}}, + {{0xe1,0xbf,0x82}, {0xce,0xb7,0xcd,0x85,0xcc,0x80}}, + {{0xe1,0xbf,0x84}, {0xce,0xb7,0xcd,0x85,0xcc,0x81}}, + {{0xe1,0xbe,0x90}, {0xce,0xb7,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0x92}, {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0x94}, {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0x96}, {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0x91}, {0xce,0xb7,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0x93}, {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0x95}, {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0x97}, {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x87}, {0xce,0xb7,0xcd,0x85,0xcd,0x82}}, + {{0xe1,0xbe,0xbe}, {0xce,0xb9}}, + {{0xe1,0xbd,0xb6}, {0xce,0xb9,0xcc,0x80}}, + {{0xe1,0xbd,0xb7}, {0xce,0xb9,0xcc,0x81}}, + {{0xe1,0xbf,0x91}, {0xce,0xb9,0xcc,0x84}}, + {{0xe1,0xbf,0x90}, {0xce,0xb9,0xcc,0x86}}, + {{0xcf,0x8a}, {0xce,0xb9,0xcc,0x88}}, + {{0xe1,0xbf,0x92}, {0xce,0xb9,0xcc,0x88,0xcc,0x80}}, + {{0xe1,0xbf,0x93}, {0xce,0xb9,0xcc,0x88,0xcc,0x81}}, + {{0xce,0x90}, {0xce,0xb9,0xcc,0x88,0xcc,0x8d}}, + {{0xe1,0xbf,0x97}, {0xce,0xb9,0xcc,0x88,0xcd,0x82}}, + {{0xce,0xaf}, {0xce,0xb9,0xcc,0x8d}}, + {{0xe1,0xbc,0xb0}, {0xce,0xb9,0xcc,0x93}}, + {{0xe1,0xbc,0xb2}, {0xce,0xb9,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbc,0xb4}, {0xce,0xb9,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbc,0xb6}, {0xce,0xb9,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbc,0xb1}, {0xce,0xb9,0xcc,0x94}}, + {{0xe1,0xbc,0xb3}, {0xce,0xb9,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbc,0xb5}, {0xce,0xb9,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbc,0xb7}, {0xce,0xb9,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0x96}, {0xce,0xb9,0xcd,0x82}}, + {{0xe1,0xbd,0xb8}, {0xce,0xbf,0xcc,0x80}}, + {{0xe1,0xbd,0xb9}, {0xce,0xbf,0xcc,0x81}}, + {{0xcf,0x8c}, {0xce,0xbf,0xcc,0x8d}}, + {{0xe1,0xbd,0x80}, {0xce,0xbf,0xcc,0x93}}, + {{0xe1,0xbd,0x82}, {0xce,0xbf,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbd,0x84}, {0xce,0xbf,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbd,0x81}, {0xce,0xbf,0xcc,0x94}}, + {{0xe1,0xbd,0x83}, {0xce,0xbf,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0x85}, {0xce,0xbf,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbf,0xb4}, {0xce,0xbf,0xcd,0x85,0xcc,0x81}}, + {{0xe1,0xbf,0xa4}, {0xcf,0x81,0xcc,0x93}}, + {{0xe1,0xbf,0xa5}, {0xcf,0x81,0xcc,0x94}}, + {{0xe1,0xbd,0xba}, {0xcf,0x85,0xcc,0x80}}, + {{0xe1,0xbd,0xbb}, {0xcf,0x85,0xcc,0x81}}, + {{0xe1,0xbf,0xa1}, {0xcf,0x85,0xcc,0x84}}, + {{0xe1,0xbf,0xa0}, {0xcf,0x85,0xcc,0x86}}, + {{0xcf,0x8b}, {0xcf,0x85,0xcc,0x88}}, + {{0xe1,0xbf,0xa2}, {0xcf,0x85,0xcc,0x88,0xcc,0x80}}, + {{0xe1,0xbf,0xa3}, {0xcf,0x85,0xcc,0x88,0xcc,0x81}}, + {{0xce,0xb0}, {0xcf,0x85,0xcc,0x88,0xcc,0x8d}}, + {{0xe1,0xbf,0xa7}, {0xcf,0x85,0xcc,0x88,0xcd,0x82}}, + {{0xcf,0x8d}, {0xcf,0x85,0xcc,0x8d}}, + {{0xe1,0xbd,0x90}, {0xcf,0x85,0xcc,0x93}}, + {{0xe1,0xbd,0x92}, {0xcf,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbd,0x94}, {0xcf,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbd,0x96}, {0xcf,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbd,0x91}, {0xcf,0x85,0xcc,0x94}}, + {{0xe1,0xbd,0x93}, {0xcf,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0x95}, {0xcf,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbd,0x97}, {0xcf,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xa6}, {0xcf,0x85,0xcd,0x82}}, + {{0xe1,0xbd,0xbc}, {0xcf,0x89,0xcc,0x80}}, + {{0xe1,0xbd,0xbd}, {0xcf,0x89,0xcc,0x81}}, + {{0xcf,0x8e}, {0xcf,0x89,0xcc,0x8d}}, + {{0xe1,0xbd,0xa0}, {0xcf,0x89,0xcc,0x93}}, + {{0xe1,0xbd,0xa2}, {0xcf,0x89,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbd,0xa4}, {0xcf,0x89,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbd,0xa6}, {0xcf,0x89,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbd,0xa1}, {0xcf,0x89,0xcc,0x94}}, + {{0xe1,0xbd,0xa3}, {0xcf,0x89,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbd,0xa5}, {0xcf,0x89,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbd,0xa7}, {0xcf,0x89,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xb6}, {0xcf,0x89,0xcd,0x82}}, + {{0xe1,0xbf,0xb3}, {0xcf,0x89,0xcd,0x85}}, + {{0xe1,0xbf,0xb2}, {0xcf,0x89,0xcd,0x85,0xcc,0x80}}, + {{0xe1,0xbe,0xa0}, {0xcf,0x89,0xcd,0x85,0xcc,0x93}}, + {{0xe1,0xbe,0xa2}, {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcc,0x80}}, + {{0xe1,0xbe,0xa4}, {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcc,0x81}}, + {{0xe1,0xbe,0xa6}, {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcd,0x82}}, + {{0xe1,0xbe,0xa1}, {0xcf,0x89,0xcd,0x85,0xcc,0x94}}, + {{0xe1,0xbe,0xa3}, {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcc,0x80}}, + {{0xe1,0xbe,0xa5}, {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcc,0x81}}, + {{0xe1,0xbe,0xa7}, {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcd,0x82}}, + {{0xe1,0xbf,0xb7}, {0xcf,0x89,0xcd,0x85,0xcd,0x82}}, + {{0xcf,0x94}, {0xcf,0x92,0xcc,0x88}}, + {{0xcf,0x93}, {0xcf,0x92,0xcc,0x8d}}, + {{0xd0,0x87}, {0xd0,0x86,0xcc,0x88}}, + {{0xd3,0x90}, {0xd0,0x90,0xcc,0x86}}, + {{0xd3,0x92}, {0xd0,0x90,0xcc,0x88}}, + {{0xd0,0x83}, {0xd0,0x93,0xcc,0x81}}, + {{0xd3,0x96}, {0xd0,0x95,0xcc,0x86}}, + {{0xd0,0x81}, {0xd0,0x95,0xcc,0x88}}, + {{0xd3,0x81}, {0xd0,0x96,0xcc,0x86}}, + {{0xd3,0x9c}, {0xd0,0x96,0xcc,0x88}}, + {{0xd3,0x9e}, {0xd0,0x97,0xcc,0x88}}, + {{0xd3,0xa2}, {0xd0,0x98,0xcc,0x84}}, + {{0xd0,0x99}, {0xd0,0x98,0xcc,0x86}}, + {{0xd3,0xa4}, {0xd0,0x98,0xcc,0x88}}, + {{0xd0,0x8c}, {0xd0,0x9a,0xcc,0x81}}, + {{0xd3,0xa6}, {0xd0,0x9e,0xcc,0x88}}, + {{0xd3,0xae}, {0xd0,0xa3,0xcc,0x84}}, + {{0xd0,0x8e}, {0xd0,0xa3,0xcc,0x86}}, + {{0xd3,0xb0}, {0xd0,0xa3,0xcc,0x88}}, + {{0xd3,0xb2}, {0xd0,0xa3,0xcc,0x8b}}, + {{0xd3,0xb4}, {0xd0,0xa7,0xcc,0x88}}, + {{0xd3,0xb8}, {0xd0,0xab,0xcc,0x88}}, + {{0xd3,0x91}, {0xd0,0xb0,0xcc,0x86}}, + {{0xd3,0x93}, {0xd0,0xb0,0xcc,0x88}}, + {{0xd1,0x93}, {0xd0,0xb3,0xcc,0x81}}, + {{0xd3,0x97}, {0xd0,0xb5,0xcc,0x86}}, + {{0xd1,0x91}, {0xd0,0xb5,0xcc,0x88}}, + {{0xd3,0x82}, {0xd0,0xb6,0xcc,0x86}}, + {{0xd3,0x9d}, {0xd0,0xb6,0xcc,0x88}}, + {{0xd3,0x9f}, {0xd0,0xb7,0xcc,0x88}}, + {{0xd3,0xa3}, {0xd0,0xb8,0xcc,0x84}}, + {{0xd0,0xb9}, {0xd0,0xb8,0xcc,0x86}}, + {{0xd3,0xa5}, {0xd0,0xb8,0xcc,0x88}}, + {{0xd1,0x9c}, {0xd0,0xba,0xcc,0x81}}, + {{0xd3,0xa7}, {0xd0,0xbe,0xcc,0x88}}, + {{0xd3,0xaf}, {0xd1,0x83,0xcc,0x84}}, + {{0xd1,0x9e}, {0xd1,0x83,0xcc,0x86}}, + {{0xd3,0xb1}, {0xd1,0x83,0xcc,0x88}}, + {{0xd3,0xb3}, {0xd1,0x83,0xcc,0x8b}}, + {{0xd3,0xb5}, {0xd1,0x87,0xcc,0x88}}, + {{0xd3,0xb9}, {0xd1,0x8b,0xcc,0x88}}, + {{0xd1,0x97}, {0xd1,0x96,0xcc,0x88}}, + {{0xd1,0xb6}, {0xd1,0xb4,0xcc,0x8f}}, + {{0xd1,0xb7}, {0xd1,0xb5,0xcc,0x8f}}, + {{0xef,0xac,0xae}, {0xd7,0x90,0xd6,0xb7}}, + {{0xef,0xac,0xaf}, {0xd7,0x90,0xd6,0xb8}}, + {{0xef,0xac,0xb0}, {0xd7,0x90,0xd6,0xbc}}, + {{0xef,0xac,0xb1}, {0xd7,0x91,0xd6,0xbc}}, + {{0xef,0xad,0x8c}, {0xd7,0x91,0xd6,0xbf}}, + {{0xef,0xac,0xb2}, {0xd7,0x92,0xd6,0xbc}}, + {{0xef,0xac,0xb3}, {0xd7,0x93,0xd6,0xbc}}, + {{0xef,0xac,0xb4}, {0xd7,0x94,0xd6,0xbc}}, + {{0xef,0xad,0x8b}, {0xd7,0x95,0xd6,0xb9}}, + {{0xef,0xac,0xb5}, {0xd7,0x95,0xd6,0xbc}}, + {{0xef,0xac,0xb6}, {0xd7,0x96,0xd6,0xbc}}, + {{0xef,0xac,0xb8}, {0xd7,0x98,0xd6,0xbc}}, + {{0xef,0xac,0xb9}, {0xd7,0x99,0xd6,0xbc}}, + {{0xef,0xac,0xba}, {0xd7,0x9a,0xd6,0xbc}}, + {{0xef,0xac,0xbb}, {0xd7,0x9b,0xd6,0xbc}}, + {{0xef,0xad,0x8d}, {0xd7,0x9b,0xd6,0xbf}}, + {{0xef,0xac,0xbc}, {0xd7,0x9c,0xd6,0xbc}}, + {{0xef,0xac,0xbe}, {0xd7,0x9e,0xd6,0xbc}}, + {{0xef,0xad,0x80}, {0xd7,0xa0,0xd6,0xbc}}, + {{0xef,0xad,0x81}, {0xd7,0xa1,0xd6,0xbc}}, + {{0xef,0xad,0x83}, {0xd7,0xa3,0xd6,0xbc}}, + {{0xef,0xad,0x84}, {0xd7,0xa4,0xd6,0xbc}}, + {{0xef,0xad,0x8e}, {0xd7,0xa4,0xd6,0xbf}}, + {{0xef,0xad,0x86}, {0xd7,0xa6,0xd6,0xbc}}, + {{0xef,0xad,0x87}, {0xd7,0xa7,0xd6,0xbc}}, + {{0xef,0xad,0x88}, {0xd7,0xa8,0xd6,0xbc}}, + {{0xef,0xad,0x89}, {0xd7,0xa9,0xd6,0xbc}}, + {{0xef,0xac,0xac}, {0xd7,0xa9,0xd6,0xbc,0xd7,0x81}}, + {{0xef,0xac,0xad}, {0xd7,0xa9,0xd6,0xbc,0xd7,0x82}}, + {{0xef,0xac,0xaa}, {0xd7,0xa9,0xd7,0x81}}, + {{0xef,0xac,0xab}, {0xd7,0xa9,0xd7,0x82}}, + {{0xef,0xad,0x8a}, {0xd7,0xaa,0xd6,0xbc}}, + {{0xef,0xac,0x9f}, {0xd7,0xb2,0xd6,0xb7}}, + {{0xe0,0xa5,0x98}, {0xe0,0xa4,0x95,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x99}, {0xe0,0xa4,0x96,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9a}, {0xe0,0xa4,0x97,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9b}, {0xe0,0xa4,0x9c,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9c}, {0xe0,0xa4,0xa1,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9d}, {0xe0,0xa4,0xa2,0xe0,0xa4,0xbc}}, + {{0xe0,0xa4,0xa9}, {0xe0,0xa4,0xa8,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9e}, {0xe0,0xa4,0xab,0xe0,0xa4,0xbc}}, + {{0xe0,0xa5,0x9f}, {0xe0,0xa4,0xaf,0xe0,0xa4,0xbc}}, + {{0xe0,0xa4,0xb1}, {0xe0,0xa4,0xb0,0xe0,0xa4,0xbc}}, + {{0xe0,0xa4,0xb4}, {0xe0,0xa4,0xb3,0xe0,0xa4,0xbc}}, + {{0xe0,0xa7,0x9c}, {0xe0,0xa6,0xa1,0xe0,0xa6,0xbc}}, + {{0xe0,0xa7,0x9d}, {0xe0,0xa6,0xa2,0xe0,0xa6,0xbc}}, + {{0xe0,0xa6,0xb0}, {0xe0,0xa6,0xac,0xe0,0xa6,0xbc}}, + {{0xe0,0xa7,0x9f}, {0xe0,0xa6,0xaf,0xe0,0xa6,0xbc}}, + {{0xe0,0xa7,0x8b}, {0xe0,0xa7,0x87,0xe0,0xa6,0xbe}}, + {{0xe0,0xa7,0x8c}, {0xe0,0xa7,0x87,0xe0,0xa7,0x97}}, + {{0xe0,0xa9,0x99}, {0xe0,0xa8,0x96,0xe0,0xa8,0xbc}}, + {{0xe0,0xa9,0x9a}, {0xe0,0xa8,0x97,0xe0,0xa8,0xbc}}, + {{0xe0,0xa9,0x9b}, {0xe0,0xa8,0x9c,0xe0,0xa8,0xbc}}, + {{0xe0,0xa9,0x9c}, {0xe0,0xa8,0xa1,0xe0,0xa8,0xbc}}, + {{0xe0,0xa9,0x9e}, {0xe0,0xa8,0xab,0xe0,0xa8,0xbc}}, + {{0xe0,0xad,0x9c}, {0xe0,0xac,0xa1,0xe0,0xac,0xbc}}, + {{0xe0,0xad,0x9d}, {0xe0,0xac,0xa2,0xe0,0xac,0xbc}}, + {{0xe0,0xad,0x9f}, {0xe0,0xac,0xaf,0xe0,0xac,0xbc}}, + {{0xe0,0xad,0x8b}, {0xe0,0xad,0x87,0xe0,0xac,0xbe}}, + {{0xe0,0xad,0x88}, {0xe0,0xad,0x87,0xe0,0xad,0x96}}, + {{0xe0,0xad,0x8c}, {0xe0,0xad,0x87,0xe0,0xad,0x97}}, + {{0xe0,0xae,0x94}, {0xe0,0xae,0x92,0xe0,0xaf,0x97}}, + {{0xe0,0xaf,0x8a}, {0xe0,0xaf,0x86,0xe0,0xae,0xbe}}, + {{0xe0,0xaf,0x8c}, {0xe0,0xaf,0x86,0xe0,0xaf,0x97}}, + {{0xe0,0xaf,0x8b}, {0xe0,0xaf,0x87,0xe0,0xae,0xbe}}, + {{0xe0,0xb1,0x88}, {0xe0,0xb1,0x86,0xe0,0xb1,0x96}}, + {{0xe0,0xb3,0x80}, {0xe0,0xb2,0xbf,0xe0,0xb3,0x95}}, + {{0xe0,0xb3,0x8a}, {0xe0,0xb3,0x86,0xe0,0xb3,0x82}}, + {{0xe0,0xb3,0x8b}, {0xe0,0xb3,0x86,0xe0,0xb3,0x82,0xe0,0xb3,0x95}}, + {{0xe0,0xb3,0x87}, {0xe0,0xb3,0x86,0xe0,0xb3,0x95}}, + {{0xe0,0xb3,0x88}, {0xe0,0xb3,0x86,0xe0,0xb3,0x96}}, + {{0xe0,0xb5,0x8a}, {0xe0,0xb5,0x86,0xe0,0xb4,0xbe}}, + {{0xe0,0xb5,0x8c}, {0xe0,0xb5,0x86,0xe0,0xb5,0x97}}, + {{0xe0,0xb5,0x8b}, {0xe0,0xb5,0x87,0xe0,0xb4,0xbe}}, + {{0xe0,0xb8,0xb3}, {0xe0,0xb9,0x8d,0xe0,0xb8,0xb2}}, + {{0xe0,0xba,0xb3}, {0xe0,0xbb,0x8d,0xe0,0xba,0xb2}}, + {{0xe0,0xbd,0xa9}, {0xe0,0xbd,0x80,0xe0,0xbe,0xb5}}, + {{0xe0,0xbd,0x83}, {0xe0,0xbd,0x82,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0x8d}, {0xe0,0xbd,0x8c,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0x92}, {0xe0,0xbd,0x91,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0x97}, {0xe0,0xbd,0x96,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0x9c}, {0xe0,0xbd,0x9b,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0xb3}, {0xe0,0xbd,0xb2,0xe0,0xbd,0xb1}}, + {{0xe0,0xbd,0xb5}, {0xe0,0xbd,0xb4,0xe0,0xbd,0xb1}}, + {{0xe0,0xbe,0x81}, {0xe0,0xbe,0x80,0xe0,0xbd,0xb1}}, + {{0xe0,0xbe,0xb9}, {0xe0,0xbe,0x90,0xe0,0xbe,0xb5}}, + {{0xe0,0xbe,0x93}, {0xe0,0xbe,0x92,0xe0,0xbe,0xb7}}, + {{0xe0,0xbe,0x9d}, {0xe0,0xbe,0x9c,0xe0,0xbe,0xb7}}, + {{0xe0,0xbe,0xa2}, {0xe0,0xbe,0xa1,0xe0,0xbe,0xb7}}, + {{0xe0,0xbe,0xa7}, {0xe0,0xbe,0xa6,0xe0,0xbe,0xb7}}, + {{0xe0,0xbe,0xac}, {0xe0,0xbe,0xab,0xe0,0xbe,0xb7}}, + {{0xe0,0xbd,0xb6}, {0xe0,0xbe,0xb2,0xe0,0xbe,0x80}}, + {{0xe0,0xbd,0xb7}, {0xe0,0xbe,0xb2,0xe0,0xbe,0x80,0xe0,0xbd,0xb1}}, + {{0xe0,0xbd,0xb8}, {0xe0,0xbe,0xb3,0xe0,0xbe,0x80}}, + {{0xe0,0xbd,0xb9}, {0xe0,0xbe,0xb3,0xe0,0xbe,0x80,0xe0,0xbd,0xb1}}, + {{0xe1,0xbf,0x8d}, {0xe1,0xbe,0xbf,0xcc,0x80}}, + {{0xe1,0xbf,0x8e}, {0xe1,0xbe,0xbf,0xcc,0x81}}, + {{0xe1,0xbf,0x8f}, {0xe1,0xbe,0xbf,0xcd,0x82}}, + {{0xe1,0xbf,0x9d}, {0xe1,0xbf,0xbe,0xcc,0x80}}, + {{0xe1,0xbf,0x9e}, {0xe1,0xbf,0xbe,0xcc,0x81}}, + {{0xe1,0xbf,0x9f}, {0xe1,0xbf,0xbe,0xcd,0x82}}, + {{0xe3,0x82,0x94}, {0xe3,0x81,0x86,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x8c}, {0xe3,0x81,0x8b,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x8e}, {0xe3,0x81,0x8d,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x90}, {0xe3,0x81,0x8f,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x92}, {0xe3,0x81,0x91,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x94}, {0xe3,0x81,0x93,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x96}, {0xe3,0x81,0x95,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x98}, {0xe3,0x81,0x97,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x9a}, {0xe3,0x81,0x99,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x9c}, {0xe3,0x81,0x9b,0xe3,0x82,0x99}}, + {{0xe3,0x81,0x9e}, {0xe3,0x81,0x9d,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xa0}, {0xe3,0x81,0x9f,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xa2}, {0xe3,0x81,0xa1,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xa5}, {0xe3,0x81,0xa4,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xa7}, {0xe3,0x81,0xa6,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xa9}, {0xe3,0x81,0xa8,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xb0}, {0xe3,0x81,0xaf,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xb1}, {0xe3,0x81,0xaf,0xe3,0x82,0x9a}}, + {{0xe3,0x81,0xb3}, {0xe3,0x81,0xb2,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xb4}, {0xe3,0x81,0xb2,0xe3,0x82,0x9a}}, + {{0xe3,0x81,0xb6}, {0xe3,0x81,0xb5,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xb7}, {0xe3,0x81,0xb5,0xe3,0x82,0x9a}}, + {{0xe3,0x81,0xb9}, {0xe3,0x81,0xb8,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xba}, {0xe3,0x81,0xb8,0xe3,0x82,0x9a}}, + {{0xe3,0x81,0xbc}, {0xe3,0x81,0xbb,0xe3,0x82,0x99}}, + {{0xe3,0x81,0xbd}, {0xe3,0x81,0xbb,0xe3,0x82,0x9a}}, + {{0xe3,0x82,0x9e}, {0xe3,0x82,0x9d,0xe3,0x82,0x99}}, + {{0xe3,0x83,0xb4}, {0xe3,0x82,0xa6,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xac}, {0xe3,0x82,0xab,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xae}, {0xe3,0x82,0xad,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xb0}, {0xe3,0x82,0xaf,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xb2}, {0xe3,0x82,0xb1,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xb4}, {0xe3,0x82,0xb3,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xb6}, {0xe3,0x82,0xb5,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xb8}, {0xe3,0x82,0xb7,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xba}, {0xe3,0x82,0xb9,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xbc}, {0xe3,0x82,0xbb,0xe3,0x82,0x99}}, + {{0xe3,0x82,0xbe}, {0xe3,0x82,0xbd,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x80}, {0xe3,0x82,0xbf,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x82}, {0xe3,0x83,0x81,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x85}, {0xe3,0x83,0x84,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x87}, {0xe3,0x83,0x86,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x89}, {0xe3,0x83,0x88,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x90}, {0xe3,0x83,0x8f,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x91}, {0xe3,0x83,0x8f,0xe3,0x82,0x9a}}, + {{0xe3,0x83,0x93}, {0xe3,0x83,0x92,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x94}, {0xe3,0x83,0x92,0xe3,0x82,0x9a}}, + {{0xe3,0x83,0x96}, {0xe3,0x83,0x95,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x97}, {0xe3,0x83,0x95,0xe3,0x82,0x9a}}, + {{0xe3,0x83,0x99}, {0xe3,0x83,0x98,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x9a}, {0xe3,0x83,0x98,0xe3,0x82,0x9a}}, + {{0xe3,0x83,0x9c}, {0xe3,0x83,0x9b,0xe3,0x82,0x99}}, + {{0xe3,0x83,0x9d}, {0xe3,0x83,0x9b,0xe3,0x82,0x9a}}, + {{0xe3,0x83,0xb7}, {0xe3,0x83,0xaf,0xe3,0x82,0x99}}, + {{0xe3,0x83,0xb8}, {0xe3,0x83,0xb0,0xe3,0x82,0x99}}, + {{0xe3,0x83,0xb9}, {0xe3,0x83,0xb1,0xe3,0x82,0x99}}, + {{0xe3,0x83,0xba}, {0xe3,0x83,0xb2,0xe3,0x82,0x99}}, + {{0xe3,0x83,0xbe}, {0xe3,0x83,0xbd,0xe3,0x82,0x99}}, +}; +#endif /* UNICODE_NORMALIZATION */ +#endif /* UTF8_INPUT_ENABLE */ + +#ifdef SHIFTJIS_CP932 +const unsigned short shiftjis_cp932[3][189] = { + { + 0xEEEF, 0xEEF0, 0xEEF1, 0xEEF2, 0xEEF3, 0xEEF4, 0xEEF5, 0xEEF6, + 0xEEF7, 0xEEF8, 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759, + 0x875A, 0x875B, 0x875C, 0x875D, 0x81CA, 0xEEFA, 0xEEFB, 0xEEFC, + 0x878A, 0x8782, 0x8784, 0x81E6, 0xED40, 0xED41, 0xED42, 0xED43, + 0xED44, 0xED45, 0xED46, 0xED47, 0xED48, 0xED49, 0xED4A, 0xED4B, + 0xED4C, 0xED4D, 0xED4E, 0xED4F, 0xED50, 0xED51, 0xED52, 0xED53, + 0xED54, 0xED55, 0xED56, 0xED57, 0xED58, 0xED59, 0xED5A, 0xED5B, + 0xED5C, 0xED5D, 0xED5E, 0xED5F, 0xED60, 0xED61, 0xED62, 0, + 0xED63, 0xED64, 0xED65, 0xED66, 0xED67, 0xED68, 0xED69, 0xED6A, + 0xED6B, 0xED6C, 0xED6D, 0xED6E, 0xED6F, 0xED70, 0xED71, 0xED72, + 0xED73, 0xED74, 0xED75, 0xED76, 0xED77, 0xED78, 0xED79, 0xED7A, + 0xED7B, 0xED7C, 0xED7D, 0xED7E, 0xED80, 0xED81, 0xED82, 0xED83, + 0xED84, 0xED85, 0xED86, 0xED87, 0xED88, 0xED89, 0xED8A, 0xED8B, + 0xED8C, 0xED8D, 0xED8E, 0xED8F, 0xED90, 0xED91, 0xED92, 0xED93, + 0xED94, 0xED95, 0xED96, 0xED97, 0xED98, 0xED99, 0xED9A, 0xED9B, + 0xED9C, 0xED9D, 0xED9E, 0xED9F, 0xEDA0, 0xEDA1, 0xEDA2, 0xEDA3, + 0xEDA4, 0xEDA5, 0xEDA6, 0xEDA7, 0xEDA8, 0xEDA9, 0xEDAA, 0xEDAB, + 0xEDAC, 0xEDAD, 0xEDAE, 0xEDAF, 0xEDB0, 0xEDB1, 0xEDB2, 0xEDB3, + 0xEDB4, 0xEDB5, 0xEDB6, 0xEDB7, 0xEDB8, 0xEDB9, 0xEDBA, 0xEDBB, + 0xEDBC, 0xEDBD, 0xEDBE, 0xEDBF, 0xEDC0, 0xEDC1, 0xEDC2, 0xEDC3, + 0xEDC4, 0xEDC5, 0xEDC6, 0xEDC7, 0xEDC8, 0xEDC9, 0xEDCA, 0xEDCB, + 0xEDCC, 0xEDCD, 0xEDCE, 0xEDCF, 0xEDD0, 0xEDD1, 0xEDD2, 0xEDD3, + 0xEDD4, 0xEDD5, 0xEDD6, 0xEDD7, 0xEDD8, 0xEDD9, 0xEDDA, 0xEDDB, + 0xEDDC, 0xEDDD, 0xEDDE, 0xEDDF, 0xEDE0, + }, + { + 0xEDE1, 0xEDE2, 0xEDE3, 0xEDE4, 0xEDE5, 0xEDE6, 0xEDE7, 0xEDE8, + 0xEDE9, 0xEDEA, 0xEDEB, 0xEDEC, 0xEDED, 0xEDEE, 0xEDEF, 0xEDF0, + 0xEDF1, 0xEDF2, 0xEDF3, 0xEDF4, 0xEDF5, 0xEDF6, 0xEDF7, 0xEDF8, + 0xEDF9, 0xEDFA, 0xEDFB, 0xEDFC, 0xEE40, 0xEE41, 0xEE42, 0xEE43, + 0xEE44, 0xEE45, 0xEE46, 0xEE47, 0xEE48, 0xEE49, 0xEE4A, 0xEE4B, + 0xEE4C, 0xEE4D, 0xEE4E, 0xEE4F, 0xEE50, 0xEE51, 0xEE52, 0xEE53, + 0xEE54, 0xEE55, 0xEE56, 0xEE57, 0xEE58, 0xEE59, 0xEE5A, 0xEE5B, + 0xEE5C, 0xEE5D, 0xEE5E, 0xEE5F, 0xEE60, 0xEE61, 0xEE62, 0, + 0xEE63, 0xEE64, 0xEE65, 0xEE66, 0xEE67, 0xEE68, 0xEE69, 0xEE6A, + 0xEE6B, 0xEE6C, 0xEE6D, 0xEE6E, 0xEE6F, 0xEE70, 0xEE71, 0xEE72, + 0xEE73, 0xEE74, 0xEE75, 0xEE76, 0xEE77, 0xEE78, 0xEE79, 0xEE7A, + 0xEE7B, 0xEE7C, 0xEE7D, 0xEE7E, 0xEE80, 0xEE81, 0xEE82, 0xEE83, + 0xEE84, 0xEE85, 0xEE86, 0xEE87, 0xEE88, 0xEE89, 0xEE8A, 0xEE8B, + 0xEE8C, 0xEE8D, 0xEE8E, 0xEE8F, 0xEE90, 0xEE91, 0xEE92, 0xEE93, + 0xEE94, 0xEE95, 0xEE96, 0xEE97, 0xEE98, 0xEE99, 0xEE9A, 0xEE9B, + 0xEE9C, 0xEE9D, 0xEE9E, 0xEE9F, 0xEEA0, 0xEEA1, 0xEEA2, 0xEEA3, + 0xEEA4, 0xEEA5, 0xEEA6, 0xEEA7, 0xEEA8, 0xEEA9, 0xEEAA, 0xEEAB, + 0xEEAC, 0xEEAD, 0xEEAE, 0xEEAF, 0xEEB0, 0xEEB1, 0xEEB2, 0xEEB3, + 0xEEB4, 0xEEB5, 0xEEB6, 0xEEB7, 0xEEB8, 0xEEB9, 0xEEBA, 0xEEBB, + 0xEEBC, 0xEEBD, 0xEEBE, 0xEEBF, 0xEEC0, 0xEEC1, 0xEEC2, 0xEEC3, + 0xEEC4, 0xEEC5, 0xEEC6, 0xEEC7, 0xEEC8, 0xEEC9, 0xEECA, 0xEECB, + 0xEECC, 0xEECD, 0xEECE, 0xEECF, 0xEED0, 0xEED1, 0xEED2, 0xEED3, + 0xEED4, 0xEED5, 0xEED6, 0xEED7, 0xEED8, 0xEED9, 0xEEDA, 0xEEDB, + 0xEEDC, 0xEEDD, 0xEEDE, 0xEEDF, 0xEEE0, + }, + { + 0xEEE1, 0xEEE2, 0xEEE3, 0xEEE4, 0xEEE5, 0xEEE6, 0xEEE7, 0xEEE8, + 0xEEE9, 0xEEEA, 0xEEEB, 0xEEEC, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, +}; +const unsigned short cp932inv[2][189] = { + { + 0xFA5C, 0xFA5D, 0xFA5E, 0xFA5F, 0xFA60, 0xFA61, 0xFA62, 0xFA63, + 0xFA64, 0xFA65, 0xFA66, 0xFA67, 0xFA68, 0xFA69, 0xFA6A, 0xFA6B, + 0xFA6C, 0xFA6D, 0xFA6E, 0xFA6F, 0xFA70, 0xFA71, 0xFA72, 0xFA73, + 0xFA74, 0xFA75, 0xFA76, 0xFA77, 0xFA78, 0xFA79, 0xFA7A, 0xFA7B, + 0xFA7C, 0xFA7D, 0xFA7E, 0xFA80, 0xFA81, 0xFA82, 0xFA83, 0xFA84, + 0xFA85, 0xFA86, 0xFA87, 0xFA88, 0xFA89, 0xFA8A, 0xFA8B, 0xFA8C, + 0xFA8D, 0xFA8E, 0xFA8F, 0xFA90, 0xFA91, 0xFA92, 0xFA93, 0xFA94, + 0xFA95, 0xFA96, 0xFA97, 0xFA98, 0xFA99, 0xFA9A, 0xFA9B, 0, + 0xFA9C, 0xFA9D, 0xFA9E, 0xFA9F, 0xFAA0, 0xFAA1, 0xFAA2, 0xFAA3, + 0xFAA4, 0xFAA5, 0xFAA6, 0xFAA7, 0xFAA8, 0xFAA9, 0xFAAA, 0xFAAB, + 0xFAAC, 0xFAAD, 0xFAAE, 0xFAAF, 0xFAB0, 0xFAB1, 0xFAB2, 0xFAB3, + 0xFAB4, 0xFAB5, 0xFAB6, 0xFAB7, 0xFAB8, 0xFAB9, 0xFABA, 0xFABB, + 0xFABC, 0xFABD, 0xFABE, 0xFABF, 0xFAC0, 0xFAC1, 0xFAC2, 0xFAC3, + 0xFAC4, 0xFAC5, 0xFAC6, 0xFAC7, 0xFAC8, 0xFAC9, 0xFACA, 0xFACB, + 0xFACC, 0xFACD, 0xFACE, 0xFACF, 0xFAD0, 0xFAD1, 0xFAD2, 0xFAD3, + 0xFAD4, 0xFAD5, 0xFAD6, 0xFAD7, 0xFAD8, 0xFAD9, 0xFADA, 0xFADB, + 0xFADC, 0xFADD, 0xFADE, 0xFADF, 0xFAE0, 0xFAE1, 0xFAE2, 0xFAE3, + 0xFAE4, 0xFAE5, 0xFAE6, 0xFAE7, 0xFAE8, 0xFAE9, 0xFAEA, 0xFAEB, + 0xFAEC, 0xFAED, 0xFAEE, 0xFAEF, 0xFAF0, 0xFAF1, 0xFAF2, 0xFAF3, + 0xFAF4, 0xFAF5, 0xFAF6, 0xFAF7, 0xFAF8, 0xFAF9, 0xFAFA, 0xFAFB, + 0xFAFC, 0xFB40, 0xFB41, 0xFB42, 0xFB43, 0xFB44, 0xFB45, 0xFB46, + 0xFB47, 0xFB48, 0xFB49, 0xFB4A, 0xFB4B, 0xFB4C, 0xFB4D, 0xFB4E, + 0xFB4F, 0xFB50, 0xFB51, 0xFB52, 0xFB53, 0xFB54, 0xFB55, 0xFB56, + 0xFB57, 0xFB58, 0xFB59, 0xFB5A, 0xFB5B, + }, + { + 0xFB5C, 0xFB5D, 0xFB5E, 0xFB5F, 0xFB60, 0xFB61, 0xFB62, 0xFB63, + 0xFB64, 0xFB65, 0xFB66, 0xFB67, 0xFB68, 0xFB69, 0xFB6A, 0xFB6B, + 0xFB6C, 0xFB6D, 0xFB6E, 0xFB6F, 0xFB70, 0xFB71, 0xFB72, 0xFB73, + 0xFB74, 0xFB75, 0xFB76, 0xFB77, 0xFB78, 0xFB79, 0xFB7A, 0xFB7B, + 0xFB7C, 0xFB7D, 0xFB7E, 0xFB80, 0xFB81, 0xFB82, 0xFB83, 0xFB84, + 0xFB85, 0xFB86, 0xFB87, 0xFB88, 0xFB89, 0xFB8A, 0xFB8B, 0xFB8C, + 0xFB8D, 0xFB8E, 0xFB8F, 0xFB90, 0xFB91, 0xFB92, 0xFB93, 0xFB94, + 0xFB95, 0xFB96, 0xFB97, 0xFB98, 0xFB99, 0xFB9A, 0xFB9B, 0, + 0xFB9C, 0xFB9D, 0xFB9E, 0xFB9F, 0xFBA0, 0xFBA1, 0xFBA2, 0xFBA3, + 0xFBA4, 0xFBA5, 0xFBA6, 0xFBA7, 0xFBA8, 0xFBA9, 0xFBAA, 0xFBAB, + 0xFBAC, 0xFBAD, 0xFBAE, 0xFBAF, 0xFBB0, 0xFBB1, 0xFBB2, 0xFBB3, + 0xFBB4, 0xFBB5, 0xFBB6, 0xFBB7, 0xFBB8, 0xFBB9, 0xFBBA, 0xFBBB, + 0xFBBC, 0xFBBD, 0xFBBE, 0xFBBF, 0xFBC0, 0xFBC1, 0xFBC2, 0xFBC3, + 0xFBC4, 0xFBC5, 0xFBC6, 0xFBC7, 0xFBC8, 0xFBC9, 0xFBCA, 0xFBCB, + 0xFBCC, 0xFBCD, 0xFBCE, 0xFBCF, 0xFBD0, 0xFBD1, 0xFBD2, 0xFBD3, + 0xFBD4, 0xFBD5, 0xFBD6, 0xFBD7, 0xFBD8, 0xFBD9, 0xFBDA, 0xFBDB, + 0xFBDC, 0xFBDD, 0xFBDE, 0xFBDF, 0xFBE0, 0xFBE1, 0xFBE2, 0xFBE3, + 0xFBE4, 0xFBE5, 0xFBE6, 0xFBE7, 0xFBE8, 0xFBE9, 0xFBEA, 0xFBEB, + 0xFBEC, 0xFBED, 0xFBEE, 0xFBEF, 0xFBF0, 0xFBF1, 0xFBF2, 0xFBF3, + 0xFBF4, 0xFBF5, 0xFBF6, 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB, + 0xFBFC, 0xFC40, 0xFC41, 0xFC42, 0xFC43, 0xFC44, 0xFC45, 0xFC46, + 0xFC47, 0xFC48, 0xFC49, 0xFC4A, 0xFC4B, 0, 0, 0xFA40, + 0xFA41, 0xFA42, 0xFA43, 0xFA44, 0xFA45, 0xFA46, 0xFA47, 0xFA48, + 0xFA49, 0x81CA, 0xFA55, 0xFA56, 0xFA57, + }, +}; +#endif /* SHIFTJIS_CP932 */ + +#ifdef X0212_ENABLE +const unsigned short shiftjis_x0212[3][189] = { + { + 0xF373, 0xF374, 0xF375, 0xF376, 0xF377, 0xF378, 0xF379, 0xF37A, + 0xF37B, 0xF37C, 0xF37D, 0xF37E, 0xF421, 0xF422, 0xF423, 0xF424, + 0xF425, 0xF426, 0xF427, 0xF428, 0x224C, 0xA243, 0xF429, 0xF42A, + 0xF42B, 0xF42C, 0xF42D, 0x2268, 0xD463, 0xDC5F, 0xE469, 0xE378, + 0xD921, 0xB13B, 0xF42E, 0xC22D, 0xC37C, 0xE450, 0xC23F, 0xBC74, + 0xB029, 0xB048, 0xF42F, 0xB052, 0xB054, 0xB063, 0xB06E, 0xB127, + 0xB123, 0xB12C, 0xB129, 0xB13E, 0xB15F, 0xB158, 0xB148, 0xB157, + 0xB163, 0xB174, 0xB161, 0xB223, 0xF430, 0xB23B, 0xB266, 0, + 0xB26D, 0xB275, 0xB27C, 0xF431, 0xB335, 0xB358, 0xB35B, 0xB365, + 0xB36E, 0xB37B, 0xF432, 0xF433, 0xB440, 0xB447, 0xB450, 0xB45E, + 0xF434, 0xB52A, 0xF435, 0xB52F, 0xB544, 0xB568, 0xF436, 0xB742, + 0xB764, 0xB768, 0xB767, 0xF437, 0xF438, 0xF439, 0xB84E, 0xB861, + 0xB875, 0xB877, 0xB878, 0xB87C, 0xB92F, 0xB937, 0xBA3E, 0xBA5B, + 0xCD2A, 0xBA61, 0xF43A, 0xBA6B, 0xBB33, 0xBB38, 0xF43B, 0xBB4A, + 0xF43C, 0xF43D, 0xBB50, 0xBB5E, 0xBB74, 0xBB75, 0xBB79, 0xBC64, + 0xBC6D, 0xBC7E, 0xF43E, 0xBD42, 0xBD67, 0xF43F, 0xBD70, 0xBE30, + 0xBE2C, 0xF440, 0xBE33, 0xBE3D, 0xBE4D, 0xBE49, 0xBE64, 0xBF28, + 0xBF49, 0xC044, 0xC064, 0xC074, 0xC126, 0xF441, 0xC175, 0xC17C, + 0xF442, 0xC178, 0xC22B, 0xC221, 0xC225, 0xF443, 0xC238, 0xC23A, + 0xF444, 0xC244, 0xC252, 0xC257, 0xC25B, 0xC25E, 0xC26D, 0xC270, + 0xF445, 0xC321, 0xC335, 0xC349, 0xC339, 0xF446, 0xC358, 0xC37E, + 0xF447, 0xC44C, 0xF448, 0xC459, 0xC46A, 0xC47D, 0xF449, 0xC527, + 0xC535, 0xC536, 0xF44A, 0xC555, 0xC638, 0xC657, 0xC660, 0xC66A, + 0xC663, 0xC721, 0xC72B, 0xC747, 0xC743, + }, + { + 0xC74B, 0xC74F, 0xC759, 0xF44B, 0xF44C, 0xC766, 0xC76E, 0xC77C, + 0xC76B, 0xC770, 0xC831, 0xC865, 0xC878, 0xC926, 0xC92B, 0xC92D, + 0xF44D, 0xC94A, 0xC953, 0xC969, 0xC963, 0xC97C, 0xC974, 0xC975, + 0xF44E, 0xCA33, 0xCA3D, 0xCA6F, 0xCA71, 0xCB2E, 0xF44F, 0xCB4A, + 0xCB66, 0xCB6A, 0xCB70, 0xCB74, 0xCB6E, 0xCC25, 0xCB79, 0xCC2B, + 0xCC2E, 0xCC2D, 0xCC32, 0xCC42, 0xCC50, 0xCC59, 0xF450, 0xCD3B, + 0xF451, 0xCE3B, 0xF452, 0xCE3A, 0xCE43, 0xF453, 0xCE72, 0xB35D, + 0xCF55, 0xCF62, 0xCF69, 0xCF6D, 0xF454, 0xF455, 0xF456, 0, + 0xF457, 0xD065, 0xF458, 0xD069, 0xD168, 0xF459, 0xF45A, 0xD16C, + 0xD23B, 0xF45B, 0xD361, 0xD368, 0xD427, 0xF45C, 0xF45D, 0xD454, + 0xD472, 0xD52E, 0xF45E, 0xD75E, 0xF45F, 0xD822, 0xD837, 0xD841, + 0xD851, 0xD874, 0xD946, 0xD948, 0xD951, 0xF460, 0xF461, 0xF462, + 0xF463, 0xF464, 0xDC53, 0xDD48, 0xDD54, 0xDD6A, 0xDD7A, 0xDE24, + 0xDE30, 0xF465, 0xDE35, 0xDE4B, 0xF466, 0xDF39, 0xF467, 0xDF43, + 0xF468, 0xF469, 0xE059, 0xF46A, 0xF46B, 0xE162, 0xF46C, 0xF46D, + 0xF46E, 0xE247, 0xE328, 0xE326, 0xE329, 0xE32F, 0xE330, 0xE32A, + 0xE32B, 0xE33C, 0xE341, 0xE33F, 0xE355, 0xE358, 0xE356, 0xE35F, + 0xE363, 0xE361, 0xE354, 0xE369, 0xE426, 0xE371, 0xE372, 0xE44B, + 0xE441, 0xE443, 0xE43E, 0xF46F, 0xE440, 0xE447, 0xE43F, 0xE460, + 0xE45E, 0xE451, 0xF470, 0xE45C, 0xE452, 0xE45B, 0xE454, 0xE47A, + 0xE46F, 0xE533, 0xE53F, 0xE549, 0xE550, 0xE562, 0xE56A, 0xE56B, + 0xF471, 0xF472, 0xF473, 0xE668, 0xE66F, 0xE72C, 0xF474, 0xE72E, + 0xF475, 0xE731, 0xF476, 0xE732, 0xE831, 0xE836, 0xF477, 0xF478, + 0xE85D, 0xF479, 0xF47A, 0xE951, 0xF47B, + }, + { + 0xE96D, 0xEA4D, 0xF47C, 0xEA5B, 0xEA66, 0xEA6A, 0xEB25, 0xEB7B, + 0xEB7A, 0xF47D, 0xEC56, 0xF47E, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, +}; + +static const unsigned short x0212_shiftjis_A2[] = { + 0x819F, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0x8143, 0, 0, 0x8150, 0, 0, 0x8160, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA55, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B0[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0xFA68, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA69, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFA6B, 0, 0xFA6C, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA6D, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFA6E, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B1[] = { + 0, 0, 0xFA70, 0, 0, 0, 0xFA6F, + 0, 0xFA72, 0, 0, 0xFA71, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA61, 0, 0, 0xFA73, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA76, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFA77, + 0xFA75, 0, 0, 0, 0, 0, 0, 0xFA74, + 0, 0xFA7A, 0, 0xFA78, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFA79, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B2[] = { + 0, 0, 0xFA7B, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA7D, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFA7E, 0, + 0, 0, 0, 0, 0, 0xFA80, 0, 0, + 0, 0, 0, 0, 0, 0xFA81, 0, 0, + 0, 0, 0, 0, 0xFA82, 0, 0, +}; +static const unsigned short x0212_shiftjis_B3[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFA84, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA85, 0, 0, 0xFA86, 0, 0xFB77, 0, 0, + 0, 0, 0, 0, 0, 0xFA87, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFA88, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA89, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B4[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA8C, 0, 0, 0, 0, 0, 0, 0xFA8D, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA8E, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFA8F, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B5[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFA91, 0, 0, 0, 0, 0xFA93, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFA94, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFA95, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B7[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFA97, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFA98, 0, 0, 0xFA9A, + 0xFA99, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_B8[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFA9E, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFA9F, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAA0, 0, 0xFAA1, + 0xFAA2, 0, 0, 0, 0xFAA3, 0, 0, +}; +static const unsigned short x0212_shiftjis_B9[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFAA4, + 0, 0, 0, 0, 0, 0, 0, 0xFAA5, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_BA[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFAA6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFAA7, 0, 0, 0, 0, + 0, 0xFAA9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFAAB, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_BB[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFAAC, 0, 0, 0, 0, + 0xFAAD, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFAAF, 0, 0, 0, 0, 0, + 0xFAB2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFAB3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAB4, 0xFAB5, 0, 0, + 0, 0xFAB6, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_BC[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAB7, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAB8, 0, 0, + 0, 0, 0, 0, 0xFA67, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFAB9, +}; +static const unsigned short x0212_shiftjis_BD[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFABB, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFABC, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFABE, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_BE[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAC0, 0, 0, 0, + 0xFABF, 0, 0, 0xFAC2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAC3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFAC5, 0, 0, 0, 0xFAC4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAC6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_BF[] = { + 0, 0, 0, 0, 0, 0, 0, + 0xFAC7, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFAC8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C0[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAC9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFACA, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFACB, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C1[] = { + 0, 0, 0, 0, 0, 0xFACC, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFACE, 0, 0, + 0xFAD1, 0, 0, 0, 0xFACF, 0, 0, +}; +static const unsigned short x0212_shiftjis_C2[] = { + 0xFAD3, 0, 0, 0, 0xFAD4, 0, 0, + 0, 0, 0, 0xFAD2, 0, 0xFA63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFAD6, 0, 0xFAD7, 0, 0, 0, 0, 0xFA66, + 0, 0, 0, 0, 0xFAD9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFADA, 0, 0, 0, 0, 0xFADB, + 0, 0, 0, 0xFADC, 0, 0, 0xFADD, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFADE, 0, 0, + 0xFADF, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C3[] = { + 0xFAE1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAE2, 0, 0, + 0, 0xFAE4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFAE3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFAE6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFA64, 0, 0xFAE7, +}; +static const unsigned short x0212_shiftjis_C4[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFAE9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFAEB, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFAEC, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAED, 0, +}; +static const unsigned short x0212_shiftjis_C5[] = { + 0, 0, 0, 0, 0, 0, 0xFAEF, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAF0, 0xFAF1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFAF3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C6[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFAF4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFAF5, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFAF6, 0, 0, 0xFAF8, 0, 0, 0, 0, + 0, 0, 0xFAF7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C7[] = { + 0xFAF9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFAFA, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFAFC, 0, 0, 0, 0xFAFB, + 0, 0, 0, 0xFB40, 0, 0, 0, 0xFB41, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB42, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB45, 0, + 0, 0, 0, 0xFB48, 0, 0, 0xFB46, 0, + 0xFB49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFB47, 0, 0, +}; +static const unsigned short x0212_shiftjis_C8[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB4A, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFB4B, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFB4C, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_C9[] = { + 0, 0, 0, 0, 0, 0xFB4D, 0, + 0, 0, 0, 0xFB4E, 0, 0xFB4F, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB51, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFB52, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFB54, 0, 0, 0, 0, + 0, 0xFB53, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFB56, 0xFB57, 0, 0, + 0, 0, 0, 0, 0xFB55, 0, 0, +}; +static const unsigned short x0212_shiftjis_CA[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFB59, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFB5A, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFB5B, + 0, 0xFB5C, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_CB[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB5D, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB5F, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB60, 0, + 0, 0, 0xFB61, 0, 0, 0, 0xFB64, 0, + 0xFB62, 0, 0, 0, 0xFB63, 0, 0, 0, + 0, 0xFB66, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_CC[] = { + 0, 0, 0, 0, 0xFB65, 0, 0, + 0, 0, 0, 0xFB67, 0, 0xFB69, 0xFB68, 0, + 0, 0, 0xFB6A, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB6B, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFB6C, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB6D, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_CD[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFAA8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFB6F, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_CE[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB73, 0xFB71, 0, 0, 0, 0, + 0, 0, 0, 0xFB74, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB76, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_CF[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFB78, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB79, 0, 0, 0, 0, 0, + 0, 0xFB7A, 0, 0, 0, 0xFB7B, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D0[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFB81, 0, 0, + 0, 0xFB83, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D1[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFB84, 0, 0, 0, 0xFB87, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D2[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFB88, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D3[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB8A, 0, 0, 0, 0, 0, 0, + 0xFB8B, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D4[] = { + 0, 0, 0, 0, 0, 0, 0xFB8C, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFB8F, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA5C, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFB90, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D5[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB91, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D7[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB93, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D8[] = { + 0, 0xFB95, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFB96, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB97, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB98, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFB99, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_D9[] = { + 0xFA60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFB9A, 0, + 0xFB9B, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFB9C, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_DC[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFBA2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFA5D, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_DD[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFBA3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFBA4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFBA5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFBA6, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_DE[] = { + 0, 0, 0, 0xFBA7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFBA8, 0, 0, 0, 0, 0xFBAA, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFBAB, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_DF[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFBAD, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFBAF, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E0[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFBB2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E1[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFBB5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E2[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFBB9, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E3[] = { + 0, 0, 0, 0, 0, 0xFBBB, 0, + 0xFBBA, 0xFBBC, 0xFBBF, 0xFBC0, 0, 0, 0, 0xFBBD, + 0xFBBE, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFBC1, 0, 0, 0xFBC3, + 0, 0xFBC2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFBCA, 0xFBC4, 0xFBC6, 0, + 0xFBC5, 0, 0, 0, 0, 0, 0, 0xFBC7, + 0, 0xFBC9, 0, 0xFBC8, 0, 0, 0, 0, + 0, 0xFBCB, 0, 0, 0, 0, 0, 0, + 0, 0xFBCD, 0xFBCE, 0, 0, 0, 0, 0, + 0xFA5F, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E4[] = { + 0, 0, 0, 0, 0, 0xFBCC, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFBD2, 0xFBD6, + 0xFBD4, 0xFBD0, 0, 0xFBD1, 0, 0, 0, 0xFBD5, + 0, 0, 0, 0xFBCF, 0, 0, 0, 0, + 0xFA65, 0xFBD9, 0xFBDC, 0, 0xFBDE, 0, 0, 0, + 0, 0, 0, 0xFBDD, 0xFBDB, 0, 0xFBD8, 0, + 0xFBD7, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFA5E, 0, 0, 0, 0, 0, 0xFBE0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFBDF, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E5[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFBE1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0xFBE2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFBE3, 0, 0, 0, 0, 0, 0, + 0xFBE4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFBE5, 0, 0, 0, 0, 0, + 0, 0, 0xFBE6, 0xFBE7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E6[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0xFBEB, 0, 0, 0, 0, 0, 0, 0xFBEC, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E7[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0xFBED, 0, 0xFBEF, 0, + 0, 0xFBF1, 0xFBF3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E8[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFBF4, 0, 0, 0, 0, 0xFBF5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFBF8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_E9[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0xFBFB, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFC40, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_EA[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0xFC41, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFC43, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFC44, 0, + 0, 0, 0xFC45, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_EB[] = { + 0, 0, 0, 0, 0xFC46, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0xFC48, 0xFC47, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_EC[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0xFC4A, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, +}; +static const unsigned short x0212_shiftjis_F3[] = { + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0xFA40, 0xFA41, 0xFA42, 0xFA43, 0xFA44, + 0xFA45, 0xFA46, 0xFA47, 0xFA48, 0xFA49, 0xFA4A, 0xFA4B, +}; +static const unsigned short x0212_shiftjis_F4[] = { + 0xFA4C, 0xFA4D, 0xFA4E, 0xFA4F, 0xFA50, 0xFA51, 0xFA52, + 0xFA53, 0xFA56, 0xFA57, 0xFA58, 0xFA59, 0xFA5A, 0xFA62, 0xFA6A, + 0xFA7C, 0xFA83, 0xFA8A, 0xFA8B, 0xFA90, 0xFA92, 0xFA96, 0xFA9B, + 0xFA9C, 0xFA9D, 0xFAAA, 0xFAAE, 0xFAB0, 0xFAB1, 0xFABA, 0xFABD, + 0xFAC1, 0xFACD, 0xFAD0, 0xFAD5, 0xFAD8, 0xFAE0, 0xFAE5, 0xFAE8, + 0xFAEA, 0xFAEE, 0xFAF2, 0xFB43, 0xFB44, 0xFB50, 0xFB58, 0xFB5E, + 0xFB6E, 0xFB70, 0xFB72, 0xFB75, 0xFB7C, 0xFB7D, 0xFB7E, 0xFB80, + 0xFB82, 0xFB85, 0xFB86, 0xFB89, 0xFB8D, 0xFB8E, 0xFB92, 0xFB94, + 0xFB9D, 0xFB9E, 0xFB9F, 0xFBA0, 0xFBA1, 0xFBA9, 0xFBAC, 0xFBAE, + 0xFBB0, 0xFBB1, 0xFBB3, 0xFBB4, 0xFBB6, 0xFBB7, 0xFBB8, 0xFBD3, + 0xFBDA, 0xFBE8, 0xFBE9, 0xFBEA, 0xFBEE, 0xFBF0, 0xFBF2, 0xFBF6, + 0xFBF7, 0xFBF9, 0xFBFA, 0xFBFC, 0xFC42, 0xFC49, 0xFC4B, +}; +const unsigned short *const x0212_shiftjis[] = { + 0, x0212_shiftjis_A2, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + x0212_shiftjis_B0, x0212_shiftjis_B1, x0212_shiftjis_B2, x0212_shiftjis_B3, + x0212_shiftjis_B4, x0212_shiftjis_B5, 0, x0212_shiftjis_B7, + x0212_shiftjis_B8, x0212_shiftjis_B9, x0212_shiftjis_BA, x0212_shiftjis_BB, + x0212_shiftjis_BC, x0212_shiftjis_BD, x0212_shiftjis_BE, x0212_shiftjis_BF, + x0212_shiftjis_C0, x0212_shiftjis_C1, x0212_shiftjis_C2, x0212_shiftjis_C3, + x0212_shiftjis_C4, x0212_shiftjis_C5, x0212_shiftjis_C6, x0212_shiftjis_C7, + x0212_shiftjis_C8, x0212_shiftjis_C9, x0212_shiftjis_CA, x0212_shiftjis_CB, + x0212_shiftjis_CC, x0212_shiftjis_CD, x0212_shiftjis_CE, x0212_shiftjis_CF, + x0212_shiftjis_D0, x0212_shiftjis_D1, x0212_shiftjis_D2, x0212_shiftjis_D3, + x0212_shiftjis_D4, x0212_shiftjis_D5, 0, x0212_shiftjis_D7, + x0212_shiftjis_D8, x0212_shiftjis_D9, 0, 0, + x0212_shiftjis_DC, x0212_shiftjis_DD, x0212_shiftjis_DE, x0212_shiftjis_DF, + x0212_shiftjis_E0, x0212_shiftjis_E1, x0212_shiftjis_E2, x0212_shiftjis_E3, + x0212_shiftjis_E4, x0212_shiftjis_E5, x0212_shiftjis_E6, x0212_shiftjis_E7, + x0212_shiftjis_E8, x0212_shiftjis_E9, x0212_shiftjis_EA, x0212_shiftjis_EB, + x0212_shiftjis_EC, 0, 0, 0, + 0, 0, 0, x0212_shiftjis_F3, + x0212_shiftjis_F4, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, +}; +#endif /* X0212_ENABLE */ diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.h b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.h new file mode 100644 index 0000000..1842efe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf-utf8/utf8tbl.h @@ -0,0 +1,61 @@ +/* + * utf8tbl.h - Header file for Convertion Table + * + * $Id: utf8tbl.h 15266 2008-01-27 07:28:26Z naruse $ + */ + +#ifndef _UTF8TBL_H_ +#define _UTF8TBL_H_ + +#ifdef UTF8_OUTPUT_ENABLE +#define sizeof_euc_to_utf8_1byte 94 +#define sizeof_euc_to_utf8_2bytes 94 +extern const unsigned short euc_to_utf8_1byte[]; +extern const unsigned short *const euc_to_utf8_2bytes[]; +extern const unsigned short *const euc_to_utf8_2bytes_ms[]; +extern const unsigned short *const euc_to_utf8_2bytes_mac[]; +extern const unsigned short *const x0212_to_utf8_2bytes[]; +#endif /* UTF8_OUTPUT_ENABLE */ + +#ifdef UTF8_INPUT_ENABLE +#define sizeof_utf8_to_euc_C2 64 +#define sizeof_utf8_to_euc_E5B8 64 +#define sizeof_utf8_to_euc_2bytes 112 +#define sizeof_utf8_to_euc_3bytes 16 +extern const unsigned short *const utf8_to_euc_2bytes[]; +extern const unsigned short *const utf8_to_euc_2bytes_ms[]; +extern const unsigned short *const utf8_to_euc_2bytes_932[]; +extern const unsigned short *const utf8_to_euc_2bytes_mac[]; +extern const unsigned short *const *const utf8_to_euc_3bytes[]; +extern const unsigned short *const *const utf8_to_euc_3bytes_ms[]; +extern const unsigned short *const *const utf8_to_euc_3bytes_932[]; +extern const unsigned short *const *const utf8_to_euc_3bytes_mac[]; +#endif /* UTF8_INPUT_ENABLE */ + +#ifdef UNICODE_NORMALIZATION + +#define NORMALIZATION_TABLE_LENGTH 942 +#define NORMALIZATION_TABLE_NFC_LENGTH 3 +#define NORMALIZATION_TABLE_NFD_LENGTH 9 +struct normalization_pair { + const unsigned char nfc[NORMALIZATION_TABLE_NFC_LENGTH]; + const unsigned char nfd[NORMALIZATION_TABLE_NFD_LENGTH]; +}; +extern const struct normalization_pair normalization_table[]; +#endif + +#ifdef SHIFTJIS_CP932 +#define CP932_TABLE_BEGIN 0xFA +#define CP932_TABLE_END 0xFC +extern const unsigned short shiftjis_cp932[3][189]; +#define CP932INV_TABLE_BEGIN 0xED +#define CP932INV_TABLE_END 0xEE +extern const unsigned short cp932inv[2][189]; +#endif /* SHIFTJIS_CP932 */ + +#ifdef X0212_ENABLE +extern const unsigned short shiftjis_x0212[3][189]; +extern const unsigned short *const x0212_shiftjis[]; +#endif /* X0212_ENABLE */ + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/nkf/nkf.c b/lib/ruby-1.9.1-rc1/ext/nkf/nkf.c new file mode 100644 index 0000000..8f8c111 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/nkf/nkf.c @@ -0,0 +1,502 @@ +/* + * NKF - Ruby extension for Network Kanji Filter + * + * original nkf2.x is maintained at http://sourceforge.jp/projects/nkf/ + * + * $Id: nkf.c 19959 2008-10-27 03:04:22Z kazu $ + * + */ + +#define RUBY_NKF_REVISION "$Revision: 19959 $" +#define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")" + +#include "ruby/ruby.h" +#include "ruby/encoding.h" + +/* Replace nkf's getchar/putchar for variable modification */ +/* we never use getc, ungetc */ + +#undef getc +#undef ungetc +#define getc(f) (input_ctr>=i_len?-1:input[input_ctr++]) +#define ungetc(c,f) input_ctr-- + +#define INCSIZE 32 +#undef putchar +#undef TRUE +#undef FALSE +#define putchar(c) rb_nkf_putchar(c) + +/* Input/Output pointers */ + +static unsigned char *output; +static unsigned char *input; +static int input_ctr; +static int i_len; +static int output_ctr; +static int o_len; +static int incsize; + +static VALUE result; + +static int +rb_nkf_putchar(unsigned int c) +{ + if (output_ctr >= o_len) { + o_len += incsize; + rb_str_resize(result, o_len); + incsize *= 2; + output = (unsigned char *)RSTRING_PTR(result); + } + output[output_ctr++] = c; + + return c; +} + +/* Include kanji filter main part */ +/* getchar and putchar will be replaced during inclusion */ + +#define PERL_XS 1 +#include "nkf-utf8/config.h" +#include "nkf-utf8/utf8tbl.c" +#include "nkf-utf8/nkf.c" + +rb_encoding* rb_nkf_enc_get(const char *name) +{ + int idx = rb_enc_find_index(name); + if (idx < 0) { + nkf_encoding *nkf_enc = nkf_enc_find(name); + idx = rb_enc_find_index(nkf_enc_name(nkf_enc_to_base_encoding(nkf_enc))); + if (idx < 0) { + idx = rb_define_dummy_encoding(name); + } + } + return rb_enc_from_index(idx); +} + +int nkf_split_options(const char *arg) +{ + int count = 0; + unsigned char option[256]; + int i = 0, j = 0; + int is_escaped = FALSE; + int is_single_quoted = FALSE; + int is_double_quoted = FALSE; + for(i = 0; arg[i]; i++){ + if(j == 255){ + return -1; + }else if(is_single_quoted){ + if(arg[i] == '\''){ + is_single_quoted = FALSE; + }else{ + option[j++] = arg[i]; + } + }else if(is_escaped){ + is_escaped = FALSE; + option[j++] = arg[i]; + }else if(arg[i] == '\\'){ + is_escaped = TRUE; + }else if(is_double_quoted){ + if(arg[i] == '"'){ + is_double_quoted = FALSE; + }else{ + option[j++] = arg[i]; + } + }else if(arg[i] == '\''){ + is_single_quoted = TRUE; + }else if(arg[i] == '"'){ + is_double_quoted = TRUE; + }else if(arg[i] == ' '){ + option[j] = '\0'; + options(option); + j = 0; + }else{ + option[j++] = arg[i]; + } + } + if(j){ + option[j] = '\0'; + options(option); + } + return count; +} + +/* + * call-seq: + * NKF.nkf(opt, str) => string + * + * Convert _str_ and return converted result. + * Conversion details are specified by _opt_ as String. + * + * require 'nkf' + * output = NKF.nkf("-s", input) + */ + +static VALUE +rb_nkf_convert(VALUE obj, VALUE opt, VALUE src) +{ + volatile VALUE tmp; + reinit(); + StringValue(opt); + nkf_split_options(RSTRING_PTR(opt)); + if (!output_encoding) rb_raise(rb_eArgError, "no output encoding given"); + + switch (nkf_enc_to_index(output_encoding)) { + case UTF_8_BOM: output_encoding = nkf_enc_from_index(UTF_8); break; + case UTF_16BE_BOM: output_encoding = nkf_enc_from_index(UTF_16BE); break; + case UTF_16LE_BOM: output_encoding = nkf_enc_from_index(UTF_16LE); break; + case UTF_32BE_BOM: output_encoding = nkf_enc_from_index(UTF_32BE); break; + case UTF_32LE_BOM: output_encoding = nkf_enc_from_index(UTF_32LE); break; + } + output_bom_f = FALSE; + + incsize = INCSIZE; + + input_ctr = 0; + StringValue(src); + input = (unsigned char *)RSTRING_PTR(src); + i_len = RSTRING_LEN(src); + tmp = result = rb_str_new(0, i_len*3 + 10); + + output_ctr = 0; + output = (unsigned char *)RSTRING_PTR(result); + o_len = RSTRING_LEN(result); + *output = '\0'; + + kanji_convert(NULL); + rb_str_set_len(result, output_ctr); + OBJ_INFECT(result, src); + + if (mimeout_f) + rb_enc_associate(result, rb_usascii_encoding()); + else + rb_enc_associate(result, rb_nkf_enc_get(nkf_enc_name(output_encoding))); + + return result; +} + + +/* + * call-seq: + * NKF.guess(str) => encoding + * + * Returns guessed encoding of _str_ by nkf routine. + * + */ + +static VALUE +rb_nkf_guess(VALUE obj, VALUE src) +{ + reinit(); + + input_ctr = 0; + StringValue(src); + input = (unsigned char *)RSTRING_PTR(src); + i_len = RSTRING_LEN(src); + + guess_f = TRUE; + kanji_convert( NULL ); + guess_f = FALSE; + + return rb_enc_from_encoding(rb_nkf_enc_get(get_guessed_code())); +} + + +/* + * NKF - Ruby extension for Network Kanji Filter + * + * == Description + * + * This is a Ruby Extension version of nkf (Network Kanji Filter). + * It converts the first argument and returns converted result. Conversion + * details are specified by flags as the first argument. + * + * *Nkf* is a yet another kanji code converter among networks, hosts and terminals. + * It converts input kanji code to designated kanji code + * such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 or UTF-16. + * + * One of the most unique faculty of *nkf* is the guess of the input kanji encodings. + * It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 and UTF-16. + * So users needn't set the input kanji code explicitly. + * + * By default, X0201 kana is converted into X0208 kana. + * For X0201 kana, SO/SI, SSO and ESC-(-I methods are supported. + * For automatic code detection, nkf assumes no X0201 kana in Shift_JIS. + * To accept X0201 in Shift_JIS, use -X, -x or -S. + * + * == Flags + * + * === -b -u + * + * Output is buffered (DEFAULT), Output is unbuffered. + * + * === -j -s -e -w -w16 -w32 + * + * Output code is ISO-2022-JP (7bit JIS), Shift_JIS, EUC-JP, + * UTF-8N, UTF-16BE, UTF-32BE. + * Without this option and compile option, ISO-2022-JP is assumed. + * + * === -J -S -E -W -W16 -W32 + * + * Input assumption is JIS 7 bit, Shift_JIS, EUC-JP, + * UTF-8, UTF-16, UTF-32. + * + * ==== -J + * + * Assume JIS input. It also accepts EUC-JP. + * This is the default. This flag does not exclude Shift_JIS. + * + * ==== -S + * + * Assume Shift_JIS and X0201 kana input. It also accepts JIS. + * EUC-JP is recognized as X0201 kana. Without -x flag, + * X0201 kana (halfwidth kana) is converted into X0208. + * + * ==== -E + * + * Assume EUC-JP input. It also accepts JIS. + * Same as -J. + * + * === -t + * + * No conversion. + * + * === -i_ + * + * Output sequence to designate JIS-kanji. (DEFAULT B) + * + * === -o_ + * + * Output sequence to designate ASCII. (DEFAULT B) + * + * === -r + * + * {de/en}crypt ROT13/47 + * + * === -h[123] --hiragana --katakana --katakana-hiragana + * + * [-h1 --hiragana] Katakana to Hiragana conversion. + * + * [-h2 --katakana] Hiragana to Katakana conversion. + * + * [-h3 --katakana-hiragana] Katakana to Hiragana and Hiragana to Katakana conversion. + * + * === -T + * + * Text mode output (MS-DOS) + * + * === -l + * + * ISO8859-1 (Latin-1) support + * + * === -f[m [- n]] + * + * Folding on m length with n margin in a line. + * Without this option, fold length is 60 and fold margin is 10. + * + * === -F + * + * New line preserving line folding. + * + * === -Z[0-3] + * + * Convert X0208 alphabet (Fullwidth Alphabets) to ASCII. + * + * [-Z -Z0] Convert X0208 alphabet to ASCII. + * + * [-Z1] Converts X0208 kankaku to single ASCII space. + * + * [-Z2] Converts X0208 kankaku to double ASCII spaces. + * + * [-Z3] Replacing Fullwidth >, <, ", & into '>', '<', '"', '&' as in HTML. + * + * === -X -x + * + * Assume X0201 kana in MS-Kanji. + * With -X or without this option, X0201 is converted into X0208 Kana. + * With -x, try to preserve X0208 kana and do not convert X0201 kana to X0208. + * In JIS output, ESC-(-I is used. In EUC output, SSO is used. + * + * === -B[0-2] + * + * Assume broken JIS-Kanji input, which lost ESC. + * Useful when your site is using old B-News Nihongo patch. + * + * [-B1] allows any char after ESC-( or ESC-$. + * + * [-B2] forces ASCII after NL. + * + * === -I + * + * Replacing non iso-2022-jp char into a geta character + * (substitute character in Japanese). + * + * === -d -c + * + * Delete \r in line feed, Add \r in line feed. + * + * === -m[BQN0] + * + * MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT) + * To see ISO8859-1 (Latin-1) -l is necessary. + * + * [-mB] Decode MIME base64 encoded stream. Remove header or other part before + * conversion. + * + * [-mQ] Decode MIME quoted stream. '_' in quoted stream is converted to space. + * + * [-mN] Non-strict decoding. + * It allows line break in the middle of the base64 encoding. + * + * [-m0] No MIME decode. + * + * === -M + * + * MIME encode. Header style. All ASCII code and control characters are intact. + * Kanji conversion is performed before encoding, so this cannot be used as a picture encoder. + * + * [-MB] MIME encode Base64 stream. + * + * [-MQ] Perfome quoted encoding. + * + * === -l + * + * Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP. + * -s, -e and -x are not compatible with this option. + * + * === -L[uwm] + * + * new line mode + * Without this option, nkf doesn't convert line breaks. + * + * [-Lu] unix (LF) + * + * [-Lw] windows (CRLF) + * + * [-Lm] mac (CR) + * + * === --fj --unix --mac --msdos --windows + * + * convert for these system + * + * === --jis --euc --sjis --mime --base64 + * + * convert for named code + * + * === --jis-input --euc-input --sjis-input --mime-input --base64-input + * + * assume input system + * + * === --ic=input codeset --oc=output codeset + * + * Set the input or output codeset. + * NKF supports following codesets and those codeset name are case insensitive. + * + * [ISO-2022-JP] a.k.a. RFC1468, 7bit JIS, JUNET + * + * [EUC-JP (eucJP-nkf)] a.k.a. AT&T JIS, Japanese EUC, UJIS + * + * [eucJP-ascii] a.k.a. x-eucjp-open-19970715-ascii + * + * [eucJP-ms] a.k.a. x-eucjp-open-19970715-ms + * + * [CP51932] Microsoft Version of EUC-JP. + * + * [Shift_JIS] SJIS, MS-Kanji + * + * [Windows-31J] a.k.a. CP932 + * + * [UTF-8] same as UTF-8N + * + * [UTF-8N] UTF-8 without BOM + * + * [UTF-8-BOM] UTF-8 with BOM + * + * [UTF-16] same as UTF-16BE + * + * [UTF-16BE] UTF-16 Big Endian without BOM + * + * [UTF-16BE-BOM] UTF-16 Big Endian with BOM + * + * [UTF-16LE] UTF-16 Little Endian without BOM + * + * [UTF-16LE-BOM] UTF-16 Little Endian with BOM + * + * [UTF-32] same as UTF-32BE + * + * [UTF-32BE] UTF-32 Big Endian without BOM + * + * [UTF-32BE-BOM] UTF-32 Big Endian with BOM + * + * [UTF-32LE] UTF-32 Little Endian without BOM + * + * [UTF-32LE-BOM] UTF-32 Little Endian with BOM + * + * [UTF8-MAC] NKDed UTF-8, a.k.a. UTF8-NFD (input only) + * + * === --fb-{skip, html, xml, perl, java, subchar} + * + * Specify the way that nkf handles unassigned characters. + * Without this option, --fb-skip is assumed. + * + * === --prefix= escape character target character .. + * + * When nkf converts to Shift_JIS, + * nkf adds a specified escape character to specified 2nd byte of Shift_JIS characters. + * 1st byte of argument is the escape character and following bytes are target characters. + * + * === --no-cp932ext + * + * Handle the characters extended in CP932 as unassigned characters. + * + * == --no-best-fit-chars + * + * When Unicode to Encoded byte conversion, + * don't convert characters which is not round trip safe. + * When Unicode to Unicode conversion, + * with this and -x option, nkf can be used as UTF converter. + * (In other words, without this and -x option, nkf doesn't save some characters) + * + * When nkf convert string which related to path, you should use this opion. + * + * === --cap-input + * + * Decode hex encoded characters. + * + * === --url-input + * + * Unescape percent escaped characters. + * + * === -- + * + * Ignore rest of -option. + */ + +void +Init_nkf() +{ + VALUE mNKF = rb_define_module("NKF"); + + rb_define_module_function(mNKF, "nkf", rb_nkf_convert, 2); + rb_define_module_function(mNKF, "guess", rb_nkf_guess, 1); + rb_define_alias(rb_singleton_class(mNKF), "guess", "guess"); + + rb_define_const(mNKF, "AUTO", Qnil); + rb_define_const(mNKF, "NOCONV", Qnil); + rb_define_const(mNKF, "UNKNOWN", Qnil); + rb_define_const(mNKF, "BINARY", rb_enc_from_encoding(rb_nkf_enc_get("BINARY"))); + rb_define_const(mNKF, "ASCII", rb_enc_from_encoding(rb_nkf_enc_get("US-ASCII"))); + rb_define_const(mNKF, "JIS", rb_enc_from_encoding(rb_nkf_enc_get("ISO-2022-JP"))); + rb_define_const(mNKF, "EUC", rb_enc_from_encoding(rb_nkf_enc_get("EUC-JP"))); + rb_define_const(mNKF, "SJIS", rb_enc_from_encoding(rb_nkf_enc_get("Shift_JIS"))); + rb_define_const(mNKF, "UTF8", rb_enc_from_encoding(rb_utf8_encoding())); + rb_define_const(mNKF, "UTF16", rb_enc_from_encoding(rb_nkf_enc_get("UTF-16BE"))); + rb_define_const(mNKF, "UTF32", rb_enc_from_encoding(rb_nkf_enc_get("UTF-32BE"))); + + /* Full version string of nkf */ + rb_define_const(mNKF, "VERSION", rb_str_new2(RUBY_NKF_VERSION)); + /* Version of nkf */ + rb_define_const(mNKF, "NKF_VERSION", rb_str_new2(NKF_VERSION)); + /* Release date of nkf */ + rb_define_const(mNKF, "NKF_RELEASE_DATE", rb_str_new2(NKF_RELEASE_DATE)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/.cvsignore b/lib/ruby-1.9.1-rc1/ext/openssl/.cvsignore new file mode 100644 index 0000000..3a9a9f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/.cvsignore @@ -0,0 +1,5 @@ +GNUmakefile +Makefile +mkmf.log +dep +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/extconf.rb b/lib/ruby-1.9.1-rc1/ext/openssl/extconf.rb new file mode 100644 index 0000000..e1794b1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/extconf.rb @@ -0,0 +1,126 @@ +=begin += $RCSfile$ -- Generator for Makefile + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: extconf.rb 18168 2008-07-22 15:34:23Z nobu $ +=end + +require "mkmf" + +dir_config("openssl") +dir_config("kerberos") + +message "=== OpenSSL for Ruby configurator ===\n" + +## +# Adds -Wall -DOSSL_DEBUG for compilation and some more targets when GCC is used +# To turn it on, use: --with-debug or --enable-debug +# +if with_config("debug") or enable_config("debug") + $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG" + + if /gcc/ =~ CONFIG["CC"] + $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall" + end +end + +message "=== Checking for system dependent stuff... ===\n" +have_library("nsl", "t_open") +have_library("socket", "socket") +have_header("assert.h") + +message "=== Checking for required stuff... ===\n" +if $mingw + have_library("wsock32") + have_library("gdi32") +end +result = have_header("openssl/ssl.h") +result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "OpenSSL_add_all_digests")} +result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_library_init")} +if !result + unless pkg_config("openssl") and have_header("openssl/ssl.h") + message "=== Checking for required stuff failed. ===\n" + message "Makefile wasn't created. Fix the errors above.\n" + exit 1 + end +end + +unless have_header("openssl/conf_api.h") + message "OpenSSL 0.9.6 or later required.\n" + exit 1 +end + +%w"rb_str_set_len rb_block_call".each {|func| have_func(func, "ruby.h")} + +message "=== Checking for OpenSSL features... ===\n" +have_func("ERR_peek_last_error") +have_func("BN_mod_add") +have_func("BN_mod_sqr") +have_func("BN_mod_sub") +have_func("BN_pseudo_rand_range") +have_func("BN_rand_range") +have_func("CONF_get1_default_config_file") +have_func("EVP_CIPHER_CTX_copy") +have_func("EVP_CIPHER_CTX_set_padding") +have_func("EVP_CipherFinal_ex") +have_func("EVP_CipherInit_ex") +have_func("EVP_DigestFinal_ex") +have_func("EVP_DigestInit_ex") +have_func("EVP_MD_CTX_cleanup") +have_func("EVP_MD_CTX_create") +have_func("EVP_MD_CTX_destroy") +have_func("EVP_MD_CTX_init") +have_func("HMAC_CTX_cleanup") +have_func("HMAC_CTX_copy") +have_func("HMAC_CTX_init") +have_func("PEM_def_callback") +have_func("PKCS5_PBKDF2_HMAC") +have_func("PKCS5_PBKDF2_HMAC_SHA1") +have_func("X509V3_set_nconf") +have_func("X509V3_EXT_nconf_nid") +have_func("X509_CRL_add0_revoked") +have_func("X509_CRL_set_issuer_name") +have_func("X509_CRL_set_version") +have_func("X509_CRL_sort") +have_func("X509_STORE_get_ex_data") +have_func("X509_STORE_set_ex_data") +have_func("OBJ_NAME_do_all_sorted") +have_func("SSL_SESSION_get_id") +have_func("OPENSSL_cleanse") +if try_compile("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") + $defs.push("-DHAVE_VA_ARGS_MACRO") +end +if have_header("openssl/engine.h") + have_func("ENGINE_add") + have_func("ENGINE_load_builtin_engines") + have_func("ENGINE_load_openbsd_dev_crypto") + have_func("ENGINE_get_digest") + have_func("ENGINE_get_cipher") + have_func("ENGINE_cleanup") +end +if try_compile(< +#if OPENSSL_VERSION_NUMBER < 0x00907000L +# error "OpenSSL version is less than 0.9.7." +#endif +SRC + have_header("openssl/ocsp.h") +end +have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h") +have_struct_member("EVP_CIPHER_CTX", "engine", "openssl/evp.h") +have_struct_member("X509_ATTRIBUTE", "single", "openssl/x509.h") + +message "=== Checking done. ===\n" + +create_header +create_makefile("openssl") +message "Done.\n" diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl.rb new file mode 100644 index 0000000..411c0db --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl.rb @@ -0,0 +1,24 @@ +=begin += $RCSfile$ -- Loader for all OpenSSL C-space and Ruby-space definitions + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: openssl.rb 11708 2007-02-12 23:01:19Z shyouhei $ +=end + +require 'openssl.so' + +require 'openssl/bn' +require 'openssl/cipher' +require 'openssl/digest' +require 'openssl/ssl' +require 'openssl/x509' + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/bn.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/bn.rb new file mode 100644 index 0000000..cf44a09 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/bn.rb @@ -0,0 +1,35 @@ +=begin += $RCSfile$ -- Ruby-space definitions that completes C-space funcs for BN + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: bn.rb 11708 2007-02-12 23:01:19Z shyouhei $ +=end + +## +# Should we care what if somebody require this file directly? +#require 'openssl' + +module OpenSSL + class BN + include Comparable + end # BN +end # OpenSSL + +## +# Add double dispatch to Integer +# +class Integer + def to_bn + OpenSSL::BN::new(self) + end +end # Integer + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/buffering.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/buffering.rb new file mode 100644 index 0000000..453207c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/buffering.rb @@ -0,0 +1,242 @@ +=begin += $RCSfile$ -- Buffering mix-in module. + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2001 GOTOU YUUZOU + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: buffering.rb 14261 2007-12-17 07:06:16Z gotoyuzo $ +=end + +module Buffering + include Enumerable + attr_accessor :sync + BLOCK_SIZE = 1024*16 + + def initialize(*args) + @eof = false + @rbuffer = "" + @sync = @io.sync + end + + # + # for reading. + # + private + + def fill_rbuff + begin + @rbuffer << self.sysread(BLOCK_SIZE) + rescue Errno::EAGAIN + retry + rescue EOFError + @eof = true + end + end + + def consume_rbuff(size=nil) + if @rbuffer.empty? + nil + else + size = @rbuffer.size unless size + ret = @rbuffer[0, size] + @rbuffer[0, size] = "" + ret + end + end + + public + + def read(size=nil, buf=nil) + if size == 0 + if buf + buf.clear + return buf + else + return "" + end + end + until @eof + break if size && size <= @rbuffer.size + fill_rbuff + end + ret = consume_rbuff(size) || "" + if buf + buf.replace(ret) + ret = buf + end + (size && ret.empty?) ? nil : ret + end + + def readpartial(maxlen, buf=nil) + if maxlen == 0 + if buf + buf.clear + return buf + else + return "" + end + end + if @rbuffer.empty? + begin + return sysread(maxlen, buf) + rescue Errno::EAGAIN + retry + end + end + ret = consume_rbuff(maxlen) + if buf + buf.replace(ret) + ret = buf + end + raise EOFError if ret.empty? + ret + end + + def gets(eol=$/, limit=nil) + idx = @rbuffer.index(eol) + until @eof + break if idx + fill_rbuff + idx = @rbuffer.index(eol) + end + if eol.is_a?(Regexp) + size = idx ? idx+$&.size : nil + else + size = idx ? idx+eol.size : nil + end + if limit and limit >= 0 + size = [size, limit].min + end + consume_rbuff(size) + end + + def each(eol=$/) + while line = self.gets(eol) + yield line + end + end + alias each_line each + + def readlines(eol=$/) + ary = [] + while line = self.gets(eol) + ary << line + end + ary + end + + def readline(eol=$/) + raise EOFError if eof? + gets(eol) + end + + def getc + c = read(1) + c ? c[0] : nil + end + + def each_byte + while c = getc + yield(c) + end + end + + def readchar + raise EOFError if eof? + getc + end + + def ungetc(c) + @rbuffer[0,0] = c.chr + end + + def eof? + fill_rbuff if !@eof && @rbuffer.empty? + @eof && @rbuffer.empty? + end + alias eof eof? + + # + # for writing. + # + private + + def do_write(s) + @wbuffer = "" unless defined? @wbuffer + @wbuffer << s + @sync ||= false + if @sync or @wbuffer.size > BLOCK_SIZE or idx = @wbuffer.rindex($/) + remain = idx ? idx + $/.size : @wbuffer.length + nwritten = 0 + while remain > 0 + str = @wbuffer[nwritten,remain] + begin + nwrote = syswrite(str) + rescue Errno::EAGAIN + retry + end + remain -= nwrote + nwritten += nwrote + end + @wbuffer[0,nwritten] = "" + end + end + + public + + def write(s) + do_write(s) + s.length + end + + def << (s) + do_write(s) + self + end + + def puts(*args) + s = "" + if args.empty? + s << "\n" + end + args.each{|arg| + s << arg.to_s + if $/ && /\n\z/ !~ s + s << "\n" + end + } + do_write(s) + nil + end + + def print(*args) + s = "" + args.each{ |arg| s << arg.to_s } + do_write(s) + nil + end + + def printf(s, *args) + do_write(s % args) + nil + end + + def flush + osync = @sync + @sync = true + do_write "" + @sync = osync + end + + def close + flush rescue nil + sysclose + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/cipher.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/cipher.rb new file mode 100644 index 0000000..8fb9f22 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/cipher.rb @@ -0,0 +1,65 @@ +=begin += $RCSfile$ -- Ruby-space predefined Cipher subclasses + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: cipher.rb 12148 2007-04-05 05:59:22Z technorama $ +=end + +## +# Should we care what if somebody require this file directly? +#require 'openssl' + +module OpenSSL + class Cipher + %w(AES CAST5 BF DES IDEA RC2 RC4 RC5).each{|name| + klass = Class.new(Cipher){ + define_method(:initialize){|*args| + cipher_name = args.inject(name){|n, arg| "#{n}-#{arg}" } + super(cipher_name) + } + } + const_set(name, klass) + } + + %w(128 192 256).each{|keylen| + klass = Class.new(Cipher){ + define_method(:initialize){|mode| + mode ||= "CBC" + cipher_name = "AES-#{keylen}-#{mode}" + super(cipher_name) + } + } + const_set("AES#{keylen}", klass) + } + + # Generate, set, and return a random key. + # You must call cipher.encrypt or cipher.decrypt before calling this method. + def random_key + str = OpenSSL::Random.random_bytes(self.key_len) + self.key = str + return str + end + + # Generate, set, and return a random iv. + # You must call cipher.encrypt or cipher.decrypt before calling this method. + def random_iv + str = OpenSSL::Random.random_bytes(self.iv_len) + self.iv = str + return str + end + + # This class is only provided for backwards compatibility. Use OpenSSL::Digest in the future. + class Cipher < Cipher + # add warning + end + end # Cipher +end # OpenSSL diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/digest.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/digest.rb new file mode 100644 index 0000000..7d65e33 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/digest.rb @@ -0,0 +1,61 @@ +=begin += $RCSfile$ -- Ruby-space predefined Digest subclasses + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: digest.rb 15602 2008-02-25 08:51:18Z technorama $ +=end + +## +# Should we care what if somebody require this file directly? +#require 'openssl' + +module OpenSSL + class Digest + + alg = %w(DSS DSS1 MD2 MD4 MD5 MDC2 RIPEMD160 SHA SHA1) + if OPENSSL_VERSION_NUMBER > 0x00908000 + alg += %w(SHA224 SHA256 SHA384 SHA512) + end + + def self.digest(name, data) + super(data, name) + end + + alg.each{|name| + klass = Class.new(Digest){ + define_method(:initialize){|*data| + if data.length > 1 + raise ArgumentError, + "wrong number of arguments (#{data.length} for 1)" + end + super(name, data.first) + } + } + singleton = (class < + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: ssl.rb 14479 2007-12-22 08:31:53Z gotoyuzo $ +=end + +require "openssl" +require "openssl/buffering" +require "fcntl" + +module OpenSSL + module SSL + class SSLContext + DEFAULT_PARAMS = { + :ssl_version => "SSLv23", + :verify_mode => OpenSSL::SSL::VERIFY_PEER, + :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", + :options => OpenSSL::SSL::OP_ALL, + } + + DEFAULT_CERT_STORE = OpenSSL::X509::Store.new + DEFAULT_CERT_STORE.set_default_paths + if defined?(OpenSSL::X509::V_FLAG_CRL_CHECK_ALL) + DEFAULT_CERT_STORE.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL + end + + def set_params(params={}) + params = DEFAULT_PARAMS.merge(params) + params.each{|name, value| self.__send__("#{name}=", value) } + if self.verify_mode != OpenSSL::SSL::VERIFY_NONE + unless self.ca_file or self.ca_path or self.cert_store + self.cert_store = DEFAULT_CERT_STORE + end + end + return params + end + end + + module SocketForwarder + def addr + to_io.addr + end + + def peeraddr + to_io.peeraddr + end + + def setsockopt(level, optname, optval) + to_io.setsockopt(level, optname, optval) + end + + def getsockopt(level, optname) + to_io.getsockopt(level, optname) + end + + def fcntl(*args) + to_io.fcntl(*args) + end + + def closed? + to_io.closed? + end + + def do_not_reverse_lookup=(flag) + to_io.do_not_reverse_lookup = flag + end + end + + module Nonblock + def initialize(*args) + flag = File::NONBLOCK + flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL) + @io.fcntl(Fcntl::F_SETFL, flag) + super + end + end + + def verify_certificate_identity(cert, hostname) + should_verify_common_name = true + cert.extensions.each{|ext| + next if ext.oid != "subjectAltName" + ext.value.split(/,\s+/).each{|general_name| + if /\ADNS:(.*)/ =~ general_name + should_verify_common_name = false + reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+") + return true if /\A#{reg}\z/i =~ hostname + elsif /\AIP Address:(.*)/ =~ general_name + should_verify_common_name = false + return true if $1 == hostname + end + } + } + if should_verify_common_name + cert.subject.to_a.each{|oid, value| + if oid == "CN" + reg = Regexp.escape(value).gsub(/\\\*/, "[^.]+") + return true if /\A#{reg}\z/i =~ hostname + end + } + end + return false + end + module_function :verify_certificate_identity + + class SSLSocket + include Buffering + include SocketForwarder + include Nonblock + + def post_connection_check(hostname) + unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname) + raise SSLError, "hostname was not match with the server certificate" + end + return true + end + + def session + SSL::Session.new(self) + rescue SSL::Session::SessionError + nil + end + end + + class SSLServer + include SocketForwarder + attr_accessor :start_immediately + + def initialize(svr, ctx) + @svr = svr + @ctx = ctx + unless ctx.session_id_context + session_id = OpenSSL::Digest::MD5.hexdigest($0) + @ctx.session_id_context = session_id + end + @start_immediately = true + end + + def to_io + @svr + end + + def listen(backlog=5) + @svr.listen(backlog) + end + + def shutdown(how=Socket::SHUT_RDWR) + @svr.shutdown(how) + end + + def accept + sock = @svr.accept + begin + ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx) + ssl.sync_close = true + ssl.accept if @start_immediately + ssl + rescue SSLError => ex + sock.close + raise ex + end + end + + def close + @svr.close + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/x509.rb b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/x509.rb new file mode 100644 index 0000000..179c909 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/lib/openssl/x509.rb @@ -0,0 +1,155 @@ +=begin += $RCSfile$ -- Ruby-space definitions that completes C-space funcs for X509 and subclasses + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id: x509.rb 15442 2008-02-12 06:18:06Z naruse $ +=end + +require "openssl" + +module OpenSSL + module X509 + class ExtensionFactory + def create_extension(*arg) + if arg.size > 1 + create_ext(*arg) + else + send("create_ext_from_"+arg[0].class.name.downcase, arg[0]) + end + end + + def create_ext_from_array(ary) + raise ExtensionError, "unexpected array form" if ary.size > 3 + create_ext(ary[0], ary[1], ary[2]) + end + + def create_ext_from_string(str) # "oid = critical, value" + oid, value = str.split(/=/, 2) + oid.strip! + value.strip! + create_ext(oid, value) + end + + def create_ext_from_hash(hash) + create_ext(hash["oid"], hash["value"], hash["critical"]) + end + end + + class Extension + def to_s # "oid = critical, value" + str = self.oid + str << " = " + str << "critical, " if self.critical? + str << self.value.gsub(/\n/, ", ") + end + + def to_h # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false} + {"oid"=>self.oid,"value"=>self.value,"critical"=>self.critical?} + end + + def to_a + [ self.oid, self.value, self.critical? ] + end + end + + class Name + module RFC2253DN + Special = ',=+<>#;' + HexChar = /[0-9a-fA-F]/ + HexPair = /#{HexChar}#{HexChar}/ + HexString = /#{HexPair}+/ + Pair = /\\(?:[#{Special}]|\\|"|#{HexPair})/ + StringChar = /[^#{Special}\\"]/ + QuoteChar = /[^\\"]/ + AttributeType = /[a-zA-Z][0-9a-zA-Z]*|[0-9]+(?:\.[0-9]+)*/ + AttributeValue = / + (?!["#])((?:#{StringChar}|#{Pair})*)| + \#(#{HexString})| + "((?:#{QuoteChar}|#{Pair})*)" + /x + TypeAndValue = /\A(#{AttributeType})=#{AttributeValue}/ + + module_function + + def expand_pair(str) + return nil unless str + return str.gsub(Pair){ + pair = $& + case pair.size + when 2 then pair[1,1] + when 3 then Integer("0x#{pair[1,2]}").chr + else raise OpenSSL::X509::NameError, "invalid pair: #{str}" + end + } + end + + def expand_hexstring(str) + return nil unless str + der = str.gsub(HexPair){$&.to_i(16).chr } + a1 = OpenSSL::ASN1.decode(der) + return a1.value, a1.tag + end + + def expand_value(str1, str2, str3) + value = expand_pair(str1) + value, tag = expand_hexstring(str2) unless value + value = expand_pair(str3) unless value + return value, tag + end + + def scan(dn) + str = dn + ary = [] + while true + if md = TypeAndValue.match(str) + matched = md.to_s + remain = md.post_match + type = md[1] + value, tag = expand_value(md[2], md[3], md[4]) rescue nil + if value + type_and_value = [type, value] + type_and_value.push(tag) if tag + ary.unshift(type_and_value) + if remain.length > 2 && remain[0] == ?, + str = remain[1..-1] + next + elsif remain.length > 2 && remain[0] == ?+ + raise OpenSSL::X509::NameError, + "multi-valued RDN is not supported: #{dn}" + elsif remain.empty? + break + end + end + end + msg_dn = dn[0, dn.length - str.length] + " =>" + str + raise OpenSSL::X509::NameError, "malformed RDN: #{msg_dn}" + end + return ary + end + end + + class <md_ctx, &in->md_ctx); + EVP_MD_CTX_copy(&out->i_ctx, &in->i_ctx); + EVP_MD_CTX_copy(&out->o_ctx, &in->o_ctx); +} +#endif /* HAVE_HMAC_CTX_COPY */ +#endif /* NO_HMAC */ + +#if !defined(HAVE_X509_STORE_SET_EX_DATA) + +int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data) +{ + return CRYPTO_set_ex_data(&str->ex_data, idx, data); +} + +void *X509_STORE_get_ex_data(X509_STORE *str, int idx) +{ + return CRYPTO_get_ex_data(&str->ex_data, idx); +} +#endif + +#if !defined(HAVE_EVP_MD_CTX_CREATE) +EVP_MD_CTX * +EVP_MD_CTX_create(void) +{ + EVP_MD_CTX *ctx = OPENSSL_malloc(sizeof(EVP_MD_CTX)); + if (!ctx) return NULL; + + memset(ctx, 0, sizeof(EVP_MD_CTX)); + + return ctx; +} +#endif + +#if !defined(HAVE_EVP_MD_CTX_CLEANUP) +int +EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) +{ + /* FIXME!!! */ + memset(ctx, 0, sizeof(EVP_MD_CTX)); + + return 1; +} +#endif + +#if !defined(HAVE_EVP_MD_CTX_DESTROY) +void +EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) +{ + EVP_MD_CTX_cleanup(ctx); + OPENSSL_free(ctx); +} +#endif + +#if !defined(HAVE_EVP_MD_CTX_INIT) +void +EVP_MD_CTX_init(EVP_MD_CTX *ctx) +{ + memset(ctx, 0, sizeof(EVP_MD_CTX)); +} +#endif + +#if !defined(HAVE_HMAC_CTX_INIT) +void +HMAC_CTX_init(HMAC_CTX *ctx) +{ + EVP_MD_CTX_init(&ctx->i_ctx); + EVP_MD_CTX_init(&ctx->o_ctx); + EVP_MD_CTX_init(&ctx->md_ctx); +} +#endif + +#if !defined(HAVE_HMAC_CTX_CLEANUP) +void +HMAC_CTX_cleanup(HMAC_CTX *ctx) +{ + EVP_MD_CTX_cleanup(&ctx->i_ctx); + EVP_MD_CTX_cleanup(&ctx->o_ctx); + EVP_MD_CTX_cleanup(&ctx->md_ctx); + memset(ctx, 0, sizeof(HMAC_CTX)); +} +#endif + +#if !defined(HAVE_EVP_CIPHER_CTX_COPY) +/* + * this function does not exist in OpenSSL yet... or ever?. + * a future version may break this function. + * tested on 0.9.7d. + */ +int +EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in) +{ + memcpy(out, in, sizeof(EVP_CIPHER_CTX)); + +#if defined(HAVE_ENGINE_ADD) && defined(HAVE_ST_ENGINE) + if (in->engine) ENGINE_add(out->engine); + if (in->cipher_data) { + out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size); + memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size); + } +#endif + + return 1; +} +#endif + +#if !defined(HAVE_X509_CRL_SET_VERSION) +int +X509_CRL_set_version(X509_CRL *x, long version) +{ + if (x == NULL || x->crl == NULL) return 0; + if (x->crl->version == NULL) { + x->crl->version = M_ASN1_INTEGER_new(); + if (x->crl->version == NULL) return 0; + } + return ASN1_INTEGER_set(x->crl->version, version); +} +#endif + +#if !defined(HAVE_X509_CRL_SET_ISSUER_NAME) +int +X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name) +{ + if (x == NULL || x->crl == NULL) return 0; + return X509_NAME_set(&x->crl->issuer, name); +} +#endif + +#if !defined(HAVE_X509_CRL_SORT) +int +X509_CRL_sort(X509_CRL *c) +{ + int i; + X509_REVOKED *r; + /* sort the data so it will be written in serial + * number order */ + sk_X509_REVOKED_sort(c->crl->revoked); + for (i=0; icrl->revoked); i++) { + r=sk_X509_REVOKED_value(c->crl->revoked, i); + r->sequence=i; + } + return 1; +} +#endif + +#if !defined(HAVE_X509_CRL_ADD0_REVOKED) +static int +OSSL_X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) +{ + return(ASN1_STRING_cmp( + (ASN1_STRING *)(*a)->serialNumber, + (ASN1_STRING *)(*b)->serialNumber)); +} + +int +X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) +{ + X509_CRL_INFO *inf; + + inf = crl->crl; + if (!inf->revoked) + inf->revoked = sk_X509_REVOKED_new(OSSL_X509_REVOKED_cmp); + if (!inf->revoked || !sk_X509_REVOKED_push(inf->revoked, rev)) + return 0; + return 1; +} +#endif + +#if !defined(HAVE_BN_MOD_SQR) +int +BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) +{ + if (!BN_sqr(r, (BIGNUM*)a, ctx)) return 0; + return BN_mod(r, r, m, ctx); +} +#endif + +#if !defined(HAVE_BN_MOD_ADD) || !defined(HAVE_BN_MOD_SUB) +int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) +{ + if (!BN_mod(r,m,d,ctx)) return 0; + if (!r->neg) return 1; + return (d->neg ? BN_sub : BN_add)(r, r, d); +} +#endif + +#if !defined(HAVE_BN_MOD_ADD) +int +BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) +{ + if (!BN_add(r, a, b)) return 0; + return BN_nnmod(r, r, m, ctx); +} +#endif + +#if !defined(HAVE_BN_MOD_SUB) +int +BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) +{ + if (!BN_sub(r, a, b)) return 0; + return BN_nnmod(r, r, m, ctx); +} +#endif + +#if !defined(HAVE_BN_RAND_RANGE) || !defined(HAVE_BN_PSEUDO_RAND_RANGE) +static int +bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) +{ + int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; + int n; + + if (range->neg || BN_is_zero(range)) return 0; + + n = BN_num_bits(range); + + if (n == 1) { + if (!BN_zero(r)) return 0; + } else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) { + do { + if (!bn_rand(r, n + 1, -1, 0)) return 0; + if (BN_cmp(r ,range) >= 0) { + if (!BN_sub(r, r, range)) return 0; + if (BN_cmp(r, range) >= 0) + if (!BN_sub(r, r, range)) return 0; + } + } while (BN_cmp(r, range) >= 0); + } else { + do { + if (!bn_rand(r, n, -1, 0)) return 0; + } while (BN_cmp(r, range) >= 0); + } + + return 1; +} +#endif + +#if !defined(HAVE_BN_RAND_RANGE) +int +BN_rand_range(BIGNUM *r, BIGNUM *range) +{ + return bn_rand_range(0, r, range); +} +#endif + +#if !defined(HAVE_BN_PSEUDO_RAND_RANGE) +int +BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) +{ + return bn_rand_range(1, r, range); +} +#endif + +#if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE) +#define OPENSSL_CONF "openssl.cnf" +char * +CONF_get1_default_config_file(void) +{ + char *file; + int len; + + file = getenv("OPENSSL_CONF"); + if (file) return BUF_strdup(file); + len = strlen(X509_get_default_cert_area()); +#ifndef OPENSSL_SYS_VMS + len++; +#endif + len += strlen(OPENSSL_CONF); + file = OPENSSL_malloc(len + 1); + if (!file) return NULL; + strcpy(file,X509_get_default_cert_area()); +#ifndef OPENSSL_SYS_VMS + strcat(file,"/"); +#endif + strcat(file,OPENSSL_CONF); + + return file; +} +#endif + +#if !defined(HAVE_PEM_DEF_CALLBACK) +#define OSSL_PASS_MIN_LENGTH 4 +int +PEM_def_callback(char *buf, int num, int w, void *key) +{ + int i,j; + const char *prompt; + + if (key) { + i = strlen(key); + i = (i > num) ? num : i; + memcpy(buf, key, i); + return i; + } + + prompt = EVP_get_pw_prompt(); + if (prompt == NULL) prompt = "Enter PEM pass phrase:"; + for (;;) { + i = EVP_read_pw_string(buf, num, prompt, w); + if (i != 0) { + memset(buf, 0, (unsigned int)num); + return(-1); + } + j = strlen(buf); + if (j < OSSL_PASS_MIN_LENGTH) { + fprintf(stderr, + "phrase is too short, needs to be at least %d chars\n", + OSSL_PASS_MIN_LENGTH); + } + else break; + } + return j; +} +#endif + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.h b/lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.h new file mode 100644 index 0000000..3723c3d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/openssl_missing.h @@ -0,0 +1,188 @@ +/* + * $Id: openssl_missing.h 18181 2008-07-23 08:04:25Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_OPENSSL_MISSING_H_) +#define _OSSL_OPENSSL_MISSING_H_ + +#if defined(__cplusplus) +extern "C" { +#endif + +#ifndef TYPEDEF_D2I_OF +typedef char *d2i_of_void(); +#endif + +/* + * These functions are not included in headers of OPENSSL <= 0.9.6b + */ + +#if !defined(PEM_read_bio_DSAPublicKey) +# define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \ + (d2i_of_void *)d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(void **)x,cb,u) +#endif + +#if !defined(PEM_write_bio_DSAPublicKey) +# define PEM_write_bio_DSAPublicKey(bp,x) \ + PEM_ASN1_write_bio((int (*)())i2d_DSAPublicKey,\ + PEM_STRING_DSA_PUBLIC,\ + bp,(char *)x, NULL, NULL, 0, NULL, NULL) +#endif + +#if !defined(DSAPrivateKey_dup) +# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPrivateKey, \ + (d2i_of_void *)d2i_DSAPrivateKey,(char *)dsa) +#endif + +#if !defined(DSAPublicKey_dup) +# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPublicKey, \ + (d2i_of_void *)d2i_DSAPublicKey,(char *)dsa) +#endif + +#if !defined(X509_REVOKED_dup) +# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((int (*)())i2d_X509_REVOKED, \ + (d2i_of_void *)d2i_X509_REVOKED, (char *)rev) +#endif + +#if !defined(PKCS7_SIGNER_INFO_dup) +# define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((int (*)())i2d_PKCS7_SIGNER_INFO, \ + (d2i_of_void *)d2i_PKCS7_SIGNER_INFO, (char *)si) +#endif + +#if !defined(PKCS7_RECIP_INFO_dup) +# define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((int (*)())i2d_PKCS7_RECIP_INFO, \ + (d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)ri) +#endif + +#if !defined(HAVE_EVP_MD_CTX_INIT) +void HMAC_CTX_init(HMAC_CTX *ctx); +#endif + +#if !defined(HAVE_HMAC_CTX_COPY) +void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in); +#endif + +#if !defined(HAVE_HMAC_CTX_CLEANUP) +void HMAC_CTX_cleanup(HMAC_CTX *ctx); +#endif + +#if !defined(HAVE_EVP_MD_CTX_CREATE) +EVP_MD_CTX *EVP_MD_CTX_create(void); +#endif + +#if !defined(HAVE_EVP_MD_CTX_INIT) +void EVP_MD_CTX_init(EVP_MD_CTX *ctx); +#endif + +#if !defined(HAVE_EVP_MD_CTX_CLEANUP) +int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); +#endif + +#if !defined(HAVE_EVP_MD_CTX_DESTROY) +void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); +#endif + +#if !defined(HAVE_EVP_CIPHER_CTX_COPY) +int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in); +#endif + +#if !defined(HAVE_EVP_DIGESTINIT_EX) +# define EVP_DigestInit_ex(ctx, md, engine) EVP_DigestInit(ctx, md) +#endif +#if !defined(HAVE_EVP_DIGESTFINAL_EX) +# define EVP_DigestFinal_ex(ctx, buf, len) EVP_DigestFinal(ctx, buf, len) +#endif + +#if !defined(HAVE_EVP_CIPHERINIT_EX) +# define EVP_CipherInit_ex(ctx, type, impl, key, iv, enc) EVP_CipherInit(ctx, type, key, iv, enc) +#endif +#if !defined(HAVE_EVP_CIPHERFINAL_EX) +# define EVP_CipherFinal_ex(ctx, outm, outl) EVP_CipherFinal(ctx, outm, outl) +#endif + +#if !defined(EVP_CIPHER_name) +# define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) +#endif + +#if !defined(EVP_MD_name) +# define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_type(e)) +#endif + +#if !defined(HAVE_EVP_HMAC_INIT_EX) +# define HMAC_Init_ex(ctx, key, len, digest, engine) HMAC_Init(ctx, key, len, digest) +#endif + +#if !defined(PKCS7_is_detached) +# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7)) +#endif + +#if !defined(PKCS7_type_is_encrypted) +# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted) +#endif + +#if !defined(HAVE_OPENSSL_CLEANSE) +#define OPENSSL_cleanse(p, l) memset(p, 0, l) +#endif + +#if !defined(HAVE_X509_STORE_SET_EX_DATA) +void *X509_STORE_get_ex_data(X509_STORE *str, int idx); +int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data); +#endif + +#if !defined(HAVE_X509_CRL_SET_VERSION) +int X509_CRL_set_version(X509_CRL *x, long version); +#endif + +#if !defined(HAVE_X509_CRL_SET_ISSUER_NAME) +int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); +#endif + +#if !defined(HAVE_X509_CRL_SORT) +int X509_CRL_sort(X509_CRL *c); +#endif + +#if !defined(HAVE_X509_CRL_ADD0_REVOKED) +int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); +#endif + +#if !defined(HAVE_BN_MOD_SQR) +int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); +#endif + +#if !defined(HAVE_BN_MOD_ADD) +int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); +#endif + +#if !defined(HAVE_BN_MOD_SUB) +int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); +#endif + +#if !defined(HAVE_BN_RAND_RANGE) +int BN_rand_range(BIGNUM *r, BIGNUM *range); +#endif + +#if !defined(HAVE_BN_PSEUDO_RAND_RANGE) +int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range); +#endif + +#if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE) +char *CONF_get1_default_config_file(void); +#endif + +#if !defined(HAVE_PEM_DEF_CALLBACK) +int PEM_def_callback(char *buf, int num, int w, void *key); +#endif + +#if defined(__cplusplus) +} +#endif + + +#endif /* _OSSL_OPENSSL_MISSING_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl.c new file mode 100644 index 0000000..3c4c567 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl.c @@ -0,0 +1,496 @@ +/* + * $Id: ossl.c 18459 2008-08-09 23:15:08Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" +#include /* for ossl_raise */ + +/* + * String to HEXString conversion + */ +int +string2hex(const unsigned char *buf, int buf_len, char **hexbuf, int *hexbuf_len) +{ + static const char hex[]="0123456789abcdef"; + int i, len = 2 * buf_len; + + if (buf_len < 0 || len < buf_len) { /* PARANOIA? */ + return -1; + } + if (!hexbuf) { /* if no buf, return calculated len */ + if (hexbuf_len) { + *hexbuf_len = len; + } + return len; + } + if (!(*hexbuf = OPENSSL_malloc(len + 1))) { + return -1; + } + for (i = 0; i < buf_len; i++) { + (*hexbuf)[2 * i] = hex[((unsigned char)buf[i]) >> 4]; + (*hexbuf)[2 * i + 1] = hex[buf[i] & 0x0f]; + } + (*hexbuf)[2 * i] = '\0'; + + if (hexbuf_len) { + *hexbuf_len = len; + } + return len; +} + +/* + * Data Conversion + */ +STACK_OF(X509) * +ossl_x509_ary2sk0(VALUE ary) +{ + STACK_OF(X509) *sk; + VALUE val; + X509 *x509; + int i; + + Check_Type(ary, T_ARRAY); + sk = sk_X509_new_null(); + if (!sk) ossl_raise(eOSSLError, NULL); + + for (i = 0; i < RARRAY_LEN(ary); i++) { + val = rb_ary_entry(ary, i); + if (!rb_obj_is_kind_of(val, cX509Cert)) { + sk_X509_pop_free(sk, X509_free); + ossl_raise(eOSSLError, "object not X509 cert in array"); + } + x509 = DupX509CertPtr(val); /* NEED TO DUP */ + sk_X509_push(sk, x509); + } + return sk; +} + +STACK_OF(X509) * +ossl_protect_x509_ary2sk(VALUE ary, int *status) +{ + return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0, + ary, status); +} + +STACK_OF(X509) * +ossl_x509_ary2sk(VALUE ary) +{ + STACK_OF(X509) *sk; + int status = 0; + + sk = ossl_protect_x509_ary2sk(ary, &status); + if(status) rb_jump_tag(status); + + return sk; +} + +#define OSSL_IMPL_SK2ARY(name, type) \ +VALUE \ +ossl_##name##_sk2ary(STACK *sk) \ +{ \ + type *t; \ + int i, num; \ + VALUE ary; \ + \ + if (!sk) { \ + OSSL_Debug("empty sk!"); \ + return Qnil; \ + } \ + num = sk_num(sk); \ + if (num < 0) { \ + OSSL_Debug("items in sk < -1???"); \ + return rb_ary_new(); \ + } \ + ary = rb_ary_new2(num); \ + \ + for (i=0; i max_len) { + rb_warning("password must be shorter then %d bytes", max_len-1); + continue; + } + memcpy(buf, RSTRING_PTR(pass), len); + break; + } + return len; +} + +/* + * Verify callback + */ +int ossl_verify_cb_idx; + +VALUE +ossl_call_verify_cb_proc(struct ossl_verify_cb_args *args) +{ + return rb_funcall(args->proc, rb_intern("call"), 2, + args->preverify_ok, args->store_ctx); +} + +int +ossl_verify_cb(int ok, X509_STORE_CTX *ctx) +{ + VALUE proc, rctx, ret; + struct ossl_verify_cb_args args; + int state = 0; + + proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_verify_cb_idx); + if ((void*)proc == 0) + proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx); + if ((void*)proc == 0) + return ok; + if (!NIL_P(proc)) { + rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new, + (VALUE)ctx, &state); + ret = Qfalse; + if (!state) { + args.proc = proc; + args.preverify_ok = ok ? Qtrue : Qfalse; + args.store_ctx = rctx; + ret = rb_ensure(ossl_call_verify_cb_proc, (VALUE)&args, + ossl_x509stctx_clear_ptr, rctx); + } + if (ret == Qtrue) { + X509_STORE_CTX_set_error(ctx, X509_V_OK); + ok = 1; + } + else{ + if (X509_STORE_CTX_get_error(ctx) == X509_V_OK) { + X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_REJECTED); + } + ok = 0; + } + } + + return ok; +} + +/* + * main module + */ +VALUE mOSSL; + +/* + * OpenSSLError < StandardError + */ +VALUE eOSSLError; + +/* + * Convert to DER string + */ +ID ossl_s_to_der; + +VALUE +ossl_to_der(VALUE obj) +{ + VALUE tmp; + + tmp = rb_funcall(obj, ossl_s_to_der, 0); + StringValue(tmp); + + return tmp; +} + +VALUE +ossl_to_der_if_possible(VALUE obj) +{ + if(rb_respond_to(obj, ossl_s_to_der)) + return ossl_to_der(obj); + return obj; +} + +/* + * Errors + */ +void +ossl_raise(VALUE exc, const char *fmt, ...) +{ + va_list args; + char buf[BUFSIZ]; + const char *msg; + long e; + int len = 0; + +#ifdef HAVE_ERR_PEEK_LAST_ERROR + e = ERR_peek_last_error(); +#else + e = ERR_peek_error(); +#endif + if (fmt) { + va_start(args, fmt); + len = vsnprintf(buf, BUFSIZ, fmt, args); + va_end(args); + } + if (len < BUFSIZ && e) { + if (dOSSL == Qtrue) /* FULL INFO */ + msg = ERR_error_string(e, NULL); + else + msg = ERR_reason_error_string(e); + fmt = len ? ": %s" : "%s"; + len += snprintf(buf+len, BUFSIZ-len, fmt, msg); + } + if (dOSSL == Qtrue){ /* show all errors on the stack */ + while ((e = ERR_get_error()) != 0){ + rb_warn("error on stack: %s", ERR_error_string(e, NULL)); + } + } + ERR_clear_error(); + + if(len > BUFSIZ) len = strlen(buf); + rb_exc_raise(rb_exc_new(exc, buf, len)); +} + +/* + * call-seq: + * OpenSSL.errors -> [String...] + * + * See any remaining errors held in queue. + * + * Any errors you see here are probably due to a bug in ruby's OpenSSL implementation. + */ +VALUE +ossl_get_errors() +{ + VALUE ary; + long e; + + ary = rb_ary_new(); + while ((e = ERR_get_error()) != 0){ + rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL))); + } + + return ary; +} + +/* + * Debug + */ +VALUE dOSSL; + +#if !defined(HAVE_VA_ARGS_MACRO) +void +ossl_debug(const char *fmt, ...) +{ + va_list args; + + if (dOSSL == Qtrue) { + fprintf(stderr, "OSSL_DEBUG: "); + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + fprintf(stderr, " [CONTEXT N/A]\n"); + } +} +#endif + +/* + * call-seq: + * OpenSSL.debug -> true | false + */ +static VALUE +ossl_debug_get(VALUE self) +{ + return dOSSL; +} + +/* + * call-seq: + * OpenSSL.debug = boolean -> boolean + * + * Turns on or off CRYPTO_MEM_CHECK. + * Also shows some debugging message on stderr. + */ +static VALUE +ossl_debug_set(VALUE self, VALUE val) +{ + VALUE old = dOSSL; + dOSSL = val; + + if (old != dOSSL) { + if (dOSSL == Qtrue) { + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + fprintf(stderr, "OSSL_DEBUG: IS NOW ON!\n"); + } else if (old == Qtrue) { + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF); + fprintf(stderr, "OSSL_DEBUG: IS NOW OFF!\n"); + } + } + return val; +} + +/* + * OSSL library init + */ +void +Init_openssl() +{ + /* + * Init timezone info + */ +#if 0 + tzset(); +#endif + + /* + * Init all digests, ciphers + */ + /* CRYPTO_malloc_init(); */ + /* ENGINE_load_builtin_engines(); */ + OpenSSL_add_ssl_algorithms(); + OpenSSL_add_all_algorithms(); + ERR_load_crypto_strings(); + SSL_load_error_strings(); + + /* + * FIXME: + * On unload do: + */ +#if 0 + CONF_modules_unload(1); + destroy_ui_method(); + EVP_cleanup(); + ENGINE_cleanup(); + CRYPTO_cleanup_all_ex_data(); + ERR_remove_state(0); + ERR_free_strings(); +#endif + + /* + * Init main module + */ + mOSSL = rb_define_module("OpenSSL"); + + /* + * Constants + */ + rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION)); + rb_define_const(mOSSL, "OPENSSL_VERSION", rb_str_new2(OPENSSL_VERSION_TEXT)); + rb_define_const(mOSSL, "OPENSSL_VERSION_NUMBER", INT2NUM(OPENSSL_VERSION_NUMBER)); + + /* + * Generic error, + * common for all classes under OpenSSL module + */ + eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError); + + /* + * Verify callback Proc index for ext-data + */ + if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_verify_cb_idx", 0, 0, 0)) < 0) + ossl_raise(eOSSLError, "X509_STORE_CTX_get_ex_new_index"); + + /* + * Init debug core + */ + dOSSL = Qfalse; + rb_define_module_function(mOSSL, "debug", ossl_debug_get, 0); + rb_define_module_function(mOSSL, "debug=", ossl_debug_set, 1); + rb_define_module_function(mOSSL, "errors", ossl_get_errors, 0); + + /* + * Get ID of to_der + */ + ossl_s_to_der = rb_intern("to_der"); + + /* + * Init components + */ + Init_ossl_bn(); + Init_ossl_cipher(); + Init_ossl_config(); + Init_ossl_digest(); + Init_ossl_hmac(); + Init_ossl_ns_spki(); + Init_ossl_pkcs12(); + Init_ossl_pkcs7(); + Init_ossl_pkcs5(); + Init_ossl_pkey(); + Init_ossl_rand(); + Init_ossl_ssl(); + Init_ossl_x509(); + Init_ossl_ocsp(); + Init_ossl_engine(); + Init_ossl_asn1(); +} + +#if defined(OSSL_DEBUG) +/* + * Check if all symbols are OK with 'make LDSHARED=gcc all' + */ +int +main(int argc, char *argv[]) +{ + return 0; +} +#endif /* OSSL_DEBUG */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl.h new file mode 100644 index 0000000..ecddb80 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl.h @@ -0,0 +1,221 @@ +/* + * $Id: ossl.h 19567 2008-09-26 03:05:47Z matz $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_H_) +#define _OSSL_H_ + +#include RUBY_EXTCONF_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#if 0 + mOSSL = rb_define_module("OpenSSL"); + mX509 = rb_define_module_under(mOSSL, "X509"); +#endif + +/* +* OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it! +*/ +#if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/ +# undef RFILE +#endif +#include +#include + +/* + * Check the OpenSSL version + * The only supported are: + * OpenSSL >= 0.9.7 + */ +#include + +#ifdef HAVE_ASSERT_H +# include +#else +# define assert(condition) +#endif + +#if defined(_WIN32) +# define OSSL_NO_CONF_API 1 +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#undef X509_NAME +#undef PKCS7_SIGNER_INFO +#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE) +# define OSSL_ENGINE_ENABLED +# include +#endif +#if defined(HAVE_OPENSSL_OCSP_H) +# define OSSL_OCSP_ENABLED +# include +#endif + +/* + * Common Module + */ +extern VALUE mOSSL; + +/* + * Common Error Class + */ +extern VALUE eOSSLError; + +/* + * CheckTypes + */ +#define OSSL_Check_Kind(obj, klass) do {\ + if (!rb_obj_is_kind_of(obj, klass)) {\ + ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\ + rb_obj_classname(obj), rb_class2name(klass));\ + }\ +} while (0) + +#define OSSL_Check_Instance(obj, klass) do {\ + if (!rb_obj_is_instance_of(obj, klass)) {\ + ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\ + rb_obj_classname(obj), rb_class2name(klass));\ + }\ +} while (0) + +#define OSSL_Check_Same_Class(obj1, obj2) do {\ + if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\ + ossl_raise(rb_eTypeError, "wrong argument type");\ + }\ +} while (0) + +/* + * String to HEXString conversion + */ +int string2hex(const unsigned char *, int, char **, int *); + +/* + * Data Conversion + */ +STACK_OF(X509) *ossl_x509_ary2sk0(VALUE); +STACK_OF(X509) *ossl_x509_ary2sk(VALUE); +STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*); +VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs); +VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl); +VALUE ossl_buf2str(char *buf, int len); +#define ossl_str_adjust(str, p) \ +do{\ + int len = RSTRING_LEN(str);\ + int newlen = (p) - (unsigned char*)RSTRING_PTR(str);\ + assert(newlen <= len);\ + rb_str_set_len(str, newlen);\ +}while(0) + +/* + * our default PEM callback + */ +int ossl_pem_passwd_cb(char *, int, int, void *); + +/* + * ERRor messages + */ +#define OSSL_ErrMsg() ERR_reason_error_string(ERR_get_error()) +NORETURN(void ossl_raise(VALUE, const char *, ...)); + +/* + * Verify callback + */ +extern int ossl_verify_cb_idx; + +struct ossl_verify_cb_args { + VALUE proc; + VALUE preverify_ok; + VALUE store_ctx; +}; + +VALUE ossl_call_verify_cb_proc(struct ossl_verify_cb_args *); +int ossl_verify_cb(int, X509_STORE_CTX *); + +/* + * String to DER String + */ +extern ID ossl_s_to_der; +VALUE ossl_to_der(VALUE); +VALUE ossl_to_der_if_possible(VALUE); + +/* + * Debug + */ +extern VALUE dOSSL; + +#if defined(HAVE_VA_ARGS_MACRO) +#define OSSL_Debug(fmt, ...) do { \ + if (dOSSL == Qtrue) { \ + fprintf(stderr, "OSSL_DEBUG: "); \ + fprintf(stderr, fmt, ##__VA_ARGS__); \ + fprintf(stderr, " [%s:%d]\n", __FILE__, __LINE__); \ + } \ +} while (0) + +#define OSSL_Warning(fmt, ...) do { \ + OSSL_Debug(fmt, ##__VA_ARGS__); \ + rb_warning(fmt, ##__VA_ARGS__); \ +} while (0) + +#define OSSL_Warn(fmt, ...) do { \ + OSSL_Debug(fmt, ##__VA_ARGS__); \ + rb_warn(fmt, ##__VA_ARGS__); \ +} while (0) +#else +void ossl_debug(const char *, ...); +#define OSSL_Debug ossl_debug +#define OSSL_Warning rb_warning +#define OSSL_Warn rb_warn +#endif + +/* + * Include all parts + */ +#include "openssl_missing.h" +#include "ruby_missing.h" +#include "ossl_asn1.h" +#include "ossl_bio.h" +#include "ossl_bn.h" +#include "ossl_cipher.h" +#include "ossl_config.h" +#include "ossl_digest.h" +#include "ossl_hmac.h" +#include "ossl_ns_spki.h" +#include "ossl_ocsp.h" +#include "ossl_pkcs12.h" +#include "ossl_pkcs7.h" +#include "ossl_pkcs5.h" +#include "ossl_pkey.h" +#include "ossl_rand.h" +#include "ossl_ssl.h" +#include "ossl_version.h" +#include "ossl_x509.h" +#include "ossl_engine.h" + +void Init_openssl(void); + +#if defined(__cplusplus) +} +#endif + +#endif /* _OSSL_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.c new file mode 100644 index 0000000..b57f9fb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.c @@ -0,0 +1,1166 @@ +/* + * $Id: ossl_asn1.c 18283 2008-07-31 01:51:44Z nobu $ + * 'OpenSSL for Ruby' team members + * Copyright (C) 2003 + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#if defined(HAVE_SYS_TIME_H) +# include +#elif !defined(NT) && !defined(_WIN32) +struct timeval { + long tv_sec; /* seconds */ + long tv_usec; /* and microseconds */ +}; +#endif + +/* + * DATE conversion + */ +VALUE +asn1time_to_time(ASN1_TIME *time) +{ + struct tm tm; + VALUE argv[6]; + + if (!time || !time->data) return Qnil; + memset(&tm, 0, sizeof(struct tm)); + + switch (time->type) { + case V_ASN1_UTCTIME: + if (sscanf((const char *)time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, + &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { + ossl_raise(rb_eTypeError, "bad UTCTIME format"); + } + if (tm.tm_year < 69) { + tm.tm_year += 2000; + } else { + tm.tm_year += 1900; + } + break; + case V_ASN1_GENERALIZEDTIME: + if (sscanf((const char *)time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, + &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { + ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" ); + } + break; + default: + rb_warning("unknown time format"); + return Qnil; + } + argv[0] = INT2NUM(tm.tm_year); + argv[1] = INT2NUM(tm.tm_mon); + argv[2] = INT2NUM(tm.tm_mday); + argv[3] = INT2NUM(tm.tm_hour); + argv[4] = INT2NUM(tm.tm_min); + argv[5] = INT2NUM(tm.tm_sec); + + return rb_funcall2(rb_cTime, rb_intern("utc"), 6, argv); +} + +/* + * This function is not exported in Ruby's *.h + */ +extern struct timeval rb_time_timeval(VALUE); + +time_t +time_to_time_t(VALUE time) +{ + return (time_t)NUM2LONG(rb_Integer(time)); +} + +/* + * STRING conversion + */ +VALUE +asn1str_to_str(ASN1_STRING *str) +{ + return rb_str_new((const char *)str->data, str->length); +} + +/* + * ASN1_INTEGER conversions + * TODO: Make a decision what's the right way to do this. + */ +#define DO_IT_VIA_RUBY 0 +VALUE +asn1integer_to_num(ASN1_INTEGER *ai) +{ + BIGNUM *bn; +#if DO_IT_VIA_RUBY + char *txt; +#endif + VALUE num; + + if (!ai) { + ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!"); + } + if (!(bn = ASN1_INTEGER_to_BN(ai, NULL))) { + ossl_raise(eOSSLError, NULL); + } +#if DO_IT_VIA_RUBY + if (!(txt = BN_bn2dec(bn))) { + BN_free(bn); + ossl_raise(eOSSLError, NULL); + } + num = rb_cstr_to_inum(txt, 10, Qtrue); + OPENSSL_free(txt); +#else + num = ossl_bn_new(bn); +#endif + BN_free(bn); + + return num; +} + +#if DO_IT_VIA_RUBY +ASN1_INTEGER * +num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai) +{ + BIGNUM *bn = NULL; + + if (RTEST(rb_obj_is_kind_of(obj, cBN))) { + bn = GetBNPtr(obj); + } else { + obj = rb_String(obj); + if (!BN_dec2bn(&bn, StringValuePtr(obj))) { + ossl_raise(eOSSLError, NULL); + } + } + if (!(ai = BN_to_ASN1_INTEGER(bn, ai))) { + BN_free(bn); + ossl_raise(eOSSLError, NULL); + } + BN_free(bn); + return ai; +} +#else +ASN1_INTEGER * +num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai) +{ + BIGNUM *bn = GetBNPtr(obj); + + if (!(ai = BN_to_ASN1_INTEGER(bn, ai))) { + ossl_raise(eOSSLError, NULL); + } + return ai; +} +#endif + +/********/ +/* + * ASN1 module + */ +#define ossl_asn1_get_value(o) rb_attr_get((o),rb_intern("@value")) +#define ossl_asn1_get_tag(o) rb_attr_get((o),rb_intern("@tag")) +#define ossl_asn1_get_tagging(o) rb_attr_get((o),rb_intern("@tagging")) +#define ossl_asn1_get_tag_class(o) rb_attr_get((o),rb_intern("@tag_class")) + +#define ossl_asn1_set_value(o,v) rb_iv_set((o),"@value",(v)) +#define ossl_asn1_set_tag(o,v) rb_iv_set((o),"@tag",(v)) +#define ossl_asn1_set_tagging(o,v) rb_iv_set((o),"@tagging",(v)) +#define ossl_asn1_set_tag_class(o,v) rb_iv_set((o),"@tag_class",(v)) + +VALUE mASN1; +VALUE eASN1Error; + +VALUE cASN1Data; +VALUE cASN1Primitive; +VALUE cASN1Constructive; + +VALUE cASN1Boolean; /* BOOLEAN */ +VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */ +VALUE cASN1BitString; /* BIT STRING */ +VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */ +VALUE cASN1NumericString, cASN1PrintableString; +VALUE cASN1T61String, cASN1VideotexString; +VALUE cASN1IA5String, cASN1GraphicString; +VALUE cASN1ISO64String, cASN1GeneralString; +VALUE cASN1UniversalString, cASN1BMPString; +VALUE cASN1Null; /* NULL */ +VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */ +VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */ +VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */ + +static ID sIMPLICIT, sEXPLICIT; +static ID sUNIVERSAL, sAPPLICATION, sCONTEXT_SPECIFIC, sPRIVATE; + +/* + * Ruby to ASN1 converters + */ +static ASN1_BOOLEAN +obj_to_asn1bool(VALUE obj) +{ + return RTEST(obj) ? 0xff : 0x100; +} + +static ASN1_INTEGER* +obj_to_asn1int(VALUE obj) +{ + return num_to_asn1integer(obj, NULL); +} + +static ASN1_BIT_STRING* +obj_to_asn1bstr(VALUE obj, long unused_bits) +{ + ASN1_BIT_STRING *bstr; + + if(unused_bits < 0) unused_bits = 0; + StringValue(obj); + if(!(bstr = ASN1_BIT_STRING_new())) + ossl_raise(eASN1Error, NULL); + ASN1_BIT_STRING_set(bstr, (unsigned char *)RSTRING_PTR(obj), RSTRING_LEN(obj)); + bstr->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */ + bstr->flags |= ASN1_STRING_FLAG_BITS_LEFT|(unused_bits&0x07); + + return bstr; +} + +static ASN1_STRING* +obj_to_asn1str(VALUE obj) +{ + ASN1_STRING *str; + + StringValue(obj); + if(!(str = ASN1_STRING_new())) + ossl_raise(eASN1Error, NULL); + ASN1_STRING_set(str, RSTRING_PTR(obj), RSTRING_LEN(obj)); + + return str; +} + +static ASN1_NULL* +obj_to_asn1null(VALUE obj) +{ + ASN1_NULL *null; + + if(!NIL_P(obj)) + ossl_raise(eASN1Error, "nil expected"); + if(!(null = ASN1_NULL_new())) + ossl_raise(eASN1Error, NULL); + + return null; +} + +static ASN1_OBJECT* +obj_to_asn1obj(VALUE obj) +{ + ASN1_OBJECT *a1obj; + + StringValue(obj); + a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 0); + if(!a1obj) a1obj = OBJ_txt2obj(RSTRING_PTR(obj), 1); + if(!a1obj) ossl_raise(eASN1Error, "invalid OBJECT ID"); + + return a1obj; +} + +static ASN1_UTCTIME* +obj_to_asn1utime(VALUE time) +{ + time_t sec; + ASN1_UTCTIME *t; + + sec = time_to_time_t(time); + if(!(t = ASN1_UTCTIME_set(NULL, sec))) + ossl_raise(eASN1Error, NULL); + + return t; +} + +static ASN1_GENERALIZEDTIME* +obj_to_asn1gtime(VALUE time) +{ + time_t sec; + ASN1_GENERALIZEDTIME *t; + + sec = time_to_time_t(time); + if(!(t =ASN1_GENERALIZEDTIME_set(NULL, sec))) + ossl_raise(eASN1Error, NULL); + + return t; +} + +static ASN1_STRING* +obj_to_asn1derstr(VALUE obj) +{ + ASN1_STRING *a1str; + VALUE str; + + str = ossl_to_der(obj); + if(!(a1str = ASN1_STRING_new())) + ossl_raise(eASN1Error, NULL); + ASN1_STRING_set(a1str, RSTRING_PTR(str), RSTRING_LEN(str)); + + return a1str; +} + +/* + * DER to Ruby converters + */ +static VALUE +decode_bool(unsigned char* der, int length) +{ + int bool; + const unsigned char *p; + + p = der; + if((bool = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0) + ossl_raise(eASN1Error, NULL); + + return bool ? Qtrue : Qfalse; +} + +static VALUE +decode_int(unsigned char* der, int length) +{ + ASN1_INTEGER *ai; + const unsigned char *p; + VALUE ret; + int status = 0; + + p = der; + if(!(ai = d2i_ASN1_INTEGER(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num, + (VALUE)ai, &status); + ASN1_INTEGER_free(ai); + if(status) rb_jump_tag(status); + + return ret; +} + +static VALUE +decode_bstr(unsigned char* der, int length, long *unused_bits) +{ + ASN1_BIT_STRING *bstr; + const unsigned char *p; + long len; + VALUE ret; + + p = der; + if(!(bstr = d2i_ASN1_BIT_STRING(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + len = bstr->length; + *unused_bits = 0; + if(bstr->flags & ASN1_STRING_FLAG_BITS_LEFT) + *unused_bits = bstr->flags & 0x07; + ret = rb_str_new((const char *)bstr->data, len); + ASN1_BIT_STRING_free(bstr); + + return ret; +} + +static VALUE +decode_enum(unsigned char* der, int length) +{ + ASN1_ENUMERATED *ai; + const unsigned char *p; + VALUE ret; + int status = 0; + + p = der; + if(!(ai = d2i_ASN1_ENUMERATED(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num, + (VALUE)ai, &status); + ASN1_ENUMERATED_free(ai); + if(status) rb_jump_tag(status); + + return ret; +} + +static VALUE +decode_null(unsigned char* der, int length) +{ + ASN1_NULL *null; + const unsigned char *p; + + p = der; + if(!(null = d2i_ASN1_NULL(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + ASN1_NULL_free(null); + + return Qnil; +} + +static VALUE +decode_obj(unsigned char* der, int length) +{ + ASN1_OBJECT *obj; + const unsigned char *p; + VALUE ret; + int nid; + BIO *bio; + + p = der; + if(!(obj = d2i_ASN1_OBJECT(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + if((nid = OBJ_obj2nid(obj)) != NID_undef){ + ASN1_OBJECT_free(obj); + ret = rb_str_new2(OBJ_nid2sn(nid)); + } + else{ + if(!(bio = BIO_new(BIO_s_mem()))){ + ASN1_OBJECT_free(obj); + ossl_raise(eASN1Error, NULL); + } + i2a_ASN1_OBJECT(bio, obj); + ASN1_OBJECT_free(obj); + ret = ossl_membio2str(bio); + } + + return ret; +} + +static VALUE +decode_time(unsigned char* der, int length) +{ + ASN1_TIME *time; + const unsigned char *p; + VALUE ret; + int status = 0; + + p = der; + if(!(time = d2i_ASN1_TIME(NULL, &p, length))) + ossl_raise(eASN1Error, NULL); + ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time, + (VALUE)time, &status); + ASN1_TIME_free(time); + if(status) rb_jump_tag(status); + + return ret; +} + +/********/ + +typedef struct { + const char *name; + VALUE *klass; +} ossl_asn1_info_t; + +static ossl_asn1_info_t ossl_asn1_info[] = { + { "EOC", NULL, }, /* 0 */ + { "BOOLEAN", &cASN1Boolean, }, /* 1 */ + { "INTEGER", &cASN1Integer, }, /* 2 */ + { "BIT_STRING", &cASN1BitString, }, /* 3 */ + { "OCTET_STRING", &cASN1OctetString, }, /* 4 */ + { "NULL", &cASN1Null, }, /* 5 */ + { "OBJECT", &cASN1ObjectId, }, /* 6 */ + { "OBJECT_DESCRIPTOR", NULL, }, /* 7 */ + { "EXTERNAL", NULL, }, /* 8 */ + { "REAL", NULL, }, /* 9 */ + { "ENUMERATED", &cASN1Enumerated, }, /* 10 */ + { "EMBEDDED_PDV", NULL, }, /* 11 */ + { "UTF8STRING", &cASN1UTF8String, }, /* 12 */ + { "RELATIVE_OID", NULL, }, /* 13 */ + { "[UNIVERSAL 14]", NULL, }, /* 14 */ + { "[UNIVERSAL 15]", NULL, }, /* 15 */ + { "SEQUENCE", &cASN1Sequence, }, /* 16 */ + { "SET", &cASN1Set, }, /* 17 */ + { "NUMERICSTRING", &cASN1NumericString, }, /* 18 */ + { "PRINTABLESTRING", &cASN1PrintableString, }, /* 19 */ + { "T61STRING", &cASN1T61String, }, /* 20 */ + { "VIDEOTEXSTRING", &cASN1VideotexString, }, /* 21 */ + { "IA5STRING", &cASN1IA5String, }, /* 22 */ + { "UTCTIME", &cASN1UTCTime, }, /* 23 */ + { "GENERALIZEDTIME", &cASN1GeneralizedTime, }, /* 24 */ + { "GRAPHICSTRING", &cASN1GraphicString, }, /* 25 */ + { "ISO64STRING", &cASN1ISO64String, }, /* 26 */ + { "GENERALSTRING", &cASN1GeneralString, }, /* 27 */ + { "UNIVERSALSTRING", &cASN1UniversalString, }, /* 28 */ + { "CHARACTER_STRING", NULL, }, /* 29 */ + { "BMPSTRING", &cASN1BMPString, }, /* 30 */ +}; + +int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0])); + +static int ossl_asn1_default_tag(VALUE obj); + +ASN1_TYPE* +ossl_asn1_get_asn1type(VALUE obj) +{ + ASN1_TYPE *ret; + VALUE value, rflag; + void *ptr; + void (*free_func)(); + long tag, flag; + + tag = ossl_asn1_default_tag(obj); + value = ossl_asn1_get_value(obj); + switch(tag){ + case V_ASN1_BOOLEAN: + ptr = (void*)(VALUE)obj_to_asn1bool(value); + free_func = NULL; + break; + case V_ASN1_INTEGER: /* FALLTHROUGH */ + case V_ASN1_ENUMERATED: + ptr = obj_to_asn1int(value); + free_func = ASN1_INTEGER_free; + break; + case V_ASN1_BIT_STRING: + rflag = rb_attr_get(obj, rb_intern("@unused_bits")); + flag = NIL_P(rflag) ? -1 : NUM2INT(rflag); + ptr = obj_to_asn1bstr(value, flag); + free_func = ASN1_BIT_STRING_free; + break; + case V_ASN1_NULL: + ptr = obj_to_asn1null(value); + free_func = ASN1_NULL_free; + break; + case V_ASN1_OCTET_STRING: /* FALLTHROUGH */ + case V_ASN1_UTF8STRING: /* FALLTHROUGH */ + case V_ASN1_NUMERICSTRING: /* FALLTHROUGH */ + case V_ASN1_PRINTABLESTRING: /* FALLTHROUGH */ + case V_ASN1_T61STRING: /* FALLTHROUGH */ + case V_ASN1_VIDEOTEXSTRING: /* FALLTHROUGH */ + case V_ASN1_IA5STRING: /* FALLTHROUGH */ + case V_ASN1_GRAPHICSTRING: /* FALLTHROUGH */ + case V_ASN1_ISO64STRING: /* FALLTHROUGH */ + case V_ASN1_GENERALSTRING: /* FALLTHROUGH */ + case V_ASN1_UNIVERSALSTRING: /* FALLTHROUGH */ + case V_ASN1_BMPSTRING: + ptr = obj_to_asn1str(value); + free_func = ASN1_STRING_free; + break; + case V_ASN1_OBJECT: + ptr = obj_to_asn1obj(value); + free_func = ASN1_OBJECT_free; + break; + case V_ASN1_UTCTIME: + ptr = obj_to_asn1utime(value); + free_func = ASN1_TIME_free; + break; + case V_ASN1_GENERALIZEDTIME: + ptr = obj_to_asn1gtime(value); + free_func = ASN1_TIME_free; + break; + case V_ASN1_SET: /* FALLTHROUGH */ + case V_ASN1_SEQUENCE: + ptr = obj_to_asn1derstr(obj); + free_func = ASN1_STRING_free; + break; + default: + ossl_raise(eASN1Error, "unsupported ASN.1 type"); + } + if(!(ret = OPENSSL_malloc(sizeof(ASN1_TYPE)))){ + if(free_func) free_func(ptr); + ossl_raise(eASN1Error, "ASN1_TYPE alloc failure"); + } + memset(ret, 0, sizeof(ASN1_TYPE)); + ASN1_TYPE_set(ret, tag, ptr); + + return ret; +} + +static int +ossl_asn1_default_tag(VALUE obj) +{ + int i; + + for(i = 0; i < ossl_asn1_info_size; i++){ + if(ossl_asn1_info[i].klass && + rb_obj_is_kind_of(obj, *ossl_asn1_info[i].klass)){ + return i; + } + } + ossl_raise(eASN1Error, "universal tag for %s not found", + rb_class2name(CLASS_OF(obj))); + + return -1; /* dummy */ +} + +static int +ossl_asn1_tag(VALUE obj) +{ + VALUE tag; + + tag = ossl_asn1_get_tag(obj); + if(NIL_P(tag)) + ossl_raise(eASN1Error, "tag number not specified"); + + return NUM2INT(tag); +} + +static int +ossl_asn1_is_explicit(VALUE obj) +{ + VALUE s; + int ret = -1; + + s = ossl_asn1_get_tagging(obj); + if(NIL_P(s)) return 0; + else if(SYMBOL_P(s)){ + if (SYM2ID(s) == sIMPLICIT) + ret = 0; + else if (SYM2ID(s) == sEXPLICIT) + ret = 1; + } + if(ret < 0){ + ossl_raise(eASN1Error, "invalid tag default"); + } + + return ret; +} + +static int +ossl_asn1_tag_class(VALUE obj) +{ + VALUE s; + int ret = -1; + + s = ossl_asn1_get_tag_class(obj); + if(NIL_P(s)) ret = V_ASN1_UNIVERSAL; + else if(SYMBOL_P(s)){ + if (SYM2ID(s) == sUNIVERSAL) + ret = V_ASN1_UNIVERSAL; + else if (SYM2ID(s) == sAPPLICATION) + ret = V_ASN1_APPLICATION; + else if (SYM2ID(s) == sCONTEXT_SPECIFIC) + ret = V_ASN1_CONTEXT_SPECIFIC; + else if (SYM2ID(s) == sPRIVATE) + ret = V_ASN1_PRIVATE; + } + if(ret < 0){ + ossl_raise(eASN1Error, "invalid tag class"); + } + + return ret; +} + +static VALUE +ossl_asn1_class2sym(int tc) +{ + if((tc & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) + return ID2SYM(sPRIVATE); + else if((tc & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) + return ID2SYM(sCONTEXT_SPECIFIC); + else if((tc & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) + return ID2SYM(sAPPLICATION); + else + return ID2SYM(sUNIVERSAL); +} + +static VALUE +ossl_asn1data_initialize(VALUE self, VALUE value, VALUE tag, VALUE tag_class) +{ + if(!SYMBOL_P(tag_class)) + ossl_raise(eASN1Error, "invalid tag class"); + if((SYM2ID(tag_class) == sUNIVERSAL) && NUM2INT(tag) > 31) + ossl_raise(eASN1Error, "tag number for Universal too large"); + ossl_asn1_set_tag(self, tag); + ossl_asn1_set_value(self, value); + ossl_asn1_set_tag_class(self, tag_class); + + return self; +} + +static VALUE +join_der_i(VALUE i, VALUE str) +{ + i = ossl_to_der_if_possible(i); + StringValue(i); + rb_str_append(str, i); + return Qnil; +} + +static VALUE +join_der(VALUE enumerable) +{ + VALUE str = rb_str_new(0, 0); + rb_block_call(enumerable, rb_intern("each"), 0, 0, join_der_i, str); + return str; +} + +static VALUE +ossl_asn1data_to_der(VALUE self) +{ + VALUE value, der; + int tag, tag_class, is_cons = 0; + long length; + unsigned char *p; + + value = ossl_asn1_get_value(self); + if(rb_obj_is_kind_of(value, rb_cArray)){ + is_cons = 1; + value = join_der(value); + } + StringValue(value); + + tag = ossl_asn1_tag(self); + tag_class = ossl_asn1_tag_class(self); + if((length = ASN1_object_size(1, RSTRING_LEN(value), tag)) <= 0) + ossl_raise(eASN1Error, NULL); + der = rb_str_new(0, length); + p = (unsigned char *)RSTRING_PTR(der); + ASN1_put_object(&p, is_cons, RSTRING_LEN(value), tag, tag_class); + memcpy(p, RSTRING_PTR(value), RSTRING_LEN(value)); + p += RSTRING_LEN(value); + ossl_str_adjust(der, p); + + return der; +} + +static VALUE +ossl_asn1_decode0(unsigned char **pp, long length, long *offset, long depth, + int once, int yield) +{ + unsigned char *start, *p; + const unsigned char *p0; + long len, off = *offset; + int hlen, tag, tc, j; + VALUE ary, asn1data, value, tag_class; + + ary = rb_ary_new(); + p = *pp; + while(length > 0){ + start = p; + p0 = p; + j = ASN1_get_object(&p0, &len, &tag, &tc, length); + p = (unsigned char *)p0; + if(j & 0x80) ossl_raise(eASN1Error, NULL); + hlen = p - start; + if(yield){ + VALUE arg = rb_ary_new(); + rb_ary_push(arg, LONG2NUM(depth)); + rb_ary_push(arg, LONG2NUM(off)); + rb_ary_push(arg, LONG2NUM(hlen)); + rb_ary_push(arg, LONG2NUM(len)); + rb_ary_push(arg, (j & V_ASN1_CONSTRUCTED) ? Qtrue : Qfalse); + rb_ary_push(arg, ossl_asn1_class2sym(tc)); + rb_ary_push(arg, INT2NUM(tag)); + rb_yield(arg); + } + length -= hlen; + off += hlen; + if(len > length) ossl_raise(eASN1Error, "value is too short"); + if((tc & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) + tag_class = sPRIVATE; + else if((tc & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) + tag_class = sCONTEXT_SPECIFIC; + else if((tc & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) + tag_class = sAPPLICATION; + else + tag_class = sUNIVERSAL; + if(j & V_ASN1_CONSTRUCTED){ + /* TODO: if j == 0x21 it is indefinite length object. */ + if((j == 0x21) && (len == 0)){ + long lastoff = off; + value = ossl_asn1_decode0(&p, length, &off, depth+1, 0, yield); + len = off - lastoff; + } + else value = ossl_asn1_decode0(&p, len, &off, depth+1, 0, yield); + } + else{ + value = rb_str_new((const char *)p, len); + p += len; + off += len; + } + if(tag_class == sUNIVERSAL && + tag < ossl_asn1_info_size && ossl_asn1_info[tag].klass){ + VALUE klass = *ossl_asn1_info[tag].klass; + long flag = 0; + if(!rb_obj_is_kind_of(value, rb_cArray)){ + switch(tag){ + case V_ASN1_BOOLEAN: + value = decode_bool(start, hlen+len); + break; + case V_ASN1_INTEGER: + value = decode_int(start, hlen+len); + break; + case V_ASN1_BIT_STRING: + value = decode_bstr(start, hlen+len, &flag); + break; + case V_ASN1_NULL: + value = decode_null(start, hlen+len); + break; + case V_ASN1_ENUMERATED: + value = decode_enum(start, hlen+len); + break; + case V_ASN1_OBJECT: + value = decode_obj(start, hlen+len); + break; + case V_ASN1_UTCTIME: /* FALLTHROUGH */ + case V_ASN1_GENERALIZEDTIME: + value = decode_time(start, hlen+len); + break; + default: + /* use original value */ + break; + } + } + asn1data = rb_funcall(klass, rb_intern("new"), 1, value); + if(tag == V_ASN1_BIT_STRING){ + rb_iv_set(asn1data, "@unused_bits", LONG2NUM(flag)); + } + } + else{ + asn1data = rb_funcall(cASN1Data, rb_intern("new"), 3, + value, INT2NUM(tag), ID2SYM(tag_class)); + } + rb_ary_push(ary, asn1data); + length -= len; + if(once) break; + } + *pp = p; + *offset = off; + + return ary; +} + +static VALUE +ossl_asn1_traverse(VALUE self, VALUE obj) +{ + unsigned char *p; + long offset = 0; + volatile VALUE tmp; + + obj = ossl_to_der_if_possible(obj); + tmp = rb_str_new4(StringValue(obj)); + p = (unsigned char *)RSTRING_PTR(tmp); + ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 1); + + return Qnil; +} + +static VALUE +ossl_asn1_decode(VALUE self, VALUE obj) +{ + VALUE ret, ary; + unsigned char *p; + long offset = 0; + volatile VALUE tmp; + + obj = ossl_to_der_if_possible(obj); + tmp = rb_str_new4(StringValue(obj)); + p = (unsigned char *)RSTRING_PTR(tmp); + ary = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 1, 0); + ret = rb_ary_entry(ary, 0); + + return ret; +} + +static VALUE +ossl_asn1_decode_all(VALUE self, VALUE obj) +{ + VALUE ret; + unsigned char *p; + long offset = 0; + volatile VALUE tmp; + + obj = ossl_to_der_if_possible(obj); + tmp = rb_str_new4(StringValue(obj)); + p = (unsigned char *)RSTRING_PTR(tmp); + ret = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 0); + + return ret; +} + +static VALUE +ossl_asn1_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE value, tag, tagging, tag_class; + + rb_scan_args(argc, argv, "13", &value, &tag, &tagging, &tag_class); + if(argc > 1){ + if(NIL_P(tag)) + ossl_raise(eASN1Error, "must specify tag number"); + if(NIL_P(tagging)) + tagging = ID2SYM(sEXPLICIT); + if(!SYMBOL_P(tagging)) + ossl_raise(eASN1Error, "invalid tag default"); + if(NIL_P(tag_class)) + tag_class = ID2SYM(sCONTEXT_SPECIFIC); + if(!SYMBOL_P(tag_class)) + ossl_raise(eASN1Error, "invalid tag class"); + if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31) + ossl_raise(eASN1Error, "tag number for Universal too large"); + } + else{ + tag = INT2NUM(ossl_asn1_default_tag(self)); + tagging = Qnil; + tag_class = ID2SYM(sUNIVERSAL); + } + ossl_asn1_set_tag(self, tag); + ossl_asn1_set_value(self, value); + ossl_asn1_set_tagging(self, tagging); + ossl_asn1_set_tag_class(self, tag_class); + + return self; +} + +static int +ossl_i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp) +{ +#if OPENSSL_VERSION_NUMBER < 0x00907000L + if(!a) return 0; + if(a->type == V_ASN1_BOOLEAN) + return i2d_ASN1_BOOLEAN(a->value.boolean, pp); +#endif + return i2d_ASN1_TYPE(a, pp); +} + +static void +ossl_ASN1_TYPE_free(ASN1_TYPE *a) +{ +#if OPENSSL_VERSION_NUMBER < 0x00907000L + if(!a) return; + if(a->type == V_ASN1_BOOLEAN){ + OPENSSL_free(a); + return; + } +#endif + ASN1_TYPE_free(a); +} + +static VALUE +ossl_asn1prim_to_der(VALUE self) +{ + ASN1_TYPE *asn1; + int tn, tc, explicit; + long len, reallen; + unsigned char *buf, *p; + VALUE str; + + tn = NUM2INT(ossl_asn1_get_tag(self)); + tc = ossl_asn1_tag_class(self); + explicit = ossl_asn1_is_explicit(self); + asn1 = ossl_asn1_get_asn1type(self); + + len = ASN1_object_size(1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn); + if(!(buf = OPENSSL_malloc(len))){ + ossl_ASN1_TYPE_free(asn1); + ossl_raise(eASN1Error, "cannot alloc buffer"); + } + p = buf; + if (tc == V_ASN1_UNIVERSAL) { + ossl_i2d_ASN1_TYPE(asn1, &p); + } else if (explicit) { + ASN1_put_object(&p, 1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn, tc); + ossl_i2d_ASN1_TYPE(asn1, &p); + } else { + ossl_i2d_ASN1_TYPE(asn1, &p); + *buf = tc | tn | (*buf & V_ASN1_CONSTRUCTED); + } + ossl_ASN1_TYPE_free(asn1); + reallen = p - buf; + assert(reallen <= len); + str = ossl_buf2str((char *)buf, reallen); /* buf will be free in ossl_buf2str */ + + return str; +} + +static VALUE +ossl_asn1cons_to_der(VALUE self) +{ + int tag, tn, tc, explicit; + long seq_len, length; + unsigned char *p; + VALUE value, str; + + tag = ossl_asn1_default_tag(self); + tn = NUM2INT(ossl_asn1_get_tag(self)); + tc = ossl_asn1_tag_class(self); + explicit = ossl_asn1_is_explicit(self); + value = join_der(ossl_asn1_get_value(self)); + + seq_len = ASN1_object_size(1, RSTRING_LEN(value), tag); + length = ASN1_object_size(1, seq_len, tn); + str = rb_str_new(0, length); + p = (unsigned char *)RSTRING_PTR(str); + if(tc == V_ASN1_UNIVERSAL) + ASN1_put_object(&p, 1, RSTRING_LEN(value), tn, tc); + else{ + if(explicit){ + ASN1_put_object(&p, 1, seq_len, tn, tc); + ASN1_put_object(&p, 1, RSTRING_LEN(value), tag, V_ASN1_UNIVERSAL); + } + else ASN1_put_object(&p, 1, RSTRING_LEN(value), tn, tc); + } + memcpy(p, RSTRING_PTR(value), RSTRING_LEN(value)); + p += RSTRING_LEN(value); + ossl_str_adjust(str, p); + + return str; +} + +static VALUE +ossl_asn1cons_each(VALUE self) +{ + rb_ary_each(ossl_asn1_get_value(self)); + return self; +} + +static VALUE +ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln) +{ + StringValue(oid); + StringValue(sn); + StringValue(ln); + + if(!OBJ_create(RSTRING_PTR(oid), RSTRING_PTR(sn), RSTRING_PTR(ln))) + ossl_raise(eASN1Error, NULL); + + return Qtrue; +} + +static VALUE +ossl_asn1obj_get_sn(VALUE self) +{ + VALUE val, ret = Qnil; + int nid; + + val = ossl_asn1_get_value(self); + if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef) + ret = rb_str_new2(OBJ_nid2sn(nid)); + + return ret; +} + +static VALUE +ossl_asn1obj_get_ln(VALUE self) +{ + VALUE val, ret = Qnil; + int nid; + + val = ossl_asn1_get_value(self); + if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef) + ret = rb_str_new2(OBJ_nid2ln(nid)); + + return ret; +} + +static VALUE +ossl_asn1obj_get_oid(VALUE self) +{ + VALUE val; + ASN1_OBJECT *a1obj; + char buf[128]; + + val = ossl_asn1_get_value(self); + a1obj = obj_to_asn1obj(val); + OBJ_obj2txt(buf, sizeof(buf), a1obj, 1); + ASN1_OBJECT_free(a1obj); + + return rb_str_new2(buf); +} + +#define OSSL_ASN1_IMPL_FACTORY_METHOD(klass) \ +static VALUE ossl_asn1_##klass(int argc, VALUE *argv, VALUE self)\ +{ return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); } + +OSSL_ASN1_IMPL_FACTORY_METHOD(Boolean) +OSSL_ASN1_IMPL_FACTORY_METHOD(Integer) +OSSL_ASN1_IMPL_FACTORY_METHOD(Enumerated) +OSSL_ASN1_IMPL_FACTORY_METHOD(BitString) +OSSL_ASN1_IMPL_FACTORY_METHOD(OctetString) +OSSL_ASN1_IMPL_FACTORY_METHOD(UTF8String) +OSSL_ASN1_IMPL_FACTORY_METHOD(NumericString) +OSSL_ASN1_IMPL_FACTORY_METHOD(PrintableString) +OSSL_ASN1_IMPL_FACTORY_METHOD(T61String) +OSSL_ASN1_IMPL_FACTORY_METHOD(VideotexString) +OSSL_ASN1_IMPL_FACTORY_METHOD(IA5String) +OSSL_ASN1_IMPL_FACTORY_METHOD(GraphicString) +OSSL_ASN1_IMPL_FACTORY_METHOD(ISO64String) +OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralString) +OSSL_ASN1_IMPL_FACTORY_METHOD(UniversalString) +OSSL_ASN1_IMPL_FACTORY_METHOD(BMPString) +OSSL_ASN1_IMPL_FACTORY_METHOD(Null) +OSSL_ASN1_IMPL_FACTORY_METHOD(ObjectId) +OSSL_ASN1_IMPL_FACTORY_METHOD(UTCTime) +OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralizedTime) +OSSL_ASN1_IMPL_FACTORY_METHOD(Sequence) +OSSL_ASN1_IMPL_FACTORY_METHOD(Set) + +void +Init_ossl_asn1() +{ + VALUE ary; + int i; + +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + sUNIVERSAL = rb_intern("UNIVERSAL"); + sCONTEXT_SPECIFIC = rb_intern("CONTEXT_SPECIFIC"); + sAPPLICATION = rb_intern("APPLICATION"); + sPRIVATE = rb_intern("PRIVATE"); + sEXPLICIT = rb_intern("EXPLICIT"); + sIMPLICIT = rb_intern("IMPLICIT"); + + mASN1 = rb_define_module_under(mOSSL, "ASN1"); + eASN1Error = rb_define_class_under(mASN1, "ASN1Error", eOSSLError); + rb_define_module_function(mASN1, "traverse", ossl_asn1_traverse, 1); + rb_define_module_function(mASN1, "decode", ossl_asn1_decode, 1); + rb_define_module_function(mASN1, "decode_all", ossl_asn1_decode_all, 1); + ary = rb_ary_new(); + rb_define_const(mASN1, "UNIVERSAL_TAG_NAME", ary); + for(i = 0; i < ossl_asn1_info_size; i++){ + if(ossl_asn1_info[i].name[0] == '[') continue; + rb_define_const(mASN1, ossl_asn1_info[i].name, INT2NUM(i)); + rb_ary_store(ary, i, rb_str_new2(ossl_asn1_info[i].name)); + } + + cASN1Data = rb_define_class_under(mASN1, "ASN1Data", rb_cObject); + rb_attr(cASN1Data, rb_intern("value"), 1, 1, 0); + rb_attr(cASN1Data, rb_intern("tag"), 1, 1, 0); + rb_attr(cASN1Data, rb_intern("tag_class"), 1, 1, 0); + rb_define_method(cASN1Data, "initialize", ossl_asn1data_initialize, 3); + rb_define_method(cASN1Data, "to_der", ossl_asn1data_to_der, 0); + + cASN1Primitive = rb_define_class_under(mASN1, "Primitive", cASN1Data); + rb_attr(cASN1Primitive, rb_intern("tagging"), 1, 1, Qtrue); + rb_define_method(cASN1Primitive, "initialize", ossl_asn1_initialize, -1); + rb_define_method(cASN1Primitive, "to_der", ossl_asn1prim_to_der, 0); + + cASN1Constructive = rb_define_class_under(mASN1,"Constructive", cASN1Data); + rb_include_module(cASN1Constructive, rb_mEnumerable); + rb_attr(cASN1Constructive, rb_intern("tagging"), 1, 1, Qtrue); + rb_define_method(cASN1Constructive, "initialize", ossl_asn1_initialize, -1); + rb_define_method(cASN1Constructive, "to_der", ossl_asn1cons_to_der, 0); + rb_define_method(cASN1Constructive, "each", ossl_asn1cons_each, 0); + +#define OSSL_ASN1_DEFINE_CLASS(name, super) \ +do{\ + cASN1##name = rb_define_class_under(mASN1, #name, cASN1##super);\ + rb_define_module_function(mASN1, #name, ossl_asn1_##name, -1);\ +}while(0) + + OSSL_ASN1_DEFINE_CLASS(Boolean, Primitive); + OSSL_ASN1_DEFINE_CLASS(Integer, Primitive); + OSSL_ASN1_DEFINE_CLASS(Enumerated, Primitive); + OSSL_ASN1_DEFINE_CLASS(BitString, Primitive); + OSSL_ASN1_DEFINE_CLASS(OctetString, Primitive); + OSSL_ASN1_DEFINE_CLASS(UTF8String, Primitive); + OSSL_ASN1_DEFINE_CLASS(NumericString, Primitive); + OSSL_ASN1_DEFINE_CLASS(PrintableString, Primitive); + OSSL_ASN1_DEFINE_CLASS(T61String, Primitive); + OSSL_ASN1_DEFINE_CLASS(VideotexString, Primitive); + OSSL_ASN1_DEFINE_CLASS(IA5String, Primitive); + OSSL_ASN1_DEFINE_CLASS(GraphicString, Primitive); + OSSL_ASN1_DEFINE_CLASS(ISO64String, Primitive); + OSSL_ASN1_DEFINE_CLASS(GeneralString, Primitive); + OSSL_ASN1_DEFINE_CLASS(UniversalString, Primitive); + OSSL_ASN1_DEFINE_CLASS(BMPString, Primitive); + OSSL_ASN1_DEFINE_CLASS(Null, Primitive); + OSSL_ASN1_DEFINE_CLASS(ObjectId, Primitive); + OSSL_ASN1_DEFINE_CLASS(UTCTime, Primitive); + OSSL_ASN1_DEFINE_CLASS(GeneralizedTime, Primitive); + + OSSL_ASN1_DEFINE_CLASS(Sequence, Constructive); + OSSL_ASN1_DEFINE_CLASS(Set, Constructive); + + rb_define_singleton_method(cASN1ObjectId, "register", ossl_asn1obj_s_register, 3); + rb_define_method(cASN1ObjectId, "sn", ossl_asn1obj_get_sn, 0); + rb_define_method(cASN1ObjectId, "ln", ossl_asn1obj_get_ln, 0); + rb_define_method(cASN1ObjectId, "oid", ossl_asn1obj_get_oid, 0); + rb_define_alias(cASN1ObjectId, "short_name", "sn"); + rb_define_alias(cASN1ObjectId, "long_name", "ln"); + rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.h new file mode 100644 index 0000000..75f18a3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_asn1.h @@ -0,0 +1,59 @@ +/* + * $Id: ossl_asn1.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' team members + * Copyright (C) 2003 + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_ASN1_H_) +#define _OSSL_ASN1_H_ + +/* + * ASN1_DATE conversions + */ +VALUE asn1time_to_time(ASN1_TIME *); +time_t time_to_time_t(VALUE); + +/* + * ASN1_STRING conversions + */ +VALUE asn1str_to_str(ASN1_STRING *); + +/* + * ASN1_INTEGER conversions + */ +VALUE asn1integer_to_num(ASN1_INTEGER *); +ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *); + +/* + * ASN1 module + */ +extern VALUE mASN1; +extern VALUE eASN1Error; + +extern VALUE cASN1Data; +extern VALUE cASN1Primitive; +extern VALUE cASN1Constructive; + +extern VALUE cASN1Boolean; /* BOOLEAN */ +extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */ +extern VALUE cASN1BitString; /* BIT STRING */ +extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */ +extern VALUE cASN1NumericString, cASN1PrintableString; +extern VALUE cASN1T61String, cASN1VideotexString; +extern VALUE cASN1IA5String, cASN1GraphicString; +extern VALUE cASN1ISO64String, cASN1GeneralString; +extern VALUE cASN1UniversalString, cASN1BMPString; +extern VALUE cASN1Null; /* NULL */ +extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */ +extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */ +extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */ + +ASN1_TYPE *ossl_asn1_get_asn1type(VALUE); + +void Init_ossl_asn1(void); + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.c new file mode 100644 index 0000000..b67ebe1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.c @@ -0,0 +1,86 @@ +/* + * $Id: ossl_bio.c 12133 2007-04-02 19:00:23Z technorama $ + * 'OpenSSL for Ruby' team members + * Copyright (C) 2003 + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" +#ifdef HAVE_UNISTD_H +#include +#endif + +BIO * +ossl_obj2bio(VALUE obj) +{ + BIO *bio; + + if (TYPE(obj) == T_FILE) { + rb_io_t *fptr; + FILE *fp; + int fd; + + GetOpenFile(obj, fptr); + rb_io_check_readable(fptr); + if ((fd = dup(FPTR_TO_FD(fptr))) < 0){ + rb_sys_fail(0); + } + if (!(fp = fdopen(fd, "r"))){ + close(fd); + rb_sys_fail(0); + } + if (!(bio = BIO_new_fp(fp, BIO_CLOSE))){ + fclose(fp); + ossl_raise(eOSSLError, NULL); + } + } + else { + StringValue(obj); + bio = BIO_new_mem_buf(RSTRING_PTR(obj), RSTRING_LEN(obj)); + if (!bio) ossl_raise(eOSSLError, NULL); + } + + return bio; +} + +BIO * +ossl_protect_obj2bio(VALUE obj, int *status) +{ + BIO *ret = NULL; + ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status); + return ret; +} + +VALUE +ossl_membio2str0(BIO *bio) +{ + VALUE ret; + BUF_MEM *buf; + + BIO_get_mem_ptr(bio, &buf); + ret = rb_str_new(buf->data, buf->length); + + return ret; +} + +VALUE +ossl_protect_membio2str(BIO *bio, int *status) +{ + return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status); +} + +VALUE +ossl_membio2str(BIO *bio) +{ + VALUE ret; + int status = 0; + + ret = ossl_protect_membio2str(bio, &status); + BIO_free(bio); + if(status) rb_jump_tag(status); + + return ret; +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.h new file mode 100644 index 0000000..f520e64 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bio.h @@ -0,0 +1,21 @@ +/* + * $Id: ossl_bio.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' team members + * Copyright (C) 2003 + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_BIO_H_) +#define _OSSL_BIO_H_ + +BIO *ossl_obj2bio(VALUE); +BIO *ossl_protect_obj2bio(VALUE,int*); +VALUE ossl_membio2str0(BIO*); +VALUE ossl_membio2str(BIO*); +VALUE ossl_protect_membio2str(BIO*,int*); + +#endif + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.c new file mode 100644 index 0000000..d8793f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.c @@ -0,0 +1,852 @@ +/* + * $Id: ossl_bn.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Technorama team + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +/* modified by Michal Rokos */ +#include "ossl.h" + +#define WrapBN(klass, obj, bn) do { \ + if (!bn) { \ + ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, BN_clear_free, bn); \ +} while (0) + +#define GetBN(obj, bn) do { \ + Data_Get_Struct(obj, BIGNUM, bn); \ + if (!bn) { \ + ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ + } \ +} while (0) + +#define SafeGetBN(obj, bn) do { \ + OSSL_Check_Kind(obj, cBN); \ + GetBN(obj, bn); \ +} while (0) + +/* + * Classes + */ +VALUE cBN; +VALUE eBNError; + +/* + * Public + */ +VALUE +ossl_bn_new(const BIGNUM *bn) +{ + BIGNUM *newbn; + VALUE obj; + + newbn = bn ? BN_dup(bn) : BN_new(); + if (!newbn) { + ossl_raise(eBNError, NULL); + } + WrapBN(cBN, obj, newbn); + + return obj; +} + +BIGNUM * +GetBNPtr(VALUE obj) +{ + BIGNUM *bn = NULL; + + if (RTEST(rb_obj_is_kind_of(obj, cBN))) { + GetBN(obj, bn); + } else switch (TYPE(obj)) { + case T_FIXNUM: + case T_BIGNUM: + obj = rb_String(obj); + if (!BN_dec2bn(&bn, StringValuePtr(obj))) { + ossl_raise(eBNError, NULL); + } + WrapBN(cBN, obj, bn); /* Handle potencial mem leaks */ + break; + default: + ossl_raise(rb_eTypeError, "Cannot convert into OpenSSL::BN"); + } + return bn; +} + +/* + * Private + */ +/* + * BN_CTX - is used in more difficult math. ops + * (Why just 1? Because Ruby itself isn't thread safe, + * we don't need to care about threads) + */ +BN_CTX *ossl_bn_ctx; + +static VALUE +ossl_bn_alloc(VALUE klass) +{ + BIGNUM *bn; + VALUE obj; + + if (!(bn = BN_new())) { + ossl_raise(eBNError, NULL); + } + WrapBN(klass, obj, bn); + + return obj; +} + +/* + * call-seq: + * BN.new => aBN + * BN.new(bn) => aBN + * BN.new(string) => aBN + * BN.new(string, 0 | 2 | 10 | 16) => aBN + */ +static VALUE +ossl_bn_initialize(int argc, VALUE *argv, VALUE self) +{ + BIGNUM *bn; + VALUE str, bs; + int base = 10; + + if (rb_scan_args(argc, argv, "11", &str, &bs) == 2) { + base = NUM2INT(bs); + } + StringValue(str); + GetBN(self, bn); + if (RTEST(rb_obj_is_kind_of(str, cBN))) { + BIGNUM *other; + + GetBN(str, other); /* Safe - we checked kind_of? above */ + if (!BN_copy(bn, other)) { + ossl_raise(eBNError, NULL); + } + return self; + } + + switch (base) { + case 0: + if (!BN_mpi2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) { + ossl_raise(eBNError, NULL); + } + break; + case 2: + if (!BN_bin2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) { + ossl_raise(eBNError, NULL); + } + break; + case 10: + if (!BN_dec2bn(&bn, RSTRING_PTR(str))) { + ossl_raise(eBNError, NULL); + } + break; + case 16: + if (!BN_hex2bn(&bn, RSTRING_PTR(str))) { + ossl_raise(eBNError, NULL); + } + break; + default: + ossl_raise(rb_eArgError, "invalid radix %d", base); + } + return self; +} + +/* + * call-seq: + * bn.to_s => string + * bn.to_s(base) => string + * + * === Parameters + * * +base+ - integer + * * * Valid values: + * * * * 0 - MPI + * * * * 2 - binary + * * * * 10 - the default + * * * * 16 - hex + */ +static VALUE +ossl_bn_to_s(int argc, VALUE *argv, VALUE self) +{ + BIGNUM *bn; + VALUE str, bs; + int base = 10, len; + char *buf; + + if (rb_scan_args(argc, argv, "01", &bs) == 1) { + base = NUM2INT(bs); + } + GetBN(self, bn); + switch (base) { + case 0: + len = BN_bn2mpi(bn, NULL); + str = rb_str_new(0, len); + if (BN_bn2mpi(bn, (unsigned char *)RSTRING_PTR(str)) != len) + ossl_raise(eBNError, NULL); + break; + case 2: + len = BN_num_bytes(bn); + str = rb_str_new(0, len); + if (BN_bn2bin(bn, (unsigned char *)RSTRING_PTR(str)) != len) + ossl_raise(eBNError, NULL); + break; + case 10: + if (!(buf = BN_bn2dec(bn))) ossl_raise(eBNError, NULL); + str = ossl_buf2str(buf, strlen(buf)); + break; + case 16: + if (!(buf = BN_bn2hex(bn))) ossl_raise(eBNError, NULL); + str = ossl_buf2str(buf, strlen(buf)); + break; + default: + ossl_raise(rb_eArgError, "invalid radix %d", base); + } + + return str; +} + +/* + * call-seq: + * bn.to_i => integer + */ +static VALUE +ossl_bn_to_i(VALUE self) +{ + BIGNUM *bn; + char *txt; + VALUE num; + + GetBN(self, bn); + + if (!(txt = BN_bn2dec(bn))) { + ossl_raise(eBNError, NULL); + } + num = rb_cstr_to_inum(txt, 10, Qtrue); + OPENSSL_free(txt); + + return num; +} + +static VALUE +ossl_bn_to_bn(VALUE self) +{ + return self; +} + +static VALUE +ossl_bn_coerce(VALUE self, VALUE other) +{ + switch(TYPE(other)) { + case T_STRING: + self = ossl_bn_to_s(0, NULL, self); + break; + case T_FIXNUM: + case T_BIGNUM: + self = ossl_bn_to_i(self); + break; + default: + if (!RTEST(rb_obj_is_kind_of(other, cBN))) { + ossl_raise(rb_eTypeError, "Don't know how to coerce"); + } + } + return rb_assoc_new(other, self); +} + +#define BIGNUM_BOOL1(func) \ + /* \ + * call-seq: \ + * bn.##func -> true | false \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self) \ + { \ + BIGNUM *bn; \ + GetBN(self, bn); \ + if (BN_##func(bn)) { \ + return Qtrue; \ + } \ + return Qfalse; \ + } +BIGNUM_BOOL1(is_zero); +BIGNUM_BOOL1(is_one); +BIGNUM_BOOL1(is_odd); + +#define BIGNUM_1c(func) \ + /* \ + * call-seq: \ + * bn.##func -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self) \ + { \ + BIGNUM *bn, *result; \ + VALUE obj; \ + GetBN(self, bn); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, bn, ossl_bn_ctx)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(CLASS_OF(self), obj, result); \ + return obj; \ + } +BIGNUM_1c(sqr); + +#define BIGNUM_2(func) \ + /* \ + * call-seq: \ + * bn.##func(bn2) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE other) \ + { \ + BIGNUM *bn1, *bn2 = GetBNPtr(other), *result; \ + VALUE obj; \ + GetBN(self, bn1); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, bn1, bn2)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(CLASS_OF(self), obj, result); \ + return obj; \ + } +BIGNUM_2(add); +BIGNUM_2(sub); + +#define BIGNUM_2c(func) \ + /* \ + * call-seq: \ + * bn.##func(bn2) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE other) \ + { \ + BIGNUM *bn1, *bn2 = GetBNPtr(other), *result; \ + VALUE obj; \ + GetBN(self, bn1); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, bn1, bn2, ossl_bn_ctx)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(CLASS_OF(self), obj, result); \ + return obj; \ + } +BIGNUM_2c(mul); +BIGNUM_2c(mod); +BIGNUM_2c(exp); +BIGNUM_2c(gcd); +BIGNUM_2c(mod_sqr); +BIGNUM_2c(mod_inverse); + +/* + * call-seq: + * bn1 / bn2 => [result, remainder] + */ +static VALUE +ossl_bn_div(VALUE self, VALUE other) +{ + BIGNUM *bn1, *bn2 = GetBNPtr(other), *r1, *r2; + VALUE obj1, obj2; + + GetBN(self, bn1); + + if (!(r1 = BN_new())) { + ossl_raise(eBNError, NULL); + } + if (!(r2 = BN_new())) { + BN_free(r1); + ossl_raise(eBNError, NULL); + } + if (!BN_div(r1, r2, bn1, bn2, ossl_bn_ctx)) { + BN_free(r1); + BN_free(r2); + ossl_raise(eBNError, NULL); + } + WrapBN(CLASS_OF(self), obj1, r1); + WrapBN(CLASS_OF(self), obj2, r2); + + return rb_ary_new3(2, obj1, obj2); +} + +#define BIGNUM_3c(func) \ + /* \ + * call-seq: \ + * bn.##func(bn1, bn2) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE other1, VALUE other2) \ + { \ + BIGNUM *bn1, *bn2 = GetBNPtr(other1); \ + BIGNUM *bn3 = GetBNPtr(other2), *result; \ + VALUE obj; \ + GetBN(self, bn1); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, bn1, bn2, bn3, ossl_bn_ctx)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(CLASS_OF(self), obj, result); \ + return obj; \ + } +BIGNUM_3c(mod_add); +BIGNUM_3c(mod_sub); +BIGNUM_3c(mod_mul); +BIGNUM_3c(mod_exp); + +#define BIGNUM_BIT(func) \ + /* \ + * call-seq: \ + * bn.##func(bit) -> self \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE bit) \ + { \ + BIGNUM *bn; \ + GetBN(self, bn); \ + if (!BN_##func(bn, NUM2INT(bit))) { \ + ossl_raise(eBNError, NULL); \ + } \ + return self; \ + } +BIGNUM_BIT(set_bit); +BIGNUM_BIT(clear_bit); +BIGNUM_BIT(mask_bits); + +/* + * call-seq: + * bn.bit_set?(bit) => true | false + */ +static VALUE +ossl_bn_is_bit_set(VALUE self, VALUE bit) +{ + int b; + BIGNUM *bn; + + b = NUM2INT(bit); + GetBN(self, bn); + if (BN_is_bit_set(bn, b)) { + return Qtrue; + } + return Qfalse; +} + +#define BIGNUM_SHIFT(func) \ + /* \ + * call-seq: \ + * bn.##func(bits) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE bits) \ + { \ + BIGNUM *bn, *result; \ + int b; \ + VALUE obj; \ + b = NUM2INT(bits); \ + GetBN(self, bn); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, bn, b)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(CLASS_OF(self), obj, result); \ + return obj; \ + } +BIGNUM_SHIFT(lshift); +BIGNUM_SHIFT(rshift); + +#define BIGNUM_SELF_SHIFT(func) \ + /* \ + * call-seq: \ + * bn.##func!(bits) -> self \ + * \ + */ \ + static VALUE \ + ossl_bn_self_##func(VALUE self, VALUE bits) \ + { \ + BIGNUM *bn; \ + int b; \ + b = NUM2INT(bits); \ + GetBN(self, bn); \ + if (!BN_##func(bn, bn, b)) \ + ossl_raise(eBNError, NULL); \ + return self; \ + } +BIGNUM_SELF_SHIFT(lshift); +BIGNUM_SELF_SHIFT(rshift); + +#define BIGNUM_RAND(func) \ + /* \ + * call-seq: \ + * BN.##func(bits [, fill [, odd]]) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_s_##func(int argc, VALUE *argv, VALUE klass) \ + { \ + BIGNUM *result; \ + int bottom = 0, top = 0, b; \ + VALUE bits, fill, odd, obj; \ + \ + switch (rb_scan_args(argc, argv, "12", &bits, &fill, &odd)) { \ + case 3: \ + bottom = (odd == Qtrue) ? 1 : 0; \ + /* FALLTHROUGH */ \ + case 2: \ + top = NUM2INT(fill); \ + } \ + b = NUM2INT(bits); \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func(result, b, top, bottom)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(klass, obj, result); \ + return obj; \ + } +BIGNUM_RAND(rand); +BIGNUM_RAND(pseudo_rand); + +#define BIGNUM_RAND_RANGE(func) \ + /* \ + * call-seq: \ + * BN.##func(range) -> aBN \ + * \ + */ \ + static VALUE \ + ossl_bn_s_##func##_range(VALUE klass, VALUE range) \ + { \ + BIGNUM *bn = GetBNPtr(range), *result; \ + VALUE obj; \ + if (!(result = BN_new())) { \ + ossl_raise(eBNError, NULL); \ + } \ + if (!BN_##func##_range(result, bn)) { \ + BN_free(result); \ + ossl_raise(eBNError, NULL); \ + } \ + WrapBN(klass, obj, result); \ + return obj; \ + } +BIGNUM_RAND_RANGE(rand); +BIGNUM_RAND_RANGE(pseudo_rand); + +/* + * call-seq: + * BN.generate_prime(bits, [, safe [, add [, rem]]]) => bn + * + * === Parameters + * * +bits+ - integer + * * +safe+ - boolean + * * +add+ - BN + * * +rem+ - BN + */ +static VALUE +ossl_bn_s_generate_prime(int argc, VALUE *argv, VALUE klass) +{ + BIGNUM *add = NULL, *rem = NULL, *result; + int safe = 1, num; + VALUE vnum, vsafe, vadd, vrem, obj; + + rb_scan_args(argc, argv, "13", &vnum, &vsafe, &vadd, &vrem); + + num = NUM2INT(vnum); + + if (vsafe == Qfalse) { + safe = 0; + } + if (!NIL_P(vadd)) { + add = GetBNPtr(vadd); + rem = NIL_P(vrem) ? NULL : GetBNPtr(vrem); + } + if (!(result = BN_new())) { + ossl_raise(eBNError, NULL); + } + if (!BN_generate_prime(result, num, safe, add, rem, NULL, NULL)) { + BN_free(result); + ossl_raise(eBNError, NULL); + } + WrapBN(klass, obj, result); + + return obj; +} + +#define BIGNUM_NUM(func) \ + /* \ + * call-seq: \ + * bn.##func -> integer \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self) \ + { \ + BIGNUM *bn; \ + GetBN(self, bn); \ + return INT2FIX(BN_##func(bn)); \ + } +BIGNUM_NUM(num_bytes); +BIGNUM_NUM(num_bits); + +static VALUE +ossl_bn_copy(VALUE self, VALUE other) +{ + BIGNUM *bn1, *bn2; + + rb_check_frozen(self); + + if (self == other) return self; + + GetBN(self, bn1); + bn2 = GetBNPtr(other); + + if (!BN_copy(bn1, bn2)) { + ossl_raise(eBNError, NULL); + } + return self; +} + +#define BIGNUM_CMP(func) \ + /* \ + * call-seq: \ + * bn.##func(bn2) -> integer \ + * \ + */ \ + static VALUE \ + ossl_bn_##func(VALUE self, VALUE other) \ + { \ + BIGNUM *bn1, *bn2 = GetBNPtr(other); \ + GetBN(self, bn1); \ + return INT2FIX(BN_##func(bn1, bn2)); \ + } +BIGNUM_CMP(cmp); +BIGNUM_CMP(ucmp); + +static VALUE +ossl_bn_eql(VALUE self, VALUE other) +{ + if (ossl_bn_cmp(self, other) == INT2FIX(0)) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * bn.prime? => true | false + * bn.prime?(checks) => true | false + * + * === Parameters + * * +checks+ - integer + */ +static VALUE +ossl_bn_is_prime(int argc, VALUE *argv, VALUE self) +{ + BIGNUM *bn; + VALUE vchecks; + int checks = BN_prime_checks; + + if (rb_scan_args(argc, argv, "01", &vchecks) == 0) { + checks = NUM2INT(vchecks); + } + GetBN(self, bn); + switch (BN_is_prime(bn, checks, NULL, ossl_bn_ctx, NULL)) { + case 1: + return Qtrue; + case 0: + return Qfalse; + default: + ossl_raise(eBNError, NULL); + } + /* not reachable */ + return Qnil; +} + +/* + * call-seq: + * bn.prime_fasttest? => true | false + * bn.prime_fasttest?(checks) => true | false + * bn.prime_fasttest?(checks, trial_div) => true | false + * + * === Parameters + * * +checks+ - integer + * * +trial_div+ - boolean + */ +static VALUE +ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self) +{ + BIGNUM *bn; + VALUE vchecks, vtrivdiv; + int checks = BN_prime_checks, do_trial_division = 1; + + rb_scan_args(argc, argv, "02", &vchecks, &vtrivdiv); + + if (!NIL_P(vchecks)) { + checks = NUM2INT(vchecks); + } + GetBN(self, bn); + /* handle true/false */ + if (vtrivdiv == Qfalse) { + do_trial_division = 0; + } + switch (BN_is_prime_fasttest(bn, checks, NULL, ossl_bn_ctx, NULL, do_trial_division)) { + case 1: + return Qtrue; + case 0: + return Qfalse; + default: + ossl_raise(eBNError, NULL); + } + /* not reachable */ + return Qnil; +} + +/* + * INIT + * (NOTE: ordering of methods is the same as in 'man bn') + */ +void +Init_ossl_bn() +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + if (!(ossl_bn_ctx = BN_CTX_new())) { + ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX"); + } + + eBNError = rb_define_class_under(mOSSL, "BNError", eOSSLError); + + cBN = rb_define_class_under(mOSSL, "BN", rb_cObject); + + rb_define_alloc_func(cBN, ossl_bn_alloc); + rb_define_method(cBN, "initialize", ossl_bn_initialize, -1); + + rb_define_copy_func(cBN, ossl_bn_copy); + rb_define_method(cBN, "copy", ossl_bn_copy, 1); + + /* swap (=coerce?) */ + + rb_define_method(cBN, "num_bytes", ossl_bn_num_bytes, 0); + rb_define_method(cBN, "num_bits", ossl_bn_num_bits, 0); + /* num_bits_word */ + + rb_define_method(cBN, "+", ossl_bn_add, 1); + rb_define_method(cBN, "-", ossl_bn_sub, 1); + rb_define_method(cBN, "*", ossl_bn_mul, 1); + rb_define_method(cBN, "sqr", ossl_bn_sqr, 0); + rb_define_method(cBN, "/", ossl_bn_div, 1); + rb_define_method(cBN, "%", ossl_bn_mod, 1); + /* nnmod */ + + rb_define_method(cBN, "mod_add", ossl_bn_mod_add, 2); + rb_define_method(cBN, "mod_sub", ossl_bn_mod_sub, 2); + rb_define_method(cBN, "mod_mul", ossl_bn_mod_mul, 2); + rb_define_method(cBN, "mod_sqr", ossl_bn_mod_sqr, 1); + rb_define_method(cBN, "**", ossl_bn_exp, 1); + rb_define_method(cBN, "mod_exp", ossl_bn_mod_exp, 2); + rb_define_method(cBN, "gcd", ossl_bn_gcd, 1); + + /* add_word + * sub_word + * mul_word + * div_word + * mod_word */ + + rb_define_method(cBN, "cmp", ossl_bn_cmp, 1); + rb_define_alias(cBN, "<=>", "cmp"); + rb_define_method(cBN, "ucmp", ossl_bn_ucmp, 1); + rb_define_method(cBN, "eql?", ossl_bn_eql, 1); + rb_define_alias(cBN, "==", "eql?"); + rb_define_alias(cBN, "===", "eql?"); + rb_define_method(cBN, "zero?", ossl_bn_is_zero, 0); + rb_define_method(cBN, "one?", ossl_bn_is_one, 0); + /* is_word */ + rb_define_method(cBN, "odd?", ossl_bn_is_odd, 0); + + /* zero + * one + * value_one - DON'T IMPL. + * set_word + * get_word */ + + rb_define_singleton_method(cBN, "rand", ossl_bn_s_rand, -1); + rb_define_singleton_method(cBN, "pseudo_rand", ossl_bn_s_pseudo_rand, -1); + rb_define_singleton_method(cBN, "rand_range", ossl_bn_s_rand_range, 1); + rb_define_singleton_method(cBN, "pseudo_rand_range", ossl_bn_s_pseudo_rand_range, 1); + + rb_define_singleton_method(cBN, "generate_prime", ossl_bn_s_generate_prime, -1); + rb_define_method(cBN, "prime?", ossl_bn_is_prime, -1); + + rb_define_method(cBN, "set_bit!", ossl_bn_set_bit, 1); + rb_define_method(cBN, "clear_bit!", ossl_bn_clear_bit, 1); + rb_define_method(cBN, "bit_set?", ossl_bn_is_bit_set, 1); + rb_define_method(cBN, "mask_bits!", ossl_bn_mask_bits, 1); + rb_define_method(cBN, "<<", ossl_bn_lshift, 1); + rb_define_method(cBN, ">>", ossl_bn_rshift, 1); + rb_define_method(cBN, "lshift!", ossl_bn_self_lshift, 1); + rb_define_method(cBN, "rshift!", ossl_bn_self_rshift, 1); + /* lshift1 - DON'T IMPL. */ + /* rshift1 - DON'T IMPL. */ + + /* + * bn2bin + * bin2bn + * bn2hex + * bn2dec + * hex2bn + * dec2bn - all these are implemented in ossl_bn_initialize, and ossl_bn_to_s + * print - NOT IMPL. + * print_fp - NOT IMPL. + * bn2mpi + * mpi2bn + */ + rb_define_method(cBN, "to_s", ossl_bn_to_s, -1); + rb_define_method(cBN, "to_i", ossl_bn_to_i, 0); + rb_define_alias(cBN, "to_int", "to_i"); + rb_define_method(cBN, "to_bn", ossl_bn_to_bn, 0); + rb_define_method(cBN, "coerce", ossl_bn_coerce, 1); + + /* + * TODO: + * But how to: from_bin, from_mpi? PACK? + * to_bin + * to_mpi + */ + + rb_define_method(cBN, "mod_inverse", ossl_bn_mod_inverse, 1); + + /* RECiProcal + * MONTgomery */ + + /* + * TODO: + * Where to belong these? + */ + rb_define_method(cBN, "prime_fasttest?", ossl_bn_is_prime_fasttest, -1); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.h new file mode 100644 index 0000000..7bed7cb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_bn.h @@ -0,0 +1,25 @@ +/* + * $Id: ossl_bn.h 12139 2007-04-03 07:02:44Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_BN_H_) +#define _OSSL_BN_H_ + +extern VALUE cBN; +extern VALUE eBNError; + +extern BN_CTX *ossl_bn_ctx; + +VALUE ossl_bn_new(const BIGNUM *); +BIGNUM *GetBNPtr(VALUE); +void Init_ossl_bn(void); + + +#endif /* _OSS_BN_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.c new file mode 100644 index 0000000..ab5d90d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.c @@ -0,0 +1,544 @@ +/* + * $Id: ossl_cipher.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define MakeCipher(obj, klass, ctx) \ + obj = Data_Make_Struct(klass, EVP_CIPHER_CTX, 0, ossl_cipher_free, ctx) +#define GetCipher(obj, ctx) do { \ + Data_Get_Struct(obj, EVP_CIPHER_CTX, ctx); \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "Cipher not inititalized!"); \ + } \ +} while (0) +#define SafeGetCipher(obj, ctx) do { \ + OSSL_Check_Kind(obj, cCipher); \ + GetCipher(obj, ctx); \ +} while (0) + +/* + * Classes + */ +VALUE cCipher; +VALUE eCipherError; + +static VALUE ossl_cipher_alloc(VALUE klass); + +/* + * PUBLIC + */ +const EVP_CIPHER * +GetCipherPtr(VALUE obj) +{ + EVP_CIPHER_CTX *ctx; + + SafeGetCipher(obj, ctx); + + return EVP_CIPHER_CTX_cipher(ctx); +} + +VALUE +ossl_cipher_new(const EVP_CIPHER *cipher) +{ + VALUE ret; + EVP_CIPHER_CTX *ctx; + + ret = ossl_cipher_alloc(cCipher); + GetCipher(ret, ctx); + EVP_CIPHER_CTX_init(ctx); + if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1) + ossl_raise(eCipherError, NULL); + + return ret; +} + +/* + * PRIVATE + */ +static void +ossl_cipher_free(EVP_CIPHER_CTX *ctx) +{ + if (ctx) { + EVP_CIPHER_CTX_cleanup(ctx); + ruby_xfree(ctx); + } +} + +static VALUE +ossl_cipher_alloc(VALUE klass) +{ + EVP_CIPHER_CTX *ctx; + VALUE obj; + + MakeCipher(obj, klass, ctx); + EVP_CIPHER_CTX_init(ctx); + + return obj; +} + +/* + * call-seq: + * Cipher.new(string) -> cipher + * + * The string must contain a valid cipher name like "AES-128-CBC" or "3DES". + * + * A list of cipher names is available by calling OpenSSL::Cipher.ciphers. + */ +static VALUE +ossl_cipher_initialize(VALUE self, VALUE str) +{ + EVP_CIPHER_CTX *ctx; + const EVP_CIPHER *cipher; + char *name; + + name = StringValuePtr(str); + GetCipher(self, ctx); + if (!(cipher = EVP_get_cipherbyname(name))) { + ossl_raise(rb_eRuntimeError, "unsupported cipher algorithm (%s)", name); + } + if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1) + ossl_raise(eCipherError, NULL); + + return self; +} +static VALUE +ossl_cipher_copy(VALUE self, VALUE other) +{ + EVP_CIPHER_CTX *ctx1, *ctx2; + + rb_check_frozen(self); + if (self == other) return self; + + GetCipher(self, ctx1); + SafeGetCipher(other, ctx2); + if (EVP_CIPHER_CTX_copy(ctx1, ctx2) != 1) + ossl_raise(eCipherError, NULL); + + return self; +} + +static void* +add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary) +{ + rb_ary_push(ary, rb_str_new2(name->name)); + return NULL; +} + +/* + * call-seq: + * Cipher.ciphers -> array[string...] + * + * Returns the names of all available ciphers in an array. + */ +static VALUE +ossl_s_ciphers(VALUE self) +{ +#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED + VALUE ary; + + ary = rb_ary_new(); + OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, + (void(*)(const OBJ_NAME*,void*))add_cipher_name_to_ary, + (void*)ary); + + return ary; +#else + rb_notimplement(); +#endif +} + +/* + * call-seq: + * cipher.reset -> self + * + * Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1). + */ +static VALUE +ossl_cipher_reset(VALUE self) +{ + EVP_CIPHER_CTX *ctx; + + GetCipher(self, ctx); + if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1) != 1) + ossl_raise(eCipherError, NULL); + + return self; +} + +static VALUE +ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode) +{ + EVP_CIPHER_CTX *ctx; + unsigned char key[EVP_MAX_KEY_LENGTH], *p_key = NULL; + unsigned char iv[EVP_MAX_IV_LENGTH], *p_iv = NULL; + VALUE pass, init_v; + + if(rb_scan_args(argc, argv, "02", &pass, &init_v) > 0){ + /* + * oops. this code mistakes salt for IV. + * We deprecated the arguments for this method, but we decided + * keeping this behaviour for backward compatibility. + */ + const char *cname = rb_class2name(rb_obj_class(self)); + rb_warn("argumtents for %s#encrypt and %s#decrypt were deprecated; " + "use %s#pkcs5_keyivgen to derive key and IV", + cname, cname, cname); + StringValue(pass); + GetCipher(self, ctx); + if (NIL_P(init_v)) memcpy(iv, "OpenSSL for Ruby rulez!", sizeof(iv)); + else{ + StringValue(init_v); + if (EVP_MAX_IV_LENGTH > RSTRING_LEN(init_v)) { + memset(iv, 0, EVP_MAX_IV_LENGTH); + memcpy(iv, RSTRING_PTR(init_v), RSTRING_LEN(init_v)); + } + else memcpy(iv, RSTRING_PTR(init_v), sizeof(iv)); + } + EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv, + (unsigned char *)RSTRING_PTR(pass), RSTRING_LEN(pass), 1, key, NULL); + p_key = key; + p_iv = iv; + } + else { + GetCipher(self, ctx); + } + if (EVP_CipherInit_ex(ctx, NULL, NULL, p_key, p_iv, mode) != 1) { + ossl_raise(eCipherError, NULL); + } + + return self; +} + +/* + * call-seq: + * cipher.encrypt -> self + * + * Make sure to call .encrypt or .decrypt before using any of the following methods: + * * [key=, iv=, random_key, random_iv, pkcs5_keyivgen] + * + * Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 1). + */ +static VALUE +ossl_cipher_encrypt(int argc, VALUE *argv, VALUE self) +{ + return ossl_cipher_init(argc, argv, self, 1); +} + +/* + * call-seq: + * cipher.decrypt -> self + * + * Make sure to call .encrypt or .decrypt before using any of the following methods: + * * [key=, iv=, random_key, random_iv, pkcs5_keyivgen] + * + * Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 0). + */ +static VALUE +ossl_cipher_decrypt(int argc, VALUE *argv, VALUE self) +{ + return ossl_cipher_init(argc, argv, self, 0); +} + +/* + * call-seq: + * cipher.pkcs5_keyivgen(pass [, salt [, iterations [, digest]]] ) -> nil + * + * Generates and sets the key/iv based on a password. + * + * WARNING: This method is only PKCS5 v1.5 compliant when using RC2, RC4-40, or DES + * with MD5 or SHA1. Using anything else (like AES) will generate the key/iv using an + * OpenSSL specific method. Use a PKCS5 v2 key generation method instead. + * + * === Parameters + * +salt+ must be an 8 byte string if provided. + * +iterations+ is a integer with a default of 2048. + * +digest+ is a Digest object that defaults to 'MD5' + * + * A minimum of 1000 iterations is recommended. + * + */ +static VALUE +ossl_cipher_pkcs5_keyivgen(int argc, VALUE *argv, VALUE self) +{ + EVP_CIPHER_CTX *ctx; + const EVP_MD *digest; + VALUE vpass, vsalt, viter, vdigest; + unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH], *salt = NULL; + int iter; + + rb_scan_args(argc, argv, "13", &vpass, &vsalt, &viter, &vdigest); + StringValue(vpass); + if(!NIL_P(vsalt)){ + StringValue(vsalt); + if(RSTRING_LEN(vsalt) != PKCS5_SALT_LEN) + rb_raise(eCipherError, "salt must be an 8-octet string"); + salt = (unsigned char *)RSTRING_PTR(vsalt); + } + iter = NIL_P(viter) ? 2048 : NUM2INT(viter); + digest = NIL_P(vdigest) ? EVP_md5() : GetDigestPtr(vdigest); + GetCipher(self, ctx); + EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), digest, salt, + (unsigned char *)RSTRING_PTR(vpass), RSTRING_LEN(vpass), iter, key, iv); + if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, -1) != 1) + ossl_raise(eCipherError, NULL); + OPENSSL_cleanse(key, sizeof key); + OPENSSL_cleanse(iv, sizeof iv); + + return Qnil; +} + + +/* + * call-seq: + * cipher.update(data [, buffer]) -> string or buffer + * + * === Parameters + * +data+ is a nonempty string. + * +buffer+ is an optional string to store the result. + */ +static VALUE +ossl_cipher_update(int argc, VALUE *argv, VALUE self) +{ + EVP_CIPHER_CTX *ctx; + unsigned char *in; + int in_len, out_len; + VALUE data, str; + + rb_scan_args(argc, argv, "11", &data, &str); + + StringValue(data); + in = (unsigned char *)RSTRING_PTR(data); + if ((in_len = RSTRING_LEN(data)) == 0) + rb_raise(rb_eArgError, "data must not be empty"); + GetCipher(self, ctx); + out_len = in_len+EVP_CIPHER_CTX_block_size(ctx); + + if (NIL_P(str)) { + str = rb_str_new(0, out_len); + } else { + StringValue(str); + rb_str_resize(str, out_len); + } + + if (!EVP_CipherUpdate(ctx, (unsigned char *)RSTRING_PTR(str), &out_len, in, in_len)) + ossl_raise(eCipherError, NULL); + assert(out_len < RSTRING_LEN(str)); + rb_str_set_len(str, out_len); + + return str; +} + +/* + * call-seq: + * cipher.final -> aString + * + * Returns the remaining data held in the cipher object. Further calls to update() or final() will return garbage. + * + * See EVP_CipherFinal_ex for further information. + */ +static VALUE +ossl_cipher_final(VALUE self) +{ + EVP_CIPHER_CTX *ctx; + int out_len; + VALUE str; + + GetCipher(self, ctx); + str = rb_str_new(0, EVP_CIPHER_CTX_block_size(ctx)); + if (!EVP_CipherFinal_ex(ctx, (unsigned char *)RSTRING_PTR(str), &out_len)) + ossl_raise(eCipherError, NULL); + assert(out_len <= RSTRING_LEN(str)); + rb_str_set_len(str, out_len); + + return str; +} + +/* + * call-seq: + * cipher.name -> string + * + * Returns the name of the cipher which may differ slightly from the original name provided. + */ +static VALUE +ossl_cipher_name(VALUE self) +{ + EVP_CIPHER_CTX *ctx; + + GetCipher(self, ctx); + + return rb_str_new2(EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(ctx))); +} + +/* + * call-seq: + * cipher.key = string -> string + * + * Sets the cipher key. + * + * Only call this method after calling cipher.encrypt or cipher.decrypt. + */ +static VALUE +ossl_cipher_set_key(VALUE self, VALUE key) +{ + EVP_CIPHER_CTX *ctx; + + StringValue(key); + GetCipher(self, ctx); + + if (RSTRING_LEN(key) < EVP_CIPHER_CTX_key_length(ctx)) + ossl_raise(eCipherError, "key length too short"); + + if (EVP_CipherInit_ex(ctx, NULL, NULL, (unsigned char *)RSTRING_PTR(key), NULL, -1) != 1) + ossl_raise(eCipherError, NULL); + + return key; +} + +/* + * call-seq: + * cipher.iv = string -> string + * + * Sets the cipher iv. + * + * Only call this method after calling cipher.encrypt or cipher.decrypt. + */ +static VALUE +ossl_cipher_set_iv(VALUE self, VALUE iv) +{ + EVP_CIPHER_CTX *ctx; + + StringValue(iv); + GetCipher(self, ctx); + + if (RSTRING_LEN(iv) < EVP_CIPHER_CTX_iv_length(ctx)) + ossl_raise(eCipherError, "iv length too short"); + + if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, (unsigned char *)RSTRING_PTR(iv), -1) != 1) + ossl_raise(eCipherError, NULL); + + return iv; +} + + +/* + * call-seq: + * cipher.key_length = integer -> integer + * + * Sets the key length of the cipher. If the cipher is a fixed length cipher then attempting to set the key + * length to any value other than the fixed value is an error. + * + * Under normal circumstances you do not need to call this method (and probably shouldn't). + * + * See EVP_CIPHER_CTX_set_key_length for further information. + */ +static VALUE +ossl_cipher_set_key_length(VALUE self, VALUE key_length) +{ + int len = NUM2INT(key_length); + EVP_CIPHER_CTX *ctx; + + GetCipher(self, ctx); + if (EVP_CIPHER_CTX_set_key_length(ctx, len) != 1) + ossl_raise(eCipherError, NULL); + + return key_length; +} + +/* + * call-seq: + * cipher.padding = integer -> integer + * + * Enables or disables padding. By default encryption operations are padded using standard block padding and the + * padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the + * total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur. + * + * See EVP_CIPHER_CTX_set_padding for further information. + */ +static VALUE +ossl_cipher_set_padding(VALUE self, VALUE padding) +{ +#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING) + EVP_CIPHER_CTX *ctx; + int pad = NUM2INT(padding); + + GetCipher(self, ctx); + if (EVP_CIPHER_CTX_set_padding(ctx, pad) != 1) + ossl_raise(eCipherError, NULL); +#else + rb_notimplement(); +#endif + return padding; +} + +#define CIPHER_0ARG_INT(func) \ + static VALUE \ + ossl_cipher_##func(VALUE self) \ + { \ + EVP_CIPHER_CTX *ctx; \ + GetCipher(self, ctx); \ + return INT2NUM(EVP_CIPHER_##func(EVP_CIPHER_CTX_cipher(ctx))); \ + } +CIPHER_0ARG_INT(key_length) +CIPHER_0ARG_INT(iv_length) +CIPHER_0ARG_INT(block_size) + +#if 0 +/* + * call-seq: + * cipher.key_length -> integer + * + */ +static VALUE ossl_cipher_key_length() { } +/* + * call-seq: + * cipher.iv_length -> integer + * + */ +static VALUE ossl_cipher_iv_length() { } +/* + * call-seq: + * cipher.block_size -> integer + * + */ +static VALUE ossl_cipher_block_size() { } +#endif + +/* + * INIT + */ +void +Init_ossl_cipher(void) +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + cCipher = rb_define_class_under(mOSSL, "Cipher", rb_cObject); + eCipherError = rb_define_class_under(cCipher, "CipherError", eOSSLError); + + rb_define_alloc_func(cCipher, ossl_cipher_alloc); + rb_define_copy_func(cCipher, ossl_cipher_copy); + rb_define_module_function(cCipher, "ciphers", ossl_s_ciphers, 0); + rb_define_method(cCipher, "initialize", ossl_cipher_initialize, 1); + rb_define_method(cCipher, "reset", ossl_cipher_reset, 0); + rb_define_method(cCipher, "encrypt", ossl_cipher_encrypt, -1); + rb_define_method(cCipher, "decrypt", ossl_cipher_decrypt, -1); + rb_define_method(cCipher, "pkcs5_keyivgen", ossl_cipher_pkcs5_keyivgen, -1); + rb_define_method(cCipher, "update", ossl_cipher_update, -1); + rb_define_method(cCipher, "final", ossl_cipher_final, 0); + rb_define_method(cCipher, "name", ossl_cipher_name, 0); + rb_define_method(cCipher, "key=", ossl_cipher_set_key, 1); + rb_define_method(cCipher, "key_len=", ossl_cipher_set_key_length, 1); + rb_define_method(cCipher, "key_len", ossl_cipher_key_length, 0); + rb_define_method(cCipher, "iv=", ossl_cipher_set_iv, 1); + rb_define_method(cCipher, "iv_len", ossl_cipher_iv_length, 0); + rb_define_method(cCipher, "block_size", ossl_cipher_block_size, 0); + rb_define_method(cCipher, "padding=", ossl_cipher_set_padding, 1); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.h new file mode 100644 index 0000000..eebb577 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_cipher.h @@ -0,0 +1,22 @@ +/* + * $Id: ossl_cipher.h 12148 2007-04-05 05:59:22Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_CIPHER_H_) +#define _OSSL_CIPHER_H_ + +extern VALUE cCipher; +extern VALUE eCipherError; + +const EVP_CIPHER *GetCipherPtr(VALUE); +VALUE ossl_cipher_new(const EVP_CIPHER *); +void Init_ossl_cipher(void); + +#endif /* _OSSL_CIPHER_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.c new file mode 100644 index 0000000..bc5067f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.c @@ -0,0 +1,467 @@ +/* + * $Id: ossl_config.c 18971 2008-08-31 03:36:09Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapConfig(klass, obj, conf) do { \ + if (!conf) { \ + ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, NCONF_free, conf); \ +} while (0) +#define GetConfig(obj, conf) do { \ + Data_Get_Struct(obj, CONF, conf); \ + if (!conf) { \ + ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \ + } \ +} while (0) +#define SafeGetConfig(obj, conf) do { \ + OSSL_Check_Kind(obj, cConfig); \ + GetConfig(obj, conf); \ +} while(0); + +/* + * Classes + */ +VALUE cConfig; +VALUE eConfigError; + +/* + * Public + */ + +static CONF *parse_config(VALUE, CONF*); + +CONF * +GetConfigPtr(VALUE obj) +{ + CONF *conf; + + SafeGetConfig(obj, conf); + + return conf; +} + +CONF * +DupConfigPtr(VALUE obj) +{ + VALUE str; + + OSSL_Check_Kind(obj, cConfig); + str = rb_funcall(obj, rb_intern("to_s"), 0); + + return parse_config(str, NULL); +} + +/* + * Private + */ +static CONF * +parse_config(VALUE str, CONF *dst) +{ + CONF *conf; + BIO *bio; + long eline = -1; + + bio = ossl_obj2bio(str); + conf = dst ? dst : NCONF_new(NULL); + if(!conf){ + BIO_free(bio); + ossl_raise(eConfigError, NULL); + } + if(!NCONF_load_bio(conf, bio, &eline)){ + BIO_free(bio); + if(!dst) NCONF_free(conf); + if (eline <= 0) ossl_raise(eConfigError, "wrong config format"); + else ossl_raise(eConfigError, "error in line %d", eline); + ossl_raise(eConfigError, NULL); + } + BIO_free(bio); + + return conf; +} + +static VALUE +ossl_config_s_parse(VALUE klass, VALUE str) +{ + CONF *conf; + VALUE obj; + + conf = parse_config(str, NULL); + WrapConfig(klass, obj, conf); + + return obj; +} + +static VALUE +ossl_config_s_alloc(VALUE klass) +{ + CONF *conf; + VALUE obj; + + if(!(conf = NCONF_new(NULL))) + ossl_raise(eConfigError, NULL); + WrapConfig(klass, obj, conf); + + return obj; +} + +static VALUE +ossl_config_copy(VALUE self, VALUE other) +{ + VALUE str; + CONF *conf; + + str = rb_funcall(self, rb_intern("to_s"), 0); + GetConfig(other, conf); + parse_config(str, conf); + + return self; +} + +static VALUE +ossl_config_initialize(int argc, VALUE *argv, VALUE self) +{ + CONF *conf; + long eline = -1; + char *filename; + VALUE path; + + rb_scan_args(argc, argv, "01", &path); + if(!NIL_P(path)){ + SafeStringValue(path); + filename = StringValuePtr(path); + GetConfig(self, conf); + if (!NCONF_load(conf, filename, &eline)){ + if (eline <= 0) + ossl_raise(eConfigError, "wrong config file %s", filename); + else + ossl_raise(eConfigError, "error in %s:%d", filename, eline); + } + } +#ifdef OSSL_NO_CONF_API + else rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)"); +#else + else { + GetConfig(self, conf); + _CONF_new_data(conf); + } +#endif + + return self; +} + +static VALUE +ossl_config_add_value(VALUE self, VALUE section, VALUE name, VALUE value) +{ +#ifdef OSSL_NO_CONF_API + rb_notimplement(); +#else + CONF *conf; + CONF_VALUE *sv, *cv; + + StringValue(section); + StringValue(name); + StringValue(value); + GetConfig(self, conf); + if(!(sv = _CONF_get_section(conf, RSTRING_PTR(section)))){ + if(!(sv = _CONF_new_section(conf, RSTRING_PTR(section)))){ + ossl_raise(eConfigError, NULL); + } + } + if(!(cv = OPENSSL_malloc(sizeof(CONF_VALUE)))){ + ossl_raise(eConfigError, NULL); + } + cv->name = BUF_strdup(RSTRING_PTR(name)); + cv->value = BUF_strdup(RSTRING_PTR(value)); + if(!cv->name || !cv->value || !_CONF_add_string(conf, sv, cv)){ + OPENSSL_free(cv->name); + OPENSSL_free(cv->value); + OPENSSL_free(cv); + ossl_raise(eConfigError, "_CONF_add_string failure"); + } + + return value; +#endif +} + +static VALUE +ossl_config_get_value(VALUE self, VALUE section, VALUE name) +{ + CONF *conf; + char *str; + + StringValue(section); + StringValue(name); + GetConfig(self, conf); + str = NCONF_get_string(conf, RSTRING_PTR(section), RSTRING_PTR(name)); + if(!str){ + ERR_clear_error(); + return Qnil; + } + + return rb_str_new2(str); +} + +static VALUE +ossl_config_get_value_old(int argc, VALUE *argv, VALUE self) +{ + VALUE section, name; + + rb_scan_args(argc, argv, "11", §ion, &name); + + /* support conf.value(nil, "HOME") -> conf.get_value("", "HOME") */ + if (NIL_P(section)) section = rb_str_new2(""); + /* support conf.value("HOME") -> conf.get_value("", "HOME") */ + if (NIL_P(name)) { + name = section; + section = rb_str_new2(""); + } + /* NOTE: Don't care about conf.get_value(nil, nil) */ + rb_warn("Config#value is deprecated; use Config#get_value"); + return ossl_config_get_value(self, section, name); +} + +static VALUE +set_conf_section_i(VALUE i, VALUE *arg) +{ + VALUE name, value; + + Check_Type(i, T_ARRAY); + name = rb_ary_entry(i, 0); + value = rb_ary_entry(i, 1); + ossl_config_add_value(arg[0], arg[1], name, value); + + return Qnil; +} + +static VALUE +ossl_config_set_section(VALUE self, VALUE section, VALUE hash) +{ + VALUE arg[2]; + + arg[0] = self; + arg[1] = section; + rb_block_call(hash, rb_intern("each"), 0, 0, set_conf_section_i, (VALUE)arg); + return hash; +} + +/* + * Get all numbers as strings - use str.to_i to convert + * long number = CONF_get_number(confp->config, sect, StringValuePtr(item)); + */ +static VALUE +ossl_config_get_section(VALUE self, VALUE section) +{ + CONF *conf; + STACK_OF(CONF_VALUE) *sk; + CONF_VALUE *entry; + int i, entries; + VALUE hash; + + hash = rb_hash_new(); + StringValue(section); + GetConfig(self, conf); + if (!(sk = NCONF_get_section(conf, StringValuePtr(section)))) { + ERR_clear_error(); + return hash; + } + if ((entries = sk_CONF_VALUE_num(sk)) < 0) { + OSSL_Debug("# of items in section is < 0?!?"); + return hash; + } + for (i=0; iname), rb_str_new2(entry->value)); + } + + return hash; +} + +static VALUE +ossl_config_get_section_old(VALUE self, VALUE section) +{ + rb_warn("Config#section is deprecated; use Config#[]"); + return ossl_config_get_section(self, section); +} + +#ifdef IMPLEMENT_LHASH_DOALL_ARG_FN +static void +get_conf_section(CONF_VALUE *cv, VALUE ary) +{ + if(cv->name) return; + rb_ary_push(ary, rb_str_new2(cv->section)); +} + +static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE); + +static VALUE +ossl_config_get_sections(VALUE self) +{ + CONF *conf; + VALUE ary; + + GetConfig(self, conf); + ary = rb_ary_new(); + lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(get_conf_section), (void*)ary); + + return ary; +} + +static void +dump_conf_value(CONF_VALUE *cv, VALUE str) +{ + STACK_OF(CONF_VALUE) *sk; + CONF_VALUE *v; + int i, num; + + if (cv->name) return; + sk = (STACK_OF(CONF_VALUE)*)cv->value; + num = sk_CONF_VALUE_num(sk); + rb_str_cat2(str, "[ "); + rb_str_cat2(str, cv->section); + rb_str_cat2(str, " ]\n"); + for(i = 0; i < num; i++){ + v = sk_CONF_VALUE_value(sk, i); + rb_str_cat2(str, v->name ? v->name : "None"); + rb_str_cat2(str, "="); + rb_str_cat2(str, v->value ? v->value : "None"); + rb_str_cat2(str, "\n"); + } + rb_str_cat2(str, "\n"); +} + +static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE); + +static VALUE +dump_conf(CONF *conf) +{ + VALUE str; + + str = rb_str_new(0, 0); + lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(dump_conf_value), (void*)str); + + return str; +} + +static VALUE +ossl_config_to_s(VALUE self) +{ + CONF *conf; + + GetConfig(self, conf); + + return dump_conf(conf); +} + +static void +each_conf_value(CONF_VALUE *cv, void* dummy) +{ + STACK_OF(CONF_VALUE) *sk; + CONF_VALUE *v; + VALUE section, name, value, args; + int i, num; + + if (cv->name) return; + sk = (STACK_OF(CONF_VALUE)*)cv->value; + num = sk_CONF_VALUE_num(sk); + section = rb_str_new2(cv->section); + for(i = 0; i < num; i++){ + v = sk_CONF_VALUE_value(sk, i); + name = v->name ? rb_str_new2(v->name) : Qnil; + value = v->value ? rb_str_new2(v->value) : Qnil; + args = rb_ary_new3(3, section, name, value); + rb_yield(args); + } +} + +static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*); + +static VALUE +ossl_config_each(VALUE self) +{ + CONF *conf; + + RETURN_ENUMERATOR(self, 0, 0); + + GetConfig(self, conf); + lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(each_conf_value), (void*)NULL); + + return self; +} +#else +static VALUE +ossl_config_get_sections(VALUE self) +{ + rb_warn("#sections don't work with %s", OPENSSL_VERSION_TEXT); + return rb_ary_new(); +} + +static VALUE +ossl_config_to_s(VALUE self) +{ + rb_warn("#to_s don't work with %s", OPENSSL_VERSION_TEXT); + return rb_str_new(0, 0); +} + +static VALUE +ossl_config_each(VALUE self) +{ + rb_warn("#each don't work with %s", OPENSSL_VERSION_TEXT); + return self; +} +#endif + +static VALUE +ossl_config_inspect(VALUE self) +{ + VALUE str, ary = ossl_config_get_sections(self); + const char *cname = rb_class2name(rb_obj_class(self)); + + str = rb_str_new2("#<"); + rb_str_cat2(str, cname); + rb_str_cat2(str, " sections="); + rb_str_append(str, rb_inspect(ary)); + rb_str_cat2(str, ">"); + + return str; +} + +/* + * INIT + */ +void +Init_ossl_config() +{ + char *default_config_file; + eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError); + cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject); + + default_config_file = CONF_get1_default_config_file(); + rb_define_const(cConfig, "DEFAULT_CONFIG_FILE", + rb_str_new2(default_config_file)); + OPENSSL_free(default_config_file); + rb_include_module(cConfig, rb_mEnumerable); + rb_define_singleton_method(cConfig, "parse", ossl_config_s_parse, 1); + rb_define_alias(CLASS_OF(cConfig), "load", "new"); + rb_define_alloc_func(cConfig, ossl_config_s_alloc); + rb_define_copy_func(cConfig, ossl_config_copy); + rb_define_method(cConfig, "initialize", ossl_config_initialize, -1); + rb_define_method(cConfig, "get_value", ossl_config_get_value, 2); + rb_define_method(cConfig, "value", ossl_config_get_value_old, -1); + rb_define_method(cConfig, "add_value", ossl_config_add_value, 3); + rb_define_method(cConfig, "[]", ossl_config_get_section, 1); + rb_define_method(cConfig, "section", ossl_config_get_section_old, 1); + rb_define_method(cConfig, "[]=", ossl_config_set_section, 2); + rb_define_method(cConfig, "sections", ossl_config_get_sections, 0); + rb_define_method(cConfig, "to_s", ossl_config_to_s, 0); + rb_define_method(cConfig, "each", ossl_config_each, 0); + rb_define_method(cConfig, "inspect", ossl_config_inspect, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.h new file mode 100644 index 0000000..d5fa3e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_config.h @@ -0,0 +1,22 @@ +/* + * $Id: ossl_config.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_CONFIG_H_) +#define _OSSL_CONFIG_H_ + +extern VALUE cConfig; +extern VALUE eConfigError; + +CONF* GetConfigPtr(VALUE obj); +CONF* DupConfigPtr(VALUE obj); +void Init_ossl_config(void); + +#endif /* _OSSL_CONFIG_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.c new file mode 100644 index 0000000..64acce8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.c @@ -0,0 +1,258 @@ +/* + * $Id: ossl_digest.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define GetDigest(obj, ctx) do { \ + Data_Get_Struct(obj, EVP_MD_CTX, ctx); \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetDigest(obj, ctx) do { \ + OSSL_Check_Kind(obj, cDigest); \ + GetDigest(obj, ctx); \ +} while (0) + +/* + * Classes + */ +VALUE cDigest; +VALUE eDigestError; + +static VALUE ossl_digest_alloc(VALUE klass); + +/* + * Public + */ +const EVP_MD * +GetDigestPtr(VALUE obj) +{ + const EVP_MD *md; + + if (TYPE(obj) == T_STRING) { + const char *name = STR2CSTR(obj); + + md = EVP_get_digestbyname(name); + if (!md) + ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name); + } else { + EVP_MD_CTX *ctx; + + SafeGetDigest(obj, ctx); + + md = EVP_MD_CTX_md(ctx); + } + + return md; +} + +VALUE +ossl_digest_new(const EVP_MD *md) +{ + VALUE ret; + EVP_MD_CTX *ctx; + + ret = ossl_digest_alloc(cDigest); + GetDigest(ret, ctx); + EVP_DigestInit_ex(ctx, md, NULL); + + return ret; +} + +/* + * Private + */ +static VALUE +ossl_digest_alloc(VALUE klass) +{ + EVP_MD_CTX *ctx; + VALUE obj; + + ctx = EVP_MD_CTX_create(); + if (ctx == NULL) + ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed"); + obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx); + + return obj; +} + +VALUE ossl_digest_update(VALUE, VALUE); + +/* + * call-seq: + * Digest.new(string) -> digest + * + */ +static VALUE +ossl_digest_initialize(int argc, VALUE *argv, VALUE self) +{ + EVP_MD_CTX *ctx; + const EVP_MD *md; + VALUE type, data; + + rb_scan_args(argc, argv, "11", &type, &data); + md = GetDigestPtr(type); + if (!NIL_P(data)) StringValue(data); + + GetDigest(self, ctx); + EVP_DigestInit_ex(ctx, md, NULL); + + if (!NIL_P(data)) return ossl_digest_update(self, data); + return self; +} + +static VALUE +ossl_digest_copy(VALUE self, VALUE other) +{ + EVP_MD_CTX *ctx1, *ctx2; + + rb_check_frozen(self); + if (self == other) return self; + + GetDigest(self, ctx1); + SafeGetDigest(other, ctx2); + + if (!EVP_MD_CTX_copy(ctx1, ctx2)) { + ossl_raise(eDigestError, NULL); + } + return self; +} + +/* + * call-seq: + * digest.reset -> self + * + */ +static VALUE +ossl_digest_reset(VALUE self) +{ + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL); + + return self; +} + +/* + * call-seq: + * digest.update(string) -> aString + * + */ +VALUE +ossl_digest_update(VALUE self, VALUE data) +{ + EVP_MD_CTX *ctx; + + StringValue(data); + GetDigest(self, ctx); + EVP_DigestUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)); + + return self; +} + +/* + * call-seq: + * digest.finish -> aString + * + */ +static VALUE +ossl_digest_finish(int argc, VALUE *argv, VALUE self) +{ + EVP_MD_CTX *ctx; + VALUE str; + + rb_scan_args(argc, argv, "01", &str); + + GetDigest(self, ctx); + + if (NIL_P(str)) { + str = rb_str_new(NULL, EVP_MD_CTX_size(ctx)); + } else { + StringValue(str); + rb_str_resize(str, EVP_MD_CTX_size(ctx)); + } + + EVP_DigestFinal_ex(ctx, (unsigned char *)RSTRING_PTR(str), NULL); + + return str; +} + +/* + * call-seq: + * digest.name -> string + * + */ +static VALUE +ossl_digest_name(VALUE self) +{ + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + + return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx))); +} + +/* + * call-seq: + * digest.digest_size -> integer + * + * Returns the output size of the digest. + */ +static VALUE +ossl_digest_size(VALUE self) +{ + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + + return INT2NUM(EVP_MD_CTX_size(ctx)); +} + +static VALUE +ossl_digest_block_length(VALUE self) +{ + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + + return INT2NUM(EVP_MD_CTX_block_size(ctx)); +} + +/* + * INIT + */ +void +Init_ossl_digest() +{ + rb_require("openssl"); + rb_require("digest"); + +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); + eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); + + rb_define_alloc_func(cDigest, ossl_digest_alloc); + + rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1); + rb_define_copy_func(cDigest, ossl_digest_copy); + rb_define_method(cDigest, "reset", ossl_digest_reset, 0); + rb_define_method(cDigest, "update", ossl_digest_update, 1); + rb_define_alias(cDigest, "<<", "update"); + rb_define_private_method(cDigest, "finish", ossl_digest_finish, -1); + rb_define_method(cDigest, "digest_length", ossl_digest_size, 0); + rb_define_method(cDigest, "block_length", ossl_digest_block_length, 0); + + rb_define_method(cDigest, "name", ossl_digest_name, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.h new file mode 100644 index 0000000..11a9b61 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_digest.h @@ -0,0 +1,22 @@ +/* + * $Id: ossl_digest.h 12148 2007-04-05 05:59:22Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_DIGEST_H_) +#define _OSSL_DIGEST_H_ + +extern VALUE cDigest; +extern VALUE eDigestError; + +const EVP_MD *GetDigestPtr(VALUE); +VALUE ossl_digest_new(const EVP_MD *); +void Init_ossl_digest(void); + +#endif /* _OSSL_DIGEST_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.c new file mode 100644 index 0000000..261bec6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.c @@ -0,0 +1,393 @@ +/* + * $Id: ossl_engine.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2003 GOTOU Yuuzou + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#if defined(OSSL_ENGINE_ENABLED) + +#define WrapEngine(klass, obj, engine) do { \ + if (!engine) { \ + ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \ + } \ + obj = Data_Wrap_Struct(klass, 0, ENGINE_free, engine); \ +} while(0) +#define GetEngine(obj, engine) do { \ + Data_Get_Struct(obj, ENGINE, engine); \ + if (!engine) { \ + ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \ + } \ +} while (0) +#define SafeGetEngine(obj, engine) do { \ + OSSL_Check_Kind(obj, cEngine); \ + GetPKCS7(obj, engine); \ +} while (0) + +/* + * Classes + */ +VALUE cEngine; +VALUE eEngineError; + +/* + * Private + */ +#define OSSL_ENGINE_LOAD_IF_MATCH(x) \ +do{\ + if(!strcmp(#x, RSTRING_PTR(name))){\ + ENGINE_load_##x();\ + return Qtrue;\ + }\ +}while(0) + +static VALUE +ossl_engine_s_load(int argc, VALUE *argv, VALUE klass) +{ +#if !defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES) + return Qnil; +#else + VALUE name; + + rb_scan_args(argc, argv, "01", &name); + if(NIL_P(name)){ + ENGINE_load_builtin_engines(); + return Qtrue; + } + StringValue(name); +#ifndef OPENSSL_NO_STATIC_ENGINE + OSSL_ENGINE_LOAD_IF_MATCH(dynamic); + OSSL_ENGINE_LOAD_IF_MATCH(cswift); + OSSL_ENGINE_LOAD_IF_MATCH(chil); + OSSL_ENGINE_LOAD_IF_MATCH(atalla); + OSSL_ENGINE_LOAD_IF_MATCH(nuron); + OSSL_ENGINE_LOAD_IF_MATCH(ubsec); + OSSL_ENGINE_LOAD_IF_MATCH(aep); + OSSL_ENGINE_LOAD_IF_MATCH(sureware); + OSSL_ENGINE_LOAD_IF_MATCH(4758cca); +#endif +#ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO + OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto); +#endif + OSSL_ENGINE_LOAD_IF_MATCH(openssl); + rb_warning("no such builtin loader for `%s'", RSTRING_PTR(name)); + return Qnil; +#endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */ +} + +static VALUE +ossl_engine_s_cleanup(VALUE self) +{ +#if defined(HAVE_ENGINE_CLEANUP) + ENGINE_cleanup(); +#endif + return Qnil; +} + +static VALUE +ossl_engine_s_engines(VALUE klass) +{ + ENGINE *e; + VALUE ary, obj; + + ary = rb_ary_new(); + for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)){ + WrapEngine(klass, obj, e); + rb_ary_push(ary, obj); + } + + return ary; +} + +static VALUE +ossl_engine_s_by_id(VALUE klass, VALUE id) +{ + ENGINE *e; + VALUE obj; + + StringValue(id); + ossl_engine_s_load(1, &id, klass); + if(!(e = ENGINE_by_id(RSTRING_PTR(id)))) + ossl_raise(eEngineError, NULL); + WrapEngine(klass, obj, e); + if(rb_block_given_p()) rb_yield(obj); + if(!ENGINE_init(e)) + ossl_raise(eEngineError, NULL); + ENGINE_ctrl(e, ENGINE_CTRL_SET_PASSWORD_CALLBACK, + 0, NULL, (void(*)())ossl_pem_passwd_cb); + ERR_clear_error(); + + return obj; +} + +static VALUE +ossl_engine_s_alloc(VALUE klass) +{ + ENGINE *e; + VALUE obj; + + if (!(e = ENGINE_new())) { + ossl_raise(eEngineError, NULL); + } + WrapEngine(klass, obj, e); + + return obj; +} + +static VALUE +ossl_engine_get_id(VALUE self) +{ + ENGINE *e; + GetEngine(self, e); + return rb_str_new2(ENGINE_get_id(e)); +} + +static VALUE +ossl_engine_get_name(VALUE self) +{ + ENGINE *e; + GetEngine(self, e); + return rb_str_new2(ENGINE_get_name(e)); +} + +static VALUE +ossl_engine_finish(VALUE self) +{ + ENGINE *e; + + GetEngine(self, e); + if(!ENGINE_finish(e)) ossl_raise(eEngineError, NULL); + + return Qnil; +} + +static VALUE +ossl_engine_get_cipher(VALUE self, VALUE name) +{ +#if defined(HAVE_ENGINE_GET_CIPHER) + ENGINE *e; + const EVP_CIPHER *ciph, *tmp; + char *s; + int nid; + + s = StringValuePtr(name); + tmp = EVP_get_cipherbyname(s); + if(!tmp) ossl_raise(eEngineError, "no such cipher `%s'", s); + nid = EVP_CIPHER_nid(tmp); + GetEngine(self, e); + ciph = ENGINE_get_cipher(e, nid); + if(!ciph) ossl_raise(eEngineError, NULL); + + return ossl_cipher_new(ciph); +#else + rb_notimplement(); +#endif +} + +static VALUE +ossl_engine_get_digest(VALUE self, VALUE name) +{ +#if defined(HAVE_ENGINE_GET_DIGEST) + ENGINE *e; + const EVP_MD *md, *tmp; + char *s; + int nid; + + s = StringValuePtr(name); + tmp = EVP_get_digestbyname(s); + if(!tmp) ossl_raise(eEngineError, "no such digest `%s'", s); + nid = EVP_MD_nid(tmp); + GetEngine(self, e); + md = ENGINE_get_digest(e, nid); + if(!md) ossl_raise(eEngineError, NULL); + + return ossl_digest_new(md); +#else + rb_notimplement(); +#endif +} + +static VALUE +ossl_engine_load_privkey(int argc, VALUE *argv, VALUE self) +{ + ENGINE *e; + EVP_PKEY *pkey; + VALUE id, data, obj; + char *sid, *sdata; + + rb_scan_args(argc, argv, "02", &id, &data); + sid = NIL_P(id) ? NULL : StringValuePtr(id); + sdata = NIL_P(data) ? NULL : StringValuePtr(data); + GetEngine(self, e); +#if OPENSSL_VERSION_NUMBER < 0x00907000L + pkey = ENGINE_load_private_key(e, sid, sdata); +#else + pkey = ENGINE_load_private_key(e, sid, NULL, sdata); +#endif + if (!pkey) ossl_raise(eEngineError, NULL); + obj = ossl_pkey_new(pkey); + OSSL_PKEY_SET_PRIVATE(obj); + + return obj; +} + +static VALUE +ossl_engine_load_pubkey(int argc, VALUE *argv, VALUE self) +{ + ENGINE *e; + EVP_PKEY *pkey; + VALUE id, data; + char *sid, *sdata; + + rb_scan_args(argc, argv, "02", &id, &data); + sid = NIL_P(id) ? NULL : StringValuePtr(id); + sdata = NIL_P(data) ? NULL : StringValuePtr(data); + GetEngine(self, e); +#if OPENSSL_VERSION_NUMBER < 0x00907000L + pkey = ENGINE_load_public_key(e, sid, sdata); +#else + pkey = ENGINE_load_public_key(e, sid, NULL, sdata); +#endif + if (!pkey) ossl_raise(eEngineError, NULL); + + return ossl_pkey_new(pkey); +} + +static VALUE +ossl_engine_set_default(VALUE self, VALUE flag) +{ + ENGINE *e; + int f = NUM2INT(flag); + + GetEngine(self, e); + ENGINE_set_default(e, f); + + return Qtrue; +} + +static VALUE +ossl_engine_ctrl_cmd(int argc, VALUE *argv, VALUE self) +{ + ENGINE *e; + VALUE cmd, val; + int ret; + + GetEngine(self, e); + rb_scan_args(argc, argv, "11", &cmd, &val); + StringValue(cmd); + if (!NIL_P(val)) StringValue(val); + ret = ENGINE_ctrl_cmd_string(e, RSTRING_PTR(cmd), + NIL_P(val) ? NULL : RSTRING_PTR(val), 0); + if (!ret) ossl_raise(eEngineError, NULL); + + return self; +} + +static VALUE +ossl_engine_cmd_flag_to_name(int flag) +{ + switch(flag){ + case ENGINE_CMD_FLAG_NUMERIC: return rb_str_new2("NUMERIC"); + case ENGINE_CMD_FLAG_STRING: return rb_str_new2("STRING"); + case ENGINE_CMD_FLAG_NO_INPUT: return rb_str_new2("NO_INPUT"); + case ENGINE_CMD_FLAG_INTERNAL: return rb_str_new2("INTERNAL"); + default: return rb_str_new2("UNKNOWN"); + } +} + +static VALUE +ossl_engine_get_cmds(VALUE self) +{ + ENGINE *e; + const ENGINE_CMD_DEFN *defn, *p; + VALUE ary, tmp; + + GetEngine(self, e); + ary = rb_ary_new(); + if ((defn = ENGINE_get_cmd_defns(e)) != NULL){ + for (p = defn; p->cmd_num > 0; p++){ + tmp = rb_ary_new(); + rb_ary_push(tmp, rb_str_new2(p->cmd_name)); + rb_ary_push(tmp, rb_str_new2(p->cmd_desc)); + rb_ary_push(tmp, ossl_engine_cmd_flag_to_name(p->cmd_flags)); + rb_ary_push(ary, tmp); + } + } + + return ary; +} + +static VALUE +ossl_engine_inspect(VALUE self) +{ + VALUE str; + const char *cname = rb_class2name(rb_obj_class(self)); + + str = rb_str_new2("#<"); + rb_str_cat2(str, cname); + rb_str_cat2(str, " id=\""); + rb_str_append(str, ossl_engine_get_id(self)); + rb_str_cat2(str, "\" name=\""); + rb_str_append(str, ossl_engine_get_name(self)); + rb_str_cat2(str, "\">"); + + return str; +} + +#define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x)) + +void +Init_ossl_engine() +{ + cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject); + eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError); + + rb_define_alloc_func(cEngine, ossl_engine_s_alloc); + rb_define_singleton_method(cEngine, "load", ossl_engine_s_load, -1); + rb_define_singleton_method(cEngine, "cleanup", ossl_engine_s_cleanup, 0); + rb_define_singleton_method(cEngine, "engines", ossl_engine_s_engines, 0); + rb_define_singleton_method(cEngine, "by_id", ossl_engine_s_by_id, 1); + rb_undef_method(CLASS_OF(cEngine), "new"); + + rb_define_method(cEngine, "id", ossl_engine_get_id, 0); + rb_define_method(cEngine, "name", ossl_engine_get_name, 0); + rb_define_method(cEngine, "finish", ossl_engine_finish, 0); + rb_define_method(cEngine, "cipher", ossl_engine_get_cipher, 1); + rb_define_method(cEngine, "digest", ossl_engine_get_digest, 1); + rb_define_method(cEngine, "load_private_key", ossl_engine_load_privkey, -1); + rb_define_method(cEngine, "load_public_key", ossl_engine_load_pubkey, -1); + rb_define_method(cEngine, "set_default", ossl_engine_set_default, 1); + rb_define_method(cEngine, "ctrl_cmd", ossl_engine_ctrl_cmd, -1); + rb_define_method(cEngine, "cmds", ossl_engine_get_cmds, 0); + rb_define_method(cEngine, "inspect", ossl_engine_inspect, 0); + + DefEngineConst(METHOD_RSA); + DefEngineConst(METHOD_DSA); + DefEngineConst(METHOD_DH); + DefEngineConst(METHOD_RAND); +#ifdef ENGINE_METHOD_BN_MOD_EXP + DefEngineConst(METHOD_BN_MOD_EXP); +#endif +#ifdef ENGINE_METHOD_BN_MOD_EXP_CRT + DefEngineConst(METHOD_BN_MOD_EXP_CRT); +#endif +#ifdef ENGINE_METHOD_CIPHERS + DefEngineConst(METHOD_CIPHERS); +#endif +#ifdef ENGINE_METHOD_DIGESTS + DefEngineConst(METHOD_DIGESTS); +#endif + DefEngineConst(METHOD_ALL); + DefEngineConst(METHOD_NONE); +} +#else +void +Init_ossl_engine() +{ +} +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.h new file mode 100644 index 0000000..64421fe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_engine.h @@ -0,0 +1,20 @@ +/* + * $Id: ossl_engine.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2003 Michal Rokos + * Copyright (C) 2003 GOTOU Yuuzou + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(OSSL_ENGINE_H) +#define OSSL_ENGINE_H + +extern VALUE cEngine; +extern VALUE eEngineError; + +void Init_ossl_engine(void); + +#endif /* OSSL_ENGINE_H */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.c new file mode 100644 index 0000000..397424e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.c @@ -0,0 +1,270 @@ +/* + * $Id: ossl_hmac.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(OPENSSL_NO_HMAC) + +#include "ossl.h" + +#define MakeHMAC(obj, klass, ctx) \ + obj = Data_Make_Struct(klass, HMAC_CTX, 0, ossl_hmac_free, ctx) +#define GetHMAC(obj, ctx) do { \ + Data_Get_Struct(obj, HMAC_CTX, ctx); \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \ + } \ +} while (0) +#define SafeGetHMAC(obj, ctx) do { \ + OSSL_Check_Kind(obj, cHMAC); \ + GetHMAC(obj, ctx); \ +} while (0) + +/* + * Classes + */ +VALUE cHMAC; +VALUE eHMACError; + +/* + * Public + */ + +/* + * Private + */ +static void +ossl_hmac_free(HMAC_CTX *ctx) +{ + HMAC_CTX_cleanup(ctx); + ruby_xfree(ctx); +} + +static VALUE +ossl_hmac_alloc(VALUE klass) +{ + HMAC_CTX *ctx; + VALUE obj; + + MakeHMAC(obj, klass, ctx); + HMAC_CTX_init(ctx); + + return obj; +} + + +/* + * call-seq: + * HMAC.new(key, digest) -> hmac + * + */ +static VALUE +ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest) +{ + HMAC_CTX *ctx; + + StringValue(key); + GetHMAC(self, ctx); + HMAC_Init_ex(ctx, RSTRING_PTR(key), RSTRING_LEN(key), + GetDigestPtr(digest), NULL); + + return self; +} + +static VALUE +ossl_hmac_copy(VALUE self, VALUE other) +{ + HMAC_CTX *ctx1, *ctx2; + + rb_check_frozen(self); + if (self == other) return self; + + GetHMAC(self, ctx1); + SafeGetHMAC(other, ctx2); + + HMAC_CTX_copy(ctx1, ctx2); + return self; +} + +/* + * call-seq: + * hmac.update(string) -> self + * + */ +static VALUE +ossl_hmac_update(VALUE self, VALUE data) +{ + HMAC_CTX *ctx; + + StringValue(data); + GetHMAC(self, ctx); + HMAC_Update(ctx, (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data)); + + return self; +} + +static void +hmac_final(HMAC_CTX *ctx, unsigned char **buf, unsigned int *buf_len) +{ + HMAC_CTX final; + + HMAC_CTX_copy(&final, ctx); + if (!(*buf = OPENSSL_malloc(HMAC_size(&final)))) { + HMAC_CTX_cleanup(&final); + OSSL_Debug("Allocating %d mem", HMAC_size(&final)); + ossl_raise(eHMACError, "Cannot allocate memory for hmac"); + } + HMAC_Final(&final, *buf, buf_len); + HMAC_CTX_cleanup(&final); +} + +/* + * call-seq: + * hmac.digest -> aString + * + */ +static VALUE +ossl_hmac_digest(VALUE self) +{ + HMAC_CTX *ctx; + unsigned char *buf; + unsigned int buf_len; + VALUE digest; + + GetHMAC(self, ctx); + hmac_final(ctx, &buf, &buf_len); + digest = ossl_buf2str((char *)buf, buf_len); + + return digest; +} + +/* + * call-seq: + * hmac.hexdigest -> aString + * + */ +static VALUE +ossl_hmac_hexdigest(VALUE self) +{ + HMAC_CTX *ctx; + unsigned char *buf; + char *hexbuf; + unsigned int buf_len; + VALUE hexdigest; + + GetHMAC(self, ctx); + hmac_final(ctx, &buf, &buf_len); + if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { + OPENSSL_free(buf); + ossl_raise(eHMACError, "Memory alloc error"); + } + OPENSSL_free(buf); + hexdigest = ossl_buf2str(hexbuf, 2 * buf_len); + + return hexdigest; +} + +/* + * call-seq: + * hmac.reset -> self + * + */ +static VALUE +ossl_hmac_reset(VALUE self) +{ + HMAC_CTX *ctx; + + GetHMAC(self, ctx); + HMAC_Init_ex(ctx, NULL, 0, NULL, NULL); + + return self; +} + +/* + * call-seq: + * HMAC.digest(digest, key, data) -> aString + * + */ +static VALUE +ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data) +{ + unsigned char *buf; + unsigned int buf_len; + + StringValue(key); + StringValue(data); + buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), + (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); + + return rb_str_new((const char *)buf, buf_len); +} + +/* + * call-seq: + * HMAC.digest(digest, key, data) -> aString + * + */ +static VALUE +ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data) +{ + unsigned char *buf; + char *hexbuf; + unsigned int buf_len; + VALUE hexdigest; + + StringValue(key); + StringValue(data); + + buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), + (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); + if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { + ossl_raise(eHMACError, "Cannot convert buf to hexbuf"); + } + hexdigest = ossl_buf2str(hexbuf, 2 * buf_len); + + return hexdigest; +} + +/* + * INIT + */ +void +Init_ossl_hmac() +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + eHMACError = rb_define_class_under(mOSSL, "HMACError", eOSSLError); + + cHMAC = rb_define_class_under(mOSSL, "HMAC", rb_cObject); + + rb_define_alloc_func(cHMAC, ossl_hmac_alloc); + rb_define_singleton_method(cHMAC, "digest", ossl_hmac_s_digest, 3); + rb_define_singleton_method(cHMAC, "hexdigest", ossl_hmac_s_hexdigest, 3); + + rb_define_method(cHMAC, "initialize", ossl_hmac_initialize, 2); + rb_define_copy_func(cHMAC, ossl_hmac_copy); + + rb_define_method(cHMAC, "reset", ossl_hmac_reset, 0); + rb_define_method(cHMAC, "update", ossl_hmac_update, 1); + rb_define_alias(cHMAC, "<<", "update"); + rb_define_method(cHMAC, "digest", ossl_hmac_digest, 0); + rb_define_method(cHMAC, "hexdigest", ossl_hmac_hexdigest, 0); + rb_define_alias(cHMAC, "inspect", "hexdigest"); + rb_define_alias(cHMAC, "to_s", "hexdigest"); +} + +#else /* NO_HMAC */ +# warning >>> OpenSSL is compiled without HMAC support <<< +void +Init_ossl_hmac() +{ + rb_warning("HMAC will NOT be avaible: OpenSSL is compiled without HMAC."); +} +#endif /* NO_HMAC */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.h new file mode 100644 index 0000000..4af64d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_hmac.h @@ -0,0 +1,19 @@ +/* + * $Id: ossl_hmac.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_HMAC_H_) +#define _OSSL_HMAC_H_ + +extern VALUE cHMAC; +extern VALUE eHMACError; + +void Init_ossl_hmac(void); + +#endif /* _OSSL_HMAC_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.c new file mode 100644 index 0000000..536fd80 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.c @@ -0,0 +1,257 @@ +/* + * $Id: ossl_ns_spki.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapSPKI(klass, obj, spki) do { \ + if (!spki) { \ + ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, NETSCAPE_SPKI_free, spki); \ +} while (0) +#define GetSPKI(obj, spki) do { \ + Data_Get_Struct(obj, NETSCAPE_SPKI, spki); \ + if (!spki) { \ + ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \ + } \ +} while (0) + +/* + * Classes + */ +VALUE mNetscape; +VALUE cSPKI; +VALUE eSPKIError; + +/* + * Public functions + */ + +/* + * Private functions + */ +static VALUE +ossl_spki_alloc(VALUE klass) +{ + NETSCAPE_SPKI *spki; + VALUE obj; + + if (!(spki = NETSCAPE_SPKI_new())) { + ossl_raise(eSPKIError, NULL); + } + WrapSPKI(klass, obj, spki); + + return obj; +} + +static VALUE +ossl_spki_initialize(int argc, VALUE *argv, VALUE self) +{ + NETSCAPE_SPKI *spki; + VALUE buffer; + const unsigned char *p; + + if (rb_scan_args(argc, argv, "01", &buffer) == 0) { + return self; + } + StringValue(buffer); + if (!(spki = NETSCAPE_SPKI_b64_decode(RSTRING_PTR(buffer), -1))) { + p = (unsigned char *)RSTRING_PTR(buffer); + if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING_LEN(buffer)))) { + ossl_raise(eSPKIError, NULL); + } + } + NETSCAPE_SPKI_free(DATA_PTR(self)); + DATA_PTR(self) = spki; + ERR_clear_error(); + + return self; +} + +static VALUE +ossl_spki_to_der(VALUE self) +{ + NETSCAPE_SPKI *spki; + VALUE str; + long len; + unsigned char *p; + + GetSPKI(self, spki); + if ((len = i2d_NETSCAPE_SPKI(spki, NULL)) <= 0) + ossl_raise(eX509CertError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if (i2d_NETSCAPE_SPKI(spki, &p) <= 0) + ossl_raise(eX509CertError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +static VALUE +ossl_spki_to_pem(VALUE self) +{ + NETSCAPE_SPKI *spki; + char *data; + VALUE str; + + GetSPKI(self, spki); + if (!(data = NETSCAPE_SPKI_b64_encode(spki))) { + ossl_raise(eSPKIError, NULL); + } + str = ossl_buf2str(data, strlen(data)); + + return str; +} + +static VALUE +ossl_spki_print(VALUE self) +{ + NETSCAPE_SPKI *spki; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetSPKI(self, spki); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eSPKIError, NULL); + } + if (!NETSCAPE_SPKI_print(out, spki)) { + BIO_free(out); + ossl_raise(eSPKIError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + +static VALUE +ossl_spki_get_public_key(VALUE self) +{ + NETSCAPE_SPKI *spki; + EVP_PKEY *pkey; + + GetSPKI(self, spki); + if (!(pkey = NETSCAPE_SPKI_get_pubkey(spki))) { /* adds an reference */ + ossl_raise(eSPKIError, NULL); + } + + return ossl_pkey_new(pkey); /* NO DUP - OK */ +} + +static VALUE +ossl_spki_set_public_key(VALUE self, VALUE key) +{ + NETSCAPE_SPKI *spki; + + GetSPKI(self, spki); + if (!NETSCAPE_SPKI_set_pubkey(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */ + ossl_raise(eSPKIError, NULL); + } + + return key; +} + +static VALUE +ossl_spki_get_challenge(VALUE self) +{ + NETSCAPE_SPKI *spki; + + GetSPKI(self, spki); + if (spki->spkac->challenge->length <= 0) { + OSSL_Debug("Challenge.length <= 0?"); + return rb_str_new(0, 0); + } + + return rb_str_new((const char *)spki->spkac->challenge->data, + spki->spkac->challenge->length); +} + +static VALUE +ossl_spki_set_challenge(VALUE self, VALUE str) +{ + NETSCAPE_SPKI *spki; + + StringValue(str); + GetSPKI(self, spki); + if (!ASN1_STRING_set(spki->spkac->challenge, RSTRING_PTR(str), + RSTRING_LEN(str))) { + ossl_raise(eSPKIError, NULL); + } + + return str; +} + +static VALUE +ossl_spki_sign(VALUE self, VALUE key, VALUE digest) +{ + NETSCAPE_SPKI *spki; + EVP_PKEY *pkey; + const EVP_MD *md; + + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + md = GetDigestPtr(digest); + GetSPKI(self, spki); + if (!NETSCAPE_SPKI_sign(spki, pkey, md)) { + ossl_raise(eSPKIError, NULL); + } + + return self; +} + +/* + * Checks that cert signature is made with PRIVversion of this PUBLIC 'key' + */ +static VALUE +ossl_spki_verify(VALUE self, VALUE key) +{ + NETSCAPE_SPKI *spki; + + GetSPKI(self, spki); + switch (NETSCAPE_SPKI_verify(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */ + case 0: + return Qfalse; + case 1: + return Qtrue; + default: + ossl_raise(eSPKIError, NULL); + } + return Qnil; /* dummy */ +} + +/* + * NETSCAPE_SPKI init + */ +void +Init_ossl_ns_spki() +{ + mNetscape = rb_define_module_under(mOSSL, "Netscape"); + + eSPKIError = rb_define_class_under(mNetscape, "SPKIError", eOSSLError); + + cSPKI = rb_define_class_under(mNetscape, "SPKI", rb_cObject); + + rb_define_alloc_func(cSPKI, ossl_spki_alloc); + rb_define_method(cSPKI, "initialize", ossl_spki_initialize, -1); + + rb_define_method(cSPKI, "to_der", ossl_spki_to_der, 0); + rb_define_method(cSPKI, "to_pem", ossl_spki_to_pem, 0); + rb_define_alias(cSPKI, "to_s", "to_pem"); + rb_define_method(cSPKI, "to_text", ossl_spki_print, 0); + rb_define_method(cSPKI, "public_key", ossl_spki_get_public_key, 0); + rb_define_method(cSPKI, "public_key=", ossl_spki_set_public_key, 1); + rb_define_method(cSPKI, "sign", ossl_spki_sign, 2); + rb_define_method(cSPKI, "verify", ossl_spki_verify, 1); + rb_define_method(cSPKI, "challenge", ossl_spki_get_challenge, 0); + rb_define_method(cSPKI, "challenge=", ossl_spki_set_challenge, 1); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.h new file mode 100644 index 0000000..8ca4052 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ns_spki.h @@ -0,0 +1,21 @@ +/* + * $Id: ossl_ns_spki.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_NS_SPKI_H_) +#define _OSSL_NS_SPKI_H_ + +extern VALUE mNetscape; +extern VALUE cSPKI; +extern VALUE eSPKIError; + +void Init_ossl_ns_spki(void); + +#endif /* _OSSL_NS_SPKI_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.c new file mode 100644 index 0000000..4e65f37 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.c @@ -0,0 +1,773 @@ +/* + * $Id: ossl_ocsp.c 18975 2008-08-31 04:45:44Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2003 Michal Rokos + * Copyright (C) 2003 GOTOU Yuuzou + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#if defined(OSSL_OCSP_ENABLED) + +#define WrapOCSPReq(klass, obj, req) do { \ + if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \ + obj = Data_Wrap_Struct(klass, 0, OCSP_REQUEST_free, req); \ +} while (0) +#define GetOCSPReq(obj, req) do { \ + Data_Get_Struct(obj, OCSP_REQUEST, req); \ + if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \ +} while (0) +#define SafeGetOCSPReq(obj, req) do { \ + OSSL_Check_Kind(obj, cOCSPReq); \ + GetOCSPReq(obj, req); \ +} while (0) + +#define WrapOCSPRes(klass, obj, res) do { \ + if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \ + obj = Data_Wrap_Struct(klass, 0, OCSP_RESPONSE_free, res); \ +} while (0) +#define GetOCSPRes(obj, res) do { \ + Data_Get_Struct(obj, OCSP_RESPONSE, res); \ + if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \ +} while (0) +#define SafeGetOCSPRes(obj, res) do { \ + OSSL_Check_Kind(obj, cOCSPRes); \ + GetOCSPRes(obj, res); \ +} while (0) + +#define WrapOCSPBasicRes(klass, obj, res) do { \ + if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \ + obj = Data_Wrap_Struct(klass, 0, OCSP_BASICRESP_free, res); \ +} while (0) +#define GetOCSPBasicRes(obj, res) do { \ + Data_Get_Struct(obj, OCSP_BASICRESP, res); \ + if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \ +} while (0) +#define SafeGetOCSPBasicRes(obj, res) do { \ + OSSL_Check_Kind(obj, cOCSPBasicRes); \ + GetOCSPBasicRes(obj, res); \ +} while (0) + +#define WrapOCSPCertId(klass, obj, cid) do { \ + if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \ + obj = Data_Wrap_Struct(klass, 0, OCSP_CERTID_free, cid); \ +} while (0) +#define GetOCSPCertId(obj, cid) do { \ + Data_Get_Struct(obj, OCSP_CERTID, cid); \ + if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \ +} while (0) +#define SafeGetOCSPCertId(obj, cid) do { \ + OSSL_Check_Kind(obj, cOCSPCertId); \ + GetOCSPCertId(obj, cid); \ +} while (0) + +VALUE mOCSP; +VALUE eOCSPError; +VALUE cOCSPReq; +VALUE cOCSPRes; +VALUE cOCSPBasicRes; +VALUE cOCSPCertId; + +/* + * Public + */ +static VALUE +ossl_ocspcertid_new(OCSP_CERTID *cid) +{ + VALUE obj; + WrapOCSPCertId(cOCSPCertId, obj, cid); + return obj; +} + +/* + * OCSP::Resquest + */ +static VALUE +ossl_ocspreq_alloc(VALUE klass) +{ + OCSP_REQUEST *req; + VALUE obj; + + if (!(req = OCSP_REQUEST_new())) + ossl_raise(eOCSPError, NULL); + WrapOCSPReq(klass, obj, req); + + return obj; +} + +static VALUE +ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE arg; + const unsigned char *p; + + rb_scan_args(argc, argv, "01", &arg); + if(!NIL_P(arg)){ + OCSP_REQUEST *req = DATA_PTR(self), *x; + arg = ossl_to_der_if_possible(arg); + StringValue(arg); + p = (unsigned char*)RSTRING_PTR(arg); + x = d2i_OCSP_REQUEST(&req, &p, RSTRING_LEN(arg)); + DATA_PTR(self) = req; + if(!x){ + ossl_raise(eOCSPError, "cannot load DER encoded request"); + } + } + + return self; +} + +static VALUE +ossl_ocspreq_add_nonce(int argc, VALUE *argv, VALUE self) +{ + OCSP_REQUEST *req; + VALUE val; + int ret; + + rb_scan_args(argc, argv, "01", &val); + if(NIL_P(val)) { + GetOCSPReq(self, req); + ret = OCSP_request_add1_nonce(req, NULL, -1); + } + else{ + StringValue(val); + GetOCSPReq(self, req); + ret = OCSP_request_add1_nonce(req, (unsigned char *)RSTRING_PTR(val), RSTRING_LEN(val)); + } + if(!ret) ossl_raise(eOCSPError, NULL); + + return self; +} + +/* Check nonce validity in a request and response. + * Return value reflects result: + * 1: nonces present and equal. + * 2: nonces both absent. + * 3: nonce present in response only. + * 0: nonces both present and not equal. + * -1: nonce in request only. + * + * For most responders clients can check return > 0. + * If responder doesn't handle nonces return != 0 may be + * necessary. return == 0 is always an error. + */ +static VALUE +ossl_ocspreq_check_nonce(VALUE self, VALUE basic_resp) +{ + OCSP_REQUEST *req; + OCSP_BASICRESP *bs; + int res; + + GetOCSPReq(self, req); + SafeGetOCSPBasicRes(basic_resp, bs); + res = OCSP_check_nonce(req, bs); + + return INT2NUM(res); +} + +static VALUE +ossl_ocspreq_add_certid(VALUE self, VALUE certid) +{ + OCSP_REQUEST *req; + OCSP_CERTID *id; + + GetOCSPReq(self, req); + GetOCSPCertId(certid, id); + if(!OCSP_request_add0_id(req, OCSP_CERTID_dup(id))) + ossl_raise(eOCSPError, NULL); + + return self; +} + +static VALUE +ossl_ocspreq_get_certid(VALUE self) +{ + OCSP_REQUEST *req; + OCSP_ONEREQ *one; + OCSP_CERTID *id; + VALUE ary, tmp; + int i, count; + + GetOCSPReq(self, req); + count = OCSP_request_onereq_count(req); + ary = (count > 0) ? rb_ary_new() : Qnil; + for(i = 0; i < count; i++){ + one = OCSP_request_onereq_get0(req, i); + if(!(id = OCSP_CERTID_dup(OCSP_onereq_get0_id(one)))) + ossl_raise(eOCSPError, NULL); + WrapOCSPCertId(cOCSPCertId, tmp, id); + rb_ary_push(ary, tmp); + } + + return ary; +} + +static VALUE +ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self) +{ + VALUE signer_cert, signer_key, certs, flags; + OCSP_REQUEST *req; + X509 *signer; + EVP_PKEY *key; + STACK_OF(X509) *x509s; + unsigned long flg; + int ret; + + rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags); + signer = GetX509CertPtr(signer_cert); + key = GetPrivPKeyPtr(signer_key); + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + if(NIL_P(certs)){ + x509s = sk_X509_new_null(); + flags |= OCSP_NOCERTS; + } + else x509s = ossl_x509_ary2sk(certs); + GetOCSPReq(self, req); + ret = OCSP_request_sign(req, signer, key, EVP_sha1(), x509s, flg); + sk_X509_pop_free(x509s, X509_free); + if(!ret) ossl_raise(eOCSPError, NULL); + + return self; +} + +static VALUE +ossl_ocspreq_verify(int argc, VALUE *argv, VALUE self) +{ + VALUE certs, store, flags; + OCSP_REQUEST *req; + STACK_OF(X509) *x509s; + X509_STORE *x509st; + int flg, result; + + rb_scan_args(argc, argv, "21", &certs, &store, &flags); + x509st = GetX509StorePtr(store); + flg = NIL_P(flags) ? 0 : INT2NUM(flags); + x509s = ossl_x509_ary2sk(certs); + GetOCSPReq(self, req); + result = OCSP_request_verify(req, x509s, x509st, flg); + sk_X509_pop_free(x509s, X509_free); + if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL)); + + return result ? Qtrue : Qfalse; +} + +static VALUE +ossl_ocspreq_to_der(VALUE self) +{ + OCSP_REQUEST *req; + VALUE str; + unsigned char *p; + long len; + + GetOCSPReq(self, req); + if((len = i2d_OCSP_REQUEST(req, NULL)) <= 0) + ossl_raise(eOCSPError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_OCSP_REQUEST(req, &p) <= 0) + ossl_raise(eOCSPError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * OCSP::Response + */ +static VALUE +ossl_ocspres_s_create(VALUE klass, VALUE status, VALUE basic_resp) +{ + OCSP_BASICRESP *bs; + OCSP_RESPONSE *res; + VALUE obj; + int st = NUM2INT(status); + + if(NIL_P(basic_resp)) bs = NULL; + else GetOCSPBasicRes(basic_resp, bs); /* NO NEED TO DUP */ + if(!(res = OCSP_response_create(st, bs))) + ossl_raise(eOCSPError, NULL); + WrapOCSPRes(klass, obj, res); + + return obj; +} + +static VALUE +ossl_ocspres_alloc(VALUE klass) +{ + OCSP_RESPONSE *res; + VALUE obj; + + if(!(res = OCSP_RESPONSE_new())) + ossl_raise(eOCSPError, NULL); + WrapOCSPRes(klass, obj, res); + + return obj; +} + +static VALUE +ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE arg; + const unsigned char *p; + + rb_scan_args(argc, argv, "01", &arg); + if(!NIL_P(arg)){ + OCSP_RESPONSE *res = DATA_PTR(self), *x; + arg = ossl_to_der_if_possible(arg); + StringValue(arg); + p = (unsigned char *)RSTRING_PTR(arg); + x = d2i_OCSP_RESPONSE(&res, &p, RSTRING_LEN(arg)); + DATA_PTR(self) = res; + if(!x){ + ossl_raise(eOCSPError, "cannot load DER encoded response"); + } + } + + return self; +} + +static VALUE +ossl_ocspres_status(VALUE self) +{ + OCSP_RESPONSE *res; + int st; + + GetOCSPRes(self, res); + st = OCSP_response_status(res); + + return INT2NUM(st); +} + +static VALUE +ossl_ocspres_status_string(VALUE self) +{ + OCSP_RESPONSE *res; + int st; + + GetOCSPRes(self, res); + st = OCSP_response_status(res); + + return rb_str_new2(OCSP_response_status_str(st)); +} + +static VALUE +ossl_ocspres_get_basic(VALUE self) +{ + OCSP_RESPONSE *res; + OCSP_BASICRESP *bs; + VALUE ret; + + GetOCSPRes(self, res); + if(!(bs = OCSP_response_get1_basic(res))) + return Qnil; + WrapOCSPBasicRes(cOCSPBasicRes, ret, bs); + + return ret; +} + +static VALUE +ossl_ocspres_to_der(VALUE self) +{ + OCSP_RESPONSE *res; + VALUE str; + long len; + unsigned char *p; + + GetOCSPRes(self, res); + if((len = i2d_OCSP_RESPONSE(res, NULL)) <= 0) + ossl_raise(eOCSPError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_OCSP_RESPONSE(res, NULL) <= 0) + ossl_raise(eOCSPError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * OCSP::BasicResponse + */ +static VALUE +ossl_ocspbres_alloc(VALUE klass) +{ + OCSP_BASICRESP *bs; + VALUE obj; + + if(!(bs = OCSP_BASICRESP_new())) + ossl_raise(eOCSPError, NULL); + WrapOCSPBasicRes(klass, obj, bs); + + return obj; +} + +static VALUE +ossl_ocspbres_initialize(int argc, VALUE *argv, VALUE self) +{ + return self; +} + +static VALUE +ossl_ocspbres_copy_nonce(VALUE self, VALUE request) +{ + OCSP_BASICRESP *bs; + OCSP_REQUEST *req; + int ret; + + GetOCSPBasicRes(self, bs); + SafeGetOCSPReq(request, req); + ret = OCSP_copy_nonce(bs, req); + + return INT2NUM(ret); +} + +static VALUE +ossl_ocspbres_add_nonce(int argc, VALUE *argv, VALUE self) +{ + OCSP_BASICRESP *bs; + VALUE val; + int ret; + + rb_scan_args(argc, argv, "01", &val); + if(NIL_P(val)) { + GetOCSPBasicRes(self, bs); + ret = OCSP_basic_add1_nonce(bs, NULL, -1); + } + else{ + StringValue(val); + GetOCSPBasicRes(self, bs); + ret = OCSP_basic_add1_nonce(bs, (unsigned char *)RSTRING_PTR(val), RSTRING_LEN(val)); + } + if(!ret) ossl_raise(eOCSPError, NULL); + + return self; +} + +static VALUE +ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status, + VALUE reason, VALUE revtime, + VALUE thisupd, VALUE nextupd, VALUE ext) +{ + OCSP_BASICRESP *bs; + OCSP_SINGLERESP *single; + OCSP_CERTID *id; + int st, rsn; + ASN1_TIME *ths, *nxt, *rev; + int error, i, rstatus = 0; + VALUE tmp; + + st = NUM2INT(status); + rsn = NIL_P(status) ? 0 : NUM2INT(reason); + if(!NIL_P(ext)){ + /* All ary's members should be X509Extension */ + Check_Type(ext, T_ARRAY); + for (i = 0; i < RARRAY_LEN(ext); i++) + OSSL_Check_Kind(RARRAY_PTR(ext)[i], cX509Ext); + } + + error = 0; + ths = nxt = rev = NULL; + if(!NIL_P(revtime)){ + tmp = rb_protect(rb_Integer, revtime, &rstatus); + if(rstatus) goto err; + rev = X509_gmtime_adj(NULL, NUM2INT(tmp)); + } + tmp = rb_protect(rb_Integer, thisupd, &rstatus); + if(rstatus) goto err; + ths = X509_gmtime_adj(NULL, NUM2INT(tmp)); + tmp = rb_protect(rb_Integer, nextupd, &rstatus); + if(rstatus) goto err; + nxt = X509_gmtime_adj(NULL, NUM2INT(tmp)); + + GetOCSPBasicRes(self, bs); + SafeGetOCSPCertId(cid, id); + if(!(single = OCSP_basic_add1_status(bs, id, st, rsn, rev, ths, nxt))){ + error = 1; + goto err; + } + + if(!NIL_P(ext)){ + X509_EXTENSION *x509ext; + sk_X509_EXTENSION_pop_free(single->singleExtensions, X509_EXTENSION_free); + single->singleExtensions = NULL; + for(i = 0; i < RARRAY_LEN(ext); i++){ + x509ext = DupX509ExtPtr(RARRAY_PTR(ext)[i]); + if(!OCSP_SINGLERESP_add_ext(single, x509ext, -1)){ + X509_EXTENSION_free(x509ext); + error = 1; + goto err; + } + X509_EXTENSION_free(x509ext); + } + } + + err: + ASN1_TIME_free(ths); + ASN1_TIME_free(nxt); + ASN1_TIME_free(rev); + if(error) ossl_raise(eOCSPError, NULL); + if(rstatus) rb_jump_tag(rstatus); + + return self; +} + +static VALUE +ossl_ocspbres_get_status(VALUE self) +{ + OCSP_BASICRESP *bs; + OCSP_SINGLERESP *single; + OCSP_CERTID *cid; + ASN1_TIME *revtime, *thisupd, *nextupd; + int status, reason; + X509_EXTENSION *x509ext; + VALUE ret, ary, ext; + int count, ext_count, i, j; + + GetOCSPBasicRes(self, bs); + ret = rb_ary_new(); + count = OCSP_resp_count(bs); + for(i = 0; i < count; i++){ + single = OCSP_resp_get0(bs, i); + if(!single) continue; + + revtime = thisupd = nextupd = NULL; + status = OCSP_single_get0_status(single, &reason, &revtime, + &thisupd, &nextupd); + if(status < 0) continue; + if(!(cid = OCSP_CERTID_dup(single->certId))) + ossl_raise(eOCSPError, NULL); + ary = rb_ary_new(); + rb_ary_push(ary, ossl_ocspcertid_new(cid)); + rb_ary_push(ary, INT2NUM(status)); + rb_ary_push(ary, INT2NUM(reason)); + rb_ary_push(ary, revtime ? asn1time_to_time(revtime) : Qnil); + rb_ary_push(ary, thisupd ? asn1time_to_time(thisupd) : Qnil); + rb_ary_push(ary, nextupd ? asn1time_to_time(nextupd) : Qnil); + ext = rb_ary_new(); + ext_count = OCSP_SINGLERESP_get_ext_count(single); + for(j = 0; j < ext_count; j++){ + x509ext = OCSP_SINGLERESP_get_ext(single, j); + rb_ary_push(ext, ossl_x509ext_new(x509ext)); + } + rb_ary_push(ary, ext); + rb_ary_push(ret, ary); + } + + return ret; +} + +static VALUE +ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self) +{ + VALUE signer_cert, signer_key, certs, flags; + OCSP_BASICRESP *bs; + X509 *signer; + EVP_PKEY *key; + STACK_OF(X509) *x509s; + unsigned long flg; + int ret; + + rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags); + signer = GetX509CertPtr(signer_cert); + key = GetPrivPKeyPtr(signer_key); + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + if(NIL_P(certs)){ + x509s = sk_X509_new_null(); + flg |= OCSP_NOCERTS; + } + else{ + x509s = ossl_x509_ary2sk(certs); + } + GetOCSPBasicRes(self, bs); + ret = OCSP_basic_sign(bs, signer, key, EVP_sha1(), x509s, flg); + sk_X509_pop_free(x509s, X509_free); + if(!ret) ossl_raise(eOCSPError, NULL); + + return self; +} + +static VALUE +ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self) +{ + VALUE certs, store, flags; + OCSP_BASICRESP *bs; + STACK_OF(X509) *x509s; + X509_STORE *x509st; + int flg, result; + + rb_scan_args(argc, argv, "21", &certs, &store, &flags); + x509st = GetX509StorePtr(store); + flg = NIL_P(flags) ? 0 : INT2NUM(flags); + x509s = ossl_x509_ary2sk(certs); + GetOCSPBasicRes(self, bs); + result = OCSP_basic_verify(bs, x509s, x509st, flg); + sk_X509_pop_free(x509s, X509_free); + if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL)); + + return result ? Qtrue : Qfalse; +} + +/* + * OCSP::CertificateId + */ +static VALUE +ossl_ocspcid_alloc(VALUE klass) +{ + OCSP_CERTID *id; + VALUE obj; + + if(!(id = OCSP_CERTID_new())) + ossl_raise(eOCSPError, NULL); + WrapOCSPCertId(klass, obj, id); + + return obj; +} + +static VALUE +ossl_ocspcid_initialize(VALUE self, VALUE subject, VALUE issuer) +{ + OCSP_CERTID *id, *newid; + X509 *x509s, *x509i; + + x509s = GetX509CertPtr(subject); /* NO NEED TO DUP */ + x509i = GetX509CertPtr(issuer); /* NO NEED TO DUP */ + if(!(newid = OCSP_cert_to_id(NULL, x509s, x509i))) + ossl_raise(eOCSPError, NULL); + GetOCSPCertId(self, id); + OCSP_CERTID_free(id); + RDATA(self)->data = newid; + + return self; +} + +static VALUE +ossl_ocspcid_cmp(VALUE self, VALUE other) +{ + OCSP_CERTID *id, *id2; + int result; + + GetOCSPCertId(self, id); + SafeGetOCSPCertId(other, id2); + result = OCSP_id_cmp(id, id2); + + return (result == 0) ? Qtrue : Qfalse; +} + +static VALUE +ossl_ocspcid_cmp_issuer(VALUE self, VALUE other) +{ + OCSP_CERTID *id, *id2; + int result; + + GetOCSPCertId(self, id); + SafeGetOCSPCertId(other, id2); + result = OCSP_id_issuer_cmp(id, id2); + + return (result == 0) ? Qtrue : Qfalse; +} + +static VALUE +ossl_ocspcid_get_serial(VALUE self) +{ + OCSP_CERTID *id; + + GetOCSPCertId(self, id); + + return asn1integer_to_num(id->serialNumber); +} + +void +Init_ossl_ocsp() +{ + mOCSP = rb_define_module_under(mOSSL, "OCSP"); + + eOCSPError = rb_define_class_under(mOCSP, "OCSPError", eOSSLError); + + cOCSPReq = rb_define_class_under(mOCSP, "Request", rb_cObject); + rb_define_alloc_func(cOCSPReq, ossl_ocspreq_alloc); + rb_define_method(cOCSPReq, "initialize", ossl_ocspreq_initialize, -1); + rb_define_method(cOCSPReq, "add_nonce", ossl_ocspreq_add_nonce, -1); + rb_define_method(cOCSPReq, "check_nonce", ossl_ocspreq_check_nonce, 1); + rb_define_method(cOCSPReq, "add_certid", ossl_ocspreq_add_certid, 1); + rb_define_method(cOCSPReq, "certid", ossl_ocspreq_get_certid, 0); + rb_define_method(cOCSPReq, "sign", ossl_ocspreq_sign, -1); + rb_define_method(cOCSPReq, "verify", ossl_ocspreq_verify, -1); + rb_define_method(cOCSPReq, "to_der", ossl_ocspreq_to_der, 0); + + cOCSPRes = rb_define_class_under(mOCSP, "Response", rb_cObject); + rb_define_singleton_method(cOCSPRes, "create", ossl_ocspres_s_create, 2); + rb_define_alloc_func(cOCSPRes, ossl_ocspres_alloc); + rb_define_method(cOCSPRes, "initialize", ossl_ocspres_initialize, -1); + rb_define_method(cOCSPRes, "status", ossl_ocspres_status, 0); + rb_define_method(cOCSPRes, "status_string", ossl_ocspres_status_string, 0); + rb_define_method(cOCSPRes, "basic", ossl_ocspres_get_basic, 0); + rb_define_method(cOCSPRes, "to_der", ossl_ocspres_to_der, 0); + + cOCSPBasicRes = rb_define_class_under(mOCSP, "BasicResponse", rb_cObject); + rb_define_alloc_func(cOCSPBasicRes, ossl_ocspbres_alloc); + rb_define_method(cOCSPBasicRes, "initialize", ossl_ocspbres_initialize, -1); + rb_define_method(cOCSPBasicRes, "copy_nonce", ossl_ocspbres_copy_nonce, 1); + rb_define_method(cOCSPBasicRes, "add_nonce", ossl_ocspbres_add_nonce, -1); + rb_define_method(cOCSPBasicRes, "add_status", ossl_ocspbres_add_status, 7); + rb_define_method(cOCSPBasicRes, "status", ossl_ocspbres_get_status, 0); + rb_define_method(cOCSPBasicRes, "sign", ossl_ocspbres_sign, -1); + rb_define_method(cOCSPBasicRes, "verify", ossl_ocspbres_verify, -1); + + cOCSPCertId = rb_define_class_under(mOCSP, "CertificateId", rb_cObject); + rb_define_alloc_func(cOCSPCertId, ossl_ocspcid_alloc); + rb_define_method(cOCSPCertId, "initialize", ossl_ocspcid_initialize, 2); + rb_define_method(cOCSPCertId, "cmp", ossl_ocspcid_cmp, 1); + rb_define_method(cOCSPCertId, "cmp_issuer", ossl_ocspcid_cmp_issuer, 1); + rb_define_method(cOCSPCertId, "serial", ossl_ocspcid_get_serial, 0); + +#define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x)) + + DefOCSPConst(RESPONSE_STATUS_SUCCESSFUL); + DefOCSPConst(RESPONSE_STATUS_MALFORMEDREQUEST); + DefOCSPConst(RESPONSE_STATUS_INTERNALERROR); + DefOCSPConst(RESPONSE_STATUS_TRYLATER); + DefOCSPConst(RESPONSE_STATUS_SIGREQUIRED); + DefOCSPConst(RESPONSE_STATUS_UNAUTHORIZED); + + DefOCSPConst(REVOKED_STATUS_NOSTATUS); + DefOCSPConst(REVOKED_STATUS_UNSPECIFIED); + DefOCSPConst(REVOKED_STATUS_KEYCOMPROMISE); + DefOCSPConst(REVOKED_STATUS_CACOMPROMISE); + DefOCSPConst(REVOKED_STATUS_AFFILIATIONCHANGED); + DefOCSPConst(REVOKED_STATUS_SUPERSEDED); + DefOCSPConst(REVOKED_STATUS_CESSATIONOFOPERATION); + DefOCSPConst(REVOKED_STATUS_CERTIFICATEHOLD); + DefOCSPConst(REVOKED_STATUS_REMOVEFROMCRL); + + DefOCSPConst(NOCERTS); + DefOCSPConst(NOINTERN); + DefOCSPConst(NOSIGS); + DefOCSPConst(NOCHAIN); + DefOCSPConst(NOVERIFY); + DefOCSPConst(NOEXPLICIT); + DefOCSPConst(NOCASIGN); + DefOCSPConst(NODELEGATED); + DefOCSPConst(NOCHECKS); + DefOCSPConst(TRUSTOTHER); + DefOCSPConst(RESPID_KEY); + DefOCSPConst(NOTIME); + +#define DefOCSPVConst(x) rb_define_const(mOCSP, "V_" #x, INT2NUM(V_OCSP_##x)) + + DefOCSPVConst(CERTSTATUS_GOOD); + DefOCSPVConst(CERTSTATUS_REVOKED); + DefOCSPVConst(CERTSTATUS_UNKNOWN); + DefOCSPVConst(RESPID_NAME); + DefOCSPVConst(RESPID_KEY); +} + +#else /* ! OSSL_OCSP_ENABLED */ +void +Init_ossl_ocsp() +{ +} +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.h new file mode 100644 index 0000000..16ed859 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ocsp.h @@ -0,0 +1,24 @@ +/* + * $Id: ossl_ocsp.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2003 Michal Rokos + * Copyright (C) 2003 GOTOU Yuuzou + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_OCSP_H_) +#define _OSSL_OCSP_H_ + +#if defined(OSSL_OCSP_ENABLED) +extern VALUE mOCSP; +extern VALUE cOPCSReq; +extern VALUE cOPCSRes; +extern VALUE cOPCSBasicRes; +#endif + +void Init_ossl_ocsp(void); + +#endif /* _OSSL_OCSP_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.c new file mode 100644 index 0000000..942cc73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.c @@ -0,0 +1,212 @@ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + * $Id: ossl_pkcs12.c 18168 2008-07-22 15:34:23Z nobu $ + */ +#include "ossl.h" + +#define WrapPKCS12(klass, obj, p12) do { \ + if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \ + obj = Data_Wrap_Struct(klass, 0, PKCS12_free, p12); \ +} while (0) + +#define GetPKCS12(obj, p12) do { \ + Data_Get_Struct(obj, PKCS12, p12); \ + if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \ +} while (0) + +#define SafeGetPKCS12(obj, p12) do { \ + OSSL_Check_Kind(obj, cPKCS12); \ + GetPKCS12(obj, p12); \ +} while (0) + +#define ossl_pkcs12_set_key(o,v) rb_iv_set((o), "@key", (v)) +#define ossl_pkcs12_set_cert(o,v) rb_iv_set((o), "@certificate", (v)) +#define ossl_pkcs12_set_ca_certs(o,v) rb_iv_set((o), "@ca_certs", (v)) +#define ossl_pkcs12_get_key(o) rb_iv_get((o), "@key") +#define ossl_pkcs12_get_cert(o) rb_iv_get((o), "@certificate") +#define ossl_pkcs12_get_ca_certs(o) rb_iv_get((o), "@ca_certs") + +/* + * Classes + */ +VALUE cPKCS12; +VALUE ePKCS12Error; + +/* + * Private + */ +static VALUE +ossl_pkcs12_s_allocate(VALUE klass) +{ + PKCS12 *p12; + VALUE obj; + + if(!(p12 = PKCS12_new())) ossl_raise(ePKCS12Error, NULL); + WrapPKCS12(klass, obj, p12); + + return obj; +} + +/* + * call-seq: + * PKCS12.create(pass, name, key, cert [, ca, [, key_pbe [, cert_pbe [, key_iter [, mac_iter [, keytype]]]]]]) + * + * === Parameters + * * +pass+ - string + * * +name+ - A string describing the key. + * * +key+ - Any PKey. + * * +cert+ - A X509::Certificate. + * * * The public_key portion of the certificate must contain a valid public key. + * * * The not_before and not_after fields must be filled in. + * * +ca+ - An optional array of X509::Certificate's. + * * +key_pbe+ - string + * * +cert_pbe+ - string + * * +key_iter+ - integer + * * +mac_iter+ - integer + * * +keytype+ - An integer representing an MSIE specific extension. + * + * Any optional arguments may be supplied as nil to preserve the OpenSSL defaults. + * + * See the OpenSSL documentation for PKCS12_create(). + */ +static VALUE +ossl_pkcs12_s_create(int argc, VALUE *argv, VALUE self) +{ + VALUE pass, name, pkey, cert, ca, key_nid, cert_nid, key_iter, mac_iter, keytype; + VALUE obj; + char *passphrase, *friendlyname; + EVP_PKEY *key; + X509 *x509; + STACK_OF(X509) *x509s; + int nkey = 0, ncert = 0, kiter = 0, miter = 0, ktype = 0; + PKCS12 *p12; + + rb_scan_args(argc, argv, "46", &pass, &name, &pkey, &cert, &ca, &key_nid, &cert_nid, &key_iter, &mac_iter, &keytype); + passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass); + friendlyname = NIL_P(name) ? NULL : StringValuePtr(name); + key = GetPKeyPtr(pkey); + x509 = GetX509CertPtr(cert); + x509s = NIL_P(ca) ? NULL : ossl_x509_ary2sk(ca); +/* TODO: make a VALUE to nid function */ + if (!NIL_P(key_nid)) { + if ((nkey = OBJ_txt2nid(StringValuePtr(key_nid))) == NID_undef) + rb_raise(rb_eArgError, "Unknown PBE algorithm %s", StringValuePtr(key_nid)); + } + if (!NIL_P(cert_nid)) { + if ((ncert = OBJ_txt2nid(StringValuePtr(cert_nid))) == NID_undef) + rb_raise(rb_eArgError, "Unknown PBE algorithm %s", StringValuePtr(cert_nid)); + } + if (!NIL_P(key_iter)) + kiter = NUM2INT(key_iter); + if (!NIL_P(mac_iter)) + miter = NUM2INT(mac_iter); + if (!NIL_P(keytype)) + ktype = NUM2INT(keytype); + + p12 = PKCS12_create(passphrase, friendlyname, key, x509, x509s, + nkey, ncert, kiter, miter, ktype); + sk_X509_pop_free(x509s, X509_free); + if(!p12) ossl_raise(ePKCS12Error, NULL); + WrapPKCS12(cPKCS12, obj, p12); + + ossl_pkcs12_set_key(obj, pkey); + ossl_pkcs12_set_cert(obj, cert); + ossl_pkcs12_set_ca_certs(obj, ca); + + return obj; +} + +/* + * call-seq: + * PKCS12.new -> pkcs12 + * PKCS12.new(str) -> pkcs12 + * PKCS12.new(str, pass) -> pkcs12 + * + * === Parameters + * * +str+ - Must be a DER encoded PKCS12 string. + * * +pass+ - string + */ +static VALUE +ossl_pkcs12_initialize(int argc, VALUE *argv, VALUE self) +{ + BIO *in; + VALUE arg, pass, pkey, cert, ca; + char *passphrase; + EVP_PKEY *key; + X509 *x509; + STACK_OF(X509) *x509s = NULL; + int st = 0; + PKCS12 *pkcs = DATA_PTR(self); + + if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) return self; + passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass); + in = ossl_obj2bio(arg); + d2i_PKCS12_bio(in, &pkcs); + DATA_PTR(self) = pkcs; + BIO_free(in); + + pkey = cert = ca = Qnil; + if(!PKCS12_parse(pkcs, passphrase, &key, &x509, &x509s)) + ossl_raise(ePKCS12Error, "PKCS12_parse"); + pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key, + &st); /* NO DUP */ + if(st) goto err; + cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st); + if(st) goto err; + if(x509s){ + ca = + rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st); + if(st) goto err; + } + + err: + X509_free(x509); + sk_X509_pop_free(x509s, X509_free); + ossl_pkcs12_set_key(self, pkey); + ossl_pkcs12_set_cert(self, cert); + ossl_pkcs12_set_ca_certs(self, ca); + if(st) rb_jump_tag(st); + + return self; +} + +static VALUE +ossl_pkcs12_to_der(VALUE self) +{ + PKCS12 *p12; + VALUE str; + long len; + unsigned char *p; + + GetPKCS12(self, p12); + if((len = i2d_PKCS12(p12, NULL)) <= 0) + ossl_raise(ePKCS12Error, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_PKCS12(p12, &p) <= 0) + ossl_raise(ePKCS12Error, NULL); + ossl_str_adjust(str, p); + + return str; +} + +void +Init_ossl_pkcs12() +{ + /* + * Defines a file format commonly used to store private keys with + * accompanying public key certificates, protected with a password-based + * symmetric key. + */ + cPKCS12 = rb_define_class_under(mOSSL, "PKCS12", rb_cObject); + ePKCS12Error = rb_define_class_under(cPKCS12, "PKCS12Error", eOSSLError); + rb_define_singleton_method(cPKCS12, "create", ossl_pkcs12_s_create, -1); + + rb_define_alloc_func(cPKCS12, ossl_pkcs12_s_allocate); + rb_attr(cPKCS12, rb_intern("key"), 1, 0, Qfalse); + rb_attr(cPKCS12, rb_intern("certificate"), 1, 0, Qfalse); + rb_attr(cPKCS12, rb_intern("ca_certs"), 1, 0, Qfalse); + rb_define_method(cPKCS12, "initialize", ossl_pkcs12_initialize, -1); + rb_define_method(cPKCS12, "to_der", ossl_pkcs12_to_der, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.h new file mode 100644 index 0000000..9e81d13 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs12.h @@ -0,0 +1,15 @@ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + * $Id: ossl_pkcs12.h 12148 2007-04-05 05:59:22Z technorama $ + */ +#if !defined(_OSSL_PKCS12_H_) +#define _OSSL_PKCS12_H_ + +extern VALUE cPKCS12; +extern VALUE ePKCS12Error; + +void Init_ossl_pkcs12(void); + +#endif /* _OSSL_PKCS12_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.c new file mode 100644 index 0000000..c4476da --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.c @@ -0,0 +1,98 @@ +/* + * $Id$ + * Copyright (C) 2007 Technorama Ltd. + */ +#include "ossl.h" + +VALUE mPKCS5; +VALUE ePKCS5; + +/* + * call-seq: + * PKCS5.pbkdf2_hmac(pass, salt, iter, keylen, digest) => string + * + * === Parameters + * * +pass+ - string + * * +salt+ - string + * * +iter+ - integer - should be greater than 1000. 2000 is better. + * * +keylen+ - integer + * * +digest+ - a string or OpenSSL::Digest object. + * + * Available in OpenSSL 0.9.9?. + * + * Digests other than SHA1 may not be supported by other cryptography libraries. + */ +static VALUE +ossl_pkcs5_pbkdf2_hmac(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE keylen, VALUE digest) +{ +#ifdef HAVE_PKCS5_PBKDF2_HMAC + VALUE str; + const EVP_MD *md; + int len = NUM2INT(keylen); + + StringValue(pass); + StringValue(salt); + md = GetDigestPtr(digest); + + str = rb_str_new(0, len); + + if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass), RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), md, len, RSTRING_PTR(str)) != 1) + ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC"); + + return str; +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * PKCS5.pbkdf2_hmac_sha1(pass, salt, iter, keylen) => string + * + * === Parameters + * * +pass+ - string + * * +salt+ - string + * * +iter+ - integer - should be greater than 1000. 2000 is better. + * * +keylen+ - integer + * + * This method is available almost any version OpenSSL. + * + * Conforms to rfc2898. + */ +static VALUE +ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE keylen) +{ +#ifdef HAVE_PKCS5_PBKDF2_HMAC_SHA1 + VALUE str; + int len = NUM2INT(keylen); + + StringValue(pass); + StringValue(salt); + + str = rb_str_new(0, len); + + if (PKCS5_PBKDF2_HMAC_SHA1(RSTRING_PTR(pass), RSTRING_LEN(pass), + (const unsigned char *)RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), + len, (unsigned char *)RSTRING_PTR(str)) != 1) + ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC_SHA1"); + + return str; +#else + rb_notimplement(); +#endif +} + +void +Init_ossl_pkcs5() +{ + /* + * Password-based Encryption + * + */ + mPKCS5 = rb_define_module_under(mOSSL, "PKCS5"); + ePKCS5 = rb_define_class_under(mPKCS5, "PKCS5Error", eOSSLError); + + rb_define_module_function(mPKCS5, "pbkdf2_hmac", ossl_pkcs5_pbkdf2_hmac, 5); + rb_define_module_function(mPKCS5, "pbkdf2_hmac_sha1", ossl_pkcs5_pbkdf2_hmac_sha1, 4); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.h new file mode 100644 index 0000000..a3b132b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs5.h @@ -0,0 +1,6 @@ +#if !defined(_OSSL_PKCS5_H_) +#define _OSSL_PKCS5_H_ + +void Init_ossl_pkcs5(void); + +#endif /* _OSSL_PKCS5_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.c new file mode 100644 index 0000000..f7cd156 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.c @@ -0,0 +1,1021 @@ +/* + * $Id: ossl_pkcs7.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapPKCS7(klass, obj, pkcs7) do { \ + if (!pkcs7) { \ + ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \ + } \ + obj = Data_Wrap_Struct(klass, 0, PKCS7_free, pkcs7); \ +} while (0) +#define GetPKCS7(obj, pkcs7) do { \ + Data_Get_Struct(obj, PKCS7, pkcs7); \ + if (!pkcs7) { \ + ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \ + } \ +} while (0) +#define SafeGetPKCS7(obj, pkcs7) do { \ + OSSL_Check_Kind(obj, cPKCS7); \ + GetPKCS7(obj, pkcs7); \ +} while (0) + +#define WrapPKCS7si(klass, obj, p7si) do { \ + if (!p7si) { \ + ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \ + } \ + obj = Data_Wrap_Struct(klass, 0, PKCS7_SIGNER_INFO_free, p7si); \ +} while (0) +#define GetPKCS7si(obj, p7si) do { \ + Data_Get_Struct(obj, PKCS7_SIGNER_INFO, p7si); \ + if (!p7si) { \ + ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \ + } \ +} while (0) +#define SafeGetPKCS7si(obj, p7si) do { \ + OSSL_Check_Kind(obj, cPKCS7Signer); \ + GetPKCS7si(obj, p7si); \ +} while (0) + +#define WrapPKCS7ri(klass, obj, p7ri) do { \ + if (!p7ri) { \ + ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \ + } \ + obj = Data_Wrap_Struct(klass, 0, PKCS7_RECIP_INFO_free, p7ri); \ +} while (0) +#define GetPKCS7ri(obj, p7ri) do { \ + Data_Get_Struct(obj, PKCS7_RECIP_INFO, p7ri); \ + if (!p7ri) { \ + ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \ + } \ +} while (0) +#define SafeGetPKCS7ri(obj, p7ri) do { \ + OSSL_Check_Kind(obj, cPKCS7Recipient); \ + GetPKCS7ri(obj, p7ri); \ +} while (0) + +#define numberof(ary) (sizeof(ary)/sizeof(ary[0])) + +#define ossl_pkcs7_set_data(o,v) rb_iv_set((o), "@data", (v)) +#define ossl_pkcs7_get_data(o) rb_iv_get((o), "@data") +#define ossl_pkcs7_set_err_string(o,v) rb_iv_set((o), "@error_string", (v)) +#define ossl_pkcs7_get_err_string(o) rb_iv_get((o), "@error_string") + +/* + * Classes + */ +VALUE cPKCS7; +VALUE cPKCS7Signer; +VALUE cPKCS7Recipient; +VALUE ePKCS7Error; + +/* + * Public + * (MADE PRIVATE UNTIL SOMEBODY WILL NEED THEM) + */ +static VALUE +ossl_pkcs7si_new(PKCS7_SIGNER_INFO *p7si) +{ + PKCS7_SIGNER_INFO *pkcs7; + VALUE obj; + + pkcs7 = p7si ? PKCS7_SIGNER_INFO_dup(p7si) : PKCS7_SIGNER_INFO_new(); + if (!pkcs7) ossl_raise(ePKCS7Error, NULL); + WrapPKCS7si(cPKCS7Signer, obj, pkcs7); + + return obj; +} + +static PKCS7_SIGNER_INFO * +DupPKCS7SignerPtr(VALUE obj) +{ + PKCS7_SIGNER_INFO *p7si, *pkcs7; + + SafeGetPKCS7si(obj, p7si); + if (!(pkcs7 = PKCS7_SIGNER_INFO_dup(p7si))) { + ossl_raise(ePKCS7Error, NULL); + } + + return pkcs7; +} + +static VALUE +ossl_pkcs7ri_new(PKCS7_RECIP_INFO *p7ri) +{ + PKCS7_RECIP_INFO *pkcs7; + VALUE obj; + + pkcs7 = p7ri ? PKCS7_RECIP_INFO_dup(p7ri) : PKCS7_RECIP_INFO_new(); + if (!pkcs7) ossl_raise(ePKCS7Error, NULL); + WrapPKCS7ri(cPKCS7Recipient, obj, pkcs7); + + return obj; +} + +static PKCS7_RECIP_INFO * +DupPKCS7RecipientPtr(VALUE obj) +{ + PKCS7_RECIP_INFO *p7ri, *pkcs7; + + SafeGetPKCS7ri(obj, p7ri); + if (!(pkcs7 = PKCS7_RECIP_INFO_dup(p7ri))) { + ossl_raise(ePKCS7Error, NULL); + } + + return pkcs7; +} + +/* + * call-seq: + * PKCS7.read_smime(string) => pkcs7 + */ +static VALUE +ossl_pkcs7_s_read_smime(VALUE klass, VALUE arg) +{ + BIO *in, *out; + PKCS7 *pkcs7; + VALUE ret, data; + + in = ossl_obj2bio(arg); + out = NULL; + pkcs7 = SMIME_read_PKCS7(in, &out); + BIO_free(in); + if(!pkcs7) ossl_raise(ePKCS7Error, NULL); + data = out ? ossl_membio2str(out) : Qnil; + WrapPKCS7(cPKCS7, ret, pkcs7); + ossl_pkcs7_set_data(ret, data); + ossl_pkcs7_set_err_string(ret, Qnil); + + return ret; +} + +/* + * call-seq: + * PKCS7.write_smime(pkcs7 [, data [, flags]]) => string + */ +static VALUE +ossl_pkcs7_s_write_smime(int argc, VALUE *argv, VALUE klass) +{ + VALUE pkcs7, data, flags; + BIO *out, *in; + PKCS7 *p7; + VALUE str; + int flg; + + rb_scan_args(argc, argv, "12", &pkcs7, &data, &flags); + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + if(NIL_P(data)) data = ossl_pkcs7_get_data(pkcs7); + SafeGetPKCS7(pkcs7, p7); + if(!NIL_P(data) && PKCS7_is_detached(p7)) + flg |= PKCS7_DETACHED; + in = NIL_P(data) ? NULL : ossl_obj2bio(data); + if(!(out = BIO_new(BIO_s_mem()))){ + BIO_free(in); + ossl_raise(ePKCS7Error, NULL); + } + if(!SMIME_write_PKCS7(out, p7, in, flg)){ + BIO_free(out); + BIO_free(in); + ossl_raise(ePKCS7Error, NULL); + } + BIO_free(in); + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * PKCS7.sign(cert, key, data, [, certs [, flags]]) => pkcs7 + */ +static VALUE +ossl_pkcs7_s_sign(int argc, VALUE *argv, VALUE klass) +{ + VALUE cert, key, data, certs, flags; + X509 *x509; + EVP_PKEY *pkey; + BIO *in; + STACK_OF(X509) *x509s; + int flg, status = 0; + PKCS7 *pkcs7; + VALUE ret; + + rb_scan_args(argc, argv, "32", &cert, &key, &data, &certs, &flags); + x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */ + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + in = ossl_obj2bio(data); + if(NIL_P(certs)) x509s = NULL; + else{ + x509s = ossl_protect_x509_ary2sk(certs, &status); + if(status){ + BIO_free(in); + rb_jump_tag(status); + } + } + if(!(pkcs7 = PKCS7_sign(x509, pkey, x509s, in, flg))){ + BIO_free(in); + sk_X509_pop_free(x509s, X509_free); + ossl_raise(ePKCS7Error, NULL); + } + WrapPKCS7(cPKCS7, ret, pkcs7); + ossl_pkcs7_set_data(ret, data); + ossl_pkcs7_set_err_string(ret, Qnil); + BIO_free(in); + sk_X509_pop_free(x509s, X509_free); + + return ret; +} + +/* + * call-seq: + * PKCS7.encrypt(certs, data, [, cipher [, flags]]) => pkcs7 + */ +static VALUE +ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass) +{ + VALUE certs, data, cipher, flags; + STACK_OF(X509) *x509s; + BIO *in; + const EVP_CIPHER *ciph; + int flg, status = 0; + VALUE ret; + PKCS7 *p7; + + rb_scan_args(argc, argv, "22", &certs, &data, &cipher, &flags); + if(NIL_P(cipher)){ +#if !defined(OPENSSL_NO_RC2) + ciph = EVP_rc2_40_cbc(); +#elif !defined(OPENSSL_NO_DES) + ciph = EVP_des_ede3_cbc(); +#elif !defined(OPENSSL_NO_RC2) + ciph = EVP_rc2_40_cbc(); +#elif !defined(OPENSSL_NO_AES) + ciph = EVP_EVP_aes_128_cbc(); +#else + ossl_raise(ePKCS7Error, "Must specify cipher"); +#endif + + } + else ciph = GetCipherPtr(cipher); /* NO NEED TO DUP */ + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + in = ossl_obj2bio(data); + x509s = ossl_protect_x509_ary2sk(certs, &status); + if(status){ + BIO_free(in); + rb_jump_tag(status); + } + if(!(p7 = PKCS7_encrypt(x509s, in, (EVP_CIPHER*)ciph, flg))){ + BIO_free(in); + sk_X509_pop_free(x509s, X509_free); + ossl_raise(ePKCS7Error, NULL); + } + BIO_free(in); + WrapPKCS7(cPKCS7, ret, p7); + ossl_pkcs7_set_data(ret, data); + sk_X509_pop_free(x509s, X509_free); + + return ret; +} + +static VALUE +ossl_pkcs7_alloc(VALUE klass) +{ + PKCS7 *pkcs7; + VALUE obj; + + if (!(pkcs7 = PKCS7_new())) { + ossl_raise(ePKCS7Error, NULL); + } + WrapPKCS7(klass, obj, pkcs7); + + return obj; +} + +/* + * call-seq: + * PKCS7.new => pkcs7 + * PKCS7.new(string) => pkcs7 + * + * Many methods in this class aren't documented. + */ +static VALUE +ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self) +{ + PKCS7 *p7, *pkcs = DATA_PTR(self); + BIO *in; + VALUE arg; + + if(rb_scan_args(argc, argv, "01", &arg) == 0) + return self; + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + p7 = PEM_read_bio_PKCS7(in, &pkcs, NULL, NULL); + DATA_PTR(self) = pkcs; + if (!p7) { + (void)BIO_reset(in); + p7 = d2i_PKCS7_bio(in, &pkcs); + DATA_PTR(self) = pkcs; + } + BIO_free(in); + ossl_pkcs7_set_data(self, Qnil); + ossl_pkcs7_set_err_string(self, Qnil); + + return self; +} + +static VALUE +ossl_pkcs7_copy(VALUE self, VALUE other) +{ + PKCS7 *a, *b, *pkcs7; + + rb_check_frozen(self); + if (self == other) return self; + + GetPKCS7(self, a); + SafeGetPKCS7(other, b); + + pkcs7 = PKCS7_dup(b); + if (!pkcs7) { + ossl_raise(ePKCS7Error, NULL); + } + DATA_PTR(self) = pkcs7; + PKCS7_free(a); + + return self; +} + +static int +ossl_pkcs7_sym2typeid(VALUE sym) +{ + int i, ret = Qnil; + const char *s; + + static struct { + const char *name; + int nid; + } p7_type_tab[] = { + { "signed", NID_pkcs7_signed }, + { "data", NID_pkcs7_data }, + { "signedAndEnveloped", NID_pkcs7_signedAndEnveloped }, + { "enveloped", NID_pkcs7_enveloped }, + { "encrypted", NID_pkcs7_encrypted }, + { "digest", NID_pkcs7_digest }, + { NULL, 0 }, + }; + + if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym)); + else s = StringValuePtr(sym); + for(i = 0; i < numberof(p7_type_tab); i++){ + if(p7_type_tab[i].name == NULL) + ossl_raise(ePKCS7Error, "unknown type \"%s\"", s); + if(strcmp(p7_type_tab[i].name, s) == 0){ + ret = p7_type_tab[i].nid; + break; + } + } + + return ret; +} + +/* + * call-seq: + * pkcs7.type = type => type + */ +static VALUE +ossl_pkcs7_set_type(VALUE self, VALUE type) +{ + PKCS7 *p7; + + GetPKCS7(self, p7); + if(!PKCS7_set_type(p7, ossl_pkcs7_sym2typeid(type))) + ossl_raise(ePKCS7Error, NULL); + + return type; +} + +/* + * call-seq: + * pkcs7.type => string or nil + */ +static VALUE +ossl_pkcs7_get_type(VALUE self) +{ + PKCS7 *p7; + + GetPKCS7(self, p7); + if(PKCS7_type_is_signed(p7)) + return ID2SYM(rb_intern("signed")); + if(PKCS7_type_is_encrypted(p7)) + return ID2SYM(rb_intern("encrypted")); + if(PKCS7_type_is_enveloped(p7)) + return ID2SYM(rb_intern("enveloped")); + if(PKCS7_type_is_signedAndEnveloped(p7)) + return ID2SYM(rb_intern("signedAndEnveloped")); + if(PKCS7_type_is_data(p7)) + return ID2SYM(rb_intern("data")); + return Qnil; +} + +static VALUE +ossl_pkcs7_set_detached(VALUE self, VALUE flag) +{ + PKCS7 *p7; + + GetPKCS7(self, p7); + if(flag != Qtrue && flag != Qfalse) + ossl_raise(ePKCS7Error, "must specify a boolean"); + if(!PKCS7_set_detached(p7, flag == Qtrue ? 1 : 0)) + ossl_raise(ePKCS7Error, NULL); + + return flag; +} + +static VALUE +ossl_pkcs7_get_detached(VALUE self) +{ + PKCS7 *p7; + GetPKCS7(self, p7); + return PKCS7_get_detached(p7) ? Qtrue : Qfalse; +} + +static VALUE +ossl_pkcs7_detached_p(VALUE self) +{ + PKCS7 *p7; + GetPKCS7(self, p7); + return PKCS7_is_detached(p7) ? Qtrue : Qfalse; +} + +static VALUE +ossl_pkcs7_set_cipher(VALUE self, VALUE cipher) +{ + PKCS7 *pkcs7; + + GetPKCS7(self, pkcs7); + if (!PKCS7_set_cipher(pkcs7, GetCipherPtr(cipher))) { + ossl_raise(ePKCS7Error, NULL); + } + + return cipher; +} + +static VALUE +ossl_pkcs7_add_signer(VALUE self, VALUE signer) +{ + PKCS7 *pkcs7; + PKCS7_SIGNER_INFO *p7si; + + p7si = DupPKCS7SignerPtr(signer); /* NEED TO DUP */ + GetPKCS7(self, pkcs7); + if (!PKCS7_add_signer(pkcs7, p7si)) { + PKCS7_SIGNER_INFO_free(p7si); + ossl_raise(ePKCS7Error, "Could not add signer."); + } + if (PKCS7_type_is_signed(pkcs7)){ + PKCS7_add_signed_attribute(p7si, NID_pkcs9_contentType, + V_ASN1_OBJECT, OBJ_nid2obj(NID_pkcs7_data)); + } + + return self; +} + +static VALUE +ossl_pkcs7_get_signer(VALUE self) +{ + PKCS7 *pkcs7; + STACK_OF(PKCS7_SIGNER_INFO) *sk; + PKCS7_SIGNER_INFO *si; + int num, i; + VALUE ary; + + GetPKCS7(self, pkcs7); + if (!(sk = PKCS7_get_signer_info(pkcs7))) { + OSSL_Debug("OpenSSL::PKCS7#get_signer_info == NULL!"); + return rb_ary_new(); + } + if ((num = sk_PKCS7_SIGNER_INFO_num(sk)) < 0) { + ossl_raise(ePKCS7Error, "Negative number of signers!"); + } + ary = rb_ary_new2(num); + for (i=0; id.enveloped->recipientinfo; + else if (PKCS7_type_is_signedAndEnveloped(pkcs7)) + sk = pkcs7->d.signed_and_enveloped->recipientinfo; + else sk = NULL; + if (!sk) return rb_ary_new(); + if ((num = sk_PKCS7_RECIP_INFO_num(sk)) < 0) { + ossl_raise(ePKCS7Error, "Negative number of recipient!"); + } + ary = rb_ary_new2(num); + for (i=0; itype); + switch(i){ + case NID_pkcs7_signed: + certs = pkcs7->d.sign->cert; + crls = pkcs7->d.sign->crl; + break; + case NID_pkcs7_signedAndEnveloped: + certs = pkcs7->d.signed_and_enveloped->cert; + crls = pkcs7->d.signed_and_enveloped->crl; + break; + default: + certs = crls = NULL; + } + + return want_certs ? certs : crls; +} + +static VALUE +ossl_pkcs7_set_certs_i(VALUE i, VALUE arg) +{ + return ossl_pkcs7_add_certificate(arg, i); +} + +static VALUE +ossl_pkcs7_set_certificates(VALUE self, VALUE ary) +{ + STACK_OF(X509) *certs; + X509 *cert; + + certs = pkcs7_get_certs_or_crls(self, 1); + while((cert = sk_X509_pop(certs))) X509_free(cert); + rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_certs_i, self); + + return ary; +} + +static VALUE +ossl_pkcs7_get_certificates(VALUE self) +{ + return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1)); +} + +static VALUE +ossl_pkcs7_add_crl(VALUE self, VALUE crl) +{ + PKCS7 *pkcs7; + X509_CRL *x509crl; + + GetPKCS7(self, pkcs7); /* NO DUP needed! */ + x509crl = GetX509CRLPtr(crl); + if (!PKCS7_add_crl(pkcs7, x509crl)) { + ossl_raise(ePKCS7Error, NULL); + } + + return self; +} + +static VALUE +ossl_pkcs7_set_crls_i(VALUE i, VALUE arg) +{ + return ossl_pkcs7_add_crl(arg, i); +} + +static VALUE +ossl_pkcs7_set_crls(VALUE self, VALUE ary) +{ + STACK_OF(X509_CRL) *crls; + X509_CRL *crl; + + crls = pkcs7_get_certs_or_crls(self, 0); + while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl); + rb_block_call(ary, rb_intern("each"), 0, 0, ossl_pkcs7_set_crls_i, self); + + return ary; +} + +static VALUE +ossl_pkcs7_get_crls(VALUE self) +{ + return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0)); +} + +static VALUE +ossl_pkcs7_verify(int argc, VALUE *argv, VALUE self) +{ + VALUE certs, store, indata, flags; + STACK_OF(X509) *x509s; + X509_STORE *x509st; + int flg, ok, status = 0; + BIO *in, *out; + PKCS7 *p7; + VALUE data; + const char *msg; + + rb_scan_args(argc, argv, "22", &certs, &store, &indata, &flags); + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + if(NIL_P(indata)) indata = ossl_pkcs7_get_data(self); + in = NIL_P(indata) ? NULL : ossl_obj2bio(indata); + if(NIL_P(certs)) x509s = NULL; + else{ + x509s = ossl_protect_x509_ary2sk(certs, &status); + if(status){ + BIO_free(in); + rb_jump_tag(status); + } + } + x509st = GetX509StorePtr(store); + GetPKCS7(self, p7); + if(!(out = BIO_new(BIO_s_mem()))){ + BIO_free(in); + sk_X509_pop_free(x509s, X509_free); + ossl_raise(ePKCS7Error, NULL); + } + ok = PKCS7_verify(p7, x509s, x509st, in, out, flg); + BIO_free(in); + if (ok < 0) ossl_raise(ePKCS7Error, NULL); + msg = ERR_reason_error_string(ERR_get_error()); + ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil); + ERR_clear_error(); + data = ossl_membio2str(out); + ossl_pkcs7_set_data(self, data); + sk_X509_pop_free(x509s, X509_free); + + return (ok == 1) ? Qtrue : Qfalse; +} + +static VALUE +ossl_pkcs7_decrypt(int argc, VALUE *argv, VALUE self) +{ + VALUE pkey, cert, flags; + EVP_PKEY *key; + X509 *x509; + int flg; + PKCS7 *p7; + BIO *out; + VALUE str; + + rb_scan_args(argc, argv, "21", &pkey, &cert, &flags); + key = GetPrivPKeyPtr(pkey); /* NO NEED TO DUP */ + x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */ + flg = NIL_P(flags) ? 0 : NUM2INT(flags); + GetPKCS7(self, p7); + if(!(out = BIO_new(BIO_s_mem()))) + ossl_raise(ePKCS7Error, NULL); + if(!PKCS7_decrypt(p7, key, x509, out, flg)){ + BIO_free(out); + ossl_raise(ePKCS7Error, NULL); + } + str = ossl_membio2str(out); /* out will be free */ + + return str; +} + +static VALUE +ossl_pkcs7_add_data(VALUE self, VALUE data) +{ + PKCS7 *pkcs7; + BIO *out, *in; + char buf[4096]; + int len; + + in = ossl_obj2bio(data); + GetPKCS7(self, pkcs7); + if(PKCS7_type_is_signed(pkcs7)){ + if(!PKCS7_content_new(pkcs7, NID_pkcs7_data)) + ossl_raise(ePKCS7Error, NULL); + } + if(!(out = PKCS7_dataInit(pkcs7, NULL))) goto err; + for(;;){ + if((len = BIO_read(in, buf, sizeof(buf))) <= 0) + break; + if(BIO_write(out, buf, len) != len) + goto err; + } + if(!PKCS7_dataFinal(pkcs7, out)) goto err; + ossl_pkcs7_set_data(self, Qnil); + + err: + BIO_free(out); + BIO_free(in); + if(ERR_peek_error()){ + ossl_raise(ePKCS7Error, NULL); + } + + return data; +} + +static VALUE +ossl_pkcs7_to_der(VALUE self) +{ + PKCS7 *pkcs7; + VALUE str; + long len; + unsigned char *p; + + GetPKCS7(self, pkcs7); + if((len = i2d_PKCS7(pkcs7, NULL)) <= 0) + ossl_raise(ePKCS7Error, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_PKCS7(pkcs7, &p) <= 0) + ossl_raise(ePKCS7Error, NULL); + ossl_str_adjust(str, p); + + return str; +} + +static VALUE +ossl_pkcs7_to_pem(VALUE self) +{ + PKCS7 *pkcs7; + BIO *out; + VALUE str; + + GetPKCS7(self, pkcs7); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(ePKCS7Error, NULL); + } + if (!PEM_write_bio_PKCS7(out, pkcs7)) { + BIO_free(out); + ossl_raise(ePKCS7Error, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * SIGNER INFO + */ +static VALUE +ossl_pkcs7si_alloc(VALUE klass) +{ + PKCS7_SIGNER_INFO *p7si; + VALUE obj; + + if (!(p7si = PKCS7_SIGNER_INFO_new())) { + ossl_raise(ePKCS7Error, NULL); + } + WrapPKCS7si(klass, obj, p7si); + + return obj; +} + +static VALUE +ossl_pkcs7si_initialize(VALUE self, VALUE cert, VALUE key, VALUE digest) +{ + PKCS7_SIGNER_INFO *p7si; + EVP_PKEY *pkey; + X509 *x509; + const EVP_MD *md; + + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */ + md = GetDigestPtr(digest); + GetPKCS7si(self, p7si); + if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, (EVP_MD*)md))) { + ossl_raise(ePKCS7Error, NULL); + } + + return self; +} + +static VALUE +ossl_pkcs7si_get_issuer(VALUE self) +{ + PKCS7_SIGNER_INFO *p7si; + + GetPKCS7si(self, p7si); + + return ossl_x509name_new(p7si->issuer_and_serial->issuer); +} + +static VALUE +ossl_pkcs7si_get_serial(VALUE self) +{ + PKCS7_SIGNER_INFO *p7si; + + GetPKCS7si(self, p7si); + + return asn1integer_to_num(p7si->issuer_and_serial->serial); +} + +static VALUE +ossl_pkcs7si_get_signed_time(VALUE self) +{ + PKCS7_SIGNER_INFO *p7si; + ASN1_TYPE *asn1obj; + + GetPKCS7si(self, p7si); + + if (!(asn1obj = PKCS7_get_signed_attribute(p7si, NID_pkcs9_signingTime))) { + ossl_raise(ePKCS7Error, NULL); + } + if (asn1obj->type == V_ASN1_UTCTIME) { + return asn1time_to_time(asn1obj->value.utctime); + } + /* + * OR + * ossl_raise(ePKCS7Error, "..."); + * ? + */ + + return Qnil; +} + +/* + * RECIPIENT INFO + */ +static VALUE +ossl_pkcs7ri_alloc(VALUE klass) +{ + PKCS7_RECIP_INFO *p7ri; + VALUE obj; + + if (!(p7ri = PKCS7_RECIP_INFO_new())) { + ossl_raise(ePKCS7Error, NULL); + } + WrapPKCS7ri(klass, obj, p7ri); + + return obj; +} + +static VALUE +ossl_pkcs7ri_initialize(VALUE self, VALUE cert) +{ + PKCS7_RECIP_INFO *p7ri; + X509 *x509; + + x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */ + GetPKCS7ri(self, p7ri); + if (!PKCS7_RECIP_INFO_set(p7ri, x509)) { + ossl_raise(ePKCS7Error, NULL); + } + + return self; +} + +static VALUE +ossl_pkcs7ri_get_issuer(VALUE self) +{ + PKCS7_RECIP_INFO *p7ri; + + GetPKCS7ri(self, p7ri); + + return ossl_x509name_new(p7ri->issuer_and_serial->issuer); +} + +static VALUE +ossl_pkcs7ri_get_serial(VALUE self) +{ + PKCS7_RECIP_INFO *p7ri; + + GetPKCS7ri(self, p7ri); + + return asn1integer_to_num(p7ri->issuer_and_serial->serial); +} + +static VALUE +ossl_pkcs7ri_get_enc_key(VALUE self) +{ + PKCS7_RECIP_INFO *p7ri; + + GetPKCS7ri(self, p7ri); + + return asn1str_to_str(p7ri->enc_key); +} + +/* + * INIT + */ +void +Init_ossl_pkcs7() +{ + cPKCS7 = rb_define_class_under(mOSSL, "PKCS7", rb_cObject); + ePKCS7Error = rb_define_class_under(cPKCS7, "PKCS7Error", eOSSLError); + rb_define_singleton_method(cPKCS7, "read_smime", ossl_pkcs7_s_read_smime, 1); + rb_define_singleton_method(cPKCS7, "write_smime", ossl_pkcs7_s_write_smime, -1); + rb_define_singleton_method(cPKCS7, "sign", ossl_pkcs7_s_sign, -1); + rb_define_singleton_method(cPKCS7, "encrypt", ossl_pkcs7_s_encrypt, -1); + rb_attr(cPKCS7, rb_intern("data"), 1, 0, Qfalse); + rb_attr(cPKCS7, rb_intern("error_string"), 1, 1, Qfalse); + rb_define_alloc_func(cPKCS7, ossl_pkcs7_alloc); + rb_define_copy_func(cPKCS7, ossl_pkcs7_copy); + rb_define_method(cPKCS7, "initialize", ossl_pkcs7_initialize, -1); + rb_define_method(cPKCS7, "type=", ossl_pkcs7_set_type, 1); + rb_define_method(cPKCS7, "type", ossl_pkcs7_get_type, 0); + rb_define_method(cPKCS7, "detached=", ossl_pkcs7_set_detached, 1); + rb_define_method(cPKCS7, "detached", ossl_pkcs7_get_detached, 0); + rb_define_method(cPKCS7, "detached?", ossl_pkcs7_detached_p, 0); + rb_define_method(cPKCS7, "cipher=", ossl_pkcs7_set_cipher, 1); + rb_define_method(cPKCS7, "add_signer", ossl_pkcs7_add_signer, 1); + rb_define_method(cPKCS7, "signers", ossl_pkcs7_get_signer, 0); + rb_define_method(cPKCS7, "add_recipient", ossl_pkcs7_add_recipient, 1); + rb_define_method(cPKCS7, "recipients", ossl_pkcs7_get_recipient, 0); + rb_define_method(cPKCS7, "add_certificate", ossl_pkcs7_add_certificate, 1); + rb_define_method(cPKCS7, "certificates=", ossl_pkcs7_set_certificates, 1); + rb_define_method(cPKCS7, "certificates", ossl_pkcs7_get_certificates, 0); + rb_define_method(cPKCS7, "add_crl", ossl_pkcs7_add_crl, 1); + rb_define_method(cPKCS7, "crls=", ossl_pkcs7_set_crls, 1); + rb_define_method(cPKCS7, "crls", ossl_pkcs7_get_crls, 0); + rb_define_method(cPKCS7, "add_data", ossl_pkcs7_add_data, 1); + rb_define_alias(cPKCS7, "data=", "add_data"); + rb_define_method(cPKCS7, "verify", ossl_pkcs7_verify, -1); + rb_define_method(cPKCS7, "decrypt", ossl_pkcs7_decrypt, -1); + rb_define_method(cPKCS7, "to_pem", ossl_pkcs7_to_pem, 0); + rb_define_alias(cPKCS7, "to_s", "to_pem"); + rb_define_method(cPKCS7, "to_der", ossl_pkcs7_to_der, 0); + + cPKCS7Signer = rb_define_class_under(cPKCS7, "SignerInfo", rb_cObject); + rb_define_const(cPKCS7, "Signer", cPKCS7Signer); + rb_define_alloc_func(cPKCS7Signer, ossl_pkcs7si_alloc); + rb_define_method(cPKCS7Signer, "initialize", ossl_pkcs7si_initialize,3); + rb_define_method(cPKCS7Signer, "issuer", ossl_pkcs7si_get_issuer, 0); + rb_define_alias(cPKCS7Signer, "name", "issuer"); + rb_define_method(cPKCS7Signer, "serial", ossl_pkcs7si_get_serial,0); + rb_define_method(cPKCS7Signer,"signed_time",ossl_pkcs7si_get_signed_time,0); + + cPKCS7Recipient = rb_define_class_under(cPKCS7,"RecipientInfo",rb_cObject); + rb_define_alloc_func(cPKCS7Recipient, ossl_pkcs7ri_alloc); + rb_define_method(cPKCS7Recipient, "initialize", ossl_pkcs7ri_initialize,1); + rb_define_method(cPKCS7Recipient, "issuer", ossl_pkcs7ri_get_issuer,0); + rb_define_method(cPKCS7Recipient, "serial", ossl_pkcs7ri_get_serial,0); + rb_define_method(cPKCS7Recipient, "enc_key", ossl_pkcs7ri_get_enc_key,0); + +#define DefPKCS7Const(x) rb_define_const(cPKCS7, #x, INT2NUM(PKCS7_##x)) + + DefPKCS7Const(TEXT); + DefPKCS7Const(NOCERTS); + DefPKCS7Const(NOSIGS); + DefPKCS7Const(NOCHAIN); + DefPKCS7Const(NOINTERN); + DefPKCS7Const(NOVERIFY); + DefPKCS7Const(DETACHED); + DefPKCS7Const(BINARY); + DefPKCS7Const(NOATTR); + DefPKCS7Const(NOSMIMECAP); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.h new file mode 100644 index 0000000..f3573c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkcs7.h @@ -0,0 +1,22 @@ +/* + * $Id: ossl_pkcs7.h 12148 2007-04-05 05:59:22Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_PKCS7_H_) +#define _OSSL_PKCS7_H_ + +extern VALUE cPKCS7; +extern VALUE cPKCS7Signer; +extern VALUE cPKCS7Recipient; +extern VALUE ePKCS7Error; + +void Init_ossl_pkcs7(void); + +#endif /* _OSSL_PKCS7_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.c new file mode 100644 index 0000000..82bccce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.c @@ -0,0 +1,240 @@ +/* + * $Id: ossl_pkey.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +/* + * Classes + */ +VALUE mPKey; +VALUE cPKey; +VALUE ePKeyError; +ID id_private_q; + +/* + * callback for generating keys + */ +void +ossl_generate_cb(int p, int n, void *arg) +{ + VALUE ary; + + ary = rb_ary_new2(2); + rb_ary_store(ary, 0, INT2NUM(p)); + rb_ary_store(ary, 1, INT2NUM(n)); + + rb_yield(ary); +} + +/* + * Public + */ +VALUE +ossl_pkey_new(EVP_PKEY *pkey) +{ + if (!pkey) { + ossl_raise(ePKeyError, "Cannot make new key from NULL."); + } + switch (EVP_PKEY_type(pkey->type)) { +#if !defined(OPENSSL_NO_RSA) + case EVP_PKEY_RSA: + return ossl_rsa_new(pkey); +#endif +#if !defined(OPENSSL_NO_DSA) + case EVP_PKEY_DSA: + return ossl_dsa_new(pkey); +#endif +#if !defined(OPENSSL_NO_DH) + case EVP_PKEY_DH: + return ossl_dh_new(pkey); +#endif +#if !defined(OPENSSL_NO_EC) && (OPENSSL_VERSION_NUMBER >= 0x0090802fL) + case EVP_PKEY_EC: + return ossl_ec_new(pkey); +#endif + default: + ossl_raise(ePKeyError, "unsupported key type"); + } + return Qnil; /* not reached */ +} + +VALUE +ossl_pkey_new_from_file(VALUE filename) +{ + FILE *fp; + EVP_PKEY *pkey; + + SafeStringValue(filename); + if (!(fp = fopen(RSTRING_PTR(filename), "r"))) { + ossl_raise(ePKeyError, "%s", strerror(errno)); + } + + pkey = PEM_read_PrivateKey(fp, NULL, ossl_pem_passwd_cb, NULL); + fclose(fp); + if (!pkey) { + ossl_raise(ePKeyError, NULL); + } + + return ossl_pkey_new(pkey); +} + +EVP_PKEY * +GetPKeyPtr(VALUE obj) +{ + EVP_PKEY *pkey; + + SafeGetPKey(obj, pkey); + + return pkey; +} + +EVP_PKEY * +GetPrivPKeyPtr(VALUE obj) +{ + EVP_PKEY *pkey; + + if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) { + ossl_raise(rb_eArgError, "Private key is needed."); + } + SafeGetPKey(obj, pkey); + + return pkey; +} + +EVP_PKEY * +DupPKeyPtr(VALUE obj) +{ + EVP_PKEY *pkey; + + SafeGetPKey(obj, pkey); + CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); + + return pkey; +} + +EVP_PKEY * +DupPrivPKeyPtr(VALUE obj) +{ + EVP_PKEY *pkey; + + if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) { + ossl_raise(rb_eArgError, "Private key is needed."); + } + SafeGetPKey(obj, pkey); + CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); + + return pkey; +} + +/* + * Private + */ +static VALUE +ossl_pkey_alloc(VALUE klass) +{ + EVP_PKEY *pkey; + VALUE obj; + + if (!(pkey = EVP_PKEY_new())) { + ossl_raise(ePKeyError, NULL); + } + WrapPKey(klass, obj, pkey); + + return obj; +} + +static VALUE +ossl_pkey_initialize(VALUE self) +{ + if (rb_obj_is_instance_of(self, cPKey)) { + ossl_raise(rb_eNotImpError, "OpenSSL::PKey::PKey is an abstract class."); + } + return self; +} + +static VALUE +ossl_pkey_sign(VALUE self, VALUE digest, VALUE data) +{ + EVP_PKEY *pkey; + EVP_MD_CTX ctx; + unsigned int buf_len; + VALUE str; + + if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) { + ossl_raise(rb_eArgError, "Private key is needed."); + } + GetPKey(self, pkey); + EVP_SignInit(&ctx, GetDigestPtr(digest)); + StringValue(data); + EVP_SignUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data)); + str = rb_str_new(0, EVP_PKEY_size(pkey)+16); + if (!EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey)) + ossl_raise(ePKeyError, NULL); + assert(buf_len <= RSTRING_LEN(str)); + rb_str_set_len(str, buf_len); + + return str; +} + +static VALUE +ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data) +{ + EVP_PKEY *pkey; + EVP_MD_CTX ctx; + + GetPKey(self, pkey); + EVP_VerifyInit(&ctx, GetDigestPtr(digest)); + StringValue(sig); + StringValue(data); + EVP_VerifyUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data)); + switch (EVP_VerifyFinal(&ctx, (unsigned char *)RSTRING_PTR(sig), RSTRING_LEN(sig), pkey)) { + case 0: + return Qfalse; + case 1: + return Qtrue; + default: + ossl_raise(ePKeyError, NULL); + } + return Qnil; /* dummy */ +} + +/* + * INIT + */ +void +Init_ossl_pkey() +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + mPKey = rb_define_module_under(mOSSL, "PKey"); + + ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError); + + cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject); + + rb_define_alloc_func(cPKey, ossl_pkey_alloc); + rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0); + + rb_define_method(cPKey, "sign", ossl_pkey_sign, 2); + rb_define_method(cPKey, "verify", ossl_pkey_verify, 3); + + id_private_q = rb_intern("private?"); + + /* + * INIT rsa, dsa, dh, ec + */ + Init_ossl_rsa(); + Init_ossl_dsa(); + Init_ossl_dh(); + Init_ossl_ec(); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.h new file mode 100644 index 0000000..68ba37b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey.h @@ -0,0 +1,141 @@ +/* + * $Id: ossl_pkey.h 12139 2007-04-03 07:02:44Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_PKEY_H_) +#define _OSSL_PKEY_H_ + +extern VALUE mPKey; +extern VALUE cPKey; +extern VALUE ePKeyError; +extern ID id_private_q; + +#define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue) +#define OSSL_PKEY_SET_PUBLIC(obj) rb_iv_set((obj), "private", Qfalse) +#define OSSL_PKEY_IS_PRIVATE(obj) (rb_iv_get((obj), "private") == Qtrue) + +#define WrapPKey(klass, obj, pkey) do { \ + if (!pkey) { \ + rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, EVP_PKEY_free, pkey); \ + OSSL_PKEY_SET_PUBLIC(obj); \ +} while (0) +#define GetPKey(obj, pkey) do {\ + Data_Get_Struct(obj, EVP_PKEY, pkey);\ + if (!pkey) { \ + rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!");\ + } \ +} while (0) +#define SafeGetPKey(obj, pkey) do { \ + OSSL_Check_Kind(obj, cPKey); \ + GetPKey(obj, pkey); \ +} while (0) + +void ossl_generate_cb(int, int, void *); + +VALUE ossl_pkey_new(EVP_PKEY *); +VALUE ossl_pkey_new_from_file(VALUE); +EVP_PKEY *GetPKeyPtr(VALUE); +EVP_PKEY *DupPKeyPtr(VALUE); +EVP_PKEY *GetPrivPKeyPtr(VALUE); +EVP_PKEY *DupPrivPKeyPtr(VALUE); +void Init_ossl_pkey(void); + +/* + * RSA + */ +extern VALUE cRSA; +extern VALUE eRSAError; + +VALUE ossl_rsa_new(EVP_PKEY *); +void Init_ossl_rsa(void); + +/* + * DSA + */ +extern VALUE cDSA; +extern VALUE eDSAError; + +VALUE ossl_dsa_new(EVP_PKEY *); +void Init_ossl_dsa(void); + +/* + * DH + */ +extern VALUE cDH; +extern VALUE eDHError; +extern DH *OSSL_DEFAULT_DH_512; +extern DH *OSSL_DEFAULT_DH_1024; + +VALUE ossl_dh_new(EVP_PKEY *); +void Init_ossl_dh(void); + +/* + * EC + */ +extern VALUE cEC; +extern VALUE eECError; +extern VALUE cEC_GROUP; +extern VALUE eEC_GROUP; +extern VALUE cEC_POINT; +extern VALUE eEC_POINT; +VALUE ossl_ec_new(EVP_PKEY *); +void Init_ossl_ec(void); + + +#define OSSL_PKEY_BN(keytype, name) \ +/* \ + * call-seq: \ + * key.##name -> aBN \ + */ \ +static VALUE ossl_##keytype##_get_##name(VALUE self) \ +{ \ + EVP_PKEY *pkey; \ + BIGNUM *bn; \ + \ + GetPKey(self, pkey); \ + bn = pkey->pkey.keytype->name; \ + if (bn == NULL) \ + return Qnil; \ + return ossl_bn_new(bn); \ +} \ +/* \ + * call-seq: \ + * key.##name = bn -> bn \ + */ \ +static VALUE ossl_##keytype##_set_##name(VALUE self, VALUE bignum) \ +{ \ + EVP_PKEY *pkey; \ + BIGNUM *bn; \ + \ + GetPKey(self, pkey); \ + if (NIL_P(bignum)) { \ + BN_clear_free(pkey->pkey.keytype->name); \ + pkey->pkey.keytype->name = NULL; \ + return Qnil; \ + } \ + \ + bn = GetBNPtr(bignum); \ + if (pkey->pkey.keytype->name == NULL) \ + pkey->pkey.keytype->name = BN_new(); \ + if (pkey->pkey.keytype->name == NULL) \ + ossl_raise(eBNError, NULL); \ + if (BN_copy(pkey->pkey.keytype->name, bn) == NULL) \ + ossl_raise(eBNError, NULL); \ + return bignum; \ +} + +#define DEF_OSSL_PKEY_BN(class, keytype, name) \ +do { \ + rb_define_method(class, #name, ossl_##keytype##_get_##name, 0); \ + rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1);\ +} while (0) + +#endif /* _OSSL_PKEY_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dh.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dh.c new file mode 100644 index 0000000..5007f02 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dh.c @@ -0,0 +1,532 @@ +/* + * $Id: ossl_pkey_dh.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(OPENSSL_NO_DH) + +#include "ossl.h" + +#define GetPKeyDH(obj, pkey) do { \ + GetPKey(obj, pkey); \ + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) { /* PARANOIA? */ \ + ossl_raise(rb_eRuntimeError, "THIS IS NOT A DH!") ; \ + } \ +} while (0) + +#define DH_HAS_PRIVATE(dh) ((dh)->priv_key) + +#ifdef OSSL_ENGINE_ENABLED +# define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine) +#else +# define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh) +#endif + + +/* + * Classes + */ +VALUE cDH; +VALUE eDHError; + +/* + * Public + */ +static VALUE +dh_instance(VALUE klass, DH *dh) +{ + EVP_PKEY *pkey; + VALUE obj; + + if (!dh) { + return Qfalse; + } + if (!(pkey = EVP_PKEY_new())) { + return Qfalse; + } + if (!EVP_PKEY_assign_DH(pkey, dh)) { + EVP_PKEY_free(pkey); + return Qfalse; + } + WrapPKey(klass, obj, pkey); + + return obj; +} + +VALUE +ossl_dh_new(EVP_PKEY *pkey) +{ + VALUE obj; + + if (!pkey) { + obj = dh_instance(cDH, DH_new()); + } else { + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) { + ossl_raise(rb_eTypeError, "Not a DH key!"); + } + WrapPKey(cDH, obj, pkey); + } + if (obj == Qfalse) { + ossl_raise(eDHError, NULL); + } + + return obj; +} + +/* + * Private + */ +static DH * +dh_generate(int size, int gen) +{ + DH *dh; + + dh = DH_generate_parameters(size, gen, + rb_block_given_p() ? ossl_generate_cb : NULL, + NULL); + if (!dh) return 0; + + if (!DH_generate_key(dh)) { + DH_free(dh); + return 0; + } + + return dh; +} + +/* + * call-seq: + * DH.generate(size [, generator]) -> dh + * + * === Parameters + * * +size+ is an integer representing the desired key size. Keys smaller than 1024 should be considered insecure. + * * +generator+ is a small number > 1, typically 2 or 5. + * + */ +static VALUE +ossl_dh_s_generate(int argc, VALUE *argv, VALUE klass) +{ + DH *dh ; + int g = 2; + VALUE size, gen, obj; + + if (rb_scan_args(argc, argv, "11", &size, &gen) == 2) { + g = NUM2INT(gen); + } + dh = dh_generate(NUM2INT(size), g); + obj = dh_instance(klass, dh); + if (obj == Qfalse) { + DH_free(dh); + ossl_raise(eDHError, NULL); + } + + return obj; +} + +/* + * call-seq: + * DH.new([size [, generator] | string]) -> dh + * + * === Parameters + * * +size+ is an integer representing the desired key size. Keys smaller than 1024 should be considered insecure. + * * +generator+ is a small number > 1, typically 2 or 5. + * * +string+ contains the DER or PEM encoded key. + * + * === Examples + * * DH.new -> dh + * * DH.new(1024) -> dh + * * DH.new(1024, 5) -> dh + * * DH.new(File.read('key.pem')) -> dh + */ +static VALUE +ossl_dh_initialize(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + DH *dh; + int g = 2; + BIO *in; + VALUE arg, gen; + + GetPKey(self, pkey); + if(rb_scan_args(argc, argv, "02", &arg, &gen) == 0) { + dh = DH_new(); + } + else if (FIXNUM_P(arg)) { + if (!NIL_P(gen)) { + g = NUM2INT(gen); + } + if (!(dh = dh_generate(FIX2INT(arg), g))) { + ossl_raise(eDHError, NULL); + } + } + else { + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); + if (!dh){ + (void)BIO_reset(in); + dh = d2i_DHparams_bio(in, NULL); + } + BIO_free(in); + if (!dh) ossl_raise(eDHError, NULL); + } + if (!EVP_PKEY_assign_DH(pkey, dh)) { + DH_free(dh); + ossl_raise(eDHError, NULL); + } + return self; +} + +/* + * call-seq: + * dh.public? -> true | false + * + */ +static VALUE +ossl_dh_is_public(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyDH(self, pkey); + + return (pkey->pkey.dh->pub_key) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * dh.private? -> true | false + * + */ +static VALUE +ossl_dh_is_private(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyDH(self, pkey); + + return (DH_PRIVATE(pkey->pkey.dh)) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * dh.to_pem -> aString + * + */ +static VALUE +ossl_dh_export(VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + VALUE str; + + GetPKeyDH(self, pkey); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eDHError, NULL); + } + if (!PEM_write_bio_DHparams(out, pkey->pkey.dh)) { + BIO_free(out); + ossl_raise(eDHError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * dh.to_der -> aString + * + */ +static VALUE +ossl_dh_to_der(VALUE self) +{ + EVP_PKEY *pkey; + unsigned char *p; + long len; + VALUE str; + + GetPKeyDH(self, pkey); + if((len = i2d_DHparams(pkey->pkey.dh, NULL)) <= 0) + ossl_raise(eDHError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_DHparams(pkey->pkey.dh, &p) < 0) + ossl_raise(eDHError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * call-seq: + * dh.params -> hash + * + * Stores all parameters of key to the hash + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (I's up to you) + */ +static VALUE +ossl_dh_get_params(VALUE self) +{ + EVP_PKEY *pkey; + VALUE hash; + + GetPKeyDH(self, pkey); + + hash = rb_hash_new(); + + rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p)); + rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g)); + rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key)); + rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key)); + + return hash; +} + +/* + * call-seq: + * dh.to_text -> aString + * + * Prints all parameters of key to buffer + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (I's up to you) + */ +static VALUE +ossl_dh_to_text(VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + VALUE str; + + GetPKeyDH(self, pkey); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eDHError, NULL); + } + if (!DHparams_print(out, pkey->pkey.dh)) { + BIO_free(out); + ossl_raise(eDHError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * dh.public_key -> aDH + * + * Makes new instance DH PUBLIC_KEY from PRIVATE_KEY + */ +static VALUE +ossl_dh_to_public_key(VALUE self) +{ + EVP_PKEY *pkey; + DH *dh; + VALUE obj; + + GetPKeyDH(self, pkey); + dh = DHparams_dup(pkey->pkey.dh); /* err check perfomed by dh_instance */ + obj = dh_instance(CLASS_OF(self), dh); + if (obj == Qfalse) { + DH_free(dh); + ossl_raise(eDHError, NULL); + } + + return obj; +} + +/* + * call-seq: + * dh.check_params -> true | false + * + */ +static VALUE +ossl_dh_check_params(VALUE self) +{ + DH *dh; + EVP_PKEY *pkey; + int codes; + + GetPKeyDH(self, pkey); + dh = pkey->pkey.dh; + + if (!DH_check(dh, &codes)) { + return Qfalse; + } + + return codes == 0 ? Qtrue : Qfalse; +} + +/* + * call-seq: + * dh.generate_key -> self + * + */ +static VALUE +ossl_dh_generate_key(VALUE self) +{ + DH *dh; + EVP_PKEY *pkey; + + GetPKeyDH(self, pkey); + dh = pkey->pkey.dh; + + if (!DH_generate_key(dh)) + ossl_raise(eDHError, "Failed to generate key"); + return self; +} + +/* + * call-seq: + * dh.compute_key(pub_bn) -> aString + * + * === Parameters + * * +pub_bn+ is a OpenSSL::BN. + * + * Returns aString containing a shared secret computed from the other parties public value. + * + * See DH_compute_key() for further information. + * + */ +static VALUE +ossl_dh_compute_key(VALUE self, VALUE pub) +{ + DH *dh; + EVP_PKEY *pkey; + BIGNUM *pub_key; + VALUE str; + int len; + + GetPKeyDH(self, pkey); + dh = pkey->pkey.dh; + pub_key = GetBNPtr(pub); + len = DH_size(dh); + str = rb_str_new(0, len); + if ((len = DH_compute_key((unsigned char *)RSTRING_PTR(str), pub_key, dh)) < 0) { + ossl_raise(eDHError, NULL); + } + rb_str_set_len(str, len); + + return str; +} + +OSSL_PKEY_BN(dh, p); +OSSL_PKEY_BN(dh, g); +OSSL_PKEY_BN(dh, pub_key); +OSSL_PKEY_BN(dh, priv_key); + +/* + * -----BEGIN DH PARAMETERS----- + * MEYCQQD0zXHljRg/mJ9PYLACLv58Cd8VxBxxY7oEuCeURMiTqEhMym16rhhKgZG2 + * zk2O9uUIBIxSj+NKMURHGaFKyIvLAgEC + * -----END DH PARAMETERS----- + */ +static unsigned char DEFAULT_DH_512_PRIM[] = { + 0xf4, 0xcd, 0x71, 0xe5, 0x8d, 0x18, 0x3f, 0x98, + 0x9f, 0x4f, 0x60, 0xb0, 0x02, 0x2e, 0xfe, 0x7c, + 0x09, 0xdf, 0x15, 0xc4, 0x1c, 0x71, 0x63, 0xba, + 0x04, 0xb8, 0x27, 0x94, 0x44, 0xc8, 0x93, 0xa8, + 0x48, 0x4c, 0xca, 0x6d, 0x7a, 0xae, 0x18, 0x4a, + 0x81, 0x91, 0xb6, 0xce, 0x4d, 0x8e, 0xf6, 0xe5, + 0x08, 0x04, 0x8c, 0x52, 0x8f, 0xe3, 0x4a, 0x31, + 0x44, 0x47, 0x19, 0xa1, 0x4a, 0xc8, 0x8b, 0xcb, +}; +static unsigned char DEFAULT_DH_512_GEN[] = { 0x02 }; +DH *OSSL_DEFAULT_DH_512 = NULL; + +/* + * -----BEGIN DH PARAMETERS----- + * MIGHAoGBAJ0lOVy0VIr/JebWn0zDwY2h+rqITFOpdNr6ugsgvkDXuucdcChhYExJ + * AV/ZD2AWPbrTqV76mGRgJg4EddgT1zG0jq3rnFdMj2XzkBYx3BVvfR0Arnby0RHR + * T4h7KZ/2zmjvV+eF8kBUHBJAojUlzxKj4QeO2x20FP9X5xmNUXeDAgEC + * -----END DH PARAMETERS----- + */ +static unsigned char DEFAULT_DH_1024_PRIM[] = { + 0x9d, 0x25, 0x39, 0x5c, 0xb4, 0x54, 0x8a, 0xff, + 0x25, 0xe6, 0xd6, 0x9f, 0x4c, 0xc3, 0xc1, 0x8d, + 0xa1, 0xfa, 0xba, 0x88, 0x4c, 0x53, 0xa9, 0x74, + 0xda, 0xfa, 0xba, 0x0b, 0x20, 0xbe, 0x40, 0xd7, + 0xba, 0xe7, 0x1d, 0x70, 0x28, 0x61, 0x60, 0x4c, + 0x49, 0x01, 0x5f, 0xd9, 0x0f, 0x60, 0x16, 0x3d, + 0xba, 0xd3, 0xa9, 0x5e, 0xfa, 0x98, 0x64, 0x60, + 0x26, 0x0e, 0x04, 0x75, 0xd8, 0x13, 0xd7, 0x31, + 0xb4, 0x8e, 0xad, 0xeb, 0x9c, 0x57, 0x4c, 0x8f, + 0x65, 0xf3, 0x90, 0x16, 0x31, 0xdc, 0x15, 0x6f, + 0x7d, 0x1d, 0x00, 0xae, 0x76, 0xf2, 0xd1, 0x11, + 0xd1, 0x4f, 0x88, 0x7b, 0x29, 0x9f, 0xf6, 0xce, + 0x68, 0xef, 0x57, 0xe7, 0x85, 0xf2, 0x40, 0x54, + 0x1c, 0x12, 0x40, 0xa2, 0x35, 0x25, 0xcf, 0x12, + 0xa3, 0xe1, 0x07, 0x8e, 0xdb, 0x1d, 0xb4, 0x14, + 0xff, 0x57, 0xe7, 0x19, 0x8d, 0x51, 0x77, 0x83 +}; +static unsigned char DEFAULT_DH_1024_GEN[] = { 0x02 }; +DH *OSSL_DEFAULT_DH_1024 = NULL; + +static DH* +ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen) +{ + DH *dh; + + if ((dh = DH_new()) == NULL) ossl_raise(eDHError, NULL); + dh->p = BN_bin2bn(p, plen, NULL); + dh->g = BN_bin2bn(g, glen, NULL); + if (dh->p == NULL || dh->g == NULL){ + DH_free(dh); + ossl_raise(eDHError, NULL); + } + + return dh; +} + +/* + * INIT + */ +void +Init_ossl_dh() +{ +#if 0 /* let rdoc know about mOSSL and mPKey */ + mOSSL = rb_define_module("OpenSSL"); + mPKey = rb_define_module_under(mOSSL, "PKey"); +#endif + + eDHError = rb_define_class_under(mPKey, "DHError", ePKeyError); + cDH = rb_define_class_under(mPKey, "DH", cPKey); + rb_define_singleton_method(cDH, "generate", ossl_dh_s_generate, -1); + rb_define_method(cDH, "initialize", ossl_dh_initialize, -1); + rb_define_method(cDH, "public?", ossl_dh_is_public, 0); + rb_define_method(cDH, "private?", ossl_dh_is_private, 0); + rb_define_method(cDH, "to_text", ossl_dh_to_text, 0); + rb_define_method(cDH, "export", ossl_dh_export, 0); + rb_define_alias(cDH, "to_pem", "export"); + rb_define_alias(cDH, "to_s", "export"); + rb_define_method(cDH, "to_der", ossl_dh_to_der, 0); + rb_define_method(cDH, "public_key", ossl_dh_to_public_key, 0); + rb_define_method(cDH, "params_ok?", ossl_dh_check_params, 0); + rb_define_method(cDH, "generate_key!", ossl_dh_generate_key, 0); + rb_define_method(cDH, "compute_key", ossl_dh_compute_key, 1); + DEF_OSSL_PKEY_BN(cDH, dh, p); + DEF_OSSL_PKEY_BN(cDH, dh, g); + DEF_OSSL_PKEY_BN(cDH, dh, pub_key); + DEF_OSSL_PKEY_BN(cDH, dh, priv_key); + rb_define_method(cDH, "params", ossl_dh_get_params, 0); + + OSSL_DEFAULT_DH_512 = ossl_create_dh( + DEFAULT_DH_512_PRIM, sizeof(DEFAULT_DH_512_PRIM), + DEFAULT_DH_512_GEN, sizeof(DEFAULT_DH_512_GEN)); + OSSL_DEFAULT_DH_1024 = ossl_create_dh( + DEFAULT_DH_1024_PRIM, sizeof(DEFAULT_DH_1024_PRIM), + DEFAULT_DH_1024_GEN, sizeof(DEFAULT_DH_1024_GEN)); +} + +#else /* defined NO_DH */ +void +Init_ossl_dh() +{ +} +#endif /* NO_DH */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dsa.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dsa.c new file mode 100644 index 0000000..7598ece --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_dsa.c @@ -0,0 +1,485 @@ +/* + * $Id: ossl_pkey_dsa.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(OPENSSL_NO_DSA) + +#include "ossl.h" + +#define GetPKeyDSA(obj, pkey) do { \ + GetPKey(obj, pkey); \ + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \ + ossl_raise(rb_eRuntimeError, "THIS IS NOT A DSA!"); \ + } \ +} while (0) + +#define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key) +#define DSA_PRIVATE(obj,dsa) (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj)) + +/* + * Classes + */ +VALUE cDSA; +VALUE eDSAError; + +/* + * Public + */ +static VALUE +dsa_instance(VALUE klass, DSA *dsa) +{ + EVP_PKEY *pkey; + VALUE obj; + + if (!dsa) { + return Qfalse; + } + if (!(pkey = EVP_PKEY_new())) { + return Qfalse; + } + if (!EVP_PKEY_assign_DSA(pkey, dsa)) { + EVP_PKEY_free(pkey); + return Qfalse; + } + WrapPKey(klass, obj, pkey); + + return obj; +} + +VALUE +ossl_dsa_new(EVP_PKEY *pkey) +{ + VALUE obj; + + if (!pkey) { + obj = dsa_instance(cDSA, DSA_new()); + } else { + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { + ossl_raise(rb_eTypeError, "Not a DSA key!"); + } + WrapPKey(cDSA, obj, pkey); + } + if (obj == Qfalse) { + ossl_raise(eDSAError, NULL); + } + + return obj; +} + +/* + * Private + */ +static DSA * +dsa_generate(int size) +{ + DSA *dsa; + unsigned char seed[20]; + int seed_len = 20, counter; + unsigned long h; + + if (!RAND_bytes(seed, seed_len)) { + return 0; + } + dsa = DSA_generate_parameters(size, seed, seed_len, &counter, &h, + rb_block_given_p() ? ossl_generate_cb : NULL, + NULL); + if(!dsa) return 0; + + if (!DSA_generate_key(dsa)) { + DSA_free(dsa); + return 0; + } + + return dsa; +} + +/* + * call-seq: + * DSA.generate(size) -> dsa + * + * === Parameters + * * +size+ is an integer representing the desired key size. + * + */ +static VALUE +ossl_dsa_s_generate(VALUE klass, VALUE size) +{ + DSA *dsa = dsa_generate(NUM2INT(size)); /* err handled by dsa_instance */ + VALUE obj = dsa_instance(klass, dsa); + + if (obj == Qfalse) { + DSA_free(dsa); + ossl_raise(eDSAError, NULL); + } + + return obj; +} + +/* + * call-seq: + * DSA.new([size | string [, pass]) -> dsa + * + * === Parameters + * * +size+ is an integer representing the desired key size. + * * +string+ contains a DER or PEM encoded key. + * * +pass+ is a string that contains a optional password. + * + * === Examples + * * DSA.new -> dsa + * * DSA.new(1024) -> dsa + * * DSA.new(File.read('dsa.pem')) -> dsa + * * DSA.new(File.read('dsa.pem'), 'mypassword') -> dsa + * + */ +static VALUE +ossl_dsa_initialize(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + DSA *dsa; + BIO *in; + char *passwd = NULL; + VALUE arg, pass; + + GetPKey(self, pkey); + if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) { + dsa = DSA_new(); + } + else if (FIXNUM_P(arg)) { + if (!(dsa = dsa_generate(FIX2INT(arg)))) { + ossl_raise(eDSAError, NULL); + } + } + else { + if (!NIL_P(pass)) passwd = StringValuePtr(pass); + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); + if (!dsa) { + (void)BIO_reset(in); + dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL); + } + if (!dsa) { + (void)BIO_reset(in); + dsa = PEM_read_bio_DSA_PUBKEY(in, NULL, NULL, NULL); + } + if (!dsa) { + (void)BIO_reset(in); + dsa = d2i_DSAPrivateKey_bio(in, NULL); + } + if (!dsa) { + (void)BIO_reset(in); + dsa = d2i_DSA_PUBKEY_bio(in, NULL); + } + BIO_free(in); + if (!dsa) ossl_raise(eDSAError, "Neither PUB key nor PRIV key:"); + } + if (!EVP_PKEY_assign_DSA(pkey, dsa)) { + DSA_free(dsa); + ossl_raise(eDSAError, NULL); + } + + return self; +} + +/* + * call-seq: + * dsa.public? -> true | false + * + */ +static VALUE +ossl_dsa_is_public(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyDSA(self, pkey); + + return (pkey->pkey.dsa->pub_key) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * dsa.private? -> true | false + * + */ +static VALUE +ossl_dsa_is_private(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyDSA(self, pkey); + + return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * dsa.to_pem([cipher, password]) -> aString + * + * === Parameters + * +cipher+ is an OpenSSL::Cipher. + * +password+ is a string containing your password. + * + * === Examples + * * DSA.to_pem -> aString + * * DSA.to_pem(cipher, 'mypassword') -> aString + * + */ +static VALUE +ossl_dsa_export(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + const EVP_CIPHER *ciph = NULL; + char *passwd = NULL; + VALUE cipher, pass, str; + + GetPKeyDSA(self, pkey); + rb_scan_args(argc, argv, "02", &cipher, &pass); + if (!NIL_P(cipher)) { + ciph = GetCipherPtr(cipher); + if (!NIL_P(pass)) { + passwd = StringValuePtr(pass); + } + } + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eDSAError, NULL); + } + if (DSA_HAS_PRIVATE(pkey->pkey.dsa)) { + if (!PEM_write_bio_DSAPrivateKey(out, pkey->pkey.dsa, ciph, + NULL, 0, ossl_pem_passwd_cb, passwd)){ + BIO_free(out); + ossl_raise(eDSAError, NULL); + } + } else { + if (!PEM_write_bio_DSAPublicKey(out, pkey->pkey.dsa)) { + BIO_free(out); + ossl_raise(eDSAError, NULL); + } + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * dsa.to_der -> aString + * + */ +static VALUE +ossl_dsa_to_der(VALUE self) +{ + EVP_PKEY *pkey; + int (*i2d_func)_((DSA*, unsigned char**)); + unsigned char *p; + long len; + VALUE str; + + GetPKeyDSA(self, pkey); + if(DSA_HAS_PRIVATE(pkey->pkey.dsa)) + i2d_func = (int(*)_((DSA*,unsigned char**)))i2d_DSAPrivateKey; + else + i2d_func = i2d_DSA_PUBKEY; + if((len = i2d_func(pkey->pkey.dsa, NULL)) <= 0) + ossl_raise(eDSAError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_func(pkey->pkey.dsa, &p) < 0) + ossl_raise(eDSAError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * call-seq: + * dsa.params -> hash + * + * Stores all parameters of key to the hash + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (I's up to you) + */ +static VALUE +ossl_dsa_get_params(VALUE self) +{ + EVP_PKEY *pkey; + VALUE hash; + + GetPKeyDSA(self, pkey); + + hash = rb_hash_new(); + + rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p)); + rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q)); + rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g)); + rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key)); + rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key)); + + return hash; +} + +/* + * call-seq: + * dsa.to_text -> aString + * + * Prints all parameters of key to buffer + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (I's up to you) + */ +static VALUE +ossl_dsa_to_text(VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + VALUE str; + + GetPKeyDSA(self, pkey); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eDSAError, NULL); + } + if (!DSA_print(out, pkey->pkey.dsa, 0)) { /* offset = 0 */ + BIO_free(out); + ossl_raise(eDSAError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * dsa.public_key -> aDSA + * + * Makes new instance DSA PUBLIC_KEY from PRIVATE_KEY + */ +static VALUE +ossl_dsa_to_public_key(VALUE self) +{ + EVP_PKEY *pkey; + DSA *dsa; + VALUE obj; + + GetPKeyDSA(self, pkey); + /* err check performed by dsa_instance */ + dsa = DSAPublicKey_dup(pkey->pkey.dsa); + obj = dsa_instance(CLASS_OF(self), dsa); + if (obj == Qfalse) { + DSA_free(dsa); + ossl_raise(eDSAError, NULL); + } + return obj; +} + +#define ossl_dsa_buf_size(pkey) (DSA_size((pkey)->pkey.dsa)+16) + +/* + * call-seq: + * dsa.syssign(string) -> aString + * + */ +static VALUE +ossl_dsa_sign(VALUE self, VALUE data) +{ + EVP_PKEY *pkey; + unsigned int buf_len; + VALUE str; + + GetPKeyDSA(self, pkey); + StringValue(data); + if (!DSA_PRIVATE(self, pkey->pkey.dsa)) { + ossl_raise(eDSAError, "Private DSA key needed!"); + } + str = rb_str_new(0, ossl_dsa_buf_size(pkey)); + if (!DSA_sign(0, (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), + (unsigned char *)RSTRING_PTR(str), + &buf_len, pkey->pkey.dsa)) { /* type is ignored (0) */ + ossl_raise(eDSAError, NULL); + } + rb_str_set_len(str, buf_len); + + return str; +} + +/* + * call-seq: + * dsa.sysverify(digest, sig) -> true | false + * + */ +static VALUE +ossl_dsa_verify(VALUE self, VALUE digest, VALUE sig) +{ + EVP_PKEY *pkey; + int ret; + + GetPKeyDSA(self, pkey); + StringValue(digest); + StringValue(sig); + /* type is ignored (0) */ + ret = DSA_verify(0, (unsigned char *)RSTRING_PTR(digest), RSTRING_LEN(digest), + (unsigned char *)RSTRING_PTR(sig), RSTRING_LEN(sig), pkey->pkey.dsa); + if (ret < 0) { + ossl_raise(eDSAError, NULL); + } + else if (ret == 1) { + return Qtrue; + } + + return Qfalse; +} + +OSSL_PKEY_BN(dsa, p); +OSSL_PKEY_BN(dsa, q); +OSSL_PKEY_BN(dsa, g); +OSSL_PKEY_BN(dsa, pub_key); +OSSL_PKEY_BN(dsa, priv_key); + +/* + * INIT + */ +void +Init_ossl_dsa() +{ +#if 0 /* let rdoc know about mOSSL and mPKey */ + mOSSL = rb_define_module("OpenSSL"); + mPKey = rb_define_module_under(mOSSL, "PKey"); +#endif + + eDSAError = rb_define_class_under(mPKey, "DSAError", ePKeyError); + + cDSA = rb_define_class_under(mPKey, "DSA", cPKey); + + rb_define_singleton_method(cDSA, "generate", ossl_dsa_s_generate, 1); + rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1); + + rb_define_method(cDSA, "public?", ossl_dsa_is_public, 0); + rb_define_method(cDSA, "private?", ossl_dsa_is_private, 0); + rb_define_method(cDSA, "to_text", ossl_dsa_to_text, 0); + rb_define_method(cDSA, "export", ossl_dsa_export, -1); + rb_define_alias(cDSA, "to_pem", "export"); + rb_define_alias(cDSA, "to_s", "export"); + rb_define_method(cDSA, "to_der", ossl_dsa_to_der, 0); + rb_define_method(cDSA, "public_key", ossl_dsa_to_public_key, 0); + rb_define_method(cDSA, "syssign", ossl_dsa_sign, 1); + rb_define_method(cDSA, "sysverify", ossl_dsa_verify, 2); + + DEF_OSSL_PKEY_BN(cDSA, dsa, p); + DEF_OSSL_PKEY_BN(cDSA, dsa, q); + DEF_OSSL_PKEY_BN(cDSA, dsa, g); + DEF_OSSL_PKEY_BN(cDSA, dsa, pub_key); + DEF_OSSL_PKEY_BN(cDSA, dsa, priv_key); + + rb_define_method(cDSA, "params", ossl_dsa_get_params, 0); +} + +#else /* defined NO_DSA */ +void +Init_ossl_dsa() +{ +} +#endif /* NO_DSA */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_ec.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_ec.c new file mode 100644 index 0000000..caa140d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_ec.c @@ -0,0 +1,1593 @@ +/* + * Copyright (C) 2006-2007 Technorama Ltd. + */ + +#include "ossl.h" + +#if !defined(OPENSSL_NO_EC) && (OPENSSL_VERSION_NUMBER >= 0x0090802fL) + +typedef struct { + EC_GROUP *group; + int dont_free; +} ossl_ec_group; + +typedef struct { + EC_POINT *point; + int dont_free; +} ossl_ec_point; + + +#define EXPORT_PEM 0 +#define EXPORT_DER 1 + + +#define GetPKeyEC(obj, pkey) do { \ + GetPKey(obj, pkey); \ + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_EC) { \ + ossl_raise(rb_eRuntimeError, "THIS IS NOT A EC PKEY!"); \ + } \ +} while (0) + +#define SafeGet_ec_group(obj, group) do { \ + OSSL_Check_Kind(obj, cEC_GROUP); \ + Data_Get_Struct(obj, ossl_ec_group, group); \ +} while(0) + +#define Get_EC_KEY(obj, key) do { \ + EVP_PKEY *pkey; \ + GetPKeyEC(obj, pkey); \ + key = pkey->pkey.ec; \ +} while(0) + +#define Require_EC_KEY(obj, key) do { \ + Get_EC_KEY(obj, key); \ + if (key == NULL) \ + rb_raise(eECError, "EC_KEY is not initialized"); \ +} while(0) + +#define SafeRequire_EC_KEY(obj, key) do { \ + OSSL_Check_Kind(obj, cEC); \ + Require_EC_KEY(obj, key); \ +} while (0) + +#define Get_EC_GROUP(obj, g) do { \ + ossl_ec_group *ec_group; \ + Data_Get_Struct(obj, ossl_ec_group, ec_group); \ + if (ec_group == NULL) \ + rb_raise(eEC_GROUP, "missing ossl_ec_group structure"); \ + g = ec_group->group; \ +} while(0) + +#define Require_EC_GROUP(obj, group) do { \ + Get_EC_GROUP(obj, group); \ + if (group == NULL) \ + rb_raise(eEC_GROUP, "EC_GROUP is not initialized"); \ +} while(0) + +#define SafeRequire_EC_GROUP(obj, group) do { \ + OSSL_Check_Kind(obj, cEC_GROUP); \ + Require_EC_GROUP(obj, group); \ +} while(0) + +#define Get_EC_POINT(obj, p) do { \ + ossl_ec_point *ec_point; \ + Data_Get_Struct(obj, ossl_ec_point, ec_point); \ + if (ec_point == NULL) \ + rb_raise(eEC_POINT, "missing ossl_ec_point structure"); \ + p = ec_point->point; \ +} while(0) + +#define Require_EC_POINT(obj, point) do { \ + Get_EC_POINT(obj, point); \ + if (point == NULL) \ + rb_raise(eEC_POINT, "EC_POINT is not initialized"); \ +} while(0) + +#define SafeRequire_EC_POINT(obj, point) do { \ + OSSL_Check_Kind(obj, cEC_POINT); \ + Require_EC_POINT(obj, point); \ +} while(0) + +VALUE cEC; +VALUE eECError; +VALUE cEC_GROUP; +VALUE eEC_GROUP; +VALUE cEC_POINT; +VALUE eEC_POINT; + +static ID s_GFp; +static ID s_GFp_simple; +static ID s_GFp_mont; +static ID s_GFp_nist; +static ID s_GF2m; +static ID s_GF2m_simple; + +static ID ID_uncompressed; +static ID ID_compressed; +static ID ID_hybrid; + +static VALUE ec_instance(VALUE klass, EC_KEY *ec) +{ + EVP_PKEY *pkey; + VALUE obj; + + if (!ec) { + return Qfalse; + } + if (!(pkey = EVP_PKEY_new())) { + return Qfalse; + } + if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) { + EVP_PKEY_free(pkey); + return Qfalse; + } + WrapPKey(klass, obj, pkey); + + return obj; +} + +VALUE ossl_ec_new(EVP_PKEY *pkey) +{ + VALUE obj; + + if (!pkey) { + obj = ec_instance(cEC, EC_KEY_new()); + } else { + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_EC) { + ossl_raise(rb_eTypeError, "Not a EC key!"); + } + WrapPKey(cEC, obj, pkey); + } + if (obj == Qfalse) { + ossl_raise(eECError, NULL); + } + + return obj; +} + + +/* call-seq: + * OpenSSL::PKey::EC.new() + * OpenSSL::PKey::EC.new(ec_key) + * OpenSSL::PKey::EC.new(ec_group) + * OpenSSL::PKey::EC.new("secp112r1") + * OpenSSL::PKey::EC.new(pem_string) + * OpenSSL::PKey::EC.new(der_string) + * + * See the OpenSSL documentation for: + * EC_KEY_* + */ +static VALUE ossl_ec_key_initialize(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + EC_KEY *ec = NULL; + VALUE arg, pass; + VALUE group = Qnil; + + GetPKey(self, pkey); + if (pkey->pkey.ec) + rb_raise(eECError, "EC_KEY already initialized"); + + rb_scan_args(argc, argv, "02", &arg, &pass); + + if (NIL_P(arg)) { + ec = EC_KEY_new(); + } else { + if (rb_obj_is_kind_of(arg, cEC)) { + EC_KEY *other_ec = NULL; + + SafeRequire_EC_KEY(arg, other_ec); + ec = EC_KEY_dup(other_ec); + } else if (rb_obj_is_kind_of(arg, cEC_GROUP)) { + ec = EC_KEY_new(); + group = arg; + } else { + BIO *in = ossl_obj2bio(arg); + + ec = PEM_read_bio_ECPrivateKey(in, NULL, NULL, NULL); + if (!ec) { + (void)BIO_reset(in); + ec = PEM_read_bio_EC_PUBKEY(in, NULL, NULL, NULL); + } + if (!ec) { + (void)BIO_reset(in); + ec = d2i_ECPrivateKey_bio(in, NULL); + } + if (!ec) { + (void)BIO_reset(in); + ec = d2i_EC_PUBKEY_bio(in, NULL); + } + + BIO_free(in); + + if (ec == NULL) { + const char *name = STR2CSTR(arg); + int nid = OBJ_sn2nid(name); + + if (nid == NID_undef) + ossl_raise(eECError, "unknown curve name (%s)\n", name); + + if ((ec = EC_KEY_new_by_curve_name(nid)) == NULL) + ossl_raise(eECError, "unable to create curve (%s)\n", name); + + EC_KEY_set_asn1_flag(ec, OPENSSL_EC_NAMED_CURVE); + EC_KEY_set_conv_form(ec, POINT_CONVERSION_UNCOMPRESSED); + } + } + } + + if (ec == NULL) + ossl_raise(eECError, NULL); + + if (!EVP_PKEY_assign_EC_KEY(pkey, ec)) { + EC_KEY_free(ec); + ossl_raise(eECError, "EVP_PKEY_assign_EC_KEY"); + } + + rb_iv_set(self, "@group", Qnil); + + if (!NIL_P(group)) + rb_funcall(self, rb_intern("group="), 1, arg); + + return self; +} + +/* + * call-seq: + * key.group => group + * + * Returns a constant OpenSSL::EC::Group that is tied to the key. + * Modifying the returned group can make the key invalid. + */ +static VALUE ossl_ec_key_get_group(VALUE self) +{ + VALUE group_v; + EC_KEY *ec; + ossl_ec_group *ec_group; + EC_GROUP *group; + + Require_EC_KEY(self, ec); + + group_v = rb_iv_get(self, "@group"); + if (!NIL_P(group_v)) + return group_v; + + if ((group = (EC_GROUP *)EC_KEY_get0_group(ec)) != NULL) { + group_v = rb_obj_alloc(cEC_GROUP); + SafeGet_ec_group(group_v, ec_group); + ec_group->group = group; + ec_group->dont_free = 1; + rb_iv_set(group_v, "@key", self); + rb_iv_set(self, "@group", group_v); + return group_v; + } + + return Qnil; +} + +/* + * call-seq: + * key.group = group => group + * + * Returns the same object passed, not the group object associated with the key. + * If you wish to access the group object tied to the key call key.group after setting + * the group. + * + * Setting the group will immediately destroy any previously assigned group object. + * The group is internally copied by OpenSSL. Modifying the original group after + * assignment will not effect the internal key structure. + * (your changes may be lost). BE CAREFUL. + * + * EC_KEY_set_group calls EC_GROUP_free(key->group) then EC_GROUP_dup(), not EC_GROUP_copy. + * This documentation is accurate for OpenSSL 0.9.8b. + */ +static VALUE ossl_ec_key_set_group(VALUE self, VALUE group_v) +{ + VALUE old_group_v; + EC_KEY *ec; + EC_GROUP *group; + + Require_EC_KEY(self, ec); + SafeRequire_EC_GROUP(group_v, group); + + old_group_v = rb_iv_get(self, "@group"); + if (!NIL_P(old_group_v)) { + ossl_ec_group *old_ec_group; + SafeGet_ec_group(old_group_v, old_ec_group); + + old_ec_group->group = NULL; + old_ec_group->dont_free = 0; + rb_iv_set(old_group_v, "@key", Qnil); + } + + rb_iv_set(self, "@group", Qnil); + + if (EC_KEY_set_group(ec, group) != 1) + ossl_raise(eECError, "EC_KEY_set_group"); + + return group_v; +} + +/* + * call-seq: + * key.private_key => OpenSSL::BN + * + * See the OpenSSL documentation for EC_KEY_get0_private_key() + */ +static VALUE ossl_ec_key_get_private_key(VALUE self) +{ + EC_KEY *ec; + const BIGNUM *bn; + + Require_EC_KEY(self, ec); + + if ((bn = EC_KEY_get0_private_key(ec)) == NULL) + return Qnil; + + return ossl_bn_new(bn); +} + +/* + * call-seq: + * key.private_key = openssl_bn + * + * See the OpenSSL documentation for EC_KEY_set_private_key() + */ +static VALUE ossl_ec_key_set_private_key(VALUE self, VALUE private_key) +{ + EC_KEY *ec; + BIGNUM *bn = NULL; + + Require_EC_KEY(self, ec); + if (!NIL_P(private_key)) + bn = GetBNPtr(private_key); + + switch (EC_KEY_set_private_key(ec, bn)) { + case 1: + break; + case 0: + if (bn == NULL) + break; + default: + ossl_raise(eECError, "EC_KEY_set_private_key"); + } + + return private_key; +} + + +static VALUE ossl_ec_point_dup(const EC_POINT *point, VALUE group_v) +{ + VALUE obj; + const EC_GROUP *group; + ossl_ec_point *new_point; + + obj = rb_obj_alloc(cEC_POINT); + Data_Get_Struct(obj, ossl_ec_point, new_point); + + SafeRequire_EC_GROUP(group_v, group); + + new_point->point = EC_POINT_dup(point, group); + if (new_point->point == NULL) + ossl_raise(eEC_POINT, "EC_POINT_dup"); + rb_iv_set(obj, "@group", group_v); + + return obj; +} + +/* + * call-seq: + * key.public_key => OpenSSL::PKey::EC::Point + * + * See the OpenSSL documentation for EC_KEY_get0_public_key() + */ +static VALUE ossl_ec_key_get_public_key(VALUE self) +{ + EC_KEY *ec; + const EC_POINT *point; + VALUE group; + + Require_EC_KEY(self, ec); + + if ((point = EC_KEY_get0_public_key(ec)) == NULL) + return Qnil; + + group = rb_funcall(self, rb_intern("group"), 0); + if (NIL_P(group)) + ossl_raise(eECError, "EC_KEY_get0_get0_group (has public_key but no group???"); + + return ossl_ec_point_dup(point, group); +} + +/* + * call-seq: + * key.public_key = ec_point + * + * See the OpenSSL documentation for EC_KEY_set_public_key() + */ +static VALUE ossl_ec_key_set_public_key(VALUE self, VALUE public_key) +{ + EC_KEY *ec; + EC_POINT *point = NULL; + + Require_EC_KEY(self, ec); + if (!NIL_P(public_key)) + SafeRequire_EC_POINT(public_key, point); + + switch (EC_KEY_set_public_key(ec, point)) { + case 1: + break; + case 0: + if (point == NULL) + break; + default: + ossl_raise(eECError, "EC_KEY_set_public_key"); + } + + return public_key; +} + +/* + * call-seq: + * key.public_key? => true or false + * + * Both public_key? and private_key? may return false at the same time unlike other PKey classes. + */ +static VALUE ossl_ec_key_is_public_key(VALUE self) +{ + EC_KEY *ec; + + Require_EC_KEY(self, ec); + + return (EC_KEY_get0_public_key(ec) ? Qtrue : Qfalse); +} + +/* + * call-seq: + * key.private_key? => true or false + * + * Both public_key? and private_key? may return false at the same time unlike other PKey classes. + */ +static VALUE ossl_ec_key_is_private_key(VALUE self) +{ + EC_KEY *ec; + + Require_EC_KEY(self, ec); + + return (EC_KEY_get0_private_key(ec) ? Qtrue : Qfalse); +} + +static VALUE ossl_ec_key_to_string(VALUE self, int format) +{ + EC_KEY *ec; + BIO *out; + int i = -1; + int private = 0; +#if 0 /* unused now */ + EVP_CIPHER *cipher = NULL; + char *password = NULL; +#endif + VALUE str; + + Require_EC_KEY(self, ec); + + if (EC_KEY_get0_public_key(ec) == NULL) + rb_raise(eECError, "can't export - no public key set"); + + if (EC_KEY_check_key(ec) != 1) + ossl_raise(eECError, "can't export - EC_KEY_check_key failed"); + + if (EC_KEY_get0_private_key(ec)) + private = 1; + + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eECError, "BIO_new(BIO_s_mem())"); + + switch(format) { + case EXPORT_PEM: + if (private) { +#if 0 /* unused now */ + if (cipher || password) +/* BUG: finish cipher/password key export */ + rb_notimplement(); + i = PEM_write_bio_ECPrivateKey(out, ec, cipher, NULL, 0, NULL, password); +#endif + i = PEM_write_bio_ECPrivateKey(out, ec, NULL, NULL, 0, NULL, NULL); + } else { +#if 0 /* unused now */ + if (cipher || password) + rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif + + i = PEM_write_bio_EC_PUBKEY(out, ec); + } + + break; + case EXPORT_DER: + if (private) { +#if 0 /* unused now */ + if (cipher || password) + rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif + + i = i2d_ECPrivateKey_bio(out, ec); + } else { +#if 0 /* unused now */ + if (cipher || password) + rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif + + i = i2d_EC_PUBKEY_bio(out, ec); + } + + break; + default: + BIO_free(out); + rb_raise(rb_eRuntimeError, "unknown format (internal error)"); + } + + if (i != 1) { + BIO_free(out); + ossl_raise(eECError, "outlen=%d", i); + } + + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * key.to_pem => String + * + * See the OpenSSL documentation for PEM_write_bio_ECPrivateKey() + */ +static VALUE ossl_ec_key_to_pem(VALUE self) +{ + return ossl_ec_key_to_string(self, EXPORT_PEM); +} + +/* + * call-seq: + * key.to_der => String + * + * See the OpenSSL documentation for i2d_ECPrivateKey_bio() + */ +static VALUE ossl_ec_key_to_der(VALUE self) +{ + return ossl_ec_key_to_string(self, EXPORT_DER); +} + +/* + * call-seq: + * key.to_text => String + * + * See the OpenSSL documentation for EC_KEY_print() + */ +static VALUE ossl_ec_key_to_text(VALUE self) +{ + EC_KEY *ec; + BIO *out; + VALUE str; + + Require_EC_KEY(self, ec); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eECError, "BIO_new(BIO_s_mem())"); + } + if (!EC_KEY_print(out, ec, 0)) { + BIO_free(out); + ossl_raise(eECError, "EC_KEY_print"); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * key.generate_key => self + * + * See the OpenSSL documentation for EC_KEY_generate_key() + */ +static VALUE ossl_ec_key_generate_key(VALUE self) +{ + EC_KEY *ec; + + Require_EC_KEY(self, ec); + + if (EC_KEY_generate_key(ec) != 1) + ossl_raise(eECError, "EC_KEY_generate_key"); + + return self; +} + +/* + * call-seq: + * key.check_key => true + * + * Raises an exception if the key is invalid. + * + * See the OpenSSL documentation for EC_KEY_check_key() + */ +static VALUE ossl_ec_key_check_key(VALUE self) +{ + EC_KEY *ec; + + Require_EC_KEY(self, ec); + + if (EC_KEY_check_key(ec) != 1) + ossl_raise(eECError, "EC_KEY_check_key"); + + return Qtrue; +} + +/* + * call-seq: + * key.dh_compute_key(pubkey) => String + * + * See the OpenSSL documentation for ECDH_compute_key() + */ +static VALUE ossl_ec_key_dh_compute_key(VALUE self, VALUE pubkey) +{ + EC_KEY *ec; + EC_POINT *point; + int buf_len; + VALUE str; + + Require_EC_KEY(self, ec); + SafeRequire_EC_POINT(pubkey, point); + +/* BUG: need a way to figure out the maximum string size */ + buf_len = 1024; + str = rb_str_new(0, buf_len); +/* BUG: take KDF as a block */ + buf_len = ECDH_compute_key(RSTRING_PTR(str), buf_len, point, ec, NULL); + if (buf_len < 0) + ossl_raise(eECError, "ECDH_compute_key"); + + rb_str_resize(str, buf_len); + + return str; +} + +/* sign_setup */ + +/* + * call-seq: + * key.dsa_sign_asn1(data) => String + * + * See the OpenSSL documentation for ECDSA_sign() + */ +static VALUE ossl_ec_key_dsa_sign_asn1(VALUE self, VALUE data) +{ + EC_KEY *ec; + unsigned int buf_len; + VALUE str; + + Require_EC_KEY(self, ec); + StringValue(data); + + if (EC_KEY_get0_private_key(ec) == NULL) + ossl_raise(eECError, "Private EC key needed!"); + + str = rb_str_new(0, ECDSA_size(ec) + 16); + if (ECDSA_sign(0, (unsigned char *) RSTRING_PTR(data), RSTRING_LEN(data), (unsigned char *) RSTRING_PTR(str), &buf_len, ec) != 1) + ossl_raise(eECError, "ECDSA_sign"); + + rb_str_resize(str, buf_len); + + return str; +} + +/* + * call-seq: + * key.dsa_verify(data, sig) => true or false + * + * See the OpenSSL documentation for ECDSA_verify() + */ +static VALUE ossl_ec_key_dsa_verify_asn1(VALUE self, VALUE data, VALUE sig) +{ + EC_KEY *ec; + + Require_EC_KEY(self, ec); + StringValue(data); + StringValue(sig); + + switch (ECDSA_verify(0, (unsigned char *) RSTRING_PTR(data), RSTRING_LEN(data), (unsigned char *) RSTRING_PTR(sig), RSTRING_LEN(sig), ec)) { + case 1: return Qtrue; + case 0: return Qfalse; + default: break; + } + + ossl_raise(eECError, "ECDSA_verify"); +} + +static void ossl_ec_group_free(ossl_ec_group *ec_group) +{ + if (!ec_group->dont_free && ec_group->group) + EC_GROUP_clear_free(ec_group->group); + ruby_xfree(ec_group); +} + +static VALUE ossl_ec_group_alloc(VALUE klass) +{ + ossl_ec_group *ec_group; + VALUE obj; + + obj = Data_Make_Struct(klass, ossl_ec_group, 0, ossl_ec_group_free, ec_group); + + return obj; +} + +/* call-seq: + * OpenSSL::PKey::EC::Group.new("secp112r1") + * OpenSSL::PKey::EC::Group.new(ec_group) + * OpenSSL::PKey::EC::Group.new(pem_string) + * OpenSSL::PKey::EC::Group.new(der_string) + * OpenSSL::PKey::EC::Group.new(pem_file) + * OpenSSL::PKey::EC::Group.new(der_file) + * OpenSSL::PKey::EC::Group.new(:GFp_simple) + * OpenSSL::PKey::EC::Group.new(:GFp_mult) + * OpenSSL::PKey::EC::Group.new(:GFp_nist) + * OpenSSL::PKey::EC::Group.new(:GF2m_simple) + * OpenSSL::PKey::EC::Group.new(:GFp, bignum_p, bignum_a, bignum_b) + * OpenSSL::PKey::EC::Group.new(:GF2m, bignum_p, bignum_a, bignum_b) + * + * See the OpenSSL documentation for EC_GROUP_* + */ +static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE arg1, arg2, arg3, arg4; + ossl_ec_group *ec_group; + EC_GROUP *group = NULL; + + Data_Get_Struct(self, ossl_ec_group, ec_group); + if (ec_group->group != NULL) + rb_raise(rb_eRuntimeError, "EC_GROUP is already initialized"); + + switch (rb_scan_args(argc, argv, "13", &arg1, &arg2, &arg3, &arg4)) { + case 1: + if (SYMBOL_P(arg1)) { + const EC_METHOD *method = NULL; + ID id = SYM2ID(arg1); + + if (id == s_GFp_simple) { + method = EC_GFp_simple_method(); + } else if (id == s_GFp_mont) { + method = EC_GFp_mont_method(); + } else if (id == s_GFp_nist) { + method = EC_GFp_nist_method(); + } else if (id == s_GF2m_simple) { + method = EC_GF2m_simple_method(); + } + + if (method) { + if ((group = EC_GROUP_new(method)) == NULL) + ossl_raise(eEC_GROUP, "EC_GROUP_new"); + } else { + rb_raise(rb_eArgError, "unknown symbol, must be :GFp_simple, :GFp_mont, :GFp_nist or :GF2m_simple"); + } + } else if (rb_obj_is_kind_of(arg1, cEC_GROUP)) { + const EC_GROUP *arg1_group; + + SafeRequire_EC_GROUP(arg1, arg1_group); + if ((group = EC_GROUP_dup(arg1_group)) == NULL) + ossl_raise(eEC_GROUP, "EC_GROUP_dup"); + } else { + BIO *in = ossl_obj2bio(arg1); + + group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL); + if (!group) { + (void)BIO_reset(in); + group = d2i_ECPKParameters_bio(in, NULL); + } + + BIO_free(in); + + if (!group) { + const char *name = STR2CSTR(arg1); + int nid = OBJ_sn2nid(name); + + if (nid == NID_undef) + ossl_raise(eEC_GROUP, "unknown curve name (%s)", name); + + group = EC_GROUP_new_by_curve_name(nid); + if (group == NULL) + ossl_raise(eEC_GROUP, "unable to create curve (%s)", name); + + EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE); + EC_GROUP_set_point_conversion_form(group, POINT_CONVERSION_UNCOMPRESSED); + } + } + + break; + case 4: + if (SYMBOL_P(arg1)) { + ID id = SYM2ID(arg1); + EC_GROUP *(*new_curve)(const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *) = NULL; + const BIGNUM *p = GetBNPtr(arg2); + const BIGNUM *a = GetBNPtr(arg3); + const BIGNUM *b = GetBNPtr(arg4); + + if (id == s_GFp) { + new_curve = EC_GROUP_new_curve_GFp; + } else if (id == s_GF2m) { + new_curve = EC_GROUP_new_curve_GF2m; + } else { + rb_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); + } + + if ((group = new_curve(p, a, b, ossl_bn_ctx)) == NULL) + ossl_raise(eEC_GROUP, "EC_GROUP_new_by_GF*"); + } else { + rb_raise(rb_eArgError, "unknown argument, must be :GFp or :GF2m"); + } + + break; + default: + rb_raise(rb_eArgError, "wrong number of arguments"); + } + + if (group == NULL) + ossl_raise(eEC_GROUP, ""); + + ec_group->group = group; + + return self; +} + +/* call-seq: + * group1 == group2 => true | false + * + */ +static VALUE ossl_ec_group_eql(VALUE a, VALUE b) +{ + EC_GROUP *group1 = NULL, *group2 = NULL; + + Require_EC_GROUP(a, group1); + SafeRequire_EC_GROUP(b, group2); + + if (EC_GROUP_cmp(group1, group2, ossl_bn_ctx) == 1) + return Qfalse; + + return Qtrue; +} + +/* call-seq: + * group.generator => ec_point + * + * See the OpenSSL documentation for EC_GROUP_get0_generator() + */ +static VALUE ossl_ec_group_get_generator(VALUE self) +{ + VALUE point_obj; + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + + point_obj = ossl_ec_point_dup(EC_GROUP_get0_generator(group), self); + + return point_obj; +} + +/* call-seq: + * group.set_generator(generator, order, cofactor) => self + * + * See the OpenSSL documentation for EC_GROUP_set_generator() + */ +static VALUE ossl_ec_group_set_generator(VALUE self, VALUE generator, VALUE order, VALUE cofactor) +{ + EC_GROUP *group = NULL; + const EC_POINT *point; + const BIGNUM *o, *co; + + Require_EC_GROUP(self, group); + SafeRequire_EC_POINT(generator, point); + o = GetBNPtr(order); + co = GetBNPtr(cofactor); + + if (EC_GROUP_set_generator(group, point, o, co) != 1) + ossl_raise(eEC_GROUP, "EC_GROUP_set_generator"); + + return self; +} + +/* call-seq: + * group.get_order => order_bn + * + * See the OpenSSL documentation for EC_GROUP_get_order() + */ +static VALUE ossl_ec_group_get_order(VALUE self) +{ + VALUE bn_obj; + BIGNUM *bn; + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + + bn_obj = ossl_bn_new(NULL); + bn = GetBNPtr(bn_obj); + + if (EC_GROUP_get_order(group, bn, ossl_bn_ctx) != 1) + ossl_raise(eEC_GROUP, "EC_GROUP_get_order"); + + return bn_obj; +} + +/* call-seq: + * group.get_cofactor => cofactor_bn + * + * See the OpenSSL documentation for EC_GROUP_get_cofactor() + */ +static VALUE ossl_ec_group_get_cofactor(VALUE self) +{ + VALUE bn_obj; + BIGNUM *bn; + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + + bn_obj = ossl_bn_new(NULL); + bn = GetBNPtr(bn_obj); + + if (EC_GROUP_get_cofactor(group, bn, ossl_bn_ctx) != 1) + ossl_raise(eEC_GROUP, "EC_GROUP_get_cofactor"); + + return bn_obj; +} + +/* call-seq: + * group.curve_name => String + * + * See the OpenSSL documentation for EC_GROUP_get_curve_name() + */ +static VALUE ossl_ec_group_get_curve_name(VALUE self) +{ + EC_GROUP *group = NULL; + int nid; + + Get_EC_GROUP(self, group); + if (group == NULL) + return Qnil; + + nid = EC_GROUP_get_curve_name(group); + +/* BUG: an nid or asn1 object should be returned, maybe. */ + return rb_str_new2(OBJ_nid2sn(nid)); +} + +/* call-seq: + * EC.builtin_curves => [[name, comment], ...] + * + * See the OpenSSL documentation for EC_builtin_curves() + */ +static VALUE ossl_s_builtin_curves(VALUE self) +{ + EC_builtin_curve *curves = NULL; + int n; + int crv_len = EC_get_builtin_curves(NULL, 0); + VALUE ary, ret; + + curves = ALLOCA_N(EC_builtin_curve, crv_len); + if (curves == NULL) + return Qnil; + if (!EC_get_builtin_curves(curves, crv_len)) + ossl_raise(rb_eRuntimeError, "EC_get_builtin_curves"); + + ret = rb_ary_new2(crv_len); + + for (n = 0; n < crv_len; n++) { + const char *sname = OBJ_nid2sn(curves[n].nid); + const char *comment = curves[n].comment; + + ary = rb_ary_new2(2); + rb_ary_push(ary, rb_str_new2(sname)); + rb_ary_push(ary, comment ? rb_str_new2(comment) : Qnil); + rb_ary_push(ret, ary); + } + + return ret; +} + +/* call-seq: + * group.asn1_flag => Fixnum + * + * See the OpenSSL documentation for EC_GROUP_get_asn1_flag() + */ +static VALUE ossl_ec_group_get_asn1_flag(VALUE self) +{ + EC_GROUP *group = NULL; + int flag; + + Require_EC_GROUP(self, group); + + flag = EC_GROUP_get_asn1_flag(group); + + return INT2FIX(flag); +} + +/* call-seq: + * group.asn1_flag = Fixnum => Fixnum + * + * See the OpenSSL documentation for EC_GROUP_set_asn1_flag() + */ +static VALUE ossl_ec_group_set_asn1_flag(VALUE self, VALUE flag_v) +{ + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + + EC_GROUP_set_asn1_flag(group, NUM2INT(flag_v)); + + return flag_v; +} + +/* call-seq: + * group.point_conversion_form => :uncompressed | :compressed | :hybrid + * + * See the OpenSSL documentation for EC_GROUP_get_point_conversion_form() + */ +static VALUE ossl_ec_group_get_point_conversion_form(VALUE self) +{ + EC_GROUP *group = NULL; + point_conversion_form_t form; + VALUE ret; + + Require_EC_GROUP(self, group); + + form = EC_GROUP_get_point_conversion_form(group); + + switch (form) { + case POINT_CONVERSION_UNCOMPRESSED: ret = ID_uncompressed; break; + case POINT_CONVERSION_COMPRESSED: ret = ID_compressed; break; + case POINT_CONVERSION_HYBRID: ret = ID_hybrid; break; + default: rb_raise(eEC_GROUP, "unsupported point conversion form: %d, this module should be updated", form); + } + + return ID2SYM(ret); +} + +/* call-seq: + * group.point_conversion_form = form => form + * + * See the OpenSSL documentation for EC_GROUP_set_point_conversion_form() + */ +static VALUE ossl_ec_group_set_point_conversion_form(VALUE self, VALUE form_v) +{ + EC_GROUP *group = NULL; + point_conversion_form_t form; + ID form_id = SYM2ID(form_v); + + Require_EC_GROUP(self, group); + + if (form_id == ID_uncompressed) { + form = POINT_CONVERSION_UNCOMPRESSED; + } else if (form_id == ID_compressed) { + form = POINT_CONVERSION_COMPRESSED; + } else if (form_id == ID_hybrid) { + form = POINT_CONVERSION_HYBRID; + } else { + rb_raise(rb_eArgError, "form must be :compressed, :uncompressed, or :hybrid"); + } + + EC_GROUP_set_point_conversion_form(group, form); + + return form_v; +} + +/* call-seq: + * group.seed => String or nil + * + * See the OpenSSL documentation for EC_GROUP_get0_seed() + */ +static VALUE ossl_ec_group_get_seed(VALUE self) +{ + EC_GROUP *group = NULL; + size_t seed_len; + + Require_EC_GROUP(self, group); + + seed_len = EC_GROUP_get_seed_len(group); + + if (seed_len == 0) + return Qnil; + + return rb_str_new((const char *)EC_GROUP_get0_seed(group), seed_len); +} + +/* call-seq: + * group.seed = seed => seed + * + * See the OpenSSL documentation for EC_GROUP_set_seed() + */ +static VALUE ossl_ec_group_set_seed(VALUE self, VALUE seed) +{ + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + StringValue(seed); + + if (EC_GROUP_set_seed(group, (unsigned char *)RSTRING_PTR(seed), RSTRING_LEN(seed)) != RSTRING_LEN(seed)) + ossl_raise(eEC_GROUP, "EC_GROUP_set_seed"); + + return seed; +} + +/* get/set curve GFp, GF2m */ + +/* call-seq: + * group.degree => Fixnum + * + * See the OpenSSL documentation for EC_GROUP_get_degree() + */ +static VALUE ossl_ec_group_get_degree(VALUE self) +{ + EC_GROUP *group = NULL; + + Require_EC_GROUP(self, group); + + return INT2NUM(EC_GROUP_get_degree(group)); +} + +static VALUE ossl_ec_group_to_string(VALUE self, int format) +{ + EC_GROUP *group; + BIO *out; + int i = -1; + VALUE str; + + Get_EC_GROUP(self, group); + + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eEC_GROUP, "BIO_new(BIO_s_mem())"); + + switch(format) { + case EXPORT_PEM: + i = PEM_write_bio_ECPKParameters(out, group); + break; + case EXPORT_DER: + i = i2d_ECPKParameters_bio(out, group); + break; + default: + BIO_free(out); + rb_raise(rb_eRuntimeError, "unknown format (internal error)"); + } + + if (i != 1) { + BIO_free(out); + ossl_raise(eECError, NULL); + } + + str = ossl_membio2str(out); + + return str; +} + +/* call-seq: + * group.to_pem => String + * + * See the OpenSSL documentation for PEM_write_bio_ECPKParameters() + */ +static VALUE ossl_ec_group_to_pem(VALUE self) +{ + return ossl_ec_group_to_string(self, EXPORT_PEM); +} + +/* call-seq: + * group.to_der => String + * + * See the OpenSSL documentation for i2d_ECPKParameters_bio() + */ +static VALUE ossl_ec_group_to_der(VALUE self) +{ + return ossl_ec_group_to_string(self, EXPORT_DER); +} + +/* call-seq: + * group.to_text => String + * + * See the OpenSSL documentation for ECPKParameters_print() + */ +static VALUE ossl_ec_group_to_text(VALUE self) +{ + EC_GROUP *group; + BIO *out; + VALUE str; + + Require_EC_GROUP(self, group); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eEC_GROUP, "BIO_new(BIO_s_mem())"); + } + if (!ECPKParameters_print(out, group, 0)) { + BIO_free(out); + ossl_raise(eEC_GROUP, NULL); + } + str = ossl_membio2str(out); + + return str; +} + + +static void ossl_ec_point_free(ossl_ec_point *ec_point) +{ + if (!ec_point->dont_free && ec_point->point) + EC_POINT_clear_free(ec_point->point); + ruby_xfree(ec_point); +} + +static VALUE ossl_ec_point_alloc(VALUE klass) +{ + ossl_ec_point *ec_point; + VALUE obj; + + obj = Data_Make_Struct(klass, ossl_ec_point, 0, ossl_ec_point_free, ec_point); + + return obj; +} + +/* + * call-seq: + * OpenSSL::PKey::EC::Point.new(point) + * OpenSSL::PKey::EC::Point.new(group) + * OpenSSL::PKey::EC::Point.new(group, bn) + * + * See the OpenSSL documentation for EC_POINT_* + */ +static VALUE ossl_ec_point_initialize(int argc, VALUE *argv, VALUE self) +{ + ossl_ec_point *ec_point; + EC_POINT *point = NULL; + VALUE arg1, arg2; + VALUE group_v = Qnil; + const EC_GROUP *group = NULL; + + Data_Get_Struct(self, ossl_ec_point, ec_point); + if (ec_point->point) + rb_raise(eEC_POINT, "EC_POINT already initialized"); + + switch (rb_scan_args(argc, argv, "11", &arg1, &arg2)) { + case 1: + if (rb_obj_is_kind_of(arg1, cEC_POINT)) { + const EC_POINT *arg_point; + + group_v = rb_iv_get(arg1, "@group"); + SafeRequire_EC_GROUP(group_v, group); + SafeRequire_EC_POINT(arg1, arg_point); + + point = EC_POINT_dup(arg_point, group); + } else if (rb_obj_is_kind_of(arg1, cEC_GROUP)) { + group_v = arg1; + SafeRequire_EC_GROUP(group_v, group); + + point = EC_POINT_new(group); + } else { + rb_raise(eEC_POINT, "wrong argument type: must be OpenSSL::PKey::EC::Point or OpenSSL::Pkey::EC::Group"); + } + + break; + case 2: + if (!rb_obj_is_kind_of(arg1, cEC_GROUP)) + rb_raise(rb_eArgError, "1st argument must be OpenSSL::PKey::EC::Group"); + group_v = arg1; + SafeRequire_EC_GROUP(group_v, group); + + if (rb_obj_is_kind_of(arg2, cBN)) { + const BIGNUM *bn = GetBNPtr(arg2); + + point = EC_POINT_bn2point(group, bn, NULL, ossl_bn_ctx); + } else { + BIO *in = ossl_obj2bio(arg1); + +/* BUG: finish me */ + + BIO_free(in); + + if (point == NULL) { + ossl_raise(eEC_POINT, "unknown type for 2nd arg"); + } + } + break; + default: + rb_raise(rb_eArgError, "wrong number of arguments"); + } + + if (point == NULL) + ossl_raise(eEC_POINT, NULL); + + if (NIL_P(group_v)) + rb_raise(rb_eRuntimeError, "missing group (internal error)"); + + ec_point->point = point; + + rb_iv_set(self, "@group", group_v); + + return self; +} + +/* + * call-seq: + * point1 == point2 => true | false + * + */ +static VALUE ossl_ec_point_eql(VALUE a, VALUE b) +{ + EC_POINT *point1, *point2; + VALUE group_v1 = rb_iv_get(a, "@group"); + VALUE group_v2 = rb_iv_get(b, "@group"); + const EC_GROUP *group; + + if (ossl_ec_group_eql(group_v1, group_v2) == Qfalse) + return Qfalse; + + Require_EC_POINT(a, point1); + SafeRequire_EC_POINT(b, point2); + SafeRequire_EC_GROUP(group_v1, group); + + if (EC_POINT_cmp(group, point1, point2, ossl_bn_ctx) == 1) + return Qfalse; + + return Qtrue; +} + +/* + * call-seq: + * point.infinity? => true | false + * + */ +static VALUE ossl_ec_point_is_at_infinity(VALUE self) +{ + EC_POINT *point; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + switch (EC_POINT_is_at_infinity(group, point)) { + case 1: return Qtrue; + case 0: return Qfalse; + default: ossl_raise(cEC_POINT, "EC_POINT_is_at_infinity"); + } +} + +/* + * call-seq: + * point.on_curve? => true | false + * + */ +static VALUE ossl_ec_point_is_on_curve(VALUE self) +{ + EC_POINT *point; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + switch (EC_POINT_is_on_curve(group, point, ossl_bn_ctx)) { + case 1: return Qtrue; + case 0: return Qfalse; + default: ossl_raise(cEC_POINT, "EC_POINT_is_on_curve"); + } +} + +/* + * call-seq: + * point.make_affine! => self + * + */ +static VALUE ossl_ec_point_make_affine(VALUE self) +{ + EC_POINT *point; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + if (EC_POINT_make_affine(group, point, ossl_bn_ctx) != 1) + ossl_raise(cEC_POINT, "EC_POINT_make_affine"); + + return self; +} + +/* + * call-seq: + * point.invert! => self + * + */ +static VALUE ossl_ec_point_invert(VALUE self) +{ + EC_POINT *point; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + if (EC_POINT_invert(group, point, ossl_bn_ctx) != 1) + ossl_raise(cEC_POINT, "EC_POINT_invert"); + + return self; +} + +/* + * call-seq: + * point.set_to_infinity! => self + * + */ +static VALUE ossl_ec_point_set_to_infinity(VALUE self) +{ + EC_POINT *point; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + if (EC_POINT_set_to_infinity(group, point) != 1) + ossl_raise(cEC_POINT, "EC_POINT_set_to_infinity"); + + return self; +} + +/* + * call-seq: + * point.to_bn => OpenSSL::BN + * + * See the OpenSSL documentation for EC_POINT_point2bn() + */ +static VALUE ossl_ec_point_to_bn(VALUE self) +{ + EC_POINT *point; + VALUE bn_obj; + VALUE group_v = rb_iv_get(self, "@group"); + const EC_GROUP *group; + point_conversion_form_t form; + BIGNUM *bn; + + Require_EC_POINT(self, point); + SafeRequire_EC_GROUP(group_v, group); + + form = EC_GROUP_get_point_conversion_form(group); + + bn_obj = rb_obj_alloc(cBN); + bn = GetBNPtr(bn_obj); + + if (EC_POINT_point2bn(group, point, form, bn, ossl_bn_ctx) == NULL) + ossl_raise(eEC_POINT, "EC_POINT_point2bn"); + + return bn_obj; +} + +static void no_copy(VALUE klass) +{ + rb_undef_method(klass, "copy"); + rb_undef_method(klass, "clone"); + rb_undef_method(klass, "dup"); + rb_undef_method(klass, "initialize_copy"); +} + +void Init_ossl_ec() +{ +#ifdef DONT_NEED_RDOC_WORKAROUND + mOSSL = rb_define_module("OpenSSL"); + mPKey = rb_define_module_under(mOSSL, "PKey"); +#endif + + eECError = rb_define_class_under(mPKey, "ECError", ePKeyError); + + cEC = rb_define_class_under(mPKey, "EC", cPKey); + cEC_GROUP = rb_define_class_under(cEC, "Group", rb_cObject); + cEC_POINT = rb_define_class_under(cEC, "Point", rb_cObject); + eEC_GROUP = rb_define_class_under(cEC_GROUP, "Error", eOSSLError); + eEC_POINT = rb_define_class_under(cEC_POINT, "Error", eOSSLError); + + s_GFp = rb_intern("GFp"); + s_GF2m = rb_intern("GF2m"); + s_GFp_simple = rb_intern("GFp_simple"); + s_GFp_mont = rb_intern("GFp_mont"); + s_GFp_nist = rb_intern("GFp_nist"); + s_GF2m_simple = rb_intern("GF2m_simple"); + + ID_uncompressed = rb_intern("uncompressed"); + ID_compressed = rb_intern("compressed"); + ID_hybrid = rb_intern("hybrid"); + +#ifdef OPENSSL_EC_NAMED_CURVE + rb_define_const(cEC, "NAMED_CURVE", ULONG2NUM(OPENSSL_EC_NAMED_CURVE)); +#endif + + rb_define_singleton_method(cEC, "builtin_curves", ossl_s_builtin_curves, 0); + + rb_define_method(cEC, "initialize", ossl_ec_key_initialize, -1); +/* copy/dup/cmp */ + + rb_define_method(cEC, "group", ossl_ec_key_get_group, 0); + rb_define_method(cEC, "group=", ossl_ec_key_set_group, 1); + rb_define_method(cEC, "private_key", ossl_ec_key_get_private_key, 0); + rb_define_method(cEC, "private_key=", ossl_ec_key_set_private_key, 1); + rb_define_method(cEC, "public_key", ossl_ec_key_get_public_key, 0); + rb_define_method(cEC, "public_key=", ossl_ec_key_set_public_key, 1); + rb_define_method(cEC, "private_key?", ossl_ec_key_is_private_key, 0); + rb_define_method(cEC, "public_key?", ossl_ec_key_is_public_key, 0); +/* rb_define_method(cEC, "", ossl_ec_key_get_, 0); + rb_define_method(cEC, "=", ossl_ec_key_set_ 1); + set/get enc_flags + set/get _conv_from + set/get asn1_flag (can use ruby to call self.group.asn1_flag) + set/get precompute_mult +*/ + rb_define_method(cEC, "generate_key", ossl_ec_key_generate_key, 0); + rb_define_method(cEC, "check_key", ossl_ec_key_check_key, 0); + + rb_define_method(cEC, "dh_compute_key", ossl_ec_key_dh_compute_key, 1); + rb_define_method(cEC, "dsa_sign_asn1", ossl_ec_key_dsa_sign_asn1, 1); + rb_define_method(cEC, "dsa_verify_asn1", ossl_ec_key_dsa_verify_asn1, 2); +/* do_sign/do_verify */ + + rb_define_method(cEC, "to_pem", ossl_ec_key_to_pem, 0); + rb_define_method(cEC, "to_der", ossl_ec_key_to_der, 0); + rb_define_method(cEC, "to_text", ossl_ec_key_to_text, 0); + + + rb_define_alloc_func(cEC_GROUP, ossl_ec_group_alloc); + rb_define_method(cEC_GROUP, "initialize", ossl_ec_group_initialize, -1); + rb_define_method(cEC_GROUP, "eql?", ossl_ec_group_eql, 1); + rb_define_alias(cEC_GROUP, "==", "eql?"); +/* copy/dup/cmp */ + + rb_define_method(cEC_GROUP, "generator", ossl_ec_group_get_generator, 0); + rb_define_method(cEC_GROUP, "set_generator", ossl_ec_group_set_generator, 3); + rb_define_method(cEC_GROUP, "order", ossl_ec_group_get_order, 0); + rb_define_method(cEC_GROUP, "cofactor", ossl_ec_group_get_cofactor, 0); + + rb_define_method(cEC_GROUP, "curve_name", ossl_ec_group_get_curve_name, 0); +/* rb_define_method(cEC_GROUP, "curve_name=", ossl_ec_group_set_curve_name, 1); */ + + rb_define_method(cEC_GROUP, "asn1_flag", ossl_ec_group_get_asn1_flag, 0); + rb_define_method(cEC_GROUP, "asn1_flag=", ossl_ec_group_set_asn1_flag, 1); + + rb_define_method(cEC_GROUP, "point_conversion_form", ossl_ec_group_get_point_conversion_form, 0); + rb_define_method(cEC_GROUP, "point_conversion_form=", ossl_ec_group_set_point_conversion_form, 1); + + rb_define_method(cEC_GROUP, "seed", ossl_ec_group_get_seed, 0); + rb_define_method(cEC_GROUP, "seed=", ossl_ec_group_set_seed, 1); + +/* get/set GFp, GF2m */ + + rb_define_method(cEC_GROUP, "degree", ossl_ec_group_get_degree, 0); + +/* check* */ + + + rb_define_method(cEC_GROUP, "to_pem", ossl_ec_group_to_pem, 0); + rb_define_method(cEC_GROUP, "to_der", ossl_ec_group_to_der, 0); + rb_define_method(cEC_GROUP, "to_text", ossl_ec_group_to_text, 0); + + + rb_define_alloc_func(cEC_POINT, ossl_ec_point_alloc); + rb_define_method(cEC_POINT, "initialize", ossl_ec_point_initialize, -1); + rb_attr(cEC_POINT, rb_intern("group"), 1, 0, 0); + rb_define_method(cEC_POINT, "eql?", ossl_ec_point_eql, 1); + rb_define_alias(cEC_POINT, "==", "eql?"); + + rb_define_method(cEC_POINT, "infinity?", ossl_ec_point_is_at_infinity, 0); + rb_define_method(cEC_POINT, "on_curve?", ossl_ec_point_is_on_curve, 0); + rb_define_method(cEC_POINT, "make_affine!", ossl_ec_point_make_affine, 0); + rb_define_method(cEC_POINT, "invert!", ossl_ec_point_invert, 0); + rb_define_method(cEC_POINT, "set_to_infinity!", ossl_ec_point_set_to_infinity, 0); +/* all the other methods */ + + rb_define_method(cEC_POINT, "to_bn", ossl_ec_point_to_bn, 0); + + no_copy(cEC); + no_copy(cEC_GROUP); + no_copy(cEC_POINT); +} + +#else /* defined NO_EC */ +void Init_ossl_ec() +{ +} +#endif /* NO_EC */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_rsa.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_rsa.c new file mode 100644 index 0000000..ccf395e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_pkey_rsa.c @@ -0,0 +1,593 @@ +/* + * $Id: ossl_pkey_rsa.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(OPENSSL_NO_RSA) + +#include "ossl.h" + +#define GetPKeyRSA(obj, pkey) do { \ + GetPKey(obj, pkey); \ + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_RSA) { /* PARANOIA? */ \ + ossl_raise(rb_eRuntimeError, "THIS IS NOT A RSA!") ; \ + } \ +} while (0) + +#define RSA_HAS_PRIVATE(rsa) ((rsa)->p && (rsa)->q) +#define RSA_PRIVATE(obj,rsa) (RSA_HAS_PRIVATE(rsa)||OSSL_PKEY_IS_PRIVATE(obj)) + +/* + * Classes + */ +VALUE cRSA; +VALUE eRSAError; + +/* + * Public + */ +static VALUE +rsa_instance(VALUE klass, RSA *rsa) +{ + EVP_PKEY *pkey; + VALUE obj; + + if (!rsa) { + return Qfalse; + } + if (!(pkey = EVP_PKEY_new())) { + return Qfalse; + } + if (!EVP_PKEY_assign_RSA(pkey, rsa)) { + EVP_PKEY_free(pkey); + return Qfalse; + } + WrapPKey(klass, obj, pkey); + + return obj; +} + +VALUE +ossl_rsa_new(EVP_PKEY *pkey) +{ + VALUE obj; + + if (!pkey) { + obj = rsa_instance(cRSA, RSA_new()); + } + else { + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_RSA) { + ossl_raise(rb_eTypeError, "Not a RSA key!"); + } + WrapPKey(cRSA, obj, pkey); + } + if (obj == Qfalse) { + ossl_raise(eRSAError, NULL); + } + + return obj; +} + +/* + * Private + */ +static RSA * +rsa_generate(int size, int exp) +{ + return RSA_generate_key(size, exp, + rb_block_given_p() ? ossl_generate_cb : NULL, + NULL); +} + +/* + * call-seq: + * RSA.generate(size [, exponent]) -> rsa + * + * === Parameters + * * +size+ is an integer representing the desired key size. Keys smaller than 1024 should be considered insecure. + * * +exponent+ is an odd number normally 3, 17, or 65537. + * + */ +static VALUE +ossl_rsa_s_generate(int argc, VALUE *argv, VALUE klass) +{ +/* why does this method exist? why can't initialize take an optional exponent? */ + RSA *rsa; + VALUE size, exp; + VALUE obj; + + rb_scan_args(argc, argv, "11", &size, &exp); + + rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */ + obj = rsa_instance(klass, rsa); + + if (obj == Qfalse) { + RSA_free(rsa); + ossl_raise(eRSAError, NULL); + } + + return obj; +} + +/* + * call-seq: + * RSA.new([size | encoded_key] [, pass]) -> rsa + * + * === Parameters + * * +size+ is an integer representing the desired key size. + * * +encoded_key+ is a string containing PEM or DER encoded key. + * * +pass+ is an optional string with the password to decrypt the encoded key. + * + * === Examples + * * RSA.new(2048) -> rsa + * * RSA.new(File.read("rsa.pem")) -> rsa + * * RSA.new(File.read("rsa.pem"), "mypassword") -> rsa + */ +static VALUE +ossl_rsa_initialize(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + RSA *rsa; + BIO *in; + char *passwd = NULL; + VALUE arg, pass; + + GetPKey(self, pkey); + if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) { + rsa = RSA_new(); + } + else if (FIXNUM_P(arg)) { + rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass)); + if (!rsa) ossl_raise(eRSAError, NULL); + } + else { + if (!NIL_P(pass)) passwd = StringValuePtr(pass); + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); + if (!rsa) { + (void)BIO_reset(in); + rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL); + } + if (!rsa) { + (void)BIO_reset(in); + rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL); + } + if (!rsa) { + (void)BIO_reset(in); + rsa = d2i_RSAPrivateKey_bio(in, NULL); + } + if (!rsa) { + (void)BIO_reset(in); + rsa = d2i_RSAPublicKey_bio(in, NULL); + } + if (!rsa) { + (void)BIO_reset(in); + rsa = d2i_RSA_PUBKEY_bio(in, NULL); + } + BIO_free(in); + if (!rsa) ossl_raise(eRSAError, "Neither PUB key nor PRIV key:"); + } + if (!EVP_PKEY_assign_RSA(pkey, rsa)) { + RSA_free(rsa); + ossl_raise(eRSAError, NULL); + } + + return self; +} + +/* + * call-seq: + * rsa.public? -> true + * + * The return value is always true since every private key is also a public key. + * + */ +static VALUE +ossl_rsa_is_public(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyRSA(self, pkey); + /* + * This method should check for n and e. BUG. + */ + return Qtrue; +} + +/* + * call-seq: + * rsa.private? -> true | false + * + */ +static VALUE +ossl_rsa_is_private(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyRSA(self, pkey); + + return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * rsa.to_pem([cipher, pass]) -> aString + * + * === Parameters + * * +cipher+ is a Cipher object. + * * +pass+ is a string. + * + * === Examples + * * rsa.to_pem -> aString + * * rsa.to_pem(cipher, pass) -> aString + */ +static VALUE +ossl_rsa_export(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + const EVP_CIPHER *ciph = NULL; + char *passwd = NULL; + VALUE cipher, pass, str; + + GetPKeyRSA(self, pkey); + + rb_scan_args(argc, argv, "02", &cipher, &pass); + + if (!NIL_P(cipher)) { + ciph = GetCipherPtr(cipher); + if (!NIL_P(pass)) { + passwd = StringValuePtr(pass); + } + } + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eRSAError, NULL); + } + if (RSA_HAS_PRIVATE(pkey->pkey.rsa)) { + if (!PEM_write_bio_RSAPrivateKey(out, pkey->pkey.rsa, ciph, + NULL, 0, ossl_pem_passwd_cb, passwd)) { + BIO_free(out); + ossl_raise(eRSAError, NULL); + } + } else { + if (!PEM_write_bio_RSAPublicKey(out, pkey->pkey.rsa)) { + BIO_free(out); + ossl_raise(eRSAError, NULL); + } + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * rsa.to_der -> aString + * + */ +static VALUE +ossl_rsa_to_der(VALUE self) +{ + EVP_PKEY *pkey; + int (*i2d_func)_((const RSA*, unsigned char**)); + unsigned char *p; + long len; + VALUE str; + + GetPKeyRSA(self, pkey); + if(RSA_HAS_PRIVATE(pkey->pkey.rsa)) + i2d_func = i2d_RSAPrivateKey; + else + i2d_func = i2d_RSAPublicKey; + if((len = i2d_func(pkey->pkey.rsa, NULL)) <= 0) + ossl_raise(eRSAError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_func(pkey->pkey.rsa, &p) < 0) + ossl_raise(eRSAError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +#define ossl_rsa_buf_size(pkey) (RSA_size((pkey)->pkey.rsa)+16) + +/* + * call-seq: + * rsa.public_encrypt(string [, padding]) -> aString + * + */ +static VALUE +ossl_rsa_public_encrypt(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + int buf_len, pad; + VALUE str, buffer, padding; + + GetPKeyRSA(self, pkey); + rb_scan_args(argc, argv, "11", &buffer, &padding); + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); + buf_len = RSA_public_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), + (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); + + return str; +} + +/* + * call-seq: + * rsa.public_decrypt(string [, padding]) -> aString + * + */ +static VALUE +ossl_rsa_public_decrypt(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + int buf_len, pad; + VALUE str, buffer, padding; + + GetPKeyRSA(self, pkey); + rb_scan_args(argc, argv, "11", &buffer, &padding); + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); + buf_len = RSA_public_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), + (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); + + return str; +} + +/* + * call-seq: + * rsa.private_encrypt(string [, padding]) -> aString + * + */ +static VALUE +ossl_rsa_private_encrypt(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + int buf_len, pad; + VALUE str, buffer, padding; + + GetPKeyRSA(self, pkey); + if (!RSA_PRIVATE(self, pkey->pkey.rsa)) { + ossl_raise(eRSAError, "private key needed."); + } + rb_scan_args(argc, argv, "11", &buffer, &padding); + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); + buf_len = RSA_private_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), + (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); + + return str; +} + + +/* + * call-seq: + * rsa.private_decrypt(string [, padding]) -> aString + * + */ +static VALUE +ossl_rsa_private_decrypt(int argc, VALUE *argv, VALUE self) +{ + EVP_PKEY *pkey; + int buf_len, pad; + VALUE str, buffer, padding; + + GetPKeyRSA(self, pkey); + if (!RSA_PRIVATE(self, pkey->pkey.rsa)) { + ossl_raise(eRSAError, "private key needed."); + } + rb_scan_args(argc, argv, "11", &buffer, &padding); + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); + buf_len = RSA_private_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), + (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); + + return str; +} + +/* + * call-seq: + * rsa.params -> hash + * + * Stores all parameters of key to the hash + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (I's up to you) + */ +static VALUE +ossl_rsa_get_params(VALUE self) +{ + EVP_PKEY *pkey; + VALUE hash; + + GetPKeyRSA(self, pkey); + + hash = rb_hash_new(); + + rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n)); + rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e)); + rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d)); + rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p)); + rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q)); + rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1)); + rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1)); + rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp)); + + return hash; +} + +/* + * call-seq: + * rsa.to_text -> aString + * + * Prints all parameters of key to buffer + * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! + * Don't use :-)) (It's up to you) + */ +static VALUE +ossl_rsa_to_text(VALUE self) +{ + EVP_PKEY *pkey; + BIO *out; + VALUE str; + + GetPKeyRSA(self, pkey); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eRSAError, NULL); + } + if (!RSA_print(out, pkey->pkey.rsa, 0)) { /* offset = 0 */ + BIO_free(out); + ossl_raise(eRSAError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * rsa.public_key -> aRSA + * + * Makes new instance RSA PUBLIC_KEY from PRIVATE_KEY + */ +static VALUE +ossl_rsa_to_public_key(VALUE self) +{ + EVP_PKEY *pkey; + RSA *rsa; + VALUE obj; + + GetPKeyRSA(self, pkey); + /* err check performed by rsa_instance */ + rsa = RSAPublicKey_dup(pkey->pkey.rsa); + obj = rsa_instance(CLASS_OF(self), rsa); + if (obj == Qfalse) { + RSA_free(rsa); + ossl_raise(eRSAError, NULL); + } + return obj; +} + +/* + * TODO: Test me + +static VALUE +ossl_rsa_blinding_on(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyRSA(self, pkey); + + if (RSA_blinding_on(pkey->pkey.rsa, ossl_bn_ctx) != 1) { + ossl_raise(eRSAError, NULL); + } + return self; +} + +static VALUE +ossl_rsa_blinding_off(VALUE self) +{ + EVP_PKEY *pkey; + + GetPKeyRSA(self, pkey); + RSA_blinding_off(pkey->pkey.rsa); + + return self; +} + */ + +OSSL_PKEY_BN(rsa, n); +OSSL_PKEY_BN(rsa, e); +OSSL_PKEY_BN(rsa, d); +OSSL_PKEY_BN(rsa, p); +OSSL_PKEY_BN(rsa, q); +OSSL_PKEY_BN(rsa, dmp1); +OSSL_PKEY_BN(rsa, dmq1); +OSSL_PKEY_BN(rsa, iqmp); + +/* + * INIT + */ +#define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x)) + +void +Init_ossl_rsa() +{ +#if 0 /* let rdoc know about mOSSL and mPKey */ + mOSSL = rb_define_module("OpenSSL"); + mPKey = rb_define_module_under(mOSSL, "PKey"); +#endif + + eRSAError = rb_define_class_under(mPKey, "RSAError", ePKeyError); + + cRSA = rb_define_class_under(mPKey, "RSA", cPKey); + + rb_define_singleton_method(cRSA, "generate", ossl_rsa_s_generate, -1); + rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1); + + rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0); + rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0); + rb_define_method(cRSA, "to_text", ossl_rsa_to_text, 0); + rb_define_method(cRSA, "export", ossl_rsa_export, -1); + rb_define_alias(cRSA, "to_pem", "export"); + rb_define_alias(cRSA, "to_s", "export"); + rb_define_method(cRSA, "to_der", ossl_rsa_to_der, 0); + rb_define_method(cRSA, "public_key", ossl_rsa_to_public_key, 0); + rb_define_method(cRSA, "public_encrypt", ossl_rsa_public_encrypt, -1); + rb_define_method(cRSA, "public_decrypt", ossl_rsa_public_decrypt, -1); + rb_define_method(cRSA, "private_encrypt", ossl_rsa_private_encrypt, -1); + rb_define_method(cRSA, "private_decrypt", ossl_rsa_private_decrypt, -1); + + DEF_OSSL_PKEY_BN(cRSA, rsa, n); + DEF_OSSL_PKEY_BN(cRSA, rsa, e); + DEF_OSSL_PKEY_BN(cRSA, rsa, d); + DEF_OSSL_PKEY_BN(cRSA, rsa, p); + DEF_OSSL_PKEY_BN(cRSA, rsa, q); + DEF_OSSL_PKEY_BN(cRSA, rsa, dmp1); + DEF_OSSL_PKEY_BN(cRSA, rsa, dmq1); + DEF_OSSL_PKEY_BN(cRSA, rsa, iqmp); + + rb_define_method(cRSA, "params", ossl_rsa_get_params, 0); + + DefRSAConst(PKCS1_PADDING); + DefRSAConst(SSLV23_PADDING); + DefRSAConst(NO_PADDING); + DefRSAConst(PKCS1_OAEP_PADDING); + +/* + * TODO: Test it + rb_define_method(cRSA, "blinding_on!", ossl_rsa_blinding_on, 0); + rb_define_method(cRSA, "blinding_off!", ossl_rsa_blinding_off, 0); + */ +} + +#else /* defined NO_RSA */ +void +Init_ossl_rsa() +{ +} +#endif /* NO_RSA */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.c new file mode 100644 index 0000000..d6aafd8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.c @@ -0,0 +1,202 @@ +/* + * $Id: ossl_rand.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +/* + * Classes + */ +VALUE mRandom; +VALUE eRandomError; + +/* + * Struct + */ + +/* + * Public + */ + +/* + * Private + */ + +/* + * call-seq: + * seed(str) -> str + * + */ +static VALUE +ossl_rand_seed(VALUE self, VALUE str) +{ + StringValue(str); + RAND_seed(RSTRING_PTR(str), RSTRING_LEN(str)); + + return str; +} + +/* + * call-seq: + * add(str, entropy) -> self + * + */ +static VALUE +ossl_rand_add(VALUE self, VALUE str, VALUE entropy) +{ + StringValue(str); + RAND_add(RSTRING_PTR(str), RSTRING_LEN(str), NUM2DBL(entropy)); + + return self; +} + +/* + * call-seq: + * load_random_file(filename) -> true + * + */ +static VALUE +ossl_rand_load_file(VALUE self, VALUE filename) +{ + SafeStringValue(filename); + + if(!RAND_load_file(RSTRING_PTR(filename), -1)) { + ossl_raise(eRandomError, NULL); + } + return Qtrue; +} + +/* + * call-seq: + * write_random_file(filename) -> true + * + */ +static VALUE +ossl_rand_write_file(VALUE self, VALUE filename) +{ + SafeStringValue(filename); + if (RAND_write_file(RSTRING_PTR(filename)) == -1) { + ossl_raise(eRandomError, NULL); + } + return Qtrue; +} + +/* + * call-seq: + * random_bytes(length) -> aString + * + */ +static VALUE +ossl_rand_bytes(VALUE self, VALUE len) +{ + VALUE str; + int n = NUM2INT(len); + + str = rb_str_new(0, n); + if (!RAND_bytes((unsigned char *)RSTRING_PTR(str), n)) { + ossl_raise(eRandomError, NULL); + } + + return str; +} + +/* + * call-seq: + * pseudo_bytes(length) -> aString + * + */ +static VALUE +ossl_rand_pseudo_bytes(VALUE self, VALUE len) +{ + VALUE str; + int n = NUM2INT(len); + + str = rb_str_new(0, n); + if (!RAND_pseudo_bytes((unsigned char *)RSTRING_PTR(str), n)) { + ossl_raise(eRandomError, NULL); + } + + return str; +} + +/* + * call-seq: + * egd(filename) -> true + * + */ +static VALUE +ossl_rand_egd(VALUE self, VALUE filename) +{ + SafeStringValue(filename); + + if(!RAND_egd(RSTRING_PTR(filename))) { + ossl_raise(eRandomError, NULL); + } + return Qtrue; +} + +/* + * call-seq: + * egd_bytes(filename, length) -> true + * + */ +static VALUE +ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len) +{ + long n = NUM2INT(len); + + SafeStringValue(filename); + + if (!RAND_egd_bytes(RSTRING_PTR(filename), n)) { + ossl_raise(eRandomError, NULL); + } + return Qtrue; +} + +/* + * call-seq: + * status? => true | false + * + * Return true if the PRNG has been seeded with enough data, false otherwise. + */ +static VALUE +ossl_rand_status(VALUE self) +{ + return RAND_status() ? Qtrue : Qfalse; +} + +#define DEFMETH(class, name, func, argc) \ + rb_define_method(class, name, func, argc); \ + rb_define_singleton_method(class, name, func, argc); + +/* + * INIT + */ +void +Init_ossl_rand() +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + mRandom = rb_define_module_under(mOSSL, "Random"); + + eRandomError = rb_define_class_under(mRandom, "RandomError", eOSSLError); + + DEFMETH(mRandom, "seed", ossl_rand_seed, 1); + DEFMETH(mRandom, "random_add", ossl_rand_add, 2); + DEFMETH(mRandom, "load_random_file", ossl_rand_load_file, 1); + DEFMETH(mRandom, "write_random_file", ossl_rand_write_file, 1); + DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1); + DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1); + DEFMETH(mRandom, "egd", ossl_rand_egd, 1); + DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2); + DEFMETH(mRandom, "status?", ossl_rand_status, 0) +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.h new file mode 100644 index 0000000..0df908b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_rand.h @@ -0,0 +1,20 @@ +/* + * $Id: ossl_rand.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_RAND_H_) +#define _OSSL_RAND_H_ + +extern VALUE mRandom; +extern VALUE eRandomError; + +void Init_ossl_rand(void); + +#endif /* _OSSL_RAND_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.c new file mode 100644 index 0000000..92eced9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.c @@ -0,0 +1,1475 @@ +/* + * $Id: ossl_ssl.c 19080 2008-09-03 08:00:05Z ko1 $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2000-2002 GOTOU Yuuzou + * Copyright (C) 2001-2002 Michal Rokos + * Copyright (C) 2001-2007 Technorama Ltd. + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#if defined(HAVE_UNISTD_H) +# include /* for read(), and write() */ +#endif + +#define numberof(ary) (sizeof(ary)/sizeof(ary[0])) + +#ifdef _WIN32 +# define TO_SOCKET(s) _get_osfhandle(s) +#else +# define TO_SOCKET(s) s +#endif + +VALUE mSSL; +VALUE eSSLError; +VALUE cSSLContext; +VALUE cSSLSocket; + +#define ossl_sslctx_set_cert(o,v) rb_iv_set((o),"@cert",(v)) +#define ossl_sslctx_set_key(o,v) rb_iv_set((o),"@key",(v)) +#define ossl_sslctx_set_client_ca(o,v) rb_iv_set((o),"@client_ca",(v)) +#define ossl_sslctx_set_ca_file(o,v) rb_iv_set((o),"@ca_file",(v)) +#define ossl_sslctx_set_ca_path(o,v) rb_iv_set((o),"@ca_path",(v)) +#define ossl_sslctx_set_timeout(o,v) rb_iv_set((o),"@timeout",(v)) +#define ossl_sslctx_set_verify_mode(o,v) rb_iv_set((o),"@verify_mode",(v)) +#define ossl_sslctx_set_verify_dep(o,v) rb_iv_set((o),"@verify_depth",(v)) +#define ossl_sslctx_set_verify_cb(o,v) rb_iv_set((o),"@verify_callback",(v)) +#define ossl_sslctx_set_options(o,v) rb_iv_set((o),"@options",(v)) +#define ossl_sslctx_set_cert_store(o,v) rb_iv_set((o),"@cert_store",(v)) +#define ossl_sslctx_set_extra_cert(o,v) rb_iv_set((o),"@extra_chain_cert",(v)) +#define ossl_sslctx_set_client_cert_cb(o,v) rb_iv_set((o),"@client_cert_cb",(v)) +#define ossl_sslctx_set_tmp_dh_cb(o,v) rb_iv_set((o),"@tmp_dh_callback",(v)) +#define ossl_sslctx_set_sess_id_ctx(o, v) rb_iv_get((o),"@session_id_context"(v)) + +#define ossl_sslctx_get_cert(o) rb_iv_get((o),"@cert") +#define ossl_sslctx_get_key(o) rb_iv_get((o),"@key") +#define ossl_sslctx_get_client_ca(o) rb_iv_get((o),"@client_ca") +#define ossl_sslctx_get_ca_file(o) rb_iv_get((o),"@ca_file") +#define ossl_sslctx_get_ca_path(o) rb_iv_get((o),"@ca_path") +#define ossl_sslctx_get_timeout(o) rb_iv_get((o),"@timeout") +#define ossl_sslctx_get_verify_mode(o) rb_iv_get((o),"@verify_mode") +#define ossl_sslctx_get_verify_dep(o) rb_iv_get((o),"@verify_depth") +#define ossl_sslctx_get_verify_cb(o) rb_iv_get((o),"@verify_callback") +#define ossl_sslctx_get_options(o) rb_iv_get((o),"@options") +#define ossl_sslctx_get_cert_store(o) rb_iv_get((o),"@cert_store") +#define ossl_sslctx_get_extra_cert(o) rb_iv_get((o),"@extra_chain_cert") +#define ossl_sslctx_get_client_cert_cb(o) rb_iv_get((o),"@client_cert_cb") +#define ossl_sslctx_get_tmp_dh_cb(o) rb_iv_get((o),"@tmp_dh_callback") +#define ossl_sslctx_get_sess_id_ctx(o) rb_iv_get((o),"@session_id_context") + +static const char *ossl_sslctx_attrs[] = { + "cert", "key", "client_ca", "ca_file", "ca_path", + "timeout", "verify_mode", "verify_depth", + "verify_callback", "options", "cert_store", "extra_chain_cert", + "client_cert_cb", "tmp_dh_callback", "session_id_context", + "session_get_cb", "session_new_cb", "session_remove_cb", +}; + +#define ossl_ssl_get_io(o) rb_iv_get((o),"@io") +#define ossl_ssl_get_ctx(o) rb_iv_get((o),"@context") +#define ossl_ssl_get_sync_close(o) rb_iv_get((o),"@sync_close") +#define ossl_ssl_get_x509(o) rb_iv_get((o),"@x509") +#define ossl_ssl_get_key(o) rb_iv_get((o),"@key") +#define ossl_ssl_get_tmp_dh(o) rb_iv_get((o),"@tmp_dh") + +#define ossl_ssl_set_io(o,v) rb_iv_set((o),"@io",(v)) +#define ossl_ssl_set_ctx(o,v) rb_iv_set((o),"@context",(v)) +#define ossl_ssl_set_sync_close(o,v) rb_iv_set((o),"@sync_close",(v)) +#define ossl_ssl_set_x509(o,v) rb_iv_set((o),"@x509",(v)) +#define ossl_ssl_set_key(o,v) rb_iv_set((o),"@key",(v)) +#define ossl_ssl_set_tmp_dh(o,v) rb_iv_set((o),"@tmp_dh",(v)) + +static const char *ossl_ssl_attr_readers[] = { "io", "context", }; +static const char *ossl_ssl_attrs[] = { "sync_close", }; + +ID ID_callback_state; + +/* + * SSLContext class + */ +struct { + const char *name; + SSL_METHOD *(*func)(void); +} ossl_ssl_method_tab[] = { +#define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method } + OSSL_SSL_METHOD_ENTRY(TLSv1), + OSSL_SSL_METHOD_ENTRY(TLSv1_server), + OSSL_SSL_METHOD_ENTRY(TLSv1_client), + OSSL_SSL_METHOD_ENTRY(SSLv2), + OSSL_SSL_METHOD_ENTRY(SSLv2_server), + OSSL_SSL_METHOD_ENTRY(SSLv2_client), + OSSL_SSL_METHOD_ENTRY(SSLv3), + OSSL_SSL_METHOD_ENTRY(SSLv3_server), + OSSL_SSL_METHOD_ENTRY(SSLv3_client), + OSSL_SSL_METHOD_ENTRY(SSLv23), + OSSL_SSL_METHOD_ENTRY(SSLv23_server), + OSSL_SSL_METHOD_ENTRY(SSLv23_client), +#undef OSSL_SSL_METHOD_ENTRY +}; + +int ossl_ssl_ex_vcb_idx; +int ossl_ssl_ex_store_p; +int ossl_ssl_ex_ptr_idx; +int ossl_ssl_ex_client_cert_cb_idx; +int ossl_ssl_ex_tmp_dh_callback_idx; + +static void +ossl_sslctx_free(SSL_CTX *ctx) +{ + if(ctx && SSL_CTX_get_ex_data(ctx, ossl_ssl_ex_store_p)== (void*)1) + ctx->cert_store = NULL; + SSL_CTX_free(ctx); +} + +static VALUE +ossl_sslctx_s_alloc(VALUE klass) +{ + SSL_CTX *ctx; + + ctx = SSL_CTX_new(SSLv23_method()); + if (!ctx) { + ossl_raise(eSSLError, "SSL_CTX_new:"); + } + SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); + SSL_CTX_set_options(ctx, SSL_OP_ALL); + return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx); +} + +static VALUE +ossl_sslctx_set_ssl_version(VALUE self, VALUE ssl_method) +{ + SSL_METHOD *method = NULL; + const char *s; + int i; + + SSL_CTX *ctx; + if(TYPE(ssl_method) == T_SYMBOL) + s = rb_id2name(SYM2ID(ssl_method)); + else + s = StringValuePtr(ssl_method); + for (i = 0; i < numberof(ossl_ssl_method_tab); i++) { + if (strcmp(ossl_ssl_method_tab[i].name, s) == 0) { + method = ossl_ssl_method_tab[i].func(); + break; + } + } + if (!method) { + ossl_raise(rb_eArgError, "unknown SSL method `%s'.", s); + } + Data_Get_Struct(self, SSL_CTX, ctx); + if (SSL_CTX_set_ssl_version(ctx, method) != 1) { + ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:"); + } + + return ssl_method; +} + +/* + * call-seq: + * SSLContext.new => ctx + * SSLContext.new(:TLSv1) => ctx + * SSLContext.new("SSLv23_client") => ctx + * + * You can get a list of valid methods with OpenSSL::SSL::SSLContext::METHODS + */ +static VALUE +ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE ssl_method; + int i; + + for(i = 0; i < numberof(ossl_sslctx_attrs); i++){ + char buf[32]; + snprintf(buf, sizeof(buf), "@%s", ossl_sslctx_attrs[i]); + rb_iv_set(self, buf, Qnil); + } + if (rb_scan_args(argc, argv, "01", &ssl_method) == 0){ + return self; + } + ossl_sslctx_set_ssl_version(self, ssl_method); + + return self; +} + +static VALUE +ossl_call_client_cert_cb(VALUE obj) +{ + VALUE cb, ary, cert, key; + SSL *ssl; + + Data_Get_Struct(obj, SSL, ssl); + cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx); + if (NIL_P(cb)) return Qfalse; + ary = rb_funcall(cb, rb_intern("call"), 1, obj); + Check_Type(ary, T_ARRAY); + GetX509CertPtr(cert = rb_ary_entry(ary, 0)); + GetPKeyPtr(key = rb_ary_entry(ary, 1)); + ossl_ssl_set_x509(obj, cert); + ossl_ssl_set_key(obj, key); + + return Qtrue; +} + +static int +ossl_client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey) +{ + VALUE obj; + int status, success; + + obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx); + success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb, + obj, &status); + if (status || !success) return 0; + *x509 = DupX509CertPtr(ossl_ssl_get_x509(obj)); + *pkey = DupPKeyPtr(ossl_ssl_get_key(obj)); + + return 1; +} + +#if !defined(OPENSSL_NO_DH) +static VALUE +ossl_call_tmp_dh_callback(VALUE *args) +{ + SSL *ssl; + VALUE cb, dh; + EVP_PKEY *pkey; + + Data_Get_Struct(args[0], SSL, ssl); + cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx); + if (NIL_P(cb)) return Qfalse; + dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]); + pkey = GetPKeyPtr(dh); + if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) return Qfalse; + ossl_ssl_set_tmp_dh(args[0], dh); + + return Qtrue; +} + +static DH* +ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength) +{ + VALUE args[3]; + int status, success; + + args[0] = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx); + args[1] = INT2FIX(is_export); + args[2] = INT2FIX(keylength); + success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback, + (VALUE)args, &status); + if (status || !success) return NULL; + + return GetPKeyPtr(ossl_ssl_get_tmp_dh(args[0]))->pkey.dh; +} + +static DH* +ossl_default_tmp_dh_callback(SSL *ssl, int is_export, int keylength) +{ + rb_warning("using default DH parameters."); + + switch(keylength){ + case 512: + return OSSL_DEFAULT_DH_512; + case 1024: + return OSSL_DEFAULT_DH_1024; + } + return NULL; +} +#endif /* OPENSSL_NO_DH */ + +static int +ossl_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) +{ + VALUE cb; + SSL *ssl; + + ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); + cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx); + X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, (void*)cb); + return ossl_verify_cb(preverify_ok, ctx); +} + +static VALUE +ossl_call_session_get_cb(VALUE ary) +{ + VALUE ssl_obj, sslctx_obj, cb; + + Check_Type(ary, T_ARRAY); + ssl_obj = rb_ary_entry(ary, 0); + + sslctx_obj = rb_iv_get(ssl_obj, "@context"); + if (NIL_P(sslctx_obj)) return Qnil; + cb = rb_iv_get(sslctx_obj, "@session_get_cb"); + if (NIL_P(cb)) return Qnil; + + return rb_funcall(cb, rb_intern("call"), 1, ary); +} + +/* this method is currently only called for servers (in OpenSSL <= 0.9.8e) */ +static SSL_SESSION * +ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *buf, int len, int *copy) +{ + VALUE ary, ssl_obj, ret_obj; + SSL_SESSION *sess; + void *ptr; + int state = 0; + + OSSL_Debug("SSL SESSION get callback entered"); + if ((ptr = SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx)) == NULL) + return NULL; + ssl_obj = (VALUE)ptr; + ary = rb_ary_new2(2); + rb_ary_push(ary, ssl_obj); + rb_ary_push(ary, rb_str_new((const char *)buf, len)); + + ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_get_cb, ary, &state); + if (state) { + rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state)); + return NULL; + } + if (!rb_obj_is_instance_of(ret_obj, cSSLSession)) + return NULL; + + SafeGetSSLSession(ret_obj, sess); + *copy = 1; + + return sess; +} + +static VALUE +ossl_call_session_new_cb(VALUE ary) +{ + VALUE ssl_obj, sslctx_obj, cb; + + Check_Type(ary, T_ARRAY); + ssl_obj = rb_ary_entry(ary, 0); + + sslctx_obj = rb_iv_get(ssl_obj, "@context"); + if (NIL_P(sslctx_obj)) return Qnil; + cb = rb_iv_get(sslctx_obj, "@session_new_cb"); + if (NIL_P(cb)) return Qnil; + + return rb_funcall(cb, rb_intern("call"), 1, ary); +} + +/* return 1 normal. return 0 removes the session */ +static int +ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess) +{ + VALUE ary, ssl_obj, sess_obj, ret_obj; + void *ptr; + int state = 0; + + OSSL_Debug("SSL SESSION new callback entered"); + + if ((ptr = SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx)) == NULL) + return 1; + ssl_obj = (VALUE)ptr; + sess_obj = rb_obj_alloc(cSSLSession); + CRYPTO_add(&sess->references, 1, CRYPTO_LOCK_SSL_SESSION); + DATA_PTR(sess_obj) = sess; + + ary = rb_ary_new2(2); + rb_ary_push(ary, ssl_obj); + rb_ary_push(ary, sess_obj); + + ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_new_cb, ary, &state); + if (state) { + rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state)); + return 0; /* what should be returned here??? */ + } + + return RTEST(ret_obj) ? 1 : 0; +} + +#if 0 /* unused */ +static VALUE +ossl_call_session_remove_cb(VALUE ary) +{ + VALUE sslctx_obj, cb; + + Check_Type(ary, T_ARRAY); + sslctx_obj = rb_ary_entry(ary, 0); + + cb = rb_iv_get(sslctx_obj, "@session_remove_cb"); + if (NIL_P(cb)) return Qnil; + + return rb_funcall(cb, rb_intern("call"), 1, ary); +} +#endif + +static void +ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess) +{ + VALUE ary, sslctx_obj, sess_obj, ret_obj; + void *ptr; + int state = 0; + + OSSL_Debug("SSL SESSION remove callback entered"); + + if ((ptr = SSL_CTX_get_ex_data(ctx, ossl_ssl_ex_ptr_idx)) == NULL) + return; + sslctx_obj = (VALUE)ptr; + sess_obj = rb_obj_alloc(cSSLSession); + CRYPTO_add(&sess->references, 1, CRYPTO_LOCK_SSL_SESSION); + DATA_PTR(sess_obj) = sess; + + ary = rb_ary_new2(2); + rb_ary_push(ary, sslctx_obj); + rb_ary_push(ary, sess_obj); + + ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_new_cb, ary, &state); + if (state) { +/* + the SSL_CTX is frozen, nowhere to save state. + there is no common accessor method to check it either. + rb_ivar_set(sslctx_obj, ID_callback_state, INT2NUM(state)); +*/ + } +} + +static VALUE +ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg) +{ + X509 *x509; + SSL_CTX *ctx; + + Data_Get_Struct(arg, SSL_CTX, ctx); + x509 = DupX509CertPtr(i); + if(!SSL_CTX_add_extra_chain_cert(ctx, x509)){ + ossl_raise(eSSLError, NULL); + } + + return i; +} + +/* + * call-seq: + * ctx.setup => Qtrue # first time + * ctx.setup => nil # thereafter + * + * This method is called automatically when a new SSLSocket is created. + * Normally you do not need to call this method (unless you are writing an extension in C). + */ +static VALUE +ossl_sslctx_setup(VALUE self) +{ + SSL_CTX *ctx; + X509 *cert = NULL, *client_ca = NULL; + X509_STORE *store; + EVP_PKEY *key = NULL; + char *ca_path = NULL, *ca_file = NULL; + int i, verify_mode; + VALUE val; + + if(OBJ_FROZEN(self)) return Qnil; + Data_Get_Struct(self, SSL_CTX, ctx); + +#if !defined(OPENSSL_NO_DH) + if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){ + SSL_CTX_set_tmp_dh_callback(ctx, ossl_tmp_dh_callback); + } + else{ + SSL_CTX_set_tmp_dh_callback(ctx, ossl_default_tmp_dh_callback); + } +#endif + SSL_CTX_set_ex_data(ctx, ossl_ssl_ex_ptr_idx, (void*)self); + + val = ossl_sslctx_get_cert_store(self); + if(!NIL_P(val)){ + /* + * WORKAROUND: + * X509_STORE can count references, but + * X509_STORE_free() doesn't care it. + * So we won't increment it but mark it by ex_data. + */ + store = GetX509StorePtr(val); /* NO NEED TO DUP */ + SSL_CTX_set_cert_store(ctx, store); + SSL_CTX_set_ex_data(ctx, ossl_ssl_ex_store_p, (void*)1); + } + + val = ossl_sslctx_get_extra_cert(self); + if(!NIL_P(val)){ + rb_block_call(val, rb_intern("each"), 0, 0, ossl_sslctx_add_extra_chain_cert_i, self); + } + + /* private key may be bundled in certificate file. */ + val = ossl_sslctx_get_cert(self); + cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */ + val = ossl_sslctx_get_key(self); + key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */ + if (cert && key) { + if (!SSL_CTX_use_certificate(ctx, cert)) { + /* Adds a ref => Safe to FREE */ + ossl_raise(eSSLError, "SSL_CTX_use_certificate:"); + } + if (!SSL_CTX_use_PrivateKey(ctx, key)) { + /* Adds a ref => Safe to FREE */ + ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:"); + } + if (!SSL_CTX_check_private_key(ctx)) { + ossl_raise(eSSLError, "SSL_CTX_check_private_key:"); + } + } + + val = ossl_sslctx_get_client_ca(self); + if(!NIL_P(val)){ + if(TYPE(val) == T_ARRAY){ + for(i = 0; i < RARRAY_LEN(val); i++){ + client_ca = GetX509CertPtr(RARRAY_PTR(val)[i]); + if (!SSL_CTX_add_client_CA(ctx, client_ca)){ + /* Copies X509_NAME => FREE it. */ + ossl_raise(eSSLError, "SSL_CTX_add_client_CA"); + } + } + } + else{ + client_ca = GetX509CertPtr(val); /* NO DUP NEEDED. */ + if (!SSL_CTX_add_client_CA(ctx, client_ca)){ + /* Copies X509_NAME => FREE it. */ + ossl_raise(eSSLError, "SSL_CTX_add_client_CA"); + } + } + } + + val = ossl_sslctx_get_ca_file(self); + ca_file = NIL_P(val) ? NULL : StringValuePtr(val); + val = ossl_sslctx_get_ca_path(self); + ca_path = NIL_P(val) ? NULL : StringValuePtr(val); + if(ca_file || ca_path){ + if (!SSL_CTX_load_verify_locations(ctx, ca_file, ca_path)) + rb_warning("can't set verify locations"); + } + + val = ossl_sslctx_get_verify_mode(self); + verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val); + SSL_CTX_set_verify(ctx, verify_mode, ossl_ssl_verify_callback); + if (RTEST(ossl_sslctx_get_client_cert_cb(self))) + SSL_CTX_set_client_cert_cb(ctx, ossl_client_cert_cb); + + val = ossl_sslctx_get_timeout(self); + if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val)); + + val = ossl_sslctx_get_verify_dep(self); + if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val)); + + val = ossl_sslctx_get_options(self); + if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val)); + rb_obj_freeze(self); + + val = ossl_sslctx_get_sess_id_ctx(self); + if (!NIL_P(val)){ + StringValue(val); + if (!SSL_CTX_set_session_id_context(ctx, (unsigned char *)RSTRING_PTR(val), + RSTRING_LEN(val))){ + ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:"); + } + } + + if (RTEST(rb_iv_get(self, "@session_get_cb"))) { + SSL_CTX_sess_set_get_cb(ctx, ossl_sslctx_session_get_cb); + OSSL_Debug("SSL SESSION get callback added"); + } + if (RTEST(rb_iv_get(self, "@session_new_cb"))) { + SSL_CTX_sess_set_new_cb(ctx, ossl_sslctx_session_new_cb); + OSSL_Debug("SSL SESSION new callback added"); + } + if (RTEST(rb_iv_get(self, "@session_remove_cb"))) { + SSL_CTX_sess_set_remove_cb(ctx, ossl_sslctx_session_remove_cb); + OSSL_Debug("SSL SESSION remove callback added"); + } + return Qtrue; +} + +static VALUE +ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher) +{ + VALUE ary; + int bits, alg_bits; + + ary = rb_ary_new2(4); + rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher))); + rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher))); + bits = SSL_CIPHER_get_bits(cipher, &alg_bits); + rb_ary_push(ary, INT2FIX(bits)); + rb_ary_push(ary, INT2FIX(alg_bits)); + + return ary; +} + +/* + * call-seq: + * ctx.ciphers => [[name, version, bits, alg_bits], ...] + */ +static VALUE +ossl_sslctx_get_ciphers(VALUE self) +{ + SSL_CTX *ctx; + STACK_OF(SSL_CIPHER) *ciphers; + SSL_CIPHER *cipher; + VALUE ary; + int i, num; + + Data_Get_Struct(self, SSL_CTX, ctx); + if(!ctx){ + rb_warning("SSL_CTX is not initialized."); + return Qnil; + } + ciphers = ctx->cipher_list; + + if (!ciphers) + return rb_ary_new(); + + num = sk_num((STACK*)ciphers); + ary = rb_ary_new2(num); + for(i = 0; i < num; i++){ + cipher = (SSL_CIPHER*)sk_value((STACK*)ciphers, i); + rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher)); + } + return ary; +} + +/* + * call-seq: + * ctx.ciphers = "cipher1:cipher2:..." + * ctx.ciphers = [name, ...] + * ctx.ciphers = [[name, version, bits, alg_bits], ...] + */ +static VALUE +ossl_sslctx_set_ciphers(VALUE self, VALUE v) +{ + SSL_CTX *ctx; + VALUE str, elem; + int i; + + rb_check_frozen(self); + if (NIL_P(v)) + return v; + else if (TYPE(v) == T_ARRAY) { + str = rb_str_new(0, 0); + for (i = 0; i < RARRAY_LEN(v); i++) { + elem = rb_ary_entry(v, i); + if (TYPE(elem) == T_ARRAY) elem = rb_ary_entry(elem, 0); + elem = rb_String(elem); + rb_str_append(str, elem); + if (i < RARRAY_LEN(v)-1) rb_str_cat2(str, ":"); + } + } else { + str = v; + StringValue(str); + } + + Data_Get_Struct(self, SSL_CTX, ctx); + if(!ctx){ + ossl_raise(eSSLError, "SSL_CTX is not initialized."); + return Qnil; + } + if (!SSL_CTX_set_cipher_list(ctx, RSTRING_PTR(str))) { + ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:"); + } + + return v; +} + + +/* + * call-seq: + * ctx.session_add(session) -> true | false + * + */ +static VALUE +ossl_sslctx_session_add(VALUE self, VALUE arg) +{ + SSL_CTX *ctx; + SSL_SESSION *sess; + + Data_Get_Struct(self, SSL_CTX, ctx); + SafeGetSSLSession(arg, sess); + + return SSL_CTX_add_session(ctx, sess) == 1 ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ctx.session_remove(session) -> true | false + * + */ +static VALUE +ossl_sslctx_session_remove(VALUE self, VALUE arg) +{ + SSL_CTX *ctx; + SSL_SESSION *sess; + + Data_Get_Struct(self, SSL_CTX, ctx); + SafeGetSSLSession(arg, sess); + + return SSL_CTX_remove_session(ctx, sess) == 1 ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ctx.session_cache_mode -> integer + * + */ +static VALUE +ossl_sslctx_get_session_cache_mode(VALUE self) +{ + SSL_CTX *ctx; + + Data_Get_Struct(self, SSL_CTX, ctx); + + return LONG2NUM(SSL_CTX_get_session_cache_mode(ctx)); +} + +/* + * call-seq: + * ctx.session_cache_mode=(integer) -> integer + * + */ +static VALUE +ossl_sslctx_set_session_cache_mode(VALUE self, VALUE arg) +{ + SSL_CTX *ctx; + + Data_Get_Struct(self, SSL_CTX, ctx); + + SSL_CTX_set_session_cache_mode(ctx, NUM2LONG(arg)); + + return arg; +} + +/* + * call-seq: + * ctx.session_cache_size -> integer + * + */ +static VALUE +ossl_sslctx_get_session_cache_size(VALUE self) +{ + SSL_CTX *ctx; + + Data_Get_Struct(self, SSL_CTX, ctx); + + return LONG2NUM(SSL_CTX_sess_get_cache_size(ctx)); +} + +/* + * call-seq: + * ctx.session_cache_size=(integer) -> integer + * + */ +static VALUE +ossl_sslctx_set_session_cache_size(VALUE self, VALUE arg) +{ + SSL_CTX *ctx; + + Data_Get_Struct(self, SSL_CTX, ctx); + + SSL_CTX_sess_set_cache_size(ctx, NUM2LONG(arg)); + + return arg; +} + +/* + * call-seq: + * ctx.session_cache_stats -> Hash + * + */ +static VALUE +ossl_sslctx_get_session_cache_stats(VALUE self) +{ + SSL_CTX *ctx; + VALUE hash; + + Data_Get_Struct(self, SSL_CTX, ctx); + + hash = rb_hash_new(); + rb_hash_aset(hash, ID2SYM(rb_intern("cache_num")), LONG2NUM(SSL_CTX_sess_number(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("connect")), LONG2NUM(SSL_CTX_sess_connect(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("connect_good")), LONG2NUM(SSL_CTX_sess_connect_good(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("connect_renegotiate")), LONG2NUM(SSL_CTX_sess_connect_renegotiate(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("accept")), LONG2NUM(SSL_CTX_sess_accept(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("accept_good")), LONG2NUM(SSL_CTX_sess_accept_good(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("accept_renegotiate")), LONG2NUM(SSL_CTX_sess_accept_renegotiate(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("cache_hits")), LONG2NUM(SSL_CTX_sess_hits(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("cb_hits")), LONG2NUM(SSL_CTX_sess_cb_hits(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("cache_misses")), LONG2NUM(SSL_CTX_sess_misses(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("cache_full")), LONG2NUM(SSL_CTX_sess_cache_full(ctx))); + rb_hash_aset(hash, ID2SYM(rb_intern("timeouts")), LONG2NUM(SSL_CTX_sess_timeouts(ctx))); + + return hash; +} + + +/* + * call-seq: + * ctx.flush_sessions(time | nil) -> self + * + */ +static VALUE +ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self) +{ + VALUE arg1; + SSL_CTX *ctx; + time_t tm = 0; + + rb_scan_args(argc, argv, "01", &arg1); + + Data_Get_Struct(self, SSL_CTX, ctx); + + if (NIL_P(arg1)) { + tm = time(0); + } else if (rb_obj_is_instance_of(arg1, rb_cTime)) { + tm = NUM2LONG(rb_funcall(arg1, rb_intern("to_i"), 0)); + } else { + rb_raise(rb_eArgError, "arg must be Time or nil"); + } + + SSL_CTX_flush_sessions(ctx, tm); + + return self; +} + +/* + * SSLSocket class + */ +static void +ossl_ssl_shutdown(SSL *ssl) +{ + if (ssl) { + SSL_shutdown(ssl); + SSL_clear(ssl); + } +} + +static void +ossl_ssl_free(SSL *ssl) +{ + ossl_ssl_shutdown(ssl); + SSL_free(ssl); +} + +static VALUE +ossl_ssl_s_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, ossl_ssl_free, NULL); +} + +/* + * call-seq: + * SSLSocket.new(io) => aSSLSocket + * SSLSocket.new(io, ctx) => aSSLSocket + * + * === Parameters + * * +io+ is a real ruby IO object. Not an IO like object that responds to read/write. + * * +ctx+ is an OpenSSLSSL::SSLContext. + * + * The OpenSSL::Buffering module provides additional IO methods. + * + * This method will freeze the SSLContext if one is provided; + * however, session management is still allowed in the frozen SSLContext. + */ +static VALUE +ossl_ssl_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE io, ctx; + + if (rb_scan_args(argc, argv, "11", &io, &ctx) == 1) { + ctx = rb_funcall(cSSLContext, rb_intern("new"), 0); + } + OSSL_Check_Kind(ctx, cSSLContext); + Check_Type(io, T_FILE); + ossl_ssl_set_io(self, io); + ossl_ssl_set_ctx(self, ctx); + ossl_ssl_set_sync_close(self, Qfalse); + ossl_sslctx_setup(ctx); + rb_call_super(0, 0); + + return self; +} + +static VALUE +ossl_ssl_setup(VALUE self) +{ + VALUE io, v_ctx, cb; + SSL_CTX *ctx; + SSL *ssl; + rb_io_t *fptr; + + Data_Get_Struct(self, SSL, ssl); + if(!ssl){ + v_ctx = ossl_ssl_get_ctx(self); + Data_Get_Struct(v_ctx, SSL_CTX, ctx); + + ssl = SSL_new(ctx); + if (!ssl) { + ossl_raise(eSSLError, "SSL_new:"); + } + DATA_PTR(self) = ssl; + + io = ossl_ssl_get_io(self); + GetOpenFile(io, fptr); + rb_io_check_readable(fptr); + rb_io_check_writable(fptr); + SSL_set_fd(ssl, TO_SOCKET(FPTR_TO_FD(fptr))); + SSL_set_ex_data(ssl, ossl_ssl_ex_ptr_idx, (void*)self); + cb = ossl_sslctx_get_verify_cb(v_ctx); + SSL_set_ex_data(ssl, ossl_ssl_ex_vcb_idx, (void*)cb); + cb = ossl_sslctx_get_client_cert_cb(v_ctx); + SSL_set_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx, (void*)cb); + cb = ossl_sslctx_get_tmp_dh_cb(v_ctx); + SSL_set_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx, (void*)cb); + } + + return Qtrue; +} + +#ifdef _WIN32 +#define ssl_get_error(ssl, ret) (errno = WSAGetLastError(), SSL_get_error(ssl, ret)) +#else +#define ssl_get_error(ssl, ret) SSL_get_error(ssl, ret) +#endif + +static VALUE +ossl_start_ssl(VALUE self, int (*func)(), const char *funcname) +{ + SSL *ssl; + rb_io_t *fptr; + int ret, ret2; + VALUE cb_state; + + rb_ivar_set(self, ID_callback_state, Qnil); + + Data_Get_Struct(self, SSL, ssl); + GetOpenFile(ossl_ssl_get_io(self), fptr); + for(;;){ + if((ret = func(ssl)) > 0) break; + switch((ret2 = ssl_get_error(ssl, ret))){ + case SSL_ERROR_WANT_WRITE: + rb_io_wait_writable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_WANT_READ: + rb_io_wait_readable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_SYSCALL: + if (errno) rb_sys_fail(funcname); + ossl_raise(eSSLError, "%s SYSCALL returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl)); + default: + ossl_raise(eSSLError, "%s returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl)); + } + } + + cb_state = rb_ivar_get(self, ID_callback_state); + if (!NIL_P(cb_state)) + rb_jump_tag(NUM2INT(cb_state)); + + return self; +} + +/* + * call-seq: + * ssl.connect => self + */ +static VALUE +ossl_ssl_connect(VALUE self) +{ + ossl_ssl_setup(self); + return ossl_start_ssl(self, SSL_connect, "SSL_connect"); +} + +/* + * call-seq: + * ssl.accept => self + */ +static VALUE +ossl_ssl_accept(VALUE self) +{ + ossl_ssl_setup(self); + return ossl_start_ssl(self, SSL_accept, "SSL_accept"); +} + +/* + * call-seq: + * ssl.sysread(length) => string + * ssl.sysread(length, buffer) => buffer + * + * === Parameters + * * +length+ is a positive integer. + * * +buffer+ is a string used to store the result. + */ +static VALUE +ossl_ssl_read(int argc, VALUE *argv, VALUE self) +{ + SSL *ssl; + int ilen, nread = 0; + VALUE len, str; + rb_io_t *fptr; + + rb_scan_args(argc, argv, "11", &len, &str); + ilen = NUM2INT(len); + if(NIL_P(str)) str = rb_str_new(0, ilen); + else{ + StringValue(str); + rb_str_modify(str); + rb_str_resize(str, ilen); + } + if(ilen == 0) return str; + + Data_Get_Struct(self, SSL, ssl); + GetOpenFile(ossl_ssl_get_io(self), fptr); + if (ssl) { + if(SSL_pending(ssl) <= 0) + rb_thread_wait_fd(FPTR_TO_FD(fptr)); + for (;;){ + nread = SSL_read(ssl, RSTRING_PTR(str), RSTRING_LEN(str)); + switch(ssl_get_error(ssl, nread)){ + case SSL_ERROR_NONE: + goto end; + case SSL_ERROR_ZERO_RETURN: + rb_eof_error(); + case SSL_ERROR_WANT_WRITE: + rb_io_wait_writable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_WANT_READ: + rb_io_wait_readable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_SYSCALL: + if(ERR_peek_error() == 0 && nread == 0) rb_eof_error(); + rb_sys_fail(0); + default: + ossl_raise(eSSLError, "SSL_read:"); + } + } + } + else { + ID id_sysread = rb_intern("sysread"); + rb_warning("SSL session is not started yet."); + return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str); + } + + end: + rb_str_set_len(str, nread); + OBJ_TAINT(str); + + return str; +} + +/* + * call-seq: + * ssl.syswrite(string) => integer + */ +static VALUE +ossl_ssl_write(VALUE self, VALUE str) +{ + SSL *ssl; + int nwrite = 0; + rb_io_t *fptr; + + StringValue(str); + Data_Get_Struct(self, SSL, ssl); + GetOpenFile(ossl_ssl_get_io(self), fptr); + + if (ssl) { + for (;;){ + nwrite = SSL_write(ssl, RSTRING_PTR(str), RSTRING_LEN(str)); + switch(ssl_get_error(ssl, nwrite)){ + case SSL_ERROR_NONE: + goto end; + case SSL_ERROR_WANT_WRITE: + rb_io_wait_writable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_WANT_READ: + rb_io_wait_readable(FPTR_TO_FD(fptr)); + continue; + case SSL_ERROR_SYSCALL: + if (errno) rb_sys_fail(0); + default: + ossl_raise(eSSLError, "SSL_write:"); + } + } + } + else { + ID id_syswrite = rb_intern("syswrite"); + rb_warning("SSL session is not started yet."); + return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str); + } + + end: + return INT2NUM(nwrite); +} + +/* + * call-seq: + * ssl.sysclose => nil + */ +static VALUE +ossl_ssl_close(VALUE self) +{ + SSL *ssl; + + Data_Get_Struct(self, SSL, ssl); + ossl_ssl_shutdown(ssl); + if (RTEST(ossl_ssl_get_sync_close(self))) + rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0); + + return Qnil; +} + +/* + * call-seq: + * ssl.cert => cert or nil + */ +static VALUE +ossl_ssl_get_cert(VALUE self) +{ + SSL *ssl; + X509 *cert = NULL; + + Data_Get_Struct(self, SSL, ssl); + if (ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + + /* + * Is this OpenSSL bug? Should add a ref? + * TODO: Ask for. + */ + cert = SSL_get_certificate(ssl); /* NO DUPs => DON'T FREE. */ + + if (!cert) { + return Qnil; + } + return ossl_x509_new(cert); +} + +/* + * call-seq: + * ssl.peer_cert => cert or nil + */ +static VALUE +ossl_ssl_get_peer_cert(VALUE self) +{ + SSL *ssl; + X509 *cert = NULL; + VALUE obj; + + Data_Get_Struct(self, SSL, ssl); + + if (!ssl){ + rb_warning("SSL session is not started yet."); + return Qnil; + } + + cert = SSL_get_peer_certificate(ssl); /* Adds a ref => Safe to FREE. */ + + if (!cert) { + return Qnil; + } + obj = ossl_x509_new(cert); + X509_free(cert); + + return obj; +} + +/* + * call-seq: + * ssl.peer_cert_chain => [cert, ...] or nil + */ +static VALUE +ossl_ssl_get_peer_cert_chain(VALUE self) +{ + SSL *ssl; + STACK_OF(X509) *chain; + X509 *cert; + VALUE ary; + int i, num; + + Data_Get_Struct(self, SSL, ssl); + if(!ssl){ + rb_warning("SSL session is not started yet."); + return Qnil; + } + chain = SSL_get_peer_cert_chain(ssl); + if(!chain) return Qnil; + num = sk_num(chain); + ary = rb_ary_new2(num); + for (i = 0; i < num; i++){ + cert = (X509*)sk_value(chain, i); + rb_ary_push(ary, ossl_x509_new(cert)); + } + + return ary; +} + +/* + * call-seq: + * ssl.cipher => [name, version, bits, alg_bits] + */ +static VALUE +ossl_ssl_get_cipher(VALUE self) +{ + SSL *ssl; + SSL_CIPHER *cipher; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + cipher = SSL_get_current_cipher(ssl); + + return ossl_ssl_cipher_to_ary(cipher); +} + +/* + * call-seq: + * ssl.state => string + */ +static VALUE +ossl_ssl_get_state(VALUE self) +{ + SSL *ssl; + VALUE ret; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + ret = rb_str_new2(SSL_state_string(ssl)); + if (ruby_verbose) { + rb_str_cat2(ret, ": "); + rb_str_cat2(ret, SSL_state_string_long(ssl)); + } + return ret; +} + +/* + * call-seq: + * ssl.pending => integer + */ +static VALUE +ossl_ssl_pending(VALUE self) +{ + SSL *ssl; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + + return INT2NUM(SSL_pending(ssl)); +} + +/* + * call-seq: + * ssl.session_reused? -> true | false + * + */ +static VALUE +ossl_ssl_session_reused(VALUE self) +{ + SSL *ssl; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + + switch(SSL_session_reused(ssl)) { + case 1: return Qtrue; + case 0: return Qfalse; + default: ossl_raise(eSSLError, "SSL_session_reused"); + } +} + +/* + * call-seq: + * ssl.session = session -> session + * + */ +static VALUE +ossl_ssl_set_session(VALUE self, VALUE arg1) +{ + SSL *ssl; + SSL_SESSION *sess; + +/* why is ossl_ssl_setup delayed? */ + ossl_ssl_setup(self); + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + + SafeGetSSLSession(arg1, sess); + + if (SSL_set_session(ssl, sess) != 1) + ossl_raise(eSSLError, "SSL_set_session"); + + return arg1; +} + +static VALUE +ossl_ssl_get_verify_result(VALUE self) +{ + SSL *ssl; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { + rb_warning("SSL session is not started yet."); + return Qnil; + } + + return INT2FIX(SSL_get_verify_result(ssl)); +} + +void +Init_ossl_ssl() +{ + int i; + VALUE ary; + +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); +#endif + + ID_callback_state = rb_intern("@callback_state"); + + ossl_ssl_ex_vcb_idx = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_vcb_idx",0,0,0); + ossl_ssl_ex_store_p = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_store_p",0,0,0); + ossl_ssl_ex_ptr_idx = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_ptr_idx",0,0,0); + ossl_ssl_ex_client_cert_cb_idx = + SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_client_cert_cb_idx",0,0,0); + ossl_ssl_ex_tmp_dh_callback_idx = + SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_tmp_dh_callback_idx",0,0,0); + + mSSL = rb_define_module_under(mOSSL, "SSL"); + eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError); + + Init_ossl_ssl_session(); + + /* class SSLContext + * + * The following attributes are available but don't show up in rdoc. + * All attributes must be set before calling SSLSocket.new(io, ctx). + * * ssl_version, cert, key, client_ca, ca_file, ca_path, timeout, + * * verify_mode, verify_depth client_cert_cb, tmp_dh_callback, + * * session_id_context, session_add_cb, session_new_cb, session_remove_cb + */ + cSSLContext = rb_define_class_under(mSSL, "SSLContext", rb_cObject); + rb_define_alloc_func(cSSLContext, ossl_sslctx_s_alloc); + for(i = 0; i < numberof(ossl_sslctx_attrs); i++) + rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse); + rb_define_alias(cSSLContext, "ssl_timeout", "timeout"); + rb_define_method(cSSLContext, "initialize", ossl_sslctx_initialize, -1); + rb_define_method(cSSLContext, "ssl_version=", ossl_sslctx_set_ssl_version, 1); + rb_define_method(cSSLContext, "ciphers", ossl_sslctx_get_ciphers, 0); + rb_define_method(cSSLContext, "ciphers=", ossl_sslctx_set_ciphers, 1); + + rb_define_method(cSSLContext, "setup", ossl_sslctx_setup, 0); + + + rb_define_const(cSSLContext, "SESSION_CACHE_OFF", LONG2FIX(SSL_SESS_CACHE_OFF)); + rb_define_const(cSSLContext, "SESSION_CACHE_CLIENT", LONG2FIX(SSL_SESS_CACHE_CLIENT)); /* doesn't actually do anything in 0.9.8e */ + rb_define_const(cSSLContext, "SESSION_CACHE_SERVER", LONG2FIX(SSL_SESS_CACHE_SERVER)); + rb_define_const(cSSLContext, "SESSION_CACHE_BOTH", LONG2FIX(SSL_SESS_CACHE_BOTH)); /* no different than CACHE_SERVER in 0.9.8e */ + rb_define_const(cSSLContext, "SESSION_CACHE_NO_AUTO_CLEAR", LONG2FIX(SSL_SESS_CACHE_NO_AUTO_CLEAR)); + rb_define_const(cSSLContext, "SESSION_CACHE_NO_INTERNAL_LOOKUP", LONG2FIX(SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)); + rb_define_const(cSSLContext, "SESSION_CACHE_NO_INTERNAL_STORE", LONG2FIX(SSL_SESS_CACHE_NO_INTERNAL_STORE)); + rb_define_const(cSSLContext, "SESSION_CACHE_NO_INTERNAL", LONG2FIX(SSL_SESS_CACHE_NO_INTERNAL)); + rb_define_method(cSSLContext, "session_add", ossl_sslctx_session_add, 1); + rb_define_method(cSSLContext, "session_remove", ossl_sslctx_session_remove, 1); + rb_define_method(cSSLContext, "session_cache_mode", ossl_sslctx_get_session_cache_mode, 0); + rb_define_method(cSSLContext, "session_cache_mode=", ossl_sslctx_set_session_cache_mode, 1); + rb_define_method(cSSLContext, "session_cache_size", ossl_sslctx_get_session_cache_size, 0); + rb_define_method(cSSLContext, "session_cache_size=", ossl_sslctx_set_session_cache_size, 1); + rb_define_method(cSSLContext, "session_cache_stats", ossl_sslctx_get_session_cache_stats, 0); + rb_define_method(cSSLContext, "flush_sessions", ossl_sslctx_flush_sessions, -1); + + ary = rb_ary_new2(numberof(ossl_ssl_method_tab)); + for (i = 0; i < numberof(ossl_ssl_method_tab); i++) { + rb_ary_push(ary, ID2SYM(rb_intern(ossl_ssl_method_tab[i].name))); + } + rb_obj_freeze(ary); + /* holds a list of available SSL/TLS methods */ + rb_define_const(cSSLContext, "METHODS", ary); + + /* class SSLSocket + * + * The following attributes are available but don't show up in rdoc. + * * io, context, sync_close + * + */ + cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject); + rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc); + for(i = 0; i < numberof(ossl_ssl_attr_readers); i++) + rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse); + for(i = 0; i < numberof(ossl_ssl_attrs); i++) + rb_attr(cSSLSocket, rb_intern(ossl_ssl_attrs[i]), 1, 1, Qfalse); + rb_define_alias(cSSLSocket, "to_io", "io"); + rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1); + rb_define_method(cSSLSocket, "connect", ossl_ssl_connect, 0); + rb_define_method(cSSLSocket, "accept", ossl_ssl_accept, 0); + rb_define_method(cSSLSocket, "sysread", ossl_ssl_read, -1); + rb_define_method(cSSLSocket, "syswrite", ossl_ssl_write, 1); + rb_define_method(cSSLSocket, "sysclose", ossl_ssl_close, 0); + rb_define_method(cSSLSocket, "cert", ossl_ssl_get_cert, 0); + rb_define_method(cSSLSocket, "peer_cert", ossl_ssl_get_peer_cert, 0); + rb_define_method(cSSLSocket, "peer_cert_chain", ossl_ssl_get_peer_cert_chain, 0); + rb_define_method(cSSLSocket, "cipher", ossl_ssl_get_cipher, 0); + rb_define_method(cSSLSocket, "state", ossl_ssl_get_state, 0); + rb_define_method(cSSLSocket, "pending", ossl_ssl_pending, 0); + rb_define_method(cSSLSocket, "session_reused?", ossl_ssl_session_reused, 0); + rb_define_method(cSSLSocket, "session=", ossl_ssl_set_session, 1); + rb_define_method(cSSLSocket, "verify_result", ossl_ssl_get_verify_result, 0); + +#define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2FIX(SSL_##x)) + + ossl_ssl_def_const(VERIFY_NONE); + ossl_ssl_def_const(VERIFY_PEER); + ossl_ssl_def_const(VERIFY_FAIL_IF_NO_PEER_CERT); + ossl_ssl_def_const(VERIFY_CLIENT_ONCE); + /* Not introduce constants included in OP_ALL such as... + * ossl_ssl_def_const(OP_MICROSOFT_SESS_ID_BUG); + * ossl_ssl_def_const(OP_NETSCAPE_CHALLENGE_BUG); + * ossl_ssl_def_const(OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG); + * ossl_ssl_def_const(OP_SSLREF2_REUSE_CERT_TYPE_BUG); + * ossl_ssl_def_const(OP_MICROSOFT_BIG_SSLV3_BUFFER); + * ossl_ssl_def_const(OP_MSIE_SSLV2_RSA_PADDING); + * ossl_ssl_def_const(OP_SSLEAY_080_CLIENT_DH_BUG); + * ossl_ssl_def_const(OP_TLS_D5_BUG); + * ossl_ssl_def_const(OP_TLS_BLOCK_PADDING_BUG); + * ossl_ssl_def_const(OP_DONT_INSERT_EMPTY_FRAGMENTS); + */ + ossl_ssl_def_const(OP_ALL); +#if defined(SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION) + ossl_ssl_def_const(OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION); +#endif +#if defined(SSL_OP_SINGLE_ECDH_USE) + ossl_ssl_def_const(OP_SINGLE_ECDH_USE); +#endif + ossl_ssl_def_const(OP_SINGLE_DH_USE); + ossl_ssl_def_const(OP_EPHEMERAL_RSA); +#if defined(SSL_OP_CIPHER_SERVER_PREFERENCE) + ossl_ssl_def_const(OP_CIPHER_SERVER_PREFERENCE); +#endif + ossl_ssl_def_const(OP_TLS_ROLLBACK_BUG); + ossl_ssl_def_const(OP_NO_SSLv2); + ossl_ssl_def_const(OP_NO_SSLv3); + ossl_ssl_def_const(OP_NO_TLSv1); +#if defined(SSL_OP_NO_TICKET) + ossl_ssl_def_const(OP_NO_TICKET); +#endif + ossl_ssl_def_const(OP_PKCS1_CHECK_1); + ossl_ssl_def_const(OP_PKCS1_CHECK_2); + ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG); + ossl_ssl_def_const(OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.h new file mode 100644 index 0000000..84959c8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl.h @@ -0,0 +1,36 @@ +/* + * $Id: ossl_ssl.h 12134 2007-04-02 22:10:12Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_SSL_H_) +#define _OSSL_SSL_H_ + +#define GetSSLSession(obj, sess) do { \ + Data_Get_Struct(obj, SSL_SESSION, sess); \ + if (!sess) { \ + ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \ + } \ +} while (0) + +#define SafeGetSSLSession(obj, sess) do { \ + OSSL_Check_Kind(obj, cSSLSession); \ + GetSSLSession(obj, sess); \ +} while (0) + +extern VALUE mSSL; +extern VALUE eSSLError; +extern VALUE cSSLSocket; +extern VALUE cSSLContext; +extern VALUE cSSLSession; + +void Init_ossl_ssl(void); +void Init_ossl_ssl_session(void); + +#endif /* _OSSL_SSL_H_ */ + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl_session.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl_session.c new file mode 100644 index 0000000..b236e4d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_ssl_session.c @@ -0,0 +1,296 @@ +/* + * Copyright (C) 2004-2007 Technorama Ltd. + */ + +#include "ossl.h" + +#define GetSSLSession(obj, sess) do { \ + Data_Get_Struct(obj, SSL_SESSION, sess); \ + if (!sess) { \ + ossl_raise(rb_eRuntimeError, "SSL Session wasn't initialized."); \ + } \ +} while (0) + +#define SafeGetSSLSession(obj, sess) do { \ + OSSL_Check_Kind(obj, cSSLSession); \ + GetSSLSession(obj, sess); \ +} while (0) + + +VALUE cSSLSession; +static VALUE eSSLSession; + +static VALUE ossl_ssl_session_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, SSL_SESSION_free, NULL); +} + +/* + * call-seq: + * Session.new(SSLSocket | string) => session + * + * === Parameters + * +SSLSocket+ is an OpenSSL::SSL::SSLSocket + * +string+ must be a DER or PEM encoded Session. +*/ +static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1) +{ + SSL_SESSION *ctx = NULL; + + if (RDATA(self)->data) + ossl_raise(eSSLSession, "SSL Session already initialized"); + + if (rb_obj_is_instance_of(arg1, cSSLSocket)) { + SSL *ssl; + + Data_Get_Struct(arg1, SSL, ssl); + + if (!ssl || (ctx = SSL_get1_session(ssl)) == NULL) + ossl_raise(eSSLSession, "no session available"); + } else { + BIO *in = ossl_obj2bio(arg1); + + ctx = PEM_read_bio_SSL_SESSION(in, NULL, NULL, NULL); + + if (!ctx) { + (void)BIO_reset(in); + ctx = d2i_SSL_SESSION_bio(in, NULL); + } + + BIO_free(in); + + if (!ctx) + ossl_raise(rb_eArgError, "unknown type"); + } + + /* should not happen */ + if (ctx == NULL) + ossl_raise(eSSLSession, "ctx not set - internal error"); + + RDATA(self)->data = ctx; + + return self; +} + +/* + * call-seq: + * session1 == session2 -> boolean + * +*/ +static VALUE ossl_ssl_session_eq(VALUE val1, VALUE val2) +{ + SSL_SESSION *ctx1, *ctx2; + + GetSSLSession(val1, ctx1); + SafeGetSSLSession(val2, ctx2); + + switch (SSL_SESSION_cmp(ctx1, ctx2)) { + case 0: return Qtrue; + default: return Qfalse; + } +} + +/* + * call-seq: + * session.time -> Time + * +*/ +static VALUE ossl_ssl_session_get_time(VALUE self) +{ + SSL_SESSION *ctx; + time_t t; + + GetSSLSession(self, ctx); + + t = SSL_SESSION_get_time(ctx); + + if (t == 0) + return Qnil; + + return rb_funcall(rb_cTime, rb_intern("at"), 1, LONG2NUM(t)); +} + +/* + * call-seq: + * session.timeout -> integer + * + * How long until the session expires in seconds. + * +*/ +static VALUE ossl_ssl_session_get_timeout(VALUE self) +{ + SSL_SESSION *ctx; + time_t t; + + GetSSLSession(self, ctx); + + t = SSL_SESSION_get_timeout(ctx); + + return ULONG2NUM(t); +} + +#define SSLSESSION_SET_TIME(func) \ + static VALUE ossl_ssl_session_set_##func(VALUE self, VALUE time_v) \ + { \ + SSL_SESSION *ctx; \ + time_t t; \ + \ + GetSSLSession(self, ctx); \ + \ + if (rb_obj_is_instance_of(time_v, rb_cTime)) { \ + time_v = rb_funcall(time_v, rb_intern("to_i"), 0); \ + } else if (FIXNUM_P(time_v)) { \ + ; \ + } else { \ + rb_raise(rb_eArgError, "unknown type"); \ + } \ + \ + t = NUM2ULONG(time_v); \ + \ + SSL_SESSION_set_##func(ctx, t); \ + \ + return ossl_ssl_session_get_##func(self); \ + } + +SSLSESSION_SET_TIME(time) +SSLSESSION_SET_TIME(timeout) + +#ifdef HAVE_SSL_SESSION_GET_ID +/* + * call-seq: + * session.id -> aString + * + * Returns the Session ID. +*/ +static VALUE ossl_ssl_session_get_id(VALUE self) +{ + SSL_SESSION *ctx; + const unsigned char *p = NULL; + unsigned int i = 0; + + GetSSLSession(self, ctx); + + p = SSL_SESSION_get_id(ctx, &i); + + return rb_str_new((const char *) p, i); +} +#endif + +/* + * call-seq: + * session.to_der -> aString + * + * Returns an ASN1 encoded String that contains the Session object. +*/ +static VALUE ossl_ssl_session_to_der(VALUE self) +{ + SSL_SESSION *ctx; + unsigned char buf[1024*10], *p; + int len; + + GetSSLSession(self, ctx); + + p = buf; + len = i2d_SSL_SESSION(ctx, &p); + + if (len <= 0) + ossl_raise(eSSLSession, "i2d_SSL_SESSION"); + else if (len >= sizeof(buf)) + ossl_raise(eSSLSession, "i2d_SSL_SESSION too large"); + + return rb_str_new((const char *) p, len); +} + +/* + * call-seq: + * session.to_pem -> String + * + * Returns a PEM encoded String that contains the Session object. +*/ +static VALUE ossl_ssl_session_to_pem(VALUE self) +{ + SSL_SESSION *ctx; + BIO *out; + BUF_MEM *buf; + VALUE str; + int i; + + GetSSLSession(self, ctx); + + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eSSLSession, "BIO_s_mem()"); + } + + if (!(i=PEM_write_bio_SSL_SESSION(out, ctx))) { + BIO_free(out); + ossl_raise(eSSLSession, "SSL_SESSION_print()"); + } + + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + + +/* + * call-seq: + * session.to_text -> String + * + * Shows everything in the Session object. +*/ +static VALUE ossl_ssl_session_to_text(VALUE self) +{ + SSL_SESSION *ctx; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetSSLSession(self, ctx); + + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eSSLSession, "BIO_s_mem()"); + } + + if (!SSL_SESSION_print(out, ctx)) { + BIO_free(out); + ossl_raise(eSSLSession, "SSL_SESSION_print()"); + } + + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + + +void Init_ossl_ssl_session(void) +{ +#if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); + mSSL = rb_define_module_under(mOSSL, "SSL"); +#endif + cSSLSession = rb_define_class_under(mSSL, "Session", rb_cObject); + eSSLSession = rb_define_class_under(cSSLSession, "SessionError", eOSSLError); + + rb_define_alloc_func(cSSLSession, ossl_ssl_session_alloc); + rb_define_method(cSSLSession, "initialize", ossl_ssl_session_initialize, 1); + + rb_define_method(cSSLSession, "==", ossl_ssl_session_eq, 1); + + rb_define_method(cSSLSession, "time", ossl_ssl_session_get_time, 0); + rb_define_method(cSSLSession, "time=", ossl_ssl_session_set_time, 1); + rb_define_method(cSSLSession, "timeout", ossl_ssl_session_get_timeout, 0); + rb_define_method(cSSLSession, "timeout=", ossl_ssl_session_set_timeout, 1); + +#ifdef HAVE_SSL_SESSION_GET_ID + rb_define_method(cSSLSession, "id", ossl_ssl_session_get_id, 0); +#else + rb_undef_method(cSSLSession, "id"); +#endif + rb_define_method(cSSLSession, "to_der", ossl_ssl_session_to_der, 0); + rb_define_method(cSSLSession, "to_pem", ossl_ssl_session_to_pem, 0); + rb_define_method(cSSLSession, "to_text", ossl_ssl_session_to_text, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_version.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_version.h new file mode 100644 index 0000000..206fb94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_version.h @@ -0,0 +1,16 @@ +/* + * $Id: ossl_version.h 16111 2008-04-20 22:32:06Z technorama $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_VERSION_H_) +#define _OSSL_VERSION_H_ + +#define OSSL_VERSION "1.1.0" + +#endif /* _OSSL_VERSION_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.c new file mode 100644 index 0000000..fdb23bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.c @@ -0,0 +1,104 @@ +/* + * $Id: ossl_x509.c 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +VALUE mX509; + +#define DefX509Const(x) rb_define_const(mX509, #x,INT2FIX(X509_##x)) +#define DefX509Default(x,i) \ + rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i())) + +void +Init_ossl_x509() +{ + mX509 = rb_define_module_under(mOSSL, "X509"); + + Init_ossl_x509attr(); + Init_ossl_x509cert(); + Init_ossl_x509crl(); + Init_ossl_x509ext(); + Init_ossl_x509name(); + Init_ossl_x509req(); + Init_ossl_x509revoked(); + Init_ossl_x509store(); + + DefX509Const(V_OK); + DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT); + DefX509Const(V_ERR_UNABLE_TO_GET_CRL); + DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE); + DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE); + DefX509Const(V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY); + DefX509Const(V_ERR_CERT_SIGNATURE_FAILURE); + DefX509Const(V_ERR_CRL_SIGNATURE_FAILURE); + DefX509Const(V_ERR_CERT_NOT_YET_VALID); + DefX509Const(V_ERR_CERT_HAS_EXPIRED); + DefX509Const(V_ERR_CRL_NOT_YET_VALID); + DefX509Const(V_ERR_CRL_HAS_EXPIRED); + DefX509Const(V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD); + DefX509Const(V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD); + DefX509Const(V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD); + DefX509Const(V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD); + DefX509Const(V_ERR_OUT_OF_MEM); + DefX509Const(V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT); + DefX509Const(V_ERR_SELF_SIGNED_CERT_IN_CHAIN); + DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY); + DefX509Const(V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE); + DefX509Const(V_ERR_CERT_CHAIN_TOO_LONG); + DefX509Const(V_ERR_CERT_REVOKED); + DefX509Const(V_ERR_INVALID_CA); + DefX509Const(V_ERR_PATH_LENGTH_EXCEEDED); + DefX509Const(V_ERR_INVALID_PURPOSE); + DefX509Const(V_ERR_CERT_UNTRUSTED); + DefX509Const(V_ERR_CERT_REJECTED); + DefX509Const(V_ERR_SUBJECT_ISSUER_MISMATCH); + DefX509Const(V_ERR_AKID_SKID_MISMATCH); + DefX509Const(V_ERR_AKID_ISSUER_SERIAL_MISMATCH); + DefX509Const(V_ERR_KEYUSAGE_NO_CERTSIGN); + DefX509Const(V_ERR_APPLICATION_VERIFICATION); + +#if defined(X509_V_FLAG_CRL_CHECK) + DefX509Const(V_FLAG_CRL_CHECK); +#endif +#if defined(X509_V_FLAG_CRL_CHECK_ALL) + DefX509Const(V_FLAG_CRL_CHECK_ALL); +#endif + + DefX509Const(PURPOSE_SSL_CLIENT); + DefX509Const(PURPOSE_SSL_SERVER); + DefX509Const(PURPOSE_NS_SSL_SERVER); + DefX509Const(PURPOSE_SMIME_SIGN); + DefX509Const(PURPOSE_SMIME_ENCRYPT); + DefX509Const(PURPOSE_CRL_SIGN); + DefX509Const(PURPOSE_ANY); +#if defined(X509_PURPOSE_OCSP_HELPER) + DefX509Const(PURPOSE_OCSP_HELPER); +#endif + + DefX509Const(TRUST_COMPAT); + DefX509Const(TRUST_SSL_CLIENT); + DefX509Const(TRUST_SSL_SERVER); + DefX509Const(TRUST_EMAIL); + DefX509Const(TRUST_OBJECT_SIGN); +#if defined(X509_TRUST_OCSP_SIGN) + DefX509Const(TRUST_OCSP_SIGN); +#endif +#if defined(X509_TRUST_OCSP_REQUEST) + DefX509Const(TRUST_OCSP_REQUEST); +#endif + + DefX509Default(CERT_AREA, cert_area); + DefX509Default(CERT_DIR, cert_dir); + DefX509Default(CERT_FILE, cert_file); + DefX509Default(CERT_DIR_ENV, cert_dir_env); + DefX509Default(CERT_FILE_ENV, cert_file_env); + DefX509Default(PRIVATE_DIR, private_dir); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.h b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.h new file mode 100644 index 0000000..57bb64e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509.h @@ -0,0 +1,114 @@ +/* + * $Id: ossl_x509.h 11708 2007-02-12 23:01:19Z shyouhei $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_X509_H_) +#define _OSSL_X509_H_ + +/* + * X509 main module + */ +extern VALUE mX509; + +void Init_ossl_x509(void); + +/* + * X509Attr + */ +extern VALUE cX509Attr; +extern VALUE eX509AttrError; + +VALUE ossl_x509attr_new(X509_ATTRIBUTE *); +X509_ATTRIBUTE *DupX509AttrPtr(VALUE); +void Init_ossl_x509attr(void); + +/* + * X509Cert + */ +extern VALUE cX509Cert; +extern VALUE eX509CertError; + +VALUE ossl_x509_new(X509 *); +VALUE ossl_x509_new_from_file(VALUE); +X509 *GetX509CertPtr(VALUE); +X509 *DupX509CertPtr(VALUE); +void Init_ossl_x509cert(void); + +/* + * X509CRL + */ +extern VALUE cX509CRL; +extern VALUE eX509CRLError; + +VALUE ossl_x509crl_new(X509_CRL *); +X509_CRL *GetX509CRLPtr(VALUE); +X509_CRL *DupX509CRLPtr(VALUE); +void Init_ossl_x509crl(void); + +/* + * X509Extension + */ +extern VALUE cX509Ext; +extern VALUE cX509ExtFactory; +extern VALUE eX509ExtError; + +VALUE ossl_x509ext_new(X509_EXTENSION *); +X509_EXTENSION *GetX509ExtPtr(VALUE); +X509_EXTENSION *DupX509ExtPtr(VALUE); +void Init_ossl_x509ext(void); + +/* + * X509Name + */ +extern VALUE cX509Name; +extern VALUE eX509NameError; + +VALUE ossl_x509name_new(X509_NAME *); +X509_NAME *GetX509NamePtr(VALUE); +void Init_ossl_x509name(void); + +/* + * X509Request + */ +extern VALUE cX509Req; +extern VALUE eX509ReqError; + +VALUE ossl_x509req_new(X509_REQ *); +X509_REQ *GetX509ReqPtr(VALUE); +X509_REQ *DupX509ReqPtr(VALUE); +void Init_ossl_x509req(void); + +/* + * X509Revoked + */ +extern VALUE cX509Rev; +extern VALUE eX509RevError; + +VALUE ossl_x509revoked_new(X509_REVOKED *); +X509_REVOKED *DupX509RevokedPtr(VALUE); +void Init_ossl_x509revoked(void); + +/* + * X509Store and X509StoreContext + */ +extern VALUE cX509Store; +extern VALUE cX509StoreContext; +extern VALUE eX509StoreError; + +VALUE ossl_x509store_new(X509_STORE *); +X509_STORE *GetX509StorePtr(VALUE); +X509_STORE *DupX509StorePtr(VALUE); + +VALUE ossl_x509stctx_new(X509_STORE_CTX *); +VALUE ossl_x509stctx_clear_ptr(VALUE); +X509_STORE_CTX *GetX509StCtxtPtr(VALUE); + +void Init_ossl_x509store(void); + +#endif /* _OSSL_X509_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509attr.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509attr.c new file mode 100644 index 0000000..248e02a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509attr.c @@ -0,0 +1,274 @@ +/* + * $Id: ossl_x509attr.c 18917 2008-08-29 03:19:15Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Attr(klass, obj, attr) do { \ + if (!attr) { \ + ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_ATTRIBUTE_free, attr); \ +} while (0) +#define GetX509Attr(obj, attr) do { \ + Data_Get_Struct(obj, X509_ATTRIBUTE, attr); \ + if (!attr) { \ + ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509Attr(obj, attr) do { \ + OSSL_Check_Kind(obj, cX509Attr); \ + GetX509Attr(obj, attr); \ +} while (0) + +/* + * Classes + */ +VALUE cX509Attr; +VALUE eX509AttrError; + +/* + * Public + */ +VALUE +ossl_x509attr_new(X509_ATTRIBUTE *attr) +{ + X509_ATTRIBUTE *new; + VALUE obj; + + if (!attr) { + new = X509_ATTRIBUTE_new(); + } else { + new = X509_ATTRIBUTE_dup(attr); + } + if (!new) { + ossl_raise(eX509AttrError, NULL); + } + WrapX509Attr(cX509Attr, obj, new); + + return obj; +} + +X509_ATTRIBUTE * +DupX509AttrPtr(VALUE obj) +{ + X509_ATTRIBUTE *attr, *new; + + SafeGetX509Attr(obj, attr); + if (!(new = X509_ATTRIBUTE_dup(attr))) { + ossl_raise(eX509AttrError, NULL); + } + + return new; +} + +/* + * Private + */ +static VALUE +ossl_x509attr_alloc(VALUE klass) +{ + X509_ATTRIBUTE *attr; + VALUE obj; + + if (!(attr = X509_ATTRIBUTE_new())) + ossl_raise(eX509AttrError, NULL); + WrapX509Attr(klass, obj, attr); + + return obj; +} + +/* + * call-seq: + * Attribute.new(oid [, value]) => attr + */ +static VALUE +ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE oid, value; + X509_ATTRIBUTE *attr, *x; + const unsigned char *p; + + GetX509Attr(self, attr); + if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){ + oid = ossl_to_der_if_possible(oid); + StringValue(oid); + p = (unsigned char *)RSTRING_PTR(oid); + x = d2i_X509_ATTRIBUTE(&attr, &p, RSTRING_LEN(oid)); + DATA_PTR(self) = attr; + if(!x){ + ossl_raise(eX509AttrError, NULL); + } + return self; + } + rb_funcall(self, rb_intern("oid="), 1, oid); + rb_funcall(self, rb_intern("value="), 1, value); + + return self; +} + +/* + * call-seq: + * attr.oid = string => string + */ +static VALUE +ossl_x509attr_set_oid(VALUE self, VALUE oid) +{ + X509_ATTRIBUTE *attr; + ASN1_OBJECT *obj; + char *s; + + s = StringValuePtr(oid); + obj = OBJ_txt2obj(s, 0); + if(!obj) obj = OBJ_txt2obj(s, 1); + if(!obj) ossl_raise(eX509AttrError, NULL); + GetX509Attr(self, attr); + X509_ATTRIBUTE_set1_object(attr, obj); + + return oid; +} + +/* + * call-seq: + * attr.oid => string + */ +static VALUE +ossl_x509attr_get_oid(VALUE self) +{ + X509_ATTRIBUTE *attr; + ASN1_OBJECT *oid; + BIO *out; + VALUE ret; + int nid; + + GetX509Attr(self, attr); + oid = X509_ATTRIBUTE_get0_object(attr); + if ((nid = OBJ_obj2nid(oid)) != NID_undef) + ret = rb_str_new2(OBJ_nid2sn(nid)); + else{ + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eX509AttrError, NULL); + i2a_ASN1_OBJECT(out, oid); + ret = ossl_membio2str(out); + } + + return ret; +} + +#if defined(HAVE_ST_X509_ATTRIBUTE_SINGLE) || defined(HAVE_ST_SINGLE) +# define OSSL_X509ATTR_IS_SINGLE(attr) ((attr)->single) +# define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->single = 1) +#else +# define OSSL_X509ATTR_IS_SINGLE(attr) (!(attr)->set) +# define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->set = 0) +#endif + +/* + * call-seq: + * attr.value = asn1 => asn1 + */ +static VALUE +ossl_x509attr_set_value(VALUE self, VALUE value) +{ + X509_ATTRIBUTE *attr; + ASN1_TYPE *a1type; + + if(!(a1type = ossl_asn1_get_asn1type(value))) + ossl_raise(eASN1Error, "could not get ASN1_TYPE"); + if(ASN1_TYPE_get(a1type) == V_ASN1_SEQUENCE){ + ASN1_TYPE_free(a1type); + ossl_raise(eASN1Error, "couldn't set SEQUENCE for attribute value."); + } + GetX509Attr(self, attr); + if(attr->value.set){ + if(OSSL_X509ATTR_IS_SINGLE(attr)) ASN1_TYPE_free(attr->value.single); + else sk_ASN1_TYPE_free(attr->value.set); + } + OSSL_X509ATTR_SET_SINGLE(attr); + attr->value.single = a1type; + + return value; +} + +/* + * call-seq: + * attr.value => asn1 + */ +static VALUE +ossl_x509attr_get_value(VALUE self) +{ + X509_ATTRIBUTE *attr; + VALUE str, asn1; + long length; + unsigned char *p; + + GetX509Attr(self, attr); + if(attr->value.ptr == NULL) return Qnil; + if(OSSL_X509ATTR_IS_SINGLE(attr)){ + length = i2d_ASN1_TYPE(attr->value.single, NULL); + str = rb_str_new(0, length); + p = (unsigned char *)RSTRING_PTR(str); + i2d_ASN1_TYPE(attr->value.single, &p); + ossl_str_adjust(str, p); + } + else{ + length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, NULL, + i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0); + str = rb_str_new(0, length); + p = (unsigned char *)RSTRING_PTR(str); + i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p, + i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0); + ossl_str_adjust(str, p); + } + asn1 = rb_funcall(mASN1, rb_intern("decode"), 1, str); + + return asn1; +} + +/* + * call-seq: + * attr.to_der => string + */ +static VALUE +ossl_x509attr_to_der(VALUE self) +{ + X509_ATTRIBUTE *attr; + VALUE str; + int len; + unsigned char *p; + + GetX509Attr(self, attr); + if((len = i2d_X509_ATTRIBUTE(attr, NULL)) <= 0) + ossl_raise(eX509AttrError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_X509_ATTRIBUTE(attr, &p) <= 0) + ossl_raise(eX509AttrError, NULL); + rb_str_set_len(str, p - (unsigned char*)RSTRING_PTR(str)); + + return str; +} + +/* + * X509_ATTRIBUTE init + */ +void +Init_ossl_x509attr() +{ + eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError); + + cX509Attr = rb_define_class_under(mX509, "Attribute", rb_cObject); + rb_define_alloc_func(cX509Attr, ossl_x509attr_alloc); + rb_define_method(cX509Attr, "initialize", ossl_x509attr_initialize, -1); + rb_define_method(cX509Attr, "oid=", ossl_x509attr_set_oid, 1); + rb_define_method(cX509Attr, "oid", ossl_x509attr_get_oid, 0); + rb_define_method(cX509Attr, "value=", ossl_x509attr_set_value, 1); + rb_define_method(cX509Attr, "value", ossl_x509attr_get_value, 0); + rb_define_method(cX509Attr, "to_der", ossl_x509attr_to_der, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509cert.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509cert.c new file mode 100644 index 0000000..050de06 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509cert.c @@ -0,0 +1,766 @@ +/* + * $Id: ossl_x509cert.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509(klass, obj, x509) do { \ + if (!x509) { \ + ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_free, x509); \ +} while (0) +#define GetX509(obj, x509) do { \ + Data_Get_Struct(obj, X509, x509); \ + if (!x509) { \ + ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509(obj, x509) do { \ + OSSL_Check_Kind(obj, cX509Cert); \ + GetX509(obj, x509); \ +} while (0) + +/* + * Classes + */ +VALUE cX509Cert; +VALUE eX509CertError; + +/* + * Public + */ +VALUE +ossl_x509_new(X509 *x509) +{ + X509 *new; + VALUE obj; + + if (!x509) { + new = X509_new(); + } else { + new = X509_dup(x509); + } + if (!new) { + ossl_raise(eX509CertError, NULL); + } + WrapX509(cX509Cert, obj, new); + + return obj; +} + +VALUE +ossl_x509_new_from_file(VALUE filename) +{ + X509 *x509; + FILE *fp; + VALUE obj; + + SafeStringValue(filename); + if (!(fp = fopen(RSTRING_PTR(filename), "r"))) { + ossl_raise(eX509CertError, "%s", strerror(errno)); + } + x509 = PEM_read_X509(fp, NULL, NULL, NULL); + /* + * prepare for DER... +#if !defined(OPENSSL_NO_FP_API) + if (!x509) { + rewind(fp); + + x509 = d2i_X509_fp(fp, NULL); + } +#endif + */ + fclose(fp); + if (!x509) { + ossl_raise(eX509CertError, NULL); + } + WrapX509(cX509Cert, obj, x509); + + return obj; +} + +X509 * +GetX509CertPtr(VALUE obj) +{ + X509 *x509; + + SafeGetX509(obj, x509); + + return x509; +} + +X509 * +DupX509CertPtr(VALUE obj) +{ + X509 *x509; + + SafeGetX509(obj, x509); + + CRYPTO_add(&x509->references, 1, CRYPTO_LOCK_X509); + + return x509; +} + +/* + * Private + */ +static VALUE +ossl_x509_alloc(VALUE klass) +{ + X509 *x509; + VALUE obj; + + x509 = X509_new(); + if (!x509) ossl_raise(eX509CertError, NULL); + + WrapX509(klass, obj, x509); + + return obj; +} + +/* + * call-seq: + * Certificate.new => cert + * Certificate.new(string) => cert + */ +static VALUE +ossl_x509_initialize(int argc, VALUE *argv, VALUE self) +{ + BIO *in; + X509 *x509, *x = DATA_PTR(self); + VALUE arg; + + if (rb_scan_args(argc, argv, "01", &arg) == 0) { + /* create just empty X509Cert */ + return self; + } + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + x509 = PEM_read_bio_X509(in, &x, NULL, NULL); + DATA_PTR(self) = x; + if (!x509) { + (void)BIO_reset(in); + x509 = d2i_X509_bio(in, &x); + DATA_PTR(self) = x; + } + BIO_free(in); + if (!x509) ossl_raise(eX509CertError, NULL); + + return self; +} + +static VALUE +ossl_x509_copy(VALUE self, VALUE other) +{ + X509 *a, *b, *x509; + + rb_check_frozen(self); + if (self == other) return self; + + GetX509(self, a); + SafeGetX509(other, b); + + x509 = X509_dup(b); + if (!x509) ossl_raise(eX509CertError, NULL); + + DATA_PTR(self) = x509; + X509_free(a); + + return self; +} + +/* + * call-seq: + * cert.to_der => string + */ +static VALUE +ossl_x509_to_der(VALUE self) +{ + X509 *x509; + VALUE str; + long len; + unsigned char *p; + + GetX509(self, x509); + if ((len = i2d_X509(x509, NULL)) <= 0) + ossl_raise(eX509CertError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if (i2d_X509(x509, &p) <= 0) + ossl_raise(eX509CertError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * call-seq: + * cert.to_pem => string + */ +static VALUE +ossl_x509_to_pem(VALUE self) +{ + X509 *x509; + BIO *out; + VALUE str; + + GetX509(self, x509); + out = BIO_new(BIO_s_mem()); + if (!out) ossl_raise(eX509CertError, NULL); + + if (!PEM_write_bio_X509(out, x509)) { + BIO_free(out); + ossl_raise(eX509CertError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * cert.to_text => string + */ +static VALUE +ossl_x509_to_text(VALUE self) +{ + X509 *x509; + BIO *out; + VALUE str; + + GetX509(self, x509); + + out = BIO_new(BIO_s_mem()); + if (!out) ossl_raise(eX509CertError, NULL); + + if (!X509_print(out, x509)) { + BIO_free(out); + ossl_raise(eX509CertError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +#if 0 +/* + * Makes from X509 X509_REQuest + */ +static VALUE +ossl_x509_to_req(VALUE self) +{ + X509 *x509; + X509_REQ *req; + VALUE obj; + + GetX509(self, x509); + if (!(req = X509_to_X509_REQ(x509, NULL, EVP_md5()))) { + ossl_raise(eX509CertError, NULL); + } + obj = ossl_x509req_new(req); + X509_REQ_free(req); + + return obj; +} +#endif + +/* + * call-seq: + * cert.version => integer + */ +static VALUE +ossl_x509_get_version(VALUE self) +{ + X509 *x509; + + GetX509(self, x509); + + return LONG2NUM(X509_get_version(x509)); +} + +/* + * call-seq: + * cert.version = integer => integer + */ +static VALUE +ossl_x509_set_version(VALUE self, VALUE version) +{ + X509 *x509; + long ver; + + if ((ver = NUM2LONG(version)) < 0) { + ossl_raise(eX509CertError, "version must be >= 0!"); + } + GetX509(self, x509); + if (!X509_set_version(x509, ver)) { + ossl_raise(eX509CertError, NULL); + } + + return version; +} + +/* + * call-seq: + * cert.serial => integer + */ +static VALUE +ossl_x509_get_serial(VALUE self) +{ + X509 *x509; + + GetX509(self, x509); + + return asn1integer_to_num(X509_get_serialNumber(x509)); +} + +/* + * call-seq: + * cert.serial = integer => integer + */ +static VALUE +ossl_x509_set_serial(VALUE self, VALUE num) +{ + X509 *x509; + + GetX509(self, x509); + + x509->cert_info->serialNumber = + num_to_asn1integer(num, X509_get_serialNumber(x509)); + + return num; +} + +/* + * call-seq: + * cert.signature_algorithm => string + */ +static VALUE +ossl_x509_get_signature_algorithm(VALUE self) +{ + X509 *x509; + BIO *out; + VALUE str; + + GetX509(self, x509); + out = BIO_new(BIO_s_mem()); + if (!out) ossl_raise(eX509CertError, NULL); + + if (!i2a_ASN1_OBJECT(out, x509->cert_info->signature->algorithm)) { + BIO_free(out); + ossl_raise(eX509CertError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * cert.subject => name + */ +static VALUE +ossl_x509_get_subject(VALUE self) +{ + X509 *x509; + X509_NAME *name; + + GetX509(self, x509); + if (!(name = X509_get_subject_name(x509))) { /* NO DUP - don't free! */ + ossl_raise(eX509CertError, NULL); + } + + return ossl_x509name_new(name); +} + +/* + * call-seq: + * cert.subject = name => name + */ +static VALUE +ossl_x509_set_subject(VALUE self, VALUE subject) +{ + X509 *x509; + + GetX509(self, x509); + if (!X509_set_subject_name(x509, GetX509NamePtr(subject))) { /* DUPs name */ + ossl_raise(eX509CertError, NULL); + } + + return subject; +} + +/* + * call-seq: + * cert.issuer => name + */ +static VALUE +ossl_x509_get_issuer(VALUE self) +{ + X509 *x509; + X509_NAME *name; + + GetX509(self, x509); + if(!(name = X509_get_issuer_name(x509))) { /* NO DUP - don't free! */ + ossl_raise(eX509CertError, NULL); + } + + return ossl_x509name_new(name); +} + +/* + * call-seq: + * cert.issuer = name => name + */ +static VALUE +ossl_x509_set_issuer(VALUE self, VALUE issuer) +{ + X509 *x509; + + GetX509(self, x509); + if (!X509_set_issuer_name(x509, GetX509NamePtr(issuer))) { /* DUPs name */ + ossl_raise(eX509CertError, NULL); + } + + return issuer; +} + +/* + * call-seq: + * cert.not_before => time + */ +static VALUE +ossl_x509_get_not_before(VALUE self) +{ + X509 *x509; + ASN1_UTCTIME *asn1time; + + GetX509(self, x509); + if (!(asn1time = X509_get_notBefore(x509))) { /* NO DUP - don't free! */ + ossl_raise(eX509CertError, NULL); + } + + return asn1time_to_time(asn1time); +} + +/* + * call-seq: + * cert.not_before = time => time + */ +static VALUE +ossl_x509_set_not_before(VALUE self, VALUE time) +{ + X509 *x509; + time_t sec; + + sec = time_to_time_t(time); + GetX509(self, x509); + if (!X509_time_adj(X509_get_notBefore(x509), 0, &sec)) { + ossl_raise(eX509CertError, NULL); + } + + return time; +} + +/* + * call-seq: + * cert.not_after => time + */ +static VALUE +ossl_x509_get_not_after(VALUE self) +{ + X509 *x509; + ASN1_TIME *asn1time; + + GetX509(self, x509); + if (!(asn1time = X509_get_notAfter(x509))) { /* NO DUP - don't free! */ + ossl_raise(eX509CertError, NULL); + } + + return asn1time_to_time(asn1time); +} + +/* + * call-seq: + * cert.not_before = time => time + */ +static VALUE +ossl_x509_set_not_after(VALUE self, VALUE time) +{ + X509 *x509; + time_t sec; + + sec = time_to_time_t(time); + GetX509(self, x509); + if (!X509_time_adj(X509_get_notAfter(x509), 0, &sec)) { + ossl_raise(eX509CertError, NULL); + } + + return time; +} + +/* + * call-seq: + * cert.public_key => key + */ +static VALUE +ossl_x509_get_public_key(VALUE self) +{ + X509 *x509; + EVP_PKEY *pkey; + + GetX509(self, x509); + if (!(pkey = X509_get_pubkey(x509))) { /* adds an reference */ + ossl_raise(eX509CertError, NULL); + } + + return ossl_pkey_new(pkey); /* NO DUP - OK */ +} + +/* + * call-seq: + * cert.public_key = key => key + */ +static VALUE +ossl_x509_set_public_key(VALUE self, VALUE key) +{ + X509 *x509; + + GetX509(self, x509); + if (!X509_set_pubkey(x509, GetPKeyPtr(key))) { /* DUPs pkey */ + ossl_raise(eX509CertError, NULL); + } + + return key; +} + +/* + * call-seq: + * cert.sign(key, digest) => self + */ +static VALUE +ossl_x509_sign(VALUE self, VALUE key, VALUE digest) +{ + X509 *x509; + EVP_PKEY *pkey; + const EVP_MD *md; + + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + md = GetDigestPtr(digest); + GetX509(self, x509); + if (!X509_sign(x509, pkey, md)) { + ossl_raise(eX509CertError, NULL); + } + + return self; +} + +/* + * call-seq: + * cert.verify(key) => true | false + * + * Checks that cert signature is made with PRIVversion of this PUBLIC 'key' + */ +static VALUE +ossl_x509_verify(VALUE self, VALUE key) +{ + X509 *x509; + EVP_PKEY *pkey; + int i; + + pkey = GetPKeyPtr(key); /* NO NEED TO DUP */ + GetX509(self, x509); + if ((i = X509_verify(x509, pkey)) < 0) { + ossl_raise(eX509CertError, NULL); + } + if (i > 0) { + return Qtrue; + } + + return Qfalse; +} + +/* + * call-seq: + * cert.check_private_key(key) + * + * Checks if 'key' is PRIV key for this cert + */ +static VALUE +ossl_x509_check_private_key(VALUE self, VALUE key) +{ + X509 *x509; + EVP_PKEY *pkey; + + /* not needed private key, but should be */ + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + GetX509(self, x509); + if (!X509_check_private_key(x509, pkey)) { + OSSL_Warning("Check private key:%s", OSSL_ErrMsg()); + return Qfalse; + } + + return Qtrue; +} + +/* + * call-seq: + * cert.extensions => [extension...] + */ +static VALUE +ossl_x509_get_extensions(VALUE self) +{ + X509 *x509; + int count, i; + X509_EXTENSION *ext; + VALUE ary; + + GetX509(self, x509); + count = X509_get_ext_count(x509); + if (count < 0) { + return rb_ary_new(); + } + ary = rb_ary_new2(count); + for (i=0; i [ext...] + */ +static VALUE +ossl_x509_set_extensions(VALUE self, VALUE ary) +{ + X509 *x509; + X509_EXTENSION *ext; + int i; + + Check_Type(ary, T_ARRAY); + /* All ary's members should be X509Extension */ + for (i=0; icert_info->extensions, X509_EXTENSION_free); + x509->cert_info->extensions = NULL; + for (i=0; i extension + */ +static VALUE +ossl_x509_add_extension(VALUE self, VALUE extension) +{ + X509 *x509; + X509_EXTENSION *ext; + + GetX509(self, x509); + ext = DupX509ExtPtr(extension); + if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */ + X509_EXTENSION_free(ext); + ossl_raise(eX509CertError, NULL); + } + X509_EXTENSION_free(ext); + + return extension; +} + +static VALUE +ossl_x509_inspect(VALUE self) +{ + VALUE str; + const char *cname = rb_class2name(rb_obj_class(self)); + + str = rb_str_new2("#<"); + rb_str_cat2(str, cname); + rb_str_cat2(str, " "); + + rb_str_cat2(str, "subject="); + rb_str_append(str, rb_inspect(ossl_x509_get_subject(self))); + rb_str_cat2(str, ", "); + + rb_str_cat2(str, "issuer="); + rb_str_append(str, rb_inspect(ossl_x509_get_issuer(self))); + rb_str_cat2(str, ", "); + + rb_str_cat2(str, "serial="); + rb_str_append(str, rb_inspect(ossl_x509_get_serial(self))); + rb_str_cat2(str, ", "); + + rb_str_cat2(str, "not_before="); + rb_str_append(str, rb_inspect(ossl_x509_get_not_before(self))); + rb_str_cat2(str, ", "); + + rb_str_cat2(str, "not_after="); + rb_str_append(str, rb_inspect(ossl_x509_get_not_after(self))); + + str = rb_str_cat2(str, ">"); + + return str; +} + +/* + * INIT + */ +void +Init_ossl_x509cert() +{ + eX509CertError = rb_define_class_under(mX509, "CertificateError", eOSSLError); + + cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject); + + rb_define_alloc_func(cX509Cert, ossl_x509_alloc); + rb_define_method(cX509Cert, "initialize", ossl_x509_initialize, -1); + rb_define_copy_func(cX509Cert, ossl_x509_copy); + + rb_define_method(cX509Cert, "to_der", ossl_x509_to_der, 0); + rb_define_method(cX509Cert, "to_pem", ossl_x509_to_pem, 0); + rb_define_alias(cX509Cert, "to_s", "to_pem"); + rb_define_method(cX509Cert, "to_text", ossl_x509_to_text, 0); + rb_define_method(cX509Cert, "version", ossl_x509_get_version, 0); + rb_define_method(cX509Cert, "version=", ossl_x509_set_version, 1); + rb_define_method(cX509Cert, "signature_algorithm", ossl_x509_get_signature_algorithm, 0); + rb_define_method(cX509Cert, "serial", ossl_x509_get_serial, 0); + rb_define_method(cX509Cert, "serial=", ossl_x509_set_serial, 1); + rb_define_method(cX509Cert, "subject", ossl_x509_get_subject, 0); + rb_define_method(cX509Cert, "subject=", ossl_x509_set_subject, 1); + rb_define_method(cX509Cert, "issuer", ossl_x509_get_issuer, 0); + rb_define_method(cX509Cert, "issuer=", ossl_x509_set_issuer, 1); + rb_define_method(cX509Cert, "not_before", ossl_x509_get_not_before, 0); + rb_define_method(cX509Cert, "not_before=", ossl_x509_set_not_before, 1); + rb_define_method(cX509Cert, "not_after", ossl_x509_get_not_after, 0); + rb_define_method(cX509Cert, "not_after=", ossl_x509_set_not_after, 1); + rb_define_method(cX509Cert, "public_key", ossl_x509_get_public_key, 0); + rb_define_method(cX509Cert, "public_key=", ossl_x509_set_public_key, 1); + rb_define_method(cX509Cert, "sign", ossl_x509_sign, 2); + rb_define_method(cX509Cert, "verify", ossl_x509_verify, 1); + rb_define_method(cX509Cert, "check_private_key", ossl_x509_check_private_key, 1); + rb_define_method(cX509Cert, "extensions", ossl_x509_get_extensions, 0); + rb_define_method(cX509Cert, "extensions=", ossl_x509_set_extensions, 1); + rb_define_method(cX509Cert, "add_extension", ossl_x509_add_extension, 1); + rb_define_method(cX509Cert, "inspect", ossl_x509_inspect, 0); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509crl.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509crl.c new file mode 100644 index 0000000..3896b6e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509crl.c @@ -0,0 +1,537 @@ +/* + * $Id: ossl_x509crl.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509CRL(klass, obj, crl) do { \ + if (!crl) { \ + ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_CRL_free, crl); \ +} while (0) +#define GetX509CRL(obj, crl) do { \ + Data_Get_Struct(obj, X509_CRL, crl); \ + if (!crl) { \ + ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509CRL(obj, crl) do { \ + OSSL_Check_Kind(obj, cX509CRL); \ + GetX509CRL(obj, crl); \ +} while (0) + +/* + * Classes + */ +VALUE cX509CRL; +VALUE eX509CRLError; + +/* + * PUBLIC + */ +X509_CRL * +GetX509CRLPtr(VALUE obj) +{ + X509_CRL *crl; + + SafeGetX509CRL(obj, crl); + + return crl; +} + +X509_CRL * +DupX509CRLPtr(VALUE obj) +{ + X509_CRL *crl; + + SafeGetX509CRL(obj, crl); + CRYPTO_add(&crl->references, 1, CRYPTO_LOCK_X509_CRL); + + return crl; +} + +VALUE +ossl_x509crl_new(X509_CRL *crl) +{ + X509_CRL *tmp; + VALUE obj; + + tmp = crl ? X509_CRL_dup(crl) : X509_CRL_new(); + if(!tmp) ossl_raise(eX509CRLError, NULL); + WrapX509CRL(cX509CRL, obj, tmp); + + return obj; +} + +/* + * PRIVATE + */ +static VALUE +ossl_x509crl_alloc(VALUE klass) +{ + X509_CRL *crl; + VALUE obj; + + if (!(crl = X509_CRL_new())) { + ossl_raise(eX509CRLError, NULL); + } + WrapX509CRL(klass, obj, crl); + + return obj; +} + +static VALUE +ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self) +{ + BIO *in; + X509_CRL *crl, *x = DATA_PTR(self); + VALUE arg; + + if (rb_scan_args(argc, argv, "01", &arg) == 0) { + return self; + } + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + crl = PEM_read_bio_X509_CRL(in, &x, NULL, NULL); + DATA_PTR(self) = x; + if (!crl) { + (void)BIO_reset(in); + crl = d2i_X509_CRL_bio(in, &x); + DATA_PTR(self) = x; + } + BIO_free(in); + if (!crl) ossl_raise(eX509CRLError, NULL); + + return self; +} + +static VALUE +ossl_x509crl_copy(VALUE self, VALUE other) +{ + X509_CRL *a, *b, *crl; + + rb_check_frozen(self); + if (self == other) return self; + GetX509CRL(self, a); + SafeGetX509CRL(other, b); + if (!(crl = X509_CRL_dup(b))) { + ossl_raise(eX509CRLError, NULL); + } + X509_CRL_free(a); + DATA_PTR(self) = crl; + + return self; +} + +static VALUE +ossl_x509crl_get_version(VALUE self) +{ + X509_CRL *crl; + long ver; + + GetX509CRL(self, crl); + ver = X509_CRL_get_version(crl); + + return LONG2NUM(ver); +} + +static VALUE +ossl_x509crl_set_version(VALUE self, VALUE version) +{ + X509_CRL *crl; + long ver; + + if ((ver = NUM2LONG(version)) < 0) { + ossl_raise(eX509CRLError, "version must be >= 0!"); + } + GetX509CRL(self, crl); + if (!X509_CRL_set_version(crl, ver)) { + ossl_raise(eX509CRLError, NULL); + } + + return version; +} + +static VALUE +ossl_x509crl_get_signature_algorithm(VALUE self) +{ + X509_CRL *crl; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509CRL(self, crl); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509CRLError, NULL); + } + if (!i2a_ASN1_OBJECT(out, crl->sig_alg->algorithm)) { + BIO_free(out); + ossl_raise(eX509CRLError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + return str; +} + +static VALUE +ossl_x509crl_get_issuer(VALUE self) +{ + X509_CRL *crl; + + GetX509CRL(self, crl); + + return ossl_x509name_new(X509_CRL_get_issuer(crl)); /* NO DUP - don't free */ +} + +static VALUE +ossl_x509crl_set_issuer(VALUE self, VALUE issuer) +{ + X509_CRL *crl; + + GetX509CRL(self, crl); + + if (!X509_CRL_set_issuer_name(crl, GetX509NamePtr(issuer))) { /* DUPs name */ + ossl_raise(eX509CRLError, NULL); + } + return issuer; +} + +static VALUE +ossl_x509crl_get_last_update(VALUE self) +{ + X509_CRL *crl; + + GetX509CRL(self, crl); + + return asn1time_to_time(X509_CRL_get_lastUpdate(crl)); +} + +static VALUE +ossl_x509crl_set_last_update(VALUE self, VALUE time) +{ + X509_CRL *crl; + time_t sec; + + sec = time_to_time_t(time); + GetX509CRL(self, crl); + if (!X509_time_adj(crl->crl->lastUpdate, 0, &sec)) { + ossl_raise(eX509CRLError, NULL); + } + + return time; +} + +static VALUE +ossl_x509crl_get_next_update(VALUE self) +{ + X509_CRL *crl; + + GetX509CRL(self, crl); + + return asn1time_to_time(X509_CRL_get_nextUpdate(crl)); +} + +static VALUE +ossl_x509crl_set_next_update(VALUE self, VALUE time) +{ + X509_CRL *crl; + time_t sec; + + sec = time_to_time_t(time); + GetX509CRL(self, crl); + /* This must be some thinko in OpenSSL */ + if (!(crl->crl->nextUpdate = X509_time_adj(crl->crl->nextUpdate, 0, &sec))){ + ossl_raise(eX509CRLError, NULL); + } + + return time; +} + +static VALUE +ossl_x509crl_get_revoked(VALUE self) +{ + X509_CRL *crl; + int i, num; + X509_REVOKED *rev; + VALUE ary, revoked; + + GetX509CRL(self, crl); + num = sk_X509_CRL_num(X509_CRL_get_REVOKED(crl)); + if (num < 0) { + OSSL_Debug("num < 0???"); + return rb_ary_new(); + } + ary = rb_ary_new2(num); + for(i=0; icrl->revoked, X509_REVOKED_free); + crl->crl->revoked = NULL; + for (i=0; idata, buf->length); + BIO_free(out); + + return str; +} + +static VALUE +ossl_x509crl_to_pem(VALUE self) +{ + X509_CRL *crl; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509CRL(self, crl); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509CRLError, NULL); + } + if (!PEM_write_bio_X509_CRL(out, crl)) { + BIO_free(out); + ossl_raise(eX509CRLError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + +static VALUE +ossl_x509crl_to_text(VALUE self) +{ + X509_CRL *crl; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509CRL(self, crl); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509CRLError, NULL); + } + if (!X509_CRL_print(out, crl)) { + BIO_free(out); + ossl_raise(eX509CRLError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + +/* + * Gets X509v3 extensions as array of X509Ext objects + */ +static VALUE +ossl_x509crl_get_extensions(VALUE self) +{ + X509_CRL *crl; + int count, i; + X509_EXTENSION *ext; + VALUE ary; + + GetX509CRL(self, crl); + count = X509_CRL_get_ext_count(crl); + if (count < 0) { + OSSL_Debug("count < 0???"); + return rb_ary_new(); + } + ary = rb_ary_new2(count); + for (i=0; icrl->extensions, X509_EXTENSION_free); + crl->crl->extensions = NULL; + for (i=0; i + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Ext(klass, obj, ext) do { \ + if (!ext) { \ + ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \ +} while (0) +#define GetX509Ext(obj, ext) do { \ + Data_Get_Struct(obj, X509_EXTENSION, ext); \ + if (!ext) { \ + ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509Ext(obj, ext) do { \ + OSSL_Check_Kind(obj, cX509Ext); \ + GetX509Ext(obj, ext); \ +} while (0) +#define MakeX509ExtFactory(klass, obj, ctx) do { \ + if (!(ctx = OPENSSL_malloc(sizeof(X509V3_CTX)))) \ + ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \ + X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, 0); \ + obj = Data_Wrap_Struct(klass, 0, ossl_x509extfactory_free, ctx); \ +} while (0) +#define GetX509ExtFactory(obj, ctx) do { \ + Data_Get_Struct(obj, X509V3_CTX, ctx); \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \ + } \ +} while (0) + +/* + * Classes + */ +VALUE cX509Ext; +VALUE cX509ExtFactory; +VALUE eX509ExtError; + +/* + * Public + */ +VALUE +ossl_x509ext_new(X509_EXTENSION *ext) +{ + X509_EXTENSION *new; + VALUE obj; + + if (!ext) { + new = X509_EXTENSION_new(); + } else { + new = X509_EXTENSION_dup(ext); + } + if (!new) { + ossl_raise(eX509ExtError, NULL); + } + WrapX509Ext(cX509Ext, obj, new); + + return obj; +} + +X509_EXTENSION * +GetX509ExtPtr(VALUE obj) +{ + X509_EXTENSION *ext; + + SafeGetX509Ext(obj, ext); + + return ext; +} + +X509_EXTENSION * +DupX509ExtPtr(VALUE obj) +{ + X509_EXTENSION *ext, *new; + + SafeGetX509Ext(obj, ext); + if (!(new = X509_EXTENSION_dup(ext))) { + ossl_raise(eX509ExtError, NULL); + } + + return new; +} + +/* + * Private + */ +/* + * Ext factory + */ +static void +ossl_x509extfactory_free(X509V3_CTX *ctx) +{ + OPENSSL_free(ctx); +} + +static VALUE +ossl_x509extfactory_alloc(VALUE klass) +{ + X509V3_CTX *ctx; + VALUE obj; + + MakeX509ExtFactory(klass, obj, ctx); + rb_iv_set(obj, "@config", Qnil); + + return obj; +} + +static VALUE +ossl_x509extfactory_set_issuer_cert(VALUE self, VALUE cert) +{ + X509V3_CTX *ctx; + + GetX509ExtFactory(self, ctx); + rb_iv_set(self, "@issuer_certificate", cert); + ctx->issuer_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */ + + return cert; +} + +static VALUE +ossl_x509extfactory_set_subject_cert(VALUE self, VALUE cert) +{ + X509V3_CTX *ctx; + + GetX509ExtFactory(self, ctx); + rb_iv_set(self, "@subject_certificate", cert); + ctx->subject_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */ + + return cert; +} + +static VALUE +ossl_x509extfactory_set_subject_req(VALUE self, VALUE req) +{ + X509V3_CTX *ctx; + + GetX509ExtFactory(self, ctx); + rb_iv_set(self, "@subject_request", req); + ctx->subject_req = GetX509ReqPtr(req); /* NO DUP NEEDED */ + + return req; +} + +static VALUE +ossl_x509extfactory_set_crl(VALUE self, VALUE crl) +{ + X509V3_CTX *ctx; + + GetX509ExtFactory(self, ctx); + rb_iv_set(self, "@crl", crl); + ctx->crl = GetX509CRLPtr(crl); /* NO DUP NEEDED */ + + return crl; +} + +static VALUE +ossl_x509extfactory_set_config(VALUE self, VALUE config) +{ +#ifdef HAVE_X509V3_SET_NCONF + X509V3_CTX *ctx; + CONF *conf; + + GetX509ExtFactory(self, ctx); + rb_iv_set(self, "@config", config); + conf = GetConfigPtr(config); /* NO DUP NEEDED */ + X509V3_set_nconf(ctx, conf); + + return config; +#else + rb_notimplement(); +#endif +} + +static VALUE +ossl_x509extfactory_initialize(int argc, VALUE *argv, VALUE self) +{ + /*X509V3_CTX *ctx;*/ + VALUE issuer_cert, subject_cert, subject_req, crl; + + /*GetX509ExtFactory(self, ctx);*/ + + rb_scan_args(argc, argv, "04", + &issuer_cert, &subject_cert, &subject_req, &crl); + if (!NIL_P(issuer_cert)) + ossl_x509extfactory_set_issuer_cert(self, issuer_cert); + if (!NIL_P(subject_cert)) + ossl_x509extfactory_set_subject_cert(self, subject_cert); + if (!NIL_P(subject_req)) + ossl_x509extfactory_set_subject_req(self, subject_req); + if (!NIL_P(crl)) + ossl_x509extfactory_set_crl(self, crl); + + return self; +} + +/* + * Array to X509_EXTENSION + * Structure: + * ["ln", "value", bool_critical] or + * ["sn", "value", bool_critical] or + * ["ln", "critical,value"] or the same for sn + * ["ln", "value"] => not critical + */ +static VALUE +ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self) +{ + X509V3_CTX *ctx; + X509_EXTENSION *ext; + VALUE oid, value, critical, valstr, obj; + int nid; +#ifdef HAVE_X509V3_EXT_NCONF_NID + VALUE rconf; + CONF *conf; +#else + static LHASH *empty_lhash; +#endif + + rb_scan_args(argc, argv, "21", &oid, &value, &critical); + StringValue(oid); + StringValue(value); + if(NIL_P(critical)) critical = Qfalse; + + nid = OBJ_ln2nid(RSTRING_PTR(oid)); + if(!nid) nid = OBJ_sn2nid(RSTRING_PTR(oid)); + if(!nid) ossl_raise(eX509ExtError, "unknown OID `%s'", RSTRING_PTR(oid)); + valstr = rb_str_new2(RTEST(critical) ? "critical," : ""); + rb_str_append(valstr, value); + GetX509ExtFactory(self, ctx); +#ifdef HAVE_X509V3_EXT_NCONF_NID + rconf = rb_iv_get(self, "@config"); + conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf); + ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr)); +#else + if (!empty_lhash) empty_lhash = lh_new(NULL, NULL); + ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING_PTR(valstr)); +#endif + if (!ext){ + ossl_raise(eX509ExtError, "%s = %s", + RSTRING_PTR(oid), RSTRING_PTR(value)); + } + WrapX509Ext(cX509Ext, obj, ext); + + return obj; +} + +/* + * Ext + */ +static VALUE +ossl_x509ext_alloc(VALUE klass) +{ + X509_EXTENSION *ext; + VALUE obj; + + if(!(ext = X509_EXTENSION_new())){ + ossl_raise(eX509ExtError, NULL); + } + WrapX509Ext(klass, obj, ext); + + return obj; +} + +static VALUE +ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE oid, value, critical; + const unsigned char *p; + X509_EXTENSION *ext, *x; + + GetX509Ext(self, ext); + if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){ + oid = ossl_to_der_if_possible(oid); + StringValue(oid); + p = (unsigned char *)RSTRING_PTR(oid); + x = d2i_X509_EXTENSION(&ext, &p, RSTRING_LEN(oid)); + DATA_PTR(self) = ext; + if(!x) + ossl_raise(eX509ExtError, NULL); + return self; + } + rb_funcall(self, rb_intern("oid="), 1, oid); + rb_funcall(self, rb_intern("value="), 1, value); + if(argc > 2) rb_funcall(self, rb_intern("critical="), 1, critical); + + return self; +} + +static VALUE +ossl_x509ext_set_oid(VALUE self, VALUE oid) +{ + X509_EXTENSION *ext; + ASN1_OBJECT *obj; + char *s; + + s = StringValuePtr(oid); + obj = OBJ_txt2obj(s, 0); + if(!obj) obj = OBJ_txt2obj(s, 1); + if(!obj) ossl_raise(eX509ExtError, NULL); + GetX509Ext(self, ext); + X509_EXTENSION_set_object(ext, obj); + + return oid; +} + +static VALUE +ossl_x509ext_set_value(VALUE self, VALUE data) +{ + X509_EXTENSION *ext; + ASN1_OCTET_STRING *asn1s; + char *s; + + data = ossl_to_der_if_possible(data); + StringValue(data); + if(!(s = OPENSSL_malloc(RSTRING_LEN(data)))) + ossl_raise(eX509ExtError, "malloc error"); + memcpy(s, RSTRING_PTR(data), RSTRING_LEN(data)); + if(!(asn1s = ASN1_OCTET_STRING_new())){ + free(s); + ossl_raise(eX509ExtError, NULL); + } + if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING_LEN(data))){ + free(s); + ASN1_OCTET_STRING_free(asn1s); + ossl_raise(eX509ExtError, NULL); + } + free(s); + GetX509Ext(self, ext); + X509_EXTENSION_set_data(ext, asn1s); + + return data; +} + +static VALUE +ossl_x509ext_set_critical(VALUE self, VALUE flag) +{ + X509_EXTENSION *ext; + + GetX509Ext(self, ext); + X509_EXTENSION_set_critical(ext, RTEST(flag) ? 1 : 0); + + return flag; +} + +static VALUE +ossl_x509ext_get_oid(VALUE obj) +{ + X509_EXTENSION *ext; + ASN1_OBJECT *extobj; + BIO *out; + VALUE ret; + int nid; + + GetX509Ext(obj, ext); + extobj = X509_EXTENSION_get_object(ext); + if ((nid = OBJ_obj2nid(extobj)) != NID_undef) + ret = rb_str_new2(OBJ_nid2sn(nid)); + else{ + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eX509ExtError, NULL); + i2a_ASN1_OBJECT(out, extobj); + ret = ossl_membio2str(out); + } + + return ret; +} + +static VALUE +ossl_x509ext_get_value(VALUE obj) +{ + X509_EXTENSION *ext; + BIO *out; + VALUE ret; + + GetX509Ext(obj, ext); + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eX509ExtError, NULL); + if (!X509V3_EXT_print(out, ext, 0, 0)) + M_ASN1_OCTET_STRING_print(out, ext->value); + ret = ossl_membio2str(out); + + return ret; +} + +static VALUE +ossl_x509ext_get_critical(VALUE obj) +{ + X509_EXTENSION *ext; + + GetX509Ext(obj, ext); + return X509_EXTENSION_get_critical(ext) ? Qtrue : Qfalse; +} + +static VALUE +ossl_x509ext_to_der(VALUE obj) +{ + X509_EXTENSION *ext; + unsigned char *p; + long len; + VALUE str; + + GetX509Ext(obj, ext); + if((len = i2d_X509_EXTENSION(ext, NULL)) <= 0) + ossl_raise(eX509ExtError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_X509_EXTENSION(ext, &p) < 0) + ossl_raise(eX509ExtError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * INIT + */ +void +Init_ossl_x509ext() +{ + eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError); + + cX509ExtFactory = rb_define_class_under(mX509, "ExtensionFactory", rb_cObject); + + rb_define_alloc_func(cX509ExtFactory, ossl_x509extfactory_alloc); + rb_define_method(cX509ExtFactory, "initialize", ossl_x509extfactory_initialize, -1); + + rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse); + rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse); + rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse); + rb_attr(cX509ExtFactory, rb_intern("crl"), 1, 0, Qfalse); + rb_attr(cX509ExtFactory, rb_intern("config"), 1, 0, Qfalse); + + rb_define_method(cX509ExtFactory, "issuer_certificate=", ossl_x509extfactory_set_issuer_cert, 1); + rb_define_method(cX509ExtFactory, "subject_certificate=", ossl_x509extfactory_set_subject_cert, 1); + rb_define_method(cX509ExtFactory, "subject_request=", ossl_x509extfactory_set_subject_req, 1); + rb_define_method(cX509ExtFactory, "crl=", ossl_x509extfactory_set_crl, 1); + rb_define_method(cX509ExtFactory, "config=", ossl_x509extfactory_set_config, 1); + rb_define_method(cX509ExtFactory, "create_ext", ossl_x509extfactory_create_ext, -1); + + cX509Ext = rb_define_class_under(mX509, "Extension", rb_cObject); + rb_define_alloc_func(cX509Ext, ossl_x509ext_alloc); + rb_define_method(cX509Ext, "initialize", ossl_x509ext_initialize, -1); + rb_define_method(cX509Ext, "oid=", ossl_x509ext_set_oid, 1); + rb_define_method(cX509Ext, "value=", ossl_x509ext_set_value, 1); + rb_define_method(cX509Ext, "critical=", ossl_x509ext_set_critical, 1); + rb_define_method(cX509Ext, "oid", ossl_x509ext_get_oid, 0); + rb_define_method(cX509Ext, "value", ossl_x509ext_get_value, 0); + rb_define_method(cX509Ext, "critical?", ossl_x509ext_get_critical, 0); + rb_define_method(cX509Ext, "to_der", ossl_x509ext_to_der, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509name.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509name.c new file mode 100644 index 0000000..8bd1ff1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509name.c @@ -0,0 +1,375 @@ +/* + * $Id: ossl_x509name.c 18917 2008-08-29 03:19:15Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Name(klass, obj, name) do { \ + if (!name) { \ + ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_NAME_free, name); \ +} while (0) +#define GetX509Name(obj, name) do { \ + Data_Get_Struct(obj, X509_NAME, name); \ + if (!name) { \ + ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \ + } \ +} while (0) +#define SafeGetX509Name(obj, name) do { \ + OSSL_Check_Kind(obj, cX509Name); \ + GetX509Name(obj, name); \ +} while (0) + +#define OBJECT_TYPE_TEMPLATE \ + rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE")) +#define DEFAULT_OBJECT_TYPE \ + rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE")) + +/* + * Classes + */ +VALUE cX509Name; +VALUE eX509NameError; + +/* + * Public + */ +VALUE +ossl_x509name_new(X509_NAME *name) +{ + X509_NAME *new; + VALUE obj; + + if (!name) { + new = X509_NAME_new(); + } else { + new = X509_NAME_dup(name); + } + if (!new) { + ossl_raise(eX509NameError, NULL); + } + WrapX509Name(cX509Name, obj, new); + + return obj; +} + +X509_NAME * +GetX509NamePtr(VALUE obj) +{ + X509_NAME *name; + + SafeGetX509Name(obj, name); + + return name; +} + +/* + * Private + */ +static VALUE +ossl_x509name_alloc(VALUE klass) +{ + X509_NAME *name; + VALUE obj; + + if (!(name = X509_NAME_new())) { + ossl_raise(eX509NameError, NULL); + } + WrapX509Name(klass, obj, name); + + return obj; +} + +static int id_aref; +static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE); +#define rb_aref(obj, key) rb_funcall(obj, id_aref, 1, key) + +static VALUE +ossl_x509name_init_i(VALUE i, VALUE args) +{ + VALUE self = rb_ary_entry(args, 0); + VALUE template = rb_ary_entry(args, 1); + VALUE entry[3]; + + Check_Type(i, T_ARRAY); + entry[0] = rb_ary_entry(i, 0); + entry[1] = rb_ary_entry(i, 1); + entry[2] = rb_ary_entry(i, 2); + if(NIL_P(entry[2])) entry[2] = rb_aref(template, entry[0]); + if(NIL_P(entry[2])) entry[2] = DEFAULT_OBJECT_TYPE; + ossl_x509name_add_entry(3, entry, self); + + return Qnil; +} + +/* + * call-seq: + * X509::Name.new => name + * X509::Name.new(string) => name + * X509::Name.new(dn) => name + * X509::Name.new(dn, template) => name + */ +static VALUE +ossl_x509name_initialize(int argc, VALUE *argv, VALUE self) +{ + X509_NAME *name; + VALUE arg, template; + + GetX509Name(self, name); + if (rb_scan_args(argc, argv, "02", &arg, &template) == 0) { + return self; + } + else { + VALUE tmp = rb_check_array_type(arg); + if (!NIL_P(tmp)) { + VALUE args; + if(NIL_P(template)) template = OBJECT_TYPE_TEMPLATE; + args = rb_ary_new3(2, self, template); + rb_block_call(tmp, rb_intern("each"), 0, 0, ossl_x509name_init_i, args); + } + else{ + const unsigned char *p; + VALUE str = ossl_to_der_if_possible(arg); + X509_NAME *x; + StringValue(str); + p = (unsigned char *)RSTRING_PTR(str); + x = d2i_X509_NAME(&name, &p, RSTRING_LEN(str)); + DATA_PTR(self) = name; + if(!x){ + ossl_raise(eX509NameError, NULL); + } + } + } + + return self; +} + +/* + * call-seq: + * name.add_entry(oid, value [, type]) => self + */ +static +VALUE ossl_x509name_add_entry(int argc, VALUE *argv, VALUE self) +{ + X509_NAME *name; + VALUE oid, value, type; + + rb_scan_args(argc, argv, "21", &oid, &value, &type); + StringValue(oid); + StringValue(value); + if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid); + GetX509Name(self, name); + if (!X509_NAME_add_entry_by_txt(name, RSTRING_PTR(oid), NUM2INT(type), + (const unsigned char *)RSTRING_PTR(value), RSTRING_LEN(value), -1, 0)) { + ossl_raise(eX509NameError, NULL); + } + + return self; +} + +static VALUE +ossl_x509name_to_s_old(VALUE self) +{ + X509_NAME *name; + char *buf; + VALUE str; + + GetX509Name(self, name); + buf = X509_NAME_oneline(name, NULL, 0); + str = rb_str_new2(buf); + OPENSSL_free(buf); + + return str; +} + +/* + * call-seq: + * name.to_s => string + * name.to_s(integer) => string + */ +static VALUE +ossl_x509name_to_s(int argc, VALUE *argv, VALUE self) +{ + X509_NAME *name; + VALUE flag, str; + BIO *out; + unsigned long iflag; + + rb_scan_args(argc, argv, "01", &flag); + if (NIL_P(flag)) + return ossl_x509name_to_s_old(self); + else iflag = NUM2ULONG(flag); + if (!(out = BIO_new(BIO_s_mem()))) + ossl_raise(eX509NameError, NULL); + GetX509Name(self, name); + if (!X509_NAME_print_ex(out, name, 0, iflag)){ + BIO_free(out); + ossl_raise(eX509NameError, NULL); + } + str = ossl_membio2str(out); + + return str; +} + +/* + * call-seq: + * name.to_a => [[name, data, type], ...] + */ +static VALUE +ossl_x509name_to_a(VALUE self) +{ + X509_NAME *name; + X509_NAME_ENTRY *entry; + int i,entries; + char long_name[512]; + const char *short_name; + VALUE ary, ret; + + GetX509Name(self, name); + entries = X509_NAME_entry_count(name); + if (entries < 0) { + OSSL_Debug("name entries < 0!"); + return rb_ary_new(); + } + ret = rb_ary_new2(entries); + for (i=0; iobject)) { + ossl_raise(eX509NameError, NULL); + } + short_name = OBJ_nid2sn(OBJ_ln2nid(long_name)); + ary = rb_ary_new3(3, rb_str_new2(short_name), + rb_str_new((const char *)entry->value->data, entry->value->length), + INT2FIX(entry->value->type)); + rb_ary_push(ret, ary); + } + return ret; +} + +static int +ossl_x509name_cmp0(VALUE self, VALUE other) +{ + X509_NAME *name1, *name2; + + GetX509Name(self, name1); + SafeGetX509Name(other, name2); + + return X509_NAME_cmp(name1, name2); +} + +static VALUE +ossl_x509name_cmp(VALUE self, VALUE other) +{ + int result; + + result = ossl_x509name_cmp0(self, other); + if (result < 0) return INT2FIX(-1); + if (result > 1) return INT2FIX(1); + + return INT2FIX(0); +} + +static VALUE +ossl_x509name_eql(VALUE self, VALUE other) +{ + int result; + + if(CLASS_OF(other) != cX509Name) return Qfalse; + result = ossl_x509name_cmp0(self, other); + + return (result == 0) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * name.hash => integer + */ +static VALUE +ossl_x509name_hash(VALUE self) +{ + X509_NAME *name; + unsigned long hash; + + GetX509Name(self, name); + + hash = X509_NAME_hash(name); + + return ULONG2NUM(hash); +} + +/* + * call-seq: + * name.to_der => string + */ +static VALUE +ossl_x509name_to_der(VALUE self) +{ + X509_NAME *name; + VALUE str; + long len; + unsigned char *p; + + GetX509Name(self, name); + if((len = i2d_X509_NAME(name, NULL)) <= 0) + ossl_raise(eX509NameError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if(i2d_X509_NAME(name, &p) <= 0) + ossl_raise(eX509NameError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +/* + * INIT + */ +void +Init_ossl_x509name() +{ + VALUE utf8str, ptrstr, ia5str, hash; + + id_aref = rb_intern("[]"); + eX509NameError = rb_define_class_under(mX509, "NameError", eOSSLError); + cX509Name = rb_define_class_under(mX509, "Name", rb_cObject); + + rb_define_alloc_func(cX509Name, ossl_x509name_alloc); + rb_define_method(cX509Name, "initialize", ossl_x509name_initialize, -1); + rb_define_method(cX509Name, "add_entry", ossl_x509name_add_entry, -1); + rb_define_method(cX509Name, "to_s", ossl_x509name_to_s, -1); + rb_define_method(cX509Name, "to_a", ossl_x509name_to_a, 0); + rb_define_method(cX509Name, "cmp", ossl_x509name_cmp, 1); + rb_define_alias(cX509Name, "<=>", "cmp"); + rb_define_method(cX509Name, "eql?", ossl_x509name_eql, 1); + rb_define_method(cX509Name, "hash", ossl_x509name_hash, 0); + rb_define_method(cX509Name, "to_der", ossl_x509name_to_der, 0); + + utf8str = INT2NUM(V_ASN1_UTF8STRING); + ptrstr = INT2NUM(V_ASN1_PRINTABLESTRING); + ia5str = INT2NUM(V_ASN1_IA5STRING); + rb_define_const(cX509Name, "DEFAULT_OBJECT_TYPE", utf8str); + hash = rb_hash_new(); + RHASH(hash)->ifnone = utf8str; + rb_hash_aset(hash, rb_str_new2("C"), ptrstr); + rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr); + rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr); + rb_hash_aset(hash, rb_str_new2("dnQualifier"), ptrstr); + rb_hash_aset(hash, rb_str_new2("DC"), ia5str); + rb_hash_aset(hash, rb_str_new2("domainComponent"), ia5str); + rb_hash_aset(hash, rb_str_new2("emailAddress"), ia5str); + rb_define_const(cX509Name, "OBJECT_TYPE_TEMPLATE", hash); + + rb_define_const(cX509Name, "COMPAT", ULONG2NUM(XN_FLAG_COMPAT)); + rb_define_const(cX509Name, "RFC2253", ULONG2NUM(XN_FLAG_RFC2253)); + rb_define_const(cX509Name, "ONELINE", ULONG2NUM(XN_FLAG_ONELINE)); + rb_define_const(cX509Name, "MULTILINE", ULONG2NUM(XN_FLAG_MULTILINE)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509req.c b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509req.c new file mode 100644 index 0000000..4f18c8b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ossl_x509req.c @@ -0,0 +1,468 @@ +/* + * $Id: ossl_x509req.c 18168 2008-07-22 15:34:23Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2002 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Req(klass, obj, req) do { \ + if (!req) { \ + ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_REQ_free, req); \ +} while (0) +#define GetX509Req(obj, req) do { \ + Data_Get_Struct(obj, X509_REQ, req); \ + if (!req) { \ + ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509Req(obj, req) do { \ + OSSL_Check_Kind(obj, cX509Req); \ + GetX509Req(obj, req); \ +} while (0) + +/* + * Classes + */ +VALUE cX509Req; +VALUE eX509ReqError; + +/* + * Public functions + */ +VALUE +ossl_x509req_new(X509_REQ *req) +{ + X509_REQ *new; + VALUE obj; + + if (!req) { + new = X509_REQ_new(); + } else { + new = X509_REQ_dup(req); + } + if (!new) { + ossl_raise(eX509ReqError, NULL); + } + WrapX509Req(cX509Req, obj, new); + + return obj; +} + +X509_REQ * +GetX509ReqPtr(VALUE obj) +{ + X509_REQ *req; + + SafeGetX509Req(obj, req); + + return req; +} + +X509_REQ * +DupX509ReqPtr(VALUE obj) +{ + X509_REQ *req, *new; + + SafeGetX509Req(obj, req); + if (!(new = X509_REQ_dup(req))) { + ossl_raise(eX509ReqError, NULL); + } + + return new; +} + +/* + * Private functions + */ +static VALUE +ossl_x509req_alloc(VALUE klass) +{ + X509_REQ *req; + VALUE obj; + + if (!(req = X509_REQ_new())) { + ossl_raise(eX509ReqError, NULL); + } + WrapX509Req(klass, obj, req); + + return obj; +} + +static VALUE +ossl_x509req_initialize(int argc, VALUE *argv, VALUE self) +{ + BIO *in; + X509_REQ *req, *x = DATA_PTR(self); + VALUE arg; + + if (rb_scan_args(argc, argv, "01", &arg) == 0) { + return self; + } + arg = ossl_to_der_if_possible(arg); + in = ossl_obj2bio(arg); + req = PEM_read_bio_X509_REQ(in, &x, NULL, NULL); + DATA_PTR(self) = x; + if (!req) { + (void)BIO_reset(in); + req = d2i_X509_REQ_bio(in, &x); + DATA_PTR(self) = x; + } + BIO_free(in); + if (!req) ossl_raise(eX509ReqError, NULL); + + return self; +} + +static VALUE +ossl_x509req_copy(VALUE self, VALUE other) +{ + X509_REQ *a, *b, *req; + + rb_check_frozen(self); + if (self == other) return self; + GetX509Req(self, a); + SafeGetX509Req(other, b); + if (!(req = X509_REQ_dup(b))) { + ossl_raise(eX509ReqError, NULL); + } + X509_REQ_free(a); + DATA_PTR(self) = req; + + return self; +} + +static VALUE +ossl_x509req_to_pem(VALUE self) +{ + X509_REQ *req; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509Req(self, req); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509ReqError, NULL); + } + if (!PEM_write_bio_X509_REQ(out, req)) { + BIO_free(out); + ossl_raise(eX509ReqError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + +static VALUE +ossl_x509req_to_der(VALUE self) +{ + X509_REQ *req; + VALUE str; + long len; + unsigned char *p; + + GetX509Req(self, req); + if ((len = i2d_X509_REQ(req, NULL)) <= 0) + ossl_raise(eX509CertError, NULL); + str = rb_str_new(0, len); + p = (unsigned char *)RSTRING_PTR(str); + if (i2d_X509_REQ(req, &p) <= 0) + ossl_raise(eX509ReqError, NULL); + ossl_str_adjust(str, p); + + return str; +} + +static VALUE +ossl_x509req_to_text(VALUE self) +{ + X509_REQ *req; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509Req(self, req); + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509ReqError, NULL); + } + if (!X509_REQ_print(out, req)) { + BIO_free(out); + ossl_raise(eX509ReqError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + + return str; +} + +#if 0 +/* + * Makes X509 from X509_REQuest + */ +static VALUE +ossl_x509req_to_x509(VALUE self, VALUE days, VALUE key) +{ + X509_REQ *req; + X509 *x509; + + GetX509Req(self, req); + ... + if (!(x509 = X509_REQ_to_X509(req, d, pkey))) { + ossl_raise(eX509ReqError, NULL); + } + + return ossl_x509_new(x509); +} +#endif + +static VALUE +ossl_x509req_get_version(VALUE self) +{ + X509_REQ *req; + long version; + + GetX509Req(self, req); + version = X509_REQ_get_version(req); + + return LONG2FIX(version); +} + +static VALUE +ossl_x509req_set_version(VALUE self, VALUE version) +{ + X509_REQ *req; + long ver; + + if ((ver = FIX2LONG(version)) < 0) { + ossl_raise(eX509ReqError, "version must be >= 0!"); + } + GetX509Req(self, req); + if (!X509_REQ_set_version(req, ver)) { + ossl_raise(eX509ReqError, NULL); + } + + return version; +} + +static VALUE +ossl_x509req_get_subject(VALUE self) +{ + X509_REQ *req; + X509_NAME *name; + + GetX509Req(self, req); + if (!(name = X509_REQ_get_subject_name(req))) { /* NO DUP - don't free */ + ossl_raise(eX509ReqError, NULL); + } + + return ossl_x509name_new(name); +} + +static VALUE +ossl_x509req_set_subject(VALUE self, VALUE subject) +{ + X509_REQ *req; + + GetX509Req(self, req); + /* DUPs name */ + if (!X509_REQ_set_subject_name(req, GetX509NamePtr(subject))) { + ossl_raise(eX509ReqError, NULL); + } + + return subject; +} + +static VALUE +ossl_x509req_get_signature_algorithm(VALUE self) +{ + X509_REQ *req; + BIO *out; + BUF_MEM *buf; + VALUE str; + + GetX509Req(self, req); + + if (!(out = BIO_new(BIO_s_mem()))) { + ossl_raise(eX509ReqError, NULL); + } + if (!i2a_ASN1_OBJECT(out, req->sig_alg->algorithm)) { + BIO_free(out); + ossl_raise(eX509ReqError, NULL); + } + BIO_get_mem_ptr(out, &buf); + str = rb_str_new(buf->data, buf->length); + BIO_free(out); + return str; +} + +static VALUE +ossl_x509req_get_public_key(VALUE self) +{ + X509_REQ *req; + EVP_PKEY *pkey; + + GetX509Req(self, req); + if (!(pkey = X509_REQ_get_pubkey(req))) { /* adds reference */ + ossl_raise(eX509ReqError, NULL); + } + + return ossl_pkey_new(pkey); /* NO DUP - OK */ +} + +static VALUE +ossl_x509req_set_public_key(VALUE self, VALUE key) +{ + X509_REQ *req; + EVP_PKEY *pkey; + + GetX509Req(self, req); + pkey = GetPKeyPtr(key); /* NO NEED TO DUP */ + if (!X509_REQ_set_pubkey(req, pkey)) { + ossl_raise(eX509ReqError, NULL); + } + + return key; +} + +static VALUE +ossl_x509req_sign(VALUE self, VALUE key, VALUE digest) +{ + X509_REQ *req; + EVP_PKEY *pkey; + const EVP_MD *md; + + GetX509Req(self, req); + pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */ + md = GetDigestPtr(digest); + if (!X509_REQ_sign(req, pkey, md)) { + ossl_raise(eX509ReqError, NULL); + } + + return self; +} + +/* + * Checks that cert signature is made with PRIVversion of this PUBLIC 'key' + */ +static VALUE +ossl_x509req_verify(VALUE self, VALUE key) +{ + X509_REQ *req; + EVP_PKEY *pkey; + int i; + + GetX509Req(self, req); + pkey = GetPKeyPtr(key); /* NO NEED TO DUP */ + if ((i = X509_REQ_verify(req, pkey)) < 0) { + ossl_raise(eX509ReqError, NULL); + } + if (i > 0) { + return Qtrue; + } + + return Qfalse; +} + +static VALUE +ossl_x509req_get_attributes(VALUE self) +{ + X509_REQ *req; + int count, i; + X509_ATTRIBUTE *attr; + VALUE ary; + + GetX509Req(self, req); + + count = X509_REQ_get_attr_count(req); + if (count < 0) { + OSSL_Debug("count < 0???"); + return rb_ary_new(); + } + ary = rb_ary_new2(count); + for (i=0; ireq_info->attributes, X509_ATTRIBUTE_free); + req->req_info->attributes = NULL; + for (i=0;i + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Rev(klass, obj, rev) do { \ + if (!rev) { \ + ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_REVOKED_free, rev); \ +} while (0) +#define GetX509Rev(obj, rev) do { \ + Data_Get_Struct(obj, X509_REVOKED, rev); \ + if (!rev) { \ + ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509Rev(obj, rev) do { \ + OSSL_Check_Kind(obj, cX509Rev); \ + GetX509Rev(obj, rev); \ +} while (0) + +/* + * Classes + */ +VALUE cX509Rev; +VALUE eX509RevError; + +/* + * PUBLIC + */ +VALUE +ossl_x509revoked_new(X509_REVOKED *rev) +{ + X509_REVOKED *new; + VALUE obj; + + if (!rev) { + new = X509_REVOKED_new(); + } else { + new = X509_REVOKED_dup(rev); + } + if (!new) { + ossl_raise(eX509RevError, NULL); + } + WrapX509Rev(cX509Rev, obj, new); + + return obj; +} + +X509_REVOKED * +DupX509RevokedPtr(VALUE obj) +{ + X509_REVOKED *rev, *new; + + SafeGetX509Rev(obj, rev); + if (!(new = X509_REVOKED_dup(rev))) { + ossl_raise(eX509RevError, NULL); + } + + return new; +} + +/* + * PRIVATE + */ +static VALUE +ossl_x509revoked_alloc(VALUE klass) +{ + X509_REVOKED *rev; + VALUE obj; + + if (!(rev = X509_REVOKED_new())) { + ossl_raise(eX509RevError, NULL); + } + WrapX509Rev(klass, obj, rev); + + return obj; +} + +static VALUE +ossl_x509revoked_initialize(int argc, VALUE *argv, VALUE self) +{ + /* EMPTY */ + return self; +} + +static VALUE +ossl_x509revoked_get_serial(VALUE self) +{ + X509_REVOKED *rev; + + GetX509Rev(self, rev); + + return asn1integer_to_num(rev->serialNumber); +} + +static VALUE +ossl_x509revoked_set_serial(VALUE self, VALUE num) +{ + X509_REVOKED *rev; + + GetX509Rev(self, rev); + rev->serialNumber = num_to_asn1integer(num, rev->serialNumber); + + return num; +} + +static VALUE +ossl_x509revoked_get_time(VALUE self) +{ + X509_REVOKED *rev; + + GetX509Rev(self, rev); + + return asn1time_to_time(rev->revocationDate); +} + +static VALUE +ossl_x509revoked_set_time(VALUE self, VALUE time) +{ + X509_REVOKED *rev; + time_t sec; + + sec = time_to_time_t(time); + GetX509Rev(self, rev); + if (!X509_time_adj(rev->revocationDate, 0, &sec)) { + ossl_raise(eX509RevError, NULL); + } + + return time; +} +/* + * Gets X509v3 extensions as array of X509Ext objects + */ +static VALUE +ossl_x509revoked_get_extensions(VALUE self) +{ + X509_REVOKED *rev; + int count, i; + X509_EXTENSION *ext; + VALUE ary; + + GetX509Rev(self, rev); + count = X509_REVOKED_get_ext_count(rev); + if (count < 0) { + OSSL_Debug("count < 0???"); + return rb_ary_new(); + } + ary = rb_ary_new2(count); + for (i=0; iextensions, X509_EXTENSION_free); + rev->extensions = NULL; + for (i=0; i + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#include "ossl.h" + +#define WrapX509Store(klass, obj, st) do { \ + if (!st) { \ + ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, X509_STORE_free, st); \ +} while (0) +#define GetX509Store(obj, st) do { \ + Data_Get_Struct(obj, X509_STORE, st); \ + if (!st) { \ + ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \ + } \ +} while (0) +#define SafeGetX509Store(obj, st) do { \ + OSSL_Check_Kind(obj, cX509Store); \ + GetX509Store(obj, st); \ +} while (0) + +#define WrapX509StCtx(klass, obj, ctx) do { \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "STORE_CTX wasn't initialized!"); \ + } \ + obj = Data_Wrap_Struct(klass, 0, ossl_x509stctx_free, ctx); \ +} while (0) +#define GetX509StCtx(obj, ctx) do { \ + Data_Get_Struct(obj, X509_STORE_CTX, ctx); \ + if (!ctx) { \ + ossl_raise(rb_eRuntimeError, "STORE_CTX is out of scope!"); \ + } \ +} while (0) +#define SafeGetX509StCtx(obj, storep) do { \ + OSSL_Check_Kind(obj, cX509StoreContext); \ + GetX509Store(obj, ctx); \ +} while (0) + +/* + * Classes + */ +VALUE cX509Store; +VALUE cX509StoreContext; +VALUE eX509StoreError; + +/* + * Public functions + */ +VALUE +ossl_x509store_new(X509_STORE *store) +{ + VALUE obj; + + WrapX509Store(cX509Store, obj, store); + + return obj; +} + +X509_STORE * +GetX509StorePtr(VALUE obj) +{ + X509_STORE *store; + + SafeGetX509Store(obj, store); + + return store; +} + +X509_STORE * +DupX509StorePtr(VALUE obj) +{ + X509_STORE *store; + + SafeGetX509Store(obj, store); + CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE); + + return store; +} + +/* + * Private functions + */ +static VALUE +ossl_x509store_alloc(VALUE klass) +{ + X509_STORE *store; + VALUE obj; + + if((store = X509_STORE_new()) == NULL){ + ossl_raise(eX509StoreError, NULL); + } + WrapX509Store(klass, obj, store); + + return obj; +} + +/* + * General callback for OpenSSL verify + */ +static VALUE +ossl_x509store_set_vfy_cb(VALUE self, VALUE cb) +{ + X509_STORE *store; + + GetX509Store(self, store); + X509_STORE_set_ex_data(store, ossl_verify_cb_idx, (void*)cb); + rb_iv_set(self, "@verify_callback", cb); + + return cb; +} + + +/* + * call-seq: + * X509::Store.new => store + * + */ +static VALUE +ossl_x509store_initialize(int argc, VALUE *argv, VALUE self) +{ + X509_STORE *store; + +/* BUG: This method takes any number of arguments but appears to ignore them. */ + GetX509Store(self, store); + X509_STORE_set_verify_cb_func(store, ossl_verify_cb); + ossl_x509store_set_vfy_cb(self, Qnil); + +#if (OPENSSL_VERSION_NUMBER < 0x00907000L) + rb_iv_set(self, "@flags", INT2NUM(0)); + rb_iv_set(self, "@purpose", INT2NUM(0)); + rb_iv_set(self, "@trust", INT2NUM(0)); +#endif + + /* last verification status */ + rb_iv_set(self, "@error", Qnil); + rb_iv_set(self, "@error_string", Qnil); + rb_iv_set(self, "@chain", Qnil); + rb_iv_set(self, "@time", Qnil); + + return self; +} + +static VALUE +ossl_x509store_set_flags(VALUE self, VALUE flags) +{ +#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) + X509_STORE *store; + long f = NUM2LONG(flags); + + GetX509Store(self, store); + X509_STORE_set_flags(store, f); +#else + rb_iv_set(self, "@flags", flags); +#endif + + return flags; +} + +static VALUE +ossl_x509store_set_purpose(VALUE self, VALUE purpose) +{ +#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) + X509_STORE *store; + long p = NUM2LONG(purpose); + + GetX509Store(self, store); + X509_STORE_set_purpose(store, p); +#else + rb_iv_set(self, "@purpose", purpose); +#endif + + return purpose; +} + +static VALUE +ossl_x509store_set_trust(VALUE self, VALUE trust) +{ +#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) + X509_STORE *store; + long t = NUM2LONG(trust); + + GetX509Store(self, store); + X509_STORE_set_trust(store, t); +#else + rb_iv_set(self, "@trust", trust); +#endif + + return trust; +} + +static VALUE +ossl_x509store_set_time(VALUE self, VALUE time) +{ + rb_iv_set(self, "@time", time); + return time; +} + +static VALUE +ossl_x509store_add_file(VALUE self, VALUE file) +{ + X509_STORE *store; + X509_LOOKUP *lookup; + char *path = NULL; + + if(file != Qnil){ + Check_SafeStr(file); + path = RSTRING_PTR(file); + } + GetX509Store(self, store); + lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()); + if(lookup == NULL) ossl_raise(eX509StoreError, NULL); + if(X509_LOOKUP_load_file(lookup, path, X509_FILETYPE_PEM) != 1){ + ossl_raise(eX509StoreError, NULL); + } + + return self; +} + +static VALUE +ossl_x509store_add_path(VALUE self, VALUE dir) +{ + X509_STORE *store; + X509_LOOKUP *lookup; + char *path = NULL; + + if(dir != Qnil){ + Check_SafeStr(dir); + path = RSTRING_PTR(dir); + } + GetX509Store(self, store); + lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir()); + if(lookup == NULL) ossl_raise(eX509StoreError, NULL); + if(X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) != 1){ + ossl_raise(eX509StoreError, NULL); + } + + return self; +} + +static VALUE +ossl_x509store_set_default_paths(VALUE self) +{ + X509_STORE *store; + + GetX509Store(self, store); + if (X509_STORE_set_default_paths(store) != 1){ + ossl_raise(eX509StoreError, NULL); + } + + return Qnil; +} + +static VALUE +ossl_x509store_add_cert(VALUE self, VALUE arg) +{ + X509_STORE *store; + X509 *cert; + + cert = GetX509CertPtr(arg); /* NO NEED TO DUP */ + GetX509Store(self, store); + if (X509_STORE_add_cert(store, cert) != 1){ + ossl_raise(eX509StoreError, NULL); + } + + return self; +} + +static VALUE +ossl_x509store_add_crl(VALUE self, VALUE arg) +{ + X509_STORE *store; + X509_CRL *crl; + + crl = GetX509CRLPtr(arg); /* NO NEED TO DUP */ + GetX509Store(self, store); + if (X509_STORE_add_crl(store, crl) != 1){ + ossl_raise(eX509StoreError, NULL); + } + + return self; +} + +static VALUE ossl_x509stctx_get_err(VALUE); +static VALUE ossl_x509stctx_get_err_string(VALUE); +static VALUE ossl_x509stctx_get_chain(VALUE); + +static VALUE +ossl_x509store_verify(int argc, VALUE *argv, VALUE self) +{ + VALUE cert, chain; + VALUE ctx, proc, result; + + rb_scan_args(argc, argv, "11", &cert, &chain); + ctx = rb_funcall(cX509StoreContext, rb_intern("new"), 3, self, cert, chain); + proc = rb_block_given_p() ? rb_block_proc() : + rb_iv_get(self, "@verify_callback"); + rb_iv_set(ctx, "@verify_callback", proc); + result = rb_funcall(ctx, rb_intern("verify"), 0); + + rb_iv_set(self, "@error", ossl_x509stctx_get_err(ctx)); + rb_iv_set(self, "@error_string", ossl_x509stctx_get_err_string(ctx)); + rb_iv_set(self, "@chain", ossl_x509stctx_get_chain(ctx)); + + return result; +} + +/* + * Public Functions + */ +static void ossl_x509stctx_free(X509_STORE_CTX*); + +VALUE +ossl_x509stctx_new(X509_STORE_CTX *ctx) +{ + VALUE obj; + + WrapX509StCtx(cX509StoreContext, obj, ctx); + + return obj; +} + +VALUE +ossl_x509stctx_clear_ptr(VALUE obj) +{ + OSSL_Check_Kind(obj, cX509StoreContext); + RDATA(obj)->data = NULL; + + return obj; +} + +/* + * Private functions + */ +static void +ossl_x509stctx_free(X509_STORE_CTX *ctx) +{ + if(ctx->untrusted) + sk_X509_pop_free(ctx->untrusted, X509_free); + if(ctx->cert) + X509_free(ctx->cert); + X509_STORE_CTX_free(ctx); +} + +static VALUE +ossl_x509stctx_alloc(VALUE klass) +{ + X509_STORE_CTX *ctx; + VALUE obj; + + if((ctx = X509_STORE_CTX_new()) == NULL){ + ossl_raise(eX509StoreError, NULL); + } + WrapX509StCtx(klass, obj, ctx); + + return obj; +} + +static VALUE ossl_x509stctx_set_flags(VALUE, VALUE); +static VALUE ossl_x509stctx_set_purpose(VALUE, VALUE); +static VALUE ossl_x509stctx_set_trust(VALUE, VALUE); +static VALUE ossl_x509stctx_set_time(VALUE, VALUE); + +static VALUE +ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE store, cert, chain, t; + X509_STORE_CTX *ctx; + X509_STORE *x509st; + X509 *x509 = NULL; + STACK_OF(X509) *x509s = NULL; + + rb_scan_args(argc, argv, "12", &store, &cert, &chain); + GetX509StCtx(self, ctx); + SafeGetX509Store(store, x509st); + if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */ + if(!NIL_P(chain)) x509s = ossl_x509_ary2sk(chain); +#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) + if(X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){ + sk_X509_pop_free(x509s, X509_free); + ossl_raise(eX509StoreError, NULL); + } +#else + X509_STORE_CTX_init(ctx, x509st, x509, x509s); + ossl_x509stctx_set_flags(self, rb_iv_get(store, "@flags")); + ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose")); + ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust")); +#endif + if (!NIL_P(t = rb_iv_get(store, "@time"))) + ossl_x509stctx_set_time(self, t); + rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback")); + rb_iv_set(self, "@cert", cert); + + return self; +} + +static VALUE +ossl_x509stctx_verify(VALUE self) +{ + X509_STORE_CTX *ctx; + int result; + + GetX509StCtx(self, ctx); + X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, + (void*)rb_iv_get(self, "@verify_callback")); + result = X509_verify_cert(ctx); + + return result ? Qtrue : Qfalse; +} + +static VALUE +ossl_x509stctx_get_chain(VALUE self) +{ + X509_STORE_CTX *ctx; + STACK_OF(X509) *chain; + X509 *x509; + int i, num; + VALUE ary; + + GetX509StCtx(self, ctx); + if((chain = X509_STORE_CTX_get_chain(ctx)) == NULL){ + return Qnil; + } + if((num = sk_X509_num(chain)) < 0){ + OSSL_Debug("certs in chain < 0???"); + return rb_ary_new(); + } + ary = rb_ary_new2(num); + for(i = 0; i < num; i++) { + x509 = sk_X509_value(chain, i); + rb_ary_push(ary, ossl_x509_new(x509)); + } + + return ary; +} + +static VALUE +ossl_x509stctx_get_err(VALUE self) +{ + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + + return INT2FIX(X509_STORE_CTX_get_error(ctx)); +} + +static VALUE +ossl_x509stctx_set_error(VALUE self, VALUE err) +{ + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + X509_STORE_CTX_set_error(ctx, NUM2INT(err)); + + return err; +} + +static VALUE +ossl_x509stctx_get_err_string(VALUE self) +{ + X509_STORE_CTX *ctx; + long err; + + GetX509StCtx(self, ctx); + err = X509_STORE_CTX_get_error(ctx); + + return rb_str_new2(X509_verify_cert_error_string(err)); +} + +static VALUE +ossl_x509stctx_get_err_depth(VALUE self) +{ + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + + return INT2FIX(X509_STORE_CTX_get_error_depth(ctx)); +} + +static VALUE +ossl_x509stctx_get_curr_cert(VALUE self) +{ + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + + return ossl_x509_new(X509_STORE_CTX_get_current_cert(ctx)); +} + +static VALUE +ossl_x509stctx_get_curr_crl(VALUE self) +{ +#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + if(!ctx->current_crl) return Qnil; + + return ossl_x509crl_new(ctx->current_crl); +#else + return Qnil; +#endif +} + +static VALUE +ossl_x509stctx_cleanup(VALUE self) +{ + X509_STORE_CTX *ctx; + + GetX509StCtx(self, ctx); + X509_STORE_CTX_cleanup(ctx); + + return self; +} + +static VALUE +ossl_x509stctx_set_flags(VALUE self, VALUE flags) +{ + X509_STORE_CTX *store; + long f = NUM2LONG(flags); + + GetX509StCtx(self, store); + X509_STORE_CTX_set_flags(store, f); + + return flags; +} + +static VALUE +ossl_x509stctx_set_purpose(VALUE self, VALUE purpose) +{ + X509_STORE_CTX *store; + long p = NUM2LONG(purpose); + + GetX509StCtx(self, store); + X509_STORE_CTX_set_purpose(store, p); + + return purpose; +} + +static VALUE +ossl_x509stctx_set_trust(VALUE self, VALUE trust) +{ + X509_STORE_CTX *store; + long t = NUM2LONG(trust); + + GetX509StCtx(self, store); + X509_STORE_CTX_set_trust(store, t); + + return trust; +} + +/* + * call-seq: + * storectx.time = time => time + */ +static VALUE +ossl_x509stctx_set_time(VALUE self, VALUE time) +{ + X509_STORE_CTX *store; + long t; + + t = NUM2LONG(rb_Integer(time)); + GetX509StCtx(self, store); + X509_STORE_CTX_set_time(store, 0, t); + + return time; +} + +/* + * INIT + */ +void +Init_ossl_x509store() +{ + VALUE x509stctx; + + eX509StoreError = rb_define_class_under(mX509, "StoreError", eOSSLError); + + cX509Store = rb_define_class_under(mX509, "Store", rb_cObject); + rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse); + rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse); + rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse); + rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse); + rb_define_alloc_func(cX509Store, ossl_x509store_alloc); + rb_define_method(cX509Store, "initialize", ossl_x509store_initialize, -1); + rb_define_method(cX509Store, "verify_callback=", ossl_x509store_set_vfy_cb, 1); + rb_define_method(cX509Store, "flags=", ossl_x509store_set_flags, 1); + rb_define_method(cX509Store, "purpose=", ossl_x509store_set_purpose, 1); + rb_define_method(cX509Store, "trust=", ossl_x509store_set_trust, 1); + rb_define_method(cX509Store, "time=", ossl_x509store_set_time, 1); + rb_define_method(cX509Store, "add_path", ossl_x509store_add_path, 1); + rb_define_method(cX509Store, "add_file", ossl_x509store_add_file, 1); + rb_define_method(cX509Store, "set_default_paths", ossl_x509store_set_default_paths, 0); + rb_define_method(cX509Store, "add_cert", ossl_x509store_add_cert, 1); + rb_define_method(cX509Store, "add_crl", ossl_x509store_add_crl, 1); + rb_define_method(cX509Store, "verify", ossl_x509store_verify, -1); + + cX509StoreContext = rb_define_class_under(mX509,"StoreContext",rb_cObject); + x509stctx = cX509StoreContext; + rb_define_alloc_func(cX509StoreContext, ossl_x509stctx_alloc); + rb_define_method(x509stctx,"initialize", ossl_x509stctx_initialize, -1); + rb_define_method(x509stctx,"verify", ossl_x509stctx_verify, 0); + rb_define_method(x509stctx,"chain", ossl_x509stctx_get_chain,0); + rb_define_method(x509stctx,"error", ossl_x509stctx_get_err, 0); + rb_define_method(x509stctx,"error=", ossl_x509stctx_set_error, 1); + rb_define_method(x509stctx,"error_string",ossl_x509stctx_get_err_string,0); + rb_define_method(x509stctx,"error_depth", ossl_x509stctx_get_err_depth, 0); + rb_define_method(x509stctx,"current_cert",ossl_x509stctx_get_curr_cert, 0); + rb_define_method(x509stctx,"current_crl", ossl_x509stctx_get_curr_crl, 0); + rb_define_method(x509stctx,"cleanup", ossl_x509stctx_cleanup, 0); + rb_define_method(x509stctx,"flags=", ossl_x509stctx_set_flags, 1); + rb_define_method(x509stctx,"purpose=", ossl_x509stctx_set_purpose, 1); + rb_define_method(x509stctx,"trust=", ossl_x509stctx_set_trust, 1); + rb_define_method(x509stctx,"time=", ossl_x509stctx_set_time, 1); + +} diff --git a/lib/ruby-1.9.1-rc1/ext/openssl/ruby_missing.h b/lib/ruby-1.9.1-rc1/ext/openssl/ruby_missing.h new file mode 100644 index 0000000..52d0563 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/openssl/ruby_missing.h @@ -0,0 +1,41 @@ +/* + * $Id: ruby_missing.h 12140 2007-04-03 07:21:53Z nobu $ + * 'OpenSSL for Ruby' project + * Copyright (C) 2001-2003 Michal Rokos + * All rights reserved. + */ +/* + * This program is licenced under the same licence as Ruby. + * (See the file 'LICENCE'.) + */ +#if !defined(_OSSL_RUBY_MISSING_H_) +#define _OSSL_RUBY_MISSING_H_ + +#define rb_define_copy_func(klass, func) \ + rb_define_method(klass, "initialize_copy", func, 1) + + +#ifndef GetReadFile +#define FPTR_TO_FD(fptr) (fptr->fd) +#else +#define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr))) +#endif + +#ifndef HAVE_RB_IO_T +#define rb_io_t OpenFile +#endif + +#ifndef HAVE_RB_STR_SET_LEN +/* these methods should probably be backported to 1.8 */ +#define rb_str_set_len(str, length) do { \ + RSTRING(str)->ptr[length] = 0; \ + RSTRING(str)->len = length; \ +} while(0) +#endif /* ! HAVE_RB_STR_SET_LEN */ + +#ifndef HAVE_RB_BLOCK_CALL +/* the openssl module doesn't use arg[3-4] and arg2 is always rb_each */ +#define rb_block_call(arg1, arg2, arg3, arg4, arg5, arg6) rb_iterate(rb_each, arg1, arg5, arg6) +#endif /* ! HAVE_RB_BLOCK_CALL */ + +#endif /* _OSSL_RUBY_MISSING_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/pty/.cvsignore b/lib/ruby-1.9.1-rc1/ext/pty/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/pty/README b/lib/ruby-1.9.1-rc1/ext/pty/README new file mode 100644 index 0000000..42c7d4f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/README @@ -0,0 +1,65 @@ +pty extension version 0.3 by A.ito + +1. Introduction + +This extension module adds ruby a functionality to execute an +arbitrary command through pseudo tty (pty). + +2. Install + +Follow the instruction below. + +(1) Execute + + ruby extconf.rb + + then Makefile is generated. + +(3) Do make; make install. + +3. What you can do + +This extension module defines a module named PTY, which contains +following module fungtions: + + getpty(command) + spawn(command) + + This function reserves a pty, executes command over the pty + and returns an array. The return value is an array with three + elements. The first element in the array is for reading and the + second for writing. The third element is the process ID of the + child process. If this function is called with an iterator block, + the array is passed to the block as block parameters, and the + function itself returns nil. + + When the child process is suspended or finished, an exception is + raised. If this function is called with an iterator block, + exception is raised only within the block. Child process + monitor is terminated on block exit. + + protect_signal + reset_signal + + These functions are obsolete in this version of pty. + +4. License + +(C) Copyright 1998 by Akinori Ito. + +This software may be redistributed freely for this purpose, in full +or in part, provided that this entire copyright notice is included +on any copies of this software and applications and derivations thereof. + +This software is provided on an "as is" basis, without warranty of any +kind, either expressed or implied, as to any matter including, but not +limited to warranty of fitness of purpose, or merchantability, or +results obtained from use of this software. + +5. Bug report + +Please feel free to send E-mail to + + aito@ei5sun.yz.yamagata-u.ac.jp + +for any bug report, opinion, contribution, etc. diff --git a/lib/ruby-1.9.1-rc1/ext/pty/README.expect b/lib/ruby-1.9.1-rc1/ext/pty/README.expect new file mode 100644 index 0000000..fddbb6f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/README.expect @@ -0,0 +1,22 @@ + README for expect + by A. Ito, 28 October, 1998 + + Expect library adds IO class a method called expect(), which +does similar act to tcl's expect extension. + +The usage of the method is: + + IO#expect(pattern,timeout=9999999) + +where `pattern' is an instance of String or Regexp and `timeout' +is Fixnum, which can be omitted. + When the method is called without block, it waits until the +input which matches the pattern is obtained from the IO or the time +specified as the timeout passes. When the pattern is obtained from the +IO, the method returns an array. The first element of the array is the +entire string obtained from the IO until the pattern matches. The +following elements indicates the specific pattern which matched to the +anchor in the regular expression. If the method ends because of +timeout, it returns nil. + When the method is called with block, the array is passed as +the block parameter. diff --git a/lib/ruby-1.9.1-rc1/ext/pty/README.expect.ja b/lib/ruby-1.9.1-rc1/ext/pty/README.expect.ja new file mode 100644 index 0000000..db84695 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/README.expect.ja @@ -0,0 +1,21 @@ + README for expect + by A. Ito, 28 October, 1998 + + Expect¥é¥¤¥Ö¥é¥ê¤Ï¡¤tcl ¤Î expect ¥Ñ¥Ã¥±¡¼¥¸¤È»÷¤¿¤è¤¦¤Êµ¡Ç½¤ò +IO¥¯¥é¥¹¤ËÄɲä·¤Þ¤¹¡¥ + + Äɲ䵤ì¤ë¥á¥½¥Ã¥É¤Î»È¤¤Êý¤Ï¼¡¤ÎÄ̤ê¤Ç¤¹¡¥ + + IO#expect(pattern,timeout=9999999) + +pattern ¤Ï String ¤« Regexp ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¡¤timeout ¤Ï Fixnum +¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ç¤¹¡¥timeout ¤Ï¾Êά¤Ç¤­¤Þ¤¹¡¥ + ¤³¤Î¥á¥½¥Ã¥É¤¬¥Ö¥í¥Ã¥¯¤Ê¤·¤Ç¸Æ¤Ð¤ì¤¿¾ì¹ç¡¤¤Þ¤º¥ì¥·¡¼¥Ð¤Ç¤¢¤ë +IO¥ª¥Ö¥¸¥§¥¯¥È¤«¤é pattern ¤Ë¥Þ¥Ã¥Á¤¹¤ë¥Ñ¥¿¡¼¥ó¤¬Æɤߤ³¤Þ¤ì¤ë +¤Þ¤ÇÂÔ¤Á¤Þ¤¹¡¥¥Ñ¥¿¡¼¥ó¤¬ÆÀ¤é¤ì¤¿¤é¡¤¤½¤Î¥Ñ¥¿¡¼¥ó¤Ë´Ø¤¹¤ëÇÛÎó¤ò +ÊÖ¤·¤Þ¤¹¡¥ÇÛÎó¤ÎºÇ½é¤ÎÍ×ÁǤϡ¤pattern ¤Ë¥Þ¥Ã¥Á¤¹¤ë¤Þ¤Ç¤ËÆɤߤ³ +¤Þ¤ì¤¿ÆâÍƤÎʸ»úÎó¤Ç¤¹¡¥2ÈÖÌܰʹߤÎÍ×ÁǤϡ¤pattern ¤ÎÀµµ¬É½¸½ +¤ÎÃæ¤Ë¥¢¥ó¥«¡¼¤¬¤¢¤Ã¤¿¾ì¹ç¤Ë¡¤¤½¤Î¥¢¥ó¥«¡¼¤Ë¥Þ¥Ã¥Á¤¹¤ëÉôʬ¤Ç¤¹¡¥ +¤â¤·¥¿¥¤¥à¥¢¥¦¥È¤¬µ¯¤­¤¿¾ì¹ç¤Ï¡¤¤³¤Î¥á¥½¥Ã¥É¤Ïnil¤òÊÖ¤·¤Þ¤¹¡¥ + ¤³¤Î¥á¥½¥Ã¥É¤¬¥Ö¥í¥Ã¥¯ÉÕ¤­¤Ç¸Æ¤Ð¤ì¤¿¾ì¹ç¤Ë¤Ï¡¤¥Þ¥Ã¥Á¤·¤¿Í×ÁǤΠ+ÇÛÎ󤬥֥í¥Ã¥¯°ú¿ô¤È¤·¤ÆÅϤµ¤ì¡¤¥Ö¥í¥Ã¥¯¤¬É¾²Á¤µ¤ì¤Þ¤¹¡¥ diff --git a/lib/ruby-1.9.1-rc1/ext/pty/README.ja b/lib/ruby-1.9.1-rc1/ext/pty/README.ja new file mode 100644 index 0000000..5ae4fb0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/README.ja @@ -0,0 +1,89 @@ +pty ³ÈÄ¥¥â¥¸¥å¡¼¥ë version 0.3 by A.ito + +1. ¤Ï¤¸¤á¤Ë + +¤³¤Î³ÈÄ¥¥â¥¸¥å¡¼¥ë¤Ï¡¤²¾ÁÛtty (pty) ¤òÄ̤·¤ÆŬÅö¤Ê¥³¥Þ¥ó¥É¤ò +¼Â¹Ô¤¹¤ëµ¡Ç½¤ò ruby ¤ËÄ󶡤·¤Þ¤¹¡¥ + +2. ¥¤¥ó¥¹¥È¡¼¥ë + +¼¡¤Î¤è¤¦¤Ë¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +(1) ruby extconf.rb + + ¤ò¼Â¹Ô¤¹¤ë¤È Makefile ¤¬À¸À®¤µ¤ì¤Þ¤¹¡¥ + +(2) make; make install ¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +3. ²¿¤¬¤Ç¤­¤ë¤« + +¤³¤Î³ÈÄ¥¥â¥¸¥å¡¼¥ë¤Ï¡¤PTY ¤È¤¤¤¦¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤·¤Þ¤¹¡¥¤½¤ÎÃæ +¤Ë¤Ï¡¤¼¡¤Î¤è¤¦¤Ê¥â¥¸¥å¡¼¥ë´Ø¿ô¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡¥ + + getpty(command) + spawn(command) + + ¤³¤Î´Ø¿ô¤Ï¡¤²¾ÁÛtty¤ò³ÎÊݤ·¡¤»ØÄꤵ¤ì¤¿¥³¥Þ¥ó¥É¤ò¤½¤Î²¾ÁÛtty + ¤Î¸þ¤³¤¦¤Ç¼Â¹Ô¤·¡¤ÇÛÎó¤òÊÖ¤·¤Þ¤¹¡¥Ìá¤êÃͤÏ3¤Ä¤ÎÍ×ÁǤ«¤é¤Ê¤ë + ÇÛÎó¤Ç¤¹¡¥ºÇ½é¤ÎÍ×ÁǤϲ¾ÁÛtty¤«¤éÆɤ߽Ф¹¤¿¤á¤ÎIO¥ª¥Ö¥¸¥§¥¯¥È¡¤ + 2ÈÖÌܤϽñ¤­¤³¤à¤¿¤á¤ÎIO¥ª¥Ö¥¸¥§¥¯¥È¡¤3ÈÖÌÜ¤Ï»Ò¥×¥í¥»¥¹¤Î¥×¥í + ¥»¥¹ID¤Ç¤¹¡¥¤³¤Î´Ø¿ô¤¬¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ¸Æ¤Ð¤ì¤¿¾ì¹ç¡¤¤³¤ì¤é¤Î + Í×ÁǤϥ֥í¥Ã¥¯¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÅϤµ¤ì¡¤´Ø¿ô¼«ÂΤÏnil¤òÊÖ¤·¤Þ¤¹¡¥ + + ¤³¤Î´Ø¿ô¤Ë¤è¤Ã¤Æºî¤é¤ì¤¿¥µ¥Ö¥×¥í¥»¥¹¤¬Æ°¤¤¤Æ¤¤¤ë´Ö¡¤»Ò¥×¥í¥»¥¹ + ¤Î¾õÂÖ¤ò´Æ»ë¤¹¤ë¤¿¤á¤Ë SIGCHLD ¥·¥°¥Ê¥ë¤òÊ᪤·¤Þ¤¹¡¥»Ò¥×¥í¥»¥¹ + ¤¬½ªÎ»¤·¤¿¤êÄä»ß¤·¤¿¾ì¹ç¤Ë¤Ï¡¤Îã³°¤¬È¯À¸¤·¤Þ¤¹¡¥¤³¤Î´Ö¡¤¤¹¤Ù¤Æ¤Î + SIGCHLD ¤¬ PTY ¥â¥¸¥å¡¼¥ë¤Î¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ËÊ᪤µ¤ì¤ë¤Î¤Ç¡¤ + ¥µ¥Ö¥×¥í¥»¥¹¤òÀ¸À®¤¹¤ë¾¤Î´Ø¿ô(system() ¤È¤« IO.popen()¤Ê¤É)¤ò + »È¤¦¤È¡¤Í½´ü¤·¤Ê¤¤Îã³°¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡¥¤³¤ì¤òËɤ°¤¿¤á + ¤Ë¤Ï¡¤²¼µ­¤Îprotect_signal()¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡¥ + + ¤³¤Î´Ø¿ô¤¬¥Ö¥í¥Ã¥¯¥Ñ¥é¥á¡¼¥¿ÉÕ¤­¤Ç¸Æ¤Ð¤ì¤¿¾ì¹ç¤Ë¤Ï¡¤¤½¤Î¥Ö¥í¥Ã¥¯ + ¤ÎÃæ¤Ç¤Î¤ß SIGCHLD ¤¬Ê᪤µ¤ì¤Þ¤¹¡¥¤·¤¿¤¬¤Ã¤Æ¡¤¥Ö¥í¥Ã¥¯¥Ñ¥é¥á¡¼¥¿ + ¤È¤·¤ÆÅϤµ¤ì¤¿IO¥ª¥Ö¥¸¥§¥¯¥È¤ò¡¤¥Ö¥í¥Ã¥¯¤Î³°¤Ë»ý¤Á½Ð¤·¤Æ»È¤¦¤Î + ¤Ï´«¤á¤é¤ì¤Þ¤»¤ó¡¥ + + + protect_signal + + ¤³¤Î´Ø¿ô¤Ï¥¤¥Æ¥ì¡¼¥¿¤Ç¤¹¡¥¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥Ö¥í¥Ã¥¯¤ÎÃæ¤Ç¤Ï¡¤ + »Ò¥×¥í¥»¥¹¤¬½ªÎ»¤·¤Æ¤âÎã³°¤òȯÀ¸¤·¤Þ¤»¤ó¡¥¤³¤Î´Ø¿ô¤ò»È¤¦¤³¤È¤Ç¡¤ + PTY¤Î»Ò¥×¥í¥»¥¹¤¬Æ°¤¤¤Æ¤¤¤ë´Ö¤Ç¤â¡¤system()¤ä IO.popen()¤Ê¤É¤Î + ´Ø¿ô¤ò°ÂÁ´¤Ë»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥Î㤨¤Ð¡¤ + + PTY.spawn("command_foo") do |r,w| + ... + ... + PTY.protect_signal do + system "some other commands" + end + ... + end + + ¤³¤Î¤è¤¦¤Êµ­½Ò¤Ë¤è¤ê¡¤"some other commands" ¤¬½ªÎ»¤·¤¿¤È¤­¤Ë + Îã³°¤¬È¯À¸¤¹¤ë¤Î¤òËɤ²¤Þ¤¹¡¥ + + reset_signal + + PTY ¤Î»Ò¥×¥í¥»¥¹¤¬Æ°¤¤¤Æ¤¤¤Æ¤â¡¤¤½¤Î¥×¥í¥»¥¹¤Î½ªÎ»»þ¤ËÎã³°¤¬È¯À¸ + ¤·¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤¹¡¥ + +4. ÍøÍѤˤĤ¤¤Æ + +°ËÆ£¾´Â§¤¬Ãøºî¸¢¤òÊÝÍ­¤·¤Þ¤¹¡¥ + +¥½¡¼¥¹¥×¥í¥°¥é¥à¤Þ¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤Ë¸µ¤ÎÃøºî¸¢É½¼¨¤¬²þÊѤµ¤ì¤º¤Ë +ɽ¼¨¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¸Â¤ê¡¤Ã¯¤Ç¤â¡¤¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤ò̵½þ¤«¤ÄÃøºî +¸¢¼Ô¤Ë̵ÃǤÇÍøÍÑ¡¦ÇÛÉÛ¡¦²þÊѤǤ­¤Þ¤¹¡¥ÍøÍÑÌÜŪ¤Ï¸ÂÄꤵ¤ì¤Æ¤¤¤Þ¤» +¤ó¡¥ + +¤³¤Î¥×¥í¥°¥é¥à¤ÎÍøÍÑ¡¦ÇÛÉÛ¤½¤Î¾¤³¤Î¥×¥í¥°¥é¥à¤Ë´Ø·¸¤¹¤ë¹Ô°Ù¤Ë¤è +¤Ã¤ÆÀ¸¤¸¤¿¤¤¤«¤Ê¤ë»³²¤ËÂФ·¤Æ¤â¡¤ºî¼Ô¤Ï°ìÀÚÀÕǤ¤òÉ餤¤Þ¤»¤ó¡¥ + +5. ¥Ð¥°Êó¹ðÅù + +¥Ð¥°¥ì¥Ý¡¼¥È¤Ï´¿·Þ¤·¤Þ¤¹¡¥ + + aito@ei5sun.yz.yamagata-u.ac.jp + +¤Þ¤ÇÅŻҥ᡼¥ë¤Ç¥Ð¥°¥ì¥Ý¡¼¥È¤ò¤ªÁ÷¤ê¤¯¤À¤µ¤¤¡¥ diff --git a/lib/ruby-1.9.1-rc1/ext/pty/depend b/lib/ruby-1.9.1-rc1/ext/pty/depend new file mode 100644 index 0000000..2249eb8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/depend @@ -0,0 +1 @@ +pty.o: pty.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/io.h diff --git a/lib/ruby-1.9.1-rc1/ext/pty/expect_sample.rb b/lib/ruby-1.9.1-rc1/ext/pty/expect_sample.rb new file mode 100644 index 0000000..2a2e29f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/expect_sample.rb @@ -0,0 +1,48 @@ +# +# sample program of expect.rb +# +# by A. Ito +# +# This program reports the latest version of ruby interpreter +# by connecting to ftp server at ruby-lang.org. +# +require 'pty' +require 'expect' + +fnames = [] +PTY.spawn("ftp ftp.ruby-lang.org") do |r_f,w_f,pid| + w_f.sync = true + + $expect_verbose = false + + if !ENV['USER'].nil? + username = ENV['USER'] + elsif !ENV['LOGNAME'].nil? + username = ENV['LOGNAME'] + else + username = 'guest' + end + + r_f.expect(/^(Name).*: |(word):|> /) do + w_f.puts($1 ? "ftp" : $2 ? "#{username}@" : "cd pub/ruby") + end + r_f.expect("> ") do + w_f.print "dir\n" + end + + r_f.expect(/[^\-]> /) do |output| + for x in output[0].split("\n") + if x =~ /(ruby.*?\.tar\.gz)/ then + fnames.push $1 + end + end + end + begin + w_f.print "quit\n" + rescue + end +end + +print "The latest ruby interpreter is " +print fnames.sort.pop +print "\n" diff --git a/lib/ruby-1.9.1-rc1/ext/pty/extconf.rb b/lib/ruby-1.9.1-rc1/ext/pty/extconf.rb new file mode 100644 index 0000000..c2fed08 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/extconf.rb @@ -0,0 +1,16 @@ +require 'mkmf' + +if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM + have_header("sys/stropts.h") + have_func("setresuid") + have_header("libutil.h") + have_header("util.h") # OpenBSD openpty + have_header("pty.h") + have_library("util", "openpty") + if have_func("openpty") or + have_func("_getpty") or + have_func("ptsname") or + have_func("ioctl") + create_makefile('pty') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/pty/lib/expect.rb b/lib/ruby-1.9.1-rc1/ext/pty/lib/expect.rb new file mode 100644 index 0000000..08191b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/lib/expect.rb @@ -0,0 +1,36 @@ +$expect_verbose = false + +class IO + def expect(pat,timeout=9999999) + buf = '' + case pat + when String + e_pat = Regexp.new(Regexp.quote(pat)) + when Regexp + e_pat = pat + end + while true + if !IO.select([self],nil,nil,timeout) or eof? then + result = nil + break + end + c = getc.chr + buf << c + if $expect_verbose + STDOUT.print c + STDOUT.flush + end + if mat=e_pat.match(buf) then + result = [buf,*mat.to_a[1..-1]] + break + end + end + if block_given? then + yield result + else + return result + end + nil + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/pty/pty.c b/lib/ruby-1.9.1-rc1/ext/pty/pty.c new file mode 100644 index 0000000..6e6852a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/pty.c @@ -0,0 +1,499 @@ +#include "ruby/config.h" +#ifdef RUBY_EXTCONF_H +#include RUBY_EXTCONF_H +#endif +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_SYS_IOCTL_H +#include +#endif +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +#ifdef HAVE_PTY_H +#include +#endif +#ifdef HAVE_SYS_WAIT_H +#include +#else +#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) +#endif +#include + +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/util.h" + +#include +#ifdef HAVE_SYS_STROPTS_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#define DEVICELEN 16 + +#if !defined(HAVE_OPENPTY) +#if defined(__hpux) +static const +char MasterDevice[] = "/dev/ptym/pty%s", + SlaveDevice[] = "/dev/pty/tty%s", + *const deviceNo[] = { + "p0","p1","p2","p3","p4","p5","p6","p7", + "p8","p9","pa","pb","pc","pd","pe","pf", + "q0","q1","q2","q3","q4","q5","q6","q7", + "q8","q9","qa","qb","qc","qd","qe","qf", + "r0","r1","r2","r3","r4","r5","r6","r7", + "r8","r9","ra","rb","rc","rd","re","rf", + "s0","s1","s2","s3","s4","s5","s6","s7", + "s8","s9","sa","sb","sc","sd","se","sf", + "t0","t1","t2","t3","t4","t5","t6","t7", + "t8","t9","ta","tb","tc","td","te","tf", + "u0","u1","u2","u3","u4","u5","u6","u7", + "u8","u9","ua","ub","uc","ud","ue","uf", + "v0","v1","v2","v3","v4","v5","v6","v7", + "v8","v9","va","vb","vc","vd","ve","vf", + "w0","w1","w2","w3","w4","w5","w6","w7", + "w8","w9","wa","wb","wc","wd","we","wf", + 0, + }; +#elif defined(_IBMESA) /* AIX/ESA */ +static const +char MasterDevice[] = "/dev/ptyp%s", + SlaveDevice[] = "/dev/ttyp%s", + *const deviceNo[] = { +"00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f", +"10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f", +"20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f", +"30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f", +"40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f", +"50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f", +"60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f", +"70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f", +"80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f", +"90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f", +"a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af", +"b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf", +"c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf", +"d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df", +"e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef", +"f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff", + }; +#elif !defined(HAVE_PTSNAME) +static const +char MasterDevice[] = "/dev/pty%s", + SlaveDevice[] = "/dev/tty%s", + *const deviceNo[] = { + "p0","p1","p2","p3","p4","p5","p6","p7", + "p8","p9","pa","pb","pc","pd","pe","pf", + "q0","q1","q2","q3","q4","q5","q6","q7", + "q8","q9","qa","qb","qc","qd","qe","qf", + "r0","r1","r2","r3","r4","r5","r6","r7", + "r8","r9","ra","rb","rc","rd","re","rf", + "s0","s1","s2","s3","s4","s5","s6","s7", + "s8","s9","sa","sb","sc","sd","se","sf", + 0, + }; +#endif +#endif /* !defined(HAVE_OPENPTY) */ + +#ifndef HAVE_SETEUID +# ifdef HAVE_SETREUID +# define seteuid(e) setreuid(-1, (e)) +# else /* NOT HAVE_SETREUID */ +# ifdef HAVE_SETRESUID +# define seteuid(e) setresuid(-1, (e), -1) +# else /* NOT HAVE_SETRESUID */ + /* I can't set euid. (;_;) */ +# endif /* HAVE_SETRESUID */ +# endif /* HAVE_SETREUID */ +#endif /* NO_SETEUID */ + +static VALUE eChildExited; + +static VALUE +echild_status(VALUE self) +{ + return rb_ivar_get(self, rb_intern("status")); +} + +struct pty_info { + int fd; + rb_pid_t child_pid; + VALUE thread; +}; + +static void +raise_from_wait(const char *state, const struct pty_info *info) +{ + char buf[1024]; + VALUE exc; + + snprintf(buf, sizeof(buf), "pty - %s: %ld", state, (long)info->child_pid); + exc = rb_exc_new2(eChildExited, buf); + rb_iv_set(exc, "status", rb_last_status_get()); + rb_funcall(info->thread, rb_intern("raise"), 1, exc); +} + +static VALUE +pty_syswait(void *arg) +{ + const struct pty_info *const info = arg; + rb_pid_t cpid; + int status; + + for (;;) { + cpid = rb_waitpid(info->child_pid, &status, WUNTRACED); + if (cpid == -1) return Qnil; + +#if defined(WIFSTOPPED) +#elif defined(IF_STOPPED) +#define WIFSTOPPED(status) IF_STOPPED(status) +#else +---->> Either IF_STOPPED or WIFSTOPPED is needed <<---- +#endif /* WIFSTOPPED | IF_STOPPED */ + if (WIFSTOPPED(status)) { /* suspend */ + raise_from_wait("stopped", info); + } + else if (kill(info->child_pid, 0) == 0) { + raise_from_wait("changed", info); + } + else { + raise_from_wait("exited", info); + return Qnil; + } + } +} + +static void getDevice(int*, int*, char [DEVICELEN]); + +struct exec_info { + int argc; + VALUE *argv; +}; + +static VALUE +pty_exec(VALUE v) +{ + struct exec_info *arg = (struct exec_info *)v; + return rb_f_exec(arg->argc, arg->argv); +} + +struct child_info { + int master, slave; + char *slavename; + int argc; + VALUE *argv; +}; + +static int +chfunc(void *data) +{ + struct child_info *carg = data; + int master = carg->master; + int slave = carg->slave; + int argc = carg->argc; + VALUE *argv = carg->argv; + + struct exec_info arg; + int status; + + /* + * Set free from process group and controlling terminal + */ +#ifdef HAVE_SETSID + (void) setsid(); +#else /* HAS_SETSID */ +# ifdef HAVE_SETPGRP +# ifdef SETGRP_VOID + if (setpgrp() == -1) + perror("setpgrp()"); +# else /* SETGRP_VOID */ + if (setpgrp(0, getpid()) == -1) + rb_sys_fail("setpgrp()"); + { + int i = open("/dev/tty", O_RDONLY); + if (i < 0) rb_sys_fail("/dev/tty"); + if (ioctl(i, TIOCNOTTY, (char *)0)) + perror("ioctl(TIOCNOTTY)"); + close(i); + } +# endif /* SETGRP_VOID */ +# endif /* HAVE_SETPGRP */ +#endif /* HAS_SETSID */ + + /* + * obtain new controlling terminal + */ +#if defined(TIOCSCTTY) + close(master); + (void) ioctl(slave, TIOCSCTTY, (char *)0); + /* errors ignored for sun */ +#else + close(slave); + slave = open(carg->slavename, O_RDWR); + if (slave < 0) { + perror("open: pty slave"); + _exit(1); + } + close(master); +#endif + write(slave, "", 1); + dup2(slave,0); + dup2(slave,1); + dup2(slave,2); + close(slave); +#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID) + seteuid(getuid()); +#endif + + arg.argc = argc; + arg.argv = argv; + rb_protect(pty_exec, (VALUE)&arg, &status); + sleep(1); + _exit(1); +} + +static void +establishShell(int argc, VALUE *argv, struct pty_info *info, + char SlaveName[DEVICELEN]) +{ + int master,slave; + rb_pid_t pid; + char *p, tmp, *getenv(); + struct passwd *pwent; + VALUE v; + struct child_info carg; + + if (argc == 0) { + const char *shellname; + + if ((p = getenv("SHELL")) != NULL) { + shellname = p; + } + else { + pwent = getpwuid(getuid()); + if (pwent && pwent->pw_shell) + shellname = pwent->pw_shell; + else + shellname = "/bin/sh"; + } + v = rb_str_new2(shellname); + argc = 1; + argv = &v; + } + + getDevice(&master, &slave, SlaveName); + + carg.master = master; + carg.slave = slave; + carg.slavename = SlaveName; + carg.argc = argc; + carg.argv = argv; + pid = rb_fork(0, chfunc, &carg, Qnil); + + info->thread = rb_thread_current(); + if (pid < 0) { + close(master); + close(slave); + rb_sys_fail("fork failed"); + } + + read(master, &tmp, 1); + close(slave); + + info->child_pid = pid; + info->fd = master; +} + +static VALUE +pty_finalize_syswait(struct pty_info *info) +{ + rb_thread_kill(info->thread); + rb_funcall(info->thread, rb_intern("value"), 0); + rb_detach_process(info->child_pid); + return Qnil; +} + +static int +get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int fail) +{ +#if defined HAVE_OPENPTY +/* + * Use openpty(3) of 4.3BSD Reno and later, + * or the same interface function. + */ + if (openpty(master, slave, SlaveName, + (struct termios *)0, (struct winsize *)0) == -1) { + if (!fail) return -1; + rb_raise(rb_eRuntimeError, "openpty() failed"); + } + + return 0; +#elif defined HAVE__GETPTY + char *name; + + if (!(name = _getpty(master, O_RDWR, 0622, 0))) { + if (!fail) return -1; + rb_raise(rb_eRuntimeError, "_getpty() failed"); + } + + *slave = open(name, O_RDWR); + strlcpy(SlaveName, name, sizeof SlaveName); + + return 0; +#else /* HAVE__GETPTY */ + int i,j; + +#ifdef HAVE_PTSNAME + char *pn; + void (*s)(); + + extern char *ptsname(int); + extern int unlockpt(int); + extern int grantpt(int); + + if((i = open("/dev/ptmx", O_RDWR, 0)) != -1) { + s = signal(SIGCHLD, SIG_DFL); + if(grantpt(i) != -1) { + signal(SIGCHLD, s); + if(unlockpt(i) != -1) { + if((pn = ptsname(i)) != NULL) { + if((j = open(pn, O_RDWR, 0)) != -1) { +#if defined I_PUSH && !defined linux + if(ioctl(j, I_PUSH, "ptem") != -1) { + if(ioctl(j, I_PUSH, "ldterm") != -1) { + ioctl(j, I_PUSH, "ttcompat"); +#endif + *master = i; + *slave = j; + strlcpy(SlaveName, pn, sizeof SlaveName); + return 0; +#if defined I_PUSH && !defined linux + } + } +#endif + } + } + } + } + close(i); + } + if (!fail) rb_raise(rb_eRuntimeError, "can't get Master/Slave device"); + return -1; +#else + const char *const *p; + char MasterName[DEVICELEN]; + + for (p = deviceNo; *p != NULL; p++) { + snprintf(MasterName, sizeof MasterName, MasterDevice, *p); + if ((i = open(MasterName,O_RDWR,0)) >= 0) { + *master = i; + snprintf(SlaveName, sizeof SlaveName, SlaveDevice, *p); + if ((j = open(SlaveName,O_RDWR,0)) >= 0) { + *slave = j; + chown(SlaveName, getuid(), getgid()); + chmod(SlaveName, 0622); + return 0; + } + close(i); + } + } + if (fail) rb_raise(rb_eRuntimeError, "can't get %s", SlaveName); + return -1; +#endif +#endif +} + +static void +getDevice(int *master, int *slave, char SlaveName[DEVICELEN]) +{ + if (get_device_once(master, slave, SlaveName, 0)) { + rb_gc(); + get_device_once(master, slave, SlaveName, 1); + } + return Qnil; +} + +/* ruby function: getpty */ +static VALUE +pty_getpty(int argc, VALUE *argv, VALUE self) +{ + VALUE res; + struct pty_info info; + struct pty_info thinfo; + rb_io_t *wfptr,*rfptr; + VALUE rport = rb_obj_alloc(rb_cFile); + VALUE wport = rb_obj_alloc(rb_cFile); + char SlaveName[DEVICELEN]; + + MakeOpenFile(rport, rfptr); + MakeOpenFile(wport, wfptr); + + establishShell(argc, argv, &info, SlaveName); + + rfptr->mode = rb_io_mode_flags("r"); + rfptr->fd = info.fd; + rfptr->pathv = rb_obj_freeze(rb_str_new_cstr(SlaveName)); + + wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC; + wfptr->fd = dup(info.fd); + wfptr->pathv = rfptr->pathv; + + res = rb_ary_new2(3); + rb_ary_store(res,0,(VALUE)rport); + rb_ary_store(res,1,(VALUE)wport); + rb_ary_store(res,2,PIDT2NUM(info.child_pid)); + + thinfo.thread = rb_thread_create(pty_syswait, (void*)&info); + thinfo.child_pid = info.child_pid; + rb_thread_schedule(); + + if (rb_block_given_p()) { + rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo); + return Qnil; + } + return res; +} + +/* ruby function: protect_signal - obsolete */ +static VALUE +pty_protect(VALUE self) +{ + rb_warn("PTY::protect_signal is no longer needed"); + rb_yield(Qnil); + return self; +} + +/* ruby function: reset_signal - obsolete */ +static VALUE +pty_reset_signal(VALUE self) +{ + rb_warn("PTY::reset_signal is no longer needed"); + return self; +} + +static VALUE cPTY; + +void +Init_pty() +{ + cPTY = rb_define_module("PTY"); + rb_define_module_function(cPTY,"getpty",pty_getpty,-1); + rb_define_module_function(cPTY,"spawn",pty_getpty,-1); + rb_define_module_function(cPTY,"protect_signal",pty_protect,0); + rb_define_module_function(cPTY,"reset_signal",pty_reset_signal,0); + + eChildExited = rb_define_class_under(cPTY,"ChildExited",rb_eRuntimeError); + rb_define_method(eChildExited,"status",echild_status,0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/pty/script.rb b/lib/ruby-1.9.1-rc1/ext/pty/script.rb new file mode 100644 index 0000000..dbb9331 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/script.rb @@ -0,0 +1,37 @@ +require 'pty' + +if ARGV.size == 0 then + ofile = "typescript" +else + ofile = ARGV[0] +end + +logfile = File.open(ofile,"a") + +system "stty -echo raw lnext ^_" + +PTY.spawn("/bin/csh") do |r_pty,w_pty,pid| + + Thread.new do + while true + w_pty.print STDIN.getc.chr + w_pty.flush + end + end + + begin + while true + c = r_pty.sysread(512) + break if c.nil? + print c + STDOUT.flush + logfile.print c + end + rescue + # print $@,':',$!,"\n" + logfile.close + end +end + +system "stty echo -raw lnext ^v" + diff --git a/lib/ruby-1.9.1-rc1/ext/pty/shl.rb b/lib/ruby-1.9.1-rc1/ext/pty/shl.rb new file mode 100644 index 0000000..cdaf8d7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/pty/shl.rb @@ -0,0 +1,92 @@ +# +# old-fashioned 'shl' like program +# by A. Ito +# +# commands: +# c creates new shell +# C-z suspends shell +# p lists all shell +# 0,1,... choose shell +# q quit + +require 'pty' + +$shells = [] +$n_shells = 0 + +$r_pty = nil +$w_pty = nil + +def writer + system "stty -echo raw" + begin + while true + c = STDIN.getc + if c == 26 then # C-z + $reader.raise(nil) + return 'Suspend' + end + $w_pty.print c.chr + $w_pty.flush + end + rescue + $reader.raise(nil) + return 'Exit' + ensure + system "stty echo -raw" + end +end + +$reader = Thread.new { + while true + begin + next if $r_pty.nil? + c = $r_pty.getc + if c.nil? then + Thread.stop + end + print c.chr + STDOUT.flush + rescue + Thread.stop + end + end +} + +# $reader.raise(nil) + + +while true + print ">> " + STDOUT.flush + case gets + when /^c/i + $shells[$n_shells] = PTY.spawn("/bin/csh") + $r_pty,$w_pty = $shells[$n_shells] + $n_shells += 1 + $reader.run + if writer == 'Exit' + $n_shells -= 1 + $shells[$n_shells] = nil + end + when /^p/i + for i in 0..$n_shells + unless $shells[i].nil? + print i,"\n" + end + end + when /^([0-9]+)/ + n = $1.to_i + if $shells[n].nil? + print "\##{i} doesn't exist\n" + else + $r_pty,$w_pty = $shells[n] + $reader.run + if writer == 'Exit' then + $shells[n] = nil + end + end + when /^q/i + exit + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/purelib.rb b/lib/ruby-1.9.1-rc1/ext/purelib.rb new file mode 100644 index 0000000..dbe514c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/purelib.rb @@ -0,0 +1,10 @@ +nul = nil +$:.each_with_index {|path, index| + if /\A(?:\.\/)*-\z/ =~ path + nul = index + break + end +} +if nul + $:[nul..-1] = ["."] +end diff --git a/lib/ruby-1.9.1-rc1/ext/racc/cparse/.cvsignore b/lib/ruby-1.9.1-rc1/ext/racc/cparse/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/racc/cparse/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/racc/cparse/README b/lib/ruby-1.9.1-rc1/ext/racc/cparse/README new file mode 100644 index 0000000..80b4dce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/racc/cparse/README @@ -0,0 +1,10 @@ +Racc Runtime README +=================== + +This directory contains a runtime library of +Racc parser generator. If you want to generate +your own parser, you must get Racc full package. +Get it from: + + http://raa.ruby-lang.org/list.rhtml?name=racc + diff --git a/lib/ruby-1.9.1-rc1/ext/racc/cparse/cparse.c b/lib/ruby-1.9.1-rc1/ext/racc/cparse/cparse.c new file mode 100644 index 0000000..d085158 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/racc/cparse/cparse.c @@ -0,0 +1,824 @@ +/* + + cparse.c -- Racc Runtime Core + + Copyright (c) 1999-2006 Minero Aoki + + This library is free software. + You can distribute/modify this program under the same terms of ruby. + + $originalId: cparse.c,v 1.8 2006/07/06 11:39:46 aamine Exp $ + +*/ + +#include "ruby/ruby.h" + +/* ----------------------------------------------------------------------- + Important Constants +----------------------------------------------------------------------- */ + +#define RACC_VERSION "1.4.5" + +#define DEFAULT_TOKEN -1 +#define ERROR_TOKEN 1 +#define FINAL_TOKEN 0 + +#define vDEFAULT_TOKEN INT2FIX(DEFAULT_TOKEN) +#define vERROR_TOKEN INT2FIX(ERROR_TOKEN) +#define vFINAL_TOKEN INT2FIX(FINAL_TOKEN) + +/* ----------------------------------------------------------------------- + File Local Variables +----------------------------------------------------------------------- */ + +static VALUE RaccBug; +static VALUE CparseParams; + +static ID id_yydebug; +static ID id_nexttoken; +static ID id_onerror; +static ID id_noreduce; +static ID id_errstatus; + +static ID id_d_shift; +static ID id_d_reduce; +static ID id_d_accept; +static ID id_d_read_token; +static ID id_d_next_state; +static ID id_d_e_pop; + +/* ----------------------------------------------------------------------- + Utils +----------------------------------------------------------------------- */ + +/* For backward compatibility */ +#ifndef ID2SYM +# define ID2SYM(i) ULONG2NUM(i) +#endif +#ifndef SYM2ID +# define SYM2ID(v) ((ID)NUM2ULONG(v)) +#endif +#ifndef SYMBOL_P +# define SYMBOL_P(v) FIXNUM_P(v) +#endif +#ifndef LONG2NUM +# define LONG2NUM(i) INT2NUM(i) +#endif + +static ID value_to_id _((VALUE v)); +static inline long num_to_long _((VALUE n)); + +static ID +value_to_id(VALUE v) +{ + if (! SYMBOL_P(v)) { + rb_raise(rb_eTypeError, "not symbol"); + } + return SYM2ID(v); +} + +static inline long +num_to_long(VALUE n) +{ + return NUM2LONG(n); +} + +#define AREF(s, idx) \ + ((0 <= idx && idx < RARRAY_LEN(s)) ? RARRAY_PTR(s)[idx] : Qnil) + +/* ----------------------------------------------------------------------- + Parser Stack Interfaces +----------------------------------------------------------------------- */ + +static VALUE get_stack_tail _((VALUE stack, long len)); +static void cut_stack_tail _((VALUE stack, long len)); + +static VALUE +get_stack_tail(VALUE stack, long len) +{ + if (len < 0) return Qnil; /* system error */ + if (len > RARRAY_LEN(stack)) len = RARRAY_LEN(stack); + return rb_ary_new4(len, RARRAY_PTR(stack) + RARRAY_LEN(stack) - len); +} + +static void +cut_stack_tail(VALUE stack, long len) +{ + while (len > 0) { + rb_ary_pop(stack); + len--; + } +} + +#define STACK_INIT_LEN 64 +#define NEW_STACK() rb_ary_new2(STACK_INIT_LEN) +#define PUSH(s, i) rb_ary_store(s, RARRAY_LEN(s), i) +#define POP(s) rb_ary_pop(s) +#define LAST_I(s) \ + ((RARRAY_LEN(s) > 0) ? RARRAY_PTR(s)[RARRAY_LEN(s) - 1] : Qnil) +#define GET_TAIL(s, len) get_stack_tail(s, len) +#define CUT_TAIL(s, len) cut_stack_tail(s, len) + +/* ----------------------------------------------------------------------- + struct cparse_params +----------------------------------------------------------------------- */ + +struct cparse_params { + VALUE value_v; /* VALUE version of this struct */ + + VALUE parser; /* parser object */ + + int lex_is_iterator; + VALUE lexer; /* scanner object */ + ID lexmid; /* name of scanner method (must be an iterator) */ + + /* State transition tables (immutable) + Data structure is from Dragon Book 4.9 */ + /* action table */ + VALUE action_table; + VALUE action_check; + VALUE action_default; + VALUE action_pointer; + /* goto table */ + VALUE goto_table; + VALUE goto_check; + VALUE goto_default; + VALUE goto_pointer; + + long nt_base; /* NonTerminal BASE index */ + VALUE reduce_table; /* reduce data table */ + VALUE token_table; /* token conversion table */ + + /* parser stacks and parameters */ + VALUE state; + long curstate; + VALUE vstack; + VALUE tstack; + VALUE t; + long shift_n; + long reduce_n; + long ruleno; + + long errstatus; /* nonzero in error recovering mode */ + long nerr; /* number of error */ + + int use_result_var; + + VALUE retval; /* return value of parser routine */ + long fin; /* parse result status */ +#define CP_FIN_ACCEPT 1 +#define CP_FIN_EOT 2 +#define CP_FIN_CANTPOP 3 + + int debug; /* user level debug */ + int sys_debug; /* system level debug */ + + long i; /* table index */ +}; + +/* ----------------------------------------------------------------------- + Parser Main Routines +----------------------------------------------------------------------- */ + +static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug)); +static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid, + VALUE arg, VALUE sysdebug)); + +static void call_lexer _((struct cparse_params *v)); +static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self)); + +static VALUE assert_array _((VALUE a)); +static long assert_integer _((VALUE n)); +static VALUE assert_hash _((VALUE h)); +static VALUE initialize_params _((VALUE vparams, VALUE parser, VALUE arg, + VALUE lexer, VALUE lexmid)); +static void cparse_params_mark _((void *ptr)); + +static void parse_main _((struct cparse_params *v, + VALUE tok, VALUE val, int resume)); +static void extract_user_token _((struct cparse_params *v, + VALUE block_args, VALUE *tok, VALUE *val)); +static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val)); +static int reduce _((struct cparse_params* v, long act)); +static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); + +#ifdef DEBUG +# define D_puts(msg) if (v->sys_debug) puts(msg) +# define D_printf(fmt,arg) if (v->sys_debug) printf(fmt,arg) +#else +# define D_puts(msg) +# define D_printf(fmt,arg) +#endif + +static VALUE +racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) +{ + volatile VALUE vparams; + struct cparse_params *v; + + vparams = Data_Make_Struct(CparseParams, struct cparse_params, + cparse_params_mark, -1, v); + D_puts("starting cparse"); + v->sys_debug = RTEST(sysdebug); + vparams = initialize_params(vparams, parser, arg, Qnil, Qnil); + v->lex_is_iterator = Qfalse; + parse_main(v, Qnil, Qnil, 0); + + return v->retval; +} + +static VALUE +racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) +{ + volatile VALUE vparams; + struct cparse_params *v; + + vparams = Data_Make_Struct(CparseParams, struct cparse_params, + cparse_params_mark, -1, v); + v->sys_debug = RTEST(sysdebug); + D_puts("start C yyparse"); + vparams = initialize_params(vparams, parser, arg, lexer, lexmid); + v->lex_is_iterator = Qtrue; + D_puts("params initialized"); + parse_main(v, Qnil, Qnil, 0); + call_lexer(v); + if (!v->fin) { + rb_raise(rb_eArgError, "%s() is finished before EndOfToken", + rb_id2name(v->lexmid)); + } + + return v->retval; +} + +#ifdef HAVE_RB_BLOCK_CALL +static void +call_lexer(struct cparse_params *v) +{ + rb_block_call(v->lexer, v->lexmid, 0, NULL, lexer_i, v->value_v); +} +#else +static VALUE +lexer_iter(VALUE data) +{ + struct cparse_params *v; + + Data_Get_Struct(data, struct cparse_params, v); + rb_funcall(v->lexer, v->lexmid, 0); + return Qnil; +} + +static void +call_lexer(struct cparse_params *v) +{ + rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v); +} +#endif + +static VALUE +lexer_i(VALUE block_args, VALUE data, VALUE self) +{ + struct cparse_params *v; + VALUE tok, val; + + Data_Get_Struct(data, struct cparse_params, v); + if (v->fin) + rb_raise(rb_eArgError, "extra token after EndOfToken"); + extract_user_token(v, block_args, &tok, &val); + parse_main(v, tok, val, 1); + if (v->fin && v->fin != CP_FIN_ACCEPT) + rb_iter_break(); + return Qnil; +} + +static VALUE +assert_array(VALUE a) +{ + Check_Type(a, T_ARRAY); + return a; +} + +static VALUE +assert_hash(VALUE h) +{ + Check_Type(h, T_HASH); + return h; +} + +static long +assert_integer(VALUE n) +{ + return NUM2LONG(n); +} + +static VALUE +initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lexmid) +{ + struct cparse_params *v; + + Data_Get_Struct(vparams, struct cparse_params, v); + v->value_v = vparams; + v->parser = parser; + v->lexer = lexer; + if (! NIL_P(lexmid)) + v->lexmid = value_to_id(lexmid); + + v->debug = RTEST(rb_ivar_get(parser, id_yydebug)); + + Check_Type(arg, T_ARRAY); + if (!(13 <= RARRAY_LEN(arg) && RARRAY_LEN(arg) <= 14)) + rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY_LEN(arg)); + v->action_table = assert_array (RARRAY_PTR(arg)[ 0]); + v->action_check = assert_array (RARRAY_PTR(arg)[ 1]); + v->action_default = assert_array (RARRAY_PTR(arg)[ 2]); + v->action_pointer = assert_array (RARRAY_PTR(arg)[ 3]); + v->goto_table = assert_array (RARRAY_PTR(arg)[ 4]); + v->goto_check = assert_array (RARRAY_PTR(arg)[ 5]); + v->goto_default = assert_array (RARRAY_PTR(arg)[ 6]); + v->goto_pointer = assert_array (RARRAY_PTR(arg)[ 7]); + v->nt_base = assert_integer(RARRAY_PTR(arg)[ 8]); + v->reduce_table = assert_array (RARRAY_PTR(arg)[ 9]); + v->token_table = assert_hash (RARRAY_PTR(arg)[10]); + v->shift_n = assert_integer(RARRAY_PTR(arg)[11]); + v->reduce_n = assert_integer(RARRAY_PTR(arg)[12]); + if (RARRAY_LEN(arg) > 13) { + v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); + } + else { + v->use_result_var = Qtrue; + } + + v->tstack = v->debug ? NEW_STACK() : Qnil; + v->vstack = NEW_STACK(); + v->state = NEW_STACK(); + v->curstate = 0; + PUSH(v->state, INT2FIX(0)); + v->t = INT2FIX(FINAL_TOKEN + 1); /* must not init to FINAL_TOKEN */ + v->nerr = 0; + v->errstatus = 0; + rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus)); + + v->retval = Qnil; + v->fin = 0; + + v->lex_is_iterator = Qfalse; + + rb_iv_set(parser, "@vstack", v->vstack); + if (v->debug) { + rb_iv_set(parser, "@tstack", v->tstack); + } + else { + rb_iv_set(parser, "@tstack", Qnil); + } + + return vparams; +} + +static void +cparse_params_mark(void *ptr) +{ + struct cparse_params *v = (struct cparse_params*)ptr; + + rb_gc_mark(v->value_v); + rb_gc_mark(v->parser); + rb_gc_mark(v->lexer); + rb_gc_mark(v->action_table); + rb_gc_mark(v->action_check); + rb_gc_mark(v->action_default); + rb_gc_mark(v->action_pointer); + rb_gc_mark(v->goto_table); + rb_gc_mark(v->goto_check); + rb_gc_mark(v->goto_default); + rb_gc_mark(v->goto_pointer); + rb_gc_mark(v->reduce_table); + rb_gc_mark(v->token_table); + rb_gc_mark(v->state); + rb_gc_mark(v->vstack); + rb_gc_mark(v->tstack); + rb_gc_mark(v->t); + rb_gc_mark(v->retval); +} + +static void +extract_user_token(struct cparse_params *v, VALUE block_args, + VALUE *tok, VALUE *val) +{ + if (NIL_P(block_args)) { + /* EOF */ + *tok = Qfalse; + *val = rb_str_new("$", 1); + return; + } + + if (TYPE(block_args) != T_ARRAY) { + rb_raise(rb_eTypeError, + "%s() %s %s (must be Array[2])", + v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token", + v->lex_is_iterator ? "yielded" : "returned", + rb_class2name(CLASS_OF(block_args))); + } + if (RARRAY_LEN(block_args) != 2) { + rb_raise(rb_eArgError, + "%s() %s wrong size of array (%ld for 2)", + v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token", + v->lex_is_iterator ? "yielded" : "returned", + RARRAY_LEN(block_args)); + } + *tok = AREF(block_args, 0); + *val = AREF(block_args, 1); +} + +#define SHIFT(v,act,tok,val) shift(v,act,tok,val) +#define REDUCE(v,act) do {\ + switch (reduce(v,act)) { \ + case 0: /* normal */ \ + break; \ + case 1: /* yyerror */ \ + goto user_yyerror; \ + case 2: /* yyaccept */ \ + D_puts("u accept"); \ + goto accept; \ + default: \ + break; \ + } \ +} while (0) + +static void +parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume) +{ + long i; /* table index */ + long act; /* action type */ + VALUE act_value; /* action type, VALUE version */ + int read_next = 1; /* true if we need to read next token */ + VALUE tmp; + + if (resume) + goto resume; + + while (1) { + D_puts(""); + D_puts("---- enter new loop ----"); + D_puts(""); + + D_printf("(act) k1=%ld\n", v->curstate); + tmp = AREF(v->action_pointer, v->curstate); + if (NIL_P(tmp)) goto notfound; + D_puts("(act) pointer[k1] ok"); + i = NUM2LONG(tmp); + + D_printf("read_next=%d\n", read_next); + if (read_next && (v->t != vFINAL_TOKEN)) { + if (v->lex_is_iterator) { + D_puts("resuming..."); + if (v->fin) rb_raise(rb_eArgError, "token given after EOF"); + v->i = i; /* save i */ + return; + resume: + D_puts("resumed"); + i = v->i; /* load i */ + } + else { + D_puts("next_token"); + tmp = rb_funcall(v->parser, id_nexttoken, 0); + extract_user_token(v, tmp, &tok, &val); + } + /* convert token */ + v->t = rb_hash_aref(v->token_table, tok); + if (NIL_P(v->t)) { + v->t = vERROR_TOKEN; + } + D_printf("(act) t(k2)=%ld\n", NUM2LONG(v->t)); + if (v->debug) { + rb_funcall(v->parser, id_d_read_token, + 3, v->t, tok, val); + } + } + read_next = 0; + + i += NUM2LONG(v->t); + D_printf("(act) i=%ld\n", i); + if (i < 0) goto notfound; + + act_value = AREF(v->action_table, i); + if (NIL_P(act_value)) goto notfound; + act = NUM2LONG(act_value); + D_printf("(act) table[i]=%ld\n", act); + + tmp = AREF(v->action_check, i); + if (NIL_P(tmp)) goto notfound; + if (NUM2LONG(tmp) != v->curstate) goto notfound; + D_printf("(act) check[i]=%ld\n", NUM2LONG(tmp)); + + D_puts("(act) found"); + act_fixed: + D_printf("act=%ld\n", act); + goto handle_act; + + notfound: + D_puts("(act) not found: use default"); + act_value = AREF(v->action_default, v->curstate); + act = NUM2LONG(act_value); + goto act_fixed; + + + handle_act: + if (act > 0 && act < v->shift_n) { + D_puts("shift"); + if (v->errstatus > 0) { + v->errstatus--; + rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus)); + } + SHIFT(v, act, v->t, val); + read_next = 1; + } + else if (act < 0 && act > -(v->reduce_n)) { + D_puts("reduce"); + REDUCE(v, act); + } + else if (act == -(v->reduce_n)) { + goto error; + error_recovered: + ; /* goto label requires stmt */ + } + else if (act == v->shift_n) { + D_puts("accept"); + goto accept; + } + else { + rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act); + } + + if (v->debug) { + rb_funcall(v->parser, id_d_next_state, + 2, LONG2NUM(v->curstate), v->state); + } + } + /* not reach */ + + + accept: + if (v->debug) rb_funcall(v->parser, id_d_accept, 0); + v->retval = RARRAY_PTR(v->vstack)[0]; + v->fin = CP_FIN_ACCEPT; + return; + + + error: + D_printf("error detected, status=%ld\n", v->errstatus); + if (v->errstatus == 0) { + v->nerr++; + rb_funcall(v->parser, id_onerror, + 3, v->t, val, v->vstack); + } + user_yyerror: + if (v->errstatus == 3) { + if (v->t == vFINAL_TOKEN) { + v->retval = Qfalse; + v->fin = CP_FIN_EOT; + return; + } + read_next = 1; + } + v->errstatus = 3; + rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus)); + + /* check if we can shift/reduce error token */ + D_printf("(err) k1=%ld\n", v->curstate); + D_printf("(err) k2=%d (error)\n", ERROR_TOKEN); + while (1) { + tmp = AREF(v->action_pointer, v->curstate); + if (NIL_P(tmp)) goto error_pop; + D_puts("(err) pointer[k1] ok"); + + i = NUM2LONG(tmp) + ERROR_TOKEN; + D_printf("(err) i=%ld\n", i); + if (i < 0) goto error_pop; + + act_value = AREF(v->action_table, i); + if (NIL_P(act_value)) { + D_puts("(err) table[i] == nil"); + goto error_pop; + } + act = NUM2LONG(act_value); + D_printf("(err) table[i]=%ld\n", act); + + tmp = AREF(v->action_check, i); + if (NIL_P(tmp)) { + D_puts("(err) check[i] == nil"); + goto error_pop; + } + if (NUM2LONG(tmp) != v->curstate) { + D_puts("(err) check[i] != k1"); + goto error_pop; + } + + D_puts("(err) found: can handle error token"); + break; + + error_pop: + D_puts("(err) act not found: can't handle error token; pop"); + + if (RARRAY_LEN(v->state) <= 1) { + v->retval = Qnil; + v->fin = CP_FIN_CANTPOP; + return; + } + POP(v->state); + POP(v->vstack); + v->curstate = num_to_long(LAST_I(v->state)); + if (v->debug) { + POP(v->tstack); + rb_funcall(v->parser, id_d_e_pop, + 3, v->state, v->tstack, v->vstack); + } + } + + /* shift/reduce error token */ + if (act > 0 && act < v->shift_n) { + D_puts("e shift"); + SHIFT(v, act, ERROR_TOKEN, val); + } + else if (act < 0 && act > -(v->reduce_n)) { + D_puts("e reduce"); + REDUCE(v, act); + } + else if (act == v->shift_n) { + D_puts("e accept"); + goto accept; + } + else { + rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act); + } + goto error_recovered; +} + +static void +shift(struct cparse_params *v, long act, VALUE tok, VALUE val) +{ + PUSH(v->vstack, val); + if (v->debug) { + PUSH(v->tstack, tok); + rb_funcall(v->parser, id_d_shift, + 3, tok, v->tstack, v->vstack); + } + v->curstate = act; + PUSH(v->state, LONG2NUM(v->curstate)); +} + +static int +reduce(struct cparse_params *v, long act) +{ + VALUE code; + v->ruleno = -act * 3; + code = rb_catch("racc_jump", reduce0, v->value_v); + v->errstatus = num_to_long(rb_ivar_get(v->parser, id_errstatus)); + return NUM2INT(code); +} + +static VALUE +reduce0(VALUE val, VALUE data, VALUE self) +{ + struct cparse_params *v; + VALUE reduce_to, reduce_len, method_id; + long len; + ID mid; + VALUE tmp, tmp_t = Qundef, tmp_v = Qundef; + long i, k1, k2; + VALUE goto_state; + + Data_Get_Struct(data, struct cparse_params, v); + reduce_len = RARRAY_PTR(v->reduce_table)[v->ruleno]; + reduce_to = RARRAY_PTR(v->reduce_table)[v->ruleno+1]; + method_id = RARRAY_PTR(v->reduce_table)[v->ruleno+2]; + len = NUM2LONG(reduce_len); + mid = value_to_id(method_id); + + /* call action */ + if (len == 0) { + tmp = Qnil; + if (mid != id_noreduce) + tmp_v = rb_ary_new(); + if (v->debug) + tmp_t = rb_ary_new(); + } + else { + if (mid != id_noreduce) { + tmp_v = GET_TAIL(v->vstack, len); + tmp = RARRAY_PTR(tmp_v)[0]; + } + else { + tmp = RARRAY_PTR(v->vstack)[ RARRAY_LEN(v->vstack) - len ]; + } + CUT_TAIL(v->vstack, len); + if (v->debug) { + tmp_t = GET_TAIL(v->tstack, len); + CUT_TAIL(v->tstack, len); + } + CUT_TAIL(v->state, len); + } + if (mid != id_noreduce) { + if (v->use_result_var) { + tmp = rb_funcall(v->parser, mid, + 3, tmp_v, v->vstack, tmp); + } + else { + tmp = rb_funcall(v->parser, mid, + 2, tmp_v, v->vstack); + } + } + + /* then push result */ + PUSH(v->vstack, tmp); + if (v->debug) { + PUSH(v->tstack, reduce_to); + rb_funcall(v->parser, id_d_reduce, + 4, tmp_t, reduce_to, v->tstack, v->vstack); + } + + /* calculate transition state */ + if (RARRAY_LEN(v->state) == 0) + rb_raise(RaccBug, "state stack unexpectedly empty"); + k2 = num_to_long(LAST_I(v->state)); + k1 = num_to_long(reduce_to) - v->nt_base; + D_printf("(goto) k1=%ld\n", k1); + D_printf("(goto) k2=%ld\n", k2); + + tmp = AREF(v->goto_pointer, k1); + if (NIL_P(tmp)) goto notfound; + + i = NUM2LONG(tmp) + k2; + D_printf("(goto) i=%ld\n", i); + if (i < 0) goto notfound; + + goto_state = AREF(v->goto_table, i); + if (NIL_P(goto_state)) { + D_puts("(goto) table[i] == nil"); + goto notfound; + } + D_printf("(goto) table[i]=%ld (goto_state)\n", NUM2LONG(goto_state)); + + tmp = AREF(v->goto_check, i); + if (NIL_P(tmp)) { + D_puts("(goto) check[i] == nil"); + goto notfound; + } + if (tmp != LONG2NUM(k1)) { + D_puts("(goto) check[i] != table[i]"); + goto notfound; + } + D_printf("(goto) check[i]=%ld\n", NUM2LONG(tmp)); + + D_puts("(goto) found"); + transit: + PUSH(v->state, goto_state); + v->curstate = NUM2LONG(goto_state); + return INT2FIX(0); + + notfound: + D_puts("(goto) not found: use default"); + /* overwrite `goto-state' by default value */ + goto_state = AREF(v->goto_default, k1); + goto transit; +} + +/* ----------------------------------------------------------------------- + Ruby Interface +----------------------------------------------------------------------- */ + +void +Init_cparse(void) +{ + VALUE Racc, Parser; + ID id_racc = rb_intern("Racc"); + + if (rb_const_defined(rb_cObject, id_racc)) { + Racc = rb_const_get(rb_cObject, id_racc); + Parser = rb_const_get_at(Racc, rb_intern("Parser")); + } + else { + Racc = rb_define_module("Racc"); + Parser = rb_define_class_under(Racc, "Parser", rb_cObject); + } + rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2); + rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4); + rb_define_const(Parser, "Racc_Runtime_Core_Version_C", + rb_str_new2(RACC_VERSION)); + rb_define_const(Parser, "Racc_Runtime_Core_Id_C", + rb_str_new2("$originalId: cparse.c,v 1.8 2006/07/06 11:39:46 aamine Exp $")); + + CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject); + + RaccBug = rb_eRuntimeError; + + id_yydebug = rb_intern("@yydebug"); + id_nexttoken = rb_intern("next_token"); + id_onerror = rb_intern("on_error"); + id_noreduce = rb_intern("_reduce_none"); + id_errstatus = rb_intern("@racc_error_status"); + + id_d_shift = rb_intern("racc_shift"); + id_d_reduce = rb_intern("racc_reduce"); + id_d_accept = rb_intern("racc_accept"); + id_d_read_token = rb_intern("racc_read_token"); + id_d_next_state = rb_intern("racc_next_state"); + id_d_e_pop = rb_intern("racc_e_pop"); +} diff --git a/lib/ruby-1.9.1-rc1/ext/racc/cparse/depend b/lib/ruby-1.9.1-rc1/ext/racc/cparse/depend new file mode 100644 index 0000000..7b06a88 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/racc/cparse/depend @@ -0,0 +1 @@ +cparse.o: cparse.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/racc/cparse/extconf.rb b/lib/ruby-1.9.1-rc1/ext/racc/cparse/extconf.rb new file mode 100644 index 0000000..1089ecb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/racc/cparse/extconf.rb @@ -0,0 +1,5 @@ +# $Id: extconf.rb 12501 2007-06-10 03:06:15Z nobu $ + +require 'mkmf' +have_func('rb_block_call', 'ruby/ruby.h') +create_makefile 'racc/cparse' diff --git a/lib/ruby-1.9.1-rc1/ext/readline/.cvsignore b/lib/ruby-1.9.1-rc1/ext/readline/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/readline/README b/lib/ruby-1.9.1-rc1/ext/readline/README new file mode 100644 index 0000000..57c51b5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/README @@ -0,0 +1,10 @@ +The Readline module provides interface for GNU Readline. +This module defines a number of methods to facilitate completion +and accesses input history from the Ruby interpreter. +This module supported Edit Line(libedit) too. +libedit is compatible with GNU Readline. + +GNU Readline:: http://www.gnu.org/directory/readline.html +libedit:: http://www.thrysoee.dk/editline/ + +See RDoc for Readline module. diff --git a/lib/ruby-1.9.1-rc1/ext/readline/README.ja b/lib/ruby-1.9.1-rc1/ext/readline/README.ja new file mode 100644 index 0000000..3c6c6f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/README.ja @@ -0,0 +1,422 @@ +GNU Readline ¤Ë¤è¤ë¥³¥Þ¥ó¥É¥é¥¤¥óÆþÎÏ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤òÄ󶡤¹¤ë¥â¥¸¥å¡¼¥ë +¤Ç¤¹¡£GNU Readline ¤Î¸ß´¹¥é¥¤¥Ö¥é¥ê¤Î¤Ò¤È¤Ä¤Ç¤¢¤ë Edit Line(libedit) ¤â +¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ + +GNU Readline:: http://www.gnu.org/directory/readline.html +libedit:: http://www.thrysoee.dk/editline/ + +Readline.readline ¤ò»ÈÍѤ·¤Æ¥æ¡¼¥¶¤«¤é¤ÎÆþÎϤò¼èÆÀ¤Ç¤­¤Þ¤¹¡£¤³¤Î¤È¤­¡¢ +GNU Readline ¤Î¤è¤¦¤ËÆþÎϤÎÊä´°¤äEmacs ¤Î¤è¤¦¤Ê¥­¡¼Áàºî¤Ê¤É¤¬¤Ç¤­¤Þ¤¹¡£ + + require "readline" + while buf = Readline.readline("> ", true) + p buf + end + +¥æ¡¼¥¶¤¬ÆþÎϤ·¤¿ÆâÍƤòÍúÎò(°Ê²¼¡¢¥Ò¥¹¥È¥ê)¤È¤·¤Æµ­Ï¿¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +Äê¿ô Readline::HISTORY ¤ò»ÈÍѤ·¤Æ¥Ò¥¹¥È¥ê¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡£ + + require "readline" + while buf = Readline.readline("> ", true) + p Readline::HISTORY.to_a + print("-> ", buf, "\n") + end + +»ÈÍѤ¹¤ë¥é¥¤¥Ö¥é¥ê¤Ë¤è¤ê¡¢¤¤¤¯¤Ä¤«¤Î¥á¥½¥Ã¥É¤ÇÎã³° NotImplementedError +¤¬È¯À¸¤·¤Þ¤¹¡£ + +$SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Â¿¤¯¤Î¥á¥½¥Ã¥É¤ÇÎã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +== Readline ¥â¥¸¥å¡¼¥ë + +=== ¥â¥¸¥å¡¼¥ë´Ø¿ô + +readline([prompt, [add_hist]]) -> String | nil + + prompt ¤ò½ÐÎϤ·¡¢¥æ¡¼¥¶¤«¤é¤Î¥­¡¼ÆþÎϤòÂÔ¤Á¤Þ¤¹¡£ + ¥¨¥ó¥¿¡¼¥­¡¼¤Î²¡²¼¤Ê¤É¤Ç¥æ¡¼¥¶¤¬Ê¸»úÎó¤òÆþÎϤ·½ª¤¨¤ë¤È¡¢ + ÆþÎϤ·¤¿Ê¸»úÎó¤òÊÖ¤·¤Þ¤¹¡£ + ¤³¤Î¤È¤­¡¢add_hist ¤¬ true ¤Ç¤¢¤ì¤Ð¡¢ÆþÎϤ·¤¿Ê¸»úÎó¤ò¥Ò¥¹¥È¥ê¤ËÄɲä·¤Þ¤¹¡£ + + ²¿¤âÆþÎϤ·¤Æ¤¤¤Ê¤¤¾õÂÖ¤Ç EOF(UNIX ¤Ç¤Ï ^D) ¤òÆþÎϤ¹¤ë¤Ê¤É¤Ç¡¢ + ¥æ¡¼¥¶¤«¤é¤ÎÆþÎϤ¬¤Ê¤¤¾ì¹ç¤Ï nil ¤òÊÖ¤·¤Þ¤¹¡£ + + ¼¡¤Î¾ò·ï¤òÁ´¤ÆËþ¤¿¤¹¾ì¹ç¡¢Îã³° IOError ¤¬È¯À¸¤·¤Þ¤¹¡£ + 1. ɸ½àÆþÎϤ¬ tty ¤Ç¤Ê¤¤¡£ + 2. ɸ½àÆþÎϤò¥¯¥í¡¼¥º¤·¤Æ¤¤¤ë¡£(isatty(2) ¤Î errno ¤¬ EBADF ¤Ç¤¢¤ë¡£) + + Ëܥ᥽¥Ã¥É¤Ï¥¹¥ì¥Ã¥É¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¡£ + ÆþÎÏÂÔ¤Á¾õÂ֤ΤȤ­¤Ï¥¹¥ì¥Ã¥É¥³¥ó¥Æ¥­¥¹¥È¤ÎÀÚÂؤ¨¤¬È¯À¸¤·¤Þ¤¹¡£ + + ÆþÎÏ»þ¤Ë¤Ï¹ÔÆâÊÔ½¸¤¬²Äǽ¤Ç¡¢vi ¥â¡¼¥É¤È Emacs ¥â¡¼¥É¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ + ¥Ç¥Õ¥©¥ë¥È¤Ï Emacs ¥â¡¼¥É¤Ç¤¹¡£ + + Ëܥ᥽¥Ã¥É¤Ë¤ÏÃí°Õ»ö¹à¤¬¤¢¤ê¤Þ¤¹¡£ + ÆþÎÏÂÔ¤Á¤Î¾õÂÖ¤Ç ^C ¤¹¤ë¤È ruby ¥¤¥ó¥¿¥×¥ê¥¿¤¬½ªÎ»¤·¡¢Ã¼Ëö¾õÂÖ¤òÉüµ¢¤·¤Þ¤»¤ó¡£ + ¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¤ÎÎã¤ò3¤Äµó¤²¤Þ¤¹¡£ + + * ^C¤Ë¤è¤ëInterruptÎã³°¤òÊä­¤·¤Æ¡¢Ã¼Ëö¾õÂÖ¤òÉüµ¢¤·¤Þ¤¹: + + require "readline" + + stty_save = `stty -g`.chomp + begin + while buf = Readline.readline + p buf + end + rescue Interrupt + system("stty", stty_save) + exit + end + end + end + + * INT¥·¥°¥Ê¥ë¤òÊä­¤·¤Æ¡¢Ã¼Ëö¾õÂÖ¤òÉüµ¢¤·¤Þ¤¹: + + require "readline" + + stty_save = `stty -g`.chomp + trap("INT") { system "stty", stty_save; exit } + + while buf = Readline.readline + p buf + end + + * ñ¤Ë ^C ¤ò̵»ë¤¹¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹: + + require "readline" + + trap("INT", "SIG_IGN") + + while buf = Readline.readline + p buf + end + + ÆþÎÏÍúÎò Readline::HISTORY ¤ò»ÈÍѤ·¤Æ¡¢¶õ¹Ô¤äľÁ°¤ÎÆþÎϤÈƱ¤¸ÆâÍƤÏÆþÎÏ + ÍúÎò¤Ë»Ä¤µ¤Ê¤¤¤È¤¤¤¦¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ + + require "readline" + + while buf = Readline.readline("> ", true) + # p Readline::HISTORY.to_a + Readline::HISTORY.pop if /^\s*$/ =~ buf + + begin + if Readline::HISTORY[Readline::HISTORY.length-2] == buf + Readline::HISTORY.pop + end + rescue IndexError + end + + # p Readline::HISTORY.to_a + print "-> ", buf, "\n" + end + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +=== ¥¯¥é¥¹¥á¥½¥Ã¥É + +Readline.input = input + + Readline.readline ¥á¥½¥Ã¥É¤Ç»ÈÍѤ¹¤ëÆþÎÏÍѤΠFile ¥ª¥Ö¥¸¥§¥¯¥È input + ¤ò»ØÄꤷ¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.output = output + + Readline.readline ¥á¥½¥Ã¥É¤Ç»ÈÍѤ¹¤ë½ÐÎÏÍѤΠFile ¥ª¥Ö¥¸¥§¥¯¥È + output ¤ò»ØÄꤷ¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_proc = proc + + ¥æ¡¼¥¶¤«¤é¤ÎÆþÎϤòÊä´°¤¹¤ë»þ¤Î¸õÊä¤ò¼èÆÀ¤¹¤ë Proc ¥ª¥Ö¥¸¥§¥¯¥È proc ¤ò + »ØÄꤷ¤Þ¤¹¡£proc ¤Ï¡¢¼¡¤Î¤â¤Î¤òÁÛÄꤷ¤Æ¤¤¤Þ¤¹¡£ + 1. call ¥á¥½¥Ã¥É¤ò»ý¤Á¤Þ¤¹¡£ + call ¥á¥½¥Ã¥É¤ò»ý¤¿¤Ê¤¤¾ì¹ç¡¢Îã³° ArgumentError ¤¬È¯À¸¤·¤Þ¤¹¡£ + 2. °ú¿ô¤Ë¥æ¡¼¥¶¤«¤é¤ÎÆþÎÏʸ»úÎó(Ãí1)¤ò¼è¤ê¤Þ¤¹¡£ + 3. ¸õÊä¤Îʸ»úÎó¤ÎÇÛÎó¤òÊÖ¤·¤Þ¤¹¡£ + + Ãí1:¡Ö/var/lib /v¡×¤Î¸å¤ÇÊä´°¤ò¹Ô¤¦¤È¡¢ + ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï proc ¤Î°ú¿ô¤Ë¡Ö/v¡×¤¬ÅϤµ¤ì¤Þ¤¹¡£ + ¤³¤Î¤è¤¦¤Ë¡¢¥æ¡¼¥¶¤¬ÆþÎϤ·¤¿Ê¸»úÎó¤ò + Readline.completer_word_break_characters ¤Ë´Þ¤Þ¤ì¤ëʸ»ú¤Ç¶èÀڤ俤â + ¤Î¤òñ¸ì¤È¤¹¤ë¤È¡¢¥«¡¼¥½¥ë¤¬¤¢¤ëñ¸ì¤ÎºÇ½é¤Îʸ»ú¤«¤é¸½ºß¤Î¥«¡¼¥½¥ë°Ì + Ã֤ޤǤÎʸ»úÎó¤¬ proc ¤Î°ú¿ô¤ËÅϤµ¤ì¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_proc -> proc + + ¥æ¡¼¥¶¤«¤é¤ÎÆþÎϤòÊä´°¤¹¤ë»þ¤Î¸õÊä¤ò¼èÆÀ¤¹¤ë Proc ¥ª¥Ö¥¸¥§¥¯¥È proc + ¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_case_fold = bool + + ¥æ¡¼¥¶¤ÎÆþÎϤòÊä´°¤¹¤ëºÝ¡¢Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤¹¤ë¡¿¤·¤Ê¤¤¤ò»ØÄꤷ¤Þ¤¹¡£ + bool ¤¬¿¿¤Ê¤é¤Ð¶èÊ̤·¤Þ¤»¤ó¡£bool ¤¬µ¶¤Ê¤é¤Ð¶èÊ̤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_case_fold -> bool + + ¥æ¡¼¥¶¤ÎÆþÎϤòÊä´°¤¹¤ëºÝ¡¢Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤¹¤ë¡¿¤·¤Ê¤¤¤ò¼èÆÀ¤·¤Þ¤¹¡£ + bool ¤¬¿¿¤Ê¤é¤Ð¶èÊ̤·¤Þ¤»¤ó¡£bool ¤¬µ¶¤Ê¤é¤Ð¶èÊ̤·¤Þ¤¹¡£ + + ¤Ê¤ª¡¢Readline.completion_case_fold= ¥á¥½¥Ã¥É¤Ç»ØÄꤷ¤¿¥ª¥Ö¥¸¥§¥¯¥È¤ò + ¤½¤Î¤Þ¤Þ¼èÆÀ¤¹¤ë¤Î¤Ç¡¢¼¡¤Î¤è¤¦¤ÊÆ°ºî¤ò¤·¤Þ¤¹¡£ + + require "readline" + + Readline.completion_case_fold = "This is a String." + p Readline.completion_case_fold # => "This is a String." + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.vi_editing_mode -> nil + + ÊÔ½¸¥â¡¼¥É¤ò vi ¥â¡¼¥É¤Ë¤·¤Þ¤¹¡£ + vi ¥â¡¼¥É¤Î¾ÜºÙ¤Ï¡¢GNU Readline ¤Î¥Þ¥Ë¥å¥¢¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.vi_editing_mode? -> bool + + ÊÔ½¸¥â¡¼¥É¤¬ vi ¥â¡¼¥É¤Î¾ì¹ç¡¢true ¤òÊÖ¤·¤Þ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð false + ¤òÊÖ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.emacs_editing_mode -> nil + + ÊÔ½¸¥â¡¼¥É¤ò Emacs ¥â¡¼¥É¤Ë¤·¤Þ¤¹¡£ + ¥Ç¥Õ¥©¥ë¥È¤Ï Emacs ¥â¡¼¥É¤Ç¤¹¡£ + Emacs ¥â¡¼¥É¤Î¾ÜºÙ¤Ï¡¢GNU Readline ¤Î¥Þ¥Ë¥å¥¢¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.emacs_editing_mode? -> bool + + ÊÔ½¸¥â¡¼¥É¤¬ Emacs ¥â¡¼¥É¤Î¾ì¹ç¡¢true ¤òÊÖ¤·¤Þ¤¹¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð false + ¤òÊÖ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_append_character = char + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤¬´°Î»¤·¤¿¾ì¹ç¤Ë¡¢ºÇ¸å¤ËÉղ乤ëʸ»ú char ¤ò»ØÄꤷ + ¤Þ¤¹¡£È¾³Ñ¥¹¥Ú¡¼¥¹¡Ö" "¡×¤Ê¤É¤Îñ¸ì¤ò¶èÀÚ¤ëʸ»ú¤ò»ØÄꤹ¤ì¤Ð¡¢Ï¢Â³¤·¤Æ + ÆþÎϤ¹¤ëºÝ¤ËÊØÍø¤Ç¤¹¡£ + + »ÈÍÑÎã: + + require "readline" + + Readline.readline("> ", true) + Readline.completion_append_character = " " + + ¼Â¹ÔÎã: + + > + ¤³¤³¤Ç "/var/li" ¤òÆþÎϤ·¤Þ¤¹¡£ + + > /var/li + ¤³¤³¤Ç TAB ¥­¡¼¤òÆþÎϤ·¤Þ¤¹¡£ + + > /var/lib + "b" ¤¬Êä´°¤µ¤ì¡¢ºÇ¸å¤Ë " " ¤¬Äɲ䵤ì¤ë¤Î¤Ç¡¢"/usr" ¤òϢ³¤·¤ÆÆþÎϤǤ­¤Þ¤¹¡£ + + > /var/lib /usr + + ¤Ê¤ª¡¢1ʸ»ú¤·¤«»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ + Î㤨¤Ð¡¢"string"¤ò»ØÄꤷ¤¿¾ì¹ç¤ÏºÇ½é¤Îʸ»ú¤Ç¤¢¤ë"s"¤À¤±¤ò»ÈÍѤ·¤Þ¤¹¡£ + + require "readline" + + Readline.completion_append_character = "string" + p Readline.completion_append_character # => "s" + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completion_append_character -> char + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤¬´°Î»¤·¤¿¾ì¹ç¤Ë¡¢ºÇ¸å¤ËÉղ乤ëʸ»ú¤ò¼èÆÀ¤·¤Þ¤¹¡£ + ¥Ç¥Õ¥©¥ë¥È¤Ï¶õÇò (" ") ¤Ç¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.basic_word_break_characters = string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢Ã±¸ì¤Î¶èÀÚ¤ê¤ò¼¨¤¹Ê£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ë + ʸ»úÎó string ¤ò»ØÄꤷ¤Þ¤¹¡£ + + GNU Readline ¤Î¥Ç¥Õ¥©¥ë¥È¤ÎÃͤϡ¢Bash ¤ÎÊä´°½èÍý¤Ç»ÈÍѤ·¤Æ¤¤¤ëʸ»úÎó + " \t\n\"\\'`@$><=;|&{(" (¥¹¥Ú¡¼¥¹¤ò´Þ¤à) ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.basic_word_break_characters -> string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢Ã±¸ì¤Î¶èÀÚ¤ê¤ò¼¨¤¹Ê£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ë + ʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completer_word_break_characters = string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢Ã±¸ì¤Î¶èÀÚ¤ê¤ò¼¨¤¹Ê£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ë + ʸ»úÎó string ¤ò»ØÄꤷ¤Þ¤¹¡£ + Readline.basic_word_break_characters= ¤È¤Î°ã¤¤¤Ï¡¢ + GNU Readline ¤Î rl_complete_internal ´Ø¿ô¤Ç»ÈÍѤµ¤ì¤ë¤³¤È¤Ç¤¹¡£ + + GNU Readline ¤Î¥Ç¥Õ¥©¥ë¥È¤ÎÃͤϡ¢ + Readline.basic_word_break_characters ¤ÈƱ¤¸¤Ç¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completer_word_break_characters -> string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢Ã±¸ì¤Î¶èÀÚ¤ê¤ò¼¨¤¹Ê£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤¿ + ʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.basic_quote_characters = string + + ¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ë + ʸ»úÎó string ¤ò»ØÄꤷ¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.basic_quote_characters -> string + + ¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ë + ʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completer_quote_characters = string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò + ¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ëʸ»úÎó string ¤ò»ØÄꤷ¤Þ¤¹¡£ + »ØÄꤷ¤¿Ê¸»ú¤Î´Ö¤Ç¤Ï¡¢Readline.completer_word_break_characters= + ¤Ç»ØÄꤷ¤¿Ê¸»úÎó¤Ë´Þ¤Þ¤ì¤ëʸ»ú¤â¡¢ÉáÄ̤Îʸ»úÎó¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.completer_quote_characters -> string + + ¥æ¡¼¥¶¤ÎÆþÎϤÎÊä´°¤ò¹Ô¤¦ºÝ¡¢¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò + ¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ëʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.filename_quote_characters = string + + ¥æ¡¼¥¶¤ÎÆþÎÏ»þ¤Ë¥Õ¥¡¥¤¥ë̾¤ÎÊä´°¤ò¹Ô¤¦ºÝ¡¢¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò + ¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ëʸ»úÎó string ¤ò»ØÄꤷ¤Þ¤¹¡£ + + GNU Readline ¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï nil ¤Ç¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +Readline.filename_quote_characters -> string + + ¥æ¡¼¥¶¤ÎÆþÎÏ»þ¤Ë¥Õ¥¡¥¤¥ë̾¤ÎÊä´°¤ò¹Ô¤¦ºÝ¡¢¥¹¥Ú¡¼¥¹¤Ê¤É¤Îñ¸ì¤Î¶èÀÚ¤ê¤ò + ¥¯¥ª¡¼¥È¤¹¤ë¤¿¤á¤ÎÊ£¿ô¤Îʸ»ú¤Ç¹½À®¤µ¤ì¤ëʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£ + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢Îã³° NotImplementedError ¤¬È¯À¸¤·¤Þ¤¹¡£ + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢Îã³° SecurityError ¤¬È¯À¸¤·¤Þ¤¹¡£ + +=== ¥¯¥é¥¹Äê¿ô + +HISTORY + + Äê¿ô HISTORY ¤ò»ÈÍѤ·¤Æ¥Ò¥¹¥È¥ê¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡£ + Enumerable ¥â¥¸¥å¡¼¥ë¤ò extend ¤·¤Æ¤ª¤ê¡¢ + ÇÛÎó¤Î¤è¤¦¤Ë¿¶¤ëÉñ¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + Î㤨¤Ð¡¢HISTORY[4] ¤Ë¤è¤ê 5 ÈÖÌܤËÆþÎϤ·¤¿ÆâÍƤò¼è¤ê½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + + require "readline" + + Readline::HISTORY.push("a", "b", "c", "d", "e") + p Readline::HISTORY[4] # => "e" + + ¼ÂÁõ¤·¤Æ¤¤¤ë¥á¥½¥Ã¥É¤ò¼¡¤Ëµó¤²¤Þ¤¹¡£ + * HISTORY.to_s -> "HISTORY" + * HISTORY[index] -> string + * HISTORY[index] = string + * HISTORY.push(string[, string, ...]) -> self + * HISTORY << string -> self + * HISTORY.pop -> string + * HISTORY.shift -> string + * HISTORY.each -> Enumerator + * HISTORY.each { |i| } -> [string] + * HISTORY.length -> Integer + * HISTORY.empty? -> true or false + * HISTORY.delete_at(index) -> string + * HISTORY.clear -> self + + ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤´Ä¶­¤Ç¤Ï¡¢¼¡¤Î¥á¥½¥Ã¥É¤ÇÎã³° NotImplementedError ¤¬ + ȯÀ¸¤·¤Þ¤¹¡£ + * HISTORY[index] = string + * HISTORY.pop -> string + * HISTORY.shift -> string + * HISTORY.delete_at(index) -> string + * HISTORY.clear -> self + + $SAFE ¤¬ 4 ¤Î¾ì¹ç¡¢¥Ò¥¹¥È¥ê¤Ë¥¢¥¯¥»¥¹¤·¤¿¤È¤­¤ËÎã³° SecurityError ¤¬ + ȯÀ¸¤·¤Þ¤¹¡£ + +FILENAME_COMPLETION_PROC + + ¥Õ¥¡¥¤¥ë̾¤ÎÊä´°¤ò¹Ô¤¦ call ¥á¥½¥Ã¥É¤ò»ý¤Ä¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£ + + Readline.completion_proc= ¤Ë¤è¤ê¡¢¥æ¡¼¥¶¤ÎÆþÎÏ»þ¤Ë¥Õ¥¡¥¤¥ë̾¤ÎÊä´°¤ò + ¹Ô¤¦¤è¤¦¤ËÀßÄꤹ¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¤³¤È¤òÁÛÄꤷ¤Æ¤Þ¤¹¡£ + +USERNAME_COMPLETION_PROC + + ¥æ¡¼¥¶Ì¾¤ÎÊä´°¤ò¹Ô¤¦ call ¥á¥½¥Ã¥É¤ò»ý¤Ä¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡£ + + Readline.completion_proc= ¤Ë¤è¤ê¡¢¥æ¡¼¥¶¤ÎÆþÎÏ»þ¤Ë¥æ¡¼¥¶Ì¾¤ÎÊä´°¤ò¹Ô + ¤¦¤è¤¦¤ËÀßÄꤹ¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¤³¤È¤òÁÛÄꤷ¤Æ¤Þ¤¹¡£ + +VERSION + + »ÈÍѤ·¤Æ¤¤¤ë GNU Readline ¤Þ¤¿¤Ï libedit ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤¹¡£ diff --git a/lib/ruby-1.9.1-rc1/ext/readline/depend b/lib/ruby-1.9.1-rc1/ext/readline/depend new file mode 100644 index 0000000..6570c5a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/depend @@ -0,0 +1 @@ +readline.o: readline.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/readline/extconf.rb b/lib/ruby-1.9.1-rc1/ext/readline/extconf.rb new file mode 100644 index 0000000..1d74e29 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/extconf.rb @@ -0,0 +1,71 @@ +require "mkmf" + +$readline_headers = ["stdio.h"] + +def have_readline_header(header) + if have_header(header) + $readline_headers.push(header) + return true + else + return false + end +end + +def have_readline_var(var) + return have_var(var, $readline_headers) +end + +def have_readline_func(func) + return have_func(func, $readline_headers) +end + +dir_config('curses') +dir_config('ncurses') +dir_config('termcap') +dir_config("readline") +enable_libedit = enable_config("libedit") +have_library("user32", nil) if /cygwin/ === RUBY_PLATFORM +have_library("ncurses", "tgetnum") || + have_library("termcap", "tgetnum") || + have_library("curses", "tgetnum") + +if enable_libedit + unless (have_readline_header("editline/readline.h") || + have_readline_header("readline/readline.h")) && + have_library("edit", "readline") + exit + end +else + unless ((have_readline_header("readline/readline.h") && + have_readline_header("readline/history.h")) && + (have_library("readline", "readline") || + have_library("edit", "readline"))) || + (have_readline_header("editline/readline.h") && + have_library("edit", "readline")) + exit + end +end + +have_readline_func("rl_filename_completion_function") +have_readline_func("rl_username_completion_function") +have_readline_func("rl_completion_matches") +have_readline_var("rl_deprep_term_function") +have_readline_var("rl_completion_append_character") +have_readline_var("rl_basic_word_break_characters") +have_readline_var("rl_completer_word_break_characters") +have_readline_var("rl_basic_quote_characters") +have_readline_var("rl_completer_quote_characters") +have_readline_var("rl_filename_quote_characters") +have_readline_var("rl_attempted_completion_over") +have_readline_var("rl_library_version") +have_readline_var("rl_editing_mode") +# workaround for native windows. +/mswin|bccwin|mingw/ !~ RUBY_PLATFORM && have_readline_var("rl_event_hook") +have_readline_func("rl_cleanup_after_signal") +have_readline_func("rl_clear_signals") +have_readline_func("rl_vi_editing_mode") +have_readline_func("rl_emacs_editing_mode") +have_readline_func("replace_history_entry") +have_readline_func("remove_history") +have_readline_func("clear_history") +create_makefile("readline") diff --git a/lib/ruby-1.9.1-rc1/ext/readline/readline.c b/lib/ruby-1.9.1-rc1/ext/readline/readline.c new file mode 100644 index 0000000..0f80892 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/readline/readline.c @@ -0,0 +1,1309 @@ +/************************************************ + + readline.c - GNU Readline module + + $Author: yugui $ + created at: Wed Jan 20 13:59:32 JST 1999 + + Copyright (C) 1997-2008 Shugo Maeda + Copyright (C) 2008 TAKAO Kouji + + $Id: readline.c 20709 2008-12-13 01:59:19Z yugui $ + + Contact: + - TAKAO Kouji (current maintainer) + +************************************************/ + +#ifdef RUBY_EXTCONF_H +#include RUBY_EXTCONF_H +#endif + +#include "ruby/config.h" +#include +#include +#include +#ifdef HAVE_READLINE_READLINE_H +#include +#endif +#ifdef HAVE_READLINE_HISTORY_H +#include +#endif +#ifdef HAVE_EDITLINE_READLINE_H +#include +#endif + +#include "ruby/ruby.h" +#include "ruby/io.h" + +#ifdef HAVE_UNISTD_H +#include +#endif + +static VALUE mReadline; + +#define EDIT_LINE_LIBRARY_VERSION "EditLine wrapper" + +#define COMPLETION_PROC "completion_proc" +#define COMPLETION_CASE_FOLD "completion_case_fold" +static ID completion_proc, completion_case_fold; + +#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION +# define rl_filename_completion_function filename_completion_function +#endif +#ifndef HAVE_RL_USERNAME_COMPLETION_FUNCTION +# define rl_username_completion_function username_completion_function +#endif +#ifndef HAVE_RL_COMPLETION_MATCHES +# define rl_completion_matches completion_matches +#endif + +static int (*history_get_offset_func)(int); + +static char **readline_attempted_completion_function(const char *text, + int start, int end); + +#define OutputStringValue(str) do {\ + SafeStringValue(str);\ + str = rb_str_conv_enc(str, rb_enc_get(str), rb_locale_encoding());\ +} while (0)\ + +#ifdef HAVE_RL_EVENT_HOOK +#define BUSY_WAIT 0 + +/* + * Document-class: Readline + * + * The Readline module provides interface for GNU Readline. + * This module defines a number of methods to facilitate completion + * and accesses input history from the Ruby interpreter. + * This module supported Edit Line(libedit) too. + * libedit is compatible with GNU Readline. + * + * GNU Readline:: http://www.gnu.org/directory/readline.html + * libedit:: http://www.thrysoee.dk/editline/ + * + * Reads one inputted line with line edit by Readline.readline method. + * At this time, the facilitatation completion and the key + * bind like Emacs can be operated like GNU Readline. + * + * require "readline" + * while buf = Readline.readline("> ", true) + * p buf + * end + * + * The content that the user input can be recorded to the history. + * The history can be accessed by Readline::HISTORY constant. + * + * require "readline" + * while buf = Readline.readline("> ", true) + * p Readline::HISTORY.to_a + * print("-> ", buf, "\n") + * end + * + * Most of methods raise SecurityError exception if $SAFE is 4. + * + * Documented by TAKAO Kouji . + */ + +static int readline_event(void); +static int +readline_event(void) +{ +#if BUSY_WAIT + rb_thread_schedule(); +#else + fd_set rset; + + FD_ZERO(&rset); + FD_SET(fileno(rl_instream), &rset); + rb_thread_select(fileno(rl_instream) + 1, &rset, NULL, NULL, NULL); + return 0; +#endif +} +#endif + +/* + * call-seq: + * Readline.readline(prompt = "", add_hist = false) -> string or nil + * + * Shows the +prompt+ and reads the inputted line with line editing. + * The inputted line is added to the history if +add_hist+ is true. + * + * Returns nil when the inputted line is empty and user inputs EOF + * (Presses ^D on UNIX). + * + * Raises IOError exception if below conditions are satisfied. + * 1. stdin is not tty. + * 2. stdin was closed. (errno is EBADF after called isatty(2).) + * + * This method supports thread. Switchs the thread context when waits + * inputting line. + * + * Supports line edit when inputs line. Provides VI and Emacs editing mode. + * Default is Emacs editing mode. + * + * NOTE: Terminates ruby interpreter and does not return the terminal + * status after user pressed '^C' when wait inputting line. + * Give 3 examples that avoid it. + * + * * Catches the Interrupt exception by pressed ^C after returns + * terminal status: + * + * require "readline" + * + * stty_save = `stty -g`.chomp + * begin + * while buf = Readline.readline + * p buf + * end + * rescue Interrupt + * system("stty", stty_save) + * exit + * end + * end + * end + * + * * Catches the INT signal by pressed ^C after returns terminal + * status: + * + * require "readline" + * + * stty_save = `stty -g`.chomp + * trap("INT") { system "stty", stty_save; exit } + * + * while buf = Readline.readline + * p buf + * end + * + * * Ignores pressing ^C: + * + * require "readline" + * + * trap("INT", "SIG_IGN") + * + * while buf = Readline.readline + * p buf + * end + * + * Can make as follows with Readline::HISTORY constant. + * It does not record to the history if the inputted line is empty or + * the same it as last one. + * + * require "readline" + * + * while buf = Readline.readline("> ", true) + * # p Readline::HISTORY.to_a + * Readline::HISTORY.pop if /^\s*$/ =~ buf + * + * begin + * if Readline::HISTORY[Readline::HISTORY.length-2] == buf + * Readline::HISTORY.pop + * end + * rescue IndexError + * end + * + * # p Readline::HISTORY.to_a + * print "-> ", buf, "\n" + * end + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_readline(int argc, VALUE *argv, VALUE self) +{ + VALUE tmp, add_hist, result; + char *prompt = NULL; + char *buff; + int status; + + rb_secure(4); + if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) { + OutputStringValue(tmp); + prompt = RSTRING_PTR(tmp); + } + + if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "closed stdin"); + + buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt, + &status); + if (status) { +#if defined HAVE_RL_CLEANUP_AFTER_SIGNAL + /* restore terminal mode and signal handler*/ + rl_cleanup_after_signal(); +#elif defined HAVE_RL_DEPREP_TERM_FUNCTION + /* restore terminal mode */ + if (rl_deprep_term_function != NULL) /* NULL in libedit. [ruby-dev:29116] */ + (*rl_deprep_term_function)(); + else +#else + rl_deprep_terminal(); +#endif + rb_jump_tag(status); + } + + if (RTEST(add_hist) && buff) { + add_history(buff); + } + if (buff) { + result = rb_locale_str_new_cstr(buff); + } + else + result = Qnil; + if (buff) free(buff); + return result; +} + +/* + * call-seq: + * Readline.input = input + * + * Specifies a File object +input+ that is input stream for + * Readline.readline method. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_input(VALUE self, VALUE input) +{ + rb_io_t *ifp; + + rb_secure(4); + Check_Type(input, T_FILE); + GetOpenFile(input, ifp); + rl_instream = rb_io_stdio_file(ifp); + return input; +} + +/* + * call-seq: + * Readline.output = output + * + * Specifies a File object +output+ that is output stream for + * Readline.readline method. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_output(VALUE self, VALUE output) +{ + rb_io_t *ofp; + + rb_secure(4); + Check_Type(output, T_FILE); + GetOpenFile(output, ofp); + rl_outstream = rb_io_stdio_file(ofp); + return output; +} + +/* + * call-seq: + * Readline.completion_proc = proc + * + * Specifies a Proc object +proc+ to determine completion behavior. It + * should take input-string, and return an array of completion + * candidates. + * + * Raises ArgumentError exception if +proc+ does not respond to call method. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_completion_proc(VALUE self, VALUE proc) +{ + rb_secure(4); + if (!rb_respond_to(proc, rb_intern("call"))) + rb_raise(rb_eArgError, "argument must respond to `call'"); + return rb_ivar_set(mReadline, completion_proc, proc); +} + +/* + * call-seq: + * Readline.completion_proc -> proc + * + * Returns the completion Proc object. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_completion_proc(VALUE self) +{ + rb_secure(4); + return rb_attr_get(mReadline, completion_proc); +} + +/* + * call-seq: + * Readline.completion_case_fold = bool + * + * Sets whether or not to ignore case on completion. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_completion_case_fold(VALUE self, VALUE val) +{ + rb_secure(4); + return rb_ivar_set(mReadline, completion_case_fold, val); +} + +/* + * call-seq: + * Readline.completion_case_fold -> bool + * + * Returns true if completion ignores case. If no, returns false. + * + * NOTE: Returns the same object that is specified by + * Readline.completion_case_fold= method. + * + * require "readline" + * + * Readline.completion_case_fold = "This is a String." + * p Readline.completion_case_fold # => "This is a String." + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_completion_case_fold(VALUE self) +{ + rb_secure(4); + return rb_attr_get(mReadline, completion_case_fold); +} + +static char ** +readline_attempted_completion_function(const char *text, int start, int end) +{ + VALUE proc, ary, temp; + char **result; + int case_fold; + int i, matches; + + proc = rb_attr_get(mReadline, completion_proc); + if (NIL_P(proc)) + return NULL; +#ifdef HAVE_RL_ATTEMPTED_COMPLETION_OVER + rl_attempted_completion_over = 1; +#endif + case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold)); + ary = rb_funcall(proc, rb_intern("call"), 1, rb_locale_str_new_cstr(text)); + if (TYPE(ary) != T_ARRAY) + ary = rb_Array(ary); + matches = RARRAY_LEN(ary); + if (matches == 0) + return NULL; + result = ALLOC_N(char *, matches + 2); + for (i = 0; i < matches; i++) { + temp = rb_obj_as_string(RARRAY_PTR(ary)[i]); + result[i + 1] = ALLOC_N(char, RSTRING_LEN(temp) + 1); + strcpy(result[i + 1], RSTRING_PTR(temp)); + } + result[matches + 1] = NULL; + + if (matches == 1) { + result[0] = strdup(result[1]); + } + else { + register int i = 1; + int low = 100000; + + while (i < matches) { + register int c1, c2, si; + + if (case_fold) { + for (si = 0; + (c1 = TOLOWER(result[i][si])) && + (c2 = TOLOWER(result[i + 1][si])); + si++) + if (c1 != c2) break; + } else { + for (si = 0; + (c1 = result[i][si]) && + (c2 = result[i + 1][si]); + si++) + if (c1 != c2) break; + } + + if (low > si) low = si; + i++; + } + result[0] = ALLOC_N(char, low + 1); + strncpy(result[0], result[1], low); + result[0][low] = '\0'; + } + + return result; +} + +/* + * call-seq: + * Readline.vi_editing_mode -> nil + * + * Specifies VI editing mode. See the manual of GNU Readline for + * details of VI editing mode. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_vi_editing_mode(VALUE self) +{ +#ifdef HAVE_RL_VI_EDITING_MODE + rb_secure(4); + rl_vi_editing_mode(1,0); + return Qnil; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_VI_EDITING_MODE */ +} + +/* + * call-seq: + * Readline.vi_editing_mode? -> bool + * + * Returns true if vi mode is active. Returns false if not. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_vi_editing_mode_p(VALUE self) +{ +#ifdef HAVE_RL_EDITING_MODE + rb_secure(4); + return rl_editing_mode == 0 ? Qtrue : Qfalse; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_EDITING_MODE */ +} + +/* + * call-seq: + * Readline.emacs_editing_mode -> nil + * + * Specifies Emacs editing mode. The default is this mode. See the + * manual of GNU Readline for details of Emacs editing mode. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_emacs_editing_mode(VALUE self) +{ +#ifdef HAVE_RL_EMACS_EDITING_MODE + rb_secure(4); + rl_emacs_editing_mode(1,0); + return Qnil; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_EMACS_EDITING_MODE */ +} + +/* + * call-seq: + * Readline.emacs_editing_mode? -> bool + * + * Returns true if emacs mode is active. Returns false if not. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_emacs_editing_mode_p(VALUE self) +{ +#ifdef HAVE_RL_EDITING_MODE + rb_secure(4); + return rl_editing_mode == 1 ? Qtrue : Qfalse; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_EDITING_MODE */ +} + +/* + * call-seq: + * Readline.completion_append_character = char + * + * Specifies a character to be appended on completion. + * Nothing will be appended if an empty string ("") or nil is + * specified. + * + * For example: + * require "readline" + * + * Readline.readline("> ", true) + * Readline.completion_append_character = " " + * + * Result: + * > + * Input "/var/li". + * + * > /var/li + * Press TAB key. + * + * > /var/lib + * Completes "b" and appends " ". So, you can continuously input "/usr". + * + * > /var/lib /usr + * + * NOTE: Only one character can be specified. When "string" is + * specified, sets only "s" that is the first. + * + * require "readline" + * + * Readline.completion_append_character = "string" + * p Readline.completion_append_character # => "s" + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_completion_append_character(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + rb_secure(4); + if (NIL_P(str)) { + rl_completion_append_character = '\0'; + } + else { + OutputStringValue(str); + if (RSTRING_LEN(str) == 0) { + rl_completion_append_character = '\0'; + } else { + rl_completion_append_character = RSTRING_PTR(str)[0]; + } + } + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */ +} + +/* + * call-seq: + * Readline.completion_append_character -> char + * + * Returns a string containing a character to be appended on + * completion. The default is a space (" "). + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_completion_append_character(VALUE self) +{ +#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + char buf[1]; + + rb_secure(4); + if (rl_completion_append_character == '\0') + return Qnil; + + buf[0] = (char) rl_completion_append_character; + return rb_locale_str_new(buf, 1); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */ +} + +/* + * call-seq: + * Readline.basic_word_break_characters = string + * + * Sets the basic list of characters that signal a break between words + * for the completer routine. The default is the characters which + * break words for completion in Bash: "\t\n\"\\'`@$><=;|&{(". + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_basic_word_break_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS + static char *basic_word_break_characters = NULL; + + rb_secure(4); + OutputStringValue(str); + if (basic_word_break_characters == NULL) { + basic_word_break_characters = + ALLOC_N(char, RSTRING_LEN(str) + 1); + } + else { + REALLOC_N(basic_word_break_characters, char, RSTRING_LEN(str) + 1); + } + strncpy(basic_word_break_characters, + RSTRING_PTR(str), RSTRING_LEN(str)); + basic_word_break_characters[RSTRING_LEN(str)] = '\0'; + rl_basic_word_break_characters = basic_word_break_characters; + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */ +} + +/* + * call-seq: + * Readline.basic_word_break_characters -> string + * + * Gets the basic list of characters that signal a break between words + * for the completer routine. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_basic_word_break_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS + rb_secure(4); + if (rl_basic_word_break_characters == NULL) + return Qnil; + return rb_locale_str_new_cstr(rl_basic_word_break_characters); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */ +} + +/* + * call-seq: + * Readline.completer_word_break_characters = string + * + * Sets the basic list of characters that signal a break between words + * for rl_complete_internal(). The default is the value of + * Readline.basic_word_break_characters. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_completer_word_break_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS + static char *completer_word_break_characters = NULL; + + rb_secure(4); + OutputStringValue(str); + if (completer_word_break_characters == NULL) { + completer_word_break_characters = + ALLOC_N(char, RSTRING_LEN(str) + 1); + } + else { + REALLOC_N(completer_word_break_characters, char, RSTRING_LEN(str) + 1); + } + strncpy(completer_word_break_characters, + RSTRING_PTR(str), RSTRING_LEN(str)); + completer_word_break_characters[RSTRING_LEN(str)] = '\0'; + rl_completer_word_break_characters = completer_word_break_characters; + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */ +} + +/* + * call-seq: + * Readline.completer_word_break_characters -> string + * + * Gets the basic list of characters that signal a break between words + * for rl_complete_internal(). + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_completer_word_break_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS + rb_secure(4); + if (rl_completer_word_break_characters == NULL) + return Qnil; + return rb_locale_str_new_cstr(rl_completer_word_break_characters); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */ +} + +/* + * call-seq: + * Readline.basic_quote_characters = string + * + * Sets a list of quote characters which can cause a word break. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_basic_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS + static char *basic_quote_characters = NULL; + + rb_secure(4); + OutputStringValue(str); + if (basic_quote_characters == NULL) { + basic_quote_characters = + ALLOC_N(char, RSTRING_LEN(str) + 1); + } + else { + REALLOC_N(basic_quote_characters, char, RSTRING_LEN(str) + 1); + } + strncpy(basic_quote_characters, + RSTRING_PTR(str), RSTRING_LEN(str)); + basic_quote_characters[RSTRING_LEN(str)] = '\0'; + rl_basic_quote_characters = basic_quote_characters; + + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */ +} + +/* + * call-seq: + * Readline.basic_quote_characters -> string + * + * Gets a list of quote characters which can cause a word break. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_basic_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS + rb_secure(4); + if (rl_basic_quote_characters == NULL) + return Qnil; + return rb_locale_str_new_cstr(rl_basic_quote_characters); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */ +} + +/* + * call-seq: + * Readline.completer_quote_characters = string + * + * Sets a list of characters which can be used to quote a substring of + * the line. Completion occurs on the entire substring, and within + * the substring Readline.completer_word_break_characters are treated + * as any other character, unless they also appear within this list. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_completer_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS + static char *completer_quote_characters = NULL; + + rb_secure(4); + OutputStringValue(str); + if (completer_quote_characters == NULL) { + completer_quote_characters = + ALLOC_N(char, RSTRING_LEN(str) + 1); + } + else { + REALLOC_N(completer_quote_characters, char, RSTRING_LEN(str) + 1); + } + strncpy(completer_quote_characters, RSTRING_PTR(str), RSTRING_LEN(str)); + completer_quote_characters[RSTRING_LEN(str)] = '\0'; + rl_completer_quote_characters = completer_quote_characters; + + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */ +} + +/* + * call-seq: + * Readline.completer_quote_characters -> string + * + * Gets a list of characters which can be used to quote a substring of + * the line. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_completer_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS + rb_secure(4); + if (rl_completer_quote_characters == NULL) + return Qnil; + return rb_locale_str_new_cstr(rl_completer_quote_characters); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */ +} + +/* + * call-seq: + * Readline.filename_quote_characters = string + * + * Sets a list of characters that cause a filename to be quoted by the completer + * when they appear in a completed filename. The default is nil. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_set_filename_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS + static char *filename_quote_characters = NULL; + + rb_secure(4); + OutputStringValue(str); + if (filename_quote_characters == NULL) { + filename_quote_characters = + ALLOC_N(char, RSTRING_LEN(str) + 1); + } + else { + REALLOC_N(filename_quote_characters, char, RSTRING_LEN(str) + 1); + } + strncpy(filename_quote_characters, RSTRING_PTR(str), RSTRING_LEN(str)); + filename_quote_characters[RSTRING_LEN(str)] = '\0'; + rl_filename_quote_characters = filename_quote_characters; + + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */ +} + +/* + * call-seq: + * Readline.filename_quote_characters -> string + * + * Gets a list of characters that cause a filename to be quoted by the completer + * when they appear in a completed filename. + * + * Raises NotImplementedError if the using readline library does not support. + * + * Raises SecurityError exception if $SAFE is 4. + */ +static VALUE +readline_s_get_filename_quote_characters(VALUE self, VALUE str) +{ +#ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS + rb_secure(4); + if (rl_filename_quote_characters == NULL) + return Qnil; + return rb_locale_str_new_cstr(rl_filename_quote_characters); +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */ +} + +static VALUE +hist_to_s(VALUE self) +{ + return rb_str_new_cstr("HISTORY"); +} + +static int +history_get_offset_history_base(int offset) +{ + return history_base + offset; +} + +static int +history_get_offset_0(int offset) +{ + return offset; +} + +static VALUE +hist_get(VALUE self, VALUE index) +{ + HIST_ENTRY *entry = NULL; + int i; + + rb_secure(4); + i = NUM2INT(index); + if (i < 0) { + i += history_length; + } + if (i >= 0) { + entry = history_get(history_get_offset_func(i)); + } + if (entry == NULL) { + rb_raise(rb_eIndexError, "invalid index"); + } + return rb_locale_str_new_cstr(entry->line); +} + +static VALUE +hist_set(VALUE self, VALUE index, VALUE str) +{ +#ifdef HAVE_REPLACE_HISTORY_ENTRY + HIST_ENTRY *entry = NULL; + int i; + + rb_secure(4); + i = NUM2INT(index); + OutputStringValue(str); + if (i < 0) { + i += history_length; + } + if (i >= 0) { + entry = replace_history_entry(i, RSTRING_PTR(str), NULL); + } + if (entry == NULL) { + rb_raise(rb_eIndexError, "invalid index"); + } + return str; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +static VALUE +hist_push(VALUE self, VALUE str) +{ + rb_secure(4); + OutputStringValue(str); + add_history(RSTRING_PTR(str)); + return self; +} + +static VALUE +hist_push_method(int argc, VALUE *argv, VALUE self) +{ + VALUE str; + + rb_secure(4); + while (argc--) { + str = *argv++; + OutputStringValue(str); + add_history(RSTRING_PTR(str)); + } + return self; +} + +static VALUE +rb_remove_history(int index) +{ +#ifdef HAVE_REMOVE_HISTORY + HIST_ENTRY *entry; + VALUE val; + + rb_secure(4); + entry = remove_history(index); + if (entry) { + val = rb_locale_str_new_cstr(entry->line); + free((void *) entry->line); + free(entry); + return val; + } + return Qnil; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +static VALUE +hist_pop(VALUE self) +{ + rb_secure(4); + if (history_length > 0) { + return rb_remove_history(history_length - 1); + } else { + return Qnil; + } +} + +static VALUE +hist_shift(VALUE self) +{ + rb_secure(4); + if (history_length > 0) { + return rb_remove_history(0); + } else { + return Qnil; + } +} + +static VALUE +hist_each(VALUE self) +{ + HIST_ENTRY *entry; + int i; + + RETURN_ENUMERATOR(self, 0, 0); + + rb_secure(4); + for (i = 0; i < history_length; i++) { + entry = history_get(history_get_offset_func(i)); + if (entry == NULL) + break; + rb_yield(rb_locale_str_new_cstr(entry->line)); + } + return self; +} + +static VALUE +hist_length(VALUE self) +{ + rb_secure(4); + return INT2NUM(history_length); +} + +static VALUE +hist_empty_p(VALUE self) +{ + rb_secure(4); + return history_length == 0 ? Qtrue : Qfalse; +} + +static VALUE +hist_delete_at(VALUE self, VALUE index) +{ + int i; + + rb_secure(4); + i = NUM2INT(index); + if (i < 0) + i += history_length; + if (i < 0 || i > history_length - 1) { + rb_raise(rb_eIndexError, "invalid index"); + } + return rb_remove_history(i); +} + +static VALUE +hist_clear(VALUE self) +{ +#ifdef HAVE_CLEAR_HISTORY + rb_secure(4); + clear_history(); + return self; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +static VALUE +filename_completion_proc_call(VALUE self, VALUE str) +{ + VALUE result; + char **matches; + int i; + + matches = rl_completion_matches(StringValuePtr(str), + rl_filename_completion_function); + if (matches) { + result = rb_ary_new(); + for (i = 0; matches[i]; i++) { + rb_ary_push(result, rb_locale_str_new_cstr(matches[i])); + free(matches[i]); + } + free(matches); + if (RARRAY_LEN(result) >= 2) + rb_ary_shift(result); + } + else { + result = Qnil; + } + return result; +} + +static VALUE +username_completion_proc_call(VALUE self, VALUE str) +{ + VALUE result; + char **matches; + int i; + + matches = rl_completion_matches(StringValuePtr(str), + rl_username_completion_function); + if (matches) { + result = rb_ary_new(); + for (i = 0; matches[i]; i++) { + rb_ary_push(result, rb_locale_str_new_cstr(matches[i])); + free(matches[i]); + } + free(matches); + if (RARRAY_LEN(result) >= 2) + rb_ary_shift(result); + } + else { + result = Qnil; + } + return result; +} + +void +Init_readline() +{ + VALUE history, fcomp, ucomp, version; + + /* Allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "Ruby"; + + using_history(); + + completion_proc = rb_intern(COMPLETION_PROC); + completion_case_fold = rb_intern(COMPLETION_CASE_FOLD); + + mReadline = rb_define_module("Readline"); + rb_define_module_function(mReadline, "readline", + readline_readline, -1); + rb_define_singleton_method(mReadline, "input=", + readline_s_set_input, 1); + rb_define_singleton_method(mReadline, "output=", + readline_s_set_output, 1); + rb_define_singleton_method(mReadline, "completion_proc=", + readline_s_set_completion_proc, 1); + rb_define_singleton_method(mReadline, "completion_proc", + readline_s_get_completion_proc, 0); + rb_define_singleton_method(mReadline, "completion_case_fold=", + readline_s_set_completion_case_fold, 1); + rb_define_singleton_method(mReadline, "completion_case_fold", + readline_s_get_completion_case_fold, 0); + rb_define_singleton_method(mReadline, "vi_editing_mode", + readline_s_vi_editing_mode, 0); + rb_define_singleton_method(mReadline, "vi_editing_mode?", + readline_s_vi_editing_mode_p, 0); + rb_define_singleton_method(mReadline, "emacs_editing_mode", + readline_s_emacs_editing_mode, 0); + rb_define_singleton_method(mReadline, "emacs_editing_mode?", + readline_s_emacs_editing_mode_p, 0); + rb_define_singleton_method(mReadline, "completion_append_character=", + readline_s_set_completion_append_character, 1); + rb_define_singleton_method(mReadline, "completion_append_character", + readline_s_get_completion_append_character, 0); + rb_define_singleton_method(mReadline, "basic_word_break_characters=", + readline_s_set_basic_word_break_characters, 1); + rb_define_singleton_method(mReadline, "basic_word_break_characters", + readline_s_get_basic_word_break_characters, 0); + rb_define_singleton_method(mReadline, "completer_word_break_characters=", + readline_s_set_completer_word_break_characters, 1); + rb_define_singleton_method(mReadline, "completer_word_break_characters", + readline_s_get_completer_word_break_characters, 0); + rb_define_singleton_method(mReadline, "basic_quote_characters=", + readline_s_set_basic_quote_characters, 1); + rb_define_singleton_method(mReadline, "basic_quote_characters", + readline_s_get_basic_quote_characters, 0); + rb_define_singleton_method(mReadline, "completer_quote_characters=", + readline_s_set_completer_quote_characters, 1); + rb_define_singleton_method(mReadline, "completer_quote_characters", + readline_s_get_completer_quote_characters, 0); + rb_define_singleton_method(mReadline, "filename_quote_characters=", + readline_s_set_filename_quote_characters, 1); + rb_define_singleton_method(mReadline, "filename_quote_characters", + readline_s_get_filename_quote_characters, 0); + + history = rb_obj_alloc(rb_cObject); + rb_extend_object(history, rb_mEnumerable); + rb_define_singleton_method(history,"to_s", hist_to_s, 0); + rb_define_singleton_method(history,"[]", hist_get, 1); + rb_define_singleton_method(history,"[]=", hist_set, 2); + rb_define_singleton_method(history,"<<", hist_push, 1); + rb_define_singleton_method(history,"push", hist_push_method, -1); + rb_define_singleton_method(history,"pop", hist_pop, 0); + rb_define_singleton_method(history,"shift", hist_shift, 0); + rb_define_singleton_method(history,"each", hist_each, 0); + rb_define_singleton_method(history,"length", hist_length, 0); + rb_define_singleton_method(history,"size", hist_length, 0); + rb_define_singleton_method(history,"empty?", hist_empty_p, 0); + rb_define_singleton_method(history,"delete_at", hist_delete_at, 1); + rb_define_singleton_method(history,"clear", hist_clear, 0); + + /* + * The history buffer. It extends Enumerable module, so it behaves + * just like an array. + * For example, gets the fifth content that the user input by + * HISTORY[4]. + */ + rb_define_const(mReadline, "HISTORY", history); + + fcomp = rb_obj_alloc(rb_cObject); + rb_define_singleton_method(fcomp, "call", + filename_completion_proc_call, 1); + /* + * The Object with the call method that is a completion for filename. + * This is sets by Readline.completion_proc= method. + */ + rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp); + + ucomp = rb_obj_alloc(rb_cObject); + rb_define_singleton_method(ucomp, "call", + username_completion_proc_call, 1); + /* + * The Object with the call method that is a completion for usernames. + * This is sets by Readline.completion_proc= method. + */ + rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp); + history_get_offset_func = history_get_offset_history_base; +#if defined HAVE_RL_LIBRARY_VERSION + version = rb_str_new_cstr(rl_library_version); +#if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY + if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION, + strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) { + add_history("1"); + if (history_get(history_get_offset_func(0)) == NULL) { + history_get_offset_func = history_get_offset_0; + } +#if !defined HAVE_CLEAR_HISTORY + clear_history(); +#else + { + HIST_ENTRY *entry = remove_history(0); + free(entry->line); + free(entry); + } +#endif + } +#endif +#else + version = rb_str_new_cstr("2.0 or prior version"); +#endif + /* Version string of GNU Readline or libedit. */ + rb_define_const(mReadline, "VERSION", version); + + rl_attempted_completion_function = readline_attempted_completion_function; +#ifdef HAVE_RL_EVENT_HOOK + rl_event_hook = readline_event; +#endif +#ifdef HAVE_RL_CLEAR_SIGNALS + rl_clear_signals(); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/.cvsignore b/lib/ruby-1.9.1-rc1/ext/ripper/.cvsignore new file mode 100644 index 0000000..c9adce0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/.cvsignore @@ -0,0 +1,8 @@ +Makefile +mkmf.log +eventids1.c +eventids2table.c +ripper.* +ids1 +ids2 +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/README b/lib/ruby-1.9.1-rc1/ext/ripper/README new file mode 100644 index 0000000..0825013 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/README @@ -0,0 +1,30 @@ +Ripper README +============= + + Ripper is a Ruby script parser. You can get information + by event-based style from the parser. + + !! WARNING !! + + Ripper is still early-alpha version. + I never assure any kind of backward compatibility. + +Requirements +------------ + + * ruby 1.9 (support CVS HEAD only) + * bison 1.28 or later (Other yaccs do not work) + +Usage +----- + + See test/ripper/* and sample/ripper/*. + +License +------- + + Ruby License. + + Minero Aoki + aamine@loveruby.net + http://i.loveruby.net diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/depend b/lib/ruby-1.9.1-rc1/ext/ripper/depend new file mode 100644 index 0000000..e8a53e4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/depend @@ -0,0 +1,39 @@ +GEN = $(srcdir)/tools/generate.rb +SRC1 = $(top_srcdir)/parse.y +SRC2 = $(srcdir)/eventids2.c +BISON = bison + +src: ripper.c eventids1.c eventids2table.c + +ripper.o: ripper.c lex.c eventids1.c eventids2.c eventids2table.c \ + $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ + $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h \ + $(hdrdir)/ruby/encoding.h $(hdrdir)/missing.h \ + $(hdrdir)/../node.h $(hdrdir)/oniguruma.h \ + $(hdrdir)/regex.h $(hdrdir)/st.h $(hdrdir)/util.h + +.y.c: + $(BISON) -t -v -oy.tab.c $< + sed -f $(top_srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@ + @$(RM) y.tab.c + +all: check +static: check + +ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y + $(RUBY) $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y --output=$@ + +check: $(GEN) $(SRC1) $(SRC2) + $(RUBY) $(GEN) --mode=check --ids1src=$(SRC1) --ids2src=$(SRC2) + +eventids1.c: $(srcdir)/tools/generate.rb $(SRC1) + $(RUBY) $(GEN) --mode=eventids1 --ids1src=$(SRC1) --output=$@ + +eventids2table.c: $(srcdir)/tools/generate.rb $(SRC2) + $(RUBY) $(GEN) --mode=eventids2table --ids2src=$(SRC2) --output=$@ + +# Entries for Ripper maintainer + +preproc: ripper.E +ripper.E: ripper.c + $(CC) -E $(CPPFLAGS) ripper.c | $(RUBY) $(srcdir)/tools/strip.rb > $@ diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/eventids1.c b/lib/ruby-1.9.1-rc1/ext/ripper/eventids1.c new file mode 100644 index 0000000..d0448b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/eventids1.c @@ -0,0 +1,502 @@ +static ID ripper_id_BEGIN; +static ID ripper_id_END; +static ID ripper_id_alias; +static ID ripper_id_alias_error; +static ID ripper_id_aref; +static ID ripper_id_aref_field; +static ID ripper_id_arg_ambiguous; +static ID ripper_id_arg_paren; +static ID ripper_id_args_add; +static ID ripper_id_args_add_block; +static ID ripper_id_args_add_star; +static ID ripper_id_args_new; +static ID ripper_id_args_prepend; +static ID ripper_id_array; +static ID ripper_id_assign; +static ID ripper_id_assign_error; +static ID ripper_id_assoc_new; +static ID ripper_id_assoclist_from_args; +static ID ripper_id_bare_assoc_hash; +static ID ripper_id_begin; +static ID ripper_id_binary; +static ID ripper_id_block_var; +static ID ripper_id_block_var_add_block; +static ID ripper_id_block_var_add_star; +static ID ripper_id_blockarg; +static ID ripper_id_body_stmt; +static ID ripper_id_brace_block; +static ID ripper_id_break; +static ID ripper_id_call; +static ID ripper_id_case; +static ID ripper_id_class; +static ID ripper_id_class_name_error; +static ID ripper_id_command; +static ID ripper_id_command_call; +static ID ripper_id_const_path_field; +static ID ripper_id_const_path_ref; +static ID ripper_id_const_ref; +static ID ripper_id_def; +static ID ripper_id_defined; +static ID ripper_id_defs; +static ID ripper_id_do_block; +static ID ripper_id_dot2; +static ID ripper_id_dot3; +static ID ripper_id_dyna_symbol; +static ID ripper_id_else; +static ID ripper_id_elsif; +static ID ripper_id_ensure; +static ID ripper_id_excessed_comma; +static ID ripper_id_fcall; +static ID ripper_id_field; +static ID ripper_id_for; +static ID ripper_id_hash; +static ID ripper_id_if; +static ID ripper_id_if_mod; +static ID ripper_id_ifop; +static ID ripper_id_lambda; +static ID ripper_id_magic_comment; +static ID ripper_id_massign; +static ID ripper_id_method_add_arg; +static ID ripper_id_method_add_block; +static ID ripper_id_mlhs_add; +static ID ripper_id_mlhs_add_star; +static ID ripper_id_mlhs_new; +static ID ripper_id_mlhs_paren; +static ID ripper_id_module; +static ID ripper_id_mrhs_add; +static ID ripper_id_mrhs_add_star; +static ID ripper_id_mrhs_new; +static ID ripper_id_mrhs_new_from_args; +static ID ripper_id_next; +static ID ripper_id_opassign; +static ID ripper_id_param_error; +static ID ripper_id_params; +static ID ripper_id_paren; +static ID ripper_id_parse_error; +static ID ripper_id_program; +static ID ripper_id_qwords_add; +static ID ripper_id_qwords_new; +static ID ripper_id_redo; +static ID ripper_id_regexp_literal; +static ID ripper_id_rescue; +static ID ripper_id_rescue_mod; +static ID ripper_id_rest_param; +static ID ripper_id_retry; +static ID ripper_id_return; +static ID ripper_id_return0; +static ID ripper_id_sclass; +static ID ripper_id_stmts_add; +static ID ripper_id_stmts_new; +static ID ripper_id_string_add; +static ID ripper_id_string_concat; +static ID ripper_id_string_content; +static ID ripper_id_string_dvar; +static ID ripper_id_string_embexpr; +static ID ripper_id_string_literal; +static ID ripper_id_super; +static ID ripper_id_symbol; +static ID ripper_id_symbol_literal; +static ID ripper_id_top_const_field; +static ID ripper_id_top_const_ref; +static ID ripper_id_unary; +static ID ripper_id_undef; +static ID ripper_id_unless; +static ID ripper_id_unless_mod; +static ID ripper_id_until; +static ID ripper_id_until_mod; +static ID ripper_id_var_alias; +static ID ripper_id_var_field; +static ID ripper_id_var_ref; +static ID ripper_id_void_stmt; +static ID ripper_id_when; +static ID ripper_id_while; +static ID ripper_id_while_mod; +static ID ripper_id_word_add; +static ID ripper_id_word_new; +static ID ripper_id_words_add; +static ID ripper_id_words_new; +static ID ripper_id_xstring_add; +static ID ripper_id_xstring_literal; +static ID ripper_id_xstring_new; +static ID ripper_id_yield; +static ID ripper_id_yield0; +static ID ripper_id_zsuper; + +static void +ripper_init_eventids1(VALUE self) +{ + VALUE h; + ID id; + ripper_id_BEGIN = rb_intern_const("on_BEGIN"); + ripper_id_END = rb_intern_const("on_END"); + ripper_id_alias = rb_intern_const("on_alias"); + ripper_id_alias_error = rb_intern_const("on_alias_error"); + ripper_id_aref = rb_intern_const("on_aref"); + ripper_id_aref_field = rb_intern_const("on_aref_field"); + ripper_id_arg_ambiguous = rb_intern_const("on_arg_ambiguous"); + ripper_id_arg_paren = rb_intern_const("on_arg_paren"); + ripper_id_args_add = rb_intern_const("on_args_add"); + ripper_id_args_add_block = rb_intern_const("on_args_add_block"); + ripper_id_args_add_star = rb_intern_const("on_args_add_star"); + ripper_id_args_new = rb_intern_const("on_args_new"); + ripper_id_args_prepend = rb_intern_const("on_args_prepend"); + ripper_id_array = rb_intern_const("on_array"); + ripper_id_assign = rb_intern_const("on_assign"); + ripper_id_assign_error = rb_intern_const("on_assign_error"); + ripper_id_assoc_new = rb_intern_const("on_assoc_new"); + ripper_id_assoclist_from_args = rb_intern_const("on_assoclist_from_args"); + ripper_id_bare_assoc_hash = rb_intern_const("on_bare_assoc_hash"); + ripper_id_begin = rb_intern_const("on_begin"); + ripper_id_binary = rb_intern_const("on_binary"); + ripper_id_block_var = rb_intern_const("on_block_var"); + ripper_id_block_var_add_block = rb_intern_const("on_block_var_add_block"); + ripper_id_block_var_add_star = rb_intern_const("on_block_var_add_star"); + ripper_id_blockarg = rb_intern_const("on_blockarg"); + ripper_id_body_stmt = rb_intern_const("on_body_stmt"); + ripper_id_brace_block = rb_intern_const("on_brace_block"); + ripper_id_break = rb_intern_const("on_break"); + ripper_id_call = rb_intern_const("on_call"); + ripper_id_case = rb_intern_const("on_case"); + ripper_id_class = rb_intern_const("on_class"); + ripper_id_class_name_error = rb_intern_const("on_class_name_error"); + ripper_id_command = rb_intern_const("on_command"); + ripper_id_command_call = rb_intern_const("on_command_call"); + ripper_id_const_path_field = rb_intern_const("on_const_path_field"); + ripper_id_const_path_ref = rb_intern_const("on_const_path_ref"); + ripper_id_const_ref = rb_intern_const("on_const_ref"); + ripper_id_def = rb_intern_const("on_def"); + ripper_id_defined = rb_intern_const("on_defined"); + ripper_id_defs = rb_intern_const("on_defs"); + ripper_id_do_block = rb_intern_const("on_do_block"); + ripper_id_dot2 = rb_intern_const("on_dot2"); + ripper_id_dot3 = rb_intern_const("on_dot3"); + ripper_id_dyna_symbol = rb_intern_const("on_dyna_symbol"); + ripper_id_else = rb_intern_const("on_else"); + ripper_id_elsif = rb_intern_const("on_elsif"); + ripper_id_ensure = rb_intern_const("on_ensure"); + ripper_id_excessed_comma = rb_intern_const("on_excessed_comma"); + ripper_id_fcall = rb_intern_const("on_fcall"); + ripper_id_field = rb_intern_const("on_field"); + ripper_id_for = rb_intern_const("on_for"); + ripper_id_hash = rb_intern_const("on_hash"); + ripper_id_if = rb_intern_const("on_if"); + ripper_id_if_mod = rb_intern_const("on_if_mod"); + ripper_id_ifop = rb_intern_const("on_ifop"); + ripper_id_lambda = rb_intern_const("on_lambda"); + ripper_id_magic_comment = rb_intern_const("on_magic_comment"); + ripper_id_massign = rb_intern_const("on_massign"); + ripper_id_method_add_arg = rb_intern_const("on_method_add_arg"); + ripper_id_method_add_block = rb_intern_const("on_method_add_block"); + ripper_id_mlhs_add = rb_intern_const("on_mlhs_add"); + ripper_id_mlhs_add_star = rb_intern_const("on_mlhs_add_star"); + ripper_id_mlhs_new = rb_intern_const("on_mlhs_new"); + ripper_id_mlhs_paren = rb_intern_const("on_mlhs_paren"); + ripper_id_module = rb_intern_const("on_module"); + ripper_id_mrhs_add = rb_intern_const("on_mrhs_add"); + ripper_id_mrhs_add_star = rb_intern_const("on_mrhs_add_star"); + ripper_id_mrhs_new = rb_intern_const("on_mrhs_new"); + ripper_id_mrhs_new_from_args = rb_intern_const("on_mrhs_new_from_args"); + ripper_id_next = rb_intern_const("on_next"); + ripper_id_opassign = rb_intern_const("on_opassign"); + ripper_id_param_error = rb_intern_const("on_param_error"); + ripper_id_params = rb_intern_const("on_params"); + ripper_id_paren = rb_intern_const("on_paren"); + ripper_id_parse_error = rb_intern_const("on_parse_error"); + ripper_id_program = rb_intern_const("on_program"); + ripper_id_qwords_add = rb_intern_const("on_qwords_add"); + ripper_id_qwords_new = rb_intern_const("on_qwords_new"); + ripper_id_redo = rb_intern_const("on_redo"); + ripper_id_regexp_literal = rb_intern_const("on_regexp_literal"); + ripper_id_rescue = rb_intern_const("on_rescue"); + ripper_id_rescue_mod = rb_intern_const("on_rescue_mod"); + ripper_id_rest_param = rb_intern_const("on_rest_param"); + ripper_id_retry = rb_intern_const("on_retry"); + ripper_id_return = rb_intern_const("on_return"); + ripper_id_return0 = rb_intern_const("on_return0"); + ripper_id_sclass = rb_intern_const("on_sclass"); + ripper_id_stmts_add = rb_intern_const("on_stmts_add"); + ripper_id_stmts_new = rb_intern_const("on_stmts_new"); + ripper_id_string_add = rb_intern_const("on_string_add"); + ripper_id_string_concat = rb_intern_const("on_string_concat"); + ripper_id_string_content = rb_intern_const("on_string_content"); + ripper_id_string_dvar = rb_intern_const("on_string_dvar"); + ripper_id_string_embexpr = rb_intern_const("on_string_embexpr"); + ripper_id_string_literal = rb_intern_const("on_string_literal"); + ripper_id_super = rb_intern_const("on_super"); + ripper_id_symbol = rb_intern_const("on_symbol"); + ripper_id_symbol_literal = rb_intern_const("on_symbol_literal"); + ripper_id_top_const_field = rb_intern_const("on_top_const_field"); + ripper_id_top_const_ref = rb_intern_const("on_top_const_ref"); + ripper_id_unary = rb_intern_const("on_unary"); + ripper_id_undef = rb_intern_const("on_undef"); + ripper_id_unless = rb_intern_const("on_unless"); + ripper_id_unless_mod = rb_intern_const("on_unless_mod"); + ripper_id_until = rb_intern_const("on_until"); + ripper_id_until_mod = rb_intern_const("on_until_mod"); + ripper_id_var_alias = rb_intern_const("on_var_alias"); + ripper_id_var_field = rb_intern_const("on_var_field"); + ripper_id_var_ref = rb_intern_const("on_var_ref"); + ripper_id_void_stmt = rb_intern_const("on_void_stmt"); + ripper_id_when = rb_intern_const("on_when"); + ripper_id_while = rb_intern_const("on_while"); + ripper_id_while_mod = rb_intern_const("on_while_mod"); + ripper_id_word_add = rb_intern_const("on_word_add"); + ripper_id_word_new = rb_intern_const("on_word_new"); + ripper_id_words_add = rb_intern_const("on_words_add"); + ripper_id_words_new = rb_intern_const("on_words_new"); + ripper_id_xstring_add = rb_intern_const("on_xstring_add"); + ripper_id_xstring_literal = rb_intern_const("on_xstring_literal"); + ripper_id_xstring_new = rb_intern_const("on_xstring_new"); + ripper_id_yield = rb_intern_const("on_yield"); + ripper_id_yield0 = rb_intern_const("on_yield0"); + ripper_id_zsuper = rb_intern_const("on_zsuper"); + + h = rb_hash_new(); + rb_define_const(self, "PARSER_EVENT_TABLE", h); + id = rb_intern_const("BEGIN"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("END"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("alias"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("alias_error"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("aref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("aref_field"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("arg_ambiguous"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("arg_paren"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("args_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("args_add_block"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("args_add_star"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("args_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("args_prepend"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("array"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("assign"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("assign_error"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("assoc_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("assoclist_from_args"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("bare_assoc_hash"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("begin"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("binary"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("block_var"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("block_var_add_block"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("block_var_add_star"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("blockarg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("body_stmt"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(4)); + id = rb_intern_const("brace_block"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("break"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("call"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("case"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("class"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("class_name_error"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("command"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("command_call"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(4)); + id = rb_intern_const("const_path_field"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("const_path_ref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("const_ref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("def"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("defined"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("defs"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(5)); + id = rb_intern_const("do_block"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("dot2"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("dot3"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("dyna_symbol"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("else"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("elsif"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("ensure"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("excessed_comma"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("fcall"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("field"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("for"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("hash"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("if"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("if_mod"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("ifop"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("lambda"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("magic_comment"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("massign"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("method_add_arg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("method_add_block"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mlhs_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mlhs_add_star"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mlhs_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("mlhs_paren"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("module"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mrhs_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mrhs_add_star"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("mrhs_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("mrhs_new_from_args"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("next"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("opassign"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("param_error"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("params"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(5)); + id = rb_intern_const("paren"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("parse_error"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("program"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("qwords_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("qwords_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("redo"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("regexp_literal"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("rescue"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(4)); + id = rb_intern_const("rescue_mod"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("rest_param"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("retry"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("return"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("return0"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("sclass"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("stmts_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("stmts_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("string_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("string_concat"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("string_content"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("string_dvar"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("string_embexpr"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("string_literal"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("super"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("symbol"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("symbol_literal"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("top_const_field"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("top_const_ref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("unary"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("undef"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("unless"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("unless_mod"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("until"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("until_mod"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("var_alias"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("var_field"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("var_ref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("void_stmt"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("when"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(3)); + id = rb_intern_const("while"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("while_mod"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("word_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("word_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("words_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("words_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("xstring_add"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(2)); + id = rb_intern_const("xstring_literal"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("xstring_new"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("yield"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("yield0"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); + id = rb_intern_const("zsuper"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(0)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/eventids2.c b/lib/ruby-1.9.1-rc1/ext/ripper/eventids2.c new file mode 100644 index 0000000..a557a41 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/eventids2.c @@ -0,0 +1,278 @@ +#define tIGNORED_NL (tLAST_TOKEN + 1) +#define tCOMMENT (tLAST_TOKEN + 2) +#define tEMBDOC_BEG (tLAST_TOKEN + 3) +#define tEMBDOC (tLAST_TOKEN + 4) +#define tEMBDOC_END (tLAST_TOKEN + 5) +#define tSP (tLAST_TOKEN + 6) +#define tHEREDOC_BEG (tLAST_TOKEN + 7) +#define tHEREDOC_END (tLAST_TOKEN + 8) +#define k__END__ (tLAST_TOKEN + 9) + +static ID ripper_id_backref; +static ID ripper_id_backtick; +static ID ripper_id_comma; +static ID ripper_id_const; +static ID ripper_id_cvar; +static ID ripper_id_embexpr_beg; +static ID ripper_id_embexpr_end; +static ID ripper_id_embvar; +static ID ripper_id_float; +static ID ripper_id_gvar; +static ID ripper_id_ident; +static ID ripper_id_int; +static ID ripper_id_ivar; +static ID ripper_id_kw; +static ID ripper_id_lbrace; +static ID ripper_id_lbracket; +static ID ripper_id_lparen; +static ID ripper_id_nl; +static ID ripper_id_op; +static ID ripper_id_period; +static ID ripper_id_rbrace; +static ID ripper_id_rbracket; +static ID ripper_id_rparen; +static ID ripper_id_semicolon; +static ID ripper_id_symbeg; +static ID ripper_id_tstring_beg; +static ID ripper_id_tstring_content; +static ID ripper_id_tstring_end; +static ID ripper_id_words_beg; +static ID ripper_id_qwords_beg; +static ID ripper_id_words_sep; +static ID ripper_id_regexp_beg; +static ID ripper_id_regexp_end; +static ID ripper_id_label; +static ID ripper_id_tlambda; +static ID ripper_id_tlambeg; + +static ID ripper_id_ignored_nl; +static ID ripper_id_comment; +static ID ripper_id_embdoc_beg; +static ID ripper_id_embdoc; +static ID ripper_id_embdoc_end; +static ID ripper_id_sp; +static ID ripper_id_heredoc_beg; +static ID ripper_id_heredoc_end; +static ID ripper_id___end__; +static ID ripper_id_CHAR; + +#include "eventids2table.c" + +static void +ripper_init_eventids2(VALUE self) +{ + ripper_id_backref = rb_intern_const("on_backref"); + ripper_id_backtick = rb_intern_const("on_backtick"); + ripper_id_comma = rb_intern_const("on_comma"); + ripper_id_const = rb_intern_const("on_const"); + ripper_id_cvar = rb_intern_const("on_cvar"); + ripper_id_embexpr_beg = rb_intern_const("on_embexpr_beg"); + ripper_id_embexpr_end = rb_intern_const("on_embexpr_end"); + ripper_id_embvar = rb_intern_const("on_embvar"); + ripper_id_float = rb_intern_const("on_float"); + ripper_id_gvar = rb_intern_const("on_gvar"); + ripper_id_ident = rb_intern_const("on_ident"); + ripper_id_int = rb_intern_const("on_int"); + ripper_id_ivar = rb_intern_const("on_ivar"); + ripper_id_kw = rb_intern_const("on_kw"); + ripper_id_lbrace = rb_intern_const("on_lbrace"); + ripper_id_lbracket = rb_intern_const("on_lbracket"); + ripper_id_lparen = rb_intern_const("on_lparen"); + ripper_id_nl = rb_intern_const("on_nl"); + ripper_id_op = rb_intern_const("on_op"); + ripper_id_period = rb_intern_const("on_period"); + ripper_id_rbrace = rb_intern_const("on_rbrace"); + ripper_id_rbracket = rb_intern_const("on_rbracket"); + ripper_id_rparen = rb_intern_const("on_rparen"); + ripper_id_semicolon = rb_intern_const("on_semicolon"); + ripper_id_symbeg = rb_intern_const("on_symbeg"); + ripper_id_tstring_beg = rb_intern_const("on_tstring_beg"); + ripper_id_tstring_content = rb_intern_const("on_tstring_content"); + ripper_id_tstring_end = rb_intern_const("on_tstring_end"); + ripper_id_words_beg = rb_intern_const("on_words_beg"); + ripper_id_qwords_beg = rb_intern_const("on_qwords_beg"); + ripper_id_words_sep = rb_intern_const("on_words_sep"); + ripper_id_regexp_beg = rb_intern_const("on_regexp_beg"); + ripper_id_regexp_end = rb_intern_const("on_regexp_end"); + ripper_id_label = rb_intern_const("on_label"); + ripper_id_tlambda = rb_intern_const("on_tlambda"); + ripper_id_tlambeg = rb_intern_const("on_tlambeg"); + + ripper_id_ignored_nl = rb_intern_const("on_ignored_nl"); + ripper_id_comment = rb_intern_const("on_comment"); + ripper_id_embdoc_beg = rb_intern_const("on_embdoc_beg"); + ripper_id_embdoc = rb_intern_const("on_embdoc"); + ripper_id_embdoc_end = rb_intern_const("on_embdoc_end"); + ripper_id_sp = rb_intern_const("on_sp"); + ripper_id_heredoc_beg = rb_intern_const("on_heredoc_beg"); + ripper_id_heredoc_end = rb_intern_const("on_heredoc_end"); + ripper_id___end__ = rb_intern_const("on___end__"); + ripper_id_CHAR = rb_intern_const("on_CHAR"); + + ripper_init_eventids2_table(self); +} + +static const struct token_assoc { + int token; + ID *id; +} token_to_eventid[] = { + {' ', &ripper_id_words_sep}, + {'!', &ripper_id_op}, + {'%', &ripper_id_op}, + {'&', &ripper_id_op}, + {'*', &ripper_id_op}, + {'+', &ripper_id_op}, + {'-', &ripper_id_op}, + {'/', &ripper_id_op}, + {'<', &ripper_id_op}, + {'=', &ripper_id_op}, + {'>', &ripper_id_op}, + {'?', &ripper_id_op}, + {'^', &ripper_id_op}, + {'|', &ripper_id_op}, + {'~', &ripper_id_op}, + {':', &ripper_id_op}, + {',', &ripper_id_comma}, + {'.', &ripper_id_period}, + {';', &ripper_id_semicolon}, + {'`', &ripper_id_backtick}, + {'\n', &ripper_id_nl}, + {keyword_alias, &ripper_id_kw}, + {keyword_and, &ripper_id_kw}, + {keyword_begin, &ripper_id_kw}, + {keyword_break, &ripper_id_kw}, + {keyword_case, &ripper_id_kw}, + {keyword_class, &ripper_id_kw}, + {keyword_def, &ripper_id_kw}, + {keyword_defined, &ripper_id_kw}, + {keyword_do, &ripper_id_kw}, + {keyword_do_block, &ripper_id_kw}, + {keyword_do_cond, &ripper_id_kw}, + {keyword_else, &ripper_id_kw}, + {keyword_elsif, &ripper_id_kw}, + {keyword_end, &ripper_id_kw}, + {keyword_ensure, &ripper_id_kw}, + {keyword_false, &ripper_id_kw}, + {keyword_for, &ripper_id_kw}, + {keyword_if, &ripper_id_kw}, + {modifier_if, &ripper_id_kw}, + {keyword_in, &ripper_id_kw}, + {keyword_module, &ripper_id_kw}, + {keyword_next, &ripper_id_kw}, + {keyword_nil, &ripper_id_kw}, + {keyword_not, &ripper_id_kw}, + {keyword_or, &ripper_id_kw}, + {keyword_redo, &ripper_id_kw}, + {keyword_rescue, &ripper_id_kw}, + {modifier_rescue, &ripper_id_kw}, + {keyword_retry, &ripper_id_kw}, + {keyword_return, &ripper_id_kw}, + {keyword_self, &ripper_id_kw}, + {keyword_super, &ripper_id_kw}, + {keyword_then, &ripper_id_kw}, + {keyword_true, &ripper_id_kw}, + {keyword_undef, &ripper_id_kw}, + {keyword_unless, &ripper_id_kw}, + {modifier_unless, &ripper_id_kw}, + {keyword_until, &ripper_id_kw}, + {modifier_until, &ripper_id_kw}, + {keyword_when, &ripper_id_kw}, + {keyword_while, &ripper_id_kw}, + {modifier_while, &ripper_id_kw}, + {keyword_yield, &ripper_id_kw}, + {keyword__FILE__, &ripper_id_kw}, + {keyword__LINE__, &ripper_id_kw}, + {keyword__ENCODING__, &ripper_id_kw}, + {keyword_BEGIN, &ripper_id_kw}, + {keyword_END, &ripper_id_kw}, + {tAMPER, &ripper_id_op}, + {tANDOP, &ripper_id_op}, + {tAREF, &ripper_id_op}, + {tASET, &ripper_id_op}, + {tASSOC, &ripper_id_op}, + {tBACK_REF, &ripper_id_backref}, + {tCHAR, &ripper_id_CHAR}, + {tCMP, &ripper_id_op}, + {tCOLON2, &ripper_id_op}, + {tCOLON3, &ripper_id_op}, + {tCONSTANT, &ripper_id_const}, + {tCVAR, &ripper_id_cvar}, + {tDOT2, &ripper_id_op}, + {tDOT3, &ripper_id_op}, + {tEQ, &ripper_id_op}, + {tEQQ, &ripper_id_op}, + {tFID, &ripper_id_ident}, + {tFLOAT, &ripper_id_float}, + {tGEQ, &ripper_id_op}, + {tGVAR, &ripper_id_gvar}, + {tIDENTIFIER, &ripper_id_ident}, + {tINTEGER, &ripper_id_int}, + {tIVAR, &ripper_id_ivar}, + {tLBRACE, &ripper_id_lbrace}, + {tLBRACE_ARG, &ripper_id_lbrace}, + {'{', &ripper_id_lbrace}, + {'}', &ripper_id_rbrace}, + {tLBRACK, &ripper_id_lbracket}, + {'[', &ripper_id_lbracket}, + {']', &ripper_id_rbracket}, + {tLEQ, &ripper_id_op}, + {tLPAREN, &ripper_id_lparen}, + {tLPAREN_ARG, &ripper_id_lparen}, + {'(', &ripper_id_lparen}, + {')', &ripper_id_rparen}, + {tLSHFT, &ripper_id_op}, + {tMATCH, &ripper_id_op}, + {tNEQ, &ripper_id_op}, + {tNMATCH, &ripper_id_op}, + {tNTH_REF, &ripper_id_backref}, + {tOP_ASGN, &ripper_id_op}, + {tOROP, &ripper_id_op}, + {tPOW, &ripper_id_op}, + {tQWORDS_BEG, &ripper_id_qwords_beg}, + {tREGEXP_BEG, &ripper_id_regexp_beg}, + {tREGEXP_END, &ripper_id_regexp_end}, + {tRPAREN, &ripper_id_rparen}, + {tRSHFT, &ripper_id_op}, + {tSTAR, &ripper_id_op}, + {tSTRING_BEG, &ripper_id_tstring_beg}, + {tSTRING_CONTENT, &ripper_id_tstring_content}, + {tSTRING_DBEG, &ripper_id_embexpr_beg}, + {tSTRING_DVAR, &ripper_id_embvar}, + {tSTRING_END, &ripper_id_tstring_end}, + {tSYMBEG, &ripper_id_symbeg}, + {tUMINUS, &ripper_id_op}, + {tUMINUS_NUM, &ripper_id_op}, + {tUPLUS, &ripper_id_op}, + {tWORDS_BEG, &ripper_id_words_beg}, + {tXSTRING_BEG, &ripper_id_backtick}, + {tLABEL, &ripper_id_label}, + {tLAMBDA, &ripper_id_tlambda}, + {tLAMBEG, &ripper_id_tlambeg}, + + /* ripper specific tokens */ + {tIGNORED_NL, &ripper_id_ignored_nl}, + {tCOMMENT, &ripper_id_comment}, + {tEMBDOC_BEG, &ripper_id_embdoc_beg}, + {tEMBDOC, &ripper_id_embdoc}, + {tEMBDOC_END, &ripper_id_embdoc_end}, + {tSP, &ripper_id_sp}, + {tHEREDOC_BEG, &ripper_id_heredoc_beg}, + {tHEREDOC_END, &ripper_id_heredoc_end}, + {k__END__, &ripper_id___end__}, + {0, NULL} +}; + +static ID +ripper_token2eventid(int tok) +{ + const struct token_assoc *a; + + for (a = token_to_eventid; a->id != NULL; a++) { + if (a->token == tok) + return *a->id; + } + if (tok < 256) { + return ripper_id_CHAR; + } + rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok); +} diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/eventids2table.c b/lib/ruby-1.9.1-rc1/ext/ripper/eventids2table.c new file mode 100644 index 0000000..d33152f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/eventids2table.c @@ -0,0 +1,99 @@ +static void +ripper_init_eventids2_table(VALUE self) +{ + VALUE h = rb_hash_new(); + ID id; + rb_define_const(self, "SCANNER_EVENT_TABLE", h); + id = rb_intern_const("CHAR"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("__end__"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("backref"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("backtick"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("comma"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("comment"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("const"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("cvar"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embdoc"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embdoc_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embdoc_end"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embexpr_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embexpr_end"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("embvar"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("float"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("gvar"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("heredoc_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("heredoc_end"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("ident"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("ignored_nl"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("int"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("ivar"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("kw"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("label"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("lbrace"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("lbracket"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("lparen"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("nl"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("op"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("period"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("qwords_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("rbrace"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("rbracket"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("regexp_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("regexp_end"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("rparen"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("semicolon"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("sp"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("symbeg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("tlambda"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("tlambeg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("tstring_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("tstring_content"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("tstring_end"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("words_beg"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); + id = rb_intern_const("words_sep"); + rb_hash_aset(h, ID2SYM(id), INT2NUM(1)); +} diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/extconf.rb b/lib/ruby-1.9.1-rc1/ext/ripper/extconf.rb new file mode 100644 index 0000000..4914d70 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/extconf.rb @@ -0,0 +1,22 @@ +#!ruby -s + +require 'mkmf' +require 'rbconfig' + +def main + unless find_executable('bison') + unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") + Logging.message 'missing bison; abort' + return + end + end + $objs = %w(ripper.o) + $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c) + $defs << '-DRIPPER' + $defs << '-DRIPPER_DEBUG' if $debug + $VPATH << '$(topdir)' << '$(top_srcdir)' + $INCFLAGS << ' -I$(topdir) -I$(top_srcdir)' + create_makefile 'ripper' +end + +main diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper.rb b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper.rb new file mode 100644 index 0000000..cb19da3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper.rb @@ -0,0 +1,4 @@ +require 'ripper/core' +require 'ripper/lexer' +require 'ripper/filter' +require 'ripper/sexp' diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/core.rb b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/core.rb new file mode 100644 index 0000000..211f722 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/core.rb @@ -0,0 +1,70 @@ +# +# $Id: core.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# +# Copyright (c) 2003-2005 Minero Aoki +# +# This program is free software. +# You can distribute and/or modify this program under the Ruby License. +# For details of Ruby License, see ruby/COPYING. +# + +require 'ripper.so' + +class Ripper + + # Parses Ruby program read from _src_. + # _src_ must be a String or a IO or a object which has #gets method. + def Ripper.parse(src, filename = '(ripper)', lineno = 1) + new(src, filename, lineno).parse + end + + # This array contains name of parser events. + PARSER_EVENTS = PARSER_EVENT_TABLE.keys + + # This array contains name of scanner events. + SCANNER_EVENTS = SCANNER_EVENT_TABLE.keys + + # This array contains name of all ripper events. + EVENTS = PARSER_EVENTS + SCANNER_EVENTS + + private + + # + # Parser Events + # + + PARSER_EVENT_TABLE.each do |id, arity| + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{id}(#{ ('a'..'z').to_a[0, arity].join(', ') }) + #{arity == 0 ? 'nil' : 'a'} + end + End + end + + # This method is called when weak warning is produced by the parser. + # _fmt_ and _args_ is printf style. + def warn(fmt, *args) + end + + # This method is called when strong warning is produced by the parser. + # _fmt_ and _args_ is printf style. + def warning(fmt, *args) + end + + # This method is called when the parser found syntax error. + def compile_error(msg) + end + + # + # Scanner Events + # + + SCANNER_EVENTS.each do |id| + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{id}(token) + token + end + End + end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/filter.rb b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/filter.rb new file mode 100644 index 0000000..0c37c79 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/filter.rb @@ -0,0 +1,70 @@ +# +# $Id: filter.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# +# Copyright (c) 2004,2005 Minero Aoki +# +# This program is free software. +# You can distribute and/or modify this program under the Ruby License. +# For details of Ruby License, see ruby/COPYING. +# + +require 'ripper/lexer' + +class Ripper + + # This class handles only scanner events, + # and they are dispatched in the `right' order (same with input). + class Filter + + def initialize(src, filename = '-', lineno = 1) + @__lexer = Lexer.new(src, filename, lineno) + @__line = nil + @__col = nil + end + + # The file name of the input. + def filename + @__lexer.filename + end + + # The line number of the current token. + # This value starts from 1. + # This method is valid only in event handlers. + def lineno + @__line + end + + # The column number of the current token. + # This value starts from 0. + # This method is valid only in event handlers. + def column + @__col + end + + # Starts parsing. _init_ is a data accumulator. + # It is passed to the next event handler (as of Enumerable#inject). + def parse(init = nil) + data = init + @__lexer.lex.each do |pos, event, tok| + @__line, @__col = *pos + data = if respond_to?(event, true) + then __send__(event, tok, data) + else on_default(event, tok, data) + end + end + data + end + + private + + # This method is called when some event handler have not defined. + # _event_ is :on_XXX, _token_ is scanned token, _data_ is a data + # accumulator. The return value of this method is passed to the + # next event handler (as of Enumerable#inject). + def on_default(event, token, data) + data + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/lexer.rb b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/lexer.rb new file mode 100644 index 0000000..df76dd5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/lexer.rb @@ -0,0 +1,179 @@ +# +# $Id: lexer.rb 13966 2007-11-19 07:10:09Z matz $ +# +# Copyright (c) 2004,2005 Minero Aoki +# +# This program is free software. +# You can distribute and/or modify this program under the Ruby License. +# For details of Ruby License, see ruby/COPYING. +# + +require 'ripper/core' + +class Ripper + + # Tokenizes Ruby program and returns an Array of String. + def Ripper.tokenize(src, filename = '-', lineno = 1) + Lexer.new(src, filename, lineno).tokenize + end + + # Tokenizes Ruby program and returns an Array of Array, + # which is formatted like [[lineno, column], type, token]. + # + # require 'ripper' + # require 'pp' + # + # p Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def"], + # [[1, 3], :on_sp, " " ], + # [[1, 4], :on_ident, "m" ], + # [[1, 5], :on_lparen, "(" ], + # [[1, 6], :on_ident, "a" ], + # [[1, 7], :on_rparen, ")" ], + # [[1, 8], :on_sp, " " ], + # [[1, 9], :on_kw, "nil"], + # [[1, 12], :on_sp, " " ], + # [[1, 13], :on_kw, "end"]] + # + def Ripper.lex(src, filename = '-', lineno = 1) + Lexer.new(src, filename, lineno).lex + end + + class Lexer < ::Ripper #:nodoc: internal use only + def tokenize + lex().map {|pos, event, tok| tok } + end + + def lex + parse().sort_by {|pos, event, tok| pos } + end + + def parse + @buf = [] + super + @buf + end + + private + + SCANNER_EVENTS.each do |event| + module_eval(<<-End, __FILE__+'/module_eval', __LINE__ + 1) + def on_#{event}(tok) + @buf.push [[lineno(), column()], :on_#{event}, tok] + end + End + end + end + + # [EXPERIMENTAL] + # Parses +src+ and return a string which was matched to +pattern+. + # +pattern+ should be described as Regexp. + # + # require 'ripper' + # + # p Ripper.slice('def m(a) nil end', 'ident') #=> "m" + # p Ripper.slice('def m(a) nil end', '[ident lparen rparen]+') #=> "m(a)" + # p Ripper.slice("< "string\n" + # + def Ripper.slice(src, pattern, n = 0) + if m = token_match(src, pattern) + then m.string(n) + else nil + end + end + + def Ripper.token_match(src, pattern) #:nodoc: + TokenPattern.compile(pattern).match(src) + end + + class TokenPattern #:nodoc: + + class Error < ::StandardError; end + class CompileError < Error; end + class MatchError < Error; end + + class << self + alias compile new + end + + def initialize(pattern) + @source = pattern + @re = compile(pattern) + end + + def match(str) + match_list(::Ripper.lex(str)) + end + + def match_list(tokens) + if m = @re.match(map_tokens(tokens)) + then MatchData.new(tokens, m) + else nil + end + end + + private + + def compile(pattern) + if m = /[^\w\s$()\[\]{}?*+\.]/.match(pattern) + raise CompileError, "invalid char in pattern: #{m[0].inspect}" + end + buf = '' + pattern.scan(/(?:\w+|\$\(|[()\[\]\{\}?*+\.]+)/) do |tok| + case tok + when /\w/ + buf.concat map_token(tok) + when '$(' + buf.concat '(' + when '(' + buf.concat '(?:' + when /[?*\[\])\.]/ + buf.concat tok + else + raise 'must not happen' + end + end + Regexp.compile(buf) + rescue RegexpError => err + raise CompileError, err.message + end + + def map_tokens(tokens) + tokens.map {|pos,type,str| map_token(type.to_s.sub(/\Aon_/,'')) }.join + end + + MAP = {} + seed = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a + SCANNER_EVENT_TABLE.each do |ev, | + raise CompileError, "[RIPPER FATAL] too many system token" if seed.empty? + MAP[ev.to_s.sub(/\Aon_/,'')] = seed.shift + end + + def map_token(tok) + MAP[tok] or raise CompileError, "unknown token: #{tok}" + end + + class MatchData + def initialize(tokens, match) + @tokens = tokens + @match = match + end + + def string(n = 0) + return nil unless @match + match(n).join + end + + private + + def match(n = 0) + return [] unless @match + @tokens[@match.begin(n)...@match.end(n)].map {|pos,type,str| str } + end + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/sexp.rb b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/sexp.rb new file mode 100644 index 0000000..572def9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/lib/ripper/sexp.rb @@ -0,0 +1,99 @@ +# +# $Id: sexp.rb 13465 2007-09-17 12:02:35Z aamine $ +# +# Copyright (c) 2004,2005 Minero Aoki +# +# This program is free software. +# You can distribute and/or modify this program under the Ruby License. +# For details of Ruby License, see ruby/COPYING. +# + +require 'ripper/core' + +class Ripper + + # [EXPERIMENTAL] + # Parses +src+ and create S-exp tree. + # This method is for mainly developper use. + # + # require 'ripper' + # require 'pp + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + def Ripper.sexp(src, filename = '-', lineno = 1) + SexpBuilderPP.new(src, filename, lineno).parse + end + + def Ripper.sexp_raw(src, filename = '-', lineno = 1) + SexpBuilder.new(src, filename, lineno).parse + end + + class SexpBuilderPP < ::Ripper #:nodoc: + private + + PARSER_EVENT_TABLE.each do |event, arity| + if /_new\z/ =~ event.to_s and arity == 0 + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event} + [] + end + End + elsif /_add\z/ =~ event.to_s + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event}(list, item) + list.push item + list + end + End + else + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event}(*args) + [:#{event}, *args] + end + End + end + end + + SCANNER_EVENTS.each do |event| + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event}(tok) + [:@#{event}, tok, [lineno(), column()]] + end + End + end + end + + class SexpBuilder < ::Ripper #:nodoc: + private + + PARSER_EVENTS.each do |event| + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event}(*args) + args.unshift :#{event} + args + end + End + end + + SCANNER_EVENTS.each do |event| + module_eval(<<-End, __FILE__, __LINE__ + 1) + def on_#{event}(tok) + [:@#{event}, tok, [lineno(), column()]] + end + End + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/ripper.c b/lib/ruby-1.9.1-rc1/ext/ripper/ripper.c new file mode 100644 index 0000000..398792e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/ripper.c @@ -0,0 +1,15624 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + keyword_class = 258, + keyword_module = 259, + keyword_def = 260, + keyword_undef = 261, + keyword_begin = 262, + keyword_rescue = 263, + keyword_ensure = 264, + keyword_end = 265, + keyword_if = 266, + keyword_unless = 267, + keyword_then = 268, + keyword_elsif = 269, + keyword_else = 270, + keyword_case = 271, + keyword_when = 272, + keyword_while = 273, + keyword_until = 274, + keyword_for = 275, + keyword_break = 276, + keyword_next = 277, + keyword_redo = 278, + keyword_retry = 279, + keyword_in = 280, + keyword_do = 281, + keyword_do_cond = 282, + keyword_do_block = 283, + keyword_do_LAMBDA = 284, + keyword_return = 285, + keyword_yield = 286, + keyword_super = 287, + keyword_self = 288, + keyword_nil = 289, + keyword_true = 290, + keyword_false = 291, + keyword_and = 292, + keyword_or = 293, + keyword_not = 294, + modifier_if = 295, + modifier_unless = 296, + modifier_while = 297, + modifier_until = 298, + modifier_rescue = 299, + keyword_alias = 300, + keyword_defined = 301, + keyword_BEGIN = 302, + keyword_END = 303, + keyword__LINE__ = 304, + keyword__FILE__ = 305, + keyword__ENCODING__ = 306, + tIDENTIFIER = 307, + tFID = 308, + tGVAR = 309, + tIVAR = 310, + tCONSTANT = 311, + tCVAR = 312, + tLABEL = 313, + tINTEGER = 314, + tFLOAT = 315, + tSTRING_CONTENT = 316, + tCHAR = 317, + tNTH_REF = 318, + tBACK_REF = 319, + tREGEXP_END = 320, + tUPLUS = 321, + tUMINUS = 322, + tPOW = 323, + tCMP = 324, + tEQ = 325, + tEQQ = 326, + tNEQ = 327, + tGEQ = 328, + tLEQ = 329, + tANDOP = 330, + tOROP = 331, + tMATCH = 332, + tNMATCH = 333, + tDOT2 = 334, + tDOT3 = 335, + tAREF = 336, + tASET = 337, + tLSHFT = 338, + tRSHFT = 339, + tCOLON2 = 340, + tCOLON3 = 341, + tOP_ASGN = 342, + tASSOC = 343, + tLPAREN = 344, + tLPAREN_ARG = 345, + tRPAREN = 346, + tLBRACK = 347, + tLBRACE = 348, + tLBRACE_ARG = 349, + tSTAR = 350, + tAMPER = 351, + tLAMBDA = 352, + tSYMBEG = 353, + tSTRING_BEG = 354, + tXSTRING_BEG = 355, + tREGEXP_BEG = 356, + tWORDS_BEG = 357, + tQWORDS_BEG = 358, + tSTRING_DBEG = 359, + tSTRING_DVAR = 360, + tSTRING_END = 361, + tLAMBEG = 362, + tLOWEST = 363, + tUMINUS_NUM = 364, + idNULL = 365, + idRespond_to = 366, + idIFUNC = 367, + idCFUNC = 368, + idThrowState = 369, + id_core_set_method_alias = 370, + id_core_set_variable_alias = 371, + id_core_undef_method = 372, + id_core_define_method = 373, + id_core_define_singleton_method = 374, + id_core_set_postexe = 375, + tLAST_TOKEN = 376 + }; +#endif +/* Tokens. */ +#define keyword_class 258 +#define keyword_module 259 +#define keyword_def 260 +#define keyword_undef 261 +#define keyword_begin 262 +#define keyword_rescue 263 +#define keyword_ensure 264 +#define keyword_end 265 +#define keyword_if 266 +#define keyword_unless 267 +#define keyword_then 268 +#define keyword_elsif 269 +#define keyword_else 270 +#define keyword_case 271 +#define keyword_when 272 +#define keyword_while 273 +#define keyword_until 274 +#define keyword_for 275 +#define keyword_break 276 +#define keyword_next 277 +#define keyword_redo 278 +#define keyword_retry 279 +#define keyword_in 280 +#define keyword_do 281 +#define keyword_do_cond 282 +#define keyword_do_block 283 +#define keyword_do_LAMBDA 284 +#define keyword_return 285 +#define keyword_yield 286 +#define keyword_super 287 +#define keyword_self 288 +#define keyword_nil 289 +#define keyword_true 290 +#define keyword_false 291 +#define keyword_and 292 +#define keyword_or 293 +#define keyword_not 294 +#define modifier_if 295 +#define modifier_unless 296 +#define modifier_while 297 +#define modifier_until 298 +#define modifier_rescue 299 +#define keyword_alias 300 +#define keyword_defined 301 +#define keyword_BEGIN 302 +#define keyword_END 303 +#define keyword__LINE__ 304 +#define keyword__FILE__ 305 +#define keyword__ENCODING__ 306 +#define tIDENTIFIER 307 +#define tFID 308 +#define tGVAR 309 +#define tIVAR 310 +#define tCONSTANT 311 +#define tCVAR 312 +#define tLABEL 313 +#define tINTEGER 314 +#define tFLOAT 315 +#define tSTRING_CONTENT 316 +#define tCHAR 317 +#define tNTH_REF 318 +#define tBACK_REF 319 +#define tREGEXP_END 320 +#define tUPLUS 321 +#define tUMINUS 322 +#define tPOW 323 +#define tCMP 324 +#define tEQ 325 +#define tEQQ 326 +#define tNEQ 327 +#define tGEQ 328 +#define tLEQ 329 +#define tANDOP 330 +#define tOROP 331 +#define tMATCH 332 +#define tNMATCH 333 +#define tDOT2 334 +#define tDOT3 335 +#define tAREF 336 +#define tASET 337 +#define tLSHFT 338 +#define tRSHFT 339 +#define tCOLON2 340 +#define tCOLON3 341 +#define tOP_ASGN 342 +#define tASSOC 343 +#define tLPAREN 344 +#define tLPAREN_ARG 345 +#define tRPAREN 346 +#define tLBRACK 347 +#define tLBRACE 348 +#define tLBRACE_ARG 349 +#define tSTAR 350 +#define tAMPER 351 +#define tLAMBDA 352 +#define tSYMBEG 353 +#define tSTRING_BEG 354 +#define tXSTRING_BEG 355 +#define tREGEXP_BEG 356 +#define tWORDS_BEG 357 +#define tQWORDS_BEG 358 +#define tSTRING_DBEG 359 +#define tSTRING_DVAR 360 +#define tSTRING_END 361 +#define tLAMBEG 362 +#define tLOWEST 363 +#define tUMINUS_NUM 364 +#define idNULL 365 +#define idRespond_to 366 +#define idIFUNC 367 +#define idCFUNC 368 +#define idThrowState 369 +#define id_core_set_method_alias 370 +#define id_core_set_variable_alias 371 +#define id_core_undef_method 372 +#define id_core_define_method 373 +#define id_core_define_singleton_method 374 +#define id_core_set_postexe 375 +#define tLAST_TOKEN 376 + + + + +/* Copy the first part of user declarations. */ +#line 12 "ripper.y" + + +#define YYDEBUG 1 +#define YYERROR_VERBOSE 1 +#define YYSTACK_USE_ALLOCA 0 + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/encoding.h" +#include "node.h" +#include "parse.h" +#include "id.h" +#include "regenc.h" +#include +#include +#include + +#define YYMALLOC(size) rb_parser_malloc(parser, size) +#define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) +#define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) +#define YYFREE(ptr) rb_parser_free(parser, ptr) +#define malloc YYMALLOC +#define realloc YYREALLOC +#define calloc YYCALLOC +#define free YYFREE + +#ifndef RIPPER +static ID register_symid(ID, const char *, long, rb_encoding *); +#define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) +#include "id.c" +#endif + +#define is_notop_id(id) ((id)>tLAST_TOKEN) +#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) +#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) +#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) +#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) +#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) +#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) +#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) + +#define is_asgn_or_id(id) ((is_notop_id(id)) && \ + (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ + ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ + ((id)&ID_SCOPE_MASK) == ID_CLASS)) + +enum lex_state_e { + EXPR_BEG, /* ignore newline, +/- is a sign. */ + EXPR_END, /* newline significant, +/- is an operator. */ + EXPR_ENDARG, /* ditto, and unbound braces. */ + EXPR_ARG, /* newline significant, +/- is an operator. */ + EXPR_CMDARG, /* newline significant, +/- is an operator. */ + EXPR_MID, /* newline significant, +/- is an operator. */ + EXPR_FNAME, /* ignore newline, no reserved words. */ + EXPR_DOT, /* right after `.' or `::', no reserved words. */ + EXPR_CLASS, /* immediate after `class', no here document. */ + EXPR_VALUE /* alike EXPR_BEG but label is disallowed. */ +}; + +# ifdef HAVE_LONG_LONG +typedef unsigned LONG_LONG stack_type; +# else +typedef unsigned long stack_type; +# endif + +# define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) +# define BITSTACK_POP(stack) (stack = stack >> 1) +# define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) +# define BITSTACK_SET_P(stack) (stack&1) + +#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) +#define COND_POP() BITSTACK_POP(cond_stack) +#define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) +#define COND_P() BITSTACK_SET_P(cond_stack) + +#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) +#define CMDARG_POP() BITSTACK_POP(cmdarg_stack) +#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) +#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) + +struct vtable { + ID *tbl; + int pos; + int capa; + struct vtable *prev; +}; + +struct local_vars { + struct vtable *args; + struct vtable *vars; + struct local_vars *prev; +}; + +#define DVARS_INHERIT ((void*)1) +#define DVARS_TOPSCOPE NULL +#define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) +#define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) + +#ifndef RIPPER +static int +vtable_size(const struct vtable *tbl) +{ + if (POINTER_P(tbl)) { + return tbl->pos; + } + else { + return 0; + } +} + +#define VTBL_DEBUG 0 + +static struct vtable * +vtable_alloc(struct vtable *prev) +{ + struct vtable *tbl = ALLOC(struct vtable); + tbl->pos = 0; + tbl->capa = 8; + tbl->tbl = ALLOC_N(ID, tbl->capa); + tbl->prev = prev; + if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); + return tbl; +} + +static void +vtable_free(struct vtable *tbl) +{ + if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); + if (POINTER_P(tbl)) { + if (tbl->tbl) { + xfree(tbl->tbl); + } + xfree(tbl); + } +} + +static void +vtable_add(struct vtable *tbl, ID id) +{ + if (!POINTER_P(tbl)) { + rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); + } + if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); + + if (tbl->pos == tbl->capa) { + tbl->capa = tbl->capa * 2; + REALLOC_N(tbl->tbl, ID, tbl->capa); + } + tbl->tbl[tbl->pos++] = id; +} + +static int +vtable_included(const struct vtable * tbl, ID id) +{ + int i; + + if (POINTER_P(tbl)) { + for (i = 0; i < tbl->pos; i++) { + if (tbl->tbl[i] == id) { + return 1; + } + } + } + return 0; +} + + +typedef struct token_info { + const char *token; + int linenum; + int column; + int nonspc; + struct token_info *next; +} token_info; +#endif + +/* + Structure of Lexer Buffer: + + lex_pbeg tokp lex_p lex_pend + | | | | + |-----------+--------------+------------| + |<------------>| + token +*/ +struct parser_params { + int is_ripper; + NODE *heap; + + YYSTYPE *parser_yylval; + VALUE eofp; + + NODE *parser_lex_strterm; + enum lex_state_e parser_lex_state; + stack_type parser_cond_stack; + stack_type parser_cmdarg_stack; + int parser_class_nest; + int parser_paren_nest; + int parser_lpar_beg; + int parser_in_single; + int parser_in_def; + int parser_compile_for_eval; + VALUE parser_cur_mid; + int parser_in_defined; + char *parser_tokenbuf; + int parser_tokidx; + int parser_toksiz; + VALUE parser_lex_input; + VALUE parser_lex_lastline; + VALUE parser_lex_nextline; + const char *parser_lex_pbeg; + const char *parser_lex_p; + const char *parser_lex_pend; + int parser_heredoc_end; + int parser_command_start; + NODE *parser_deferred_nodes; + int parser_lex_gets_ptr; + VALUE (*parser_lex_gets)(struct parser_params*,VALUE); + struct local_vars *parser_lvtbl; + int parser_ruby__end__seen; + int line_count; + int has_shebang; + char *parser_ruby_sourcefile; /* current source file */ + int parser_ruby_sourceline; /* current line no. */ + rb_encoding *enc; + rb_encoding *utf8; + + int parser_yydebug; + +#ifndef RIPPER + /* Ruby core only */ + NODE *parser_eval_tree_begin; + NODE *parser_eval_tree; + VALUE debug_lines; + VALUE coverage; + int nerr; + + token_info *parser_token_info; +#else + /* Ripper only */ + VALUE parser_ruby_sourcefile_string; + const char *tokp; + VALUE delayed; + int delayed_line; + int delayed_col; + + VALUE value; + VALUE result; + VALUE parsing_thread; + int toplevel_p; +#endif +}; + +#define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ + (parser->utf8 = rb_utf8_encoding())) +#define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) +#define STR_NEW0() rb_enc_str_new(0,0,parser->enc) +#define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) +#define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) +#define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) +#define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) + +#ifdef YYMALLOC +void *rb_parser_malloc(struct parser_params *, size_t); +void *rb_parser_realloc(struct parser_params *, void *, size_t); +void *rb_parser_calloc(struct parser_params *, size_t, size_t); +void rb_parser_free(struct parser_params *, void *); +#endif + +static int parser_yyerror(struct parser_params*, const char*); +#define yyerror(msg) parser_yyerror(parser, msg) + +#define YYLEX_PARAM parser + +#define lex_strterm (parser->parser_lex_strterm) +#define lex_state (parser->parser_lex_state) +#define cond_stack (parser->parser_cond_stack) +#define cmdarg_stack (parser->parser_cmdarg_stack) +#define class_nest (parser->parser_class_nest) +#define paren_nest (parser->parser_paren_nest) +#define lpar_beg (parser->parser_lpar_beg) +#define in_single (parser->parser_in_single) +#define in_def (parser->parser_in_def) +#define compile_for_eval (parser->parser_compile_for_eval) +#define cur_mid (parser->parser_cur_mid) +#define in_defined (parser->parser_in_defined) +#define tokenbuf (parser->parser_tokenbuf) +#define tokidx (parser->parser_tokidx) +#define toksiz (parser->parser_toksiz) +#define lex_input (parser->parser_lex_input) +#define lex_lastline (parser->parser_lex_lastline) +#define lex_nextline (parser->parser_lex_nextline) +#define lex_pbeg (parser->parser_lex_pbeg) +#define lex_p (parser->parser_lex_p) +#define lex_pend (parser->parser_lex_pend) +#define heredoc_end (parser->parser_heredoc_end) +#define command_start (parser->parser_command_start) +#define deferred_nodes (parser->parser_deferred_nodes) +#define lex_gets_ptr (parser->parser_lex_gets_ptr) +#define lex_gets (parser->parser_lex_gets) +#define lvtbl (parser->parser_lvtbl) +#define ruby__end__seen (parser->parser_ruby__end__seen) +#define ruby_sourceline (parser->parser_ruby_sourceline) +#define ruby_sourcefile (parser->parser_ruby_sourcefile) +#define yydebug (parser->parser_yydebug) +#ifdef RIPPER +#else +#define ruby_eval_tree (parser->parser_eval_tree) +#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) +#define ruby_debug_lines (parser->debug_lines) +#define ruby_coverage (parser->coverage) +#endif + +static int yylex(void*, void*); + +#ifndef RIPPER +#define yyparse ruby_yyparse + +static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); +#define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) + +static NODE *cond_gen(struct parser_params*,NODE*); +#define cond(node) cond_gen(parser, node) +static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); +#define logop(type,node1,node2) logop_gen(parser, type, node1, node2) + +static NODE *newline_node(NODE*); +static void fixpos(NODE*,NODE*); + +static int value_expr_gen(struct parser_params*,NODE*); +static void void_expr_gen(struct parser_params*,NODE*); +static NODE *remove_begin(NODE*); +#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) +#define void_expr0(node) void_expr_gen(parser, (node)) +#define void_expr(node) void_expr0((node) = remove_begin(node)) +static void void_stmts_gen(struct parser_params*,NODE*); +#define void_stmts(node) void_stmts_gen(parser, node) +static void reduce_nodes_gen(struct parser_params*,NODE**); +#define reduce_nodes(n) reduce_nodes_gen(parser,n) +static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); +#define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2) + +static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); +#define block_append(h,t) block_append_gen(parser,h,t) +static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); +#define list_append(l,i) list_append_gen(parser,l,i) +static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); +#define list_concat(h,t) list_concat_gen(parser,h,t) +static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); +#define arg_append(h,t) arg_append_gen(parser,h,t) +static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); +#define arg_concat(h,t) arg_concat_gen(parser,h,t) +static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); +#define literal_concat(h,t) literal_concat_gen(parser,h,t) +static NODE *new_evstr_gen(struct parser_params*,NODE*); +#define new_evstr(n) new_evstr_gen(parser,n) +static NODE *evstr2dstr_gen(struct parser_params*,NODE*); +#define evstr2dstr(n) evstr2dstr_gen(parser,n) +static NODE *splat_array(NODE*); + +static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); +#define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1) +static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); +#define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id) + +static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); +#define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b) +static void shadowing_lvar_gen(struct parser_params*,ID); +#define shadowing_lvar(name) shadowing_lvar_gen(parser, name) + +static NODE *negate_lit(NODE*); +static NODE *ret_args_gen(struct parser_params*,NODE*); +#define ret_args(node) ret_args_gen(parser, node) +static NODE *arg_blk_pass(NODE*,NODE*); +static NODE *new_yield_gen(struct parser_params*,NODE*); +#define new_yield(node) new_yield_gen(parser, node) + +static NODE *gettable_gen(struct parser_params*,ID); +#define gettable(id) gettable_gen(parser,id) +static NODE *assignable_gen(struct parser_params*,ID,NODE*); +#define assignable(id,node) assignable_gen(parser, id, node) +static void new_bv_gen(struct parser_params*,ID); +#define new_bv(id) new_bv_gen(parser, id) +static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); +#define aryset(node1,node2) aryset_gen(parser, node1, node2) +static NODE *attrset_gen(struct parser_params*,NODE*,ID); +#define attrset(node,id) attrset_gen(parser, node, id) + +static void rb_backref_error_gen(struct parser_params*,NODE*); +#define rb_backref_error(n) rb_backref_error_gen(parser,n) +static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); +#define node_assign(node1, node2) node_assign_gen(parser, node1, node2) + +static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); +#define match_op(node1,node2) match_op_gen(parser, node1, node2) + +static void local_push_gen(struct parser_params*,int); +#define local_push(top) local_push_gen(parser,top) +static void local_pop_gen(struct parser_params*); +#define local_pop() local_pop_gen(parser) +static int local_var_gen(struct parser_params*, ID); +#define local_var(id) local_var_gen(parser, id); +static int arg_var_gen(struct parser_params*, ID); +#define arg_var(id) arg_var_gen(parser, id) +static int local_id_gen(struct parser_params*, ID); +#define local_id(id) local_id_gen(parser, id) +static ID *local_tbl_gen(struct parser_params*); +#define local_tbl() local_tbl_gen(parser) +static ID internal_id_gen(struct parser_params*); +#define internal_id() internal_id_gen(parser) + +static void dyna_push_gen(struct parser_params*); +#define dyna_push() dyna_push_gen(parser) +static void dyna_pop_gen(struct parser_params*); +#define dyna_pop() dyna_pop_gen(parser) +static int dyna_in_block_gen(struct parser_params*); +#define dyna_in_block() dyna_in_block_gen(parser) +#define dyna_var(id) local_var(id) +static int dvar_defined_gen(struct parser_params*,ID); +#define dvar_defined(id) dvar_defined_gen(parser, id) +static int dvar_curr_gen(struct parser_params*,ID); +#define dvar_curr(id) dvar_curr_gen(parser, id) + +static void fixup_nodes(NODE **); + +extern int rb_dvar_defined(ID); +extern int rb_local_defined(ID); +extern int rb_parse_in_eval(void); + +static VALUE reg_compile_gen(struct parser_params*, VALUE, int); +#define reg_compile(str,options) reg_compile_gen(parser, str, options) +static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); +#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options) +static void reg_fragment_check_gen(struct parser_params*, VALUE, int); +#define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options) +static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); +#define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match) +int rb_enc_symname2_p(const char *, int, rb_encoding *); +#else +#define remove_begin(node) (node) +#endif /* !RIPPER */ +static int lvar_defined_gen(struct parser_params*, ID); +#define lvar_defined(id) lvar_defined_gen(parser, id) + +#define RE_OPTION_ONCE (1<<16) +#define RE_OPTION_ENCODING_SHIFT 8 +#define RE_OPTION_ENCODING(e) (((e)&0xff)<>RE_OPTION_ENCODING_SHIFT)&0xff) +#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) +#define RE_OPTION_MASK 0xff +#define RE_OPTION_ARG_ENCODING_NONE 32 + +#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ +#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ +#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) +#define nd_func u1.id +#if SIZEOF_SHORT == 2 +#define nd_term(node) ((signed short)(node)->u2.id) +#else +#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) +#endif +#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) +#define nd_nest u3.cnt + +/****** Ripper *******/ + +#ifdef RIPPER +#define RIPPER_VERSION "0.1.0" + +#include "eventids1.c" +#include "eventids2.c" +static ID ripper_id_gets; + +static VALUE ripper_dispatch0(struct parser_params*,ID); +static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); +static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); +static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); + +#define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) +#define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a) +#define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b) +#define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c) +#define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d) +#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e) + +#define yyparse ripper_yyparse + +static VALUE ripper_intern(const char*); +static VALUE ripper_id2sym(ID); +#ifdef __GNUC__ +#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ + ID2SYM(id) : ripper_id2sym(id)) +#endif + +#define arg_new() dispatch0(args_new) +#define arg_add(l,a) dispatch2(args_add, l, a) +#define arg_prepend(l,a) dispatch2(args_prepend, l, a) +#define arg_add_star(l,a) dispatch2(args_add_star, l, a) +#define arg_add_block(l,b) dispatch2(args_add_block, l, b) +#define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b)) +#define bare_assoc(v) dispatch1(bare_assoc_hash, v) +#define arg_add_assocs(l,b) arg_add(l, bare_assoc(b)) + +#define args2mrhs(a) dispatch1(mrhs_new_from_args, a) +#define mrhs_new() dispatch0(mrhs_new) +#define mrhs_add(l,a) dispatch2(mrhs_add, l, a) +#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a) + +#define mlhs_new() dispatch0(mlhs_new) +#define mlhs_add(l,a) dispatch2(mlhs_add, l, a) +#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a) + +#define params_new(pars, opts, rest, pars2, blk) \ + dispatch5(params, pars, opts, rest, pars2, blk) + +#define blockvar_new(p,v) dispatch2(block_var, p, v) +#define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a) +#define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a) + +#define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a)) +#define method_arg(m,a) dispatch2(method_add_arg,m,a) +#define method_add_block(m,b) dispatch2(method_add_block, m, b) + +#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) + +#define FIXME 0 + +#endif /* RIPPER */ + +#ifndef RIPPER +# define ifndef_ripper(x) x +#else +# define ifndef_ripper(x) +#endif + +#ifndef RIPPER +# define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) +#else +# define rb_warn0(fmt) ripper_warn0(parser, fmt) +# define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a) +# define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a) +# define rb_warning0(fmt) ripper_warning0(parser, fmt) +# define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a) +static void ripper_warn0(struct parser_params*, const char*); +static void ripper_warnI(struct parser_params*, const char*, int); +#if 0 +static void ripper_warnS(struct parser_params*, const char*, const char*); +#endif +static void ripper_warning0(struct parser_params*, const char*); +static void ripper_warningS(struct parser_params*, const char*, const char*); +#endif + +#ifdef RIPPER +static void ripper_compile_error(struct parser_params*, const char *fmt, ...); +# define rb_compile_error ripper_compile_error +# define compile_error ripper_compile_error +# define PARSER_ARG parser, +#else +# define compile_error parser->nerr++,rb_compile_error +# define PARSER_ARG ruby_sourcefile, ruby_sourceline, +#endif + +/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, + for instance). This is too low for Ruby to parse some files, such as + date/format.rb, therefore bump the value up to at least Bison's default. */ +#ifdef OLD_YACC +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif +#endif + +#ifndef RIPPER +static void token_info_push(struct parser_params*, const char *token); +static void token_info_pop(struct parser_params*, const char *token); +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 598 "ripper.y" +{ + VALUE val; + NODE *node; + ID id; + int num; +} +/* Line 187 of yacc.c. */ +#line 928 "parse.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 941 "parse.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 3 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 10225 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 149 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 166 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 554 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 961 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 376 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 148, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 147, 123, 2, 2, 2, 121, 116, 2, + 143, 144, 119, 117, 141, 118, 140, 120, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 111, 146, + 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 139, 2, 145, 115, 2, 142, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 137, 114, 138, 124, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 4, 7, 12, 15, 17, 19, 23, + 26, 27, 32, 36, 40, 44, 47, 51, 55, 59, + 63, 67, 68, 74, 79, 83, 87, 91, 98, 104, + 110, 116, 120, 124, 128, 132, 134, 136, 140, 144, + 148, 151, 153, 155, 157, 159, 162, 165, 168, 170, + 175, 180, 181, 187, 190, 194, 199, 205, 210, 216, + 219, 222, 224, 228, 230, 234, 236, 239, 243, 249, + 252, 257, 260, 265, 267, 271, 273, 277, 280, 284, + 286, 290, 292, 297, 301, 305, 309, 313, 316, 318, + 320, 325, 329, 333, 337, 341, 344, 346, 348, 350, + 353, 355, 359, 361, 363, 365, 367, 369, 371, 373, + 375, 377, 379, 380, 385, 387, 389, 391, 393, 395, + 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, + 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, + 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, + 457, 459, 461, 463, 465, 467, 469, 471, 473, 475, + 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, + 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519, 521, 523, 525, 529, 535, 539, 545, 552, + 558, 564, 570, 576, 581, 585, 589, 593, 597, 601, + 605, 609, 613, 617, 622, 627, 630, 633, 637, 641, + 645, 649, 653, 657, 661, 665, 669, 673, 677, 681, + 685, 688, 691, 695, 699, 703, 707, 708, 713, 720, + 722, 724, 726, 729, 734, 737, 741, 743, 745, 747, + 749, 751, 754, 757, 762, 764, 765, 768, 771, 774, + 776, 778, 780, 783, 787, 792, 796, 801, 804, 806, + 808, 810, 812, 814, 816, 818, 820, 822, 823, 828, + 829, 834, 838, 842, 845, 849, 853, 855, 860, 864, + 866, 867, 874, 879, 883, 886, 888, 891, 894, 901, + 908, 909, 910, 918, 919, 920, 928, 934, 939, 940, + 941, 951, 952, 959, 960, 961, 970, 971, 977, 978, + 985, 986, 987, 997, 999, 1001, 1003, 1005, 1007, 1009, + 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, + 1031, 1033, 1036, 1038, 1040, 1042, 1048, 1050, 1053, 1055, + 1057, 1059, 1063, 1065, 1069, 1071, 1076, 1083, 1087, 1093, + 1096, 1101, 1103, 1107, 1114, 1123, 1128, 1135, 1140, 1143, + 1150, 1153, 1158, 1165, 1168, 1173, 1176, 1181, 1183, 1185, + 1187, 1191, 1193, 1198, 1200, 1203, 1205, 1209, 1211, 1213, + 1214, 1218, 1223, 1225, 1229, 1233, 1234, 1240, 1243, 1248, + 1253, 1256, 1261, 1266, 1270, 1274, 1278, 1281, 1283, 1288, + 1289, 1295, 1296, 1302, 1308, 1310, 1312, 1319, 1321, 1323, + 1325, 1327, 1330, 1332, 1335, 1337, 1339, 1341, 1343, 1345, + 1347, 1349, 1352, 1356, 1360, 1364, 1368, 1372, 1373, 1377, + 1379, 1382, 1386, 1390, 1391, 1395, 1396, 1399, 1400, 1403, + 1405, 1406, 1410, 1411, 1416, 1418, 1420, 1422, 1424, 1427, + 1429, 1431, 1433, 1435, 1439, 1441, 1443, 1446, 1449, 1451, + 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471, + 1473, 1475, 1477, 1479, 1481, 1483, 1484, 1489, 1492, 1496, + 1499, 1506, 1515, 1520, 1527, 1532, 1539, 1542, 1547, 1554, + 1557, 1562, 1565, 1570, 1572, 1573, 1575, 1577, 1579, 1581, + 1583, 1585, 1587, 1591, 1593, 1597, 1601, 1605, 1607, 1611, + 1613, 1617, 1619, 1621, 1624, 1626, 1628, 1630, 1633, 1636, + 1638, 1640, 1641, 1646, 1648, 1651, 1653, 1657, 1661, 1664, + 1666, 1668, 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, + 1686, 1688, 1689, 1691, 1692, 1694, 1697, 1700, 1701, 1703, + 1705, 1707, 1709, 1711, 1714 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 150, 0, -1, -1, 151, 153, -1, 153, 252, 228, + 255, -1, 154, 307, -1, 314, -1, 155, -1, 154, + 313, 155, -1, 1, 155, -1, -1, 45, 177, 156, + 177, -1, 45, 54, 54, -1, 45, 54, 64, -1, + 45, 54, 63, -1, 6, 178, -1, 155, 40, 159, + -1, 155, 41, 159, -1, 155, 42, 159, -1, 155, + 43, 159, -1, 155, 44, 155, -1, -1, 47, 157, + 137, 153, 138, -1, 48, 137, 153, 138, -1, 172, + 109, 160, -1, 165, 109, 160, -1, 279, 87, 160, + -1, 213, 139, 188, 310, 87, 160, -1, 213, 140, + 52, 87, 160, -1, 213, 140, 56, 87, 160, -1, + 213, 85, 52, 87, 160, -1, 280, 87, 160, -1, + 172, 109, 195, -1, 165, 109, 184, -1, 165, 109, + 195, -1, 158, -1, 160, -1, 158, 37, 158, -1, + 158, 38, 158, -1, 39, 308, 158, -1, 123, 160, + -1, 182, -1, 158, -1, 164, -1, 161, -1, 30, + 189, -1, 21, 189, -1, 22, 189, -1, 245, -1, + 245, 140, 304, 190, -1, 245, 85, 304, 190, -1, + -1, 94, 163, 234, 153, 138, -1, 303, 190, -1, + 303, 190, 162, -1, 213, 140, 304, 190, -1, 213, + 140, 304, 190, 162, -1, 213, 85, 304, 190, -1, + 213, 85, 304, 190, 162, -1, 32, 190, -1, 31, + 190, -1, 167, -1, 89, 166, 309, -1, 167, -1, + 89, 166, 309, -1, 169, -1, 169, 168, -1, 169, + 95, 171, -1, 169, 95, 171, 141, 170, -1, 169, + 95, -1, 169, 95, 141, 170, -1, 95, 171, -1, + 95, 171, 141, 170, -1, 95, -1, 95, 141, 170, + -1, 171, -1, 89, 166, 309, -1, 168, 141, -1, + 169, 168, 141, -1, 168, -1, 170, 141, 168, -1, + 277, -1, 213, 139, 188, 310, -1, 213, 140, 52, + -1, 213, 85, 52, -1, 213, 140, 56, -1, 213, + 85, 56, -1, 86, 56, -1, 280, -1, 277, -1, + 213, 139, 188, 310, -1, 213, 140, 52, -1, 213, + 85, 52, -1, 213, 140, 56, -1, 213, 85, 56, + -1, 86, 56, -1, 280, -1, 52, -1, 56, -1, + 86, 173, -1, 173, -1, 213, 85, 173, -1, 52, + -1, 56, -1, 53, -1, 180, -1, 181, -1, 175, + -1, 273, -1, 176, -1, 275, -1, 177, -1, -1, + 178, 141, 179, 177, -1, 114, -1, 115, -1, 116, + -1, 69, -1, 70, -1, 71, -1, 77, -1, 78, + -1, 112, -1, 73, -1, 113, -1, 74, -1, 72, + -1, 83, -1, 84, -1, 117, -1, 118, -1, 119, + -1, 95, -1, 120, -1, 121, -1, 68, -1, 123, + -1, 124, -1, 66, -1, 67, -1, 81, -1, 82, + -1, 142, -1, 49, -1, 50, -1, 51, -1, 47, + -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, + -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, + -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, + -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, + -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, + -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, + -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, + -1, 18, -1, 19, -1, 172, 109, 182, -1, 172, + 109, 182, 44, 182, -1, 279, 87, 182, -1, 279, + 87, 182, 44, 182, -1, 213, 139, 188, 310, 87, + 182, -1, 213, 140, 52, 87, 182, -1, 213, 140, + 56, 87, 182, -1, 213, 85, 52, 87, 182, -1, + 213, 85, 56, 87, 182, -1, 86, 56, 87, 182, + -1, 280, 87, 182, -1, 182, 79, 182, -1, 182, + 80, 182, -1, 182, 117, 182, -1, 182, 118, 182, + -1, 182, 119, 182, -1, 182, 120, 182, -1, 182, + 121, 182, -1, 182, 68, 182, -1, 122, 59, 68, + 182, -1, 122, 60, 68, 182, -1, 66, 182, -1, + 67, 182, -1, 182, 114, 182, -1, 182, 115, 182, + -1, 182, 116, 182, -1, 182, 69, 182, -1, 182, + 112, 182, -1, 182, 73, 182, -1, 182, 113, 182, + -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, + 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, + -1, 182, 78, 182, -1, 123, 182, -1, 124, 182, + -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, + 75, 182, -1, 182, 76, 182, -1, -1, 46, 308, + 183, 182, -1, 182, 110, 182, 308, 111, 182, -1, + 196, -1, 182, -1, 314, -1, 194, 311, -1, 194, + 141, 301, 311, -1, 301, 311, -1, 143, 188, 309, + -1, 314, -1, 186, -1, 314, -1, 189, -1, 164, + -1, 194, 193, -1, 301, 193, -1, 194, 141, 301, + 193, -1, 192, -1, -1, 191, 189, -1, 96, 184, + -1, 141, 192, -1, 141, -1, 314, -1, 184, -1, + 95, 184, -1, 194, 141, 184, -1, 194, 141, 95, + 184, -1, 194, 141, 184, -1, 194, 141, 95, 184, + -1, 95, 184, -1, 256, -1, 257, -1, 260, -1, + 261, -1, 262, -1, 265, -1, 278, -1, 280, -1, + 53, -1, -1, 214, 197, 152, 224, -1, -1, 90, + 158, 198, 309, -1, 89, 153, 144, -1, 213, 85, + 56, -1, 86, 56, -1, 92, 185, 145, -1, 93, + 300, 138, -1, 30, -1, 31, 143, 189, 309, -1, + 31, 143, 309, -1, 31, -1, -1, 46, 308, 143, + 199, 158, 309, -1, 39, 143, 158, 309, -1, 39, + 143, 309, -1, 303, 247, -1, 246, -1, 246, 247, + -1, 97, 239, -1, 215, 159, 225, 153, 227, 224, + -1, 216, 159, 225, 153, 228, 224, -1, -1, -1, + 217, 200, 159, 226, 201, 153, 224, -1, -1, -1, + 218, 202, 159, 226, 203, 153, 224, -1, 219, 159, + 307, 250, 224, -1, 219, 307, 250, 224, -1, -1, + -1, 220, 229, 25, 204, 159, 226, 205, 153, 224, + -1, -1, 221, 174, 281, 206, 152, 224, -1, -1, + -1, 221, 83, 158, 207, 312, 208, 152, 224, -1, + -1, 222, 174, 209, 152, 224, -1, -1, 223, 175, + 210, 283, 152, 224, -1, -1, -1, 223, 298, 306, + 211, 175, 212, 283, 152, 224, -1, 21, -1, 22, + -1, 23, -1, 24, -1, 196, -1, 7, -1, 11, + -1, 12, -1, 18, -1, 19, -1, 16, -1, 20, + -1, 3, -1, 4, -1, 5, -1, 10, -1, 312, + -1, 13, -1, 312, 13, -1, 312, -1, 27, -1, + 228, -1, 14, 159, 225, 153, 227, -1, 314, -1, + 15, 153, -1, 172, -1, 165, -1, 286, -1, 89, + 232, 309, -1, 230, -1, 231, 141, 230, -1, 231, + -1, 231, 141, 95, 286, -1, 231, 141, 95, 286, + 141, 231, -1, 231, 141, 95, -1, 231, 141, 95, + 141, 231, -1, 95, 286, -1, 95, 286, 141, 231, + -1, 95, -1, 95, 141, 231, -1, 288, 141, 291, + 141, 294, 297, -1, 288, 141, 291, 141, 294, 141, + 288, 297, -1, 288, 141, 291, 297, -1, 288, 141, + 291, 141, 288, 297, -1, 288, 141, 294, 297, -1, + 288, 141, -1, 288, 141, 294, 141, 288, 297, -1, + 288, 297, -1, 291, 141, 294, 297, -1, 291, 141, + 294, 141, 288, 297, -1, 291, 297, -1, 291, 141, + 288, 297, -1, 294, 297, -1, 294, 141, 288, 297, + -1, 296, -1, 314, -1, 235, -1, 114, 236, 114, + -1, 76, -1, 114, 233, 236, 114, -1, 314, -1, + 146, 237, -1, 238, -1, 237, 141, 238, -1, 52, + -1, 285, -1, -1, 240, 241, 242, -1, 143, 284, + 236, 309, -1, 284, -1, 107, 153, 138, -1, 29, + 153, 10, -1, -1, 28, 244, 234, 153, 10, -1, + 164, 243, -1, 245, 140, 304, 187, -1, 245, 85, + 304, 187, -1, 303, 186, -1, 213, 140, 304, 187, + -1, 213, 85, 304, 186, -1, 213, 85, 305, -1, + 213, 140, 186, -1, 213, 85, 186, -1, 32, 186, + -1, 32, -1, 213, 139, 188, 310, -1, -1, 137, + 248, 234, 153, 138, -1, -1, 26, 249, 234, 153, + 10, -1, 17, 194, 225, 153, 251, -1, 228, -1, + 250, -1, 8, 253, 254, 225, 153, 252, -1, 314, + -1, 184, -1, 195, -1, 314, -1, 88, 172, -1, + 314, -1, 9, 153, -1, 314, -1, 276, -1, 273, + -1, 275, -1, 258, -1, 62, -1, 259, -1, 258, + 259, -1, 99, 267, 106, -1, 100, 268, 106, -1, + 101, 268, 65, -1, 102, 147, 106, -1, 102, 263, + 106, -1, -1, 263, 264, 147, -1, 269, -1, 264, + 269, -1, 103, 147, 106, -1, 103, 266, 106, -1, + -1, 266, 61, 147, -1, -1, 267, 269, -1, -1, + 268, 269, -1, 61, -1, -1, 105, 270, 272, -1, + -1, 104, 271, 153, 138, -1, 54, -1, 55, -1, + 57, -1, 280, -1, 98, 274, -1, 175, -1, 55, + -1, 54, -1, 57, -1, 98, 268, 106, -1, 59, + -1, 60, -1, 122, 59, -1, 122, 60, -1, 52, + -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, + -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, + -1, 51, -1, 277, -1, 277, -1, 63, -1, 64, + -1, 312, -1, -1, 113, 282, 159, 312, -1, 1, + 312, -1, 143, 284, 309, -1, 284, 312, -1, 288, + 141, 292, 141, 294, 297, -1, 288, 141, 292, 141, + 294, 141, 288, 297, -1, 288, 141, 292, 297, -1, + 288, 141, 292, 141, 288, 297, -1, 288, 141, 294, + 297, -1, 288, 141, 294, 141, 288, 297, -1, 288, + 297, -1, 292, 141, 294, 297, -1, 292, 141, 294, + 141, 288, 297, -1, 292, 297, -1, 292, 141, 288, + 297, -1, 294, 297, -1, 294, 141, 288, 297, -1, + 296, -1, -1, 56, -1, 55, -1, 54, -1, 57, + -1, 285, -1, 52, -1, 286, -1, 89, 232, 309, + -1, 287, -1, 288, 141, 287, -1, 52, 109, 184, + -1, 52, 109, 213, -1, 290, -1, 291, 141, 290, + -1, 289, -1, 292, 141, 289, -1, 119, -1, 95, + -1, 293, 52, -1, 293, -1, 116, -1, 96, -1, + 295, 52, -1, 141, 296, -1, 314, -1, 278, -1, + -1, 143, 299, 158, 309, -1, 314, -1, 301, 311, + -1, 302, -1, 301, 141, 302, -1, 184, 88, 184, + -1, 58, 184, -1, 52, -1, 56, -1, 53, -1, + 52, -1, 56, -1, 53, -1, 180, -1, 52, -1, + 53, -1, 180, -1, 140, -1, 85, -1, -1, 313, + -1, -1, 148, -1, 308, 144, -1, 308, 145, -1, + -1, 148, -1, 141, -1, 146, -1, 148, -1, 312, + -1, 313, 146, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 763, 763, 763, 793, 826, 837, 846, 854, 862, + 868, 868, 876, 884, 895, 905, 913, 922, 931, 944, + 957, 967, 966, 988, 1000, 1009, 1019, 1048, 1069, 1086, + 1103, 1120, 1130, 1139, 1148, 1157, 1160, 1161, 1169, 1177, + 1185, 1193, 1196, 1208, 1209, 1210, 1218, 1226, 1236, 1237, + 1246, 1258, 1257, 1279, 1288, 1300, 1309, 1321, 1330, 1342, + 1351, 1362, 1363, 1373, 1374, 1384, 1392, 1400, 1408, 1416, + 1424, 1432, 1440, 1448, 1456, 1466, 1467, 1477, 1485, 1495, + 1503, 1513, 1521, 1529, 1537, 1545, 1553, 1565, 1575, 1587, + 1595, 1603, 1611, 1619, 1627, 1640, 1653, 1664, 1672, 1675, + 1683, 1691, 1701, 1702, 1703, 1704, 1714, 1726, 1727, 1730, + 1738, 1741, 1749, 1749, 1759, 1760, 1761, 1762, 1763, 1764, + 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, + 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, + 1785, 1786, 1787, 1790, 1790, 1790, 1791, 1791, 1792, 1792, + 1792, 1793, 1793, 1793, 1793, 1794, 1794, 1794, 1794, 1795, + 1795, 1795, 1796, 1796, 1796, 1796, 1797, 1797, 1797, 1797, + 1798, 1798, 1798, 1798, 1799, 1799, 1799, 1799, 1800, 1800, + 1800, 1800, 1801, 1801, 1804, 1813, 1823, 1852, 1883, 1904, + 1921, 1938, 1955, 1966, 1977, 1988, 2002, 2016, 2024, 2032, + 2040, 2048, 2056, 2064, 2073, 2082, 2090, 2098, 2106, 2114, + 2122, 2130, 2138, 2146, 2154, 2162, 2170, 2178, 2186, 2197, + 2205, 2213, 2221, 2229, 2237, 2245, 2253, 2253, 2263, 2273, + 2279, 2291, 2292, 2296, 2304, 2314, 2324, 2325, 2328, 2329, + 2332, 2340, 2348, 2358, 2367, 2376, 2376, 2388, 2398, 2402, + 2406, 2412, 2420, 2428, 2442, 2458, 2472, 2487, 2497, 2498, + 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2514, 2513, 2538, + 2538, 2547, 2555, 2563, 2571, 2584, 2592, 2600, 2608, 2616, + 2624, 2624, 2634, 2642, 2650, 2661, 2662, 2673, 2677, 2689, + 2701, 2701, 2701, 2712, 2712, 2712, 2723, 2734, 2743, 2745, + 2742, 2809, 2808, 2830, 2835, 2829, 2857, 2856, 2878, 2877, + 2904, 2905, 2904, 2929, 2937, 2945, 2953, 2963, 2975, 2982, + 2989, 2996, 3003, 3010, 3017, 3024, 3031, 3038, 3045, 3052, + 3057, 3058, 3065, 3070, 3073, 3074, 3087, 3088, 3098, 3099, + 3102, 3110, 3120, 3128, 3138, 3146, 3154, 3162, 3170, 3178, + 3186, 3197, 3205, 3215, 3223, 3231, 3239, 3247, 3255, 3264, + 3272, 3280, 3288, 3296, 3304, 3312, 3320, 3328, 3338, 3339, + 3345, 3354, 3363, 3374, 3375, 3385, 3392, 3401, 3409, 3415, + 3415, 3437, 3445, 3455, 3459, 3466, 3465, 3486, 3502, 3511, + 3522, 3531, 3541, 3551, 3559, 3570, 3581, 3589, 3597, 3612, + 3611, 3633, 3632, 3653, 3665, 3666, 3669, 3688, 3691, 3699, + 3707, 3710, 3714, 3717, 3725, 3728, 3729, 3737, 3740, 3757, + 3758, 3759, 3769, 3779, 3806, 3848, 3856, 3863, 3870, 3880, + 3888, 3898, 3906, 3913, 3920, 3931, 3938, 3949, 3956, 3966, + 3968, 3967, 3984, 3983, 4005, 4013, 4021, 4029, 4032, 4044, + 4045, 4046, 4047, 4050, 4081, 4082, 4083, 4091, 4101, 4102, + 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, + 4115, 4125, 4135, 4136, 4139, 4148, 4147, 4155, 4167, 4179, + 4185, 4193, 4201, 4209, 4217, 4225, 4233, 4241, 4249, 4257, + 4265, 4273, 4281, 4289, 4298, 4307, 4316, 4325, 4334, 4345, + 4346, 4358, 4366, 4385, 4392, 4405, 4419, 4433, 4441, 4457, + 4465, 4481, 4482, 4485, 4497, 4508, 4509, 4512, 4528, 4532, + 4542, 4552, 4552, 4581, 4582, 4592, 4599, 4609, 4617, 4627, + 4628, 4629, 4632, 4633, 4634, 4635, 4638, 4639, 4640, 4643, + 4648, 4655, 4656, 4659, 4660, 4663, 4666, 4669, 4670, 4671, + 4674, 4675, 4678, 4679, 4683 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "keyword_class", "keyword_module", + "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", + "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", + "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", + "keyword_when", "keyword_while", "keyword_until", "keyword_for", + "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", + "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", + "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", + "keyword_self", "keyword_nil", "keyword_true", "keyword_false", + "keyword_and", "keyword_or", "keyword_not", "modifier_if", + "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", + "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", + "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", + "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", + "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", + "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", + "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", + "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", + "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", + "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", + "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", + "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", + "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", + "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", + "idRespond_to", "idIFUNC", "idCFUNC", "idThrowState", + "id_core_set_method_alias", "id_core_set_variable_alias", + "id_core_undef_method", "id_core_define_method", + "id_core_define_singleton_method", "id_core_set_postexe", "tLAST_TOKEN", + "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", + "' '", "'\\n'", "$accept", "program", "@1", "bodystmt", "compstmt", + "stmts", "stmt", "@2", "@3", "expr", "expr_value", "command_call", + "block_command", "cmd_brace_block", "@4", "command", "mlhs", + "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", + "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem", + "undef_list", "@5", "op", "reswords", "arg", "@6", "arg_value", + "aref_args", "paren_args", "opt_paren_args", "opt_call_args", + "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args", + "mrhs", "primary", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", + "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "primary_value", + "k_begin", "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for", + "k_class", "k_module", "k_def", "k_end", "then", "do", "if_tail", + "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "block_param", + "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", + "lambda", "@24", "f_larglist", "lambda_body", "do_block", "@25", + "block_call", "method_call", "brace_block", "@26", "@27", "case_body", + "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", + "strings", "string", "string1", "xstring", "regexp", "words", + "word_list", "word", "qwords", "qword_list", "string_contents", + "xstring_contents", "string_content", "@28", "@29", "string_dvar", + "symbol", "sym", "dsym", "numeric", "variable", "var_ref", "var_lhs", + "backref", "superclass", "@30", "f_arglist", "f_args", "f_bad_arg", + "f_norm_arg", "f_arg_item", "f_arg", "f_opt", "f_block_opt", + "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg", + "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "@31", + "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3", + "dot_or_colon", "opt_terms", "opt_nl", "rparen", "rbracket", "trailer", + "term", "terms", "none", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, + 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, + 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 123, 125, 91, + 46, 44, 96, 40, 41, 93, 59, 32, 10 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 149, 151, 150, 152, 153, 154, 154, 154, 154, + 156, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 157, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 158, 158, 158, 158, + 158, 158, 159, 160, 160, 160, 160, 160, 161, 161, + 161, 163, 162, 164, 164, 164, 164, 164, 164, 164, + 164, 165, 165, 166, 166, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 168, 168, 169, 169, 170, + 170, 171, 171, 171, 171, 171, 171, 171, 171, 172, + 172, 172, 172, 172, 172, 172, 172, 173, 173, 174, + 174, 174, 175, 175, 175, 175, 175, 176, 176, 177, + 177, 178, 179, 178, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 183, 182, 182, 182, + 184, 185, 185, 185, 185, 186, 187, 187, 188, 188, + 189, 189, 189, 189, 189, 191, 190, 192, 193, 193, + 193, 194, 194, 194, 194, 195, 195, 195, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 197, 196, 198, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 200, 201, 196, 202, 203, 196, 196, 196, 204, 205, + 196, 206, 196, 207, 208, 196, 209, 196, 210, 196, + 211, 212, 196, 196, 196, 196, 196, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 225, 225, 226, 226, 227, 227, 228, 228, 229, 229, + 230, 230, 231, 231, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 234, 234, + 235, 235, 235, 236, 236, 237, 237, 238, 238, 240, + 239, 241, 241, 242, 242, 244, 243, 245, 245, 245, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 248, + 247, 249, 247, 250, 251, 251, 252, 252, 253, 253, + 253, 254, 254, 255, 255, 256, 256, 256, 257, 258, + 258, 258, 259, 260, 261, 262, 262, 263, 263, 264, + 264, 265, 265, 266, 266, 267, 267, 268, 268, 269, + 270, 269, 271, 269, 272, 272, 272, 272, 273, 274, + 274, 274, 274, 275, 276, 276, 276, 276, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + 278, 279, 280, 280, 281, 282, 281, 281, 283, 283, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 285, 285, 285, 285, 286, + 286, 287, 287, 288, 288, 289, 290, 291, 291, 292, + 292, 293, 293, 294, 294, 295, 295, 296, 297, 297, + 298, 299, 298, 300, 300, 301, 301, 302, 302, 303, + 303, 303, 304, 304, 304, 304, 305, 305, 305, 306, + 306, 307, 307, 308, 308, 309, 310, 311, 311, 311, + 312, 312, 313, 313, 314 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 4, 2, 1, 1, 3, 2, + 0, 4, 3, 3, 3, 2, 3, 3, 3, 3, + 3, 0, 5, 4, 3, 3, 3, 6, 5, 5, + 5, 3, 3, 3, 3, 1, 1, 3, 3, 3, + 2, 1, 1, 1, 1, 2, 2, 2, 1, 4, + 4, 0, 5, 2, 3, 4, 5, 4, 5, 2, + 2, 1, 3, 1, 3, 1, 2, 3, 5, 2, + 4, 2, 4, 1, 3, 1, 3, 2, 3, 1, + 3, 1, 4, 3, 3, 3, 3, 2, 1, 1, + 4, 3, 3, 3, 3, 2, 1, 1, 1, 2, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 3, 5, 6, 5, + 5, 5, 5, 4, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 4, 4, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 3, 3, 3, 3, 0, 4, 6, 1, + 1, 1, 2, 4, 2, 3, 1, 1, 1, 1, + 1, 2, 2, 4, 1, 0, 2, 2, 2, 1, + 1, 1, 2, 3, 4, 3, 4, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, + 4, 3, 3, 2, 3, 3, 1, 4, 3, 1, + 0, 6, 4, 3, 2, 1, 2, 2, 6, 6, + 0, 0, 7, 0, 0, 7, 5, 4, 0, 0, + 9, 0, 6, 0, 0, 8, 0, 5, 0, 6, + 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, + 1, 3, 1, 3, 1, 4, 6, 3, 5, 2, + 4, 1, 3, 6, 8, 4, 6, 4, 2, 6, + 2, 4, 6, 2, 4, 2, 4, 1, 1, 1, + 3, 1, 4, 1, 2, 1, 3, 1, 1, 0, + 3, 4, 1, 3, 3, 0, 5, 2, 4, 4, + 2, 4, 4, 3, 3, 3, 2, 1, 4, 0, + 5, 0, 5, 5, 1, 1, 6, 1, 1, 1, + 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 2, 3, 3, 3, 3, 3, 0, 3, 1, + 2, 3, 3, 0, 3, 0, 2, 0, 2, 1, + 0, 3, 0, 4, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 4, 2, 3, 2, + 6, 8, 4, 6, 4, 6, 2, 4, 6, 2, + 4, 2, 4, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 3, 3, 3, 1, 3, 1, + 3, 1, 1, 2, 1, 1, 1, 2, 2, 1, + 1, 0, 4, 1, 2, 1, 3, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 1, 0, 1, 2, 2, 0, 1, 1, + 1, 1, 1, 2, 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 2, 0, 0, 1, 0, 325, 326, 327, 0, 318, + 319, 320, 323, 321, 322, 324, 313, 314, 315, 316, + 276, 245, 245, 464, 463, 465, 466, 543, 0, 543, + 21, 0, 468, 467, 469, 458, 531, 460, 459, 461, + 462, 454, 455, 419, 472, 473, 0, 0, 0, 0, + 0, 554, 554, 73, 379, 437, 435, 437, 437, 427, + 433, 0, 0, 0, 3, 541, 7, 35, 36, 44, + 43, 0, 61, 0, 65, 75, 0, 41, 229, 0, + 267, 0, 0, 290, 293, 541, 0, 0, 0, 0, + 48, 285, 258, 259, 418, 420, 260, 261, 262, 263, + 416, 417, 415, 470, 264, 0, 265, 245, 6, 9, + 153, 164, 154, 177, 150, 170, 160, 159, 180, 181, + 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, + 169, 171, 163, 156, 172, 179, 174, 173, 166, 176, + 161, 149, 168, 167, 148, 155, 146, 147, 143, 144, + 145, 102, 104, 103, 138, 139, 135, 117, 118, 119, + 126, 123, 125, 120, 121, 140, 141, 127, 128, 132, + 122, 124, 114, 115, 116, 129, 130, 131, 133, 134, + 136, 137, 142, 107, 109, 111, 15, 105, 106, 108, + 110, 313, 314, 276, 0, 0, 0, 0, 0, 0, + 0, 240, 0, 230, 251, 46, 244, 554, 0, 470, + 0, 265, 554, 525, 47, 45, 543, 60, 0, 554, + 396, 59, 543, 544, 0, 0, 10, 226, 0, 0, + 279, 397, 205, 0, 0, 206, 273, 0, 0, 543, + 63, 269, 0, 547, 547, 231, 0, 0, 547, 523, + 543, 0, 0, 0, 71, 317, 0, 81, 88, 287, + 494, 451, 450, 452, 449, 0, 448, 0, 0, 0, + 0, 0, 0, 0, 456, 457, 40, 220, 221, 550, + 551, 5, 552, 542, 0, 0, 0, 0, 0, 0, + 0, 385, 387, 0, 77, 0, 69, 66, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 554, 0, 0, 42, + 0, 0, 0, 0, 541, 0, 542, 0, 339, 338, + 0, 0, 470, 265, 97, 98, 0, 0, 100, 0, + 0, 470, 265, 306, 173, 166, 176, 161, 143, 144, + 145, 102, 103, 521, 308, 520, 0, 0, 0, 401, + 399, 286, 421, 0, 0, 390, 53, 284, 112, 528, + 273, 252, 247, 0, 0, 249, 241, 250, 0, 554, + 0, 0, 0, 249, 242, 543, 0, 278, 246, 543, + 239, 238, 543, 283, 39, 12, 14, 13, 0, 280, + 0, 0, 0, 0, 0, 0, 543, 271, 62, 543, + 274, 549, 548, 232, 549, 234, 275, 524, 0, 87, + 456, 457, 79, 74, 0, 0, 554, 0, 500, 497, + 496, 495, 498, 0, 512, 516, 515, 511, 494, 0, + 382, 499, 501, 503, 554, 509, 554, 514, 554, 0, + 493, 439, 442, 440, 453, 438, 422, 436, 423, 424, + 425, 426, 0, 429, 431, 0, 432, 0, 0, 553, + 8, 16, 17, 18, 19, 20, 37, 38, 554, 0, + 25, 33, 0, 34, 543, 0, 67, 78, 24, 184, + 251, 32, 202, 210, 215, 216, 217, 212, 214, 224, + 225, 218, 219, 195, 196, 222, 223, 543, 211, 213, + 207, 208, 209, 197, 198, 199, 200, 201, 532, 537, + 533, 538, 395, 245, 393, 543, 532, 534, 533, 535, + 394, 245, 0, 554, 330, 0, 329, 0, 0, 0, + 0, 0, 0, 273, 0, 554, 0, 298, 303, 97, + 98, 99, 0, 475, 301, 474, 0, 554, 0, 0, + 0, 494, 540, 539, 310, 532, 533, 245, 245, 554, + 554, 26, 186, 31, 194, 51, 54, 0, 184, 527, + 0, 253, 248, 554, 536, 533, 543, 532, 533, 526, + 277, 545, 235, 282, 11, 0, 227, 0, 23, 0, + 554, 193, 64, 270, 547, 0, 72, 84, 86, 543, + 532, 533, 0, 500, 0, 351, 342, 344, 543, 340, + 554, 0, 0, 380, 0, 486, 519, 0, 489, 513, + 0, 491, 517, 0, 0, 428, 430, 434, 203, 204, + 371, 554, 0, 369, 368, 257, 0, 76, 70, 0, + 0, 0, 0, 0, 392, 57, 0, 398, 0, 0, + 237, 391, 55, 236, 328, 268, 554, 554, 407, 554, + 331, 554, 333, 291, 332, 294, 0, 0, 297, 536, + 272, 543, 532, 533, 0, 0, 477, 0, 0, 97, + 98, 101, 543, 0, 543, 494, 0, 0, 0, 389, + 50, 388, 49, 0, 0, 0, 554, 113, 254, 243, + 0, 398, 0, 0, 543, 22, 233, 80, 82, 505, + 543, 0, 349, 0, 502, 0, 543, 373, 0, 0, + 504, 554, 554, 518, 554, 510, 554, 554, 0, 444, + 445, 446, 441, 447, 500, 554, 0, 554, 507, 554, + 554, 367, 0, 0, 255, 68, 185, 0, 30, 191, + 192, 58, 546, 0, 28, 189, 29, 190, 56, 408, + 409, 554, 410, 0, 554, 336, 0, 0, 334, 0, + 0, 0, 296, 0, 0, 398, 0, 304, 0, 0, + 398, 307, 522, 543, 0, 479, 311, 0, 0, 187, + 0, 0, 281, 341, 352, 0, 347, 343, 377, 374, + 375, 378, 381, 384, 383, 0, 482, 0, 484, 0, + 490, 0, 487, 492, 443, 0, 0, 370, 358, 360, + 0, 363, 0, 365, 386, 256, 228, 27, 188, 0, + 0, 412, 337, 0, 4, 414, 0, 288, 289, 0, + 0, 253, 554, 299, 0, 476, 302, 478, 309, 494, + 402, 400, 0, 0, 350, 0, 345, 0, 554, 554, + 554, 554, 0, 506, 372, 554, 554, 554, 508, 554, + 554, 0, 411, 0, 89, 96, 0, 413, 0, 292, + 295, 404, 405, 403, 0, 0, 0, 52, 348, 0, + 376, 483, 0, 480, 485, 488, 273, 0, 0, 355, + 0, 357, 364, 0, 361, 366, 95, 0, 554, 0, + 554, 554, 0, 305, 0, 346, 554, 536, 272, 554, + 554, 554, 554, 536, 94, 543, 532, 533, 406, 335, + 300, 312, 481, 356, 0, 353, 359, 362, 398, 554, + 354 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 2, 542, 543, 65, 66, 408, 228, 67, + 330, 68, 69, 586, 716, 70, 71, 239, 72, 73, + 74, 433, 75, 202, 348, 349, 183, 184, 185, 186, + 587, 539, 188, 77, 410, 204, 242, 532, 671, 399, + 400, 217, 218, 206, 386, 207, 493, 78, 328, 419, + 605, 332, 790, 333, 791, 694, 904, 698, 695, 864, + 569, 571, 708, 869, 233, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 675, 545, 683, 787, 788, + 341, 626, 627, 628, 755, 652, 653, 736, 819, 820, + 259, 260, 449, 633, 292, 488, 90, 91, 377, 580, + 579, 552, 903, 677, 781, 850, 854, 92, 93, 94, + 95, 96, 97, 98, 271, 472, 99, 273, 267, 265, + 465, 644, 643, 752, 100, 266, 101, 102, 209, 104, + 210, 211, 564, 697, 706, 707, 451, 452, 453, 454, + 455, 758, 759, 456, 457, 458, 459, 743, 635, 366, + 570, 247, 212, 213, 234, 609, 534, 574, 281, 396, + 397, 667, 423, 546, 336, 108 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -747 +static const yytype_int16 yypact[] = +{ + -747, 103, 2364, -747, 6711, -747, -747, -747, 6222, -747, + -747, -747, -747, -747, -747, -747, 6820, 6820, -747, -747, + 6820, 3057, 2631, -747, -747, -747, -747, 282, 6082, -24, + -747, 64, -747, -747, -747, 5317, 2773, -747, -747, 5445, + -747, -747, -747, -747, -747, -747, 8019, 8019, 74, 4131, + 8128, 7038, 7365, 6487, -747, 5942, -747, -747, -747, 142, + 154, 84, 8237, 8019, -747, 473, 925, 71, -747, -747, + 238, 234, -747, 205, 8346, -747, 268, 2472, 31, 46, + -747, 8128, 8128, -747, -747, 4792, 8451, 8556, 8661, 5189, + 14, 70, -747, -747, 290, -747, -747, -747, -747, -747, + -747, -747, -747, 26, -747, 366, 355, 210, -747, 925, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, 321, -747, -747, -747, + -747, -747, -747, -747, 328, 8019, 433, 4262, 8019, 8019, + 8019, -747, 403, 2472, 440, -747, -747, 418, 300, 13, + 457, 24, 437, -747, -747, -747, 4670, -747, 6820, 6820, + -747, -747, 4923, -747, 8128, 438, -747, 436, 449, 4393, + 452, 463, -747, 346, 210, 546, 451, 4131, 474, -24, + 525, 71, 477, 165, 276, -747, 440, 498, 276, -747, + -24, 582, 250, 8766, 501, -747, 374, 384, 394, -747, + 933, -747, -747, -747, -747, 595, -747, 659, 673, 76, + 552, 721, 553, 43, 584, 596, -747, -747, -747, -747, + -747, -747, -747, 5045, 8128, 8128, 8128, 8128, 6711, 8128, + 8128, -747, -747, 7474, -747, 4131, 6599, 524, 7474, 8019, + 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, + 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, + 8019, 8019, 8019, 8019, 8019, 9033, 6820, 9111, 3431, 71, + 119, 119, 8128, 8128, 473, 652, 528, 614, -747, -747, + 424, 654, 56, 92, 335, 344, 8128, 131, -747, 42, + 444, -747, -747, -747, 33, 35, 53, 217, 227, 235, + 265, 298, 333, -747, -747, -747, 358, 10047, 10047, -747, + -747, -747, -747, 8237, 8237, -747, 587, -747, -747, -747, + 305, -747, -747, 8019, 8019, 6929, -747, -747, 9189, 6820, + 9267, 8019, 8019, 7147, -747, -24, 540, -747, -747, -24, + -747, -747, 242, -747, -747, -747, -747, -747, 6222, -747, + 8019, 4393, 555, 9189, 9267, 8019, -24, -747, 556, -24, + -747, 7256, -747, -747, 7365, -747, -747, -747, 436, 470, + -747, -747, -747, 557, 8766, 9345, 6820, 9423, 585, -747, + -747, -747, -747, 843, -747, -747, -747, -747, 835, 49, + -747, -747, -747, -747, 564, -747, 565, 658, 572, 662, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, 21, -747, -747, 569, -747, 8019, 8019, -747, + 925, -747, -747, -747, -747, -747, -747, -747, 38, 8019, + -747, 577, 578, -747, -24, 8766, 581, -747, -747, 2225, + -747, -747, 546, 2143, 2143, 2143, 2143, 1115, 1115, 2614, + 2024, 2143, 2143, 1738, 1738, 718, 718, 1856, 1115, 1115, + 619, 619, 692, 274, 274, 546, 546, 546, 3199, 5687, + 3285, 5801, -747, 463, -747, -24, 460, -747, 471, -747, + -747, 2915, 715, 734, -747, 3577, 713, 3869, 175, 175, + 652, 7583, 715, 96, 9501, 6820, 9579, -747, 71, -747, + 470, -747, 473, -747, -747, -747, 9657, 6820, 9735, 3431, + 8128, 1108, -747, -747, -747, -747, -747, 996, 996, 38, + 38, -747, 2242, -747, 2472, -747, -747, 6222, 10104, -747, + 8019, 440, -747, 437, 5573, 2489, -24, 367, 390, -747, + -747, -747, -747, -747, -747, 8128, 2472, 605, -747, 463, + 463, 2472, -7, -747, 276, 8766, 557, 500, 267, -24, + 48, 50, 8019, -747, 843, 592, -747, 603, -24, -747, + 600, 4539, 4393, -747, 835, -747, -747, 835, -747, -747, + 634, -747, -747, 4393, 865, -747, -747, -747, 546, 546, + -747, 411, 4539, -747, -747, 607, 7692, -747, 557, 8766, + 8019, 644, 8237, 8019, -747, 587, 612, 544, 8237, 8237, + -747, -747, 587, -747, -747, -747, 7801, 744, -747, 413, + -747, 744, -747, -747, -747, -747, 715, 208, -747, 62, + 85, -24, 117, 120, 8128, 473, -747, 8128, 3431, 500, + 267, -747, -24, 715, 242, 835, 3431, 473, 6362, -747, + -747, -747, -747, 4539, 4393, 8019, 38, -747, -747, -747, + 8019, 432, 8019, 8019, 242, -747, -747, -747, 465, -747, + -24, 788, 620, 854, -747, 885, -24, -747, 756, 631, + -747, 629, 633, -747, 639, -747, 642, 639, 657, -747, + -747, -747, -747, -747, 681, 600, 683, 665, -747, 666, + 676, -747, 789, 8019, 680, 557, 2472, 8019, -747, 2472, + 2472, -747, -747, 8237, -747, 2472, -747, 2472, -747, 577, + -747, 710, -747, 4000, 814, -747, 8128, 715, -747, 715, + 4539, 4539, -747, 7910, 3723, 133, 175, -747, 473, 715, + -747, -747, -747, -24, 715, -747, -747, 822, 696, 2472, + 4393, 8019, -747, -747, 700, 788, 621, -747, -747, 705, + -747, -747, -747, -747, -747, 835, -747, 634, -747, 634, + -747, 634, -747, -747, -747, 8871, 736, -747, 1125, -747, + 1125, -747, 634, -747, -747, 711, 2472, -747, 2472, 8976, + 119, -747, -747, 4539, -747, -747, 119, -747, -747, 715, + 715, -747, 505, -747, 3431, -747, -747, -747, -747, 1108, + -747, -747, 717, 788, 700, 788, 716, 885, 639, 720, + 639, 639, 807, 487, -747, 725, 726, 639, -747, 728, + 639, 815, -747, 522, 384, 394, 3431, -747, 3577, -747, + -747, -747, -747, -747, 4539, 715, 3431, -747, 700, 788, + -747, -747, 634, -747, -747, -747, -747, 9813, 1125, -747, + 634, -747, -747, 634, -747, -747, 470, 9891, 6820, 9969, + 734, 413, 715, -747, 715, 700, 639, 727, 730, 639, + 738, 639, 639, 212, 267, -24, 152, 187, -747, -747, + -747, -747, -747, -747, 634, -747, -747, -747, 193, 639, + -747 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -747, -747, -747, -537, 976, -747, 20, -747, -747, -14, + 30, -45, -747, -133, -747, 22, 772, -149, 9, -69, + -747, -400, -4, 1540, -303, 793, -54, -747, -12, -747, + -747, 0, -747, 802, -747, -48, -747, -16, -29, -313, + 81, 55, -747, -245, -192, -41, -272, -34, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -2, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -31, -319, -519, -49, -607, + -747, -664, -641, 260, -747, -487, -747, -532, -747, 8, + -747, -747, -747, -747, -747, -747, -747, -747, 795, -747, + -747, -528, -747, -42, -747, -747, -747, -747, -747, -747, + 799, -747, -747, -747, -747, -747, -747, -747, -747, 513, + -208, -747, -747, -747, -5, -747, 29, -747, 1251, 816, + 747, 1369, -747, -747, 47, -235, -673, -393, -569, -40, + -576, -746, 69, 278, -747, -474, -747, -249, 959, -747, + -747, -747, -6, -288, 162, -261, -747, -747, -56, -20, + 17, -563, -217, -44, 850, 752 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -555 +static const yytype_int16 yytable[] = +{ + 79, 264, 79, 189, 246, 297, 220, 224, 187, 227, + 243, 460, 547, 535, 208, 208, 226, 276, 208, 255, + 394, 282, 686, 189, 109, 450, 501, 425, 187, 335, + 685, 427, 703, 721, 616, 364, 241, 190, 201, 201, + 255, 282, 201, 562, 561, 244, 248, 79, 208, 254, + 629, 256, 255, 255, 255, 187, 728, 190, 240, 467, + 208, 745, 821, 473, 533, 740, 541, 329, 329, 817, + 784, 329, 256, -83, 789, -85, 596, 221, 631, 208, + 208, -89, 461, 208, 340, 350, 350, -92, 416, 187, + 814, 375, 713, 714, 888, 658, 369, 205, 214, 367, + -471, 215, -62, 3, 475, 599, 577, 578, 289, 290, + -94, 392, 331, -471, 650, 334, -317, -96, -464, 756, + -463, -95, -89, 619, 223, 462, 463, 533, 795, 541, + 236, 325, 544, -96, -76, -89, 599, 461, -465, 800, + 592, 469, -91, 274, 275, -93, 494, 379, 592, 476, + 381, 382, 651, 610, 368, 563, 632, -83, -90, -85, + 742, 799, 376, 746, 107, -91, 107, -81, 645, 804, + -317, -317, 888, -464, 874, -463, 610, 760, 107, 107, + 462, 463, 107, 559, 432, 326, 327, 560, 279, -83, + 280, -85, -83, -465, -85, 79, -83, -81, -85, 460, + -93, 229, 682, -84, 821, -532, -90, 370, 402, 817, + 404, 107, 107, 630, 208, 220, 208, 208, 375, 255, + 208, 544, 208, 836, 107, -92, -86, 79, -533, 810, + 428, 629, 732, -88, 908, 79, 369, -87, 201, 403, + 201, 201, 691, 107, 107, 491, 240, 107, 490, 745, + 500, 256, 492, 498, 702, 901, 418, 492, -83, 765, + 740, -85, 255, 701, 646, 279, 291, 280, 935, 740, + 329, 329, 329, 329, -82, 486, 487, 863, 550, 289, + 290, 79, 208, 208, 208, 208, 79, 208, 208, 270, + 282, 208, 496, 79, 256, 610, 208, 395, -91, 398, + -91, 272, -466, 480, 240, 565, 421, 610, 485, 430, + 431, 540, -468, 422, 481, 482, 483, 484, 329, 329, + -467, 279, 460, 280, 208, 531, 79, 905, 581, 583, + 208, 208, 558, -93, 902, -93, 589, 591, 629, -90, + 629, -90, 299, 293, 208, 246, 294, 370, 201, 793, + -469, 879, -272, 219, 279, -532, 280, -466, -92, 107, + -92, -529, 548, 549, 886, 432, 889, -468, 794, 934, + -530, 208, 208, 591, 540, -467, 246, 298, 107, 593, + 107, 107, 958, -458, 107, 388, 107, 208, 531, 56, + 223, 107, 415, 322, 323, 324, 604, 726, 540, 107, + 255, 719, 761, 189, 780, -469, -272, -272, 187, 79, + -533, 201, 600, 531, -95, 614, 602, 424, -461, 603, + -458, 540, 629, 876, 422, 222, 432, 786, 783, -461, + 223, 413, 256, 612, 208, 531, 613, 190, -458, 389, + 390, 655, 374, 572, 940, 107, 107, 107, 107, 107, + 107, 107, 107, 373, 722, 107, 460, 107, 201, 435, + 107, 255, 378, 754, -96, 439, 440, 441, 442, -470, + 803, 222, -529, -461, -458, -458, -91, 723, -529, -265, + 629, -530, 629, -461, -461, 389, 414, -530, 107, 380, + 107, -398, 405, 256, 107, 107, -88, 661, 573, -93, + 443, 406, 407, 500, 684, 684, 444, 445, 107, 554, + 687, 657, 383, 436, 437, 666, 629, 664, 696, 811, + 783, 688, 551, -470, -470, 670, -536, 446, 384, 566, + 447, 896, 771, -265, -265, 107, 107, 898, 415, 778, + 540, -90, 718, 79, 391, 79, 727, 668, 709, 711, + -398, 107, 540, 208, 531, -273, 704, 735, 669, 385, + -95, 670, 670, 555, 556, 208, 531, 79, 208, -91, + 268, 269, 917, 107, 729, 717, 666, 201, 393, 409, + -93, 255, 189, 567, 568, -536, 411, 187, 665, 201, + 432, 724, -87, 664, 670, 216, 672, 744, 107, 666, + 747, -83, -398, 208, -398, -398, 219, 927, 764, -273, + -273, 757, -85, 256, 299, 945, 190, 768, 417, 279, + 460, 280, 420, 774, 776, 255, 567, 568, 779, 79, + 79, 773, 710, 712, -61, 492, 426, -536, 429, -536, + -536, 79, 434, -532, 623, 734, 439, 440, 441, 442, + 79, 797, 477, -90, 806, 792, 461, 256, 470, 474, + 208, 928, 929, 805, 478, 497, 208, 208, 610, 551, + 553, 666, 801, 623, 479, 439, 440, 441, 442, 557, + 329, 585, 666, 329, 601, -82, 623, 299, 439, 440, + 441, 442, 208, 608, 622, 208, 79, -76, 615, 462, + 463, 464, 312, 313, 79, 634, 637, 107, 187, 107, + 639, 79, 79, 640, 642, 845, 647, 107, -251, 656, + 461, 802, 659, 443, 796, 674, 680, 798, 847, 107, + 445, 107, 107, 731, 461, 319, 320, 321, 322, 323, + 324, 812, 676, 725, 733, 861, 735, 813, -252, 105, + 446, 105, 684, 822, 865, 767, 857, 772, 858, 783, + 299, 815, 875, 462, 463, 466, 823, 107, 866, 824, + 825, 208, 329, 868, 827, 312, 313, 462, 463, 468, + 829, 79, 461, 831, 208, 878, 299, 880, 79, 79, + 835, 881, 79, 107, 107, 834, 105, 837, 849, 844, + 887, 255, 890, 245, 249, 107, 838, 840, 79, 320, + 321, 322, 323, 324, 107, 255, 856, 842, 203, 203, + 867, -253, 203, 853, 107, 462, 463, 471, 899, 900, + 107, 107, 870, 883, 871, 320, 321, 322, 323, 324, + 623, 873, 439, 440, 441, 442, 877, 893, 232, 235, + 884, 79, -254, 203, 203, 907, 107, 909, 338, 107, + 107, 912, 79, 916, 277, 278, 918, 920, 107, 923, + -532, 926, 936, -533, 933, 107, 107, 624, 939, 954, + 941, 353, 949, 942, 730, 910, 371, 438, 948, 439, + 440, 441, 442, 372, 79, 623, 79, 439, 440, 441, + 442, 950, 79, 951, 79, 365, 623, 885, 439, 440, + 441, 442, 741, 540, 959, 283, 906, 531, 0, 749, + 750, 0, 751, 0, 443, 666, 208, 531, 44, 45, + 444, 445, 624, 0, 0, 107, 0, 818, 625, 439, + 440, 441, 442, 624, 105, 107, 0, 0, 107, 816, + 201, 446, 107, 107, 447, 0, 107, 0, 0, 387, + 0, 0, 0, 0, 387, 284, 285, 286, 287, 288, + 0, 401, 107, 0, 0, 0, 105, 0, 64, 0, + 0, 0, 0, 0, 105, 438, 0, 439, 440, 441, + 442, 0, 0, 0, 0, 0, -554, 203, 0, 0, + 203, 203, 277, 0, -554, -554, -554, 0, 0, -554, + -554, -554, 0, -554, 0, 107, 0, 0, 203, 0, + 203, 203, 443, -554, 0, 238, 107, 0, 444, 445, + 105, 0, 0, -554, -554, 105, -554, -554, -554, -554, + -554, 0, 105, 0, 0, 0, 0, 0, 0, 446, + 0, 0, 447, 0, 0, 0, 0, 0, 107, 0, + 107, 0, 0, 0, 0, 0, 107, 0, 107, 0, + 0, 0, 0, 0, 0, 105, 448, 0, 401, 0, + 0, -554, 0, 0, 0, 0, 0, 0, 0, 0, + 107, 0, 0, 0, 0, 203, 0, 0, 0, 0, + 499, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 0, 203, 0, + 0, 0, 0, 0, -554, 0, -554, 0, 0, 219, + -554, 401, -554, 0, -554, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, + 438, 0, 439, 440, 441, 442, 0, 0, 0, 0, + 0, 0, 0, 238, 0, 582, 584, 754, 0, 439, + 440, 441, 442, 299, 0, 588, 203, 203, 401, 0, + 0, 203, 0, 582, 584, 203, 0, 443, 312, 313, + 0, 0, 0, 444, 445, 412, 636, 0, 636, 0, + 636, 0, 606, 238, 443, 0, 0, 611, 0, 0, + 444, 445, 0, 203, 446, 0, 203, 447, 0, 317, + 318, 319, 320, 321, 322, 323, 324, 0, 203, 0, + 654, 446, 0, 0, 447, 0, 0, 0, 0, 0, + 0, 705, 0, 103, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 238, 0, 0, 0, 0, 0, 0, 0, 648, + 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 203, 105, 673, 105, 678, 0, 0, 0, 0, + 103, 0, 0, 0, 257, 0, 0, 401, 0, 0, + 0, 0, 0, 0, 0, 0, 105, 0, 0, 401, + 0, 0, 0, 0, 0, 257, 0, 0, 0, 673, + 673, 654, 654, 0, 0, 0, 0, 342, 351, 351, + 351, 0, 0, 0, 0, 387, 0, 0, 0, 0, + 0, 0, 0, 203, 0, 0, 0, 203, 0, 0, + 0, 0, 673, 0, 0, 0, 0, 0, 0, 203, + 0, 106, 0, 106, 0, 0, 0, 0, 105, 105, + 0, 0, 737, 0, 0, 0, 0, 607, 0, 0, + 105, 0, 203, 0, 0, 0, 0, 0, 0, 105, + 0, 0, 0, 737, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 638, 0, 641, 106, 0, + 0, 0, 258, 0, 203, 0, 0, 0, 782, 785, + 0, 785, 0, 785, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 258, 0, 105, 0, 0, 103, 0, + 0, 0, 0, 105, 0, 343, 352, 352, 203, 0, + 105, 105, 766, 0, 769, 770, 0, 0, 654, 0, + 775, 777, 0, 0, 0, 0, 0, 0, 203, 0, + 103, 0, 0, 0, 0, 0, 0, 0, 103, 0, + 0, 0, 0, 636, 636, 0, 636, 0, 636, 636, + 0, 0, 0, 0, 257, 0, 0, 737, 0, 636, + 0, 636, 636, 0, 0, 0, 0, 809, 0, 0, + 0, 679, 769, 681, 775, 777, 0, 0, 0, 0, + 105, 0, 0, 851, 103, 0, 855, 105, 105, 103, + 0, 105, 76, 0, 76, 0, 103, 257, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, + 0, 0, 0, 0, 0, 203, 106, 0, 0, 846, + 0, 0, 0, 0, 0, 848, 0, 0, 0, 103, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, + 0, 0, 0, 0, 0, 203, 0, 0, 106, 0, + 105, 0, 0, 0, 0, 0, 106, 738, 739, 0, + 0, 105, 0, 848, 785, 0, 0, 0, 0, 748, + 0, 0, 258, 0, 0, 0, 339, 0, 762, 0, + 636, 636, 636, 636, 0, 0, 0, 636, 636, 636, + 0, 636, 636, 105, 0, 105, 0, 0, 0, 0, + 0, 105, 106, 105, 0, 0, 0, 106, 0, 0, + 0, 0, 103, 0, 106, 258, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 401, 0, 678, 785, 0, 257, 0, 0, 636, 807, + 808, 636, 636, 636, 636, 0, 0, 106, 0, 0, + 826, 828, 0, 830, 0, 832, 833, 0, 0, 0, + 0, 636, 0, 0, 0, 0, 839, 0, 841, 843, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 203, 0, 0, 0, 0, 0, 0, 76, 0, 0, + 0, 0, 0, 0, 0, 0, 257, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 852, + 0, 0, 0, 0, 0, 0, 859, 860, 0, 76, + 862, 0, 0, 0, 0, 0, 0, 76, 0, 0, + 106, 0, 0, 0, 0, 0, 872, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 103, 0, 103, 0, + 0, 0, 0, 258, 0, 0, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, -555, -555, 0, + 103, 312, 313, 76, 0, 0, 0, 0, 76, 897, + 0, 0, 0, 0, 0, 76, 0, 911, 913, 914, + 915, 0, 0, 0, 919, 921, 922, 0, 924, 925, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 0, 0, 0, 0, 258, 0, 257, 0, 76, 0, + 0, 0, 930, 0, 931, 0, 0, 0, 0, 0, + 932, 0, 103, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 103, 952, 0, 0, 953, 955, + 956, 957, 0, 103, 0, 0, 0, 0, 0, 0, + 257, 0, 0, 0, 106, 0, 106, 0, 960, 0, + 0, 0, 0, 0, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 0, 106, 312, + 313, 0, 0, 0, 0, 0, 0, 0, 0, 103, + 0, 76, 0, 0, 0, 0, 0, 103, 0, 0, + 0, 0, 0, 0, 103, 103, 314, 0, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, + 0, 0, 0, 0, 258, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 106, 106, 0, 0, 223, 0, 0, 0, 0, 0, + 0, 0, 106, 753, 0, 0, 0, 0, 0, 0, + 0, 106, 0, 0, 0, 0, 0, 0, 258, 0, + 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, + 0, 103, 103, 0, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 103, 0, 0, 0, 0, 0, 106, 0, 0, + 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, + 0, 0, 106, 106, 0, 76, 351, 76, 0, 0, + 0, 0, 299, 300, 301, 302, 303, 304, 305, 306, + 894, 308, 309, 0, 103, 0, 0, 312, 313, 76, + 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 103, 0, 103, + 0, 0, 106, 0, 0, 103, 0, 103, 0, 106, + 106, 0, 0, 106, 0, 0, 0, 0, 0, 0, + 0, 76, 76, 0, 0, 0, 0, 0, 0, 106, + 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, + 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 352, 0, 0, 0, 0, 0, + 0, 299, -555, -555, -555, -555, 304, 305, 895, 0, + -555, -555, 106, 0, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 106, 0, 0, 0, 0, 76, 0, + 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, + 0, 0, 0, 76, 76, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 106, 0, 106, 0, 660, + 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 715, 0, 0, 0, + 0, 0, 0, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 0, 0, 312, 313, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 76, 0, 312, 313, 0, 0, 0, + 76, 76, 0, 0, 76, 314, 0, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, + 76, 0, 314, 0, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, -554, 4, -230, 5, 6, 7, + 8, 9, 0, 0, 0, 10, 11, 0, 0, 0, + 12, 0, 13, 14, 15, 16, 17, 18, 19, 892, + 0, 0, 0, 76, 20, 21, 22, 23, 24, 25, + 26, 0, 0, 27, 76, 0, 0, 0, 0, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, + 46, 47, 0, 0, 0, 0, 76, 0, 76, 0, + 0, 0, 0, 0, 76, 0, 76, 0, 0, 0, + 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, + 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 61, 62, 63, -272, + 0, 0, 0, 0, 0, 0, 0, -272, -272, -272, + 0, 0, -272, -272, -272, 0, -272, 0, 0, 0, + -554, 0, -554, 0, 0, 0, -272, -272, -272, 0, + 0, 0, 0, 0, 0, 0, -272, -272, 0, -272, + -272, -272, -272, -272, 0, 0, 0, 0, 0, 0, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 0, 0, 312, 313, -272, -272, -272, + -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, + 0, 0, -272, -272, -272, 0, 663, -272, 0, 0, + 0, 0, 314, -272, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 0, 0, -272, 0, -94, -272, + -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, + -272, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -272, -272, -272, + -272, -397, 0, -272, -272, -272, 0, -272, 0, -397, + -397, -397, 0, 0, -397, -397, -397, 0, -397, 0, + 0, 0, 0, 0, 0, 0, 0, -397, -397, -397, + 0, 0, 0, 0, 0, 0, 0, 0, -397, -397, + 0, -397, -397, -397, -397, -397, 0, 0, 0, 0, + 0, 0, 299, 300, 301, 302, 303, 304, 305, 0, + 0, 308, 309, 0, 0, 0, 0, 312, 313, -397, + -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, + -397, -397, 0, 0, -397, -397, -397, 0, 0, -397, + 0, 0, 0, 0, 0, -397, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, + 0, -397, 0, -397, -397, -397, -397, -397, -397, -397, + -397, -397, -397, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -397, -397, + -397, -397, -397, -266, 219, -397, -397, -397, 0, -397, + 0, -266, -266, -266, 0, 0, -266, -266, -266, 0, + -266, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -266, -266, -266, 0, 0, 0, 0, 0, 0, 0, + -266, -266, 0, -266, -266, -266, -266, -266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -266, -266, -266, -266, -266, -266, -266, -266, -266, + -266, -266, -266, -266, 0, 0, -266, -266, -266, 0, + 0, -266, 0, 0, 0, 0, 0, -266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -266, 0, 0, -266, -266, -266, -266, -266, -266, -266, + -266, -266, -266, -266, -266, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -266, -266, -266, -266, -554, 0, -266, -266, -266, + 0, -266, 0, -554, -554, -554, 0, 0, -554, -554, + -554, 0, -554, 0, 0, 0, 0, 0, 0, 0, + 0, -554, -554, -554, 0, 0, 0, 0, 0, 0, + 0, 0, -554, -554, 0, -554, -554, -554, -554, -554, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -554, -554, -554, -554, -554, -554, -554, + -554, -554, -554, -554, -554, -554, 0, 0, -554, -554, + -554, 0, 0, -554, 0, 0, 0, 0, 0, -554, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -554, 0, -554, -554, -554, + -554, -554, -554, -554, -554, -554, -554, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -554, -554, -554, -554, -554, -279, 219, -554, + -554, -554, 0, -554, 0, -279, -279, -279, 0, 0, + -279, -279, -279, 0, -279, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -279, -279, 0, 0, 0, 0, + 0, 0, 0, 0, -279, -279, 0, -279, -279, -279, + -279, -279, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -279, -279, -279, -279, -279, + -279, -279, -279, -279, -279, -279, -279, -279, 0, 0, + -279, -279, -279, 0, 0, -279, 0, 0, 0, 0, + 0, -279, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -279, 0, -279, + -279, -279, -279, -279, -279, -279, -279, -279, -279, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -279, -279, -279, -279, -536, + 216, -279, -279, -279, 0, -279, 0, -536, -536, -536, + 0, 0, 0, -536, -536, 0, -536, 0, 0, 0, + 0, 0, 0, 0, 0, -536, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -536, -536, 0, -536, + -536, -536, -536, -536, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -536, -536, -536, + -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, + 0, 0, -536, -536, -536, -272, 662, 0, 0, 0, + 0, 0, 0, -272, -272, -272, 0, 0, 0, -272, + -272, 0, -272, 0, 0, 0, 0, 0, -92, -536, + 0, -536, -536, -536, -536, -536, -536, -536, -536, -536, + -536, 0, -272, -272, 0, -272, -272, -272, -272, -272, + 0, 0, 0, 0, 0, 0, -536, -536, -536, -536, + -84, 0, 0, -536, 0, -536, 0, -536, 0, 0, + 0, 0, 0, -272, -272, -272, -272, -272, -272, -272, + -272, -272, -272, -272, -272, -272, 0, 0, -272, -272, + -272, 0, 663, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -94, -272, 0, -272, -272, -272, + -272, -272, -272, -272, -272, -272, -272, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -272, -272, -272, -86, 0, 0, -272, + 0, -272, 4, -272, 5, 6, 7, 8, 9, -554, + -554, -554, 10, 11, 0, 0, -554, 12, 0, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 61, 62, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -554, 4, -554, + 5, 6, 7, 8, 9, 0, 0, -554, 10, 11, + 0, -554, -554, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, + 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, + 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, + 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -554, 4, -554, 5, 6, 7, 8, + 9, 0, 0, -554, 10, 11, 0, 0, -554, 12, + -554, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, + 4, -554, 5, 6, 7, 8, 9, 0, 0, -554, + 10, 11, 0, 0, -554, 12, 0, 13, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, + 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 5, 6, 7, 8, 9, 0, -554, + -554, 10, 11, 0, 0, -554, 12, -554, 13, 14, + 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, + 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, + 0, 0, 0, 0, 0, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, + 50, 0, 51, 52, 0, 53, 0, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 62, 63, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 5, 6, 7, 8, 9, 0, + 0, 0, 10, 11, 0, 0, -554, 12, -554, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 237, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 61, 62, 63, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 5, 6, 7, 8, 9, + 0, 0, 0, 10, 11, -554, 0, -554, 12, -554, + 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, + 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, + 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 5, 6, 7, 8, + 9, 0, 0, 0, 10, 11, -554, 0, -554, 12, + -554, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -554, 0, 0, 0, 0, 0, 0, 0, -554, + 4, -554, 5, 6, 7, 8, 9, 0, 0, -554, + 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, + 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 0, 0, -554, 12, -554, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 21, 22, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 200, 63, 5, 6, 7, 0, 9, + 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, + 13, 14, 15, 16, 17, 18, 19, 0, 223, 0, + 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, + 0, 197, 50, 0, 51, 52, 0, 0, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, + 9, 0, 0, 0, 10, 11, 0, 0, 279, 12, + 280, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 0, 29, + 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, + 0, 0, 197, 50, 0, 51, 52, 0, 0, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 5, 6, + 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, + 0, 12, 0, 13, 14, 15, 16, 17, 18, 19, + 0, 223, 0, 0, 0, 20, 21, 22, 23, 24, + 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, + 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, + 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 479, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 134, + 135, 136, 354, 355, 356, 357, 141, 142, 143, 0, + 0, 0, 0, 0, 144, 145, 146, 147, 358, 359, + 360, 361, 152, 37, 38, 362, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 0, + -529, -529, -529, 0, -529, 0, 0, 0, -529, -529, + 0, 182, 363, -529, 0, -529, -529, -529, -529, -529, + -529, -529, 0, -529, 0, 0, 0, -529, -529, -529, + -529, -529, -529, -529, 0, 0, -529, 0, 0, 0, + 0, 0, 0, -529, 0, 0, -529, -529, -529, -529, + -529, -529, -529, -529, -529, -529, -529, -529, 0, -529, + -529, -529, 0, -529, -529, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -529, 0, 0, -529, -529, 0, -529, + -529, 0, -529, -529, -529, -529, -529, -529, -529, -529, + -529, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -529, + -529, -529, 0, 0, 0, 0, 0, 0, -530, -530, + -530, 0, -530, 0, -529, 0, -530, -530, 0, 0, + -529, -530, 0, -530, -530, -530, -530, -530, -530, -530, + 0, -530, 0, 0, 0, -530, -530, -530, -530, -530, + -530, -530, 0, 0, -530, 0, 0, 0, 0, 0, + 0, -530, 0, 0, -530, -530, -530, -530, -530, -530, + -530, -530, -530, -530, -530, -530, 0, -530, -530, -530, + 0, -530, -530, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -530, 0, 0, -530, -530, 0, -530, -530, 0, + -530, -530, -530, -530, -530, -530, -530, -530, -530, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -530, -530, -530, + 0, 0, 0, 0, 0, 0, -532, -532, -532, 0, + -532, 0, -530, 0, -532, -532, 0, 0, -530, -532, + 0, -532, -532, -532, -532, -532, -532, -532, 0, 0, + 0, 0, 0, -532, -532, -532, -532, -532, -532, -532, + 0, 0, -532, 0, 0, 0, 0, 0, 0, -532, + 0, 0, -532, -532, -532, -532, -532, -532, -532, -532, + -532, -532, -532, -532, 0, -532, -532, -532, 0, -532, + -532, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -532, + 720, 0, -532, -532, 0, -532, -532, 0, -532, -532, + -532, -532, -532, -532, -532, -532, -532, 0, 0, 0, + 0, 0, -92, 0, 0, 0, 0, 0, 0, 0, + -534, -534, -534, 0, -534, -532, -532, -532, -534, -534, + 0, 0, 0, -534, 0, -534, -534, -534, -534, -534, + -534, -534, 0, 0, 0, 0, -532, -534, -534, -534, + -534, -534, -534, -534, 0, 0, -534, 0, 0, 0, + 0, 0, 0, -534, 0, 0, -534, -534, -534, -534, + -534, -534, -534, -534, -534, -534, -534, -534, 0, -534, + -534, -534, 0, -534, -534, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -534, 0, 0, -534, -534, 0, -534, + -534, 0, -534, -534, -534, -534, -534, -534, -534, -534, + -534, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -535, -535, -535, 0, -535, -534, + -534, -534, -535, -535, 0, 0, 0, -535, 0, -535, + -535, -535, -535, -535, -535, -535, 0, 0, 0, 0, + -534, -535, -535, -535, -535, -535, -535, -535, 0, 0, + -535, 0, 0, 0, 0, 0, 0, -535, 0, 0, + -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, + -535, -535, 0, -535, -535, -535, 0, -535, -535, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -535, 0, 0, + -535, -535, 0, -535, -535, 0, -535, -535, -535, -535, + -535, -535, -535, -535, -535, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -535, -535, -535, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -535, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 261, 262, 153, 263, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 225, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 0, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 0, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 0, 0, 0, 12, 182, 13, 14, 15, 191, 192, + 18, 19, 0, 0, 0, 0, 0, 193, 230, 231, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 250, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 251, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 252, + 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 253, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 250, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 251, 0, 0, 197, 50, + 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, + 0, 252, 10, 11, 0, 0, 0, 12, 0, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 495, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 21, 22, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, + 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 0, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, + 0, 51, 52, 0, 590, 199, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, + 11, 61, 200, 63, 12, 0, 13, 14, 15, 191, + 192, 18, 19, 0, 0, 0, 0, 0, 193, 230, + 231, 23, 24, 25, 26, 0, 0, 194, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, + 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, + 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, + 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 61, 200, 63, 12, 0, 13, 14, 15, 191, 192, + 18, 19, 0, 0, 0, 0, 0, 193, 230, 231, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, + 200, 63, 12, 0, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, + 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, + 0, 590, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, + 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, + 63, 12, 0, 13, 14, 15, 191, 192, 18, 19, + 0, 0, 0, 0, 0, 193, 230, 231, 23, 24, + 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, + 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, + 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, + 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, + 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, + 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, + 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, + 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, + 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, + 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 196, 0, 0, 197, 50, 0, 51, 52, 0, 489, + 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, + 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, + 0, 13, 14, 15, 191, 192, 18, 19, 0, 0, + 0, 0, 0, 193, 230, 231, 23, 24, 25, 26, + 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, + 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, + 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, + 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, + 13, 14, 15, 191, 192, 18, 19, 0, 0, 0, + 0, 0, 193, 230, 231, 23, 24, 25, 26, 0, + 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, + 0, 197, 50, 0, 51, 52, 0, 763, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, + 197, 50, 0, 51, 52, 0, 489, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 230, 231, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 590, 0, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, + 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 0, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, + 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, + 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, + 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, + 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, + 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, + 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, + 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, + 200, 63, 12, 0, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 251, 0, 0, 295, 50, 0, 51, 52, + 0, 296, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 337, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 344, 36, + 37, 38, 345, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, + 0, 0, 347, 0, 0, 197, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 344, 36, 37, 38, 345, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 347, 0, 0, + 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 251, 0, 0, 295, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 882, 0, 0, + 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 891, 0, 0, 197, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 0, 528, 529, 0, 0, 530, + 0, 0, 0, 0, 0, 0, 0, 0, 252, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 536, 537, 0, 0, 538, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 594, 529, 0, 0, 595, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 597, + 537, 0, 0, 598, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 0, 0, 0, 0, 0, 617, 529, 0, + 0, 618, 0, 0, 0, 0, 0, 0, 0, 182, + 219, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 0, 0, 163, 164, 0, 0, 165, 166, 167, 168, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 0, 0, 0, 0, 0, 620, 537, 0, 0, 621, + 0, 0, 0, 0, 0, 0, 0, 182, 219, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 689, 529, 0, 0, 690, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 692, 537, 0, 0, 693, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 699, + 529, 0, 0, 700, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 0, 0, 0, 0, 0, 575, 537, 0, + 0, 576, 0, 0, 0, 0, 0, 0, 0, 182, + 219, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 0, 0, 163, 164, 0, 0, 165, 166, 167, 168, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 0, 0, 0, 0, 0, 937, 529, 0, 0, 938, + 0, 0, 0, 0, 0, 0, 0, 182, 219, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 943, 529, 0, 0, 944, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 946, 537, 0, 0, 947, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 575, + 537, 0, 0, 576, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 660, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 0, 0, 312, 313, 182, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 314, 0, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324 +}; + +static const yytype_int16 yycheck[] = +{ + 2, 55, 4, 8, 52, 74, 22, 27, 8, 29, + 51, 260, 331, 326, 16, 17, 28, 62, 20, 53, + 212, 65, 550, 28, 4, 260, 298, 244, 28, 85, + 549, 248, 569, 596, 434, 89, 50, 8, 16, 17, + 74, 85, 20, 1, 347, 51, 52, 49, 50, 53, + 443, 53, 86, 87, 88, 55, 619, 28, 49, 267, + 62, 637, 735, 271, 325, 634, 327, 81, 82, 733, + 677, 85, 74, 25, 681, 25, 389, 22, 29, 81, + 82, 25, 61, 85, 86, 87, 88, 25, 237, 89, + 731, 107, 579, 580, 840, 495, 26, 16, 17, 85, + 87, 20, 109, 0, 61, 393, 367, 368, 37, 38, + 25, 87, 82, 87, 76, 85, 85, 25, 85, 651, + 85, 25, 109, 436, 148, 104, 105, 388, 691, 390, + 56, 85, 13, 109, 141, 109, 424, 61, 85, 702, + 385, 65, 25, 59, 60, 25, 295, 195, 393, 106, + 198, 199, 114, 414, 140, 113, 107, 109, 25, 109, + 634, 698, 107, 637, 2, 13, 4, 141, 147, 706, + 139, 140, 918, 140, 815, 140, 437, 651, 16, 17, + 104, 105, 20, 52, 253, 139, 140, 56, 146, 141, + 148, 141, 144, 140, 144, 197, 148, 141, 148, 448, + 13, 137, 27, 141, 877, 143, 13, 137, 222, 873, + 224, 49, 50, 448, 216, 231, 218, 219, 234, 253, + 222, 13, 224, 755, 62, 13, 141, 229, 143, 716, + 250, 624, 625, 141, 875, 237, 26, 141, 216, 222, + 218, 219, 555, 81, 82, 293, 237, 85, 293, 825, + 298, 253, 293, 298, 567, 862, 239, 298, 141, 659, + 829, 141, 296, 566, 472, 146, 28, 148, 909, 838, + 284, 285, 286, 287, 141, 289, 290, 796, 334, 37, + 38, 283, 284, 285, 286, 287, 288, 289, 290, 147, + 334, 293, 296, 295, 296, 556, 298, 216, 146, 218, + 148, 147, 85, 283, 295, 349, 141, 568, 288, 59, + 60, 327, 85, 148, 284, 285, 286, 287, 332, 333, + 85, 146, 571, 148, 326, 325, 328, 864, 373, 374, + 332, 333, 346, 146, 862, 148, 384, 385, 731, 146, + 733, 148, 68, 109, 346, 393, 141, 137, 326, 141, + 85, 825, 85, 143, 146, 143, 148, 140, 146, 197, + 148, 26, 332, 333, 838, 434, 840, 140, 687, 906, + 26, 373, 374, 421, 390, 140, 424, 109, 216, 385, + 218, 219, 945, 85, 222, 85, 224, 389, 388, 99, + 148, 229, 87, 119, 120, 121, 408, 614, 414, 237, + 434, 593, 651, 408, 676, 140, 139, 140, 408, 411, + 143, 389, 395, 413, 109, 421, 399, 141, 85, 402, + 85, 437, 815, 816, 148, 143, 495, 14, 15, 85, + 148, 85, 434, 416, 436, 435, 419, 408, 140, 139, + 140, 489, 87, 85, 918, 283, 284, 285, 286, 287, + 288, 289, 290, 87, 87, 293, 705, 295, 436, 85, + 298, 495, 141, 52, 109, 54, 55, 56, 57, 85, + 705, 143, 137, 140, 139, 140, 109, 87, 143, 85, + 873, 137, 875, 139, 140, 139, 140, 143, 326, 56, + 328, 26, 54, 495, 332, 333, 141, 517, 140, 109, + 89, 63, 64, 551, 548, 549, 95, 96, 346, 85, + 551, 494, 109, 139, 140, 535, 909, 533, 562, 87, + 15, 552, 17, 139, 140, 541, 26, 116, 88, 85, + 119, 850, 665, 139, 140, 373, 374, 856, 87, 672, + 556, 109, 590, 545, 87, 547, 615, 87, 577, 578, + 85, 389, 568, 555, 554, 85, 570, 146, 87, 141, + 109, 577, 578, 139, 140, 567, 566, 569, 570, 109, + 57, 58, 85, 411, 622, 587, 596, 555, 141, 143, + 109, 615, 587, 139, 140, 85, 137, 587, 533, 567, + 659, 605, 141, 609, 610, 143, 541, 637, 436, 619, + 640, 141, 137, 605, 139, 140, 143, 85, 656, 139, + 140, 651, 141, 615, 68, 928, 587, 662, 144, 146, + 869, 148, 145, 668, 669, 659, 139, 140, 676, 631, + 632, 87, 577, 578, 109, 676, 138, 137, 56, 139, + 140, 643, 141, 143, 52, 628, 54, 55, 56, 57, + 652, 695, 68, 109, 708, 686, 61, 659, 106, 106, + 662, 139, 140, 707, 68, 141, 668, 669, 929, 17, + 56, 691, 703, 52, 146, 54, 55, 56, 57, 25, + 694, 94, 702, 697, 144, 141, 52, 68, 54, 55, + 56, 57, 694, 138, 109, 697, 698, 141, 141, 104, + 105, 106, 83, 84, 706, 141, 141, 545, 708, 547, + 52, 713, 714, 141, 52, 763, 147, 555, 141, 141, + 61, 704, 141, 89, 694, 10, 13, 697, 773, 567, + 96, 569, 570, 141, 61, 116, 117, 118, 119, 120, + 121, 724, 8, 138, 141, 793, 146, 730, 141, 2, + 116, 4, 796, 736, 798, 111, 787, 145, 789, 15, + 68, 141, 141, 104, 105, 106, 10, 605, 799, 138, + 141, 773, 786, 804, 141, 83, 84, 104, 105, 106, + 141, 783, 61, 141, 786, 825, 68, 827, 790, 791, + 109, 831, 794, 631, 632, 138, 49, 114, 88, 10, + 840, 835, 842, 51, 52, 643, 141, 141, 810, 117, + 118, 119, 120, 121, 652, 849, 786, 141, 16, 17, + 803, 141, 20, 9, 662, 104, 105, 106, 859, 860, + 668, 669, 10, 835, 138, 117, 118, 119, 120, 121, + 52, 141, 54, 55, 56, 57, 141, 849, 46, 47, + 114, 853, 141, 51, 52, 138, 694, 141, 86, 697, + 698, 141, 864, 56, 62, 63, 141, 141, 706, 141, + 143, 56, 912, 143, 905, 713, 714, 89, 918, 141, + 920, 88, 931, 923, 624, 877, 91, 52, 930, 54, + 55, 56, 57, 94, 896, 52, 898, 54, 55, 56, + 57, 932, 904, 934, 906, 89, 52, 838, 54, 55, + 56, 57, 634, 929, 954, 65, 869, 917, -1, 54, + 55, -1, 57, -1, 89, 945, 928, 927, 63, 64, + 95, 96, 89, -1, -1, 773, -1, 52, 95, 54, + 55, 56, 57, 89, 197, 783, -1, -1, 786, 95, + 928, 116, 790, 791, 119, -1, 794, -1, -1, 207, + -1, -1, -1, -1, 212, 40, 41, 42, 43, 44, + -1, 219, 810, -1, -1, -1, 229, -1, 2, -1, + -1, -1, -1, -1, 237, 52, -1, 54, 55, 56, + 57, -1, -1, -1, -1, -1, 0, 195, -1, -1, + 198, 199, 200, -1, 8, 9, 10, -1, -1, 13, + 14, 15, -1, 17, -1, 853, -1, -1, 216, -1, + 218, 219, 89, 27, -1, 49, 864, -1, 95, 96, + 283, -1, -1, 37, 38, 288, 40, 41, 42, 43, + 44, -1, 295, -1, -1, -1, -1, -1, -1, 116, + -1, -1, 119, -1, -1, -1, -1, -1, 896, -1, + 898, -1, -1, -1, -1, -1, 904, -1, 906, -1, + -1, -1, -1, -1, -1, 328, 143, -1, 326, -1, + -1, 85, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, -1, -1, -1, 293, -1, -1, -1, -1, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, -1, 326, -1, + -1, -1, -1, -1, 138, -1, 140, -1, -1, 143, + 144, 389, 146, -1, 148, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 411, -1, + 52, -1, 54, 55, 56, 57, -1, -1, -1, -1, + -1, -1, -1, 197, -1, 373, 374, 52, -1, 54, + 55, 56, 57, 68, -1, 383, 384, 385, 436, -1, + -1, 389, -1, 391, 392, 393, -1, 89, 83, 84, + -1, -1, -1, 95, 96, 229, 454, -1, 456, -1, + 458, -1, 410, 237, 89, -1, -1, 415, -1, -1, + 95, 96, -1, 421, 116, -1, 424, 119, -1, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 436, -1, + 488, 116, -1, -1, 119, -1, -1, -1, -1, -1, + -1, 143, -1, 2, -1, 4, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 295, -1, -1, -1, -1, -1, -1, -1, 477, + 478, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 489, 545, 541, 547, 543, -1, -1, -1, -1, + 49, -1, -1, -1, 53, -1, -1, 555, -1, -1, + -1, -1, -1, -1, -1, -1, 569, -1, -1, 567, + -1, -1, -1, -1, -1, 74, -1, -1, -1, 577, + 578, 579, 580, -1, -1, -1, -1, 86, 87, 88, + 89, -1, -1, -1, -1, 593, -1, -1, -1, -1, + -1, -1, -1, 551, -1, -1, -1, 555, -1, -1, + -1, -1, 610, -1, -1, -1, -1, -1, -1, 567, + -1, 2, -1, 4, -1, -1, -1, -1, 631, 632, + -1, -1, 630, -1, -1, -1, -1, 411, -1, -1, + 643, -1, 590, -1, -1, -1, -1, -1, -1, 652, + -1, -1, -1, 651, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 456, -1, 458, 49, -1, + -1, -1, 53, -1, 622, -1, -1, -1, 676, 677, + -1, 679, -1, 681, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 74, -1, 698, -1, -1, 197, -1, + -1, -1, -1, 706, -1, 86, 87, 88, 656, -1, + 713, 714, 660, -1, 662, 663, -1, -1, 716, -1, + 668, 669, -1, -1, -1, -1, -1, -1, 676, -1, + 229, -1, -1, -1, -1, -1, -1, -1, 237, -1, + -1, -1, -1, 741, 742, -1, 744, -1, 746, 747, + -1, -1, -1, -1, 253, -1, -1, 755, -1, 757, + -1, 759, 760, -1, -1, -1, -1, 715, -1, -1, + -1, 545, 720, 547, 722, 723, -1, -1, -1, -1, + 783, -1, -1, 781, 283, -1, 784, 790, 791, 288, + -1, 794, 2, -1, 4, -1, 295, 296, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 810, -1, -1, + -1, -1, -1, -1, -1, 763, 197, -1, -1, 767, + -1, -1, -1, -1, -1, 773, -1, -1, -1, 328, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, + -1, -1, -1, -1, -1, 793, -1, -1, 229, -1, + 853, -1, -1, -1, -1, -1, 237, 631, 632, -1, + -1, 864, -1, 811, 862, -1, -1, -1, -1, 643, + -1, -1, 253, -1, -1, -1, 86, -1, 652, -1, + 878, 879, 880, 881, -1, -1, -1, 885, 886, 887, + -1, 889, 890, 896, -1, 898, -1, -1, -1, -1, + -1, 904, 283, 906, -1, -1, -1, 288, -1, -1, + -1, -1, 411, -1, 295, 296, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, 930, 931, -1, 434, -1, -1, 936, 713, + 714, 939, 940, 941, 942, -1, -1, 328, -1, -1, + 741, 742, -1, 744, -1, 746, 747, -1, -1, -1, + -1, 959, -1, -1, -1, -1, 757, -1, 759, 760, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, -1, -1, -1, -1, -1, 197, -1, -1, + -1, -1, -1, -1, -1, -1, 495, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 783, + -1, -1, -1, -1, -1, -1, 790, 791, -1, 229, + 794, -1, -1, -1, -1, -1, -1, 237, -1, -1, + 411, -1, -1, -1, -1, -1, 810, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 545, -1, 547, -1, + -1, -1, -1, 434, -1, -1, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, + 569, 83, 84, 283, -1, -1, -1, -1, 288, 853, + -1, -1, -1, -1, -1, 295, -1, 878, 879, 880, + 881, -1, -1, -1, 885, 886, 887, -1, 889, 890, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -1, -1, -1, -1, 495, -1, 615, -1, 328, -1, + -1, -1, 896, -1, 898, -1, -1, -1, -1, -1, + 904, -1, 631, 632, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 643, 936, -1, -1, 939, 940, + 941, 942, -1, 652, -1, -1, -1, -1, -1, -1, + 659, -1, -1, -1, 545, -1, 547, -1, 959, -1, + -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, -1, 569, 83, + 84, -1, -1, -1, -1, -1, -1, -1, -1, 698, + -1, 411, -1, -1, -1, -1, -1, 706, -1, -1, + -1, -1, -1, -1, 713, 714, 110, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, + -1, -1, -1, -1, 615, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 631, 632, -1, -1, 148, -1, -1, -1, -1, -1, + -1, -1, 643, 644, -1, -1, -1, -1, -1, -1, + -1, 652, -1, -1, -1, -1, -1, -1, 659, -1, + -1, -1, -1, -1, 783, -1, -1, -1, -1, -1, + -1, 790, 791, -1, -1, 794, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 810, -1, -1, -1, -1, -1, 698, -1, -1, + -1, -1, -1, -1, -1, 706, -1, -1, -1, -1, + -1, -1, 713, 714, -1, 545, 835, 547, -1, -1, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 849, 77, 78, -1, 853, -1, -1, 83, 84, 569, + -1, -1, -1, -1, -1, 864, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, -1, 896, -1, 898, + -1, -1, 783, -1, -1, 904, -1, 906, -1, 790, + 791, -1, -1, 794, -1, -1, -1, -1, -1, -1, + -1, 631, 632, -1, -1, -1, -1, -1, -1, 810, + -1, -1, -1, 643, -1, -1, -1, -1, -1, -1, + -1, -1, 652, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 835, -1, -1, -1, -1, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 849, -1, + 77, 78, 853, -1, -1, -1, 83, 84, -1, -1, + -1, -1, -1, 864, -1, -1, -1, -1, 698, -1, + -1, -1, -1, -1, -1, -1, 706, -1, -1, -1, + -1, -1, -1, 713, 714, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 896, -1, 898, -1, 44, + -1, -1, -1, 904, -1, 906, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 783, -1, 83, 84, -1, -1, -1, + 790, 791, -1, -1, 794, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + 810, -1, 110, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 0, 1, 141, 3, 4, 5, + 6, 7, -1, -1, -1, 11, 12, -1, -1, -1, + 16, -1, 18, 19, 20, 21, 22, 23, 24, 849, + -1, -1, -1, 853, 30, 31, 32, 33, 34, 35, + 36, -1, -1, 39, 864, -1, -1, -1, -1, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, + 66, 67, -1, -1, -1, -1, 896, -1, 898, -1, + -1, -1, -1, -1, 904, -1, 906, -1, -1, -1, + 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, + -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 122, 123, 124, 0, + -1, -1, -1, -1, -1, -1, -1, 8, 9, 10, + -1, -1, 13, 14, 15, -1, 17, -1, -1, -1, + 146, -1, 148, -1, -1, -1, 27, 28, 29, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, 40, + 41, 42, 43, 44, -1, -1, -1, -1, -1, -1, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, -1, -1, 83, 84, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, -1, 83, 84, 85, -1, 87, 88, -1, -1, + -1, -1, 110, 94, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, -1, 107, -1, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 138, 139, 140, + 141, 0, -1, 144, 145, 146, -1, 148, -1, 8, + 9, 10, -1, -1, 13, 14, 15, -1, 17, -1, + -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, + -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, + -1, 40, 41, 42, 43, 44, -1, -1, -1, -1, + -1, -1, 68, 69, 70, 71, 72, 73, 74, -1, + -1, 77, 78, -1, -1, -1, -1, 83, 84, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, -1, -1, 83, 84, 85, -1, -1, 88, + -1, -1, -1, -1, -1, 94, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, + -1, 110, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 137, 138, + 139, 140, 141, 0, 143, 144, 145, 146, -1, 148, + -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, + 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, + -1, 88, -1, -1, -1, -1, -1, 94, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 107, -1, -1, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 138, 139, 140, 141, 0, -1, 144, 145, 146, + -1, 148, -1, 8, 9, 10, -1, -1, 13, 14, + 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, + -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, + -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 137, 138, 139, 140, 141, 0, 143, 144, + 145, 146, -1, 148, -1, 8, 9, 10, -1, -1, + 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, + -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, + 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, + -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 138, 139, 140, 141, 0, + 143, 144, 145, 146, -1, 148, -1, 8, 9, 10, + -1, -1, -1, 14, 15, -1, 17, -1, -1, -1, + -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, 40, + 41, 42, 43, 44, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, -1, 83, 84, 85, 0, 87, -1, -1, -1, + -1, -1, -1, 8, 9, 10, -1, -1, -1, 14, + 15, -1, 17, -1, -1, -1, -1, -1, 109, 110, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 37, 38, -1, 40, 41, 42, 43, 44, + -1, -1, -1, -1, -1, -1, 137, 138, 139, 140, + 141, -1, -1, 144, -1, 146, -1, 148, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 85, -1, 87, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 109, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 138, 139, 140, 141, -1, -1, 144, + -1, 146, 1, 148, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, -1, -1, 15, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 146, 1, 148, + 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, + -1, 14, 15, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, + 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 146, 1, 148, 3, 4, 5, 6, + 7, -1, -1, 10, 11, 12, -1, -1, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 146, + 1, 148, 3, 4, 5, 6, 7, -1, -1, 10, + 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, + -1, 1, -1, 3, 4, 5, 6, 7, -1, 9, + 10, 11, 12, -1, -1, 146, 16, 148, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 122, 123, 124, -1, -1, -1, -1, -1, + -1, -1, 1, -1, 3, 4, 5, 6, 7, -1, + -1, -1, 11, 12, -1, -1, 146, 16, 148, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, + -1, -1, -1, 11, 12, 144, -1, 146, 16, 148, + 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, + -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, + 7, -1, -1, -1, 11, 12, 144, -1, 146, 16, + 148, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 1, 148, 3, 4, 5, 6, 7, -1, -1, 10, + 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, -1, -1, 146, 16, 148, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 122, 123, 124, 3, 4, 5, -1, 7, + -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, + 18, 19, 20, 21, 22, 23, 24, -1, 148, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, + -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, -1, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, -1, -1, 11, 12, -1, -1, 146, 16, + 148, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, 3, 4, + 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, + -1, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, 148, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 146, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + -1, 142, 143, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, 26, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, + 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, + 5, -1, 7, -1, 137, -1, 11, 12, -1, -1, + 143, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, 137, -1, 11, 12, -1, -1, 143, 16, + -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + 87, -1, 89, 90, -1, 92, 93, -1, 95, 96, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, + -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, 143, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, -1, 7, 122, + 123, 124, 11, 12, -1, -1, -1, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + 143, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 143, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + -1, -1, -1, 16, 142, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, 122, + 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, 141, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, + -1, 122, 11, 12, -1, -1, -1, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + 141, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, + 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, + 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, + 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, + 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, + -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, + 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, + 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, + 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, + 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, + 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, + 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, + 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, + 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, + -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, + 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, + 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, + 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, + 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, + -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, + -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, + -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, + 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, + -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, + 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, + 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, + 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, + 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, + -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, + 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, + 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, + 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, + 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, + 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, -1, 122, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, -1, -1, -1, -1, -1, 52, 53, -1, + -1, 56, -1, -1, -1, -1, -1, -1, -1, 142, + 143, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, 142, 143, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, -1, -1, -1, -1, -1, 52, 53, -1, + -1, 56, -1, -1, -1, -1, -1, -1, -1, 142, + 143, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, 142, 143, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, 44, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, -1, -1, 83, 84, 142, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 150, 151, 0, 1, 3, 4, 5, 6, 7, + 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, + 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, + 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, + 103, 122, 123, 124, 153, 154, 155, 158, 160, 161, + 164, 165, 167, 168, 169, 171, 172, 182, 196, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 245, 246, 256, 257, 258, 259, 260, 261, 262, 265, + 273, 275, 276, 277, 278, 279, 280, 303, 314, 155, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 56, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 77, 78, 81, 82, 83, 84, 95, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 123, 124, 142, 175, 176, 177, 178, 180, 181, 273, + 275, 21, 22, 30, 39, 58, 86, 89, 95, 96, + 123, 164, 172, 182, 184, 189, 192, 194, 213, 277, + 279, 280, 301, 302, 189, 189, 143, 190, 191, 143, + 186, 190, 143, 148, 308, 54, 177, 308, 157, 137, + 31, 32, 182, 213, 303, 182, 56, 89, 153, 166, + 167, 158, 185, 194, 301, 314, 184, 300, 301, 314, + 46, 86, 122, 141, 171, 196, 213, 277, 280, 239, + 240, 54, 55, 57, 175, 268, 274, 267, 268, 268, + 147, 263, 147, 266, 59, 60, 160, 182, 182, 146, + 148, 307, 312, 313, 40, 41, 42, 43, 44, 37, + 38, 28, 243, 109, 141, 89, 95, 168, 109, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 83, 84, 110, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 85, 139, 140, 197, 158, + 159, 159, 200, 202, 159, 307, 313, 86, 165, 172, + 213, 229, 277, 280, 52, 56, 83, 86, 173, 174, + 213, 277, 280, 174, 33, 34, 35, 36, 49, 50, + 51, 52, 56, 143, 175, 278, 298, 85, 140, 26, + 137, 247, 259, 87, 87, 186, 190, 247, 141, 184, + 56, 184, 184, 109, 88, 141, 193, 314, 85, 139, + 140, 87, 87, 141, 193, 189, 308, 309, 189, 188, + 189, 314, 158, 309, 158, 54, 63, 64, 156, 143, + 183, 137, 153, 85, 140, 87, 166, 144, 309, 198, + 145, 141, 148, 311, 141, 311, 138, 311, 308, 56, + 59, 60, 168, 170, 141, 85, 139, 140, 52, 54, + 55, 56, 57, 89, 95, 96, 116, 119, 143, 241, + 284, 285, 286, 287, 288, 289, 292, 293, 294, 295, + 296, 61, 104, 105, 106, 269, 106, 269, 106, 65, + 106, 106, 264, 269, 106, 61, 106, 68, 68, 146, + 155, 159, 159, 159, 159, 155, 158, 158, 244, 95, + 160, 184, 194, 195, 166, 141, 171, 141, 160, 182, + 184, 195, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 52, 53, + 56, 180, 186, 304, 305, 188, 52, 53, 56, 180, + 186, 304, 152, 153, 13, 225, 312, 225, 159, 159, + 307, 17, 250, 56, 85, 139, 140, 25, 158, 52, + 56, 173, 1, 113, 281, 312, 85, 139, 140, 209, + 299, 210, 85, 140, 306, 52, 56, 304, 304, 249, + 248, 160, 182, 160, 182, 94, 162, 179, 182, 184, + 95, 184, 192, 301, 52, 56, 188, 52, 56, 302, + 309, 144, 309, 309, 177, 199, 182, 153, 138, 304, + 304, 182, 309, 309, 301, 141, 170, 52, 56, 188, + 52, 56, 109, 52, 89, 95, 230, 231, 232, 286, + 284, 29, 107, 242, 141, 297, 314, 141, 297, 52, + 141, 297, 52, 271, 270, 147, 269, 147, 182, 182, + 76, 114, 234, 235, 314, 184, 141, 309, 170, 141, + 44, 308, 87, 87, 186, 190, 308, 310, 87, 87, + 186, 187, 190, 314, 10, 224, 8, 252, 314, 153, + 13, 153, 27, 226, 312, 226, 250, 194, 224, 52, + 56, 188, 52, 56, 204, 207, 312, 282, 206, 52, + 56, 173, 188, 152, 158, 143, 283, 284, 211, 187, + 190, 187, 190, 234, 234, 44, 163, 177, 184, 193, + 87, 310, 87, 87, 158, 138, 311, 168, 310, 184, + 232, 141, 286, 141, 309, 146, 236, 314, 153, 153, + 287, 292, 294, 296, 288, 289, 294, 288, 153, 54, + 55, 57, 272, 280, 52, 233, 236, 288, 290, 291, + 294, 296, 153, 95, 184, 170, 182, 111, 160, 182, + 182, 162, 145, 87, 160, 182, 160, 182, 162, 184, + 195, 253, 314, 15, 228, 314, 14, 227, 228, 228, + 201, 203, 224, 141, 225, 310, 159, 312, 159, 152, + 310, 224, 309, 284, 152, 312, 175, 153, 153, 182, + 234, 87, 309, 309, 231, 141, 95, 230, 52, 237, + 238, 285, 309, 10, 138, 141, 297, 141, 297, 141, + 297, 141, 297, 297, 138, 109, 236, 114, 141, 297, + 141, 297, 141, 297, 10, 184, 182, 160, 182, 88, + 254, 314, 153, 9, 255, 314, 159, 224, 224, 153, + 153, 184, 153, 226, 208, 312, 224, 309, 224, 212, + 10, 138, 153, 141, 231, 141, 286, 141, 288, 294, + 288, 288, 86, 213, 114, 291, 294, 288, 290, 294, + 288, 86, 172, 213, 277, 280, 225, 153, 225, 224, + 224, 228, 250, 251, 205, 152, 283, 138, 231, 141, + 238, 297, 141, 297, 297, 297, 56, 85, 141, 297, + 141, 297, 297, 141, 297, 297, 56, 85, 139, 140, + 153, 153, 153, 224, 152, 231, 288, 52, 56, 288, + 294, 288, 288, 52, 56, 188, 52, 56, 252, 227, + 224, 224, 297, 297, 141, 297, 297, 297, 310, 288, + 297 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + parser_yyerror (parser, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, parser); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + struct parser_params *parser; +#endif +{ + if (!yyvaluep) + return; + YYUSE (parser); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, parser) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + struct parser_params *parser; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) +#else +static void +yy_reduce_print (yyvsp, yyrule, parser) + YYSTYPE *yyvsp; + int yyrule; + struct parser_params *parser; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , parser); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, parser); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +#ifndef yydebug +int yydebug; +#endif +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, parser) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + struct parser_params *parser; +#endif +{ + YYUSE (yyvaluep); + YYUSE (parser); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (struct parser_params *parser); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (struct parser_params *parser) +#else +int +yyparse (parser) + struct parser_params *parser; +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 763 "ripper.y" + { + lex_state = EXPR_BEG; +#if 0 + local_push(compile_for_eval); +#endif + + ;} + break; + + case 3: +#line 771 "ripper.y" + { +#if 0 + if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { + /* last expression should not be void */ + if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); + else { + NODE *node = (yyvsp[(2) - (2)].val); + while (node->nd_next) { + node = node->nd_next; + } + void_expr(node->nd_head); + } + } + ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); + local_pop(); +#endif + (yyval.val) = (yyvsp[(2) - (2)].val); + parser->result = dispatch1(program, (yyval.val)); + + ;} + break; + + case 4: +#line 797 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(1) - (4)].val); + if ((yyvsp[(2) - (4)].val)) { + (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); + } + else if ((yyvsp[(3) - (4)].val)) { + rb_warn0("else without rescue is useless"); + (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); + } + if ((yyvsp[(4) - (4)].val)) { + if ((yyval.val)) { + (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); + } + else { + (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); + } + } + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch4(body_stmt, + escape_Qundef((yyvsp[(1) - (4)].val)), + escape_Qundef((yyvsp[(2) - (4)].val)), + escape_Qundef((yyvsp[(3) - (4)].val)), + escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 5: +#line 827 "ripper.y" + { +#if 0 + void_stmts((yyvsp[(1) - (2)].val)); + fixup_nodes(&deferred_nodes); +#endif + + (yyval.val) = (yyvsp[(1) - (2)].val); + ;} + break; + + case 6: +#line 838 "ripper.y" + { +#if 0 + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), + dispatch0(void_stmt)); + + ;} + break; + + case 7: +#line 847 "ripper.y" + { +#if 0 + (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 8: +#line 855 "ripper.y" + { +#if 0 + (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 9: +#line 863 "ripper.y" + { + (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); + ;} + break; + + case 10: +#line 868 "ripper.y" + {lex_state = EXPR_FNAME;;} + break; + + case 11: +#line 869 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 12: +#line 877 "ripper.y" + { +#if 0 + (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 13: +#line 885 "ripper.y" + { +#if 0 + char buf[3]; + + sprintf(buf, "$%c", (char)(yyvsp[(3) - (3)].val)->nd_nth); + (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern(buf)); +#endif + (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 14: +#line 896 "ripper.y" + { +#if 0 + yyerror("can't make alias for the number variables"); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + (yyval.val) = dispatch1(alias_error, (yyval.val)); + + ;} + break; + + case 15: +#line 906 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 16: +#line 914 "ripper.y" + { +#if 0 + (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); + fixpos((yyval.val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); + + ;} + break; + + case 17: +#line 923 "ripper.y" + { +#if 0 + (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); + fixpos((yyval.val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); + + ;} + break; + + case 18: +#line 932 "ripper.y" + { +#if 0 + if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { + (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); + } + else { + (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); + } +#endif + (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); + + ;} + break; + + case 19: +#line 945 "ripper.y" + { +#if 0 + if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { + (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); + } + else { + (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); + } +#endif + (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); + + ;} + break; + + case 20: +#line 958 "ripper.y" + { +#if 0 + NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); + (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); +#endif + (yyval.val) = dispatch2(rescue_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); + + ;} + break; + + case 21: +#line 967 "ripper.y" + { + if (in_def || in_single) { + yyerror("BEGIN in method"); + } +#if 0 + /* local_push(0); */ +#endif + + ;} + break; + + case 22: +#line 977 "ripper.y" + { +#if 0 + ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, + (yyvsp[(4) - (5)].val)); + /* NEW_PREEXE($4)); */ + /* local_pop(); */ + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 23: +#line 989 "ripper.y" + { + if (in_def || in_single) { + rb_warn0("END in method; use at_exit"); + } +#if 0 + (yyval.val) = NEW_POSTEXE(NEW_NODE( + NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); +#endif + (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 24: +#line 1001 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 25: +#line 1010 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = (yyvsp[(1) - (3)].val); +#endif + (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 26: +#line 1020 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + if ((yyvsp[(1) - (3)].val)) { + ID vid = (yyvsp[(1) - (3)].val)->nd_vid; + if ((yyvsp[(2) - (3)].val) == tOROP) { + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); + if (is_asgn_or_id(vid)) { + (yyval.val)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (3)].val) == tANDOP) { + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); + } + else { + (yyval.val) = (yyvsp[(1) - (3)].val); + (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); + } + } + else { + (yyval.val) = NEW_BEGIN(0); + } +#endif + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 27: +#line 1049 "ripper.y" + { +#if 0 + NODE *args; + + value_expr((yyvsp[(6) - (6)].val)); + if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); + args = arg_concat((yyvsp[(6) - (6)].val), (yyvsp[(3) - (6)].val)); + if ((yyvsp[(5) - (6)].val) == tOROP) { + (yyvsp[(5) - (6)].val) = 0; + } + else if ((yyvsp[(5) - (6)].val) == tANDOP) { + (yyvsp[(5) - (6)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); + fixpos((yyval.val), (yyvsp[(1) - (6)].val)); +#endif + (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); + + ;} + break; + + case 28: +#line 1070 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 29: +#line 1087 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 30: +#line 1104 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 31: +#line 1121 "ripper.y" + { +#if 0 + rb_backref_error((yyvsp[(1) - (3)].val)); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); + (yyval.val) = dispatch1(assign_error, (yyval.val)); + + ;} + break; + + case 32: +#line 1131 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 33: +#line 1140 "ripper.y" + { +#if 0 + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = (yyvsp[(1) - (3)].val); +#endif + (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 34: +#line 1149 "ripper.y" + { +#if 0 + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = (yyvsp[(1) - (3)].val); +#endif + (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 37: +#line 1162 "ripper.y" + { +#if 0 + (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 38: +#line 1170 "ripper.y" + { +#if 0 + (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 39: +#line 1178 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 40: +#line 1186 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); +#endif + (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 42: +#line 1197 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (1)].val)); + (yyval.val) = (yyvsp[(1) - (1)].val); + if (!(yyval.val)) (yyval.val) = NEW_NIL(); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 45: +#line 1211 "ripper.y" + { +#if 0 + (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); +#endif + (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 46: +#line 1219 "ripper.y" + { +#if 0 + (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); +#endif + (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 47: +#line 1227 "ripper.y" + { +#if 0 + (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); +#endif + (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 49: +#line 1238 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 50: +#line 1247 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 51: +#line 1258 "ripper.y" + { +#if 0 + dyna_push(); + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 52: +#line 1268 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); + nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); + dyna_pop(); +#endif + (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 53: +#line 1280 "ripper.y" + { +#if 0 + (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + fixpos((yyval.val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 54: +#line 1289 "ripper.y" + { +#if 0 + block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); + (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); + (yyval.val) = (yyvsp[(3) - (3)].val); + fixpos((yyval.val), (yyvsp[(2) - (3)].val)); +#endif + (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); + (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 55: +#line 1301 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 56: +#line 1310 "ripper.y" + { +#if 0 + block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); + (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); + (yyval.val) = (yyvsp[(5) - (5)].val); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); + (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 57: +#line 1322 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 58: +#line 1331 "ripper.y" + { +#if 0 + block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); + (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); + (yyval.val) = (yyvsp[(5) - (5)].val); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); + (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 59: +#line 1343 "ripper.y" + { +#if 0 + (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); + fixpos((yyval.val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 60: +#line 1352 "ripper.y" + { +#if 0 + (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); + fixpos((yyval.val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 62: +#line 1364 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 64: +#line 1375 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 65: +#line 1385 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 66: +#line 1393 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); +#endif + (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 67: +#line 1401 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 68: +#line 1409 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); + + ;} + break; + + case 69: +#line 1417 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); + + ;} + break; + + case 70: +#line 1425 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); + + ;} + break; + + case 71: +#line 1433 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 72: +#line 1441 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); + + ;} + break; + + case 73: +#line 1449 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, -1); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); + + ;} + break; + + case 74: +#line 1457 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); + + ;} + break; + + case 76: +#line 1468 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 77: +#line 1478 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); +#endif + (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); + + ;} + break; + + case 78: +#line 1486 "ripper.y" + { +#if 0 + (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); +#endif + (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 79: +#line 1496 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 80: +#line 1504 "ripper.y" + { +#if 0 + (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 81: +#line 1514 "ripper.y" + { +#if 0 + (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 82: +#line 1522 "ripper.y" + { +#if 0 + (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); +#endif + (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); + + ;} + break; + + case 83: +#line 1530 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 84: +#line 1538 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 85: +#line 1546 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 86: +#line 1554 "ripper.y" + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); +#endif + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 87: +#line 1566 "ripper.y" + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); +#endif + (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 88: +#line 1576 "ripper.y" + { +#if 0 + rb_backref_error((yyvsp[(1) - (1)].val)); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); + (yyval.val) = dispatch1(assign_error, (yyval.val)); + + ;} + break; + + case 89: +#line 1588 "ripper.y" + { +#if 0 + if (!((yyval.val) = assignable((yyvsp[(1) - (1)].val), 0))) (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 90: +#line 1596 "ripper.y" + { +#if 0 + (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); +#endif + (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); + + ;} + break; + + case 91: +#line 1604 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 92: +#line 1612 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 93: +#line 1620 "ripper.y" + { +#if 0 + (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 94: +#line 1628 "ripper.y" + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + if (in_def || in_single) { + (yyval.val) = dispatch1(assign_error, (yyval.val)); + } + + ;} + break; + + case 95: +#line 1641 "ripper.y" + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); +#endif + (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); + if (in_def || in_single) { + (yyval.val) = dispatch1(assign_error, (yyval.val)); + } + + ;} + break; + + case 96: +#line 1654 "ripper.y" + { +#if 0 + rb_backref_error((yyvsp[(1) - (1)].val)); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 97: +#line 1665 "ripper.y" + { +#if 0 + yyerror("class/module name must be CONSTANT"); +#endif + (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 99: +#line 1676 "ripper.y" + { +#if 0 + (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 100: +#line 1684 "ripper.y" + { +#if 0 + (yyval.val) = NEW_COLON2(0, (yyval.val)); +#endif + (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 101: +#line 1692 "ripper.y" + { +#if 0 + (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 105: +#line 1705 "ripper.y" + { +#if 0 + lex_state = EXPR_END; + (yyval.val) = (yyvsp[(1) - (1)].val); +#endif + lex_state = EXPR_END; + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 106: +#line 1715 "ripper.y" + { +#if 0 + lex_state = EXPR_END; + (yyval.val) = (yyvsp[(1) - (1)].id); +#endif + lex_state = EXPR_END; + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 109: +#line 1731 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); +#endif + (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 111: +#line 1742 "ripper.y" + { +#if 0 + (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 112: +#line 1749 "ripper.y" + {lex_state = EXPR_FNAME;;} + break; + + case 113: +#line 1750 "ripper.y" + { +#if 0 + (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); +#endif + rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 114: +#line 1759 "ripper.y" + { ifndef_ripper((yyval.val) = '|'); ;} + break; + + case 115: +#line 1760 "ripper.y" + { ifndef_ripper((yyval.val) = '^'); ;} + break; + + case 116: +#line 1761 "ripper.y" + { ifndef_ripper((yyval.val) = '&'); ;} + break; + + case 117: +#line 1762 "ripper.y" + { ifndef_ripper((yyval.val) = tCMP); ;} + break; + + case 118: +#line 1763 "ripper.y" + { ifndef_ripper((yyval.val) = tEQ); ;} + break; + + case 119: +#line 1764 "ripper.y" + { ifndef_ripper((yyval.val) = tEQQ); ;} + break; + + case 120: +#line 1765 "ripper.y" + { ifndef_ripper((yyval.val) = tMATCH); ;} + break; + + case 121: +#line 1766 "ripper.y" + { ifndef_ripper((yyval.val) = tNMATCH); ;} + break; + + case 122: +#line 1767 "ripper.y" + { ifndef_ripper((yyval.val) = '>'); ;} + break; + + case 123: +#line 1768 "ripper.y" + { ifndef_ripper((yyval.val) = tGEQ); ;} + break; + + case 124: +#line 1769 "ripper.y" + { ifndef_ripper((yyval.val) = '<'); ;} + break; + + case 125: +#line 1770 "ripper.y" + { ifndef_ripper((yyval.val) = tLEQ); ;} + break; + + case 126: +#line 1771 "ripper.y" + { ifndef_ripper((yyval.val) = tNEQ); ;} + break; + + case 127: +#line 1772 "ripper.y" + { ifndef_ripper((yyval.val) = tLSHFT); ;} + break; + + case 128: +#line 1773 "ripper.y" + { ifndef_ripper((yyval.val) = tRSHFT); ;} + break; + + case 129: +#line 1774 "ripper.y" + { ifndef_ripper((yyval.val) = '+'); ;} + break; + + case 130: +#line 1775 "ripper.y" + { ifndef_ripper((yyval.val) = '-'); ;} + break; + + case 131: +#line 1776 "ripper.y" + { ifndef_ripper((yyval.val) = '*'); ;} + break; + + case 132: +#line 1777 "ripper.y" + { ifndef_ripper((yyval.val) = '*'); ;} + break; + + case 133: +#line 1778 "ripper.y" + { ifndef_ripper((yyval.val) = '/'); ;} + break; + + case 134: +#line 1779 "ripper.y" + { ifndef_ripper((yyval.val) = '%'); ;} + break; + + case 135: +#line 1780 "ripper.y" + { ifndef_ripper((yyval.val) = tPOW); ;} + break; + + case 136: +#line 1781 "ripper.y" + { ifndef_ripper((yyval.val) = '!'); ;} + break; + + case 137: +#line 1782 "ripper.y" + { ifndef_ripper((yyval.val) = '~'); ;} + break; + + case 138: +#line 1783 "ripper.y" + { ifndef_ripper((yyval.val) = tUPLUS); ;} + break; + + case 139: +#line 1784 "ripper.y" + { ifndef_ripper((yyval.val) = tUMINUS); ;} + break; + + case 140: +#line 1785 "ripper.y" + { ifndef_ripper((yyval.val) = tAREF); ;} + break; + + case 141: +#line 1786 "ripper.y" + { ifndef_ripper((yyval.val) = tASET); ;} + break; + + case 142: +#line 1787 "ripper.y" + { ifndef_ripper((yyval.val) = '`'); ;} + break; + + case 184: +#line 1805 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 185: +#line 1814 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (5)].val)); + (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); + (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); +#endif + (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); + + ;} + break; + + case 186: +#line 1824 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (3)].val)); + if ((yyvsp[(1) - (3)].val)) { + ID vid = (yyvsp[(1) - (3)].val)->nd_vid; + if ((yyvsp[(2) - (3)].val) == tOROP) { + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); + if (is_asgn_or_id(vid)) { + (yyval.val)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (3)].val) == tANDOP) { + (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); + (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); + } + else { + (yyval.val) = (yyvsp[(1) - (3)].val); + (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); + } + } + else { + (yyval.val) = NEW_BEGIN(0); + } +#endif + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 187: +#line 1853 "ripper.y" + { +#if 0 + value_expr((yyvsp[(3) - (5)].val)); + (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); + if ((yyvsp[(1) - (5)].val)) { + ID vid = (yyvsp[(1) - (5)].val)->nd_vid; + if ((yyvsp[(2) - (5)].val) == tOROP) { + (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); + (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val)); + if (is_asgn_or_id(vid)) { + (yyval.val)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (5)].val) == tANDOP) { + (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); + (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val)); + } + else { + (yyval.val) = (yyvsp[(1) - (5)].val); + (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val))); + } + } + else { + (yyval.val) = NEW_BEGIN(0); + } +#endif + (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); + + ;} + break; + + case 188: +#line 1884 "ripper.y" + { +#if 0 + NODE *args; + + value_expr((yyvsp[(6) - (6)].val)); + if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); + args = arg_concat((yyvsp[(6) - (6)].val), (yyvsp[(3) - (6)].val)); + if ((yyvsp[(5) - (6)].val) == tOROP) { + (yyvsp[(5) - (6)].val) = 0; + } + else if ((yyvsp[(5) - (6)].val) == tANDOP) { + (yyvsp[(5) - (6)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); + fixpos((yyval.val), (yyvsp[(1) - (6)].val)); +#endif + (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); + + ;} + break; + + case 189: +#line 1905 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 190: +#line 1922 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 191: +#line 1939 "ripper.y" + { +#if 0 + value_expr((yyvsp[(5) - (5)].val)); + if ((yyvsp[(4) - (5)].val) == tOROP) { + (yyvsp[(4) - (5)].val) = 0; + } + else if ((yyvsp[(4) - (5)].val) == tANDOP) { + (yyvsp[(4) - (5)].val) = 1; + } + (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(1) - (5)].val)); +#endif + (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 192: +#line 1956 "ripper.y" + { +#if 0 + yyerror("constant re-assignment"); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + (yyval.val) = dispatch1(assign_error, (yyval.val)); + + ;} + break; + + case 193: +#line 1967 "ripper.y" + { +#if 0 + yyerror("constant re-assignment"); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + (yyval.val) = dispatch1(assign_error, (yyval.val)); + + ;} + break; + + case 194: +#line 1978 "ripper.y" + { +#if 0 + rb_backref_error((yyvsp[(1) - (3)].val)); + (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); + (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + (yyval.val) = dispatch1(assign_error, (yyval.val)); + + ;} + break; + + case 195: +#line 1989 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (3)].val)); + value_expr((yyvsp[(3) - (3)].val)); + (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && + nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, (yyval.val)); + } +#endif + (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 196: +#line 2003 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (3)].val)); + value_expr((yyvsp[(3) - (3)].val)); + (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && + nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, (yyval.val)); + } +#endif + (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 197: +#line 2017 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 198: +#line 2025 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 199: +#line 2033 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 200: +#line 2041 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 201: +#line 2049 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 202: +#line 2057 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 203: +#line 2065 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); + (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); + + ;} + break; + + case 204: +#line 2074 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); + (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); + + ;} + break; + + case 205: +#line 2083 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 206: +#line 2091 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 207: +#line 2099 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 208: +#line 2107 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 209: +#line 2115 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 210: +#line 2123 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 211: +#line 2131 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 212: +#line 2139 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 213: +#line 2147 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 214: +#line 2155 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 215: +#line 2163 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 216: +#line 2171 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 217: +#line 2179 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 218: +#line 2187 "ripper.y" + { +#if 0 + (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) { + (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); + } +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 219: +#line 2198 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 220: +#line 2206 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); +#endif + (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 221: +#line 2214 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); +#endif + (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 222: +#line 2222 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 223: +#line 2230 "ripper.y" + { +#if 0 + (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 224: +#line 2238 "ripper.y" + { +#if 0 + (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 225: +#line 2246 "ripper.y" + { +#if 0 + (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 226: +#line 2253 "ripper.y" + {in_defined = 1;;} + break; + + case 227: +#line 2254 "ripper.y" + { +#if 0 + in_defined = 0; + (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); +#endif + in_defined = 0; + (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 228: +#line 2264 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (6)].val)); + (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); + fixpos((yyval.val), (yyvsp[(1) - (6)].val)); +#endif + (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); + + ;} + break; + + case 229: +#line 2274 "ripper.y" + { + (yyval.val) = (yyvsp[(1) - (1)].val); + ;} + break; + + case 230: +#line 2280 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (1)].val)); + (yyval.val) = (yyvsp[(1) - (1)].val); + if (!(yyval.val)) (yyval.val) = NEW_NIL(); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 232: +#line 2293 "ripper.y" + { + (yyval.val) = (yyvsp[(1) - (2)].val); + ;} + break; + + case 233: +#line 2297 "ripper.y" + { +#if 0 + (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); +#endif + (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 234: +#line 2305 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); +#endif + (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); + + ;} + break; + + case 235: +#line 2315 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); + + ;} + break; + + case 240: +#line 2333 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 241: +#line 2341 "ripper.y" + { +#if 0 + (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 242: +#line 2349 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); + (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); + (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 243: +#line 2359 "ripper.y" + { +#if 0 + (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); + (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 244: +#line 2370 "ripper.y" + { + (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); + ;} + break; + + case 245: +#line 2376 "ripper.y" + { + (yyval.num) = cmdarg_stack; + CMDARG_PUSH(1); + ;} + break; + + case 246: +#line 2381 "ripper.y" + { + /* CMDARG_POP() */ + cmdarg_stack = (yyvsp[(1) - (2)].num); + (yyval.val) = (yyvsp[(2) - (2)].val); + ;} + break; + + case 247: +#line 2389 "ripper.y" + { +#if 0 + (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = (yyvsp[(2) - (2)].val); + + ;} + break; + + case 248: +#line 2399 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (2)].val); + ;} + break; + + case 249: +#line 2403 "ripper.y" + { + (yyval.val) = 0; + ;} + break; + + case 250: +#line 2407 "ripper.y" + { + (yyval.val) = 0; + ;} + break; + + case 251: +#line 2413 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 252: +#line 2421 "ripper.y" + { +#if 0 + (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 253: +#line 2429 "ripper.y" + { +#if 0 + NODE *n1; + if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { + (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); + } + else { + (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + } +#endif + (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 254: +#line 2443 "ripper.y" + { +#if 0 + NODE *n1; + if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { + (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); + } + else { + (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); + } +#endif + (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 255: +#line 2459 "ripper.y" + { +#if 0 + NODE *n1; + if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { + (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); + } + else { + (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + } +#endif + (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 256: +#line 2473 "ripper.y" + { +#if 0 + NODE *n1; + if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && + (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { + (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); + } + else { + (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); + } +#endif + (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 257: +#line 2488 "ripper.y" + { +#if 0 + (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 266: +#line 2506 "ripper.y" + { +#if 0 + (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); + + ;} + break; + + case 267: +#line 2514 "ripper.y" + { +#if 0 + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 268: +#line 2522 "ripper.y" + { +#if 0 + if ((yyvsp[(3) - (4)].val) == NULL) { + (yyval.val) = NEW_NIL(); + } + else { + if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || + nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) + nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); + (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); + } + nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); +#endif + (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 269: +#line 2538 "ripper.y" + {lex_state = EXPR_ENDARG;;} + break; + + case 270: +#line 2539 "ripper.y" + { + rb_warning0("(...) interpreted as grouped expression"); +#if 0 + (yyval.val) = (yyvsp[(2) - (4)].val); +#endif + (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); + + ;} + break; + + case 271: +#line 2548 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 272: +#line 2556 "ripper.y" + { +#if 0 + (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 273: +#line 2564 "ripper.y" + { +#if 0 + (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 274: +#line 2572 "ripper.y" + { +#if 0 + if ((yyvsp[(2) - (3)].val) == 0) { + (yyval.val) = NEW_ZARRAY(); /* zero length array*/ + } + else { + (yyval.val) = (yyvsp[(2) - (3)].val); + } +#endif + (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); + + ;} + break; + + case 275: +#line 2585 "ripper.y" + { +#if 0 + (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); +#endif + (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); + + ;} + break; + + case 276: +#line 2593 "ripper.y" + { +#if 0 + (yyval.val) = NEW_RETURN(0); +#endif + (yyval.val) = dispatch0(return0); + + ;} + break; + + case 277: +#line 2601 "ripper.y" + { +#if 0 + (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); +#endif + (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); + + ;} + break; + + case 278: +#line 2609 "ripper.y" + { +#if 0 + (yyval.val) = NEW_YIELD(0, Qfalse); +#endif + (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); + + ;} + break; + + case 279: +#line 2617 "ripper.y" + { +#if 0 + (yyval.val) = NEW_YIELD(0, Qfalse); +#endif + (yyval.val) = dispatch0(yield0); + + ;} + break; + + case 280: +#line 2624 "ripper.y" + {in_defined = 1;;} + break; + + case 281: +#line 2625 "ripper.y" + { +#if 0 + in_defined = 0; + (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); +#endif + in_defined = 0; + (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); + + ;} + break; + + case 282: +#line 2635 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 283: +#line 2643 "ripper.y" + { +#if 0 + (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); + + ;} + break; + + case 284: +#line 2651 "ripper.y" + { +#if 0 + (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0); + (yyval.val) = (yyvsp[(2) - (2)].val); + fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); + (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 286: +#line 2663 "ripper.y" + { +#if 0 + block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); + (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); + (yyval.val) = (yyvsp[(2) - (2)].val); + fixpos((yyval.val), (yyvsp[(1) - (2)].val)); +#endif + (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 287: +#line 2674 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (2)].val); + ;} + break; + + case 288: +#line 2681 "ripper.y" + { +#if 0 + (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); + fixpos((yyval.val), (yyvsp[(2) - (6)].val)); +#endif + (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); + + ;} + break; + + case 289: +#line 2693 "ripper.y" + { +#if 0 + (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); + fixpos((yyval.val), (yyvsp[(2) - (6)].val)); +#endif + (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); + + ;} + break; + + case 290: +#line 2701 "ripper.y" + {COND_PUSH(1);;} + break; + + case 291: +#line 2701 "ripper.y" + {COND_POP();;} + break; + + case 292: +#line 2704 "ripper.y" + { +#if 0 + (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); + fixpos((yyval.val), (yyvsp[(3) - (7)].val)); +#endif + (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); + + ;} + break; + + case 293: +#line 2712 "ripper.y" + {COND_PUSH(1);;} + break; + + case 294: +#line 2712 "ripper.y" + {COND_POP();;} + break; + + case 295: +#line 2715 "ripper.y" + { +#if 0 + (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); + fixpos((yyval.val), (yyvsp[(3) - (7)].val)); +#endif + (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); + + ;} + break; + + case 296: +#line 2726 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); + fixpos((yyval.val), (yyvsp[(2) - (5)].val)); +#endif + (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 297: +#line 2735 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); +#endif + (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 298: +#line 2743 "ripper.y" + {COND_PUSH(1);;} + break; + + case 299: +#line 2745 "ripper.y" + {COND_POP();;} + break; + + case 300: +#line 2748 "ripper.y" + { +#if 0 + /* + * for a, b, c in e + * #=> + * e.each{|*x| a, b, c = x + * + * for a in e + * #=> + * e.each{|x| a, = x} + */ + ID id = internal_id(); + ID *tbl = ALLOC_N(ID, 2); + NODE *m = NEW_ARGS_AUX(0, 0); + NODE *args, *scope; + + if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { + /* if args.length == 1 && args[0].kind_of?(Array) + * args = args[0] + * end + */ + NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); + NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); + m->nd_next = block_append( + NEW_IF( + NEW_NODE(NODE_AND, + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), + rb_intern("=="), one), + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), + rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), + 0), + NEW_DASGN_CURR(id, + NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), + 0), + node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); + + args = new_args(m, 0, id, 0, 0); + } + else { + if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || + nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || + nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { + (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); + m->nd_plen = 1; + m->nd_next = (yyvsp[(2) - (9)].val); + args = new_args(m, 0, 0, 0, 0); + } + else { + m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); + args = new_args(m, 0, id, 0, 0); + } + } + scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); + tbl[0] = 1; tbl[1] = id; + (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); + fixpos((yyval.val), (yyvsp[(2) - (9)].val)); +#endif + (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); + + ;} + break; + + case 301: +#line 2809 "ripper.y" + { + if (in_def || in_single) + yyerror("class definition in method body"); +#if 0 + local_push(0); + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 302: +#line 2820 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); + nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); + local_pop(); +#endif + (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); + + ;} + break; + + case 303: +#line 2830 "ripper.y" + { + (yyval.num) = in_def; + in_def = 0; + ;} + break; + + case 304: +#line 2835 "ripper.y" + { + (yyval.num) = in_single; + in_single = 0; +#if 0 + local_push(0); +#endif + + ;} + break; + + case 305: +#line 2845 "ripper.y" + { +#if 0 + (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); + fixpos((yyval.val), (yyvsp[(3) - (8)].val)); + local_pop(); +#endif + (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); + + in_def = (yyvsp[(4) - (8)].num); + in_single = (yyvsp[(6) - (8)].num); + ;} + break; + + case 306: +#line 2857 "ripper.y" + { + if (in_def || in_single) + yyerror("module definition in method body"); +#if 0 + local_push(0); + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 307: +#line 2868 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); + nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); + local_pop(); +#endif + (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 308: +#line 2878 "ripper.y" + { + (yyval.id) = cur_mid; + cur_mid = (yyvsp[(2) - (2)].val); + in_def++; +#if 0 + local_push(0); +#endif + + ;} + break; + + case 309: +#line 2890 "ripper.y" + { +#if 0 + NODE *body = remove_begin((yyvsp[(5) - (6)].val)); + reduce_nodes(&body); + (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); + fixpos((yyval.val), (yyvsp[(4) - (6)].val)); + fixpos((yyval.val)->nd_defn, (yyvsp[(4) - (6)].val)); + local_pop(); +#endif + (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); + + in_def--; + cur_mid = (yyvsp[(3) - (6)].id); + ;} + break; + + case 310: +#line 2904 "ripper.y" + {lex_state = EXPR_FNAME;;} + break; + + case 311: +#line 2905 "ripper.y" + { + in_single++; + lex_state = EXPR_END; /* force for args */ +#if 0 + local_push(0); +#endif + + ;} + break; + + case 312: +#line 2916 "ripper.y" + { +#if 0 + NODE *body = remove_begin((yyvsp[(8) - (9)].val)); + reduce_nodes(&body); + (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); + fixpos((yyval.val), (yyvsp[(2) - (9)].val)); + fixpos((yyval.val)->nd_defn, (yyvsp[(2) - (9)].val)); + local_pop(); +#endif + (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); + + in_single--; + ;} + break; + + case 313: +#line 2930 "ripper.y" + { +#if 0 + (yyval.val) = NEW_BREAK(0); +#endif + (yyval.val) = dispatch1(break, arg_new()); + + ;} + break; + + case 314: +#line 2938 "ripper.y" + { +#if 0 + (yyval.val) = NEW_NEXT(0); +#endif + (yyval.val) = dispatch1(next, arg_new()); + + ;} + break; + + case 315: +#line 2946 "ripper.y" + { +#if 0 + (yyval.val) = NEW_REDO(); +#endif + (yyval.val) = dispatch0(redo); + + ;} + break; + + case 316: +#line 2954 "ripper.y" + { +#if 0 + (yyval.val) = NEW_RETRY(); +#endif + (yyval.val) = dispatch0(retry); + + ;} + break; + + case 317: +#line 2964 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (1)].val)); + (yyval.val) = (yyvsp[(1) - (1)].val); + if (!(yyval.val)) (yyval.val) = NEW_NIL(); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 318: +#line 2976 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "begin"); +#endif + ;} + break; + + case 319: +#line 2983 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "if"); +#endif + ;} + break; + + case 320: +#line 2990 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "unless"); +#endif + ;} + break; + + case 321: +#line 2997 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "while"); +#endif + ;} + break; + + case 322: +#line 3004 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "until"); +#endif + ;} + break; + + case 323: +#line 3011 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "case"); +#endif + ;} + break; + + case 324: +#line 3018 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "for"); +#endif + ;} + break; + + case 325: +#line 3025 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "class"); +#endif + ;} + break; + + case 326: +#line 3032 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "module"); +#endif + ;} + break; + + case 327: +#line 3039 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "def"); +#endif + ;} + break; + + case 328: +#line 3046 "ripper.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_pop(parser, "end"); /* POP */ +#endif + ;} + break; + + case 329: +#line 3055 "ripper.y" + { (yyval.val) = Qnil; ;} + break; + + case 331: +#line 3061 "ripper.y" + { (yyval.val) = (yyvsp[(2) - (2)].val); ;} + break; + + case 332: +#line 3068 "ripper.y" + { (yyval.val) = Qnil; ;} + break; + + case 335: +#line 3077 "ripper.y" + { +#if 0 + (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); + fixpos((yyval.val), (yyvsp[(2) - (5)].val)); +#endif + (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); + + ;} + break; + + case 337: +#line 3089 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 340: +#line 3103 "ripper.y" + { +#if 0 + (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 341: +#line 3111 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 342: +#line 3121 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 343: +#line 3129 "ripper.y" + { +#if 0 + (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 344: +#line 3139 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 345: +#line 3147 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), assignable((yyvsp[(4) - (4)].val), 0)); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 346: +#line 3155 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG(assignable((yyvsp[(4) - (6)].val), 0), (yyvsp[(6) - (6)].val))); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyvsp[(4) - (6)].val)); + + ;} + break; + + case 347: +#line 3163 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); + + ;} + break; + + case 348: +#line 3171 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); +#endif + (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); + + ;} + break; + + case 349: +#line 3179 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, assignable((yyvsp[(2) - (2)].val), 0)); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 350: +#line 3187 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, NEW_POSTARG(assignable((yyvsp[(2) - (4)].val), 0), (yyvsp[(4) - (4)].val))); +#endif + #if 0 + TODO: Check me + #endif + (yyval.val) = mlhs_add_star((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 351: +#line 3198 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, -1); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); + + ;} + break; + + case 352: +#line 3206 "ripper.y" + { +#if 0 + (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); + + ;} + break; + + case 353: +#line 3216 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 354: +#line 3224 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); + + ;} + break; + + case 355: +#line 3232 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 356: +#line 3240 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 357: +#line 3248 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 358: +#line 3256 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0); +#endif + (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil); + dispatch1(excessed_comma, (yyval.val)); + + ;} + break; + + case 359: +#line 3265 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 360: +#line 3273 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 361: +#line 3281 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 362: +#line 3289 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 363: +#line 3297 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 364: +#line 3305 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 365: +#line 3313 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 366: +#line 3321 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 367: +#line 3329 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 369: +#line 3340 "ripper.y" + { + command_start = Qtrue; + ;} + break; + + case 370: +#line 3346 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + escape_Qundef((yyvsp[(2) - (3)].val))); + + ;} + break; + + case 371: +#line 3355 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + Qnil); + + ;} + break; + + case 372: +#line 3364 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (4)].val); +#endif + (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); + + ;} + break; + + case 374: +#line 3376 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = (yyvsp[(2) - (2)].val); + + ;} + break; + + case 375: +#line 3388 "ripper.y" + { + (yyval.val) = rb_ary_new2((yyvsp[(1) - (1)].val)); + ;} + break; + + case 376: +#line 3395 "ripper.y" + { + rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val)); + ;} + break; + + case 377: +#line 3402 "ripper.y" + { +#if 0 + new_bv((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 378: +#line 3410 "ripper.y" + { + (yyval.val) = 0; + ;} + break; + + case 379: +#line 3415 "ripper.y" + { +#if 0 + dyna_push(); +#endif + + (yyval.num) = lpar_beg; + lpar_beg = ++paren_nest; + ;} + break; + + case 380: +#line 3425 "ripper.y" + { + lpar_beg = (yyvsp[(1) - (3)].num); +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); + (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(2) - (3)].val)->nd_head, (yyvsp[(3) - (3)].val)); + dyna_pop(); +#endif + (yyval.val) = dispatch2(lambda, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 381: +#line 3438 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val)); +#endif + (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); + + ;} + break; + + case 382: +#line 3446 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 383: +#line 3456 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (3)].val); + ;} + break; + + case 384: +#line 3460 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (3)].val); + ;} + break; + + case 385: +#line 3466 "ripper.y" + { +#if 0 + dyna_push(); + (yyval.num) = ruby_sourceline; +#endif + ;} + break; + + case 386: +#line 3475 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); + nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); + dyna_pop(); +#endif + (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 387: +#line 3487 "ripper.y" + { +#if 0 + if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { + compile_error(PARSER_ARG "block given to yield"); + } + else { + block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); + } + (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); + (yyval.val) = (yyvsp[(2) - (2)].val); + fixpos((yyval.val), (yyvsp[(1) - (2)].val)); +#endif + (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 388: +#line 3503 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 389: +#line 3512 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 390: +#line 3523 "ripper.y" + { +#if 0 + (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + fixpos((yyval.val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 391: +#line 3532 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 392: +#line 3542 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); + + ;} + break; + + case 393: +#line 3552 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); +#endif + (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 394: +#line 3560 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); + fixpos((yyval.val), (yyvsp[(1) - (3)].val)); +#endif + (yyval.val) = dispatch3(call, dispatch1(paren, (yyvsp[(1) - (3)].val)), + ripper_id2sym('.'), rb_intern("call")); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 395: +#line 3571 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); + fixpos((yyval.val), (yyvsp[(1) - (3)].val)); +#endif + (yyval.val) = dispatch3(call, dispatch1(paren, (yyvsp[(1) - (3)].val)), + ripper_id2sym('.'), rb_intern("call")); + (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 396: +#line 3582 "ripper.y" + { +#if 0 + (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 397: +#line 3590 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ZSUPER(); +#endif + (yyval.val) = dispatch0(zsuper); + + ;} + break; + + case 398: +#line 3598 "ripper.y" + { +#if 0 + if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) + (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); + else + (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); + fixpos((yyval.val), (yyvsp[(1) - (4)].val)); +#endif + (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); + + ;} + break; + + case 399: +#line 3612 "ripper.y" + { +#if 0 + dyna_push(); + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 400: +#line 3621 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); + nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); + nd_set_line((yyval.val)->nd_body, (yyvsp[(2) - (5)].num)); + nd_set_line((yyval.val)->nd_body->nd_body, (yyvsp[(2) - (5)].num)); + dyna_pop(); +#endif + (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 401: +#line 3633 "ripper.y" + { +#if 0 + dyna_push(); + (yyval.num) = ruby_sourceline; +#endif + + ;} + break; + + case 402: +#line 3642 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); + nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); + dyna_pop(); +#endif + (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); + + ;} + break; + + case 403: +#line 3656 "ripper.y" + { +#if 0 + (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); +#endif + (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); + + ;} + break; + + case 406: +#line 3672 "ripper.y" + { +#if 0 + if ((yyvsp[(3) - (6)].val)) { + (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); + (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); + } + (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); + fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); +#endif + (yyval.val) = dispatch4(rescue, + escape_Qundef((yyvsp[(2) - (6)].val)), + escape_Qundef((yyvsp[(3) - (6)].val)), + escape_Qundef((yyvsp[(5) - (6)].val)), + escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 408: +#line 3692 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 409: +#line 3700 "ripper.y" + { +#if 0 + if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 411: +#line 3711 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (2)].val); + ;} + break; + + case 413: +#line 3718 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 416: +#line 3730 "ripper.y" + { +#if 0 + (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); +#endif + (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 418: +#line 3741 "ripper.y" + { +#if 0 + NODE *node = (yyvsp[(1) - (1)].val); + if (!node) { + node = NEW_STR(STR_NEW0()); + } + else { + node = evstr2dstr(node); + } + (yyval.val) = node; +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 421: +#line 3760 "ripper.y" + { +#if 0 + (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 422: +#line 3770 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 423: +#line 3780 "ripper.y" + { +#if 0 + NODE *node = (yyvsp[(2) - (3)].val); + if (!node) { + node = NEW_XSTR(STR_NEW0()); + } + else { + switch (nd_type(node)) { + case NODE_STR: + nd_set_type(node, NODE_XSTR); + break; + case NODE_DSTR: + nd_set_type(node, NODE_DXSTR); + break; + default: + node = NEW_NODE(NODE_DXSTR, STR_NEW0(), 1, NEW_LIST(node)); + break; + } + } + (yyval.val) = node; +#endif + (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 424: +#line 3807 "ripper.y" + { +#if 0 + int options = (yyvsp[(3) - (3)].val); + NODE *node = (yyvsp[(2) - (3)].val); + NODE *list; + if (!node) { + node = NEW_LIT(reg_compile(STR_NEW0(), options)); + } + else switch (nd_type(node)) { + case NODE_STR: + { + VALUE src = node->nd_lit; + nd_set_type(node, NODE_LIT); + node->nd_lit = reg_compile(src, options); + } + break; + default: + node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); + case NODE_DSTR: + if (options & RE_OPTION_ONCE) { + nd_set_type(node, NODE_DREGX_ONCE); + } + else { + nd_set_type(node, NODE_DREGX); + } + node->nd_cflag = options & RE_OPTION_MASK; + reg_fragment_check(node->nd_lit, options); + for (list = node->nd_next; list; list = list->nd_next) { + if (nd_type(list->nd_head) == NODE_STR) { + reg_fragment_check(list->nd_head->nd_lit, options); + } + } + break; + } + (yyval.val) = node; +#endif + (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 425: +#line 3849 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ZARRAY(); +#endif + (yyval.val) = dispatch0(words_new); + + ;} + break; + + case 426: +#line 3857 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (3)].val); + ;} + break; + + case 427: +#line 3863 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = dispatch0(words_new); + + ;} + break; + + case 428: +#line 3871 "ripper.y" + { +#if 0 + (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); +#endif + (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 429: +#line 3883 "ripper.y" + { + (yyval.val) = dispatch0(word_new); + (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); + ;} + break; + + case 430: +#line 3889 "ripper.y" + { +#if 0 + (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 431: +#line 3899 "ripper.y" + { +#if 0 + (yyval.val) = NEW_ZARRAY(); +#endif + (yyval.val) = dispatch0(qwords_new); + + ;} + break; + + case 432: +#line 3907 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (3)].val); + ;} + break; + + case 433: +#line 3913 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = dispatch0(qwords_new); + + ;} + break; + + case 434: +#line 3921 "ripper.y" + { +#if 0 + (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); +#endif + (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 435: +#line 3931 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = dispatch0(string_content); + + ;} + break; + + case 436: +#line 3939 "ripper.y" + { +#if 0 + (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 437: +#line 3949 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = dispatch0(xstring_new); + + ;} + break; + + case 438: +#line 3957 "ripper.y" + { +#if 0 + (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 440: +#line 3968 "ripper.y" + { + (yyval.node) = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + ;} + break; + + case 441: +#line 3974 "ripper.y" + { +#if 0 + lex_strterm = (yyvsp[(2) - (3)].node); + (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); +#endif + lex_strterm = (yyvsp[(2) - (3)].node); + (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 442: +#line 3984 "ripper.y" + { + (yyval.node) = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + ;} + break; + + case 443: +#line 3992 "ripper.y" + { + lex_strterm = (yyvsp[(2) - (4)].node); + COND_LEXPOP(); + CMDARG_LEXPOP(); +#if 0 + if ((yyvsp[(3) - (4)].val)) (yyvsp[(3) - (4)].val)->flags &= ~NODE_FL_NEWLINE; + (yyval.val) = new_evstr((yyvsp[(3) - (4)].val)); +#endif + (yyval.val) = dispatch1(string_embexpr, (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 444: +#line 4006 "ripper.y" + { +#if 0 + (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 445: +#line 4014 "ripper.y" + { +#if 0 + (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 446: +#line 4022 "ripper.y" + { +#if 0 + (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 448: +#line 4033 "ripper.y" + { +#if 0 + lex_state = EXPR_END; + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + lex_state = EXPR_END; + (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 453: +#line 4051 "ripper.y" + { +#if 0 + lex_state = EXPR_END; + if (!((yyval.val) = (yyvsp[(2) - (3)].val))) { + (yyval.val) = NEW_LIT(ID2SYM(rb_intern(""))); + } + else { + VALUE lit; + + switch (nd_type((yyval.val))) { + case NODE_DSTR: + nd_set_type((yyval.val), NODE_DSYM); + break; + case NODE_STR: + lit = (yyval.val)->nd_lit; + (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit)); + nd_set_type((yyval.val), NODE_LIT); + break; + default: + (yyval.val) = NEW_NODE(NODE_DSYM, STR_NEW0(), 1, NEW_LIST((yyval.val))); + break; + } + } +#endif + lex_state = EXPR_END; + (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 456: +#line 4084 "ripper.y" + { +#if 0 + (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 457: +#line 4092 "ripper.y" + { +#if 0 + (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 463: +#line 4106 "ripper.y" + {ifndef_ripper((yyval.val) = keyword_nil);;} + break; + + case 464: +#line 4107 "ripper.y" + {ifndef_ripper((yyval.val) = keyword_self);;} + break; + + case 465: +#line 4108 "ripper.y" + {ifndef_ripper((yyval.val) = keyword_true);;} + break; + + case 466: +#line 4109 "ripper.y" + {ifndef_ripper((yyval.val) = keyword_false);;} + break; + + case 467: +#line 4110 "ripper.y" + {ifndef_ripper((yyval.val) = keyword__FILE__);;} + break; + + case 468: +#line 4111 "ripper.y" + {ifndef_ripper((yyval.val) = keyword__LINE__);;} + break; + + case 469: +#line 4112 "ripper.y" + {ifndef_ripper((yyval.val) = keyword__ENCODING__);;} + break; + + case 470: +#line 4116 "ripper.y" + { +#if 0 + if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); +#endif + (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 471: +#line 4126 "ripper.y" + { +#if 0 + (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); +#endif + (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 474: +#line 4140 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = Qnil; + + ;} + break; + + case 475: +#line 4148 "ripper.y" + { + lex_state = EXPR_BEG; + ;} + break; + + case 476: +#line 4152 "ripper.y" + { + (yyval.val) = (yyvsp[(3) - (4)].val); + ;} + break; + + case 477: +#line 4156 "ripper.y" + { +#if 0 + yyerrok; + (yyval.val) = 0; +#endif + yyerrok; + (yyval.val) = Qnil; + + ;} + break; + + case 478: +#line 4168 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(2) - (3)].val); + lex_state = EXPR_BEG; + command_start = Qtrue; +#endif + (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); + lex_state = EXPR_BEG; + command_start = Qtrue; + + ;} + break; + + case 479: +#line 4180 "ripper.y" + { + (yyval.val) = (yyvsp[(1) - (2)].val); + ;} + break; + + case 480: +#line 4186 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 481: +#line 4194 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); + + ;} + break; + + case 482: +#line 4202 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 483: +#line 4210 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 484: +#line 4218 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 485: +#line 4226 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 486: +#line 4234 "ripper.y" + { +#if 0 + (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 487: +#line 4242 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 488: +#line 4250 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); + + ;} + break; + + case 489: +#line 4258 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 490: +#line 4266 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 491: +#line 4274 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); + + ;} + break; + + case 492: +#line 4282 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); + + ;} + break; + + case 493: +#line 4290 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); +#endif + (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 494: +#line 4298 "ripper.y" + { +#if 0 + (yyval.val) = new_args(0, 0, 0, 0, 0); +#endif + (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); + + ;} + break; + + case 495: +#line 4308 "ripper.y" + { +#if 0 + yyerror("formal argument cannot be a constant"); + (yyval.val) = 0; +#endif + (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 496: +#line 4317 "ripper.y" + { +#if 0 + yyerror("formal argument cannot be an instance variable"); + (yyval.val) = 0; +#endif + (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 497: +#line 4326 "ripper.y" + { +#if 0 + yyerror("formal argument cannot be a global variable"); + (yyval.val) = 0; +#endif + (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 498: +#line 4335 "ripper.y" + { +#if 0 + yyerror("formal argument cannot be a class variable"); + (yyval.val) = 0; +#endif + (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 500: +#line 4347 "ripper.y" + { +#if 0 + if (!is_local_id((yyvsp[(1) - (1)].val))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (1)].val)); +#endif + + (yyval.val) = (yyvsp[(1) - (1)].val); + ;} + break; + + case 501: +#line 4359 "ripper.y" + { +#if 0 + arg_var((yyvsp[(1) - (1)].val)); + (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); +#endif + + ;} + break; + + case 502: +#line 4367 "ripper.y" + { +#if 0 + ID tid = internal_id(); + arg_var(tid); + if (dyna_in_block()) { + (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); + } + else { + (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); + } + (yyval.val) = NEW_ARGS_AUX(tid, 1); + (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); +#endif + (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); + + ;} + break; + + case 503: +#line 4388 "ripper.y" + { + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + ;} + break; + + case 504: +#line 4393 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(1) - (3)].val); + (yyval.val)->nd_plen++; + (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); + rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 505: +#line 4406 "ripper.y" + { +#if 0 + if (!is_local_id((yyvsp[(1) - (3)].val))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (3)].val)); + arg_var((yyvsp[(1) - (3)].val)); + (yyval.val) = NEW_OPT_ARG(0, assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = rb_assoc_new((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 506: +#line 4420 "ripper.y" + { +#if 0 + if (!is_local_id((yyvsp[(1) - (3)].val))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (3)].val)); + arg_var((yyvsp[(1) - (3)].val)); + (yyval.val) = NEW_OPT_ARG(0, assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); +#endif + (yyval.val) = rb_assoc_new((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 507: +#line 4434 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(1) - (1)].val); +#endif + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 508: +#line 4442 "ripper.y" + { +#if 0 + NODE *opts = (yyvsp[(1) - (3)].val); + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = (yyvsp[(3) - (3)].val); + (yyval.val) = (yyvsp[(1) - (3)].val); +#endif + (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 509: +#line 4458 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(1) - (1)].val); +#endif + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + + ;} + break; + + case 510: +#line 4466 "ripper.y" + { +#if 0 + NODE *opts = (yyvsp[(1) - (3)].val); + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = (yyvsp[(3) - (3)].val); + (yyval.val) = (yyvsp[(1) - (3)].val); +#endif + (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 513: +#line 4486 "ripper.y" + { +#if 0 + if (!is_local_id((yyvsp[(2) - (2)].val))) + yyerror("rest argument must be local variable"); + shadowing_lvar((yyvsp[(2) - (2)].val)); + arg_var((yyvsp[(2) - (2)].val)); + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 514: +#line 4498 "ripper.y" + { +#if 0 + (yyval.val) = internal_id(); + arg_var((yyval.val)); +#endif + (yyval.val) = dispatch1(rest_param, Qnil); + + ;} + break; + + case 517: +#line 4513 "ripper.y" + { +#if 0 + if (!is_local_id((yyvsp[(2) - (2)].val))) + yyerror("block argument must be local variable"); + else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) + yyerror("duplicated block argument name"); + shadowing_lvar((yyvsp[(2) - (2)].val)); + arg_var((yyvsp[(2) - (2)].val)); + (yyval.val) = (yyvsp[(2) - (2)].val); +#endif + (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 518: +#line 4529 "ripper.y" + { + (yyval.val) = (yyvsp[(2) - (2)].val); + ;} + break; + + case 519: +#line 4533 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = Qundef; + + ;} + break; + + case 520: +#line 4543 "ripper.y" + { +#if 0 + value_expr((yyvsp[(1) - (1)].val)); + (yyval.val) = (yyvsp[(1) - (1)].val); + if (!(yyval.val)) (yyval.val) = NEW_NIL(); +#endif + (yyval.val) = (yyvsp[(1) - (1)].val); + + ;} + break; + + case 521: +#line 4552 "ripper.y" + {lex_state = EXPR_BEG;;} + break; + + case 522: +#line 4553 "ripper.y" + { +#if 0 + if ((yyvsp[(3) - (4)].val) == 0) { + yyerror("can't define singleton method for ()."); + } + else { + switch (nd_type((yyvsp[(3) - (4)].val))) { + case NODE_STR: + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_DREGX: + case NODE_LIT: + case NODE_ARRAY: + case NODE_ZARRAY: + yyerror("can't define singleton method for literals"); + default: + value_expr((yyvsp[(3) - (4)].val)); + break; + } + } + (yyval.val) = (yyvsp[(3) - (4)].val); +#endif + (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); + + ;} + break; + + case 524: +#line 4583 "ripper.y" + { +#if 0 + (yyval.val) = (yyvsp[(1) - (2)].val); +#endif + (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); + + ;} + break; + + case 525: +#line 4595 "ripper.y" + { + (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); + ;} + break; + + case 526: +#line 4600 "ripper.y" + { +#if 0 + (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 527: +#line 4610 "ripper.y" + { +#if 0 + (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); +#endif + (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + ;} + break; + + case 528: +#line 4618 "ripper.y" + { +#if 0 + (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); +#endif + (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); + + ;} + break; + + case 539: +#line 4646 "ripper.y" + { (yyval.val) = (yyvsp[(1) - (1)].val); ;} + break; + + case 540: +#line 4651 "ripper.y" + { (yyval.val) = (yyvsp[(1) - (1)].val); ;} + break; + + case 550: +#line 4674 "ripper.y" + {yyerrok;;} + break; + + case 553: +#line 4679 "ripper.y" + {yyerrok;;} + break; + + case 554: +#line 4683 "ripper.y" + { +#if 0 + (yyval.val) = 0; +#endif + (yyval.val) = Qundef; + + ;} + break; + + +/* Line 1267 of yacc.c. */ +#line 9790 "parse.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + parser_yyerror (parser, YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + parser_yyerror (parser, yymsg); + } + else + { + parser_yyerror (parser, YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, parser); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, parser); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + parser_yyerror (parser, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, parser); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, parser); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 4691 "ripper.y" + +# undef parser +# undef yylex +# undef yylval +# define yylval (*((YYSTYPE*)(parser->parser_yylval))) + +static int parser_regx_options(struct parser_params*); +static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); +static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); +static int parser_parse_string(struct parser_params*,NODE*); +static int parser_here_document(struct parser_params*,NODE*); + + +# define nextc() parser_nextc(parser) +# define pushback(c) parser_pushback(parser, c) +# define newtok() parser_newtok(parser) +# define tokspace(n) parser_tokspace(parser, n) +# define tokadd(c) parser_tokadd(parser, c) +# define tok_hex(numlen) parser_tok_hex(parser, numlen) +# define read_escape(flags,e) parser_read_escape(parser, flags, e) +# define tokadd_escape(e) parser_tokadd_escape(parser, e) +# define regx_options() parser_regx_options(parser) +# define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e) +# define parse_string(n) parser_parse_string(parser,n) +# define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) +# define here_document(n) parser_here_document(parser,n) +# define heredoc_identifier() parser_heredoc_identifier(parser) +# define heredoc_restore(n) parser_heredoc_restore(parser,n) +# define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i) + +#ifdef RIPPER +/* FIXME */ +# define local_id(x) 1 +# define dyna_in_block() 1 +#endif /* RIPPER */ + +#ifndef RIPPER +# define set_yylval_str(x) yylval.node = NEW_STR(x) +# define set_yylval_num(x) yylval.num = x +# define set_yylval_id(x) yylval.id = x +# define set_yylval_literal(x) yylval.node = NEW_LIT(x) +# define set_yylval_node(x) yylval.node = x +# define yylval_id() yylval.id +#else +# define set_yylval_str(x) (void)(x) +# define set_yylval_num(x) (void)(x) +# define set_yylval_id(x) (void)(x) +# define set_yylval_literal(x) (void)(x) +# define set_yylval_node(x) (void)(x) +# define yylval_id() SYM2ID(yylval.val) +#endif + +#ifdef RIPPER +#define ripper_flush(p) (p->tokp = p->parser_lex_p) + +static void +ripper_dispatch_scan_event(struct parser_params *parser, int t) +{ + VALUE str; + + if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); + if (lex_p == parser->tokp) return; + str = STR_NEW(parser->tokp, lex_p - parser->tokp); + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str); + ripper_flush(parser); +} + +static void +ripper_dispatch_delayed_token(struct parser_params *parser, int t) +{ + int saved_line = ruby_sourceline; + const char *saved_tokp = parser->tokp; + + ruby_sourceline = parser->delayed_line; + parser->tokp = lex_pbeg + parser->delayed_col; + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); + parser->delayed = Qnil; + ruby_sourceline = saved_line; + parser->tokp = saved_tokp; +} +#endif /* RIPPER */ + +#include "ruby/regex.h" +#include "ruby/util.h" + +/* We remove any previous definition of `SIGN_EXTEND_CHAR', + since ours (we hope) works properly with all combinations of + machines, compilers, `char' and `unsigned char' argument types. + (Per Bothner suggested the basic approach.) */ +#undef SIGN_EXTEND_CHAR +#if __STDC__ +# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) +#endif + +#define parser_encoding_name() (parser->enc->name) +#define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) +#define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) +#define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) +#define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) + +#define parser_isascii() ISASCII(*(lex_p-1)) + +#ifndef RIPPER +static int +token_info_get_column(struct parser_params *parser, const char *token) +{ + int column = 1; + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p == '\t') { + column = (((column - 1) / 8) + 1) * 8; + } + column++; + } + return column; +} + +static int +token_info_has_nonspaces(struct parser_params *parser, const char *token) +{ + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p != ' ' && *p != '\t') { + return 1; + } + } + return 0; +} + +static void +token_info_push(struct parser_params *parser, const char *token) +{ + token_info *ptinfo; + + if (compile_for_eval) return; + ptinfo = ALLOC(token_info); + ptinfo->token = token; + ptinfo->linenum = ruby_sourceline; + ptinfo->column = token_info_get_column(parser, token); + ptinfo->nonspc = token_info_has_nonspaces(parser, token); + ptinfo->next = parser->parser_token_info; + + parser->parser_token_info = ptinfo; +} + +static void +token_info_pop(struct parser_params *parser, const char *token) +{ + int linenum; + token_info *ptinfo = parser->parser_token_info; + + if (!ptinfo) return; + parser->parser_token_info = ptinfo->next; + if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ + goto finish; + } + linenum = ruby_sourceline; + if (linenum == ptinfo->linenum) { /* SKIP */ + goto finish; + } + if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ + goto finish; + } + rb_compile_warning(ruby_sourcefile, linenum, + "mismatched indentations at '%s' with '%s' at %d", + token, ptinfo->token, ptinfo->linenum); + + finish: + xfree(ptinfo); +} +#endif /* RIPPER */ + +static int +parser_yyerror(struct parser_params *parser, const char *msg) +{ +#ifndef RIPPER + const int max_line_margin = 30; + const char *p, *pe; + char *buf; + int len, i; + + compile_error(PARSER_ARG "%s", msg); + p = lex_p; + while (lex_pbeg <= p) { + if (*p == '\n') break; + p--; + } + p++; + + pe = lex_p; + while (pe < lex_pend) { + if (*pe == '\n') break; + pe++; + } + + len = pe - p; + if (len > 4) { + char *p2; + const char *pre = "", *post = ""; + + if (len > max_line_margin * 2 + 10) { + if (lex_p - p > max_line_margin) { + p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); + pre = "..."; + } + if (pe - lex_p > max_line_margin) { + pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); + post = "..."; + } + len = pe - p; + } + buf = ALLOCA_N(char, len+2); + MEMCPY(buf, p, char, len); + buf[len] = '\0'; + rb_compile_error_append("%s%s%s", pre, buf, post); + + i = lex_p - p; + p2 = buf; pe = buf + len; + + while (p2 < pe) { + if (*p2 != '\t') *p2 = ' '; + p2++; + } + buf[i] = '^'; + buf[i+1] = '\0'; + rb_compile_error_append("%s%s", pre, buf); + } +#else + dispatch1(parse_error, STR_NEW2(msg)); +#endif /* !RIPPER */ + return 0; +} + +static void parser_prepare(struct parser_params *parser); + +#ifndef RIPPER +VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); + +static VALUE +debug_lines(const char *f) +{ + if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { + VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + if (TYPE(hash) == T_HASH) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new(); + rb_hash_aset(hash, fname, lines); + return lines; + } + } + return 0; +} + +static VALUE +coverage(const char *f, int n) +{ + extern VALUE rb_get_coverages(void); + VALUE coverages = rb_get_coverages(); + if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new2(n); + int i; + RBASIC(lines)->klass = 0; + for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; + RARRAY(lines)->as.heap.len = n; + rb_hash_aset(coverages, fname, lines); + return lines; + } + return 0; +} + +static int +e_option_supplied(struct parser_params *parser) +{ + if (strcmp(ruby_sourcefile, "-e") == 0) + return Qtrue; + return Qfalse; +} + +static VALUE +yycompile0(VALUE arg, int tracing) +{ + int n; + NODE *tree; + struct parser_params *parser = (struct parser_params *)arg; + + if (!compile_for_eval && rb_safe_level() == 0) { + ruby_debug_lines = debug_lines(ruby_sourcefile); + if (ruby_debug_lines && ruby_sourceline > 0) { + VALUE str = STR_NEW0(); + n = ruby_sourceline; + do { + rb_ary_push(ruby_debug_lines, str); + } while (--n); + } + + if (!e_option_supplied(parser)) { + ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); + } + } + + parser_prepare(parser); + deferred_nodes = 0; + n = yyparse((void*)parser); + ruby_debug_lines = 0; + ruby_coverage = 0; + compile_for_eval = 0; + + lex_strterm = 0; + lex_p = lex_pbeg = lex_pend = 0; + lex_lastline = lex_nextline = 0; + if (parser->nerr) { + return 0; + } + tree = ruby_eval_tree; + if (!tree) { + tree = NEW_NIL(); + } + if (ruby_eval_tree_begin) { + NODE *scope = ruby_eval_tree; + + if (scope) { + scope->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, scope->nd_body); + } + tree = scope; + } + else { + tree = ruby_eval_tree; + } + return (VALUE)tree; +} + +static NODE* +yycompile(struct parser_params *parser, const char *f, int line) +{ + ruby_sourcefile = ruby_strdup(f); + ruby_sourceline = line - 1; + return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue); +} +#endif /* !RIPPER */ + +static VALUE +lex_get_str(struct parser_params *parser, VALUE s) +{ + char *beg, *end, *pend; + + beg = RSTRING_PTR(s); + if (lex_gets_ptr) { + if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; + beg += lex_gets_ptr; + } + pend = RSTRING_PTR(s) + RSTRING_LEN(s); + end = beg; + while (end < pend) { + if (*end++ == '\n') break; + } + lex_gets_ptr = end - RSTRING_PTR(s); + return rb_enc_str_new(beg, end - beg, rb_enc_get(s)); +} + +static VALUE +lex_getline(struct parser_params *parser) +{ + VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); +#ifndef RIPPER + if (ruby_debug_lines && !NIL_P(line)) { + rb_ary_push(ruby_debug_lines, line); + } + if (ruby_coverage && !NIL_P(line)) { + rb_ary_push(ruby_coverage, Qnil); + } +#endif + return line; +} + +#ifndef RIPPER +NODE* +rb_compile_string(const char *f, VALUE s, int line) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_string(vparser, f, s, line); +} + +NODE* +rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) +{ + struct parser_params *parser; + NODE *node; + volatile VALUE tmp; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_get_str; + lex_gets_ptr = 0; + lex_input = s; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, line); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} + +NODE* +rb_compile_cstr(const char *f, const char *s, int len, int line) +{ + return rb_compile_string(f, rb_str_new(s, len), line); +} + +NODE* +rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) +{ + return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line); +} + +static VALUE +lex_io_gets(struct parser_params *parser, VALUE io) +{ + return rb_io_gets(io); +} + +NODE* +rb_compile_file(const char *f, VALUE file, int start) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_file(vparser, f, file, start); +} + +NODE* +rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) +{ + struct parser_params *parser; + volatile VALUE tmp; + NODE *node; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_io_gets; + lex_input = file; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, start); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} +#endif /* !RIPPER */ + +#define STR_FUNC_ESCAPE 0x01 +#define STR_FUNC_EXPAND 0x02 +#define STR_FUNC_REGEXP 0x04 +#define STR_FUNC_QWORDS 0x08 +#define STR_FUNC_SYMBOL 0x10 +#define STR_FUNC_INDENT 0x20 + +enum string_type { + str_squote = (0), + str_dquote = (STR_FUNC_EXPAND), + str_xquote = (STR_FUNC_EXPAND), + str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), + str_sword = (STR_FUNC_QWORDS), + str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), + str_ssym = (STR_FUNC_SYMBOL), + str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) +}; + +static VALUE +parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) +{ + VALUE str; + + str = rb_enc_str_new(p, n, enc); + if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + } + else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + + return str; +} + +#define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) +#define peek(c) (lex_p < lex_pend && (c) == *lex_p) + +static inline int +parser_nextc(struct parser_params *parser) +{ + int c; + + if (lex_p == lex_pend) { + VALUE v = lex_nextline; + lex_nextline = 0; + if (!v) { + if (parser->eofp) + return -1; + + if (!lex_input || NIL_P(v = lex_getline(parser))) { + parser->eofp = Qtrue; + lex_goto_eol(parser); + return -1; + } + } + { +#ifdef RIPPER + if (parser->tokp < lex_pend) { + if (NIL_P(parser->delayed)) { + parser->delayed = rb_str_buf_new(1024); + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + parser->delayed_line = ruby_sourceline; + parser->delayed_col = parser->tokp - lex_pbeg; + } + else { + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + } + } +#endif + if (heredoc_end > 0) { + ruby_sourceline = heredoc_end; + heredoc_end = 0; + } + ruby_sourceline++; + parser->line_count++; + lex_pbeg = lex_p = RSTRING_PTR(v); + lex_pend = lex_p + RSTRING_LEN(v); +#ifdef RIPPER + ripper_flush(parser); +#endif + lex_lastline = v; + } + } + c = (unsigned char)*lex_p++; + if (c == '\r' && peek('\n')) { + lex_p++; + c = '\n'; + } + + return c; +} + +static void +parser_pushback(struct parser_params *parser, int c) +{ + if (c == -1) return; + lex_p--; + if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { + lex_p--; + } +} + +#define was_bol() (lex_p == lex_pbeg + 1) + +#define tokfix() (tokenbuf[tokidx]='\0') +#define tok() tokenbuf +#define toklen() tokidx +#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) + +static char* +parser_newtok(struct parser_params *parser) +{ + tokidx = 0; + if (!tokenbuf) { + toksiz = 60; + tokenbuf = ALLOC_N(char, 60); + } + if (toksiz > 4096) { + toksiz = 60; + REALLOC_N(tokenbuf, char, 60); + } + return tokenbuf; +} + +static char * +parser_tokspace(struct parser_params *parser, int n) +{ + tokidx += n; + + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); + REALLOC_N(tokenbuf, char, toksiz); + } + return &tokenbuf[tokidx-n]; +} + +static void +parser_tokadd(struct parser_params *parser, int c) +{ + tokenbuf[tokidx++] = (char)c; + if (tokidx >= toksiz) { + toksiz *= 2; + REALLOC_N(tokenbuf, char, toksiz); + } +} + +static int +parser_tok_hex(struct parser_params *parser, int *numlen) +{ + int c; + + c = scan_hex(lex_p, 2, numlen); + if (!*numlen) { + yyerror("invalid hex escape"); + return 0; + } + lex_p += *numlen; + return c; +} + +#define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) + +static int +parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, + int string_literal, int symbol_literal, int regexp_literal) +{ + /* + * If string_literal is true, then we allow multiple codepoints + * in \u{}, and add the codepoints to the current token. + * Otherwise we're parsing a character literal and return a single + * codepoint without adding it + */ + + int codepoint; + int numlen; + + if (regexp_literal) { tokadd('\\'); tokadd('u'); } + + if (peek('{')) { /* handle \u{...} form */ + do { + if (regexp_literal) { tokadd(*lex_p); } + nextc(); + codepoint = scan_hex(lex_p, 6, &numlen); + if (numlen == 0) { + yyerror("invalid Unicode escape"); + return 0; + } + if (codepoint > 0x10ffff) { + yyerror("invalid Unicode codepoint (too large)"); + return 0; + } + lex_p += numlen; + if (regexp_literal) { + tokcopy(numlen); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u{0}'"); + return 0; + } + + tokadd(codepoint); + } + } while (string_literal && (peek(' ') || peek('\t'))); + + if (!peek('}')) { + yyerror("unterminated Unicode escape"); + return 0; + } + + if (regexp_literal) { tokadd('}'); } + nextc(); + } + else { /* handle \uxxxx form */ + codepoint = scan_hex(lex_p, 4, &numlen); + if (numlen < 4) { + yyerror("invalid Unicode escape"); + return 0; + } + lex_p += 4; + if (regexp_literal) { + tokcopy(4); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u0000'"); + return 0; + } + + tokadd(codepoint); + } + } + + return codepoint; +} + +#define ESCAPE_CONTROL 1 +#define ESCAPE_META 2 + +static int +parser_read_escape(struct parser_params *parser, int flags, + rb_encoding **encp) +{ + int c; + int numlen; + + switch (c = nextc()) { + case '\\': /* Backslash */ + return c; + + case 'n': /* newline */ + return '\n'; + + case 't': /* horizontal tab */ + return '\t'; + + case 'r': /* carriage-return */ + return '\r'; + + case 'f': /* form-feed */ + return '\f'; + + case 'v': /* vertical tab */ + return '\13'; + + case 'a': /* alarm(bell) */ + return '\007'; + + case 'e': /* escape */ + return 033; + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + + pushback(c); + c = scan_oct(lex_p, 3, &numlen); + lex_p += numlen; + } + return c; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + c = tok_hex(&numlen); + if (numlen == 0) return 0; + return c; + + case 'b': /* backspace */ + return '\010'; + + case 's': /* space */ + return ' '; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + if ((c = nextc()) == '\\') { + return read_escape(flags|ESCAPE_META, encp) | 0x80; + } + else if (c == -1 || !ISASCII(c)) goto eof; + else { + return ((c & 0xff) | 0x80); + } + + case 'C': + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc())== '\\') { + c = read_escape(flags|ESCAPE_CONTROL, encp); + } + else if (c == '?') + return 0177; + else if (c == -1 || !ISASCII(c)) goto eof; + return c & 0x9f; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return '\0'; + + default: + return c; + } +} + +static void +parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) +{ + int len = rb_enc_codelen(c, enc); + rb_enc_mbcput(c, tokspace(len), enc); +} + +static int +parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) +{ + int c; + int flags = 0; + + first: + switch (c = nextc()) { + case '\n': + return 0; /* just ignore */ + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int oct; + + oct = scan_oct(--lex_p, 3, &numlen); + if (numlen == 0) goto eof; + lex_p += numlen; + tokcopy(numlen + 1); + } + return 0; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int hex; + + hex = tok_hex(&numlen); + if (numlen == 0) goto eof; + tokcopy(numlen + 2); + } + return 0; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + flags |= ESCAPE_META; + goto escaped; + + case 'C': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + goto escaped; + + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + tokcopy(2); + flags |= ESCAPE_CONTROL; + escaped: + if ((c = nextc()) == '\\') { + goto first; + } + else if (c == -1) goto eof; + tokadd(c); + return 0; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return -1; + + default: + tokadd('\\'); + tokadd(c); + } + return 0; +} + +extern int rb_char_to_option_kcode(int c, int *option, int *kcode); + +static int +parser_regx_options(struct parser_params *parser) +{ + int kcode = 0; + int options = 0; + int c, opt, kc; + + newtok(); + while (c = nextc(), ISALPHA(c)) { + if (c == 'o') { + options |= RE_OPTION_ONCE; + } + else if (rb_char_to_option_kcode(c, &opt, &kc)) { + options |= opt; + if (kc >= 0) kcode = c; + } + else { + tokadd(c); + } + } + pushback(c); + if (toklen()) { + tokfix(); + compile_error(PARSER_ARG "unknown regexp option%s - %s", + toklen() > 1 ? "s" : "", tok()); + } + return options | RE_OPTION_ENCODING(kcode); +} + +static void +dispose_string(VALUE str) +{ + /* TODO: should use another API? */ + if (RBASIC(str)->flags & RSTRING_NOEMBED) + xfree(RSTRING_PTR(str)); + rb_gc_force_recycle(str); +} + +static int +parser_tokadd_mbchar(struct parser_params *parser, int c) +{ + int len = parser_precise_mbclen(); + if (!MBCLEN_CHARFOUND_P(len)) { + compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); + return -1; + } + tokadd(c); + lex_p += --len; + if (len > 0) tokcopy(len); + return c; +} + +#define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) + +static int +parser_tokadd_string(struct parser_params *parser, + int func, int term, int paren, long *nest, + rb_encoding **encp) +{ + int c; + int has_nonascii = 0; + rb_encoding *enc = *encp; + char *errbuf = 0; + static const char mixed_msg[] = "%s mixed within %s source"; + +#define mixed_error(enc1, enc2) if (!errbuf) { \ + int len = sizeof(mixed_msg) - 4; \ + len += strlen(rb_enc_name(enc1)); \ + len += strlen(rb_enc_name(enc2)); \ + errbuf = ALLOCA_N(char, len); \ + snprintf(errbuf, len, mixed_msg, \ + rb_enc_name(enc1), \ + rb_enc_name(enc2)); \ + yyerror(errbuf); \ + } +#define mixed_escape(beg, enc1, enc2) do { \ + const char *pos = lex_p; \ + lex_p = beg; \ + mixed_error(enc1, enc2); \ + lex_p = pos; \ + } while (0) + + while ((c = nextc()) != -1) { + if (paren && c == paren) { + ++*nest; + } + else if (c == term) { + if (!nest || !*nest) { + pushback(c); + break; + } + --*nest; + } + else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { + int c2 = *lex_p; + if (c2 == '$' || c2 == '@' || c2 == '{') { + pushback(c); + break; + } + } + else if (c == '\\') { + const char *beg = lex_p - 1; + c = nextc(); + switch (c) { + case '\n': + if (func & STR_FUNC_QWORDS) break; + if (func & STR_FUNC_EXPAND) continue; + tokadd('\\'); + break; + + case '\\': + if (func & STR_FUNC_ESCAPE) tokadd(c); + break; + + case 'u': + if ((func & STR_FUNC_EXPAND) == 0) { + tokadd('\\'); + break; + } + parser_tokadd_utf8(parser, &enc, 1, + func & STR_FUNC_SYMBOL, + func & STR_FUNC_REGEXP); + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + + default: + if (func & STR_FUNC_REGEXP) { + pushback(c); + if ((c = tokadd_escape(&enc)) < 0) + return -1; + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + } + else if (func & STR_FUNC_EXPAND) { + pushback(c); + if (func & STR_FUNC_ESCAPE) tokadd('\\'); + c = read_escape(0, &enc); + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + /* ignore backslashed spaces in %w */ + } + else if (c != term && !(paren && c == paren)) { + tokadd('\\'); + } + } + } + else if (!parser_isascii()) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + if (tokadd_mbchar(c) == -1) return -1; + continue; + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + pushback(c); + break; + } + if (!c && (func & STR_FUNC_SYMBOL)) { + func &= ~STR_FUNC_SYMBOL; + compile_error(PARSER_ARG "symbol cannot contain '\\0'"); + continue; + } + if (c & 0x80) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + } + tokadd(c); + } + *encp = enc; + return c; +} + +#define NEW_STRTERM(func, term, paren) \ + rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) + +static int +parser_parse_string(struct parser_params *parser, NODE *quote) +{ + int func = quote->nd_func; + int term = nd_term(quote); + int paren = nd_paren(quote); + int c, space = 0; + rb_encoding *enc = parser->enc; + + if (func == -1) return tSTRING_END; + c = nextc(); + if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + do {c = nextc();} while (ISSPACE(c)); + space = 1; + } + if (c == term && !quote->nd_nest) { + if (func & STR_FUNC_QWORDS) { + quote->nd_func = -1; + return ' '; + } + if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; + set_yylval_num(regx_options()); + return tREGEXP_END; + } + if (space) { + pushback(c); + return ' '; + } + newtok(); + if ((func & STR_FUNC_EXPAND) && c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + pushback(c); + if (tokadd_string(func, term, paren, "e->nd_nest, + &enc) == -1) { + ruby_sourceline = nd_line(quote); + if (func & STR_FUNC_REGEXP) { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated regexp meets end of file"); + return tREGEXP_END; + } + else { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated string meets end of file"); + return tSTRING_END; + } + } + + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; +} + +static int +parser_heredoc_identifier(struct parser_params *parser) +{ + int c = nextc(), term, func = 0, len; + + if (c == '-') { + c = nextc(); + func = STR_FUNC_INDENT; + } + switch (c) { + case '\'': + func |= str_squote; goto quoted; + case '"': + func |= str_dquote; goto quoted; + case '`': + func |= str_xquote; + quoted: + newtok(); + tokadd(func); + term = c; + while ((c = nextc()) != -1 && c != term) { + if (tokadd_mbchar(c) == -1) return 0; + } + if (c == -1) { + compile_error(PARSER_ARG "unterminated here document identifier"); + return 0; + } + break; + + default: + if (!parser_is_identchar()) { + pushback(c); + if (func & STR_FUNC_INDENT) { + pushback('-'); + } + return 0; + } + newtok(); + term = '"'; + tokadd(func |= str_dquote); + do { + if (tokadd_mbchar(c) == -1) return 0; + } while ((c = nextc()) != -1 && parser_is_identchar()); + pushback(c); + break; + } + + tokfix(); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tHEREDOC_BEG); +#endif + len = lex_p - lex_pbeg; + lex_goto_eol(parser); + lex_strterm = rb_node_newnode(NODE_HEREDOC, + STR_NEW(tok(), toklen()), /* nd_lit */ + len, /* nd_nth */ + lex_lastline); /* nd_orig */ + nd_set_line(lex_strterm, ruby_sourceline); +#ifdef RIPPER + ripper_flush(parser); +#endif + return term == '`' ? tXSTRING_BEG : tSTRING_BEG; +} + +static void +parser_heredoc_restore(struct parser_params *parser, NODE *here) +{ + VALUE line; + +#ifdef RIPPER + if (!NIL_P(parser->delayed)) + ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tHEREDOC_END); +#endif + line = here->nd_orig; + lex_lastline = line; + lex_pbeg = RSTRING_PTR(line); + lex_pend = lex_pbeg + RSTRING_LEN(line); + lex_p = lex_pbeg + here->nd_nth; + heredoc_end = ruby_sourceline; + ruby_sourceline = nd_line(here); + dispose_string(here->nd_lit); + rb_gc_force_recycle((VALUE)here); +#ifdef RIPPER + ripper_flush(parser); +#endif +} + +static int +parser_whole_match_p(struct parser_params *parser, + const char *eos, int len, int indent) +{ + const char *p = lex_pbeg; + int n; + + if (indent) { + while (*p && ISSPACE(*p)) p++; + } + n= lex_pend - (p + len); + if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse; + if (strncmp(eos, p, len) == 0) return Qtrue; + return Qfalse; +} + +static int +parser_here_document(struct parser_params *parser, NODE *here) +{ + int c, func, indent = 0; + const char *eos, *p, *pend; + long len; + VALUE str = 0; + + eos = RSTRING_PTR(here->nd_lit); + len = RSTRING_LEN(here->nd_lit) - 1; + indent = (func = *eos++) & STR_FUNC_INDENT; + + if ((c = nextc()) == -1) { + error: + compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); + restore: + heredoc_restore(lex_strterm); + lex_strterm = 0; + return 0; + } + if (was_bol() && whole_match_p(eos, len, indent)) { + heredoc_restore(lex_strterm); + return tSTRING_END; + } + + if (!(func & STR_FUNC_EXPAND)) { + do { + p = RSTRING_PTR(lex_lastline); + pend = lex_pend; + if (pend > p) { + switch (pend[-1]) { + case '\n': + if (--pend == p || pend[-1] != '\r') { + pend++; + break; + } + case '\r': + --pend; + } + } + if (str) + rb_str_cat(str, p, pend - p); + else + str = STR_NEW(p, pend - p); + if (pend < lex_pend) rb_str_cat(str, "\n", 1); + lex_goto_eol(parser); + if (nextc() == -1) { + if (str) dispose_string(str); + goto error; + } + } while (!whole_match_p(eos, len, indent)); + } + else { + /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ + rb_encoding *enc = parser->enc; + newtok(); + if (c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + do { + pushback(c); + if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { + if (parser->eofp) goto error; + goto restore; + } + if (c != '\n') { + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; + } + tokadd(nextc()); + /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ + if ((c = nextc()) == -1) goto error; + } while (!whole_match_p(eos, len, indent)); + str = STR_NEW3(tok(), toklen(), enc, func); + } + heredoc_restore(lex_strterm); + lex_strterm = NEW_STRTERM(-1, 0, 0); + set_yylval_str(str); + return tSTRING_CONTENT; +} + +#include "lex.c" + +#ifndef RIPPER +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + rb_warning0("ambiguous first argument; put parentheses or even spaces"); +} +#else +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + dispatch0(arg_ambiguous); +} +#endif +#define arg_ambiguous() arg_ambiguous_gen(parser) + +static int +lvar_defined_gen(struct parser_params *parser, ID id) +{ +#ifndef RIPPER + return (dyna_in_block() && dvar_defined(id)) || local_id(id); +#else + return 0; +#endif +} + +/* emacsen -*- hack */ +static int +parser_encode_length(struct parser_params *parser, const char *name, int len) +{ + int nlen; + + if (len > 5 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) + return nlen; + } + if (len > 4 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) + return nlen; + if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) + return nlen; + } + return len; +} + +static void +parser_set_encode(struct parser_params *parser, const char *name) +{ + int idx = rb_enc_find_index(name); + rb_encoding *enc; + + if (idx < 0) { + rb_raise(rb_eArgError, "unknown encoding name: %s", name); + } + enc = rb_enc_from_index(idx); + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eArgError, "%s is not ASCII compatible", rb_enc_name(enc)); + } + parser->enc = enc; +} + +static int +comment_at_top(struct parser_params *parser) +{ + const char *p = lex_pbeg, *pend = lex_p - 1; + if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; + while (p < pend) { + if (!ISSPACE(*p)) return 0; + p++; + } + return 1; +} + +#ifndef RIPPER +typedef int (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, int len); +typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); + +static void +magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) +{ + if (!comment_at_top(parser)) { + rb_warning("encoding '%s' is ignored, valid only in the first line except for shebang line.", + val); + return; + } + parser_set_encode(parser, val); +} + +struct magic_comment { + const char *name; + rb_magic_comment_setter_t func; + rb_magic_comment_length_t length; +}; + +static const struct magic_comment magic_comments[] = { + {"coding", magic_comment_encoding, parser_encode_length}, + {"encoding", magic_comment_encoding, parser_encode_length}, +}; +#endif + +static const char * +magic_comment_marker(const char *str, int len) +{ + int i = 2; + + while (i < len) { + switch (str[i]) { + case '-': + if (str[i-1] == '*' && str[i-2] == '-') { + return str + i + 1; + } + i += 2; + break; + case '*': + if (i + 1 >= len) return 0; + if (str[i+1] != '-') { + i += 4; + } + else if (str[i-1] != '-') { + i += 2; + } + else { + return str + i + 2; + } + break; + default: + i += 3; + break; + } + } + return 0; +} + +static int +parser_magic_comment(struct parser_params *parser, const char *str, int len) +{ + VALUE name = 0, val = 0; + const char *beg, *end, *vbeg, *vend; +#define str_copy(_s, _p, _n) ((_s) \ + ? (rb_str_resize((_s), (_n)), \ + MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ + : ((_s) = STR_NEW((_p), (_n)))) + + if (len <= 7) return Qfalse; + if (!(beg = magic_comment_marker(str, len))) return Qfalse; + if (!(end = magic_comment_marker(beg, str + len - beg))) return Qfalse; + str = beg; + len = end - beg - 3; + + /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ + while (len > 0) { +#ifndef RIPPER + const struct magic_comment *p = magic_comments; +#endif + char *s; + int i, n = 0; + + for (; len > 0 && *str; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + continue; + } + if (!ISSPACE(*str)) break; + } + for (beg = str; len > 0; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + break; + default: + if (ISSPACE(*str)) break; + continue; + } + break; + } + for (end = str; len > 0 && ISSPACE(*str); str++, --len); + if (!len) break; + if (*str != ':') continue; + + do str++; while (--len > 0 && ISSPACE(*str)); + if (!len) break; + if (*str == '"') { + for (vbeg = ++str; --len > 0 && *str != '"'; str++) { + if (*str == '\\') { + --len; + ++str; + } + } + vend = str; + if (len) { + --len; + ++str; + } + } + else { + for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); + vend = str; + } + while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; + + n = end - beg; + str_copy(name, beg, n); + s = RSTRING_PTR(name); + for (i = 0; i < n; ++i) { + if (*s == '-') *s = '_'; + } +#ifndef RIPPER + do { + if (STRNCASECMP(p->name, s, n) == 0) { + n = vend - vbeg; + if (p->length) { + n = (*p->length)(parser, vbeg, n); + } + str_copy(val, vbeg, n); + (*p->func)(parser, s, RSTRING_PTR(val)); + break; + } + } while (++p < magic_comments + sizeof(magic_comments) / sizeof(*p)); +#else + dispatch2(magic_comment, name, val); +#endif + } + + return Qtrue; +} + +static void +set_file_encoding(struct parser_params *parser, const char *str, const char *send) +{ + int sep = 0; + const char *beg = str; + VALUE s; + + for (;;) { + if (send - str <= 6) return; + switch (str[6]) { + case 'C': case 'c': str += 6; continue; + case 'O': case 'o': str += 5; continue; + case 'D': case 'd': str += 4; continue; + case 'I': case 'i': str += 3; continue; + case 'N': case 'n': str += 2; continue; + case 'G': case 'g': str += 1; continue; + case '=': case ':': + sep = 1; + str += 6; + break; + default: + str += 6; + if (ISSPACE(*str)) break; + continue; + } + if (STRNCASECMP(str-6, "coding", 6) == 0) break; + } + for (;;) { + do { + if (++str >= send) return; + } while (ISSPACE(*str)); + if (sep) break; + if (*str != '=' && *str != ':') return; + sep = 1; + str++; + } + beg = str; + while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); + s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); + parser_set_encode(parser, RSTRING_PTR(s)); + rb_str_resize(s, 0); +} + +static void +parser_prepare(struct parser_params *parser) +{ + int c = nextc(); + switch (c) { + case '#': + if (peek('!')) parser->has_shebang = 1; + break; + case 0xef: /* UTF-8 BOM marker */ + if (lex_pend - lex_p >= 2 && + (unsigned char)lex_p[0] == 0xbb && + (unsigned char)lex_p[1] == 0xbf) { + parser->enc = rb_utf8_encoding(); + lex_p += 2; + lex_pbeg = lex_p; + return; + } + break; + case EOF: + return; + } + pushback(c); + parser->enc = rb_enc_get(lex_lastline); +} + +#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) +#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) + +static int +parser_yylex(struct parser_params *parser) +{ + register int c; + int space_seen = 0; + int cmd_state; + enum lex_state_e last_state; + rb_encoding *enc; + int mb; +#ifdef RIPPER + int fallthru = Qfalse; +#endif + + if (lex_strterm) { + int token; + if (nd_type(lex_strterm) == NODE_HEREDOC) { + token = here_document(lex_strterm); + if (token == tSTRING_END) { + lex_strterm = 0; + lex_state = EXPR_END; + } + } + else { + token = parse_string(lex_strterm); + if (token == tSTRING_END || token == tREGEXP_END) { + rb_gc_force_recycle((VALUE)lex_strterm); + lex_strterm = 0; + lex_state = EXPR_END; + } + } + return token; + } + cmd_state = command_start; + command_start = Qfalse; + retry: + switch (c = nextc()) { + case '\0': /* NUL */ + case '\004': /* ^D */ + case '\032': /* ^Z */ + case -1: /* end of script. */ + return 0; + + /* white spaces */ + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; +#ifdef RIPPER + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + break; + default: + goto outofloop; + } + } + outofloop: + pushback(c); + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; + + case '#': /* it's a comment */ + /* no magic_comment in shebang line */ + if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { + if (comment_at_top(parser)) { + set_file_encoding(parser, lex_p, lex_pend); + } + } + lex_p = lex_pend; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tCOMMENT); + fallthru = Qtrue; +#endif + /* fall through */ + case '\n': + switch (lex_state) { + case EXPR_BEG: + case EXPR_FNAME: + case EXPR_DOT: + case EXPR_CLASS: + case EXPR_VALUE: +#ifdef RIPPER + if (!fallthru) { + ripper_dispatch_scan_event(parser, tIGNORED_NL); + } + fallthru = Qfalse; +#endif + goto retry; + default: + break; + } + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; + break; + case '.': { + if ((c = nextc()) != '.') { + pushback(c); + pushback('.'); + goto retry; + } + } + default: + --ruby_sourceline; + lex_nextline = lex_lastline; + case -1: /* EOF no decrement*/ + lex_goto_eol(parser); +#ifdef RIPPER + if (c != -1) { + parser->tokp = lex_p; + } +#endif + goto normal_newline; + } + } + normal_newline: + command_start = Qtrue; + lex_state = EXPR_BEG; + return '\n'; + + case '*': + if ((c = nextc()) == '*') { + if ((c = nextc()) == '=') { + set_yylval_id(tPOW); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + c = tPOW; + } + else { + if (c == '=') { + set_yylval_id('*'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`*' interpreted as argument prefix"); + c = tSTAR; + } + else if (IS_BEG()) { + c = tSTAR; + } + else { + c = '*'; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return c; + + case '!': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return '!'; + } + } + else { + lex_state = EXPR_BEG; + } + if (c == '=') { + return tNEQ; + } + if (c == '~') { + return tNMATCH; + } + pushback(c); + return '!'; + + case '=': + if (was_bol()) { + /* skip embedded rd document */ + if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { +#ifdef RIPPER + int first_p = Qtrue; + + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tEMBDOC_BEG); +#endif + for (;;) { + lex_goto_eol(parser); +#ifdef RIPPER + if (!first_p) { + ripper_dispatch_scan_event(parser, tEMBDOC); + } + first_p = Qfalse; +#endif + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "embedded document meets end of file"); + return 0; + } + if (c != '=') continue; + if (strncmp(lex_p, "end", 3) == 0 && + (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { + break; + } + } + lex_goto_eol(parser); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tEMBDOC_END); +#endif + goto retry; + } + } + + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + if ((c = nextc()) == '=') { + return tEQQ; + } + pushback(c); + return tEQ; + } + if (c == '~') { + return tMATCH; + } + else if (c == '>') { + return tASSOC; + } + pushback(c); + return '='; + + case '<': + c = nextc(); + if (c == '<' && + lex_state != EXPR_END && + lex_state != EXPR_DOT && + lex_state != EXPR_ENDARG && + lex_state != EXPR_CLASS && + (!IS_ARG() || space_seen)) { + int token = heredoc_identifier(); + if (token) return token; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if (c == '=') { + if ((c = nextc()) == '>') { + return tCMP; + } + pushback(c); + return tLEQ; + } + if (c == '<') { + if ((c = nextc()) == '=') { + set_yylval_id(tLSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tLSHFT; + } + pushback(c); + return '<'; + + case '>': + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + return tGEQ; + } + if (c == '>') { + if ((c = nextc()) == '=') { + set_yylval_id(tRSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tRSHFT; + } + pushback(c); + return '>'; + + case '"': + lex_strterm = NEW_STRTERM(str_dquote, '"', 0); + return tSTRING_BEG; + + case '`': + if (lex_state == EXPR_FNAME) { + lex_state = EXPR_END; + return c; + } + if (lex_state == EXPR_DOT) { + if (cmd_state) + lex_state = EXPR_CMDARG; + else + lex_state = EXPR_ARG; + return c; + } + lex_strterm = NEW_STRTERM(str_xquote, '`', 0); + return tXSTRING_BEG; + + case '\'': + lex_strterm = NEW_STRTERM(str_squote, '\'', 0); + return tSTRING_BEG; + + case '?': + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG) { + lex_state = EXPR_VALUE; + return '?'; + } + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "incomplete character syntax"); + return 0; + } + if (rb_enc_isspace(c, parser->enc)) { + if (!IS_ARG()) { + int c2 = 0; + switch (c) { + case ' ': + c2 = 's'; + break; + case '\n': + c2 = 'n'; + break; + case '\t': + c2 = 't'; + break; + case '\v': + c2 = 'v'; + break; + case '\r': + c2 = 'r'; + break; + case '\f': + c2 = 'f'; + break; + } + if (c2) { + rb_warnI("invalid character syntax; use ?\\%c", c2); + } + } + ternary: + pushback(c); + lex_state = EXPR_VALUE; + return '?'; + } + newtok(); + enc = parser->enc; + if (!parser_isascii()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && + lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { + goto ternary; + } + else if (c == '\\') { + if (peek('u')) { + nextc(); + c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); + if (0x80 <= c) { + tokaddmbc(c, enc); + } + else { + tokadd(c); + } + } + else { + c = read_escape(0, &enc); + tokadd(c); + } + } + else { + tokadd(c); + } + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); + lex_state = EXPR_END; + return tCHAR; + + case '&': + if ((c = nextc()) == '&') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tANDOP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tANDOP; + } + else if (c == '=') { + set_yylval_id('&'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`&' interpreted as argument prefix"); + c = tAMPER; + } + else if (IS_BEG()) { + c = tAMPER; + } + else { + c = '&'; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; + } + return c; + + case '|': + if ((c = nextc()) == '|') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tOROP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tOROP; + } + if (c == '=') { + set_yylval_id('|'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + pushback(c); + return '|'; + + case '+': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUPLUS; + } + pushback(c); + return '+'; + } + if (c == '=') { + set_yylval_id('+'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + c = '+'; + goto start_num; + } + return tUPLUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '+'; + + case '-': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUMINUS; + } + pushback(c); + return '-'; + } + if (c == '=') { + set_yylval_id('-'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (c == '>') { + lex_state = EXPR_ARG; + return tLAMBDA; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + return tUMINUS_NUM; + } + return tUMINUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '-'; + + case '.': + lex_state = EXPR_BEG; + if ((c = nextc()) == '.') { + if ((c = nextc()) == '.') { + return tDOT3; + } + pushback(c); + return tDOT2; + } + pushback(c); + if (c != -1 && ISDIGIT(c)) { + yyerror("no . floating literal anymore; put 0 before dot"); + } + lex_state = EXPR_DOT; + return '.'; + + start_num: + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + int is_float, seen_point, seen_e, nondigit; + + is_float = seen_point = seen_e = nondigit = 0; + lex_state = EXPR_END; + newtok(); + if (c == '-' || c == '+') { + tokadd(c); + c = nextc(); + } + if (c == '0') { + int start = toklen(); + c = nextc(); + if (c == 'x' || c == 'X') { + /* hexadecimal */ + c = nextc(); + if (c != -1 && ISXDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISXDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse)); + return tINTEGER; + } + if (c == 'b' || c == 'B') { + /* binary */ + c = nextc(); + if (c == '0' || c == '1') { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c != '0' && c != '1') break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse)); + return tINTEGER; + } + if (c == 'd' || c == 'D') { + /* decimal */ + c = nextc(); + if (c != -1 && ISDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + if (c == '_') { + /* 0_0 */ + goto octal_number; + } + if (c == 'o' || c == 'O') { + /* prefixed octal */ + c = nextc(); + if (c == -1 || c == '_' || !ISDIGIT(c)) { + yyerror("numeric literal without digits"); + } + } + if (c >= '0' && c <= '7') { + /* octal */ + octal_number: + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c < '0' || c > '9') break; + if (c > '7') goto invalid_octal; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + if (toklen() > start) { + pushback(c); + tokfix(); + if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse)); + return tINTEGER; + } + if (nondigit) { + pushback(c); + goto trailing_uc; + } + } + if (c > '7' && c <= '9') { + invalid_octal: + yyerror("Invalid octal digit"); + } + else if (c == '.' || c == 'e' || c == 'E') { + tokadd('0'); + } + else { + pushback(c); + set_yylval_literal(INT2FIX(0)); + return tINTEGER; + } + } + + for (;;) { + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + nondigit = 0; + tokadd(c); + break; + + case '.': + if (nondigit) goto trailing_uc; + if (seen_point || seen_e) { + goto decode_num; + } + else { + int c0 = nextc(); + if (c == -1 || !ISDIGIT(c0)) { + pushback(c0); + goto decode_num; + } + c = c0; + } + tokadd('.'); + tokadd(c); + is_float++; + seen_point++; + nondigit = 0; + break; + + case 'e': + case 'E': + if (nondigit) { + pushback(c); + c = nondigit; + goto decode_num; + } + if (seen_e) { + goto decode_num; + } + tokadd(c); + seen_e++; + is_float++; + nondigit = c; + c = nextc(); + if (c != '-' && c != '+') continue; + tokadd(c); + nondigit = c; + break; + + case '_': /* `_' in number just ignored */ + if (nondigit) goto decode_num; + nondigit = c; + break; + + default: + goto decode_num; + } + c = nextc(); + } + + decode_num: + pushback(c); + tokfix(); + if (nondigit) { + char tmp[30]; + trailing_uc: + sprintf(tmp, "trailing `%c' in number", nondigit); + yyerror(tmp); + } + if (is_float) { + double d = strtod(tok(), 0); + if (errno == ERANGE) { + rb_warningS("Float %s out of range", tok()); + errno = 0; + } + set_yylval_literal(DBL2NUM(d)); + return tFLOAT; + } + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + + case ')': + case ']': + paren_nest--; + case '}': + COND_LEXPOP(); + CMDARG_LEXPOP(); + if (c == ')') + lex_state = EXPR_END; + else + lex_state = EXPR_ENDARG; + return c; + + case ':': + c = nextc(); + if (c == ':') { + if (IS_BEG() || + lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) { + lex_state = EXPR_BEG; + return tCOLON3; + } + lex_state = EXPR_DOT; + return tCOLON2; + } + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || (c != -1 && ISSPACE(c))) { + pushback(c); + lex_state = EXPR_BEG; + return ':'; + } + switch (c) { + case '\'': + lex_strterm = NEW_STRTERM(str_ssym, c, 0); + break; + case '"': + lex_strterm = NEW_STRTERM(str_dsym, c, 0); + break; + default: + pushback(c); + break; + } + lex_state = EXPR_FNAME; + return tSYMBEG; + + case '/': + if (IS_BEG()) { + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + if ((c = nextc()) == '=') { + set_yylval_id('/'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen) { + if (!ISSPACE(c)) { + arg_ambiguous(); + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return '/'; + + case '^': + if ((c = nextc()) == '=') { + set_yylval_id('^'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '^'; + + case ';': + lex_state = EXPR_BEG; + command_start = Qtrue; + return ';'; + + case ',': + lex_state = EXPR_BEG; + return ','; + + case '~': + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + if ((c = nextc()) != '@') { + pushback(c); + } + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + return '~'; + + case '(': + if (IS_BEG()) { + c = tLPAREN; + } + else if (space_seen) { + if (IS_ARG()) { + c = tLPAREN_ARG; + } + } + paren_nest++; + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + return c; + + case '[': + paren_nest++; + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if ((c = nextc()) == ']') { + if ((c = nextc()) == '=') { + return tASET; + } + pushback(c); + return tAREF; + } + pushback(c); + return '['; + } + else if (IS_BEG()) { + c = tLBRACK; + } + else if (IS_ARG() && space_seen) { + c = tLBRACK; + } + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + return c; + + case '{': + if (lpar_beg && lpar_beg == paren_nest) { + lex_state = EXPR_BEG; + lpar_beg = 0; + --paren_nest; + return tLAMBEG; + } + if (IS_ARG() || lex_state == EXPR_END) + c = '{'; /* block (primary) */ + else if (lex_state == EXPR_ENDARG) + c = tLBRACE_ARG; /* block (expr) */ + else + c = tLBRACE; /* hash */ + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + if (c != tLBRACE) command_start = Qtrue; + return c; + + case '\\': + c = nextc(); + if (c == '\n') { + space_seen = 1; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; /* skip \\n */ + } + pushback(c); + return '\\'; + + case '%': + if (IS_BEG()) { + int term; + int paren; + + c = nextc(); + quotation: + if (c == -1 || !ISALNUM(c)) { + term = c; + c = 'Q'; + } + else { + term = nextc(); + if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { + yyerror("unknown type of %string"); + return 0; + } + } + if (c == -1 || term == -1) { + compile_error(PARSER_ARG "unterminated quoted string meets end of file"); + return 0; + } + paren = term; + if (term == '(') term = ')'; + else if (term == '[') term = ']'; + else if (term == '{') term = '}'; + else if (term == '<') term = '>'; + else paren = 0; + + switch (c) { + case 'Q': + lex_strterm = NEW_STRTERM(str_dquote, term, paren); + return tSTRING_BEG; + + case 'q': + lex_strterm = NEW_STRTERM(str_squote, term, paren); + return tSTRING_BEG; + + case 'W': + lex_strterm = NEW_STRTERM(str_dword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tWORDS_BEG; + + case 'w': + lex_strterm = NEW_STRTERM(str_sword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tQWORDS_BEG; + + case 'x': + lex_strterm = NEW_STRTERM(str_xquote, term, paren); + return tXSTRING_BEG; + + case 'r': + lex_strterm = NEW_STRTERM(str_regexp, term, paren); + return tREGEXP_BEG; + + case 's': + lex_strterm = NEW_STRTERM(str_ssym, term, paren); + lex_state = EXPR_FNAME; + return tSYMBEG; + + default: + yyerror("unknown type of %string"); + return 0; + } + } + if ((c = nextc()) == '=') { + set_yylval_id('%'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_ARG() && space_seen && !ISSPACE(c)) { + goto quotation; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '%'; + + case '$': + last_state = lex_state; + lex_state = EXPR_END; + newtok(); + c = nextc(); + switch (c) { + case '_': /* $_: last read line string */ + c = nextc(); + if (parser_is_identchar()) { + tokadd('$'); + tokadd('_'); + break; + } + pushback(c); + c = '_'; + /* fall through */ + case '~': /* $~: match-data */ + case '*': /* $*: argv */ + case '$': /* $$: pid */ + case '?': /* $?: last status */ + case '!': /* $!: error string */ + case '@': /* $@: error position */ + case '/': /* $/: input record separator */ + case '\\': /* $\: output record separator */ + case ';': /* $;: field separator */ + case ',': /* $,: output field separator */ + case '.': /* $.: last read line number */ + case '=': /* $=: ignorecase */ + case ':': /* $:: load path */ + case '<': /* $<: reading filename */ + case '>': /* $>: default output handle */ + case '\"': /* $": already loaded files */ + tokadd('$'); + tokadd(c); + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '-': + tokadd('$'); + tokadd(c); + c = nextc(); + if (parser_is_identchar()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else { + pushback(c); + } + gvar: + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '&': /* $&: last match */ + case '`': /* $`: string before last match */ + case '\'': /* $': string after last match */ + case '+': /* $+: string matches last paren. */ + if (last_state == EXPR_FNAME) { + tokadd('$'); + tokadd(c); + goto gvar; + } + set_yylval_node(NEW_BACK_REF(c)); + return tBACK_REF; + + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': case '8': case '9': + tokadd('$'); + do { + tokadd(c); + c = nextc(); + } while (c != -1 && ISDIGIT(c)); + pushback(c); + if (last_state == EXPR_FNAME) goto gvar; + tokfix(); + set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); + return tNTH_REF; + + default: + if (!parser_is_identchar()) { + pushback(c); + return '$'; + } + case '0': + tokadd('$'); + } + break; + + case '@': + c = nextc(); + newtok(); + tokadd('@'); + if (c == '@') { + tokadd('@'); + c = nextc(); + } + if (c != -1 && ISDIGIT(c)) { + if (tokidx == 1) { + compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); + } + else { + compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); + } + return 0; + } + if (!parser_is_identchar()) { + pushback(c); + return '@'; + } + break; + + case '_': + if (was_bol() && whole_match_p("__END__", 7, 0)) { + ruby__end__seen = 1; + parser->eofp = Qtrue; +#ifndef RIPPER + return -1; +#else + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, k__END__); + return 0; +#endif + } + newtok(); + break; + + default: + if (!parser_is_identchar()) { + rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); + goto retry; + } + + newtok(); + break; + } + + mb = ENC_CODERANGE_7BIT; + do { + if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; + if (tokadd_mbchar(c) == -1) return 0; + c = nextc(); + } while (parser_is_identchar()); + switch (tok()[0]) { + case '@': case '$': + pushback(c); + break; + default: + if ((c == '!' || c == '?') && !peek('=')) { + tokadd(c); + } + else { + pushback(c); + } + } + tokfix(); + + { + int result = 0; + + last_state = lex_state; + switch (tok()[0]) { + case '$': + lex_state = EXPR_END; + result = tGVAR; + break; + case '@': + lex_state = EXPR_END; + if (tok()[1] == '@') + result = tCVAR; + else + result = tIVAR; + break; + + default: + if (toklast() == '!' || toklast() == '?') { + result = tFID; + } + else { + if (lex_state == EXPR_FNAME) { + if ((c = nextc()) == '=' && !peek('~') && !peek('>') && + (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) { + result = tIDENTIFIER; + tokadd(c); + tokfix(); + } + else { + pushback(c); + } + } + if (result == 0 && ISUPPER(tok()[0])) { + result = tCONSTANT; + } + else { + result = tIDENTIFIER; + } + } + + if ((lex_state == EXPR_BEG && !cmd_state) || + lex_state == EXPR_ARG || + lex_state == EXPR_CMDARG) { + if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { + lex_state = EXPR_BEG; + nextc(); + set_yylval_id(TOK_INTERN(!ENC_SINGLE(mb))); + return tLABEL; + } + } + if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { + const struct kwtable *kw; + + /* See if it is a reserved word. */ + kw = rb_reserved_word(tok(), toklen()); + if (kw) { + enum lex_state_e state = lex_state; + lex_state = kw->state; + if (state == EXPR_FNAME) { + set_yylval_id(rb_intern(kw->name)); + return kw->id[0]; + } + if (kw->id[0] == keyword_do) { + command_start = Qtrue; + if (lpar_beg && lpar_beg == paren_nest) { + lpar_beg = 0; + --paren_nest; + return keyword_do_LAMBDA; + } + if (COND_P()) return keyword_do_cond; + if (CMDARG_P() && state != EXPR_CMDARG) + return keyword_do_block; + if (state == EXPR_ENDARG || state == EXPR_BEG) + return keyword_do_block; + return keyword_do; + } + if (state == EXPR_BEG || state == EXPR_VALUE) + return kw->id[0]; + else { + if (kw->id[0] != kw->id[1]) + lex_state = EXPR_BEG; + return kw->id[1]; + } + } + } + + if (IS_BEG() || + lex_state == EXPR_DOT || + IS_ARG()) { + if (cmd_state) { + lex_state = EXPR_CMDARG; + } + else { + lex_state = EXPR_ARG; + } + } + else { + lex_state = EXPR_END; + } + } + { + ID ident = TOK_INTERN(!ENC_SINGLE(mb)); + + set_yylval_id(ident); + if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { + lex_state = EXPR_END; + } + } + return result; + } +} + +#if YYPURE +static int +yylex(void *lval, void *p) +#else +yylex(void *p) +#endif +{ + struct parser_params *parser = (struct parser_params*)p; + int t; + +#if YYPURE + parser->parser_yylval = lval; + parser->parser_yylval->val = Qundef; +#endif + t = parser_yylex(parser); +#ifdef RIPPER + if (!NIL_P(parser->delayed)) { + ripper_dispatch_delayed_token(parser, t); + return t; + } + if (t != 0) + ripper_dispatch_scan_event(parser, t); +#endif + + return t; +} + +#ifndef RIPPER +static NODE* +node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) +{ + NODE *n = (rb_node_newnode)(type, a0, a1, a2); + nd_set_line(n, ruby_sourceline); + return n; +} + +enum node_type +nodetype(NODE *node) /* for debug */ +{ + return (enum node_type)nd_type(node); +} + +int +nodeline(NODE *node) +{ + return nd_line(node); +} + +static NODE* +newline_node(NODE *node) +{ + if (node) { + node = remove_begin(node); + node->flags |= NODE_FL_NEWLINE; + } + return node; +} + +static void +fixpos(NODE *node, NODE *orig) +{ + if (!node) return; + if (!orig) return; + if (orig == (NODE*)1) return; + nd_set_line(node, nd_line(orig)); +} + +static void +parser_warning(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warning(node, mesg) parser_warning(parser, node, mesg) + +static void +parser_warn(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warn(node, mesg) parser_warn(parser, node, mesg) + +static NODE* +block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *end, *h = head, *nd; + + if (tail == 0) return head; + + if (h == 0) return tail; + switch (nd_type(h)) { + case NODE_LIT: + case NODE_STR: + case NODE_SELF: + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + parser_warning(h, "unused literal ignored"); + return tail; + default: + h = end = NEW_BLOCK(head); + end->nd_end = end; + fixpos(end, head); + head = end; + break; + case NODE_BLOCK: + end = h->nd_end; + break; + } + + nd = end->nd_head; + switch (nd_type(nd)) { + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (RTEST(ruby_verbose)) { + parser_warning(nd, "statement not reached"); + } + break; + + default: + break; + } + + if (nd_type(tail) != NODE_BLOCK) { + tail = NEW_BLOCK(tail); + tail->nd_end = tail; + } + end->nd_next = tail; + h->nd_end = tail->nd_end; + return head; +} + +/* append item to the list */ +static NODE* +list_append_gen(struct parser_params *parser, NODE *list, NODE *item) +{ + NODE *last; + + if (list == 0) return NEW_LIST(item); + if (list->nd_next) { + last = list->nd_next->nd_end; + } + else { + last = list; + } + + list->nd_alen += 1; + last->nd_next = NEW_LIST(item); + list->nd_next->nd_end = last->nd_next; + return list; +} + +/* concat two lists */ +static NODE* +list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *last; + + if (head->nd_next) { + last = head->nd_next->nd_end; + } + else { + last = head; + } + + head->nd_alen += tail->nd_alen; + last->nd_next = tail; + if (tail->nd_next) { + head->nd_next->nd_end = tail->nd_next->nd_end; + } + else { + head->nd_next->nd_end = tail; + } + + return head; +} + +static int +literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) +{ + if (!rb_enc_compatible(head, tail)) { + compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", + rb_enc_name(rb_enc_get(head)), + rb_enc_name(rb_enc_get(tail))); + rb_str_resize(head, 0); + rb_str_resize(tail, 0); + return 0; + } + rb_str_buf_append(head, tail); + return 1; +} + +/* concat two string literals */ +static NODE * +literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + enum node_type htype; + + if (!head) return tail; + if (!tail) return head; + + htype = nd_type(head); + if (htype == NODE_EVSTR) { + NODE *node = NEW_DSTR(STR_NEW0()); + head = list_append(node, head); + } + switch (nd_type(tail)) { + case NODE_STR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { + error: + rb_gc_force_recycle((VALUE)head); + rb_gc_force_recycle((VALUE)tail); + return 0; + } + rb_gc_force_recycle((VALUE)tail); + } + else { + list_append(head, tail); + } + break; + + case NODE_DSTR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) + goto error; + tail->nd_lit = head->nd_lit; + rb_gc_force_recycle((VALUE)head); + head = tail; + } + else { + nd_set_type(tail, NODE_ARRAY); + tail->nd_head = NEW_STR(tail->nd_lit); + list_concat(head, tail); + } + break; + + case NODE_EVSTR: + if (htype == NODE_STR) { + nd_set_type(head, NODE_DSTR); + head->nd_alen = 1; + } + list_append(head, tail); + break; + } + return head; +} + +static NODE * +evstr2dstr_gen(struct parser_params *parser, NODE *node) +{ + if (nd_type(node) == NODE_EVSTR) { + node = list_append(NEW_DSTR(STR_NEW0()), node); + } + return node; +} + +static NODE * +new_evstr_gen(struct parser_params *parser, NODE *node) +{ + NODE *head = node; + + if (node) { + switch (nd_type(node)) { + case NODE_STR: case NODE_DSTR: case NODE_EVSTR: + return node; + } + } + return NEW_EVSTR(head); +} + +static NODE * +call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) +{ + value_expr(recv); + value_expr(arg1); + return NEW_CALL(recv, id, NEW_LIST(arg1)); +} + +static NODE * +call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) +{ + value_expr(recv); + return NEW_CALL(recv, id, 0); +} + +static NODE* +match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + value_expr(node1); + value_expr(node2); + if (node1) { + switch (nd_type(node1)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH2(node1, node2); + + case NODE_LIT: + if (TYPE(node1->nd_lit) == T_REGEXP) { + return NEW_MATCH2(node1, node2); + } + } + } + + if (node2) { + switch (nd_type(node2)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH3(node2, node1); + + case NODE_LIT: + if (TYPE(node2->nd_lit) == T_REGEXP) { + return NEW_MATCH3(node2, node1); + } + } + } + + return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); +} + +static NODE* +gettable_gen(struct parser_params *parser, ID id) +{ + if (id == keyword_self) { + return NEW_SELF(); + } + else if (id == keyword_nil) { + return NEW_NIL(); + } + else if (id == keyword_true) { + return NEW_TRUE(); + } + else if (id == keyword_false) { + return NEW_FALSE(); + } + else if (id == keyword__FILE__) { + return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), + rb_filesystem_encoding())); + } + else if (id == keyword__LINE__) { + return NEW_LIT(INT2FIX(ruby_sourceline)); + } + else if (id == keyword__ENCODING__) { + return NEW_LIT(rb_enc_from_encoding(parser->enc)); + } + else if (is_local_id(id)) { + if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); + if (local_id(id)) return NEW_LVAR(id); + /* method call without arguments */ + return NEW_VCALL(id); + } + else if (is_global_id(id)) { + return NEW_GVAR(id); + } + else if (is_instance_id(id)) { + return NEW_IVAR(id); + } + else if (is_const_id(id)) { + return NEW_CONST(id); + } + else if (is_class_id(id)) { + return NEW_CVAR(id); + } + compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); + return 0; +} + +static NODE* +assignable_gen(struct parser_params *parser, ID id, NODE *val) +{ + if (!id) return 0; + if (id == keyword_self) { + yyerror("Can't change the value of self"); + } + else if (id == keyword_nil) { + yyerror("Can't assign to nil"); + } + else if (id == keyword_true) { + yyerror("Can't assign to true"); + } + else if (id == keyword_false) { + yyerror("Can't assign to false"); + } + else if (id == keyword__FILE__) { + yyerror("Can't assign to __FILE__"); + } + else if (id == keyword__LINE__) { + yyerror("Can't assign to __LINE__"); + } + else if (id == keyword__ENCODING__) { + yyerror("Can't assign to __ENCODING__"); + } + else if (is_local_id(id)) { + if (dyna_in_block()) { + if (dvar_curr(id)) { + return NEW_DASGN_CURR(id, val); + } + else if (dvar_defined(id)) { + return NEW_DASGN(id, val); + } + else if (local_id(id)) { + return NEW_LASGN(id, val); + } + else{ + dyna_var(id); + return NEW_DASGN_CURR(id, val); + } + } + else { + if (!local_id(id)) { + local_var(id); + } + return NEW_LASGN(id, val); + } + } + else if (is_global_id(id)) { + return NEW_GASGN(id, val); + } + else if (is_instance_id(id)) { + return NEW_IASGN(id, val); + } + else if (is_const_id(id)) { + if (in_def || in_single) + yyerror("dynamic constant assignment"); + return NEW_CDECL(id, val, 0); + } + else if (is_class_id(id)) { + return NEW_CVASGN(id, val); + } + else { + compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); + } + return 0; +} + +static void +shadowing_lvar_gen(struct parser_params *parser, ID name) +{ + ID uscore; + + CONST_ID(uscore, "_"); + if (uscore == name) return; + if (dyna_in_block()) { + if (dvar_curr(name)) { + yyerror("duplicated argument name"); + } + else if (dvar_defined(name) || local_id(name)) { + rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); + vtable_add(lvtbl->vars, name); + } + } + else { + if (local_id(name)) { + yyerror("duplicated argument name"); + } + } +} + +static void +new_bv_gen(struct parser_params *parser, ID name) +{ + if (!name) return; + if (!is_local_id(name)) { + compile_error(PARSER_ARG "invalid local variable - %s", + rb_id2name(name)); + return; + } + shadowing_lvar(name); + dyna_var(name); +} + +static NODE * +aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, tASET, idx); +} + +static void +block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "both block arg and actual block given"); + } +} + +ID +rb_id_attrset(ID id) +{ + id &= ~ID_SCOPE_MASK; + id |= ID_ATTRSET; + return id; +} + +static NODE * +attrset_gen(struct parser_params *parser, NODE *recv, ID id) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); +} + +static void +rb_backref_error_gen(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_NTH_REF: + compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); + break; + case NODE_BACK_REF: + compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); + break; + } +} + +static NODE * +arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node2) return node1; + switch (nd_type(node1)) { + case NODE_BLOCK_PASS: + node1->nd_iter = arg_concat(node1->nd_iter, node2); + return node1; + case NODE_ARGSPUSH: + if (nd_type(node2) != NODE_ARRAY) break; + node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + case NODE_ARGSCAT: + if (nd_type(node2) != NODE_ARRAY || + nd_type(node1->nd_body) != NODE_ARRAY) break; + node1->nd_body = list_concat(node1->nd_body, node2); + return node1; + } + return NEW_ARGSCAT(node1, node2); +} + +static NODE * +arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node1) return NEW_LIST(node2); + switch (nd_type(node1)) { + case NODE_ARRAY: + return list_append(node1, node2); + case NODE_BLOCK_PASS: + node1->nd_head = arg_append(node1->nd_head, node2); + return node1; + case NODE_ARGSPUSH: + node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + } + return NEW_ARGSPUSH(node1, node2); +} + +static NODE * +splat_array(NODE* node) +{ + if (nd_type(node) == NODE_SPLAT) node = node->nd_head; + if (nd_type(node) == NODE_ARRAY) return node; + return 0; +} + +static NODE * +node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) +{ + if (!lhs) return 0; + + switch (nd_type(lhs)) { + case NODE_GASGN: + case NODE_IASGN: + case NODE_IASGN2: + case NODE_LASGN: + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_MASGN: + case NODE_CDECL: + case NODE_CVASGN: + lhs->nd_value = rhs; + break; + + case NODE_ATTRASGN: + case NODE_CALL: + lhs->nd_args = arg_append(lhs->nd_args, rhs); + break; + + default: + /* should not happen */ + break; + } + + return lhs; +} + +static int +value_expr_gen(struct parser_params *parser, NODE *node) +{ + int cond = 0; + + if (!node) { + rb_warning0("empty expression"); + } + while (node) { + switch (nd_type(node)) { + case NODE_DEFN: + case NODE_DEFS: + parser_warning(node, "void value expression"); + return Qfalse; + + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (!cond) yyerror("void value expression"); + /* or "control never reach"? */ + return Qfalse; + + case NODE_BLOCK: + while (node->nd_next) { + node = node->nd_next; + } + node = node->nd_head; + break; + + case NODE_BEGIN: + node = node->nd_body; + break; + + case NODE_IF: + if (!node->nd_body) { + node = node->nd_else; + break; + } + else if (!node->nd_else) { + node = node->nd_body; + break; + } + if (!value_expr(node->nd_body)) return Qfalse; + node = node->nd_else; + break; + + case NODE_AND: + case NODE_OR: + cond = 1; + node = node->nd_2nd; + break; + + default: + return Qtrue; + } + } + + return Qtrue; +} + +static void +void_expr_gen(struct parser_params *parser, NODE *node) +{ + const char *useless = 0; + + if (!RTEST(ruby_verbose)) return; + + if (!node) return; + switch (nd_type(node)) { + case NODE_CALL: + switch (node->nd_mid) { + case '+': + case '-': + case '*': + case '/': + case '%': + case tPOW: + case tUPLUS: + case tUMINUS: + case '|': + case '^': + case '&': + case tCMP: + case '>': + case tGEQ: + case '<': + case tLEQ: + case tEQ: + case tNEQ: + useless = rb_id2name(node->nd_mid); + break; + } + break; + + case NODE_LVAR: + case NODE_DVAR: + case NODE_GVAR: + case NODE_IVAR: + case NODE_CVAR: + case NODE_NTH_REF: + case NODE_BACK_REF: + useless = "a variable"; + break; + case NODE_CONST: + useless = "a constant"; + break; + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + useless = "a literal"; + break; + case NODE_COLON2: + case NODE_COLON3: + useless = "::"; + break; + case NODE_DOT2: + useless = ".."; + break; + case NODE_DOT3: + useless = "..."; + break; + case NODE_SELF: + useless = "self"; + break; + case NODE_NIL: + useless = "nil"; + break; + case NODE_TRUE: + useless = "true"; + break; + case NODE_FALSE: + useless = "false"; + break; + case NODE_DEFINED: + useless = "defined?"; + break; + } + + if (useless) { + int line = ruby_sourceline; + + ruby_sourceline = nd_line(node); + rb_warnS("useless use of %s in void context", useless); + ruby_sourceline = line; + } +} + +static void +void_stmts_gen(struct parser_params *parser, NODE *node) +{ + if (!RTEST(ruby_verbose)) return; + if (!node) return; + if (nd_type(node) != NODE_BLOCK) return; + + for (;;) { + if (!node->nd_next) return; + void_expr0(node->nd_head); + node = node->nd_next; + } +} + +static NODE * +remove_begin(NODE *node) +{ + NODE **n = &node, *n1 = node; + while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { + *n = n1 = n1->nd_body; + } + return node; +} + +static void +reduce_nodes_gen(struct parser_params *parser, NODE **body) +{ + NODE *node = *body; + + if (!node) { + *body = NEW_NIL(); + return; + } +#define subnodes(n1, n2) \ + ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ + (!node->n2) ? (body = &node->n1, 1) : \ + (reduce_nodes(&node->n1), body = &node->n2, 1)) + + while (node) { + switch (nd_type(node)) { + end: + case NODE_NIL: + *body = 0; + return; + case NODE_RETURN: + *body = node = node->nd_stts; + continue; + case NODE_BEGIN: + *body = node = node->nd_body; + continue; + case NODE_BLOCK: + body = &node->nd_end->nd_head; + break; + case NODE_IF: + if (subnodes(nd_body, nd_else)) break; + return; + case NODE_CASE: + body = &node->nd_body; + break; + case NODE_WHEN: + if (!subnodes(nd_body, nd_next)) goto end; + break; + case NODE_ENSURE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + case NODE_RESCUE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + default: + return; + } + node = *body; + } + +#undef subnodes +} + +static int +assign_in_cond(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_MASGN: + yyerror("multiple assignment in conditional"); + return 1; + + case NODE_LASGN: + case NODE_DASGN: + case NODE_GASGN: + case NODE_IASGN: + break; + + default: + return 0; + } + + switch (nd_type(node->nd_value)) { + case NODE_LIT: + case NODE_STR: + case NODE_NIL: + case NODE_TRUE: + case NODE_FALSE: + /* reports always */ + parser_warn(node->nd_value, "found = in conditional, should be =="); + return 1; + + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_EVSTR: + case NODE_DREGX: + default: + break; + } + return 1; +} + +static void +warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warn(node, str); +} + +static void +warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warning(node, str); +} + +static void +fixup_nodes(NODE **rootnode) +{ + NODE *node, *next, *head; + + for (node = *rootnode; node; node = next) { + enum node_type type; + VALUE val; + + next = node->nd_next; + head = node->nd_head; + rb_gc_force_recycle((VALUE)node); + *rootnode = next; + switch (type = nd_type(head)) { + case NODE_DOT2: + case NODE_DOT3: + val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, + type == NODE_DOT3 ? Qtrue : Qfalse); + rb_gc_force_recycle((VALUE)head->nd_beg); + rb_gc_force_recycle((VALUE)head->nd_end); + nd_set_type(head, NODE_LIT); + head->nd_lit = val; + break; + default: + break; + } + } +} + +static NODE *cond0(struct parser_params*,NODE*); + +static NODE* +range_op(struct parser_params *parser, NODE *node) +{ + enum node_type type; + + if (node == 0) return 0; + + type = nd_type(node); + value_expr(node); + if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { + warn_unless_e_option(parser, node, "integer literal in conditional range"); + return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); + } + return cond0(parser, node); +} + +static int +literal_node(NODE *node) +{ + if (!node) return 1; /* same as NODE_NIL */ + switch (nd_type(node)) { + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_EVSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + case NODE_DSYM: + return 2; + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + return 1; + } + return 0; +} + +static NODE* +cond0(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + assign_in_cond(parser, node); + + switch (nd_type(node)) { + case NODE_DSTR: + case NODE_EVSTR: + case NODE_STR: + rb_warn0("string literal in condition"); + break; + + case NODE_DREGX: + case NODE_DREGX_ONCE: + warning_unless_e_option(parser, node, "regex literal in condition"); + return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); + + case NODE_AND: + case NODE_OR: + node->nd_1st = cond0(parser, node->nd_1st); + node->nd_2nd = cond0(parser, node->nd_2nd); + break; + + case NODE_DOT2: + case NODE_DOT3: + node->nd_beg = range_op(parser, node->nd_beg); + node->nd_end = range_op(parser, node->nd_end); + if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); + else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); + if (!e_option_supplied(parser)) { + int b = literal_node(node->nd_beg); + int e = literal_node(node->nd_end); + if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { + parser_warn(node, "range literal in condition"); + } + } + break; + + case NODE_DSYM: + parser_warning(node, "literal in condition"); + break; + + case NODE_LIT: + if (TYPE(node->nd_lit) == T_REGEXP) { + warn_unless_e_option(parser, node, "regex literal in condition"); + nd_set_type(node, NODE_MATCH); + } + else { + parser_warning(node, "literal in condition"); + } + default: + break; + } + return node; +} + +static NODE* +cond_gen(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + return cond0(parser, node); +} + +static NODE* +logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) +{ + value_expr(left); + if (left && nd_type(left) == type) { + NODE *node = left, *second; + while ((second = node->nd_2nd) != 0 && nd_type(second) == type) { + node = second; + } + node->nd_2nd = NEW_NODE(type, second, right, 0); + return left; + } + return NEW_NODE(type, left, right, 0); +} + +static void +no_blockarg(struct parser_params *parser, NODE *node) +{ + if (node && nd_type(node) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "block argument should not be given"); + } +} + +static NODE * +ret_args_gen(struct parser_params *parser, NODE *node) +{ + if (node) { + no_blockarg(parser, node); + if (nd_type(node) == NODE_ARRAY) { + if (node->nd_next == 0) { + node = node->nd_head; + } + else { + nd_set_type(node, NODE_VALUES); + } + } + } + return node; +} + +static NODE * +new_yield_gen(struct parser_params *parser, NODE *node) +{ + long state = Qtrue; + + if (node) { + no_blockarg(parser, node); + if (node && nd_type(node) == NODE_SPLAT) { + state = Qtrue; + } + } + else { + state = Qfalse; + } + return NEW_YIELD(node, state); +} + +static NODE* +negate_lit(NODE *node) +{ + switch (TYPE(node->nd_lit)) { + case T_FIXNUM: + node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); + break; + case T_BIGNUM: + node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); + break; + case T_FLOAT: + RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); + break; + default: + break; + } + return node; +} + +static NODE * +arg_blk_pass(NODE *node1, NODE *node2) +{ + if (node2) { + node2->nd_head = node1; + return node2; + } + return node1; +} + +static NODE* +new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) +{ + int saved_line = ruby_sourceline; + NODE *node; + NODE *i1, *i2 = 0; + + node = NEW_ARGS(m ? m->nd_plen : 0, o); + i1 = m ? m->nd_next : 0; + node->nd_next = NEW_ARGS_AUX(r, b); + + if (p) { + i2 = p->nd_next; + node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); + } + else if (i1) { + node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); + } + if (i1 || i2) { + node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); + } + ruby_sourceline = saved_line; + return node; +} + +static void +local_push_gen(struct parser_params *parser, int inherit_dvars) +{ + struct local_vars *local; + + local = ALLOC(struct local_vars); + local->prev = lvtbl; + local->args = vtable_alloc(0); + local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); + lvtbl = local; +} + +static void +local_pop_gen(struct parser_params *parser) +{ + struct local_vars *local = lvtbl->prev; + vtable_free(lvtbl->args); + vtable_free(lvtbl->vars); + xfree(lvtbl); + lvtbl = local; +} + +static ID* +vtable_tblcpy(ID *buf, const struct vtable *src) +{ + int i, cnt = vtable_size(src); + + if (cnt > 0) { + buf[0] = cnt; + for (i = 0; i < cnt; i++) { + buf[i] = src->tbl[i]; + } + return buf; + } + return 0; +} + +static ID* +local_tbl_gen(struct parser_params *parser) +{ + int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); + ID *buf; + + if (cnt <= 0) return 0; + buf = ALLOC_N(ID, cnt + 1); + vtable_tblcpy(buf+1, lvtbl->args); + vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); + buf[0] = cnt; + return buf; +} + +static int +arg_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->args, id); + return vtable_size(lvtbl->args) - 1; +} + +static int +local_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->vars, id); + return vtable_size(lvtbl->vars) - 1; +} + +static int +local_id_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + vars = lvtbl->vars; + args = lvtbl->args; + + while (vars && POINTER_P(vars->prev)) { + vars = vars->prev; + args = args->prev; + } + + if (vars && vars->prev == DVARS_INHERIT) { + return rb_local_defined(id); + } + else { + return (vtable_included(args, id) || + vtable_included(vars, id)); + } +} + +static void +dyna_push_gen(struct parser_params *parser) +{ + lvtbl->args = vtable_alloc(lvtbl->args); + lvtbl->vars = vtable_alloc(lvtbl->vars); +} + +static void +dyna_pop_gen(struct parser_params *parser) +{ + struct vtable *tmp; + + tmp = lvtbl->args; + lvtbl->args = lvtbl->args->prev; + vtable_free(tmp); + tmp = lvtbl->vars; + lvtbl->vars = lvtbl->vars->prev; + vtable_free(tmp); +} + +static int +dyna_in_block_gen(struct parser_params *parser) +{ + return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; +} + +static int +dvar_defined_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + args = lvtbl->args; + vars = lvtbl->vars; + + while (POINTER_P(vars)) { + if (vtable_included(args, id)) { + return 1; + } + if (vtable_included(vars, id)) { + return 1; + } + args = args->prev; + vars = vars->prev; + } + + if (vars == DVARS_INHERIT) { + return rb_dvar_defined(id); + } + + return 0; +} + +static int +dvar_curr_gen(struct parser_params *parser, ID id) +{ + return (vtable_included(lvtbl->args, id) || + vtable_included(lvtbl->vars, id)); +} + +VALUE rb_reg_compile(VALUE str, int options); +VALUE rb_reg_check_preprocess(VALUE); + +static void +reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) +{ + int c = RE_OPTION_ENCODING_IDX(options); + + if (c) { + int opt, idx; + rb_char_to_option_kcode(c, &opt, &idx); + if (idx != ENCODING_GET(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + goto error; + } + ENCODING_SET(str, idx); + } + else if (RE_OPTION_ENCODING_NONE(options)) { + if (!ENCODING_IS_ASCII8BIT(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + c = 'n'; + goto error; + } + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + else if (parser->enc == rb_usascii_encoding()) { + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + /* raise in re.c */ + rb_enc_associate(str, rb_usascii_encoding()); + } + else { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + return; + + error: + compile_error(PARSER_ARG + "regexp encoding option '%c' differs from source encoding '%s'", + c, rb_enc_name(rb_enc_get(str))); +} + +static void +reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE err; + reg_fragment_setenc_gen(parser, str, options); + err = rb_reg_check_preprocess(str); + if (err != Qnil) { + err = rb_obj_as_string(err); + compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); + RB_GC_GUARD(err); + } +} + +typedef struct { + struct parser_params* parser; + rb_encoding *enc; + NODE *succ_block; + NODE *fail_block; + int num; +} reg_named_capture_assign_t; + +static int +reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg0) +{ + reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; + struct parser_params* parser = arg->parser; + rb_encoding *enc = arg->enc; + int len = name_end - name; + const char *s = (const char *)name; + ID var; + + arg->num++; + + if (arg->succ_block == 0) { + arg->succ_block = NEW_BEGIN(0); + arg->fail_block = NEW_BEGIN(0); + } + + if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || + rb_reserved_word(s, len) || !rb_enc_symname2_p(s, len, enc)) { + return ST_CONTINUE; + } + var = rb_intern3(s, len, enc); + if (dvar_defined(var) || local_id(var)) { + rb_warningS("named capture conflicts a local variable - %s", + rb_id2name(var)); + } + arg->succ_block = block_append(arg->succ_block, + newline_node(node_assign(assignable(var,0), + NEW_CALL( + gettable(rb_intern("$~")), + idAREF, + NEW_LIST(NEW_LIT(ID2SYM(var)))) + ))); + arg->fail_block = block_append(arg->fail_block, + newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); + return ST_CONTINUE; +} + +static NODE * +reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) +{ + reg_named_capture_assign_t arg; + + arg.parser = parser; + arg.enc = rb_enc_get(regexp); + arg.succ_block = 0; + arg.fail_block = 0; + arg.num = 0; + onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); + + if (arg.num == 0) + return match; + + return + block_append( + newline_node(match), + NEW_IF(gettable(rb_intern("$~")), + block_append( + newline_node(arg.succ_block), + newline_node( + NEW_CALL( + gettable(rb_intern("$~")), + rb_intern("begin"), + NEW_LIST(NEW_LIT(INT2FIX(0)))))), + block_append( + newline_node(arg.fail_block), + newline_node( + NEW_LIT(Qnil))))); +} + +static VALUE +reg_compile_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE re; + VALUE err; + + reg_fragment_setenc(str, options); + err = rb_errinfo(); + re = rb_reg_compile(str, options & RE_OPTION_MASK); + if (NIL_P(re)) { + ID mesg = rb_intern("mesg"); + VALUE m = rb_attr_get(rb_errinfo(), mesg); + rb_set_errinfo(err); + if (!NIL_P(err)) { + rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); + } + else { + compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); + } + return Qnil; + } + return re; +} + +void +rb_gc_mark_parser(void) +{ +} + +NODE* +rb_parser_append_print(VALUE vparser, NODE *node) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + + node = block_append(node, + NEW_FCALL(rb_intern("print"), + NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +NODE * +rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + if (split) { + node = block_append(NEW_GASGN(rb_intern("$F"), + NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("split"), 0)), + node); + } + if (chop) { + node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("chop!"), 0), node); + } + + node = NEW_OPT_N(node); + + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +static const struct { + ID token; + const char *name; +} op_tbl[] = { + {tDOT2, ".."}, + {tDOT3, "..."}, + {'+', "+(binary)"}, + {'-', "-(binary)"}, + {tPOW, "**"}, + {tUPLUS, "+@"}, + {tUMINUS, "-@"}, + {tCMP, "<=>"}, + {tGEQ, ">="}, + {tLEQ, "<="}, + {tEQ, "=="}, + {tEQQ, "==="}, + {tNEQ, "!="}, + {tMATCH, "=~"}, + {tNMATCH, "!~"}, + {tAREF, "[]"}, + {tASET, "[]="}, + {tLSHFT, "<<"}, + {tRSHFT, ">>"}, + {tCOLON2, "::"}, +}; + +#define op_tbl_count (sizeof(op_tbl) / sizeof(op_tbl[0])) + +static struct symbols { + ID last_id; + st_table *sym_id; + st_table *id_str; + st_table *ivar2_id; + st_table *id_ivar2; + VALUE op_sym[tLAST_TOKEN]; +} global_symbols = {tLAST_ID}; + +static const struct st_hash_type symhash = { + rb_str_hash_cmp, + rb_str_hash, +}; + +struct ivar2_key { + ID id; + VALUE klass; +}; + +static int +ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) +{ + if (key1->id == key2->id && key1->klass == key2->klass) { + return 0; + } + return 1; +} + +static int +ivar2_hash(struct ivar2_key *key) +{ + return (key->id << 8) ^ (key->klass >> 2); +} + +static const struct st_hash_type ivar2_hash_type = { + ivar2_cmp, + ivar2_hash, +}; + +void +Init_sym(void) +{ + global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); + global_symbols.id_str = st_init_numtable_with_size(1000); + global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); + global_symbols.id_ivar2 = st_init_numtable_with_size(1000); + + Init_id(); +} + +void +rb_gc_mark_symbols(void) +{ + rb_mark_tbl(global_symbols.id_str); + rb_gc_mark_locations(global_symbols.op_sym, + global_symbols.op_sym + tLAST_TOKEN); +} + +static ID +internal_id_gen(struct parser_params *parser) +{ + ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); + id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; + return ID_INTERNAL | (id << ID_SCOPE_SHIFT); +} + +static int +is_special_global_name(const char *m, const char *e, rb_encoding *enc) +{ + int mb = 0; + + if (m >= e) return 0; + switch (*m) { + case '~': case '*': case '$': case '?': case '!': case '@': + case '/': case '\\': case ';': case ',': case '.': case '=': + case ':': case '<': case '>': case '\"': + case '&': case '`': case '\'': case '+': + case '0': + ++m; + break; + case '-': + ++m; + if (m < e && is_identchar(m, e, enc)) { + if (!ISASCII(*m)) mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + break; + default: + if (!rb_enc_isdigit(*m, enc)) return 0; + do { + if (!ISASCII(*m)) mb = 1; + ++m; + } while (rb_enc_isdigit(*m, enc)); + } + return m == e ? mb + 1 : 0; +} + +int +rb_symname_p(const char *name) +{ + return rb_enc_symname_p(name, rb_ascii8bit_encoding()); +} + +int +rb_enc_symname_p(const char *name, rb_encoding *enc) +{ + return rb_enc_symname2_p(name, strlen(name), enc); +} + +int +rb_enc_symname2_p(const char *name, int len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + int localid = Qfalse; + + if (!m) return Qfalse; + switch (*m) { + case '\0': + return Qfalse; + + case '$': + if (is_special_global_name(++m, e, enc)) return Qtrue; + goto id; + + case '@': + if (*++m == '@') ++m; + goto id; + + case '<': + switch (*++m) { + case '<': ++m; break; + case '=': if (*++m == '>') ++m; break; + default: break; + } + break; + + case '>': + switch (*++m) { + case '>': case '=': ++m; break; + } + break; + + case '=': + switch (*++m) { + case '~': ++m; break; + case '=': if (*++m == '=') ++m; break; + default: return Qfalse; + } + break; + + case '*': + if (*++m == '*') ++m; + break; + + case '+': case '-': + if (*++m == '@') ++m; + break; + + case '|': case '^': case '&': case '/': case '%': case '~': case '`': + ++m; + break; + + case '[': + if (*++m != ']') return Qfalse; + if (*++m == '=') ++m; + break; + + case '!': + switch (*++m) { + case '\0': return Qtrue; + case '=': case '~': ++m; break; + default: return Qfalse; + } + break; + + default: + localid = !rb_enc_isupper(*m, enc); + id: + if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) + return Qfalse; + while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); + if (localid) { + switch (*m) { + case '!': case '?': case '=': ++m; + } + } + break; + } + return *m ? Qfalse : Qtrue; +} + +static ID +register_symid(ID id, const char *name, long len, rb_encoding *enc) +{ + VALUE str = rb_enc_str_new(name, len, enc); + OBJ_FREEZE(str); + st_add_direct(global_symbols.sym_id, (st_data_t)str, id); + st_add_direct(global_symbols.id_str, id, (st_data_t)str); + return id; +} + +ID +rb_intern3(const char *name, long len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + unsigned char c; + VALUE str; + ID id; + int last; + int mb; + struct RString fake_str; + fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE; + fake_str.basic.klass = rb_cString; + fake_str.as.heap.len = len; + fake_str.as.heap.ptr = (char *)name; + fake_str.as.heap.aux.capa = len; + str = (VALUE)&fake_str; + rb_enc_associate(str, enc); + + if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) + return id; + + if (rb_cString && !rb_enc_asciicompat(enc)) { + id = ID_JUNK; + goto new_id; + } + last = len-1; + id = 0; + switch (*m) { + case '$': + id |= ID_GLOBAL; + if ((mb = is_special_global_name(++m, e, enc)) != 0) { + if (!--mb) enc = rb_ascii8bit_encoding(); + goto new_id; + } + break; + case '@': + if (m[1] == '@') { + m++; + id |= ID_CLASS; + } + else { + id |= ID_INSTANCE; + } + m++; + break; + default: + c = m[0]; + if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { + /* operators */ + int i; + + if (len == 1) { + id = c; + goto id_register; + } + for (i = 0; i < op_tbl_count; i++) { + if (*op_tbl[i].name == *m && + strcmp(op_tbl[i].name, m) == 0) { + id = op_tbl[i].token; + goto id_register; + } + } + } + + if (m[last] == '=') { + /* attribute assignment */ + id = rb_intern3(name, last, enc); + if (id > tLAST_TOKEN && !is_attrset_id(id)) { + enc = rb_enc_get(rb_id2str(id)); + id = rb_id_attrset(id); + goto id_register; + } + id = ID_ATTRSET; + } + else if (rb_enc_isupper(m[0], enc)) { + id = ID_CONST; + } + else { + id = ID_LOCAL; + } + break; + } + mb = 0; + if (!rb_enc_isdigit(*m, enc)) { + while (m <= name + last && is_identchar(m, e, enc)) { + if (ISASCII(*m)) { + m++; + } + else { + mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + } + } + if (m - name < len) id = ID_JUNK; + if (enc != rb_usascii_encoding()) { + /* + * this clause makes sense only when called from other than + * rb_intern_str() taking care of code-range. + */ + if (!mb) { + for (; m <= name + len; ++m) { + if (!ISASCII(*m)) goto mbstr; + } + enc = rb_usascii_encoding(); + } + mbstr:; + } + new_id: + id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; + id_register: + return register_symid(id, name, len, enc); +} + +ID +rb_intern2(const char *name, long len) +{ + return rb_intern3(name, len, rb_usascii_encoding()); +} + +#undef rb_intern +ID +rb_intern(const char *name) +{ + return rb_intern2(name, strlen(name)); +} + +ID +rb_intern_str(VALUE str) +{ + rb_encoding *enc; + ID id; + + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + enc = rb_usascii_encoding(); + } + else { + enc = rb_enc_get(str); + } + id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); + RB_GC_GUARD(str); + return id; +} + +VALUE +rb_id2str(ID id) +{ + st_data_t data; + + if (id < tLAST_TOKEN) { + int i = 0; + + if (rb_ispunct(id)) { + VALUE str = global_symbols.op_sym[i = (int)id]; + if (!str) { + char name[2]; + name[0] = (char)id; + name[1] = 0; + str = rb_usascii_str_new(name, 1); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + for (i = 0; i < op_tbl_count; i++) { + if (op_tbl[i].token == id) { + VALUE str = global_symbols.op_sym[i]; + if (!str) { + str = rb_usascii_str_new2(op_tbl[i].name); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + } + } + + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + + if (is_attrset_id(id)) { + ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; + VALUE str; + + while (!(str = rb_id2str(id2))) { + if (!is_local_id(id2)) return 0; + id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; + } + str = rb_str_dup(str); + rb_str_cat(str, "=", 1); + rb_intern_str(str); + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + } + return 0; +} + +const char * +rb_id2name(ID id) +{ + VALUE str = rb_id2str(id); + + if (!str) return 0; + return RSTRING_PTR(str); +} + +static int +symbols_i(VALUE sym, ID value, VALUE ary) +{ + rb_ary_push(ary, ID2SYM(value)); + return ST_CONTINUE; +} + +/* + * call-seq: + * Symbol.all_symbols => array + * + * Returns an array of all the symbols currently in Ruby's symbol + * table. + * + * Symbol.all_symbols.size #=> 903 + * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, + * :chown, :EOFError, :$;, :String, + * :LOCK_SH, :"setuid?", :$<, + * :default_proc, :compact, :extend, + * :Tms, :getwd, :$=, :ThreadGroup, + * :wait2, :$>] + */ + +VALUE +rb_sym_all_symbols(void) +{ + VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); + + st_foreach(global_symbols.sym_id, symbols_i, ary); + return ary; +} + +int +rb_is_const_id(ID id) +{ + if (is_const_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_class_id(ID id) +{ + if (is_class_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_instance_id(ID id) +{ + if (is_instance_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_local_id(ID id) +{ + if (is_local_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_junk_id(ID id) +{ + if (is_junk_id(id)) return Qtrue; + return Qfalse; +} + +#endif /* !RIPPER */ + +static void +parser_initialize(struct parser_params *parser) +{ + parser->eofp = Qfalse; + + parser->parser_lex_strterm = 0; + parser->parser_cond_stack = 0; + parser->parser_cmdarg_stack = 0; + parser->parser_class_nest = 0; + parser->parser_paren_nest = 0; + parser->parser_lpar_beg = 0; + parser->parser_in_single = 0; + parser->parser_in_def = 0; + parser->parser_in_defined = 0; + parser->parser_compile_for_eval = 0; + parser->parser_cur_mid = 0; + parser->parser_tokenbuf = NULL; + parser->parser_tokidx = 0; + parser->parser_toksiz = 0; + parser->parser_heredoc_end = 0; + parser->parser_command_start = Qtrue; + parser->parser_deferred_nodes = 0; + parser->parser_lex_pbeg = 0; + parser->parser_lex_p = 0; + parser->parser_lex_pend = 0; + parser->parser_lvtbl = 0; + parser->parser_ruby__end__seen = 0; + parser->parser_ruby_sourcefile = 0; +#ifndef RIPPER + parser->is_ripper = 0; + parser->parser_eval_tree_begin = 0; + parser->parser_eval_tree = 0; +#else + parser->is_ripper = 1; + parser->parser_ruby_sourcefile_string = Qnil; + parser->delayed = Qnil; + + parser->result = Qnil; + parser->parsing_thread = Qnil; + parser->toplevel_p = Qtrue; +#endif +#ifdef YYMALLOC + parser->heap = NULL; +#endif + parser->enc = rb_usascii_encoding(); +} + +#ifdef RIPPER +#define parser_mark ripper_parser_mark +#define parser_free ripper_parser_free +#endif + +static void +parser_mark(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + + rb_gc_mark((VALUE)p->parser_lex_strterm); + rb_gc_mark((VALUE)p->parser_deferred_nodes); + rb_gc_mark(p->parser_lex_input); + rb_gc_mark(p->parser_lex_lastline); + rb_gc_mark(p->parser_lex_nextline); +#ifndef RIPPER + rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; + rb_gc_mark((VALUE)p->parser_eval_tree) ; + rb_gc_mark(p->debug_lines); +#else + rb_gc_mark(p->parser_ruby_sourcefile_string); + rb_gc_mark(p->delayed); + rb_gc_mark(p->value); + rb_gc_mark(p->result); + rb_gc_mark(p->parsing_thread); +#endif +#ifdef YYMALLOC + rb_gc_mark((VALUE)p->heap); +#endif +} + +static void +parser_free(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + struct local_vars *local, *prev; + + if (p->parser_tokenbuf) { + xfree(p->parser_tokenbuf); + } + for (local = p->parser_lvtbl; local; local = prev) { + if (local->vars) xfree(local->vars); + prev = local->prev; + xfree(local); + } +#ifndef RIPPER + xfree(p->parser_ruby_sourcefile); +#endif + xfree(p); +} + +VALUE rb_parser_get_yydebug(VALUE); +VALUE rb_parser_set_yydebug(VALUE, VALUE); + +#ifndef RIPPER +static struct parser_params * +parser_new(void) +{ + struct parser_params *p; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + parser_initialize(p); + return p; +} + +VALUE +rb_parser_new(void) +{ + struct parser_params *p = parser_new(); + + return Data_Wrap_Struct(0, parser_mark, parser_free, p); +} + +/* + * call-seq: + * ripper#end_seen? -> Boolean + * + * Return if parsed source ended by +\_\_END\_\_+. + * This number starts from 1. + */ +VALUE +rb_parser_end_seen_p(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return ruby__end__seen ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper#encoding -> encoding + * + * Return encoding of the source. + */ +VALUE +rb_parser_encoding(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return rb_enc_from_encoding(parser->enc); +} + +/* + * call-seq: + * ripper.yydebug -> true or false + * + * Get yydebug. + */ +VALUE +rb_parser_get_yydebug(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + return yydebug ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper.yydebug = flag + * + * Set yydebug. + */ +VALUE +rb_parser_set_yydebug(VALUE self, VALUE flag) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + yydebug = RTEST(flag); + return flag; +} + +#ifdef YYMALLOC +#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) +#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) +#define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ + (n)->u3.cnt = (c), (p)) + +void * +rb_parser_malloc(struct parser_params *parser, size_t size) +{ + size_t cnt = HEAPCNT(1, size); + NODE *n = NEWHEAP(); + void *ptr = xmalloc(size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) +{ + size_t cnt = HEAPCNT(nelem, size); + NODE *n = NEWHEAP(); + void *ptr = xcalloc(nelem, size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) +{ + NODE *n; + size_t cnt = HEAPCNT(1, size); + + if (ptr && (n = parser->heap) != NULL) { + do { + if (n->u1.node == ptr) { + n->u1.node = ptr = xrealloc(ptr, size); + if (n->u3.cnt) n->u3.cnt = cnt; + return ptr; + } + } while ((n = n->u2.node) != NULL); + } + n = NEWHEAP(); + ptr = xrealloc(ptr, size); + return ADD2HEAP(n, cnt, ptr); +} + +void +rb_parser_free(struct parser_params *parser, void *ptr) +{ + NODE **prev = &parser->heap, *n; + + while ((n = *prev) != NULL) { + if (n->u1.node == ptr) { + *prev = n->u2.node; + rb_gc_force_recycle((VALUE)n); + break; + } + prev = &n->u2.node; + } + xfree(ptr); +} +#endif +#endif + +#ifdef RIPPER +#ifdef RIPPER_DEBUG +extern int rb_is_pointer_to_heap(VALUE); + +/* :nodoc: */ +static VALUE +ripper_validate_object(VALUE self, VALUE x) +{ + if (x == Qfalse) return x; + if (x == Qtrue) return x; + if (x == Qnil) return x; + if (x == Qundef) + rb_raise(rb_eArgError, "Qundef given"); + if (FIXNUM_P(x)) return x; + if (SYMBOL_P(x)) return x; + if (!rb_is_pointer_to_heap(x)) + rb_raise(rb_eArgError, "invalid pointer: %p", x); + switch (TYPE(x)) { + case T_STRING: + case T_OBJECT: + case T_ARRAY: + case T_BIGNUM: + case T_FLOAT: + return x; + case T_NODE: + rb_raise(rb_eArgError, "NODE given: %p", x); + default: + rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", + x, rb_obj_classname(x)); + } + return x; +} +#endif + +#define validate(x) + +static VALUE +ripper_dispatch0(struct parser_params *parser, ID mid) +{ + return rb_funcall(parser->value, mid, 0); +} + +static VALUE +ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) +{ + validate(a); + return rb_funcall(parser->value, mid, 1, a); +} + +static VALUE +ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) +{ + validate(a); + validate(b); + return rb_funcall(parser->value, mid, 2, a, b); +} + +static VALUE +ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) +{ + validate(a); + validate(b); + validate(c); + return rb_funcall(parser->value, mid, 3, a, b, c); +} + +static VALUE +ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) +{ + validate(a); + validate(b); + validate(c); + validate(d); + return rb_funcall(parser->value, mid, 4, a, b, c, d); +} + +static VALUE +ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) +{ + validate(a); + validate(b); + validate(c); + validate(d); + validate(e); + return rb_funcall(parser->value, mid, 5, a, b, c, d, e); +} + +static const struct kw_assoc { + ID id; + const char *name; +} keyword_to_name[] = { + {keyword_class, "class"}, + {keyword_module, "module"}, + {keyword_def, "def"}, + {keyword_undef, "undef"}, + {keyword_begin, "begin"}, + {keyword_rescue, "rescue"}, + {keyword_ensure, "ensure"}, + {keyword_end, "end"}, + {keyword_if, "if"}, + {keyword_unless, "unless"}, + {keyword_then, "then"}, + {keyword_elsif, "elsif"}, + {keyword_else, "else"}, + {keyword_case, "case"}, + {keyword_when, "when"}, + {keyword_while, "while"}, + {keyword_until, "until"}, + {keyword_for, "for"}, + {keyword_break, "break"}, + {keyword_next, "next"}, + {keyword_redo, "redo"}, + {keyword_retry, "retry"}, + {keyword_in, "in"}, + {keyword_do, "do"}, + {keyword_do_cond, "do"}, + {keyword_do_block, "do"}, + {keyword_return, "return"}, + {keyword_yield, "yield"}, + {keyword_super, "super"}, + {keyword_self, "self"}, + {keyword_nil, "nil"}, + {keyword_true, "true"}, + {keyword_false, "false"}, + {keyword_and, "and"}, + {keyword_or, "or"}, + {keyword_not, "not"}, + {modifier_if, "if"}, + {modifier_unless, "unless"}, + {modifier_while, "while"}, + {modifier_until, "until"}, + {modifier_rescue, "rescue"}, + {keyword_alias, "alias"}, + {keyword_defined, "defined?"}, + {keyword_BEGIN, "BEGIN"}, + {keyword_END, "END"}, + {keyword__LINE__, "__LINE__"}, + {keyword__FILE__, "__FILE__"}, + {keyword__ENCODING__, "__ENCODING__"}, + {0, NULL} +}; + +static const char* +keyword_id_to_str(ID id) +{ + const struct kw_assoc *a; + + for (a = keyword_to_name; a->id; a++) { + if (a->id == id) + return a->name; + } + return NULL; +} + +#undef ripper_id2sym +static VALUE +ripper_id2sym(ID id) +{ + const char *name; + char buf[8]; + + if (id <= 256) { + buf[0] = id; + buf[1] = '\0'; + return ID2SYM(rb_intern(buf)); + } + if ((name = keyword_id_to_str(id))) { + return ID2SYM(rb_intern(name)); + } + switch (id) { + case tOROP: + name = "||"; + break; + case tANDOP: + name = "&&"; + break; + default: + name = rb_id2name(id); + if (!name) { + rb_bug("cannot convert ID to string: %ld", (unsigned long)id); + } + break; + } + return ID2SYM(rb_intern(name)); +} + +static VALUE +ripper_intern(const char *s) +{ + return ID2SYM(rb_intern(s)); +} + +static void +ripper_compile_error(struct parser_params *parser, const char *fmt, ...) +{ + VALUE str; + va_list args; + + va_start(args, fmt); + str = rb_vsprintf(fmt, args); + va_end(args); + rb_funcall(parser->value, rb_intern("compile_error"), 1, str); +} + +static void +ripper_warn0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warnI(struct parser_params *parser, const char *fmt, int a) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), INT2NUM(a)); +} + +#if 0 +static void +ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} +#endif + +static void +ripper_warning0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warning"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} + +static VALUE +ripper_lex_get_generic(struct parser_params *parser, VALUE src) +{ + return rb_funcall(src, ripper_id_gets, 0); +} + +static VALUE +ripper_s_allocate(VALUE klass) +{ + struct parser_params *p; + VALUE self; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + self = Data_Wrap_Struct(klass, parser_mark, parser_free, p); + p->value = self; + return self; +} + +#define ripper_initialized_p(r) ((r)->parser_lex_input != 0) + +/* + * call-seq: + * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper + * + * Create a new Ripper object. + * _src_ must be a String, an IO, or an Object which has #gets method. + * + * This method does not starts parsing. + * See also Ripper#parse and Ripper.parse. + */ +static VALUE +ripper_initialize(int argc, VALUE *argv, VALUE self) +{ + struct parser_params *parser; + VALUE src, fname, lineno; + + Data_Get_Struct(self, struct parser_params, parser); + rb_scan_args(argc, argv, "12", &src, &fname, &lineno); + if (rb_obj_respond_to(src, ripper_id_gets, 0)) { + parser->parser_lex_gets = ripper_lex_get_generic; + } + else { + StringValue(src); + parser->parser_lex_gets = lex_get_str; + } + parser->parser_lex_input = src; + parser->eofp = Qfalse; + if (NIL_P(fname)) { + fname = STR_NEW2("(ripper)"); + } + else { + StringValue(fname); + } + parser_initialize(parser); + + parser->parser_ruby_sourcefile_string = fname; + parser->parser_ruby_sourcefile = RSTRING_PTR(fname); + parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; + + return Qnil; +} + +extern VALUE rb_thread_pass(void); + +struct ripper_args { + struct parser_params *parser; + int argc; + VALUE *argv; +}; + +static VALUE +ripper_parse0(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser_prepare(parser); + ripper_yyparse((void*)parser); + return parser->result; +} + +static VALUE +ripper_ensure(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser->parsing_thread = Qnil; + return Qnil; +} + +/* + * call-seq: + * ripper#parse + * + * Start parsing and returns the value of the root action. + */ +static VALUE +ripper_parse(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (!NIL_P(parser->parsing_thread)) { + if (parser->parsing_thread == rb_thread_current()) + rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); + else + rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); + } + parser->parsing_thread = rb_thread_current(); + rb_ensure(ripper_parse0, self, ripper_ensure, self); + + return parser->result; +} + +/* + * call-seq: + * ripper#column -> Integer + * + * Return column number of current parsing line. + * This number starts from 0. + */ +static VALUE +ripper_column(VALUE self) +{ + struct parser_params *parser; + long col; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + col = parser->tokp - parser->parser_lex_pbeg; + return LONG2NUM(col); +} + +/* + * call-seq: + * ripper#lineno -> Integer + * + * Return line number of current parsing line. + * This number starts from 1. + */ +static VALUE +ripper_lineno(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + return INT2NUM(parser->parser_ruby_sourceline); +} + +#ifdef RIPPER_DEBUG +/* :nodoc: */ +static VALUE +ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) +{ + StringValue(msg); + if (obj == Qundef) { + rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); + } + return Qnil; +} + +/* :nodoc: */ +static VALUE +ripper_value(VALUE self, VALUE obj) +{ + return ULONG2NUM(obj); +} +#endif + +void +Init_ripper(void) +{ + VALUE Ripper; + + Ripper = rb_define_class("Ripper", rb_cObject); + rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); + rb_define_alloc_func(Ripper, ripper_s_allocate); + rb_define_method(Ripper, "initialize", ripper_initialize, -1); + rb_define_method(Ripper, "parse", ripper_parse, 0); + rb_define_method(Ripper, "column", ripper_column, 0); + rb_define_method(Ripper, "lineno", ripper_lineno, 0); + rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); + rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); + rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); + rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); +#ifdef RIPPER_DEBUG + rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); + rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); + rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); +#endif + + ripper_id_gets = rb_intern("gets"); + ripper_init_eventids1(Ripper); + ripper_init_eventids2(Ripper); + /* ensure existing in symbol table */ + rb_intern("||"); + rb_intern("&&"); +} +#endif /* RIPPER */ + diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/ripper.y b/lib/ruby-1.9.1-rc1/ext/ripper/ripper.y new file mode 100644 index 0000000..c5e2f91 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/ripper.y @@ -0,0 +1,10308 @@ +/********************************************************************** + + parse.y - + + $Author: yugui $ + created at: Fri May 28 18:02:42 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +%{ + +#define YYDEBUG 1 +#define YYERROR_VERBOSE 1 +#define YYSTACK_USE_ALLOCA 0 + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/encoding.h" +#include "node.h" +#include "parse.h" +#include "id.h" +#include "regenc.h" +#include +#include +#include + +#define YYMALLOC(size) rb_parser_malloc(parser, size) +#define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) +#define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) +#define YYFREE(ptr) rb_parser_free(parser, ptr) +#define malloc YYMALLOC +#define realloc YYREALLOC +#define calloc YYCALLOC +#define free YYFREE + +#ifndef RIPPER +static ID register_symid(ID, const char *, long, rb_encoding *); +#define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) +#include "id.c" +#endif + +#define is_notop_id(id) ((id)>tLAST_TOKEN) +#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) +#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) +#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) +#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) +#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) +#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) +#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) + +#define is_asgn_or_id(id) ((is_notop_id(id)) && \ + (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ + ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ + ((id)&ID_SCOPE_MASK) == ID_CLASS)) + +enum lex_state_e { + EXPR_BEG, /* ignore newline, +/- is a sign. */ + EXPR_END, /* newline significant, +/- is an operator. */ + EXPR_ENDARG, /* ditto, and unbound braces. */ + EXPR_ARG, /* newline significant, +/- is an operator. */ + EXPR_CMDARG, /* newline significant, +/- is an operator. */ + EXPR_MID, /* newline significant, +/- is an operator. */ + EXPR_FNAME, /* ignore newline, no reserved words. */ + EXPR_DOT, /* right after `.' or `::', no reserved words. */ + EXPR_CLASS, /* immediate after `class', no here document. */ + EXPR_VALUE /* alike EXPR_BEG but label is disallowed. */ +}; + +# ifdef HAVE_LONG_LONG +typedef unsigned LONG_LONG stack_type; +# else +typedef unsigned long stack_type; +# endif + +# define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) +# define BITSTACK_POP(stack) (stack = stack >> 1) +# define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) +# define BITSTACK_SET_P(stack) (stack&1) + +#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) +#define COND_POP() BITSTACK_POP(cond_stack) +#define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) +#define COND_P() BITSTACK_SET_P(cond_stack) + +#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) +#define CMDARG_POP() BITSTACK_POP(cmdarg_stack) +#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) +#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) + +struct vtable { + ID *tbl; + int pos; + int capa; + struct vtable *prev; +}; + +struct local_vars { + struct vtable *args; + struct vtable *vars; + struct local_vars *prev; +}; + +#define DVARS_INHERIT ((void*)1) +#define DVARS_TOPSCOPE NULL +#define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) +#define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) + +#ifndef RIPPER +static int +vtable_size(const struct vtable *tbl) +{ + if (POINTER_P(tbl)) { + return tbl->pos; + } + else { + return 0; + } +} + +#define VTBL_DEBUG 0 + +static struct vtable * +vtable_alloc(struct vtable *prev) +{ + struct vtable *tbl = ALLOC(struct vtable); + tbl->pos = 0; + tbl->capa = 8; + tbl->tbl = ALLOC_N(ID, tbl->capa); + tbl->prev = prev; + if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); + return tbl; +} + +static void +vtable_free(struct vtable *tbl) +{ + if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); + if (POINTER_P(tbl)) { + if (tbl->tbl) { + xfree(tbl->tbl); + } + xfree(tbl); + } +} + +static void +vtable_add(struct vtable *tbl, ID id) +{ + if (!POINTER_P(tbl)) { + rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); + } + if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); + + if (tbl->pos == tbl->capa) { + tbl->capa = tbl->capa * 2; + REALLOC_N(tbl->tbl, ID, tbl->capa); + } + tbl->tbl[tbl->pos++] = id; +} + +static int +vtable_included(const struct vtable * tbl, ID id) +{ + int i; + + if (POINTER_P(tbl)) { + for (i = 0; i < tbl->pos; i++) { + if (tbl->tbl[i] == id) { + return 1; + } + } + } + return 0; +} + + +typedef struct token_info { + const char *token; + int linenum; + int column; + int nonspc; + struct token_info *next; +} token_info; +#endif + +/* + Structure of Lexer Buffer: + + lex_pbeg tokp lex_p lex_pend + | | | | + |-----------+--------------+------------| + |<------------>| + token +*/ +struct parser_params { + int is_ripper; + NODE *heap; + + YYSTYPE *parser_yylval; + VALUE eofp; + + NODE *parser_lex_strterm; + enum lex_state_e parser_lex_state; + stack_type parser_cond_stack; + stack_type parser_cmdarg_stack; + int parser_class_nest; + int parser_paren_nest; + int parser_lpar_beg; + int parser_in_single; + int parser_in_def; + int parser_compile_for_eval; + VALUE parser_cur_mid; + int parser_in_defined; + char *parser_tokenbuf; + int parser_tokidx; + int parser_toksiz; + VALUE parser_lex_input; + VALUE parser_lex_lastline; + VALUE parser_lex_nextline; + const char *parser_lex_pbeg; + const char *parser_lex_p; + const char *parser_lex_pend; + int parser_heredoc_end; + int parser_command_start; + NODE *parser_deferred_nodes; + int parser_lex_gets_ptr; + VALUE (*parser_lex_gets)(struct parser_params*,VALUE); + struct local_vars *parser_lvtbl; + int parser_ruby__end__seen; + int line_count; + int has_shebang; + char *parser_ruby_sourcefile; /* current source file */ + int parser_ruby_sourceline; /* current line no. */ + rb_encoding *enc; + rb_encoding *utf8; + + int parser_yydebug; + +#ifndef RIPPER + /* Ruby core only */ + NODE *parser_eval_tree_begin; + NODE *parser_eval_tree; + VALUE debug_lines; + VALUE coverage; + int nerr; + + token_info *parser_token_info; +#else + /* Ripper only */ + VALUE parser_ruby_sourcefile_string; + const char *tokp; + VALUE delayed; + int delayed_line; + int delayed_col; + + VALUE value; + VALUE result; + VALUE parsing_thread; + int toplevel_p; +#endif +}; + +#define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ + (parser->utf8 = rb_utf8_encoding())) +#define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) +#define STR_NEW0() rb_enc_str_new(0,0,parser->enc) +#define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) +#define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) +#define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) +#define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) + +#ifdef YYMALLOC +void *rb_parser_malloc(struct parser_params *, size_t); +void *rb_parser_realloc(struct parser_params *, void *, size_t); +void *rb_parser_calloc(struct parser_params *, size_t, size_t); +void rb_parser_free(struct parser_params *, void *); +#endif + +static int parser_yyerror(struct parser_params*, const char*); +#define yyerror(msg) parser_yyerror(parser, msg) + +#define YYLEX_PARAM parser + +#define lex_strterm (parser->parser_lex_strterm) +#define lex_state (parser->parser_lex_state) +#define cond_stack (parser->parser_cond_stack) +#define cmdarg_stack (parser->parser_cmdarg_stack) +#define class_nest (parser->parser_class_nest) +#define paren_nest (parser->parser_paren_nest) +#define lpar_beg (parser->parser_lpar_beg) +#define in_single (parser->parser_in_single) +#define in_def (parser->parser_in_def) +#define compile_for_eval (parser->parser_compile_for_eval) +#define cur_mid (parser->parser_cur_mid) +#define in_defined (parser->parser_in_defined) +#define tokenbuf (parser->parser_tokenbuf) +#define tokidx (parser->parser_tokidx) +#define toksiz (parser->parser_toksiz) +#define lex_input (parser->parser_lex_input) +#define lex_lastline (parser->parser_lex_lastline) +#define lex_nextline (parser->parser_lex_nextline) +#define lex_pbeg (parser->parser_lex_pbeg) +#define lex_p (parser->parser_lex_p) +#define lex_pend (parser->parser_lex_pend) +#define heredoc_end (parser->parser_heredoc_end) +#define command_start (parser->parser_command_start) +#define deferred_nodes (parser->parser_deferred_nodes) +#define lex_gets_ptr (parser->parser_lex_gets_ptr) +#define lex_gets (parser->parser_lex_gets) +#define lvtbl (parser->parser_lvtbl) +#define ruby__end__seen (parser->parser_ruby__end__seen) +#define ruby_sourceline (parser->parser_ruby_sourceline) +#define ruby_sourcefile (parser->parser_ruby_sourcefile) +#define yydebug (parser->parser_yydebug) +#ifdef RIPPER +#else +#define ruby_eval_tree (parser->parser_eval_tree) +#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) +#define ruby_debug_lines (parser->debug_lines) +#define ruby_coverage (parser->coverage) +#endif + +static int yylex(void*, void*); + +#ifndef RIPPER +#define yyparse ruby_yyparse + +static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); +#define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) + +static NODE *cond_gen(struct parser_params*,NODE*); +#define cond(node) cond_gen(parser, node) +static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); +#define logop(type,node1,node2) logop_gen(parser, type, node1, node2) + +static NODE *newline_node(NODE*); +static void fixpos(NODE*,NODE*); + +static int value_expr_gen(struct parser_params*,NODE*); +static void void_expr_gen(struct parser_params*,NODE*); +static NODE *remove_begin(NODE*); +#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) +#define void_expr0(node) void_expr_gen(parser, (node)) +#define void_expr(node) void_expr0((node) = remove_begin(node)) +static void void_stmts_gen(struct parser_params*,NODE*); +#define void_stmts(node) void_stmts_gen(parser, node) +static void reduce_nodes_gen(struct parser_params*,NODE**); +#define reduce_nodes(n) reduce_nodes_gen(parser,n) +static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); +#define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2) + +static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); +#define block_append(h,t) block_append_gen(parser,h,t) +static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); +#define list_append(l,i) list_append_gen(parser,l,i) +static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); +#define list_concat(h,t) list_concat_gen(parser,h,t) +static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); +#define arg_append(h,t) arg_append_gen(parser,h,t) +static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); +#define arg_concat(h,t) arg_concat_gen(parser,h,t) +static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); +#define literal_concat(h,t) literal_concat_gen(parser,h,t) +static NODE *new_evstr_gen(struct parser_params*,NODE*); +#define new_evstr(n) new_evstr_gen(parser,n) +static NODE *evstr2dstr_gen(struct parser_params*,NODE*); +#define evstr2dstr(n) evstr2dstr_gen(parser,n) +static NODE *splat_array(NODE*); + +static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); +#define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1) +static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); +#define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id) + +static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); +#define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b) +static void shadowing_lvar_gen(struct parser_params*,ID); +#define shadowing_lvar(name) shadowing_lvar_gen(parser, name) + +static NODE *negate_lit(NODE*); +static NODE *ret_args_gen(struct parser_params*,NODE*); +#define ret_args(node) ret_args_gen(parser, node) +static NODE *arg_blk_pass(NODE*,NODE*); +static NODE *new_yield_gen(struct parser_params*,NODE*); +#define new_yield(node) new_yield_gen(parser, node) + +static NODE *gettable_gen(struct parser_params*,ID); +#define gettable(id) gettable_gen(parser,id) +static NODE *assignable_gen(struct parser_params*,ID,NODE*); +#define assignable(id,node) assignable_gen(parser, id, node) +static void new_bv_gen(struct parser_params*,ID); +#define new_bv(id) new_bv_gen(parser, id) +static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); +#define aryset(node1,node2) aryset_gen(parser, node1, node2) +static NODE *attrset_gen(struct parser_params*,NODE*,ID); +#define attrset(node,id) attrset_gen(parser, node, id) + +static void rb_backref_error_gen(struct parser_params*,NODE*); +#define rb_backref_error(n) rb_backref_error_gen(parser,n) +static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); +#define node_assign(node1, node2) node_assign_gen(parser, node1, node2) + +static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); +#define match_op(node1,node2) match_op_gen(parser, node1, node2) + +static void local_push_gen(struct parser_params*,int); +#define local_push(top) local_push_gen(parser,top) +static void local_pop_gen(struct parser_params*); +#define local_pop() local_pop_gen(parser) +static int local_var_gen(struct parser_params*, ID); +#define local_var(id) local_var_gen(parser, id); +static int arg_var_gen(struct parser_params*, ID); +#define arg_var(id) arg_var_gen(parser, id) +static int local_id_gen(struct parser_params*, ID); +#define local_id(id) local_id_gen(parser, id) +static ID *local_tbl_gen(struct parser_params*); +#define local_tbl() local_tbl_gen(parser) +static ID internal_id_gen(struct parser_params*); +#define internal_id() internal_id_gen(parser) + +static void dyna_push_gen(struct parser_params*); +#define dyna_push() dyna_push_gen(parser) +static void dyna_pop_gen(struct parser_params*); +#define dyna_pop() dyna_pop_gen(parser) +static int dyna_in_block_gen(struct parser_params*); +#define dyna_in_block() dyna_in_block_gen(parser) +#define dyna_var(id) local_var(id) +static int dvar_defined_gen(struct parser_params*,ID); +#define dvar_defined(id) dvar_defined_gen(parser, id) +static int dvar_curr_gen(struct parser_params*,ID); +#define dvar_curr(id) dvar_curr_gen(parser, id) + +static void fixup_nodes(NODE **); + +extern int rb_dvar_defined(ID); +extern int rb_local_defined(ID); +extern int rb_parse_in_eval(void); + +static VALUE reg_compile_gen(struct parser_params*, VALUE, int); +#define reg_compile(str,options) reg_compile_gen(parser, str, options) +static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); +#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options) +static void reg_fragment_check_gen(struct parser_params*, VALUE, int); +#define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options) +static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); +#define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match) +int rb_enc_symname2_p(const char *, int, rb_encoding *); +#else +#define remove_begin(node) (node) +#endif /* !RIPPER */ +static int lvar_defined_gen(struct parser_params*, ID); +#define lvar_defined(id) lvar_defined_gen(parser, id) + +#define RE_OPTION_ONCE (1<<16) +#define RE_OPTION_ENCODING_SHIFT 8 +#define RE_OPTION_ENCODING(e) (((e)&0xff)<>RE_OPTION_ENCODING_SHIFT)&0xff) +#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) +#define RE_OPTION_MASK 0xff +#define RE_OPTION_ARG_ENCODING_NONE 32 + +#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ +#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ +#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) +#define nd_func u1.id +#if SIZEOF_SHORT == 2 +#define nd_term(node) ((signed short)(node)->u2.id) +#else +#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) +#endif +#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) +#define nd_nest u3.cnt + +/****** Ripper *******/ + +#ifdef RIPPER +#define RIPPER_VERSION "0.1.0" + +#include "eventids1.c" +#include "eventids2.c" +static ID ripper_id_gets; + +static VALUE ripper_dispatch0(struct parser_params*,ID); +static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); +static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); +static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); + +#define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) +#define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a) +#define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b) +#define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c) +#define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d) +#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e) + +#define yyparse ripper_yyparse + +static VALUE ripper_intern(const char*); +static VALUE ripper_id2sym(ID); +#ifdef __GNUC__ +#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ + ID2SYM(id) : ripper_id2sym(id)) +#endif + +#define arg_new() dispatch0(args_new) +#define arg_add(l,a) dispatch2(args_add, l, a) +#define arg_prepend(l,a) dispatch2(args_prepend, l, a) +#define arg_add_star(l,a) dispatch2(args_add_star, l, a) +#define arg_add_block(l,b) dispatch2(args_add_block, l, b) +#define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b)) +#define bare_assoc(v) dispatch1(bare_assoc_hash, v) +#define arg_add_assocs(l,b) arg_add(l, bare_assoc(b)) + +#define args2mrhs(a) dispatch1(mrhs_new_from_args, a) +#define mrhs_new() dispatch0(mrhs_new) +#define mrhs_add(l,a) dispatch2(mrhs_add, l, a) +#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a) + +#define mlhs_new() dispatch0(mlhs_new) +#define mlhs_add(l,a) dispatch2(mlhs_add, l, a) +#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a) + +#define params_new(pars, opts, rest, pars2, blk) \ + dispatch5(params, pars, opts, rest, pars2, blk) + +#define blockvar_new(p,v) dispatch2(block_var, p, v) +#define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a) +#define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a) + +#define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a)) +#define method_arg(m,a) dispatch2(method_add_arg,m,a) +#define method_add_block(m,b) dispatch2(method_add_block, m, b) + +#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) + +#define FIXME 0 + +#endif /* RIPPER */ + +#ifndef RIPPER +# define ifndef_ripper(x) x +#else +# define ifndef_ripper(x) +#endif + +#ifndef RIPPER +# define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) +#else +# define rb_warn0(fmt) ripper_warn0(parser, fmt) +# define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a) +# define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a) +# define rb_warning0(fmt) ripper_warning0(parser, fmt) +# define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a) +static void ripper_warn0(struct parser_params*, const char*); +static void ripper_warnI(struct parser_params*, const char*, int); +#if 0 +static void ripper_warnS(struct parser_params*, const char*, const char*); +#endif +static void ripper_warning0(struct parser_params*, const char*); +static void ripper_warningS(struct parser_params*, const char*, const char*); +#endif + +#ifdef RIPPER +static void ripper_compile_error(struct parser_params*, const char *fmt, ...); +# define rb_compile_error ripper_compile_error +# define compile_error ripper_compile_error +# define PARSER_ARG parser, +#else +# define compile_error parser->nerr++,rb_compile_error +# define PARSER_ARG ruby_sourcefile, ruby_sourceline, +#endif + +/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, + for instance). This is too low for Ruby to parse some files, such as + date/format.rb, therefore bump the value up to at least Bison's default. */ +#ifdef OLD_YACC +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif +#endif + +#ifndef RIPPER +static void token_info_push(struct parser_params*, const char *token); +static void token_info_pop(struct parser_params*, const char *token); +#endif +%} + +%pure_parser +%parse-param {struct parser_params *parser} + +%union { + VALUE val; + NODE *node; + ID id; + int num; +} + +/* +%token +*/ +%token + + keyword_class + keyword_module + keyword_def + keyword_undef + keyword_begin + keyword_rescue + keyword_ensure + keyword_end + keyword_if + keyword_unless + keyword_then + keyword_elsif + keyword_else + keyword_case + keyword_when + keyword_while + keyword_until + keyword_for + keyword_break + keyword_next + keyword_redo + keyword_retry + keyword_in + keyword_do + keyword_do_cond + keyword_do_block + keyword_do_LAMBDA + keyword_return + keyword_yield + keyword_super + keyword_self + keyword_nil + keyword_true + keyword_false + keyword_and + keyword_or + keyword_not + modifier_if + modifier_unless + modifier_while + modifier_until + modifier_rescue + keyword_alias + keyword_defined + keyword_BEGIN + keyword_END + keyword__LINE__ + keyword__FILE__ + keyword__ENCODING__ + +%token tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL +%token tINTEGER tFLOAT tSTRING_CONTENT tCHAR +%token tNTH_REF tBACK_REF +%token tREGEXP_END + +%type singleton strings string string1 xstring regexp +%type string_contents xstring_contents string_content +%type words qwords word_list qword_list word +%type literal numeric dsym cpath +%type bodystmt compstmt stmts stmt expr arg primary command command_call method_call +%type expr_value arg_value primary_value +%type if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure +%type args call_args opt_call_args +%type paren_args opt_paren_args +%type command_args aref_args opt_block_arg block_arg var_ref var_lhs +%type mrhs superclass block_call block_command +%type f_block_optarg f_block_opt +%type f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs +%type assoc_list assocs assoc undef_list backref string_dvar for_var +%type block_param opt_block_param block_param_def f_opt +%type bv_decls opt_bv_decl bvar +%type lambda f_larglist lambda_body +%type brace_block cmd_brace_block do_block lhs none fitem +%type mlhs mlhs_head mlhs_basic mlhs_item mlhs_node mlhs_post mlhs_inner +%type fsym variable sym symbol operation operation2 operation3 +%type cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg f_bad_arg +/* +*/ +%type program reswords then do dot_or_colon + +%token tUPLUS /* unary+ */ +%token tUMINUS /* unary- */ +%token tPOW /* ** */ +%token tCMP /* <=> */ +%token tEQ /* == */ +%token tEQQ /* === */ +%token tNEQ /* != */ +%token tGEQ /* >= */ +%token tLEQ /* <= */ +%token tANDOP tOROP /* && and || */ +%token tMATCH tNMATCH /* =~ and !~ */ +%token tDOT2 tDOT3 /* .. and ... */ +%token tAREF tASET /* [] and []= */ +%token tLSHFT tRSHFT /* << and >> */ +%token tCOLON2 /* :: */ +%token tCOLON3 /* :: at EXPR_BEG */ +%token tOP_ASGN /* +=, -= etc. */ +%token tASSOC /* => */ +%token tLPAREN /* ( */ +%token tLPAREN_ARG /* ( */ +%token tRPAREN /* ) */ +%token tLBRACK /* [ */ +%token tLBRACE /* { */ +%token tLBRACE_ARG /* { */ +%token tSTAR /* * */ +%token tAMPER /* & */ +%token tLAMBDA /* -> */ +%token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG +%token tSTRING_DBEG tSTRING_DVAR tSTRING_END tLAMBEG + +/* + * precedence table + */ + +%nonassoc tLOWEST +%nonassoc tLBRACE_ARG + +%nonassoc modifier_if modifier_unless modifier_while modifier_until +%left keyword_or keyword_and +%right keyword_not +%nonassoc keyword_defined +%right '=' tOP_ASGN +%left modifier_rescue +%right '?' ':' +%nonassoc tDOT2 tDOT3 +%left tOROP +%left tANDOP +%nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH +%left '>' tGEQ '<' tLEQ +%left '|' '^' +%left '&' +%left tLSHFT tRSHFT +%left '+' '-' +%left '*' '/' '%' +%right tUMINUS_NUM tUMINUS +%right tPOW +%right '!' '~' tUPLUS + +%nonassoc idNULL +%nonassoc idRespond_to +%nonassoc idIFUNC +%nonassoc idCFUNC +%nonassoc idThrowState +%nonassoc id_core_set_method_alias +%nonassoc id_core_set_variable_alias +%nonassoc id_core_undef_method +%nonassoc id_core_define_method +%nonassoc id_core_define_singleton_method +%nonassoc id_core_set_postexe + +%token tLAST_TOKEN + +%% +program : { + lex_state = EXPR_BEG; +#if 0 + local_push(compile_for_eval); +#endif + + } + compstmt + { +#if 0 + if ($2 && !compile_for_eval) { + /* last expression should not be void */ + if (nd_type($2) != NODE_BLOCK) void_expr($2); + else { + NODE *node = $2; + while (node->nd_next) { + node = node->nd_next; + } + void_expr(node->nd_head); + } + } + ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, $2)); + local_pop(); +#endif + $$ = $2; + parser->result = dispatch1(program, $$); + + } + ; + +bodystmt : compstmt + opt_rescue + opt_else + opt_ensure + { +#if 0 + $$ = $1; + if ($2) { + $$ = NEW_RESCUE($1, $2, $3); + } + else if ($3) { + rb_warn0("else without rescue is useless"); + $$ = block_append($$, $3); + } + if ($4) { + if ($$) { + $$ = NEW_ENSURE($$, $4); + } + else { + $$ = block_append($4, NEW_NIL()); + } + } + fixpos($$, $1); +#endif + $$ = dispatch4(body_stmt, + escape_Qundef($1), + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($4)); + + } + ; + +compstmt : stmts opt_terms + { +#if 0 + void_stmts($1); + fixup_nodes(&deferred_nodes); +#endif + + $$ = $1; + } + ; + +stmts : none + { +#if 0 + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch2(stmts_add, dispatch0(stmts_new), + dispatch0(void_stmt)); + + } + | stmt + { +#if 0 + $$ = newline_node($1); +#endif + $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); + + } + | stmts terms stmt + { +#if 0 + $$ = block_append($1, newline_node($3)); +#endif + $$ = dispatch2(stmts_add, $1, $3); + + } + | error stmt + { + $$ = remove_begin($2); + } + ; + +stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem + { +#if 0 + $$ = NEW_ALIAS($2, $4); +#endif + $$ = dispatch2(alias, $2, $4); + + } + | keyword_alias tGVAR tGVAR + { +#if 0 + $$ = NEW_VALIAS($2, $3); +#endif + $$ = dispatch2(var_alias, $2, $3); + + } + | keyword_alias tGVAR tBACK_REF + { +#if 0 + char buf[3]; + + sprintf(buf, "$%c", (char)$3->nd_nth); + $$ = NEW_VALIAS($2, rb_intern(buf)); +#endif + $$ = dispatch2(var_alias, $2, $3); + + } + | keyword_alias tGVAR tNTH_REF + { +#if 0 + yyerror("can't make alias for the number variables"); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch2(var_alias, $2, $3); + $$ = dispatch1(alias_error, $$); + + } + | keyword_undef undef_list + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(undef, $2); + + } + | stmt modifier_if expr_value + { +#if 0 + $$ = NEW_IF(cond($3), remove_begin($1), 0); + fixpos($$, $3); +#endif + $$ = dispatch2(if_mod, $3, $1); + + } + | stmt modifier_unless expr_value + { +#if 0 + $$ = NEW_UNLESS(cond($3), remove_begin($1), 0); + fixpos($$, $3); +#endif + $$ = dispatch2(unless_mod, $3, $1); + + } + | stmt modifier_while expr_value + { +#if 0 + if ($1 && nd_type($1) == NODE_BEGIN) { + $$ = NEW_WHILE(cond($3), $1->nd_body, 0); + } + else { + $$ = NEW_WHILE(cond($3), $1, 1); + } +#endif + $$ = dispatch2(while_mod, $3, $1); + + } + | stmt modifier_until expr_value + { +#if 0 + if ($1 && nd_type($1) == NODE_BEGIN) { + $$ = NEW_UNTIL(cond($3), $1->nd_body, 0); + } + else { + $$ = NEW_UNTIL(cond($3), $1, 1); + } +#endif + $$ = dispatch2(until_mod, $3, $1); + + } + | stmt modifier_rescue stmt + { +#if 0 + NODE *resq = NEW_RESBODY(0, remove_begin($3), 0); + $$ = NEW_RESCUE(remove_begin($1), resq, 0); +#endif + $$ = dispatch2(rescue_mod, $3, $1); + + } + | keyword_BEGIN + { + if (in_def || in_single) { + yyerror("BEGIN in method"); + } +#if 0 + /* local_push(0); */ +#endif + + } + '{' compstmt '}' + { +#if 0 + ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, + $4); + /* NEW_PREEXE($4)); */ + /* local_pop(); */ + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(BEGIN, $4); + + } + | keyword_END '{' compstmt '}' + { + if (in_def || in_single) { + rb_warn0("END in method; use at_exit"); + } +#if 0 + $$ = NEW_POSTEXE(NEW_NODE( + NODE_SCOPE, 0 /* tbl */, $3 /* body */, 0 /* args */)); +#endif + $$ = dispatch1(END, $3); + + } + | lhs '=' command_call + { +#if 0 + value_expr($3); + $$ = node_assign($1, $3); +#endif + $$ = dispatch2(assign, $1, $3); + + } + | mlhs '=' command_call + { +#if 0 + value_expr($3); + $1->nd_value = $3; + $$ = $1; +#endif + $$ = dispatch2(massign, $1, $3); + + } + | var_lhs tOP_ASGN command_call + { +#if 0 + value_expr($3); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } +#endif + $$ = dispatch3(opassign, $1, $2, $3); + + } + | primary_value '[' opt_call_args rbracket tOP_ASGN command_call + { +#if 0 + NODE *args; + + value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); + args = arg_concat($6, $3); + if ($5 == tOROP) { + $5 = 0; + } + else if ($5 == tANDOP) { + $5 = 1; + } + $$ = NEW_OP_ASGN1($1, $5, args); + fixpos($$, $1); +#endif + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $$, $5, $6); + + } + | primary_value '.' tIDENTIFIER tOP_ASGN command_call + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + + } + | primary_value '.' tCONSTANT tOP_ASGN command_call + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $$, $4, $5); + + } + | backref tOP_ASGN command_call + { +#if 0 + rb_backref_error($1); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch2(assign, dispatch1(var_field, $1), $3); + $$ = dispatch1(assign_error, $$); + + } + | lhs '=' mrhs + { +#if 0 + value_expr($3); + $$ = node_assign($1, $3); +#endif + $$ = dispatch2(assign, $1, $3); + + } + | mlhs '=' arg_value + { +#if 0 + $1->nd_value = $3; + $$ = $1; +#endif + $$ = dispatch2(massign, $1, $3); + + } + | mlhs '=' mrhs + { +#if 0 + $1->nd_value = $3; + $$ = $1; +#endif + $$ = dispatch2(massign, $1, $3); + + } + | expr + ; + +expr : command_call + | expr keyword_and expr + { +#if 0 + $$ = logop(NODE_AND, $1, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("and"), $3); + + } + | expr keyword_or expr + { +#if 0 + $$ = logop(NODE_OR, $1, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("or"), $3); + + } + | keyword_not opt_nl expr + { +#if 0 + $$ = call_uni_op(cond($3), '!'); +#endif + $$ = dispatch2(unary, ripper_intern("not"), $3); + + } + | '!' command_call + { +#if 0 + $$ = call_uni_op(cond($2), '!'); +#endif + $$ = dispatch2(unary, ripper_id2sym('!'), $2); + + } + | arg + ; + +expr_value : expr + { +#if 0 + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); +#endif + $$ = $1; + + } + ; + +command_call : command + | block_command + | keyword_return call_args + { +#if 0 + $$ = NEW_RETURN(ret_args($2)); +#endif + $$ = dispatch1(return, $2); + + } + | keyword_break call_args + { +#if 0 + $$ = NEW_BREAK(ret_args($2)); +#endif + $$ = dispatch1(break, $2); + + } + | keyword_next call_args + { +#if 0 + $$ = NEW_NEXT(ret_args($2)); +#endif + $$ = dispatch1(next, $2); + + } + ; + +block_command : block_call + | block_call '.' operation2 command_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); +#endif + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_arg($$, $4); + + } + | block_call tCOLON2 operation2 command_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); +#endif + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_arg($$, $4); + + } + ; + +cmd_brace_block : tLBRACE_ARG + { +#if 0 + dyna_push(); + $$ = ruby_sourceline; +#endif + + } + opt_block_param + compstmt + '}' + { +#if 0 + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); +#endif + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + + } + ; + +command : operation command_args %prec tLOWEST + { +#if 0 + $$ = NEW_FCALL($1, $2); + fixpos($$, $2); +#endif + $$ = dispatch2(command, $1, $2); + + } + | operation command_args cmd_brace_block + { +#if 0 + block_dup_check($2,$3); + $3->nd_iter = NEW_FCALL($1, $2); + $$ = $3; + fixpos($$, $2); +#endif + $$ = dispatch2(command, $1, $2); + $$ = method_add_block($$, $3); + + } + | primary_value '.' operation2 command_args %prec tLOWEST + { +#if 0 + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); +#endif + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + + } + | primary_value '.' operation2 command_args cmd_brace_block + { +#if 0 + block_dup_check($4,$5); + $5->nd_iter = NEW_CALL($1, $3, $4); + $$ = $5; + fixpos($$, $1); +#endif + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + $$ = method_add_block($$, $5); + + } + | primary_value tCOLON2 operation2 command_args %prec tLOWEST + { +#if 0 + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); +#endif + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { +#if 0 + block_dup_check($4,$5); + $5->nd_iter = NEW_CALL($1, $3, $4); + $$ = $5; + fixpos($$, $1); +#endif + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + $$ = method_add_block($$, $5); + + } + | keyword_super command_args + { +#if 0 + $$ = NEW_SUPER($2); + fixpos($$, $2); +#endif + $$ = dispatch1(super, $2); + + } + | keyword_yield command_args + { +#if 0 + $$ = new_yield($2); + fixpos($$, $2); +#endif + $$ = dispatch1(yield, $2); + + } + ; + +mlhs : mlhs_basic + | tLPAREN mlhs_inner rparen + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(mlhs_paren, $2); + + } + ; + +mlhs_inner : mlhs_basic + | tLPAREN mlhs_inner rparen + { +#if 0 + $$ = NEW_MASGN(NEW_LIST($2), 0); +#endif + $$ = dispatch1(mlhs_paren, $2); + + } + ; + +mlhs_basic : mlhs_head + { +#if 0 + $$ = NEW_MASGN($1, 0); +#endif + $$ = $1; + + } + | mlhs_head mlhs_item + { +#if 0 + $$ = NEW_MASGN(list_append($1,$2), 0); +#endif + $$ = mlhs_add($1, $2); + + } + | mlhs_head tSTAR mlhs_node + { +#if 0 + $$ = NEW_MASGN($1, $3); +#endif + $$ = mlhs_add_star($1, $3); + + } + | mlhs_head tSTAR mlhs_node ',' mlhs_post + { +#if 0 + $$ = NEW_MASGN($1, NEW_POSTARG($3,$5)); +#endif + $$ = mlhs_add_star($1, $3); + + } + | mlhs_head tSTAR + { +#if 0 + $$ = NEW_MASGN($1, -1); +#endif + $$ = mlhs_add_star($1, Qnil); + + } + | mlhs_head tSTAR ',' mlhs_post + { +#if 0 + $$ = NEW_MASGN($1, NEW_POSTARG(-1, $4)); +#endif + $$ = mlhs_add_star($1, Qnil); + + } + | tSTAR mlhs_node + { +#if 0 + $$ = NEW_MASGN(0, $2); +#endif + $$ = mlhs_add_star(mlhs_new(), $2); + + } + | tSTAR mlhs_node ',' mlhs_post + { +#if 0 + $$ = NEW_MASGN(0, NEW_POSTARG($2,$4)); +#endif + $$ = mlhs_add_star(mlhs_new(), $2); + + } + | tSTAR + { +#if 0 + $$ = NEW_MASGN(0, -1); +#endif + $$ = mlhs_add_star(mlhs_new(), Qnil); + + } + | tSTAR ',' mlhs_post + { +#if 0 + $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3)); +#endif + $$ = mlhs_add_star(mlhs_new(), Qnil); + + } + ; + +mlhs_item : mlhs_node + | tLPAREN mlhs_inner rparen + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(mlhs_paren, $2); + + } + ; + +mlhs_head : mlhs_item ',' + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = mlhs_add(mlhs_new(), $1); + + } + | mlhs_head mlhs_item ',' + { +#if 0 + $$ = list_append($1, $2); +#endif + $$ = mlhs_add($1, $2); + + } + ; + +mlhs_post : mlhs_item + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = mlhs_add(mlhs_new(), $1); + + } + | mlhs_post ',' mlhs_item + { +#if 0 + $$ = list_append($1, $3); +#endif + $$ = mlhs_add($1, $3); + + } + ; + +mlhs_node : variable + { +#if 0 + $$ = assignable($1, 0); +#endif + $$ = $1; + + } + | primary_value '[' opt_call_args rbracket + { +#if 0 + $$ = aryset($1, $3); +#endif + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + + } + | primary_value '.' tIDENTIFIER + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + + } + | primary_value tCOLON2 tIDENTIFIER + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch2(const_path_field, $1, $3); + + } + | primary_value '.' tCONSTANT + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + + } + | primary_value tCOLON2 tCONSTANT + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3)); +#endif + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = dispatch2(const_path_field, $1, $3); + + } + | tCOLON3 tCONSTANT + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON3($2)); +#endif + $$ = dispatch1(top_const_field, $2); + + } + | backref + { +#if 0 + rb_backref_error($1); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(var_field, $1); + $$ = dispatch1(assign_error, $$); + + } + ; + +lhs : variable + { +#if 0 + if (!($$ = assignable($1, 0))) $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(var_field, $1); + + } + | primary_value '[' opt_call_args rbracket + { +#if 0 + $$ = aryset($1, $3); +#endif + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + + } + | primary_value '.' tIDENTIFIER + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + + } + | primary_value tCOLON2 tIDENTIFIER + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + + } + | primary_value '.' tCONSTANT + { +#if 0 + $$ = attrset($1, $3); +#endif + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + + } + | primary_value tCOLON2 tCONSTANT + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3)); +#endif + $$ = dispatch2(const_path_field, $1, $3); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + + } + | tCOLON3 tCONSTANT + { +#if 0 + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON3($2)); +#endif + $$ = dispatch1(top_const_field, $2); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + + } + | backref + { +#if 0 + rb_backref_error($1); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(assign_error, $1); + + } + ; + +cname : tIDENTIFIER + { +#if 0 + yyerror("class/module name must be CONSTANT"); +#endif + $$ = dispatch1(class_name_error, $1); + + } + | tCONSTANT + ; + +cpath : tCOLON3 cname + { +#if 0 + $$ = NEW_COLON3($2); +#endif + $$ = dispatch1(top_const_ref, $2); + + } + | cname + { +#if 0 + $$ = NEW_COLON2(0, $$); +#endif + $$ = dispatch1(const_ref, $1); + + } + | primary_value tCOLON2 cname + { +#if 0 + $$ = NEW_COLON2($1, $3); +#endif + $$ = dispatch2(const_path_ref, $1, $3); + + } + ; + +fname : tIDENTIFIER + | tCONSTANT + | tFID + | op + { +#if 0 + lex_state = EXPR_END; + $$ = $1; +#endif + lex_state = EXPR_END; + $$ = $1; + + } + | reswords + { +#if 0 + lex_state = EXPR_END; + $$ = $1; +#endif + lex_state = EXPR_END; + $$ = $1; + + } + ; + +fsym : fname + | symbol + ; + +fitem : fsym + { +#if 0 + $$ = NEW_LIT(ID2SYM($1)); +#endif + $$ = dispatch1(symbol_literal, $1); + + } + | dsym + ; + +undef_list : fitem + { +#if 0 + $$ = NEW_UNDEF($1); +#endif + $$ = rb_ary_new3(1, $1); + + } + | undef_list ',' {lex_state = EXPR_FNAME;} fitem + { +#if 0 + $$ = block_append($1, NEW_UNDEF($4)); +#endif + rb_ary_push($1, $4); + + } + ; + +op : '|' { ifndef_ripper($$ = '|'); } + | '^' { ifndef_ripper($$ = '^'); } + | '&' { ifndef_ripper($$ = '&'); } + | tCMP { ifndef_ripper($$ = tCMP); } + | tEQ { ifndef_ripper($$ = tEQ); } + | tEQQ { ifndef_ripper($$ = tEQQ); } + | tMATCH { ifndef_ripper($$ = tMATCH); } + | tNMATCH { ifndef_ripper($$ = tNMATCH); } + | '>' { ifndef_ripper($$ = '>'); } + | tGEQ { ifndef_ripper($$ = tGEQ); } + | '<' { ifndef_ripper($$ = '<'); } + | tLEQ { ifndef_ripper($$ = tLEQ); } + | tNEQ { ifndef_ripper($$ = tNEQ); } + | tLSHFT { ifndef_ripper($$ = tLSHFT); } + | tRSHFT { ifndef_ripper($$ = tRSHFT); } + | '+' { ifndef_ripper($$ = '+'); } + | '-' { ifndef_ripper($$ = '-'); } + | '*' { ifndef_ripper($$ = '*'); } + | tSTAR { ifndef_ripper($$ = '*'); } + | '/' { ifndef_ripper($$ = '/'); } + | '%' { ifndef_ripper($$ = '%'); } + | tPOW { ifndef_ripper($$ = tPOW); } + | '!' { ifndef_ripper($$ = '!'); } + | '~' { ifndef_ripper($$ = '~'); } + | tUPLUS { ifndef_ripper($$ = tUPLUS); } + | tUMINUS { ifndef_ripper($$ = tUMINUS); } + | tAREF { ifndef_ripper($$ = tAREF); } + | tASET { ifndef_ripper($$ = tASET); } + | '`' { ifndef_ripper($$ = '`'); } + ; + +reswords : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__ + | keyword_BEGIN | keyword_END + | keyword_alias | keyword_and | keyword_begin + | keyword_break | keyword_case | keyword_class | keyword_def + | keyword_defined | keyword_do | keyword_else | keyword_elsif + | keyword_end | keyword_ensure | keyword_false + | keyword_for | keyword_in | keyword_module | keyword_next + | keyword_nil | keyword_not | keyword_or | keyword_redo + | keyword_rescue | keyword_retry | keyword_return | keyword_self + | keyword_super | keyword_then | keyword_true | keyword_undef + | keyword_when | keyword_yield | keyword_if | keyword_unless + | keyword_while | keyword_until + ; + +arg : lhs '=' arg + { +#if 0 + value_expr($3); + $$ = node_assign($1, $3); +#endif + $$ = dispatch2(assign, $1, $3); + + } + | lhs '=' arg modifier_rescue arg + { +#if 0 + value_expr($3); + $3 = NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0); + $$ = node_assign($1, $3); +#endif + $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); + + } + | var_lhs tOP_ASGN arg + { +#if 0 + value_expr($3); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } +#endif + $$ = dispatch3(opassign, $1, $2, $3); + + } + | var_lhs tOP_ASGN arg modifier_rescue arg + { +#if 0 + value_expr($3); + $3 = NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } +#endif + $3 = dispatch2(rescue_mod, $3, $5); + $$ = dispatch3(opassign, $1, $2, $3); + + } + | primary_value '[' opt_call_args rbracket tOP_ASGN arg + { +#if 0 + NODE *args; + + value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); + args = arg_concat($6, $3); + if ($5 == tOROP) { + $5 = 0; + } + else if ($5 == tANDOP) { + $5 = 1; + } + $$ = NEW_OP_ASGN1($1, $5, args); + fixpos($$, $1); +#endif + $1 = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $1, $5, $6); + + } + | primary_value '.' tIDENTIFIER tOP_ASGN arg + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + + } + | primary_value '.' tCONSTANT tOP_ASGN arg + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { +#if 0 + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); +#endif + $1 = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $1, $4, $5); + + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { +#if 0 + yyerror("constant re-assignment"); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch2(const_path_field, $1, $3); + $$ = dispatch3(opassign, $$, $4, $5); + $$ = dispatch1(assign_error, $$); + + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { +#if 0 + yyerror("constant re-assignment"); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(top_const_field, $2); + $$ = dispatch3(opassign, $$, $3, $4); + $$ = dispatch1(assign_error, $$); + + } + | backref tOP_ASGN arg + { +#if 0 + rb_backref_error($1); + $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(var_field, $1); + $$ = dispatch3(opassign, $$, $2, $3); + $$ = dispatch1(assign_error, $$); + + } + | arg tDOT2 arg + { +#if 0 + value_expr($1); + value_expr($3); + $$ = NEW_DOT2($1, $3); + if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, $$); + } +#endif + $$ = dispatch2(dot2, $1, $3); + + } + | arg tDOT3 arg + { +#if 0 + value_expr($1); + value_expr($3); + $$ = NEW_DOT3($1, $3); + if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, $$); + } +#endif + $$ = dispatch2(dot3, $1, $3); + + } + | arg '+' arg + { +#if 0 + $$ = call_bin_op($1, '+', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('+'), $3); + + } + | arg '-' arg + { +#if 0 + $$ = call_bin_op($1, '-', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('-'), $3); + + } + | arg '*' arg + { +#if 0 + $$ = call_bin_op($1, '*', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('*'), $3); + + } + | arg '/' arg + { +#if 0 + $$ = call_bin_op($1, '/', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('/'), $3); + + } + | arg '%' arg + { +#if 0 + $$ = call_bin_op($1, '%', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('%'), $3); + + } + | arg tPOW arg + { +#if 0 + $$ = call_bin_op($1, tPOW, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("**"), $3); + + } + | tUMINUS_NUM tINTEGER tPOW arg + { +#if 0 + $$ = NEW_CALL(call_bin_op($2, tPOW, $4), tUMINUS, 0); +#endif + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + + } + | tUMINUS_NUM tFLOAT tPOW arg + { +#if 0 + $$ = NEW_CALL(call_bin_op($2, tPOW, $4), tUMINUS, 0); +#endif + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + + } + | tUPLUS arg + { +#if 0 + $$ = call_uni_op($2, tUPLUS); +#endif + $$ = dispatch2(unary, ripper_intern("+@"), $2); + + } + | tUMINUS arg + { +#if 0 + $$ = call_uni_op($2, tUMINUS); +#endif + $$ = dispatch2(unary, ripper_intern("-@"), $2); + + } + | arg '|' arg + { +#if 0 + $$ = call_bin_op($1, '|', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('|'), $3); + + } + | arg '^' arg + { +#if 0 + $$ = call_bin_op($1, '^', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('^'), $3); + + } + | arg '&' arg + { +#if 0 + $$ = call_bin_op($1, '&', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('&'), $3); + + } + | arg tCMP arg + { +#if 0 + $$ = call_bin_op($1, tCMP, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); + + } + | arg '>' arg + { +#if 0 + $$ = call_bin_op($1, '>', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('>'), $3); + + } + | arg tGEQ arg + { +#if 0 + $$ = call_bin_op($1, tGEQ, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern(">="), $3); + + } + | arg '<' arg + { +#if 0 + $$ = call_bin_op($1, '<', $3); +#endif + $$ = dispatch3(binary, $1, ID2SYM('<'), $3); + + } + | arg tLEQ arg + { +#if 0 + $$ = call_bin_op($1, tLEQ, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("<="), $3); + + } + | arg tEQ arg + { +#if 0 + $$ = call_bin_op($1, tEQ, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("=="), $3); + + } + | arg tEQQ arg + { +#if 0 + $$ = call_bin_op($1, tEQQ, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("==="), $3); + + } + | arg tNEQ arg + { +#if 0 + $$ = call_bin_op($1, tNEQ, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("!="), $3); + + } + | arg tMATCH arg + { +#if 0 + $$ = match_op($1, $3); + if (nd_type($1) == NODE_LIT && TYPE($1->nd_lit) == T_REGEXP) { + $$ = reg_named_capture_assign($1->nd_lit, $$); + } +#endif + $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); + + } + | arg tNMATCH arg + { +#if 0 + $$ = call_bin_op($1, tNMATCH, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); + + } + | '!' arg + { +#if 0 + $$ = call_uni_op(cond($2), '!'); +#endif + $$ = dispatch2(unary, ID2SYM('!'), $2); + + } + | '~' arg + { +#if 0 + $$ = call_uni_op($2, '~'); +#endif + $$ = dispatch2(unary, ID2SYM('~'), $2); + + } + | arg tLSHFT arg + { +#if 0 + $$ = call_bin_op($1, tLSHFT, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); + + } + | arg tRSHFT arg + { +#if 0 + $$ = call_bin_op($1, tRSHFT, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); + + } + | arg tANDOP arg + { +#if 0 + $$ = logop(NODE_AND, $1, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); + + } + | arg tOROP arg + { +#if 0 + $$ = logop(NODE_OR, $1, $3); +#endif + $$ = dispatch3(binary, $1, ripper_intern("||"), $3); + + } + | keyword_defined opt_nl {in_defined = 1;} arg + { +#if 0 + in_defined = 0; + $$ = NEW_DEFINED($4); +#endif + in_defined = 0; + $$ = dispatch1(defined, $4); + + } + | arg '?' arg opt_nl ':' arg + { +#if 0 + value_expr($1); + $$ = NEW_IF(cond($1), $3, $6); + fixpos($$, $1); +#endif + $$ = dispatch3(ifop, $1, $3, $6); + + } + | primary + { + $$ = $1; + } + ; + +arg_value : arg + { +#if 0 + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); +#endif + $$ = $1; + + } + ; + +aref_args : none + | args trailer + { + $$ = $1; + } + | args ',' assocs trailer + { +#if 0 + $$ = arg_append($1, NEW_HASH($3)); +#endif + $$ = arg_add_assocs($1, $3); + + } + | assocs trailer + { +#if 0 + $$ = NEW_LIST(NEW_HASH($1)); +#endif + $$ = arg_add_assocs(arg_new(), $1); + + } + ; + +paren_args : '(' opt_call_args rparen + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(arg_paren, escape_Qundef($2)); + + } + ; + +opt_paren_args : none + | paren_args + ; + +opt_call_args : none + | call_args + ; + +call_args : command + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = arg_add(arg_new(), $1); + + } + | args opt_block_arg + { +#if 0 + $$ = arg_blk_pass($1, $2); +#endif + $$ = arg_add_optblock($1, $2); + + } + | assocs opt_block_arg + { +#if 0 + $$ = NEW_LIST(NEW_HASH($1)); + $$ = arg_blk_pass($$, $2); +#endif + $$ = arg_add_assocs(arg_new(), $1); + $$ = arg_add_optblock($$, $2); + + } + | args ',' assocs opt_block_arg + { +#if 0 + $$ = arg_append($1, NEW_HASH($3)); + $$ = arg_blk_pass($$, $4); +#endif + $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); + + } + | block_arg +/* +*/ + { + $$ = arg_add_block(arg_new(), $1); + } + + ; + +command_args : { + $$ = cmdarg_stack; + CMDARG_PUSH(1); + } + call_args + { + /* CMDARG_POP() */ + cmdarg_stack = $1; + $$ = $2; + } + ; + +block_arg : tAMPER arg_value + { +#if 0 + $$ = NEW_BLOCK_PASS($2); +#endif + $$ = $2; + + } + ; + +opt_block_arg : ',' block_arg + { + $$ = $2; + } + | ',' + { + $$ = 0; + } + | none + { + $$ = 0; + } + ; + +args : arg_value + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = arg_add(arg_new(), $1); + + } + | tSTAR arg_value + { +#if 0 + $$ = NEW_SPLAT($2); +#endif + $$ = arg_add_star(arg_new(), $2); + + } + | args ',' arg_value + { +#if 0 + NODE *n1; + if ((n1 = splat_array($1)) != 0) { + $$ = list_append(n1, $3); + } + else { + $$ = arg_append($1, $3); + } +#endif + $$ = arg_add($1, $3); + + } + | args ',' tSTAR arg_value + { +#if 0 + NODE *n1; + if ((nd_type($4) == NODE_ARRAY) && (n1 = splat_array($1)) != 0) { + $$ = list_concat(n1, $4); + } + else { + $$ = arg_concat($1, $4); + } +#endif + $$ = arg_add_star($1, $4); + + } + ; + +mrhs : args ',' arg_value + { +#if 0 + NODE *n1; + if ((n1 = splat_array($1)) != 0) { + $$ = list_append(n1, $3); + } + else { + $$ = arg_append($1, $3); + } +#endif + $$ = mrhs_add(args2mrhs($1), $3); + + } + | args ',' tSTAR arg_value + { +#if 0 + NODE *n1; + if (nd_type($4) == NODE_ARRAY && + (n1 = splat_array($1)) != 0) { + $$ = list_concat(n1, $4); + } + else { + $$ = arg_concat($1, $4); + } +#endif + $$ = mrhs_add_star(args2mrhs($1), $4); + + } + | tSTAR arg_value + { +#if 0 + $$ = NEW_SPLAT($2); +#endif + $$ = mrhs_add_star(mrhs_new(), $2); + + } + ; + +primary : literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { +#if 0 + $$ = NEW_FCALL($1, 0); +#endif + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + + } + | k_begin + { +#if 0 + $$ = ruby_sourceline; +#endif + + } + bodystmt + k_end + { +#if 0 + if ($3 == NULL) { + $$ = NEW_NIL(); + } + else { + if (nd_type($3) == NODE_RESCUE || + nd_type($3) == NODE_ENSURE) + nd_set_line($3, $2); + $$ = NEW_BEGIN($3); + } + nd_set_line($$, $2); +#endif + $$ = dispatch1(begin, $3); + + } + | tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} rparen + { + rb_warning0("(...) interpreted as grouped expression"); +#if 0 + $$ = $2; +#endif + $$ = dispatch1(paren, $2); + + } + | tLPAREN compstmt ')' + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(paren, $2); + + } + | primary_value tCOLON2 tCONSTANT + { +#if 0 + $$ = NEW_COLON2($1, $3); +#endif + $$ = dispatch2(const_path_ref, $1, $3); + + } + | tCOLON3 tCONSTANT + { +#if 0 + $$ = NEW_COLON3($2); +#endif + $$ = dispatch1(top_const_ref, $2); + + } + | tLBRACK aref_args ']' + { +#if 0 + if ($2 == 0) { + $$ = NEW_ZARRAY(); /* zero length array*/ + } + else { + $$ = $2; + } +#endif + $$ = dispatch1(array, escape_Qundef($2)); + + } + | tLBRACE assoc_list '}' + { +#if 0 + $$ = NEW_HASH($2); +#endif + $$ = dispatch1(hash, escape_Qundef($2)); + + } + | keyword_return + { +#if 0 + $$ = NEW_RETURN(0); +#endif + $$ = dispatch0(return0); + + } + | keyword_yield '(' call_args rparen + { +#if 0 + $$ = new_yield($3); +#endif + $$ = dispatch1(yield, dispatch1(paren, $3)); + + } + | keyword_yield '(' rparen + { +#if 0 + $$ = NEW_YIELD(0, Qfalse); +#endif + $$ = dispatch1(yield, dispatch1(paren, arg_new())); + + } + | keyword_yield + { +#if 0 + $$ = NEW_YIELD(0, Qfalse); +#endif + $$ = dispatch0(yield0); + + } + | keyword_defined opt_nl '(' {in_defined = 1;} expr rparen + { +#if 0 + in_defined = 0; + $$ = NEW_DEFINED($5); +#endif + in_defined = 0; + $$ = dispatch1(defined, $5); + + } + | keyword_not '(' expr rparen + { +#if 0 + $$ = call_uni_op(cond($3), '!'); +#endif + $$ = dispatch2(unary, ripper_intern("not"), $3); + + } + | keyword_not '(' rparen + { +#if 0 + $$ = call_uni_op(cond(NEW_NIL()), '!'); +#endif + $$ = dispatch2(unary, ripper_intern("not"), Qnil); + + } + | operation brace_block + { +#if 0 + $2->nd_iter = NEW_FCALL($1, 0); + $$ = $2; + fixpos($2->nd_iter, $2); +#endif + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + $$ = method_add_block($$, $2); + + } + | method_call + | method_call brace_block + { +#if 0 + block_dup_check($1->nd_args, $2); + $2->nd_iter = $1; + $$ = $2; + fixpos($$, $1); +#endif + $$ = method_add_block($1, $2); + + } + | tLAMBDA lambda + { + $$ = $2; + } + | k_if expr_value then + compstmt + if_tail + k_end + { +#if 0 + $$ = NEW_IF(cond($2), $4, $5); + fixpos($$, $2); +#endif + $$ = dispatch3(if, $2, $4, escape_Qundef($5)); + + } + | k_unless expr_value then + compstmt + opt_else + k_end + { +#if 0 + $$ = NEW_UNLESS(cond($2), $4, $5); + fixpos($$, $2); +#endif + $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); + + } + | k_while {COND_PUSH(1);} expr_value do {COND_POP();} + compstmt + k_end + { +#if 0 + $$ = NEW_WHILE(cond($3), $6, 1); + fixpos($$, $3); +#endif + $$ = dispatch2(while, $3, $6); + + } + | k_until {COND_PUSH(1);} expr_value do {COND_POP();} + compstmt + k_end + { +#if 0 + $$ = NEW_UNTIL(cond($3), $6, 1); + fixpos($$, $3); +#endif + $$ = dispatch2(until, $3, $6); + + } + | k_case expr_value opt_terms + case_body + k_end + { +#if 0 + $$ = NEW_CASE($2, $4); + fixpos($$, $2); +#endif + $$ = dispatch2(case, $2, $4); + + } + | k_case opt_terms case_body k_end + { +#if 0 + $$ = NEW_CASE(0, $3); +#endif + $$ = dispatch2(case, Qnil, $3); + + } + | k_for for_var keyword_in + {COND_PUSH(1);} + expr_value do + {COND_POP();} + compstmt + k_end + { +#if 0 + /* + * for a, b, c in e + * #=> + * e.each{|*x| a, b, c = x + * + * for a in e + * #=> + * e.each{|x| a, = x} + */ + ID id = internal_id(); + ID *tbl = ALLOC_N(ID, 2); + NODE *m = NEW_ARGS_AUX(0, 0); + NODE *args, *scope; + + if (nd_type($2) == NODE_MASGN) { + /* if args.length == 1 && args[0].kind_of?(Array) + * args = args[0] + * end + */ + NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); + NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); + m->nd_next = block_append( + NEW_IF( + NEW_NODE(NODE_AND, + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), + rb_intern("=="), one), + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), + rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), + 0), + NEW_DASGN_CURR(id, + NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), + 0), + node_assign($2, NEW_DVAR(id))); + + args = new_args(m, 0, id, 0, 0); + } + else { + if (nd_type($2) == NODE_LASGN || + nd_type($2) == NODE_DASGN || + nd_type($2) == NODE_DASGN_CURR) { + $2->nd_value = NEW_DVAR(id); + m->nd_plen = 1; + m->nd_next = $2; + args = new_args(m, 0, 0, 0, 0); + } + else { + m->nd_next = node_assign(NEW_MASGN(NEW_LIST($2), 0), NEW_DVAR(id)); + args = new_args(m, 0, id, 0, 0); + } + } + scope = NEW_NODE(NODE_SCOPE, tbl, $8, args); + tbl[0] = 1; tbl[1] = id; + $$ = NEW_FOR(0, $5, scope); + fixpos($$, $2); +#endif + $$ = dispatch3(for, $2, $5, $8); + + } + | k_class cpath superclass + { + if (in_def || in_single) + yyerror("class definition in method body"); +#if 0 + local_push(0); + $$ = ruby_sourceline; +#endif + + } + bodystmt + k_end + { +#if 0 + $$ = NEW_CLASS($2, $5, $3); + nd_set_line($$, $4); + local_pop(); +#endif + $$ = dispatch3(class, $2, $3, $5); + + } + | k_class tLSHFT expr + { + $$ = in_def; + in_def = 0; + } + term + { + $$ = in_single; + in_single = 0; +#if 0 + local_push(0); +#endif + + } + bodystmt + k_end + { +#if 0 + $$ = NEW_SCLASS($3, $7); + fixpos($$, $3); + local_pop(); +#endif + $$ = dispatch2(sclass, $3, $7); + + in_def = $4; + in_single = $6; + } + | k_module cpath + { + if (in_def || in_single) + yyerror("module definition in method body"); +#if 0 + local_push(0); + $$ = ruby_sourceline; +#endif + + } + bodystmt + k_end + { +#if 0 + $$ = NEW_MODULE($2, $4); + nd_set_line($$, $3); + local_pop(); +#endif + $$ = dispatch2(module, $2, $4); + + } + | k_def fname + { + $$ = cur_mid; + cur_mid = $2; + in_def++; +#if 0 + local_push(0); +#endif + + } + f_arglist + bodystmt + k_end + { +#if 0 + NODE *body = remove_begin($5); + reduce_nodes(&body); + $$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE); + fixpos($$, $4); + fixpos($$->nd_defn, $4); + local_pop(); +#endif + $$ = dispatch3(def, $2, $4, $5); + + in_def--; + cur_mid = $3; + } + | k_def singleton dot_or_colon {lex_state = EXPR_FNAME;} fname + { + in_single++; + lex_state = EXPR_END; /* force for args */ +#if 0 + local_push(0); +#endif + + } + f_arglist + bodystmt + k_end + { +#if 0 + NODE *body = remove_begin($8); + reduce_nodes(&body); + $$ = NEW_DEFS($2, $5, $7, body); + fixpos($$, $2); + fixpos($$->nd_defn, $2); + local_pop(); +#endif + $$ = dispatch5(defs, $2, $3, $5, $7, $8); + + in_single--; + } + | keyword_break + { +#if 0 + $$ = NEW_BREAK(0); +#endif + $$ = dispatch1(break, arg_new()); + + } + | keyword_next + { +#if 0 + $$ = NEW_NEXT(0); +#endif + $$ = dispatch1(next, arg_new()); + + } + | keyword_redo + { +#if 0 + $$ = NEW_REDO(); +#endif + $$ = dispatch0(redo); + + } + | keyword_retry + { +#if 0 + $$ = NEW_RETRY(); +#endif + $$ = dispatch0(retry); + + } + ; + +primary_value : primary + { +#if 0 + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); +#endif + $$ = $1; + + } + ; + +k_begin : keyword_begin + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "begin"); +#endif + } + +k_if : keyword_if + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "if"); +#endif + } + +k_unless : keyword_unless + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "unless"); +#endif + } + +k_while : keyword_while + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "while"); +#endif + } + +k_until : keyword_until + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "until"); +#endif + } + +k_case : keyword_case + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "case"); +#endif + } + +k_for : keyword_for + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "for"); +#endif + } + +k_class : keyword_class + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "class"); +#endif + } + +k_module : keyword_module + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "module"); +#endif + } + +k_def : keyword_def + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "def"); +#endif + } + +k_end : keyword_end + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_pop(parser, "end"); /* POP */ +#endif + } + +then : term +/* +*/ + { $$ = Qnil; } + + | keyword_then + | term keyword_then +/* +*/ + { $$ = $2; } + + ; + +do : term +/* +*/ + { $$ = Qnil; } + + | keyword_do_cond + ; + +if_tail : opt_else + | keyword_elsif expr_value then + compstmt + if_tail + { +#if 0 + $$ = NEW_IF(cond($2), $4, $5); + fixpos($$, $2); +#endif + $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); + + } + ; + +opt_else : none + | keyword_else compstmt + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(else, $2); + + } + ; + +for_var : lhs + | mlhs + ; + +f_marg : f_norm_arg + { +#if 0 + $$ = assignable($1, 0); +#endif + $$ = dispatch1(mlhs_paren, $1); + + } + | tLPAREN f_margs rparen + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(mlhs_paren, $2); + + } + ; + +f_marg_list : f_marg + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = mlhs_add(mlhs_new(), $1); + + } + | f_marg_list ',' f_marg + { +#if 0 + $$ = list_append($1, $3); +#endif + $$ = mlhs_add($1, $3); + + } + ; + +f_margs : f_marg_list + { +#if 0 + $$ = NEW_MASGN($1, 0); +#endif + $$ = $1; + + } + | f_marg_list ',' tSTAR f_norm_arg + { +#if 0 + $$ = NEW_MASGN($1, assignable($4, 0)); +#endif + $$ = mlhs_add_star($1, $4); + + } + | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list + { +#if 0 + $$ = NEW_MASGN($1, NEW_POSTARG(assignable($4, 0), $6)); +#endif + $$ = mlhs_add_star($1, $4); + + } + | f_marg_list ',' tSTAR + { +#if 0 + $$ = NEW_MASGN($1, -1); +#endif + $$ = mlhs_add_star($1, Qnil); + + } + | f_marg_list ',' tSTAR ',' f_marg_list + { +#if 0 + $$ = NEW_MASGN($1, NEW_POSTARG(-1, $5)); +#endif + $$ = mlhs_add_star($1, $5); + + } + | tSTAR f_norm_arg + { +#if 0 + $$ = NEW_MASGN(0, assignable($2, 0)); +#endif + $$ = mlhs_add_star(mlhs_new(), $2); + + } + | tSTAR f_norm_arg ',' f_marg_list + { +#if 0 + $$ = NEW_MASGN(0, NEW_POSTARG(assignable($2, 0), $4)); +#endif + #if 0 + TODO: Check me + #endif + $$ = mlhs_add_star($2, $4); + + } + | tSTAR + { +#if 0 + $$ = NEW_MASGN(0, -1); +#endif + $$ = mlhs_add_star(mlhs_new(), Qnil); + + } + | tSTAR ',' f_marg_list + { +#if 0 + $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3)); +#endif + $$ = mlhs_add_star(mlhs_new(), Qnil); + + } + ; + +block_param : f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, $5, 0, $6); +#endif + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + + } + | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, $5, $7, $8); +#endif + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + + } + | f_arg ',' f_block_optarg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, 0, 0, $4); +#endif + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + + } + | f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, 0, $5, $6); +#endif + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + + } + | f_arg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, $3, 0, $4); +#endif + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + + } + | f_arg ',' + { +#if 0 + $$ = new_args($1, 0, 1, 0, 0); +#endif + $$ = params_new($1, Qnil, Qnil, Qnil, Qnil); + dispatch1(excessed_comma, $$); + + } + | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, $3, $5, $6); +#endif + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + + } + | f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, 0, 0, $2); +#endif + $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2)); + + } + | f_block_optarg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, $3, 0, $4); +#endif + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + + } + | f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, $3, $5, $6); +#endif + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + + } + | f_block_optarg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, 0, 0, $2); +#endif + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + + } + | f_block_optarg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, 0, $3, $4); +#endif + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + + } + | f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, 0, $1, 0, $2); +#endif + $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2)); + + } + | f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, 0, $1, $3, $4); +#endif + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + + } + | f_block_arg + { +#if 0 + $$ = new_args(0, 0, 0, 0, $1); +#endif + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + + } + ; + +opt_block_param : none + | block_param_def + { + command_start = Qtrue; + } + ; + +block_param_def : '|' opt_bv_decl '|' + { +#if 0 + $$ = 0; +#endif + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + escape_Qundef($2)); + + } + | tOROP + { +#if 0 + $$ = 0; +#endif + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + Qnil); + + } + | '|' block_param opt_bv_decl '|' + { +#if 0 + $$ = $2; +#endif + $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); + + } + ; + + +opt_bv_decl : none + | ';' bv_decls + { +#if 0 + $$ = 0; +#endif + $$ = $2; + + } + ; + +bv_decls : bvar +/* +*/ + { + $$ = rb_ary_new2($1); + } + + | bv_decls ',' bvar +/* +*/ + { + rb_ary_push($$, $3); + } + + ; + +bvar : tIDENTIFIER + { +#if 0 + new_bv($1); +#endif + $$ = $1; + + } + | f_bad_arg + { + $$ = 0; + } + ; + +lambda : { +#if 0 + dyna_push(); +#endif + + $$ = lpar_beg; + lpar_beg = ++paren_nest; + } + f_larglist + lambda_body + { + lpar_beg = $1; +#if 0 + $$ = $2; + $$->nd_body = NEW_SCOPE($2->nd_head, $3); + dyna_pop(); +#endif + $$ = dispatch2(lambda, $2, $3); + + } + ; + +f_larglist : '(' f_args opt_bv_decl rparen + { +#if 0 + $$ = NEW_LAMBDA($2); +#endif + $$ = dispatch1(paren, $2); + + } + | f_args + { +#if 0 + $$ = NEW_LAMBDA($1); +#endif + $$ = $1; + + } + ; + +lambda_body : tLAMBEG compstmt '}' + { + $$ = $2; + } + | keyword_do_LAMBDA compstmt keyword_end + { + $$ = $2; + } + ; + +do_block : keyword_do_block + { +#if 0 + dyna_push(); + $$ = ruby_sourceline; +#endif + } + opt_block_param + compstmt + keyword_end + { +#if 0 + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); +#endif + $$ = dispatch2(do_block, escape_Qundef($3), $4); + + } + ; + +block_call : command do_block + { +#if 0 + if (nd_type($1) == NODE_YIELD) { + compile_error(PARSER_ARG "block given to yield"); + } + else { + block_dup_check($1->nd_args, $2); + } + $2->nd_iter = $1; + $$ = $2; + fixpos($$, $1); +#endif + $$ = method_add_block($1, $2); + + } + | block_call '.' operation2 opt_paren_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); +#endif + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + + } + | block_call tCOLON2 operation2 opt_paren_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); +#endif + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_optarg($$, $4); + + } + ; + +method_call : operation paren_args + { +#if 0 + $$ = NEW_FCALL($1, $2); + fixpos($$, $2); +#endif + $$ = method_arg(dispatch1(fcall, $1), $2); + + } + | primary_value '.' operation2 opt_paren_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); +#endif + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + + } + | primary_value tCOLON2 operation2 paren_args + { +#if 0 + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); +#endif + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + + } + | primary_value tCOLON2 operation3 + { +#if 0 + $$ = NEW_CALL($1, $3, 0); +#endif + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + + } + | primary_value '.' paren_args + { +#if 0 + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); +#endif + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + + } + | primary_value tCOLON2 paren_args + { +#if 0 + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); +#endif + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + + } + | keyword_super paren_args + { +#if 0 + $$ = NEW_SUPER($2); +#endif + $$ = dispatch1(super, $2); + + } + | keyword_super + { +#if 0 + $$ = NEW_ZSUPER(); +#endif + $$ = dispatch0(zsuper); + + } + | primary_value '[' opt_call_args rbracket + { +#if 0 + if ($1 && nd_type($1) == NODE_SELF) + $$ = NEW_FCALL(tAREF, $3); + else + $$ = NEW_CALL($1, tAREF, $3); + fixpos($$, $1); +#endif + $$ = dispatch2(aref, $1, escape_Qundef($3)); + + } + ; + +brace_block : '{' + { +#if 0 + dyna_push(); + $$ = ruby_sourceline; +#endif + + } + opt_block_param + compstmt '}' + { +#if 0 + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + nd_set_line($$->nd_body, $2); + nd_set_line($$->nd_body->nd_body, $2); + dyna_pop(); +#endif + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + + } + | keyword_do + { +#if 0 + dyna_push(); + $$ = ruby_sourceline; +#endif + + } + opt_block_param + compstmt keyword_end + { +#if 0 + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); +#endif + $$ = dispatch2(do_block, escape_Qundef($3), $4); + + } + ; + +case_body : keyword_when args then + compstmt + cases + { +#if 0 + $$ = NEW_WHEN($2, $4, $5); +#endif + $$ = dispatch3(when, $2, $4, escape_Qundef($5)); + + } + ; + +cases : opt_else + | case_body + ; + +opt_rescue : keyword_rescue exc_list exc_var then + compstmt + opt_rescue + { +#if 0 + if ($3) { + $3 = node_assign($3, NEW_ERRINFO()); + $5 = block_append($3, $5); + } + $$ = NEW_RESBODY($2, $5, $6); + fixpos($$, $2?$2:$5); +#endif + $$ = dispatch4(rescue, + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($5), + escape_Qundef($6)); + + } + | none + ; + +exc_list : arg_value + { +#if 0 + $$ = NEW_LIST($1); +#endif + $$ = rb_ary_new3(1, $1); + + } + | mrhs + { +#if 0 + if (!($$ = splat_array($1))) $$ = $1; +#endif + $$ = $1; + + } + | none + ; + +exc_var : tASSOC lhs + { + $$ = $2; + } + | none + ; + +opt_ensure : keyword_ensure compstmt + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(ensure, $2); + + } + | none + ; + +literal : numeric + | symbol + { +#if 0 + $$ = NEW_LIT(ID2SYM($1)); +#endif + $$ = dispatch1(symbol_literal, $1); + + } + | dsym + ; + +strings : string + { +#if 0 + NODE *node = $1; + if (!node) { + node = NEW_STR(STR_NEW0()); + } + else { + node = evstr2dstr(node); + } + $$ = node; +#endif + $$ = $1; + + } + ; + +string : tCHAR + | string1 + | string string1 + { +#if 0 + $$ = literal_concat($1, $2); +#endif + $$ = dispatch2(string_concat, $1, $2); + + } + ; + +string1 : tSTRING_BEG string_contents tSTRING_END + { +#if 0 + $$ = $2; +#endif + $$ = dispatch1(string_literal, $2); + + } + ; + +xstring : tXSTRING_BEG xstring_contents tSTRING_END + { +#if 0 + NODE *node = $2; + if (!node) { + node = NEW_XSTR(STR_NEW0()); + } + else { + switch (nd_type(node)) { + case NODE_STR: + nd_set_type(node, NODE_XSTR); + break; + case NODE_DSTR: + nd_set_type(node, NODE_DXSTR); + break; + default: + node = NEW_NODE(NODE_DXSTR, STR_NEW0(), 1, NEW_LIST(node)); + break; + } + } + $$ = node; +#endif + $$ = dispatch1(xstring_literal, $2); + + } + ; + +regexp : tREGEXP_BEG xstring_contents tREGEXP_END + { +#if 0 + int options = $3; + NODE *node = $2; + NODE *list; + if (!node) { + node = NEW_LIT(reg_compile(STR_NEW0(), options)); + } + else switch (nd_type(node)) { + case NODE_STR: + { + VALUE src = node->nd_lit; + nd_set_type(node, NODE_LIT); + node->nd_lit = reg_compile(src, options); + } + break; + default: + node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); + case NODE_DSTR: + if (options & RE_OPTION_ONCE) { + nd_set_type(node, NODE_DREGX_ONCE); + } + else { + nd_set_type(node, NODE_DREGX); + } + node->nd_cflag = options & RE_OPTION_MASK; + reg_fragment_check(node->nd_lit, options); + for (list = node->nd_next; list; list = list->nd_next) { + if (nd_type(list->nd_head) == NODE_STR) { + reg_fragment_check(list->nd_head->nd_lit, options); + } + } + break; + } + $$ = node; +#endif + $$ = dispatch2(regexp_literal, $2, $3); + + } + ; + +words : tWORDS_BEG ' ' tSTRING_END + { +#if 0 + $$ = NEW_ZARRAY(); +#endif + $$ = dispatch0(words_new); + + } + | tWORDS_BEG word_list tSTRING_END + { + $$ = $2; + } + ; + +word_list : /* none */ + { +#if 0 + $$ = 0; +#endif + $$ = dispatch0(words_new); + + } + | word_list word ' ' + { +#if 0 + $$ = list_append($1, evstr2dstr($2)); +#endif + $$ = dispatch2(words_add, $1, $2); + + } + ; + +word : string_content +/* +*/ + { + $$ = dispatch0(word_new); + $$ = dispatch2(word_add, $$, $1); + } + + | word string_content + { +#if 0 + $$ = literal_concat($1, $2); +#endif + $$ = dispatch2(word_add, $1, $2); + + } + ; + +qwords : tQWORDS_BEG ' ' tSTRING_END + { +#if 0 + $$ = NEW_ZARRAY(); +#endif + $$ = dispatch0(qwords_new); + + } + | tQWORDS_BEG qword_list tSTRING_END + { + $$ = $2; + } + ; + +qword_list : /* none */ + { +#if 0 + $$ = 0; +#endif + $$ = dispatch0(qwords_new); + + } + | qword_list tSTRING_CONTENT ' ' + { +#if 0 + $$ = list_append($1, $2); +#endif + $$ = dispatch2(qwords_add, $1, $2); + + } + ; + +string_contents : /* none */ + { +#if 0 + $$ = 0; +#endif + $$ = dispatch0(string_content); + + } + | string_contents string_content + { +#if 0 + $$ = literal_concat($1, $2); +#endif + $$ = dispatch2(string_add, $1, $2); + + } + ; + +xstring_contents: /* none */ + { +#if 0 + $$ = 0; +#endif + $$ = dispatch0(xstring_new); + + } + | xstring_contents string_content + { +#if 0 + $$ = literal_concat($1, $2); +#endif + $$ = dispatch2(xstring_add, $1, $2); + + } + ; + +string_content : tSTRING_CONTENT + | tSTRING_DVAR + { + $$ = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + } + string_dvar + { +#if 0 + lex_strterm = $2; + $$ = NEW_EVSTR($3); +#endif + lex_strterm = $2; + $$ = dispatch1(string_dvar, $3); + + } + | tSTRING_DBEG + { + $$ = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + } + compstmt '}' + { + lex_strterm = $2; + COND_LEXPOP(); + CMDARG_LEXPOP(); +#if 0 + if ($3) $3->flags &= ~NODE_FL_NEWLINE; + $$ = new_evstr($3); +#endif + $$ = dispatch1(string_embexpr, $3); + + } + ; + +string_dvar : tGVAR + { +#if 0 + $$ = NEW_GVAR($1); +#endif + $$ = dispatch1(var_ref, $1); + + } + | tIVAR + { +#if 0 + $$ = NEW_IVAR($1); +#endif + $$ = dispatch1(var_ref, $1); + + } + | tCVAR + { +#if 0 + $$ = NEW_CVAR($1); +#endif + $$ = dispatch1(var_ref, $1); + + } + | backref + ; + +symbol : tSYMBEG sym + { +#if 0 + lex_state = EXPR_END; + $$ = $2; +#endif + lex_state = EXPR_END; + $$ = dispatch1(symbol, $2); + + } + ; + +sym : fname + | tIVAR + | tGVAR + | tCVAR + ; + +dsym : tSYMBEG xstring_contents tSTRING_END + { +#if 0 + lex_state = EXPR_END; + if (!($$ = $2)) { + $$ = NEW_LIT(ID2SYM(rb_intern(""))); + } + else { + VALUE lit; + + switch (nd_type($$)) { + case NODE_DSTR: + nd_set_type($$, NODE_DSYM); + break; + case NODE_STR: + lit = $$->nd_lit; + $$->nd_lit = ID2SYM(rb_intern_str(lit)); + nd_set_type($$, NODE_LIT); + break; + default: + $$ = NEW_NODE(NODE_DSYM, STR_NEW0(), 1, NEW_LIST($$)); + break; + } + } +#endif + lex_state = EXPR_END; + $$ = dispatch1(dyna_symbol, $2); + + } + ; + +numeric : tINTEGER + | tFLOAT + | tUMINUS_NUM tINTEGER %prec tLOWEST + { +#if 0 + $$ = negate_lit($2); +#endif + $$ = dispatch2(unary, ripper_intern("-@"), $2); + + } + | tUMINUS_NUM tFLOAT %prec tLOWEST + { +#if 0 + $$ = negate_lit($2); +#endif + $$ = dispatch2(unary, ripper_intern("-@"), $2); + + } + ; + +variable : tIDENTIFIER + | tIVAR + | tGVAR + | tCONSTANT + | tCVAR + | keyword_nil {ifndef_ripper($$ = keyword_nil);} + | keyword_self {ifndef_ripper($$ = keyword_self);} + | keyword_true {ifndef_ripper($$ = keyword_true);} + | keyword_false {ifndef_ripper($$ = keyword_false);} + | keyword__FILE__ {ifndef_ripper($$ = keyword__FILE__);} + | keyword__LINE__ {ifndef_ripper($$ = keyword__LINE__);} + | keyword__ENCODING__ {ifndef_ripper($$ = keyword__ENCODING__);} + ; + +var_ref : variable + { +#if 0 + if (!($$ = gettable($1))) $$ = NEW_BEGIN(0); +#endif + $$ = dispatch1(var_ref, $1); + + } + ; + +var_lhs : variable + { +#if 0 + $$ = assignable($1, 0); +#endif + $$ = dispatch1(var_field, $1); + + } + ; + +backref : tNTH_REF + | tBACK_REF + ; + +superclass : term + { +#if 0 + $$ = 0; +#endif + $$ = Qnil; + + } + | '<' + { + lex_state = EXPR_BEG; + } + expr_value term + { + $$ = $3; + } + | error term + { +#if 0 + yyerrok; + $$ = 0; +#endif + yyerrok; + $$ = Qnil; + + } + ; + +f_arglist : '(' f_args rparen + { +#if 0 + $$ = $2; + lex_state = EXPR_BEG; + command_start = Qtrue; +#endif + $$ = dispatch1(paren, $2); + lex_state = EXPR_BEG; + command_start = Qtrue; + + } + | f_args term + { + $$ = $1; + } + ; + +f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, $5, 0, $6); +#endif + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + + } + | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, $5, $7, $8); +#endif + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + + } + | f_arg ',' f_optarg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, 0, 0, $4); +#endif + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + + } + | f_arg ',' f_optarg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, $3, 0, $5, $6); +#endif + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + + } + | f_arg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, $3, 0, $4); +#endif + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + + } + | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, $3, $5, $6); +#endif + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + + } + | f_arg opt_f_block_arg + { +#if 0 + $$ = new_args($1, 0, 0, 0, $2); +#endif + $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); + + } + | f_optarg ',' f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, $3, 0, $4); +#endif + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + + } + | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, $3, $5, $6); +#endif + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + + } + | f_optarg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, 0, 0, $2); +#endif + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + + } + | f_optarg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, $1, 0, $3, $4); +#endif + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + + } + | f_rest_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, 0, $1, 0, $2); +#endif + $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); + + } + | f_rest_arg ',' f_arg opt_f_block_arg + { +#if 0 + $$ = new_args(0, 0, $1, $3, $4); +#endif + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + + } + | f_block_arg + { +#if 0 + $$ = new_args(0, 0, 0, 0, $1); +#endif + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + + } + | /* none */ + { +#if 0 + $$ = new_args(0, 0, 0, 0, 0); +#endif + $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); + + } + ; + +f_bad_arg : tCONSTANT + { +#if 0 + yyerror("formal argument cannot be a constant"); + $$ = 0; +#endif + $$ = dispatch1(param_error, $1); + + } + | tIVAR + { +#if 0 + yyerror("formal argument cannot be an instance variable"); + $$ = 0; +#endif + $$ = dispatch1(param_error, $1); + + } + | tGVAR + { +#if 0 + yyerror("formal argument cannot be a global variable"); + $$ = 0; +#endif + $$ = dispatch1(param_error, $1); + + } + | tCVAR + { +#if 0 + yyerror("formal argument cannot be a class variable"); + $$ = 0; +#endif + $$ = dispatch1(param_error, $1); + + } + ; + +f_norm_arg : f_bad_arg + | tIDENTIFIER + { +#if 0 + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); +#endif + + $$ = $1; + } + ; + +f_arg_item : f_norm_arg + { +#if 0 + arg_var($1); + $$ = NEW_ARGS_AUX($1, 1); +#endif + + } + | tLPAREN f_margs rparen + { +#if 0 + ID tid = internal_id(); + arg_var(tid); + if (dyna_in_block()) { + $2->nd_value = NEW_DVAR(tid); + } + else { + $2->nd_value = NEW_LVAR(tid); + } + $$ = NEW_ARGS_AUX(tid, 1); + $$->nd_next = $2; +#endif + $$ = dispatch1(mlhs_paren, $2); + + } + ; + +f_arg : f_arg_item +/* +*/ + { + $$ = rb_ary_new3(1, $1); + } + + | f_arg ',' f_arg_item + { +#if 0 + $$ = $1; + $$->nd_plen++; + $$->nd_next = block_append($$->nd_next, $3->nd_next); + rb_gc_force_recycle((VALUE)$3); +#endif + $$ = rb_ary_push($1, $3); + + } + ; + +f_opt : tIDENTIFIER '=' arg_value + { +#if 0 + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); + arg_var($1); + $$ = NEW_OPT_ARG(0, assignable($1, $3)); +#endif + $$ = rb_assoc_new($1, $3); + + } + ; + +f_block_opt : tIDENTIFIER '=' primary_value + { +#if 0 + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); + arg_var($1); + $$ = NEW_OPT_ARG(0, assignable($1, $3)); +#endif + $$ = rb_assoc_new($1, $3); + + } + ; + +f_block_optarg : f_block_opt + { +#if 0 + $$ = $1; +#endif + $$ = rb_ary_new3(1, $1); + + } + | f_block_optarg ',' f_block_opt + { +#if 0 + NODE *opts = $1; + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = $3; + $$ = $1; +#endif + $$ = rb_ary_push($1, $3); + + } + ; + +f_optarg : f_opt + { +#if 0 + $$ = $1; +#endif + $$ = rb_ary_new3(1, $1); + + } + | f_optarg ',' f_opt + { +#if 0 + NODE *opts = $1; + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = $3; + $$ = $1; +#endif + $$ = rb_ary_push($1, $3); + + } + ; + +restarg_mark : '*' + | tSTAR + ; + +f_rest_arg : restarg_mark tIDENTIFIER + { +#if 0 + if (!is_local_id($2)) + yyerror("rest argument must be local variable"); + shadowing_lvar($2); + arg_var($2); + $$ = $2; +#endif + $$ = dispatch1(rest_param, $2); + + } + | restarg_mark + { +#if 0 + $$ = internal_id(); + arg_var($$); +#endif + $$ = dispatch1(rest_param, Qnil); + + } + ; + +blkarg_mark : '&' + | tAMPER + ; + +f_block_arg : blkarg_mark tIDENTIFIER + { +#if 0 + if (!is_local_id($2)) + yyerror("block argument must be local variable"); + else if (!dyna_in_block() && local_id($2)) + yyerror("duplicated block argument name"); + shadowing_lvar($2); + arg_var($2); + $$ = $2; +#endif + $$ = dispatch1(blockarg, $2); + + } + ; + +opt_f_block_arg : ',' f_block_arg + { + $$ = $2; + } + | none + { +#if 0 + $$ = 0; +#endif + $$ = Qundef; + + } + ; + +singleton : var_ref + { +#if 0 + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); +#endif + $$ = $1; + + } + | '(' {lex_state = EXPR_BEG;} expr rparen + { +#if 0 + if ($3 == 0) { + yyerror("can't define singleton method for ()."); + } + else { + switch (nd_type($3)) { + case NODE_STR: + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_DREGX: + case NODE_LIT: + case NODE_ARRAY: + case NODE_ZARRAY: + yyerror("can't define singleton method for literals"); + default: + value_expr($3); + break; + } + } + $$ = $3; +#endif + $$ = dispatch1(paren, $3); + + } + ; + +assoc_list : none + | assocs trailer + { +#if 0 + $$ = $1; +#endif + $$ = dispatch1(assoclist_from_args, $1); + + } + ; + +assocs : assoc +/* +*/ + { + $$ = rb_ary_new3(1, $1); + } + + | assocs ',' assoc + { +#if 0 + $$ = list_concat($1, $3); +#endif + $$ = rb_ary_push($1, $3); + + } + ; + +assoc : arg_value tASSOC arg_value + { +#if 0 + $$ = list_append(NEW_LIST($1), $3); +#endif + $$ = dispatch2(assoc_new, $1, $3); + + } + | tLABEL arg_value + { +#if 0 + $$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2); +#endif + $$ = dispatch2(assoc_new, $1, $2); + + } + ; + +operation : tIDENTIFIER + | tCONSTANT + | tFID + ; + +operation2 : tIDENTIFIER + | tCONSTANT + | tFID + | op + ; + +operation3 : tIDENTIFIER + | tFID + | op + ; + +dot_or_colon : '.' +/* +*/ + { $$ = $1; } + + | tCOLON2 +/* +*/ + { $$ = $1; } + + ; + +opt_terms : /* none */ + | terms + ; + +opt_nl : /* none */ + | '\n' + ; + +rparen : opt_nl ')' + ; + +rbracket : opt_nl ']' + ; + +trailer : /* none */ + | '\n' + | ',' + ; + +term : ';' {yyerrok;} + | '\n' + ; + +terms : term + | terms ';' {yyerrok;} + ; + +none : /* none */ + { +#if 0 + $$ = 0; +#endif + $$ = Qundef; + + } + ; +%% +# undef parser +# undef yylex +# undef yylval +# define yylval (*((YYSTYPE*)(parser->parser_yylval))) + +static int parser_regx_options(struct parser_params*); +static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); +static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); +static int parser_parse_string(struct parser_params*,NODE*); +static int parser_here_document(struct parser_params*,NODE*); + + +# define nextc() parser_nextc(parser) +# define pushback(c) parser_pushback(parser, c) +# define newtok() parser_newtok(parser) +# define tokspace(n) parser_tokspace(parser, n) +# define tokadd(c) parser_tokadd(parser, c) +# define tok_hex(numlen) parser_tok_hex(parser, numlen) +# define read_escape(flags,e) parser_read_escape(parser, flags, e) +# define tokadd_escape(e) parser_tokadd_escape(parser, e) +# define regx_options() parser_regx_options(parser) +# define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e) +# define parse_string(n) parser_parse_string(parser,n) +# define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) +# define here_document(n) parser_here_document(parser,n) +# define heredoc_identifier() parser_heredoc_identifier(parser) +# define heredoc_restore(n) parser_heredoc_restore(parser,n) +# define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i) + +#ifdef RIPPER +/* FIXME */ +# define local_id(x) 1 +# define dyna_in_block() 1 +#endif /* RIPPER */ + +#ifndef RIPPER +# define set_yylval_str(x) yylval.node = NEW_STR(x) +# define set_yylval_num(x) yylval.num = x +# define set_yylval_id(x) yylval.id = x +# define set_yylval_literal(x) yylval.node = NEW_LIT(x) +# define set_yylval_node(x) yylval.node = x +# define yylval_id() yylval.id +#else +# define set_yylval_str(x) (void)(x) +# define set_yylval_num(x) (void)(x) +# define set_yylval_id(x) (void)(x) +# define set_yylval_literal(x) (void)(x) +# define set_yylval_node(x) (void)(x) +# define yylval_id() SYM2ID(yylval.val) +#endif + +#ifdef RIPPER +#define ripper_flush(p) (p->tokp = p->parser_lex_p) + +static void +ripper_dispatch_scan_event(struct parser_params *parser, int t) +{ + VALUE str; + + if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); + if (lex_p == parser->tokp) return; + str = STR_NEW(parser->tokp, lex_p - parser->tokp); + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str); + ripper_flush(parser); +} + +static void +ripper_dispatch_delayed_token(struct parser_params *parser, int t) +{ + int saved_line = ruby_sourceline; + const char *saved_tokp = parser->tokp; + + ruby_sourceline = parser->delayed_line; + parser->tokp = lex_pbeg + parser->delayed_col; + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); + parser->delayed = Qnil; + ruby_sourceline = saved_line; + parser->tokp = saved_tokp; +} +#endif /* RIPPER */ + +#include "ruby/regex.h" +#include "ruby/util.h" + +/* We remove any previous definition of `SIGN_EXTEND_CHAR', + since ours (we hope) works properly with all combinations of + machines, compilers, `char' and `unsigned char' argument types. + (Per Bothner suggested the basic approach.) */ +#undef SIGN_EXTEND_CHAR +#if __STDC__ +# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) +#endif + +#define parser_encoding_name() (parser->enc->name) +#define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) +#define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) +#define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) +#define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) + +#define parser_isascii() ISASCII(*(lex_p-1)) + +#ifndef RIPPER +static int +token_info_get_column(struct parser_params *parser, const char *token) +{ + int column = 1; + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p == '\t') { + column = (((column - 1) / 8) + 1) * 8; + } + column++; + } + return column; +} + +static int +token_info_has_nonspaces(struct parser_params *parser, const char *token) +{ + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p != ' ' && *p != '\t') { + return 1; + } + } + return 0; +} + +static void +token_info_push(struct parser_params *parser, const char *token) +{ + token_info *ptinfo; + + if (compile_for_eval) return; + ptinfo = ALLOC(token_info); + ptinfo->token = token; + ptinfo->linenum = ruby_sourceline; + ptinfo->column = token_info_get_column(parser, token); + ptinfo->nonspc = token_info_has_nonspaces(parser, token); + ptinfo->next = parser->parser_token_info; + + parser->parser_token_info = ptinfo; +} + +static void +token_info_pop(struct parser_params *parser, const char *token) +{ + int linenum; + token_info *ptinfo = parser->parser_token_info; + + if (!ptinfo) return; + parser->parser_token_info = ptinfo->next; + if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ + goto finish; + } + linenum = ruby_sourceline; + if (linenum == ptinfo->linenum) { /* SKIP */ + goto finish; + } + if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ + goto finish; + } + rb_compile_warning(ruby_sourcefile, linenum, + "mismatched indentations at '%s' with '%s' at %d", + token, ptinfo->token, ptinfo->linenum); + + finish: + xfree(ptinfo); +} +#endif /* RIPPER */ + +static int +parser_yyerror(struct parser_params *parser, const char *msg) +{ +#ifndef RIPPER + const int max_line_margin = 30; + const char *p, *pe; + char *buf; + int len, i; + + compile_error(PARSER_ARG "%s", msg); + p = lex_p; + while (lex_pbeg <= p) { + if (*p == '\n') break; + p--; + } + p++; + + pe = lex_p; + while (pe < lex_pend) { + if (*pe == '\n') break; + pe++; + } + + len = pe - p; + if (len > 4) { + char *p2; + const char *pre = "", *post = ""; + + if (len > max_line_margin * 2 + 10) { + if (lex_p - p > max_line_margin) { + p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); + pre = "..."; + } + if (pe - lex_p > max_line_margin) { + pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); + post = "..."; + } + len = pe - p; + } + buf = ALLOCA_N(char, len+2); + MEMCPY(buf, p, char, len); + buf[len] = '\0'; + rb_compile_error_append("%s%s%s", pre, buf, post); + + i = lex_p - p; + p2 = buf; pe = buf + len; + + while (p2 < pe) { + if (*p2 != '\t') *p2 = ' '; + p2++; + } + buf[i] = '^'; + buf[i+1] = '\0'; + rb_compile_error_append("%s%s", pre, buf); + } +#else + dispatch1(parse_error, STR_NEW2(msg)); +#endif /* !RIPPER */ + return 0; +} + +static void parser_prepare(struct parser_params *parser); + +#ifndef RIPPER +VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); + +static VALUE +debug_lines(const char *f) +{ + if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { + VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + if (TYPE(hash) == T_HASH) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new(); + rb_hash_aset(hash, fname, lines); + return lines; + } + } + return 0; +} + +static VALUE +coverage(const char *f, int n) +{ + extern VALUE rb_get_coverages(void); + VALUE coverages = rb_get_coverages(); + if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new2(n); + int i; + RBASIC(lines)->klass = 0; + for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; + RARRAY(lines)->as.heap.len = n; + rb_hash_aset(coverages, fname, lines); + return lines; + } + return 0; +} + +static int +e_option_supplied(struct parser_params *parser) +{ + if (strcmp(ruby_sourcefile, "-e") == 0) + return Qtrue; + return Qfalse; +} + +static VALUE +yycompile0(VALUE arg, int tracing) +{ + int n; + NODE *tree; + struct parser_params *parser = (struct parser_params *)arg; + + if (!compile_for_eval && rb_safe_level() == 0) { + ruby_debug_lines = debug_lines(ruby_sourcefile); + if (ruby_debug_lines && ruby_sourceline > 0) { + VALUE str = STR_NEW0(); + n = ruby_sourceline; + do { + rb_ary_push(ruby_debug_lines, str); + } while (--n); + } + + if (!e_option_supplied(parser)) { + ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); + } + } + + parser_prepare(parser); + deferred_nodes = 0; + n = yyparse((void*)parser); + ruby_debug_lines = 0; + ruby_coverage = 0; + compile_for_eval = 0; + + lex_strterm = 0; + lex_p = lex_pbeg = lex_pend = 0; + lex_lastline = lex_nextline = 0; + if (parser->nerr) { + return 0; + } + tree = ruby_eval_tree; + if (!tree) { + tree = NEW_NIL(); + } + if (ruby_eval_tree_begin) { + NODE *scope = ruby_eval_tree; + + if (scope) { + scope->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, scope->nd_body); + } + tree = scope; + } + else { + tree = ruby_eval_tree; + } + return (VALUE)tree; +} + +static NODE* +yycompile(struct parser_params *parser, const char *f, int line) +{ + ruby_sourcefile = ruby_strdup(f); + ruby_sourceline = line - 1; + return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue); +} +#endif /* !RIPPER */ + +static VALUE +lex_get_str(struct parser_params *parser, VALUE s) +{ + char *beg, *end, *pend; + + beg = RSTRING_PTR(s); + if (lex_gets_ptr) { + if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; + beg += lex_gets_ptr; + } + pend = RSTRING_PTR(s) + RSTRING_LEN(s); + end = beg; + while (end < pend) { + if (*end++ == '\n') break; + } + lex_gets_ptr = end - RSTRING_PTR(s); + return rb_enc_str_new(beg, end - beg, rb_enc_get(s)); +} + +static VALUE +lex_getline(struct parser_params *parser) +{ + VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); +#ifndef RIPPER + if (ruby_debug_lines && !NIL_P(line)) { + rb_ary_push(ruby_debug_lines, line); + } + if (ruby_coverage && !NIL_P(line)) { + rb_ary_push(ruby_coverage, Qnil); + } +#endif + return line; +} + +#ifndef RIPPER +NODE* +rb_compile_string(const char *f, VALUE s, int line) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_string(vparser, f, s, line); +} + +NODE* +rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) +{ + struct parser_params *parser; + NODE *node; + volatile VALUE tmp; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_get_str; + lex_gets_ptr = 0; + lex_input = s; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, line); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} + +NODE* +rb_compile_cstr(const char *f, const char *s, int len, int line) +{ + return rb_compile_string(f, rb_str_new(s, len), line); +} + +NODE* +rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) +{ + return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line); +} + +static VALUE +lex_io_gets(struct parser_params *parser, VALUE io) +{ + return rb_io_gets(io); +} + +NODE* +rb_compile_file(const char *f, VALUE file, int start) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_file(vparser, f, file, start); +} + +NODE* +rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) +{ + struct parser_params *parser; + volatile VALUE tmp; + NODE *node; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_io_gets; + lex_input = file; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, start); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} +#endif /* !RIPPER */ + +#define STR_FUNC_ESCAPE 0x01 +#define STR_FUNC_EXPAND 0x02 +#define STR_FUNC_REGEXP 0x04 +#define STR_FUNC_QWORDS 0x08 +#define STR_FUNC_SYMBOL 0x10 +#define STR_FUNC_INDENT 0x20 + +enum string_type { + str_squote = (0), + str_dquote = (STR_FUNC_EXPAND), + str_xquote = (STR_FUNC_EXPAND), + str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), + str_sword = (STR_FUNC_QWORDS), + str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), + str_ssym = (STR_FUNC_SYMBOL), + str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) +}; + +static VALUE +parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) +{ + VALUE str; + + str = rb_enc_str_new(p, n, enc); + if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + } + else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + + return str; +} + +#define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) +#define peek(c) (lex_p < lex_pend && (c) == *lex_p) + +static inline int +parser_nextc(struct parser_params *parser) +{ + int c; + + if (lex_p == lex_pend) { + VALUE v = lex_nextline; + lex_nextline = 0; + if (!v) { + if (parser->eofp) + return -1; + + if (!lex_input || NIL_P(v = lex_getline(parser))) { + parser->eofp = Qtrue; + lex_goto_eol(parser); + return -1; + } + } + { +#ifdef RIPPER + if (parser->tokp < lex_pend) { + if (NIL_P(parser->delayed)) { + parser->delayed = rb_str_buf_new(1024); + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + parser->delayed_line = ruby_sourceline; + parser->delayed_col = parser->tokp - lex_pbeg; + } + else { + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + } + } +#endif + if (heredoc_end > 0) { + ruby_sourceline = heredoc_end; + heredoc_end = 0; + } + ruby_sourceline++; + parser->line_count++; + lex_pbeg = lex_p = RSTRING_PTR(v); + lex_pend = lex_p + RSTRING_LEN(v); +#ifdef RIPPER + ripper_flush(parser); +#endif + lex_lastline = v; + } + } + c = (unsigned char)*lex_p++; + if (c == '\r' && peek('\n')) { + lex_p++; + c = '\n'; + } + + return c; +} + +static void +parser_pushback(struct parser_params *parser, int c) +{ + if (c == -1) return; + lex_p--; + if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { + lex_p--; + } +} + +#define was_bol() (lex_p == lex_pbeg + 1) + +#define tokfix() (tokenbuf[tokidx]='\0') +#define tok() tokenbuf +#define toklen() tokidx +#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) + +static char* +parser_newtok(struct parser_params *parser) +{ + tokidx = 0; + if (!tokenbuf) { + toksiz = 60; + tokenbuf = ALLOC_N(char, 60); + } + if (toksiz > 4096) { + toksiz = 60; + REALLOC_N(tokenbuf, char, 60); + } + return tokenbuf; +} + +static char * +parser_tokspace(struct parser_params *parser, int n) +{ + tokidx += n; + + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); + REALLOC_N(tokenbuf, char, toksiz); + } + return &tokenbuf[tokidx-n]; +} + +static void +parser_tokadd(struct parser_params *parser, int c) +{ + tokenbuf[tokidx++] = (char)c; + if (tokidx >= toksiz) { + toksiz *= 2; + REALLOC_N(tokenbuf, char, toksiz); + } +} + +static int +parser_tok_hex(struct parser_params *parser, int *numlen) +{ + int c; + + c = scan_hex(lex_p, 2, numlen); + if (!*numlen) { + yyerror("invalid hex escape"); + return 0; + } + lex_p += *numlen; + return c; +} + +#define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) + +static int +parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, + int string_literal, int symbol_literal, int regexp_literal) +{ + /* + * If string_literal is true, then we allow multiple codepoints + * in \u{}, and add the codepoints to the current token. + * Otherwise we're parsing a character literal and return a single + * codepoint without adding it + */ + + int codepoint; + int numlen; + + if (regexp_literal) { tokadd('\\'); tokadd('u'); } + + if (peek('{')) { /* handle \u{...} form */ + do { + if (regexp_literal) { tokadd(*lex_p); } + nextc(); + codepoint = scan_hex(lex_p, 6, &numlen); + if (numlen == 0) { + yyerror("invalid Unicode escape"); + return 0; + } + if (codepoint > 0x10ffff) { + yyerror("invalid Unicode codepoint (too large)"); + return 0; + } + lex_p += numlen; + if (regexp_literal) { + tokcopy(numlen); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u{0}'"); + return 0; + } + + tokadd(codepoint); + } + } while (string_literal && (peek(' ') || peek('\t'))); + + if (!peek('}')) { + yyerror("unterminated Unicode escape"); + return 0; + } + + if (regexp_literal) { tokadd('}'); } + nextc(); + } + else { /* handle \uxxxx form */ + codepoint = scan_hex(lex_p, 4, &numlen); + if (numlen < 4) { + yyerror("invalid Unicode escape"); + return 0; + } + lex_p += 4; + if (regexp_literal) { + tokcopy(4); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u0000'"); + return 0; + } + + tokadd(codepoint); + } + } + + return codepoint; +} + +#define ESCAPE_CONTROL 1 +#define ESCAPE_META 2 + +static int +parser_read_escape(struct parser_params *parser, int flags, + rb_encoding **encp) +{ + int c; + int numlen; + + switch (c = nextc()) { + case '\\': /* Backslash */ + return c; + + case 'n': /* newline */ + return '\n'; + + case 't': /* horizontal tab */ + return '\t'; + + case 'r': /* carriage-return */ + return '\r'; + + case 'f': /* form-feed */ + return '\f'; + + case 'v': /* vertical tab */ + return '\13'; + + case 'a': /* alarm(bell) */ + return '\007'; + + case 'e': /* escape */ + return 033; + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + + pushback(c); + c = scan_oct(lex_p, 3, &numlen); + lex_p += numlen; + } + return c; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + c = tok_hex(&numlen); + if (numlen == 0) return 0; + return c; + + case 'b': /* backspace */ + return '\010'; + + case 's': /* space */ + return ' '; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + if ((c = nextc()) == '\\') { + return read_escape(flags|ESCAPE_META, encp) | 0x80; + } + else if (c == -1 || !ISASCII(c)) goto eof; + else { + return ((c & 0xff) | 0x80); + } + + case 'C': + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc())== '\\') { + c = read_escape(flags|ESCAPE_CONTROL, encp); + } + else if (c == '?') + return 0177; + else if (c == -1 || !ISASCII(c)) goto eof; + return c & 0x9f; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return '\0'; + + default: + return c; + } +} + +static void +parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) +{ + int len = rb_enc_codelen(c, enc); + rb_enc_mbcput(c, tokspace(len), enc); +} + +static int +parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) +{ + int c; + int flags = 0; + + first: + switch (c = nextc()) { + case '\n': + return 0; /* just ignore */ + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int oct; + + oct = scan_oct(--lex_p, 3, &numlen); + if (numlen == 0) goto eof; + lex_p += numlen; + tokcopy(numlen + 1); + } + return 0; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int hex; + + hex = tok_hex(&numlen); + if (numlen == 0) goto eof; + tokcopy(numlen + 2); + } + return 0; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + flags |= ESCAPE_META; + goto escaped; + + case 'C': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + goto escaped; + + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + tokcopy(2); + flags |= ESCAPE_CONTROL; + escaped: + if ((c = nextc()) == '\\') { + goto first; + } + else if (c == -1) goto eof; + tokadd(c); + return 0; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return -1; + + default: + tokadd('\\'); + tokadd(c); + } + return 0; +} + +extern int rb_char_to_option_kcode(int c, int *option, int *kcode); + +static int +parser_regx_options(struct parser_params *parser) +{ + int kcode = 0; + int options = 0; + int c, opt, kc; + + newtok(); + while (c = nextc(), ISALPHA(c)) { + if (c == 'o') { + options |= RE_OPTION_ONCE; + } + else if (rb_char_to_option_kcode(c, &opt, &kc)) { + options |= opt; + if (kc >= 0) kcode = c; + } + else { + tokadd(c); + } + } + pushback(c); + if (toklen()) { + tokfix(); + compile_error(PARSER_ARG "unknown regexp option%s - %s", + toklen() > 1 ? "s" : "", tok()); + } + return options | RE_OPTION_ENCODING(kcode); +} + +static void +dispose_string(VALUE str) +{ + /* TODO: should use another API? */ + if (RBASIC(str)->flags & RSTRING_NOEMBED) + xfree(RSTRING_PTR(str)); + rb_gc_force_recycle(str); +} + +static int +parser_tokadd_mbchar(struct parser_params *parser, int c) +{ + int len = parser_precise_mbclen(); + if (!MBCLEN_CHARFOUND_P(len)) { + compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); + return -1; + } + tokadd(c); + lex_p += --len; + if (len > 0) tokcopy(len); + return c; +} + +#define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) + +static int +parser_tokadd_string(struct parser_params *parser, + int func, int term, int paren, long *nest, + rb_encoding **encp) +{ + int c; + int has_nonascii = 0; + rb_encoding *enc = *encp; + char *errbuf = 0; + static const char mixed_msg[] = "%s mixed within %s source"; + +#define mixed_error(enc1, enc2) if (!errbuf) { \ + int len = sizeof(mixed_msg) - 4; \ + len += strlen(rb_enc_name(enc1)); \ + len += strlen(rb_enc_name(enc2)); \ + errbuf = ALLOCA_N(char, len); \ + snprintf(errbuf, len, mixed_msg, \ + rb_enc_name(enc1), \ + rb_enc_name(enc2)); \ + yyerror(errbuf); \ + } +#define mixed_escape(beg, enc1, enc2) do { \ + const char *pos = lex_p; \ + lex_p = beg; \ + mixed_error(enc1, enc2); \ + lex_p = pos; \ + } while (0) + + while ((c = nextc()) != -1) { + if (paren && c == paren) { + ++*nest; + } + else if (c == term) { + if (!nest || !*nest) { + pushback(c); + break; + } + --*nest; + } + else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { + int c2 = *lex_p; + if (c2 == '$' || c2 == '@' || c2 == '{') { + pushback(c); + break; + } + } + else if (c == '\\') { + const char *beg = lex_p - 1; + c = nextc(); + switch (c) { + case '\n': + if (func & STR_FUNC_QWORDS) break; + if (func & STR_FUNC_EXPAND) continue; + tokadd('\\'); + break; + + case '\\': + if (func & STR_FUNC_ESCAPE) tokadd(c); + break; + + case 'u': + if ((func & STR_FUNC_EXPAND) == 0) { + tokadd('\\'); + break; + } + parser_tokadd_utf8(parser, &enc, 1, + func & STR_FUNC_SYMBOL, + func & STR_FUNC_REGEXP); + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + + default: + if (func & STR_FUNC_REGEXP) { + pushback(c); + if ((c = tokadd_escape(&enc)) < 0) + return -1; + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + } + else if (func & STR_FUNC_EXPAND) { + pushback(c); + if (func & STR_FUNC_ESCAPE) tokadd('\\'); + c = read_escape(0, &enc); + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + /* ignore backslashed spaces in %w */ + } + else if (c != term && !(paren && c == paren)) { + tokadd('\\'); + } + } + } + else if (!parser_isascii()) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + if (tokadd_mbchar(c) == -1) return -1; + continue; + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + pushback(c); + break; + } + if (!c && (func & STR_FUNC_SYMBOL)) { + func &= ~STR_FUNC_SYMBOL; + compile_error(PARSER_ARG "symbol cannot contain '\\0'"); + continue; + } + if (c & 0x80) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + } + tokadd(c); + } + *encp = enc; + return c; +} + +#define NEW_STRTERM(func, term, paren) \ + rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) + +static int +parser_parse_string(struct parser_params *parser, NODE *quote) +{ + int func = quote->nd_func; + int term = nd_term(quote); + int paren = nd_paren(quote); + int c, space = 0; + rb_encoding *enc = parser->enc; + + if (func == -1) return tSTRING_END; + c = nextc(); + if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + do {c = nextc();} while (ISSPACE(c)); + space = 1; + } + if (c == term && !quote->nd_nest) { + if (func & STR_FUNC_QWORDS) { + quote->nd_func = -1; + return ' '; + } + if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; + set_yylval_num(regx_options()); + return tREGEXP_END; + } + if (space) { + pushback(c); + return ' '; + } + newtok(); + if ((func & STR_FUNC_EXPAND) && c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + pushback(c); + if (tokadd_string(func, term, paren, "e->nd_nest, + &enc) == -1) { + ruby_sourceline = nd_line(quote); + if (func & STR_FUNC_REGEXP) { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated regexp meets end of file"); + return tREGEXP_END; + } + else { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated string meets end of file"); + return tSTRING_END; + } + } + + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; +} + +static int +parser_heredoc_identifier(struct parser_params *parser) +{ + int c = nextc(), term, func = 0, len; + + if (c == '-') { + c = nextc(); + func = STR_FUNC_INDENT; + } + switch (c) { + case '\'': + func |= str_squote; goto quoted; + case '"': + func |= str_dquote; goto quoted; + case '`': + func |= str_xquote; + quoted: + newtok(); + tokadd(func); + term = c; + while ((c = nextc()) != -1 && c != term) { + if (tokadd_mbchar(c) == -1) return 0; + } + if (c == -1) { + compile_error(PARSER_ARG "unterminated here document identifier"); + return 0; + } + break; + + default: + if (!parser_is_identchar()) { + pushback(c); + if (func & STR_FUNC_INDENT) { + pushback('-'); + } + return 0; + } + newtok(); + term = '"'; + tokadd(func |= str_dquote); + do { + if (tokadd_mbchar(c) == -1) return 0; + } while ((c = nextc()) != -1 && parser_is_identchar()); + pushback(c); + break; + } + + tokfix(); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tHEREDOC_BEG); +#endif + len = lex_p - lex_pbeg; + lex_goto_eol(parser); + lex_strterm = rb_node_newnode(NODE_HEREDOC, + STR_NEW(tok(), toklen()), /* nd_lit */ + len, /* nd_nth */ + lex_lastline); /* nd_orig */ + nd_set_line(lex_strterm, ruby_sourceline); +#ifdef RIPPER + ripper_flush(parser); +#endif + return term == '`' ? tXSTRING_BEG : tSTRING_BEG; +} + +static void +parser_heredoc_restore(struct parser_params *parser, NODE *here) +{ + VALUE line; + +#ifdef RIPPER + if (!NIL_P(parser->delayed)) + ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tHEREDOC_END); +#endif + line = here->nd_orig; + lex_lastline = line; + lex_pbeg = RSTRING_PTR(line); + lex_pend = lex_pbeg + RSTRING_LEN(line); + lex_p = lex_pbeg + here->nd_nth; + heredoc_end = ruby_sourceline; + ruby_sourceline = nd_line(here); + dispose_string(here->nd_lit); + rb_gc_force_recycle((VALUE)here); +#ifdef RIPPER + ripper_flush(parser); +#endif +} + +static int +parser_whole_match_p(struct parser_params *parser, + const char *eos, int len, int indent) +{ + const char *p = lex_pbeg; + int n; + + if (indent) { + while (*p && ISSPACE(*p)) p++; + } + n= lex_pend - (p + len); + if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse; + if (strncmp(eos, p, len) == 0) return Qtrue; + return Qfalse; +} + +static int +parser_here_document(struct parser_params *parser, NODE *here) +{ + int c, func, indent = 0; + const char *eos, *p, *pend; + long len; + VALUE str = 0; + + eos = RSTRING_PTR(here->nd_lit); + len = RSTRING_LEN(here->nd_lit) - 1; + indent = (func = *eos++) & STR_FUNC_INDENT; + + if ((c = nextc()) == -1) { + error: + compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); + restore: + heredoc_restore(lex_strterm); + lex_strterm = 0; + return 0; + } + if (was_bol() && whole_match_p(eos, len, indent)) { + heredoc_restore(lex_strterm); + return tSTRING_END; + } + + if (!(func & STR_FUNC_EXPAND)) { + do { + p = RSTRING_PTR(lex_lastline); + pend = lex_pend; + if (pend > p) { + switch (pend[-1]) { + case '\n': + if (--pend == p || pend[-1] != '\r') { + pend++; + break; + } + case '\r': + --pend; + } + } + if (str) + rb_str_cat(str, p, pend - p); + else + str = STR_NEW(p, pend - p); + if (pend < lex_pend) rb_str_cat(str, "\n", 1); + lex_goto_eol(parser); + if (nextc() == -1) { + if (str) dispose_string(str); + goto error; + } + } while (!whole_match_p(eos, len, indent)); + } + else { + /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ + rb_encoding *enc = parser->enc; + newtok(); + if (c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + do { + pushback(c); + if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { + if (parser->eofp) goto error; + goto restore; + } + if (c != '\n') { + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; + } + tokadd(nextc()); + /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ + if ((c = nextc()) == -1) goto error; + } while (!whole_match_p(eos, len, indent)); + str = STR_NEW3(tok(), toklen(), enc, func); + } + heredoc_restore(lex_strterm); + lex_strterm = NEW_STRTERM(-1, 0, 0); + set_yylval_str(str); + return tSTRING_CONTENT; +} + +#include "lex.c" + +#ifndef RIPPER +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + rb_warning0("ambiguous first argument; put parentheses or even spaces"); +} +#else +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + dispatch0(arg_ambiguous); +} +#endif +#define arg_ambiguous() arg_ambiguous_gen(parser) + +static int +lvar_defined_gen(struct parser_params *parser, ID id) +{ +#ifndef RIPPER + return (dyna_in_block() && dvar_defined(id)) || local_id(id); +#else + return 0; +#endif +} + +/* emacsen -*- hack */ +static int +parser_encode_length(struct parser_params *parser, const char *name, int len) +{ + int nlen; + + if (len > 5 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) + return nlen; + } + if (len > 4 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) + return nlen; + if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) + return nlen; + } + return len; +} + +static void +parser_set_encode(struct parser_params *parser, const char *name) +{ + int idx = rb_enc_find_index(name); + rb_encoding *enc; + + if (idx < 0) { + rb_raise(rb_eArgError, "unknown encoding name: %s", name); + } + enc = rb_enc_from_index(idx); + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eArgError, "%s is not ASCII compatible", rb_enc_name(enc)); + } + parser->enc = enc; +} + +static int +comment_at_top(struct parser_params *parser) +{ + const char *p = lex_pbeg, *pend = lex_p - 1; + if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; + while (p < pend) { + if (!ISSPACE(*p)) return 0; + p++; + } + return 1; +} + +#ifndef RIPPER +typedef int (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, int len); +typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); + +static void +magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) +{ + if (!comment_at_top(parser)) { + rb_warning("encoding '%s' is ignored, valid only in the first line except for shebang line.", + val); + return; + } + parser_set_encode(parser, val); +} + +struct magic_comment { + const char *name; + rb_magic_comment_setter_t func; + rb_magic_comment_length_t length; +}; + +static const struct magic_comment magic_comments[] = { + {"coding", magic_comment_encoding, parser_encode_length}, + {"encoding", magic_comment_encoding, parser_encode_length}, +}; +#endif + +static const char * +magic_comment_marker(const char *str, int len) +{ + int i = 2; + + while (i < len) { + switch (str[i]) { + case '-': + if (str[i-1] == '*' && str[i-2] == '-') { + return str + i + 1; + } + i += 2; + break; + case '*': + if (i + 1 >= len) return 0; + if (str[i+1] != '-') { + i += 4; + } + else if (str[i-1] != '-') { + i += 2; + } + else { + return str + i + 2; + } + break; + default: + i += 3; + break; + } + } + return 0; +} + +static int +parser_magic_comment(struct parser_params *parser, const char *str, int len) +{ + VALUE name = 0, val = 0; + const char *beg, *end, *vbeg, *vend; +#define str_copy(_s, _p, _n) ((_s) \ + ? (rb_str_resize((_s), (_n)), \ + MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ + : ((_s) = STR_NEW((_p), (_n)))) + + if (len <= 7) return Qfalse; + if (!(beg = magic_comment_marker(str, len))) return Qfalse; + if (!(end = magic_comment_marker(beg, str + len - beg))) return Qfalse; + str = beg; + len = end - beg - 3; + + /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ + while (len > 0) { +#ifndef RIPPER + const struct magic_comment *p = magic_comments; +#endif + char *s; + int i, n = 0; + + for (; len > 0 && *str; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + continue; + } + if (!ISSPACE(*str)) break; + } + for (beg = str; len > 0; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + break; + default: + if (ISSPACE(*str)) break; + continue; + } + break; + } + for (end = str; len > 0 && ISSPACE(*str); str++, --len); + if (!len) break; + if (*str != ':') continue; + + do str++; while (--len > 0 && ISSPACE(*str)); + if (!len) break; + if (*str == '"') { + for (vbeg = ++str; --len > 0 && *str != '"'; str++) { + if (*str == '\\') { + --len; + ++str; + } + } + vend = str; + if (len) { + --len; + ++str; + } + } + else { + for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); + vend = str; + } + while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; + + n = end - beg; + str_copy(name, beg, n); + s = RSTRING_PTR(name); + for (i = 0; i < n; ++i) { + if (*s == '-') *s = '_'; + } +#ifndef RIPPER + do { + if (STRNCASECMP(p->name, s, n) == 0) { + n = vend - vbeg; + if (p->length) { + n = (*p->length)(parser, vbeg, n); + } + str_copy(val, vbeg, n); + (*p->func)(parser, s, RSTRING_PTR(val)); + break; + } + } while (++p < magic_comments + sizeof(magic_comments) / sizeof(*p)); +#else + dispatch2(magic_comment, name, val); +#endif + } + + return Qtrue; +} + +static void +set_file_encoding(struct parser_params *parser, const char *str, const char *send) +{ + int sep = 0; + const char *beg = str; + VALUE s; + + for (;;) { + if (send - str <= 6) return; + switch (str[6]) { + case 'C': case 'c': str += 6; continue; + case 'O': case 'o': str += 5; continue; + case 'D': case 'd': str += 4; continue; + case 'I': case 'i': str += 3; continue; + case 'N': case 'n': str += 2; continue; + case 'G': case 'g': str += 1; continue; + case '=': case ':': + sep = 1; + str += 6; + break; + default: + str += 6; + if (ISSPACE(*str)) break; + continue; + } + if (STRNCASECMP(str-6, "coding", 6) == 0) break; + } + for (;;) { + do { + if (++str >= send) return; + } while (ISSPACE(*str)); + if (sep) break; + if (*str != '=' && *str != ':') return; + sep = 1; + str++; + } + beg = str; + while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); + s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); + parser_set_encode(parser, RSTRING_PTR(s)); + rb_str_resize(s, 0); +} + +static void +parser_prepare(struct parser_params *parser) +{ + int c = nextc(); + switch (c) { + case '#': + if (peek('!')) parser->has_shebang = 1; + break; + case 0xef: /* UTF-8 BOM marker */ + if (lex_pend - lex_p >= 2 && + (unsigned char)lex_p[0] == 0xbb && + (unsigned char)lex_p[1] == 0xbf) { + parser->enc = rb_utf8_encoding(); + lex_p += 2; + lex_pbeg = lex_p; + return; + } + break; + case EOF: + return; + } + pushback(c); + parser->enc = rb_enc_get(lex_lastline); +} + +#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) +#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) + +static int +parser_yylex(struct parser_params *parser) +{ + register int c; + int space_seen = 0; + int cmd_state; + enum lex_state_e last_state; + rb_encoding *enc; + int mb; +#ifdef RIPPER + int fallthru = Qfalse; +#endif + + if (lex_strterm) { + int token; + if (nd_type(lex_strterm) == NODE_HEREDOC) { + token = here_document(lex_strterm); + if (token == tSTRING_END) { + lex_strterm = 0; + lex_state = EXPR_END; + } + } + else { + token = parse_string(lex_strterm); + if (token == tSTRING_END || token == tREGEXP_END) { + rb_gc_force_recycle((VALUE)lex_strterm); + lex_strterm = 0; + lex_state = EXPR_END; + } + } + return token; + } + cmd_state = command_start; + command_start = Qfalse; + retry: + switch (c = nextc()) { + case '\0': /* NUL */ + case '\004': /* ^D */ + case '\032': /* ^Z */ + case -1: /* end of script. */ + return 0; + + /* white spaces */ + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; +#ifdef RIPPER + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + break; + default: + goto outofloop; + } + } + outofloop: + pushback(c); + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; + + case '#': /* it's a comment */ + /* no magic_comment in shebang line */ + if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { + if (comment_at_top(parser)) { + set_file_encoding(parser, lex_p, lex_pend); + } + } + lex_p = lex_pend; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tCOMMENT); + fallthru = Qtrue; +#endif + /* fall through */ + case '\n': + switch (lex_state) { + case EXPR_BEG: + case EXPR_FNAME: + case EXPR_DOT: + case EXPR_CLASS: + case EXPR_VALUE: +#ifdef RIPPER + if (!fallthru) { + ripper_dispatch_scan_event(parser, tIGNORED_NL); + } + fallthru = Qfalse; +#endif + goto retry; + default: + break; + } + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; + break; + case '.': { + if ((c = nextc()) != '.') { + pushback(c); + pushback('.'); + goto retry; + } + } + default: + --ruby_sourceline; + lex_nextline = lex_lastline; + case -1: /* EOF no decrement*/ + lex_goto_eol(parser); +#ifdef RIPPER + if (c != -1) { + parser->tokp = lex_p; + } +#endif + goto normal_newline; + } + } + normal_newline: + command_start = Qtrue; + lex_state = EXPR_BEG; + return '\n'; + + case '*': + if ((c = nextc()) == '*') { + if ((c = nextc()) == '=') { + set_yylval_id(tPOW); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + c = tPOW; + } + else { + if (c == '=') { + set_yylval_id('*'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`*' interpreted as argument prefix"); + c = tSTAR; + } + else if (IS_BEG()) { + c = tSTAR; + } + else { + c = '*'; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return c; + + case '!': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return '!'; + } + } + else { + lex_state = EXPR_BEG; + } + if (c == '=') { + return tNEQ; + } + if (c == '~') { + return tNMATCH; + } + pushback(c); + return '!'; + + case '=': + if (was_bol()) { + /* skip embedded rd document */ + if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { +#ifdef RIPPER + int first_p = Qtrue; + + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tEMBDOC_BEG); +#endif + for (;;) { + lex_goto_eol(parser); +#ifdef RIPPER + if (!first_p) { + ripper_dispatch_scan_event(parser, tEMBDOC); + } + first_p = Qfalse; +#endif + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "embedded document meets end of file"); + return 0; + } + if (c != '=') continue; + if (strncmp(lex_p, "end", 3) == 0 && + (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { + break; + } + } + lex_goto_eol(parser); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tEMBDOC_END); +#endif + goto retry; + } + } + + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + if ((c = nextc()) == '=') { + return tEQQ; + } + pushback(c); + return tEQ; + } + if (c == '~') { + return tMATCH; + } + else if (c == '>') { + return tASSOC; + } + pushback(c); + return '='; + + case '<': + c = nextc(); + if (c == '<' && + lex_state != EXPR_END && + lex_state != EXPR_DOT && + lex_state != EXPR_ENDARG && + lex_state != EXPR_CLASS && + (!IS_ARG() || space_seen)) { + int token = heredoc_identifier(); + if (token) return token; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if (c == '=') { + if ((c = nextc()) == '>') { + return tCMP; + } + pushback(c); + return tLEQ; + } + if (c == '<') { + if ((c = nextc()) == '=') { + set_yylval_id(tLSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tLSHFT; + } + pushback(c); + return '<'; + + case '>': + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + return tGEQ; + } + if (c == '>') { + if ((c = nextc()) == '=') { + set_yylval_id(tRSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tRSHFT; + } + pushback(c); + return '>'; + + case '"': + lex_strterm = NEW_STRTERM(str_dquote, '"', 0); + return tSTRING_BEG; + + case '`': + if (lex_state == EXPR_FNAME) { + lex_state = EXPR_END; + return c; + } + if (lex_state == EXPR_DOT) { + if (cmd_state) + lex_state = EXPR_CMDARG; + else + lex_state = EXPR_ARG; + return c; + } + lex_strterm = NEW_STRTERM(str_xquote, '`', 0); + return tXSTRING_BEG; + + case '\'': + lex_strterm = NEW_STRTERM(str_squote, '\'', 0); + return tSTRING_BEG; + + case '?': + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG) { + lex_state = EXPR_VALUE; + return '?'; + } + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "incomplete character syntax"); + return 0; + } + if (rb_enc_isspace(c, parser->enc)) { + if (!IS_ARG()) { + int c2 = 0; + switch (c) { + case ' ': + c2 = 's'; + break; + case '\n': + c2 = 'n'; + break; + case '\t': + c2 = 't'; + break; + case '\v': + c2 = 'v'; + break; + case '\r': + c2 = 'r'; + break; + case '\f': + c2 = 'f'; + break; + } + if (c2) { + rb_warnI("invalid character syntax; use ?\\%c", c2); + } + } + ternary: + pushback(c); + lex_state = EXPR_VALUE; + return '?'; + } + newtok(); + enc = parser->enc; + if (!parser_isascii()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && + lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { + goto ternary; + } + else if (c == '\\') { + if (peek('u')) { + nextc(); + c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); + if (0x80 <= c) { + tokaddmbc(c, enc); + } + else { + tokadd(c); + } + } + else { + c = read_escape(0, &enc); + tokadd(c); + } + } + else { + tokadd(c); + } + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); + lex_state = EXPR_END; + return tCHAR; + + case '&': + if ((c = nextc()) == '&') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tANDOP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tANDOP; + } + else if (c == '=') { + set_yylval_id('&'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`&' interpreted as argument prefix"); + c = tAMPER; + } + else if (IS_BEG()) { + c = tAMPER; + } + else { + c = '&'; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; + } + return c; + + case '|': + if ((c = nextc()) == '|') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tOROP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tOROP; + } + if (c == '=') { + set_yylval_id('|'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + pushback(c); + return '|'; + + case '+': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUPLUS; + } + pushback(c); + return '+'; + } + if (c == '=') { + set_yylval_id('+'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + c = '+'; + goto start_num; + } + return tUPLUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '+'; + + case '-': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUMINUS; + } + pushback(c); + return '-'; + } + if (c == '=') { + set_yylval_id('-'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (c == '>') { + lex_state = EXPR_ARG; + return tLAMBDA; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + return tUMINUS_NUM; + } + return tUMINUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '-'; + + case '.': + lex_state = EXPR_BEG; + if ((c = nextc()) == '.') { + if ((c = nextc()) == '.') { + return tDOT3; + } + pushback(c); + return tDOT2; + } + pushback(c); + if (c != -1 && ISDIGIT(c)) { + yyerror("no . floating literal anymore; put 0 before dot"); + } + lex_state = EXPR_DOT; + return '.'; + + start_num: + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + int is_float, seen_point, seen_e, nondigit; + + is_float = seen_point = seen_e = nondigit = 0; + lex_state = EXPR_END; + newtok(); + if (c == '-' || c == '+') { + tokadd(c); + c = nextc(); + } + if (c == '0') { + int start = toklen(); + c = nextc(); + if (c == 'x' || c == 'X') { + /* hexadecimal */ + c = nextc(); + if (c != -1 && ISXDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISXDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse)); + return tINTEGER; + } + if (c == 'b' || c == 'B') { + /* binary */ + c = nextc(); + if (c == '0' || c == '1') { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c != '0' && c != '1') break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse)); + return tINTEGER; + } + if (c == 'd' || c == 'D') { + /* decimal */ + c = nextc(); + if (c != -1 && ISDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + if (c == '_') { + /* 0_0 */ + goto octal_number; + } + if (c == 'o' || c == 'O') { + /* prefixed octal */ + c = nextc(); + if (c == -1 || c == '_' || !ISDIGIT(c)) { + yyerror("numeric literal without digits"); + } + } + if (c >= '0' && c <= '7') { + /* octal */ + octal_number: + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c < '0' || c > '9') break; + if (c > '7') goto invalid_octal; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + if (toklen() > start) { + pushback(c); + tokfix(); + if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse)); + return tINTEGER; + } + if (nondigit) { + pushback(c); + goto trailing_uc; + } + } + if (c > '7' && c <= '9') { + invalid_octal: + yyerror("Invalid octal digit"); + } + else if (c == '.' || c == 'e' || c == 'E') { + tokadd('0'); + } + else { + pushback(c); + set_yylval_literal(INT2FIX(0)); + return tINTEGER; + } + } + + for (;;) { + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + nondigit = 0; + tokadd(c); + break; + + case '.': + if (nondigit) goto trailing_uc; + if (seen_point || seen_e) { + goto decode_num; + } + else { + int c0 = nextc(); + if (c == -1 || !ISDIGIT(c0)) { + pushback(c0); + goto decode_num; + } + c = c0; + } + tokadd('.'); + tokadd(c); + is_float++; + seen_point++; + nondigit = 0; + break; + + case 'e': + case 'E': + if (nondigit) { + pushback(c); + c = nondigit; + goto decode_num; + } + if (seen_e) { + goto decode_num; + } + tokadd(c); + seen_e++; + is_float++; + nondigit = c; + c = nextc(); + if (c != '-' && c != '+') continue; + tokadd(c); + nondigit = c; + break; + + case '_': /* `_' in number just ignored */ + if (nondigit) goto decode_num; + nondigit = c; + break; + + default: + goto decode_num; + } + c = nextc(); + } + + decode_num: + pushback(c); + tokfix(); + if (nondigit) { + char tmp[30]; + trailing_uc: + sprintf(tmp, "trailing `%c' in number", nondigit); + yyerror(tmp); + } + if (is_float) { + double d = strtod(tok(), 0); + if (errno == ERANGE) { + rb_warningS("Float %s out of range", tok()); + errno = 0; + } + set_yylval_literal(DBL2NUM(d)); + return tFLOAT; + } + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + + case ')': + case ']': + paren_nest--; + case '}': + COND_LEXPOP(); + CMDARG_LEXPOP(); + if (c == ')') + lex_state = EXPR_END; + else + lex_state = EXPR_ENDARG; + return c; + + case ':': + c = nextc(); + if (c == ':') { + if (IS_BEG() || + lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) { + lex_state = EXPR_BEG; + return tCOLON3; + } + lex_state = EXPR_DOT; + return tCOLON2; + } + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || (c != -1 && ISSPACE(c))) { + pushback(c); + lex_state = EXPR_BEG; + return ':'; + } + switch (c) { + case '\'': + lex_strterm = NEW_STRTERM(str_ssym, c, 0); + break; + case '"': + lex_strterm = NEW_STRTERM(str_dsym, c, 0); + break; + default: + pushback(c); + break; + } + lex_state = EXPR_FNAME; + return tSYMBEG; + + case '/': + if (IS_BEG()) { + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + if ((c = nextc()) == '=') { + set_yylval_id('/'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen) { + if (!ISSPACE(c)) { + arg_ambiguous(); + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return '/'; + + case '^': + if ((c = nextc()) == '=') { + set_yylval_id('^'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '^'; + + case ';': + lex_state = EXPR_BEG; + command_start = Qtrue; + return ';'; + + case ',': + lex_state = EXPR_BEG; + return ','; + + case '~': + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + if ((c = nextc()) != '@') { + pushback(c); + } + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + return '~'; + + case '(': + if (IS_BEG()) { + c = tLPAREN; + } + else if (space_seen) { + if (IS_ARG()) { + c = tLPAREN_ARG; + } + } + paren_nest++; + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + return c; + + case '[': + paren_nest++; + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if ((c = nextc()) == ']') { + if ((c = nextc()) == '=') { + return tASET; + } + pushback(c); + return tAREF; + } + pushback(c); + return '['; + } + else if (IS_BEG()) { + c = tLBRACK; + } + else if (IS_ARG() && space_seen) { + c = tLBRACK; + } + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + return c; + + case '{': + if (lpar_beg && lpar_beg == paren_nest) { + lex_state = EXPR_BEG; + lpar_beg = 0; + --paren_nest; + return tLAMBEG; + } + if (IS_ARG() || lex_state == EXPR_END) + c = '{'; /* block (primary) */ + else if (lex_state == EXPR_ENDARG) + c = tLBRACE_ARG; /* block (expr) */ + else + c = tLBRACE; /* hash */ + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + if (c != tLBRACE) command_start = Qtrue; + return c; + + case '\\': + c = nextc(); + if (c == '\n') { + space_seen = 1; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; /* skip \\n */ + } + pushback(c); + return '\\'; + + case '%': + if (IS_BEG()) { + int term; + int paren; + + c = nextc(); + quotation: + if (c == -1 || !ISALNUM(c)) { + term = c; + c = 'Q'; + } + else { + term = nextc(); + if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { + yyerror("unknown type of %string"); + return 0; + } + } + if (c == -1 || term == -1) { + compile_error(PARSER_ARG "unterminated quoted string meets end of file"); + return 0; + } + paren = term; + if (term == '(') term = ')'; + else if (term == '[') term = ']'; + else if (term == '{') term = '}'; + else if (term == '<') term = '>'; + else paren = 0; + + switch (c) { + case 'Q': + lex_strterm = NEW_STRTERM(str_dquote, term, paren); + return tSTRING_BEG; + + case 'q': + lex_strterm = NEW_STRTERM(str_squote, term, paren); + return tSTRING_BEG; + + case 'W': + lex_strterm = NEW_STRTERM(str_dword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tWORDS_BEG; + + case 'w': + lex_strterm = NEW_STRTERM(str_sword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tQWORDS_BEG; + + case 'x': + lex_strterm = NEW_STRTERM(str_xquote, term, paren); + return tXSTRING_BEG; + + case 'r': + lex_strterm = NEW_STRTERM(str_regexp, term, paren); + return tREGEXP_BEG; + + case 's': + lex_strterm = NEW_STRTERM(str_ssym, term, paren); + lex_state = EXPR_FNAME; + return tSYMBEG; + + default: + yyerror("unknown type of %string"); + return 0; + } + } + if ((c = nextc()) == '=') { + set_yylval_id('%'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_ARG() && space_seen && !ISSPACE(c)) { + goto quotation; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '%'; + + case '$': + last_state = lex_state; + lex_state = EXPR_END; + newtok(); + c = nextc(); + switch (c) { + case '_': /* $_: last read line string */ + c = nextc(); + if (parser_is_identchar()) { + tokadd('$'); + tokadd('_'); + break; + } + pushback(c); + c = '_'; + /* fall through */ + case '~': /* $~: match-data */ + case '*': /* $*: argv */ + case '$': /* $$: pid */ + case '?': /* $?: last status */ + case '!': /* $!: error string */ + case '@': /* $@: error position */ + case '/': /* $/: input record separator */ + case '\\': /* $\: output record separator */ + case ';': /* $;: field separator */ + case ',': /* $,: output field separator */ + case '.': /* $.: last read line number */ + case '=': /* $=: ignorecase */ + case ':': /* $:: load path */ + case '<': /* $<: reading filename */ + case '>': /* $>: default output handle */ + case '\"': /* $": already loaded files */ + tokadd('$'); + tokadd(c); + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '-': + tokadd('$'); + tokadd(c); + c = nextc(); + if (parser_is_identchar()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else { + pushback(c); + } + gvar: + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '&': /* $&: last match */ + case '`': /* $`: string before last match */ + case '\'': /* $': string after last match */ + case '+': /* $+: string matches last paren. */ + if (last_state == EXPR_FNAME) { + tokadd('$'); + tokadd(c); + goto gvar; + } + set_yylval_node(NEW_BACK_REF(c)); + return tBACK_REF; + + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': case '8': case '9': + tokadd('$'); + do { + tokadd(c); + c = nextc(); + } while (c != -1 && ISDIGIT(c)); + pushback(c); + if (last_state == EXPR_FNAME) goto gvar; + tokfix(); + set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); + return tNTH_REF; + + default: + if (!parser_is_identchar()) { + pushback(c); + return '$'; + } + case '0': + tokadd('$'); + } + break; + + case '@': + c = nextc(); + newtok(); + tokadd('@'); + if (c == '@') { + tokadd('@'); + c = nextc(); + } + if (c != -1 && ISDIGIT(c)) { + if (tokidx == 1) { + compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); + } + else { + compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); + } + return 0; + } + if (!parser_is_identchar()) { + pushback(c); + return '@'; + } + break; + + case '_': + if (was_bol() && whole_match_p("__END__", 7, 0)) { + ruby__end__seen = 1; + parser->eofp = Qtrue; +#ifndef RIPPER + return -1; +#else + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, k__END__); + return 0; +#endif + } + newtok(); + break; + + default: + if (!parser_is_identchar()) { + rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); + goto retry; + } + + newtok(); + break; + } + + mb = ENC_CODERANGE_7BIT; + do { + if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; + if (tokadd_mbchar(c) == -1) return 0; + c = nextc(); + } while (parser_is_identchar()); + switch (tok()[0]) { + case '@': case '$': + pushback(c); + break; + default: + if ((c == '!' || c == '?') && !peek('=')) { + tokadd(c); + } + else { + pushback(c); + } + } + tokfix(); + + { + int result = 0; + + last_state = lex_state; + switch (tok()[0]) { + case '$': + lex_state = EXPR_END; + result = tGVAR; + break; + case '@': + lex_state = EXPR_END; + if (tok()[1] == '@') + result = tCVAR; + else + result = tIVAR; + break; + + default: + if (toklast() == '!' || toklast() == '?') { + result = tFID; + } + else { + if (lex_state == EXPR_FNAME) { + if ((c = nextc()) == '=' && !peek('~') && !peek('>') && + (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) { + result = tIDENTIFIER; + tokadd(c); + tokfix(); + } + else { + pushback(c); + } + } + if (result == 0 && ISUPPER(tok()[0])) { + result = tCONSTANT; + } + else { + result = tIDENTIFIER; + } + } + + if ((lex_state == EXPR_BEG && !cmd_state) || + lex_state == EXPR_ARG || + lex_state == EXPR_CMDARG) { + if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { + lex_state = EXPR_BEG; + nextc(); + set_yylval_id(TOK_INTERN(!ENC_SINGLE(mb))); + return tLABEL; + } + } + if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { + const struct kwtable *kw; + + /* See if it is a reserved word. */ + kw = rb_reserved_word(tok(), toklen()); + if (kw) { + enum lex_state_e state = lex_state; + lex_state = kw->state; + if (state == EXPR_FNAME) { + set_yylval_id(rb_intern(kw->name)); + return kw->id[0]; + } + if (kw->id[0] == keyword_do) { + command_start = Qtrue; + if (lpar_beg && lpar_beg == paren_nest) { + lpar_beg = 0; + --paren_nest; + return keyword_do_LAMBDA; + } + if (COND_P()) return keyword_do_cond; + if (CMDARG_P() && state != EXPR_CMDARG) + return keyword_do_block; + if (state == EXPR_ENDARG || state == EXPR_BEG) + return keyword_do_block; + return keyword_do; + } + if (state == EXPR_BEG || state == EXPR_VALUE) + return kw->id[0]; + else { + if (kw->id[0] != kw->id[1]) + lex_state = EXPR_BEG; + return kw->id[1]; + } + } + } + + if (IS_BEG() || + lex_state == EXPR_DOT || + IS_ARG()) { + if (cmd_state) { + lex_state = EXPR_CMDARG; + } + else { + lex_state = EXPR_ARG; + } + } + else { + lex_state = EXPR_END; + } + } + { + ID ident = TOK_INTERN(!ENC_SINGLE(mb)); + + set_yylval_id(ident); + if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { + lex_state = EXPR_END; + } + } + return result; + } +} + +#if YYPURE +static int +yylex(void *lval, void *p) +#else +yylex(void *p) +#endif +{ + struct parser_params *parser = (struct parser_params*)p; + int t; + +#if YYPURE + parser->parser_yylval = lval; + parser->parser_yylval->val = Qundef; +#endif + t = parser_yylex(parser); +#ifdef RIPPER + if (!NIL_P(parser->delayed)) { + ripper_dispatch_delayed_token(parser, t); + return t; + } + if (t != 0) + ripper_dispatch_scan_event(parser, t); +#endif + + return t; +} + +#ifndef RIPPER +static NODE* +node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) +{ + NODE *n = (rb_node_newnode)(type, a0, a1, a2); + nd_set_line(n, ruby_sourceline); + return n; +} + +enum node_type +nodetype(NODE *node) /* for debug */ +{ + return (enum node_type)nd_type(node); +} + +int +nodeline(NODE *node) +{ + return nd_line(node); +} + +static NODE* +newline_node(NODE *node) +{ + if (node) { + node = remove_begin(node); + node->flags |= NODE_FL_NEWLINE; + } + return node; +} + +static void +fixpos(NODE *node, NODE *orig) +{ + if (!node) return; + if (!orig) return; + if (orig == (NODE*)1) return; + nd_set_line(node, nd_line(orig)); +} + +static void +parser_warning(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warning(node, mesg) parser_warning(parser, node, mesg) + +static void +parser_warn(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warn(node, mesg) parser_warn(parser, node, mesg) + +static NODE* +block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *end, *h = head, *nd; + + if (tail == 0) return head; + + if (h == 0) return tail; + switch (nd_type(h)) { + case NODE_LIT: + case NODE_STR: + case NODE_SELF: + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + parser_warning(h, "unused literal ignored"); + return tail; + default: + h = end = NEW_BLOCK(head); + end->nd_end = end; + fixpos(end, head); + head = end; + break; + case NODE_BLOCK: + end = h->nd_end; + break; + } + + nd = end->nd_head; + switch (nd_type(nd)) { + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (RTEST(ruby_verbose)) { + parser_warning(nd, "statement not reached"); + } + break; + + default: + break; + } + + if (nd_type(tail) != NODE_BLOCK) { + tail = NEW_BLOCK(tail); + tail->nd_end = tail; + } + end->nd_next = tail; + h->nd_end = tail->nd_end; + return head; +} + +/* append item to the list */ +static NODE* +list_append_gen(struct parser_params *parser, NODE *list, NODE *item) +{ + NODE *last; + + if (list == 0) return NEW_LIST(item); + if (list->nd_next) { + last = list->nd_next->nd_end; + } + else { + last = list; + } + + list->nd_alen += 1; + last->nd_next = NEW_LIST(item); + list->nd_next->nd_end = last->nd_next; + return list; +} + +/* concat two lists */ +static NODE* +list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *last; + + if (head->nd_next) { + last = head->nd_next->nd_end; + } + else { + last = head; + } + + head->nd_alen += tail->nd_alen; + last->nd_next = tail; + if (tail->nd_next) { + head->nd_next->nd_end = tail->nd_next->nd_end; + } + else { + head->nd_next->nd_end = tail; + } + + return head; +} + +static int +literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) +{ + if (!rb_enc_compatible(head, tail)) { + compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", + rb_enc_name(rb_enc_get(head)), + rb_enc_name(rb_enc_get(tail))); + rb_str_resize(head, 0); + rb_str_resize(tail, 0); + return 0; + } + rb_str_buf_append(head, tail); + return 1; +} + +/* concat two string literals */ +static NODE * +literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + enum node_type htype; + + if (!head) return tail; + if (!tail) return head; + + htype = nd_type(head); + if (htype == NODE_EVSTR) { + NODE *node = NEW_DSTR(STR_NEW0()); + head = list_append(node, head); + } + switch (nd_type(tail)) { + case NODE_STR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { + error: + rb_gc_force_recycle((VALUE)head); + rb_gc_force_recycle((VALUE)tail); + return 0; + } + rb_gc_force_recycle((VALUE)tail); + } + else { + list_append(head, tail); + } + break; + + case NODE_DSTR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) + goto error; + tail->nd_lit = head->nd_lit; + rb_gc_force_recycle((VALUE)head); + head = tail; + } + else { + nd_set_type(tail, NODE_ARRAY); + tail->nd_head = NEW_STR(tail->nd_lit); + list_concat(head, tail); + } + break; + + case NODE_EVSTR: + if (htype == NODE_STR) { + nd_set_type(head, NODE_DSTR); + head->nd_alen = 1; + } + list_append(head, tail); + break; + } + return head; +} + +static NODE * +evstr2dstr_gen(struct parser_params *parser, NODE *node) +{ + if (nd_type(node) == NODE_EVSTR) { + node = list_append(NEW_DSTR(STR_NEW0()), node); + } + return node; +} + +static NODE * +new_evstr_gen(struct parser_params *parser, NODE *node) +{ + NODE *head = node; + + if (node) { + switch (nd_type(node)) { + case NODE_STR: case NODE_DSTR: case NODE_EVSTR: + return node; + } + } + return NEW_EVSTR(head); +} + +static NODE * +call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) +{ + value_expr(recv); + value_expr(arg1); + return NEW_CALL(recv, id, NEW_LIST(arg1)); +} + +static NODE * +call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) +{ + value_expr(recv); + return NEW_CALL(recv, id, 0); +} + +static NODE* +match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + value_expr(node1); + value_expr(node2); + if (node1) { + switch (nd_type(node1)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH2(node1, node2); + + case NODE_LIT: + if (TYPE(node1->nd_lit) == T_REGEXP) { + return NEW_MATCH2(node1, node2); + } + } + } + + if (node2) { + switch (nd_type(node2)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH3(node2, node1); + + case NODE_LIT: + if (TYPE(node2->nd_lit) == T_REGEXP) { + return NEW_MATCH3(node2, node1); + } + } + } + + return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); +} + +static NODE* +gettable_gen(struct parser_params *parser, ID id) +{ + if (id == keyword_self) { + return NEW_SELF(); + } + else if (id == keyword_nil) { + return NEW_NIL(); + } + else if (id == keyword_true) { + return NEW_TRUE(); + } + else if (id == keyword_false) { + return NEW_FALSE(); + } + else if (id == keyword__FILE__) { + return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), + rb_filesystem_encoding())); + } + else if (id == keyword__LINE__) { + return NEW_LIT(INT2FIX(ruby_sourceline)); + } + else if (id == keyword__ENCODING__) { + return NEW_LIT(rb_enc_from_encoding(parser->enc)); + } + else if (is_local_id(id)) { + if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); + if (local_id(id)) return NEW_LVAR(id); + /* method call without arguments */ + return NEW_VCALL(id); + } + else if (is_global_id(id)) { + return NEW_GVAR(id); + } + else if (is_instance_id(id)) { + return NEW_IVAR(id); + } + else if (is_const_id(id)) { + return NEW_CONST(id); + } + else if (is_class_id(id)) { + return NEW_CVAR(id); + } + compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); + return 0; +} + +static NODE* +assignable_gen(struct parser_params *parser, ID id, NODE *val) +{ + if (!id) return 0; + if (id == keyword_self) { + yyerror("Can't change the value of self"); + } + else if (id == keyword_nil) { + yyerror("Can't assign to nil"); + } + else if (id == keyword_true) { + yyerror("Can't assign to true"); + } + else if (id == keyword_false) { + yyerror("Can't assign to false"); + } + else if (id == keyword__FILE__) { + yyerror("Can't assign to __FILE__"); + } + else if (id == keyword__LINE__) { + yyerror("Can't assign to __LINE__"); + } + else if (id == keyword__ENCODING__) { + yyerror("Can't assign to __ENCODING__"); + } + else if (is_local_id(id)) { + if (dyna_in_block()) { + if (dvar_curr(id)) { + return NEW_DASGN_CURR(id, val); + } + else if (dvar_defined(id)) { + return NEW_DASGN(id, val); + } + else if (local_id(id)) { + return NEW_LASGN(id, val); + } + else{ + dyna_var(id); + return NEW_DASGN_CURR(id, val); + } + } + else { + if (!local_id(id)) { + local_var(id); + } + return NEW_LASGN(id, val); + } + } + else if (is_global_id(id)) { + return NEW_GASGN(id, val); + } + else if (is_instance_id(id)) { + return NEW_IASGN(id, val); + } + else if (is_const_id(id)) { + if (in_def || in_single) + yyerror("dynamic constant assignment"); + return NEW_CDECL(id, val, 0); + } + else if (is_class_id(id)) { + return NEW_CVASGN(id, val); + } + else { + compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); + } + return 0; +} + +static void +shadowing_lvar_gen(struct parser_params *parser, ID name) +{ + ID uscore; + + CONST_ID(uscore, "_"); + if (uscore == name) return; + if (dyna_in_block()) { + if (dvar_curr(name)) { + yyerror("duplicated argument name"); + } + else if (dvar_defined(name) || local_id(name)) { + rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); + vtable_add(lvtbl->vars, name); + } + } + else { + if (local_id(name)) { + yyerror("duplicated argument name"); + } + } +} + +static void +new_bv_gen(struct parser_params *parser, ID name) +{ + if (!name) return; + if (!is_local_id(name)) { + compile_error(PARSER_ARG "invalid local variable - %s", + rb_id2name(name)); + return; + } + shadowing_lvar(name); + dyna_var(name); +} + +static NODE * +aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, tASET, idx); +} + +static void +block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "both block arg and actual block given"); + } +} + +ID +rb_id_attrset(ID id) +{ + id &= ~ID_SCOPE_MASK; + id |= ID_ATTRSET; + return id; +} + +static NODE * +attrset_gen(struct parser_params *parser, NODE *recv, ID id) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); +} + +static void +rb_backref_error_gen(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_NTH_REF: + compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); + break; + case NODE_BACK_REF: + compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); + break; + } +} + +static NODE * +arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node2) return node1; + switch (nd_type(node1)) { + case NODE_BLOCK_PASS: + node1->nd_iter = arg_concat(node1->nd_iter, node2); + return node1; + case NODE_ARGSPUSH: + if (nd_type(node2) != NODE_ARRAY) break; + node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + case NODE_ARGSCAT: + if (nd_type(node2) != NODE_ARRAY || + nd_type(node1->nd_body) != NODE_ARRAY) break; + node1->nd_body = list_concat(node1->nd_body, node2); + return node1; + } + return NEW_ARGSCAT(node1, node2); +} + +static NODE * +arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node1) return NEW_LIST(node2); + switch (nd_type(node1)) { + case NODE_ARRAY: + return list_append(node1, node2); + case NODE_BLOCK_PASS: + node1->nd_head = arg_append(node1->nd_head, node2); + return node1; + case NODE_ARGSPUSH: + node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + } + return NEW_ARGSPUSH(node1, node2); +} + +static NODE * +splat_array(NODE* node) +{ + if (nd_type(node) == NODE_SPLAT) node = node->nd_head; + if (nd_type(node) == NODE_ARRAY) return node; + return 0; +} + +static NODE * +node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) +{ + if (!lhs) return 0; + + switch (nd_type(lhs)) { + case NODE_GASGN: + case NODE_IASGN: + case NODE_IASGN2: + case NODE_LASGN: + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_MASGN: + case NODE_CDECL: + case NODE_CVASGN: + lhs->nd_value = rhs; + break; + + case NODE_ATTRASGN: + case NODE_CALL: + lhs->nd_args = arg_append(lhs->nd_args, rhs); + break; + + default: + /* should not happen */ + break; + } + + return lhs; +} + +static int +value_expr_gen(struct parser_params *parser, NODE *node) +{ + int cond = 0; + + if (!node) { + rb_warning0("empty expression"); + } + while (node) { + switch (nd_type(node)) { + case NODE_DEFN: + case NODE_DEFS: + parser_warning(node, "void value expression"); + return Qfalse; + + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (!cond) yyerror("void value expression"); + /* or "control never reach"? */ + return Qfalse; + + case NODE_BLOCK: + while (node->nd_next) { + node = node->nd_next; + } + node = node->nd_head; + break; + + case NODE_BEGIN: + node = node->nd_body; + break; + + case NODE_IF: + if (!node->nd_body) { + node = node->nd_else; + break; + } + else if (!node->nd_else) { + node = node->nd_body; + break; + } + if (!value_expr(node->nd_body)) return Qfalse; + node = node->nd_else; + break; + + case NODE_AND: + case NODE_OR: + cond = 1; + node = node->nd_2nd; + break; + + default: + return Qtrue; + } + } + + return Qtrue; +} + +static void +void_expr_gen(struct parser_params *parser, NODE *node) +{ + const char *useless = 0; + + if (!RTEST(ruby_verbose)) return; + + if (!node) return; + switch (nd_type(node)) { + case NODE_CALL: + switch (node->nd_mid) { + case '+': + case '-': + case '*': + case '/': + case '%': + case tPOW: + case tUPLUS: + case tUMINUS: + case '|': + case '^': + case '&': + case tCMP: + case '>': + case tGEQ: + case '<': + case tLEQ: + case tEQ: + case tNEQ: + useless = rb_id2name(node->nd_mid); + break; + } + break; + + case NODE_LVAR: + case NODE_DVAR: + case NODE_GVAR: + case NODE_IVAR: + case NODE_CVAR: + case NODE_NTH_REF: + case NODE_BACK_REF: + useless = "a variable"; + break; + case NODE_CONST: + useless = "a constant"; + break; + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + useless = "a literal"; + break; + case NODE_COLON2: + case NODE_COLON3: + useless = "::"; + break; + case NODE_DOT2: + useless = ".."; + break; + case NODE_DOT3: + useless = "..."; + break; + case NODE_SELF: + useless = "self"; + break; + case NODE_NIL: + useless = "nil"; + break; + case NODE_TRUE: + useless = "true"; + break; + case NODE_FALSE: + useless = "false"; + break; + case NODE_DEFINED: + useless = "defined?"; + break; + } + + if (useless) { + int line = ruby_sourceline; + + ruby_sourceline = nd_line(node); + rb_warnS("useless use of %s in void context", useless); + ruby_sourceline = line; + } +} + +static void +void_stmts_gen(struct parser_params *parser, NODE *node) +{ + if (!RTEST(ruby_verbose)) return; + if (!node) return; + if (nd_type(node) != NODE_BLOCK) return; + + for (;;) { + if (!node->nd_next) return; + void_expr0(node->nd_head); + node = node->nd_next; + } +} + +static NODE * +remove_begin(NODE *node) +{ + NODE **n = &node, *n1 = node; + while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { + *n = n1 = n1->nd_body; + } + return node; +} + +static void +reduce_nodes_gen(struct parser_params *parser, NODE **body) +{ + NODE *node = *body; + + if (!node) { + *body = NEW_NIL(); + return; + } +#define subnodes(n1, n2) \ + ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ + (!node->n2) ? (body = &node->n1, 1) : \ + (reduce_nodes(&node->n1), body = &node->n2, 1)) + + while (node) { + switch (nd_type(node)) { + end: + case NODE_NIL: + *body = 0; + return; + case NODE_RETURN: + *body = node = node->nd_stts; + continue; + case NODE_BEGIN: + *body = node = node->nd_body; + continue; + case NODE_BLOCK: + body = &node->nd_end->nd_head; + break; + case NODE_IF: + if (subnodes(nd_body, nd_else)) break; + return; + case NODE_CASE: + body = &node->nd_body; + break; + case NODE_WHEN: + if (!subnodes(nd_body, nd_next)) goto end; + break; + case NODE_ENSURE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + case NODE_RESCUE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + default: + return; + } + node = *body; + } + +#undef subnodes +} + +static int +assign_in_cond(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_MASGN: + yyerror("multiple assignment in conditional"); + return 1; + + case NODE_LASGN: + case NODE_DASGN: + case NODE_GASGN: + case NODE_IASGN: + break; + + default: + return 0; + } + + switch (nd_type(node->nd_value)) { + case NODE_LIT: + case NODE_STR: + case NODE_NIL: + case NODE_TRUE: + case NODE_FALSE: + /* reports always */ + parser_warn(node->nd_value, "found = in conditional, should be =="); + return 1; + + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_EVSTR: + case NODE_DREGX: + default: + break; + } + return 1; +} + +static void +warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warn(node, str); +} + +static void +warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warning(node, str); +} + +static void +fixup_nodes(NODE **rootnode) +{ + NODE *node, *next, *head; + + for (node = *rootnode; node; node = next) { + enum node_type type; + VALUE val; + + next = node->nd_next; + head = node->nd_head; + rb_gc_force_recycle((VALUE)node); + *rootnode = next; + switch (type = nd_type(head)) { + case NODE_DOT2: + case NODE_DOT3: + val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, + type == NODE_DOT3 ? Qtrue : Qfalse); + rb_gc_force_recycle((VALUE)head->nd_beg); + rb_gc_force_recycle((VALUE)head->nd_end); + nd_set_type(head, NODE_LIT); + head->nd_lit = val; + break; + default: + break; + } + } +} + +static NODE *cond0(struct parser_params*,NODE*); + +static NODE* +range_op(struct parser_params *parser, NODE *node) +{ + enum node_type type; + + if (node == 0) return 0; + + type = nd_type(node); + value_expr(node); + if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { + warn_unless_e_option(parser, node, "integer literal in conditional range"); + return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); + } + return cond0(parser, node); +} + +static int +literal_node(NODE *node) +{ + if (!node) return 1; /* same as NODE_NIL */ + switch (nd_type(node)) { + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_EVSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + case NODE_DSYM: + return 2; + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + return 1; + } + return 0; +} + +static NODE* +cond0(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + assign_in_cond(parser, node); + + switch (nd_type(node)) { + case NODE_DSTR: + case NODE_EVSTR: + case NODE_STR: + rb_warn0("string literal in condition"); + break; + + case NODE_DREGX: + case NODE_DREGX_ONCE: + warning_unless_e_option(parser, node, "regex literal in condition"); + return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); + + case NODE_AND: + case NODE_OR: + node->nd_1st = cond0(parser, node->nd_1st); + node->nd_2nd = cond0(parser, node->nd_2nd); + break; + + case NODE_DOT2: + case NODE_DOT3: + node->nd_beg = range_op(parser, node->nd_beg); + node->nd_end = range_op(parser, node->nd_end); + if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); + else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); + if (!e_option_supplied(parser)) { + int b = literal_node(node->nd_beg); + int e = literal_node(node->nd_end); + if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { + parser_warn(node, "range literal in condition"); + } + } + break; + + case NODE_DSYM: + parser_warning(node, "literal in condition"); + break; + + case NODE_LIT: + if (TYPE(node->nd_lit) == T_REGEXP) { + warn_unless_e_option(parser, node, "regex literal in condition"); + nd_set_type(node, NODE_MATCH); + } + else { + parser_warning(node, "literal in condition"); + } + default: + break; + } + return node; +} + +static NODE* +cond_gen(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + return cond0(parser, node); +} + +static NODE* +logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) +{ + value_expr(left); + if (left && nd_type(left) == type) { + NODE *node = left, *second; + while ((second = node->nd_2nd) != 0 && nd_type(second) == type) { + node = second; + } + node->nd_2nd = NEW_NODE(type, second, right, 0); + return left; + } + return NEW_NODE(type, left, right, 0); +} + +static void +no_blockarg(struct parser_params *parser, NODE *node) +{ + if (node && nd_type(node) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "block argument should not be given"); + } +} + +static NODE * +ret_args_gen(struct parser_params *parser, NODE *node) +{ + if (node) { + no_blockarg(parser, node); + if (nd_type(node) == NODE_ARRAY) { + if (node->nd_next == 0) { + node = node->nd_head; + } + else { + nd_set_type(node, NODE_VALUES); + } + } + } + return node; +} + +static NODE * +new_yield_gen(struct parser_params *parser, NODE *node) +{ + long state = Qtrue; + + if (node) { + no_blockarg(parser, node); + if (node && nd_type(node) == NODE_SPLAT) { + state = Qtrue; + } + } + else { + state = Qfalse; + } + return NEW_YIELD(node, state); +} + +static NODE* +negate_lit(NODE *node) +{ + switch (TYPE(node->nd_lit)) { + case T_FIXNUM: + node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); + break; + case T_BIGNUM: + node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); + break; + case T_FLOAT: + RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); + break; + default: + break; + } + return node; +} + +static NODE * +arg_blk_pass(NODE *node1, NODE *node2) +{ + if (node2) { + node2->nd_head = node1; + return node2; + } + return node1; +} + +static NODE* +new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) +{ + int saved_line = ruby_sourceline; + NODE *node; + NODE *i1, *i2 = 0; + + node = NEW_ARGS(m ? m->nd_plen : 0, o); + i1 = m ? m->nd_next : 0; + node->nd_next = NEW_ARGS_AUX(r, b); + + if (p) { + i2 = p->nd_next; + node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); + } + else if (i1) { + node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); + } + if (i1 || i2) { + node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); + } + ruby_sourceline = saved_line; + return node; +} + +static void +local_push_gen(struct parser_params *parser, int inherit_dvars) +{ + struct local_vars *local; + + local = ALLOC(struct local_vars); + local->prev = lvtbl; + local->args = vtable_alloc(0); + local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); + lvtbl = local; +} + +static void +local_pop_gen(struct parser_params *parser) +{ + struct local_vars *local = lvtbl->prev; + vtable_free(lvtbl->args); + vtable_free(lvtbl->vars); + xfree(lvtbl); + lvtbl = local; +} + +static ID* +vtable_tblcpy(ID *buf, const struct vtable *src) +{ + int i, cnt = vtable_size(src); + + if (cnt > 0) { + buf[0] = cnt; + for (i = 0; i < cnt; i++) { + buf[i] = src->tbl[i]; + } + return buf; + } + return 0; +} + +static ID* +local_tbl_gen(struct parser_params *parser) +{ + int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); + ID *buf; + + if (cnt <= 0) return 0; + buf = ALLOC_N(ID, cnt + 1); + vtable_tblcpy(buf+1, lvtbl->args); + vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); + buf[0] = cnt; + return buf; +} + +static int +arg_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->args, id); + return vtable_size(lvtbl->args) - 1; +} + +static int +local_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->vars, id); + return vtable_size(lvtbl->vars) - 1; +} + +static int +local_id_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + vars = lvtbl->vars; + args = lvtbl->args; + + while (vars && POINTER_P(vars->prev)) { + vars = vars->prev; + args = args->prev; + } + + if (vars && vars->prev == DVARS_INHERIT) { + return rb_local_defined(id); + } + else { + return (vtable_included(args, id) || + vtable_included(vars, id)); + } +} + +static void +dyna_push_gen(struct parser_params *parser) +{ + lvtbl->args = vtable_alloc(lvtbl->args); + lvtbl->vars = vtable_alloc(lvtbl->vars); +} + +static void +dyna_pop_gen(struct parser_params *parser) +{ + struct vtable *tmp; + + tmp = lvtbl->args; + lvtbl->args = lvtbl->args->prev; + vtable_free(tmp); + tmp = lvtbl->vars; + lvtbl->vars = lvtbl->vars->prev; + vtable_free(tmp); +} + +static int +dyna_in_block_gen(struct parser_params *parser) +{ + return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; +} + +static int +dvar_defined_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + args = lvtbl->args; + vars = lvtbl->vars; + + while (POINTER_P(vars)) { + if (vtable_included(args, id)) { + return 1; + } + if (vtable_included(vars, id)) { + return 1; + } + args = args->prev; + vars = vars->prev; + } + + if (vars == DVARS_INHERIT) { + return rb_dvar_defined(id); + } + + return 0; +} + +static int +dvar_curr_gen(struct parser_params *parser, ID id) +{ + return (vtable_included(lvtbl->args, id) || + vtable_included(lvtbl->vars, id)); +} + +VALUE rb_reg_compile(VALUE str, int options); +VALUE rb_reg_check_preprocess(VALUE); + +static void +reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) +{ + int c = RE_OPTION_ENCODING_IDX(options); + + if (c) { + int opt, idx; + rb_char_to_option_kcode(c, &opt, &idx); + if (idx != ENCODING_GET(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + goto error; + } + ENCODING_SET(str, idx); + } + else if (RE_OPTION_ENCODING_NONE(options)) { + if (!ENCODING_IS_ASCII8BIT(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + c = 'n'; + goto error; + } + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + else if (parser->enc == rb_usascii_encoding()) { + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + /* raise in re.c */ + rb_enc_associate(str, rb_usascii_encoding()); + } + else { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + return; + + error: + compile_error(PARSER_ARG + "regexp encoding option '%c' differs from source encoding '%s'", + c, rb_enc_name(rb_enc_get(str))); +} + +static void +reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE err; + reg_fragment_setenc_gen(parser, str, options); + err = rb_reg_check_preprocess(str); + if (err != Qnil) { + err = rb_obj_as_string(err); + compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); + RB_GC_GUARD(err); + } +} + +typedef struct { + struct parser_params* parser; + rb_encoding *enc; + NODE *succ_block; + NODE *fail_block; + int num; +} reg_named_capture_assign_t; + +static int +reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg0) +{ + reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; + struct parser_params* parser = arg->parser; + rb_encoding *enc = arg->enc; + int len = name_end - name; + const char *s = (const char *)name; + ID var; + + arg->num++; + + if (arg->succ_block == 0) { + arg->succ_block = NEW_BEGIN(0); + arg->fail_block = NEW_BEGIN(0); + } + + if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || + rb_reserved_word(s, len) || !rb_enc_symname2_p(s, len, enc)) { + return ST_CONTINUE; + } + var = rb_intern3(s, len, enc); + if (dvar_defined(var) || local_id(var)) { + rb_warningS("named capture conflicts a local variable - %s", + rb_id2name(var)); + } + arg->succ_block = block_append(arg->succ_block, + newline_node(node_assign(assignable(var,0), + NEW_CALL( + gettable(rb_intern("$~")), + idAREF, + NEW_LIST(NEW_LIT(ID2SYM(var)))) + ))); + arg->fail_block = block_append(arg->fail_block, + newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); + return ST_CONTINUE; +} + +static NODE * +reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) +{ + reg_named_capture_assign_t arg; + + arg.parser = parser; + arg.enc = rb_enc_get(regexp); + arg.succ_block = 0; + arg.fail_block = 0; + arg.num = 0; + onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); + + if (arg.num == 0) + return match; + + return + block_append( + newline_node(match), + NEW_IF(gettable(rb_intern("$~")), + block_append( + newline_node(arg.succ_block), + newline_node( + NEW_CALL( + gettable(rb_intern("$~")), + rb_intern("begin"), + NEW_LIST(NEW_LIT(INT2FIX(0)))))), + block_append( + newline_node(arg.fail_block), + newline_node( + NEW_LIT(Qnil))))); +} + +static VALUE +reg_compile_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE re; + VALUE err; + + reg_fragment_setenc(str, options); + err = rb_errinfo(); + re = rb_reg_compile(str, options & RE_OPTION_MASK); + if (NIL_P(re)) { + ID mesg = rb_intern("mesg"); + VALUE m = rb_attr_get(rb_errinfo(), mesg); + rb_set_errinfo(err); + if (!NIL_P(err)) { + rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); + } + else { + compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); + } + return Qnil; + } + return re; +} + +void +rb_gc_mark_parser(void) +{ +} + +NODE* +rb_parser_append_print(VALUE vparser, NODE *node) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + + node = block_append(node, + NEW_FCALL(rb_intern("print"), + NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +NODE * +rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + if (split) { + node = block_append(NEW_GASGN(rb_intern("$F"), + NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("split"), 0)), + node); + } + if (chop) { + node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("chop!"), 0), node); + } + + node = NEW_OPT_N(node); + + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +static const struct { + ID token; + const char *name; +} op_tbl[] = { + {tDOT2, ".."}, + {tDOT3, "..."}, + {'+', "+(binary)"}, + {'-', "-(binary)"}, + {tPOW, "**"}, + {tUPLUS, "+@"}, + {tUMINUS, "-@"}, + {tCMP, "<=>"}, + {tGEQ, ">="}, + {tLEQ, "<="}, + {tEQ, "=="}, + {tEQQ, "==="}, + {tNEQ, "!="}, + {tMATCH, "=~"}, + {tNMATCH, "!~"}, + {tAREF, "[]"}, + {tASET, "[]="}, + {tLSHFT, "<<"}, + {tRSHFT, ">>"}, + {tCOLON2, "::"}, +}; + +#define op_tbl_count (sizeof(op_tbl) / sizeof(op_tbl[0])) + +static struct symbols { + ID last_id; + st_table *sym_id; + st_table *id_str; + st_table *ivar2_id; + st_table *id_ivar2; + VALUE op_sym[tLAST_TOKEN]; +} global_symbols = {tLAST_ID}; + +static const struct st_hash_type symhash = { + rb_str_hash_cmp, + rb_str_hash, +}; + +struct ivar2_key { + ID id; + VALUE klass; +}; + +static int +ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) +{ + if (key1->id == key2->id && key1->klass == key2->klass) { + return 0; + } + return 1; +} + +static int +ivar2_hash(struct ivar2_key *key) +{ + return (key->id << 8) ^ (key->klass >> 2); +} + +static const struct st_hash_type ivar2_hash_type = { + ivar2_cmp, + ivar2_hash, +}; + +void +Init_sym(void) +{ + global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); + global_symbols.id_str = st_init_numtable_with_size(1000); + global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); + global_symbols.id_ivar2 = st_init_numtable_with_size(1000); + + Init_id(); +} + +void +rb_gc_mark_symbols(void) +{ + rb_mark_tbl(global_symbols.id_str); + rb_gc_mark_locations(global_symbols.op_sym, + global_symbols.op_sym + tLAST_TOKEN); +} + +static ID +internal_id_gen(struct parser_params *parser) +{ + ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); + id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; + return ID_INTERNAL | (id << ID_SCOPE_SHIFT); +} + +static int +is_special_global_name(const char *m, const char *e, rb_encoding *enc) +{ + int mb = 0; + + if (m >= e) return 0; + switch (*m) { + case '~': case '*': case '$': case '?': case '!': case '@': + case '/': case '\\': case ';': case ',': case '.': case '=': + case ':': case '<': case '>': case '\"': + case '&': case '`': case '\'': case '+': + case '0': + ++m; + break; + case '-': + ++m; + if (m < e && is_identchar(m, e, enc)) { + if (!ISASCII(*m)) mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + break; + default: + if (!rb_enc_isdigit(*m, enc)) return 0; + do { + if (!ISASCII(*m)) mb = 1; + ++m; + } while (rb_enc_isdigit(*m, enc)); + } + return m == e ? mb + 1 : 0; +} + +int +rb_symname_p(const char *name) +{ + return rb_enc_symname_p(name, rb_ascii8bit_encoding()); +} + +int +rb_enc_symname_p(const char *name, rb_encoding *enc) +{ + return rb_enc_symname2_p(name, strlen(name), enc); +} + +int +rb_enc_symname2_p(const char *name, int len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + int localid = Qfalse; + + if (!m) return Qfalse; + switch (*m) { + case '\0': + return Qfalse; + + case '$': + if (is_special_global_name(++m, e, enc)) return Qtrue; + goto id; + + case '@': + if (*++m == '@') ++m; + goto id; + + case '<': + switch (*++m) { + case '<': ++m; break; + case '=': if (*++m == '>') ++m; break; + default: break; + } + break; + + case '>': + switch (*++m) { + case '>': case '=': ++m; break; + } + break; + + case '=': + switch (*++m) { + case '~': ++m; break; + case '=': if (*++m == '=') ++m; break; + default: return Qfalse; + } + break; + + case '*': + if (*++m == '*') ++m; + break; + + case '+': case '-': + if (*++m == '@') ++m; + break; + + case '|': case '^': case '&': case '/': case '%': case '~': case '`': + ++m; + break; + + case '[': + if (*++m != ']') return Qfalse; + if (*++m == '=') ++m; + break; + + case '!': + switch (*++m) { + case '\0': return Qtrue; + case '=': case '~': ++m; break; + default: return Qfalse; + } + break; + + default: + localid = !rb_enc_isupper(*m, enc); + id: + if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) + return Qfalse; + while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); + if (localid) { + switch (*m) { + case '!': case '?': case '=': ++m; + } + } + break; + } + return *m ? Qfalse : Qtrue; +} + +static ID +register_symid(ID id, const char *name, long len, rb_encoding *enc) +{ + VALUE str = rb_enc_str_new(name, len, enc); + OBJ_FREEZE(str); + st_add_direct(global_symbols.sym_id, (st_data_t)str, id); + st_add_direct(global_symbols.id_str, id, (st_data_t)str); + return id; +} + +ID +rb_intern3(const char *name, long len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + unsigned char c; + VALUE str; + ID id; + int last; + int mb; + struct RString fake_str; + fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE; + fake_str.basic.klass = rb_cString; + fake_str.as.heap.len = len; + fake_str.as.heap.ptr = (char *)name; + fake_str.as.heap.aux.capa = len; + str = (VALUE)&fake_str; + rb_enc_associate(str, enc); + + if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) + return id; + + if (rb_cString && !rb_enc_asciicompat(enc)) { + id = ID_JUNK; + goto new_id; + } + last = len-1; + id = 0; + switch (*m) { + case '$': + id |= ID_GLOBAL; + if ((mb = is_special_global_name(++m, e, enc)) != 0) { + if (!--mb) enc = rb_ascii8bit_encoding(); + goto new_id; + } + break; + case '@': + if (m[1] == '@') { + m++; + id |= ID_CLASS; + } + else { + id |= ID_INSTANCE; + } + m++; + break; + default: + c = m[0]; + if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { + /* operators */ + int i; + + if (len == 1) { + id = c; + goto id_register; + } + for (i = 0; i < op_tbl_count; i++) { + if (*op_tbl[i].name == *m && + strcmp(op_tbl[i].name, m) == 0) { + id = op_tbl[i].token; + goto id_register; + } + } + } + + if (m[last] == '=') { + /* attribute assignment */ + id = rb_intern3(name, last, enc); + if (id > tLAST_TOKEN && !is_attrset_id(id)) { + enc = rb_enc_get(rb_id2str(id)); + id = rb_id_attrset(id); + goto id_register; + } + id = ID_ATTRSET; + } + else if (rb_enc_isupper(m[0], enc)) { + id = ID_CONST; + } + else { + id = ID_LOCAL; + } + break; + } + mb = 0; + if (!rb_enc_isdigit(*m, enc)) { + while (m <= name + last && is_identchar(m, e, enc)) { + if (ISASCII(*m)) { + m++; + } + else { + mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + } + } + if (m - name < len) id = ID_JUNK; + if (enc != rb_usascii_encoding()) { + /* + * this clause makes sense only when called from other than + * rb_intern_str() taking care of code-range. + */ + if (!mb) { + for (; m <= name + len; ++m) { + if (!ISASCII(*m)) goto mbstr; + } + enc = rb_usascii_encoding(); + } + mbstr:; + } + new_id: + id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; + id_register: + return register_symid(id, name, len, enc); +} + +ID +rb_intern2(const char *name, long len) +{ + return rb_intern3(name, len, rb_usascii_encoding()); +} + +#undef rb_intern +ID +rb_intern(const char *name) +{ + return rb_intern2(name, strlen(name)); +} + +ID +rb_intern_str(VALUE str) +{ + rb_encoding *enc; + ID id; + + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + enc = rb_usascii_encoding(); + } + else { + enc = rb_enc_get(str); + } + id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); + RB_GC_GUARD(str); + return id; +} + +VALUE +rb_id2str(ID id) +{ + st_data_t data; + + if (id < tLAST_TOKEN) { + int i = 0; + + if (rb_ispunct(id)) { + VALUE str = global_symbols.op_sym[i = (int)id]; + if (!str) { + char name[2]; + name[0] = (char)id; + name[1] = 0; + str = rb_usascii_str_new(name, 1); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + for (i = 0; i < op_tbl_count; i++) { + if (op_tbl[i].token == id) { + VALUE str = global_symbols.op_sym[i]; + if (!str) { + str = rb_usascii_str_new2(op_tbl[i].name); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + } + } + + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + + if (is_attrset_id(id)) { + ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; + VALUE str; + + while (!(str = rb_id2str(id2))) { + if (!is_local_id(id2)) return 0; + id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; + } + str = rb_str_dup(str); + rb_str_cat(str, "=", 1); + rb_intern_str(str); + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + } + return 0; +} + +const char * +rb_id2name(ID id) +{ + VALUE str = rb_id2str(id); + + if (!str) return 0; + return RSTRING_PTR(str); +} + +static int +symbols_i(VALUE sym, ID value, VALUE ary) +{ + rb_ary_push(ary, ID2SYM(value)); + return ST_CONTINUE; +} + +/* + * call-seq: + * Symbol.all_symbols => array + * + * Returns an array of all the symbols currently in Ruby's symbol + * table. + * + * Symbol.all_symbols.size #=> 903 + * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, + * :chown, :EOFError, :$;, :String, + * :LOCK_SH, :"setuid?", :$<, + * :default_proc, :compact, :extend, + * :Tms, :getwd, :$=, :ThreadGroup, + * :wait2, :$>] + */ + +VALUE +rb_sym_all_symbols(void) +{ + VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); + + st_foreach(global_symbols.sym_id, symbols_i, ary); + return ary; +} + +int +rb_is_const_id(ID id) +{ + if (is_const_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_class_id(ID id) +{ + if (is_class_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_instance_id(ID id) +{ + if (is_instance_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_local_id(ID id) +{ + if (is_local_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_junk_id(ID id) +{ + if (is_junk_id(id)) return Qtrue; + return Qfalse; +} + +#endif /* !RIPPER */ + +static void +parser_initialize(struct parser_params *parser) +{ + parser->eofp = Qfalse; + + parser->parser_lex_strterm = 0; + parser->parser_cond_stack = 0; + parser->parser_cmdarg_stack = 0; + parser->parser_class_nest = 0; + parser->parser_paren_nest = 0; + parser->parser_lpar_beg = 0; + parser->parser_in_single = 0; + parser->parser_in_def = 0; + parser->parser_in_defined = 0; + parser->parser_compile_for_eval = 0; + parser->parser_cur_mid = 0; + parser->parser_tokenbuf = NULL; + parser->parser_tokidx = 0; + parser->parser_toksiz = 0; + parser->parser_heredoc_end = 0; + parser->parser_command_start = Qtrue; + parser->parser_deferred_nodes = 0; + parser->parser_lex_pbeg = 0; + parser->parser_lex_p = 0; + parser->parser_lex_pend = 0; + parser->parser_lvtbl = 0; + parser->parser_ruby__end__seen = 0; + parser->parser_ruby_sourcefile = 0; +#ifndef RIPPER + parser->is_ripper = 0; + parser->parser_eval_tree_begin = 0; + parser->parser_eval_tree = 0; +#else + parser->is_ripper = 1; + parser->parser_ruby_sourcefile_string = Qnil; + parser->delayed = Qnil; + + parser->result = Qnil; + parser->parsing_thread = Qnil; + parser->toplevel_p = Qtrue; +#endif +#ifdef YYMALLOC + parser->heap = NULL; +#endif + parser->enc = rb_usascii_encoding(); +} + +#ifdef RIPPER +#define parser_mark ripper_parser_mark +#define parser_free ripper_parser_free +#endif + +static void +parser_mark(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + + rb_gc_mark((VALUE)p->parser_lex_strterm); + rb_gc_mark((VALUE)p->parser_deferred_nodes); + rb_gc_mark(p->parser_lex_input); + rb_gc_mark(p->parser_lex_lastline); + rb_gc_mark(p->parser_lex_nextline); +#ifndef RIPPER + rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; + rb_gc_mark((VALUE)p->parser_eval_tree) ; + rb_gc_mark(p->debug_lines); +#else + rb_gc_mark(p->parser_ruby_sourcefile_string); + rb_gc_mark(p->delayed); + rb_gc_mark(p->value); + rb_gc_mark(p->result); + rb_gc_mark(p->parsing_thread); +#endif +#ifdef YYMALLOC + rb_gc_mark((VALUE)p->heap); +#endif +} + +static void +parser_free(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + struct local_vars *local, *prev; + + if (p->parser_tokenbuf) { + xfree(p->parser_tokenbuf); + } + for (local = p->parser_lvtbl; local; local = prev) { + if (local->vars) xfree(local->vars); + prev = local->prev; + xfree(local); + } +#ifndef RIPPER + xfree(p->parser_ruby_sourcefile); +#endif + xfree(p); +} + +VALUE rb_parser_get_yydebug(VALUE); +VALUE rb_parser_set_yydebug(VALUE, VALUE); + +#ifndef RIPPER +static struct parser_params * +parser_new(void) +{ + struct parser_params *p; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + parser_initialize(p); + return p; +} + +VALUE +rb_parser_new(void) +{ + struct parser_params *p = parser_new(); + + return Data_Wrap_Struct(0, parser_mark, parser_free, p); +} + +/* + * call-seq: + * ripper#end_seen? -> Boolean + * + * Return if parsed source ended by +\_\_END\_\_+. + * This number starts from 1. + */ +VALUE +rb_parser_end_seen_p(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return ruby__end__seen ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper#encoding -> encoding + * + * Return encoding of the source. + */ +VALUE +rb_parser_encoding(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return rb_enc_from_encoding(parser->enc); +} + +/* + * call-seq: + * ripper.yydebug -> true or false + * + * Get yydebug. + */ +VALUE +rb_parser_get_yydebug(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + return yydebug ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper.yydebug = flag + * + * Set yydebug. + */ +VALUE +rb_parser_set_yydebug(VALUE self, VALUE flag) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + yydebug = RTEST(flag); + return flag; +} + +#ifdef YYMALLOC +#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) +#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) +#define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ + (n)->u3.cnt = (c), (p)) + +void * +rb_parser_malloc(struct parser_params *parser, size_t size) +{ + size_t cnt = HEAPCNT(1, size); + NODE *n = NEWHEAP(); + void *ptr = xmalloc(size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) +{ + size_t cnt = HEAPCNT(nelem, size); + NODE *n = NEWHEAP(); + void *ptr = xcalloc(nelem, size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) +{ + NODE *n; + size_t cnt = HEAPCNT(1, size); + + if (ptr && (n = parser->heap) != NULL) { + do { + if (n->u1.node == ptr) { + n->u1.node = ptr = xrealloc(ptr, size); + if (n->u3.cnt) n->u3.cnt = cnt; + return ptr; + } + } while ((n = n->u2.node) != NULL); + } + n = NEWHEAP(); + ptr = xrealloc(ptr, size); + return ADD2HEAP(n, cnt, ptr); +} + +void +rb_parser_free(struct parser_params *parser, void *ptr) +{ + NODE **prev = &parser->heap, *n; + + while ((n = *prev) != NULL) { + if (n->u1.node == ptr) { + *prev = n->u2.node; + rb_gc_force_recycle((VALUE)n); + break; + } + prev = &n->u2.node; + } + xfree(ptr); +} +#endif +#endif + +#ifdef RIPPER +#ifdef RIPPER_DEBUG +extern int rb_is_pointer_to_heap(VALUE); + +/* :nodoc: */ +static VALUE +ripper_validate_object(VALUE self, VALUE x) +{ + if (x == Qfalse) return x; + if (x == Qtrue) return x; + if (x == Qnil) return x; + if (x == Qundef) + rb_raise(rb_eArgError, "Qundef given"); + if (FIXNUM_P(x)) return x; + if (SYMBOL_P(x)) return x; + if (!rb_is_pointer_to_heap(x)) + rb_raise(rb_eArgError, "invalid pointer: %p", x); + switch (TYPE(x)) { + case T_STRING: + case T_OBJECT: + case T_ARRAY: + case T_BIGNUM: + case T_FLOAT: + return x; + case T_NODE: + rb_raise(rb_eArgError, "NODE given: %p", x); + default: + rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", + x, rb_obj_classname(x)); + } + return x; +} +#endif + +#define validate(x) + +static VALUE +ripper_dispatch0(struct parser_params *parser, ID mid) +{ + return rb_funcall(parser->value, mid, 0); +} + +static VALUE +ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) +{ + validate(a); + return rb_funcall(parser->value, mid, 1, a); +} + +static VALUE +ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) +{ + validate(a); + validate(b); + return rb_funcall(parser->value, mid, 2, a, b); +} + +static VALUE +ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) +{ + validate(a); + validate(b); + validate(c); + return rb_funcall(parser->value, mid, 3, a, b, c); +} + +static VALUE +ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) +{ + validate(a); + validate(b); + validate(c); + validate(d); + return rb_funcall(parser->value, mid, 4, a, b, c, d); +} + +static VALUE +ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) +{ + validate(a); + validate(b); + validate(c); + validate(d); + validate(e); + return rb_funcall(parser->value, mid, 5, a, b, c, d, e); +} + +static const struct kw_assoc { + ID id; + const char *name; +} keyword_to_name[] = { + {keyword_class, "class"}, + {keyword_module, "module"}, + {keyword_def, "def"}, + {keyword_undef, "undef"}, + {keyword_begin, "begin"}, + {keyword_rescue, "rescue"}, + {keyword_ensure, "ensure"}, + {keyword_end, "end"}, + {keyword_if, "if"}, + {keyword_unless, "unless"}, + {keyword_then, "then"}, + {keyword_elsif, "elsif"}, + {keyword_else, "else"}, + {keyword_case, "case"}, + {keyword_when, "when"}, + {keyword_while, "while"}, + {keyword_until, "until"}, + {keyword_for, "for"}, + {keyword_break, "break"}, + {keyword_next, "next"}, + {keyword_redo, "redo"}, + {keyword_retry, "retry"}, + {keyword_in, "in"}, + {keyword_do, "do"}, + {keyword_do_cond, "do"}, + {keyword_do_block, "do"}, + {keyword_return, "return"}, + {keyword_yield, "yield"}, + {keyword_super, "super"}, + {keyword_self, "self"}, + {keyword_nil, "nil"}, + {keyword_true, "true"}, + {keyword_false, "false"}, + {keyword_and, "and"}, + {keyword_or, "or"}, + {keyword_not, "not"}, + {modifier_if, "if"}, + {modifier_unless, "unless"}, + {modifier_while, "while"}, + {modifier_until, "until"}, + {modifier_rescue, "rescue"}, + {keyword_alias, "alias"}, + {keyword_defined, "defined?"}, + {keyword_BEGIN, "BEGIN"}, + {keyword_END, "END"}, + {keyword__LINE__, "__LINE__"}, + {keyword__FILE__, "__FILE__"}, + {keyword__ENCODING__, "__ENCODING__"}, + {0, NULL} +}; + +static const char* +keyword_id_to_str(ID id) +{ + const struct kw_assoc *a; + + for (a = keyword_to_name; a->id; a++) { + if (a->id == id) + return a->name; + } + return NULL; +} + +#undef ripper_id2sym +static VALUE +ripper_id2sym(ID id) +{ + const char *name; + char buf[8]; + + if (id <= 256) { + buf[0] = id; + buf[1] = '\0'; + return ID2SYM(rb_intern(buf)); + } + if ((name = keyword_id_to_str(id))) { + return ID2SYM(rb_intern(name)); + } + switch (id) { + case tOROP: + name = "||"; + break; + case tANDOP: + name = "&&"; + break; + default: + name = rb_id2name(id); + if (!name) { + rb_bug("cannot convert ID to string: %ld", (unsigned long)id); + } + break; + } + return ID2SYM(rb_intern(name)); +} + +static VALUE +ripper_intern(const char *s) +{ + return ID2SYM(rb_intern(s)); +} + +static void +ripper_compile_error(struct parser_params *parser, const char *fmt, ...) +{ + VALUE str; + va_list args; + + va_start(args, fmt); + str = rb_vsprintf(fmt, args); + va_end(args); + rb_funcall(parser->value, rb_intern("compile_error"), 1, str); +} + +static void +ripper_warn0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warnI(struct parser_params *parser, const char *fmt, int a) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), INT2NUM(a)); +} + +#if 0 +static void +ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} +#endif + +static void +ripper_warning0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warning"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} + +static VALUE +ripper_lex_get_generic(struct parser_params *parser, VALUE src) +{ + return rb_funcall(src, ripper_id_gets, 0); +} + +static VALUE +ripper_s_allocate(VALUE klass) +{ + struct parser_params *p; + VALUE self; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + self = Data_Wrap_Struct(klass, parser_mark, parser_free, p); + p->value = self; + return self; +} + +#define ripper_initialized_p(r) ((r)->parser_lex_input != 0) + +/* + * call-seq: + * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper + * + * Create a new Ripper object. + * _src_ must be a String, an IO, or an Object which has #gets method. + * + * This method does not starts parsing. + * See also Ripper#parse and Ripper.parse. + */ +static VALUE +ripper_initialize(int argc, VALUE *argv, VALUE self) +{ + struct parser_params *parser; + VALUE src, fname, lineno; + + Data_Get_Struct(self, struct parser_params, parser); + rb_scan_args(argc, argv, "12", &src, &fname, &lineno); + if (rb_obj_respond_to(src, ripper_id_gets, 0)) { + parser->parser_lex_gets = ripper_lex_get_generic; + } + else { + StringValue(src); + parser->parser_lex_gets = lex_get_str; + } + parser->parser_lex_input = src; + parser->eofp = Qfalse; + if (NIL_P(fname)) { + fname = STR_NEW2("(ripper)"); + } + else { + StringValue(fname); + } + parser_initialize(parser); + + parser->parser_ruby_sourcefile_string = fname; + parser->parser_ruby_sourcefile = RSTRING_PTR(fname); + parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; + + return Qnil; +} + +extern VALUE rb_thread_pass(void); + +struct ripper_args { + struct parser_params *parser; + int argc; + VALUE *argv; +}; + +static VALUE +ripper_parse0(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser_prepare(parser); + ripper_yyparse((void*)parser); + return parser->result; +} + +static VALUE +ripper_ensure(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser->parsing_thread = Qnil; + return Qnil; +} + +/* + * call-seq: + * ripper#parse + * + * Start parsing and returns the value of the root action. + */ +static VALUE +ripper_parse(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (!NIL_P(parser->parsing_thread)) { + if (parser->parsing_thread == rb_thread_current()) + rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); + else + rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); + } + parser->parsing_thread = rb_thread_current(); + rb_ensure(ripper_parse0, self, ripper_ensure, self); + + return parser->result; +} + +/* + * call-seq: + * ripper#column -> Integer + * + * Return column number of current parsing line. + * This number starts from 0. + */ +static VALUE +ripper_column(VALUE self) +{ + struct parser_params *parser; + long col; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + col = parser->tokp - parser->parser_lex_pbeg; + return LONG2NUM(col); +} + +/* + * call-seq: + * ripper#lineno -> Integer + * + * Return line number of current parsing line. + * This number starts from 1. + */ +static VALUE +ripper_lineno(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + return INT2NUM(parser->parser_ruby_sourceline); +} + +#ifdef RIPPER_DEBUG +/* :nodoc: */ +static VALUE +ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) +{ + StringValue(msg); + if (obj == Qundef) { + rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); + } + return Qnil; +} + +/* :nodoc: */ +static VALUE +ripper_value(VALUE self, VALUE obj) +{ + return ULONG2NUM(obj); +} +#endif + +void +Init_ripper(void) +{ + VALUE Ripper; + + Ripper = rb_define_class("Ripper", rb_cObject); + rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); + rb_define_alloc_func(Ripper, ripper_s_allocate); + rb_define_method(Ripper, "initialize", ripper_initialize, -1); + rb_define_method(Ripper, "parse", ripper_parse, 0); + rb_define_method(Ripper, "column", ripper_column, 0); + rb_define_method(Ripper, "lineno", ripper_lineno, 0); + rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); + rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); + rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); + rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); +#ifdef RIPPER_DEBUG + rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); + rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); + rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); +#endif + + ripper_id_gets = rb_intern("gets"); + ripper_init_eventids1(Ripper); + ripper_init_eventids2(Ripper); + /* ensure existing in symbol table */ + rb_intern("||"); + rb_intern("&&"); +} +#endif /* RIPPER */ diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate-param-macros.rb b/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate-param-macros.rb new file mode 100755 index 0000000..b19f6e8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate-param-macros.rb @@ -0,0 +1,14 @@ +off = true +ARGF.each do |line| + case line + when /RIPPER_PARAMS_DECL_BEGIN/ + off = false + when /RIPPER_PARAMS_DECL_END/ + exit + when /ripper/ + next if off + var = line.scan(/\w+/).last or next + base = var.sub(/ripper_/, '') + puts %"\#define #{base}\t\t(parser->ripper_#{base})" + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate.rb b/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate.rb new file mode 100755 index 0000000..1f496b7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/tools/generate.rb @@ -0,0 +1,152 @@ +# $Id: generate.rb 18974 2008-08-31 04:42:42Z nobu $ + +require 'optparse' + +def main + mode = nil + ids1src = nil + ids2src = nil + template = nil + output = nil + + parser = @parser = OptionParser.new + parser.banner = "Usage: #{File.basename($0)} --mode=MODE [--ids1src=PATH] [--ids2src=PATH] [--output=PATH]" + parser.on('--mode=MODE', 'check, eventids1, or eventids2table.') {|m| + mode = m + } + parser.on('--ids1src=PATH', 'A source file of event-IDs 1 (parse.y).') {|path| + ids1src = path + } + parser.on('--ids2src=PATH', 'A source file of event-IDs 2 (eventids2.c).') {|path| + ids2src = path + } + parser.on('--output=PATH', 'An output file.') {|path| + output = path + } + parser.on('--help', 'Prints this message and quit.') { + puts parser.help + exit true + } + begin + parser.parse! + rescue OptionParser::ParseError => err + usage err.message + end + usage 'no mode given' unless mode + case mode + when 'check' + usage 'no --ids1src' unless ids1src + usage 'no --ids2src' unless ids2src + h = read_ids1_with_locations(ids1src) + check_arity h + ids2 = read_ids2(ids2src) + common = h.keys & ids2 + unless common.empty? + abort "event crash: #{common.join(' ')}" + end + exit 0 + when 'eventids1' + usage 'no --ids1src' unless ids1src + result = generate_eventids1(read_ids1(ids1src)) + when 'eventids2table' + usage 'no --ids2src' unless ids2src + result = generate_eventids2_table(read_ids2(ids2src)) + end + if output + File.open(output, 'w') {|f| + f.write result + } + else + puts result + end +end + +def usage(msg) + $stderr.puts msg + $stderr.puts @parser.help + exit false +end + +def generate_eventids1(ids) + buf = "" + ids.each do |id, arity| + buf << %Q[static ID ripper_id_#{id};\n] + end + buf << %Q[\n] + buf << %Q[static void\n] + buf << %Q[ripper_init_eventids1(VALUE self)\n] + buf << %Q[{\n] + buf << %Q[ VALUE h;\n] + buf << %Q[ ID id;\n] + ids.each do |id, arity| + buf << %Q[ ripper_id_#{id} = rb_intern_const("on_#{id}");\n] + end + buf << %Q[\n] + buf << %Q[ h = rb_hash_new();\n] + buf << %Q[ rb_define_const(self, "PARSER_EVENT_TABLE", h);\n] + ids.each do |id, arity| + buf << %Q[ id = rb_intern_const("#{id}");\n] + buf << %Q[ rb_hash_aset(h, ID2SYM(id), INT2NUM(#{arity}));\n] + end + buf << %Q[}\n] + buf +end + +def generate_eventids2_table(ids) + buf = "" + buf << %Q[static void\n] + buf << %Q[ripper_init_eventids2_table(VALUE self)\n] + buf << %Q[{\n] + buf << %Q[ VALUE h = rb_hash_new();\n] + buf << %Q[ ID id;\n] + buf << %Q[ rb_define_const(self, "SCANNER_EVENT_TABLE", h);\n] + ids.each do |id| + buf << %Q[ id = rb_intern_const("#{id}");\n] + buf << %Q[ rb_hash_aset(h, ID2SYM(id), INT2NUM(1));\n] + end + buf << %Q[}\n] + buf +end + +def read_ids1(path) + strip_locations(read_ids1_with_locations(path)) +end + +def strip_locations(h) + h.map {|event, list| [event, list.first[1]] }\ + .sort_by {|event, arity| event.to_s } +end + +def check_arity(h) + invalid = false + h.each do |event, list| + unless list.map {|line, arity| arity }.uniq.size == 1 + invalid = true + locations = list.map {|line, a| "#{line}:#{a}" }.join(', ') + $stderr.puts "arity crash [event=#{event}]: #{locations}" + end + end + abort if invalid +end + +def read_ids1_with_locations(path) + h = {} + File.open(path) {|f| + f.each do |line| + next if /\A\#\s*define\s+s?dispatch/ =~ line + next if /ripper_dispatch/ =~ line + line.scan(/dispatch(\d)\((\w+)/) do |arity, event| + (h[event] ||= []).push [f.lineno, arity.to_i] + end + end + } + h +end + +def read_ids2(path) + File.open(path) {|f| + return f.read.scan(/ripper_id_(\w+)/).flatten.uniq.sort + } +end + +main diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/tools/preproc.rb b/lib/ruby-1.9.1-rc1/ext/ripper/tools/preproc.rb new file mode 100755 index 0000000..14bf5e8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/tools/preproc.rb @@ -0,0 +1,91 @@ +# $Id: preproc.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require 'optparse' + +def main + output = nil + parser = OptionParser.new + parser.banner = "Usage: #{File.basename($0)} [--output=PATH] " + parser.on('--output=PATH', 'An output file.') {|path| + output = path + } + parser.on('--help', 'Prints this message and quit.') { + puts parser.help + exit true + } + begin + parser.parse! + rescue OptionParser::ParseError => err + $stderr.puts err.message + $stderr.puts parser.help + exit false + end + unless ARGV.size == 1 + abort "wrong number of arguments (#{ARGV.size} for 1)" + end + out = "" + File.open(ARGV[0]) {|f| + prelude f, out + grammar f, out + usercode f, out + } + if output + File.open(output, 'w') {|f| + f.write out + } + else + print out + end +end + +def prelude(f, out) + while line = f.gets + case line + when %r + out << '/*' << $/ + when %r + out << '*/' << $/ + when %r<%\*/> + out << $/ + when /\A%%/ + out << '%%' << $/ + return + when /\A%token/ + out << line.sub(/<\w+>/, '') + when /\A%type/ + out << line.sub(/<\w+>/, '') + else + out << line + end + end +end + +def grammar(f, out) + while line = f.gets + case line + when %r + out << '#if 0' << $/ + when %r + out << '/*' << $/ + when %r + out << '*/' << $/ + when %r + out << '#endif' << $/ + when %r<%\*/> + out << $/ + when /\A%%/ + out << '%%' << $/ + return + else + out << line + end + end +end + +def usercode(f, out) + while line = f.gets + out << line + end +end + +main diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/tools/strip.rb b/lib/ruby-1.9.1-rc1/ext/ripper/tools/strip.rb new file mode 100755 index 0000000..99413c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/tools/strip.rb @@ -0,0 +1,12 @@ +last_is_void = false +ARGF.each do |line| + if line.strip.empty? + #puts() unless last_is_void + last_is_void = true + elsif /\A\#/ === line + ; + else + print line + last_is_void = false + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/ripper/y.output b/lib/ruby-1.9.1-rc1/ext/ripper/y.output new file mode 100644 index 0000000..b895455 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/ripper/y.output @@ -0,0 +1,28045 @@ +Terminals which are not used + + tRPAREN + idNULL + idRespond_to + idIFUNC + idCFUNC + idThrowState + id_core_set_method_alias + id_core_set_variable_alias + id_core_undef_method + id_core_define_method + id_core_define_singleton_method + id_core_set_postexe + tLAST_TOKEN + + +Grammar + + 0 $accept: program $end + + 1 @1: /* empty */ + + 2 program: @1 compstmt + + 3 bodystmt: compstmt opt_rescue opt_else opt_ensure + + 4 compstmt: stmts opt_terms + + 5 stmts: none + 6 | stmt + 7 | stmts terms stmt + 8 | error stmt + + 9 @2: /* empty */ + + 10 stmt: keyword_alias fitem @2 fitem + 11 | keyword_alias tGVAR tGVAR + 12 | keyword_alias tGVAR tBACK_REF + 13 | keyword_alias tGVAR tNTH_REF + 14 | keyword_undef undef_list + 15 | stmt modifier_if expr_value + 16 | stmt modifier_unless expr_value + 17 | stmt modifier_while expr_value + 18 | stmt modifier_until expr_value + 19 | stmt modifier_rescue stmt + + 20 @3: /* empty */ + + 21 stmt: keyword_BEGIN @3 '{' compstmt '}' + 22 | keyword_END '{' compstmt '}' + 23 | lhs '=' command_call + 24 | mlhs '=' command_call + 25 | var_lhs tOP_ASGN command_call + 26 | primary_value '[' opt_call_args rbracket tOP_ASGN command_call + 27 | primary_value '.' tIDENTIFIER tOP_ASGN command_call + 28 | primary_value '.' tCONSTANT tOP_ASGN command_call + 29 | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + 30 | backref tOP_ASGN command_call + 31 | lhs '=' mrhs + 32 | mlhs '=' arg_value + 33 | mlhs '=' mrhs + 34 | expr + + 35 expr: command_call + 36 | expr keyword_and expr + 37 | expr keyword_or expr + 38 | keyword_not opt_nl expr + 39 | '!' command_call + 40 | arg + + 41 expr_value: expr + + 42 command_call: command + 43 | block_command + 44 | keyword_return call_args + 45 | keyword_break call_args + 46 | keyword_next call_args + + 47 block_command: block_call + 48 | block_call '.' operation2 command_args + 49 | block_call tCOLON2 operation2 command_args + + 50 @4: /* empty */ + + 51 cmd_brace_block: tLBRACE_ARG @4 opt_block_param compstmt '}' + + 52 command: operation command_args + 53 | operation command_args cmd_brace_block + 54 | primary_value '.' operation2 command_args + 55 | primary_value '.' operation2 command_args cmd_brace_block + 56 | primary_value tCOLON2 operation2 command_args + 57 | primary_value tCOLON2 operation2 command_args cmd_brace_block + 58 | keyword_super command_args + 59 | keyword_yield command_args + + 60 mlhs: mlhs_basic + 61 | tLPAREN mlhs_inner rparen + + 62 mlhs_inner: mlhs_basic + 63 | tLPAREN mlhs_inner rparen + + 64 mlhs_basic: mlhs_head + 65 | mlhs_head mlhs_item + 66 | mlhs_head tSTAR mlhs_node + 67 | mlhs_head tSTAR mlhs_node ',' mlhs_post + 68 | mlhs_head tSTAR + 69 | mlhs_head tSTAR ',' mlhs_post + 70 | tSTAR mlhs_node + 71 | tSTAR mlhs_node ',' mlhs_post + 72 | tSTAR + 73 | tSTAR ',' mlhs_post + + 74 mlhs_item: mlhs_node + 75 | tLPAREN mlhs_inner rparen + + 76 mlhs_head: mlhs_item ',' + 77 | mlhs_head mlhs_item ',' + + 78 mlhs_post: mlhs_item + 79 | mlhs_post ',' mlhs_item + + 80 mlhs_node: variable + 81 | primary_value '[' opt_call_args rbracket + 82 | primary_value '.' tIDENTIFIER + 83 | primary_value tCOLON2 tIDENTIFIER + 84 | primary_value '.' tCONSTANT + 85 | primary_value tCOLON2 tCONSTANT + 86 | tCOLON3 tCONSTANT + 87 | backref + + 88 lhs: variable + 89 | primary_value '[' opt_call_args rbracket + 90 | primary_value '.' tIDENTIFIER + 91 | primary_value tCOLON2 tIDENTIFIER + 92 | primary_value '.' tCONSTANT + 93 | primary_value tCOLON2 tCONSTANT + 94 | tCOLON3 tCONSTANT + 95 | backref + + 96 cname: tIDENTIFIER + 97 | tCONSTANT + + 98 cpath: tCOLON3 cname + 99 | cname + 100 | primary_value tCOLON2 cname + + 101 fname: tIDENTIFIER + 102 | tCONSTANT + 103 | tFID + 104 | op + 105 | reswords + + 106 fsym: fname + 107 | symbol + + 108 fitem: fsym + 109 | dsym + + 110 undef_list: fitem + + 111 @5: /* empty */ + + 112 undef_list: undef_list ',' @5 fitem + + 113 op: '|' + 114 | '^' + 115 | '&' + 116 | tCMP + 117 | tEQ + 118 | tEQQ + 119 | tMATCH + 120 | tNMATCH + 121 | '>' + 122 | tGEQ + 123 | '<' + 124 | tLEQ + 125 | tNEQ + 126 | tLSHFT + 127 | tRSHFT + 128 | '+' + 129 | '-' + 130 | '*' + 131 | tSTAR + 132 | '/' + 133 | '%' + 134 | tPOW + 135 | '!' + 136 | '~' + 137 | tUPLUS + 138 | tUMINUS + 139 | tAREF + 140 | tASET + 141 | '`' + + 142 reswords: keyword__LINE__ + 143 | keyword__FILE__ + 144 | keyword__ENCODING__ + 145 | keyword_BEGIN + 146 | keyword_END + 147 | keyword_alias + 148 | keyword_and + 149 | keyword_begin + 150 | keyword_break + 151 | keyword_case + 152 | keyword_class + 153 | keyword_def + 154 | keyword_defined + 155 | keyword_do + 156 | keyword_else + 157 | keyword_elsif + 158 | keyword_end + 159 | keyword_ensure + 160 | keyword_false + 161 | keyword_for + 162 | keyword_in + 163 | keyword_module + 164 | keyword_next + 165 | keyword_nil + 166 | keyword_not + 167 | keyword_or + 168 | keyword_redo + 169 | keyword_rescue + 170 | keyword_retry + 171 | keyword_return + 172 | keyword_self + 173 | keyword_super + 174 | keyword_then + 175 | keyword_true + 176 | keyword_undef + 177 | keyword_when + 178 | keyword_yield + 179 | keyword_if + 180 | keyword_unless + 181 | keyword_while + 182 | keyword_until + + 183 arg: lhs '=' arg + 184 | lhs '=' arg modifier_rescue arg + 185 | var_lhs tOP_ASGN arg + 186 | var_lhs tOP_ASGN arg modifier_rescue arg + 187 | primary_value '[' opt_call_args rbracket tOP_ASGN arg + 188 | primary_value '.' tIDENTIFIER tOP_ASGN arg + 189 | primary_value '.' tCONSTANT tOP_ASGN arg + 190 | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + 191 | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + 192 | tCOLON3 tCONSTANT tOP_ASGN arg + 193 | backref tOP_ASGN arg + 194 | arg tDOT2 arg + 195 | arg tDOT3 arg + 196 | arg '+' arg + 197 | arg '-' arg + 198 | arg '*' arg + 199 | arg '/' arg + 200 | arg '%' arg + 201 | arg tPOW arg + 202 | tUMINUS_NUM tINTEGER tPOW arg + 203 | tUMINUS_NUM tFLOAT tPOW arg + 204 | tUPLUS arg + 205 | tUMINUS arg + 206 | arg '|' arg + 207 | arg '^' arg + 208 | arg '&' arg + 209 | arg tCMP arg + 210 | arg '>' arg + 211 | arg tGEQ arg + 212 | arg '<' arg + 213 | arg tLEQ arg + 214 | arg tEQ arg + 215 | arg tEQQ arg + 216 | arg tNEQ arg + 217 | arg tMATCH arg + 218 | arg tNMATCH arg + 219 | '!' arg + 220 | '~' arg + 221 | arg tLSHFT arg + 222 | arg tRSHFT arg + 223 | arg tANDOP arg + 224 | arg tOROP arg + + 225 @6: /* empty */ + + 226 arg: keyword_defined opt_nl @6 arg + 227 | arg '?' arg opt_nl ':' arg + 228 | primary + + 229 arg_value: arg + + 230 aref_args: none + 231 | args trailer + 232 | args ',' assocs trailer + 233 | assocs trailer + + 234 paren_args: '(' opt_call_args rparen + + 235 opt_paren_args: none + 236 | paren_args + + 237 opt_call_args: none + 238 | call_args + + 239 call_args: command + 240 | args opt_block_arg + 241 | assocs opt_block_arg + 242 | args ',' assocs opt_block_arg + 243 | block_arg + + 244 @7: /* empty */ + + 245 command_args: @7 call_args + + 246 block_arg: tAMPER arg_value + + 247 opt_block_arg: ',' block_arg + 248 | ',' + 249 | none + + 250 args: arg_value + 251 | tSTAR arg_value + 252 | args ',' arg_value + 253 | args ',' tSTAR arg_value + + 254 mrhs: args ',' arg_value + 255 | args ',' tSTAR arg_value + 256 | tSTAR arg_value + + 257 primary: literal + 258 | strings + 259 | xstring + 260 | regexp + 261 | words + 262 | qwords + 263 | var_ref + 264 | backref + 265 | tFID + + 266 @8: /* empty */ + + 267 primary: k_begin @8 bodystmt k_end + + 268 @9: /* empty */ + + 269 primary: tLPAREN_ARG expr @9 rparen + 270 | tLPAREN compstmt ')' + 271 | primary_value tCOLON2 tCONSTANT + 272 | tCOLON3 tCONSTANT + 273 | tLBRACK aref_args ']' + 274 | tLBRACE assoc_list '}' + 275 | keyword_return + 276 | keyword_yield '(' call_args rparen + 277 | keyword_yield '(' rparen + 278 | keyword_yield + + 279 @10: /* empty */ + + 280 primary: keyword_defined opt_nl '(' @10 expr rparen + 281 | keyword_not '(' expr rparen + 282 | keyword_not '(' rparen + 283 | operation brace_block + 284 | method_call + 285 | method_call brace_block + 286 | tLAMBDA lambda + 287 | k_if expr_value then compstmt if_tail k_end + 288 | k_unless expr_value then compstmt opt_else k_end + + 289 @11: /* empty */ + + 290 @12: /* empty */ + + 291 primary: k_while @11 expr_value do @12 compstmt k_end + + 292 @13: /* empty */ + + 293 @14: /* empty */ + + 294 primary: k_until @13 expr_value do @14 compstmt k_end + 295 | k_case expr_value opt_terms case_body k_end + 296 | k_case opt_terms case_body k_end + + 297 @15: /* empty */ + + 298 @16: /* empty */ + + 299 primary: k_for for_var keyword_in @15 expr_value do @16 compstmt k_end + + 300 @17: /* empty */ + + 301 primary: k_class cpath superclass @17 bodystmt k_end + + 302 @18: /* empty */ + + 303 @19: /* empty */ + + 304 primary: k_class tLSHFT expr @18 term @19 bodystmt k_end + + 305 @20: /* empty */ + + 306 primary: k_module cpath @20 bodystmt k_end + + 307 @21: /* empty */ + + 308 primary: k_def fname @21 f_arglist bodystmt k_end + + 309 @22: /* empty */ + + 310 @23: /* empty */ + + 311 primary: k_def singleton dot_or_colon @22 fname @23 f_arglist bodystmt k_end + 312 | keyword_break + 313 | keyword_next + 314 | keyword_redo + 315 | keyword_retry + + 316 primary_value: primary + + 317 k_begin: keyword_begin + + 318 k_if: keyword_if + + 319 k_unless: keyword_unless + + 320 k_while: keyword_while + + 321 k_until: keyword_until + + 322 k_case: keyword_case + + 323 k_for: keyword_for + + 324 k_class: keyword_class + + 325 k_module: keyword_module + + 326 k_def: keyword_def + + 327 k_end: keyword_end + + 328 then: term + 329 | keyword_then + 330 | term keyword_then + + 331 do: term + 332 | keyword_do_cond + + 333 if_tail: opt_else + 334 | keyword_elsif expr_value then compstmt if_tail + + 335 opt_else: none + 336 | keyword_else compstmt + + 337 for_var: lhs + 338 | mlhs + + 339 f_marg: f_norm_arg + 340 | tLPAREN f_margs rparen + + 341 f_marg_list: f_marg + 342 | f_marg_list ',' f_marg + + 343 f_margs: f_marg_list + 344 | f_marg_list ',' tSTAR f_norm_arg + 345 | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list + 346 | f_marg_list ',' tSTAR + 347 | f_marg_list ',' tSTAR ',' f_marg_list + 348 | tSTAR f_norm_arg + 349 | tSTAR f_norm_arg ',' f_marg_list + 350 | tSTAR + 351 | tSTAR ',' f_marg_list + + 352 block_param: f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg + 353 | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 354 | f_arg ',' f_block_optarg opt_f_block_arg + 355 | f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg + 356 | f_arg ',' f_rest_arg opt_f_block_arg + 357 | f_arg ',' + 358 | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + 359 | f_arg opt_f_block_arg + 360 | f_block_optarg ',' f_rest_arg opt_f_block_arg + 361 | f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 362 | f_block_optarg opt_f_block_arg + 363 | f_block_optarg ',' f_arg opt_f_block_arg + 364 | f_rest_arg opt_f_block_arg + 365 | f_rest_arg ',' f_arg opt_f_block_arg + 366 | f_block_arg + + 367 opt_block_param: none + 368 | block_param_def + + 369 block_param_def: '|' opt_bv_decl '|' + 370 | tOROP + 371 | '|' block_param opt_bv_decl '|' + + 372 opt_bv_decl: none + 373 | ';' bv_decls + + 374 bv_decls: bvar + 375 | bv_decls ',' bvar + + 376 bvar: tIDENTIFIER + 377 | f_bad_arg + + 378 @24: /* empty */ + + 379 lambda: @24 f_larglist lambda_body + + 380 f_larglist: '(' f_args opt_bv_decl rparen + 381 | f_args + + 382 lambda_body: tLAMBEG compstmt '}' + 383 | keyword_do_LAMBDA compstmt keyword_end + + 384 @25: /* empty */ + + 385 do_block: keyword_do_block @25 opt_block_param compstmt keyword_end + + 386 block_call: command do_block + 387 | block_call '.' operation2 opt_paren_args + 388 | block_call tCOLON2 operation2 opt_paren_args + + 389 method_call: operation paren_args + 390 | primary_value '.' operation2 opt_paren_args + 391 | primary_value tCOLON2 operation2 paren_args + 392 | primary_value tCOLON2 operation3 + 393 | primary_value '.' paren_args + 394 | primary_value tCOLON2 paren_args + 395 | keyword_super paren_args + 396 | keyword_super + 397 | primary_value '[' opt_call_args rbracket + + 398 @26: /* empty */ + + 399 brace_block: '{' @26 opt_block_param compstmt '}' + + 400 @27: /* empty */ + + 401 brace_block: keyword_do @27 opt_block_param compstmt keyword_end + + 402 case_body: keyword_when args then compstmt cases + + 403 cases: opt_else + 404 | case_body + + 405 opt_rescue: keyword_rescue exc_list exc_var then compstmt opt_rescue + 406 | none + + 407 exc_list: arg_value + 408 | mrhs + 409 | none + + 410 exc_var: tASSOC lhs + 411 | none + + 412 opt_ensure: keyword_ensure compstmt + 413 | none + + 414 literal: numeric + 415 | symbol + 416 | dsym + + 417 strings: string + + 418 string: tCHAR + 419 | string1 + 420 | string string1 + + 421 string1: tSTRING_BEG string_contents tSTRING_END + + 422 xstring: tXSTRING_BEG xstring_contents tSTRING_END + + 423 regexp: tREGEXP_BEG xstring_contents tREGEXP_END + + 424 words: tWORDS_BEG ' ' tSTRING_END + 425 | tWORDS_BEG word_list tSTRING_END + + 426 word_list: /* empty */ + 427 | word_list word ' ' + + 428 word: string_content + 429 | word string_content + + 430 qwords: tQWORDS_BEG ' ' tSTRING_END + 431 | tQWORDS_BEG qword_list tSTRING_END + + 432 qword_list: /* empty */ + 433 | qword_list tSTRING_CONTENT ' ' + + 434 string_contents: /* empty */ + 435 | string_contents string_content + + 436 xstring_contents: /* empty */ + 437 | xstring_contents string_content + + 438 string_content: tSTRING_CONTENT + + 439 @28: /* empty */ + + 440 string_content: tSTRING_DVAR @28 string_dvar + + 441 @29: /* empty */ + + 442 string_content: tSTRING_DBEG @29 compstmt '}' + + 443 string_dvar: tGVAR + 444 | tIVAR + 445 | tCVAR + 446 | backref + + 447 symbol: tSYMBEG sym + + 448 sym: fname + 449 | tIVAR + 450 | tGVAR + 451 | tCVAR + + 452 dsym: tSYMBEG xstring_contents tSTRING_END + + 453 numeric: tINTEGER + 454 | tFLOAT + 455 | tUMINUS_NUM tINTEGER + 456 | tUMINUS_NUM tFLOAT + + 457 variable: tIDENTIFIER + 458 | tIVAR + 459 | tGVAR + 460 | tCONSTANT + 461 | tCVAR + 462 | keyword_nil + 463 | keyword_self + 464 | keyword_true + 465 | keyword_false + 466 | keyword__FILE__ + 467 | keyword__LINE__ + 468 | keyword__ENCODING__ + + 469 var_ref: variable + + 470 var_lhs: variable + + 471 backref: tNTH_REF + 472 | tBACK_REF + + 473 superclass: term + + 474 @30: /* empty */ + + 475 superclass: '<' @30 expr_value term + 476 | error term + + 477 f_arglist: '(' f_args rparen + 478 | f_args term + + 479 f_args: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg + 480 | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 481 | f_arg ',' f_optarg opt_f_block_arg + 482 | f_arg ',' f_optarg ',' f_arg opt_f_block_arg + 483 | f_arg ',' f_rest_arg opt_f_block_arg + 484 | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + 485 | f_arg opt_f_block_arg + 486 | f_optarg ',' f_rest_arg opt_f_block_arg + 487 | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 488 | f_optarg opt_f_block_arg + 489 | f_optarg ',' f_arg opt_f_block_arg + 490 | f_rest_arg opt_f_block_arg + 491 | f_rest_arg ',' f_arg opt_f_block_arg + 492 | f_block_arg + 493 | /* empty */ + + 494 f_bad_arg: tCONSTANT + 495 | tIVAR + 496 | tGVAR + 497 | tCVAR + + 498 f_norm_arg: f_bad_arg + 499 | tIDENTIFIER + + 500 f_arg_item: f_norm_arg + 501 | tLPAREN f_margs rparen + + 502 f_arg: f_arg_item + 503 | f_arg ',' f_arg_item + + 504 f_opt: tIDENTIFIER '=' arg_value + + 505 f_block_opt: tIDENTIFIER '=' primary_value + + 506 f_block_optarg: f_block_opt + 507 | f_block_optarg ',' f_block_opt + + 508 f_optarg: f_opt + 509 | f_optarg ',' f_opt + + 510 restarg_mark: '*' + 511 | tSTAR + + 512 f_rest_arg: restarg_mark tIDENTIFIER + 513 | restarg_mark + + 514 blkarg_mark: '&' + 515 | tAMPER + + 516 f_block_arg: blkarg_mark tIDENTIFIER + + 517 opt_f_block_arg: ',' f_block_arg + 518 | none + + 519 singleton: var_ref + + 520 @31: /* empty */ + + 521 singleton: '(' @31 expr rparen + + 522 assoc_list: none + 523 | assocs trailer + + 524 assocs: assoc + 525 | assocs ',' assoc + + 526 assoc: arg_value tASSOC arg_value + 527 | tLABEL arg_value + + 528 operation: tIDENTIFIER + 529 | tCONSTANT + 530 | tFID + + 531 operation2: tIDENTIFIER + 532 | tCONSTANT + 533 | tFID + 534 | op + + 535 operation3: tIDENTIFIER + 536 | tFID + 537 | op + + 538 dot_or_colon: '.' + 539 | tCOLON2 + + 540 opt_terms: /* empty */ + 541 | terms + + 542 opt_nl: /* empty */ + 543 | '\n' + + 544 rparen: opt_nl ')' + + 545 rbracket: opt_nl ']' + + 546 trailer: /* empty */ + 547 | '\n' + 548 | ',' + + 549 term: ';' + 550 | '\n' + + 551 terms: term + 552 | terms ';' + + 553 none: /* empty */ + + +Terminals, with rules where they appear + +$end (0) 0 +'\n' (10) 543 547 550 +' ' (32) 424 427 430 433 +'!' (33) 39 135 219 +'%' (37) 133 200 +'&' (38) 115 208 514 +'(' (40) 234 276 277 280 281 282 380 477 521 +')' (41) 270 544 +'*' (42) 130 198 510 +'+' (43) 128 196 +',' (44) 67 69 71 73 76 77 79 112 232 242 247 248 252 253 254 255 342 + 344 345 346 347 349 351 352 353 354 355 356 357 358 360 361 363 + 365 375 479 480 481 482 483 484 486 487 489 491 503 507 509 517 + 525 548 +'-' (45) 129 197 +'.' (46) 27 28 48 54 55 82 84 90 92 188 189 387 390 393 538 +'/' (47) 132 199 +':' (58) 227 +';' (59) 373 549 552 +'<' (60) 123 212 475 +'=' (61) 23 24 31 32 33 183 184 504 505 +'>' (62) 121 210 +'?' (63) 227 +'[' (91) 26 81 89 187 397 +']' (93) 273 545 +'^' (94) 114 207 +'`' (96) 141 +'{' (123) 21 22 399 +'|' (124) 113 206 369 371 +'}' (125) 21 22 51 274 382 399 442 +'~' (126) 136 220 +error (256) 8 476 +keyword_class (258) 152 324 +keyword_module (259) 163 325 +keyword_def (260) 153 326 +keyword_undef (261) 14 176 +keyword_begin (262) 149 317 +keyword_rescue (263) 169 405 +keyword_ensure (264) 159 412 +keyword_end (265) 158 327 383 385 401 +keyword_if (266) 179 318 +keyword_unless (267) 180 319 +keyword_then (268) 174 329 330 +keyword_elsif (269) 157 334 +keyword_else (270) 156 336 +keyword_case (271) 151 322 +keyword_when (272) 177 402 +keyword_while (273) 181 320 +keyword_until (274) 182 321 +keyword_for (275) 161 323 +keyword_break (276) 45 150 312 +keyword_next (277) 46 164 313 +keyword_redo (278) 168 314 +keyword_retry (279) 170 315 +keyword_in (280) 162 299 +keyword_do (281) 155 401 +keyword_do_cond (282) 332 +keyword_do_block (283) 385 +keyword_do_LAMBDA (284) 383 +keyword_return (285) 44 171 275 +keyword_yield (286) 59 178 276 277 278 +keyword_super (287) 58 173 395 396 +keyword_self (288) 172 463 +keyword_nil (289) 165 462 +keyword_true (290) 175 464 +keyword_false (291) 160 465 +keyword_and (292) 36 148 +keyword_or (293) 37 167 +keyword_not (294) 38 166 281 282 +modifier_if (295) 15 +modifier_unless (296) 16 +modifier_while (297) 17 +modifier_until (298) 18 +modifier_rescue (299) 19 184 186 +keyword_alias (300) 10 11 12 13 147 +keyword_defined (301) 154 226 280 +keyword_BEGIN (302) 21 145 +keyword_END (303) 22 146 +keyword__LINE__ (304) 142 467 +keyword__FILE__ (305) 143 466 +keyword__ENCODING__ (306) 144 468 +tIDENTIFIER (307) 27 29 82 83 90 91 96 101 188 190 376 457 499 504 + 505 512 516 528 531 535 +tFID (308) 103 265 530 533 536 +tGVAR (309) 11 12 13 443 450 459 496 +tIVAR (310) 444 449 458 495 +tCONSTANT (311) 28 84 85 86 92 93 94 97 102 189 191 192 271 272 460 + 494 529 532 +tCVAR (312) 445 451 461 497 +tLABEL (313) 527 +tINTEGER (314) 202 453 455 +tFLOAT (315) 203 454 456 +tSTRING_CONTENT (316) 433 438 +tCHAR (317) 418 +tNTH_REF (318) 13 471 +tBACK_REF (319) 12 472 +tREGEXP_END (320) 423 +tUPLUS (321) 137 204 +tUMINUS (322) 138 205 +tPOW (323) 134 201 202 203 +tCMP (324) 116 209 +tEQ (325) 117 214 +tEQQ (326) 118 215 +tNEQ (327) 125 216 +tGEQ (328) 122 211 +tLEQ (329) 124 213 +tANDOP (330) 223 +tOROP (331) 224 370 +tMATCH (332) 119 217 +tNMATCH (333) 120 218 +tDOT2 (334) 194 +tDOT3 (335) 195 +tAREF (336) 139 +tASET (337) 140 +tLSHFT (338) 126 221 304 +tRSHFT (339) 127 222 +tCOLON2 (340) 29 49 56 57 83 85 91 93 100 190 191 271 388 391 392 394 + 539 +tCOLON3 (341) 86 94 98 192 272 +tOP_ASGN (342) 25 26 27 28 29 30 185 186 187 188 189 190 191 192 193 +tASSOC (343) 410 526 +tLPAREN (344) 61 63 75 270 340 501 +tLPAREN_ARG (345) 269 +tRPAREN (346) +tLBRACK (347) 273 +tLBRACE (348) 274 +tLBRACE_ARG (349) 51 +tSTAR (350) 66 67 68 69 70 71 72 73 131 251 253 255 256 344 345 346 + 347 348 349 350 351 511 +tAMPER (351) 246 515 +tLAMBDA (352) 286 +tSYMBEG (353) 447 452 +tSTRING_BEG (354) 421 +tXSTRING_BEG (355) 422 +tREGEXP_BEG (356) 423 +tWORDS_BEG (357) 424 425 +tQWORDS_BEG (358) 430 431 +tSTRING_DBEG (359) 442 +tSTRING_DVAR (360) 440 +tSTRING_END (361) 421 422 424 425 430 431 452 +tLAMBEG (362) 382 +tLOWEST (363) +tUMINUS_NUM (364) 202 203 455 456 +idNULL (365) +idRespond_to (366) +idIFUNC (367) +idCFUNC (368) +idThrowState (369) +id_core_set_method_alias (370) +id_core_set_variable_alias (371) +id_core_undef_method (372) +id_core_define_method (373) +id_core_define_singleton_method (374) +id_core_set_postexe (375) +tLAST_TOKEN (376) + + +Nonterminals, with rules where they appear + +$accept (149) + on left: 0 +program (150) + on left: 2, on right: 0 +@1 (151) + on left: 1, on right: 2 +bodystmt (152) + on left: 3, on right: 267 301 304 306 308 311 +compstmt (153) + on left: 4, on right: 2 3 21 22 51 270 287 288 291 294 299 334 + 336 382 383 385 399 401 402 405 412 442 +stmts (154) + on left: 5 6 7 8, on right: 4 7 +stmt (155) + on left: 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 + 29 30 31 32 33 34, on right: 6 7 8 15 16 17 18 19 +@2 (156) + on left: 9, on right: 10 +@3 (157) + on left: 20, on right: 21 +expr (158) + on left: 35 36 37 38 39 40, on right: 34 36 37 38 41 269 280 281 + 304 521 +expr_value (159) + on left: 41, on right: 15 16 17 18 287 288 291 294 295 299 334 + 475 +command_call (160) + on left: 42 43 44 45 46, on right: 23 24 25 26 27 28 29 30 35 39 +block_command (161) + on left: 47 48 49, on right: 43 +cmd_brace_block (162) + on left: 51, on right: 53 55 57 +@4 (163) + on left: 50, on right: 51 +command (164) + on left: 52 53 54 55 56 57 58 59, on right: 42 239 386 +mlhs (165) + on left: 60 61, on right: 24 32 33 338 +mlhs_inner (166) + on left: 62 63, on right: 61 63 75 +mlhs_basic (167) + on left: 64 65 66 67 68 69 70 71 72 73, on right: 60 62 +mlhs_item (168) + on left: 74 75, on right: 65 76 77 78 79 +mlhs_head (169) + on left: 76 77, on right: 64 65 66 67 68 69 77 +mlhs_post (170) + on left: 78 79, on right: 67 69 71 73 79 +mlhs_node (171) + on left: 80 81 82 83 84 85 86 87, on right: 66 67 70 71 74 +lhs (172) + on left: 88 89 90 91 92 93 94 95, on right: 23 31 183 184 337 410 +cname (173) + on left: 96 97, on right: 98 99 100 +cpath (174) + on left: 98 99 100, on right: 301 306 +fname (175) + on left: 101 102 103 104 105, on right: 106 308 311 448 +fsym (176) + on left: 106 107, on right: 108 +fitem (177) + on left: 108 109, on right: 10 110 112 +undef_list (178) + on left: 110 112, on right: 14 112 +@5 (179) + on left: 111, on right: 112 +op (180) + on left: 113 114 115 116 117 118 119 120 121 122 123 124 125 126 + 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141, + on right: 104 534 537 +reswords (181) + on left: 142 143 144 145 146 147 148 149 150 151 152 153 154 155 + 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 + 172 173 174 175 176 177 178 179 180 181 182, on right: 105 +arg (182) + on left: 183 184 185 186 187 188 189 190 191 192 193 194 195 196 + 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 + 213 214 215 216 217 218 219 220 221 222 223 224 226 227 228, + on right: 40 183 184 185 186 187 188 189 190 191 192 193 194 195 + 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 + 212 213 214 215 216 217 218 219 220 221 222 223 224 226 227 229 +@6 (183) + on left: 225, on right: 226 +arg_value (184) + on left: 229, on right: 32 246 250 251 252 253 254 255 256 407 + 504 526 527 +aref_args (185) + on left: 230 231 232 233, on right: 273 +paren_args (186) + on left: 234, on right: 236 389 391 393 394 395 +opt_paren_args (187) + on left: 235 236, on right: 387 388 390 +opt_call_args (188) + on left: 237 238, on right: 26 81 89 187 234 397 +call_args (189) + on left: 239 240 241 242 243, on right: 44 45 46 238 245 276 +command_args (190) + on left: 245, on right: 48 49 52 53 54 55 56 57 58 59 +@7 (191) + on left: 244, on right: 245 +block_arg (192) + on left: 246, on right: 243 247 +opt_block_arg (193) + on left: 247 248 249, on right: 240 241 242 +args (194) + on left: 250 251 252 253, on right: 231 232 240 242 252 253 254 + 255 402 +mrhs (195) + on left: 254 255 256, on right: 31 33 408 +primary (196) + on left: 257 258 259 260 261 262 263 264 265 267 269 270 271 272 + 273 274 275 276 277 278 280 281 282 283 284 285 286 287 288 291 + 294 295 296 299 301 304 306 308 311 312 313 314 315, + on right: 228 316 +@8 (197) + on left: 266, on right: 267 +@9 (198) + on left: 268, on right: 269 +@10 (199) + on left: 279, on right: 280 +@11 (200) + on left: 289, on right: 291 +@12 (201) + on left: 290, on right: 291 +@13 (202) + on left: 292, on right: 294 +@14 (203) + on left: 293, on right: 294 +@15 (204) + on left: 297, on right: 299 +@16 (205) + on left: 298, on right: 299 +@17 (206) + on left: 300, on right: 301 +@18 (207) + on left: 302, on right: 304 +@19 (208) + on left: 303, on right: 304 +@20 (209) + on left: 305, on right: 306 +@21 (210) + on left: 307, on right: 308 +@22 (211) + on left: 309, on right: 311 +@23 (212) + on left: 310, on right: 311 +primary_value (213) + on left: 316, on right: 26 27 28 29 54 55 56 57 81 82 83 84 85 + 89 90 91 92 93 100 187 188 189 190 191 271 390 391 392 393 394 + 397 505 +k_begin (214) + on left: 317, on right: 267 +k_if (215) + on left: 318, on right: 287 +k_unless (216) + on left: 319, on right: 288 +k_while (217) + on left: 320, on right: 291 +k_until (218) + on left: 321, on right: 294 +k_case (219) + on left: 322, on right: 295 296 +k_for (220) + on left: 323, on right: 299 +k_class (221) + on left: 324, on right: 301 304 +k_module (222) + on left: 325, on right: 306 +k_def (223) + on left: 326, on right: 308 311 +k_end (224) + on left: 327, on right: 267 287 288 291 294 295 296 299 301 304 + 306 308 311 +then (225) + on left: 328 329 330, on right: 287 288 334 402 405 +do (226) + on left: 331 332, on right: 291 294 299 +if_tail (227) + on left: 333 334, on right: 287 334 +opt_else (228) + on left: 335 336, on right: 3 288 333 403 +for_var (229) + on left: 337 338, on right: 299 +f_marg (230) + on left: 339 340, on right: 341 342 +f_marg_list (231) + on left: 341 342, on right: 342 343 344 345 346 347 349 351 +f_margs (232) + on left: 343 344 345 346 347 348 349 350 351, on right: 340 501 +block_param (233) + on left: 352 353 354 355 356 357 358 359 360 361 362 363 364 365 + 366, on right: 371 +opt_block_param (234) + on left: 367 368, on right: 51 385 399 401 +block_param_def (235) + on left: 369 370 371, on right: 368 +opt_bv_decl (236) + on left: 372 373, on right: 369 371 380 +bv_decls (237) + on left: 374 375, on right: 373 375 +bvar (238) + on left: 376 377, on right: 374 375 +lambda (239) + on left: 379, on right: 286 +@24 (240) + on left: 378, on right: 379 +f_larglist (241) + on left: 380 381, on right: 379 +lambda_body (242) + on left: 382 383, on right: 379 +do_block (243) + on left: 385, on right: 386 +@25 (244) + on left: 384, on right: 385 +block_call (245) + on left: 386 387 388, on right: 47 48 49 387 388 +method_call (246) + on left: 389 390 391 392 393 394 395 396 397, on right: 284 285 +brace_block (247) + on left: 399 401, on right: 283 285 +@26 (248) + on left: 398, on right: 399 +@27 (249) + on left: 400, on right: 401 +case_body (250) + on left: 402, on right: 295 296 404 +cases (251) + on left: 403 404, on right: 402 +opt_rescue (252) + on left: 405 406, on right: 3 405 +exc_list (253) + on left: 407 408 409, on right: 405 +exc_var (254) + on left: 410 411, on right: 405 +opt_ensure (255) + on left: 412 413, on right: 3 +literal (256) + on left: 414 415 416, on right: 257 +strings (257) + on left: 417, on right: 258 +string (258) + on left: 418 419 420, on right: 417 420 +string1 (259) + on left: 421, on right: 419 420 +xstring (260) + on left: 422, on right: 259 +regexp (261) + on left: 423, on right: 260 +words (262) + on left: 424 425, on right: 261 +word_list (263) + on left: 426 427, on right: 425 427 +word (264) + on left: 428 429, on right: 427 429 +qwords (265) + on left: 430 431, on right: 262 +qword_list (266) + on left: 432 433, on right: 431 433 +string_contents (267) + on left: 434 435, on right: 421 435 +xstring_contents (268) + on left: 436 437, on right: 422 423 437 452 +string_content (269) + on left: 438 440 442, on right: 428 429 435 437 +@28 (270) + on left: 439, on right: 440 +@29 (271) + on left: 441, on right: 442 +string_dvar (272) + on left: 443 444 445 446, on right: 440 +symbol (273) + on left: 447, on right: 107 415 +sym (274) + on left: 448 449 450 451, on right: 447 +dsym (275) + on left: 452, on right: 109 416 +numeric (276) + on left: 453 454 455 456, on right: 414 +variable (277) + on left: 457 458 459 460 461 462 463 464 465 466 467 468, + on right: 80 88 469 470 +var_ref (278) + on left: 469, on right: 263 519 +var_lhs (279) + on left: 470, on right: 25 185 186 +backref (280) + on left: 471 472, on right: 30 87 95 193 264 446 +superclass (281) + on left: 473 475 476, on right: 301 +@30 (282) + on left: 474, on right: 475 +f_arglist (283) + on left: 477 478, on right: 308 311 +f_args (284) + on left: 479 480 481 482 483 484 485 486 487 488 489 490 491 492 + 493, on right: 380 381 477 478 +f_bad_arg (285) + on left: 494 495 496 497, on right: 377 498 +f_norm_arg (286) + on left: 498 499, on right: 339 344 345 348 349 500 +f_arg_item (287) + on left: 500 501, on right: 502 503 +f_arg (288) + on left: 502 503, on right: 352 353 354 355 356 357 358 359 361 + 363 365 479 480 481 482 483 484 485 487 489 491 503 +f_opt (289) + on left: 504, on right: 508 509 +f_block_opt (290) + on left: 505, on right: 506 507 +f_block_optarg (291) + on left: 506 507, on right: 352 353 354 355 360 361 362 363 507 +f_optarg (292) + on left: 508 509, on right: 479 480 481 482 486 487 488 489 509 +restarg_mark (293) + on left: 510 511, on right: 512 513 +f_rest_arg (294) + on left: 512 513, on right: 352 353 356 358 360 361 364 365 479 + 480 483 484 486 487 490 491 +blkarg_mark (295) + on left: 514 515, on right: 516 +f_block_arg (296) + on left: 516, on right: 366 492 517 +opt_f_block_arg (297) + on left: 517 518, on right: 352 353 354 355 356 358 359 360 361 + 362 363 364 365 479 480 481 482 483 484 485 486 487 488 489 490 + 491 +singleton (298) + on left: 519 521, on right: 311 +@31 (299) + on left: 520, on right: 521 +assoc_list (300) + on left: 522 523, on right: 274 +assocs (301) + on left: 524 525, on right: 232 233 241 242 523 525 +assoc (302) + on left: 526 527, on right: 524 525 +operation (303) + on left: 528 529 530, on right: 52 53 283 389 +operation2 (304) + on left: 531 532 533 534, on right: 48 49 54 55 56 57 387 388 390 + 391 +operation3 (305) + on left: 535 536 537, on right: 392 +dot_or_colon (306) + on left: 538 539, on right: 311 +opt_terms (307) + on left: 540 541, on right: 4 295 296 +opt_nl (308) + on left: 542 543, on right: 38 226 227 280 544 545 +rparen (309) + on left: 544, on right: 61 63 75 234 269 276 277 280 281 282 340 + 380 477 501 521 +rbracket (310) + on left: 545, on right: 26 81 89 187 397 +trailer (311) + on left: 546 547 548, on right: 231 232 233 523 +term (312) + on left: 549 550, on right: 304 328 330 331 473 475 476 478 551 +terms (313) + on left: 551 552, on right: 7 541 552 +none (314) + on left: 553, on right: 5 230 235 237 249 335 367 372 406 409 411 + 413 518 522 + + +state 0 + + 0 $accept: . program $end + + $default reduce using rule 1 (@1) + + program go to state 1 + @1 go to state 2 + + +state 1 + + 0 $accept: program . $end + + $end shift, and go to state 3 + + +state 2 + + 2 program: @1 . compstmt + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + $end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 64 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 3 + + 0 $accept: program $end . + + $default accept + + +state 4 + + 8 stmts: error . stmt + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + stmt go to state 109 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + + +state 5 + + 324 k_class: keyword_class . + + $default reduce using rule 324 (k_class) + + +state 6 + + 325 k_module: keyword_module . + + $default reduce using rule 325 (k_module) + + +state 7 + + 326 k_def: keyword_def . + + $default reduce using rule 326 (k_def) + + +state 8 + + 14 stmt: keyword_undef . undef_list + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tCONSTANT shift, and go to state 153 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + tSYMBEG shift, and go to state 55 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + fname go to state 183 + fsym go to state 184 + fitem go to state 185 + undef_list go to state 186 + op go to state 187 + reswords go to state 188 + symbol go to state 189 + dsym go to state 190 + + +state 9 + + 317 k_begin: keyword_begin . + + $default reduce using rule 317 (k_begin) + + +state 10 + + 318 k_if: keyword_if . + + $default reduce using rule 318 (k_if) + + +state 11 + + 319 k_unless: keyword_unless . + + $default reduce using rule 319 (k_unless) + + +state 12 + + 322 k_case: keyword_case . + + $default reduce using rule 322 (k_case) + + +state 13 + + 320 k_while: keyword_while . + + $default reduce using rule 320 (k_while) + + +state 14 + + 321 k_until: keyword_until . + + $default reduce using rule 321 (k_until) + + +state 15 + + 323 k_for: keyword_for . + + $default reduce using rule 323 (k_for) + + +state 16 + + 45 command_call: keyword_break . call_args + 312 primary: keyword_break . + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 312 (primary) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + call_args go to state 205 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + + +state 17 + + 46 command_call: keyword_next . call_args + 313 primary: keyword_next . + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 313 (primary) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + call_args go to state 214 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + + +state 18 + + 314 primary: keyword_redo . + + $default reduce using rule 314 (primary) + + +state 19 + + 315 primary: keyword_retry . + + $default reduce using rule 315 (primary) + + +state 20 + + 44 command_call: keyword_return . call_args + 275 primary: keyword_return . + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 275 (primary) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + call_args go to state 215 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + + +state 21 + + 59 command: keyword_yield . command_args + 276 primary: keyword_yield . '(' call_args rparen + 277 | keyword_yield . '(' rparen + 278 | keyword_yield . + + '(' shift, and go to state 216 + + $end reduce using rule 278 (primary) + keyword_rescue reduce using rule 278 (primary) + keyword_ensure reduce using rule 278 (primary) + keyword_end reduce using rule 278 (primary) + keyword_then reduce using rule 278 (primary) + keyword_elsif reduce using rule 278 (primary) + keyword_else reduce using rule 278 (primary) + keyword_when reduce using rule 278 (primary) + keyword_do_cond reduce using rule 278 (primary) + keyword_do_block reduce using rule 278 (primary) + keyword_and reduce using rule 278 (primary) + keyword_or reduce using rule 278 (primary) + modifier_if reduce using rule 278 (primary) + modifier_unless reduce using rule 278 (primary) + modifier_while reduce using rule 278 (primary) + modifier_until reduce using rule 278 (primary) + modifier_rescue reduce using rule 278 (primary) + tPOW reduce using rule 278 (primary) + tCMP reduce using rule 278 (primary) + tEQ reduce using rule 278 (primary) + tEQQ reduce using rule 278 (primary) + tNEQ reduce using rule 278 (primary) + tGEQ reduce using rule 278 (primary) + tLEQ reduce using rule 278 (primary) + tANDOP reduce using rule 278 (primary) + tOROP reduce using rule 278 (primary) + tMATCH reduce using rule 278 (primary) + tNMATCH reduce using rule 278 (primary) + tDOT2 reduce using rule 278 (primary) + tDOT3 reduce using rule 278 (primary) + tLSHFT reduce using rule 278 (primary) + tRSHFT reduce using rule 278 (primary) + tCOLON2 reduce using rule 278 (primary) + tASSOC reduce using rule 278 (primary) + tLBRACE_ARG reduce using rule 278 (primary) + '?' reduce using rule 278 (primary) + '>' reduce using rule 278 (primary) + '<' reduce using rule 278 (primary) + '|' reduce using rule 278 (primary) + '^' reduce using rule 278 (primary) + '&' reduce using rule 278 (primary) + '+' reduce using rule 278 (primary) + '-' reduce using rule 278 (primary) + '*' reduce using rule 278 (primary) + '/' reduce using rule 278 (primary) + '%' reduce using rule 278 (primary) + '}' reduce using rule 278 (primary) + '[' reduce using rule 278 (primary) + '.' reduce using rule 278 (primary) + ',' reduce using rule 278 (primary) + ')' reduce using rule 278 (primary) + ']' reduce using rule 278 (primary) + ';' reduce using rule 278 (primary) + '\n' reduce using rule 278 (primary) + $default reduce using rule 244 (@7) + + command_args go to state 217 + @7 go to state 218 + + +state 22 + + 58 command: keyword_super . command_args + 395 method_call: keyword_super . paren_args + 396 | keyword_super . + + '(' shift, and go to state 219 + + $end reduce using rule 396 (method_call) + keyword_rescue reduce using rule 396 (method_call) + keyword_ensure reduce using rule 396 (method_call) + keyword_end reduce using rule 396 (method_call) + keyword_then reduce using rule 396 (method_call) + keyword_elsif reduce using rule 396 (method_call) + keyword_else reduce using rule 396 (method_call) + keyword_when reduce using rule 396 (method_call) + keyword_do reduce using rule 396 (method_call) + keyword_do_cond reduce using rule 396 (method_call) + keyword_do_block reduce using rule 396 (method_call) + keyword_and reduce using rule 396 (method_call) + keyword_or reduce using rule 396 (method_call) + modifier_if reduce using rule 396 (method_call) + modifier_unless reduce using rule 396 (method_call) + modifier_while reduce using rule 396 (method_call) + modifier_until reduce using rule 396 (method_call) + modifier_rescue reduce using rule 396 (method_call) + tPOW reduce using rule 396 (method_call) + tCMP reduce using rule 396 (method_call) + tEQ reduce using rule 396 (method_call) + tEQQ reduce using rule 396 (method_call) + tNEQ reduce using rule 396 (method_call) + tGEQ reduce using rule 396 (method_call) + tLEQ reduce using rule 396 (method_call) + tANDOP reduce using rule 396 (method_call) + tOROP reduce using rule 396 (method_call) + tMATCH reduce using rule 396 (method_call) + tNMATCH reduce using rule 396 (method_call) + tDOT2 reduce using rule 396 (method_call) + tDOT3 reduce using rule 396 (method_call) + tLSHFT reduce using rule 396 (method_call) + tRSHFT reduce using rule 396 (method_call) + tCOLON2 reduce using rule 396 (method_call) + tASSOC reduce using rule 396 (method_call) + tLBRACE_ARG reduce using rule 396 (method_call) + '?' reduce using rule 396 (method_call) + '>' reduce using rule 396 (method_call) + '<' reduce using rule 396 (method_call) + '|' reduce using rule 396 (method_call) + '^' reduce using rule 396 (method_call) + '&' reduce using rule 396 (method_call) + '+' reduce using rule 396 (method_call) + '-' reduce using rule 396 (method_call) + '*' reduce using rule 396 (method_call) + '/' reduce using rule 396 (method_call) + '%' reduce using rule 396 (method_call) + '{' reduce using rule 396 (method_call) + '}' reduce using rule 396 (method_call) + '[' reduce using rule 396 (method_call) + '.' reduce using rule 396 (method_call) + ',' reduce using rule 396 (method_call) + ')' reduce using rule 396 (method_call) + ']' reduce using rule 396 (method_call) + ';' reduce using rule 396 (method_call) + '\n' reduce using rule 396 (method_call) + $default reduce using rule 244 (@7) + + paren_args go to state 220 + command_args go to state 221 + @7 go to state 218 + + +state 23 + + 463 variable: keyword_self . + + $default reduce using rule 463 (variable) + + +state 24 + + 462 variable: keyword_nil . + + $default reduce using rule 462 (variable) + + +state 25 + + 464 variable: keyword_true . + + $default reduce using rule 464 (variable) + + +state 26 + + 465 variable: keyword_false . + + $default reduce using rule 465 (variable) + + +state 27 + + 38 expr: keyword_not . opt_nl expr + 281 primary: keyword_not . '(' expr rparen + 282 | keyword_not . '(' rparen + + '(' shift, and go to state 222 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 224 + + +state 28 + + 10 stmt: keyword_alias . fitem @2 fitem + 11 | keyword_alias . tGVAR tGVAR + 12 | keyword_alias . tGVAR tBACK_REF + 13 | keyword_alias . tGVAR tNTH_REF + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tGVAR shift, and go to state 225 + tCONSTANT shift, and go to state 153 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + tSYMBEG shift, and go to state 55 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + fname go to state 183 + fsym go to state 184 + fitem go to state 226 + op go to state 187 + reswords go to state 188 + symbol go to state 189 + dsym go to state 190 + + +state 29 + + 226 arg: keyword_defined . opt_nl @6 arg + 280 primary: keyword_defined . opt_nl '(' @10 expr rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 227 + + +state 30 + + 21 stmt: keyword_BEGIN . @3 '{' compstmt '}' + + $default reduce using rule 20 (@3) + + @3 go to state 228 + + +state 31 + + 22 stmt: keyword_END . '{' compstmt '}' + + '{' shift, and go to state 229 + + +state 32 + + 467 variable: keyword__LINE__ . + + $default reduce using rule 467 (variable) + + +state 33 + + 466 variable: keyword__FILE__ . + + $default reduce using rule 466 (variable) + + +state 34 + + 468 variable: keyword__ENCODING__ . + + $default reduce using rule 468 (variable) + + +state 35 + + 457 variable: tIDENTIFIER . + 528 operation: tIDENTIFIER . + + keyword_class reduce using rule 528 (operation) + keyword_module reduce using rule 528 (operation) + keyword_def reduce using rule 528 (operation) + keyword_begin reduce using rule 528 (operation) + keyword_if reduce using rule 528 (operation) + keyword_unless reduce using rule 528 (operation) + keyword_case reduce using rule 528 (operation) + keyword_while reduce using rule 528 (operation) + keyword_until reduce using rule 528 (operation) + keyword_for reduce using rule 528 (operation) + keyword_break reduce using rule 528 (operation) + keyword_next reduce using rule 528 (operation) + keyword_redo reduce using rule 528 (operation) + keyword_retry reduce using rule 528 (operation) + keyword_do reduce using rule 528 (operation) + keyword_return reduce using rule 528 (operation) + keyword_yield reduce using rule 528 (operation) + keyword_super reduce using rule 528 (operation) + keyword_self reduce using rule 528 (operation) + keyword_nil reduce using rule 528 (operation) + keyword_true reduce using rule 528 (operation) + keyword_false reduce using rule 528 (operation) + keyword_not reduce using rule 528 (operation) + keyword_defined reduce using rule 528 (operation) + keyword__LINE__ reduce using rule 528 (operation) + keyword__FILE__ reduce using rule 528 (operation) + keyword__ENCODING__ reduce using rule 528 (operation) + tIDENTIFIER reduce using rule 528 (operation) + tFID reduce using rule 528 (operation) + tGVAR reduce using rule 528 (operation) + tIVAR reduce using rule 528 (operation) + tCONSTANT reduce using rule 528 (operation) + tCVAR reduce using rule 528 (operation) + tLABEL reduce using rule 528 (operation) + tINTEGER reduce using rule 528 (operation) + tFLOAT reduce using rule 528 (operation) + tCHAR reduce using rule 528 (operation) + tNTH_REF reduce using rule 528 (operation) + tBACK_REF reduce using rule 528 (operation) + tUPLUS reduce using rule 528 (operation) + tUMINUS reduce using rule 528 (operation) + tCOLON3 reduce using rule 528 (operation) + tLPAREN reduce using rule 528 (operation) + tLPAREN_ARG reduce using rule 528 (operation) + tLBRACK reduce using rule 528 (operation) + tLBRACE reduce using rule 528 (operation) + tSTAR reduce using rule 528 (operation) + tAMPER reduce using rule 528 (operation) + tLAMBDA reduce using rule 528 (operation) + tSYMBEG reduce using rule 528 (operation) + tSTRING_BEG reduce using rule 528 (operation) + tXSTRING_BEG reduce using rule 528 (operation) + tREGEXP_BEG reduce using rule 528 (operation) + tWORDS_BEG reduce using rule 528 (operation) + tQWORDS_BEG reduce using rule 528 (operation) + tUMINUS_NUM reduce using rule 528 (operation) + '!' reduce using rule 528 (operation) + '~' reduce using rule 528 (operation) + '{' reduce using rule 528 (operation) + '(' reduce using rule 528 (operation) + $default reduce using rule 457 (variable) + + +state 36 + + 265 primary: tFID . + 530 operation: tFID . + + $end reduce using rule 265 (primary) + keyword_rescue reduce using rule 265 (primary) + keyword_ensure reduce using rule 265 (primary) + keyword_end reduce using rule 265 (primary) + keyword_then reduce using rule 265 (primary) + keyword_elsif reduce using rule 265 (primary) + keyword_else reduce using rule 265 (primary) + keyword_when reduce using rule 265 (primary) + keyword_do_cond reduce using rule 265 (primary) + keyword_do_block reduce using rule 265 (primary) + keyword_do_LAMBDA reduce using rule 265 (primary) + keyword_and reduce using rule 265 (primary) + keyword_or reduce using rule 265 (primary) + modifier_if reduce using rule 265 (primary) + modifier_unless reduce using rule 265 (primary) + modifier_while reduce using rule 265 (primary) + modifier_until reduce using rule 265 (primary) + modifier_rescue reduce using rule 265 (primary) + tPOW reduce using rule 265 (primary) + tCMP reduce using rule 265 (primary) + tEQ reduce using rule 265 (primary) + tEQQ reduce using rule 265 (primary) + tNEQ reduce using rule 265 (primary) + tGEQ reduce using rule 265 (primary) + tLEQ reduce using rule 265 (primary) + tANDOP reduce using rule 265 (primary) + tOROP reduce using rule 265 (primary) + tMATCH reduce using rule 265 (primary) + tNMATCH reduce using rule 265 (primary) + tDOT2 reduce using rule 265 (primary) + tDOT3 reduce using rule 265 (primary) + tLSHFT reduce using rule 265 (primary) + tRSHFT reduce using rule 265 (primary) + tCOLON2 reduce using rule 265 (primary) + tASSOC reduce using rule 265 (primary) + tLBRACE_ARG reduce using rule 265 (primary) + tLAMBEG reduce using rule 265 (primary) + '?' reduce using rule 265 (primary) + ':' reduce using rule 265 (primary) + '>' reduce using rule 265 (primary) + '<' reduce using rule 265 (primary) + '|' reduce using rule 265 (primary) + '^' reduce using rule 265 (primary) + '&' reduce using rule 265 (primary) + '+' reduce using rule 265 (primary) + '-' reduce using rule 265 (primary) + '*' reduce using rule 265 (primary) + '/' reduce using rule 265 (primary) + '%' reduce using rule 265 (primary) + '}' reduce using rule 265 (primary) + '[' reduce using rule 265 (primary) + '.' reduce using rule 265 (primary) + ',' reduce using rule 265 (primary) + ')' reduce using rule 265 (primary) + ']' reduce using rule 265 (primary) + ';' reduce using rule 265 (primary) + '\n' reduce using rule 265 (primary) + $default reduce using rule 530 (operation) + + +state 37 + + 459 variable: tGVAR . + + $default reduce using rule 459 (variable) + + +state 38 + + 458 variable: tIVAR . + + $default reduce using rule 458 (variable) + + +state 39 + + 460 variable: tCONSTANT . + 529 operation: tCONSTANT . + + keyword_class reduce using rule 529 (operation) + keyword_module reduce using rule 529 (operation) + keyword_def reduce using rule 529 (operation) + keyword_begin reduce using rule 529 (operation) + keyword_if reduce using rule 529 (operation) + keyword_unless reduce using rule 529 (operation) + keyword_case reduce using rule 529 (operation) + keyword_while reduce using rule 529 (operation) + keyword_until reduce using rule 529 (operation) + keyword_for reduce using rule 529 (operation) + keyword_break reduce using rule 529 (operation) + keyword_next reduce using rule 529 (operation) + keyword_redo reduce using rule 529 (operation) + keyword_retry reduce using rule 529 (operation) + keyword_do reduce using rule 529 (operation) + keyword_return reduce using rule 529 (operation) + keyword_yield reduce using rule 529 (operation) + keyword_super reduce using rule 529 (operation) + keyword_self reduce using rule 529 (operation) + keyword_nil reduce using rule 529 (operation) + keyword_true reduce using rule 529 (operation) + keyword_false reduce using rule 529 (operation) + keyword_not reduce using rule 529 (operation) + keyword_defined reduce using rule 529 (operation) + keyword__LINE__ reduce using rule 529 (operation) + keyword__FILE__ reduce using rule 529 (operation) + keyword__ENCODING__ reduce using rule 529 (operation) + tIDENTIFIER reduce using rule 529 (operation) + tFID reduce using rule 529 (operation) + tGVAR reduce using rule 529 (operation) + tIVAR reduce using rule 529 (operation) + tCONSTANT reduce using rule 529 (operation) + tCVAR reduce using rule 529 (operation) + tLABEL reduce using rule 529 (operation) + tINTEGER reduce using rule 529 (operation) + tFLOAT reduce using rule 529 (operation) + tCHAR reduce using rule 529 (operation) + tNTH_REF reduce using rule 529 (operation) + tBACK_REF reduce using rule 529 (operation) + tUPLUS reduce using rule 529 (operation) + tUMINUS reduce using rule 529 (operation) + tCOLON3 reduce using rule 529 (operation) + tLPAREN reduce using rule 529 (operation) + tLPAREN_ARG reduce using rule 529 (operation) + tLBRACK reduce using rule 529 (operation) + tLBRACE reduce using rule 529 (operation) + tSTAR reduce using rule 529 (operation) + tAMPER reduce using rule 529 (operation) + tLAMBDA reduce using rule 529 (operation) + tSYMBEG reduce using rule 529 (operation) + tSTRING_BEG reduce using rule 529 (operation) + tXSTRING_BEG reduce using rule 529 (operation) + tREGEXP_BEG reduce using rule 529 (operation) + tWORDS_BEG reduce using rule 529 (operation) + tQWORDS_BEG reduce using rule 529 (operation) + tUMINUS_NUM reduce using rule 529 (operation) + '!' reduce using rule 529 (operation) + '~' reduce using rule 529 (operation) + '{' reduce using rule 529 (operation) + '(' reduce using rule 529 (operation) + $default reduce using rule 460 (variable) + + +state 40 + + 461 variable: tCVAR . + + $default reduce using rule 461 (variable) + + +state 41 + + 453 numeric: tINTEGER . + + $default reduce using rule 453 (numeric) + + +state 42 + + 454 numeric: tFLOAT . + + $default reduce using rule 454 (numeric) + + +state 43 + + 418 string: tCHAR . + + $default reduce using rule 418 (string) + + +state 44 + + 471 backref: tNTH_REF . + + $default reduce using rule 471 (backref) + + +state 45 + + 472 backref: tBACK_REF . + + $default reduce using rule 472 (backref) + + +state 46 + + 204 arg: tUPLUS . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 232 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 47 + + 205 arg: tUMINUS . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 235 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 48 + + 86 mlhs_node: tCOLON3 . tCONSTANT + 94 lhs: tCOLON3 . tCONSTANT + 192 arg: tCOLON3 . tCONSTANT tOP_ASGN arg + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 236 + + +state 49 + + 61 mlhs: tLPAREN . mlhs_inner rparen + 75 mlhs_item: tLPAREN . mlhs_inner rparen + 270 primary: tLPAREN . compstmt ')' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 237 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 238 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_inner go to state 239 + mlhs_basic go to state 240 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 50 + + 269 primary: tLPAREN_ARG . expr @9 rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 241 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 51 + + 273 primary: tLBRACK . aref_args ']' + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + aref_args go to state 242 + args go to state 243 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 244 + assoc go to state 213 + operation go to state 234 + none go to state 245 + + +state 52 + + 274 primary: tLBRACE . assoc_list '}' + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 246 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assoc_list go to state 247 + assocs go to state 248 + assoc go to state 213 + operation go to state 234 + none go to state 249 + + +state 53 + + 70 mlhs_basic: tSTAR . mlhs_node + 71 | tSTAR . mlhs_node ',' mlhs_post + 72 | tSTAR . + 73 | tSTAR . ',' mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + ',' shift, and go to state 253 + + $default reduce using rule 72 (mlhs_basic) + + mlhs_node go to state 254 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 54 + + 286 primary: tLAMBDA . lambda + + $default reduce using rule 378 (@24) + + lambda go to state 259 + @24 go to state 260 + + +state 55 + + 447 symbol: tSYMBEG . sym + 452 dsym: tSYMBEG . xstring_contents tSTRING_END + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tGVAR shift, and go to state 261 + tIVAR shift, and go to state 262 + tCONSTANT shift, and go to state 153 + tCVAR shift, and go to state 263 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + $default reduce using rule 436 (xstring_contents) + + fname go to state 264 + op go to state 187 + reswords go to state 188 + xstring_contents go to state 265 + sym go to state 266 + + +state 56 + + 421 string1: tSTRING_BEG . string_contents tSTRING_END + + $default reduce using rule 434 (string_contents) + + string_contents go to state 267 + + +state 57 + + 422 xstring: tXSTRING_BEG . xstring_contents tSTRING_END + + $default reduce using rule 436 (xstring_contents) + + xstring_contents go to state 268 + + +state 58 + + 423 regexp: tREGEXP_BEG . xstring_contents tREGEXP_END + + $default reduce using rule 436 (xstring_contents) + + xstring_contents go to state 269 + + +state 59 + + 424 words: tWORDS_BEG . ' ' tSTRING_END + 425 | tWORDS_BEG . word_list tSTRING_END + + ' ' shift, and go to state 270 + + $default reduce using rule 426 (word_list) + + word_list go to state 271 + + +state 60 + + 430 qwords: tQWORDS_BEG . ' ' tSTRING_END + 431 | tQWORDS_BEG . qword_list tSTRING_END + + ' ' shift, and go to state 272 + + $default reduce using rule 432 (qword_list) + + qword_list go to state 273 + + +state 61 + + 202 arg: tUMINUS_NUM . tINTEGER tPOW arg + 203 | tUMINUS_NUM . tFLOAT tPOW arg + 455 numeric: tUMINUS_NUM . tINTEGER + 456 | tUMINUS_NUM . tFLOAT + + tINTEGER shift, and go to state 274 + tFLOAT shift, and go to state 275 + + +state 62 + + 39 expr: '!' . command_call + 219 arg: '!' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 276 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 277 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 63 + + 220 arg: '~' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 278 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 64 + + 2 program: @1 compstmt . + + $default reduce using rule 2 (program) + + +state 65 + + 4 compstmt: stmts . opt_terms + 7 stmts: stmts . terms stmt + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + $default reduce using rule 540 (opt_terms) + + opt_terms go to state 281 + term go to state 282 + terms go to state 283 + + +state 66 + + 6 stmts: stmt . + 15 stmt: stmt . modifier_if expr_value + 16 | stmt . modifier_unless expr_value + 17 | stmt . modifier_while expr_value + 18 | stmt . modifier_until expr_value + 19 | stmt . modifier_rescue stmt + + modifier_if shift, and go to state 284 + modifier_unless shift, and go to state 285 + modifier_while shift, and go to state 286 + modifier_until shift, and go to state 287 + modifier_rescue shift, and go to state 288 + + $default reduce using rule 6 (stmts) + + +state 67 + + 34 stmt: expr . + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + + $default reduce using rule 34 (stmt) + + +state 68 + + 35 expr: command_call . + + $default reduce using rule 35 (expr) + + +state 69 + + 43 command_call: block_command . + + $default reduce using rule 43 (command_call) + + +state 70 + + 42 command_call: command . + 386 block_call: command . do_block + + keyword_do_block shift, and go to state 291 + + $default reduce using rule 42 (command_call) + + do_block go to state 292 + + +state 71 + + 24 stmt: mlhs . '=' command_call + 32 | mlhs . '=' arg_value + 33 | mlhs . '=' mrhs + + '=' shift, and go to state 293 + + +state 72 + + 60 mlhs: mlhs_basic . + + $default reduce using rule 60 (mlhs) + + +state 73 + + 76 mlhs_head: mlhs_item . ',' + + ',' shift, and go to state 294 + + +state 74 + + 64 mlhs_basic: mlhs_head . + 65 | mlhs_head . mlhs_item + 66 | mlhs_head . tSTAR mlhs_node + 67 | mlhs_head . tSTAR mlhs_node ',' mlhs_post + 68 | mlhs_head . tSTAR + 69 | mlhs_head . tSTAR ',' mlhs_post + 77 mlhs_head: mlhs_head . mlhs_item ',' + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 296 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + $default reduce using rule 64 (mlhs_basic) + + mlhs_item go to state 297 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 75 + + 74 mlhs_item: mlhs_node . + + $default reduce using rule 74 (mlhs_item) + + +state 76 + + 23 stmt: lhs . '=' command_call + 31 | lhs . '=' mrhs + 183 arg: lhs . '=' arg + 184 | lhs . '=' arg modifier_rescue arg + + '=' shift, and go to state 298 + + +state 77 + + 40 expr: arg . + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 40 (expr) + + +state 78 + + 228 arg: primary . + 316 primary_value: primary . + + tCOLON2 reduce using rule 316 (primary_value) + '[' reduce using rule 316 (primary_value) + '.' reduce using rule 316 (primary_value) + $default reduce using rule 228 (arg) + + +state 79 + + 26 stmt: primary_value . '[' opt_call_args rbracket tOP_ASGN command_call + 27 | primary_value . '.' tIDENTIFIER tOP_ASGN command_call + 28 | primary_value . '.' tCONSTANT tOP_ASGN command_call + 29 | primary_value . tCOLON2 tIDENTIFIER tOP_ASGN command_call + 54 command: primary_value . '.' operation2 command_args + 55 | primary_value . '.' operation2 command_args cmd_brace_block + 56 | primary_value . tCOLON2 operation2 command_args + 57 | primary_value . tCOLON2 operation2 command_args cmd_brace_block + 81 mlhs_node: primary_value . '[' opt_call_args rbracket + 82 | primary_value . '.' tIDENTIFIER + 83 | primary_value . tCOLON2 tIDENTIFIER + 84 | primary_value . '.' tCONSTANT + 85 | primary_value . tCOLON2 tCONSTANT + 89 lhs: primary_value . '[' opt_call_args rbracket + 90 | primary_value . '.' tIDENTIFIER + 91 | primary_value . tCOLON2 tIDENTIFIER + 92 | primary_value . '.' tCONSTANT + 93 | primary_value . tCOLON2 tCONSTANT + 187 arg: primary_value . '[' opt_call_args rbracket tOP_ASGN arg + 188 | primary_value . '.' tIDENTIFIER tOP_ASGN arg + 189 | primary_value . '.' tCONSTANT tOP_ASGN arg + 190 | primary_value . tCOLON2 tIDENTIFIER tOP_ASGN arg + 191 | primary_value . tCOLON2 tCONSTANT tOP_ASGN arg + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 325 + '[' shift, and go to state 326 + '.' shift, and go to state 327 + + +state 80 + + 267 primary: k_begin . @8 bodystmt k_end + + $default reduce using rule 266 (@8) + + @8 go to state 328 + + +state 81 + + 287 primary: k_if . expr_value then compstmt if_tail k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 330 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 82 + + 288 primary: k_unless . expr_value then compstmt opt_else k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 331 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 83 + + 291 primary: k_while . @11 expr_value do @12 compstmt k_end + + $default reduce using rule 289 (@11) + + @11 go to state 332 + + +state 84 + + 294 primary: k_until . @13 expr_value do @14 compstmt k_end + + $default reduce using rule 292 (@13) + + @13 go to state 333 + + +state 85 + + 295 primary: k_case . expr_value opt_terms case_body k_end + 296 | k_case . opt_terms case_body k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + $default reduce using rule 540 (opt_terms) + + expr go to state 329 + expr_value go to state 334 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + opt_terms go to state 335 + term go to state 282 + terms go to state 336 + + +state 86 + + 299 primary: k_for . for_var keyword_in @15 expr_value do @16 compstmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 337 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs go to state 338 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 339 + primary go to state 255 + primary_value go to state 340 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + for_var go to state 341 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 342 + var_ref go to state 104 + backref go to state 343 + operation go to state 234 + + +state 87 + + 301 primary: k_class . cpath superclass @17 bodystmt k_end + 304 | k_class . tLSHFT expr @18 term @19 bodystmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 344 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 345 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tLSHFT shift, and go to state 346 + tCOLON3 shift, and go to state 347 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + cname go to state 348 + cpath go to state 349 + primary go to state 255 + primary_value go to state 350 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 351 + var_ref go to state 104 + backref go to state 352 + operation go to state 234 + + +state 88 + + 306 primary: k_module . cpath @20 bodystmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 344 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 345 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 347 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + cname go to state 348 + cpath go to state 353 + primary go to state 255 + primary_value go to state 350 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 351 + var_ref go to state 104 + backref go to state 352 + operation go to state 234 + + +state 89 + + 308 primary: k_def . fname @21 f_arglist bodystmt k_end + 311 | k_def . singleton dot_or_colon @22 fname @23 f_arglist bodystmt k_end + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 354 + keyword_nil shift, and go to state 355 + keyword_true shift, and go to state 356 + keyword_false shift, and go to state 357 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 358 + keyword__FILE__ shift, and go to state 359 + keyword__ENCODING__ shift, and go to state 360 + tIDENTIFIER shift, and go to state 361 + tFID shift, and go to state 152 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 362 + tCVAR shift, and go to state 40 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 363 + + fname go to state 364 + op go to state 187 + reswords go to state 188 + variable go to state 351 + var_ref go to state 365 + singleton go to state 366 + + +state 90 + + 47 block_command: block_call . + 48 | block_call . '.' operation2 command_args + 49 | block_call . tCOLON2 operation2 command_args + 387 block_call: block_call . '.' operation2 opt_paren_args + 388 | block_call . tCOLON2 operation2 opt_paren_args + + tCOLON2 shift, and go to state 367 + '.' shift, and go to state 368 + + $default reduce using rule 47 (block_command) + + +state 91 + + 284 primary: method_call . + 285 | method_call . brace_block + + keyword_do shift, and go to state 369 + '{' shift, and go to state 370 + + $default reduce using rule 284 (primary) + + brace_block go to state 371 + + +state 92 + + 257 primary: literal . + + $default reduce using rule 257 (primary) + + +state 93 + + 258 primary: strings . + + $default reduce using rule 258 (primary) + + +state 94 + + 417 strings: string . + 420 string: string . string1 + + tSTRING_BEG shift, and go to state 56 + + $default reduce using rule 417 (strings) + + string1 go to state 372 + + +state 95 + + 419 string: string1 . + + $default reduce using rule 419 (string) + + +state 96 + + 259 primary: xstring . + + $default reduce using rule 259 (primary) + + +state 97 + + 260 primary: regexp . + + $default reduce using rule 260 (primary) + + +state 98 + + 261 primary: words . + + $default reduce using rule 261 (primary) + + +state 99 + + 262 primary: qwords . + + $default reduce using rule 262 (primary) + + +state 100 + + 415 literal: symbol . + + $default reduce using rule 415 (literal) + + +state 101 + + 416 literal: dsym . + + $default reduce using rule 416 (literal) + + +state 102 + + 414 literal: numeric . + + $default reduce using rule 414 (literal) + + +state 103 + + 80 mlhs_node: variable . + 88 lhs: variable . + 469 var_ref: variable . + 470 var_lhs: variable . + + tOP_ASGN reduce using rule 470 (var_lhs) + '=' reduce using rule 88 (lhs) + ',' reduce using rule 80 (mlhs_node) + $default reduce using rule 469 (var_ref) + + +state 104 + + 263 primary: var_ref . + + $default reduce using rule 263 (primary) + + +state 105 + + 25 stmt: var_lhs . tOP_ASGN command_call + 185 arg: var_lhs . tOP_ASGN arg + 186 | var_lhs . tOP_ASGN arg modifier_rescue arg + + tOP_ASGN shift, and go to state 373 + + +state 106 + + 30 stmt: backref . tOP_ASGN command_call + 87 mlhs_node: backref . + 95 lhs: backref . + 193 arg: backref . tOP_ASGN arg + 264 primary: backref . + + tOP_ASGN shift, and go to state 374 + + '=' reduce using rule 95 (lhs) + ',' reduce using rule 87 (mlhs_node) + $default reduce using rule 264 (primary) + + +state 107 + + 52 command: operation . command_args + 53 | operation . command_args cmd_brace_block + 283 primary: operation . brace_block + 389 method_call: operation . paren_args + + keyword_do shift, and go to state 369 + '{' shift, and go to state 370 + '(' shift, and go to state 219 + + $default reduce using rule 244 (@7) + + paren_args go to state 375 + command_args go to state 376 + @7 go to state 218 + brace_block go to state 377 + + +state 108 + + 5 stmts: none . + + $default reduce using rule 5 (stmts) + + +state 109 + + 8 stmts: error stmt . + 15 stmt: stmt . modifier_if expr_value + 16 | stmt . modifier_unless expr_value + 17 | stmt . modifier_while expr_value + 18 | stmt . modifier_until expr_value + 19 | stmt . modifier_rescue stmt + + modifier_if shift, and go to state 284 + modifier_unless shift, and go to state 285 + modifier_while shift, and go to state 286 + modifier_until shift, and go to state 287 + modifier_rescue shift, and go to state 288 + + $default reduce using rule 8 (stmts) + + +state 110 + + 152 reswords: keyword_class . + + $default reduce using rule 152 (reswords) + + +state 111 + + 163 reswords: keyword_module . + + $default reduce using rule 163 (reswords) + + +state 112 + + 153 reswords: keyword_def . + + $default reduce using rule 153 (reswords) + + +state 113 + + 176 reswords: keyword_undef . + + $default reduce using rule 176 (reswords) + + +state 114 + + 149 reswords: keyword_begin . + + $default reduce using rule 149 (reswords) + + +state 115 + + 169 reswords: keyword_rescue . + + $default reduce using rule 169 (reswords) + + +state 116 + + 159 reswords: keyword_ensure . + + $default reduce using rule 159 (reswords) + + +state 117 + + 158 reswords: keyword_end . + + $default reduce using rule 158 (reswords) + + +state 118 + + 179 reswords: keyword_if . + + $default reduce using rule 179 (reswords) + + +state 119 + + 180 reswords: keyword_unless . + + $default reduce using rule 180 (reswords) + + +state 120 + + 174 reswords: keyword_then . + + $default reduce using rule 174 (reswords) + + +state 121 + + 157 reswords: keyword_elsif . + + $default reduce using rule 157 (reswords) + + +state 122 + + 156 reswords: keyword_else . + + $default reduce using rule 156 (reswords) + + +state 123 + + 151 reswords: keyword_case . + + $default reduce using rule 151 (reswords) + + +state 124 + + 177 reswords: keyword_when . + + $default reduce using rule 177 (reswords) + + +state 125 + + 181 reswords: keyword_while . + + $default reduce using rule 181 (reswords) + + +state 126 + + 182 reswords: keyword_until . + + $default reduce using rule 182 (reswords) + + +state 127 + + 161 reswords: keyword_for . + + $default reduce using rule 161 (reswords) + + +state 128 + + 150 reswords: keyword_break . + + $default reduce using rule 150 (reswords) + + +state 129 + + 164 reswords: keyword_next . + + $default reduce using rule 164 (reswords) + + +state 130 + + 168 reswords: keyword_redo . + + $default reduce using rule 168 (reswords) + + +state 131 + + 170 reswords: keyword_retry . + + $default reduce using rule 170 (reswords) + + +state 132 + + 162 reswords: keyword_in . + + $default reduce using rule 162 (reswords) + + +state 133 + + 155 reswords: keyword_do . + + $default reduce using rule 155 (reswords) + + +state 134 + + 171 reswords: keyword_return . + + $default reduce using rule 171 (reswords) + + +state 135 + + 178 reswords: keyword_yield . + + $default reduce using rule 178 (reswords) + + +state 136 + + 173 reswords: keyword_super . + + $default reduce using rule 173 (reswords) + + +state 137 + + 172 reswords: keyword_self . + + $default reduce using rule 172 (reswords) + + +state 138 + + 165 reswords: keyword_nil . + + $default reduce using rule 165 (reswords) + + +state 139 + + 175 reswords: keyword_true . + + $default reduce using rule 175 (reswords) + + +state 140 + + 160 reswords: keyword_false . + + $default reduce using rule 160 (reswords) + + +state 141 + + 148 reswords: keyword_and . + + $default reduce using rule 148 (reswords) + + +state 142 + + 167 reswords: keyword_or . + + $default reduce using rule 167 (reswords) + + +state 143 + + 166 reswords: keyword_not . + + $default reduce using rule 166 (reswords) + + +state 144 + + 147 reswords: keyword_alias . + + $default reduce using rule 147 (reswords) + + +state 145 + + 154 reswords: keyword_defined . + + $default reduce using rule 154 (reswords) + + +state 146 + + 145 reswords: keyword_BEGIN . + + $default reduce using rule 145 (reswords) + + +state 147 + + 146 reswords: keyword_END . + + $default reduce using rule 146 (reswords) + + +state 148 + + 142 reswords: keyword__LINE__ . + + $default reduce using rule 142 (reswords) + + +state 149 + + 143 reswords: keyword__FILE__ . + + $default reduce using rule 143 (reswords) + + +state 150 + + 144 reswords: keyword__ENCODING__ . + + $default reduce using rule 144 (reswords) + + +state 151 + + 101 fname: tIDENTIFIER . + + $default reduce using rule 101 (fname) + + +state 152 + + 103 fname: tFID . + + $default reduce using rule 103 (fname) + + +state 153 + + 102 fname: tCONSTANT . + + $default reduce using rule 102 (fname) + + +state 154 + + 137 op: tUPLUS . + + $default reduce using rule 137 (op) + + +state 155 + + 138 op: tUMINUS . + + $default reduce using rule 138 (op) + + +state 156 + + 134 op: tPOW . + + $default reduce using rule 134 (op) + + +state 157 + + 116 op: tCMP . + + $default reduce using rule 116 (op) + + +state 158 + + 117 op: tEQ . + + $default reduce using rule 117 (op) + + +state 159 + + 118 op: tEQQ . + + $default reduce using rule 118 (op) + + +state 160 + + 125 op: tNEQ . + + $default reduce using rule 125 (op) + + +state 161 + + 122 op: tGEQ . + + $default reduce using rule 122 (op) + + +state 162 + + 124 op: tLEQ . + + $default reduce using rule 124 (op) + + +state 163 + + 119 op: tMATCH . + + $default reduce using rule 119 (op) + + +state 164 + + 120 op: tNMATCH . + + $default reduce using rule 120 (op) + + +state 165 + + 139 op: tAREF . + + $default reduce using rule 139 (op) + + +state 166 + + 140 op: tASET . + + $default reduce using rule 140 (op) + + +state 167 + + 126 op: tLSHFT . + + $default reduce using rule 126 (op) + + +state 168 + + 127 op: tRSHFT . + + $default reduce using rule 127 (op) + + +state 169 + + 131 op: tSTAR . + + $default reduce using rule 131 (op) + + +state 170 + + 121 op: '>' . + + $default reduce using rule 121 (op) + + +state 171 + + 123 op: '<' . + + $default reduce using rule 123 (op) + + +state 172 + + 113 op: '|' . + + $default reduce using rule 113 (op) + + +state 173 + + 114 op: '^' . + + $default reduce using rule 114 (op) + + +state 174 + + 115 op: '&' . + + $default reduce using rule 115 (op) + + +state 175 + + 128 op: '+' . + + $default reduce using rule 128 (op) + + +state 176 + + 129 op: '-' . + + $default reduce using rule 129 (op) + + +state 177 + + 130 op: '*' . + + $default reduce using rule 130 (op) + + +state 178 + + 132 op: '/' . + + $default reduce using rule 132 (op) + + +state 179 + + 133 op: '%' . + + $default reduce using rule 133 (op) + + +state 180 + + 135 op: '!' . + + $default reduce using rule 135 (op) + + +state 181 + + 136 op: '~' . + + $default reduce using rule 136 (op) + + +state 182 + + 141 op: '`' . + + $default reduce using rule 141 (op) + + +state 183 + + 106 fsym: fname . + + $default reduce using rule 106 (fsym) + + +state 184 + + 108 fitem: fsym . + + $default reduce using rule 108 (fitem) + + +state 185 + + 110 undef_list: fitem . + + $default reduce using rule 110 (undef_list) + + +state 186 + + 14 stmt: keyword_undef undef_list . + 112 undef_list: undef_list . ',' @5 fitem + + ',' shift, and go to state 378 + + $default reduce using rule 14 (stmt) + + +state 187 + + 104 fname: op . + + $default reduce using rule 104 (fname) + + +state 188 + + 105 fname: reswords . + + $default reduce using rule 105 (fname) + + +state 189 + + 107 fsym: symbol . + + $default reduce using rule 107 (fsym) + + +state 190 + + 109 fitem: dsym . + + $default reduce using rule 109 (fitem) + + +state 191 + + 312 primary: keyword_break . + + $default reduce using rule 312 (primary) + + +state 192 + + 313 primary: keyword_next . + + $default reduce using rule 313 (primary) + + +state 193 + + 275 primary: keyword_return . + + $default reduce using rule 275 (primary) + + +state 194 + + 281 primary: keyword_not . '(' expr rparen + 282 | keyword_not . '(' rparen + + '(' shift, and go to state 222 + + +state 195 + + 527 assoc: tLABEL . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 379 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 196 + + 94 lhs: tCOLON3 . tCONSTANT + 192 arg: tCOLON3 . tCONSTANT tOP_ASGN arg + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 380 + + +state 197 + + 270 primary: tLPAREN . compstmt ')' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 238 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 198 + + 251 args: tSTAR . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 381 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 199 + + 246 block_arg: tAMPER . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 382 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 200 + + 219 arg: '!' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 277 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 201 + + 239 call_args: command . + + $default reduce using rule 239 (call_args) + + +state 202 + + 183 arg: lhs . '=' arg + 184 | lhs . '=' arg modifier_rescue arg + + '=' shift, and go to state 383 + + +state 203 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + 229 arg_value: arg . + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 229 (arg_value) + + +state 204 + + 250 args: arg_value . + 526 assoc: arg_value . tASSOC arg_value + + tASSOC shift, and go to state 384 + + $default reduce using rule 250 (args) + + +state 205 + + 45 command_call: keyword_break call_args . + + $default reduce using rule 45 (command_call) + + +state 206 + + 243 call_args: block_arg . + + $default reduce using rule 243 (call_args) + + +state 207 + + 240 call_args: args . opt_block_arg + 242 | args . ',' assocs opt_block_arg + 252 args: args . ',' arg_value + 253 | args . ',' tSTAR arg_value + + ',' shift, and go to state 385 + + $default reduce using rule 553 (none) + + opt_block_arg go to state 386 + none go to state 387 + + +state 208 + + 54 command: primary_value . '.' operation2 command_args + 55 | primary_value . '.' operation2 command_args cmd_brace_block + 56 | primary_value . tCOLON2 operation2 command_args + 57 | primary_value . tCOLON2 operation2 command_args cmd_brace_block + 89 lhs: primary_value . '[' opt_call_args rbracket + 90 | primary_value . '.' tIDENTIFIER + 91 | primary_value . tCOLON2 tIDENTIFIER + 92 | primary_value . '.' tCONSTANT + 93 | primary_value . tCOLON2 tCONSTANT + 187 arg: primary_value . '[' opt_call_args rbracket tOP_ASGN arg + 188 | primary_value . '.' tIDENTIFIER tOP_ASGN arg + 189 | primary_value . '.' tCONSTANT tOP_ASGN arg + 190 | primary_value . tCOLON2 tIDENTIFIER tOP_ASGN arg + 191 | primary_value . tCOLON2 tCONSTANT tOP_ASGN arg + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 388 + '[' shift, and go to state 389 + '.' shift, and go to state 390 + + +state 209 + + 88 lhs: variable . + 469 var_ref: variable . + 470 var_lhs: variable . + + tOP_ASGN reduce using rule 470 (var_lhs) + '=' reduce using rule 88 (lhs) + $default reduce using rule 469 (var_ref) + + +state 210 + + 185 arg: var_lhs . tOP_ASGN arg + 186 | var_lhs . tOP_ASGN arg modifier_rescue arg + + tOP_ASGN shift, and go to state 391 + + +state 211 + + 95 lhs: backref . + 193 arg: backref . tOP_ASGN arg + 264 primary: backref . + + tOP_ASGN shift, and go to state 392 + + '=' reduce using rule 95 (lhs) + $default reduce using rule 264 (primary) + + +state 212 + + 241 call_args: assocs . opt_block_arg + 525 assocs: assocs . ',' assoc + + ',' shift, and go to state 393 + + $default reduce using rule 553 (none) + + opt_block_arg go to state 394 + none go to state 387 + + +state 213 + + 524 assocs: assoc . + + $default reduce using rule 524 (assocs) + + +state 214 + + 46 command_call: keyword_next call_args . + + $default reduce using rule 46 (command_call) + + +state 215 + + 44 command_call: keyword_return call_args . + + $default reduce using rule 44 (command_call) + + +state 216 + + 276 primary: keyword_yield '(' . call_args rparen + 277 | keyword_yield '(' . rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + call_args go to state 395 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + opt_nl go to state 396 + rparen go to state 397 + + +state 217 + + 59 command: keyword_yield command_args . + + $default reduce using rule 59 (command) + + +state 218 + + 245 command_args: @7 . call_args + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + call_args go to state 398 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + + +state 219 + + 234 paren_args: '(' . opt_call_args rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 399 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 220 + + 395 method_call: keyword_super paren_args . + + $default reduce using rule 395 (method_call) + + +state 221 + + 58 command: keyword_super command_args . + + $default reduce using rule 58 (command) + + +state 222 + + 281 primary: keyword_not '(' . expr rparen + 282 | keyword_not '(' . rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + expr go to state 402 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + opt_nl go to state 396 + rparen go to state 403 + + +state 223 + + 543 opt_nl: '\n' . + + $default reduce using rule 543 (opt_nl) + + +state 224 + + 38 expr: keyword_not opt_nl . expr + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 404 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 225 + + 11 stmt: keyword_alias tGVAR . tGVAR + 12 | keyword_alias tGVAR . tBACK_REF + 13 | keyword_alias tGVAR . tNTH_REF + + tGVAR shift, and go to state 405 + tNTH_REF shift, and go to state 406 + tBACK_REF shift, and go to state 407 + + +state 226 + + 10 stmt: keyword_alias fitem . @2 fitem + + $default reduce using rule 9 (@2) + + @2 go to state 408 + + +state 227 + + 226 arg: keyword_defined opt_nl . @6 arg + 280 primary: keyword_defined opt_nl . '(' @10 expr rparen + + '(' shift, and go to state 409 + + $default reduce using rule 225 (@6) + + @6 go to state 410 + + +state 228 + + 21 stmt: keyword_BEGIN @3 . '{' compstmt '}' + + '{' shift, and go to state 411 + + +state 229 + + 22 stmt: keyword_END '{' . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 412 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 230 + + 276 primary: keyword_yield . '(' call_args rparen + 277 | keyword_yield . '(' rparen + 278 | keyword_yield . + + '(' shift, and go to state 216 + + $default reduce using rule 278 (primary) + + +state 231 + + 395 method_call: keyword_super . paren_args + 396 | keyword_super . + + '(' shift, and go to state 219 + + $default reduce using rule 396 (method_call) + + paren_args go to state 220 + + +state 232 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 204 | tUPLUS arg . + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + $default reduce using rule 204 (arg) + + +state 233 + + 89 lhs: primary_value . '[' opt_call_args rbracket + 90 | primary_value . '.' tIDENTIFIER + 91 | primary_value . tCOLON2 tIDENTIFIER + 92 | primary_value . '.' tCONSTANT + 93 | primary_value . tCOLON2 tCONSTANT + 187 arg: primary_value . '[' opt_call_args rbracket tOP_ASGN arg + 188 | primary_value . '.' tIDENTIFIER tOP_ASGN arg + 189 | primary_value . '.' tCONSTANT tOP_ASGN arg + 190 | primary_value . tCOLON2 tIDENTIFIER tOP_ASGN arg + 191 | primary_value . tCOLON2 tCONSTANT tOP_ASGN arg + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 413 + '[' shift, and go to state 389 + '.' shift, and go to state 414 + + +state 234 + + 283 primary: operation . brace_block + 389 method_call: operation . paren_args + + keyword_do shift, and go to state 369 + '{' shift, and go to state 370 + '(' shift, and go to state 219 + + paren_args go to state 375 + brace_block go to state 377 + + +state 235 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 205 | tUMINUS arg . + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 205 (arg) + + +state 236 + + 86 mlhs_node: tCOLON3 tCONSTANT . + 94 lhs: tCOLON3 tCONSTANT . + 192 arg: tCOLON3 tCONSTANT . tOP_ASGN arg + 272 primary: tCOLON3 tCONSTANT . + + tOP_ASGN shift, and go to state 415 + + '=' reduce using rule 94 (lhs) + ',' reduce using rule 86 (mlhs_node) + $default reduce using rule 272 (primary) + + +state 237 + + 61 mlhs: tLPAREN . mlhs_inner rparen + 63 mlhs_inner: tLPAREN . mlhs_inner rparen + 75 mlhs_item: tLPAREN . mlhs_inner rparen + 270 primary: tLPAREN . compstmt ')' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 237 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 238 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_inner go to state 416 + mlhs_basic go to state 240 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 238 + + 270 primary: tLPAREN compstmt . ')' + + ')' shift, and go to state 417 + + +state 239 + + 61 mlhs: tLPAREN mlhs_inner . rparen + 75 mlhs_item: tLPAREN mlhs_inner . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 418 + + +state 240 + + 60 mlhs: mlhs_basic . + 62 mlhs_inner: mlhs_basic . + + '=' reduce using rule 60 (mlhs) + $default reduce using rule 62 (mlhs_inner) + + +state 241 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 269 primary: tLPAREN_ARG expr . @9 rparen + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + + $default reduce using rule 268 (@9) + + @9 go to state 419 + + +state 242 + + 273 primary: tLBRACK aref_args . ']' + + ']' shift, and go to state 420 + + +state 243 + + 231 aref_args: args . trailer + 232 | args . ',' assocs trailer + 252 args: args . ',' arg_value + 253 | args . ',' tSTAR arg_value + + ',' shift, and go to state 421 + '\n' shift, and go to state 422 + + $default reduce using rule 546 (trailer) + + trailer go to state 423 + + +state 244 + + 233 aref_args: assocs . trailer + 525 assocs: assocs . ',' assoc + + ',' shift, and go to state 424 + '\n' shift, and go to state 422 + + $default reduce using rule 546 (trailer) + + trailer go to state 425 + + +state 245 + + 230 aref_args: none . + + $default reduce using rule 230 (aref_args) + + +state 246 + + 526 assoc: arg_value . tASSOC arg_value + + tASSOC shift, and go to state 384 + + +state 247 + + 274 primary: tLBRACE assoc_list . '}' + + '}' shift, and go to state 426 + + +state 248 + + 523 assoc_list: assocs . trailer + 525 assocs: assocs . ',' assoc + + ',' shift, and go to state 424 + '\n' shift, and go to state 422 + + $default reduce using rule 546 (trailer) + + trailer go to state 427 + + +state 249 + + 522 assoc_list: none . + + $default reduce using rule 522 (assoc_list) + + +state 250 + + 280 primary: keyword_defined . opt_nl '(' @10 expr rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 428 + + +state 251 + + 86 mlhs_node: tCOLON3 . tCONSTANT + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 429 + + +state 252 + + 455 numeric: tUMINUS_NUM . tINTEGER + 456 | tUMINUS_NUM . tFLOAT + + tINTEGER shift, and go to state 430 + tFLOAT shift, and go to state 431 + + +state 253 + + 73 mlhs_basic: tSTAR ',' . mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs_item go to state 432 + mlhs_post go to state 433 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 254 + + 70 mlhs_basic: tSTAR mlhs_node . + 71 | tSTAR mlhs_node . ',' mlhs_post + + ',' shift, and go to state 434 + + $default reduce using rule 70 (mlhs_basic) + + +state 255 + + 316 primary_value: primary . + + $default reduce using rule 316 (primary_value) + + +state 256 + + 81 mlhs_node: primary_value . '[' opt_call_args rbracket + 82 | primary_value . '.' tIDENTIFIER + 83 | primary_value . tCOLON2 tIDENTIFIER + 84 | primary_value . '.' tCONSTANT + 85 | primary_value . tCOLON2 tCONSTANT + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 435 + '[' shift, and go to state 436 + '.' shift, and go to state 437 + + +state 257 + + 80 mlhs_node: variable . + 469 var_ref: variable . + + tCOLON2 reduce using rule 469 (var_ref) + '[' reduce using rule 469 (var_ref) + '.' reduce using rule 469 (var_ref) + $default reduce using rule 80 (mlhs_node) + + +state 258 + + 87 mlhs_node: backref . + 264 primary: backref . + + tCOLON2 reduce using rule 264 (primary) + '[' reduce using rule 264 (primary) + '.' reduce using rule 264 (primary) + $default reduce using rule 87 (mlhs_node) + + +state 259 + + 286 primary: tLAMBDA lambda . + + $default reduce using rule 286 (primary) + + +state 260 + + 379 lambda: @24 . f_larglist lambda_body + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + '(' shift, and go to state 448 + + $default reduce using rule 493 (f_args) + + f_larglist go to state 449 + f_args go to state 450 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 454 + f_opt go to state 455 + f_optarg go to state 456 + restarg_mark go to state 457 + f_rest_arg go to state 458 + blkarg_mark go to state 459 + f_block_arg go to state 460 + + +state 261 + + 450 sym: tGVAR . + + $default reduce using rule 450 (sym) + + +state 262 + + 449 sym: tIVAR . + + $default reduce using rule 449 (sym) + + +state 263 + + 451 sym: tCVAR . + + $default reduce using rule 451 (sym) + + +state 264 + + 448 sym: fname . + + $default reduce using rule 448 (sym) + + +state 265 + + 437 xstring_contents: xstring_contents . string_content + 452 dsym: tSYMBEG xstring_contents . tSTRING_END + + tSTRING_CONTENT shift, and go to state 461 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + tSTRING_END shift, and go to state 464 + + string_content go to state 465 + + +state 266 + + 447 symbol: tSYMBEG sym . + + $default reduce using rule 447 (symbol) + + +state 267 + + 421 string1: tSTRING_BEG string_contents . tSTRING_END + 435 string_contents: string_contents . string_content + + tSTRING_CONTENT shift, and go to state 461 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + tSTRING_END shift, and go to state 466 + + string_content go to state 467 + + +state 268 + + 422 xstring: tXSTRING_BEG xstring_contents . tSTRING_END + 437 xstring_contents: xstring_contents . string_content + + tSTRING_CONTENT shift, and go to state 461 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + tSTRING_END shift, and go to state 468 + + string_content go to state 465 + + +state 269 + + 423 regexp: tREGEXP_BEG xstring_contents . tREGEXP_END + 437 xstring_contents: xstring_contents . string_content + + tSTRING_CONTENT shift, and go to state 461 + tREGEXP_END shift, and go to state 469 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + + string_content go to state 465 + + +state 270 + + 424 words: tWORDS_BEG ' ' . tSTRING_END + + tSTRING_END shift, and go to state 470 + + +state 271 + + 425 words: tWORDS_BEG word_list . tSTRING_END + 427 word_list: word_list . word ' ' + + tSTRING_CONTENT shift, and go to state 461 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + tSTRING_END shift, and go to state 471 + + word go to state 472 + string_content go to state 473 + + +state 272 + + 430 qwords: tQWORDS_BEG ' ' . tSTRING_END + + tSTRING_END shift, and go to state 474 + + +state 273 + + 431 qwords: tQWORDS_BEG qword_list . tSTRING_END + 433 qword_list: qword_list . tSTRING_CONTENT ' ' + + tSTRING_CONTENT shift, and go to state 475 + tSTRING_END shift, and go to state 476 + + +state 274 + + 202 arg: tUMINUS_NUM tINTEGER . tPOW arg + 455 numeric: tUMINUS_NUM tINTEGER . + + tPOW shift, and go to state 477 + + $default reduce using rule 455 (numeric) + + +state 275 + + 203 arg: tUMINUS_NUM tFLOAT . tPOW arg + 456 numeric: tUMINUS_NUM tFLOAT . + + tPOW shift, and go to state 478 + + $default reduce using rule 456 (numeric) + + +state 276 + + 39 expr: '!' command_call . + + $default reduce using rule 39 (expr) + + +state 277 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 219 | '!' arg . + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + $default reduce using rule 219 (arg) + + +state 278 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 220 | '~' arg . + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + $default reduce using rule 220 (arg) + + +state 279 + + 549 term: ';' . + + $default reduce using rule 549 (term) + + +state 280 + + 550 term: '\n' . + + $default reduce using rule 550 (term) + + +state 281 + + 4 compstmt: stmts opt_terms . + + $default reduce using rule 4 (compstmt) + + +state 282 + + 551 terms: term . + + $default reduce using rule 551 (terms) + + +state 283 + + 7 stmts: stmts terms . stmt + 541 opt_terms: terms . + 552 terms: terms . ';' + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + ';' shift, and go to state 479 + + $default reduce using rule 541 (opt_terms) + + stmt go to state 480 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + + +state 284 + + 15 stmt: stmt modifier_if . expr_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 481 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 285 + + 16 stmt: stmt modifier_unless . expr_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 482 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 286 + + 17 stmt: stmt modifier_while . expr_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 483 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 287 + + 18 stmt: stmt modifier_until . expr_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 484 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 288 + + 19 stmt: stmt modifier_rescue . stmt + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + stmt go to state 485 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + + +state 289 + + 36 expr: expr keyword_and . expr + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 486 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 290 + + 37 expr: expr keyword_or . expr + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 487 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 291 + + 385 do_block: keyword_do_block . @25 opt_block_param compstmt keyword_end + + $default reduce using rule 384 (@25) + + @25 go to state 488 + + +state 292 + + 386 block_call: command do_block . + + $default reduce using rule 386 (block_call) + + +state 293 + + 24 stmt: mlhs '=' . command_call + 32 | mlhs '=' . arg_value + 33 | mlhs '=' . mrhs + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 489 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 490 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 203 + arg_value go to state 491 + args go to state 492 + mrhs go to state 493 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 294 + + 76 mlhs_head: mlhs_item ',' . + + $default reduce using rule 76 (mlhs_head) + + +state 295 + + 75 mlhs_item: tLPAREN . mlhs_inner rparen + 270 primary: tLPAREN . compstmt ')' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 237 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 238 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_inner go to state 494 + mlhs_basic go to state 240 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 296 + + 66 mlhs_basic: mlhs_head tSTAR . mlhs_node + 67 | mlhs_head tSTAR . mlhs_node ',' mlhs_post + 68 | mlhs_head tSTAR . + 69 | mlhs_head tSTAR . ',' mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + ',' shift, and go to state 495 + + $default reduce using rule 68 (mlhs_basic) + + mlhs_node go to state 496 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 297 + + 65 mlhs_basic: mlhs_head mlhs_item . + 77 mlhs_head: mlhs_head mlhs_item . ',' + + ',' shift, and go to state 497 + + $default reduce using rule 65 (mlhs_basic) + + +state 298 + + 23 stmt: lhs '=' . command_call + 31 | lhs '=' . mrhs + 183 arg: lhs '=' . arg + 184 | lhs '=' . arg modifier_rescue arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 489 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 498 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 499 + arg_value go to state 500 + args go to state 492 + mrhs go to state 501 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 299 + + 201 arg: arg tPOW . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 502 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 300 + + 209 arg: arg tCMP . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 503 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 301 + + 214 arg: arg tEQ . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 504 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 302 + + 215 arg: arg tEQQ . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 505 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 303 + + 216 arg: arg tNEQ . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 506 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 304 + + 211 arg: arg tGEQ . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 507 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 305 + + 213 arg: arg tLEQ . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 508 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 306 + + 223 arg: arg tANDOP . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 509 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 307 + + 224 arg: arg tOROP . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 510 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 308 + + 217 arg: arg tMATCH . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 511 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 309 + + 218 arg: arg tNMATCH . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 512 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 310 + + 194 arg: arg tDOT2 . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 513 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 311 + + 195 arg: arg tDOT3 . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 514 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 312 + + 221 arg: arg tLSHFT . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 515 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 313 + + 222 arg: arg tRSHFT . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 516 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 314 + + 227 arg: arg '?' . arg opt_nl ':' arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 517 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 315 + + 210 arg: arg '>' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 518 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 316 + + 212 arg: arg '<' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 519 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 317 + + 206 arg: arg '|' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 520 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 318 + + 207 arg: arg '^' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 521 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 319 + + 208 arg: arg '&' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 522 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 320 + + 196 arg: arg '+' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 523 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 321 + + 197 arg: arg '-' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 524 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 322 + + 198 arg: arg '*' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 525 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 323 + + 199 arg: arg '/' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 526 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 324 + + 200 arg: arg '%' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 527 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 325 + + 29 stmt: primary_value tCOLON2 . tIDENTIFIER tOP_ASGN command_call + 56 command: primary_value tCOLON2 . operation2 command_args + 57 | primary_value tCOLON2 . operation2 command_args cmd_brace_block + 83 mlhs_node: primary_value tCOLON2 . tIDENTIFIER + 85 | primary_value tCOLON2 . tCONSTANT + 91 lhs: primary_value tCOLON2 . tIDENTIFIER + 93 | primary_value tCOLON2 . tCONSTANT + 190 arg: primary_value tCOLON2 . tIDENTIFIER tOP_ASGN arg + 191 | primary_value tCOLON2 . tCONSTANT tOP_ASGN arg + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 528 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 530 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 533 + operation3 go to state 534 + + +state 326 + + 26 stmt: primary_value '[' . opt_call_args rbracket tOP_ASGN command_call + 81 mlhs_node: primary_value '[' . opt_call_args rbracket + 89 lhs: primary_value '[' . opt_call_args rbracket + 187 arg: primary_value '[' . opt_call_args rbracket tOP_ASGN arg + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 535 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 327 + + 27 stmt: primary_value '.' . tIDENTIFIER tOP_ASGN command_call + 28 | primary_value '.' . tCONSTANT tOP_ASGN command_call + 54 command: primary_value '.' . operation2 command_args + 55 | primary_value '.' . operation2 command_args cmd_brace_block + 82 mlhs_node: primary_value '.' . tIDENTIFIER + 84 | primary_value '.' . tCONSTANT + 90 lhs: primary_value '.' . tIDENTIFIER + 92 | primary_value '.' . tCONSTANT + 188 arg: primary_value '.' . tIDENTIFIER tOP_ASGN arg + 189 | primary_value '.' . tCONSTANT tOP_ASGN arg + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 536 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 538 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 541 + + +state 328 + + 267 primary: k_begin @8 . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 542 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 329 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 41 expr_value: expr . + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + + $default reduce using rule 41 (expr_value) + + +state 330 + + 287 primary: k_if expr_value . then compstmt if_tail k_end + + keyword_then shift, and go to state 544 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + then go to state 545 + term go to state 546 + + +state 331 + + 288 primary: k_unless expr_value . then compstmt opt_else k_end + + keyword_then shift, and go to state 544 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + then go to state 547 + term go to state 546 + + +state 332 + + 291 primary: k_while @11 . expr_value do @12 compstmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 548 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 333 + + 294 primary: k_until @13 . expr_value do @14 compstmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 549 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 334 + + 295 primary: k_case expr_value . opt_terms case_body k_end + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + $default reduce using rule 540 (opt_terms) + + opt_terms go to state 550 + term go to state 282 + terms go to state 336 + + +state 335 + + 296 primary: k_case opt_terms . case_body k_end + + keyword_when shift, and go to state 551 + + case_body go to state 552 + + +state 336 + + 541 opt_terms: terms . + 552 terms: terms . ';' + + ';' shift, and go to state 479 + + $default reduce using rule 541 (opt_terms) + + +state 337 + + 86 mlhs_node: tCOLON3 . tCONSTANT + 94 lhs: tCOLON3 . tCONSTANT + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 553 + + +state 338 + + 338 for_var: mlhs . + + $default reduce using rule 338 (for_var) + + +state 339 + + 337 for_var: lhs . + + $default reduce using rule 337 (for_var) + + +state 340 + + 81 mlhs_node: primary_value . '[' opt_call_args rbracket + 82 | primary_value . '.' tIDENTIFIER + 83 | primary_value . tCOLON2 tIDENTIFIER + 84 | primary_value . '.' tCONSTANT + 85 | primary_value . tCOLON2 tCONSTANT + 89 lhs: primary_value . '[' opt_call_args rbracket + 90 | primary_value . '.' tIDENTIFIER + 91 | primary_value . tCOLON2 tIDENTIFIER + 92 | primary_value . '.' tCONSTANT + 93 | primary_value . tCOLON2 tCONSTANT + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 554 + '[' shift, and go to state 555 + '.' shift, and go to state 556 + + +state 341 + + 299 primary: k_for for_var . keyword_in @15 expr_value do @16 compstmt k_end + + keyword_in shift, and go to state 557 + + +state 342 + + 80 mlhs_node: variable . + 88 lhs: variable . + 469 var_ref: variable . + + keyword_in reduce using rule 88 (lhs) + ',' reduce using rule 80 (mlhs_node) + $default reduce using rule 469 (var_ref) + + +state 343 + + 87 mlhs_node: backref . + 95 lhs: backref . + 264 primary: backref . + + keyword_in reduce using rule 95 (lhs) + ',' reduce using rule 87 (mlhs_node) + $default reduce using rule 264 (primary) + + +state 344 + + 96 cname: tIDENTIFIER . + 457 variable: tIDENTIFIER . + 528 operation: tIDENTIFIER . + + keyword_do reduce using rule 528 (operation) + tCOLON2 reduce using rule 457 (variable) + '{' reduce using rule 528 (operation) + '[' reduce using rule 457 (variable) + '.' reduce using rule 457 (variable) + '(' reduce using rule 528 (operation) + $default reduce using rule 96 (cname) + + +state 345 + + 97 cname: tCONSTANT . + 460 variable: tCONSTANT . + 529 operation: tCONSTANT . + + keyword_do reduce using rule 529 (operation) + tCOLON2 reduce using rule 460 (variable) + '{' reduce using rule 529 (operation) + '[' reduce using rule 460 (variable) + '.' reduce using rule 460 (variable) + '(' reduce using rule 529 (operation) + $default reduce using rule 97 (cname) + + +state 346 + + 304 primary: k_class tLSHFT . expr @18 term @19 bodystmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 558 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 347 + + 98 cpath: tCOLON3 . cname + 272 primary: tCOLON3 . tCONSTANT + + tIDENTIFIER shift, and go to state 559 + tCONSTANT shift, and go to state 560 + + cname go to state 561 + + +state 348 + + 99 cpath: cname . + + $default reduce using rule 99 (cpath) + + +state 349 + + 301 primary: k_class cpath . superclass @17 bodystmt k_end + + error shift, and go to state 562 + '<' shift, and go to state 563 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + superclass go to state 564 + term go to state 565 + + +state 350 + + 100 cpath: primary_value . tCOLON2 cname + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 566 + '[' shift, and go to state 567 + '.' shift, and go to state 568 + + +state 351 + + 469 var_ref: variable . + + $default reduce using rule 469 (var_ref) + + +state 352 + + 264 primary: backref . + + $default reduce using rule 264 (primary) + + +state 353 + + 306 primary: k_module cpath . @20 bodystmt k_end + + $default reduce using rule 305 (@20) + + @20 go to state 569 + + +state 354 + + 172 reswords: keyword_self . + 463 variable: keyword_self . + + tCOLON2 reduce using rule 463 (variable) + '.' reduce using rule 463 (variable) + $default reduce using rule 172 (reswords) + + +state 355 + + 165 reswords: keyword_nil . + 462 variable: keyword_nil . + + tCOLON2 reduce using rule 462 (variable) + '.' reduce using rule 462 (variable) + $default reduce using rule 165 (reswords) + + +state 356 + + 175 reswords: keyword_true . + 464 variable: keyword_true . + + tCOLON2 reduce using rule 464 (variable) + '.' reduce using rule 464 (variable) + $default reduce using rule 175 (reswords) + + +state 357 + + 160 reswords: keyword_false . + 465 variable: keyword_false . + + tCOLON2 reduce using rule 465 (variable) + '.' reduce using rule 465 (variable) + $default reduce using rule 160 (reswords) + + +state 358 + + 142 reswords: keyword__LINE__ . + 467 variable: keyword__LINE__ . + + tCOLON2 reduce using rule 467 (variable) + '.' reduce using rule 467 (variable) + $default reduce using rule 142 (reswords) + + +state 359 + + 143 reswords: keyword__FILE__ . + 466 variable: keyword__FILE__ . + + tCOLON2 reduce using rule 466 (variable) + '.' reduce using rule 466 (variable) + $default reduce using rule 143 (reswords) + + +state 360 + + 144 reswords: keyword__ENCODING__ . + 468 variable: keyword__ENCODING__ . + + tCOLON2 reduce using rule 468 (variable) + '.' reduce using rule 468 (variable) + $default reduce using rule 144 (reswords) + + +state 361 + + 101 fname: tIDENTIFIER . + 457 variable: tIDENTIFIER . + + tCOLON2 reduce using rule 457 (variable) + '.' reduce using rule 457 (variable) + $default reduce using rule 101 (fname) + + +state 362 + + 102 fname: tCONSTANT . + 460 variable: tCONSTANT . + + tCOLON2 reduce using rule 460 (variable) + '.' reduce using rule 460 (variable) + $default reduce using rule 102 (fname) + + +state 363 + + 521 singleton: '(' . @31 expr rparen + + $default reduce using rule 520 (@31) + + @31 go to state 570 + + +state 364 + + 308 primary: k_def fname . @21 f_arglist bodystmt k_end + + $default reduce using rule 307 (@21) + + @21 go to state 571 + + +state 365 + + 519 singleton: var_ref . + + $default reduce using rule 519 (singleton) + + +state 366 + + 311 primary: k_def singleton . dot_or_colon @22 fname @23 f_arglist bodystmt k_end + + tCOLON2 shift, and go to state 572 + '.' shift, and go to state 573 + + dot_or_colon go to state 574 + + +state 367 + + 49 block_command: block_call tCOLON2 . operation2 command_args + 388 block_call: block_call tCOLON2 . operation2 opt_paren_args + + tIDENTIFIER shift, and go to state 575 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 576 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + op go to state 539 + operation2 go to state 577 + + +state 368 + + 48 block_command: block_call '.' . operation2 command_args + 387 block_call: block_call '.' . operation2 opt_paren_args + + tIDENTIFIER shift, and go to state 575 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 576 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + op go to state 539 + operation2 go to state 578 + + +state 369 + + 401 brace_block: keyword_do . @27 opt_block_param compstmt keyword_end + + $default reduce using rule 400 (@27) + + @27 go to state 579 + + +state 370 + + 399 brace_block: '{' . @26 opt_block_param compstmt '}' + + $default reduce using rule 398 (@26) + + @26 go to state 580 + + +state 371 + + 285 primary: method_call brace_block . + + $default reduce using rule 285 (primary) + + +state 372 + + 420 string: string string1 . + + $default reduce using rule 420 (string) + + +state 373 + + 25 stmt: var_lhs tOP_ASGN . command_call + 185 arg: var_lhs tOP_ASGN . arg + 186 | var_lhs tOP_ASGN . arg modifier_rescue arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 581 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 582 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 374 + + 30 stmt: backref tOP_ASGN . command_call + 193 arg: backref tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 583 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 584 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 375 + + 389 method_call: operation paren_args . + + $default reduce using rule 389 (method_call) + + +state 376 + + 52 command: operation command_args . + 53 | operation command_args . cmd_brace_block + + tLBRACE_ARG shift, and go to state 585 + + $default reduce using rule 52 (command) + + cmd_brace_block go to state 586 + + +state 377 + + 283 primary: operation brace_block . + + $default reduce using rule 283 (primary) + + +state 378 + + 112 undef_list: undef_list ',' . @5 fitem + + $default reduce using rule 111 (@5) + + @5 go to state 587 + + +state 379 + + 527 assoc: tLABEL arg_value . + + $default reduce using rule 527 (assoc) + + +state 380 + + 94 lhs: tCOLON3 tCONSTANT . + 192 arg: tCOLON3 tCONSTANT . tOP_ASGN arg + 272 primary: tCOLON3 tCONSTANT . + + tOP_ASGN shift, and go to state 415 + + '=' reduce using rule 94 (lhs) + $default reduce using rule 272 (primary) + + +state 381 + + 251 args: tSTAR arg_value . + + $default reduce using rule 251 (args) + + +state 382 + + 246 block_arg: tAMPER arg_value . + + $default reduce using rule 246 (block_arg) + + +state 383 + + 183 arg: lhs '=' . arg + 184 | lhs '=' . arg modifier_rescue arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 588 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 384 + + 526 assoc: arg_value tASSOC . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 589 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 385 + + 242 call_args: args ',' . assocs opt_block_arg + 247 opt_block_arg: ',' . block_arg + 248 | ',' . + 252 args: args ',' . arg_value + 253 | args ',' . tSTAR arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 590 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 248 (opt_block_arg) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 591 + block_arg go to state 592 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 593 + assoc go to state 213 + operation go to state 234 + + +state 386 + + 240 call_args: args opt_block_arg . + + $default reduce using rule 240 (call_args) + + +state 387 + + 249 opt_block_arg: none . + + $default reduce using rule 249 (opt_block_arg) + + +state 388 + + 56 command: primary_value tCOLON2 . operation2 command_args + 57 | primary_value tCOLON2 . operation2 command_args cmd_brace_block + 91 lhs: primary_value tCOLON2 . tIDENTIFIER + 93 | primary_value tCOLON2 . tCONSTANT + 190 arg: primary_value tCOLON2 . tIDENTIFIER tOP_ASGN arg + 191 | primary_value tCOLON2 . tCONSTANT tOP_ASGN arg + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 594 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 595 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 533 + operation3 go to state 534 + + +state 389 + + 89 lhs: primary_value '[' . opt_call_args rbracket + 187 arg: primary_value '[' . opt_call_args rbracket tOP_ASGN arg + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 596 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 390 + + 54 command: primary_value '.' . operation2 command_args + 55 | primary_value '.' . operation2 command_args cmd_brace_block + 90 lhs: primary_value '.' . tIDENTIFIER + 92 | primary_value '.' . tCONSTANT + 188 arg: primary_value '.' . tIDENTIFIER tOP_ASGN arg + 189 | primary_value '.' . tCONSTANT tOP_ASGN arg + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 597 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 598 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 541 + + +state 391 + + 185 arg: var_lhs tOP_ASGN . arg + 186 | var_lhs tOP_ASGN . arg modifier_rescue arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 582 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 392 + + 193 arg: backref tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 584 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 393 + + 247 opt_block_arg: ',' . block_arg + 248 | ',' . + 525 assocs: assocs ',' . assoc + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 248 (opt_block_arg) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 246 + block_arg go to state 592 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assoc go to state 599 + operation go to state 234 + + +state 394 + + 241 call_args: assocs opt_block_arg . + + $default reduce using rule 241 (call_args) + + +state 395 + + 276 primary: keyword_yield '(' call_args . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 600 + + +state 396 + + 544 rparen: opt_nl . ')' + + ')' shift, and go to state 601 + + +state 397 + + 277 primary: keyword_yield '(' rparen . + + $default reduce using rule 277 (primary) + + +state 398 + + 245 command_args: @7 call_args . + + $default reduce using rule 245 (command_args) + + +state 399 + + 234 paren_args: '(' opt_call_args . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 602 + + +state 400 + + 238 opt_call_args: call_args . + + $default reduce using rule 238 (opt_call_args) + + +state 401 + + 237 opt_call_args: none . + + $default reduce using rule 237 (opt_call_args) + + +state 402 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 281 primary: keyword_not '(' expr . rparen + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 603 + + +state 403 + + 282 primary: keyword_not '(' rparen . + + $default reduce using rule 282 (primary) + + +state 404 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 38 | keyword_not opt_nl expr . + + $default reduce using rule 38 (expr) + + +state 405 + + 11 stmt: keyword_alias tGVAR tGVAR . + + $default reduce using rule 11 (stmt) + + +state 406 + + 13 stmt: keyword_alias tGVAR tNTH_REF . + + $default reduce using rule 13 (stmt) + + +state 407 + + 12 stmt: keyword_alias tGVAR tBACK_REF . + + $default reduce using rule 12 (stmt) + + +state 408 + + 10 stmt: keyword_alias fitem @2 . fitem + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tCONSTANT shift, and go to state 153 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + tSYMBEG shift, and go to state 55 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + fname go to state 183 + fsym go to state 184 + fitem go to state 604 + op go to state 187 + reswords go to state 188 + symbol go to state 189 + dsym go to state 190 + + +state 409 + + 280 primary: keyword_defined opt_nl '(' . @10 expr rparen + + $default reduce using rule 279 (@10) + + @10 go to state 605 + + +state 410 + + 226 arg: keyword_defined opt_nl @6 . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 606 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 411 + + 21 stmt: keyword_BEGIN @3 '{' . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 607 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 412 + + 22 stmt: keyword_END '{' compstmt . '}' + + '}' shift, and go to state 608 + + +state 413 + + 91 lhs: primary_value tCOLON2 . tIDENTIFIER + 93 | primary_value tCOLON2 . tCONSTANT + 190 arg: primary_value tCOLON2 . tIDENTIFIER tOP_ASGN arg + 191 | primary_value tCOLON2 . tCONSTANT tOP_ASGN arg + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 594 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 595 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 414 + + 90 lhs: primary_value '.' . tIDENTIFIER + 92 | primary_value '.' . tCONSTANT + 188 arg: primary_value '.' . tIDENTIFIER tOP_ASGN arg + 189 | primary_value '.' . tCONSTANT tOP_ASGN arg + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 597 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 598 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 610 + + +state 415 + + 192 arg: tCOLON3 tCONSTANT tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 611 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 416 + + 61 mlhs: tLPAREN mlhs_inner . rparen + 63 mlhs_inner: tLPAREN mlhs_inner . rparen + 75 mlhs_item: tLPAREN mlhs_inner . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 612 + + +state 417 + + 270 primary: tLPAREN compstmt ')' . + + $default reduce using rule 270 (primary) + + +state 418 + + 61 mlhs: tLPAREN mlhs_inner rparen . + 75 mlhs_item: tLPAREN mlhs_inner rparen . + + ',' reduce using rule 75 (mlhs_item) + $default reduce using rule 61 (mlhs) + + +state 419 + + 269 primary: tLPAREN_ARG expr @9 . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 613 + + +state 420 + + 273 primary: tLBRACK aref_args ']' . + + $default reduce using rule 273 (primary) + + +state 421 + + 232 aref_args: args ',' . assocs trailer + 252 args: args ',' . arg_value + 253 | args ',' . tSTAR arg_value + 548 trailer: ',' . + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 590 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 548 (trailer) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 591 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 614 + assoc go to state 213 + operation go to state 234 + + +state 422 + + 547 trailer: '\n' . + + $default reduce using rule 547 (trailer) + + +state 423 + + 231 aref_args: args trailer . + + $default reduce using rule 231 (aref_args) + + +state 424 + + 525 assocs: assocs ',' . assoc + 548 trailer: ',' . + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 548 (trailer) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 246 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assoc go to state 599 + operation go to state 234 + + +state 425 + + 233 aref_args: assocs trailer . + + $default reduce using rule 233 (aref_args) + + +state 426 + + 274 primary: tLBRACE assoc_list '}' . + + $default reduce using rule 274 (primary) + + +state 427 + + 523 assoc_list: assocs trailer . + + $default reduce using rule 523 (assoc_list) + + +state 428 + + 280 primary: keyword_defined opt_nl . '(' @10 expr rparen + + '(' shift, and go to state 409 + + +state 429 + + 86 mlhs_node: tCOLON3 tCONSTANT . + 272 primary: tCOLON3 tCONSTANT . + + tCOLON2 reduce using rule 272 (primary) + '[' reduce using rule 272 (primary) + '.' reduce using rule 272 (primary) + $default reduce using rule 86 (mlhs_node) + + +state 430 + + 455 numeric: tUMINUS_NUM tINTEGER . + + $default reduce using rule 455 (numeric) + + +state 431 + + 456 numeric: tUMINUS_NUM tFLOAT . + + $default reduce using rule 456 (numeric) + + +state 432 + + 78 mlhs_post: mlhs_item . + + $default reduce using rule 78 (mlhs_post) + + +state 433 + + 73 mlhs_basic: tSTAR ',' mlhs_post . + 79 mlhs_post: mlhs_post . ',' mlhs_item + + ',' shift, and go to state 615 + + $default reduce using rule 73 (mlhs_basic) + + +state 434 + + 71 mlhs_basic: tSTAR mlhs_node ',' . mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs_item go to state 432 + mlhs_post go to state 616 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 435 + + 83 mlhs_node: primary_value tCOLON2 . tIDENTIFIER + 85 | primary_value tCOLON2 . tCONSTANT + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 617 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 618 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 436 + + 81 mlhs_node: primary_value '[' . opt_call_args rbracket + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 619 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 437 + + 82 mlhs_node: primary_value '.' . tIDENTIFIER + 84 | primary_value '.' . tCONSTANT + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 620 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 621 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 610 + + +state 438 + + 499 f_norm_arg: tIDENTIFIER . + 504 f_opt: tIDENTIFIER . '=' arg_value + + '=' shift, and go to state 622 + + $default reduce using rule 499 (f_norm_arg) + + +state 439 + + 496 f_bad_arg: tGVAR . + + $default reduce using rule 496 (f_bad_arg) + + +state 440 + + 495 f_bad_arg: tIVAR . + + $default reduce using rule 495 (f_bad_arg) + + +state 441 + + 494 f_bad_arg: tCONSTANT . + + $default reduce using rule 494 (f_bad_arg) + + +state 442 + + 497 f_bad_arg: tCVAR . + + $default reduce using rule 497 (f_bad_arg) + + +state 443 + + 501 f_arg_item: tLPAREN . f_margs rparen + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + tSTAR shift, and go to state 625 + + f_marg go to state 626 + f_marg_list go to state 627 + f_margs go to state 628 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 444 + + 511 restarg_mark: tSTAR . + + $default reduce using rule 511 (restarg_mark) + + +state 445 + + 515 blkarg_mark: tAMPER . + + $default reduce using rule 515 (blkarg_mark) + + +state 446 + + 514 blkarg_mark: '&' . + + $default reduce using rule 514 (blkarg_mark) + + +state 447 + + 510 restarg_mark: '*' . + + $default reduce using rule 510 (restarg_mark) + + +state 448 + + 380 f_larglist: '(' . f_args opt_bv_decl rparen + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + $default reduce using rule 493 (f_args) + + f_args go to state 630 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 454 + f_opt go to state 455 + f_optarg go to state 456 + restarg_mark go to state 457 + f_rest_arg go to state 458 + blkarg_mark go to state 459 + f_block_arg go to state 460 + + +state 449 + + 379 lambda: @24 f_larglist . lambda_body + + keyword_do_LAMBDA shift, and go to state 631 + tLAMBEG shift, and go to state 632 + + lambda_body go to state 633 + + +state 450 + + 381 f_larglist: f_args . + + $default reduce using rule 381 (f_larglist) + + +state 451 + + 498 f_norm_arg: f_bad_arg . + + $default reduce using rule 498 (f_norm_arg) + + +state 452 + + 500 f_arg_item: f_norm_arg . + + $default reduce using rule 500 (f_arg_item) + + +state 453 + + 502 f_arg: f_arg_item . + + $default reduce using rule 502 (f_arg) + + +state 454 + + 479 f_args: f_arg . ',' f_optarg ',' f_rest_arg opt_f_block_arg + 480 | f_arg . ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 481 | f_arg . ',' f_optarg opt_f_block_arg + 482 | f_arg . ',' f_optarg ',' f_arg opt_f_block_arg + 483 | f_arg . ',' f_rest_arg opt_f_block_arg + 484 | f_arg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 485 | f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 634 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 635 + none go to state 636 + + +state 455 + + 508 f_optarg: f_opt . + + $default reduce using rule 508 (f_optarg) + + +state 456 + + 486 f_args: f_optarg . ',' f_rest_arg opt_f_block_arg + 487 | f_optarg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 488 | f_optarg . opt_f_block_arg + 489 | f_optarg . ',' f_arg opt_f_block_arg + 509 f_optarg: f_optarg . ',' f_opt + + ',' shift, and go to state 637 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 638 + none go to state 636 + + +state 457 + + 512 f_rest_arg: restarg_mark . tIDENTIFIER + 513 | restarg_mark . + + tIDENTIFIER shift, and go to state 639 + + $default reduce using rule 513 (f_rest_arg) + + +state 458 + + 490 f_args: f_rest_arg . opt_f_block_arg + 491 | f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 640 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 641 + none go to state 636 + + +state 459 + + 516 f_block_arg: blkarg_mark . tIDENTIFIER + + tIDENTIFIER shift, and go to state 642 + + +state 460 + + 492 f_args: f_block_arg . + + $default reduce using rule 492 (f_args) + + +state 461 + + 438 string_content: tSTRING_CONTENT . + + $default reduce using rule 438 (string_content) + + +state 462 + + 442 string_content: tSTRING_DBEG . @29 compstmt '}' + + $default reduce using rule 441 (@29) + + @29 go to state 643 + + +state 463 + + 440 string_content: tSTRING_DVAR . @28 string_dvar + + $default reduce using rule 439 (@28) + + @28 go to state 644 + + +state 464 + + 452 dsym: tSYMBEG xstring_contents tSTRING_END . + + $default reduce using rule 452 (dsym) + + +state 465 + + 437 xstring_contents: xstring_contents string_content . + + $default reduce using rule 437 (xstring_contents) + + +state 466 + + 421 string1: tSTRING_BEG string_contents tSTRING_END . + + $default reduce using rule 421 (string1) + + +state 467 + + 435 string_contents: string_contents string_content . + + $default reduce using rule 435 (string_contents) + + +state 468 + + 422 xstring: tXSTRING_BEG xstring_contents tSTRING_END . + + $default reduce using rule 422 (xstring) + + +state 469 + + 423 regexp: tREGEXP_BEG xstring_contents tREGEXP_END . + + $default reduce using rule 423 (regexp) + + +state 470 + + 424 words: tWORDS_BEG ' ' tSTRING_END . + + $default reduce using rule 424 (words) + + +state 471 + + 425 words: tWORDS_BEG word_list tSTRING_END . + + $default reduce using rule 425 (words) + + +state 472 + + 427 word_list: word_list word . ' ' + 429 word: word . string_content + + tSTRING_CONTENT shift, and go to state 461 + tSTRING_DBEG shift, and go to state 462 + tSTRING_DVAR shift, and go to state 463 + ' ' shift, and go to state 645 + + string_content go to state 646 + + +state 473 + + 428 word: string_content . + + $default reduce using rule 428 (word) + + +state 474 + + 430 qwords: tQWORDS_BEG ' ' tSTRING_END . + + $default reduce using rule 430 (qwords) + + +state 475 + + 433 qword_list: qword_list tSTRING_CONTENT . ' ' + + ' ' shift, and go to state 647 + + +state 476 + + 431 qwords: tQWORDS_BEG qword_list tSTRING_END . + + $default reduce using rule 431 (qwords) + + +state 477 + + 202 arg: tUMINUS_NUM tINTEGER tPOW . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 648 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 478 + + 203 arg: tUMINUS_NUM tFLOAT tPOW . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 649 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 479 + + 552 terms: terms ';' . + + $default reduce using rule 552 (terms) + + +state 480 + + 7 stmts: stmts terms stmt . + 15 stmt: stmt . modifier_if expr_value + 16 | stmt . modifier_unless expr_value + 17 | stmt . modifier_while expr_value + 18 | stmt . modifier_until expr_value + 19 | stmt . modifier_rescue stmt + + modifier_if shift, and go to state 284 + modifier_unless shift, and go to state 285 + modifier_while shift, and go to state 286 + modifier_until shift, and go to state 287 + modifier_rescue shift, and go to state 288 + + $default reduce using rule 7 (stmts) + + +state 481 + + 15 stmt: stmt modifier_if expr_value . + + $default reduce using rule 15 (stmt) + + +state 482 + + 16 stmt: stmt modifier_unless expr_value . + + $default reduce using rule 16 (stmt) + + +state 483 + + 17 stmt: stmt modifier_while expr_value . + + $default reduce using rule 17 (stmt) + + +state 484 + + 18 stmt: stmt modifier_until expr_value . + + $default reduce using rule 18 (stmt) + + +state 485 + + 15 stmt: stmt . modifier_if expr_value + 16 | stmt . modifier_unless expr_value + 17 | stmt . modifier_while expr_value + 18 | stmt . modifier_until expr_value + 19 | stmt . modifier_rescue stmt + 19 | stmt modifier_rescue stmt . + + $default reduce using rule 19 (stmt) + + +state 486 + + 36 expr: expr . keyword_and expr + 36 | expr keyword_and expr . + 37 | expr . keyword_or expr + + $default reduce using rule 36 (expr) + + +state 487 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 37 | expr keyword_or expr . + + $default reduce using rule 37 (expr) + + +state 488 + + 385 do_block: keyword_do_block @25 . opt_block_param compstmt keyword_end + + tOROP shift, and go to state 650 + '|' shift, and go to state 651 + + $default reduce using rule 553 (none) + + opt_block_param go to state 652 + block_param_def go to state 653 + none go to state 654 + + +state 489 + + 251 args: tSTAR . arg_value + 256 mrhs: tSTAR . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 655 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 490 + + 24 stmt: mlhs '=' command_call . + + $default reduce using rule 24 (stmt) + + +state 491 + + 32 stmt: mlhs '=' arg_value . + 250 args: arg_value . + + ',' reduce using rule 250 (args) + $default reduce using rule 32 (stmt) + + +state 492 + + 252 args: args . ',' arg_value + 253 | args . ',' tSTAR arg_value + 254 mrhs: args . ',' arg_value + 255 | args . ',' tSTAR arg_value + + ',' shift, and go to state 656 + + +state 493 + + 33 stmt: mlhs '=' mrhs . + + $default reduce using rule 33 (stmt) + + +state 494 + + 75 mlhs_item: tLPAREN mlhs_inner . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 657 + + +state 495 + + 69 mlhs_basic: mlhs_head tSTAR ',' . mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs_item go to state 432 + mlhs_post go to state 658 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 496 + + 66 mlhs_basic: mlhs_head tSTAR mlhs_node . + 67 | mlhs_head tSTAR mlhs_node . ',' mlhs_post + + ',' shift, and go to state 659 + + $default reduce using rule 66 (mlhs_basic) + + +state 497 + + 77 mlhs_head: mlhs_head mlhs_item ',' . + + $default reduce using rule 77 (mlhs_head) + + +state 498 + + 23 stmt: lhs '=' command_call . + + $default reduce using rule 23 (stmt) + + +state 499 + + 183 arg: lhs '=' arg . + 184 | lhs '=' arg . modifier_rescue arg + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + 229 arg_value: arg . + + modifier_rescue shift, and go to state 660 + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + ',' reduce using rule 229 (arg_value) + $default reduce using rule 183 (arg) + + +state 500 + + 250 args: arg_value . + + $default reduce using rule 250 (args) + + +state 501 + + 31 stmt: lhs '=' mrhs . + + $default reduce using rule 31 (stmt) + + +state 502 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 201 | arg tPOW arg . + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 201 (arg) + + +state 503 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 209 | arg tCMP arg . + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 209 (arg) + + +state 504 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 214 | arg tEQ arg . + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 214 (arg) + + +state 505 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 215 | arg tEQQ arg . + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 215 (arg) + + +state 506 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 216 | arg tNEQ arg . + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 216 (arg) + + +state 507 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 211 | arg tGEQ arg . + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 211 (arg) + + +state 508 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 213 | arg tLEQ arg . + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 213 (arg) + + +state 509 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 223 | arg tANDOP arg . + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 223 (arg) + + +state 510 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 224 | arg tOROP arg . + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 224 (arg) + + +state 511 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 217 | arg tMATCH arg . + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 217 (arg) + + +state 512 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 218 | arg tNMATCH arg . + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tCMP error (nonassociative) + tEQ error (nonassociative) + tEQQ error (nonassociative) + tNEQ error (nonassociative) + tMATCH error (nonassociative) + tNMATCH error (nonassociative) + + $default reduce using rule 218 (arg) + + +state 513 + + 194 arg: arg . tDOT2 arg + 194 | arg tDOT2 arg . + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tDOT2 error (nonassociative) + tDOT3 error (nonassociative) + + $default reduce using rule 194 (arg) + + +state 514 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 195 | arg tDOT3 arg . + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + tDOT2 error (nonassociative) + tDOT3 error (nonassociative) + + $default reduce using rule 195 (arg) + + +state 515 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 221 | arg tLSHFT arg . + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 221 (arg) + + +state 516 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 222 | arg tRSHFT arg . + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 222 (arg) + + +state 517 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + 227 | arg '?' arg . opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 661 + + +state 518 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 210 | arg '>' arg . + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 210 (arg) + + +state 519 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 212 | arg '<' arg . + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 212 (arg) + + +state 520 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 206 | arg '|' arg . + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 206 (arg) + + +state 521 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 207 | arg '^' arg . + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 207 (arg) + + +state 522 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 208 | arg '&' arg . + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 208 (arg) + + +state 523 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 196 | arg '+' arg . + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 196 (arg) + + +state 524 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 197 | arg '-' arg . + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 197 (arg) + + +state 525 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 198 | arg '*' arg . + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 198 (arg) + + +state 526 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 199 | arg '/' arg . + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 199 (arg) + + +state 527 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 200 | arg '%' arg . + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 200 (arg) + + +state 528 + + 29 stmt: primary_value tCOLON2 tIDENTIFIER . tOP_ASGN command_call + 83 mlhs_node: primary_value tCOLON2 tIDENTIFIER . + 91 lhs: primary_value tCOLON2 tIDENTIFIER . + 190 arg: primary_value tCOLON2 tIDENTIFIER . tOP_ASGN arg + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + tOP_ASGN shift, and go to state 662 + + $end reduce using rule 535 (operation3) + keyword_rescue reduce using rule 535 (operation3) + keyword_ensure reduce using rule 535 (operation3) + keyword_end reduce using rule 535 (operation3) + keyword_elsif reduce using rule 535 (operation3) + keyword_else reduce using rule 535 (operation3) + keyword_when reduce using rule 535 (operation3) + keyword_do reduce using rule 535 (operation3) + keyword_and reduce using rule 535 (operation3) + keyword_or reduce using rule 535 (operation3) + modifier_if reduce using rule 535 (operation3) + modifier_unless reduce using rule 535 (operation3) + modifier_while reduce using rule 535 (operation3) + modifier_until reduce using rule 535 (operation3) + modifier_rescue reduce using rule 535 (operation3) + tPOW reduce using rule 535 (operation3) + tCMP reduce using rule 535 (operation3) + tEQ reduce using rule 535 (operation3) + tEQQ reduce using rule 535 (operation3) + tNEQ reduce using rule 535 (operation3) + tGEQ reduce using rule 535 (operation3) + tLEQ reduce using rule 535 (operation3) + tANDOP reduce using rule 535 (operation3) + tOROP reduce using rule 535 (operation3) + tMATCH reduce using rule 535 (operation3) + tNMATCH reduce using rule 535 (operation3) + tDOT2 reduce using rule 535 (operation3) + tDOT3 reduce using rule 535 (operation3) + tLSHFT reduce using rule 535 (operation3) + tRSHFT reduce using rule 535 (operation3) + tCOLON2 reduce using rule 535 (operation3) + '=' reduce using rule 91 (lhs) + '?' reduce using rule 535 (operation3) + '>' reduce using rule 535 (operation3) + '<' reduce using rule 535 (operation3) + '|' reduce using rule 535 (operation3) + '^' reduce using rule 535 (operation3) + '&' reduce using rule 535 (operation3) + '+' reduce using rule 535 (operation3) + '-' reduce using rule 535 (operation3) + '*' reduce using rule 535 (operation3) + '/' reduce using rule 535 (operation3) + '%' reduce using rule 535 (operation3) + '{' reduce using rule 535 (operation3) + '}' reduce using rule 535 (operation3) + '[' reduce using rule 535 (operation3) + '.' reduce using rule 535 (operation3) + ',' reduce using rule 83 (mlhs_node) + ')' reduce using rule 535 (operation3) + ';' reduce using rule 535 (operation3) + '\n' reduce using rule 535 (operation3) + $default reduce using rule 531 (operation2) + + +state 529 + + 533 operation2: tFID . + 536 operation3: tFID . + + keyword_class reduce using rule 533 (operation2) + keyword_module reduce using rule 533 (operation2) + keyword_def reduce using rule 533 (operation2) + keyword_begin reduce using rule 533 (operation2) + keyword_if reduce using rule 533 (operation2) + keyword_unless reduce using rule 533 (operation2) + keyword_case reduce using rule 533 (operation2) + keyword_while reduce using rule 533 (operation2) + keyword_until reduce using rule 533 (operation2) + keyword_for reduce using rule 533 (operation2) + keyword_break reduce using rule 533 (operation2) + keyword_next reduce using rule 533 (operation2) + keyword_redo reduce using rule 533 (operation2) + keyword_retry reduce using rule 533 (operation2) + keyword_return reduce using rule 533 (operation2) + keyword_yield reduce using rule 533 (operation2) + keyword_super reduce using rule 533 (operation2) + keyword_self reduce using rule 533 (operation2) + keyword_nil reduce using rule 533 (operation2) + keyword_true reduce using rule 533 (operation2) + keyword_false reduce using rule 533 (operation2) + keyword_not reduce using rule 533 (operation2) + keyword_defined reduce using rule 533 (operation2) + keyword__LINE__ reduce using rule 533 (operation2) + keyword__FILE__ reduce using rule 533 (operation2) + keyword__ENCODING__ reduce using rule 533 (operation2) + tIDENTIFIER reduce using rule 533 (operation2) + tFID reduce using rule 533 (operation2) + tGVAR reduce using rule 533 (operation2) + tIVAR reduce using rule 533 (operation2) + tCONSTANT reduce using rule 533 (operation2) + tCVAR reduce using rule 533 (operation2) + tLABEL reduce using rule 533 (operation2) + tINTEGER reduce using rule 533 (operation2) + tFLOAT reduce using rule 533 (operation2) + tCHAR reduce using rule 533 (operation2) + tNTH_REF reduce using rule 533 (operation2) + tBACK_REF reduce using rule 533 (operation2) + tUPLUS reduce using rule 533 (operation2) + tUMINUS reduce using rule 533 (operation2) + tCOLON3 reduce using rule 533 (operation2) + tLPAREN reduce using rule 533 (operation2) + tLPAREN_ARG reduce using rule 533 (operation2) + tLBRACK reduce using rule 533 (operation2) + tLBRACE reduce using rule 533 (operation2) + tSTAR reduce using rule 533 (operation2) + tAMPER reduce using rule 533 (operation2) + tLAMBDA reduce using rule 533 (operation2) + tSYMBEG reduce using rule 533 (operation2) + tSTRING_BEG reduce using rule 533 (operation2) + tXSTRING_BEG reduce using rule 533 (operation2) + tREGEXP_BEG reduce using rule 533 (operation2) + tWORDS_BEG reduce using rule 533 (operation2) + tQWORDS_BEG reduce using rule 533 (operation2) + tUMINUS_NUM reduce using rule 533 (operation2) + '!' reduce using rule 533 (operation2) + '~' reduce using rule 533 (operation2) + '(' reduce using rule 533 (operation2) + $default reduce using rule 536 (operation3) + + +state 530 + + 85 mlhs_node: primary_value tCOLON2 tCONSTANT . + 93 lhs: primary_value tCOLON2 tCONSTANT . + 191 arg: primary_value tCOLON2 tCONSTANT . tOP_ASGN arg + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + tOP_ASGN shift, and go to state 663 + + $end reduce using rule 271 (primary) + keyword_rescue reduce using rule 271 (primary) + keyword_ensure reduce using rule 271 (primary) + keyword_end reduce using rule 271 (primary) + keyword_elsif reduce using rule 271 (primary) + keyword_else reduce using rule 271 (primary) + keyword_when reduce using rule 271 (primary) + keyword_and reduce using rule 271 (primary) + keyword_or reduce using rule 271 (primary) + modifier_if reduce using rule 271 (primary) + modifier_unless reduce using rule 271 (primary) + modifier_while reduce using rule 271 (primary) + modifier_until reduce using rule 271 (primary) + modifier_rescue reduce using rule 271 (primary) + tPOW reduce using rule 271 (primary) + tCMP reduce using rule 271 (primary) + tEQ reduce using rule 271 (primary) + tEQQ reduce using rule 271 (primary) + tNEQ reduce using rule 271 (primary) + tGEQ reduce using rule 271 (primary) + tLEQ reduce using rule 271 (primary) + tANDOP reduce using rule 271 (primary) + tOROP reduce using rule 271 (primary) + tMATCH reduce using rule 271 (primary) + tNMATCH reduce using rule 271 (primary) + tDOT2 reduce using rule 271 (primary) + tDOT3 reduce using rule 271 (primary) + tLSHFT reduce using rule 271 (primary) + tRSHFT reduce using rule 271 (primary) + tCOLON2 reduce using rule 271 (primary) + '=' reduce using rule 93 (lhs) + '?' reduce using rule 271 (primary) + '>' reduce using rule 271 (primary) + '<' reduce using rule 271 (primary) + '|' reduce using rule 271 (primary) + '^' reduce using rule 271 (primary) + '&' reduce using rule 271 (primary) + '+' reduce using rule 271 (primary) + '-' reduce using rule 271 (primary) + '*' reduce using rule 271 (primary) + '/' reduce using rule 271 (primary) + '%' reduce using rule 271 (primary) + '}' reduce using rule 271 (primary) + '[' reduce using rule 271 (primary) + '.' reduce using rule 271 (primary) + ',' reduce using rule 85 (mlhs_node) + ')' reduce using rule 271 (primary) + ';' reduce using rule 271 (primary) + '\n' reduce using rule 271 (primary) + $default reduce using rule 532 (operation2) + + +state 531 + + 534 operation2: op . + 537 operation3: op . + + keyword_class reduce using rule 534 (operation2) + keyword_module reduce using rule 534 (operation2) + keyword_def reduce using rule 534 (operation2) + keyword_begin reduce using rule 534 (operation2) + keyword_if reduce using rule 534 (operation2) + keyword_unless reduce using rule 534 (operation2) + keyword_case reduce using rule 534 (operation2) + keyword_while reduce using rule 534 (operation2) + keyword_until reduce using rule 534 (operation2) + keyword_for reduce using rule 534 (operation2) + keyword_break reduce using rule 534 (operation2) + keyword_next reduce using rule 534 (operation2) + keyword_redo reduce using rule 534 (operation2) + keyword_retry reduce using rule 534 (operation2) + keyword_return reduce using rule 534 (operation2) + keyword_yield reduce using rule 534 (operation2) + keyword_super reduce using rule 534 (operation2) + keyword_self reduce using rule 534 (operation2) + keyword_nil reduce using rule 534 (operation2) + keyword_true reduce using rule 534 (operation2) + keyword_false reduce using rule 534 (operation2) + keyword_not reduce using rule 534 (operation2) + keyword_defined reduce using rule 534 (operation2) + keyword__LINE__ reduce using rule 534 (operation2) + keyword__FILE__ reduce using rule 534 (operation2) + keyword__ENCODING__ reduce using rule 534 (operation2) + tIDENTIFIER reduce using rule 534 (operation2) + tFID reduce using rule 534 (operation2) + tGVAR reduce using rule 534 (operation2) + tIVAR reduce using rule 534 (operation2) + tCONSTANT reduce using rule 534 (operation2) + tCVAR reduce using rule 534 (operation2) + tLABEL reduce using rule 534 (operation2) + tINTEGER reduce using rule 534 (operation2) + tFLOAT reduce using rule 534 (operation2) + tCHAR reduce using rule 534 (operation2) + tNTH_REF reduce using rule 534 (operation2) + tBACK_REF reduce using rule 534 (operation2) + tUPLUS reduce using rule 534 (operation2) + tUMINUS reduce using rule 534 (operation2) + tCOLON3 reduce using rule 534 (operation2) + tLPAREN reduce using rule 534 (operation2) + tLPAREN_ARG reduce using rule 534 (operation2) + tLBRACK reduce using rule 534 (operation2) + tLBRACE reduce using rule 534 (operation2) + tSTAR reduce using rule 534 (operation2) + tAMPER reduce using rule 534 (operation2) + tLAMBDA reduce using rule 534 (operation2) + tSYMBEG reduce using rule 534 (operation2) + tSTRING_BEG reduce using rule 534 (operation2) + tXSTRING_BEG reduce using rule 534 (operation2) + tREGEXP_BEG reduce using rule 534 (operation2) + tWORDS_BEG reduce using rule 534 (operation2) + tQWORDS_BEG reduce using rule 534 (operation2) + tUMINUS_NUM reduce using rule 534 (operation2) + '!' reduce using rule 534 (operation2) + '~' reduce using rule 534 (operation2) + '(' reduce using rule 534 (operation2) + $default reduce using rule 537 (operation3) + + +state 532 + + 394 method_call: primary_value tCOLON2 paren_args . + + $default reduce using rule 394 (method_call) + + +state 533 + + 56 command: primary_value tCOLON2 operation2 . command_args + 57 | primary_value tCOLON2 operation2 . command_args cmd_brace_block + 391 method_call: primary_value tCOLON2 operation2 . paren_args + + '(' shift, and go to state 219 + + $default reduce using rule 244 (@7) + + paren_args go to state 664 + command_args go to state 665 + @7 go to state 218 + + +state 534 + + 392 method_call: primary_value tCOLON2 operation3 . + + $default reduce using rule 392 (method_call) + + +state 535 + + 26 stmt: primary_value '[' opt_call_args . rbracket tOP_ASGN command_call + 81 mlhs_node: primary_value '[' opt_call_args . rbracket + 89 lhs: primary_value '[' opt_call_args . rbracket + 187 arg: primary_value '[' opt_call_args . rbracket tOP_ASGN arg + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 667 + + +state 536 + + 27 stmt: primary_value '.' tIDENTIFIER . tOP_ASGN command_call + 82 mlhs_node: primary_value '.' tIDENTIFIER . + 90 lhs: primary_value '.' tIDENTIFIER . + 188 arg: primary_value '.' tIDENTIFIER . tOP_ASGN arg + 531 operation2: tIDENTIFIER . + + tOP_ASGN shift, and go to state 668 + + '=' reduce using rule 90 (lhs) + ',' reduce using rule 82 (mlhs_node) + $default reduce using rule 531 (operation2) + + +state 537 + + 533 operation2: tFID . + + $default reduce using rule 533 (operation2) + + +state 538 + + 28 stmt: primary_value '.' tCONSTANT . tOP_ASGN command_call + 84 mlhs_node: primary_value '.' tCONSTANT . + 92 lhs: primary_value '.' tCONSTANT . + 189 arg: primary_value '.' tCONSTANT . tOP_ASGN arg + 532 operation2: tCONSTANT . + + tOP_ASGN shift, and go to state 669 + + '=' reduce using rule 92 (lhs) + ',' reduce using rule 84 (mlhs_node) + $default reduce using rule 532 (operation2) + + +state 539 + + 534 operation2: op . + + $default reduce using rule 534 (operation2) + + +state 540 + + 393 method_call: primary_value '.' paren_args . + + $default reduce using rule 393 (method_call) + + +state 541 + + 54 command: primary_value '.' operation2 . command_args + 55 | primary_value '.' operation2 . command_args cmd_brace_block + 390 method_call: primary_value '.' operation2 . opt_paren_args + + '(' shift, and go to state 219 + + $end reduce using rule 553 (none) + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_then reduce using rule 553 (none) + keyword_elsif reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + keyword_when reduce using rule 553 (none) + keyword_do reduce using rule 553 (none) + keyword_do_cond reduce using rule 553 (none) + keyword_do_block reduce using rule 553 (none) + keyword_and reduce using rule 553 (none) + keyword_or reduce using rule 553 (none) + modifier_if reduce using rule 553 (none) + modifier_unless reduce using rule 553 (none) + modifier_while reduce using rule 553 (none) + modifier_until reduce using rule 553 (none) + modifier_rescue reduce using rule 553 (none) + tPOW reduce using rule 553 (none) + tCMP reduce using rule 553 (none) + tEQ reduce using rule 553 (none) + tEQQ reduce using rule 553 (none) + tNEQ reduce using rule 553 (none) + tGEQ reduce using rule 553 (none) + tLEQ reduce using rule 553 (none) + tANDOP reduce using rule 553 (none) + tOROP reduce using rule 553 (none) + tMATCH reduce using rule 553 (none) + tNMATCH reduce using rule 553 (none) + tDOT2 reduce using rule 553 (none) + tDOT3 reduce using rule 553 (none) + tLSHFT reduce using rule 553 (none) + tRSHFT reduce using rule 553 (none) + tCOLON2 reduce using rule 553 (none) + tASSOC reduce using rule 553 (none) + tLBRACE_ARG reduce using rule 553 (none) + '?' reduce using rule 553 (none) + '>' reduce using rule 553 (none) + '<' reduce using rule 553 (none) + '|' reduce using rule 553 (none) + '^' reduce using rule 553 (none) + '&' reduce using rule 553 (none) + '+' reduce using rule 553 (none) + '-' reduce using rule 553 (none) + '*' reduce using rule 553 (none) + '/' reduce using rule 553 (none) + '%' reduce using rule 553 (none) + '{' reduce using rule 553 (none) + '}' reduce using rule 553 (none) + '[' reduce using rule 553 (none) + '.' reduce using rule 553 (none) + ',' reduce using rule 553 (none) + ')' reduce using rule 553 (none) + ']' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + $default reduce using rule 244 (@7) + + paren_args go to state 670 + opt_paren_args go to state 671 + command_args go to state 672 + @7 go to state 218 + none go to state 673 + + +state 542 + + 267 primary: k_begin @8 bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 675 + + +state 543 + + 3 bodystmt: compstmt . opt_rescue opt_else opt_ensure + + keyword_rescue shift, and go to state 676 + + $default reduce using rule 553 (none) + + opt_rescue go to state 677 + none go to state 678 + + +state 544 + + 329 then: keyword_then . + + $default reduce using rule 329 (then) + + +state 545 + + 287 primary: k_if expr_value then . compstmt if_tail k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + keyword_elsif reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 679 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 546 + + 328 then: term . + 330 | term . keyword_then + + keyword_then shift, and go to state 680 + + $default reduce using rule 328 (then) + + +state 547 + + 288 primary: k_unless expr_value then . compstmt opt_else k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 681 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 548 + + 291 primary: k_while @11 expr_value . do @12 compstmt k_end + + keyword_do_cond shift, and go to state 682 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + do go to state 683 + term go to state 684 + + +state 549 + + 294 primary: k_until @13 expr_value . do @14 compstmt k_end + + keyword_do_cond shift, and go to state 682 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + do go to state 685 + term go to state 684 + + +state 550 + + 295 primary: k_case expr_value opt_terms . case_body k_end + + keyword_when shift, and go to state 551 + + case_body go to state 686 + + +state 551 + + 402 case_body: keyword_when . args then compstmt cases + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 500 + args go to state 687 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 552 + + 296 primary: k_case opt_terms case_body . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 688 + + +state 553 + + 86 mlhs_node: tCOLON3 tCONSTANT . + 94 lhs: tCOLON3 tCONSTANT . + 272 primary: tCOLON3 tCONSTANT . + + keyword_in reduce using rule 94 (lhs) + ',' reduce using rule 86 (mlhs_node) + $default reduce using rule 272 (primary) + + +state 554 + + 83 mlhs_node: primary_value tCOLON2 . tIDENTIFIER + 85 | primary_value tCOLON2 . tCONSTANT + 91 lhs: primary_value tCOLON2 . tIDENTIFIER + 93 | primary_value tCOLON2 . tCONSTANT + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 689 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 690 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 555 + + 81 mlhs_node: primary_value '[' . opt_call_args rbracket + 89 lhs: primary_value '[' . opt_call_args rbracket + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 691 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 556 + + 82 mlhs_node: primary_value '.' . tIDENTIFIER + 84 | primary_value '.' . tCONSTANT + 90 lhs: primary_value '.' . tIDENTIFIER + 92 | primary_value '.' . tCONSTANT + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 692 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 693 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 610 + + +state 557 + + 299 primary: k_for for_var keyword_in . @15 expr_value do @16 compstmt k_end + + $default reduce using rule 297 (@15) + + @15 go to state 694 + + +state 558 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 304 primary: k_class tLSHFT expr . @18 term @19 bodystmt k_end + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + + $default reduce using rule 302 (@18) + + @18 go to state 695 + + +state 559 + + 96 cname: tIDENTIFIER . + + $default reduce using rule 96 (cname) + + +state 560 + + 97 cname: tCONSTANT . + 272 primary: tCOLON3 tCONSTANT . + + tCOLON2 reduce using rule 272 (primary) + '[' reduce using rule 272 (primary) + '.' reduce using rule 272 (primary) + $default reduce using rule 97 (cname) + + +state 561 + + 98 cpath: tCOLON3 cname . + + $default reduce using rule 98 (cpath) + + +state 562 + + 476 superclass: error . term + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + term go to state 696 + + +state 563 + + 475 superclass: '<' . @30 expr_value term + + $default reduce using rule 474 (@30) + + @30 go to state 697 + + +state 564 + + 301 primary: k_class cpath superclass . @17 bodystmt k_end + + $default reduce using rule 300 (@17) + + @17 go to state 698 + + +state 565 + + 473 superclass: term . + + $default reduce using rule 473 (superclass) + + +state 566 + + 100 cpath: primary_value tCOLON2 . cname + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 699 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 700 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + cname go to state 701 + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 567 + + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 702 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 568 + + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 575 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 576 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 610 + + +state 569 + + 306 primary: k_module cpath @20 . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 703 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 570 + + 521 singleton: '(' @31 . expr rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 704 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 571 + + 308 primary: k_def fname @21 . f_arglist bodystmt k_end + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + '(' shift, and go to state 705 + + $default reduce using rule 493 (f_args) + + f_arglist go to state 706 + f_args go to state 707 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 454 + f_opt go to state 455 + f_optarg go to state 456 + restarg_mark go to state 457 + f_rest_arg go to state 458 + blkarg_mark go to state 459 + f_block_arg go to state 460 + + +state 572 + + 539 dot_or_colon: tCOLON2 . + + $default reduce using rule 539 (dot_or_colon) + + +state 573 + + 538 dot_or_colon: '.' . + + $default reduce using rule 538 (dot_or_colon) + + +state 574 + + 311 primary: k_def singleton dot_or_colon . @22 fname @23 f_arglist bodystmt k_end + + $default reduce using rule 309 (@22) + + @22 go to state 708 + + +state 575 + + 531 operation2: tIDENTIFIER . + + $default reduce using rule 531 (operation2) + + +state 576 + + 532 operation2: tCONSTANT . + + $default reduce using rule 532 (operation2) + + +state 577 + + 49 block_command: block_call tCOLON2 operation2 . command_args + 388 block_call: block_call tCOLON2 operation2 . opt_paren_args + + '(' shift, and go to state 219 + + $end reduce using rule 553 (none) + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_then reduce using rule 553 (none) + keyword_elsif reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + keyword_when reduce using rule 553 (none) + keyword_do_cond reduce using rule 553 (none) + keyword_and reduce using rule 553 (none) + keyword_or reduce using rule 553 (none) + modifier_if reduce using rule 553 (none) + modifier_unless reduce using rule 553 (none) + modifier_while reduce using rule 553 (none) + modifier_until reduce using rule 553 (none) + modifier_rescue reduce using rule 553 (none) + tCOLON2 reduce using rule 553 (none) + '}' reduce using rule 553 (none) + '.' reduce using rule 553 (none) + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + $default reduce using rule 244 (@7) + + paren_args go to state 670 + opt_paren_args go to state 709 + command_args go to state 710 + @7 go to state 218 + none go to state 673 + + +state 578 + + 48 block_command: block_call '.' operation2 . command_args + 387 block_call: block_call '.' operation2 . opt_paren_args + + '(' shift, and go to state 219 + + $end reduce using rule 553 (none) + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_then reduce using rule 553 (none) + keyword_elsif reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + keyword_when reduce using rule 553 (none) + keyword_do_cond reduce using rule 553 (none) + keyword_and reduce using rule 553 (none) + keyword_or reduce using rule 553 (none) + modifier_if reduce using rule 553 (none) + modifier_unless reduce using rule 553 (none) + modifier_while reduce using rule 553 (none) + modifier_until reduce using rule 553 (none) + modifier_rescue reduce using rule 553 (none) + tCOLON2 reduce using rule 553 (none) + '}' reduce using rule 553 (none) + '.' reduce using rule 553 (none) + ')' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + $default reduce using rule 244 (@7) + + paren_args go to state 670 + opt_paren_args go to state 711 + command_args go to state 712 + @7 go to state 218 + none go to state 673 + + +state 579 + + 401 brace_block: keyword_do @27 . opt_block_param compstmt keyword_end + + tOROP shift, and go to state 650 + '|' shift, and go to state 651 + + $default reduce using rule 553 (none) + + opt_block_param go to state 713 + block_param_def go to state 653 + none go to state 654 + + +state 580 + + 399 brace_block: '{' @26 . opt_block_param compstmt '}' + + tOROP shift, and go to state 650 + '|' shift, and go to state 651 + + $default reduce using rule 553 (none) + + opt_block_param go to state 714 + block_param_def go to state 653 + none go to state 654 + + +state 581 + + 25 stmt: var_lhs tOP_ASGN command_call . + + $default reduce using rule 25 (stmt) + + +state 582 + + 185 arg: var_lhs tOP_ASGN arg . + 186 | var_lhs tOP_ASGN arg . modifier_rescue arg + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + modifier_rescue shift, and go to state 715 + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 185 (arg) + + +state 583 + + 30 stmt: backref tOP_ASGN command_call . + + $default reduce using rule 30 (stmt) + + +state 584 + + 193 arg: backref tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 193 (arg) + + +state 585 + + 51 cmd_brace_block: tLBRACE_ARG . @4 opt_block_param compstmt '}' + + $default reduce using rule 50 (@4) + + @4 go to state 716 + + +state 586 + + 53 command: operation command_args cmd_brace_block . + + $default reduce using rule 53 (command) + + +state 587 + + 112 undef_list: undef_list ',' @5 . fitem + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tCONSTANT shift, and go to state 153 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + tSYMBEG shift, and go to state 55 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + fname go to state 183 + fsym go to state 184 + fitem go to state 717 + op go to state 187 + reswords go to state 188 + symbol go to state 189 + dsym go to state 190 + + +state 588 + + 183 arg: lhs '=' arg . + 184 | lhs '=' arg . modifier_rescue arg + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + modifier_rescue shift, and go to state 660 + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 183 (arg) + + +state 589 + + 526 assoc: arg_value tASSOC arg_value . + + $default reduce using rule 526 (assoc) + + +state 590 + + 253 args: args ',' tSTAR . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 718 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 591 + + 252 args: args ',' arg_value . + 526 assoc: arg_value . tASSOC arg_value + + tASSOC shift, and go to state 384 + + $default reduce using rule 252 (args) + + +state 592 + + 247 opt_block_arg: ',' block_arg . + + $default reduce using rule 247 (opt_block_arg) + + +state 593 + + 242 call_args: args ',' assocs . opt_block_arg + 525 assocs: assocs . ',' assoc + + ',' shift, and go to state 393 + + $default reduce using rule 553 (none) + + opt_block_arg go to state 719 + none go to state 387 + + +state 594 + + 91 lhs: primary_value tCOLON2 tIDENTIFIER . + 190 arg: primary_value tCOLON2 tIDENTIFIER . tOP_ASGN arg + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + tOP_ASGN shift, and go to state 720 + + keyword_class reduce using rule 531 (operation2) + keyword_module reduce using rule 531 (operation2) + keyword_def reduce using rule 531 (operation2) + keyword_begin reduce using rule 531 (operation2) + keyword_if reduce using rule 531 (operation2) + keyword_unless reduce using rule 531 (operation2) + keyword_case reduce using rule 531 (operation2) + keyword_while reduce using rule 531 (operation2) + keyword_until reduce using rule 531 (operation2) + keyword_for reduce using rule 531 (operation2) + keyword_break reduce using rule 531 (operation2) + keyword_next reduce using rule 531 (operation2) + keyword_redo reduce using rule 531 (operation2) + keyword_retry reduce using rule 531 (operation2) + keyword_return reduce using rule 531 (operation2) + keyword_yield reduce using rule 531 (operation2) + keyword_super reduce using rule 531 (operation2) + keyword_self reduce using rule 531 (operation2) + keyword_nil reduce using rule 531 (operation2) + keyword_true reduce using rule 531 (operation2) + keyword_false reduce using rule 531 (operation2) + keyword_not reduce using rule 531 (operation2) + keyword_defined reduce using rule 531 (operation2) + keyword__LINE__ reduce using rule 531 (operation2) + keyword__FILE__ reduce using rule 531 (operation2) + keyword__ENCODING__ reduce using rule 531 (operation2) + tIDENTIFIER reduce using rule 531 (operation2) + tFID reduce using rule 531 (operation2) + tGVAR reduce using rule 531 (operation2) + tIVAR reduce using rule 531 (operation2) + tCONSTANT reduce using rule 531 (operation2) + tCVAR reduce using rule 531 (operation2) + tLABEL reduce using rule 531 (operation2) + tINTEGER reduce using rule 531 (operation2) + tFLOAT reduce using rule 531 (operation2) + tCHAR reduce using rule 531 (operation2) + tNTH_REF reduce using rule 531 (operation2) + tBACK_REF reduce using rule 531 (operation2) + tUPLUS reduce using rule 531 (operation2) + tUMINUS reduce using rule 531 (operation2) + tCOLON3 reduce using rule 531 (operation2) + tLPAREN reduce using rule 531 (operation2) + tLPAREN_ARG reduce using rule 531 (operation2) + tLBRACK reduce using rule 531 (operation2) + tLBRACE reduce using rule 531 (operation2) + tSTAR reduce using rule 531 (operation2) + tAMPER reduce using rule 531 (operation2) + tLAMBDA reduce using rule 531 (operation2) + tSYMBEG reduce using rule 531 (operation2) + tSTRING_BEG reduce using rule 531 (operation2) + tXSTRING_BEG reduce using rule 531 (operation2) + tREGEXP_BEG reduce using rule 531 (operation2) + tWORDS_BEG reduce using rule 531 (operation2) + tQWORDS_BEG reduce using rule 531 (operation2) + '=' reduce using rule 91 (lhs) + tUMINUS_NUM reduce using rule 531 (operation2) + '!' reduce using rule 531 (operation2) + '~' reduce using rule 531 (operation2) + '(' reduce using rule 531 (operation2) + $default reduce using rule 535 (operation3) + + +state 595 + + 93 lhs: primary_value tCOLON2 tCONSTANT . + 191 arg: primary_value tCOLON2 tCONSTANT . tOP_ASGN arg + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + tOP_ASGN shift, and go to state 663 + + $end reduce using rule 271 (primary) + keyword_rescue reduce using rule 271 (primary) + keyword_ensure reduce using rule 271 (primary) + keyword_end reduce using rule 271 (primary) + keyword_then reduce using rule 271 (primary) + keyword_elsif reduce using rule 271 (primary) + keyword_else reduce using rule 271 (primary) + keyword_when reduce using rule 271 (primary) + keyword_do_cond reduce using rule 271 (primary) + keyword_do_block reduce using rule 271 (primary) + keyword_do_LAMBDA reduce using rule 271 (primary) + keyword_and reduce using rule 271 (primary) + keyword_or reduce using rule 271 (primary) + modifier_if reduce using rule 271 (primary) + modifier_unless reduce using rule 271 (primary) + modifier_while reduce using rule 271 (primary) + modifier_until reduce using rule 271 (primary) + modifier_rescue reduce using rule 271 (primary) + tPOW reduce using rule 271 (primary) + tCMP reduce using rule 271 (primary) + tEQ reduce using rule 271 (primary) + tEQQ reduce using rule 271 (primary) + tNEQ reduce using rule 271 (primary) + tGEQ reduce using rule 271 (primary) + tLEQ reduce using rule 271 (primary) + tANDOP reduce using rule 271 (primary) + tOROP reduce using rule 271 (primary) + tMATCH reduce using rule 271 (primary) + tNMATCH reduce using rule 271 (primary) + tDOT2 reduce using rule 271 (primary) + tDOT3 reduce using rule 271 (primary) + tLSHFT reduce using rule 271 (primary) + tRSHFT reduce using rule 271 (primary) + tCOLON2 reduce using rule 271 (primary) + tASSOC reduce using rule 271 (primary) + tLBRACE_ARG reduce using rule 271 (primary) + tLAMBEG reduce using rule 271 (primary) + '=' reduce using rule 93 (lhs) + '?' reduce using rule 271 (primary) + ':' reduce using rule 271 (primary) + '>' reduce using rule 271 (primary) + '<' reduce using rule 271 (primary) + '|' reduce using rule 271 (primary) + '^' reduce using rule 271 (primary) + '&' reduce using rule 271 (primary) + '+' reduce using rule 271 (primary) + '-' reduce using rule 271 (primary) + '*' reduce using rule 271 (primary) + '/' reduce using rule 271 (primary) + '%' reduce using rule 271 (primary) + '}' reduce using rule 271 (primary) + '[' reduce using rule 271 (primary) + '.' reduce using rule 271 (primary) + ',' reduce using rule 271 (primary) + ')' reduce using rule 271 (primary) + ']' reduce using rule 271 (primary) + ';' reduce using rule 271 (primary) + '\n' reduce using rule 271 (primary) + $default reduce using rule 532 (operation2) + + +state 596 + + 89 lhs: primary_value '[' opt_call_args . rbracket + 187 arg: primary_value '[' opt_call_args . rbracket tOP_ASGN arg + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 721 + + +state 597 + + 90 lhs: primary_value '.' tIDENTIFIER . + 188 arg: primary_value '.' tIDENTIFIER . tOP_ASGN arg + 531 operation2: tIDENTIFIER . + + tOP_ASGN shift, and go to state 722 + + '=' reduce using rule 90 (lhs) + $default reduce using rule 531 (operation2) + + +state 598 + + 92 lhs: primary_value '.' tCONSTANT . + 189 arg: primary_value '.' tCONSTANT . tOP_ASGN arg + 532 operation2: tCONSTANT . + + tOP_ASGN shift, and go to state 723 + + '=' reduce using rule 92 (lhs) + $default reduce using rule 532 (operation2) + + +state 599 + + 525 assocs: assocs ',' assoc . + + $default reduce using rule 525 (assocs) + + +state 600 + + 276 primary: keyword_yield '(' call_args rparen . + + $default reduce using rule 276 (primary) + + +state 601 + + 544 rparen: opt_nl ')' . + + $default reduce using rule 544 (rparen) + + +state 602 + + 234 paren_args: '(' opt_call_args rparen . + + $default reduce using rule 234 (paren_args) + + +state 603 + + 281 primary: keyword_not '(' expr rparen . + + $default reduce using rule 281 (primary) + + +state 604 + + 10 stmt: keyword_alias fitem @2 fitem . + + $default reduce using rule 10 (stmt) + + +state 605 + + 280 primary: keyword_defined opt_nl '(' @10 . expr rparen + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 724 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 606 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 226 | keyword_defined opt_nl @6 arg . + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 226 (arg) + + +state 607 + + 21 stmt: keyword_BEGIN @3 '{' compstmt . '}' + + '}' shift, and go to state 725 + + +state 608 + + 22 stmt: keyword_END '{' compstmt '}' . + + $default reduce using rule 22 (stmt) + + +state 609 + + 391 method_call: primary_value tCOLON2 operation2 . paren_args + + '(' shift, and go to state 219 + + paren_args go to state 664 + + +state 610 + + 390 method_call: primary_value '.' operation2 . opt_paren_args + + '(' shift, and go to state 219 + + $default reduce using rule 553 (none) + + paren_args go to state 670 + opt_paren_args go to state 671 + none go to state 673 + + +state 611 + + 192 arg: tCOLON3 tCONSTANT tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 192 (arg) + + +state 612 + + 61 mlhs: tLPAREN mlhs_inner rparen . + 63 mlhs_inner: tLPAREN mlhs_inner rparen . + 75 mlhs_item: tLPAREN mlhs_inner rparen . + + '=' reduce using rule 61 (mlhs) + ',' reduce using rule 75 (mlhs_item) + $default reduce using rule 63 (mlhs_inner) + + +state 613 + + 269 primary: tLPAREN_ARG expr @9 rparen . + + $default reduce using rule 269 (primary) + + +state 614 + + 232 aref_args: args ',' assocs . trailer + 525 assocs: assocs . ',' assoc + + ',' shift, and go to state 424 + '\n' shift, and go to state 422 + + $default reduce using rule 546 (trailer) + + trailer go to state 726 + + +state 615 + + 79 mlhs_post: mlhs_post ',' . mlhs_item + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs_item go to state 727 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 616 + + 71 mlhs_basic: tSTAR mlhs_node ',' mlhs_post . + 79 mlhs_post: mlhs_post . ',' mlhs_item + + ',' shift, and go to state 615 + + $default reduce using rule 71 (mlhs_basic) + + +state 617 + + 83 mlhs_node: primary_value tCOLON2 tIDENTIFIER . + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + keyword_do reduce using rule 535 (operation3) + tCOLON2 reduce using rule 535 (operation3) + '{' reduce using rule 535 (operation3) + '[' reduce using rule 535 (operation3) + '.' reduce using rule 535 (operation3) + '(' reduce using rule 531 (operation2) + $default reduce using rule 83 (mlhs_node) + + +state 618 + + 85 mlhs_node: primary_value tCOLON2 tCONSTANT . + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + tCOLON2 reduce using rule 271 (primary) + '[' reduce using rule 271 (primary) + '.' reduce using rule 271 (primary) + '(' reduce using rule 532 (operation2) + $default reduce using rule 85 (mlhs_node) + + +state 619 + + 81 mlhs_node: primary_value '[' opt_call_args . rbracket + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 728 + + +state 620 + + 82 mlhs_node: primary_value '.' tIDENTIFIER . + 531 operation2: tIDENTIFIER . + + keyword_in reduce using rule 82 (mlhs_node) + '=' reduce using rule 82 (mlhs_node) + ',' reduce using rule 82 (mlhs_node) + ')' reduce using rule 82 (mlhs_node) + '\n' reduce using rule 82 (mlhs_node) + $default reduce using rule 531 (operation2) + + +state 621 + + 84 mlhs_node: primary_value '.' tCONSTANT . + 532 operation2: tCONSTANT . + + keyword_in reduce using rule 84 (mlhs_node) + '=' reduce using rule 84 (mlhs_node) + ',' reduce using rule 84 (mlhs_node) + ')' reduce using rule 84 (mlhs_node) + '\n' reduce using rule 84 (mlhs_node) + $default reduce using rule 532 (operation2) + + +state 622 + + 504 f_opt: tIDENTIFIER '=' . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 729 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 623 + + 499 f_norm_arg: tIDENTIFIER . + + $default reduce using rule 499 (f_norm_arg) + + +state 624 + + 340 f_marg: tLPAREN . f_margs rparen + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + tSTAR shift, and go to state 625 + + f_marg go to state 626 + f_marg_list go to state 627 + f_margs go to state 730 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 625 + + 348 f_margs: tSTAR . f_norm_arg + 349 | tSTAR . f_norm_arg ',' f_marg_list + 350 | tSTAR . + 351 | tSTAR . ',' f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + ',' shift, and go to state 731 + + $default reduce using rule 350 (f_margs) + + f_bad_arg go to state 451 + f_norm_arg go to state 732 + + +state 626 + + 341 f_marg_list: f_marg . + + $default reduce using rule 341 (f_marg_list) + + +state 627 + + 342 f_marg_list: f_marg_list . ',' f_marg + 343 f_margs: f_marg_list . + 344 | f_marg_list . ',' tSTAR f_norm_arg + 345 | f_marg_list . ',' tSTAR f_norm_arg ',' f_marg_list + 346 | f_marg_list . ',' tSTAR + 347 | f_marg_list . ',' tSTAR ',' f_marg_list + + ',' shift, and go to state 733 + + $default reduce using rule 343 (f_margs) + + +state 628 + + 501 f_arg_item: tLPAREN f_margs . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 734 + + +state 629 + + 339 f_marg: f_norm_arg . + + $default reduce using rule 339 (f_marg) + + +state 630 + + 380 f_larglist: '(' f_args . opt_bv_decl rparen + + ';' shift, and go to state 735 + + $default reduce using rule 553 (none) + + opt_bv_decl go to state 736 + none go to state 737 + + +state 631 + + 383 lambda_body: keyword_do_LAMBDA . compstmt keyword_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 738 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 632 + + 382 lambda_body: tLAMBEG . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 739 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 633 + + 379 lambda: @24 f_larglist lambda_body . + + $default reduce using rule 379 (lambda) + + +state 634 + + 479 f_args: f_arg ',' . f_optarg ',' f_rest_arg opt_f_block_arg + 480 | f_arg ',' . f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 481 | f_arg ',' . f_optarg opt_f_block_arg + 482 | f_arg ',' . f_optarg ',' f_arg opt_f_block_arg + 483 | f_arg ',' . f_rest_arg opt_f_block_arg + 484 | f_arg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 503 f_arg: f_arg ',' . f_arg_item + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 740 + f_opt go to state 455 + f_optarg go to state 741 + restarg_mark go to state 457 + f_rest_arg go to state 742 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 635 + + 485 f_args: f_arg opt_f_block_arg . + + $default reduce using rule 485 (f_args) + + +state 636 + + 518 opt_f_block_arg: none . + + $default reduce using rule 518 (opt_f_block_arg) + + +state 637 + + 486 f_args: f_optarg ',' . f_rest_arg opt_f_block_arg + 487 | f_optarg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 489 | f_optarg ',' . f_arg opt_f_block_arg + 509 f_optarg: f_optarg ',' . f_opt + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 744 + f_opt go to state 745 + restarg_mark go to state 457 + f_rest_arg go to state 746 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 638 + + 488 f_args: f_optarg opt_f_block_arg . + + $default reduce using rule 488 (f_args) + + +state 639 + + 512 f_rest_arg: restarg_mark tIDENTIFIER . + + $default reduce using rule 512 (f_rest_arg) + + +state 640 + + 491 f_args: f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 747 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 641 + + 490 f_args: f_rest_arg opt_f_block_arg . + + $default reduce using rule 490 (f_args) + + +state 642 + + 516 f_block_arg: blkarg_mark tIDENTIFIER . + + $default reduce using rule 516 (f_block_arg) + + +state 643 + + 442 string_content: tSTRING_DBEG @29 . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 748 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 644 + + 440 string_content: tSTRING_DVAR @28 . string_dvar + + tGVAR shift, and go to state 749 + tIVAR shift, and go to state 750 + tCVAR shift, and go to state 751 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + + string_dvar go to state 752 + backref go to state 753 + + +state 645 + + 427 word_list: word_list word ' ' . + + $default reduce using rule 427 (word_list) + + +state 646 + + 429 word: word string_content . + + $default reduce using rule 429 (word) + + +state 647 + + 433 qword_list: qword_list tSTRING_CONTENT ' ' . + + $default reduce using rule 433 (qword_list) + + +state 648 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 202 | tUMINUS_NUM tINTEGER tPOW arg . + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 202 (arg) + + +state 649 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 203 | tUMINUS_NUM tFLOAT tPOW arg . + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + + $default reduce using rule 203 (arg) + + +state 650 + + 370 block_param_def: tOROP . + + $default reduce using rule 370 (block_param_def) + + +state 651 + + 369 block_param_def: '|' . opt_bv_decl '|' + 371 | '|' . block_param opt_bv_decl '|' + + tIDENTIFIER shift, and go to state 754 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + ';' shift, and go to state 735 + + $default reduce using rule 553 (none) + + block_param go to state 755 + opt_bv_decl go to state 756 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 757 + f_block_opt go to state 758 + f_block_optarg go to state 759 + restarg_mark go to state 457 + f_rest_arg go to state 760 + blkarg_mark go to state 459 + f_block_arg go to state 761 + none go to state 737 + + +state 652 + + 385 do_block: keyword_do_block @25 opt_block_param . compstmt keyword_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 762 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 653 + + 368 opt_block_param: block_param_def . + + $default reduce using rule 368 (opt_block_param) + + +state 654 + + 367 opt_block_param: none . + + $default reduce using rule 367 (opt_block_param) + + +state 655 + + 251 args: tSTAR arg_value . + 256 mrhs: tSTAR arg_value . + + ',' reduce using rule 251 (args) + $default reduce using rule 256 (mrhs) + + +state 656 + + 252 args: args ',' . arg_value + 253 | args ',' . tSTAR arg_value + 254 mrhs: args ',' . arg_value + 255 | args ',' . tSTAR arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 763 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 764 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 657 + + 75 mlhs_item: tLPAREN mlhs_inner rparen . + + $default reduce using rule 75 (mlhs_item) + + +state 658 + + 69 mlhs_basic: mlhs_head tSTAR ',' mlhs_post . + 79 mlhs_post: mlhs_post . ',' mlhs_item + + ',' shift, and go to state 615 + + $default reduce using rule 69 (mlhs_basic) + + +state 659 + + 67 mlhs_basic: mlhs_head tSTAR mlhs_node ',' . mlhs_post + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 251 + tLPAREN shift, and go to state 295 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + mlhs_item go to state 432 + mlhs_post go to state 765 + mlhs_node go to state 75 + primary go to state 255 + primary_value go to state 256 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 257 + var_ref go to state 104 + backref go to state 258 + operation go to state 234 + + +state 660 + + 184 arg: lhs '=' arg modifier_rescue . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 766 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 661 + + 227 arg: arg '?' arg opt_nl . ':' arg + + ':' shift, and go to state 767 + + +state 662 + + 29 stmt: primary_value tCOLON2 tIDENTIFIER tOP_ASGN . command_call + 190 arg: primary_value tCOLON2 tIDENTIFIER tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 768 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 769 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 663 + + 191 arg: primary_value tCOLON2 tCONSTANT tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 770 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 664 + + 391 method_call: primary_value tCOLON2 operation2 paren_args . + + $default reduce using rule 391 (method_call) + + +state 665 + + 56 command: primary_value tCOLON2 operation2 command_args . + 57 | primary_value tCOLON2 operation2 command_args . cmd_brace_block + + tLBRACE_ARG shift, and go to state 585 + + $default reduce using rule 56 (command) + + cmd_brace_block go to state 771 + + +state 666 + + 545 rbracket: opt_nl . ']' + + ']' shift, and go to state 772 + + +state 667 + + 26 stmt: primary_value '[' opt_call_args rbracket . tOP_ASGN command_call + 81 mlhs_node: primary_value '[' opt_call_args rbracket . + 89 lhs: primary_value '[' opt_call_args rbracket . + 187 arg: primary_value '[' opt_call_args rbracket . tOP_ASGN arg + 397 method_call: primary_value '[' opt_call_args rbracket . + + tOP_ASGN shift, and go to state 773 + + '=' reduce using rule 89 (lhs) + ',' reduce using rule 81 (mlhs_node) + $default reduce using rule 397 (method_call) + + +state 668 + + 27 stmt: primary_value '.' tIDENTIFIER tOP_ASGN . command_call + 188 arg: primary_value '.' tIDENTIFIER tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 774 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 775 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 669 + + 28 stmt: primary_value '.' tCONSTANT tOP_ASGN . command_call + 189 arg: primary_value '.' tCONSTANT tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 776 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 777 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 670 + + 236 opt_paren_args: paren_args . + + $default reduce using rule 236 (opt_paren_args) + + +state 671 + + 390 method_call: primary_value '.' operation2 opt_paren_args . + + $default reduce using rule 390 (method_call) + + +state 672 + + 54 command: primary_value '.' operation2 command_args . + 55 | primary_value '.' operation2 command_args . cmd_brace_block + + tLBRACE_ARG shift, and go to state 585 + + $default reduce using rule 54 (command) + + cmd_brace_block go to state 778 + + +state 673 + + 235 opt_paren_args: none . + + $default reduce using rule 235 (opt_paren_args) + + +state 674 + + 327 k_end: keyword_end . + + $default reduce using rule 327 (k_end) + + +state 675 + + 267 primary: k_begin @8 bodystmt k_end . + + $default reduce using rule 267 (primary) + + +state 676 + + 405 opt_rescue: keyword_rescue . exc_list exc_var then compstmt opt_rescue + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 489 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + lhs go to state 202 + arg go to state 203 + arg_value go to state 779 + args go to state 492 + mrhs go to state 780 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + exc_list go to state 781 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + none go to state 782 + + +state 677 + + 3 bodystmt: compstmt opt_rescue . opt_else opt_ensure + + keyword_else shift, and go to state 783 + + $default reduce using rule 553 (none) + + opt_else go to state 784 + none go to state 785 + + +state 678 + + 406 opt_rescue: none . + + $default reduce using rule 406 (opt_rescue) + + +state 679 + + 287 primary: k_if expr_value then compstmt . if_tail k_end + + keyword_elsif shift, and go to state 786 + keyword_else shift, and go to state 783 + + $default reduce using rule 553 (none) + + if_tail go to state 787 + opt_else go to state 788 + none go to state 785 + + +state 680 + + 330 then: term keyword_then . + + $default reduce using rule 330 (then) + + +state 681 + + 288 primary: k_unless expr_value then compstmt . opt_else k_end + + keyword_else shift, and go to state 783 + + $default reduce using rule 553 (none) + + opt_else go to state 789 + none go to state 785 + + +state 682 + + 332 do: keyword_do_cond . + + $default reduce using rule 332 (do) + + +state 683 + + 291 primary: k_while @11 expr_value do . @12 compstmt k_end + + $default reduce using rule 290 (@12) + + @12 go to state 790 + + +state 684 + + 331 do: term . + + $default reduce using rule 331 (do) + + +state 685 + + 294 primary: k_until @13 expr_value do . @14 compstmt k_end + + $default reduce using rule 293 (@14) + + @14 go to state 791 + + +state 686 + + 295 primary: k_case expr_value opt_terms case_body . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 792 + + +state 687 + + 252 args: args . ',' arg_value + 253 | args . ',' tSTAR arg_value + 402 case_body: keyword_when args . then compstmt cases + + keyword_then shift, and go to state 544 + ',' shift, and go to state 793 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + then go to state 794 + term go to state 546 + + +state 688 + + 296 primary: k_case opt_terms case_body k_end . + + $default reduce using rule 296 (primary) + + +state 689 + + 83 mlhs_node: primary_value tCOLON2 tIDENTIFIER . + 91 lhs: primary_value tCOLON2 tIDENTIFIER . + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + keyword_in reduce using rule 91 (lhs) + ',' reduce using rule 83 (mlhs_node) + '(' reduce using rule 531 (operation2) + $default reduce using rule 535 (operation3) + + +state 690 + + 85 mlhs_node: primary_value tCOLON2 tCONSTANT . + 93 lhs: primary_value tCOLON2 tCONSTANT . + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + keyword_in reduce using rule 93 (lhs) + ',' reduce using rule 85 (mlhs_node) + '(' reduce using rule 532 (operation2) + $default reduce using rule 271 (primary) + + +state 691 + + 81 mlhs_node: primary_value '[' opt_call_args . rbracket + 89 lhs: primary_value '[' opt_call_args . rbracket + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 795 + + +state 692 + + 82 mlhs_node: primary_value '.' tIDENTIFIER . + 90 lhs: primary_value '.' tIDENTIFIER . + 531 operation2: tIDENTIFIER . + + keyword_in reduce using rule 90 (lhs) + ',' reduce using rule 82 (mlhs_node) + $default reduce using rule 531 (operation2) + + +state 693 + + 84 mlhs_node: primary_value '.' tCONSTANT . + 92 lhs: primary_value '.' tCONSTANT . + 532 operation2: tCONSTANT . + + keyword_in reduce using rule 92 (lhs) + ',' reduce using rule 84 (mlhs_node) + $default reduce using rule 532 (operation2) + + +state 694 + + 299 primary: k_for for_var keyword_in @15 . expr_value do @16 compstmt k_end + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 796 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 695 + + 304 primary: k_class tLSHFT expr @18 . term @19 bodystmt k_end + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + term go to state 797 + + +state 696 + + 476 superclass: error term . + + $default reduce using rule 476 (superclass) + + +state 697 + + 475 superclass: '<' @30 . expr_value term + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 798 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 698 + + 301 primary: k_class cpath superclass @17 . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 799 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 699 + + 96 cname: tIDENTIFIER . + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + keyword_do reduce using rule 535 (operation3) + tCOLON2 reduce using rule 535 (operation3) + '{' reduce using rule 535 (operation3) + '[' reduce using rule 535 (operation3) + '.' reduce using rule 535 (operation3) + '(' reduce using rule 531 (operation2) + $default reduce using rule 96 (cname) + + +state 700 + + 97 cname: tCONSTANT . + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + tCOLON2 reduce using rule 271 (primary) + '[' reduce using rule 271 (primary) + '.' reduce using rule 271 (primary) + '(' reduce using rule 532 (operation2) + $default reduce using rule 97 (cname) + + +state 701 + + 100 cpath: primary_value tCOLON2 cname . + + $default reduce using rule 100 (cpath) + + +state 702 + + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 800 + + +state 703 + + 306 primary: k_module cpath @20 bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 801 + + +state 704 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 521 singleton: '(' @31 expr . rparen + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 802 + + +state 705 + + 477 f_arglist: '(' . f_args rparen + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + $default reduce using rule 493 (f_args) + + f_args go to state 803 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 454 + f_opt go to state 455 + f_optarg go to state 456 + restarg_mark go to state 457 + f_rest_arg go to state 458 + blkarg_mark go to state 459 + f_block_arg go to state 460 + + +state 706 + + 308 primary: k_def fname @21 f_arglist . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 804 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 707 + + 478 f_arglist: f_args . term + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + term go to state 805 + + +state 708 + + 311 primary: k_def singleton dot_or_colon @22 . fname @23 f_arglist bodystmt k_end + + keyword_class shift, and go to state 110 + keyword_module shift, and go to state 111 + keyword_def shift, and go to state 112 + keyword_undef shift, and go to state 113 + keyword_begin shift, and go to state 114 + keyword_rescue shift, and go to state 115 + keyword_ensure shift, and go to state 116 + keyword_end shift, and go to state 117 + keyword_if shift, and go to state 118 + keyword_unless shift, and go to state 119 + keyword_then shift, and go to state 120 + keyword_elsif shift, and go to state 121 + keyword_else shift, and go to state 122 + keyword_case shift, and go to state 123 + keyword_when shift, and go to state 124 + keyword_while shift, and go to state 125 + keyword_until shift, and go to state 126 + keyword_for shift, and go to state 127 + keyword_break shift, and go to state 128 + keyword_next shift, and go to state 129 + keyword_redo shift, and go to state 130 + keyword_retry shift, and go to state 131 + keyword_in shift, and go to state 132 + keyword_do shift, and go to state 133 + keyword_return shift, and go to state 134 + keyword_yield shift, and go to state 135 + keyword_super shift, and go to state 136 + keyword_self shift, and go to state 137 + keyword_nil shift, and go to state 138 + keyword_true shift, and go to state 139 + keyword_false shift, and go to state 140 + keyword_and shift, and go to state 141 + keyword_or shift, and go to state 142 + keyword_not shift, and go to state 143 + keyword_alias shift, and go to state 144 + keyword_defined shift, and go to state 145 + keyword_BEGIN shift, and go to state 146 + keyword_END shift, and go to state 147 + keyword__LINE__ shift, and go to state 148 + keyword__FILE__ shift, and go to state 149 + keyword__ENCODING__ shift, and go to state 150 + tIDENTIFIER shift, and go to state 151 + tFID shift, and go to state 152 + tCONSTANT shift, and go to state 153 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + + fname go to state 806 + op go to state 187 + reswords go to state 188 + + +state 709 + + 388 block_call: block_call tCOLON2 operation2 opt_paren_args . + + $default reduce using rule 388 (block_call) + + +state 710 + + 49 block_command: block_call tCOLON2 operation2 command_args . + + $default reduce using rule 49 (block_command) + + +state 711 + + 387 block_call: block_call '.' operation2 opt_paren_args . + + $default reduce using rule 387 (block_call) + + +state 712 + + 48 block_command: block_call '.' operation2 command_args . + + $default reduce using rule 48 (block_command) + + +state 713 + + 401 brace_block: keyword_do @27 opt_block_param . compstmt keyword_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 807 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 714 + + 399 brace_block: '{' @26 opt_block_param . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 808 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 715 + + 186 arg: var_lhs tOP_ASGN arg modifier_rescue . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 809 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 716 + + 51 cmd_brace_block: tLBRACE_ARG @4 . opt_block_param compstmt '}' + + tOROP shift, and go to state 650 + '|' shift, and go to state 651 + + $default reduce using rule 553 (none) + + opt_block_param go to state 810 + block_param_def go to state 653 + none go to state 654 + + +state 717 + + 112 undef_list: undef_list ',' @5 fitem . + + $default reduce using rule 112 (undef_list) + + +state 718 + + 253 args: args ',' tSTAR arg_value . + + $default reduce using rule 253 (args) + + +state 719 + + 242 call_args: args ',' assocs opt_block_arg . + + $default reduce using rule 242 (call_args) + + +state 720 + + 190 arg: primary_value tCOLON2 tIDENTIFIER tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 769 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 721 + + 89 lhs: primary_value '[' opt_call_args rbracket . + 187 arg: primary_value '[' opt_call_args rbracket . tOP_ASGN arg + 397 method_call: primary_value '[' opt_call_args rbracket . + + tOP_ASGN shift, and go to state 811 + + '=' reduce using rule 89 (lhs) + $default reduce using rule 397 (method_call) + + +state 722 + + 188 arg: primary_value '.' tIDENTIFIER tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 775 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 723 + + 189 arg: primary_value '.' tCONSTANT tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 777 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 724 + + 36 expr: expr . keyword_and expr + 37 | expr . keyword_or expr + 280 primary: keyword_defined opt_nl '(' @10 expr . rparen + + keyword_and shift, and go to state 289 + keyword_or shift, and go to state 290 + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 812 + + +state 725 + + 21 stmt: keyword_BEGIN @3 '{' compstmt '}' . + + $default reduce using rule 21 (stmt) + + +state 726 + + 232 aref_args: args ',' assocs trailer . + + $default reduce using rule 232 (aref_args) + + +state 727 + + 79 mlhs_post: mlhs_post ',' mlhs_item . + + $default reduce using rule 79 (mlhs_post) + + +state 728 + + 81 mlhs_node: primary_value '[' opt_call_args rbracket . + 397 method_call: primary_value '[' opt_call_args rbracket . + + keyword_do reduce using rule 397 (method_call) + tCOLON2 reduce using rule 397 (method_call) + '{' reduce using rule 397 (method_call) + '[' reduce using rule 397 (method_call) + '.' reduce using rule 397 (method_call) + $default reduce using rule 81 (mlhs_node) + + +state 729 + + 504 f_opt: tIDENTIFIER '=' arg_value . + + $default reduce using rule 504 (f_opt) + + +state 730 + + 340 f_marg: tLPAREN f_margs . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 813 + + +state 731 + + 351 f_margs: tSTAR ',' . f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + + f_marg go to state 626 + f_marg_list go to state 814 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 732 + + 348 f_margs: tSTAR f_norm_arg . + 349 | tSTAR f_norm_arg . ',' f_marg_list + + ',' shift, and go to state 815 + + $default reduce using rule 348 (f_margs) + + +state 733 + + 342 f_marg_list: f_marg_list ',' . f_marg + 344 f_margs: f_marg_list ',' . tSTAR f_norm_arg + 345 | f_marg_list ',' . tSTAR f_norm_arg ',' f_marg_list + 346 | f_marg_list ',' . tSTAR + 347 | f_marg_list ',' . tSTAR ',' f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + tSTAR shift, and go to state 816 + + f_marg go to state 817 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 734 + + 501 f_arg_item: tLPAREN f_margs rparen . + + $default reduce using rule 501 (f_arg_item) + + +state 735 + + 373 opt_bv_decl: ';' . bv_decls + + tIDENTIFIER shift, and go to state 818 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + + bv_decls go to state 819 + bvar go to state 820 + f_bad_arg go to state 821 + + +state 736 + + 380 f_larglist: '(' f_args opt_bv_decl . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 822 + + +state 737 + + 372 opt_bv_decl: none . + + $default reduce using rule 372 (opt_bv_decl) + + +state 738 + + 383 lambda_body: keyword_do_LAMBDA compstmt . keyword_end + + keyword_end shift, and go to state 823 + + +state 739 + + 382 lambda_body: tLAMBEG compstmt . '}' + + '}' shift, and go to state 824 + + +state 740 + + 503 f_arg: f_arg ',' f_arg_item . + + $default reduce using rule 503 (f_arg) + + +state 741 + + 479 f_args: f_arg ',' f_optarg . ',' f_rest_arg opt_f_block_arg + 480 | f_arg ',' f_optarg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 481 | f_arg ',' f_optarg . opt_f_block_arg + 482 | f_arg ',' f_optarg . ',' f_arg opt_f_block_arg + 509 f_optarg: f_optarg . ',' f_opt + + ',' shift, and go to state 825 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 826 + none go to state 636 + + +state 742 + + 483 f_args: f_arg ',' f_rest_arg . opt_f_block_arg + 484 | f_arg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 827 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 828 + none go to state 636 + + +state 743 + + 517 opt_f_block_arg: ',' f_block_arg . + + $default reduce using rule 517 (opt_f_block_arg) + + +state 744 + + 489 f_args: f_optarg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 830 + none go to state 636 + + +state 745 + + 509 f_optarg: f_optarg ',' f_opt . + + $default reduce using rule 509 (f_optarg) + + +state 746 + + 486 f_args: f_optarg ',' f_rest_arg . opt_f_block_arg + 487 | f_optarg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 831 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 832 + none go to state 636 + + +state 747 + + 491 f_args: f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 833 + none go to state 636 + + +state 748 + + 442 string_content: tSTRING_DBEG @29 compstmt . '}' + + '}' shift, and go to state 834 + + +state 749 + + 443 string_dvar: tGVAR . + + $default reduce using rule 443 (string_dvar) + + +state 750 + + 444 string_dvar: tIVAR . + + $default reduce using rule 444 (string_dvar) + + +state 751 + + 445 string_dvar: tCVAR . + + $default reduce using rule 445 (string_dvar) + + +state 752 + + 440 string_content: tSTRING_DVAR @28 string_dvar . + + $default reduce using rule 440 (string_content) + + +state 753 + + 446 string_dvar: backref . + + $default reduce using rule 446 (string_dvar) + + +state 754 + + 499 f_norm_arg: tIDENTIFIER . + 505 f_block_opt: tIDENTIFIER . '=' primary_value + + '=' shift, and go to state 835 + + $default reduce using rule 499 (f_norm_arg) + + +state 755 + + 371 block_param_def: '|' block_param . opt_bv_decl '|' + + ';' shift, and go to state 735 + + $default reduce using rule 553 (none) + + opt_bv_decl go to state 836 + none go to state 737 + + +state 756 + + 369 block_param_def: '|' opt_bv_decl . '|' + + '|' shift, and go to state 837 + + +state 757 + + 352 block_param: f_arg . ',' f_block_optarg ',' f_rest_arg opt_f_block_arg + 353 | f_arg . ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 354 | f_arg . ',' f_block_optarg opt_f_block_arg + 355 | f_arg . ',' f_block_optarg ',' f_arg opt_f_block_arg + 356 | f_arg . ',' f_rest_arg opt_f_block_arg + 357 | f_arg . ',' + 358 | f_arg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 359 | f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 838 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 839 + none go to state 636 + + +state 758 + + 506 f_block_optarg: f_block_opt . + + $default reduce using rule 506 (f_block_optarg) + + +state 759 + + 360 block_param: f_block_optarg . ',' f_rest_arg opt_f_block_arg + 361 | f_block_optarg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 362 | f_block_optarg . opt_f_block_arg + 363 | f_block_optarg . ',' f_arg opt_f_block_arg + 507 f_block_optarg: f_block_optarg . ',' f_block_opt + + ',' shift, and go to state 840 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 841 + none go to state 636 + + +state 760 + + 364 block_param: f_rest_arg . opt_f_block_arg + 365 | f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 842 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 843 + none go to state 636 + + +state 761 + + 366 block_param: f_block_arg . + + $default reduce using rule 366 (block_param) + + +state 762 + + 385 do_block: keyword_do_block @25 opt_block_param compstmt . keyword_end + + keyword_end shift, and go to state 844 + + +state 763 + + 253 args: args ',' tSTAR . arg_value + 255 mrhs: args ',' tSTAR . arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 845 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 764 + + 252 args: args ',' arg_value . + 254 mrhs: args ',' arg_value . + + ',' reduce using rule 252 (args) + $default reduce using rule 254 (mrhs) + + +state 765 + + 67 mlhs_basic: mlhs_head tSTAR mlhs_node ',' mlhs_post . + 79 mlhs_post: mlhs_post . ',' mlhs_item + + ',' shift, and go to state 615 + + $default reduce using rule 67 (mlhs_basic) + + +state 766 + + 184 arg: lhs '=' arg modifier_rescue arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 184 (arg) + + +state 767 + + 227 arg: arg '?' arg opt_nl ':' . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 846 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 768 + + 29 stmt: primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call . + + $default reduce using rule 29 (stmt) + + +state 769 + + 190 arg: primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 190 (arg) + + +state 770 + + 191 arg: primary_value tCOLON2 tCONSTANT tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 191 (arg) + + +state 771 + + 57 command: primary_value tCOLON2 operation2 command_args cmd_brace_block . + + $default reduce using rule 57 (command) + + +state 772 + + 545 rbracket: opt_nl ']' . + + $default reduce using rule 545 (rbracket) + + +state 773 + + 26 stmt: primary_value '[' opt_call_args rbracket tOP_ASGN . command_call + 187 arg: primary_value '[' opt_call_args rbracket tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + command_call go to state 847 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 848 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 774 + + 27 stmt: primary_value '.' tIDENTIFIER tOP_ASGN command_call . + + $default reduce using rule 27 (stmt) + + +state 775 + + 188 arg: primary_value '.' tIDENTIFIER tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 188 (arg) + + +state 776 + + 28 stmt: primary_value '.' tCONSTANT tOP_ASGN command_call . + + $default reduce using rule 28 (stmt) + + +state 777 + + 189 arg: primary_value '.' tCONSTANT tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 189 (arg) + + +state 778 + + 55 command: primary_value '.' operation2 command_args cmd_brace_block . + + $default reduce using rule 55 (command) + + +state 779 + + 250 args: arg_value . + 407 exc_list: arg_value . + + ',' reduce using rule 250 (args) + $default reduce using rule 407 (exc_list) + + +state 780 + + 408 exc_list: mrhs . + + $default reduce using rule 408 (exc_list) + + +state 781 + + 405 opt_rescue: keyword_rescue exc_list . exc_var then compstmt opt_rescue + + tASSOC shift, and go to state 849 + + $default reduce using rule 553 (none) + + exc_var go to state 850 + none go to state 851 + + +state 782 + + 409 exc_list: none . + + $default reduce using rule 409 (exc_list) + + +state 783 + + 336 opt_else: keyword_else . compstmt + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 852 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 784 + + 3 bodystmt: compstmt opt_rescue opt_else . opt_ensure + + keyword_ensure shift, and go to state 853 + + $default reduce using rule 553 (none) + + opt_ensure go to state 854 + none go to state 855 + + +state 785 + + 335 opt_else: none . + + $default reduce using rule 335 (opt_else) + + +state 786 + + 334 if_tail: keyword_elsif . expr_value then compstmt if_tail + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + expr go to state 329 + expr_value go to state 856 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + lhs go to state 202 + arg go to state 77 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 107 + + +state 787 + + 287 primary: k_if expr_value then compstmt if_tail . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 857 + + +state 788 + + 333 if_tail: opt_else . + + $default reduce using rule 333 (if_tail) + + +state 789 + + 288 primary: k_unless expr_value then compstmt opt_else . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 858 + + +state 790 + + 291 primary: k_while @11 expr_value do @12 . compstmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 859 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 791 + + 294 primary: k_until @13 expr_value do @14 . compstmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 860 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 792 + + 295 primary: k_case expr_value opt_terms case_body k_end . + + $default reduce using rule 295 (primary) + + +state 793 + + 252 args: args ',' . arg_value + 253 | args ',' . tSTAR arg_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 590 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 203 + arg_value go to state 861 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 794 + + 402 case_body: keyword_when args then . compstmt cases + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + keyword_when reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 862 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 795 + + 81 mlhs_node: primary_value '[' opt_call_args rbracket . + 89 lhs: primary_value '[' opt_call_args rbracket . + 397 method_call: primary_value '[' opt_call_args rbracket . + + keyword_in reduce using rule 89 (lhs) + ',' reduce using rule 81 (mlhs_node) + $default reduce using rule 397 (method_call) + + +state 796 + + 299 primary: k_for for_var keyword_in @15 expr_value . do @16 compstmt k_end + + keyword_do_cond shift, and go to state 682 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + do go to state 863 + term go to state 684 + + +state 797 + + 304 primary: k_class tLSHFT expr @18 term . @19 bodystmt k_end + + $default reduce using rule 303 (@19) + + @19 go to state 864 + + +state 798 + + 475 superclass: '<' @30 expr_value . term + + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + term go to state 865 + + +state 799 + + 301 primary: k_class cpath superclass @17 bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 866 + + +state 800 + + 397 method_call: primary_value '[' opt_call_args rbracket . + + $default reduce using rule 397 (method_call) + + +state 801 + + 306 primary: k_module cpath @20 bodystmt k_end . + + $default reduce using rule 306 (primary) + + +state 802 + + 521 singleton: '(' @31 expr rparen . + + $default reduce using rule 521 (singleton) + + +state 803 + + 477 f_arglist: '(' f_args . rparen + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 396 + rparen go to state 867 + + +state 804 + + 308 primary: k_def fname @21 f_arglist bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 868 + + +state 805 + + 478 f_arglist: f_args term . + + $default reduce using rule 478 (f_arglist) + + +state 806 + + 311 primary: k_def singleton dot_or_colon @22 fname . @23 f_arglist bodystmt k_end + + $default reduce using rule 310 (@23) + + @23 go to state 869 + + +state 807 + + 401 brace_block: keyword_do @27 opt_block_param compstmt . keyword_end + + keyword_end shift, and go to state 870 + + +state 808 + + 399 brace_block: '{' @26 opt_block_param compstmt . '}' + + '}' shift, and go to state 871 + + +state 809 + + 186 arg: var_lhs tOP_ASGN arg modifier_rescue arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 186 (arg) + + +state 810 + + 51 cmd_brace_block: tLBRACE_ARG @4 opt_block_param . compstmt '}' + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + '}' reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 872 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 811 + + 187 arg: primary_value '[' opt_call_args rbracket tOP_ASGN . arg + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + lhs go to state 202 + arg go to state 848 + primary go to state 78 + primary_value go to state 233 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + operation go to state 234 + + +state 812 + + 280 primary: keyword_defined opt_nl '(' @10 expr rparen . + + $default reduce using rule 280 (primary) + + +state 813 + + 340 f_marg: tLPAREN f_margs rparen . + + $default reduce using rule 340 (f_marg) + + +state 814 + + 342 f_marg_list: f_marg_list . ',' f_marg + 351 f_margs: tSTAR ',' f_marg_list . + + ',' shift, and go to state 873 + + $default reduce using rule 351 (f_margs) + + +state 815 + + 349 f_margs: tSTAR f_norm_arg ',' . f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + + f_marg go to state 626 + f_marg_list go to state 874 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 816 + + 344 f_margs: f_marg_list ',' tSTAR . f_norm_arg + 345 | f_marg_list ',' tSTAR . f_norm_arg ',' f_marg_list + 346 | f_marg_list ',' tSTAR . + 347 | f_marg_list ',' tSTAR . ',' f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + ',' shift, and go to state 875 + + $default reduce using rule 346 (f_margs) + + f_bad_arg go to state 451 + f_norm_arg go to state 876 + + +state 817 + + 342 f_marg_list: f_marg_list ',' f_marg . + + $default reduce using rule 342 (f_marg_list) + + +state 818 + + 376 bvar: tIDENTIFIER . + + $default reduce using rule 376 (bvar) + + +state 819 + + 373 opt_bv_decl: ';' bv_decls . + 375 bv_decls: bv_decls . ',' bvar + + ',' shift, and go to state 877 + + $default reduce using rule 373 (opt_bv_decl) + + +state 820 + + 374 bv_decls: bvar . + + $default reduce using rule 374 (bv_decls) + + +state 821 + + 377 bvar: f_bad_arg . + + $default reduce using rule 377 (bvar) + + +state 822 + + 380 f_larglist: '(' f_args opt_bv_decl rparen . + + $default reduce using rule 380 (f_larglist) + + +state 823 + + 383 lambda_body: keyword_do_LAMBDA compstmt keyword_end . + + $default reduce using rule 383 (lambda_body) + + +state 824 + + 382 lambda_body: tLAMBEG compstmt '}' . + + $default reduce using rule 382 (lambda_body) + + +state 825 + + 479 f_args: f_arg ',' f_optarg ',' . f_rest_arg opt_f_block_arg + 480 | f_arg ',' f_optarg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 482 | f_arg ',' f_optarg ',' . f_arg opt_f_block_arg + 509 f_optarg: f_optarg ',' . f_opt + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 878 + f_opt go to state 745 + restarg_mark go to state 457 + f_rest_arg go to state 879 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 826 + + 481 f_args: f_arg ',' f_optarg opt_f_block_arg . + + $default reduce using rule 481 (f_args) + + +state 827 + + 484 f_args: f_arg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 880 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 828 + + 483 f_args: f_arg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 483 (f_args) + + +state 829 + + 503 f_arg: f_arg ',' . f_arg_item + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 740 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 830 + + 489 f_args: f_optarg ',' f_arg opt_f_block_arg . + + $default reduce using rule 489 (f_args) + + +state 831 + + 487 f_args: f_optarg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 881 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 832 + + 486 f_args: f_optarg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 486 (f_args) + + +state 833 + + 491 f_args: f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 491 (f_args) + + +state 834 + + 442 string_content: tSTRING_DBEG @29 compstmt '}' . + + $default reduce using rule 442 (string_content) + + +state 835 + + 505 f_block_opt: tIDENTIFIER '=' . primary_value + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 882 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + primary go to state 255 + primary_value go to state 883 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 351 + var_ref go to state 104 + backref go to state 352 + operation go to state 234 + + +state 836 + + 371 block_param_def: '|' block_param opt_bv_decl . '|' + + '|' shift, and go to state 884 + + +state 837 + + 369 block_param_def: '|' opt_bv_decl '|' . + + $default reduce using rule 369 (block_param_def) + + +state 838 + + 352 block_param: f_arg ',' . f_block_optarg ',' f_rest_arg opt_f_block_arg + 353 | f_arg ',' . f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + 354 | f_arg ',' . f_block_optarg opt_f_block_arg + 355 | f_arg ',' . f_block_optarg ',' f_arg opt_f_block_arg + 356 | f_arg ',' . f_rest_arg opt_f_block_arg + 357 | f_arg ',' . + 358 | f_arg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 503 f_arg: f_arg ',' . f_arg_item + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 754 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + $default reduce using rule 357 (block_param) + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 740 + f_block_opt go to state 758 + f_block_optarg go to state 885 + restarg_mark go to state 457 + f_rest_arg go to state 886 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 839 + + 359 block_param: f_arg opt_f_block_arg . + + $default reduce using rule 359 (block_param) + + +state 840 + + 360 block_param: f_block_optarg ',' . f_rest_arg opt_f_block_arg + 361 | f_block_optarg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 363 | f_block_optarg ',' . f_arg opt_f_block_arg + 507 f_block_optarg: f_block_optarg ',' . f_block_opt + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 754 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 887 + f_block_opt go to state 888 + restarg_mark go to state 457 + f_rest_arg go to state 889 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 841 + + 362 block_param: f_block_optarg opt_f_block_arg . + + $default reduce using rule 362 (block_param) + + +state 842 + + 365 block_param: f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 890 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 843 + + 364 block_param: f_rest_arg opt_f_block_arg . + + $default reduce using rule 364 (block_param) + + +state 844 + + 385 do_block: keyword_do_block @25 opt_block_param compstmt keyword_end . + + $default reduce using rule 385 (do_block) + + +state 845 + + 253 args: args ',' tSTAR arg_value . + 255 mrhs: args ',' tSTAR arg_value . + + ',' reduce using rule 253 (args) + $default reduce using rule 255 (mrhs) + + +state 846 + + 194 arg: arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + 227 | arg '?' arg opt_nl ':' arg . + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 227 (arg) + + +state 847 + + 26 stmt: primary_value '[' opt_call_args rbracket tOP_ASGN command_call . + + $default reduce using rule 26 (stmt) + + +state 848 + + 187 arg: primary_value '[' opt_call_args rbracket tOP_ASGN arg . + 194 | arg . tDOT2 arg + 195 | arg . tDOT3 arg + 196 | arg . '+' arg + 197 | arg . '-' arg + 198 | arg . '*' arg + 199 | arg . '/' arg + 200 | arg . '%' arg + 201 | arg . tPOW arg + 206 | arg . '|' arg + 207 | arg . '^' arg + 208 | arg . '&' arg + 209 | arg . tCMP arg + 210 | arg . '>' arg + 211 | arg . tGEQ arg + 212 | arg . '<' arg + 213 | arg . tLEQ arg + 214 | arg . tEQ arg + 215 | arg . tEQQ arg + 216 | arg . tNEQ arg + 217 | arg . tMATCH arg + 218 | arg . tNMATCH arg + 221 | arg . tLSHFT arg + 222 | arg . tRSHFT arg + 223 | arg . tANDOP arg + 224 | arg . tOROP arg + 227 | arg . '?' arg opt_nl ':' arg + + tPOW shift, and go to state 299 + tCMP shift, and go to state 300 + tEQ shift, and go to state 301 + tEQQ shift, and go to state 302 + tNEQ shift, and go to state 303 + tGEQ shift, and go to state 304 + tLEQ shift, and go to state 305 + tANDOP shift, and go to state 306 + tOROP shift, and go to state 307 + tMATCH shift, and go to state 308 + tNMATCH shift, and go to state 309 + tDOT2 shift, and go to state 310 + tDOT3 shift, and go to state 311 + tLSHFT shift, and go to state 312 + tRSHFT shift, and go to state 313 + '?' shift, and go to state 314 + '>' shift, and go to state 315 + '<' shift, and go to state 316 + '|' shift, and go to state 317 + '^' shift, and go to state 318 + '&' shift, and go to state 319 + '+' shift, and go to state 320 + '-' shift, and go to state 321 + '*' shift, and go to state 322 + '/' shift, and go to state 323 + '%' shift, and go to state 324 + + $default reduce using rule 187 (arg) + + +state 849 + + 410 exc_var: tASSOC . lhs + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 230 + keyword_super shift, and go to state 231 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 250 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tCOLON3 shift, and go to state 891 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 252 + + lhs go to state 892 + primary go to state 255 + primary_value go to state 893 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 894 + var_ref go to state 104 + backref go to state 895 + operation go to state 234 + + +state 850 + + 405 opt_rescue: keyword_rescue exc_list exc_var . then compstmt opt_rescue + + keyword_then shift, and go to state 544 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + then go to state 896 + term go to state 546 + + +state 851 + + 411 exc_var: none . + + $default reduce using rule 411 (exc_var) + + +state 852 + + 336 opt_else: keyword_else compstmt . + + $default reduce using rule 336 (opt_else) + + +state 853 + + 412 opt_ensure: keyword_ensure . compstmt + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 897 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 854 + + 3 bodystmt: compstmt opt_rescue opt_else opt_ensure . + + $default reduce using rule 3 (bodystmt) + + +state 855 + + 413 opt_ensure: none . + + $default reduce using rule 413 (opt_ensure) + + +state 856 + + 334 if_tail: keyword_elsif expr_value . then compstmt if_tail + + keyword_then shift, and go to state 544 + ';' shift, and go to state 279 + '\n' shift, and go to state 280 + + then go to state 898 + term go to state 546 + + +state 857 + + 287 primary: k_if expr_value then compstmt if_tail k_end . + + $default reduce using rule 287 (primary) + + +state 858 + + 288 primary: k_unless expr_value then compstmt opt_else k_end . + + $default reduce using rule 288 (primary) + + +state 859 + + 291 primary: k_while @11 expr_value do @12 compstmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 899 + + +state 860 + + 294 primary: k_until @13 expr_value do @14 compstmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 900 + + +state 861 + + 252 args: args ',' arg_value . + + $default reduce using rule 252 (args) + + +state 862 + + 402 case_body: keyword_when args then compstmt . cases + + keyword_else shift, and go to state 783 + keyword_when shift, and go to state 551 + + $default reduce using rule 553 (none) + + opt_else go to state 901 + case_body go to state 902 + cases go to state 903 + none go to state 785 + + +state 863 + + 299 primary: k_for for_var keyword_in @15 expr_value do . @16 compstmt k_end + + $default reduce using rule 298 (@16) + + @16 go to state 904 + + +state 864 + + 304 primary: k_class tLSHFT expr @18 term @19 . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 905 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 865 + + 475 superclass: '<' @30 expr_value term . + + $default reduce using rule 475 (superclass) + + +state 866 + + 301 primary: k_class cpath superclass @17 bodystmt k_end . + + $default reduce using rule 301 (primary) + + +state 867 + + 477 f_arglist: '(' f_args rparen . + + $default reduce using rule 477 (f_arglist) + + +state 868 + + 308 primary: k_def fname @21 f_arglist bodystmt k_end . + + $default reduce using rule 308 (primary) + + +state 869 + + 311 primary: k_def singleton dot_or_colon @22 fname @23 . f_arglist bodystmt k_end + + tIDENTIFIER shift, and go to state 438 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + '(' shift, and go to state 705 + + $default reduce using rule 493 (f_args) + + f_arglist go to state 906 + f_args go to state 707 + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 454 + f_opt go to state 455 + f_optarg go to state 456 + restarg_mark go to state 457 + f_rest_arg go to state 458 + blkarg_mark go to state 459 + f_block_arg go to state 460 + + +state 870 + + 401 brace_block: keyword_do @27 opt_block_param compstmt keyword_end . + + $default reduce using rule 401 (brace_block) + + +state 871 + + 399 brace_block: '{' @26 opt_block_param compstmt '}' . + + $default reduce using rule 399 (brace_block) + + +state 872 + + 51 cmd_brace_block: tLBRACE_ARG @4 opt_block_param compstmt . '}' + + '}' shift, and go to state 907 + + +state 873 + + 342 f_marg_list: f_marg_list ',' . f_marg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + + f_marg go to state 817 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 874 + + 342 f_marg_list: f_marg_list . ',' f_marg + 349 f_margs: tSTAR f_norm_arg ',' f_marg_list . + + ',' shift, and go to state 873 + + $default reduce using rule 349 (f_margs) + + +state 875 + + 347 f_margs: f_marg_list ',' tSTAR ',' . f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + + f_marg go to state 626 + f_marg_list go to state 908 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 876 + + 344 f_margs: f_marg_list ',' tSTAR f_norm_arg . + 345 | f_marg_list ',' tSTAR f_norm_arg . ',' f_marg_list + + ',' shift, and go to state 909 + + $default reduce using rule 344 (f_margs) + + +state 877 + + 375 bv_decls: bv_decls ',' . bvar + + tIDENTIFIER shift, and go to state 818 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + + bvar go to state 910 + f_bad_arg go to state 821 + + +state 878 + + 482 f_args: f_arg ',' f_optarg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 911 + none go to state 636 + + +state 879 + + 479 f_args: f_arg ',' f_optarg ',' f_rest_arg . opt_f_block_arg + 480 | f_arg ',' f_optarg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 912 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 913 + none go to state 636 + + +state 880 + + 484 f_args: f_arg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 914 + none go to state 636 + + +state 881 + + 487 f_args: f_optarg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 915 + none go to state 636 + + +state 882 + + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 916 + + +state 883 + + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + 505 f_block_opt: tIDENTIFIER '=' primary_value . + + tCOLON2 shift, and go to state 917 + '[' shift, and go to state 567 + '.' shift, and go to state 568 + + $default reduce using rule 505 (f_block_opt) + + +state 884 + + 371 block_param_def: '|' block_param opt_bv_decl '|' . + + $default reduce using rule 371 (block_param_def) + + +state 885 + + 352 block_param: f_arg ',' f_block_optarg . ',' f_rest_arg opt_f_block_arg + 353 | f_arg ',' f_block_optarg . ',' f_rest_arg ',' f_arg opt_f_block_arg + 354 | f_arg ',' f_block_optarg . opt_f_block_arg + 355 | f_arg ',' f_block_optarg . ',' f_arg opt_f_block_arg + 507 f_block_optarg: f_block_optarg . ',' f_block_opt + + ',' shift, and go to state 918 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 919 + none go to state 636 + + +state 886 + + 356 block_param: f_arg ',' f_rest_arg . opt_f_block_arg + 358 | f_arg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 920 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 921 + none go to state 636 + + +state 887 + + 363 block_param: f_block_optarg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 922 + none go to state 636 + + +state 888 + + 507 f_block_optarg: f_block_optarg ',' f_block_opt . + + $default reduce using rule 507 (f_block_optarg) + + +state 889 + + 360 block_param: f_block_optarg ',' f_rest_arg . opt_f_block_arg + 361 | f_block_optarg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 923 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 924 + none go to state 636 + + +state 890 + + 365 block_param: f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 925 + none go to state 636 + + +state 891 + + 94 lhs: tCOLON3 . tCONSTANT + 272 primary: tCOLON3 . tCONSTANT + + tCONSTANT shift, and go to state 926 + + +state 892 + + 410 exc_var: tASSOC lhs . + + $default reduce using rule 410 (exc_var) + + +state 893 + + 89 lhs: primary_value . '[' opt_call_args rbracket + 90 | primary_value . '.' tIDENTIFIER + 91 | primary_value . tCOLON2 tIDENTIFIER + 92 | primary_value . '.' tCONSTANT + 93 | primary_value . tCOLON2 tCONSTANT + 271 primary: primary_value . tCOLON2 tCONSTANT + 390 method_call: primary_value . '.' operation2 opt_paren_args + 391 | primary_value . tCOLON2 operation2 paren_args + 392 | primary_value . tCOLON2 operation3 + 393 | primary_value . '.' paren_args + 394 | primary_value . tCOLON2 paren_args + 397 | primary_value . '[' opt_call_args rbracket + + tCOLON2 shift, and go to state 927 + '[' shift, and go to state 928 + '.' shift, and go to state 929 + + +state 894 + + 88 lhs: variable . + 469 var_ref: variable . + + tCOLON2 reduce using rule 469 (var_ref) + '[' reduce using rule 469 (var_ref) + '.' reduce using rule 469 (var_ref) + $default reduce using rule 88 (lhs) + + +state 895 + + 95 lhs: backref . + 264 primary: backref . + + tCOLON2 reduce using rule 264 (primary) + '[' reduce using rule 264 (primary) + '.' reduce using rule 264 (primary) + $default reduce using rule 95 (lhs) + + +state 896 + + 405 opt_rescue: keyword_rescue exc_list exc_var then . compstmt opt_rescue + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 930 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 897 + + 412 opt_ensure: keyword_ensure compstmt . + + $default reduce using rule 412 (opt_ensure) + + +state 898 + + 334 if_tail: keyword_elsif expr_value then . compstmt if_tail + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + keyword_elsif reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 931 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 899 + + 291 primary: k_while @11 expr_value do @12 compstmt k_end . + + $default reduce using rule 291 (primary) + + +state 900 + + 294 primary: k_until @13 expr_value do @14 compstmt k_end . + + $default reduce using rule 294 (primary) + + +state 901 + + 403 cases: opt_else . + + $default reduce using rule 403 (cases) + + +state 902 + + 404 cases: case_body . + + $default reduce using rule 404 (cases) + + +state 903 + + 402 case_body: keyword_when args then compstmt cases . + + $default reduce using rule 402 (case_body) + + +state 904 + + 299 primary: k_for for_var keyword_in @15 expr_value do @16 . compstmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_end reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + compstmt go to state 932 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 905 + + 304 primary: k_class tLSHFT expr @18 term @19 bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 933 + + +state 906 + + 311 primary: k_def singleton dot_or_colon @22 fname @23 f_arglist . bodystmt k_end + + error shift, and go to state 4 + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_undef shift, and go to state 8 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 16 + keyword_next shift, and go to state 17 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 20 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 27 + keyword_alias shift, and go to state 28 + keyword_defined shift, and go to state 29 + keyword_BEGIN shift, and go to state 30 + keyword_END shift, and go to state 31 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 48 + tLPAREN shift, and go to state 49 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 53 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 62 + '~' shift, and go to state 63 + + keyword_rescue reduce using rule 553 (none) + keyword_ensure reduce using rule 553 (none) + keyword_end reduce using rule 553 (none) + keyword_else reduce using rule 553 (none) + ';' reduce using rule 553 (none) + '\n' reduce using rule 553 (none) + + bodystmt go to state 934 + compstmt go to state 543 + stmts go to state 65 + stmt go to state 66 + expr go to state 67 + command_call go to state 68 + block_command go to state 69 + command go to state 70 + mlhs go to state 71 + mlhs_basic go to state 72 + mlhs_item go to state 73 + mlhs_head go to state 74 + mlhs_node go to state 75 + lhs go to state 76 + arg go to state 77 + primary go to state 78 + primary_value go to state 79 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + block_call go to state 90 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 103 + var_ref go to state 104 + var_lhs go to state 105 + backref go to state 106 + operation go to state 107 + none go to state 108 + + +state 907 + + 51 cmd_brace_block: tLBRACE_ARG @4 opt_block_param compstmt '}' . + + $default reduce using rule 51 (cmd_brace_block) + + +state 908 + + 342 f_marg_list: f_marg_list . ',' f_marg + 347 f_margs: f_marg_list ',' tSTAR ',' f_marg_list . + + ',' shift, and go to state 873 + + $default reduce using rule 347 (f_margs) + + +state 909 + + 345 f_margs: f_marg_list ',' tSTAR f_norm_arg ',' . f_marg_list + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 624 + + f_marg go to state 626 + f_marg_list go to state 935 + f_bad_arg go to state 451 + f_norm_arg go to state 629 + + +state 910 + + 375 bv_decls: bv_decls ',' bvar . + + $default reduce using rule 375 (bv_decls) + + +state 911 + + 482 f_args: f_arg ',' f_optarg ',' f_arg opt_f_block_arg . + + $default reduce using rule 482 (f_args) + + +state 912 + + 480 f_args: f_arg ',' f_optarg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 936 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 913 + + 479 f_args: f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 479 (f_args) + + +state 914 + + 484 f_args: f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 484 (f_args) + + +state 915 + + 487 f_args: f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 487 (f_args) + + +state 916 + + 272 primary: tCOLON3 tCONSTANT . + + $default reduce using rule 272 (primary) + + +state 917 + + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 937 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 938 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 918 + + 352 block_param: f_arg ',' f_block_optarg ',' . f_rest_arg opt_f_block_arg + 353 | f_arg ',' f_block_optarg ',' . f_rest_arg ',' f_arg opt_f_block_arg + 355 | f_arg ',' f_block_optarg ',' . f_arg opt_f_block_arg + 507 f_block_optarg: f_block_optarg ',' . f_block_opt + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 754 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tSTAR shift, and go to state 444 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + '*' shift, and go to state 447 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 939 + f_block_opt go to state 888 + restarg_mark go to state 457 + f_rest_arg go to state 940 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 919 + + 354 block_param: f_arg ',' f_block_optarg opt_f_block_arg . + + $default reduce using rule 354 (block_param) + + +state 920 + + 358 block_param: f_arg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 941 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 921 + + 356 block_param: f_arg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 356 (block_param) + + +state 922 + + 363 block_param: f_block_optarg ',' f_arg opt_f_block_arg . + + $default reduce using rule 363 (block_param) + + +state 923 + + 361 block_param: f_block_optarg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 942 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 924 + + 360 block_param: f_block_optarg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 360 (block_param) + + +state 925 + + 365 block_param: f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 365 (block_param) + + +state 926 + + 94 lhs: tCOLON3 tCONSTANT . + 272 primary: tCOLON3 tCONSTANT . + + tCOLON2 reduce using rule 272 (primary) + '[' reduce using rule 272 (primary) + '.' reduce using rule 272 (primary) + $default reduce using rule 94 (lhs) + + +state 927 + + 91 lhs: primary_value tCOLON2 . tIDENTIFIER + 93 | primary_value tCOLON2 . tCONSTANT + 271 primary: primary_value tCOLON2 . tCONSTANT + 391 method_call: primary_value tCOLON2 . operation2 paren_args + 392 | primary_value tCOLON2 . operation3 + 394 | primary_value tCOLON2 . paren_args + + tIDENTIFIER shift, and go to state 943 + tFID shift, and go to state 529 + tCONSTANT shift, and go to state 944 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 531 + paren_args go to state 532 + operation2 go to state 609 + operation3 go to state 534 + + +state 928 + + 89 lhs: primary_value '[' . opt_call_args rbracket + 397 method_call: primary_value '[' . opt_call_args rbracket + + keyword_class shift, and go to state 5 + keyword_module shift, and go to state 6 + keyword_def shift, and go to state 7 + keyword_begin shift, and go to state 9 + keyword_if shift, and go to state 10 + keyword_unless shift, and go to state 11 + keyword_case shift, and go to state 12 + keyword_while shift, and go to state 13 + keyword_until shift, and go to state 14 + keyword_for shift, and go to state 15 + keyword_break shift, and go to state 191 + keyword_next shift, and go to state 192 + keyword_redo shift, and go to state 18 + keyword_retry shift, and go to state 19 + keyword_return shift, and go to state 193 + keyword_yield shift, and go to state 21 + keyword_super shift, and go to state 22 + keyword_self shift, and go to state 23 + keyword_nil shift, and go to state 24 + keyword_true shift, and go to state 25 + keyword_false shift, and go to state 26 + keyword_not shift, and go to state 194 + keyword_defined shift, and go to state 29 + keyword__LINE__ shift, and go to state 32 + keyword__FILE__ shift, and go to state 33 + keyword__ENCODING__ shift, and go to state 34 + tIDENTIFIER shift, and go to state 35 + tFID shift, and go to state 36 + tGVAR shift, and go to state 37 + tIVAR shift, and go to state 38 + tCONSTANT shift, and go to state 39 + tCVAR shift, and go to state 40 + tLABEL shift, and go to state 195 + tINTEGER shift, and go to state 41 + tFLOAT shift, and go to state 42 + tCHAR shift, and go to state 43 + tNTH_REF shift, and go to state 44 + tBACK_REF shift, and go to state 45 + tUPLUS shift, and go to state 46 + tUMINUS shift, and go to state 47 + tCOLON3 shift, and go to state 196 + tLPAREN shift, and go to state 197 + tLPAREN_ARG shift, and go to state 50 + tLBRACK shift, and go to state 51 + tLBRACE shift, and go to state 52 + tSTAR shift, and go to state 198 + tAMPER shift, and go to state 199 + tLAMBDA shift, and go to state 54 + tSYMBEG shift, and go to state 55 + tSTRING_BEG shift, and go to state 56 + tXSTRING_BEG shift, and go to state 57 + tREGEXP_BEG shift, and go to state 58 + tWORDS_BEG shift, and go to state 59 + tQWORDS_BEG shift, and go to state 60 + tUMINUS_NUM shift, and go to state 61 + '!' shift, and go to state 200 + '~' shift, and go to state 63 + + $default reduce using rule 553 (none) + + command go to state 201 + lhs go to state 202 + arg go to state 203 + arg_value go to state 204 + opt_call_args go to state 945 + call_args go to state 400 + block_arg go to state 206 + args go to state 207 + primary go to state 78 + primary_value go to state 208 + k_begin go to state 80 + k_if go to state 81 + k_unless go to state 82 + k_while go to state 83 + k_until go to state 84 + k_case go to state 85 + k_for go to state 86 + k_class go to state 87 + k_module go to state 88 + k_def go to state 89 + method_call go to state 91 + literal go to state 92 + strings go to state 93 + string go to state 94 + string1 go to state 95 + xstring go to state 96 + regexp go to state 97 + words go to state 98 + qwords go to state 99 + symbol go to state 100 + dsym go to state 101 + numeric go to state 102 + variable go to state 209 + var_ref go to state 104 + var_lhs go to state 210 + backref go to state 211 + assocs go to state 212 + assoc go to state 213 + operation go to state 107 + none go to state 401 + + +state 929 + + 90 lhs: primary_value '.' . tIDENTIFIER + 92 | primary_value '.' . tCONSTANT + 390 method_call: primary_value '.' . operation2 opt_paren_args + 393 | primary_value '.' . paren_args + + tIDENTIFIER shift, and go to state 946 + tFID shift, and go to state 537 + tCONSTANT shift, and go to state 947 + tUPLUS shift, and go to state 154 + tUMINUS shift, and go to state 155 + tPOW shift, and go to state 156 + tCMP shift, and go to state 157 + tEQ shift, and go to state 158 + tEQQ shift, and go to state 159 + tNEQ shift, and go to state 160 + tGEQ shift, and go to state 161 + tLEQ shift, and go to state 162 + tMATCH shift, and go to state 163 + tNMATCH shift, and go to state 164 + tAREF shift, and go to state 165 + tASET shift, and go to state 166 + tLSHFT shift, and go to state 167 + tRSHFT shift, and go to state 168 + tSTAR shift, and go to state 169 + '>' shift, and go to state 170 + '<' shift, and go to state 171 + '|' shift, and go to state 172 + '^' shift, and go to state 173 + '&' shift, and go to state 174 + '+' shift, and go to state 175 + '-' shift, and go to state 176 + '*' shift, and go to state 177 + '/' shift, and go to state 178 + '%' shift, and go to state 179 + '!' shift, and go to state 180 + '~' shift, and go to state 181 + '`' shift, and go to state 182 + '(' shift, and go to state 219 + + op go to state 539 + paren_args go to state 540 + operation2 go to state 610 + + +state 930 + + 405 opt_rescue: keyword_rescue exc_list exc_var then compstmt . opt_rescue + + keyword_rescue shift, and go to state 676 + + $default reduce using rule 553 (none) + + opt_rescue go to state 948 + none go to state 678 + + +state 931 + + 334 if_tail: keyword_elsif expr_value then compstmt . if_tail + + keyword_elsif shift, and go to state 786 + keyword_else shift, and go to state 783 + + $default reduce using rule 553 (none) + + if_tail go to state 949 + opt_else go to state 788 + none go to state 785 + + +state 932 + + 299 primary: k_for for_var keyword_in @15 expr_value do @16 compstmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 950 + + +state 933 + + 304 primary: k_class tLSHFT expr @18 term @19 bodystmt k_end . + + $default reduce using rule 304 (primary) + + +state 934 + + 311 primary: k_def singleton dot_or_colon @22 fname @23 f_arglist bodystmt . k_end + + keyword_end shift, and go to state 674 + + k_end go to state 951 + + +state 935 + + 342 f_marg_list: f_marg_list . ',' f_marg + 345 f_margs: f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list . + + ',' shift, and go to state 873 + + $default reduce using rule 345 (f_margs) + + +state 936 + + 480 f_args: f_arg ',' f_optarg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 952 + none go to state 636 + + +state 937 + + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + '(' reduce using rule 531 (operation2) + $default reduce using rule 535 (operation3) + + +state 938 + + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + '(' reduce using rule 532 (operation2) + $default reduce using rule 271 (primary) + + +state 939 + + 355 block_param: f_arg ',' f_block_optarg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 953 + none go to state 636 + + +state 940 + + 352 block_param: f_arg ',' f_block_optarg ',' f_rest_arg . opt_f_block_arg + 353 | f_arg ',' f_block_optarg ',' f_rest_arg . ',' f_arg opt_f_block_arg + + ',' shift, and go to state 954 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 955 + none go to state 636 + + +state 941 + + 358 block_param: f_arg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 956 + none go to state 636 + + +state 942 + + 361 block_param: f_block_optarg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 957 + none go to state 636 + + +state 943 + + 91 lhs: primary_value tCOLON2 tIDENTIFIER . + 531 operation2: tIDENTIFIER . + 535 operation3: tIDENTIFIER . + + keyword_then reduce using rule 91 (lhs) + '(' reduce using rule 531 (operation2) + ';' reduce using rule 91 (lhs) + '\n' reduce using rule 91 (lhs) + $default reduce using rule 535 (operation3) + + +state 944 + + 93 lhs: primary_value tCOLON2 tCONSTANT . + 271 primary: primary_value tCOLON2 tCONSTANT . + 532 operation2: tCONSTANT . + + tCOLON2 reduce using rule 271 (primary) + '[' reduce using rule 271 (primary) + '.' reduce using rule 271 (primary) + '(' reduce using rule 532 (operation2) + $default reduce using rule 93 (lhs) + + +state 945 + + 89 lhs: primary_value '[' opt_call_args . rbracket + 397 method_call: primary_value '[' opt_call_args . rbracket + + '\n' shift, and go to state 223 + + $default reduce using rule 542 (opt_nl) + + opt_nl go to state 666 + rbracket go to state 958 + + +state 946 + + 90 lhs: primary_value '.' tIDENTIFIER . + 531 operation2: tIDENTIFIER . + + keyword_then reduce using rule 90 (lhs) + ';' reduce using rule 90 (lhs) + '\n' reduce using rule 90 (lhs) + $default reduce using rule 531 (operation2) + + +state 947 + + 92 lhs: primary_value '.' tCONSTANT . + 532 operation2: tCONSTANT . + + keyword_then reduce using rule 92 (lhs) + ';' reduce using rule 92 (lhs) + '\n' reduce using rule 92 (lhs) + $default reduce using rule 532 (operation2) + + +state 948 + + 405 opt_rescue: keyword_rescue exc_list exc_var then compstmt opt_rescue . + + $default reduce using rule 405 (opt_rescue) + + +state 949 + + 334 if_tail: keyword_elsif expr_value then compstmt if_tail . + + $default reduce using rule 334 (if_tail) + + +state 950 + + 299 primary: k_for for_var keyword_in @15 expr_value do @16 compstmt k_end . + + $default reduce using rule 299 (primary) + + +state 951 + + 311 primary: k_def singleton dot_or_colon @22 fname @23 f_arglist bodystmt k_end . + + $default reduce using rule 311 (primary) + + +state 952 + + 480 f_args: f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 480 (f_args) + + +state 953 + + 355 block_param: f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg . + + $default reduce using rule 355 (block_param) + + +state 954 + + 353 block_param: f_arg ',' f_block_optarg ',' f_rest_arg ',' . f_arg opt_f_block_arg + 517 opt_f_block_arg: ',' . f_block_arg + + tIDENTIFIER shift, and go to state 623 + tGVAR shift, and go to state 439 + tIVAR shift, and go to state 440 + tCONSTANT shift, and go to state 441 + tCVAR shift, and go to state 442 + tLPAREN shift, and go to state 443 + tAMPER shift, and go to state 445 + '&' shift, and go to state 446 + + f_bad_arg go to state 451 + f_norm_arg go to state 452 + f_arg_item go to state 453 + f_arg go to state 959 + blkarg_mark go to state 459 + f_block_arg go to state 743 + + +state 955 + + 352 block_param: f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg . + + $default reduce using rule 352 (block_param) + + +state 956 + + 358 block_param: f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 358 (block_param) + + +state 957 + + 361 block_param: f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 361 (block_param) + + +state 958 + + 89 lhs: primary_value '[' opt_call_args rbracket . + 397 method_call: primary_value '[' opt_call_args rbracket . + + keyword_then reduce using rule 89 (lhs) + ';' reduce using rule 89 (lhs) + '\n' reduce using rule 89 (lhs) + $default reduce using rule 397 (method_call) + + +state 959 + + 353 block_param: f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg . opt_f_block_arg + 503 f_arg: f_arg . ',' f_arg_item + + ',' shift, and go to state 829 + + $default reduce using rule 553 (none) + + opt_f_block_arg go to state 960 + none go to state 636 + + +state 960 + + 353 block_param: f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg . + + $default reduce using rule 353 (block_param) diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/.cvsignore b/lib/ruby-1.9.1-rc1/ext/sdbm/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/_sdbm.c b/lib/ruby-1.9.1-rc1/ext/sdbm/_sdbm.c new file mode 100644 index 0000000..11b2f22 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/_sdbm.c @@ -0,0 +1,922 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + * + * core routines + */ + +#ifndef lint +/*char sdbm_rcsid[] = "$Id: _sdbm.c 19679 2008-10-04 13:33:22Z yugui $";*/ +#endif + +#include "sdbm.h" +#include "ruby/config.h" + +/* + * sdbm - ndbm work-alike hashed database library + * tuning and portability constructs [not nearly enough] + * author: oz@nexus.yorku.ca + */ + +#define BYTESIZ 8 + +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef BSD42 +#define SEEK_SET L_SET +#define memset(s,c,n) bzero(s, n) /* only when c is zero */ +#define memcpy(s1,s2,n) bcopy(s2, s1, n) +#define memcmp(s1,s2,n) bcmp(s1,s2,n) +#endif + +/* + * important tuning parms (hah) + */ + +#define SEEDUPS /* always detect duplicates */ +#define BADMESS /* generate a message for worst case: + cannot make room after SPLTMAX splits */ +/* + * misc + */ +#ifdef DEBUG +#define debug(x) printf x +#else +#define debug(x) +#endif + +#ifdef BIG_E +#define GET_SHORT(p, i) (((unsigned)((unsigned char *)(p))[(i)*2] << 8) + (((unsigned char *)(p))[(i)*2 + 1])) +#define PUT_SHORT(p, i, s) (((unsigned char *)(p))[(i)*2] = (unsigned char)((s) >> 8), ((unsigned char *)(p))[(i)*2 + 1] = (unsigned char)(s)) +#else +#define GET_SHORT(p, i) ((p)[i]) +#define PUT_SHORT(p, i, s) ((p)[i] = (s)) +#endif + +/*#include "pair.h"*/ +static int fitpair proto((char *, int)); +static void putpair proto((char *, datum, datum)); +static datum getpair proto((char *, datum)); +static int delpair proto((char *, datum)); +static int chkpage proto((char *)); +static datum getnkey proto((char *, int)); +static void splpage proto((char *, char *, long)); +#ifdef SEEDUPS +static int duppair proto((char *, datum)); +#endif + +#include +#include +#ifdef DOSISH +#include +#endif +#include +#include +#ifdef BSD42 +#include +#else +#include +/*#include */ +#endif +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#include +#ifndef EPERM +#define EPERM EACCES +#endif +#include + +#ifdef __STDC__ +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +/* + * externals + */ +#if !defined sun && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno) +extern int errno; +#endif + +/* + * forward + */ +static int getdbit proto((DBM *, long)); +static int setdbit proto((DBM *, long)); +static int getpage proto((DBM *, long)); +static datum getnext proto((DBM *)); +static int makroom proto((DBM *, long, int)); + +/* + * useful macros + */ +#define bad(x) ((x).dptr == NULL || (x).dsize < 0) +#define exhash(item) sdbm_hash((item).dptr, (item).dsize) +#define ioerr(db) ((db)->flags |= DBM_IOERR) + +#define OFF_PAG(off) (long) (off) * PBLKSIZ +#define OFF_DIR(off) (long) (off) * DBLKSIZ + +static long masks[] = { + 000000000000L, 000000000001L, 000000000003L, + 000000000007L, 000000000017L, 000000000037L, + 000000000077L, 000000000177L, 000000000377L, + 000000000777L, 000000001777L, 000000003777L, + 000000007777L, 000000017777L, 000000037777L, + 000000077777L, 000000177777L, 000000377777L, + 000000777777L, 000001777777L, 000003777777L, + 000007777777L, 000017777777L, 000037777777L, + 000077777777L, 000177777777L, 000377777777L, + 000777777777L, 001777777777L, 003777777777L, + 007777777777L, 017777777777L +}; + +datum nullitem = {NULL, 0}; + +DBM * +sdbm_open(register char *file, register int flags, register int mode) +{ + register DBM *db; + register char *dirname; + register char *pagname; + register int n; + + if (file == NULL || !*file) + return errno = EINVAL, (DBM *) NULL; +/* + * need space for two seperate filenames + */ + n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2; + + if ((dirname = malloc((unsigned) n)) == NULL) + return errno = ENOMEM, (DBM *) NULL; +/* + * build the file names + */ + dirname = strcat(strcpy(dirname, file), DIRFEXT); + pagname = strcpy(dirname + strlen(dirname) + 1, file); + pagname = strcat(pagname, PAGFEXT); + + db = sdbm_prep(dirname, pagname, flags, mode); + free((char *) dirname); + return db; +} + +DBM * +sdbm_prep(char *dirname, char *pagname, int flags, int mode) +{ + register DBM *db; + struct stat dstat; + + if ((db = (DBM *) malloc(sizeof(DBM))) == NULL) + return errno = ENOMEM, (DBM *) NULL; + + db->flags = 0; + db->hmask = 0; + db->blkptr = 0; + db->keyptr = 0; +/* + * adjust user flags so that WRONLY becomes RDWR, + * as required by this package. Also set our internal + * flag for RDONLY. + */ + if (flags & O_WRONLY) + flags = (flags & ~O_WRONLY) | O_RDWR; + if (flags & O_RDONLY) + db->flags = DBM_RDONLY; +/* + * open the files in sequence, and stat the dirfile. + * If we fail anywhere, undo everything, return NULL. + */ + flags |= O_BINARY; + if ((db->pagf = open(pagname, flags, mode)) > -1) { + if ((db->dirf = open(dirname, flags, mode)) > -1) { +/* + * need the dirfile size to establish max bit number. + */ + if (fstat(db->dirf, &dstat) == 0) { +/* + * zero size: either a fresh database, or one with a single, + * unsplit data page: dirpage is all zeros. + */ + db->dirbno = (!dstat.st_size) ? 0 : -1; + db->pagbno = -1; + db->maxbno = dstat.st_size * (long) BYTESIZ; + + (void) memset(db->pagbuf, 0, PBLKSIZ); + (void) memset(db->dirbuf, 0, DBLKSIZ); + /* + * success + */ + return db; + } + (void) close(db->dirf); + } + (void) close(db->pagf); + } + free((char *) db); + return (DBM *) NULL; +} + +void +sdbm_close(register DBM *db) +{ + if (db == NULL) + errno = EINVAL; + else { + (void) close(db->dirf); + (void) close(db->pagf); + free((char *) db); + } +} + +datum +sdbm_fetch(register DBM *db, datum key) +{ + if (db == NULL || bad(key)) + return errno = EINVAL, nullitem; + + if (getpage(db, exhash(key))) + return getpair(db->pagbuf, key); + + return ioerr(db), nullitem; +} + +int +sdbm_delete(register DBM *db, datum key) +{ + if (db == NULL || bad(key)) + return errno = EINVAL, -1; + if (sdbm_rdonly(db)) + return errno = EPERM, -1; + + if (getpage(db, exhash(key))) { + if (!delpair(db->pagbuf, key)) + return -1; +/* + * update the page file + */ + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), -1; + + return 0; + } + + return ioerr(db), -1; +} + +int +sdbm_store(register DBM *db, datum key, datum val, int flags) +{ + int need; + register long hash; + + if (db == NULL || bad(key)) + return errno = EINVAL, -1; + if (sdbm_rdonly(db)) + return errno = EPERM, -1; + + need = key.dsize + val.dsize; +/* + * is the pair too big (or too small) for this database ?? + */ + if (need < 0 || need > PAIRMAX) + return errno = EINVAL, -1; + + if (getpage(db, (hash = exhash(key)))) { +/* + * if we need to replace, delete the key/data pair + * first. If it is not there, ignore. + */ + if (flags == DBM_REPLACE) + (void) delpair(db->pagbuf, key); +#ifdef SEEDUPS + else if (duppair(db->pagbuf, key)) + return 1; +#endif +/* + * if we do not have enough room, we have to split. + */ + if (!fitpair(db->pagbuf, need)) + if (!makroom(db, hash, need)) + return ioerr(db), -1; +/* + * we have enough room or split is successful. insert the key, + * and update the page file. + */ + (void) putpair(db->pagbuf, key, val); + + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), -1; + /* + * success + */ + return 0; + } + + return ioerr(db), -1; +} + +/* + * makroom - make room by splitting the overfull page + * this routine will attempt to make room for SPLTMAX times before + * giving up. + */ +static int +makroom(register DBM *db, long int hash, int need) +{ + long newp; + char twin[PBLKSIZ]; +#if defined _WIN32 && !defined __CYGWIN__ + char zer[PBLKSIZ]; + long oldtail; +#endif + char *pag = db->pagbuf; + char *new = twin; + register int smax = SPLTMAX; + + do { +/* + * split the current page + */ + (void) splpage(pag, new, db->hmask + 1); +/* + * address of the new page + */ + newp = (hash & db->hmask) | (db->hmask + 1); + debug(("newp: %ld\n", newp)); +/* + * write delay, read avoidence/cache shuffle: + * select the page for incoming pair: if key is to go to the new page, + * write out the previous one, and copy the new one over, thus making + * it the current page. If not, simply write the new page, and we are + * still looking at the page of interest. current page is not updated + * here, as sdbm_store will do so, after it inserts the incoming pair. + */ + +#if defined _WIN32 && !defined __CYGWIN__ + /* + * Fill hole with 0 if made it. + * (hole is NOT read as 0) + */ + oldtail = lseek(db->pagf, 0L, SEEK_END); + memset(zer, 0, PBLKSIZ); + while (OFF_PAG(newp) > oldtail) { + if (lseek(db->pagf, 0L, SEEK_END) < 0 || + write(db->pagf, zer, PBLKSIZ) < 0) { + + return 0; + } + oldtail += PBLKSIZ; + } +#endif + + if (hash & (db->hmask + 1)) { + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + db->pagbno = newp; + (void) memcpy(pag, new, PBLKSIZ); + } + else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0 + || write(db->pagf, new, PBLKSIZ) < 0) + return 0; + + if (!setdbit(db, db->curbit)) + return 0; +/* + * see if we have enough room now + */ + if (fitpair(pag, need)) + return 1; +/* + * try again... update curbit and hmask as getpage would have + * done. because of our update of the current page, we do not + * need to read in anything. BUT we have to write the current + * [deferred] page out, as the window of failure is too great. + */ + db->curbit = 2 * db->curbit + + ((hash & (db->hmask + 1)) ? 2 : 1); + db->hmask |= (db->hmask + 1); + + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + + } while (--smax); +/* + * if we are here, this is real bad news. After SPLTMAX splits, + * we still cannot fit the key. say goodnight. + */ +#ifdef BADMESS + (void) write(2, "sdbm: cannot insert after SPLTMAX attempts.\n", 44); +#endif + return 0; + +} + +/* + * the following two routines will break if + * deletions aren't taken into account. (ndbm bug) + */ +datum +sdbm_firstkey(register DBM *db) +{ + if (db == NULL) + return errno = EINVAL, nullitem; +/* + * start at page 0 + */ + (void) memset(db->pagbuf, 0, PBLKSIZ); + if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0 + || read(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), nullitem; + db->pagbno = 0; + db->blkptr = 0; + db->keyptr = 0; + + return getnext(db); +} + +datum +sdbm_nextkey(register DBM *db) +{ + if (db == NULL) + return errno = EINVAL, nullitem; + return getnext(db); +} + +/* + * all important binary trie traversal + */ +static int +getpage(register DBM *db, register long int hash) +{ + register int hbit; + register long dbit; + register long pagb; + + dbit = 0; + hbit = 0; + while (dbit < db->maxbno && getdbit(db, dbit)) + dbit = 2 * dbit + ((hash & ((long) 1 << hbit++)) ? 2 : 1); + + debug(("dbit: %d...", dbit)); + + db->curbit = dbit; + db->hmask = masks[hbit]; + + pagb = hash & db->hmask; +/* + * see if the block we need is already in memory. + * note: this lookaside cache has about 10% hit rate. + */ + if (pagb != db->pagbno) { +/* + * note: here, we assume a "hole" is read as 0s. + * if not, must zero pagbuf first. + */ + (void) memset(db->pagbuf, 0, PBLKSIZ); + + if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0 + || read(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + if (!chkpage(db->pagbuf)) { + return 0; + } + db->pagbno = pagb; + + debug(("pag read: %d\n", pagb)); + } + return 1; +} + +static int +getdbit(register DBM *db, register long int dbit) +{ + register long c; + register long dirb; + + c = dbit / BYTESIZ; + dirb = c / DBLKSIZ; + + if (dirb != db->dirbno) { + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || read(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + db->dirbno = dirb; + + debug(("dir read: %d\n", dirb)); + } + + return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ)); +} + +static int +setdbit(register DBM *db, register long int dbit) +{ + register long c; + register long dirb; + + c = dbit / BYTESIZ; + dirb = c / DBLKSIZ; + + if (dirb != db->dirbno) { + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || read(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + db->dirbno = dirb; + + debug(("dir read: %d\n", dirb)); + } + + db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ)); + + if (dbit >= db->maxbno) + db->maxbno += (long) DBLKSIZ * BYTESIZ; + + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || write(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + + return 1; +} + +/* + * getnext - get the next key in the page, and if done with + * the page, try the next page in sequence + */ +static datum +getnext(register DBM *db) +{ + datum key; + + for (;;) { + db->keyptr++; + key = getnkey(db->pagbuf, db->keyptr); + if (key.dptr != NULL) + return key; +/* + * we either run out, or there is nothing on this page.. + * try the next one... If we lost our position on the + * file, we will have to seek. + */ + db->keyptr = 0; + if (db->pagbno != db->blkptr++) + if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0) + break; + db->pagbno = db->blkptr; + if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0) + break; + if (!chkpage(db->pagbuf)) { + break; + } + } + + return ioerr(db), nullitem; +} + +/* pair.c */ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + * + * page-level routines + */ + +#ifndef lint +/*char pair_rcsid[] = "$Id: _sdbm.c 19679 2008-10-04 13:33:22Z yugui $";*/ +#endif + +#ifndef BSD42 +/*#include */ +#endif + +#define exhash(item) sdbm_hash((item).dptr, (item).dsize) + +/* + * forward + */ +static int seepair proto((char *, int, char *, int)); + +/* + * page format: + * +------------------------------+ + * ino | n | keyoff | datoff | keyoff | + * +------------+--------+--------+ + * | datoff | - - - ----> | + * +--------+---------------------+ + * | F R E E A R E A | + * +--------------+---------------+ + * | <---- - - - | data | + * +--------+-----+----+----------+ + * | key | data | key | + * +--------+----------+----------+ + * + * calculating the offsets for free area: if the number + * of entries (ino[0]) is zero, the offset to the END of + * the free area is the block size. Otherwise, it is the + * nth (ino[ino[0]]) entry's offset. + */ + +static int +fitpair(char *pag, int need) +{ + register int n; + register int off; + register int free; + register short *ino = (short *) pag; + + off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ; + free = off - (n + 1) * sizeof(short); + need += 2 * sizeof(short); + + debug(("free %d need %d\n", free, need)); + + return need <= free; +} + +static void +putpair(char *pag, datum key, datum val) +{ + register int n; + register int off; + register short *ino = (short *) pag; + + off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ; +/* + * enter the key first + */ + off -= key.dsize; + if (key.dsize) + (void) memcpy(pag + off, key.dptr, key.dsize); + PUT_SHORT(ino,n + 1,off); +/* + * now the data + */ + off -= val.dsize; + if (val.dsize) + (void) memcpy(pag + off, val.dptr, val.dsize); + PUT_SHORT(ino,n + 2,off); +/* + * adjust item count + */ + PUT_SHORT(ino,0,GET_SHORT(ino,0) + 2); +} + +static datum +getpair(char *pag, datum key) +{ + register int i; + register int n; + datum val; + register short *ino = (short *) pag; + + if ((n = GET_SHORT(ino,0)) == 0) + return nullitem; + + if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0) + return nullitem; + + val.dptr = pag + GET_SHORT(ino,i + 1); + val.dsize = GET_SHORT(ino,i) - GET_SHORT(ino,i + 1); + return val; +} + +#ifdef SEEDUPS +static int +duppair(char *pag, datum key) +{ + register short *ino = (short *) pag; + return GET_SHORT(ino,0) > 0 && + seepair(pag, GET_SHORT(ino,0), key.dptr, key.dsize) > 0; +} +#endif + +static datum +getnkey(char *pag, int num) +{ + datum key; + register int off; + register short *ino = (short *) pag; + + num = num * 2 - 1; + if (GET_SHORT(ino,0) == 0 || num > GET_SHORT(ino,0)) + return nullitem; + + off = (num > 1) ? GET_SHORT(ino,num - 1) : PBLKSIZ; + + key.dptr = pag + GET_SHORT(ino,num); + key.dsize = off - GET_SHORT(ino,num); + + return key; +} + +static int +delpair(char *pag, datum key) +{ + register int n; + register int i; + register short *ino = (short *) pag; + + if ((n = GET_SHORT(ino,0)) == 0) + return 0; + + if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0) + return 0; +/* + * found the key. if it is the last entry + * [i.e. i == n - 1] we just adjust the entry count. + * hard case: move all data down onto the deleted pair, + * shift offsets onto deleted offsets, and adjust them. + * [note: 0 < i < n] + */ + if (i < n - 1) { + register int m; + register char *dst = pag + (i == 1 ? PBLKSIZ : GET_SHORT(ino,i - 1)); + register char *src = pag + GET_SHORT(ino,i + 1); + register int zoo = dst - src; + + debug(("free-up %d ", zoo)); +/* + * shift data/keys down + */ + m = GET_SHORT(ino,i + 1) - GET_SHORT(ino,n); +#ifdef DUFF +#define MOVB *--dst = *--src + + if (m > 0) { + register int loop = (m + 8 - 1) >> 3; + + switch (m & (8 - 1)) { + case 0: do { + MOVB; case 7: MOVB; + case 6: MOVB; case 5: MOVB; + case 4: MOVB; case 3: MOVB; + case 2: MOVB; case 1: MOVB; + } while (--loop); + } + } +#else +#ifdef MEMMOVE + memmove(dst, src, m); +#else + while (m--) + *--dst = *--src; +#endif +#endif +/* + * adjust offset index up + */ + while (i < n - 1) { + PUT_SHORT(ino,i, GET_SHORT(ino,i + 2) + zoo); + i++; + } + } + PUT_SHORT(ino, 0, GET_SHORT(ino, 0) - 2); + return 1; +} + +/* + * search for the key in the page. + * return offset index in the range 0 < i < n. + * return 0 if not found. + */ +static int +seepair(char *pag, register int n, register char *key, register int siz) +{ + register int i; + register int off = PBLKSIZ; + register short *ino = (short *) pag; + + for (i = 1; i < n; i += 2) { + if (siz == off - GET_SHORT(ino,i) && + memcmp(key, pag + GET_SHORT(ino,i), siz) == 0) + return i; + off = GET_SHORT(ino,i + 1); + } + return 0; +} + +static void +splpage(char *pag, char *new, long int sbit) +{ + datum key; + datum val; + + register int n; + register int off = PBLKSIZ; + char cur[PBLKSIZ]; + register short *ino = (short *) cur; + + (void) memcpy(cur, pag, PBLKSIZ); + (void) memset(pag, 0, PBLKSIZ); + (void) memset(new, 0, PBLKSIZ); + + n = GET_SHORT(ino,0); + for (ino++; n > 0; ino += 2) { + key.dptr = cur + GET_SHORT(ino,0); + key.dsize = off - GET_SHORT(ino,0); + val.dptr = cur + GET_SHORT(ino,1); + val.dsize = GET_SHORT(ino,0) - GET_SHORT(ino,1); +/* + * select the page pointer (by looking at sbit) and insert + */ + (void) putpair((exhash(key) & sbit) ? new : pag, key, val); + + off = GET_SHORT(ino,1); + n -= 2; + } + + debug(("%d split %d/%d\n", ((short *) cur)[0] / 2, + ((short *) new)[0] / 2, + ((short *) pag)[0] / 2)); +} + +/* + * check page sanity: + * number of entries should be something + * reasonable, and all offsets in the index should be in order. + * this could be made more rigorous. + */ +static int +chkpage(char *pag) +{ + register int n; + register int off; + register short *ino = (short *) pag; + + if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / sizeof(short)) + return 0; + + if (n > 0) { + off = PBLKSIZ; + for (ino++; n > 0; ino += 2) { + if (GET_SHORT(ino,0) > off || GET_SHORT(ino,1) > off || + GET_SHORT(ino,1) > GET_SHORT(ino,0)) + return 0; + off = GET_SHORT(ino,1); + n -= 2; + } + } + return 1; +} + +/* hash.c */ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. keep it that way. + * + * hashing routine + */ + +/* + * polynomial conversion ignoring overflows + * [this seems to work remarkably well, in fact better + * then the ndbm hash function. Replace at your own risk] + * use: 65599 nice. + * 65587 even better. + */ +long +sdbm_hash(register char *str, register int len) +{ + register unsigned long n = 0; + +#ifdef DUFF + +#define HASHC n = *str++ + 65599 * n + + if (len > 0) { + register int loop = (len + 8 - 1) >> 3; + + switch(len & (8 - 1)) { + case 0: do { + HASHC; case 7: HASHC; + case 6: HASHC; case 5: HASHC; + case 4: HASHC; case 3: HASHC; + case 2: HASHC; case 1: HASHC; + } while (--loop); + } + + } +#else + while (len--) + n = ((*str++) & 255) + 65587L * n; +#endif + return n; +} diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/depend b/lib/ruby-1.9.1-rc1/ext/sdbm/depend new file mode 100644 index 0000000..1d8b13d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/depend @@ -0,0 +1,2 @@ +_sdbm.o: _sdbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h +init.o: init.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/extconf.rb b/lib/ruby-1.9.1-rc1/ext/sdbm/extconf.rb new file mode 100644 index 0000000..cc6c8ce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/extconf.rb @@ -0,0 +1,3 @@ +require 'mkmf' + +create_makefile("sdbm") diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/init.c b/lib/ruby-1.9.1-rc1/ext/sdbm/init.c new file mode 100644 index 0000000..1ee1fc2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/init.c @@ -0,0 +1,712 @@ +/************************************************ + + sdbminit.c - + + $Author: yugui $ + created at: Fri May 7 08:34:24 JST 1999 + + Copyright (C) 1995-2001 Yukihiro Matsumoto + +************************************************/ + +#include "ruby.h" + +#include "sdbm.h" +#include +#include + +static VALUE rb_cDBM, rb_eDBMError; + +struct dbmdata { + int di_size; + DBM *di_dbm; +}; + +static void +closed_sdbm() +{ + rb_raise(rb_eDBMError, "closed SDBM file"); +} + +#define GetDBM(obj, dbmp) {\ + Data_Get_Struct(obj, struct dbmdata, dbmp);\ + if (dbmp == 0) closed_sdbm();\ + if (dbmp->di_dbm == 0) closed_sdbm();\ +} + +#define GetDBM2(obj, data, dbm) {\ + GetDBM(obj, data);\ + (dbm) = dbmp->di_dbm;\ +} + +static void +free_sdbm(struct dbmdata *dbmp) +{ + + if (dbmp->di_dbm) sdbm_close(dbmp->di_dbm); + ruby_xfree(dbmp); +} + +static VALUE +fsdbm_close(VALUE obj) +{ + struct dbmdata *dbmp; + + GetDBM(obj, dbmp); + sdbm_close(dbmp->di_dbm); + dbmp->di_dbm = 0; + + return Qnil; +} + +static VALUE +fsdbm_closed(VALUE obj) +{ + struct dbmdata *dbmp; + + Data_Get_Struct(obj, struct dbmdata, dbmp); + if (dbmp == 0) + return Qtrue; + if (dbmp->di_dbm == 0) + return Qtrue; + + return Qfalse; +} + +static VALUE +fsdbm_alloc(VALUE klass) +{ + return Data_Wrap_Struct(klass, 0, free_sdbm, 0); +} + +static VALUE +fsdbm_initialize(int argc, VALUE *argv, VALUE obj) +{ + VALUE file, vmode; + DBM *dbm; + struct dbmdata *dbmp; + int mode; + + if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) { + mode = 0666; /* default value */ + } + else if (NIL_P(vmode)) { + mode = -1; /* return nil if DB not exist */ + } + else { + mode = NUM2INT(vmode); + } + FilePathValue(file); + + dbm = 0; + if (mode >= 0) + dbm = sdbm_open(RSTRING_PTR(file), O_RDWR|O_CREAT, mode); + if (!dbm) + dbm = sdbm_open(RSTRING_PTR(file), O_RDWR, 0); + if (!dbm) + dbm = sdbm_open(RSTRING_PTR(file), O_RDONLY, 0); + + if (!dbm) { + if (mode == -1) return Qnil; + rb_sys_fail(RSTRING_PTR(file)); + } + + dbmp = ALLOC(struct dbmdata); + DATA_PTR(obj) = dbmp; + dbmp->di_dbm = dbm; + dbmp->di_size = -1; + + return obj; +} + +static VALUE +fsdbm_s_open(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0); + + if (NIL_P(fsdbm_initialize(argc, argv, obj))) { + return Qnil; + } + + if (rb_block_given_p()) { + return rb_ensure(rb_yield, obj, fsdbm_close, obj); + } + + return obj; +} + +static VALUE +fsdbm_fetch(VALUE obj, VALUE keystr, VALUE ifnone) +{ + datum key, value; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + GetDBM2(obj, dbmp, dbm); + value = sdbm_fetch(dbm, key); + if (value.dptr == 0) { + if (ifnone == Qnil && rb_block_given_p()) + return rb_yield(rb_external_str_new(key.dptr, key.dsize)); + return ifnone; + } + return rb_external_str_new(value.dptr, value.dsize); +} + +static VALUE +fsdbm_aref(VALUE obj, VALUE keystr) +{ + return fsdbm_fetch(obj, keystr, Qnil); +} + +static VALUE +fsdbm_fetch_m(int argc, VALUE *argv, VALUE obj) +{ + VALUE keystr, valstr, ifnone; + + rb_scan_args(argc, argv, "11", &keystr, &ifnone); + valstr = fsdbm_fetch(obj, keystr, ifnone); + if (argc == 1 && !rb_block_given_p() && NIL_P(valstr)) + rb_raise(rb_eIndexError, "key not found"); + + return valstr; +} + +static VALUE +fsdbm_key(VALUE obj, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(valstr); + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + if (val.dsize == RSTRING_LEN(valstr) && + memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0) + return rb_external_str_new(key.dptr, key.dsize); + } + return Qnil; +} + +static VALUE +fsdbm_index(VALUE hash, VALUE value) +{ + rb_warn("SDBM#index is deprecated; use SDBM#key"); + return fsdbm_key(hash, value); +} + +static VALUE +fsdbm_select(VALUE obj) +{ + VALUE new = rb_ary_new(); + datum key, val; + DBM *dbm; + struct dbmdata *dbmp; + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + VALUE assoc, v; + val = sdbm_fetch(dbm, key); + assoc = rb_assoc_new(rb_external_str_new(key.dptr, key.dsize), + rb_external_str_new(val.dptr, val.dsize)); + v = rb_yield(assoc); + if (RTEST(v)) { + rb_ary_push(new, assoc); + } + GetDBM2(obj, dbmp, dbm); + } + + return new; +} + +static VALUE +fsdbm_values_at(int argc, VALUE *argv, VALUE obj) +{ + VALUE new = rb_ary_new2(argc); + int i; + + for (i=0; idi_size = -1; + + value = sdbm_fetch(dbm, key); + if (value.dptr == 0) { + if (rb_block_given_p()) return rb_yield(keystr); + return Qnil; + } + + /* need to save value before sdbm_delete() */ + valstr = rb_external_str_new(value.dptr, value.dsize); + + if (sdbm_delete(dbm, key)) { + dbmp->di_size = -1; + rb_raise(rb_eDBMError, "dbm_delete failed"); + } + else if (dbmp->di_size >= 0) { + dbmp->di_size--; + } + return valstr; +} + +static VALUE +fsdbm_shift(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + key = sdbm_firstkey(dbm); + if (!key.dptr) return Qnil; + val = sdbm_fetch(dbm, key); + keystr = rb_external_str_new(key.dptr, key.dsize); + valstr = rb_external_str_new(val.dptr, val.dsize); + sdbm_delete(dbm, key); + if (dbmp->di_size >= 0) { + dbmp->di_size--; + } + + return rb_assoc_new(keystr, valstr); +} + +static VALUE +fsdbm_delete_if(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + VALUE ret, ary = rb_ary_new(); + int i, status = 0, n; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + n = dbmp->di_size; + dbmp->di_size = -1; + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + keystr = rb_external_str_new(key.dptr, key.dsize); + valstr = rb_external_str_new(val.dptr, val.dsize); + ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status); + if (status != 0) break; + if (RTEST(ret)) rb_ary_push(ary, keystr); + GetDBM2(obj, dbmp, dbm); + } + + for (i = 0; i < RARRAY_LEN(ary); i++) { + keystr = RARRAY_PTR(ary)[i]; + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + if (sdbm_delete(dbm, key)) { + rb_raise(rb_eDBMError, "sdbm_delete failed"); + } + } + if (status) rb_jump_tag(status); + if (n > 0) dbmp->di_size = n - RARRAY_LEN(ary); + + return obj; +} + +static VALUE +fsdbm_clear(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + + fdbm_modify(obj); + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + while (key = sdbm_firstkey(dbm), key.dptr) { + if (sdbm_delete(dbm, key)) { + rb_raise(rb_eDBMError, "sdbm_delete failed"); + } + } + dbmp->di_size = 0; + + return obj; +} + +static VALUE +fsdbm_invert(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE keystr, valstr; + VALUE hash = rb_hash_new(); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + keystr = rb_external_str_new(key.dptr, key.dsize); + valstr = rb_external_str_new(val.dptr, val.dsize); + rb_hash_aset(hash, valstr, keystr); + } + return hash; +} + +static VALUE +fsdbm_store(VALUE obj, VALUE keystr, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + if (valstr == Qnil) { + fsdbm_delete(obj, keystr); + return Qnil; + } + + fdbm_modify(obj); + ExportStringValue(keystr); + ExportStringValue(valstr); + + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + dbmp->di_size = -1; + if (sdbm_store(dbm, key, val, DBM_REPLACE)) { +#ifdef HAVE_DBM_CLAERERR + sdbm_clearerr(dbm); +#endif + if (errno == EPERM) rb_sys_fail(0); + rb_raise(rb_eDBMError, "sdbm_store failed"); + } + + return valstr; +} + +static VALUE +update_i(VALUE pair, VALUE dbm) +{ + Check_Type(pair, T_ARRAY); + if (RARRAY_LEN(pair) < 2) { + rb_raise(rb_eArgError, "pair must be [key, value]"); + } + fsdbm_store(dbm, RARRAY_PTR(pair)[0], RARRAY_PTR(pair)[1]); + return Qnil; +} + +static VALUE +fsdbm_update(VALUE obj, VALUE other) +{ + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +static VALUE +fsdbm_replace(VALUE obj, VALUE other) +{ + fsdbm_clear(obj); + rb_block_call(other, rb_intern("each_pair"), 0, 0, update_i, obj); + return obj; +} + +static VALUE +fsdbm_length(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + int i = 0; + + GetDBM2(obj, dbmp, dbm); + if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size); + + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + i++; + } + dbmp->di_size = i; + + return INT2FIX(i); +} + +static VALUE +fsdbm_empty_p(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + int i = 0; + + GetDBM(obj, dbmp); + if (dbmp->di_size < 0) { + dbm = dbmp->di_dbm; + + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + i++; + } + } + else { + i = dbmp->di_size; + } + if (i == 0) return Qtrue; + return Qfalse; +} + +static VALUE +fsdbm_each_value(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + rb_yield(rb_external_str_new(val.dptr, val.dsize)); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +static VALUE +fsdbm_each_key(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + rb_yield(rb_external_str_new(key.dptr, key.dsize)); + GetDBM2(obj, dbmp, dbm); + } + return obj; +} + +static VALUE +fsdbm_each_pair(VALUE obj) +{ + datum key, val; + DBM *dbm; + struct dbmdata *dbmp; + VALUE keystr, valstr; + + RETURN_ENUMERATOR(obj, 0, 0); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + keystr = rb_external_str_new(key.dptr, key.dsize); + valstr = rb_external_str_new(val.dptr, val.dsize); + rb_yield(rb_assoc_new(keystr, valstr)); + GetDBM2(obj, dbmp, dbm); + } + + return obj; +} + +static VALUE +fsdbm_keys(VALUE obj) +{ + datum key; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + rb_ary_push(ary, rb_external_str_new(key.dptr, key.dsize)); + } + + return ary; +} + +static VALUE +fsdbm_values(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + rb_ary_push(ary, rb_external_str_new(val.dptr, val.dsize)); + } + + return ary; +} + +static VALUE +fsdbm_has_key(VALUE obj, VALUE keystr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(keystr); + key.dptr = RSTRING_PTR(keystr); + key.dsize = RSTRING_LEN(keystr); + + GetDBM2(obj, dbmp, dbm); + val = sdbm_fetch(dbm, key); + if (val.dptr) return Qtrue; + return Qfalse; +} + +static VALUE +fsdbm_has_value(VALUE obj, VALUE valstr) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + + ExportStringValue(valstr); + val.dptr = RSTRING_PTR(valstr); + val.dsize = RSTRING_LEN(valstr); + + GetDBM2(obj, dbmp, dbm); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + if (val.dsize == RSTRING_LEN(valstr) && + memcmp(val.dptr, RSTRING_PTR(valstr), val.dsize) == 0) + return Qtrue; + } + return Qfalse; +} + +static VALUE +fsdbm_to_a(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE ary; + + GetDBM2(obj, dbmp, dbm); + ary = rb_ary_new(); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + rb_ary_push(ary, rb_assoc_new(rb_external_str_new(key.dptr, key.dsize), + rb_external_str_new(val.dptr, val.dsize))); + } + + return ary; +} + +static VALUE +fsdbm_to_hash(VALUE obj) +{ + datum key, val; + struct dbmdata *dbmp; + DBM *dbm; + VALUE hash; + + GetDBM2(obj, dbmp, dbm); + hash = rb_hash_new(); + for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) { + val = sdbm_fetch(dbm, key); + rb_hash_aset(hash, rb_external_str_new(key.dptr, key.dsize), + rb_external_str_new(val.dptr, val.dsize)); + } + + return hash; +} + +static VALUE +fsdbm_reject(VALUE obj) +{ + return rb_hash_delete_if(fsdbm_to_hash(obj)); +} + +void +Init_sdbm() +{ + rb_cDBM = rb_define_class("SDBM", rb_cObject); + rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError); + rb_include_module(rb_cDBM, rb_mEnumerable); + + rb_define_alloc_func(rb_cDBM, fsdbm_alloc); + rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1); + + rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1); + rb_define_method(rb_cDBM, "close", fsdbm_close, 0); + rb_define_method(rb_cDBM, "closed?", fsdbm_closed, 0); + rb_define_method(rb_cDBM, "[]", fsdbm_aref, 1); + rb_define_method(rb_cDBM, "fetch", fsdbm_fetch_m, -1); + rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2); + rb_define_method(rb_cDBM, "store", fsdbm_store, 2); + rb_define_method(rb_cDBM, "index", fsdbm_index, 1); + rb_define_method(rb_cDBM, "key", fsdbm_key, 1); + rb_define_method(rb_cDBM, "select", fsdbm_select, 0); + rb_define_method(rb_cDBM, "values_at", fsdbm_values_at, -1); + rb_define_method(rb_cDBM, "length", fsdbm_length, 0); + rb_define_method(rb_cDBM, "size", fsdbm_length, 0); + rb_define_method(rb_cDBM, "empty?", fsdbm_empty_p, 0); + rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0); + rb_define_method(rb_cDBM, "each_value", fsdbm_each_value, 0); + rb_define_method(rb_cDBM, "each_key", fsdbm_each_key, 0); + rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0); + rb_define_method(rb_cDBM, "keys", fsdbm_keys, 0); + rb_define_method(rb_cDBM, "values", fsdbm_values, 0); + rb_define_method(rb_cDBM, "shift", fsdbm_shift, 0); + rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1); + rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0); + rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0); + rb_define_method(rb_cDBM, "reject", fsdbm_reject, 0); + rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0); + rb_define_method(rb_cDBM,"invert", fsdbm_invert, 0); + rb_define_method(rb_cDBM,"update", fsdbm_update, 1); + rb_define_method(rb_cDBM,"replace", fsdbm_replace, 1); + + rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1); + rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1); + rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1); + rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1); + rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1); + rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1); + + rb_define_method(rb_cDBM, "to_a", fsdbm_to_a, 0); + rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/sdbm/sdbm.h b/lib/ruby-1.9.1-rc1/ext/sdbm/sdbm.h new file mode 100644 index 0000000..0c7ed1b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/sdbm/sdbm.h @@ -0,0 +1,84 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + */ +#ifndef _SDBM_H_ +#define _SDBM_H_ + +#define DBLKSIZ 4096 +#define PBLKSIZ 1024 +#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */ +#define SPLTMAX 10 /* maximum allowed splits */ + /* for a single insertion */ +#define DIRFEXT ".dir" +#define PAGFEXT ".pag" + +typedef struct { + int dirf; /* directory file descriptor */ + int pagf; /* page file descriptor */ + int flags; /* status/error flags, see below */ + long maxbno; /* size of dirfile in bits */ + long curbit; /* current bit number */ + long hmask; /* current hash mask */ + long blkptr; /* current block for nextkey */ + int keyptr; /* current key for nextkey */ + long blkno; /* current page to read/write */ + long pagbno; /* current page in pagbuf */ + char pagbuf[PBLKSIZ]; /* page file block buffer */ + long dirbno; /* current block in dirbuf */ + char dirbuf[DBLKSIZ]; /* directory file block buffer */ +} DBM; + +#define DBM_RDONLY 0x1 /* data base open read-only */ +#define DBM_IOERR 0x2 /* data base I/O error */ + +/* + * utility macros + */ +#define sdbm_rdonly(db) ((db)->flags & DBM_RDONLY) +#define sdbm_error(db) ((db)->flags & DBM_IOERR) + +#define sdbm_clearerr(db) ((db)->flags &= ~DBM_IOERR) /* ouch */ + +#define sdbm_dirfno(db) ((db)->dirf) +#define sdbm_pagfno(db) ((db)->pagf) + +typedef struct { + char *dptr; + int dsize; +} datum; + +extern datum nullitem; + +#if defined(__STDC__) +#define proto(p) p +#else +#define proto(p) () +#endif + +/* + * flags to sdbm_store + */ +#define DBM_INSERT 0 +#define DBM_REPLACE 1 + +/* + * ndbm interface + */ +extern DBM *sdbm_open proto((char *, int, int)); +extern void sdbm_close proto((DBM *)); +extern datum sdbm_fetch proto((DBM *, datum)); +extern int sdbm_delete proto((DBM *, datum)); +extern int sdbm_store proto((DBM *, datum, datum, int)); +extern datum sdbm_firstkey proto((DBM *)); +extern datum sdbm_nextkey proto((DBM *)); + +/* + * other + */ +extern DBM *sdbm_prep proto((char *, char *, int, int)); +extern long sdbm_hash proto((char *, int)); + +#endif /* _SDBM_H_ */ diff --git a/lib/ruby-1.9.1-rc1/ext/socket/.cvsignore b/lib/ruby-1.9.1-rc1/ext/socket/.cvsignore new file mode 100644 index 0000000..ce98586 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/.cvsignore @@ -0,0 +1,5 @@ +Makefile +mkmf.log +*.def +constants.h +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/socket/addrinfo.h b/lib/ruby-1.9.1-rc1/ext/socket/addrinfo.h new file mode 100644 index 0000000..f6061f1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/addrinfo.h @@ -0,0 +1,181 @@ +/* + * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. + * 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. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. + */ + +#ifndef ADDR_INFO_H +#define ADDR_INFO_H +#ifndef HAVE_GETADDRINFO + +/* special compatibility hack */ +#undef EAI_ADDRFAMILY +#undef EAI_AGAIN +#undef EAI_BADFLAGS +#undef EAI_FAIL +#undef EAI_FAMILY +#undef EAI_MEMORY +#undef EAI_NODATA +#undef EAI_NONAME +#undef EAI_SERVICE +#undef EAI_SOCKTYPE +#undef EAI_SYSTEM +#undef EAI_BADHINTS +#undef EAI_PROTOCOL +#undef EAI_MAX + +#undef AI_PASSIVE +#undef AI_CANONNAME +#undef AI_NUMERICHOST +#undef AI_ALL +#undef AI_ADDRCONFIG +#undef AI_V4MAPPED +#undef AI_DEFAULT + +#undef NI_NOFQDN +#undef NI_NUMERICHOST +#undef NI_NAMEREQD +#undef NI_NUMERICSERV +#undef NI_DGRAM + +#undef addrinfo +#define addrinfo addrinfo__compat +#undef getaddrinfo +#define getaddrinfo getaddrinfo__compat +#undef getnameinfo +#define getnameinfo getnameinfo__compat +#undef freehostent +#define freehostent freehostent__compat +#undef freeaddrinfo +#define freeaddrinfo freeaddrinfo__compat + +#ifndef __P +# ifdef HAVE_PROTOTYPES +# define __P(args) args +# else +# define __P(args) () +# endif +#endif + +/* special compatibility hack -- end*/ + + +/* + * Error return codes from getaddrinfo() + */ +#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ +#define EAI_AGAIN 2 /* temporary failure in name resolution */ +#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ +#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_MEMORY 6 /* memory allocation failure */ +#define EAI_NODATA 7 /* no address associated with hostname */ +#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ +#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_SYSTEM 11 /* system error returned in errno */ +#define EAI_BADHINTS 12 +#define EAI_PROTOCOL 13 +#define EAI_MAX 14 + +/* + * Flag values for getaddrinfo() + */ +#define AI_PASSIVE 0x00000001 /* get address to use bind() */ +#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ +#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */ +/* valid flags for addrinfo */ +#ifndef __HAIKU__ +#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST) +#endif + +#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ +#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ +#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ +#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ +/* special recommended flags for getipnodebyname */ +#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) + +/* + * Constants for getnameinfo() + */ +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 +#endif + +/* + * Flag values for getnameinfo() + */ +#define NI_NOFQDN 0x00000001 +#define NI_NUMERICHOST 0x00000002 +#define NI_NAMEREQD 0x00000004 +#define NI_NUMERICSERV 0x00000008 +#define NI_DGRAM 0x00000010 + +struct addrinfo { + int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ + size_t ai_addrlen; /* length of ai_addr */ + char *ai_canonname; /* canonical name for hostname */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ +}; + +extern int getaddrinfo __P(( + const char *hostname, const char *servname, + const struct addrinfo *hints, + struct addrinfo **res)); + +extern int getnameinfo __P(( + const struct sockaddr *sa, + size_t salen, + char *host, + size_t hostlen, + char *serv, + size_t servlen, + int flags)); + +extern void freehostent __P((struct hostent *)); +extern void freeaddrinfo __P((struct addrinfo *)); +#if defined __UCLIBC__ +const +#endif +#ifndef __HAIKU__ +extern char *gai_strerror __P((int)); +#endif + +/* In case there is no definition of offsetof() provided - though any proper +Standard C system should have one. */ + +#ifndef offsetof +#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field)) +#endif + +#endif +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/socket/depend b/lib/ruby-1.9.1-rc1/ext/socket/depend new file mode 100644 index 0000000..29bc2f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/depend @@ -0,0 +1,9 @@ +socket.o: socket.c $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ + $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h \ + sockport.h constants.h +getnameinfo.o: getnameinfo.c $(arch_hdrdir)/ruby/config.h addrinfo.h sockport.h +getaddrinfo.o: getaddrinfo.c $(arch_hdrdir)/ruby/config.h addrinfo.h sockport.h + +constants.h: $(srcdir)/mkconstants.rb + @echo "generating constants.h" + @$(RUBY) $(srcdir)/mkconstants.rb > $@ diff --git a/lib/ruby-1.9.1-rc1/ext/socket/extconf.rb b/lib/ruby-1.9.1-rc1/ext/socket/extconf.rb new file mode 100644 index 0000000..35ed282 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/extconf.rb @@ -0,0 +1,285 @@ +require 'mkmf' + +case RUBY_PLATFORM +when /(ms|bcc)win32|mingw/ + test_func = "WSACleanup" + have_library("ws2_32", "WSACleanup") +when /cygwin/ + test_func = "socket" +when /beos/ + test_func = "socket" + have_library("net", "socket") +when /haiku/ + test_func = "socket" + have_library("network", "socket") +when /i386-os2_emx/ + test_func = "socket" + have_library("socket", "socket") +else + test_func = "socket" + have_library("nsl", "t_open") + have_library("socket", "socket") +end + +unless $mswin or $bccwin or $mingw + headers = %w +end +if /solaris/ =~ RUBY_PLATFORM and !try_compile("") + # bug of gcc 3.0 on Solaris 8 ? + headers << "sys/feature_tests.h" +end +if have_header("arpa/inet.h") + headers << "arpa/inet.h" +end + +ipv6 = false +default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM +if enable_config("ipv6", default_ipv6) + if checking_for("ipv6") {try_link(< +#include +int +main() +{ + socket(AF_INET6, SOCK_STREAM, 0); +} +EOF + $defs << "-DENABLE_IPV6" << "-DINET6" + ipv6 = true + end +end + +if ipv6 + ipv6lib = nil + class << (fmt = "unknown") + def %(s) s || self end + end + idirs, ldirs = dir_config("inet6", %w[/usr/inet6 /usr/local/v6].find {|d| File.directory?(d)}) + checking_for("ipv6 type", fmt) do + if have_macro("IPV6_INRIA_VERSION", "netinet/in.h") + "inria" + elsif have_macro("__KAME__", "netinet/in.h") + have_library(ipv6lib = "inet6") + "kame" + elsif have_macro("_TOSHIBA_INET6", "sys/param.h") + have_library(ipv6lib = "inet6") and "toshiba" + elsif have_macro("__V6D__", "sys/v6config.h") + have_library(ipv6lib = "v6") and "v6d" + elsif have_macro("_ZETA_MINAMI_INET6", "sys/param.h") + have_library(ipv6lib = "inet6") and "zeta" + elsif ipv6lib = with_config("ipv6-lib") + warn < + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + +int +main() +{ + int passive, gaierr, inet4 = 0, inet6 = 0; + struct addrinfo hints, *ai, *aitop; + char straddr[INET6_ADDRSTRLEN], strport[16]; +#ifdef _WIN32 + WSADATA retdata; + + WSAStartup(MAKEWORD(2, 0), &retdata); +#endif + + for (passive = 0; passive <= 1; passive++) { + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = passive ? AI_PASSIVE : 0; + hints.ai_socktype = SOCK_STREAM; + if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { + (void)gai_strerror(gaierr); + goto bad; + } + for (ai = aitop; ai; ai = ai->ai_next) { + if (ai->ai_family == AF_LOCAL) continue; + if (ai->ai_addr == NULL) + goto bad; +#if defined(_AIX) + if (ai->ai_family == AF_INET6 && passive) { + inet6++; + continue; + } + ai->ai_addr->sa_len = ai->ai_addrlen; + ai->ai_addr->sa_family = ai->ai_family; +#endif + if (ai->ai_addrlen == 0 || + getnameinfo(ai->ai_addr, ai->ai_addrlen, + straddr, sizeof(straddr), strport, sizeof(strport), + NI_NUMERICHOST|NI_NUMERICSERV) != 0) { + goto bad; + } + if (strcmp(strport, "54321") != 0) { + goto bad; + } + switch (ai->ai_family) { + case AF_INET: + if (passive) { + if (strcmp(straddr, "0.0.0.0") != 0) { + goto bad; + } + } else { + if (strcmp(straddr, "127.0.0.1") != 0) { + goto bad; + } + } + inet4++; + break; + case AF_INET6: + if (passive) { + if (strcmp(straddr, "::") != 0) { + goto bad; + } + } else { + if (strcmp(straddr, "::1") != 0) { + goto bad; + } + } + inet6++; + break; + case AF_UNSPEC: + goto bad; + break; + default: + /* another family support? */ + break; + } + } + } + + if (!(inet4 == 0 || inet4 == 2)) + goto bad; + if (!(inet6 == 0 || inet6 == 2)) + goto bad; + + if (aitop) + freeaddrinfo(aitop); + exit(EXIT_SUCCESS); + + bad: + if (aitop) + freeaddrinfo(aitop); + exit(EXIT_FAILURE); +} +EOF +end +if ipv6 and not getaddr_info_ok + abort < +#ifndef _WIN32 +#include +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) +# include +#else +# include +#endif +#include +#if defined(HAVE_ARPA_INET_H) +#include +#endif +#if defined(HAVE_ARPA_NAMESER_H) +#include +#endif +#include +#if defined(HAVE_RESOLV_H) +#ifdef _SX +#include +#endif +#include +#endif +#include +#else +#include +#include +#endif +#include +#include +#include +#include +#include + +#ifdef SOCKS5 +#include +#endif + +#include "addrinfo.h" +#include "sockport.h" + +#if defined(__KAME__) && defined(INET6) +# define FAITH +#endif + +#define SUCCESS 0 +#define ANY 0 +#define YES 1 +#define NO 0 + +#ifdef FAITH +static int translate = NO; +static struct in6_addr faith_prefix = IN6ADDR_ANY_INIT; +#endif + +static const char in_addrany[] = { 0, 0, 0, 0 }; +static const char in6_addrany[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; +static const char in_loopback[] = { 127, 0, 0, 1 }; +static const char in6_loopback[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 +}; + +struct sockinet { + u_char si_len; + u_char si_family; + u_short si_port; +}; + +static const struct afd { + int a_af; + int a_addrlen; + int a_socklen; + int a_off; + const char *a_addrany; + const char *a_loopback; +} afdl [] = { +#ifdef INET6 +#define N_INET6 0 + {PF_INET6, sizeof(struct in6_addr), + sizeof(struct sockaddr_in6), + offsetof(struct sockaddr_in6, sin6_addr), + in6_addrany, in6_loopback}, +#define N_INET 1 +#else +#define N_INET 0 +#endif + {PF_INET, sizeof(struct in_addr), + sizeof(struct sockaddr_in), + offsetof(struct sockaddr_in, sin_addr), + in_addrany, in_loopback}, + {0, 0, 0, 0, NULL, NULL}, +}; + +#ifdef INET6 +#define PTON_MAX 16 +#else +#define PTON_MAX 4 +#endif + +static int get_name __P((const char *, const struct afd *, + struct addrinfo **, char *, struct addrinfo *, + int)); +static int get_addr __P((const char *, int, struct addrinfo **, + struct addrinfo *, int)); +static int str_isnumber __P((const char *)); + +static const char *const ai_errlist[] = { + "success.", + "address family for hostname not supported.", /* EAI_ADDRFAMILY */ + "temporary failure in name resolution.", /* EAI_AGAIN */ + "invalid value for ai_flags.", /* EAI_BADFLAGS */ + "non-recoverable failure in name resolution.", /* EAI_FAIL */ + "ai_family not supported.", /* EAI_FAMILY */ + "memory allocation failure.", /* EAI_MEMORY */ + "no address associated with hostname.", /* EAI_NODATA */ + "hostname nor servname provided, or not known.",/* EAI_NONAME */ + "servname not supported for ai_socktype.", /* EAI_SERVICE */ + "ai_socktype not supported.", /* EAI_SOCKTYPE */ + "system error returned in errno.", /* EAI_SYSTEM */ + "invalid value for hints.", /* EAI_BADHINTS */ + "resolved protocol is unknown.", /* EAI_PROTOCOL */ + "unknown error.", /* EAI_MAX */ +}; + +#define GET_CANONNAME(ai, str) \ +if (pai->ai_flags & AI_CANONNAME) {\ + if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\ + strcpy((ai)->ai_canonname, (str));\ + } else {\ + error = EAI_MEMORY;\ + goto free;\ + }\ +} + +#define GET_AI(ai, afd, addr, port) {\ + char *p;\ + if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\ + ((afd)->a_socklen)))\ + == NULL) {\ + error = EAI_MEMORY;\ + goto free;\ + }\ + memcpy(ai, pai, sizeof(struct addrinfo));\ + (ai)->ai_addr = (struct sockaddr *)((ai) + 1);\ + memset((ai)->ai_addr, 0, (afd)->a_socklen);\ + SET_SA_LEN((ai)->ai_addr, (ai)->ai_addrlen = (afd)->a_socklen);\ + (ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\ + ((struct sockinet *)(ai)->ai_addr)->si_port = port;\ + p = (char *)((ai)->ai_addr);\ + memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\ +} + +#define ERR(err) { error = (err); goto bad; } + +#ifndef __HAIKU__ +#if defined __UCLIBC__ +const +#endif +char * +gai_strerror(int ecode) +{ + if (ecode < 0 || ecode > EAI_MAX) + ecode = EAI_MAX; + return (char *)ai_errlist[ecode]; +} +#endif + +void +freeaddrinfo(struct addrinfo *ai) +{ + struct addrinfo *next; + + do { + next = ai->ai_next; + if (ai->ai_canonname) + free(ai->ai_canonname); + /* no need to free(ai->ai_addr) */ + free(ai); + } while ((ai = next) != NULL); +} + +static int +str_isnumber(const char *p) +{ + char *q = (char *)p; + while (*q) { + if (! isdigit(*q)) + return NO; + q++; + } + return YES; +} + +#ifndef HAVE_INET_PTON + +static int +inet_pton(int af, const char *hostname, void *pton) +{ + struct in_addr in; + +#ifdef HAVE_INET_ATON + if (!inet_aton(hostname, &in)) + return 0; +#else + int d1, d2, d3, d4; + char ch; + + if (sscanf(hostname, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 && + 0 <= d1 && d1 <= 255 && 0 <= d2 && d2 <= 255 && + 0 <= d3 && d3 <= 255 && 0 <= d4 && d4 <= 255) { + in.s_addr = htonl( + ((long) d1 << 24) | ((long) d2 << 16) | + ((long) d3 << 8) | ((long) d4 << 0)); + } + else { + return 0; + } +#endif + memcpy(pton, &in, sizeof(in)); + return 1; +} +#endif + +int +getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res) +{ + struct addrinfo sentinel; + struct addrinfo *top = NULL; + struct addrinfo *cur; + int i, error = 0; + char pton[PTON_MAX]; + struct addrinfo ai; + struct addrinfo *pai; + u_short port; + +#ifdef FAITH + static int firsttime = 1; + + if (firsttime) { + /* translator hack */ + { + char *q = getenv("GAI"); + if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1) + translate = YES; + } + firsttime = 0; + } +#endif + + /* initialize file static vars */ + sentinel.ai_next = NULL; + cur = &sentinel; + pai = &ai; + pai->ai_flags = 0; + pai->ai_family = PF_UNSPEC; + pai->ai_socktype = ANY; + pai->ai_protocol = ANY; + pai->ai_addrlen = 0; + pai->ai_canonname = NULL; + pai->ai_addr = NULL; + pai->ai_next = NULL; + port = ANY; + + if (hostname == NULL && servname == NULL) + return EAI_NONAME; + if (hints) { + /* error check for hints */ + if (hints->ai_addrlen || hints->ai_canonname || + hints->ai_addr || hints->ai_next) + ERR(EAI_BADHINTS); /* xxx */ + if (hints->ai_flags & ~AI_MASK) + ERR(EAI_BADFLAGS); + switch (hints->ai_family) { + case PF_UNSPEC: + case PF_INET: +#ifdef INET6 + case PF_INET6: +#endif + break; + default: + ERR(EAI_FAMILY); + } + memcpy(pai, hints, sizeof(*pai)); + switch (pai->ai_socktype) { + case ANY: + switch (pai->ai_protocol) { + case ANY: + break; + case IPPROTO_UDP: + pai->ai_socktype = SOCK_DGRAM; + break; + case IPPROTO_TCP: + pai->ai_socktype = SOCK_STREAM; + break; + default: +#if defined(SOCK_RAW) + pai->ai_socktype = SOCK_RAW; +#endif + break; + } + break; +#if defined(SOCK_RAW) + case SOCK_RAW: + break; +#endif + case SOCK_DGRAM: + if (pai->ai_protocol != IPPROTO_UDP && + pai->ai_protocol != ANY) + ERR(EAI_BADHINTS); /*xxx*/ + pai->ai_protocol = IPPROTO_UDP; + break; + case SOCK_STREAM: + if (pai->ai_protocol != IPPROTO_TCP && + pai->ai_protocol != ANY) + ERR(EAI_BADHINTS); /*xxx*/ + pai->ai_protocol = IPPROTO_TCP; + break; + default: + ERR(EAI_SOCKTYPE); + break; + } + } + + /* + * service port + */ + if (servname) { + if (str_isnumber(servname)) { + if (pai->ai_socktype == ANY) { + /* caller accept *ANY* socktype */ + pai->ai_socktype = SOCK_DGRAM; + pai->ai_protocol = IPPROTO_UDP; + } + port = htons((unsigned short)atoi(servname)); + } else { + struct servent *sp; + const char *proto; + + proto = NULL; + switch (pai->ai_socktype) { + case ANY: + proto = NULL; + break; + case SOCK_DGRAM: + proto = "udp"; + break; + case SOCK_STREAM: + proto = "tcp"; + break; + default: + fprintf(stderr, "panic!\n"); + break; + } + if ((sp = getservbyname((char*)servname, proto)) == NULL) + ERR(EAI_SERVICE); + port = sp->s_port; + if (pai->ai_socktype == ANY) + if (strcmp(sp->s_proto, "udp") == 0) { + pai->ai_socktype = SOCK_DGRAM; + pai->ai_protocol = IPPROTO_UDP; + } else if (strcmp(sp->s_proto, "tcp") == 0) { + pai->ai_socktype = SOCK_STREAM; + pai->ai_protocol = IPPROTO_TCP; + } else + ERR(EAI_PROTOCOL); /*xxx*/ + } + } + + /* + * hostname == NULL. + * passive socket -> anyaddr (0.0.0.0 or ::) + * non-passive socket -> localhost (127.0.0.1 or ::1) + */ + if (hostname == NULL) { + const struct afd *afd; + int s; + + for (afd = &afdl[0]; afd->a_af; afd++) { + if (!(pai->ai_family == PF_UNSPEC + || pai->ai_family == afd->a_af)) { + continue; + } + + /* + * filter out AFs that are not supported by the kernel + * XXX errno? + */ + s = socket(afd->a_af, SOCK_DGRAM, 0); + if (s < 0) + continue; +#if defined(__BEOS__) + closesocket(s); +#else + close(s); +#endif + + if (pai->ai_flags & AI_PASSIVE) { + GET_AI(cur->ai_next, afd, afd->a_addrany, port); + /* xxx meaningless? + * GET_CANONNAME(cur->ai_next, "anyaddr"); + */ + } else { + GET_AI(cur->ai_next, afd, afd->a_loopback, + port); + /* xxx meaningless? + * GET_CANONNAME(cur->ai_next, "localhost"); + */ + } + cur = cur->ai_next; + } + top = sentinel.ai_next; + if (top) + goto good; + else + ERR(EAI_FAMILY); + } + + /* hostname as numeric name */ + for (i = 0; afdl[i].a_af; i++) { + if (inet_pton(afdl[i].a_af, hostname, pton)) { + u_long v4a; +#ifdef INET6 + u_char pfx; +#endif + + switch (afdl[i].a_af) { + case AF_INET: + v4a = ((struct in_addr *)pton)->s_addr; + if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) + pai->ai_flags &= ~AI_CANONNAME; + v4a >>= IN_CLASSA_NSHIFT; + if (v4a == 0 || v4a == IN_LOOPBACKNET) + pai->ai_flags &= ~AI_CANONNAME; + break; +#ifdef INET6 + case AF_INET6: +#ifdef HAVE_ADDR8 + pfx = ((struct in6_addr *)pton)->s6_addr8[0]; +#else + pfx = ((struct in6_addr *)pton)->s6_addr[0]; +#endif + if (pfx == 0 || pfx == 0xfe || pfx == 0xff) + pai->ai_flags &= ~AI_CANONNAME; + break; +#endif + } + + if (pai->ai_family == afdl[i].a_af || + pai->ai_family == PF_UNSPEC) { + if (! (pai->ai_flags & AI_CANONNAME)) { + GET_AI(top, &afdl[i], pton, port); + goto good; + } + /* + * if AI_CANONNAME and if reverse lookup + * fail, return ai anyway to pacify + * calling application. + * + * XXX getaddrinfo() is a name->address + * translation function, and it looks strange + * that we do addr->name translation here. + */ + get_name(pton, &afdl[i], &top, pton, pai, port); + goto good; + } else + ERR(EAI_FAMILY); /*xxx*/ + } + } + + if (pai->ai_flags & AI_NUMERICHOST) + ERR(EAI_NONAME); + + /* hostname as alphabetical name */ + error = get_addr(hostname, pai->ai_family, &top, pai, port); + if (error == 0) { + if (top) { + good: + *res = top; + return SUCCESS; + } else + error = EAI_FAIL; + } + free: + if (top) + freeaddrinfo(top); + bad: + *res = NULL; + return error; +} + +static int +get_name(const char *addr, const struct afd *afd, struct addrinfo **res, char *numaddr, struct addrinfo *pai, int port0) +{ + u_short port = port0 & 0xffff; + struct hostent *hp; + struct addrinfo *cur; + int error = 0; +#ifdef INET6 + int h_error; +#endif + +#ifdef INET6 + hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error); +#else + hp = gethostbyaddr((char*)addr, afd->a_addrlen, AF_INET); +#endif + if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { + GET_AI(cur, afd, hp->h_addr_list[0], port); + GET_CANONNAME(cur, hp->h_name); + } else + GET_AI(cur, afd, numaddr, port); + +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + *res = cur; + return SUCCESS; + free: + if (cur) + freeaddrinfo(cur); +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + /* bad: */ + *res = NULL; + return error; +} + +static int +get_addr(const char *hostname, int af, struct addrinfo **res, struct addrinfo *pai, int port0) +{ + u_short port = port0 & 0xffff; + struct addrinfo sentinel; + struct hostent *hp; + struct addrinfo *top, *cur; + const struct afd *afd; + int i, error = 0, h_error; + char *ap; + + top = NULL; + sentinel.ai_next = NULL; + cur = &sentinel; +#ifdef INET6 + if (af == AF_UNSPEC) { + hp = getipnodebyname(hostname, AF_INET6, + AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error); + } else + hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error); +#else + hp = gethostbyname((char*)hostname); + h_error = h_errno; +#endif + if (hp == NULL) { + switch (h_error) { + case HOST_NOT_FOUND: + case NO_DATA: + error = EAI_NODATA; + break; + case TRY_AGAIN: + error = EAI_AGAIN; + break; + case NO_RECOVERY: + default: + error = EAI_FAIL; + break; + } + goto bad; + } + + if ((hp->h_name == NULL) || (hp->h_name[0] == 0) || + (hp->h_addr_list[0] == NULL)) + ERR(EAI_FAIL); + + for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) { + switch (af) { +#ifdef INET6 + case AF_INET6: + afd = &afdl[N_INET6]; + break; +#endif +#ifndef INET6 + default: /* AF_UNSPEC */ +#endif + case AF_INET: + afd = &afdl[N_INET]; + break; +#ifdef INET6 + default: /* AF_UNSPEC */ + if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) { + ap += sizeof(struct in6_addr) - + sizeof(struct in_addr); + afd = &afdl[N_INET]; + } else + afd = &afdl[N_INET6]; + break; +#endif + } +#ifdef FAITH + if (translate && afd->a_af == AF_INET) { + struct in6_addr *in6; + + GET_AI(cur->ai_next, &afdl[N_INET6], ap, port); + in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr; + memcpy(&in6->s6_addr32[0], &faith_prefix, + sizeof(struct in6_addr) - sizeof(struct in_addr)); + memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr)); + } else +#endif /* FAITH */ + GET_AI(cur->ai_next, afd, ap, port); + if (cur == &sentinel) { + top = cur->ai_next; + GET_CANONNAME(top, hp->h_name); + } + cur = cur->ai_next; + } +#ifdef INET6 + freehostent(hp); +#endif + *res = top; + return SUCCESS; + free: + if (top) + freeaddrinfo(top); +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + bad: + *res = NULL; + return error; +} diff --git a/lib/ruby-1.9.1-rc1/ext/socket/getnameinfo.c b/lib/ruby-1.9.1-rc1/ext/socket/getnameinfo.c new file mode 100644 index 0000000..aee81b5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/getnameinfo.c @@ -0,0 +1,257 @@ +/* + * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * 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. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. + */ + +/* + * Issues to be discussed: + * - Thread safe-ness must be checked + * - Return values. There seems to be no standard for return value (RFC2133) + * but INRIA implementation returns EAI_xxx defined for getaddrinfo(). + */ + +#include "ruby/config.h" +#include +#include +#ifndef _WIN32 +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) +# include +#else +# include +#endif +#include +#if defined(HAVE_ARPA_INET_H) +#include +#endif +#if defined(HAVE_ARPA_NAMESER_H) +#include +#endif +#include +#if defined(HAVE_RESOLV_H) +#include +#endif +#endif +#ifdef _WIN32 +#include +#define snprintf _snprintf +#endif + +#include +#include + +#ifdef SOCKS5 +#include +#endif + +#include "addrinfo.h" +#include "sockport.h" + +#define SUCCESS 0 +#define ANY 0 +#define YES 1 +#define NO 0 + +struct sockinet { + u_char si_len; + u_char si_family; + u_short si_port; +}; + +static struct afd { + int a_af; + int a_addrlen; + int a_socklen; + int a_off; +} afdl [] = { +#ifdef INET6 +#define N_INET6 0 + {PF_INET6, sizeof(struct in6_addr), + sizeof(struct sockaddr_in6), + offsetof(struct sockaddr_in6, sin6_addr)}, +#define N_INET 1 +#else +#define N_INET 0 +#endif + {PF_INET, sizeof(struct in_addr), + sizeof(struct sockaddr_in), + offsetof(struct sockaddr_in, sin_addr)}, + {0, 0, 0, 0}, +}; + +#define ENI_NOSOCKET 0 +#define ENI_NOSERVNAME 1 +#define ENI_NOHOSTNAME 2 +#define ENI_MEMORY 3 +#define ENI_SYSTEM 4 +#define ENI_FAMILY 5 +#define ENI_SALEN 6 + +#ifdef __HAIKU__ +#define HAVE_INET_NTOP +#endif +#ifndef HAVE_INET_NTOP +static const char * +inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) +{ +#ifdef HAVE_INET_NTOA + struct in_addr in; + memcpy(&in.s_addr, addr, sizeof(in.s_addr)); + snprintf(numaddr, numaddr_len, "%s", inet_ntoa(in)); +#else + unsigned long x = ntohl(*(unsigned long*)addr); + snprintf(numaddr, numaddr_len, "%d.%d.%d.%d", + (int) (x>>24) & 0xff, (int) (x>>16) & 0xff, + (int) (x>> 8) & 0xff, (int) (x>> 0) & 0xff); +#endif + return numaddr; +} +#endif + +int +getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags) +{ + struct afd *afd; + struct servent *sp; + struct hostent *hp; + u_short port; + int family, len, i; + char *addr, *p; + u_long v4a; +#ifdef INET6 + u_char pfx; +#endif + int h_error; + char numserv[512]; + char numaddr[512]; + + if (sa == NULL) + return ENI_NOSOCKET; + + len = SA_LEN(sa); + if (len != salen) return ENI_SALEN; + + family = sa->sa_family; + for (i = 0; afdl[i].a_af; i++) + if (afdl[i].a_af == family) { + afd = &afdl[i]; + goto found; + } + return ENI_FAMILY; + + found: + if (len != afd->a_socklen) return ENI_SALEN; + + port = ((struct sockinet *)sa)->si_port; /* network byte order */ + addr = (char *)sa + afd->a_off; + + if (serv == NULL || servlen == 0) { + /* what we should do? */ + } else if (flags & NI_NUMERICSERV) { + snprintf(numserv, sizeof(numserv), "%d", ntohs(port)); + if (strlen(numserv) + 1 > servlen) + return ENI_MEMORY; + strcpy(serv, numserv); + } else { +#if defined(HAVE_GETSERVBYPORT) + sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp"); + if (sp) { + if (strlen(sp->s_name) + 1 > servlen) + return ENI_MEMORY; + strcpy(serv, sp->s_name); + } else + return ENI_NOSERVNAME; +#else + return ENI_NOSERVNAME; +#endif + } + + switch (sa->sa_family) { + case AF_INET: + v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr); + if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) + flags |= NI_NUMERICHOST; + v4a >>= IN_CLASSA_NSHIFT; + if (v4a == 0) + flags |= NI_NUMERICHOST; + break; +#ifdef INET6 + case AF_INET6: +#ifdef HAVE_ADDR8 + pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0]; +#else + pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0]; +#endif + if (pfx == 0 || pfx == 0xfe || pfx == 0xff) + flags |= NI_NUMERICHOST; + break; +#endif + } + if (host == NULL || hostlen == 0) { + /* what should we do? */ + } else if (flags & NI_NUMERICHOST) { + if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr)) + == NULL) + return ENI_SYSTEM; + if (strlen(numaddr) > hostlen) + return ENI_MEMORY; + strcpy(host, numaddr); + } else { +#ifdef INET6 + hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error); +#else + hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af); + h_error = h_errno; +#endif + + if (hp) { + if (flags & NI_NOFQDN) { + p = strchr(hp->h_name, '.'); + if (p) *p = '\0'; + } + if (strlen(hp->h_name) + 1 > hostlen) { +#ifdef INET6 + freehostent(hp); +#endif + return ENI_MEMORY; + } + strcpy(host, hp->h_name); +#ifdef INET6 + freehostent(hp); +#endif + } else { + if (flags & NI_NAMEREQD) + return ENI_NOHOSTNAME; + if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr)) + == NULL) + return ENI_NOHOSTNAME; + if (strlen(numaddr) > hostlen) + return ENI_MEMORY; + strcpy(host, numaddr); + } + } + return SUCCESS; +} diff --git a/lib/ruby-1.9.1-rc1/ext/socket/mkconstants.rb b/lib/ruby-1.9.1-rc1/ext/socket/mkconstants.rb new file mode 100644 index 0000000..bb05250 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/mkconstants.rb @@ -0,0 +1,305 @@ +$out ||= $stdout + +# workaround for NetBSD, OpenBSD and etc. +$out.puts("#define pseudo_AF_FTIP pseudo_AF_RTIP") + +# skip empty lines and comment lines +DATA.each_line do |s| + name, value = s.scan(/\S+/) + if name && name[0] != ?# + $out.puts("#ifdef #{name}") + $out.puts(" sock_define_const(\"#{name}\", #{name});") + if value + $out.puts("#else") + $out.puts(" sock_define_const(\"#{name}\", #{value});") + end + $out.puts("#endif") + $out.puts + end +end + +__END__ + +SOCK_STREAM +SOCK_DGRAM +SOCK_RAW +SOCK_RDM +SOCK_SEQPACKET +SOCK_PACKET + +AF_INET +PF_INET +AF_UNIX +PF_UNIX +AF_AX25 +PF_AX25 +AF_IPX +PF_IPX +AF_APPLETALK +PF_APPLETALK +AF_UNSPEC +PF_UNSPEC +AF_LOCAL +PF_LOCAL +AF_IMPLINK +PF_IMPLINK +AF_PUP +PF_PUP +AF_CHAOS +PF_CHAOS +AF_NS +PF_NS +AF_ISO +PF_ISO +AF_OSI +PF_OSI +AF_ECMA +PF_ECMA +AF_DATAKIT +PF_DATAKIT +AF_CCITT +PF_CCITT +AF_SNA +PF_SNA +AF_DEC +PF_DEC +AF_DLI +PF_DLI +AF_LAT +PF_LAT +AF_HYLINK +PF_HYLINK +AF_ROUTE +PF_ROUTE +AF_LINK +PF_LINK +AF_COIP +PF_COIP +AF_CNT +PF_CNT +AF_SIP +PF_SIP +AF_NDRV +PF_NDRV +AF_ISDN +PF_ISDN +AF_NATM +PF_NATM +AF_SYSTEM +PF_SYSTEM +AF_NETBIOS +PF_NETBIOS +AF_PPP +PF_PPP +AF_ATM +PF_ATM +AF_NETGRAPH +PF_NETGRAPH +AF_MAX +PF_MAX + +AF_E164 +PF_XTP +PF_RTIP +PF_PIP +PF_KEY + +MSG_OOB +MSG_PEEK +MSG_DONTROUTE +MSG_EOR +MSG_TRUNC +MSG_CTRUNC +MSG_WAITALL +MSG_DONTWAIT +MSG_EOF +MSG_FLUSH +MSG_HOLD +MSG_SEND +MSG_HAVEMORE +MSG_RCVMORE +MSG_COMPAT + +SOL_SOCKET +SOL_IP +SOL_IPX +SOL_AX25 +SOL_ATALK +SOL_TCP +SOL_UDP + +IPPROTO_IP 0 +IPPROTO_ICMP 1 +IPPROTO_IGMP +IPPROTO_GGP +IPPROTO_TCP 6 +IPPROTO_EGP +IPPROTO_PUP +IPPROTO_UDP 17 +IPPROTO_IDP +IPPROTO_HELLO +IPPROTO_ND +IPPROTO_TP +IPPROTO_XTP +IPPROTO_EON +IPPROTO_BIP +IPPROTO_AH +IPPROTO_DSTOPTS +IPPROTO_ESP +IPPROTO_FRAGMENT +IPPROTO_HOPOPTS +IPPROTO_ICMPV6 +IPPROTO_IPV6 +IPPROTO_NONE +IPPROTO_ROUTING + +IPPROTO_RAW 255 +IPPROTO_MAX + +# Some port configuration +IPPORT_RESERVED 1024 +IPPORT_USERRESERVED 5000 + +# Some reserved IP v.4 addresses +INADDR_ANY 0x00000000 +INADDR_BROADCAST 0xffffffff +INADDR_LOOPBACK 0x7F000001 +INADDR_UNSPEC_GROUP 0xe0000000 +INADDR_ALLHOSTS_GROUP 0xe0000001 +INADDR_MAX_LOCAL_GROUP 0xe00000ff +INADDR_NONE 0xffffffff + +# IP [gs]etsockopt options +IP_OPTIONS +IP_HDRINCL +IP_TOS +IP_TTL +IP_RECVOPTS +IP_RECVRETOPTS +IP_RECVDSTADDR +IP_RETOPTS +IP_MULTICAST_IF +IP_MULTICAST_TTL +IP_MULTICAST_LOOP +IP_ADD_MEMBERSHIP +IP_DROP_MEMBERSHIP +IP_DEFAULT_MULTICAST_TTL +IP_DEFAULT_MULTICAST_LOOP +IP_MAX_MEMBERSHIPS + +SO_DEBUG +SO_REUSEADDR +SO_REUSEPORT +SO_TYPE +SO_ERROR +SO_DONTROUTE +SO_BROADCAST +SO_SNDBUF +SO_RCVBUF +SO_KEEPALIVE +SO_OOBINLINE +SO_NO_CHECK +SO_PRIORITY +SO_LINGER +SO_PASSCRED +SO_PEERCRED +SO_RCVLOWAT +SO_SNDLOWAT +SO_RCVTIMEO +SO_SNDTIMEO +SO_ACCEPTCONN +SO_USELOOPBACK +SO_ACCEPTFILTER +SO_DONTTRUNC +SO_WANTMORE +SO_WANTOOBFLAG +SO_NREAD +SO_NKE +SO_NOSIGPIPE +SO_SECURITY_AUTHENTICATION +SO_SECURITY_ENCRYPTION_TRANSPORT +SO_SECURITY_ENCRYPTION_NETWORK +SO_BINDTODEVICE +SO_ATTACH_FILTER +SO_DETACH_FILTER +SO_PEERNAME +SO_TIMESTAMP + +SOPRI_INTERACTIVE +SOPRI_NORMAL +SOPRI_BACKGROUND + +IPX_TYPE + +TCP_NODELAY +TCP_MAXSEG + +EAI_ADDRFAMILY +EAI_AGAIN +EAI_BADFLAGS +EAI_FAIL +EAI_FAMILY +EAI_MEMORY +EAI_NODATA +EAI_NONAME +EAI_OVERFLOW +EAI_SERVICE +EAI_SOCKTYPE +EAI_SYSTEM +EAI_BADHINTS +EAI_PROTOCOL +EAI_MAX + +AI_PASSIVE +AI_CANONNAME +AI_NUMERICHOST +AI_NUMERICSERV +AI_MASK +AI_ALL +AI_V4MAPPED_CFG +AI_ADDRCONFIG +AI_V4MAPPED +AI_DEFAULT + +NI_MAXHOST +NI_MAXSERV +NI_NOFQDN +NI_NUMERICHOST +NI_NAMEREQD +NI_NUMERICSERV +NI_DGRAM + +SHUT_RD 0 +SHUT_WR 1 +SHUT_RDWR 2 + +IPV6_JOIN_GROUP +IPV6_LEAVE_GROUP +IPV6_MULTICAST_HOPS +IPV6_MULTICAST_IF +IPV6_MULTICAST_LOOP +IPV6_UNICAST_HOPS +IPV6_V6ONLY +IPV6_CHECKSUM +IPV6_DONTFRAG +IPV6_DSTOPTS +IPV6_HOPLIMIT +IPV6_HOPOPTS +IPV6_NEXTHOP +IPV6_PATHMTU +IPV6_PKTINFO +IPV6_RECVDSTOPTS +IPV6_RECVHOPLIMIT +IPV6_RECVHOPOPTS +IPV6_RECVPKTINFO +IPV6_RECVRTHDR +IPV6_RECVTCLASS +IPV6_RTHDR +IPV6_RTHDRDSTOPTS +IPV6_RTHDR_TYPE_0 +IPV6_RECVPATHMTU +IPV6_TCLASS +IPV6_USE_MIN_MTU + +INET_ADDRSTRLEN +INET6_ADDRSTRLEN diff --git a/lib/ruby-1.9.1-rc1/ext/socket/socket.c b/lib/ruby-1.9.1-rc1/ext/socket/socket.c new file mode 100644 index 0000000..8964166 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/socket.c @@ -0,0 +1,3705 @@ +/************************************************ + + socket.c - + + $Author: yugui $ + created at: Thu Mar 31 12:21:29 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +************************************************/ + +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/util.h" +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_SYS_UIO_H +#include +#endif + +#ifdef HAVE_XTI_H +#include +#endif + +#ifndef _WIN32 +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) +# include +#else +# include +#endif +#include +#ifdef HAVE_NETINET_IN_SYSTM_H +# include +#endif +#ifdef HAVE_NETINET_TCP_H +# include +#endif +#ifdef HAVE_NETINET_UDP_H +# include +#endif +#ifdef HAVE_ARPA_INET_H +# include +#endif +#include +#endif +#include +#ifdef HAVE_SYS_UN_H +#include +#endif + +#if defined(HAVE_FCNTL) +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif +#endif +#ifndef EWOULDBLOCK +#define EWOULDBLOCK EAGAIN +#endif +#ifndef HAVE_GETADDRINFO +# include "addrinfo.h" +#endif +#include "sockport.h" + +static int do_not_reverse_lookup = 0; +#define FMODE_NOREVLOOKUP 0x100 + +VALUE rb_cBasicSocket; +VALUE rb_cIPSocket; +VALUE rb_cTCPSocket; +VALUE rb_cTCPServer; +VALUE rb_cUDPSocket; +#ifdef AF_UNIX +VALUE rb_cUNIXSocket; +VALUE rb_cUNIXServer; +#endif +VALUE rb_cSocket; + +static VALUE rb_eSocket; + +#ifdef SOCKS +VALUE rb_cSOCKSSocket; +#ifdef SOCKS5 +#include +#else +void SOCKSinit(); +int Rconnect(); +#endif +#endif + +#define BLOCKING_REGION(func, arg) (long)rb_thread_blocking_region((func), (arg), RUBY_UBF_IO, 0) + +#define INET_CLIENT 0 +#define INET_SERVER 1 +#define INET_SOCKS 2 + +#ifndef HAVE_SOCKADDR_STORAGE +/* + * RFC 2553: protocol-independent placeholder for socket addresses + */ +#define _SS_MAXSIZE 128 +#define _SS_ALIGNSIZE (sizeof(double)) +#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2) +#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \ + _SS_PAD1SIZE - _SS_ALIGNSIZE) + +struct sockaddr_storage { +#ifdef HAVE_SA_LEN + unsigned char ss_len; /* address length */ + unsigned char ss_family; /* address family */ +#else + unsigned short ss_family; +#endif + char __ss_pad1[_SS_PAD1SIZE]; + double __ss_align; /* force desired structure storage alignment */ + char __ss_pad2[_SS_PAD2SIZE]; +}; +#endif + +#if defined(INET6) && (defined(LOOKUP_ORDER_HACK_INET) || defined(LOOKUP_ORDER_HACK_INET6)) +#define LOOKUP_ORDERS (sizeof(lookup_order_table) / sizeof(lookup_order_table[0])) +static const int lookup_order_table[] = { +#if defined(LOOKUP_ORDER_HACK_INET) + PF_INET, PF_INET6, PF_UNSPEC, +#elif defined(LOOKUP_ORDER_HACK_INET6) + PF_INET6, PF_INET, PF_UNSPEC, +#else + /* should not happen */ +#endif +}; + +static int +ruby_getaddrinfo(char *nodename, char *servname, + struct addrinfo *hints, struct addrinfo **res) +{ + struct addrinfo tmp_hints; + int i, af, error; + + if (hints->ai_family != PF_UNSPEC) { + return getaddrinfo(nodename, servname, hints, res); + } + + for (i = 0; i < LOOKUP_ORDERS; i++) { + af = lookup_order_table[i]; + MEMCPY(&tmp_hints, hints, struct addrinfo, 1); + tmp_hints.ai_family = af; + error = getaddrinfo(nodename, servname, &tmp_hints, res); + if (error) { + if (tmp_hints.ai_family == PF_UNSPEC) { + break; + } + } + else { + break; + } + } + + return error; +} +#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo((node),(serv),(hints),(res)) +#endif + +#if defined(_AIX) +static int +ruby_getaddrinfo__aix(char *nodename, char *servname, + struct addrinfo *hints, struct addrinfo **res) +{ + int error = getaddrinfo(nodename, servname, hints, res); + struct addrinfo *r; + if (error) + return error; + for (r = *res; r != NULL; r = r->ai_next) { + if (r->ai_addr->sa_family == 0) + r->ai_addr->sa_family = r->ai_family; + if (r->ai_addr->sa_len == 0) + r->ai_addr->sa_len = r->ai_addrlen; + } + return 0; +} +#undef getaddrinfo +#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res)) +static int +ruby_getnameinfo__aix(sa, salen, host, hostlen, serv, servlen, flags) + const struct sockaddr *sa; + size_t salen; + char *host; + size_t hostlen; + char *serv; + size_t servlen; + int flags; +{ + struct sockaddr_in6 *sa6; + u_int32_t *a6; + + if (sa->sa_family == AF_INET6) { + sa6 = (struct sockaddr_in6 *)sa; + a6 = sa6->sin6_addr.u6_addr.u6_addr32; + + if (a6[0] == 0 && a6[1] == 0 && a6[2] == 0 && a6[3] == 0) { + strncpy(host, "::", hostlen); + snprintf(serv, servlen, "%d", sa6->sin6_port); + return 0; + } + } + return getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); +} +#undef getnameinfo +#define getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) \ + ruby_getnameinfo__aix((sa), (salen), (host), (hostlen), (serv), (servlen), (flags)) +#ifndef CMSG_SPACE +# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len)) +#endif +#ifndef CMSG_LEN +# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) +#endif +#endif + +#ifdef __BEOS__ +#undef close +#define close closesocket +#endif + +static VALUE +init_sock(VALUE sock, int fd) +{ + rb_io_t *fp; + + MakeOpenFile(sock, fp); + fp->fd = fd; + fp->mode = FMODE_READWRITE|FMODE_DUPLEX; + rb_io_ascii8bit_binmode(sock); + if (do_not_reverse_lookup) { + fp->mode |= FMODE_NOREVLOOKUP; + } + rb_io_synchronized(fp); + + return sock; +} + +static VALUE +bsock_s_for_fd(VALUE klass, VALUE fd) +{ + rb_io_t *fptr; + VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd)); + + GetOpenFile(sock, fptr); + + return sock; +} + +static VALUE +bsock_shutdown(int argc, VALUE *argv, VALUE sock) +{ + VALUE howto; + int how; + rb_io_t *fptr; + + if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { + rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket"); + } + rb_scan_args(argc, argv, "01", &howto); + if (howto == Qnil) + how = 2; + else { + how = NUM2INT(howto); + if (how < 0 || 2 < how) { + rb_raise(rb_eArgError, "`how' should be either 0, 1, 2"); + } + } + GetOpenFile(sock, fptr); + if (shutdown(fptr->fd, how) == -1) + rb_sys_fail(0); + + return INT2FIX(0); +} + +static VALUE +bsock_close_read(VALUE sock) +{ + rb_io_t *fptr; + + if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { + rb_raise(rb_eSecurityError, "Insecure: can't close socket"); + } + GetOpenFile(sock, fptr); + shutdown(fptr->fd, 0); + if (!(fptr->mode & FMODE_WRITABLE)) { + return rb_io_close(sock); + } + fptr->mode &= ~FMODE_READABLE; + + return Qnil; +} + +static VALUE +bsock_close_write(VALUE sock) +{ + rb_io_t *fptr; + + if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { + rb_raise(rb_eSecurityError, "Insecure: can't close socket"); + } + GetOpenFile(sock, fptr); + if (!(fptr->mode & FMODE_READABLE)) { + return rb_io_close(sock); + } + shutdown(fptr->fd, 1); + fptr->mode &= ~FMODE_WRITABLE; + + return Qnil; +} + +/* + * Document-method: setsockopt + * call-seq: setsockopt(level, optname, optval) + * + * Sets a socket option. These are protocol and system specific, see your + * local sytem documentation for details. + * + * === Parameters + * * +level+ is an integer, usually one of the SOL_ constants such as + * Socket::SOL_SOCKET, or a protocol level. + * * +optname+ is an integer, usually one of the SO_ constants, such + * as Socket::SO_REUSEADDR. + * * +optval+ is the value of the option, it is passed to the underlying + * setsockopt() as a pointer to a certain number of bytes. How this is + * done depends on the type: + * - Fixnum: value is assigned to an int, and a pointer to the int is + * passed, with length of sizeof(int). + * - true or false: 1 or 0 (respectively) is assigned to an int, and the + * int is passed as for a Fixnum. Note that +false+ must be passed, + * not +nil+. + * - String: the string's data and length is passed to the socket. + * + * === Examples + * + * Some socket options are integers with boolean values, in this case + * #setsockopt could be called like this: + * sock.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true) + * + * Some socket options are integers with numeric values, in this case + * #setsockopt could be called like this: + * sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, 255) + * + * Option values may be structs. Passing them can be complex as it involves + * examining your system headers to determine the correct definition. An + * example is an +ip_mreq+, which may be defined in your system headers as: + * struct ip_mreq { + * struct in_addr imr_multiaddr; + * struct in_addr imr_interface; + * }; + * + * In this case #setsockopt could be called like this: + * optval = IPAddr.new("224.0.0.251") + Socket::INADDR_ANY + * sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, optval) + * +*/ +static VALUE +bsock_setsockopt(VALUE sock, VALUE lev, VALUE optname, VALUE val) +{ + int level, option; + rb_io_t *fptr; + int i; + char *v; + int vlen; + + rb_secure(2); + level = NUM2INT(lev); + option = NUM2INT(optname); + + switch (TYPE(val)) { + case T_FIXNUM: + i = FIX2INT(val); + goto numval; + case T_FALSE: + i = 0; + goto numval; + case T_TRUE: + i = 1; + numval: + v = (char*)&i; vlen = sizeof(i); + break; + default: + StringValue(val); + v = RSTRING_PTR(val); + vlen = RSTRING_LEN(val); + break; + } + +#define rb_sys_fail_path(path) rb_sys_fail(NIL_P(path) ? 0 : RSTRING_PTR(path)) + + GetOpenFile(sock, fptr); + if (setsockopt(fptr->fd, level, option, v, vlen) < 0) + rb_sys_fail_path(fptr->pathv); + + return INT2FIX(0); +} + +/* + * Document-method: getsockopt + * call-seq: getsockopt(level, optname) + * + * Gets a socket option. These are protocol and system specific, see your + * local sytem documentation for details. The option is returned as + * a String with the data being the binary value of the socket option. + * + * === Parameters + * * +level+ is an integer, usually one of the SOL_ constants such as + * Socket::SOL_SOCKET, or a protocol level. + * * +optname+ is an integer, usually one of the SO_ constants, such + * as Socket::SO_REUSEADDR. + * + * === Examples + * + * Some socket options are integers with boolean values, in this case + * #getsockopt could be called like this: + * optval = sock.getsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR) + * optval = optval.unpack "i" + * reuseaddr = optval[0] == 0 ? false : true + * + * Some socket options are integers with numeric values, in this case + * #getsockopt could be called like this: + * optval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL) + * ipttl = optval.unpack("i")[0] + * + * Option values may be structs. Decoding them can be complex as it involves + * examining your system headers to determine the correct definition. An + * example is a +struct linger+, which may be defined in your system headers + * as: + * struct linger { + * int l_onoff; + * int l_linger; + * }; + * + * In this case #getsockopt could be called like this: + * optval = sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER) + * onoff, linger = optval.unpack "ii" +*/ +static VALUE +bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname) +{ +#if !defined(__BEOS__) + int level, option; + socklen_t len; + char *buf; + rb_io_t *fptr; + + level = NUM2INT(lev); + option = NUM2INT(optname); + len = 256; + buf = ALLOCA_N(char,len); + + GetOpenFile(sock, fptr); + if (getsockopt(fptr->fd, level, option, buf, &len) < 0) + rb_sys_fail_path(fptr->pathv); + + return rb_str_new(buf, len); +#else + rb_notimplement(); +#endif +} + +static VALUE +bsock_getsockname(VALUE sock) +{ + char buf[1024]; + socklen_t len = sizeof buf; + rb_io_t *fptr; + + GetOpenFile(sock, fptr); + if (getsockname(fptr->fd, (struct sockaddr*)buf, &len) < 0) + rb_sys_fail("getsockname(2)"); + return rb_str_new(buf, len); +} + +static VALUE +bsock_getpeername(VALUE sock) +{ + char buf[1024]; + socklen_t len = sizeof buf; + rb_io_t *fptr; + + GetOpenFile(sock, fptr); + if (getpeername(fptr->fd, (struct sockaddr*)buf, &len) < 0) + rb_sys_fail("getpeername(2)"); + return rb_str_new(buf, len); +} + +struct send_arg { + int fd, flags; + VALUE mesg; + struct sockaddr *to; + socklen_t tolen; +}; + +static VALUE +sendto_blocking(void *data) +{ + struct send_arg *arg = data; + VALUE mesg = arg->mesg; + return (VALUE)sendto(arg->fd, RSTRING_PTR(mesg), RSTRING_LEN(mesg), + arg->flags, arg->to, arg->tolen); +} + +static VALUE +send_blocking(void *data) +{ + struct send_arg *arg = data; + VALUE mesg = arg->mesg; + return (VALUE)send(arg->fd, RSTRING_PTR(mesg), RSTRING_LEN(mesg), + arg->flags); +} + +static VALUE +bsock_send(int argc, VALUE *argv, VALUE sock) +{ + struct send_arg arg; + VALUE flags, to; + rb_io_t *fptr; + int n; + rb_blocking_function_t *func; + + rb_secure(4); + rb_scan_args(argc, argv, "21", &arg.mesg, &flags, &to); + + StringValue(arg.mesg); + if (!NIL_P(to)) { + StringValue(to); + to = rb_str_new4(to); + arg.to = (struct sockaddr *)RSTRING_PTR(to); + arg.tolen = RSTRING_LEN(to); + func = sendto_blocking; + } + else { + func = send_blocking; + } + GetOpenFile(sock, fptr); + arg.fd = fptr->fd; + arg.flags = NUM2INT(flags); + while (rb_thread_fd_writable(arg.fd), + (n = (int)BLOCKING_REGION(func, &arg)) < 0) { + if (rb_io_wait_writable(arg.fd)) { + continue; + } + rb_sys_fail("send(2)"); + } + return INT2FIX(n); +} + +static VALUE +bsock_do_not_reverse_lookup(VALUE sock) +{ + rb_io_t *fptr; + + GetOpenFile(sock, fptr); + return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse; +} + +static VALUE +bsock_do_not_reverse_lookup_set(VALUE sock, VALUE state) +{ + rb_io_t *fptr; + + rb_secure(4); + GetOpenFile(sock, fptr); + if (RTEST(state)) { + fptr->mode |= FMODE_NOREVLOOKUP; + } + else { + fptr->mode &= ~FMODE_NOREVLOOKUP; + } + return sock; +} + +static VALUE ipaddr(struct sockaddr*, int); +#ifdef HAVE_SYS_UN_H +static VALUE unixaddr(struct sockaddr_un*, socklen_t); +#endif + +enum sock_recv_type { + RECV_RECV, /* BasicSocket#recv(no from) */ + RECV_IP, /* IPSocket#recvfrom */ + RECV_UNIX, /* UNIXSocket#recvfrom */ + RECV_SOCKET /* Socket#recvfrom */ +}; + +struct recvfrom_arg { + int fd, flags; + VALUE str; + socklen_t alen; + char buf[1024]; +}; + +static VALUE +recvfrom_blocking(void *data) +{ + struct recvfrom_arg *arg = data; + return (VALUE)recvfrom(arg->fd, RSTRING_PTR(arg->str), RSTRING_LEN(arg->str), + arg->flags, (struct sockaddr*)arg->buf, &arg->alen); +} + +static VALUE +s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from) +{ + rb_io_t *fptr; + VALUE str, klass; + struct recvfrom_arg arg; + VALUE len, flg; + long buflen; + long slen; + + rb_scan_args(argc, argv, "11", &len, &flg); + + if (flg == Qnil) arg.flags = 0; + else arg.flags = NUM2INT(flg); + buflen = NUM2INT(len); + + GetOpenFile(sock, fptr); + if (rb_io_read_pending(fptr)) { + rb_raise(rb_eIOError, "recv for buffered IO"); + } + arg.fd = fptr->fd; + arg.alen = sizeof(arg.buf); + + arg.str = str = rb_tainted_str_new(0, buflen); + klass = RBASIC(str)->klass; + RBASIC(str)->klass = 0; + + while (rb_io_check_closed(fptr), + rb_thread_wait_fd(arg.fd), + (slen = BLOCKING_REGION(recvfrom_blocking, &arg)) < 0) { + if (RBASIC(str)->klass || RSTRING_LEN(str) != buflen) { + rb_raise(rb_eRuntimeError, "buffer string modified"); + } + } + + RBASIC(str)->klass = klass; + if (slen < RSTRING_LEN(str)) { + rb_str_set_len(str, slen); + } + rb_obj_taint(str); + switch (from) { + case RECV_RECV: + return str; + case RECV_IP: +#if 0 + if (arg.alen != sizeof(struct sockaddr_in)) { + rb_raise(rb_eTypeError, "sockaddr size differs - should not happen"); + } +#endif + if (arg.alen && arg.alen != sizeof(arg.buf)) /* OSX doesn't return a from result for connection-oriented sockets */ + return rb_assoc_new(str, ipaddr((struct sockaddr*)arg.buf, fptr->mode & FMODE_NOREVLOOKUP)); + else + return rb_assoc_new(str, Qnil); + +#ifdef HAVE_SYS_UN_H + case RECV_UNIX: + return rb_assoc_new(str, unixaddr((struct sockaddr_un*)arg.buf, arg.alen)); +#endif + case RECV_SOCKET: + return rb_assoc_new(str, rb_str_new(arg.buf, arg.alen)); + default: + rb_bug("s_recvfrom called with bad value"); + } +} + +static VALUE +s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from) +{ + rb_io_t *fptr; + VALUE str; + char buf[1024]; + socklen_t alen = sizeof buf; + VALUE len, flg; + long buflen; + long slen; + int fd, flags; + VALUE addr = Qnil; + + rb_scan_args(argc, argv, "11", &len, &flg); + + if (flg == Qnil) flags = 0; + else flags = NUM2INT(flg); + buflen = NUM2INT(len); + +#ifdef MSG_DONTWAIT + /* MSG_DONTWAIT avoids the race condition between fcntl and recvfrom. + It is not portable, though. */ + flags |= MSG_DONTWAIT; +#endif + + GetOpenFile(sock, fptr); + if (rb_io_read_pending(fptr)) { + rb_raise(rb_eIOError, "recvfrom for buffered IO"); + } + fd = fptr->fd; + + str = rb_tainted_str_new(0, buflen); + + rb_io_check_closed(fptr); + rb_io_set_nonblock(fptr); + slen = recvfrom(fd, RSTRING_PTR(str), buflen, flags, (struct sockaddr*)buf, &alen); + + if (slen < 0) { + rb_sys_fail("recvfrom(2)"); + } + if (slen < RSTRING_LEN(str)) { + rb_str_set_len(str, slen); + } + rb_obj_taint(str); + switch (from) { + case RECV_RECV: + return str; + + case RECV_IP: + if (alen && alen != sizeof(buf)) /* connection-oriented socket may not return a from result */ + addr = ipaddr((struct sockaddr*)buf, fptr->mode & FMODE_NOREVLOOKUP); + break; + + case RECV_SOCKET: + addr = rb_str_new(buf, alen); + break; + + default: + rb_bug("s_recvfrom_nonblock called with bad value"); + } + return rb_assoc_new(str, addr); +} + +static VALUE +bsock_recv(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom(sock, argc, argv, RECV_RECV); +} + +/* + * call-seq: + * basicsocket.recv_nonblock(maxlen) => mesg + * basicsocket.recv_nonblock(maxlen, flags) => mesg + * + * Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * _flags_ is zero or more of the +MSG_+ options. + * The result, _mesg_, is the data received. + * + * When recvfrom(2) returns 0, Socket#recv_nonblock returns + * an empty string as data. + * The meaning depends on the socket: EOF on TCP, empty packet on UDP, etc. + * + * === Parameters + * * +maxlen+ - the number of bytes to receive from the socket + * * +flags+ - zero or more of the +MSG_+ options + * + * === Example + * serv = TCPServer.new("127.0.0.1", 0) + * af, port, host, addr = serv.addr + * c = TCPSocket.new(addr, port) + * s = serv.accept + * c.send "aaa", 0 + * IO.select([s]) # emulate blocking recv. + * p s.recv_nonblock(10) #=> "aaa" + * + * Refer to Socket#recvfrom for the exceptions that may be thrown if the call + * to _recv_nonblock_ fails. + * + * BasicSocket#recv_nonblock may raise any error corresponding to recvfrom(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * Socket#recvfrom + */ + +static VALUE +bsock_recv_nonblock(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom_nonblock(sock, argc, argv, RECV_RECV); +} + +static VALUE +bsock_do_not_rev_lookup(void) +{ + return do_not_reverse_lookup?Qtrue:Qfalse; +} + +static VALUE +bsock_do_not_rev_lookup_set(VALUE self, VALUE val) +{ + rb_secure(4); + do_not_reverse_lookup = RTEST(val); + return val; +} + +NORETURN(static void raise_socket_error(const char *, int)); +static void +raise_socket_error(const char *reason, int error) +{ +#ifdef EAI_SYSTEM + if (error == EAI_SYSTEM) rb_sys_fail(reason); +#endif + rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error)); +} + +static void +make_ipaddr0(struct sockaddr *addr, char *buf, size_t len) +{ + int error; + + error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST); + if (error) { + raise_socket_error("getnameinfo", error); + } +} + +static VALUE +make_ipaddr(struct sockaddr *addr) +{ + char buf[1024]; + + make_ipaddr0(addr, buf, sizeof(buf)); + return rb_str_new2(buf); +} + +static void +make_inetaddr(long host, char *buf, size_t len) +{ + struct sockaddr_in sin; + + MEMZERO(&sin, struct sockaddr_in, 1); + sin.sin_family = AF_INET; + SET_SIN_LEN(&sin, sizeof(sin)); + sin.sin_addr.s_addr = host; + make_ipaddr0((struct sockaddr*)&sin, buf, len); +} + +static int +str_isnumber(const char *p) +{ + char *ep; + + if (!p || *p == '\0') + return 0; + ep = NULL; + (void)STRTOUL(p, &ep, 10); + if (ep && *ep == '\0') + return 1; + else + return 0; +} + +static char* +host_str(VALUE host, char *hbuf, size_t len) +{ + if (NIL_P(host)) { + return NULL; + } + else if (rb_obj_is_kind_of(host, rb_cInteger)) { + unsigned long i = NUM2ULONG(host); + + make_inetaddr(htonl(i), hbuf, len); + return hbuf; + } + else { + char *name; + + SafeStringValue(host); + name = RSTRING_PTR(host); + if (!name || *name == 0 || (name[0] == '<' && strcmp(name, "") == 0)) { + make_inetaddr(INADDR_ANY, hbuf, len); + } + else if (name[0] == '<' && strcmp(name, "") == 0) { + make_inetaddr(INADDR_BROADCAST, hbuf, len); + } + else if (strlen(name) >= len) { + rb_raise(rb_eArgError, "hostname too long (%"PRIuSIZE")", + strlen(name)); + } + else { + strcpy(hbuf, name); + } + return hbuf; + } +} + +static char* +port_str(VALUE port, char *pbuf, size_t len) +{ + if (NIL_P(port)) { + return 0; + } + else if (FIXNUM_P(port)) { + snprintf(pbuf, len, "%ld", FIX2LONG(port)); + return pbuf; + } + else { + char *serv; + + SafeStringValue(port); + serv = RSTRING_PTR(port); + if (strlen(serv) >= len) { + rb_raise(rb_eArgError, "service name too long (%"PRIuSIZE")", + strlen(serv)); + } + strcpy(pbuf, serv); + return pbuf; + } +} + +#ifndef NI_MAXHOST +# define NI_MAXHOST 1025 +#endif +#ifndef NI_MAXSERV +# define NI_MAXSERV 32 +#endif + +static struct addrinfo* +sock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints) +{ + struct addrinfo* res = NULL; + char *hostp, *portp; + int error; + char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV]; + + hostp = host_str(host, hbuf, sizeof(hbuf)); + portp = port_str(port, pbuf, sizeof(pbuf)); + + if (hints->ai_socktype == 0 && hints->ai_flags == 0 && str_isnumber(portp)) { + hints->ai_socktype = SOCK_DGRAM; + } + + error = getaddrinfo(hostp, portp, hints, &res); + if (error) { + if (hostp && hostp[strlen(hostp)-1] == '\n') { + rb_raise(rb_eSocket, "newline at the end of hostname"); + } + raise_socket_error("getaddrinfo", error); + } + +#if defined(__APPLE__) && defined(__MACH__) + { + struct addrinfo *r; + r = res; + while (r) { + if (! r->ai_socktype) r->ai_socktype = hints->ai_socktype; + if (! r->ai_protocol) { + if (r->ai_socktype == SOCK_DGRAM) { + r->ai_protocol = IPPROTO_UDP; + } + else if (r->ai_socktype == SOCK_STREAM) { + r->ai_protocol = IPPROTO_TCP; + } + } + r = r->ai_next; + } + } +#endif + return res; +} + +static struct addrinfo* +sock_addrinfo(VALUE host, VALUE port, int socktype, int flags) +{ + struct addrinfo hints; + + MEMZERO(&hints, struct addrinfo, 1); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = socktype; + hints.ai_flags = flags; + return sock_getaddrinfo(host, port, &hints); +} + +static VALUE +ipaddr(struct sockaddr *sockaddr, int norevlookup) +{ + VALUE family, port, addr1, addr2; + VALUE ary; + int error; + char hbuf[1024], pbuf[1024]; + + switch (sockaddr->sa_family) { + case AF_UNSPEC: + family = rb_str_new2("AF_UNSPEC"); + break; + case AF_INET: + family = rb_str_new2("AF_INET"); + break; +#ifdef INET6 + case AF_INET6: + family = rb_str_new2("AF_INET6"); + break; +#endif +#ifdef AF_LOCAL + case AF_LOCAL: + family = rb_str_new2("AF_LOCAL"); + break; +#elif AF_UNIX + case AF_UNIX: + family = rb_str_new2("AF_UNIX"); + break; +#endif + default: + sprintf(pbuf, "unknown:%d", sockaddr->sa_family); + family = rb_str_new2(pbuf); + break; + } + + addr1 = Qnil; + if (!norevlookup) { + error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf), + NULL, 0, 0); + if (! error) { + addr1 = rb_str_new2(hbuf); + } + } + error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf), + pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV); + if (error) { + raise_socket_error("getnameinfo", error); + } + addr2 = rb_str_new2(hbuf); + if (addr1 == Qnil) { + addr1 = addr2; + } + port = INT2FIX(atoi(pbuf)); + ary = rb_ary_new3(4, family, port, addr1, addr2); + + return ary; +} + +static int +ruby_socket(int domain, int type, int proto) +{ + int fd; + + fd = socket(domain, type, proto); + if (fd < 0) { + if (errno == EMFILE || errno == ENFILE) { + rb_gc(); + fd = socket(domain, type, proto); + } + } + return fd; +} + +static int +wait_connectable0(int fd, rb_fdset_t *fds_w, rb_fdset_t *fds_e) +{ + int sockerr; + socklen_t sockerrlen; + + for (;;) { + rb_fd_zero(fds_w); + rb_fd_zero(fds_e); + + rb_fd_set(fd, fds_w); + rb_fd_set(fd, fds_e); + + rb_thread_select(fd+1, 0, rb_fd_ptr(fds_w), rb_fd_ptr(fds_e), 0); + + if (rb_fd_isset(fd, fds_w)) { + return 0; + } + else if (rb_fd_isset(fd, fds_e)) { + sockerrlen = sizeof(sockerr); + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, + &sockerrlen) == 0) { + if (sockerr == 0) + continue; /* workaround for winsock */ + errno = sockerr; + } + return -1; + } + } + + return 0; +} + +struct wait_connectable_arg { + int fd; + rb_fdset_t fds_w; + rb_fdset_t fds_e; +}; + +#ifdef HAVE_RB_FD_INIT +static VALUE +try_wait_connectable(VALUE arg) +{ + struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg; + return (VALUE)wait_connectable0(p->fd, &p->fds_w, &p->fds_e); +} + +static VALUE +wait_connectable_ensure(VALUE arg) +{ + struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg; + rb_fd_term(&p->fds_w); + rb_fd_term(&p->fds_e); + return Qnil; +} +#endif + +static int +wait_connectable(int fd) +{ + struct wait_connectable_arg arg; + + rb_fd_init(&arg.fds_w); + rb_fd_init(&arg.fds_e); +#ifdef HAVE_RB_FD_INIT + arg.fd = fd; + return (int)rb_ensure(try_wait_connectable, (VALUE)&arg, + wait_connectable_ensure,(VALUE)&arg); +#else + return wait_connectable0(fd, &arg.fds_w, &arg.fds_e); +#endif +} + +#ifdef __CYGWIN__ +#define WAIT_IN_PROGRESS 10 +#endif +#ifdef __APPLE__ +#define WAIT_IN_PROGRESS 10 +#endif +#ifdef __linux__ +/* returns correct error */ +#define WAIT_IN_PROGRESS 0 +#endif +#ifndef WAIT_IN_PROGRESS +/* BSD origin code apparently has a problem */ +#define WAIT_IN_PROGRESS 1 +#endif + +struct connect_arg { + int fd; + const struct sockaddr *sockaddr; + socklen_t len; +}; + +static VALUE +connect_blocking(void *data) +{ + struct connect_arg *arg = data; + return (VALUE)connect(arg->fd, arg->sockaddr, arg->len); +} + +#if defined(SOCKS) && !defined(SOCKS5) +static VALUE +socks_connect_blocking(void *data) +{ + struct connect_arg *arg = data; + return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); +} +#endif + +static int +ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks) +{ + int status; + rb_blocking_function_t *func = connect_blocking; + struct connect_arg arg; +#if WAIT_IN_PROGRESS > 0 + int wait_in_progress = -1; + int sockerr; + socklen_t sockerrlen; +#endif + + arg.fd = fd; + arg.sockaddr = sockaddr; + arg.len = len; +#if defined(SOCKS) && !defined(SOCKS5) + if (socks) func = socks_connect_blocking; +#endif + for (;;) { + status = (int)BLOCKING_REGION(func, &arg); + if (status < 0) { + switch (errno) { + case EAGAIN: +#ifdef EINPROGRESS + case EINPROGRESS: +#endif +#if WAIT_IN_PROGRESS > 0 + sockerrlen = sizeof(sockerr); + status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen); + if (status) break; + if (sockerr) { + status = -1; + errno = sockerr; + break; + } +#endif +#ifdef EALREADY + case EALREADY: +#endif +#if WAIT_IN_PROGRESS > 0 + wait_in_progress = WAIT_IN_PROGRESS; +#endif + status = wait_connectable(fd); + if (status) { + break; + } + errno = 0; + continue; + +#if WAIT_IN_PROGRESS > 0 + case EINVAL: + if (wait_in_progress-- > 0) { + /* + * connect() after EINPROGRESS returns EINVAL on + * some platforms, need to check true error + * status. + */ + sockerrlen = sizeof(sockerr); + status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen); + if (!status && !sockerr) { + struct timeval tv = {0, 100000}; + rb_thread_wait_for(tv); + continue; + } + status = -1; + errno = sockerr; + } + break; +#endif + +#ifdef EISCONN + case EISCONN: + status = 0; + errno = 0; + break; +#endif + default: + break; + } + } + return status; + } +} + +struct inetsock_arg +{ + VALUE sock; + struct { + VALUE host, serv; + struct addrinfo *res; + } remote, local; + int type; + int fd; +}; + +static VALUE +inetsock_cleanup(struct inetsock_arg *arg) +{ + if (arg->remote.res) { + freeaddrinfo(arg->remote.res); + arg->remote.res = 0; + } + if (arg->local.res) { + freeaddrinfo(arg->local.res); + arg->local.res = 0; + } + if (arg->fd >= 0) { + close(arg->fd); + } + return Qnil; +} + +static VALUE +init_inetsock_internal(struct inetsock_arg *arg) +{ + int type = arg->type; + struct addrinfo *res; + int fd, status = 0; + const char *syscall = 0; + + arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM, + (type == INET_SERVER) ? AI_PASSIVE : 0); + /* + * Maybe also accept a local address + */ + + if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) { + arg->local.res = sock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0); + } + + arg->fd = fd = -1; + for (res = arg->remote.res; res; res = res->ai_next) { + status = ruby_socket(res->ai_family,res->ai_socktype,res->ai_protocol); + syscall = "socket(2)"; + fd = status; + if (fd < 0) { + continue; + } + arg->fd = fd; + if (type == INET_SERVER) { +#if !defined(_WIN32) && !defined(__CYGWIN__) + status = 1; + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, + (char*)&status, sizeof(status)); +#endif + status = bind(fd, res->ai_addr, res->ai_addrlen); + syscall = "bind(2)"; + } + else { + if (arg->local.res) { + status = bind(fd, arg->local.res->ai_addr, arg->local.res->ai_addrlen); + syscall = "bind(2)"; + } + + if (status >= 0) { + status = ruby_connect(fd, res->ai_addr, res->ai_addrlen, + (type == INET_SOCKS)); + syscall = "connect(2)"; + } + } + + if (status < 0) { + close(fd); + arg->fd = fd = -1; + continue; + } else + break; + } + if (status < 0) { + rb_sys_fail(syscall); + } + + arg->fd = -1; + + if (type == INET_SERVER) + listen(fd, 5); + + /* create new instance */ + return init_sock(arg->sock, fd); +} + +static VALUE +init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, + VALUE local_host, VALUE local_serv, int type) +{ + struct inetsock_arg arg; + arg.sock = sock; + arg.remote.host = remote_host; + arg.remote.serv = remote_serv; + arg.remote.res = 0; + arg.local.host = local_host; + arg.local.serv = local_serv; + arg.local.res = 0; + arg.type = type; + arg.fd = -1; + return rb_ensure(init_inetsock_internal, (VALUE)&arg, + inetsock_cleanup, (VALUE)&arg); +} + +/* + * call-seq: + * TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil) + * + * Opens a TCP connection to +remote_host+ on +remote_port+. If +local_host+ + * and +local_port+ are specified, then those parameters are used on the local + * end to establish the connection. + */ +static VALUE +tcp_init(int argc, VALUE *argv, VALUE sock) +{ + VALUE remote_host, remote_serv; + VALUE local_host, local_serv; + + rb_scan_args(argc, argv, "22", &remote_host, &remote_serv, + &local_host, &local_serv); + + return init_inetsock(sock, remote_host, remote_serv, + local_host, local_serv, INET_CLIENT); +} + +#ifdef SOCKS +static VALUE +socks_init(VALUE sock, VALUE host, VALUE serv) +{ + static init = 0; + + if (init == 0) { + SOCKSinit("ruby"); + init = 1; + } + + return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS); +} + +#ifdef SOCKS5 +static VALUE +socks_s_close(VALUE sock) +{ + rb_io_t *fptr; + + if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) { + rb_raise(rb_eSecurityError, "Insecure: can't close socket"); + } + GetOpenFile(sock, fptr); + shutdown(fptr->fd, 2); + return rb_io_close(sock); +} +#endif +#endif + +struct hostent_arg { + VALUE host; + struct addrinfo* addr; + VALUE (*ipaddr)(struct sockaddr*, size_t); +}; + +static VALUE +make_hostent_internal(struct hostent_arg *arg) +{ + VALUE host = arg->host; + struct addrinfo* addr = arg->addr; + VALUE (*ipaddr)(struct sockaddr*, size_t) = arg->ipaddr; + + struct addrinfo *ai; + struct hostent *h; + VALUE ary, names; + char **pch; + const char* hostp; + char hbuf[NI_MAXHOST]; + + ary = rb_ary_new(); + if (addr->ai_canonname) { + hostp = addr->ai_canonname; + } + else { + hostp = host_str(host, hbuf, sizeof(hbuf)); + } + rb_ary_push(ary, rb_str_new2(hostp)); + + if (addr->ai_canonname && (h = gethostbyname(addr->ai_canonname))) { + names = rb_ary_new(); + if (h->h_aliases != NULL) { + for (pch = h->h_aliases; *pch; pch++) { + rb_ary_push(names, rb_str_new2(*pch)); + } + } + } + else { + names = rb_ary_new2(0); + } + rb_ary_push(ary, names); + rb_ary_push(ary, INT2NUM(addr->ai_family)); + for (ai = addr; ai; ai = ai->ai_next) { + rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen)); + } + + return ary; +} + +static VALUE +make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, size_t)) +{ + struct hostent_arg arg; + + arg.host = host; + arg.addr = addr; + arg.ipaddr = ipaddr; + return rb_ensure(make_hostent_internal, (VALUE)&arg, + RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr); +} + +static VALUE +tcp_sockaddr(struct sockaddr *addr, size_t len) +{ + return make_ipaddr(addr); +} + +static VALUE +tcp_s_gethostbyname(VALUE obj, VALUE host) +{ + rb_secure(3); + return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), + tcp_sockaddr); +} + +static VALUE +tcp_svr_init(int argc, VALUE *argv, VALUE sock) +{ + VALUE arg1, arg2; + + if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) + return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER); + else + return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER); +} + +static void +make_fd_nonblock(int fd) +{ + int flags; +#ifdef F_GETFL + flags = fcntl(fd, F_GETFL); + if (flags == -1) { + rb_sys_fail(0); + } +#else + flags = 0; +#endif + flags |= O_NONBLOCK; + if (fcntl(fd, F_SETFL, flags) == -1) { + rb_sys_fail(0); + } +} + +static VALUE +s_accept_nonblock(VALUE klass, rb_io_t *fptr, struct sockaddr *sockaddr, socklen_t *len) +{ + int fd2; + + rb_secure(3); + rb_io_set_nonblock(fptr); + fd2 = accept(fptr->fd, (struct sockaddr*)sockaddr, len); + if (fd2 < 0) { + rb_sys_fail("accept(2)"); + } + make_fd_nonblock(fd2); + return init_sock(rb_obj_alloc(klass), fd2); +} + +struct accept_arg { + int fd; + struct sockaddr *sockaddr; + socklen_t *len; +}; + +static VALUE +accept_blocking(void *data) +{ + struct accept_arg *arg = data; + return (VALUE)accept(arg->fd, arg->sockaddr, arg->len); +} + +static VALUE +s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len) +{ + int fd2; + int retry = 0; + struct accept_arg arg; + + rb_secure(3); + arg.fd = fd; + arg.sockaddr = sockaddr; + arg.len = len; + retry: + rb_thread_wait_fd(fd); + fd2 = BLOCKING_REGION(accept_blocking, &arg); + if (fd2 < 0) { + switch (errno) { + case EMFILE: + case ENFILE: + if (retry) break; + rb_gc(); + retry = 1; + goto retry; + default: + if (!rb_io_wait_readable(fd)) break; + retry = 0; + goto retry; + } + rb_sys_fail(0); + } + if (!klass) return INT2NUM(fd2); + return init_sock(rb_obj_alloc(klass), fd2); +} + +static VALUE +tcp_accept(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_storage from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(from); + return s_accept(rb_cTCPSocket, fptr->fd, + (struct sockaddr*)&from, &fromlen); +} + +/* + * call-seq: + * tcpserver.accept_nonblock => tcpsocket + * + * Accepts an incoming connection using accept(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * It returns an accepted TCPSocket for the incoming connection. + * + * === Example + * require 'socket' + * serv = TCPServer.new(2202) + * begin # emulate blocking accept + * sock = serv.accept_nonblock + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * IO.select([serv]) + * retry + * end + * # sock is an accepted socket. + * + * Refer to Socket#accept for the exceptions that may be thrown if the call + * to TCPServer#accept_nonblock fails. + * + * TCPServer#accept_nonblock may raise any error corresponding to accept(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * TCPServer#accept + * * Socket#accept + */ +static VALUE +tcp_accept_nonblock(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_storage from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(from); + return s_accept_nonblock(rb_cTCPSocket, fptr, + (struct sockaddr *)&from, &fromlen); +} + +static VALUE +tcp_sysaccept(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_storage from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(from); + return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen); +} + +#ifdef HAVE_SYS_UN_H +struct unixsock_arg { + struct sockaddr_un *sockaddr; + int fd; +}; + +static VALUE +unixsock_connect_internal(struct unixsock_arg *arg) +{ + return (VALUE)ruby_connect(arg->fd, (struct sockaddr*)arg->sockaddr, + sizeof(*arg->sockaddr), 0); +} + +static VALUE +init_unixsock(VALUE sock, VALUE path, int server) +{ + struct sockaddr_un sockaddr; + int fd, status; + rb_io_t *fptr; + + SafeStringValue(path); + fd = ruby_socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + rb_sys_fail("socket(2)"); + } + + MEMZERO(&sockaddr, struct sockaddr_un, 1); + sockaddr.sun_family = AF_UNIX; + if (sizeof(sockaddr.sun_path) <= RSTRING_LEN(path)) { + rb_raise(rb_eArgError, "too long unix socket path (max: %dbytes)", + (int)sizeof(sockaddr.sun_path)-1); + } + memcpy(sockaddr.sun_path, RSTRING_PTR(path), RSTRING_LEN(path)); + + if (server) { + status = bind(fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr)); + } + else { + int prot; + struct unixsock_arg arg; + arg.sockaddr = &sockaddr; + arg.fd = fd; + status = rb_protect((VALUE(*)(VALUE))unixsock_connect_internal, + (VALUE)&arg, &prot); + if (prot) { + close(fd); + rb_jump_tag(prot); + } + } + + if (status < 0) { + close(fd); + rb_sys_fail(sockaddr.sun_path); + } + + if (server) listen(fd, 5); + + init_sock(sock, fd); + if (server) { + GetOpenFile(sock, fptr); + fptr->pathv = rb_str_new_frozen(path); + } + + return sock; +} +#endif + +static VALUE +ip_addr(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_storage addr; + socklen_t len = sizeof addr; + + GetOpenFile(sock, fptr); + + if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0) + rb_sys_fail("getsockname(2)"); + return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP); +} + +static VALUE +ip_peeraddr(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_storage addr; + socklen_t len = sizeof addr; + + GetOpenFile(sock, fptr); + + if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0) + rb_sys_fail("getpeername(2)"); + return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP); +} + +static VALUE +ip_recvfrom(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom(sock, argc, argv, RECV_IP); +} + +static VALUE +ip_s_getaddress(VALUE obj, VALUE host) +{ + struct sockaddr_storage addr; + struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0); + + /* just take the first one */ + memcpy(&addr, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); + + return make_ipaddr((struct sockaddr*)&addr); +} + +static VALUE +udp_init(int argc, VALUE *argv, VALUE sock) +{ + VALUE arg; + int socktype = AF_INET; + int fd; + + rb_secure(3); + if (rb_scan_args(argc, argv, "01", &arg) == 1) { + socktype = NUM2INT(arg); + } + fd = ruby_socket(socktype, SOCK_DGRAM, 0); + if (fd < 0) { + rb_sys_fail("socket(2) - udp"); + } + + return init_sock(sock, fd); +} + +struct udp_arg +{ + struct addrinfo *res; + int fd; +}; + +static VALUE +udp_connect_internal(struct udp_arg *arg) +{ + int fd = arg->fd; + struct addrinfo *res; + + for (res = arg->res; res; res = res->ai_next) { + if (ruby_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) { + return Qtrue; + } + } + return Qfalse; +} + +static VALUE +udp_connect(VALUE sock, VALUE host, VALUE port) +{ + rb_io_t *fptr; + struct udp_arg arg; + VALUE ret; + + rb_secure(3); + arg.res = sock_addrinfo(host, port, SOCK_DGRAM, 0); + GetOpenFile(sock, fptr); + arg.fd = fptr->fd; + ret = rb_ensure(udp_connect_internal, (VALUE)&arg, + RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res); + if (!ret) rb_sys_fail("connect(2)"); + return INT2FIX(0); +} + +static VALUE +udp_bind(VALUE sock, VALUE host, VALUE port) +{ + rb_io_t *fptr; + struct addrinfo *res0, *res; + + rb_secure(3); + res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0); + GetOpenFile(sock, fptr); + for (res = res0; res; res = res->ai_next) { + if (bind(fptr->fd, res->ai_addr, res->ai_addrlen) < 0) { + continue; + } + freeaddrinfo(res0); + return INT2FIX(0); + } + freeaddrinfo(res0); + rb_sys_fail("bind(2)"); + return INT2FIX(0); +} + +static VALUE +udp_send(int argc, VALUE *argv, VALUE sock) +{ + VALUE flags, host, port; + rb_io_t *fptr; + int n; + struct addrinfo *res0, *res; + struct send_arg arg; + + if (argc == 2 || argc == 3) { + return bsock_send(argc, argv, sock); + } + rb_secure(4); + rb_scan_args(argc, argv, "4", &arg.mesg, &flags, &host, &port); + + StringValue(arg.mesg); + res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0); + GetOpenFile(sock, fptr); + arg.fd = fptr->fd; + arg.flags = NUM2INT(flags); + for (res = res0; res; res = res->ai_next) { + retry: + arg.to = res->ai_addr; + arg.tolen = res->ai_addrlen; + rb_thread_fd_writable(arg.fd); + n = (int)BLOCKING_REGION(sendto_blocking, &arg); + if (n >= 0) { + freeaddrinfo(res0); + return INT2FIX(n); + } + if (rb_io_wait_writable(fptr->fd)) { + goto retry; + } + } + freeaddrinfo(res0); + rb_sys_fail("sendto(2)"); + return INT2FIX(n); +} + +/* + * call-seq: + * udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr] + * udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr] + * + * Receives up to _maxlen_ bytes from +udpsocket+ using recvfrom(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * _flags_ is zero or more of the +MSG_+ options. + * The first element of the results, _mesg_, is the data received. + * The second element, _sender_inet_addr_, is an array to represent the sender address. + * + * When recvfrom(2) returns 0, + * Socket#recvfrom_nonblock returns an empty string as data. + * It means an empty packet. + * + * === Parameters + * * +maxlen+ - the number of bytes to receive from the socket + * * +flags+ - zero or more of the +MSG_+ options + * + * === Example + * require 'socket' + * s1 = UDPSocket.new + * s1.bind("127.0.0.1", 0) + * s2 = UDPSocket.new + * s2.bind("127.0.0.1", 0) + * s2.connect(*s1.addr.values_at(3,1)) + * s1.connect(*s2.addr.values_at(3,1)) + * s1.send "aaa", 0 + * IO.select([s2]) # emulate blocking recvfrom + * p s2.recvfrom_nonblock(10) #=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]] + * + * Refer to Socket#recvfrom for the exceptions that may be thrown if the call + * to _recvfrom_nonblock_ fails. + * + * UDPSocket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * Socket#recvfrom + */ +static VALUE +udp_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom_nonblock(sock, argc, argv, RECV_IP); +} + +#ifdef HAVE_SYS_UN_H +static VALUE +unix_init(VALUE sock, VALUE path) +{ + return init_unixsock(sock, path, 0); +} + +static const char* +unixpath(struct sockaddr_un *sockaddr, socklen_t len) +{ + if (sockaddr->sun_path < (char*)sockaddr + len) + return sockaddr->sun_path; + else + return ""; +} + +static VALUE +unix_path(VALUE sock) +{ + rb_io_t *fptr; + + GetOpenFile(sock, fptr); + if (NIL_P(fptr->pathv)) { + struct sockaddr_un addr; + socklen_t len = sizeof(addr); + if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0) + rb_sys_fail(0); + fptr->pathv = rb_obj_freeze(rb_str_new_cstr(unixpath(&addr, len))); + } + return rb_str_dup(fptr->pathv); +} + +static VALUE +unix_svr_init(VALUE sock, VALUE path) +{ + return init_unixsock(sock, path, 1); +} + +static VALUE +unix_recvfrom(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom(sock, argc, argv, RECV_UNIX); +} + +#if defined(HAVE_ST_MSG_CONTROL) && defined(SCM_RIGHTS) +#define FD_PASSING_BY_MSG_CONTROL 1 +#else +#define FD_PASSING_BY_MSG_CONTROL 0 +#endif + +#if defined(HAVE_ST_MSG_ACCRIGHTS) +#define FD_PASSING_BY_MSG_ACCRIGHTS 1 +#else +#define FD_PASSING_BY_MSG_ACCRIGHTS 0 +#endif + +struct iomsg_arg { + int fd; + struct msghdr msg; +}; + +static VALUE +sendmsg_blocking(void *data) +{ + struct iomsg_arg *arg = data; + return sendmsg(arg->fd, &arg->msg, 0); +} + +static VALUE +unix_send_io(VALUE sock, VALUE val) +{ +#if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS) + int fd; + rb_io_t *fptr; + struct iomsg_arg arg; + struct iovec vec[1]; + char buf[1]; + +#if FD_PASSING_BY_MSG_CONTROL + struct { + struct cmsghdr hdr; + char pad[8+sizeof(int)+8]; + } cmsg; +#endif + + if (rb_obj_is_kind_of(val, rb_cIO)) { + rb_io_t *valfptr; + GetOpenFile(val, valfptr); + fd = valfptr->fd; + } + else if (FIXNUM_P(val)) { + fd = FIX2INT(val); + } + else { + rb_raise(rb_eTypeError, "neither IO nor file descriptor"); + } + + GetOpenFile(sock, fptr); + + arg.msg.msg_name = NULL; + arg.msg.msg_namelen = 0; + + /* Linux and Solaris doesn't work if msg_iov is NULL. */ + buf[0] = '\0'; + vec[0].iov_base = buf; + vec[0].iov_len = 1; + arg.msg.msg_iov = vec; + arg.msg.msg_iovlen = 1; + +#if FD_PASSING_BY_MSG_CONTROL + arg.msg.msg_control = (caddr_t)&cmsg; + arg.msg.msg_controllen = CMSG_LEN(sizeof(int)); + arg.msg.msg_flags = 0; + MEMZERO((char*)&cmsg, char, sizeof(cmsg)); + cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int)); + cmsg.hdr.cmsg_level = SOL_SOCKET; + cmsg.hdr.cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(&cmsg.hdr) = fd; +#else + arg.msg.msg_accrights = (caddr_t)&fd; + arg.msg.msg_accrightslen = sizeof(fd); +#endif + + arg.fd = fptr->fd; + rb_thread_fd_writable(arg.fd); + if ((int)BLOCKING_REGION(sendmsg_blocking, &arg) == -1) + rb_sys_fail("sendmsg(2)"); + + return Qnil; +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +static VALUE +recvmsg_blocking(void *data) +{ + struct iomsg_arg *arg = data; + return recvmsg(arg->fd, &arg->msg, 0); +} + +static VALUE +unix_recv_io(int argc, VALUE *argv, VALUE sock) +{ +#if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS) + VALUE klass, mode; + rb_io_t *fptr; + struct iomsg_arg arg; + struct iovec vec[2]; + char buf[1]; + + int fd; +#if FD_PASSING_BY_MSG_CONTROL + struct { + struct cmsghdr hdr; + char pad[8+sizeof(int)+8]; + } cmsg; +#endif + + rb_scan_args(argc, argv, "02", &klass, &mode); + if (argc == 0) + klass = rb_cIO; + if (argc <= 1) + mode = Qnil; + + GetOpenFile(sock, fptr); + + arg.msg.msg_name = NULL; + arg.msg.msg_namelen = 0; + + vec[0].iov_base = buf; + vec[0].iov_len = sizeof(buf); + arg.msg.msg_iov = vec; + arg.msg.msg_iovlen = 1; + +#if FD_PASSING_BY_MSG_CONTROL + arg.msg.msg_control = (caddr_t)&cmsg; + arg.msg.msg_controllen = CMSG_SPACE(sizeof(int)); + arg.msg.msg_flags = 0; + cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int)); + cmsg.hdr.cmsg_level = SOL_SOCKET; + cmsg.hdr.cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(&cmsg.hdr) = -1; +#else + arg.msg.msg_accrights = (caddr_t)&fd; + arg.msg.msg_accrightslen = sizeof(fd); + fd = -1; +#endif + + arg.fd = fptr->fd; + rb_thread_wait_fd(arg.fd); + if ((int)BLOCKING_REGION(recvmsg_blocking, &arg) == -1) + rb_sys_fail("recvmsg(2)"); + +#if FD_PASSING_BY_MSG_CONTROL + if (arg.msg.msg_controllen < CMSG_LEN(sizeof(int))) { + rb_raise(rb_eSocket, + "file descriptor was not passed (msg_controllen=%d smaller than CMSG_LEN(sizeof(int))=%d)", + (int)arg.msg.msg_controllen, (int)CMSG_LEN(sizeof(int))); + } + if (CMSG_SPACE(sizeof(int)) < arg.msg.msg_controllen) { + rb_raise(rb_eSocket, + "file descriptor was not passed (msg_controllen=%d bigger than CMSG_SPACE(sizeof(int))=%d)", + (int)arg.msg.msg_controllen, (int)CMSG_SPACE(sizeof(int))); + } + if (cmsg.hdr.cmsg_len != CMSG_LEN(sizeof(int))) { + rb_raise(rb_eSocket, + "file descriptor was not passed (cmsg_len=%d, %d expected)", + (int)cmsg.hdr.cmsg_len, (int)CMSG_LEN(sizeof(int))); + } + if (cmsg.hdr.cmsg_level != SOL_SOCKET) { + rb_raise(rb_eSocket, + "file descriptor was not passed (cmsg_level=%d, %d expected)", + cmsg.hdr.cmsg_level, SOL_SOCKET); + } + if (cmsg.hdr.cmsg_type != SCM_RIGHTS) { + rb_raise(rb_eSocket, + "file descriptor was not passed (cmsg_type=%d, %d expected)", + cmsg.hdr.cmsg_type, SCM_RIGHTS); + } +#else + if (arg.msg.msg_accrightslen != sizeof(fd)) { + rb_raise(rb_eSocket, + "file descriptor was not passed (accrightslen) : %d != %d", + arg.msg.msg_accrightslen, (int)sizeof(fd)); + } +#endif + +#if FD_PASSING_BY_MSG_CONTROL + fd = *(int *)CMSG_DATA(&cmsg.hdr); +#endif + + if (klass == Qnil) + return INT2FIX(fd); + else { + ID for_fd; + int ff_argc; + VALUE ff_argv[2]; + CONST_ID(for_fd, "for_fd"); + ff_argc = mode == Qnil ? 1 : 2; + ff_argv[0] = INT2FIX(fd); + ff_argv[1] = mode; + return rb_funcall2(klass, for_fd, ff_argc, ff_argv); + } +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + +static VALUE +unix_accept(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_un from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(struct sockaddr_un); + return s_accept(rb_cUNIXSocket, fptr->fd, + (struct sockaddr*)&from, &fromlen); +} + +/* + * call-seq: + * unixserver.accept_nonblock => unixsocket + * + * Accepts an incoming connection using accept(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * It returns an accepted UNIXSocket for the incoming connection. + * + * === Example + * require 'socket' + * serv = UNIXServer.new("/tmp/sock") + * begin # emulate blocking accept + * sock = serv.accept_nonblock + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * IO.select([serv]) + * retry + * end + * # sock is an accepted socket. + * + * Refer to Socket#accept for the exceptions that may be thrown if the call + * to UNIXServer#accept_nonblock fails. + * + * UNIXServer#accept_nonblock may raise any error corresponding to accept(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * UNIXServer#accept + * * Socket#accept + */ +static VALUE +unix_accept_nonblock(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_un from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(from); + return s_accept_nonblock(rb_cUNIXSocket, fptr, + (struct sockaddr *)&from, &fromlen); +} + +static VALUE +unix_sysaccept(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_un from; + socklen_t fromlen; + + GetOpenFile(sock, fptr); + fromlen = sizeof(struct sockaddr_un); + return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen); +} + +#ifdef HAVE_SYS_UN_H +static VALUE +unixaddr(struct sockaddr_un *sockaddr, socklen_t len) +{ + return rb_assoc_new(rb_str_new2("AF_UNIX"), + rb_str_new2(unixpath(sockaddr, len))); +} +#endif + +static VALUE +unix_addr(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_un addr; + socklen_t len = sizeof addr; + + GetOpenFile(sock, fptr); + + if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0) + rb_sys_fail("getsockname(2)"); + return unixaddr(&addr, len); +} + +static VALUE +unix_peeraddr(VALUE sock) +{ + rb_io_t *fptr; + struct sockaddr_un addr; + socklen_t len = sizeof addr; + + GetOpenFile(sock, fptr); + + if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0) + rb_sys_fail("getpeername(2)"); + return unixaddr(&addr, len); +} +#endif + +static void +setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv) +{ + VALUE tmp; + char *ptr; + + tmp = rb_check_string_type(domain); + if (!NIL_P(tmp)) { + domain = tmp; + rb_check_safe_obj(domain); + ptr = RSTRING_PTR(domain); + if (strcmp(ptr, "AF_INET") == 0) + *dv = AF_INET; +#ifdef AF_UNIX + else if (strcmp(ptr, "AF_UNIX") == 0) + *dv = AF_UNIX; +#endif +#ifdef AF_ISO + else if (strcmp(ptr, "AF_ISO") == 0) + *dv = AF_ISO; +#endif +#ifdef AF_NS + else if (strcmp(ptr, "AF_NS") == 0) + *dv = AF_NS; +#endif +#ifdef AF_IMPLINK + else if (strcmp(ptr, "AF_IMPLINK") == 0) + *dv = AF_IMPLINK; +#endif +#ifdef PF_INET + else if (strcmp(ptr, "PF_INET") == 0) + *dv = PF_INET; +#endif +#ifdef PF_UNIX + else if (strcmp(ptr, "PF_UNIX") == 0) + *dv = PF_UNIX; +#endif +#ifdef PF_IMPLINK + else if (strcmp(ptr, "PF_IMPLINK") == 0) + *dv = PF_IMPLINK; + else if (strcmp(ptr, "AF_IMPLINK") == 0) + *dv = AF_IMPLINK; +#endif +#ifdef PF_AX25 + else if (strcmp(ptr, "PF_AX25") == 0) + *dv = PF_AX25; +#endif +#ifdef PF_IPX + else if (strcmp(ptr, "PF_IPX") == 0) + *dv = PF_IPX; +#endif + else + rb_raise(rb_eSocket, "unknown socket domain %s", ptr); + } + else { + *dv = NUM2INT(domain); + } + tmp = rb_check_string_type(type); + if (!NIL_P(tmp)) { + type = tmp; + rb_check_safe_obj(type); + ptr = RSTRING_PTR(type); + if (strcmp(ptr, "SOCK_STREAM") == 0) + *tv = SOCK_STREAM; + else if (strcmp(ptr, "SOCK_DGRAM") == 0) + *tv = SOCK_DGRAM; +#ifdef SOCK_RAW + else if (strcmp(ptr, "SOCK_RAW") == 0) + *tv = SOCK_RAW; +#endif +#ifdef SOCK_SEQPACKET + else if (strcmp(ptr, "SOCK_SEQPACKET") == 0) + *tv = SOCK_SEQPACKET; +#endif +#ifdef SOCK_RDM + else if (strcmp(ptr, "SOCK_RDM") == 0) + *tv = SOCK_RDM; +#endif +#ifdef SOCK_PACKET + else if (strcmp(ptr, "SOCK_PACKET") == 0) + *tv = SOCK_PACKET; +#endif + else + rb_raise(rb_eSocket, "unknown socket type %s", ptr); + } + else { + *tv = NUM2INT(type); + } +} + +static VALUE +sock_initialize(VALUE sock, VALUE domain, VALUE type, VALUE protocol) +{ + int fd; + int d, t; + + rb_secure(3); + setup_domain_and_type(domain, &d, type, &t); + fd = ruby_socket(d, t, NUM2INT(protocol)); + if (fd < 0) rb_sys_fail("socket(2)"); + + return init_sock(sock, fd); +} + +static VALUE +sock_s_socketpair(VALUE klass, VALUE domain, VALUE type, VALUE protocol) +{ +#if defined HAVE_SOCKETPAIR + int d, t, p, sp[2]; + int ret; + + setup_domain_and_type(domain, &d, type, &t); + p = NUM2INT(protocol); + ret = socketpair(d, t, p, sp); + if (ret < 0 && (errno == EMFILE || errno == ENFILE)) { + rb_gc(); + ret = socketpair(d, t, p, sp); + } + if (ret < 0) { + rb_sys_fail("socketpair(2)"); + } + + return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]), + init_sock(rb_obj_alloc(klass), sp[1])); +#else + rb_notimplement(); +#endif +} + +#ifdef HAVE_SYS_UN_H +static VALUE +unix_s_socketpair(int argc, VALUE *argv, VALUE klass) +{ + VALUE domain, type, protocol; + domain = INT2FIX(PF_UNIX); + + rb_scan_args(argc, argv, "02", &type, &protocol); + if (argc == 0) + type = INT2FIX(SOCK_STREAM); + if (argc <= 1) + protocol = INT2FIX(0); + + return sock_s_socketpair(klass, domain, type, protocol); +} +#endif + +/* + * call-seq: + * socket.connect(server_sockaddr) => 0 + * + * Requests a connection to be made on the given +server_sockaddr+. Returns 0 if + * successful, otherwise an exception is raised. + * + * === Parameter + * * +server_sockaddr+ - the +struct+ sockaddr contained in a string + * + * === Example: + * # Pull down Google's web page + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' ) + * socket.connect( sockaddr ) + * socket.write( "GET / HTTP/1.0\r\n\r\n" ) + * results = socket.read + * + * === Unix-based Exceptions + * On unix-based systems the following system exceptions may be raised if + * the call to _connect_ fails: + * * Errno::EACCES - search permission is denied for a component of the prefix + * path or write access to the +socket+ is denided + * * Errno::EADDRINUSE - the _sockaddr_ is already in use + * * Errno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the + * local machine + * * Errno::EAFNOSUPPORT - the specified _sockaddr_ is not a valid address for + * the address family of the specified +socket+ + * * Errno::EALREADY - a connection is already in progress for the specified + * socket + * * Errno::EBADF - the +socket+ is not a valid file descriptor + * * Errno::ECONNREFUSED - the target _sockaddr_ was not listening for connections + * refused the connection request + * * Errno::ECONNRESET - the remote host reset the connection request + * * Errno::EFAULT - the _sockaddr_ cannot be accessed + * * Errno::EHOSTUNREACH - the destination host cannot be reached (probably + * because the host is down or a remote router cannot reach it) + * * Errno::EINPROGRESS - the O_NONBLOCK is set for the +socket+ and the + * connection cnanot be immediately established; the connection will be + * established asynchronously + * * Errno::EINTR - the attempt to establish the connection was interrupted by + * delivery of a signal that was caught; the connection will be established + * asynchronously + * * Errno::EISCONN - the specified +socket+ is already connected + * * Errno::EINVAL - the address length used for the _sockaddr_ is not a valid + * length for the address family or there is an invalid family in _sockaddr_ + * * Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded + * PATH_MAX + * * Errno::ENETDOWN - the local interface used to reach the destination is down + * * Errno::ENETUNREACH - no route to the network is present + * * Errno::ENOBUFS - no buffer space is available + * * Errno::ENOSR - there were insufficient STREAMS resources available to + * complete the operation + * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket + * * Errno::EOPNOTSUPP - the calling +socket+ is listening and cannot be connected + * * Errno::EPROTOTYPE - the _sockaddr_ has a different type than the socket + * bound to the specified peer address + * * Errno::ETIMEDOUT - the attempt to connect time out before a connection + * was made. + * + * On unix-based systems if the address family of the calling +socket+ is + * AF_UNIX the follow exceptions may be raised if the call to _connect_ + * fails: + * * Errno::EIO - an i/o error occured while reading from or writing to the + * file system + * * Errno::ELOOP - too many symbolic links were encountered in translating + * the pathname in _sockaddr_ + * * Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX + * characters, or an entired pathname exceeded PATH_MAX characters + * * Errno::ENOENT - a component of the pathname does not name an existing file + * or the pathname is an empty string + * * Errno::ENOTDIR - a component of the path prefix of the pathname in _sockaddr_ + * is not a directory + * + * === Windows Exceptions + * On Windows systems the following system exceptions may be raised if + * the call to _connect_ fails: + * * Errno::ENETDOWN - the network is down + * * Errno::EADDRINUSE - the socket's local address is already in use + * * Errno::EINTR - the socket was cancelled + * * Errno::EINPROGRESS - a blocking socket is in progress or the service provider + * is still processing a callback function. Or a nonblocking connect call is + * in progress on the +socket+. + * * Errno::EALREADY - see Errno::EINVAL + * * Errno::EADDRNOTAVAIL - the remote address is not a valid address, such as + * ADDR_ANY TODO check ADDRANY TO INADDR_ANY + * * Errno::EAFNOSUPPORT - addresses in the specified family cannot be used with + * with this +socket+ + * * Errno::ECONNREFUSED - the target _sockaddr_ was not listening for connections + * refused the connection request + * * Errno::EFAULT - the socket's internal address or address length parameter + * is too small or is not a valid part of the user space address + * * Errno::EINVAL - the +socket+ is a listening socket + * * Errno::EISCONN - the +socket+ is already connected + * * Errno::ENETUNREACH - the network cannot be reached from this host at this time + * * Errno::EHOSTUNREACH - no route to the network is present + * * Errno::ENOBUFS - no buffer space is available + * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket + * * Errno::ETIMEDOUT - the attempt to connect time out before a connection + * was made. + * * Errno::EWOULDBLOCK - the socket is marked as nonblocking and the + * connection cannot be completed immediately + * * Errno::EACCES - the attempt to connect the datagram socket to the + * broadcast address failed + * + * === See + * * connect manual pages on unix-based systems + * * connect function in Microsoft's Winsock functions reference + */ +static VALUE +sock_connect(VALUE sock, VALUE addr) +{ + rb_io_t *fptr; + int fd, n; + + StringValue(addr); + addr = rb_str_new4(addr); + GetOpenFile(sock, fptr); + fd = fptr->fd; + n = ruby_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LEN(addr), 0); + if (n < 0) { + rb_sys_fail("connect(2)"); + } + + return INT2FIX(n); +} + +/* + * call-seq: + * socket.connect_nonblock(server_sockaddr) => 0 + * + * Requests a connection to be made on the given +server_sockaddr+ after + * O_NONBLOCK is set for the underlying file descriptor. + * Returns 0 if successful, otherwise an exception is raised. + * + * === Parameter + * * +server_sockaddr+ - the +struct+ sockaddr contained in a string + * + * === Example: + * # Pull down Google's web page + * require 'socket' + * include Socket::Constants + * socket = Socket.new(AF_INET, SOCK_STREAM, 0) + * sockaddr = Socket.sockaddr_in(80, 'www.google.com') + * begin # emulate blocking connect + * socket.connect_nonblock(sockaddr) + * rescue Errno::EINPROGRESS + * IO.select(nil, [socket]) + * begin + * socket.connect_nonblock(sockaddr) + * rescue Errno::EISCONN + * end + * end + * socket.write("GET / HTTP/1.0\r\n\r\n") + * results = socket.read + * + * Refer to Socket#connect for the exceptions that may be thrown if the call + * to _connect_nonblock_ fails. + * + * Socket#connect_nonblock may raise any error corresponding to connect(2) failure, + * including Errno::EINPROGRESS. + * + * === See + * * Socket#connect + */ +static VALUE +sock_connect_nonblock(VALUE sock, VALUE addr) +{ + rb_io_t *fptr; + int n; + + StringValue(addr); + addr = rb_str_new4(addr); + GetOpenFile(sock, fptr); + rb_io_set_nonblock(fptr); + n = connect(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LEN(addr)); + if (n < 0) { + rb_sys_fail("connect(2)"); + } + + return INT2FIX(n); +} + +/* + * call-seq: + * socket.bind(server_sockaddr) => 0 + * + * Binds to the given +struct+ sockaddr. + * + * === Parameter + * * +server_sockaddr+ - the +struct+ sockaddr contained in a string + * + * === Example + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.bind( sockaddr ) + * + * === Unix-based Exceptions + * On unix-based based systems the following system exceptions may be raised if + * the call to _bind_ fails: + * * Errno::EACCES - the specified _sockaddr_ is protected and the current + * user does not have permission to bind to it + * * Errno::EADDRINUSE - the specified _sockaddr_ is already in use + * * Errno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the + * local machine + * * Errno::EAFNOSUPPORT - the specified _sockaddr_ isnot a valid address for + * the family of the calling +socket+ + * * Errno::EBADF - the _sockaddr_ specified is not a valid file descriptor + * * Errno::EFAULT - the _sockaddr_ argument cannot be accessed + * * Errno::EINVAL - the +socket+ is already bound to an address, and the + * protocol does not support binding to the new _sockaddr_ or the +socket+ + * has been shut down. + * * Errno::EINVAL - the address length is not a valid length for the address + * family + * * Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded + * PATH_MAX + * * Errno::ENOBUFS - no buffer space is available + * * Errno::ENOSR - there were insufficient STREAMS resources available to + * complete the operation + * * Errno::ENOTSOCK - the +socket+ does not refer to a socket + * * Errno::EOPNOTSUPP - the socket type of the +socket+ does not support + * binding to an address + * + * On unix-based based systems if the address family of the calling +socket+ is + * Socket::AF_UNIX the follow exceptions may be raised if the call to _bind_ + * fails: + * * Errno::EACCES - search permission is denied for a component of the prefix + * path or write access to the +socket+ is denided + * * Errno::EDESTADDRREQ - the _sockaddr_ argument is a null pointer + * * Errno::EISDIR - same as Errno::EDESTADDRREQ + * * Errno::EIO - an i/o error occurred + * * Errno::ELOOP - too many symbolic links were encountered in translating + * the pathname in _sockaddr_ + * * Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX + * characters, or an entired pathname exceeded PATH_MAX characters + * * Errno::ENOENT - a component of the pathname does not name an existing file + * or the pathname is an empty string + * * Errno::ENOTDIR - a component of the path prefix of the pathname in _sockaddr_ + * is not a directory + * * Errno::EROFS - the name would reside on a read only filesystem + * + * === Windows Exceptions + * On Windows systems the following system exceptions may be raised if + * the call to _bind_ fails: + * * Errno::ENETDOWN-- the network is down + * * Errno::EACCES - the attempt to connect the datagram socket to the + * broadcast address failed + * * Errno::EADDRINUSE - the socket's local address is already in use + * * Errno::EADDRNOTAVAIL - the specified address is not a valid address for this + * computer + * * Errno::EFAULT - the socket's internal address or address length parameter + * is too small or is not a valid part of the user space addressed + * * Errno::EINVAL - the +socket+ is already bound to an address + * * Errno::ENOBUFS - no buffer space is available + * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket + * + * === See + * * bind manual pages on unix-based systems + * * bind function in Microsoft's Winsock functions reference + */ +static VALUE +sock_bind(VALUE sock, VALUE addr) +{ + rb_io_t *fptr; + + StringValue(addr); + GetOpenFile(sock, fptr); + if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LEN(addr)) < 0) + rb_sys_fail("bind(2)"); + + return INT2FIX(0); +} + +/* + * call-seq: + * socket.listen( int ) => 0 + * + * Listens for connections, using the specified +int+ as the backlog. A call + * to _listen_ only applies if the +socket+ is of type SOCK_STREAM or + * SOCK_SEQPACKET. + * + * === Parameter + * * +backlog+ - the maximum length of the queue for pending connections. + * + * === Example 1 + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.bind( sockaddr ) + * socket.listen( 5 ) + * + * === Example 2 (listening on an arbitary port, unix-based systems only): + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * socket.listen( 1 ) + * + * === Unix-based Exceptions + * On unix based systems the above will work because a new +sockaddr+ struct + * is created on the address ADDR_ANY, for an arbitrary port number as handed + * off by the kernel. It will not work on Windows, because Windows requires that + * the +socket+ is bound by calling _bind_ before it can _listen_. + * + * If the _backlog_ amount exceeds the implementation-dependent maximum + * queue length, the implementation's maximum queue length will be used. + * + * On unix-based based systems the following system exceptions may be raised if the + * call to _listen_ fails: + * * Errno::EBADF - the _socket_ argument is not a valid file descriptor + * * Errno::EDESTADDRREQ - the _socket_ is not bound to a local address, and + * the protocol does not support listening on an unbound socket + * * Errno::EINVAL - the _socket_ is already connected + * * Errno::ENOTSOCK - the _socket_ argument does not refer to a socket + * * Errno::EOPNOTSUPP - the _socket_ protocol does not support listen + * * Errno::EACCES - the calling process does not have approriate privileges + * * Errno::EINVAL - the _socket_ has been shut down + * * Errno::ENOBUFS - insufficient resources are available in the system to + * complete the call + * + * === Windows Exceptions + * On Windows systems the following system exceptions may be raised if + * the call to _listen_ fails: + * * Errno::ENETDOWN - the network is down + * * Errno::EADDRINUSE - the socket's local address is already in use. This + * usually occurs during the execution of _bind_ but could be delayed + * if the call to _bind_ was to a partially wildcard address (involving + * ADDR_ANY) and if a specific address needs to be commmitted at the + * time of the call to _listen_ + * * Errno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the + * service provider is still processing a callback function + * * Errno::EINVAL - the +socket+ has not been bound with a call to _bind_. + * * Errno::EISCONN - the +socket+ is already connected + * * Errno::EMFILE - no more socket descriptors are available + * * Errno::ENOBUFS - no buffer space is available + * * Errno::ENOTSOC - +socket+ is not a socket + * * Errno::EOPNOTSUPP - the referenced +socket+ is not a type that supports + * the _listen_ method + * + * === See + * * listen manual pages on unix-based systems + * * listen function in Microsoft's Winsock functions reference + */ +static VALUE +sock_listen(VALUE sock, VALUE log) +{ + rb_io_t *fptr; + int backlog; + + rb_secure(4); + backlog = NUM2INT(log); + GetOpenFile(sock, fptr); + if (listen(fptr->fd, backlog) < 0) + rb_sys_fail("listen(2)"); + + return INT2FIX(0); +} + +/* + * call-seq: + * socket.recvfrom(maxlen) => [mesg, sender_sockaddr] + * socket.recvfrom(maxlen, flags) => [mesg, sender_sockaddr] + * + * Receives up to _maxlen_ bytes from +socket+. _flags_ is zero or more + * of the +MSG_+ options. The first element of the results, _mesg_, is the data + * received. The second element, _sender_sockaddr_, contains protocol-specific information + * on the sender. + * + * === Parameters + * * +maxlen+ - the number of bytes to receive from the socket + * * +flags+ - zero or more of the +MSG_+ options + * + * === Example + * # In one file, start this first + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.bind( sockaddr ) + * socket.listen( 5 ) + * client, client_sockaddr = socket.accept + * data = client.recvfrom( 20 )[0].chomp + * puts "I only received 20 bytes '#{data}'" + * sleep 1 + * socket.close + * + * # In another file, start this second + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.connect( sockaddr ) + * socket.puts "Watch this get cut short!" + * socket.close + * + * === Unix-based Exceptions + * On unix-based based systems the following system exceptions may be raised if the + * call to _recvfrom_ fails: + * * Errno::EAGAIN - the +socket+ file descriptor is marked as O_NONBLOCK and no + * data is waiting to be received; or MSG_OOB is set and no out-of-band data + * is available and either the +socket+ file descriptor is marked as + * O_NONBLOCK or the +socket+ does not support blocking to wait for + * out-of-band-data + * * Errno::EWOULDBLOCK - see Errno::EAGAIN + * * Errno::EBADF - the +socket+ is not a valid file descriptor + * * Errno::ECONNRESET - a connection was forcibly closed by a peer + * * Errno::EFAULT - the socket's internal buffer, address or address length + * cannot be accessed or written + * * Errno::EINTR - a signal interupted _recvfrom_ before any data was available + * * Errno::EINVAL - the MSG_OOB flag is set and no out-of-band data is available + * * Errno::EIO - an i/o error occurred while reading from or writing to the + * filesystem + * * Errno::ENOBUFS - insufficient resources were available in the system to + * perform the operation + * * Errno::ENOMEM - insufficient memory was available to fulfill the request + * * Errno::ENOSR - there were insufficient STREAMS resources available to + * complete the operation + * * Errno::ENOTCONN - a receive is attempted on a connection-mode socket that + * is not connected + * * Errno::ENOTSOCK - the +socket+ does not refer to a socket + * * Errno::EOPNOTSUPP - the specified flags are not supported for this socket type + * * Errno::ETIMEDOUT - the connection timed out during connection establishment + * or due to a transmission timeout on an active connection + * + * === Windows Exceptions + * On Windows systems the following system exceptions may be raised if + * the call to _recvfrom_ fails: + * * Errno::ENETDOWN - the network is down + * * Errno::EFAULT - the internal buffer and from parameters on +socket+ are not + * part of the user address space, or the internal fromlen parameter is + * too small to accomodate the peer address + * * Errno::EINTR - the (blocking) call was cancelled by an internal call to + * the WinSock function WSACancelBlockingCall + * * Errno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or + * the service provider is still processing a callback function + * * Errno::EINVAL - +socket+ has not been bound with a call to _bind_, or an + * unknown flag was specified, or MSG_OOB was specified for a socket with + * SO_OOBINLINE enabled, or (for byte stream-style sockets only) the internal + * len parameter on +socket+ was zero or negative + * * Errno::EISCONN - +socket+ is already connected. The call to _recvfrom_ is + * not permitted with a connected socket on a socket that is connetion + * oriented or connectionless. + * * Errno::ENETRESET - the connection has been broken due to the keep-alive + * activity detecting a failure while the operation was in progress. + * * Errno::EOPNOTSUPP - MSG_OOB was specified, but +socket+ is not stream-style + * such as type SOCK_STREAM. OOB data is not supported in the communication + * domain associated with +socket+, or +socket+ is unidirectional and + * supports only send operations + * * Errno::ESHUTDOWN - +socket+ has been shutdown. It is not possible to + * call _recvfrom_ on a socket after _shutdown_ has been invoked. + * * Errno::EWOULDBLOCK - +socket+ is marked as nonblocking and a call to + * _recvfrom_ would block. + * * Errno::EMSGSIZE - the message was too large to fit into the specified buffer + * and was truncated. + * * Errno::ETIMEDOUT - the connection has been dropped, because of a network + * failure or because the system on the other end went down without + * notice + * * Errno::ECONNRESET - the virtual circuit was reset by the remote side + * executing a hard or abortive close. The application should close the + * socket; it is no longer usable. On a UDP-datagram socket this error + * indicates a previous send operation resulted in an ICMP Port Unreachable + * message. + */ +static VALUE +sock_recvfrom(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom(sock, argc, argv, RECV_SOCKET); +} + +/* + * call-seq: + * socket.recvfrom_nonblock(maxlen) => [mesg, sender_sockaddr] + * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_sockaddr] + * + * Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * _flags_ is zero or more of the +MSG_+ options. + * The first element of the results, _mesg_, is the data received. + * The second element, _sender_sockaddr_, contains protocol-specific information + * on the sender. + * + * When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns + * an empty string as data. + * The meaning depends on the socket: EOF on TCP, empty packet on UDP, etc. + * + * === Parameters + * * +maxlen+ - the number of bytes to receive from the socket + * * +flags+ - zero or more of the +MSG_+ options + * + * === Example + * # In one file, start this first + * require 'socket' + * include Socket::Constants + * socket = Socket.new(AF_INET, SOCK_STREAM, 0) + * sockaddr = Socket.sockaddr_in(2200, 'localhost') + * socket.bind(sockaddr) + * socket.listen(5) + * client, client_sockaddr = socket.accept + * begin # emulate blocking recvfrom + * pair = client.recvfrom_nonblock(20) + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK + * IO.select([client]) + * retry + * end + * data = pair[0].chomp + * puts "I only received 20 bytes '#{data}'" + * sleep 1 + * socket.close + * + * # In another file, start this second + * require 'socket' + * include Socket::Constants + * socket = Socket.new(AF_INET, SOCK_STREAM, 0) + * sockaddr = Socket.sockaddr_in(2200, 'localhost') + * socket.connect(sockaddr) + * socket.puts "Watch this get cut short!" + * socket.close + * + * Refer to Socket#recvfrom for the exceptions that may be thrown if the call + * to _recvfrom_nonblock_ fails. + * + * Socket#recvfrom_nonblock may raise any error corresponding to recvfrom(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * Socket#recvfrom + */ +static VALUE +sock_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock) +{ + return s_recvfrom_nonblock(sock, argc, argv, RECV_SOCKET); +} + +static VALUE +sock_accept(VALUE sock) +{ + rb_io_t *fptr; + VALUE sock2; + char buf[1024]; + socklen_t len = sizeof buf; + + GetOpenFile(sock, fptr); + sock2 = s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)buf,&len); + + return rb_assoc_new(sock2, rb_str_new(buf, len)); +} + +/* + * call-seq: + * socket.accept_nonblock => [client_socket, client_sockaddr] + * + * Accepts an incoming connection using accept(2) after + * O_NONBLOCK is set for the underlying file descriptor. + * It returns an array containg the accpeted socket + * for the incoming connection, _client_socket_, + * and a string that contains the +struct+ sockaddr information + * about the caller, _client_sockaddr_. + * + * === Example + * # In one script, start this first + * require 'socket' + * include Socket::Constants + * socket = Socket.new(AF_INET, SOCK_STREAM, 0) + * sockaddr = Socket.sockaddr_in(2200, 'localhost') + * socket.bind(sockaddr) + * socket.listen(5) + * begin # emulate blocking accept + * client_socket, client_sockaddr = socket.accept_nonblock + * rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR + * IO.select([socket]) + * retry + * end + * puts "The client said, '#{client_socket.readline.chomp}'" + * client_socket.puts "Hello from script one!" + * socket.close + * + * # In another script, start this second + * require 'socket' + * include Socket::Constants + * socket = Socket.new(AF_INET, SOCK_STREAM, 0) + * sockaddr = Socket.sockaddr_in(2200, 'localhost') + * socket.connect(sockaddr) + * socket.puts "Hello from script 2." + * puts "The server said, '#{socket.readline.chomp}'" + * socket.close + * + * Refer to Socket#accept for the exceptions that may be thrown if the call + * to _accept_nonblock_ fails. + * + * Socket#accept_nonblock may raise any error corresponding to accept(2) failure, + * including Errno::EWOULDBLOCK. + * + * === See + * * Socket#accept + */ +static VALUE +sock_accept_nonblock(VALUE sock) +{ + rb_io_t *fptr; + VALUE sock2; + char buf[1024]; + socklen_t len = sizeof buf; + + GetOpenFile(sock, fptr); + sock2 = s_accept_nonblock(rb_cSocket, fptr, (struct sockaddr *)buf, &len); + return rb_assoc_new(sock2, rb_str_new(buf, len)); +} + +/* + * call-seq: + * socket.sysaccept => [client_socket_fd, client_sockaddr] + * + * Accepts an incoming connection returnings an array containg the (integer) + * file descriptor for the incoming connection, _client_socket_fd_, + * and a string that contains the +struct+ sockaddr information + * about the caller, _client_sockaddr_. + * + * === Example + * # In one script, start this first + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.bind( sockaddr ) + * socket.listen( 5 ) + * client_fd, client_sockaddr = socket.sysaccept + * client_socket = Socket.for_fd( client_fd ) + * puts "The client said, '#{client_socket.readline.chomp}'" + * client_socket.puts "Hello from script one!" + * socket.close + * + * # In another script, start this second + * require 'socket' + * include Socket::Constants + * socket = Socket.new( AF_INET, SOCK_STREAM, 0 ) + * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' ) + * socket.connect( sockaddr ) + * socket.puts "Hello from script 2." + * puts "The server said, '#{socket.readline.chomp}'" + * socket.close + * + * Refer to Socket#accept for the exceptions that may be thrown if the call + * to _sysaccept_ fails. + * + * === See + * * Socket#accept + */ +static VALUE +sock_sysaccept(VALUE sock) +{ + rb_io_t *fptr; + VALUE sock2; + char buf[1024]; + socklen_t len = sizeof buf; + + GetOpenFile(sock, fptr); + sock2 = s_accept(0,fptr->fd,(struct sockaddr*)buf,&len); + + return rb_assoc_new(sock2, rb_str_new(buf, len)); +} + +#ifdef HAVE_GETHOSTNAME +static VALUE +sock_gethostname(VALUE obj) +{ + char buf[1024]; + + rb_secure(3); + if (gethostname(buf, (int)sizeof buf - 1) < 0) + rb_sys_fail("gethostname"); + + buf[sizeof buf - 1] = '\0'; + return rb_str_new2(buf); +} +#else +#ifdef HAVE_UNAME + +#include + +static VALUE +sock_gethostname(VALUE obj) +{ + struct utsname un; + + rb_secure(3); + uname(&un); + return rb_str_new2(un.nodename); +} +#else +static VALUE +sock_gethostname(VALUE obj) +{ + rb_notimplement(); +} +#endif +#endif + +static VALUE +make_addrinfo(struct addrinfo *res0) +{ + VALUE base, ary; + struct addrinfo *res; + + if (res0 == NULL) { + rb_raise(rb_eSocket, "host not found"); + } + base = rb_ary_new(); + for (res = res0; res; res = res->ai_next) { + ary = ipaddr(res->ai_addr, do_not_reverse_lookup); + if (res->ai_canonname) { + RARRAY_PTR(ary)[2] = rb_str_new2(res->ai_canonname); + } + rb_ary_push(ary, INT2FIX(res->ai_family)); + rb_ary_push(ary, INT2FIX(res->ai_socktype)); + rb_ary_push(ary, INT2FIX(res->ai_protocol)); + rb_ary_push(base, ary); + } + return base; +} + +static VALUE +sock_sockaddr(struct sockaddr *addr, size_t len) +{ + char *ptr; + + switch (addr->sa_family) { + case AF_INET: + ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr; + len = sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr); + break; +#ifdef INET6 + case AF_INET6: + ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr; + len = sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr); + break; +#endif + default: + rb_raise(rb_eSocket, "unknown socket family:%d", addr->sa_family); + break; + } + return rb_str_new(ptr, len); +} + +static VALUE +sock_s_gethostbyname(VALUE obj, VALUE host) +{ + rb_secure(3); + return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr); +} + +static VALUE +sock_s_gethostbyaddr(int argc, VALUE *argv) +{ + VALUE addr, type; + struct hostent *h; + struct sockaddr *sa; + char **pch; + VALUE ary, names; + int t = AF_INET; + + rb_scan_args(argc, argv, "11", &addr, &type); + sa = (struct sockaddr*)StringValuePtr(addr); + if (!NIL_P(type)) { + t = NUM2INT(type); + } +#ifdef INET6 + else if (RSTRING_LEN(addr) == 16) { + t = AF_INET6; + } +#endif + h = gethostbyaddr(RSTRING_PTR(addr), RSTRING_LEN(addr), t); + if (h == NULL) { +#ifdef HAVE_HSTRERROR + extern int h_errno; + rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno)); +#else + rb_raise(rb_eSocket, "host not found"); +#endif + } + ary = rb_ary_new(); + rb_ary_push(ary, rb_str_new2(h->h_name)); + names = rb_ary_new(); + rb_ary_push(ary, names); + if (h->h_aliases != NULL) { + for (pch = h->h_aliases; *pch; pch++) { + rb_ary_push(names, rb_str_new2(*pch)); + } + } + rb_ary_push(ary, INT2NUM(h->h_addrtype)); +#ifdef h_addr + for (pch = h->h_addr_list; *pch; pch++) { + rb_ary_push(ary, rb_str_new(*pch, h->h_length)); + } +#else + rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length)); +#endif + + return ary; +} + +static VALUE +sock_s_getservbyname(int argc, VALUE *argv) +{ + VALUE service, proto; + struct servent *sp; + int port; + const char *servicename, *protoname = "tcp"; + + rb_scan_args(argc, argv, "11", &service, &proto); + StringValue(service); + if (!NIL_P(proto)) StringValue(proto); + servicename = StringValueCStr(service); + if (!NIL_P(proto)) protoname = StringValueCStr(proto); + sp = getservbyname(servicename, protoname); + if (sp) { + port = ntohs(sp->s_port); + } + else { + char *end; + + port = STRTOUL(servicename, &end, 0); + if (*end != '\0') { + rb_raise(rb_eSocket, "no such service %s/%s", servicename, protoname); + } + } + return INT2FIX(port); +} + +static VALUE +sock_s_getservbyport(int argc, VALUE *argv) +{ + VALUE port, proto; + struct servent *sp; + long portnum; + const char *protoname = "tcp"; + + rb_scan_args(argc, argv, "11", &port, &proto); + portnum = NUM2LONG(port); + if (portnum != (uint16_t)portnum) { + const char *s = portnum > 0 ? "big" : "small"; + rb_raise(rb_eRangeError, "integer %ld too %s to convert into `int16_t'", portnum, s); + } + if (!NIL_P(proto)) protoname = StringValueCStr(proto); + + sp = getservbyport((int)htons((uint16_t)portnum), protoname); + if (!sp) { + rb_raise(rb_eSocket, "no such service for port %d/%s", (int)portnum, protoname); + } + return rb_tainted_str_new2(sp->s_name); +} + +static VALUE +sock_s_getaddrinfo(int argc, VALUE *argv) +{ + VALUE host, port, family, socktype, protocol, flags, ret; + char *ap; + struct addrinfo hints, *res; + + rb_scan_args(argc, argv, "24", &host, &port, &family, &socktype, &protocol, &flags); + + MEMZERO(&hints, struct addrinfo, 1); + if (NIL_P(family)) { + hints.ai_family = PF_UNSPEC; + } + else if (FIXNUM_P(family)) { + hints.ai_family = FIX2INT(family); + } + else if ((ap = StringValuePtr(family)) != 0) { + if (strcmp(ap, "AF_INET") == 0) { + hints.ai_family = PF_INET; + } +#ifdef INET6 + else if (strcmp(ap, "AF_INET6") == 0) { + hints.ai_family = PF_INET6; + } +#endif + } + + if (!NIL_P(socktype)) { + hints.ai_socktype = NUM2INT(socktype); + } + if (!NIL_P(protocol)) { + hints.ai_protocol = NUM2INT(protocol); + } + if (!NIL_P(flags)) { + hints.ai_flags = NUM2INT(flags); + } + res = sock_getaddrinfo(host, port, &hints); + + ret = make_addrinfo(res); + freeaddrinfo(res); + return ret; +} + +static VALUE +sock_s_getnameinfo(int argc, VALUE *argv) +{ + VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp; + char *hptr, *pptr; + char hbuf[1024], pbuf[1024]; + int fl; + struct addrinfo hints, *res = NULL, *r; + int error; + struct sockaddr_storage ss; + struct sockaddr *sap; + char *ap; + + sa = flags = Qnil; + rb_scan_args(argc, argv, "11", &sa, &flags); + + fl = 0; + if (!NIL_P(flags)) { + fl = NUM2INT(flags); + } + tmp = rb_check_string_type(sa); + if (!NIL_P(tmp)) { + sa = tmp; + if (sizeof(ss) < RSTRING_LEN(sa)) { + rb_raise(rb_eTypeError, "sockaddr length too big"); + } + memcpy(&ss, RSTRING_PTR(sa), RSTRING_LEN(sa)); + if (RSTRING_LEN(sa) != SA_LEN((struct sockaddr*)&ss)) { + rb_raise(rb_eTypeError, "sockaddr size differs - should not happen"); + } + sap = (struct sockaddr*)&ss; + goto call_nameinfo; + } + tmp = rb_check_array_type(sa); + if (!NIL_P(tmp)) { + sa = tmp; + MEMZERO(&hints, struct addrinfo, 1); + if (RARRAY_LEN(sa) == 3) { + af = RARRAY_PTR(sa)[0]; + port = RARRAY_PTR(sa)[1]; + host = RARRAY_PTR(sa)[2]; + } + else if (RARRAY_LEN(sa) >= 4) { + af = RARRAY_PTR(sa)[0]; + port = RARRAY_PTR(sa)[1]; + host = RARRAY_PTR(sa)[3]; + if (NIL_P(host)) { + host = RARRAY_PTR(sa)[2]; + } + else { + /* + * 4th element holds numeric form, don't resolve. + * see ipaddr(). + */ +#ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */ + hints.ai_flags |= AI_NUMERICHOST; +#endif + } + } + else { + rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given", + RARRAY_LEN(sa)); + } + /* host */ + if (NIL_P(host)) { + hptr = NULL; + } + else { + strncpy(hbuf, StringValuePtr(host), sizeof(hbuf)); + hbuf[sizeof(hbuf) - 1] = '\0'; + hptr = hbuf; + } + /* port */ + if (NIL_P(port)) { + strcpy(pbuf, "0"); + pptr = NULL; + } + else if (FIXNUM_P(port)) { + snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port)); + pptr = pbuf; + } + else { + strncpy(pbuf, StringValuePtr(port), sizeof(pbuf)); + pbuf[sizeof(pbuf) - 1] = '\0'; + pptr = pbuf; + } + hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM; + /* af */ + if (NIL_P(af)) { + hints.ai_family = PF_UNSPEC; + } + else if (FIXNUM_P(af)) { + hints.ai_family = FIX2INT(af); + } + else if ((ap = StringValuePtr(af)) != 0) { + if (strcmp(ap, "AF_INET") == 0) { + hints.ai_family = PF_INET; + } +#ifdef INET6 + else if (strcmp(ap, "AF_INET6") == 0) { + hints.ai_family = PF_INET6; + } +#endif + } + error = getaddrinfo(hptr, pptr, &hints, &res); + if (error) goto error_exit_addr; + sap = res->ai_addr; + } + else { + rb_raise(rb_eTypeError, "expecting String or Array"); + } + + call_nameinfo: + error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf), + pbuf, sizeof(pbuf), fl); + if (error) goto error_exit_name; + if (res) { + for (r = res->ai_next; r; r = r->ai_next) { + char hbuf2[1024], pbuf2[1024]; + + sap = r->ai_addr; + error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2), + pbuf2, sizeof(pbuf2), fl); + if (error) goto error_exit_name; + if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) { + freeaddrinfo(res); + rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename"); + } + } + freeaddrinfo(res); + } + return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf)); + + error_exit_addr: + if (res) freeaddrinfo(res); + raise_socket_error("getaddrinfo", error); + + error_exit_name: + if (res) freeaddrinfo(res); + raise_socket_error("getnameinfo", error); +} + +static VALUE +sock_s_pack_sockaddr_in(VALUE self, VALUE port, VALUE host) +{ + struct addrinfo *res = sock_addrinfo(host, port, 0, 0); + VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen); + + freeaddrinfo(res); + OBJ_INFECT(addr, port); + OBJ_INFECT(addr, host); + + return addr; +} + +static VALUE +sock_s_unpack_sockaddr_in(VALUE self, VALUE addr) +{ + struct sockaddr_in * sockaddr; + VALUE host; + + sockaddr = (struct sockaddr_in*)StringValuePtr(addr); + if (((struct sockaddr *)sockaddr)->sa_family != AF_INET +#ifdef INET6 + && ((struct sockaddr *)sockaddr)->sa_family != AF_INET6 +#endif + ) { +#ifdef INET6 + rb_raise(rb_eArgError, "not an AF_INET/AF_INET6 sockaddr"); +#else + rb_raise(rb_eArgError, "not an AF_INET sockaddr"); +#endif + } + host = make_ipaddr((struct sockaddr*)sockaddr); + OBJ_INFECT(host, addr); + return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host); +} + +#ifdef HAVE_SYS_UN_H +static VALUE +sock_s_pack_sockaddr_un(VALUE self, VALUE path) +{ + struct sockaddr_un sockaddr; + char *sun_path; + VALUE addr; + + MEMZERO(&sockaddr, struct sockaddr_un, 1); + sockaddr.sun_family = AF_UNIX; + sun_path = StringValueCStr(path); + if (sizeof(sockaddr.sun_path) <= strlen(sun_path)) { + rb_raise(rb_eArgError, "too long unix socket path (max: %dbytes)", + (int)sizeof(sockaddr.sun_path)-1); + } + strncpy(sockaddr.sun_path, sun_path, sizeof(sockaddr.sun_path)-1); + addr = rb_str_new((char*)&sockaddr, sizeof(sockaddr)); + OBJ_INFECT(addr, path); + + return addr; +} + +static VALUE +sock_s_unpack_sockaddr_un(VALUE self, VALUE addr) +{ + struct sockaddr_un * sockaddr; + const char *sun_path; + VALUE path; + + sockaddr = (struct sockaddr_un*)StringValuePtr(addr); + if (((struct sockaddr *)sockaddr)->sa_family != AF_UNIX) { + rb_raise(rb_eArgError, "not an AF_UNIX sockaddr"); + } + if (sizeof(struct sockaddr_un) < RSTRING_LEN(addr)) { + rb_raise(rb_eTypeError, "too long sockaddr_un - %ld longer than %d", + RSTRING_LEN(addr), (int)sizeof(struct sockaddr_un)); + } + sun_path = unixpath(sockaddr, RSTRING_LEN(addr)); + if (sizeof(struct sockaddr_un) == RSTRING_LEN(addr) && + sun_path == sockaddr->sun_path && + sun_path + strlen(sun_path) == RSTRING_PTR(addr) + RSTRING_LEN(addr)) { + rb_raise(rb_eArgError, "sockaddr_un.sun_path not NUL terminated"); + } + path = rb_str_new2(sun_path); + OBJ_INFECT(path, addr); + return path; +} +#endif + +static void +sock_define_const(const char *name, int value, VALUE mConst) +{ + rb_define_const(rb_cSocket, name, INT2FIX(value)); + rb_define_const(mConst, name, INT2FIX(value)); +} +#define sock_define_const(name, value) sock_define_const(name, value, mConst) + +/* + * Class +Socket+ provides access to the underlying operating system + * socket implementations. It can be used to provide more operating system + * specific functionality than the protocol-specific socket classes but at the + * expense of greater complexity. In particular, the class handles addresses + * using +struct+ sockaddr structures packed into Ruby strings, which can be + * a joy to manipulate. + * + * === Exception Handling + * Ruby's implementation of +Socket+ causes an exception to be raised + * based on the error generated by the system dependent implementation. + * This is why the methods are documented in a way that isolate + * Unix-based system exceptions from Windows based exceptions. If more + * information on particular exception is needed please refer to the + * Unix manual pages or the Windows WinSock reference. + * + * + * === Documentation by + * * Zach Dennis + * * Sam Roberts + * * Programming Ruby from The Pragmatic Bookshelf. + * + * Much material in this documentation is taken with permission from + * Programming Ruby from The Pragmatic Bookshelf. + */ +void +Init_socket() +{ + VALUE mConst; + + rb_eSocket = rb_define_class("SocketError", rb_eStandardError); + + rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO); + rb_undef_method(rb_cBasicSocket, "initialize"); + + rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup", + bsock_do_not_rev_lookup, 0); + rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup=", + bsock_do_not_rev_lookup_set, 1); + rb_define_singleton_method(rb_cBasicSocket, "for_fd", bsock_s_for_fd, 1); + + rb_define_method(rb_cBasicSocket, "close_read", bsock_close_read, 0); + rb_define_method(rb_cBasicSocket, "close_write", bsock_close_write, 0); + rb_define_method(rb_cBasicSocket, "shutdown", bsock_shutdown, -1); + rb_define_method(rb_cBasicSocket, "setsockopt", bsock_setsockopt, 3); + rb_define_method(rb_cBasicSocket, "getsockopt", bsock_getsockopt, 2); + rb_define_method(rb_cBasicSocket, "getsockname", bsock_getsockname, 0); + rb_define_method(rb_cBasicSocket, "getpeername", bsock_getpeername, 0); + rb_define_method(rb_cBasicSocket, "send", bsock_send, -1); + rb_define_method(rb_cBasicSocket, "recv", bsock_recv, -1); + rb_define_method(rb_cBasicSocket, "recv_nonblock", bsock_recv_nonblock, -1); + rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup", bsock_do_not_reverse_lookup, 0); + rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup=", bsock_do_not_reverse_lookup_set, 1); + + rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket); + rb_define_method(rb_cIPSocket, "addr", ip_addr, 0); + rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, 0); + rb_define_method(rb_cIPSocket, "recvfrom", ip_recvfrom, -1); + rb_define_singleton_method(rb_cIPSocket, "getaddress", ip_s_getaddress, 1); + + rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket); + rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1); + rb_define_method(rb_cTCPSocket, "initialize", tcp_init, -1); + +#ifdef SOCKS + rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket); + rb_define_method(rb_cSOCKSSocket, "initialize", socks_init, 2); +#ifdef SOCKS5 + rb_define_method(rb_cSOCKSSocket, "close", socks_s_close, 0); +#endif +#endif + + rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket); + rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0); + rb_define_method(rb_cTCPServer, "accept_nonblock", tcp_accept_nonblock, 0); + rb_define_method(rb_cTCPServer, "sysaccept", tcp_sysaccept, 0); + rb_define_method(rb_cTCPServer, "initialize", tcp_svr_init, -1); + rb_define_method(rb_cTCPServer, "listen", sock_listen, 1); + + rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket); + rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1); + rb_define_method(rb_cUDPSocket, "connect", udp_connect, 2); + rb_define_method(rb_cUDPSocket, "bind", udp_bind, 2); + rb_define_method(rb_cUDPSocket, "send", udp_send, -1); + rb_define_method(rb_cUDPSocket, "recvfrom_nonblock", udp_recvfrom_nonblock, -1); + +#ifdef HAVE_SYS_UN_H + rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket); + rb_define_method(rb_cUNIXSocket, "initialize", unix_init, 1); + rb_define_method(rb_cUNIXSocket, "path", unix_path, 0); + rb_define_method(rb_cUNIXSocket, "addr", unix_addr, 0); + rb_define_method(rb_cUNIXSocket, "peeraddr", unix_peeraddr, 0); + rb_define_method(rb_cUNIXSocket, "recvfrom", unix_recvfrom, -1); + rb_define_method(rb_cUNIXSocket, "send_io", unix_send_io, 1); + rb_define_method(rb_cUNIXSocket, "recv_io", unix_recv_io, -1); + rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1); + rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1); + + rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket); + rb_define_method(rb_cUNIXServer, "initialize", unix_svr_init, 1); + rb_define_method(rb_cUNIXServer, "accept", unix_accept, 0); + rb_define_method(rb_cUNIXServer, "accept_nonblock", unix_accept_nonblock, 0); + rb_define_method(rb_cUNIXServer, "sysaccept", unix_sysaccept, 0); + rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1); +#endif + + rb_cSocket = rb_define_class("Socket", rb_cBasicSocket); + + rb_define_method(rb_cSocket, "initialize", sock_initialize, 3); + rb_define_method(rb_cSocket, "connect", sock_connect, 1); + rb_define_method(rb_cSocket, "connect_nonblock", sock_connect_nonblock, 1); + rb_define_method(rb_cSocket, "bind", sock_bind, 1); + rb_define_method(rb_cSocket, "listen", sock_listen, 1); + rb_define_method(rb_cSocket, "accept", sock_accept, 0); + rb_define_method(rb_cSocket, "accept_nonblock", sock_accept_nonblock, 0); + rb_define_method(rb_cSocket, "sysaccept", sock_sysaccept, 0); + + rb_define_method(rb_cSocket, "recvfrom", sock_recvfrom, -1); + rb_define_method(rb_cSocket, "recvfrom_nonblock", sock_recvfrom_nonblock, -1); + + rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3); + rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3); + rb_define_singleton_method(rb_cSocket, "gethostname", sock_gethostname, 0); + rb_define_singleton_method(rb_cSocket, "gethostbyname", sock_s_gethostbyname, 1); + rb_define_singleton_method(rb_cSocket, "gethostbyaddr", sock_s_gethostbyaddr, -1); + rb_define_singleton_method(rb_cSocket, "getservbyname", sock_s_getservbyname, -1); + rb_define_singleton_method(rb_cSocket, "getservbyport", sock_s_getservbyport, -1); + rb_define_singleton_method(rb_cSocket, "getaddrinfo", sock_s_getaddrinfo, -1); + rb_define_singleton_method(rb_cSocket, "getnameinfo", sock_s_getnameinfo, -1); + rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2); + rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2); + rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_in", sock_s_unpack_sockaddr_in, 1); +#ifdef HAVE_SYS_UN_H + rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1); + rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1); + rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1); +#endif + + /* constants */ + mConst = rb_define_module_under(rb_cSocket, "Constants"); +#include "constants.h" +#ifdef INET6 /* IPv6 is not supported although AF_INET6 is defined on bcc32/mingw */ + sock_define_const("AF_INET6", AF_INET6); + sock_define_const("PF_INET6", PF_INET6); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/socket/sockport.h b/lib/ruby-1.9.1-rc1/ext/socket/sockport.h new file mode 100644 index 0000000..a71aced --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/socket/sockport.h @@ -0,0 +1,75 @@ +/************************************************ + + sockport.h - + + $Author: akr $ + created at: Fri Apr 30 23:19:34 JST 1999 + +************************************************/ + +#ifndef SOCKPORT_H +#define SOCKPORT_H + +#ifndef SA_LEN +# ifdef HAVE_SA_LEN +# define SA_LEN(sa) (sa)->sa_len +# else +# ifdef INET6 +# define SA_LEN(sa) \ + (((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \ + : sizeof(struct sockaddr)) +# else + /* by tradition, sizeof(struct sockaddr) covers most of the sockaddrs */ +# define SA_LEN(sa) (sizeof(struct sockaddr)) +# endif +# endif +#endif + +#ifdef HAVE_SA_LEN +# define SET_SA_LEN(sa, len) (sa)->sa_len = (len) +#else +# define SET_SA_LEN(sa, len) (len) +#endif + +#ifdef HAVE_SIN_LEN +# define SIN_LEN(si) (si)->sin_len +# define SET_SIN_LEN(si,len) (si)->sin_len = (len) +#else +# define SIN_LEN(si) sizeof(struct sockaddr_in) +# define SET_SIN_LEN(si,len) +#endif + +#ifndef IN_MULTICAST +# define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000) +# define IN_MULTICAST(i) IN_CLASSD(i) +#endif + +#ifndef IN_EXPERIMENTAL +# define IN_EXPERIMENTAL(i) ((((long)(i)) & 0xe0000000) == 0xe0000000) +#endif + +#ifndef IN_CLASSA_NSHIFT +# define IN_CLASSA_NSHIFT 24 +#endif + +#ifndef IN_LOOPBACKNET +# define IN_LOOPBACKNET 127 +#endif + +#ifndef AF_UNSPEC +# define AF_UNSPEC 0 +#endif + +#ifndef PF_UNSPEC +# define PF_UNSPEC AF_UNSPEC +#endif + +#ifndef PF_INET +# define PF_INET AF_INET +#endif + +#if defined(HOST_NOT_FOUND) && !defined(h_errno) && !defined(__CYGWIN__) +extern int h_errno; +#endif + +#endif diff --git a/lib/ruby-1.9.1-rc1/ext/stringio/.cvsignore b/lib/ruby-1.9.1-rc1/ext/stringio/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/stringio/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/stringio/README b/lib/ruby-1.9.1-rc1/ext/stringio/README new file mode 100644 index 0000000..5fe2ab2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/stringio/README @@ -0,0 +1,18 @@ +-*- rd -*- +$Author: akr $ + +=begin + += StringIO +Pseudo (({IO})) class from/to (({String})). + +This library is based on MoonWolf version written in Ruby. Thanks a lot. + += Differences to (({IO})) + +* not implemented: (({fcntl})), (({reopen})). +* (({fileno})) returns nil. +* (({pos=})) returns new position, not 0. +* (({ungetc})) does nothing at start of the string. + +=end diff --git a/lib/ruby-1.9.1-rc1/ext/stringio/depend b/lib/ruby-1.9.1-rc1/ext/stringio/depend new file mode 100644 index 0000000..338ebde --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/stringio/depend @@ -0,0 +1,3 @@ +stringio.o: stringio.c $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \ + $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/io.h \ + $(hdrdir)/ruby/encoding.h diff --git a/lib/ruby-1.9.1-rc1/ext/stringio/extconf.rb b/lib/ruby-1.9.1-rc1/ext/stringio/extconf.rb new file mode 100644 index 0000000..8fc84b3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/stringio/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile('stringio') diff --git a/lib/ruby-1.9.1-rc1/ext/stringio/stringio.c b/lib/ruby-1.9.1-rc1/ext/stringio/stringio.c new file mode 100644 index 0000000..637a3c9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/stringio/stringio.c @@ -0,0 +1,1368 @@ +/********************************************************************** + + stringio.c - + + $Author: yugui $ + $RoughId: stringio.c,v 1.13 2002/03/14 03:24:18 nobu Exp $ + created at: Tue Feb 19 04:10:38 JST 2002 + + All the files in this distribution are covered under the Ruby's + license (see the file COPYING). + +**********************************************************************/ + +#include "ruby.h" +#include "ruby/io.h" +#include "ruby/encoding.h" +#if defined(HAVE_FCNTL_H) || defined(_WIN32) +#include +#elif defined(HAVE_SYS_FCNTL_H) +#include +#endif + +struct StringIO { + VALUE string; + long pos; + long lineno; + int flags; + int count; +}; + +static void strio_mark _((struct StringIO *)); +static void strio_free _((struct StringIO *)); +static void strio_init(int, VALUE *, struct StringIO *); + +#define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark) +#define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg)) + +static struct StringIO * +strio_alloc() +{ + struct StringIO *ptr = ALLOC(struct StringIO); + ptr->string = Qnil; + ptr->pos = 0; + ptr->lineno = 0; + ptr->flags = 0; + ptr->count = 1; + return ptr; +} + +static void +strio_mark(struct StringIO *ptr) +{ + if (ptr) { + rb_gc_mark(ptr->string); + } +} + +static void +strio_free(struct StringIO *ptr) +{ + if (--ptr->count <= 0) { + xfree(ptr); + } +} + +static struct StringIO* +check_strio(VALUE self) +{ + Check_Type(self, T_DATA); + if (!IS_STRIO(self)) { + rb_raise(rb_eTypeError, "wrong argument type %s (expected StringIO)", + rb_class2name(CLASS_OF(self))); + } + return DATA_PTR(self); +} + +static struct StringIO* +get_strio(VALUE self) +{ + struct StringIO *ptr = check_strio(self); + + if (!ptr) { + rb_raise(rb_eIOError, "uninitialized stream"); + } + return ptr; +} + +static VALUE +strio_substr(struct StringIO *ptr, int pos, int len) +{ + VALUE str = ptr->string; + rb_encoding *enc = rb_enc_get(str); + int rlen = RSTRING_LEN(str) - pos; + + if (len > rlen) len = rlen; + if (len < 0) len = 0; + return rb_enc_str_new(RSTRING_PTR(str)+pos, len, enc); +} + +#define StringIO(obj) get_strio(obj) + +#define CLOSED(ptr) (!((ptr)->flags & FMODE_READWRITE)) +#define READABLE(ptr) ((ptr)->flags & FMODE_READABLE) +#define WRITABLE(ptr) ((ptr)->flags & FMODE_WRITABLE) + +static struct StringIO* +readable(struct StringIO *ptr) +{ + if (!READABLE(ptr)) { + rb_raise(rb_eIOError, "not opened for reading"); + } + return ptr; +} + +static struct StringIO* +writable(struct StringIO *ptr) +{ + if (!WRITABLE(ptr)) { + rb_raise(rb_eIOError, "not opened for writing"); + } + if (!OBJ_TAINTED(ptr->string)) { + rb_secure(4); + } + return ptr; +} + +static void +check_modifiable(struct StringIO *ptr) +{ + if (OBJ_FROZEN(ptr->string)) { + rb_raise(rb_eIOError, "not modifiable string"); + } +} + +static VALUE +strio_s_allocate(VALUE klass) +{ + return Data_Wrap_Struct(klass, strio_mark, strio_free, 0); +} + +/* + * call-seq: StringIO.new(string=""[, mode]) + * + * Creates new StringIO instance from with _string_ and _mode_. + */ +static VALUE +strio_initialize(int argc, VALUE *argv, VALUE self) +{ + struct StringIO *ptr = check_strio(self); + + if (!ptr) { + DATA_PTR(self) = ptr = strio_alloc(); + } + rb_call_super(0, 0); + strio_init(argc, argv, ptr); + return self; +} + +static void +strio_init(int argc, VALUE *argv, struct StringIO *ptr) +{ + VALUE string, mode; + int trunc = Qfalse; + + switch (rb_scan_args(argc, argv, "02", &string, &mode)) { + case 2: + if (FIXNUM_P(mode)) { + int flags = FIX2INT(mode); + ptr->flags = rb_io_modenum_flags(flags); + trunc = flags & O_TRUNC; + } + else { + const char *m = StringValueCStr(mode); + ptr->flags = rb_io_mode_flags(m); + trunc = *m == 'w'; + } + StringValue(string); + if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) { + errno = EACCES; + rb_sys_fail(0); + } + if (trunc) { + rb_str_resize(string, 0); + } + break; + case 1: + StringValue(string); + ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE; + break; + case 0: + string = rb_enc_str_new("", 0, rb_default_external_encoding()); + ptr->flags = FMODE_READWRITE; + break; + } + ptr->string = string; + ptr->pos = 0; + ptr->lineno = 0; +} + +static VALUE +strio_finalize(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + ptr->string = Qnil; + ptr->flags &= ~FMODE_READWRITE; + return self; +} + +/* + * call-seq: StringIO.open(string=""[, mode]) {|strio| ...} + * + * Equivalent to StringIO.new except that when it is called with a block, it + * yields with the new instance and closes it, and returns the result which + * returned from the block. + */ +static VALUE +strio_s_open(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj = rb_class_new_instance(argc, argv, klass); + if (!rb_block_given_p()) return obj; + return rb_ensure(rb_yield, obj, strio_finalize, obj); +} + +/* + * Returns +false+. Just for compatibility to IO. + */ +static VALUE +strio_false(VALUE self) +{ + StringIO(self); + return Qfalse; +} + +/* + * Returns +nil+. Just for compatibility to IO. + */ +static VALUE +strio_nil(VALUE self) +{ + StringIO(self); + return Qnil; +} + +/* + * Returns *strio* itself. Just for compatibility to IO. + */ +static VALUE +strio_self(VALUE self) +{ + StringIO(self); + return self; +} + +/* + * Returns 0. Just for compatibility to IO. + */ +static VALUE +strio_0(VALUE self) +{ + StringIO(self); + return INT2FIX(0); +} + +/* + * Returns the argument unchanged. Just for compatibility to IO. + */ +static VALUE +strio_first(VALUE self, VALUE arg) +{ + StringIO(self); + return arg; +} + +/* + * Raises NotImplementedError. + */ +static VALUE +strio_unimpl(int argc, VALUE *argv, VALUE self) +{ + StringIO(self); + rb_notimplement(); + return Qnil; /* not reached */ +} + +/* + * call-seq: strio.string -> string + * + * Returns underlying String object, the subject of IO. + */ +static VALUE +strio_get_string(VALUE self) +{ + return StringIO(self)->string; +} + +/* + * call-seq: + * strio.string = string -> string + * + * Changes underlying String object, the subject of IO. + */ +static VALUE +strio_set_string(VALUE self, VALUE string) +{ + struct StringIO *ptr = StringIO(self); + + if (!OBJ_TAINTED(self)) rb_secure(4); + ptr->flags &= ~FMODE_READWRITE; + StringValue(string); + ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE; + ptr->pos = 0; + ptr->lineno = 0; + return ptr->string = string; +} + +/* + * call-seq: + * strio.close -> nil + * + * Closes strio. The *strio* is unavailable for any further data + * operations; an +IOError+ is raised if such an attempt is made. + */ +static VALUE +strio_close(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (CLOSED(ptr)) { + rb_raise(rb_eIOError, "closed stream"); + } + ptr->flags &= ~FMODE_READWRITE; + return Qnil; +} + +/* + * call-seq: + * strio.close_read -> nil + * + * Closes the read end of a StringIO. Will raise an +IOError+ if the + * *strio* is not readable. + */ +static VALUE +strio_close_read(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (!READABLE(ptr)) { + rb_raise(rb_eIOError, "closing non-duplex IO for reading"); + } + ptr->flags &= ~FMODE_READABLE; + return Qnil; +} + +/* + * call-seq: + * strio.close_write -> nil + * + * Closes the write end of a StringIO. Will raise an +IOError+ if the + * *strio* is not writeable. + */ +static VALUE +strio_close_write(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (!WRITABLE(ptr)) { + rb_raise(rb_eIOError, "closing non-duplex IO for writing"); + } + ptr->flags &= ~FMODE_WRITABLE; + return Qnil; +} + +/* + * call-seq: + * strio.closed? -> true or false + * + * Returns +true+ if *strio* is completely closed, +false+ otherwise. + */ +static VALUE +strio_closed(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (!CLOSED(ptr)) return Qfalse; + return Qtrue; +} + +/* + * call-seq: + * strio.closed_read? -> true or false + * + * Returns +true+ if *strio* is not readable, +false+ otherwise. + */ +static VALUE +strio_closed_read(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (READABLE(ptr)) return Qfalse; + return Qtrue; +} + +/* + * call-seq: + * strio.closed_write? -> true or false + * + * Returns +true+ if *strio* is not writable, +false+ otherwise. + */ +static VALUE +strio_closed_write(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + if (WRITABLE(ptr)) return Qfalse; + return Qtrue; +} + +/* + * call-seq: + * strio.eof -> true or false + * strio.eof? -> true or false + * + * Returns true if *strio* is at end of file. The stringio must be + * opened for reading or an +IOError+ will be raised. + */ +static VALUE +strio_eof(VALUE self) +{ + struct StringIO *ptr = readable(StringIO(self)); + if (ptr->pos < RSTRING_LEN(ptr->string)) return Qfalse; + return Qtrue; +} + +/* :nodoc: */ +static VALUE +strio_copy(VALUE copy, VALUE orig) +{ + struct StringIO *ptr; + + orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio"); + if (copy == orig) return copy; + ptr = StringIO(orig); + if (check_strio(copy)) { + strio_free(DATA_PTR(copy)); + } + DATA_PTR(copy) = ptr; + OBJ_INFECT(copy, orig); + ++ptr->count; + return copy; +} + +/* + * call-seq: + * strio.lineno -> integer + * + * Returns the current line number in *strio*. The stringio must be + * opened for reading. +lineno+ counts the number of times +gets+ is + * called, rather than the number of newlines encountered. The two + * values will differ if +gets+ is called with a separator other than + * newline. See also the $. variable. + */ +static VALUE +strio_get_lineno(VALUE self) +{ + return LONG2NUM(StringIO(self)->lineno); +} + +/* + * call-seq: + * strio.lineno = integer -> integer + * + * Manually sets the current line number to the given value. + * $. is updated only on the next read. + */ +static VALUE +strio_set_lineno(VALUE self, VALUE lineno) +{ + StringIO(self)->lineno = NUM2LONG(lineno); + return lineno; +} + +/* call-seq: strio.binmode -> true */ +#define strio_binmode strio_self + +/* call-seq: strio.fcntl */ +#define strio_fcntl strio_unimpl + +/* call-seq: strio.flush -> strio */ +#define strio_flush strio_self + +/* call-seq: strio.fsync -> 0 */ +#define strio_fsync strio_0 + +/* + * call-seq: + * strio.reopen(other_StrIO) -> strio + * strio.reopen(string, mode) -> strio + * + * Reinitializes *strio* with the given other_StrIO or _string_ + * and _mode_ (see StringIO#new). + */ +static VALUE +strio_reopen(int argc, VALUE *argv, VALUE self) +{ + if (!OBJ_TAINTED(self)) rb_secure(4); + if (argc == 1 && TYPE(*argv) != T_STRING) { + return strio_copy(self, *argv); + } + strio_init(argc, argv, StringIO(self)); + return self; +} + +/* + * call-seq: + * strio.pos -> integer + * strio.tell -> integer + * + * Returns the current offset (in bytes) of *strio*. + */ +static VALUE +strio_get_pos(VALUE self) +{ + return LONG2NUM(StringIO(self)->pos); +} + +/* + * call-seq: + * strio.pos = integer -> integer + * + * Seeks to the given position (in bytes) in *strio*. + */ +static VALUE +strio_set_pos(VALUE self, VALUE pos) +{ + struct StringIO *ptr = StringIO(self); + long p = NUM2LONG(pos); + if (p < 0) { + error_inval(0); + } + ptr->pos = p; + return pos; +} + +/* + * call-seq: + * strio.rewind -> 0 + * + * Positions *strio* to the beginning of input, resetting + * +lineno+ to zero. + */ +static VALUE +strio_rewind(VALUE self) +{ + struct StringIO *ptr = StringIO(self); + ptr->pos = 0; + ptr->lineno = 0; + return INT2FIX(0); +} + +/* + * call-seq: + * strio.seek(amount, whence=SEEK_SET) -> 0 + * + * Seeks to a given offset _amount_ in the stream according to + * the value of _whence_ (see IO#seek). + */ +static VALUE +strio_seek(int argc, VALUE *argv, VALUE self) +{ + VALUE whence; + struct StringIO *ptr = StringIO(self); + long offset; + + rb_scan_args(argc, argv, "11", NULL, &whence); + offset = NUM2LONG(argv[0]); + if (CLOSED(ptr)) { + rb_raise(rb_eIOError, "closed stream"); + } + switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) { + case 0: + break; + case 1: + offset += ptr->pos; + break; + case 2: + offset += RSTRING_LEN(ptr->string); + break; + default: + error_inval("invalid whence"); + } + if (offset < 0) { + error_inval(0); + } + ptr->pos = offset; + return INT2FIX(0); +} + +/* + * call-seq: + * strio.sync -> true + * + * Returns +true+ always. + */ +static VALUE +strio_get_sync(VALUE self) +{ + StringIO(self); + return Qtrue; +} + +/* call-seq: strio.sync = boolean -> boolean */ +#define strio_set_sync strio_first + +#define strio_tell strio_get_pos + +/* + * call-seq: + * strio.each_byte {|byte| block } -> strio + * + * See IO#each_byte. + */ +static VALUE +strio_each_byte(VALUE self) +{ + struct StringIO *ptr = readable(StringIO(self)); + + RETURN_ENUMERATOR(self, 0, 0); + + while (ptr->pos < RSTRING_LEN(ptr->string)) { + char c = RSTRING_PTR(ptr->string)[ptr->pos++]; + rb_yield(CHR2FIX(c)); + } + return self; +} + +/* + * call-seq: + * strio.getc -> string or nil + * + * See IO#getc. + */ +static VALUE +strio_getc(VALUE self) +{ + struct StringIO *ptr = readable(StringIO(self)); + rb_encoding *enc = rb_enc_get(ptr->string); + int len; + char *p; + + if (ptr->pos >= RSTRING_LEN(ptr->string)) { + return Qnil; + } + p = RSTRING_PTR(ptr->string)+ptr->pos; + len = rb_enc_mbclen(p, RSTRING_END(ptr->string), enc); + ptr->pos += len; + return rb_enc_str_new(p, len, rb_enc_get(ptr->string)); +} + +/* + * call-seq: + * strio.getbyte -> fixnum or nil + * + * See IO#getbyte. + */ +static VALUE +strio_getbyte(VALUE self) +{ + struct StringIO *ptr = readable(StringIO(self)); + int c; + if (ptr->pos >= RSTRING_LEN(ptr->string)) { + return Qnil; + } + c = RSTRING_PTR(ptr->string)[ptr->pos++]; + return CHR2FIX(c); +} + +static void +strio_extend(struct StringIO *ptr, long pos, long len) +{ + long olen; + + check_modifiable(ptr); + olen = RSTRING_LEN(ptr->string); + if (pos + len > olen) { + rb_str_resize(ptr->string, pos + len); + if (pos > olen) + MEMZERO(RSTRING_PTR(ptr->string) + olen, char, pos - olen); + } + else { + rb_str_modify(ptr->string); + } +} + +/* + * call-seq: + * strio.ungetc(string) -> nil + * + * Pushes back one character (passed as a parameter) onto *strio* + * such that a subsequent buffered read will return it. Pushing back + * behind the beginning of the buffer string is not possible. Nothing + * will be done if such an attempt is made. + * In other case, there is no limitation for multiple pushbacks. + */ +static VALUE +strio_ungetc(VALUE self, VALUE c) +{ + struct StringIO *ptr = readable(StringIO(self)); + long lpos, clen; + char *p, *pend; + rb_encoding *enc, *enc2; + + if (NIL_P(c)) return Qnil; + if (FIXNUM_P(c)) { + int cc = FIX2INT(c); + char buf[16]; + + enc = rb_enc_get(ptr->string); + rb_enc_mbcput(cc, buf, enc); + c = rb_enc_str_new(buf, rb_enc_codelen(cc, enc), enc); + } + else { + SafeStringValue(c); + enc = rb_enc_get(ptr->string); + enc2 = rb_enc_get(c); + if (enc != enc2 && enc != rb_ascii8bit_encoding()) { + c = rb_str_conv_enc(c, enc2, enc); + } + } + /* get logical position */ + lpos = 0; p = RSTRING_PTR(ptr->string); pend = p + ptr->pos; + for (;;) { + clen = rb_enc_mbclen(p, pend, enc); + if (p+clen >= pend) break; + p += clen; + lpos++; + } + rb_str_update(ptr->string, lpos, ptr->pos ? 1 : 0, c); + ptr->pos = p - RSTRING_PTR(ptr->string); + + return Qnil; +} + +/* + * call-seq: + * strio.ungetbyte(fixnum) -> nil + * + * See IO#ungetbyte + */ +static VALUE +strio_ungetbyte(VALUE self, VALUE c) +{ + NUM2INT(c); + return strio_ungetc(self, c); +} + +/* + * call-seq: + * strio.readchar -> string + * + * See IO#readchar. + */ +static VALUE +strio_readchar(VALUE self) +{ + VALUE c = strio_getc(self); + if (NIL_P(c)) rb_eof_error(); + return c; +} + +/* + * call-seq: + * strio.readbyte -> fixnum + * + * See IO#readbyte. + */ +static VALUE +strio_readbyte(VALUE self) +{ + VALUE c = strio_getbyte(self); + if (NIL_P(c)) rb_eof_error(); + return c; +} + +/* + * call-seq: + * strio.each_char {|char| block } -> strio + * + * See IO#each_char. + */ +static VALUE +strio_each_char(VALUE self) +{ + VALUE c; + + RETURN_ENUMERATOR(self, 0, 0); + + while (!NIL_P(c = strio_getc(self))) { + rb_yield(c); + } + return self; +} + +/* Boyer-Moore search: copied from regex.c */ +static void +bm_init_skip(long *skip, const char *pat, long m) +{ + int c; + + for (c = 0; c < (1 << CHAR_BIT); c++) { + skip[c] = m; + } + while (--m) { + skip[(unsigned char)*pat++] = m; + } +} + +static long +bm_search(const char *little, long llen, const char *big, long blen, const long *skip) +{ + long i, j, k; + + i = llen - 1; + while (i < blen) { + k = i; + j = llen - 1; + while (j >= 0 && big[k] == little[j]) { + k--; + j--; + } + if (j < 0) return k + 1; + i += skip[(unsigned char)big[i]]; + } + return -1; +} + +static VALUE +strio_getline(int argc, VALUE *argv, struct StringIO *ptr) +{ + const char *s, *e, *p; + long n, limit = 0; + VALUE str; + + if (argc == 0) { + str = rb_rs; + } + else { + VALUE lim, tmp; + + rb_scan_args(argc, argv, "11", &str, &lim); + if (!NIL_P(lim)) limit = NUM2LONG(lim); + else if (!NIL_P(str) && TYPE(str) != T_STRING) { + tmp = rb_check_string_type(str); + if (NIL_P(tmp)) { + limit = NUM2LONG(str); + if (limit == 0) return rb_str_new(0,0); + str = rb_rs; + } + else { + str = tmp; + } + } + else if (!NIL_P(str)) { + StringValue(str); + } + } + + if (ptr->pos >= (n = RSTRING_LEN(ptr->string))) { + return Qnil; + } + s = RSTRING_PTR(ptr->string); + e = s + RSTRING_LEN(ptr->string); + s += ptr->pos; + if (limit > 0 && s + limit < e) { + e = s + limit; + } + if (NIL_P(str)) { + str = strio_substr(ptr, ptr->pos, e - s); + } + else if ((n = RSTRING_LEN(str)) == 0) { + p = s; + while (*p == '\n') { + if (++p == e) { + return Qnil; + } + } + s = p; + while ((p = memchr(p, '\n', e - p)) && (p != e)) { + if (*++p == '\n') { + e = p + 1; + break; + } + } + str = strio_substr(ptr, s - RSTRING_PTR(ptr->string), e - s); + } + else if (n == 1) { + if ((p = memchr(s, RSTRING_PTR(str)[0], e - s)) != 0) { + e = p + 1; + } + str = strio_substr(ptr, ptr->pos, e - s); + } + else { + if (n < e - s) { + if (e - s < 1024) { + for (p = s; p + n <= e; ++p) { + if (MEMCMP(p, RSTRING_PTR(str), char, n) == 0) { + e = p + n; + break; + } + } + } + else { + long skip[1 << CHAR_BIT], pos; + p = RSTRING_PTR(str); + bm_init_skip(skip, p, n); + if ((pos = bm_search(p, n, s, e - s, skip)) >= 0) { + e = s + pos + n; + } + } + } + str = strio_substr(ptr, ptr->pos, e - s); + } + ptr->pos = e - RSTRING_PTR(ptr->string); + ptr->lineno++; + return str; +} + +/* + * call-seq: + * strio.gets(sep=$/) -> string or nil + * strio.gets(limit) -> string or nil + * strio.gets(sep, limit) -> string or nil + * + * See IO#gets. + */ +static VALUE +strio_gets(int argc, VALUE *argv, VALUE self) +{ + VALUE str = strio_getline(argc, argv, readable(StringIO(self))); + + rb_lastline_set(str); + return str; +} + +/* + * call-seq: + * strio.readline(sep=$/) -> string + * strio.readline(limit) -> string or nil + * strio.readline(sep, limit) -> string or nil + * + * See IO#readline. + */ +static VALUE +strio_readline(int argc, VALUE *argv, VALUE self) +{ + VALUE line = strio_gets(argc, argv, self); + if (NIL_P(line)) rb_eof_error(); + return line; +} + +/* + * call-seq: + * strio.each(sep=$/) {|line| block } -> strio + * strio.each(limit) {|line| block } -> strio + * strio.each(sep, limit) {|line| block } -> strio + * strio.each_line(sep=$/) {|line| block } -> strio + * strio.each_line(limit) {|line| block } -> strio + * strio.each_line(sep,limit) {|line| block } -> strio + * + * See IO#each. + */ +static VALUE +strio_each(int argc, VALUE *argv, VALUE self) +{ + struct StringIO *ptr = StringIO(self); + VALUE line; + + RETURN_ENUMERATOR(self, argc, argv); + + while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) { + rb_yield(line); + } + return self; +} + +/* + * call-seq: + * strio.readlines(sep=$/) -> array + * strio.readlines(limit) -> array + * strio.readlines(sep,limit) -> array + * + * See IO#readlines. + */ +static VALUE +strio_readlines(int argc, VALUE *argv, VALUE self) +{ + struct StringIO *ptr = StringIO(self); + VALUE ary = rb_ary_new(), line; + while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) { + rb_ary_push(ary, line); + } + return ary; +} + +/* + * call-seq: + * strio.write(string) -> integer + * strio.syswrite(string) -> integer + * + * Appends the given string to the underlying buffer string of *strio*. + * The stream must be opened for writing. If the argument is not a + * string, it will be converted to a string using to_s. + * Returns the number of bytes written. See IO#write. + */ +static VALUE +strio_write(VALUE self, VALUE str) +{ + struct StringIO *ptr = writable(StringIO(self)); + long len, olen; + rb_encoding *enc, *enc2; + + if (TYPE(str) != T_STRING) + str = rb_obj_as_string(str); + enc = rb_enc_get(ptr->string); + enc2 = rb_enc_get(str); + if (enc != enc2 && enc != rb_ascii8bit_encoding()) { + str = rb_str_conv_enc(str, enc2, enc); + } + len = RSTRING_LEN(str); + if (len == 0) return INT2FIX(0); + check_modifiable(ptr); + olen = RSTRING_LEN(ptr->string); + if (ptr->flags & FMODE_APPEND) { + ptr->pos = olen; + } + if (ptr->pos == olen) { + rb_str_cat(ptr->string, RSTRING_PTR(str), len); + } + else { + strio_extend(ptr, ptr->pos, len); + memmove(RSTRING_PTR(ptr->string)+ptr->pos, RSTRING_PTR(str), len); + OBJ_INFECT(ptr->string, str); + } + OBJ_INFECT(ptr->string, self); + ptr->pos += len; + return LONG2NUM(len); +} + +/* + * call-seq: + * strio << obj -> strio + * + * See IO#<<. + */ +#define strio_addstr rb_io_addstr + +/* + * call-seq: + * strio.print() -> nil + * strio.print(obj, ...) -> nil + * + * See IO#print. + */ +#define strio_print rb_io_print + +/* + * call-seq: + * strio.printf(format_string [, obj, ...] ) -> nil + * + * See IO#printf. + */ +#define strio_printf rb_io_printf + +/* + * call-seq: + * strio.putc(obj) -> obj + * + * See IO#putc. + */ +static VALUE +strio_putc(VALUE self, VALUE ch) +{ + struct StringIO *ptr = writable(StringIO(self)); + int c = NUM2CHR(ch); + long olen; + + check_modifiable(ptr); + olen = RSTRING_LEN(ptr->string); + if (ptr->flags & FMODE_APPEND) { + ptr->pos = olen; + } + strio_extend(ptr, ptr->pos, 1); + RSTRING_PTR(ptr->string)[ptr->pos++] = c; + OBJ_INFECT(ptr->string, self); + return ch; +} + +/* + * call-seq: + * strio.puts(obj, ...) -> nil + * + * See IO#puts. + */ +#define strio_puts rb_io_puts + +/* + * call-seq: + * strio.read([length [, buffer]]) -> string, buffer, or nil + * + * See IO#read. + */ +static VALUE +strio_read(int argc, VALUE *argv, VALUE self) +{ + struct StringIO *ptr = readable(StringIO(self)); + VALUE str = Qnil; + long len, olen; + + switch (argc) { + case 2: + str = argv[1]; + StringValue(str); + rb_str_modify(str); + case 1: + if (!NIL_P(argv[0])) { + len = olen = NUM2LONG(argv[0]); + if (len < 0) { + rb_raise(rb_eArgError, "negative length %ld given", len); + } + if (len > 0 && ptr->pos >= RSTRING_LEN(ptr->string)) { + if (!NIL_P(str)) rb_str_resize(str, 0); + return Qnil; + } + break; + } + /* fall through */ + case 0: + olen = -1; + len = RSTRING_LEN(ptr->string); + if (len <= ptr->pos) { + if (NIL_P(str)) { + str = rb_str_new(0, 0); + } + else { + rb_str_resize(str, 0); + } + return str; + } + else { + len -= ptr->pos; + } + break; + default: + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); + } + if (NIL_P(str)) { + str = strio_substr(ptr, ptr->pos, len); + } + else { + long rest = RSTRING_LEN(ptr->string) - ptr->pos; + if (len > rest) len = rest; + rb_str_resize(str, len); + MEMCPY(RSTRING_PTR(str), RSTRING_PTR(ptr->string) + ptr->pos, char, len); + } + if (NIL_P(str)) { + str = rb_str_new(0, 0); + len = 0; + } + else { + ptr->pos += len = RSTRING_LEN(str); + } + return str; +} + +/* + * call-seq: + * strio.sysread(integer[, outbuf]) -> string + * + * Similar to #read, but raises +EOFError+ at end of string instead of + * returning +nil+, as well as IO#sysread does. + */ +static VALUE +strio_sysread(int argc, VALUE *argv, VALUE self) +{ + VALUE val = strio_read(argc, argv, self); + if (NIL_P(val)) { + rb_eof_error(); + } + return val; +} + +#define strio_syswrite strio_write + +/* call-seq: strio.path -> nil */ +#define strio_path strio_nil + +/* + * call-seq: + * strio.isatty -> nil + * strio.tty? -> nil + * + */ +#define strio_isatty strio_false + +/* call-seq: strio.pid -> nil */ +#define strio_pid strio_nil + +/* call-seq: strio.fileno -> nil */ +#define strio_fileno strio_nil + +/* + * call-seq: + * strio.size -> integer + * + * Returns the size of the buffer string. + */ +static VALUE +strio_size(VALUE self) +{ + VALUE string = StringIO(self)->string; + if (NIL_P(string)) { + rb_raise(rb_eIOError, "not opened"); + } + return ULONG2NUM(RSTRING_LEN(string)); +} + +/* + * call-seq: + * strio.truncate(integer) -> 0 + * + * Truncates the buffer string to at most _integer_ bytes. The *strio* + * must be opened for writing. + */ +static VALUE +strio_truncate(VALUE self, VALUE len) +{ + VALUE string = writable(StringIO(self))->string; + long l = NUM2LONG(len); + long plen = RSTRING_LEN(string); + if (l < 0) { + error_inval("negative legnth"); + } + rb_str_resize(string, l); + if (plen < l) { + MEMZERO(RSTRING_PTR(string) + plen, char, l - plen); + } + return len; +} + +/* + * call-seq: + * strio.external_encoding => encoding + * + * Returns the Encoding object that represents the encoding of the file. + * If strio is write mode and no encoding is specified, returns nil. + */ + +static VALUE +strio_external_encoding(VALUE self) +{ + return rb_enc_from_encoding(rb_enc_get(StringIO(self)->string)); +} + +/* + * call-seq: + * strio.internal_encoding => encoding + * + * Returns the Encoding of the internal string if conversion is + * specified. Otherwise returns nil. + */ + +static VALUE +strio_internal_encoding(VALUE self) +{ + return Qnil; +} + +/* + * call-seq: + * strio.set_encoding(ext_enc) => strio + * + * Tagged with the encoding specified. + */ + +static VALUE +strio_set_encoding(VALUE self, VALUE ext_enc) +{ + rb_encoding* enc; + VALUE str = StringIO(self)->string; + enc = rb_to_encoding(ext_enc); + rb_enc_associate(str, enc); + return self; +} + +/* + * Pseudo I/O on String object. + */ +void +Init_stringio() +{ + VALUE StringIO = rb_define_class("StringIO", rb_cData); + + rb_include_module(StringIO, rb_mEnumerable); + rb_define_alloc_func(StringIO, strio_s_allocate); + rb_define_singleton_method(StringIO, "open", strio_s_open, -1); + rb_define_method(StringIO, "initialize", strio_initialize, -1); + rb_define_method(StringIO, "initialize_copy", strio_copy, 1); + rb_define_method(StringIO, "reopen", strio_reopen, -1); + + rb_define_method(StringIO, "string", strio_get_string, 0); + rb_define_method(StringIO, "string=", strio_set_string, 1); + rb_define_method(StringIO, "lineno", strio_get_lineno, 0); + rb_define_method(StringIO, "lineno=", strio_set_lineno, 1); + + rb_define_method(StringIO, "binmode", strio_binmode, 0); + rb_define_method(StringIO, "close", strio_close, 0); + rb_define_method(StringIO, "close_read", strio_close_read, 0); + rb_define_method(StringIO, "close_write", strio_close_write, 0); + rb_define_method(StringIO, "closed?", strio_closed, 0); + rb_define_method(StringIO, "closed_read?", strio_closed_read, 0); + rb_define_method(StringIO, "closed_write?", strio_closed_write, 0); + rb_define_method(StringIO, "eof", strio_eof, 0); + rb_define_method(StringIO, "eof?", strio_eof, 0); + rb_define_method(StringIO, "fcntl", strio_fcntl, -1); + rb_define_method(StringIO, "flush", strio_flush, 0); + rb_define_method(StringIO, "fsync", strio_fsync, 0); + rb_define_method(StringIO, "pos", strio_get_pos, 0); + rb_define_method(StringIO, "pos=", strio_set_pos, 1); + rb_define_method(StringIO, "rewind", strio_rewind, 0); + rb_define_method(StringIO, "seek", strio_seek, -1); + rb_define_method(StringIO, "sync", strio_get_sync, 0); + rb_define_method(StringIO, "sync=", strio_set_sync, 1); + rb_define_method(StringIO, "tell", strio_tell, 0); + rb_define_method(StringIO, "path", strio_path, 0); + + rb_define_method(StringIO, "each", strio_each, -1); + rb_define_method(StringIO, "each_line", strio_each, -1); + rb_define_method(StringIO, "lines", strio_each, -1); + rb_define_method(StringIO, "each_byte", strio_each_byte, 0); + rb_define_method(StringIO, "bytes", strio_each_byte, 0); + rb_define_method(StringIO, "each_char", strio_each_char, 0); + rb_define_method(StringIO, "chars", strio_each_char, 0); + rb_define_method(StringIO, "getc", strio_getc, 0); + rb_define_method(StringIO, "ungetc", strio_ungetc, 1); + rb_define_method(StringIO, "ungetbyte", strio_ungetbyte, 1); + rb_define_method(StringIO, "readchar", strio_readchar, 0); + rb_define_method(StringIO, "getbyte", strio_getbyte, 0); + rb_define_method(StringIO, "readbyte", strio_readbyte, 0); + rb_define_method(StringIO, "gets", strio_gets, -1); + rb_define_method(StringIO, "readline", strio_readline, -1); + rb_define_method(StringIO, "readlines", strio_readlines, -1); + rb_define_method(StringIO, "read", strio_read, -1); + rb_define_method(StringIO, "sysread", strio_sysread, -1); + rb_define_method(StringIO, "readpartial", strio_sysread, -1); + + rb_define_method(StringIO, "write", strio_write, 1); + rb_define_method(StringIO, "<<", strio_addstr, 1); + rb_define_method(StringIO, "print", strio_print, -1); + rb_define_method(StringIO, "printf", strio_printf, -1); + rb_define_method(StringIO, "putc", strio_putc, 1); + rb_define_method(StringIO, "puts", strio_puts, -1); + rb_define_method(StringIO, "syswrite", strio_syswrite, 1); + + rb_define_method(StringIO, "isatty", strio_isatty, 0); + rb_define_method(StringIO, "tty?", strio_isatty, 0); + rb_define_method(StringIO, "pid", strio_pid, 0); + rb_define_method(StringIO, "fileno", strio_fileno, 0); + rb_define_method(StringIO, "size", strio_size, 0); + rb_define_method(StringIO, "length", strio_size, 0); + rb_define_method(StringIO, "truncate", strio_truncate, 1); + + rb_define_method(StringIO, "external_encoding", strio_external_encoding, 0); + rb_define_method(StringIO, "internal_encoding", strio_internal_encoding, 0); + rb_define_method(StringIO, "set_encoding", strio_set_encoding, 1); +} diff --git a/lib/ruby-1.9.1-rc1/ext/strscan/.cvsignore b/lib/ruby-1.9.1-rc1/ext/strscan/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/strscan/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/strscan/depend b/lib/ruby-1.9.1-rc1/ext/strscan/depend new file mode 100644 index 0000000..76f6e0b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/strscan/depend @@ -0,0 +1,2 @@ +strscan.o: strscan.c $(hdrdir)/ruby.h $(hdrdir)/re.h $(hdrdir)/regex.h \ + $(hdrdir)/oniguruma.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/lib/ruby-1.9.1-rc1/ext/strscan/extconf.rb b/lib/ruby-1.9.1-rc1/ext/strscan/extconf.rb new file mode 100644 index 0000000..0d21966 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/strscan/extconf.rb @@ -0,0 +1,2 @@ +require 'mkmf' +create_makefile 'strscan' diff --git a/lib/ruby-1.9.1-rc1/ext/strscan/strscan.c b/lib/ruby-1.9.1-rc1/ext/strscan/strscan.c new file mode 100644 index 0000000..cf27648 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/strscan/strscan.c @@ -0,0 +1,1330 @@ +/* + $Id: strscan.c 18968 2008-08-31 02:43:17Z akr $ + + Copyright (c) 1999-2006 Minero Aoki + + This program is free software. + You can distribute/modify this program under the terms of + the Ruby License. For details, see the file COPYING. +*/ + +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/encoding.h" + +#define STRSCAN_VERSION "0.7.0" + +/* ======================================================================= + Data Type Definitions + ======================================================================= */ + +static VALUE StringScanner; +static VALUE ScanError; + +struct strscanner +{ + /* multi-purpose flags */ + unsigned long flags; +#define FLAG_MATCHED (1 << 0) + + /* the string to scan */ + VALUE str; + + /* scan pointers */ + long prev; /* legal only when MATCHED_P(s) */ + long curr; /* always legal */ + + /* the regexp register; legal only when MATCHED_P(s) */ + struct re_registers regs; +}; + +#define MATCHED_P(s) ((s)->flags & FLAG_MATCHED) +#define MATCHED(s) (s)->flags |= FLAG_MATCHED +#define CLEAR_MATCH_STATUS(s) (s)->flags &= ~FLAG_MATCHED + +#define S_PBEG(s) (RSTRING_PTR((s)->str)) +#define S_LEN(s) (RSTRING_LEN((s)->str)) +#define S_PEND(s) (S_PBEG(s) + S_LEN(s)) +#define CURPTR(s) (S_PBEG(s) + (s)->curr) +#define S_RESTLEN(s) (S_LEN(s) - (s)->curr) + +#define EOS_P(s) ((s)->curr >= RSTRING_LEN(p->str)) + +#define GET_SCANNER(obj,var) do {\ + Data_Get_Struct(obj, struct strscanner, var);\ + if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\ +} while (0) + +/* ======================================================================= + Function Prototypes + ======================================================================= */ + +static VALUE infect _((VALUE str, struct strscanner *p)); +static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i)); +static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len)); + +void check_strscan _((VALUE obj)); +static void strscan_mark _((struct strscanner *p)); +static void strscan_free _((struct strscanner *p)); +static VALUE strscan_s_allocate _((VALUE klass)); +static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self)); +static VALUE strscan_init_copy _((VALUE vself, VALUE vorig)); + +static VALUE strscan_s_mustc _((VALUE self)); +static VALUE strscan_terminate _((VALUE self)); +static VALUE strscan_clear _((VALUE self)); +static VALUE strscan_get_string _((VALUE self)); +static VALUE strscan_set_string _((VALUE self, VALUE str)); +static VALUE strscan_concat _((VALUE self, VALUE str)); +static VALUE strscan_get_pos _((VALUE self)); +static VALUE strscan_set_pos _((VALUE self, VALUE pos)); +static VALUE strscan_do_scan _((VALUE self, VALUE regex, + int succptr, int getstr, int headonly)); +static VALUE strscan_scan _((VALUE self, VALUE re)); +static VALUE strscan_match_p _((VALUE self, VALUE re)); +static VALUE strscan_skip _((VALUE self, VALUE re)); +static VALUE strscan_check _((VALUE self, VALUE re)); +static VALUE strscan_scan_full _((VALUE self, VALUE re, + VALUE succp, VALUE getp)); +static VALUE strscan_scan_until _((VALUE self, VALUE re)); +static VALUE strscan_skip_until _((VALUE self, VALUE re)); +static VALUE strscan_check_until _((VALUE self, VALUE re)); +static VALUE strscan_search_full _((VALUE self, VALUE re, + VALUE succp, VALUE getp)); +static void adjust_registers_to_matched _((struct strscanner *p)); +static VALUE strscan_getch _((VALUE self)); +static VALUE strscan_get_byte _((VALUE self)); +static VALUE strscan_getbyte _((VALUE self)); +static VALUE strscan_peek _((VALUE self, VALUE len)); +static VALUE strscan_peep _((VALUE self, VALUE len)); +static VALUE strscan_unscan _((VALUE self)); +static VALUE strscan_bol_p _((VALUE self)); +static VALUE strscan_eos_p _((VALUE self)); +static VALUE strscan_empty_p _((VALUE self)); +static VALUE strscan_rest_p _((VALUE self)); +static VALUE strscan_matched_p _((VALUE self)); +static VALUE strscan_matched _((VALUE self)); +static VALUE strscan_matched_size _((VALUE self)); +static VALUE strscan_aref _((VALUE self, VALUE idx)); +static VALUE strscan_pre_match _((VALUE self)); +static VALUE strscan_post_match _((VALUE self)); +static VALUE strscan_rest _((VALUE self)); +static VALUE strscan_rest_size _((VALUE self)); + +static VALUE strscan_inspect _((VALUE self)); +static VALUE inspect1 _((struct strscanner *p)); +static VALUE inspect2 _((struct strscanner *p)); + +/* ======================================================================= + Utils + ======================================================================= */ + +static VALUE +infect(VALUE str, struct strscanner *p) +{ + OBJ_INFECT(str, p->str); + return str; +} + +static VALUE +str_new(struct strscanner *p, const char *ptr, long len) +{ + VALUE str = rb_str_new(ptr, len); + rb_enc_copy(str, p->str); + return str; +} + +static VALUE +extract_range(struct strscanner *p, long beg_i, long end_i) +{ + if (beg_i > S_LEN(p)) return Qnil; + if (end_i > S_LEN(p)) + end_i = S_LEN(p); + return infect(str_new(p, S_PBEG(p) + beg_i, end_i - beg_i), p); +} + +static VALUE +extract_beg_len(struct strscanner *p, long beg_i, long len) +{ + if (beg_i > S_LEN(p)) return Qnil; + if (beg_i + len > S_LEN(p)) + len = S_LEN(p) - beg_i; + return infect(str_new(p, S_PBEG(p) + beg_i, len), p); +} + +/* ======================================================================= + Constructor + ======================================================================= */ + +static void +strscan_mark(struct strscanner *p) +{ + rb_gc_mark(p->str); +} + +static void +strscan_free(struct strscanner *p) +{ + onig_region_free(&(p->regs), 0); + ruby_xfree(p); +} + +static VALUE +strscan_s_allocate(VALUE klass) +{ + struct strscanner *p; + + p = ALLOC(struct strscanner); + MEMZERO(p, struct strscanner, 1); + CLEAR_MATCH_STATUS(p); + onig_region_init(&(p->regs)); + p->str = Qnil; + return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p); +} + +/* + * call-seq: StringScanner.new(string, dup = false) + * + * Creates a new StringScanner object to scan over the given +string+. + * +dup+ argument is obsolete and not used now. + */ +static VALUE +strscan_initialize(int argc, VALUE *argv, VALUE self) +{ + struct strscanner *p; + VALUE str, need_dup; + + Data_Get_Struct(self, struct strscanner, p); + rb_scan_args(argc, argv, "11", &str, &need_dup); + StringValue(str); + p->str = str; + + return self; +} + +void +check_strscan(VALUE obj) +{ + if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) { + rb_raise(rb_eTypeError, + "wrong argument type %s (expected StringScanner)", + rb_obj_classname(obj)); + } +} + +/* + * call-seq: + * dup + * clone + * + * Duplicates a StringScanner object. + */ +static VALUE +strscan_init_copy(VALUE vself, VALUE vorig) +{ + struct strscanner *self, *orig; + + Data_Get_Struct(vself, struct strscanner, self); + check_strscan(vorig); + Data_Get_Struct(vorig, struct strscanner, orig); + if (self != orig) { + self->flags = orig->flags; + self->str = orig->str; + self->prev = orig->prev; + self->curr = orig->curr; + onig_region_copy(&self->regs, &orig->regs); + } + + return vself; +} + +/* ======================================================================= + Instance Methods + ======================================================================= */ + +/* + * call-seq: StringScanner.must_C_version + * + * This method is defined for backward compatibility. + */ +static VALUE +strscan_s_mustc(VALUE self) +{ + return self; +} + +/* + * Reset the scan pointer (index 0) and clear matching data. + */ +static VALUE +strscan_reset(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + p->curr = 0; + CLEAR_MATCH_STATUS(p); + return self; +} + +/* + * call-seq: + * terminate + * clear + * + * Set the scan pointer to the end of the string and clear matching data. + */ +static VALUE +strscan_terminate(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + p->curr = S_LEN(p); + CLEAR_MATCH_STATUS(p); + return self; +} + +/* + * Equivalent to #terminate. + * This method is obsolete; use #terminate instead. + */ +static VALUE +strscan_clear(VALUE self) +{ + rb_warning("StringScanner#clear is obsolete; use #terminate instead"); + return strscan_terminate(self); +} + +/* + * Returns the string being scanned. + */ +static VALUE +strscan_get_string(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + return p->str; +} + +/* + * call-seq: string=(str) + * + * Changes the string being scanned to +str+ and resets the scanner. + * Returns +str+. + */ +static VALUE +strscan_set_string(VALUE self, VALUE str) +{ + struct strscanner *p; + + Data_Get_Struct(self, struct strscanner, p); + StringValue(str); + p->str = rb_str_dup(str); + rb_obj_freeze(p->str); + p->curr = 0; + CLEAR_MATCH_STATUS(p); + return str; +} + +/* + * call-seq: + * concat(str) + * <<(str) + * + * Appends +str+ to the string being scanned. + * This method does not affect scan pointer. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.scan(/Fri /) + * s << " +1000 GMT" + * s.string # -> "Fri Dec 12 1975 14:39 +1000 GMT" + * s.scan(/Dec/) # -> "Dec" + */ +static VALUE +strscan_concat(VALUE self, VALUE str) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + StringValue(str); + rb_str_append(p->str, str); + return self; +} + +/* + * Returns the position of the scan pointer. In the 'reset' position, this + * value is zero. In the 'terminated' position (i.e. the string is exhausted), + * this value is the length of the string. + * + * In short, it's a 0-based index into the string. + * + * s = StringScanner.new('test string') + * s.pos # -> 0 + * s.scan_until /str/ # -> "test str" + * s.pos # -> 8 + * s.terminate # -> # + * s.pos # -> 11 + */ +static VALUE +strscan_get_pos(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + return INT2FIX(p->curr); +} + +/* + * call-seq: pos=(n) + * + * Modify the scan pointer. + * + * s = StringScanner.new('test string') + * s.pos = 7 # -> 7 + * s.rest # -> "ring" + */ +static VALUE +strscan_set_pos(VALUE self, VALUE v) +{ + struct strscanner *p; + long i; + + GET_SCANNER(self, p); + i = NUM2INT(v); + if (i < 0) i += S_LEN(p); + if (i < 0) rb_raise(rb_eRangeError, "index out of range"); + if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range"); + p->curr = i; + return INT2NUM(i); +} + +static VALUE +strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly) +{ + regex_t *rb_reg_prepare_re(VALUE re, VALUE str); + struct strscanner *p; + regex_t *re; + int ret; + int tmpreg; + + Check_Type(regex, T_REGEXP); + GET_SCANNER(self, p); + + CLEAR_MATCH_STATUS(p); + if (S_RESTLEN(p) < 0) { + return Qnil; + } + re = rb_reg_prepare_re(regex, p->str); + tmpreg = re != RREGEXP(regex)->ptr; + if (!tmpreg) RREGEXP(regex)->usecnt++; + + if (headonly) { + ret = onig_match(re, (UChar* )CURPTR(p), + (UChar* )(CURPTR(p) + S_RESTLEN(p)), + (UChar* )CURPTR(p), &(p->regs), ONIG_OPTION_NONE); + } + else { + ret = onig_search(re, + (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)), + (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)), + &(p->regs), ONIG_OPTION_NONE); + } + if (!tmpreg) RREGEXP(regex)->usecnt--; + if (tmpreg) { + if (RREGEXP(regex)->usecnt) { + onig_free(re); + } + else { + onig_free(RREGEXP(regex)->ptr); + RREGEXP(regex)->ptr = re; + } + } + + if (ret == -2) rb_raise(ScanError, "regexp buffer overflow"); + if (ret < 0) { + /* not matched */ + return Qnil; + } + + MATCHED(p); + p->prev = p->curr; + if (succptr) { + p->curr += p->regs.end[0]; + } + if (getstr) { + return extract_beg_len(p, p->prev, p->regs.end[0]); + } + else { + return INT2FIX(p->regs.end[0]); + } +} + +/* + * call-seq: scan(pattern) => String + * + * Tries to match with +pattern+ at the current position. If there's a match, + * the scanner advances the "scan pointer" and returns the matched string. + * Otherwise, the scanner returns +nil+. + * + * s = StringScanner.new('test string') + * p s.scan(/\w+/) # -> "test" + * p s.scan(/\w+/) # -> nil + * p s.scan(/\s+/) # -> " " + * p s.scan(/\w+/) # -> "string" + * p s.scan(/./) # -> nil + * + */ +static VALUE +strscan_scan(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 1, 1, 1); +} + +/* + * call-seq: match?(pattern) + * + * Tests whether the given +pattern+ is matched from the current scan pointer. + * Returns the length of the match, or +nil+. The scan pointer is not advanced. + * + * s = StringScanner.new('test string') + * p s.match?(/\w+/) # -> 4 + * p s.match?(/\w+/) # -> 4 + * p s.match?(/\s+/) # -> nil + */ +static VALUE +strscan_match_p(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 0, 0, 1); +} + +/* + * call-seq: skip(pattern) + * + * Attempts to skip over the given +pattern+ beginning with the scan pointer. + * If it matches, the scan pointer is advanced to the end of the match, and the + * length of the match is returned. Otherwise, +nil+ is returned. + * + * It's similar to #scan, but without returning the matched string. + * + * s = StringScanner.new('test string') + * p s.skip(/\w+/) # -> 4 + * p s.skip(/\w+/) # -> nil + * p s.skip(/\s+/) # -> 1 + * p s.skip(/\w+/) # -> 6 + * p s.skip(/./) # -> nil + * + */ +static VALUE +strscan_skip(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 1, 0, 1); +} + +/* + * call-seq: check(pattern) + * + * This returns the value that #scan would return, without advancing the scan + * pointer. The match register is affected, though. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.check /Fri/ # -> "Fri" + * s.pos # -> 0 + * s.matched # -> "Fri" + * s.check /12/ # -> nil + * s.matched # -> nil + * + * Mnemonic: it "checks" to see whether a #scan will return a value. + */ +static VALUE +strscan_check(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 0, 1, 1); +} + +/* + * call-seq: scan_full(pattern, advance_pointer_p, return_string_p) + * + * Tests whether the given +pattern+ is matched from the current scan pointer. + * Advances the scan pointer if +advance_pointer_p+ is true. + * Returns the matched string if +return_string_p+ is true. + * The match register is affected. + * + * "full" means "#scan with full parameters". + */ +static VALUE +strscan_scan_full(VALUE self, VALUE re, VALUE s, VALUE f) +{ + return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1); +} + +/* + * call-seq: scan_until(pattern) + * + * Scans the string _until_ the +pattern+ is matched. Returns the substring up + * to and including the end of the match, advancing the scan pointer to that + * location. If there is no match, +nil+ is returned. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.scan_until(/1/) # -> "Fri Dec 1" + * s.pre_match # -> "Fri Dec " + * s.scan_until(/XYZ/) # -> nil + */ +static VALUE +strscan_scan_until(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 1, 1, 0); +} + +/* + * call-seq: exist?(pattern) + * + * Looks _ahead_ to see if the +pattern+ exists _anywhere_ in the string, + * without advancing the scan pointer. This predicates whether a #scan_until + * will return a value. + * + * s = StringScanner.new('test string') + * s.exist? /s/ # -> 3 + * s.scan /test/ # -> "test" + * s.exist? /s/ # -> 2 + * s.exist? /e/ # -> nil + */ +static VALUE +strscan_exist_p(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 0, 0, 0); +} + +/* + * call-seq: skip_until(pattern) + * + * Advances the scan pointer until +pattern+ is matched and consumed. Returns + * the number of bytes advanced, or +nil+ if no match was found. + * + * Look ahead to match +pattern+, and advance the scan pointer to the _end_ + * of the match. Return the number of characters advanced, or +nil+ if the + * match was unsuccessful. + * + * It's similar to #scan_until, but without returning the intervening string. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.skip_until /12/ # -> 10 + * s # + */ +static VALUE +strscan_skip_until(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 1, 0, 0); +} + +/* + * call-seq: check_until(pattern) + * + * This returns the value that #scan_until would return, without advancing the + * scan pointer. The match register is affected, though. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.check_until /12/ # -> "Fri Dec 12" + * s.pos # -> 0 + * s.matched # -> 12 + * + * Mnemonic: it "checks" to see whether a #scan_until will return a value. + */ +static VALUE +strscan_check_until(VALUE self, VALUE re) +{ + return strscan_do_scan(self, re, 0, 1, 0); +} + +/* + * call-seq: search_full(pattern, advance_pointer_p, return_string_p) + * + * Scans the string _until_ the +pattern+ is matched. + * Advances the scan pointer if +advance_pointer_p+, otherwise not. + * Returns the matched string if +return_string_p+ is true, otherwise + * returns the number of bytes advanced. + * This method does affect the match register. + */ +static VALUE +strscan_search_full(VALUE self, VALUE re, VALUE s, VALUE f) +{ + return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0); +} + +static void +adjust_registers_to_matched(struct strscanner *p) +{ + onig_region_clear(&(p->regs)); + onig_region_set(&(p->regs), 0, 0, p->curr - p->prev); +} + +/* + * Scans one character and returns it. + * This method is multibyte character sensitive. + * + * s = StringScanner.new("ab") + * s.getch # => "a" + * s.getch # => "b" + * s.getch # => nil + * + * $KCODE = 'EUC' + * s = StringScanner.new("\244\242") + * s.getch # => "\244\242" # Japanese hira-kana "A" in EUC-JP + * s.getch # => nil + */ +static VALUE +strscan_getch(VALUE self) +{ + struct strscanner *p; + long len; + + GET_SCANNER(self, p); + CLEAR_MATCH_STATUS(p); + if (EOS_P(p)) + return Qnil; + + len = rb_enc_mbclen(CURPTR(p), S_PEND(p), rb_enc_get(p->str)); + if (p->curr + len > S_LEN(p)) { + len = S_LEN(p) - p->curr; + } + p->prev = p->curr; + p->curr += len; + MATCHED(p); + adjust_registers_to_matched(p); + return extract_range(p, p->prev + p->regs.beg[0], + p->prev + p->regs.end[0]); +} + +/* + * Scans one byte and returns it. + * This method is not multibyte character sensitive. + * See also: #getch. + * + * s = StringScanner.new('ab') + * s.get_byte # => "a" + * s.get_byte # => "b" + * s.get_byte # => nil + * + * $KCODE = 'EUC' + * s = StringScanner.new("\244\242") + * s.get_byte # => "\244" + * s.get_byte # => "\242" + * s.get_byte # => nil + */ +static VALUE +strscan_get_byte(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + CLEAR_MATCH_STATUS(p); + if (EOS_P(p)) + return Qnil; + + p->prev = p->curr; + p->curr++; + MATCHED(p); + adjust_registers_to_matched(p); + return extract_range(p, p->prev + p->regs.beg[0], + p->prev + p->regs.end[0]); +} + +/* + * Equivalent to #get_byte. + * This method is obsolete; use #get_byte instead. + */ +static VALUE +strscan_getbyte(VALUE self) +{ + rb_warning("StringScanner#getbyte is obsolete; use #get_byte instead"); + return strscan_get_byte(self); +} + +/* + * call-seq: peek(len) + * + * Extracts a string corresponding to string[pos,len], without + * advancing the scan pointer. + * + * s = StringScanner.new('test string') + * s.peek(7) # => "test st" + * s.peek(7) # => "test st" + * + */ +static VALUE +strscan_peek(VALUE self, VALUE vlen) +{ + struct strscanner *p; + long len; + + GET_SCANNER(self, p); + + len = NUM2LONG(vlen); + if (EOS_P(p)) + return infect(str_new(p, "", 0), p); + + if (p->curr + len > S_LEN(p)) + len = S_LEN(p) - p->curr; + return extract_beg_len(p, p->curr, len); +} + +/* + * Equivalent to #peek. + * This method is obsolete; use #peek instead. + */ +static VALUE +strscan_peep(VALUE self, VALUE vlen) +{ + rb_warning("StringScanner#peep is obsolete; use #peek instead"); + return strscan_peek(self, vlen); +} + +/* + * Set the scan pointer to the previous position. Only one previous position is + * remembered, and it changes with each scanning operation. + * + * s = StringScanner.new('test string') + * s.scan(/\w+/) # => "test" + * s.unscan + * s.scan(/../) # => "te" + * s.scan(/\d/) # => nil + * s.unscan # ScanError: unscan failed: previous match record not exist + */ +static VALUE +strscan_unscan(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) + rb_raise(ScanError, "unscan failed: previous match record not exist"); + p->curr = p->prev; + CLEAR_MATCH_STATUS(p); + return self; +} + +/* + * Returns +true+ iff the scan pointer is at the beginning of the line. + * + * s = StringScanner.new("test\ntest\n") + * s.bol? # => true + * s.scan(/te/) + * s.bol? # => false + * s.scan(/st\n/) + * s.bol? # => true + * s.terminate + * s.bol? # => true + */ +static VALUE +strscan_bol_p(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (CURPTR(p) > S_PEND(p)) return Qnil; + if (p->curr == 0) return Qtrue; + return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse; +} + +/* + * Returns +true+ if the scan pointer is at the end of the string. + * + * s = StringScanner.new('test string') + * p s.eos? # => false + * s.scan(/test/) + * p s.eos? # => false + * s.terminate + * p s.eos? # => true + */ +static VALUE +strscan_eos_p(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + return EOS_P(p) ? Qtrue : Qfalse; +} + +/* + * Equivalent to #eos?. + * This method is obsolete, use #eos? instead. + */ +static VALUE +strscan_empty_p(VALUE self) +{ + rb_warning("StringScanner#empty? is obsolete; use #eos? instead"); + return strscan_eos_p(self); +} + +/* + * Returns true iff there is more data in the string. See #eos?. + * This method is obsolete; use #eos? instead. + * + * s = StringScanner.new('test string') + * s.eos? # These two + * s.rest? # are opposites. + */ +static VALUE +strscan_rest_p(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + return EOS_P(p) ? Qfalse : Qtrue; +} + +/* + * Returns +true+ iff the last match was successful. + * + * s = StringScanner.new('test string') + * s.match?(/\w+/) # => 4 + * s.matched? # => true + * s.match?(/\d+/) # => nil + * s.matched? # => false + */ +static VALUE +strscan_matched_p(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + return MATCHED_P(p) ? Qtrue : Qfalse; +} + +/* + * Returns the last matched string. + * + * s = StringScanner.new('test string') + * s.match?(/\w+/) # -> 4 + * s.matched # -> "test" + */ +static VALUE +strscan_matched(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) return Qnil; + return extract_range(p, p->prev + p->regs.beg[0], + p->prev + p->regs.end[0]); +} + +/* + * Returns the size of the most recent match (see #matched), or +nil+ if there + * was no recent match. + * + * s = StringScanner.new('test string') + * s.check /\w+/ # -> "test" + * s.matched_size # -> 4 + * s.check /\d+/ # -> nil + * s.matched_size # -> nil + */ +static VALUE +strscan_matched_size(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) return Qnil; + return INT2NUM(p->regs.end[0] - p->regs.beg[0]); +} + +/* + * Equivalent to #matched_size. + * This method is obsolete; use #matched_size instead. + */ +static VALUE +strscan_matchedsize(VALUE self) +{ + rb_warning("StringScanner#matchedsize is obsolete; use #matched_size instead"); + return strscan_matched_size(self); +} + +/* + * call-seq: [](n) + * + * Return the n-th subgroup in the most recent match. + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.scan(/(\w+) (\w+) (\d+) /) # -> "Fri Dec 12 " + * s[0] # -> "Fri Dec 12 " + * s[1] # -> "Fri" + * s[2] # -> "Dec" + * s[3] # -> "12" + * s.post_match # -> "1975 14:39" + * s.pre_match # -> "" + */ +static VALUE +strscan_aref(VALUE self, VALUE idx) +{ + struct strscanner *p; + long i; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) return Qnil; + + i = NUM2LONG(idx); + if (i < 0) + i += p->regs.num_regs; + if (i < 0) return Qnil; + if (i >= p->regs.num_regs) return Qnil; + if (p->regs.beg[i] == -1) return Qnil; + + return extract_range(p, p->prev + p->regs.beg[i], + p->prev + p->regs.end[i]); +} + +/* + * Return the pre-match (in the regular expression sense) of the last scan. + * + * s = StringScanner.new('test string') + * s.scan(/\w+/) # -> "test" + * s.scan(/\s+/) # -> " " + * s.pre_match # -> "test" + * s.post_match # -> "string" + */ +static VALUE +strscan_pre_match(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) return Qnil; + return extract_range(p, 0, p->prev + p->regs.beg[0]); +} + +/* + * Return the post-match (in the regular expression sense) of the last scan. + * + * s = StringScanner.new('test string') + * s.scan(/\w+/) # -> "test" + * s.scan(/\s+/) # -> " " + * s.pre_match # -> "test" + * s.post_match # -> "string" + */ +static VALUE +strscan_post_match(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (! MATCHED_P(p)) return Qnil; + return extract_range(p, p->prev + p->regs.end[0], S_LEN(p)); +} + +/* + * Returns the "rest" of the string (i.e. everything after the scan pointer). + * If there is no more data (eos? = true), it returns "". + */ +static VALUE +strscan_rest(VALUE self) +{ + struct strscanner *p; + + GET_SCANNER(self, p); + if (EOS_P(p)) { + return infect(str_new(p, "", 0), p); + } + return extract_range(p, p->curr, S_LEN(p)); +} + +/* + * s.rest_size is equivalent to s.rest.size. + */ +static VALUE +strscan_rest_size(VALUE self) +{ + struct strscanner *p; + long i; + + GET_SCANNER(self, p); + if (EOS_P(p)) { + return INT2FIX(0); + } + i = S_LEN(p) - p->curr; + return INT2FIX(i); +} + +/* + * s.restsize is equivalent to s.rest_size. + * This method is obsolete; use #rest_size instead. + */ +static VALUE +strscan_restsize(VALUE self) +{ + rb_warning("StringScanner#restsize is obsolete; use #rest_size instead"); + return strscan_rest_size(self); +} + +#define INSPECT_LENGTH 5 +#define BUFSIZE 256 + +/* + * Returns a string that represents the StringScanner object, showing: + * - the current position + * - the size of the string + * - the characters surrounding the scan pointer + * + * s = StringScanner.new("Fri Dec 12 1975 14:39") + * s.inspect # -> '#' + * s.scan_until /12/ # -> "Fri Dec 12" + * s.inspect # -> '#' + */ +static VALUE +strscan_inspect(VALUE self) +{ + struct strscanner *p; + char buf[BUFSIZE]; + long len; + VALUE a, b; + + Data_Get_Struct(self, struct strscanner, p); + if (NIL_P(p->str)) { + len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>", + rb_class2name(CLASS_OF(self))); + return infect(rb_str_new(buf, len), p); + } + if (EOS_P(p)) { + len = snprintf(buf, BUFSIZE, "#<%s fin>", + rb_class2name(CLASS_OF(self))); + return infect(rb_str_new(buf, len), p); + } + if (p->curr == 0) { + b = inspect2(p); + len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>", + rb_class2name(CLASS_OF(self)), + p->curr, S_LEN(p), + RSTRING_PTR(b)); + return infect(rb_str_new(buf, len), p); + } + a = inspect1(p); + b = inspect2(p); + len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld %s @ %s>", + rb_class2name(CLASS_OF(self)), + p->curr, S_LEN(p), + RSTRING_PTR(a), + RSTRING_PTR(b)); + return infect(rb_str_new(buf, len), p); +} + +static VALUE +inspect1(struct strscanner *p) +{ + char buf[BUFSIZE]; + char *bp = buf; + long len; + + if (p->curr == 0) return rb_str_new2(""); + if (p->curr > INSPECT_LENGTH) { + strcpy(bp, "..."); bp += 3; + len = INSPECT_LENGTH; + } + else { + len = p->curr; + } + memcpy(bp, CURPTR(p) - len, len); bp += len; + return rb_str_dump(rb_str_new(buf, bp - buf)); +} + +static VALUE +inspect2(struct strscanner *p) +{ + char buf[BUFSIZE]; + char *bp = buf; + long len; + + if (EOS_P(p)) return rb_str_new2(""); + len = S_LEN(p) - p->curr; + if (len > INSPECT_LENGTH) { + len = INSPECT_LENGTH; + memcpy(bp, CURPTR(p), len); bp += len; + strcpy(bp, "..."); bp += 3; + } + else { + memcpy(bp, CURPTR(p), len); bp += len; + } + return rb_str_dump(rb_str_new(buf, bp - buf)); +} + +/* ======================================================================= + Ruby Interface + ======================================================================= */ + +/* + * Document-class: StringScanner + * + * StringScanner provides for lexical scanning operations on a String. Here is + * an example of its usage: + * + * s = StringScanner.new('This is an example string') + * s.eos? # -> false + * + * p s.scan(/\w+/) # -> "This" + * p s.scan(/\w+/) # -> nil + * p s.scan(/\s+/) # -> " " + * p s.scan(/\s+/) # -> nil + * p s.scan(/\w+/) # -> "is" + * s.eos? # -> false + * + * p s.scan(/\s+/) # -> " " + * p s.scan(/\w+/) # -> "an" + * p s.scan(/\s+/) # -> " " + * p s.scan(/\w+/) # -> "example" + * p s.scan(/\s+/) # -> " " + * p s.scan(/\w+/) # -> "string" + * s.eos? # -> true + * + * p s.scan(/\s+/) # -> nil + * p s.scan(/\w+/) # -> nil + * + * Scanning a string means remembering the position of a scan pointer, + * which is just an index. The point of scanning is to move forward a bit at + * a time, so matches are sought after the scan pointer; usually immediately + * after it. + * + * Given the string "test string", here are the pertinent scan pointer + * positions: + * + * t e s t s t r i n g + * 0 1 2 ... 1 + * 0 + * + * When you #scan for a pattern (a regular expression), the match must occur + * at the character after the scan pointer. If you use #scan_until, then the + * match can occur anywhere after the scan pointer. In both cases, the scan + * pointer moves just beyond the last character of the match, ready to + * scan again from the next character onwards. This is demonstrated by the + * example above. + * + * == Method Categories + * + * There are other methods besides the plain scanners. You can look ahead in + * the string without actually scanning. You can access the most recent match. + * You can modify the string being scanned, reset or terminate the scanner, + * find out or change the position of the scan pointer, skip ahead, and so on. + * + * === Advancing the Scan Pointer + * + * - #getch + * - #get_byte + * - #scan + * - #scan_until + * - #skip + * - #skip_until + * + * === Looking Ahead + * + * - #check + * - #check_until + * - #exist? + * - #match? + * - #peek + * + * === Finding Where we Are + * + * - #beginning_of_line? (#bol?) + * - #eos? + * - #rest? + * - #rest_size + * - #pos + * + * === Setting Where we Are + * + * - #reset + * - #terminate + * - #pos= + * + * === Match Data + * + * - #matched + * - #matched? + * - #matched_size + * - [] + * - #pre_match + * - #post_match + * + * === Miscellaneous + * + * - << + * - #concat + * - #string + * - #string= + * - #unscan + * + * There are aliases to several of the methods. + */ +void +Init_strscan() +{ + ID id_scanerr = rb_intern("ScanError"); + VALUE tmp; + + StringScanner = rb_define_class("StringScanner", rb_cObject); + ScanError = rb_define_class_under(StringScanner, "Error", rb_eStandardError); + if (!rb_const_defined(rb_cObject, id_scanerr)) { + rb_const_set(rb_cObject, id_scanerr, ScanError); + } + tmp = rb_str_new2(STRSCAN_VERSION); + rb_obj_freeze(tmp); + rb_const_set(StringScanner, rb_intern("Version"), tmp); + tmp = rb_str_new2("$Id: strscan.c 18968 2008-08-31 02:43:17Z akr $"); + rb_obj_freeze(tmp); + rb_const_set(StringScanner, rb_intern("Id"), tmp); + + rb_define_alloc_func(StringScanner, strscan_s_allocate); + rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1); + rb_define_private_method(StringScanner, "initialize_copy", strscan_init_copy, 1); + rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0); + rb_define_method(StringScanner, "reset", strscan_reset, 0); + rb_define_method(StringScanner, "terminate", strscan_terminate, 0); + rb_define_method(StringScanner, "clear", strscan_clear, 0); + rb_define_method(StringScanner, "string", strscan_get_string, 0); + rb_define_method(StringScanner, "string=", strscan_set_string, 1); + rb_define_method(StringScanner, "concat", strscan_concat, 1); + rb_define_method(StringScanner, "<<", strscan_concat, 1); + rb_define_method(StringScanner, "pos", strscan_get_pos, 0); + rb_define_method(StringScanner, "pos=", strscan_set_pos, 1); + rb_define_method(StringScanner, "pointer", strscan_get_pos, 0); + rb_define_method(StringScanner, "pointer=", strscan_set_pos, 1); + + rb_define_method(StringScanner, "scan", strscan_scan, 1); + rb_define_method(StringScanner, "skip", strscan_skip, 1); + rb_define_method(StringScanner, "match?", strscan_match_p, 1); + rb_define_method(StringScanner, "check", strscan_check, 1); + rb_define_method(StringScanner, "scan_full", strscan_scan_full, 3); + + rb_define_method(StringScanner, "scan_until", strscan_scan_until, 1); + rb_define_method(StringScanner, "skip_until", strscan_skip_until, 1); + rb_define_method(StringScanner, "exist?", strscan_exist_p, 1); + rb_define_method(StringScanner, "check_until", strscan_check_until, 1); + rb_define_method(StringScanner, "search_full", strscan_search_full, 3); + + rb_define_method(StringScanner, "getch", strscan_getch, 0); + rb_define_method(StringScanner, "get_byte", strscan_get_byte, 0); + rb_define_method(StringScanner, "getbyte", strscan_getbyte, 0); + rb_define_method(StringScanner, "peek", strscan_peek, 1); + rb_define_method(StringScanner, "peep", strscan_peep, 1); + + rb_define_method(StringScanner, "unscan", strscan_unscan, 0); + + rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0); + rb_alias(StringScanner, rb_intern("bol?"), rb_intern("beginning_of_line?")); + rb_define_method(StringScanner, "eos?", strscan_eos_p, 0); + rb_define_method(StringScanner, "empty?", strscan_empty_p, 0); + rb_define_method(StringScanner, "rest?", strscan_rest_p, 0); + + rb_define_method(StringScanner, "matched?", strscan_matched_p, 0); + rb_define_method(StringScanner, "matched", strscan_matched, 0); + rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0); + rb_define_method(StringScanner, "matchedsize", strscan_matchedsize, 0); + rb_define_method(StringScanner, "[]", strscan_aref, 1); + rb_define_method(StringScanner, "pre_match", strscan_pre_match, 0); + rb_define_method(StringScanner, "post_match", strscan_post_match, 0); + + rb_define_method(StringScanner, "rest", strscan_rest, 0); + rb_define_method(StringScanner, "rest_size", strscan_rest_size, 0); + rb_define_method(StringScanner, "restsize", strscan_restsize, 0); + + rb_define_method(StringScanner, "inspect", strscan_inspect, 0); +} diff --git a/lib/ruby-1.9.1-rc1/ext/syck/.cvsignore b/lib/ruby-1.9.1-rc1/ext/syck/.cvsignore new file mode 100644 index 0000000..814345e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/.cvsignore @@ -0,0 +1,4 @@ +Makefile +mkmf.log +*.def +extconf.h diff --git a/lib/ruby-1.9.1-rc1/ext/syck/bytecode.c b/lib/ruby-1.9.1-rc1/ext/syck/bytecode.c new file mode 100644 index 0000000..82c9d96 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/bytecode.c @@ -0,0 +1,1165 @@ +/* Generated by re2c 0.9.10 on Mon Sep 19 23:21:26 2005 */ +#line 1 "bytecode.re" +/* + * bytecode.re + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + */ +#include "ruby/ruby.h" +#include "syck.h" +#include "gram.h" + +#define QUOTELEN 128 + +/* + * They do my bidding... + */ +#define YYCTYPE char +#define YYCURSOR parser->cursor +#define YYMARKER parser->marker +#define YYLIMIT parser->limit +#define YYTOKEN parser->token +#define YYTOKTMP parser->toktmp +#define YYLINEPTR parser->lineptr +#define YYLINECTPTR parser->linectptr +#define YYLINE parser->linect +#define YYFILL(n) syck_parser_read(parser) + +extern SyckParser *syck_parser_ptr; + +char *get_inline( SyckParser *parser ); + +/* + * Repositions the cursor at `n' offset from the token start. + * Only works in `Header' and `Document' sections. + */ +#define YYPOS(n) YYCURSOR = YYTOKEN + n + +/* + * Track line numbers + */ +#define CHK_NL(ptr) if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; } + +/* + * I like seeing the level operations as macros... + */ +#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status ) +#define POP_LEVEL() syck_parser_pop_level( parser ) +#define CURRENT_LEVEL() syck_parser_current_level( parser ) + +/* + * Force a token next time around sycklex() + */ +#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok; + +/* + * Adding levels in bytecode requires us to make sure + * we've got all our tokens worked out. + */ +#define ADD_BYTE_LEVEL(lvl, len, s ) \ + switch ( lvl->status ) \ + { \ + case syck_lvl_seq: \ + lvl->ncount++; \ + ADD_LEVEL(len, syck_lvl_open); \ + YYPOS(0); \ + return '-'; \ + \ + case syck_lvl_map: \ + lvl->ncount++; \ + ADD_LEVEL(len, s); \ + break; \ + \ + case syck_lvl_open: \ + lvl->status = s; \ + break; \ + \ + default: \ + ADD_LEVEL(len, s); \ + break; \ + } + +/* + * Nice little macro to ensure we're YAML_IOPENed to the current level. + * * Only use this macro in the "Document" section * + */ +#define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \ + if ( last_lvl->spaces < to_len ) \ + { \ + if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \ + { \ + goto Document; \ + } \ + else \ + { \ + ADD_LEVEL( to_len, lvl_type ); \ + if ( reset == 1 ) YYPOS(0); \ + return YAML_IOPEN; \ + } \ + } + +/* + * Nice little macro to ensure closure of levels. + * * Only use this macro in the "Document" section * + */ +#define ENSURE_YAML_IEND(last_lvl, to_len) \ + if ( last_lvl->spaces > to_len ) \ + { \ + syck_parser_pop_level( parser ); \ + YYPOS(0); \ + return YAML_IEND; \ + } + +/* + * Concatenates string items and manages allocation + * to the string + */ +#define CAT(s, c, i, l) \ + { \ + if ( i + 1 >= c ) \ + { \ + c += QUOTELEN; \ + S_REALLOC_N( s, char, c ); \ + } \ + s[i++] = l; \ + s[i] = '\0'; \ + } + +/* + * Parser for standard YAML Bytecode [UTF-8] + */ +int +sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser ) +{ + SyckLevel *lvl; + syck_parser_ptr = parser; + if ( YYCURSOR == NULL ) + { + syck_parser_read( parser ); + } + + if ( parser->force_token != 0 ) + { + int t = parser->force_token; + parser->force_token = 0; + return t; + } + +#line 172 "bytecode.re" + + + lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_doc ) + { + goto Document; + } + +/* Header: */ + + YYTOKEN = YYCURSOR; + + +#line 165 "" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + goto yy0; + ++YYCURSOR; +yy0: + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy2; + case 'D': goto yy3; + default: goto yy5; + } +yy2: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy4; + } +yy3: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy6; + case 0x0D: goto yy8; + default: goto yy4; + } +yy4: +#line 199 "bytecode.re" +{ YYPOS(0); + goto Document; + } +#line 195 "" +yy5: yych = *++YYCURSOR; + goto yy4; +yy6: ++YYCURSOR; + goto yy7; +yy7: +#line 186 "bytecode.re" +{ if ( lvl->status == syck_lvl_header ) + { + CHK_NL(YYCURSOR); + goto Directive; + } + else + { + ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } + } +#line 214 "" +yy8: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy6; + default: goto yy2; + } +} +#line 203 "bytecode.re" + + +Document: + { + lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_header ) + { + lvl->status = syck_lvl_doc; + } + + YYTOKEN = YYCURSOR; + + +#line 235 "" +{ + YYCTYPE yych; + goto yy9; + ++YYCURSOR; +yy9: + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy30; + case 0x0A: goto yy27; + case 0x0D: goto yy29; + case 'A': goto yy19; + case 'D': goto yy12; + case 'E': goto yy16; + case 'M': goto yy14; + case 'P': goto yy13; + case 'Q': goto yy15; + case 'R': goto yy21; + case 'S': goto yy17; + case 'T': goto yy23; + case 'c': goto yy25; + default: goto yy11; + } +yy11:yy12: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy41; + case 0x0D: goto yy44; + default: goto yy11; + } +yy13: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy41; + case 0x0D: goto yy43; + default: goto yy11; + } +yy14: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy38; + case 0x0D: goto yy40; + default: goto yy11; + } +yy15: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy35; + case 0x0D: goto yy37; + default: goto yy11; + } +yy16: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy32; + case 0x0D: goto yy34; + default: goto yy11; + } +yy17: ++YYCURSOR; + goto yy18; +yy18: +#line 288 "bytecode.re" +{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); + goto Scalar; + } +#line 296 "" +yy19: ++YYCURSOR; + goto yy20; +yy20: +#line 292 "bytecode.re" +{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open); + sycklval->name = get_inline( parser ); + syck_hdlr_remove_anchor( parser, sycklval->name ); + CHK_NL(YYCURSOR); + return YAML_ANCHOR; + } +#line 307 "" +yy21: ++YYCURSOR; + goto yy22; +yy22: +#line 299 "bytecode.re" +{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); + sycklval->name = get_inline( parser ); + POP_LEVEL(); + if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--; + return YAML_ALIAS; + } +#line 318 "" +yy23: ++YYCURSOR; + goto yy24; +yy24: +#line 306 "bytecode.re" +{ char *qstr; + ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open); + qstr = get_inline( parser ); + CHK_NL(YYCURSOR); + if ( qstr[0] == '!' ) + { + int qidx = strlen( qstr ); + if ( qstr[1] == '\0' ) + { + free( qstr ); + return YAML_ITRANSFER; + } + + lvl = CURRENT_LEVEL(); + + /* + * URL Prefixing + */ + if ( qstr[1] == '^' ) + { + sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) ); + sycklval->name[0] = '\0'; + strcat( sycklval->name, lvl->domain ); + strncat( sycklval->name, qstr + 2, qidx - 2 ); + free( qstr ); + } + else + { + char *carat = qstr + 1; + char *qend = qstr + qidx; + while ( (++carat) < qend ) + { + if ( *carat == '^' ) + break; + } + + if ( carat < qend ) + { + free( lvl->domain ); + lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) ); + sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) ); + sycklval->name[0] = '\0'; + strcat( sycklval->name, lvl->domain ); + strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 ); + free( qstr ); + } + else + { + sycklval->name = S_ALLOC_N( char, strlen( qstr ) ); + sycklval->name[0] = '\0'; + S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) ); + free( qstr ); + } + } + return YAML_TRANSFER; + } + sycklval->name = qstr; + return YAML_TAGURI; + } +#line 382 "" +yy25: ++YYCURSOR; + goto yy26; +yy26: +#line 366 "bytecode.re" +{ goto Comment; } +#line 388 "" +yy27: ++YYCURSOR; + goto yy28; +yy28: +#line 368 "bytecode.re" +{ CHK_NL(YYCURSOR); + if ( lvl->status == syck_lvl_seq ) + { + return YAML_INDENT; + } + else if ( lvl->status == syck_lvl_map ) + { + if ( lvl->ncount % 2 == 1 ) return ':'; + else return YAML_INDENT; + } + goto Document; + } +#line 405 "" +yy29: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy27; + default: goto yy11; + } +yy30: ++YYCURSOR; + goto yy31; +yy31: +#line 381 "bytecode.re" +{ ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } +#line 419 "" +yy32: ++YYCURSOR; + goto yy33; +yy33: +#line 252 "bytecode.re" +{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 ) + { + lvl->ncount++; + YYPOS(0); + FORCE_NEXT_TOKEN( ']' ); + return '['; + } + else if ( lvl->status == syck_lvl_map && lvl->ncount == 0 ) + { + lvl->ncount++; + YYPOS(0); + FORCE_NEXT_TOKEN( '}' ); + return '{'; + } + + POP_LEVEL(); + lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_seq ) + { + FORCE_NEXT_TOKEN(YAML_INDENT); + } + else if ( lvl->status == syck_lvl_map ) + { + if ( lvl->ncount % 2 == 1 ) + { + FORCE_NEXT_TOKEN(':'); + } + else + { + FORCE_NEXT_TOKEN(YAML_INDENT); + } + } + CHK_NL(YYCURSOR); + return YAML_IEND; + } +#line 459 "" +yy34: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy32; + default: goto yy11; + } +yy35: ++YYCURSOR; + goto yy36; +yy36: +#line 237 "bytecode.re" +{ int complex = 0; + if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) ) + { + complex = 1; + } + ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq); + CHK_NL(YYCURSOR); + if ( complex ) + { + FORCE_NEXT_TOKEN( YAML_IOPEN ); + return '?'; + } + return YAML_IOPEN; + } +#line 483 "" +yy37: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy35; + default: goto yy11; + } +yy38: ++YYCURSOR; + goto yy39; +yy39: +#line 222 "bytecode.re" +{ int complex = 0; + if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) ) + { + complex = 1; + } + ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map); + CHK_NL(YYCURSOR); + if ( complex ) + { + FORCE_NEXT_TOKEN( YAML_IOPEN ); + return '?'; + } + return YAML_IOPEN; + } +#line 507 "" +yy40: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy38; + default: goto yy11; + } +yy41: ++YYCURSOR; + goto yy42; +yy42: +#line 217 "bytecode.re" +{ ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } +#line 521 "" +yy43: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy41; + default: goto yy11; + } +yy44: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy41; + default: goto yy11; + } +} +#line 386 "bytecode.re" + + + } + +Directive: + { + YYTOKEN = YYCURSOR; + + +#line 543 "" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + goto yy45; + ++YYCURSOR; +yy45: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy47; + case 'V': goto yy48; + default: goto yy50; + } +yy47: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy49; + } +yy48: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy51; + default: goto yy49; + } +yy49: +#line 399 "bytecode.re" +{ YYCURSOR = YYTOKEN; + return YAML_DOCSEP; + } +#line 646 "" +yy50: yych = *++YYCURSOR; + goto yy49; +yy51: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy52; +yy52: switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy51; + case ':': goto yy53; + default: goto yy47; + } +yy53: yych = *++YYCURSOR; + switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy54; + default: goto yy47; + } +yy54: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy55; +yy55: switch(yych){ + case 0x0A: goto yy56; + case 0x0D: goto yy58; + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy54; + default: goto yy47; + } +yy56: ++YYCURSOR; + goto yy57; +yy57: +#line 396 "bytecode.re" +{ CHK_NL(YYCURSOR); + goto Directive; } +#line 899 "" +yy58: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy56; + default: goto yy47; + } +} +#line 402 "bytecode.re" + + + } + +Comment: + { + YYTOKEN = YYCURSOR; + + +#line 916 "" +{ + YYCTYPE yych; + goto yy59; + ++YYCURSOR; +yy59: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy61; + case 0x0A: goto yy62; + case 0x0D: goto yy64; + default: goto yy66; + } +yy61:yy62: ++YYCURSOR; + goto yy63; +yy63: +#line 412 "bytecode.re" +{ CHK_NL(YYCURSOR); + goto Document; } +#line 936 "" +yy64: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy67; + default: goto yy65; + } +yy65: +#line 415 "bytecode.re" +{ goto Comment; } +#line 945 "" +yy66: yych = *++YYCURSOR; + goto yy65; +yy67: ++YYCURSOR; + yych = *YYCURSOR; + goto yy63; +} +#line 417 "bytecode.re" + + + } + +Scalar: + { + int idx = 0; + int cap = 100; + char *str = S_ALLOC_N( char, cap ); + char *tok; + + str[0] = '\0'; + +Scalar2: + tok = YYCURSOR; + + +#line 970 "" +{ + YYCTYPE yych; + goto yy68; + ++YYCURSOR; +yy68: + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy74; + case 0x0A: goto yy70; + case 0x0D: goto yy72; + default: goto yy76; + } +yy70: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 'C': goto yy78; + case 'N': goto yy80; + case 'Z': goto yy83; + default: goto yy71; + } +yy71: +#line 461 "bytecode.re" +{ YYCURSOR = tok; + goto ScalarEnd; + } +#line 996 "" +yy72: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy77; + default: goto yy73; + } +yy73: +#line 469 "bytecode.re" +{ CAT(str, cap, idx, tok[0]); + goto Scalar2; + } +#line 1007 "" +yy74: ++YYCURSOR; + goto yy75; +yy75: +#line 465 "bytecode.re" +{ YYCURSOR = tok; + goto ScalarEnd; + } +#line 1015 "" +yy76: yych = *++YYCURSOR; + goto yy73; +yy77: yych = *++YYCURSOR; + switch(yych){ + case 'C': goto yy78; + case 'N': goto yy80; + case 'Z': goto yy83; + default: goto yy71; + } +yy78: ++YYCURSOR; + goto yy79; +yy79: +#line 435 "bytecode.re" +{ CHK_NL(tok+1); + goto Scalar2; } +#line 1031 "" +yy80: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy81; +yy81: switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy80; + default: goto yy82; + } +yy82: +#line 438 "bytecode.re" +{ CHK_NL(tok+1); + if ( tok + 2 < YYCURSOR ) + { + char *count = tok + 2; + int total = strtod( count, NULL ); + int i; + for ( i = 0; i < total; i++ ) + { + CAT(str, cap, idx, '\n'); + } + } + else + { + CAT(str, cap, idx, '\n'); + } + goto Scalar2; + } +#line 1068 "" +yy83: ++YYCURSOR; + goto yy84; +yy84: +#line 456 "bytecode.re" +{ CHK_NL(tok+1); + CAT(str, cap, idx, '\0'); + goto Scalar2; + } +#line 1077 "" +} +#line 473 "bytecode.re" + + +ScalarEnd: + { + SyckNode *n = syck_alloc_str(); + n->data.str->ptr = str; + n->data.str->len = idx; + sycklval->nodeData = n; + POP_LEVEL(); + if ( parser->implicit_typing == 1 ) + { + try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); + } + return YAML_PLAIN; + } + } + +} + +char * +get_inline( SyckParser *parser ) +{ + int idx = 0; + int cap = 100; + char *str = S_ALLOC_N( char, cap ); + char *tok; + + str[0] = '\0'; + +Inline: + { + tok = YYCURSOR; + + +#line 1114 "" +{ + YYCTYPE yych; + goto yy85; + ++YYCURSOR; +yy85: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy91; + case 0x0A: goto yy87; + case 0x0D: goto yy89; + default: goto yy93; + } +yy87: ++YYCURSOR; + goto yy88; +yy88: +#line 508 "bytecode.re" +{ CHK_NL(YYCURSOR); + return str; } +#line 1134 "" +yy89: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy94; + default: goto yy90; + } +yy90: +#line 515 "bytecode.re" +{ CAT(str, cap, idx, tok[0]); + goto Inline; + } +#line 1145 "" +yy91: ++YYCURSOR; + goto yy92; +yy92: +#line 511 "bytecode.re" +{ YYCURSOR = tok; + return str; + } +#line 1153 "" +yy93: yych = *++YYCURSOR; + goto yy90; +yy94: ++YYCURSOR; + yych = *YYCURSOR; + goto yy88; +} +#line 519 "bytecode.re" + + + } + +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/depend b/lib/ruby-1.9.1-rc1/ext/syck/depend new file mode 100644 index 0000000..3eec4de --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/depend @@ -0,0 +1,12 @@ +ruby_headers = $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h \ + $(hdrdir)/missing.h $(hdrdir)/intern.h $(hdrdir)/st.h +bytecode.o: bytecode.c syck.h gram.h $(ruby_headers) +emitter.o: emitter.c syck.h $(ruby_headers) +gram.o: gram.c syck.h $(hdrdir)/st.h +handler.o: handler.c syck.h $(ruby_headers) +implicit.o: implicit.c syck.h $(ruby_headers) +node.o: node.c syck.h $(ruby_headers) +rubyext.o: rubyext.c syck.h $(ruby_headers) +syck.o: syck.c syck.h $(ruby_headers) +token.o: token.c syck.h gram.h $(ruby_headers) +yaml2byte.o: yaml2byte.c syck.h yamlbyte.h $(ruby_headers) diff --git a/lib/ruby-1.9.1-rc1/ext/syck/emitter.c b/lib/ruby-1.9.1-rc1/ext/syck/emitter.c new file mode 100644 index 0000000..295e763 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/emitter.c @@ -0,0 +1,1247 @@ +/* + * emitter.c + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + * + * All Base64 code from Ruby's pack.c. + * Ruby is Copyright (C) 1993-2007 Yukihiro Matsumoto + */ +#include "ruby/ruby.h" + +#include +#include + +#include "syck.h" + +#define DEFAULT_ANCHOR_FORMAT "id%03d" + +const char hex_table[] = +"0123456789ABCDEF"; +static char b64_table[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +/* + * Built-in base64 (from Ruby's pack.c) + */ +char * +syck_base64enc( char *s, long len ) +{ + long i = 0; + int padding = '='; + char *buff = S_ALLOC_N(char, len * 4 / 3 + 6); + + while (len >= 3) { + buff[i++] = b64_table[077 & (*s >> 2)]; + buff[i++] = b64_table[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))]; + buff[i++] = b64_table[077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03))]; + buff[i++] = b64_table[077 & s[2]]; + s += 3; + len -= 3; + } + if (len == 2) { + buff[i++] = b64_table[077 & (*s >> 2)]; + buff[i++] = b64_table[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))]; + buff[i++] = b64_table[077 & (((s[1] << 2) & 074) | (('\0' >> 6) & 03))]; + buff[i++] = padding; + } + else if (len == 1) { + buff[i++] = b64_table[077 & (*s >> 2)]; + buff[i++] = b64_table[077 & (((*s << 4) & 060) | (('\0' >> 4) & 017))]; + buff[i++] = padding; + buff[i++] = padding; + } + buff[i++] = '\n'; + return buff; +} + +char * +syck_base64dec( char *s, long len ) +{ + int a = -1,b = -1,c = 0,d; + static int first = 1; + static int b64_xtable[256]; + char *ptr = syck_strndup( s, len ); + char *end = ptr; + char *send = s + len; + + if (first) { + int i; + first = 0; + + for (i = 0; i < 256; i++) { + b64_xtable[i] = -1; + } + for (i = 0; i < 64; i++) { + b64_xtable[(int)b64_table[i]] = i; + } + } + while (s < send) { + while (s[0] == '\r' || s[0] == '\n') { s++; } + if ((a = b64_xtable[(int)s[0]]) == -1) break; + if ((b = b64_xtable[(int)s[1]]) == -1) break; + if ((c = b64_xtable[(int)s[2]]) == -1) break; + if ((d = b64_xtable[(int)s[3]]) == -1) break; + *end++ = a << 2 | b >> 4; + *end++ = b << 4 | c >> 2; + *end++ = c << 6 | d; + s += 4; + } + if (a != -1 && b != -1) { + if (s + 2 < send && s[2] == '=') + *end++ = a << 2 | b >> 4; + if (c != -1 && s + 3 < send && s[3] == '=') { + *end++ = a << 2 | b >> 4; + *end++ = b << 4 | c >> 2; + } + } + *end = '\0'; + /*RSTRING_LEN(buf) = ptr - RSTRING_PTR(buf);*/ + return ptr; +} + +/* + * Allocate an emitter + */ +SyckEmitter * +syck_new_emitter(void) +{ + SyckEmitter *e; + e = S_ALLOC( SyckEmitter ); + e->headless = 0; + e->use_header = 0; + e->use_version = 0; + e->sort_keys = 0; + e->anchor_format = NULL; + e->explicit_typing = 0; + e->best_width = 80; + e->style = scalar_none; + e->stage = doc_open; + e->indent = 2; + e->level = -1; + e->anchors = NULL; + e->markers = NULL; + e->anchored = NULL; + e->bufsize = SYCK_BUFFERSIZE; + e->buffer = NULL; + e->marker = NULL; + e->bufpos = 0; + e->emitter_handler = NULL; + e->output_handler = NULL; + e->lvl_idx = 0; + e->lvl_capa = ALLOC_CT; + e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa ); + syck_emitter_reset_levels( e ); + e->bonus = NULL; + return e; +} + +int +syck_st_free_anchors( char *key, char *name, char *arg ) +{ + S_FREE( name ); + return ST_CONTINUE; +} + +void +syck_emitter_st_free( SyckEmitter *e ) +{ + /* + * Free the anchor tables + */ + if ( e->anchors != NULL ) + { + st_foreach( e->anchors, syck_st_free_anchors, 0 ); + st_free_table( e->anchors ); + e->anchors = NULL; + } + + if ( e->anchored != NULL ) + { + st_free_table( e->anchored ); + e->anchored = NULL; + } + + /* + * Free the markers tables + */ + if ( e->markers != NULL ) + { + st_free_table( e->markers ); + e->markers = NULL; + } +} + +SyckLevel * +syck_emitter_current_level( SyckEmitter *e ) +{ + return &e->levels[e->lvl_idx-1]; +} + +SyckLevel * +syck_emitter_parent_level( SyckEmitter *e ) +{ + return &e->levels[e->lvl_idx-2]; +} + +void +syck_emitter_pop_level( SyckEmitter *e ) +{ + ASSERT( e != NULL ); + + /* The root level should never be popped */ + if ( e->lvl_idx <= 1 ) return; + + e->lvl_idx -= 1; + free( e->levels[e->lvl_idx].domain ); +} + +void +syck_emitter_add_level( SyckEmitter *e, int len, enum syck_level_status status ) +{ + ASSERT( e != NULL ); + if ( e->lvl_idx + 1 > e->lvl_capa ) + { + e->lvl_capa += ALLOC_CT; + S_REALLOC_N( e->levels, SyckLevel, e->lvl_capa ); + } + + ASSERT( len > e->levels[e->lvl_idx-1].spaces ); + e->levels[e->lvl_idx].spaces = len; + e->levels[e->lvl_idx].ncount = 0; + e->levels[e->lvl_idx].domain = syck_strndup( e->levels[e->lvl_idx-1].domain, strlen( e->levels[e->lvl_idx-1].domain ) ); + e->levels[e->lvl_idx].status = status; + e->levels[e->lvl_idx].anctag = 0; + e->lvl_idx += 1; +} + +void +syck_emitter_reset_levels( SyckEmitter *e ) +{ + while ( e->lvl_idx > 1 ) + { + syck_emitter_pop_level( e ); + } + + if ( e->lvl_idx < 1 ) + { + e->lvl_idx = 1; + e->levels[0].spaces = -1; + e->levels[0].ncount = 0; + e->levels[0].domain = syck_strndup( "", 0 ); + e->levels[0].anctag = 0; + } + e->levels[0].status = syck_lvl_header; +} + +void +syck_emitter_handler( SyckEmitter *e, SyckEmitterHandler hdlr ) +{ + e->emitter_handler = hdlr; +} + +void +syck_output_handler( SyckEmitter *e, SyckOutputHandler hdlr ) +{ + e->output_handler = hdlr; +} + +void +syck_free_emitter( SyckEmitter *e ) +{ + /* + * Free tables + */ + syck_emitter_st_free( e ); + syck_emitter_reset_levels( e ); + S_FREE( e->levels[0].domain ); + S_FREE( e->levels ); + if ( e->buffer != NULL ) + { + S_FREE( e->buffer ); + } + S_FREE( e ); +} + +void +syck_emitter_clear( SyckEmitter *e ) +{ + if ( e->buffer == NULL ) + { + e->buffer = S_ALLOC_N( char, e->bufsize ); + S_MEMZERO( e->buffer, char, e->bufsize ); + } + e->buffer[0] = '\0'; + e->marker = e->buffer; + e->bufpos = 0; +} + +/* + * Raw write to the emitter buffer. + */ +void +syck_emitter_write( SyckEmitter *e, const char *str, long len ) +{ + long at; + ASSERT( str != NULL ); + if ( e->buffer == NULL ) + { + syck_emitter_clear( e ); + } + + /* + * Flush if at end of buffer + */ + at = e->marker - e->buffer; + if ( len + at >= e->bufsize ) + { + syck_emitter_flush( e, 0 ); + for (;;) { + long rest = e->bufsize - (e->marker - e->buffer); + if (len <= rest) break; + S_MEMCPY( e->marker, str, char, rest ); + e->marker += rest; + str += rest; + len -= rest; + syck_emitter_flush( e, 0 ); + } + } + + /* + * Write to buffer + */ + S_MEMCPY( e->marker, str, char, len ); + e->marker += len; +} + +/* + * Write a chunk of data out. + */ +void +syck_emitter_flush( SyckEmitter *e, long check_room ) +{ + /* + * Check for enough space in the buffer for check_room length. + */ + if ( check_room > 0 ) + { + if ( e->bufsize > ( e->marker - e->buffer ) + check_room ) + { + return; + } + } + else + { + check_room = e->bufsize; + } + + /* + * Commit buffer. + */ + if ( check_room > e->marker - e->buffer ) + { + check_room = e->marker - e->buffer; + } + (e->output_handler)( e, e->buffer, check_room ); + e->bufpos += check_room; + e->marker -= check_room; +} + +/* + * Start emitting from the given node, check for anchoring and then + * issue the callback to the emitter handler. + */ +void +syck_emit( SyckEmitter *e, st_data_t n ) +{ + SYMID oid; + char *anchor_name = NULL; + int indent = 0; + long x = 0; + SyckLevel *lvl = syck_emitter_current_level( e ); + + /* + * Determine headers. + */ + if ( e->stage == doc_open && ( e->headless == 0 || e->use_header == 1 ) ) + { + if ( e->use_version == 1 ) + { + char *header = S_ALLOC_N( char, 64 ); + S_MEMZERO( header, char, 64 ); + sprintf( header, "--- %%YAML:%d.%d ", SYCK_YAML_MAJOR, SYCK_YAML_MINOR ); + syck_emitter_write( e, header, strlen( header ) ); + S_FREE( header ); + } + else + { + syck_emitter_write( e, "--- ", 4 ); + } + e->stage = doc_processing; + } + + /* Add new level */ + if ( lvl->spaces >= 0 ) { + indent = lvl->spaces + e->indent; + } + syck_emitter_add_level( e, indent, syck_lvl_open ); + lvl = syck_emitter_current_level( e ); + + /* Look for anchor */ + if ( e->anchors != NULL && + st_lookup( e->markers, n, (st_data_t *)&oid ) && + st_lookup( e->anchors, (st_data_t)oid, (void *)&anchor_name ) ) + { + if ( e->anchored == NULL ) + { + e->anchored = st_init_numtable(); + } + + if ( ! st_lookup( e->anchored, (st_data_t)anchor_name, (st_data_t *)&x ) ) + { + char *an = S_ALLOC_N( char, strlen( anchor_name ) + 3 ); + sprintf( an, "&%s ", anchor_name ); + syck_emitter_write( e, an, strlen( anchor_name ) + 2 ); + free( an ); + + x = 1; + st_insert( e->anchored, (st_data_t)anchor_name, (st_data_t)x ); + lvl->anctag = 1; + } + else + { + char *an = S_ALLOC_N( char, strlen( anchor_name ) + 2 ); + sprintf( an, "*%s", anchor_name ); + syck_emitter_write( e, an, strlen( anchor_name ) + 1 ); + free( an ); + + goto end_emit; + } + } + + (e->emitter_handler)( e, n ); + + /* Pop the level */ +end_emit: + syck_emitter_pop_level( e ); + if ( e->lvl_idx == 1 ) { + syck_emitter_write( e, "\n", 1 ); + e->headless = 0; + e->stage = doc_open; + } +} + +/* + * Determine what tag needs to be written, based on the taguri of the node + * and the implicit tag which would be assigned to this node. If a tag is + * required, write the tag. + */ +void syck_emit_tag( SyckEmitter *e, const char *tag, const char *ignore ) +{ + SyckLevel *lvl; + if ( tag == NULL ) return; + if ( ignore != NULL && syck_tagcmp( tag, ignore ) == 0 && e->explicit_typing == 0 ) return; + lvl = syck_emitter_current_level( e ); + + /* implicit */ + if ( strlen( tag ) == 0 ) { + syck_emitter_write( e, "! ", 2 ); + + /* global types */ + } else if ( strncmp( tag, "tag:", 4 ) == 0 ) { + int taglen = strlen( tag ); + syck_emitter_write( e, "!", 1 ); + if ( strncmp( tag + 4, YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) { + int skip = 4 + strlen( YAML_DOMAIN ) + 1; + syck_emitter_write( e, tag + skip, taglen - skip ); + } else { + const char *subd = tag + 4; + while ( *subd != ':' && *subd != '\0' ) subd++; + if ( *subd == ':' ) { + if ( subd - tag > ( strlen( YAML_DOMAIN ) + 5 ) && + strncmp( subd - strlen( YAML_DOMAIN ), YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) { + syck_emitter_write( e, tag + 4, subd - strlen( YAML_DOMAIN ) - ( tag + 4 ) - 1 ); + syck_emitter_write( e, "/", 1 ); + syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) ); + } else { + syck_emitter_write( e, tag + 4, subd - ( tag + 4 ) ); + syck_emitter_write( e, "/", 1 ); + syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) ); + } + } else { + /* TODO: Invalid tag (no colon after domain) */ + return; + } + } + syck_emitter_write( e, " ", 1 ); + + /* private types */ + } else if ( strncmp( tag, "x-private:", 10 ) == 0 ) { + syck_emitter_write( e, "!!", 2 ); + syck_emitter_write( e, tag + 10, strlen( tag ) - 10 ); + syck_emitter_write( e, " ", 1 ); + } + lvl->anctag = 1; +} + +/* + * Emit a newline and an appropriately spaced indent. + */ +void syck_emit_indent( SyckEmitter *e ) +{ + int i; + SyckLevel *lvl = syck_emitter_current_level( e ); + if ( e->bufpos == 0 && ( e->marker - e->buffer ) == 0 ) return; + if ( lvl->spaces >= 0 ) { + char *spcs = S_ALLOC_N( char, lvl->spaces + 2 ); + + spcs[0] = '\n'; spcs[lvl->spaces + 1] = '\0'; + for ( i = 0; i < lvl->spaces; i++ ) spcs[i+1] = ' '; + syck_emitter_write( e, spcs, lvl->spaces + 1 ); + free( spcs ); + } +} + +/* Clear the scan */ +#define SCAN_NONE 0 +/* All printable characters? */ +#define SCAN_NONPRINT 1 +/* Any indented lines? */ +#define SCAN_INDENTED 2 +/* Larger than the requested width? */ +#define SCAN_WIDE 4 +/* Opens or closes with whitespace? */ +#define SCAN_WHITEEDGE 8 +/* Contains a newline */ +#define SCAN_NEWLINE 16 +/* Contains a single quote */ +#define SCAN_SINGLEQ 32 +/* Contains a double quote */ +#define SCAN_DOUBLEQ 64 +/* Starts with a token */ +#define SCAN_INDIC_S 128 +/* Contains a flow indicator */ +#define SCAN_INDIC_C 256 +/* Ends without newlines */ +#define SCAN_NONL_E 512 +/* Ends with many newlines */ +#define SCAN_MANYNL_E 1024 +/* Contains flow map indicators */ +#define SCAN_FLOWMAP 2048 +/* Contains flow seq indicators */ +#define SCAN_FLOWSEQ 4096 +/* Contains a valid doc separator */ +#define SCAN_DOCSEP 8192 + +/* + * Basic printable test for LATIN-1 characters. + */ +int +syck_scan_scalar( int req_width, const char *cursor, long len ) +{ + long i = 0, start = 0; + int flags = SCAN_NONE; + + if ( len < 1 ) return flags; + + /* c-indicators from the spec */ + if ( cursor[0] == '[' || cursor[0] == ']' || + cursor[0] == '{' || cursor[0] == '}' || + cursor[0] == '!' || cursor[0] == '*' || + cursor[0] == '&' || cursor[0] == '|' || + cursor[0] == '>' || cursor[0] == '\'' || + cursor[0] == '"' || cursor[0] == '#' || + cursor[0] == '%' || cursor[0] == '@' || + cursor[0] == '&' ) { + flags |= SCAN_INDIC_S; + } + if ( ( cursor[0] == '-' || cursor[0] == ':' || + cursor[0] == '?' || cursor[0] == ',' ) && + ( len == 1 || cursor[1] == ' ' || cursor[1] == '\n' ) ) + { + flags |= SCAN_INDIC_S; + } + + /* whitespace edges */ + if ( cursor[len-1] != '\n' ) { + flags |= SCAN_NONL_E; + } else if ( len > 1 && cursor[len-2] == '\n' ) { + flags |= SCAN_MANYNL_E; + } + if ( + ( len > 0 && ( cursor[0] == ' ' || cursor[0] == '\t' ) ) || + ( len > 1 && ( cursor[len-1] == ' ' || cursor[len-1] == '\t' ) ) + ) { + flags |= SCAN_WHITEEDGE; + } + + /* opening doc sep */ + if ( len >= 3 && strncmp( cursor, "---", 3 ) == 0 ) + flags |= SCAN_DOCSEP; + + /* scan string */ + for ( i = 0; i < len; i++ ) { + + if ( ! ( cursor[i] == 0x9 || + cursor[i] == 0xA || + cursor[i] == 0xD || + ( cursor[i] >= 0x20 && cursor[i] <= 0x7E ) ) + ) { + flags |= SCAN_NONPRINT; + } + else if ( cursor[i] == '\n' ) { + flags |= SCAN_NEWLINE; + if ( len - i >= 3 && strncmp( &cursor[i+1], "---", 3 ) == 0 ) + flags |= SCAN_DOCSEP; + if ( cursor[i+1] == ' ' || cursor[i+1] == '\t' ) + flags |= SCAN_INDENTED; + if ( req_width > 0 && i - start > req_width ) + flags |= SCAN_WIDE; + start = i; + } + else if ( cursor[i] == '\'' ) + { + flags |= SCAN_SINGLEQ; + } + else if ( cursor[i] == '"' ) + { + flags |= SCAN_DOUBLEQ; + } + else if ( cursor[i] == ']' ) + { + flags |= SCAN_FLOWSEQ; + } + else if ( cursor[i] == '}' ) + { + flags |= SCAN_FLOWMAP; + } + /* remember, if plain collections get implemented, to add nb-plain-flow-char */ + else if ( ( cursor[i] == ' ' && cursor[i+1] == '#' ) || + ( cursor[i] == ':' && + ( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) ) ) + { + flags |= SCAN_INDIC_C; + } + else if ( cursor[i] == ',' && + ( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) ) + { + flags |= SCAN_FLOWMAP; + flags |= SCAN_FLOWSEQ; + } + } + + /* printf( "---STR---\n%s\nFLAGS: %d\n", cursor, flags ); */ + return flags; +} +/* + * All scalars should be emitted through this function, which determines an appropriate style, + * tag and indent. + */ +void syck_emit_scalar( SyckEmitter *e, const char *tag, enum scalar_style force_style, int force_indent, int force_width, + char keep_nl, const char *str, long len ) +{ + enum scalar_style favor_style = scalar_literal; + SyckLevel *parent = syck_emitter_parent_level( e ); + SyckLevel *lvl = syck_emitter_current_level( e ); + int scan = 0; + const char *match_implicit; + char *implicit; + + if ( str == NULL ) str = ""; + + /* No empty nulls as map keys */ + if ( len == 0 && ( parent->status == syck_lvl_map || parent->status == syck_lvl_imap ) && + parent->ncount % 2 == 1 && syck_tagcmp( tag, "tag:yaml.org,2002:null" ) == 0 ) + { + str = "~"; + len = 1; + } + + scan = syck_scan_scalar( force_width, str, len ); + match_implicit = syck_match_implicit( str, len ); + + /* quote strings which default to implicits */ + implicit = syck_taguri( YAML_DOMAIN, match_implicit, strlen( match_implicit ) ); + if ( syck_tagcmp( tag, implicit ) != 0 && syck_tagcmp( tag, "tag:yaml.org,2002:str" ) == 0 ) { + force_style = scalar_2quote; + } else { + /* complex key */ + if ( parent->status == syck_lvl_map && parent->ncount % 2 == 1 && + ( !( tag == NULL || + ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) ) + { + syck_emitter_write( e, "? ", 2 ); + parent->status = syck_lvl_mapx; + } + syck_emit_tag( e, tag, implicit ); + } + S_FREE( implicit ); + + /* if still arbitrary, sniff a good block style. */ + if ( force_style == scalar_none ) { + if ( scan & SCAN_NEWLINE ) { + force_style = scalar_literal; + } else { + force_style = scalar_plain; + } + } + + if ( e->style == scalar_fold ) { + favor_style = scalar_fold; + } + + /* Determine block style */ + if ( scan & SCAN_NONPRINT ) { + force_style = scalar_2quote; + } else if ( scan & SCAN_WHITEEDGE ) { + force_style = scalar_2quote; + } else if ( force_style != scalar_fold && ( scan & SCAN_INDENTED ) ) { + force_style = scalar_literal; + } else if ( force_style == scalar_plain && ( scan & SCAN_NEWLINE ) ) { + force_style = favor_style; + } else if ( force_style == scalar_plain && parent->status == syck_lvl_iseq && ( scan & SCAN_FLOWSEQ ) ) { + force_style = scalar_2quote; + } else if ( force_style == scalar_plain && parent->status == syck_lvl_imap && ( scan & SCAN_FLOWMAP ) ) { + force_style = scalar_2quote; + /* } else if ( force_style == scalar_fold && ( ! ( scan & SCAN_WIDE ) ) ) { + force_style = scalar_literal; */ + } else if ( force_style == scalar_plain && ( scan & SCAN_INDIC_S || scan & SCAN_INDIC_C ) ) { + if ( scan & SCAN_NEWLINE ) { + force_style = favor_style; + } else { + force_style = scalar_2quote; + } + } + + if ( force_indent > 0 ) { + lvl->spaces = parent->spaces + force_indent; + } else if ( scan & SCAN_DOCSEP ) { + lvl->spaces = parent->spaces + e->indent; + } + + /* For now, all ambiguous keys are going to be double-quoted */ + if ( ( parent->status == syck_lvl_map || parent->status == syck_lvl_mapx ) && parent->ncount % 2 == 1 ) { + if ( force_style != scalar_plain ) { + force_style = scalar_2quote; + } + } + + /* If the parent is an inline, double quote anything complex */ + if ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) { + if ( force_style != scalar_plain && force_style != scalar_1quote ) { + force_style = scalar_2quote; + } + } + + /* Fix the ending newlines */ + if ( scan & SCAN_NONL_E ) { + keep_nl = NL_CHOMP; + } else if ( scan & SCAN_MANYNL_E ) { + keep_nl = NL_KEEP; + } + + /* Write the text node */ + switch ( force_style ) + { + case scalar_1quote: + syck_emit_1quoted( e, force_width, str, len ); + break; + + case scalar_none: + case scalar_2quote: + syck_emit_2quoted( e, force_width, str, len ); + break; + + case scalar_fold: + syck_emit_folded( e, force_width, keep_nl, str, len ); + break; + + case scalar_literal: + syck_emit_literal( e, keep_nl, str, len ); + break; + + case scalar_plain: + syck_emitter_write( e, str, len ); + break; + } + + if ( parent->status == syck_lvl_mapx ) + { + syck_emitter_write( e, "\n", 1 ); + } +} + +void +syck_emitter_escape( SyckEmitter *e, const char *src, long len ) +{ + int i; + for( i = 0; i < len; i++ ) + { + if( (src[i] < 0x20) || (0x7E < src[i]) ) + { + syck_emitter_write( e, "\\", 1 ); + if( '\0' == src[i] ) + syck_emitter_write( e, "0", 1 ); + else + { + syck_emitter_write( e, "x", 1 ); + syck_emitter_write( e, (const char *)hex_table + ((src[i] & 0xF0) >> 4), 1 ); + syck_emitter_write( e, (const char *)hex_table + (src[i] & 0x0F), 1 ); + } + } + else + { + syck_emitter_write( e, src + i, 1 ); + if( '\\' == src[i] ) + syck_emitter_write( e, "\\", 1 ); + } + } +} + +/* + * Outputs a single-quoted block. + */ +void +syck_emit_1quoted( SyckEmitter *e, int width, const char *str, long len ) +{ + char do_indent = 0; + const char *mark = str; + const char *start = str; + const char *end = str; + syck_emitter_write( e, "'", 1 ); + while ( mark < str + len ) { + if ( do_indent ) { + syck_emit_indent( e ); + do_indent = 0; + } + switch ( *mark ) { + case '\'': syck_emitter_write( e, "'", 1 ); break; + + case '\n': + end = mark + 1; + if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) { + syck_emitter_write( e, "\n\n", 2 ); + } else { + syck_emitter_write( e, "\n", 1 ); + } + do_indent = 1; + start = mark + 1; + break; + + case ' ': + if ( width > 0 && *start != ' ' && mark - end > width ) { + do_indent = 1; + end = mark + 1; + } else { + syck_emitter_write( e, " ", 1 ); + } + break; + + default: + syck_emitter_write( e, mark, 1 ); + break; + } + mark++; + } + syck_emitter_write( e, "'", 1 ); +} + +/* + * Outputs a double-quoted block. + */ +void +syck_emit_2quoted( SyckEmitter *e, int width, const char *str, long len ) +{ + char do_indent = 0; + const char *mark = str; + const char *start = str; + const char *end = str; + syck_emitter_write( e, "\"", 1 ); + while ( mark < str + len ) { + if ( do_indent > 0 ) { + if ( do_indent == 2 ) { + syck_emitter_write( e, "\\", 1 ); + } + syck_emit_indent( e ); + do_indent = 0; + } + switch ( *mark ) { + + /* Escape sequences allowed within double quotes. */ + case '"': syck_emitter_write( e, "\\\"", 2 ); break; + case '\\': syck_emitter_write( e, "\\\\", 2 ); break; + case '\0': syck_emitter_write( e, "\\0", 2 ); break; + case '\a': syck_emitter_write( e, "\\a", 2 ); break; + case '\b': syck_emitter_write( e, "\\b", 2 ); break; + case '\f': syck_emitter_write( e, "\\f", 2 ); break; + case '\r': syck_emitter_write( e, "\\r", 2 ); break; + case '\t': syck_emitter_write( e, "\\t", 2 ); break; + case '\v': syck_emitter_write( e, "\\v", 2 ); break; + case 0x1b: syck_emitter_write( e, "\\e", 2 ); break; + + case '\n': + end = mark + 1; + syck_emitter_write( e, "\\n", 2 ); + do_indent = 2; + start = mark + 1; + if ( start < str + len && ( *start == ' ' || *start == '\n' ) ) { + do_indent = 0; + } + break; + + case ' ': + if ( width > 0 && *start != ' ' && mark - end > width ) { + do_indent = 1; + end = mark + 1; + } else { + syck_emitter_write( e, " ", 1 ); + } + break; + + default: + syck_emitter_escape( e, mark, 1 ); + break; + } + mark++; + } + syck_emitter_write( e, "\"", 1 ); +} + +/* + * Outputs a literal block. + */ +void +syck_emit_literal( SyckEmitter *e, char keep_nl, const char *str, long len ) +{ + const char *mark = str; + const char *start = str; + const char *end = str; + syck_emitter_write( e, "|", 1 ); + if ( keep_nl == NL_CHOMP ) { + syck_emitter_write( e, "-", 1 ); + } else if ( keep_nl == NL_KEEP ) { + syck_emitter_write( e, "+", 1 ); + } + syck_emit_indent( e ); + while ( mark < str + len ) { + if ( *mark == '\n' ) { + end = mark; + if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) end += 1; + syck_emitter_write( e, start, end - start ); + if ( mark + 1 == str + len ) { + if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 ); + } else { + syck_emit_indent( e ); + } + start = mark + 1; + } + mark++; + } + end = str + len; + if ( start < end ) { + syck_emitter_write( e, start, end - start ); + } +} + +/* + * Outputs a folded block. + */ +void +syck_emit_folded( SyckEmitter *e, int width, char keep_nl, const char *str, long len ) +{ + const char *mark = str; + const char *start = str; + const char *end = str; + syck_emitter_write( e, ">", 1 ); + if ( keep_nl == NL_CHOMP ) { + syck_emitter_write( e, "-", 1 ); + } else if ( keep_nl == NL_KEEP ) { + syck_emitter_write( e, "+", 1 ); + } + syck_emit_indent( e ); + if ( width <= 0 ) width = e->best_width; + while ( mark < str + len ) { + switch ( *mark ) { + case '\n': + syck_emitter_write( e, end, mark - end ); + end = mark + 1; + if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) { + syck_emitter_write( e, "\n", 1 ); + } + if ( mark + 1 == str + len ) { + if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 ); + } else { + syck_emit_indent( e ); + } + start = mark + 1; + break; + + case ' ': + if ( *start != ' ' ) { + if ( mark - end > width ) { + syck_emitter_write( e, end, mark - end ); + syck_emit_indent( e ); + end = mark + 1; + } + } + break; + } + mark++; + } + if ( end < mark ) { + syck_emitter_write( e, end, mark - end ); + } +} + +/* + * Begins emission of a sequence. + */ +void syck_emit_seq( SyckEmitter *e, const char *tag, enum seq_style style ) +{ + SyckLevel *parent = syck_emitter_parent_level( e ); + SyckLevel *lvl = syck_emitter_current_level( e ); + syck_emit_tag( e, tag, "tag:yaml.org,2002:seq" ); + if ( style == seq_inline || ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) ) { + syck_emitter_write( e, "[", 1 ); + lvl->status = syck_lvl_iseq; + } else { + /* complex key */ + if ( parent->status == syck_lvl_map && parent->ncount % 2 == 1 ) { + syck_emitter_write( e, "? ", 2 ); + parent->status = syck_lvl_mapx; + } + lvl->status = syck_lvl_seq; + } +} + +/* + * Begins emission of a mapping. + */ +void +syck_emit_map( SyckEmitter *e, const char *tag, enum map_style style ) +{ + SyckLevel *parent = syck_emitter_parent_level( e ); + SyckLevel *lvl = syck_emitter_current_level( e ); + syck_emit_tag( e, tag, "tag:yaml.org,2002:map" ); + if ( style == map_inline || ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) ) { + syck_emitter_write( e, "{", 1 ); + lvl->status = syck_lvl_imap; + } else { + /* complex key */ + if ( parent->status == syck_lvl_map && parent->ncount % 2 == 1 ) { + syck_emitter_write( e, "? ", 2 ); + parent->status = syck_lvl_mapx; + } + lvl->status = syck_lvl_map; + } +} + +/* + * Handles emitting of a collection item (for both + * sequences and maps) + */ +void syck_emit_item( SyckEmitter *e, st_data_t n ) +{ + SyckLevel *lvl = syck_emitter_current_level( e ); + switch ( lvl->status ) + { + case syck_lvl_seq: + { + SyckLevel *parent = syck_emitter_parent_level( e ); + + /* seq-in-map shortcut -- the lvl->anctag check should be unneccesary but + * there is a nasty shift/reduce in the parser on this point and + * i'm not ready to tickle it. */ + if ( lvl->anctag == 0 && parent->status == syck_lvl_map && lvl->ncount == 0 ) { + lvl->spaces = parent->spaces; + } + + /* seq-in-seq shortcut */ + else if ( lvl->anctag == 0 && parent->status == syck_lvl_seq && lvl->ncount == 0 ) { + int spcs = ( lvl->spaces - parent->spaces ) - 2; + if ( spcs >= 0 ) { + int i = 0; + for ( i = 0; i < spcs; i++ ) { + syck_emitter_write( e, " ", 1 ); + } + syck_emitter_write( e, "- ", 2 ); + break; + } + } + + syck_emit_indent( e ); + syck_emitter_write( e, "- ", 2 ); + } + break; + + case syck_lvl_iseq: + { + if ( lvl->ncount > 0 ) { + syck_emitter_write( e, ", ", 2 ); + } + } + break; + + case syck_lvl_map: + { + SyckLevel *parent = syck_emitter_parent_level( e ); + + /* map-in-seq shortcut */ + if ( lvl->anctag == 0 && parent->status == syck_lvl_seq && lvl->ncount == 0 ) { + int spcs = ( lvl->spaces - parent->spaces ) - 2; + if ( spcs >= 0 ) { + int i = 0; + for ( i = 0; i < spcs; i++ ) { + syck_emitter_write( e, " ", 1 ); + } + break; + } + } + + if ( lvl->ncount % 2 == 0 ) { + syck_emit_indent( e ); + } else { + syck_emitter_write( e, ": ", 2 ); + } + } + break; + + case syck_lvl_mapx: + { + if ( lvl->ncount % 2 == 0 ) { + syck_emit_indent( e ); + lvl->status = syck_lvl_map; + } else { + int i; + if ( lvl->spaces > 0 ) { + char *spcs = S_ALLOC_N( char, lvl->spaces + 1 ); + + spcs[lvl->spaces] = '\0'; + for ( i = 0; i < lvl->spaces; i++ ) spcs[i] = ' '; + syck_emitter_write( e, spcs, lvl->spaces ); + S_FREE( spcs ); + } + syck_emitter_write( e, ": ", 2 ); + } + } + break; + + case syck_lvl_imap: + { + if ( lvl->ncount > 0 ) { + if ( lvl->ncount % 2 == 0 ) { + syck_emitter_write( e, ", ", 2 ); + } else { + syck_emitter_write( e, ": ", 2 ); + } + } + } + break; + + default: break; + } + lvl->ncount++; + + syck_emit( e, n ); +} + +/* + * Closes emission of a collection. + */ +void syck_emit_end( SyckEmitter *e ) +{ + SyckLevel *lvl = syck_emitter_current_level( e ); + SyckLevel *parent = syck_emitter_parent_level( e ); + switch ( lvl->status ) + { + case syck_lvl_seq: + if ( lvl->ncount == 0 ) { + syck_emitter_write( e, "[]\n", 3 ); + } else if ( parent->status == syck_lvl_mapx ) { + syck_emitter_write( e, "\n", 1 ); + } + break; + + case syck_lvl_iseq: + syck_emitter_write( e, "]\n", 1 ); + break; + + case syck_lvl_map: + if ( lvl->ncount == 0 ) { + syck_emitter_write( e, "{}\n", 3 ); + } else if ( lvl->ncount % 2 == 1 ) { + syck_emitter_write( e, ":\n", 1 ); + } else if ( parent->status == syck_lvl_mapx ) { + syck_emitter_write( e, "\n", 1 ); + } + break; + + case syck_lvl_imap: + syck_emitter_write( e, "}\n", 1 ); + break; + + default: break; + } +} + +/* + * Fill markers table with emitter nodes in the + * soon-to-be-emitted tree. + */ +SYMID +syck_emitter_mark_node( SyckEmitter *e, st_data_t n ) +{ + SYMID oid = 0; + char *anchor_name = NULL; + + /* + * Ensure markers table is initialized. + */ + if ( e->markers == NULL ) + { + e->markers = st_init_numtable(); + } + + /* + * Markers table initially marks the string position of the + * object. Doesn't yet create an anchor, simply notes the + * position. + */ + if ( ! st_lookup( e->markers, n, (st_data_t *)&oid ) ) + { + /* + * Store all markers + */ + oid = e->markers->num_entries + 1; + st_insert( e->markers, n, (st_data_t)oid ); + } + else + { + if ( e->anchors == NULL ) + { + e->anchors = st_init_numtable(); + } + + if ( ! st_lookup( e->anchors, (st_data_t)oid, (void *)&anchor_name ) ) + { + int idx = 0; + const char *anc = ( e->anchor_format == NULL ? DEFAULT_ANCHOR_FORMAT : e->anchor_format ); + + /* + * Second time hitting this object, let's give it an anchor + */ + idx = e->anchors->num_entries + 1; + anchor_name = S_ALLOC_N( char, strlen( anc ) + 10 ); + S_MEMZERO( anchor_name, char, strlen( anc ) + 10 ); + sprintf( anchor_name, anc, idx ); + + /* + * Insert into anchors table + */ + st_insert( e->anchors, (st_data_t)oid, (st_data_t)anchor_name ); + } + } + return oid; +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/extconf.rb b/lib/ruby-1.9.1-rc1/ext/syck/extconf.rb new file mode 100644 index 0000000..6c10448 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/extconf.rb @@ -0,0 +1,5 @@ +require 'mkmf' + +have_header( "st.h" ) +create_makefile( "syck" ) + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/gram.c b/lib/ruby-1.9.1-rc1/ext/syck/gram.c new file mode 100644 index 0000000..615a594 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/gram.c @@ -0,0 +1,1894 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ +#define yyparse syckparse +#define yylex sycklex +#define yyerror syckerror +#define yylval sycklval +#define yychar syckchar +#define yydebug syckdebug +#define yynerrs sycknerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + YAML_ANCHOR = 258, + YAML_ALIAS = 259, + YAML_TRANSFER = 260, + YAML_TAGURI = 261, + YAML_ITRANSFER = 262, + YAML_WORD = 263, + YAML_PLAIN = 264, + YAML_BLOCK = 265, + YAML_DOCSEP = 266, + YAML_IOPEN = 267, + YAML_INDENT = 268, + YAML_IEND = 269 + }; +#endif +#define YAML_ANCHOR 258 +#define YAML_ALIAS 259 +#define YAML_TRANSFER 260 +#define YAML_TAGURI 261 +#define YAML_ITRANSFER 262 +#define YAML_WORD 263 +#define YAML_PLAIN 264 +#define YAML_BLOCK 265 +#define YAML_DOCSEP 266 +#define YAML_IOPEN 267 +#define YAML_INDENT 268 +#define YAML_IEND 269 + + + + +/* Copy the first part of user declarations. */ +#line 14 "gram.y" + + +#include "syck.h" + +void apply_seq_in_map( SyckParser *parser, SyckNode *n ); + +#define YYPARSE_PARAM parser +#define YYLEX_PARAM parser + +#define NULL_NODE(parser, node) \ + SyckNode *node = syck_new_str( "", scalar_plain ); \ + if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \ + { \ + node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \ + } \ + else \ + { \ + node->type_id = syck_strndup( "null", 4 ); \ + } + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 35 "gram.y" +typedef union YYSTYPE { + SYMID nodeId; + SyckNode *nodeData; + char *name; +} YYSTYPE; +/* Line 191 of yacc.c. */ +#line 140 "gram.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ +#line 152 "gram.c" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 52 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 396 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 23 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 29 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 79 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 128 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 269 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 21, 15, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, + 2, 2, 2, 22, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 17, 2, 18, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 19, 2, 20, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 5, 8, 9, 11, 13, 15, 18, + 21, 24, 28, 30, 32, 36, 37, 40, 43, 46, + 49, 51, 54, 56, 58, 60, 63, 66, 69, 72, + 75, 77, 79, 81, 85, 87, 89, 91, 93, 95, + 99, 103, 106, 110, 113, 117, 120, 124, 127, 129, + 133, 136, 140, 143, 145, 149, 151, 153, 157, 161, + 165, 168, 172, 175, 179, 182, 184, 188, 190, 194, + 196, 200, 204, 207, 211, 215, 218, 220, 224, 226 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 24, 0, -1, 25, -1, 11, 27, -1, -1, 33, + -1, 26, -1, 34, -1, 5, 26, -1, 6, 26, + -1, 3, 26, -1, 29, 26, 32, -1, 25, -1, + 28, -1, 29, 28, 30, -1, -1, 7, 28, -1, + 5, 28, -1, 6, 28, -1, 3, 28, -1, 12, + -1, 29, 13, -1, 14, -1, 13, -1, 14, -1, + 31, 32, -1, 5, 33, -1, 6, 33, -1, 7, + 33, -1, 3, 33, -1, 4, -1, 8, -1, 9, + -1, 29, 33, 32, -1, 10, -1, 35, -1, 39, + -1, 42, -1, 49, -1, 29, 37, 30, -1, 29, + 38, 30, -1, 15, 27, -1, 5, 31, 38, -1, + 5, 37, -1, 6, 31, 38, -1, 6, 37, -1, + 3, 31, 38, -1, 3, 37, -1, 36, -1, 38, + 31, 36, -1, 38, 31, -1, 17, 40, 18, -1, + 17, 18, -1, 41, -1, 40, 21, 41, -1, 25, + -1, 48, -1, 29, 43, 30, -1, 29, 47, 30, + -1, 5, 31, 47, -1, 5, 43, -1, 6, 31, + 47, -1, 6, 43, -1, 3, 31, 47, -1, 3, + 43, -1, 33, -1, 22, 25, 31, -1, 27, -1, + 44, 16, 45, -1, 46, -1, 47, 31, 36, -1, + 47, 31, 46, -1, 47, 31, -1, 25, 16, 27, + -1, 19, 50, 20, -1, 19, 20, -1, 51, -1, + 50, 21, 51, -1, 25, -1, 48, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned short int yyrline[] = +{ + 0, 56, 56, 60, 65, 70, 71, 74, 75, 80, + 85, 94, 100, 101, 104, 109, 113, 121, 126, 131, + 145, 146, 149, 152, 155, 156, 164, 169, 174, 182, + 186, 194, 207, 208, 218, 219, 220, 221, 222, 228, + 232, 238, 244, 249, 254, 259, 264, 268, 274, 278, + 283, 292, 296, 302, 306, 313, 314, 320, 325, 332, + 337, 342, 347, 352, 356, 362, 363, 369, 379, 396, + 397, 409, 417, 426, 434, 438, 444, 445, 454, 461 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "YAML_ANCHOR", "YAML_ALIAS", + "YAML_TRANSFER", "YAML_TAGURI", "YAML_ITRANSFER", "YAML_WORD", + "YAML_PLAIN", "YAML_BLOCK", "YAML_DOCSEP", "YAML_IOPEN", "YAML_INDENT", + "YAML_IEND", "'-'", "':'", "'['", "']'", "'{'", "'}'", "','", "'?'", + "$accept", "doc", "atom", "ind_rep", "atom_or_empty", "empty", + "indent_open", "indent_end", "indent_sep", "indent_flex_end", "word_rep", + "struct_rep", "implicit_seq", "basic_seq", "top_imp_seq", + "in_implicit_seq", "inline_seq", "in_inline_seq", "inline_seq_atom", + "implicit_map", "top_imp_map", "complex_key", "complex_value", + "complex_mapping", "in_implicit_map", "basic_mapping", "inline_map", + "in_inline_map", "inline_map_atom", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 45, 58, 91, 93, 123, + 125, 44, 63 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 23, 24, 24, 24, 25, 25, 26, 26, 26, + 26, 26, 27, 27, 28, 28, 28, 28, 28, 28, + 29, 29, 30, 31, 32, 32, 33, 33, 33, 33, + 33, 33, 33, 33, 34, 34, 34, 34, 34, 35, + 35, 36, 37, 37, 37, 37, 37, 37, 38, 38, + 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, + 43, 43, 43, 43, 43, 44, 44, 45, 46, 47, + 47, 47, 47, 48, 49, 49, 50, 50, 51, 51 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 2, 0, 1, 1, 1, 2, 2, + 2, 3, 1, 1, 3, 0, 2, 2, 2, 2, + 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, + 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 3, 2, 3, 2, 3, 2, 3, 2, 1, 3, + 2, 3, 2, 1, 3, 1, 1, 3, 3, 3, + 2, 3, 2, 3, 2, 1, 3, 1, 3, 1, + 3, 3, 2, 3, 3, 2, 1, 3, 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 4, 0, 30, 0, 0, 0, 31, 32, 34, 15, + 20, 0, 0, 0, 2, 6, 0, 5, 7, 35, + 36, 37, 38, 10, 29, 8, 26, 9, 27, 0, + 0, 0, 0, 28, 15, 15, 15, 15, 12, 3, + 13, 15, 52, 55, 0, 53, 56, 75, 78, 79, + 0, 76, 1, 0, 0, 0, 21, 15, 0, 0, + 65, 48, 0, 0, 0, 0, 69, 0, 0, 19, + 17, 18, 15, 15, 15, 16, 15, 15, 15, 15, + 0, 15, 51, 0, 74, 0, 23, 0, 47, 64, + 0, 43, 60, 0, 45, 62, 41, 0, 24, 0, + 11, 33, 22, 39, 40, 50, 57, 15, 58, 72, + 14, 73, 54, 77, 65, 46, 63, 42, 59, 44, + 61, 66, 25, 49, 67, 68, 70, 71 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 13, 38, 15, 39, 40, 16, 103, 99, 101, + 17, 18, 19, 61, 62, 63, 20, 44, 45, 21, + 64, 65, 125, 66, 67, 46, 22, 50, 51 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -97 +static const short int yypact[] = +{ + 250, 318, -97, 318, 318, 374, -97, -97, -97, 335, + -97, 267, 232, 7, -97, -97, 192, -97, -97, -97, + -97, -97, -97, -97, -97, -97, -97, -97, -97, 374, + 374, 374, 352, -97, 335, 335, 335, 384, -97, -97, + -97, 212, -97, 10, 0, -97, -97, -97, 10, -97, + -4, -97, -97, 284, 284, 284, -97, 335, 318, 30, + 30, -97, -2, 36, -2, 16, -97, 36, 30, -97, + -97, -97, 384, 384, 384, -97, 363, 301, 301, 301, + -2, 335, -97, 318, -97, 318, -97, 158, -97, -97, + 158, -97, -97, 158, -97, -97, -97, 24, -97, 30, + -97, -97, -97, -97, -97, 26, -97, 335, -97, 158, + -97, -97, -97, -97, -97, 24, 24, 24, 24, 24, + 24, -97, -97, -97, -97, -97, -97, -97 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -97, -97, 8, 81, -56, 109, 33, -53, 74, -54, + -1, -97, -97, -96, -31, -32, -97, -97, -44, -97, + 77, -97, -97, -52, 9, -6, -97, -97, -29 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const unsigned char yytable[] = +{ + 24, 96, 26, 28, 33, 100, 49, 52, 14, 123, + 104, 106, 102, 126, 108, 60, 84, 85, 82, 43, + 48, 83, 88, 91, 94, 111, 81, 110, 24, 26, + 28, 68, 107, 24, 26, 28, 33, 86, 32, 112, + 60, 57, 41, 86, 98, 122, 88, 91, 94, 86, + 102, 124, 24, 26, 28, 115, 113, 127, 117, 0, + 0, 119, 32, 32, 32, 32, 97, 41, 41, 41, + 76, 24, 26, 28, 41, 68, 24, 26, 28, 49, + 0, 0, 23, 0, 25, 27, 114, 0, 0, 114, + 41, 43, 114, 48, 0, 0, 116, 59, 0, 118, + 0, 0, 120, 0, 0, 76, 76, 76, 114, 76, + 41, 41, 41, 0, 41, 23, 25, 27, 0, 0, + 32, 0, 59, 32, 0, 0, 32, 87, 90, 93, + 89, 92, 95, 0, 23, 25, 27, 105, 0, 0, + 41, 109, 32, 69, 70, 71, 75, 0, 0, 0, + 80, 87, 90, 93, 89, 92, 95, 0, 23, 25, + 27, 29, 2, 30, 31, 5, 6, 7, 0, 0, + 10, 121, 0, 57, 0, 0, 0, 0, 0, 0, + 58, 69, 70, 71, 0, 80, 69, 70, 71, 105, + 109, 105, 109, 105, 109, 53, 2, 54, 55, 5, + 6, 7, 8, 0, 10, 56, 0, 57, 0, 11, + 0, 12, 0, 0, 58, 77, 2, 78, 79, 37, + 6, 7, 8, 0, 10, 56, 0, 57, 0, 11, + 0, 12, 0, 0, 58, 1, 2, 3, 4, 5, + 6, 7, 8, 0, 10, 0, 0, 0, 0, 11, + 0, 12, 47, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 0, 0, 0, 0, 11, 0, 12, + 1, 2, 3, 4, 5, 6, 7, 8, 0, 10, + 0, 0, 0, 0, 11, 42, 12, 53, 2, 54, + 55, 5, 6, 7, 8, 0, 10, 86, 0, 0, + 0, 11, 0, 12, 77, 2, 78, 79, 37, 6, + 7, 8, 0, 10, 86, 0, 0, 0, 11, 0, + 12, 1, 2, 3, 4, 5, 6, 7, 8, 0, + 10, 0, 0, 0, 0, 11, 0, 12, 34, 2, + 35, 36, 37, 6, 7, 8, 0, 10, 0, 0, + 0, 0, 11, 0, 12, 29, 2, 30, 31, 5, + 6, 7, 0, 0, 10, 56, 72, 2, 73, 74, + 37, 6, 7, 0, 0, 10, 56, 29, 2, 30, + 31, 5, 6, 7, 0, 0, 10, 72, 2, 73, + 74, 37, 6, 7, 0, 0, 10 +}; + +static const yysigned_char yycheck[] = +{ + 1, 57, 3, 4, 5, 59, 12, 0, 0, 105, + 63, 64, 14, 109, 67, 16, 20, 21, 18, 11, + 12, 21, 53, 54, 55, 81, 16, 80, 29, 30, + 31, 32, 16, 34, 35, 36, 37, 13, 5, 83, + 41, 15, 9, 13, 14, 99, 77, 78, 79, 13, + 14, 107, 53, 54, 55, 87, 85, 109, 90, -1, + -1, 93, 29, 30, 31, 32, 58, 34, 35, 36, + 37, 72, 73, 74, 41, 76, 77, 78, 79, 85, + -1, -1, 1, -1, 3, 4, 87, -1, -1, 90, + 57, 83, 93, 85, -1, -1, 87, 16, -1, 90, + -1, -1, 93, -1, -1, 72, 73, 74, 109, 76, + 77, 78, 79, -1, 81, 34, 35, 36, -1, -1, + 87, -1, 41, 90, -1, -1, 93, 53, 54, 55, + 53, 54, 55, -1, 53, 54, 55, 63, -1, -1, + 107, 67, 109, 34, 35, 36, 37, -1, -1, -1, + 41, 77, 78, 79, 77, 78, 79, -1, 77, 78, + 79, 3, 4, 5, 6, 7, 8, 9, -1, -1, + 12, 97, -1, 15, -1, -1, -1, -1, -1, -1, + 22, 72, 73, 74, -1, 76, 77, 78, 79, 115, + 116, 117, 118, 119, 120, 3, 4, 5, 6, 7, + 8, 9, 10, -1, 12, 13, -1, 15, -1, 17, + -1, 19, -1, -1, 22, 3, 4, 5, 6, 7, + 8, 9, 10, -1, 12, 13, -1, 15, -1, 17, + -1, 19, -1, -1, 22, 3, 4, 5, 6, 7, + 8, 9, 10, -1, 12, -1, -1, -1, -1, 17, + -1, 19, 20, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, -1, -1, -1, -1, 17, -1, 19, + 3, 4, 5, 6, 7, 8, 9, 10, -1, 12, + -1, -1, -1, -1, 17, 18, 19, 3, 4, 5, + 6, 7, 8, 9, 10, -1, 12, 13, -1, -1, + -1, 17, -1, 19, 3, 4, 5, 6, 7, 8, + 9, 10, -1, 12, 13, -1, -1, -1, 17, -1, + 19, 3, 4, 5, 6, 7, 8, 9, 10, -1, + 12, -1, -1, -1, -1, 17, -1, 19, 3, 4, + 5, 6, 7, 8, 9, 10, -1, 12, -1, -1, + -1, -1, 17, -1, 19, 3, 4, 5, 6, 7, + 8, 9, -1, -1, 12, 13, 3, 4, 5, 6, + 7, 8, 9, -1, -1, 12, 13, 3, 4, 5, + 6, 7, 8, 9, -1, -1, 12, 3, 4, 5, + 6, 7, 8, 9, -1, -1, 12 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 17, 19, 24, 25, 26, 29, 33, 34, 35, + 39, 42, 49, 26, 33, 26, 33, 26, 33, 3, + 5, 6, 29, 33, 3, 5, 6, 7, 25, 27, + 28, 29, 18, 25, 40, 41, 48, 20, 25, 48, + 50, 51, 0, 3, 5, 6, 13, 15, 22, 26, + 33, 36, 37, 38, 43, 44, 46, 47, 33, 28, + 28, 28, 3, 5, 6, 28, 29, 3, 5, 6, + 28, 16, 18, 21, 20, 21, 13, 31, 37, 43, + 31, 37, 43, 31, 37, 43, 27, 25, 14, 31, + 32, 32, 14, 30, 30, 31, 30, 16, 30, 31, + 30, 27, 41, 51, 33, 38, 47, 38, 47, 38, + 47, 31, 32, 36, 27, 45, 36, 46 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yytype, yyvaluep) + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 57 "gram.y" + { + ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ); + } + break; + + case 3: +#line 61 "gram.y" + { + ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ); + } + break; + + case 4: +#line 65 "gram.y" + { + ((SyckParser *)parser)->eof = 1; + } + break; + + case 8: +#line 76 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 9: +#line 81 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 10: +#line 86 "gram.y" + { + /* + * _Anchors_: The language binding must keep a separate symbol table + * for anchors. The actual ID in the symbol table is returned to the + * higher nodes, though. + */ + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData ); + } + break; + + case 11: +#line 95 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 14: +#line 105 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 15: +#line 109 "gram.y" + { + NULL_NODE( parser, n ); + yyval.nodeData = n; + } + break; + + case 16: +#line 114 "gram.y" + { + if ( ((SyckParser *)parser)->implicit_typing == 1 ) + { + try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + } + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 17: +#line 122 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 18: +#line 127 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 19: +#line 132 "gram.y" + { + /* + * _Anchors_: The language binding must keep a separate symbol table + * for anchors. The actual ID in the symbol table is returned to the + * higher nodes, though. + */ + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData ); + } + break; + + case 26: +#line 165 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 27: +#line 170 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 28: +#line 175 "gram.y" + { + if ( ((SyckParser *)parser)->implicit_typing == 1 ) + { + try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + } + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 29: +#line 183 "gram.y" + { + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData ); + } + break; + + case 30: +#line 187 "gram.y" + { + /* + * _Aliases_: The anchor symbol table is scanned for the anchor name. + * The anchor's ID in the language's symbol table is returned. + */ + yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name ); + } + break; + + case 31: +#line 195 "gram.y" + { + SyckNode *n = yyvsp[0].nodeData; + if ( ((SyckParser *)parser)->taguri_expansion == 1 ) + { + n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); + } + else + { + n->type_id = syck_strndup( "str", 3 ); + } + yyval.nodeData = n; + } + break; + + case 33: +#line 209 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 39: +#line 229 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 40: +#line 233 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 41: +#line 239 "gram.y" + { + yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ); + } + break; + + case 42: +#line 245 "gram.y" + { + syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 43: +#line 250 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 44: +#line 255 "gram.y" + { + syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 45: +#line 260 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 46: +#line 265 "gram.y" + { + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData ); + } + break; + + case 47: +#line 269 "gram.y" + { + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData ); + } + break; + + case 48: +#line 275 "gram.y" + { + yyval.nodeData = syck_new_seq( yyvsp[0].nodeId ); + } + break; + + case 49: +#line 279 "gram.y" + { + syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId ); + yyval.nodeData = yyvsp[-2].nodeData; + } + break; + + case 50: +#line 284 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 51: +#line 293 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 52: +#line 297 "gram.y" + { + yyval.nodeData = syck_alloc_seq(); + } + break; + + case 53: +#line 303 "gram.y" + { + yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) ); + } + break; + + case 54: +#line 307 "gram.y" + { + syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) ); + yyval.nodeData = yyvsp[-2].nodeData; + } + break; + + case 57: +#line 321 "gram.y" + { + apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData ); + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 58: +#line 326 "gram.y" + { + apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData ); + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 59: +#line 333 "gram.y" + { + syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 60: +#line 338 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 61: +#line 343 "gram.y" + { + syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 62: +#line 348 "gram.y" + { + syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 ); + yyval.nodeData = yyvsp[0].nodeData; + } + break; + + case 63: +#line 353 "gram.y" + { + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData ); + } + break; + + case 64: +#line 357 "gram.y" + { + yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData ); + } + break; + + case 66: +#line 364 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 68: +#line 380 "gram.y" + { + yyval.nodeData = syck_new_map( + syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ), + syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) ); + } + break; + + case 70: +#line 398 "gram.y" + { + if ( yyvsp[-2].nodeData->shortcut == NULL ) + { + yyvsp[-2].nodeData->shortcut = syck_new_seq( yyvsp[0].nodeId ); + } + else + { + syck_seq_add( yyvsp[-2].nodeData->shortcut, yyvsp[0].nodeId ); + } + yyval.nodeData = yyvsp[-2].nodeData; + } + break; + + case 71: +#line 410 "gram.y" + { + apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData ); + syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData ); + syck_free_node( yyvsp[0].nodeData ); + yyvsp[0].nodeData = NULL; + yyval.nodeData = yyvsp[-2].nodeData; + } + break; + + case 72: +#line 418 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 73: +#line 427 "gram.y" + { + yyval.nodeData = syck_new_map( + syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ), + syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) ); + } + break; + + case 74: +#line 435 "gram.y" + { + yyval.nodeData = yyvsp[-1].nodeData; + } + break; + + case 75: +#line 439 "gram.y" + { + yyval.nodeData = syck_alloc_map(); + } + break; + + case 77: +#line 446 "gram.y" + { + syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData ); + syck_free_node( yyvsp[0].nodeData ); + yyvsp[0].nodeData = NULL; + yyval.nodeData = yyvsp[-2].nodeData; + } + break; + + case 78: +#line 455 "gram.y" + { + NULL_NODE( parser, n ); + yyval.nodeData = syck_new_map( + syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ), + syck_hdlr_add_node( (SyckParser *)parser, n ) ); + } + break; + + + } + +/* Line 1010 of yacc.c. */ +#line 1651 "gram.c" + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; + + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 464 "gram.y" + + +void +apply_seq_in_map( SyckParser *parser, SyckNode *n ) +{ + long map_len; + if ( n->shortcut == NULL ) + { + return; + } + + map_len = syck_map_count( n ); + syck_map_assign( n, map_value, map_len - 1, + syck_hdlr_add_node( parser, n->shortcut ) ); + + n->shortcut = NULL; +} + + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/gram.h b/lib/ruby-1.9.1-rc1/ext/syck/gram.h new file mode 100644 index 0000000..547149a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/gram.h @@ -0,0 +1,79 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + YAML_ANCHOR = 258, + YAML_ALIAS = 259, + YAML_TRANSFER = 260, + YAML_TAGURI = 261, + YAML_ITRANSFER = 262, + YAML_WORD = 263, + YAML_PLAIN = 264, + YAML_BLOCK = 265, + YAML_DOCSEP = 266, + YAML_IOPEN = 267, + YAML_INDENT = 268, + YAML_IEND = 269 + }; +#endif +#define YAML_ANCHOR 258 +#define YAML_ALIAS 259 +#define YAML_TRANSFER 260 +#define YAML_TAGURI 261 +#define YAML_ITRANSFER 262 +#define YAML_WORD 263 +#define YAML_PLAIN 264 +#define YAML_BLOCK 265 +#define YAML_DOCSEP 266 +#define YAML_IOPEN 267 +#define YAML_INDENT 268 +#define YAML_IEND 269 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 35 "gram.y" +typedef union YYSTYPE { + SYMID nodeId; + SyckNode *nodeData; + char *name; +} YYSTYPE; +/* Line 1285 of yacc.c. */ +#line 71 "gram.h" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/handler.c b/lib/ruby-1.9.1-rc1/ext/syck/handler.c new file mode 100644 index 0000000..abbf181 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/handler.c @@ -0,0 +1,173 @@ +/* + * handler.c + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + */ + +#include "ruby/ruby.h" +#include "syck.h" + +SYMID +syck_hdlr_add_node( SyckParser *p, SyckNode *n ) +{ + SYMID id; + + if ( ! n->id ) + { + n->id = (p->handler)( p, n ); + } + id = n->id; + + if ( n->anchor == NULL ) + { + syck_free_node( n ); + } + return id; +} + +SyckNode * +syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n ) +{ + SyckNode *ntmp = NULL; + + n->anchor = a; + if ( p->bad_anchors != NULL ) + { + SyckNode *bad; + if ( st_lookup( p->bad_anchors, (st_data_t)a, (void *)&bad ) ) + { + if ( n->kind != syck_str_kind ) + { + n->id = bad->id; + (p->handler)( p, n ); + } + } + } + if ( p->anchors == NULL ) + { + p->anchors = st_init_strtable(); + } + if ( st_lookup( p->anchors, (st_data_t)a, (void *)&ntmp ) ) + { + if ( ntmp != (void *)1 ) + { + syck_free_node( ntmp ); + } + } + st_insert( p->anchors, (st_data_t)a, (st_data_t)n ); + return n; +} + +void +syck_hdlr_remove_anchor( SyckParser *p, char *a ) +{ + char *atmp = a; + SyckNode *ntmp; + if ( p->anchors == NULL ) + { + p->anchors = st_init_strtable(); + } + if ( st_delete( p->anchors, (void *)&atmp, (void *)&ntmp ) ) + { + if ( ntmp != (void *)1 ) + { + syck_free_node( ntmp ); + } + } + st_insert( p->anchors, (st_data_t)a, (st_data_t)1 ); +} + +SyckNode * +syck_hdlr_get_anchor( SyckParser *p, char *a ) +{ + SyckNode *n = NULL; + + if ( p->anchors != NULL ) + { + if ( st_lookup( p->anchors, (st_data_t)a, (void *)&n ) ) + { + if ( n != (void *)1 ) + { + S_FREE( a ); + return n; + } + else + { + if ( p->bad_anchors == NULL ) + { + p->bad_anchors = st_init_strtable(); + } + if ( ! st_lookup( p->bad_anchors, (st_data_t)a, (void *)&n ) ) + { + n = (p->bad_anchor_handler)( p, a ); + st_insert( p->bad_anchors, (st_data_t)a, (st_data_t)n ); + } + } + } + } + + if ( n == NULL ) + { + n = (p->bad_anchor_handler)( p, a ); + } + + if ( n->anchor ) + { + S_FREE( a ); + } + else + { + n->anchor = a; + } + + return n; +} + +void +syck_add_transfer( char *uri, SyckNode *n, int taguri ) +{ + if ( n->type_id != NULL ) + { + S_FREE( n->type_id ); + } + + if ( taguri == 0 ) + { + n->type_id = uri; + return; + } + + n->type_id = syck_type_id_to_uri( uri ); + S_FREE( uri ); +} + +char * +syck_xprivate( const char *type_id, int type_len ) +{ + char *uri = S_ALLOC_N( char, type_len + 14 ); + uri[0] = '\0'; + strcat( uri, "x-private:" ); + strncat( uri, type_id, type_len ); + return uri; +} + +char * +syck_taguri( const char *domain, const char *type_id, int type_len ) +{ + char *uri = S_ALLOC_N( char, strlen( domain ) + type_len + 14 ); + uri[0] = '\0'; + strcat( uri, "tag:" ); + strcat( uri, domain ); + strcat( uri, ":" ); + strncat( uri, type_id, type_len ); + return uri; +} + +int +syck_try_implicit( SyckNode *n ) +{ + return 1; +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/implicit.c b/lib/ruby-1.9.1-rc1/ext/syck/implicit.c new file mode 100644 index 0000000..6e92f48 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/implicit.c @@ -0,0 +1,2990 @@ +/* Generated by re2c 0.9.10 on Mon Sep 19 21:46:50 2005 */ +#line 1 "implicit.re" +/* + * implicit.re + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + */ + +#include "ruby/ruby.h" +#include "syck.h" + +#define YYCTYPE char +#define YYCURSOR cursor +#define YYMARKER marker +#define YYLIMIT limit +#define YYFILL(n) + +void +try_tag_implicit( SyckNode *n, int taguri ) +{ + const char *tid = ""; + switch ( n->kind ) + { + case syck_str_kind: + tid = syck_match_implicit( n->data.str->ptr, n->data.str->len ); + break; + + case syck_seq_kind: + tid = "seq"; + break; + + case syck_map_kind: + tid = "map"; + break; + } + if ( n->type_id != NULL ) S_FREE( n->type_id ); + if ( taguri == 1 ) + { + n->type_id = syck_taguri( YAML_DOMAIN, tid, strlen( tid ) ); + } else { + n->type_id = syck_strndup( tid, strlen( tid ) ); + } +} + +const char * +syck_match_implicit( const char *str, size_t len ) +{ + const char *cursor, *limit, *marker = 0; + cursor = str; + limit = str + len; + + +#line 55 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy0; + ++YYCURSOR; +yy0: + if((YYLIMIT - YYCURSOR) < 26) YYFILL(26); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy6; + case '+': goto yy16; + case '-': goto yy17; + case '.': goto yy20; + case '0': goto yy18; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy19; + case '<': goto yy22; + case '=': goto yy21; + case 'F': goto yy15; + case 'N': goto yy5; + case 'O': goto yy13; + case 'T': goto yy11; + case 'Y': goto yy9; + case 'f': goto yy14; + case 'n': goto yy4; + case 'o': goto yy12; + case 't': goto yy10; + case 'y': goto yy8; + case '~': goto yy2; + default: goto yy23; + } +yy2: ++YYCURSOR; + if((yych = *YYCURSOR) <= 0x00) goto yy6; + goto yy3; +yy3: +#line 123 "implicit.re" +{ return "str"; } +#line 100 "" +yy4: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'o': goto yy172; + case 'u': goto yy200; + default: goto yy3; + } +yy5: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'O': case 'o': goto yy172; + case 'U': goto yy195; + case 'u': goto yy196; + default: goto yy3; + } +yy6: ++YYCURSOR; + goto yy7; +yy7: +#line 85 "implicit.re" +{ return "null"; } +#line 121 "" +yy8: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'e': goto yy194; + default: goto yy3; + } +yy9: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'E': goto yy192; + case 'e': goto yy193; + default: goto yy3; + } +yy10: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'r': goto yy190; + default: goto yy3; + } +yy11: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'R': goto yy186; + case 'r': goto yy187; + default: goto yy3; + } +yy12: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'f': goto yy185; + case 'n': goto yy182; + default: goto yy3; + } +yy13: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'F': goto yy180; + case 'N': case 'n': goto yy182; + case 'f': goto yy181; + default: goto yy3; + } +yy14: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'a': goto yy177; + default: goto yy3; + } +yy15: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'A': goto yy168; + case 'a': goto yy169; + default: goto yy3; + } +yy16: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '.': goto yy167; + case '0': goto yy158; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy47; + default: goto yy3; + } +yy17: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '.': goto yy157; + case '0': goto yy158; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy47; + default: goto yy3; + } +yy18: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x00: goto yy52; + case ',': goto yy142; + case '.': goto yy50; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy140; + case '8': + case '9': goto yy141; + case ':': goto yy49; + case 'x': goto yy144; + default: goto yy3; + } +yy19: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x00: goto yy52; + case ',': goto yy47; + case '.': goto yy50; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy46; + case ':': goto yy49; + default: goto yy3; + } +yy20: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 'I': goto yy33; + case 'N': goto yy31; + case 'i': goto yy32; + case 'n': goto yy30; + default: goto yy3; + } +yy21: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy28; + goto yy3; +yy22: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '<': goto yy24; + default: goto yy3; + } +yy23: yych = *++YYCURSOR; + goto yy3; +yy24: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy26; + goto yy25; +yy25: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy3; + } +yy26: ++YYCURSOR; + goto yy27; +yy27: +#line 121 "implicit.re" +{ return "merge"; } +#line 279 "" +yy28: ++YYCURSOR; + goto yy29; +yy29: +#line 119 "implicit.re" +{ return "default"; } +#line 285 "" +yy30: yych = *++YYCURSOR; + switch(yych){ + case 'a': goto yy45; + default: goto yy25; + } +yy31: yych = *++YYCURSOR; + switch(yych){ + case 'A': goto yy40; + case 'a': goto yy41; + default: goto yy25; + } +yy32: yych = *++YYCURSOR; + switch(yych){ + case 'n': goto yy39; + default: goto yy25; + } +yy33: yych = *++YYCURSOR; + switch(yych){ + case 'N': goto yy34; + case 'n': goto yy35; + default: goto yy25; + } +yy34: yych = *++YYCURSOR; + switch(yych){ + case 'F': goto yy36; + default: goto yy25; + } +yy35: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy36; + default: goto yy25; + } +yy36: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy37; +yy37: ++YYCURSOR; + goto yy38; +yy38: +#line 105 "implicit.re" +{ return "float#inf"; } +#line 326 "" +yy39: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy36; + default: goto yy25; + } +yy40: yych = *++YYCURSOR; + switch(yych){ + case 'N': goto yy42; + default: goto yy25; + } +yy41: yych = *++YYCURSOR; + switch(yych){ + case 'N': goto yy42; + default: goto yy25; + } +yy42: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy43; +yy43: ++YYCURSOR; + goto yy44; +yy44: +#line 109 "implicit.re" +{ return "float#nan"; } +#line 350 "" +yy45: yych = *++YYCURSOR; + switch(yych){ + case 'n': goto yy42; + default: goto yy25; + } +yy46: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy74; + default: goto yy48; + } +yy47: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy48; +yy48: switch(yych){ + case 0x00: goto yy52; + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy47; + case '.': goto yy50; + case ':': goto yy49; + default: goto yy25; + } +yy49: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': goto yy66; + case '6': + case '7': + case '8': + case '9': goto yy67; + default: goto yy25; + } +yy50: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + goto yy51; +yy51: switch(yych){ + case 0x00: goto yy56; + case ',': goto yy54; + case '.': goto yy58; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy50; + case 'E': case 'e': goto yy60; + default: goto yy25; + } +yy52: ++YYCURSOR; + goto yy53; +yy53: +#line 97 "implicit.re" +{ return "int"; } +#line 432 "" +yy54: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy55; +yy55: switch(yych){ + case 0x00: goto yy56; + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy54; + default: goto yy25; + } +yy56: ++YYCURSOR; + goto yy57; +yy57: +#line 99 "implicit.re" +{ return "float#fix"; } +#line 456 "" +yy58: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + goto yy59; +yy59: switch(yych){ + case '.': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy58; + case 'E': case 'e': goto yy60; + default: goto yy25; + } +yy60: yych = *++YYCURSOR; + switch(yych){ + case '+': case '-': goto yy61; + default: goto yy25; + } +yy61: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy25; + goto yy63; +yy62: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy63; +yy63: switch(yych){ + case 0x00: goto yy64; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy62; + default: goto yy25; + } +yy64: ++YYCURSOR; + goto yy65; +yy65: +#line 101 "implicit.re" +{ return "float#exp"; } +#line 506 "" +yy66: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy70; + case '.': goto yy68; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy67; + case ':': goto yy49; + default: goto yy25; + } +yy67: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy70; + case '.': goto yy68; + case ':': goto yy49; + default: goto yy25; + } +yy68: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy69; +yy69: switch(yych){ + case 0x00: goto yy72; + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy68; + default: goto yy25; + } +yy70: ++YYCURSOR; + goto yy71; +yy71: +#line 95 "implicit.re" +{ return "int#base60"; } +#line 558 "" +yy72: ++YYCURSOR; + goto yy73; +yy73: +#line 103 "implicit.re" +{ return "float#base60"; } +#line 564 "" +yy74: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy75; + default: goto yy48; + } +yy75: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy76; + default: goto yy48; + } +yy76: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy77; + default: goto yy25; + } +yy77: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy78; + default: goto yy25; + } +yy78: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy79; + default: goto yy25; + } +yy79: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy80; + default: goto yy25; + } +yy80: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy81; + default: goto yy25; + } +yy81: yych = *++YYCURSOR; + switch(yych){ + case 0x00: goto yy82; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy25; + case 'T': goto yy84; + case 't': goto yy85; + default: goto yy87; + } +yy82: ++YYCURSOR; + goto yy83; +yy83: +#line 111 "implicit.re" +{ return "timestamp#ymd"; } +#line 667 "" +yy84: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy126; + default: goto yy25; + } +yy85: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy108; + default: goto yy25; + } +yy86: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); + yych = *YYCURSOR; + goto yy87; +yy87: switch(yych){ + case 0x09: case ' ': goto yy86; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy88; + default: goto yy25; + } +yy88: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy89; + default: goto yy25; + } +yy89: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy90; + default: goto yy25; + } +yy90: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy91; + default: goto yy25; + } +yy91: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy92; + default: goto yy25; + } +yy92: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy93; + default: goto yy25; + } +yy93: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy94; + default: goto yy25; + } +yy94: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy95; + default: goto yy25; + } +yy95: yych = *++YYCURSOR; + switch(yych){ + case 0x09: case ' ': goto yy98; + case '.': goto yy96; + default: goto yy25; + } +yy96: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy97; +yy97: switch(yych){ + case 0x09: case ' ': goto yy98; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy96; + default: goto yy25; + } +yy98: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 7) YYFILL(7); + yych = *YYCURSOR; + goto yy99; +yy99: switch(yych){ + case 0x09: case ' ': goto yy98; + case '+': case '-': goto yy101; + case 'Z': goto yy100; + default: goto yy25; + } +yy100: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy105; + goto yy25; +yy101: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy102; + default: goto yy25; + } +yy102: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy103; + default: goto yy25; + } +yy103: yych = *++YYCURSOR; + switch(yych){ + case 0x00: goto yy105; + case ':': goto yy104; + default: goto yy25; + } +yy104: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy107; + default: goto yy25; + } +yy105: ++YYCURSOR; + goto yy106; +yy106: +#line 115 "implicit.re" +{ return "timestamp#spaced"; } +#line 884 "" +yy107: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy100; + default: goto yy25; + } +yy108: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy109; + default: goto yy25; + } +yy109: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy110; + default: goto yy25; + } +yy110: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy111; + default: goto yy25; + } +yy111: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy112; + default: goto yy25; + } +yy112: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy113; + default: goto yy25; + } +yy113: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy114; + default: goto yy25; + } +yy114: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy115; + default: goto yy25; + } +yy115: yych = *++YYCURSOR; + switch(yych){ + case '.': goto yy116; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy25; + default: goto yy117; + } +yy116: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 7) YYFILL(7); + yych = *YYCURSOR; + goto yy117; +yy117: switch(yych){ + case '+': case '-': goto yy119; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy116; + case 'Z': goto yy118; + default: goto yy25; + } +yy118: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy123; + goto yy25; +yy119: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy120; + default: goto yy25; + } +yy120: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy121; + default: goto yy25; + } +yy121: yych = *++YYCURSOR; + switch(yych){ + case 0x00: goto yy123; + case ':': goto yy122; + default: goto yy25; + } +yy122: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy125; + default: goto yy25; + } +yy123: ++YYCURSOR; + goto yy124; +yy124: +#line 113 "implicit.re" +{ return "timestamp#iso8601"; } +#line 1069 "" +yy125: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy118; + default: goto yy25; + } +yy126: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy127; + default: goto yy25; + } +yy127: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy128; + default: goto yy25; + } +yy128: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy129; + default: goto yy25; + } +yy129: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy130; + default: goto yy25; + } +yy130: yych = *++YYCURSOR; + switch(yych){ + case ':': goto yy131; + default: goto yy25; + } +yy131: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy132; + default: goto yy25; + } +yy132: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy133; + default: goto yy25; + } +yy133: yych = *++YYCURSOR; + switch(yych){ + case '.': goto yy134; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy25; + case 'Z': goto yy136; + default: goto yy135; + } +yy134: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 7) YYFILL(7); + yych = *YYCURSOR; + goto yy135; +yy135: switch(yych){ + case '+': case '-': goto yy119; + case '0': goto yy134; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy138; + case 'Z': goto yy118; + default: goto yy25; + } +yy136: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy137; +yy137: yych = *++YYCURSOR; + goto yy124; +yy138: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 7) YYFILL(7); + yych = *YYCURSOR; + goto yy139; +yy139: switch(yych){ + case '+': case '-': goto yy119; + case '0': goto yy134; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy138; + case 'Z': goto yy136; + default: goto yy25; + } +yy140: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy155; + case '8': + case '9': goto yy153; + default: goto yy143; + } +yy141: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy153; + default: goto yy152; + } +yy142: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy143; +yy143: switch(yych){ + case 0x00: goto yy149; + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy142; + case '.': goto yy50; + case '8': + case '9': goto yy151; + case ':': goto yy49; + default: goto yy25; + } +yy144: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy25; + goto yy146; +yy145: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy146; +yy146: switch(yych){ + case 0x00: goto yy147; + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy145; + default: goto yy25; + } +yy147: ++YYCURSOR; + goto yy148; +yy148: +#line 91 "implicit.re" +{ return "int#hex"; } +#line 1307 "" +yy149: ++YYCURSOR; + goto yy150; +yy150: +#line 93 "implicit.re" +{ return "int#oct"; } +#line 1313 "" +yy151: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy152; +yy152: switch(yych){ + case ',': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy151; + case '.': goto yy50; + case ':': goto yy49; + default: goto yy25; + } +yy153: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy154; + default: goto yy152; + } +yy154: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy76; + default: goto yy152; + } +yy155: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': goto yy156; + case '8': + case '9': goto yy154; + default: goto yy143; + } +yy156: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy76; + default: goto yy143; + } +yy157: yych = *++YYCURSOR; + switch(yych){ + case 'I': goto yy160; + case 'i': goto yy159; + default: goto yy25; + } +yy158: yych = *++YYCURSOR; + switch(yych){ + case 0x00: goto yy52; + case 'x': goto yy144; + default: goto yy143; + } +yy159: yych = *++YYCURSOR; + switch(yych){ + case 'n': goto yy166; + default: goto yy25; + } +yy160: yych = *++YYCURSOR; + switch(yych){ + case 'N': goto yy161; + case 'n': goto yy162; + default: goto yy25; + } +yy161: yych = *++YYCURSOR; + switch(yych){ + case 'F': goto yy163; + default: goto yy25; + } +yy162: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy163; + default: goto yy25; + } +yy163: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy164; +yy164: ++YYCURSOR; + goto yy165; +yy165: +#line 107 "implicit.re" +{ return "float#neginf"; } +#line 1412 "" +yy166: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy163; + default: goto yy25; + } +yy167: yych = *++YYCURSOR; + switch(yych){ + case 'I': goto yy33; + case 'i': goto yy32; + default: goto yy25; + } +yy168: yych = *++YYCURSOR; + switch(yych){ + case 'L': goto yy175; + default: goto yy25; + } +yy169: yych = *++YYCURSOR; + switch(yych){ + case 'l': goto yy170; + default: goto yy25; + } +yy170: yych = *++YYCURSOR; + switch(yych){ + case 's': goto yy171; + default: goto yy25; + } +yy171: yych = *++YYCURSOR; + switch(yych){ + case 'e': goto yy172; + default: goto yy25; + } +yy172: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy173; +yy173: ++YYCURSOR; + goto yy174; +yy174: +#line 89 "implicit.re" +{ return "bool#no"; } +#line 1452 "" +yy175: yych = *++YYCURSOR; + switch(yych){ + case 'S': goto yy176; + default: goto yy25; + } +yy176: yych = *++YYCURSOR; + switch(yych){ + case 'E': goto yy172; + default: goto yy25; + } +yy177: yych = *++YYCURSOR; + switch(yych){ + case 'l': goto yy178; + default: goto yy25; + } +yy178: yych = *++YYCURSOR; + switch(yych){ + case 's': goto yy179; + default: goto yy25; + } +yy179: yych = *++YYCURSOR; + switch(yych){ + case 'e': goto yy172; + default: goto yy25; + } +yy180: yych = *++YYCURSOR; + switch(yych){ + case 'F': goto yy172; + default: goto yy25; + } +yy181: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy172; + default: goto yy25; + } +yy182: yych = *++YYCURSOR; + if(yych >= 0x01) goto yy25; + goto yy183; +yy183: ++YYCURSOR; + goto yy184; +yy184: +#line 87 "implicit.re" +{ return "bool#yes"; } +#line 1496 "" +yy185: yych = *++YYCURSOR; + switch(yych){ + case 'f': goto yy172; + default: goto yy25; + } +yy186: yych = *++YYCURSOR; + switch(yych){ + case 'U': goto yy189; + default: goto yy25; + } +yy187: yych = *++YYCURSOR; + switch(yych){ + case 'u': goto yy188; + default: goto yy25; + } +yy188: yych = *++YYCURSOR; + switch(yych){ + case 'e': goto yy182; + default: goto yy25; + } +yy189: yych = *++YYCURSOR; + switch(yych){ + case 'E': goto yy182; + default: goto yy25; + } +yy190: yych = *++YYCURSOR; + switch(yych){ + case 'u': goto yy191; + default: goto yy25; + } +yy191: yych = *++YYCURSOR; + switch(yych){ + case 'e': goto yy182; + default: goto yy25; + } +yy192: yych = *++YYCURSOR; + switch(yych){ + case 'S': goto yy182; + default: goto yy25; + } +yy193: yych = *++YYCURSOR; + switch(yych){ + case 's': goto yy182; + default: goto yy25; + } +yy194: yych = *++YYCURSOR; + switch(yych){ + case 's': goto yy182; + default: goto yy25; + } +yy195: yych = *++YYCURSOR; + switch(yych){ + case 'L': goto yy199; + default: goto yy25; + } +yy196: yych = *++YYCURSOR; + switch(yych){ + case 'l': goto yy197; + default: goto yy25; + } +yy197: yych = *++YYCURSOR; + switch(yych){ + case 'l': goto yy198; + default: goto yy25; + } +yy198: yych = *++YYCURSOR; + if(yych <= 0x00) goto yy6; + goto yy25; +yy199: yych = *++YYCURSOR; + switch(yych){ + case 'L': goto yy198; + default: goto yy25; + } +yy200: yych = *++YYCURSOR; + switch(yych){ + case 'l': goto yy201; + default: goto yy25; + } +yy201: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 'l': goto yy198; + default: goto yy25; + } +} +#line 125 "implicit.re" + + +} + +/* Remove ending fragment and compare types */ +int +syck_tagcmp( const char *tag1, const char *tag2 ) +{ + if ( tag1 == tag2 ) return 1; + if ( tag1 == NULL || tag2 == NULL ) return 0; + else { + int i; + char *othorpe; + char *tmp1 = syck_strndup( tag1, strlen( tag1 ) ); + char *tmp2 = syck_strndup( tag2, strlen( tag2 ) ); + othorpe = strstr( tmp1, "#" ); + if ( othorpe != NULL ) { + othorpe[0] = '\0'; + } + othorpe = strstr( tmp2, "#" ); + if ( othorpe != NULL ) { + othorpe[0] = '\0'; + } + i = strcmp( tmp1, tmp2 ); + S_FREE( tmp1 ); S_FREE( tmp2 ); + return i; + } +} + +char * +syck_type_id_to_uri( const char *type_id ) +{ + const char *cursor, *limit, *marker = 0; + + cursor = type_id; + limit = type_id + strlen( type_id ); + + +#line 1620 "" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + goto yy202; + ++YYCURSOR; +yy202: + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy204; + case '!': goto yy208; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': case 'u': + case 'v': + case 'w': case 'y': + case 'z': goto yy210; + case 't': goto yy205; + case 'x': goto yy207; + default: goto yy211; + } +yy204: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy206; + } +yy205: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case ',': goto yy216; + case '-': goto yy212; + case '.': goto yy217; + case '/': goto yy218; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy214; + case 'a': goto yy246; + default: goto yy206; + } +yy206: +#line 202 "implicit.re" +{ return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); } +#line 1768 "" +yy207: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case ',': case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy215; + case '-': goto yy236; + default: goto yy206; + } +yy208: ++YYCURSOR; + goto yy209; +yy209: +#line 176 "implicit.re" +{ return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); } +#line 1842 "" +yy210: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case ',': goto yy216; + case '-': goto yy212; + case '.': goto yy217; + case '/': goto yy218; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy214; + default: goto yy206; + } +yy211: yych = *++YYCURSOR; + goto yy206; +yy212: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy213; +yy213: switch(yych){ + case '-': goto yy212; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy214; + default: goto yy204; + } +yy214: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy215; +yy215: switch(yych){ + case ',': goto yy216; + case '-': goto yy212; + case '.': goto yy217; + case '/': goto yy218; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy214; + default: goto yy204; + } +yy216: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy224; + default: goto yy204; + } +yy217: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy220; + default: goto yy204; + } +yy218: ++YYCURSOR; + goto yy219; +yy219: +#line 178 "implicit.re" +{ char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 ); + char *uri; + + domain[0] = '\0'; + strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 ); + strcat( domain, "." ); + strcat( domain, YAML_DOMAIN ); + uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR ); + + S_FREE( domain ); + return uri; + } +#line 2149 "" +yy220: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 12) YYFILL(12); + yych = *YYCURSOR; + goto yy221; +yy221: switch(yych){ + case ',': goto yy216; + case '-': goto yy222; + case '.': goto yy217; + case '/': goto yy218; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy220; + default: goto yy204; + } +yy222: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy223; +yy223: switch(yych){ + case '-': goto yy222; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy220; + default: goto yy204; + } +yy224: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy225; + default: goto yy204; + } +yy225: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy226; + default: goto yy204; + } +yy226: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy227; + default: goto yy204; + } +yy227: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy228; + case '/': goto yy229; + default: goto yy204; + } +yy228: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy231; + default: goto yy204; + } +yy229: ++YYCURSOR; + goto yy230; +yy230: +#line 191 "implicit.re" +{ char *domain = S_ALLOC_N( char, YYCURSOR - type_id ); + char *uri; + + domain[0] = '\0'; + strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 ); + uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR ); + + S_FREE( domain ); + return uri; + } +#line 2365 "" +yy231: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy232; + default: goto yy204; + } +yy232: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy233; + case '/': goto yy229; + default: goto yy204; + } +yy233: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy234; + default: goto yy204; + } +yy234: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy235; + default: goto yy204; + } +yy235: yych = *++YYCURSOR; + switch(yych){ + case '/': goto yy229; + default: goto yy204; + } +yy236: yych = *++YYCURSOR; + switch(yych){ + case 'p': goto yy237; + default: goto yy213; + } +yy237: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'r': goto yy238; + default: goto yy213; + } +yy238: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'i': goto yy239; + default: goto yy213; + } +yy239: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'v': goto yy240; + default: goto yy213; + } +yy240: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'a': goto yy241; + default: goto yy213; + } +yy241: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 't': goto yy242; + default: goto yy213; + } +yy242: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'e': goto yy243; + default: goto yy213; + } +yy243: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case ':': goto yy244; + default: goto yy213; + } +yy244: ++YYCURSOR; + goto yy245; +yy245: +#line 174 "implicit.re" +{ return syck_strndup( type_id, strlen( type_id ) ); } +#line 2485 "" +yy246: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case 'g': goto yy247; + default: goto yy213; + } +yy247: yych = *++YYCURSOR; + switch(yych){ + case ',': goto yy216; + case '.': goto yy217; + case '/': goto yy218; + case ':': goto yy248; + default: goto yy213; + } +yy248: yych = *++YYCURSOR; + switch(yych){ + case ',': + case '-': + case '.': goto yy204; + default: goto yy250; + } +yy249: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy250; +yy250: switch(yych){ + case ',': goto yy253; + case '-': goto yy251; + case '.': goto yy254; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy249; + default: goto yy204; + } +yy251: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy252; +yy252: switch(yych){ + case '-': goto yy251; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy249; + default: goto yy204; + } +yy253: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy259; + default: goto yy204; + } +yy254: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy255; + default: goto yy204; + } +yy255: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 12) YYFILL(12); + yych = *YYCURSOR; + goto yy256; +yy256: switch(yych){ + case ',': goto yy253; + case '-': goto yy257; + case '.': goto yy254; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy255; + default: goto yy204; + } +yy257: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy258; +yy258: switch(yych){ + case '-': goto yy257; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy255; + default: goto yy204; + } +yy259: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy260; + default: goto yy204; + } +yy260: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy261; + default: goto yy204; + } +yy261: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy262; + default: goto yy204; + } +yy262: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy263; + case ':': goto yy264; + default: goto yy204; + } +yy263: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy266; + default: goto yy204; + } +yy264: ++YYCURSOR; + goto yy265; +yy265: +#line 172 "implicit.re" +{ return syck_strndup( type_id, strlen( type_id ) ); } +#line 2932 "" +yy266: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy267; + default: goto yy204; + } +yy267: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy268; + case ':': goto yy264; + default: goto yy204; + } +yy268: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy269; + default: goto yy204; + } +yy269: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy270; + default: goto yy204; + } +yy270: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case ':': goto yy264; + default: goto yy204; + } +} +#line 204 "implicit.re" + + +} diff --git a/lib/ruby-1.9.1-rc1/ext/syck/node.c b/lib/ruby-1.9.1-rc1/ext/syck/node.c new file mode 100644 index 0000000..8b854eb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/node.c @@ -0,0 +1,407 @@ +/* + * node.c + * + * $Author: mame $ + * + * Copyright (C) 2003 why the lucky stiff + */ + +#include "ruby/ruby.h" +#include "syck.h" + +/* + * Node allocation functions + */ +SyckNode * +syck_alloc_node( enum syck_kind_tag type ) +{ + SyckNode *s; + + s = S_ALLOC( SyckNode ); + s->kind = type; + s->id = 0; + s->type_id = NULL; + s->anchor = NULL; + s->shortcut = NULL; + + return s; +} + +void +syck_free_node( SyckNode *n ) +{ + syck_free_members( n ); + if ( n->type_id != NULL ) + { + S_FREE( n->type_id ); + n->type_id = NULL; + } + if ( n->anchor != NULL ) + { + S_FREE( n->anchor ); + n->anchor = NULL; + } + S_FREE( n ); +} + +SyckNode * +syck_alloc_map(void) +{ + SyckNode *n; + struct SyckMap *m; + + m = S_ALLOC( struct SyckMap ); + m->style = map_none; + m->idx = 0; + m->capa = ALLOC_CT; + m->keys = S_ALLOC_N( SYMID, m->capa ); + m->values = S_ALLOC_N( SYMID, m->capa ); + + n = syck_alloc_node( syck_map_kind ); + n->data.pairs = m; + + return n; +} + +SyckNode * +syck_alloc_seq(void) +{ + SyckNode *n; + struct SyckSeq *s; + + s = S_ALLOC( struct SyckSeq ); + s->style = seq_none; + s->idx = 0; + s->capa = ALLOC_CT; + s->items = S_ALLOC_N( SYMID, s->capa ); + + n = syck_alloc_node( syck_seq_kind ); + n->data.list = s; + + return n; +} + +SyckNode * +syck_alloc_str(void) +{ + SyckNode *n; + struct SyckStr *s; + + s = S_ALLOC( struct SyckStr ); + s->len = 0; + s->ptr = NULL; + s->style = scalar_none; + + n = syck_alloc_node( syck_str_kind ); + n->data.str = s; + + return n; +} + +SyckNode * +syck_new_str( const char *str, enum scalar_style style ) +{ + return syck_new_str2( str, strlen( str ), style ); +} + +SyckNode * +syck_new_str2( const char *str, long len, enum scalar_style style ) +{ + SyckNode *n; + + n = syck_alloc_str(); + n->data.str->ptr = S_ALLOC_N( char, len + 1 ); + n->data.str->len = len; + n->data.str->style = style; + memcpy( n->data.str->ptr, str, len ); + n->data.str->ptr[len] = '\0'; + + return n; +} + +void +syck_replace_str( SyckNode *n, char *str, enum scalar_style style ) +{ + syck_replace_str2( n, str, strlen( str ), style ); +} + +void +syck_replace_str2( SyckNode *n, char *str, long len, enum scalar_style style ) +{ + if ( n->data.str->ptr != NULL ) + { + S_FREE( n->data.str->ptr ); + n->data.str->ptr = NULL; + n->data.str->len = 0; + } + n->data.str->ptr = S_ALLOC_N( char, len + 1 ); + n->data.str->len = len; + n->data.str->style = style; + memcpy( n->data.str->ptr, str, len ); + n->data.str->ptr[len] = '\0'; +} + +void +syck_str_blow_away_commas( SyckNode *n ) +{ + char *go, *end; + + go = n->data.str->ptr; + end = go + n->data.str->len; + while ( *(++go) != '\0' ) + { + if ( *go == ',' ) + { + n->data.str->len -= 1; + memmove( go, go + 1, end - go ); + end -= 1; + } + } +} + +char * +syck_str_read( SyckNode *n ) +{ + ASSERT( n != NULL ); + return n->data.str->ptr; +} + +SyckNode * +syck_new_map( SYMID key, SYMID value ) +{ + SyckNode *n; + + n = syck_alloc_map(); + syck_map_add( n, key, value ); + + return n; +} + +void +syck_map_empty( SyckNode *n ) +{ + struct SyckMap *m; + ASSERT( n != NULL ); + ASSERT( n->data.list != NULL ); + + S_FREE( n->data.pairs->keys ); + S_FREE( n->data.pairs->values ); + m = n->data.pairs; + m->idx = 0; + m->capa = ALLOC_CT; + m->keys = S_ALLOC_N( SYMID, m->capa ); + m->values = S_ALLOC_N( SYMID, m->capa ); +} + +void +syck_map_add( SyckNode *map, SYMID key, SYMID value ) +{ + struct SyckMap *m; + long idx; + + ASSERT( map != NULL ); + ASSERT( map->data.pairs != NULL ); + + m = map->data.pairs; + idx = m->idx; + m->idx += 1; + if ( m->idx > m->capa ) + { + m->capa += ALLOC_CT; + S_REALLOC_N( m->keys, SYMID, m->capa ); + S_REALLOC_N( m->values, SYMID, m->capa ); + } + m->keys[idx] = key; + m->values[idx] = value; +} + +void +syck_map_update( SyckNode *map1, SyckNode *map2 ) +{ + struct SyckMap *m1, *m2; + long new_idx, new_capa; + ASSERT( map1 != NULL ); + ASSERT( map2 != NULL ); + + m1 = map1->data.pairs; + m2 = map2->data.pairs; + if ( m2->idx < 1 ) return; + + new_idx = m1->idx; + new_idx += m2->idx; + new_capa = m1->capa; + while ( new_idx > new_capa ) + { + new_capa += ALLOC_CT; + } + if ( new_capa > m1->capa ) + { + m1->capa = new_capa; + S_REALLOC_N( m1->keys, SYMID, m1->capa ); + S_REALLOC_N( m1->values, SYMID, m1->capa ); + } + for ( new_idx = 0; new_idx < m2->idx; m1->idx++, new_idx++ ) + { + m1->keys[m1->idx] = m2->keys[new_idx]; + m1->values[m1->idx] = m2->values[new_idx]; + } +} + +long +syck_map_count( SyckNode *map ) +{ + ASSERT( map != NULL ); + ASSERT( map->data.pairs != NULL ); + return map->data.pairs->idx; +} + +void +syck_map_assign( SyckNode *map, enum map_part p, long idx, SYMID id ) +{ + struct SyckMap *m; + + ASSERT( map != NULL ); + m = map->data.pairs; + ASSERT( m != NULL ); + if ( p == map_key ) + { + m->keys[idx] = id; + } + else + { + m->values[idx] = id; + } +} + +SYMID +syck_map_read( SyckNode *map, enum map_part p, long idx ) +{ + struct SyckMap *m; + + ASSERT( map != NULL ); + m = map->data.pairs; + ASSERT( m != NULL ); + if ( p == map_key ) + { + return m->keys[idx]; + } + else + { + return m->values[idx]; + } +} + +SyckNode * +syck_new_seq( SYMID value ) +{ + SyckNode *n; + + n = syck_alloc_seq(); + syck_seq_add( n, value ); + + return n; +} + +void +syck_seq_empty( SyckNode *n ) +{ + struct SyckSeq *s; + ASSERT( n != NULL ); + ASSERT( n->data.list != NULL ); + + S_FREE( n->data.list->items ); + s = n->data.list; + s->idx = 0; + s->capa = ALLOC_CT; + s->items = S_ALLOC_N( SYMID, s->capa ); +} + +void +syck_seq_add( SyckNode *arr, SYMID value ) +{ + struct SyckSeq *s; + long idx; + + ASSERT( arr != NULL ); + ASSERT( arr->data.list != NULL ); + + s = arr->data.list; + idx = s->idx; + s->idx += 1; + if ( s->idx > s->capa ) + { + s->capa += ALLOC_CT; + S_REALLOC_N( s->items, SYMID, s->capa ); + } + s->items[idx] = value; +} + +long +syck_seq_count( SyckNode *seq ) +{ + ASSERT( seq != NULL ); + ASSERT( seq->data.list != NULL ); + return seq->data.list->idx; +} + +void +syck_seq_assign( SyckNode *seq, long idx, SYMID id ) +{ + struct SyckSeq *s; + + ASSERT( map != NULL ); + s = seq->data.list; + ASSERT( m != NULL ); + s->items[idx] = id; +} + +SYMID +syck_seq_read( SyckNode *seq, long idx ) +{ + struct SyckSeq *s; + + ASSERT( seq != NULL ); + s = seq->data.list; + ASSERT( s != NULL ); + return s->items[idx]; +} + +void +syck_free_members( SyckNode *n ) +{ + if ( n == NULL ) return; + + switch ( n->kind ) + { + case syck_str_kind: + if ( n->data.str != NULL ) + { + S_FREE( n->data.str->ptr ); + n->data.str->ptr = NULL; + n->data.str->len = 0; + S_FREE( n->data.str ); + n->data.str = NULL; + } + break; + + case syck_seq_kind: + if ( n->data.list != NULL ) + { + S_FREE( n->data.list->items ); + S_FREE( n->data.list ); + n->data.list = NULL; + } + break; + + case syck_map_kind: + if ( n->data.pairs != NULL ) + { + S_FREE( n->data.pairs->keys ); + S_FREE( n->data.pairs->values ); + S_FREE( n->data.pairs ); + n->data.pairs = NULL; + } + break; + } +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/rubyext.c b/lib/ruby-1.9.1-rc1/ext/syck/rubyext.c new file mode 100644 index 0000000..01f21e1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/rubyext.c @@ -0,0 +1,2315 @@ +/* -*- indent-tabs-mode: nil -*- */ +/* + * rubyext.c + * + * $Author: yugui $ + * + * Copyright (C) 2003-2005 why the lucky stiff + */ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" +#include "syck.h" +#include +#include + +typedef struct RVALUE { + union { +#if 0 + struct { + unsigned long flags; /* always 0 for freed obj */ + struct RVALUE *next; + } free; +#endif + struct RBasic basic; + struct RObject object; + struct RClass klass; + /*struct RFloat flonum;*/ + /*struct RString string;*/ + struct RArray array; + /*struct RRegexp regexp;*/ + struct RHash hash; + /*struct RData data;*/ + struct RStruct rstruct; + /*struct RBignum bignum;*/ + /*struct RFile file;*/ + } as; +} RVALUE; + +typedef struct { + long hash; + char *buffer; + long length; + long remaining; + int printed; +} bytestring_t; + +#define RUBY_DOMAIN "ruby.yaml.org,2002" + +/* + * symbols and constants + */ +static ID s_new, s_utc, s_at, s_to_f, s_to_i, s_read, s_binmode, s_call, s_cmp, s_transfer, s_update, s_dup, s_haskey, s_match, s_keys, s_unpack, s_tr_bang, s_default_set, s_tag_read_class, s_tag_subclasses, s_resolver, s_push, s_emitter, s_level, s_detect_implicit, s_node_import, s_out, s_input, s_intern, s_transform, s_yaml_new, s_yaml_initialize, s_node_export, s_to_yaml, s_write, s_set_resolver, s_each; +static ID s_tags, s_kind, s_name, s_options, s_type_id, s_type_id_set, s_style, s_style_set, s_value, s_value_set, s_parse; +static VALUE sym_model, sym_generic, sym_input, sym_bytecode; +static VALUE sym_scalar, sym_seq, sym_map; +static VALUE sym_1quote, sym_2quote, sym_fold, sym_literal, sym_plain, sym_inline; +static VALUE cDate, cNode, cMap, cSeq, cScalar, cOut, cParser, cResolver, cPrivateType, cDomainType, cYObject, cBadAlias, cDefaultKey, cMergeKey, cEmitter, cDateTime; +static VALUE oDefaultResolver, oGenericResolver; + +/* + * my private collection of numerical oddities. + */ +static double S_zero(void) { return 0.0; } +static double S_one(void) { return 1.0; } +static double S_inf(void) { return S_one() / S_zero(); } +static double S_nan(void) { return S_zero() / S_zero(); } + +static VALUE syck_node_transform( VALUE ); + +/* + * handler prototypes + */ +SYMID rb_syck_load_handler _((SyckParser *, SyckNode *)); +void rb_syck_err_handler _((SyckParser *, const char *)); +SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *)); +void rb_syck_output_handler _((SyckEmitter *, char *, long)); +void rb_syck_emitter_handler _((SyckEmitter *, st_data_t)); +int syck_parser_assign_io _((SyckParser *, VALUE *)); +VALUE syck_scalar_alloc _((VALUE class)); +VALUE syck_seq_alloc _((VALUE class)); +VALUE syck_map_alloc _((VALUE class)); + +struct parser_xtra { + VALUE data; /* Borrowed this idea from marshal.c to fix [ruby-core:8067] problem */ + VALUE proc; + VALUE resolver; + int taint; +}; + +struct emitter_xtra { + VALUE oid; + VALUE data; + VALUE port; +}; + +/* + * Convert YAML to bytecode + */ +VALUE +rb_syck_compile(VALUE self, VALUE port) +{ + SYMID oid; + int taint; + char *ret; + VALUE bc; + bytestring_t *sav = NULL; + void *data = NULL; + + SyckParser *parser = syck_new_parser(); + taint = syck_parser_assign_io(parser, &port); + syck_parser_handler( parser, syck_yaml2byte_handler ); + syck_parser_error_handler( parser, NULL ); + syck_parser_implicit_typing( parser, 0 ); + syck_parser_taguri_expansion( parser, 0 ); + oid = syck_parse( parser ); + if (!syck_lookup_sym( parser, oid, &data )) { + rb_raise(rb_eSyntaxError, "root node <%lx> not found", oid); + } + sav = data; + + ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 ); + ret[0] = '\0'; + strcat( ret, "D\n" ); + strcat( ret, sav->buffer ); + + syck_free_parser( parser ); + + bc = rb_str_new2( ret ); + if ( taint ) OBJ_TAINT( bc ); + return bc; +} + +/* + * read from io. + */ +long +rb_syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip ) +{ + long len = 0; + + ASSERT( str != NULL ); + max_size -= skip; + + if ( max_size <= 0 ) max_size = 0; + else + { + /* + * call io#read. + */ + VALUE src = (VALUE)str->ptr; + VALUE n = LONG2NUM(max_size); + VALUE str2 = rb_funcall2(src, s_read, 1, &n); + if (!NIL_P(str2)) + { + StringValue(str2); + len = RSTRING_LEN(str2); + memcpy( buf + skip, RSTRING_PTR(str2), len ); + } + } + len += skip; + buf[len] = '\0'; + return len; +} + +/* + * determine: are we reading from a string or io? + * (returns tainted? boolean) + */ +int +syck_parser_assign_io(SyckParser *parser, VALUE *pport) +{ + int taint = Qtrue; + VALUE tmp, port = *pport; + if (!NIL_P(tmp = rb_check_string_type(port))) { + taint = OBJ_TAINTED(port); /* original taintedness */ + port = tmp; + syck_parser_str( parser, RSTRING_PTR(port), RSTRING_LEN(port), NULL ); + } + else if (rb_respond_to(port, s_read)) { + if (rb_respond_to(port, s_binmode)) { + rb_funcall2(port, s_binmode, 0, 0); + } + syck_parser_str( parser, (char *)port, 0, rb_syck_io_str_read ); + } + else { + rb_raise(rb_eTypeError, "instance of IO needed"); + } + *pport = port; + return taint; +} + +/* + * Get value in hash by key, forcing an empty hash if nil. + */ +VALUE +syck_get_hash_aref(VALUE hsh, VALUE key) +{ + VALUE val = rb_hash_aref( hsh, key ); + if ( NIL_P( val ) ) + { + val = rb_hash_new(); + rb_hash_aset(hsh, key, val); + } + return val; +} + +/* + * creating timestamps + */ +struct mktime_arg { + char *str; + long len; +}; + +SYMID +mktime_do(struct mktime_arg *arg) +{ + VALUE time; + char *str = arg->str; + long len = arg->len; + char *ptr = str; + VALUE year = INT2FIX(0); + VALUE mon = INT2FIX(0); + VALUE day = INT2FIX(0); + VALUE hour = INT2FIX(0); + VALUE min = INT2FIX(0); + VALUE sec = INT2FIX(0); + long usec; + + /* Year*/ + if ( ptr[0] != '\0' && len > 0 ) { + year = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Month*/ + ptr += 4; + if ( ptr[0] != '\0' && len > ptr - str ) { + while ( !ISDIGIT( *ptr ) ) ptr++; + mon = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Day*/ + ptr += 2; + if ( ptr[0] != '\0' && len > ptr - str ) { + while ( !ISDIGIT( *ptr ) ) ptr++; + day = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Hour*/ + ptr += 2; + if ( ptr[0] != '\0' && len > ptr - str ) { + while ( !ISDIGIT( *ptr ) ) ptr++; + hour = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Minute */ + ptr += 2; + if ( ptr[0] != '\0' && len > ptr - str ) { + while ( !ISDIGIT( *ptr ) ) ptr++; + min = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Second */ + ptr += 2; + if ( ptr[0] != '\0' && len > ptr - str ) { + while ( !ISDIGIT( *ptr ) ) ptr++; + sec = INT2FIX(strtol(ptr, NULL, 10)); + } + + /* Millisecond */ + ptr += 2; + if ( len > ptr - str && *ptr == '.' ) + { + char padded[] = "000000"; + char *end = ptr + 1; + char *p = end; + while ( isdigit( *end ) ) end++; + if (end - p < sizeof(padded)) { + MEMCPY(padded, ptr + 1, char, end - (ptr + 1)); + p = padded; + } + usec = strtol(p, NULL, 10); + } + else + { + usec = 0; + } + + /* Time Zone*/ + while ( len > ptr - str && *ptr != 'Z' && *ptr != '+' && *ptr != '-' && *ptr != '\0' ) ptr++; + if ( len > ptr - str && ( *ptr == '-' || *ptr == '+' ) ) + { + time_t tz_offset = strtol(ptr, NULL, 10) * 3600; + time_t tmp; + + while ( *ptr != ':' && *ptr != '\0' ) ptr++; + if ( *ptr == ':' ) + { + ptr += 1; + if ( tz_offset < 0 ) + { + tz_offset -= strtol(ptr, NULL, 10) * 60; + } + else + { + tz_offset += strtol(ptr, NULL, 10) * 60; + } + } + + /* Make TZ time*/ + time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec); + tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset; + return rb_funcall(rb_cTime, s_at, 2, LONG2NUM(tmp), LONG2NUM(usec)); + } + else + { + /* Make UTC time*/ + return rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, LONG2NUM(usec)); + } +} + +SYMID +mktime_r(struct mktime_arg *arg) +{ + if (!cDateTime) { + /* + * Load Date module + */ + rb_require("date"); + cDateTime = rb_const_get(rb_cObject, rb_intern("DateTime")); + } + return rb_funcall(cDateTime, s_parse, 1, rb_str_new(arg->str, arg->len)); +} + +SYMID +rb_syck_mktime(char *str, long len) +{ + struct mktime_arg a; + + a.str = str; + a.len = len; + return rb_rescue2(mktime_do, (VALUE)&a, mktime_r, (VALUE)&a, rb_eArgError, NULL); +} + +/* + * handles merging of an array of hashes + * (see http://www.yaml.org/type/merge/) + */ +VALUE +syck_merge_i(VALUE entry, VALUE hsh ) +{ + VALUE tmp; + if ( !NIL_P(tmp = rb_check_convert_type(entry, T_HASH, "Hash", "to_hash")) ) + { + entry = tmp; + rb_funcall( hsh, s_update, 1, entry ); + } + return Qnil; +} + +/* + * default handler for ruby.yaml.org types + */ +int +yaml_org_handler( SyckNode *n, VALUE *ref ) +{ + char *type_id = n->type_id; + int transferred = 0; + long i = 0; + VALUE obj = Qnil; + + if ( type_id != NULL && strncmp( type_id, "tag:yaml.org,2002:", 18 ) == 0 ) + { + type_id += 18; + } + + switch (n->kind) + { + case syck_str_kind: + transferred = 1; + if ( type_id == NULL ) + { + obj = rb_str_new( n->data.str->ptr, n->data.str->len ); + } + else if ( strcmp( type_id, "null" ) == 0 ) + { + obj = Qnil; + } + else if ( strcmp( type_id, "binary" ) == 0 ) + { + VALUE arr; + obj = rb_str_new( n->data.str->ptr, n->data.str->len ); + rb_funcall( obj, s_tr_bang, 2, rb_str_new2( "\n\t " ), rb_str_new2( "" ) ); + arr = rb_funcall( obj, s_unpack, 1, rb_str_new2( "m" ) ); + obj = rb_ary_shift( arr ); + } + else if ( strcmp( type_id, "bool#yes" ) == 0 ) + { + obj = Qtrue; + } + else if ( strcmp( type_id, "bool#no" ) == 0 ) + { + obj = Qfalse; + } + else if ( strcmp( type_id, "int#hex" ) == 0 ) + { + syck_str_blow_away_commas( n ); + obj = rb_cstr2inum( n->data.str->ptr, 16 ); + } + else if ( strcmp( type_id, "int#oct" ) == 0 ) + { + syck_str_blow_away_commas( n ); + obj = rb_cstr2inum( n->data.str->ptr, 8 ); + } + else if ( strcmp( type_id, "int#base60" ) == 0 ) + { + char *ptr, *end; + long sixty = 1; + long total = 0; + syck_str_blow_away_commas( n ); + ptr = n->data.str->ptr; + end = n->data.str->ptr + n->data.str->len; + while ( end > ptr ) + { + long bnum = 0; + char *colon = end - 1; + while ( colon >= ptr && *colon != ':' ) + { + colon--; + } + if ( colon >= ptr && *colon == ':' ) *colon = '\0'; + + bnum = strtol( colon + 1, NULL, 10 ); + total += bnum * sixty; + sixty *= 60; + end = colon; + } + obj = INT2FIX(total); + } + else if ( strncmp( type_id, "int", 3 ) == 0 ) + { + syck_str_blow_away_commas( n ); + obj = rb_cstr2inum( n->data.str->ptr, 10 ); + } + else if ( strcmp( type_id, "float#base60" ) == 0 ) + { + char *ptr, *end; + long sixty = 1; + double total = 0.0; + syck_str_blow_away_commas( n ); + ptr = n->data.str->ptr; + end = n->data.str->ptr + n->data.str->len; + while ( end > ptr ) + { + double bnum = 0; + char *colon = end - 1; + while ( colon >= ptr && *colon != ':' ) + { + colon--; + } + if ( colon >= ptr && *colon == ':' ) *colon = '\0'; + + bnum = strtod( colon + 1, NULL ); + total += bnum * sixty; + sixty *= 60; + end = colon; + } + obj = rb_float_new( total ); + } + else if ( strcmp( type_id, "float#nan" ) == 0 ) + { + obj = rb_float_new( S_nan() ); + } + else if ( strcmp( type_id, "float#inf" ) == 0 ) + { + obj = rb_float_new( S_inf() ); + } + else if ( strcmp( type_id, "float#neginf" ) == 0 ) + { + obj = rb_float_new( -S_inf() ); + } + else if ( strncmp( type_id, "float", 5 ) == 0 ) + { + double f; + syck_str_blow_away_commas( n ); + f = strtod( n->data.str->ptr, NULL ); + obj = rb_float_new( f ); + } + else if ( strcmp( type_id, "timestamp#iso8601" ) == 0 ) + { + obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len ); + } + else if ( strcmp( type_id, "timestamp#spaced" ) == 0 ) + { + obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len ); + } + else if ( strcmp( type_id, "timestamp#ymd" ) == 0 ) + { + char *ptr = n->data.str->ptr; + VALUE year, mon, day; + + /* Year*/ + ptr[4] = '\0'; + year = INT2FIX(strtol(ptr, NULL, 10)); + + /* Month*/ + ptr += 4; + while ( !ISDIGIT( *ptr ) ) ptr++; + mon = INT2FIX(strtol(ptr, NULL, 10)); + + /* Day*/ + ptr += 2; + while ( !ISDIGIT( *ptr ) ) ptr++; + day = INT2FIX(strtol(ptr, NULL, 10)); + + if ( !cDate ) { + /* + * Load Date module + */ + rb_require( "date" ); + cDate = rb_const_get( rb_cObject, rb_intern("Date") ); + } + + obj = rb_funcall( cDate, s_new, 3, year, mon, day ); + } + else if ( strncmp( type_id, "timestamp", 9 ) == 0 ) + { + obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len ); + } + else if ( strncmp( type_id, "merge", 5 ) == 0 ) + { + obj = rb_funcall( cMergeKey, s_new, 0 ); + } + else if ( strncmp( type_id, "default", 7 ) == 0 ) + { + obj = rb_funcall( cDefaultKey, s_new, 0 ); + } + else if ( n->data.str->style == scalar_plain && + n->data.str->len > 1 && + strncmp( n->data.str->ptr, ":", 1 ) == 0 ) + { + obj = rb_funcall( oDefaultResolver, s_transfer, 2, + rb_str_new2( "tag:ruby.yaml.org,2002:sym" ), + rb_str_new( n->data.str->ptr + 1, n->data.str->len - 1 ) ); + } + else if ( strcmp( type_id, "str" ) == 0 ) + { + obj = rb_str_new( n->data.str->ptr, n->data.str->len ); + rb_enc_associate(obj, rb_utf8_encoding()); + } + else + { + transferred = 0; + obj = rb_str_new( n->data.str->ptr, n->data.str->len ); + } + break; + + case syck_seq_kind: + if ( type_id == NULL || strcmp( type_id, "seq" ) == 0 ) + { + transferred = 1; + } + obj = rb_ary_new2( n->data.list->idx ); + for ( i = 0; i < n->data.list->idx; i++ ) + { + rb_ary_store( obj, i, syck_seq_read( n, i ) ); + } + break; + + case syck_map_kind: + if ( type_id == NULL || strcmp( type_id, "map" ) == 0 ) + { + transferred = 1; + } + obj = rb_hash_new(); + for ( i = 0; i < n->data.pairs->idx; i++ ) + { + VALUE k = syck_map_read( n, map_key, i ); + VALUE v = syck_map_read( n, map_value, i ); + int skip_aset = 0; + + /* + * Handle merge keys + */ + if ( rb_obj_is_kind_of( k, cMergeKey ) ) + { + VALUE tmp; + if ( !NIL_P(tmp = rb_check_convert_type(v, T_HASH, "Hash", "to_hash")) ) + { + VALUE dup = rb_funcall( tmp, s_dup, 0 ); + rb_funcall( dup, s_update, 1, obj ); + obj = dup; + skip_aset = 1; + } + else if ( !NIL_P(tmp = rb_check_array_type(v)) ) + { + VALUE end = rb_ary_pop( tmp ); + VALUE tmph = rb_check_convert_type(end, T_HASH, "Hash", "to_hash"); + if ( !NIL_P(tmph) ) + { + VALUE dup = rb_funcall( tmph, s_dup, 0 ); + tmp = rb_ary_reverse( tmp ); + rb_ary_push( tmp, obj ); + rb_block_call( tmp, s_each, 0, 0, syck_merge_i, dup ); + obj = dup; + skip_aset = 1; + } + } + } + else if ( rb_obj_is_kind_of( k, cDefaultKey ) ) + { + rb_funcall( obj, s_default_set, 1, v ); + skip_aset = 1; + } + + if ( ! skip_aset ) + { + rb_hash_aset( obj, k, v ); + } + } + break; + } + + *ref = obj; + return transferred; +} + +static void syck_node_mark( SyckNode *n ); + +/* + * {native mode} node handler + * - Converts data into native Ruby types + */ +SYMID +rb_syck_load_handler(SyckParser *p, SyckNode *n) +{ + VALUE obj = Qnil; + struct parser_xtra *bonus = (struct parser_xtra *)p->bonus; + VALUE resolver = bonus->resolver; + if ( NIL_P( resolver ) ) + { + resolver = oDefaultResolver; + } + + /* + * Create node, + */ + obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) ); + + /* + * ID already set, let's alter the symbol table to accept the new object + */ + if (n->id > 0 && !NIL_P(obj)) + { + MEMCPY((void *)n->id, (void *)obj, RVALUE, 1); + MEMZERO((void *)obj, RVALUE, 1); + obj = n->id; + } + + if ( bonus->taint) OBJ_TAINT( obj ); + if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj); + + rb_hash_aset(bonus->data, INT2FIX(RHASH_SIZE(bonus->data)), obj); + return obj; +} + +/* + * friendly errors. + */ +void +rb_syck_err_handler(SyckParser *p, const char *msg) +{ + char *endl = p->cursor; + + while ( *endl != '\0' && *endl != '\n' ) + endl++; + + endl[0] = '\0'; + rb_raise(rb_eArgError, "%s on line %d, col %"PRIdPTRDIFF": `%s'", + msg, + p->linect, + p->cursor - p->lineptr, + p->lineptr); +} + +/* + * provide bad anchor object to the parser. + */ +SyckNode * +rb_syck_bad_anchor_handler(SyckParser *p, char *a) +{ + VALUE anchor_name = rb_str_new2( a ); + SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), anchor_name ); + badanc->type_id = syck_strndup( "tag:ruby.yaml.org,2002:object:YAML::Syck::BadAlias", 53 ); + return badanc; +} + +/* + * data loaded based on the model requested. + */ +void +syck_set_model(VALUE p, VALUE input, VALUE model) +{ + SyckParser *parser; + Data_Get_Struct(p, SyckParser, parser); + syck_parser_handler( parser, rb_syck_load_handler ); + /* WARN: gonna be obsoleted soon!! */ + if ( model == sym_generic ) + { + rb_funcall( p, s_set_resolver, 1, oGenericResolver ); + } + syck_parser_implicit_typing( parser, 1 ); + syck_parser_taguri_expansion( parser, 1 ); + + if ( NIL_P( input ) ) + { + input = rb_ivar_get( p, s_input ); + } + if ( input == sym_bytecode ) + { + syck_parser_set_input_type( parser, syck_bytecode_utf8 ); + } + else + { + syck_parser_set_input_type( parser, syck_yaml_utf8 ); + } + syck_parser_error_handler( parser, rb_syck_err_handler ); + syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler ); +} + +static int +syck_st_mark_nodes( char *key, SyckNode *n, char *arg ) +{ + if ( n != (void *)1 ) syck_node_mark( n ); + return ST_CONTINUE; +} + +/* + * mark parser nodes + */ +static void +syck_mark_parser(SyckParser *parser) +{ + struct parser_xtra *bonus = (struct parser_xtra *)parser->bonus; + rb_gc_mark_maybe(parser->root); + rb_gc_mark_maybe(parser->root_on_error); + rb_gc_mark( bonus->data ); + rb_gc_mark( bonus->proc ); + rb_gc_mark( bonus->resolver ); + + if ( parser->anchors != NULL ) + { + st_foreach( parser->anchors, syck_st_mark_nodes, 0 ); + } + if ( parser->bad_anchors != NULL ) + { + st_foreach( parser->bad_anchors, syck_st_mark_nodes, 0 ); + } +} + +/* + * Free the parser and any bonus attachment. + */ +void +rb_syck_free_parser(SyckParser *p) +{ + S_FREE( p->bonus ); + syck_free_parser(p); +} + +/* + * YAML::Syck::Parser.allocate + */ +VALUE syck_parser_s_alloc _((VALUE)); +VALUE +syck_parser_s_alloc(VALUE class) +{ + VALUE pobj; + SyckParser *parser = syck_new_parser(); + + parser->bonus = S_ALLOC( struct parser_xtra ); + S_MEMZERO( parser->bonus, struct parser_xtra, 1 ); + + pobj = Data_Wrap_Struct( class, syck_mark_parser, rb_syck_free_parser, parser ); + + syck_parser_set_root_on_error( parser, Qnil ); + + return pobj; +} + +/* + * YAML::Syck::Parser.initialize( resolver, options ) + */ +static VALUE +syck_parser_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE options; + if (rb_scan_args(argc, argv, "01", &options) == 0) + { + options = rb_hash_new(); + } + else + { + Check_Type(options, T_HASH); + } + rb_ivar_set(self, s_options, options); + rb_ivar_set(self, s_input, Qnil); + return self; +} + +/* + * YAML::Syck::Parser.bufsize = Integer + */ +static VALUE +syck_parser_bufsize_set(VALUE self, VALUE size) +{ + SyckParser *parser; + + if ( rb_respond_to( size, s_to_i ) ) { + int n = NUM2INT(rb_funcall(size, s_to_i, 0)); + Data_Get_Struct(self, SyckParser, parser); + parser->bufsize = n; + } + return self; +} + +/* + * YAML::Syck::Parser.bufsize => Integer + */ +static VALUE +syck_parser_bufsize_get(VALUE self) +{ + SyckParser *parser; + + Data_Get_Struct(self, SyckParser, parser); + return INT2FIX( parser->bufsize ); +} + +/* + * YAML::Syck::Parser.load( IO or String ) + */ +VALUE +syck_parser_load(int argc, VALUE *argv, VALUE self) +{ + VALUE port, proc, model, input; + SyckParser *parser; + struct parser_xtra *bonus; + + rb_scan_args(argc, argv, "11", &port, &proc); + + input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input ); + model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model ); + Data_Get_Struct(self, SyckParser, parser); + syck_set_model( self, input, model ); + + bonus = (struct parser_xtra *)parser->bonus; + bonus->taint = syck_parser_assign_io(parser, &port); + bonus->data = rb_hash_new(); + bonus->resolver = rb_attr_get( self, s_resolver ); + if ( NIL_P( proc ) ) bonus->proc = 0; + else bonus->proc = proc; + + return syck_parse( parser ); +} + +/* + * YAML::Syck::Parser.load_documents( IO or String ) { |doc| } + */ +VALUE +syck_parser_load_documents(int argc, VALUE *argv, VALUE self) +{ + VALUE port, proc, v, input, model; + SyckParser *parser; + struct parser_xtra *bonus; + + rb_scan_args(argc, argv, "1&", &port, &proc); + + input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input ); + model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model ); + Data_Get_Struct(self, SyckParser, parser); + syck_set_model( self, input, model ); + + bonus = (struct parser_xtra *)parser->bonus; + bonus->taint = syck_parser_assign_io(parser, &port); + bonus->resolver = rb_attr_get( self, s_resolver ); + bonus->proc = 0; + + while ( 1 ) + { + /* Reset hash for tracking nodes */ + bonus->data = rb_hash_new(); + + /* Parse a document */ + v = syck_parse( parser ); + if ( parser->eof == 1 ) + { + break; + } + + /* Pass document to block */ + rb_funcall( proc, s_call, 1, v ); + } + + return Qnil; +} + +/* + * YAML::Syck::Parser#set_resolver + */ +VALUE +syck_parser_set_resolver(VALUE self, VALUE resolver) +{ + rb_ivar_set( self, s_resolver, resolver ); + return self; +} + +/* + * YAML::Syck::Resolver.initialize + */ +static VALUE +syck_resolver_initialize(VALUE self) +{ + rb_ivar_set(self, s_tags, rb_hash_new()); + return self; +} + +/* + * YAML::Syck::Resolver#add_type + */ +VALUE +syck_resolver_add_type(VALUE self, VALUE taguri, VALUE cls) +{ + VALUE tags = rb_attr_get(self, s_tags); + rb_hash_aset( tags, taguri, cls ); + return Qnil; +} + +/* + * YAML::Syck::Resolver#use_types_at + */ +VALUE +syck_resolver_use_types_at(VALUE self, VALUE hsh) +{ + rb_ivar_set( self, s_tags, hsh ); + return Qnil; +} + +/* + * YAML::Syck::Resolver#detect_implicit + */ +VALUE +syck_resolver_detect_implicit(VALUE self, VALUE val) +{ + return rb_str_new2( "" ); +} + +/* + * YAML::Syck::Resolver#node_import + */ +VALUE +syck_resolver_node_import(VALUE self, VALUE node) +{ + SyckNode *n; + VALUE obj = Qnil; + int i = 0; + Data_Get_Struct(node, SyckNode, n); + + switch (n->kind) + { + case syck_str_kind: + obj = rb_str_new( n->data.str->ptr, n->data.str->len ); + break; + + case syck_seq_kind: + obj = rb_ary_new2( n->data.list->idx ); + for ( i = 0; i < n->data.list->idx; i++ ) + { + rb_ary_store( obj, i, syck_seq_read( n, i ) ); + } + break; + + case syck_map_kind: + obj = rb_hash_new(); + for ( i = 0; i < n->data.pairs->idx; i++ ) + { + VALUE k = syck_map_read( n, map_key, i ); + VALUE v = syck_map_read( n, map_value, i ); + int skip_aset = 0; + + /* + * Handle merge keys + */ + if ( rb_obj_is_kind_of( k, cMergeKey ) ) + { + if ( rb_obj_is_kind_of( v, rb_cHash ) ) + { + VALUE dup = rb_funcall( v, s_dup, 0 ); + rb_funcall( dup, s_update, 1, obj ); + obj = dup; + skip_aset = 1; + } + else if ( rb_obj_is_kind_of( v, rb_cArray ) ) + { + VALUE end = rb_ary_pop( v ); + if ( rb_obj_is_kind_of( end, rb_cHash ) ) + { + VALUE dup = rb_funcall( end, s_dup, 0 ); + v = rb_ary_reverse( v ); + rb_ary_push( v, obj ); + rb_block_call( v, s_each, 0, 0, syck_merge_i, dup ); + obj = dup; + skip_aset = 1; + } + } + } + else if ( rb_obj_is_kind_of( k, cDefaultKey ) ) + { + rb_funcall( obj, s_default_set, 1, v ); + skip_aset = 1; + } + + if ( ! skip_aset ) + { + rb_hash_aset( obj, k, v ); + } + } + break; + } + + if ( n->type_id != NULL ) + { + obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj ); + } + return obj; +} + +/* + * Set instance variables + */ +VALUE +syck_set_ivars(VALUE vars, VALUE obj) +{ + VALUE ivname = rb_ary_entry( vars, 0 ); + char *ivn; + StringValue( ivname ); + ivn = S_ALLOCA_N( char, RSTRING_LEN(ivname) + 2 ); + ivn[0] = '@'; + ivn[1] = '\0'; + strncat( ivn, RSTRING_PTR(ivname), RSTRING_LEN(ivname) ); + rb_iv_set( obj, ivn, rb_ary_entry( vars, 1 ) ); + return Qnil; +} + +/* + * YAML::Syck::Resolver#const_find + */ +VALUE +syck_const_find(VALUE const_name) +{ + VALUE tclass = rb_cObject; + VALUE tparts = rb_str_split( const_name, "::" ); + int i = 0; + for ( i = 0; i < RARRAY_LEN(tparts); i++ ) { + VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) ); + if ( !rb_const_defined( tclass, tpart ) ) return Qnil; + tclass = rb_const_get( tclass, tpart ); + } + return tclass; +} + +/* + * YAML::Syck::Resolver#transfer + */ +VALUE +syck_resolver_transfer(VALUE self, VALUE type, VALUE val) +{ + if (NIL_P(type) || RSTRING_LEN(StringValue(type)) == 0) + { + type = rb_funcall( self, s_detect_implicit, 1, val ); + } + + if ( ! (NIL_P(type) || RSTRING_LEN(StringValue(type)) == 0) ) + { + VALUE str_xprivate = rb_str_new2( "x-private" ); + VALUE colon = rb_str_new2( ":" ); + VALUE tags = rb_attr_get(self, s_tags); + VALUE target_class = rb_hash_aref( tags, type ); + VALUE subclass = target_class; + VALUE obj = Qnil; + + /* + * Should no tag match exactly, check for subclass format + */ + if ( NIL_P( target_class ) ) + { + VALUE subclass_parts = rb_ary_new(); + VALUE parts = rb_str_split( type, ":" ); + + while ( RARRAY_LEN(parts) > 1 ) + { + VALUE partial; + rb_ary_unshift( subclass_parts, rb_ary_pop( parts ) ); + partial = rb_ary_join( parts, colon ); + target_class = rb_hash_aref( tags, partial ); + if ( NIL_P( target_class ) ) + { + rb_str_append( partial, colon ); + target_class = rb_hash_aref( tags, partial ); + } + + /* + * Possible subclass found, see if it supports subclassing + */ + if ( ! NIL_P( target_class ) ) + { + subclass = target_class; + if ( RARRAY_LEN(subclass_parts) > 0 && rb_respond_to( target_class, s_tag_subclasses ) && + RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) ) + { + VALUE subclass_v; + subclass = rb_ary_join( subclass_parts, colon ); + subclass = rb_funcall( target_class, s_tag_read_class, 1, subclass ); + subclass_v = syck_const_find( subclass ); + + if ( subclass_v != Qnil ) + { + subclass = subclass_v; + } + else if ( rb_cObject == target_class && subclass_v == Qnil ) + { + target_class = cYObject; + type = subclass; + subclass = cYObject; + } + else /* workaround for SEGV. real fix please */ + { + rb_raise( rb_eTypeError, "invalid subclass" ); + } + } + break; + } + } + } + + /* rb_raise(rb_eTypeError, "invalid typing scheme: %s given", + * scheme); + */ + + if ( rb_respond_to( target_class, s_call ) ) + { + obj = rb_funcall( target_class, s_call, 2, type, val ); + } + else + { + if ( rb_respond_to( target_class, s_yaml_new ) ) + { + obj = rb_funcall( target_class, s_yaml_new, 3, subclass, type, val ); + } + else if ( !NIL_P( target_class ) ) + { + if ( subclass == rb_cBignum ) + { + obj = rb_str2inum( val, 10 ); /* for yaml dumped by 1.8.3 [ruby-core:6159] */ + } + else + { + obj = rb_obj_alloc( subclass ); + } + + if ( rb_respond_to( obj, s_yaml_initialize ) ) + { + rb_funcall( obj, s_yaml_initialize, 2, type, val ); + } + else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) ) + { + rb_block_call( val, s_each, 0, 0, syck_set_ivars, obj ); + } + } + else + { + VALUE parts = rb_str_split( type, ":" ); + VALUE scheme = rb_ary_shift( parts ); + if ( rb_str_cmp( scheme, str_xprivate ) == 0 ) + { + VALUE name = rb_ary_join( parts, colon ); + obj = rb_funcall( cPrivateType, s_new, 2, name, val ); + } + else + { + VALUE domain = rb_ary_shift( parts ); + VALUE name = rb_ary_join( parts, colon ); + obj = rb_funcall( cDomainType, s_new, 3, domain, name, val ); + } + } + } + val = obj; + } + + return val; +} + +/* + * YAML::Syck::Resolver#tagurize + */ +VALUE +syck_resolver_tagurize(VALUE self, VALUE val) +{ + VALUE tmp = rb_check_string_type(val); + + if ( !NIL_P(tmp) ) + { + char *taguri = syck_type_id_to_uri( RSTRING_PTR(tmp) ); + val = rb_str_new2( taguri ); + S_FREE( taguri ); + } + + return val; +} + +/* + * YAML::Syck::DefaultResolver#detect_implicit + */ +VALUE +syck_defaultresolver_detect_implicit(VALUE self, VALUE val) +{ + const char *type_id; + VALUE tmp = rb_check_string_type(val); + + if ( !NIL_P(tmp) ) + { + val = tmp; + type_id = syck_match_implicit( RSTRING_PTR(val), RSTRING_LEN(val) ); + return rb_str_new2( type_id ); + } + + return rb_str_new2( "" ); +} + +/* + * YAML::Syck::DefaultResolver#node_import + */ +VALUE +syck_defaultresolver_node_import(VALUE self, VALUE node) +{ + SyckNode *n; + VALUE obj; + Data_Get_Struct( node, SyckNode, n ); + if ( !yaml_org_handler( n, &obj ) ) + { + obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj ); + } + return obj; +} + +/* + * YAML::Syck::GenericResolver#node_import + */ +VALUE +syck_genericresolver_node_import(VALUE self, VALUE node) +{ + SyckNode *n; + int i = 0; + VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil; + Data_Get_Struct(node, SyckNode, n); + + if ( n->type_id != NULL ) + { + t = rb_str_new2(n->type_id); + } + + switch (n->kind) + { + case syck_str_kind: + { + v = rb_str_new( n->data.str->ptr, n->data.str->len ); + rb_enc_associate(v, rb_utf8_encoding()); + if ( n->data.str->style == scalar_1quote ) + { + style = sym_1quote; + } + else if ( n->data.str->style == scalar_2quote ) + { + style = sym_2quote; + } + else if ( n->data.str->style == scalar_fold ) + { + style = sym_fold; + } + else if ( n->data.str->style == scalar_literal ) + { + style = sym_literal; + } + else if ( n->data.str->style == scalar_plain ) + { + style = sym_plain; + } + obj = rb_funcall( cScalar, s_new, 3, t, v, style ); + } + break; + + case syck_seq_kind: + v = rb_ary_new2( syck_seq_count( n ) ); + for ( i = 0; i < syck_seq_count( n ); i++ ) + { + rb_ary_store( v, i, syck_seq_read( n, i ) ); + } + if ( n->data.list->style == seq_inline ) + { + style = sym_inline; + } + obj = rb_funcall( cSeq, s_new, 3, t, v, style ); + rb_iv_set(obj, "@kind", sym_seq); + break; + + case syck_map_kind: + v = rb_hash_new(); + for ( i = 0; i < syck_map_count( n ); i++ ) + { + rb_hash_aset( v, syck_map_read( n, map_key, i ), syck_map_read( n, map_value, i ) ); + } + if ( n->data.pairs->style == map_inline ) + { + style = sym_inline; + } + obj = rb_funcall( cMap, s_new, 3, t, v, style ); + rb_iv_set(obj, "@kind", sym_map); + break; + } + + return obj; +} + +/* + * YAML::Syck::BadAlias.initialize + */ +VALUE +syck_badalias_initialize(VALUE self, VALUE val) +{ + rb_iv_set( self, "@name", val ); + return self; +} + +/* + * YAML::Syck::BadAlias.<=> + */ +VALUE +syck_badalias_cmp(VALUE alias1, VALUE alias2) +{ + VALUE str1 = rb_ivar_get( alias1, s_name ); + VALUE str2 = rb_ivar_get( alias2, s_name ); + VALUE val = rb_funcall( str1, s_cmp, 1, str2 ); + return val; +} + +/* + * YAML::DomainType.initialize + */ +VALUE +syck_domaintype_initialize(VALUE self, VALUE domain, VALUE type_id, VALUE val) +{ + rb_iv_set( self, "@domain", domain ); + rb_iv_set( self, "@type_id", type_id ); + rb_iv_set( self, "@value", val ); + return self; +} + +/* + * YAML::Object.initialize + */ +VALUE +syck_yobject_initialize(VALUE self, VALUE klass, VALUE ivars) +{ + rb_iv_set( self, "@class", klass ); + rb_iv_set( self, "@ivars", ivars ); + return self; +} + +/* + * YAML::PrivateType.initialize + */ +VALUE +syck_privatetype_initialize(VALUE self, VALUE type_id, VALUE val) +{ + rb_iv_set( self, "@type_id", type_id ); + rb_iv_set( self, "@value", val ); + return self; +} + +/* + * Mark node contents. + */ +static void +syck_node_mark(SyckNode *n) +{ + int i; + rb_gc_mark_maybe( n->id ); + switch ( n->kind ) + { + case syck_seq_kind: + for ( i = 0; i < n->data.list->idx; i++ ) + { + rb_gc_mark( syck_seq_read( n, i ) ); + } + break; + + case syck_map_kind: + for ( i = 0; i < n->data.pairs->idx; i++ ) + { + rb_gc_mark( syck_map_read( n, map_key, i ) ); + rb_gc_mark( syck_map_read( n, map_value, i ) ); + } + break; + + case syck_str_kind: + default: + /* nothing */ + break; + } +#if 0 /* maybe needed */ + if ( n->shortcut ) syck_node_mark( n->shortcut ); /* caution: maybe cyclic */ +#endif +} + +/* + * YAML::Syck::Scalar.allocate + */ +VALUE +syck_scalar_alloc(VALUE class) +{ + SyckNode *node = syck_alloc_str(); + VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node ); + node->id = obj; + return obj; +} + +/* + * YAML::Syck::Scalar.initialize + */ +VALUE +syck_scalar_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style) +{ + rb_iv_set( self, "@kind", sym_scalar ); + rb_funcall( self, s_type_id_set, 1, type_id ); + rb_funcall( self, s_value_set, 1, val ); + rb_funcall( self, s_style_set, 1, style ); + return self; +} + +/* + * YAML::Syck::Scalar.style= + */ +VALUE +syck_scalar_style_set(VALUE self, VALUE style) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + if ( NIL_P( style ) ) + { + node->data.str->style = scalar_none; + } + else if ( style == sym_1quote ) + { + node->data.str->style = scalar_1quote; + } + else if ( style == sym_2quote ) + { + node->data.str->style = scalar_2quote; + } + else if ( style == sym_fold ) + { + node->data.str->style = scalar_fold; + } + else if ( style == sym_literal ) + { + node->data.str->style = scalar_literal; + } + else if ( style == sym_plain ) + { + node->data.str->style = scalar_plain; + } + + rb_iv_set( self, "@style", style ); + return self; +} + +/* + * YAML::Syck::Scalar.value= + */ +VALUE +syck_scalar_value_set(VALUE self, VALUE val) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + StringValue( val ); + node->data.str->ptr = syck_strndup( RSTRING_PTR(val), RSTRING_LEN(val) ); + node->data.str->len = RSTRING_LEN(val); + node->data.str->style = scalar_none; + + rb_iv_set( self, "@value", val ); + return val; +} + +/* + * YAML::Syck::Seq.allocate + */ +VALUE +syck_seq_alloc(VALUE class) +{ + SyckNode *node; + VALUE obj; + node = syck_alloc_seq(); + obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node ); + node->id = obj; + return obj; +} + +/* + * YAML::Syck::Seq.initialize + */ +VALUE +syck_seq_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + rb_iv_set( self, "@kind", sym_seq ); + rb_funcall( self, s_type_id_set, 1, type_id ); + rb_funcall( self, s_value_set, 1, val ); + rb_funcall( self, s_style_set, 1, style ); + return self; +} + +/* + * YAML::Syck::Seq.value= + */ +VALUE +syck_seq_value_set(VALUE self, VALUE val) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + val = rb_check_array_type( val ); + if ( !NIL_P( val ) ) { + int i; + syck_seq_empty( node ); + for ( i = 0; i < RARRAY_LEN( val ); i++ ) + { + syck_seq_add( node, rb_ary_entry(val, i) ); + } + } + + rb_iv_set( self, "@value", val ); + return val; +} + +/* + * YAML::Syck::Seq.add + */ +VALUE +syck_seq_add_m(VALUE self, VALUE val) +{ + SyckNode *node; + VALUE emitter = rb_ivar_get( self, s_emitter ); + Data_Get_Struct( self, SyckNode, node ); + + if ( rb_respond_to( emitter, s_node_export ) ) { + val = rb_funcall( emitter, s_node_export, 1, val ); + } + syck_seq_add( node, val ); + rb_ary_push( rb_ivar_get( self, s_value ), val ); + + return self; +} + +/* + * YAML::Syck::Seq.style= + */ +VALUE +syck_seq_style_set(VALUE self, VALUE style) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + if ( style == sym_inline ) + { + node->data.list->style = seq_inline; + } + else + { + node->data.list->style = seq_none; + } + + rb_iv_set( self, "@style", style ); + return self; +} + +/* + * YAML::Syck::Map.allocate + */ +VALUE +syck_map_alloc(VALUE class) +{ + SyckNode *node; + VALUE obj; + node = syck_alloc_map(); + obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node ); + node->id = obj; + return obj; +} + +/* + * YAML::Syck::Map.initialize + */ +VALUE +syck_map_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + if ( !NIL_P( val ) ) + { + VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash"); + VALUE keys; + int i; + if ( NIL_P(hsh) ) + { + rb_raise( rb_eTypeError, "wrong argument type" ); + } + + keys = rb_funcall( hsh, s_keys, 0 ); + for ( i = 0; i < RARRAY_LEN(keys); i++ ) + { + VALUE key = rb_ary_entry(keys, i); + syck_map_add( node, key, rb_hash_aref(hsh, key) ); + } + } + + rb_iv_set( self, "@kind", sym_seq ); + rb_funcall( self, s_type_id_set, 1, type_id ); + rb_funcall( self, s_value_set, 1, val ); + rb_funcall( self, s_style_set, 1, style ); + return self; +} + +/* + * YAML::Syck::Map.value= + */ +VALUE +syck_map_value_set(VALUE self, VALUE val) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + if ( !NIL_P( val ) ) + { + VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash"); + VALUE keys; + int i; + if ( NIL_P(hsh) ) + { + rb_raise( rb_eTypeError, "wrong argument type" ); + } + + syck_map_empty( node ); + keys = rb_funcall( hsh, s_keys, 0 ); + for ( i = 0; i < RARRAY_LEN(keys); i++ ) + { + VALUE key = rb_ary_entry(keys, i); + syck_map_add( node, key, rb_hash_aref(hsh, key) ); + } + } + + rb_iv_set( self, "@value", val ); + return val; +} + +/* + * YAML::Syck::Map.add + */ +VALUE +syck_map_add_m(VALUE self, VALUE key, VALUE val) +{ + SyckNode *node; + VALUE emitter = rb_ivar_get( self, s_emitter ); + Data_Get_Struct( self, SyckNode, node ); + + if ( rb_respond_to( emitter, s_node_export ) ) { + key = rb_funcall( emitter, s_node_export, 1, key ); + val = rb_funcall( emitter, s_node_export, 1, val ); + } + syck_map_add( node, key, val ); + rb_hash_aset( rb_ivar_get( self, s_value ), key, val ); + + return self; +} + +/* + * YAML::Syck::Map.style= + */ +VALUE +syck_map_style_set(VALUE self, VALUE style) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + if ( style == sym_inline ) + { + node->data.pairs->style = map_inline; + } + else + { + node->data.pairs->style = map_none; + } + + rb_iv_set( self, "@style", style ); + return self; +} + +/* + * Cloning method for all node types + */ +VALUE +syck_node_init_copy(VALUE copy, VALUE orig) +{ + SyckNode *copy_n; + SyckNode *orig_n; + + if ( copy == orig ) + return copy; + + if ( TYPE( orig ) != T_DATA ) + { + rb_raise( rb_eTypeError, "wrong argument type" ); + } + + Data_Get_Struct( orig, SyckNode, orig_n ); + Data_Get_Struct( copy, SyckNode, copy_n ); + MEMCPY( copy_n, orig_n, SyckNode, 1 ); + return copy; +} + +/* + * YAML::Syck::Node#type_id= + */ +VALUE +syck_node_type_id_set(VALUE self, VALUE type_id) +{ + SyckNode *node; + Data_Get_Struct( self, SyckNode, node ); + + S_FREE( node->type_id ); + + if ( !NIL_P( type_id ) ) { + StringValue( type_id ); + node->type_id = syck_strndup( RSTRING_PTR(type_id), RSTRING_LEN(type_id) ); + } + + rb_iv_set( self, "@type_id", type_id ); + return type_id; +} + +/* + * YAML::Syck::Node.transform + */ +VALUE +syck_node_transform(VALUE self) +{ + VALUE t; + SyckNode *n = NULL; + SyckNode *orig_n; + Data_Get_Struct(self, SyckNode, orig_n); + t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 ); + + switch (orig_n->kind) + { + case syck_map_kind: + { + int i; + DATA_PTR(t) = n = syck_alloc_map(); + for ( i = 0; i < orig_n->data.pairs->idx; i++ ) + { + syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ), + rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) ); + } + } + break; + + case syck_seq_kind: + { + int i; + DATA_PTR(t) = n = syck_alloc_seq(); + for ( i = 0; i < orig_n->data.list->idx; i++ ) + { + syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) ); + } + } + break; + + case syck_str_kind: + DATA_PTR(t) = n = syck_new_str2( orig_n->data.str->ptr, orig_n->data.str->len, orig_n->data.str->style ); + break; + } + + if ( orig_n->type_id != NULL ) + { + n->type_id = syck_strndup( orig_n->type_id, strlen( orig_n->type_id ) ); + } + if ( orig_n->anchor != NULL ) + { + n->anchor = syck_strndup( orig_n->anchor, strlen( orig_n->anchor ) ); + } + n->id = t; + return rb_funcall( oDefaultResolver, s_node_import, 1, t ); +} + +/* + * Emitter callback: assembles YAML document events from + * Ruby symbols. This is a brilliant way to do it. + * No one could possibly object. + */ +void +rb_syck_emitter_handler(SyckEmitter *e, st_data_t data) +{ + SyckNode *n; + Data_Get_Struct((VALUE)data, SyckNode, n); + + switch (n->kind) + { + case syck_map_kind: + { + int i; + syck_emit_map( e, n->type_id, n->data.pairs->style ); + for ( i = 0; i < n->data.pairs->idx; i++ ) + { + syck_emit_item( e, syck_map_read( n, map_key, i ) ); + syck_emit_item( e, syck_map_read( n, map_value, i ) ); + } + syck_emit_end( e ); + } + break; + + case syck_seq_kind: + { + int i; + syck_emit_seq( e, n->type_id, n->data.list->style ); + for ( i = 0; i < n->data.list->idx; i++ ) + { + syck_emit_item( e, syck_seq_read( n, i ) ); + } + syck_emit_end( e ); + } + break; + + case syck_str_kind: + { + syck_emit_scalar( e, n->type_id, n->data.str->style, 0, 0, 0, n->data.str->ptr, n->data.str->len ); + } + break; + } +} + +/* + * Handle output from the emitter + */ +void +rb_syck_output_handler(SyckEmitter * emitter, char *str, long len) +{ + struct emitter_xtra *bonus = (struct emitter_xtra *)emitter->bonus; + VALUE dest = bonus->port; + if (TYPE(dest) == T_STRING) { + rb_str_cat( dest, str, len ); + } else { + rb_io_write( dest, rb_str_new( str, len ) ); + } +} + +/* + * Helper function for marking nodes in the anchor + * symbol table. + */ +void +syck_out_mark(VALUE emitter, VALUE node) +{ + SyckEmitter *emitterPtr; + struct emitter_xtra *bonus; + Data_Get_Struct(emitter, SyckEmitter, emitterPtr); + bonus = (struct emitter_xtra *)emitterPtr->bonus; + rb_ivar_set( node, s_emitter, emitter ); + /* syck_emitter_mark_node( emitterPtr, (st_data_t)node ); */ + if ( !NIL_P( bonus->oid ) ) { + rb_hash_aset( bonus->data, bonus->oid, node ); + } +} + +/* + * Mark emitter values. + */ +static void +syck_mark_emitter(SyckEmitter *emitter) +{ + struct emitter_xtra *bonus = (struct emitter_xtra *)emitter->bonus; + rb_gc_mark( bonus->oid ); + rb_gc_mark( bonus->data ); + rb_gc_mark( bonus->port ); +} + +/* + * Free the emitter and any bonus attachment. + */ +void +rb_syck_free_emitter(SyckEmitter *e) +{ + S_FREE( e->bonus ); + syck_free_emitter(e); +} + +/* + * YAML::Syck::Emitter.allocate + */ +VALUE syck_emitter_s_alloc _((VALUE)); +VALUE +syck_emitter_s_alloc(VALUE class) +{ + VALUE pobj; + SyckEmitter *emitter = syck_new_emitter(); + + emitter->bonus = S_ALLOC( struct emitter_xtra ); + S_MEMZERO( emitter->bonus, struct emitter_xtra, 1 ); + + pobj = Data_Wrap_Struct( class, syck_mark_emitter, rb_syck_free_emitter, emitter ); + syck_emitter_handler( emitter, rb_syck_emitter_handler ); + syck_output_handler( emitter, rb_syck_output_handler ); + + rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) ); + return pobj; +} + +/* + * YAML::Syck::Emitter.reset( options ) + */ +VALUE +syck_emitter_reset(int argc, VALUE *argv, VALUE self) +{ + VALUE options, tmp; + SyckEmitter *emitter; + struct emitter_xtra *bonus; + + Data_Get_Struct(self, SyckEmitter, emitter); + bonus = (struct emitter_xtra *)emitter->bonus; + + bonus->oid = Qnil; + bonus->port = rb_str_new2( "" ); + bonus->data = rb_hash_new(); + + if (rb_scan_args(argc, argv, "01", &options) == 0) + { + options = rb_hash_new(); + rb_ivar_set(self, s_options, options); + } + else if ( !NIL_P(tmp = rb_check_string_type(options)) ) + { + bonus->port = tmp; + } + else if ( rb_respond_to( options, s_write ) ) + { + bonus->port = options; + } + else + { + Check_Type(options, T_HASH); + rb_ivar_set(self, s_options, options); + } + + emitter->headless = 0; + rb_ivar_set(self, s_level, INT2FIX(0)); + rb_ivar_set(self, s_resolver, Qnil); + return self; +} + +/* + * YAML::Syck::Emitter.emit( object_id ) { |out| ... } + */ +VALUE +syck_emitter_emit(int argc, VALUE *argv, VALUE self) +{ + VALUE oid, proc; + SyckEmitter *emitter; + struct emitter_xtra *bonus; + SYMID symple; + int level = FIX2INT(rb_ivar_get(self, s_level)) + 1; + rb_ivar_set(self, s_level, INT2FIX(level)); + + rb_scan_args(argc, argv, "1&", &oid, &proc); + Data_Get_Struct(self, SyckEmitter, emitter); + bonus = (struct emitter_xtra *)emitter->bonus; + + /* Calculate anchors, normalize nodes, build a simpler symbol table */ + bonus->oid = oid; + if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) { + symple = rb_hash_aref( bonus->data, oid ); + } else { + symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) ); + } + syck_emitter_mark_node( emitter, (st_data_t)symple ); + + /* Second pass, build emitted string */ + level -= 1; + rb_ivar_set(self, s_level, INT2FIX(level)); + if ( level == 0 ) + { + syck_emit(emitter, (st_data_t)symple); + syck_emitter_flush(emitter, 0); + + return bonus->port; + } + + return symple; +} + +/* + * YAML::Syck::Emitter#node_export + */ +VALUE +syck_emitter_node_export(VALUE self, VALUE node) +{ + return rb_funcall( node, s_to_yaml, 1, self ); +} + +/* + * YAML::Syck::Emitter#set_resolver + */ +VALUE +syck_emitter_set_resolver(VALUE self, VALUE resolver) +{ + rb_ivar_set( self, s_resolver, resolver ); + return self; +} + +/* + * YAML::Syck::Out::initialize + */ +VALUE +syck_out_initialize(VALUE self, VALUE emitter) +{ + rb_ivar_set( self, s_emitter, emitter ); + return self; +} + +/* + * YAML::Syck::Out::map + */ +VALUE +syck_out_map(int argc, VALUE *argv, VALUE self) +{ + VALUE type_id, style, map; + if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) { + style = Qnil; + } + map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style ); + syck_out_mark( rb_ivar_get( self, s_emitter ), map ); + rb_yield( map ); + return map; +} + +/* + * YAML::Syck::Out::seq + */ +VALUE +syck_out_seq(int argc, VALUE *argv, VALUE self) +{ + VALUE type_id, style, seq; + if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) { + style = Qnil; + } + seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style ); + syck_out_mark( rb_ivar_get( self, s_emitter ), seq ); + rb_yield( seq ); + return seq; +} + +/* + * YAML::Syck::Out::scalar +syck_out_scalar( self, type_id, str, style ) + VALUE self, type_id, str, style; + */ +VALUE +syck_out_scalar(int argc, VALUE *argv, VALUE self) +{ + VALUE type_id, str, style, scalar; + rb_scan_args(argc, argv, "21", &type_id, &str, &style); + scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style ); + syck_out_mark( rb_ivar_get( self, s_emitter ), scalar ); + return scalar; +} + +/* + * Initialize Syck extension + */ +void +Init_syck() +{ + VALUE rb_yaml = rb_define_module( "YAML" ); + VALUE rb_syck = rb_define_module_under( rb_yaml, "Syck" ); + rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) ); + rb_define_module_function( rb_syck, "compile", rb_syck_compile, 1 ); + + /* + * Global symbols + */ + s_new = rb_intern("new"); + s_utc = rb_intern("utc"); + s_at = rb_intern("at"); + s_to_f = rb_intern("to_f"); + s_to_i = rb_intern("to_i"); + s_read = rb_intern("read"); + s_binmode = rb_intern("binmode"); + s_transfer = rb_intern("transfer"); + s_call = rb_intern("call"); + s_cmp = rb_intern("<=>"); + s_intern = rb_intern("intern"); + s_update = rb_intern("update"); + s_detect_implicit = rb_intern("detect_implicit"); + s_dup = rb_intern("dup"); + s_default_set = rb_intern("default="); + s_match = rb_intern("match"); + s_push = rb_intern("push"); + s_haskey = rb_intern("has_key?"); + s_keys = rb_intern("keys"); + s_node_import = rb_intern("node_import"); + s_tr_bang = rb_intern("tr!"); + s_unpack = rb_intern("unpack"); + s_write = rb_intern("write"); + s_tag_read_class = rb_intern( "yaml_tag_read_class" ); + s_tag_subclasses = rb_intern( "yaml_tag_subclasses?" ); + s_emitter = rb_intern( "emitter" ); + s_set_resolver = rb_intern( "set_resolver" ); + s_node_export = rb_intern( "node_export" ); + s_to_yaml = rb_intern( "to_yaml" ); + s_transform = rb_intern( "transform" ); + s_yaml_new = rb_intern("yaml_new"); + s_yaml_initialize = rb_intern("yaml_initialize"); + s_each = rb_intern("each"); + s_parse = rb_intern("parse"); + + s_tags = rb_intern("@tags"); + s_name = rb_intern("@name"); + s_options = rb_intern("@options"); + s_kind = rb_intern("@kind"); + s_type_id = rb_intern("@type_id"); + s_type_id_set = rb_intern("type_id="); + s_resolver = rb_intern("@resolver"); + s_level = rb_intern( "@level" ); + s_style = rb_intern("@style"); + s_style_set = rb_intern("style="); + s_value = rb_intern("@value"); + s_value_set = rb_intern("value="); + s_out = rb_intern("@out"); + s_input = rb_intern("@input"); + + sym_model = ID2SYM(rb_intern("Model")); + sym_generic = ID2SYM(rb_intern("Generic")); + sym_bytecode = ID2SYM(rb_intern("bytecode")); + sym_map = ID2SYM(rb_intern("map")); + sym_scalar = ID2SYM(rb_intern("scalar")); + sym_seq = ID2SYM(rb_intern("seq")); + sym_1quote = ID2SYM(rb_intern("quote1")); + sym_2quote = ID2SYM(rb_intern("quote2")); + sym_fold = ID2SYM(rb_intern("fold")); + sym_literal = ID2SYM(rb_intern("literal")); + sym_plain = ID2SYM(rb_intern("plain")); + sym_inline = ID2SYM(rb_intern("inline")); + + /* + * Define YAML::Syck::Resolver class + */ + cResolver = rb_define_class_under( rb_syck, "Resolver", rb_cObject ); + rb_define_attr( cResolver, "tags", 1, 1 ); + rb_define_method( cResolver, "initialize", syck_resolver_initialize, 0 ); + rb_define_method( cResolver, "add_type", syck_resolver_add_type, 2 ); + rb_define_method( cResolver, "use_types_at", syck_resolver_use_types_at, 1 ); + rb_define_method( cResolver, "detect_implicit", syck_resolver_detect_implicit, 1 ); + rb_define_method( cResolver, "transfer", syck_resolver_transfer, 2 ); + rb_define_method( cResolver, "node_import", syck_resolver_node_import, 1 ); + rb_define_method( cResolver, "tagurize", syck_resolver_tagurize, 1 ); + + rb_global_variable( &oDefaultResolver ); + oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 ); + rb_define_singleton_method( oDefaultResolver, "node_import", syck_defaultresolver_node_import, 1 ); + rb_define_singleton_method( oDefaultResolver, "detect_implicit", syck_defaultresolver_detect_implicit, 1 ); + rb_define_const( rb_syck, "DefaultResolver", oDefaultResolver ); + rb_global_variable( &oGenericResolver ); + oGenericResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 ); + rb_define_singleton_method( oGenericResolver, "node_import", syck_genericresolver_node_import, 1 ); + rb_define_const( rb_syck, "GenericResolver", oGenericResolver ); + + /* + * Define YAML::Syck::Parser class + */ + cParser = rb_define_class_under( rb_syck, "Parser", rb_cObject ); + rb_define_attr( cParser, "options", 1, 1 ); + rb_define_attr( cParser, "resolver", 1, 1 ); + rb_define_attr( cParser, "input", 1, 1 ); + rb_define_alloc_func( cParser, syck_parser_s_alloc ); + rb_define_method(cParser, "initialize", syck_parser_initialize, -1 ); + rb_define_method(cParser, "bufsize=", syck_parser_bufsize_set, 1 ); + rb_define_method(cParser, "bufsize", syck_parser_bufsize_get, 0 ); + rb_define_method(cParser, "load", syck_parser_load, -1); + rb_define_method(cParser, "load_documents", syck_parser_load_documents, -1); + rb_define_method(cParser, "set_resolver", syck_parser_set_resolver, 1); + + /* + * Define YAML::Syck::Node class + */ + cNode = rb_define_class_under( rb_syck, "Node", rb_cObject ); + rb_define_method( cNode, "initialize_copy", syck_node_init_copy, 1 ); + rb_define_attr( cNode, "emitter", 1, 1 ); + rb_define_attr( cNode, "resolver", 1, 1 ); + rb_define_attr( cNode, "kind", 1, 0 ); + rb_define_attr( cNode, "type_id", 1, 0 ); + rb_define_attr( cNode, "value", 1, 0 ); + rb_define_method( cNode, "type_id=", syck_node_type_id_set, 1 ); + rb_define_method( cNode, "transform", syck_node_transform, 0); + + /* + * Define YAML::Syck::Scalar, YAML::Syck::Seq, YAML::Syck::Map -- + * all are the publicly usable variants of YAML::Syck::Node + */ + cScalar = rb_define_class_under( rb_syck, "Scalar", cNode ); + rb_define_alloc_func( cScalar, syck_scalar_alloc ); + rb_define_method( cScalar, "initialize", syck_scalar_initialize, 3 ); + rb_define_method( cScalar, "value=", syck_scalar_value_set, 1 ); + rb_define_method( cScalar, "style=", syck_scalar_style_set, 1 ); + cSeq = rb_define_class_under( rb_syck, "Seq", cNode ); + rb_define_alloc_func( cSeq, syck_seq_alloc ); + rb_define_method( cSeq, "initialize", syck_seq_initialize, 3 ); + rb_define_method( cSeq, "value=", syck_seq_value_set, 1 ); + rb_define_method( cSeq, "add", syck_seq_add_m, 1 ); + rb_define_method( cSeq, "style=", syck_seq_style_set, 1 ); + cMap = rb_define_class_under( rb_syck, "Map", cNode ); + rb_define_alloc_func( cMap, syck_map_alloc ); + rb_define_method( cMap, "initialize", syck_map_initialize, 3 ); + rb_define_method( cMap, "value=", syck_map_value_set, 1 ); + rb_define_method( cMap, "add", syck_map_add_m, 2 ); + rb_define_method( cMap, "style=", syck_map_style_set, 1 ); + + /* + * Define YAML::PrivateType class + */ + cPrivateType = rb_define_class_under( rb_yaml, "PrivateType", rb_cObject ); + rb_define_attr( cPrivateType, "type_id", 1, 1 ); + rb_define_attr( cPrivateType, "value", 1, 1 ); + rb_define_method( cPrivateType, "initialize", syck_privatetype_initialize, 2); + + /* + * Define YAML::DomainType class + */ + cDomainType = rb_define_class_under( rb_yaml, "DomainType", rb_cObject ); + rb_define_attr( cDomainType, "domain", 1, 1 ); + rb_define_attr( cDomainType, "type_id", 1, 1 ); + rb_define_attr( cDomainType, "value", 1, 1 ); + rb_define_method( cDomainType, "initialize", syck_domaintype_initialize, 3); + + /* + * Define YAML::Object class + */ + cYObject = rb_define_class_under( rb_yaml, "Object", rb_cObject ); + rb_define_attr( cYObject, "class", 1, 1 ); + rb_define_attr( cYObject, "ivars", 1, 1 ); + rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2); + rb_define_method( cYObject, "yaml_initialize", syck_yobject_initialize, 2); + + /* + * Define YAML::Syck::BadAlias class + */ + cBadAlias = rb_define_class_under( rb_syck, "BadAlias", rb_cObject ); + rb_define_attr( cBadAlias, "name", 1, 1 ); + rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1); + rb_define_method( cBadAlias, "<=>", syck_badalias_cmp, 1); + rb_include_module( cBadAlias, rb_const_get( rb_cObject, rb_intern("Comparable") ) ); + + /* + * Define YAML::Syck::MergeKey class + */ + cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject ); + + /* + * Define YAML::Syck::DefaultKey class + */ + cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject ); + + /* + * Define YAML::Syck::Out classes + */ + cOut = rb_define_class_under( rb_syck, "Out", rb_cObject ); + rb_define_attr( cOut, "emitter", 1, 1 ); + rb_define_method( cOut, "initialize", syck_out_initialize, 1 ); + rb_define_method( cOut, "map", syck_out_map, -1 ); + rb_define_method( cOut, "seq", syck_out_seq, -1 ); + rb_define_method( cOut, "scalar", syck_out_scalar, -1 ); + + /* + * Define YAML::Syck::Emitter class + */ + cEmitter = rb_define_class_under( rb_syck, "Emitter", rb_cObject ); + rb_define_attr( cEmitter, "level", 1, 1 ); + rb_define_alloc_func( cEmitter, syck_emitter_s_alloc ); + rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 ); + rb_define_method( cEmitter, "reset", syck_emitter_reset, -1 ); + rb_define_method( cEmitter, "emit", syck_emitter_emit, -1 ); + rb_define_method( cEmitter, "set_resolver", syck_emitter_set_resolver, 1); + rb_define_method( cEmitter, "node_export", syck_emitter_node_export, 1); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/syck.c b/lib/ruby-1.9.1-rc1/ext/syck/syck.c new file mode 100644 index 0000000..7ca44ca --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/syck.c @@ -0,0 +1,524 @@ +/* + * syck.c + * + * $Author: mame $ + * + * Copyright (C) 2003 why the lucky stiff + */ +#include "ruby/ruby.h" + +#include +#include + +#include "syck.h" + +void syck_parser_pop_level( SyckParser * ); + +/* + * Custom assert + */ +void +syck_assert( const char *file_name, unsigned line_num, const char *expr ) +{ + fflush( NULL ); + fprintf( stderr, "\nAssertion failed: %s, line %u: %s\n", + file_name, line_num, expr ); + fflush( stderr ); + abort(); +} + +/* + * Allocates and copies a string + */ +char * +syck_strndup( const char *buf, long len ) +{ + char *new = S_ALLOC_N( char, len + 1 ); + S_MEMZERO( new, char, len + 1 ); + S_MEMCPY( new, buf, char, len ); + return new; +} + +/* + * Default FILE IO function + */ +long +syck_io_file_read( char *buf, SyckIoFile *file, long max_size, long skip ) +{ + long len = 0; + + ASSERT( file != NULL ); + + max_size -= skip; + len = fread( buf + skip, sizeof( char ), max_size, file->ptr ); + len += skip; + buf[len] = '\0'; + + return len; +} + +/* + * Default string IO function + */ +long +syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip ) +{ + char *beg; + long len = 0; + + ASSERT( str != NULL ); + beg = str->ptr; + if ( max_size >= 0 ) + { + max_size -= skip; + if ( max_size <= 0 ) max_size = 0; + else str->ptr += max_size; + + if ( str->ptr > str->end ) + { + str->ptr = str->end; + } + } + else + { + /* Use exact string length */ + while ( str->ptr < str->end ) { + if (*(str->ptr++) == '\n') break; + } + } + if ( beg < str->ptr ) + { + len = ( str->ptr - beg ); + S_MEMCPY( buf + skip, beg, char, len ); + } + len += skip; + buf[len] = '\0'; + + return len; +} + +void +syck_parser_reset_levels( SyckParser *p ) +{ + while ( p->lvl_idx > 1 ) + { + syck_parser_pop_level( p ); + } + + if ( p->lvl_idx < 1 ) + { + p->lvl_idx = 1; + p->levels[0].spaces = -1; + p->levels[0].ncount = 0; + p->levels[0].domain = syck_strndup( "", 0 ); + } + p->levels[0].status = syck_lvl_header; +} + +void +syck_parser_reset_cursor( SyckParser *p ) +{ + if ( p->buffer == NULL ) + { + p->buffer = S_ALLOC_N( char, p->bufsize ); + S_MEMZERO( p->buffer, char, p->bufsize ); + } + p->buffer[0] = '\0'; + + p->cursor = NULL; + p->lineptr = NULL; + p->linectptr = NULL; + p->token = NULL; + p->toktmp = NULL; + p->marker = NULL; + p->limit = NULL; + + p->root = 0; + p->root_on_error = 0; + p->linect = 0; + p->eof = 0; + p->last_token = 0; + p->force_token = 0; +} + +/* + * Value to return on a parse error + */ +void +syck_parser_set_root_on_error( SyckParser *p, SYMID roer ) +{ + p->root_on_error = roer; +} + +/* + * Allocate the parser + */ +SyckParser * +syck_new_parser(void) +{ + SyckParser *p; + p = S_ALLOC( SyckParser ); + S_MEMZERO( p, SyckParser, 1 ); + p->lvl_capa = ALLOC_CT; + p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa ); + p->input_type = syck_yaml_utf8; + p->io_type = syck_io_str; + p->io.str = NULL; + p->syms = NULL; + p->anchors = NULL; + p->bad_anchors = NULL; + p->implicit_typing = 1; + p->taguri_expansion = 0; + p->bufsize = SYCK_BUFFERSIZE; + p->buffer = NULL; + p->lvl_idx = 0; + syck_parser_reset_levels( p ); + return p; +} + +int +syck_add_sym( SyckParser *p, void *data ) +{ + SYMID id = 0; + if ( p->syms == NULL ) + { + p->syms = st_init_numtable(); + } + id = p->syms->num_entries + 1; + st_insert( p->syms, id, (st_data_t)data ); + return id; +} + +int +syck_lookup_sym( SyckParser *p, SYMID id, void **datap ) +{ + st_data_t data; + int ret; + if ( p->syms == NULL ) return 0; + ret = st_lookup( p->syms, id, &data ); + if(ret) *datap = (void *)data; + return ret; +} + +int +syck_st_free_nodes( char *key, SyckNode *n, char *arg ) +{ + if ( n != (void *)1 ) syck_free_node( n ); + n = NULL; + return ST_CONTINUE; +} + +void +syck_st_free( SyckParser *p ) +{ + /* + * Free the anchor tables + */ + if ( p->anchors != NULL ) + { + st_foreach( p->anchors, syck_st_free_nodes, 0 ); + st_free_table( p->anchors ); + p->anchors = NULL; + } + + if ( p->bad_anchors != NULL ) + { + st_foreach( p->bad_anchors, syck_st_free_nodes, 0 ); + st_free_table( p->bad_anchors ); + p->bad_anchors = NULL; + } +} + +typedef struct { + long hash; + char *buffer; + long length; + long remaining; + int printed; +} bytestring_t; + +int +syck_st_free_syms( void *key, bytestring_t *sav, void *dummy ) +{ + S_FREE(sav->buffer); + S_FREE(sav); + return ST_CONTINUE; +} + +void +syck_free_parser( SyckParser *p ) +{ + /* + * Free the adhoc symbol table + */ + if ( p->syms != NULL ) + { + st_foreach( p->syms, syck_st_free_syms, 0 ); + st_free_table( p->syms ); + p->syms = NULL; + } + + /* + * Free tables, levels + */ + syck_st_free( p ); + syck_parser_reset_levels( p ); + S_FREE( p->levels[0].domain ); + S_FREE( p->levels ); + + if ( p->buffer != NULL ) + { + S_FREE( p->buffer ); + } + free_any_io( p ); + S_FREE( p ); +} + +void +syck_parser_handler( SyckParser *p, SyckNodeHandler hdlr ) +{ + ASSERT( p != NULL ); + p->handler = hdlr; +} + +void +syck_parser_implicit_typing( SyckParser *p, int flag ) +{ + p->implicit_typing = ( flag == 0 ? 0 : 1 ); +} + +void +syck_parser_taguri_expansion( SyckParser *p, int flag ) +{ + p->taguri_expansion = ( flag == 0 ? 0 : 1 ); +} + +void +syck_parser_error_handler( SyckParser *p, SyckErrorHandler hdlr ) +{ + ASSERT( p != NULL ); + p->error_handler = hdlr; +} + +void +syck_parser_bad_anchor_handler( SyckParser *p, SyckBadAnchorHandler hdlr ) +{ + ASSERT( p != NULL ); + p->bad_anchor_handler = hdlr; +} + +void +syck_parser_set_input_type( SyckParser *p, enum syck_parser_input input_type ) +{ + ASSERT( p != NULL ); + p->input_type = input_type; +} + +void +syck_parser_file( SyckParser *p, FILE *fp, SyckIoFileRead read ) +{ + ASSERT( p != NULL ); + free_any_io( p ); + syck_parser_reset_cursor( p ); + p->io_type = syck_io_file; + p->io.file = S_ALLOC( SyckIoFile ); + p->io.file->ptr = fp; + if ( read != NULL ) + { + p->io.file->read = read; + } + else + { + p->io.file->read = syck_io_file_read; + } +} + +void +syck_parser_str( SyckParser *p, char *ptr, long len, SyckIoStrRead read ) +{ + ASSERT( p != NULL ); + free_any_io( p ); + syck_parser_reset_cursor( p ); + p->io_type = syck_io_str; + p->io.str = S_ALLOC( SyckIoStr ); + p->io.str->beg = ptr; + p->io.str->ptr = ptr; + p->io.str->end = ptr + len; + if ( read != NULL ) + { + p->io.str->read = read; + } + else + { + p->io.str->read = syck_io_str_read; + } +} + +void +syck_parser_str_auto( SyckParser *p, char *ptr, SyckIoStrRead read ) +{ + syck_parser_str( p, ptr, strlen( ptr ), read ); +} + +SyckLevel * +syck_parser_current_level( SyckParser *p ) +{ + return &p->levels[p->lvl_idx-1]; +} + +void +syck_parser_pop_level( SyckParser *p ) +{ + ASSERT( p != NULL ); + + /* The root level should never be popped */ + if ( p->lvl_idx <= 1 ) return; + + p->lvl_idx -= 1; + free( p->levels[p->lvl_idx].domain ); +} + +void +syck_parser_add_level( SyckParser *p, int len, enum syck_level_status status ) +{ + ASSERT( p != NULL ); + if ( p->lvl_idx + 1 > p->lvl_capa ) + { + p->lvl_capa += ALLOC_CT; + S_REALLOC_N( p->levels, SyckLevel, p->lvl_capa ); + } + + ASSERT( len > p->levels[p->lvl_idx-1].spaces ); + p->levels[p->lvl_idx].spaces = len; + p->levels[p->lvl_idx].ncount = 0; + p->levels[p->lvl_idx].domain = syck_strndup( p->levels[p->lvl_idx-1].domain, strlen( p->levels[p->lvl_idx-1].domain ) ); + p->levels[p->lvl_idx].status = status; + p->lvl_idx += 1; +} + +void +free_any_io( SyckParser *p ) +{ + ASSERT( p != NULL ); + switch ( p->io_type ) + { + case syck_io_str: + if ( p->io.str != NULL ) + { + S_FREE( p->io.str ); + p->io.str = NULL; + } + break; + + case syck_io_file: + if ( p->io.file != NULL ) + { + S_FREE( p->io.file ); + p->io.file = NULL; + } + break; + } +} + +long +syck_move_tokens( SyckParser *p ) +{ + long count, skip; + ASSERT( p->buffer != NULL ); + + if ( p->token == NULL ) + return 0; + + skip = p->limit - p->token; + if ( ( count = p->token - p->buffer ) ) + { + if (skip > 0) + S_MEMMOVE( p->buffer, p->token, char, skip ); + p->token = p->buffer; + p->marker -= count; + p->cursor -= count; + p->toktmp -= count; + p->limit -= count; + p->lineptr -= count; + p->linectptr -= count; + } + return skip; +} + +void +syck_check_limit( SyckParser *p, long len ) +{ + if ( p->cursor == NULL ) + { + p->cursor = p->buffer; + p->lineptr = p->buffer; + p->linectptr = p->buffer; + p->marker = p->buffer; + } + p->limit = p->buffer + len; +} + +long +syck_parser_read( SyckParser *p ) +{ + long len = 0; + long skip = 0; + ASSERT( p != NULL ); + switch ( p->io_type ) + { + case syck_io_str: + skip = syck_move_tokens( p ); + len = (p->io.str->read)( p->buffer, p->io.str, SYCK_BUFFERSIZE - 1, skip ); + break; + + case syck_io_file: + skip = syck_move_tokens( p ); + len = (p->io.file->read)( p->buffer, p->io.file, SYCK_BUFFERSIZE - 1, skip ); + break; + } + syck_check_limit( p, len ); + return len; +} + +long +syck_parser_readlen( SyckParser *p, long max_size ) +{ + long len = 0; + long skip = 0; + ASSERT( p != NULL ); + switch ( p->io_type ) + { + case syck_io_str: + skip = syck_move_tokens( p ); + len = (p->io.str->read)( p->buffer, p->io.str, max_size, skip ); + break; + + case syck_io_file: + skip = syck_move_tokens( p ); + len = (p->io.file->read)( p->buffer, p->io.file, max_size, skip ); + break; + } + syck_check_limit( p, len ); + return len; +} + +SYMID +syck_parse( SyckParser *p ) +{ + ASSERT( p != NULL ); + + syck_st_free( p ); + syck_parser_reset_levels( p ); + syckparse( p ); + return p->root; +} + +void +syck_default_error_handler( SyckParser *p, const char *msg ) +{ + printf( "Error at [Line %d, Col %"PRIdPTRDIFF"]: %s\n", + p->linect, + p->cursor - p->lineptr, + msg ); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/syck.h b/lib/ruby-1.9.1-rc1/ext/syck/syck.h new file mode 100644 index 0000000..5c33e3d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/syck.h @@ -0,0 +1,454 @@ +/* + * syck.h + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + */ + +#ifndef SYCK_H +#define SYCK_H + +#define SYCK_YAML_MAJOR 1 +#define SYCK_YAML_MINOR 0 + +#define SYCK_VERSION "0.60" +#define YAML_DOMAIN "yaml.org,2002" + +#include +#include +#include +#include "ruby/st.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/* + * Memory Allocation + */ +#if defined(HAVE_ALLOCA_H) && !defined(__GNUC__) +#include +#endif + +#if DEBUG +void syck_assert( const char *, unsigned, const char * ); +# define ASSERT(f) \ + (( f ) ? (void)0 : syck_assert( __FILE__, __LINE__, #f )) +#else +# define ASSERT(f) ((void)0) +#endif + +#ifndef NULL +# define NULL (void *)0 +#endif + +#define ALLOC_CT 8 +#define SYCK_BUFFERSIZE 4096 +#define S_ALLOC_N(type,n) (type*)malloc(sizeof(type)*(n)) +#define S_ALLOC(type) (type*)malloc(sizeof(type)) +#define S_REALLOC_N(var,type,n) (var)=(type*)realloc((char*)(var),sizeof(type)*(n)) +#define S_FREE(n) if (n) { free(n); n = NULL; } + +#define S_ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n)) + +#define S_MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n)) +#define S_MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n)) +#define S_MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n)) +#define S_MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n)) + +#define BLOCK_FOLD 10 +#define BLOCK_LIT 20 +#define BLOCK_PLAIN 30 +#define NL_CHOMP 40 +#define NL_KEEP 50 + +/* + * Node definitions + */ +#ifndef ST_DATA_T_DEFINED +typedef long st_data_t; +#endif + +#define SYMID unsigned long + +typedef struct _syck_node SyckNode; + +enum syck_kind_tag { + syck_map_kind, + syck_seq_kind, + syck_str_kind +}; + +enum map_part { + map_key, + map_value +}; + +enum map_style { + map_none, + map_inline +}; + +enum seq_style { + seq_none, + seq_inline +}; + +enum scalar_style { + scalar_none, + scalar_1quote, + scalar_2quote, + scalar_fold, + scalar_literal, + scalar_plain +}; + +/* + * Node metadata struct + */ +struct _syck_node { + /* Symbol table ID */ + SYMID id; + /* Underlying kind */ + enum syck_kind_tag kind; + /* Fully qualified tag-uri for type */ + char *type_id; + /* Anchor name */ + char *anchor; + union { + /* Storage for map data */ + struct SyckMap { + enum map_style style; + SYMID *keys; + SYMID *values; + long capa; + long idx; + } *pairs; + /* Storage for sequence data */ + struct SyckSeq { + enum seq_style style; + SYMID *items; + long capa; + long idx; + } *list; + /* Storage for string data */ + struct SyckStr { + enum scalar_style style; + char *ptr; + long len; + } *str; + } data; + /* Shortcut node */ + void *shortcut; +}; + +/* + * Parser definitions + */ +typedef struct _syck_parser SyckParser; +typedef struct _syck_file SyckIoFile; +typedef struct _syck_str SyckIoStr; +typedef struct _syck_level SyckLevel; + +typedef SYMID (*SyckNodeHandler)(SyckParser *, SyckNode *); +typedef void (*SyckErrorHandler)(SyckParser *, const char *); +typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *, char *); +typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long); +typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long); + +enum syck_io_type { + syck_io_str, + syck_io_file +}; + +enum syck_parser_input { + syck_yaml_utf8, + syck_yaml_utf16, + syck_yaml_utf32, + syck_bytecode_utf8 +}; + +enum syck_level_status { + syck_lvl_header, + syck_lvl_doc, + syck_lvl_open, + syck_lvl_seq, + syck_lvl_map, + syck_lvl_block, + syck_lvl_str, + syck_lvl_iseq, + syck_lvl_imap, + syck_lvl_end, + syck_lvl_pause, + syck_lvl_anctag, + syck_lvl_mapx, + syck_lvl_seqx +}; + +/* + * Parser structs + */ +struct _syck_file { + /* File pointer */ + FILE *ptr; + /* Function which FILE -> buffer */ + SyckIoFileRead read; +}; + +struct _syck_str { + /* String buffer pointers */ + char *beg, *ptr, *end; + /* Function which string -> buffer */ + SyckIoStrRead read; +}; + +struct _syck_level { + /* Indent */ + int spaces; + /* Counts nodes emitted at this level, useful for parsing + * keys and pairs in bytecode */ + int ncount; + /* Does node have anchors or tags? */ + int anctag; + /* Domain prefixing at the given level */ + char *domain; + /* Keeps a node status */ + enum syck_level_status status; +}; + +struct _syck_parser { + /* Root node */ + SYMID root, root_on_error; + /* Implicit typing flag */ + int implicit_typing, taguri_expansion; + /* Scripting language function to handle nodes */ + SyckNodeHandler handler; + /* Error handler */ + SyckErrorHandler error_handler; + /* InvalidAnchor handler */ + SyckBadAnchorHandler bad_anchor_handler; + /* Parser input type */ + enum syck_parser_input input_type; + /* IO type */ + enum syck_io_type io_type; + /* Custom buffer size */ + size_t bufsize; + /* Buffer pointers */ + char *buffer, *linectptr, *lineptr, *toktmp, *token, *cursor, *marker, *limit; + /* Line counter */ + int linect; + /* Last token from yylex() */ + int last_token; + /* Force a token upon next call to yylex() */ + int force_token; + /* EOF flag */ + int eof; + union { + SyckIoFile *file; + SyckIoStr *str; + } io; + /* Symbol table for anchors */ + st_table *anchors, *bad_anchors; + /* Optional symbol table for SYMIDs */ + st_table *syms; + /* Levels of indentation */ + SyckLevel *levels; + int lvl_idx; + int lvl_capa; + /* Pointer for extension's use */ + void *bonus; +}; + +/* + * Emitter definitions + */ +typedef struct _syck_emitter SyckEmitter; +typedef struct _syck_emitter_node SyckEmitterNode; + +typedef void (*SyckOutputHandler)(SyckEmitter *, char *, long); +typedef void (*SyckEmitterHandler)(SyckEmitter *, st_data_t); + +enum doc_stage { + doc_open, + doc_processing +}; + +/* + * Emitter struct + */ +struct _syck_emitter { + /* Headerless doc flag */ + int headless; + /* Force header? */ + int use_header; + /* Force version? */ + int use_version; + /* Sort hash keys */ + int sort_keys; + /* Anchor format */ + char *anchor_format; + /* Explicit typing on all collections? */ + int explicit_typing; + /* Best width on folded scalars */ + int best_width; + /* Use literal[1] or folded[2] blocks on all text? */ + enum scalar_style style; + /* Stage of written document */ + enum doc_stage stage; + /* Level counter */ + int level; + /* Default indentation */ + int indent; + /* Object ignore ID */ + SYMID ignore_id; + /* Symbol table for anchors */ + st_table *markers, *anchors, *anchored; + /* Custom buffer size */ + size_t bufsize; + /* Buffer */ + char *buffer, *marker; + /* Absolute position of the buffer */ + long bufpos; + /* Handler for emitter nodes */ + SyckEmitterHandler emitter_handler; + /* Handler for output */ + SyckOutputHandler output_handler; + /* Levels of indentation */ + SyckLevel *levels; + int lvl_idx; + int lvl_capa; + /* Pointer for extension's use */ + void *bonus; +}; + +/* + * Emitter node metadata struct + */ +struct _syck_emitter_node { + /* Node buffer position */ + long pos; + /* Current indent */ + long indent; + /* Collection? */ + int is_shortcut; +}; + +/* + * Handler prototypes + */ +SYMID syck_hdlr_add_node( SyckParser *, SyckNode * ); +SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * ); +void syck_hdlr_remove_anchor( SyckParser *, char * ); +SyckNode *syck_hdlr_get_anchor( SyckParser *, char * ); +void syck_add_transfer( char *, SyckNode *, int ); +char *syck_xprivate( const char *, int ); +char *syck_taguri( const char *, const char *, int ); +int syck_tagcmp( const char *, const char * ); +int syck_add_sym( SyckParser *, void * ); +int syck_lookup_sym( SyckParser *, SYMID, void ** ); +int syck_try_implicit( SyckNode * ); +char *syck_type_id_to_uri( const char * ); +void try_tag_implicit( SyckNode *, int ); +const char *syck_match_implicit( const char *, size_t ); + +/* + * API prototypes + */ +char *syck_strndup( const char *, long ); +long syck_io_file_read( char *, SyckIoFile *, long, long ); +long syck_io_str_read( char *, SyckIoStr *, long, long ); +char *syck_base64enc( char *, long ); +char *syck_base64dec( char *, long ); +SyckEmitter *syck_new_emitter(void); +SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t ); +void syck_emitter_ignore_id( SyckEmitter *, SYMID ); +void syck_output_handler( SyckEmitter *, SyckOutputHandler ); +void syck_emitter_handler( SyckEmitter *, SyckEmitterHandler ); +void syck_free_emitter( SyckEmitter * ); +void syck_emitter_clear( SyckEmitter * ); +void syck_emitter_write( SyckEmitter *, const char *, long ); +void syck_emitter_escape( SyckEmitter *, const char *, long ); +void syck_emitter_flush( SyckEmitter *, long ); +void syck_emit( SyckEmitter *, st_data_t ); +void syck_emit_scalar( SyckEmitter *, const char *, enum scalar_style, int, int, char, const char *, long ); +void syck_emit_1quoted( SyckEmitter *, int, const char *, long ); +void syck_emit_2quoted( SyckEmitter *, int, const char *, long ); +void syck_emit_folded( SyckEmitter *, int, char, const char *, long ); +void syck_emit_literal( SyckEmitter *, char, const char *, long ); +void syck_emit_seq( SyckEmitter *, const char *, enum seq_style ); +void syck_emit_item( SyckEmitter *, st_data_t ); +void syck_emit_map( SyckEmitter *, const char *, enum map_style ); +void syck_emit_end( SyckEmitter * ); +void syck_emit_tag( SyckEmitter *, const char *, const char * ); +void syck_emit_indent( SyckEmitter * ); +SyckLevel *syck_emitter_current_level( SyckEmitter * ); +SyckLevel *syck_emitter_parent_level( SyckEmitter * ); +void syck_emitter_pop_level( SyckEmitter * ); +void syck_emitter_add_level( SyckEmitter *, int, enum syck_level_status ); +void syck_emitter_reset_levels( SyckEmitter * ); +SyckParser *syck_new_parser(void); +void syck_free_parser( SyckParser * ); +void syck_parser_set_root_on_error( SyckParser *, SYMID ); +void syck_parser_implicit_typing( SyckParser *, int ); +void syck_parser_taguri_expansion( SyckParser *, int ); +int syck_scan_scalar( int, const char *, long ); +void syck_parser_handler( SyckParser *, SyckNodeHandler ); +void syck_parser_error_handler( SyckParser *, SyckErrorHandler ); +void syck_parser_bad_anchor_handler( SyckParser *, SyckBadAnchorHandler ); +void syck_parser_set_input_type( SyckParser *, enum syck_parser_input ); +void syck_parser_file( SyckParser *, FILE *, SyckIoFileRead ); +void syck_parser_str( SyckParser *, char *, long, SyckIoStrRead ); +void syck_parser_str_auto( SyckParser *, char *, SyckIoStrRead ); +SyckLevel *syck_parser_current_level( SyckParser * ); +void syck_parser_add_level( SyckParser *, int, enum syck_level_status ); +void syck_parser_pop_level( SyckParser * ); +void free_any_io( SyckParser * ); +long syck_parser_read( SyckParser * ); +long syck_parser_readlen( SyckParser *, long ); +SYMID syck_parse( SyckParser * ); +void syck_default_error_handler( SyckParser *, const char * ); +SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * ); +char *syck_yaml2byte( char * ); + +/* + * Allocation prototypes + */ +SyckNode *syck_alloc_map(void); +SyckNode *syck_alloc_seq(void); +SyckNode *syck_alloc_str(void); +void syck_free_node( SyckNode * ); +void syck_free_members( SyckNode * ); +SyckNode *syck_new_str( const char *, enum scalar_style ); +SyckNode *syck_new_str2( const char *, long, enum scalar_style ); +void syck_replace_str( SyckNode *, char *, enum scalar_style ); +void syck_replace_str2( SyckNode *, char *, long, enum scalar_style ); +void syck_str_blow_away_commas( SyckNode * ); +char *syck_str_read( SyckNode * ); +SyckNode *syck_new_map( SYMID, SYMID ); +void syck_map_empty( SyckNode * ); +void syck_map_add( SyckNode *, SYMID, SYMID ); +SYMID syck_map_read( SyckNode *, enum map_part, long ); +void syck_map_assign( SyckNode *, enum map_part, long, SYMID ); +long syck_map_count( SyckNode * ); +void syck_map_update( SyckNode *, SyckNode * ); +SyckNode *syck_new_seq( SYMID ); +void syck_seq_empty( SyckNode * ); +void syck_seq_add( SyckNode *, SYMID ); +void syck_seq_assign( SyckNode *, long, SYMID ); +SYMID syck_seq_read( SyckNode *, long ); +long syck_seq_count( SyckNode * ); + +/* + * Lexer prototypes + */ +void syckerror( const char * ); +int syckparse( void * ); +union YYSTYPE; +int sycklex( union YYSTYPE *, SyckParser * ); + +#if defined(__cplusplus) +} /* extern "C" { */ +#endif + +#endif /* ifndef SYCK_H */ diff --git a/lib/ruby-1.9.1-rc1/ext/syck/token.c b/lib/ruby-1.9.1-rc1/ext/syck/token.c new file mode 100644 index 0000000..ba079e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/token.c @@ -0,0 +1,2724 @@ +/* Generated by re2c 0.9.10 on Tue Sep 20 17:46:17 2005 */ +#line 1 "token.re" +/* + * token.re + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff + */ +#include "ruby/ruby.h" +#include "syck.h" +#include "gram.h" + +/* + * Allocate quoted strings in chunks + */ +#define QUOTELEN 1024 + +/* + * They do my bidding... + */ +#define YYCTYPE char +#define YYCURSOR parser->cursor +#define YYMARKER parser->marker +#define YYLIMIT parser->limit +#define YYTOKEN parser->token +#define YYTOKTMP parser->toktmp +#define YYLINEPTR parser->lineptr +#define YYLINECTPTR parser->linectptr +#define YYLINE parser->linect +#define YYFILL(n) syck_parser_read(parser) + +/* + * Repositions the cursor at `n' offset from the token start. + * Only works in `Header' and `Document' sections. + */ +#define YYPOS(n) YYCURSOR = YYTOKEN + n + +/* + * Track line numbers + */ +#define NEWLINE(ptr) YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; } + +/* + * I like seeing the level operations as macros... + */ +#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status ) +#define POP_LEVEL() syck_parser_pop_level( parser ) +#define CURRENT_LEVEL() syck_parser_current_level( parser ) + +/* + * Force a token next time around sycklex() + */ +#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok; + +/* + * Nice little macro to ensure we're YAML_IOPENed to the current level. + * * Only use this macro in the "Document" section * + */ +#define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \ + if ( last_lvl->spaces < to_len ) \ + { \ + if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \ + { \ + goto Document; \ + } \ + else \ + { \ + ADD_LEVEL( to_len, syck_lvl_doc ); \ + if ( reset == 1 ) YYPOS(0); \ + return YAML_IOPEN; \ + } \ + } + +/* + * Nice little macro to ensure closure of levels. + * * Only use this macro in the "Document" section * + */ +#define ENSURE_YAML_IEND(last_lvl, to_len) \ + if ( last_lvl->spaces > to_len ) \ + { \ + syck_parser_pop_level( parser ); \ + YYPOS(0); \ + return YAML_IEND; \ + } + +/* + * Concatenates quoted string items and manages allocation + * to the quoted string + */ +#define QUOTECAT(s, c, i, l) \ + { \ + if ( i + 1 >= c ) \ + { \ + c += QUOTELEN; \ + S_REALLOC_N( s, char, c ); \ + } \ + s[i++] = l; \ + s[i] = '\0'; \ + } + +#define QUOTECATS(s, c, i, cs, cl) \ + { \ + while ( i + cl >= c ) \ + { \ + c += QUOTELEN; \ + S_REALLOC_N( s, char, c ); \ + } \ + S_MEMCPY( s + i, cs, char, cl ); \ + i += cl; \ + s[i] = '\0'; \ + } + +/* + * Tags a plain scalar with a transfer method + * * Use only in "Plain" section * + */ +#define RETURN_IMPLICIT() \ + { \ + SyckNode *n = syck_alloc_str(); \ + YYCURSOR = YYTOKEN; \ + n->data.str->ptr = qstr; \ + n->data.str->len = qidx; \ + n->data.str->style = scalar_plain; \ + sycklval->nodeData = n; \ + if ( parser->implicit_typing == 1 ) \ + { \ + try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \ + } \ + return YAML_PLAIN; \ + } + +/* concat the inline characters to the plain scalar */ +#define PLAIN_NOT_INL() \ + if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \ + { \ + YYCURSOR--; \ + } \ + QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \ + goto Plain2; + +/* trim spaces off the end in case of indent */ +#define PLAIN_IS_INL() \ + char *walker = qstr + qidx - 1; \ + while ( walker > qstr && ( *walker == '\n' || *walker == ' ' || *walker == '\t' ) ) \ + { \ + qidx--; \ + walker[0] = '\0'; \ + walker--; \ + } + +/* + * Keep or chomp block? + * * Use only in "ScalarBlock" section * + */ +#define RETURN_YAML_BLOCK() \ + { \ + SyckNode *n = syck_alloc_str(); \ + if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \ + { \ + n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \ + } \ + else \ + { \ + n->type_id = syck_strndup( "str", 3 ); \ + } \ + n->data.str->ptr = qstr; \ + n->data.str->len = qidx; \ + if ( blockType == BLOCK_LIT ) { \ + n->data.str->style = scalar_literal; \ + } else { \ + n->data.str->style = scalar_fold; \ + } \ + if ( qidx > 0 ) \ + { \ + if ( nlDoWhat != NL_KEEP ) \ + { \ + char *fc = n->data.str->ptr + n->data.str->len - 1; \ + while ( is_newline( fc ) ) fc--; \ + if ( nlDoWhat != NL_CHOMP && fc < n->data.str->ptr + n->data.str->len - 1 ) \ + fc += 1; \ + n->data.str->len = fc - n->data.str->ptr + 1; \ + } \ + } \ + sycklval->nodeData = n; \ + return YAML_BLOCK; \ + } + +/* + * Handles newlines, calculates indent + */ +#define GOBBLE_UP_YAML_INDENT( ict, start ) \ + char *indent = start; \ + NEWLINE(indent); \ + while ( indent < YYCURSOR ) \ + { \ + if ( is_newline( ++indent ) ) \ + { \ + NEWLINE(indent); \ + } \ + } \ + ict = 0; \ + if ( *YYCURSOR == '\0' ) \ + { \ + ict = -1; \ + start = YYCURSOR - 1; \ + } \ + else if ( *YYLINEPTR == ' ' ) \ + { \ + ict = YYCURSOR - YYLINEPTR; \ + } + +/* + * If an indent exists at the current level, back up. + */ +#define GET_TRUE_YAML_INDENT(indt_len) \ + { \ + SyckLevel *lvl_deep = CURRENT_LEVEL(); \ + indt_len = lvl_deep->spaces; \ + if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map ) ) \ + { \ + SyckLevel *lvl_over; \ + parser->lvl_idx--; \ + lvl_over = CURRENT_LEVEL(); \ + indt_len = lvl_over->spaces; \ + parser->lvl_idx++; \ + } \ + } + +/* + * Argjh! I hate globals! Here for syckerror() only! + */ +SyckParser *syck_parser_ptr = NULL; + +/* + * Accessory funcs later in this file. + */ +void eat_comments( SyckParser * ); +char escape_seq( char ); +int is_newline( char *ptr ); +int newline_len( char *ptr ); +int sycklex_yaml_utf8( YYSTYPE *, SyckParser * ); +int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * ); +int syckwrap(); + +/* + * My own re-entrant sycklex() using re2c. + * You really get used to the limited regexp. + * It's really nice to not rely on backtracking and such. + */ +int +sycklex( YYSTYPE *sycklval, SyckParser *parser ) +{ + switch ( parser->input_type ) + { + case syck_yaml_utf8: + return sycklex_yaml_utf8( sycklval, parser ); + + case syck_yaml_utf16: + syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); + break; + + case syck_yaml_utf32: + syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" ); + break; + + case syck_bytecode_utf8: + return sycklex_bytecode_utf8( sycklval, parser ); + } + return YAML_DOCSEP; +} + +/* + * Parser for standard YAML [UTF-8] + */ +int +sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser ) +{ + int doc_level = 0; + syck_parser_ptr = parser; + if ( YYCURSOR == NULL ) + { + syck_parser_read( parser ); + } + + if ( parser->force_token != 0 ) + { + int t = parser->force_token; + parser->force_token = 0; + return t; + } + +#line 315 "token.re" + + + if ( YYLINEPTR != YYCURSOR ) + { + goto Document; + } + +Header: + + YYTOKEN = YYCURSOR; + + +#line 307 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy0; + ++YYCURSOR; +yy0: + if((YYLIMIT - YYCURSOR) < 5) YYFILL(5); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy7; + case 0x09: case ' ': goto yy12; + case 0x0A: goto yy9; + case 0x0D: goto yy11; + case '#': goto yy5; + case '-': goto yy2; + case '.': goto yy4; + default: goto yy14; + } +yy2: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '-': goto yy28; + default: goto yy3; + } +yy3: +#line 374 "token.re" +{ YYPOS(0); + goto Document; + } +#line 337 "" +yy4: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '.': goto yy21; + default: goto yy3; + } +yy5: ++YYCURSOR; + goto yy6; +yy6: +#line 356 "token.re" +{ eat_comments( parser ); + goto Header; + } +#line 351 "" +yy7: ++YYCURSOR; + goto yy8; +yy8: +#line 360 "token.re" +{ SyckLevel *lvl = CURRENT_LEVEL(); + ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } +#line 361 "" +yy9: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + goto yy18; +yy10: +#line 366 "token.re" +{ GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN ); + goto Header; + } +#line 370 "" +yy11: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy17; + default: goto yy3; + } +yy12: ++YYCURSOR; + yych = *YYCURSOR; + goto yy16; +yy13: +#line 370 "token.re" +{ doc_level = YYCURSOR - YYLINEPTR; + goto Header; + } +#line 384 "" +yy14: yych = *++YYCURSOR; + goto yy3; +yy15: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy16; +yy16: switch(yych){ + case 0x09: case ' ': goto yy15; + default: goto yy13; + } +yy17: yyaccept = 1; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy18; +yy18: switch(yych){ + case 0x0A: case ' ': goto yy17; + case 0x0D: goto yy19; + default: goto yy10; + } +yy19: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy17; + default: goto yy20; + } +yy20: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 1: goto yy10; + case 0: goto yy3; + } +yy21: yych = *++YYCURSOR; + switch(yych){ + case '.': goto yy22; + default: goto yy20; + } +yy22: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy23; + case 0x0D: goto yy27; + case ' ': goto yy25; + default: goto yy20; + } +yy23: ++YYCURSOR; + goto yy24; +yy24: +#line 342 "token.re" +{ SyckLevel *lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_header ) + { + goto Header; + } + else + { + ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } + return 0; + } +#line 446 "" +yy25: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy26; +yy26: switch(yych){ + case ' ': goto yy25; + default: goto yy24; + } +yy27: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy23; + default: goto yy20; + } +yy28: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy29; + default: goto yy20; + } +yy29: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy30; + case 0x0D: goto yy34; + case ' ': goto yy32; + default: goto yy20; + } +yy30: ++YYCURSOR; + goto yy31; +yy31: +#line 328 "token.re" +{ SyckLevel *lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_header ) + { + YYPOS(3); + goto Directive; + } + else + { + ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } + } +#line 489 "" +yy32: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy33; +yy33: switch(yych){ + case ' ': goto yy32; + default: goto yy31; + } +yy34: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy30; + default: goto yy20; + } +} +#line 378 "token.re" + + +Document: + { + SyckLevel *lvl = CURRENT_LEVEL(); + if ( lvl->status == syck_lvl_header ) + { + lvl->status = syck_lvl_doc; + } + + YYTOKEN = YYCURSOR; + + +#line 518 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy35; + ++YYCURSOR; +yy35: + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy62; + case 0x09: case ' ': goto yy60; + case 0x0A: goto yy37; + case 0x0D: goto yy39; + case '!': goto yy51; + case '"': goto yy55; + case '#': goto yy58; + case '&': goto yy49; + case '\'': goto yy53; + case '*': goto yy50; + case ',': case ':': goto yy47; + case '-': case '?': goto yy48; + case '>': case '|': goto yy57; + case '[': goto yy41; + case ']': case '}': goto yy45; + case '{': goto yy43; + default: goto yy64; + } +yy37: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy92; +yy38: +#line 392 "token.re" +{ /* Isolate spaces */ + int indt_len; + GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN ); + lvl = CURRENT_LEVEL(); + doc_level = 0; + + /* XXX: Comment lookahead */ + if ( *YYCURSOR == '#' ) + { + goto Document; + } + + /* Ignore indentation inside inlines */ + if ( lvl->status == syck_lvl_iseq || lvl->status == syck_lvl_imap ) + { + goto Document; + } + + /* Check for open indent */ + ENSURE_YAML_IEND(lvl, indt_len); + ENSURE_YAML_IOPEN(lvl, indt_len, 0); + if ( indt_len == -1 ) + { + return 0; + } + return YAML_INDENT; + } +#line 578 "" +yy39: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy91; + default: goto yy40; + } +yy40: +#line 497 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + goto Plain; + } +#line 589 "" +yy41: ++YYCURSOR; + goto yy42; +yy42: +#line 420 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + lvl = CURRENT_LEVEL(); + ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq); + return YYTOKEN[0]; + } +#line 599 "" +yy43: ++YYCURSOR; + goto yy44; +yy44: +#line 426 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + lvl = CURRENT_LEVEL(); + ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap); + return YYTOKEN[0]; + } +#line 609 "" +yy45: ++YYCURSOR; + goto yy46; +yy46: +#line 432 "token.re" +{ POP_LEVEL(); + return YYTOKEN[0]; + } +#line 617 "" +yy47: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy86; + case 0x0D: goto yy90; + case ' ': goto yy88; + default: goto yy40; + } +yy48: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy81; + case 0x0D: goto yy85; + case ' ': goto yy83; + default: goto yy40; + } +yy49: yych = *++YYCURSOR; + switch(yych){ + case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy78; + default: goto yy40; + } +yy50: yych = *++YYCURSOR; + switch(yych){ + case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy75; + default: goto yy40; + } +yy51: ++YYCURSOR; + goto yy52; +yy52: +#line 471 "token.re" +{ goto TransferMethod; } +#line 767 "" +yy53: ++YYCURSOR; + goto yy54; +yy54: +#line 473 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + goto SingleQuote; } +#line 774 "" +yy55: ++YYCURSOR; + goto yy56; +yy56: +#line 476 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + goto DoubleQuote; } +#line 781 "" +yy57: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy70; + case 0x0D: goto yy74; + case ' ': goto yy72; + case '+': case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy67; + default: goto yy40; + } +yy58: ++YYCURSOR; + goto yy59; +yy59: +#line 486 "token.re" +{ eat_comments( parser ); + goto Document; + } +#line 807 "" +yy60: ++YYCURSOR; + yych = *YYCURSOR; + goto yy66; +yy61: +#line 490 "token.re" +{ goto Document; } +#line 814 "" +yy62: ++YYCURSOR; + goto yy63; +yy63: +#line 492 "token.re" +{ ENSURE_YAML_IEND(lvl, -1); + YYPOS(0); + return 0; + } +#line 823 "" +yy64: yych = *++YYCURSOR; + goto yy40; +yy65: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy66; +yy66: switch(yych){ + case 0x09: case ' ': goto yy65; + default: goto yy61; + } +yy67: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy68; +yy68: switch(yych){ + case 0x0A: goto yy70; + case 0x0D: goto yy74; + case ' ': goto yy72; + case '+': case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy67; + default: goto yy69; + } +yy69: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy38; + case 1: goto yy40; + } +yy70: ++YYCURSOR; + goto yy71; +yy71: +#line 479 "token.re" +{ if ( is_newline( YYCURSOR - 1 ) ) + { + YYCURSOR--; + } + goto ScalarBlock; + } +#line 869 "" +yy72: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy73; +yy73: switch(yych){ + case ' ': goto yy72; + default: goto yy71; + } +yy74: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy70; + default: goto yy69; + } +yy75: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy76; +yy76: switch(yych){ + case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy75; + default: goto yy77; + } +yy77: +#line 466 "token.re" +{ ENSURE_YAML_IOPEN(lvl, doc_level, 1); + sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); + return YAML_ALIAS; + } +#line 956 "" +yy78: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy79; +yy79: switch(yych){ + case '-': case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy78; + default: goto yy80; + } +yy80: +#line 455 "token.re" +{ sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 ); + + /* + * Remove previous anchors of the same name. Since the parser will likely + * construct deeper nodes first, we want those nodes to be placed in the + * queue for matching at a higher level of indentation. + */ + syck_hdlr_remove_anchor(parser, sycklval->name); + return YAML_ANCHOR; + } +#line 1036 "" +yy81: ++YYCURSOR; + goto yy82; +yy82: +#line 441 "token.re" +{ ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1); + FORCE_NEXT_TOKEN(YAML_IOPEN); + if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) ) + { + YYCURSOR--; + ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq); + } + else /* spaces followed by content uses the space as indentation */ + { + ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq); + } + return YYTOKEN[0]; + } +#line 1054 "" +yy83: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy84; +yy84: switch(yych){ + case ' ': goto yy83; + default: goto yy82; + } +yy85: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy81; + default: goto yy69; + } +yy86: ++YYCURSOR; + goto yy87; +yy87: +#line 436 "token.re" +{ if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap ) lvl->status = syck_lvl_map; + YYPOS(1); + return YYTOKEN[0]; + } +#line 1076 "" +yy88: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy89; +yy89: switch(yych){ + case ' ': goto yy88; + default: goto yy87; + } +yy90: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy86; + default: goto yy69; + } +yy91: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy92; +yy92: switch(yych){ + case 0x0A: case ' ': goto yy91; + case 0x0D: goto yy93; + default: goto yy38; + } +yy93: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy91; + default: goto yy69; + } +} +#line 501 "token.re" + + } + +Directive: + { + YYTOKTMP = YYCURSOR; + + +#line 1117 "" +{ + YYCTYPE yych; + unsigned int yyaccept = 0; + goto yy94; + ++YYCURSOR; +yy94: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy96; + case 0x09: case ' ': goto yy99; + case '%': goto yy97; + default: goto yy101; + } +yy96: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy98; + } +yy97: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy104; + default: goto yy98; + } +yy98: +#line 514 "token.re" +{ YYCURSOR = YYTOKTMP; + return YAML_DOCSEP; + } +#line 1221 "" +yy99: ++YYCURSOR; + yych = *YYCURSOR; + goto yy103; +yy100: +#line 512 "token.re" +{ goto Directive; } +#line 1228 "" +yy101: yych = *++YYCURSOR; + goto yy98; +yy102: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy103; +yy103: switch(yych){ + case 0x09: case ' ': goto yy102; + default: goto yy100; + } +yy104: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy105; +yy105: switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy104; + case ':': goto yy106; + default: goto yy96; + } +yy106: yych = *++YYCURSOR; + switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy107; + default: goto yy96; + } +yy107: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy108; +yy108: switch(yych){ + case '.': + case '/': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '[': + case '\\': + case ']': + case '^': + case '_': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy107; + default: goto yy109; + } +yy109: +#line 510 "token.re" +{ goto Directive; } +#line 1484 "" +} +#line 517 "token.re" + + + } + +Plain: + { + int qidx = 0; + int qcapa = 100; + char *qstr = S_ALLOC_N( char, qcapa ); + SyckLevel *plvl; + int parentIndent; + + YYCURSOR = YYTOKEN; + plvl = CURRENT_LEVEL(); + GET_TRUE_YAML_INDENT(parentIndent); + +Plain2: + YYTOKEN = YYCURSOR; + +Plain3: + + +#line 1509 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy110; + ++YYCURSOR; +yy110: + if((YYLIMIT - YYCURSOR) < 3) YYFILL(3); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy124; + case 0x09: goto yy126; + case 0x0A: goto yy112; + case 0x0D: goto yy114; + case ' ': goto yy122; + case ',': goto yy117; + case ':': goto yy116; + case ']': goto yy120; + case '}': goto yy118; + default: goto yy127; + } +yy112: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy142; +yy113: +#line 540 "token.re" +{ int indt_len, nl_count = 0; + SyckLevel *lvl; + char *tok = YYTOKEN; + GOBBLE_UP_YAML_INDENT( indt_len, tok ); + lvl = CURRENT_LEVEL(); + + if ( indt_len <= parentIndent ) + { + RETURN_IMPLICIT(); + } + + while ( YYTOKEN < YYCURSOR ) + { + int nl_len = newline_len( YYTOKEN++ ); + if ( nl_len ) + { + nl_count++; + YYTOKEN += nl_len - 1; + } + } + if ( nl_count <= 1 ) + { + QUOTECAT(qstr, qcapa, qidx, ' '); + } + else + { + int i; + for ( i = 0; i < nl_count - 1; i++ ) + { + QUOTECAT(qstr, qcapa, qidx, '\n'); + } + } + + goto Plain2; + } +#line 1570 "" +yy114: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy141; + default: goto yy115; + } +yy115: +#line 627 "token.re" +{ QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); + goto Plain2; + } +#line 1581 "" +yy116: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy136; + case 0x0D: goto yy140; + case ' ': goto yy138; + default: goto yy115; + } +yy117: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy130; + case 0x0D: goto yy134; + case ' ': goto yy132; + default: goto yy115; + } +yy118: ++YYCURSOR; + goto yy119; +yy119: +#line 589 "token.re" +{ if ( plvl->status != syck_lvl_imap ) + { + PLAIN_NOT_INL(); + } + else + { + PLAIN_IS_INL(); + } + RETURN_IMPLICIT(); + } +#line 1612 "" +yy120: ++YYCURSOR; + goto yy121; +yy121: +#line 600 "token.re" +{ if ( plvl->status != syck_lvl_iseq ) + { + PLAIN_NOT_INL(); + } + else + { + PLAIN_IS_INL(); + } + RETURN_IMPLICIT(); + } +#line 1627 "" +yy122: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case '#': goto yy128; + default: goto yy123; + } +yy123: +#line 617 "token.re" +{ if ( qidx == 0 ) + { + goto Plain2; + } + else + { + goto Plain3; + } + } +#line 1644 "" +yy124: ++YYCURSOR; + goto yy125; +yy125: +#line 615 "token.re" +{ RETURN_IMPLICIT(); } +#line 1650 "" +yy126: yych = *++YYCURSOR; + goto yy123; +yy127: yych = *++YYCURSOR; + goto yy115; +yy128: ++YYCURSOR; + goto yy129; +yy129: +#line 611 "token.re" +{ eat_comments( parser ); + RETURN_IMPLICIT(); + } +#line 1662 "" +yy130: ++YYCURSOR; + goto yy131; +yy131: +#line 578 "token.re" +{ if ( plvl->status != syck_lvl_iseq && plvl->status != syck_lvl_imap ) + { + PLAIN_NOT_INL(); + } + else + { + PLAIN_IS_INL(); + } + RETURN_IMPLICIT(); + } +#line 1677 "" +yy132: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy133; +yy133: switch(yych){ + case ' ': goto yy132; + default: goto yy131; + } +yy134: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy130; + default: goto yy135; + } +yy135: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy113; + case 1: goto yy115; + } +yy136: ++YYCURSOR; + goto yy137; +yy137: +#line 576 "token.re" +{ RETURN_IMPLICIT(); } +#line 1701 "" +yy138: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy139; +yy139: switch(yych){ + case ' ': goto yy138; + default: goto yy137; + } +yy140: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy136; + default: goto yy135; + } +yy141: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy142; +yy142: switch(yych){ + case 0x0A: case ' ': goto yy141; + case 0x0D: goto yy143; + default: goto yy113; + } +yy143: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy141; + default: goto yy135; + } +} +#line 631 "token.re" + + } + +SingleQuote: + { + int qidx = 0; + int qcapa = 100; + char *qstr = S_ALLOC_N( char, qcapa ); + +SingleQuote2: + YYTOKEN = YYCURSOR; + + +#line 1747 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy144; + ++YYCURSOR; +yy144: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy152; + case 0x0A: goto yy146; + case 0x0D: goto yy148; + case '\'': goto yy150; + default: goto yy153; + } +yy146: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy157; +yy147: +#line 645 "token.re" +{ int indt_len; + int nl_count = 0; + SyckLevel *lvl; + GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN ); + lvl = CURRENT_LEVEL(); + + if ( lvl->status != syck_lvl_str ) + { + ADD_LEVEL( indt_len, syck_lvl_str ); + } + else if ( indt_len < lvl->spaces ) + { + /* Error! */ + } + + while ( YYTOKEN < YYCURSOR ) + { + int nl_len = newline_len( YYTOKEN++ ); + if ( nl_len ) + { + nl_count++; + YYTOKEN += nl_len - 1; + } + } + if ( nl_count <= 1 ) + { + QUOTECAT(qstr, qcapa, qidx, ' '); + } + else + { + int i; + for ( i = 0; i < nl_count - 1; i++ ) + { + QUOTECAT(qstr, qcapa, qidx, '\n'); + } + } + + goto SingleQuote2; + } +#line 1807 "" +yy148: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy156; + default: goto yy149; + } +yy149: +#line 712 "token.re" +{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1)); + goto SingleQuote2; + } +#line 1818 "" +yy150: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case '\'': goto yy154; + default: goto yy151; + } +yy151: +#line 689 "token.re" +{ SyckLevel *lvl; + SyckNode *n = syck_alloc_str(); + lvl = CURRENT_LEVEL(); + + if ( lvl->status == syck_lvl_str ) + { + POP_LEVEL(); + } + if ( ((SyckParser *)parser)->taguri_expansion == 1 ) + { + n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); + } + else + { + n->type_id = syck_strndup( "str", 3 ); + } + n->data.str->ptr = qstr; + n->data.str->len = qidx; + n->data.str->style = scalar_1quote; + sycklval->nodeData = n; + return YAML_PLAIN; + } +#line 1848 "" +yy152: yych = *++YYCURSOR; + goto yy151; +yy153: yych = *++YYCURSOR; + goto yy149; +yy154: ++YYCURSOR; + goto yy155; +yy155: +#line 685 "token.re" +{ QUOTECAT(qstr, qcapa, qidx, '\''); + goto SingleQuote2; + } +#line 1860 "" +yy156: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy157; +yy157: switch(yych){ + case 0x0A: case ' ': goto yy156; + case 0x0D: goto yy158; + default: goto yy147; + } +yy158: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy156; + default: goto yy159; + } +yy159: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy147; + } +} +#line 716 "token.re" + + + } + + +DoubleQuote: + { + int keep_nl = 1; + int qidx = 0; + int qcapa = 100; + char *qstr = S_ALLOC_N( char, qcapa ); + +DoubleQuote2: + YYTOKEN = YYCURSOR; + + + +#line 1901 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy160; + ++YYCURSOR; +yy160: + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy167; + case 0x0A: goto yy162; + case 0x0D: goto yy164; + case '"': goto yy169; + case '\\': goto yy166; + default: goto yy170; + } +yy162: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy184; +yy163: +#line 734 "token.re" +{ int indt_len; + int nl_count = 0; + SyckLevel *lvl; + GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN ); + lvl = CURRENT_LEVEL(); + + if ( lvl->status != syck_lvl_str ) + { + ADD_LEVEL( indt_len, syck_lvl_str ); + } + else if ( indt_len < lvl->spaces ) + { + /* FIXME */ + } + + if ( keep_nl == 1 ) + { + while ( YYTOKEN < YYCURSOR ) + { + int nl_len = newline_len( YYTOKEN++ ); + if ( nl_len ) + { + nl_count++; + YYTOKEN += nl_len - 1; + } + } + if ( nl_count <= 1 ) + { + QUOTECAT(qstr, qcapa, qidx, ' '); + } + else + { + int i; + for ( i = 0; i < nl_count - 1; i++ ) + { + QUOTECAT(qstr, qcapa, qidx, '\n'); + } + } + } + + keep_nl = 1; + goto DoubleQuote2; + } +#line 1966 "" +yy164: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy183; + default: goto yy165; + } +yy165: +#line 820 "token.re" +{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1)); + goto DoubleQuote2; + } +#line 1977 "" +yy166: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case 0x0A: goto yy174; + case 0x0D: goto yy176; + case ' ': goto yy171; + case '"': case '0': case '\\': case 'a': + case 'b': case 'e': + case 'f': case 'n': case 'r': case 't': case 'v': goto yy178; + case 'x': goto yy177; + default: goto yy165; + } +yy167: ++YYCURSOR; + goto yy168; +yy168: +#line 797 "token.re" +{ SyckLevel *lvl; + SyckNode *n = syck_alloc_str(); + lvl = CURRENT_LEVEL(); + + if ( lvl->status == syck_lvl_str ) + { + POP_LEVEL(); + } + if ( ((SyckParser *)parser)->taguri_expansion == 1 ) + { + n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); + } + else + { + n->type_id = syck_strndup( "str", 3 ); + } + n->data.str->ptr = qstr; + n->data.str->len = qidx; + n->data.str->style = scalar_2quote; + sycklval->nodeData = n; + return YAML_PLAIN; + } +#line 2016 "" +yy169: yych = *++YYCURSOR; + goto yy168; +yy170: yych = *++YYCURSOR; + goto yy165; +yy171: ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + goto yy172; +yy172: switch(yych){ + case 0x0A: goto yy174; + case 0x0D: goto yy176; + case ' ': goto yy171; + default: goto yy173; + } +yy173: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy163; + case 1: goto yy165; + } +yy174: ++YYCURSOR; + goto yy175; +yy175: +#line 792 "token.re" +{ keep_nl = 0; + YYCURSOR--; + goto DoubleQuote2; + } +#line 2044 "" +yy176: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy174; + default: goto yy173; + } +yy177: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy180; + default: goto yy173; + } +yy178: ++YYCURSOR; + goto yy179; +yy179: +#line 778 "token.re" +{ char ch = *( YYCURSOR - 1 ); + QUOTECAT(qstr, qcapa, qidx, escape_seq( ch )); + goto DoubleQuote2; + } +#line 2082 "" +yy180: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy181; + default: goto yy173; + } +yy181: ++YYCURSOR; + goto yy182; +yy182: +#line 783 "token.re" +{ long ch; + char *chr_text = syck_strndup( YYTOKEN, 4 ); + chr_text[0] = '0'; + ch = strtol( chr_text, NULL, 16 ); + free( chr_text ); + QUOTECAT(qstr, qcapa, qidx, ch); + goto DoubleQuote2; + } +#line 2119 "" +yy183: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy184; +yy184: switch(yych){ + case 0x0A: case ' ': goto yy183; + case 0x0D: goto yy185; + default: goto yy163; + } +yy185: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy183; + default: goto yy173; + } +} +#line 824 "token.re" + + } + +TransferMethod: + { + int qidx = 0; + int qcapa = 100; + char *qstr = S_ALLOC_N( char, qcapa ); + +TransferMethod2: + YYTOKTMP = YYCURSOR; + + +#line 2152 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy186; + ++YYCURSOR; +yy186: + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy188; + case 0x0A: goto yy190; + case 0x0D: goto yy192; + case ' ': goto yy191; + case '\\': goto yy194; + default: goto yy195; + } +yy188: ++YYCURSOR; + goto yy189; +yy189: +#line 838 "token.re" +{ SyckLevel *lvl; + YYCURSOR = YYTOKTMP; + if ( YYCURSOR == YYTOKEN + 1 ) + { + free( qstr ); + return YAML_ITRANSFER; + } + + lvl = CURRENT_LEVEL(); + + /* + * URL Prefixing + */ + if ( *qstr == '^' ) + { + sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) ); + sycklval->name[0] = '\0'; + strcat( sycklval->name, lvl->domain ); + strncat( sycklval->name, qstr + 1, qidx - 1 ); + free( qstr ); + } + else + { + char *carat = qstr; + char *qend = qstr + qidx; + while ( (++carat) < qend ) + { + if ( *carat == '^' ) + break; + } + + if ( carat < qend ) + { + free( lvl->domain ); + lvl->domain = syck_strndup( qstr, carat - qstr ); + sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) ); + sycklval->name[0] = '\0'; + strcat( sycklval->name, lvl->domain ); + strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 ); + free( qstr ); + } + else + { + sycklval->name = qstr; + } + } + + return YAML_TRANSFER; + } +#line 2222 "" +yy190: yych = *++YYCURSOR; + goto yy189; +yy191: yych = *++YYCURSOR; + goto yy204; +yy192: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy188; + default: goto yy193; + } +yy193: +#line 905 "token.re" +{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1)); + goto TransferMethod2; + } +#line 2237 "" +yy194: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '"': case '0': case '\\': case 'a': + case 'b': case 'e': + case 'f': case 'n': case 'r': case 't': case 'v': goto yy198; + case 'x': goto yy196; + default: goto yy193; + } +yy195: yych = *++YYCURSOR; + goto yy193; +yy196: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy200; + default: goto yy197; + } +yy197: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy193; + } +yy198: ++YYCURSOR; + goto yy199; +yy199: +#line 891 "token.re" +{ char ch = *( YYCURSOR - 1 ); + QUOTECAT(qstr, qcapa, qidx, escape_seq( ch )); + goto TransferMethod2; + } +#line 2285 "" +yy200: yych = *++YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': goto yy201; + default: goto yy197; + } +yy201: ++YYCURSOR; + goto yy202; +yy202: +#line 896 "token.re" +{ long ch; + char *chr_text = syck_strndup( YYTOKTMP, 4 ); + chr_text[0] = '0'; + ch = strtol( chr_text, NULL, 16 ); + free( chr_text ); + QUOTECAT(qstr, qcapa, qidx, ch); + goto TransferMethod2; + } +#line 2322 "" +yy203: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy204; +yy204: switch(yych){ + case ' ': goto yy203; + default: goto yy189; + } +} +#line 910 "token.re" + + } + +ScalarBlock: + { + int qidx = 0; + int qcapa = 100; + char *qstr = S_ALLOC_N( char, qcapa ); + int blockType = 0; + int nlDoWhat = 0; + int lastIndent = 0; + int forceIndent = -1; + char *yyt = YYTOKEN; + SyckLevel *lvl = CURRENT_LEVEL(); + int parentIndent = -1; + + switch ( *yyt ) + { + case '|': blockType = BLOCK_LIT; break; + case '>': blockType = BLOCK_FOLD; break; + } + + while ( ++yyt <= YYCURSOR ) + { + if ( *yyt == '-' ) + { + nlDoWhat = NL_CHOMP; + } + else if ( *yyt == '+' ) + { + nlDoWhat = NL_KEEP; + } + else if ( isdigit( *yyt ) ) + { + forceIndent = strtol( yyt, NULL, 10 ); + } + } + + qstr[0] = '\0'; + YYTOKEN = YYCURSOR; + +ScalarBlock2: + YYTOKEN = YYCURSOR; + + +#line 2378 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy205; + ++YYCURSOR; +yy205: + if((YYLIMIT - YYCURSOR) < 5) YYFILL(5); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy213; + case 0x0A: goto yy207; + case 0x0D: goto yy209; + case '#': goto yy211; + case '-': goto yy215; + default: goto yy216; + } +yy207: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy226; +yy208: +#line 956 "token.re" +{ char *pacer; + char *tok = YYTOKEN; + int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0; + GOBBLE_UP_YAML_INDENT( indt_len, tok ); + lvl = CURRENT_LEVEL(); + + if ( lvl->status != syck_lvl_block ) + { + GET_TRUE_YAML_INDENT(parentIndent); + if ( forceIndent > 0 ) forceIndent += parentIndent; + if ( indt_len > parentIndent ) + { + int new_spaces = forceIndent > 0 ? forceIndent : indt_len; + ADD_LEVEL( new_spaces, syck_lvl_block ); + lastIndent = indt_len - new_spaces; + nl_begin = 1; + lvl = CURRENT_LEVEL(); + } + else + { + YYCURSOR = YYTOKEN; + RETURN_YAML_BLOCK(); + } + } + + /* + * Fold only in the event of two lines being on the leftmost + * indentation. + */ + if ( blockType == BLOCK_FOLD && lastIndent == 0 && ( indt_len - lvl->spaces ) == 0 ) + { + fold_nl = 1; + } + + pacer = YYTOKEN; + while ( pacer < YYCURSOR ) + { + int nl_len = newline_len( pacer++ ); + if ( nl_len ) + { + nl_count++; + pacer += nl_len - 1; + } + } + + if ( fold_nl == 1 || nl_begin == 1 ) + { + nl_count--; + } + + if ( nl_count < 1 && nl_begin == 0 ) + { + QUOTECAT(qstr, qcapa, qidx, ' '); + } + else + { + int i; + for ( i = 0; i < nl_count; i++ ) + { + QUOTECAT(qstr, qcapa, qidx, '\n'); + } + } + + lastIndent = indt_len - lvl->spaces; + YYCURSOR -= lastIndent; + + if ( indt_len < lvl->spaces ) + { + POP_LEVEL(); + YYCURSOR = YYTOKEN; + RETURN_YAML_BLOCK(); + } + goto ScalarBlock2; + } +#line 2474 "" +yy209: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy225; + default: goto yy210; + } +yy210: +#line 1070 "token.re" +{ QUOTECAT(qstr, qcapa, qidx, *YYTOKEN); + goto ScalarBlock2; + } +#line 2485 "" +yy211: ++YYCURSOR; + goto yy212; +yy212: +#line 1032 "token.re" +{ lvl = CURRENT_LEVEL(); + if ( lvl->status != syck_lvl_block ) + { + eat_comments( parser ); + YYTOKEN = YYCURSOR; + } + else + { + QUOTECAT(qstr, qcapa, qidx, *YYTOKEN); + } + goto ScalarBlock2; + } +#line 2502 "" +yy213: ++YYCURSOR; + goto yy214; +yy214: +#line 1046 "token.re" +{ YYCURSOR--; + POP_LEVEL(); + RETURN_YAML_BLOCK(); + } +#line 2511 "" +yy215: yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case '-': goto yy217; + default: goto yy210; + } +yy216: yych = *++YYCURSOR; + goto yy210; +yy217: yych = *++YYCURSOR; + switch(yych){ + case '-': goto yy219; + default: goto yy218; + } +yy218: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy208; + case 1: goto yy210; + } +yy219: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy220; + case 0x0D: goto yy224; + case ' ': goto yy222; + default: goto yy218; + } +yy220: ++YYCURSOR; + goto yy221; +yy221: +#line 1051 "token.re" +{ if ( YYTOKEN == YYLINEPTR ) + { + if ( blockType == BLOCK_FOLD && qidx > 0 ) + { + qidx -= 1; + } + QUOTECAT(qstr, qcapa, qidx, '\n'); + POP_LEVEL(); + YYCURSOR = YYTOKEN; + RETURN_YAML_BLOCK(); + } + else + { + QUOTECAT(qstr, qcapa, qidx, *YYTOKEN); + YYCURSOR = YYTOKEN + 1; + goto ScalarBlock2; + } + } +#line 2559 "" +yy222: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy223; +yy223: switch(yych){ + case ' ': goto yy222; + default: goto yy221; + } +yy224: yych = *++YYCURSOR; + switch(yych){ + case 0x0A: goto yy220; + default: goto yy218; + } +yy225: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy226; +yy226: switch(yych){ + case 0x0A: case ' ': goto yy225; + case 0x0D: goto yy227; + default: goto yy208; + } +yy227: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy225; + default: goto yy218; + } +} +#line 1075 "token.re" + + } + + return 0; + +} + +void +eat_comments( SyckParser *parser ) +{ +Comment: + { + YYTOKEN = YYCURSOR; + + +#line 2607 "" +{ + YYCTYPE yych; + unsigned int yyaccept; + goto yy228; + ++YYCURSOR; +yy228: + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + switch(yych){ + case 0x00: goto yy230; + case 0x0A: goto yy232; + case 0x0D: goto yy233; + default: goto yy235; + } +yy230: ++YYCURSOR; + goto yy231; +yy231: +#line 1091 "token.re" +{ YYCURSOR = YYTOKEN; + return; + } +#line 2629 "" +yy232: yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + goto yy237; +yy233: ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 0x0A: goto yy236; + default: goto yy234; + } +yy234: +#line 1095 "token.re" +{ goto Comment; + } +#line 2642 "" +yy235: yych = *++YYCURSOR; + goto yy234; +yy236: yyaccept = 0; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy237; +yy237: switch(yych){ + case 0x0A: goto yy236; + case 0x0D: goto yy238; + default: goto yy231; + } +yy238: ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 0x0A: goto yy236; + default: goto yy239; + } +yy239: YYCURSOR = YYMARKER; + switch(yyaccept){ + case 0: goto yy231; + } +} +#line 1098 "token.re" + + + } + +} + +char +escape_seq( char ch ) +{ + switch ( ch ) + { + case '0': return '\0'; + case 'a': return 7; + case 'b': return '\010'; + case 'e': return '\033'; + case 'f': return '\014'; + case 'n': return '\n'; + case 'r': return '\015'; + case 't': return '\t'; + case 'v': return '\013'; + default: return ch; + } +} + +int +is_newline( char *ptr ) +{ + return newline_len( ptr ); +} + +int +newline_len( char *ptr ) +{ + if ( *ptr == '\n' ) + return 1; + + if ( *ptr == '\r' && *( ptr + 1 ) == '\n' ) + return 2; + + return 0; +} + +int +syckwrap() +{ + return 1; +} + +void +syckerror( const char *msg ) +{ + if ( syck_parser_ptr->error_handler == NULL ) + syck_parser_ptr->error_handler = syck_default_error_handler; + + syck_parser_ptr->root = syck_parser_ptr->root_on_error; + (syck_parser_ptr->error_handler)(syck_parser_ptr, msg); +} + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/yaml2byte.c b/lib/ruby-1.9.1-rc1/ext/syck/yaml2byte.c new file mode 100644 index 0000000..96656f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/yaml2byte.c @@ -0,0 +1,259 @@ +/* + * yaml2byte.c + * + * $Author: nobu $ + * + * Copyright (C) 2003 why the lucky stiff, clark evans + * + * WARNING WARNING WARNING --- THIS IS *NOT JUST* PLAYING + * ANYMORE! -- WHY HAS EMBRACED THIS AS THE REAL THING! + */ +#include "ruby/ruby.h" +#include +#include +#define YAMLBYTE_UTF8 +#include "yamlbyte.h" + +#include +#define TRACE0(a) \ + do { printf(a); printf("\n"); fflush(stdout); } while(0) +#define TRACE1(a,b) \ + do { printf(a,b); printf("\n"); fflush(stdout); } while(0) +#define TRACE2(a,b,c) \ + do { printf(a,b,c); printf("\n"); fflush(stdout); } while(0) +#define TRACE3(a,b,c,d) \ + do { printf(a,b,c,d); printf("\n"); fflush(stdout); } while(0) + +/* Reinvent the wheel... */ +#define CHUNKSIZE 64 +#define HASH ((long)0xCAFECAFE) +typedef struct { + long hash; + char *buffer; + long length; + long remaining; + int printed; +} bytestring_t; +bytestring_t *bytestring_alloc(void) { + bytestring_t *ret; + /*TRACE0("bytestring_alloc()");*/ + ret = S_ALLOC(bytestring_t); + ret->hash = HASH; + ret->length = CHUNKSIZE; + ret->remaining = ret->length; + ret->buffer = S_ALLOC_N(char, ret->length + 1 ); + ret->buffer[0] = 0; + ret->printed = 0; + return ret; +} +void bytestring_append(bytestring_t *str, char code, + char *start, char *finish) +{ + long grow; + long length = 2; /* CODE + LF */ + char *curr; + assert(str && HASH == str->hash); + /*TRACE0("bytestring_append()");*/ + if(start) { + if(!finish) + finish = start + strlen(start); + length += (finish-start); + } + if(length > str->remaining) { + grow = (length - str->remaining) + CHUNKSIZE; + str->remaining += grow; + str->length += grow; + str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 ); + assert(str->buffer); + } + curr = str->buffer + (str->length - str->remaining); + *curr = code; + curr += 1; + if(start) + while(start < finish) + *curr ++ = *start ++; + *curr = '\n'; + curr += 1; + *curr = 0; + str->remaining = str->remaining - length; + assert( (str->buffer + str->length) - str->remaining ); +} +void bytestring_extend(bytestring_t *str, bytestring_t *ext) +{ + char *from; + char *curr; + char *stop; + long grow; + long length; + assert(str && HASH == str->hash); + assert(ext && HASH == ext->hash); + if(ext->printed) { + assert(ext->buffer[0] ==YAMLBYTE_ANCHOR); + curr = ext->buffer; + while( '\n' != *curr) + curr++; + bytestring_append(str, YAMLBYTE_ALIAS, ext->buffer + 1, curr); + } else { + ext->printed = 1; + length = (ext->length - ext->remaining); + if(length > str->remaining) { + grow = (length - str->remaining) + CHUNKSIZE; + str->remaining += grow; + str->length += grow; + str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 ); + } + curr = str->buffer + (str->length - str->remaining); + from = ext->buffer; + stop = ext->buffer + length; + while( from < stop ) + *curr ++ = *from ++; + *curr = 0; + str->remaining = str->remaining - length; + assert( (str->buffer + str->length) - str->remaining ); + } +} + +/* convert SyckNode into yamlbyte_buffer_t objects */ +SYMID +syck_yaml2byte_handler(p, n) + SyckParser *p; + SyckNode *n; +{ + SYMID oid; + long i; + char ch; + char nextcode; + char *start; + char *current; + char *finish; + bytestring_t *val = NULL; + bytestring_t *sav = NULL; + void *data; + /*TRACE0("syck_yaml2byte_handler()");*/ + val = bytestring_alloc(); + if(n->anchor) bytestring_append(val,YAMLBYTE_ANCHOR, n->anchor, NULL); + if ( n->type_id ) + { + if ( p->taguri_expansion ) + { + bytestring_append(val,YAMLBYTE_TRANSFER, n->type_id, NULL); + } + else + { + char *type_tag = S_ALLOC_N( char, strlen( n->type_id ) + 1 ); + type_tag[0] = '\0'; + strcat( type_tag, "!" ); + strcat( type_tag, n->type_id ); + bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL); + S_FREE(type_tag); + } + } + switch (n->kind) + { + case syck_str_kind: + nextcode = YAMLBYTE_SCALAR; + start = n->data.str->ptr; + finish = start + n->data.str->len - 1; + current = start; + /*TRACE2("SCALAR: %s %d", start, n->data.str->len); */ + while(1) { + ch = *current; + if('\n' == ch || 0 == ch || current > finish) { + if(current >= start) { + bytestring_append(val, nextcode, start, current); + nextcode = YAMLBYTE_CONTINUE; + } + start = current + 1; + if(current > finish) + { + break; + } + else if('\n' == ch ) + { + bytestring_append(val,YAMLBYTE_NEWLINE,NULL,NULL); + } + else if(0 == ch) + { + bytestring_append(val,YAMLBYTE_NULLCHAR,NULL,NULL); + } + else + { + assert("oops"); + } + } + current += 1; + } + break; + case syck_seq_kind: + bytestring_append(val,YAMLBYTE_SEQUENCE,NULL,NULL); + for ( i = 0; i < n->data.list->idx; i++ ) + { + oid = syck_seq_read( n, i ); + if (syck_lookup_sym( p, oid, &data )) sav = data; + bytestring_extend(val, sav); + } + bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL); + break; + case syck_map_kind: + bytestring_append(val,YAMLBYTE_MAPPING,NULL,NULL); + for ( i = 0; i < n->data.pairs->idx; i++ ) + { + oid = syck_map_read( n, map_key, i ); + if (syck_lookup_sym( p, oid, &data )) sav = data; + bytestring_extend(val, sav); + oid = syck_map_read( n, map_value, i ); + if (syck_lookup_sym( p, oid, &data )) sav = data; + bytestring_extend(val, sav); + } + bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL); + break; + } + oid = syck_add_sym( p, (char *) val ); + /*TRACE1("Saving: %s", val->buffer );*/ + return oid; +} + +char * +syck_yaml2byte(char *yamlstr) +{ + SYMID oid; + char *ret; + bytestring_t *sav; + void *data; + + SyckParser *parser = syck_new_parser(); + syck_parser_str_auto( parser, yamlstr, NULL ); + syck_parser_handler( parser, syck_yaml2byte_handler ); + syck_parser_error_handler( parser, NULL ); + syck_parser_implicit_typing( parser, 1 ); + syck_parser_taguri_expansion( parser, 1 ); + oid = syck_parse( parser ); + + if ( syck_lookup_sym( parser, oid, &data ) ) { + sav = data; + ret = S_ALLOC_N( char, strlen( sav->buffer ) + 3 ); + ret[0] = '\0'; + strcat( ret, "D\n" ); + strcat( ret, sav->buffer ); + } + else + { + ret = NULL; + } + + syck_free_parser( parser ); + return ret; +} + +#ifdef TEST_YBEXT +#include +int main() { + char *yaml = "test: 1\nand: \"with new\\nline\\n\"\nalso: &3 three\nmore: *3"; + printf("--- # YAML \n"); + printf(yaml); + printf("\n...\n"); + printf(syck_yaml2byte(yaml)); + return 0; +} +#endif + diff --git a/lib/ruby-1.9.1-rc1/ext/syck/yamlbyte.h b/lib/ruby-1.9.1-rc1/ext/syck/yamlbyte.h new file mode 100644 index 0000000..0fe4e7b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syck/yamlbyte.h @@ -0,0 +1,170 @@ +/* yamlbyte.h + * + * The YAML bytecode "C" interface header file. See the YAML bytecode + * reference for bytecode sequence rules and for the meaning of each + * bytecode. + */ + +#ifndef YAMLBYTE_H +#define YAMLBYTE_H +#include + +/* define what a character is */ +typedef unsigned char yamlbyte_utf8_t; +typedef unsigned short yamlbyte_utf16_t; +#ifdef YAMLBYTE_UTF8 + #ifdef YAMLBYTE_UTF16 + #error Must only define YAMLBYTE_UTF8 or YAMLBYTE_UTF16 + #endif + typedef yamlbyte_utf8_t yamlbyte_char_t; +#else + #ifdef YAMLBYTE_UTF16 + typedef yamlbyte_utf16_t yamlbyte_char_t; + #else + #error Must define YAMLBYTE_UTF8 or YAMLBYTE_UTF16 + #endif +#endif + +/* specify list of bytecodes */ +#define YAMLBYTE_FINISH ((yamlbyte_char_t) 0) +#define YAMLBYTE_DOCUMENT ((yamlbyte_char_t)'D') +#define YAMLBYTE_DIRECTIVE ((yamlbyte_char_t)'V') +#define YAMLBYTE_PAUSE ((yamlbyte_char_t)'P') +#define YAMLBYTE_MAPPING ((yamlbyte_char_t)'M') +#define YAMLBYTE_SEQUENCE ((yamlbyte_char_t)'Q') +#define YAMLBYTE_END_BRANCH ((yamlbyte_char_t)'E') +#define YAMLBYTE_SCALAR ((yamlbyte_char_t)'S') +#define YAMLBYTE_CONTINUE ((yamlbyte_char_t)'C') +#define YAMLBYTE_NEWLINE ((yamlbyte_char_t)'N') +#define YAMLBYTE_NULLCHAR ((yamlbyte_char_t)'Z') +#define YAMLBYTE_ANCHOR ((yamlbyte_char_t)'A') +#define YAMLBYTE_ALIAS ((yamlbyte_char_t)'R') +#define YAMLBYTE_TRANSFER ((yamlbyte_char_t)'T') +/* formatting bytecodes */ +#define YAMLBYTE_COMMENT ((yamlbyte_char_t)'c') +#define YAMLBYTE_INDENT ((yamlbyte_char_t)'i') +#define YAMLBYTE_STYLE ((yamlbyte_char_t)'s') +/* other bytecodes */ +#define YAMLBYTE_LINE_NUMBER ((yamlbyte_char_t)'#') +#define YAMLBYTE_WHOLE_SCALAR ((yamlbyte_char_t)'<') +#define YAMLBYTE_NOTICE ((yamlbyte_char_t)'!') +#define YAMLBYTE_SPAN ((yamlbyte_char_t)')') +#define YAMLBYTE_ALLOC ((yamlbyte_char_t)'@') + +/* second level style bytecodes, ie "s>" */ +#define YAMLBYTE_FLOW ((yamlbyte_char_t)'>') +#define YAMLBYTE_LITERAL ((yamlbyte_char_t)'|') +#define YAMLBYTE_BLOCK ((yamlbyte_char_t)'b') +#define YAMLBYTE_PLAIN ((yamlbyte_char_t)'p') +#define YAMLBYTE_INLINE_MAPPING ((yamlbyte_char_t)'{') +#define YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[') +#define YAMLBYTE_SINGLE_QUOTED ((yamlbyte_char_t)39) +#define YAMLBYTE_DOUBLE_QUOTED ((yamlbyte_char_t)'"') + +/* + * The "C" API has two variants, one based on instructions, + * with events delivered via pointers; and the other one + * is character based where one or more instructions are + * serialized into a buffer. + * + * Note: In the instruction based API, WHOLE_SCALAR does + * not have the ' + * + * $RoughId: syslog.c,v 1.21 2002/02/25 12:21:17 knu Exp $ + * $Id: syslog.c 18530 2008-08-12 09:35:12Z knu $ + */ + +#include "ruby/ruby.h" +#include "ruby/util.h" +#include + +/* Syslog class */ +static VALUE mSyslog, mSyslogConstants; +static const char *syslog_ident = NULL; +static int syslog_options = -1, syslog_facility = -1, syslog_mask = -1; +static int syslog_opened = 0; + +/* Package helper routines */ +static void syslog_write(int pri, int argc, VALUE *argv) +{ + VALUE str; + + rb_secure(4); + if (argc < 1) { + rb_raise(rb_eArgError, "no log message supplied"); + } + + if (!syslog_opened) { + rb_raise(rb_eRuntimeError, "must open syslog before write"); + } + + str = rb_f_sprintf(argc, argv); + + syslog(pri, "%s", RSTRING_PTR(str)); +} + +/* Syslog module methods */ +static VALUE mSyslog_close(VALUE self) +{ + rb_secure(4); + if (!syslog_opened) { + rb_raise(rb_eRuntimeError, "syslog not opened"); + } + + closelog(); + + free((void *)syslog_ident); + syslog_ident = NULL; + syslog_options = syslog_facility = syslog_mask = -1; + syslog_opened = 0; + + return Qnil; +} + +static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self) +{ + VALUE ident, opt, fac; + + if (syslog_opened) { + rb_raise(rb_eRuntimeError, "syslog already open"); + } + + rb_scan_args(argc, argv, "03", &ident, &opt, &fac); + + if (NIL_P(ident)) { + ident = rb_gv_get("$0"); + } + SafeStringValue(ident); + syslog_ident = strdup(RSTRING_PTR(ident)); + + if (NIL_P(opt)) { + syslog_options = LOG_PID | LOG_CONS; + } else { + syslog_options = NUM2INT(opt); + } + + if (NIL_P(fac)) { + syslog_facility = LOG_USER; + } else { + syslog_facility = NUM2INT(fac); + } + + openlog(syslog_ident, syslog_options, syslog_facility); + + syslog_opened = 1; + + setlogmask(syslog_mask = setlogmask(0)); + + /* be like File.new.open {...} */ + if (rb_block_given_p()) { + rb_ensure(rb_yield, self, mSyslog_close, self); + } + + return self; +} + +static VALUE mSyslog_reopen(int argc, VALUE *argv, VALUE self) +{ + mSyslog_close(self); + + return mSyslog_open(argc, argv, self); +} + +static VALUE mSyslog_isopen(VALUE self) +{ + return syslog_opened ? Qtrue : Qfalse; +} + +static VALUE mSyslog_ident(VALUE self) +{ + return syslog_opened ? rb_str_new2(syslog_ident) : Qnil; +} + +static VALUE mSyslog_options(VALUE self) +{ + return syslog_opened ? INT2NUM(syslog_options) : Qnil; +} + +static VALUE mSyslog_facility(VALUE self) +{ + return syslog_opened ? INT2NUM(syslog_facility) : Qnil; +} + +static VALUE mSyslog_get_mask(VALUE self) +{ + return syslog_opened ? INT2NUM(syslog_mask) : Qnil; +} + +static VALUE mSyslog_set_mask(VALUE self, VALUE mask) +{ + rb_secure(4); + if (!syslog_opened) { + rb_raise(rb_eRuntimeError, "must open syslog before setting log mask"); + } + + setlogmask(syslog_mask = NUM2INT(mask)); + + return mask; +} + +static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self) +{ + VALUE pri; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2+)", argc); + } + + argc--; + pri = *argv++; + + if (!FIXNUM_P(pri)) { + rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri))); + } + + syslog_write(FIX2INT(pri), argc, argv); + + return self; +} + +static VALUE mSyslog_inspect(VALUE self) +{ + char buf[1024]; + + if (syslog_opened) { + snprintf(buf, sizeof(buf), + "<#%s: opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>", + rb_class2name(self), + syslog_ident, + syslog_options, + syslog_facility, + syslog_mask); + } else { + snprintf(buf, sizeof(buf), + "<#%s: opened=false>", rb_class2name(self)); + } + + return rb_str_new2(buf); +} + +static VALUE mSyslog_instance(VALUE self) +{ + return self; +} + +#define define_syslog_shortcut_method(pri, name) \ +static VALUE mSyslog_##name(int argc, VALUE *argv, VALUE self) \ +{ \ + syslog_write(pri, argc, argv); \ +\ + return self; \ +} + +#ifdef LOG_EMERG +define_syslog_shortcut_method(LOG_EMERG, emerg) +#endif +#ifdef LOG_ALERT +define_syslog_shortcut_method(LOG_ALERT, alert) +#endif +#ifdef LOG_CRIT +define_syslog_shortcut_method(LOG_CRIT, crit) +#endif +#ifdef LOG_ERR +define_syslog_shortcut_method(LOG_ERR, err) +#endif +#ifdef LOG_WARNING +define_syslog_shortcut_method(LOG_WARNING, warning) +#endif +#ifdef LOG_NOTICE +define_syslog_shortcut_method(LOG_NOTICE, notice) +#endif +#ifdef LOG_INFO +define_syslog_shortcut_method(LOG_INFO, info) +#endif +#ifdef LOG_DEBUG +define_syslog_shortcut_method(LOG_DEBUG, debug) +#endif + +static VALUE mSyslogConstants_LOG_MASK(VALUE klass, VALUE pri) +{ + return INT2FIX(LOG_MASK(NUM2INT(pri))); +} + +static VALUE mSyslogConstants_LOG_UPTO(VALUE klass, VALUE pri) +{ + return INT2FIX(LOG_UPTO(NUM2INT(pri))); +} + +/* Init for package syslog */ +void Init_syslog() +{ + mSyslog = rb_define_module("Syslog"); + + mSyslogConstants = rb_define_module_under(mSyslog, "Constants"); + + rb_include_module(mSyslog, mSyslogConstants); + + rb_define_module_function(mSyslog, "open", mSyslog_open, -1); + rb_define_module_function(mSyslog, "reopen", mSyslog_reopen, -1); + rb_define_module_function(mSyslog, "open!", mSyslog_reopen, -1); + rb_define_module_function(mSyslog, "opened?", mSyslog_isopen, 0); + + rb_define_module_function(mSyslog, "ident", mSyslog_ident, 0); + rb_define_module_function(mSyslog, "options", mSyslog_options, 0); + rb_define_module_function(mSyslog, "facility", mSyslog_facility, 0); + + rb_define_module_function(mSyslog, "log", mSyslog_log, -1); + rb_define_module_function(mSyslog, "close", mSyslog_close, 0); + rb_define_module_function(mSyslog, "mask", mSyslog_get_mask, 0); + rb_define_module_function(mSyslog, "mask=", mSyslog_set_mask, 1); + + rb_define_module_function(mSyslog, "LOG_MASK", mSyslogConstants_LOG_MASK, 1); + rb_define_module_function(mSyslog, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1); + + rb_define_module_function(mSyslog, "inspect", mSyslog_inspect, 0); + rb_define_module_function(mSyslog, "instance", mSyslog_instance, 0); + + rb_define_module_function(mSyslogConstants, "LOG_MASK", mSyslogConstants_LOG_MASK, 1); + rb_define_module_function(mSyslogConstants, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1); + +#define rb_define_syslog_const(id) \ + rb_define_const(mSyslogConstants, #id, INT2NUM(id)) + + /* Various options when opening log */ +#ifdef LOG_PID + rb_define_syslog_const(LOG_PID); +#endif +#ifdef LOG_CONS + rb_define_syslog_const(LOG_CONS); +#endif +#ifdef LOG_ODELAY + rb_define_syslog_const(LOG_ODELAY); /* deprecated */ +#endif +#ifdef LOG_NDELAY + rb_define_syslog_const(LOG_NDELAY); +#endif +#ifdef LOG_NOWAIT + rb_define_syslog_const(LOG_NOWAIT); /* deprecated */ +#endif +#ifdef LOG_PERROR + rb_define_syslog_const(LOG_PERROR); +#endif + + /* Various syslog facilities */ +#ifdef LOG_AUTH + rb_define_syslog_const(LOG_AUTH); +#endif +#ifdef LOG_AUTHPRIV + rb_define_syslog_const(LOG_AUTHPRIV); +#endif +#ifdef LOG_CONSOLE + rb_define_syslog_const(LOG_CONSOLE); +#endif +#ifdef LOG_CRON + rb_define_syslog_const(LOG_CRON); +#endif +#ifdef LOG_DAEMON + rb_define_syslog_const(LOG_DAEMON); +#endif +#ifdef LOG_FTP + rb_define_syslog_const(LOG_FTP); +#endif +#ifdef LOG_KERN + rb_define_syslog_const(LOG_KERN); +#endif +#ifdef LOG_LPR + rb_define_syslog_const(LOG_LPR); +#endif +#ifdef LOG_MAIL + rb_define_syslog_const(LOG_MAIL); +#endif +#ifdef LOG_NEWS + rb_define_syslog_const(LOG_NEWS); +#endif +#ifdef LOG_NTP + rb_define_syslog_const(LOG_NTP); +#endif +#ifdef LOG_SECURITY + rb_define_syslog_const(LOG_SECURITY); +#endif +#ifdef LOG_SYSLOG + rb_define_syslog_const(LOG_SYSLOG); +#endif +#ifdef LOG_USER + rb_define_syslog_const(LOG_USER); +#endif +#ifdef LOG_UUCP + rb_define_syslog_const(LOG_UUCP); +#endif +#ifdef LOG_LOCAL0 + rb_define_syslog_const(LOG_LOCAL0); +#endif +#ifdef LOG_LOCAL1 + rb_define_syslog_const(LOG_LOCAL1); +#endif +#ifdef LOG_LOCAL2 + rb_define_syslog_const(LOG_LOCAL2); +#endif +#ifdef LOG_LOCAL3 + rb_define_syslog_const(LOG_LOCAL3); +#endif +#ifdef LOG_LOCAL4 + rb_define_syslog_const(LOG_LOCAL4); +#endif +#ifdef LOG_LOCAL5 + rb_define_syslog_const(LOG_LOCAL5); +#endif +#ifdef LOG_LOCAL6 + rb_define_syslog_const(LOG_LOCAL6); +#endif +#ifdef LOG_LOCAL7 + rb_define_syslog_const(LOG_LOCAL7); +#endif + +#define rb_define_syslog_shortcut(name) \ + rb_define_module_function(mSyslog, #name, mSyslog_##name, -1) + + /* Various syslog priorities and the shortcut methods */ +#ifdef LOG_EMERG + rb_define_syslog_const(LOG_EMERG); + rb_define_syslog_shortcut(emerg); +#endif +#ifdef LOG_ALERT + rb_define_syslog_const(LOG_ALERT); + rb_define_syslog_shortcut(alert); +#endif +#ifdef LOG_CRIT + rb_define_syslog_const(LOG_CRIT); + rb_define_syslog_shortcut(crit); +#endif +#ifdef LOG_ERR + rb_define_syslog_const(LOG_ERR); + rb_define_syslog_shortcut(err); +#endif +#ifdef LOG_WARNING + rb_define_syslog_const(LOG_WARNING); + rb_define_syslog_shortcut(warning); +#endif +#ifdef LOG_NOTICE + rb_define_syslog_const(LOG_NOTICE); + rb_define_syslog_shortcut(notice); +#endif +#ifdef LOG_INFO + rb_define_syslog_const(LOG_INFO); + rb_define_syslog_shortcut(info); +#endif +#ifdef LOG_DEBUG + rb_define_syslog_const(LOG_DEBUG); + rb_define_syslog_shortcut(debug); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/ext/syslog/syslog.txt b/lib/ruby-1.9.1-rc1/ext/syslog/syslog.txt new file mode 100644 index 0000000..b49dc75 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syslog/syslog.txt @@ -0,0 +1,124 @@ +.\" syslog.txt - -*- Indented-Text -*- +$RoughId: syslog.txt,v 1.18 2002/02/25 08:20:14 knu Exp $ +$Id: syslog.txt 15821 2008-03-21 12:15:06Z knu $ + +UNIX Syslog extension for Ruby +Amos Gouaux, University of Texas at Dallas + +& +Akinori MUSHA + + +Contact: + - Akinori MUSHA (current maintainer) + +** Syslog(Module) + +Included Modules: Syslog::Constants + +require 'syslog' + +A Simple wrapper for the UNIX syslog system calls that might be handy +if you're writing a server in Ruby. For the details of the syslog(8) +architecture and constants, see the syslog(3) manual page of your +platform. + +Module Methods: + + open(ident = $0, logopt = Syslog::LOG_PID | Syslog::LOG_CONS, + facility = Syslog::LOG_USER) [{ |syslog| ... }] + + Opens syslog with the given options and returns the module + itself. If a block is given, calls it with an argument of + itself. If syslog is already opened, raises RuntimeError. + + Example: + Syslog.open('ftpd', Syslog::LOG_PID | Syslog::LOG_NDELAY, + Syslog::LOG_FTP) + + open!(ident = $0, logopt = Syslog::LOG_PID | Syslog::LOG_CONS, + facility = Syslog::LOG_USER) + reopen(ident = $0, logopt = Syslog::LOG_PID | Syslog::LOG_CONS, + facility = Syslog::LOG_USER) + + Same as open, but does a close first. + + opened? + + Returns true if syslog opened, otherwise false. + + ident + options + facility + + Returns the parameters given in the last open, respectively. + Every call of Syslog::open resets these values. + + log(pri, message, ...) + + Writes message to syslog. + + Example: + Syslog.log(Syslog::LOG_CRIT, "the sky is falling in %d seconds!", 10) + + crit(message, ...) + emerg(message, ...) + alert(message, ...) + err(message, ...) + warning(message, ...) + notice(message, ...) + info(message, ...) + debug(message, ...) + + These are shortcut methods of Syslog::log(). The lineup may + vary depending on what priorities are defined on your system. + + Example: + Syslog.crit("the sky is falling in %d seconds!", 5) + + mask + mask=(mask) + + Returns or sets the log priority mask. The value of the mask + is persistent and will not be reset by Syslog::open or + Syslog::close. + + Example: + Syslog.mask = Syslog::LOG_UPTO(Syslog::LOG_ERR) + + close + + Closes syslog. + + inspect + + Returns the "inspect" string of the Syslog module. + + instance + + Returns the module itself. (Just for backward compatibility) + + LOG_MASK(pri) + + Creates a mask for one priority. + + LOG_UPTO(pri) + + Creates a mask for all priorities up to pri. + +** Syslog::Constants(Module) + +require 'syslog' +include Syslog::Constants + +This module includes the LOG_* constants available on the system. + +Module Methods: + + LOG_MASK(pri) + + Creates a mask for one priority. + + LOG_UPTO(pri) + + Creates a mask for all priorities up to pri. diff --git a/lib/ruby-1.9.1-rc1/ext/syslog/test.rb b/lib/ruby-1.9.1-rc1/ext/syslog/test.rb new file mode 100644 index 0000000..a200280 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/syslog/test.rb @@ -0,0 +1,164 @@ +#!/usr/bin/env ruby +# $RoughId: test.rb,v 1.9 2002/02/25 08:20:14 knu Exp $ +# $Id: test.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +# Please only run this test on machines reasonable for testing. +# If in doubt, ask your admin. + +require 'test/unit' + +# Prepend current directory to load path for testing. +$:.unshift('.') + +require 'syslog' + +class TestSyslog < Test::Unit::TestCase + def test_new + assert_raises(NoMethodError) { + Syslog.new + } + end + + def test_instance + sl1 = Syslog.instance + sl2 = Syslog.open + sl3 = Syslog.instance + + assert_equal(Syslog, sl1) + assert_equal(Syslog, sl2) + assert_equal(Syslog, sl3) + ensure + Syslog.close if Syslog.opened? + end + + def test_open + # default parameters + Syslog.open + + assert_equal($0, Syslog.ident) + assert_equal(Syslog::LOG_PID | Syslog::LOG_CONS, Syslog.options) + assert_equal(Syslog::LOG_USER, Syslog.facility) + + # open without close + assert_raises(RuntimeError) { + Syslog.open + } + + Syslog.close + + # given parameters + Syslog.open("foo", Syslog::LOG_NDELAY | Syslog::LOG_PERROR, Syslog::LOG_DAEMON) + + assert_equal('foo', Syslog.ident) + assert_equal(Syslog::LOG_NDELAY | Syslog::LOG_PERROR, Syslog.options) + assert_equal(Syslog::LOG_DAEMON, Syslog.facility) + + Syslog.close + + # default parameters again (after close) + Syslog.open + Syslog.close + + assert_equal(nil, Syslog.ident) + assert_equal(nil, Syslog.options) + assert_equal(nil, Syslog.facility) + + # block + param = nil + Syslog.open { |param| } + assert_equal(Syslog, param) + ensure + Syslog.close if Syslog.opened? + end + + def test_opened? + assert_equal(false, Syslog.opened?) + + Syslog.open + assert_equal(true, Syslog.opened?) + + Syslog.close + assert_equal(false, Syslog.opened?) + + Syslog.open { + assert_equal(true, Syslog.opened?) + } + + assert_equal(false, Syslog.opened?) + end + + def test_close + assert_raises(RuntimeError) { + Syslog.close + } + end + + def test_mask + assert_equal(nil, Syslog.mask) + + Syslog.open + + orig = Syslog.mask + + Syslog.mask = Syslog.LOG_UPTO(Syslog::LOG_ERR) + assert_equal(Syslog.LOG_UPTO(Syslog::LOG_ERR), Syslog.mask) + + Syslog.mask = Syslog.LOG_MASK(Syslog::LOG_CRIT) + assert_equal(Syslog.LOG_MASK(Syslog::LOG_CRIT), Syslog.mask) + + Syslog.mask = orig + ensure + Syslog.close if Syslog.opened? + end + + def test_log + stderr = IO::pipe + + pid = fork { + stderr[0].close + STDERR.reopen(stderr[1]) + stderr[1].close + + options = Syslog::LOG_PERROR | Syslog::LOG_NDELAY + + Syslog.open("syslog_test", options) { |sl| + sl.log(Syslog::LOG_NOTICE, "test1 - hello, %s!", "world") + sl.notice("test1 - hello, %s!", "world") + } + + Syslog.open("syslog_test", options | Syslog::LOG_PID) { |sl| + sl.log(Syslog::LOG_CRIT, "test2 - pid") + sl.crit("test2 - pid") + } + exit! + } + + stderr[1].close + Process.waitpid(pid) + + # LOG_PERROR is not yet implemented on Cygwin. + return if RUBY_PLATFORM =~ /cygwin/ + + 2.times { + assert_equal("syslog_test: test1 - hello, world!\n", stderr[0].gets) + } + + 2.times { + assert_equal(format("syslog_test[%d]: test2 - pid\n", pid), stderr[0].gets) + } + end + + def test_inspect + Syslog.open { |sl| + assert_equal(format('<#%s: opened=true, ident="%s", options=%d, facility=%d, mask=%d>', + Syslog, + sl.ident, + sl.options, + sl.facility, + sl.mask), + sl.inspect) + } + + assert_equal(format('<#%s: opened=false>', Syslog), Syslog.inspect) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/.cvsignore b/lib/ruby-1.9.1-rc1/ext/tk/.cvsignore new file mode 100644 index 0000000..90c83ed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/.cvsignore @@ -0,0 +1,3 @@ +Makefile +*.log +*.def diff --git a/lib/ruby-1.9.1-rc1/ext/tk/ChangeLog.tkextlib b/lib/ruby-1.9.1-rc1/ext/tk/ChangeLog.tkextlib new file mode 100644 index 0000000..fc919a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/ChangeLog.tkextlib @@ -0,0 +1,935 @@ +Tue Nov 25 03:37:42 2008 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/blt/tabset.rb, + ext/tk/lib/tkextlib/blt/tabnotebook.rb: + fix many bugs. Now, those work properly. + +Sat Nov 22 10:31:25 2008 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb: + fix NameError bug. + +2008-05-12 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/tkDND/shape.rb: wrong package name. + +--------------< ... some changes ... >------------------ + +2007-05-26 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/tcllib/tablelist.rb: fix typo. + + * ext/tk/lib/tkextlib/tile/dialog.rb: forget to give an argument. + + * ext/tk/lib/tkextlib/version.rb: update RELEASE_DATE. + +2007-01-26 Hidetoshi NAGAI + + * ext/tk/lib/tkextlib/iwidgets/checkbox.rb: wrong number of arguments + [ruby-Bugs-7776]. + + * ext/tk/lib/tkextlib/iwidgets/radiobox.rb: ditto. + + * ext/tk/lib/tkextlib/blt/tile/checkbutton.rb: change primary name + of class [ruby-dev:30080]. + + * ext/tk/lib/tkextlib/blt/tile/radiobutton.rb: ditto. + +2006-11-07 Hidetoshi NAGAI + + * lib/tkextlib/tile/treeview.rb : minor bug fix. + + * lib/tkextlib/blt/table.rb: fix bugs which forbade use of + '::blt::table' command. Now, probably, it'll works properly. + +2006-11-06 Hidetoshi NAGAI + + * lib/tkextlib/version.rb: keep release date of tkextlib on + "Tk::Tkextlib_RELEASE_DATE". + + * lib/tkextlib/tile/treeview.rb : support Tile 0.7.8. + Now, you can handle tree items as objects. + +2006-10-04 Hidetoshi NAGAI + + * lib/tkextlib/tile.rb, lib/tkextlib/tile/* : support Tile 0.7.6. + +2006-10-03 Hidetoshi NAGAI + + * lib/tkextlib/SUPPORT_STATUS: [ruby-talk:211939] check links + of extensions. + + * lib/tkextlib/blt/container.rb: define instance methods properly. + + * lib/tkextlib/tile/tcombobox.rb: bug fix [ruby-talk:213003]. + + * lib/tkextlib/tile/tnotebook.rb: ditto. + + * lib/tkextlib/tile/treeview.rb: ditto. + + * lib/tkextlib/tile/sizegrip.rb: [new] add 'ttk::sizegrip' widget. + +2006-08-31 Hidetoshi NAGAI + + * lib/tkextlib/blt.rb: double dashes (--) option doesn't work + properly on some versions of BLT (wrong description on the + manual of `blt::bgexec'?). + +2005-12-11 Hidetoshi NAGAI + + * lib/tkextlib/SUPPORT_STATUS: update to support libraries in + ActiveTcl8.4.12.0. + + * lib/tkextlib/tile/tnotebook.rb: add Tk::Tile::TNotebook#insert. + + * sample/tkextlib/tile/demo.rb: improve the look of a part of the demo. + +2005-11-25 Hidetoshi NAGAI + + * sample/tkextlib/tile/demo.rb: bug fix + + * sample/tkextlib/tile/themes/*: add some themes (blue, + keramik, and plastik; require Tile-0.5 or later). + +2005-11-22 Hidetoshi NAGAI + + * lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE + is not defined). + +2005-11-19 Hidetoshi NAGAI + + * sample/tkextlib/treectrl/demo.rb: remove dependency on Ruby's + version (1.8 or 1.9). + +2005-10-23 Hidetoshi NAGAI + + * lib/tkextlib/*: update to support ActiveTcl8.4.11.2 + + * lib/tkextlib/trofs/*: support Trofs 0.4.3 + + * lib/tkextlib/tile/*: support Tile 0.7.2 + + * lib/tkextlib/vu/*: support vu 2.3.0 + + * lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3 part only) + + * lib/tkextlib/*: improve conversion of option values + +2005-10-04 Hidetoshi NAGAI + + * lib/tkextlib/tktable/tktable.rb: border_* instance methods + don't call 'border' subcommands. + +2005-08-10 Hidetoshi NAGAI + + * lib/tkextlib/blt/component.rb: didn't check + __item_ruby2val_optkeys(). + +2005-08-09 Hidetoshi NAGAI + + * lib/tkextlib/blt/barchart.rb: support to treat tkvariable-type + configure options. + + * lib/tkextlib/blt/component.rb: ditto. + + * lib/tkextlib/blt/dragdrop.rb: ditto. + + * lib/tkextlib/blt/treeview.rb: ditto. + + * lib/tkextlib/bwidget/button.rb: ditto. + + * lib/tkextlib/bwidget/entry.rb: ditto. + + * lib/tkextlib/bwidget/label.rb: ditto. + + * lib/tkextlib/bwidget/labelentry.rb: ditto. + + * lib/tkextlib/bwidget/labelframe.rb: ditto. + + * lib/tkextlib/bwidget/mainframe.rb: ditto. + + * lib/tkextlib/bwidget/passwddlg.rb: ditto. + + * lib/tkextlib/bwidget/spinbox.rb: ditto. + + * lib/tkextlib/bwidget/tree.rb: ditto. + + * lib/tkextlib/iwidgets/calendar.rb: ditto. + + * lib/tkextlib/iwidgets/entryfield.rb: ditto. + + * lib/tkextlib/iwidgets/hierarchy.rb: ditto. + + * lib/tkextlib/iwidgets/labeledframe.rb: ditto. + + * lib/tkextlib/iwidgets/labeledwidget.rb: ditto. + + * lib/tkextlib/iwidgets/menubar.rb: ditto. + + * lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto. + + * lib/tkextlib/iwidgets/spinner.rb: ditto. + + * lib/tkextlib/iwidgets/toolbar.rb: ditto. + + * lib/tkextlib/tkimg/pixmap.rb: ditto. + + * lib/tkextlib/tktable/tktable.rb: ditto. + +2005-08-06 ocean + + * sample/tkextlib/tile/demo.rb: use Tk::Tile::Scale#variable. + +2005-08-04 ocean + + * sample/tkextlib/tile/demo.rb: followed previous changes. + +2005-08-04 Hidetoshi NAGAI + + * lib/tkextlib/tile/t*.rb: aliased class names starting with 'T' + to non 'T' ones. (ie. Tk::Tile::TButton -> Tk::Tile::Button) + [ruby-dev:26724] + + * lib/tkextlib/tile.rb: ditto. (autoload support) + +2005-08-04 ocean + + * sample/tkextlib/tile/demo.rb: fixed: Tk::Tile::TProgressbar is + supported on tile 0.6 or later, not tile 0.5. + + * sample/tkextlib/tile/demo.rb: updated scales demo to use + Tk::Tile::TProgressbar for tile 0.6 or later. + + * sample/tkextlib/tile/demo.rb: set some TkVariable default values. + +2005-08-03 Hidetoshi NAGAI + + * lib/tkextlib/tile/treeview.rb: Tk::Tile::Treeview#headingconfigure + is now working and more. [ruby-dev:26716] + + * sample/tkextlib/tile/demo.rb: use Tk::Tile::Treeview#headingconfigure instead of direct Tk.tk_call. + +2005-08-02 ocean + + * lib/tkextlib/tile/tprogressbar.rb: Tk::Tile::TProgressbar#start + takes optional argument `interval'. + + * sample/tkextlib/tile/demo.rb: emulate Tk::Tile::TProgressbar + with Tk::Tile::TProgress in tile 0.4. (repeating buttons demo) + +2005-08-02 ocean + + * sample/tkextlib/tile/demo.rb: added repeating buttons demo. + + * sample/tkextlib/tile/repeater.tcl: ditto. (new file) + +2005-08-01 ocean + + * lib/tkextlib/tile.rb: fixed autoload for Treeview. + + * lib/tkextlib/tile/treeview.rb: replaced `ary2tk_list(items)' with + `*items'. + + * sample/tkextlib/tile/demo.rb: added treeview demo. (tile 0.5 or + later is required) [ruby-dev:26668] + +2005-08-01 ocean + + * sample/tkextlib/tile/demo.rb: added combobox demo. + +2005-07-27 ocean + + * sample/tkextlib/tile/demo.rb: fixed typo. + +2005-06-16 Hidetoshi NAGAI + + * lib/tkextlib/SUPPOPRT_STATUS: add RELEASE_DATE information. + + * lib/tkextlib/tile/style.rb: add "style element options " + command support. + +2005-06-08 Hidetoshi NAGAI + + * lib/tkextlib/ICONS/icons.rb: fail to create instances of + Tk::ICONS [ruby-dev:26305]. + +2005-06-07 ocean + + * sample/tkextlib/tile/themes/kroc.{rb,tcl}: also support tile 0.4. + +2005-06-07 ocean + + * sample/tkextlib/tile/themes/kroc.{rb,tcl}: support tile 0.5 or later. + ("pixmap" element constructor replaced by "image") + +2005-06-05 Hidetoshi NAGAI + + * sample/tkextlib/tile/demo.rb: fix TypeError & create Console + +2005-05-30 Hidetoshi NAGAI + + * lib/tkextlib/blt.rb: add PACKAGE_NAME information of Tcl/Tk + Extension. + + * lib/tkextlib/bwidget.rb: ditto. + + * lib/tkextlib/iwidgets.rb: ditto. + + * lib/tkextlib/tile.rb: ditto. + + * lib/tkextlib/tkimg.rb: ditto. + + * lib/tkextlib/vu.rb: ditto. + + * lib/tkextlib/ICONS/icons.rb: ditto. + + * lib/tkextlib/itcl/incr_tcl.rb: ditto. + + * lib/tkextlib/itk/incr_tk.rb: ditto. + + * lib/tkextlib/tcllib/autoscroll.rb: ditto. + + * lib/tkextlib/tcllib/ctext.rb: ditto. + + * lib/tkextlib/tcllib/cursor.rb: ditto. + + * lib/tkextlib/tcllib/datefield.rb: ditto. + + * lib/tkextlib/tcllib/ico.rb: ditto. + + * lib/tkextlib/tcllib/ip_entry.rb: ditto. + + * lib/tkextlib/tcllib/plotchart.rb: ditto. + + * lib/tkextlib/tcllib/style.rb: ditto. + + * lib/tkextlib/tcllib/tkpiechart.rb: ditto. + + * lib/tkextlib/tclx/tclx.rb: ditto. + + * lib/tkextlib/tkDND/shape.rb: ditto. + + * lib/tkextlib/tkDND/tkdnd.rb: ditto. + + * lib/tkextlib/tkHTML/htmlwidget.rb: ditto. + + * lib/tkextlib/tkimg/bmp.rb: ditto. + + * lib/tkextlib/tkimg/gif.rb: ditto. + + * lib/tkextlib/tkimg/ico.rb: ditto. + + * lib/tkextlib/tkimg/jpeg.rb: ditto. + + * lib/tkextlib/tkimg/pcx.rb: ditto. + + * lib/tkextlib/tkimg/pixmap.rb: ditto. + + * lib/tkextlib/tkimg/png.rb: ditto. + + * lib/tkextlib/tkimg/ppm.rb: ditto. + + * lib/tkextlib/tkimg/ps.rb: ditto. + + * lib/tkextlib/tkimg/sgi.rb: ditto. + + * lib/tkextlib/tkimg/sun.rb: ditto. + + * lib/tkextlib/tkimg/tga.rb: ditto. + + * lib/tkextlib/tkimg/tiff.rb: ditto. + + * lib/tkextlib/tkimg/window.rb: ditto. + + * lib/tkextlib/tkimg/xbm.rb: ditto. + + * lib/tkextlib/tkimg/xpm.rb: ditto. + + * lib/tkextlib/tktable/tktable.rb: ditto. + + * lib/tkextlib/tktrans/tktrans.rb: ditto. + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto. + + * lib/tkextlib/winico/winico.rb: ditto. + +2005-05-25 Hidetoshi NAGAI + + * lib/tkextlib/iwidgets/scrolledlistbox.rb: follow the change + of tk.rb. modify to attend encoding. + + * lib/tkextlib/iwidgets/scrolledtext.rb: ditto. + + * lib/tkextlib/iwidgets/scrolledcanvas.rb: bug fix on + TkCanvas#delete when given non-TkcItem arguments. + +2005-05-10 Hidetoshi NAGAI + + * lib/tkextlib/blt/winop.rb: fix typo + +2005-05-08 Hidetoshi NAGAI + + * lib/tkextlib/vu/pie.rb: fix typo + +2005-04-10 ocean + + * sample/tkextlib/treectrl/mailwasher.rb: fixed typo. [ruby-dev:26008] + +2005-04-09 Hidetoshi NAGAI + + * sample/tkextlib/tile/demo.rb: new demo of Tile extension. + + * sample/tkextlib/tile/iconlib.tcl: part of the demo. + + * sample/tkextlib/tile/toolbutton.tcl: ditto. + + * sample/tkextlib/tile/readme.txt: document of the demo. + + * sample/tkextlib/tile/Orig_LICENSE.txt: ditto. + + * sample/tkextlib/tile/themes/kroc.tcl: sample theme written with Tcl. + + * sample/tkextlib/tile/themes/pkgIndex.tcl: pkgIndex of kroc.tcl. + + * sample/tkextlib/tile/themes/kroc.rb: Kroc theme written with Ruby. + + * sample/tkextlib/tile/themes/kroc/button-h.gif: images for Kroc theme. + + * sample/tkextlib/tile/themes/kroc/button-n.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/button-p.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/check-hc.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/check-hu.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/check-nc.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/check-nu.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/radio-hc.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/radio-hu.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/radio-nc.gif: ditto. + + * sample/tkextlib/tile/themes/kroc/radio-nu.gif: ditto. + + * lib/tkextlib/tile.rb: bug fix (tested on the new demo). + + * lib/tkextlib/tile/style.rb: ditto. + + * lib/tkextlib/tile/tbutton.rb: ditto. + + * lib/tkextlib/tile/tcheckbutton.rb: ditto. + + * lib/tkextlib/tile/tcombobox.rb: ditto. + + * lib/tkextlib/tile/tentry.rb: ditto. + + * lib/tkextlib/tile/tframe.rb: ditto. + + * lib/tkextlib/tile/tlabel.rb: ditto. + + * lib/tkextlib/tile/tlabelframe.rb: ditto. + + * lib/tkextlib/tile/tmenubutton.rb: ditto. + + * lib/tkextlib/tile/tnotebook.rb: ditto. + + * lib/tkextlib/tile/tprogressbar.rb: ditto. + + * lib/tkextlib/tile/tradiobutton.rb: ditto. + + * lib/tkextlib/tile/treeview.rb: ditto. + + * lib/tkextlib/tile/tscrollbar.rb: ditto. + + * lib/tkextlib/tile/tseparator.rb: ditto. + + * lib/tkextlib/tile/tsquare.rb: ditto. + + * lib/tkextlib/tile/tpaned.rb: new library + + * lib/tkextlib/tile/tscale.rb: ditto. + + * lib/tkextlib/SUPPORT_STATUS: update support status of Tile extension. + + * lib/tkextlib/tcllib/ctext.rb: use TkCommandNames on create_self(). + + * lib/tkextlib/tcllib/datefield.rb: ditto. + + * lib/tkextlib/tcllib/ip_entry.rb: ditto. + + * lib/tkextlib/tkHTML/htmlwidget.rb: ditto. + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto. + +2005-04-09 ocean + + * sample/tkextlib/treectrl/explorer.rb: File.executable? returns true + even if it's plain text file. (this function only checks access right) + +2005-04-09 ocean + + * sample/tkextlib/treectrl/{help,www-options}.rb: fixed typo. + (click or resize column header) + +2005-04-09 ocean + + * sample/tkextlib/treectrl/imovie.rb: fixed typo. (click on clip title) + +2005-04-08 ocean + + * sample/tkextlib/treectrl/random.rb: fixed typo. (drop node outside of + widget, or reenter widget while draggging) + +2005-04-08 ocean + + * sample/tkextlib/treectrl/outlook-newgrounp.rb: image had disappered when + node was selected. + +2005-04-08 ocean + + * sample/tkextlib/treectrl/{random,outlook-newgroup}.rb: + tk::treectrl uses 'afterId' not 'afterID'. + + * sample/tkextlib/treectrl/{random,outlook-newgroup}.rb: + item_firstchild can return empty string. (drop node to leaf node) + + * sample/tkextlib/treectrl/random.rb: Enumerable#find didn't work properly + because tried to compare String with Integer. (drag node and leave widget) + + * sample/tkextlib/treectrl/random.rb: and some fixes. + +2005-04-08 ocean + + * lib/tkextlib/treectrl/tktreectrl.rb (selection_clear): fixed typo. + + * sample/tkextlib/treectrl/random.rb: node deselection now works. + + * sample/tkextlib/treectrl/demo.rb: fixed typo. (popup menu on column header) + +2005-04-08 ocean + + * sample/tkextlib/treectrl/help.rb: fixed typo. (wrong color) + +2005-04-08 ocean + + * sample/tkextlib/treectrl/random.rb: fixed typo. (wrong itemheight) + + * sample/tkextlib/treectrl/outlook-newgroup.rb: ditto. + + * sample/tkextlib/treectrl/explorer.rb: ditto. + + * sample/tkextlib/treectrl/help.rb: ditto. + +2005-04-07 ocean + + * sample/tkextlib/treectrl/*.rb: some speed up... cache the result of + version checking. + +2005-04-07 Hidetoshi NAGAI + + * lib/tkextlib/treectrl/tktreectrl.rb: performance tuning by calling + tk_send_without_enc. [ruby-dev:25997] + +2005-04-04 ocean + + * lib/tkextlib/tktable/tktable.rb: added Tk::TkTable#selection_present. + +2005-04-02 Hidetoshi NAGAI + + * lib/tkextlib/treectrl/tktreectrl.rb: support TreeCtrl's cvs head. + +2005-04-02 Hidetoshi NAGAI + + * lib/tkextlib/blt/component.rb: add TreeCtrl#legend_window_create(). + + * sample/tkextlib/blt/graph6.rb: use legend_window_create(). + + * lib/tkextlib/blt/tree.rb: forget to call tagid(). + + * lib/tkextlib/blt/treeview.rb: ditto. + +2005-04-01 Hidetoshi NAGAI + + * sample/tkextlib/treectrl/demo.rb: bridge the gap of + Hash#index or Hash#key between ruby 1.8 and 1.9 + +2005-04-01 Hidetoshi NAGAI + + * lib/tkextlib/blt/component.rb: bug fix on treatment of + component objects. + + * sample/tkextlib/blt/graph6.rb: a new sample script. + +2005-03-31 ocean + + * sample/tkextlib/treectrl/demo.rb: should use Hash#index. + + * sample/tkextlib/treectrl/demo.rb: TkImage was not + cached properly. + + * sample/tkextlib/treectrl/random.rb: fixed typo. + +2005-03-31 Hidetoshi NAGAI + + * sample/tkextlib/iwidgets/sample/hierarchy.rb: show basename + only [ruby-dev:25970] + + * sample/tkextlib/treectrl/demo.rb: add check for existence of + 'backgroundimage' option. + + * sample/tkextlib/treectrl/bitmaps.rb: ditto. + + * sample/tkextlib/treectrl/outlook-newgroup.rb: lack of '%I' + event callback argument. + +2005-03-31 Hidetoshi NAGAI + + * sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat + Japanese (i18n?) filenames. + +2005-03-30 Hidetoshi NAGAI + + * sample/tkextlib/bwidget/tree.rb: use 'return' in the Proc object. + + * sample/tkextlib/tkHTML/hv.rb: ditto. + + * sample/tkextlib/tkHTML/ss.rb: ditto. + + * sample/tkextlib/tktable/basic.rb: ditto. + + * sample/tkextlib/tktable/command.rb: ditto. + + * sample/tkextlib/tktable/debug.rb: ditto. + + * sample/tkextlib/tktable/maxsize.rb: ditto. + + * sample/tkextlib/treectrl/demo.rb: ditto. + +2005-03-29 Hidetoshi NAGAI + + * lib/tkextlib/blt/component.rb: cannot create elements except + default type of element. + + * lib/tkextlib/blt/barchart.rb: ditto. + + * lib/tkextlib/blt/graph.rb: ditto. + + * lib/tkextlib/blt/stripchart.rb: ditto. + + * lib/tkextlib/blt/component.rb: axis command option gets + proper object type of arguments. + + * sample/tkextlib/blt/calendar.rb: new sample. + + * sample/tkextlib/blt/pareto.rb: ditto. + +2005-03-28 ocean + + * lib/tkextlib/iwidgets/notebook.rb: fixed typo. + +2005-03-26 Hidetoshi NAGAI + + * lib/tkextlib/blt.rb: add commands for zooming. + + * lib/tkextlib/blt/bitmap.rb (new_with_name): add for using + given name. + + * lib/tkextlib/blt/busy.rb: bug fix on Tk::BLT::Busy::Shild class. + + * lib/tkextlib/blt/component.rb: typo fix. + + * lib/tkextlib/blt/component.rb: fix lack of *_create methods + + * lib/tkextlib/blt/component.rb: proper call on xaxis_* and so on. + + * lib/tkextlib/blt/htext.rb: add TkVariable object to access + special Tcl variables. + + * lib/tkextlib/treectrl/tktreectrl.rb: typo fix. + + * lib/tkextlib/treectrl/tktreectrl.rb: proper treatment + of 'font' option of element_configure. + + * lib/tkextlib/treectrl/tktreectrl.rb: bug fix on item_sort. + + * lib/tkextlib/treectrl/tktreectrl.rb: add methods to + call TreeCtrl commands for bindings. + + * sample/tkextlib/blt/*: add some sample scripts. + + * sample/tkextlib/treectrl/*: add some sample scripts. + +2005-03-18 Hidetoshi NAGAI + + * lib/tkextlib/treectrl/tktreectrl.rb: bug fix and define some + classes for components of Tk::TreeCtrl + +2005-03-17 Hidetoshi NAGAI + + * lib/tkextlib/treectrl/tktreectrl.rb: call wrong method in + Tk::TreeCtrl#*_configinfo and current_*_configinfo method + +2005-03-16 Hidetoshi NAGAI + + * lib/tkextlib/SUPPORT_STATUS: change the status of TkImg + + * lib/tkextlib/treectrl/tktreectrl.rb: bug fix and support + TkTreeCtrl-1.1 + + * lib/tkextlib/SUPPORT_STATUS: change the supported version of + TkTreeCtrl + +2005-03-15 Hidetoshi NAGAI + + * sample/tkextlib/tkimg: add sample + +2005-03-06 Hidetoshi NAGAI + + * lib/tkextlib/SUPPORT_STATUS: add version info of each extension + +2005-03-05 Hidetoshi NAGAI + + * lib/tkextlib/tile.rb: lack of "autoload TProgressbar" + +2005-03-05 Hidetoshi NAGAI + + * lib/tkextlib/tile.rb: support tile-0.6 + + * lib/tkextlib/tile/tbutton.rb: ditto + + * lib/tkextlib/tile/tcheckbutton.rb: ditto + + * lib/tkextlib/tile/tlabel.rb: ditto + + * lib/tkextlib/tile/tmenubutton.rb: ditto + + * lib/tkextlib/tile/tnotebook.rb: ditto + + * lib/tkextlib/tile/tradiobutton.rb: ditto + + * lib/tkextlib/tile/tcombobox.rb: [new] ditto + + * lib/tkextlib/tile/tentry.rb: [new] ditto + + * lib/tkextlib/tile/tframe.rb: [new] ditto + + * lib/tkextlib/tile/tlabelframe.rb: [new] ditto + + * lib/tkextlib/tile/tprogressbar.rb: [new] ditto + + * lib/tkextlib/tile/treeview.rb: [new] ditto + + * lib/tkextlib/tile/tscrollbar.rb: [new] ditto + + * lib/tkextlib/tile/tseparator.rb: [new] ditto + + * lib/tkextlib/tile/tsquare.rb: [new] ditto + +2005-02-20 Hidetoshi NAGAI + + * lib/tkextlib/tclx/tclx.rb: warning TclX's 'signal' command. + +2005-01-25 Hidetoshi NAGAI + + * lib/tkextlib/blt/component.rb: bug fix. cannot accept + a callback ID string for a command argument. [ruby-dev:25479] + + * lib/tkextlib/blt/tabset.rb: ditto + + * lib/tkextlib/blt/treeview.rb: ditto + + * lib/tkextlib/bwidget/labelentry.rb: ditto + + * lib/tkextlib/bwidget/listbox.rb: ditto + + * lib/tkextlib/bwidget/notebook.rb: ditto + + * lib/tkextlib/bwidget/spinbox.rb: ditto + + * lib/tkextlib/bwidget/tree.rb: ditto + + * lib/tkextlib/itk/incr_tk.rb: ditto + + * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto + + * lib/tkextlib/tkDND/tkdnd.rb: ditto + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto + + * sample/tkextlib/tkHTML/ss.rb: local variable scope bug fix + [ruby-dev:25479] + + * sample/tkextlib/vu/vu_demo.rb: rename from vu.rb; avoid the bug on + Windows version of Tcl/Tk. The trouble based on the bug occurs when + the script name (without extension) is a same name as a Tcl/Tk's + library file name (without extension) required in the script. + +2004-12-24 Hidetoshi NAGAI + + * lib/tkextlib/blt: add BLT extension support + +2004-12-16 Hidetoshi NAGAI + + * lib/tkextlib/bwidget/labelentry.rb: use TkCore.callback_obj?() + + * lib/tkextlib/bwidget/listbox.rb: ditto + + * lib/tkextlib/bwidget/notebook.rb: ditto + + * lib/tkextlib/bwidget/spinbox.rb: ditto + + * lib/tkextlib/itk/incr_tk.rb: ditto + + * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto + + * lib/tkextlib/tkDND/tkdnd.rb: ditto + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto + + * lib/tkextlib/winico/winico.rb: ditto + +2004-12-10 Hidetoshi NAGAI + + * lib/tkextlib/tile/style.rb: 'theme_use' method bug fix + +2004-12-08 Hidetoshi NAGAI + + * lib/tkextlib/bwidget/notebook.rb: raise method cannot return + the raised page. + + * lib/tkextlib/bwidget/labelentry.rb: bind methods accept + subst_args + block + + * lib/tkextlib/bwidget/listbox.rb: ditto + + * lib/tkextlib/bwidget/notebook.rb: ditto + + * lib/tkextlib/bwidget/spinbox.rb: ditto + + * lib/tkextlib/bwidget/tree.rb: ditto + + * lib/tkextlib/itk/incr_tk.rb: ditto + + * lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto + + * lib/tkextlib/tkDND/tkdnd.rb: ditto + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto + +2004-11-26 Hidetoshi NAGAI + + * lib/tkextlib/bwidget/notebook.rb: uses epath + + * lib/tkextlib/bwidget/widget.rb: ditto + + * lib/tkextlib/tktable/tktable.rb: ditto + + * lib/tkextlib/tcllib/cursor.rb: ditto, and bug fix + +2004-11-10 Hidetoshi NAGAI + + * lib/tkextlib/tile/style.rb: bug fix + +2004-11-07 Hidetoshi NAGAI + + * lib/tkextlib/iwidgets/scrolledcanvas.rb: bind-event methods + accept multi substitution arguments. + + * lib/tkextlib/tktable/tktable.rb: ditto. + + * lib/tkextlib/treectrl/tktreectrl.rb: ditto + +2004-11-03 Hidetoshi NAGAI + + * lib/tkextlib/SUPPORT_STATUS: BLT moves to 'plan to support' + from 'not determined' + + * lib/tkextlib/itk/incr_tk.rb: __cget_cmd and __config_cmd are + private methods + + * lib/tkextlib/tcllib/autoscroll.rb: extend TkCore + + * lib/tkextlib/tcllib/cursor.rb: ditto. + + * lib/tkextlib/tcllib/plotchart.rb: ditto. + + * lib/tkextlib/tcllib/style.rb: ditto. + + * lib/tkextlib/tile/style.rb: ditto. + + * lib/tkextlib/tkDND/shape.rb: ditto. + +2004-10-24 Hidetoshi NAGAI + + * lib/tkextlib/bwidget/tree.rb: bug fix on Windows + +2004-10-16 Hidetoshi NAGAI + + * lib/tkextlib/tcllib/ico.rb: new library (Tk::Tcllib:ICO) + + * lib/tkextlib/tcllib.rb: add Tk::Tcllib::ICO (based on tcllib 1.7) + +2004-10-06 Hidetoshi NAGAI + + * lib/tkextlib/bwidget.rb (BWidget.grab): bug fix + + * lib/tkextlib/tcllib.rb: typo fix + +2004-07-28 Hidetoshi NAGAI + + * lib/tkextlib/add winico support + +2004-07-23 Hidetoshi NAGAI + + * lib/tkextlib/add TclX support (partially; infox command and + XPG/3 MsgCat only) + +2004-07-15 Hidetoshi NAGAI + + * bug fix + + * support TkTable extension + +2004-07-12 Hidetoshi NAGAI + + * bug fix + + * support Iwidgets extension + +2004-07-10 Hidetoshi NAGAI + + * bug fix + + * add more part of [incr Widget] support (about 65%? are complete) + + * use Tk::ValidateConfigure.__def_validcmd() method + (new function to define validatecommand methods easier) + + * tcllib.rb : avoid the loading trouble that almost all part of + the extension is not available when some libraries are invalid. + +2004-07-09 Hidetoshi NAGAI + + * add some part of [incr Widget] support (about 50%? are complete) + +2004-07-07 Hidetoshi NAGAI + + * add [incr Tck], [incr Tk] support + +2004-07-06 Hidetoshi NAGAI + + * support BWidget extension + + * add BWidget extension demo + + * add ICONS extension demo + + * many bug fix + +2004-07-01 Hidetoshi NAGAI + + * 1st release of tkextlib ( to support Tcl/Tk extensions ) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eng b/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eng new file mode 100644 index 0000000..6fa775b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eng @@ -0,0 +1,469 @@ +(tof) + 2005/07/05 Hidetoshi NAGAI + +This document discribes about the 'tcltklib' library. Although there +is the 'tcltk' library (tcltk.rb) under this directory, no description +in this document (because it is not maintained recently). + +============================================================== +module TclTklib + : Defines methods to do operations which are independed on + : Tcl/Tk interpreters + + module TclTkLib::EventFlag + : Defines flags to define taget events on 'do_one_event' methos. + : When to give, please use bit-operator (e.g. WINDOW | DONT_WAIT). + + [constants] + NONE + : Is 0. It means "there is no target". But on the real + : operation, it is same to ALL. + + WINDOW + : 'window' event is processed. + + FILE + : 'file' event is processed. + + TIMER + : 'timer' event is processed. + + IDLE + : 'idle' operation (e.g. 're-draw'; the operations when the + : other kinds of events doesn't occur) is processed. + + ALL + : All kinds of events are processed. + : Same to 'WINDOW | FILE | TIMER | IDLE'. + + DONT_WAIT + : Without this flag, 'do_one_event' waits the occurence of + : a target event. With this flag, doesn't wait and returns + : false if there is no target event for processing. + + module TclTkLib::VarAccessFlag + : Defines flags to give '_get_variable' and so on. When to give, + : please use bit-operator (e.g. GLOBAL_ONLY | LEAVE_ERR_MSG ). + + [constants] + NONE + : Is 0. It means "set no flag". + + GLOBAL_ONLY + : (site Tcl/Tk's man page) + : Under normal circumstances the procedures look up + : variables as follows: If a procedure call is active + : in interp, a variable is looked up at the current + : level of procedure call. Otherwise, a variable is + : looked up first in the current namespace, then in + : the global namespace. However, if this bit is set + : in flags then the variable is looked up only in the + : global namespace even if there is a procedure call + : active. If both GLOBAL_ONLY and NAMESPACE_ONLY are + : given, GLOBAL_ONLY is ignored. + : + : *** ATTENTION *** + : Tcl7.6 doesn't have namespaces. So NAMESPACE_ONLY + : is defined as 0, and then GLOBAL_ONLY is available + : even if flag is (GLOBAL_ONLY | NAMESPACE_ONLY). + + NAMESPACE_ONLY + : (site Tcl/Tk's man page) + : Under normal circumstances the procedures look up + : variables as follows: If a procedure call is active + : in interp, a variable is looked up at the current + : level of procedure call. Otherwise, a variable is + : looked up first in the current namespace, then in + : the global namespace. However, if this bit is set + : in flags then the variable is looked up only in the + : current namespace even if there is a procedure call + : active. + : + : *** ATTENTION *** + : Tcl7.6 doesn't have namespaces. So NAMESPACE_ONLY + : is defined as 0. + + LEAVE_ERR_MSG + : (site Tcl/Tk's man page) + : If an error is returned and this bit is set in flags, + : then an error message will be left in the interpreter's + : result, where it can be retrieved with Tcl_GetObjResult + : or Tcl_GetStringResult. If this flag bit isn't set then + : no error message is left and the interpreter's result + : will not be modified. + + APPEND_VALUE + : (site Tcl/Tk's man page) + : If this bit is set then newValue is appended to the + : current value, instead of replacing it. If the variable + : is currently undefined, then this bit is ignored. + + LIST_ELEMENT + : (site Tcl/Tk's man page) + : If this bit is set, then newValue is converted to a + : valid Tcl list element before setting (or appending + : to) the variable. A separator space is appended before + : the new list element unless the list element is going + : to be the first element in a list or sublist (i.e. the + : variable's current value is empty, or contains the + : single character ``{'', or ends in `` }''). + + PARSE_VARNAME + : (site Tcl/Tk's man page) + : If this bit is set when calling _set_variable and so + : on, var_name argument may contain both an array and an + : element name: if the name contains an open parenthesis + : and ends with a close parenthesis, then the value + : between the parentheses is treated as an element name + : (which can have any string value) and the characters + : before the first open parenthesis are treated as the + : name of an array variable. If the flag PARSE_VARNAME + : is given, index_name argument should be 'nil' since the + : array and element names are taken from var_name. + : + : *** ATTENTION *** + : Tcl7.6 doesn't have this flag. So PARSE_VARNAME is + : defined as 0. + + module TclTkLib::RELEASE_TYPE + : Defines release type number of Tcl/Tk + + ALPHA + : ALPHA release + + BETA + : BETA release + + FINAL + : FINAL release + + [module methods] + get_version() + : return an array of major, minor, release-type number, + : number, release-type name, and patchlevel of current + : Tcl/Tk library. + + mainloop(check_root = true) + : Starts the eventloop. If 'check_root' is true, this method + : doesn't return when a root widget exists. + : If 'check_root' is false, doen't return by the other + : reasons than exceptions. + + mainloop_thread? + : Returns whether the current thread executes the eventloop. + : If true, the eventloop is working on the current thread. + : If no eventloop is working, this method returns nil. + : And if the other thread executes the eventloop, returns false. + : + : *** ATTENTION *** + : When this methods returns false, it is dangerous to call a Tk + : interpreter directly. + + mainloop_watchdog(check_root = true) + : On the normal eventloop, some kinds of callback operations + : cause deadlock. To avoid some of such deadlocks, this + : method starts an eventloop and a watchdog-thread. + + do_one_event(flag = TclTkLib::EventFlag::ALL | + TclTkLib::EventFlag::DONT_WAIT) + : Do one event for processing. When processed an event, + : returns true. + : If NOT set DONT_WAIT flag, this method waits occurrence of + : a target event. + : If set DONT_WAIT flag and no event for processing, returns + : false immediately. + : If $SAFE >= 4, or $SAFE >= 1 and the flag is tainted, + : force to set DONT_WAIT flag. + + set_eventloop_tick(timer_tick) + : Define the interval of thread-switching with an integer + : value of mili-seconds. + : Default timer_tick is 0. It means that thread-switching + : is based on the count of processed events. + : ( see 'set_eventloop_weight' method ) + : However, if the eventloop thread is the only thread, + : timer_tick cannt be set to 0. If 0, then is set to 100 ms + : automatically (see NO_THREAD_INTERRUPT_TIME on tcltklib.c). + : On $SAFE >= 4, cannot call this method. + + get_eventloop_tick + : Get current value of 'timer_tick' + + set_no_event_wait(no_event_wait) + : Define sleeping time of the eventloop when two or more + : thread are running and there is no event for processing. + : Default value is 20 (ms). + : If the eventloop thread is the only thread, this value is + : invalid. + : On $SAFE >= 4, cannot call this method. + + get_no_event_wait + : Get current value of 'no_event_wait'. + + set_eventloop_weight(loop_max, no_event_tick) + : Define the weight parameters for the eventloop thread. + : That is invalid when the eventloop is the only thread. + : 'loop_max' is the max events for thread-switching. + : 'no_event_tick' is the increment value of the event count + : when no event for processing (And then, the eventloop thead + : sleeps 'no_event_wait' mili-seconds). + : 'loop_max == 800' and 'no_event_tick == 10' are defalut. + : On $SAFE >= 4, cannot call this method. + + get_eventloop_weight + : Get current values of 'loop_max' and 'no_event_tick'. + + mainloop_abort_on_exception=(bool) + : Define whether the eventloop stops on exception or not. + : If true (default value), stops on exception. + : If false, show a warinig message but ignore the exception. + : If nil, no warning message and ignore the excepsion. + : This parameter is sometimes useful when multiple Tk + : interpreters are working. Because the only one eventloop + : admins all Tk interpreters, sometimes exception on a + : interpreter kills the eventloop thread. Even if such + : situation, when abort_on_exception == false or nil, + : the eventloop ignores the exception and continue to working. + : On $SAFE >= 4, cannot call this method. + + mainloop_abort_on_exception + : Get current status of that. + + num_of_mainwindows + : Returns the number of main-windows (root-widget). + : Because there is only one main-window for one Tk interpreter, + : the value is same to the number of interpreters which has + : available Tk functions. + + _merge_tklist(str, str, ... ) + : Get a Tcl's list string from arguments with a Tcl/Tk's + : library function. Each arguemnt is converted to a valid + : Tcl list element. + + _conv_listelement(str) + : Convert the argument to a valid Tcl list element with + : Tcl/Tk's library function. + + _toUTF8(str, encoding=nil) + _fromUTF8(str, encoding=nil) + : Call the function (which is internal function of Tcl/Tk) to + : convert to/from a UTF8 string. + + _subst_UTF_backslash(str) + _subst_Tcl_backslash(str) + : Substitute backslash sequence with Tcl's rule (include \uhhhh; + : give a sixteen-bit hexadecimal value for Unicode character). + : _subst_Tcl_backslash method parses all backslash sequence. + : _subst_UTF_backslash method parses \uhhhh only. + + encoding_system + encoding_system=(encoding) + : Get and set Tcl's system encoding. + + encoding + encoding=(encoding) + : alias of encoding_system / encoding_system= + : ( probably, Ruby/Tk's tk.rb will override them ) + + +class TclTkIp + [class methods] + new(ip_name=nil, options='') + : Generate an instance of TclTkIp class. + : If 'ip_name' argument is given as a string, it is the name + : of the Tk interpreter which is shown by 'winfo interps' + : command. + : 'options' argument accepts a string which is the command + : line options of wish; such as '-geometry' or '-use'. + : The information is used to generate the root widget of the + : interpreter. + : ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) + : If is given nil or falsr for the 'option' argument, generates + : the Tcl interpreter without Tk library. Then the interpreter + : doesn't need GUI environment. Therefore, even if a window + : system doesn't exist or cannot be used, Ruby can control the + : Tcl interpreter and the extention libraries loaded on the + : interpreter. + + [instance methods] + create_slave(name, safe=false) + : Create a slave interpreter. + : The parent of the interpreter is the receiver of this method. + : The name of the slave interpreter is given by 'name' argument. + : The 'safe' argument decides whether the slave interpreter is + : created as a safe interpreter or not. If true, create a safe + : interpreter. Default is false. However, if the parent + : interpreter is a safe interpreter, the created interpreter is + : a safe interpreter (ignore 'safe' argument value). + : If $SAFE >= 4, can create a safe interpreter only. + + make_safe + : Make the interpreter to the safe interpreter, and returns + : self. If fail, raise RuntimeError. + + safe? + : Check whether the interpreter is the safe interpreter. + : If is the safe interpreter, returns true. + + allow_ruby_exit? + : Return the mode whether 'exit' function of ruby or 'exit' + : command of Tcl/Tk can quit the ruby process or not on the + : interpreter. If false, such a command quit the interpreter + : only. + : The default value for a master interpreter is true, and + : for a slave interpreter is false. + + allow_ruby_exit=(mode) + : Change the mode of 'allow_ruby_exit?'. + : If $SAFE >= 4 or the interpreter is a "safe" interpreter, + : this is not permitted (raise an exception). + + delete + : Delete the interpreter. + : The deleted interpreter doesn't accept command and then + : raise an exception. + + deleted? + : Check whether the interpreter is already deleted. + : If deleted, returns true. + + has_mainwindow? + : Check whether the interpreter has a MainWindow (root widget). + : If has, returns true. If doesn't, returns false. + : If IP is already deleted, returns nil. + + restart + : Restart Tk part of the interpreter. + : Use this when you need Tk functions after destroying the + : root widget. + : On $SAFE >= 4, cannot call this method. + + _eval(str) + _invoke(*args) + : Estimates the arguments as a command on the Tk interpreter. + : The argument of _eval is a script of Tcl/Tk. + : Each argument of _invoke is a token of one command line of + : Tcl/Tk. + : Because the operation of _invoke doesn't through the + : command line parser of Tk interpreter, the cost of + : estimation is smaller than _eval. However, auto_load + : mechanism of the Tk interpreter doesn't work on _invoke. + : So _invoke can call only the command which already + : registered on the interpreter by 'load' command and so on. + : On _eval command, auto_load mechanism words. So if succeed + : to _eval and regist the command once, after that, the + : command can be called by _invoke. + + _toUTF8(str, encoding=nil) + _fromUTF8(str, encoding=nil) + : Call the function (which is internal function of Tcl/Tk) to + : convert to/from a UTF8 string. + + _thread_vwait(var_name) + _thread_tkwait(mode, target) + : 'vwait' or 'tkwait' with thread support. + : The difference from normal 'vwait' or 'tkwait' command is + : doing independent wait from the vwait stack when they are + : called on the other thread than the eventloop thread. + : In the case of Tcl/Tk's vwait / tkwait, if 2nd vwait / + : tkwait is called on waiting for 1st vwait / tkwait, + : returns the order of [2nd]->[1st] regardless of the order + : of when the wait condition was fulfilled. + : If _thread_vwait / _thread_tkwait is called on the + : eventloop thread, there is no difference from vwait / + : tkwait. But if called on the other thread than the + : eventloop, stops the thread. And when the wait condition + : is fulfilled, the thread restarts. The meaning of + : "independent from the vwait stack" is that the timing of + : restarting is independent from the waiting status of the + : other threads. That is, even if the eventloop thread is + : waiting by vwait and is not fulfilled the condition, + : _thread_vwait completes the waiting when its waiting + : condition is fulfilled and the thread which stopped by + : _thread_vwait can continue the operation. + + _return_value + : Get the last result value on the interpreter. + + _get_variable(var_name, flag) + _get_variable2(var_name, index_name, flag) + : Get the current value of a variable. If specified a + : index_name (see also the PARSE_VARNAME flag), get the + : value of the index_name element. + + _set_variable(var_name, value, flag) + _set_variable2(var_name, index_name, value, flag) + : Create or modify a variable. If specified a index_name + : (see also the PARSE_VARNAME flag), create or modify the + : index_name element. + + _unset_variable(var_name) + _unset_variable2(var_name, index_name) + : Remove a variable. If specified a index_name (see also + : the PARSE_VARNAME flag), remove the index_name element. + + _get_global_var(var_name) + _get_global_var2(var_name, index_name) + _set_global_var(var_name, value) + _set_global_var2(var_name, index_name, value) + _unset_global_var(var_name) + _unset_global_var2(var_name, index_name) + : Call the associated method with the flag argument + : (GLOBAL_ONLY | LEAVE_ERR_MSG). + + _split_tklist(str) + : Split the argument with Tcl/Tk's library function and + : get an array as a list of Tcl list elements. + + _merge_tklist(str, str, ... ) + : Get a Tcl's list string from arguments with a Tcl/Tk's + : library function. Each arguemnt is converted to a valid + : Tcl list element. + + _conv_listelement(str) + : Convert the argument to a valid Tcl list element with + : Tcl/Tk's library function. + + mainloop + mainloop_watchdog + : If on the slave interpreter, never start an eventloop and + : returns nil. + : With the exception that, same to the TclTkLib module method + : with the same name. + + do_one_event + : With the exception that the argument is forced to set + : DONT_WAIT flag on the slave interpreter, same to + : TclTkLib#do_one_event. + + set_eventloop_tick + get_eventloop_tick + set_no_event_wait + get_no_event_wait + set_eventloop_weight + get_eventloop_weight + mainloop_abort_on_exception + mainloop_abort_on_exception= + : With the exception that it is ignored to set value on the + : slave interpreter, same to the TclTkLib module method with + : the same name. + + encoding_table + : For Ruby m17n. Return encoding relation table between Ruby's + : Encoding object and Tcl's encoding name. + +class TkCallbackBreak < StandardError +class TkCallbackContinue < StandardError + : They are exception classes to break or continue the Tk callback + : operation. + : If raise TkCallbackBreak on the callback procedure, Ruby returns + : 'break' code to Tk interpreter (Then the Tk interpreter will + : break the operation for the current event). + : If raise TkCallbackContinue, returns 'continue' code (Then the Tk + : interpreter will break the operateion for the current bindtag and + : starts the operation for the next buindtag for the current event). + : However, current tcltklib supports Ruby's 'break' and 'next' to + : get the same effect. That is, those classes are obsolete. Those + : exist for backward compatibility. + +(eof) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eucj b/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eucj new file mode 100644 index 0000000..7df4299 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/MANUAL_tcltklib.eucj @@ -0,0 +1,579 @@ +(tof) + 2005/07/05 Hidetoshi NAGAI + +Ëܥɥ­¥å¥á¥ó¥È¤Ë¤Ï¸Å¤¤ tcltk ¥é¥¤¥Ö¥é¥ê¡¤tcltklib ¥é¥¤¥Ö¥é¥ê¤ÎÀâÌÀ +¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¤¤½¤Îµ­½ÒÆâÍƤϸŤ¤¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +tcltk ¥é¥¤¥Ö¥é¥ê¡Êtcltk.rb¡Ë¤Ï¸½ºß¤Ç¤Ï¥á¥ó¥Æ¥Ê¥ó¥¹¤¬»ö¼Â¾å¹Ô¤ï¤ì¤Æ +¤¤¤Ê¤¤¤¿¤á¡¤¸Å¤¤¥É¥­¥å¥á¥ó¥È¤ÎÀâÌÀ¤¬¤½¤Î¤Þ¤ÞÍ­¸ú¤Ç¤¹¡¥¤½¤ì¤ËÂФ·¡¤ +tcltklib ¥é¥¤¥Ö¥é¥ê¤Ë¤Ä¤¤¤Æ¤Ï¡¤¸½ºß¤Î Ruby/Tk¡Êtk.rb °Ê²¼¤Î¥é¥¤¥Ö¥é +¥ê·²¡Ë¤ò²ÔƯ¤µ¤»¤ë¤¿¤á¤ÎÃæ¿´¤È¤·¤Æ¥á¥ó¥Æ¥Ê¥ó¥¹¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¤¾¯¡¹ +°ã¤¤¤¬À¸¤¸¤Æ¤¤¤Þ¤¹¡¥ + +¤½¤³¤Ç¡¤¤Þ¤º¸Å¤¤ÀâÌÀʸ½ñ¤ò¼¨¤·¤¿¸å¡¤¸½ºß¤Î tcltklib ¥é¥¤¥Ö¥é¥ê¤Ë¤Ä +¤¤¤Æ¤ÎÀâÌÀ¤ò²Ã¤¨¤Þ¤¹¡¥ + +°Ê²¼¤¬¥é¥¤¥Ö¥é¥ê¤Î¸Å¤¤ÀâÌÀʸ½ñ¤Ç¤¹¡¥ +============================================================== + MANUAL.euc + Sep. 19, 1997 Y. Shigehiro + +°Ê²¼, ¡Ötcl/tk¡×¤È¤¤¤¦É½µ­¤Ï, tclsh ¤ä wish ¤ò¼Â¸½¤·¤Æ¤¤¤ë, °ìÈ̤Ǥ¤¤¦ +¤È¤³¤í¤Î tcl/tk ¤ò»Ø¤·¤Þ¤¹. ¡Ötcltk ¥é¥¤¥Ö¥é¥ê¡×, ¡Ötcltklib ¥é¥¤¥Ö¥é +¥ê¡×¤È¤¤¤¦É½µ­¤Ï, Ëܥѥ屡¼¥¸¤Ë´Þ¤Þ¤ì¤ë ruby ÍѤΥ饤¥Ö¥é¥ê¤ò»Ø¤·¤Þ¤¹. + +<< tcltk ¥é¥¤¥Ö¥é¥ê >> + +tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ¹¤ë¤¿¤á¤Î¹â(Ãæ?)¿å½à¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÄó +¶¡¤·¤Þ¤¹. + +¤³¤Î¥é¥¤¥Ö¥é¥ê¤Ï ruby ¤«¤é tcl/tk ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ¹¤ë¤¿¤á¤Î¤â¤Î¤Ç, Æâ +Éô¤Ç tcltklib ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹. + +[ÀâÌÀ] + +tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤Ç¤Ï, ¥¦¥£¥¸¥§¥Ã¥È¤Ë²¿¤«»Ø¼¨¤òÁ÷¤ë¤Ë¤Ï, ¥¦¥£¥¸¥§¥Ã +¥È̾¤Ë³¤¤¤Æ¥Ñ¥é¥á¡¼¥¿¤ò½ñ¤­¤Þ¤¹. ¤·¤¿¤¬¤Ã¤Æ, ¥¦¥£¥¸¥§¥Ã¥È¤¬¥ª¥Ö¥¸¥§¥¯ +¥È¤Ç¤¢¤ê, ¤½¤ì¤ËÂФ·¤Æ¥á¥½¥Ã¥É¤òÁ÷¤Ã¤Æ¤¤¤ë, ¤È¤ß¤Ê¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹. ¤µ +¤Æ, tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤Ç¤Ï, ÁȤ߹þ¤ß¥³¥Þ¥ó¥É¤â, Á°½Ò¤Î¥¦¥£¥¸¥§¥Ã¥È¤È +Ʊ¤¸¤è¤¦¤Ê½ñ¼°¤ÎÌ¿Îá¤Ç¼Â¹Ô¤µ¤ì¤Þ¤¹. ¤¹¤Ê¤ï¤Á, ¥³¥Þ¥ó¥É¤â¥ª¥Ö¥¸¥§¥¯¥È¤Ç +¤¢¤ë¤È¹Í¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹. + +¤³¤Î¤è¤¦¤Ê¹Í¤¨¤Ë´ð¤Å¤­, tcltk ¥é¥¤¥Ö¥é¥ê¤Ç¤Ï, tcl/tk ¤Î¥³¥Þ¥ó¥É¤ä¥¦¥£ +¥¸¥§¥Ã¥È¤ËÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹. ¥ª¥Ö¥¸¥§¥¯¥È¤ËÂФ¹¤ë¥á¥½¥Ã +¥É¸Æ¤Ó½Ð¤·¤Ï, e() ¥á¥½¥Ã¥É¤Ë¤è¤ê¼Â¹Ô¤µ¤ì¤Þ¤¹. Î㤨¤Ð, tcl/tk ¤Î info +¥³¥Þ¥ó¥É¤ËÂбþ¤¹¤ë ruby ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤¬ info ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤ë¤È¤¹¤ë¤È, +tcl/tk ¤Î + info commands +¤È¤¤¤¦Ì¿Îá¤Ï tcltk ¥é¥¤¥Ö¥é¥ê¤Ç¤Ï + info.e("commands") +¤Èµ­½Ò¤µ¤ì¤Þ¤¹. ¤Þ¤¿, ¡Ö.¡×¤È¤¤¤¦¥¦¥£¥¸¥§¥Ã¥È (wish ¼Â¹Ô»þ¤Ë¼«Æ°Åª¤ËÀ¸ +À®¤µ¤ì¤ë¥ë¡¼¥È¥¦¥£¥¸¥§¥Ã¥È) ¤ËÂбþ¤¹¤ë ruby ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤¬ root ¤È¤¤ +¤¦Ì¾Á°¤Ç¤¢¤ë¤È¤¹¤ë¤È, + . configure -height 300 -width 300 +¤È¤¤¤¦ tcl/tk ¤ÎÌ¿Îá¤Ï + root.e("configure -height 300 -width 300") +¤Èµ­½Ò¤µ¤ì¤Þ¤¹. ¤³¤Î¤è¤¦¤Êµ­½Ò¤Ï, ¸«¤¿¤á¤Ë¤ÏÈþ¤·¤¯¤¢¤ê¤Þ¤»¤ó¤¬, ¤½¤·¤Æ, +¥¹¥¯¥ê¥×¥È¤òÆɤà¿Í¤Ë¤Ï¸«¤Å¤é¤¤¤«¤âÃΤì¤Þ¤»¤ó¤¬, ¼ÂºÝ¤Ë¥¹¥¯¥ê¥×¥È¤ò½ñ¤¤ +¤Æ¤ß¤ë¤ÈͽÁÛ³°¤Ë¼ê·Ú¤Ç¤¹. + +[»ÈÍÑË¡] + +1. ¥é¥¤¥Ö¥é¥ê¤òÆɤ߹þ¤à. + require "tcltk" + +2. tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤òÀ¸À®¤¹¤ë. + ip = TclTkInterpreter.new() + +3. tcl/tk ¤Î¥³¥Þ¥ó¥É¤ËÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤òÊÑ¿ô¤ËÂåÆþ¤·¤Æ¤ª¤¯. + # ¥³¥Þ¥ó¥É¤ËÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤¬Æþ¤Ã¤¿ Hash ¤ò¼è¤ê½Ð¤¹. + c = ip.commands() + # »È¤¤¤¿¤¤¥³¥Þ¥ó¥É¤ËÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤ò¸ÄÊ̤ÎÊÑ¿ô¤ËÂåÆþ¤¹¤ë. + bind, button, info, wm = c.indexes("bind", "button", "info", "wm") + +4. ɬÍפʽèÍý¤ò¹Ô¤¦. + ¾Ü¤·¤¯¤Ï, ¥µ¥ó¥×¥ë¤ò»²¾È¤Î¤³¤È. + +5. ½àÈ÷¤¬¤Ç¤­¤¿¤é, ¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ËÆþ¤ë. + TclTk.mainloop() + +(( °Ê²¼, ¥â¥¸¥å¡¼¥ë, ¥¯¥é¥¹Åù¤ÎÀâÌÀ¤ò½ñ¤¯Í½Äê.)) + + + +<< tcltklib ¥é¥¤¥Ö¥é¥ê >> + +tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ¹¤ë¤¿¤á¤ÎÄã¿å½à¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÄ󶡤·¤Þ +¤¹. + +¥³¥ó¥Ñ¥¤¥ë/¼Â¹Ô¤Ë¤Ï, tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤¬É¬ÍפǤ¹. + +[ÀâÌÀ] + +¤³¤Î¥é¥¤¥Ö¥é¥ê¤òÍѤ¤¤ë¤È, ruby ¤«¤é tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤǤ­¤Þ +¤¹. ¶ñÂÎŪ¤Ë¤Ï, ruby ¥¤¥ó¥¿¥×¥ê¥¿¤«¤é tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤ò¸Æ¤Ó½Ð¤¹¤³ +¤È¤¬¤Ç¤­¤Þ¤¹. ¤µ¤é¤Ë, ¤½¤Î(ruby ¥¤¥ó¥¿¥×¥ê¥¿¤«¤é¸Æ¤Ó½Ð¤·¤¿) tcl/tk ¥¤ +¥ó¥¿¥×¥ê¥¿¤«¤é, µÕ¤Ë ruby ¥¤¥ó¥¿¥×¥ê¥¿¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤â¤Ç¤­¤Þ¤¹. + +[»ÈÍÑË¡] + +require "tcltklib" ¤¹¤ë¤È, °Ê²¼¤Î¥â¥¸¥å¡¼¥ë, ¥¯¥é¥¹¤¬ÍøÍѲÄǽ¤Ç¤¹. + +¥â¥¸¥å¡¼¥ë TclTkLib + tcl/tk ¥é¥¤¥Ö¥é¥ê¤ò¸Æ¤Ó½Ð¤¹¥á¥½¥Ã¥É¤ò½¸¤á¤¿¥â¥¸¥å¡¼¥ë¤Ç¤¹. ¤¿¤À¤·, + tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿´Ø·¸¤Î¥á¥½¥Ã¥É¤Ï¥¯¥é¥¹ TclTkIp ¤Ë¤¢¤ê¤Þ¤¹. + + ¥â¥¸¥å¡¼¥ë¥á¥½¥Ã¥É mainloop() + Tk_MainLoop ¤ò¼Â¹Ô¤·¤Þ¤¹. Á´¤Æ¤Î tk ¤Î¥¦¥¤¥ó¥É¥¦¤¬Ìµ¤¯¤Ê¤ë¤È½ªÎ» + ¤·¤Þ¤¹(Î㤨¤Ð, tcl/tk ¤Ç½ñ¤¯¤È¤³¤í¤Î "destroy ." ¤ò¤·¤¿¾ì¹çÅù). + °ú¿ô: ̵¤· + Ìá¤êÃÍ: nil + +¥¯¥é¥¹ TclTkIp + ¥¤¥ó¥¹¥¿¥ó¥¹¤¬ tcl/tk ¤Î¥¤¥ó¥¿¥×¥ê¥¿¤ËÂбþ¤·¤Þ¤¹. tcl/tk ¤Î¥é¥¤¥Ö + ¥é¥ê¤Î»ÅÍÍÄ̤ê, ¥¤¥ó¥¹¥¿¥ó¥¹¤òÊ£¿ô¸ÄÀ¸À®¤·¤Æ¤âÀµ¤·¤¯Æ°ºî¤·¤Þ¤¹(¤½ + ¤ó¤Ê¤³¤È¤ò¤¹¤ëɬÍפϤ¢¤Þ¤ê̵¤¤¤Ï¤º¤Ç¤¹¤¬). ¥¤¥ó¥¿¥×¥ê¥¿¤Ï wish ¤Î + tcl/tk ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤­¤Þ¤¹. ¤µ¤é¤Ë, °Ê²¼¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤Ç¤­¤Þ + ¤¹. + ¥³¥Þ¥ó¥É ruby + °ú¿ô¤ò ruby ¤Ç¼Â¹Ô¤·¤Þ¤¹(ruby_eval_string ¤ò¼Â¹Ô¤·¤Þ¤¹). °ú¿ô + ¤Ï 1 ¤Ä¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó. Ìá¤êÃÍ¤Ï ruby ¤Î¼Â¹Ô·ë²Ì¤Ç¤¹. + ruby ¤Î¼Â¹Ô·ë²Ì¤Ï nil ¤« String ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó. + + ¥¯¥é¥¹¥á¥½¥Ã¥É new() + TclTkIp ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤·¤Þ¤¹ + °ú¿ô: ̵¤· + Ìá¤êÃÍ (TclTkIp): À¸À®¤µ¤ì¤¿¥¤¥ó¥¹¥¿¥ó¥¹ + + ¥á¥½¥Ã¥É _eval(script) + ¥¤¥ó¥¿¥×¥ê¥¿¤Ç script ¤òɾ²Á¤·¤Þ¤¹(Tcl_Eval ¤ò¼Â¹Ô¤·¤Þ¤¹). Á°½Ò + ¤Î¤è¤¦¤Ë, ruby ¥³¥Þ¥ó¥É¤Ë¤è¤ê script Æ⤫¤é ruby ¥¹¥¯¥ê¥×¥È¤ò¼Â + ¹Ô¤Ç¤­¤Þ¤¹. + °ú¿ô: script (String) - ¥¤¥ó¥¿¥×¥ê¥¿¤Çɾ²Á¤¹¤ë¥¹¥¯¥ê¥×¥Èʸ»úÎó + Ìá¤êÃÍ (String): ɾ²Á·ë²Ì ((Tcl_Interp *)->result) + + ¥á¥½¥Ã¥É _return_value() + ľÁ°¤Î Tcl_Eval ¤ÎÌá¤êÃͤòÊÖ¤·¤Þ¤¹. 0(TCL_OK) ¤ÇÀµ¾ï½ªÎ»¤Ç¤¹. + °ú¿ô: ̵¤· + Ìá¤êÃÍ (Fixnum): ľÁ°¤Î Tcl_Eval() ¤¬ÊÖ¤·¤¿ÃÍ. + +============================================================== + +°Ê²¼¤¬Ëܥɥ­¥å¥á¥ó¥ÈºîÀ®»þÅÀ¤Ç¤Î tcltklib ¥é¥¤¥Ö¥é¥ê¤ÎÀâÌÀ¤Ç¤¹¡¥ +============================================================== +¥â¥¸¥å¡¼¥ë TclTkLib + : ¸Ä¡¹¤Î Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ë°Í¸¤·¤Ê¤¤½èÍý ( == ¥¤¥Ù¥ó¥È¥ë¡¼ + : ¥×¤Ë´Ø¤¹¤ë½èÍý ) ¤ò¸Æ¤Ó½Ð¤¹¥á¥½¥Ã¥É¤òÄêµÁ¤·¤¿¥â¥¸¥å¡¼¥ë¡¥ + + ¥â¥¸¥å¡¼¥ë TclTkLib::EventFlag + : do_one_event ¤ò¸Æ¤Ó½Ð¤¹ºÝ¤Î½èÍýÂоݥ¤¥Ù¥ó¥È¤ò»ØÄꤹ¤ë¤¿¤á¤Î + : ¥Õ¥é¥° ( WINDOW|DONT_WAIT ¤È¤¤¤¦¤è¤¦¤Ë¥Ó¥Ã¥È±é»»»Ò¤ÇÏ¢·ë¤·¤Æ + : »ØÄê ) ¤òÄê¿ô¤È¤·¤ÆÄêµÁ¤·¤¿¥â¥¸¥å¡¼¥ë¡¥°Ê²¼¤ÎÄê¿ô¤¬´Þ¤Þ¤ì¤ë¡¥ + + Äê¿ô NONE + : ÃÍ¤Ï 0 ¤Ç¡¤ÃͤȤ·¤Æ¤Ï¤¤¤«¤Ê¤ë¼ïÎà¤Î¥¤¥Ù¥ó¥È¤â»ØÄꤷ¤Æ¤¤¤Ê¤¤ + : ¤³¤È¤Ë¤Ê¤ë¤¬¡¤¼ÂºÝ¤Î½èÍý¾å¤Ï ALL ¤ÈƱ¤¸¤È¤·¤Æ°·¤ï¤ì¤ë¡¥ + + Äê¿ô WINDOW + : window ¥¤¥Ù¥ó¥È¤ò½èÍýÂоݤȤ¹¤ë + + Äê¿ô FILE + : file ¥¤¥Ù¥ó¥È¤ò½èÍýÂоݤȤ¹¤ë + + Äê¿ô TIMER + : timer ¥¤¥Ù¥ó¥È¤ò½èÍýÂоݤȤ¹¤ë + + Äê¿ô IDLE + : ¥¢¥¤¥É¥ë¥ë¡¼¥×½èÍý ( ºÆÉÁ²è¤Ê¤É¡¤Â¾¤Î¼ïÎà¤Î¥¤¥Ù¥ó¥È¤¬È¯À¸ + : ¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ë¹Ô¤ï¤ì¤ë½èÍý ) ¤ò½èÍýÂоݤȤ¹¤ë + + Äê¿ô ALL + : ¤¹¤Ù¤Æ¤Î¼ïÎà¤Î¥¤¥Ù¥ó¥È¤ò½èÍýÂоݤȤ¹¤ë + : WINDOW|FILE|TIMER|IDLE ¤ÈƱ¤¸ + + Äê¿ô DONT_WAIT + : ½èÍýÂоݥ¤¥Ù¥ó¥È¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ë¡¤¥¤¥Ù¥ó¥ÈȯÀ¸¤òÂÔ¤¿¤º + : ¤Ë do_one_event ¤ò½ªÎ» ( false ¤òÊÖ¤¹ ) ¤¹¤ë + + ¥â¥¸¥å¡¼¥ë TclTkLib::VarAccessFlag + : _get_variable ¤Ê¤É¤Ç¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤¿¤á¤Î¤â¤Î¡¥¥Õ¥é¥°¤Ë + : ¤Ï°Ê²¼¤ÎÄê¿ô¤ò OR ¤ÇÏ¢·ë¤·¤ÆÍ¿¤¨¤ë¡¥ + + Äê¿ô NONE + : ÃÍ¤Ï 0 ¤Ç¡¤²¿¤â¥Õ¥é¥°¤ò»ØÄꤷ¤Æ¤¤¤Ê¤¤¤Î¤ËÅù¤·¤¤¡¥ + + Äê¿ô GLOBAL_ONLY + : Ä̾ÊÑ¿ô¤Î¸¡º÷¤Ï¤Þ¤º¼ê³¤­¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥ì¥Ù¥ë¤Ç¸¡ + : º÷¤·¡¤¼¡¤Ë¸½ºß¤Î̾Á°¶õ´Ö¤Ç¸¡º÷¡¤ºÇ¸å¤Ë¥°¥í¡¼¥Ð¥ë¶õ´Ö¤Ç + : ¸¡º÷¤ò¹Ô¤¦¡¥¤·¤«¤·¡¤¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¤¥° + : ¥í¡¼¥Ð¥ë¶õ´Ö¤Ç¤Î¤ß¸¡º÷¤¹¤ë¡¥ + : ¤â¤· GLOBAL_ONLY ¤È NAMESPACE_ONLY ¤È¤¬Î¾Êý»ØÄꤵ¤ì¤¿¾ì + : ¹ç¤Ë¤Ï¡¤GLOBAL_ONLY ¤Î»ØÄê¤Ï̵»ë¤µ¤ì¤ë¡¥ + + Äê¿ô NAMESPACE_ONLY + : ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¤¸½ºß¤Î̾Á°¶õ´Ö¤Ç¤Î¤ßÊÑ + : ¿ô¤Î¸¡º÷¤ò¹Ô¤¦¡¥GLOBAL_ONLY ¤ÎÀâÌÀ¤â»²¾È¤¹¤ë¤³¤È¡¥ + + Äê¿ô LEAVE_ERR_MSG + : ÊÑ¿ô¥¢¥¯¥»¥¹¤Ë¤ª¤¤¤Æ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¡¤¤³¤Î¥Õ¥é¥°¤¬ + : »ØÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¤¼Â¹Ô·ë²Ì¤È¤·¤Æ Tcl ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ë¥¨ + : ¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬»Ä¤µ¤ì¤ë¡¥¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤± + : ¤ì¤Ð¡¤¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤Ï°ìÀڻĤµ¤ì¤Ê¤¤¡¥ + + Äê¿ô APPEND_VALUE + : ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç¡¤ÊÑ¿ô¤ÎÃͤòÃÖ¤­´¹¤¨¤Î¤Ç + : ¤Ï¤Ê¤¯¡¤¸½ºß¤ÎÃͤËÂåÆþÃͤ¬Äɲà (append; ʸ»úÎóÏ¢·ë) ¤µ + : ¤ì¤ë¡¥ÊÑ¿ô¤¬Ì¤ÄêµÁ¤¢¤Ã¤¿¾ì¹ç¡¤¤³¤Î¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡¥ + + Äê¿ô LIST_ELEMENT + : ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç¡¤ÂåÆþÃͤϤޤº Tcl ¤Î¥ê¥¹ + : ¥ÈÍ×ÁǤȤ·¤ÆŬÀڤȤʤë¤è¤¦¤ËÊÑ´¹¤µ¤ì¤ë¡¥ÂåÆþÃͤ¬¥ê¥¹¥È + : (¤Þ¤¿¤Ï¥µ¥Ö¥ê¥¹¥È) ¤ÎºÇ½é¤ÎÍ×ÁǤȤʤë¤Î¤Ç¤Ê¤¤¸Â¤ê¡¤ÂåÆþ + : ÃͤÎľÁ°¤Ë¤Ï¶õÇòʸ»ú¤¬Äɲ䵤ì¤ë¡¥ + + Äê¿ô PARSE_VARNAME + : _set_variable ¤Ê¤É¤Î¸Æ¤Ó½Ð¤·¤Ë¤ª¤¤¤Æ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ + : ¤ì¤Æ¤¤¤¿¾ì¹ç¡¤var_name °ú¿ô¤¬Ï¢ÁÛÇÛÎó̾¤ÈÍ×ÁÇ̾¤È¤òξÊý + : ´Þ¤à²ÄǽÀ­¤¬¤¢¤ë (³«¤­³ç¸Ì¤ò´Þ¤ß¡¤ÊĤ¸³ç¸Ì¤Ç½ª¤ï¤ë) ¤³ + : ¤È¤ò¼¨¤¹¡¥¤½¤Î¾ì¹ç¡¤³ç¸Ì¤Î´Ö¤¬Í×ÁÇ̾»ØÄꡤºÇ½é¤Î³«¤­³ç + : ¸Ì¤Þ¤Ç¤¬Ï¢ÁÛÇÛÎó̾¤È¤·¤Æ°·¤ï¤ì¤ë¡¥_set_variable2 ¤Ê¤É¤Ç + : ¤³¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¾ì¹ç¡¤Ï¢ÁÛÇÛÎó̾¤ÈÍ×ÁÇ̾¤Ï var_name + : ¤«¤éÃê½Ð¤µ¤ì¤ë¤Ï¤º¤Ç¤¢¤ë¤«¤é¡¤index_name °ú¿ô¤Ï nil ¤È + : ¤»¤Í¤Ð¤Ê¤é¤Ê¤¤¡¥ + + ¥â¥¸¥å¡¼¥ë TclTkLib::RELEASE_TYPE + : Tcl/Tk ¤Î¥ê¥ê¡¼¥¹¥¿¥¤¥×ÈÖ¹æ¤ÎÄêµÁ + + Äê¿ô ALPHA + : ALPHA ¥ê¥ê¡¼¥¹ + + Äê¿ô BETA + : BETA ¥ê¥ê¡¼¥¹ + + Äê¿ô FINAL + : FINAL ¥ê¥ê¡¼¥¹ + + ¥â¥¸¥å¡¼¥ë¥á¥½¥Ã¥É + get_version() + : Tcl/Tk ¤Î major, minor, release-type ÈÖ¹æ, release-type ̾, + : patchlevel ¤òÇÛÎó¤Ë¤·¤ÆÊÖ¤¹¡¥ + + mainloop(check_root = true) + : ¥¤¥Ù¥ó¥È¥ë¡¼¥×¤òµ¯Æ°¤¹¤ë¡¥check_root ¤¬ true ¤Ç¤¢¤ì¤Ð¡¤ + : root widget ¤¬Â¸ºß¤¹¤ë¸Â¤ê¡¤¤³¤Î¥á¥½¥Ã¥É¤Ï½ªÎ»¤·¤Ê¤¤¡¥ + : check_root ¤¬ false ¤Î¾ì¹ç¤Ï¡¤root widget ¤¬¾ÃÌǤ·¤Æ¤â + : ¤³¤Î¥á¥½¥Ã¥É¤Ï½ªÎ»¤·¤Ê¤¤ ( root widget ¤¬¾ÃÌǤ·¤Æ¤â¡¤ + : WINDOW °Ê³°¤Î¥¤¥Ù¥ó¥È¤ÏȯÀ¸¤·¤¦¤ë¤¿¤á )¡¥½ªÎ»¤Ë¤Ï¡¤³°Éô + : ¤«¤é¤ÎƯ¤­³Ý¤± ( ¥¹¥ì¥Ã¥É¤ò³èÍѤ¹¤ë¤Ê¤É ) ¤¬É¬Íס¥ + + mainloop_thread? + : ¥«¥ì¥ó¥È¥¹¥ì¥Ã¥É¤¬¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥¹¥ì¥Ã¥É + : ¤«¤É¤¦¤«¤òÊÖ¤¹¡¥ + : ¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥¹¥ì¥Ã¥É¤Ç¤¢¤ì¤Ð true ¤ò¡¤ + : ¤É¤Î¥¹¥ì¥Ã¥É¤Ç¤â¥¤¥Ù¥ó¥È¥ë¡¼¥×¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï + : nil ¤ò¡¤Â¾¤Î¥¹¥ì¥Ã¥É¤Ç¥¤¥Ù¥ó¥È¥ë¡¼¥×¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¾ì + : ¹ç¤Ï false ¤òÊÖ¤¹¡¥ + : false ¤ÎºÝ¤Ë Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤òľÀÜ¸Æ¤Ö¤Î¤Ï´í¸±¤Ç¤¢¤ë¡¥ + + mainloop_watchdog(check_root = true) + : Ä̾ï¤Î¥¤¥Ù¥ó¥È¥ë¡¼¥×¤Ç¤Ï¡¤¥¤¥Ù¥ó¥È½èÍý¤ÎÆâÍƤˤè¤Ã¤Æ¤Ï + : ¥Ç¥Ã¥É¥í¥Ã¥¯¤ò°ú¤­µ¯¤³¤¹²ÄǽÀ­¤¬¤¢¤ë (Î㤨¤Ð¥¤¥Ù¥ó¥È¤Ë + : ÂФ¹¤ë¥³¡¼¥ë¥Ð¥Ã¥¯½èÍýÃæ¤Ç widget Áàºî¤ò¤·¡¤¤½¤Î½ªÎ»¤ò + : ÂԤĤʤÉ)¡¥¤³¤Î¥á¥½¥Ã¥É¤Ï¡¤¤½¤¦¤·¤¿¥Ç¥Ã¥É¥í¥Ã¥¯¤ò²óÈò¤¹ + : ¤ë¤¿¤á¤Î´Æ»ë¥¹¥ì¥Ã¥ÉÉÕ¤­¤Ç¥¤¥Ù¥ó¥È¥ë¡¼¥×¤òµ¯Æ°¤¹¤ë + : ( ´Æ»ë¥¹¥ì¥Ã¥É¤òÀ¸À®¤·¤¿¸å¤Ë¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ò¼Â¹Ô¤¹¤ë )¡¥ + : °ú¿ô¤Î°ÕÌ£¤Ï mainloop ¤ÈƱ¤¸¤Ç¤¢¤ë¡¥ + + do_one_event(flag = TclTkLib::EventFlag::ALL | + TclTkLib::EventFlag::DONT_WAIT) + : ½èÍýÂÔ¤Á¤Î¥¤¥Ù¥ó¥È 1 ¸Ä¤ò¼Â¹Ô¤¹¤ë¡¥ + : ¥¤¥Ù¥ó¥È¤ò½èÍý¤·¤¿¾ì¹ç¤Ï true ¤òÊÖ¤¹¡¥ + : ¥Õ¥é¥°¤Ç DONT_WAIT ¤ò»ØÄꤷ¤Æ¤¤¤Ê¤¤¾ì¹ç¡¤¥Õ¥é¥°¤Ç½èÍýÂÐ + : ¾Ý¤È¤Ê¤Ã¤Æ¤¤¤ë¼ïÎà¤Î¥¤¥Ù¥ó¥È¤¬È¯À¸¤¹¤ë¤Þ¤ÇÂÔ¤Á³¤±¤ë¡¥ + : DONT_WAIT ¤ò»ØÄꤷ¤Æ¤¤¤¿¾ì¹ç¡¤½èÍýÂоݥ¤¥Ù¥ó¥È¤¬¤Ê¤¯¤Æ¤â + : ¤¹¤°¤Ë½ªÎ»¤· false ¤òÊÖ¤¹¡¥ + : $SAFE >= 4 ¤«¡¤$SAFE >= 1 ¤«¤Ä flag ¤¬±øÀ÷¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¤Ð + : flag ¤Ë¤Ï DONT_WAIT ¤¬¶¯À©Åª¤ËÉÕ¤±¤é¤ì¤ë¡¥ + + set_eventloop_tick(timer_tick) + : ¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ÈƱ»þ¤ËÊÌ¥¹¥ì¥Ã¥É¤¬²ÔƯ¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¡¤»þ + : ´Ö¤Ë´ð¤Å¤¤¤¿¶¯À©Åª¤Ê¥¹¥ì¥Ã¥É¥¹¥¤¥Ã¥Á¥ó¥°¤ò¤É¤ÎÄøÅÙ¤ÎÉÑÅÙ + : ( »þ´Ö´Ö³Ö ) ¤ÇȯÀ¸¤µ¤»¤ë¤«¤ò¥ß¥êÉÃñ°Ì¤ÎÀ°¿ôÃͤǻØÄꤹ¤ë¡¥ + : 0 ¤ò»ØÄꤹ¤ë¤È¡¤¤³¤Î¶¯À©Åª¤Ê¥¹¥¤¥Ã¥Á¥ó¥°¤Ï¹Ô¤ï¤ì¤Ê¤¤¡¥ + : ɸ½à¤Ç¤Ï 0 ¤ËÀßÄꤵ¤ì¤Æ¤ª¤ê¡¤¥¤¥Ù¥ó¥È½èÍý¿ô¤Ë´ð¤Å¤¯¥¹¥¤¥Ã + : ¥Á¥ó¥°¤À¤±¤¬¹Ô¤ï¤ì¤ë ( see set_eventloop_weight )¡¥ + : ¤¿¤À¤·¡¤²ÔƯ¤·¤Æ¤¤¤ë¥¹¥ì¥Ã¥É¤¬¥¤¥Ù¥ó¥È¥ë¡¼¥×¤À¤±¤Î¾ì¹ç¡¤ + : timer_tick ¤ò 0 ¤ËÀßÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡¥¤â¤·ÀßÄꤵ¤ì¤Æ + : ¤¤¤¿¤é¡¤100 ms ( see NO_THREAD_INTERRUPT_TIME ) ¤Ë¼«Æ°Àß + : Äꤵ¤ì¤ë¡¥ + : ¾ÜºÙ¤ÊÀâÌÀ¤Ïά¤¹¤¬¡¤¤³¤ì¤Ï CPU ¥Ñ¥ï¡¼¤òÀáÌ󤷤ĤİÂÁ´¤Ç + : °ÂÄꤷ¤¿Æ°ºî¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë¼ÂÁõ¤·¤¿»ÅÍͤǤ¢¤ë¡¥ + : $SAFE >= 4 ¤Ç¤Ï¼Â¹Ô¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + get_eventloop_tick + : timer_tick ¤Î¸½ºßÃͤòÊÖ¤¹¡¥ + + set_no_event_wait(no_event_wait) + : Ê£¿ô¤Î¥¹¥ì¥Ã¥É¤¬²ÔƯ¤·¤Æ¤¤¤ë¾ì¹ç¤Ç¡¤½èÍýÂÔ¤Á¥¤¥Ù¥ó¥È¤¬Á´ + : ¤¯Â¸ºß¤·¤Ê¤«¤Ã¤¿ºÝ¤Ë sleep ¾õÂÖ¤ËÆþ¤ë»þ´ÖŤò»ØÄꤹ¤ë¡¥ + : ²ÔƯ¥¹¥ì¥Ã¥É¤¬¥¤¥Ù¥ó¥È¥ë¡¼¥×¤À¤±¤Î¾ì¹ç¤Ë¤Ï°ÕÌ£¤ò¤Ê¤µ¤Ê¤¤¡¥ + : ¥Ç¥Õ¥©¥ë¥È¤ÎÃÍ¤Ï 20 (ms) + : $SAFE >= 4 ¤Ç¤Ï¼Â¹Ô¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + get_no_event_wait + : no_event_wait ¤Î¸½ºßÃͤòÊÖ¤¹¡¥ + + set_eventloop_weight(loop_max, no_event_tick) + : Ê£¿ô¤Î¥¹¥ì¥Ã¥É¤¬²ÔƯ¤·¤Æ¤¤¤ëºÝ¤Ë Ruby/Tk ¤Î¥¤¥Ù¥ó¥È¥ë¡¼ + : ¥×¤Ë³ä¤êÅö¤Æ¤ëÈæ½Å¤òÄê¤á¤ë¤¿¤á¤Î¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤹ¤ë¡¥ + : ²ÔƯ¥¹¥ì¥Ã¥É¤¬¥¤¥Ù¥ó¥È¥ë¡¼¥×¤À¤±¤Î¾ì¹ç¤Ë¤Ï°ÕÌ£¤ò¤Ê¤µ¤Ê¤¤¡¥ + : °ìÅ٤Υ¹¥ì¥Ã¥ÉÀÚ¤êÂؤ¨¤Î´Ö¤Ë½èÍý¤¹¤ë¥¤¥Ù¥ó¥È¤ÎºÇÂç¿ô¤È¡¤ + : ½èÍýÂÔ¤Á¤Î¥¤¥Ù¥ó¥È¤¬Â¸ºß¤·¤Ê¤¤ºÝ¤Î²Ã»»¿ô¤È¤òÀßÄꤹ¤ë¡¥ + : ½èÍýÂÔ¤Á¥¤¥Ù¥ó¥È¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï no_event_wait ( see + : set_no_event_wait ) ¤À¤±¤Î´Ö sleep ¾õÂÖ¤ËÆþ¤ë¡¥ + : ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¤½¤ì¤¾¤ì 800 ²ó¤È 10 ²ó¡¤¤Ä¤Þ¤ê¡¤800 ¸Ä¤Î¥¤ + : ¥Ù¥ó¥È (¥¢¥¤¥É¥ë¥¤¥Ù¥ó¥È¤ò´Þ¤à) ¤ò½èÍý¤¹¤ë¤È¤«¡¤¥¤¥Ù¥ó¥È + : ¤¬Á´¤¯È¯À¸¤·¤Ê¤¤¤Þ¤Þ¤Ë 80 ²ó¤Î½èÍýÂÔ¤Á¥¤¥Ù¥ó¥È¸¡ºº¤¬´°Î» + : ¤¹¤ë¤È¤«¤Ç¥«¥¦¥ó¥È¤¬ 800 °Ê¾å¤Ë¤Ê¤ë¤È¥¹¥ì¥Ã¥É¥¹¥¤¥Ã¥Á¥ó¥° + : ¤¬È¯À¸¤¹¤ë¤³¤È¤Ë¤Ê¤ë¡¥ + : $SAFE >= 4 ¤Ç¤Ï¼Â¹Ô¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + get_eventloop_weight + : ¸½ºß¤Î loop_max ¤È no_event_tick ¤È¤ÎÃͤòÊÖ¤¹¡¥ + : ( see set_eventloop_wait ) + + mainloop_abort_on_exception=(bool) + : Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¾å¤ÇÎã³°¤òȯÀ¸¤·¤¿ºÝ¤Ë¡¤¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ò + : ¥¨¥é¡¼Ää»ß¤µ¤»¤ë¤«¤É¤¦¤«¤ò»ØÄꤹ¤ë¡¥true ¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï + : ¥¨¥é¡¼Ää»ß¤¹¤ë¤¬¡¤false ¤Î¾ì¹ç¤ÏÎã³°¤ò̵»ë¤·¤Æ¥¤¥Ù¥ó¥È¥ë¡¼ + : ¥×¤ò·Ñ³¤¹¤ë¡¥¤µ¤é¤Ë nil ¤Î¾ì¹ç¤Ï·Ù¹ð¥â¡¼¥É¤Ç¤Ê¤¤¸Â¤ê¤Ï¥¨ + : ¥é¡¼¥á¥Ã¥»¡¼¥¸¤Î½ÐÎϤ¹¤é¾Êά¤·¤Æ¡¤Îã³°¤ò̵»ë¤¹¤ë¡¥ + : ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï true ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¡¥ + : £±¸Ä¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤À¤±¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¥¨¥é¡¼»þ¤Ë¤½¤Î + : ¤Þ¤ÞÄä»ß¤·¤Æ¤âÄ̾ï¤ÏÌäÂê¤Ê¤¤¤¬¡¤Ê£¿ô¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬Æ±»þ + : ¤ËÆ°ºî¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¤¤½¤ì¤é¤ò´ÉÍý¤¹¤ë¥¤¥Ù¥ó¥È¥ë¡¼¥×¤Ï£± + : ¸Ä¤À¤±¤Ç¤¢¤ë¤¿¤á¡¤¤¤¤º¤ì¤«¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î¥¨¥é¡¼¤¬¸¶°ø¤Ç¡¤ + : ¾¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î½èÍý·Ñ³¤¬ÉÔ²Äǽ¤Ë¤Ê¤ë¤³¤È¤¬¤¢¤ë¡¥¤½¤Î + : ¤è¤¦¤Ê¾ì¹ç¤Ç¤â¥¨¥é¡¼¤ò̵»ë¤·¤Æ¥¤¥Ù¥ó¥È¥ë¡¼¥×¤¬²ÔƯ¤ò³¤±¤ë + : ¤³¤È¤Ç¡¤Â¾¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬Àµ¾ï¤ËÆ°ºî¤·Â³¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡¥ + : $SAFE >= 4 ¤Ç¤Ï¼Â¹Ô¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + mainloop_abort_on_exception + : Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¾å¤ÇÎã³°¤òȯÀ¸¤·¤¿ºÝ¤Ë¡¤¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ò¥¨ + : ¥é¡¼Ää»ß¤µ¤»¤ë¤«¤É¤¦¤«¤ÎÀßÄê¾õÂÖ¤ò true/false ¤ÇÆÀ¤ë¡¥ + + num_of_mainwindows + : ¸½ºß¤Î¥á¥¤¥ó¥¦¥£¥ó¥É¥¦ (¥ë¡¼¥È¥¦¥£¥¸¥§¥Ã¥È) ¤Î¿ô¤òÊÖ¤¹¡¥ + : ¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤Ï°ì¤Ä¤Î¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ËÉÕ¤­ºÇÂç°ì¤Ä¤Ç¤¢¤ë + : ¤Î¤Ç¡¤¤³¤ÎÃͤϸ½ºß Tk ¤Îµ¡Ç½¤¬Í­¸ú¤Ç¤¢¤ë¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ÎÁí + : ¿ô¤ËÅù¤·¤¤¡¥ + + _merge_tklist(str, str, ... ) + : Tcl/Tk ¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤ò»È¤Ã¤Æ¡¤°ú¿ô¤Îʸ»úÎ󤬤½¤ì¤¾¤ì + : Àµ¤·¤¯°ì¤Ä¤Î¥ê¥¹¥ÈÍ×ÁǤȤʤë¤è¤¦¤ËÏ¢·ë¤·¤¿Ê¸»úÎó¤òÊÖ¤¹¡¥ + + _conv_listelement(str) + : Tcl/Tk ¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤ò»È¤Ã¤Æ¡¤°ú¿ô¤Îʸ»úÎó¤¬ Tcl ¤Î + : °ì¤Ä¤Î¥ê¥¹¥ÈÍ×ÁǤȤ·¤ÆŬÀÚ¤Êɽ¸½¤Ë¤Ê¤ë¤è¤¦¤ËÊÑ´¹¤·¤¿Ê¸ + : »úÎó¤òÊÖ¤¹¡¥ + + _toUTF8(str, encoding=nil) + _fromUTF8(str, encoding=nil) + : Tcl/Tk ¤¬Æ⢤·¤Æ¤¤¤ë UTF8 ÊÑ´¹½èÍý¤ò¸Æ¤Ó½Ð¤¹¡¥ + + _subst_UTF_backslash(str) + _subst_Tcl_backslash(str) + : Tcl ¤Î¥ë¡¼¥ë¤Ç¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥åµ­Ë¡ ( \uhhhh ¤Ë¤è¤ë + : Unicode ʸ»úɽ¸½¤ò´Þ¤à ) ¤ò²òÀϤ¹¤ë¡¥ + : _subst_Tcl_backslash ¤Ï¤¹¤Ù¤Æ¤Î¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥åµ­Ë¡¤ò + : ÃÖ¤­´¹¤¨¤ë¤Î¤ËÂФ·¡¤_subst_UTF_backslash ¤Ï \uhhhh + : ¤Ë¤è¤ë Unicode ʸ»úɽ¸½¤À¤±¤òÃÖ¤­´¹¤¨¤ë¡¥ + + encoding_system + encoding_system=(encoding) + : Tcl ¤Î system encoding ¤Î³ÍÆÀ¤ª¤è¤ÓÀßÄê + + encoding + encoding=(encoding) + : encoding_system / encoding_system= ¤Î alias + : ( Ruby/Tk ¤Î tk.rb ¤Ç¤ÏÃÖ¤­´¹¤¨¤é¤ì¤ëͽÄê¤Î¤â¤Î¡¥) + + +¥¯¥é¥¹ TclTkIp + ¥¯¥é¥¹¥á¥½¥Ã¥É + new(ip_name=nil, options='') + : TclTkIp ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤¹¤ë¡¥ + : ip_name ¤Ëʸ»úÎó¤òÍ¿¤¨¤¿¾ì¹ç¤Ï¡¤¤½¤ì¤¬ winfo interps ¤Ê¤É¤Ç + : ɽ¼¨¤µ¤ì¤ë̾Á°¤Ë¤Ê¤ë¡¥ + : options ¤Ë¤Ï¡¤-geometry ¤ä -use ¤Ê¤É¡¤wish ¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó + : °ú¿ô¤È¤·¤ÆÍ¿¤¨¤ë¥ª¥×¥·¥ç¥ó¤ÈƱÍͤξðÊó¤òʸ»úÎó¤È¤·¤ÆÍ¿¤¨¤ë¡¥ + : Í¿¤¨¤é¤ì¤¿¾ðÊó¤Ï¡¤root widget À¸À®¤ÎºÝ¤ËÍѤ¤¤é¤ì¤ë¡¥ + : ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) + : ¤â¤· options ¤Ë´º¤¨¤Æ nil ¤Þ¤¿¤Ï false ¤òÍ¿¤¨¤¿¾ì¹ç¡¤Tk ¥é¥¤ + : ¥Ö¥é¥ê¤¬Æ³Æþ¤µ¤ì¤Æ¤¤¤Ê¤¤ (¤Ä¤Þ¤ê¤Ï Tcl ¤Î¤ß¤Î) ¥¤¥ó¥¿¡¼¥×¥ê + : ¥¿¤òÀ¸À®¤¹¤ë¡¥¤³¤Î¾ì¹ç¤Ï GUI ´Ä¶­¤ÏɬÍפʤ¤¤¿¤á¡¤¥¦¥¤¥ó¥É¥¦ + : ¥·¥¹¥Æ¥à¤¬Â¸ºß¤·¤Ê¤¤¡¤¤Þ¤¿¤Ï»ÈÍѤǤ­¤Ê¤¤´Ä¶­¤Ç¤â Tcl ¥¤¥ó¥¿¡¼ + : ¥×¥ê¥¿¤òÀ¸À®¤·¡¤Tcl ¤ä¤½¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ò³èÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡¥ + + ¥¤¥ó¥¹¥¿¥ó¥¹¥á¥½¥Ã¥É + create_slave(name, safe=false) + : ¥ì¥·¡¼¥Ð¤ò¿Æ¤È¤¹¤ë name ¤È¤¤¤¦Ì¾Á°¤Î¥¹¥ì¡¼¥Ö¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ò + : À¸À®¤¹¤ë¡¥ + : safe ¤Ë¤ÏÀ¸À®¤¹¤ë¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ò safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤È¤¹¤ë + : ¤«¤ò»ØÄꤹ¤ë¡¥¥Ç¥Õ¥©¥ë¥È¤Ï false ¤È¤¤¤¦¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¬¡¤ + : ¤¿¤È¤¨ÌÀ³Î¤Ë false ¤ò»ØÄꤷ¤Æ¤¤¤¿¤È¤·¤Æ¤â¡¤¿Æ¤È¤Ê¤ë¥¤¥ó¥¿¡¼ + : ¥×¥ê¥¿¤¬ safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ç¤¢¤ì¤Ð¡¤¤½¤ÎÀßÄê¤ò°ú¤­·Ñ¤¤¤Ç + : safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤È¤·¤ÆÀ¸À®¤µ¤ì¤ë¡¥ + : $SAFE >= 4 ¤Ç¤Ï¡¤safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿°Ê³°¤ÎÀ¸À®¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + make_safe + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ò safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ËÊѹ¹¤¹¤ë¡¥ + : Ìá¤êÃͤϥ쥷¡¼¥Ð¤Ç¤¢¤ë¥¤¥ó¥¿¡¼¥×¥ê¥¿¼«¿È¤Ç¤¢¤ë¡¥ + : ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï RuntimeError ¤ÎÎã³°¤òȯÀ¸¤¹¤ë¡¥ + + safe? + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬ safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ç¤¢¤ë¤«¤òÄ´¤Ù¤ë¡¥ + : safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ç¤¢¤ì¤Ð true ¤òÊÖ¤¹¡¥ + + allow_ruby_exit? + : ÂоݤȤʤ륤¥ó¥¿¡¼¥×¥ê¥¿¾å¤Îɾ²Á¤Ç¡¤ruby ¤Î exit ´Ø¿ô¤Þ¤¿¤Ï + : Tcl/Tk ¾å¤Î exit ¥³¥Þ¥ó¥É¤Ë¤è¤Ã¤Æ ruby ¼«ÂΤò½ªÎ»¤µ¤»¤ë¤³¤È + : ¤òµö¤¹¤«¤É¤¦¤«¤òÊÖ¤¹¡¥ + : µö¤µ¤Ê¤¤¾ì¹ç¤ÏÂоݤΥ¤¥ó¥¿¡¼¥×¥ê¥¿¤À¤±¤¬½ªÎ»¤¹¤ë¡¥ + : ¥Þ¥¹¥¿¡¼¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï true¡¤¥¹¥ì¡¼¥Ö¥¤¥ó¥¿¡¼ + : ¥×¥ê¥¿¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï false ¤Ç¤¢¤ë¡¥ + + allow_ruby_exit=(mode) + : ÂоݤȤʤ륤¥ó¥¿¡¼¥×¥ê¥¿¤Î allow_ruby_exit? ¤Î¾õÂÖ¤òÊѹ¹¤¹¤ë¡¥ + : $SAFE >= 4 ¤Þ¤¿¤Ï¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬ safe ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î¾ì¹ç¤Ï + : Êѹ¹¤¬µö¤µ¤ì¤Ê¤¤ (Îã³°¤òȯÀ¸)¡¥ + + delete + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤ò delete ¤¹¤ë¡¥ + : delete ¤µ¤ì¤¿¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ï¡¤°Ê¸å°ìÀÚ¤ÎÁàºî¤¬¤Ç¤­¤Ê¤¯¤Ê¤ê¡¤ + : ¥³¥Þ¥ó¥É¤òÁ÷¤Ã¤Æ¤âÎã³°¤òȯÀ¸¤¹¤ë¤è¤¦¤Ë¤Ê¤ë¡¥ + + deleted? + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬¤¹¤Ç¤Ë delete ¤µ¤ì¤Æ¤¤¤ë¤«¤òÄ´¤Ù¤ë¡¥ + : delete ºÑ¤ß¤Ç¥³¥Þ¥ó¥É¤ò¼õ¤±ÉÕ¤±¤Ê¤¤¾õÂ֤ˤʤäƤ¤¤ë¤Ê¤é¤Ð + : true ¤òÊÖ¤¹¡¥ + + has_mainwindow? + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ë¥á¥¤¥ó¥¦¥£¥ó¥É¥¦ (root widget) ¤¬ + : ¸ºß¤¹¤ì¤Ð true ¤ò¡¤Â¸ºß¤·¤Ê¤±¤ì¤Ð false ¤òÊÖ¤¹¡¥ + : ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤¬´û¤Ë delete ºÑ¤ß¤Ç¤¢¤ì¤Ð nil ¤òÊÖ¤¹¡¥ + + restart + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î Tk Éôʬ¤Î½é´ü²½¡¤ºÆµ¯Æ°¤ò¹Ô¤¦¡¥ + : °ìö root widget ¤òÇ˲õ¤·¤¿¸å¤ËºÆÅÙ Tk ¤Îµ¡Ç½¤¬É¬Í×¤È + : ¤Ê¤Ã¤¿¾ì¹ç¤ËÍѤ¤¤ë¡¥ + : $SAFE >= 4 ¤Ç¤Ï¼Â¹Ô¤¬¶Ø»ß¤µ¤ì¤ë¡¥ + + _eval(str) + _invoke(*args) + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¾å¤Çɾ²Á¤ò¹Ô¤¦¡¥ + : _eval ¤Ïɾ²Á¥¹¥¯¥ê¥×¥È¤¬°ì¤Ä¤Îʸ»úÎó¤Ç¤¢¤ë¤³¤È¤ËÂФ·¡¤ + : _invoke ¤Ïɾ²Á¥¹¥¯¥ê¥×¥È¤Î token ¤´¤È¤Ë°ì¤Ä¤Î°ú¿ô¤È¤Ê + : ¤ë¤è¤¦¤ËÍ¿¤¨¤ë¡¥ + : _invoke ¤ÎÊý¤Ï Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Î»ú¶ç²òÀÏ´ï¤òÍѤ¤ + : ¤Ê¤¤¤¿¤á¡¤É¾²Á¤ÎÉé²Ù¤¬¤è¤ê¾¯¤Ê¤¯¤Æ¤¹¤à¡¥¤¿¤À¤·¡¤¤½¤ÎÂå + : ¤ï¤ê¤Ë auto_load ¤Î¤è¤¦¤Êµ¡¹½¤ÏƯ¤«¤º¡¤load Åù¤Ë¤è¤Ã¤Æ + : Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿¾å¤Ë´û¤ËÅÐÏ¿ºÑ¤ß¤Î¥³¥Þ¥ó¥É¤·¤«¸Æ + : ¤Ó½Ð¤¹¤³¤È¤¬¤Ç¤­¤Ê¤¤¡¥ + : _eval ¤Ç¤Ï auto_load µ¡¹½¤¬Æ¯¤¯¤¿¤á¡¤°ìÅÙ _eval ¤ò¼Â¹Ô + : ¤·¤ÆÅÐÏ¿¤ËÀ®¸ù¤·¤µ¤¨¤¹¤ì¤Ð¡¤°Ê¹ß¤Ï _invoke ¤Ç¤âÍøÍÑ¤Ç + : ¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡¥ + + _toUTF8(str, encoding=nil) + _fromUTF8(str, encoding=nil) + : Tcl/Tk ¤¬Æ⢤·¤Æ¤¤¤ë UTF8 ÊÑ´¹½èÍý¤ò¸Æ¤Ó½Ð¤¹¡¥ + + _thread_vwait(var_name) + _thread_tkwait(mode, target) + : ¥¹¥ì¥Ã¥ÉÂбþ¤Î vwait ¤¢¤ë¤¤¤Ï tkwait ÁêÅö¤Î¥á¥½¥Ã¥É¡¥ + : Ä̾ï¤Î vwait ¤¢¤ë¤¤¤Ï tkwait ¥³¥Þ¥ó¥É¤È°Û¤Ê¤ë¤Î¤Ï¡¤¥¤¥Ù¥ó + : ¥È¥ë¡¼¥×¤È¤Ï°Û¤Ê¤ë¥¹¥ì¥Ã¥É¤«¤é¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¤Ë vwait Åù¤Î + : ¥¹¥¿¥Ã¥¯¤È¤ÏÆÈΩ¤Ë¾ò·ï¤ÎÀ®Î©ÂÔ¤Á¤¬¤Ê¤µ¤ì¤ë¤³¤È¤Ç¤¢¤ë¡¥ + : Ä̾ï¤Î vwait / tkwait ¤Ç¤Ï¡¤vwait / tkwait (1) ¤ÎÂÔ¤Á¤ÎÅÓ + : Ãæ¤Ç¤µ¤é¤Ë vwait / tkwait (2) ¤¬¸Æ¤Ð¤ì¤¿¾ì¹ç¡¤ÂÔ¤Á¤ÎÂÐ¾Ý + : ¤È¤Ê¤Ã¤Æ¤¤¤ë¾ò·ï¤ÎÀ®Î©½ç½ø¤¬¤É¤¦¤¢¤ì¡¤(2)->(1) ¤Î½ç¤ÇÂÔ¤Á + : ¤ò½ªÎ»¤·¤ÆÌá¤Ã¤Æ¤¯¤ë¡¥ + : _thread_vwait / _thread_tkwait ¤Ï¡¤¥¤¥Ù¥ó¥È¥ë¡¼¥×¤Î¥¹¥ì¥Ã + : ¥É¤Ç¸Æ¤Ð¤ì¤¿¾ì¹ç¤ÏÄ̾ï¤Î vwait / tkwait ¤ÈƱÍͤËÆ°ºî¤¹¤ë + : ¤¬¡¤¥¤¥Ù¥ó¥È¥ë¡¼¥×°Ê³°¤Î¥¹¥ì¥Ã¥É¤Ç¸Æ¤Ð¤ì¤¿¾ì¹ç¤Ë¤Ï¤½¤Î¥¹ + : ¥ì¥Ã¥É¤òÄä»ß¤µ¤»¤ÆÂÔ¤Á¤ËÆþ¤ê¡¤¾ò·ï¤¬À®Î©¤·¤¿»þ¤Ë¥¹¥ì¥Ã¥É + : ¤Î¼Â¹Ô¤òºÆ³«¤¹¤ë¡¥¡Övwait Åù¤ÎÂÔ¤Á¥¹¥¿¥Ã¥¯¤È¤ÏÆÈΩ¡×¤È¤¤ + : ¤¦°ÕÌ£¤Ï¡¤¤³¤ÎºÆ³«¤Î¥¿¥¤¥ß¥ó¥°¤¬Â¾¤Î¥¹¥ì¥Ã¥É¤Ç¤ÎÂÔ¤Á¾õ¶· + : ¤È¤Ï̵´Ø·¸¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡¥¤Ä¤Þ¤ê¡¤¥¤¥Ù¥ó¥È¥ë¡¼¥×Åù¤Î¾ + : ¤Î¥¹¥ì¥Ã¥É¤Ç vwait Åù¤ÇÂÔ¤Á¤Î¾õÂ֤ˤ¢¤Ã¤¿¤È¤·¤Æ¤â¤½¤Î´°Î» + : ¤òÂԤĤ³¤È¤Ê¤¯¡¤¼«¤é¤ÎÂÔ¤Á¾ò·ï¤¬À®Î©¼¡Â衤½èÍý¤ò·Ñ³¤¹¤ë + : ¤³¤È¤Ë¤Ê¤ë¡¥ + + _return_value + : ľÁ°¤Î Tcl/Tk ¾å¤Ç¤Îɾ²Á¤Î¼Â¹Ô·ë²Ì¤È¤·¤Æ¤ÎÌá¤êÃͤòÊÖ¤¹¡¥ + + _get_variable(var_name, flag) + _get_variable2(var_name, index_name, flag) + : Tcl/Tk ¾å¤Î var ¤È¤¤¤¦ÊÑ¿ô̾¤ÎÊÑ¿ô¤ÎÃͤòÊÖ¤¹¡¥ + : ¤â¤· index_name ¤¬»ØÄê (PARSE_VARNAME ¥Õ¥é¥°¤ÎÀâÌÀ¤â»²¾È) + : ¤µ¤ì¤¿¾ì¹ç¤ÏÏ¢ÁÛÇÛÎó var_name ¤Î index_name ¤ÎÍ×ÁǤòÊÖ¤¹¡¥ + : flag ¤Ë¤ÏÊÑ¿ô¤ò¸¡º÷¤¹¤ëºÝ¤Î¾ò·ï¤ò»ØÄꤹ¤ë¡¥flag ¤ËÍ¿¤¨¤ë + : Ãͤϥ⥸¥å¡¼¥ë TclTkLib::VarAccessFlag ¤ò»²¾È¤¹¤ë¤³¤È¡¥ + + _set_variable(var_name, value, flag) + _set_variable2(var_name, index_name, value, flag) + : Tcl/Tk ¾å¤Î var ¤È¤¤¤¦ÊÑ¿ô̾¤ÎÊÑ¿ô¤ËÃͤòÀßÄꤹ¤ë¡¥ + : ¤â¤· index_name ¤¬»ØÄê (PARSE_VARNAME ¥Õ¥é¥°¤ÎÀâÌÀ¤â»²¾È) + : ¤µ¤ì¤¿¾ì¹ç¤ÏÏ¢ÁÛÇÛÎó var_name ¤Î index_name ¤ÎÍ×ÁǤòÀßÄê + : ¤¹¤ë¡¥ + : flag ¤Ë¤ÏÊÑ¿ô¤ò¸¡º÷¤¹¤ëºÝ¤Î¾ò·ï¤ò»ØÄꤹ¤ë¡¥flag ¤ËÍ¿¤¨¤ë + : Ãͤϥ⥸¥å¡¼¥ë TclTkLib::VarAccessFlag ¤ò»²¾È¤¹¤ë¤³¤È¡¥ + + _unset_variable(var_name) + _unset_variable2(var_name, index_name) + : Tcl/Tk ¾å¤Î var_name ¤È¤¤¤¦ÊÑ¿ô̾¤ÎÊÑ¿ô¤ò¾Ãµî¤¹¤ë¡¥ + : ¤â¤· index_name ¤¬»ØÄê (PARSE_VARNAME ¥Õ¥é¥°¤ÎÀâÌÀ¤â»²¾È) + : ¤µ¤ì¤¿¾ì¹ç¤ÏÏ¢ÁÛÇÛÎó var_name ¤«¤é index_name ¤ÎÍ×ÁǤÀ¤± + : ¤ò¾Ãµî¤¹¤ë¡¥ + + _get_global_var(var_name) + _get_global_var2(var_name, index_name) + _set_global_var(var_name, value) + _set_global_var2(var_name, index_name, value) + _unset_global_var(var_name) + _unset_global_var2(var_name, index_name) + : ¤½¤ì¤¾¤ì¡¤Âбþ¤¹¤ëÊÑ¿ô¥¢¥¯¥»¥¹¥á¥½¥Ã¥É¤Î flag ¤ËÂФ·¤Æ + : (GLOBAL_ONLY | LEAVE_ERR_MSG) ¤òÍ¿¤¨¤¿¤â¤Î¡¥ + + _split_tklist(str) + : Tcl/Tk ¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤ò»È¤Ã¤Æ¡¤Ê¸»úÎó str ¤ò¥ê¥¹¥È¤Ë + : ʬ³ä¤¹¤ë (ʸ»úÎó¤ÎÇÛÎó¤È¤·¤ÆÊÖ¤¹)¡¥ + + _merge_tklist(str, str, ... ) + : Tcl/Tk ¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤ò»È¤Ã¤Æ¡¤°ú¿ô¤Îʸ»úÎ󤬤½¤ì¤¾¤ì + : Àµ¤·¤¯°ì¤Ä¤Î¥ê¥¹¥ÈÍ×ÁǤȤʤë¤è¤¦¤ËÏ¢·ë¤·¤¿Ê¸»úÎó¤òÊÖ¤¹¡¥ + + _conv_listelement(str) + : Tcl/Tk ¤Î¥é¥¤¥Ö¥é¥ê´Ø¿ô¤ò»È¤Ã¤Æ¡¤°ú¿ô¤Îʸ»úÎó¤¬ Tcl ¤Î + : °ì¤Ä¤Î¥ê¥¹¥ÈÍ×ÁǤȤ·¤ÆŬÀÚ¤Êɽ¸½¤Ë¤Ê¤ë¤è¤¦¤ËÊÑ´¹¤·¤¿Ê¸ + : »úÎó¤òÊÖ¤¹¡¥ + + mainloop + mainloop_watchdog + : ¥¹¥ì¡¼¥Ö IP ¤Î¾ì¹ç¤Ë¤Ï¥¤¥Ù¥ó¥È¥ë¡¼¥×¤òµ¯Æ°¤»¤º¤Ë nil ¤òÊÖ¤¹¡¥ + : ¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï°ú¿ô¤ò´Þ¤á¤Æ TclTkLib ¤ÎƱ̾¥á¥½¥Ã¥É¤ËƱ¤¸¡¥ + + do_one_event + : ¥¹¥ì¡¼¥Ö IP ¤Î¾ì¹ç¤Ë¤Ï°ú¿ô¤Î¥¤¥Ù¥ó¥È¥Õ¥é¥°¤Ë DONT_WAIT ¤¬ + : ¶¯À©Åª¤ËÄɲ䵤ì¤ë (¥¤¥Ù¥ó¥ÈÂÔ¤Á¤Ç¥¹¥ê¡¼¥×¤¹¤ë¤³¤È¤Ï¶Ø»ß)¡¥ + : ¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï°ú¿ô¤ò´Þ¤á¤Æ TclTkLib ¤ÎƱ̾¥á¥½¥Ã¥É¤ËƱ¤¸¡¥ + + set_eventloop_tick + get_eventloop_tick + set_no_event_wait + get_no_event_wait + set_eventloop_weight + get_eventloop_weight + mainloop_abort_on_exception + mainloop_abort_on_exception= + : ¥¹¥ì¡¼¥Ö IP ¤Î¾ì¹ç¤Ë¤ÏÃͤÎÀßÄ꤬µö¤µ¤ì¤Ê¤¤ (̵»ë¤µ¤ì¤ë)¡¥ + : ¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï°ú¿ô¤ò´Þ¤á¤Æ TclTkLib ¤ÎƱ̾¥á¥½¥Ã¥É¤ËƱ¤¸¡¥ + + encoding_table + : Ruby m17n ÍÑ¤Ë Ruby ¤È Tk ¤È¤Î´Ö¤Î encoding Âбþɽ¤òÊÖ¤¹¡¥ + +¥¯¥é¥¹ TkCallbackBreak < StandardError +¥¯¥é¥¹ TkCallbackContinue < StandardError + : ¤³¤ì¤é¤Ï¥¤¥Ù¥ó¥È¥³¡¼¥ë¥Ð¥Ã¥¯¤Ë¤ª¤¤¤Æ¡¤¥³¡¼¥ë¥Ð¥Ã¥¯½èÍý¤òŬÀÚ¤ËÃæ + : ÃǤ·¤¿¤ê¡¤¼¡¤Î¥Ð¥¤¥ó¥É¥¿¥°¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°½èÍý¤Ë¿Ê¤á¤¿¤ê¤¹¤ë¤³¤È + : ¤ò²Äǽ¤Ë¤¹¤ë¤¿¤á¤ÎÎã³°¥¯¥é¥¹¤Ç¤¢¤ë¡¥ + : ¥³¡¼¥ë¥Ð¥Ã¥¯¤Ç break ¤ä continue ¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë¤Ï¡¤¥³¡¼¥ë¥Ð¥Ã¥¯ + : ¤Ç¤¢¤ë Ruby ¼ê³¤­¤¬ Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿Â¦¤ËŬÀڤʥ꥿¡¼¥ó¥³¡¼ + : ¥É¤òÊÖ¤¹É¬Íפ¬¤¢¤ë¡¥Ruby ¤Î¼ê³¤­¤¬ÉáÄ̤ËÃͤòÊÖ¤¹¤Î¤Ç¤Ï¡¤¤½¤ì¤¬Éá + : Ä̤ÎÌá¤êÃͤǤ¢¤ë¤Î¤«Èݤ«¤ò¶èÊ̤¬¤Ç¤­¤Ê¤¤¤¿¤á¡¤Î㳰ȯÀ¸¤òÍøÍѤ·¤¿ + : ¼ÂÁõ¤ò¹Ô¤Ã¤Æ¤¤¤ë¡¥ + : ¤¿¤À¤·¸½ºß¤Ç¤Ï¡¤¥³¡¼¥ë¥Ð¥Ã¥¯¼ê³¤­¤ò Ruby ¤Î break, next ¤Ç½ªÎ»¤¹ + : ¤ë¤³¤È¤ÇƱÅù¤Î·ë²Ì¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡¥¤½¤ì¤æ¤¨¡¤ + : ¤³¤ì¤é¤ÏɬÍפʤ¤¤â¤Î¤Ç¤Ï¤¢¤ë¤¬¡¤¸ß´¹À­¤Î¤¿¤á¤Ë»Ä¤·¤Æ¤¢¤ë¡¥ + +(eof) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/README.1st b/lib/ruby-1.9.1-rc1/ext/tk/README.1st new file mode 100644 index 0000000..fce5b02 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/README.1st @@ -0,0 +1,19 @@ +If you want to use Ruby/Tk (tk.rb and so on), you must have tcltklib.so +which is working correctly. When you have some troubles on compiling, +please read README.tcltklib and README.ActiveTcl. +Even if there is a tcltklib.so on your Ruby library directry, it will not +work without Tcl/Tk libraries (e.g. libtcl8.4.so) on your environment. +You must also check that your Tcl/Tk is installed properly. + +-------------------------------------------- + ( the following is written in EUC-JP ) + +Ruby/Tk (tk.rb ¤Ê¤É) ¤ò»È¤¤¤¿¤¤¾ì¹ç¤Ë¤Ï¡¤tcltklib.so ¤¬Àµ¤·¤¯Æ°¤¤¤Æ¤¤¤Ê +¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡¥¥³¥ó¥Ñ¥¤¥ë»þ¤Ë²¿¤«ÌäÂ꤬À¸¤¸¤¿¾ì¹ç¤Ï¡¤README.tcltklib +¤ä README.ActiveTcl ¤ò¸«¤Æ¤¯¤À¤µ¤¤¡¥ +¤¿¤È¤¨ Ruby ¤Î¥é¥¤¥Ö¥é¥ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë tcltklib.so ¤¬Â¸ºß¤·¤Æ¤¤¤¿¤È¤·¤Æ +¤â¡¤¼Â¹Ô´Ä¶­¤Ë Tcl/Tk ¥é¥¤¥Ö¥é¥ê (libtcl8.4.so ¤Ê¤É) ¤¬¤Ê¤±¤ì¤Ðµ¡Ç½¤·¤Þ +¤»¤ó¡¥Tcl/Tk ¤¬Àµ¤·¤¯¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤â¥Á¥§¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +========================================================== + Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/README.ActiveTcl b/lib/ruby-1.9.1-rc1/ext/tk/README.ActiveTcl new file mode 100644 index 0000000..3afb3f4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/README.ActiveTcl @@ -0,0 +1,49 @@ +ActiveTcl is ActiveState's quality-assured distribution of Tcl. + +# see +# + +If you want to use ActiveTcl binary package as the Tcl/Tk libraries, +please use the following configure options. + + --with-tcl-dir= + --with-tk-dir= + +And use the followings if you need. + + --with-tcllib= + --with-tklib= + --enable-tcltk-stubs + +For example, when you install ActiveTcl-8.4.x to '/usr/local/ActiveTcl', + + configure --with-tcl-dir=/usr/local/ActiveTcl/ \ + --with-tk-dir=/usr/local/ActiveTcl/ \ + --with-tcllib=tclstub8.4 \ + --with-tklib=tkstub8.4 \ + --enable-tcltk-stubs + +It depends on your environment that you have to add the directory of +ActiveTcl's libraries to your library path when execute Ruby/Tk. +One of the way is to add entries to TCLLIBPATH environment variable, +and one of the others add to LD_LIBRARY_PATH environment variable + +Probably, using TCLLIBPATH is better. The value is appended at the +head of Tcl's 'auto_path' variable. You can see the value of the +variable by using 'Tk::AUTO_PATH.value' or 'Tk::AUTO_PATH.list'. + +For example, on Linux, one of the ways is to use LD_LIBRARY_PATH +environment variable. +------------------------------------------------------------------------- + [bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH \ + ruby your-Ruby/Tk-script + + [bash]$ LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH irb +------------------------------------------------------------------------- +Based on it, the Tcl interpreter changes auto_path variable's value. + +Then, you'll be able to use Tcl/Tk extension libraries included in the +ActiveTcl package (e.g. call TkPackage.require('BWidget'), and then, +use functions/widgets of BWidget extention). + + Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/README.fork b/lib/ruby-1.9.1-rc1/ext/tk/README.fork new file mode 100644 index 0000000..707d78f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/README.fork @@ -0,0 +1,34 @@ +Ruby/Tk does NOT support forking the process on which Tk interpreter +is running (unless NEVER control Tk interpreter under the forked child +process). In the library 'tk.rb', a Tk interpreter is initialized. +Therefore, if you want running Tk under a child process, please call +"require 'tk'" in the child process. + +# If do fork and exec() on the child process, you can +# control Ruby/Tk interpreter on the child process by 'send' command +# of Tcl/Tk. About this, please see Tk.appsend and Tk.rb_appsend, or +# 'remote-tk.rb' and the sample 'sample/remote-ip_sample.rb'. + +For example, the following sample1 will NOT work, and sample2 will +work properly. + +------------------------------------------ +require 'tk' ## init Tk interpreter under parent process + +exit! if fork ## exit parent process + +## child process +TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack +Tk.mainloop +------------------------------------------------------------- + +----------------------------------------- +exit! if fork ## exit main process + +## child process +require 'tk' ## init Tk interpreter under child process +TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack +Tk.mainloop +------------------------------------------------------------- + + 2004/05/22 Hidetoshi NAGAI diff --git a/lib/ruby-1.9.1-rc1/ext/tk/README.macosx-aqua b/lib/ruby-1.9.1-rc1/ext/tk/README.macosx-aqua new file mode 100644 index 0000000..25a8ed8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/README.macosx-aqua @@ -0,0 +1,67 @@ + + *** for MacOS X Aqua (Tcl/Tk Aqua) users *** + +First of all, please read README.tcltklib to use Tcl/Tk Aqua Framework. + +With Tcl/Tk Aqua libraries, current tcltklib somtimes freezes when +using Aqua specific dialogs (e.g. Tk.messageBox). +This is a known bug of Ruby-1.8.4 release. + +When you meet the trouble on your GUI, you'll be able to avoid the trouble +by Tcl/Tk's traditional dialogs. +If you want to do that, please call some of the following bits of script +after "reqruie 'tk'". + +================================================================= +# use a traditional dialog for Tk.chooseColor() +Tk.ip_eval(<<'EOS') + proc ::tk_chooseColor {args} { + return [eval tk::dialog::color:: $args] + } +EOS + +# use a traditional dialog for Tk.getOpenFile() and Tk.getMultipleOpenFile() +Tk.ip_eval(<<'EOS') + proc ::tk_getOpenFile {args} { + if {$::tk_strictMotif} { + return [eval tk::MotifFDialog open $args] + } else { + return [eval ::tk::dialog::file:: open $args] + } + } +EOS + +# use a traditional dialog for Tk.getSaveFile() and Tk.getMultipleSaveFile() +Tk.ip_eval(<<'EOS') + proc ::tk_getSaveFile {args} { + if {$::tk_strictMotif} { + return [eval tk::MotifFDialog save $args] + } else { + return [eval ::tk::dialog::file:: save $args] + } + } +EOS + +# use a traditional dialog for Tk.messageBox() +Tk.ip_eval(<<'EOS') + proc ::tk_messageBox {args} { + return [eval tk::MessageBox $args] + } +EOS + +# use a traditional dialog for Tk.chooseDirectory() +Tk.ip_eval(<<'EOS') + proc ::tk_chooseDirectory {args} { + return [eval ::tk::dialog::file::chooseDir:: $args] + } +EOS +================================================================= + +Each of them replaces the platform specific dialog command to the +traditional one. + +If you use some MultiTkIp objects, probably, you'll have to call the +bits of script for each MultiTkIp object. + +-- +Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/README.tcltklib b/lib/ruby-1.9.1-rc1/ext/tk/README.tcltklib new file mode 100644 index 0000000..8c6dd51 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/README.tcltklib @@ -0,0 +1,85 @@ +To compile 'tcltklib', you must have Tcl/Tk libraries on your environment. +Although 'extconf.rb' script searches Tcl/Tk libraries and header files, +sometimes fails to find them. And then, 'tcltklib' cannot be compiled. If +Tcl/Tk libraries or header files are installed but are not found, you can +give the information by arguments of the 'configure' script. Please give +some or all of the following options. + + --with-tcltkversion= + force version of Tcl/Tk libaray + (e.g. libtcl8.4g.so ==> --with-tcltkversion=8.4g) + + --with-tcllib= (e.g. libtcl8.4.so ==> --with-tcllib=tcl8.4) + --with-tklib= (e.g. libtk8.4.so ==> --with-tklib=tk8.4) + + --enable-tcltk-stubs (if you force to enable stubs) + + --with-tcl-dir= + equal to "--with-tcl-include=/include --with-tcl-lib=/lib" + + --with-tk-dir= + equal to "--with-tk-include=/include --with-tk-lib=/lib" + + --with-tcl-include= the directry contains 'tcl.h' + --with-tk-include= the directry contains 'tk.h' + + --with-tcl-lib= the directry contains 'libtcl.so' + --with-tk-lib= the directry contains 'libtk.so' + + --enable-mac-tcltk-framework (MacOS X) use Tcl/Tk framework + (Obsolete. Please use '--enable-tcltk-framework'.) + + --enable-tcltk-framework use Tcl/Tk framework + + --with-tcltk-framework= the directory contains Tcl/Tk framework; + "/Tcl.framework" and "/Tk.framework". + When this option is given, it is assumed that + --enable-tcltk-framework option is given also. + + --with-tcl-framework-header= + Tcl framework headers directory + (e.g. "/Library/Frameworks/Tcl.framework/Headers") + + --with-tk-framework-header= + Tk framework headers directory + (e.g. "/Library/Frameworks/Tk.framework/Headers") + + + --with-X11 / --without-X11 use / not use the X Window System + + --with-X11-dir= + equal to "--with-X11-include=/include --with-X11-lib=/lib" + + --with-X11-include= the directry contais X11 header files + --with-X11-lib= the directry contais X11 libraries + + +If you forgot to give the options when do 'configure' on toplevel +directry of Ruby sources, please try something like as the followings. + + $ cd ext/tcltklib + $ rm Makefile + $ CONFIGURE_ARGS='--with-tcl-include=/usr/local/include/tcl8.4/ --with-tcllib=tcl8.4 --with-tklib=tk8.4' ruby extconf.rb + + + *** ATTENTION *** +When your Tcl/Tk libraries are compiled with "pthread support", +Ruby/Tk may cause "Hang-up" or "Segmentation Fault" frequently. +If you have such a trouble, please try to use the '--enable-pthread' +option of the 'configure' command and re-compile Ruby sources. +It may help you to avoid this trouble. The following configure +options may be useful. + + --enable-tcl-thread/--disable-tcl-thread + --with-tclConfig-file= + +It is not need that 'tclConfig.sh' is a normal Tcl/Tk's tclConfig.sh. +But the file is expected to include the line "TCL_THREADS=0" or "...=1". +When no "TCL_THREADS=?" line, if Tcl version is 7.x or 8.0 which is +given by "TCL_MAJOR_VERSION=?" line and "TCL_MINOR_VERSION=?" line, +then --disable-tcl-thread is expected. Else, ignore the 'tclConfig.sh'. +If --enable-tcl-thread or --disable-tcl-thread option is given, then +--with-tclConfig-file option is ignored. + +========================================================== + Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/depend b/lib/ruby-1.9.1-rc1/ext/tk/depend new file mode 100644 index 0000000..f7ba322 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/depend @@ -0,0 +1,2 @@ +tcltklib.o: tcltklib.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h stubs.h +stubs.o: stubs.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h stubs.h diff --git a/lib/ruby-1.9.1-rc1/ext/tk/extconf.rb b/lib/ruby-1.9.1-rc1/ext/tk/extconf.rb new file mode 100644 index 0000000..419c79c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/extconf.rb @@ -0,0 +1,440 @@ +# extconf.rb for tcltklib + +require 'mkmf' + +is_win32 = (/mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM) +#is_macosx = (/darwin/ =~ RUBY_PLATFORM) + +have_func("ruby_native_thread_p", "ruby.h") +have_func("rb_errinfo", "ruby.h") +have_func("rb_safe_level", "ruby.h") +have_struct_member("struct RArray", "ptr", "ruby.h") +have_struct_member("struct RArray", "len", "ruby.h") + +def find_framework(tcl_hdr, tk_hdr) + if framework_dir = with_config("tcltk-framework") + paths = [framework_dir] + else + unless tcl_hdr || tk_hdr || + enable_config("tcltk-framework", false) || + enable_config("mac-tcltk-framework", false) + return false + end + paths = ["/Library/Frameworks", "/System/Library/Frameworks"] + end + + checking_for('Tcl/Tk Framework') { + paths.find{|dir| + dir.strip! + dir.chomp!('/') + (tcl_hdr || FileTest.directory?(dir + "/Tcl.framework/") ) && + (tk_hdr || FileTest.directory?(dir + "/Tk.framework/") ) + } + } +end + +tcl_framework_header = with_config("tcl-framework-header") +tk_framework_header = with_config("tk-framework-header") + +tcltk_framework = find_framework(tcl_framework_header, tk_framework_header) + +unless is_win32 + have_library("nsl", "t_open") + have_library("socket", "socket") + have_library("dl", "dlopen") + have_library("m", "log") +end + +tk_idir, tk_ldir = dir_config("tk") +tcl_idir, tcl_ldir = dir_config("tcl") +x11_idir, x11_ldir = dir_config("X11") + +tk_ldir2 = with_config("tk-lib") +tcl_ldir2 = with_config("tcl-lib") +x11_ldir2 = with_config("X11-lib") + +tk_ldir_list = [tk_ldir2, tk_ldir] +tcl_ldir_list = [tcl_ldir2, tcl_ldir] + +tklib = with_config("tklib") +tcllib = with_config("tcllib") +stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs") + +tcltk_version = with_config("tcltkversion") + +use_X = with_config("X11", (! is_win32)) + +def parse_tclConfig(file) + # check tclConfig.sh/tkConfig.sh + tbl = {} + IO.foreach(file){|line| + line.strip! + next if line !~ /^([^\#=][^=]*)=(['"]|)(.*)\2$/ + key, val = $1, $3 + tbl[key] = val.gsub(/\$\{([^}]+)\}/){|s| tbl[$1]} rescue nil + } + tbl +end + +def check_tcltk_version(version) + return [nil, nil] unless version + + version = version.strip + + tclver = version.dup + tkver = version.dup + + major = dot = minor = dot = plvl = ext = nil + + if version =~ /^(\d)(\.?)(\d)(\.?)(\d*)(.*)$/ + major = $1; minor_dot = $2; minor = $3; plvl_dot = $4; plvl = $5; ext = $6 + dot = ! minor_dot.empty? + if plvl_dot.empty? && ! plvl.empty? + minor << plvl + end + elsif version =~ /^(\d)(\.?)(\d?)(.*)$/ + major = $1; minor_dot = $2; minor = $3; ext = $4 + dot = ! minor_dot.empty? + else # unknown -> believe user + return [tclver, tkver] + end + + # check Tcl7.6 / Tk4.2 ? + if major == "7" # Tcl7.6 ( not support Tclversion < 7.6 ) + # Tk4.2 + tkver = "4" + ((dot)? ".": "") + ((minor.empty)? "": "2") + ext + elsif major == "4" # Tk4.2 ( not support Tkversion < 4.2 ) + # Tcl7.6 + tclver = "7" + ((dot)? ".": "") + ((minor.empty)? "": "6") + ext + end + + [tclver, tkver] +end + +def find_tcl(tcllib, stubs, version, *opt_paths) + default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] + default_paths << "/Tcl/lib" # default for ActiveTcl + + if (paths = opt_paths.compact).empty? + paths = default_paths + end + + if stubs + func = "Tcl_InitStubs" + lib = "tclstub" + else + func = "Tcl_FindExecutable" + lib = "tcl" + end + + if version && ! version.empty? + versions = [version] + else + versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6] + end + + if tcllib + st = find_library(tcllib, func, *paths) + else + st = versions.find { |ver| + find_library("#{lib}#{ver}", func, *paths) or + find_library("#{lib}#{ver.delete('.')}", func, *paths) or + find_library("#{lib}#{ver}g", func, *paths) or + find_library("#{lib}#{ver.delete('.')}g", func, *paths) or + find_library("tcl#{ver}", func, *paths) or + find_library("tcl#{ver.delete('.')}", func, *paths) or + find_library("tcl#{ver}g", func, *paths) or + find_library("tcl#{ver.delete('.')}g", func, *paths) + } || (!version && find_library(lib, func, *paths)) + end + + unless st + puts("Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.") + end + st +end + +def find_tk(tklib, stubs, version, *opt_paths) + default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] + default_paths << "/Tcl/lib" # default for ActiveTcl + + if (paths = opt_paths.compact).empty? + paths = default_paths + end + + if stubs + func = "Tk_InitStubs" + lib = "tkstub" + else + func = "Tk_Init" + lib = "tk" + end + + if version && ! version.empty? + versions = [version] + else + versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2] + end + + if tklib + st = find_library(tklib, func, *paths) + else + st = versions.find { |ver| + find_library("#{lib}#{ver}", func, *paths) or + find_library("#{lib}#{ver.delete('.')}", func, *paths) or + find_library("#{lib}#{ver}g", func, *paths) or + find_library("#{lib}#{ver.delete('.')}g", func, *paths) or + find_library("tk#{ver}", func, *paths) or + find_library("tk#{ver.delete('.')}", func, *paths) or + find_library("tk#{ver}g", func, *paths) or + find_library("tk#{ver.delete('.')}g", func, *paths) + } || (!version && find_library(lib, func, *paths)) + end + + unless st + puts("Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.") + end + st +end + +def find_tcltk_header(tclver, tkver) + base_dir = ['/usr/local/include', '/usr/pkg/include', '/usr/include'] + base_dir << '/Tcl/include' # default for ActiveTcl + + unless have_tcl_h = have_header('tcl.h') + if tclver && ! tclver.empty? + versions = [tclver] + else + versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6] + end + paths = base_dir.dup + versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tcl' + ver})} + have_tcl_h = find_header('tcl.h', *paths) + end + + unless have_tk_h = have_header("tk.h") + if tkver && ! tkver.empty? + versions = [tkver] + else + versions = %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2] + end + paths = base_dir.dup + versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tk' + ver})} + have_tk_h = find_header('tk.h', *paths) + end + + have_tcl_h && have_tk_h +end + +def find_X11(*opt_paths) + default_paths = + [ "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib" ] + paths = opt_paths.compact.concat(default_paths) + st = find_library("X11", "XOpenDisplay", *paths) + unless st + puts("Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.") + end + st +end + +def pthread_check() + tcl_major_ver = nil + tcl_minor_ver = nil + + # Is tcl-thread given by user ? + case enable_config("tcl-thread") + when true + tcl_enable_thread = true + when false + tcl_enable_thread = false + else + tcl_enable_thread = nil + end + + if (tclConfig = with_config("tclConfig-file")) + if tcl_enable_thread == true + puts("Warning: --with-tclConfig-file option is ignored, because --enable-tcl-thread option is given.") + elsif tcl_enable_thread == false + puts("Warning: --with-tclConfig-file option is ignored, because --disable-tcl-thread option is given.") + else + # tcl-thread is unknown and tclConfig.sh is given + begin + tbl = parse_tclConfig(tclConfig) + if tbl['TCL_THREADS'] + tcl_enable_thread = (tbl['TCL_THREADS'] == "1") + else + tcl_major_ver = tbl['TCL_MAJOR_VERSION'].to_i + tcl_minor_ver = tbl['TCL_MINOR_VERSION'].to_i + if tcl_major_ver < 8 || (tcl_major_ver == 8 && tcl_minor_ver == 0) + tcl_enable_thread = false + end + end + + if tcl_enable_thread == nil + # cannot find definition + if tcl_major_ver + puts("Warning: '#{tclConfig}' doesn't include TCL_THREADS definition.") + else + puts("Warning: '#{tclConfig}' may not be a tclConfig file.") + end + tclConfig = false + end + rescue Exception + puts("Warning: fail to read '#{tclConfig}'!! --> ignore the file") + tclConfig = false + end + end + end + + if tcl_enable_thread == nil && !tclConfig + # tcl-thread is unknown and tclConfig is unavailable + begin + try_run_available = try_run("int main() { exit(0); }") + rescue Exception + # cannot try_run. Is CROSS-COMPILE environment? + puts(%Q'\ +***************************************************************************** +** +** PTHREAD SUPPORT CHECK WARNING: +** +** We cannot check the consistency of pthread support between Ruby +** and the Tcl/Tk library in your environment (are you perhaps +** cross-compiling?). If pthread support for these 2 packages is +** inconsistent you may find you get errors when running Ruby/Tk +** (e.g. hangs or segmentation faults). We strongly recommend +** you to check the consistency manually. +** +***************************************************************************** +') + return true + end + end + + if tcl_enable_thread == nil + # tcl-thread is unknown + if try_run(< +int main() { + Tcl_Interp *ip; + ip = Tcl_CreateInterp(); + exit((Tcl_Eval(ip, "set tcl_platform(threaded)") == TCL_OK)? 0: 1); +} +EOF + tcl_enable_thread = true + elsif try_run(< +static Tcl_ThreadDataKey dataKey; +int main() { exit((Tcl_GetThreadData(&dataKey, 1) == dataKey)? 1: 0); } +EOF + tcl_enable_thread = true + else + tcl_enable_thread = false + end + end + + # check pthread mode + if (macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"')) + # ruby -> enable + unless tcl_enable_thread + # ruby -> enable && tcl -> disable + puts(%Q'\ +***************************************************************************** +** +** PTHREAD SUPPORT MODE WARNING: +** +** Ruby is compiled with --enable-pthread, but your Tcl/Tk library +** seems to be compiled without pthread support. Although you can +** create the tcltklib library, this combination may cause errors +** (e.g. hangs or segmentation faults). If you have no reason to +** keep the current pthread support status, we recommend you reconfigure +** and recompile the libraries so that both or neither support pthreads. +** +** If you want change the status of pthread support, please recompile +** Ruby without "--enable-pthread" configure option or recompile Tcl/Tk +** with "--enable-threads" configure option (if your Tcl/Tk is later +** than or equal to Tcl/Tk 8.1). +** +***************************************************************************** +') + end + + # ruby -> enable && tcl -> enable/disable + if tcl_enable_thread + $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1' + else + $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0' + end + + return true + + else + # ruby -> disable + if tcl_enable_thread + # ruby -> disable && tcl -> enable + puts(%Q'\ +***************************************************************************** +** +** PTHREAD SUPPORT MODE ERROR: +** +** Ruby is not compiled with --enable-pthread, but your Tcl/Tk +** library seems to be compiled with pthread support. This +** combination may cause frequent hang or segmentation fault +** errors when Ruby/Tk is working. We recommend that you NEVER +** create the library with such a combination of pthread support. +** +** Please recompile Ruby with the "--enable-pthread" configure option +** or recompile Tcl/Tk with the "--disable-threads" configure option. +** +***************************************************************************** +') + $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1' + return false + else + # ruby -> disable && tcl -> disable + $CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0' + return true + end + end +end + +tclver, tkver = check_tcltk_version(tcltk_version) + +if ( tcltk_framework || + ( find_tcltk_header(tclver, tkver) && + ( !use_X || find_X11(x11_ldir2, x11_ldir) ) && + find_tcl(tcllib, stubs, tclver, *tcl_ldir_list) && + find_tk(tklib, stubs, tkver, *tk_ldir_list) ) ) + $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs + $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM + + if tcltk_framework + if tcl_framework_header + $CPPFLAGS += " -I#{tcl_framework_header}" + else + $CPPFLAGS += " -I#{tcltk_framework}/Tcl.framework/Headers" + end + + if tk_framework_header + $CPPFLAGS += " -I#{tk_framework_header}" + else + $CPPFLAGS += " -I#{tcltk_framework}/Tk.framework/Headers" + end + + $LDFLAGS += ' -framework Tk -framework Tcl' + end + + if stubs or pthread_check + # create Makefile + + # for SUPPORT_STATUS + $INSTALLFILES ||= [] + $INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"] + + have_func("rb_hash_lookup", "ruby.h") + + # create + $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"] + $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"] + create_makefile("tcltklib") + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/README b/lib/ruby-1.9.1-rc1/ext/tk/lib/README new file mode 100644 index 0000000..5918fe4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/README @@ -0,0 +1,30 @@ +README this file +multi-tk.rb multiple Tk interpreter (included safe-Tk) support +remotei-tk.rb control remote Tk interpreter on the other process support +tk.rb Tk interface + +tk/ library files construct Ruby/Tk + +tkextlib/ non-standard Tcl/Tk extension support libraries + +********************************************************************* +*** The followings exists for backward compatibility only. +*** The only thing which they work is that requires current +*** library files ( tk/*.rb ). +********************************************************************* +tkafter.rb handles Tcl after +tkbgerror.rb Tk error module +tkcanvas.rb Tk canvas interface +tkclass.rb provides generic names for Tk classes +tkconsole.rb console command support +tkdialog.rb Tk dialog class +tkentry.rb Tk entry class +tkfont.rb Tk font support +tkmacpkg.rb Mac resource support +tkmenubar.rb TK menubar utility +tkmngfocus.rb focus manager +tkpalette.rb pallete support +tkscrollbox.rb scroll box, also example of compound widget +tktext.rb text classes +tkvirtevent.rb virtual event support +tkwinpkg.rb Win DDE and registry support diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/multi-tk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/multi-tk.rb new file mode 100644 index 0000000..4bc89a8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/multi-tk.rb @@ -0,0 +1,3491 @@ +# +# multi-tk.rb - supports multi Tk interpreters +# by Hidetoshi NAGAI + +require 'tcltklib' +require 'tkutil' +require 'thread' + +if defined? Tk + fail RuntimeError,"'multi-tk' library must be required before requiring 'tk'" +end + +################################################ +# ignore exception on the mainloop? + +TclTkLib.mainloop_abort_on_exception = true +# TclTkLib.mainloop_abort_on_exception = false +# TclTkLib.mainloop_abort_on_exception = nil + + +################################################ +# add ThreadGroup check to TclTkIp.new +class << TclTkIp + alias __new__ new + private :__new__ + + def new(*args) + if Thread.current.group != ThreadGroup::Default + raise SecurityError, 'only ThreadGroup::Default can call TclTkIp.new' + end + obj = __new__(*args) + obj.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + obj + end +end + + +################################################ +# use pseudo-toplevel feature of MultiTkIp ? +if (!defined?(Use_PseudoToplevel_Feature_of_MultiTkIp) || + Use_PseudoToplevel_Feature_of_MultiTkIp) + module MultiTkIp_PseudoToplevel_Evaluable + #def pseudo_toplevel_eval(body = Proc.new) + # Thread.current[:TOPLEVEL] = self + # begin + # body.call + # ensure + # Thread.current[:TOPLEVEL] = nil + # end + #end + + def pseudo_toplevel_evaluable? + @pseudo_toplevel_evaluable + end + + def pseudo_toplevel_evaluable=(mode) + @pseudo_toplevel_evaluable = (mode)? true: false + end + + def self.extended(mod) + mod.__send__(:extend_object, mod) + mod.instance_variable_set('@pseudo_toplevel_evaluable', true) + end + end + + class Object + alias __method_missing_alias_for_MultiTkIp__ method_missing + private :__method_missing_alias_for_MultiTkIp__ + + def method_missing(id, *args) + begin + has_top = (top = MultiTkIp.__getip.__pseudo_toplevel) && + top.respond_to?(:pseudo_toplevel_evaluable?) && + top.pseudo_toplevel_evaluable? && + top.respond_to?(id) + rescue Exception => e + has_top = false + end + + if has_top + top.__send__(id, *args) + else + __method_missing_alias_for_MultiTkIp__(id, *args) + end + end + end +else + # dummy + module MultiTkIp_PseudoToplevel_Evaluable + def pseudo_toplevel_evaluable? + false + end + end +end + +################################################ +# exceptiopn to treat the return value from IP +class MultiTkIp_OK < Exception + def self.send(thread, ret=nil) + thread.raise self.new(ret) + end + + def initialize(ret=nil) + super('succeed') + @return_value = ret + end + + attr_reader :return_value + alias value return_value +end +MultiTkIp_OK.freeze + + +################################################ +# methods for construction +class MultiTkIp + BASE_DIR = File.dirname(__FILE__) + + WITH_RUBY_VM = Object.const_defined?(:VM) && ::VM.class == Class + WITH_ENCODING = defined?(::Encoding.default_external) + #WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class + + (@@SLAVE_IP_ID = ['slave'.freeze, '0'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + @@IP_TABLE = {}.taint unless defined?(@@IP_TABLE) + + @@INIT_IP_ENV = [].taint unless defined?(@@INIT_IP_ENV) # table of Procs + @@ADD_TK_PROCS = [].taint unless defined?(@@ADD_TK_PROCS) # table of [name, args, body] + + @@TK_TABLE_LIST = [].taint unless defined?(@@TK_TABLE_LIST) + + unless defined?(@@TK_CMD_TBL) + @@TK_CMD_TBL = Object.new.taint + + # @@TK_CMD_TBL.instance_variable_set('@tbl', {}.taint) + @@TK_CMD_TBL.instance_variable_set('@tbl', Hash.new{|hash,key| + fail IndexError, + "unknown command ID '#{key}'" + }.taint) + + class << @@TK_CMD_TBL + allow = [ + '__send__', '__id__', 'freeze', 'inspect', 'kind_of?', 'object_id', + '[]', '[]=', 'delete', 'each', 'has_key?' + ] + instance_methods.each{|m| undef_method(m) unless allow.index(m.to_s)} + + def kind_of?(klass) + @tbl.kind_of?(klass) + end + + def inspect + if Thread.current.group == ThreadGroup::Default + @tbl.inspect + else + ip = MultiTkIp.__getip + @tbl.reject{|idx, ent| ent.respond_to?(:ip) && ent.ip != ip}.inspect + end + end + + def [](idx) + return unless (ent = @tbl[idx]) + if Thread.current.group == ThreadGroup::Default + ent + elsif ent.respond_to?(:ip) + (ent.ip == MultiTkIp.__getip)? ent: nil + else + ent + end + end + + def []=(idx,val) + if self.has_key?(idx) && Thread.current.group != ThreadGroup::Default + fail SecurityError,"cannot change the entried command" + end + @tbl[idx] = val + end + + def delete(idx, &blk) + # if gets an entry, is permited to delete + if self[idx] + @tbl.delete(idx) + elsif blk + blk.call(idx) + else + nil + end + end + + def each(&blk) + if Thread.current.group == ThreadGroup::Default + @tbl.each(&blk) + else + ip = MultiTkIp.__getip + @tbl.each{|idx, ent| + blk.call(idx, ent) unless ent.respond_to?(:ip) && ent.ip != ip + } + end + self + end + + def has_key?(k) + @tbl.has_key?(k) + end + alias include? has_key? + alias key? has_key? + alias member? has_key? + end + + @@TK_CMD_TBL.freeze + end + + ###################################### + + @@CB_ENTRY_CLASS = Class.new(TkCallbackEntry){ + def initialize(ip, cmd) + @ip = ip + @cmd = cmd + self.freeze + end + attr_reader :ip, :cmd + def inspect + cmd.inspect + end + def call(*args) + unless @ip.deleted? + current = Thread.current + backup_ip = current[:callback_ip] + current[:callback_ip] = @ip + begin + ret = @ip.cb_eval(@cmd, *args) + fail ret if ret.kind_of?(Exception) + ret + rescue TkCallbackBreak, TkCallbackContinue => e + fail e + rescue SecurityError => e + # in 'exit', 'exit!', and 'abort' : security error --> delete IP + if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/ + @ip.delete + elsif @ip.safe? + if @ip.respond_to?(:cb_error) + @ip.cb_error(e) + else + nil # ignore + end + else + fail e + end + rescue Exception => e + fail e if e.message =~ /^TkCallback/ + + if @ip.safe? + if @ip.respond_to?(:cb_error) + @ip.cb_error(e) + else + nil # ignore + end + else + fail e + end + ensure + current[:callback_ip] = backup_ip + end + end + end + }.freeze + + ###################################### + + def _keys2opts(src_keys) + return nil if src_keys == nil + keys = {}; src_keys.each{|k, v| keys[k.to_s] = v} + #keys.collect{|k,v| "-#{k} #{v}"}.join(' ') + keys.collect{|k,v| "-#{k} #{TclTkLib._conv_listelement(TkComm::_get_eval_string(v))}"}.join(' ') + end + private :_keys2opts + + def _check_and_return(thread, exception, wait=0) + unless thread + unless exception.kind_of?(MultiTkIp_OK) + msg = "#{exception.class}: #{exception.message}" + + if @interp.deleted? + warn("Warning (#{self}): " + msg) + return nil + end + + if safe? + warn("Warning (#{self}): " + msg) if $DEBUG + return nil + end + + begin + @interp._eval_without_enc(@interp._merge_tklist('bgerror', msg)) + rescue Exception => e + warn("Warning (#{self}): " + msg) + end + end + return nil + end + + if wait == 0 + # no wait + Thread.pass + if thread.stop? + thread.raise exception + end + return thread + end + + # wait to stop the caller thread + wait.times{ + if thread.stop? + # ready to send exception + thread.raise exception + return thread + end + + # wait + Thread.pass + } + + # unexpected error + thread.raise RuntimeError, "the thread may not wait for the return value" + return thread + end + + ###################################### + + def set_cb_error(cmd = Proc.new) + @cb_error_proc[0] = cmd + end + + def cb_error(e) + if @cb_error_proc[0].respond_to?(:call) + @cb_error_proc[0].call(e) + end + end + + ###################################### + + def set_safe_level(safe) + if safe > @safe_level[0] + @safe_level[0] = safe + @cmd_queue.enq([@system, 'set_safe_level', safe]) + end + @safe_level[0] + end + def safe_level=(safe) + set_safe_level(safe) + end + def self.set_safe_level(safe) + __getip.set_safe_level(safe) + end + def self.safe_level=(safe) + self.set_safe_level(safe) + end + def safe_level + @safe_level[0] + end + def self.safe_level + __getip.safe_level + end + + def wait_on_mainloop? + @wait_on_mainloop[0] + end + def wait_on_mainloop=(bool) + @wait_on_mainloop[0] = bool + end + + def running_mainloop? + @wait_on_mainloop[1] > 0 + end + + def _destroy_slaves_of_slaveIP(ip) + unless ip.deleted? + # ip._split_tklist(ip._invoke('interp', 'slaves')).each{|name| + ip._split_tklist(ip._invoke_without_enc('interp', 'slaves')).each{|name| + name = _fromUTF8(name) + begin + # ip._eval_without_enc("#{name} eval {foreach i [after info] {after cancel $i}}") + after_ids = ip._eval_without_enc("#{name} eval {after info}") + ip._eval_without_enc("#{name} eval {foreach i {#{after_ids}} {after cancel $i}}") + rescue Exception + end + begin + # ip._invoke('interp', 'eval', name, 'destroy', '.') + ip._invoke(name, 'eval', 'destroy', '.') + rescue Exception + end + + # safe_base? + if ip._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0' + begin + ip._eval_without_enc("::safe::interpDelete #{name}") + rescue Exception + end + end +=begin + if ip._invoke('interp', 'exists', name) == '1' + begin + ip._invoke(name, 'eval', 'exit') + rescue Exception + end + end +=end + unless ip.deleted? + if ip._invoke('interp', 'exists', name) == '1' + begin + ip._invoke('interp', 'delete', name) + rescue Exception + end + end + end + } + end + end + + def _receiver_eval_proc_core(safe_level, thread, cmd, *args) + begin + #ret = proc{$SAFE = safe_level; cmd.call(*args)}.call + #ret = cmd.call(safe_level, *args) + normal_ret = false + ret = catch(:IRB_EXIT) do # IRB hack + retval = cmd.call(safe_level, *args) + normal_ret = true + retval + end + unless normal_ret + # catch IRB_EXIT + exit(ret) + end + ret + rescue SystemExit => e + # delete IP + unless @interp.deleted? + @slave_ip_tbl.each{|name, subip| + _destroy_slaves_of_slaveIP(subip) + begin + # subip._eval_without_enc("foreach i [after info] {after cancel $i}") + after_ids = subip._eval_without_enc("after info") + subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + rescue Exception + end +=begin + begin + subip._invoke('destroy', '.') unless subip.deleted? + rescue Exception + end +=end + # safe_base? + if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0' + begin + @interp._eval_without_enc("::safe::interpDelete #{name}") + rescue Exception + else + next if subip.deleted? + end + end + if subip.respond_to?(:safe_base?) && subip.safe_base? && + !subip.deleted? + # do 'exit' to call the delete_hook procedure + begin + subip._eval_without_enc('exit') + rescue Exception + end + else + begin + subip.delete unless subip.deleted? + rescue Exception + end + end + } + + begin + # @interp._eval_without_enc("foreach i [after info] {after cancel $i}") + after_ids = @interp._eval_without_enc("after info") + @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + rescue Exception + end + begin + @interp._invoke('destroy', '.') unless @interp.deleted? + rescue Exception + end + if @safe_base && !@interp.deleted? + # do 'exit' to call the delete_hook procedure + @interp._eval_without_enc('exit') + else + @interp.delete unless @interp.deleted? + end + end + + if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/ + _check_and_return(thread, MultiTkIp_OK.new($3 == 'exit')) + else + _check_and_return(thread, MultiTkIp_OK.new(nil)) + end + + # if master? && !safe? && allow_ruby_exit? + if !@interp.deleted? && master? && !safe? && allow_ruby_exit? +=begin + ObjectSpace.each_object(TclTkIp){|obj| + obj.delete unless obj.deleted? + } +=end + #exit(e.status) + fail e + end + # break + + rescue SecurityError => e + # in 'exit', 'exit!', and 'abort' : security error --> delete IP + if e.backtrace[0] =~ /^(.+?):(\d+):in `(exit|exit!|abort)'/ + ret = ($3 == 'exit') + unless @interp.deleted? + @slave_ip_tbl.each{|name, subip| + _destroy_slaves_of_slaveIP(subip) + begin + # subip._eval_without_enc("foreach i [after info] {after cancel $i}") + after_ids = subip._eval_without_enc("after info") + subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + rescue Exception + end +=begin + begin + subip._invoke('destroy', '.') unless subip.deleted? + rescue Exception + end +=end + # safe_base? + if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0' + begin + @interp._eval_without_enc("::safe::interpDelete #{name}") + rescue Exception + else + next if subip.deleted? + end + end + if subip.respond_to?(:safe_base?) && subip.safe_base? && + !subip.deleted? + # do 'exit' to call the delete_hook procedure + begin + subip._eval_without_enc('exit') + rescue Exception + end + else + begin + subip.delete unless subip.deleted? + rescue Exception + end + end + } + + begin + # @interp._eval_without_enc("foreach i [after info] {after cancel $i}") + after_ids = @interp._eval_without_enc("after info") + @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + rescue Exception + end +=begin + begin + @interp._invoke('destroy', '.') unless @interp.deleted? + rescue Exception + end +=end + if @safe_base && !@interp.deleted? + # do 'exit' to call the delete_hook procedure + @interp._eval_without_enc('exit') + else + @interp.delete unless @interp.deleted? + end + end + _check_and_return(thread, MultiTkIp_OK.new(ret)) + # break + + else + # raise security error + _check_and_return(thread, e) + end + + rescue Exception => e + # raise exception + begin + bt = _toUTF8(e.backtrace.join("\n")) + if MultiTkIp::WITH_ENCODING + bt.force_encoding('utf-8') + else + bt.instance_variable_set(:@encoding, 'utf-8') + end + rescue Exception + bt = e.backtrace.join("\n") + end + begin + @interp._set_global_var('errorInfo', bt) + rescue Exception + end + _check_and_return(thread, e) + + else + # no exception + _check_and_return(thread, MultiTkIp_OK.new(ret)) + end + end + + def _receiver_eval_proc(last_thread, safe_level, thread, cmd, *args) + if thread + Thread.new{ + last_thread.join if last_thread + unless @interp.deleted? + _receiver_eval_proc_core(safe_level, thread, cmd, *args) + end + } + else + Thread.new{ + unless @interp.deleted? + _receiver_eval_proc_core(safe_level, thread, cmd, *args) + end + } + last_thread + end + end + + private :_receiver_eval_proc, :_receiver_eval_proc_core + + def _receiver_mainloop(check_root) + if @evloop_thread[0] && @evloop_thread[0].alive? + @evloop_thread[0] + else + @evloop_thread[0] = Thread.new{ + while !@interp.deleted? + #if check_root + # inf = @interp._invoke_without_enc('info', 'command', '.') + # break if !inf.kind_of?(String) || inf != '.' + #end + break if check_root && !@interp.has_mainwindow? + sleep 0.5 + end + } + @evloop_thread[0] + end + end + + def _create_receiver_and_watchdog(lvl = $SAFE) + lvl = $SAFE if lvl < $SAFE + + # command-procedures receiver + receiver = Thread.new(lvl){|safe_level| + last_thread = {} + + loop do + break if @interp.deleted? + thread, cmd, *args = @cmd_queue.deq + if thread == @system + # control command + case cmd + when 'set_safe_level' + begin + safe_level = args[0] if safe_level < args[0] + rescue Exception + end + when 'call_mainloop' + thread = args.shift + _check_and_return(thread, + MultiTkIp_OK.new(_receiver_mainloop(*args))) + else + # ignore + end + + else + # procedure + last_thread[thread] = _receiver_eval_proc(last_thread[thread], + safe_level, thread, + cmd, *args) + end + end + } + + # watchdog of receiver + watchdog = Thread.new{ + begin + loop do + sleep 1 + receiver.kill if @interp.deleted? + break unless receiver.alive? + end + rescue Exception + # ignore all kind of Exception + end + # receiver is dead + loop do + thread, cmd, *args = @cmd_queue.deq + next unless thread + if thread.alive? + if @interp.deleted? + thread.raise RuntimeError, 'the interpreter is already deleted' + else + thread.raise RuntimeError, + 'the interpreter no longer receives command procedures' + end + end + end + } + + # return threads + [receiver, watchdog] + end + private :_check_and_return, :_create_receiver_and_watchdog + + ###################################### + + unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD + ### Ruby 1.9 !!!!!!!!!!!!!!!!!!!!!!!!!! + RUN_EVENTLOOP_ON_MAIN_THREAD = false + end + + if self.const_defined? :DEFAULT_MASTER_NAME + name = DEFAULT_MASTER_NAME.to_s + else + name = nil + end + if self.const_defined?(:DEFAULT_MASTER_OPTS) && + DEFAULT_MASTER_OPTS.kind_of?(Hash) + keys = DEFAULT_MASTER_OPTS + else + keys = {} + end + + @@DEFAULT_MASTER = self.allocate + @@DEFAULT_MASTER.instance_eval{ + @tk_windows = {}.taint + + @tk_table_list = [].taint + + @slave_ip_tbl = {}.taint + + @slave_ip_top = {}.taint + + @evloop_thread = [].taint + + unless keys.kind_of? Hash + fail ArgumentError, "expecting a Hash object for the 2nd argument" + end + + if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! + @interp = TclTkIp.new(name, _keys2opts(keys)) + else ### Ruby 1.9 !!!!!!!!!!! + @interp_thread = Thread.new{ + current = Thread.current + current[:interp] = interp = TclTkIp.new(name, _keys2opts(keys)) + #sleep + current[:mutex] = mutex = Mutex.new + current[:root_check] = cond_var = ConditionVariable.new + + status = [nil] + def status.value + self[0] + end + def status.value=(val) + self[0] = val + end + current[:status] = status + + begin + current[:status].value = interp.mainloop(true) + rescue Exception=>e + current[:status].value = e + ensure + mutex.synchronize{ cond_var.broadcast } + end + current[:status].value = interp.mainloop(false) + } + until @interp_thread[:interp] + Thread.pass + end + # INTERP_THREAD.run + @interp = @interp_thread[:interp] + + def self.mainloop(check_root = true) + begin + TclTkLib.set_eventloop_window_mode(true) + @interp_thread.value + ensure + TclTkLib.set_eventloop_window_mode(false) + end + end + end + + @interp.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + + @ip_name = nil + + @callback_status = [].taint + + @system = Object.new + + @wait_on_mainloop = [true, 0].taint + + @threadgroup = Thread.current.group + + @safe_base = false + + @safe_level = [$SAFE] + + @cmd_queue = Queue.new + + @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog(@safe_level[0]) + + @threadgroup.add @cmd_receiver + @threadgroup.add @receiver_watchdog + + # NOT enclose @threadgroup for @@DEFAULT_MASTER + + @@IP_TABLE[ThreadGroup::Default] = self + @@IP_TABLE[@threadgroup] = self + + ################################# + + @pseudo_toplevel = [false, nil] + + def self.__pseudo_toplevel + Thread.current.group == ThreadGroup::Default && + MultiTkIp.__getip == @@DEFAULT_MASTER && + self.__pseudo_toplevel_evaluable? && @pseudo_toplevel[1] + end + + def self.__pseudo_toplevel=(m) + unless (Thread.current.group == ThreadGroup::Default && + MultiTkIp.__getip == @@DEFAULT_MASTER) + fail SecurityError, "no permission to manipulate" + end + + # if m.kind_of?(Module) && m.respond_to?(:pseudo_toplevel_evaluable?) + if m.respond_to?(:pseudo_toplevel_evaluable?) + @pseudo_toplevel[0] = true + @pseudo_toplevel[1] = m + else + fail ArgumentError, 'fail to set pseudo-toplevel' + end + self + end + + def self.__pseudo_toplevel_evaluable? + begin + @pseudo_toplevel[0] && @pseudo_toplevel[1].pseudo_toplevel_evaluable? + rescue Exception + false + end + end + + def self.__pseudo_toplevel_evaluable=(mode) + unless (Thread.current.group == ThreadGroup::Default && + MultiTkIp.__getip == @@DEFAULT_MASTER) + fail SecurityError, "no permission to manipulate" + end + + @pseudo_toplevel[0] = (mode)? true: false + end + + ################################# + + @assign_request = Class.new(Exception){ + def self.new(target, ret) + obj = super() + obj.target = target + obj.ret = ret + obj + end + attr_accessor :target, :ret + } + + @assign_thread = Thread.new{ + loop do + begin + Thread.stop + rescue @assign_request=>req + begin + req.ret[0] = req.target.instance_eval{ + @cmd_receiver, @receiver_watchdog = + _create_receiver_and_watchdog(@safe_level[0]) + @threadgroup.add @cmd_receiver + @threadgroup.add @receiver_watchdog + @threadgroup.enclose + true + } + rescue Exception=>e + begin + req.ret[0] = e + rescue Exception + # ignore + end + end + rescue Exception + # ignore + end + end + } + + def self.assign_receiver_and_watchdog(target) + ret = [nil] + @assign_thread.raise(@assign_request.new(target, ret)) + while ret[0] == nil + unless @assign_thread.alive? + raise RuntimeError, 'lost the thread to assign a receiver and a watchdog thread' + end + end + if ret[0].kind_of?(Exception) + raise ret[0] + else + ret[0] + end + end + + ################################# + + @init_ip_env_queue = Queue.new + Thread.new{ + current = Thread.current + loop { + mtx, cond, ret, table, script = @init_ip_env_queue.deq + begin + ret[0] = table.each{|tg, ip| ip._init_ip_env(script) } + rescue Exception => e + ret[0] = e + ensure + mtx.synchronize{ cond.signal } + end + mtx = cond = ret = table = script = nil # clear variables for GC + } + } + + def self.__init_ip_env__(table, script) + ret = [] + mtx = (Thread.current[:MultiTk_ip_Mutex] ||= Mutex.new) + cond = (Thread.current[:MultiTk_ip_CondVar] ||= ConditionVariable.new) + mtx.synchronize{ + @init_ip_env_queue.enq([mtx, cond, ret, table, script]) + cond.wait(mtx) + } + if ret[0].kind_of?(Exception) + raise ret[0] + else + ret[0] + end + end + + ################################# + + class << self + undef :instance_eval + end + } + + @@DEFAULT_MASTER.freeze # defend against modification + + ###################################### + + def self.inherited(subclass) + # trust if on ThreadGroup::Default or @@DEFAULT_MASTER's ThreadGroup + if @@IP_TABLE[Thread.current.group] == @@DEFAULT_MASTER + begin + class << subclass + self.methods.each{|m| + name = m.to_s + begin + unless name == '__id__' || name == '__send__' || name == 'freeze' + undef_method(m) + end + rescue Exception + # ignore all exceptions + end + } + end + ensure + subclass.freeze + fail SecurityError, + "cannot create subclass of MultiTkIp on a untrusted ThreadGroup" + end + end + end + + ###################################### + + @@SAFE_OPT_LIST = [ + 'accessPath'.freeze, + 'statics'.freeze, + 'nested'.freeze, + 'deleteHook'.freeze + ].freeze + + def _parse_slaveopts(keys) + name = nil + safe = false + safe_opts = {} + tk_opts = {} + + keys.each{|k,v| + k_str = k.to_s + if k_str == 'name' + name = v + elsif k_str == 'safe' + safe = v + elsif @@SAFE_OPT_LIST.member?(k_str) + safe_opts[k_str] = v + else + tk_opts[k_str] = v + end + } + + if keys['without_tk'] || keys[:without_tk] + [name, safe, safe_opts, nil] + else + [name, safe, safe_opts, tk_opts] + end + end + private :_parse_slaveopts + + def _create_slave_ip_name + @@SLAVE_IP_ID.mutex.synchronize{ + name = @@SLAVE_IP_ID.join('') + @@SLAVE_IP_ID[1].succ! + name.freeze + } + end + private :_create_slave_ip_name + + ###################################### + + def __check_safetk_optkeys(optkeys) + # based on 'safetk.tcl' + new_keys = {} + optkeys.each{|k,v| new_keys[k.to_s] = v} + + # check 'display' + if !new_keys.key?('display') + begin + #new_keys['display'] = @interp._invoke('winfo screen .') + new_keys['display'] = @interp._invoke('winfo', 'screen', '.') + rescue + if ENV[DISPLAY] + new_keys['display'] = ENV[DISPLAY] + elsif !new_keys.key?('use') + warn "Warning: no screen info or ENV[DISPLAY], so use ':0.0'" + new_keys['display'] = ':0.0' + end + end + end + + # check 'use' + if new_keys.key?('use') + # given 'use' + case new_keys['use'] + when TkWindow + new_keys['use'] = TkWinfo.id(new_keys['use']) + #assoc_display = @interp._eval('winfo screen .') + assoc_display = @interp._invoke('winfo', 'screen', '.') + when /^\..*/ + new_keys['use'] = @interp._invoke('winfo', 'id', new_keys['use']) + assoc_display = @interp._invoke('winfo', 'screen', new_keys['use']) + else + begin + pathname = @interp._invoke('winfo', 'pathname', new_keys['use']) + assoc_display = @interp._invoke('winfo', 'screen', pathname) + rescue + assoc_display = new_keys['display'] + end + end + + # match display? + if assoc_display != new_keys['display'] + if optkeys.key?(:display) || optkeys.key?('display') + fail RuntimeError, + "conflicting 'display'=>#{new_keys['display']} " + + "and display '#{assoc_display}' on 'use'=>#{new_keys['use']}" + else + new_keys['display'] = assoc_display + end + end + end + + # return + new_keys + end + private :__check_safetk_optkeys + + def __create_safetk_frame(slave_ip, slave_name, app_name, keys) + # display option is used by ::safe::loadTk + loadTk_keys = {} + loadTk_keys['display'] = keys['display'] + dup_keys = keys.dup + + # keys for toplevel : allow followings + toplevel_keys = {} + ['height', 'width', 'background', 'menu'].each{|k| + toplevel_keys[k] = dup_keys.delete(k) if dup_keys.key?(k) + } + toplevel_keys['classname'] = 'SafeTk' + toplevel_keys['screen'] = dup_keys.delete('display') + + # other keys used by pack option of container frame + + # create toplevel widget + begin + top = TkToplevel.new(toplevel_keys) + rescue NameError => e + fail e unless @interp.safe? + fail SecurityError, "unable create toplevel on the safe interpreter" + end + msg = "Untrusted Ruby/Tk applet (#{slave_name})" + if app_name.kind_of?(String) + top.title "#{app_name} (#{slave_name})" + else + top.title msg + end + + # procedure to delete slave interpreter + slave_delete_proc = proc{ + unless slave_ip.deleted? + #if slave_ip._invoke('info', 'command', '.') != "" + # slave_ip._invoke('destroy', '.') + #end + #slave_ip.delete + slave_ip._eval_without_enc('exit') + end + begin + top.destroy if top.winfo_exist? + rescue + # ignore + end + } + tag = TkBindTag.new.bind('Destroy', slave_delete_proc) + + top.bindtags = top.bindtags.unshift(tag) + + # create control frame + TkFrame.new(top, :bg=>'red', :borderwidth=>3, :relief=>'ridge') {|fc| + fc.bindtags = fc.bindtags.unshift(tag) + + TkFrame.new(fc, :bd=>0){|f| + TkButton.new(f, + :text=>'Delete', :bd=>1, :padx=>2, :pady=>0, + :highlightthickness=>0, :command=>slave_delete_proc + ).pack(:side=>:right, :fill=>:both) + f.pack(:side=>:right, :fill=>:both, :expand=>true) + } + + TkLabel.new(fc, :text=>msg, :padx=>2, :pady=>0, + :anchor=>:w).pack(:side=>:left, :fill=>:both, :expand=>true) + + fc.pack(:side=>:bottom, :fill=>:x) + } + + # container frame for slave interpreter + dup_keys['fill'] = :both unless dup_keys.key?('fill') + dup_keys['expand'] = true unless dup_keys.key?('expand') + c = TkFrame.new(top, :container=>true).pack(dup_keys) + c.bind('Destroy', proc{top.destroy}) + + # return keys + loadTk_keys['use'] = TkWinfo.id(c) + [loadTk_keys, top.path] + end + private :__create_safetk_frame + + def __create_safe_slave_obj(safe_opts, app_name, tk_opts) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + # safe interpreter + ip_name = _create_slave_ip_name + slave_ip = @interp.create_slave(ip_name, true) + slave_ip.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + @slave_ip_tbl[ip_name] = slave_ip + def slave_ip.safe_base? + true + end + + @interp._eval("::safe::interpInit #{ip_name}") + + slave_ip._invoke('set', 'argv0', app_name) if app_name.kind_of?(String) + + if tk_opts + tk_opts = __check_safetk_optkeys(tk_opts) + if tk_opts.key?('use') + @slave_ip_top[ip_name] = '' + else + tk_opts, top_path = __create_safetk_frame(slave_ip, ip_name, app_name, + tk_opts) + @slave_ip_top[ip_name] = top_path + end + @interp._eval("::safe::loadTk #{ip_name} #{_keys2opts(tk_opts)}") + else + @slave_ip_top[ip_name] = nil + end + + if safe_opts.key?('deleteHook') || safe_opts.key?(:deleteHook) + @interp._eval("::safe::interpConfigure #{ip_name} " + + _keys2opts(safe_opts)) + else + @interp._eval("::safe::interpConfigure #{ip_name} " + + _keys2opts(safe_opts) + '-deleteHook {' + + TkComm._get_eval_string(proc{|slave| + self._default_delete_hook(slave) + }) + '}') + end + + [slave_ip, ip_name] + end + + def __create_trusted_slave_obj(name, keys) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + ip_name = _create_slave_ip_name + slave_ip = @interp.create_slave(ip_name, false) + slave_ip.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + slave_ip._invoke('set', 'argv0', name) if name.kind_of?(String) + slave_ip._invoke('set', 'argv', _keys2opts(keys)) + @interp._invoke('load', '', 'Tk', ip_name) + @slave_ip_tbl[ip_name] = slave_ip + [slave_ip, ip_name] + end + + ###################################### + + def _create_slave_object(keys={}) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + ip = MultiTkIp.new_slave(self, keys={}) + @slave_ip_tbl[ip.name] = ip + end + + ###################################### + + def initialize(master, safeip=true, keys={}) + if $SAFE >= 4 + fail SecurityError, "cannot create a new interpreter at level #{$SAFE}" + end + + if safeip == nil && $SAFE >= 2 + fail SecurityError, "cannot create a master-ip at level #{$SAFE}" + end + + if master.deleted? && safeip == nil + fail RuntimeError, "cannot create a slave of a deleted interpreter" + end + + if !master.deleted? && !master.master? && master.safe? + fail SecurityError, "safe-slave-ip cannot create a new interpreter" + end + + if safeip == nil && !master.master? + fail SecurityError, "slave-ip cannot create a master-ip" + end + + unless keys.kind_of? Hash + fail ArgumentError, "expecting a Hash object for the 2nd argument" + end + + @tk_windows = {} + @tk_table_list = [] + @slave_ip_tbl = {} + @slave_ip_top = {} + @cb_error_proc = [] + @evloop_thread = [] + + @tk_windows.taint unless @tk_windows.tainted? + @tk_table_list.taint unless @tk_table_list.tainted? + @slave_ip_tbl.taint unless @slave_ip_tbl.tainted? + @slave_ip_top.taint unless @slave_ip_top.tainted? + @cb_error_proc.taint unless @cb_error_proc.tainted? + @evloop_thread.taint unless @evloop_thread.tainted? + + @callback_status = [] + + name, safe, safe_opts, tk_opts = _parse_slaveopts(keys) + + safe = 4 if safe && !safe.kind_of?(Fixnum) + + @safe_base = false + + if safeip == nil + # create master-ip + unless WITH_RUBY_VM + @interp = TclTkIp.new(name, _keys2opts(tk_opts)) + @interp.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + + else ### Ruby 1.9 !!!!!!!!!!! + @interp_thread = Thread.new{ + Thread.current[:interp] = interp = TclTkIp.new(name, _keys2opts(tk_opts)) + interp.instance_eval{ + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + } + + #sleep + TclTkLib.mainloop(true) + } + until @interp_thread[:interp] + Thread.pass + end + # INTERP_THREAD.run + @interp = @interp_thread[:interp] + end + + @ip_name = nil + if safe + safe = $SAFE if safe < $SAFE + @safe_level = [safe] + else + @safe_level = [$SAFE] + end + else + # create slave-ip + if safeip || master.safe? + @safe_base = true + @interp, @ip_name = master.__create_safe_slave_obj(safe_opts, + name, tk_opts) + # @interp_thread = nil if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!! + @interp_thread = nil unless WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!! + if safe + safe = master.safe_level if safe < master.safe_level + @safe_level = [safe] + else + @safe_level = [4] + end + else + @interp, @ip_name = master.__create_trusted_slave_obj(name, tk_opts) + # @interp_thread = nil if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!! + @interp_thread = nil unless WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!! + if safe + safe = master.safe_level if safe < master.safe_level + @safe_level = [safe] + else + @safe_level = [master.safe_level] + end + end + @set_alias_proc = proc{|name| + master._invoke('interp', 'alias', @ip_name, name, '', name) + }.freeze + end + + @system = Object.new + + @wait_on_mainloop = [true, 0].taint + # @wait_on_mainloop = [false, 0].taint + + @threadgroup = ThreadGroup.new + + @pseudo_toplevel = [false, nil] + + @cmd_queue = Queue.new + +=begin + @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog(@safe_level[0]) + + @threadgroup.add @cmd_receiver + @threadgroup.add @receiver_watchdog + + @threadgroup.enclose +=end + @@DEFAULT_MASTER.assign_receiver_and_watchdog(self) + + @@IP_TABLE[@threadgroup] = self + @@TK_TABLE_LIST.size.times{ + (tbl = {}).tainted? || tbl.taint + @tk_table_list << tbl + } + _init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS) + + class << self + undef :instance_eval + end + + # dummy call for initialization + self.eval_proc{ Tk.tk_call('set', 'tcl_patchLevel') } + + self.freeze # defend against modification + end + + ###################################### + + def _default_delete_hook(slave) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @slave_ip_tbl.delete(slave) + top = @slave_ip_top.delete(slave) + if top.kind_of?(String) + # call default hook of safetk.tcl (ignore exceptions) + if top == '' + begin + @interp._eval("::safe::disallowTk #{slave}") + rescue + warn("Waring: fail to call '::safe::disallowTk'") if $DEBUG + end + else # toplevel path + begin + @interp._eval("::safe::tkDelete {} #{top} #{slave}") + rescue + warn("Waring: fail to call '::safe::tkDelete'") if $DEBUG + begin + @interp._eval("destroy #{top}") + rescue + warn("Waring: fail to destroy toplevel") if $DEBUG + end + end + end + end + end + +end + + +# get target IP +class MultiTkIp + def self._ip_id_ + __getip._ip_id_ + end + def _ip_id_ + # for RemoteTkIp + '' + end + + def self.__getip + current = Thread.current + if TclTkLib.mainloop_thread? != false && current[:callback_ip] + return current[:callback_ip] + end + if current.group == ThreadGroup::Default + @@DEFAULT_MASTER + else + ip = @@IP_TABLE[current.group] + unless ip + fail SecurityError, + "cannot call Tk methods on #{Thread.current.inspect}" + end + ip + end + end +end + + +# aliases of constructor +class << MultiTkIp + alias __new new + private :__new + + def new_master(safe=nil, keys={}) + if MultiTkIp::WITH_RUBY_VM + #### TODO !!!!!! + fail RuntimeError, + 'sorry, still not support multiple master-interpreters on Ruby VM' + end + + if safe.kind_of?(Hash) + keys = safe + elsif safe.kind_of?(Integer) + raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash) + if !keys.key?(:safe) && !keys.key?('safe') + keys[:safe] = safe + end + elsif safe == nil + # do nothing + else + raise ArgumentError, "unexpected argument(s)" + end + + ip = __new(__getip, nil, keys) + #ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given? + if block_given? + Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)} + end + ip + end + + alias new new_master + + def new_slave(safe=nil, keys={}) + if safe.kind_of?(Hash) + keys = safe + elsif safe.kind_of?(Integer) + raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash) + if !keys.key?(:safe) && !keys.key?('safe') + keys[:safe] = safe + end + elsif safe == nil + # do nothing + else + raise ArgumentError, "unexpected argument(s)" + end + + ip = __new(__getip, false, keys) + # ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given? + if block_given? + Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)} + end + ip + end + alias new_trusted_slave new_slave + + def new_safe_slave(safe=4, keys={}) + if safe.kind_of?(Hash) + keys = safe + elsif safe.kind_of?(Integer) + raise ArgumentError, "unexpected argument(s)" unless keys.kind_of?(Hash) + if !keys.key?(:safe) && !keys.key?('safe') + keys[:safe] = safe + end + else + raise ArgumentError, "unexpected argument(s)" + end + + ip = __new(__getip, true, keys) + # ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call) if block_given? + if block_given? + Thread.new{ip.eval_proc(proc{$SAFE=ip.safe_level; Proc.new}.call)} + end + ip + end + alias new_safeTk new_safe_slave +end + + +# get info +class MultiTkIp + def inspect + s = self.to_s.chop! + if self.manipulable? + if master? + if @interp.deleted? + s << ':deleted-master' + else + s << ':master' + end + else + if @interp.deleted? + s << ':deleted-slave' + elsif @interp.safe? + s << ':safe-slave' + else + s << ':trusted-slave' + end + end + end + s << '>' + end + + def master? + if @ip_name + false + else + true + end + end + def self.master? + __getip.master? + end + + def slave? + not master? + end + def self.slave? + not self.master? + end + + def alive? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + begin + return false unless @cmd_receiver.alive? + return false if @interp.deleted? + return false if @interp._invoke('interp', 'exists', '') == '0' + rescue Exception + return false + end + true + end + def self.alive? + __getip.alive? + end + + def path + @ip_name || '' + end + def self.path + __getip.path + end + def ip_name + @ip_name || '' + end + def self.ip_name + __getip.ip_name + end + def to_eval + @ip_name || '' + end + def self.to_eval + __getip.to_eval + end + + def slaves(all = false) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp','slaves').split.map!{|name| + if @slave_ip_tbl.key?(name) + @slave_ip_tbl[name] + elsif all + name + else + nil + end + }.compact! + end + def self.slaves(all = false) + __getip.slaves(all) + end + + def manipulable? + return true if (Thread.current.group == ThreadGroup::Default) + ip = MultiTkIp.__getip + (ip == self) || ip._is_master_of?(@interp) + end + def self.manipulable? + true + end + + def _is_master_of?(tcltkip_obj) + tcltkip_obj.slave_of?(@interp) + end + protected :_is_master_of? +end + + +# instance methods to treat tables +class MultiTkIp + def _tk_cmd_tbl + tbl = {} + MultiTkIp.tk_cmd_tbl.each{|id, ent| tbl[id] = ent if ent.ip == self } + tbl + end + + def _tk_windows + @tk_windows + end + + def _tk_table_list + @tk_table_list + end + + def _add_new_tables + (@@TK_TABLE_LIST.size - @tk_table_list.size).times{ + (tbl = {}).tainted? || tbl.taint + @tk_table_list << tbl + } + end + + def _init_ip_env(script) + self.eval_proc{script.call(self)} + end + + def _add_tk_procs(name, args, body) + return if slave? + @interp._invoke('proc', name, args, body) if args && body + @interp._invoke('interp', 'slaves').split.each{|slave| + @interp._invoke('interp', 'alias', slave, name, '', name) + } + end + + def _remove_tk_procs(*names) + return if slave? + names.each{|name| + name = name.to_s + + return if @interp.deleted? + @interp._invoke('rename', name, '') + + return if @interp.deleted? + @interp._invoke('interp', 'slaves').split.each{|slave| + return if @interp.deleted? + @interp._invoke('interp', 'alias', slave, name, '') rescue nil + } + } + end + + def _init_ip_internal(init_ip_env, add_tk_procs) + #init_ip_env.each{|script| self.eval_proc{script.call(self)}} + init_ip_env.each{|script| self._init_ip_env(script)} + add_tk_procs.each{|name, args, body| + if master? + @interp._invoke('proc', name, args, body) if args && body + else + @set_alias_proc.call(name) + end + } + end +end + + +# class methods to treat tables +class MultiTkIp + def self.tk_cmd_tbl + @@TK_CMD_TBL + end + def self.tk_windows + __getip._tk_windows + end + def self.tk_object_table(id) + __getip._tk_table_list[id] + end + def self.create_table + if __getip.slave? + begin + raise SecurityError, "slave-IP has no permission creating a new table" + rescue SecurityError => e + #p e.backtrace + # Is called on a Ruby/Tk library? + caller_info = e.backtrace[1] + if caller_info =~ %r{^#{MultiTkIp::BASE_DIR}/(tk|tkextlib)/[^:]+\.rb:} + # Probably, caller is a Ruby/Tk library --> allow creating + else + raise e + end + end + end + + id = @@TK_TABLE_LIST.size + obj = Object.new + @@TK_TABLE_LIST << obj + obj.instance_variable_set(:@id, id) + obj.instance_variable_set(:@mutex, Mutex.new) + obj.instance_eval{ + def self.mutex + @mutex + end + def self.method_missing(m, *args) + MultiTkIp.tk_object_table(@id).__send__(m, *args) + end + } + obj.freeze + @@IP_TABLE.each{|tg, ip| ip._add_new_tables } + return obj + end + + def self.init_ip_env(script = Proc.new) + @@INIT_IP_ENV << script + if __getip.slave? + begin + raise SecurityError, "slave-IP has no permission initializing IP env" + rescue SecurityError => e + #p e.backtrace + # Is called on a Ruby/Tk library? + caller_info = e.backtrace[1] + if caller_info =~ %r{^#{MultiTkIp::BASE_DIR}/(tk|tkextlib)/[^:]+\.rb:} + # Probably, caller is a Ruby/Tk library --> allow creating + else + raise e + end + end + end + + # @@IP_TABLE.each{|tg, ip| + # ip._init_ip_env(script) + # } + @@DEFAULT_MASTER.__init_ip_env__(@@IP_TABLE, script) + end + + def self.add_tk_procs(name, args=nil, body=nil) + if name.kind_of?(Array) # => an array of [name, args, body] + name.each{|param| self.add_tk_procs(*param)} + else + name = name.to_s + @@ADD_TK_PROCS << [name, args, body] + @@IP_TABLE.each{|tg, ip| + ip._add_tk_procs(name, args, body) + } + end + end + + def self.remove_tk_procs(*names) + names.each{|name| + name = name.to_s + @@ADD_TK_PROCS.delete_if{|elem| + elem.kind_of?(Array) && elem[0].to_s == name + } + } + @@IP_TABLE.each{|tg, ip| + ip._remove_tk_procs(*names) + } + end + + def self.init_ip_internal + __getip._init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS) + end +end + + +# for callback operation +class MultiTkIp + def self.cb_entry_class + @@CB_ENTRY_CLASS + end + def self.get_cb_entry(cmd) + @@CB_ENTRY_CLASS.new(__getip, cmd).freeze + end + +=begin + def cb_eval(cmd, *args) + #self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) } + #ret = self.eval_callback{ TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *args)) } + ret = self.eval_callback(*args){|safe, *params| + $SAFE=safe if $SAFE < safe + TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params)) + } + if ret.kind_of?(Exception) + raise ret + end + ret + end +=end + def cb_eval(cmd, *args) + self.eval_callback(*args){|safe, *params| + $SAFE=safe if $SAFE < safe + # TkUtil.eval_cmd(cmd, *params) + TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params)) + } + end +=begin + def cb_eval(cmd, *args) + @callback_status[0] ||= TkVariable.new + @callback_status[1] ||= TkVariable.new + st, val = @callback_status + th = Thread.new{ + self.eval_callback(*args){|safe, *params| + #p [status, val, safe, *params] + $SAFE=safe if $SAFE < safe + begin + TkComm._get_eval_string(TkUtil.eval_cmd(cmd, *params)) + rescue TkCallbackContinue + st.value = 4 + rescue TkCallbackBreak + st.value = 3 + rescue TkCallbackReturn + st.value = 2 + rescue Exception => e + val.value = e.message + st.value = 1 + else + st.value = 0 + end + } + } + begin + st.wait + status = st.numeric + retval = val.value + rescue => e + fail e + end + + if status == 1 + fail RuntimeError, retval + elsif status == 2 + fail TkCallbackReturn, "Tk callback returns 'return' status" + elsif status == 3 + fail TkCallbackBreak, "Tk callback returns 'break' status" + elsif status == 4 + fail TkCallbackContinue, "Tk callback returns 'continue' status" + else + '' + end + end +=end + +end + +# pseudo-toplevel operation support +class MultiTkIp + # instance method + def __pseudo_toplevel + ip = MultiTkIp.__getip + (ip == @@DEFAULT_MASTER || ip == self) && + self.__pseudo_toplevel_evaluable? && @pseudo_toplevel[1] + end + + def __pseudo_toplevel=(m) + unless (Thread.current.group == ThreadGroup::Default && + MultiTkIp.__getip == @@DEFAULT_MASTER) + fail SecurityError, "no permission to manipulate" + end + + # if m.kind_of?(Module) && m.respond_to?(:pseudo_toplevel_evaluable?) + if m.respond_to?(:pseudo_toplevel_evaluable?) + @pseudo_toplevel[0] = true + @pseudo_toplevel[1] = m + else + fail ArgumentError, 'fail to set pseudo-toplevel' + end + self + end + + def __pseudo_toplevel_evaluable? + begin + @pseudo_toplevel[0] && @pseudo_toplevel[1].pseudo_toplevel_evaluable? + rescue Exception + false + end + end + + def __pseudo_toplevel_evaluable=(mode) + unless (Thread.current.group == ThreadGroup::Default && + MultiTkIp.__getip == @@DEFAULT_MASTER) + fail SecurityError, "no permission to manipulate" + end + + @pseudo_toplevel[0] = (mode)? true: false + end +end + +# evaluate a procedure on the proper interpreter +class MultiTkIp + # instance method + def eval_proc_core(req_val, cmd, *args) + # check + raise SecurityError, "no permission to manipulate" unless self.manipulable? + unless cmd.kind_of?(Proc) || cmd.kind_of?(Method) + raise RuntimeError, "A Proc/Method object is expected for the 'cmd' argument" + end + + # on IP thread + if @cmd_receiver == Thread.current || + (!req_val && TclTkLib.mainloop_thread? != false) # callback + begin + ret = cmd.call(safe_level, *args) + rescue SystemExit => e + # exit IP + warn("Warning: "+ $! + " on " + self.inspect) if $DEBUG + begin + self._eval_without_enc('exit') + rescue Exception + end + self.delete + ret = nil + rescue Exception => e + if $DEBUG + warn("Warning: " + e.class.inspect + + ((e.message.length > 0)? ' "' + e.message + '"': '') + + " on " + self.inspect) + end +=begin + begin + bt = _toUTF8(e.backtrace.join("\n")) + bt.instance_variable_set(:@encoding, 'utf-8') + rescue Exception + bt = e.backtrace.join("\n") + end + begin + @interp._set_global_var('errorInfo', bt) + rescue Exception + end +=end + ret = e + end + return ret + end + + # send cmd to the proc-queue + unless req_val + begin + @cmd_queue.enq([nil, cmd, *args]) + rescue Exception => e + # ignore + if $DEBUG + warn("Warning: " + e.class.inspect + + ((e.message.length > 0)? ' "' + e.message + '"': '') + + " on " + self.inspect) + end + return e + end + return nil + end + + # send and get return value by exception + begin + @cmd_queue.enq([Thread.current, cmd, *args]) + Thread.stop + rescue MultiTkIp_OK => ret + # return value + return ret.value + rescue SystemExit => e + # exit IP + warn("Warning: " + $! + " on " + self.inspect) if $DEBUG + begin + self._eval_without_enc('exit') + rescue Exception + end + if !self.deleted? && !safe? && allow_ruby_exit? + self.delete + fail e + else + self.delete + end + rescue Exception => e + if $DEBUG + warn("Warning: " + e.class.inspect + + ((e.message.length > 0)? ' "' + e.message + '"': '') + + " on " + self.inspect) + end + return e + end + return nil + end + private :eval_proc_core + + def eval_callback(*args) + if block_given? + cmd = Proc.new + else + cmd = args.shift + end + current = Thread.current + backup_ip = current[:callback_ip] + current[:callback_ip] = self + begin + eval_proc_core(false, cmd, *args) + ensure + current[:callback_ip] = backup_ip + end + end + + def eval_proc(*args) + # The scope of the eval-block of 'eval_proc' method is different from + # the external. If you want to pass local values to the eval-block, + # use arguments of eval_proc method. They are passed to block-arguments. + if block_given? + cmd = Proc.new + else + unless (cmd = args.shift) + fail ArgumentError, "A Proc or Method object is expected for 1st argument" + end + end + if TclTkLib.mainloop_thread? == true + # call from eventloop + current = Thread.current + backup_ip = current[:callback_ip] + current[:callback_ip] = self + begin + eval_proc_core(false, + proc{|safe, *params| + $SAFE=safe if $SAFE < safe + cmd.call(*params) + }, *args) + ensure + current[:callback_ip] = backup_ip + end + else + eval_proc_core(true, + proc{|safe, *params| + $SAFE=safe if $SAFE < safe + Thread.new(*params, &cmd).value + }, + *args) + end + end + alias call eval_proc + + def bg_eval_proc(*args) + if block_given? + cmd = Proc.new + else + unless (cmd = args.shift) + fail ArgumentError, "A Proc or Method object is expected for 1st argument" + end + end + Thread.new{ + eval_proc(cmd, *args) +=begin + eval_proc_core(false, + proc{|safe, *params| + $SAFE=safe if $SAFE < safe + Thread.new(*params, &cmd).value + }, + safe_level, *args) +=end + } + end + alias background_eval_proc bg_eval_proc + alias thread_eval_proc bg_eval_proc + alias bg_call bg_eval_proc + alias background_call bg_eval_proc + + def eval_string(cmd, *eval_args) + # cmd string ==> proc + unless cmd.kind_of?(String) + raise RuntimeError, "A String object is expected for the 'cmd' argument" + end + + eval_proc_core(true, + proc{|safe| + Kernel.eval("$SAFE=#{safe} if $SAFE < #{safe};" << cmd, + *eval_args) + }) + end + alias eval_str eval_string + + def bg_eval_string(cmd, *eval_args) + # cmd string ==> proc + unless cmd.kind_of?(String) + raise RuntimeError, "A String object is expected for the 'cmd' argument" + end + Thread.new{ + eval_proc_core(true, + proc{|safe| + Kernel.eval("$SAFE=#{safe} if $SAFE < #{safe};" << cmd, + *eval_args) + }) + } + end + alias background_eval_string bg_eval_string + alias bg_eval_str bg_eval_string + alias background_eval_str bg_eval_string + + def eval(*args, &blk) + if block_given? + eval_proc(*args, &blk) + elsif args[0] + if args[0].respond_to?(:call) + eval_proc(*args) + else + eval_string(*args) + end + else + fail ArgumentError, "no argument to eval" + end + end + + def bg_eval(*args, &blk) + if block_given? + bg_eval_proc(*args, &blk) + elsif args[0] + if args[0].respond_to?(:call) + bg_eval_proc(*args) + else + bg_eval_string(*args) + end + else + fail ArgumentError, "no argument to eval" + end + end + alias background_eval bg_eval +end + +class << MultiTkIp + # class method + def eval_proc(*args, &blk) + # class ==> interp object + __getip.eval_proc(*args, &blk) + end + alias call eval_proc + + def bg_eval_proc(*args, &blk) + # class ==> interp object + __getip.bg_eval_proc(*args, &blk) + end + alias background_eval_proc bg_eval_proc + alias thread_eval_proc bg_eval_proc + alias bg_call bg_eval_proc + alias background_call bg_eval_proc + + def eval_string(cmd, *eval_args) + # class ==> interp object + __getip.eval_string(cmd, *eval_args) + end + alias eval_str eval_string + + def bg_eval_string(cmd, *eval_args) + # class ==> interp object + __getip.bg_eval_string(cmd, *eval_args) + end + alias background_eval_string bg_eval_string + alias bg_eval_str bg_eval_string + alias background_eval_str bg_eval_string + + def eval(*args, &blk) + # class ==> interp object + __getip.eval(*args, &blk) + end + def bg_eval(*args, &blk) + # class ==> interp object + __getip.bg_eval(*args, &blk) + end + alias background_eval bg_eval +end + + +# event loop +# all master/slave IPs are controled by only one event-loop +class MultiTkIp + def self.default_master? + __getip == @@DEFAULT_MASTER + end +end +class << MultiTkIp + def mainloop(check_root = true) + __getip.mainloop(check_root) + end + def mainloop_watchdog(check_root = true) + __getip.mainloop_watchdog(check_root) + end + def do_one_event(flag = TclTkLib::EventFlag::ALL) + __getip.do_one_event(flag) + end + def mainloop_abort_on_exception + # __getip.mainloop_abort_on_exception + TclTkLib.mainloop_abort_on_exception + end + def mainloop_abort_on_exception=(mode) + # __getip.mainloop_abort_on_exception=(mode) + TclTkLib.mainloop_abort_on_exception=(mode) + end + def set_eventloop_tick(tick) + __getip.set_eventloop_tick(tick) + end + def get_eventloop_tick + __getip.get_eventloop_tick + end + def set_no_event_wait(tick) + __getip.set_no_event_wait(tick) + end + def get_no_event_wait + __getip.get_no_event_wait + end + def set_eventloop_weight(loop_max, no_event_tick) + __getip.set_eventloop_weight(loop_max, no_event_tick) + end + def get_eventloop_weight + __getip.get_eventloop_weight + end +end + +# class methods to delegate to TclTkIp +class << MultiTkIp + def method_missing(id, *args) + __getip.__send__(id, *args) + end + + def make_safe + __getip.make_safe + end + + def safe? + __getip.safe? + end + + def safe_base? + begin + __getip.safe_base? + rescue + false + end + end + + def allow_ruby_exit? + __getip.allow_ruby_exit? + end + + def allow_ruby_exit= (mode) + __getip.allow_ruby_exit = mode + end + + def delete + __getip.delete + end + + def deleted? + __getip.deleted? + end + + def has_mainwindow? + __getip.has_mainwindow? + end + + def invalid_namespace? + __getip.invalid_namespace? + end + + def abort(msg = nil) + __getip.abort(msg) + end + + def exit(st = true) + __getip.exit(st) + end + + def exit!(st = false) + __getip.exit!(st) + end + + def restart(app_name = nil, keys = {}) + init_ip_internal + + __getip._invoke('set', 'argv0', app_name) if app_name + if keys.kind_of?(Hash) + __getip._invoke('set', 'argv', _keys2opts(keys)) + end + + __getip.restart + end + + def _eval(str) + __getip._eval(str) + end + + def _invoke(*args) + __getip._invoke(*args) + end + + def _eval_without_enc(str) + __getip._eval_without_enc(str) + end + + def _invoke_without_enc(*args) + __getip._invoke_without_enc(*args) + end + + def _eval_with_enc(str) + __getip._eval_with_enc(str) + end + + def _invoke_with_enc(*args) + __getip._invoke_with_enc(*args) + end + + def _toUTF8(str, encoding=nil) + __getip._toUTF8(str, encoding) + end + + def _fromUTF8(str, encoding=nil) + __getip._fromUTF8(str, encoding) + end + + def _thread_vwait(var) + __getip._thread_vwait(var) + end + + def _thread_tkwait(mode, target) + __getip._thread_tkwait(mode, target) + end + + def _return_value + __getip._return_value + end + + def _get_variable(var, flag) + __getip._get_variable(var, flag) + end + def _get_variable2(var, idx, flag) + __getip._get_variable2(var, idx, flag) + end + def _set_variable(var, value, flag) + __getip._set_variable(var, value, flag) + end + def _set_variable2(var, idx, value, flag) + __getip._set_variable2(var, idx, value, flag) + end + def _unset_variable(var, flag) + __getip._unset_variable(var, flag) + end + def _unset_variable2(var, idx, flag) + __getip._unset_variable2(var, idx, flag) + end + + def _get_global_var(var) + __getip._get_global_var(var) + end + def _get_global_var2(var, idx) + __getip._get_global_var2(var, idx) + end + def _set_global_var(var, value) + __getip._set_global_var(var, value) + end + def _set_global_var2(var, idx, value) + __getip._set_global_var2(var, idx, value) + end + def _unset_global_var(var) + __getip._unset_global_var(var) + end + def _unset_global_var2(var, idx) + __getip._unset_global_var2(var, idx) + end + + def _make_menu_embeddable(menu_path) + __getip._make_menu_embeddable(menu_path) + end + + def _split_tklist(str) + __getip._split_tklist(str) + end + def _merge_tklist(*args) + __getip._merge_tklist(*args) + end + def _conv_listelement(arg) + __getip._conv_listelement(arg) + end + + def _create_console + __getip._create_console + end +end + + +# wrap methods on TclTkLib : not permit calling TclTkLib module methods +class << TclTkLib + def mainloop(check_root = true) + MultiTkIp.mainloop(check_root) + end + def mainloop_watchdog(check_root = true) + MultiTkIp.mainloop_watchdog(check_root) + end + def do_one_event(flag = TclTkLib::EventFlag::ALL) + MultiTkIp.do_one_event(flag) + end + #def mainloop_abort_on_exception + # MultiTkIp.mainloop_abort_on_exception + #end + #def mainloop_abort_on_exception=(mode) + # MultiTkIp.mainloop_abort_on_exception=(mode) + #end + def set_eventloop_tick(tick) + MultiTkIp.set_eventloop_tick(tick) + end + def get_eventloop_tick + MultiTkIp.get_eventloop_tick + end + def set_no_event_wait(tick) + MultiTkIp.set_no_event_wait(tick) + end + def get_no_event_wait + MultiTkIp.get_no_event_wait + end + def set_eventloop_weight(loop_max, no_event_tick) + MultiTkIp.set_eventloop_weight(loop_max, no_event_tick) + end + def get_eventloop_weight + MultiTkIp.get_eventloop_weight + end + def restart(*args) + MultiTkIp.restart(*args) + end + + def _merge_tklist(*args) + MultiTkIp._merge_tklist(*args) + end + def _conv_listelement(arg) + MultiTkIp._conv_listelement(arg) + end +end + + +# depend on TclTkIp +class MultiTkIp + def mainloop(check_root = true, restart_on_dead = true) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + if WITH_RUBY_VM ### Ruby 1.9 !!!!!!!!!!! + return @interp_thread.value if @interp_thread + end + + #return self if self.slave? + #return self if self != @@DEFAULT_MASTER + if self != @@DEFAULT_MASTER + if @wait_on_mainloop[0] + begin + @wait_on_mainloop[1] += 1 + if $SAFE >= 4 + _receiver_mainloop(check_root).join + else + @cmd_queue.enq([@system, 'call_mainloop', + Thread.current, check_root]) + Thread.stop + end + rescue MultiTkIp_OK => ret + # return value + if ret.value.kind_of?(Thread) + return ret.value.value + else + return ret.value + end + rescue SystemExit => e + # exit IP + warn("Warning: " + $! + " on " + self.inspect) if $DEBUG + begin + self._eval_without_enc('exit') + rescue Exception + end + self.delete + rescue StandardError => e + if $DEBUG + warn("Warning: " + e.class.inspect + + ((e.message.length > 0)? ' "' + e.message + '"': '') + + " on " + self.inspect) + end + return e + rescue Exception => e + return e + ensure + @wait_on_mainloop[1] -= 1 + end + end + return + end + + unless restart_on_dead + @wait_on_mainloop[1] += 1 +=begin + begin + @interp.mainloop(check_root) + rescue StandardError => e + if $DEBUG + warn("Warning: " + e.class.inspect + + ((e.message.length > 0)? ' "' + e.message + '"': '') + + " on " + self.inspect) + end + end +=end + begin + @interp.mainloop(check_root) + ensure + @wait_on_mainloop[1] -= 1 + end + else + loop do + break unless self.alive? + if check_root + begin + break if TclTkLib.num_of_mainwindows == 0 + rescue StandardError + break + end + end + break if @interp.deleted? + begin + @wait_on_mainloop[1] += 1 + @interp.mainloop(check_root) + rescue StandardError => e + if TclTkLib.mainloop_abort_on_exception != nil + #STDERR.print("Warning: Tk mainloop receives ", $!.class.inspect, + # " exception (ignore) : ", $!.message, "\n"); + if $DEBUG + warn("Warning: Tk mainloop receives " << e.class.inspect << + " exception (ignore) : " << e.message); + end + end + #raise e + rescue Exception => e +=begin + if TclTkLib.mainloop_abort_on_exception != nil + #STDERR.print("Warning: Tk mainloop receives ", $!.class.inspect, + # " exception (ignore) : ", $!.message, "\n"); + if $DEBUG + warn("Warning: Tk mainloop receives " << e.class.inspect << + " exception (ignore) : " << e.message); + end + end +=end + raise e + ensure + @wait_on_mainloop[1] -= 1 + Thread.pass # avoid eventloop conflict + end + end + end + self + end + + def make_safe + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.make_safe + end + + def safe? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.safe? + end + + def safe_base? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @safe_base + end + + def allow_ruby_exit? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.allow_ruby_exit? + end + + def allow_ruby_exit= (mode) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.allow_ruby_exit = mode + end + + def delete + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @slave_ip_tbl.each{|name, subip| + _destroy_slaves_of_slaveIP(subip) +=begin + begin + subip._invoke('destroy', '.') unless subip.deleted? + rescue Exception + end +=end + begin + # subip._eval_without_enc("foreach i [after info] {after cancel $i}") + unless subip.deleted? + after_ids = subip._eval_without_enc("after info") + subip._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + end + rescue Exception + end + + # safe_base? + if @interp._eval_without_enc("catch {::safe::interpConfigure #{name}}") == '0' + begin + @interp._eval_without_enc("::safe::interpDelete #{name}") + rescue Exception + else + next if subip.deleted? + end + end + if subip.respond_to?(:safe_base?) && subip.safe_base? && + !subip.deleted? + # do 'exit' to call the delete_hook procedure + begin + subip._eval_without_enc('exit') + rescue Exception + end + else + begin + subip.delete unless subip.deleted? + rescue Exception + end + end + } + + begin + # @interp._eval_without_enc("foreach i [after info] {after cancel $i}") + after_ids = @interp._eval_without_enc("after info") + @interp._eval_without_enc("foreach i {#{after_ids}} {after cancel $i}") + rescue Exception + end + + begin + @interp._invoke('destroy', '.') unless @interp.deleted? + rescue Exception + end + + if @safe_base && !@interp.deleted? + # do 'exit' to call the delete_hook procedure + @interp._eval_without_enc('exit') + end + @interp.delete + self + end + + def deleted? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.deleted? + end + + def has_mainwindow? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.has_mainwindow? + end + + def invalid_namespace? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.invalid_namespace? + end + + def abort(msg = nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if master? && !safe? && allow_ruby_exit? + if msg + Kernel.abort(msg) + else + Kernel.abort + end + else + # ignore msg + delete + 1 + end + end + + def exit(st = true) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if master? && !safe? && allow_ruby_exit? + Kernel.exit(st) + else + delete + st + end + end + + def exit!(st = false) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if master? && !safe? && allow_ruby_exit? + Kernel.exit!(st) + else + delete + st + end + end + + def restart(app_name = nil, keys = {}) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + _init_ip_internal(@@INIT_IP_ENV, @@ADD_TK_PROCS) + + @interp._invoke('set', 'argv0', app_name) if app_name + if keys.kind_of?(Hash) + @interp._invoke('set', 'argv', _keys2opts(keys)) + end + + @interp.restart + end + + def __eval(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.__eval(str) + end + + def __invoke(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.__invoke(*args) + end + + def _eval(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._eval(str) + end + + def _invoke(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke(*args) + end + + def _eval_without_enc(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._eval_without_enc(str) + end + + def _invoke_without_enc(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke_without_enc(*args) + end + + def _eval_with_enc(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._eval_with_enc(str) + end + + def _invoke_with_enc(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke_with_enc(*args) + end + + def _toUTF8(str, encoding=nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._toUTF8(str, encoding) + end + + def _fromUTF8(str, encoding=nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._fromUTF8(str, encoding) + end + + def _thread_vwait(var) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._thread_vwait(var) + end + + def _thread_tkwait(mode, target) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._thread_tkwait(mode, target) + end + + def _return_value + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._return_value + end + + def _get_variable(var, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._get_variable(var, flag) + end + def _get_variable2(var, idx, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._get_variable2(var, idx, flag) + end + def _set_variable(var, value, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._set_variable(var, value, flag) + end + def _set_variable2(var, idx, value, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._set_variable2(var, idx, value, flag) + end + def _unset_variable(var, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._unset_variable(var, flag) + end + def _unset_variable2(var, idx, flag) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._unset_variable2(var, idx, flag) + end + + def _get_global_var(var) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._get_global_var(var) + end + def _get_global_var2(var, idx) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._get_global_var2(var, idx) + end + def _set_global_var(var, value) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._set_global_var(var, value) + end + def _set_global_var2(var, idx, value) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._set_global_var2(var, idx, value) + end + def _unset_global_var(var) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._unset_global_var(var) + end + def _unset_global_var2(var, idx) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._unset_global_var2(var, idx) + end + + def _make_menu_embeddable(menu_path) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._make_menu_embeddable(menu_path) + end + + def _split_tklist(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._split_tklist(str) + end + def _merge_tklist(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._merge_tklist(*args) + end + def _conv_listelement(arg) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._conv_listelement(arg) + end +end + + +# interp command support +class MultiTkIp + def _lst2ary(str) + return [] if str == "" + idx = str.index('{') + while idx and idx > 0 and str[idx-1] == ?\\ + idx = str.index('{', idx+1) + end + return str.split unless idx + + list = str[0,idx].split + str = str[idx+1..-1] + i = -1 + brace = 1 + str.each_byte {|c| + c = c.chr + i += 1 + brace += 1 if c == '{' + brace -= 1 if c == '}' + break if brace == 0 + } + if i == 0 + list.push '' + elsif str[0, i] == ' ' + list.push ' ' + else + list.push str[0..i-1] + end + #list += _lst2ary(str[i+1..-1]) + list.concat(_lst2ary(str[i+1..-1])) + list + end + private :_lst2ary + + def _slavearg(slave) + if slave.kind_of?(MultiTkIp) + slave.path + elsif slave.kind_of?(String) + slave + else + slave.to_s + end + end + private :_slavearg + + def alias_info(slave, cmd_name) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + _lst2ary(@interp._invoke('interp', 'alias', _slavearg(slave), cmd_name)) + end + def self.alias_info(slave, cmd_name) + __getip.alias_info(slave, cmd_name) + end + + def alias_delete(slave, cmd_name) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'alias', _slavearg(slave), cmd_name, '') + self + end + def self.alias_delete(slave, cmd_name) + __getip.alias_delete(slave, cmd_name) + self + end + + def def_alias(slave, new_cmd, org_cmd, *args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + ret = @interp._invoke('interp', 'alias', _slavearg(slave), new_cmd, + '', org_cmd, *args) + (ret == new_cmd)? self: nil + end + def self.def_alias(slave, new_cmd, org_cmd, *args) + ret = __getip.def_alias(slave, new_cmd, org_cmd, *args) + (ret == new_cmd)? self: nil + end + + def aliases(slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + _lst2ary(@interp._invoke('interp', 'aliases', _slavearg(slave))) + end + def self.aliases(slave = '') + __getip.aliases(slave) + end + + def delete_slaves(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + slaves = args.collect{|s| _slavearg(s)} + @interp._invoke('interp', 'delete', *slaves) if slaves.size > 0 + self + end + def self.delete_slaves(*args) + __getip.delete_slaves(*args) + self + end + + def exist?(slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + ret = @interp._invoke('interp', 'exists', _slavearg(slave)) + (ret == '1')? true: false + end + def self.exist?(slave = '') + __getip.exist?(slave) + end + + def delete_cmd(slave, cmd) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + slave_invoke = @interp._invoke('list', 'rename', cmd, '') + @interp._invoke('interp', 'eval', _slavearg(slave), slave_invoke) + self + end + def self.delete_cmd(slave, cmd) + __getip.delete_cmd(slave, cmd) + self + end + + def expose_cmd(slave, cmd, aliasname = nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if aliasname + @interp._invoke('interp', 'expose', _slavearg(slave), cmd, aliasname) + else + @interp._invoke('interp', 'expose', _slavearg(slave), cmd) + end + self + end + def self.expose_cmd(slave, cmd, aliasname = nil) + __getip.expose_cmd(slave, cmd, aliasname) + self + end + + def hide_cmd(slave, cmd, aliasname = nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if aliasname + @interp._invoke('interp', 'hide', _slavearg(slave), cmd, aliasname) + else + @interp._invoke('interp', 'hide', _slavearg(slave), cmd) + end + self + end + def self.hide_cmd(slave, cmd, aliasname = nil) + __getip.hide_cmd(slave, cmd, aliasname) + self + end + + def hidden_cmds(slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + _lst2ary(@interp._invoke('interp', 'hidden', _slavearg(slave))) + end + def self.hidden_cmds(slave = '') + __getip.hidden_cmds(slave) + end + + def invoke_hidden(slave, cmd, *args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = [] + end + keys << _slavearg(slave) + if Tk::TCL_MAJOR_VERSION > 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) + keys << '--' + end + keys << cmd + keys.concat(args) + @interp._invoke('interp', 'invokehidden', *keys) + end + def self.invoke_hidden(slave, cmd, *args) + __getip.invoke_hidden(slave, cmd, *args) + end + + def invoke_hidden_on_global(slave, cmd, *args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = [] + end + keys << _slavearg(slave) + keys << '-global' + if Tk::TCL_MAJOR_VERSION > 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) + keys << '--' + end + keys << cmd + keys.concat(args) + @interp._invoke('interp', 'invokehidden', *keys) + end + def self.invoke_hidden_on_global(slave, cmd, *args) + __getip.invoke_hidden_on_global(slave, cmd, *args) + end + + def invoke_hidden_on_namespace(slave, ns, cmd, *args) + # for Tcl8.5 or later + raise SecurityError, "no permission to manipulate" unless self.manipulable? + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = [] + end + keys << _slavearg(slave) + keys << '-namespace' << TkComm._get_eval_string(ns) + keys << '--' << cmd + keys.concat(args) + @interp._invoke('interp', 'invokehidden', *keys) + end + def self.invoke_hidden_on_namespace(slave, ns, cmd, *args) + __getip.invoke_hidden_on_namespace(slave, ns, cmd, *args) + end + + def mark_trusted(slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'marktrusted', _slavearg(slave)) + self + end + def self.mark_trusted(slave = '') + __getip.mark_trusted(slave) + self + end + + def set_bgerror_handler(cmd = Proc.new, slave = nil, &b) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + unless TkComm._callback_entry?(cmd) + if !slave && b + slave = cmd + cmd = Proc.new(&b) + end + end + slave = '' unless slave + + @interp._invoke('interp', 'bgerror', _slavearg(slave), cmd) + end + def self.bgerror(cmd = Proc.new, slave = nil, &b) + __getip.bgerror(cmd, slave, &b) + end + + def get_bgerror_handler(slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + procedure(@interp._invoke('interp', 'bgerror', _slavearg(slave))) + end + def self.bgerror(slave = '') + __getip.bgerror(slave) + end + + def set_limit(limit_type, slave = '', opts = {}) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'limit', _slavearg(slave), limit_type, opts) + end + def self.set_limit(limit_type, slave = '', opts = {}) + __getip.set_limit(limit_type, slave, opts) + end + + def get_limit(limit_type, slave = '', slot = nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + if slot + num_or_str(@interp._invoke('interp', 'limit', _slavearg(slave), + limit_type, slot)) + else + l = @interp._split_tklist(@interp._invoke_without_enc('interp', 'limit', + _slavearg(slave), + limit_type)) + l.map!{|s| _fromUTF8(s)} + r = {} + until l.empty? + key = l.shift[1..-1] + val = l.shift + val = num_or_str(val) if val + r[key] = val + end + r + end + end + def self.get_limit(limit_type, slave = '', slot = nil) + __getip.get_limit(limit_type, slave, slot) + end + + def recursion_limit(slave = '', limit = None) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + number(@interp._invoke('interp', 'recursionlimit', + _slavearg(slave), limit)) + end + def self.recursion_limit(slave = '', limit = None) + __getip.recursion_limit(slave) + end + + def alias_target(aliascmd, slave = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'target', _slavearg(slave), aliascmd) + end + def self.alias_target(aliascmd, slave = '') + __getip.alias_target(aliascmd, slave) + end + + def share_stdin(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'share', src, 'stdin', dist) + self + end + def self.share_stdin(dist, src = '') + __getip.share_stdin(dist, src) + self + end + + def share_stdout(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'share', src, 'stdout', dist) + self + end + def self.share_stdout(dist, src = '') + __getip.share_stdout(dist, src) + self + end + + def share_stderr(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'share', src, 'stderr', dist) + self + end + def self.share_stderr(dist, src = '') + __getip.share_stderr(dist, src) + self + end + + def transfer_stdin(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'transfer', src, 'stdin', dist) + self + end + def self.transfer_stdin(dist, src = '') + __getip.transfer_stdin(dist, src) + self + end + + def transfer_stdout(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'transfer', src, 'stdout', dist) + self + end + def self.transfer_stdout(dist, src = '') + __getip.transfer_stdout(dist, src) + self + end + + def transfer_stderr(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'transfer', src, 'stderr', dist) + self + end + def self.transfer_stderr(dist, src = '') + __getip.transfer_stderr(dist, src) + self + end + + def share_stdio(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'share', src, 'stdin', dist) + @interp._invoke('interp', 'share', src, 'stdout', dist) + @interp._invoke('interp', 'share', src, 'stderr', dist) + self + end + def self.share_stdio(dist, src = '') + __getip.share_stdio(dist, src) + self + end + + def transfer_stdio(dist, src = '') + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._invoke('interp', 'transfer', src, 'stdin', dist) + @interp._invoke('interp', 'transfer', src, 'stdout', dist) + @interp._invoke('interp', 'transfer', src, 'stderr', dist) + self + end + def self.transfer_stdio(dist, src = '') + __getip.transfer_stdio(dist, src) + self + end +end + + +# Safe Base :: manipulating safe interpreter +class MultiTkIp + def safeip_configure(slot, value=None) + # use for '-noStatics' option ==> {statics=>false} + # for '-nestedLoadOk' option ==> {nested=>true} + if slot.kind_of?(Hash) + ip = MultiTkIp.__getip + ip._eval('::safe::interpConfigure ' + @ip_name + ' ' + _keys2opts(slot)) + else + ip._eval('::safe::interpConfigure ' + @ip_name + ' ' + + "-#{slot} #{_get_eval_string(value)}") + end + self + end + + def safeip_configinfo(slot = nil) + ip = MultiTkIp.__getip + ret = {} + if slot + conf = _lst2ary(ip._eval("::safe::interpConfigure " + + @ip_name + " -#{slot}")) + if conf[0] == '-deleteHook' +=begin + if conf[1] =~ /^rb_out\S* (c(_\d+_)?\d+)/ + ret[conf[0][1..-1]] = MultiTkIp._tk_cmd_tbl[$1] +=end + if conf[1] =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + ret[conf[0][1..-1]] = MultiTkIp._tk_cmd_tbl[$4] + else + ret[conf[0][1..-1]] = conf[1] + end + else + ret[conf[0][1..-1]] = conf[1] + end + else + Hash[*_lst2ary(ip._eval("::safe::interpConfigure " + + @ip_name))].each{|k, v| + if k == '-deleteHook' +=begin + if v =~ /^rb_out\S* (c(_\d+_)?\d+)/ + ret[k[1..-1]] = MultiTkIp._tk_cmd_tbl[$1] +=end + if v =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + ret[k[1..-1]] = MultiTkIp._tk_cmd_tbl[$4] + else + ret[k[1..-1]] = v + end + else + ret[k[1..-1]] = v + end + } + end + ret + end + + def safeip_delete + ip = MultiTkIp.__getip + ip._eval("::safe::interpDelete " + @ip_name) + end + + def safeip_add_to_access_path(dir) + ip = MultiTkIp.__getip + ip._eval("::safe::interpAddToAccessPath #{@ip_name} #{dir}") + end + + def safeip_find_in_access_path(dir) + ip = MultiTkIp.__getip + ip._eval("::safe::interpFindInAccessPath #{@ip_name} #{dir}") + end + + def safeip_set_log_cmd(cmd = Proc.new) + ip = MultiTkIp.__getip + ip._eval("::safe::setLogCmd #{@ip_name} #{_get_eval_string(cmd)}") + end +end + + +# encoding convert +class << MultiTkIp + def encoding_table + __getip.encoding_table + end + + def force_default_encoding=(mode) + __getip.force_default_encoding=(mode) + end + + def force_default_encoding? + __getip.force_default_encoding? + end + + def default_encoding=(enc) + __getip.default_encoding=(enc) + end + + def encoding=(enc) + __getip.encoding=(enc) + end + + def encoding_name + __getip.encoding_name + end + + def encoding_obj + __getip.encoding_obj + end + alias encoding encoding_name + alias default_encoding encoding_name + + def encoding_convertfrom(str, enc=None) + __getip.encoding_convertfrom(str, enc) + end + alias encoding_convert_from encoding_convertfrom + + def encoding_convertto(str, enc=None) + __getip.encoding_convertto(str, enc) + end + alias encoding_convert_to encoding_convertto +end +class MultiTkIp + def encoding_table + @interp.encoding_table + end + + def force_default_encoding=(mode) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.force_default_encoding = mode + end + def force_default_encoding? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.force_default_encoding? + end + + def default_encoding=(enc) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.default_encoding = enc + end + + def encoding=(enc) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.encoding = enc + end + def encoding_name + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.encoding_name + end + def encoding_obj + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.encoding_obj + end + alias encoding encoding_name + alias default_encoding encoding_name + + def encoding_convertfrom(str, enc=None) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.encoding_convertfrom(str, enc) + end + alias encoding_convert_from encoding_convertfrom + + def encoding_convertto(str, enc=None) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp.encoding_convertto(str, enc) + end + alias encoding_convert_to encoding_convertto +end + + +# remove methods for security +=begin +class MultiTkIp + INTERP_THREAD = @@DEFAULT_MASTER.instance_variable_get('@interp_thread') + INTERP_MUTEX = INTERP_THREAD[:mutex] + INTERP_ROOT_CHECK = INTERP_THREAD[:root_check] + + # undef_method :instance_eval + undef_method :instance_variable_get + undef_method :instance_variable_set +end + +module TkCore + if MultiTkIp::WITH_RUBY_VM && + ! MultiTkIp::RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! + INTERP_THREAD = MultiTkIp::INTERP_THREAD + INTERP_MUTEX = MultiTkIp::INTERP_MUTEX + INTERP_ROOT_CHECK = MultiTkIp::INTERP_ROOT_CHECK + end +end +class MultiTkIp + remove_const(:INTERP_THREAD) + remove_const(:INTERP_MUTEX) + remove_const(:INTERP_ROOT_CHECK) +end +=end +if MultiTkIp::WITH_RUBY_VM && + ! MultiTkIp::RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! + class MultiTkIp + INTERP_THREAD = @@DEFAULT_MASTER.instance_variable_get('@interp_thread') + INTERP_THREAD_STATUS = INTERP_THREAD[:status] + INTERP_MUTEX = INTERP_THREAD[:mutex] + INTERP_ROOT_CHECK = INTERP_THREAD[:root_check] + end + module TkCore + INTERP_THREAD = MultiTkIp::INTERP_THREAD + INTERP_THREAD_STATUS = MultiTkIp::INTERP_THREAD_STATUS + INTERP_MUTEX = MultiTkIp::INTERP_MUTEX + INTERP_ROOT_CHECK = MultiTkIp::INTERP_ROOT_CHECK + end + class MultiTkIp + remove_const(:INTERP_THREAD) + remove_const(:INTERP_THREAD_STATUS) + remove_const(:INTERP_MUTEX) + remove_const(:INTERP_ROOT_CHECK) + end +end + +class MultiTkIp + # undef_method :instance_eval + undef_method :instance_variable_get + undef_method :instance_variable_set +end +# end of MultiTkIp definition + +# defend against modification +#MultiTkIp.freeze +#TclTkLib.freeze + +######################################## +# start Tk which depends on MultiTkIp +module TkCore + INTERP = MultiTkIp +end +require 'tk' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/remote-tk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/remote-tk.rb new file mode 100644 index 0000000..f267900 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/remote-tk.rb @@ -0,0 +1,530 @@ +# +# remote-tk.rb - supports to control remote Tk interpreters +# by Hidetoshi NAGAI + +if defined? MultiTkIp + fail RuntimeError, "'remote-tk' library must be required before requiring 'multi-tk'" +end + +class MultiTkIp; end +class RemoteTkIp < MultiTkIp; end + +class MultiTkIp + @@IP_TABLE = {}.taint unless defined?(@@IP_TABLE) + @@TK_TABLE_LIST = [].taint unless defined?(@@TK_TABLE_LIST) + def self._IP_TABLE; @@IP_TABLE; end + def self._TK_TABLE_LIST; @@TK_TABLE_LIST; end + + @flag = true + def self._DEFAULT_MASTER + # work only once + if @flag + @flag = nil + @@DEFAULT_MASTER + else + nil + end + end +end +class RemoteTkIp + @@IP_TABLE = MultiTkIp._IP_TABLE unless defined?(@@IP_TABLE) + @@TK_TABLE_LIST = MultiTkIp._TK_TABLE_LIST unless defined?(@@TK_TABLE_LIST) +end +class << MultiTkIp + undef _IP_TABLE + undef _TK_TABLE_LIST +end + +require 'multi-tk' + +class RemoteTkIp + if defined?(@@DEFAULT_MASTER) + MultiTkIp._DEFAULT_MASTER + else + @@DEFAULT_MASTER = MultiTkIp._DEFAULT_MASTER + end +end + + +############################### + +class << RemoteTkIp + undef new_master, new_slave, new_safe_slave + undef new_trusted_slave, new_safeTk + + def new(*args, &b) + ip = __new(*args) + ip.eval_proc(&b) if b + ip + end +end + +class RemoteTkIp + def initialize(remote_ip, displayof=nil, timeout=5) + if $SAFE >= 4 + fail SecurityError, "cannot access another interpreter at level #{$SAFE}" + end + + @interp = MultiTkIp.__getip + if @interp.safe? + fail SecurityError, "safe-IP cannot create RemoteTkIp" + end + + + @interp.allow_ruby_exit = false + @appname = @interp._invoke('tk', 'appname') + @remote = remote_ip.to_s.dup.freeze + if displayof.kind_of?(TkWindow) + @displayof = displayof.path.dup.freeze + else + @displayof = nil + end + if self.deleted? + fail RuntimeError, "no Tk application named \"#{@remote}\"" + end + + @tk_windows = {} + @tk_table_list = [] + @slave_ip_tbl = {} + @slave_ip_top = {} + + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + + @tk_windows.taint unless @tk_windows.tainted? + @tk_table_list.taint unless @tk_table_list.tainted? + @slave_ip_tbl.taint unless @slave_ip_tbl.tainted? + @slave_ip_top.taint unless @slave_ip_top.tainted? + + @system = Object.new + + @threadgroup = ThreadGroup.new + + @safe_level = [$SAFE] + + @wait_on_mainloop = [true, 0] + + @cmd_queue = Queue.new + +=begin + @cmd_receiver, @receiver_watchdog = _create_receiver_and_watchdog() + + @threadgroup.add @cmd_receiver + @threadgroup.add @receiver_watchdog + + @threadgroup.enclose +=end + @@DEFAULT_MASTER.assign_receiver_and_watchdog(self) + + @@IP_TABLE[@threadgroup] = self + @@TK_TABLE_LIST.size.times{ + (tbl = {}).tainted? || tbl.taint + @tk_table_list << tbl + } + + @ret_val = TkVariable.new + if timeout > 0 && ! _available_check(timeout) + fail RuntimeError, "cannot create connection" + end + @ip_id = _create_connection + + class << self + undef :instance_eval + end + + self.freeze # defend against modification + end + + def manipulable? + return true if (Thread.current.group == ThreadGroup::Default) + MultiTkIp.__getip == @interp && ! @interp.safe? + end + def self.manipulable? + true + end + + def _is_master_of?(tcltkip_obj) + tcltkip_obj == @interp + end + protected :_is_master_of? + + def _ip_id_ + @ip_id + end + + def _available_check(timeout = 5) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + return nil if timeout < 1 + @ret_val.value = '' + @interp._invoke('send', '-async', @remote, + 'send', '-async', Tk.appname, + "set #{@ret_val.id} ready") + Tk.update + if @ret_val != 'ready' + (1..(timeout*5)).each{ + sleep 0.2 + Tk.update + break if @ret_val == 'ready' + } + end + @ret_val.value == 'ready' + end + private :_available_check + + def _create_connection + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + ip_id = '_' + @interp._invoke('send', @remote, <<-'EOS') + '_' + if {[catch {set _rubytk_control_ip_id_} ret] != 0} { + set _rubytk_control_ip_id_ 0 + } else { + set _rubytk_control_ip_id_ [expr $ret + 1] + } + return $_rubytk_control_ip_id_ + EOS + + @interp._invoke('send', @remote, <<-EOS) + proc rb_out#{ip_id} args { + send #{@appname} rb_out \$args + } + EOS + + ip_id + end + private :_create_connection + + def _appsend(enc_mode, async, *cmds) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + p ['_appsend', [@remote, @displayof], enc_mode, async, cmds] if $DEBUG + if $SAFE >= 4 + fail SecurityError, "cannot send commands at level 4" + elsif $SAFE >= 1 && cmds.find{|obj| obj.tainted?} + fail SecurityError, "cannot send tainted commands at level #{$SAFE}" + end + + cmds = @interp._merge_tklist(*TkUtil::_conv_args([], enc_mode, *cmds)) + if @displayof + if async + @interp.__invoke('send', '-async', '-displayof', @displayof, + '--', @remote, *cmds) + else + @interp.__invoke('send', '-displayof', @displayof, + '--', @remote, *cmds) + end + else + if async + @interp.__invoke('send', '-async', '--', @remote, *cmds) + else + @interp.__invoke('send', '--', @remote, *cmds) + end + end + end + private :_appsend + + def ready?(timeout=5) + if timeout < 0 + fail ArgumentError, "timeout must be positive number" + end + _available_check(timeout) + end + + def is_rubytk? + return false if _appsend(false, false, 'info', 'command', 'ruby') == "" + [ _appsend(false, false, 'ruby', 'RUBY_VERSION'), + _appsend(false, false, 'set', 'tk_patchLevel') ] + end + + def appsend(async, *args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + if @displayof + Tk.appsend_displayof(@remote, @displayof, async, *args) + else + Tk.appsend(@remote, async, *args) + end + end + + def rb_appsend(async, *args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + if @displayof + Tk.rb_appsend_displayof(@remote, @displayof, async, *args) + else + Tk.rb_appsend(@remote, async, *args) + end + end + + def create_slave(name, safe=false) + if safe + safe_opt = '' + else + safe_opt = '-safe' + end + _appsend(false, false, "interp create #{safe_opt} -- #{name}") + end + + def make_safe + fail RuntimeError, 'cannot change safe mode of the remote interpreter' + end + + def safe? + _appsend(false, false, 'interp issafe') + end + + def safe_base? + false + end + + def allow_ruby_exit? + false + end + + def allow_ruby_exit= (mode) + fail RuntimeError, 'cannot change mode of the remote interpreter' + end + + def delete + _appsend(false, true, 'exit') + end + + def deleted? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + if @displayof + lst = @interp._invoke_without_enc('winfo', 'interps', + '-displayof', @displayof) + else + lst = @interp._invoke_without_enc('winfo', 'interps') + end + # unless @interp._split_tklist(lst).index(@remote) + unless @interp._split_tklist(lst).index(_toUTF8(@remote)) + true + else + false + end + end + + def has_mainwindow? + raise SecurityError, "no permission to manipulate" unless self.manipulable? + + begin + inf = @interp._invoke_without_enc('info', 'command', '.') + rescue Exception + return nil + end + if !inf.kind_of?(String) || inf != '.' + false + else + true + end + end + + def invalid_namespace? + false + end + + def restart + fail RuntimeError, 'cannot restart the remote interpreter' + end + + def __eval(str) + _appsend(false, false, str) + end + def _eval(str) + _appsend(nil, false, str) + end + def _eval_without_enc(str) + _appsend(false, false, str) + end + def _eval_with_enc(str) + _appsend(true, false, str) + end + + def _invoke(*args) + _appsend(nil, false, *args) + end + + def __invoke(*args) + _appsend(false, false, *args) + end + def _invoke(*args) + _appsend(nil, false, *args) + end + def _invoke_without_enc(*args) + _appsend(false, false, *args) + end + def _invoke_with_enc(*args) + _appsend(true, false, *args) + end + + def _toUTF8(str, encoding=nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._toUTF8(str, encoding) + end + + def _fromUTF8(str, encoding=nil) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._fromUTF8(str, encoding) + end + + def _thread_vwait(var_name) + _appsend(false, 'thread_vwait', varname) + end + + def _thread_tkwait(mode, target) + _appsend(false, 'thread_tkwait', mode, target) + end + + def _return_value + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._return_value + end + + def _get_variable(var_name, flag) + # ignore flag + _appsend(false, 'set', TkComm::_get_eval_string(var_name)) + end + def _get_variable2(var_name, index_name, flag) + # ignore flag + _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})") + end + + def _set_variable(var_name, value, flag) + # ignore flag + _appsend(false, 'set', TkComm::_get_eval_string(var_name), TkComm::_get_eval_string(value)) + end + def _set_variable2(var_name, index_name, value, flag) + # ignore flag + _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})", TkComm::_get_eval_string(value)) + end + + def _unset_variable(var_name, flag) + # ignore flag + _appsend(false, 'unset', TkComm::_get_eval_string(var_name)) + end + def _unset_variable2(var_name, index_name, flag) + # ignore flag + _appsend(false, 'unset', "#{var_name}(#{index_name})") + end + + def _get_global_var(var_name) + _appsend(false, 'set', TkComm::_get_eval_string(var_name)) + end + def _get_global_var2(var_name, index_name) + _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})") + end + + def _set_global_var(var_name, value) + _appsend(false, 'set', TkComm::_get_eval_string(var_name), TkComm::_get_eval_string(value)) + end + def _set_global_var2(var_name, index_name, value) + _appsend(false, 'set', "#{TkComm::_get_eval_string(var_name)}(#{TkComm::_get_eval_string(index_name)})", TkComm::_get_eval_string(value)) + end + + def _unset_global_var(var_name) + _appsend(false, 'unset', TkComm::_get_eval_string(var_name)) + end + def _unset_global_var2(var_name, index_name) + _appsend(false, 'unset', "#{var_name}(#{index_name})") + end + + def _split_tklist(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._split_tklist(str) + end + + def _merge_tklist(*args) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._merge_tklist(*args) + end + + def _conv_listelement(str) + raise SecurityError, "no permission to manipulate" unless self.manipulable? + @interp._conv_listelement(str) + end + + def _create_console + fail RuntimeError, 'not support "_create_console" on the remote interpreter' + end + + def mainloop + fail RuntimeError, 'not support "mainloop" on the remote interpreter' + end + def mainloop_watchdog + fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter' + end + def do_one_evant(flag = nil) + fail RuntimeError, 'not support "do_one_event" on the remote interpreter' + end + def mainloop_abort_on_exception + fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter' + end + def mainloop_abort_on_exception=(mode) + fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter' + end + def set_eventloop_tick(*args) + fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter' + end + def get_eventloop_tick + fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter' + end + def set_no_event_wait(*args) + fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter' + end + def get_no_event_wait + fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter' + end + def set_eventloop_weight(*args) + fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter' + end + def get_eventloop_weight + fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter' + end +end + +class << RemoteTkIp + def mainloop(*args) + fail RuntimeError, 'not support "mainloop" on the remote interpreter' + end + def mainloop_watchdog(*args) + fail RuntimeError, 'not support "mainloop_watchdog" on the remote interpreter' + end + def do_one_evant(flag = nil) + fail RuntimeError, 'not support "do_one_event" on the remote interpreter' + end + def mainloop_abort_on_exception + fail RuntimeError, 'not support "mainloop_abort_on_exception" on the remote interpreter' + end + def mainloop_abort_on_exception=(mode) + fail RuntimeError, 'not support "mainloop_abort_on_exception=" on the remote interpreter' + end + def set_eventloop_tick(*args) + fail RuntimeError, 'not support "set_eventloop_tick" on the remote interpreter' + end + def get_eventloop_tick + fail RuntimeError, 'not support "get_eventloop_tick" on the remote interpreter' + end + def set_no_event_wait(*args) + fail RuntimeError, 'not support "set_no_event_wait" on the remote interpreter' + end + def get_no_event_wait + fail RuntimeError, 'not support "get_no_event_wait" on the remote interpreter' + end + def set_eventloop_weight(*args) + fail RuntimeError, 'not support "set_eventloop_weight" on the remote interpreter' + end + def get_eventloop_weight + fail RuntimeError, 'not support "get_eventloop_weight" on the remote interpreter' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tcltk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tcltk.rb new file mode 100644 index 0000000..7f6f416 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tcltk.rb @@ -0,0 +1,367 @@ +# tof + +#### tcltk library, more direct manipulation of tcl/tk +#### Sep. 5, 1997 Y. Shigehiro + +require "tcltklib" + +################ + +# module TclTk: collection of tcl/tk utilities (supplies namespace.) +module TclTk + + # initialize Hash to hold unique symbols and such + @namecnt = {} + + # initialize Hash to hold callbacks + @callback = {} +end + +# TclTk.mainloop(): call TclTkLib.mainloop() +def TclTk.mainloop() + print("mainloop: start\n") if $DEBUG + TclTkLib.mainloop() + print("mainloop: end\n") if $DEBUG +end + +# TclTk.deletecallbackkey(ca): remove callback from TclTk module +# this does not remove callbacks from tcl/tk interpreter +# without calling this method, TclTkInterpreter will not be GCed +# ca: callback(TclTkCallback) +def TclTk.deletecallbackkey(ca) + print("deletecallbackkey: ", ca.to_s(), "\n") if $DEBUG + @callback.delete(ca.to_s) +end + +# TclTk.dcb(ca, wid, W): call TclTk.deletecallbackkey() for each callbacks +# in an array. +# this is for callback for top-level +# ca: array of callbacks(TclTkCallback) +# wid: top-level widget(TclTkWidget) +# w: information about window given by %W(String) +def TclTk.dcb(ca, wid, w) + if wid.to_s() == w + ca.each{|i| + TclTk.deletecallbackkey(i) + } + end +end + +# TclTk._addcallback(ca): register callback +# ca: callback(TclTkCallback) +def TclTk._addcallback(ca) + print("_addcallback: ", ca.to_s(), "\n") if $DEBUG + @callback[ca.to_s()] = ca +end + +# TclTk._callcallback(key, arg): invoke registered callback +# key: key to select callback (to_s value of the TclTkCallback) +# arg: parameter from tcl/tk interpreter +def TclTk._callcallback(key, arg) + print("_callcallback: ", @callback[key].inspect, "\n") if $DEBUG + @callback[key]._call(arg) + # throw out callback value + # should return String to satisfy rb_eval_string() + return "" +end + +# TclTk._newname(prefix): generate unique name(String) +# prefix: prefix of the unique name +def TclTk._newname(prefix) + # generated name counter is stored in @namecnt + if !@namecnt.key?(prefix) + # first appearing prefix, initialize + @namecnt[prefix] = 1 + else + # already appeared prefix, generate next name + @namecnt[prefix] += 1 + end + return "#{prefix}#{@namecnt[prefix]}" +end + +################ + +# class TclTkInterpreter: tcl/tk interpreter +class TclTkInterpreter + + # initialize(): + def initialize() + # generate interpreter object + @ip = TclTkIp.new() + + # add ruby_fmt command to tcl interpreter + # ruby_fmt command format arguments by `format' and call `ruby' command + # (notice ruby command receives only one argument) + if $DEBUG + @ip._eval("proc ruby_fmt {fmt args} { puts \"ruby_fmt: $fmt $args\" ; set cmd [list ruby [format $fmt $args]] ; uplevel $cmd }") + else + @ip._eval("proc ruby_fmt {fmt args} { set cmd [list ruby [format $fmt $args]] ; uplevel $cmd }") + end + + # @ip._get_eval_string(*args): generate string to evaluate in tcl interpreter + # *args: script which is going to be evaluated under tcl/tk + def @ip._get_eval_string(*args) + argstr = "" + args.each{|arg| + argstr += " " if argstr != "" + # call to_eval if it is defined + if (arg.respond_to?(:to_eval)) + argstr += arg.to_eval() + else + # call to_s unless defined + argstr += arg.to_s() + end + } + return argstr + end + + # @ip._eval_args(*args): evaluate string under tcl/tk interpreter + # returns result string. + # *args: script which is going to be evaluated under tcl/tk + def @ip._eval_args(*args) + # calculate the string to eval in the interpreter + argstr = _get_eval_string(*args) + + # evaluate under the interpreter + print("_eval: \"", argstr, "\"") if $DEBUG + res = _eval(argstr) + if $DEBUG + print(" -> \"", res, "\"\n") + elsif _return_value() != 0 + print(res, "\n") + end + fail(%Q/can't eval "#{argstr}"/) if _return_value() != 0 #' + return res + end + + # generate tcl/tk command object and register in the hash + @commands = {} + # for all commands registered in tcl/tk interpreter: + @ip._eval("info command").split(/ /).each{|comname| + if comname =~ /^[.]/ + # if command is a widget (path), generate TclTkWidget, + # and register it in the hash + @commands[comname] = TclTkWidget.new(@ip, comname) + else + # otherwise, generate TclTkCommand + @commands[comname] = TclTkCommand.new(@ip, comname) + end + } + end + + # commands(): returns hash of the tcl/tk commands + def commands() + return @commands + end + + # rootwidget(): returns root widget(TclTkWidget) + def rootwidget() + return @commands["."] + end + + # _tcltkip(): returns @ip(TclTkIp) + def _tcltkip() + return @ip + end + + # method_missing(id, *args): execute undefined method as tcl/tk command + # id: method symbol + # *args: method arguments + def method_missing(id, *args) + # if command named by id registered, then execute it + if @commands.key?(id.id2name) + return @commands[id.id2name].e(*args) + else + # otherwise, exception + super + end + end +end + +# class TclTkObject: base class of the tcl/tk objects +class TclTkObject + + # initialize(ip, exp): + # ip: interpreter(TclTkIp) + # exp: tcl/tk representation + def initialize(ip, exp) + fail("type is not TclTkIp") if !ip.kind_of?(TclTkIp) + @ip = ip + @exp = exp + end + + # to_s(): returns tcl/tk representation + def to_s() + return @exp + end +end + +# class TclTkCommand: tcl/tk commands +# you should not call TclTkCommand.new() +# commands are created by TclTkInterpreter:initialize() +class TclTkCommand < TclTkObject + + # e(*args): execute command. returns String (e is for exec or eval) + # *args: command arguments + def e(*args) + return @ip._eval_args(to_s(), *args) + end +end + +# class TclTkLibCommand: tcl/tk commands in the library +class TclTkLibCommand < TclTkCommand + + # initialize(ip, name): + # ip: interpreter(TclTkInterpreter) + # name: command name (String) + def initialize(ip, name) + super(ip._tcltkip, name) + end +end + +# class TclTkVariable: tcl/tk variable +class TclTkVariable < TclTkObject + + # initialize(interp, dat): + # interp: interpreter(TclTkInterpreter) + # dat: the value to set(String) + # if nil, not initialize variable + def initialize(interp, dat) + # auto-generate tcl/tk representation (variable name) + exp = TclTk._newname("v_") + # initialize TclTkObject + super(interp._tcltkip(), exp) + # safe this for `set' command + @set = interp.commands()["set"] + # set value + set(dat) if dat + end + + # although you can set/refer variable by using set in tcl/tk, + # we provide the method for accessing variables + + # set(data): set tcl/tk variable using `set' + # data: new value + def set(data) + @set.e(to_s(), data.to_s()) + end + + # get(): read tcl/tk variable(String) using `set' + def get() + return @set.e(to_s()) + end +end + +# class TclTkWidget: tcl/tk widget +class TclTkWidget < TclTkCommand + + # initialize(*args): + # *args: parameters + def initialize(*args) + if args[0].kind_of?(TclTkIp) + # in case the 1st argument is TclTkIp: + + # Wrap tcl/tk widget by TclTkWidget + # (used in TclTkInterpreter#initialize()) + + # need two arguments + fail("invalid # of parameter") if args.size != 2 + + # ip: interpreter(TclTkIp) + # exp: tcl/tk representation + ip, exp = args + + # initialize TclTkObject + super(ip, exp) + elsif args[0].kind_of?(TclTkInterpreter) + # in case 1st parameter is TclTkInterpreter: + + # generate new widget from parent widget + + # interp: interpreter(TclTkInterpreter) + # parent: parent widget + # command: widget generating tk command(label Åù) + # *args: argument to the command + interp, parent, command, *args = args + + # generate widget name + exp = parent.to_s() + exp += "." if exp !~ /[.]$/ + exp += TclTk._newname("w_") + # initialize TclTkObject + super(interp._tcltkip(), exp) + # generate widget + res = @ip._eval_args(command, exp, *args) +# fail("can't create Widget") if res != exp + # for tk_optionMenu, it is legal res != exp + else + fail("first parameter is not TclTkInterpreter") + end + end +end + +# class TclTkCallback: tcl/tk callbacks +class TclTkCallback < TclTkObject + + # initialize(interp, pr, arg): + # interp: interpreter(TclTkInterpreter) + # pr: callback procedure(Proc) + # arg: string to pass as block parameters of pr + # bind command of tcl/tk uses % replacement for parameters + # pr can receive replaced data using block parameter + # its format is specified by arg string + # You should not specify arg for the command like + # scrollbar with -command option, which receives parameters + # without specifying any replacement + def initialize(interp, pr, arg = nil) + # auto-generate tcl/tk representation (variable name) + exp = TclTk._newname("c_") + # initialize TclTkObject + super(interp._tcltkip(), exp) + # save parameters + @pr = pr + @arg = arg + # register in the module + TclTk._addcallback(self) + end + + # to_eval(): retuens string representation for @ip._eval_args + def to_eval() + if @arg + # bind replaces %s before calling ruby_fmt, so %%s is used + s = %Q/{ruby_fmt {TclTk._callcallback("#{to_s()}", "%%s")} #{@arg}}/ + else + s = %Q/{ruby_fmt {TclTk._callcallback("#{to_s()}", "%s")}}/ + end + + return s + end + + # _call(arg): invoke callback + # arg: callback parameter + def _call(arg) + @pr.call(arg) + end +end + +# class TclTkImage: tcl/tk images +class TclTkImage < TclTkCommand + + # initialize(interp, t, *args): + # generating image is done by TclTkImage.new() + # destrying is done by image delete (inconsistent, sigh) + # interp: interpreter(TclTkInterpreter) + # t: image type (photo, bitmap, etc.) + # *args: command argument + def initialize(interp, t, *args) + # auto-generate tcl/tk representation + exp = TclTk._newname("i_") + # initialize TclTkObject + super(interp._tcltkip(), exp) + # generate image + res = @ip._eval_args("image create", t, exp, *args) + fail("can't create Image") if res != exp + end +end + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk.rb new file mode 100644 index 0000000..86aad28 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk.rb @@ -0,0 +1,5569 @@ +# +# tk.rb - Tk interface module using tcltklib +# by Yukihiro Matsumoto + +# use Shigehiro's tcltklib +require 'tcltklib' +require 'tkutil' + +# autoload +require 'tk/autoload' + +# for Mutex +require 'thread' + +class TclTkIp + # backup original (without encoding) _eval and _invoke + alias _eval_without_enc _eval + alias _invoke_without_enc _invoke + + def _ip_id_ + # for RemoteTkIp + '' + end + + alias __initialize__ initialize + private :__initialize__ + + def initialize(*args) + __initialize__(*args) + + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + end +end + +# define TkComm module (step 1: basic functions) +module TkComm + include TkUtil + extend TkUtil + + WidgetClassNames = {}.taint + TkExtlibAutoloadModule = [].taint + + # None = Object.new ### --> definition is moved to TkUtil module + # def None.to_s + # 'None' + # end + # None.freeze + + #Tk_CMDTBL = {} + #Tk_WINDOWS = {} + Tk_IDs = ["00000".taint, "00000".taint] # [0]-cmdid, [1]-winid + Tk_IDs.instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + # for backward compatibility + Tk_CMDTBL = Object.new + def Tk_CMDTBL.method_missing(id, *args) + TkCore::INTERP.tk_cmd_tbl.__send__(id, *args) + end + Tk_CMDTBL.freeze + Tk_WINDOWS = Object.new + def Tk_WINDOWS.method_missing(id, *args) + TkCore::INTERP.tk_windows.__send__(id, *args) + end + Tk_WINDOWS.freeze + + self.instance_eval{ + @cmdtbl = [].taint + } + + unless const_defined?(:GET_CONFIGINFO_AS_ARRAY) + # GET_CONFIGINFO_AS_ARRAY = false => returns a Hash { opt =>val, ... } + # true => returns an Array [[opt,val], ... ] + # val is a list which includes resource info. + GET_CONFIGINFO_AS_ARRAY = true + end + unless const_defined?(:GET_CONFIGINFOwoRES_AS_ARRAY) + # for configinfo without resource info; list of [opt, value] pair + # false => returns a Hash { opt=>val, ... } + # true => returns an Array [[opt,val], ... ] + GET_CONFIGINFOwoRES_AS_ARRAY = true + end + # *** ATTENTION *** + # 'current_configinfo' method always returns a Hash under all cases of above. + + def error_at + frames = caller() + frames.delete_if do |c| + c =~ %r!/tk(|core|thcore|canvas|text|entry|scrollbox)\.rb:\d+! + end + frames + end + private :error_at + + def _genobj_for_tkwidget(path) + return TkRoot.new if path == '.' + + begin + #tk_class = TkCore::INTERP._invoke('winfo', 'class', path) + tk_class = Tk.ip_invoke_without_enc('winfo', 'class', path) + rescue + return path + end + + if ruby_class = WidgetClassNames[tk_class] + ruby_class_name = ruby_class.name + # gen_class_name = ruby_class_name + 'GeneratedOnTk' + gen_class_name = ruby_class_name + classname_def = '' + else # ruby_class == nil + mods = TkExtlibAutoloadModule.find_all{|m| m.const_defined?(tk_class)} + mods.each{|mod| + begin + mod.const_get(tk_class) # auto_load + break if (ruby_class = WidgetClassNames[tk_class]) + rescue LoadError + # ignore load error + end + } + + unless ruby_class + std_class = 'Tk' << tk_class + if Object.const_defined?(std_class) + Object.const_get(std_class) # auto_load + ruby_class = WidgetClassNames[tk_class] + end + end + + if ruby_class + # found + ruby_class_name = ruby_class.name + gen_class_name = ruby_class_name + classname_def = '' + else + # unknown + ruby_class_name = 'TkWindow' + gen_class_name = 'TkWidget_' + tk_class + classname_def = "WidgetClassName = '#{tk_class}'.freeze" + end + end + +################################### +=begin + if ruby_class = WidgetClassNames[tk_class] + ruby_class_name = ruby_class.name + # gen_class_name = ruby_class_name + 'GeneratedOnTk' + gen_class_name = ruby_class_name + classname_def = '' + else + mod = TkExtlibAutoloadModule.find{|m| m.const_defined?(tk_class)} + if mod + ruby_class_name = mod.name + '::' + tk_class + gen_class_name = ruby_class_name + classname_def = '' + elsif Object.const_defined?('Tk' + tk_class) + ruby_class_name = 'Tk' + tk_class + # gen_class_name = ruby_class_name + 'GeneratedOnTk' + gen_class_name = ruby_class_name + classname_def = '' + else + ruby_class_name = 'TkWindow' + # gen_class_name = ruby_class_name + tk_class + 'GeneratedOnTk' + gen_class_name = 'TkWidget_' + tk_class + classname_def = "WidgetClassName = '#{tk_class}'.freeze" + end + end +=end + +=begin + unless Object.const_defined? gen_class_name + Object.class_eval "class #{gen_class_name}<#{ruby_class_name} + #{classname_def} + end" + end + Object.class_eval "#{gen_class_name}.new('widgetname'=>'#{path}', + 'without_creating'=>true)" +=end + base = Object + gen_class_name.split('::').each{|klass| + next if klass == '' + if base.const_defined?(klass) + base = base.class_eval klass + else + base = base.class_eval "class #{klass}<#{ruby_class_name} + #{classname_def} + end + #{klass}" + end + } + base.class_eval "#{gen_class_name}.new('widgetname'=>'#{path}', + 'without_creating'=>true)" + end + private :_genobj_for_tkwidget + module_function :_genobj_for_tkwidget + + def _at(x,y=nil) + if y + "@#{Integer(x)},#{Integer(y)}" + else + "@#{Integer(x)}" + end + end + module_function :_at + + def tk_tcl2ruby(val, enc_mode = false, listobj = true) +=begin + if val =~ /^rb_out\S* (c(_\d+_)?\d+)/ + #return Tk_CMDTBL[$1] + return TkCore::INTERP.tk_cmd_tbl[$1] + #cmd_obj = TkCore::INTERP.tk_cmd_tbl[$1] + #if cmd_obj.kind_of?(Proc) || cmd_obj.kind_of?(Method) + # cmd_obj + #else + # cmd_obj.cmd + #end + end +=end + if val =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + return TkCore::INTERP.tk_cmd_tbl[$4] + end + #if val.include? ?\s + # return val.split.collect{|v| tk_tcl2ruby(v)} + #end + case val + when /\A@font\S+\z/ + TkFont.get_obj(val) + when /\A-?\d+\z/ + val.to_i + when /\A\.\S*\z/ + #Tk_WINDOWS[val] ? Tk_WINDOWS[val] : _genobj_for_tkwidget(val) + TkCore::INTERP.tk_windows[val]? + TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val) + when /\Ai(_\d+_)?\d+\z/ + TkImage::Tk_IMGTBL.mutex.synchronize{ + TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val + } + when /\A-?\d+\.?\d*(e[-+]?\d+)?\z/ + val.to_f + when /\\ / + val.gsub(/\\ /, ' ') + when /[^\\] / + if listobj + #tk_split_escstr(val).collect{|elt| + # tk_tcl2ruby(elt, enc_mode, listobj) + #} + val = _toUTF8(val) unless enc_mode + tk_split_escstr(val, false, false).collect{|elt| + tk_tcl2ruby(elt, true, listobj) + } + elsif enc_mode + _fromUTF8(val) + else + val + end + else + if enc_mode + _fromUTF8(val) + else + val + end + end + end + + private :tk_tcl2ruby + module_function :tk_tcl2ruby + #private_class_method :tk_tcl2ruby + +unless const_defined?(:USE_TCLs_LIST_FUNCTIONS) + USE_TCLs_LIST_FUNCTIONS = true +end + +if USE_TCLs_LIST_FUNCTIONS + ########################################################################### + # use Tcl function version of split_list + ########################################################################### + + def tk_split_escstr(str, src_enc=true, dst_enc=true) + str = _toUTF8(str) if src_enc + if dst_enc + TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)} + else + TkCore::INTERP._split_tklist(str) + end + end + + def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true) + # return [] if str == "" + # list = TkCore::INTERP._split_tklist(str) + str = _toUTF8(str) if src_enc + + if depth == 0 + return "" if str == "" + list = [str] + else + return [] if str == "" + list = TkCore::INTERP._split_tklist(str) + end + if list.size == 1 + # tk_tcl2ruby(list[0], nil, false) + tk_tcl2ruby(list[0], dst_enc, false) + else + list.collect{|token| tk_split_sublist(token, depth - 1, false, dst_enc)} + end + end + + def tk_split_list(str, depth=0, src_enc=true, dst_enc=true) + return [] if str == "" + str = _toUTF8(str) if src_enc + TkCore::INTERP._split_tklist(str).map!{|token| + tk_split_sublist(token, depth - 1, false, dst_enc) + } + end + + def tk_split_simplelist(str, src_enc=true, dst_enc=true) + #lst = TkCore::INTERP._split_tklist(str) + #if (lst.size == 1 && lst =~ /^\{.*\}$/) + # TkCore::INTERP._split_tklist(str[1..-2]) + #else + # lst + #end + + str = _toUTF8(str) if src_enc + if dst_enc + TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)} + else + TkCore::INTERP._split_tklist(str) + end + end + + def array2tk_list(ary, enc=nil) + return "" if ary.size == 0 + + sys_enc = TkCore::INTERP.encoding + sys_enc = TclTkLib.encoding_system unless sys_enc + + dst_enc = (enc == nil)? sys_enc: enc + + dst = ary.collect{|e| + if e.kind_of? Array + s = array2tk_list(e, enc) + elsif e.kind_of? Hash + tmp_ary = [] + #e.each{|k,v| tmp_ary << k << v } + e.each{|k,v| tmp_ary << "-#{_get_eval_string(k)}" << v } + s = array2tk_list(tmp_ary, enc) + else + s = _get_eval_string(e, enc) + end + + if dst_enc != true && dst_enc != false + if (s_enc = s.instance_variable_get(:@encoding)) + s_enc = s_enc.to_s + elsif TkCore::WITH_ENCODING + s_enc = s.encoding.name + else + s_enc = sys_enc + end + dst_enc = true if s_enc != dst_enc + end + + s + } + + if sys_enc && dst_enc + dst.map!{|s| _toUTF8(s)} + ret = TkCore::INTERP._merge_tklist(*dst) + if TkCore::WITH_ENCODING + if dst_enc.kind_of?(String) + ret = _fromUTF8(ret, dst_enc) + ret.force_encoding(dst_enc) + else + ret.force_encoding('utf-8') + end + else # without encoding + if dst_enc.kind_of?(String) + ret = _fromUTF8(ret, dst_enc) + ret.instance_variable_set(:@encoding, dst_enc) + else + ret.instance_variable_set(:@encoding, 'utf-8') + end + end + ret + else + TkCore::INTERP._merge_tklist(*dst) + end + end + +else + ########################################################################### + # use Ruby script version of split_list (traditional methods) + ########################################################################### + + def tk_split_escstr(str, src_enc=true, dst_enc=true) + return [] if str == "" + list = [] + token = nil + escape = false + brace = 0 + str.split('').each {|c| + brace += 1 if c == '{' && !escape + brace -= 1 if c == '}' && !escape + if brace == 0 && c == ' ' && !escape + list << token.gsub(/^\{(.*)\}$/, '\1') if token + token = nil + else + token = (token || "") << c + end + escape = (c == '\\' && !escape) + } + list << token.gsub(/^\{(.*)\}$/, '\1') if token + list + end + + def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true) + #return [] if str == "" + #return [tk_split_sublist(str[1..-2])] if str =~ /^\{.*\}$/ + #list = tk_split_escstr(str) + if depth == 0 + return "" if str == "" + str = str[1..-2] if str =~ /^\{.*\}$/ + list = [str] + else + return [] if str == [] + return [tk_split_sublist(str[1..-2], depth - 1)] if str =~ /^\{.*\}$/ + list = tk_split_escstr(str) + end + if list.size == 1 + tk_tcl2ruby(list[0], nil, false) + else + list.collect{|token| tk_split_sublist(token, depth - 1)} + end + end + + def tk_split_list(str, depth=0, src_enc=true, dst_enc=true) + return [] if str == "" + tk_split_escstr(str).collect{|token| + tk_split_sublist(token, depth - 1) + } + end + + def tk_split_simplelist(str, src_enc=true, dst_enc=true) + return [] if str == "" + list = [] + token = nil + escape = false + brace = 0 + str.split('').each {|c| + if c == '\\' && !escape + escape = true + token = (token || "") << c if brace > 0 + next + end + brace += 1 if c == '{' && !escape + brace -= 1 if c == '}' && !escape + if brace == 0 && c == ' ' && !escape + list << token.gsub(/^\{(.*)\}$/, '\1') if token + token = nil + else + token = (token || "") << c + end + escape = false + } + list << token.gsub(/^\{(.*)\}$/, '\1') if token + list + end + + def array2tk_list(ary, enc=nil) + ary.collect{|e| + if e.kind_of? Array + "{#{array2tk_list(e, enc)}}" + elsif e.kind_of? Hash + # "{#{e.to_a.collect{|ee| array2tk_list(ee)}.join(' ')}}" + e.each{|k,v| tmp_ary << "-#{_get_eval_string(k)}" << v } + array2tk_list(tmp_ary, enc) + else + s = _get_eval_string(e, enc) + (s.index(/\s/) || s.size == 0)? "{#{s}}": s + end + }.join(" ") + end +end + + private :tk_split_escstr, :tk_split_sublist + private :tk_split_list, :tk_split_simplelist + private :array2tk_list + + module_function :tk_split_escstr, :tk_split_sublist + module_function :tk_split_list, :tk_split_simplelist + module_function :array2tk_list + + private_class_method :tk_split_escstr, :tk_split_sublist + private_class_method :tk_split_list, :tk_split_simplelist +# private_class_method :array2tk_list + +=begin + ### --> definition is moved to TkUtil module + def _symbolkey2str(keys) + h = {} + keys.each{|key,value| h[key.to_s] = value} + h + end + private :_symbolkey2str + module_function :_symbolkey2str +=end + +=begin + ### --> definition is moved to TkUtil module + # def hash_kv(keys, enc_mode = nil, conf = [], flat = false) + def hash_kv(keys, enc_mode = nil, conf = nil) + # Hash {key=>val, key=>val, ... } or Array [ [key, val], [key, val], ... ] + # ==> Array ['-key', val, '-key', val, ... ] + dst = [] + if keys and keys != None + keys.each{|k, v| + #dst.push("-#{k}") + dst.push('-' + k.to_s) + if v != None + # v = _get_eval_string(v, enc_mode) if (enc_mode || flat) + v = _get_eval_string(v, enc_mode) if enc_mode + dst.push(v) + end + } + end + if conf + conf + dst + else + dst + end + end + private :hash_kv + module_function :hash_kv +=end + +=begin + ### --> definition is moved to TkUtil module + def bool(val) + case val + when "1", 1, 'yes', 'true' + true + else + false + end + end + + def number(val) + case val + when /^-?\d+$/ + val.to_i + when /^-?\d+\.?\d*(e[-+]?\d+)?$/ + val.to_f + else + fail(ArgumentError, "invalid value for Number:'#{val}'") + end + end + def string(val) + if val == "{}" + '' + elsif val[0] == ?{ && val[-1] == ?} + val[1..-2] + else + val + end + end + def num_or_str(val) + begin + number(val) + rescue ArgumentError + string(val) + end + end +=end + + def list(val, depth=0, enc=true) + tk_split_list(val, depth, enc, enc) + end + def simplelist(val, src_enc=true, dst_enc=true) + tk_split_simplelist(val, src_enc, dst_enc) + end + def window(val) + if val =~ /^\./ + #Tk_WINDOWS[val]? Tk_WINDOWS[val] : _genobj_for_tkwidget(val) + TkCore::INTERP.tk_windows[val]? + TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val) + else + nil + end + end + def image_obj(val) + if val =~ /^i(_\d+_)?\d+$/ + TkImage::Tk_IMGTBL.mutex.synchronize{ + TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val + } + else + val + end + end + def procedure(val) +=begin + if val =~ /^rb_out\S* (c(_\d+_)?\d+)/ + #Tk_CMDTBL[$1] + #TkCore::INTERP.tk_cmd_tbl[$1] + TkCore::INTERP.tk_cmd_tbl[$1].cmd +=end + if val =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + return TkCore::INTERP.tk_cmd_tbl[$4].cmd + else + #nil + val + end + end + private :bool, :number, :string, :num_or_str + private :list, :simplelist, :window, :procedure + module_function :bool, :number, :num_or_str, :string + module_function :list, :simplelist, :window, :image_obj, :procedure + + def subst(str, *opts) + # opts := :nobackslashes | :nocommands | novariables + tk_call('subst', + *(opts.collect{|opt| + opt = opt.to_s + (opt[0] == ?-)? opt: '-' << opt + } << str)) + end + + def _toUTF8(str, encoding = nil) + TkCore::INTERP._toUTF8(str, encoding) + end + def _fromUTF8(str, encoding = nil) + TkCore::INTERP._fromUTF8(str, encoding) + end + private :_toUTF8, :_fromUTF8 + module_function :_toUTF8, :_fromUTF8 + + def _callback_entry_class?(cls) + cls <= Proc || cls <= Method || cls <= TkCallbackEntry + end + private :_callback_entry_class? + module_function :_callback_entry_class? + + def _callback_entry?(obj) + obj.kind_of?(Proc) || obj.kind_of?(Method) || obj.kind_of?(TkCallbackEntry) + end + private :_callback_entry? + module_function :_callback_entry? + +=begin + ### --> definition is moved to TkUtil module + def _get_eval_string(str, enc_mode = nil) + return nil if str == None + if str.kind_of?(TkObject) + str = str.path + elsif str.kind_of?(String) + str = _toUTF8(str) if enc_mode + elsif str.kind_of?(Symbol) + str = str.id2name + str = _toUTF8(str) if enc_mode + elsif str.kind_of?(Hash) + str = hash_kv(str, enc_mode).join(" ") + elsif str.kind_of?(Array) + str = array2tk_list(str) + str = _toUTF8(str) if enc_mode + elsif str.kind_of?(Proc) + str = install_cmd(str) + elsif str == nil + str = "" + elsif str == false + str = "0" + elsif str == true + str = "1" + elsif (str.respond_to?(:to_eval)) + str = str.to_eval() + str = _toUTF8(str) if enc_mode + else + str = str.to_s() || '' + unless str.kind_of? String + fail RuntimeError, "fail to convert the object to a string" + end + str = _toUTF8(str) if enc_mode + end + return str + end +=end +=begin + def _get_eval_string(obj, enc_mode = nil) + case obj + when Numeric + obj.to_s + when String + (enc_mode)? _toUTF8(obj): obj + when Symbol + (enc_mode)? _toUTF8(obj.id2name): obj.id2name + when TkObject + obj.path + when Hash + hash_kv(obj, enc_mode).join(' ') + when Array + (enc_mode)? _toUTF8(array2tk_list(obj)): array2tk_list(obj) + when Proc, Method, TkCallbackEntry + install_cmd(obj) + when false + '0' + when true + '1' + when nil + '' + when None + nil + else + if (obj.respond_to?(:to_eval)) + (enc_mode)? _toUTF8(obj.to_eval): obj.to_eval + else + begin + obj = obj.to_s || '' + rescue + fail RuntimeError, "fail to convert object '#{obj}' to string" + end + (enc_mode)? _toUTF8(obj): obj + end + end + end + private :_get_eval_string + module_function :_get_eval_string +=end + +=begin + ### --> definition is moved to TkUtil module + def _get_eval_enc_str(obj) + return obj if obj == None + _get_eval_string(obj, true) + end + private :_get_eval_enc_str + module_function :_get_eval_enc_str +=end + +=begin + ### --> obsolete + def ruby2tcl(v, enc_mode = nil) + if v.kind_of?(Hash) + v = hash_kv(v) + v.flatten! + v.collect{|e|ruby2tcl(e, enc_mode)} + else + _get_eval_string(v, enc_mode) + end + end + private :ruby2tcl +=end + +=begin + ### --> definition is moved to TkUtil module + def _conv_args(args, enc_mode, *src_args) + conv_args = [] + src_args.each{|arg| + conv_args << _get_eval_string(arg, enc_mode) unless arg == None + # if arg.kind_of?(Hash) + # arg.each{|k, v| + # args << '-' + k.to_s + # args << _get_eval_string(v, enc_mode) + # } + # elsif arg != None + # args << _get_eval_string(arg, enc_mode) + # end + } + args + conv_args + end + private :_conv_args +=end + + def _curr_cmd_id + #id = format("c%.4d", Tk_IDs[0]) + id = "c" + TkCore::INTERP._ip_id_ + TkComm::Tk_IDs[0] + end + def _next_cmd_id + TkComm::Tk_IDs.mutex.synchronize{ + id = _curr_cmd_id + #Tk_IDs[0] += 1 + TkComm::Tk_IDs[0].succ! + id + } + end + private :_curr_cmd_id, :_next_cmd_id + module_function :_curr_cmd_id, :_next_cmd_id + + def TkComm.install_cmd(cmd, local_cmdtbl=nil) + return '' if cmd == '' + begin + ns = TkCore::INTERP._invoke_without_enc('namespace', 'current') + ns = nil if ns == '::' # for backward compatibility + rescue + # probably, Tcl7.6 + ns = nil + end + id = _next_cmd_id + #Tk_CMDTBL[id] = cmd + if cmd.kind_of?(TkCallbackEntry) + TkCore::INTERP.tk_cmd_tbl[id] = cmd + else + TkCore::INTERP.tk_cmd_tbl[id] = TkCore::INTERP.get_cb_entry(cmd) + end + @cmdtbl = [] unless defined? @cmdtbl + @cmdtbl.taint unless @cmdtbl.tainted? + @cmdtbl.push id + + if local_cmdtbl && local_cmdtbl.kind_of?(Array) + begin + local_cmdtbl << id + rescue Exception + # ignore + end + end + + #return Kernel.format("rb_out %s", id); + if ns + 'rb_out' << TkCore::INTERP._ip_id_ << ' ' << ns << ' ' << id + else + 'rb_out' << TkCore::INTERP._ip_id_ << ' ' << id + end + end + def TkComm.uninstall_cmd(id, local_cmdtbl=nil) + #id = $1 if /rb_out\S* (c(_\d+_)?\d+)/ =~ id + id = $4 if id =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + + if local_cmdtbl && local_cmdtbl.kind_of?(Array) + begin + local_cmdtbl.delete(id) + rescue Exception + # ignore + end + end + @cmdtbl.delete(id) + + #Tk_CMDTBL.delete(id) + TkCore::INTERP.tk_cmd_tbl.delete(id) + end + # private :install_cmd, :uninstall_cmd + # module_function :install_cmd, :uninstall_cmd + def install_cmd(cmd) + TkComm.install_cmd(cmd, @cmdtbl) + end + def uninstall_cmd(id) + TkComm.uninstall_cmd(id, @cmdtbl) + end + +=begin + def install_win(ppath,name=nil) + if !name or name == '' + #name = format("w%.4d", Tk_IDs[1]) + #Tk_IDs[1] += 1 + name = "w" + Tk_IDs[1] + Tk_IDs[1].succ! + end + if name[0] == ?. + @path = name.dup + elsif !ppath or ppath == "." + @path = Kernel.format(".%s", name); + else + @path = Kernel.format("%s.%s", ppath, name) + end + #Tk_WINDOWS[@path] = self + TkCore::INTERP.tk_windows[@path] = self + end +=end + def install_win(ppath,name=nil) + if name + if name == '' + raise ArgumentError, "invalid wiget-name '#{name}'" + end + if name[0] == ?. + @path = '' + name + @path.freeze + return TkCore::INTERP.tk_windows[@path] = self + end + else + Tk_IDs.mutex.synchronize{ + name = "w" + TkCore::INTERP._ip_id_ + Tk_IDs[1] + Tk_IDs[1].succ! + } + end + if !ppath or ppath == '.' + @path = '.' + name + else + @path = ppath + '.' + name + end + @path.freeze + TkCore::INTERP.tk_windows[@path] = self + end + + def uninstall_win() + #Tk_WINDOWS.delete(@path) + TkCore::INTERP.tk_windows.delete(@path) + end + private :install_win, :uninstall_win + + def _epath(win) + if win.kind_of?(TkObject) + win.epath + elsif win.respond_to?(:epath) + win.epath + else + win + end + end + private :_epath +end + +# define TkComm module (step 2: event binding) +module TkComm + include TkEvent + extend TkEvent + + def tk_event_sequence(context) + if context.kind_of? TkVirtualEvent + context = context.path + end + if context.kind_of? Array + context = context.collect{|ev| + if ev.kind_of? TkVirtualEvent + ev.path + else + ev + end + }.join("><") + end + if /,/ =~ context + context = context.split(/\s*,\s*/).join("><") + else + context + end + end + + def _bind_core(mode, what, context, cmd, *args) + id = install_bind(cmd, *args) if cmd + begin + tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>", + mode + id])) + rescue + uninstall_cmd(id) if cmd + fail + end + end + + def _bind(what, context, cmd, *args) + _bind_core('', what, context, cmd, *args) + end + + def _bind_append(what, context, cmd, *args) + _bind_core('+', what, context, cmd, *args) + end + + def _bind_remove(what, context) + tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>", ''])) + end + + def _bindinfo(what, context=nil) + if context + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + enum_obj = tk_call_without_enc(*what+["<#{tk_event_sequence(context)}>"]).each_line + else + enum_obj = tk_call_without_enc(*what+["<#{tk_event_sequence(context)}>"]) + end + enum_obj.collect {|cmdline| +=begin + if cmdline =~ /^rb_out\S* (c(?:_\d+_)?\d+)\s+(.*)$/ + #[Tk_CMDTBL[$1], $2] + [TkCore::INTERP.tk_cmd_tbl[$1], $2] +=end + if cmdline =~ /rb_out\S*(?:\s+(::\S*|[{](::.*)[}]|["](::.*)["]))? (c(_\d+_)?(\d+))/ + [TkCore::INTERP.tk_cmd_tbl[$4], $5] + else + cmdline + end + } + else + tk_split_simplelist(tk_call_without_enc(*what)).collect!{|seq| + l = seq.scan(/<*[^<>]+>*/).collect!{|subseq| + case (subseq) + when /^<<[^<>]+>>$/ + TkVirtualEvent.getobj(subseq[1..-2]) + when /^<[^<>]+>$/ + subseq[1..-2] + else + subseq.split('') + end + }.flatten + (l.size == 1) ? l[0] : l + } + end + end + + def _bind_core_for_event_class(klass, mode, what, context, cmd, *args) + id = install_bind_for_event_class(klass, cmd, *args) if cmd + begin + tk_call_without_enc(*(what + ["<#{tk_event_sequence(context)}>", + mode + id])) + rescue + uninstall_cmd(id) if cmd + fail + end + end + + def _bind_for_event_class(klass, what, context, cmd, *args) + _bind_core_for_event_class(klass, '', what, context, cmd, *args) + end + + def _bind_append_for_event_class(klass, what, context, cmd, *args) + _bind_core_for_event_class(klass, '+', what, context, cmd, *args) + end + + def _bind_remove_for_event_class(klass, what, context) + _bind_remove(what, context) + end + + def _bindinfo_for_event_class(klass, what, context=nil) + _bindinfo(what, context) + end + + private :tk_event_sequence + private :_bind_core, :_bind, :_bind_append, :_bind_remove, :_bindinfo + private :_bind_core_for_event_class, :_bind_for_event_class, + :_bind_append_for_event_class, :_bind_remove_for_event_class, + :_bindinfo_for_event_class + + #def bind(tagOrClass, context, cmd=Proc.new, *args) + # _bind(["bind", tagOrClass], context, cmd, *args) + # tagOrClass + #end + def bind(tagOrClass, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind(["bind", tagOrClass], context, cmd, *args) + tagOrClass + end + + #def bind_append(tagOrClass, context, cmd=Proc.new, *args) + # _bind_append(["bind", tagOrClass], context, cmd, *args) + # tagOrClass + #end + def bind_append(tagOrClass, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append(["bind", tagOrClass], context, cmd, *args) + tagOrClass + end + + def bind_remove(tagOrClass, context) + _bind_remove(['bind', tagOrClass], context) + tagOrClass + end + + def bindinfo(tagOrClass, context=nil) + _bindinfo(['bind', tagOrClass], context) + end + + #def bind_all(context, cmd=Proc.new, *args) + # _bind(['bind', 'all'], context, cmd, *args) + # TkBindTag::ALL + #end + def bind_all(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind(['bind', 'all'], context, cmd, *args) + TkBindTag::ALL + end + + #def bind_append_all(context, cmd=Proc.new, *args) + # _bind_append(['bind', 'all'], context, cmd, *args) + # TkBindTag::ALL + #end + def bind_append_all(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append(['bind', 'all'], context, cmd, *args) + TkBindTag::ALL + end + + def bind_remove_all(context) + _bind_remove(['bind', 'all'], context) + TkBindTag::ALL + end + + def bindinfo_all(context=nil) + _bindinfo(['bind', 'all'], context) + end +end + + +module TkCore + include TkComm + extend TkComm + + WITH_RUBY_VM = Object.const_defined?(:RubyVM) && ::RubyVM.class == Class + WITH_ENCODING = defined?(::Encoding.default_external) && true + #WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class + + unless self.const_defined? :INTERP + if self.const_defined? :IP_NAME + name = IP_NAME.to_s + else + #name = nil + name = $0 + end + if self.const_defined? :IP_OPTS + if IP_OPTS.kind_of?(Hash) + opts = hash_kv(IP_OPTS).join(' ') + else + opts = IP_OPTS.to_s + end + else + opts = '' + end + + if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!! + # *** NEED TO FIX *** + ip = TclTkIp.new(name, opts) + if ip._invoke_without_enc('tk', 'windowingsystem') == 'aqua' && + (TclTkLib.get_version <=> [8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0 + # *** KNOWN BUG *** + # Main event loop thread of TkAqua (> Tk8.4.9) must be the main + # application thread. So, ruby1.9 users must call Tk.mainloop on + # the main application thread. + RUN_EVENTLOOP_ON_MAIN_THREAD = true + INTERP = ip + else + unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD + RUN_EVENTLOOP_ON_MAIN_THREAD = false + end + if RUN_EVENTLOOP_ON_MAIN_THREAD + INTERP = ip + else + ip.delete + end + end + ip = nil + else + unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD + RUN_EVENTLOOP_ON_MAIN_THREAD = false + end + end + + if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!! + INTERP = TclTkIp.new(name, opts) unless self.const_defined? :INTERP + else + INTERP_MUTEX = Mutex.new + INTERP_ROOT_CHECK = ConditionVariable.new + INTERP_THREAD = Thread.new{ + begin + Thread.current[:interp] = interp = TclTkIp.new(name, opts) + rescue => e + Thread.current[:interp] = e + raise e + end + + status = [nil] + def status.value + self[0] + end + def status.value=(val) + self[0] = val + end + + Thread.current[:status] = status + #sleep + + begin + Thread.current[:status].value = TclTkLib.mainloop(true) + rescue Exception=>e + Thread.current[:status].value = e + ensure + INTERP_MUTEX.synchronize{ INTERP_ROOT_CHECK.broadcast } + end + Thread.current[:status].value = TclTkLib.mainloop(false) + } + + until INTERP_THREAD[:interp] + Thread.pass + end + # INTERP_THREAD.run + raise INTERP_THREAD[:interp] if INTERP_THREAD[:interp].kind_of? Exception + + INTERP = INTERP_THREAD[:interp] + INTERP_THREAD_STATUS = INTERP_THREAD[:status] + end + + def INTERP.__getip + self + end + def INTERP.default_master? + true + end + + INTERP.instance_eval{ + # @tk_cmd_tbl = {}.taint + @tk_cmd_tbl = Hash.new{|hash, key| + fail IndexError, "unknown command ID '#{key}'" + }.taint + def @tk_cmd_tbl.[]=(idx,val) + if self.has_key?(idx) && Thread.current.group != ThreadGroup::Default + fail SecurityError,"cannot change the entried command" + end + super(idx,val) + end + + @tk_windows = {}.taint + + @tk_table_list = [].taint + + @init_ip_env = [].taint # table of Procs + @add_tk_procs = [].taint # table of [name, args, body] + + @force_default_encoding ||= [false].taint + @encoding ||= [nil].taint + def @encoding.to_s; self.join(nil); end + + @cb_entry_class = Class.new(TkCallbackEntry){ + class << self + def inspect + sprintf("#", self.__id__) + end + alias to_s inspect + end + + def initialize(ip, cmd) + @ip = ip + @cmd = cmd + end + attr_reader :ip, :cmd + def call(*args) + @ip.cb_eval(@cmd, *args) + end + def inspect + sprintf("#", self.__id__) + end + alias to_s inspect + }.freeze + } + + def INTERP.cb_entry_class + @cb_entry_class + end + def INTERP.tk_cmd_tbl + @tk_cmd_tbl + end + def INTERP.tk_windows + @tk_windows + end + + class Tk_OBJECT_TABLE + def initialize(id) + @id = id + @mutex = Mutex.new + end + def mutex + @mutex + end + def method_missing(m, *args, &b) + TkCore::INTERP.tk_object_table(@id).__send__(m, *args, &b) + end + end + + def INTERP.tk_object_table(id) + @tk_table_list[id] + end + def INTERP.create_table + id = @tk_table_list.size + (tbl = {}).tainted? || tbl.taint + @tk_table_list << tbl +# obj = Object.new +# obj.instance_eval <<-EOD +# def self.method_missing(m, *args) +# TkCore::INTERP.tk_object_table(#{id}).send(m, *args) +# end +# EOD +# return obj + Tk_OBJECT_TABLE.new(id) + end + + def INTERP.get_cb_entry(cmd) + @cb_entry_class.new(__getip, cmd).freeze + end + def INTERP.cb_eval(cmd, *args) + TkUtil._get_eval_string(TkUtil.eval_cmd(cmd, *args)) + end + + def INTERP.init_ip_env(script = Proc.new) + @init_ip_env << script + script.call(self) + end + def INTERP.add_tk_procs(name, args = nil, body = nil) + if name.kind_of?(Array) + name.each{|param| self.add_tk_procs(*param)} + else + name = name.to_s + @add_tk_procs << [name, args, body] + self._invoke('proc', name, args, body) if args && body + end + end + def INTERP.remove_tk_procs(*names) + names.each{|name| + name = name.to_s + @add_tk_procs.delete_if{|elem| + elem.kind_of?(Array) && elem[0].to_s == name + } + self._invoke('rename', name, '') + } + end + def INTERP.init_ip_internal + ip = self + @init_ip_env.each{|script| script.call(ip)} + @add_tk_procs.each{|name,args,body| ip._invoke('proc',name,args,body)} + end + end + + unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD + ### Ruby 1.9 !!!!!!!!!!!!!!!!!!!!!!!!!! + RUN_EVENTLOOP_ON_MAIN_THREAD = false + end + + WIDGET_DESTROY_HOOK = '' + INTERP._invoke_without_enc('event', 'add', + "<#{WIDGET_DESTROY_HOOK}>", '') + INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>", + install_cmd(proc{|path| + unless TkCore::INTERP.deleted? + begin + if (widget=TkCore::INTERP.tk_windows[path]) + if widget.respond_to?(:__destroy_hook__) + widget.__destroy_hook__ + end + end + rescue Exception=>e + p e if $DEBUG + end + end + }) << ' %W') + + INTERP.add_tk_procs(TclTkLib::FINALIZE_PROC_NAME, '', + "catch { bind all <#{WIDGET_DESTROY_HOOK}> {} }") + + INTERP.add_tk_procs('rb_out', 'ns args', <<-'EOL') + if [regexp {^::} $ns] { + set cmd {namespace eval $ns {ruby_cmd TkCore callback} $args} + } else { + set cmd {eval {ruby_cmd TkCore callback} $ns $args} + } + if {[set st [catch $cmd ret]] != 0} { + #return -code $st $ret + set idx [string first "\n\n" $ret] + if {$idx > 0} { + return -code $st \ + -errorinfo [string range $ret [expr $idx + 2] \ + [string length $ret]] \ + [string range $ret 0 [expr $idx - 1]] + } else { + return -code $st $ret + } + } else { + return $ret + } + EOL +=begin + INTERP.add_tk_procs('rb_out', 'args', <<-'EOL') + if {[set st [catch {eval {ruby_cmd TkCore callback} $args} ret]] != 0} { + #return -code $st $ret + set idx [string first "\n\n" $ret] + if {$idx > 0} { + return -code $st \ + -errorinfo [string range $ret [expr $idx + 2] \ + [string length $ret]] \ + [string range $ret 0 [expr $idx - 1]] + } else { + return -code $st $ret + } + } else { + return $ret + } + EOL +=end +=begin + INTERP.add_tk_procs('rb_out', 'args', <<-'EOL') + #regsub -all {\\} $args {\\\\} args + #regsub -all {!} $args {\\!} args + #regsub -all "{" $args "\\{" args + regsub -all {(\\|!|\{|\})} $args {\\\1} args + if {[set st [catch {ruby [format "TkCore.callback %%Q!%s!" $args]} ret]] != 0} { + #return -code $st $ret + set idx [string first "\n\n" $ret] + if {$idx > 0} { + return -code $st \ + -errorinfo [string range $ret [expr $idx + 2] \ + [string length $ret]] \ + [string range $ret 0 [expr $idx - 1]] + } else { + return -code $st $ret + } + } else { + return $ret + } + EOL +=end + + at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) } + + EventFlag = TclTkLib::EventFlag + + def callback_break + fail TkCallbackBreak, "Tk callback returns 'break' status" + end + + def callback_continue + fail TkCallbackContinue, "Tk callback returns 'continue' status" + end + + def callback_return + fail TkCallbackReturn, "Tk callback returns 'return' status" + end + + def TkCore.callback(*arg) + begin + if TkCore::INTERP.tk_cmd_tbl.kind_of?(Hash) + #TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg) + normal_ret = false + ret = catch(:IRB_EXIT) do # IRB hack + retval = TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg) + normal_ret = true + retval + end + unless normal_ret + # catch IRB_EXIT + exit(ret) + end + ret + end + rescue SystemExit=>e + exit(e.status) + rescue Interrupt=>e + fail(e) + rescue Exception => e + begin + msg = _toUTF8(e.class.inspect) + ': ' + + _toUTF8(e.message) + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + _toUTF8(e.backtrace.join("\n")) + + "\n---< backtrace of Tk side >-------" + if TkCore::WITH_ENCODING + msg.force_encoding('utf-8') + else + msg.instance_variable_set(:@encoding, 'utf-8') + end + rescue Exception + msg = e.class.inspect + ': ' + e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------" + end + # TkCore::INTERP._set_global_var('errorInfo', msg) + # fail(e) + fail(e, msg) + end + end +=begin + def TkCore.callback(arg_str) + # arg = tk_split_list(arg_str) + arg = tk_split_simplelist(arg_str) + #_get_eval_string(TkUtil.eval_cmd(Tk_CMDTBL[arg.shift], *arg)) + #_get_eval_string(TkUtil.eval_cmd(TkCore::INTERP.tk_cmd_tbl[arg.shift], + # *arg)) + # TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg) + begin + TkCore::INTERP.tk_cmd_tbl[arg.shift].call(*arg) + rescue Exception => e + raise(e, e.class.inspect + ': ' + e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------") + end +#=begin +# cb_obj = TkCore::INTERP.tk_cmd_tbl[arg.shift] +# unless $DEBUG +# cb_obj.call(*arg) +# else +# begin +# raise 'check backtrace' +# rescue +# # ignore backtrace before 'callback' +# pos = -($!.backtrace.size) +# end +# begin +# cb_obj.call(*arg) +# rescue +# trace = $!.backtrace +# raise $!, "\n#{trace[0]}: #{$!.message} (#{$!.class})\n" + +# "\tfrom #{trace[1..pos].join("\n\tfrom ")}" +# end +# end +#=end + end +=end + + def load_cmd_on_ip(tk_cmd) + bool(tk_call('auto_load', tk_cmd)) + end + + def after(ms, cmd=Proc.new) + cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret}) + after_id = tk_call_without_enc("after",ms,cmdid) + after_id.instance_variable_set('@cmdid', cmdid) + after_id + end +=begin + def after(ms, cmd=Proc.new) + crit_bup = Thread.critical + Thread.critical = true + + myid = _curr_cmd_id + cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret}) + + Thread.critical = crit_bup + + tk_call_without_enc("after",ms,cmdid) # return id +# return +# if false #defined? Thread +# Thread.start do +# ms = Float(ms)/1000 +# ms = 10 if ms == 0 +# sleep ms/1000 +# cmd.call +# end +# else +# cmdid = install_cmd(cmd) +# tk_call("after",ms,cmdid) +# end + end +=end + + def after_idle(cmd=Proc.new) + cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(cmdid); ret}) + after_id = tk_call_without_enc('after','idle',cmdid) + after_id.instance_variable_set('@cmdid', cmdid) + after_id + end +=begin + def after_idle(cmd=Proc.new) + crit_bup = Thread.critical + Thread.critical = true + + myid = _curr_cmd_id + cmdid = install_cmd(proc{ret = cmd.call;uninstall_cmd(myid); ret}) + + Thread.critical = crit_bup + + tk_call_without_enc('after','idle',cmdid) + end +=end + + def after_cancel(afterId) + tk_call_without_enc('after','cancel',afterId) + if (cmdid = afterId.instance_variable_get('@cmdid')) + afterId.instance_variable_set('@cmdid', nil) + uninstall_cmd(cmdid) + end + afterId + end + + def windowingsystem + tk_call_without_enc('tk', 'windowingsystem') + end + + def scaling(scale=nil) + if scale + tk_call_without_enc('tk', 'scaling', scale) + else + Float(number(tk_call_without_enc('tk', 'scaling'))) + end + end + def scaling_displayof(win, scale=nil) + if scale + tk_call_without_enc('tk', 'scaling', '-displayof', win, scale) + else + Float(number(tk_call_without_enc('tk', '-displayof', win, 'scaling'))) + end + end + + def inactive + Integer(tk_call_without_enc('tk', 'inactive')) + end + def inactive_displayof(win) + Integer(tk_call_without_enc('tk', 'inactive', '-displayof', win)) + end + def reset_inactive + tk_call_without_enc('tk', 'inactive', 'reset') + end + def reset_inactive_displayof(win) + tk_call_without_enc('tk', 'inactive', '-displayof', win, 'reset') + end + + def appname(name=None) + tk_call('tk', 'appname', name) + end + + def appsend_deny + tk_call('rename', 'send', '') + end + + def appsend(interp, async, *args) + if $SAFE >= 4 + fail SecurityError, "cannot send Tk commands at level 4" + elsif $SAFE >= 1 && args.find{|obj| obj.tainted?} + fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}" + end + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + if async + tk_call('send', '-async', '--', interp, *args) + else + tk_call('send', '--', interp, *args) + end + end + + def rb_appsend(interp, async, *args) + if $SAFE >= 4 + fail SecurityError, "cannot send Ruby commands at level 4" + elsif $SAFE >= 1 && args.find{|obj| obj.tainted?} + fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}" + end + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')} + args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')} + # args.push(').to_s"') + # appsend(interp, async, 'ruby "(', *args) + args.push('}.call)"') + appsend(interp, async, 'ruby "TkComm._get_eval_string(proc{', *args) + end + + def appsend_displayof(interp, win, async, *args) + if $SAFE >= 4 + fail SecurityError, "cannot send Tk commands at level 4" + elsif $SAFE >= 1 && args.find{|obj| obj.tainted?} + fail SecurityError, "cannot send tainted Tk commands at level #{$SAFE}" + end + win = '.' if win == nil + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + if async + tk_call('send', '-async', '-displayof', win, '--', interp, *args) + else + tk_call('send', '-displayor', win, '--', interp, *args) + end + end + + def rb_appsend_displayof(interp, win, async, *args) + if $SAFE >= 4 + fail SecurityError, "cannot send Ruby commands at level 4" + elsif $SAFE >= 1 && args.find{|obj| obj.tainted?} + fail SecurityError, "cannot send tainted Ruby commands at level #{$SAFE}" + end + win = '.' if win == nil + if async != true && async != false && async != nil + args.unshift(async) + async = false + end + #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')} + args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')} + # args.push(').to_s"') + # appsend_displayof(interp, win, async, 'ruby "(', *args) + args.push('}.call)"') + appsend(interp, win, async, 'ruby "TkComm._get_eval_string(proc{', *args) + end + + def info(*args) + tk_call('info', *args) + end + + def mainloop(check_root = true) + if !TkCore::WITH_RUBY_VM + TclTkLib.mainloop(check_root) + + elsif TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD + # if TclTkLib::WINDOWING_SYSTEM == 'aqua' && + if TkCore::INTERP._invoke_without_enc('tk','windowingsystem')=='aqua' && + Thread.current != Thread.main && + (TclTkLib.get_version <=> [8,4,TclTkLib::RELEASE_TYPE::FINAL,9]) > 0 + raise RuntimeError, + "eventloop on TkAqua ( > Tk8.4.9 ) works on the main thread only" + end + TclTkLib.mainloop(check_root) + + else ### Ruby 1.9 !!!!! + unless TkCore::INTERP.default_master? + # [MultiTkIp] slave interp ? + return TkCore::INTERP._thread_tkwait('window', '.') if check_root + end + + begin + TclTkLib.set_eventloop_window_mode(true) + if check_root + INTERP_MUTEX.synchronize{ + INTERP_ROOT_CHECK.wait(INTERP_MUTEX) + status = INTERP_THREAD_STATUS.value + if status && TkCore::INTERP.default_master? + INTERP_THREAD_STATUS.value = nil if $SAFE < 4 + raise status if status.kind_of?(Exception) + end + } + else + INTERP_THREAD.value + end + ensure + TclTkLib.set_eventloop_window_mode(false) + end + end + end + + def mainloop_thread? + # true : current thread is mainloop + # nil : there is no mainloop + # false : mainloop is running on the other thread + # ( At then, it is dangerous to call Tk interpreter directly. ) + if !TkCore::WITH_RUBY_VM || TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD + ### Ruby 1.9 !!!!!!!!!!! + TclTkLib.mainloop_thread? + else + Thread.current == INTERP_THREAD + end + end + + def mainloop_exist? + TclTkLib.mainloop_thread? != nil + end + + def is_mainloop? + TclTkLib.mainloop_thread? == true + end + + def mainloop_watchdog(check_root = true) + # watchdog restarts mainloop when mainloop is dead + TclTkLib.mainloop_watchdog(check_root) + end + + def do_one_event(flag = TclTkLib::EventFlag::ALL) + TclTkLib.do_one_event(flag) + end + + def set_eventloop_tick(timer_tick) + TclTkLib.set_eventloop_tick(timer_tick) + end + + def get_eventloop_tick() + TclTkLib.get_eventloop_tick + end + + def set_no_event_wait(wait) + TclTkLib.set_no_even_wait(wait) + end + + def get_no_event_wait() + TclTkLib.get_no_eventloop_wait + end + + def set_eventloop_weight(loop_max, no_event_tick) + TclTkLib.set_eventloop_weight(loop_max, no_event_tick) + end + + def get_eventloop_weight() + TclTkLib.get_eventloop_weight + end + + def restart(app_name = nil, keys = {}) + TkCore::INTERP.init_ip_internal + + tk_call('set', 'argv0', app_name) if app_name + if keys.kind_of?(Hash) + # tk_call('set', 'argc', keys.size * 2) + tk_call('set', 'argv', hash_kv(keys).join(' ')) + end + + INTERP.restart + nil + end + + def event_generate(win, context, keys=nil) + #win = win.path if win.kind_of?(TkObject) + if context.kind_of?(TkEvent::Event) + context.generate(win, ((keys)? keys: {})) + elsif keys + tk_call_without_enc('event', 'generate', win, + "<#{tk_event_sequence(context)}>", + *hash_kv(keys, true)) + else + tk_call_without_enc('event', 'generate', win, + "<#{tk_event_sequence(context)}>") + end + nil + end + + def messageBox(keys) + tk_call('tk_messageBox', *hash_kv(keys)) + end + + def getOpenFile(keys = nil) + tk_call('tk_getOpenFile', *hash_kv(keys)) + end + def getMultipleOpenFile(keys = nil) + simplelist(tk_call('tk_getOpenFile', '-multiple', '1', *hash_kv(keys))) + end + + def getSaveFile(keys = nil) + tk_call('tk_getSaveFile', *hash_kv(keys)) + end + def getMultipleSaveFile(keys = nil) + simplelist(tk_call('tk_getSaveFile', '-multiple', '1', *hash_kv(keys))) + end + + def chooseColor(keys = nil) + tk_call('tk_chooseColor', *hash_kv(keys)) + end + + def chooseDirectory(keys = nil) + tk_call('tk_chooseDirectory', *hash_kv(keys)) + end + + def _ip_eval_core(enc_mode, cmd_string) + case enc_mode + when nil + res = INTERP._eval(cmd_string) + when false + res = INTERP._eval_without_enc(cmd_string) + when true + res = INTERP._eval_with_enc(cmd_string) + end + if INTERP._return_value() != 0 + fail RuntimeError, res, error_at + end + return res + end + private :_ip_eval_core + + def ip_eval(cmd_string) + _ip_eval_core(nil, cmd_string) + end + + def ip_eval_without_enc(cmd_string) + _ip_eval_core(false, cmd_string) + end + + def ip_eval_with_enc(cmd_string) + _ip_eval_core(true, cmd_string) + end + + def _ip_invoke_core(enc_mode, *args) + case enc_mode + when false + res = INTERP._invoke_without_enc(*args) + when nil + res = INTERP._invoke(*args) + when true + res = INTERP._invoke_with_enc(*args) + end + if INTERP._return_value() != 0 + fail RuntimeError, res, error_at + end + return res + end + private :_ip_invoke_core + + def ip_invoke(*args) + _ip_invoke_core(nil, *args) + end + + def ip_invoke_without_enc(*args) + _ip_invoke_core(false, *args) + end + + def ip_invoke_with_enc(*args) + _ip_invoke_core(true, *args) + end + + def _tk_call_core(enc_mode, *args) + ### puts args.inspect if $DEBUG + #args.collect! {|x|ruby2tcl(x, enc_mode)} + #args.compact! + #args.flatten! + args = _conv_args([], enc_mode, *args) + puts 'invoke args => ' + args.inspect if $DEBUG + ### print "=> ", args.join(" ").inspect, "\n" if $DEBUG + begin + # res = INTERP._invoke(*args).taint + # res = INTERP._invoke(enc_mode, *args) + res = _ip_invoke_core(enc_mode, *args) + # >>>>> _invoke returns a TAINTED string <<<<< + rescue NameError => err + # err = $! + begin + args.unshift "unknown" + #res = INTERP._invoke(*args).taint + #res = INTERP._invoke(enc_mode, *args) + res = _ip_invoke_core(enc_mode, *args) + # >>>>> _invoke returns a TAINTED string <<<<< + rescue StandardError => err2 + fail err2 unless /^invalid command/ =~ err2.message + fail err + end + end + if INTERP._return_value() != 0 + fail RuntimeError, res, error_at + end + ### print "==> ", res.inspect, "\n" if $DEBUG + return res + end + private :_tk_call_core + + def tk_call(*args) + _tk_call_core(nil, *args) + end + + def tk_call_without_enc(*args) + _tk_call_core(false, *args) + end + + def tk_call_with_enc(*args) + _tk_call_core(true, *args) + end + + def _tk_call_to_list_core(depth, arg_enc, val_enc, *args) + args = _conv_args([], arg_enc, *args) + val = _tk_call_core(false, *args) + if !depth.kind_of?(Integer) || depth == 0 + tk_split_simplelist(val, false, val_enc) + else + tk_split_list(val, depth, false, val_enc) + end + end + #private :_tk_call_to_list_core + + def tk_call_to_list(*args) + _tk_call_to_list_core(-1, nil, true, *args) + end + + def tk_call_to_list_without_enc(*args) + _tk_call_to_list_core(-1, false, false, *args) + end + + def tk_call_to_list_with_enc(*args) + _tk_call_to_list_core(-1, true, true, *args) + end + + def tk_call_to_simplelist(*args) + _tk_call_to_list_core(0, nil, true, *args) + end + + def tk_call_to_simplelist_without_enc(*args) + _tk_call_to_list_core(0, false, false, *args) + end + + def tk_call_to_simplelist_with_enc(*args) + _tk_call_to_list_core(0, true, true, *args) + end +end + + +module Tk + include TkCore + extend Tk + + TCL_VERSION = INTERP._invoke_without_enc("info", "tclversion").freeze + TCL_PATCHLEVEL = INTERP._invoke_without_enc("info", "patchlevel").freeze + + major, minor = TCL_VERSION.split('.') + TCL_MAJOR_VERSION = major.to_i + TCL_MINOR_VERSION = minor.to_i + + TK_VERSION = INTERP._invoke_without_enc("set", "tk_version").freeze + TK_PATCHLEVEL = INTERP._invoke_without_enc("set", "tk_patchLevel").freeze + + major, minor = TK_VERSION.split('.') + TK_MAJOR_VERSION = major.to_i + TK_MINOR_VERSION = minor.to_i + + JAPANIZED_TK = (INTERP._invoke_without_enc("info", "commands", + "kanji") != "").freeze + + def Tk.const_missing(sym) + case(sym) + when :TCL_LIBRARY + INTERP._invoke_without_enc('global', 'tcl_library') + INTERP._invoke("set", "tcl_library").freeze + + when :TK_LIBRARY + INTERP._invoke_without_enc('global', 'tk_library') + INTERP._invoke("set", "tk_library").freeze + + when :LIBRARY + INTERP._invoke("info", "library").freeze + + #when :PKG_PATH, :PACKAGE_PATH, :TCL_PACKAGE_PATH + # INTERP._invoke_without_enc('global', 'tcl_pkgPath') + # tk_split_simplelist(INTERP._invoke('set', 'tcl_pkgPath')) + + #when :LIB_PATH, :LIBRARY_PATH, :TCL_LIBRARY_PATH + # INTERP._invoke_without_enc('global', 'tcl_libPath') + # tk_split_simplelist(INTERP._invoke('set', 'tcl_libPath')) + + when :PLATFORM, :TCL_PLATFORM + if $SAFE >= 4 + fail SecurityError, "can't get #{sym} when $SAFE >= 4" + end + INTERP._invoke_without_enc('global', 'tcl_platform') + Hash[*tk_split_simplelist(INTERP._invoke_without_enc('array', 'get', + 'tcl_platform'))] + + when :ENV + INTERP._invoke_without_enc('global', 'env') + Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', 'env'))] + + #when :AUTO_PATH #<=== + # tk_split_simplelist(INTERP._invoke('set', 'auto_path')) + + #when :AUTO_OLDPATH + # tk_split_simplelist(INTERP._invoke('set', 'auto_oldpath')) + + when :AUTO_INDEX + INTERP._invoke_without_enc('global', 'auto_index') + Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', 'auto_index'))] + + when :PRIV, :PRIVATE, :TK_PRIV + priv = {} + if INTERP._invoke_without_enc('info', 'vars', 'tk::Priv') != "" + var_nam = 'tk::Priv' + else + var_nam = 'tkPriv' + end + INTERP._invoke_without_enc('global', var_nam) + Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', + var_nam))].each{|k,v| + k.freeze + case v + when /^-?\d+$/ + priv[k] = v.to_i + when /^-?\d+\.?\d*(e[-+]?\d+)?$/ + priv[k] = v.to_f + else + priv[k] = v.freeze + end + } + priv + + else + raise NameError, 'uninitialized constant Tk::' + sym.id2name + end + end + + def Tk.errorInfo + INTERP._invoke_without_enc('global', 'errorInfo') + INTERP._invoke_without_enc('set', 'errorInfo') + end + + def Tk.errorCode + INTERP._invoke_without_enc('global', 'errorCode') + code = tk_split_simplelist(INTERP._invoke_without_enc('set', 'errorCode')) + case code[0] + when 'CHILDKILLED', 'CHILDSTATUS', 'CHILDSUSP' + begin + pid = Integer(code[1]) + code[1] = pid + rescue + end + end + code + end + + def Tk.has_mainwindow? + INTERP.has_mainwindow? + end + + def root + Tk::Root.new + end + + def Tk.load_tclscript(file, enc=nil) + if enc + # TCL_VERSION >= 8.5 + tk_call('source', '-encoding', enc, file) + else + tk_call('source', file) + end + end + + def Tk.load_tcllibrary(file, pkg_name=None, interp=None) + tk_call('load', file, pkg_name, interp) + end + + def Tk.unload_tcllibrary(*args) + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + nocomp = (keys['nocomplain'])? '-nocomplain': None + keeplib = (keys['keeplibrary'])? '-keeplibrary': None + tk_call('unload', nocomp, keeplib, '--', *args) + else + tk_call('unload', *args) + end + end + + def Tk.pkgconfig_list(mod) + # Tk8.5 feature + if mod.kind_of?(Module) + if mod.respond_to?(:package_name) + pkgname = mod.package_name + elsif mod.const_defined?(:PACKAGE_NAME) + pkgname = mod::PACKAGE_NAME + else + fail NotImplementedError, 'may not be a module for a Tcl extension' + end + else + pkgname = mod.to_s + end + + pkgname = '::' << pkgname unless pkgname =~ /^::/ + + tk_split_list(tk_call(pkgname + '::pkgconfig', 'list')) + end + + def Tk.pkgconfig_get(mod, key) + # Tk8.5 feature + if mod.kind_of?(Module) + if mod.respond_to?(:package_name) + pkgname = mod.package_name + else + fail NotImplementedError, 'may not be a module for a Tcl extension' + end + else + pkgname = mod.to_s + end + + pkgname = '::' << pkgname unless pkgname =~ /^::/ + + tk_call(pkgname + '::pkgconfig', 'get', key) + end + + def Tk.tcl_pkgconfig_list + # Tk8.5 feature + Tk.pkgconfig_list('::tcl') + end + + def Tk.tcl_pkgconfig_get(key) + # Tk8.5 feature + Tk.pkgconfig_get('::tcl', key) + end + + def Tk.tk_pkgconfig_list + # Tk8.5 feature + Tk.pkgconfig_list('::tk') + end + + def Tk.tk_pkgconfig_get(key) + # Tk8.5 feature + Tk.pkgconfig_get('::tk', key) + end + + def Tk.bell(nice = false) + if nice + tk_call_without_enc('bell', '-nice') + else + tk_call_without_enc('bell') + end + nil + end + + def Tk.bell_on_display(win, nice = false) + if nice + tk_call_without_enc('bell', '-displayof', win, '-nice') + else + tk_call_without_enc('bell', '-displayof', win) + end + nil + end + + def Tk.destroy(*wins) + #tk_call_without_enc('destroy', *wins) + tk_call_without_enc('destroy', *(wins.collect{|win| + if win.kind_of?(TkWindow) + win.epath + else + win + end + })) + end + + def Tk.exit + TkCore::INTERP.has_mainwindow? && tk_call_without_enc('destroy', '.') + end + + ################################################ + + def Tk.sleep(ms = nil, id = nil) + if id + var = (id.kind_of?(TkVariable))? id: TkVarAccess.new(id.to_s) + else + var = TkVariable.new + end + + var.value = tk_call_without_enc('after', ms, proc{ var.value = 0 }) if ms + var.thread_wait + ms + end + + def Tk.wakeup(id) + ((id.kind_of?(TkVariable))? id: TkVarAccess.new(id.to_s)).value = 0 + nil + end + + ################################################ + + def Tk.pack(*args) + TkPack.configure(*args) + end + def Tk.pack_forget(*args) + TkPack.forget(*args) + end + def Tk.unpack(*args) + TkPack.forget(*args) + end + + def Tk.grid(*args) + TkGrid.configure(*args) + end + def Tk.grid_forget(*args) + TkGrid.forget(*args) + end + def Tk.ungrid(*args) + TkGrid.forget(*args) + end + + def Tk.place(*args) + TkPlace.configure(*args) + end + def Tk.place_forget(*args) + TkPlace.forget(*args) + end + def Tk.unplace(*args) + TkPlace.forget(*args) + end + + def Tk.update(idle=nil) + if idle + tk_call_without_enc('update', 'idletasks') + else + tk_call_without_enc('update') + end + end + def Tk.update_idletasks + update(true) + end + def update(idle=nil) + # only for backward compatibility (This never be recommended to use) + Tk.update(idle) + self + end + + # NOTE:: + # If no eventloop-thread is running, "thread_update" method is same + # to "update" method. Else, "thread_update" method waits to complete + # idletask operation on the eventloop-thread. + def Tk.thread_update(idle=nil) + if idle + tk_call_without_enc('thread_update', 'idletasks') + else + tk_call_without_enc('thread_update') + end + end + def Tk.thread_update_idletasks + thread_update(true) + end + + def Tk.lower_window(win, below=None) + tk_call('lower', _epath(win), _epath(below)) + nil + end + def Tk.raise_window(win, above=None) + tk_call('raise', _epath(win), _epath(above)) + nil + end + + def Tk.current_grabs(win = nil) + if win + window(tk_call_without_enc('grab', 'current', win)) + else + tk_split_list(tk_call_without_enc('grab', 'current')) + end + end + + def Tk.focus(display=nil) + if display == nil + window(tk_call_without_enc('focus')) + else + window(tk_call_without_enc('focus', '-displayof', display)) + end + end + + def Tk.focus_to(win, force=false) + if force + tk_call_without_enc('focus', '-force', win) + else + tk_call_without_enc('focus', win) + end + end + + def Tk.focus_lastfor(win) + window(tk_call_without_enc('focus', '-lastfor', win)) + end + + def Tk.focus_next(win) + TkManageFocus.next(win) + end + + def Tk.focus_prev(win) + TkManageFocus.prev(win) + end + + def Tk.strictMotif(mode=None) + bool(tk_call_without_enc('set', 'tk_strictMotif', mode)) + end + + def Tk.show_kinsoku(mode='both') + begin + if /^8\.*/ === TK_VERSION && JAPANIZED_TK + tk_split_simplelist(tk_call('kinsoku', 'show', mode)) + end + rescue + end + end + def Tk.add_kinsoku(chars, mode='both') + begin + if /^8\.*/ === TK_VERSION && JAPANIZED_TK + tk_split_simplelist(tk_call('kinsoku', 'add', mode, + *(chars.split('')))) + else + [] + end + rescue + [] + end + end + def Tk.delete_kinsoku(chars, mode='both') + begin + if /^8\.*/ === TK_VERSION && JAPANIZED_TK + tk_split_simplelist(tk_call('kinsoku', 'delete', mode, + *(chars.split('')))) + end + rescue + end + end + + def Tk.toUTF8(str, encoding = nil) + _toUTF8(str, encoding) + end + + def Tk.fromUTF8(str, encoding = nil) + _fromUTF8(str, encoding) + end +end + +########################################### +# string with Tcl's encoding +########################################### +module Tk + def Tk.subst_utf_backslash(str) + Tk::EncodedString.subst_utf_backslash(str) + end + def Tk.subst_tk_backslash(str) + Tk::EncodedString.subst_tk_backslash(str) + end + def Tk.utf_to_backslash_sequence(str) + Tk::EncodedString.utf_to_backslash_sequence(str) + end + def Tk.utf_to_backslash(str) + Tk::EncodedString.utf_to_backslash_sequence(str) + end + def Tk.to_backslash_sequence(str) + Tk::EncodedString.to_backslash_sequence(str) + end +end + + +########################################### +# convert kanji string to/from utf-8 +########################################### +if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK) + module Tk + module Encoding + extend Encoding + + TkCommandNames = ['encoding'.freeze].freeze + + ############################################# + + if TkCore::WITH_ENCODING ### Ruby 1.9 + RubyEncoding = ::Encoding + + # for saving GC cost + #ENCNAMES_CMD = ['encoding'.freeze, 'names'.freeze] + BINARY_NAME = 'binary'.freeze + UTF8_NAME = 'utf-8'.freeze + DEFAULT_EXTERNAL_NAME = RubyEncoding.default_external.name.freeze + DEFAULT_INTERNAL_NAME = RubyEncoding.default_internal.name.freeze rescue nil + + BINARY = RubyEncoding.find(BINARY_NAME) + UNKNOWN = RubyEncoding.find('ASCII-8BIT') + + ### start of creating ENCODING_TABLE + ENCODING_TABLE = TkCore::INTERP.encoding_table +=begin + ENCODING_TABLE = { + 'binary' => BINARY, + # 'UNKNOWN-8BIT' => UNKNOWN, + } + + list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0], + ENCNAMES_CMD[1]) + TkCore::INTERP._split_tklist(list).each{|name| + begin + enc = RubyEncoding.find(name) + rescue ArgumentError + case name + when 'identity' + enc = BINARY + when 'shiftjis' + enc = RubyEncoding.find('Shift_JIS') + when 'unicode' + enc = RubyEncoding.find('UTF-8') + #if Tk.tk_call('set', 'tcl_platform(byteOrder)') =='littleEndian' + # enc = RubyEncoding.find('UTF-16LE') + #else + # enc = RubyEncoding.find('UTF-16BE') + #end + when 'symbol' + # single byte data + enc = RubyEncoding.find('ASCII-8BIT') ### ??? + else + # unsupported on Ruby, but supported on Tk + enc = TkCore::INTERP.create_dummy_encoding_for_tk(name) + end + end + ENCODING_TABLE[name.freeze] = enc + } +=end +=begin + def ENCODING_TABLE.get_name(enc) + orig_enc = enc + + # unles enc, use system default + # 1st: Ruby/Tk default encoding + # 2nd: Tcl/Tk default encoding + # 3rd: Ruby's default_external + enc ||= TkCore::INTERP.encoding + enc ||= TclTkLib.encoding_system + enc ||= DEFAULT_EXTERNAL_NAME + + if enc.kind_of?(RubyEncoding) + # Ruby's Encoding object + if (name = self.key(enc)) + return name + end + + # Is it new ? + list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0], + ENCNAMES_CMD[1]) + TkComm.simplelist(list).each{|name| + if ((enc == RubyEncoding.find(name)) rescue false) + # new relation!! update table + self[name.freeze] = enc + return name + end + } + else + # String or Symbol ? + if self[name = enc.to_s] + return name + end + + # Is it new ? + if (enc_obj = (RubyEncoding.find(name) rescue false)) + list = TkCore::INTERP._invoke_without_enc(ENCNAMES_CMD[0], + ENCNAMES_CMD[1]) + if TkComm.simplelist(list).index(name) + # Tk's encoding name ? + self[name.freeze] = enc_obj # new relation!! update table + return name + else + # Ruby's encoding name ? + if (name = self.key(enc_obj)) + return name + end + end + end + end + + fail ArgumentError, "unsupported Tk encoding '#{orig_enc}'" + end + + def ENCODING_TABLE.get_obj(enc) + # returns the encoding object. + # If 'enc' is the encoding name on Tk only, it returns nil. + ((obj = self[self.get_name(enc)]).kind_of?(RubyEncoding))? obj: nil + end +=end + ### end of creating ENCODING_TABLE + + end + + ############################################# + + if TkCore::WITH_ENCODING + ################################ + ### Ruby 1.9 + ################################ + def force_default_encoding(mode) + TkCore::INTERP.force_default_encoding = mode + end + + def force_default_encoding? + TkCore::INTERP.force_default_encoding? + end + + def default_encoding=(enc) + TkCore::INTERP.default_encoding = Tk::Encoding::ENCODING_TABLE.get_name(enc) + end + + def encoding=(enc) + TkCore::INTERP.encoding = Tk::Encoding::ENCODING_TABLE.get_name(enc) + end + + def encoding_name + Tk::Encoding::ENCODING_TABLE.get_name(TkCore::INTERP.encoding) + end + def encoding_obj + Tk::Encoding::ENCODING_TABLE.get_obj(TkCore::INTERP.encoding) + end + alias encoding encoding_name + alias default_encoding encoding_name + + def tk_encoding_names + #TkComm.simplelist(TkCore::INTERP._invoke_without_enc(Tk::Encoding::ENCNAMES_CMD[0], Tk::Encoding::ENCNAMES_CMD[1])) + TkComm.simplelist(TkCore::INTERP._invoke_without_enc('encoding', 'names')) + end + def encoding_names + self.tk_encoding_names.find_all{|name| + Tk::Encoding::ENCODING_TABLE.get_name(name) rescue false + } + end + def encoding_objs + self.tk_encoding_names.map!{|name| + Tk::Encoding::ENCODING_TABLE.get_obj(name) rescue nil + }.compact + end + + def encoding_system=(enc) + TclTkLib.encoding_system = Tk::Encoding::ENCODING_TABLE.get_name(enc) + end + + def encoding_system_name + Tk::Encoding::ENCODING_TABLE.get_name(TclTkLib.encoding_system) + end + def encoding_system_obj + Tk::Encoding::ENCODING_TABLE.get_obj(TclTkLib.encoding_system) + end + alias encoding_system encoding_system_name + + ################################ + else + ################################ + ### Ruby 1.8- + ################################ + def force_default_encoding=(mode) + true + end + + def force_default_encoding? + true + end + + def default_encoding=(enc) + TkCore::INTERP.default_encoding = enc + end + + def encoding=(enc) + TkCore::INTERP.encoding = enc + end + + def encoding_obj + TkCore::INTERP.encoding + end + def encoding_name + TkCore::INTERP.encoding + end + alias encoding encoding_name + alias default_encoding encoding_name + + def tk_encoding_names + TkComm.simplelist(Tk.tk_call('encoding', 'names')) + end + def encoding_objs + self.tk_encoding_names + end + def encoding_names + self.tk_encoding_names + end + + def encoding_system=(enc) + TclTkLib.encoding_system = enc + end + + def encoding_system_name + TclTkLib.encoding_system + end + def encoding_system_obj + TclTkLib.encoding_system + end + alias encoding_system encoding_system_name + + ################################ + end + + def encoding_convertfrom(str, enc=nil) + enc = encoding_system_name unless enc + str = str.dup + if TkCore::WITH_ENCODING + if str.kind_of?(Tk::EncodedString) + str.__instance_variable_set('@encoding', nil) + else + str.instance_variable_set('@encoding', nil) + end + str.force_encoding('binary') + else + str.instance_variable_set('@encoding', 'binary') + end + ret = TkCore::INTERP._invoke_without_enc('encoding', 'convertfrom', + enc, str) + if TkCore::WITH_ENCODING + ret.force_encoding('utf-8') + else + Tk::UTF8_String.new(ret) + end + ret + end + alias encoding_convert_from encoding_convertfrom + + def encoding_convertto(str, enc=nil) + # str must be a UTF-8 string + enc = encoding_system_name unless enc + ret = TkCore::INTERP._invoke_without_enc('encoding', 'convertto', + enc, str) + #ret.instance_variable_set('@encoding', 'binary') + if TkCore::WITH_ENCODING + #ret.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj('binary')) + ret.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj(enc)) + end + ret + end + alias encoding_convert_to encoding_convertto + + def encoding_dirs + # Tcl8.5 feature + TkComm.simplelist(Tk.tk_call_without_enc('encoding', 'dirs')) + end + + def encoding_dirs=(dir_list) # an array or a Tcl's list string + # Tcl8.5 feature + Tk.tk_call_without_enc('encoding', 'dirs', dir_list) + end + end + + extend Encoding + end + + class TclTkIp + def force_default_encoding=(mode) + @force_default_encoding[0] = (mode)? true: false + end + + def force_default_encoding? + @force_default_encoding[0] ||= false + end + + def default_encoding=(name) + name = name.name if Tk::WITH_ENCODING && name.kind_of?(::Encoding) + @encoding[0] = name.to_s.dup + end + + # from tkencoding.rb by ttate@jaist.ac.jp + #attr_accessor :encoding + def encoding=(name) + self.force_default_encoding = true # for comaptibility + self.default_encoding = name + end + + def encoding_name + (@encoding[0])? @encoding[0].dup: nil + end + alias encoding encoding_name + alias default_encoding encoding_name + + def encoding_obj + if Tk::WITH_ENCODING + Tk::Encoding.tcl2rb_encoding(@encoding[0]) + else + (@encoding[0])? @encoding[0].dup: nil + end + end + + alias __toUTF8 _toUTF8 + alias __fromUTF8 _fromUTF8 + + if Object.const_defined?(:Encoding) && ::Encoding.class == Class + # with Encoding (Ruby 1.9+) + # + # use functions on Tcl as default. + # but when unsupported encoding on Tcl, use methods on Ruby. + # + def _toUTF8(str, enc = nil) + if enc + # use given encoding + begin + enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc) + rescue + # unknown encoding for Tk -> try to convert encoding on Ruby + str = str.dup.force_encoding(enc) + str.encode!(Tk::Encoding::UTF8_NAME) # modify self !! + return str # if no error, probably succeed converting + end + end + + enc_name ||= str.instance_variable_get(:@encoding) + + enc_name ||= + Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil + + if enc_name + # str has its encoding information + encstr = __toUTF8(str, enc_name) + encstr.force_encoding(Tk::Encoding::UTF8_NAME) + return encstr + else + # str.encoding isn't supported by Tk -> try to convert on Ruby + begin + return str.encode(Tk::Encoding::UTF8_NAME) # new string + rescue + # error -> ignore, try to use default encoding of Ruby/Tk + end + end + + #enc_name ||= + # Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding) rescue nil + enc_name ||= Tk::Encoding::ENCODING_TABLE.get_name(nil) + + # is 'binary' encoding? + if enc_name == Tk::Encoding::BINARY_NAME + return str.dup.force_encoding(Tk::Encoding::BINARY_NAME) + end + + # force default encoding? + if ! str.kind_of?(Tk::EncodedString) && self.force_default_encoding? + enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.default_encoding) + end + + encstr = __toUTF8(str, enc_name) + encstr.force_encoding(Tk::Encoding::UTF8_NAME) + encstr + end + def _fromUTF8(str, enc = nil) + # str must be UTF-8 or binary. + enc_name = str.instance_variable_get(:@encoding) + enc_name ||= + Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil + + # is 'binary' encoding? + if enc_name == Tk::Encoding::BINARY_NAME + return str.dup.force_encoding(Tk::Encoding::BINARY_NAME) + end + + # get target encoding name (if enc == nil, use default encoding) + begin + enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc) + rescue + # then, enc != nil + # unknown encoding for Tk -> try to convert encoding on Ruby + str = str.dup.force_encoding(Tk::Encoding::UTF8_NAME) + str.encode!(enc) # modify self !! + return str # if no error, probably succeed converting + end + + encstr = __fromUTF8(str, enc_name) + encstr.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj(enc_name)) + encstr + end + ### + else + # without Encoding (Ruby 1.8) + def _toUTF8(str, encoding = nil) + __toUTF8(str, encoding) + end + def _fromUTF8(str, encoding = nil) + __fromUTF8(str, encoding) + end + ### + end + + alias __eval _eval + alias __invoke _invoke + + def _eval(cmd) + _fromUTF8(__eval(_toUTF8(cmd))) + end + + def _invoke(*cmds) + _fromUTF8(__invoke(*(cmds.collect{|cmd| _toUTF8(cmd)}))) + end + + alias _eval_with_enc _eval + alias _invoke_with_enc _invoke + +=begin + #### --> definition is moved to TclTkIp module + + def _toUTF8(str, encoding = nil) + # decide encoding + if encoding + encoding = encoding.to_s + elsif str.kind_of?(Tk::EncodedString) && str.encoding != nil + encoding = str.encoding.to_s + elsif str.instance_variable_get(:@encoding) + encoding = str.instance_variable_get(:@encoding).to_s + elsif defined?(@encoding) && @encoding != nil + encoding = @encoding.to_s + else + encoding = __invoke('encoding', 'system') + end + + # convert + case encoding + when 'utf-8', 'binary' + str + else + __toUTF8(str, encoding) + end + end + + def _fromUTF8(str, encoding = nil) + unless encoding + if defined?(@encoding) && @encoding != nil + encoding = @encoding.to_s + else + encoding = __invoke('encoding', 'system') + end + end + + if str.kind_of?(Tk::EncodedString) + if str.encoding == 'binary' + str + else + __fromUTF8(str, encoding) + end + elsif str.instance_variable_get(:@encoding).to_s == 'binary' + str + else + __fromUTF8(str, encoding) + end + end +=end + +=begin + def _eval(cmd) + if defined?(@encoding) && @encoding != 'utf-8' + ret = if cmd.kind_of?(Tk::EncodedString) + case cmd.encoding + when 'utf-8', 'binary' + __eval(cmd) + else + __eval(_toUTF8(cmd, cmd.encoding)) + end + elsif cmd.instance_variable_get(:@encoding) == 'binary' + __eval(cmd) + else + __eval(_toUTF8(cmd, @encoding)) + end + if ret.kind_of?(String) && ret.instance_variable_get(:@encoding) == 'binary' + ret + else + _fromUTF8(ret, @encoding) + end + else + __eval(cmd) + end + end + + def _invoke(*cmds) + if defined?(@encoding) && @encoding != 'utf-8' + cmds = cmds.collect{|cmd| + if cmd.kind_of?(Tk::EncodedString) + case cmd.encoding + when 'utf-8', 'binary' + cmd + else + _toUTF8(cmd, cmd.encoding) + end + elsif cmd.instance_variable_get(:@encoding) == 'binary' + cmd + else + _toUTF8(cmd, @encoding) + end + } + ret = __invoke(*cmds) + if ret.kind_of?(String) && ret.instance_variable_get(:@encoding) == 'binary' + ret + else + _fromUTF8(ret, @encoding) + end + else + __invoke(*cmds) + end + end +=end + end + + module TclTkLib + class << self + def force_default_encoding=(mode) + TkCore::INTERP.force_default_encoding = mode + end + + def force_default_encoding? + TkCore::INTERP.force_default_encoding? + end + + def default_encoding=(name) + TkCore::INTERP.default_encoding = name + end + + alias _encoding encoding + alias _encoding= encoding= + def encoding=(name) + name = name.name if name.kind_of?(::Encoding) if Tk::WITH_ENCODING + TkCore::INTERP.encoding = name + end + + def encoding_name + TkCore::INTERP.encoding + end + alias encoding encoding_name + alias default_encoding encoding_name + + def encoding_obj + if Tk::WITH_ENCODING + Tk::Encoding.tcl2rb_encoding(TkCore::INTERP.encoding) + else + TkCore::INTERP.encoding + end + end + end + end + + # estimate encoding + unless TkCore::WITH_ENCODING + case $KCODE + when /^e/i # EUC + Tk.encoding = 'euc-jp' + Tk.encoding_system = 'euc-jp' + when /^s/i # SJIS + begin + if Tk.encoding_system == 'cp932' + Tk.encoding = 'cp932' + else + Tk.encoding = 'shiftjis' + Tk.encoding_system = 'shiftjis' + end + rescue StandardError, NameError + Tk.encoding = 'shiftjis' + Tk.encoding_system = 'shiftjis' + end + when /^u/i # UTF8 + Tk.encoding = 'utf-8' + Tk.encoding_system = 'utf-8' + else # NONE + if defined? DEFAULT_TK_ENCODING + Tk.encoding_system = DEFAULT_TK_ENCODING + end + begin + Tk.encoding = Tk.encoding_system + rescue StandardError, NameError + Tk.encoding = 'utf-8' + Tk.encoding_system = 'utf-8' + end + end + + else ### Ruby 1.9 !!!!!!!!!!!! + loc_enc_obj = ::Encoding.find(::Encoding.locale_charmap) + ext_enc_obj = ::Encoding.default_external + int_enc_obj = ::Encoding.default_internal || ext_enc_obj + tksys_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding_system) + # p [Tk.encoding, Tk.encoding_system, loc_enc_obj, ext_enc_obj] + +=begin + if ext_enc_obj == Tk::Encoding::UNKNOWN + if defind? DEFAULT_TK_ENCODING + if DEFAULT_TK_ENCODING.kind_of?(::Encoding) + tk_enc_name = DEFAULT_TK_ENCODING.name + tksys_enc_name = DEFAULT_TK_ENCODING.name + else + tk_enc_name = DEFAULT_TK_ENCODING + tksys_enc_name = DEFAULT_TK_ENCODING + end + else + tk_enc_name = loc_enc_obj.name + tksys_enc_name = loc_enc_obj.name + end + else + tk_enc_name = ext_enc_obj.name + tksys_enc_name = ext_enc_obj.name + end + + # Tk.encoding = tk_enc_name + Tk.default_encoding = tk_enc_name + Tk.encoding_system = tksys_enc_name +=end + + if ext_enc_obj == Tk::Encoding::UNKNOWN + if loc_enc_obj == Tk::Encoding::UNKNOWN + # use Tk.encoding_system + else + # use locale_charmap + begin + loc_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(loc_enc_obj) + if loc_enc_name && loc_enc_name != tksys_enc_name + # use locale_charmap + Tk.encoding_system = loc_enc_name + else + # use Tk.encoding_system + end + rescue ArgumentError + # unsupported encoding on Tk -> use Tk.encoding_system + end + end + else + begin + ext_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(ext_enc_obj) + if ext_enc_name && ext_enc_name != tksys_enc_name + # use default_external + Tk.encoding_system = ext_enc_name + else + # use Tk.encoding_system + end + rescue ArgumentError + # unsupported encoding on Tk -> use Tk.encoding_system + end + end + + # setup Tk.encoding + enc_name = nil + + begin + default_def = DEFAULT_TK_ENCODING + if ::Encoding.find(default_def.to_s) != Tk::Encoding::UNKNOWN + enc_name = Tk::Encoding::ENCODING_TABLE.get_name(default_def) + end + rescue NameError + # ignore + enc_name = nil + rescue ArgumentError + enc_name = nil + fail ArgumentError, + "DEFAULT_TK_ENCODING has an unknown encoding #{default_def}" + end + + unless enc_name + #if ext_enc_obj == Tk::Encoding::UNKNOWN + if int_enc_obj == Tk::Encoding::UNKNOWN + if loc_enc_obj == Tk::Encoding::UNKNOWN + # use Tk.encoding_system + enc_name = tksys_enc_name + else + # use locale_charmap + begin + loc_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(loc_enc_obj) + if loc_enc_name + # use locale_charmap + enc_name = loc_enc_name + else + # use Tk.encoding_system + enc_name = tksys_enc_name + end + rescue ArgumentError + # unsupported encoding on Tk -> use Tk.encoding_system + enc_name = tksys_enc_name + end + end + else + begin + #ext_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(ext_enc_obj) + #if ext_enc_name && ext_enc_name != tksys_enc_name + int_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(int_enc_obj) + if int_enc_name + # use default_external + enc_name = int_enc_name + else + # use Tk.encoding_system + enc_name = tksys_enc_name + end + rescue ArgumentError + # unsupported encoding on Tk -> use Tk.encoding_system + enc_name = tksys_enc_name + end + end + end + + Tk.default_encoding = (enc_name)? enc_name: tksys_enc_name + end + +else + # dummy methods + module Tk + module Encoding + extend Encoding + + def force_default_encoding=(mode) + nil + end + + def force_default_encoding? + nil + end + + def default_encoding=(enc) + nil + end + def default_encoding + nil + end + + def encoding=(name) + nil + end + def encoding + nil + end + def encoding_names + nil + end + def encoding_system + nil + end + def encoding_system=(enc) + nil + end + + def encoding_convertfrom(str, enc=None) + str + end + alias encoding_convert_from encoding_convertfrom + + def encoding_convertto(str, enc=None) + str + end + alias encoding_convert_to encoding_convertto + def encoding_dirs + nil + end + def encoding_dirs=(dir_array) + nil + end + end + + extend Encoding + end + + class TclTkIp + attr_accessor :encoding + + alias __eval _eval + alias __invoke _invoke + + alias _eval_with_enc _eval + alias _invoke_with_enc _invoke + end +end + + +module TkBindCore + #def bind(context, cmd=Proc.new, *args) + # Tk.bind(self, context, cmd, *args) + #end + def bind(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + Tk.bind(self, context, cmd, *args) + end + + #def bind_append(context, cmd=Proc.new, *args) + # Tk.bind_append(self, context, cmd, *args) + #end + def bind_append(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + Tk.bind_append(self, context, cmd, *args) + end + + def bind_remove(context) + Tk.bind_remove(self, context) + end + + def bindinfo(context=nil) + Tk.bindinfo(self, context) + end +end + + +module TkTreatFont + def __font_optkeys + ['font'] + end + private :__font_optkeys + + def __pathname + self.path + end + private :__pathname + + ################################ + + def font_configinfo(key = nil) + optkeys = __font_optkeys + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __pathname.split(':') + + if key + pathname = [win, tag, key].join(';') + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, *__confinfo_cmd) + elsif optkeys.size == 1 + pathname = [win, tag, optkeys[0]].join(';') + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, *__confinfo_cmd) + else + fonts = {} + optkeys.each{|key| + key = key.to_s + pathname = [win, tag, key].join(';') + fonts[key] = + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, *__confinfo_cmd) + } + fonts + end + end + alias fontobj font_configinfo + + def font_configure(slot) + pathname = __pathname + + slot = _symbolkey2str(slot) + + __font_optkeys.each{|optkey| + optkey = optkey.to_s + l_optkey = 'latin' << optkey + a_optkey = 'ascii' << optkey + k_optkey = 'kanji' << optkey + + if slot.key?(optkey) + fnt = slot.delete(optkey) + if fnt.kind_of?(TkFont) + slot.delete(l_optkey) + slot.delete(a_optkey) + slot.delete(k_optkey) + + fnt.call_font_configure([pathname, optkey], *(__config_cmd << {})) + next + else + if fnt + if (slot.key?(l_optkey) || + slot.key?(a_optkey) || + slot.key?(k_optkey)) + fnt = TkFont.new(fnt) + + lfnt = slot.delete(l_optkey) + lfnt = slot.delete(a_optkey) if slot.key?(a_optkey) + kfnt = slot.delete(k_optkey) + + fnt.latin_replace(lfnt) if lfnt + fnt.kanji_replace(kfnt) if kfnt + + fnt.call_font_configure([pathname, optkey], + *(__config_cmd << {})) + next + else + fnt = hash_kv(fnt) if fnt.kind_of?(Hash) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__config_cmd << "-#{optkey}" << fnt)) + else + begin + tk_call(*(__config_cmd << "-#{optkey}" << fnt)) + rescue + # ignore + end + end + end + end + next + end + end + + lfnt = slot.delete(l_optkey) + lfnt = slot.delete(a_optkey) if slot.key?(a_optkey) + kfnt = slot.delete(k_optkey) + + if lfnt && kfnt + TkFont.new(lfnt, kfnt).call_font_configure([pathname, optkey], + *(__config_cmd << {})) + elsif lfnt + latinfont_configure([lfnt, optkey]) + elsif kfnt + kanjifont_configure([kfnt, optkey]) + end + } + + # configure other (without font) options + tk_call(*(__config_cmd.concat(hash_kv(slot)))) if slot != {} + self + end + + def latinfont_configure(ltn, keys=nil) + if ltn.kind_of?(Array) + key = ltn[1] + ltn = ltn[0] + else + key = nil + end + + optkeys = __font_optkeys + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __pathname.split(':') + + optkeys = [key] if key + + optkeys.each{|optkey| + optkey = optkey.to_s + + pathname = [win, tag, optkey].join(';') + + if (fobj = TkFont.used_on(pathname)) + fobj = TkFont.new(fobj) # create a new TkFont object + elsif Tk::JAPANIZED_TK + fobj = fontobj # create a new TkFont object + else + ltn = hash_kv(ltn) if ltn.kind_of?(Hash) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__config_cmd << "-#{optkey}" << ltn)) + else + begin + tk_call(*(__config_cmd << "-#{optkey}" << ltn)) + rescue => e + # ignore + end + end + next + end + + if fobj.kind_of?(TkFont) + if ltn.kind_of?(TkFont) + conf = {} + ltn.latin_configinfo.each{|key,val| conf[key] = val} + if keys + fobj.latin_configure(conf.update(keys)) + else + fobj.latin_configure(conf) + end + else + fobj.latin_replace(ltn) + end + end + + fobj.call_font_configure([pathname, optkey], *(__config_cmd << {})) + } + self + end + alias asciifont_configure latinfont_configure + + def kanjifont_configure(knj, keys=nil) + if knj.kind_of?(Array) + key = knj[1] + knj = knj[0] + else + key = nil + end + + optkeys = __font_optkeys + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __pathname.split(':') + + optkeys = [key] if key + + optkeys.each{|optkey| + optkey = optkey.to_s + + pathname = [win, tag, optkey].join(';') + + if (fobj = TkFont.used_on(pathname)) + fobj = TkFont.new(fobj) # create a new TkFont object + elsif Tk::JAPANIZED_TK + fobj = fontobj # create a new TkFont object + else + knj = hash_kv(knj) if knj.kind_of?(Hash) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__config_cmd << "-#{optkey}" << knj)) + else + begin + tk_call(*(__config_cmd << "-#{optkey}" << knj)) + rescue => e + # ignore + end + end + next + end + + if fobj.kind_of?(TkFont) + if knj.kind_of?(TkFont) + conf = {} + knj.kanji_configinfo.each{|key,val| conf[key] = val} + if keys + fobj.kanji_configure(conf.update(keys)) + else + fobj.kanji_configure(conf) + end + else + fobj.kanji_replace(knj) + end + end + + fobj.call_font_configure([pathname, optkey], *(__config_cmd << {})) + } + self + end + + def font_copy(win, wintag=nil, winkey=nil, targetkey=nil) + if wintag + if winkey + fnt = win.tagfontobj(wintag, winkey).dup + else + fnt = win.tagfontobj(wintag).dup + end + else + if winkey + fnt = win.fontobj(winkey).dup + else + fnt = win.fontobj.dup + end + end + + if targetkey + fnt.call_font_configure([__pathname, targetkey], *(__config_cmd << {})) + else + fnt.call_font_configure(__pathname, *(__config_cmd << {})) + end + self + end + + def latinfont_copy(win, wintag=nil, winkey=nil, targetkey=nil) + if targetkey + fontobj(targetkey).dup.call_font_configure([__pathname, targetkey], + *(__config_cmd << {})) + else + fontobj.dup.call_font_configure(__pathname, *(__config_cmd << {})) + end + + if wintag + if winkey + fontobj.latin_replace(win.tagfontobj(wintag, winkey).latin_font_id) + else + fontobj.latin_replace(win.tagfontobj(wintag).latin_font_id) + end + else + if winkey + fontobj.latin_replace(win.fontobj(winkey).latin_font_id) + else + fontobj.latin_replace(win.fontobj.latin_font_id) + end + end + self + end + alias asciifont_copy latinfont_copy + + def kanjifont_copy(win, wintag=nil, winkey=nil, targetkey=nil) + if targetkey + fontobj(targetkey).dup.call_font_configure([__pathname, targetkey], + *(__config_cmd << {})) + else + fontobj.dup.call_font_configure(__pathname, *(__config_cmd << {})) + end + + if wintag + if winkey + fontobj.kanji_replace(win.tagfontobj(wintag, winkey).kanji_font_id) + else + fontobj.kanji_replace(win.tagfontobj(wintag).kanji_font_id) + end + else + if winkey + fontobj.kanji_replace(win.fontobj(winkey).kanji_font_id) + else + fontobj.kanji_replace(win.fontobj.kanji_font_id) + end + end + self + end +end + + +module TkConfigMethod + include TkUtil + include TkTreatFont + + def TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + @mode || false + end + def TkConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) + fail SecurityError, "can't change the mode" if $SAFE>=4 + @mode = (mode)? true: false + end + + def __cget_cmd + [self.path, 'cget'] + end + private :__cget_cmd + + def __config_cmd + [self.path, 'configure'] + end + private :__config_cmd + + def __confinfo_cmd + __config_cmd + end + private :__confinfo_cmd + + def __configinfo_struct + {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, + :default_value=>3, :current_value=>4} + end + private :__configinfo_struct + + def __optkey_aliases + {} + end + private :__optkey_aliases + + def __numval_optkeys + [] + end + private :__numval_optkeys + + def __numstrval_optkeys + [] + end + private :__numstrval_optkeys + + def __boolval_optkeys + ['exportselection', 'jump', 'setgrid', 'takefocus'] + end + private :__boolval_optkeys + + def __strval_optkeys + [ + 'text', 'label', 'show', 'data', 'file', + 'activebackground', 'activeforeground', 'background', + 'disabledforeground', 'disabledbackground', 'foreground', + 'highlightbackground', 'highlightcolor', 'insertbackground', + 'selectbackground', 'selectforeground', 'troughcolor' + ] + end + private :__strval_optkeys + + def __listval_optkeys + [] + end + private :__listval_optkeys + + def __numlistval_optkeys + [] + end + private :__numlistval_optkeys + + def __tkvariable_optkeys + ['variable', 'textvariable'] + end + private :__tkvariable_optkeys + + def __val2ruby_optkeys # { key=>proc, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "proc.call(value)" is called. + {} + end + private :__val2ruby_optkeys + + def __ruby2val_optkeys # { key=>proc, ... } + # The method is used to convert a ruby's object to a opt-value. + # When set the value of the option "key", "proc.call(value)" is called. + # That is, "-#{key} #{proc.call(value)}". + {} + end + private :__ruby2val_optkeys + + def __methodcall_optkeys # { key=>method, ... } + # The method is used to both of get and set. + # Usually, the 'key' will not be a widget option. + {} + end + private :__methodcall_optkeys + + def __keyonly_optkeys # { def_key=>undef_key or nil, ... } + {} + end + private :__keyonly_optkeys + + def __conv_keyonly_opts(keys) + return keys unless keys.kind_of?(Hash) + keyonly = __keyonly_optkeys + keys2 = {} + keys.each{|k, v| + optkey = keyonly.find{|kk,vv| kk.to_s == k.to_s} + if optkey + defkey, undefkey = optkey + if v + keys2[defkey.to_s] = None + elsif undefkey + keys2[undefkey.to_s] = None + else + # remove key + end + else + keys2[k.to_s] = v + end + } + keys2 + end + private :__conv_keyonly_opts + + def config_hash_kv(keys, enc_mode = nil, conf = nil) + hash_kv(__conv_keyonly_opts(keys), enc_mode, conf) + end + + ################################ + + def [](id) + cget(id) + end + + def []=(id, val) + configure(id, val) + val + end + + def __cget_core(slot) + orig_slot = slot + slot = slot.to_s + + if slot.length == 0 + fail ArgumentError, "Invalid option `#{orig_slot.inspect}'" + end + + alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + if ( method = _symbolkey2str(__val2ruby_optkeys())[slot] ) + optval = tk_call_without_enc(*(__cget_cmd << "-#{slot}")) + begin + return method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + return optval + end + end + + if ( method = _symbolkey2str(__methodcall_optkeys)[slot] ) + return self.__send__(method) + end + + case slot + when /^(#{__numval_optkeys.join('|')})$/ + begin + number(tk_call_without_enc(*(__cget_cmd << "-#{slot}"))) + rescue + nil + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + num_or_str(tk_call_without_enc(*(__cget_cmd << "-#{slot}"))) + + when /^(#{__boolval_optkeys.join('|')})$/ + begin + bool(tk_call_without_enc(*(__cget_cmd << "-#{slot}"))) + rescue + nil + end + + when /^(#{__listval_optkeys.join('|')})$/ + simplelist(tk_call_without_enc(*(__cget_cmd << "-#{slot}"))) + + when /^(#{__numlistval_optkeys.join('|')})$/ + conf = tk_call_without_enc(*(__cget_cmd << "-#{slot}")) + if conf =~ /^[0-9+-]/ + list(conf) + else + conf + end + + when /^(#{__strval_optkeys.join('|')})$/ + _fromUTF8(tk_call_without_enc(*(__cget_cmd << "-#{slot}"))) + + when /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/ + fontcode = $1 + fontkey = $2 + fnt = tk_tcl2ruby(tk_call_without_enc(*(__cget_cmd << "-#{fontkey}")), true) + unless fnt.kind_of?(TkFont) + fnt = fontobj(fontkey) + end + if fontcode == 'kanji' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/ + # obsolete; just for compatibility + fnt.kanji_font + else + fnt + end + + when /^(#{__tkvariable_optkeys.join('|')})$/ + v = tk_call_without_enc(*(__cget_cmd << "-#{slot}")) + (v.empty?)? nil: TkVarAccess.new(v) + + else + tk_tcl2ruby(tk_call_without_enc(*(__cget_cmd << "-#{slot}")), true) + end + end + private :__cget_core + + def cget(slot) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __cget_core(slot) + else + begin + __cget_core(slot) + rescue => e + if current_configinfo.has_key?(slot.to_s) + # error on known option + fail e + else + # unknown option + nil + end + end + end + end + def cget_strict(slot) + # never use TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __cget_core(slot) + end + + def __configure_core(slot, value=None) + if slot.kind_of? Hash + slot = _symbolkey2str(slot) + + __optkey_aliases.each{|alias_name, real_name| + alias_name = alias_name.to_s + if slot.has_key?(alias_name) + slot[real_name.to_s] = slot.delete(alias_name) + end + } + + __methodcall_optkeys.each{|key, method| + value = slot.delete(key.to_s) + self.__send__(method, value) if value + } + + __ruby2val_optkeys.each{|key, method| + key = key.to_s + slot[key] = method.call(slot[key]) if slot.has_key?(key) + } + + __keyonly_optkeys.each{|defkey, undefkey| + conf = slot.find{|kk, vv| kk == defkey.to_s} + if conf + k, v = conf + if v + slot[k] = None + else + slot[undefkey.to_s] = None if undefkey + slot.delete(k) + end + end + } + + if (slot.find{|k, v| k =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/}) + font_configure(slot) + elsif slot.size > 0 + tk_call(*(__config_cmd.concat(hash_kv(slot)))) + end + + else + orig_slot = slot + slot = slot.to_s + if slot.length == 0 + fail ArgumentError, "Invalid option `#{orig_slot.inspect}'" + end + + alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + if ( conf = __keyonly_optkeys.find{|k, v| k.to_s == slot} ) + defkey, undefkey = conf + if value + tk_call(*(__config_cmd << "-#{defkey}")) + elsif undefkey + tk_call(*(__config_cmd << "-#{undefkey}")) + end + elsif ( method = _symbolkey2str(__ruby2val_optkeys)[slot] ) + tk_call(*(__config_cmd << "-#{slot}" << method.call(value))) + elsif ( method = _symbolkey2str(__methodcall_optkeys)[slot] ) + self.__send__(method, value) + elsif (slot =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/) + if value == None + fontobj($2) + else + font_configure({slot=>value}) + end + else + tk_call(*(__config_cmd << "-#{slot}" << value)) + end + end + self + end + private :__configure_core + + def __check_available_configure_options(keys) + availables = self.current_configinfo.keys + + # add non-standard keys + availables |= __font_optkeys.map{|k| + [k.to_s, "latin#{k}", "ascii#{k}", "kanji#{k}"] + }.flatten + availables |= __methodcall_optkeys.keys.map{|k| k.to_s} + availables |= __keyonly_optkeys.keys.map{|k| k.to_s} + + keys = _symbolkey2str(keys) + keys.delete_if{|k, v| !(availables.include?(k))} + end + + def configure(slot, value=None) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __configure_core(slot, value) + else + if slot.kind_of?(Hash) + begin + __configure_core(slot) + rescue + slot = __check_available_configure_options(slot) + __configure_core(slot) unless slot.empty? + end + else + begin + __configure_core(slot, value) + rescue => e + if current_configinfo.has_key?(slot.to_s) + # error on known option + fail e + else + # unknown option + nil + end + end + end + end + self + end + + def configure_cmd(slot, value) + configure(slot, install_cmd(value)) + end + + def __configinfo_core(slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && + slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/) + fontkey = $2 + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true) + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + if ( ! __configinfo_struct[:alias] \ + || conf.size > __configinfo_struct[:alias] + 1 ) + fnt = conf[__configinfo_struct[:default_value]] + if TkFont.is_system_font?(fnt) + conf[__configinfo_struct[:default_value]] = TkNamedFont.new(fnt) + end + conf[__configinfo_struct[:current_value]] = fontobj(fontkey) + elsif ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 \ + && conf[__configinfo_struct[:alias]][0] == ?- ) + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + conf + else + if slot + slot = slot.to_s + + alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__val2ruby_optkeys().keys.join('|')})$/ + method = _symbolkey2str(__val2ruby_optkeys())[slot] + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd() << "-#{slot}")), false, true) + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + optval = conf[__configinfo_struct[:default_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:default_value]] = val + end + if ( conf[__configinfo_struct[:current_value]] ) + optval = conf[__configinfo_struct[:current_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:current_value]] = val + end + + when /^(#{__methodcall_optkeys.keys.join('|')})$/ + method = _symbolkey2str(__methodcall_optkeys)[slot] + return [slot, '', '', '', self.__send__(method)] + + when /^(#{__numval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]]) + begin + conf[__configinfo_struct[:default_value]] = + number(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + number(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]]) + conf[__configinfo_struct[:default_value]] = + num_or_str(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + num_or_str(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__boolval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]]) + begin + conf[__configinfo_struct[:default_value]] = + bool(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + bool(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__listval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]]) + conf[__configinfo_struct[:default_value]] = + simplelist(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + simplelist(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__numlistval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] \ + && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:default_value]] = + list(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] \ + && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:current_value]] = + list(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__strval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + when /^(#{__tkvariable_optkeys.join('|')})$/ + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]]) + v = conf[__configinfo_struct[:default_value]] + if v.empty? + conf[__configinfo_struct[:default_value]] = nil + else + conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__configinfo_struct[:current_value]] ) + v = conf[__configinfo_struct[:current_value]] + if v.empty? + conf[__configinfo_struct[:current_value]] = nil + else + conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v) + end + end + + else + # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true) + end + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + + if ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 \ + && conf[__configinfo_struct[:alias]][0] == ?- ) + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + + conf + + else + # ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist| + # conf = tk_split_simplelist(conflist) + ret = tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).collect{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + + optkey = conf[__configinfo_struct[:key]] + case optkey + when /^(#{__val2ruby_optkeys().keys.join('|')})$/ + method = _symbolkey2str(__val2ruby_optkeys())[optkey] + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + optval = conf[__configinfo_struct[:default_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:default_value]] = val + end + if ( conf[__configinfo_struct[:current_value]] ) + optval = conf[__configinfo_struct[:current_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:current_value]] = val + end + + when /^(#{__strval_optkeys.join('|')})$/ + # do nothing + + when /^(#{__numval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + number(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + number(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + num_or_str(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + num_or_str(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__boolval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + bool(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + bool(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__listval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + simplelist(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + simplelist(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__numlistval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] \ + && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:default_value]] = + list(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] \ + && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:current_value]] = + list(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__tkvariable_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + v = conf[__configinfo_struct[:default_value]] + if v.empty? + conf[__configinfo_struct[:default_value]] = nil + else + conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__configinfo_struct[:current_value]] ) + v = conf[__configinfo_struct[:current_value]] + if v.empty? + conf[__configinfo_struct[:current_value]] = nil + else + conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v) + end + end + + else + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + if conf[__configinfo_struct[:default_value]].index('{') + conf[__configinfo_struct[:default_value]] = + tk_split_list(conf[__configinfo_struct[:default_value]]) + else + conf[__configinfo_struct[:default_value]] = + tk_tcl2ruby(conf[__configinfo_struct[:default_value]]) + end + end + if conf[__configinfo_struct[:current_value]] + if conf[__configinfo_struct[:current_value]].index('{') + conf[__configinfo_struct[:current_value]] = + tk_split_list(conf[__configinfo_struct[:current_value]]) + else + conf[__configinfo_struct[:current_value]] = + tk_tcl2ruby(conf[__configinfo_struct[:current_value]]) + end + end + end + + if ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 \ + && conf[__configinfo_struct[:alias]][0] == ?- ) + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + + conf + } + + __font_optkeys.each{|optkey| + optkey = optkey.to_s + fontconf = ret.assoc(optkey) + if fontconf && fontconf.size > 2 + ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/} + fnt = fontconf[__configinfo_struct[:default_value]] + if TkFont.is_system_font?(fnt) + fontconf[__configinfo_struct[:default_value]] \ + = TkNamedFont.new(fnt) + end + fontconf[__configinfo_struct[:current_value]] = fontobj(optkey) + ret.push(fontconf) + end + } + + __methodcall_optkeys.each{|optkey, method| + ret << [optkey.to_s, '', '', '', self.__send__(method)] + } + + ret + end + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && + slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/) + fontkey = $2 + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true) + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + + if ( ! __configinfo_struct[:alias] \ + || conf.size > __configinfo_struct[:alias] + 1 ) + fnt = conf[__configinfo_struct[:default_value]] + if TkFont.is_system_font?(fnt) + conf[__configinfo_struct[:default_value]] = TkNamedFont.new(fnt) + end + conf[__configinfo_struct[:current_value]] = fontobj(fontkey) + { conf.shift => conf } + elsif ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 ) + if conf[__configinfo_struct[:alias]][0] == ?- + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + { conf[0] => conf[1] } + else + { conf.shift => conf } + end + else + if slot + slot = slot.to_s + + alias_name, real_name = __optkey_aliases.find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__val2ruby_optkeys().keys.join('|')})$/ + method = _symbolkey2str(__val2ruby_optkeys())[slot] + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + optval = conf[__configinfo_struct[:default_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:default_value]] = val + end + if ( conf[__configinfo_struct[:current_value]] ) + optval = conf[__configinfo_struct[:current_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:current_value]] = val + end + + when /^(#{__methodcall_optkeys.keys.join('|')})$/ + method = _symbolkey2str(__methodcall_optkeys)[slot] + return {slot => ['', '', '', self.__send__(method)]} + + when /^(#{__numval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + number(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + number(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + num_or_str(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + num_or_str(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__boolval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + bool(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + bool(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__listval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + simplelist(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + simplelist(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__numlistval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] \ + && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:default_value]] = + list(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] \ + && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:current_value]] = + list(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__tkvariable_optkeys.join('|')})$/ + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + v = conf[__configinfo_struct[:default_value]] + if v.empty? + conf[__configinfo_struct[:default_value]] = nil + else + conf[__configinfo_struct[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__configinfo_struct[:current_value]] ) + v = conf[__configinfo_struct[:current_value]] + if v.empty? + conf[__configinfo_struct[:current_value]] = nil + else + conf[__configinfo_struct[:current_value]] = TkVarAccess.new(v) + end + end + + when /^(#{__strval_optkeys.join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true) + else + # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) + conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true) + end + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + + if ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 ) + if conf[__configinfo_struct[:alias]][0] == ?- + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + { conf[0] => conf[1] } + else + { conf.shift => conf } + end + + else + ret = {} + # tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).each{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[__configinfo_struct[:key]] = + conf[__configinfo_struct[:key]][1..-1] + + optkey = conf[__configinfo_struct[:key]] + case optkey + when /^(#{__val2ruby_optkeys().keys.join('|')})$/ + method = _symbolkey2str(__val2ruby_optkeys())[optkey] + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + optval = conf[__configinfo_struct[:default_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:default_value]] = val + end + if ( conf[__configinfo_struct[:current_value]] ) + optval = conf[__configinfo_struct[:current_value]] + begin + val = method.call(optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{optval.inspect})") if $DEBUG + val = optval + end + conf[__configinfo_struct[:current_value]] = val + end + + when /^(#{__strval_optkeys.join('|')})$/ + # do nothing + + when /^(#{__numval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + number(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + number(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + num_or_str(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + num_or_str(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__boolval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + begin + conf[__configinfo_struct[:default_value]] = + bool(conf[__configinfo_struct[:default_value]]) + rescue + conf[__configinfo_struct[:default_value]] = nil + end + end + if ( conf[__configinfo_struct[:current_value]] ) + begin + conf[__configinfo_struct[:current_value]] = + bool(conf[__configinfo_struct[:current_value]]) + rescue + conf[__configinfo_struct[:current_value]] = nil + end + end + + when /^(#{__listval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + conf[__configinfo_struct[:default_value]] = + simplelist(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] ) + conf[__configinfo_struct[:current_value]] = + simplelist(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__numlistval_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] \ + && conf[__configinfo_struct[:default_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:default_value]] = + list(conf[__configinfo_struct[:default_value]]) + end + if ( conf[__configinfo_struct[:current_value]] \ + && conf[__configinfo_struct[:current_value]] =~ /^[0-9]/ ) + conf[__configinfo_struct[:current_value]] = + list(conf[__configinfo_struct[:current_value]]) + end + + when /^(#{__tkvariable_optkeys.join('|')})$/ + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + v = conf[__configinfo_struct[:default_value]] + if v.empty? + conf[__configinfo_struct[:default_value]] = nil + else + conf[__configinfo_struct[:default_value]] = TkVarAccess.new + end + end + if ( conf[__configinfo_struct[:current_value]] ) + v = conf[__configinfo_struct[:current_value]] + if v.empty? + conf[__configinfo_struct[:current_value]] = nil + else + conf[__configinfo_struct[:current_value]] = TkVarAccess.new + end + end + + else + if ( __configinfo_struct[:default_value] \ + && conf[__configinfo_struct[:default_value]] ) + if conf[__configinfo_struct[:default_value]].index('{') + conf[__configinfo_struct[:default_value]] = + tk_split_list(conf[__configinfo_struct[:default_value]]) + else + conf[__configinfo_struct[:default_value]] = + tk_tcl2ruby(conf[__configinfo_struct[:default_value]]) + end + end + if conf[__configinfo_struct[:current_value]] + if conf[__configinfo_struct[:current_value]].index('{') + conf[__configinfo_struct[:current_value]] = + tk_split_list(conf[__configinfo_struct[:current_value]]) + else + conf[__configinfo_struct[:current_value]] = + tk_tcl2ruby(conf[__configinfo_struct[:current_value]]) + end + end + end + + if ( __configinfo_struct[:alias] \ + && conf.size == __configinfo_struct[:alias] + 1 ) + if conf[__configinfo_struct[:alias]][0] == ?- + conf[__configinfo_struct[:alias]] = + conf[__configinfo_struct[:alias]][1..-1] + end + ret[conf[0]] = conf[1] + else + ret[conf.shift] = conf + end + } + + __font_optkeys.each{|optkey| + optkey = optkey.to_s + fontconf = ret[optkey] + if fontconf.kind_of?(Array) + ret.delete(optkey) + ret.delete('latin' << optkey) + ret.delete('ascii' << optkey) + ret.delete('kanji' << optkey) + fnt = fontconf[__configinfo_struct[:default_value]] + if TkFont.is_system_font?(fnt) + fontconf[__configinfo_struct[:default_value]] \ + = TkNamedFont.new(fnt) + end + fontconf[__configinfo_struct[:current_value]] = fontobj(optkey) + ret[optkey] = fontconf + end + } + + __methodcall_optkeys.each{|optkey, method| + ret[optkey.to_s] = ['', '', '', self.__send__(method)] + } + + ret + end + end + end + end + private :__configinfo_core + + def configinfo(slot = nil) + if slot && TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + begin + __configinfo_core(slot) + rescue + Array.new(__configinfo_struct.values.max).unshift(slot.to_s) + end + else + __configinfo_core(slot) + end + end + + def current_configinfo(slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + org_slot = slot + begin + conf = configinfo(slot) + if ( ! __configinfo_struct[:alias] \ + || conf.size > __configinfo_struct[:alias] + 1 ) + return {conf[0] => conf[-1]} + end + slot = conf[__configinfo_struct[:alias]] + end while(org_slot != slot) + fail RuntimeError, + "there is a configure alias loop about '#{org_slot}'" + else + ret = {} + configinfo().each{|conf| + if ( ! __configinfo_struct[:alias] \ + || conf.size > __configinfo_struct[:alias] + 1 ) + ret[conf[0]] = conf[-1] + end + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + configinfo(slot).each{|key, conf| + ret[key] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +end + +class TkObject definition is moved to TkUtil module +# def path +# @path +# end + + def epath + @path + end + + def to_eval + @path + end + + def tk_send(cmd, *rest) + tk_call(path, cmd, *rest) + end + def tk_send_without_enc(cmd, *rest) + tk_call_without_enc(path, cmd, *rest) + end + def tk_send_with_enc(cmd, *rest) + tk_call_with_enc(path, cmd, *rest) + end + # private :tk_send, :tk_send_without_enc, :tk_send_with_enc + + def tk_send_to_list(cmd, *rest) + tk_call_to_list(path, cmd, *rest) + end + def tk_send_to_list_without_enc(cmd, *rest) + tk_call_to_list_without_enc(path, cmd, *rest) + end + def tk_send_to_list_with_enc(cmd, *rest) + tk_call_to_list_with_enc(path, cmd, *rest) + end + def tk_send_to_simplelist(cmd, *rest) + tk_call_to_simplelist(path, cmd, *rest) + end + def tk_send_to_simplelist_without_enc(cmd, *rest) + tk_call_to_simplelist_without_enc(path, cmd, *rest) + end + def tk_send_to_simplelist_with_enc(cmd, *rest) + tk_call_to_simplelist_with_enc(path, cmd, *rest) + end + + def method_missing(id, *args) + name = id.id2name + case args.length + when 1 + if name[-1] == ?= + configure name[0..-2], args[0] + args[0] + else + configure name, args[0] + self + end + when 0 + begin + cget(name) + rescue + if self.kind_of?(TkWindow) + fail NameError, + "unknown option '#{id}' for #{self.inspect} (deleted widget?)" + else + super(id, *args) + end +# fail NameError, +# "undefined local variable or method `#{name}' for #{self.to_s}", +# error_at + end + else + super(id, *args) +# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at + end + end + +=begin + def [](id) + cget(id) + end + + def []=(id, val) + configure(id, val) + val + end +=end + + def event_generate(context, keys=nil) + if context.kind_of?(TkEvent::Event) + context.generate(self, ((keys)? keys: {})) + elsif keys + #tk_call('event', 'generate', path, + # "<#{tk_event_sequence(context)}>", *hash_kv(keys)) + tk_call_without_enc('event', 'generate', path, + "<#{tk_event_sequence(context)}>", + *hash_kv(keys, true)) + else + #tk_call('event', 'generate', path, "<#{tk_event_sequence(context)}>") + tk_call_without_enc('event', 'generate', path, + "<#{tk_event_sequence(context)}>") + end + end + + def tk_trace_variable(v) + #unless v.kind_of?(TkVariable) + # fail(ArgumentError, "type error (#{v.class}); must be TkVariable object") + #end + v + end + private :tk_trace_variable + + def destroy + #tk_call 'trace', 'vdelete', @tk_vn, 'w', @var_id if @var_id + end +end + + +class TkWindow If TkCommandNames[0] is a string (not a null string), + ## assume the string is a Tcl/Tk's create command of the widget class. + WidgetClassName = ''.freeze + # WidgetClassNames[WidgetClassName] = self + ## ==> If self is a widget class, entry to the WidgetClassNames table. + def self.to_eval + self::WidgetClassName + end + + def initialize(parent=nil, keys=nil) + if parent.kind_of? Hash + keys = _symbolkey2str(parent) + parent = keys.delete('parent') + widgetname = keys.delete('widgetname') + install_win(if parent then parent.path end, widgetname) + without_creating = keys.delete('without_creating') + # if without_creating && !widgetname + # fail ArgumentError, + # "if set 'without_creating' to true, need to define 'widgetname'" + # end + elsif keys + keys = _symbolkey2str(keys) + widgetname = keys.delete('widgetname') + install_win(if parent then parent.path end, widgetname) + without_creating = keys.delete('without_creating') + # if without_creating && !widgetname + # fail ArgumentError, + # "if set 'without_creating' to true, need to define 'widgetname'" + # end + else + install_win(if parent then parent.path end) + end + if self.method(:create_self).arity == 0 + p 'create_self has no arg' if $DEBUG + create_self unless without_creating + if keys + # tk_call @path, 'configure', *hash_kv(keys) + configure(keys) + end + else + p 'create_self has args' if $DEBUG + fontkeys = {} + methodkeys = {} + if keys + #['font', 'kanjifont', 'latinfont', 'asciifont'].each{|key| + # fontkeys[key] = keys.delete(key) if keys.key?(key) + #} + __font_optkeys.each{|key| + fkey = key.to_s + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "kanji#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "latin#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "ascii#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + } + + __optkey_aliases.each{|alias_name, real_name| + alias_name = alias_name.to_s + if keys.has_key?(alias_name) + keys[real_name.to_s] = keys.delete(alias_name) + end + } + + __methodcall_optkeys.each{|key| + key = key.to_s + methodkeys[key] = keys.delete(key) if keys.key?(key) + } + + __ruby2val_optkeys.each{|key, method| + key = key.to_s + keys[key] = method.call(keys[key]) if keys.has_key?(key) + } + end + if without_creating && keys + #configure(keys) + configure(__conv_keyonly_opts(keys)) + else + #create_self(keys) + create_self(__conv_keyonly_opts(keys)) + end + font_configure(fontkeys) unless fontkeys.empty? + configure(methodkeys) unless methodkeys.empty? + end + end + + def create_self(keys) + # may need to override + begin + cmd = self.class::TkCommandNames[0] + fail unless (cmd.kind_of?(String) && cmd.length > 0) + rescue + fail RuntimeError, "class #{self.class} may be an abstract class" + end + + if keys and keys != None + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call_without_enc(cmd, @path, *hash_kv(keys, true)) + else + begin + tk_call_without_enc(cmd, @path, *hash_kv(keys, true)) + rescue => e + tk_call_without_enc(cmd, @path) + keys = __check_available_configure_options(keys) + unless keys.empty? + begin + # try to configure + configure(keys) + rescue + # fail => includes options adaptable when creattion only? + begin + tk_call_without_enc('destroy', @path) + rescue + # cannot rescue options error + fail e + else + # re-create widget + tk_call_without_enc(cmd, @path, *hash_kv(keys, true)) + end + end + end + end + end + else + tk_call_without_enc(cmd, @path) + end + end + private :create_self + + def inspect + if @@WIDGET_INSPECT_FULL + super + else + str = super + str[0..(str.index(' '))] << '@path=' << @path.inspect << '>' + end + end + + def exist? + TkWinfo.exist?(self) + end + + def bind_class + @db_class || self.class() + end + + def database_classname + TkWinfo.classname(self) + end + def database_class + name = database_classname() + if WidgetClassNames[name] + WidgetClassNames[name] + else + TkDatabaseClass.new(name) + end + end + def self.database_classname + self::WidgetClassName + end + def self.database_class + WidgetClassNames[self::WidgetClassName] + end + + def pack(keys = nil) + #tk_call_without_enc('pack', epath, *hash_kv(keys, true)) + if keys + TkPack.configure(self, keys) + else + TkPack.configure(self) + end + self + end + + def pack_in(target, keys = nil) + if keys + keys = keys.dup + keys['in'] = target + else + keys = {'in'=>target} + end + #tk_call 'pack', epath, *hash_kv(keys) + TkPack.configure(self, keys) + self + end + + def pack_forget + #tk_call_without_enc('pack', 'forget', epath) + TkPack.forget(self) + self + end + alias unpack pack_forget + + def pack_config(slot, value=None) + #if slot.kind_of? Hash + # tk_call 'pack', 'configure', epath, *hash_kv(slot) + #else + # tk_call 'pack', 'configure', epath, "-#{slot}", value + #end + if slot.kind_of? Hash + TkPack.configure(self, slot) + else + TkPack.configure(self, slot=>value) + end + end + alias pack_configure pack_config + + def pack_info() + #ilist = list(tk_call('pack', 'info', epath)) + #info = {} + #while key = ilist.shift + # info[key[1..-1]] = ilist.shift + #end + #return info + TkPack.info(self) + end + + def pack_propagate(mode=None) + #if mode == None + # bool(tk_call('pack', 'propagate', epath)) + #else + # tk_call('pack', 'propagate', epath, mode) + # self + #end + if mode == None + TkPack.propagate(self) + else + TkPack.propagate(self, mode) + self + end + end + + def pack_slaves() + #list(tk_call('pack', 'slaves', epath)) + TkPack.slaves(self) + end + + def grid(keys = nil) + #tk_call 'grid', epath, *hash_kv(keys) + if keys + TkGrid.configure(self, keys) + else + TkGrid.configure(self) + end + self + end + + def grid_in(target, keys = nil) + if keys + keys = keys.dup + keys['in'] = target + else + keys = {'in'=>target} + end + #tk_call 'grid', epath, *hash_kv(keys) + TkGrid.configure(self, keys) + self + end + + def grid_anchor(anchor=None) + if anchor == None + TkGrid.anchor(self) + else + TkGrid.anchor(self, anchor) + self + end + end + + def grid_forget + #tk_call('grid', 'forget', epath) + TkGrid.forget(self) + self + end + alias ungrid grid_forget + + def grid_bbox(*args) + #list(tk_call('grid', 'bbox', epath, *args)) + TkGrid.bbox(self, *args) + end + + def grid_config(slot, value=None) + #if slot.kind_of? Hash + # tk_call 'grid', 'configure', epath, *hash_kv(slot) + #else + # tk_call 'grid', 'configure', epath, "-#{slot}", value + #end + if slot.kind_of? Hash + TkGrid.configure(self, slot) + else + TkGrid.configure(self, slot=>value) + end + end + alias grid_configure grid_config + + def grid_columnconfig(index, keys) + #tk_call('grid', 'columnconfigure', epath, index, *hash_kv(keys)) + TkGrid.columnconfigure(self, index, keys) + end + alias grid_columnconfigure grid_columnconfig + alias grid_column grid_columnconfig + + def grid_rowconfig(index, keys) + #tk_call('grid', 'rowconfigure', epath, index, *hash_kv(keys)) + TkGrid.rowconfigure(self, index, keys) + end + alias grid_rowconfigure grid_rowconfig + alias grid_row grid_rowconfig + + def grid_columnconfiginfo(index, slot=nil) + #if slot + # tk_call('grid', 'columnconfigure', epath, index, "-#{slot}").to_i + #else + # ilist = list(tk_call('grid', 'columnconfigure', epath, index)) + # info = {} + # while key = ilist.shift + # info[key[1..-1]] = ilist.shift + # end + # info + #end + TkGrid.columnconfiginfo(self, index, slot) + end + + def grid_rowconfiginfo(index, slot=nil) + #if slot + # tk_call('grid', 'rowconfigure', epath, index, "-#{slot}").to_i + #else + # ilist = list(tk_call('grid', 'rowconfigure', epath, index)) + # info = {} + # while key = ilist.shift + # info[key[1..-1]] = ilist.shift + # end + # info + #end + TkGrid.rowconfiginfo(self, index, slot) + end + + def grid_info() + #list(tk_call('grid', 'info', epath)) + TkGrid.info(self) + end + + def grid_location(x, y) + #list(tk_call('grid', 'location', epath, x, y)) + TkGrid.location(self, x, y) + end + + def grid_propagate(mode=None) + #if mode == None + # bool(tk_call('grid', 'propagate', epath)) + #else + # tk_call('grid', 'propagate', epath, mode) + # self + #end + if mode == None + TkGrid.propagate(self) + else + TkGrid.propagate(self, mode) + self + end + end + + def grid_remove() + #tk_call 'grid', 'remove', epath + TkGrid.remove(self) + self + end + + def grid_size() + #list(tk_call('grid', 'size', epath)) + TkGrid.size(self) + end + + def grid_slaves(args) + #list(tk_call('grid', 'slaves', epath, *hash_kv(args))) + TkGrid.slaves(self, args) + end + + def place(keys) + #tk_call 'place', epath, *hash_kv(keys) + TkPlace.configure(self, keys) + self + end + + def place_in(target, keys = nil) + if keys + keys = keys.dup + keys['in'] = target + else + keys = {'in'=>target} + end + #tk_call 'place', epath, *hash_kv(keys) + TkPlace.configure(self, keys) + self + end + + def place_forget + #tk_call 'place', 'forget', epath + TkPlace.forget(self) + self + end + alias unplace place_forget + + def place_config(slot, value=None) + #if slot.kind_of? Hash + # tk_call 'place', 'configure', epath, *hash_kv(slot) + #else + # tk_call 'place', 'configure', epath, "-#{slot}", value + #end + TkPlace.configure(self, slot, value) + end + alias place_configure place_config + + def place_configinfo(slot = nil) + # for >= Tk8.4a2 ? + #if slot + # conf = tk_split_list(tk_call('place', 'configure', epath, "-#{slot}") ) + # conf[0] = conf[0][1..-1] + # conf + #else + # tk_split_simplelist(tk_call('place', + # 'configure', epath)).collect{|conflist| + # conf = tk_split_simplelist(conflist) + # conf[0] = conf[0][1..-1] + # conf + # } + #end + TkPlace.configinfo(self, slot) + end + + def place_info() + #ilist = list(tk_call('place', 'info', epath)) + #info = {} + #while key = ilist.shift + # info[key[1..-1]] = ilist.shift + #end + #return info + TkPlace.info(self) + end + + def place_slaves() + #list(tk_call('place', 'slaves', epath)) + TkPlace.slaves(self) + end + + def set_focus(force=false) + if force + tk_call_without_enc('focus', '-force', path) + else + tk_call_without_enc('focus', path) + end + self + end + alias focus set_focus + + def grab(opt = nil) + unless opt + tk_call_without_enc('grab', 'set', path) + return self + end + + case opt + when 'set', :set + tk_call_without_enc('grab', 'set', path) + return self + when 'global', :global + #return(tk_call('grab', 'set', '-global', path)) + tk_call_without_enc('grab', 'set', '-global', path) + return self + when 'release', :release + #return tk_call('grab', 'release', path) + tk_call_without_enc('grab', 'release', path) + return self + when 'current', :current + return window(tk_call_without_enc('grab', 'current', path)) + when 'status', :status + return tk_call_without_enc('grab', 'status', path) + else + return tk_call_without_enc('grab', opt, path) + end + end + + def grab_current + grab('current') + end + alias current_grab grab_current + def grab_release + grab('release') + end + alias release_grab grab_release + def grab_set + grab('set') + end + alias set_grab grab_set + def grab_set_global + grab('global') + end + alias set_global_grab grab_set_global + def grab_status + grab('status') + end + + def lower(below=None) + # below = below.epath if below.kind_of?(TkObject) + below = _epath(below) + tk_call 'lower', epath, below + self + end + alias lower_window lower + def raise(above=None) + #above = above.epath if above.kind_of?(TkObject) + above = _epath(above) + tk_call 'raise', epath, above + self + end + alias raise_window raise + + def command(cmd=nil, &b) + if cmd + configure_cmd('command', cmd) + elsif b + configure_cmd('command', Proc.new(&b)) + else + cget('command') + end + end + + def colormodel(model=None) + tk_call('tk', 'colormodel', path, model) + self + end + + def caret(keys=nil) + TkXIM.caret(path, keys) + end + + def destroy + super + children = [] + rexp = /^#{self.path}\.[^.]+$/ + TkCore::INTERP.tk_windows.each{|path, obj| + children << [path, obj] if path =~ rexp + } + if defined?(@cmdtbl) + for id in @cmdtbl + uninstall_cmd id + end + end + + children.each{|path, obj| + obj.instance_eval{ + if defined?(@cmdtbl) + for id in @cmdtbl + uninstall_cmd id + end + end + } + TkCore::INTERP.tk_windows.delete(path) + } + + begin + tk_call_without_enc('destroy', epath) + rescue + end + uninstall_win + end + + def wait_visibility(on_thread = true) + if $SAFE >= 4 + fail SecurityError, "can't wait visibility at $SAFE >= 4" + end + on_thread &= (Thread.list.size != 1) + if on_thread + INTERP._thread_tkwait('visibility', path) + else + INTERP._invoke('tkwait', 'visibility', path) + end + end + def eventloop_wait_visibility + wait_visibility(false) + end + def thread_wait_visibility + wait_visibility(true) + end + alias wait wait_visibility + alias tkwait wait_visibility + alias eventloop_wait eventloop_wait_visibility + alias eventloop_tkwait eventloop_wait_visibility + alias eventloop_tkwait_visibility eventloop_wait_visibility + alias thread_wait thread_wait_visibility + alias thread_tkwait thread_wait_visibility + alias thread_tkwait_visibility thread_wait_visibility + + def wait_destroy(on_thread = true) + if $SAFE >= 4 + fail SecurityError, "can't wait destroy at $SAFE >= 4" + end + on_thread &= (Thread.list.size != 1) + if on_thread + INTERP._thread_tkwait('window', epath) + else + INTERP._invoke('tkwait', 'window', epath) + end + end + alias wait_window wait_destroy + def eventloop_wait_destroy + wait_destroy(false) + end + alias eventloop_wait_window eventloop_wait_destroy + def thread_wait_destroy + wait_destroy(true) + end + alias thread_wait_window thread_wait_destroy + + alias tkwait_destroy wait_destroy + alias tkwait_window wait_destroy + + alias eventloop_tkwait_destroy eventloop_wait_destroy + alias eventloop_tkwait_window eventloop_wait_destroy + + alias thread_tkwait_destroy thread_wait_destroy + alias thread_tkwait_window thread_wait_destroy + + def bindtags(taglist=nil) + if taglist + fail ArgumentError, "taglist must be Array" unless taglist.kind_of? Array + tk_call('bindtags', path, taglist) + taglist + else + list(tk_call('bindtags', path)).collect{|tag| + if tag.kind_of?(String) + if cls = WidgetClassNames[tag] + cls + elsif btag = TkBindTag.id2obj(tag) + btag + else + tag + end + else + tag + end + } + end + end + + def bindtags=(taglist) + bindtags(taglist) + taglist + end + + def bindtags_shift + taglist = bindtags + tag = taglist.shift + bindtags(taglist) + tag + end + + def bindtags_unshift(tag) + bindtags(bindtags().unshift(tag)) + end +end +TkWidget = TkWindow + +# freeze core modules +#TclTkLib.freeze +#TclTkIp.freeze +#TkUtil.freeze +#TkKernel.freeze +#TkComm.freeze +#TkComm::Event.freeze +#TkCore.freeze +#Tk.freeze + +module Tk + RELEASE_DATE = '2008-12-21'.freeze + + autoload :AUTO_PATH, 'tk/variable' + autoload :TCL_PACKAGE_PATH, 'tk/variable' + autoload :PACKAGE_PATH, 'tk/variable' + autoload :TCL_LIBRARY_PATH, 'tk/variable' + autoload :LIBRARY_PATH, 'tk/variable' + autoload :TCL_PRECISION, 'tk/variable' +end + +# call setup script for Tk extension libraries (base configuration) +begin + require 'tkextlib/version.rb' + require 'tkextlib/setup.rb' +rescue LoadError + # ignore +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/after.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/after.rb new file mode 100644 index 0000000..82197cb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/after.rb @@ -0,0 +1,6 @@ +# +# tk/after.rb : methods for Tcl/Tk after command +# +# $Id: after.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# +require 'tk/timer' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/autoload.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/autoload.rb new file mode 100644 index 0000000..79b6e01 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/autoload.rb @@ -0,0 +1,414 @@ +# +# autoload +# +############################################ +# geometry manager +module Tk + autoload :Grid, 'tk/grid' + def Grid(*args); TkGrid.configure(*args); end + + autoload :Pack, 'tk/pack' + def Pack(*args); TkPack.configure(*args); end + + autoload :Place, 'tk/place' + def Place(*args); TkPlace.configure(*args); end +end + +autoload :TkGrid, 'tk/grid' +def TkGrid(*args); TkGrid.configure(*args); end + +autoload :TkPack, 'tk/pack' +def TkPack(*args); TkPack.configure(*args); end + +autoload :TkPlace, 'tk/place' +def TkPlace(*args); TkPlace.configure(*args); end + + +############################################ +# classes on Tk module +module Tk + autoload :Button, 'tk/button' + + autoload :Canvas, 'tk/canvas' + + autoload :CheckButton, 'tk/checkbutton' + autoload :Checkbutton, 'tk/checkbutton' + + autoload :Entry, 'tk/entry' + + autoload :Frame, 'tk/frame' + + autoload :Label, 'tk/label' + + autoload :LabelFrame, 'tk/labelframe' + autoload :Labelframe, 'tk/labelframe' + + autoload :Listbox, 'tk/listbox' + + autoload :Menu, 'tk/menu' + autoload :MenuClone, 'tk/menu' + autoload :CloneMenu, 'tk/menu' + autoload :SystemMenu, 'tk/menu' + autoload :SysMenu_Help, 'tk/menu' + autoload :SysMenu_System, 'tk/menu' + autoload :SysMenu_Apple, 'tk/menu' + autoload :Menubutton, 'tk/menu' + autoload :MenuButton, 'tk/menu' + autoload :OptionMenubutton, 'tk/menu' + autoload :OptionMenBbutton, 'tk/menu' + + autoload :Message, 'tk/message' + + autoload :PanedWindow, 'tk/panedwindow' + autoload :Panedwindow, 'tk/panedwindow' + + autoload :RadioButton, 'tk/radiobutton' + autoload :Radiobutton, 'tk/radiobutton' + + autoload :Root, 'tk/root' + + autoload :Scale, 'tk/scale' + + autoload :Scrollbar, 'tk/scrollbar' + autoload :XScrollbar, 'tk/scrollbar' + autoload :YScrollbar, 'tk/scrollbar' + + autoload :Spinbox, 'tk/spinbox' + + autoload :Text, 'tk/text' + + autoload :Toplevel, 'tk/toplevel' +end + + +############################################ +# sub-module of Tk +module Tk + autoload :Clock, 'tk/clock' + + autoload :OptionObj, 'tk/optionobj' + + autoload :X_Scrollable, 'tk/scrollable' + autoload :Y_Scrollable, 'tk/scrollable' + autoload :Scrollable, 'tk/scrollable' + + autoload :Wm, 'tk/wm' + autoload :Wm_for_General, 'tk/wm' + + autoload :MacResource, 'tk/macpkg' + + autoload :WinDDE, 'tk/winpkg' + autoload :WinRegistry, 'tk/winpkg' + + autoload :ValidateConfigure, 'tk/validation' + autoload :ItemValidateConfigure, 'tk/validation' + + autoload :EncodedString, 'tk/encodedstr' + def Tk.EncodedString(str, enc = nil); Tk::EncodedString.new(str, enc); end + + autoload :BinaryString, 'tk/encodedstr' + def Tk.BinaryString(str); Tk::BinaryString.new(str); end + + autoload :UTF8_String, 'tk/encodedstr' + def Tk.UTF8_String(str); Tk::UTF8_String.new(str); end + +end + + +############################################ +# toplevel classes/modules (fixed) +autoload :TkBgError, 'tk/bgerror' + +autoload :TkBindTag, 'tk/bindtag' +autoload :TkBindTagAll, 'tk/bindtag' +autoload :TkDatabaseClass, 'tk/bindtag' + +autoload :TkConsole, 'tk/console' + +autoload :TkcItem, 'tk/canvas' +autoload :TkcArc, 'tk/canvas' +autoload :TkcBitmap, 'tk/canvas' +autoload :TkcImage, 'tk/canvas' +autoload :TkcLine, 'tk/canvas' +autoload :TkcOval, 'tk/canvas' +autoload :TkcPolygon, 'tk/canvas' +autoload :TkcRectangle, 'tk/canvas' +autoload :TkcText, 'tk/canvas' +autoload :TkcWindow, 'tk/canvas' + +autoload :TkcTagAccess, 'tk/canvastag' +autoload :TkcTag, 'tk/canvastag' +autoload :TkcTagString, 'tk/canvastag' +autoload :TkcNamedTag, 'tk/canvastag' +autoload :TkcTagAll, 'tk/canvastag' +autoload :TkcTagCurrent, 'tk/canvastag' +autoload :TkcTagGroup, 'tk/canvastag' + +autoload :TkClipboard, 'tk/clipboard' + +autoload :TkComposite, 'tk/composite' + +autoload :TkConsole, 'tk/console' + +autoload :TkDialog, 'tk/dialog' +autoload :TkDialog2, 'tk/dialog' +autoload :TkDialogObj, 'tk/dialog' +autoload :TkWarning, 'tk/dialog' +autoload :TkWarning2, 'tk/dialog' +autoload :TkWarningObj, 'tk/dialog' + +autoload :TkEvent, 'tk/event' + +autoload :TkFont, 'tk/font' +autoload :TkNamedFont, 'tk/font' + +autoload :TkImage, 'tk/image' +autoload :TkBitmapImage, 'tk/image' +autoload :TkPhotoImage, 'tk/image' + +autoload :TkItemConfigMethod, 'tk/itemconfig' + +autoload :TkTreatItemFont, 'tk/itemfont' + +autoload :TkKinput, 'tk/kinput' + +autoload :TkSystemMenu, 'tk/menu' + +autoload :TkMenubar, 'tk/menubar' + +autoload :TkMenuSpec, 'tk/menuspec' + +autoload :TkManageFocus, 'tk/mngfocus' + +autoload :TkMsgCatalog, 'tk/msgcat' +autoload :TkMsgCat, 'tk/msgcat' + +autoload :TkNamespace, 'tk/namespace' + +autoload :TkOptionDB, 'tk/optiondb' +autoload :TkOption, 'tk/optiondb' +autoload :TkResourceDB, 'tk/optiondb' + +autoload :TkPackage, 'tk/package' + +autoload :TkPalette, 'tk/palette' + +autoload :TkRoot, 'tk/root' + +autoload :TkScrollbox, 'tk/scrollbox' + +autoload :TkSelection, 'tk/selection' + +autoload :TkTreatTagFont, 'tk/tagfont' + +autoload :TkTextImage, 'tk/textimage' +autoload :TktImage, 'tk/textimage' + +autoload :TkTextMark, 'tk/textmark' +autoload :TkTextNamedMark, 'tk/textmark' +autoload :TkTextMarkInsert, 'tk/textmark' +autoload :TkTextMarkCurrent, 'tk/textmark' +autoload :TkTextMarkAnchor, 'tk/textmark' +autoload :TktMark, 'tk/textmark' +autoload :TktNamedMark, 'tk/textmark' +autoload :TktMarkInsert, 'tk/textmark' +autoload :TktMarkCurrent, 'tk/textmark' +autoload :TktMarkAnchor, 'tk/textmark' + +autoload :TkTextTag, 'tk/texttag' +autoload :TkTextNamedTag, 'tk/texttag' +autoload :TkTextTagSel, 'tk/texttag' +autoload :TktTag, 'tk/texttag' +autoload :TktNamedTag, 'tk/texttag' +autoload :TktTagSel, 'tk/texttag' + +autoload :TkTextWindow, 'tk/textwindow' +autoload :TktWindow, 'tk/textwindow' + +autoload :TkAfter, 'tk/timer' +autoload :TkTimer, 'tk/timer' +autoload :TkRTTimer, 'tk/timer' + +autoload :TkTextWin, 'tk/txtwin_abst' + +autoload :TkValidation, 'tk/validation' +autoload :TkValidateCommand, 'tk/validation' + +autoload :TkVariable, 'tk/variable' +autoload :TkVarAccess, 'tk/variable' + +autoload :TkVirtualEvent, 'tk/virtevent' +autoload :TkNamedVirtualEvent,'tk/virtevent' + +autoload :TkWinfo, 'tk/winfo' + +autoload :TkXIM, 'tk/xim' + + +############################################ +# toplevel classes/modules (switchable) +module Tk + @TOPLEVEL_ALIAS_TABLE = {} + @TOPLEVEL_ALIAS_TABLE[:Tk] = { + :TkButton => 'tk/button', + + :TkCanvas => 'tk/canvas', + + :TkCheckButton => 'tk/checkbutton', + :TkCheckbutton => 'tk/checkbutton', + + # :TkDialog => 'tk/dialog', + # :TkDialog2 => 'tk/dialog', + # :TkDialogObj => 'tk/dialog', + # :TkWarning => 'tk/dialog', + # :TkWarning2 => 'tk/dialog', + # :TkWarningObj => 'tk/dialog', + + :TkEntry => 'tk/entry', + + :TkFrame => 'tk/frame', + + :TkLabel => 'tk/label', + + :TkLabelFrame => 'tk/labelframe', + :TkLabelframe => 'tk/labelframe', + + :TkListbox => 'tk/listbox', + + :TkMacResource => 'tk/macpkg', + + :TkMenu => 'tk/menu', + :TkMenuClone => 'tk/menu', + :TkCloneMenu => 'tk/menu', + # :TkSystemMenu => 'tk/menu', + :TkSysMenu_Help => 'tk/menu', + :TkSysMenu_System => 'tk/menu', + :TkSysMenu_Apple => 'tk/menu', + :TkMenubutton => 'tk/menu', + :TkMenuButton => 'tk/menu', + :TkOptionMenubutton => 'tk/menu', + :TkOptionMenuButton => 'tk/menu', + + :TkMessage => 'tk/message', + + :TkPanedWindow => 'tk/panedwindow', + :TkPanedwindow => 'tk/panedwindow', + + :TkRadioButton => 'tk/radiobutton', + :TkRadiobutton => 'tk/radiobutton', + + # :TkRoot => 'tk/root', + + :TkScale => 'tk/scale', + + :TkScrollbar => 'tk/scrollbar', + :TkXScrollbar => 'tk/scrollbar', + :TkYScrollbar => 'tk/scrollbar', + + :TkSpinbox => 'tk/spinbox', + + :TkText => 'tk/text', + + :TkToplevel => 'tk/toplevel', + + :TkWinDDE => 'tk/winpkg', + :TkWinRegistry => 'tk/winpkg', + } + + @TOPLEVEL_ALIAS_OWNER = {} + + @TOPLEVEL_ALIAS_SETUP_PROC = {} + + @current_default_widget_set = nil +end + + +############################################ +# methods to control default widget set +############################################ + +class << Tk + def default_widget_set + @current_default_widget_set + end + + def default_widget_set=(target) + target = target.to_sym + return target if target == @current_default_widget_set + + if (cmd = @TOPLEVEL_ALIAS_SETUP_PROC[target]) + cmd.call(target) + end + + _replace_toplevel_aliases(target) + end + + def __set_toplevel_aliases__(target, obj, *symbols) + @TOPLEVEL_ALIAS_TABLE[target = target.to_sym] ||= {} + symbols.each{|sym| + @TOPLEVEL_ALIAS_TABLE[target][sym = sym.to_sym] = obj + # if @current_default_widget_set == target + if @TOPLEVEL_ALIAS_OWNER[sym] == target + Object.class_eval{remove_const sym} if Object.const_defined?(sym) + Object.const_set(sym, obj) + end + } + end + + ################################### + private + def _replace_toplevel_aliases(target) + # check already autoloaded + if (table = @TOPLEVEL_ALIAS_TABLE[current = @current_default_widget_set]) + table.each{|sym, file| + if !Object.autoload?(sym) && Object.const_defined?(sym) && + @TOPLEVEL_ALIAS_TABLE[current][sym].kind_of?(String) + # autoload -> class + @TOPLEVEL_ALIAS_TABLE[current][sym] = Object.const_get(sym) + end + } + end + + # setup autoloads + @TOPLEVEL_ALIAS_TABLE[target].each{|sym, file| + Object.class_eval{remove_const sym} if Object.const_defined?(sym) + if file.kind_of?(String) + # file => autoload target file + Object.autoload(sym, file) + else + # file => loaded class object + Object.const_set(sym, file) + end + @TOPLEVEL_ALIAS_OWNER[sym] = target + } + + # update current alias + @current_default_widget_set = target + end +end + +############################################ +# setup default widget set => :Tk +Tk.default_widget_set = :Tk + + +############################################ +# depend on the version of Tcl/Tk +# major, minor, type, patchlevel = TclTkLib.get_version + +############################################ +# Ttk (Tile) support +=begin +if major > 8 || + (major == 8 && minor > 5) || + (major == 8 && minor == 5 && type >= TclTkLib::RELEASE_TYPE::BETA) + # Tcl/Tk 8.5 beta or later + Object.autoload :Ttk, 'tkextlib/tile' + Tk.autoload :Tile, 'tkextlib/tile' + + require 'tk/ttk_selector' +end +=end +Object.autoload :Ttk, 'tkextlib/tile' +Tk.autoload :Tile, 'tkextlib/tile' +require 'tk/ttk_selector' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bgerror.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bgerror.rb new file mode 100644 index 0000000..c82a8e0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bgerror.rb @@ -0,0 +1,29 @@ +# +# tkbgerror -- bgerror ( tkerror ) module +# 1998/07/16 by Hidetoshi Nagai +# +require 'tk' + +module TkBgError + extend Tk + + TkCommandNames = ['bgerror'.freeze].freeze + + def bgerror(message) + tk_call('bgerror', message) + end + alias tkerror bgerror + alias show bgerror + module_function :bgerror, :tkerror, :show + + def set_handler(hdlr = Proc.new) #==> handler :: proc{|msg| ...body... } + tk_call('proc', 'bgerror', 'msg', install_cmd(hdlr) + ' $msg') + end + def set_default + begin + tk_call('rename', 'bgerror', '') + rescue RuntimeError + end + end + module_function :set_handler, :set_default +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bindtag.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bindtag.rb new file mode 100644 index 0000000..88c8367 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/bindtag.rb @@ -0,0 +1,138 @@ +# +# tk/bind.rb : control event binding +# +require 'tk' + +class TkBindTag + include TkBindCore + + #BTagID_TBL = {} + BTagID_TBL = TkCore::INTERP.create_table + + (Tk_BINDTAG_ID = ["btag".freeze, "00000".taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + BTagID_TBL.mutex.synchronize{ BTagID_TBL.clear } + } + + def TkBindTag.id2obj(id) + BTagID_TBL.mutex.synchronize{ + (BTagID_TBL[id])? BTagID_TBL[id]: id + } + end + +=begin + def TkBindTag.new_by_name(name, *args, &b) + BTagID_TBL.mutex.synchronize{ + return BTagID_TBL[name] if BTagID_TBL[name] + } + + self.new.instance_eval{ + BTagID_TBL.mutex.synchronize{ + BTagID_TBL.delete @id + @id = name + BTagID_TBL[@id] = self + } + bind(*args, &b) if args != [] + self + } + end +=end + def TkBindTag.new_by_name(name, *args, &b) + obj = nil + BTagID_TBL.mutex.synchronize{ + if BTagID_TBL[name] + obj = BTagID_TBL[name] + else + (obj = BTagID_TBL[name] = self.allocate).instance_eval{ + @id = name + } + end + } + bind(*args, &b) if obj && args != [] + obj + end + + def initialize(*args, &b) + Tk_BINDTAG_ID.mutex.synchronize{ + # @id = Tk_BINDTAG_ID.join('') + @id = Tk_BINDTAG_ID.join(TkCore::INTERP._ip_id_) + Tk_BINDTAG_ID[1].succ! + } + BTagID_TBL.mutex.synchronize{ + BTagID_TBL[@id] = self + } + bind(*args, &b) if args != [] + end + + ALL = self.new_by_name('all') + + def name + @id + end + + def to_eval + @id + end + + def inspect + #Kernel.format "#", @id + '#' + end +end + + +class TkBindTagAll", @id + '#' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/button.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/button.rb new file mode 100644 index 0000000..770a578 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/button.rb @@ -0,0 +1,30 @@ +# +# tk/button.rb : treat button widget +# +require 'tk' +require 'tk/label' + +class Tk::Button +# +require 'tk' +require 'tk/canvastag' +require 'tk/itemconfig' +require 'tk/scrollable' + +module TkCanvasItemConfig + include TkItemConfigMethod + + def __item_strval_optkeys(id) + # maybe need to override + super(id) + [ + 'fill', 'activefill', 'disabledfill', + 'outline', 'activeoutline', 'disabledoutline' + ] + end + private :__item_strval_optkeys + + def __item_methodcall_optkeys(id) + {'coords'=>'coords'} + end + private :__item_methodcall_optkeys + + def __item_val2ruby_optkeys(id) # { key=>proc, ... } + super(id).update('window'=>proc{|i, v| window(v)}) + end + private :__item_val2ruby_optkeys + + def __item_pathname(tagOrId) + if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag) + self.path + ';' + tagOrId.id.to_s + else + self.path + ';' + tagOrId.to_s + end + end + private :__item_pathname +end + +class Tk::Canvasvalue}) + end + else + _fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), + "-#{key}", _get_eval_enc_str(value))) + end + end + self + end +# def itemconfigure(tagOrId, key, value=None) +# if key.kind_of? Hash +# tk_send 'itemconfigure', tagid(tagOrId), *hash_kv(key) +# else +# tk_send 'itemconfigure', tagid(tagOrId), "-#{key}", value +# end +# end +# def itemconfigure(tagOrId, keys) +# tk_send 'itemconfigure', tagid(tagOrId), *hash_kv(keys) +# end + + def itemconfiginfo(tagOrId, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'coords' + return ['coords', '', '', '', self.coords(tagOrId)] + when 'dash', 'activedash', 'disableddash' + conf = tk_split_simplelist(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}")) + if conf[3] && conf[3] =~ /^[0-9]/ + conf[3] = list(conf[3]) + end + if conf[4] && conf[4] =~ /^[0-9]/ + conf[4] = list(conf[4]) + end + when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),"-#{key}"))) + conf[4] = tagfont_configinfo(tagid(tagOrId), conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}"))) + end + conf[0] = conf[0][1..-1] + conf + else + ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId)))).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' + when 'dash', 'activedash', 'disableddash' + if conf[3] && conf[3] =~ /^[0-9]/ + conf[3] = list(conf[3]) + end + if conf[4] && conf[4] =~ /^[0-9]/ + conf[4] = list(conf[4]) + end + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + + fontconf = ret.assoc('font') + if fontconf + ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'} + fontconf[4] = tagfont_configinfo(tagid(tagOrId), fontconf[4]) + ret.push(fontconf) + end + + ret << ['coords', '', '', '', self.coords(tagOrId)] + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'coords' + {'coords' => ['', '', '', self.coords(tagOrId)]} + when 'dash', 'activedash', 'disableddash' + conf = tk_split_simplelist(tk_send_without_enc('itemconfigure', + tagid(tagOrId), + "-#{key}")) + if conf[3] && conf[3] =~ /^[0-9]/ + conf[3] = list(conf[3]) + end + if conf[4] && conf[4] =~ /^[0-9]/ + conf[4] = list(conf[4]) + end + when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId),"-#{key}"))) + conf[4] = tagfont_configinfo(tagid(tagOrId), conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId), "-#{key}"))) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', tagid(tagOrId)))).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' + when 'dash', 'activedash', 'disableddash' + if conf[2] && conf[2] =~ /^[0-9]/ + conf[2] = list(conf[2]) + end + if conf[3] && conf[3] =~ /^[0-9]/ + conf[3] = list(conf[3]) + end + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + + fontconf = ret['font'] + if fontconf + ret.delete('font') + ret.delete('kanjifont') + fontconf[3] = tagfont_configinfo(tagid(tagOrId), fontconf[3]) + ret['font'] = fontconf + end + + ret['coords'] = ['', '', '', self.coords(tagOrId)] + + ret + end + end + end + + def current_itemconfiginfo(tagOrId, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = itemconfiginfo(tagOrId, key) + {conf[0] => conf[4]} + else + ret = {} + itemconfiginfo(tagOrId).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + itemconfiginfo(tagOrId, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +=end + + def lower(tag, below=nil) + if below + tk_send_without_enc('lower', tagid(tag), tagid(below)) + else + tk_send_without_enc('lower', tagid(tag)) + end + self + end + + def move(tag, x, y) + tk_send_without_enc('move', tagid(tag), x, y) + self + end + + def postscript(keys) + tk_send("postscript", *hash_kv(keys)) + end + + def raise(tag, above=nil) + if above + tk_send_without_enc('raise', tagid(tag), tagid(above)) + else + tk_send_without_enc('raise', tagid(tag)) + end + self + end + + def scale(tag, x, y, xs, ys) + tk_send_without_enc('scale', tagid(tag), x, y, xs, ys) + self + end + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y, gain=None) + tk_send_without_enc('scan', 'dragto', x, y, gain) + self + end + + def select(mode, *args) + r = tk_send_without_enc('select', mode, *args) + (mode == 'item')? TkcItem.id2obj(self, r): self + end + def select_adjust(tagOrId, index) + select('adjust', tagid(tagOrId), index) + end + def select_clear + select('clear') + end + def select_from(tagOrId, index) + select('from', tagid(tagOrId), index) + end + def select_item + select('item') + end + def select_to(tagOrId, index) + select('to', tagid(tagOrId), index) + end + + def itemtype(tag) + TkcItem.type2class(tk_send('type', tagid(tag))) + end +end + +#TkCanvas = Tk::Canvas unless Object.const_defined? :TkCanvas +Tk.__set_toplevel_aliases__(:Tk, Tk::Canvas, :TkCanvas) + + +class TkcItem "(t1)&&(t2)" + # ltag = tag1 | tag2; ltag.path => "(t1)||(t2)" + # ltag = tag1 ^ tag2; ltag.path => "(t1)^(t2)" + # ltag = - tag1; ltag.path => "!(t1)" + def & (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')&&(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')&&(' + tag.to_s + ')') + end + end + + def | (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')||(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')||(' + tag.to_s + ')') + end + end + + def ^ (tag) + if tag.kind_of? TkObject + TkcTagString.new(@c, '(' + @id + ')^(' + tag.path + ')') + else + TkcTagString.new(@c, '(' + @id + ')^(' + tag.to_s + ')') + end + end + + def -@ + TkcTagString.new(@c, '!(' + @id + ')') + end +end + +class TkcTag use ancestor's name + base_class_name = klass.name + end + else + # not subclass -> use WidgetClassName + base_class_name = klass.name + end + + else + # klass is invalid for the base frame + #if self.class < TkFrame || self.class.superclass < TkComposite + if self.class < TkFrame || self.class.superclass < Tk::Frame || self.class.superclass < TkComposite + # my class name is valid for the base frame -> use my classname + base_class_name = self.class.name + if base_class_name == '' + # anonymous class -> use TkFrame + base_class_name = nil + end + else + # no idea for the base frame -> use TkFrame + base_class_name = nil + end + end + + elsif self.class::WidgetClassName && ! self.class::WidgetClassName.empty? + # unknown WidgetClassName is defined -> use it for the base frame + base_class_name = self.class::WidgetClassName + + else + # no valid WidgetClassName + #if self.class < TkFrame || self.class.superclass < TkComposite + if self.class < TkFrame || self.class.superclass < Tk::Frame || self.class.superclass < TkComposite + # my class name is valid for the base frame -> use my classname + base_class_name = self.class.name + if base_class_name == '' + # anonymous class -> use TkFrame + base_class_name = nil + end + else + # no idea for the base frame -> use TkFrame + base_class_name = nil + end + end + + base_class_name + end + private :_choice_classname_of_baseframe + + # def initialize(parent=nil, *args) + def initialize(*args) + @delegates = {} + @option_methods = {} + @option_setting = {} + + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = {} + end + parent = args.shift + parent = keys.delete('parent') if keys.has_key?('parent') + + if keys.key?('classname') + keys['class'] = keys.delete('classname') + end + if (base_class_name = (keys.delete('class')).to_s).empty? + base_class_name = _choice_classname_of_baseframe + end + + if base_class_name + # @frame = Tk::Frame.new(parent, :class=>base_class_name) + # --> use current TkFrame class + @frame = TkFrame.new(parent, :class=>base_class_name) + else + # @frame = Tk::Frame.new(parent) + # --> use current TkFrame class + @frame = TkFrame.new(parent) + end + @path = @epath = @frame.path + + args.push(keys) unless keys.empty? + initialize_composite(*args) + end + + def database_classname + @frame.database_classname + end + + def database_class + @frame.database_class + end + + def epath + @epath + end + + def initialize_composite(*args) end + private :initialize_composite + + def inspect + str = super + str.chop << ' @epath=' << @epath.inspect << '>' + end + + def option_methods(*opts) + opts.each{|m_set, m_cget, m_info| + m_set = m_set.to_s + m_cget = m_set if !m_cget && self.method(m_set).arity == -1 + m_cget = m_cget.to_s if m_cget + m_info = m_info.to_s if m_info + @option_methods[m_set] = { + :set => m_set, :cget => m_cget, :info => m_info + } + } + end + + def delegate_alias(alias_opt, option, *wins) + if wins.length == 0 + fail ArgumentError, "target widgets are not given" + end + if alias_opt != option && (alias_opt == 'DEFAULT' || option == 'DEFAULT') + fail ArgumentError, "cannot alias 'DEFAULT' option" + end + alias_opt = alias_opt.to_s + option = option.to_s + if @delegates[alias_opt].kind_of?(Array) + if (elem = @delegates[alias_opt].assoc(option)) + wins.each{|w| elem[1].push(w)} + else + @delegates[alias_opt] << [option, wins] + end + else + @delegates[alias_opt] = [ [option, wins] ] + end + end + + def delegate(option, *wins) + delegate_alias(option, option, *wins) + end + + def __cget_delegates(slot) + slot = slot.to_s + + if @option_methods.include?(slot) + if @option_methods[slot][:cget] + return self.__send__(@option_methods[slot][:cget]) + else + if @option_setting[slot] + return @option_setting[slot] + else + return '' + end + end + end + + tbl = @delegates[slot] + tbl = @delegates['DEFAULT'] unless tbl + + begin + if tbl + opt, wins = tbl[-1] + opt = slot if opt == 'DEFAULT' + if wins && wins[-1] + # return wins[-1].cget(opt) + return wins[-1].cget_strict(opt) + end + end + rescue + end + + return None + end + private :__cget_delegates + + def cget(slot) + if (ret = __cget_delegates(slot)) == None + super(slot) + else + ret + end + end + + def cget_strict(slot) + if (ret = __cget_delegates(slot)) == None + super(slot) + else + ret + end + end + +=begin + def cget(slot) + slot = slot.to_s + + if @option_methods.include?(slot) + if @option_methods[slot][:cget] + return self.__send__(@option_methods[slot][:cget]) + else + if @option_setting[slot] + return @option_setting[slot] + else + return '' + end + end + end + + tbl = @delegates[slot] + tbl = @delegates['DEFAULT'] unless tbl + + begin + if tbl + opt, wins = tbl[-1] + opt = slot if opt == 'DEFAULT' + if wins && wins[-1] + return wins[-1].cget(opt) + end + end + rescue + end + + super(slot) + end +=end + + def configure(slot, value=None) + if slot.kind_of? Hash + slot.each{|slot,value| configure slot, value} + return self + end + + slot = slot.to_s + + if @option_methods.include?(slot) + unless @option_methods[slot][:cget] + if value.kind_of?(Symbol) + @option_setting[slot] = value.to_s + else + @option_setting[slot] = value + end + end + return self.__send__(@option_methods[slot][:set], value) + end + + tbl = @delegates[slot] + tbl = @delegates['DEFAULT'] unless tbl + + begin + if tbl + last = nil + tbl.each{|opt, wins| + opt = slot if opt == 'DEFAULT' + wins.each{|w| last = w.configure(opt, value)} + } + return last + end + rescue + end + + super(slot, value) + end + + def configinfo(slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + slot = slot.to_s + if @option_methods.include?(slot) + if @option_methods[slot][:info] + return self.__send__(@option_methods[slot][:info]) + else + return [slot, '', '', '', self.cget(slot)] + end + end + + tbl = @delegates[slot] + tbl = @delegates['DEFAULT'] unless tbl + + begin + if tbl + if tbl.length == 1 + opt, wins = tbl[0] + if slot == opt || opt == 'DEFAULT' + return wins[-1].configinfo(slot) + else + info = wins[-1].configinfo(opt) + info[0] = slot + return info + end + else + opt, wins = tbl[-1] + return [slot, '', '', '', wins[-1].cget(opt)] + end + end + rescue + end + + super(slot) + + else # slot == nil + info_list = super(slot) + + tbl = @delegates['DEFAULT'] + if tbl + wins = tbl[0][1] + if wins && wins[-1] + wins[-1].configinfo.each{|info| + slot = info[0] + info_list.delete_if{|i| i[0] == slot} << info + } + end + end + + @delegates.each{|slot, tbl| + next if slot == 'DEFAULT' + if tbl.length == 1 + opt, wins = tbl[0] + next unless wins && wins[-1] + if slot == opt + info_list.delete_if{|i| i[0] == slot} << + wins[-1].configinfo(slot) + else + info = wins[-1].configinfo(opt) + info[0] = slot + info_list.delete_if{|i| i[0] == slot} << info + end + else + opt, wins = tbl[-1] + info_list.delete_if{|i| i[0] == slot} << + [slot, '', '', '', wins[-1].cget(opt)] + end + } + + @option_methods.each{|slot, m| + if m[:info] + info = self.__send__(m[:info]) + else + info = [slot, '', '', '', self.cget(slot)] + end + info_list.delete_if{|i| i[0] == slot} << info + } + + info_list + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + slot = slot.to_s + if @option_methods.include?(slot) + if @option_methods[slot][:info] + return self.__send__(@option_methods[slot][:info]) + else + return {slot => ['', '', '', self.cget(slot)]} + end + end + + tbl = @delegates[slot] + tbl = @delegates['DEFAULT'] unless tbl + + begin + if tbl + if tbl.length == 1 + opt, wins = tbl[0] + if slot == opt || opt == 'DEFAULT' + return wins[-1].configinfo(slot) + else + return {slot => wins[-1].configinfo(opt)[opt]} + end + else + opt, wins = tbl[-1] + return {slot => ['', '', '', wins[-1].cget(opt)]} + end + end + rescue + end + + super(slot) + + else # slot == nil + info_list = super(slot) + + tbl = @delegates['DEFAULT'] + if tbl + wins = tbl[0][1] + info_list.update(wins[-1].configinfo) if wins && wins[-1] + end + + @delegates.each{|slot, tbl| + next if slot == 'DEFAULT' + if tbl.length == 1 + opt, wins = tbl[0] + next unless wins && wins[-1] + if slot == opt + info_list.update(wins[-1].configinfo(slot)) + else + info_list.update({slot => wins[-1].configinfo(opt)[opt]}) + end + else + opt, wins = tbl[-1] + info_list.update({slot => ['', '', '', wins[-1].cget(opt)]}) + end + } + + @option_methods.each{|slot, m| + if m[:info] + info = self.__send__(m[:info]) + else + info = {slot => ['', '', '', self.cget(slot)]} + end + info_list.update(info) + } + + info_list + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/console.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/console.rb new file mode 100644 index 0000000..26ce262 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/console.rb @@ -0,0 +1,52 @@ +# +# tk/console.rb : control the console on system without a real console +# +require 'tk' + +module TkConsole + include Tk + extend Tk + + TkCommandNames = ['console'.freeze, 'consoleinterp'.freeze].freeze + + def self.create + TkCore::INTERP._create_console + end + self.create # initialize console + + def self.title(str=None) + tk_call 'console', str + end + def self.hide + tk_call_without_enc('console', 'hide') + end + def self.show + tk_call_without_enc('console', 'show') + end + def self.eval(tcl_script) + # + # supports a Tcl script only + # I have no idea to support a Ruby script seamlessly. + # + _fromUTF8(tk_call_without_enc('console', 'eval', + _get_eval_enc_str(tcl_script))) + end + def self.maininterp_eval(tcl_script) + # + # supports a Tcl script only + # I have no idea to support a Ruby script seamlessly. + # + _fromUTF8(tk_call_without_enc('consoleinterp', 'eval', + _get_eval_enc_str(tcl_script))) + + end + def self.maininterp_record(tcl_script) + # + # supports a Tcl script only + # I have no idea to support a Ruby script seamlessly. + # + _fromUTF8(tk_call_without_enc('consoleinterp', 'record', + _get_eval_enc_str(tcl_script))) + + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/dialog.rb new file mode 100644 index 0000000..180da10 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/dialog.rb @@ -0,0 +1,326 @@ +# +# tk/dialog.rb : create dialog boxes +# +require 'tk' +require 'tk/variable.rb' + +class TkDialogObj < TkWindow + extend Tk + + TkCommandNames = ['tk_dialog'.freeze].freeze + + def self.show(*args) + dlog = self.new(*args) + dlog.show + dlog + end + + def _set_button_config(configs) + set_config = proc{|c,i| + if $VERBOSE && (c.has_key?('command') || c.has_key?(:command)) + STDERR.print("Warning: cannot give a command option " + + "to the dialog button#{i}. It was removed.\n") + end + c.delete('command'); c.delete(:command) + # @config << Kernel.format("%s.button%s configure %s; ", + # @path, i, hash_kv(c).join(' ')) + # @config << @path+'.button'+i.to_s+' configure '+hash_kv(c).join(' ')+'; ' + @config << @path+'.button'+i.to_s+' configure '+ + array2tk_list(hash_kv(c))+'; ' + } + case configs + when Proc + @buttons.each_index{|i| + if (c = configs.call(i)).kind_of?(Hash) + set_config.call(c,i) + end + } + + when Array + @buttons.each_index{|i| + if (c = configs[i]).kind_of?(Hash) + set_config.call(c,i) + end + } + + when Hash + @buttons.each_with_index{|s,i| + if (c = configs[s]).kind_of?(Hash) + set_config.call(c,i) + end + } + end + # @config = 'after idle {' + @config + '};' if @config != "" + @config = array2tk_list(['after', 'idle', @config]) << ';' if @config != "" + end + private :_set_button_config + + # initialize tk_dialog + def create_self(keys) + # @var = TkVariable.new + @val = nil + + @title = title + + @message = message + @message_config = message_config + @msgframe_config = msgframe_config + + @bitmap = bitmap + @bitmap_config = message_config + + @default_button = default_button + + @buttons = buttons + @button_configs = proc{|num| button_configs(num)} + @btnframe_config = btnframe_config + + #@config = "puts [winfo children .w0000];" + @config = "" + + @command = prev_command + + if keys.kind_of?(Hash) + @title = keys['title'] if keys.key? 'title' + @message = keys['message'] if keys.key? 'message' + @bitmap = keys['bitmap'] if keys.key? 'bitmap' + # @bitmap = '{}' if @bitmap == nil || @bitmap == "" + @bitmap = '' unless @bitmap + @default_button = keys['default'] if keys.key? 'default' + @buttons = keys['buttons'] if keys.key? 'buttons' + + @command = keys['prev_command'] if keys.key? 'prev_command' + + @message_config = keys['message_config'] if keys.key? 'message_config' + @msgframe_config = keys['msgframe_config'] if keys.key? 'msgframe_config' + @bitmap_config = keys['bitmap_config'] if keys.key? 'bitmap_config' + @button_configs = keys['button_configs'] if keys.key? 'button_configs' + @btnframe_config = keys['btnframe_config'] if keys.key? 'btnframe_config' + end + + #if @title.include? ?\s + # @title = '{' + @title + '}' + #end + + if @buttons.kind_of?(Array) + _set_button_config(@buttons.collect{|cfg| + (cfg.kind_of? Array)? cfg[1]: nil}) + @buttons = @buttons.collect{|cfg| (cfg.kind_of? Array)? cfg[0]: cfg} + end + if @buttons.kind_of?(Hash) + _set_button_config(@buttons) + @buttons = @buttons.keys + end + @buttons = tk_split_simplelist(@buttons) if @buttons.kind_of?(String) + @buttons = [] unless @buttons +=begin + @buttons = @buttons.collect{|s| + if s.kind_of?(Array) + s = s.join(' ') + end + if s.include? ?\s + '{' + s + '}' + else + s + end + } +=end + + if @message_config.kind_of?(Hash) + # @config << Kernel.format("%s.msg configure %s;", + # @path, hash_kv(@message_config).join(' ')) + # @config << @path+'.msg configure '+hash_kv(@message_config).join(' ')+';' + @config << @path+'.msg configure '+ + array2tk_list(hash_kv(@message_config))+';' + end + + if @msgframe_config.kind_of?(Hash) + # @config << Kernel.format("%s.top configure %s;", + # @path, hash_kv(@msgframe_config).join(' ')) + # @config << @path+'.top configure '+hash_kv(@msgframe_config).join(' ')+';' + @config << @path+'.top configure '+ + array2tk_list(hash_kv(@msgframe_config))+';' + end + + if @btnframe_config.kind_of?(Hash) + # @config << Kernel.format("%s.bot configure %s;", + # @path, hash_kv(@btnframe_config).join(' ')) + # @config << @path+'.bot configure '+hash_kv(@btnframe_config).join(' ')+';' + @config << @path+'.bot configure '+ + array2tk_list(hash_kv(@btnframe_config))+';' + end + + if @bitmap_config.kind_of?(Hash) + # @config << Kernel.format("%s.bitmap configure %s;", + # @path, hash_kv(@bitmap_config).join(' ')) + # @config << @path+'.bitmap configure '+hash_kv(@bitmap_config).join(' ')+';' + @config << @path+'.bitmap configure '+ + array2tk_list(hash_kv(@bitmap_config))+';' + end + + _set_button_config(@button_configs) if @button_configs + end + private :create_self + + def show + # if @command.kind_of?(Proc) + if TkComm._callback_entry?(@command) + @command.call(self) + end + + if @default_button.kind_of?(String) + default_button = @buttons.index(@default_button) + else + default_button = @default_button + end + # default_button = '{}' if default_button == nil + default_button = '' if default_button == nil + #Tk.ip_eval('eval {global '+@var.id+';'+@config+ + # 'set '+@var.id+' [tk_dialog '+ + # @path+" "+@title+" {#{@message}} "+@bitmap+" "+ + # String(default_button)+" "+@buttons.join(' ')+']}') + Tk.ip_eval(@config) + # @val = Tk.ip_eval('tk_dialog ' + @path + ' ' + @title + + # ' {' + @message + '} ' + @bitmap + ' ' + + # String(default_button) + ' ' + @buttons.join(' ')).to_i + # @val = Tk.ip_eval(self.class::TkCommandNames[0] + ' ' + @path + ' ' + + # @title + ' {' + @message + '} ' + @bitmap + ' ' + + # String(default_button) + ' ' + @buttons.join(' ')).to_i + @val = Tk.ip_eval(array2tk_list([ + self.class::TkCommandNames[0], + @path, @title, @message, @bitmap, + String(default_button) + ].concat(@buttons))).to_i + end + + def value + # @var.value.to_i + @val + end + + def name + (@val)? @buttons[@val]: nil + end + + ############################################################ + # # + # following methods should be overridden for each dialog # + # # + ############################################################ + private + + def title + # returns a title string of the dialog window + return "DIALOG" + end + def message + # returns a message text to display on the dialog + return "MESSAGE" + end + def message_config + # returns a Hash {option=>value, ...} for the message text + return nil + end + def msgframe_config + # returns a Hash {option=>value, ...} for the message text frame + return nil + end + def bitmap + # returns a bitmap name or a bitmap file path + # (@ + path ; e.g. '@/usr/share/bitmap/sample.xbm') + return "info" + end + def bitmap_config + # returns nil or a Hash {option=>value, ...} for the bitmap + return nil + end + def default_button + # returns a default button's number or name + # if nil or null string, set no-default + return 0 + end + def buttons + #return "BUTTON1 BUTTON2" + return ["BUTTON1", "BUTTON2"] + end + def button_configs(num) + # returns nil / Proc / Array or Hash (see _set_button_config) + return nil + end + def btnframe_config + # returns nil or a Hash {option=>value, ...} for the button frame + return nil + end + def prev_command + # returns nil or a Proc + return nil + end +end +TkDialog2 = TkDialogObj + +# +# TkDialog : with showing at initialize +# +class TkDialog < TkDialogObj + def self.show(*args) + self.new(*args) + end + + def initialize(*args) + super(*args) + show + end +end + + +# +# dialog for warning +# +class TkWarningObj < TkDialogObj + def initialize(parent = nil, mes = nil) + if !mes + if parent.kind_of?(TkWindow) + mes = "" + else + mes = parent.to_s + parent = nil + end + end + super(parent, :message=>mes) + end + + def show(mes = nil) + mes_bup = @message + @message = mes if mes + ret = super() + @message = mes_bup + ret + end + + ####### + private + + def title + return "WARNING"; + end + def bitmap + return "warning"; + end + def default_button + return 0; + end + def buttons + return "OK"; + end +end +TkWarning2 = TkWarningObj + +class TkWarning < TkWarningObj + def self.show(*args) + self.new(*args) + end + def initialize(*args) + super(*args) + show + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/encodedstr.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/encodedstr.rb new file mode 100644 index 0000000..02de0b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/encodedstr.rb @@ -0,0 +1,187 @@ +# +# tk/encodedstr.rb : Tk::EncodedString class +# +require 'tk' + +########################################### +# string with Tcl's encoding +########################################### +module Tk + class EncodedString < String + Encoding = nil + + def self.subst_utf_backslash(str) + # str.gsub(/\\u([0-9A-Fa-f]{1,4})/){[$1.hex].pack('U')} + TclTkLib._subst_UTF_backslash(str) + end + def self.utf_backslash(str) + self.subst_utf_backslash(str) + end + + def self.subst_tk_backslash(str) + TclTkLib._subst_Tcl_backslash(str) + end + + def self.utf_to_backslash_sequence(str) + str.unpack('U*').collect{|c| + if c <= 0xFF # ascii character + c.chr + else + format('\u%X', c) + end + }.join('') + end + def self.utf_to_backslash(str) + self.utf_to_backslash_sequence(str) + end + + def self.to_backslash_sequence(str) + str.unpack('U*').collect{|c| + if c <= 0x1F # control character + case c + when 0x07; '\a' + when 0x08; '\b' + when 0x09; '\t' + when 0x0a; '\n' + when 0x0b; '\v' + when 0x0c; '\f' + when 0x0d; '\r' + else + format('\x%02X', c) + end + elsif c <= 0xFF # ascii character + c.chr + else + format('\u%X', c) + end + }.join('') + end + + def self.new_with_utf_backslash(str, enc = nil) + self.new('', enc).replace(self.subst_utf_backslash(str)) + end + + def self.new_without_utf_backslash(str, enc = nil) + self.new('', enc).replace(str) + end + + def initialize(str, enc = nil) + super(str) + # @encoding = ( enc || + # ((self.class::Encoding)? + # self.class::Encoding : Tk.encoding_system) ) + enc ||= (self.class::Encoding)? + self.class::Encoding : + ((Tk.encoding)? Tk.encoding : Tk.encoding_system) + if TkCore::WITH_ENCODING + unless encobj = Tk::Encoding::ENCODING_TABLE.get_obj(enc) + fail ArgumentError, "unsupported Tk encoding '#{enc}'" + end + self.force_encoding(encobj) + else + @encoding = enc + end + end + + if TkCore::WITH_ENCODING + alias encoding_obj encoding + alias __encoding encoding + def encoding + Tk::Encoding::ENCODING_TABLE.get_name(super()) + end + else + def encoding + @encoding + end + alias encoding_obj encoding + end + + if TkCore::WITH_ENCODING + # wrapper methods for compatibility + alias __instance_variable_get instance_variable_get + alias __instance_variable_set instance_variable_set + alias __instance_eval instance_eval + alias __instance_variables instance_variables + + def instance_variable_get(key) + if (key.to_s == '@encoding') + self.encoding + else + super(key) + end + end + + def instance_variable_set(key, value) + if (key.to_s == '@encoding') + if value + self.force_encoding(value) + else + self.force_encoding(Tk::Encoding::UNKNOWN) + end + value + else + super(key, value) + end + end + + def instance_eval(*args, &b) + old_enc = @encoding = self.encoding + + ret = super(*args, &b) + + if @encoding + if @encoding != old_enc + # modified by user + self.force_encoding(@encoding) + end + remove_instance_variable(:@encoding) + else + begin + remove_instance_variable(:@encoding) + # user sets to nil -> use current default + self.force_encoding(Tk.encoding) + rescue NameError + # removed by user -> ignore, because user don't use @encoding + end + end + ret + end + end + + def instance_variables + ret = super() + ret << :@encoding # fake !! + ret + end + end + # def Tk.EncodedString(str, enc = nil) + # Tk::EncodedString.new(str, enc) + # end + + ################################## + + class BinaryString < EncodedString + Encoding = 'binary'.freeze + end + # def Tk.BinaryString(str) + # Tk::BinaryString.new(str) + # end + + ################################## + + class UTF8_String < EncodedString + Encoding = 'utf-8'.freeze + def self.new(str) + super(self.subst_utf_backslash(str)) + end + + def to_backslash_sequence + Tk::EncodedString.utf_to_backslash_sequence(self) + end + alias to_backslash to_backslash_sequence + end + # def Tk.UTF8_String(str) + # Tk::UTF8_String.new(str) + # end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/entry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/entry.rb new file mode 100644 index 0000000..8ce8def --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/entry.rb @@ -0,0 +1,119 @@ +# +# tk/entry.rb - Tk entry classes +# by Yukihiro Matsumoto + +require 'tk' +require 'tk/label' +require 'tk/scrollable' +require 'tk/validation' + +class Tk::Entry flag + 'above' => Grp::CONFIG, + 'borderwidth' => (Grp::CREATE|Grp::CONFIG), + 'button' => Grp::BUTTON, + 'count' => Grp::EXPOSE, + 'data' => (Grp::VIRTUAL|Grp::STRING_DATA), + 'delta' => Grp::MWHEEL, + 'detail' => (Grp::FOCUS|Grp::CROSSING), + 'focus' => Grp::CROSSING, + 'height' => (Grp::EXPOSE|Grp::CONFIG), + 'keycode' => Grp::KEY, + 'keysym' => Grp::KEY, + 'mode' => (Grp::CROSSING|Grp::FOCUS), + 'override' => (Grp::CREATE|Grp::MAP|Grp::REPARENT|Grp::CONFIG), + 'place' => Grp::CIRC, + 'root' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING), + 'rootx' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING), + 'rooty' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING), + 'sendevent' => Grp::ALL, + 'serial' => Grp::ALL, + 'state' => (Grp::KEY_BUTTON_MOTION_VIRTUAL| + Grp::CROSSING|Grp::VISIBILITY), + 'subwindow' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING), + 'time' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING| + Grp::PROP), + 'warp' => Grp::KEY_BUTTON_MOTION_VIRTUAL, + 'width' => (Grp::EXPOSE|Grp::CREATE|Grp::CONFIG), + 'window' => (Grp::CREATE|Grp::UNMAP|Grp::MAP|Grp::REPARENT| + Grp::CONFIG|Grp::GRAVITY|Grp::CIRC), + 'when' => Grp::ALL, + 'x' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING| + Grp::EXPOSE|Grp::CREATE|Grp::CONFIG|Grp::GRAVITY| + Grp::REPARENT), + 'y' => (Grp::KEY_BUTTON_MOTION_VIRTUAL|Grp::CROSSING| + Grp::EXPOSE|Grp::CREATE|Grp::CONFIG|Grp::GRAVITY| + Grp::REPARENT), + } + + FIELD_OPERATION = { + 'root' => proc{|val| + begin + Tk.tk_call_without_enc('winfo', 'pathname', val) + val + rescue + nil + end + }, + + 'subwindow' => proc{|val| + begin + Tk.tk_call_without_enc('winfo', 'pathname', val) + val + rescue + nil + end + }, + + 'window' => proc{|val| nil} + } + + #------------------------------------------- + + def valid_fields(group_flag=nil) + group_flag = self.class.group_flag(self.type) unless group_flag + + fields = {} + FIELD_FLAG.each{|key, flag| + next if (flag & group_flag) == 0 + begin + val = self.__send__(key) + rescue + next + end + # next if !val || val == '??' + next if !val || (val == '??' && (flag & Grp::STRING_DATA)) + fields[key] = val + } + + fields + end + + def valid_for_generate(group_flag=nil) + fields = valid_fields(group_flag) + + FIELD_OPERATION.each{|key, cmd| + next unless fields.has_key?(key) + val = FIELD_OPERATION[key].call(fields[key]) + if val + fields[key] = val + else + fields.delete(key) + end + } + + fields + end + + def generate(win, modkeys={}) + klass = self.class + + if modkeys.has_key?(:type) || modkeys.has_key?('type') + modkeys = TkComm._symbolkey2str(modkeys) + type_id = modkeys.delete('type') + else + type_id = self.type + end + + type_name = klass.type_name(type_id) + unless type_name + fail RuntimeError, "type_id #{type_id} is invalid" + end + + group_flag = klass.group_flag(type_id) + + opts = valid_for_generate(group_flag) + + modkeys.each{|key, val| + if val + opts[key.to_s] = val + else + opts.delete(key.to_s) + end + } + + if group_flag != Grp::KEY + Tk.event_generate(win, type_name, opts) + else + # If type is KEY event, focus should be set to target widget. + # If not set, original widget will get the same event. + # That will make infinite loop. + w = Tk.tk_call_without_enc('focus') + begin + Tk.tk_call_without_enc('focus', win) + Tk.event_generate(win, type_name, opts) + ensure + Tk.tk_call_without_enc('focus', w) + end + end + end + + ############################################# + + # [ <'%' subst-key char>, , ] + KEY_TBL = [ + [ ?#, ?n, :serial ], + [ ?a, ?s, :above ], + [ ?b, ?n, :num ], + [ ?c, ?n, :count ], + [ ?d, ?s, :detail ], + # ?e + [ ?f, ?b, :focus ], + # ?g + [ ?h, ?n, :height ], + [ ?i, ?s, :win_hex ], + # ?j + [ ?k, ?n, :keycode ], + # ?l + [ ?m, ?s, :mode ], + # ?n + [ ?o, ?b, :override ], + [ ?p, ?s, :place ], + # ?q + # ?r + [ ?s, ?x, :state ], + [ ?t, ?n, :time ], + # ?u + [ ?v, ?n, :value_mask ], + [ ?w, ?n, :width ], + [ ?x, ?n, :x ], + [ ?y, ?n, :y ], + # ?z + [ ?A, ?s, :char ], + [ ?B, ?n, :borderwidth ], + # ?C + [ ?D, ?n, :wheel_delta ], + [ ?E, ?b, :send_event ], + # ?F + # ?G + # ?H + # ?I + # ?J + [ ?K, ?s, :keysym ], + # ?L + # ?M + [ ?N, ?n, :keysym_num ], + # ?O + [ ?P, ?s, :property ], + # ?Q + [ ?R, ?s, :rootwin_id ], + [ ?S, ?s, :subwindow ], + [ ?T, ?n, :type ], + # ?U + # ?V + [ ?W, ?w, :widget ], + [ ?X, ?n, :x_root ], + [ ?Y, ?n, :y_root ], + # ?Z + nil + ] + + # [ <'%' subst-key str>, , ] + # the subst-key string will be converted to a bytecode (128+idx). + LONGKEY_TBL = [ + # for example, for %CTT and %CST subst-key on tkdnd-2.0 + # ['CTT', ?l, :drop_target_type], + # ['CST', ?l, :drop_source_type], + ] + + # [ , ] + PROC_TBL = [ + [ ?n, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?b, TkComm.method(:bool) ], + [ ?w, TkComm.method(:window) ], + + [ ?x, proc{|val| + begin + TkComm::number(val) + rescue ArgumentError + val + end + } + ], + + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + # setup tables to be used by scan_args, _get_subst_key, _get_all_subst_keys + # + # _get_subst_key() and _get_all_subst_keys() generates key-string + # which describe how to convert callback arguments to ruby objects. + # When binding parameters are given, use _get_subst_key(). + # But when no parameters are given, use _get_all_subst_keys() to + # create a Event class object as a callback parameter. + # + # scan_args() is used when doing callback. It convert arguments + # ( which are Tcl strings ) to ruby objects based on the key string + # that is generated by _get_subst_key() or _get_all_subst_keys(). + # + _setup_subst_table(KEY_TBL, PROC_TBL) + # _setup_subst_table(KEY_TBL, LONGKEY_TBL, PROC_TBL) # if use longname-keys + + # + # NOTE: The order of parameters which passed to callback procedure is + # , , ... , , , ... + # + + # If you need support extra arguments given by Tcl/Tk, + # please override _get_extra_args_tbl + # + #def self._get_extra_args_tbl + # # return an array of convert procs + # [] + #end + +=begin + alias button num + alias delta wheel_delta + alias root rootwin_id + alias rootx x_root + alias root_x x_root + alias rooty y_root + alias root_y y_root + alias sendevent send_event +=end + ALIAS_TBL = { + :button => :num, + :data => :detail, + :delta => :wheel_delta, + :root => :rootwin_id, + :rootx => :x_root, + :root_x => :x_root, + :rooty => :y_root, + :root_y => :y_root, + :sendevent => :send_event, + :window => :widget + } + + _define_attribute_aliases(ALIAS_TBL) + + end + + ############################################### + + def install_bind_for_event_class(klass, cmd, *args) + extra_args_tbl = klass._get_extra_args_tbl + + if args.compact.size > 0 + args.map!{|arg| klass._sym2subst(arg)} + args = args.join(' ') + keys = klass._get_subst_key(args) + + if cmd.kind_of?(String) + id = cmd + elsif cmd.kind_of?(TkCallbackEntry) + id = install_cmd(cmd) + else + id = install_cmd(proc{|*arg| + ex_args = [] + extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)} + begin + TkUtil.eval_cmd(cmd, *(ex_args.concat(klass.scan_args(keys, arg)))) + rescue Exception=>e + if TkCore::INTERP.kind_of?(TclTkIp) + fail e + else + # MultiTkIp + fail Exception, "#{e.class}: #{e.message.dup}" + end + end + }) + end + else + keys, args = klass._get_all_subst_keys + + if cmd.kind_of?(String) + id = cmd + elsif cmd.kind_of?(TkCallbackEntry) + id = install_cmd(cmd) + else + id = install_cmd(proc{|*arg| + ex_args = [] + extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)} + begin + TkUtil.eval_cmd(cmd, *(ex_args << klass.new(*klass.scan_args(keys, arg)))) + rescue Exception=>e + if TkCore::INTERP.kind_of?(TclTkIp) + fail e + else + # MultiTkIp + fail Exception, "#{e.class}: #{e.message.dup}" + end + end + }) + end + end + + if TkCore::INTERP.kind_of?(TclTkIp) + id + ' ' + args + else + # MultiTkIp + "if {[set st [catch {#{id} #{args}} ret]] != 0} { + if {$st == 4} { + return -code continue $ret + } elseif {$st == 3} { + return -code break $ret + } elseif {$st == 2} { + return -code return $ret + } elseif {[regexp {^Exception: (TkCallbackContinue: .*)$} \ + $ret m msg]} { + return -code continue $msg + } elseif {[regexp {^Exception: (TkCallbackBreak: .*)$} $ret m msg]} { + return -code break $msg + } elseif {[regexp {^Exception: (TkCallbackReturn: .*)$} $ret m msg]} { + return -code return $msg + } elseif {[regexp {^Exception: (\\S+: .*)$} $ret m msg]} { + return -code return $msg + } else { + return -code error $ret + } + } else { + set ret + }" + end + end + + def install_bind(cmd, *args) + install_bind_for_event_class(TkEvent::Event, cmd, *args) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/font.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/font.rb new file mode 100644 index 0000000..62d628c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/font.rb @@ -0,0 +1,2344 @@ +# +# tk/font.rb - the class to treat fonts on Ruby/Tk +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +class TkFont + include Tk + extend TkCore + + TkCommandNames = ['font'.freeze].freeze + + (Tk_FontID = ["@font".freeze, "00000".taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + Tk_FontNameTBL = TkCore::INTERP.create_table + Tk_FontUseTBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + Tk_FontNameTBL.mutex.synchronize{ Tk_FontNameTBL.clear } + Tk_FontUseTBL.mutex.synchronize{ Tk_FontUseTBL.clear } + } + + # option_type : default => string + OptionType = Hash.new(?s) + OptionType['size'] = ?n + OptionType['pointadjust'] = ?n + OptionType['underline'] = ?b + OptionType['overstrike'] = ?b + + # metric_type : default => num_or_str + MetricType = Hash.new(?n) + MetricType['fixed'] = ?b + + # system font names + SYSTEM_FONT_NAMES = [] + def SYSTEM_FONT_NAMES.add(font_names) + (@mutex ||= Mutex.new).synchronize{ + self.replace(self | font_names.map{|name| name.to_s}) + } + end + def SYSTEM_FONT_NAMES.include?(name) + (@mutex ||= Mutex.new).synchronize{ + super(name.to_s) + } + end + + # set default font + case Tk::TK_VERSION + when /^4\..*/ + DEFAULT_LATIN_FONT_NAME = 'a14'.freeze + DEFAULT_KANJI_FONT_NAME = 'k14'.freeze + + when /^8\.[0-4]/ + if JAPANIZED_TK + begin + fontnames = tk_call('font', 'names') + case fontnames + when /defaultgui/ + # Tcl/Tk-JP for Windows + ltn = 'defaultgui' + knj = 'defaultgui' + when /Mincho:Helvetica-Bold-12/ + # Tcl/Tk-JP for UNIX/X + ltn, knj = tk_split_simplelist(tk_call('font', 'configure', + 'Mincho:Helvetica-Bold-12', + '-compound')) + else + # unknown Tcl/Tk-JP + #platform = tk_call('set', 'tcl_platform(platform)') + platform = Tk::PLATFORM['platform'] + case platform + when 'unix' + ltn = {'family'=>'Helvetica'.freeze, + 'size'=>-12, 'weight'=>'bold'.freeze} + #knj = 'k14' + #knj = '-misc-fixed-medium-r-normal--14-*-*-*-c-*-jisx0208.1983-0' + knj = '-*-fixed-bold-r-normal--12-*-*-*-c-*-jisx0208.1983-0' + when 'windows' + ltn = {'family'=>'MS Sans Serif'.freeze, 'size'=>8} + knj = 'mincho' + when 'macintosh' + ltn = 'system' + knj = 'mincho' + else # unknown + ltn = 'Helvetica' + knj = 'mincho' + end + end + rescue + ltn = 'Helvetica' + knj = 'mincho' + end + + else # not JAPANIZED_TK + begin + #platform = tk_call('set', 'tcl_platform(platform)') + platform = Tk::PLATFORM['platform'] + case platform + when 'unix' + ltn = {'family'=>'Helvetica'.freeze, + 'size'=>-12, 'weight'=>'bold'.freeze} + when 'windows' + ltn = {'family'=>'MS Sans Serif'.freeze, 'size'=>8} + when 'macintosh' + ltn = 'system' + else # unknown + ltn = 'Helvetica' + end + rescue + ltn = 'Helvetica' + end + + knj = ltn.dup + end + + DEFAULT_LATIN_FONT_NAME = ltn.freeze + DEFAULT_KANJI_FONT_NAME = knj.freeze + + when /^8\.[5-9]/, /^9\..*/ + if tk_call('font', 'names') =~ /\bTkDefaultFont\b/ + DEFAULT_LATIN_FONT_NAME = 'TkDefaultFont'.freeze + DEFAULT_KANJI_FONT_NAME = 'TkDefaultFont'.freeze + else + DEFAULT_LATIN_FONT_NAME = 'Helvetica'.freeze + DEFAULT_KANJI_FONT_NAME = 'mincho'.freeze + end + + else # unknown version + DEFAULT_LATIN_FONT_NAME = 'Helvetica'.freeze + DEFAULT_KANJI_FONT_NAME = 'mincho'.freeze + + end + + if $DEBUG + print "default latin font = "; p DEFAULT_LATIN_FONT_NAME + print "default kanji font = "; p DEFAULT_KANJI_FONT_NAME + end + + + ################################### + class DescendantFont + def initialize(compound, type) + unless compound.kind_of?(TkFont) + fail ArgumentError, "a TkFont object is expected for the 1st argument" + end + + @compound = compound + case type + when 'kanji', 'latin', 'ascii' + @type = type + when :kanji, :latin, :ascii + @type = type.to_s + else + fail ArgumentError, "unknown type '#{type}'" + end + end + + def dup + fail RuntimeError, "cannot dupulicate a descendant font" + end + def clone + fail RuntimeError, "cannot clone a descendant font" + end + + def to_eval + @compound.__send__(@type + '_font_id') + end + def font + @compound.__send__(@type + '_font_id') + end + alias font_id font + alias name font + alias to_s font + + def [](slot) + @compound.__send__(@type + '_configinfo', slot) + end + def []=(slot, value) + @compound.__send__(@type + '_configure', slot, value) + value + end + + def method_missing(id, *args) + @compound.__send__(@type + '_' + id.id2name, *args) + end + end + + + ################################### + # class methods + ################################### + def TkFont.is_system_font?(fnt) + # true --> system font which is available on the current system + # false --> not system font (or unknown system font) + # nil --> system font name, but not available on the current system + fnt = fnt.to_s + SYSTEM_FONT_NAMES.include?(fnt) && self.names.index(fnt) && true + end + + def TkFont.actual(fnt, option=nil) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + fnt.actual(option) + else + actual_core(fnt, nil, option) + end + end + def TkFont.actual_hash(fnt, option=nil) + Hash[TkFont.actual_hash(fnt, option)] + end + + def TkFont.actual_displayof(fnt, win, option=nil) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + fnt.actual_displayof(win, option) + else + win = '.' unless win + actual_core(fnt, win, option) + end + end + def TkFont.actual_hash_displayof(fnt, option=nil) + Hash[TkFont.actual_hash_displayof(fnt, option)] + end + + def TkFont.configure(fnt, slot, value=None) + if fnt.kind_of?(TkFont) + fnt.configure(fnt, slot, value) + else + configure_core(fnt, slot, value) + end + fnt + end + + def TkFont.configinfo(fnt, slot=nil) + if fnt.kind_of?(TkFont) + fnt.configinfo(fnt, slot) + else + configinfo_core(fnt, slot) + end + end + + def TkFont.current_configinfo(fnt, slot=nil) + if fnt.kind_of?(TkFont) + fnt.current_configinfo(fnt, slot) + else + current_configinfo_core(fnt, slot) + end + end + + def TkFont.measure(fnt, text) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + fnt.measure(text) + else + measure_core(fnt, nil, text) + end + end + + def TkFont.measure_displayof(fnt, win, text) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + fnt.measure_displayof(win, text) + else + win = '.' unless win + measure_core(fnt, win, text) + end + end + + def TkFont.metrics(fnt, option=nil) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + fnt.metrics(option) + else + metrics_core(fnt, nil, option) + end + end + def TkFont.metrics_hash(fnt, option=nil) + if option + val = TkFont.metrics(fnt, option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[TkFont.metrics(fnt)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def TkFont.metrics_displayof(fnt, win, option=nil) + fnt = '{}' if fnt == '' + if fnt.kind_of?(TkFont) + font.metrics_displayof(win, option=nil) + else + win = '.' unless win + metrics_core(fnt, win, option) + end + end + def TkFont.metrics_hash_displayof(fnt, win, option=nil) + if option + val = TkFont.metrics_displayof(fnt, win, option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[TkFont.metrics_displayof(fnt, win, option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def TkFont.families(win=nil) + case (Tk::TK_VERSION) + when /^4\..*/ + ['fixed'] + + when /^8\..*/ + if win + tk_split_simplelist(tk_call('font', 'families', '-displayof', win)) + else + tk_split_simplelist(tk_call('font', 'families')) + end + end + end + + def TkFont.names + case (Tk::TK_VERSION) + when /^4\..*/ + r = ['fixed'] + r += ['a14', 'k14'] if JAPANIZED_TK + Tk_FontNameTBL.mutex.synchronize{ + Tk_FontNameTBL.each_value{|obj| r.push(obj)} + } + #r | [] + r.uniq + + when /^8\..*/ + tk_split_simplelist(tk_call('font', 'names')) + + end + end + + def TkFont.create_copy(font) + fail 'source-font must be a TkFont object' unless font.kind_of? TkFont + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + keys = {} + font.configinfo.each{|key,value| keys[key] = value } + TkFont.new(font.latin_font_id, font.kanji_font_id, keys) + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + TkFont.new(font.latin_font_id, font.kanji_font_id, font.configinfo) + end + end + + def TkFont.get_obj(name) + name = name.to_s + if name =~ /^(@font[0-9]+)(|c|l|k)$/ + Tk_FontNameTBL.mutex.synchronize{ + Tk_FontNameTBL[$1] + } + else + Tk_FontNameTBL.mutex.synchronize{ + Tk_FontNameTBL[name] + } + end + end + + def TkFont.init_widget_font(pathname, *args) + win, tag, key = pathname.split(';') + key = 'font' if key == nil || key == '' + path = [win, tag, key].join(';') + + case (Tk::TK_VERSION) + when /^4\..*/ + regexp = /^-(|kanji)#{key} / + + conf_list = tk_split_simplelist(tk_call(*args)). + find_all{|prop| prop =~ regexp}. + collect{|prop| tk_split_simplelist(prop)} + + if conf_list.size == 0 + raise RuntimeError, "the widget may not support 'font' option" + end + + args << {} + + ltn_key = "-#{key}" + knj_key = "-kanji#{key}" + + ltn_info = conf_list.find{|conf| conf[0] == ltn_key} + ltn = ltn_info[-1] + ltn = nil if ltn == [] || ltn == "" + + knj_info = conf_list.find{|conf| conf[0] == knj_key} + knj = knj_info[-1] + knj = nil if knj == [] || knj == "" + + TkFont.new(ltn, knj).call_font_configure([path, key], *args) + + when /^8\.[0-4]/ + regexp = /^-#{key} / + + conf_list = tk_split_simplelist(tk_call(*args)). + find_all{|prop| prop =~ regexp}. + collect{|prop| tk_split_simplelist(prop)} + + if conf_list.size == 0 + raise RuntimeError, "the widget may not support 'font' option" + end + + args << {} + + optkey = "-#{key}" + + info = conf_list.find{|conf| conf[0] == optkey} + fnt = info[-1] + fnt = nil if fnt == [] || fnt == "" + + unless fnt + # create dummy + # TkFont.new(nil, nil).call_font_configure([path, key], *args) + dummy_fnt = TkFont.allocate + dummy_fnt.instance_eval{ init_dummy_fontobj() } + dummy_fnt + else + begin + compound = tk_split_simplelist( + Hash[*tk_split_simplelist(tk_call('font', 'configure', + fnt))].collect{|k,v| + [k[1..-1], v] + }.assoc('compound')[1]) + rescue + compound = [] + end + if compound == [] + if TkFont.is_system_font?(fnt) + TkNamedFont.new(fnt).call_font_configure([path, key], *args) + else + TkFont.new(fnt).call_font_configure([path, key], *args) + end + else + TkFont.new(compound[0], + compound[1]).call_font_configure([path, key], *args) + end + end + + when /^8\.[5-9]/, /^9\..*/ + regexp = /^-#{key} / + + conf_list = tk_split_simplelist(tk_call(*args)). + find_all{|prop| prop =~ regexp}. + collect{|prop| tk_split_simplelist(prop)} + + if conf_list.size == 0 + raise RuntimeError, "the widget may not support 'font' option" + end + + args << {} + + optkey = "-#{key}" + + info = conf_list.find{|conf| conf[0] == optkey} + fnt = info[-1] + fnt = nil if fnt == [] || fnt == "" + + unless fnt + # create dummy + # TkFont.new(nil, nil).call_font_configure([path, key], *args) + dummy_fnt = TkFont.allocate + dummy_fnt.instance_eval{ init_dummy_fontobj() } + dummy_fnt + else + if TkFont.is_system_font?(fnt) + TkNamedFont.new(fnt).call_font_configure([path, key], *args) + else + TkFont.new(fnt).call_font_configure([path, key], *args) + end + end + end + end + + def TkFont.used_on(path=nil) + Tk_FontUseTBL.mutex.synchronize{ + if path + Tk_FontUseTBL[path] + else + # Tk_FontUseTBL.values | [] + Tk_FontUseTBL.values.uniq + end + } + end + + def TkFont.failsafe(font) + begin + if /^8\..*/ === Tk::TK_VERSION && JAPANIZED_TK + tk_call('font', 'failsafe', font) + end + rescue + end + end + + ################################### + # instance methods + ################################### + private + ################################### + def init_dummy_fontobj + Tk_FontID.mutex.synchronize{ + @id = Tk_FontID.join(TkCore::INTERP._ip_id_) + Tk_FontID[1].succ! + } + Tk_FontNameTBL.mutex.synchronize{ + Tk_FontNameTBL[@id] = self + } + + # @latin_desscendant = nil + # @kanji_desscendant = nil + @descendant = [nil, nil] # [latin, kanji] + + case (Tk::TK_VERSION) + when /^4\..*/ + @latinfont = "" + @kanjifont = "" + if JAPANIZED_TK + @compoundfont = [[@latinfont], [@kanjifont]] + @fontslot = {'font'=>@latinfont, 'kanjifont'=>@kanjifont} + else + @compoundfont = @latinfont + @fontslot = {'font'=>@latinfont} + end + else + @latinfont = @id + 'l' + @kanjifont = @id + 'k' + @compoundfont = @id + 'c' + + if JAPANIZED_TK + tk_call('font', 'create', @latinfont, '-charset', 'iso8859') + tk_call('font', 'create', @kanjifont, '-charset', 'jisx0208.1983') + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont]) + else + tk_call('font', 'create', @latinfont) + tk_call('font', 'create', @kanjifont) + tk_call('font', 'create', @compoundfont) + end + + @fontslot = {'font'=>@compoundfont} + end + + self + end + + def initialize(ltn=nil, knj=nil, keys=nil) + ltn = '{}' if ltn == '' + knj = '{}' if knj == '' + + Tk_FontID.mutex.synchronize{ + # @id = Tk_FontID.join('') + @id = Tk_FontID.join(TkCore::INTERP._ip_id_) + Tk_FontID[1].succ! + } + Tk_FontNameTBL.mutex.synchronize{ + Tk_FontNameTBL[@id] = self + } + + # @latin_desscendant = nil + # @kanji_desscendant = nil + @descendant = [nil, nil] # [latin, kanji] + + # @latinfont = @id + 'l' + # @kanjifont = @id + 'k' + # @compoundfont = @id + 'c' + # @fontslot = {} + + if knj.kind_of?(Hash) && !keys + keys = knj + knj = nil + end + + # compound font check + if Tk::TK_VERSION == '8.0' && JAPANIZED_TK + begin + compound = tk_split_simplelist(tk_call('font', 'configure', + ltn, '-compound')) + if knj == nil + if compound != [] + ltn, knj = compound + end + else + if compound != [] + ltn = compound[0] + end + compound = tk_split_simplelist(tk_call('font', 'configure', + knj, '-compound')) + if compound != [] + knj = compound[1] + end + end + rescue + end + end + + if ltn + if JAPANIZED_TK && !knj + if Tk::TK_VERSION =~ /^4..*/ + knj = DEFAULT_KANJI_FONT_NAME + else + knj = ltn + end + end + else + ltn = DEFAULT_LATIN_FONT_NAME + knj = DEFAULT_KANJI_FONT_NAME if JAPANIZED_TK && !knj + end + + create_compoundfont(ltn, knj, keys) + end + + def initialize_copy(font) + unless font.kind_of?(TkFont) + fail TypeError, '"initialize_copy should take same class object' + end + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + keys = {} + font.configinfo.each{|key,value| keys[key] = value } + initialize(font.latin_font_id, font.kanji_font_id, keys) + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + initialize(font.latin_font_id, font.kanji_font_id, font.configinfo) + end + end + + def _get_font_info_from_hash(font) + font = _symbolkey2str(font) + foundry = (info = font['foundry'] .to_s)? info: '*' + family = (info = font['family'] .to_s)? info: '*' + weight = (info = font['weight'] .to_s)? info: '*' + slant = (info = font['slant'] .to_s)? info: '*' + swidth = (info = font['swidth'] .to_s)? info: '*' + adstyle = (info = font['adstyle'] .to_s)? info: '*' + pixels = (info = font['pixels'] .to_s)? info: '*' + points = (info = font['points'] .to_s)? info: '*' + resx = (info = font['resx'] .to_s)? info: '*' + resy = (info = font['resy'] .to_s)? info: '*' + space = (info = font['space'] .to_s)? info: '*' + avgWidth = (info = font['avgWidth'].to_s)? info: '*' + charset = (info = font['charset'] .to_s)? info: '*' + encoding = (info = font['encoding'].to_s)? info: '*' + + [foundry, family, weight, slant, swidth, adstyle, + pixels, points, resx, resy, space, avgWidth, charset, encoding] + end + + def create_latinfont_tk4x(font) + if font.kind_of? Hash + @latinfont = '-' + _get_font_info_from_hash(font).join('-') + '-' + + elsif font.kind_of? Array + finfo = {} + finfo['family'] = font[0].to_s + if font[1] + fsize = font[1].to_s + if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/ + if $1 == '-' + finfo['pixels'] = $2 + else + finfo['points'] = $2 + end + else + finfo['points'] = '13' + end + end + font[2..-1].each{|style| + case (style) + when 'normal' + finfo['weight'] = style + when 'bold' + finfo['weight'] = style + when 'roman' + finfo['slant'] = 'r' + when 'italic' + finfo['slant'] = 'i' + end + } + + @latinfont = '-' + _get_font_info_from_hash(finfo).join('-') + '-' + + elsif font.kind_of? TkFont + @latinfont = font.latin_font + + else + if font + @latinfont = font + else + @latinfont = DEFAULT_LATIN_FONT_NAME + end + + end + end + + def create_kanjifont_tk4x(font) + unless JAPANIZED_TK + @kanjifont = "" + return + end + + if font.kind_of? Hash + @kanjifont = '-' + _get_font_info_from_hash(font).join('-') + '-' + + elsif font.kind_of? Array + finfo = {} + finfo['family'] = font[0].to_s + if font[1] + fsize = font[1].to_s + if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/ + if $1 == '-' + finfo['pixels'] = $2 + else + finfo['points'] = $2 + end + else + finfo['points'] = '13' + end + end + font[2..-1].each{|style| + case (style) + when 'normal' + finfo['weight'] = style + when 'bold' + finfo['weight'] = style + when 'roman' + finfo['slant'] = 'r' + when 'italic' + finfo['slant'] = 'i' + end + } + + @kanjifont = '-' + _get_font_info_from_hash(finfo).join('-') + '-' + elsif font.kind_of? TkFont + @kanjifont = font.kanji_font_id + else + if font + @kanjifont = font + else + @kanjifont = DEFAULT_KANJI_FONT_NAME + end + end + end + + def create_compoundfont_tk4x(ltn, knj, keys) + create_latinfont(ltn) + create_kanjifont(knj) + + if JAPANIZED_TK + @compoundfont = [[@latinfont], [@kanjifont]] + @fontslot = {'font'=>@latinfont, 'kanjifont'=>@kanjifont} + # @fontslot.clear + # @fontslot['font'] = @latinfont + # @fontslot['kanjifont'] = @kanjifont + else + @compoundfont = @latinfont + @fontslot = {'font'=>@latinfont} + # @fontslot.clear + # @fontslot['font'] = @latinfont + end + end + + def create_latinfont_tk8x(font) + @latinfont = @id + 'l' + + if JAPANIZED_TK + if font.kind_of? Hash + if font[:charset] || font['charset'] + tk_call('font', 'create', @latinfont, *hash_kv(font)) + else + tk_call('font', 'create', @latinfont, + '-charset', 'iso8859', *hash_kv(font)) + end + elsif font.kind_of? Array + tk_call('font', 'create', @latinfont, '-copy', array2tk_list(font)) + tk_call('font', 'configure', @latinfont, '-charset', 'iso8859') + elsif font.kind_of? TkFont + tk_call('font', 'create', @latinfont, '-copy', font.latin_font) + elsif font + tk_call('font', 'create', @latinfont, '-copy', font, + '-charset', 'iso8859') + else + tk_call('font', 'create', @latinfont, '-charset', 'iso8859') + end + else + if font.kind_of? Hash + tk_call('font', 'create', @latinfont, *hash_kv(font)) + else + keys = {} + if font.kind_of? Array + actual_core(array2tk_list(font)).each{|key,val| keys[key] = val} + elsif font.kind_of? TkFont + actual_core(font.latin_font).each{|key,val| keys[key] = val} + elsif font + actual_core(font).each{|key,val| keys[key] = val} + end + tk_call('font', 'create', @latinfont, *hash_kv(keys)) + end + + if font && @compoundfont + keys = {} + actual_core(@latinfont).each{|key,val| keys[key] = val} + tk_call('font', 'configure', @compoundfont, *hash_kv(keys)) + end + end + end + + def create_kanjifont_tk8x(font) + @kanjifont = @id + 'k' + + if JAPANIZED_TK + if font.kind_of? Hash + if font[:charset] || font['charset'] + tk_call('font', 'create', @kanjifont, *hash_kv(font)) + else + tk_call('font', 'create', @kanjifont, + '-charset', 'jisx0208.1983', *hash_kv(font)) + end + elsif font.kind_of? Array + tk_call('font', 'create', @kanjifont, '-copy', array2tk_list(font)) + tk_call('font', 'configure', @kanjifont, '-charset', 'jisx0208.1983') + elsif font.kind_of? TkFont + tk_call('font', 'create', @kanjifont, '-copy', font.kanji_font_id) + elsif font + tk_call('font', 'create', @kanjifont, '-copy', font, + '-charset', 'jisx0208.1983') + else + tk_call('font', 'create', @kanjifont, '-charset', 'jisx0208.1983') + end + # end of JAPANIZED_TK + + else + if font.kind_of? Hash + tk_call('font', 'create', @kanjifont, *hash_kv(font)) + else + keys = {} + if font.kind_of? Array + actual_core(array2tk_list(font)).each{|key,val| keys[key] = val} + elsif font.kind_of? TkFont + actual_core(font.kanji_font_id).each{|key,val| keys[key] = val} + elsif font + actual_core(font).each{|key,val| keys[key] = val} + end + tk_call('font', 'create', @kanjifont, *hash_kv(keys)) + end + + if font && @compoundfont + keys = {} + actual_core(@kanjifont).each{|key,val| keys[key] = val} + tk_call('font', 'configure', @compoundfont, *hash_kv(keys)) + end + end + end + + def create_compoundfont_tk8x(ltn, knj, keys) + if knj + create_latinfont(ltn) + create_kanjifont(knj) + else + cfnt = ltn + create_kanjifont(cfnt) + create_latinfont(cfnt) + end + + @compoundfont = @id + 'c' + + if JAPANIZED_TK + unless keys + keys = {} + else + keys = keys.dup + end + if (tk_call('font', 'configure', @latinfont, '-underline') == '1' && + tk_call('font', 'configure', @kanjifont, '-underline') == '1' && + !keys.key?('underline')) + keys['underline'] = true + end + if (tk_call('font', 'configure', @latinfont, '-overstrike') == '1' && + tk_call('font', 'configure', @kanjifont, '-overstrike') == '1' && + !keys.key?('overstrike')) + keys['overstrike'] = true + end + + @fontslot = {'font'=>@compoundfont} + # @fontslot['font'] = @compoundfont + begin + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + rescue RuntimeError => e + if ltn == knj + if e.message =~ /kanji font .* specified/ + tk_call('font', 'delete', @latinfont) + create_latinfont(DEFAULT_LATIN_FONT_NAME) + opts = [] + Hash[*(tk_split_simplelist(tk_call('font', 'configure', + @kanjifont)))].each{|k,v| + case k + when '-size', '-weight', '-slant', '-underline', '-overstrike' + opts << k << v + end + } + tk_call('font', 'configure', @latinfont, *opts) + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + + elsif e.message =~ /ascii font .* specified/ + tk_call('font', 'delete', @kanjifont) + create_kanjifont(DEFAULT_KANJI_FONT_NAME) + opts = [] + Hash[*(tk_split_simplelist(tk_call('font', 'configure', + @latinfont)))].each{|k,v| + case k + when '-size', '-weight', '-slant', '-underline', '-overstrike' + opts << k << v + end + } + tk_call('font', 'configure', @kanjifont, *opts) + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + + else + raise e + end + else + raise e + end + end + else + tk_call('font', 'create', @compoundfont) + + latinkeys = {} + begin + actual_core(@latinfont).each{|key,val| latinkeys[key] = val} + rescue + latinkeys = {} + end + if latinkeys != {} + tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) + end + + if knj + compoundkeys = nil + kanjikeys = {} + begin + actual_core(@kanjifont).each{|key,val| kanjikeys[key] = val} + rescue + kanjikeys = {} + end + if kanjikeys != {} + tk_call('font', 'configure', @compoundfont, *hash_kv(kanjikeys)) + end + end + + if cfnt + if cfnt.kind_of?(Hash) + compoundkeys = cfnt.dup + else + compoundkeys = {} + actual_core(cfnt).each{|key,val| compoundkeys[key] = val} + end + compoundkeys.update(_symbolkey2str(keys)) + keys = compoundkeys + end + + @fontslot = {'font'=>@compoundfont} + # @fontslot['font'] = @compoundfont + tk_call('font', 'configure', @compoundfont, *hash_kv(keys)) + end + end + + ################################### + public + ################################### + def inspect + sprintf("#<%s:%0x:%s>", self.class.inspect, self.__id__, @compoundfont) + end + + def method_missing(id, *args) + name = id.id2name + case args.length + when 1 + if name[-1] == ?= + configure name[0..-2], args[0] + args[0] + else + configure name, args[0] + self + end + when 0 + begin + configinfo name + rescue + super(id, *args) +# fail NameError, "undefined local variable or method `#{name}' for #{self.to_s}", error_at + end + else + super(id, *args) +# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at + end + end + + def call_font_configure(path, *args) + if path.kind_of?(Array) + # [path, optkey] + win, tag = path[0].split(';') + optkey = path[1].to_s + else + win, tag, optkey = path.split(';') + end + + fontslot = _symbolkey2str(@fontslot) + if optkey && optkey != "" + ltn = fontslot.delete('font') + knj = fontslot.delete('kanjifont') + fontslot[optkey] = ltn if ltn + fontslot["kanji#{optkey}"] = knj if knj + end + + keys = _symbolkey2str(args.pop).update(fontslot) + args.concat(hash_kv(keys)) + begin + tk_call(*args) + rescue => e + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + fail e + end + end + Tk_FontUseTBL.mutex.synchronize{ + Tk_FontUseTBL[[win, tag, optkey].join(';')] = self + } + self + end + + def used + ret = [] + table = nil + Tk_FontUseTBL.mutex.synchronize{ + table = Tk_FontUseTBL.clone # to avoid deadlock + } + table.each{|key,value| + next unless self == value + if key.include?(';') + win, tag, optkey = key.split(';') + winobj = tk_tcl2ruby(win) + #if winobj.kind_of? TkText + if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text) + if optkey + ret.push([winobj, winobj.tagid2obj(tag), optkey]) + else + ret.push([winobj, winobj.tagid2obj(tag)]) + end + #elsif winobj.kind_of? TkCanvas + elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas) + if (tagobj = TkcTag.id2obj(winobj, tag)).kind_of? TkcTag + if optkey + ret.push([winobj, tagobj, optkey]) + else + ret.push([winobj, tagobj]) + end + elsif (tagobj = TkcItem.id2obj(winobj, tag)).kind_of? TkcItem + if optkey + ret.push([winobj, tagobj, optkey]) + else + ret.push([winobj, tagobj]) + end + else + if optkey + ret.push([winobj, tag, optkey]) + else + ret.push([winobj, tag]) + end + end + #elsif winobj.kind_of? TkMenu + elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu) + if optkey + ret.push([winobj, tag, optkey]) + else + ret.push([winobj, tag]) + end + else + if optkey + ret.push([win, tag, optkey]) + else + ret.push([win, tag]) + end + end + else + ret.push(tk_tcl2ruby(key)) + end + } + ret + end + + def id + @id + end + + def to_eval + font + end + + def font + @compoundfont + end + alias font_id font + alias name font + alias to_s font + + def latin_font_id + @latinfont + end + + def latin_font + # @latinfont + if @descendant[0] # [0] -> latin + @descendant[0] + else + @descendant[0] = DescendantFont.new(self, 'latin') + end +=begin + if @latin_descendant + @latin_descendant + else + @latin_descendant = DescendantFont.new(self, 'latin') + end +=end + end + alias latinfont latin_font + + def kanji_font_id + @kanjifont + end + + def kanji_font + # @kanjifont + if @descendant[1] # [1] -> kanji + @descendant[1] + else + @descendant[1] = DescendantFont.new(self, 'kanji') + end +=begin + if @kanji_descendant + @kanji_descendant + else + @kanji_descendant = DescendantFont.new(self, 'kanji') + end +=end + end + alias kanjifont kanji_font + + def actual(option=nil) + actual_core(@compoundfont, nil, option) + end + def actual_hash(option=nil) + Hash[actual(option)] + end + + def actual_displayof(win, option=nil) + win = '.' unless win + actual_core(@compoundfont, win, option) + end + def actual_hash_displayof(win, option=nil) + Hash[actual_displayof(win, option)] + end + + def latin_actual(option=nil) + if @latinfont == nil + actual_core(@compoundfont, nil, option) # use @compoundfont + else + actual_core(@latinfont, nil, option) + end + end + def latin_actual_hash(option=nil) + Hash[latin_actual(option)] + end + + def latin_actual_displayof(win, option=nil) + win = '.' unless win + if @latinfont == nil + actual_core(@compoundfont, win, option) # use @compoundfont + else + actual_core(@latinfont, win, option) + end + end + def latin_actual_hash_displayof(win, option=nil) + Hash[latin_actual_displayof(win, option)] + end + + def kanji_actual(option=nil) + #if JAPANIZED_TK + if @kanjifont == nil + actual_core(@compoundfont, nil, option) # use @compoundfont + elsif @kanjifont != "" + actual_core(@kanjifont, nil, option) + else + actual_core_tk4x(nil, nil, option) + end + end + def kanji_actual_hash(option=nil) + Hash[kanji_actual(option)] + end + + def kanji_actual_displayof(win, option=nil) + #if JAPANIZED_TK + if @kanjifont == nil + actual_core(@compoundfont, nil, option) # use @compoundfont + elsif @kanjifont != "" + win = '.' unless win + actual_core(@kanjifont, win, option) + else + actual_core_tk4x(nil, win, option) + end + end + def kanji_actual_hash_displayof(win, option=nil) + Hash[kanji_actual_displayof(win, option)] + end + + def [](slot) + configinfo slot + end + + def []=(slot, val) + configure slot, val + val + end + + def configure(slot, value=None) + configure_core(@compoundfont, slot, value) + self + end + + def configinfo(slot=nil) + configinfo_core(@compoundfont, slot) + end + + def current_configinfo(slot=nil) + current_configinfo_core(@compoundfont, slot) + end + + def delete + delete_core + end + + def latin_configure(slot, value=None) + if JAPANIZED_TK + configure_core(@latinfont, slot, value) + else + configure(slot, value) + end + self + end + + def latin_configinfo(slot=nil) + if JAPANIZED_TK + configinfo_core(@latinfont, slot) + else + configinfo(slot) + end + end + def latin_current_configinfo(slot=nil) + Hash[latin_configinfo(slot)] + end + + def kanji_configure(slot, value=None) + #if JAPANIZED_TK + if @kanjifont == nil + configure_core(@compoundfont, slot, value) # use @compoundfont + elsif @kanjifont != "" + configure_core(@kanjifont, slot, value) + configure('size'=>configinfo('size')) # to reflect new configuration + else + #"" + configure(slot, value) + end + self + end + + def kanji_configinfo(slot=nil) + #if JAPANIZED_TK + if @kanjifont == nil + configure_core(@compoundfont, slot) # use @compoundfont + elsif @kanjifont != "" + configinfo_core(@kanjifont, slot) + else + #[] + configinfo(slot) + end + end + def kanji_current_configinfo(slot=nil) + Hash[kanji_configinfo(slot)] + end + + def replace(ltn, knj=None) + knj = ltn if knj == None + latin_replace(ltn) + kanji_replace(knj) + self + end + + def latin_replace(ltn) + if @latinfont + latin_replace_core(ltn) + reset_pointadjust + else + # not compound font -> copy properties of ltn + latinkeys = {} + begin + actual_core(ltn).each{|key,val| latinkeys[key] = val} + rescue + latinkeys = {} + end + begin + tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) + rescue + # not exist? (deleted?) -> create font + tk_call('font', 'create', @compoundfont, *hash_kv(latinkeys)) + end + end + + self + end + + def kanji_replace(knj) + return self unless @kanjifont # ignore + kanji_replace_core(knj) + reset_pointadjust + self + end + + def measure(text) + measure_core(@compoundfont, nil, text) + end + + def measure_displayof(win, text) + win = '.' unless win + measure_core(@compoundfont, win, text) + end + + def metrics(option=nil) + metrics_core(@compoundfont, nil, option) + end + def metrics_hash(option=nil) + if option + val = metrics(option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[metrics(option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def metrics_displayof(win, option=nil) + win = '.' unless win + metrics_core(@compoundfont, win, option) + end + def metrics_hash_displayof(win, option=nil) + if option + val = metrics_displayof(win, option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[metrics_displayof(win, option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def latin_metrics(option=nil) + if @latinfont == nil + metrics_core(@compoundfont, nil, option) # use @compoundfont + else + metrics_core(@latinfont, nil, option) + end + end + def latin_metrics_hash(option=nil) + if option + val = latin_metrics(option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[latin_metrics(option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def latin_metrics_displayof(win, option=nil) + win = '.' unless win + if @latinfont == nil + metrics_core(@compoundfont, win, option) # use @compoundfont + else + metrics_core(@latinfont, win, option) + end + end + def latin_metrics_hash_displayof(win, option=nil) + if option + val = latin_metrics_displayof(win, option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[latin_metrics_displayof(win, option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def kanji_metrics(option=nil) + if @latinfont == nil + metrics_core(@compoundfont, nil, option) # use @compoundfont + elsif JAPANIZED_TK + metrics_core(@kanjifont, nil, option) + else + metrics_core_tk4x(nil, nil, option) + end + end + def kanji_metrics_hash(option=nil) + if option + val = kanji_metrics(option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[kanji_metrics(option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def kanji_metrics_displayof(win, option=nil) + win = '.' unless win + if @latinfont == nil + metrics_core(@compoundfont, win, option) # use @compoundfont + elsif JAPANIZED_TK + metrics_core(@kanjifont, win, option) + else + metrics_core_tk4x(nil, win, option) + end + end + def kanji_metrics_hash_displayof(win, option=nil) + if option + val = kanji_metrics_displayof(win, option) + case TkFont::MetricsType[option.to_s] + when ?n + val = TkComm::num_or_str(val) + when ?b + val = TkComm::bool(val) + else + # do nothing + end + return val + end + + h = Hash[kanji_metrics_displayof(win, option)] + h.keys.each{|k| + case TkFont::MetricsType[k.to_s] + when ?n + h[k] = TkComm::num_or_str(h[k]) + when ?b + h[k] = TkComm::bool(h[k]) + else + # do nothing + end + } + h + end + + def reset_pointadjust + begin + if /^8\..*/ === Tk::TK_VERSION && JAPANIZED_TK + configure('pointadjust' => latin_actual.assoc('size')[1].to_f / + kanji_actual.assoc('size')[1].to_f ) + end + rescue + end + self + end + + ################################### + # private alias + ################################### + case (Tk::TK_VERSION) + when /^4\..*/ + alias create_latinfont create_latinfont_tk4x + alias create_kanjifont create_kanjifont_tk4x + alias create_compoundfont create_compoundfont_tk4x + + when /^8\.[0-5]/ + alias create_latinfont create_latinfont_tk8x + alias create_kanjifont create_kanjifont_tk8x + alias create_compoundfont create_compoundfont_tk8x + + else + alias create_latinfont create_latinfont_tk8x + alias create_kanjifont create_kanjifont_tk8x + alias create_compoundfont create_compoundfont_tk8x + + end + + ################################### + # public alias + ################################### + alias ascii_font latin_font + alias asciifont latinfont + alias create_asciifont create_latinfont + alias ascii_actual latin_actual + alias ascii_actual_displayof latin_actual_displayof + alias ascii_configure latin_configure + alias ascii_configinfo latin_configinfo + alias ascii_replace latin_replace + alias ascii_metrics latin_metrics + + ################################### +=begin + def dup + TkFont.new(self) + end + def clone + TkFont.new(self) + end +=end +end + +module TkFont::CoreMethods + include Tk + extend TkCore + + private + + def actual_core_tk4x(font, win=nil, option=nil) + # dummy + if option == 'pointadjust' || option == :pointadjust + 1.0 + elsif option + case TkFont::OptionType[option.to_s] + when ?n + 0 + when ?b + false + else + '' + end + else + [['family',''], ['size',0], ['weight',''], ['slant',''], + ['underline',false], ['overstrike',false], ['charset',''], + ['pointadjust',0]] + end + end + + def actual_core_tk8x(font, win=nil, option=nil) + font = '{}' if font == '' + + if option == 'compound' || option == :compound + "" + elsif option + if win + val = tk_call('font', 'actual', font, + "-displayof", win, "-#{option}") + else + val = tk_call('font', 'actual', font, "-#{option}") + end + case TkFont::OptionType[option.to_s] + when ?n + num_or_str(val) + when ?b + bool(val) + else + val + end + else + l = tk_split_simplelist(if win + tk_call('font', 'actual', font, + "-displayof", win) + else + tk_call('font', 'actual', font) + end) + r = [] + while key=l.shift + if key == '-compound' + l.shift + else + key = key[1..-1] + val = l.shift + case TkFont::OptionType[key] + when ?n + r.push [key, num_or_str(val)] + when ?b + r.push [key, bool(val)] + else + r.push [key, val] + end + end + end + r + end + end + + def configure_core_tk4x(font, slot, value=None) + #"" + self + end + + def configinfo_core_tk4x(font, option=nil) + # dummy + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + if option == 'pointadjust' || option == :pointadjust + 1.0 + elsif option + case TkFont::OptionType[option.to_s] + when ?n + 0 + when ?b + false + else + '' + end + else + [['family',''], ['size',0], ['weight',''], ['slant',''], + ['underline',false], ['overstrike',false], ['charset',''], + ['pointadjust',1.0]] + end + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + current_configinfo_core_tk4x(font, option) + end + end + + def current_configinfo_core_tk4x(font, option=nil) + if option + case TkFont::OptionType[option.to_s] + when ?n + 0 + when ?b + false + else + '' + end + else + {'family'=>'', 'size'=>0, 'weight'=>'', 'slant'=>'', + 'underline'=>false, 'overstrike'=>false, + 'charset'=>false, 'pointadjust'=>1.0} + end + end + + def configure_core_tk8x(font, slot, value=None) + if JAPANIZED_TK + begin + padjust = tk_call('font', 'configure', font, '-pointadjust') + rescue + padjust = nil + end + else + padjust = nil + end + if slot.kind_of? Hash + if JAPANIZED_TK && (slot.key?('family') || slot.key?(:family)) + slot = _symbolkey2str(slot) + configure_core_tk8x(font, 'family', slot.delete('family')) + end + + if ((slot.key?('size') || slot.key?(:size)) && + padjust && !slot.key?('pointadjust') && !slot.key?(:pointadjust)) + tk_call('font', 'configure', font, + '-pointadjust', padjust, *hash_kv(slot)) + else + tk_call('font', 'configure', font, *hash_kv(slot)) + end + elsif (slot == 'size' || slot == :size) && padjust != nil + tk_call('font', 'configure', font, + "-#{slot}", value, '-pointadjust', padjust) + elsif JAPANIZED_TK && (slot == 'family' || slot == :family) + # coumpund font? + begin + compound = tk_split_simplelist(tk_call('font', 'configure', + font, '-compound')) + rescue + tk_call('font', 'configure', font, '-family', value) + return self + end + if compound == [] + tk_call('font', 'configure', font, '-family', value) + return self + end + ltn, knj = compound + + lfnt = tk_call('font', 'create', '-copy', ltn) + begin + tk_call('font', 'configure', lfnt, '-family', value) + latin_replace_core_tk8x(lfnt) + rescue RuntimeError => e + fail e if $DEBUG + ensure + tk_call('font', 'delete', lfnt) if lfnt != '' + end + + kfnt = tk_call('font', 'create', '-copy', knj) + begin + tk_call('font', 'configure', kfnt, '-family', value) + kanji_replace_core_tk8x(lfnt) + rescue RuntimeError => e + fail e if $DEBUG + ensure + tk_call('font', 'delete', kfnt) if kfnt != '' + end + + else + tk_call('font', 'configure', font, "-#{slot}", value) + end + self + end + + def configinfo_core_tk8x(font, option=nil) + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + if option == 'compound' || option == :compound + "" + elsif option + val = tk_call('font', 'configure', font, "-#{option}") + case TkFont::OptionType[option.to_s] + when ?n + num_or_str(val) + when ?b + bool(val) + else + val + end + else + l = tk_split_simplelist(tk_call('font', 'configure', font)) + r = [] + while key=l.shift + if key == '-compound' + l.shift + else + key = key[1..-1] + val = l.shift + case TkFont::OptionType[key] + when ?n + r.push [key, num_or_str(val)] + when ?b + r.push [key, bool(val)] + else + r.push [key, val] + end + end + end + r + end + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + current_configinfo_core_tk8x(font, option) + end + end + + def current_configinfo_core_tk8x(font, option=nil) + if option == 'compound' + "" + elsif option + val = tk_call('font', 'configure', font, "-#{option}") + case TkFont::OptionType[option.to_s] + when ?n + num_or_str(val) + when ?b + bool(val) + else + val + end + else + l = tk_split_simplelist(tk_call('font', 'configure', font)) + h = {} + while key=l.shift + if key == '-compound' + l.shift + else + key = key[1..-1] + val = l.shift + case TkFont::OptionType[key] + when ?n + h[key] = num_or_str(val) + when ?b + h[key] = bool(val) + else + h[key] = val + end + end + end + h + end + end + + def delete_core_tk4x + TkFont::Tk_FontNameTBL.mutex.synchronize{ + TkFont::Tk_FontNameTBL.delete(@id) + } + TkFont::Tk_FontUseTBL.mutex.synchronize{ + TkFont::Tk_FontUseTBL.delete_if{|key,value| value == self} + } + end + + def delete_core_tk8x + begin + tk_call('font', 'delete', @latinfont) if @latinfont + rescue + end + begin + tk_call('font', 'delete', @kanjifont) if @kanjifont + rescue + end + begin + tk_call('font', 'delete', @compoundfont) if @compoundfont + rescue + end + TkFont::Tk_FontNameTBL.mutex.synchronize{ + TkFont::Tk_FontNameTBL.delete(@id) + } + TkFont::Tk_FontUseTBL.mutex.synchronize{ + TkFont::Tk_FontUseTBL.delete_if{|key,value| value == self} + } + end + + def latin_replace_core_tk4x(ltn) + create_latinfont_tk4x(ltn) + @compoundfont[0] = [@latinfont] if JAPANIZED_TK + @fontslot['font'] = @latinfont + table = nil + TkFont::Tk_FontUseTBL.mutex.synchronize{ + table = TkFont::Tk_FontUseTBL.clone + } + table.each{|w, fobj| + if self == fobj + begin + if w.include?(';') + win, tag, optkey = w.split(';') + optkey = 'font' if optkey == nil || optkey == '' + winobj = tk_tcl2ruby(win) +# winobj.tagfont_configure(tag, {'font'=>@latinfont}) + #if winobj.kind_of? TkText + if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text) + tk_call(win, 'tag', 'configure', tag, "-#{optkey}", @latinfont) + #elsif winobj.kind_of? TkCanvas + elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas) + tk_call(win, 'itemconfigure', tag, "-#{optkey}", @latinfont) + #elsif winobj.kind_of? TkMenu + elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu) + tk_call(win, 'entryconfigure', tag, "-#{optkey}", @latinfont) + else + raise RuntimeError, "unknown widget type" + end + else +# tk_tcl2ruby(w).font_configure('font'=>@latinfont) + tk_call(w, 'configure', '-font', @latinfont) + end + rescue + TkFont::Tk_FontUseTBL.mutex.synchronize{ + TkFont::Tk_FontUseTBL.delete(w) + } + end + end + } + self + end + + def kanji_replace_core_tk4x(knj) + return self unless JAPANIZED_TK + + create_kanjifont_tk4x(knj) + @compoundfont[1] = [@kanjifont] + @fontslot['kanjifont'] = @kanjifont + table = nil + TkFont::Tk_FontUseTBL.mutex.synchronize{ + table = TkFont::Tk_FontUseTBL.clone + } + table.dup.each{|w, fobj| + if self == fobj + begin + if w.include?(';') + win, tag, optkey = w.split(';') + optkey = 'kanjifont' unless optkey + winobj = tk_tcl2ruby(win) +# winobj.tagfont_configure(tag, {'kanjifont'=>@kanjifont}) + #if winobj.kind_of? TkText + if winobj.kind_of?(TkText) || winobj.kind_of?(Tk::Text) + tk_call(win, 'tag', 'configure', tag, "-#{optkey}", @kanjifont) + #elsif winobj.kind_of? TkCanvas + elsif winobj.kind_of?(TkCanvas) || winobj.kind_of?(Tk::Canvas) + tk_call(win, 'itemconfigure', tag, "-#{optkey}", @kanjifont) + #elsif winobj.kind_of? TkMenu + elsif winobj.kind_of?(TkMenu) || winobj.kind_of?(Tk::Menu) + tk_call(win, 'entryconfigure', tag, "-#{optkey}", @latinfont) + else + raise RuntimeError, "unknown widget type" + end + else +# tk_tcl2ruby(w).font_configure('kanjifont'=>@kanjifont) + tk_call(w, 'configure', '-kanjifont', @kanjifont) + end + rescue + Tk_FontUseTBL.mutex.synchronize{ + TkFont::Tk_FontUseTBL.delete(w) + } + end + end + } + self + end + + def latin_replace_core_tk8x(ltn) + ltn = '{}' if ltn == '' + + if JAPANIZED_TK + begin + tk_call('font', 'delete', '@font_tmp') + rescue + end + begin + fnt_bup = tk_call('font', 'create', '@font_tmp', '-copy', @latinfont) + rescue + #fnt_bup = '' + fnt_bup = TkFont::DEFAULT_LATIN_FONT_NAME + end + end + + begin + tk_call('font', 'delete', @latinfont) + rescue + end + create_latinfont(ltn) + + if JAPANIZED_TK + keys = self.configinfo + tk_call('font', 'delete', @compoundfont) + begin + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) +=begin + latinkeys = {} + begin + actual_core(@latinfont).each{|key,val| latinkeys[key] = val} + rescue + latinkeys = {} + end + if latinkeys != {} + tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) + end +=end + rescue RuntimeError => e + tk_call('font', 'delete', @latinfont) + if fnt_bup && fnt_bup != '' + tk_call('font', 'create', @latinfont, '-copy', fnt_bup) + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + tk_call('font', 'delete', fnt_bup) + else + fail e + end + end + + else + latinkeys = {} + begin + actual_core(@latinfont).each{|key,val| latinkeys[key] = val} + rescue + latinkeys = {} + end + begin + tk_call('font', 'configure', @compoundfont, *hash_kv(latinkeys)) + rescue + # not exist? (deleted?) -> create font + tk_call('font', 'create', @compoundfont, *hash_kv(latinkeys)) + end + end + self + end + + def kanji_replace_core_tk8x(knj) + knj = '{}' if knj == '' + + if JAPANIZED_TK + begin + tk_call('font', 'delete', '@font_tmp') + rescue + end + begin + fnt_bup = tk_call('font', 'create', '@font_tmp', '-copy', @kanjifont) + rescue + #fnt_bup = '' + fnt_bup = TkFont::DEFAULT_KANJI_FONT_NAME + end + end + + begin + tk_call('font', 'delete', @kanjifont) + rescue + end + create_kanjifont(knj) + + if JAPANIZED_TK + keys = self.configinfo + tk_call('font', 'delete', @compoundfont) + begin + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + rescue RuntimeError => e + tk_call('font', 'delete', @kanjifont) + if fnt_bup && fnt_bup != '' + tk_call('font', 'create', @kanjifont, '-copy', fnt_bup) + tk_call('font', 'create', @compoundfont, + '-compound', [@latinfont, @kanjifont], *hash_kv(keys)) + tk_call('font', 'delete', fnt_bup) + else + fail e + end + end + end + self + end + + def measure_core_tk4x(font, win, text) + 0 + end + + def measure_core_tk8x(font, win, text) + font = '{}' if font == '' + + if win + number(tk_call('font', 'measure', font, + '-displayof', win, text)) + else + number(tk_call('font', 'measure', font, text)) + end + end + + def metrics_core_tk4x(font, win, option=nil) + # dummy + if option + "" + else + [['ascent',[]], ['descent',[]], ['linespace',[]], ['fixed',[]]] + end + end + + def metrics_core_tk8x(font, win, option=nil) + font = '{}' if font == '' + + if option + if win + number(tk_call('font', 'metrics', font, + "-displayof", win, "-#{option}")) + else + number(tk_call('font', 'metrics', font, "-#{option}")) + end + else + l = tk_split_list(if win + tk_call('font','metrics',font,"-displayof",win) + else + tk_call('font','metrics',font) + end) + r = [] + while key=l.shift + r.push [key[1..-1], l.shift.to_i] +=begin + if key == '-fixed' # boolean value + r.push [key[1..-1], bool(l.shift)] + else + r.push [key[1..-1], l.shift.to_i] + end +=end + end + r + end + end + + ################################### + # private alias + ################################### + case (Tk::TK_VERSION) + when /^4\..*/ + alias actual_core actual_core_tk4x + alias configure_core configure_core_tk4x + alias configinfo_core configinfo_core_tk4x + alias current_configinfo_core current_configinfo_core_tk4x + alias delete_core delete_core_tk4x + alias latin_replace_core latin_replace_core_tk4x + alias kanji_replace_core kanji_replace_core_tk4x + alias measure_core measure_core_tk4x + alias metrics_core metrics_core_tk4x + + when /^8\.[0-5]/ + alias actual_core actual_core_tk8x + alias configure_core configure_core_tk8x + alias configinfo_core configinfo_core_tk8x + alias current_configinfo_core current_configinfo_core_tk8x + alias delete_core delete_core_tk8x + alias latin_replace_core latin_replace_core_tk8x + alias kanji_replace_core kanji_replace_core_tk8x + alias measure_core measure_core_tk8x + alias metrics_core metrics_core_tk8x + + else + alias actual_core actual_core_tk8x + alias configure_core configure_core_tk8x + alias configinfo_core configinfo_core_tk8x + alias current_configinfo_core current_configinfo_core_tk8x + alias delete_core delete_core_tk8x + alias latin_replace_core latin_replace_core_tk8x + alias kanji_replace_core kanji_replace_core_tk8x + alias measure_core measure_core_tk8x + alias metrics_core metrics_core_tk8x + + end +end + +class TkFont + include TkFont::CoreMethods + extend TkFont::CoreMethods +end + +class TkNamedFont < TkFont + # for built-in named fonts + def TkNamedFont.find(name) + name = name.to_s + unless (obj = Tk_FontNameTBL[name]) + obj = self.new(name) if TkFont.is_system_font?(name) + end + obj + end + + def TkNamedFont.new(name, keys=nil) + name = name.to_s + obj = nil + Tk_FontNameTBL.mutex.synchronize{ + unless (obj = Tk_FontNameTBL[name]) + (obj = self.allocate).instance_eval{ + @id = @compoundfont = name.to_s + @latinfont = nil + @kanjifont = nil + @descendant = [self, self] # [latin, kanji] : dummy + Tk_FontNameTBL[@id] = self + } + end + } + obj.instance_eval{ initialize(name, keys) } + obj + end + + ########################### + private + ########################### + def initialize(name, keys=nil) + @id = @compoundfont = name.to_s + + # if not exist named font, create it. + begin + if keys + tk_call('font', 'configure', @compoundfont, keys) + else + tk_call('font', 'configure', @compoundfont) + end + rescue + # the named font doesn't exist -> create + if keys + tk_call('font', 'create', @compoundfont, keys) + else + tk_call('font', 'create', @compoundfont) + end + end + end + + def create_latinfont(fnt) + # ignore + end + def create_kanjifont(fnt) + # ignore + end + def create_compoundfont(ltn, knj, keys) + # ignore + end + + ########################### + public + ########################### + def latin_font_id + @compoundfont + end + def kanji_font_id + @compoundfont + end +end + +####################################### +# define system font names +####################################### +if Tk::TCL_MAJOR_VERSION > 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) + # add standard fonts of Tcl/Tk 8.5+ + TkFont::SYSTEM_FONT_NAMES.add [ + 'TkDefaultFont', 'TkTextFont', 'TkFixedFont', 'TkMenuFont', + 'TkHeadingFont', 'TkCaptionFont', 'TkSmallCaptionFont', + 'TkIconFont', 'TkTooltipFont' + ] +end + +# platform-specific fonts +# -- windows +TkFont::SYSTEM_FONT_NAMES.add [ + 'ansifixed', 'ansi', 'device', 'oemfixed', 'systemfixed', 'system' +] + +# -- macintosh, macosx +TkFont::SYSTEM_FONT_NAMES.add ['system', 'application'] + +if Tk::TCL_MAJOR_VERSION > 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) + TkFont::SYSTEM_FONT_NAMES.add ['menu'] +end + +# -- macosx (Aqua theme) +if Tk::TCL_MAJOR_VERSION > 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) + TkFont::SYSTEM_FONT_NAMES.add [ + 'systemSystemFont', 'systemEmphasizedSystemFont', + 'systemSmallSystemFont', 'systemSmallEmphasizedSystemFont', + 'systemApplicationFont', 'systemLabelFont', 'systemViewsFont', + 'systemMenuTitleFont', 'systemMenuItemFont', 'systemMenuItemMarkFont', + 'systemMenuItemCmdKeyFont', 'systemWindowTitleFont', + 'systemPushButtonFont', 'systemUtilityWindowTitleFont', + 'systemAlertHeaderFont', 'systemToolbarFont', 'systemMiniSystemFont', + 'systemDetailSystemFont', 'systemDetailEmphasizedSystemFont' + ] +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/frame.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/frame.rb new file mode 100644 index 0000000..263b160 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/frame.rb @@ -0,0 +1,131 @@ +# +# tk/frame.rb : treat frame widget +# +require 'tk' + +class Tk::Frameparent} + end + end + if keys.key?('classname') + keys['class'] = keys.delete('classname') + end + @classname = keys['class'] + @colormap = keys['colormap'] + @container = keys['container'] + @visual = keys['visual'] + if !@classname && my_class_name + keys['class'] = @classname = my_class_name + end + if @classname.kind_of? TkBindTag + @db_class = @classname + @classname = @classname.id + elsif @classname + @db_class = TkDatabaseClass.new(@classname) + else + @db_class = self.class + @classname = @db_class::WidgetClassName + end + super(keys) + end + + #def create_self(keys) + # if keys and keys != None + # tk_call_without_enc('frame', @path, *hash_kv(keys)) + # else + # tk_call_without_enc( 'frame', @path) + # end + #end + #private :create_self + + def database_classname + @classname + end + + def self.database_class + if self == WidgetClassNames[WidgetClassName] || self.name == '' + self + else + TkDatabaseClass.new(self.name) + end + end + def self.database_classname + self.database_class.name + end + + def self.bind(*args, &b) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args, &b) + else + TkDatabaseClass.new(self.name).bind(*args, &b) + end + end + def self.bind_append(*args, &b) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args, &b) + else + TkDatabaseClass.new(self.name).bind_append(*args, &b) + end + end + def self.bind_remove(*args) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args) + else + TkDatabaseClass.new(self.name).bind_remove(*args) + end + end + def self.bindinfo(*args) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args) + else + TkDatabaseClass.new(self.name).bindinfo(*args) + end + end +end + +#TkFrame = Tk::Frame unless Object.const_defined? :TkFrame +Tk.__set_toplevel_aliases__(:Tk, Tk::Frame, :TkFrame) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/grid.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/grid.rb new file mode 100644 index 0000000..0dfd726 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/grid.rb @@ -0,0 +1,265 @@ +# +# tk/grid.rb : control grid geometry manager +# +require 'tk' + +module TkGrid + include Tk + extend Tk + + TkCommandNames = ['grid'.freeze].freeze + + def anchor(master, anchor=None) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + tk_call_without_enc('grid', 'anchor', master, anchor) + end + + def bbox(master, *args) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + args.unshift(master) + list(tk_call_without_enc('grid', 'bbox', *args)) + end + +=begin + def configure(win, *args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + params = [] + params.push(_epath(win)) + args.each{|win| + case win + when '-', 'x', '^' # RELATIVE PLACEMENT + params.push(win) + else + params.push(_epath(win)) + end + } + opts.each{|k, v| + params.push("-#{k}") + params.push((v.kind_of?(TkObject))? v.epath: v) + } + if Tk::TCL_MAJOR_VERSION < 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION <= 3) + if params[0] == '-' || params[0] == 'x' || params[0] == '^' + tk_call_without_enc('grid', *params) + else + tk_call_without_enc('grid', 'configure', *params) + end + else + tk_call_without_enc('grid', 'configure', *params) + end + end +=end + def configure(*args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + fail ArgumentError, 'no widget is given' if args.empty? + params = [] + args.flatten(1).each{|win| + case win + when '-', ?- # RELATIVE PLACEMENT (increase columnspan) + params.push('-') + when /^-+$/ # RELATIVE PLACEMENT (increase columnspan) + params.concat(win.to_s.split(//)) + when '^', ?^ # RELATIVE PLACEMENT (increase rowspan) + params.push('^') + when /^\^+$/ # RELATIVE PLACEMENT (increase rowspan) + params.concat(win.to_s.split(//)) + when 'x', :x, ?x, nil, '' # RELATIVE PLACEMENT (empty column) + params.push('x') + when /^x+$/ # RELATIVE PLACEMENT (empty column) + params.concat(win.to_s.split(//)) + else + params.push(_epath(win)) + end + } + opts.each{|k, v| + params.push("-#{k}") + params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable) + } + if Tk::TCL_MAJOR_VERSION < 8 || + (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION <= 3) + if params[0] == '-' || params[0] == 'x' || params[0] == '^' + tk_call_without_enc('grid', *params) + else + tk_call_without_enc('grid', 'configure', *params) + end + else + tk_call_without_enc('grid', 'configure', *params) + end + end + alias grid configure + + def columnconfigure(master, index, args) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + tk_call_without_enc("grid", 'columnconfigure', + master, index, *hash_kv(args)) + end + alias column columnconfigure + + def rowconfigure(master, index, args) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + tk_call_without_enc("grid", 'rowconfigure', master, index, *hash_kv(args)) + end + alias row rowconfigure + + def columnconfiginfo(master, index, slot=nil) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + if slot + case slot + when 'uniform', :uniform + tk_call_without_enc('grid', 'columnconfigure', + master, index, "-#{slot}") + else + num_or_str(tk_call_without_enc('grid', 'columnconfigure', + master, index, "-#{slot}")) + end + else + #ilist = list(tk_call_without_enc('grid','columnconfigure',master,index)) + ilist = simplelist(tk_call_without_enc('grid', 'columnconfigure', + master, index)) + info = {} + while key = ilist.shift + case key + when 'uniform' + info[key[1..-1]] = ilist.shift + else + info[key[1..-1]] = tk_tcl2ruby(ilist.shift) + end + end + info + end + end + + def rowconfiginfo(master, index, slot=nil) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + if slot + case slot + when 'uniform', :uniform + tk_call_without_enc('grid', 'rowconfigure', + master, index, "-#{slot}") + else + num_or_str(tk_call_without_enc('grid', 'rowconfigure', + master, index, "-#{slot}")) + end + else + #ilist = list(tk_call_without_enc('grid', 'rowconfigure', master, index)) + ilist = simplelist(tk_call_without_enc('grid', 'rowconfigure', + master, index)) + info = {} + while key = ilist.shift + case key + when 'uniform' + info[key[1..-1]] = ilist.shift + else + info[key[1..-1]] = tk_tcl2ruby(ilist.shift) + end + end + info + end + end + + def add(widget, *args) + configure(widget, *args) + end + + def forget(*args) + return '' if args.size == 0 + wins = args.collect{|win| + # (win.kind_of?(TkObject))? win.epath: win + _epath(win) + } + tk_call_without_enc('grid', 'forget', *wins) + end + + def info(slave) + # slave = slave.epath if slave.kind_of?(TkObject) + slave = _epath(slave) + #ilist = list(tk_call_without_enc('grid', 'info', slave)) + ilist = simplelist(tk_call_without_enc('grid', 'info', slave)) + info = {} + while key = ilist.shift + #info[key[1..-1]] = ilist.shift + info[key[1..-1]] = tk_tcl2ruby(ilist.shift) + end + return info + end + + def location(master, x, y) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + list(tk_call_without_enc('grid', 'location', master, x, y)) + end + + def propagate(master, mode=None) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + if mode == None + bool(tk_call_without_enc('grid', 'propagate', master)) + else + tk_call_without_enc('grid', 'propagate', master, mode) + end + end + + def remove(*args) + return '' if args.size == 0 + wins = args.collect{|win| + # (win.kind_of?(TkObject))? win.epath: win + _epath(win) + } + tk_call_without_enc('grid', 'remove', *wins) + end + + def size(master) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + list(tk_call_without_enc('grid', 'size', master)) + end + + def slaves(master, args) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args))) + end + + module_function :anchor, :bbox, :add, :forget, :propagate, :info + module_function :remove, :size, :slaves, :location + module_function :grid, :configure, :columnconfigure, :rowconfigure + module_function :column, :row, :columnconfiginfo, :rowconfiginfo +end +=begin +def TkGrid(win, *args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + params = [] + params.push((win.kind_of?(TkObject))? win.epath: win) + args.each{|win| + case win + when '-', 'x', '^' # RELATIVE PLACEMENT + params.push(win) + else + params.push((win.kind_of?(TkObject))? win.epath: win) + end + } + opts.each{|k, v| + params.push("-#{k}") + params.push((v.kind_of?(TkObject))? v.epath: v) + } + tk_call_without_enc("grid", *params) +end +=end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/image.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/image.rb new file mode 100644 index 0000000..dffdc19 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/image.rb @@ -0,0 +1,275 @@ +# +# tk/image.rb : treat Tk image objects +# + +require 'tk' + +class TkImage e + if current_configinfo.has_key?(option.to_s) + # error on known option + fail e + else + # unknown option + nil + end + end + end + end + + def copy(src, *opts) + if opts.size == 0 + tk_send('copy', src) + elsif opts.size == 1 && opts[0].kind_of?(Hash) + tk_send('copy', src, *_photo_hash_kv(opts[0])) + else + # for backward compatibility + args = opts.collect{|term| + if term.kind_of?(String) && term.include?(?\s) + term.split + else + term + end + }.flatten + tk_send('copy', src, *args) + end + self + end + + def data(keys={}) + #tk_send('data', *_photo_hash_kv(keys)) + tk_split_list(tk_send('data', *_photo_hash_kv(keys))) + end + + def get(x, y) + tk_send('get', x, y).split.collect{|n| n.to_i} + end + + def put(data, *opts) + if opts == [] + tk_send('put', data) + elsif opts.size == 1 && opts[0].kind_of?(Hash) + tk_send('put', data, *_photo_hash_kv(opts[0])) + else + # for backward compatibility + tk_send('put', data, '-to', *opts) + end + self + end + + def read(file, *opts) + if opts.size == 0 + tk_send('read', file) + elsif opts.size == 1 && opts[0].kind_of?(Hash) + tk_send('read', file, *_photo_hash_kv(opts[0])) + else + # for backward compatibility + args = opts.collect{|term| + if term.kind_of?(String) && term.include?(?\s) + term.split + else + term + end + }.flatten + tk_send('read', file, *args) + end + self + end + + def redither + tk_send 'redither' + self + end + + def get_transparency(x, y) + bool(tk_send('transparency', 'get', x, y)) + end + def set_transparency(x, y, st) + tk_send('transparency', 'set', x, y, st) + self + end + + def write(file, *opts) + if opts.size == 0 + tk_send('write', file) + elsif opts.size == 1 && opts[0].kind_of?(Hash) + tk_send('write', file, *_photo_hash_kv(opts[0])) + else + # for backward compatibility + args = opts.collect{|term| + if term.kind_of?(String) && term.include?(?\s) + term.split + else + term + end + }.flatten + tk_send('write', file, *args) + end + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemconfig.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemconfig.rb new file mode 100644 index 0000000..9c6a98d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemconfig.rb @@ -0,0 +1,1215 @@ +# +# tk/itemconfig.rb : control item/tag configuration of widget +# +require 'tk' +require 'tkutil' +require 'tk/itemfont.rb' + +module TkItemConfigOptkeys + include TkUtil + + def __item_optkey_aliases(id) + {} + end + private :__item_optkey_aliases + + def __item_numval_optkeys(id) + [] + end + private :__item_numval_optkeys + + def __item_numstrval_optkeys(id) + [] + end + private :__item_numstrval_optkeys + + def __item_boolval_optkeys(id) + ['exportselection', 'jump', 'setgrid', 'takefocus'] + end + private :__item_boolval_optkeys + + def __item_strval_optkeys(id) + # maybe need to override + [ + 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile', + 'activebackground', 'activeforeground', 'background', + 'disabledforeground', 'disabledbackground', 'foreground', + 'highlightbackground', 'highlightcolor', 'insertbackground', + 'selectbackground', 'selectforeground', 'troughcolor' + ] + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + [] + end + private :__item_listval_optkeys + + def __item_numlistval_optkeys(id) + # maybe need to override + ['dash', 'activedash', 'disableddash'] + end + private :__item_numlistval_optkeys + + def __item_tkvariable_optkeys(id) + ['variable', 'textvariable'] + end + private :__item_tkvariable_optkeys + + def __item_val2ruby_optkeys(id) # { key=>method, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "method.call(id, val)" is called. + {} + end + private :__item_val2ruby_optkeys + + def __item_ruby2val_optkeys(id) # { key=>method, ... } + # The method is used to convert a ruby's object to a opt-value. + # When set the value of the option "key", "method.call(id, val)" is called. + # That is, "-#{key} #{method.call(id, value)}". + {} + end + private :__item_ruby2val_optkeys + + def __item_methodcall_optkeys(id) # { key=>method, ... } + # Use the method for both of get and set. + # Usually, the 'key' will not be a widget option. + # + # maybe need to override + # {'coords'=>'coords'} + {} + end + private :__item_methodcall_optkeys + + ################################################ + + def __item_keyonly_optkeys(id) # { def_key=>(undef_key|nil), ... } + # maybe need to override + {} + end + private :__item_keyonly_optkeys + + + def __conv_item_keyonly_opts(id, keys) + return keys unless keys.kind_of?(Hash) + keyonly = __item_keyonly_optkeys(id) + keys2 = {} + keys.each{|k, v| + optkey = keyonly.find{|kk,vv| kk.to_s == k.to_s} + if optkey + defkey, undefkey = optkey + if v + keys2[defkey.to_s] = None + else + keys2[undefkey.to_s] = None + end + else + keys2[k.to_s] = v + end + } + keys2 + end + + def itemconfig_hash_kv(id, keys, enc_mode = nil, conf = nil) + hash_kv(__conv_item_keyonly_opts(id, keys), enc_mode, conf) + end +end + +module TkItemConfigMethod + include TkUtil + include TkTreatItemFont + include TkItemConfigOptkeys + + def TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + @mode || false + end + def TkItemConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) + fail SecurityError, "can't change the mode" if $SAFE>=4 + @mode = (mode)? true: false + end + + def __item_cget_cmd(id) + # maybe need to override + [self.path, 'itemcget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + # maybe need to override + [self.path, 'itemconfigure', id] + end + private :__item_config_cmd + + def __item_confinfo_cmd(id) + # maybe need to override + __item_config_cmd(id) + end + private :__item_confinfo_cmd + + def __item_configinfo_struct(id) + # maybe need to override + {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, + :default_value=>3, :current_value=>4} + end + private :__item_configinfo_struct + + ################################################ + + def tagid(tagOrId) + # maybe need to override + tagOrId + end + + ################################################ + + def __itemcget_core(tagOrId, option) + orig_opt = option + option = option.to_s + + if option.length == 0 + fail ArgumentError, "Invalid option `#{orig_opt.inspect}'" + end + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == option} + if real_name + option = real_name.to_s + end + + if ( method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[option] ) + optval = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")) + begin + return method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + return optval + end + end + + if ( method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[option] ) + return self.__send__(method, tagOrId) + end + + case option + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + number(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))) + rescue + nil + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + num_or_str(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))) + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + bool(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))) + rescue + nil + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + simplelist(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))) + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + conf = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")) + if conf =~ /^[0-9]/ + list(conf) + else + conf + end + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + v = tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")) + (v.empty?)? nil: TkVarAccess.new(v) + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + _fromUTF8(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}"))) + + when /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/ + fontcode = $1 + fontkey = $2 + fnt = tk_tcl2ruby(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{fontkey}")), true) + unless fnt.kind_of?(TkFont) + fnt = tagfontobj(tagid(tagOrId), fontkey) + end + if fontcode == 'kanji' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/ + # obsolete; just for compatibility + fnt.kanji_font + else + fnt + end + else + tk_tcl2ruby(tk_call_without_enc(*(__item_cget_cmd(tagid(tagOrId)) << "-#{option}")), true) + end + end + private :__itemcget_core + + def itemcget(tagOrId, option) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __itemcget_core(tagOrId, option) + else + begin + __itemcget_core(tagOrId, option) + rescue => e + begin + if __current_itemconfiginfo(tagOrId).has_key?(option.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + def itemcget_strict(tagOrId, option) + # never use TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __itemcget_core(tagOrId, option) + end + + def __itemconfigure_core(tagOrId, slot, value=None) + if slot.kind_of? Hash + slot = _symbolkey2str(slot) + + __item_optkey_aliases(tagid(tagOrId)).each{|alias_name, real_name| + alias_name = alias_name.to_s + if slot.has_key?(alias_name) + slot[real_name.to_s] = slot.delete(alias_name) + end + } + + __item_methodcall_optkeys(tagid(tagOrId)).each{|key, method| + value = slot.delete(key.to_s) + self.__send__(method, tagOrId, value) if value + } + + __item_ruby2val_optkeys(tagid(tagOrId)).each{|key, method| + key = key.to_s + slot[key] = method.call(tagOrId, slot[key]) if slot.has_key?(key) + } + + __item_keyonly_optkeys(tagid(tagOrId)).each{|defkey, undefkey| + conf = slot.find{|kk, vv| kk == defkey.to_s} + if conf + k, v = conf + if v + slot[k] = None + else + slot[undefkey.to_s] = None if undefkey + slot.delete(k) + end + end + } + + if (slot.find{|k, v| k =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/}) + tagfont_configure(tagid(tagOrId), slot) + elsif slot.size > 0 + tk_call(*(__item_config_cmd(tagid(tagOrId)).concat(hash_kv(slot)))) + end + + else + orig_slot = slot + slot = slot.to_s + if slot.length == 0 + fail ArgumentError, "Invalid option `#{orig_slot.inspect}'" + end + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + if ( conf = __item_keyonly_optkeys(tagid(tagOrId)).find{|k, v| k.to_s == slot } ) + defkey, undefkey = conf + if value + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{defkey}")) + elsif undefkey + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{undefkey}")) + end + elsif ( method = _symbolkey2str(__item_ruby2val_optkeys(tagid(tagOrId)))[slot] ) + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}" << method.call(tagOrId, value))) + elsif ( method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] ) + self.__send__(method, tagOrId, value) + elsif (slot =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) + if value == None + tagfontobj(tagid(tagOrId), $2) + else + tagfont_configure(tagid(tagOrId), {slot=>value}) + end + else + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}" << value)) + end + end + self + end + private :__itemconfigure_core + + def __check_available_itemconfigure_options(tagOrId, keys) + id = tagid(tagOrId) + + availables = self.__current_itemconfiginfo(id).keys + + # add non-standard keys + availables |= __font_optkeys.map{|k| + [k.to_s, "latin#{k}", "ascii#{k}", "kanji#{k}"] + }.flatten + availables |= __item_methodcall_optkeys(id).keys.map{|k| k.to_s} + availables |= __item_keyonly_optkeys(id).keys.map{|k| k.to_s} + + keys = _symbolkey2str(keys) + + keys.delete_if{|k, v| !(availables.include?(k))} + end + + def itemconfigure(tagOrId, slot, value=None) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + __itemconfigure_core(tagOrId, slot, value) + else + if slot.kind_of?(Hash) + begin + __itemconfigure_core(tagOrId, slot) + rescue + slot = __check_available_itemconfigure_options(tagOrId, slot) + __itemconfigure_core(tagOrId, slot) unless slot.empty? + end + else + begin + __itemconfigure_core(tagOrId, slot, value) + rescue => e + begin + if __current_itemconfiginfo(tagOrId).has_key?(slot.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + self + end + + def __itemconfiginfo_core(tagOrId, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) + fontkey = $2 + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true) + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + fnt = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if TkFont.is_system_font?(fnt) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt) + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), fontkey) + elsif ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- ) + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + conf + else + if slot + slot = slot.to_s + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val + end + + when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] + return [slot, '', '', '', self.__send__(method, tagOrId)] + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v) + end + end + + else + # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true) + end + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + + if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- ) + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + + conf + + else + # ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).collect{|conflist| + # conf = tk_split_simplelist(conflist) + ret = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).collect{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + + optkey = conf[__item_configinfo_struct(tagid(tagOrId))[:key]] + case optkey + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey] + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + begin + val = method(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # do nothing + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v) + end + end + + else + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + if conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]].index('{') + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + end + if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]].index('{') + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + end + end + + if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- ) + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + + conf + } + + __item_font_optkeys(tagid(tagOrId)).each{|optkey| + optkey = optkey.to_s + fontconf = ret.assoc(optkey) + if fontconf && fontconf.size > 2 + ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/} + fnt = fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if TkFont.is_system_font?(fnt) + fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt) + end + fontconf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), optkey) + ret.push(fontconf) + end + } + + __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| + ret << [optkey.to_s, '', '', '', self.__send__(method, tagOrId)] + } + + ret + end + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) + fontkey = $2 + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true) + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + fnt = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if TkFont.is_system_font?(fnt) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt) + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), fontkey) + { conf.shift => conf } + elsif ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + { conf[0] => conf[1] } + else + { conf.shift => conf } + end + else + if slot + slot = slot.to_s + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val + end + + when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] + return {slot => ['', '', '', self.__send__(method, tagOrId)]} + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + num_or_stre(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true) + + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v) + end + end + + else + # conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true) + end + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + + if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + { conf[0] => conf[1] } + else + { conf.shift => conf } + end + + else + ret = {} + # tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).each{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).each{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] + + optkey = conf[__item_configinfo_struct(tagid(tagOrId))[:key]] + case optkey + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey] + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = val + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + optval = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = val + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # do nothing + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + number(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + num_or_str(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + begin + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + bool(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + rescue + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + end + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + simplelist(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] =~ /^[0-9]/ ) + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkVarAccess.new(v) + end + end + if ( conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] ) + v = conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if v.empty? + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v) + end + end + + else + if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ + && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) + if conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]].index('{') + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + else + conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = + tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]]) + end + end + if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] + if conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]].index('{') + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + tk_split_list(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + else + conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = + tk_tcl2ruby(conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]]) + end + end + end + + if ( __item_configinfo_struct(tagid(tagOrId))[:alias] \ + && conf.size == __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + if conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][0] == ?- + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] = + conf[__item_configinfo_struct(tagid(tagOrId))[:alias]][1..-1] + end + ret[conf[0]] = conf[1] + else + ret[conf.shift] = conf + end + } + + __item_font_optkeys(tagid(tagOrId)).each{|optkey| + optkey = optkey.to_s + fontconf = ret[optkey] + if fontconf.kind_of?(Array) + ret.delete(optkey) + ret.delete('latin' << optkey) + ret.delete('ascii' << optkey) + ret.delete('kanji' << optkey) + fnt = fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] + if TkFont.is_system_font?(fnt) + fontconf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] = TkNamedFont.new(fnt) + end + fontconf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = tagfontobj(tagid(tagOrId), optkey) + ret[optkey] = fontconf + end + } + + __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| + ret[optkey.to_s] = ['', '', '', self.__send__(method, tagOrId)] + } + + ret + end + end + end + end + private :__itemconfiginfo_core + + def itemconfiginfo(tagOrId, slot = nil) + if slot && TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + begin + __itemconfiginfo_core(tagOrId, slot) + rescue => e + begin + __itemconfiginfo_core(tagOrId) + # not tag error -> option is unknown + Array.new(__item_configinfo_struct.values.max).unshift(slot.to_s) + rescue + fail e # tag error + end + end + else + __itemconfiginfo_core(tagOrId, slot) + end + end + + def __current_itemconfiginfo(tagOrId, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + org_slot = slot + begin + conf = __itemconfiginfo_core(tagOrId, slot) + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + return {conf[0] => conf[-1]} + end + slot = conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] + end while(org_slot != slot) + fail RuntimeError, + "there is a configure alias loop about '#{org_slot}'" + else + ret = {} + __itemconfiginfo_core(tagOrId).each{|conf| + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + ret[conf[0]] = conf[-1] + end + } + + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + __itemconfiginfo_core(tagOrId, slot).each{|key, conf| + ret[key] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + + def current_itemconfiginfo(tagOrId, slot = nil) + __current_itemconfiginfo(tagOrId, slot) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemfont.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemfont.rb new file mode 100644 index 0000000..4c5c917 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/itemfont.rb @@ -0,0 +1,327 @@ +# +# tk/itemfont.rb : control font of widget items +# +require 'tk' + +module TkItemFontOptkeys + def __item_font_optkeys(id) + # maybe need to override + ['font'] + end + private :__item_font_optkeys +end + +module TkTreatItemFont + include TkItemFontOptkeys + + def __item_pathname(id) + # maybe need to override + [self.path, id].join(';') + end + private :__item_pathname + + ################################################ + + def tagfont_configinfo(tagOrId, key = nil) + optkeys = __item_font_optkeys(tagid(tagOrId)) + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __item_pathname(tagid(tagOrId)).split(';') + + if key + pathname = [win, tag, key].join(';') + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) + elsif optkeys.size == 1 + pathname = [win, tag, optkeys[0]].join(';') + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) + else + fonts = {} + optkeys.each{|key| + key = key.to_s + pathname = [win, tag, key].join(';') + fonts[key] = + TkFont.used_on(pathname) || + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) + } + fonts + end + end + alias tagfontobj tagfont_configinfo + + def tagfont_configure(tagOrId, slot) + pathname = __item_pathname(tagid(tagOrId)) + + slot = _symbolkey2str(slot) + + __item_font_optkeys(tagid(tagOrId)).each{|optkey| + optkey = optkey.to_s + l_optkey = 'latin' << optkey + a_optkey = 'ascii' << optkey + k_optkey = 'kanji' << optkey + + if slot.key?(optkey) + fnt = slot.delete(optkey) + if fnt.kind_of?(TkFont) + slot.delete(l_optkey) + slot.delete(a_optkey) + slot.delete(k_optkey) + + fnt.call_font_configure([pathname, optkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + next + else + if fnt + if (slot.key?(l_optkey) || + slot.key?(a_optkey) || + slot.key?(k_optkey)) + fnt = TkFont.new(fnt) + + lfnt = slot.delete(l_optkey) + lfnt = slot.delete(a_optkey) if slot.key?(a_optkey) + kfnt = slot.delete(k_optkey) + + fnt.latin_replace(lfnt) if lfnt + fnt.kanji_replace(kfnt) if kfnt + + fnt.call_font_configure([pathname, optkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + next + else + fnt = hash_kv(fnt) if fnt.kind_of?(Hash) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << fnt)) + else + begin + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << fnt)) + rescue => e + # ignore + end + end + end + end + next + end + end + + lfnt = slot.delete(l_optkey) + lfnt = slot.delete(a_optkey) if slot.key?(a_optkey) + kfnt = slot.delete(k_optkey) + + if lfnt && kfnt + TkFont.new(lfnt, kfnt).call_font_configure([pathname, optkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + elsif lfnt + latintagfont_configure([lfnt, optkey]) + elsif kfnt + kanjitagfont_configure([kfnt, optkey]) + end + } + + # configure other (without font) options + tk_call(*(__item_config_cmd(tagid(tagOrId)).concat(hash_kv(slot)))) if slot != {} + self + end + + def latintagfont_configure(tagOrId, ltn, keys=nil) + if ltn.kind_of?(Array) + key = ltn[1] + ltn = ltn[0] + else + key = nil + end + + optkeys = __item_font_optkeys(tagid(tagOrId)) + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __item_pathname(tagid(tagOrId)).split(';') + + optkeys = [key] if key + + optkeys.each{|optkey| + optkey = optkey.to_s + + pathname = [win, tag, optkey].join(';') + + if (fobj = TkFont.used_on(pathname)) + fobj = TkFont.new(fobj) # create a new TkFont object + elsif Tk::JAPANIZED_TK + fobj = fontobj # create a new TkFont object + else + ltn = hash_kv(ltn) if ltn.kind_of?(Hash) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << ltn)) + else + begin + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << ltn)) + rescue => e + # ignore + end + end + next + end + + if fobj.kind_of?(TkFont) + if ltn.kind_of?(TkFont) + conf = {} + ltn.latin_configinfo.each{|key,val| conf[key] = val} + if keys + fobj.latin_configure(conf.update(keys)) + else + fobj.latin_configure(conf) + end + else + fobj.latin_replace(ltn) + end + end + + fobj.call_font_configure([pathname, optkey], *(__item_config_cmd(tagid(tagOrId)) << {})) + } + self + end + alias asciitagfont_configure latintagfont_configure + + def kanjitagfont_configure(tagOrId, knj, keys=nil) + if knj.kind_of?(Array) + key = knj[1] + knj = knj[0] + else + key = nil + end + + optkeys = __item_font_optkeys(tagid(tagOrId)) + if key && !optkeys.find{|opt| opt.to_s == key.to_s} + fail ArgumentError, "unknown font option name `#{key}'" + end + + win, tag = __item_pathname(tagid(tagOrId)).split(';') + + optkeys = [key] if key + + optkeys.each{|optkey| + optkey = optkey.to_s + + pathname = [win, tag, optkey].join(';') + + if (fobj = TkFont.used_on(pathname)) + fobj = TkFont.new(fobj) # create a new TkFont object + elsif Tk::JAPANIZED_TK + fobj = fontobj # create a new TkFont object + else + knj = hash_kv(knj) if knj.kind_of?(Hash) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << knj)) + else + begin + tk_call(*(__item_config_cmd(tagid(tagOrId)) << "-#{optkey}" << knj)) + rescue => e + # ignore + end + end + next + end + + if fobj.kind_of?(TkFont) + if knj.kind_of?(TkFont) + conf = {} + knj.kanji_configinfo.each{|key,val| conf[key] = val} + if keys + fobj.kanji_configure(conf.update(keys)) + else + fobj.kanji_configure(conf) + end + else + fobj.kanji_replace(knj) + end + end + + fobj.call_font_configure([pathname, optkey], *(__item_config_cmd(tagid(tagOrId)) << {})) + } + self + end + + def tagfont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil) + if wintag + if winkey + fnt = win.tagfontobj(wintag, winkey).dup + else + fnt = win.tagfontobj(wintag).dup + end + else + if winkey + fnt = win.fontobj(winkey).dup + else + fnt = win.fontobj.dup + end + end + + if targetkey + fnt.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + else + fnt.call_font_configure(__item_pathname(tagid(tagOrId)), + *(__item_config_cmd(tagid(tagOrId)) << {})) + end + self + end + + + def latintagfont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil) + if targetkey + fontobj(targetkey).dup.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + else + fontobj.dup.call_font_configure(__item_pathname(tagid(tagOrId)), + *(__item_config_cmd(tagid(tagOrId)) << {})) + end + + if wintag + if winkey + fontobj.latin_replace(win.tagfontobj(wintag, winkey).latin_font_id) + else + fontobj.latin_replace(win.tagfontobj(wintag).latin_font_id) + end + else + if winkey + fontobj.latin_replace(win.fontobj(winkey).latin_font_id) + else + fontobj.latin_replace(win.fontobj.latin_font_id) + end + end + self + end + alias asciitagfont_copy latintagfont_copy + + def kanjifont_copy(tagOrId, win, wintag=nil, winkey=nil, targetkey=nil) + if targetkey + fontobj(targetkey).dup.call_font_configure([__item_pathname(tagid(tagOrId)), targetkey], + *(__item_config_cmd(tagid(tagOrId)) << {})) + else + fontobj.dup.call_font_configure(__item_pathname(tagid(tagOrId)), + *(__item_config_cmd(tagid(tagOrId)) << {})) + end + + if wintag + if winkey + fontobj.kanji_replace(win.tagfontobj(wintag, winkey).kanji_font_id) + else + fontobj.kanji_replace(win.tagfontobj(wintag).kanji_font_id) + end + else + if winkey + fontobj.kanji_replace(win.fontobj(winkey).kanji_font_id) + else + fontobj.kanji_replace(win.fontobj.kanji_font_id) + end + end + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/kinput.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/kinput.rb new file mode 100644 index 0000000..a29dbcd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/kinput.rb @@ -0,0 +1,71 @@ +# +# tk/kinput.rb : control kinput +# +require 'tk' + +module TkKinput + include Tk + extend Tk + + TkCommandNames = [ + 'kinput_start'.freeze, + 'kinput_send_spot'.freeze, + 'kanjiInput'.freeze + ].freeze + + def TkKinput.start(win, style=None) + tk_call('kinput_start', win, style) + end + def kinput_start(style=None) + TkKinput.start(self, style) + end + + def TkKinput.send_spot(win) + tk_call('kinput_send_spot', win) + end + def kinput_send_spot + TkKinput.send_spot(self) + end + + def TkKinput.input_start(win, keys=nil) + tk_call('kanjiInput', 'start', win, *hash_kv(keys)) + end + def kanji_input_start(keys=nil) + TkKinput.input_start(self, keys) + end + + def TkKinput.attribute_config(win, slot, value=None) + if slot.kind_of? Hash + tk_call('kanjiInput', 'attribute', win, *hash_kv(slot)) + else + tk_call('kanjiInput', 'attribute', win, "-#{slot}", value) + end + end + def kinput_attribute_config(slot, value=None) + TkKinput.attribute_config(self, slot, value) + end + + def TkKinput.attribute_info(win, slot=nil) + if slot + conf = tk_split_list(tk_call('kanjiInput', 'attribute', + win, "-#{slot}")) + conf[0] = conf[0][1..-1] + conf + else + tk_split_list(tk_call('kanjiInput', 'attribute', win)).collect{|conf| + conf[0] = conf[0][1..-1] + conf + } + end + end + def kinput_attribute_info(slot=nil) + TkKinput.attribute_info(self, slot) + end + + def TkKinput.input_end(win) + tk_call('kanjiInput', 'end', win) + end + def kanji_input_end + TkKinput.input_end(self) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/label.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/label.rb new file mode 100644 index 0000000..80b3d77 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/label.rb @@ -0,0 +1,21 @@ +# +# tk/label.rb : treat label widget +# +require 'tk' + +class Tk::Labelproc, ... } + super().update('labelwidget'=>proc{|v| window(v)}) + end + private :__val2ruby_optkeys +end + +Tk::Labelframe = Tk::LabelFrame +#TkLabelFrame = Tk::LabelFrame unless Object.const_defined? :TkLabelFrame +#TkLabelframe = Tk::Labelframe unless Object.const_defined? :TkLabelframe +Tk.__set_toplevel_aliases__(:Tk, Tk::LabelFrame, :TkLabelFrame, :TkLabelframe) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/listbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/listbox.rb new file mode 100644 index 0000000..bb039ff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/listbox.rb @@ -0,0 +1,282 @@ +# +# tk/listbox.rb : treat listbox widget +# +require 'tk' +require 'tk/itemconfig' +require 'tk/scrollable' +require 'tk/txtwin_abst' + +module TkListItemConfig + include TkItemConfigMethod + + def __item_listval_optkeys(id) + [] + end + private :__item_listval_optkeys +end + +class Tk::Listboxval}) + end + else + tk_call('itemconfigure', index, "-#{key}", val) + end + end + self + end + + def itemconfiginfo(index, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + conf[4] = tagfont_configinfo(index, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + end + conf[0] = conf[0][1..-1] + conf + else + ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', index))).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + fontconf = ret.assoc('font') + if fontconf + ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'} + fontconf[4] = tagfont_configinfo(index, fontconf[4]) + ret.push(fontconf) + else + ret + end + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + conf[4] = tagfont_configinfo(index, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('itemconfigure',index,"-#{key}"))) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + tk_split_simplelist(_fromUTF8(tk_send_without_enc('itemconfigure', index))).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + fontconf = ret['font'] + if fontconf + ret.delete('font') + ret.delete('kanjifont') + fontconf[3] = tagfont_configinfo(index, fontconf[3]) + ret['font'] = fontconf + end + ret + end + end + end + + def current_itemconfiginfo(index, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = itemconfiginfo(index, key) + {conf[0] => conf[4]} + else + ret = {} + itemconfiginfo(index).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + itemconfiginfo(index, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +=end +end + +#TkListbox = Tk::Listbox unless Object.const_defined? :TkListbox +Tk.__set_toplevel_aliases__(:Tk, Tk::Listbox, :TkListbox) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/macpkg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/macpkg.rb new file mode 100644 index 0000000..67b0a4b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/macpkg.rb @@ -0,0 +1,78 @@ +# +# tk/macpkg.rb : methods for Tcl/Tk packages for Macintosh +# 2000/11/22 by Hidetoshi Nagai +# +# ATTENTION !! +# This is NOT TESTED. Because I have no test-environment. +# +# +require 'tk' + +module Tk + def Tk.load_tclscript_rsrc(resource_name, file=None) + # Mac only + tk_call('source', '-rsrc', resource_name, file) + end + + def Tk.load_tclscript_rsrcid(resource_id, file=None) + # Mac only + tk_call('source', '-rsrcid', resource_id, file) + end +end + +module Tk::MacResource +end +#TkMacResource = Tk::MacResource +Tk.__set_toplevel_aliases__(:Tk, Tk::MacResource, :TkMacResource) + +module Tk::MacResource + extend Tk + extend Tk::MacResource + + TkCommandNames = ['resource'.freeze].freeze + + PACKAGE_NAME = 'resource'.freeze + def self.package_name + PACKAGE_NAME + end + + tk_call_without_enc('package', 'require', 'resource') + + def close(rsrcRef) + tk_call('resource', 'close', rsrcRef) + end + + def delete(rsrcType, opts=nil) + tk_call('resource', 'delete', *(hash_kv(opts) << rsrcType)) + end + + def files(rsrcRef=nil) + if rsrcRef + tk_call('resource', 'files', rsrcRef) + else + tk_split_simplelist(tk_call('resource', 'files')) + end + end + + def list(rsrcType, rsrcRef=nil) + tk_split_simplelist(tk_call('resource', 'list', rsrcType, rsrcRef)) + end + + def open(fname, access=nil) + tk_call('resource', 'open', fname, access) + end + + def read(rsrcType, rsrcID, rsrcRef=nil) + tk_call('resource', 'read', rsrcType, rsrcID, rsrcRef) + end + + def types(rsrcRef=nil) + tk_split_simplelist(tk_call('resource', 'types', rsrcRef)) + end + + def write(rsrcType, data, opts=nil) + tk_call('resource', 'write', *(hash_kv(opts) << rsrcType << data)) + end + + module_function :close, :delete, :files, :list, :open, :read, :types, :write +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menu.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menu.rb new file mode 100644 index 0000000..0e4f419 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menu.rb @@ -0,0 +1,681 @@ +# +# tk/menu.rb : treat menu and menubutton +# +require 'tk' +require 'tk/itemconfig' +require 'tk/menuspec' + +module TkMenuEntryConfig + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'entrycget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'entryconfigure', id] + end + private :__item_config_cmd + + def __item_strval_optkeys(id) + super(id) << 'selectcolor' + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + [] + end + private :__item_listval_optkeys + + def __item_val2ruby_optkeys(id) # { key=>proc, ... } + super(id).update('menu'=>proc{|i, v| window(v)}) + end + private :__item_val2ruby_optkeys + + alias entrycget itemcget + alias entrycget_strict itemcget_strict + alias entryconfigure itemconfigure + alias entryconfiginfo itemconfiginfo + alias current_entryconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +class Tk::Menuval}) + end + else + tk_call('entryconfigure', index, "-#{key}", val) + end + end + self + end + + def entryconfiginfo(index, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + conf[4] = tagfont_configinfo(index, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + end + conf[0] = conf[0][1..-1] + conf + else + ret = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure', _get_eval_enc_str(index)))).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + if fontconf + ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'} + fontconf[4] = tagfont_configinfo(index, fontconf[4]) + ret.push(fontconf) + else + ret + end + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + conf[4] = tagfont_configinfo(index, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('entryconfigure',_get_eval_enc_str(index),"-#{key}"))) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + tk_split_simplelist(_fromUTF8(tk_send_without_enc('entryconfigure', _get_eval_enc_str(index)))).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + fontconf = ret['font'] + if fontconf + ret.delete('font') + ret.delete('kanjifont') + fontconf[3] = tagfont_configinfo(index, fontconf[3]) + ret['font'] = fontconf + end + ret + end + end + end + + def current_entryconfiginfo(index, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = entryconfiginfo(index, key) + {conf[0] => conf[4]} + else + ret = {} + entryconfiginfo(index).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + entryconfiginfo(index, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +=end +end + +#TkMenu = Tk::Menu unless Object.const_defined? :TkMenu +Tk.__set_toplevel_aliases__(:Tk, Tk::Menu, :TkMenu) + + +class Tk::MenuClone return value of tk_optionMenu + @path = path + #TkComm::Tk_WINDOWS[@path] = self + TkCore::INTERP.tk_windows[@path] = self + end + end + + def initialize(*args) + # args :: [parent,] [var,] [value[, ...],] [keys] + # parent --> TkWindow or nil + # var --> TkVariable or nil + # keys --> Hash + # keys[:parent] or keys['parent'] --> parent + # keys[:variable] or keys['variable'] --> var + # keys[:values] or keys['values'] --> value, ... + # other Hash keys are menubutton options + keys = {} + keys = args.pop if args[-1].kind_of?(Hash) + keys = _symbolkey2str(keys) + + parent = nil + if !args.empty? && (args[0].kind_of?(TkWindow) || args[0] == nil) + keys.delete('parent') # ignore + parent = args.shift + else + parent = keys.delete('parent') + end + + @variable = nil + if !args.empty? && (args[0].kind_of?(TkVariable) || args[0] == nil) + keys.delete('variable') # ignore + @variable = args.shift + else + @variable = keys.delete('variable') + end + @variable = TkVariable.new unless @variable + + (args = keys.delete('values') || []) if args.empty? + if args.empty? + args << @variable.value + else + @variable.value = args[0] + end + + install_win(if parent then parent.path end) + @menu = OptionMenu.new(tk_call('tk_optionMenu', + @path, @variable.id, *args)) + + configure(keys) if keys + end + + def value + @variable.value + end + + def value=(val) + @variable.value = val + end + + def activate(index) + @menu.activate(index) + self + end + def add(value) + @menu.add('radiobutton', 'variable'=>@variable, + 'label'=>value, 'value'=>value) + self + end + def index(index) + @menu.index(index) + end + def invoke(index) + @menu.invoke(index) + end + def insert(index, value) + @menu.insert(index, 'radiobutton', 'variable'=>@variable, + 'label'=>value, 'value'=>value) + self + end + def delete(index, last=None) + @menu.delete(index, last) + self + end + def xposition(index) + @menu.xposition(index) + end + def yposition(index) + @menu.yposition(index) + end + def menu + @menu + end + def menucget(key) + @menu.cget(key) + end + def menucget_strict(key) + @menu.cget_strict(key) + end + def menuconfigure(key, val=None) + @menu.configure(key, val) + self + end + def menuconfiginfo(key=nil) + @menu.configinfo(key) + end + def current_menuconfiginfo(key=nil) + @menu.current_configinfo(key) + end + def entrycget(index, key) + @menu.entrycget(index, key) + end + def entrycget_strict(index, key) + @menu.entrycget_strict(index, key) + end + def entryconfigure(index, key, val=None) + @menu.entryconfigure(index, key, val) + self + end + def entryconfiginfo(index, key=nil) + @menu.entryconfiginfo(index, key) + end + def current_entryconfiginfo(index, key=nil) + @menu.current_entryconfiginfo(index, key) + end +end + +Tk::OptionMenuButton = Tk::OptionMenubutton +#TkOptionMenubutton = Tk::OptionMenubutton unless Object.const_defined? :TkOptionMenubutton +#TkOptionMenuButton = Tk::OptionMenuButton unless Object.const_defined? :TkOptionMenuButton +Tk.__set_toplevel_aliases__(:Tk, Tk::OptionMenubutton, + :TkOptionMenubutton, :TkOptionMenuButton) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menubar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menubar.rb new file mode 100644 index 0000000..ef9da80 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/menubar.rb @@ -0,0 +1,131 @@ +# +# tk/menubar.rb +# +# Original version: +# Copyright (C) 1998 maeda shugo. All rights reserved. +# This file can be distributed under the terms of the Ruby. + +# Usage: +# +# menu_spec = [ +# [['File', 0], +# ['Open', proc{puts('Open clicked')}, 0], +# '---', +# ['Quit', proc{exit}, 0]], +# [['Edit', 0], +# ['Cut', proc{puts('Cut clicked')}, 2], +# ['Copy', proc{puts('Copy clicked')}, 0], +# ['Paste', proc{puts('Paste clicked')}, 0]] +# ] +# menubar = TkMenubar.new(nil, menu_spec, +# 'tearoff'=>false, +# 'foreground'=>'grey40', +# 'activeforeground'=>'red', +# 'font'=>'-adobe-helvetica-bold-r-*--12-*-iso8859-1') +# menubar.pack('side'=>'top', 'fill'=>'x') +# +# +# OR +# +# +# menubar = TkMenubar.new +# menubar.add_menu([['File', 0], +# ['Open', proc{puts('Open clicked')}, 0], +# '---', +# ['Quit', proc{exit}, 0]]) +# menubar.add_menu([['Edit', 0], +# ['Cut', proc{puts('Cut clicked')}, 2], +# ['Copy', proc{puts('Copy clicked')}, 0], +# ['Paste', proc{puts('Paste clicked')}, 0]]) +# menubar.configure('tearoff', false) +# menubar.configure('foreground', 'grey40') +# menubar.configure('activeforeground', 'red') +# menubar.configure('font', '-adobe-helvetica-bold-r-*--12-*-iso8859-1') +# menubar.pack('side'=>'top', 'fill'=>'x') +# +# +# OR +# +# radio_var = TkVariable.new('y') +# menu_spec = [ +# [['File', 0], +# {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0}, +# '---', +# ['Check_A', TkVariable.new(true), 6], +# {:type=>'checkbutton', :label=>'Check_B', +# :variable=>TkVariable.new, :underline=>6}, +# '---', +# ['Radio_X', [radio_var, 'x'], 6], +# ['Radio_Y', [radio_var, 'y'], 6], +# ['Radio_Z', [radio_var, 'z'], 6], +# '---', +# ['cascade', [ +# ['sss', proc{p 'sss'}, 0], +# ['ttt', proc{p 'ttt'}, 0], +# ['uuu', proc{p 'uuu'}, 0], +# ['vvv', proc{p 'vvv'}, 0], +# ], 0], +# '---', +# ['Quit', proc{exit}, 0]], +# [['Edit', 0], +# ['Cut', proc{puts('Cut clicked')}, 2], +# ['Copy', proc{puts('Copy clicked')}, 0], +# ['Paste', proc{puts('Paste clicked')}, 0]] +# ] +# menubar = TkMenubar.new(nil, menu_spec, +# 'tearoff'=>false, +# 'foreground'=>'grey40', +# 'activeforeground'=>'red', +# 'font'=>'Helvetia 12 bold') +# menubar.pack('side'=>'top', 'fill'=>'x') + +# See tk/menuspce.rb about the format of the menu_spec + +# To use add_menu, configuration must be done by calling configure after +# adding all menus by add_menu, not by the constructor arguments. + +require 'tk' +require 'tk/frame' +require 'tk/composite' +require 'tk/menuspec' + +class TkMenubar'cascade'). When type is 'cascade', an array of menu_info +# is acceptable for 'menu' key (then, create sub-menu). +# +# NOTE: (*1) +# If you want to make special menus (*.help for UNIX, *.system for Win, +# and *.apple for Mac), append 'menu_name'=>name (name is 'help' for UNIX, +# 'system' for Win, and 'apple' for Mac) option to the configs hash of +# menu button/entry information. +# +# NOTE: (*2) +# If you want to configure a cascade menu, add :menu_config=>{...configs..} +# to the configs of the cascade entry. + +module TkMenuSpec + def _create_menu(parent, menu_info, menu_name = nil, + tearoff = false, default_opts = nil) + if tearoff.kind_of?(Hash) + default_opts = tearoff + tearoff = false + end + + if menu_name.kind_of?(Hash) + default_opts = menu_name + menu_name = nil + tearoff = false + end + + if default_opts.kind_of?(Hash) + orig_opts = _symbolkey2str(default_opts) + else + orig_opts = {} + end + + tearoff = orig_opts.delete('tearoff') if orig_opts.key?('tearoff') + + if menu_name + #menu = Tk::Menu.new(parent, :widgetname=>menu_name, :tearoff=>tearoff) + # --> use current TkMenu class + menu = TkMenu.new(parent, :widgetname=>menu_name, :tearoff=>tearoff) + else + #menu = Tk::Menu.new(parent, :tearoff=>tearoff) + # --> use current TkMenu class + menu = TkMenu.new(parent, :tearoff=>tearoff) + end + + for item_info in menu_info + if item_info.kind_of?(Hash) + options = orig_opts.dup + options.update(_symbolkey2str(item_info)) + item_type = (options.delete('type') || 'command').to_s + menu_name = options.delete('menu_name') + menu_opts = orig_opts.dup + menu_opts.update(_symbolkey2str(options.delete('menu_config') || {})) + if item_type == 'cascade' && options['menu'].kind_of?(Array) + # create cascade menu + submenu = _create_menu(menu, options['menu'], menu_name, + tearoff, menu_opts) + options['menu'] = submenu + end + menu.add(item_type, options) + + elsif item_info.kind_of?(Array) + options = orig_opts.dup + + options['label'] = item_info[0] if item_info[0] + + case item_info[1] + when TkVariable + # checkbutton + item_type = 'checkbutton' + options['variable'] = item_info[1] + options['onvalue'] = true + options['offvalue'] = false + + when Array + # radiobutton or cascade + if item_info[1][0].kind_of?(TkVariable) + # radiobutton + item_type = 'radiobutton' + options['variable'] = item_info[1][0] + options['value'] = item_info[1][1] if item_info[1][1] + + else + # cascade + item_type = 'cascade' + menu_opts = orig_opts.dup + if item_info[4] && item_info[4].kind_of?(Hash) + opts = _symbolkey2str(item_info[4]) + menu_name = opts.delete('menu_name') + menu_config = opts.delete('menu_config') || {} + menu_opts.update(_symbolkey2str(menu_config)) + end + submenu = _create_menu(menu, item_info[1], menu_name, + tearoff, menu_opts) + options['menu'] = submenu + end + + else + # command + item_type = 'command' + options['command'] = item_info[1] if item_info[1] + end + + options['underline'] = item_info[2] if item_info[2] + options['accelerator'] = item_info[3] if item_info[3] + if item_info[4] && item_info[4].kind_of?(Hash) + opts = _symbolkey2str(item_info[4]) + if item_type == 'cascade' + opts.delete('menu_name') + opts.delete('menu_config') + end + options.update(opts) + end + menu.add(item_type, options) + + elsif /^-+$/ =~ item_info + menu.add('separator') + + else + menu.add('command', 'label' => item_info) + end + end + + menu + end + private :_create_menu + + def _use_menubar?(parent) + use_menubar = false + if parent.kind_of?(Tk::Root) || parent.kind_of?(Tk::Toplevel) + true + elsif parent.current_configinfo.has_key?('menu') + true + else + false + end + end + private :_use_menubar? + + def _create_menu_for_menubar(parent) + #unless (mbar = parent.menu).kind_of?(TkMenu) + # --> use current TkMenu class + mbar = parent.menu + unless mbar.kind_of?(Tk::Menu) || mbar.kind_of?(TkMenu) + #mbar = Tk::Menu.new(parent, :tearoff=>false) + mbar = TkMenu.new(parent, :tearoff=>false) + parent.menu(mbar) + end + mbar + end + private :_create_menu_for_menubar + + def _create_menubutton(parent, menu_info, tearoff=false, default_opts = nil) + btn_info = menu_info[0] + + if tearoff.kind_of?(Hash) + default_opts = tearoff + tearoff = false + end + + if default_opts.kind_of?(Hash) + keys = _symbolkey2str(default_opts) + else + keys = {} + end + + tearoff = keys.delete('tearoff') if keys.key?('tearoff') + + if _use_menubar?(parent) + # menubar by menu entries + mbar = _create_menu_for_menubar(parent) + + menu_name = nil + + if btn_info.kind_of?(Hash) + keys.update(_symbolkey2str(btn_info)) + menu_name = keys.delete('menu_name') + keys['label'] = keys.delete('text') if keys.key?('text') + elsif btn_info.kind_of?(Array) + keys['label'] = btn_info[0] if btn_info[0] + keys['underline'] = btn_info[1] if btn_info[1] + if btn_info[2]&&btn_info[2].kind_of?(Hash) + keys.update(_symbolkey2str(btn_info[2])) + menu_name = keys.delete('menu_name') + end + else + keys = {:label=>btn_info} + end + + menu = _create_menu(mbar, menu_info[1..-1], menu_name, + tearoff, default_opts) + menu.tearoff(tearoff) + + keys['menu'] = menu + mbar.add('cascade', keys) + + [mbar, menu] + + else + # menubar by menubuttons + #mbtn = Tk::Menubutton.new(parent) + # --> use current TkMenubutton class + mbtn = TkMenubutton.new(parent) + + menu_name = nil + + if btn_info.kind_of?(Hash) + keys.update(_symbolkey2str(btn_info)) + menu_name = keys.delete('menu_name') + keys['text'] = keys.delete('label') if keys.key?('label') + mbtn.configure(keys) + elsif btn_info.kind_of?(Array) + mbtn.configure('text', btn_info[0]) if btn_info[0] + mbtn.configure('underline', btn_info[1]) if btn_info[1] + # mbtn.configure('accelerator', btn_info[2]) if btn_info[2] + if btn_info[2]&&btn_info[2].kind_of?(Hash) + keys.update(_symbolkey2str(btn_info[2])) + menu_name = keys.delete('menu_name') + mbtn.configure(keys) + end + else + mbtn.configure('text', btn_info) + end + + mbtn.pack('side' => 'left') + + menu = _create_menu(mbtn, menu_info[1..-1], menu_name, + tearoff, default_opts) + + mbtn.menu(menu) + + [mbtn, menu] + end + end + private :_create_menubutton + + def _get_cascade_menus(menu) + menus = [] + (0..(menu.index('last'))).each{|idx| + if menu.menutype(idx) == 'cascade' + submenu = menu.entrycget(idx, 'menu') + menus << [submenu, _get_cascade_menus(submenu)] + end + } + menus + end + private :_get_cascade_menus +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/message.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/message.rb new file mode 100644 index 0000000..946b68c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/message.rb @@ -0,0 +1,22 @@ +# +# tk/message.rb : treat message widget +# +require 'tk' +require 'tk/label' + +class Tk::Message +# +require 'tk' + +module TkManageFocus + extend Tk + + TkCommandNames = [ + 'tk_focusFollowMouse'.freeze, + 'tk_focusNext'.freeze, + 'tk_focusPrev'.freeze + ].freeze + + def TkManageFocus.followsMouse + tk_call_without_enc('tk_focusFollowsMouse') + end + + def TkManageFocus.next(win) + tk_tcl2ruby(tk_call('tk_focusNext', win)) + end + def focusNext + TkManageFocus.next(self) + end + + def TkManageFocus.prev(win) + tk_tcl2ruby(tk_call('tk_focusPrev', win)) + end + def focusPrev + TkManageFocus.prev(self) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/msgcat.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/msgcat.rb new file mode 100644 index 0000000..162953f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/msgcat.rb @@ -0,0 +1,296 @@ +# +# tk/msgcat.rb : methods for Tcl message catalog +# by Hidetoshi Nagai +# +require 'tk' + +#class TkMsgCatalog +class TkMsgCatalog < TkObject + include TkCore + extend Tk + #extend TkMsgCatalog + + TkCommandNames = [ + '::msgcat::mc'.freeze, + '::msgcat::mcmax'.freeze, + '::msgcat::mclocale'.freeze, + '::msgcat::mcpreferences'.freeze, + '::msgcat::mcload'.freeze, + '::msgcat::mcset'.freeze, + '::msgcat::mcmset'.freeze, + '::msgcat::mcunknown'.freeze + ].freeze + + tk_call_without_enc('package', 'require', 'Tcl', '8.2') + + PACKAGE_NAME = 'msgcat'.freeze + def self.package_name + PACKAGE_NAME + end + + if self.const_defined? :FORCE_VERSION + tk_call_without_enc('package', 'require', 'msgcat', FORCE_VERSION) + else + tk_call_without_enc('package', 'require', 'msgcat') + end + + MSGCAT_EXT = '.msg' + + UNKNOWN_CBTBL = Hash.new{|hash,key| hash[key] = {}}.taint + + TkCore::INTERP.add_tk_procs('::msgcat::mcunknown', 'args', <<-'EOL') + if {[set st [catch {eval {ruby_cmd TkMsgCatalog callback} [namespace current] $args} ret]] != 0} { + #return -code $st $ret + set idx [string first "\n\n" $ret] + if {$idx > 0} { + return -code $st \ + -errorinfo [string range $ret [expr $idx + 2] \ + [string length $ret]] \ + [string range $ret 0 [expr $idx - 1]] + } else { + return -code $st $ret + } + } else { + return $ret + } + EOL + + def self.callback(namespace, locale, src_str, *args) + src_str = sprintf(src_str, *args) unless args.empty? + cmd_tbl = TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip] + cmd = cmd_tbl[namespace] + cmd = cmd_tbl['::'] unless cmd # use global scope as interp default + return src_str unless cmd # no cmd -> return src-str (default action) + begin + cmd.call(locale, src_str) + rescue SystemExit + exit(0) + rescue Interrupt + exit!(1) + rescue Exception => e + begin + msg = _toUTF8(e.class.inspect) + ': ' + + _toUTF8(e.message) + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + _toUTF8(e.backtrace.join("\n")) + + "\n---< backtrace of Tk side >-------" + if TkCore::WITH_ENCODING + msg.force_encoding('utf-8') + else + msg.instance_variable_set(:@encoding, 'utf-8') + end + rescue Exception + msg = e.class.inspect + ': ' + e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------" + end + fail(e, msg) + end + end + + def initialize(namespace = nil) + if namespace.kind_of?(TkNamespace) + @namespace = namespace + elsif namespace == nil + @namespace = TkNamespace.new('::') # global namespace + else + @namespace = TkNamespace.new(namespace) + end + @path = @namespace.path + + @msgcat_ext = '.msg' + end + attr_accessor :msgcat_ext + + def method_missing(id, *args) + # locale(src, trans) ==> set_translation(locale, src, trans) + loc = id.id2name + case args.length + when 0 # set locale + self.locale=(loc) + + when 1 # src only, or trans_list + if args[0].kind_of?(Array) + # trans_list + #list = args[0].collect{|src, trans| + # [ Tk::UTF8_String.new(src), Tk::UTF8_String.new(trans) ] + #} + self.set_translation_list(loc, args[0]) + else + # src + #self.set_translation(loc, Tk::UTF8_String.new(args[0])) + self.set_translation(loc, args[0]) + end + + when 2 # src and trans, or, trans_list and enc + if args[0].kind_of?(Array) + else + #self.set_translation(loc, args[0], Tk::UTF8_String.new(args[1])) + self.set_translation(loc, *args) + end + + when 3 # src and trans and enc + self.set_translation(loc, *args) + + else + super(id, *args) +# fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at + + end + end + + # *args ::= form, arg, arg, ... + def self.translate(*args) + dst = args.collect{|src| + tk_call_without_enc('::msgcat::mc', _get_eval_string(src, true)) + } + Tk.UTF8_String(sprintf(*dst)) + end + class << self + alias mc translate + alias [] translate + end + def translate(*args) + dst = args.collect{|src| + @namespace.eval{tk_call_without_enc('::msgcat::mc', + _get_eval_string(src, true))} + } + Tk.UTF8_String(sprintf(*dst)) + end + alias mc translate + alias [] translate + + def self.maxlen(*src_strings) + tk_call('::msgcat::mcmax', *src_strings).to_i + end + def maxlen(*src_strings) + @namespace.eval{tk_call('::msgcat::mcmax', *src_strings).to_i} + end + + def self.locale + tk_call('::msgcat::mclocale') + end + def locale + @namespace.eval{tk_call('::msgcat::mclocale')} + end + + def self.locale=(locale) + tk_call('::msgcat::mclocale', locale) + end + def locale=(locale) + @namespace.eval{tk_call('::msgcat::mclocale', locale)} + end + + def self.preferences + tk_split_simplelist(tk_call('::msgcat::mcpreferences')) + end + def preferences + tk_split_simplelist(@namespace.eval{tk_call('::msgcat::mcpreferences')}) + end + + def self.load_tk(dir) + number(tk_call('::msgcat::mcload', dir)) + end + + def self.load_rb(dir) + count = 0 + preferences().each{|loc| + file = File.join(dir, loc + self::MSGCAT_EXT) + if File.readable?(file) + count += 1 + eval(open(file){|f| f.read}) + end + } + count + end + + def load_tk(dir) + number(@namespace.eval{tk_call('::msgcat::mcload', dir)}) + end + + def load_rb(dir) + count = 0 + preferences().each{|loc| + file = File.join(dir, loc + @msgcat_ext) + if File.readable?(file) + count += 1 + @namespace.eval(open(file){|f| f.read}) + end + } + count + end + + def self.load(dir) + self.load_rb(dir) + end + alias load load_rb + + def self.set_translation(locale, src_str, trans_str=None, enc='utf-8') + if trans_str && trans_str != None + trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc)) + Tk.UTF8_String(tk_call_without_enc('::msgcat::mcset', + locale, + _get_eval_string(src_str, true), + trans_str)) + else + Tk.UTF8_String(tk_call_without_enc('::msgcat::mcset', + locale, + _get_eval_string(src_str, true))) + end + end + def set_translation(locale, src_str, trans_str=None, enc='utf-8') + if trans_str && trans_str != None + trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc)) + Tk.UTF8_String(@namespace.eval{ + tk_call_without_enc('::msgcat::mcset', + locale, + _get_eval_string(src_str, true), + trans_str) + }) + else + Tk.UTF8_String(@namespace.eval{ + tk_call_without_enc('::msgcat::mcset', + locale, + _get_eval_string(src_str, true))}) + end + end + + def self.set_translation_list(locale, trans_list, enc='utf-8') + # trans_list ::= [ [src, trans], [src, trans], ... ] + list = [] + trans_list.each{|src, trans| + if trans && trans != None + list << _get_eval_string(src, true) + list << Tk.UTF8_Stirng(_toUTF8(trans, enc)) + else + list << _get_eval_string(src, true) << '' + end + } + number(tk_call_without_enc('::msgcat::mcmset', locale, list)) + end + def set_translation_list(locale, trans_list, enc='utf-8') + # trans_list ::= [ [src, trans], [src, trans], ... ] + list = [] + trans_list.each{|src, trans| + if trans && trans != None + list << _get_eval_string(src, true) + list << Tk.UTF8_String(_toUTF8(trans, enc)) + else + list << _get_eval_string(src, true) << '' + end + } + number(@namespace.eval{ + tk_call_without_enc('::msgcat::mcmset', locale, list) + }) + end + + def self.def_unknown_proc(cmd=Proc.new) + TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip]['::'] = cmd + end + def def_unknown_proc(cmd=Proc.new) + TkMsgCatalog::UNKNOWN_CBTBL[TkCore::INTERP.__getip][@namespace.path] = cmd + end +end + +TkMsgCat = TkMsgCatalog diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/namespace.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/namespace.rb new file mode 100644 index 0000000..20a8d65 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/namespace.rb @@ -0,0 +1,551 @@ +# +# tk/namespace.rb : methods to manipulate Tcl/Tk namespace +# by Hidetoshi Nagai +# +require 'tk' + +class TkNamespace < TkObject + extend Tk + + TkCommandNames = [ + 'namespace'.freeze, + ].freeze + + Tk_Namespace_ID_TBL = TkCore::INTERP.create_table + + (Tk_Namespace_ID = ["ns".freeze, "00000".taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + Tk_NsCode_RetObjID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + Tk_Namespace_ID_TBL.mutex.synchronize{ Tk_Namespace_ID_TBL.clear } + Tk_NsCode_RetObjID_TBL.mutex.synchronize{ Tk_NsCode_RetObjID_TBL.clear } + } + + def TkNamespace.id2obj(id) + Tk_Namespace_ID_TBL.mutex.synchronize{ + Tk_Namespace_ID_TBL[id]? Tk_Namespace_ID_TBL[id]: id + } + end + + ##################################### + + class Ensemble < TkObject + def __cget_cmd + ['namespace', 'ensemble', 'configure', self.path] + end + private :__cget_cmd + + def __config_cmd + ['namespace', 'ensemble', 'configure', self.path] + end + private :__config_cmd + + def __configinfo_struct + {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, + :default_value=>nil, :current_value=>2} + end + private :__configinfo_struct + + def __boolval_optkeys + ['prefixes'] + end + private :__boolval_optkeys + + def __listval_optkeys + ['map', 'subcommands', 'unknown'] + end + private :__listval_optkeys + + def self.exist?(ensemble) + bool(tk_call('namespace', 'ensemble', 'exists', ensemble)) + end + + def initialize(keys = {}) + @ensemble = @path = tk_call('namespace', 'ensemble', 'create', keys) + end + + def cget(slot) + if slot == :namespace || slot == 'namespace' + ns = super(slot) + Tk_Namespace_ID_TBL.mutex.synchronize{ + if TkNamespace::Tk_Namespace_ID_TBL.key?(ns) + TkNamespace::Tk_Namespace_ID_TBL[ns] + else + ns + end + } + else + super(slot) + end + end + def cget_strict(slot) + if slot == :namespace || slot == 'namespace' + ns = super(slot) + Tk_Namespace_ID_TBL.mutex.synchronize{ + if TkNamespace::Tk_Namespace_ID_TBL.key?(ns) + TkNamespace::Tk_Namespace_ID_TBL[ns] + else + ns + end + } + else + super(slot) + end + end + + def configinfo(slot = nil) + if slot + if slot == :namespace || slot == 'namespace' + val = super(slot) + Tk_Namespace_ID_TBL.mutex.synchronize{ + if TkNamespace::Tk_Namespace_ID_TBL.key?(val) + val = TkNamespace::Tk_Namespace_ID_TBL[val] + end + } + else + val = super(slot) + end + + if TkComm::GET_CONFIGINFO_AS_ARRAY + [slot.to_s, val] + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + {slot.to_s => val} + end + + else + info = super() + + if TkComm::GET_CONFIGINFO_AS_ARRAY + Tk_Namespace_ID_TBL.mutex.synchronize{ + info.map!{|inf| + if inf[0] == 'namespace' && + TkNamespace::Tk_Namespace_ID_TBL.key?(inf[-1]) + [inf[0], TkNamespace::Tk_Namespace_ID_TBL[inf[-1]]] + else + inf + end + } + } + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + val = info['namespace'] + Tk_Namespace_ID_TBL.mutex.synchronize{ + if TkNamespace::Tk_Namespace_ID_TBL.key?(val) + info['namespace'] = TkNamespace::Tk_Namespace_ID_TBL[val] + end + } + end + + info + end + end + + def exists? + bool(tk_call('namespace', 'ensemble', 'exists', @path)) + end + end + + ##################################### + + class ScopeArgs < Array + include Tk + + # alias __tk_call tk_call + # alias __tk_call_without_enc tk_call_without_enc + # alias __tk_call_with_enc tk_call_with_enc + def tk_call(*args) + #super('namespace', 'eval', @namespace, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @namespace, + TkCore::INTERP._merge_tklist(*args)) + end + def tk_call_without_enc(*args) + #super('namespace', 'eval', @namespace, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @namespace, + TkCore::INTERP._merge_tklist(*args)) + end + def tk_call_with_enc(*args) + #super('namespace', 'eval', @namespace, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @namespace, + TkCore::INTERP._merge_tklist(*args)) + end + + def initialize(namespace, *args) + @namespace = namespace + super(args.size) + self.replace(args) + end + end + + ##################################### + + class NsCode < TkObject + def initialize(scope, use_obj_id = false) + @scope = scope + ' ' + @use_obj_id = use_obj_id + end + def path + @scope + end + def to_eval + @scope + end + def call(*args) + ret = TkCore::INTERP._eval_without_enc(@scope + array2tk_list(args)) + if @use_obj_id + ret = TkNamespace::Tk_NsCode_RetObjID_TBL.delete(ret.to_i) + end + ret + end + end + + ##################################### + + def install_cmd(cmd) + lst = tk_split_simplelist(super(cmd), false, false) + if lst[1] =~ /^::/ + lst[1] = @fullname + else + lst.insert(1, @fullname) + end + TkCore::INTERP._merge_tklist(*lst) + end + + alias __tk_call tk_call + alias __tk_call_without_enc tk_call_without_enc + alias __tk_call_with_enc tk_call_with_enc + def tk_call(*args) + #super('namespace', 'eval', @fullname, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @fullname, + TkCore::INTERP._merge_tklist(*args)) + end + def tk_call_without_enc(*args) + #super('namespace', 'eval', @fullname, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @fullname, + TkCore::INTERP._merge_tklist(*args)) + end + def tk_call_with_enc(*args) + #super('namespace', 'eval', @fullname, *args) + args = args.collect{|arg| (s = _get_eval_string(arg, true))? s: ''} + super('namespace', 'eval', @fullname, + TkCore::INTERP._merge_tklist(*args)) + end + alias ns_tk_call tk_call + alias ns_tk_call_without_enc tk_call_without_enc + alias ns_tk_call_with_enc tk_call_with_enc + + def initialize(name = nil, parent = nil) + unless name + Tk_Namespace_ID.mutex.synchronize{ + # name = Tk_Namespace_ID.join('') + name = Tk_Namespace_ID.join(TkCore::INTERP._ip_id_) + Tk_Namespace_ID[1].succ! + } + end + name = __tk_call('namespace', 'current') if name == '' + if parent + if parent =~ /^::/ + if name =~ /^::/ + @fullname = parent + name + else + @fullname = parent +'::'+ name + end + else + ancestor = __tk_call('namespace', 'current') + ancestor = '' if ancestor == '::' + if name =~ /^::/ + @fullname = ancestor + '::' + parent + name + else + @fullname = ancestor + '::'+ parent +'::'+ name + end + end + else # parent == nil + ancestor = __tk_call('namespace', 'current') + ancestor = '' if ancestor == '::' + if name =~ /^::/ + @fullname = name + else + @fullname = ancestor + '::' + name + end + end + @path = @fullname + @parent = __tk_call('namespace', 'qualifiers', @fullname) + @name = __tk_call('namespace', 'tail', @fullname) + + # create namespace + __tk_call('namespace', 'eval', @fullname, '') + + Tk_Namespace_ID_TBL.mutex.synchronize{ + Tk_Namespace_ID_TBL[@fullname] = self + } + end + + def self.children(*args) + # args ::= [] [] + # must be glob-style pattern + tk_split_simplelist(tk_call('namespace', 'children', *args)).collect{|ns| + # ns is fullname + Tk_Namespace_ID_TBL.mutex.synchronize{ + if Tk_Namespace_ID_TBL.key?(ns) + Tk_Namespace_ID_TBL[ns] + else + ns + end + } + } + end + def children(pattern=None) + TkNamespace.children(@fullname, pattern) + end + + def self.code(script = Proc.new) + TkNamespace.new('').code(script) + end +=begin + def code(script = Proc.new) + if script.kind_of?(String) + cmd = proc{|*args| ScopeArgs.new(@fullname,*args).instance_eval(script)} + elsif script.kind_of?(Proc) + cmd = proc{|*args| ScopeArgs.new(@fullname,*args).instance_eval(&script)} + else + fail ArgumentError, "String or Proc is expected" + end + TkNamespace::NsCode.new(tk_call_without_enc('namespace', 'code', + _get_eval_string(cmd, false))) + end +=end + def code(script = Proc.new) + if script.kind_of?(String) + cmd = proc{|*args| + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + obj = ScopeArgs.new(@fullname,*args) + ret = obj.instance_exec(obj, script) + else + ret = ScopeArgs.new(@fullname,*args).instance_eval(script) + end + id = ret.object_id + TkNamespace::Tk_NsCode_RetObjID_TBL[id] = ret + id + } + elsif script.kind_of?(Proc) + cmd = proc{|*args| + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + obj = ScopeArgs.new(@fullname,*args) + ret = obj.instance_exec(obj, &script) + else + ret = ScopeArgs.new(@fullname,*args).instance_eval(&script) + end + id = ret.object_id + TkNamespace::Tk_NsCode_RetObjID_TBL[id] = ret + id + } + else + fail ArgumentError, "String or Proc is expected" + end + TkNamespace::NsCode.new(tk_call_without_enc('namespace', 'code', + _get_eval_string(cmd, false)), + true) + end + + def self.current_path + tk_call('namespace', 'current') + end + def current_path + @fullname + end + + def self.current + ns = self.current_path + Tk_Namespace_ID_TBL.mutex.synchronize{ + if Tk_Namespace_ID_TBL.key?(ns) + Tk_Namespace_ID_TBL[ns] + else + ns + end + } + end + def current_namespace + # ns_tk_call('namespace', 'current') + # @fullname + self + end + alias current current_namespace + + def self.delete(*ns_list) + tk_call('namespace', 'delete', *ns_list) + ns_list.each{|ns| + Tk_Namespace_ID_TBL.mutex.synchronize{ + if ns.kind_of?(TkNamespace) + Tk_Namespace_ID_TBL.delete(ns.path) + else + Tk_Namespace_ID_TBL.delete(ns.to_s) + end + } + } + end + def delete + TkNamespece.delete(@fullname) + end + + def self.ensemble_create(*keys) + tk_call('namespace', 'ensemble', 'create', *hash_kv(keys)) + end + def self.ensemble_configure(cmd, slot, value=None) + if slot.kind_of?(Hash) + tk_call('namespace', 'ensemble', 'configure', cmd, *hash_kv(slot)) + else + tk_call('namespace', 'ensemble', 'configure', cmd, '-'+slot.to_s, value) + end + end + def self.ensemble_configinfo(cmd, slot = nil) + if slot + tk_call('namespace', 'ensemble', 'configure', cmd, '-' + slot.to_s) + else + inf = {} + Hash(*tk_split_simplelist(tk_call('namespace', 'ensemble', 'configure', cmd))).each{|k, v| inf[k[1..-1]] = v} + inf + end + end + def self.ensemble_exist?(cmd) + bool(tk_call('namespace', 'ensemble', 'exists', cmd)) + end + + def self.eval(namespace, cmd = Proc.new, *args) + #tk_call('namespace', 'eval', namespace, cmd, *args) + TkNamespace.new(namespace).eval(cmd, *args) + end +=begin + def eval(cmd = Proc.new, *args) + #TkNamespace.eval(@fullname, cmd, *args) + #ns_tk_call(cmd, *args) + code_obj = code(cmd) + ret = code_obj.call(*args) + # uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1]) + uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1])) + tk_tcl2ruby(ret) + end +=end + def eval(cmd = Proc.new, *args) + code_obj = code(cmd) + ret = code_obj.call(*args) + uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1])) + ret + end + + def self.exist?(ns) + bool(tk_call('namespace', 'exists', ns)) + end + def exist? + TkNamespece.exist?(@fullname) + end + + def self.export(*patterns) + tk_call('namespace', 'export', *patterns) + end + def self.export_with_clear(*patterns) + tk_call('namespace', 'export', '-clear', *patterns) + end + def export + TkNamespace.export(@fullname) + end + def export_with_clear + TkNamespace.export_with_clear(@fullname) + end + + def self.forget(*patterns) + tk_call('namespace', 'forget', *patterns) + end + def forget + TkNamespace.forget(@fullname) + end + + def self.import(*patterns) + tk_call('namespace', 'import', *patterns) + end + def self.force_import(*patterns) + tk_call('namespace', 'import', '-force', *patterns) + end + def import + TkNamespace.import(@fullname) + end + def force_import + TkNamespace.force_import(@fullname) + end + + def self.inscope(namespace, script, *args) + tk_call('namespace', 'inscope', namespace, script, *args) + end + def inscope(script, *args) + TkNamespace.inscope(@fullname, script, *args) + end + + def self.origin(cmd) + tk_call('namespace', 'origin', cmd) + end + + def self.parent(namespace=None) + ns = tk_call('namespace', 'parent', namespace) + Tk_Namespace_ID_TBL.mutex.synchronize{ + if Tk_Namespace_ID_TBL.key?(ns) + Tk_Namespace_ID_TBL[ns] + else + ns + end + } + end + def parent + tk_call('namespace', 'parent', @fullname) + end + + def self.get_path + tk_call('namespace', 'path') + end + def self.set_path(*namespace_list) + tk_call('namespace', 'path', array2tk_list(namespace_list)) + end + def set_path + tk_call('namespace', 'path', @fullname) + end + + def self.qualifiers(str) + tk_call('namespace', 'qualifiers', str) + end + + def self.tail(str) + tk_call('namespace', 'tail', str) + end + + def self.upvar(namespace, *var_pairs) + tk_call('namespace', 'upvar', namespace, *(var_pairs.flatten)) + end + def upvar(*var_pairs) + TkNamespace.inscope(@fullname, *(var_pairs.flatten)) + end + + def self.get_unknown_handler + tk_tcl2ruby(tk_call('namespace', 'unknown')) + end + def self.set_unknown_handler(cmd = Proc.new) + tk_call('namespace', 'unknown', cmd) + end + + def self.which(name) + tk_call('namespace', 'which', name) + end + def self.which_command(name) + tk_call('namespace', 'which', '-command', name) + end + def self.which_variable(name) + tk_call('namespace', 'which', '-variable', name) + end +end + +TkNamespace::Global = TkNamespace.new('::') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optiondb.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optiondb.rb new file mode 100644 index 0000000..186811d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optiondb.rb @@ -0,0 +1,377 @@ +# +# tk/optiondb.rb : treat option database +# +require 'tk' + +module TkOptionDB + include Tk + extend Tk + + TkCommandNames = ['option'.freeze].freeze + (CmdClassID = ['CMD_CLASS'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + module Priority + WidgetDefault = 20 + StartupFile = 40 + UserDefault = 60 + Interactive = 80 + end + + def add(pat, value, pri=None) + # if $SAFE >= 4 + # fail SecurityError, "can't call 'TkOptionDB.add' at $SAFE >= 4" + # end + tk_call('option', 'add', pat, value, pri) + end + def clear + # if $SAFE >= 4 + # fail SecurityError, "can't call 'TkOptionDB.crear' at $SAFE >= 4" + # end + tk_call_without_enc('option', 'clear') + end + def get(win, name, klass) + tk_call('option', 'get', win ,name, klass) + end + def readfile(file, pri=None) + tk_call('option', 'readfile', file, pri) + end + alias read_file readfile + module_function :add, :clear, :get, :readfile, :read_file + + def read_entries(file, f_enc=nil) + if TkCore::INTERP.safe? + fail SecurityError, + "can't call 'TkOptionDB.read_entries' on a safe interpreter" + end + + i_enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system) + + unless f_enc + f_enc = i_enc + end + + ent = [] + cline = '' + open(file, 'r') {|f| + while line = f.gets + #cline += line.chomp! + cline.concat(line.chomp!) + case cline + when /\\$/ # continue + cline.chop! + next + when /^\s*(!|#)/ # coment + cline = '' + next + when /^([^:]+):(.*)$/ + pat = $1.strip + val = $2.lstrip + p "ResourceDB: #{[pat, val].inspect}" if $DEBUG + pat = TkCore::INTERP._toUTF8(pat, f_enc) + pat = TkCore::INTERP._fromUTF8(pat, i_enc) + val = TkCore::INTERP._toUTF8(val, f_enc) + val = TkCore::INTERP._fromUTF8(val, i_enc) + ent << [pat, val] + cline = '' + else # unknown --> ignore + cline = '' + next + end + end + } + ent + end + module_function :read_entries + + def read_with_encoding(file, f_enc=nil, pri=None) + # try to read the file as an OptionDB file + read_entries(file, f_enc).each{|pat, val| + add(pat, val, pri) + } + +=begin + i_enc = Tk.encoding() + + unless f_enc + f_enc = i_enc + end + + cline = '' + open(file, 'r') {|f| + while line = f.gets + cline += line.chomp! + case cline + when /\\$/ # continue + cline.chop! + next + when /^\s*!/ # coment + cline = '' + next + when /^([^:]+):\s(.*)$/ + pat = $1 + val = $2 + p "ResourceDB: #{[pat, val].inspect}" if $DEBUG + pat = TkCore::INTERP._toUTF8(pat, f_enc) + pat = TkCore::INTERP._fromUTF8(pat, i_enc) + val = TkCore::INTERP._toUTF8(val, f_enc) + val = TkCore::INTERP._fromUTF8(val, i_enc) + add(pat, val, pri) + cline = '' + else # unknown --> ignore + cline = '' + next + end + end + } +=end + end + module_function :read_with_encoding + + # support procs on the resource database + @@resource_proc_class = Class.new + + @@resource_proc_class.const_set(:CARRIER, '.'.freeze) + + @@resource_proc_class.instance_variable_set('@method_tbl', + TkCore::INTERP.create_table) + @@resource_proc_class.instance_variable_set('@add_method', false) + @@resource_proc_class.instance_variable_set('@safe_mode', 4) + + class << @@resource_proc_class + private :new + +=begin + CARRIER = '.'.freeze + METHOD_TBL = TkCore::INTERP.create_table + ADD_METHOD = false + SAFE_MODE = 4 +=end + +=begin + def __closed_block_check__(str) + depth = 0 + str.scan(/[{}]/){|x| + if x == "{" + depth += 1 + elsif x == "}" + depth -= 1 + end + if depth <= 0 && !($' =~ /\A\s*\Z/) + fail RuntimeError, "bad string for procedure : #{str.inspect}" + end + } + str + end + private :__closed_block_check__ +=end + + def __check_proc_string__(str) + # If you want to check the proc_string, do it in this method. + # Please define this in the block given to 'new_proc_class' method. + str + end + + def method_missing(id, *args) + #res_proc, proc_str = self::METHOD_TBL[id] + res_proc, proc_str = @method_tbl[id] + + proc_source = TkOptionDB.get(self::CARRIER, id.id2name, '').strip + res_proc = nil if proc_str != proc_source # resource is changed + + # unless res_proc.kind_of?(Proc) + unless TkComm._callback_entry?(res_proc) + #if id == :new || !(self::METHOD_TBL.has_key?(id) || self::ADD_METHOD) + if id == :new || !(@method_tbl.has_key?(id) || @add_method) + raise NoMethodError, + "not support resource-proc '#{id.id2name}' for #{self.name}" + end + proc_str = proc_source + proc_str = '{' + proc_str + '}' unless /\A\{.*\}\Z/ =~ proc_str + #proc_str = __closed_block_check__(proc_str) + proc_str = __check_proc_string__(proc_str) + res_proc = proc{ + begin + #eval("$SAFE = #{self::SAFE_MODE};\nProc.new" + proc_str) + eval("$SAFE = #{@safe_mode};\nProc.new" + proc_str) + rescue SyntaxError=>err + raise SyntaxError, + TkCore::INTERP._toUTF8(err.message.gsub(/\(eval\):\d:/, + "(#{id.id2name}):")) + end + }.call + #self::METHOD_TBL[id] = [res_proc, proc_source] + @method_tbl[id] = [res_proc, proc_source] + end + res_proc.call(*args) + end + + private :__check_proc_string__, :method_missing + end + @@resource_proc_class.freeze + +=begin + def __create_new_class(klass, func, safe = 4, add = false, parent = nil) + klass = klass.to_s if klass.kind_of? Symbol + unless (?A..?Z) === klass[0] + fail ArgumentError, "bad string '#{klass}' for class name" + end + unless func.kind_of? Array + fail ArgumentError, "method-list must be Array" + end + func_str = func.join(' ') + if parent == nil + install_win(parent) + elsif parent <= @@resource_proc_class + install_win(parent::CARRIER) + else + fail ArgumentError, "parent must be Resource-Proc class" + end + carrier = Tk.tk_call_without_enc('frame', @path, '-class', klass) + + body = <<-"EOD" + class #{klass} < TkOptionDB.module_eval('@@resource_proc_class') + CARRIER = '#{carrier}'.freeze + METHOD_TBL = TkCore::INTERP.create_table + ADD_METHOD = #{add} + SAFE_MODE = #{safe} + %w(#{func_str}).each{|f| METHOD_TBL[f.intern] = nil } + end + EOD + + if parent.kind_of?(Class) && parent <= @@resource_proc_class + parent.class_eval(body) + eval(parent.name + '::' + klass) + else + eval(body) + eval('TkOptionDB::' + klass) + end + end +=end + def __create_new_class(klass, func, safe = 4, add = false, parent = nil) + if klass.kind_of?(TkWindow) + carrier = klass.path + CmdClassID.mutex.synchronize{ + klass = CmdClassID.join(TkCore::INTERP._ip_id_) + CmdClassID[1].succ! + } + parent = nil # ignore parent + else + klass = klass.to_s if klass.kind_of?(Symbol) + unless (?A..?Z) === klass[0] + fail ArgumentError, "bad string '#{klass}' for class name" + end + if parent == nil + install_win(nil) + elsif parent.kind_of?(TkWindow) + install_win(parent.path) + elsif parent <= @@resource_proc_class + install_win(parent::CARRIER) + else + fail ArgumentError, "parent must be Resource-Proc class" + end + carrier = Tk.tk_call_without_enc('frame', @path, '-class', klass) + end + + unless func.kind_of?(Array) + fail ArgumentError, "method-list must be Array" + end + func_str = func.join(' ') + + if parent.kind_of?(Class) && parent <= @@resource_proc_class + cmd_klass = Class.new(parent) + else + cmd_klass = Class.new(TkOptionDB.module_eval('@@resource_proc_class')) + end + cmd_klass.const_set(:CARRIER, carrier.dup.freeze) + + cmd_klass.instance_variable_set('@method_tbl', TkCore::INTERP.create_table) + cmd_klass.instance_variable_set('@add_method', add) + cmd_klass.instance_variable_set('@safe_mode', safe) + func.each{|f| + cmd_klass.instance_variable_get('@method_tbl')[f.to_s.intern] = nil + } +=begin + cmd_klass.const_set(:METHOD_TBL, TkCore::INTERP.create_table) + cmd_klass.const_set(:ADD_METHOD, add) + cmd_klass.const_set(:SAFE_MODE, safe) + func.each{|f| cmd_klass::METHOD_TBL[f.to_s.intern] = nil } +=end + + cmd_klass + end + module_function :__create_new_class + private_class_method :__create_new_class + + def __remove_methods_of_proc_class(klass) + # for security, make these methods invalid + class << klass + def __null_method(*args); nil; end + [ :class_eval, :name, :superclass, :clone, :dup, :autoload, :autoload?, + :ancestors, :const_defined?, :const_get, :const_set, :const_missing, + :class_variables, :constants, :included_modules, :instance_methods, + :method_defined?, :module_eval, :private_instance_methods, + :protected_instance_methods, :public_instance_methods, + :singleton_methods, :remove_const, :remove_method, :undef_method, + :to_s, :inspect, :display, :method, :methods, :respond_to?, + :instance_variable_get, :instance_variable_set, :instance_method, + :instance_eval, :instance_exec, :instance_variables, :kind_of?, :is_a?, + :private_methods, :protected_methods, :public_methods ].each{|m| + alias_method(m, :__null_method) + } + end + end + module_function :__remove_methods_of_proc_class + private_class_method :__remove_methods_of_proc_class + + RAND_BASE_CNT = [0] + RAND_BASE_HEAD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + RAND_BASE_CHAR = RAND_BASE_HEAD + 'abcdefghijklmnopqrstuvwxyz0123456789_' + def __get_random_basename + name = '%s%03d' % [RAND_BASE_HEAD[rand(RAND_BASE_HEAD.size),1], + RAND_BASE_CNT[0]] + len = RAND_BASE_CHAR.size + (6+rand(10)).times{ + name << RAND_BASE_CHAR[rand(len),1] + } + RAND_BASE_CNT[0] = RAND_BASE_CNT[0] + 1 + name + end + module_function :__get_random_basename + private_class_method :__get_random_basename + + # define new proc class : + # If you want to modify the new class or create a new subclass, + # you must do such operation in the block parameter. + # Because the created class is flozen after evaluating the block. + def new_proc_class(klass, func, safe = 4, add = false, parent = nil, &b) + new_klass = __create_new_class(klass, func, safe, add, parent) + new_klass.class_eval(&b) if block_given? + __remove_methods_of_proc_class(new_klass) + new_klass.freeze + new_klass + end + module_function :new_proc_class + + def eval_under_random_base(parent = nil, &b) + new_klass = __create_new_class(__get_random_basename(), + [], 4, false, parent) + ret = new_klass.class_eval(&b) if block_given? + __remove_methods_of_proc_class(new_klass) + new_klass.freeze + ret + end + module_function :eval_under_random_base + + def new_proc_class_random(klass, func, safe = 4, add = false, &b) + eval_under_random_base(){ + TkOptionDB.new_proc_class(klass, func, safe, add, self, &b) + } + end + module_function :new_proc_class_random +end +TkOption = TkOptionDB +TkResourceDB = TkOptionDB diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optionobj.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optionobj.rb new file mode 100644 index 0000000..8fe7e0e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/optionobj.rb @@ -0,0 +1,212 @@ +# +# tk/optionobj.rb : control options for a group of widgets +# +# NOTE: If you want to use key-only option (no value), +# use Tk::None for the value of the key-only option. +# +# e.g. hash_kv({'aaa'=>1, 'bbb'=>Tk::None, 'ccc'=>3}) +# => ["-aaa", 1, "-bbb", "-ccc", 3] +# +require 'tk' + +module Tk + class OptionObj < Hash + include TkUtil + + def initialize(hash = nil) + super() + @observ = [] + update_without_notify(_symbolkey2str(hash)) if hash + end + + def observ_info + @observ.dup + end + + def observs + @observ.collect{|win| + if win.kind_of?(Array) + win[0] + else + win + end + } + end + + def _remove_win(win) + if win.kind_of?(Array) + widget, method = win + @observ.delete_if{|x| + if x.kind_of?(Array) + x[0] == widget + else + x == widget + end + } + else + @observ.delete_if{|x| + if x.kind_of?(Array) + x[0] == win + else + x == win + end + } + end + end + private :_remove_win + + def assign(*wins) + # win := + # widget #==> call widget.configure(hash) + # [widget] #==> call widget.configure(hash) + # [widget, nil, {src=>target, ... }] + # #==> call widget.configure(hash) + # with converting hash-key + # [widget, method] #==> call widget.method(hash) + # [widget, method, {src=>target, ... }] + # #==> call widget.method(hash) + # with converting hash-key + # [widget [receiver, method, arg, ... ]] + # #==> call receiver.method(arg, ... , hash) + # [widget [receiver, method, arg, ... ], {src=>target, ... }] + # #==> call receiver.method(arg, ... , hash) + # with onverting hash-key + # + # src := option_name_on_optobj + # + # target := + # nil #==> not use the src + # option_name_on_target_widget + # [ option_name_on_target_widget, ... ] + # #==> set all of them + # + wins.each{|win| + _remove_win(win) + @observ << win + notify(win) + } + self + end + + def unassign(*wins) + wins.each{|win| + _remove_win(win) + } + self + end + + def notify(target = nil) + if target + targets = [target] + elsif @observ.empty? + return self + else + targets = @observ.dup + end + + return self if empty? + + org_hash = _symbolkey2str(self) + + targets.each{|win| + widget = receiver = win + hash = org_hash + begin + if win.kind_of?(Array) + widget, method, conv_tbl = win + receiver = widget + + if conv_tbl + hash = {} + org_hash.each{|key, val| + key = conv_tbl[key] if conv_tbl.key?(key) + next unless key + if key.kind_of?(Array) + key.each{|k| hash[k] = val} + else + hash[key] = val + end + } + end + + if method.kind_of?(Array) + receiver, method, *args = method + receiver.__send__(method, *(args << hash)) + elsif method + widget.__send__(method, hash) + else + widget.configure(hash) + end + + else + widget.configure(self) + end + rescue => e + if ( ( widget.kind_of?(TkObject) \ + && widget.respond_to?('exist?') \ + && ! receiver.exist? ) \ + || ( receiver.kind_of?(TkObject) \ + && receiver.respond_to?('exist?') \ + && ! receiver.exist? ) ) + @observ.delete(win) + else + fail e + end + end + } + + self + end + alias apply notify + + def +(hash) + unless hash.kind_of?(Hash) + fail ArgumentError, "expect a Hash" + end + new_obj = self.dup + new_obj.update_without_notify(_symbolkey2str(hash)) + new_obj + end + + alias update_without_notify update + + def update(hash) + update_without_notify(_symbolkey2str(hash)) + notify + end + + def configure(key, value=nil) + if key.kind_of?(Hash) + update(key) + else + store(key,value) + end + end + + def [](key) + super(key.to_s) + end + alias cget [] + + def store(key, val) + key = key.to_s + super(key, val) + notify + end + def []=(key, val) + store(key,val) + end + + def replace(hash) + super(_symbolkey2str(hash)) + notify + end + + def default(opt) + fail RuntimeError, "unknown option `#{opt}'" + end + private :default + + undef :default= + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/pack.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/pack.rb new file mode 100644 index 0000000..220a38e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/pack.rb @@ -0,0 +1,107 @@ +# +# tk/pack.rb : control pack geometry manager +# +require 'tk' + +module TkPack + include Tk + extend Tk + + TkCommandNames = ['pack'.freeze].freeze + +=begin + def configure(win, *args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + params = [] + # params.push((win.kind_of?(TkObject))? win.epath: win) + params.push(_epath(win)) + args.each{|win| + # params.push((win.kind_of?(TkObject))? win.epath: win) + params.push(_epath(win)) + } + opts.each{|k, v| + params.push("-#{k}") + # params.push((v.kind_of?(TkObject))? v.epath: v) + params.push(_epath(v)) + } + tk_call_without_enc("pack", 'configure', *params) + end +=end + def configure(*args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + fail ArgumentError, 'no widget is given' if args.empty? + params = [] + args.flatten(1).each{|win| params.push(_epath(win))} + opts.each{|k, v| + params.push("-#{k}") + params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable) + } + tk_call_without_enc("pack", 'configure', *params) + end + alias pack configure + + def forget(*args) + return '' if args.size == 0 + wins = args.collect{|win| + # (win.kind_of?(TkObject))? win.epath: win + _epath(win) + } + tk_call_without_enc('pack', 'forget', *wins) + end + + def info(slave) + # slave = slave.epath if slave.kind_of?(TkObject) + slave = _epath(slave) + ilist = list(tk_call_without_enc('pack', 'info', slave)) + info = {} + while key = ilist.shift + info[key[1..-1]] = ilist.shift + end + return info + end + + def propagate(master, mode=None) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + if mode == None + bool(tk_call_without_enc('pack', 'propagate', master)) + else + tk_call_without_enc('pack', 'propagate', master, mode) + end + end + + def slaves(master) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + list(tk_call_without_enc('pack', 'slaves', master)) + end + + module_function :pack, :configure, :forget, :info, :propagate, :slaves +end +=begin +def TkPack(win, *args) + if args[-1].kind_of?(Hash) + opts = args.pop + else + opts = {} + end + params = [] + params.push((win.kind_of?(TkObject))? win.epath: win) + args.each{|win| + params.push((win.kind_of?(TkObject))? win.epath: win) + } + opts.each{|k, v| + params.push("-#{k}") + params.push((v.kind_of?(TkObject))? v.epath: v) + } + tk_call_without_enc("pack", *params) +end +=end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/package.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/package.rb new file mode 100644 index 0000000..0c32973 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/package.rb @@ -0,0 +1,143 @@ +# +# tk/package.rb : package command +# +require 'tk' + +module TkPackage + include TkCore + extend TkPackage + + TkCommandNames = ['package'.freeze].freeze + + def add_path(path) + Tk::AUTO_PATH.value = Tk::AUTO_PATH.to_a << path + end + + def forget(package) + tk_call('package', 'forget', package) + nil + end + + def if_needed(pkg, ver, *arg, &b) + size = arg.size + + if size==0 && !b + # proc info + procedure(tk_call('package', 'ifneeded', pkg, ver)) + + elsif size==0 && b + # set proc + cmd = proc(&b) + tk_call('package', 'ifneeded', pkg, ver, cmd) + cmd + + elsif size==1 && !b + # set proc + cmd = arg[0] + if cmd + tk_call('package', 'ifneeded', pkg, ver, cmd) + cmd + else + # remove proc + tk_call('package', 'ifneeded', pkg, ver, '') + nil + end + + else + fail ArgumentError, 'too many arguments' + end + end + + def names + tk_split_simplelist(tk_call('package', 'names')) + end + + def provide(package, version=nil) + if version + tk_call('package', 'provide', package, version) + end + if (ret = tk_call('package', 'provide', package)) == '' + nil + else + ret + end + end + + def present(package, version=None) + begin + tk_call('package', 'present', package, version) + rescue => e + fail e.class, 'TkPackage ' << e.message + end + end + + def present_exact(package, version) + begin + tk_call('package', 'present', '-exact', package, version) + rescue => e + fail e.class, 'TkPackage ' << e.message + end + end + + def require(package, version=None) + begin + tk_call('package', 'require', package, version) + rescue => e + fail e.class, 'TkPackage ' << e.message + end + end + + def require_exact(package, version) + begin + tk_call('package', 'require', '-exact', package, version) + rescue => e + fail e.class, 'TkPackage ' << e.message + end + end + + def unknown_proc(*arg, &b) + size = arg.size + + if size==0 && !b + # proc info + procedure(tk_call('package', 'unknown')) + + elsif size==0 && b + # set proc + cmd = proc(&b) + tk_call('package', 'unknown', cmd) + cmd + + elsif size==1 && !b + # set proc + cmd = arg[0] + if cmd + tk_call('package', 'unknown', cmd) + cmd + else + # remove proc + tk_call('package', 'unknown', '') + nil + end + + else + fail ArgumentError, 'too many arguments' + end + end + + def versions(package) + tk_split_simplelist(tk_call('package', 'versions', package)) + end + + def vcompare(version1, version2) + number(tk_call('package', 'vcompare', version1, version2)) + end + + def vsatisfies(version1, version2) + bool(tk_call('package', 'vsatisfies', version1, version2)) + end + + def prefer(setting = None) + tk_call('package', 'prefer', setting) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/palette.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/palette.rb new file mode 100644 index 0000000..2d08d50 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/palette.rb @@ -0,0 +1,55 @@ +# +# tk/palette.rb : methods for Tcl/Tk standard library 'palette.tcl' +# 1998/06/21 by Hidetoshi Nagai +# +require 'tk' + +module TkPalette + include Tk + extend Tk + + TkCommandNames = [ + 'tk_setPalette'.freeze, + 'tk_bisque'.freeze, + 'tkDarken'.freeze + ].freeze + + def TkPalette.set(*args) + args = args[0].to_a.flatten if args[0].kind_of? Hash + tk_call('tk_setPalette', *args) + end + def TkPalette.setPalette(*args) + TkPalette.set(*args) + end + + def TkPalette.bisque + tk_call('tk_bisque') + end + + def TkPalette.darken(color, percent) + tk_call('tkDarken', color, percent) + end + + def TkPalette.recolorTree(win, colors) + if not colors.kind_of?(Hash) + fail "2nd arg need to be Hash" + end + + tk_call('global', "tkPalette") + colors.each{|key, value| + begin + if win.cget(key) == tk_call('set', "tkPalette(#{key})") + win[key] = colors[key] + end + rescue + # ignore + end + } + + TkWinfo.children(win).each{|w| TkPalette.recolorTree(w, colors)} + end + + def recolorTree(colors) + TkPalette.recolorTree(self, colors) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/panedwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/panedwindow.rb new file mode 100644 index 0000000..030144e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/panedwindow.rb @@ -0,0 +1,258 @@ +# +# tk/panedwindow.rb : treat panedwindow +# +require 'tk' + +class Tk::PanedWindow e + begin + if current_paneconfiginfo(win).has_key?(option.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + + def paneconfigure(win, key, value=nil) + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if key.kind_of? Hash + params = [] + key.each{|k, v| + params.push("-#{k}") + # params.push((v.kind_of?(TkObject))? v.epath: v) + params.push(_epath(v)) + } + tk_send_without_enc('paneconfigure', win, *params) + else + # value = value.epath if value.kind_of?(TkObject) + value = _epath(value) + tk_send_without_enc('paneconfigure', win, "-#{key}", value) + end + self + end + alias pane_config paneconfigure + + def paneconfiginfo(win, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if key + #conf = tk_split_list(tk_send_without_enc('paneconfigure', + # win, "-#{key}")) + conf = tk_split_list(tk_send_without_enc('paneconfigure', + win, "-#{key}"), + false, true) + conf[0] = conf[0][1..-1] + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + conf[4] = bool(conf[4]) unless conf[4].empty? + end + conf + else + #tk_split_simplelist(tk_send_without_enc('paneconfigure', + # win)).collect{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('paneconfigure', win), + false, false).collect{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[0] = conf[0][1..-1] + if conf[3] + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[0] == 'hide' + conf[4] = bool(conf[4]) unless conf[4].empty? + elsif conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if key + #conf = tk_split_list(tk_send_without_enc('paneconfigure', + # win, "-#{key}")) + conf = tk_split_list(tk_send_without_enc('paneconfigure', + win, "-#{key}"), + false, true) + key = conf.shift[1..-1] + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + conf[3] = bool(conf[3]) unless conf[3].empty? + end + { key => conf } + else + ret = {} + #tk_split_simplelist(tk_send_without_enc('paneconfigure', + # win)).each{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('paneconfigure', win), + false, false).each{|conflist| + conf = tk_split_simplelist(conflist, false, true) + key = conf.shift[1..-1] + if key + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + elsif conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if key == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + ret + end + end + end + alias pane_configinfo paneconfiginfo + + def current_paneconfiginfo(win, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = paneconfiginfo(win, key) + {conf[0] => conf[4]} + else + ret = {} + paneconfiginfo(win).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + paneconfiginfo(win, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + + alias current_pane_configinfo current_paneconfiginfo + + def panes + list(tk_send_without_enc('panes')) + end +end + +Tk::Panedwindow = Tk::PanedWindow +#TkPanedWindow = Tk::PanedWindow unless Object.const_defined? :TkPanedWindow +#TkPanedwindow = Tk::Panedwindow unless Object.const_defined? :TkPanedwindow +Tk.__set_toplevel_aliases__(:Tk, Tk::PanedWindow, + :TkPanedWindow, :TkPanedwindow) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/place.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/place.rb new file mode 100644 index 0000000..f7ebdfc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/place.rb @@ -0,0 +1,128 @@ +# +# tk/place.rb : control place geometry manager +# +require 'tk' + +module TkPlace + include Tk + extend Tk + + TkCommandNames = ['place'.freeze].freeze + + def configure(win, slot, value=None) + # for >= Tk8.4a2 ? + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if slot.kind_of? Hash + params = [] + slot.each{|k, v| + params.push("-#{k}") + # params.push((v.kind_of?(TkObject))? v.epath: v) + params.push(_epath(v)) + } + tk_call_without_enc('place', 'configure', win, *params) + else + # value = value.epath if value.kind_of?(TkObject) + value = _epath(value) + tk_call_without_enc('place', 'configure', win, "-#{slot}", value) + end + end + alias place configure + + def configinfo(win, slot = nil) + # for >= Tk8.4a2 ? + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if slot + #conf = tk_split_list(tk_call_without_enc('place', 'configure', + # win, "-#{slot}") ) + conf = tk_split_simplelist(tk_call_without_enc('place', 'configure', + win, "-#{slot}") ) + conf[0] = conf[0][1..-1] + conf[1] = tk_tcl2ruby(conf[1]) + conf[2] = tk_tcl2ruby(conf[1]) + conf[3] = tk_tcl2ruby(conf[1]) + conf[4] = tk_tcl2ruby(conf[1]) + conf + else + tk_split_simplelist(tk_call_without_enc('place', 'configure', + win)).collect{|conflist| + #conf = list(conflist) + conf = simplelist(conflist).collect!{|inf| tk_tcl2ruby(inf)} + conf[0] = conf[0][1..-1] + conf + } + end + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + current_configinfo(win, slot) + end + end + + def current_configinfo(win, slot = nil) + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + if slot + #conf = tk_split_list(tk_call_without_enc('place', 'configure', + # win, "-#{slot}") ) + conf = tk_split_simplelist(tk_call_without_enc('place', 'configure', + win, "-#{slot}") ) + # { conf[0][1..-1] => conf[1] } + { conf[0][1..-1] => tk_tcl2ruby(conf[4]) } + else + ret = {} + #tk_split_list(tk_call_without_enc('place','configure',win)).each{|conf| + tk_split_simplelist(tk_call_without_enc('place', 'configure', + win)).each{|conf_list| + #ret[conf[0][1..-1]] = conf[1] + conf = simplelist(conf_list) + ret[conf[0][1..-1]] = tk_tcl2ruby(conf[4]) + } + ret + end + end + + def forget(win) + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + tk_call_without_enc('place', 'forget', win) + end + + def info(win) + # win = win.epath if win.kind_of?(TkObject) + win = _epath(win) + #ilist = list(tk_call_without_enc('place', 'info', win)) + ilist = simplelist(tk_call_without_enc('place', 'info', win)) + info = {} + while key = ilist.shift + #info[key[1..-1]] = ilist.shift + info[key[1..-1]] = tk_tcl2ruby(ilist.shift) + end + return info + end + + def slaves(master) + # master = master.epath if master.kind_of?(TkObject) + master = _epath(master) + list(tk_call('place', 'slaves', master)) + end + + module_function :place, :configure, :configinfo, :current_configinfo + module_function :forget, :info, :slaves +end +=begin +def TkPlace(win, slot, value=None) + win = win.epath if win.kind_of?(TkObject) + if slot.kind_of? Hash + params = [] + slot.each{|k, v| + params.push("-#{k}") + params.push((v.kind_of?(TkObject))? v.epath: v) + } + tk_call_without_enc('place', win, *params) + else + value = value.epath if value.kind_of?(TkObject) + tk_call_without_enc('place', win, "-#{slot}", value) + end +end +=end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/radiobutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/radiobutton.rb new file mode 100644 index 0000000..1f864ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/radiobutton.rb @@ -0,0 +1,71 @@ +# +# tk/radiobutton.rb : treat radiobutton widget +# +require 'tk' +require 'tk/button' + +class Tk::RadioButtonproc, ... } + { + 'variable'=>proc{|v| tk_trace_variable(v)} # for backward compatibility + } + end + private :__ruby2val_optkeys + + + def deselect + tk_send_without_enc('deselect') + self + end + def select + tk_send_without_enc('select') + self + end + + def get_value + var = tk_send_without_enc('cget', '-variable') + if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS + _fromUTF8(INTERP._get_global_var(var)) + else + INTERP._eval(Kernel.format('global %s; set %s', var, var)) + end + end + + def set_value(val) + var = tk_send_without_enc('cget', '-variable') + if TkVariable::USE_TCLs_SET_VARIABLE_FUNCTIONS + _fromUTF8(INTERP._set_global_var(var, _get_eval_string(val, true))) + else + s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; set %s %s', var, var, s)) + end + end +end + +Tk::Radiobutton = Tk::RadioButton +#TkRadioButton = Tk::RadioButton unless Object.const_defined? :TkRadioButton +#TkRadiobutton = Tk::Radiobutton unless Object.const_defined? :TkRadiobutton +Tk.__set_toplevel_aliases__(:Tk, Tk::RadioButton, + :TkRadioButton, :TkRadiobutton) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/root.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/root.rb new file mode 100644 index 0000000..7237b4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/root.rb @@ -0,0 +1,95 @@ +# +# tk/root.rb : treat root widget +# +require 'tk' +require 'tk/wm' +require 'tk/menuspec' + +class Tk::Rootmethod, ... } + TOPLEVEL_METHODCALL_OPTKEYS + end + private :__methodcall_optkeys + + def Root.new(keys=nil, &b) + unless TkCore::INTERP.tk_windows['.'] + TkCore::INTERP.tk_windows['.'] = + super(:without_creating=>true, :widgetname=>'.'){} + end + root = TkCore::INTERP.tk_windows['.'] + + keys = _symbolkey2str(keys) + + # wm commands + root.instance_eval{ + __methodcall_optkeys.each{|key, method| + value = keys.delete(key.to_s) + self.__send__(method, value) if value + } + } + + if keys # wm commands ( for backward comaptibility ) + keys.each{|k,v| + if v.kind_of? Array + root.__send__(k,*v) + else + root.__send__(k,v) + end + } + end + + if block_given? + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + root.instance_exec(root, &b) + else + root.instance_eval(&b) + end + end + root + end + + WidgetClassName = 'Tk'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.to_eval + # self::WidgetClassName + '.' + end + + def create_self + @path = '.' + end + private :create_self + + def path + "." + end + + def add_menu(menu_info, tearoff=false, opts=nil) + # See tk/menuspec.rb for menu_info. + # opts is a hash of default configs for all of cascade menus. + # Configs of menu_info can override it. + if tearoff.kind_of?(Hash) + opts = tearoff + tearoff = false + end + _create_menubutton(self, menu_info, tearoff, opts) + end + + def add_menubar(menu_spec, tearoff=false, opts=nil) + # See tk/menuspec.rb for menu_spec. + # opts is a hash of default configs for all of cascade menus. + # Configs of menu_spec can override it. + menu_spec.each{|info| add_menu(info, tearoff, opts)} + self.menu + end + + def Root.destroy + TkCore::INTERP._invoke('destroy', '.') + end +end + +TkRoot = Tk::Root unless Object.const_defined? :TkRoot diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scale.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scale.rb new file mode 100644 index 0000000..7e758d9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scale.rb @@ -0,0 +1,111 @@ +# +# tk/scale.rb : treat scale widget +# +require 'tk' + +class Tk::Scalevalue) + end + + def configure(slot, value=None) + if (slot == 'command' || slot == :command) + configure('command'=>value) + elsif slot.kind_of?(Hash) && + (slot.key?('command') || slot.key?(:command)) + slot = _symbolkey2str(slot) + slot['command'] = _wrap_command_arg(slot.delete('command')) + end + super(slot, value) + end + + def command(cmd=Proc.new) + configure('command'=>cmd) + end + + def get(x=None, y=None) + number(tk_send_without_enc('get', x, y)) + end + + def coords(val=None) + tk_split_list(tk_send_without_enc('coords', val)) + end + + def identify(x, y) + tk_send_without_enc('identify', x, y) + end + + def set(val) + tk_send_without_enc('set', val) + end + + def value + get + end + + def value= (val) + set(val) + val + end +end + +#TkScale = Tk::Scale unless Object.const_defined? :TkScale +Tk.__set_toplevel_aliases__(:Tk, Tk::Scale, :TkScale) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollable.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollable.rb new file mode 100644 index 0000000..96959b7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollable.rb @@ -0,0 +1,82 @@ +# +# tk/scrollable.rb : module for scrollable widget +# +require 'tk' + +module Tk + module XScrollable + def xscrollcommand(cmd=Proc.new) + configure_cmd 'xscrollcommand', cmd + # Tk.update # avoid scrollbar trouble + self + end + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def xscrollbar(bar=nil) + if bar + @xscrollbar = bar + @xscrollbar.orient 'horizontal' + self.xscrollcommand {|*arg| @xscrollbar.set(*arg)} + @xscrollbar.command {|*arg| self.xview(*arg)} + Tk.update # avoid scrollbar trouble + end + @xscrollbar + end + end + + module YScrollable + def yscrollcommand(cmd=Proc.new) + configure_cmd 'yscrollcommand', cmd + # Tk.update # avoid scrollbar trouble + self + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end + + def yscrollbar(bar=nil) + if bar + @yscrollbar = bar + @yscrollbar.orient 'vertical' + self.yscrollcommand {|*arg| @yscrollbar.set(*arg)} + @yscrollbar.command {|*arg| self.yview(*arg)} + Tk.update # avoid scrollbar trouble + end + @yscrollbar + end + end + + X_Scrollable = XScrollable + Y_Scrollable = YScrollable + + module Scrollable + include XScrollable + include YScrollable + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbar.rb new file mode 100644 index 0000000..87db46a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/scrollbar.rb @@ -0,0 +1,177 @@ +# +# tk/scrollbar.rb : treat scrollbar widget +# +require 'tk' + +class Tk::Scrollbar +# +require 'tk' +require 'tk/listbox' + +class TkScrollbox use current TkListbox class + list = TkListbox.new(@frame) + #scroll = Tk::Scrollbar.new(@frame) + # -> use current TkScrollbar class + scroll = TkScrollbar.new(@frame) + @path = list.path + +=begin + list.configure 'yscroll', scroll.path+" set" + list.pack 'side'=>'left','fill'=>'both','expand'=>'yes' + scroll.configure 'command', list.path+" yview" + scroll.pack 'side'=>'right','fill'=>'y' +=end + list.yscrollbar(scroll) + list.pack('side'=>'left','fill'=>'both','expand'=>'yes') + scroll.pack('side'=>'right','fill'=>'y') + + delegate('DEFAULT', list) + delegate('foreground', list) + delegate('background', list, scroll) + delegate('borderwidth', @frame) + delegate('relief', @frame) + + configure keys if keys + end + private :initialize_composite +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/selection.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/selection.rb new file mode 100644 index 0000000..5caa6ef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/selection.rb @@ -0,0 +1,86 @@ +# +# tk/selection.rb : control selection +# +require 'tk' + +module TkSelection + include Tk + extend Tk + + TkCommandNames = ['selection'.freeze].freeze + + def self.clear(sel=nil) + if sel + tk_call_without_enc('selection', 'clear', '-selection', sel) + else + tk_call_without_enc('selection', 'clear') + end + end + def self.clear_on_display(win, sel=nil) + if sel + tk_call_without_enc('selection', 'clear', + '-displayof', win, '-selection', sel) + else + tk_call_without_enc('selection', 'clear', '-displayof', win) + end + end + def clear(sel=nil) + TkSelection.clear_on_display(self, sel) + self + end + + def self.get(keys=nil) + #tk_call('selection', 'get', *hash_kv(keys)) + _fromUTF8(tk_call_without_enc('selection', 'get', *hash_kv(keys))) + end + def self.get_on_display(win, keys=nil) + #tk_call('selection', 'get', '-displayof', win, *hash_kv(keys)) + _fromUTF8(tk_call_without_enc('selection', 'get', '-displayof', + win, *hash_kv(keys))) + end + def get(keys=nil) + TkSelection.get_on_display(self, sel) + end + + def self.handle(win, func=Proc.new, keys=nil, &b) + if func.kind_of?(Hash) && keys == nil + keys = func + func = Proc.new(&b) + end + args = ['selection', 'handle'] + args.concat(hash_kv(keys)) + args.concat([win, func]) + tk_call_without_enc(*args) + end + def handle(func=Proc.new, keys=nil, &b) + TkSelection.handle(self, func, keys, &b) + end + + def self.get_owner(sel=nil) + if sel + window(tk_call_without_enc('selection', 'own', '-selection', sel)) + else + window(tk_call_without_enc('selection', 'own')) + end + end + def self.get_owner_on_display(win, sel=nil) + if sel + window(tk_call_without_enc('selection', 'own', + '-displayof', win, '-selection', sel)) + else + window(tk_call_without_enc('selection', 'own', '-displayof', win)) + end + end + def get_owner(sel=nil) + TkSelection.get_owner_on_display(self, sel) + self + end + + def self.set_owner(win, keys=nil) + tk_call_without_enc('selection', 'own', *(hash_kv(keys) << win)) + end + def set_owner(keys=nil) + TkSelection.set_owner(self, keys) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/spinbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/spinbox.rb new file mode 100644 index 0000000..34dc190 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/spinbox.rb @@ -0,0 +1,119 @@ +# +# tk/spinbox.rb - Tk spinbox classes +# by Yukihiro Matsumoto +# +require 'tk' +require 'tk/entry' + +class Tk::Spinbox String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + (val)? '1': '0' + end + end + + def self._config_keys + ['command'] + end + end + + def __validation_class_list + super() << SpinCommand + end + + Tk::ValidateConfigure.__def_validcmd(binding, SpinCommand) + + #def create_self(keys) + # tk_call_without_enc('spinbox', @path) + # if keys and keys != None + # configure(keys) + # end + #end + #private :create_self + + def __boolval_optkeys + super() << 'wrap' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'buttonbackground' << 'format' + end + private :__strval_optkeys + + def __listval_optkeys + super() << 'values' + end + private :__listval_optkeys + + def identify(x, y) + tk_send_without_enc('identify', x, y) + end + + def spinup + tk_send_without_enc('invoke', 'spinup') + self + end + + def spindown + tk_send_without_enc('invoke', 'spindown') + self + end + + def set(str) + _fromUTF8(tk_send_without_enc('set', _get_eval_enc_str(str))) + end +end + +#TkSpinbox = Tk::Spinbox unless Object.const_defined? :TkSpinbox +Tk.__set_toplevel_aliases__(:Tk, Tk::Spinbox, :TkSpinbox) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/tagfont.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/tagfont.rb new file mode 100644 index 0000000..a180739 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/tagfont.rb @@ -0,0 +1,43 @@ +# +# tk/tagfont.rb : control font of tags +# +require 'tk' + +module TkTreatTagFont + def font_configinfo + @parent.tagfont_configinfo(@id) + end +# alias font font_configinfo + + def font_configure(slot) + @parent.tagfont_configure(@id, slot) + self + end + + def latinfont_configure(ltn, keys=nil) + @parent.latintagfont_configure(@id, ltn, keys) + self + end + alias asciifont_configure latinfont_configure + + def kanjifont_configure(knj, keys=nil) + @parent.kanjitagfont_configure(@id, ltn, keys) + self + end + + def font_copy(win, wintag=nil) + @parent.tagfont_copy(@id, win, wintag) + self + end + + def latinfont_copy(win, wintag=nil) + @parent.latintagfont_copy(@id, win, wintag) + self + end + alias asciifont_copy latinfont_copy + + def kanjifont_copy(win, wintag=nil) + @parent.kanjitagfont_copy(@id, win, wintag) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/text.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/text.rb new file mode 100644 index 0000000..4ec82be --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/text.rb @@ -0,0 +1,1596 @@ +# +# tk/text.rb - Tk text classes +# by Yukihiro Matsumoto +require 'tk' +require 'tk/itemfont' +require 'tk/itemconfig' +require 'tk/scrollable' +require 'tk/txtwin_abst' + +module TkTextTagConfig + include TkTreatItemFont + include TkItemConfigMethod + + def __item_cget_cmd(id) # id := [ type, tagOrId ] + [self.path, id[0], 'cget', id[1]] + end + private :__item_cget_cmd + + def __item_config_cmd(id) # id := [ type, tagOrId ] + [self.path, id[0], 'configure', id[1]] + end + private :__item_config_cmd + + def __item_pathname(id) + if id.kind_of?(Array) + id = tagid(id[1]) + end + [self.path, id].join(';') + end + private :__item_pathname + + def tag_cget(tagOrId, option) + itemcget(['tag', tagOrId], option) + end + def tag_cget_strict(tagOrId, option) + itemcget_strict(['tag', tagOrId], option) + end + def tag_configure(tagOrId, slot, value=None) + itemconfigure(['tag', tagOrId], slot, value) + end + def tag_configinfo(tagOrId, slot=nil) + itemconfiginfo(['tag', tagOrId], slot) + end + def current_tag_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['tag', tagOrId], slot) + end + + def window_cget(tagOrId, option) + itemcget(['window', tagOrId], option) + end + def window_cget_strict(tagOrId, option) + itemcget_strict(['window', tagOrId], option) + end + def window_configure(tagOrId, slot, value=None) + itemconfigure(['window', tagOrId], slot, value) + end + def window_configinfo(tagOrId, slot=nil) + itemconfiginfo(['window', tagOrId], slot) + end + def current_window_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['window', tagOrId], slot) + end + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +class Tk::Text e + begin + if current_image_configinfo(index).has_key?(slot.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + + def image_configure(index, slot, value=None) + if slot.kind_of?(Hash) + _fromUTF8(tk_send_without_enc('image', 'configure', + _get_eval_enc_str(index), + *hash_kv(slot, true))) + else + _fromUTF8(tk_send_without_enc('image', 'configure', + _get_eval_enc_str(index), + "-#{slot}", + _get_eval_enc_str(value))) + end + self + end + + def image_configinfo(index, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) + else + #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) + end + conf[0] = conf[0][1..-1] + conf + else + # tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).collect{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).collect{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show', 'data', 'file' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) + else + #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).each{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).each{|conflist| + conf = tk_split_simplelist(conflist, false, true) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show', 'data', 'file' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + ret + end + end + end + + def current_image_configinfo(index, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + conf = image_configinfo(index, slot) + {conf[0] => conf[4]} + else + ret = {} + image_configinfo(index).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + image_configinfo(index, slot).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + + def image_names + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt| + tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt| + tagid2obj(elt) + } + end + + def set_insert(index) + tk_send_without_enc('mark','set','insert', _get_eval_enc_str(index)) + self + end + + def set_current(index) + tk_send_without_enc('mark','set','current', _get_eval_enc_str(index)) + self + end + + def insert(index, chars, *tags) + if tags[0].kind_of?(Array) + # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ... + args = [chars] + while tags.size > 0 + args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist + args << tags.shift if tags.size > 0 # chars + end + super(index, *args) + else + # single chars-taglist argument :: str, tag, tag, ... + if tags.size == 0 + super(index, chars) + else + super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' ')) + end + end + end + + def destroy + @tags = {} unless @tags + @tags.each_value do |t| + t.destroy + end + super() + end + + def backspace + self.delete 'insert' + end + + def bbox(index) + list(tk_send_without_enc('bbox', _get_eval_enc_str(index))) + end + + def compare(idx1, op, idx2) + bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1), + op, _get_eval_enc_str(idx2))) + end + + def count(idx1, idx2, *opts) + # opts are Tk8.5 feature + cnt = 0 + args = opts.collect{|opt| + str = opt.to_s + cnt += 1 if str != 'update' + '-' + str + } + args << _get_eval_enc_str(idx1) << _get_eval_enc_str(idx2) + if cnt <= 1 + number(tk_send_without_enc('count', *opts)) + else + list(tk_send_without_enc('count', *opts)) + end + end + + def count_info(idx1, idx2, update=true) + # Tk8.5 feature + opts = [ + :chars, :displaychars, :displayindices, :displaylines, + :indices, :lines, :xpixels, :ypixels + ] + if update + lst = count(idx1, idx2, :update, *opts) + else + lst = count(idx1, idx2, *opts) + end + info = {} + opts.each_with_index{|key, idx| info[key] = lst[idx]} + info + end + + def peer_names() + # Tk8.5 feature + list(tk_send_without_enc('peer', 'names')) + end + + def replace(idx1, idx2, *opts) + tk_send('replace', idx1, idx2, *opts) + self + end + + def debug + bool(tk_send_without_enc('debug')) + end + def debug=(boolean) + tk_send_without_enc('debug', boolean) + #self + boolean + end + + def dlineinfo(index) + list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index))) + end + + def modified? + bool(tk_send_without_enc('edit', 'modified')) + end + def modified(mode) + tk_send_without_enc('edit', 'modified', mode) + self + end + def modified=(mode) + modified(mode) + mode + end + + def edit_redo + tk_send_without_enc('edit', 'redo') + self + end + def edit_reset + tk_send_without_enc('edit', 'reset') + self + end + def edit_separator + tk_send_without_enc('edit', 'separator') + self + end + def edit_undo + tk_send_without_enc('edit', 'undo') + self + end + + def xview_pickplace(index) + tk_send_without_enc('xview', '-pickplace', _get_eval_enc_str(index)) + self + end + + def yview_pickplace(index) + tk_send_without_enc('yview', '-pickplace', _get_eval_enc_str(index)) + self + end + + def text_copy + # Tk8.4 feature + tk_call_without_enc('tk_textCopy', @path) + self + end + + def text_cut + # Tk8.4 feature + tk_call_without_enc('tk_textCut', @path) + self + end + + def text_paste + # Tk8.4 feature + tk_call_without_enc('tk_textPaste', @path) + self + end + + def tag_add(tag, index1, index2=None) + tk_send_without_enc('tag', 'add', _get_eval_enc_str(tag), + _get_eval_enc_str(index1), + _get_eval_enc_str(index2)) + self + end + alias addtag tag_add + alias add_tag tag_add + + def tag_delete(*tags) + tk_send_without_enc('tag', 'delete', + *(tags.collect{|tag| _get_eval_enc_str(tag)})) + TkTextTag::TTagID_TBL.mutex.synchronize{ + if TkTextTag::TTagID_TBL[@path] + tags.each{|tag| + if tag.kind_of?(TkTextTag) + TkTextTag::TTagID_TBL[@path].delete(tag.id) + else + TkTextTag::TTagID_TBL[@path].delete(tag) + end + } + end + } + self + end + alias deltag tag_delete + alias delete_tag tag_delete + + #def tag_bind(tag, seq, cmd=Proc.new, *args) + # _bind([@path, 'tag', 'bind', tag], seq, cmd, *args) + # self + #end + def tag_bind(tag, seq, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([@path, 'tag', 'bind', tag], seq, cmd, *args) + self + end + + #def tag_bind_append(tag, seq, cmd=Proc.new, *args) + # _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args) + # self + #end + def tag_bind_append(tag, seq, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args) + self + end + + def tag_bind_remove(tag, seq) + _bind_remove([@path, 'tag', 'bind', tag], seq) + self + end + + def tag_bindinfo(tag, context=nil) + _bindinfo([@path, 'tag', 'bind', tag], context) + end + +=begin + def tag_cget(tag, key) + case key.to_s + when 'text', 'label', 'show', 'data', 'file' + tk_call_without_enc(@path, 'tag', 'cget', + _get_eval_enc_str(tag), "-#{key}") + when 'font', 'kanjifont' + #fnt = tk_tcl2ruby(tk_send('tag', 'cget', tag, "-#{key}")) + fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('tag','cget',_get_eval_enc_str(tag),'-font'))) + unless fnt.kind_of?(TkFont) + fnt = tagfontobj(tag, fnt) + end + if key.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/ + # obsolete; just for compatibility + fnt.kanji_font + else + fnt + end + else + tk_tcl2ruby(_fromUTF8(tk_call_without_enc(@path,'tag','cget',_get_eval_enc_str(tag),"-#{key}"))) + end + end + + def tag_configure(tag, key, val=None) + if key.kind_of?(Hash) + key = _symbolkey2str(key) + if ( key['font'] || key['kanjifont'] \ + || key['latinfont'] || key['asciifont'] ) + tagfont_configure(tag, key) + else + tk_send_without_enc('tag', 'configure', _get_eval_enc_str(tag), + *hash_kv(key, true)) + end + + else + if key == 'font' || key == :font || + key == 'kanjifont' || key == :kanjifont || + key == 'latinfont' || key == :latinfont || + key == 'asciifont' || key == :asciifont + if val == None + tagfontobj(tag) + else + tagfont_configure(tag, {key=>val}) + end + else + tk_send_without_enc('tag', 'configure', _get_eval_enc_str(tag), + "-#{key}", _get_eval_enc_str(val)) + end + end + self + end + + def tag_configinfo(tag, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show', 'data', 'file' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + conf[4] = tagfont_configinfo(tag, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + end + conf[0] = conf[0][1..-1] + conf + else + ret = tk_split_simplelist(_fromUTF8(tk_send('tag','configure',_get_eval_enc_str(tag)))).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show', 'data', 'file' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + fontconf = ret.assoc('font') + if fontconf + ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'} + fontconf[4] = tagfont_configinfo(tag, fontconf[4]) + ret.push(fontconf) + else + ret + end + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if key + case key.to_s + when 'text', 'label', 'show', 'data', 'file' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + when 'font', 'kanjifont' + conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + conf[4] = tagfont_configinfo(tag, conf[4]) + else + conf = tk_split_list(_fromUTF8(tk_send_without_enc('tag','configure',_get_eval_enc_str(tag),"-#{key}"))) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + tk_split_simplelist(_fromUTF8(tk_send('tag','configure',_get_eval_enc_str(tag)))).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show', 'data', 'file' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + fontconf = ret['font'] + if fontconf + ret.delete('font') + ret.delete('kanjifont') + fontconf[3] = tagfont_configinfo(tag, fontconf[3]) + ret['font'] = fontconf + end + ret + end + end + end + + def current_tag_configinfo(tag, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = tag_configinfo(tag, key) + {conf[0] => conf[4]} + else + ret = {} + tag_configinfo(tag).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + tag_configinfo(tag, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +=end + + def tag_raise(tag, above=None) + tk_send_without_enc('tag', 'raise', _get_eval_enc_str(tag), + _get_eval_enc_str(above)) + self + end + + def tag_lower(tag, below=None) + tk_send_without_enc('tag', 'lower', _get_eval_enc_str(tag), + _get_eval_enc_str(below)) + self + end + + def tag_remove(tag, *indices) + tk_send_without_enc('tag', 'remove', _get_eval_enc_str(tag), + *(indices.collect{|idx| _get_eval_enc_str(idx)})) + self + end + + def tag_ranges(tag) + #l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges', + # _get_eval_enc_str(tag))) + l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges', + _get_eval_enc_str(tag)), + false, true) + r = [] + while key=l.shift + r.push [Tk::Text::IndexString.new(key), Tk::Text::IndexString.new(l.shift)] + end + r + end + + def tag_nextrange(tag, first, last=None) + simplelist(tk_send_without_enc('tag', 'nextrange', + _get_eval_enc_str(tag), + _get_eval_enc_str(first), + _get_eval_enc_str(last))).collect{|idx| + Tk::Text::IndexString.new(idx) + } + end + + def tag_prevrange(tag, first, last=None) + simplelist(tk_send_without_enc('tag', 'prevrange', + _get_eval_enc_str(tag), + _get_eval_enc_str(first), + _get_eval_enc_str(last))).collect{|idx| + Tk::Text::IndexString.new(idx) + } + end + +=begin + def window_cget(index, slot) + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + _fromUTF8(tk_send_without_enc('window', 'cget', + _get_eval_enc_str(index), "-#{slot}")) + when 'font', 'kanjifont' + #fnt = tk_tcl2ruby(tk_send('window', 'cget', index, "-#{slot}")) + fnt = tk_tcl2ruby(_fromUTF8(tk_send_without_enc('window', 'cget', _get_eval_enc_str(index), '-font'))) + unless fnt.kind_of?(TkFont) + fnt = tagfontobj(index, fnt) + end + if slot.to_s == 'kanjifont' && JAPANIZED_TK && TK_VERSION =~ /^4\.*/ + # obsolete; just for compatibility + fnt.kanji_font + else + fnt + end + else + tk_tcl2ruby(_fromUTF8(tk_send_without_enc('window', 'cget', _get_eval_enc_str(index), "-#{slot}"))) + end + end + + def window_configure(index, slot, value=None) + if index.kind_of?(TkTextWindow) + index.configure(slot, value) + else + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + win = slot['window'] + # slot['window'] = win.epath if win.kind_of?(TkWindow) + slot['window'] = _epath(win) if win + if slot['create'] + p_create = slot['create'] + if p_create.kind_of?(Proc) +#=begin + slot['create'] = install_cmd(proc{ + id = p_create.call + if id.kind_of?(TkWindow) + id.epath + else + id + end + }) +#=end + slot['create'] = install_cmd(proc{_epath(p_create.call)}) + end + end + tk_send_without_enc('window', 'configure', + _get_eval_enc_str(index), + *hash_kv(slot, true)) + else + if slot == 'window' || slot == :window + # id = value + # value = id.epath if id.kind_of?(TkWindow) + value = _epath(value) + end + if slot == 'create' || slot == :create + p_create = value + if p_create.kind_of?(Proc) +#=begin + value = install_cmd(proc{ + id = p_create.call + if id.kind_of?(TkWindow) + id.epath + else + id + end + }) +#=end + value = install_cmd(proc{_epath(p_create.call)}) + end + end + tk_send_without_enc('window', 'configure', + _get_eval_enc_str(index), + "-#{slot}", _get_eval_enc_str(value)) + end + end + self + end + + def window_configinfo(win, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + conf = tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}"))) + else + conf = tk_split_list(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}"))) + end + conf[0] = conf[0][1..-1] + conf + else + tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win)))).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show', 'data', 'file' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + conf = tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}"))) + else + conf = tk_split_list(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win), "-#{slot}"))) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + tk_split_simplelist(_fromUTF8(tk_send('window', 'configure', _get_eval_enc_str(win)))).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show', 'data', 'file' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + ret + end + end + end + + def current_window_configinfo(win, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + conf = window_configinfo(win, slot) + {conf[0] => conf[4]} + else + ret = {} + window_configinfo(win).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + window_configinfo(win, slot).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end +=end + + def window_names + # tk_split_simplelist(_fromUTF8(tk_send_without_enc('window', 'names'))).collect{|elt| + tk_split_simplelist(tk_send_without_enc('window', 'names'), false, true).collect{|elt| + tagid2obj(elt) + } + end + + def _ktext_length(txt) + if TkCore::WITH_ENCODING ### Ruby 1.9 !!!!!!!!!!!!! + return txt.length + end + ########################### + + if $KCODE !~ /n/i + return txt.gsub(/[^\Wa-zA-Z_\d]/, ' ').length + end + + # $KCODE == 'NONE' + if JAPANIZED_TK + tk_call_without_enc('kstring', 'length', + _get_eval_enc_str(txt)).to_i + else + begin + tk_call_without_enc('encoding', 'convertto', 'ascii', + _get_eval_enc_str(txt)).length + rescue StandardError, NameError + # sorry, I have no plan + txt.length + end + end + end + private :_ktext_length + + def tksearch(*args) + # call 'search' subcommand of text widget + # args ::= [] [] + # If is regexp, then it must be a regular expression of Tcl + nocase = false + if args[0].kind_of?(Array) + opts = args.shift.collect{|opt| + s_opt = opt.to_s + nocase = true if s_opt == 'nocase' + '-' + s_opt + } + else + opts = [] + end + + if args[0].kind_of?(Regexp) + regexp = args.shift + if !nocase && (regexp.options & Regexp::IGNORECASE) != 0 + opts << '-nocase' + end + args.unshift(regexp.source) + end + + opts << '--' + + ret = tk_send('search', *(opts + args)) + if ret == "" + nil + else + Tk::Text::IndexString.new(ret) + end + end + + def tksearch_with_count(*args) + # call 'search' subcommand of text widget + # args ::= [] [] + # If is regexp, then it must be a regular expression of Tcl + nocase = false + if args[0].kind_of?(Array) + opts = args.shift.collect{|opt| + s_opt = opt.to_s + nocase = true if s_opt == 'nocase' + '-' + s_opt + } + else + opts = [] + end + + opts << '-count' << args.shift + + if args[0].kind_of?(Regexp) + regexp = args.shift + if !nocase && (regexp.options & Regexp::IGNORECASE) != 0 + opts << '-nocase' + end + args.unshift(regexp.source) + end + + opts << '--' + + ret = tk_send('search', *(opts + args)) + if ret == "" + nil + else + Tk::Text::IndexString.new(ret) + end + end + + def search_with_length(pat,start,stop=None) + pat = pat.chr if pat.kind_of?(Integer) + if stop != None + return ["", 0] if compare(start,'>=',stop) + txt = get(start,stop) + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index(start + " + #{pos} chars"), pat.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index(start + " + #{pos} chars"), $&.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(match), match] + end + else + return ["", 0] + end + else + txt = get(start,'end - 1 char') + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index(start + " + #{pos} chars"), pat.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index(start + " + #{pos} chars"), $&.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(match), match] + end + else + txt = get('1.0','end - 1 char') + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + end + end + end + + def search(pat,start,stop=None) + search_with_length(pat,start,stop)[0] + end + + def rsearch_with_length(pat,start,stop=None) + pat = pat.chr if pat.kind_of?(Integer) + if stop != None + return ["", 0] if compare(start,'<=',stop) + txt = get(stop,start) + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index(stop + " + #{pos} chars"), pat.split('').length] + return [index(stop + " + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index(stop + " + #{pos} chars"), $&.split('').length] + return [index(stop + " + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + else + txt = get('1.0',start) + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + txt = get('1.0','end - 1 char') + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of?(String) + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + end + end + end + + def rsearch(pat,start,stop=None) + rsearch_with_length(pat,start,stop)[0] + end + + def dump(type_info, *index, &block) + if type_info.kind_of?(Symbol) + type_info = [ type_info.to_s ] + elsif type_info.kind_of?(String) + type_info = [ type_info ] + end + args = type_info.collect{|inf| '-' + inf} + args << '-command' << block if block + str = tk_send('dump', *(args + index)) + result = [] + sel = nil + i = 0 + while i < str.size + # retrieve key + idx = str.index(/ /, i) + result.push str[i..(idx-1)] + i = idx + 1 + + # retrieve value + case result[-1] + when 'text' + if str[i] == ?{ + # text formed as {...} + val, i = _retrieve_braced_text(str, i) + result.push val + else + # text which may contain backslahes + val, i = _retrieve_backslashed_text(str, i) + result.push val + end + else + idx = str.index(/ /, i) + val = str[i..(idx-1)] + case result[-1] + when 'mark' + case val + when 'insert' + result.push TkTextMarkInsert.new(self) + when 'current' + result.push TkTextMarkCurrent.new(self) + when 'anchor' + result.push TkTextMarkAnchor.new(self) + else + result.push tk_tcl2ruby(val) + end + when 'tagon' + if val == 'sel' + if sel + result.push sel + else + result.push TkTextTagSel.new(self) + end + else + result.push tk_tcl2ruby(val) + end + when 'tagoff' + result.push tk_tcl2ruby(val) + when 'window' + result.push tk_tcl2ruby(val) + when 'image' + result.push tk_tcl2ruby(val) + end + i = idx + 1 + end + + # retrieve index + idx = str.index(/ /, i) + if idx + result.push(Tk::Text::IndexString.new(str[i..(idx-1)])) + i = idx + 1 + else + result.push(Tk::Text::IndexString.new(str[i..-1])) + break + end + end + + kvis = [] + until result.empty? + kvis.push [result.shift, result.shift, result.shift] + end + kvis # result is [[key1, value1, index1], [key2, value2, index2], ...] + end + + def _retrieve_braced_text(str, i) + cnt = 0 + idx = i + while idx < str.size + case str[idx] + when ?{ + cnt += 1 + when ?} + cnt -= 1 + if cnt == 0 + break + end + end + idx += 1 + end + return str[i+1..idx-1], idx + 2 + end + private :_retrieve_braced_text + + def _retrieve_backslashed_text(str, i) + j = i + idx = nil + loop { + idx = str.index(/ /, j) + if str[idx-1] == ?\\ + j += 1 + else + break + end + } + val = str[i..(idx-1)] + val.gsub!(/\\( |\{|\})/, '\1') + return val, idx + 1 + end + private :_retrieve_backslashed_text + + def dump_all(*index, &block) + dump(['all'], *index, &block) + end + def dump_mark(*index, &block) + dump(['mark'], *index, &block) + end + def dump_tag(*index, &block) + dump(['tag'], *index, &block) + end + def dump_text(*index, &block) + dump(['text'], *index, &block) + end + def dump_window(*index, &block) + dump(['window'], *index, &block) + end + def dump_image(*index, &block) + dump(['image'], *index, &block) + end +end + +#TkText = Tk::Text unless Object.const_defined? :TkText +Tk.__set_toplevel_aliases__(:Tk, Tk::Text, :TkText) + + +####################################### + +class Tk::Text::Peer < Tk::Text + # Tk8.5 feature + def initialize(text, parent=nil, keys={}) + unless text.kind_of?(Tk::Text) + fail ArgumentError, "Tk::Text is expected for 1st argument" + end + @src_text = text + super(parent, keys) + end + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(@src_text.path, 'peer', 'create', @path) + else + tk_call_without_enc(@src_text.path, 'peer', 'create', @path) + end + end + private :create_self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textimage.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textimage.rb new file mode 100644 index 0000000..fb306a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/textimage.rb @@ -0,0 +1,88 @@ +# +# tk/textimage.rb - treat Tk text image object +# +require 'tk' +require 'tk/text' + +class TkTextImage 0 + tk_call_without_enc(@t.path, 'window', 'configure', @index, + *hash_kv(slot, true)) + end + else + if slot == 'window' || slot == :window + @id = value + # value = @id.epath if @id.kind_of?(TkWindow) + value = _epath(@id) if @id + end + if slot == 'create' || slot == :create + self.create=value + else + tk_call_without_enc(@t.path, 'window', 'configure', @index, + "-#{slot}", _get_eval_enc_str(value)) + end + end + self + end + + def configinfo(slot = nil) + @t.window_configinfo(@index, slot) + end + + def current_configinfo(slot = nil) + @t.current_window_configinfo(@index, slot) + end + + def window + @id + end + + def window=(value) + @id = value + # value = @id.epath if @id.kind_of?(TkWindow) + value = _epath(@id) if @id + tk_call_without_enc(@t.path, 'window', 'configure', @index, + '-window', _get_eval_enc_str(value)) + value + end + + def create + @p_create + end + + def create=(value) + @p_create = value + # if @p_create.kind_of?(Proc) + if TkComm._callback_entry?(@p_create) + value = install_cmd(proc{ + @id = @p_create.call + if @id.kind_of?(TkWindow) + @id.epath + else + @id + end + }) + end + tk_call_without_enc(@t.path, 'window', 'configure', @index, + '-create', _get_eval_enc_str(value)) + value + end +end + +TktWindow = TkTextWindow diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/timer.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/timer.rb new file mode 100644 index 0000000..5854a7e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/timer.rb @@ -0,0 +1,669 @@ +# +# tk/timer.rb : methods for Tcl/Tk after command +# +# $Id: timer.rb 17083 2008-06-10 20:59:10Z nagai $ +# +require 'tk' + +class TkTimer + include TkCore + extend TkCore + + TkCommandNames = ['after'.freeze].freeze + + (Tk_CBID = ['a'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + Tk_CBTBL = {}.taint + + TkCore::INTERP.add_tk_procs('rb_after', 'id', <<-'EOL') + if {[set st [catch {eval {ruby_cmd TkTimer callback} $id} ret]] != 0} { + return -code $st $ret + } { + return $ret + } + EOL + + DEFAULT_IGNORE_EXCEPTIONS = [ NameError, RuntimeError ].freeze + + ############################### + # class methods + ############################### + def self.start(*args, &b) + self.new(*args, &b).start + end + + def self.callback(obj_id) + ex_obj = Tk_CBTBL[obj_id] + return "" if ex_obj == nil; # canceled + ex_obj.cb_call + end + + def self.info(obj = nil) + if obj + if obj.kind_of?(TkTimer) + if obj.after_id + inf = tk_split_list(tk_call_without_enc('after','info',obj.after_id)) + [Tk_CBTBL[inf[0][1]], inf[1]] + else + nil + end + else + fail ArgumentError, "TkTimer object is expected" + end + else + tk_call_without_enc('after', 'info').split(' ').collect!{|id| + ret = Tk_CBTBL.find{|key,val| val.after_id == id} + (ret == nil)? id: ret[1] + } + end + end + + + ############################### + # instance methods + ############################### + def do_callback + @in_callback = true + @after_id = nil + begin + @return_value = @current_proc.call(self) + rescue SystemExit + exit(0) + rescue Interrupt + exit!(1) + rescue Exception => e + if @cancel_on_exception && + @cancel_on_exception.find{|exc| e.kind_of?(exc)} + cancel + @return_value = e + @in_callback = false + return e + else + fail e + end + end + if @set_next + set_next_callback(@current_args) + else + @set_next = true + end + @in_callback = false + @return_value + end + + def set_callback(sleep, args=nil) + if TkCore::INTERP.deleted? + self.cancel + return self + end + @after_script = "rb_after #{@id}" + @current_args = args + @current_script = [sleep, @after_script] + @after_id = tk_call_without_enc('after', sleep, @after_script) + self + end + + def set_next_callback(args) + if @running == false || @proc_max == 0 || @do_loop == 0 + Tk_CBTBL.delete(@id) ;# for GC + @running = false + # @wait_var.value = 0 + __at_end__ + return + end + if @current_pos >= @proc_max + if @do_loop < 0 || (@do_loop -= 1) > 0 + @current_pos = 0 + else + Tk_CBTBL.delete(@id) ;# for GC + @running = false + # @wait_var.value = 0 + __at_end__ + return + end + end + + @current_args = args + + # if @sleep_time.kind_of?(Proc) + if TkComm._callback_entry?(@sleep_time) + sleep = @sleep_time.call(self) + else + sleep = @sleep_time + end + @current_sleep = sleep + + cmd, *cmd_args = @loop_proc[@current_pos] + @current_pos += 1 + @current_proc = cmd + + set_callback(sleep, cmd_args) + end + + def initialize(*args, &b) + Tk_CBID.mutex.synchronize{ + # @id = Tk_CBID.join('') + @id = Tk_CBID.join(TkCore::INTERP._ip_id_) + Tk_CBID[1].succ! + } + + @wait_var = TkVariable.new(0) + + @at_end_proc = nil + + @cb_cmd = TkCore::INTERP.get_cb_entry(self.method(:do_callback)) + + @set_next = true + + @init_sleep = 0 + @init_proc = nil + @init_args = [] + + @current_script = [] + @current_proc = nil + @current_args = nil + @return_value = nil + + @sleep_time = 0 + @current_sleep = 0 + @loop_exec = 0 + @do_loop = 0 + @loop_proc = [] + @proc_max = 0 + @current_pos = 0 + + @after_id = nil + @after_script = nil + + @cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS + # Unless @cancel_on_exception, Ruby/Tk shows an error dialog box when + # an excepsion is raised on TkTimer callback procedure. + # If @cancel_on_exception is an array of exception classes and the raised + # exception is included in the array, Ruby/Tk cancels executing TkTimer + # callback procedures silently (TkTimer#cancel is called and no dialog is + # shown). + + if b + case args.size + when 0 + add_procs(b) + when 1 + args << -1 << b + else + args << b + end + end + + set_procs(*args) if args != [] + + @running = false + @in_callback = false + end + + attr :after_id + attr :after_script + attr :current_proc + attr :current_args + attr :current_sleep + alias :current_interval :current_sleep + attr :return_value + + attr_accessor :loop_exec + + def __at_end__ + @at_end_proc.call(self) if @at_end_proc + @wait_var.value = 0 # for wait + end + private :__at_end__ + + def cb_call + @cb_cmd.call + end + + def get_procs + [@init_sleep, @init_proc, @init_args, @sleep_time, @loop_exec, @loop_proc] + end + + def current_status + [@running, @current_sleep, @current_proc, @current_args, + @do_loop, @cancel_on_exception] + end + + def cancel_on_exception? + @cancel_on_exception + end + + def cancel_on_exception=(mode) + if mode.kind_of?(Array) + @cancel_on_exception = mode + elsif mode + @cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS + else + @cancel_on_exception = false + end + #self + end + + def running? + @running + end + + def loop_rest + @do_loop + end + + def loop_rest=(rest) + @do_loop = rest + #self + end + + def set_interval(interval) + #if interval != 'idle' && interval != :idle \ + # && !interval.kind_of?(Integer) && !interval.kind_of?(Proc) + if interval != 'idle' && interval != :idle \ + && !interval.kind_of?(Integer) && !TkComm._callback_entry?(interval) + fail ArgumentError, "expect Integer or Proc" + end + @sleep_time = interval + end + + def set_procs(interval, loop_exec, *procs) + #if interval != 'idle' && interval != :idle \ + # && !interval.kind_of?(Integer) && !interval.kind_of?(Proc) + if interval != 'idle' && interval != :idle \ + && !interval.kind_of?(Integer) && !TkComm._callback_entry?(interval) + fail ArgumentError, "expect Integer or Proc for 1st argument" + end + @sleep_time = interval + + @loop_proc = [] + procs.each{|e| + # if e.kind_of?(Proc) + if TkComm._callback_entry?(e) + @loop_proc.push([e]) + else + @loop_proc.push(e) + end + } + @proc_max = @loop_proc.size + @current_pos = 0 + + if loop_exec.kind_of?(Integer) && loop_exec < 0 + @loop_exec = -1 + elsif loop_exec == true + @loop_exec = -1 + elsif loop_exec == nil || loop_exec == false || loop_exec == 0 + @loop_exec = 0 + else + if not loop_exec.kind_of?(Integer) + fail ArgumentError, "expect Integer for 2nd argument" + end + @loop_exec = loop_exec + end + @do_loop = @loop_exec + + self + end + + def add_procs(*procs) + procs.each{|e| + # if e.kind_of?(Proc) + if TkComm._callback_entry?(e) + @loop_proc.push([e]) + else + @loop_proc.push(e) + end + } + @proc_max = @loop_proc.size + + self + end + + def delete_procs(*procs) + procs.each{|e| + # if e.kind_of?(Proc) + if TkComm._callback_entry?(e) + @loop_proc.delete([e]) + else + @loop_proc.delete(e) + end + } + @proc_max = @loop_proc.size + + cancel if @proc_max == 0 + + self + end + + def delete_at(n) + @loop_proc.delete_at(n) + @proc_max = @loop_proc.size + cancel if @proc_max == 0 + self + end + + def set_start_proc(sleep=nil, init_proc=nil, *init_args, &b) + # set parameters for 'restart' + sleep = @init_sleep unless sleep + + if sleep != 'idle' && sleep != :idle && !sleep.kind_of?(Integer) + fail ArgumentError, "expect Integer or 'idle' for 1st argument" + end + + @init_sleep = sleep + @init_proc = init_proc + @init_args = init_args + + @init_proc = b if !@init_proc && b + @init_proc = proc{|*args| } if @init_sleep > 0 && !@init_proc + + self + end + + def start(*init_args, &b) + return nil if @running + + Tk_CBTBL[@id] = self + @do_loop = @loop_exec + @current_pos = 0 + @return_value = nil + @after_id = nil + + @init_sleep = 0 + @init_proc = nil + @init_args = nil + + argc = init_args.size + if argc > 0 + sleep = init_args.shift + if sleep != 'idle' && sleep != :idle && !sleep.kind_of?(Integer) + fail ArgumentError, "expect Integer or 'idle' for 1st argument" + end + @init_sleep = sleep + end + @init_proc = init_args.shift if argc > 1 + @init_args = init_args if argc > 2 + + @init_proc = b if !@init_proc && b + @init_proc = proc{|*args| } if @init_sleep > 0 && !@init_proc + + @current_sleep = @init_sleep + @running = true + if @init_proc + # if not @init_proc.kind_of?(Proc) + if !TkComm._callback_entry?(@init_proc) + fail ArgumentError, "Argument '#{@init_proc}' need to be Proc" + end + @current_proc = @init_proc + set_callback(@init_sleep, @init_args) + @set_next = false if @in_callback + else + set_next_callback(@init_args) + end + + self + end + + def reset(*reset_args) + restart() if @running + + if @init_proc + @return_value = @init_proc.call(self) + else + @return_value = nil + end + + @current_pos = 0 + @current_args = @init_args + @current_script = [] + + @set_next = false if @in_callback + + self + end + + def restart(*restart_args, &b) + cancel if @running + if restart_args == [] && !b + start(@init_sleep, @init_proc, *@init_args) + else + start(*restart_args, &b) + end + end + + def cancel + @running = false + # @wait_var.value = 0 + __at_end__ + tk_call 'after', 'cancel', @after_id if @after_id + @after_id = nil + + Tk_CBTBL.delete(@id) ;# for GC + self + end + alias stop cancel + + def continue(wait=nil) + fail RuntimeError, "is already running" if @running + return restart() if @current_script.empty? + sleep, cmd = @current_script + fail RuntimeError, "no procedure to continue" unless cmd + if wait + unless wait.kind_of?(Integer) + fail ArgumentError, "expect Integer for 1st argument" + end + sleep = wait + end + Tk_CBTBL[@id] = self + @running = true + @after_id = tk_call_without_enc('after', sleep, cmd) + self + end + + def skip + fail RuntimeError, "is not running now" unless @running + cancel + Tk_CBTBL[@id] = self + @running = true + set_next_callback(@current_args) + self + end + + def info + if @after_id + inf = tk_split_list(tk_call_without_enc('after', 'info', @after_id)) + [Tk_CBTBL[inf[0][1]], inf[1]] + else + nil + end + end + + def at_end(*arg, &b) + if arg.empty? + if b + @at_end_proc = b + else + # no proc + return @at_end_proc + end + else + fail ArgumentError, "wrong number of arguments" if arg.length != 1 || b + @at_end_proc = arg[0] + end + self + end + + def wait(on_thread = true, check_root = false) + if $SAFE >= 4 + fail SecurityError, "can't wait timer at $SAFE >= 4" + end + + unless @running + if @return_value.kind_of?(Exception) + fail @return_value + else + return @return_value + end + end + + @wait_var.wait(on_thread, check_root) + if @return_value.kind_of?(Exception) + fail @return_value + else + @return_value + end + end + def eventloop_wait(check_root = false) + wait(false, check_root) + end + def thread_wait(check_root = false) + wait(true, check_root) + end + def tkwait(on_thread = true) + wait(on_thread, true) + end + def eventloop_tkwait + wait(false, true) + end + def thread_tkwait + wait(true, true) + end +end + +TkAfter = TkTimer + + +class TkRTTimer < TkTimer + DEFAULT_OFFSET_LIST_SIZE = 5 + + def initialize(*args, &b) + super(*args, &b) + + @offset_list = Array.new(DEFAULT_OFFSET_LIST_SIZE){ [0, 0] } + @offset_s = 0 + @offset_u = 0 + @est_time = nil + end + + def start(*args, &b) + return nil if @running + @est_time = nil + @cb_start_time = Time.now + super(*args, &b) + end + + def cancel + super() + @est_time = nil + @cb_start_time = Time.now + self + end + alias stop cancel + + def continue(wait=nil) + fail RuntimeError, "is already running" if @running + @cb_start_time = Time.now + super(wait) + end + + def set_interval(interval) + super(interval) + @est_time = nil + end + + def _offset_ave + size = 0 + d_sec = 0; d_usec = 0 + @offset_list.each_with_index{|offset, idx| + # weight = 1 + weight = idx + 1 + size += weight + d_sec += offset[0] * weight + d_usec += offset[1] * weight + } + offset_s, mod = d_sec.divmod(size) + offset_u = ((mod * 1000000 + d_usec) / size.to_f).round + [offset_s, offset_u] + end + private :_offset_ave + + def set_next_callback(args) + if @running == false || @proc_max == 0 || @do_loop == 0 + Tk_CBTBL.delete(@id) ;# for GC + @running = false + # @wait_var.value = 0 + __at_end__ + return + end + if @current_pos >= @proc_max + if @do_loop < 0 || (@do_loop -= 1) > 0 + @current_pos = 0 + else + Tk_CBTBL.delete(@id) ;# for GC + @running = false + # @wait_var.value = 0 + __at_end__ + return + end + end + + @current_args = args + + cmd, *cmd_args = @loop_proc[@current_pos] + @current_pos += 1 + @current_proc = cmd + + @offset_s, @offset_u = _offset_ave + + if TkComm._callback_entry?(@sleep_time) + sleep = @sleep_time.call(self) + else + sleep = @sleep_time + end + + if @est_time + @est_time = Time.at(@est_time.to_i, @est_time.usec + sleep*1000) + else + @est_time = Time.at(@cb_start_time.to_i, + @cb_start_time.usec + sleep*1000) + end + + now = Time.now + real_sleep = ((@est_time.to_i - now.to_i + @offset_s)*1000.0 + + (@est_time.usec - now.usec + @offset_u)/1000.0).round + if real_sleep <= 0 + real_sleep = 0 + @offset_s = now.to_i + @offset_u = now.usec + end + @current_sleep = real_sleep + + set_callback(real_sleep, cmd_args) + end + + def cb_call + if @est_time + @offset_list.shift + + @cb_start_time = Time.now + + if @current_sleep == 0 + @offset_list.push([ + @offset_s - @cb_start_time.to_i, + @offset_u - @cb_start_time.usec + ]) + else + @offset_list.push([ + @offset_s + (@est_time.to_i - @cb_start_time.to_i), + @offset_u + (@est_time.usec - @cb_start_time.usec) + ]) + end + end + + @cb_cmd.call + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/toplevel.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/toplevel.rb new file mode 100644 index 0000000..bd6e830 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/toplevel.rb @@ -0,0 +1,262 @@ +# +# tk/toplevel.rb : treat toplevel widget +# +require 'tk' +require 'tk/wm' +require 'tk/menuspec' + +class Tk::Toplevelproc, ... } + super().update('menu'=>proc{|v| window(v)}) + end + private :__val2ruby_optkeys + + def __methodcall_optkeys # { key=>method, ... } + TOPLEVEL_METHODCALL_OPTKEYS + end + private :__methodcall_optkeys + + def _wm_command_option_chk(keys) + keys = {} unless keys + new_keys = {} + wm_cmds = {} + + conf_methods = _symbolkey2str(__methodcall_optkeys()) + + keys.each{|k,v| # k is a String + if conf_methods.key?(k) + wm_cmds[conf_methods[k]] = v + elsif Wm.method_defined?(k) + case k + when 'screen','class','colormap','container','use','visual' + new_keys[k] = v + else + case self.method(k).arity + when -1,1 + wm_cmds[k] = v + else + new_keys[k] = v + end + end + else + new_keys[k] = v + end + } + [new_keys, wm_cmds] + end + private :_wm_command_option_chk + + def initialize(parent=nil, screen=nil, classname=nil, keys=nil) + my_class_name = nil + if self.class < WidgetClassNames[WidgetClassName] + my_class_name = self.class.name + my_class_name = nil if my_class_name == '' + end + if parent.kind_of? Hash + keys = _symbolkey2str(parent) + if keys.key?('classname') + keys['class'] = keys.delete('classname') + end + @classname = keys['class'] + @colormap = keys['colormap'] + @container = keys['container'] + @screen = keys['screen'] + @use = keys['use'] + @visual = keys['visual'] + if !@classname && my_class_name + keys['class'] = @classname = my_class_name + end + if @classname.kind_of? TkBindTag + @db_class = @classname + keys['class'] = @classname = @classname.id + elsif @classname + @db_class = TkDatabaseClass.new(@classname) + keys['class'] = @classname + else + @db_class = self.class + @classname = @db_class::WidgetClassName + end + keys, cmds = _wm_command_option_chk(keys) + super(keys) + cmds.each{|k,v| + if v.kind_of? Array + self.__send__(k,*v) + else + self.__send__(k,v) + end + } + return + end + + if screen.kind_of? Hash + keys = screen + else + @screen = screen + if classname.kind_of? Hash + keys = classname + else + @classname = classname + end + end + if keys.kind_of? Hash + keys = _symbolkey2str(keys) + if keys.key?('classname') + keys['class'] = keys.delete('classname') + end + @classname = keys['class'] unless @classname + @colormap = keys['colormap'] + @container = keys['container'] + @screen = keys['screen'] unless @screen + @use = keys['use'] + @visual = keys['visual'] + else + keys = {} + end + if !@classname && my_class_name + keys['class'] = @classname = my_class_name + end + if @classname.kind_of? TkBindTag + @db_class = @classname + keys['class'] = @classname = @classname.id + elsif @classname + @db_class = TkDatabaseClass.new(@classname) + keys['class'] = @classname + else + @db_class = self.class + @classname = @db_class::WidgetClassName + end + keys, cmds = _wm_command_option_chk(keys) + super(parent, keys) + cmds.each{|k,v| + if v.kind_of? Array + self.send(k,*v) + else + self.send(k,v) + end + } + end + + #def create_self(keys) + # if keys and keys != None + # tk_call_without_enc('toplevel', @path, *hash_kv(keys, true)) + # else + # tk_call_without_enc('toplevel', @path) + # end + #end + #private :create_self + + def specific_class + @classname + end + + def add_menu(menu_info, tearoff=false, opts=nil) + # See tk/menuspec.rb for menu_info. + # opts is a hash of default configs for all of cascade menus. + # Configs of menu_info can override it. + if tearoff.kind_of?(Hash) + opts = tearoff + tearoff = false + end + _create_menubutton(self, menu_info, tearoff, opts) + end + + def add_menubar(menu_spec, tearoff=false, opts=nil) + # See tk/menuspec.rb for menu_spec. + # opts is a hash of default configs for all of cascade menus. + # Configs of menu_spec can override it. + menu_spec.each{|info| add_menu(info, tearoff, opts)} + self.menu + end + + def self.database_class + if self == WidgetClassNames[WidgetClassName] || self.name == '' + self + else + TkDatabaseClass.new(self.name) + end + end + def self.database_classname + self.database_class.name + end + + def self.bind(*args, &b) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args, &b) + else + TkDatabaseClass.new(self.name).bind(*args, &b) + end + end + def self.bind_append(*args, &b) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args, &b) + else + TkDatabaseClass.new(self.name).bind_append(*args, &b) + end + end + def self.bind_remove(*args) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args) + else + TkDatabaseClass.new(self.name).bind_remove(*args) + end + end + def self.bindinfo(*args) + if self == WidgetClassNames[WidgetClassName] || self.name == '' + super(*args) + else + TkDatabaseClass.new(self.name).bindinfo(*args) + end + end +end + +#TkToplevel = Tk::Toplevel unless Object.const_defined? :TkToplevel +Tk.__set_toplevel_aliases__(:Tk, Tk::Toplevel, :TkToplevel) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/ttk_selector.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/ttk_selector.rb new file mode 100644 index 0000000..72ed637 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/ttk_selector.rb @@ -0,0 +1,76 @@ +# +# ttk_selector +# +###################################### +# toplevel classes/modules +module Tk + @TOPLEVEL_ALIAS_TABLE[:Ttk] = { + :TkButton => 'tkextlib/tile/tbutton', + + :TkCheckbutton => 'tkextlib/tile/tcheckbutton', + :TkCheckButton => 'tkextlib/tile/tcheckbutton', + + # :TkDialog => 'tkextlib/tile/dialog', + + :TkEntry => 'tkextlib/tile/tentry', + + :TkCombobox => 'tkextlib/tile/tcombobox', + + :TkFrame => 'tkextlib/tile/tframe', + + :TkLabel => 'tkextlib/tile/tlabel', + + :TkLabelframe => 'tkextlib/tile/tlabelframe', + :TkLabelFrame => 'tkextlib/tile/tlabelframe', + + :TkMenubutton => 'tkextlib/tile/tmenubutton', + :TkMenuButton => 'tkextlib/tile/tmenubutton', + + :TkNotebook => 'tkextlib/tile/tnotebook', + + # :TkPaned => 'tkextlib/tile/tpaned', + :TkPanedwindow => 'tkextlib/tile/tpaned', + :TkPanedWindow => 'tkextlib/tile/tpaned', + + :TkProgressbar => 'tkextlib/tile/tprogressbar', + + :TkRadiobutton => 'tkextlib/tile/tradiobutton', + :TkRadioButton => 'tkextlib/tile/tradiobutton', + + :TkScale => 'tkextlib/tile/tscale', + # :TkProgress => 'tkextlib/tile/tscale', + + :TkScrollbar => 'tkextlib/tile/tscrollbar', + :TkXScrollbar => 'tkextlib/tile/tscrollbar', + :TkYScrollbar => 'tkextlib/tile/tscrollbar', + + :TkSeparator => 'tkextlib/tile/tseparator', + + :TkSizeGrip => 'tkextlib/tile/sizegrip', + :TkSizegrip => 'tkextlib/tile/sizegrip', + + # :TkSquare => 'tkextlib/tile/tsquare', + + :TkTreeview => 'tkextlib/tile/treeview', + } + @TOPLEVEL_ALIAS_TABLE[:Tile] = @TOPLEVEL_ALIAS_TABLE[:Ttk] + + ################################################ + # register some Ttk widgets as default + # (Ttk is a standard library on Tcl/Tk8.5+) + @TOPLEVEL_ALIAS_TABLE[:Ttk].each{|sym, file| + unless Object.autoload?(sym) || Object.const_defined?(sym) + Object.autoload(sym, file) + end + } + + ################################################ + + @TOPLEVEL_ALIAS_SETUP_PROC[:Tile] = + @TOPLEVEL_ALIAS_SETUP_PROC[:Ttk] = proc{|mod| + unless Tk.autoload?(:Tile) || Tk.const_defined?(:Tile) + Object.autoload :Ttk, 'tkextlib/tile' + Tk.autoload :Tile, 'tkextlib/tile' + end + } +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/txtwin_abst.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/txtwin_abst.rb new file mode 100644 index 0000000..540f806 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/txtwin_abst.rb @@ -0,0 +1,39 @@ +# +# tk/txtwin_abst.rb : TkTextWin abstruct class +# +require 'tk' + +class TkTextWinvalue)) + end + self + end +=begin + def configure(slot, value=TkComm::None) + key2class = __get_validate_key2class + + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + key2class.each{|key, klass| + if slot[key].kind_of?(Array) + cmd, *args = slot[key] + slot[key] = klass.new(cmd, args.join(' ')) + elsif slot[key].kind_of?(Proc) || slot[key].kind_of?(Method) + slot[key] = klass.new(slot[key]) + end + } + super(slot) + + else + slot = slot.to_s + if (klass = key2class[slot]) + if value.kind_of?(Array) + cmd, *args = value + value = klass.new(cmd, args.join(' ')) + elsif value.kind_of?(Proc) || value.kind_of?(Method) + value = klass.new(value) + end + end + super(slot, value) + end + + self + end +=end + end + + module ItemValidateConfigure + def self.__def_validcmd(scope, klass, keys=nil) + keys = klass._config_keys unless keys + keys.each{|key| + eval("def item_#{key}(id, *args, &b) + __item_validcmd_call(#{klass.name}, '#{key}', id, *args, &b) + end", scope) + } + end + + def __item_validcmd_call(tagOrId, klass, key, *args, &b) + return itemcget(tagid(tagOrId), key) if args.empty? && !b + + cmd = (b)? proc(&b) : args.shift + + if cmd.kind_of?(klass) + itemconfigure(tagid(tagOrId), key, cmd) + elsif !args.empty? + itemconfigure(tagid(tagOrId), key, [cmd, args]) + else + itemconfigure(tagid(tagOrId), key, cmd) + end + end + + def __item_validation_class_list(id) + # maybe need to override + [] + end + + def __get_item_validate_key2class(id) + k2c = {} + __item_validation_class_list(id).each{|klass| + klass._config_keys.each{|key| + k2c[key.to_s] = klass + } + } + end + + def __conv_item_vcmd_on_hash_kv(keys) + key2class = __get_item_validate_key2class(tagid(tagOrId)) + + keys = _symbolkey2str(keys) + key2class.each{|key, klass| + if keys[key].kind_of?(Array) + cmd, *args = keys[key] + #keys[key] = klass.new(cmd, args.join(' ')) + keys[key] = klass.new(cmd, *args) + # elsif keys[key].kind_of?(Proc) || keys[key].kind_of?(Method) + elsif TkComm._callback_entry?(keys[key]) + keys[key] = klass.new(keys[key]) + end + } + keys + end + + def itemconfigure(tagOrId, slot, value=TkComm::None) + if slot.kind_of?(Hash) + super(__conv_item_vcmd_on_hash_kv(slot)) + else + super(__conv_item_vcmd_on_hash_kv(slot=>value)) + end + self + end +=begin + def itemconfigure(tagOrId, slot, value=TkComm::None) + key2class = __get_item_validate_key2class(tagid(tagOrId)) + + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + key2class.each{|key, klass| + if slot[key].kind_of?(Array) + cmd, *args = slot[key] + slot[key] = klass.new(cmd, args.join(' ')) + elsif slot[key].kind_of?(Proc) || slot[key].kind_of?(Method) + slot[key] = klass.new(slot[key]) + end + } + super(slot) + + else + slot = slot.to_s + if (klass = key2class[slot]) + if value.kind_of?(Array) + cmd, *args = value + value = klass.new(cmd, args.join(' ')) + elsif value.kind_of?(Proc) || value.kind_of?(Method) + value = klass.new(value) + end + end + super(slot, value) + end + + self + end +=end + end +end + +class TkValidateCommand + include TkComm + extend TkComm + + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?d, ?n, :action ], + [ ?i, ?x, :index ], + [ ?s, ?e, :current ], + [ ?v, ?s, :type ], + [ ?P, ?e, :value ], + [ ?S, ?e, :string ], + [ ?V, ?s, :triggered ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + + [ ?e, proc{|val| + #enc = Tk.encoding + enc = ((Tk.encoding)? Tk.encoding : Tk.encoding_system) + if enc + Tk.fromUTF8(TkComm::string(val), enc) + else + TkComm::string(val) + end + } + ], + + [ ?x, proc{|val| + idx = TkComm::number(val) + if idx < 0 + nil + else + idx + end + } + ], + + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + # + # NOTE: The order of parameters which passed to callback procedure is + # , , ... , , , ... + # + + #def self._get_extra_args_tbl + # # return an array of convert procs + # [] + #end + + def self.ret_val(val) + (val)? '1': '0' + end + end + + ############################################### + + def self._config_keys + # array of config-option key (string or symbol) + ['vcmd', 'validatecommand', 'invcmd', 'invalidcommand'] + end + + def _initialize_for_cb_class(klass, cmd = Proc.new, *args) + extra_args_tbl = klass._get_extra_args_tbl + + if args.compact.size > 0 + args.map!{|arg| klass._sym2subst(arg)} + args = args.join(' ') + keys = klass._get_subst_key(args) + if cmd.kind_of?(String) + id = cmd + elsif cmd.kind_of?(TkCallbackEntry) + @id = install_cmd(cmd) + else + @id = install_cmd(proc{|*arg| + ex_args = [] + extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)} + klass.ret_val(cmd.call( + *(ex_args.concat(klass.scan_args(keys, arg))) + )) + }) + ' ' + args + end + else + keys, args = klass._get_all_subst_keys + if cmd.kind_of?(String) + id = cmd + elsif cmd.kind_of?(TkCallbackEntry) + @id = install_cmd(cmd) + else + @id = install_cmd(proc{|*arg| + ex_args = [] + extra_args_tbl.reverse_each{|conv| ex_args << conv.call(arg.pop)} + klass.ret_val(cmd.call( + *(ex_args << klass.new(*klass.scan_args(keys, arg))) + )) + }) + ' ' + args + end + end + end + + def initialize(cmd = Proc.new, *args) + _initialize_for_cb_class(self.class::ValidateArgs, cmd, *args) + end + + def to_eval + @id + end +end + +module TkValidation + include Tk::ValidateConfigure + + class ValidateCmd < TkValidateCommand + module Action + Insert = 1 + Delete = 0 + Others = -1 + Focus = -1 + Forced = -1 + Textvariable = -1 + TextVariable = -1 + end + end + + ##################################### + + def __validation_class_list + super() << ValidateCmd + end + + Tk::ValidateConfigure.__def_validcmd(binding, ValidateCmd) + +=begin + def validatecommand(cmd = Proc.new, args = nil) + if cmd.kind_of?(ValidateCmd) + configure('validatecommand', cmd) + elsif args + configure('validatecommand', [cmd, args]) + else + configure('validatecommand', cmd) + end + end +=end +# def validatecommand(*args, &b) +# __validcmd_call(ValidateCmd, 'validatecommand', *args, &b) +# end +# alias vcmd validatecommand + +=begin + def invalidcommand(cmd = Proc.new, args = nil) + if cmd.kind_of?(ValidateCmd) + configure('invalidcommand', cmd) + elsif args + configure('invalidcommand', [cmd, args]) + else + configure('invalidcommand', cmd) + end + end +=end +# def invalidcommand(*args, &b) +# __validcmd_call(ValidateCmd, 'invalidcommand', *args, &b) +# end +# alias invcmd invalidcommand +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/variable.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/variable.rb new file mode 100644 index 0000000..b73a467 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/variable.rb @@ -0,0 +1,1765 @@ +# +# tk/variable.rb : treat Tk variable object +# +require 'tk' + +class TkVariable + include Tk + extend TkCore + + include Comparable + + #TkCommandNames = ['tkwait'.freeze].freeze + TkCommandNames = ['vwait'.freeze].freeze + + #TkVar_CB_TBL = {} + #TkVar_ID_TBL = {} + TkVar_CB_TBL = TkCore::INTERP.create_table + TkVar_ID_TBL = TkCore::INTERP.create_table + (Tk_VARIABLE_ID = ["v".freeze, "00000".taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + TkCore::INTERP.init_ip_env{ + TkVar_CB_TBL.mutex.synchronize{ TkVar_CB_TBL.clear } + TkVar_ID_TBL.mutex.synchronize{ TkVar_ID_TBL.clear } + } + + major, minor, type, patchlevel = TclTkLib.get_version + USE_OLD_TRACE_OPTION_STYLE = (major < 8) || (major == 8 && minor < 4) + + #TkCore::INTERP.add_tk_procs('rb_var', 'args', + # "ruby [format \"TkVariable.callback %%Q!%s!\" $args]") + TkCore::INTERP.add_tk_procs('rb_var', 'args', <<-'EOL') + if {[set st [catch {eval {ruby_cmd TkVariable callback} $args} ret]] != 0} { + set idx [string first "\n\n" $ret] + if {$idx > 0} { + global errorInfo + set tcl_backtrace $errorInfo + set errorInfo [string range $ret [expr $idx + 2] \ + [string length $ret]] + append errorInfo "\n" $tcl_backtrace + bgerror [string range $ret 0 [expr $idx - 1]] + } else { + bgerror $ret + } + return "" + #return -code $st $ret + } else { + return $ret + } + EOL + + #def TkVariable.callback(args) + def TkVariable.callback(id, name1, name2, op) + #name1,name2,op = tk_split_list(args) + #name1,name2,op = tk_split_simplelist(args) + if cb_obj = TkVar_CB_TBL[id] + #_get_eval_string(TkVar_CB_TBL[name1].trace_callback(name2,op)) + begin + _get_eval_string(cb_obj.trace_callback(name2, op)) + rescue SystemExit + exit(0) + rescue Interrupt + exit!(1) + rescue Exception => e + begin + msg = _toUTF8(e.class.inspect) + ': ' + + _toUTF8(e.message) + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + _toUTF8(e.backtrace.join("\n")) + + "\n---< backtrace of Tk side >-------" + if TkCore::WITH_ENCODING + msg.force_encoding('utf-8') + else + msg.instance_variable_set(:@encoding, 'utf-8') + end + rescue Exception + msg = e.class.inspect + ': ' + e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------" + end + fail(e, msg) + end +=begin + begin + raise 'check backtrace' + rescue + # ignore backtrace before 'callback' + pos = -($!.backtrace.size) + end + begin + _get_eval_string(TkVar_CB_TBL[name1].trace_callback(name2,op)) + rescue + trace = $!.backtrace + raise $!, "\n#{trace[0]}: #{$!.message} (#{$!.class})\n" + + "\tfrom #{trace[1..pos].join("\n\tfrom ")}" + end +=end + else + '' + end + end + + def self.new_hash(val = {}) + if val.kind_of?(Hash) + self.new(val) + else + fail ArgumentError, 'Hash is expected' + end + end + + # + # default_value is available only when the variable is an assoc array. + # + def default_value(val=nil, &b) + if b + @def_default = :proc + @default_val = proc(&b) + else + @def_default = :val + @default_val = val + end + self + end + def set_default_value(val) + @def_default = :val + @default_val = val + self + end + alias default_value= set_default_value + def default_proc(cmd = Proc.new) + @def_default = :proc + @default_val = cmd + self + end + + def undef_default + @default_val = nil + @def_default = false + self + end + + def default_value_type + @type + end + def default_element_value_type(idxs) + if idxs.kind_of?(Array) + index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',') + else + index = _get_eval_string(idxs, true) + end + @element_type[index] + end + + def _set_default_value_type_core(type, idxs) + if type.kind_of?(Class) + if type == NilClass + type = nil + elsif type == Numeric + type = :numeric + elsif type == TrueClass || type == FalseClass + type = :bool + elsif type == String + type = :string + elsif type == Symbol + type = :symbol + elsif type == Array + type = :list + elsif type <= TkVariable + type = :variable + elsif type <= TkWindow + type = :window + elsif TkComm._callback_entry_class?(type) + type = :procedure + else + type = nil + end + else + case(type) + when nil + type = nil + when :numeric, 'numeric' + type = :numeric + when true, false, :bool, 'bool' + type = :bool + when :string, 'string' + type = :string + when :symbol, 'symbol' + type = :symbol + when :list, 'list' + type = :list + when :numlist, 'numlist' + type = :numlist + when :variable, 'variable' + type = :variable + when :window, 'window' + type = :window + when :procedure, 'procedure' + type = :procedure + else + return _set_default_value_type_core(type.class, idxs) + end + end + if idxs + if idxs.kind_of?(Array) + index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',') + else + index = _get_eval_string(idxs, true) + end + @element_type[index] = type + else + @type = type + end + type + end + private :_set_default_value_type_core + + def set_default_value_type(type) + _set_default_value_type_core(type, nil) + self + end + alias default_value_type= set_default_value_type + + def set_default_element_value_type(idxs, type) + _set_default_value_type_core(type, idxs) + self + end + + def _to_default_type(val, idxs = nil) + if idxs + if idxs.kind_of?(Array) + index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',') + else + index = _get_eval_string(idxs, true) + end + type = @element_type[index] + else + type = @type + end + return val unless type + if val.kind_of?(Hash) + val.keys.each{|k| val[k] = _to_default_type(val[k], idxs) } + val + else + begin + case(type) + when :numeric + number(val) + when :bool + TkComm.bool(val) + when :string + val + when :symbol + val.intern + when :list + tk_split_simplelist(val) + when :numlist + tk_split_simplelist(val).collect!{|v| number(v)} + when :variable + TkVarAccess.new(val) + when :window + TkComm.window(val) + when :procedure + TkComm.procedure(val) + else + val + end + rescue + val + end + end + end + private :_to_default_type + + def _to_default_element_type(idxs, val) + _to_default_type(val, idxs) + end + private :_to_default_element_type + + def initialize(val="", type=nil) + # @id = Tk_VARIABLE_ID.join('') + begin + Tk_VARIABLE_ID.mutex.synchronize{ + @id = Tk_VARIABLE_ID.join(TkCore::INTERP._ip_id_) + Tk_VARIABLE_ID[1].succ! + } + end until INTERP._invoke_without_enc('info', 'globals', @id).empty? + + TkVar_ID_TBL.mutex.synchronize{ + TkVar_ID_TBL[@id] = self + } + + @var = @id + @elem = nil + + @def_default = false + @default_val = nil + + @trace_var = nil + @trace_elem = nil + @trace_opts = nil + + @type = nil + var = self + @element_type = Hash.new{|k,v| var.default_value_type } + + self.default_value_type = type + + # teach Tk-ip that @id is global var + INTERP._invoke_without_enc('global', @id) + #INTERP._invoke('global', @id) + + # create and init + if val.kind_of?(Hash) + # assoc-array variable + self[''] = 0 + self.clear + end + self.value = val + +=begin + if val == [] + # INTERP._eval(format('global %s; set %s(0) 0; unset %s(0)', + # @id, @id, @id)) + elsif val.kind_of?(Array) + a = [] + # val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))} + # s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"' + val.each_with_index{|e,i| a.push(i); a.push(e)} + #s = '"' + array2tk_list(a).gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + array2tk_list(a).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(format('global %s; array set %s %s', @id, @id, s)) + elsif val.kind_of?(Hash) + #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\ + # .gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\ + .gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(format('global %s; array set %s %s', @id, @id, s)) + else + #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(format('global %s; set %s %s', @id, @id, s)) + end +=end +=begin + if val.kind_of?(Hash) + #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\ + # .gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\ + .gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; array set %s %s', @id, @id, s)) + else + #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s)) + end +=end + end + + def wait(on_thread = false, check_root = false) + if $SAFE >= 4 + fail SecurityError, "can't wait variable at $SAFE >= 4" + end + on_thread &= (Thread.list.size != 1) + if on_thread + if check_root + INTERP._thread_tkwait('variable', @id) + else + INTERP._thread_vwait(@id) + end + else + if check_root + INTERP._invoke_without_enc('tkwait', 'variable', @id) + else + INTERP._invoke_without_enc('vwait', @id) + end + end + end + def eventloop_wait(check_root = false) + wait(false, check_root) + end + def thread_wait(check_root = false) + wait(true, check_root) + end + def tkwait(on_thread = true) + wait(on_thread, true) + end + def eventloop_tkwait + wait(false, true) + end + def thread_tkwait + wait(true, true) + end + + def id + @id + end + + def ref(*idxs) + # "#{@id}(#{idxs.collect{|idx| _get_eval_string(idx)}.join(',')})" + TkVarAccess.new("#{@id}(#{idxs.collect{|idx| _get_eval_string(idx)}.join(',')})") + end + + def is_hash? + #ITNERP._eval("global #{@id}; array exist #{@id}") == '1' + INTERP._invoke_without_enc('global', @id) + # INTERP._invoke_without_enc('array', 'exist', @id) == '1' + TkComm.bool(INTERP._invoke_without_enc('array', 'exist', @id)) + end + + def is_scalar? + ! is_hash? + end + + def exist?(*elems) + INTERP._invoke_without_enc('global', @id) + if elems.empty? + TkComm.bool(tk_call('info', 'exist', @id)) + else + # array + index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',') + TkComm.bool(tk_call('info', 'exist', "#{@id}")) && + TkComm.bool(tk_call('info', 'exist', "#{@id}(#{index})")) + end + end + + def keys + if (is_scalar?) + fail RuntimeError, 'cannot get keys from a scalar variable' + end + #tk_split_simplelist(INTERP._eval("global #{@id}; array get #{@id}")) + INTERP._invoke_without_enc('global', @id) + #tk_split_simplelist(INTERP._fromUTF8(INTERP._invoke_without_enc('array', 'names', @id))) + tk_split_simplelist(INTERP._invoke_without_enc('array', 'names', @id), + false, true) + end + + def size + INTERP._invoke_without_enc('global', @id) + TkComm.number(INTERP._invoke_without_enc('array', 'size', @id)) + end + + def clear + if (is_scalar?) + fail RuntimeError, 'cannot clear a scalar variable' + end + keys.each{|k| unset(k)} + self + end + + def update(hash) + if (is_scalar?) + fail RuntimeError, 'cannot update a scalar variable' + end + hash.each{|k,v| self[k] = v} + self + end + +unless const_defined?(:USE_TCLs_SET_VARIABLE_FUNCTIONS) + USE_TCLs_SET_VARIABLE_FUNCTIONS = true +end + +if USE_TCLs_SET_VARIABLE_FUNCTIONS + ########################################################################### + # use Tcl function version of set tkvariable + ########################################################################### + + def _value + #if INTERP._eval("global #{@id}; array exist #{@id}") == '1' + INTERP._invoke_without_enc('global', @id) + # if INTERP._invoke('array', 'exist', @id) == '1' + if TkComm.bool(INTERP._invoke('array', 'exist', @id)) + #Hash[*tk_split_simplelist(INTERP._eval("global #{@id}; array get #{@id}"))] + Hash[*tk_split_simplelist(INTERP._invoke('array', 'get', @id))] + else + _fromUTF8(INTERP._get_global_var(@id)) + end + end + + def value=(val) + val = val._value if !@type && @type != :variable && val.kind_of?(TkVariable) + if val.kind_of?(Hash) + self.clear + val.each{|k, v| + #INTERP._set_global_var2(@id, _toUTF8(_get_eval_string(k)), + # _toUTF8(_get_eval_string(v))) + INTERP._set_global_var2(@id, _get_eval_string(k, true), + _get_eval_string(v, true)) + } + self.value +# elsif val.kind_of?(Array) +=begin + INTERP._set_global_var(@id, '') + val.each{|v| + #INTERP._set_variable(@id, _toUTF8(_get_eval_string(v)), + INTERP._set_variable(@id, _get_eval_string(v, true), + TclTkLib::VarAccessFlag::GLOBAL_ONLY | + TclTkLib::VarAccessFlag::LEAVE_ERR_MSG | + TclTkLib::VarAccessFlag::APPEND_VALUE | + TclTkLib::VarAccessFlag::LIST_ELEMENT) + } + self.value +=end +# _fromUTF8(INTERP._set_global_var(@id, array2tk_list(val, true))) + else + #_fromUTF8(INTERP._set_global_var(@id, _toUTF8(_get_eval_string(val)))) + _fromUTF8(INTERP._set_global_var(@id, _get_eval_string(val, true))) + end + end + + def _element_value(*idxs) + index = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',') + begin + _fromUTF8(INTERP._get_global_var2(@id, index)) + rescue => e + case @def_default + when :proc + @default_val.call(self, *idxs) + when :val + @default_val + else + fail e + end + end + #_fromUTF8(INTERP._get_global_var2(@id, index)) + #_fromUTF8(INTERP._get_global_var2(@id, _toUTF8(_get_eval_string(index)))) + #_fromUTF8(INTERP._get_global_var2(@id, _get_eval_string(index, true))) + end + + def []=(*args) + val = args.pop + type = default_element_value_type(args) + val = val._value if !type && type != :variable && val.kind_of?(TkVariable) + index = args.collect{|idx| _get_eval_string(idx, true)}.join(',') + _fromUTF8(INTERP._set_global_var2(@id, index, _get_eval_string(val, true))) + #_fromUTF8(INTERP._set_global_var2(@id, _toUTF8(_get_eval_string(index)), + # _toUTF8(_get_eval_string(val)))) + #_fromUTF8(INTERP._set_global_var2(@id, _get_eval_string(index, true), + # _get_eval_string(val, true))) + end + + def unset(*elems) + if elems.empty? + INTERP._unset_global_var(@id) + else + index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',') + INTERP._unset_global_var2(@id, index) + end + end + alias remove unset + +else + ########################################################################### + # use Ruby script version of set tkvariable (traditional methods) + ########################################################################### + + def _value + begin + INTERP._eval(Kernel.format('global %s; set %s', @id, @id)) + #INTERP._eval(Kernel.format('set %s', @id)) + #INTERP._invoke_without_enc('set', @id) + rescue + if INTERP._eval(Kernel.format('global %s; array exists %s', + @id, @id)) != "1" + #if INTERP._eval(Kernel.format('array exists %s', @id)) != "1" + #if INTERP._invoke_without_enc('array', 'exists', @id) != "1" + fail + else + Hash[*tk_split_simplelist(INTERP._eval(Kernel.format('global %s; array get %s', @id, @id)))] + #Hash[*tk_split_simplelist(_fromUTF8(INTERP._invoke_without_enc('array', 'get', @id)))] + end + end + end + + def value=(val) + val = val._value if !@type && @type != :variable && val.kind_of?(TkVariable) + begin + #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s)) + #INTERP._eval(Kernel.format('set %s %s', @id, s)) + #_fromUTF8(INTERP._invoke_without_enc('set', @id, _toUTF8(s))) + rescue + if INTERP._eval(Kernel.format('global %s; array exists %s', + @id, @id)) != "1" + #if INTERP._eval(Kernel.format('array exists %s', @id)) != "1" + #if INTERP._invoke_without_enc('array', 'exists', @id) != "1" + fail + else + if val == [] + INTERP._eval(Kernel.format('global %s; unset %s; set %s(0) 0; unset %s(0)', @id, @id, @id, @id)) + #INTERP._eval(Kernel.format('unset %s; set %s(0) 0; unset %s(0)', + # @id, @id, @id)) + #INTERP._invoke_without_enc('unset', @id) + #INTERP._invoke_without_enc('set', @id+'(0)', 0) + #INTERP._invoke_without_enc('unset', @id+'(0)') + elsif val.kind_of?(Array) + a = [] + val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e, true))} + #s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + a.join(" ").gsub(/[\[\]$"\\]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s', + @id, @id, @id, s)) + #INTERP._eval(Kernel.format('unset %s; array set %s %s', + # @id, @id, s)) + #INTERP._invoke_without_enc('unset', @id) + #_fromUTF8(INTERP._invoke_without_enc('array','set', @id, _toUTF8(s))) + elsif val.kind_of?(Hash) + #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\ + # .gsub(/[\[\]$"]/, '\\\\\&') + '"' + s = '"' + val.to_a.collect{|e| array2tk_list(e, true)}.join(" ")\ + .gsub(/[\[\]$\\"]/, '\\\\\&') + '"' + INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s', + @id, @id, @id, s)) + #INTERP._eval(Kernel.format('unset %s; array set %s %s', + # @id, @id, s)) + #INTERP._invoke_without_enc('unset', @id) + #_fromUTF8(INTERP._invoke_without_enc('array','set', @id, _toUTF8(s))) + else + fail + end + end + end + end + + def _element_value(*idxs) + index = idxs.collect{|idx| _get_eval_string(idx)}.join(',') + begin + INTERP._eval(Kernel.format('global %s; set %s(%s)', @id, @id, index)) + rescue => e + case @def_default + when :proc + @default_val.call(self, *idxs) + when :val + @default_val + else + fail e + end + end + #INTERP._eval(Kernel.format('global %s; set %s(%s)', @id, @id, index)) + #INTERP._eval(Kernel.format('global %s; set %s(%s)', + # @id, @id, _get_eval_string(index))) + #INTERP._eval(Kernel.format('set %s(%s)', @id, _get_eval_string(index))) + #INTERP._eval('set ' + @id + '(' + _get_eval_string(index) + ')') + end + + def []=(*args) + val = args.pop + type = default_element_value_type(args) + val = val._value if !type && type != :variable && val.kind_of?(TkVariable) + index = args.collect{|idx| _get_eval_string(idx)}.join(',') + INTERP._eval(Kernel.format('global %s; set %s(%s) %s', @id, @id, + index, _get_eval_string(val))) + #INTERP._eval(Kernel.format('global %s; set %s(%s) %s', @id, @id, + # _get_eval_string(index), _get_eval_string(val))) + #INTERP._eval(Kernel.format('set %s(%s) %s', @id, + # _get_eval_string(index), _get_eval_string(val))) + #INTERP._eval('set ' + @id + '(' + _get_eval_string(index) + ') ' + + # _get_eval_string(val)) + end + + def unset(*elems) + if elems.empty? + INTERP._eval(Kernel.format('global %s; unset %s', @id, @id)) + #INTERP._eval(Kernel.format('unset %s', @id)) + #INTERP._eval('unset ' + @id) + else + index = elems.collect{|idx| _get_eval_string(idx, true)}.join(',') + INTERP._eval(Kernel.format('global %s; unset %s(%s)', @id, @id, index)) + #INTERP._eval(Kernel.format('global %s; unset %s(%s)', + # @id, @id, _get_eval_string(elem))) + #INTERP._eval(Kernel.format('unset %s(%s)', @id, tk_tcl2ruby(elem))) + #INTERP._eval('unset ' + @id + '(' + _get_eval_string(elem) + ')') + end + end + alias remove unset + +end + + protected :_value, :_element_value + + def value + _to_default_type(_value) + end + + def [](*idxs) + _to_default_element_type(idxs, _element_value(*idxs)) + end + + def set_value(val) + self.value = val + self + end + + def set_element_value(idxs, val) + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + + def set_value_type(val) + self.default_value_type = val.class + self.value = val + self + end + + alias value_type= set_value_type + + def set_element_value_type(idxs, val) + self.set_default_element_value_type(idxs, val.class) + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + + def numeric + number(_value) + end + def numeric_element(*idxs) + number(_element_value(*idxs)) + end + def set_numeric(val) + case val + when Numeric + self.value=(val) + when TkVariable + self.value=(val.numeric) + else + raise ArgumentError, "Numeric is expected" + end + self + end + alias numeric= set_numeric + def set_numeric_element(idxs, val) + case val + when Numeric + val + when TkVariable + val = val.numeric + else + raise ArgumentError, "Numeric is expected" + end + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + def set_numeric_type(val) + @type = :numeric + self.numeric=(val) + self + end + alias numeric_type= set_numeric_type + def set_numeric_element_type(idxs, val) + self.set_default_element_value_type(idxs, :numeric) + self.set_numeric_element(idxs, val) + end + + def bool + TkComm.bool(_value) +=begin + # see Tcl_GetBoolean man-page + case _value.downcase + when '0', 'false', 'no', 'off' + false + else + true + end +=end + end + def bool_element(*idxs) + TkComm.bool(_element_value(*idxs)) + end + def set_bool(val) + if ! val + self.value = '0' + else + case val.to_s.downcase + when 'false', '0', 'no', 'off' + self.value = '0' + else + self.value = '1' + end + end + self + end + alias bool= set_bool + def set_bool_element(idxs, val) + if ! val + val = '0' + else + case val.to_s.downcase + when 'false', '0', 'no', 'off' + val = '0' + else + val = '1' + end + end + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + def set_bool_type(val) + @type = :bool + self.bool=(val) + self + end + alias bool_type= set_bool_type + def set_bool_element_type(idxs, val) + self.set_default_element_value_type(idxs, :bool) + self.set_bool_element(idxs, val) + end + + def variable + # keeps a Tcl's variable name + TkVarAccess.new(self._value) + end + def variable_element(*idxs) + TkVarAccess.new(_element_value(*idxs)) + end + def set_variable(var) + var = var.id if var.kind_of?(TkVariable) + self.value = var + self + end + alias variable= set_variable + def set_variable_element(idxs, var) + var = var.id if var.kind_of?(TkVariable) + if idxs.kind_of?(Array) + self[*idxs]=var + else + self[idxs]=var + end + self + end + def set_variable_type(var) + @type = :variable + var = var.id if var.kind_of?(TkVariable) + self.value = var + self + end + alias variable_type= set_variable_type + def set_variable_element_type(idxs, var) + self.set_default_element_value_type(idxs, :variable) + self.set_variable_element(idxs, var) + end + + def window + TkComm.window(self._value) + end + def window_element(*idxs) + TkComm.window(_element_value(*idxs)) + end + def set_window(win) + win = win._value if win.kind_of?(TkVariable) + self.value = win + self + end + alias window= set_window + def set_window_element(idxs, win) + win = win._value if win.kind_of?(TkVariable) + if idxs.kind_of?(Array) + self[*idxs]=win + else + self[idxs]=win + end + self + end + def set_window_type(win) + @type = :window + self.window=(win) + self + end + alias window_type= set_window_type + def set_window_element_type(idxs, win) + self.set_default_element_value_type(idxs, :window) + self.set_window_element(idxs, win) + end + + def procedure + TkComm.procedure(self._value) + end + def procedure_element(*idxs) + TkComm.procedure(_element_value(*idxs)) + end + def set_procedure(cmd) + self.value = cmd + self + end + alias procedure= set_procedure + def set_procedure_element(idxs, cmd) + cmd = cmd._value if cmd.kind_of?(TkVariable) + if idxs.kind_of?(Array) + self[*idxs]=cmd + else + self[idxs]=cmd + end + self + end + def set_procedure_type(cmd) + @type = :procedure + self.procedure=(cmd) + self + end + alias procedure_type= set_procedure_type + def set_procedure_element_type(idxs, cmd) + self.set_default_element_value_type(idxs, :procedure) + self.set_proceure_element(idxs, cmd) + end + + def to_i + number(_value).to_i + end + def element_to_i(*idxs) + number(_element_value(*idxs)).to_i + end + + def to_f + number(_value).to_f + end + def element_to_f(*idxs) + number(_element_value(*idxs)).to_f + end + + def to_s + #string(value).to_s + _value + end + alias string to_s + def element_to_s(*idxs) + _element_value(*idxs) + end + def string_element(*idxs) + _element_value(*idxs) + end + def set_string(val) + val = val._value if val.kind_of?(TkVariable) + self.value=val + self + end + alias string= set_string + def set_string_element(idxs, val) + val = val._value if val.kind_of?(TkVariable) + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + def set_string_type(val) + @type = :string + self.string=(val) + self + end + alias string_type= set_string_type + def set_string_element_type(idxs, val) + self.set_default_element_value_type(idxs, :string) + self.set_string_element(idxs, val) + end + + def to_sym + _value.intern + end + alias symbol to_sym + def element_to_sym(*idxs) + _element_value(*idxs).intern + end + alias symbol_element element_to_sym + def set_symbol(val) + val = val._value if val.kind_of?(TkVariable) + self.value=val + self + end + alias symbol= set_symbol + def set_symbol_element(idxs, val) + val = val._value if val.kind_of?(TkVariable) + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + def set_symbol_type(val) + @type = :symbol + self.value=(val) + self + end + alias symbol_type= set_symbol_type + def set_symbol_element_type(idxs, val) + self.set_default_element_value_type(idxs, :symbol) + self.set_symbol_element(idxs, val) + end + + def list + #tk_split_list(value) + tk_split_simplelist(_value) + end + alias to_a list + def list_element(*idxs) + tk_split_simplelist(_element_value(*idxs)) + end + alias element_to_a list_element + + def numlist + list.collect!{|val| number(val)} + end + def numlist_element(*idxs) + list_element(*idxs).collect!{|val| number(val)} + end + + def set_list(val) + case val + when Array + self.value=(val) + when TkVariable + self.value=(val.list) + else + raise ArgumentError, "Array is expected" + end + self + end + alias list= set_list + + alias set_numlist set_list + alias numlist= set_numlist + + def set_list_element(idxs, val) + case val + when Array + val + when TkVariable + val = val.list + else + raise ArgumentError, "Array is expected" + end + if idxs.kind_of?(Array) + self[*idxs]=val + else + self[idxs]=val + end + self + end + alias set_numlist_element set_list_element + + def set_list_type(val) + @type = :list + self.list=(val) + self + end + alias list_type= set_list_type + def set_list_element_type(idxs, val) + self.set_default_element_value_type(idxs, :list) + self.set_list_element(idxs, val) + end + def set_numlist_type(val) + @type = :numlist + self.numlist=(val) + self + end + alias numlist_type= set_numlist_type + def set_numlist_element_type(idxs, val) + self.set_default_element_value_type(idxs, :numlist) + self.set_numlist_element(idxs, val) + end + + def lappend(*elems) + tk_call('lappend', @id, *elems) + self + end + def element_lappend(idxs, *elems) + if idxs.kind_of?(Array) + idxs = idxs.collect{|idx| _get_eval_string(idx, true)}.join(',') + end + tk_call('lappend', "#{@id}(#{idxs})", *elems) + self + end + + def lindex(idx) + tk_call('lindex', self._value, idx) + end + alias lget lindex + def element_lindex(elem_idxs, idx) + if elem_idxs.kind_of?(Array) + val = _element_value(*elem_idxs) + else + val = _element_value(elem_idxs) + end + tk_call('lindex', val, idx) + end + alias element_lget element_lindex + + def lget_i(idx) + number(lget(idx)).to_i + end + def element_lget_i(elem_idxs, idx) + number(element_lget(elem_idxs, idx)).to_i + end + + def lget_f(idx) + number(lget(idx)).to_f + end + def element_lget_f(elem_idxs, idx) + number(element_lget(elem_idxs, idx)).to_f + end + + def lset(idx, val) + tk_call('lset', @id, idx, val) + self + end + def element_lset(elem_idxs, idx, val) + if elem_idxs.kind_of?(Array) + idxs = elem_idxs.collect{|i| _get_eval_string(i, true)}.join(',') + end + tk_call('lset', "#{@id}(#{idxs})", idx, val) + self + end + + def inspect + #Kernel.format "#", @id + '#' + end + + def coerce(other) + case other + when TkVariable + [other._value, self._value] + when String + [other, self.to_s] + when Symbol + [other, self.to_sym] + when Integer + [other, self.to_i] + when Float + [other, self.to_f] + when Array + [other, self.to_a] + else + [other, self._value] + end + end + + def &(other) + if other.kind_of?(Array) + self.to_a & other.to_a + else + self.to_i & other.to_i + end + end + def |(other) + if other.kind_of?(Array) + self.to_a | other.to_a + else + self.to_i | other.to_i + end + end + def +(other) + case other + when Array + self.to_a + other + when String + self._value + other + else + begin + number(self._value) + other + rescue + self._value + other.to_s + end + end + end + def -(other) + if other.kind_of?(Array) + self.to_a - other + else + number(self._value) - other + end + end + def *(other) + num_or_str(self._value) * other.to_i + #begin + # number(self._value) * other + #rescue + # self._value * other + #end + end + def /(other) + number(self._value) / other + end + def %(other) + num_or_str(self._value) % other.to_i + #begin + # number(self._value) % other + #rescue + # self._value % other + #end + end + def **(other) + number(self._value) ** other + end + def =~(other) + self._value =~ other + end + + def ==(other) + case other + when TkVariable + #self.equal?(other) + self._value == other._value + when String + self.to_s == other + when Symbol + self.to_sym == other + when Integer + self.to_i == other + when Float + self.to_f == other + when Array + self.to_a == other + when Hash + # false if self is not an assoc array + self._value == other + else + # false + self._value == _get_eval_string(other) + end + end + + def zero? + numeric.zero? + end + def nonzero? + !(numeric.zero?) + end + + def <=>(other) + if other.kind_of?(TkVariable) + begin + val = other.numeric + other = val + rescue + other = other._value + end + elsif other.kind_of?(Numeric) + begin + return self.numeric <=> other + rescue + return self._value <=> other.to_s + end + elsif other.kind_of?(Array) + return self.list <=> other + else + return self._value <=> other + end + end + + def to_eval + @id + end + + def trace_callback(elem, op) + if @trace_var.kind_of? Array + @trace_var.each{|m,e| e.call(self,elem,op) if m.index(op)} + end + if elem.kind_of?(String) && elem != '' + if @trace_elem.kind_of?(Hash) && @trace_elem[elem].kind_of?(Array) + @trace_elem[elem].each{|m,e| e.call(self,elem,op) if m.index(op)} + end + end + end + + def _check_trace_opt(opts) + if opts.kind_of?(Array) + opt_str = opts.map{|s| s.to_s}.join(' ') + else + opt_str = opts.to_s + end + + fail ArgumentError, 'null trace option' if opt_str.empty? + + if opt_str =~ /[^arwu\s]/ + # new format (Tcl/Tk8.4+?) + if opts.kind_of?(Array) + opt_ary = opts.map{|opt| opt.to_s.strip} + else + opt_ary = opt_str.split(/\s+|\|/) + opt_ary.delete('') + end + if USE_OLD_TRACE_OPTION_STYLE + opt_ary.uniq.map{|opt| + case opt + when 'array' + 'a' + when 'read' + 'r' + when 'write' + 'w' + when 'unset' + 'u' + else + fail ArgumentError, "unsupported trace option '#{opt}' on Tcl/Tk#{Tk::TCL_PATCHLEVEL}" + end + }.join + else + opt_ary + end + else + # old format + opt_ary = opt_str.delete('^arwu').split(//).uniq + if USE_OLD_TRACE_OPTION_STYLE + opt_ary.join + else + opt_ary.map{|c| + case c + when 'a' + 'array' + when 'r' + 'read' + when 'w' + 'write' + when 'u' + 'unset' + end + } + end + end + end + private :_check_trace_opt + + def trace(opts, cmd = Proc.new) + opts = _check_trace_opt(opts) + (@trace_var ||= []).unshift([opts,cmd]) + + if @trace_opts == nil + TkVar_CB_TBL[@id] = self + @trace_opts = opts + if USE_OLD_TRACE_OPTION_STYLE + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + else + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + else + newopts = @trace_opts.dup + if USE_OLD_TRACE_OPTION_STYLE + opts.each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + if newopts != @trace_opts + Tk.tk_call_without_enc('trace', 'vdelete', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + else + newopts |= opts + unless (newopts - @trace_opts).empty? + Tk.tk_call_without_enc('trace', 'remove', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + end + + self + end + + def trace_element(elem, opts, cmd = Proc.new) + if @elem + fail(RuntimeError, + "invalid for a TkVariable which denotes an element of Tcl's array") + end + + opts = _check_trace_opt(opts) + + ((@trace_elem ||= {})[elem] ||= []).unshift([opts,cmd]) + + if @trace_opts == nil + TkVar_CB_TBL[@id] = self + @trace_opts = opts + if USE_OLD_TRACE_OPTION_STYLE + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + else + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + else + newopts = @trace_opts.dup + if USE_OLD_TRACE_OPTION_STYLE + opts.each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + if newopts != @trace_opts + Tk.tk_call_without_enc('trace', 'vdelete', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + else + newopts |= opts + unless (newopts - @trace_opts).empty? + Tk.tk_call_without_enc('trace', 'remove', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + end + + self + end + + def trace_info + return [] unless @trace_var + @trace_var.dup + end + alias trace_vinfo trace_info + + def trace_info_for_element(elem) + if @elem + fail(RuntimeError, + "invalid for a TkVariable which denotes an element of Tcl's array") + end + return [] unless @trace_elem + return [] unless @trace_elem[elem] + @trace_elem[elem].dup + end + alias trace_vinfo_for_element trace_info_for_element + + def trace_remove(opts,cmd) + return self unless @trace_var.kind_of? Array + + opts = _check_trace_opt(opts) + + idx = -1 + if USE_OLD_TRACE_OPTION_STYLE + newopts = '' + @trace_var.each_with_index{|e, i| + if idx < 0 && e[1] == cmd + diff = false + ['a', 'r', 'w', 'u'].each{|c| + break if (diff = e[0].index(c) ^ opts.index(c)) + } + unless diff + #find + idx = i + next + end + end + e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + } + else + newopts = [] + @trace_var.each_with_index{|e, i| + if idx < 0 && e[1] == cmd && + e[0].size == opts.size && (e[0] - opts).empty? + # find + idx = i + next + end + newopts |= e[0] + } + end + + if idx >= 0 + @trace_var.delete_at(idx) + else + return self + end + + (@trace_elem ||= {}).each{|elem| + @trace_elem[elem].each{|e| + if USE_OLD_TRACE_OPTION_STYLE + e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + else + newopts |= e[0] + end + } + } + + if USE_OLD_TRACE_OPTION_STYLE + diff = false + @trace_opts.each_byte{|c| break if (diff = ! newopts.index(c))} + if diff + Tk.tk_call_without_enc('trace', 'vdelete', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + unless @trace_opts.empty? + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + else + unless (@trace_opts - newopts).empty? + Tk.tk_call_without_enc('trace', 'remove', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + unless @trace_opts.empty? + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + end + + self + end + alias trace_delete trace_remove + alias trace_vdelete trace_remove + + def trace_remove_for_element(elem,opts,cmd) + if @elem + fail(RuntimeError, + "invalid for a TkVariable which denotes an element of Tcl's array") + end + return self unless @trace_elem.kind_of? Hash + return self unless @trace_elem[elem].kind_of? Array + + opts = _check_trace_opt(opts) + + idx = -1 + if USE_OLD_TRACE_OPTION_STYLE + @trace_elem[elem].each_with_index{|e, i| + if idx < 0 && e[1] == cmd + diff = false + ['a', 'r', 'w', 'u'].each{|c| + break if (diff = e[0].index(c) ^ opts.index(c)) + } + unless diff + #find + idx = i + next + end + end + } + else + @trace_elem[elem].each_with_index{|e, i| + if idx < 0 && e[1] == cmd && + e[0].size == opts.size && (e[0] - opts).empty? + # find + idx = i + next + end + } + end + + if idx >= 0 + @trace_elem[elem].delete_at(idx) + else + return self + end + + if USE_OLD_TRACE_OPTION_STYLE + newopts = '' + @trace_var.each{|e| + e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + } + @trace_elem.each{|elem| + @trace_elem[elem].each{|e| + e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + } + } + else + newopts = [] + @trace_var.each{|e| + newopts |= e[0] + } + @trace_elem.each{|elem| + @trace_elem[elem].each{|e| + e[0].each_byte{|c| newopts.concat(c.chr) unless newopts.index(c.chr)} + } + } + end + + if USE_OLD_TRACE_OPTION_STYLE + diff = false + @trace_opts.each_byte{|c| break if (diff = ! newopts.index(c))} + if diff + Tk.tk_call_without_enc('trace', 'vdelete', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + unless @trace_opts.empty? + Tk.tk_call_without_enc('trace', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + else + unless (@trace_opts - newopts).empty? + Tk.tk_call_without_enc('trace', 'remove', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + @trace_opts.replace(newopts) + unless @trace_opts.empty? + Tk.tk_call_without_enc('trace', 'add', 'variable', + @id, @trace_opts, 'rb_var ' << @id) + end + end + end + + self + end + alias trace_delete_for_element trace_remove_for_element + alias trace_vdelete_for_element trace_remove_for_element +end + +class TkVarAccess var == $1, elem == $2 + @var = $1 + @elem = $2 + end + + # teach Tk-ip that @id is global var + INTERP._invoke_without_enc('global', @var) +=begin + begin + INTERP._invoke_without_enc('global', @id) + rescue => e + if @id =~ /^(.+)\([^()]+\)$/ + # is an element --> varname == $1 + INTERP._invoke_without_enc('global', $1) + else + fail e + end + end +=end + + if val + if val.kind_of?(Hash) + # assoc-array variable + self[''] = 0 + self.clear + end + #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #" + #s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' #" + #INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s)) + #INTERP._set_global_var(@id, _toUTF8(_get_eval_string(val))) + self.value = val + end + end +end + +module Tk + begin + INTERP._invoke_without_enc('global', 'auto_path') + auto_path = INTERP._invoke('set', 'auto_path') + rescue => e + begin + INTERP._invoke_without_enc('global', 'env') + auto_path = INTERP._invoke('set', 'env(TCLLIBPATH)') + rescue => e + auto_path = Tk::LIBRARY + end + end + + AUTO_PATH = TkVarAccess.new('auto_path', auto_path) + +=begin + AUTO_OLDPATH = tk_split_simplelist(INTERP._invoke('set', 'auto_oldpath')) + AUTO_OLDPATH.each{|s| s.freeze} + AUTO_OLDPATH.freeze +=end + + TCL_PACKAGE_PATH = TkVarAccess.new('tcl_pkgPath') + PACKAGE_PATH = TCL_PACKAGE_PATH + + TCL_LIBRARY_PATH = TkVarAccess.new('tcl_libPath') + LIBRARY_PATH = TCL_LIBRARY_PATH + + TCL_PRECISION = TkVarAccess.new('tcl_precision') +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/virtevent.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/virtevent.rb new file mode 100644 index 0000000..ae31ac1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/virtevent.rb @@ -0,0 +1,139 @@ +# +# tk/virtevent.rb : treats virtual events +# 1998/07/16 by Hidetoshi Nagai +# +require 'tk' + +class TkVirtualEvent)>$/ + event = $1 + elsif event !~ /^<.*>$/ + event = '<' + event + '>' + end + TkVirtualEvent::TkVirtualEventTBL.mutex.synchronize{ + if TkVirtualEvent::TkVirtualEventTBL.has_key?(event) + TkVirtualEvent::TkVirtualEventTBL[event] + else + # super(event, *sequences) + (obj = self.allocate).instance_eval{ + initialize(event, *sequences) + TkVirtualEvent::TkVirtualEventTBL[@id] = self + } + end + } + end + + def initialize(event, *sequences) + @path = @id = event + _add_sequences(sequences) + end + end + + def TkVirtualEvent.getobj(event) + obj = nil + TkVirtualEventTBL.mutex.synchronize{ + obj = TkVirtualEventTBL[event] + } + if obj + obj + else + if tk_call_without_enc('event', 'info').index("<#{event}>") + PreDefVirtEvent.new(event) + else + fail ArgumentError, "undefined virtual event '<#{event}>'" + end + end + end + + def TkVirtualEvent.info + tk_call_without_enc('event', 'info').split(/\s+/).collect!{|seq| + TkVirtualEvent.getobj(seq[1..-2]) + } + end + + def initialize(*sequences) + TkVirtualEventID.mutex.synchronize{ + # @path = @id = '<' + TkVirtualEventID.join('') + '>' + @path = @id = '<' + TkVirtualEventID.join(TkCore::INTERP._ip_id_) + '>' + TkVirtualEventID[1].succ! + } + _add_sequences(sequences) + end + + def _add_sequences(seq_ary) + unless seq_ary.empty? + tk_call_without_enc('event', 'add', "<#{@id}>", + *(seq_ary.collect{|seq| + "<#{tk_event_sequence(seq)}>" + }) ) + end + self + end + private :_add_sequences + + def add(*sequences) + if sequences != [] + _add_sequences(sequences) + TkVirtualEventTBL.mutex.synchronize{ + TkVirtualEventTBL[@id] = self + } + end + self + end + + def delete(*sequences) + if sequences == [] + tk_call_without_enc('event', 'delete', "<#{@id}>") + TkVirtualEventTBL.mutex.synchronize{ + TkVirtualEventTBL.delete(@id) + } + else + tk_call_without_enc('event', 'delete', "<#{@id}>", + *(sequences.collect{|seq| + "<#{tk_event_sequence(seq)}>" + }) ) + if tk_call_without_enc('event','info',"<#{@id}>").empty? + TkVirtualEventTBL.mutex.synchronize{ + TkVirtualEventTBL.delete(@id) + } + end + end + self + end + + def info + tk_call_without_enc('event','info',"<#{@id}>").split(/\s+/).collect!{|seq| + lst = seq.scan(/<*[^<>]+>*/).collect!{|subseq| + case (subseq) + when /^<<[^<>]+>>$/ + TkVirtualEvent.getobj(subseq[1..-2]) + when /^<[^<>]+>$/ + subseq[1..-2] + else + subseq.split('') + end + }.flatten + (lst.size == 1) ? lst[0] : lst + } + end +end + +TkNamedVirtualEvent = TkVirtualEvent::PreDefVirtEvent diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winfo.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winfo.rb new file mode 100644 index 0000000..c649b4a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winfo.rb @@ -0,0 +1,392 @@ +# +# tk/winfo.rb : methods for winfo command +# +module TkWinfo +end + +require 'tk' + +module TkWinfo + include Tk + extend Tk + + TkCommandNames = ['winfo'.freeze].freeze + + def TkWinfo.atom(name, win=nil) + if win + number(tk_call_without_enc('winfo', 'atom', '-displayof', win, + _get_eval_enc_str(name))) + else + number(tk_call_without_enc('winfo', 'atom', _get_eval_enc_str(name))) + end + end + def winfo_atom(name) + TkWinfo.atom(name, self) + end + + def TkWinfo.atomname(id, win=nil) + if win + _fromUTF8(tk_call_without_enc('winfo', 'atomname', + '-displayof', win, id)) + else + _fromUTF8(tk_call_without_enc('winfo', 'atomname', id)) + end + end + def winfo_atomname(id) + TkWinfo.atomname(id, self) + end + + def TkWinfo.cells(win) + number(tk_call_without_enc('winfo', 'cells', win)) + end + def winfo_cells + TkWinfo.cells self + end + + def TkWinfo.children(win) + list(tk_call_without_enc('winfo', 'children', win)) + end + def winfo_children + TkWinfo.children self + end + + def TkWinfo.classname(win) + tk_call_without_enc('winfo', 'class', win) + end + def winfo_classname + TkWinfo.classname self + end + alias winfo_class winfo_classname + + def TkWinfo.colormapfull(win) + bool(tk_call_without_enc('winfo', 'colormapfull', win)) + end + def winfo_colormapfull + TkWinfo.colormapfull self + end + + def TkWinfo.containing(rootX, rootY, win=nil) + if win + window(tk_call_without_enc('winfo', 'containing', + '-displayof', win, rootX, rootY)) + else + window(tk_call_without_enc('winfo', 'containing', rootX, rootY)) + end + end + def winfo_containing(x, y) + TkWinfo.containing(x, y, self) + end + + def TkWinfo.depth(win) + number(tk_call_without_enc('winfo', 'depth', win)) + end + def winfo_depth + TkWinfo.depth self + end + + def TkWinfo.exist?(win) + bool(tk_call_without_enc('winfo', 'exists', win)) + end + def winfo_exist? + TkWinfo.exist? self + end + + def TkWinfo.fpixels(win, dist) + number(tk_call_without_enc('winfo', 'fpixels', win, dist)) + end + def winfo_fpixels(dist) + TkWinfo.fpixels self, dist + end + + def TkWinfo.geometry(win) + tk_call_without_enc('winfo', 'geometry', win) + end + def winfo_geometry + TkWinfo.geometry self + end + + def TkWinfo.height(win) + number(tk_call_without_enc('winfo', 'height', win)) + end + def winfo_height + TkWinfo.height self + end + + def TkWinfo.id(win) + tk_call_without_enc('winfo', 'id', win) + end + def winfo_id + TkWinfo.id self + end + + def TkWinfo.interps(win=nil) + if win + #tk_split_simplelist(tk_call_without_enc('winfo', 'interps', + # '-displayof', win)) + tk_split_simplelist(tk_call_without_enc('winfo', 'interps', + '-displayof', win), + false, true) + else + #tk_split_simplelist(tk_call_without_enc('winfo', 'interps')) + tk_split_simplelist(tk_call_without_enc('winfo', 'interps'), + false, true) + end + end + def winfo_interps + TkWinfo.interps self + end + + def TkWinfo.mapped?(win) + bool(tk_call_without_enc('winfo', 'ismapped', win)) + end + def winfo_mapped? + TkWinfo.mapped? self + end + + def TkWinfo.manager(win) + tk_call_without_enc('winfo', 'manager', win) + end + def winfo_manager + TkWinfo.manager self + end + + def TkWinfo.appname(win) + tk_call('winfo', 'name', win) + end + def winfo_appname + TkWinfo.appname self + end + + def TkWinfo.parent(win) + window(tk_call_without_enc('winfo', 'parent', win)) + end + def winfo_parent + TkWinfo.parent self + end + + def TkWinfo.widget(id, win=nil) + if win + window(tk_call_without_enc('winfo', 'pathname', '-displayof', win, id)) + else + window(tk_call_without_enc('winfo', 'pathname', id)) + end + end + def winfo_widget(id) + TkWinfo.widget id, self + end + + def TkWinfo.pixels(win, dist) + number(tk_call_without_enc('winfo', 'pixels', win, dist)) + end + def winfo_pixels(dist) + TkWinfo.pixels self, dist + end + + def TkWinfo.reqheight(win) + number(tk_call_without_enc('winfo', 'reqheight', win)) + end + def winfo_reqheight + TkWinfo.reqheight self + end + + def TkWinfo.reqwidth(win) + number(tk_call_without_enc('winfo', 'reqwidth', win)) + end + def winfo_reqwidth + TkWinfo.reqwidth self + end + + def TkWinfo.rgb(win, color) + list(tk_call_without_enc('winfo', 'rgb', win, color)) + end + def winfo_rgb(color) + TkWinfo.rgb self, color + end + + def TkWinfo.rootx(win) + number(tk_call_without_enc('winfo', 'rootx', win)) + end + def winfo_rootx + TkWinfo.rootx self + end + + def TkWinfo.rooty(win) + number(tk_call_without_enc('winfo', 'rooty', win)) + end + def winfo_rooty + TkWinfo.rooty self + end + + def TkWinfo.screen(win) + tk_call('winfo', 'screen', win) + end + def winfo_screen + TkWinfo.screen self + end + + def TkWinfo.screencells(win) + number(tk_call_without_enc('winfo', 'screencells', win)) + end + def winfo_screencells + TkWinfo.screencells self + end + + def TkWinfo.screendepth(win) + number(tk_call_without_enc('winfo', 'screendepth', win)) + end + def winfo_screendepth + TkWinfo.screendepth self + end + + def TkWinfo.screenheight (win) + number(tk_call_without_enc('winfo', 'screenheight', win)) + end + def winfo_screenheight + TkWinfo.screenheight self + end + + def TkWinfo.screenmmheight(win) + number(tk_call_without_enc('winfo', 'screenmmheight', win)) + end + def winfo_screenmmheight + TkWinfo.screenmmheight self + end + + def TkWinfo.screenmmwidth(win) + number(tk_call_without_enc('winfo', 'screenmmwidth', win)) + end + def winfo_screenmmwidth + TkWinfo.screenmmwidth self + end + + def TkWinfo.screenvisual(win) + tk_call_without_enc('winfo', 'screenvisual', win) + end + def winfo_screenvisual + TkWinfo.screenvisual self + end + + def TkWinfo.screenwidth(win) + number(tk_call_without_enc('winfo', 'screenwidth', win)) + end + def winfo_screenwidth + TkWinfo.screenwidth self + end + + def TkWinfo.server(win) + tk_call('winfo', 'server', win) + end + def winfo_server + TkWinfo.server self + end + + def TkWinfo.toplevel(win) + window(tk_call_without_enc('winfo', 'toplevel', win)) + end + def winfo_toplevel + TkWinfo.toplevel self + end + + def TkWinfo.visual(win) + tk_call_without_enc('winfo', 'visual', win) + end + def winfo_visual + TkWinfo.visual self + end + + def TkWinfo.visualid(win) + tk_call_without_enc('winfo', 'visualid', win) + end + def winfo_visualid + TkWinfo.visualid self + end + + def TkWinfo.visualsavailable(win, includeids=false) + if includeids + list(tk_call_without_enc('winfo', 'visualsavailable', + win, "includeids")) + else + list(tk_call_without_enc('winfo', 'visualsavailable', win)) + end + end + def winfo_visualsavailable(includeids=false) + TkWinfo.visualsavailable self, includeids + end + + def TkWinfo.vrootheight(win) + number(tk_call_without_enc('winfo', 'vrootheight', win)) + end + def winfo_vrootheight + TkWinfo.vrootheight self + end + + def TkWinfo.vrootwidth(win) + number(tk_call_without_enc('winfo', 'vrootwidth', win)) + end + def winfo_vrootwidth + TkWinfo.vrootwidth self + end + + def TkWinfo.vrootx(win) + number(tk_call_without_enc('winfo', 'vrootx', win)) + end + def winfo_vrootx + TkWinfo.vrootx self + end + + def TkWinfo.vrooty(win) + number(tk_call_without_enc('winfo', 'vrooty', win)) + end + def winfo_vrooty + TkWinfo.vrooty self + end + + def TkWinfo.width(win) + number(tk_call_without_enc('winfo', 'width', win)) + end + def winfo_width + TkWinfo.width self + end + + def TkWinfo.x(win) + number(tk_call_without_enc('winfo', 'x', win)) + end + def winfo_x + TkWinfo.x self + end + + def TkWinfo.y(win) + number(tk_call_without_enc('winfo', 'y', win)) + end + def winfo_y + TkWinfo.y self + end + + def TkWinfo.viewable(win) + bool(tk_call_without_enc('winfo', 'viewable', win)) + end + def winfo_viewable + TkWinfo.viewable self + end + + def TkWinfo.pointerx(win) + number(tk_call_without_enc('winfo', 'pointerx', win)) + end + def winfo_pointerx + TkWinfo.pointerx self + end + + def TkWinfo.pointery(win) + number(tk_call_without_enc('winfo', 'pointery', win)) + end + def winfo_pointery + TkWinfo.pointery self + end + + def TkWinfo.pointerxy(win) + list(tk_call_without_enc('winfo', 'pointerxy', win)) + end + def winfo_pointerxy + TkWinfo.pointerxy self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winpkg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winpkg.rb new file mode 100644 index 0000000..89fb391 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/winpkg.rb @@ -0,0 +1,153 @@ +# +# tk/winpkg.rb : methods for Tcl/Tk packages for Microsoft Windows +# 2000/11/22 by Hidetoshi Nagai +# +# ATTENTION !! +# This is NOT TESTED. Because I have no test-environment. +# +require 'tk' + +module Tk::WinDDE +end +#TkWinDDE = Tk::WinDDE +Tk.__set_toplevel_aliases__(:Tk, Tk::WinDDE, :TkWinDDE) + +module Tk::WinDDE + extend Tk + extend Tk::WinDDE + + TkCommandNames = ['dde'.freeze].freeze + + PACKAGE_NAME = 'dde'.freeze + def self.package_name + PACKAGE_NAME + end + + if self.const_defined? :FORCE_VERSION + tk_call_without_enc('package', 'require', 'dde', FORCE_VERSION) + else + tk_call_without_enc('package', 'require', 'dde') + end + + #def servername(topic=None) + # tk_call('dde', 'servername', topic) + #end + def servername(*args) + if args.size == 0 + tk_call('dde', 'servername') + else + if args[-1].kind_of?(Hash) # dde 1.2 + + keys = _symbolkey2str(args.pop) + force = (keys.delete('force'))? '-force': None + exact = (keys.delete('exact'))? '-exact': None + if keys.size == 0 + tk_call('dde', 'servername', force, exact) + elsif args.size == 0 + tk_call('dde', 'servername', force, exact, *hash_kv(keys)) + else + tk_call('dde', 'servername', force, exact, + *((hash_kv(keys) << '--') + args)) + end + else + tk_call('dde', 'servername', *args) + end + end + end + + def execute(service, topic, data) + tk_call('dde', 'execute', service, topic, data) + end + + def async_execute(service, topic, data) + tk_call('dde', '-async', 'execute', service, topic, data) + end + + def poke(service, topic, item, data) + tk_call('dde', 'poke', service, topic, item, data) + end + + def request(service, topic, item) + tk_call('dde', 'request', service, topic, item) + end + + def binary_request(service, topic, item) + tk_call('dde', 'request', '-binary', service, topic, item) + end + + def services(service, topic) + tk_call('dde', 'services', service, topic) + end + + def eval(topic, cmd, *args) + tk_call('dde', 'eval', topic, cmd, *args) + end + + def async_eval(topic, cmd, *args) + tk_call('dde', 'eval', -async, topic, cmd, *args) + end + + module_function :servername, :execute, :async_execute, + :poke, :request, :services, :eval +end + +module Tk::WinRegistry +end +#TkWinRegistry = Tk::WinRegistry +Tk.__set_toplevel_aliases__(:Tk, Tk::WinRegistry, :TkWinRegistry) + +module Tk::WinRegistry + extend Tk + extend Tk::WinRegistry + + TkCommandNames = ['registry'.freeze].freeze + + if self.const_defined? :FORCE_VERSION + tk_call('package', 'require', 'registry', FORCE_VERSION) + else + tk_call('package', 'require', 'registry') + end + + def broadcast(keynam, timeout=nil) + if timeout + tk_call('registry', 'broadcast', keynam, '-timeout', timeout) + else + tk_call('registry', 'broadcast', keynam) + end + end + + def delete(keynam, valnam=None) + tk_call('registry', 'delete', keynam, valnam) + end + + def get(keynam, valnam) + tk_call('registry', 'get', keynam, valnam) + end + + def keys(keynam, pattern=nil) + lst = tk_split_simplelist(tk_call('registry', 'keys', keynam)) + if pattern + lst.find_all{|key| key =~ pattern} + else + lst + end + end + + def set(keynam, valnam=None, data=None, dattype=None) + tk_call('registry', 'set', keynam, valnam, data, dattype) + end + + def type(keynam, valnam) + tk_call('registry', 'type', keynam, valnam) + end + + def values(keynam, pattern=nil) + lst = tk_split_simplelist(tk_call('registry', 'values', keynam)) + if pattern + lst.find_all{|val| val =~ pattern} + else + lst + end + end + + module_function :delete, :get, :keys, :set, :type, :values +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/wm.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/wm.rb new file mode 100644 index 0000000..0394296 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/wm.rb @@ -0,0 +1,552 @@ +# +# tk/wm.rb : methods for wm command +# +require 'tk' + +module Tk + module Wm + #include TkComm + extend TkCore + + TkCommandNames = ['wm'.freeze].freeze + + TOPLEVEL_METHODCALL_OPTKEYS = {} + + def Wm.aspect(win, *args) + if args.length == 0 + list(tk_call_without_enc('wm', 'aspect', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call('wm', 'aspect', win.epath, *args) + win + end + end + def aspect(*args) + Wm.aspect(self, *args) + end + alias wm_aspect aspect + TOPLEVEL_METHODCALL_OPTKEYS['aspect'] = 'aspect' + + def Wm.attributes(win, slot=nil,value=TkComm::None) + if slot == nil + lst = tk_split_list(tk_call('wm', 'attributes', win.epath)) + info = {} + while key = lst.shift + info[key[1..-1]] = lst.shift + end + info + elsif slot.kind_of? Hash + tk_call('wm', 'attributes', win.epath, *hash_kv(slot)) + win + elsif value == TkComm::None + tk_call('wm', 'attributes', win.epath, "-#{slot}") + else + tk_call('wm', 'attributes', win.epath, "-#{slot}", value) + win + end + end + def attributes(slot=nil,value=TkComm::None) + Wm.attributes(self, slot, value) + end + alias wm_attributes attributes + TOPLEVEL_METHODCALL_OPTKEYS['attributes'] = 'attributes' + + def Wm.client(win, name=TkComm::None) + if name == TkComm::None + tk_call('wm', 'client', win.epath) + else + name = '' if name == nil + tk_call('wm', 'client', win.epath, name) + win + end + end + def client(name=TkComm::None) + Wm.client(self, name) + end + alias wm_client client + TOPLEVEL_METHODCALL_OPTKEYS['client'] = 'client' + + def Wm.colormapwindows(win, *args) + if args.size == 0 + list(tk_call_without_enc('wm', 'colormapwindows', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'colormapwindows', win.epath, *args) + win + end + end + def colormapwindows(*args) + Wm.colormapwindows(self, *args) + end + alias wm_colormapwindows colormapwindows + TOPLEVEL_METHODCALL_OPTKEYS['colormapwindows'] = 'colormapwindows' + + def Wm.command(win, value=nil) + if value + tk_call('wm', 'command', epath, value) + win + else + #procedure(tk_call('wm', 'command', epath)) + tk_call('wm', 'command', epath) + end + end + def wm_command(value=nil) + Wm.command(self, value) + end + TOPLEVEL_METHODCALL_OPTKEYS['wm_command'] = 'wm_command' + + def Wm.deiconify(win, ex = true) + if ex + tk_call_without_enc('wm', 'deiconify', win.epath) + else + Wm.iconify(win) + end + win + end + def deiconify(ex = true) + Wm.deiconify(self, ex) + end + alias wm_deiconify deiconify + + def Wm.focusmodel(win, mode = nil) + if mode + tk_call_without_enc('wm', 'focusmodel', win.epath, mode) + win + else + tk_call_without_enc('wm', 'focusmodel', win.epath) + end + end + def focusmodel(mode = nil) + Wm.focusmodel(self, mode) + end + alias wm_focusmodel focusmodel + TOPLEVEL_METHODCALL_OPTKEYS['focusmodel'] = 'focusmodel' + + def Wm.forget(win) + # Tcl/Tk 8.5+ + # work with dockable frames + tk_call_without_enc('wm', 'forget', win.epath) + win + end + def wm_forget + Wm.forget(self) + end + + def Wm.frame(win) + tk_call_without_enc('wm', 'frame', win.epath) + end + def frame + Wm.frame(self) + end + alias wm_frame frame + + def Wm.geometry(win, geom=nil) + if geom + tk_call_without_enc('wm', 'geometry', win.epath, geom) + win + else + tk_call_without_enc('wm', 'geometry', win.epath) + end + end + def geometry(geom=nil) + Wm.geometry(self, geom) + end + alias wm_geometry geometry + TOPLEVEL_METHODCALL_OPTKEYS['geometry'] = 'geometry' + + def Wm.grid(win, *args) + if args.size == 0 + list(tk_call_without_enc('wm', 'grid', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'grid', win.epath, *args) + win + end + end + def wm_grid(*args) + Wm.grid(self, *args) + end + TOPLEVEL_METHODCALL_OPTKEYS['wm_grid'] = 'wm_grid' + + def Wm.group(win, leader = nil) + if leader + tk_call('wm', 'group', win.epath, leader) + win + else + window(tk_call('wm', 'group', win.epath)) + end + end + def group(leader = nil) + Wm.group(self, leader) + end + alias wm_group group + TOPLEVEL_METHODCALL_OPTKEYS['group'] = 'group' + + def Wm.iconbitmap(win, bmp=nil) + if bmp + tk_call_without_enc('wm', 'iconbitmap', win.epath, bmp) + win + else + image_obj(tk_call_without_enc('wm', 'iconbitmap', win.epath)) + end + end + def iconbitmap(bmp=nil) + Wm.iconbitmap(self, bmp) + end + alias wm_iconbitmap iconbitmap + TOPLEVEL_METHODCALL_OPTKEYS['iconbitmap'] = 'iconbitmap' + + def Wm.iconphoto(win, *imgs) + if imgs.empty? + win.instance_eval{ + @wm_iconphoto = nil unless defined? @wm_iconphoto + return @wm_iconphoto + } + end + + imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array) + tk_call_without_enc('wm', 'iconphoto', win.epath, *imgs) + win.instance_eval{ @wm_iconphoto = imgs } + win + end + def iconphoto(*imgs) + Wm.iconphoto(self, *imgs) + end + alias wm_iconphoto iconphoto + TOPLEVEL_METHODCALL_OPTKEYS['iconphoto'] = 'iconphoto' + + def Wm.iconphoto_default(win, *imgs) + imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array) + tk_call_without_enc('wm', 'iconphoto', win.epath, '-default', *imgs) + win + end + def iconphoto_default(*imgs) + Wm.iconphoto_default(self, *imgs) + end + alias wm_iconphoto_default iconphoto_default + + def Wm.iconify(win, ex = true) + if ex + tk_call_without_enc('wm', 'iconify', win.epath) + else + Wm.deiconify(win) + end + win + end + def iconify(ex = true) + Wm.iconify(self, ex) + end + alias wm_iconify iconify + + def Wm.iconmask(win, bmp=nil) + if bmp + tk_call_without_enc('wm', 'iconmask', win.epath, bmp) + win + else + image_obj(tk_call_without_enc('wm', 'iconmask', win.epath)) + end + end + def iconmask(bmp=nil) + Wm.iconmask(self, bmp) + end + alias wm_iconmask iconmask + TOPLEVEL_METHODCALL_OPTKEYS['iconmask'] = 'iconmask' + + def Wm.iconname(win, name=nil) + if name + tk_call('wm', 'iconname', win.epath, name) + win + else + tk_call('wm', 'iconname', win.epath) + end + end + def iconname(name=nil) + Wm.iconname(self, name) + end + alias wm_iconname iconname + TOPLEVEL_METHODCALL_OPTKEYS['iconname'] = 'iconname' + + def Wm.iconposition(win, *args) + if args.size == 0 + list(tk_call_without_enc('wm', 'iconposition', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'iconposition', win.epath, *args) + win + end + end + def iconposition(*args) + Wm.iconposition(self, *args) + end + alias wm_iconposition iconposition + TOPLEVEL_METHODCALL_OPTKEYS['iconposition'] = 'iconposition' + + def Wm.iconwindow(win, iconwin = nil) + if iconwin + tk_call_without_enc('wm', 'iconwindow', win.epath, iconwin) + win + else + w = tk_call_without_enc('wm', 'iconwindow', win.epath) + (w == '')? nil: window(w) + end + end + def iconwindow(iconwin = nil) + Wm.iconwindow(self, iconwin) + end + alias wm_iconwindow iconwindow + TOPLEVEL_METHODCALL_OPTKEYS['iconwindow'] = 'iconwindow' + + def Wm.manage(win) + # Tcl/Tk 8.5+ feature + tk_call_without_enc('wm', 'manage', win.epath) + win + end + def wm_manage + Wm.manage(self) + end +=begin + def Wm.manage(win, use_id = nil) + # Tcl/Tk 8.5+ feature + # -------------------------------------------------------------- + # In the future release, I want to support to embed the 'win' + # into the container which has window-id 'use-id'. + # It may give users frexibility on controlling their GUI. + # However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1), + # because it seems to require to modify Tcl/Tk's source code. + # -------------------------------------------------------------- + if use_id + tk_call_without_enc('wm', 'manage', win.epath, '-use', use_id) + else + tk_call_without_enc('wm', 'manage', win.epath) + end + win + end +=end + + def Wm.maxsize(win, *args) + if args.size == 0 + list(tk_call_without_enc('wm', 'maxsize', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'maxsize', win.epath, *args) + win + end + end + def maxsize(*args) + Wm.maxsize(self, *args) + end + alias wm_maxsize maxsize + TOPLEVEL_METHODCALL_OPTKEYS['maxsize'] = 'maxsize' + + def Wm.minsize(win, *args) + if args.size == 0 + list(tk_call_without_enc('wm', 'minsize', win.epath)) + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'minsize', win.path, *args) + win + end + end + def minsize(*args) + Wm.minsize(self, *args) + end + alias wm_minsize minsize + TOPLEVEL_METHODCALL_OPTKEYS['minsize'] = 'minsize' + + def Wm.overrideredirect(win, mode=TkComm::None) + if mode == TkComm::None + bool(tk_call_without_enc('wm', 'overrideredirect', win.epath)) + else + tk_call_without_enc('wm', 'overrideredirect', win.epath, mode) + win + end + end + def overrideredirect(mode=TkComm::None) + Wm.overrideredirect(self, mode) + end + alias wm_overrideredirect overrideredirect + TOPLEVEL_METHODCALL_OPTKEYS['overrideredirect'] = 'overrideredirect' + + def Wm.positionfrom(win, who=TkComm::None) + if who == TkComm::None + r = tk_call_without_enc('wm', 'positionfrom', win.epath) + (r == "")? nil: r + else + tk_call_without_enc('wm', 'positionfrom', win.epath, who) + win + end + end + def positionfrom(who=TkComm::None) + Wm.positionfrom(self, who) + end + alias wm_positionfrom positionfrom + TOPLEVEL_METHODCALL_OPTKEYS['positionfrom'] = 'positionfrom' + + def Wm.protocol(win, name=nil, cmd=nil, &b) + if cmd + tk_call_without_enc('wm', 'protocol', win.epath, name, cmd) + win + elsif b + tk_call_without_enc('wm', 'protocol', win.epath, name, proc(&b)) + win + elsif name + result = tk_call_without_enc('wm', 'protocol', win.epath, name) + (result == "")? nil : tk_tcl2ruby(result) + else + tk_split_simplelist(tk_call_without_enc('wm', 'protocol', win.epath)) + end + end + def protocol(name=nil, cmd=nil, &b) + Wm.protocol(self, name, cmd, &b) + end + alias wm_protocol protocol + + def Wm.protocols(win, kv=nil) + unless kv + ret = {} + Wm.protocol(win).each{|name| + ret[name] = Wm.protocol(win, name) + } + return ret + end + + unless kv.kind_of?(Hash) + fail ArgumentError, 'expect a hash of protocol=>command' + end + kv.each{|k, v| Wm.protocol(win, k, v)} + win + end + def protocols(kv=nil) + Wm.protocols(self, kv) + end + alias wm_protocols protocols + TOPLEVEL_METHODCALL_OPTKEYS['protocols'] = 'protocols' + + def Wm.resizable(win, *args) + if args.length == 0 + list(tk_call_without_enc('wm', 'resizable', win.epath)).map!{|e| bool(e)} + else + args = args[0] if args.length == 1 && args[0].kind_of?(Array) + tk_call_without_enc('wm', 'resizable', win.epath, *args) + win + end + end + def resizable(*args) + Wm.resizable(self, *args) + end + alias wm_resizable resizable + TOPLEVEL_METHODCALL_OPTKEYS['resizable'] = 'resizable' + + def Wm.sizefrom(win, who=TkComm::None) + if who == TkComm::None + r = tk_call_without_enc('wm', 'sizefrom', win.epath) + (r == "")? nil: r + else + tk_call_without_enc('wm', 'sizefrom', win.epath, who) + win + end + end + def sizefrom(who=TkComm::None) + Wm.sizefrom(self, who) + end + alias wm_sizefrom sizefrom + TOPLEVEL_METHODCALL_OPTKEYS['sizefrom'] = 'sizefrom' + + def Wm.stackorder(win) + list(tk_call('wm', 'stackorder', win.epath)) + end + def stackorder + Wm.stackorder(self) + end + alias wm_stackorder stackorder + + def Wm.stackorder_isabove(win, target) + bool(tk_call('wm', 'stackorder', win.epath, 'isabove', target)) + end + def Wm.stackorder_is_above(win, target) + Wm.stackorder_isabove(win, target) + end + def stackorder_isabove(target) + Wm.stackorder_isabove(self, target) + end + alias stackorder_is_above stackorder_isabove + alias wm_stackorder_isabove stackorder_isabove + alias wm_stackorder_is_above stackorder_isabove + + def Wm.stackorder_isbelow(win, target) + bool(tk_call('wm', 'stackorder', win.epath, 'isbelow', target)) + end + def Wm.stackorder_is_below(win, target) + Wm.stackorder_isbelow(win, target) + end + def stackorder_isbelow(target) + Wm.stackorder_isbelow(self, target) + end + alias stackorder_is_below stackorder_isbelow + alias wm_stackorder_isbelow stackorder_isbelow + alias wm_stackorder_is_below stackorder_isbelow + + def Wm.state(win, st=nil) + if st + tk_call_without_enc('wm', 'state', win.epath, st) + win + else + tk_call_without_enc('wm', 'state', win.epath) + end + end + def state(st=nil) + Wm.state(self, st) + end + alias wm_state state + TOPLEVEL_METHODCALL_OPTKEYS['state'] = 'state' + + def Wm.title(win, str=nil) + if str + tk_call('wm', 'title', win.epath, str) + win + else + tk_call('wm', 'title', win.epath) + end + end + def title(str=nil) + Wm.title(self, str) + end + alias wm_title title + TOPLEVEL_METHODCALL_OPTKEYS['title'] = 'title' + + def Wm.transient(win, master=nil) + if master + tk_call_without_enc('wm', 'transient', win.epath, master) + win + else + window(tk_call_without_enc('wm', 'transient', win.epath)) + end + end + def transient(master=nil) + Wm.transient(self, master) + end + alias wm_transient transient + TOPLEVEL_METHODCALL_OPTKEYS['transient'] = 'transient' + + def Wm.withdraw(win, ex = true) + if ex + tk_call_without_enc('wm', 'withdraw', win.epath) + else + Wm.deiconify(win) + end + win + end + def withdraw(ex = true) + Wm.withdraw(self, ex) + end + alias wm_withdraw withdraw + end + + module Wm_for_General + Wm.instance_methods.each{|m| + if (m = m.to_s) =~ /^wm_(.*)$/ + eval "def #{m}(*args, &b); Tk::Wm.#{$1}(self, *args, &b); end" + end + } + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/xim.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/xim.rb new file mode 100644 index 0000000..0ac8559 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tk/xim.rb @@ -0,0 +1,122 @@ +# +# tk/xim.rb : control imput_method +# +require 'tk' + +module TkXIM + include Tk + extend Tk + + TkCommandNames = ['imconfigure'.freeze].freeze + + def TkXIM.useinputmethods(value = None, win = nil) + if value == None + if win + bool(tk_call_without_enc('tk', 'useinputmethods', + '-displayof', win)) + else + bool(tk_call_without_enc('tk', 'useinputmethods')) + end + else + if win + bool(tk_call_without_enc('tk', 'useinputmethods', + '-displayof', win, value)) + else + bool(tk_call_without_enc('tk', 'useinputmethods', value)) + end + end + end + + def TkXIM.useinputmethods_displayof(win, value = None) + TkXIM.useinputmethods(value, win) + end + + def TkXIM.caret(win, keys=nil) + if keys + tk_call_without_enc('tk', 'caret', win, *hash_kv(keys)) + self + else + lst = tk_split_list(tk_call_without_enc('tk', 'caret', win)) + info = {} + while key = lst.shift + info[key[1..-1]] = lst.shift + end + info + end + end + + def TkXIM.configure(win, slot, value=None) + begin + if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK + if slot.kind_of? Hash + tk_call('imconfigure', win, *hash_kv(slot)) + else + tk_call('imconfigure', win, "-#{slot}", value) + end + end + rescue + end + end + + def TkXIM.configinfo(win, slot=nil) + if TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + begin + if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK + if slot + conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}")) + conf[0] = conf[0][1..-1] + conf + else + tk_split_list(tk_call('imconfigure', win)).collect{|conf| + conf[0] = conf[0][1..-1] + conf + } + end + else + [] + end + rescue + [] + end + else # ! TkComm::GET_CONFIGINFOwoRES_AS_ARRAY + TkXIM.current_configinfo(win, slot) + end + end + + def TkXIM.current_configinfo(win, slot=nil) + begin + if /^8\.*/ === Tk::TK_VERSION && JAPANIZED_TK + if slot + conf = tk_split_list(tk_call('imconfigure', win, "-#{slot}")) + { conf[0][1..-1] => conf[1] } + else + ret = {} + tk_split_list(tk_call('imconfigure', win)).each{|conf| + ret[conf[0][1..-1]] = conf[1] + } + ret + end + else + {} + end + rescue + {} + end + end + + def useinputmethods(value=None) + TkXIM.useinputmethods(value, self) + end + + def caret(keys=nil) + TkXIM.caret(self, keys=nil) + end + + def imconfigure(slot, value=None) + TkXIM.configure(self, slot, value) + end + + def imconfiginfo(slot=nil) + TkXIM.configinfo(self, slot) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkafter.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkafter.rb new file mode 100644 index 0000000..f659458 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkafter.rb @@ -0,0 +1,4 @@ +# +# tkafter.rb - load tk/after.rb +# +require 'tk/timer' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkbgerror.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkbgerror.rb new file mode 100644 index 0000000..deba7a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkbgerror.rb @@ -0,0 +1,4 @@ +# +# tkbgerror.rb - load tk/bgerror.rb +# +require 'tk/bgerror' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkcanvas.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkcanvas.rb new file mode 100644 index 0000000..9524614 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkcanvas.rb @@ -0,0 +1,4 @@ +# +# tkcanvas.rb - load tk/canvas.rb +# +require 'tk/canvas' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkclass.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkclass.rb new file mode 100644 index 0000000..b2f0a13 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkclass.rb @@ -0,0 +1,47 @@ +# +# tkclass.rb - Tk classes +# Date: 2000/11/27 09:23:36 +# by Yukihiro Matsumoto +# +# $Id: tkclass.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require "tk" + +TopLevel = TkToplevel +Frame = TkFrame +Label = TkLabel +Button = TkButton +Radiobutton = TkRadioButton +Checkbutton = TkCheckButton +Message = TkMessage +Entry = TkEntry +Spinbox = TkSpinbox +Text = TkText +Scale = TkScale +Scrollbar = TkScrollbar +Listbox = TkListbox +Menu = TkMenu +Menubutton = TkMenubutton +Canvas = TkCanvas +Arc = TkcArc +Bitmap = TkcBitmap +Line = TkcLine +Oval = TkcOval +Polygon = TkcPolygon +Rectangle = TkcRectangle +TextItem = TkcText +WindowItem = TkcWindow +BitmapImage = TkBitmapImage +PhotoImage = TkPhotoImage +Selection = TkSelection +Winfo = TkWinfo +Pack = TkPack +Grid = TkGrid +Place = TkPlace +Variable = TkVariable +Font = TkFont +VirtualEvent = TkVirtualEvent + +def Mainloop + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkconsole.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkconsole.rb new file mode 100644 index 0000000..9960ddb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkconsole.rb @@ -0,0 +1,4 @@ +# +# tkconsole.rb - load tk/console.rb +# +require 'tk/console' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkdialog.rb new file mode 100644 index 0000000..bec5e5d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkdialog.rb @@ -0,0 +1,4 @@ +# +# tkdialog.rb - load tk/dialog.rb +# +require 'tk/dialog' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkentry.rb new file mode 100644 index 0000000..2dcfcab --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkentry.rb @@ -0,0 +1,4 @@ +# +# tkentry.rb - load tk/entry.rb +# +require 'tk/entry' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS.rb new file mode 100644 index 0000000..18d84c0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS.rb @@ -0,0 +1,13 @@ +# +# ICONS support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/ICONS/setup.rb' + +# load library +require 'tkextlib/ICONS/icons' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/icons.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/icons.rb new file mode 100644 index 0000000..b430bae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/icons.rb @@ -0,0 +1,129 @@ +# +# tkextlib/ICONS/icons.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/ICONS/setup.rb' + +# TkPackage.require('icons', '1.0') +TkPackage.require('icons') + +module Tk + class ICONS < TkImage + extend Tk + + PACKAGE_NAME = 'icons'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('icons') + rescue + '' + end + end + + def self.create(*args) # icon, icon, ..., ?option=>value, ...? + if args[-1].kind_of?(Hash) + keys = args.pop + icons = simplelist(tk_call('::icons::icons', 'create', + *(hash_kv(keys) << (args.flatten)))) + else + icons = simplelist(tk_call('::icons::icons', 'create', + args.flatten)) + end + + icons.collect{|icon| self.new(icon, :without_creating=>true)} + end + + def self.delete(*icons) # icon, icon, ... + icons = icons.flatten + return if icons.empty? + icons.map!{|icon| + if icon.kind_of?(Tk::ICONS) + Tk_IMGTBL.delete(icon.path) + icon.name + elsif icon.to_s =~ /^::icon::(.*)/ + name = $1 + Tk_IMGTBL.delete(icon) + name + else + Tk_IMGTBL.delete("::icon::#{icon}") + icon + end + } + tk_call('::icons::icons', 'delete', icons) + end + + def self.query(*args) # icon, icon, ..., ?option=>value, ...? + if args[-1].kind_of?(Hash) + keys = args.pop + simplelist(tk_call('::icons::icons', 'query', + *(hash_kv(keys) << (args.flatten)))) + else + simplelist(tk_call('::icons::icons', 'query', args.flatten)) + end . map{|inf| list(inf) } + end + + ########################################## + + class << self + alias _new new + + def new(name, keys=nil) + if obj = Tk_IMGTBL["::icon::#{name}"] + if keys + keys = _symbolkey2str(keys) + unless keys.delete('without_creating') + tk_call('::icons::icons', 'create', *(hash_kv(keys) << obj.name)) + end + end + else + obj = _new(name, keys) + end + obj + end + end + + ########################################## + + def initialize(name, keys=nil) + if name.kind_of?(String) && name =~ /^::icon::(.+)$/ + @name = $1 + @path = name + else + @name = name.to_s + @path = "::icon::#{@name}" + end + keys = _symbolkey2str(keys) + unless keys.delete('without_creating') + tk_call('::icons::icons', 'create', *(hash_kv(keys) << @name)) + end + Tk_IMGTBL[@path] = self + end + + def name + @name + end + + def delete + Tk_IMGTBL.delete(@path) + tk_call('::icons::icons', 'delete', @name) + self + end + + def query(keys={}) + list(simplelist(tk_call('::icons::icons', 'query', + *(hash_kv(keys) << @name)) + )[0]) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/ICONS/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/SUPPORT_STATUS b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/SUPPORT_STATUS new file mode 100644 index 0000000..cfbe274 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/SUPPORT_STATUS @@ -0,0 +1,196 @@ + + [ current support status of Tcl/Tk extensions ] + + *** RELEASE_DATE of the libraries => see 'tkextlib/version.rb' *** + +The following list shows *CURRENT* status when this file was modifyed +at last. If you want to add other Tcl/Tk extensions to the planed list +(or change its status position), please request them at the ruby-talk, +ruby-list, or ruby-dev ML. Although we cannot promise to support your +requests, we'll try to do. + +If you want to check that wrapper libraries are ready to use on your +environment, please execute 'pkg_checker.rb' with no arguments. The +script may give you some hints about that. + + + ***** IMPORTANT NOTE ********************************************** + + 'support' means that Ruby/Tk's wrapper libraries are released. + 'not support' does *NOT* mean that the extension doesn't work + on Ruby/Tk. + + The version number of each extension means the latest version + which is checked its feature. That is, it does NOT means only + version of working. Library files maybe include some features + which is included in the former version but removed from the + latest, and maybe able to support the later version then the + shown version. + + Even if the status of the extension is 'not support', you can + control the functions/widgets of the extension without wrapper + libraries by Tk.tk_call(), Tk.ip_eval(), and so on. + + If you cannot use installed Tcl/Tk extension, please check the + followings. + + (1) On your Tcl/Tk, does the extention work? + + (2) Do DLL libraries of the extension exist on DLL load-path? + (See also "/ext/tcltklib/README.ActiveTcl") + + (3) Is the Tcl library directory of the extension included in + library search-path of the Tcl interpreter linked Ruby/Tk? + + The check results may request you to do some setup operations + before using the extension. If so, then please write the step + of setup oprations into the "setup.rb" file in the directory + of the wrapper libraries for the extention (It is the wrapper + libraries have the standard structure of the libraries in this + directory). The "setup" file is required before requiring the + Tcl library package (TkPackage.require()). + + ******************************************************************* + + +===< support with some examples (may be beta quality) >======================= + +Tcllib 1.8 +Tklib 0.4.1 http://sourceforge.net/projects/tcllib ==> tcllib + +IWidgets 4.0.2 http://sourceforge.net/projects/incrtcl ==> iwidgets + +BWidgets 1.7 http://sourceforge.net/projects/tcllib ==> bwidget + +TkTable 2.9 http://sourceforge.net/projects/tktable ==> tktable + * see also + written by Ferenc Engard (ferenc@engard.hu) + +vu 2.3.0 http://sourceforge.net/projects/tktable ==> vu + +TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/ ==> tkHTML + +ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS + +TkImg 1.3 http://sourceforge.net/projects/tkimg ==> tkimg + + +BLT 2.4z http://sourceforge.net/projects/blt + * see also tcltk-ext library on RAA + (http://raa.ruby-lang.org/) + ==> blt + +TkTreeCtrl CVS/Hd(2005-12-02) + http://sourceforge.net/projects/tktreectrl ==> treectrl + +Tile 0.8.0/8.5.1 + http://sourceforge.net/projects/tktable ==> tile + + + +===< support (may be alpha or beta quality) >================================= + +IncrTcl CVS/Hd(2005-02-14) + http://sourceforge.net/projects/incrtcl ==> itcl, itk + +TclX CVS/Hd(2005-02-07) + http://sourceforge.net/projects/tclx + ==> tclx (partial support; infox command and + XPG/3 message catalogs only) + +Trofs 0.4.3 http://math.nist.gov/~DPorter/tcltk/trofs/ + + + +===< possibly available (not tested; alpha quality) >========================= + +winico 0.6 + http://sourceforge.net/projects/tktable + ==> winico (win32 only) + +TkTrans latest(2004-10-11) + http://www2.cmp.uea.ac.uk/~fuzz/tktrans/default.html + ==> tktrans (win32 only) + +TkDND 1.0a2 http://sourceforge.net/projects/tkdnd ==> tkDND + + + +===< plan to support (alpha quality libraries may be included) >============== + +GraphViz *** http://www.graphviz.org/ + +Tkgeomap *** http://tkgeomap.sourceforge.net/index.html + + + +===< not determined to supprt or not >======================================== + +Tix *** http://tixlibrary.sourceforge.net/ + * see also tcltk-ext library on RAA + (http://raa.ruby-lang.org/) + +TkZinc *** http://www.tkzinc.org/ + +Wbc *** http://home.t-online.de/home/csaba.nemethi/ + +Mentry *** http://home.t-online.de/home/csaba.nemethi/ + +Tablelist *** http://home.t-online.de/home/csaba.nemethi/ + +ANIGIF *** http://cardtable.sourceforge.net/tcltk/ + +IMG_ROTATE *** http://cardtable.sourceforge.net/tcltk/ + +TclVfs *** http://sourceforge.net/projects/tclvfs/ + +vfwtcl *** http://sourceforge.net/projects/avicaptcl + * Win32 only + +multicast *** http://sourceforge.net/projects/avicaptcl + * Win32 only + +XBit *** http://www.geocities.com/~chengye/ + * current implementation is for Windows only + +QuickTimeTcl *** http://hem.fyristorg.com/matben/qt/ + * works under Mac OS (8,9,X) or Windows + + + +===< may not support (already exist, out of Ruby/Tk scope, and so on) >======= + +TkCon *** http://sourceforge.net/projects/tkcon + +Expect *** http://sourceforge.net/projects/expect + +TclXML *** http://sourceforge.net/projects/tclxml + +TclXSLT *** http://sourceforge.net/projects/tclxml + +TclDOM *** http://sourceforge.net/projects/tclxml + +TclSOAP *** http://sourceforge.net/projects/tclsoap + +Snack *** http://www.speech.kth.se/~kare/snack2.2.tar.gz + * use Snack for Ruby + (see http://rbsnack.sourceforge.net/) + +Tcom *** http://www.vex.net/~cthuang/tcom/ + +tDOM *** http://www.tdom.org + +Mk4tcl *** http://www.equi4.com/metakit/tcl.html + +Memchan *** http://sourceforge.net/projects/memchan + +XOTcl *** http://www.xotcl.org/ + + +===< tool (may not supprt) >================================================== + +tbcload/tclcompiler + *** http://www.tcl.tk/software/tclpro/ + + +(End of List) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt.rb new file mode 100644 index 0000000..8d58c1f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt.rb @@ -0,0 +1,187 @@ +# +# BLT support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/variable' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/blt/setup.rb' + +# load all image format handlers +#TkPackage.require('BLT', '2.4') +TkPackage.require('BLT') + +module Tk + module BLT + TkComm::TkExtlibAutoloadModule.unshift(self) + + extend TkCore + + VERSION = tk_call('set', 'blt_version') + PATCH_LEVEL = tk_call('set', 'blt_patchLevel') + + begin + lib = TkCore::INTERP._invoke('set', 'blt_library') + rescue + lib = '' + end + LIBRARY = TkVarAccess.new('blt_library', lib) + + begin + lib = TkCore::INTERP._invoke('set', 'blt_libPath') + rescue + lib = '' + end + LIB_PATH = TkVarAccess.new('blt_libPath', lib) + + PACKAGE_NAME = 'BLT'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('BLT') + rescue + '' + end + end + + #################################################### + + def self.beep(percent = 50) + tk_call('::blt::beep', percent) + end + + def self.bgexec(*args) + if args[0].kind_of?(TkVariable) + var = args.shift + else + var = TkVariable.new + end + params = [var] + + params.concat(hash_kv(args.shift, true)) if args[0].kind_of?(Hash) + + params << '--' if args[0] =~ /^\s*-[^-]/ + params.concat(args) + + tk_call('::blt::bgexec', *params) + var + end + + def self.detach_bgexec(*args) + if args[0].kind_of?(TkVariable) + var = args.shift + else + var = TkVariable.new + end + params = [var] + + params.concat(hash_kv(args.shift, true)) if args[0].kind_of?(Hash) + + params << '--' if args[0] =~ /^\s*-[^-]/ + params.concat(args) + params << '&' + + [var, tk_split_list(tk_call('::blt::bgexec', *params))] + end + + def self.bltdebug(lvl = nil) + if lvl + tk_call('::blt::bltdebug', lvl) + else + number(tk_call('::blt::bltdebug')) + end + end + + def self.crc32_file(name) + tk_call_without_enc('::blt::crc32', name) + end + def self.crc32_data(dat) + tk_call_without_enc('::blt::crc32', '-data', dat) + end + + #################################################### + + def self.active_legend(graph) + tk_call_without_enc('Blt_ActiveLegend', graph) + end + def self.crosshairs(graph) + tk_call_without_enc('Blt_Crosshairs', graph) + end + def self.zoom_stack(graph) + tk_call_without_enc('Blt_ZoomStack', graph) + end + def self.print_key(graph) + tk_call_without_enc('Blt_PrintKey', graph) + end + def self.closest_point(graph) + tk_call_without_enc('Blt_ClosestPoint', graph) + end + + module GraphCommand + def active_legend + tk_call_without_enc('Blt_ActiveLegend', @path) + self + end + def crosshairs + tk_call_without_enc('Blt_Crosshairs', @path) + self + end + def zoom_stack + tk_call_without_enc('Blt_ZoomStack', @path) + self + end + def print_key + tk_call_without_enc('Blt_PrintKey', @path) + self + end + def closest_point + tk_call_without_enc('Blt_ClosestPoint', @path) + self + end + end + + #################################################### + + autoload :PlotComponent,'tkextlib/blt/component.rb' + + autoload :Barchart, 'tkextlib/blt/barchart.rb' + autoload :Bitmap, 'tkextlib/blt/bitmap.rb' + autoload :Busy, 'tkextlib/blt/busy.rb' + autoload :Container, 'tkextlib/blt/container.rb' + autoload :CutBuffer, 'tkextlib/blt/cutbuffer.rb' + autoload :DragDrop, 'tkextlib/blt/dragdrop.rb' + autoload :EPS, 'tkextlib/blt/eps.rb' + autoload :Htext, 'tkextlib/blt/htext.rb' + autoload :Graph, 'tkextlib/blt/graph.rb' + autoload :Spline, 'tkextlib/blt/spline.rb' + autoload :Stripchart, 'tkextlib/blt/stripchart.rb' + autoload :Table, 'tkextlib/blt/table.rb' + autoload :Tabnotebook, 'tkextlib/blt/tabnotebook.rb' + autoload :Tabset, 'tkextlib/blt/tabset.rb' + autoload :Ted, 'tkextlib/blt/ted.rb' + autoload :Tile, 'tkextlib/blt/tile.rb' + autoload :Tree, 'tkextlib/blt/tree.rb' + autoload :TreeView, 'tkextlib/blt/treeview.rb' + autoload :Hiertable, 'tkextlib/blt/treeview.rb' + # Hierbox is obsolete + autoload :Vector, 'tkextlib/blt/vector.rb' + autoload :VectorAccess, 'tkextlib/blt/vector.rb' + autoload :Watch, 'tkextlib/blt/watch.rb' + autoload :Winop, 'tkextlib/blt/winop.rb' + autoload :WinOp, 'tkextlib/blt/winop.rb' + + # Unix only + autoload :DnD, 'tkextlib/blt/unix_dnd.rb' + + # Windows only + autoload :Printer, 'tkextlib/blt/win_printer.rb' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/barchart.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/barchart.rb new file mode 100644 index 0000000..cb481c5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/barchart.rb @@ -0,0 +1,79 @@ +# +# tkextlib/blt/barchart.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' +require 'tkextlib/blt/component.rb' + +module Tk::BLT + class Barchart < TkWindow + TkCommandNames = ['::blt::barchart'.freeze].freeze + WidgetClassName = 'Barchart'.freeze + WidgetClassNames[WidgetClassName] = self + + include PlotComponent + include GraphCommand + + def __boolval_optkeys + ['bufferelements', 'buffergraph', 'invertxy'] + end + private :__boolval_optkeys + + def __strval_optkeys + ['text', 'label', 'title', 'file', + 'background', 'plotbackground'] + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'colormap' << 'fontmap' + end + private :__tkvariable_optkeys + +=begin + BarElement_ID = ['blt_barchart_bar'.freeze, '00000'.taint].freeze + + def bar(elem=nil, keys={}) + if elem.kind_of?(Hash) + keys = elem + elem = nil + end + unless elem + elem = BarElement_ID.join(TkCore::INTERP._ip_id_).freeze + BarElement_ID[1].succ! + end + tk_send('bar', elem, keys) + Element.new(self, elem, :without_creating=>true) + end +=end + + def extents(item) + num_or_str(tk_send_without_enc('extents', item)) + end + + def invtransform(x, y) + list(tk_send_without_enc('invtransform', x, y)) + end + + def inside(x, y) + bool(tk_send_without_enc('inside', x, y)) + end + + def metafile(file=None) + # Windows only + tk_send('metafile', file) + self + end + + def snap(output, keys={}) + tk_send_without_enc('snap', *(hash_kv(keys, false) + output)) + self + end + + def transform(x, y) + list(tk_send_without_enc('transform', x, y)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/bitmap.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/bitmap.rb new file mode 100644 index 0000000..23c6d2d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/bitmap.rb @@ -0,0 +1,112 @@ +# +# tkextlib/blt/bitmap.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Bitmap < TkObject + extend TkCore + + TkCommandNames = ['::blt::bitmap'.freeze].freeze + + BITMAP_ID_TBL = TkCore::INTERP.create_table + + (BITMAP_ID = ['blt_bitmap_id'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + BITMAP_ID_TBL.mutex.synchronize{ BITMAP_ID_TBL.clear } + } + + def self.data(name) + dat = tk_simple_list(tk_call('::blt::bitmap', 'data', name)) + [ tk_split_list(dat[0]), tk_simple_list(dat[1]) ] + end + + def self.exist?(name) + bool(tk_call('::blt::bitmap', 'exists', name)) + end + + def self.height(name) + number(tk_call('::blt::bitmap', 'height', name)) + end + + def self.width(name) + number(tk_call('::blt::bitmap', 'width', name)) + end + + def self.source(name) + tk_simple_list(tk_call('::blt::bitmap', 'source', name)) + end + + ################################# + + class << self + alias _new new + + def new(data, keys={}) + _new(:data, nil, data, keys) + end + alias define new + + def new_with_name(name, data, keys={}) + _new(:data, name, data, keys) + end + alias define_with_name new_with_name + + def compose(text, keys={}) + _new(:text, nil, text, keys) + end + + def compose_with_name(name, text, keys={}) + _new(:text, name, text, keys) + end + end + + def initialize(type, name, data, keys = {}) + if name + @id = name + else + BITMAP_ID.mutex.synchronize{ + @id = BITMAP_ID.join(TkCore::INTERP._ip_id_) + BITMAP_ID[1].succ! + } + BITMAP_ID_TBL.mutex.synchronize{ + BITMAP_ID_TBL[@id] = self + } + end + + @path = @id + + unless bool(tk_call('::blt::bitmap', 'exists', @id)) + if type == :text + tk_call('::blt::bitmap', 'compose', @id, data, *hash_kv(keys)) + else # :data + tk_call('::blt::bitmap', 'define', @id, data, *hash_kv(keys)) + end + end + end + + def exist? + bool(tk_call('::blt::bitmap', 'exists', @id)) + end + + def height + number(tk_call('::blt::bitmap', 'height', @id)) + end + + def width + number(tk_call('::blt::bitmap', 'width', @id)) + end + + def source + tk_simple_list(tk_call('::blt::bitmap', 'source', @id)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/busy.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/busy.rb new file mode 100644 index 0000000..2f807fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/busy.rb @@ -0,0 +1,82 @@ +# +# tkextlib/blt/busy.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/itemconfig.rb' +require 'tkextlib/blt.rb' + +module Tk::BLT + module Busy + extend TkCore + extend TkItemConfigMethod + + TkCommandNames = ['::blt::busy'.freeze].freeze + + ########################### + + class Shield < TkWindow + def self.shield_path(win) + win = window(win) unless win.kind_of?(TkWindow) + if win.kind_of?(Tk::Toplevel) + win.path + '._Busy' + else + win.path + '_Busy' + end + end + + def initialize(win) + @path = self.class.shield_path(win) + end + end + + def self.shield_path(win) + Tk::BLT::Busy::Shield.shield_path(win) + end + end +end + +class << Tk::BLT::Busy + def __item_config_cmd(win) + ['::blt::busy', 'configure', win] + end + private :__item_config_cmd + + undef itemcget + alias configure itemconfigure + alias configinfo itemconfiginfo + alias current_configinfo current_itemconfiginfo + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + ################################## + + def hold(win, keys={}) + tk_call('::blt::busy', 'hold', win, *hash_kv(keys)) + end + + def release(*wins) + tk_call('::blt::busy', 'release', *wins) + end + + def forget(*wins) + tk_call('::blt::busy', 'forget', *wins) + end + + def is_busy(pat=None) + tk_split_list(tk_call('::blt::busy', 'isbusy', pat)) + end + + def names(pat=None) + tk_split_list(tk_call('::blt::busy', 'names', pat)) + end + alias windows names + + def check(win) + bool(tk_call('::blt::busy', 'check', win)) + end + + def status(win) + bool(tk_call('::blt::busy', 'status', win)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/component.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/component.rb new file mode 100644 index 0000000..b2005b2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/component.rb @@ -0,0 +1,2145 @@ +# +# tkextlib/blt/component.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module PlotComponent + include TkItemConfigMethod + + module OptKeys + def __item_font_optkeys(id) + ['font', 'tickfont', 'titlefont'] + end + private :__item_font_optkeys + + def __item_numstrval_optkeys(id) + ['xoffset', 'yoffset'] + end + private :__item_numstrval_optkeys + + def __item_boolval_optkeys(id) + ['hide', 'under', 'descending', 'logscale', 'loose', 'showticks', + 'titlealternate', 'scalesymbols', 'minor', 'raised', + 'center', 'decoration', 'landscape', 'maxpect'] + end + private :__item_boolval_optkeys + + def __item_strval_optkeys(id) + ['text', 'label', 'limits', 'title', + 'show', 'file', 'maskdata', 'maskfile', + 'color', 'titlecolor', 'fill', 'outline', 'offdash'] + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + ['bindtags'] + end + private :__item_listval_optkeys + + def __item_numlistval_optkeys(id) + ['dashes', 'majorticks', 'minorticks'] + end + private :__item_numlistval_optkeys + + def __item_tkvariable_optkeys(id) + ['variable', 'textvariable', 'colormap', 'fontmap'] + end + private :__item_tkvariable_optkeys + end + + include OptKeys + + def __item_cget_cmd(id) + if id.kind_of?(Array) + # id := [ type, name ] + [self.path, id[0], 'cget', id[1]] + else + [self.path, id, 'cget'] + end + end + private :__item_cget_cmd + + def __item_config_cmd(id) + if id.kind_of?(Array) + # id := [ type, name, ... ] + type, *names = id + [self.path, type, 'configure'].concat(names) + else + [self.path, id, 'configure'] + end + end + private :__item_config_cmd + + def __item_pathname(id) + if id.kind_of?(Array) + id = tagid(id[1]) + end + [self.path, id].join(';') + end + private :__item_pathname + + def axis_cget(id, option) + ret = itemcget(['axis', tagid(id)], option) + end + def axis_cget_strict(id, option) + ret = itemcget_strict(['axis', tagid(id)], option) + end + def axis_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + slot = _symbolkey2str(slot) + if cmd = slot.delete('command') + slot['command'] = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + else + value = slot + slot = args.pop + if slot == :command || slot == 'command' + cmd = value + value = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('axis') + itemconfigure(id_list, slot, value) + end + def axis_configinfo(id, slot=nil) + itemconfiginfo(['axis', tagid(id)], slot) + end + def current_axis_configinfo(id, slot=nil) + current_itemconfiginfo(['axis', tagid(id)], slot) + end + + def crosshairs_cget(option) + itemcget('crosshairs', option) + end + def crosshairs_cget_strict(option) + itemcget_strict('crosshairs', option) + end + def crosshairs_configure(slot, value=None) + itemconfigure('crosshairs', slot, value) + end + def crosshairs_configinfo(slot=nil) + itemconfiginfo('crosshairs', slot) + end + def current_crosshairs_configinfo(slot=nil) + current_itemconfiginfo('crosshairs', slot) + end + + def element_cget(id, option) + itemcget(['element', tagid(id)], option) + end + def element_cget_strict(id, option) + itemcget_strict(['element', tagid(id)], option) + end + def element_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + else + value = slot + slot = args.pop + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('element') + itemconfigure(id_list, slot, value) + end + def element_configinfo(id, slot=nil) + itemconfiginfo(['element', tagid(id)], slot) + end + def current_element_configinfo(id, slot=nil) + current_itemconfiginfo(['element', tagid(id)], slot) + end + + def bar_cget(id, option) + itemcget(['bar', tagid(id)], option) + end + def bar_cget_strict(id, option) + itemcget_strict(['bar', tagid(id)], option) + end + def bar_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + else + value = slot + slot = args.pop + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('bar') + itemconfigure(id_list, slot, value) + end + def bar_configinfo(id, slot=nil) + itemconfiginfo(['bar', tagid(id)], slot) + end + def current_bar_configinfo(id, slot=nil) + current_itemconfiginfo(['bar', tagid(id)], slot) + end + + def line_cget(id, option) + itemcget(['line', tagid(id)], option) + end + def line_cget_strict(id, option) + itemcget_strict(['line', tagid(id)], option) + end + def line_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + else + value = slot + slot = args.pop + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('line') + itemconfigure(id_list, slot, value) + end + def line_configinfo(id, slot=nil) + itemconfiginfo(['line', tagid(id)], slot) + end + def current_line_configinfo(id, slot=nil) + current_itemconfiginfo(['line', tagid(id)], slot) + end + + def gridline_cget(option) + itemcget('grid', option) + end + def gridline_cget_strict(option) + itemcget_strict('grid', option) + end + def gridline_configure(slot, value=None) + itemconfigure('grid', slot, value) + end + def gridline_configinfo(slot=nil) + itemconfiginfo('grid', slot) + end + def current_gridline_configinfo(slot=nil) + current_itemconfiginfo('grid', slot) + end + + def legend_cget(option) + itemcget('legend', option) + end + def legend_cget_strict(option) + itemcget_strict('legend', option) + end + def legend_configure(slot, value=None) + itemconfigure('legend', slot, value) + end + def legend_configinfo(slot=nil) + itemconfiginfo('legend', slot) + end + def current_legend_configinfo(slot=nil) + current_itemconfiginfo('legend', slot) + end + + def pen_cget(id, option) + itemcget(['pen', tagid(id)], option) + end + def pen_cget_strict(id, option) + itemcget_strict(['pen', tagid(id)], option) + end + def pen_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + else + value = slot + slot = args.pop + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('pen') + itemconfigure(id_list, slot, value) + end + def pen_configinfo(id, slot=nil) + itemconfiginfo(['pen', tagid(id)], slot) + end + def current_pen_configinfo(id, slot=nil) + current_itemconfiginfo(['pen', tagid(id)], slot) + end + + def postscript_cget(option) + itemcget('postscript', option) + end + def postscript_cget_strict(option) + itemcget_strict('postscript', option) + end + def postscript_configure(slot, value=None) + itemconfigure('postscript', slot, value) + end + def postscript_configinfo(slot=nil) + itemconfiginfo('postscript', slot) + end + def current_postscript_configinfo(slot=nil) + current_itemconfiginfo('postscript', slot) + end + + def marker_cget(id, option) + itemcget(['marker', tagid(id)], option) + end + def marker_cget_strict(id, option) + itemcget_strict(['marker', tagid(id)], option) + end + def marker_configure(*args) + slot = args.pop + if slot.kind_of?(Hash) + value = None + else + value = slot + slot = args.pop + end + id_list = args.flatten.collect!{|id| tagid(id)}.unshift('marker') + itemconfigure(id_list, slot, value) + end + def marker_configinfo(id, slot=nil) + itemconfiginfo(['marker', tagid(id)], slot) + end + def current_marker_configinfo(id, slot=nil) + current_itemconfiginfo(['marker', tagid(id)], slot) + end + + alias __itemcget itemcget + alias __itemcget_strict itemcget_strict + alias __itemconfiginfo itemconfiginfo + alias __current_itemconfiginfo current_itemconfiginfo + private :__itemcget, :__itemconfiginfo, :__current_itemconfiginfo + + def itemcget_strict(tagOrId, option) + ret = __itemcget(tagid(tagOrId), option) + if option == 'bindtags' || option == :bindtags + ret.collect{|tag| TkBindTag.id2obj(tag)} + else + ret + end + end + def itemcget(tagOrId, option) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + itemcget_strict(tagOrId, option) + else + begin + itemcget_strict(tagOrId, option) + rescue => e + begin + if current_itemconfiginfo(tagOrId).has_key?(option.to_s) + # error on known option + fail e + else + # unknown option + nil + end + rescue + fail e # tag error + end + end + end + end + def itemconfiginfo(tagOrId, slot = nil) + ret = __itemconfiginfo(tagid(tagOrId), slot) + + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + if slot == 'bindtags' || slot == :bindtags + ret[-2] = ret[-2].collect{|tag| TkBindTag.id2obj(tag)} + ret[-1] = ret[-1].collect{|tag| TkBindTag.id2obj(tag)} + end + else + if (inf = ret.assoc('bindtags')) + inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)} + inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)} + end + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if (inf = ret['bindtags']) + inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)} + inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)} + ret['bindtags'] = inf + end + end + + ret + end + def current_itemconfiginfo(tagOrId, slot = nil) + ret = __current_itemconfiginfo(tagid(tagOrId), slot) + + if (val = ret['bindtags']) + ret['bindtags'] = val.collect{|tag| TkBindTag.id2obj(tag)} + end + + ret + end + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + ################# + + class Axis < TkObject + (OBJ_ID = ['blt_chart_axis'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + AxisID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + AxisID_TBL.mutex.synchronize{ AxisID_TBL.clear } + } + + def self.id2obj(chart, id) + cpath = chart.path + AxisID_TBL.mutex.synchronize{ + return id unless AxisID_TBL[cpath] + AxisID_TBL[cpath][id]? AxisID_TBL[cpath][id]: id + } + end + + def self.new(chart, axis=nil, keys={}) + if axis.kind_of?(Hash) + keys = axis + axis = nil + end + if keys + keys = _symbolkey2str(keys) + not_create = keys.delete('without_creating') + else + not_create = false + end + + obj = nil + AxisID_TBL.mutex.synchronize{ + chart_path = chart.path + AxisID_TBL[chart_path] ||= {} + if axis && AxisID_TBL[chart_path][axis] + obj = AxisID_TBL[chart_path][axis] + else + (obj = self.allocate).instance_eval{ + if axis + @axis = @id = axis.to_s + else + OBJ_ID.mutex.synchronize{ + @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + Axis::AxisID_TBL[@cpath][@axis] = self + unless not_create + tk_call(@chart, 'axis', 'create', @axis, keys) + return obj + end + } + end + } + + obj.configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, axis=nil, keys={}) + # dummy:: not called by 'new' method + + if axis.kind_of?(Hash) + keys = axis + axis = nil + end + if axis + @axis = @id = axis.to_s + else + OBJ_ID.mutex.synchronize{ + @axis = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + # Axis::AxisID_TBL[@cpath][@axis] = self + keys = _symbolkey2str(keys) + unless keys.delete('without_creating') + # @chart.axis_create(@axis, keys) + tk_call(@chart, 'axis', 'create', @axis, keys) + end + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.axis_cget(@id, option) + end + def cget_strict(option) + @chart.axis_cget_strict(@id, option) + end + def configure(key, value=None) + @chart.axis_configure(@id, key, value) + self + end + def configinfo(key=nil) + @chart.axis_configinfo(@id, key) + end + def current_configinfo(key=nil) + @chart.current_axis_configinfo(@id, key) + end + + def command(cmd=nil, &b) + if cmd + configure('command', cmd) + elsif b + configure('command', Proc.new(&b)) + else + cget('command') + end + end + + def delete + @chart.axis_delete(@id) + self + end + + def invtransform(val) + @chart.axis_invtransform(@id, val) + end + + def limits + @chart.axis_limits(@id) + end + + def name + @axis + end + + def transform(val) + @chart.axis_transform(@id, val) + end + + def view + @chart.axis_view(@id) + self + end + + def use(name=None) # if @id == xaxis | x2axis | yaxis | y2axis + @chart.axis_use(@id, name) + end + + def use_as(axis) # axis := xaxis | x2axis | yaxis | y2axis + @chart.axis_use(axis, @id) + end + end + + ################# + + class Crosshairs < TkObject + CrosshairsID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + CrosshairsID_TBL.mutex.synchronize{ CrosshairsID_TBL.clear } + } + + def self.new(chart, keys={}) + obj = nil + CrosshairsID_TBL.mutex.synchronize{ + unless (obj = CrosshairsID_TBL[chart.path]) + (obj = self.allocate).instance_eval{ + @parent = @chart = chart + @cpath = @chart.path + @path = @id = 'crosshairs' + Crosshairs::CrosshairsID_TBL[@cpath] = self + } + end + } + chart.crosshair_configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, keys={}) + # dummy:: not called by 'new' method + + @parent = @chart = chart + @cpath = @chart.path + # Crosshairs::CrosshairsID_TBL[@cpath] = self + @chart.crosshair_configure(keys) unless keys.empty? + @path = @id = 'crosshairs' + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.crosshair_cget(option) + end + def cget_strict(option) + @chart.crosshair_cget_strict(option) + end + def configure(key, value=None) + @chart.crosshair_configure(key, value) + self + end + def configinfo(key=nil) + @chart.crosshair_configinfo(key) + end + def current_configinfo(key=nil) + @chart.current_crosshair_configinfo(key) + end + + def off + @chart.crosshair_off + self + end + def on + @chart.crosshair_on + self + end + def toggle + @chart.crosshair_toggle + self + end + end + + ################# + + class Element < TkObject + extend Tk + extend TkItemFontOptkeys + extend TkItemConfigOptkeys + + extend Tk::BLT::PlotComponent::OptKeys + + ElementTypeName = 'element' + ElementTypeToClass = { ElementTypeName=>self } + + ElementID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + ElementID_TBL.mutex.synchronize{ ElementID_TBL.clear } + } + + (OBJ_ID = ['blt_chart_element'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + def Element.type2class(type) + ElementTypeToClass[type] + end + + def Element.id2obj(chart, id) + cpath = chart.path + ElementID_TBL.mutex.synchronize{ + return id unless ElementID_TBL[cpath] + ElementID_TBL[cpath][id]? ElementID_TBL[cpath][id]: id + } + end + + def self.new(chart, element=nil, keys={}) + if element.kind_of?(Hash) + keys = element + element = nil + end + if keys + keys = _symbolkey2str(keys) + not_create = keys.delete('without_creating') + else + not_create = false + end + + obj = nil + ElementID_TBL.mutex.synchronize{ + chart_path = chart.path + ElementID_TBL[chart_path] ||= {} + if element && ElementID_TBL[chart_path][element] + obj = ElementID_TBL[chart_path][element] + else + (obj = self.allocate).instance_eval{ + if element + @element = @id = element.to_s + else + OBJ_ID.mutex.synchronize{ + @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + @typename = self.class::ElementTypeName + Element::ElementID_TBL[@cpath][@element] = self + unless not_create + tk_call(@chart, @typename, 'create', @element, keys) + return obj + end + } + end + } + + obj.configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, element=nil, keys={}) + # dummy:: not called by 'new' method + + if element.kind_of?(Hash) + keys = element + element = nil + end + if element + @element = @id = element.to_s + else + OBJ_ID.mutex.synchronize{ + @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + @typename = self.class::ElementTypeName + # Element::ElementID_TBL[@cpath][@element] = self + keys = _symbolkey2str(keys) + unless keys.delete('without_creating') + # @chart.element_create(@element, keys) + tk_call(@chart, @typename, 'create', @element, keys) + end + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + # @chart.element_cget(@id, option) + @chart.__send__(@typename + '_cget', @id, option) + end + def cget_strict(option) + @chart.__send__(@typename + '_cget_strict', @id, option) + end + def configure(key, value=None) + # @chart.element_configure(@id, key, value) + @chart.__send__(@typename + '_configure', @id, key, value) + self + end + def configinfo(key=nil) + # @chart.element_configinfo(@id, key) + @chart.__send__(@typename + '_configinfo', @id, key) + end + def current_configinfo(key=nil) + # @chart.current_element_configinfo(@id, key) + @chart.__send__('current_' << @typename << '_configinfo', @id, key) + end + + def activate(*args) + @chart.element_activate(@id, *args) + end + + def closest(x, y, var, keys={}) + # @chart.element_closest(x, y, var, @id, keys) + @chart.__send__(@typename + '_closest', x, y, var, @id, keys) + end + + def deactivate + @chart.element_deactivate(@id) + self + end + + def delete + @chart.element_delete(@id) + self + end + + def exist? + @chart.element_exist?(@id) + end + + def name + @element + end + + def type + @chart.element_type(@id) + end + end + + class Bar < Element + ElementTypeName = 'bar'.freeze + ElementTypeToClass[ElementTypeName] = self + end + class Line < Element + ElementTypeName = 'line'.freeze + ElementTypeToClass[ElementTypeName] = self + end + + ################# + + class GridLine < TkObject + GridLineID_TBL = TkCore::INTERP.create_table + TkCore::INTERP.init_ip_env{ + GridLineID_TBL.mutex.synchronize{ GridLineID_TBL.clear } + } + + def self.new(chart, keys={}) + obj = nil + GridLineID_TBL.mutex.synchronize{ + unless (obj = GridLineID_TBL[chart.path]) + (obj = self.allocate).instance_eval{ + @parent = @chart = chart + @cpath = @chart.path + @path = @id = 'grid' + GridLine::GridLineID_TBL[@cpath] = self + } + end + } + chart.gridline_configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, keys={}) + # dummy:: not called by 'new' method + + @parent = @chart = chart + @cpath = @chart.path + # GridLine::GridLineID_TBL[@cpath] = self + @chart.gridline_configure(keys) unless keys.empty? + @path = @id = 'grid' + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.gridline_cget(option) + end + def cget_strict(option) + @chart.gridline_cget_strict(option) + end + def configure(key, value=None) + @chart.gridline_configure(key, value) + self + end + def configinfo(key=nil) + @chart.gridline_configinfo(key) + end + def current_configinfo(key=nil) + @chart.current_gridline_configinfo(key) + end + + def off + @chart.gridline_off + self + end + def on + @chart.gridline_on + self + end + def toggle + @chart.gridline_toggle + self + end + end + + ################# + + class Legend < TkObject + LegendID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + LegendID_TBL.mutex.synchronize{ LegendID_TBL.clear } + } + + def self.new(chart, keys={}) + obj = nil + LegenedID_TBL.mutex.synchronize{ + unless (obj = LegenedID_TBL[chart.path]) + (obj = self.allocate).instance_eval{ + @parent = @chart = chart + @cpath = @chart.path + @path = @id = 'crosshairs' + Legend::LegenedID_TBL[@cpath] = self + } + end + } + chart.legend_configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, keys={}) + # dummy:: not called by 'new' method + + @parent = @chart = chart + @cpath = @chart.path + # Legend::LegendID_TBL[@cpath] = self + @chart.legend_configure(keys) unless keys.empty? + @path = @id = 'legend' + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.legend_cget(option) + end + def cget_strict(option) + @chart.legend_cget_strict(option) + end + def configure(key, value=None) + @chart.legend_configure(key, value) + self + end + def configinfo(key=nil) + @chart.legend_configinfo(key) + end + def current_configinfo(key=nil) + @chart.current_legend_configinfo(key) + end + + def activate(*args) + @chart.legend_activate(*args) + end + + def deactivate(*args) + @chart.legend_deactivate(*args) + end + + def get(pos, y=nil) + @chart.legend_get(pos, y) + end + end + + ################# + + class Pen < TkObject + (OBJ_ID = ['blt_chart_pen'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + PenID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + PenID_TBL.mutex.synchronize{ PenID_TBL.clear } + } + + def self.id2obj(chart, id) + cpath = chart.path + PenID_TBL.mutex.synchronize{ + return id unless PenID_TBL[cpath] + PenID_TBL[cpath][id]? PenID_TBL[cpath][id]: id + } + end + + def self.new(chart, pen=nil, keys={}) + if pen.kind_of?(Hash) + keys = pen + pen = nil + end + if keys + keys = _symbolkey2str(keys) + not_create = keys.delete('without_creating') + else + not_create = false + end + + obj = nil + PenID_TBL.mutex.synchronize{ + chart_path = chart.path + PenID_TBL[chart_path] ||= {} + if pen && PenID_TBL[chart_path][pen] + obj = PenID_TBL[chart_path][pen] + else + (obj = self.allocate).instance_eval{ + if pen + @pen = @id = pen.to_s + else + OBJ_ID.mutex.synchronize{ + @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + Pen::PenID_TBL[@cpath][@pen] = self + unless not_create + tk_call(@chart, 'pen', 'create', @pen, keys) + return obj + end + } + end + } + + obj.configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, pen=nil, keys={}) + if pen.kind_of?(Hash) + keys = pen + pen = nil + end + if pen + @pen = @id = pen.to_s + else + OBJ_ID.mutex.synchronize{ + @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze + OBJ_ID[1].succ! + } + end + @path = @id + @parent = @chart = chart + @cpath = @chart.path + Pen::PenID_TBL[@cpath][@pen] = self + keys = _symbolkey2str(keys) + unless keys.delete('without_creating') + # @chart.pen_create(@pen, keys) + tk_call(@chart, 'pen', 'create', @pen, keys) + end + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.pen_cget(@id, option) + end + def cget_strict(option) + @chart.pen_cget_strict(@id, option) + end + def configure(key, value=None) + @chart.pen_configure(@id, key, value) + self + end + def configinfo(key=nil) + @chart.pen_configinfo(@id, key) + end + def current_configinfo(key=nil) + @chart.current_pen_configinfo(@id, key) + end + + def delete + @chart.pen_delete(@id) + self + end + + def name + @pen + end + end + + ################# + + class Postscript < TkObject + PostscriptID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + PostscriptID_TBL.mutex.synchronize{ PostscriptID_TBL.clear } + } + + def self.new(chart, keys={}) + obj = nil + PostscriptID_TBL.mutex.synchronize{ + unless (obj = PostscriptID_TBL[chart.path]) + (obj = self.allocate).instance_eval{ + @parent = @chart = chart + @cpath = @chart.path + @path = @id = 'postscript' + Postscript::PostscriptID_TBL[@cpath] = self + } + end + } + chart.postscript_configure(keys) if obj && ! keys.empty? + obj + end + + def initialize(chart, keys={}) + # dummy:: not called by 'new' method + + @parent = @chart = chart + @cpath = @chart.path + # Postscript::PostscriptID_TBL[@cpath] = self + @chart.postscript_configure(keys) unless keys.empty? + @path = @id = 'postscript' + end + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.postscript_cget(option) + end + def cget_strict(option) + @chart.postscript_cget_strict(option) + end + def configure(key, value=None) + @chart.postscript_configure(key, value) + self + end + def configinfo(key=nil) + @chart.postscript_configinfo(key) + end + def current_configinfo(key=nil) + @chart.current_postscript_configinfo(key) + end + + def output(file=nil, keys={}) + if file.kind_of?(Hash) + keys = file + file = nil + end + + ret = @chart.postscript_output(file, keys) + + if file + self + else + ret + end + end + end + + ################# + class Marker < TkObject + extend Tk + extend TkItemFontOptkeys + extend TkItemConfigOptkeys + + extend Tk::BLT::PlotComponent::OptKeys + + MarkerTypeName = nil + MarkerTypeToClass = {} + MarkerID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + MarkerID_TBL.mutex.synchronize{ MarkerID_TBL.clear } + } + + def Marker.type2class(type) + MarkerTypeToClass[type] + end + + def Marker.id2obj(chart, id) + cpath = chart.path + MarkerID_TBL.mutex.synchronize{ + if MarkerID_TBL[cpath] + MarkerID_TBL[cpath][id]? MarkerID_TBL[cpath][id]: id + else + id + end + } + end + + def self._parse_create_args(keys) + fontkeys = {} + methodkeys = {} + if keys.kind_of? Hash + keys = _symbolkey2str(keys) + + __item_font_optkeys(nil).each{|key| + fkey = key.to_s + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "kanji#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "latin#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + + fkey = "ascii#{key}" + fontkeys[fkey] = keys.delete(fkey) if keys.key?(fkey) + } + + __item_optkey_aliases(nil).each{|alias_name, real_name| + alias_name = alias_name.to_s + if keys.has_key?(alias_name) + keys[real_name.to_s] = keys.delete(alias_name) + end + } + + __item_methodcall_optkeys(nil).each{|key| + key = key.to_s + methodkeys[key] = keys.delete(key) if keys.key?(key) + } + + __item_ruby2val_optkeys(nil).each{|key, method| + key = key.to_s + keys[key] = method.call(keys[key]) if keys.has_key?(key) + } + + args = itemconfig_hash_kv(nil, keys) + else + args = [] + end + + [args, fontkeys] + end + private_class_method :_parse_create_args + + def self.create(chart, keys={}) + unless self::MarkerTypeName + fail RuntimeError, "#{self} is an abstract class" + end + args, fontkeys = _parse_create_args(keys) + idnum = tk_call_without_enc(chart.path, 'marker', 'create', + self::MarkerTypeName, *args) + chart.marker_configure(idnum, fontkeys) unless fontkeys.empty? + idnum.to_i # 'item id' is an integer number + end + + def self.create_type(chart, type, keys={}) + args, fontkeys = _parse_create_args(keys) + idnum = tk_call_without_enc(chart.path, 'marker', 'create', + type, *args) + chart.marker_configure(idnum, fontkeys) unless fontkeys.empty? + id = idnum.to_i # 'item id' is an integer number + obj = self.allocate + obj.instance_eval{ + @parent = @chart = chart + @cpath = chart.path + @id = id + Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{ + Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {} + Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self + } + } + obj + end + + def initialize(parent, *args) + @parent = @chart = parent + @cpath = parent.path + + @path = @id = create_self(*args) # an integer number as 'item id' + Tk::BLT::PlotComponent::Marker::MarkerID_TBL.mutex.synchronize{ + Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath] ||= {} + Tk::BLT::PlotComponent::Marker::MarkerID_TBL[@cpath][@id] = self + } + end + def create_self(*args) + self.class.create(@chart, *args) # return an integer as 'item id' + end + private :create_self + + def id + @id + end + + def to_eval + @id + end + + def cget(option) + @chart.marker_cget(@id, option) + end + def cget_strict(option) + @chart.marker_cget_strict(@id, option) + end + def configure(key, value=None) + @chart.marker_configure(@id, key, value) + self + end + def configinfo(key=nil) + @chart.marker_configinfo(@id, key) + end + def current_configinfo(key=nil) + @chart.current_marker_configinfo(@id, key) + end + + def after(target=None) + @chart.marker_after(@id, target) + end + + def before(target=None) + @chart.marker_before(@id, target) + end + + def delete + @chart.marker_delete(@id) + end + + def exist? + @chart.marker_exist(@id) + end + + def type + @chart.marker_type(@id) + end + end + + class TextMarker < Marker + MarkerTypeName = 'text'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + class LineMarker < Marker + MarkerTypeName = 'line'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + class BitmapMarker < Marker + MarkerTypeName = 'bitmap'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + class ImageMarker < Marker + MarkerTypeName = 'image'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + class PolygonMarker < Marker + MarkerTypeName = 'polygon'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + class WindowMarker < Marker + MarkerTypeName = 'window'.freeze + MarkerTypeToClass[MarkerTypeName] = self + end + + ################# + + def __destroy_hook__ + Axis::AxisID_TBL.delete(@path) + Crosshairs::CrosshairsID_TBL.delete(@path) + Element::ElementID_TBL.delete(@path) + GridLine::GridLineID_TBL.delete(@path) + Legend::LegendID_TBL.delete(@path) + Pen::PenID_TBL.delete(@path) + Postscript::PostscriptID_TBL.delete(@path) + Marker::MarkerID_TBL.delete(@path) + super() + end + + ################# + + def tagid(tag) + if tag.kind_of?(Axis) || + tag.kind_of?(Crosshairs) || + tag.kind_of?(Element) || + tag.kind_of?(GridLine) || + tag.kind_of?(Legend) || + tag.kind_of?(Pen) || + tag.kind_of?(Postscript) || + tag.kind_of?(Marker) + tag.id + else + tag # maybe an Array of configure paramters + end + end + + def _component_bind(target, tag, context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, target, 'bind', tagid(tag)], context, cmd, *args) + self + end + def _component_bind_append(target, tag, context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, target, 'bind', tagid(tag)], context, cmd, *args) + self + end + def _component_bind_remove(target, tag, context) + _bind_remove([path, target, 'bind', tagid(tag)], context) + self + end + def _component_bindinfo(target, tag, context=nil) + _bindinfo([path, target, 'bind', tagid(tag)], context) + end + private :_component_bind, :_component_bind_append + private :_component_bind_remove, :_component_bindinfo + + def axis_bind(tag, context, *args) + _component_bind('axis', tag, context, *args) + end + def axis_bind_append(tag, context, *args) + _component_bind_append('axis', tag, context, *args) + end + def axis_bind_remove(tag, context) + _component_bind_remove('axis', tag, context) + end + def axis_bindinfo(tag, context=nil) + _component_bindinfo('axis', tag, context) + end + + def element_bind(tag, context, *args) + _component_bind('element', tag, context, *args) + end + def element_bind_append(tag, context, *args) + _component_bind_append('element', tag, context, *args) + end + def element_bind_remove(tag, context) + _component_bind_remove('element', tag, context) + end + def element_bindinfo(tag, context=nil) + _component_bindinfo('element', tag, context) + end + + def bar_bind(tag, context, *args) + _component_bind('bar', tag, context, *args) + end + def bar_bind_append(tag, context, *args) + _component_bind_append('bar', tag, context, *args) + end + def bar_bind_remove(tag, context) + _component_bind_remove('bar', tag, context) + end + def bar_bindinfo(tag, context=nil) + _component_bindinfo('bar', tag, context) + end + + def line_bind(tag, context, *args) + _component_bind('line', tag, context, *args) + end + def line_bind_append(tag, context, *args) + _component_bind_append('line', tag, context, *args) + end + def line_bind_remove(tag, context) + _component_bind_remove('line', tag, context) + end + def line_bindinfo(tag, context=nil) + _component_bindinfo('line', tag, context) + end + + def legend_bind(tag, context, *args) + _component_bind('legend', tag, context, *args) + end + def legend_bind_append(tag, context, *args) + _component_bind_append('legend', tag, context, *args) + end + def legend_bind_remove(tag, context) + _component_bind_remove('legend', tag, context) + end + def legend_bindinfo(tag, context=nil) + _component_bindinfo('legend', tag, context) + end + + def marker_bind(tag, context, *args) + _component_bind('marker', tag, context, *args) + end + def marker_bind_append(tag, context, *args) + _component_bind_append('marker', tag, context, *args) + end + def marker_bind_remove(tag, context) + _component_bind_remove('marker', tag, context) + end + def marker_bindinfo(tag, context=nil) + _component_bindinfo('marker', tag, context) + end + + ################### + + def axis_create(id=nil, keys={}) + # tk_send('axis', 'create', tagid(id), keys) + Tk::BLT::PlotComponent::Axis.new(self, tagid(id), keys) + end + def axis_delete(*ids) + tk_send('axis', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def axis_invtransform(id, val) + list(tk_send('axis', 'invtransform', tagid(id), val)) + end + def axis_limits(id) + list(tk_send('axis', 'limits', tagid(id))) + end + def axis_names(*pats) + simplelist(tk_send('axis', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|axis| + Tk::BLT::PlotComponent::Axis.id2obj(self, axis) + } + end + def axis_transform(id, val) + list(tk_send('axis', 'transform', tagid(id), val)) + end + def axis_view(id) + tk_send('axis', 'view', tagid(id)) + self + end + def axis_use(id, target=nil) + if target + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('axis', 'use', + tagid(id), tagid(target))) + else + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('axis', 'use', tagid(id))) + end + end + + ################### + + def crosshairs_off + tk_send_without_enc('crosshairs', 'off') + self + end + def crosshairs_on + tk_send_without_enc('crosshairs', 'on') + self + end + def crosshairs_toggle + tk_send_without_enc('crosshairs', 'toggle') + self + end + + ################### + + def element_create(id=nil, keys={}) + # tk_send('element', 'create', tagid(id), keys) + Tk::BLT::PlotComponent::Element.new(self, tagid(id), keys) + end + def element_activate(*args) + if args.empty? + list(tk_send('element', 'activate')).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + else + # id, *indices + id = args.shift + tk_send('element', 'activate', tagid(id), *args) + end + end + def element_closest(x, y, var, *args) + if args[-1].kind_of?(Hash) + keys = args.pop + bool(tk_send('element', 'closest', x, y, var, + *(hash_kv(keys).concat(args.collect{|id| tagid(id)})))) + else + bool(tk_send('element', 'closest', x, y, var, + *(args.collect{|id| tagid(id)}))) + end + end + def element_deactivate(*ids) + tk_send('element', 'deactivate', *(ids.collect{|id| tagid(id)})) + self + end + def element_delete(*ids) + tk_send('element', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def element_exist?(id) + bool(tk_send('element', 'exists', tagid(id))) + end + def element_names(*pats) + simplelist(tk_send('element', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + end + def element_show(*names) + if names.empty? + simplelist(tk_send('element', 'show')) + else + tk_send('element', 'show', *(names.collect{|n| tagid(n)})) + self + end + end + def element_type(id) + tk_send('element', 'type', tagid(id)) + end + + ################### + + def bar_create(id=nil, keys={}) + # tk_send('bar', 'create', tagid(id), keys) + Tk::BLT::PlotComponent::Bar.new(self, tagid(id), keys) + end + alias bar bar_create + def bar_activate(*args) + if args.empty? + list(tk_send('bar', 'activate')).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + else + # id, *indices + id = args.shift + tk_send('bar', 'activate', tagid(id), *args) + end + end + def bar_closest(x, y, var, *args) + if args[-1].kind_of?(Hash) + keys = args.pop + bool(tk_send('bar', 'closest', x, y, var, + *(hash_kv(keys).concat(args.collect{|id| tagid(id)})))) + else + bool(tk_send('bar', 'closest', x, y, var, + *(args.collect{|id| tagid(id)}))) + end + end + def bar_deactivate(*ids) + tk_send('bar', 'deactivate', *(ids.collect{|id| tagid(id)})) + self + end + def bar_delete(*ids) + tk_send('bar', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def bar_exist?(id) + bool(tk_send('bar', 'exists', tagid(id))) + end + def bar_names(*pats) + simplelist(tk_send('bar', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + end + def bar_show(*names) + if names.empty? + simplelist(tk_send('bar', 'show')) + else + tk_send('bar', 'show', *(names.collect{|n| tagid(n)})) + self + end + end + def bar_type(id) + tk_send('bar', 'type', tagid(id)) + end + + ################### + + def line_create(id=nil, keys={}) + # tk_send('line', 'create', tagid(id), keys) + Tk::BLT::PlotComponent::Line.new(self, tagid(id), keys) + end + alias bar line_create + def line_activate(*args) + if args.empty? + list(tk_send('line', 'activate')).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + else + # id, *indices + id = args.shift + tk_send('line', 'activate', tagid(id), *args) + end + end + def line_closest(x, y, var, *args) + if args[-1].kind_of?(Hash) + keys = args.pop + bool(tk_send('line', 'closest', x, y, var, + *(hash_kv(keys).concat(args.collect{|id| tagid(id)})))) + else + bool(tk_send('line', 'closest', x, y, var, + *(args.collect{|id| tagid(id)}))) + end + end + def line_deactivate(*ids) + tk_send('line', 'deactivate', *(ids.collect{|id| tagid(id)})) + self + end + def line_delete(*ids) + tk_send('line', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def line_exist?(id) + bool(tk_send('line', 'exists', tagid(id))) + end + def line_names(*pats) + simplelist(tk_send('line', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + end + def line_show(*names) + if names.empty? + simplelist(tk_send('line', 'show')) + else + tk_send('line', 'show', *(names.collect{|n| tagid(n)})) + self + end + end + def line_type(id) + tk_send('line', 'type', tagid(id)) + end + + ################### + + def gridline_off + tk_send_without_enc('grid', 'off') + self + end + def gridline_on + tk_send_without_enc('grid', 'on') + self + end + def gridline_toggle + tk_send_without_enc('grid', 'toggle') + self + end + + ################### + + def legend_window_create(parent=nil, keys=nil) + if parent.kind_of?(Hash) + keys = _symbolkey2str(parent) + parent = keys.delete('parent') + widgetname = keys.delete('widgetname') + keys.delete('without_creating') + elsif keys + keys = _symbolkey2str(keys) + widgetname = keys.delete('widgetname') + keys.delete('without_creating') + end + + legend = self.class.new(parent, :without_creating=>true, + :widgetname=>widgetname) + class << legend + def __destroy_hook__ + TkCore::INTERP.tk_windows.delete(@path) + end + end + + if keys + self.legend_configure(keys.update('position'=>legend)) + else + self.legend_configure('position'=>legend) + end + legend + end + + def legend_activate(*pats) + list(tk_send('legend', 'activate', + *(pats.collect{|pat| tagid(pat)}))).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + end + def legend_deactivate(*pats) + list(tk_send('legend', 'deactivate', + *(pats.collect{|pat| tagid(pat)}))).collect{|elem| + Tk::BLT::PlotComponent::Element.id2obj(self, elem) + } + end + def legend_get(pos, y=nil) + if y + Tk::BLT::PlotComponent::Element.id2obj(self, + tk_send('legend', 'get', + _at(pos, y))) + else + Tk::BLT::PlotComponent::Element.id2obj(self, + tk_send('legend', 'get', pos)) + end + end + + ################### + + def pen_create(id=nil, keys={}) + # tk_send('pen', 'create', tagid(id), keys) + Tk::BLT::PlotComponent::Pen.new(self, tagid(id), keys) + end + def pen_delete(*ids) + tk_send('pen', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def pen_names(*pats) + simplelist(tk_send('pen', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|pen| + Tk::BLT::PlotComponent::Pen.id2obj(self, pen) + } + end + + ################### + + def postscript_output(file=nil, keys={}) + if file.kind_of?(Hash) + keys = file + file = nil + end + + if file + tk_send('postscript', 'output', file, keys) + self + else + tk_send('postscript', 'output', keys) + end + end + + ################### + + def marker_create(type, keys={}) + case type + when :text, 'text' + Tk::BLT::PlotComponent::TextMarker.new(self, keys) + when :line, 'line' + Tk::BLT::PlotComponent::LineMarker.new(self, keys) + when :bitmap, 'bitmap' + Tk::BLT::PlotComponent::BitmapMarker.new(self, keys) + when :image, 'image' + Tk::BLT::PlotComponent::ImageMarker.new(self, keys) + when :polygon, 'polygon' + Tk::BLT::PlotComponent::PolygonMarker.new(self, keys) + when :window, 'window' + Tk::BLT::PlotComponent::WindowMarker.new(self, keys) + else + if type.kind_of?(Tk::BLT::PlotComponent::Marker) + type.new(self, keys) + else + Tk::BLT::PlotComponent::Marker.create_type(self, type, keys) + end + end + end + def marker_after(id, target=nil) + if target + tk_send_without_enc('marker', 'after', tagid(id), tagid(target)) + else + tk_send_without_enc('marker', 'after', tagid(id)) + end + self + end + def marker_before(id, target=None) + if target + tk_send_without_enc('marker', 'before', tagid(id), tagid(target)) + else + tk_send_without_enc('marker', 'before', tagid(id)) + end + self + end + def marker_delete(*ids) + tk_send('marker', 'delete', *(ids.collect{|id| tagid(id)})) + self + end + def marker_exist?(id) + bool(tk_send('marker', 'exists', tagid(id))) + end + def marker_names(*pats) + simplelist(tk_send('marker', 'names', + *(pats.collect{|pat| tagid(pat)}))).collect{|id| + Tk::BLT::PlotComponent::Marker.id2obj(self, id) + } + end + def marker_type(id) + tk_send('marker', 'type', tagid(id)) + end + + ################### + + def xaxis_cget(option) + itemcget('xaxis', option) + end + def xaxis_cget_strict(option) + itemcget_strict('xaxis', option) + end + def xaxis_configure(slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + if cmd = slot.delete('command') + slot['command'] = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + elsif slot == :command || slot == 'command' + cmd = value + value = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + itemconfigure('xaxis', slot, value) + end + def xaxis_configinfo(slot=nil) + itemconfiginfo('xaxis', slot) + end + def current_xaxis_configinfo(slot=nil) + current_itemconfiginfo('xaxis', slot) + end + def xaxis_bind(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'xaxis', 'bind'], context, cmd, *args) + self + end + def xaxis_bind_append(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'xaxis', 'bind'], context, cmd, *args) + self + end + def xaxis_bind_remove(context) + _bind_remove([path, 'xaxis', 'bind'], context) + self + end + def xaxis_bindinfo(context=nil) + _bindinfo([path, 'xaxis', 'bind'], context) + end + def xaxis_invtransform(val) + list(tk_send('xaxis', 'invtransform', val)) + end + def xaxis_limits + list(tk_send('xaxis', 'limits')) + end + def xaxis_transform(val) + list(tk_send('xaxis', 'transform', val)) + end + def xaxis_use(target=nil) + if target + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('xaxis', 'use', + tagid(target))) + else + Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('xaxis', 'use')) + end + end + + def x2axis_cget(option) + itemcget('x2axis', option) + end + def x2axis_cget_strict(option) + itemcget_strict('x2axis', option) + end + def x2axis_configure(slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + if cmd = slot.delete('command') + slot['command'] = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + elsif slot == :command || slot == 'command' + cmd = value + value = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + itemconfigure('x2axis', slot, value) + end + def x2axis_configinfo(slot=nil) + itemconfiginfo('x2axis', slot) + end + def current_x2axis_configinfo(slot=nil) + current_itemconfiginfo('x2axis', slot) + end + def x2axis_bind(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'x2axis', 'bind'], context, cmd, *args) + self + end + def x2axis_bind_append(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'x2axis', 'bind'], context, cmd, *args) + self + end + def x2axis_bind_remove(context) + _bind_remove([path, 'x2axis', 'bind'], context) + self + end + def x2axis_bindinfo(context=nil) + _bindinfo([path, 'x2axis', 'bind'], context) + end + def x2axis_invtransform(val) + list(tk_send('x2axis', 'invtransform', val)) + end + def x2axis_limits + list(tk_send('x2axis', 'limits')) + end + def x2axis_transform(val) + list(tk_send('x2axis', 'transform', val)) + end + def x2axis_use(target=nil) + if target + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('x2axis', 'use', + tagid(target))) + else + Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('x2axis', 'use')) + end + end + + def yaxis_cget(option) + itemcget('yaxis', option) + end + def yaxis_cget_strict(option) + itemcget_strict('yaxis', option) + end + def yaxis_configure(slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + if cmd = slot.delete('command') + slot['command'] = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + elsif slot == :command || slot == 'command' + cmd = value + value = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + itemconfigure('yaxis', slot, value) + end + def yaxis_configinfo(slot=nil) + itemconfiginfo('yaxis', slot) + end + def current_yaxis_configinfo(slot=nil) + current_itemconfiginfo('yaxis', slot) + end + def yaxis_bind(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'yaxis', 'bind'], context, cmd, *args) + self + end + def yaxis_bind_append(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'yaxis', 'bind'], context, cmd, *args) + self + end + def yaxis_bind_remove(context) + _bind_remove([path, 'yaxis', 'bind'], context) + self + end + def yaxis_bindinfo(context=nil) + _bindinfo([path, 'yaxis', 'bind'], context) + end + def yaxis_invtransform(val) + list(tk_send('yaxis', 'invtransform', val)) + end + def yaxis_limits + list(tk_send('yaxis', 'limits')) + end + def yaxis_transform(val) + list(tk_send('yaxis', 'transform', val)) + end + def yaxis_use(target=nil) + if target + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('yaxis', 'use', + tagid(target))) + else + Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('yaxis', 'use')) + end + end + + def y2axis_cget(option) + itemcget('y2axis', option) + end + def y2axis_cget_strict(option) + itemcget_strict('y2axis', option) + end + def y2axis_configure(slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + if cmd = slot.delete('command') + slot['command'] = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + elsif slot == :command || slot == 'command' + cmd = value + value = proc{|w, tick| + cmd.call(TkComm.window(w), TkComm.num_or_str(tick)) + } + end + itemconfigure('y2axis', slot, value) + end + def y2axis_configinfo(slot=nil) + axis_configinfo('y2axis', slot) + end + def current_y2axis_configinfo(slot=nil) + current_itemconfiginfo('y2axis', slot) + end + def y2axis_bind(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'y2axis', 'bind'], context, cmd, *args) + self + end + def y2axis_bind_append(context, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'y2axis', 'bind'], context, cmd, *args) + self + end + def y2axis_bind_remove(context) + _bind_remove([path, 'y2axis', 'bind'], context) + self + end + def y2axis_bindinfo(context=nil) + _bindinfo([path, 'y2axis', 'bind'], context) + end + def y2axis_invtransform(val) + list(tk_send('y2axis', 'invtransform', val)) + end + def y2axis_limits + list(tk_send('y2axis', 'limits')) + end + def y2axis_transform(val) + list(tk_send('y2axis', 'transform', val)) + end + def y2axis_use(target=nil) + if target + Tk::BLT::PlotComponent::Axis.id2obj(self, + tk_send('y2axis', 'use', + tagid(target))) + else + Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('y2axis', 'use')) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/container.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/container.rb new file mode 100644 index 0000000..cdbec21 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/container.rb @@ -0,0 +1,28 @@ +# +# tkextlib/blt/container.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Container < TkWindow + TkCommandNames = ['::blt::container'.freeze].freeze + WidgetClassName = 'Container'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'name' + end + private :__strval_optkeys + + def find_command(pat) + Hash[*simplelist(tk_send_without_enc('find', '-command', pat))] + end + + def find_name(pat) + Hash[*simplelist(tk_send_without_enc('find', '-name', pat))] + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/cutbuffer.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/cutbuffer.rb new file mode 100644 index 0000000..1cc39df --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/cutbuffer.rb @@ -0,0 +1,23 @@ +# +# tkextlib/blt/cutbuffer.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module CutBuffer + TkCommandNames = ['::blt::cutbuffer'.freeze].freeze + + def self.get(num = 0) + Tk.tk_call('::blt::cutbuffer', 'get', num) + end + def self.rotate(count = 1) + Tk.tk_call('::blt::cutbuffer', 'rotate', count) + end + def self.set(val, num = 0) + Tk.tk_call('::blt::cutbuffer', 'set', val, num) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/dragdrop.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/dragdrop.rb new file mode 100644 index 0000000..2015485 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/dragdrop.rb @@ -0,0 +1,268 @@ +# +# tkextlib/blt/dragdrop.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/itemconfig' +require 'tkextlib/blt.rb' + +module Tk::BLT + module DragDrop + extend TkCore + + TkCommandNames = ['::blt::drag&drop'.freeze].freeze + + class Token < TkWindow + WidgetClassName = 'DragDropToken'.freeze + WidgetClassNames[WidgetClassName] = self + + def initialize(arg) + if arg.kind_of?(Hash) # arg is a hash includes the widgetpath of token + arg = _symbolkey2str(arg) + install_win(nil, arg['widgetname']) + else # arg is a drag&drop source + tk_call('::blt::drag&drop', 'source', arg) + install_win(nil, tk_call('::blt::drag&drop', 'token', arg)) + end + end + end + + ################################### + + extend TkItemConfigMethod + extend Tk::ValidateConfigure + + class << self + def __item_config_cmd(id) # id := ['source'|'target', win] + ['::blt::drag&drop', id[0], id[1]] + end + private :__item_config_cmd + + def __item_boolval_optkeys(id) + super(id) << 'selftarget' + end + private :__item_boolval_optkeys + + def __item_listval_optkeys(id) + super(id) << 'send' + end + private :__item_listval_optkeys + + def __item_strval_optkeys(id) + super(id) << 'rejectbg' << 'rejectfg' << 'tokenbg' + end + private :__item_strval_optkeys + + undef itemcget + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + def source_configure(win, slot, value=None) + itemconfigure(['source', win], slot, value) + end + def source_configinfo(win, slot=nil) + itemconfiginfo(['source', win], slot) + end + def current_source_configinfo(win, slot=nil) + current_itemconfiginfo(['source', win], slot) + end + end + + class PackageCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?t, ?w, :token ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL) + + def self.ret_val(val) + val + end + end + + def self._config_keys + ['packagecmd'] + end + end + + class SiteCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?s, ?b, :compatible ], + [ ?t, ?w, :token ], + nil + ] + + PROC_TBL = [ + [ ?b, TkComm.method(:bool) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL) + + def self.ret_val(val) + val + end + end + + def self._config_keys + ['sitecmd'] + end + end + + def self.__validation_class_list + super() << PackageCommand << SiteCommand + end + + class << self + Tk::ValidateConfigure.__def_validcmd(binding, PackageCommand) + Tk::ValidateConfigure.__def_validcmd(binding, SiteCommand) + end + + ################################### + + class DnD_Handle < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?i, ?s, :ip_name ], + [ ?v, ?v, :value ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?i, TkComm.method(:string) ], + [ ?v, TkComm.method(:tk_tcl2ruby) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL) + end + + def self.source_handler(win, datatype, cmd=Proc.new, *args) + _bind_for_event_class(DnD_Handle, + ['::blt::drag&drop', 'source', win, 'handler'], + cmd, *args) + end + + def self.target_handler(win, datatype, cmd=Proc.new, *args) + _bind_for_event_class(DnD_Handle, + ['::blt::drag&drop', 'target', win, 'handler'], + cmd, *args) + end + + ################################### + + def self.init_source(win) + tk_call('::blt::drag&drop', 'source', win) + end + + def self.source() + list(tk_call('::blt::drag&drop', 'source')) + end + + def self.source_handler_list(win) + simplelist(tk_call('::blt::drag&drop', 'source', win, 'handler')) + end + def self.source_handler_info(win, type) + tk_tcl2ruby(tk_call('::blt::drag&drop', 'source', win, 'handler', type)) + end + + def self.target + list(tk_call('::blt::drag&drop', 'target')) + end + def self.target_handler_list(win) + simplelist(tk_call('::blt::drag&drop', 'target', win, 'handler')) + end + + def self.handle_target(win, type, val=None) + tk_call('::blt::drag&drop', 'target', win, 'handle', type, val) + end + + def self.token(win) + window(tk_call('::blt::drag&drop', 'token', win)) + end + + def self.drag(win, x, y) + tk_call('::blt::drag&drop', 'drag', win, x, y) + end + def self.drop(win, x, y) + tk_call('::blt::drag&drop', 'drop', win, x, y) + end + + def self.errors(cmd=Proc.new) + tk_call('::blt::drag&drop', 'errors', cmd) + end + + def self.active + bool(tk_call('::blt::drag&drop', 'active')) + end + + def self.location(x=None, y=None) + list(tk_call('::blt::drag&drop', 'location', x, y)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/eps.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/eps.rb new file mode 100644 index 0000000..0dba87a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/eps.rb @@ -0,0 +1,32 @@ +# +# tkextlib/blt/eps.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/canvas' +require 'tkextlib/blt.rb' + +module Tk::BLT + class EPS < TkcItem + CItemTypeName = 'eps'.freeze + CItemTypeToClass[CItemTypeName] = self + end +end + +class Tk::Canvas + alias __BLT_EPS_item_strval_optkeys __item_strval_optkeys + def __item_strval_optkeys(id) + __BLT_EPS_item_strval_optkeys(id) + [ + 'shadowcolor', 'title', 'titlecolor' + ] + end + private :__item_strval_optkeys + + alias __BLT_EPS_item_boolval_optkeys __item_boolval_optkeys + def __item_boolval_optkeys(id) + __BLT_EPS_item_boolval_optkeys(id) + ['showimage'] + end + private :__item_boolval_optkeys +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/graph.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/graph.rb new file mode 100644 index 0000000..9ae99bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/graph.rb @@ -0,0 +1,67 @@ +# +# tkextlib/blt/graph.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' +require 'tkextlib/blt/component.rb' + +module Tk::BLT + class Graph < TkWindow + TkCommandNames = ['::blt::graph'.freeze].freeze + WidgetClassName = 'Graph'.freeze + WidgetClassNames[WidgetClassName] = self + + include PlotComponent + include GraphCommand + + def __boolval_optkeys + ['bufferelements', 'invertxy'] + end + private :__boolval_optkeys + + def __strval_optkeys + ['text', 'label', 'title', 'file', 'plotbackground'] + end + private :__strval_optkeys + +=begin + BarElement_ID = ['blt_graph_bar'.freeze, '00000'.taint].freeze + + def bar(elem=nil, keys={}) + if elem.kind_of?(Hash) + keys = elem + elem = nil + end + unless elem + elem = BarElement_ID.join(TkCore::INTERP._ip_id_).freeze + BarElement_ID[1].succ! + end + tk_send('bar', elem, keys) + Element.new(self, elem, :without_creating=>true) + end +=end + + def extents(item) + num_or_str(tk_send_without_enc('extents', item)) + end + + def invtransform(x, y) + list(tk_send_without_enc('invtransform', x, y)) + end + + def inside(x, y) + bool(tk_send_without_enc('inside', x, y)) + end + + def snap(output, keys={}) + tk_send_without_enc('snap', *(hash_kv(keys, false) + output)) + self + end + + def transform(x, y) + list(tk_send_without_enc('transform', x, y)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/htext.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/htext.rb new file mode 100644 index 0000000..0d9cb30 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/htext.rb @@ -0,0 +1,111 @@ +# +# tkextlib/blt/htext.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/itemconfig.rb' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Htexttrue) + end +=end + + def extents(item) + num_or_str(tk_send_without_enc('extents', item)) + end + + def invtransform(x, y) + list(tk_send_without_enc('invtransform', x, y)) + end + + def inside(x, y) + bool(tk_send_without_enc('inside', x, y)) + end + + def metafile(file=None) + # Windows only + tk_send('metafile', file) + self + end + + def snap(output, keys={}) + tk_send_without_enc('snap', *(hash_kv(keys, false) + output)) + self + end + + def transform(x, y) + list(tk_send_without_enc('transform', x, y)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/table.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/table.rb new file mode 100644 index 0000000..dfa1026 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/table.rb @@ -0,0 +1,399 @@ +# +# tkextlib/blt/table.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/itemconfig.rb' +require 'tkextlib/blt.rb' + +module Tk::BLT + module Table + include Tk + extend Tk + extend TkItemConfigMethod + + TkCommandNames = ['::blt::table'.freeze].freeze + + module TableContainer + def blt_table_add(*args) + Tk::BLT::Table.add(self, *args) + self + end + + def blt_table_arrange() + Tk::BLT::Table.arrange(self) + self + end + + def blt_table_cget(*args) + Tk::BLT::Table.cget(self, *args) + end + def blt_table_cget_strict(*args) + Tk::BLT::Table.cget_strict(self, *args) + end + + def blt_table_configure(*args) + Tk::BLT::Table.configure(self, *args) + self + end + + def blt_table_configinfo(*args) + Tk::BLT::Table.configinfo(self, *args) + end + + def blt_table_current_configinfo(*args) + Tk::BLT::Table.current_configinfo(self, *args) + end + + def blt_table_locate(x, y) + Tk::BLT::Table.locate(self, x, y) + end + + def blt_table_delete(*args) + Tk::BLT::Table.delete(self, *args) + self + end + + def blt_table_extents(item) + Tk::BLT::Table.extents(self, item) + end + + def blt_table_insert(*args) + Tk::BLT::Table.insert(self, *args) + self + end + + def blt_table_insert_before(*args) + Tk::BLT::Table.insert_before(self, *args) + self + end + + def blt_table_insert_after(*args) + Tk::BLT::Table.insert_after(self, *args) + self + end + + def blt_table_join(first, last) + Tk::BLT::Table.join(self, first, last) + self + end + + def blt_table_save() + Tk::BLT::Table.save(self) + end + + def blt_table_search(*args) + Tk::BLT::Table.search(self, *args) + end + + def blt_table_split(*args) + Tk::BLT::Table.split(self, *args) + self + end + + def blt_table_itemcget(*args) + Tk::BLT::Table.itemcget(self, *args) + end + def blt_table_itemcget_strict(*args) + Tk::BLT::Table.itemcget_strict(self, *args) + end + + def blt_table_itemconfigure(*args) + Tk::BLT::Table.itemconfigure(self, *args) + self + end + + def blt_table_itemconfiginfo(*args) + Tk::BLT::Table.itemconfiginfo(self, *args) + end + + def blt_table_current_itemconfiginfo(*args) + Tk::BLT::Table.current_itemconfiginfo(self, *args) + end + + def blt_table_iteminfo(item) + Tk::BLT::Table.iteminfo(self, item) + end + end + end +end + + +############################################ +class << Tk::BLT::Table + def __item_cget_cmd(id) # id := [ container, item ] + win = (id[0].kind_of?(TkWindow))? id[0].path: id[0].to_s + ['::blt::table', 'cget', win, id[1]] + end + private :__item_cget_cmd + + def __item_config_cmd(id) # id := [ container, item, ... ] + container, *items = id + win = (container.kind_of?(TkWindow))? container.path: container.to_s + ['::blt::table', 'configure', win, *items] + end + private :__item_config_cmd + + def __item_pathname(id) + win = (id[0].kind_of?(TkWindow))? id[0].path: id[0].to_s + win + ';' + end + private :__item_pathname + + alias __itemcget itemcget + alias __itemcget_strict itemcget_strict + alias __itemconfigure itemconfigure + alias __itemconfiginfo itemconfiginfo + alias __current_itemconfiginfo current_itemconfiginfo + + private :__itemcget, :__itemcget_strict + private :__itemconfigure, :__itemconfiginfo, :__current_itemconfiginfo + + def __boolval_optkeys + super() << 'propagate' + end + private :__boolval_optkeys + + def tagid(tag) + if tag.kind_of?(Array) + case tag[0] + when Integer + # [row, col] + tag.join(',') + when :c, :C, 'c', 'C', :r, :R, 'r', 'R' + # c0 or r1 or C*, and so on + tag.collect{|elem| elem.to_s}.join('') + else + tag + end + elsif tag.kind_of?(TkWindow) + _epath(tag) + else + tag + end + end + + def tagid2obj(tagid) + tagid + end + + ############################################ + + def cget(container, option) + __itemcget([container], option) + end + def cget_strict(container, option) + __itemcget_strict([container], option) + end + + def configure(container, *args) + __itemconfigure([container], *args) + end + + def configinfo(container, *args) + __itemconfiginfo([container], *args) + end + + def current_configinfo(container, *args) + __current_itemconfiginfo([container], *args) + end + + def itemcget(container, item, option) + __itemcget([container, tagid(item)], option) + end + def itemcget_strict(container, item, option) + __itemcget_strict([container, tagid(item)], option) + end + + def itemconfigure(container, *args) + if args[-1].kind_of?(Hash) + # container, item, item, ... , hash_optkeys + keys = args.pop + fail ArgumentError, 'no item is given' if args.empty? + id = [container] + args.each{|item| id << tagid(item)} + __itemconfigure(id, keys) + else + # container, item, item, ... , option, value + val = args.pop + opt = args.pop + fail ArgumentError, 'no item is given' if args.empty? + id = [container] + args.each{|item| id << tagid(item)} + __itemconfigure(id, opt, val) + end + container + end + + def itemconfiginfo(container, *args) + slot = args[-1] + if slot.kind_of?(String) || slot.kind_of?(Symbol) + slot = slot.to_s + if slot[0] == ?. || slot =~ /^\d+,\d+$/ || slot =~ /^(c|C|r|R)(\*|\d+)/ + # widget || row,col || Ci or Ri + slot = nil + else + # option + slot = args.pop + end + else + slot = nil + end + + fail ArgumentError, 'no item is given' if args.empty? + + id = [container] + args.each{|item| id << tagid(item)} + __itemconfiginfo(id, slot) + end + + def current_itemconfiginfo(container, *args) + slot = args[-1] + if slot.kind_of?(String) || slot.kind_of?(Symbol) + slot = slot.to_s + if slot[0] == ?. || slot =~ /^\d+,\d+$/ || slot =~ /^(c|C|r|R)(\*|\d+)/ + # widget || row,col || Ci or Ri + slot = nil + else + # option + slot = args.pop + end + else + slot = nil + end + + fail ArgumentError, 'no item is given' if args.empty? + + id = [container] + args.each{|item| id << tagid(item)} + __current_itemconfiginfo(id, slot) + end + + def info(container) + ret = {} + inf = list(tk_call('::blt::table', 'info', container)) + until inf.empty? + opt = inf.slice!(0..1) + ret[opt[1..-1]] = opt[1] + end + ret + end + + def iteminfo(container, item) + inf = list(tk_call('::blt::table', 'info', container, tagid(item)).chomp) + + ret = [] + until inf.empty? || (inf[0].kind_of?(String) && inf[0] =~ /^-/) + ret << inf.shift + end + + if inf.length > 1 + keys = {} + while inf.length > 1 + opt = inf.slice!(0..1) + keys[opt[0][1..-1]] = opt[1] + end + ret << keys + end + + ret + end + + ############################################ + + def create_container(container) + tk_call('::blt::table', container) + begin + class << container + include Tk::BLT::Table::TableContainer + end + rescue + warn('fail to include TableContainer methods (frozen object?)') + end + container + end + + def add(container, *args) + if args.empty? + tk_call('::blt::table', container) + else + args = args.collect{|arg| + if arg.kind_of?(TkWindow) + _epath(arg) + elsif arg.kind_of?(Array) # index + arg.join(',') + else + arg + end + } + tk_call('::blt::table', container, *args) + end + container + end + + def arrange(container) + tk_call('::blt::table', 'arrange', container) + container + end + + def delete(container, *args) + tk_call('::blt::table', 'delete', container, *args) + end + + def extents(container, item) + ret = [] + inf = list(tk_call('::blt::table', 'extents', container, item)) + ret << inf.slice!(0..4) until inf.empty? + ret + end + + def forget(*wins) + wins = wins.collect{|win| _epath(win)} + tk_call('::blt::table', 'forget', *wins) + end + + def insert(container, *args) + tk_call('::blt::table', 'insert', container, *args) + end + + def insert_before(container, *args) + tk_call('::blt::table', 'insert', container, '-before', *args) + end + + def insert_after(container, *args) + tk_call('::blt::table', 'insert', container, '-after', *args) + end + + def join(container, first, last) + tk_call('::blt::table', 'join', container, first, last) + end + + def locate(container, x, y) + tk_call('::blt::table', 'locate', container, x, y) + end + + def containers(arg={}) + list(tk_call('::blt::table', 'containers', *hash_kv(arg))) + end + + def containers_pattern(pat) + list(tk_call('::blt::table', 'containers', '-pattern', pat)) + end + + def containers_slave(win) + list(tk_call('::blt::table', 'containers', '-slave', win)) + end + + def save(container) + tk_call('::blt::table', 'save', container) + end + + def search(container, keys={}) + list(tk_call('::blt::table', 'containers', *hash_kv(keys))) + end + + def split(container, *args) + tk_call('::blt::table', 'split', container, *args) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabnotebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabnotebook.rb new file mode 100644 index 0000000..510352b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabnotebook.rb @@ -0,0 +1,110 @@ +# +# tkextlib/blt/tabnotebook.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' +require 'tkextlib/blt/tabset.rb' + +module Tk::BLT + class Tabnotebook < Tabset + TkCommandNames = ['::blt::tabnotebook'.freeze].freeze + WidgetClassName = 'Tabnotebook'.freeze + WidgetClassNames[WidgetClassName] = self + + class Tab < Tk::BLT::Tabset::Tab + def self.new(parent, pos=nil, name=nil, keys={}) + if pos.kind_of?(Hash) + keys = pos + name = nil + pos = nil + end + if name.kind_of?(Hash) + keys = name + name = nil + end + obj = nil + TabID_TBL.mutex.synchronize{ + if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name] + obj = TabID_TBL[parent.path][name] + if pos + if pos.to_s == 'end' + obj.move_after('end') + else + obj.move_before(pos) + end + end + obj.configure if keys && ! keys.empty? + else + (obj = self.allocate).instance_eval{ + initialize(parent, pos, name, keys) + TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath] + TabID_TBL[@tpath][@id] = self + } + end + } + obj + end + + def initialize(parent, pos, name, keys) + @t = parent + @tpath = parent.path + if name + @path = @id = name + unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?) + if pos + idx = tk_call(@tpath, 'index', @id) + if pos.to_s == 'end' + tk_call(@tpath, 'move', idx, 'after', 'end') + else + tk_call(@tpath, 'move', idx, 'before', pos) + end + end + tk_call(@tpath, 'tab', 'configure', @id, keys) + else + fail ArgumentError, "can't find tab \"#{@id}\" in #{@t}" + end + else + pos = 'end' unless pos + @path = @id = tk_call(@tpath, 'insert', pos, keys) + end + end + end + + ####################################### + + def get_tab(index) + if (idx = tk_send_without_enc('id', tagindex(index))).empty? + nil + else + Tk::BLT::Tabset::Tab.id2obj(self, idx) + end + end + alias get_id get_tab + + def get_tabobj(index) + if (idx = tk_send_without_enc('id', tagindex(index))).empty? + nil + else + Tk::BLT::Tabnotebook::Tab.new(self, nil, idx) + end + end + + alias index_name index + + def insert(pos=nil, keys={}) + if pos.kind_of?(Hash) + keys = pos + pos = nil + end + pos = 'end' if pos.nil? + Tk::BLT::Tabnotebook::Tab.new(self, nil, + tk_send('insert', tagindex(pos), keys)) + + end + undef :insert_tabs + + undef :tab_pageheight, :tab_pagewidth + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabset.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabset.rb new file mode 100644 index 0000000..b5e076d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tabset.rb @@ -0,0 +1,500 @@ +# +# tkextlib/blt/tabset.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Tabset < TkWindow + class Tab < TkObject + include TkTreatItemFont + + TabID_TBL = TkCore::INTERP.create_table + + (TabsetTab_ID = ['blt_tabset_tab'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + TabID_TBL.mutex.synchronize{ TabID_TBL.clear } + } + + def self.id2obj(tabset, id) + tpath = tabset.path + TabID_TBL.mutex.synchronize{ + if TabID_TBL[tpath] + TabID_TBL[tpath][id]? TabID_TBL[tpath][id]: id + else + id + end + } + end + + def self.new(parent, pos=nil, name=nil, keys={}) + if pos.kind_of?(Hash) + keys = pos + name = nil + pos = nil + end + if name.kind_of?(Hash) + keys = name + name = nil + end + obj = nil + TabID_TBL.mutex.synchronize{ + if name && TabID_TBL[parent.path] && TabID_TBL[parent.path][name] + obj = TabID_TBL[parent.path][name] + if pos + if pos.to_s == 'end' + obj.move_after('end') + else + obj.move_before(pos) + end + end + obj.configure if keys && ! keys.empty? + else + (obj = self.allocate).instance_eval{ + initialize(parent, pos, name, keys) + TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath] + TabID_TBL[@tpath][@id] = self + } + end + } + obj + end + + def initialize(parent, pos, name, keys) + @t = parent + @tpath = parent.path + if name + @path = @id = name + unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?) + if pos + idx = tk_call(@tpath, 'index', '-name', @id) + if pos.to_s == 'end' + tk_call(@tpath, 'move', idx, 'after', 'end') + else + tk_call(@tpath, 'move', idx, 'before', pos) + end + end + tk_call(@tpath, 'tab', 'configure', @id, keys) + else + pos = 'end' unless pos + tk_call(@tpath, 'insert', pos, @id, keys) + end + else + pos = 'end' unless pos + TabsetTab_ID.mutex.synchronize{ + @path = @id = TabsetTab_ID.join(TkCore::INTERP._ip_id_) + TabsetTab_ID[1].succ! + } + tk_call(@tpath, 'insert', pos, @id, keys) + end + end + + #def bind(context, cmd=Proc.new, *args) + # @t.tab_bind(@id, context, cmd, *args) + # self + #end + def bind(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @t.tab_bind(@id, context, cmd, *args) + self + end + #def bind_append(context, cmd=Proc.new, *args) + # @t.tab_bind_append(@id, context, cmd, *args) + # self + #end + def bind_append(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @t.tab_bind_append(@id, context, cmd, *args) + self + end + def bind_remove(context) + @t.tab_bind_remove(@id, context) + self + end + def bindinfo(context=nil) + @t.tab_bindinfo(@id, context) + end + + def cget(*args) + @t.tab_cget(@id, *args) + end + def cget_strict(*args) + @t.tab_cget_strict(@id, *args) + end + def configure(*args) + @t.tab_configure(@id, *args) + end + def configinfo(*args) + @t.tab_configinfo(@id, *args) + end + def current_configinfo(*args) + @t.current_tab_configinfo(@id, *args) + end + + def delete() + @t.delete(@id) + TabID_TBL.mutex.synchronize{ + TabID_TBL[@tpath].delete(@id) + } + self + end + + def get_name() + @id.dup + end + + def focus() + @t.focus(self.index) + end + + def index() + @t.index_name(@id) + end + + def invoke() + @t.invoke(self.index) + end + + def move_before(idx) + @t.move_before(self.index, idx) + end + def move_after(idx) + @t.move_after(self.index, idx) + end + + def perforation_highlight(mode) + @t.perforation_highlight(self.index, mode) + end + def perforation_invoke() + @t.perforation_invoke(self.index) + end + + def see() + @t.see(self.index) + end + + def tearoff(name=None) + @t.tab_tearoff(self.index, *args) + end + end + + ######################################## + + class NamedTab < Tab + def self.new(parent, name) + super(parent, nil, name, {}) + end + end + + ######################################## + + include X_Scrollable + include TkItemConfigMethod + + TkCommandNames = ['::blt::tabset'.freeze].freeze + WidgetClassName = 'Tabset'.freeze + WidgetClassNames[WidgetClassName] = self + + def __destroy_hook__ + Tk::BLT::Tabset::Tab::TabID_TBL.mutex.synchronize{ + Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path) + } + end + + ######################################## + + def __boolval_optkeys + super() << 'samewidth' << 'tearoff' + end + private :__strval_optkeys + + def __strval_optkeys + super() << 'tabbackground' << 'tabforeground' + end + private :__strval_optkeys + + def __item_cget_cmd(id) + [self.path, 'tab', 'cget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'tab', 'configure', id] + end + private :__item_config_cmd + + def __item_pathname(tagOrId) + if tagOrId.kind_of?(Tk::BLT::Tabset::Tab) + self.path + ';' + tagOrId.id.to_s + else + self.path + ';' + tagOrId.to_s + end + end + private :__item_pathname + + alias tab_cget itemcget + alias tab_cget_strict itemcget_strict + alias tab_configure itemconfigure + alias tab_configinfo itemconfiginfo + alias current_tab_configinfo current_itemconfiginfo + + def __item_strval_optkeys(id) + super(id) << 'shadow' + end + private :__item_strval_optkeys + + def tagid(tab) + if tab.kind_of?(Tk::BLT::Tabset::Tab) + tab.id + else + tab + end + end + + def tagindex(tab) + if tab.kind_of?(Tk::BLT::Tabset::Tab) + tab.index + else + tab + end + end + + ######################################## + + def activate(index) + tk_send('activate', tagindex(index)) + self + end + alias highlight activate + + #def tabbind(tag, context, cmd=Proc.new, *args) + # _bind([path, "bind", tagid(tag)], context, cmd, *args) + # self + #end + def tabbind(tag, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, "bind", tagid(tag)], context, cmd, *args) + self + end + #def tabbind_append(tag, context, cmd=Proc.new, *args) + # _bind_append([path, "bind", tagid(tag)], context, cmd, *args) + # self + #end + def tabbind_append(tag, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, "bind", tagid(tag)], context, cmd, *args) + self + end + def tabbind_remove(tag, context) + _bind_remove([path, "bind", tagid(tag)], context) + self + end + def tabbindinfo(tag, context=nil) + _bindinfo([path, "bind", tagid(tag)], context) + end + + def delete(first, last=None) + tk_send('delete', tagindex(first), tagindex(last)) + if first.kind_of?(Tk::BLT::Tabset::Tab) + TabID_TBL.mutex.synchronize{ + TabID_TBL[@path].delete(first.id) + } + end + # middle tabs of the range are unknown + if last.kind_of?(Tk::BLT::Tabset::Tab) + TabID_TBL.mutex.synchronize{ + TabID_TBL[@path].delete(last.id) + } + end + self + end + + def focus(index) + tk_send('focus', tagindex(index)) + self + end + + def get_tab(index) + if (idx = tk_send_without_enc('get', tagindex(index))).empty? + nil + else + Tk::BLT::Tabset::Tab.id2obj(self, idx) + end + end + def get_tabobj(index) + if (idx = tk_send_without_enc('get', tagindex(index))).empty? + nil + else + Tk::BLT::Tabset::Tab.new(self, nil, name, {}) + end + end + + def index(str) + num_or_str(tk_send('index', str)) + end + def index_name(tab) + num_or_str(tk_send('index', '-name', tagid(tab))) + end + + def insert(pos, tab, keys={}) + pos = 'end' if pos.nil? + Tk::BLT::Tabset::Tab.new(self, tagindex(pos), tagid(tab), keys) + end + def insert_tabs(pos, *tabs) + pos = 'end' if pos.nil? + if tabs[-1].kind_of?(Hash) + keys = tabs.pop + else + keys = {} + end + fail ArgumentError, 'no tabs is given' if tabs.empty? + tabs.map!{|tab| tagid(tab)} + tk_send('insert', tagindex(pos), *(tabs + [keys])) + tabs.collect{|tab| Tk::BLT::Tabset::Tab.new(self, nil, tagid(tab))} + end + + def invoke(index) + tk_send('invoke', tagindex(index)) + end + + def move_before(index, base_idx) + tk_send('move', tagindex(index), 'before', tagindex(base_idx)) + self + end + def move_after(index, base_idx) + tk_send('move', tagindex(index), 'after', tagindex(base_idx)) + self + end + + def nearest(x, y) + Tk::BLT::Tabset::Tab.id2obj(self, num_or_str(tk_send_without_enc('nearest', x, y))) + end + + def perforation_activate(mode) + tk_send('perforation', 'activate', mode) + self + end + def perforation_highlight(index, *args) + if args.empty? + # index --> mode + tk_send('perforation', 'highlight', index) + elsif args.size == 1 + # args[0] --> mode + tk_send('perforation', 'highlight', tagindex(index), args[0]) + else # Error: call to get Tcl's error message + tk_send('perforation', 'highlight', tagindex(index), *args) + end + self + end + def perforation_invoke(index=nil) + if index + tk_send('perforation', 'invoke', tagindex(index)) + else + tk_send('perforation', 'invoke') + end + end + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + + def see(index) + tk_send('see', tagindex(index)) + self + end + + def size() + number(tk_send_without_enc('size')) + end + + def select(index) + tk_send('select', tagindex(index)) + self + end + + def tab_dockall + tk_send('tab', 'dockall') + self + end + + def tab_names(pat=None) + simplelist(tk_send('tab', 'names', pat)).collect{|name| + Tk::BLT::Tabset::Tab.id2obj(self, name) + } + end + + def tab_objs(pat=None) + simplelist(tk_send('tab', 'names', pat)).collect{|name| + Tk::BLT::Tabset::Tab.new(self, nil, name, {}) + } + end + + def tab_ids(pat=None) + simplelist(tk_send('tab', 'names', pat)) + end + + def tab_pageheight + number(tk_send('tab', 'pageheight')) + end + + def tab_pagewidth + number(tk_send('tab', 'pagewidth')) + end + + def tab_tearoff(index, parent=None) + window(tk_send('tab', 'tearoff', tagindex(index), parent)) + end + + def xscrollcommand(cmd=Proc.new) + configure_cmd 'scrollcommand', cmd + self + end + alias scrollcommand xscrollcommand + + def xview(*index) + if index.empty? + list(tk_send_without_enc('view')) + else + tk_send_without_enc('view', *index) + self + end + end + alias view xview + alias view_moveto xview_moveto + alias view_scroll xview_scroll + + alias scrollbar xscrollbar + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/ted.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/ted.rb new file mode 100644 index 0000000..670265f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/ted.rb @@ -0,0 +1,65 @@ +# +# tkextlib/blt/ted.rb +# +# *** This is alpha version, because there is no document on BLT. *** +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module Ted + extend TkCore + + TkCommandNames = ['::blt::ted'.freeze].freeze + + ############################## + + extend TkItemConfigMethod + + class << self + def __item_cget_cmd(id) + ['::blt::ted', 'cget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + ['::blt::ted', 'configure', id] + end + private :__item_config_cmd + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + def cget(master, option) + itemcget(master, option) + end + def cget_strict(master, option) + itemcget_strict(master, option) + end + def configure(master, slot, value=None) + itemconfigure(master, slot, value) + end + def configinfo(master, slot=nil) + itemconfiginfo(master, slot) + end + def current_configinfo(master, slot=nil) + current_itemconfiginfo(master, slot) + end + end + + ############################## + + def self.edit(master, *args) + tk_call('::blt::ted', 'edit', master, *args) + end + def self.rep(master, *args) + tk_call('::blt::ted', 'rep', master, *args) + end + def self.select(master, *args) + tk_call('::blt::ted', 'select', master, *args) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile.rb new file mode 100644 index 0000000..5f5242f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile.rb @@ -0,0 +1,21 @@ +# +# tkextlib/blt/tile.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module Tile + autoload :Button, 'tkextlib/blt/tile/button.rb' + autoload :CheckButton, 'tkextlib/blt/tile/checkbutton.rb' + autoload :Checkbutton, 'tkextlib/blt/tile/checkbutton.rb' + autoload :Radiobutton, 'tkextlib/blt/tile/radiobutton.rb' + autoload :RadioButton, 'tkextlib/blt/tile/radiobutton.rb' + autoload :Frame, 'tkextlib/blt/tile/frame.rb' + autoload :Label, 'tkextlib/blt/tile/label.rb' + autoload :Scrollbar, 'tkextlib/blt/tile/scrollbar.rb' + autoload :Toplevel, 'tkextlib/blt/tile/toplevel.rb' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/button.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/button.rb new file mode 100644 index 0000000..2e0863c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/button.rb @@ -0,0 +1,16 @@ +# +# tkextlib/blt/tile/button.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/button' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class Button < Tk::Button + TkCommandNames = ['::blt::tile::button'.freeze].freeze + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb new file mode 100644 index 0000000..da230b5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/checkbutton.rb @@ -0,0 +1,17 @@ +# +# tkextlib/blt/tile/checkbutton.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/checkbutton' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class CheckButton < Tk::CheckButton + TkCommandNames = ['::blt::tile::checkbutton'.freeze].freeze + end + Checkbutton = CheckButton + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/frame.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/frame.rb new file mode 100644 index 0000000..5434af4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/frame.rb @@ -0,0 +1,16 @@ +# +# tkextlib/blt/tile/frame.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class Frame < Tk::Frame + TkCommandNames = ['::blt::tile::frame'.freeze].freeze + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/label.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/label.rb new file mode 100644 index 0000000..f370c14 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/label.rb @@ -0,0 +1,16 @@ +# +# tkextlib/blt/tile/label.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/label' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class Label < Tk::Label + TkCommandNames = ['::blt::tile::label'.freeze].freeze + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb new file mode 100644 index 0000000..814f9a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/radiobutton.rb @@ -0,0 +1,17 @@ +# +# tkextlib/blt/tile/radiobutton.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/radiobutton' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class RadioButton < Tk::RadioButton + TkCommandNames = ['::blt::tile::radiobutton'.freeze].freeze + end + Radiobutton = RadioButton + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb new file mode 100644 index 0000000..2ae871d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/scrollbar.rb @@ -0,0 +1,16 @@ +# +# tkextlib/blt/tile/scrollbar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/scrollbar' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class Scrollbar < Tk::Scrollbar + TkCommandNames = ['::blt::tile::scrollbar'.freeze].freeze + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/toplevel.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/toplevel.rb new file mode 100644 index 0000000..76d5f86 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tile/toplevel.rb @@ -0,0 +1,16 @@ +# +# tkextlib/blt/tile/toplevel.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/toplevel' +require 'tkextlib/blt/tile.rb' + +module Tk::BLT + module Tile + class Toplevel < Tk::Toplevel + TkCommandNames = ['::blt::tile::toplevel'.freeze].freeze + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tree.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tree.rb new file mode 100644 index 0000000..77b85f1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/tree.rb @@ -0,0 +1,1058 @@ +# +# tkextlib/blt/tree.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Tree < TkObject + TkCommandNames = ['::blt::tree'.freeze].freeze + + ################################### + + class Node < TkObject + TreeNodeID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + TreeNodeID_TBL.mutex.synchronize{ TreeNodeID_TBL.clear } + } + + def self.id2obj(tree, id) + tpath = tree.path + TreeNodeID_TBL.mutex.synchronize{ + if TreeNodeID_TBL[tpath] + if TreeNodeID_TBL[tpath][id] + TreeNodeID_TBL[tpath][id] + else + begin + # self.new(tree, nil, 'node'=>Integer(id)) + id = Integer(id) + if bool(tk_call(@tpath, 'exists', id)) + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = tpath + @path = @id = id + TreeNodeID_TBL[@tpath] = {} unless TreeNodeID_TBL[@tpath] + TreeNodeID_TBL[@tpath][@id] = self + } + obj + else + id + end + rescue + id + end + end + else + id + end + } + end + + def self.new(tree, parent, keys={}) + keys = _symbolkey2str(keys) + tpath = tree.path + + TreeNodeID_TBL.mutex.synchronize{ + TreeNodeID_TBL[tpath] ||= {} + if (id = keys['node']) && (obj = TreeNodeID_TBL[tpath][id]) + keys.delete('node') + tk_call(tree.path, 'move', id, parent, keys) if parent + return obj + end + + (obj = self.allocate).instance_eval{ + initialize(tree, parent, keys) + TreeNodeID_TBL[tpath][@id] = self + } + obj + } + end + + def initialize(tree, parent, keys={}) + @parent = @tree = tree + @tpath = @parent.path + + if (id = keys['node']) && bool(tk_call(@tpath, 'exists', id)) + @path = @id = id + keys.delete('node') + tk_call(@tpath, 'move', @id, parent, keys) if parent + else + parent = tk_call(@tpath, 'root') unless parent + @path = @id = tk_call(@tpath, 'insert', parent, keys) + end + end + + def id + @id + end + + def apply(keys={}) + @tree.apply(@id, keys) + self + end + + def children() + @tree.children(@id) + end + + def copy(parent, keys={}) + @tree.copy(@id, parent, keys) + end + def copy_to(dest_tree, parent, keys={}) + @tree.copy_to(@id, dest_tree, parent, keys) + end + + def degree() + @tree.degree(@id) + end + + def delete() + @tree.delete(@id) + self + end + + def depth() + @tree.depth(@id) + end + + def dump() + @tree.dump(@id) + end + + def dump_to_file(file) + @tree.dump_to_file(@id, file) + self + end + + def exist?(keys={}) + @tree.exist?(@id, keys) + end + + def find(keys={}) + @tree.find(@id, keys) + end + + def find_child(label) + @tree.find_child(@id, label) + end + + def first_child() + @tree.first_child(@id) + end + + def get() + @tree.get(@id) + end + def get_value(key, default_val=None) + @tree.get_value(@id, key, default_val) + end + + def index() + @tree.index(@id) + end + + def leaf?() + @tree.leaf?(@id) + end + def link?() + @tree.link?(@id) + end + def root?() + @tree.root?(@id) + end + + def keys() + @tree.keys(@id) + end + + def label(text = nil) + @tree.label(@id, nil) + end + def label=(text) + @tree.label(@id, text) + end + + def last_child() + @tree.last_child(@id) + end + + def move(dest, keys={}) + @tree.keys(@id, dest, keys) + self + end + + def next() + @tree.next(@id) + end + + def next_sibling() + @tree.next_sibling(@id) + end + + def parent() + @tree.parent(@id) + end + + def fullpath() + @tree.fullpath(@id) + end + + def position() + @tree.position(@id) + end + + def previous() + @tree.previous(@id) + end + + def prev_sibling() + @tree.prev_sibling(@id) + end + + def restore(str, keys={}) + @tree.restore(@id, str, keys) + self + end + def restore_overwrite(str, keys={}) + @tree.restore_overwrite(@id, str, keys) + self + end + + def restore_from_file(file, keys={}) + @tree.restore_from_file(@id, file, keys) + self + end + def restore_overwrite_from_file(file, keys={}) + @tree.restore_overwrite_from_file(@id, file, keys) + self + end + + def root() + @tree.root(@id) + self + end + + def set(data) + @tree.set(@id, data) + self + end + + def size() + @tree.size(@id) + end + + def sort(keys={}) + @tree.sort(@id, keys) + self + end + + def type(key) + @tree.type(@id, key) + end + + def unset(*keys) + @tree.unset(@id, *keys) + self + end + + def values(key=None) + @tree.values(@id, key) + end + end + + ################################### + + class Tag < TkObject + TreeTagID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear } + } + + (TreeTag_ID = ['blt_tree_tag'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + def self.id2obj(tree, id) + tpath = tree.path + TreeTagID_TBL.mutex.synchronize{ + if TreeTagID_TBL[tpath] + if TreeTagID_TBL[tpath][id] + TreeTagID_TBL[tpath][id] + else + begin + # self.new(tree, id) + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = id.dup.freeze if id + TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] + TreeTagID_TBL[@tpath][@id] = self + } + obj + rescue + id + end + end + else + id + end + } + end + + def initialize(tree, tag_str = nil) + @parent = @tree = tree + @tpath = @parent.path + + if tag_str + @path = @id = tag_str.dup.freeze + else + TreeTag_ID.mutex.synchronize{ + @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_) + TreeTag_ID[1].succ! + } + end + TreeTagID_TBL.mutex.synchronize{ + TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] + TreeTagID_TBL[@tpath][@id] = self + } + end + + def id + @id + end + + def add(*nodes) + tk_call(@tpath, 'tag', 'add', @id, *nodes) + self + end + + def delete(*nodes) + tk_call(@tpath, 'tag', 'delete', @id, *nodes) + self + end + + def forget() + tk_call(@tpath, 'tag', 'forget', @id) + TreeTagID_TBL.mutex.synchronize{ + TreeTagID_TBL[@tpath].delete(@id) + } + self + end + + def nodes() + simplelist(tk_call(@tpath, 'tag', 'nodes', @id)).collect{|node| + Tk::BLT::Tree::Node.id2obj(@path, node) + } + end + + def set(node) + tk_call(@tpath, 'tag', 'set', node, @id) + self + end + + def unset(node) + tk_call(@tpath, 'tag', 'unset', node, @id) + self + end + end + + ################################### + + class Notify < TkObject + NotifyID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + NotifyID_TBL.mutex.synchronize{ NotifyID_TBL.clear } + } + + def self.id2obj(tree, id) + tpath = tree.path + NotifyID_TBL.mutex.synchronize{ + if NotifyID_TBL[tpath] + if NotifyID_TBL[tpath][id] + NotifyID_TBL[tpath][id] + else + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = id + NotifyID_TBL[@tpath] ||= {} + NotifyID_TBL[@tpath][@id] = self + } + obj + end + else + return id + end + } + end + + def self.new(tree, *args, &b) + NotifyID_TBL.mutex.synchronize{ + if tree.kind_of?(Array) + # not create + tpath = tree[0].path + NotifyID_TBL[tpath] ||= {} + unless (obj = NotifyID_TBL[tpath][tree[1]]) + (NotifyID_TBL[tpath][tree[1]] = + obj = self.allocate).instance_eval{ + @parent = @tree = tree[0] + @tpath = @parent.path + @path = @id = tree[1] + } + end + return obj + end + + (obj = self.allocate).instance_eval{ + initialize(tree, *args, &b) + NotifyID_TBL[@tpath] ||= {} + NotifyID_TBL[@tpath][@id] = self + } + return obj + } + end + + def initialize(tree, *args, &b) + @parent = @tree = tree + @tpath = @parent.path + + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) + cmd = args.shift + # elsif args[-1].kind_of?(Proc) || args[-1].kind_of?(Method) + elsif TkComm._callback_entry?(args[-1]) + cmd = args.pop + elsif b + cmd = Proc.new(&b) + else + fail ArgumentError, "lack of 'command' argument" + end + + args = args.collect{|arg| '-' << arg.to_s} + + args << proc{|id, type| + cmd.call(Tk::BLT::Tree::Node.id2obj(@tree, id), + ((type[0] == ?-)? type[1..-1]: type)) + } + + @path = @id = tk_call(@tpath, 'notify', 'create', *args) + end + + def id + @id + end + + def delete() + tk_call(@tpath, 'notify', 'delete', @id) + NotifyID_TBL.mutex.synchronize{ + NotifyID_TBL[@tpath].delete(@id) + } + self + end + + def info() + lst = simplelist(tk_call(@tpath, 'notify', 'info', id)) + lst[0] = Tk::BLT::Tree::Notify.id2obj(@tree, lst[0]) + lst[1] = simplelist(lst[1]).collect{|flag| flag[1..-1]} + lst[2] = tk_tcl2ruby(lst[2]) + lst + end + end + + ################################### + + class Trace < TkObject + TraceID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + TraceID_TBL.mutex.synchronize{ TraceID_TBL.clear } + } + + def self.id2obj(tree, id) + tpath = tree.path + TraceID_TBL.mutex.synchronize{ + if TraceID_TBL[tpath] + if TraceID_TBL[tpath][id] + TraceID_TBL[tpath][id] + else + begin + # self.new([tree, id]) + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = node # == traceID + TraceID_TBL[@tpath] ||= {} + TraceID_TBL[@tpath][@id] = self + } + obj + rescue + id + end + end + else + id + end + } + end + + def self.new(tree, *args, &b) + TraceID_TBL.mutex.synchronize{ + if tree.kind_of?(Array) + # not create + tpath = tree[0].path + TraceID_TBL[tpath] ||= {} + unless (obj = TraceID_TBL[tpath][tree[1]]) + (TraceID_TBL[tpath][tree[1]] = + obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = tree[1] # == traceID + } + end + return obj + end + + # super(true, tree, *args, &b) + (obj = self.allocate).instance_eval{ + initialize(tree, *args, &b) + TraceID_TBL[@tpath] ||= {} + TraceID_TBL[@tpath][@id] = self + } + return obj + } + end + + def initialize(tree, node, key, opts, cmd=nil, &b) + @parent = @tree = tree + @tpath = @parent.path + + if !cmd + if b + cmd = Proc.new(&b) + else + fail ArgumentError, "lack of 'command' argument" + end + end + + @path = @id = tk_call(@tpath, 'trace', 'create', node, key, opts, + proc{|t, id, k, ops| + tobj = Tk::BLT::Tree.id2obj(t) + if tobj.kind_of?(Tk::BLT::Tree) + nobj = Tk::BLT::Tree::Node.id2obj(tobj, id) + else + nobj = id + end + cmd.call(tobj, nobj, k, ops) + }) + end + + def id + @id + end + + def delete() + tk_call(@tpath, 'trace', 'delete', @id) + TraceID_TBL.mutex.synchronize{ + TraceID_TBL[tpath].delete(@id) + } + self + end + + def info() + lst = simplelist(tk_call(@tpath, 'trace', 'info', id)) + lst[0] = Tk::BLT::Tree::Trace.id2obj(@tree, lst[0]) + lst[2] = simplelist(lst[2]) + lst[3] = tk_tcl2ruby(lst[3]) + lst + end + end + + ################################### + + TreeID_TBL = TkCore::INTERP.create_table + + (Tree_ID = ['blt_tree'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + def __keyonly_optkeys + { + # apply / find command + 'invert'=>nil, 'leafonly'=>nil, 'nocase'=>nil, + + # apply / find / sort command + 'path'=>nil, + + # copy / restore / restorefile command + 'overwrite'=>nil, + + # copy command + 'recurse'=>nil, 'tags'=>nil, + + # sort command + 'ascii'=>nil, 'decreasing'=>nil, 'disctionary'=>nil, + 'integer'=>nil, 'real'=>nil, 'recurse'=>nil, 'reorder'=>nil, + } + end + + def self.id2obj(id) + TreeID_TBL.mutex.synchronize{ + TreeID_TBL[id]? TreeID_TBL[id]: id + } + end + + def self.names(pat = None) + simplelist(tk_call('::blt::tree', 'names', pat)).collect{|name| + id2obj(name) + } + end + + def self.destroy(*names) + tk_call('::blt::tree', 'destroy', + *(names.collect{|n| (n.kind_of?(Tk::BLT::Tree))? n.id: n }) ) + end + + def self.new(name = nil) + TreeID_TBL.mutex.synchronize{ + if name && TreeID_TBL[name] + TreeID_TBL[name] + else + (obj = self.allocate).instance_eval{ + initialize(name) + TreeID_TBL[@id] = self + } + obj + end + } + end + + def initialzie(name = nil) + if name + @path = @id = name + else + Tree_ID.mutex.synchronize{ + @path = @id = Tree_ID.join(TkCore::INTERP._ip_id_) + Tree_ID[1].succ! + } + end + + tk_call('::blt::tree', 'create', @id) + end + + def __destroy_hook__ + Tk::BLT::Tree::Node::TreeNodeID_TBL.mutex.synchronize{ + Tk::BLT::Tree::Node::TreeNodeID_TBL.delete(@path) + } + Tk::BLT::Tree::Tag::TreeTagID_TBL.mutex.synchronize{ + Tk::BLT::Tree::Tag::TreeTagID_TBL.delete(@path) + } + Tk::BLT::Tree::Notify::NotifyID_TBL.mutex.synchronize{ + Tk::BLT::Tree::Notify::NotifyID_TBL.delete(@path) + } + Tk::BLT::Tree::Trace::TraceID_TBL.mutex.synchronize{ + Tk::BLT::Tree::Trace::TraceID_TBL.delete(@path) + } + end + + def tagid(tag) + if tag.kind_of?(Tk::BLT::Tree::Node) || + tag.kind_of?(Tk::BLT::Tree::Tag) || + tag.kind_of?(Tk::BLT::Tree::Notify) || + tag.kind_of?(Tk::BLT::Tree::Trace) + tag.id + else + tag # maybe an Array of configure paramters + end + end + + def destroy() + tk_call('::blt::tree', 'destroy', @id) + self + end + + def ancestor(node1, node2) + Tk::BLT::Tree::Node.id2obj(self, tk_call('::blt::tree', 'ancestor', + tagid(node1), tagid(node2))) + end + + def apply(node, keys={}) + tk_call('::blt::tree', 'apply', tagid(node), __conv_keyonly_opts(keys)) + self + end + + def attach(tree_obj) + tk_call('::blt::tree', 'attach', tree_obj) + self + end + + def children(node) + simplelist(tk_call('::blt::tree', 'children', tagid(node))).collect{|n| + Tk::BLT::Tree::Node.id2obj(self, n) + } + end + + def copy(src, parent, keys={}) + id = tk_call('::blt::tree', 'copy', tagid(src), tagid(parent), + __conv_keyonly_opts(keys)) + Tk::BLT::Tree::Node.new(self, nil, 'node'=>id) + end + def copy_to(src, dest_tree, parent, keys={}) + return copy(src, parent, keys={}) unless dest_tree + + id = tk_call('::blt::tree', 'copy', tagid(src), dest_tree, + tagid(parent), __conv_keyonly_opts(keys)) + Tk::BLT::Tree::Node.new(dest_tree, nil, 'node'=>id) + end + + def degree(node) + number(tk_call('::blt::tree', 'degree', tagid(node))) + end + + def delete(*nodes) + tk_call('::blt::tree', 'delete', *(nodes.collect{|node| tagid(node)})) + Tk::BLT::Tree::Node::TreeNodeID_TBL.mutex.synchronize{ + nodes.each{|node| + if node.kind_of?(Tk::BLT::Tree::Node) + Tk::BLT::Tree::Node::TreeNodeID_TBL[@path].delete(node.id) + else + Tk::BLT::Tree::Node::TreeNodeID_TBL[@path].delete(node.to_s) + end + } + } + self + end + + def depth(node) + number(tk_call('::blt::tree', 'depth', tagid(node))) + end + + def dump(node) + simplelist(tk_call('::blt::tree', 'dump', tagid(node))).collect{|n| + simplelist(n) + } + end + + def dump_to_file(node, file) + tk_call('::blt::tree', 'dumpfile', tagid(node), file) + self + end + + def exist?(node, key=None) + bool(tk_call('::blt::tree', 'exists', tagid(node), key)) + end + + def find(node, keys={}) + simplelist(tk_call('::blt::tree', 'find', tagid(node), + __conv_keyonly_opts(keys))).collect{|n| + Tk::BLT::Tree::Node.id2obj(self, n) + } + end + + def find_child(node, label) + ret = tk_call('::blt::tree', 'findchild', tagid(node), label) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def first_child(node) + ret = tk_call('::blt::tree', 'firstchild', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def get(node) + Hash[*simplelist(tk_call('::blt::tree', 'get', tagid(node)))] + end + def get_value(node, key, default_val=None) + tk_call('::blt::tree', 'get', tagid(node), key, default_val) + end + + def index(node) + Tk::BLT::Tree::Node.id2obj(self, + tk_call('::blt::tree', 'index', tagid(node))) + end + + def insert(parent, keys={}) + id = tk_call('::blt::tree', 'insert', tagid(parent), keys) + Tk::BLT::Tree::Node.new(self, nil, 'node'=>id) + end + + def ancestor?(node1, node2) + bool(tk_call('::blt::tree', 'is', 'ancestor', + tagid(node1), tagid(node2))) + end + def before?(node1, node2) + bool(tk_call('::blt::tree', 'is', 'before', + tagid(node1), tagid(node2))) + end + def leaf?(node) + bool(tk_call('::blt::tree', 'is', 'leaf', tagid(node))) + end + def link?(node) + bool(tk_call('::blt::tree', 'is', 'link', tagid(node))) + end + def root?(node) + bool(tk_call('::blt::tree', 'is', 'root', tagid(node))) + end + + def keys(node, *nodes) + if nodes.empty? + simplelist(tk_call('blt::tree', 'keys', tagid(node))) + else + simplelist(tk_call('blt::tree', 'keys', tagid(node), + *(nodes.collect{|n| tagid(n)}))).collect{|lst| + simplelist(lst) + } + end + end + + def label(node, text=nil) + if text + tk_call('::blt::tree', 'label', tagid(node), text) + text + else + tk_call('::blt::tree', 'label', tagid(node)) + end + end + + def last_child(node) + ret = tk_call('::blt::tree', 'lastchild', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def link(parent, node, keys={}) + ret = tk_call('::blt::tree', 'link', tagid(parent), tagid(node), + __conv_keyonly_opts(keys)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def move(node, dest, keys={}) + tk_call('::blt::tree', 'move', tagid(node), tagid(dest), keys) + self + end + + def next(node) + ret = tk_call('::blt::tree', 'next', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def next_sibling(node) + ret = tk_call('::blt::tree', 'nextsibling', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def notify_create(*args, &b) + Tk::BLT::Tree::Notify.new(self, *args, &b) + end + + def notify_delete(id) + if id.kind_of?(Tk::BLT::Tree::Notify) + id.delete + else + tk_call(@path, 'notify', 'delete', id) + Tk::BLT::Tree::Notify::NotifyID_TBL.mutex.synchronize{ + Tk::BLT::Tree::Notify::NotifyID_TBL[@path].delete(id.to_s) + } + end + self + end + + def notify_info(id) + lst = simplelist(tk_call(@path, 'notify', 'info', tagid(id))) + lst[0] = Tk::BLT::Tree::Notify.id2obj(self, lst[0]) + lst[1] = simplelist(lst[1]).collect{|flag| flag[1..-1]} + lst[2] = tk_tcl2ruby(lst[2]) + lst + end + + def notify_names() + tk_call(@path, 'notify', 'names').collect{|id| + Tk::BLT::Tree::Notify.id2obj(self, id) + } + end + + def parent(node) + ret = tk_call('::blt::tree', 'parent', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def fullpath(node) + tk_call('::blt::tree', 'path', tagid(node)) + end + + def position(node) + number(tk_call('::blt::tree', 'position', tagid(node))) + end + + def previous(node) + ret = tk_call('::blt::tree', 'previous', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def prev_sibling(node) + ret = tk_call('::blt::tree', 'prevsibling', tagid(node)) + (ret == '-1')? nil: Tk::BLT::Tree::Node.id2obj(self, ret) + end + + def restore(node, str, keys={}) + tk_call('::blt::tree', 'restore', tagid(node), str, + __conv_keyonly_opts(keys)) + self + end + def restore_overwrite(node, str, keys={}) + keys = __conv_keyonly_opts(keys) + keys.delete('overwrite') + keys.delete(:overwrite) + tk_call('::blt::tree', 'restore', tagid(node), str, '-overwrite', keys) + self + end + + def restore_from_file(node, file, keys={}) + tk_call('::blt::tree', 'restorefile', tagid(node), file, + __conv_keyonly_opts(keys)) + self + end + def restore_overwrite_from_file(node, file, keys={}) + keys = __conv_keyonly_opts(keys) + keys.delete('overwrite') + keys.delete(:overwrite) + tk_call('::blt::tree', 'restorefile', tagid(node), file, + '-overwrite', keys) + self + end + + def root(node=None) + Tk::BLT::Tree::Node.id2obj(self, tk_call('::blt::tree', 'root', + tagid(node))) + end + + def set(node, data) + unless data.kind_of?(Hash) + fail ArgumentError, 'Hash is expected for data' + end + args = [] + data.each{|k, v| args << k << v} + tk_call('::blt::tree', 'set', tagid(node), *args) + self + end + + def size(node) + number(tk_call('::blt::tree', 'size', tagid(node))) + end + + def sort(node, keys={}) + tk_call('::blt::tree', 'sort', tagid(node), __conv_keyonly_opts(keys)) + self + end + + def tag_add(tag, *nodes) + tk_call(@path, 'tag', 'add', tagid(tag), *(nodes.collect{|n| tagid(n)})) + self + end + + def tag_delete(tag, *nodes) + tk_call(@path, 'tag', 'delete', tagid(tag), + *(nodes.collect{|n| tagid(n)})) + self + end + + def tag_forget(tag) + tag = tag.id if tag.kind_of?(Tk::BLT::Tree::Tag) + tk_call(@path, 'tag', 'forget', tag) + TreeTagID_TBL.mutex.synchronize{ + TreeTagID_TBL[@path].delete(tag) + } + self + end + + def tag_get(node, *patterns) + simplelist(tk_call(@tpath, 'tag', 'get', tagid(node), + *(patterns.collect{|pat| tagid(pat)}))).collect{|str| + Tk::BLT::Tree::Tag.id2obj(self, str) + } + end + + def tag_names(node = None) + simplelist(tk_call(@tpath, 'tag', 'names', tagid(node))).collect{|str| + Tk::BLT::Tree::Tag.id2obj(self, str) + } + end + + def tag_nodes(tag) + simplelist(tk_call(@tpath, 'tag', 'nodes', tagid(tag))).collect{|node| + Tk::BLT::Tree::Node.id2obj(self, node) + } + end + + def tag_set(node, *tags) + tk_call(@path, 'tag', 'set', tagid(node), *(tags.collect{|t| tagid(t)})) + self + end + + def tag_unset(node, *tags) + tk_call(@path, 'tag', 'unset', tagid(node), + *(tags.collect{|t| tagid(t)})) + self + end + + def trace_create(*args, &b) + Tk::BLT::Tree::Trace.new(self, *args, &b) + end + +=begin + def trace_delete(*args) + args.each{|id| + if id.kind_of?(Tk::BLT::Tree::Trace) + id.delete + else + tk_call(@path, 'trace', 'delete', id) + Tk::BLT::Tree::Trace::TraceID_TBL[@path].delete(id.to_s) + end + self + } + end +=end + def trace_delete(*args) + args = args.collect{|id| tagid(id)} + tk_call(@path, 'trace', 'delete', *args) + Tk::BLT::Tree::Trace::TraceID_TBL.mutex.synchronize{ + args.each{|id| Tk::BLT::Tree::Trace::TraceID_TBL[@path].delete(id.to_s)} + } + self + end + + def trace_info(id) + lst = simplelist(tk_call(@path, 'trace', 'info', tagid(id))) + lst[0] = Tk::BLT::Tree::Trace.id2obj(self, lst[0]) + lst[2] = simplelist(lst[2]) + lst[3] = tk_tcl2ruby(lst[3]) + lst + end + + def trace_names() + tk_call(@path, 'trace', 'names').collect{|id| + Tk::BLT::Tree::Trace.id2obj(self, id) + } + end + + def type(node, key) + tk_call('::blt::tree', 'type', tagid(node), key) + end + + def unset(node, *keys) + tk_call('::blt::tree', 'unset', tagid(node), *keys) + self + end + + def values(node, key=None) + simplelist(tk_call('::blt::tree', 'values', tagid(node), key)) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/treeview.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/treeview.rb new file mode 100644 index 0000000..c5a5697 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/treeview.rb @@ -0,0 +1,1272 @@ +# +# tkextlib/blt/treeview.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' +require 'tk/validation.rb' + +module Tk::BLT + class Treeview < TkWindow + module ConfigMethod + end + + module TagOrID_Methods + end + + class Node < TkObject + end + + class Tag < TkObject + end + end + + class Hiertable < Treeview + end +end + +###################################### + +module Tk::BLT::Treeview::ConfigMethod + include TkItemConfigMethod + + def __item_boolval_optkeys(id) + case id + when Array + # id := [ 'column', name ] + ['edit', 'hide'] + when 'sort' + ['decreasing'] + else + [] + end + end + private :__item_boolval_optkeys + + def __item_strval_optkeys(id) + case id + when Array + # id := [ 'column', name ] + super() << 'titleforeground' << 'titleshadow' + when 'sort' + ['decreasing'] + else + [] + end + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + case id + when 'entry' + ['bindtags'] + else + [] + end + end + private :__item_listval_optkeys + + def __item_cget_cmd(id) + if id.kind_of?(Array) + # id := [ type, name ] + [self.path, id[0], 'cget', id[1]] + else + [self.path, id, 'cget'] + end + end + private :__item_cget_cmd + + def __item_config_cmd(id) + if id.kind_of?(Array) + # id := [ type, name ] + [self.path, id[0], 'configure', id[1]] + else + [self.path, id, 'configure'] + end + end + private :__item_config_cmd + + def __item_pathname(id) + if id.kind_of?(Array) + id = tagid(id[1]) + end + [self.path, id].join(';') + end + private :__item_pathname + + def column_cget(name, option) + itemcget(['column', name], option) + end + def column_cget_strict(name, option) + itemcget_strict(['column', name], option) + end + def column_configure(name, slot, value=None) + itemconfigure(['column', name], slot, value) + end + def column_configinfo(name, slot=nil) + itemconfiginfo(['column', name], slot) + end + def current_column_configinfo(name, slot=nil) + current_itemconfiginfo(['column', name], slot) + end + + def button_cget(option) + itemcget('button', option) + end + def button_cget_strict(option) + itemcget_strict('button', option) + end + def button_configure(slot, value=None) + itemconfigure('button', slot, value) + end + def button_configinfo(slot=nil) + itemconfiginfo('button', slot) + end + def current_button_configinfo(slot=nil) + current_itemconfiginfo('button', slot) + end + + def entry_cget(option) + ret = itemcget('entry', option) + if option == 'bindtags' || option == :bindtags + ret.collect{|tag| TkBindTag.id2obj(tag)} + else + ret + end + end + def entry_cget_strict(option) + ret = itemcget_strict('entry', option) + if option == 'bindtags' || option == :bindtags + ret.collect{|tag| TkBindTag.id2obj(tag)} + else + ret + end + end + def entry_configure(slot, value=None) + itemconfigure('entry', slot, value) + end + def entry_configinfo(slot=nil) + ret = itemconfiginfo('entry', slot) + + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + if slot == 'bindtags' || slot == :bindtags + ret[-2] = ret[-2].collect{|tag| TkBindTag.id2obj(tag)} + ret[-1] = ret[-1].collect{|tag| TkBindTag.id2obj(tag)} + end + else + inf = ret.assoc('bindtags') + inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)} + inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)} + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if (inf = ret['bindtags']) + inf[-2] = inf[-2].collect{|tag| TkBindTag.id2obj(tag)} + inf[-1] = inf[-1].collect{|tag| TkBindTag.id2obj(tag)} + ret['bindtags'] = inf + end + end + + ret + end + def current_entry_configinfo(slot=nil) + ret = current_itemconfiginfo('entry', slot) + + if (val = ret['bindtags']) + ret['bindtags'] = val.collect{|tag| TkBindTag.id2obj(tag)} + end + + ret + end + + def sort_cget(option) + itemcget('sort', option) + end + def sort_cget_strict(option) + itemcget_strict('sort', option) + end + def sort_configure(slot, value=None) + itemconfigure('sort', slot, value) + end + def sort_configinfo(slot=nil) + itemconfiginfo('sort', slot) + end + def current_sort_configinfo(slot=nil) + current_itemconfiginfo('sort', slot) + end + + def text_cget(option) + itemcget('text', option) + end + def text_cget_strict(option) + itemcget_strict('text', option) + end + def text_configure(slot, value=None) + itemconfigure('text', slot, value) + end + def text_configinfo(slot=nil) + itemconfiginfo('text', slot) + end + def current_text_configinfo(slot=nil) + current_itemconfiginfo('text', slot) + end + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +class Tk::BLT::Treeview + TkCommandNames = ['::blt::treeview'.freeze].freeze + WidgetClassName = 'TreeView'.freeze + WidgetClassNames[WidgetClassName] = self + + include Scrollable + include ValidateConfigure + include ItemValidateConfigure + include Tk::BLT::Treeview::ConfigMethod + + ######################## + + def __boolval_optkeys + ['autocreate', 'allowduplicates', 'exportselection', 'flat', 'hideroot', + 'newtags', 'showtitles', 'sortselection'] + end + private :__boolval_optkeys + + def __strval_optkeys + super() + ['focusforeground', 'linecolor', 'separator', 'trim'] + end + private :__strval_optkeys + + ######################## + + class OpenCloseCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?W, ?w, :widget ], + [ ?p, ?s, :name ], + [ ?P, ?s, :fullpath ], + [ ?#, ?x, :node_id ], + nil + ] + + PROC_TBL = [ + [ ?x, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + ['opencommand', 'closecomand'] + end + end + + def __validation_class_list + super() << OpenCloseCommand + end + + Tk::ValidateConfigure.__def_validcmd(binding, OpenCloseCommand) + + ######################## + + def __item_validation_class_list(id) + case id + when 'entry' + super(id) << OpenCloseCommand + else + super(id) + end + end + + Tk::ItemValidateConfigure.__def_validcmd(binding, OpenCloseCommand) + + ######################## + + def __destroy_hook__ + Tk::BLT::Treeview::Node::TreeNodeID_TBL.mutex.synchronize{ + Tk::BLT::Treeview::Node::TreeNodeID_TBL.delete(@path) + } + Tk::BLT::Treeview::Tag::TreeTagID_TBL.mutex.synchronize{ + Tk::BLT::Treeview::Tag::TreeTagID_TBL.delete(@path) + } + end + + def tagid(tag) + if tag.kind_of?(Tk::BLT::Treeview::Node) \ + || tag.kind_of?(Tk::BLT::Treeview::Tag) + tag.id + else + tag # maybe an Array of configure paramters + end + end + private :tagid + + def tagid2obj(tagid) + if tagid.kind_of?(Integer) + Tk::BLT::Treeview::Node.id2obj(self, tagid.to_s) + elsif tagid.kind_of?(String) + if tagid =~ /^\d+$/ + Tk::BLT::Treeview::Node.id2obj(self, tagid) + else + Tk::BLT::Treeview::Tag.id2obj(self, tagid) + end + else + tagid + end + end + + def bbox(*tags) + list(tk_send('bbox', *(tags.collect{|tag| tagid(tag)}))) + end + + def screen_bbox(*tags) + list(tk_send('bbox', '-screen', *(tags.collect{|tag| tagid(tag)}))) + end + + def tag_bind(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([@path, 'bind', tagid(tag)], seq, cmd, *args) + self + end + def tag_bind_append(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([@path, 'bind', tagid(tag)], seq, cmd, *args) + self + end + def tag_bind_remove(tag, seq) + _bind_remove([@path, 'bind', tagid(tag)], seq) + self + end + def tag_bindinfo(tag, seq=nil) + _bindinfo([@path, 'bind', tagid(tag)], seq) + end + + def button_activate(tag) + tk_send('button', 'activate', tagid(tag)) + self + end + + def button_bind(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args) + self + end + def button_bind_append(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args) + self + end + def button_bind_remove(tag, seq) + _bind_remove([@path, 'button', 'bind', tagid(tag)], seq) + self + end + def button_bindinfo(tag, seq=nil) + _bindinfo([@path, 'button', 'bind', tagid(tag)], seq) + end + + def close(*tags) + tk_send('close', *(tags.collect{|tag| tagid(tag)})) + self + end + def close_recurse(*tags) + tk_send('close', '-recurse', *(tags.collect{|tag| tagid(tag)})) + self + end + + def column_activate(column=None) + if column == None + tk_send('column', 'activate') + else + tk_send('column', 'activate', column) + self + end + end + + def column_delete(*fields) + tk_send('column', 'delete', *fields) + self + end + def column_insert(pos, field, *opts) + tk_send('column', 'insert', pos, field, *opts) + self + end + def column_invoke(field) + tk_send('column', 'invoke', field) + self + end + def column_move(name, dest) + tk_send('column', 'move', name, dest) + self + end + def column_names() + simplelist(tk_send('column', 'names')) + end + def column_nearest(x, y=None) + tk_send('column', 'nearest', x, y) + end + + def curselection + simplelist(tk_send('curselection')).collect{|id| tagid2obj(id)} + end + + def delete(*tags) + tk_send('delete', *(tags.collect{|tag| tagid(tag)})) + self + end + + def entry_activate(tag) + tk_send('entry', 'activate', tagid(tag)) + self + end + def entry_children(tag, first=None, last=None) + simplelist(tk_send('entry', 'children', tagid(tag), + first, last)).collect{|id| tagid2obj(id)} + end + def entry_delete(tag, first=None, last=None) + tk_send('entry', 'delete', tagid(tag), first, last) + end + def entry_before?(tag1, tag2) + bool(tk_send('entry', 'isbefore', tagid(tag1), tagid(tag2))) + end + def entry_hidden?(tag) + bool(tk_send('entry', 'ishidden', tagid(tag))) + end + def entry_open?(tag) + bool(tk_send('entry', 'isopen', tagid(tag))) + end + + def entry_size(tag) + number(tk_send('entry', 'size', tagid(tag))) + end + def entry_size_recurse(tag) + number(tk_send('entry', 'size', '-recurse', tagid(tag))) + end + + def _search_flags(keys) + keys = _symbolkey2str(keys) + keys['exact'] = None if keys.delete('exact') + keys['glob'] = None if keys.delete('glob') + keys['regexp'] = None if keys.delete('regexp') + keys['nonmatching'] = None if keys.delete('nonmatching') + end + private :_search_flags + + ################################ + + class FindExecFlagValue < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?W, ?w, :widget ], + [ ?p, ?s, :name ], + [ ?P, ?s, :fullpath ], + [ ?#, ?x, :node_id ], + nil + ] + + PROC_TBL = [ + [ ?x, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + [] + end + end + + def _find_exec_flag_value(val) + if val.kind_of?(Array) + cmd, *args = val + #FindExecFlagValue.new(cmd, args.join(' ')) + FindExecFlagValue.new(cmd, *args) + elsif TkComm._callback_entry?(val) + FindExecFlagValue.new(val) + else + val + end + end + + ################################ + + def find(first, last, keys={}) + keys = _search_flags(keys) + keys['exec'] = _find_exec_flag_value(keys['exec']) if keys.key?('exec') + args = hash_kv(keys) << '--' << tagid(first) << tagid(last) + simplelist(tk_send('find', *args)).collect{|id| tagid2obj(id)} + end + + def tag_focus(tag) + tk_send('focus', tagid(tag)) + self + end + def get(*tags) + simplelist(tk_send('get', *(tags.collect{|tag| tagid(tag)}))) + end + def get_full(*tags) + simplelist(tk_send('get', '-full', *(tags.collect{|tag| tagid(tag)}))) + end + + def hide(*tags) + if tags[-1].kind_of?(Hash) + keys = tags.pop + else + keys = {} + end + keys = _search_flags(keys) + args = hash_kv(keys) << '--' + args.concat(tags.collect{|t| tagid(t)}) + tk_send('hide', *args) + self + end + + def index(str) + tagid2obj(tk_send('index', str)) + end + def index_at(tag, str) + tagid2obj(tk_send('index', '-at', tagid(tag), str)) + end + def index_at_path(tag, str) + tagid2obj(tk_send('index', '-at', tagid(tag), '-path', str)) + end + + def insert(pos, parent=nil, keys={}) + Tk::BLT::Treeview::Node.new(pos, parent, keys) + end + def insert_at(tag, pos, parent=nil, keys={}) + if parent.kind_of?(Hash) + keys = parent + parent = nil + end + + keys = _symbolkey2str(keys) + keys['at'] = tagid(tag) + + Tk::BLT::Treeview::Node.new(pos, parent, keys) + end + + def move_before(tag, dest) + tk_send('move', tagid(tag), 'before', tagid(dest)) + self + end + def move_after(tag, dest) + tk_send('move', tagid(tag), 'after', tagid(dest)) + self + end + def move_into(tag, dest) + tk_send('move', tagid(tag), 'into', tagid(dest)) + self + end + + def nearest(x, y, var=None) + tagid2obj(tk_send('nearest', x, y, var)) + end + + def open(*tags) + tk_send('open', *(tags.collect{|tag| tagid(tag)})) + self + end + def open_recurse(*tags) + tk_send('open', '-recurse', *(tags.collect{|tag| tagid(tag)})) + self + end + + def range(first, last) + simplelist(tk_send('range', tagid(first), tagid(last))).collect{|id| + tagid2obj(id) + } + end + def range_open(first, last) + simplelist(tk_send('range', '-open', + tagid(first), tagid(last))).collect{|id| + tagid2obj(id) + } + end + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + + def see(tag) + tk_send_without_enc('see', tagid(tag)) + self + end + def see_anchor(anchor, tag) + tk_send_without_enc('see', '-anchor', anchor, tagid(tag)) + self + end + + def selection_anchor(tag) + tk_send_without_enc('selection', 'anchor', tagid(tag)) + self + end + def selection_cancel() + tk_send_without_enc('selection', 'cancel') + self + end + def selection_clear(first, last=None) + tk_send_without_enc('selection', 'clear', tagid(first), tagid(last)) + self + end + def selection_clear_all() + tk_send_without_enc('selection', 'clearall') + self + end + def selection_mark(tag) + tk_send_without_enc('selection', 'mark', tagid(tag)) + self + end + def selection_include?(tag) + bool(tk_send('selection', 'include', tagid(tag))) + end + def selection_present?() + bool(tk_send('selection', 'present')) + end + def selection_set(first, last=None) + tk_send_without_enc('selection', 'set', tagid(first), tagid(last)) + self + end + def selection_toggle(first, last=None) + tk_send_without_enc('selection', 'toggle', tagid(first), tagid(last)) + self + end + + def show(*tags) + if tags[-1].kind_of?(Hash) + keys = tags.pop + else + keys = {} + end + keys = _search_flags(keys) + args = hash_kv(keys) << '--' + args.concat(tags.collect{|t| tagid(t)}) + tk_send('show', *args) + self + end + + def sort_auto(mode) + tk_send('sort', 'auto', mode) + self + end + def sort_auto=(mode) + tk_send('sort', 'auto', mode) + mode + end + def sort_auto? + bool(tk_send('sort', 'auto')) + end + def sort_once(*tags) + tk_send('sort', 'once', *(tags.collect{|tag| tagid(tag)})) + self + end + def sort_once_recurse(*tags) + tk_send('sort', 'once', '-recurse', *(tags.collect{|tag| tagid(tag)})) + self + end + + def tag_add(tag, *ids) + tk_send('tag', 'add', tagid(tag), *ids) + self + end + def tag_delete(tag, *ids) + tk_send('tag', 'delete', tagid(tag), *ids) + self + end + def tag_forget(tag) + tk_send('tag', 'forget', tagid(tag)) + self + end + def tag_names(id=nil) + id = (id)? tagid(id): None + + simplelist(tk_send('tag', 'nodes', id)).collect{|tag| + Tk::BLT::Treeview::Tag.id2obj(self, tag) + } + end + def tag_nodes(tag) + simplelist(tk_send('tag', 'nodes', tagid(tag))).collect{|id| + Tk::BLT::Treeview::Node.id2obj(self, id) + } + end + + def text_apply + tk_send('text', 'apply') + self + end + def text_cancel + tk_send('text', 'cancel') + self + end + + def text_delete(first, last) + tk_send('text', 'delete', first, last) + self + end + def text_get(x, y) + tk_send('text', 'get', x, y) + end + def text_get_root(x, y) + tk_send('text', 'get', '-root', x, y) + end + def text_icursor(idx) + tk_send('text', 'icursor', idx) + self + end + def text_index(idx) + num_or_str(tk_send('text', 'index', idx)) + end + def text_insert(idx, str) + tk_send('text', 'insert', idx, str) + self + end + + def text_selection_adjust(idx) + tk_send('text', 'selection', 'adjust', idx) + self + end + def text_selection_clear + tk_send('text', 'selection', 'clear') + self + end + def text_selection_from(idx) + tk_send('text', 'selection', 'from', idx) + self + end + def text_selection_present + num_or_str(tk_send('text', 'selection', 'present')) + end + def text_selection_range(start, last) + tk_send('text', 'selection', 'range', start, last) + self + end + def text_selection_to(idx) + tk_send('text', 'selection', 'to', idx) + self + end + + def toggle(tag) + tk_send('toggle', tagid(tag)) + self + end +end + +###################################### + +module Tk::BLT::Treeview::TagOrID_Methods + def bbox + @tree.bbox(self) + end + def screen_bbox + @tree.screen_bbox(self) + end + + def bind(seq, *args) + @tree.tag_bind(self, seq, *args) + self + end + def bind_append(seq, *args) + @tree.tag_bind_append(self, seq, *args) + self + end + def bind_remove(seq) + @tree.tag_bind_remove(self, seq) + self + end + def bindinfo(seq=nil) + @tree.tag_bindinfo(self, seq) + end + + def button_activate + @tree.button_activate(self) + self + end + + def button_bind(seq, *args) + @tree.button_bind(self, seq, *args) + self + end + def button_bind_append(seq, *args) + @tree.button_bind_append(self, seq, *args) + self + end + def button_bind_remove(seq) + @tree.button_bind_remove(self, seq) + self + end + def button_bindinfo(seq=nil) + @tree.button_bindinfo(self, seq) + end + + def close + @tree.close(self) + self + end + def close_recurse + @tree.close_recurse(self) + self + end + + def delete + @tree.delete(self) + self + end + + def entry_activate + @tree.entry_activate(self) + self + end + def entry_children(first=None, last=None) + @tree.entry_children(self, first, last) + end + def entry_delete(first=None, last=None) + @tree.entry_delete(self, first, last) + end + def entry_before?(tag) + @tree.entry_before?(self, tag) + end + def entry_hidden? + @tree.entry_before?(self) + end + def entry_open? + @tree.entry_open?(self) + end + + def entry_size + @tree.entry_size(self) + end + def entry_size_recurse + @tree.entry_size_recurse(self) + end + + def focus + @tree.tag_focus(self) + self + end + + def get + @tree.get(self) + end + def get_full + @tree.get_full(self) + end + + def hide + @tree.hide(self) + self + end + + def index(str) + @tree.index_at(self, str) + end + def index_path(str) + @tree.index_at_path(self, str) + end + + def insert(pos, parent=nil, keys={}) + @tree.insert_at(self, pos, parent, keys) + end + + def move_before(dest) + @tree.move_before(self, dest) + self + end + def move_after(dest) + @tree.move_after(self, dest) + self + end + def move_into(dest) + @tree.move_into(self, dest) + self + end + + def open + @tree.open(self) + self + end + def open_recurse + @tree.open_recurse(self) + self + end + + def range_to(tag) + @tree.range(self, tag) + end + def range_open_to(tag) + @tree.range(self, tag) + end + + def see + @tree.see(self) + self + end + def see_anchor(anchor) + @tree.see_anchor(anchor, self) + self + end + + def selection_anchor + @tree.selection_anchor(self) + self + end + def selection_clear + @tree.selection_clear(self) + self + end + def selection_mark + @tree.selection_mark(self) + self + end + def selection_include? + @tree.selection_include?(self) + end + def selection_set + @tree.selection_set(self) + self + end + def selection_toggle + @tree.selection_toggle(self) + self + end + + def show + @tree.show(self) + self + end + + def sort_once + @tree.sort_once(self) + self + end + def sort_once_recurse + @tree.sort_once_recurse(self) + self + end + + def toggle + @tree.toggle(self) + self + end +end + +###################################### + +class Tk::BLT::Treeview::Node < TkObject + include Tk::BLT::Treeview::TagOrID_Methods + + TreeNodeID_TBL = TkCore::INTERP.create_table + + (TreeNode_ID = ['blt_treeview_node'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + TreeNodeID_TBL.mutex.synchronize{ TreeNodeID_TBL.clear } + } + + def self.id2obj(tree, id) + tpath = tree.path + TreeNodeID_TBL.mutex.synchronize{ + if TreeNodeID_TBL[tpath] + if TreeNodeID_TBL[tpath][id] + TreeNodeID_TBL[tpath][id] + else + begin + # self.new(tree, nil, nil, 'node'=>Integer(id)) + unless (tk_call(@tpath, 'get', id)).empty? + id = Integer(id) + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = id + TreeNodeID_TBL[@tpath] ||= {} + TreeNodeID_TBL[@tpath][@id] = self + } + obj + else + id + end + rescue + id + end + end + else + id + end + } + end + + def self.new(tree, pos, parent=nil, keys={}) + if parent.kind_of?(Hash) + keys = parent + parent = nil + end + + keys = _symbolkey2str(keys) + tpath = tree.path + + TreeNodeID_TBL.mutex.synchronize{ + TreeNodeID_TBL[tpath] ||= {} + if (id = keys['node']) && (obj = TreeNodeID_TBL[tpath][id]) + keys.delete('node') + tk_call(tree.path, 'move', id, pos, parent) if parent + return obj + end + + #super(tree, pos, parent, keys) + (obj = self.allocate).instance_eval{ + initialize(tree, pos, parent, keys) + TreeNodeID_TBL[tpath][@id] = self + } + obj + } + end + + def initialize(tree, pos, parent, keys) + @parent = @tree = tree + @tpath = @parent.path + + if (id = keys['node']) + # if tk_call(@tpath, 'get', id).empty? + # fail RuntimeError, "not exist the node '#{id}'" + # end + @path = @id = id + tk_call(@tpath, 'move', @id, pos, tagid(parent)) if parent + configure(keys) if keys && ! keys.empty? + else + name = nil + TreeNode_ID.mutex.synchronize{ + name = TreeNode_ID.join(TkCore::INTERP._ip_id_).freeze + TreeNode_ID[1].succ! + } + + at = keys.delete['at'] + + if parent + if parent.kind_of?(Tk::BLT::Treeview::Node) || + parent.kind_of?(Tk::BLT::Treeview::Tag) + path = [get_full(parent.id)[0], name] + at = nil # ignore 'at' option + else + path = [parent.to_s, name] + end + else + path = name + end + + if at + @id = tk_call(@tpath, 'insert', '-at', tagid(at), pos, path, keys) + else + @id = tk_call(@tpath, 'insert', pos, path, keys) + end + @path = @id + end + end + + def id + @id + end +end + +###################################### + +class Tk::BLT::Treeview::Tag < TkObject + include Tk::BLT::Treeview::TagOrID_Methods + + TreeTagID_TBL = TkCore::INTERP.create_table + + (TreeTag_ID = ['blt_treeview_tag'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear } + } + + def self.id2obj(tree, name) + tpath = tree.path + TreeTagID_TBL.mutex.synchronize{ + if TreeTagID_TBL[tpath] + if TreeTagID_TBL[tpath][name] + TreeTagID_TBL[tpath][name] + else + #self.new(tree, name) + (obj = self.allocate).instance_eval{ + @parent = @tree = tree + @tpath = @parent.path + @path = @id = name + TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] + TreeTagID_TBL[@tpath][@id] = self + } + obj + end + else + id + end + } + end + + def self.new_by_name(tree, name, *ids) + TreeTagID_TBL.mutex.synchronize{ + unless (obj = TreeTagID_TBL[tree.path][name]) + (obj = self.allocate).instance_eval{ + initialize(tree, name, ids) + TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] + TreeTagID_TBL[@tpath][@id] = self + } + end + obj + } + end + + def self.new(tree, *ids) + TreeTagID_TBL.mutex.synchronize{ + (obj = self.allocate).instance_eval{ + if tree.kind_of?(Array) + initialize(tree[0], tree[1], ids) + else + initialize(tree, nil, ids) + end + TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] + TreeTagID_TBL[@tpath][@id] = self + } + obj + } + end + + def initialize(tree, name, ids) + @parent = @tree = tree + @tpath = @parent.path + + if name + @path = @id = name + else + TreeTag_ID.mutex.synchronize{ + @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_).freeze + TreeTag_ID[1].succ! + } + end + + unless ids.empty? + tk_call(@tpath, 'tag', 'add', @id, *(ids.collect{|id| tagid(id)})) + end + end + + def tagid(tag) + if tag.kind_of?(Tk::BLT::Treeview::Node) \ + || tag.kind_of?(Tk::BLT::Treeview::Tag) + tag.id + else + tag + end + end + private :tagid + + def id + @id + end + + def add(*ids) + tk_call(@tpath, 'tag', 'add', @id, *(ids{|id| tagid(id)})) + self + end + + def remove(*ids) + tk_call(@tpath, 'tag', 'delete', @id, *(ids{|id| tagid(id)})) + self + end + + def forget + tk_call(@tpath, 'tag', 'forget', @id) + self + end + + def nodes + simplelist(tk_call(@tpath, 'tag', 'nodes', @id)).collect{|id| + Tk::BLT::Treeview::Node.id2obj(@tree, id) + } + end +end + +class Tk::BLT::Hiertable + TkCommandNames = ['::blt::hiertable'.freeze].freeze + WidgetClassName = 'Hiertable'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/unix_dnd.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/unix_dnd.rb new file mode 100644 index 0000000..445002d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/unix_dnd.rb @@ -0,0 +1,135 @@ +# +# tkextlib/blt/unix_dnd.rb +# +# *** This is alpha version, because there is no document on BLT. *** +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module DnD + extend TkCore + + TkCommandNames = ['::blt::dnd'.freeze].freeze + + ############################## + + extend TkItemConfigMethod + + class << self + def __item_cget_cmd(id) + ['::blt::dnd', *id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + ['::blt::dnd', *id] + end + private :__item_config_cmd + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + def cget(win, option) + itemcget(['cget', win], option) + end + def cget_strict(win, option) + itemcget_strict(['cget', win], option) + end + def configure(win, slot, value=None) + itemconfigure(['configure', win], slot, value) + end + def configinfo(win, slot=nil) + itemconfiginfo(['configure', win], slot) + end + def current_configinfo(win, slot=nil) + current_itemconfiginfo(['configure', win], slot) + end + + def token_cget(win, option) + itemcget(['token', 'cget', win], option) + end + def token_cget_strict(win, option) + itemcget_strict(['token', 'cget', win], option) + end + def token_configure(win, slot, value=None) + itemconfigure(['token', 'configure', win], slot, value) + end + def token_configinfo(win, slot=nil) + itemconfiginfo(['token', 'configure', win], slot) + end + def current_token_configinfo(win, slot=nil) + current_itemconfiginfo(['token', 'configure', win], slot) + end + + def token_windowconfigure(win, slot, value=None) + itemconfigure(['token', 'window', win], slot, value) + end + def token_windowconfiginfo(win, slot=nil) + itemconfiginfo(['token', 'window', win], slot) + end + def current_token_windowconfiginfo(win, slot=nil) + current_itemconfiginfo(['token', 'window', win], slot) + end + end + + ############################## + + def self.cancel(win) + tk_call('::blt::dnd', 'cancel', *wins) + end + def self.delete(*wins) + tk_call('::blt::dnd', 'delete', *wins) + end + def self.delete_source(*wins) + tk_call('::blt::dnd', 'delete', '-source', *wins) + end + def self.delete_target(*wins) + tk_call('::blt::dnd', 'delete', '-target', *wins) + end + def self.drag(win, x, y, token=None) + tk_call('::blt::dnd', 'drag', win, x, y, token) + end + def self.drop(win, x, y, token=None) + tk_call('::blt::dnd', 'drop', win, x, y, token) + end + def self.get_data(win, fmt=nil, cmd=nil) + if fmt + tk_call('::blt::dnd', 'getdata', win, fmt, cmd) + else + list(tk_call('::blt::dnd', 'getdata', win)) + end + end + def self.names(pat=None) + list(tk_call('::blt::dnd', 'names', pat)) + end + def self.source_names(pat=None) + list(tk_call('::blt::dnd', 'names', '-source', pat)) + end + def self.target_names(pat=None) + list(tk_call('::blt::dnd', 'names', '-target', pat)) + end + def self.pull(win, fmt) + tk_call('::blt::dnd', 'pull', win, fmt) + end + def self.register(win, keys={}) + tk_call('::blt::dnd', 'register', win, keys) + end + def self.select(win, x, y, timestamp) + tk_call('::blt::dnd', 'select', win, x, y, timestamp) + end + def self.set_data(win, fmt=nil, cmd=nil) + if fmt + tk_call('::blt::dnd', 'setdata', win, fmt, cmd) + else + list(tk_call('::blt::dnd', 'setdata', win)) + end + end + def self.token(*args) + tk_call('::blt::dnd', 'token', *args) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/vector.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/vector.rb new file mode 100644 index 0000000..97fb1b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/vector.rb @@ -0,0 +1,256 @@ +# +# tkextlib/blt/vector.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Vector < TkVariable + TkCommandNames = ['::blt::vector'.freeze].freeze + + def self.create(*args) + tk_call('::blt::vector', 'create', *args) + end + + def self.destroy(*args) + tk_call('::blt::vector', 'destroy', *args) + end + + def self.expr(expression) + tk_call('::blt::vector', 'expr', expression) + end + + def self.names(pat=None) + list = simplelist(tk_call('::blt::vector', 'names', pat)) + TkVar_ID_TBL.mutex.synchronize{ + list.collect{|name| + if TkVar_ID_TBL[name] + TkVar_ID_TBL[name] + elsif name[0..1] == '::' && TkVar_ID_TBL[name[2..-1]] + TkVar_ID_TBL[name[2..-1]] + else + name + end + } + } + end + + #################################### + + def initialize(size=nil, keys={}) + if size.kind_of?(Hash) + keys = size + size = nil + end + if size.kind_of?(Array) + # [first, last] + size = size.join(':') + end + if size + @id = TkCore::INTERP._invoke('::blt::vector', 'create', + "#auto(#{size})", *hash_kv(keys)) + else + @id = TkCore::INTERP._invoke('::blt::vector', 'create', + "#auto", *hash_kv(keys)) + end + + TkVar_ID_TBL.mutex.synchronize{ + TkVar_ID_TBL[@id] = self + } + + @def_default = false + @default_val = nil + + @trace_var = nil + @trace_elem = nil + @trace_opts = nil + + # teach Tk-ip that @id is global var + TkCore::INTERP._invoke_without_enc('global', @id) + end + + def destroy + tk_call('::blt::vector', 'destroy', @id) + end + + def inspect + '#' + end + + def to_s + @id + end + + def *(item) + list(tk_call(@id, '*', item)) + end + + def +(item) + list(tk_call(@id, '+', item)) + end + + def -(item) + list(tk_call(@id, '-', item)) + end + + def /(item) + list(tk_call(@id, '/', item)) + end + + def append(*vectors) + tk_call(@id, 'append', *vectors) + end + + def binread(channel, len=None, keys={}) + if len.kind_of?(Hash) + keys = len + len = None + end + keys = _symbolkey2str(keys) + keys['swap'] = None if keys.delete('swap') + tk_call(@id, 'binread', channel, len, keys) + end + + def clear() + tk_call(@id, 'clear') + self + end + + def delete(*indices) + tk_call(@id, 'delete', *indices) + self + end + + def dup_vector(vec) + tk_call(@id, 'dup', vec) + self + end + + def expr(expression) + tk_call(@id, 'expr', expression) + self + end + + def index(idx, val=None) + number(tk_call(@id, 'index', idx, val)) + end + + def [](idx) + index(idx) + end + + def []=(idx, val) + index(idx, val) + end + + def length() + number(tk_call(@id, 'length')) + end + + def length=(size) + number(tk_call(@id, 'length', size)) + end + + def merge(*vectors) + tk_call(@id, 'merge', *vectors) + self + end + + def normalize(vec=None) + tk_call(@id, 'normalize', vec) + self + end + + def notify(keyword) + tk_call(@id, 'notify', keyword) + self + end + + def offset() + number(tk_call(@id, 'offset')) + end + + def offset=(val) + number(tk_call(@id, 'offset', val)) + end + + def random() + tk_call(@id, 'random') + end + + def populate(vector, density=None) + tk_call(@id, 'populate', vector, density) + self + end + + def range(first, last=None) + list(tk_call(@id, 'range', first, last)) + end + + def search(val1, val2=None) + list(tk_call(@id, 'search', val1, val2)) + end + + def set(item) + tk_call(@id, 'set', item) + self + end + + def seq(start, finish=None, step=None) + tk_call(@id, 'seq', start, finish, step) + self + end + + def sort(*vectors) + tk_call(@id, 'sort', *vectors) + self + end + + def sort_reverse(*vectors) + tk_call(@id, 'sort', '-reverse', *vectors) + self + end + + def split(*vectors) + tk_call(@id, 'split', *vectors) + self + end + + def variable(var) + tk_call(@id, 'variable', var) + self + end + end + + class VectorAccess < Vector + def self.new(name) + TkVar_ID_TBL.mutex.synchronize{ + if TkVar_ID_TBL[name] + TkVar_ID_TBL[name] + else + (obj = self.allocate).instance_eval{ + initialize(name) + TkVar_ID_TBL[@id] = self + } + obj + end + } + end + + def initialize(vec_name) + @id = vec_name + + @def_default = false + @default_val = nil + + @trace_var = nil + @trace_elem = nil + @trace_opts = nil + + # teach Tk-ip that @id is global var + TkCore::INTERP._invoke_without_enc('global', @id) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/watch.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/watch.rb new file mode 100644 index 0000000..219ff78 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/watch.rb @@ -0,0 +1,175 @@ +# +# tkextlib/blt/watch.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Watch < TkObject + extend TkCore + + TkCommandNames = ['::blt::watch'.freeze].freeze + + WATCH_ID_TBL = TkCore::INTERP.create_table + + (BLT_WATCH_ID = ['blt_watch_id'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + WATCH_ID_TBL.mutex.synchronize{ WATCH_ID_TBL.clear } + } + + def self.names(state = None) + lst = tk_split_list(tk_call('::blt::watch', 'names', state)) + WATCH_ID_TBL.mutex.synchronize{ + lst.collect{|name| + WATCH_ID_TBL[name] || name + } + } + end + + def __numval_optkeys + ['maxlevel'] + end + private :__numval_optkeys + + def __boolval_optkeys + ['active'] + end + private :__boolval_optkeys + + def __config_cmd + ['::blt::watch', 'configure', self.path] + end + private :__config_cmd + + def initialize(name = nil, keys = {}) + if name.kind_of?(Hash) + keys = name + name = nil + end + + if name + @id = name.to_s + else + BLT_WATCH_ID.mutex.synchronize{ + @id = BLT_WATCH_ID.join(TkCore::INTERP._ip_id_) + BLT_WATCH_ID[1].succ! + } + end + + @path = @id + + WATCH_ID_TBL.mutex.synchronize{ + WATCH_ID_TBL[@id] = self + } + tk_call('::blt::watch', 'create', @id, *hash_kv(keys)) + end + + def activate + tk_call('::blt::watch', 'activate', @id) + self + end + def deactivate + tk_call('::blt::watch', 'deactivate', @id) + self + end + def delete + tk_call('::blt::watch', 'delete', @id) + self + end + def info + ret = [] + lst = tk_split_simplelist(tk_call('::blt::watch', 'info', @id)) + until lst.empty? + k, v, *lst = lst + k = k[1..-1] + case k + when /^(#{__strval_optkeys.join('|')})$/ + # do nothing + + when /^(#{__numval_optkeys.join('|')})$/ + begin + v = number(v) + rescue + v = nil + end + + when /^(#{__numstrval_optkeys.join('|')})$/ + v = num_or_str(v) + + when /^(#{__boolval_optkeys.join('|')})$/ + begin + v = bool(v) + rescue + v = nil + end + + when /^(#{__listval_optkeys.join('|')})$/ + v = simplelist(v) + + when /^(#{__numlistval_optkeys.join('|')})$/ + v = list(v) + + else + if v.index('{') + v = tk_split_list(v) + else + v = tk_tcl2ruby(v) + end + end + + ret << [k, v] + end + + ret + end + def configinfo(slot = nil) + if slot + slot = slot.to_s + v = cget(slot) + if TkComm::GET_CONFIGINFO_AS_ARRAY + [slot, v] + else + {slot=>v} + end + else + if TkComm::GET_CONFIGINFO_AS_ARRAY + info + else + Hash[*(info.flatten)] + end + end + end + def cget_strict(key) + key = key.to_s + begin + info.assoc(key)[1] + rescue + fail ArgumentError, "unknown option '#{key}'" + end + end + def cget(key) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + cget_strict(key) + else + begin + cget_strict(key) + rescue => e + if current_configinfo.has_key?(key.to_s) + # error on known option + fail e + else + # unknown option + nil + end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/win_printer.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/win_printer.rb new file mode 100644 index 0000000..7ac6a0d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/win_printer.rb @@ -0,0 +1,61 @@ +# +# tkextlib/blt/win_printer.rb +# +# *** Windows only *** +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + class Printer < TkObject + extend TkCore + + TkCommandNames = ['::blt::printer'.freeze].freeze + + def self.enum(attribute) + simplelist(tk_call('::blt::printer', 'enum', attribute)) + end + + def self.names(pat=None) + simplelist(tk_call('::blt::printer', 'names', pat)) + end + + def self.open(printer) + self.new(printer) + end + + ################################# + + def initialize(printer) + @printer_id = tk_call('::blt::printer', 'open', printer) + end + + def close + tk_call('::blt::print', 'close', @printer_id) + self + end + def get_attrs(var) + tk_call('::blt::print', 'getattrs', @printer_id, var) + var + end + def set_attrs(var) + tk_call('::blt::print', 'setattrs', @printer_id, var) + self + end + def snap(win) + tk_call('::blt::print', 'snap', @printer_id, win) + self + end + def write(str) + tk_call('::blt::print', 'write', @printer_id, str) + self + end + def write_with_title(title, str) + tk_call('::blt::print', 'write', @printer_id, title, str) + self + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/winop.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/winop.rb new file mode 100644 index 0000000..e371d28 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/blt/winop.rb @@ -0,0 +1,107 @@ +# +# tkextlib/blt/winop.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/blt.rb' + +module Tk::BLT + module Winop + extend TkCore + + TkCommandNames = ['::blt::winop'.freeze].freeze + end + WinOp = Winop +end + +class << Tk::BLT::Winop + def changes(win) + tk_call('::blt::winop', 'changes', win) + end + + def colormap(win) + Hash[*list(tk_call('::blt::winop', 'colormap', win))] + end + + def convolve(src, dest, filter) + tk_call('::blt::winop', 'convolve', src, dest, filter) + end + + def image_convolve(src, dest, filter) + tk_call('::blt::winop', 'image', 'convolve', src, dest, filter) + end + def image_gradient(photo, left, right, type) + tk_call('::blt::winop', 'image', 'gradient', photo, left, right, type) + end + def image_read_jpeg(file, photo) + tk_call('::blt::winop', 'image', 'readjpeg', file, photo) + end + def image_resample(src, dest, horiz_filter=None, vert_filter=None) + tk_call('::blt::winop', 'image', 'resample', + src, dest, horiz_filter, vert_filter) + end + def image_rotate(src, dest, angle) + tk_call('::blt::winop', 'image', 'rotate', src, dest, angle) + end + def image_snap(win, photo, width=None, height=None) + tk_call('::blt::winop', 'image', 'snap', win, photo, width, height) + end + def image_subsample(src, dest, x, y, width, height, + horiz_filter=None, vert_filter=None) + tk_call('::blt::winop', 'image', 'subsample', + src, dest, x, y, width, height, horiz_filter, vert_filter) + end + + def quantize(src, dest, colors) + tk_call('::blt::winop', 'quantize', src, dest, colors) + end + + def query() + tk_call('::blt::winop', 'query') + end + + def read_jpeg(file, photo) + tk_call('::blt::winop', 'readjpeg', file, photo) + end + + def resample(src, dest, horiz_filter=None, vert_filter=None) + tk_call('::blt::winop', 'resample', + src, dest, horiz_filter, vert_filter) + end + + def subsample(src, dest, x, y, width, height, + horiz_filter=None, vert_filter=None) + tk_call('::blt::winop', 'subsample', + src, dest, x, y, width, height, horiz_filter, vert_filter) + end + + def raise(*wins) + tk_call('::blt::winop', 'raise', *wins) + end + + def lower(*wins) + tk_call('::blt::winop', 'lower', *wins) + end + + def map(*wins) + tk_call('::blt::winop', 'map', *wins) + end + + def unmap(*wins) + tk_call('::blt::winop', 'unmap', *wins) + end + + def move(win, x, y) + tk_call('::blt::winop', 'move', win, x, y) + end + + def snap(win, photo) + tk_call('::blt::winop', 'snap', win, photo) + end + + def warpto(win = None) + tk_call('::blt::winop', 'warpto', win) + end + alias warp_to warpto +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget.rb new file mode 100644 index 0000000..62631d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget.rb @@ -0,0 +1,151 @@ +# +# BWidget extension support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/bwidget/setup.rb' + +# load all image format handlers +#TkPackage.require('BWidget', '1.7') +TkPackage.require('BWidget') + +module Tk + module BWidget + TkComm::TkExtlibAutoloadModule.unshift(self) + + extend TkCore + + LIBRARY = tk_call('set', '::BWIDGET::LIBRARY') + + PACKAGE_NAME = 'BWidget'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('BWidget') + rescue + '' + end + end + + def self.XLFDfont(cmd, *args) + if args[-1].kind_of?(Hash) + keys = args.pop + args.concat(hash_kv(keys)) + end + tk_call('BWidget::XLFDfont', cmd, *args) + end + + def self.assert(exp, msg=None) + tk_call('BWidget::assert', exp, msg) + end + + def self.badOptionString(type, value, list) + tk_call('BWidget::badOptionString', type, value, list) + end + + def self.bindMouseWheel(widget) + tk_call('BWidget::bindMouseWheel', widget) + end + + def self.classes(klass) + list(tk_call('BWidget::classes', klass)) + end + + def self.clonename(menu) + tk_call('BWidget::clonename', menu) + end + + def self.focus(opt, path) + tk_call('BWidget::focus', opt, path) + end + + def self.get3dcolor(path, bgcolor) + tk_call('BWidget::get3dcolor', path, bgcolor) + end + + def self.getname(name) + tk_call('BWidget::getname', name) + end + + def self.grab(opt, path) + tk_call('BWidget::grab', opt, path) + end + + def self.inuse(klass) + bool(tk_call('BWidget::inuse', klass)) + end + + def self.library(klass, *klasses) + tk_call('BWidget::library', klass, *klasses) + end + + def self.lreorder(list, neworder) + tk_call('BWidget::lreorder', list, neworder) + end + + def self.parsetext(text) + tk_call('BWidget::parsetext', text) + end + + def self.place(path, w, h, *args) + if args[-1].kind_of?(Hash) + keys = args.pop + args.concat(hash_kv(keys)) + end + tk_call('BWidget::place', path, w, h, *(args.flatten)) + end + + def self.write(file, mode=None) + tk_call('BWidget::write', file, mode) + end + + def self.wrongNumArgsString(str) + tk_call('BWidget::wrongNumArgsString', str) + end + + #################################################### + + autoload :ArrowButton, 'tkextlib/bwidget/arrowbutton' + autoload :Bitmap, 'tkextlib/bwidget/bitmap' + autoload :Button, 'tkextlib/bwidget/button' + autoload :ButtonBox, 'tkextlib/bwidget/buttonbox' + autoload :ComboBox, 'tkextlib/bwidget/combobox' + autoload :Dialog, 'tkextlib/bwidget/dialog' + autoload :DragSite, 'tkextlib/bwidget/dragsite' + autoload :DropSite, 'tkextlib/bwidget/dropsite' + autoload :DynamicHelp, 'tkextlib/bwidget/dynamichelp' + autoload :Entry, 'tkextlib/bwidget/entry' + autoload :Label, 'tkextlib/bwidget/label' + autoload :LabelEntry, 'tkextlib/bwidget/labelentry' + autoload :LabelFrame, 'tkextlib/bwidget/labelframe' + autoload :ListBox, 'tkextlib/bwidget/listbox' + autoload :MainFrame, 'tkextlib/bwidget/mainframe' + autoload :MessageDlg, 'tkextlib/bwidget/messagedlg' + autoload :NoteBook, 'tkextlib/bwidget/notebook' + autoload :PagesManager, 'tkextlib/bwidget/pagesmanager' + autoload :PanedWindow, 'tkextlib/bwidget/panedwindow' + autoload :PasswdDlg, 'tkextlib/bwidget/passwddlg' + autoload :ProgressBar, 'tkextlib/bwidget/progressbar' + autoload :ProgressDlg, 'tkextlib/bwidget/progressdlg' + autoload :ScrollableFrame, 'tkextlib/bwidget/scrollableframe' + autoload :ScrolledWindow, 'tkextlib/bwidget/scrolledwindow' + autoload :ScrollView, 'tkextlib/bwidget/scrollview' + autoload :SelectColor, 'tkextlib/bwidget/selectcolor' + autoload :SelectFont, 'tkextlib/bwidget/selectfont' + autoload :Separator, 'tkextlib/bwidget/separator' + autoload :SpinBox, 'tkextlib/bwidget/spinbox' + autoload :TitleFrame, 'tkextlib/bwidget/titleframe' + autoload :Tree, 'tkextlib/bwidget/tree' + autoload :Widget, 'tkextlib/bwidget/widget' + + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb new file mode 100644 index 0000000..770e5e9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/arrowbutton.rb @@ -0,0 +1,21 @@ +# +# tkextlib/bwidget/arrowbutton.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/button' + +module Tk + module BWidget + class ArrowButton < Tk::BWidget::Button + end + end +end + +class Tk::BWidget::ArrowButton + TkCommandNames = ['ArrowButton'.freeze].freeze + WidgetClassName = 'ArrowButton'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/bitmap.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/bitmap.rb new file mode 100644 index 0000000..6cfde20 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/bitmap.rb @@ -0,0 +1,21 @@ +# +# tkextlib/bwidget/bitmap.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tk/image' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Bitmap < TkPhotoImage + end + end +end + +class Tk::BWidget::Bitmap + def initialize(name) + @path = tk_call_without_enc('Bitmap::get', name) + Tk_IMGTBL[@path] = self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/button.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/button.rb new file mode 100644 index 0000000..8f3087d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/button.rb @@ -0,0 +1,31 @@ +# +# tkextlib/bwidget/button.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/button' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Button < Tk::Button + end + end +end + +class Tk::BWidget::Button + TkCommandNames = ['Button'.freeze].freeze + WidgetClassName = 'Button'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/buttonbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/buttonbox.rb new file mode 100644 index 0000000..8d6d212 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/buttonbox.rb @@ -0,0 +1,90 @@ +# +# tkextlib/bwidget/buttonbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/button' + +module Tk + module BWidget + class ButtonBox < TkWindow + end + end +end + +class Tk::BWidget::ButtonBox + TkCommandNames = ['ButtonBox'.freeze].freeze + WidgetClassName = 'ButtonBox'.freeze + WidgetClassNames[WidgetClassName] = self + + include TkItemConfigMethod + + def __boolval_optkeys + super() << 'homogeneous' + end + private :__boolval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::BWidget::Button) + name = tagOrId[:name] + return index(name) unless name.empty? + end + if tagOrId.kind_of?(Tk::Button) + return index(tagOrId[:text]) + end + # index(tagOrId.to_s) + index(_get_eval_string(tagOrId)) + end + + def add(keys={}, &b) + win = window(tk_send('add', *hash_kv(keys))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def delete(idx) + tk_send('delete', tagid(idx)) + self + end + + def index(idx) + if idx.kind_of?(Tk::BWidget::Button) + name = idx[:name] + idx = name unless name.empty? + end + if idx.kind_of?(Tk::Button) + idx = idx[:text] + end + number(tk_send('index', idx.to_s)) + end + + def insert(idx, keys={}, &b) + win = window(tk_send('insert', tagid(idx), *hash_kv(keys))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def invoke(idx) + tk_send('invoke', tagid(idx)) + self + end + + def set_focus(idx) + tk_send('setfocus', tagid(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/combobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/combobox.rb new file mode 100644 index 0000000..1c58a4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/combobox.rb @@ -0,0 +1,51 @@ +# +# tkextlib/bwidget/combobox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/entry' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/listbox' +require 'tkextlib/bwidget/spinbox' + +module Tk + module BWidget + class ComboBox < Tk::BWidget::SpinBox + end + end +end + +class Tk::BWidget::ComboBox + include Scrollable + + TkCommandNames = ['ComboBox'.freeze].freeze + WidgetClassName = 'ComboBox'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_listbox(&b) + win = window(tk_send_without_enc('getlistbox')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def icursor(idx) + tk_send_without_enc('icursor', idx) + end + + def post + tk_send_without_enc('post') + self + end + + def unpost + tk_send_without_enc('unpost') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dialog.rb new file mode 100644 index 0000000..291ca4a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dialog.rb @@ -0,0 +1,182 @@ +# +# tkextlib/bwidget/dialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/buttonbox' + +module Tk + module BWidget + class Dialog < TkWindow + end + end +end + +class Tk::BWidget::Dialog + TkCommandNames = ['Dialog'.freeze].freeze + WidgetClassName = 'Dialog'.freeze + WidgetClassNames[WidgetClassName] = self + + include TkItemConfigMethod + + def __strval_optkeys + super() << 'title' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'transient' << 'homogeneous' + end + private :__boolval_optkeys + + def initialize(parent=nil, keys=nil) + @relative = '' + if parent.kind_of?(Hash) + keys = _symbolkey2str(parent) + @relative = keys['parent'] if keys.key?('parent') + @relative = keys.delete('relative') if keys.key?('relative') + super(keys) + elsif keys + keys = _symbolkey2str(keys) + @relative = keys.delete('parent') if keys.key?('parent') + @relative = keys.delete('relative') if keys.key?('relative') + super(parent, keys) + else + super(parent) + end + end + + def create_self(keys) + cmd = self.class::TkCommandNames[0] + if keys and keys != None + tk_call_without_enc(cmd, @path, '-parent', @relative, + *hash_kv(keys, true)) + else + tk_call_without_enc(cmd, @path, '-parent', @relative) + end + end + + def cget_strict(slot) + if slot.to_s == 'relative' + super('parent') + else + super(slot) + end + end + def cget(slot) + if slot.to_s == 'relative' + super('parent') + else + super(slot) + end + end + + def configure(slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + slot['parent'] = slot.delete('relative') if slot.key?('relative') + super(slot) + else + if slot.to_s == 'relative' + super('parent', value) + else + super(slot, value) + end + end + end + + def configinfo(slot=nil) + if slot + if slot.to_s == 'relative' + super('parent') + else + super(slot) + end + else + ret = super() + if TkComm::GET_CONFIGINFO_AS_ARRAY + ret << ['relative', 'parent'] + else + ret['relative'] = 'parent' + end + end + end + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::BWidget::Button) + name = tagOrId[:name] + return index(name) unless name.empty? + end + if tagOrId.kind_of?(Tk::Button) + return index(tagOrId[:text]) + end + # index(tagOrId.to_s) + index(_get_eval_string(tagOrId)) + end + + def add(keys={}, &b) + win = window(tk_send('add', *hash_kv(keys))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_frame(&b) + win = window(tk_send('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_buttonbox(&b) + win = window(@path + '.bbox') + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def draw(focus_win=None) + tk_send('draw', focus_win) + end + + def enddialog(ret) + tk_send('enddialog', ret) + end + + def index(idx) + get_buttonbox.index(idx) + end + + def invoke(idx) + tk_send('invoke', tagid(idx)) + self + end + + def set_focus(idx) + tk_send('setfocus', tagid(idx)) + self + end + + def withdraw + tk_send('withdraw') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dragsite.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dragsite.rb new file mode 100644 index 0000000..4d4de17 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dragsite.rb @@ -0,0 +1,31 @@ +# +# tkextlib/bwidget/dragsite.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + module DragSite + end + end +end + +module Tk::BWidget::DragSite + include Tk + extend Tk + + def self.include(klass, type, event) + tk_call('DragSite::include', klass, type, event) + end + + def self.register(path, keys={}) + tk_call('DragSite::register', path, *hash_kv(keys)) + end + + def self.set_drag(path, subpath, initcmd, endcmd, force=None) + tk_call('DragSite::setdrag', path, subpath, initcmd, endcmd, force) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dropsite.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dropsite.rb new file mode 100644 index 0000000..e5e98fb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dropsite.rb @@ -0,0 +1,39 @@ +# +# tkextlib/bwidget/dropsite.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + module DropSite + end + end +end + +module Tk::BWidget::DropSite + include Tk + extend Tk + + def self.include(klass, type) + tk_call('DropSite::include', klass, type) + end + + def self.register(path, keys={}) + tk_call('DropSite::register', path, *hash_kv(keys)) + end + + def self.set_cursor(cursor) + tk_call('DropSite::setcursor', cursor) + end + + def self.set_drop(path, subpath, dropover, drop, force=None) + tk_call('DropSite::setdrop', path, subpath, dropover, drop, force) + end + + def self.set_operation(op) + tk_call('DropSite::setoperation', op) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb new file mode 100644 index 0000000..846e580 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/dynamichelp.rb @@ -0,0 +1,63 @@ +# +# tkextlib/bwidget/dynamichelp.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + module DynamicHelp + end + end +end + +module Tk::BWidget::DynamicHelp + include Tk + extend Tk + + def self.__pathname + 'DynamicHelp::configure' + end + + def __strval_optkeys + super() << 'topbackground' + end + private :__strval_optkeys + + def self.__cget_cmd + ['DynamicHelp::configure'] + end + + def self.__config_cmd + ['DynamicHelp::configure'] + end + + def self.cget_strict(slot) + slot = slot.to_s + info = {} + self.current_configinfo.each{|k,v| info[k.to_s] = v if k.to_s == slot} + fail RuntimeError, "unknown option \"-#{slot}\"" if info.empty? + info.values[0] + end + def self.cget(slot) + self.current_configinfo(slot).values[0] + end + + def self.add(widget, keys={}) + tk_call('DynamicHelp::add', widget, *hash_kv(keys)) + end + + def self.delete(widget) + tk_call('DynamicHelp::delete', widget) + end + + def self.include(klass, type) + tk_call('DynamicHelp::include', klass, type) + end + + def self.sethelp(path, subpath, force=None) + tk_call('DynamicHelp::sethelp', path, subpath, force) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/entry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/entry.rb new file mode 100644 index 0000000..a56890f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/entry.rb @@ -0,0 +1,43 @@ +# +# tkextlib/bwidget/entry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/entry' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Entry < Tk::Entry + end + end +end + +class Tk::BWidget::Entry + include Scrollable + + TkCommandNames = ['Entry'.freeze].freeze + WidgetClassName = 'Entry'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' << 'insertbackground' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'dragenabled' << 'dropenabled' << 'editable' + end + private :__boolval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + def invoke + tk_send_without_enc('invoke') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/label.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/label.rb new file mode 100644 index 0000000..88a504a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/label.rb @@ -0,0 +1,41 @@ +# +# tkextlib/bwidget/label.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/label' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Label < Tk::Label + end + end +end + +class Tk::BWidget::Label + TkCommandNames = ['Label'.freeze].freeze + WidgetClassName = 'Label'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'dragenabled' << 'dropenabled' + end + private :__boolval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + def set_focus + tk_send_without_enc('setfocus') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelentry.rb new file mode 100644 index 0000000..95b4094 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelentry.rb @@ -0,0 +1,80 @@ +# +# tkextlib/bwidget/labelentry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/entry' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/labelframe' +require 'tkextlib/bwidget/entry' + +module Tk + module BWidget + class LabelEntry < Tk::Entry + end + end +end + +class Tk::BWidget::LabelEntry + include Scrollable + + TkCommandNames = ['LabelEntry'.freeze].freeze + WidgetClassName = 'LabelEntry'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + def __font_optkeys + super() << 'labelfont' + end + private :__font_optkeys + + #def entrybind(*args) + # _bind([path, 'bind'], *args) + # self + #end + def entrybind(context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'bind'], context, cmd, *args) + self + end + + #def entrybind_append(*args) + # _bind_append([path, 'bind'], *args) + # self + #end + def entrybind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'bind'], context, cmd, *args) + self + end + + def entrybind_remove(*args) + _bind_remove([path, 'bind'], *args) + self + end + + def entrybindinfo(*args) + _bindinfo([path, 'bind'], *args) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelframe.rb new file mode 100644 index 0000000..dc22180 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/labelframe.rb @@ -0,0 +1,52 @@ +# +# tkextlib/bwidget/labelframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/label' + +module Tk + module BWidget + class LabelFrame < TkWindow + end + end +end + +class Tk::BWidget::LabelFrame + TkCommandNames = ['LabelFrame'.freeze].freeze + WidgetClassName = 'LabelFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'dragenabled' << 'dropenabled' + end + private :__boolval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + def self.align(*args) + tk_call('LabelFrame::align', *args) + end + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/listbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/listbox.rb new file mode 100644 index 0000000..093fcb6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/listbox.rb @@ -0,0 +1,358 @@ +# +# tkextlib/bwidget/listbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/canvas' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ListBox < TkWindow + # is NOT a subclass of a listbox widget class. + # because it constructed on a canvas widget. + + class Item < TkObject + end + end + end +end + +class Tk::BWidget::ListBox + include TkItemConfigMethod + include Scrollable + + TkCommandNames = ['ListBox'.freeze].freeze + WidgetClassName = 'ListBox'.freeze + WidgetClassNames[WidgetClassName] = self + + class Event_for_Items < TkEvent::Event + def self._get_extra_args_tbl + [ + TkComm.method(:string) # item idenfier + ] + end + end + + def __boolval_optkeys + super() << 'autofocus' << 'dragenabled' << 'dropenabled' << 'selectfill' + end + private :__boolval_optkeys + + def tagid(tag) + if tag.kind_of?(Tk::BWidget::ListBox::Item) + tag.id + else + # tag + _get_eval_string(tag) + end + end + + #def imagebind(*args) + # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + # self + #end + def imagebind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_for_event_class(Event_for_Items, [path, 'bindImage'], + context, cmd, *args) + self + end + + #def imagebind_append(*args) + # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + # self + #end + def imagebind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], + context, cmd, *args) + self + end + + def imagebind_remove(*args) + _bind_remove_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + self + end + + def imagebindinfo(*args) + _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + end + + #def textbind(*args) + # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args) + # self + #end + def textbind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_for_event_class(Event_for_Items, [path, 'bindText'], + context, cmd, *args) + self + end + + #def textbind_append(*args) + # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args) + # self + #end + def textbind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], + context, cmd, *args) + self + end + + def textbind_remove(*args) + _bind_remove_for_event_class(Event_for_Items, [path, 'bindText'], *args) + self + end + + def textbindinfo(*args) + _bindinfo_for_event_class(Event_for_Items, [path, 'bindText'], *args) + end + + def delete(*args) + tk_send('delete', *args) + self + end + + def edit(item, text, *args) + tk_send('edit', tagid(item), text, *args) + self + end + + def exist?(item) + bool(tk_send('exists', tagid(item))) + end + + def index(item) + num_or_str(tk_send('index', tagid(item))) + end + + def insert(idx, item, keys={}) + tk_send('insert', idx, tagid(item), *hash_kv(keys)) + self + end + + def get_item(idx) + tk_send('items', idx) + end + + def items(first=None, last=None) + list(tk_send('items', first, last)) + end + + def move(item, idx) + tk_send('move', tagid(item), idx) + self + end + + def reorder(neworder) + tk_send('reorder', neworder) + self + end + + def see(item) + tk_send('see', tagid(item)) + self + end + + def selection_clear + tk_send_without_enc('selection', 'clear') + self + end + + def selection_set(*args) + tk_send_without_enc('selection', 'set', + *(args.collect{|item| tagid(item)})) + self + end + + def selection_add(*args) + tk_send_without_enc('selection', 'add', + *(args.collect{|item| tagid(item)})) + self + end + + def selection_remove(*args) + tk_send_without_enc('selection', 'remove', + *(args.collect{|item| tagid(item)})) + self + end + + def selection_get(*args) + simplelist(tk_send_without_enc('selection', 'get')).collect{|item| + Tk::BWidget::ListBox::Item.id2obj(self, item) + } + end +end + +class Tk::BWidget::ListBox::Item + include TkTreatTagFont + + ListItem_TBL = TkCore::INTERP.create_table + + (ListItem_ID = ['bw:item'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + ListItem_TBL.mutex.synchronize{ ListItem_TBL.clear } + } + + def self.id2obj(lbox, id) + lpath = lbox.path + ListItem_TBL.mutex.synchronize{ + if ListItem_TBL[lpath] + ListItem_TBL[lpath][id]? ListItem_TBL[lpath][id]: id + else + id + end + } + end + + def initialize(lbox, *args) + if lbox.kind_of?(Tk::BWidget::ListBox) + @listbox = lbox + else + fail RuntimeError, + "expect Tk::BWidget::ListBox or Tk::BWidget::ListBox::Item for 1st argument" + end + + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = {} + end + + index = keys.delete('index') + unless args.empty? + index = args.shift + end + index = 'end' unless index + + unless args.empty? + fail RuntimeError, 'too much arguments' + end + + @lpath = @listbox.path + + if keys.key?('itemname') + @path = @id = keys.delete('itemname') + else + ListItem_ID.mutex.synchronize{ + @path = @id = ListItem_ID.join(TkCore::INTERP._ip_id_) + ListItem_ID[1].succ! + } + end + + ListItem_TBL.mutex.synchronize{ + ListItem_TBL[@id] = self + ListItem_TBL[@lpath] = {} unless ListItem_TBL[@lpath] + ListItem_TBL[@lpath][@id] = self + } + + @listbox.insert(index, @id, keys) + end + + def listbox + @listbox + end + + def id + @id + end + + def [](key) + cget(key) + end + + def []=(key, val) + configure(key, val) + val + end + + def cget(key) + @listbox.itemcget(@id, key) + end + def cget_strict(key) + @listbox.itemcget_strict(@id, key) + end + + def configure(key, val=None) + @listbox.itemconfigure(@id, key, val) + end + + def configinfo(key=nil) + @listbox.itemconfiginfo(@id, key) + end + + def current_configinfo(key=nil) + @listbox.current_itemconfiginfo(@id, key) + end + + def delete + @listbox.delete(@id) + self + end + + def edit(*args) + @listbox.edit(@id, *args) + self + end + + def exist? + @listbox.exist?(@id) + end + + def index + @listbox.index(@id) + end + + def move(index) + @listbox.move(@id, index) + end + + def see + @listbox.see(@id) + end + + def selection_add + @listbox.selection_add(@id) + end + + def selection_remove + @listbox.selection_remove(@id) + end + + def selection_set + @listbox.selection_set(@id) + end + + def selection_toggle + @listbox.selection_toggle(@id) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/mainframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/mainframe.rb new file mode 100644 index 0000000..de66eaf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/mainframe.rb @@ -0,0 +1,128 @@ +# +# tkextlib/bwidget/mainframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/progressbar' + +module Tk + module BWidget + class MainFrame < TkWindow + end + end +end + +class Tk::BWidget::MainFrame + TkCommandNames = ['MainFrame'.freeze].freeze + WidgetClassName = 'MainFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'progressfg' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'progressvar' + end + private :__tkvariable_optkeys + + def __val2ruby_optkeys # { key=>proc, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "proc.call(value)" is called. + { + 'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}} + } + end + private :__val2ruby_optkeys + + def add_indicator(keys={}, &b) + win = window(tk_send('addindicator', *hash_kv(keys))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def add_toolbar(&b) + win = window(tk_send('addtoolbar')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_frame(&b) + win = window(tk_send('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_indicator(idx, &b) + win = window(tk_send('getindicator', idx)) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_menu(menu_id, &b) + win = window(tk_send('getmenu', menu_id)) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_toolbar(idx, &b) + win = window(tk_send('gettoolbar', idx)) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def set_menustate(tag, state) + tk_send('setmenustate', tag, state) + self + end + + def show_statusbar(name) + tk_send('showstatusbar', name) + self + end + + def show_toolbar(idx, mode) + tk_send('showtoolbar', idx, mode) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/messagedlg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/messagedlg.rb new file mode 100644 index 0000000..b88461b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/messagedlg.rb @@ -0,0 +1,192 @@ +# +# tkextlib/bwidget/messagedlg.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/dialog.rb' + +module Tk + module BWidget + class MessageDlg < TkWindow + end + end +end + +class Tk::BWidget::MessageDlg + TkCommandNames = ['MessageDlg'.freeze].freeze + WidgetClassName = 'MessageDlg'.freeze + WidgetClassNames[WidgetClassName] = self + + def initialize(parent=nil, keys=nil) + @relative = '' + if parent.kind_of?(Hash) + keys = _symbolkey2str(parent) + @relative = keys['parent'] if keys.key?('parent') + @relative = keys.delete('relative') if keys.key?('relative') + super(keys) + elsif keys + keys = _symbolkey2str(keys) + @relative = keys.delete('parent') if keys.key?('parent') + @relative = keys.delete('relative') if keys.key?('relative') + super(parent, keys) + else + super(parent) + end + end + + def create_self(keys) + # NOT create widget. + # Because the widget no longer exist when returning from creation. + @keys = _symbolkey2str(keys).update('parent'=>@relative) + @info = nil + end + private :create_self + + def __strval_optkeys + super() << 'message' << 'title' + end + private :__strval_optkeys + + def __listval_optkeys + super() << 'buttons' + end + private :__listval_optkeys + + def cget(slot) + slot = slot.to_s + if slot == 'relative' + slot = 'parent' + end + if winfo_exist? + val = super(slot) + @keys[slot] = val + end + @keys[slot] + end + def cget_strict(slot) + slot = slot.to_s + if slot == 'relative' + slot = 'parent' + end + if winfo_exist? + val = super(slot) + @keys[slot] = val + end + @keys[slot] + end + + def configure(slot, value=None) + if winfo_exist? + super(slot, value) + end + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + slot['parent'] = slot.delete('relative') if slot.key?('relative') + @keys.update(slot) + + if @info + # update @info + slot.each{|k, v| + if TkComm::GET_CONFIGINFO_AS_ARRAY + if (inf = @info.assoc(k)) + inf[-1] = v + else + @info << [k, '', '', '', v] + end + else + if (inf = @info[k]) + inf[-1] = v + else + @info[k] = ['', '', '', v] + end + end + } + end + + else # ! Hash + slot = slot.to_s + slot = 'parent' if slot == 'relative' + @keys[slot] = value + + if @info + # update @info + if TkComm::GET_CONFIGINFO_AS_ARRAY + if (inf = @info.assoc(slot)) + inf[-1] = value + else + @info << [slot, '', '', '', value] + end + else + if (inf = @info[slot]) + inf[-1] = value + else + @info[slot] = ['', '', '', value] + end + end + end + end + + self + end + + def configinfo(slot=nil) + if winfo_exist? + @info = super() + if TkComm::GET_CONFIGINFO_AS_ARRAY + @info << ['relative', 'parent'] + else + @info['relative'] = 'parent' + end + end + + if TkComm::GET_CONFIGINFO_AS_ARRAY + if @info + if winfo_exist? + # update @keys + @info.each{|inf| @keys[inf[0]] = inf[-1] if inf.size > 2 } + end + else + @info = [] + @keys.each{|k, v| + @info << [k, '', '', '', v] + } + @info << ['relative', 'parent'] + end + + if slot + @info.asoc(slot.to_s).dup + else + @info.dup + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if @info + if winfo_exist? + # update @keys + @info.each{|k, inf| @keys[k] = inf[-1] if inf.size > 2 } + end + else + @info = {} + @keys.each{|k, v| + @info[k] = ['', '', '', v] + } + @info['relative'] = 'parent' + end + + if slot + @info[slot.to_s].dup + else + @info.dup + end + end + end + + def create + # return the index of the pressed button, or nil if it is destroyed + ret = num_or_str(tk_call(self.class::TkCommandNames[0], + @path, *hash_kv(@keys))) + (ret < 0)? nil: ret + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/notebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/notebook.rb new file mode 100644 index 0000000..4239436 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/notebook.rb @@ -0,0 +1,166 @@ +# +# tkextlib/bwidget/notebook.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class NoteBook < TkWindow + end + end +end + +class Tk::BWidget::NoteBook + include TkItemConfigMethod + + TkCommandNames = ['NoteBook'.freeze].freeze + WidgetClassName = 'NoteBook'.freeze + WidgetClassNames[WidgetClassName] = self + + class Event_for_Tabs < TkEvent::Event + def self._get_extra_args_tbl + [ + TkComm.method(:string) # page idenfier + ] + end + end + + def __boolval_optkeys + super() << 'homogeneous' + end + private :__boolval_optkeys + + def tagid(id) + if id.kind_of?(TkWindow) + #id.path + id.epath + elsif id.kind_of?(TkObject) + id.to_eval + else + # id.to_s + _get_eval_string(id) + end + end + + #def tabbind(*args) + # _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) + # self + #end + def tabbind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], + context, cmd, *args) + self + end + + #def tabbind_append(*args) + # _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) + # self + #end + def tabbind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], + context, cmd, *args) + self + end + + def tabbind_remove(*args) + _bind_remove_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) + self + end + + def tabbindinfo(*args) + _bindinfo_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args) + end + + def add(page, &b) + win = window(tk_send('add', tagid(page))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def compute_size + tk_send('compute_size') + self + end + + def delete(page, destroyframe=None) + tk_send('delete', tagid(page), destroyframe) + self + end + + def get_frame(page, &b) + win = window(tk_send('getframe', tagid(page))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def index(page) + num_or_str(tk_send('index', tagid(page))) + end + + def insert(index, page, keys={}, &b) + win = window(tk_send('insert', index, tagid(page), *hash_kv(keys))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def move(page, index) + tk_send('move', tagid(page), index) + self + end + + def get_page(page) + tk_send('pages', page) + end + + def pages(first=None, last=None) + list(tk_send('pages', first, last)) + end + + def raise(page=nil) + if page + tk_send('raise', page) + self + else + tk_send('raise') + end + end + + def see(page) + tk_send('see', page) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb new file mode 100644 index 0000000..fbc2c11 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/pagesmanager.rb @@ -0,0 +1,73 @@ +# +# tkextlib/bwidget/pagesmanager.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class PagesManager < TkWindow + end + end +end + +class Tk::BWidget::PagesManager + TkCommandNames = ['PagesManager'.freeze].freeze + WidgetClassName = 'PagesManager'.freeze + WidgetClassNames[WidgetClassName] = self + + def tagid(id) + # id.to_s + _get_eval_string(id) + end + + def add(page, &b) + win = window(tk_send('add', tagid(page))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def compute_size + tk_send('compute_size') + self + end + + def delete(page) + tk_send('delete', tagid(page)) + self + end + + def get_frame(page, &b) + win = window(tk_send('getframe', tagid(page))) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def get_page(page) + tk_send('pages', page) + end + + def pages(first=None, last=None) + list(tk_send('pages', first, last)) + end + + def raise(page=None) + tk_send('raise', page) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panedwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panedwindow.rb new file mode 100644 index 0000000..4d979fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panedwindow.rb @@ -0,0 +1,37 @@ +# +# tkextlib/bwidget/panedwindow.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class PanedWindow < TkWindow + end + end +end + +class Tk::BWidget::PanedWindow + TkCommandNames = ['PanedWindow'.freeze].freeze + WidgetClassName = 'PanedWindow'.freeze + WidgetClassNames[WidgetClassName] = self + + def add(keys={}) + window(tk_send('add', *hash_kv(keys))) + end + + def get_frame(idx, &b) + win = window(tk_send_without_enc('getframe', idx)) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panelframe.rb new file mode 100644 index 0000000..84bae07 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/panelframe.rb @@ -0,0 +1,57 @@ +# +# tkextlib/bwidget/panelframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class PanelFrame < TkWindow + end + end +end + +class Tk::BWidget::PanelFrame + TkCommandNames = ['PanelFrame'.freeze].freeze + WidgetClassName = 'PanelFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() + ['panelforeground', 'panelbackground'] + end + private :__strval_optkeys + + def add(win, keys={}) + tk_send('add', win, keys) + self + end + + def delete(*wins) + tk_send('delete', *wins) + self + end + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def items + list(tk_send('items')) + end + + def remove(*wins) + tk_send('remove', *wins) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/passwddlg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/passwddlg.rb new file mode 100644 index 0000000..0b635d9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/passwddlg.rb @@ -0,0 +1,44 @@ +# +# tkextlib/bwidget/passwddlg.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/messagedlg' + +module Tk + module BWidget + class PasswdDlg < Tk::BWidget::MessageDlg + end + end +end + +class Tk::BWidget::PasswdDlg + TkCommandNames = ['PasswdDlg'.freeze].freeze + WidgetClassName = 'PasswdDlg'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'loginhelptext' << 'loginlabel' << 'logintext' << + 'passwdlabel' << 'passwdtext' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'passwdeditable' << 'homogeneous' + end + private :__boolval_optkeys + + def __tkvariable_optkeys + super() << 'loginhelpvar' << 'logintextvariable' << + 'passwdhelpvar' << 'passwdtextvariable' + end + private :__tkvariable_optkeys + + def create + login, passwd = simplelist(tk_call(self.class::TkCommandNames[0], + @path, *hash_kv(@keys))) + [login, passwd] + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressbar.rb new file mode 100644 index 0000000..0253ce2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressbar.rb @@ -0,0 +1,20 @@ +# +# tkextlib/bwidget/progressbar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ProgressBar < TkWindow + end + end +end + +class Tk::BWidget::ProgressBar + TkCommandNames = ['ProgressBar'.freeze].freeze + WidgetClassName = 'ProgressBar'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressdlg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressdlg.rb new file mode 100644 index 0000000..3260025 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/progressdlg.rb @@ -0,0 +1,58 @@ +# +# tkextlib/bwidget/progressdlg.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/variable' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/progressbar' +require 'tkextlib/bwidget/messagedlg' + +module Tk + module BWidget + class ProgressDlg < Tk::BWidget::MessageDlg + end + end +end + +class Tk::BWidget::ProgressDlg + TkCommandNames = ['ProgressDlg'.freeze].freeze + WidgetClassName = 'ProgressDlg'.freeze + WidgetClassNames[WidgetClassName] = self + + def create_self(keys) + # NOT create widget for reusing the object + super(keys) + @keys['textvariable'] = TkVariable.new unless @keys.key?('textvariable') + @keys['variable'] = TkVariable.new unless @keys.key?('variable') + end + + def textvariable + @keys['textvariable'] + end + + def text + @keys['textvariable'].value + end + + def text= (txt) + @keys['textvariable'].value = txt + end + + def variable + @keys['variable'] + end + + def value + @keys['variable'].value + end + + def value= (val) + @keys['variable'].value = val + end + + def create + window(tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb new file mode 100644 index 0000000..010c960 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb @@ -0,0 +1,40 @@ +# +# tkextlib/bwidget/scrollableframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ScrollableFrame < TkWindow + end + end +end + +class Tk::BWidget::ScrollableFrame + include Scrollable + + TkCommandNames = ['ScrollableFrame'.freeze].freeze + WidgetClassName = 'ScrollableFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def see(win, vert=None, horiz=None) + tk_send_without_enc('see', win, vert, horiz) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb new file mode 100644 index 0000000..3599fd8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb @@ -0,0 +1,38 @@ +# +# tkextlib/bwidget/scrolledwindow.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ScrolledWindow < TkWindow + end + end +end + +class Tk::BWidget::ScrolledWindow + TkCommandNames = ['ScrolledWindow'.freeze].freeze + WidgetClassName = 'ScrolledWindow'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def set_widget(win) + tk_send_without_enc('setwidget', win) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollview.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollview.rb new file mode 100644 index 0000000..0546af2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/scrollview.rb @@ -0,0 +1,25 @@ +# +# tkextlib/bwidget/scrollview.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ScrollView < TkWindow + end + end +end + +class Tk::BWidget::ScrollView + TkCommandNames = ['ScrollView'.freeze].freeze + WidgetClassName = 'ScrollView'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'fill' + end + private :__strval_optkeys +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectcolor.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectcolor.rb new file mode 100644 index 0000000..0f9014f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectcolor.rb @@ -0,0 +1,73 @@ +# +# tkextlib/bwidget/selectcolor.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/messagedlg' + +module Tk + module BWidget + class SelectColor < Tk::BWidget::MessageDlg + class Dialog < Tk::BWidget::SelectColor + end + class Menubutton < Tk::Menubutton + end + MenuButton = Menubutton + end + end +end + +class Tk::BWidget::SelectColor + extend Tk + + TkCommandNames = ['SelectColor'.freeze].freeze + WidgetClassName = 'SelectColor'.freeze + WidgetClassNames[WidgetClassName] = self + + def dialog(keys={}) + newkeys = @keys.dup + newkeys.update(_symbolkey2str(keys)) + tk_call('SelectColor::dialog', @path, *hash_kv(newkeys)) + end + + def menu(*args) + if args[-1].kind_of?(Hash) + keys = args.pop + else + keys = {} + end + place = args.flatten + newkeys = @keys.dup + newkeys.update(_symbolkey2str(keys)) + tk_call('SelectColor::menu', @path, place, *hash_kv(newkeys)) + end + + def self.set_color(idx, color) + tk_call('SelectColor::setcolor', idx, color) + end +end + +class Tk::BWidget::SelectColor::Dialog + def create_self(keys) + super(keys) + @keys['type'] = 'dialog' + end + + def create + @keys['type'] = 'dialog' # 'dialog' type returns color + tk_call(Tk::BWidget::SelectColor::TkCommandNames[0], + @path, *hash_kv(@keys)) + end +end + +class Tk::BWidget::SelectColor::Menubutton + def create_self(keys) + keys = {} unless keys + keys = _symbolkey2str(keys) + keys['type'] = 'menubutton' # 'toolbar' type returns widget path + window(tk_call(Tk::BWidget::SelectColor::TkCommandNames[0], + @path, *hash_kv(keys))) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectfont.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectfont.rb new file mode 100644 index 0000000..e53eb3b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/selectfont.rb @@ -0,0 +1,86 @@ +# +# tkextlib/bwidget/selectfont.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/messagedlg' + +module Tk + module BWidget + class SelectFont < Tk::BWidget::MessageDlg + class Dialog < Tk::BWidget::SelectFont + end + class Toolbar < TkWindow + end + end + end +end + +class Tk::BWidget::SelectFont + extend Tk + + TkCommandNames = ['SelectFont'.freeze].freeze + WidgetClassName = 'SelectFont'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'sampletext' << 'title' + end + private :__strval_optkeys + + def __font_optkeys + [] # without fontobj operation + end + private :__font_optkeys + + def create + tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys)) + end + + def self.load_font + tk_call('SelectFont::loadfont') + end +end + +class Tk::BWidget::SelectFont::Dialog + def __font_optkeys + [] # without fontobj operation + end + + def create_self(keys) + super(keys) + @keys['type'] = 'dialog' + end + + def configure(slot, value=None) + if slot.kind_of?(Hash) + slot.delete['type'] + slot.delete[:type] + return self if slot.empty? + else + return self if slot == 'type' || slot == :type + end + super(slot, value) + end + + def create + @keys['type'] = 'dialog' # 'dialog' type returns font name + tk_call(Tk::BWidget::SelectFont::TkCommandNames[0], @path, *hash_kv(@keys)) + end +end + +class Tk::BWidget::SelectFont::Toolbar + def __font_optkeys + [] # without fontobj operation + end + + def create_self(keys) + keys = {} unless keys + keys = _symbolkey2str(keys) + keys['type'] = 'toolbar' # 'toolbar' type returns widget path + window(tk_call(Tk::BWidget::SelectFont::TkCommandNames[0], + @path, *hash_kv(keys))) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/separator.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/separator.rb new file mode 100644 index 0000000..d9c3458 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/separator.rb @@ -0,0 +1,20 @@ +# +# tkextlib/bwidget/separator.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Separator < TkWindow + end + end +end + +class Tk::BWidget::Separator + TkCommandNames = ['Separator'.freeze].freeze + WidgetClassName = 'Separator'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/spinbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/spinbox.rb new file mode 100644 index 0000000..48358ba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/spinbox.rb @@ -0,0 +1,98 @@ +# +# tkextlib/bwidget/entry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' +require 'tkextlib/bwidget/arrowbutton' +require 'tkextlib/bwidget/entry' + +module Tk + module BWidget + class SpinBox < Tk::Entry + end + end +end + +class Tk::BWidget::SpinBox + include Scrollable + + TkCommandNames = ['SpinBox'.freeze].freeze + WidgetClassName = 'SpinBox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helptext' << 'insertbackground' << 'entryfg' << 'entrybg' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'dragenabled' << 'dropenabled' << 'editable' + end + private :__boolval_optkeys + + def __listval_optkeys + super() << 'values' + end + private :__listval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + #def entrybind(*args) + # _bind([path, 'bind'], *args) + # self + #end + def entrybind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, 'bind'], context, cmd, *args) + self + end + + #def entrybind_append(*args) + # _bind_append([path, 'bind'], *args) + # self + #end + def entrybind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, 'bind'], context, cmd, *args) + self + end + + def entrybind_remove(*args) + _bind_remove([path, 'bind'], *args) + self + end + + def entrybindinfo(*args) + _bindinfo([path, 'bind'], *args) + self + end + + def get_index_of_value + number(tk_send_without_enc('getvalue')) + end + alias get_value get_index_of_value + alias get_value_index get_index_of_value + + def set_value_by_index(idx) + idx = "@#{idx}" if idx.kind_of?(Integer) + tk_send_without_enc('setvalue', idx) + self + end + alias set_value set_value_by_index + alias set_index_value set_value_by_index +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/statusbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/statusbar.rb new file mode 100644 index 0000000..39c678d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/statusbar.rb @@ -0,0 +1,52 @@ +# +# tkextlib/bwidget/statusbar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class StatusBar < TkWindow + end + end +end + +class Tk::BWidget::StatusBar + TkCommandNames = ['StatusBar'.freeze].freeze + WidgetClassName = 'StatusBar'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'showresize' + end + private :__boolval_optkeys + + def add(win, keys={}) + tk_send('add', win, keys) + self + end + + def delete(*wins) + tk_send('delete', *wins) + self + end + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def items + list(tk_send('items')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/titleframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/titleframe.rb new file mode 100644 index 0000000..68534e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/titleframe.rb @@ -0,0 +1,33 @@ +# +# tkextlib/bwidget/titleframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class TitleFrame < TkWindow + end + end +end + +class Tk::BWidget::TitleFrame + TkCommandNames = ['TitleFrame'.freeze].freeze + WidgetClassName = 'TitleFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/tree.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/tree.rb new file mode 100644 index 0000000..aed4512 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/tree.rb @@ -0,0 +1,453 @@ +# +# tkextlib/bwidget/tree.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/canvas' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Tree < TkWindow + class Node < TkObject + end + end + end +end + +class Tk::BWidget::Tree + include TkItemConfigMethod + include Scrollable + + TkCommandNames = ['Tree'.freeze].freeze + WidgetClassName = 'Tree'.freeze + WidgetClassNames[WidgetClassName] = self + + class Event_for_Items < TkEvent::Event + def self._get_extra_args_tbl + [ + TkComm.method(:string) # item idenfier + ] + end + end + + def __strval_optkeys + super() << 'crossfill' << 'linesfill' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'dragenabled' << 'dropenabled' << + 'redraw' << 'selectfill' << 'showlines' + end + private :__boolval_optkeys + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + + def tagid(tag) + if tag.kind_of?(Tk::BWidget::Tree::Node) + tag.id + else + # tag + _get_eval_string(tag) + end + end + + #def imagebind(*args) + # _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + # self + #end + def imagebind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_for_event_class(Event_for_Items, [path, 'bindImage'], + context, cmd, *args) + self + end + + #def imagebind_append(*args) + # _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + # self + #end + def imagebind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], + context, cmd, *args) + self + end + + def imagebind_remove(*args) + _bind_remove_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + self + end + + def imagebindinfo(*args) + _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args) + end + + #def textbind(*args) + # _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args) + # self + #end + def textbind(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_for_event_class(Event_for_Items, [path, 'bindText'], + context, cmd, *args) + self + end + + #def textbind_append(*args) + # _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args) + # self + #end + def textbind_append(context, *args) + #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], + context, cmd, *args) + self + end + + def textbind_remove(*args) + _bind_remove_for_event_class(Event_for_Items, [path, 'bindText'], *args) + self + end + + def textbindinfo(*args) + _bindinfo_for_event_class(Event_for_Items, [path, 'bindText'], *args) + end + + def close_tree(node, recurse=None) + tk_send('closetree', tagid(node), recurse) + self + end + + def delete(*args) + tk_send('delete', *(args.collect{|node| tagid(node)})) + self + end + + def edit(node, text, *args) + tk_send('edit', tagid(node), text, *args) + self + end + + def exist?(node) + bool(tk_send('exists', tagid(node))) + end + + def index(node) + num_or_str(tk_send('index', tagid(node))) + end + + def insert(idx, parent, node, keys={}) + tk_send('insert', idx, tagid(parent), tagid(node), *hash_kv(keys)) + self + end + + def move(parent, node, idx) + tk_send('move', tagid(parent), tagid(node), idx) + self + end + + def get_node(node, idx) + Tk::BWidget::Tree::Node.id2obj(self, tk_send('nodes', tagid(node), idx)) + end + + def nodes(node, first=None, last=None) + simplelist(tk_send('nodes', tagid(node), first, last)).collect{|node| + Tk::BWidget::Tree::Node.id2obj(self, node) + } + end + + def open?(node) + bool(@tree.itemcget(tagid(node), 'open')) + end + + def open_tree(node, recurse=None) + tk_send('opentree', tagid(node), recurse) + self + end + + def parent(node) + Tk::BWidget::Tree::Node.id2obj(self, tk_send('parent', tagid(node))) + end + + def reorder(node, neworder) + tk_send('reorder', tagid(node), neworder) + self + end + + def see(node) + tk_send('see', tagid(node)) + self + end + + def selection_add(*args) + tk_send_without_enc('selection', 'add', + *(args.collect{|node| tagid(node)})) + self + end + + def selection_clear + tk_send_without_enc('selection', 'clear') + self + end + + def selection_get + list(tk_send_without_enc('selection', 'get')) + end + + def selection_include?(*args) + bool(tk_send_without_enc('selection', 'get', + *(args.collect{|node| tagid(node)}))) + end + + def selection_range(*args) + tk_send_without_enc('selection', 'range', + *(args.collect{|node| tagid(node)})) + self + end + + def selection_remove(*args) + tk_send_without_enc('selection', 'remove', + *(args.collect{|node| tagid(node)})) + self + end + + def selection_set(*args) + tk_send_without_enc('selection', 'set', + *(args.collect{|node| tagid(node)})) + self + end + + def selection_toggle(*args) + tk_send_without_enc('selection', 'toggle', + *(args.collect{|node| tagid(node)})) + self + end + + def toggle(node) + tk_send_without_enc('toggle', tagid(node)) + self + end + + def visible(node) + bool(tk_send_without_enc('visible', tagid(node))) + end +end + +class Tk::BWidget::Tree::Node + include TkTreatTagFont + + TreeNode_TBL = TkCore::INTERP.create_table + + (TreeNode_ID = ['bw:node'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + TreeNode_TBL.mutex.synchronize{ TreeNode_TBL.clear } + } + + def self.id2obj(tree, id) + tpath = tree.path + TreeNode_TBL.mutex.synchronize{ + if TreeNode_TBL[tpath] + TreeNode_TBL[tpath][id]? TreeNode_TBL[tpath][id]: id + else + id + end + } + end + + def initialize(tree, *args) + if tree.kind_of?(Tk::BWidget::Tree) + @tree = tree + parent = args.shift + if parent.kind_of?(Tk::BWidget::Tree::Node) + if parent.tree.path != @tree.path + fail RuntimeError, 'tree of parent node is not match' + end + end + elsif tree.kind_of?(Tk::BWidget::Tree::Node) + @tree = tree.tree + parent = tree.parent + else + fail RuntimeError, + "expect Tk::BWidget::Tree or Tk::BWidget::Tree::Node for 1st argument" + end + + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = {} + end + + index = keys.delete('index') + unless args.empty? + index = args.shift + end + index = 'end' unless index + + unless args.empty? + fail RuntimeError, 'too much arguments' + end + + @tpath = @tree.path + + if keys.key?('nodename') + @path = @id = keys.delete('nodename') + else + TreeNode_ID.mutex.synchronize{ + @path = @id = TreeNode_ID.join(TkCore::INTERP._ip_id_) + TreeNode_ID[1].succ! + } + end + + TreeNode_TBL.mutex.synchronize{ + TreeNode_TBL[@id] = self + TreeNode_TBL[@tpath] = {} unless TreeNode_TBL[@tpath] + TreeNode_TBL[@tpath][@id] = self + } + + @tree.insert(index, parent, @id, keys) + end + + def tree + @tree + end + + def id + @id + end + + def [](key) + cget(key) + end + + def []=(key, val) + configure(key, val) + val + end + + def cget(key) + @tree.itemcget(@id, key) + end + def cget_strict(key) + @tree.itemcget_strict(@id, key) + end + + def configure(key, val=None) + @tree.itemconfigure(@id, key, val) + end + + def configinfo(key=nil) + @tree.itemconfiginfo(@id, key) + end + + def current_configinfo(key=nil) + @tree.current_itemconfiginfo(@id, key) + end + + def close_tree(recurse=None) + @tree.close_tree(@id, recurse) + self + end + + def delete + @tree.delete(@id) + self + end + + def edit(*args) + @tree.edit(@id, *args) + self + end + + def exist? + @tree.exist?(@id) + end + + def index + @tree.index(@id) + end + + def move(index, parent=nil) + if parent + @tree.move(parent, @id, index) + else + @tree.move(self.parent, @id, index) + end + end + + def open_tree(recurse=None) + @tree.open_tree(@id, recurse) + self + end + + def open? + bool(@tree.itemcget(@id, 'open')) + end + + def parent + @tree.parent(@id) + end + + def reorder(neworder) + @tree.reorder(@id, neworder) + end + + def see + @tree.see(@id) + end + + def selection_add + @tree.selection_add(@id) + end + + def selection_remove + @tree.selection_remove(@id) + end + + def selection_set + @tree.selection_set(@id) + end + + def selection_toggle + @tree.selection_toggle(@id) + end + + def toggle + @tree.toggle(@id) + end + + def visible + @tree.visible(@id) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/widget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/widget.rb new file mode 100644 index 0000000..a93364b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/bwidget/widget.rb @@ -0,0 +1,129 @@ +# +# tkextlib/bwidget/widget.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + module Widget + end + end +end + +module Tk::BWidget::Widget + include Tk + extend Tk + + def self.__pathname + 'Widget::configure' + end + + def self.__cget_cmd + ['Widget::cget'] + end + + def self.__config_cmd + ['Widget::configure'] + end + + def self.cget_strict(slot) + slot = slot.to_s + info = {} + self.current_configinfo.each{|k,v| info[k.to_s] = v if k.to_s == slot} + fail RuntimeError, "unknown option \"-#{slot}\"" if info.empty? + info.values[0] + end + def self.cget(slot) + self.current_configinfo(slot).values[0] + end + + def self.add_map(klass, subclass, subpath, opts) + tk_call('Widget::addmap', klass, subclass, subpath, opts) + end + + def self.bwinclude(klass, subclass, subpath, *args) + tk_call('Widget::bwinclude', klass, subclass, subpath, *args) + end + + def self.create(klass, path, rename=None, &b) + win = window(tk_call('Widget::create', klass, path, rename)) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end + + def self.declare(klass, optlist) + tk_call('Widget::declare', klass, optlist) + end + + def self.define(klass, filename, *args) + tk_call('Widget::define', klass, filename, *args) + end + + def self.destroy(win) + tk_call('Widget::destroy', _epath(win)) + end + + def self.focus_next(win) + tk_call('Widget::focusNext', win) + end + + def self.focus_ok(win) + tk_call('Widget::focusOk', win) + end + + def self.focus_prev(win) + tk_call('Widget::focusPrev', win) + end + + def self.generate_doc(dir, widgetlist) + tk_call('Widget::generate-doc', dir, widgetlist) + end + + def self.generate_widget_doc(klass, iscmd, file) + tk_call('Widget::generate-widget-doc', klass, iscmd, file) + end + + def self.get_option(win, option) + tk_call('Widget::getoption', win, option) + end + + def self.get_variable(win, varname, my_varname=None) + tk_call('Widget::getVariable', win, varname, my_varname) + end + + def self.has_changed(win, option, pvalue) + tk_call('Widget::hasChanged', win, option, pvalue) + end + + def self.init(klass, win, options) + tk_call('Widget::init', klass, win, options) + end + + def self.set_option(win, option, value) + tk_call('Widget::setoption', win, option, value) + end + + def self.sub_cget_strict(win, subwidget) + tk_call('Widget::subcget', win, subwidget) + end + def self.sub_cget(win, subwidget) + self.sub_cget_strict(win, subwidget) + end + + def self.sync_options(klass, subclass, subpath, options) + tk_call('Widget::syncoptions', klass, subclass, subpath, options) + end + + def self.tkinclude(klass, tkwidget, subpath, *args) + tk_call('Widget::tkinclude', klass, tkwidget, subpath, *args) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl.rb new file mode 100644 index 0000000..1d6ecf0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl.rb @@ -0,0 +1,13 @@ +# +# [incr Tcl] support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/itcl/setup.rb' + +# load library +require 'tkextlib/itcl/incr_tcl.rb' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/incr_tcl.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/incr_tcl.rb new file mode 100644 index 0000000..2b75d62 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/incr_tcl.rb @@ -0,0 +1,178 @@ +# +# tkextlib/itk/incr_tcl.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script +require 'tkextlib/itcl.rb' + +# TkPackage.require('Itcl', '3.2') +TkPackage.require('Itcl') + +module Tk + module Itcl + include Tk + extend Tk + + LIBRARY = TkVarAccess.new('::itcl::library') + PURIST = TkVarAccess.new('::itcl::purist') + + VERSION = TkCore::INTERP._invoke("set", "::itcl::version").freeze + PATCHLEVEL = TkCore::INTERP._invoke("set", "::itcl::patchLevel").freeze + + PACKAGE_NAME = 'Itcl'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Itcl') + rescue + '' + end + end + + ############################################## + + class ItclObject < TkObject + ITCL_CLASSNAME = ''.freeze + + (ITCL_OBJ_ID = ['itclobj'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + ITCL_OBJ_TBL = {}.taint + + def initialize(*args) + if (@klass = self.class::ITCL_CLASSNAME).empty? + fail RuntimeError, 'unknown itcl class (abstract class?)' + end + Tk::Itcl::ItclObject::ITCL_OBJ_ID.mutex.synchronize{ + @id = Tk::Itcl::ItclObject::TCL_OBJ_ID.join(TkCore::INTERP._ip_id_) + Tk::Itcl::ItclObject::ITCL_OBJ_ID[1].succ! + } + @path = @id + end + + def self.call_proc(name, *args) + tk_call("#{ITCL_CLASSNAME}::#{cmd}", *args) + end + + def call_method(name, *args) + tk_call(@path, name, *args) + end + + def isa(klass) + bool(tk_call(@path, 'isa', klass)) + end + alias itcl_kind_of? isa + + def info_class + tk_call(@path, 'info', 'class') + end + + def info_inherit + simplelist(tk_call(@path, 'info', 'inherit')) + end + + def info_heritage + list(tk_call(@path, 'info', 'heritage')) + end + + def info_function(*args) + if args[-1].kind_of?(Array) + params = args.pop + params.each{|param| + param = param.to_s + args << ( (param[0] == ?-)? param: "-#{param}" ) + } + end + list(tk_call(@path, 'info', 'function', *args)) + end + + def info_variable(*args) + if args[-1].kind_of?(Array) + params = args.pop + params.each{|param| + param = param.to_s + args << ( (param[0] == ?-)? param: "-#{param}" ) + } + end + list(tk_call(@path, 'info', 'variable', *args)) + end + end + + ############################################## + + def self.body(klass, func, args, body) + tk_call('::itcl::body', "#{klass}::#{func}", args, body) + end + + def self.code(cmd, *args) + tk_call('::itcl::code', cmd, *args) + end + + def self.code_in_namespace(namespace, cmd, *args) + tk_call('::itcl::code', '-namespace', namespace, cmd, *args) + end + + def self.configbody(klass, var, body) + tk_call('::itcl::configbody', "#{klass}::#{var}", body) + end + + def self.create_itcl_class(name, body) + TkCore::INTERP._invoke('::itcl::class', name, body) + klass = Class.new(Tk::Itcl::ItclObject) + klass.const_set('ITCL_CLASSNAME', name.dup.freeze) + klass + end + + def self.delete_itcl_class(*names) + tk_call('::itcl::delete', 'class', *names) + end + + def self.delete_itcl_object(*names) + tk_call('::itcl::delete', 'object', *names) + end + + def self.delete_namespace(*names) + tk_call('::itcl::delete', 'namespace', *names) + end + + def self.ensemble(name, *args) + tk_call('::itcl::ensemble', name, *args) + end + + def self.find_classes(pat=None) + simplelist(tk_call('::itcl::find', 'classes', pat)) + end + + def self.find_objects(*args) + simplelist(tk_call('::itcl::find', 'objects', *args)) + end + + def self.is_itcl_class(target) + bool(tk_call('::itcl::is', 'class', target)) + end + + def self.is_itcl_object(target) + bool(tk_call('::itcl::is', 'object', target)) + end + + def self.create_local_obj(klass, name, *args) + tk_call('::itcl::local', klass, name, *args) + end + + def self.is_itcl_instance(klass, target) + bool(tk_call('::itcl::is', 'object', '-class', klass, target)) + end + + def self.scope(var) + tk_call('::itcl::scope', var) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/setup.rb new file mode 100644 index 0000000..5be0588 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itcl/setup.rb @@ -0,0 +1,13 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# + + +# set [incr Tcl] library directory + +# ENV['ITCL_LIBRARY'] = '/usr/local/ActiveTcl/lib/itcl3.2/' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk.rb new file mode 100644 index 0000000..7492bd3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk.rb @@ -0,0 +1,13 @@ +# +# [incr Tk] support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/itk/setup.rb' + +# load library +require 'tkextlib/itk/incr_tk.rb' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/incr_tk.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/incr_tk.rb new file mode 100644 index 0000000..e06deb5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/incr_tk.rb @@ -0,0 +1,446 @@ +# +# tkextlib/itk/incr_tk.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/menuspec' +require 'tkextlib/itcl.rb' + +# call setup script +require 'tkextlib/itk.rb' + +#TkPackage.require('Itk', '3.2') +TkPackage.require('Itk') + +module Tk + module Itk + include Tk + extend Tk + + LIBRARY = TkVarAccess.new('::itk::library') + + PACKAGE_NAME = 'Itk'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Itk') + rescue + '' + end + end + + def self.usual(arg, *args) + tk_call('::itk::usual', arg, *args) + end + + def self.usual_names + list(tk_call('::itk::usual')) + end + + ############################ + + class Archetype < TkWindow + TkCommandNames = [].freeze + # WidgetClassName = 'Archetype'.freeze + # WidgetClassNames[WidgetClassName] = self + + def self.to_eval + '::itk::' << self::WidgetClassName + end + + def __destroy_hook__ + Tk::Itk::Component::ComponentID_TBL.delete(self.path) + end + + #### [incr Tk] public methods + def component + simplelist(tk_send('component')) + end + + def component_path(name) + window(tk_send('component', name)) + end + alias component_widget component_path + + def component_invoke(name, cmd, *args) + window(tk_send('component', name, cmd, *args)) + end + + def component_obj(*names) + names = component if names.empty? + names.collect{|name| Tk::Itk::Component.new(self.path, name) } + end + + #### [incr Tk] protected methods +=begin + def itk_component_add(visibility, name, create_cmds, option_cmds=None) + args = [] + visibility.each{|v| v = v.to_s; args << ( (v[0] == ?-)? v: "-#{v}" )} + args << '--' << name << create_cmd << option_cmds + tk_call('itk_component', 'add', *args) + end + + def itk_component_delete(*names) + tk_call('itk_component', 'delete', *names) + end + + def itk_initialize(keys={}) + tk_call('itk_initialize', keys) + end + + def itk_option_add(*args) + tk_call('itk_option', 'add', *args) + end + + def itk_option_define(name, resource, klass, init, config=None) + tk_call('itk_option', 'define', name, resource, klass, init, config) + end + + def itk_option_remove(*args) + tk_call('itk_option', 'remove', *args) + end +=end + end + + ############################ + + class Toplevel < Archetype + TkCommandNames = ['::itk::Toplevel'].freeze + WidgetClassName = 'Toplevel'.freeze + WidgetClassNames[WidgetClassName] = self + + include Wm + include TkMenuSpec + + def __strval_optkeys + super() << 'title' + end + private :__strval_optkeys + end + + ############################ + + class Widget < Archetype + TkCommandNames = ['::itk::Widget'].freeze + WidgetClassName = 'Widget'.freeze + WidgetClassNames[WidgetClassName] = self + end + + + ############################ + + class Component < TkObject + def __cget_cmd + [self.master, 'component', self.name, 'cget'] + end + private :__cget_cmd + + def __config_cmd + [self.master, 'component', self.name, 'configure'] + end + private :__config_cmd + + ComponentID_TBL = TkCore::INTERP.create_table + + (Itk_Component_ID = ['itk:component'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + ComponentID_TBL.mutex.synchronize{ ComponentID_TBL.clear } + } + + def self.id2obj(master, id) + if master.kind_of?(TkObject) + master = master.path + else + master = master.to_s + end + ComponentID_TBL.mutex.synchronize{ + if ComponentID_TBL.key?(master) + (ComponentID_TBL[master].key?(id))? ComponentID_TBL[master][id]: id + else + id + end + } + end + + def self.new(master, component=nil) + if master.kind_of?(TkObject) + master = master.path + else + master = master.to_s + end + + if component.kind_of?(Tk::Itk::Component) + component = component.name + elsif component + component = component.to_s + else + Itk_Component_ID.mutex.synchronize{ + component = Itk_Component_ID.join(TkCore::INTERP._ip_id_) + Itk_Component_ID[1].succ! + } + end + + ComponentID_TBL.mutex.synchronize{ + if ComponentID_TBL.key?(master) + if ComponentID_TBL[master].key?(component) + return ComponentID_TBL[master][component] + end + else + ComponentID_TBL[master] = {} + end + } + + super(master, component) + end + + def initialize(master, component) + @master = master + @component = component + + ComponentID_TBL.mutex.synchronize{ + ComponentID_TBL[@master][@component] = self + } + + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + @widget = nil + @path = nil + end + end + + def path + unless @path + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + @path + end + + def epath + path() + end + + def to_eval + path() + end + + def master + @master + end + + def name + @component + end + + def widget + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + @widget + end + + def widget_class + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + @widget.classname + rescue + nil + end + end + end + + def method_missing(id, *args) + name = id.id2name + + # try 1 : component command + begin + return tk_call(@master, 'component', @component, name, *args) + rescue + end + + # try 2 : component configure + len = args.length + begin + case len + when 1 + if name[-1] == ?= + return configure(name[0..-2], args[0]) + else + return configure(name, args[0]) + end + when 0 + return cget(name) + end + rescue + end + + # try 3 : widget method or widget configure + begin + unless @widget + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + end + @widget.__send__(id, *args) + rescue + end + + # unknown method + super(id, *args) + # fail RuntimeError, "unknown method '#{name}' for #{self.inspect}" + end + + def tk_send(cmd, *rest) + begin + tk_call(@master, 'component', @component, cmd, *rest) + rescue + unless @path + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + tk_call(@path, cmd, *rest) + end + end + + def tk_send_without_enc(cmd, *rest) + begin + tk_call_without_enc(@master, 'component', @component, cmd, *rest) + rescue + unless @path + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + tk_call_without_enc(@path, cmd, *rest) + end + end + + def tk_send_with_enc(cmd, *rest) + begin + tk_call_with_enc(@master, 'component', @component, cmd, *rest) + rescue + unless @path + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + tk_call_with_enc(@path, cmd, *rest) + end + end + + #def bind(*args) + # unless @widget + # begin + # @widget = window(tk_call(@master, 'component', @component)) + # @path = @widget.path + # rescue + # fail RuntimeError, 'component is not assigned to a widget' + # end + # end + # @widget.bind(*args) + #end + def bind(context, *args) + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @widget.bind(context, cmd, *args) + end + + #def bind_append(*args) + # unless @widget + # begin + # @widget = window(tk_call(@master, 'component', @component)) + # @path = @widget.path + # rescue + # fail RuntimeError, 'component is not assigned to a widget' + # end + # end + # @widget.bind_append(*args) + #end + def bind_append(context, *args) + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @widget.bind_append(context, cmd, *args) + end + + def bind_remove(*args) + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + @widget.bind_remove(*args) + end + + def bindinfo(*args) + unless @widget + begin + @widget = window(tk_call(@master, 'component', @component)) + @path = @widget.path + rescue + fail RuntimeError, 'component is not assigned to a widget' + end + end + @widget.bindinfo(*args) + end + + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/setup.rb new file mode 100644 index 0000000..e47b64a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/itk/setup.rb @@ -0,0 +1,13 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# + + +# set [incr Tk] library directory + +# ENV['ITK_LIBRARY'] = '/usr/local/ActiveTcl/lib/itk3.2/' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets.rb new file mode 100644 index 0000000..ebd4cf7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets.rb @@ -0,0 +1,94 @@ +# +# [incr Widgets] support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/itcl' +require 'tkextlib/itk' + +# call setup script for general 'tkextlib' libraries +#require 'tkextlib/setup.rb' + +# call setup script +#require 'tkextlib/iwidgets/setup.rb' + +# load all image format handlers +#TkPackage.require('Iwidgets', '4.0') +TkPackage.require('Iwidgets') + +module Tk + module Iwidgets + TkComm::TkExtlibAutoloadModule.unshift(self) + + extend TkCore + + PACKAGE_NAME = 'Iwidgets'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Iwidgets') + rescue + '' + end + end + + #################################################### + + autoload :Buttonbox, 'tkextlib/iwidgets/buttonbox' + autoload :Calendar, 'tkextlib/iwidgets/calendar' + autoload :Canvasprintbox, 'tkextlib/iwidgets/canvasprintbox' + autoload :Canvasprintdialog, 'tkextlib/iwidgets/canvasprintdialog' + autoload :Checkbox, 'tkextlib/iwidgets/checkbox' + autoload :Combobox, 'tkextlib/iwidgets/combobox' + autoload :Dateentry, 'tkextlib/iwidgets/dateentry' + autoload :Datefield, 'tkextlib/iwidgets/datefield' + autoload :Dialog, 'tkextlib/iwidgets/dialog' + autoload :Dialogshell, 'tkextlib/iwidgets/dialogshell' + autoload :Disjointlistbox, 'tkextlib/iwidgets/disjointlistbox' + autoload :Entryfield, 'tkextlib/iwidgets/entryfield' + autoload :Extbutton, 'tkextlib/iwidgets/extbutton' + autoload :Extfileselectionbox, 'tkextlib/iwidgets/extfileselectionbox' + autoload :Extfileselectiondialog,'tkextlib/iwidgets/extfileselectiondialog' + autoload :Feedback, 'tkextlib/iwidgets/feedback' + autoload :Fileselectionbox, 'tkextlib/iwidgets/fileselectionbox' + autoload :Fileselectiondialog, 'tkextlib/iwidgets/fileselectiondialog' + autoload :Finddialog, 'tkextlib/iwidgets/finddialog' + autoload :Hierarchy, 'tkextlib/iwidgets/hierarchy' + autoload :Hyperhelp, 'tkextlib/iwidgets/hyperhelp' + autoload :Labeledframe, 'tkextlib/iwidgets/labeledframe' + autoload :Labeledwidget, 'tkextlib/iwidgets/labeledwidget' + autoload :Mainwindow, 'tkextlib/iwidgets/mainwindow' + autoload :Menubar, 'tkextlib/iwidgets/menubar' + autoload :Messagebox, 'tkextlib/iwidgets/messagebox' + autoload :Messagedialog, 'tkextlib/iwidgets/messagedialog' + autoload :Notebook, 'tkextlib/iwidgets/notebook' + autoload :Optionmenu, 'tkextlib/iwidgets/optionmenu' + autoload :Panedwindow, 'tkextlib/iwidgets/panedwindow' + autoload :Pushbutton, 'tkextlib/iwidgets/pushbutton' + autoload :Promptdialog, 'tkextlib/iwidgets/promptdialog' + autoload :Radiobox, 'tkextlib/iwidgets/radiobox' + autoload :Scrolledcanvas, 'tkextlib/iwidgets/scrolledcanvas' + autoload :Scrolledframe, 'tkextlib/iwidgets/scrolledframe' + autoload :Scrolledhtml, 'tkextlib/iwidgets/scrolledhtml' + autoload :Scrolledlistbox, 'tkextlib/iwidgets/scrolledlistbox' + autoload :Scrolledtext, 'tkextlib/iwidgets/scrolledtext' + autoload :Scrolledwidget, 'tkextlib/iwidgets/scrolledwidget' + autoload :Selectionbox, 'tkextlib/iwidgets/selectionbox' + autoload :Selectiondialog, 'tkextlib/iwidgets/selectiondialog' + autoload :Shell, 'tkextlib/iwidgets/shell' + autoload :Spindate, 'tkextlib/iwidgets/spindate' + autoload :Spinint, 'tkextlib/iwidgets/spinint' + autoload :Spinner, 'tkextlib/iwidgets/spinner' + autoload :Spintime, 'tkextlib/iwidgets/spintime' + autoload :Tabnotebook, 'tkextlib/iwidgets/tabnotebook' + autoload :Tabset, 'tkextlib/iwidgets/tabset' + autoload :Timeentry, 'tkextlib/iwidgets/timeentry' + autoload :Timefield, 'tkextlib/iwidgets/timefield' + autoload :Toolbar, 'tkextlib/iwidgets/toolbar' + autoload :Watch, 'tkextlib/iwidgets/watch' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb new file mode 100644 index 0000000..05d58c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb @@ -0,0 +1,120 @@ +# +# tkextlib/iwidgets/buttonbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Buttonbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Buttonbox + TkCommandNames = ['::iwidgets::buttonbox'.freeze].freeze + WidgetClassName = 'Buttonbox'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'buttoncget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'buttonconfigure', id] + end + private :__item_config_cmd + + def __item_boolval_optkeys(id) + super(id) << 'defaultring' + end + private :__item_boolval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias buttoncget itemcget + alias buttoncget_strict itemcget_strict + alias buttonconfigure itemconfigure + alias buttonconfiginfo itemconfiginfo + alias current_buttonconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'add', tagid(tag), *hash_kv(keys)) + tag + end + + def default(idx) + tk_call(@path, 'default', index(idx)) + self + end + + def delete(idx) + tk_call(@path, 'delete', index(idx)) + self + end + + def hide(idx) + tk_call(@path, 'hide', index(idx)) + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)) + tag + end + + def invoke(idx=nil) + if idx + tk_call(@path, 'invoke', index(idx)) + else + tk_call(@path, 'invoke') + end + self + end + + def show(idx) + tk_call(@path, 'show', index(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/calendar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/calendar.rb new file mode 100644 index 0000000..8495f0e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/calendar.rb @@ -0,0 +1,125 @@ +# +# tkextlib/iwidgets/calendar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Calendar < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Calendar + TkCommandNames = ['::iwidgets::calendar'.freeze].freeze + WidgetClassName = 'Calendar'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() + [ + 'buttonforeground', 'outline', 'selectcolor', + 'weekdaybackground', 'weekendbackground' + ] + end + private :__strval_optkeys + + def __listval_optkeys + super() << 'days' + end + private :__listval_optkeys + + def __font_optkeys + super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont'] + end + private :__font_optkeys + + #################################### + + include Tk::ValidateConfigure + + class CalendarCommand < TkValidateCommand + #class CalCmdArgs < TkUtil::CallbackSubst + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ [?d, ?s, :date], nil ] + PROC_TBL = [ [?s, TkComm.method(:string) ], nil ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + # array of config-option key (string or symbol) + ['command'] + end + + #def initialize(cmd = Proc.new, *args) + # _initialize_for_cb_class(CalCmdArgs, cmd, *args) + #end + end + + def __validation_class_list + super() << CalendarCommand + end + + Tk::ValidateConfigure.__def_validcmd(binding, CalendarCommand) +=begin + def command(cmd = Proc.new, args = nil) + if cmd.kind_of?(CalendarCommand) + configure('command', cmd) + elsif args + configure('command', [cmd, args]) + else + configure('command', cmd) + end + end +=end + + #################################### + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def select(date) + tk_call(@path, 'select', date) + self + end + + def show(date) + tk_call(@path, 'show', date) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb new file mode 100644 index 0000000..fa5e90a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb @@ -0,0 +1,53 @@ +# +# tkextlib/iwidgets/canvasprintbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Canvasprintbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Canvasprintbox + TkCommandNames = ['::iwidgets::canvasprintbox'.freeze].freeze + WidgetClassName = 'Canvasprintbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'filename' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'stretch' + end + private :__boolval_optkeys + + def get_output + tk_call(@path, 'getoutput') + end + + def print + bool(tk_call(@path, 'print')) + end + + def refresh + tk_call(@path, 'refresh') + self + end + + def set_canvas(win) + tk_call(@path, 'setcanvas', win) + self + end + + def stop + tk_call(@path, 'stop') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb new file mode 100644 index 0000000..bbf5076 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb @@ -0,0 +1,38 @@ +# +# tkextlib/iwidgets/canvasprintdialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Canvasprintdialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Canvasprintdialog + TkCommandNames = ['::iwidgets::canvasprintdialog'.freeze].freeze + WidgetClassName = 'Canvasprintdialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_output + tk_call(@path, 'getoutput') + end + + def print + bool(tk_call(@path, 'print')) + end + + def refresh + tk_call(@path, 'refresh') + self + end + + def set_canvas(win) + tk_call(@path, 'setcanvas', win) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/checkbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/checkbox.rb new file mode 100644 index 0000000..c85d356 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/checkbox.rb @@ -0,0 +1,129 @@ +# +# tkextlib/iwidgets/checkbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Checkbox < Tk::Iwidgets::Labeledframe + end + end +end + +class Tk::Iwidgets::Checkbox + TkCommandNames = ['::iwidgets::checkbox'.freeze].freeze + WidgetClassName = 'Checkbox'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'buttoncget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'buttonconfigure', id] + end + private :__item_config_cmd + + def __item_boolval_optkeys(id) + super(id) << 'defaultring' + end + private :__item_boolval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias buttoncget itemcget + alias buttoncget_strict itemcget_strict + alias buttonconfigure itemconfigure + alias buttonconfiginfo itemconfiginfo + alias current_buttonconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'add', tagid(tag), *hash_kv(keys)) + tag + end + + def delete(idx) + tk_call(@path, 'delete', index(idx)) + self + end + + def deselect(idx) + tk_call(@path, 'deselect', index(idx)) + self + end + + def flash(idx) + tk_call(@path, 'flash', index(idx)) + self + end + + def get_tags + simplelist(tk_call_without_enc(@path, 'get')) + end + + def get_objs + simplelist(tk_call_without_enc(@path, 'get')).collect{|id| + Tk::Itk::Component.id2obj(self, id) + } + end + + def get(idx=nil) + if idx + bool(tk_call_without_enc(@path, 'get', index(idx))) + else + get_tags + end + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)) + tag + end + + def select(idx) + tk_call(@path, 'select', index(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/combobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/combobox.rb new file mode 100644 index 0000000..a6d54d7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/combobox.rb @@ -0,0 +1,104 @@ +# +# tkextlib/iwidgets/combobox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Combobox < Tk::Iwidgets::Entryfield + end + end +end + +class Tk::Iwidgets::Combobox + TkCommandNames = ['::iwidgets::combobox'.freeze].freeze + WidgetClassName = 'Combobox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'completion' << 'dropdown' << 'editable' << 'unique' + end + private :__boolval_optkeys + + def clear(component=None) + tk_call(@path, 'clear', component) + self + end + + def delete_list(first, last=None) + tk_call(@path, 'delete', 'list', first, last) + self + end + + def delete_entry(first, last=None) + tk_call(@path, 'delete', 'entry', first, last) + self + end + + def get_list_contents(index) + tk_call(@path, 'get', index) + end + + def insert_list(idx, *elems) + tk_call(@path, 'insert', 'list', idx, *elems) + self + end + + def insert_entry(idx, *elems) + tk_call(@path, 'insert', 'entry', idx, *elems) + self + end + + # listbox methods + def size + tk_send_without_enc('size').to_i + end + def see(index) + tk_send_without_enc('see', index) + self + end + def selection_anchor(index) + tk_send_without_enc('selection', 'anchor', index) + self + end + def selection_clear(first, last=None) + tk_send_without_enc('selection', 'clear', first, last) + self + end + def selection_includes(index) + bool(tk_send_without_enc('selection', 'includes', index)) + end + def selection_set(first, last=None) + tk_send_without_enc('selection', 'set', first, last) + self + end + + # scrolledlistbox methods + def get_curselection + tk_call(@path, 'getcurselection') + end + def justify(dir) + tk_call(@path, 'justify', dir) + self + end + def sort(*params, &b) + # see 'lsort' man page about params + if b + tk_call(@path, 'sort', '-command', proc(&b), *params) + else + tk_call(@path, 'sort', *params) + end + self + end + def sort_ascending + tk_call(@path, 'sort', 'ascending') + self + end + def sort_descending + tk_call(@path, 'sort', 'descending') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dateentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dateentry.rb new file mode 100644 index 0000000..0a8897f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dateentry.rb @@ -0,0 +1,20 @@ +# +# tkextlib/iwidgets/dateentry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Dateentry < Tk::Iwidgets::Datefield + end + end +end + +class Tk::Iwidgets::Dateentry + TkCommandNames = ['::iwidgets::dateentry'.freeze].freeze + WidgetClassName = 'Dateentry'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/datefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/datefield.rb new file mode 100644 index 0000000..632f333 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/datefield.rb @@ -0,0 +1,58 @@ +# +# tkextlib/iwidgets/datefield.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Datefield < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Datefield + TkCommandNames = ['::iwidgets::datefield'.freeze].freeze + WidgetClassName = 'Datefield'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'gmt' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'textbackground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def valid? + bool(tk_call(@path, 'isvalid')) + end + alias isvalid? valid? + + def show(date=None) + tk_call(@path, 'show', date) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialog.rb new file mode 100644 index 0000000..8540eae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialog.rb @@ -0,0 +1,20 @@ +# +# tkextlib/iwidgets/dialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Dialog < Tk::Iwidgets::Dialogshell + end + end +end + +class Tk::Iwidgets::Dialog + TkCommandNames = ['::iwidgets::dialog'.freeze].freeze + WidgetClassName = 'Dialog'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb new file mode 100644 index 0000000..8d43cc0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb @@ -0,0 +1,120 @@ +# +# tkextlib/iwidgets/dialogshell.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Dialogshell < Tk::Iwidgets::Shell + end + end +end + +class Tk::Iwidgets::Dialogshell + TkCommandNames = ['::iwidgets::dialogshell'.freeze].freeze + WidgetClassName = 'Dialogshell'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'buttoncget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'buttonconfigure', id] + end + private :__item_config_cmd + + def __item_boolval_optkeys(id) + super(id) << 'defaultring' + end + private :__item_boolval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias buttoncget itemcget + alias buttoncget_strict itemcget_strict + alias buttonconfigure itemconfigure + alias buttonconfiginfo itemconfiginfo + alias current_buttonconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'add', tagid(tag), *hash_kv(keys)) + tag + end + + def default(idx) + tk_call(@path, 'default', index(idx)) + self + end + + def delete(idx) + tk_call(@path, 'delete', index(idx)) + self + end + + def hide(idx) + tk_call(@path, 'hide', index(idx)) + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)) + tag + end + + def invoke(idx=nil) + if idx + tk_call(@path, 'invoke', index(idx)) + else + tk_call(@path, 'invoke') + end + self + end + + def show(idx) + tk_call(@path, 'show', index(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb new file mode 100644 index 0000000..9bc063b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb @@ -0,0 +1,50 @@ +# +# tkextlib/iwidgets/disjointlistbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Disjointlistbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Disjointlistbox + TkCommandNames = ['::iwidgets::disjointlistbox'.freeze].freeze + WidgetClassName = 'Disjointlistbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel' + end + private :__strval_optkeys + + def set_lhs(*items) + tk_call(@path, 'setlhs', items) + self + end + def set_rhs(*items) + tk_call(@path, 'setrhs', items) + self + end + + def get_lhs + simplelist(tk_call(@path, 'getlhs')) + end + def get_rhs + simplelist(tk_call(@path, 'getrhs')) + end + + def insert_lhs(*items) + tk_call(@path, 'insertlhs', items) + self + end + def insert_rhs(*items) + tk_call(@path, 'insertrhs', items) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/entryfield.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/entryfield.rb new file mode 100644 index 0000000..d53df21 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/entryfield.rb @@ -0,0 +1,185 @@ +# +# tkextlib/iwidgets/entryfield.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Entryfield < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Entryfield + TkCommandNames = ['::iwidgets::entryfield'.freeze].freeze + WidgetClassName = 'Entryfield'.freeze + WidgetClassNames[WidgetClassName] = self + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + #################################### + + include Tk::ValidateConfigure + + class EntryfieldValidate < TkValidateCommand + #class CalCmdArgs < TkUtil::CallbackSubst + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?s, :char ], + [ ?P, ?s, :post ], + [ ?S, ?s, :current ], + [ ?W, ?w, :widget ], + nil + ] + PROC_TBL = [ + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + end + + def self._config_keys + ['validate', 'invalid'] + end + end + + def __validation_class_list + super() << EntryfieldValidate + end + + Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate) +=begin + def validate(cmd = Proc.new, args = nil) + if cmd.kind_of?(ValidateCmd) + configure('validate', cmd) + elsif args + configure('validate', [cmd, args]) + else + configure('validate', cmd) + end + end + + def invalid(cmd = Proc.new, args = nil) + if cmd.kind_of?(ValidateCmd) + configure('invalid', cmd) + elsif args + configure('invalid', [cmd, args]) + else + configure('invalid', cmd) + end + end +=end + + #################################### + + def clear + tk_call(@path, 'clear') + self + end + + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + + def value + _fromUTF8(tk_send_without_enc('get')) + end + def value= (val) + tk_send_without_enc('delete', 0, 'end') + tk_send_without_enc('insert', 0, _get_eval_enc_str(val)) + val + end + alias get value + alias set value= + + def cursor=(index) + tk_send_without_enc('icursor', index) + #self + index + end + alias icursor cursor= + + def index(index) + number(tk_send_without_enc('index', index)) + end + + def insert(pos,text) + tk_send_without_enc('insert', pos, _get_eval_enc_str(text)) + self + end + + def mark(pos) + tk_send_without_enc('scan', 'mark', pos) + self + end + def dragto(pos) + tk_send_without_enc('scan', 'dragto', pos) + self + end + def selection_adjust(index) + tk_send_without_enc('selection', 'adjust', index) + self + end + def selection_clear + tk_send_without_enc('selection', 'clear') + self + end + def selection_from(index) + tk_send_without_enc('selection', 'from', index) + self + end + def selection_present() + bool(tk_send_without_enc('selection', 'present')) + end + def selection_range(s, e) + tk_send_without_enc('selection', 'range', s, e) + self + end + def selection_to(index) + tk_send_without_enc('selection', 'to', index) + self + end + + # based on tk/scrollable.rb + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extbutton.rb new file mode 100644 index 0000000..158d9d4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extbutton.rb @@ -0,0 +1,40 @@ +# +# tkextlib/iwidgets/extbutton.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Extbutton < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Extbutton + TkCommandNames = ['::iwidgets::extbutton'.freeze].freeze + WidgetClassName = 'Extbutton'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'bitmapforeground' << 'ringbackground' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'defaultring' + end + private :__boolval_optkeys + + def invoke + tk_call(@path, 'invoke') + self + end + + def flash + tk_call(@path, 'flash') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb new file mode 100644 index 0000000..501f4c9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb @@ -0,0 +1,46 @@ +# +# tkextlib/iwidgets/extfileselectionbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Extfileselectionbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Extfileselectionbox + TkCommandNames = ['::iwidgets::extfileselectionbox'.freeze].freeze + WidgetClassName = 'Extfileselectionbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() + [ + 'dirslabel', 'fileslabel', 'filterlabel', 'mask', 'nomatchstring', + 'selectionlabel' + ] + end + private :__strval_optkeys + + def __boolval_optkeys + super() + ['dirson', 'fileson', 'filteron', 'selectionon'] + end + private :__boolval_optkeys + + def child_site + window(tk_call(@path, 'childsite')) + end + + def filter + tk_call(@path, 'filter') + self + end + + def get + tk_call(@path, 'get') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb new file mode 100644 index 0000000..14388be --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb @@ -0,0 +1,33 @@ +# +# tkextlib/iwidgets/extfileselectiondialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Extfileselectiondialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Extfileselectiondialog + TkCommandNames = ['::iwidgets::extfileselectiondialog'.freeze].freeze + WidgetClassName = 'Extfileselectiondialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def child_site + window(tk_call(@path, 'childsite')) + end + + def filter + tk_call(@path, 'filter') + self + end + + def get + tk_call(@path, 'get') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/feedback.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/feedback.rb new file mode 100644 index 0000000..0a25237 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/feedback.rb @@ -0,0 +1,35 @@ +# +# tkextlib/iwidgets/feedback.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Feedback < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Feedback + TkCommandNames = ['::iwidgets::feedback'.freeze].freeze + WidgetClassName = 'Feedback'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'barcolor' + end + private :__strval_optkeys + + def reset + tk_call(@path, 'reset') + self + end + + def step(inc=1) + tk_call(@path, 'step', inc) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb new file mode 100644 index 0000000..7b331d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb @@ -0,0 +1,46 @@ +# +# tkextlib/iwidgets/fileselectionbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Fileselectionbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Fileselectionbox + TkCommandNames = ['::iwidgets::fileselectionbox'.freeze].freeze + WidgetClassName = 'Fileselectionbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() + [ + 'directory', 'dirslabel', 'fileslabel', 'filterlabel', 'mask', + 'nomatchstring', 'selectionlabel' + ] + end + private :__strval_optkeys + + def __boolval_optkeys + super() + ['dirson', 'fileson', 'filteron', 'selectionon'] + end + private :__boolval_optkeys + + def child_site + window(tk_call(@path, 'childsite')) + end + + def filter + tk_call(@path, 'filter') + self + end + + def get + tk_call(@path, 'get') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb new file mode 100644 index 0000000..50f459e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb @@ -0,0 +1,33 @@ +# +# tkextlib/iwidgets/fileselectiondialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Fileselectiondialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Fileselectiondialog + TkCommandNames = ['::iwidgets::fileselectiondialog'.freeze].freeze + WidgetClassName = 'Fileselectiondialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def child_site + window(tk_call(@path, 'childsite')) + end + + def filter + tk_call(@path, 'filter') + self + end + + def get + tk_call(@path, 'get') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/finddialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/finddialog.rb new file mode 100644 index 0000000..75e219c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/finddialog.rb @@ -0,0 +1,42 @@ +# +# tkextlib/iwidgets/finddialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Finddialog < Tk::Iwidgets::Dialogshell + end + end +end + +class Tk::Iwidgets::Finddialog + TkCommandNames = ['::iwidgets::finddialog'.freeze].freeze + WidgetClassName = 'Finddialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() + [ + 'patternbackground', 'patternforeground', + 'searchbackground', 'searchforeground' + ] + end + private :__strval_optkeys + + def __val2ruby_optkeys # { key=>proc, ... } + super().update('textwidget'=>proc{|v| window(v)}) + end + private :__val2ruby_optkeys + + def clear + tk_call(@path, 'clear') + self + end + + def find + tk_call(@path, 'find') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb new file mode 100644 index 0000000..d9220fe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb @@ -0,0 +1,365 @@ +# +# tkextlib/iwidgets/hierarchy.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/text' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Hierarchy < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Hierarchy + ItemConfCMD = ['tag'.freeze, 'configure'.freeze].freeze + include TkTextTagConfig + + TkCommandNames = ['::iwidgets::hierarchy'.freeze].freeze + WidgetClassName = 'Hierarchy'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include Tk::ValidateConfigure + + class QueryCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ [?n, ?s, :node], nil ] + PROC_TBL = [ [?s, TkComm.method(:string) ], nil ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + # array of config-option key (string or symbol) + ['querycommand'] + end + end + + class IndicatorCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?n, ?s, :node ], + [ ?s, ?b, :status ], + nil + ] + + PROC_TBL = [ + [ ?s, TkComm.method(:string) ], + [ ?b, TkComm.method(:bool) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + # array of config-option key (string or symbol) + ['iconcommand', 'icondblcommand', 'imagedblcommand'] + end + end + + class IconCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?n, ?s, :node ], + [ ?i, ?s, :icon ], + nil + ] + PROC_TBL = [ [ ?s, TkComm.method(:string) ], nil ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + # array of config-option key (string or symbol) + ['dblclickcommand', 'imagecommand', 'selectcommand'] + end + end + + def __validation_class_list + super() << QueryCommand << IndicatorCommand << IconCommand + end + + Tk::ValidateConfigure.__def_validcmd(binding, QueryCommand) + Tk::ValidateConfigure.__def_validcmd(binding, IndicatorCommand) + Tk::ValidateConfigure.__def_validcmd(binding, IconCommand) + + #################################### + + def __boolval_optkeys + super() << 'alwaysquery' << 'expanded' << 'filter' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'markbackground' << 'markforeground' << 'textbackground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + def clear + tk_call(@path, 'clear') + self + end + + def collapse(node) + tk_call(@path, 'collapse') + self + end + + def current + tk_call(@path, 'current') + end + + def draw(mode=None) + case mode + when None + # do nothing + when 'now', :now + mode = '-now' + when 'eventually', :eventually + mode = '-eventually' + when String, Symbol + mode = mode.to_s + mode = '-' << mode if mode[0] != ?- + end + tk_call(@path, 'draw', mode) + end + + def expand(node) + tk_call(@path, 'expand', node) + self + end + + def expanded?(node) + bool(tk_call(@path, 'expanded', node)) + end + + def exp_state + list(tk_call(@path, 'expState')) + end + alias expand_state exp_state + alias expanded_list exp_state + + def mark_clear + tk_call(@path, 'mark', 'clear') + self + end + def mark_add(*nodes) + tk_call(@path, 'mark', 'add', *nodes) + self + end + def mark_remove(*nodes) + tk_call(@path, 'mark', 'remove', *nodes) + self + end + def mark_get + list(tk_call(@path, 'mark', 'get')) + end + + def refresh(node) + tk_call(@path, 'refresh', node) + self + end + + def prune(node) + tk_call(@path, 'prune', node) + self + end + + def selection_clear + tk_call(@path, 'selection', 'clear') + self + end + def selection_add(*nodes) + tk_call(@path, 'selection', 'add', *nodes) + self + end + def selection_remove(*nodes) + tk_call(@path, 'selection', 'remove', *nodes) + self + end + def selection_get + list(tk_call(@path, 'selection', 'get')) + end + + def toggle(node) + tk_call(@path, 'toggle', node) + self + end + + # based on Tk::Text widget + + def bbox(index) + list(tk_send_without_enc('bbox', _get_eval_enc_str(index))) + end + + def compare(idx1, op, idx2) + bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1), + op, _get_eval_enc_str(idx2))) + end + + def debug + bool(tk_send_without_enc('debug')) + end + def debug=(boolean) + tk_send_without_enc('debug', boolean) + #self + boolean + end + + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + + def dlineinfo(index) + list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index))) + end + + def get(*index) + _fromUTF8(tk_send_without_enc('get', *index)) + end + + def index(index) + tk_send_without_enc('index', _get_eval_enc_str(index)) + end + + def insert(index, chars, *tags) + if tags[0].kind_of? Array + # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ... + args = [chars] + while tags.size > 0 + args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist + args << tags.shift if tags.size > 0 # chars + end + super(index, *args) + else + # single chars-taglist argument :: str, tag, tag, ... + if tags.size == 0 + super(index, chars) + else + super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' ')) + end + end + end + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + def see(index) + tk_send_without_enc('see', index) + self + end + + # based on tk/scrollable.rb + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb new file mode 100644 index 0000000..77b0e09 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb @@ -0,0 +1,50 @@ +# +# tkextlib/iwidgets/hyperhelp.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Hyperhelp < Tk::Iwidgets::Shell + end + end +end + +class Tk::Iwidgets::Hyperhelp + TkCommandNames = ['::iwidgets::hyperhelp'.freeze].freeze + WidgetClassName = 'Hyperhelp'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'helpdir' + end + private :__strval_optkeys + + def __listval_optkeys + super() << 'topics' + end + private :__listval_optkeys + + def show_topic(topic) + tk_call(@path, 'showtopic', topic) + self + end + + def follow_link(href) + tk_call(@path, 'followlink', href) + self + end + + def forward + tk_call(@path, 'forward') + self + end + + def back + tk_call(@path, 'back') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb new file mode 100644 index 0000000..e77e850 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb @@ -0,0 +1,39 @@ +# +# tkextlib/iwidgets/labeledframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Labeledframe < Tk::Itk::Archetype + end + end +end + +class Tk::Iwidgets::Labeledframe + TkCommandNames = ['::iwidgets::labeledframe'.freeze].freeze + WidgetClassName = 'Labeledframe'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'labeltext' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'labelvariable' + end + private :__tkvariable_optkeys + + def __font_optkeys + super() << 'labelfont' + end + private :__font_optkeys + + def child_site + window(tk_call(@path, 'childsite')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb new file mode 100644 index 0000000..9938771 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb @@ -0,0 +1,45 @@ +# +# tkextlib/iwidgets/labeledwidget.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Labeledwidget < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Labeledwidget + extend TkCore + + TkCommandNames = ['::iwidgets::labeledwidget'.freeze].freeze + WidgetClassName = 'Labeledwidget'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'labeltext' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'labelvariable' + end + private :__tkvariable_optkeys + + def __font_optkeys + super() << 'labelfont' + end + private :__font_optkeys + + def self.alignlabels(*wins) + tk_call('::iwidgets::Labeledwidget::alignlabels', *wins) + end + + def child_site + window(tk_call(@path, 'childsite')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb new file mode 100644 index 0000000..4b2541b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb @@ -0,0 +1,67 @@ +# +# tkextlib/iwidgets/mainwindow.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Mainwindow < Tk::Iwidgets::Shell + end + end +end + +class Tk::Iwidgets::Mainwindow + TkCommandNames = ['::iwidgets::mainwindow'.freeze].freeze + WidgetClassName = 'Mainwindow'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'helpline' << 'statusline' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'menubarbackground' << 'menubarforeground' << 'toolbarforeground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'menubarfont' << 'toolbarfont' + end + private :__font_optkeys + + def child_site + window(tk_call(@path, 'childsite')) + end + + def menubar(*args) + unless args.empty? + tk_call(@path, 'menubar', *args) + end + window(tk_call(@path, 'menubar')) + end + + def mousebar(*args) + unless args.empty? + tk_call(@path, 'mousebar', *args) + end + window(tk_call(@path, 'mousebar')) + end + + def msgd(*args) + unless args.empty? + tk_call(@path, 'msgd', *args) + end + window(tk_call(@path, 'msgd')) + end + + def toolbar(*args) + unless args.empty? + tk_call(@path, 'toolbar', *args) + end + window(tk_call(@path, 'toolbar')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/menubar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/menubar.rb new file mode 100644 index 0000000..5aaefbe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/menubar.rb @@ -0,0 +1,211 @@ +# +# tkextlib/iwidgets/menubar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Menubar < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Menubar + TkCommandNames = ['::iwidgets::menubar'.freeze].freeze + WidgetClassName = 'Menubar'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'menubuttons' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'helpvariable' + end + private :__tkvariable_optkeys + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'menucget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'menuconfigure', id] + end + private :__item_config_cmd + + def __item_strval_optkeys(id) + super(id) << 'selectcolor' + end + private :__item_strval_optkeys + + def __item_tkvariable_optkeys(id) + super(id) << 'helpstr' + end + private :__item_tkvariable_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias menucget itemcget + alias menucget_strict itemcget_strict + alias menuconfigure itemconfigure + alias menuconfiginfo itemconfiginfo + alias current_menuconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __methodcall_optkeys + {'menubuttons'=>'menubuttons'} + end + + def menubuttons(val = nil) + unless val + return tk_call(@path, 'cget', '-menubuttons') + end + + tk_call(@path, 'configure', '-menubuttons', _parse_menu_spec(val)) + self + end + + def _parse_menu_spec(menu_spec) + ret = '' + menu_spec.each{|spec| + next unless spec + + if spec.kind_of?(Hash) + args = [spec] + type = 'options' + else + type, *args = spec + end + + type = type.to_s + case type + when 'options' + keys = args[0] + ary = [type] + ary.concat(hash_kv(keys)) + ret << array2tk_list(ary) << "\n" + + when 'menubutton', 'cascade' + name, keys = args + if keys + ary = [type, name] + keys = _symbolkey2str(keys) + keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu') + ary.concat(hash_kv(keys)) + ret << array2tk_list(ary) << "\n" + else + ret << array2tk_list([type, name]) << "\n" + end + + else + name, keys = args + if keys + ary = [type, name] + ary.concat(hash_kv(keys)) + ret << array2tk_list(ary) << "\n" + else + ret << array2tk_list([type, name]) << "\n" + end + end + } + ret + end + + #################################### + + def add(type, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + keys = _symbolkey2str(keys) + keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu') + tk_call(@path, 'add', type, tagid(tag), *hash_kv(keys)) + tag + end + + def delete(path1, path2=nil) + if path2 + else + tk_call(@path, 'delete', index(idx)) + end + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, type, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + keys = _symbolkey2str(keys) + keys['menu'] = _parse_menu_spec(keys['menu']) if keys.key?('menu') + tk_call(@path, 'insert', index(idx), type, tagid(tag), *hash_kv(keys)) + tag + end + + def invoke(idx) + tk_call(@path, 'invoke', index(idx)) + self + end + + def menupath(pat) + if (win = tk_call(@path, 'path', pat)) == '-1' + return nil + end + window(win) + end + def menupath_glob(pat) + if (win = tk_call(@path, 'path', '-glob', pat)) == '-1' + return nil + end + window(win) + end + def menupath_tclregexp(pat) + if (win = tk_call(@path, 'path', '-regexp', pat)) == '-1' + return nil + end + window(win) + end + + def type(path) + tk_call(@path, 'type', path) + end + + def yposition(path) + number(tk_call(@path, 'yposition', path)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagebox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagebox.rb new file mode 100644 index 0000000..98ac329 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagebox.rb @@ -0,0 +1,92 @@ +# +# tkextlib/iwidgets/messagebox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Messagebox < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Messagebox + TkCommandNames = ['::iwidgets::messagebox'.freeze].freeze + WidgetClassName = 'Messagebox'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'type', 'cget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'type', 'configure', id] + end + private :__item_config_cmd + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + def __item_boolval_optkeys(id) + super(id) << 'bell' << 'show' + end + private :__item_boolval_optkeys + + alias typecget itemcget + alias typecget_strict itemcget_strict + alias typeconfigure itemconfigure + alias typeconfiginfo itemconfiginfo + alias current_typeconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __strval_optkeys + super() << 'filename' << 'savedir' + end + private :__strval_optkeys + + def type_add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + unless tag + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'type', 'add', tagid(tag), *hash_kv(keys)) + tag + end + + def clear + tk_call(@path, 'clear') + self + end + + def export(file) + tk_call(@path, 'export', file) + self + end + + def issue(string, type=None, *args) + tk_call(@path, 'issue', string, tagid(type), *args) + self + end + +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb new file mode 100644 index 0000000..c19b83e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb @@ -0,0 +1,20 @@ +# +# tkextlib/iwidgets/messagedialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Messagedialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Messagedialog + TkCommandNames = ['::iwidgets::messagedialog'.freeze].freeze + WidgetClassName = 'Messagedialog'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/notebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/notebook.rb new file mode 100644 index 0000000..03b5063 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/notebook.rb @@ -0,0 +1,174 @@ +# +# tkextlib/iwidgets/notebook.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Notebook < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Notebook + TkCommandNames = ['::iwidgets::notebook'.freeze].freeze + WidgetClassName = 'Notebook'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'pagecget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'pageconfigure', id] + end + private :__item_config_cmd + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias pagecget itemcget + alias pagecget_strict itemcget_strict + alias pageconfigure itemconfigure + alias pageconfiginfo itemconfiginfo + alias current_pageconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __boolval_optkeys + super() << 'auto' + end + private :__boolval_optkeys + + def add(keys={}) + window(tk_call(@path, 'add', *hash_kv(keys))) + end + + def child_site_list + list(tk_call(@path, 'childsite')) + end + + def child_site(idx) + if (new_idx = self.index(idx)) < 0 + new_idx = tagid(idx) + end + window(tk_call(@path, 'childsite', new_idx)) + end + + def delete(idx1, idx2=nil) + if (new_idx1 = self.index(idx1)) < 0 + new_idx1 = tagid(idx1) + end + if idx2 + if (new_idx2 = self.index(idx2)) < 0 + new_idx2 = tagid(idx2) + end + tk_call(@path, 'delete', new_idx1, new_idx2) + else + tk_call(@path, 'delete', new_idx1) + end + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, keys={}) + if (new_idx = self.index(idx)) < 0 + new_idx = tagid(idx) + end + window(tk_call(@path, 'insert', new_idx, *hash_kv(keys))) + end + + def next + tk_call(@path, 'next') + self + end + + def prev + tk_call(@path, 'prev') + self + end + + def select(idx) + if (new_idx = self.index(idx)) < 0 + new_idx = tagid(idx) + end + tk_call(@path, 'select', new_idx) + self + end + + def scrollcommand(cmd=Proc.new) + configure_cmd 'scrollcommand', cmd + self + end + alias xscrollcommand scrollcommand + alias yscrollcommand scrollcommand + + def xscrollbar(bar=nil) + if bar + @scrollbar = bar + @scrollbar.orient 'horizontal' + self.scrollcommand {|*arg| @scrollbar.set(*arg)} + @scrollbar.command {|*arg| self.xview(*arg)} + Tk.update # avoid scrollbar trouble + end + @scrollbar + end + def yscrollbar(bar=nil) + if bar + @scrollbar = bar + @scrollbar.orient 'vertical' + self.scrollcommand {|*arg| @scrollbar.set(*arg)} + @scrollbar.command {|*arg| self.yview(*arg)} + Tk.update # avoid scrollbar trouble + end + @scrollbar + end + alias scrollbar yscrollbar + + def view(*idxs) + if idxs.size == 0 + idx = num_or_str(tk_send_without_enc('view')) + if idx.kind_of?(Fixnum) && idx < 0 + nil + else + idx + end + else + tk_send_without_enc('view', *idxs) + self + end + end + alias xview view + alias yview view + + def view_moveto(*idxs) + view('moveto', *idxs) + end + alias xview_moveto view_moveto + alias yview_moveto view_moveto + def view_scroll(index, what='pages') + view('scroll', index, what) + end + alias xview_scroll view_scroll + alias yview_scroll view_scroll +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb new file mode 100644 index 0000000..0c74440 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb @@ -0,0 +1,92 @@ +# +# tkextlib/iwidgets/optionmenu.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Optionmenu < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Optionmenu + TkCommandNames = ['::iwidgets::optionmenu'.freeze].freeze + WidgetClassName = 'Optionmenu'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'cyclicon' + end + private :__boolval_optkeys + + def delete(first, last=nil) + if last + tk_call(@path, 'delete', first, last) + else + tk_call(@path, 'delete', first) + end + self + end + + def disable(idx) + tk_call(@path, 'disable', idx) + self + end + + def enable(idx) + tk_call(@path, 'enable', idx) + self + end + + def get(first=nil, last=nil) + if last + simplelist(tk_call(@path, 'get', first, last)) + elsif first + tk_call(@path, 'get', first) + else + tk_call(@path, 'get') + end + end + def get_range(first, last) + get(first, last) + end + def get_selected + get() + end + + def index(idx) + number(tk_call(@path, 'index', idx)) + end + + def insert(idx, *args) + tk_call(@path, 'insert', idx, *args) + self + end + + def select(idx) + tk_call(@path, 'select', idx) + self + end + + def sort(*params, &b) + # see 'lsort' man page about params + if b + tk_call(@path, 'sort', '-command', proc(&b), *params) + else + tk_call(@path, 'sort', *params) + end + self + end + def sort_ascending + tk_call(@path, 'sort', 'ascending') + self + end + def sort_descending + tk_call(@path, 'sort', 'descending') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb new file mode 100644 index 0000000..3bf73d6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb @@ -0,0 +1,133 @@ +# +# tkextlib/iwidgets/panedwindow.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Panedwindow < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Panedwindow + TkCommandNames = ['::iwidgets::panedwindow'.freeze].freeze + WidgetClassName = 'Panedwindow'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'panecget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'paneconfigure', id] + end + private :__item_config_cmd + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias panecget itemcget + alias panecget_strict itemcget_strict + alias paneconfigure itemconfigure + alias paneconfiginfo itemconfiginfo + alias current_paneconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __boolval_optkeys + super() << 'showhandle' + end + private :__boolval_optkeys + + def add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + window(tk_call(@path, 'add', tagid(tag), *hash_kv(keys))) + tag + end + + def child_site_list + list(tk_call(@path, 'childsite')) + end + + def child_site(idx) + window(tk_call(@path, 'childsite', index(idx))) + end + + def delete(idx) + tk_call(@path, 'delete', index(idx)) + self + end + + def fraction(*percentages) + tk_call(@path, 'fraction', *percentages) + self + end + + def hide(idx) + tk_call(@path, 'hide', index(idx)) + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + window(tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))) + tag + end + + def invoke(idx=nil) + if idx + tk_call(@path, 'invoke', index(idx)) + else + tk_call(@path, 'invoke') + end + self + end + + def reset + tk_call(@path, 'reset') + self + end + + def show(idx) + tk_call(@path, 'show', index(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb new file mode 100644 index 0000000..620b14b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb @@ -0,0 +1,131 @@ +# +# tkextlib/iwidgets/promptdialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Promptdialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Promptdialog + TkCommandNames = ['::iwidgets::promptdialog'.freeze].freeze + WidgetClassName = 'Promptdialog'.freeze + WidgetClassNames[WidgetClassName] = self + + # index method is not available, because it shows index of the entry field + def default(name) + tk_call(@path, 'default', tagid(name)) + self + end + + def hide(name) + tk_call(@path, 'hide', tagid(name)) + self + end + + def invoke(name=nil) + if name + tk_call(@path, 'invoke', tagid(name)) + else + tk_call(@path, 'invoke') + end + self + end + + def show(name) + tk_call(@path, 'show', tagid(name)) + self + end + + + # based on Tk::Iwidgets::Entryfield + def clear + tk_call(@path, 'clear') + self + end + + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + + def value + _fromUTF8(tk_send_without_enc('get')) + end + def value= (val) + tk_send_without_enc('delete', 0, 'end') + tk_send_without_enc('insert', 0, _get_eval_enc_str(val)) + val + end + alias get value + alias set value= + + def cursor=(index) + tk_send_without_enc('icursor', index) + #self + index + end + alias icursor cursor= + + def index(idx) + number(tk_send_without_enc('index', idx)) + end + + def insert(pos,text) + tk_send_without_enc('insert', pos, _get_eval_enc_str(text)) + self + end + + def mark(pos) + tk_send_without_enc('scan', 'mark', pos) + self + end + def dragto(pos) + tk_send_without_enc('scan', 'dragto', pos) + self + end + def selection_adjust(index) + tk_send_without_enc('selection', 'adjust', index) + self + end + def selection_clear + tk_send_without_enc('selection', 'clear') + self + end + def selection_from(index) + tk_send_without_enc('selection', 'from', index) + self + end + def selection_present() + bool(tk_send_without_enc('selection', 'present')) + end + def selection_range(s, e) + tk_send_without_enc('selection', 'range', s, e) + self + end + def selection_to(index) + tk_send_without_enc('selection', 'to', index) + self + end + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb new file mode 100644 index 0000000..c21007c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb @@ -0,0 +1,35 @@ +# +# tkextlib/iwidgets/pushbutton.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Pushbutton < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Pushbutton + TkCommandNames = ['::iwidgets::pushbutton'.freeze].freeze + WidgetClassName = 'Pushbutton'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'defaultring' + end + private :__boolval_optkeys + + def invoke + tk_call_without_enc(@path, 'invoke') + self + end + + def flash + tk_call_without_enc(@path, 'flash') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/radiobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/radiobox.rb new file mode 100644 index 0000000..e9d9521 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/radiobox.rb @@ -0,0 +1,120 @@ +# +# tkextlib/iwidgets/radiobox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Radiobox < Tk::Iwidgets::Labeledframe + end + end +end + +class Tk::Iwidgets::Radiobox + TkCommandNames = ['::iwidgets::radiobox'.freeze].freeze + WidgetClassName = 'Radiobox'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'buttoncget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'buttonconfigure', id] + end + private :__item_config_cmd + + def __item_boolval_optkeys(id) + super(id) << 'defaultring' + end + private :__item_boolval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias buttoncget itemcget + alias buttoncget_strict itemcget_strict + alias buttonconfigure itemconfigure + alias buttonconfiginfo itemconfiginfo + alias current_buttonconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def add(tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'add', tagid(tag), *hash_kv(keys)) + tag + end + + def delete(idx) + tk_call(@path, 'delete', index(idx)) + self + end + + def deselect(idx) + tk_call(@path, 'deselect', index(idx)) + self + end + + def flash(idx) + tk_call(@path, 'flash', index(idx)) + self + end + + def get_tag + ((tag = tk_call_without_enc(@path, 'get')).empty?)? nil: tag + end + alias get get_tag + + def get_obj + (tag = get_tag)? Tk::Itk::Component.id2obj(self, tag): nil + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)) + tag + end + + def select(idx) + tk_call(@path, 'select', index(idx)) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb new file mode 100644 index 0000000..bddef50 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb @@ -0,0 +1,24 @@ +# +# tkextlib/iwidgets/buttonbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scopedobject < TkObject + end + end +end + +class Tk::Iwidgets::Scopedobject + TkCommandNames = ['::iwidgets::scopedobject'.freeze].freeze + WidgetClassName = 'Scopedobject'.freeze + WidgetClassNames[WidgetClassName] = self + + def initialize(obj_name, keys={}) + @path = tk_call(self.class::TkCommandNames[0], obj_name, *hash_kv(keys)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb new file mode 100644 index 0000000..67ad67d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb @@ -0,0 +1,353 @@ +# +# tkextlib/iwidgets/scrolledcanvas.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/canvas' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledcanvas < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Scrolledcanvas + TkCommandNames = ['::iwidgets::scrolledcanvas'.freeze].freeze + WidgetClassName = 'Scrolledcanvas'.freeze + WidgetClassNames[WidgetClassName] = self + + ################################ + + def __boolval_optkeys + super() << 'autoresize' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'textbackground' + end + private :__strval_optkeys + + def initialize(*args) + super(*args) + @canvas = component_widget('canvas') + end + + def method_missing(id, *args) + if @canvas.respond_to?(id) + @canvas.__send__(id, *args) + else + super(id, *args) + end + end + + ################################ + + def child_site + window(tk_call(@path, 'childsite')) + end + + def justify(dir) + tk_call(@path, 'justify', dir) + self + end + + ########################## + include TkCanvasItemConfig + + def tagid(tag) + if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag) + tag.id + elsif tag.kind_of?(Tk::Itk::Component) + tag.name + else + tag # maybe an Array of configure paramters + end + end + private :tagid + + # create a canvas item without creating a TkcItem object + def create(type, *args) + type.create(self, *args) + end + + ####################### + + def addtag(tag, mode, *args) + tk_send_without_enc('addtag', tagid(tag), mode, *args) + self + end + def addtag_above(tagOrId, target) + addtag(tagOrId, 'above', tagid(target)) + end + def addtag_all(tagOrId) + addtag(tagOrId, 'all') + end + def addtag_below(tagOrId, target) + addtag(tagOrId, 'below', tagid(target)) + end + def addtag_closest(tagOrId, x, y, halo=None, start=None) + addtag(tagOrId, 'closest', x, y, halo, start) + end + def addtag_enclosed(tagOrId, x1, y1, x2, y2) + addtag(tagOrId, 'enclosed', x1, y1, x2, y2) + end + def addtag_overlapping(tagOrId, x1, y1, x2, y2) + addtag(tagOrId, 'overlapping', x1, y1, x2, y2) + end + def addtag_withtag(tagOrId, tag) + addtag(tagOrId, 'withtag', tagid(tag)) + end + + def bbox(tagOrId, *tags) + list(tk_send_without_enc('bbox', tagid(tagOrId), + *tags.collect{|t| tagid(t)})) + end + + #def itembind(tag, context, cmd=Proc.new, *args) + # _bind([path, "bind", tagid(tag)], context, cmd, *args) + # self + #end + def itembind(tag, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([path, "bind", tagid(tag)], context, cmd, *args) + self + end + + #def itembind_append(tag, context, cmd=Proc.new, *args) + # _bind_append([path, "bind", tagid(tag)], context, cmd, *args) + # self + #end + def itembind_append(tag, context, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([path, "bind", tagid(tag)], context, cmd, *args) + self + end + + def itembind_remove(tag, context) + _bind_remove([path, "bind", tagid(tag)], context) + self + end + + def itembindinfo(tag, context=nil) + _bindinfo([path, "bind", tagid(tag)], context) + end + + def canvasx(screen_x, *args) + #tk_tcl2ruby(tk_send_without_enc('canvasx', screen_x, *args)) + number(tk_send_without_enc('canvasx', screen_x, *args)) + end + def canvasy(screen_y, *args) + #tk_tcl2ruby(tk_send_without_enc('canvasy', screen_y, *args)) + number(tk_send_without_enc('canvasy', screen_y, *args)) + end + + def coords(tag, *args) + if args == [] + tk_split_list(tk_send_without_enc('coords', tagid(tag))) + else + tk_send_without_enc('coords', tagid(tag), *(args.flatten)) + self + end + end + + def dchars(tag, first, last=None) + tk_send_without_enc('dchars', tagid(tag), + _get_eval_enc_str(first), _get_eval_enc_str(last)) + self + end + + def delete(*args) + tbl = nil + TkcItem::CItemID_TBL.mutex.synchronize{ + tbl = TkcItem::CItemID_TBL[self.path] + } + if tbl + find('withtag', *args).each{|item| + if item.kind_of?(TkcItem) + TkcItem::CItemID_TBL.mutex.synchronize{ + tbl.delete(item.id) + } + end + } + end + tk_send_without_enc('delete', *args.collect{|t| tagid(t)}) + self + end + alias remove delete + + def dtag(tag, tag_to_del=None) + tk_send_without_enc('dtag', tagid(tag), tag_to_del) + self + end + + def find(mode, *args) + list(tk_send_without_enc('find', mode, *args)).collect!{|id| + TkcItem.id2obj(self, id) + } + end + def find_above(target) + find('above', tagid(target)) + end + def find_all + find('all') + end + def find_below(target) + find('below', tagid(target)) + end + def find_closest(x, y, halo=None, start=None) + find('closest', x, y, halo, start) + end + def find_enclosed(x1, y1, x2, y2) + find('enclosed', x1, y1, x2, y2) + end + def find_overlapping(x1, y1, x2, y2) + find('overlapping', x1, y1, x2, y2) + end + def find_withtag(tag) + find('withtag', tag) + end + + def itemfocus(tagOrId=nil) + if tagOrId + tk_send_without_enc('focus', tagid(tagOrId)) + self + else + ret = tk_send_without_enc('focus') + if ret == "" + nil + else + TkcItem.id2obj(self, ret) + end + end + end + + def gettags(tagOrId) + list(tk_send_without_enc('gettags', tagid(tagOrId))).collect{|tag| + TkcTag.id2obj(self, tag) + } + end + + def icursor(tagOrId, index) + tk_send_without_enc('icursor', tagid(tagOrId), index) + self + end + + def index(tagOrId, idx) + number(tk_send_without_enc('index', tagid(tagOrId), idx)) + end + + def insert(tagOrId, index, string) + tk_send_without_enc('insert', tagid(tagOrId), index, + _get_eval_enc_str(string)) + self + end + + def lower(tag, below=nil) + if below + tk_send_without_enc('lower', tagid(tag), tagid(below)) + else + tk_send_without_enc('lower', tagid(tag)) + end + self + end + + def move(tag, x, y) + tk_send_without_enc('move', tagid(tag), x, y) + self + end + + def postscript(keys) + tk_send("postscript", *hash_kv(keys)) + end + + def raise(tag, above=nil) + if above + tk_send_without_enc('raise', tagid(tag), tagid(above)) + else + tk_send_without_enc('raise', tagid(tag)) + end + self + end + + def scale(tag, x, y, xs, ys) + tk_send_without_enc('scale', tagid(tag), x, y, xs, ys) + self + end + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + + def select(mode, *args) + r = tk_send_without_enc('select', mode, *args) + (mode == 'item')? TkcItem.id2obj(self, r): self + end + def select_adjust(tagOrId, index) + select('adjust', tagid(tagOrId), index) + end + def select_clear + select('clear') + end + def select_from(tagOrId, index) + select('from', tagid(tagOrId), index) + end + def select_item + select('item') + end + def select_to(tagOrId, index) + select('to', tagid(tagOrId), index) + end + + def itemtype(tag) + TkcItem.type2class(tk_send('type', tagid(tag))) + end + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb new file mode 100644 index 0000000..8b47460 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb @@ -0,0 +1,59 @@ +# +# tkextlib/iwidgets/scrolledframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledframe < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Scrolledframe + TkCommandNames = ['::iwidgets::scrolledframe'.freeze].freeze + WidgetClassName = 'Scrolledframe'.freeze + WidgetClassNames[WidgetClassName] = self + + def child_site + window(tk_call(@path, 'childsite')) + end + + def justify(dir) + tk_call(@path, 'justify', dir) + self + end + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb new file mode 100644 index 0000000..9b69ef0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb @@ -0,0 +1,58 @@ +# +# tkextlib/iwidgets/scrolledhtml.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledhtml < Tk::Iwidgets::Scrolledtext + end + end +end + +class Tk::Iwidgets::Scrolledhtml + TkCommandNames = ['::iwidgets::scrolledhtml'.freeze].freeze + WidgetClassName = 'Scrolledhtml'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'update' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'fontname' << 'link' << 'alink' << 'textbackground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'fixedfont' + end + private :__font_optkeys + + def import(href) + tk_call(@path, 'import', href) + self + end + + def import_link(href) + tk_call(@path, 'import', '-link', href) + self + end + + def pwd + tk_call(@path, 'pwd') + end + + def render(htmltext, workdir=None) + tk_call(@path, 'render', htmltext, workdir) + self + end + + def title + tk_call(@path, 'title') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb new file mode 100644 index 0000000..7543d55 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb @@ -0,0 +1,207 @@ +# +# tkextlib/iwidgets/scrolledlistbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/listbox' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledlistbox < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Scrolledlistbox + TkCommandNames = ['::iwidgets::scrolledlistbox'.freeze].freeze + WidgetClassName = 'Scrolledlistbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'textbackground' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'listvariable' + end + private :__tkvariable_optkeys + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + ################################ + + def initialize(*args) + super(*args) + @listbox = component_widget('listbox') + end + + def method_missing(id, *args) + if @listbox.respond_to?(id) + @listbox.__send__(id, *args) + else + super(id, *args) + end + end + + ################################ + + def clear + tk_call(@path, 'clear') + self + end + + def get_curselection + tk_call(@path, 'getcurselection') + end + + def justify(dir) + tk_call(@path, 'justify', dir) + self + end + + def selected_item_count + number(tk_call(@path, 'selecteditemcount')) + end + + def sort(*params, &b) + # see 'lsort' man page about params + if b + tk_call(@path, 'sort', '-command', proc(&b), *params) + else + tk_call(@path, 'sort', *params) + end + self + end + def sort_ascending + tk_call(@path, 'sort', 'ascending') + self + end + def sort_descending + tk_call(@path, 'sort', 'descending') + self + end + + ##################################### + + def bbox(index) + list(tk_send_without_enc('bbox', index)) + end + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + def get(*index) + _fromUTF8(tk_send_without_enc('get', *index)) + end + def insert(index, *args) + tk_send('insert', index, *args) + self + end + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + def see(index) + tk_send_without_enc('see', index) + self + end + + ##################################### + + include TkListItemConfig + + def tagid(tag) + if tag.kind_of?(Tk::Itk::Component) + tag.name + else + super(tag) + end + end + private :tagid + + ##################################### + + def activate(y) + tk_send_without_enc('activate', y) + self + end + def curselection + list(tk_send_without_enc('curselection')) + end + def get(first, last=nil) + if last + # tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last))) + tk_split_simplelist(tk_send_without_enc('get', first, last), + false, true) + else + _fromUTF8(tk_send_without_enc('get', first)) + end + end + def nearest(y) + tk_send_without_enc('nearest', y).to_i + end + def size + tk_send_without_enc('size').to_i + end + def selection_anchor(index) + tk_send_without_enc('selection', 'anchor', index) + self + end + def selection_clear(first, last=None) + tk_send_without_enc('selection', 'clear', first, last) + self + end + def selection_includes(index) + bool(tk_send_without_enc('selection', 'includes', index)) + end + def selection_set(first, last=None) + tk_send_without_enc('selection', 'set', first, last) + self + end + + def index(idx) + tk_send_without_enc('index', idx).to_i + end + + ##################################### + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb new file mode 100644 index 0000000..d6436d2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb @@ -0,0 +1,564 @@ +# +# tkextlib/iwidgets/scrolledtext.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/text' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledtext < Tk::Iwidgets::Scrolledwidget + end + end +end + +class Tk::Iwidgets::Scrolledtext + TkCommandNames = ['::iwidgets::scrolledtext'.freeze].freeze + WidgetClassName = 'Scrolledtext'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'textbackground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + ################################ + + def initialize(*args) + super(*args) + @text = component_widget('text') + end + + def method_missing(id, *args) + if @text.respond_to?(id) + @text.__send__(id, *args) + else + super(id, *args) + end + end + + ################################ + + def child_site + window(tk_call(@path, 'childsite')) + end + + def clear + tk_call(@path, 'clear') + self + end + + def import(file, idx=nil) + if idx + tk_call(@path, 'import', file, index(idx)) + else + tk_call(@path, 'import', file) + end + self + end + + def export(file) + tk_call(@path, 'export', file) + self + end + + ##################################### + + include TkTextTagConfig + + def tagid(tag) + if tag.kind_of?(Tk::Itk::Component) + tag.name + else + super(tag) + end + end + private :tagid + + def bbox(index) + list(tk_send('bbox', index)) + end + def compare(idx1, op, idx2) + bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1), + op, _get_eval_enc_str(idx2))) + end + + def debug + bool(tk_send_without_enc('debug')) + end + def debug=(boolean) + tk_send_without_enc('debug', boolean) + #self + boolean + end + + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + + def dlineinfo(index) + list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index))) + end + + def get(*index) + _fromUTF8(tk_send_without_enc('get', *index)) + end + def get_displaychars(*index) + # Tk8.5 feature + get('-displaychars', *index) + end + + def image_cget_strict(index, slot) + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + _fromUTF8(tk_send_without_enc('image', 'cget', + _get_eval_enc_str(index), "-#{slot}")) + else + tk_tcl2ruby(_fromUTF8(tk_send_without_enc('image', 'cget', + _get_eval_enc_str(index), + "-#{slot}"))) + end + end + def image_cget(index, slot) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + image_cget_strict(index, slot) + else + begin + image_cget_strict(index, slot) + rescue => e + begin + if current_image_configinfo.has_key?(slot.to_s) + # error on known option + fail e + else + # unknown option + nil + end + rescue + fail e # tag error + end + end + end + end + + def image_configure(index, slot, value=None) + if slot.kind_of? Hash + _fromUTF8(tk_send_without_enc('image', 'configure', + _get_eval_enc_str(index), + *hash_kv(slot, true))) + else + _fromUTF8(tk_send_without_enc('image', 'configure', + _get_eval_enc_str(index), + "-#{slot}", + _get_eval_enc_str(value))) + end + self + end + + def image_configinfo(index, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) + else + #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) + end + conf[0] = conf[0][1..-1] + conf + else + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).collect{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).collect{|conflist| + conf = tk_split_simplelist(conflist, false, true) + conf[0] = conf[0][1..-1] + case conf[0] + when 'text', 'label', 'show', 'data', 'file' + else + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + case slot.to_s + when 'text', 'label', 'show', 'data', 'file' + #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) + else + #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) + conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) + end + key = conf.shift[1..-1] + { key => conf } + else + ret = {} + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).each{|conflist| + # conf = tk_split_simplelist(conflist) + tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).each{|conflist| + conf = tk_split_simplelist(conflist, false, true) + key = conf.shift[1..-1] + case key + when 'text', 'label', 'show', 'data', 'file' + else + if conf[2] + if conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + ret + end + end + end + + def current_image_configinfo(index, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + conf = image_configinfo(index, slot) + {conf[0] => conf[4]} + else + ret = {} + image_configinfo(index).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + image_configinfo(index, slot).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + + def image_names + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt| + tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt| + tagid2obj(elt) + } + end + + def index(idx) + tk_send_without_enc('index', _get_eval_enc_str(idx)) + end + + def insert(index, *args) + tk_send('insert', index, *args) + self + end + + def mark_names + #tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt| + tk_split_simplelist(tk_send_without_enc('mark', 'names'), false, true).collect{|elt| + tagid2obj(elt) + } + end + + def mark_gravity(mark, direction=nil) + if direction + tk_send_without_enc('mark', 'gravity', + _get_eval_enc_str(mark), direction) + self + else + tk_send_without_enc('mark', 'gravity', _get_eval_enc_str(mark)) + end + end + + def mark_set(mark, index) + tk_send_without_enc('mark', 'set', _get_eval_enc_str(mark), + _get_eval_enc_str(index)) + self + end + alias set_mark mark_set + + def mark_unset(*marks) + tk_send_without_enc('mark', 'unset', + *(marks.collect{|mark| _get_eval_enc_str(mark)})) + self + end + alias unset_mark mark_unset + + def mark_next(index) + tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'next', + _get_eval_enc_str(index)))) + end + alias next_mark mark_next + + def mark_previous(index) + tagid2obj(_fromUTF8(tk_send_without_enc('mark', 'previous', + _get_eval_enc_str(index)))) + end + alias previous_mark mark_previous + + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + + + def _ktext_length(txt) + if TkCore::WITH_ENCODING ### Ruby 1.9 !!!!!!!!!!!!! + return txt.length + end + ########################### + + if $KCODE !~ /n/i + return txt.gsub(/[^\Wa-zA-Z_\d]/, ' ').length + end + + # $KCODE == 'NONE' + if JAPANIZED_TK + tk_call_without_enc('kstring', 'length', + _get_eval_enc_str(txt)).to_i + else + begin + tk_call_without_enc('encoding', 'convertto', 'ascii', + _get_eval_enc_str(txt)).length + rescue StandardError, NameError + # sorry, I have no plan + txt.length + end + end + end + private :_ktext_length + + def tksearch(*args) + # call 'search' subcommand of text widget + # args ::= [] [] + # If is regexp, then it must be a regular expression of Tcl + if args[0].kind_of?(Array) + opts = args.shift.collect{|opt| '-' + opt.to_s } + else + opts = [] + end + + opts << '--' + + ret = tk_send('search', *(opts + args)) + if ret == "" + nil + else + ret + end + end + + def tksearch_with_count(*args) + # call 'search' subcommand of text widget + # args ::= [] [] + # If is regexp, then it must be a regular expression of Tcl + if args[0].kind_of?(Array) + opts = args.shift.collect{|opt| '-' + opt.to_s } + else + opts = [] + end + + opts << '-count' << args.shift << '--' + + ret = tk_send('search', *(opts + args)) + if ret == "" + nil + else + ret + end + end + + def search_with_length(pat,start,stop=None) + pat = pat.chr if pat.kind_of? Integer + if stop != None + return ["", 0] if compare(start,'>=',stop) + txt = get(start,stop) + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index(start + " + #{pos} chars"), pat.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index(start + " + #{pos} chars"), $&.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(match), match] + end + else + return ["", 0] + end + else + txt = get(start,'end - 1 char') + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index(start + " + #{pos} chars"), pat.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index(start + " + #{pos} chars"), $&.split('').length] + return [index(start + " + #{pos} chars"), + _ktext_length(match), match] + end + else + txt = get('1.0','end - 1 char') + if (pos = txt.index(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), + _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + end + end + end + + def search(pat,start,stop=None) + search_with_length(pat,start,stop)[0] + end + + def rsearch_with_length(pat,start,stop=None) + pat = pat.chr if pat.kind_of? Integer + if stop != None + return ["", 0] if compare(start,'<=',stop) + txt = get(stop,start) + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index(stop + " + #{pos} chars"), pat.split('').length] + return [index(stop + " + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index(stop + " + #{pos} chars"), $&.split('').length] + return [index(stop + " + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + else + txt = get('1.0',start) + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + txt = get('1.0','end - 1 char') + if (pos = txt.rindex(pat)) + match = $& + #pos = txt[0..(pos-1)].split('').length if pos > 0 + pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 + if pat.kind_of? String + #return [index("1.0 + #{pos} chars"), pat.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] + else + #return [index("1.0 + #{pos} chars"), $&.split('').length] + return [index("1.0 + #{pos} chars"), _ktext_length(match), match] + end + else + return ["", 0] + end + end + end + end + + def rsearch(pat,start,stop=None) + rsearch_with_length(pat,start,stop)[0] + end + + def see(index) + tk_send_without_enc('see', index) + self + end + + ############################### + + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end + + def yview(*index) + if index.size == 0 + list(tk_send_without_enc('yview')) + else + tk_send_without_enc('yview', *index) + self + end + end + def yview_moveto(*index) + yview('moveto', *index) + end + def yview_scroll(*index) + yview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb new file mode 100644 index 0000000..eef093d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb @@ -0,0 +1,20 @@ +# +# tkextlib/iwidgets/scrolledwidget.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Scrolledwidget < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Scrolledwidget + TkCommandNames = ['::iwidgets::scrolledwidget'.freeze].freeze + WidgetClassName = 'Scrolledwidget'.freeze + WidgetClassNames[WidgetClassName] = self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb new file mode 100644 index 0000000..bf9b5ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb @@ -0,0 +1,102 @@ +# +# tkextlib/iwidgets/selectionbox.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Selectionbox < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Selectionbox + TkCommandNames = ['::iwidgets::selectionbox'.freeze].freeze + WidgetClassName = 'Selectionbox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'itemson' << 'selectionon' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'itemslabel' << 'selectionlabel' + end + private :__strval_optkeys + + def child_site + window(tk_call(@path, 'childsite')) + end + + def clear_items + tk_call(@path, 'clear', 'items') + self + end + + def clear_selection + tk_call(@path, 'clear', 'selection') + self + end + + def get + tk_call(@path, 'get') + end + + def insert_items(idx, *args) + tk_call(@path, 'insert', 'items', idx, *args) + end + + def insert_selection(pos, text) + tk_call(@path, 'insert', 'selection', pos, text) + end + + def select_item + tk_call(@path, 'selectitem') + self + end + + # based on Tk::Listbox ( and TkTextWin ) + def curselection + list(tk_send_without_enc('curselection')) + end + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + def index(idx) + tk_send_without_enc('index', idx).to_i + end + def nearest(y) + tk_send_without_enc('nearest', y).to_i + end + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + def selection_anchor(index) + tk_send_without_enc('selection', 'anchor', index) + self + end + def selection_clear(first, last=None) + tk_send_without_enc('selection', 'clear', first, last) + self + end + def selection_includes(index) + bool(tk_send_without_enc('selection', 'includes', index)) + end + def selection_set(first, last=None) + tk_send_without_enc('selection', 'set', first, last) + self + end + def size + tk_send_without_enc('size').to_i + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb new file mode 100644 index 0000000..f772ecf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb @@ -0,0 +1,92 @@ +# +# tkextlib/iwidgets/selectiondialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Selectiondialog < Tk::Iwidgets::Dialog + end + end +end + +class Tk::Iwidgets::Selectiondialog + TkCommandNames = ['::iwidgets::selectiondialog'.freeze].freeze + WidgetClassName = 'Selectiondialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def child_site + window(tk_call(@path, 'childsite')) + end + + def clear_items + tk_call(@path, 'clear', 'items') + self + end + + def clear_selection + tk_call(@path, 'clear', 'selection') + self + end + + def get + tk_call(@path, 'get') + end + + def insert_items(idx, *args) + tk_call(@path, 'insert', 'items', idx, *args) + end + + def insert_selection(pos, text) + tk_call(@path, 'insert', 'selection', pos, text) + end + + def select_item + tk_call(@path, 'selectitem') + self + end + + # based on Tk::Listbox ( and TkTextWin ) + def curselection + list(tk_send_without_enc('curselection')) + end + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + def index(idx) + tk_send_without_enc('index', idx).to_i + end + def nearest(y) + tk_send_without_enc('nearest', y).to_i + end + def scan_mark(x, y) + tk_send_without_enc('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send_without_enc('scan', 'dragto', x, y) + self + end + def selection_anchor(index) + tk_send_without_enc('selection', 'anchor', index) + self + end + def selection_clear(first, last=None) + tk_send_without_enc('selection', 'clear', first, last) + self + end + def selection_includes(index) + bool(tk_send_without_enc('selection', 'includes', index)) + end + def selection_set(first, last=None) + tk_send_without_enc('selection', 'set', first, last) + self + end + def size + tk_send_without_enc('size').to_i + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/shell.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/shell.rb new file mode 100644 index 0000000..dabf2e6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/shell.rb @@ -0,0 +1,38 @@ +# +# tkextlib/iwidgets/shell.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Shell < Tk::Itk::Toplevel + end + end +end + +class Tk::Iwidgets::Shell + TkCommandNames = ['::iwidgets::shell'.freeze].freeze + WidgetClassName = 'Shell'.freeze + WidgetClassNames[WidgetClassName] = self + + def activate + tk_call(@path, 'activate') # may return val of deactibate method + end + + def center(win=None) + tk_call(@path, 'center', win) + self + end + + def child_site + window(tk_call(@path, 'childsite')) + end + + def deactivate(val=None) + tk_call(@path, 'deactivate', val) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spindate.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spindate.rb new file mode 100644 index 0000000..2c98eb4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spindate.rb @@ -0,0 +1,48 @@ +# +# tkextlib/iwidgets/spindate.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Spindate < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Spindate + TkCommandNames = ['::iwidgets::spindate'.freeze].freeze + WidgetClassName = 'Spindate'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'dayon' << 'monthon' << 'yearon' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'daylabel' << 'monthformat' << 'monthlabel' << 'yearlabel' + end + private :__strval_optkeys + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def show(date=None) + tk_call(@path, 'show', date) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinint.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinint.rb new file mode 100644 index 0000000..5eb944d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinint.rb @@ -0,0 +1,30 @@ +# +# tkextlib/iwidgets/spinint.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Spinint < Tk::Iwidgets::Spinner + end + end +end + +class Tk::Iwidgets::Spinint + TkCommandNames = ['::iwidgets::spinint'.freeze].freeze + WidgetClassName = 'Spinint'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'wrap' + end + private :__boolval_optkeys + + def __numlistval_optkeys + super() << 'range' + end + private :__numlistval_optkeys +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinner.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinner.rb new file mode 100644 index 0000000..aeee5c9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spinner.rb @@ -0,0 +1,169 @@ +# +# tkextlib/iwidgets/spinner.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Spinner < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Spinner + TkCommandNames = ['::iwidgets::spinner'.freeze].freeze + WidgetClassName = 'Spinner'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include Tk::ValidateConfigure + + class EntryfieldValidate < TkValidateCommand + #class CalCmdArgs < TkUtil::CallbackSubst + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?s, :char ], + [ ?P, ?s, :post ], + [ ?S, ?s, :current ], + [ ?W, ?w, :widget ], + nil + ] + PROC_TBL = [ + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + end + + def self._config_keys + ['validate', 'invalid'] + end + end + + def __validation_class_list + super() << EntryfieldValidate + end + + Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate) + + #################################### + + def up + tk_call_without_enc(@path, 'up') + self + end + + def down + tk_call_without_enc(@path, 'down') + self + end + + def clear + tk_call_without_enc(@path, 'clear') + self + end + + def delete(first, last=None) + tk_send_without_enc('delete', first, last) + self + end + + def value + _fromUTF8(tk_send_without_enc('get')) + end + def value= (val) + tk_send_without_enc('delete', 0, 'end') + tk_send_without_enc('insert', 0, _get_eval_enc_str(val)) + val + end + alias get value + alias set value= + + def cursor=(index) + tk_send_without_enc('icursor', index) + #self + index + end + alias icursor cursor= + + def index(idx) + number(tk_send_without_enc('index', idx)) + end + + def insert(pos,text) + tk_send_without_enc('insert', pos, _get_eval_enc_str(text)) + self + end + + def mark(pos) + tk_send_without_enc('scan', 'mark', pos) + self + end + def dragto(pos) + tk_send_without_enc('scan', 'dragto', pos) + self + end + def selection_adjust(index) + tk_send_without_enc('selection', 'adjust', index) + self + end + def selection_clear + tk_send_without_enc('selection', 'clear') + self + end + def selection_from(index) + tk_send_without_enc('selection', 'from', index) + self + end + def selection_present() + bool(tk_send_without_enc('selection', 'present')) + end + def selection_range(s, e) + tk_send_without_enc('selection', 'range', s, e) + self + end + def selection_to(index) + tk_send_without_enc('selection', 'to', index) + self + end + + # based on tk/scrollable.rb + def xview(*index) + if index.size == 0 + list(tk_send_without_enc('xview')) + else + tk_send_without_enc('xview', *index) + self + end + end + def xview_moveto(*index) + xview('moveto', *index) + end + def xview_scroll(*index) + xview('scroll', *index) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spintime.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spintime.rb new file mode 100644 index 0000000..0ff683a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/spintime.rb @@ -0,0 +1,48 @@ +# +# tkextlib/iwidgets/spintime.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Spintime < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Spintime + TkCommandNames = ['::iwidgets::spintime'.freeze].freeze + WidgetClassName = 'Spintime'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'hourlabel' << 'minuteon' << 'secondon' + end + private :__strval_optkeys + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def show(date=None) + tk_call(@path, 'show', date) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb new file mode 100644 index 0000000..dbb90e5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb @@ -0,0 +1,180 @@ +# +# tkextlib/iwidgets/tabnotebook.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Tabnotebook < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Tabnotebook + TkCommandNames = ['::iwidgets::tabnotebook'.freeze].freeze + WidgetClassName = 'Tabnotebook'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'pagecget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'pageconfigure', id] + end + private :__item_config_cmd + + def __item_strval_optkeys(id) + super(id) << 'tabbackground' << 'tabforeground' + end + private :__item_strval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias pagecget itemcget + alias pagecget_strict itemcget_strict + alias pageconfigure itemconfigure + alias pageconfiginfo itemconfiginfo + alias current_pageconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __boolval_optkeys + super() << 'auto' << 'equaltabs' << 'raiseselect' << 'tabborders' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'backdrop' << 'tabbackground' << 'tabforeground' + end + private :__strval_optkeys + + def initialize(*args) + super(*args) + @tabset = self.component_widget('tabset') + end + + def add(keys={}) + window(tk_call(@path, 'add', *hash_kv(keys))) + end + + def child_site_list + list(tk_call(@path, 'childsite')) + end + + def child_site(idx) + window(tk_call(@path, 'childsite', index(idx))) + end + + def delete(idx1, idx2=nil) + if idx2 + tk_call(@path, 'delete', index(idx1), index(idx2)) + else + tk_call(@path, 'delete', index(idx1)) + end + self + end + + def index(idx) + #number(tk_call(@path, 'index', tagid(idx))) + @tabset.index(tagid(idx)) + end + + def insert(idx, keys={}) + window(tk_call(@path, 'insert', index(idx), *hash_kv(keys))) + end + + def next + tk_call(@path, 'next') + self + end + + def prev + tk_call(@path, 'prev') + self + end + + def select(idx) + tk_call(@path, 'select', index(idx)) + self + end + + def show_tab(idx) + @tabset.show_tab(idx) + self + end + + def scrollcommand(cmd=Proc.new) + configure_cmd 'scrollcommand', cmd + self + end + alias xscrollcommand scrollcommand + alias yscrollcommand scrollcommand + + def xscrollbar(bar=nil) + if bar + @scrollbar = bar + @scrollbar.orient 'horizontal' + self.scrollcommand {|*arg| @scrollbar.set(*arg)} + @scrollbar.command {|*arg| self.xview(*arg)} + Tk.update # avoid scrollbar trouble + end + @scrollbar + end + def yscrollbar(bar=nil) + if bar + @scrollbar = bar + @scrollbar.orient 'vertical' + self.scrollcommand {|*arg| @scrollbar.set(*arg)} + @scrollbar.command {|*arg| self.yview(*arg)} + Tk.update # avoid scrollbar trouble + end + @scrollbar + end + alias scrollbar yscrollbar + + def view(*index) + if index.size == 0 + idx = num_or_str(tk_send_without_enc('view')) + if idx.kind_of?(Fixnum) && idx < 0 + nil + else + idx + end + else + tk_send_without_enc('view', *index) + self + end + end + alias xview view + alias yview view + + def view_moveto(*index) + view('moveto', *index) + end + alias xview_moveto view_moveto + alias yview_moveto view_moveto + def view_scroll(index, what='pages') + view('scroll', index, what) + end + alias xview_scroll view_scroll + alias yview_scroll view_scroll +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabset.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabset.rb new file mode 100644 index 0000000..300ba9d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/tabset.rb @@ -0,0 +1,144 @@ +# +# tkextlib/iwidgets/tabset.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Tabset < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Tabset + TkCommandNames = ['::iwidgets::tabset'.freeze].freeze + WidgetClassName = 'Tabset'.freeze + WidgetClassNames[WidgetClassName] = self + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'tabcget', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'tabconfigure', id] + end + private :__item_config_cmd + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + alias tabcget itemcget + alias tabcget_strict itemcget_strict + alias tabconfigure itemconfigure + alias tabconfiginfo itemconfiginfo + alias current_tabconfiginfo current_itemconfiginfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo + + #################################### + + def __boolval_optkeys + super() << 'equaltabs' << 'raiseselect' << 'tabborders' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'backdrop' + end + private :__strval_optkeys + + def add(keys={}) + window(tk_call(@path, 'add', *hash_kv(keys))) + end + + def delete(idx1, idx2=nil) + if idx2 + tk_call(@path, 'delete', index(idx1), index(idx2)) + else + tk_call(@path, 'delete', index(idx1)) + end + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, keys={}) + window(tk_call(@path, 'insert', index(idx), *hash_kv(keys))) + end + + def next + tk_call(@path, 'next') + self + end + + def prev + tk_call(@path, 'prev') + self + end + + def select(idx) + tk_call(@path, 'select', index(idx)) + self + end + + def show_tab(idx) + if index(idx) == 0 + self.start = 0 + return + end + + reutrn unless @canvas ||= self.winfo_children[0] + + delta = 1 if (delta = cget(:gap)) == 'overlap' || + (delta = self.winfo_pixels(delta) + 1) <= 0 + + case cget(:tabpos) + when 's', 'n' + if (head = tabcget(idx, :left)) < 0 + self.start -= head + return + end + tabs_size = @canvas.winfo_width + tab_start, tab_end = @canvas . + find_overlapping(head, 0, head + delta, @canvas.winfo_height) . + find_all{|id| @canvas.itemtype(id) == TkcPolygon} . + map!{|id| bbox = @canvas.bbox(id); [bbox[0], bbox[2]]} . max + + when 'e', 'w' + if (head = tabcget(idx, :top)) < 0 + self.start -= head + return + end + tabs_size = @canvas.winfo_height + tab_start, tab_end = @canvas . + find_overlapping(0, head, @canvas.winfo_width, head + delta) . + find_all{|id| @canvas.itemtype(id) == TkcPolygon} . + map!{|id| bbox = @canvas.bbox(id); [bbox[1], bbox[3]]} . max + end + + if (size = tab_end - tab_start + 1) > tabs_size + self.start -= tab_start + elsif head + size > tabs_size + self.start -= head + size - tabs_size + end + + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timeentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timeentry.rb new file mode 100644 index 0000000..588da77 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timeentry.rb @@ -0,0 +1,25 @@ +# +# tkextlib/iwidgets/timeentry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Timeentry < Tk::Iwidgets::Timefield + end + end +end + +class Tk::Iwidgets::Timeentry + TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze + WidgetClassName = 'Timeentry'.freeze + WidgetClassNames[WidgetClassName] = self + + def __strval_optkeys + super() << 'closetext' + end + private :__strval_optkeys +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timefield.rb new file mode 100644 index 0000000..28e1504 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/timefield.rb @@ -0,0 +1,58 @@ +# +# tkextlib/iwidgets/timefield.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Timefield < Tk::Iwidgets::Labeledwidget + end + end +end + +class Tk::Iwidgets::Timefield + TkCommandNames = ['::iwidgets::timefield'.freeze].freeze + WidgetClassName = 'Timefield'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'gmt' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'textbackground' + end + private :__strval_optkeys + + def __font_optkeys + super() << 'textfont' + end + private :__font_optkeys + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def valid? + bool(tk_call(@path, 'isvalid')) + end + alias isvalid? valid? + + def show(time=None) + tk_call(@path, 'show', time) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/toolbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/toolbar.rb new file mode 100644 index 0000000..17cfa62 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/toolbar.rb @@ -0,0 +1,112 @@ +# +# tkextlib/iwidgets/toolbar.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Toolbar < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Toolbar + TkCommandNames = ['::iwidgets::toolbar'.freeze].freeze + WidgetClassName = 'Toolbar'.freeze + WidgetClassNames[WidgetClassName] = self + + def __tkvariable_optkeys + super() << 'helpvariable' + end + private :__tkvariable_optkeys + + #################################### + + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'itemcget', self.index(id)] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'itemconfigure', self.index(id)] + end + private :__item_config_cmd + + def __item_strval_optkeys(id) + super(id) << 'helpstr' << 'balloonstr' + end + private :__item_strval_optkeys + + def tagid(tagOrId) + if tagOrId.kind_of?(Tk::Itk::Component) + tagOrId.name + else + #_get_eval_string(tagOrId) + tagOrId + end + end + + #################################### + + def __strval_optkeys + super() << 'balloonbackground' << 'balloonforeground' + end + private :__strval_optkeys + + def __tkvariable_optkeys + super() << 'helpvariable' + end + private :__tkvariable_optkeys + + def __font_optkeys + super() << 'balloonfont' + end + private :__font_optkeys + + def add(type, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + window(tk_call(@path, 'add', type, tagid(tag), *hash_kv(keys))) + tag + end + + def delete(idx1, idx2=nil) + if idx2 + tk_call(@path, 'delete', index(idx1), index(idx2)) + else + tk_call(@path, 'delete', index(idx1)) + end + self + end + + def index(idx) + number(tk_call(@path, 'index', tagid(idx))) + end + + def insert(idx, type, tag=nil, keys={}) + if tag.kind_of?(Hash) + keys = tag + tag = nil + end + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else + tag = Tk::Itk::Component.new(self) + end + window(tk_call(@path, 'insert', index(idx), type, + tagid(tag), *hash_kv(keys))) + tag + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/watch.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/watch.rb new file mode 100644 index 0000000..ab2b687 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/iwidgets/watch.rb @@ -0,0 +1,56 @@ +# +# tkextlib/iwidgets/watch.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tkextlib/iwidgets.rb' + +module Tk + module Iwidgets + class Watch < Tk::Itk::Widget + end + end +end + +class Tk::Iwidgets::Watch + TkCommandNames = ['::iwidgets::watch'.freeze].freeze + WidgetClassName = 'Watch'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'showampm' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'clockcolor' << 'hourcolor' << 'minutecolor' << + 'pivotcolor' << 'secondcolor' << 'tickcolor' + end + private :__strval_optkeys + + def get_string + tk_call(@path, 'get', '-string') + end + alias get get_string + + def get_clicks + number(tk_call(@path, 'get', '-clicks')) + end + + def show(time=None) + tk_call(@path, 'show', time) + self + end + def show_now + tk_call(@path, 'show', 'now') + self + end + + def watch(*args) + unless args.empty? + tk_call(@path, 'watch', *args) + end + component_path('canvas') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/pkg_checker.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/pkg_checker.rb new file mode 100755 index 0000000..5002ed7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/pkg_checker.rb @@ -0,0 +1,184 @@ +#!/usr/bin/env ruby +# +# Ruby/Tk extension library checker +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +TkRoot.new.withdraw # hide root window + +name = File.basename(__FILE__) + +add_path = false +verbose = false + +def help_msg + print "Usage: #{$0} [-l] [-v] [-h] [--] [dir]\n" + print "\tIf dir is omitted, check the directry that this command exists.\n" + print "\tAvailable options are \n" + print "\t -l : Add dir to $LOAD_PATH\n" + print "\t (If dir == '/tkextlib', add also.)\n" + print "\t -v : Verbose mode (show reason of fail)\n" + print "\t -h : Show this message\n" + print "\t -- : End of options\n" +end + +while(ARGV[0] && ARGV[0][0] == ?-) + case ARGV[0] + when '--' + ARGV.shift + break; + when '-l' + ARGV.shift + add_path = true + when '-v' + ARGV.shift + verbose = true + when '-h' + help_msg + exit(0) + else + print "Argument Error!! : unknown option '#{ARGV[0]}'\n" + help_msg + exit(1) + end +end + +if ARGV[0] + dir = File.expand_path(ARGV[0]) +else + dir = File.dirname(File.expand_path(__FILE__)) +end + +if add_path + $LOAD_PATH.unshift(dir) + if File.basename(dir) == 'tkextlib' + $LOAD_PATH.unshift(File.dirname(dir)) + end +end + +print "\nRuby/Tk extension library checker\n" +print "( Note:: This check is very simple one. Shown status may be wrong. )\n" +print "\n check directory :: #{dir}" +print "\n $LOAD_PATH :: #{$LOAD_PATH.inspect}\n" + +def get_pkg_list(file) + pkg_list = [] + + File.foreach(file){|l| + if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)TkPackage\s*\.\s*require\s*\(?\s*(["'])((\w|:)+)\1/ + pkg = [$2, :package] + pkg_list << pkg unless pkg_list.member?(pkg) + end + if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tcllibrary\s*\(?\s*(["'])((\w|:)+)\1/ + pkg = [$2, :library] + pkg_list << pkg unless pkg_list.member?(pkg) + end + if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tclscript\s*\(?\s*(["'])((\w|:)+)\1/ + pkg = [$2, :script] + pkg_list << pkg unless pkg_list.member?(pkg) + end + if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)require\s*\(?\s*(["'])((\w|\/|:)+)\1/ + pkg = [$2, :require_ruby_lib] + pkg_list << pkg unless pkg_list.member?(pkg) + end + } + + pkg_list +end + +def check_pkg(file, verbose=false) + pkg_list = get_pkg_list(file) + + error_list = [] + success_list = {} + + pkg_list.each{|name, type| + next if success_list[name] + + begin + case type + when :package + ver = TkPackage.require(name) + success_list[name] = ver + error_list.delete_if{|n, t| n == name} + + when :library + Tk.load_tcllibrary(name) + success_list[name] = :library + error_list.delete_if{|n, t| n == name} + + when :script + Tk.load_tclscript(name) + success_list[name] = :script + error_list.delete_if{|n, t| n == name} + + when :require_ruby_lib + require name + + end + rescue => e + if verbose + error_list << [name, type, e.message] + else + error_list << [name, type] + end + end + } + + success_list.dup.each{|name, ver| + unless ver.kind_of?(String) + begin + ver = TkPackage.require(name) + sccess_list[name] = ver + rescue + end + end + } + + [success_list, error_list] +end + +def subdir_check(dir, verbose=false) + Dir.foreach(dir){|f| + next if f == '.' || f == '..' + if File.directory?(f) + subdir_check(File.join(dir, f)) + elsif File.extname(f) == '.rb' + path = File.join(dir, f) + suc, err = check_pkg(path, verbose) + if err.empty? + print 'Ready : ', path, ' : require->', suc.inspect, "\n" + else + print '*LACK : ', path, ' : require->', suc.inspect, + ' FAIL->', err.inspect, "\n" + end + end + } +end + +Dir.chdir(dir) + +(Dir['*.rb'] - ['setup.rb', name]).each{|f| + subdir = File.basename(f, '.*') +=begin + begin + # read 'setup.rb' as if the library has standard structure + require File.join(subdir, 'setup.rb') + rescue LoadError + # ignore error + end +=end + print "\n" + + suc, err = check_pkg(f, verbose) + if err.empty? + print 'Ready : ', f, ' : require->', suc.inspect, "\n" + else + print '*LACK : ', f, ' : require->', suc.inspect, + ' FAIL->', err.inspect, "\n" + end + + subdir_check(subdir, verbose) if File.directory?(subdir) +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/setup.rb new file mode 100644 index 0000000..12867e8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before using Tk extension libraries +# +# If you need some setup operations for Tk extensions (for example, +# modify the dynamic library path) required, please write the setup +# operations in this file. This file is required at the last of +# "require 'tk'". +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib.rb new file mode 100644 index 0000000..c6138f4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib.rb @@ -0,0 +1,90 @@ +# +# tcllib extension support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tcllib/setup.rb' + +err = '' + +# package:: autoscroll +target = 'tkextlib/tcllib/autoscroll' +begin + require target +rescue => e + err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message +end + +# package:: cursor +target = 'tkextlib/tcllib/cursor' +begin + require target +rescue => e + err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message +end + +# package:: style +target = 'tkextlib/tcllib/style' +begin + require target +rescue => e + err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message +end + +# autoload +module Tk + module Tcllib + TkComm::TkExtlibAutoloadModule.unshift(self) + + # package:: ctext + autoload :CText, 'tkextlib/tcllib/ctext' + + # package:: getstring + autoload :GetString_Dialog, 'tkextlib/tcllib/getstring' + + # package:: history + autoload :History, 'tkextlib/tcllib/history' + + # package:: datefield + autoload :Datefield, 'tkextlib/tcllib/datefield' + autoload :DateField, 'tkextlib/tcllib/datefield' + + # package:: ico + autoload :ICO, 'tkextlib/tcllib/ico' + + # package:: ipentry + autoload :IP_Entry, 'tkextlib/tcllib/ip_entry' + autoload :IPEntry, 'tkextlib/tcllib/ip_entry' + + # package:: swaplist + autoload :Swaplist_Dialog, 'tkextlib/tcllib/swaplist' + + # package:: Plotchart + autoload :Plotchart, 'tkextlib/tcllib/plotchart' + + # package:: tablelist + autoload :Tablelist, 'tkextlib/tcllib/tablelist' + autoload :TableList, 'tkextlib/tcllib/tablelist' + autoload :Tablelist_Tile, 'tkextlib/tcllib/tablelist_tile' + autoload :TableList_Tile, 'tkextlib/tcllib/tablelist_tile' + + # package:: tkpiechart + autoload :Tkpiechart, 'tkextlib/tcllib/tkpiechart' + + # package:: tooltip + autoload :Tooltip, 'tkextlib/tcllib/tooltip' + + # package:: widget + autoload :Wdiget, 'tkextlib/tcllib/widget' + end +end + +if $VERBOSE && !err.empty? + warn("Warning: some sub-packages are failed to require : " + err) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/README b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/README new file mode 100644 index 0000000..953239b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/README @@ -0,0 +1,135 @@ + + [ tcllib extension support files ] + +Tcllib includes many utilities. But currently, supports TKLib part +only (see the following 'tcllib contents'). + +If you request to support others, please send your message to one of +ruby-talk/ruby-list/ruby-dev/ruby-ext mailing lists. + +--------------------------------- +Tcllib is a collection of utility modules for Tcl. These modules provide +a wide variety of functionality, from implementations of standard data +structures to implementations of common networking protocols. The intent +is to collect commonly used function into a single library, which users +can rely on to be available and stable. +--------------------------------------------------------- + +-----< tcllib contents (based on tcllib-1.6.1) >--------- +Programming tools + * cmdline - Procedures to process command lines and options. + * comm - A remote communications facility for Tcl (7.6, 8.0, and later) + * control - Procedures for control flow structures. + * fileutil - Procedures implementing some file utilities + * log - Procedures to log messages of libraries and applications. + * logger - System to control logging of events. + * multiplexer - One-to-many communication with sockets. + * snit - Snit's Not Incr Tcl + * snitfaq - Snit Frequently Asked Questions + * stooop - Object oriented extension. + * stoop - Simple Tcl Only Object Oriented Programming + * switched - stooop switched class + * profiler - Tcl source code profiler + +Mathematics + * math::statistics - Basic statistical functions and procedures + * math::calculus - Integration and ordinary differential equations + * math::optimize - Optimisation routines + * math::fuzzy - Fuzzy comparison of floating-point numbers + * counter - Procedures for counters and histograms + * combinatorics - Combinatorial functions in the Tcl Math Library + +Data structures + * struct::list - Procedures for manipulating lists + * struct::set - Procedures for manipulating sets + * struct::stack - Create and manipulate stack objects + * struct::queue - Create and manipulate queue objects + * struct::prioqueue - Create and manipulate prioqueue objects + * struct::skiplist - Create and manipulate skiplists + * struct::tree - Create and manipulate tree objects + * struct::graph - Create and manipulate directed graph objects + * struct::record - Define and create records (similar to 'C' structures) + * struct::matrix - Create and manipulate matrix objects + * struct::pool - Create and manipulate pool objects (of discrete items) + * report - Create and manipulate report objects + +Text processing + * expander - Procedures to process templates and expand text. + * base64 - Procedures to encode and decode base64 + * yencode - encode/decoding a binary file + * uuencode - encode/decoding a binary file + * csv - Procedures to handle CSV data. + * inifile - Parsing of Windows INI files + * htmlparse - Procedures to parse HTML strings + * mime - Manipulation of MIME body parts + * Tcl MIME - generates and parses MIME body parts + * textutil - Procedures to manipulate texts and strings. + * exif - Tcl EXIF extracts and parses EXIF fields from digital images + * EXIF - extract and parse EXIF fields from digital images + +Hashes, checksums, and encryption + * cksum - calculate a cksum(1) compatible checksum + * crc16 - Perform a 16bit Cyclic Redundancy Check + * crc32 - Perform a 32bit Cyclic Redundancy Check + * des - Perform DES encryption of Tcl data + * md4 - MD4 Message-Digest Algorithm + * md5 - MD5 Message-Digest Algorithm + * ripemd160 - RIPEMD-160 Message-Digest Algorithm + * ripemd128 - RIPEMD-128 Message-Digest Algorithm + * md5crypt - MD5-based password encryption + * sha1 - Perform sha1 hashing + * sum - calculate a sum(1) compatible checksum + * soundex - Soundex + +Documentation tools + * mpexpand - Markup processor + * doctools - Create and manipulate doctools converter object + * doctoc_fmt - Specification of simple tcl markup for table of contents + * doctools_api - Interface specification for formatter code + * doctools_fmt - Specification of simple tcl markup for manpages + * docidx - Create and manipulate docidx converter objects + * docidx_api - Interface specification for index formatting code + * docidx_fmt - Specification of simple tcl markup for an index + * doctoc - Create and manipulate doctoc converter objects + * doctoc_api - Interface specification for toc formatting code + * doctools::changelog - Handle text in Emacs ChangeLog format + * doctools::cvs - Handle text in 'cvs log' format + +Networking + * uri - URI utilities + * dns - Tcl Domain Name Service Client + * ntp_time - Tcl Time Service Client + * nntp - Tcl client for the NNTP protocol + * pop3 - Tcl client for POP3 email protocol + * pop3d - Tcl POP3 server implementation + * pop3d::udb - Simple user database for pop3d + * pop3d::dbox - Simple mailbox database for pop3d + * ftp - Client-side tcl implementation of the ftp protocol + * ftp - Client-side tcl implementation of the ftp protocol + * ftpd - Tcl FTP server implementation + * smtp - Client-side tcl implementation of the smtp protocol + * smtpd - Tcl SMTP server implementation + * irc - Create IRC connection and interface. + +CGI programming + * ncgi - Procedures to manipulate CGI values. + * html - Procedures to generate HTML structures + * javascript - Procedures to generate HTML and Java Script structures. + +Grammars and finite automata + * grammar::fa - Create and manipulate finite automatons + * grammar::fa::op - Operations on finite automatons + * grammar::dacceptor - Create and use deterministic acceptors + * grammar::dexec - Execute deterministic finite automatons + +TKLib + * Plotchart - Simple plotting and charting package + * autoscroll - Provides for a scrollbar to automatically mapped and + unmapped as needed + * ctext - An extended text widget with customizable Syntax highlighting + * cursor - Procedures to handle CURSOR data + * datefield - Tk datefield widget + * style - Changes default Tk look&feel + * ipentry - An IP address entry widget + * tkpiechart - Creates and dynamically updates 2D or 3D pie charts +--------------------------------------------------------- diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/autoscroll.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/autoscroll.rb new file mode 100644 index 0000000..7db3c2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/autoscroll.rb @@ -0,0 +1,158 @@ +# +# tkextlib/tcllib/autoscroll.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Provides for a scrollbar to automatically mapped and unmapped as needed +# +# (The following is the original description of the library.) +# +# This package allows scrollbars to be mapped and unmapped as needed +# depending on the size and content of the scrollbars scrolled widget. +# The scrollbar must be managed by either pack or grid, other geometry +# managers are not supported. +# +# When managed by pack, any geometry changes made in the scrollbars parent +# between the time a scrollbar is unmapped, and when it is mapped will be +# lost. It is an error to destroy any of the scrollbars siblings while the +# scrollbar is unmapped. When managed by grid, if anything becomes gridded +# in the same row and column the scrollbar occupied it will be replaced by +# the scrollbar when remapped. +# +# This package may be used on any scrollbar-like widget as long as it +# supports the set subcommand in the same style as scrollbar. If the set +# subcommand is not used then this package will have no effect. +# + +require 'tk' +require 'tk/scrollbar' +require 'tkextlib/tcllib.rb' + +module Tk + module Tcllib + module Autoscroll + PACKAGE_NAME = 'autoscroll'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('autoscroll') + rescue + '' + end + end + + def self.not_available + fail RuntimeError, "'tkextlib/tcllib/autoscroll' extension is not available on your current environment." + end + + def self.autoscroll(win) + Tk::Tcllib::Autoscroll.not_available + end + + def self.unautoscroll(win) + Tk::Tcllib::Autoscroll.not_available + end + end + end +end + +module Tk + module Scrollable + def autoscroll(mode = nil) + case mode + when :x, 'x' + if @xscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) + end + when :y, 'y' + if @yscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) + end + when nil, :both, 'both' + if @xscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar) + end + if @yscrollbar + Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar) + end + else + fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" + end + self + end + def unautoscroll(mode = nil) + case mode + when :x, 'x' + if @xscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) + end + when :y, 'y' + if @yscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) + end + when nil, :both, 'both' + if @xscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar) + end + if @yscrollbar + Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar) + end + else + fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected" + end + self + end + end +end + +class Tk::Scrollbar + def autoscroll + # Arranges for the already existing scrollbar to be mapped + # and unmapped as needed. + #tk_call_without_enc('::autoscroll::autoscroll', @path) + Tk::Tcllib::Autoscroll.autoscroll(self) + self + end + def unautoscroll + # Returns the scrollbar to its original static state. + #tk_call_without_enc('::autoscroll::unautoscroll', @path) + Tk::Tcllib::Autoscroll.unautoscroll(self) + self + end +end + +# TkPackage.require('autoscroll', '1.0') +# TkPackage.require('autoscroll', '1.1') +TkPackage.require('autoscroll') + +module Tk + module Tcllib + class << Autoscroll + undef not_available + end + + module Autoscroll + extend TkCore + def self.autoscroll(win) + tk_call_without_enc('::autoscroll::autoscroll', win.path) + end + + def self.unautoscroll(win) + tk_call_without_enc('::autoscroll::unautoscroll', win.path) + end + + def self.wrap + # v1.1 + tk_call_without_enc('::autoscroll::wrap') + end + + def self.unwrap + # v1.1 + tk_call_without_enc('::autoscroll::unwrap') + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ctext.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ctext.rb new file mode 100644 index 0000000..9014037 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ctext.rb @@ -0,0 +1,160 @@ +# +# tkextlib/tcllib/ctext.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Overloads the text widget and provides new commands +# + +require 'tk' +require 'tk/text' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('ctext', '3.1') +TkPackage.require('ctext') + +module Tk + module Tcllib + class CText < Tk::Text + PACKAGE_NAME = 'ctext'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('ctext') + rescue + '' + end + end + end + end +end + +class Tk::Tcllib::CText + TkCommandNames = ['ctext'.freeze].freeze + WidgetClassName = 'Ctext'.freeze + WidgetClassNames[WidgetClassName] = self + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def __strval_optkeys + super() << 'linemapfg' << 'linemapbg' << + 'linemap_select_fg' << 'linemap_select_bg' + end + private :__strval_optkeys + + def __boolval_optkeys + super() << 'highlight' << 'linemap_markable' + end + private :__boolval_optkeys + + def append(*args) + tk_send('append', *args) + end + + def copy + tk_send('copy') + end + + def cut + tk_send('cut') + end + + def fast_delete(*args) + tk_send('fastdelete', *args) + end + + def fast_insert(*args) + tk_send('fastinsert', *args) + end + + def highlight(*args) + tk_send('highlight', *args) + end + + def paste + tk_send('paste') + end + + def edit(*args) + tk_send('edit', *args) + end + + def add_highlight_class(klass, col, *keywords) + tk_call('ctext::addHighlightClass', @path, klass, col, keywords.flatten) + self + end + + def add_highlight_class_for_special_chars(klass, col, *chrs) + tk_call('ctext::addHighlightClassForSpecialChars', + @path, klass, col, chrs.join('')) + self + end + + def add_highlight_class_for_regexp(klass, col, tcl_regexp) + tk_call('ctext::addHighlightClassForRegexp', + @path, klass, col, tcl_regexp) + self + end + + def add_highlight_class_with_only_char_start(klass, col, chr) + tk_call('ctext::addHighlightClassWithOnlyCharStart', + @path, klass, col, chr) + self + end + + def clear_highlight_classes + tk_call('ctext::clearHighlightClasses', @path) + self + end + + def get_highlight_classes + tk_split_simplelist(tk_call('ctext::getHighlightClasses', @path)) + end + + def delete_highlight_class(klass) + tk_call('ctext::deleteHighlightClass', @path, klass) + self + end + + def enable_C_comments + tk_call('ctext::enableComments', @path) + self + end + + def disable_C_comments + tk_call('ctext::disableComments', @path) + self + end + + def find_next_char(idx, chr) + tk_call('ctext::findNextChar', @path, idx, chr) + end + + def find_next_space(idx) + tk_call('ctext::findNextSpace', @path, idx) + end + + def find_previous_space(idx) + tk_call('ctext::findPreviousSpace', @path, idx) + end + + def set_update_proc(cmd=Proc.new) + tk_call('proc', 'ctext::update', '', cmd) + self + end + + def modified?(mode) + bool(tk_call('ctext::modified', @path, mode)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/cursor.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/cursor.rb new file mode 100644 index 0000000..9bb828e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/cursor.rb @@ -0,0 +1,97 @@ +# +# tkextlib/tcllib/cursor.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Procedures to handle CURSOR data +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +module Tk + module Tcllib + module Cursor + PACKAGE_NAME = 'cursor'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('cursor') + rescue + '' + end + end + + def self.not_available + fail RuntimeError, "'tkextlib/tcllib/cursor' extension is not available on your current environment." + end + + def self.cursor_display(win=None) + Tk::Tcllib::Cursor.not_available + end + + def self.cursor_propagate(win, cursor) + Tk::Tcllib::Cursor.not_available + end + + def self.cursor_restore(win, cursor = None) + Tk::Tcllib::Cursor.not_available + end + end + end + + def self.cursor_display(parent=None) + # Pops up a dialog with a listbox containing all the cursor names. + # Selecting a cursor name will display it in that dialog. + # This is simply for viewing any available cursors on the platform . + #tk_call_without_enc('::cursor::display', parent) + Tk::Tcllib::Cursor.cursor_display(parent) + end +end + +class TkWindow + def cursor_propagate(cursor) + # Sets the cursor for self and all its descendants to cursor. + #tk_call_without_enc('::cursor::propagate', @path, cursor) + Tk::Tcllib::Cursor.cursor_propagate(self, cursor) + end + def cursor_restore(cursor = None) + # Restore the original or previously set cursor for self and all its + # descendants. If cursor is specified, that will be used if on any + # widget that did not have a preset cursor (set by a previous call + # to TkWindow#cursor_propagate). + #tk_call_without_enc('::cursor::restore', @path, cursor) + Tk::Tcllib::Cursor.cursor_restore(self, cursor) + end +end + +# TkPackage.require('cursor', '0.1') +TkPackage.require('cursor') + +module Tk + module Tcllib + class << Cursor + undef not_available + end + + module Cursor + extend TkCore + def self.cursor_display(win=None) + tk_call_without_enc('::cursor::display', _epath(win)) + end + + def self.cursor_propagate(win, cursor) + #tk_call_without_enc('::cursor::propagate', win.path, cursor) + tk_call_without_enc('::cursor::propagate', _epath(win), cursor) + end + + def self.cursor_restore(win, cursor = None) + #tk_call_without_enc('::cursor::restore', win.path, cursor) + tk_call_without_enc('::cursor::restore', _epath(win), cursor) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/datefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/datefield.rb new file mode 100644 index 0000000..2244dd7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/datefield.rb @@ -0,0 +1,57 @@ +# +# tkextlib/tcllib/datefield.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Tk datefield widget +# +# (The following is the original description of the library.) +# +# The datefield package provides the datefield widget which is an enhanced +# text entry widget for the purpose of date entry. Only valid dates of the +# form MM/DD/YYYY can be entered. +# +# The datefield widget is, in fact, just an entry widget with specialized +# bindings. This means all the command and options for an entry widget apply +# equally here. + +require 'tk' +require 'tk/entry' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('datefield', '0.1') +TkPackage.require('datefield') + +module Tk + module Tcllib + class Datefield < Tk::Entry + PACKAGE_NAME = 'datefield'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('datefield') + rescue + '' + end + end + end + DateField = Datefield + end +end + +class Tk::Tcllib::Datefield + TkCommandNames = ['::datefield::datefield'.freeze].freeze + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/dialog.rb new file mode 100644 index 0000000..825621b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/dialog.rb @@ -0,0 +1,84 @@ +# +# tkextlib/tcllib/dialog.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Generic dialog widget (themed) +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::dialog', '1.2') +TkPackage.require('widget::dialog') + +module Tk::Tcllib + module Widget + class Dialog < TkWindow + PACKAGE_NAME = 'widget::dialog'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::dialog') + rescue + '' + end + end + end + end +end + +class Tk::Tcllib::Widget::Dialog + TkCommandNames = ['::widget::dialog'.freeze].freeze + + def __boolval_optkeys + ['separator', 'synchronous', 'transient'] + end + private :__boolval_optkeys + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def add(what, *args) + window(tk_send('add', *args)) + end + + def get_frame + window(tk_send('getframe')) + end + + def set_widget(widget) + tk_send('setwidget', widget) + self + end + + def display + tk_send('display') + self + end + alias show display + + def cancel + tk_send('cancel') + self + end + + def close(reason = None) + tk_send('close', reason) + end + + def withdraw + tk_send('withdraw') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/getstring.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/getstring.rb new file mode 100644 index 0000000..fc5d8b2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/getstring.rb @@ -0,0 +1,134 @@ +# +# tkextlib/tcllib/getstring.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * A dialog which consists of an Entry, OK, and Cancel buttons. +# + +require 'tk' +require 'tk/entry' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('getstring', '0.1') +TkPackage.require('getstring') + +module Tk::Tcllib + class GetString_Dialog < TkWindow + PACKAGE_NAME = 'getstring'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('getstring') + rescue + '' + end + end + end +end + + +class Tk::Tcllib::GetString_Dialog + TkCommandNames = ['::getstring::tk_getString'.freeze].freeze + WidgetClassName = 'TkSDialog'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.show(*args) + dialog = self.new(*args) + dialog.show + [dialog.status, dialog.value] + end + def self.display(*args) + self.show(*args) + end + + def initialize(*args) # args = (parent=nil, text='', keys=nil) + keys = args.pop + if keys.kind_of?(Hash) + text = args.pop + @keys = _symbolkey2str(keys) + args.push(keys) + else + text = keys + @keys = {} + end + if text + @text = text.dup + else + @text = '' + end + + @variable = TkVariable.new + @status = nil + + super(*args) + end + + def create_self(keys) + # dummy + end + private :create_self + + def show + @variable.value = '' + @status = bool(tk_call(self.class::TkCommandNames[0], + @path, @variable, @text, *hash_kv(@keys))) + end + alias display show + + def status + @status + end + + def value + @variable.value + end + + def cget_strict(slot) + slot = slot.to_s + if slot == 'text' + @text + else + @keys[slot] + end + end + def cget(slot) + cget_strict(slot) + end + + def configure(slot, value=None) + if slot.kind_of?(Hash) + slot.each{|k, v| configure(k, v)} + else + slot = slot.to_s + value = _symbolkey2str(value) if value.kind_of?(Hash) + if value && value != None + if slot == 'text' + @text = value.to_s + else + @keys[slot] = value + end + else + if slot == 'text' + @text = '' + else + @keys.delete(slot) + end + end + end + self + end + + def configinfo(slot = nil) + if slot + slot = slot.to_s + [ slot, nil, nil, nil, ( (slot == 'text')? @text: @keys[slot] ) ] + else + @keys.collect{|k, v| [ k, nil, nil, nil, v ] } \ + << [ 'text', nil, nil, nil, @text ] + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/history.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/history.rb new file mode 100644 index 0000000..a01a4eb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/history.rb @@ -0,0 +1,73 @@ +# +# tkextlib/tcllib/history.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Provides a history for Entry widgets +# + +require 'tk' +require 'tk/entry' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('history', '0.1') +TkPackage.require('history') + +module Tk::Tcllib + module History + PACKAGE_NAME = 'history'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('history') + rescue + '' + end + end + end +end + +module Tk::Tcllib::History + extend TkCore + + def self.init(entry, length=None) + tk_call_without_enc('::history::init', entry.path, length) + entry.extend(self) # add methods to treat history to the entry widget + end + + def self.remove(entry) + tk_call_without_enc('::history::remove', entry.path) + entry + end + + def history_remove + tk_call_without_enc('::history::remove', @path) + self + end + + def history_add(text) + tk_call('::history::add', @path, text) + self + end + + def history_get + simplelist(tk_call_without_enc('::history::get', @path)) + end + + def history_clear + tk_call_without_enc('::history::clear', @path) + self + end + + def history_configure(opt, value) + tk_call('::history::configure', @path, opt, value) + self + end + + def history_configinfo(opt) + tk_call('::history::configure', @path, opt) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ico.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ico.rb new file mode 100644 index 0000000..8c92926 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ico.rb @@ -0,0 +1,116 @@ +# +# tkextlib/tcllib/ico.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Reading and writing windows icons +# + +require 'tk' +require 'tk/image' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('ico', '0.3') +TkPackage.require('ico') + +module Tk + module Tcllib + class ICO < TkImage + PACKAGE_NAME = 'ico'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('ico') + rescue + '' + end + end + end + end +end + +class Tk::Tcllib::ICO + def self.list(file, keys=nil) + tk_split_list(tk_call_without_enc('::ico::getIconList', file, + *hash_kv(keys, true))) + end + + def self.get(file, index, keys=nil) + tk_call_without_enc('::ico::getIcon', file, index, *hash_kv(keys, true)) + end + + def self.get_image(file, index, keys={}) + keys = _symbolkey2str(keys) + keys.delete('format') + self.new(file, index, keys) + end + + def self.get_data(file, index, keys={}) + keys['format'] = 'data' + tk_split_list(tk_call_without_enc('::ico::getIcon', file, index, + *hash_kv(keys, true))) + end + + def self.write(file, index, depth, data, keys=nil) + tk_call_without_enc('::ico::writeIcon', file, index, depth, data, + *hash_kv(keys, true)) + end + + def self.copy(from_file, from_index, to_file, to_index, keys=nil) + tk_call_without_enc('::ico::copyIcon', + from_file, from_index, to_file, to_index, + *hash_kv(keys, true)) + end + + def self.exe_to_ico(exe_file, ico_file, keys=nil) + tk_call_without_enc('::ico::copyIcon', exe_file, ico_file, + *hash_kv(keys, true)) + end + + def self.clear_cache(file=None) + tk_call_without_enc('::ico::clearCache', file) + end + + def self.transparent_color(image, color) + if image.kind_of?(Array) + tk_split_list(tk_call_without_enc('::ico::transparentColor', + image, color)) + else + tk_call_without_enc('::ico::transparentColor', image, color) + end + end + + def self.show(file, keys=nil) + tk_call_without_enc('::ico::Show', file, *hash_kv(keys, true)) + end + + ########################### + + def initialize(file, index, keys=nil) + keys = _symbolkey2str(keys) + if keys.key?('name') + @path = keys['name'].to_s + else + Tk_Image_ID.mutex.synchronize{ + @path = Tk_Image_ID.join(TkCore::INTERP._ip_id_) + Tk_Image_ID[1].succ! + } + end + tk_call_without_enc('::ico::getIcon', file, index, '-name', @path, + '-format', 'image', *hash_kv(keys, true)) + Tk_IMGTBL[@path] = self + end + + def write(file, index, depth, keys=nil) + Tk::Tcllib::ICO.write(file, index, depth, @path, keys=nil) + self + end + + def transparent_color(color) + tk_call_without_enc('::ico::transparentColor', @path, color) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ip_entry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ip_entry.rb new file mode 100644 index 0000000..c4b8240 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ip_entry.rb @@ -0,0 +1,66 @@ +# +# tkextlib/tcllib/ip_entry.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * An IP address entry widget +# +# (The following is the original description of the library.) +# +# This package provides a widget for the entering of a IP address. +# It guarantees a valid address at all times. + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('ipentry', '0.1') +TkPackage.require('ipentry') + +module Tk + module Tcllib + class IP_Entry < Tk::Entry + PACKAGE_NAME = 'ipentry'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('ipentry') + rescue + '' + end + end + end + IPEntry = IP_Entry + end +end + +class Tk::Tcllib::IP_Entry + TkCommandNames = ['::ipentry::ipentry'.freeze].freeze + WidgetClassName = 'IPEntry'.freeze + WidgetClassNames[WidgetClassName] = self + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def __strval_optkeys + super() << 'fg' << 'bg' << 'insertbackground' + end + private :__strval_optkeys + + def complete? + bool(tk_send_without_enc('complete')) + end + + def insert(*ip) + tk_send_without_enc('insert', array2tk_list(ip.flatten)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/panelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/panelframe.rb new file mode 100644 index 0000000..2a4562e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/panelframe.rb @@ -0,0 +1,72 @@ +# +# tkextlib/tcllib/panelframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Create PanelFrame widgets. +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::panelframe', '1.0') +TkPackage.require('widget::panelframe') + +module Tk::Tcllib + module Widget + class PanelFrame < TkWindow + PACKAGE_NAME = 'widget::panelframe'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::panelframe') + rescue + '' + end + end + end + Panelframe = PanelFrame + end +end + +class Tk::Tcllib::Widget::PanelFrame + TkCommandNames = ['::widget::panelframe'.freeze].freeze + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def add(what, *args) + window(tk_send('add', *args)) + end + + #def get_frame + # window(tk_send('getframe')) + #end + + def set_widget(widget) + tk_send('setwidget', widget) + self + end + + def remove(*wins) + tk_send('remove', *wins) + end + def remove_destroy(*wins) + tk_send('remove', '-destroy', *wins) + end + alias delete remove_destroy + + def items + simplelist(tk_send('items')).collect!{|w| window(w)} + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/plotchart.rb new file mode 100644 index 0000000..06ab20f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/plotchart.rb @@ -0,0 +1,886 @@ +# +# tkextlib/tcllib/plotchart.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Simple plotting and charting package +# +# (The following is the original description of the library.) +# +# Plotchart is a Tcl-only package that focuses on the easy creation of +# xy-plots, barcharts and other common types of graphical presentations. +# The emphasis is on ease of use, rather than flexibility. The procedures +# that create a plot use the entire canvas window, making the layout of the +# plot completely automatic. +# +# This results in the creation of an xy-plot in, say, ten lines of code: +# -------------------------------------------------------------------- +# package require Plotchart +# +# canvas .c -background white -width 400 -height 200 +# pack .c -fill both +# +# # +# # Create the plot with its x- and y-axes +# # +# set s [::Plotchart::createXYPlot .c {0.0 100.0 10.0} {0.0 100.0 20.0}] +# +# foreach {x y} {0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 } { +# $s plot series1 $x $y +# } +# +# $s title "Data series" +# -------------------------------------------------------------------- +# +# A drawback of the package might be that it does not do any data management. +# So if the canvas that holds the plot is to be resized, the whole plot must +# be redrawn. The advantage, though, is that it offers a number of plot and +# chart types: +# +# * XY-plots like the one shown above with any number of data series. +# * Stripcharts, a kind of XY-plots where the horizontal axis is adjusted +# automatically. The result is a kind of sliding window on the data +# series. +# * Polar plots, where the coordinates are polar instead of cartesian. +# * Isometric plots, where the scale of the coordinates in the two +# directions is always the same, i.e. a circle in world coordinates +# appears as a circle on the screen. +# You can zoom in and out, as well as pan with these plots (Note: this +# works best if no axes are drawn, the zooming and panning routines do +# not distinguish the axes), using the mouse buttons with the control +# key and the arrow keys with the control key. +# * Piecharts, with automatic scaling to indicate the proportions. +# * Barcharts, with either vertical or horizontal bars, stacked bars or +# bars side by side. +# * Timecharts, where bars indicate a time period and milestones or other +# important moments in time are represented by triangles. +# * 3D plots (both for displaying surfaces and 3D bars) +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('Plotchart', '0.9') +# TkPackage.require('Plotchart', '1.1') +TkPackage.require('Plotchart') + +module Tk + module Tcllib + module Plotchart + PACKAGE_NAME = 'Plotchart'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Plotchart') + rescue + '' + end + end + end + end +end + +module Tk::Tcllib::Plotchart + extend TkCore + ############################ + def self.view_port(w, *args) # args := pxmin, pymin, pxmax, pymax + tk_call_without_enc('::Plotchart::viewPort', w.path, *(args.flatten)) + end + + def self.world_coordinates(w, *args) # args := xmin, ymin, xmax, ymax + tk_call_without_enc('::Plotchart::worldCoordinates', + w.path, *(args.flatten)) + end + + def self.world_3D_coordinates(w, *args) + # args := xmin, ymin, zmin, xmax, ymax, zmax + tk_call_without_enc('::Plotchart::world3DCoordinates', + w.path, *(args.flatten)) + end + + def self.coords_to_pixel(w, x, y) + list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y)) + end + + def self.coords_3D_to_pixel(w, x, y, z) + list(tk_call_without_enc('::Plotchart::coords3DToPixel', w.path, x, y, z)) + end + + def self.polar_coordinates(w, radmax) + tk_call_without_enc('::Plotchart::polarCoordinates', w.path, radmax) + end + + def self.polar_to_pixel(w, rad, phi) + list(tk_call_without_enc('::Plotchart::polarToPixel', w.path, rad, phi)) + end + + def self.pixel_to_coords(w, x, y) + list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y)) + end + + def self.determine_scale(w, xmax, ymax) + tk_call_without_enc('::Plotchart::determineScale', w.path, xmax, ymax) + end + + def self.set_zoom_pan(w) + tk_call_without_enc('::Plotchart::setZoomPan', w.path) + end + + ############################ + module ChartMethod + include TkCore + + def title(str) + tk_call_without_enc(@chart, 'title', _get_eval_enc_str(str)) + self + end + + def save_plot(filename) + tk_call_without_enc(@chart, 'saveplot', filename) + self + end + + def xtext(str) + tk_call_without_enc(@chart, 'xtext', _get_eval_enc_str(str)) + self + end + + def ytext(str) + tk_call_without_enc(@chart, 'ytext', _get_eval_enc_str(str)) + self + end + + def xconfig(key, value=None) + if key.kind_of?(Hash) + tk_call_without_enc(@chart, 'xconfig', *hash_kv(key, true)) + else + tk_call_without_enc(@chart, 'xconfig', + "-#{key}", _get_eval_enc_str(value)) + end + self + end + + def yconfig(key, value=None) + if key.kind_of?(Hash) + tk_call_without_enc(@chart, 'yconfig', *hash_kv(key, true)) + else + tk_call_without_enc(@chart, 'yconfig', + "-#{key}", _get_eval_enc_str(value)) + end + self + end + + ############################ + def view_port(*args) # args := pxmin, pymin, pxmax, pymax + tk_call_without_enc('::Plotchart::viewPort', @path, *(args.flatten)) + self + end + + def world_coordinates(*args) # args := xmin, ymin, xmax, ymax + tk_call_without_enc('::Plotchart::worldCoordinates', + @path, *(args.flatten)) + self + end + + def world_3D_coordinates(*args) + # args := xmin, ymin, zmin, xmax, ymax, zmax + tk_call_without_enc('::Plotchart::world3DCoordinates', + @path, *(args.flatten)) + self + end + + def coords_to_pixel(x, y) + list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y)) + end + + def coords_3D_to_pixel(x, y, z) + list(tk_call_without_enc('::Plotchart::coords3DToPixel', @path, x, y, z)) + end + + def polar_coordinates(radmax) + tk_call_without_enc('::Plotchart::polarCoordinates', @path, radmax) + self + end + + def polar_to_pixel(rad, phi) + list(tk_call_without_enc('::Plotchart::polarToPixel', @path, rad, phi)) + end + + def pixel_to_coords(x, y) + list(tk_call_without_enc('::Plotchart::coordsToPixel', @path, x, y)) + end + + def determine_scale(xmax, ymax) + tk_call_without_enc('::Plotchart::determineScale', @path, xmax, ymax) + self + end + + def set_zoom_pan() + tk_call_without_enc('::Plotchart::setZoomPan', @path) + self + end + end + + ############################ + class XYPlot < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createXYPlot'.freeze + ].freeze + + def initialize(*args) # args := ([parent,] xaxis, yaxis [, keys]) + # xaxis := Array of [minimum, maximum, stepsize] + # yaxis := Array of [minimum, maximum, stepsize] + if args[0].kind_of?(Array) + @xaxis = args.shift + @yaxis = args.shift + + super(*args) # create canvas widget + else + parent = args.shift + + @xaxis = args.shift + @yaxis = args.shift + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xaxis), array2tk_list(@yaxis)) + end + private :_create_chart + + def __destroy_hook__ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path) + } + end + + def plot(series, x, y) + tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series), x, y) + self + end + + def contourlines(xcrd, ycrd, vals, clss=None) + xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array) + ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array) + vals = array2tk_list(vals) if vals.kind_of?(Array) + clss = array2tk_list(clss) if clss.kind_of?(Array) + + tk_call_without_enc(@chart, 'contourlines', xcrd, ycrd, vals, clss) + self + end + + def contourfill(xcrd, ycrd, vals, klasses=None) + xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array) + ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array) + vals = array2tk_list(vals) if vals.kind_of?(Array) + clss = array2tk_list(clss) if clss.kind_of?(Array) + + tk_call_without_enc(@chart, 'contourfill', xcrd, ycrd, vals, clss) + self + end + + def contourbox(xcrd, ycrd, vals, klasses=None) + xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array) + ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array) + vals = array2tk_list(vals) if vals.kind_of?(Array) + clss = array2tk_list(clss) if clss.kind_of?(Array) + + tk_call_without_enc(@chart, 'contourbox', xcrd, ycrd, vals, clss) + self + end + + def color_map(colors) + colors = array2tk_list(colors) if colors.kind_of?(Array) + + tk_call_without_enc(@chart, 'colorMap', colors) + self + end + + def grid_cells(xcrd, ycrd) + xcrd = array2tk_list(xcrd) if xcrd.kind_of?(Array) + ycrd = array2tk_list(ycrd) if ycrd.kind_of?(Array) + + tk_call_without_enc(@chart, 'grid', xcrd, ycrd) + self + end + + def dataconfig(series, key, value=None) + if key.kind_of?(Hash) + tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true)) + else + tk_call_without_enc(@chart, 'dataconfig', series, + "-#{key}", _get_eval_enc_str(value)) + end + end + end + + ############################ + class Stripchart < XYPlot + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createStripchart'.freeze + ].freeze + end + + ############################ + class PolarPlot < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createPolarplot'.freeze + ].freeze + + def initialize(*args) # args := ([parent,] radius_data [, keys]) + # radius_data := Array of [maximum_radius, stepsize] + if args[0].kind_of?(Array) + @radius_data = args.shift + + super(*args) # create canvas widget + else + parent = args.shift + + @radius_data = args.shift + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@radius_data)) + end + private :_create_chart + + def __destroy_hook__ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path) + } + end + + def plot(series, radius, angle) + tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(series), + radius, angle) + self + end + + def dataconfig(series, key, value=None) + if key.kind_of?(Hash) + tk_call_without_enc(@chart, 'dataconfig', series, *hash_kv(key, true)) + else + tk_call_without_enc(@chart, 'dataconfig', series, + "-#{key}", _get_eval_enc_str(value)) + end + end + end + Polarplot = PolarPlot + + ############################ + class IsometricPlot < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createIsometricPlot'.freeze + ].freeze + + def initialize(*args) # args := ([parent,] xaxis, yaxis, [, step] [, keys]) + # xaxis := Array of [minimum, maximum] + # yaxis := Array of [minimum, maximum] + # step := Float of stepsize | "noaxes" | :noaxes + if args[0].kind_of?(Array) + @xaxis = args.shift + @yaxis = args.shift + + if args[0].kind_of?(Hash) + @stepsize = :noaxes + else + @stepsize = args.shift + end + + super(*args) # create canvas widget + else + parent = args.shift + + @xaxis = args.shift + @yaxis = args.shift + + if args[0].kind_of?(Hash) + @stepsize = :noaxes + else + @stepsize = args.shift + end + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xaxis), array2tk_list(@yaxis), + @stepsize) + end + private :_create_chart + + def plot(type, *args) + self.__send__("plot_#{type.to_s.tr('-', '_')}", *args) + end + + def plot_rectangle(*args) # args := x1, y1, x2, y2, color + tk_call_without_enc(@chart, 'plot', 'rectangle', *(args.flatten)) + self + end + + def plot_filled_rectangle(*args) # args := x1, y1, x2, y2, color + tk_call_without_enc(@chart, 'plot', 'filled-rectangle', *(args.flatten)) + self + end + + def plot_circle(*args) # args := xc, yc, radius, color + tk_call_without_enc(@chart, 'plot', 'circle', *(args.flatten)) + self + end + + def plot_filled_circle(*args) # args := xc, yc, radius, color + tk_call_without_enc(@chart, 'plot', 'filled-circle', *(args.flatten)) + self + end + end + Isometricplot = IsometricPlot + + ############################ + class Plot3D < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::create3DPlot'.freeze + ].freeze + + def initialize(*args) # args := ([parent,] xaxis, yaxis, zaxis [, keys]) + # xaxis := Array of [minimum, maximum, stepsize] + # yaxis := Array of [minimum, maximum, stepsize] + # zaxis := Array of [minimum, maximum, stepsize] + if args[0].kind_of?(Array) + @xaxis = args.shift + @yaxis = args.shift + @zaxis = args.shift + + super(*args) # create canvas widget + else + parent = args.shift + + @xaxis = args.shift + @yaxis = args.shift + @zaxis = args.shift + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xaxis), + array2tk_list(@yaxis), + array2tk_list(@zaxis)) + end + private :_create_chart + + def plot_function(cmd=Proc.new) + Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}") + tk_call_without_enc(@chart, 'plotfunc', "#{@path}_#{@chart}") + self + end + + def plot_funcont(conts, cmd=Proc.new) + conts = array2tk_list(conts) if conts.kind_of?(Array) + Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}") + tk_call_without_enc(@chart, 'plotfuncont', "#{@path}_#{@chart}", conts) + self + end + + def grid_size(nxcells, nycells) + tk_call_without_enc(@chart, 'gridsize', nxcells, nycells) + self + end + + def plot_data(dat) + # dat has to be provided as a 2 level array. + # 1st level contains rows, drawn in y-direction, + # and each row is an array whose elements are drawn in x-direction, + # for the columns. + tk_call_without_enc(@chart, 'plotdata', dat) + self + end + + def colour(fill, border) + # configure the colours to use for polygon borders and inner area + tk_call_without_enc(@chart, 'colour', fill, border) + self + end + alias colours colour + alias colors colour + alias color colour + end + + ############################ + class Piechart < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createPiechart'.freeze + ].freeze + + def initialize(*args) # args := ([parent] [, keys]) + if args[0].kind_of?(Tk::Canvas) + parent = args.shift + @path = parent.path + else + super(*args) # create canvas widget + end + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path) + end + private :_create_chart + + def plot(*dat) # argument is a list of [label, value] + tk_call_without_enc(@chart, 'plot', dat.flatten) + self + end + end + + ############################ + class Barchart < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createBarchart'.freeze + ].freeze + + def initialize(*args) + # args := ([parent,] xlabels, ylabels [, series] [, keys]) + # xlabels, ylabels := labels | axis ( depend on normal or horizontal ) + # labels := Array of [label, label, ...] + # (It determines the number of bars that will be plotted per series.) + # axis := Array of [minimum, maximum, stepsize] + # series := Integer number of data series | 'stacked' | :stacked + if args[0].kind_of?(Array) + @xlabels = args.shift + @ylabels = args.shift + + if args[0].kind_of?(Hash) + @series_size = :stacked + else + @series_size = args.shift + end + + super(*args) # create canvas widget + else + parent = args.shift + + @xlabels = args.shift + @ylabels = args.shift + + if args[0].kind_of?(Hash) + @series_size = :stacked + else + @series_size = args.shift + end + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + array2tk_list(@xlabels), array2tk_list(@ylabels), + @series_size) + end + private :_create_chart + + def __destroy_hook__ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.mutex.synchronize{ + Tk::Tcllib::Plotchart::PlotSeries::SeriesID_TBL.delete(@path) + } + end + + def plot(series, dat, col=None) + tk_call_without_enc(@chart, 'plot', series, dat, col) + self + end + + def colours(*cols) + # set the colours to be used + tk_call_without_enc(@chart, 'colours', *cols) + self + end + alias colour colours + alias colors colours + alias color colours + end + + ############################ + class HorizontalBarchart < Barchart + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createHorizontalBarchart'.freeze + ].freeze + end + + ############################ + class Timechart < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createTimechart'.freeze + ].freeze + + def initialize(*args) + # args := ([parent,] time_begin, time_end, items [, keys]) + # time_begin := String of time format (e.g. "1 january 2004") + # time_end := String of time format (e.g. "1 january 2004") + # items := Expected/maximum number of items + # ( This determines the vertical spacing. ) + if args[0].kind_of?(String) + @time_begin = args.shift + @time_end = args.shift + @items = args.shift + + super(*args) # create canvas widget + else + parent = args.shift + + @time_begin = args.shift + @time_end = args.shift + @items = args.shift + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + @time_begin, @time_end, @items) + end + private :_create_chart + + def period(txt, time_begin, time_end, col=None) + tk_call_without_enc(@chart, 'period', txt, time_begin, time_end, col) + self + end + + def milestone(txt, time, col=None) + tk_call_without_enc(@chart, 'milestone', txt, time, col) + self + end + + def vertline(txt, time) + tk_call_without_enc(@chart, 'vertline', txt, time) + self + end + end + + ############################ + class Gnattchart < Tk::Canvas + include ChartMethod + + TkCommandNames = [ + 'canvas'.freeze, + '::Plotchart::createGnattchart'.freeze + ].freeze + + def initialize(*args) + # args := ([parent,] time_begin, time_end, items [, text_width] [, keys]) + # time_begin := String of time format (e.g. "1 january 2004") + # time_end := String of time format (e.g. "1 january 2004") + # items := Expected/maximum number of items + # ( This determines the vertical spacing. ) + if args[0].kind_of?(String) + @time_begin = args.shift + @time_end = args.shift + @items = args.shift + + if args[0].kind_of?(Fixnum) + @text_width = args.shift + else + @text_width = None + end + + super(*args) # create canvas widget + else + parent = args.shift + + @time_begin = args.shift + @time_end = args.shift + @items = args.shift + + if args[0].kind_of?(Fixnum) + @text_width = args.shift + else + @text_width = None + end + + if parent.kind_of?(Tk::Canvas) + @path = parent.path + else + super(parent, *args) # create canvas widget + end + end + + @chart = _create_chart + end + + def _create_chart + p self.class::TkCommandNames[1] if $DEBUG + tk_call_without_enc(self.class::TkCommandNames[1], @path, + @time_begin, @time_end, @items, @text_width) + end + private :_create_chart + + def task(txt, time_begin, time_end, completed=0.0) + list(tk_call_without_enc(@chart, 'task', txt, time_begin, time_end, + completed)).collect!{|id| + TkcItem.id2obj(self, id) + } + end + + def milestone(txt, time, col=None) + tk_call_without_enc(@chart, 'milestone', txt, time, col) + self + end + + def vertline(txt, time) + tk_call_without_enc(@chart, 'vertline', txt, time) + self + end + + def connect(from_task, to_task) + from_task = array2tk_list(from_task) if from_task.kind_of?(Array) + to_task = array2tk_list(to_task) if to_task.kind_of?(Array) + + tk_call_without_enc(@chart, 'connect', from_task, to_task) + self + end + + def summary(txt, tasks) + tasks = array2tk_list(tasks) if tasks.kind_of?(Array) + tk_call_without_enc(@chart, 'summary', tasks) + self + end + + def color_of_part(keyword, newcolor) + tk_call_without_enc(@chart, 'color', keyword, newcolor) + self + end + + def font_of_part(keyword, newfont) + tk_call_without_enc(@chart, 'font', keyword, newfont) + self + end + end + + ############################ + class PlotSeries < TkObject + SeriesID_TBL = TkCore::INTERP.create_table + + (Series_ID = ['series'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + TkCore::INTERP.init_ip_env{ + SeriesID_TBL.mutex.synchronize{ SeriesID_TBL.clear } + } + + def self.id2obj(chart, id) + path = chart.path + SeriesID_TBL.mutex.synchronize{ + if SeriesID_TBL[path] + SeriesID_TBL[path][id]? SeriesID_TBL[path][id]: id + else + id + end + } + end + + def initialize(chart, keys=nil) + @parent = @chart_obj = chart + @ppath = @chart_obj.path + Series_ID.mutex.synchronize{ + @path = @series = @id = Series_ID.join(TkCore::INTERP._ip_id_) + Series_ID[1].succ! + } + SeriesID_TBL.mutex.synchronize{ + SeriesID_TBL[@ppath] ||= {} + SeriesID_TBL[@ppath][@id] = self + } + dataconfig(keys) if keys.kind_of?(Hash) + end + + def plot(*args) + @chart_obj.plot(@series, *args) + end + + def dataconfig(key, value=None) + @chart_obj.dataconfig(@series, key, value) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ruler.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ruler.rb new file mode 100644 index 0000000..88ffb2c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/ruler.rb @@ -0,0 +1,65 @@ +# +# tkextlib/tcllib/ruler.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * ruler widget +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::ruler', '1.0') +TkPackage.require('widget::ruler') + +module Tk::Tcllib + module Widget + class Ruler < TkWindow + PACKAGE_NAME = 'widget::ruler'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::ruler') + rescue + '' + end + end + end + end +end + +class Tk::Tcllib::Widget::Ruler + TkCommandNames = ['::widget::ruler'.freeze].freeze + + def __boolval_optkeys + ['showvalues', 'outline', 'grid'] + end + private :__boolval_optkeys + + def __numlistval_optkeys + ['interval', 'sizes'] + end + private :__numlistval_optkeys + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def redraw + tk_send('redraw') + self + end + + def shade(org, dest, frac) + tk_send('shade', org, dest, frac) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/screenruler.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/screenruler.rb new file mode 100644 index 0000000..1b4067e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/screenruler.rb @@ -0,0 +1,68 @@ +# +# tkextlib/tcllib/screenruler.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * screenruler dialog +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::screenruler', '1.1') +TkPackage.require('widget::screenruler') + +module Tk::Tcllib + module Widget + class ScreenRuler < TkWindow + PACKAGE_NAME = 'widget::ruler'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::screenruler') + rescue + '' + end + end + end + Screenruler = ScreenRuler + end +end + +class Tk::Tcllib::Widget::ScreenRuler + TkCommandNames = ['::widget::screenruler'.freeze].freeze + + def __boolval_optkeys + ['topmost', 'reflect'] + end + private :__boolval_optkeys + + def __numlistval_optkeys + ['alpha'] + end + private :__numlistval_optkeys + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def display + tk_send('display') + self + end + alias show display + + def hide + tk_send('hide') + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/scrollwin.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/scrollwin.rb new file mode 100644 index 0000000..717728e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/scrollwin.rb @@ -0,0 +1,61 @@ +# +# tkextlib/tcllib/scrollwin.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Scrolled widget +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::scrolledwindow', '1.0') +TkPackage.require('widget::scrolledwindow') + +module Tk::Tcllib + module Widget + class ScrolledWindow < TkWindow + PACKAGE_NAME = 'widget::scrolledwindow'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::scrolledwindow') + rescue + '' + end + end + end + Scrolledwindow = ScrolledWindow + end +end + +class Tk::Tcllib::Widget::ScrolledWindow + TkCommandNames = ['::widget::scrolledwindow'.freeze].freeze + + def __numlistval_optkeys + ['ipad'] + end + private :__numlistval_optkeys + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def get_frame + window(tk_send('getframe')) + end + + def set_widget(widget) + tk_send('setwidget', widget) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/style.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/style.rb new file mode 100644 index 0000000..dac6916 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/style.rb @@ -0,0 +1,61 @@ +# +# tkextlib/tcllib/style.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * select and use some 'style' of option (resource) DB +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +module Tk::Tcllib + module Style + PACKAGE_NAME = 'style'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('style') + rescue + '' + end + end + + def self.not_available + fail RuntimeError, "'tkextlib/tcllib/style' extension is not available on your current environment." + end + + def self.names + Tk::Tcllib::Style.not_available + end + + def self.use(style) + Tk::Tcllib::Style.not_available + end + end +end + +# TkPackage.require('style', '0.1') +# TkPackage.require('style', '0.3') +TkPackage.require('style') + +module Tk::Tcllib + class << Style + undef not_available + end + + module Style + extend TkCore + + def self.names + tk_split_simplelist(tk_call('style::names')) + end + + def self.use(style) + tk_call('style::use', style) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/superframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/superframe.rb new file mode 100644 index 0000000..35da37e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/superframe.rb @@ -0,0 +1,51 @@ +# +# tkextlib/tcllib/superframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Superframe widget - enhanced labelframe widget +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget::superframe', '1.0') +TkPackage.require('widget::superframe') + +module Tk::Tcllib + module Widget + class SuperFrame < TkWindow + PACKAGE_NAME = 'widget::superframe'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget::superframe') + rescue + '' + end + end + end + Superframe = SuperlFrame + end +end + +class Tk::Tcllib::Widget::SuperFrame + TkCommandNames = ['::widget::superframe'.freeze].freeze + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def labelwidget + window(tk_send('labelwidget')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/swaplist.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/swaplist.rb new file mode 100644 index 0000000..1c813e3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/swaplist.rb @@ -0,0 +1,150 @@ +# +# tkextlib/tcllib/swaplist.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * A dialog which allows a user to move options between two lists +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('swaplist', '0.1') +TkPackage.require('swaplist') + +module Tk::Tcllib + class Swaplist_Dialog < TkWindow + PACKAGE_NAME = 'swaplist'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('swaplist') + rescue + '' + end + end + end +end + + +class Tk::Tcllib::Swaplist_Dialog + TkCommandNames = ['::swaplist::swaplist'.freeze].freeze + WidgetClassName = 'Swaplist'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.show(*args) + dialog = self.new(*args) + dialog.show + [dialog.status, dialog.value] + end + def self.display(*args) + self.show(*args) + end + + def initialize(*args) + # args = (parent=nil, complete_list=[], selected_list=[], keys=nil) + keys = args.pop + if keys.kind_of?(Hash) + @selected_list = args.pop + @complete_list = args.pop + @keys = _symbolkey2str(keys) + args.push(keys) + else + @selected_list = keys + @complete_list = args.pop + @keys = {} + end + + @selected_list = [] unless @selected_list + @complete_list = [] unless @complete_list + + @variable = TkVariable.new + @status = nil + + super(*args) + end + + def create_self(keys) + # dummy + end + private :create_self + + def show + @variable.value = '' + @status = bool(tk_call(self.class::TkCommandNames[0], + @path, @variable, + @complete_list, @selected_list, + *hash_kv(@keys))) + end + alias display show + + def status + @status + end + + def value + @variable.list + end + alias selected value + + def cget_strict(slot) + slot = slot.to_s + if slot == 'complete_list' + @complete_list + elsif slot == 'selected_list' + @selected_list + else + @keys[slot] + end + end + def cget(slot) + cget_strict(slot) + end + + def configure(slot, value=None) + if slot.kind_of?(Hash) + slot.each{|k, v| configure(k, v)} + else + slot = slot.to_s + value = _symbolkey2str(value) if value.kind_of?(Hash) + if value && value != None + if slot == 'complete_list' + @complete_list = value + elsif slot == 'selected_list' + @selected_list = value + else + @keys[slot] = value + end + else + if slot == 'complete_list' + @complete_list = [] + elsif slot == 'selected_list' + @selected_list = [] + else + @keys.delete(slot) + end + end + end + self + end + + def configinfo(slot = nil) + if slot + slot = slot.to_s + if slot == 'complete_list' + [ slot, nil, nil, nil, @complete_list ] + elsif slot == 'selected_list' + [ slot, nil, nil, nil, @selected_list ] + else + [ slot, nil, nil, nil, @keys[slot] ] + end + else + @keys.collect{|k, v| [ k, nil, nil, nil, v ] } \ + << [ 'complete_list', nil, nil, nil, @complete_list ] \ + << [ 'selected_list', nil, nil, nil, @selected_list ] + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist.rb new file mode 100644 index 0000000..efeb8fb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist.rb @@ -0,0 +1,27 @@ +# +# tkextlib/tcllib/tablelist.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * A multi-column listbox + +require 'tk' +require 'tkextlib/tcllib.rb' + +# check Tile extension :: If already loaded, use tablelist_tile. +unless defined? Tk::Tcllib::Tablelist_usingTile + Tk::Tcllib::Tablelist_usingTile = TkPackage.provide('tile') +end + +if Tk::Tcllib::Tablelist_usingTile + # with Tile + require 'tkextlib/tcllib/tablelist_tile' + +else + # without Tile + + # TkPackage.require('Tablelist', '4.2') + TkPackage.require('Tablelist') + + require 'tkextlib/tcllib/tablelist_core' +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb new file mode 100644 index 0000000..d7a6c97 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_core.rb @@ -0,0 +1,782 @@ +# +# tkextlib/tcllib/tablelist_core.rb +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * This file is required by 'tkextlib/tcllib/tablelist.rb' or +# 'tkextlib/tcllib/tablelist_tile.rb'. +# + +module Tk + module Tcllib + class Tablelist < TkWindow + if Tk::Tcllib::Tablelist_usingTile + PACKAGE_NAME = 'Tablelist_tile'.freeze + else + PACKAGE_NAME = 'Tablelist'.freeze + end + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require(self.package_name) + rescue + '' + end + end + + def self.use_Tile? + (Tk::Tcllib::Tablelist_usingTile)? true: false + end + end + TableList = Tablelist + end +end + +module Tk::Tcllib::TablelistItemConfig + include TkItemConfigMethod + + def _to_idx(idx) + if idx.kind_of?(Array) + idx.collect{|elem| _get_eval_string(elem)}.join(',') + else + idx + end + end + def _from_idx(idx) + return idx unless idx.kind_of?(String) + + if idx[0] == ?@ # '@x,y' + idx + elsif idx =~ /([^,]+),([^,]+)/ + row = $1, column = $2 + [num_or_str(row), num_or_str(column)] + else + num_or_str(idx) + end + end + private :_to_idx, :_from_idx + + def __item_cget_cmd(mixed_id) + [self.path, mixed_id[0] + 'cget', _to_idx(mixed_id[1])] + end + def __item_config_cmd(mixed_id) + [self.path, mixed_id[0] + 'configure', _to_idx(mixed_id[1])] + end + + def cell_cget(tagOrId, option) + itemcget(['cell', tagOrId], option) + end + def cell_cget_strict(tagOrId, option) + itemcget_strict(['cell', tagOrId], option) + end + def cell_configure(tagOrId, slot, value=None) + itemconfigure(['cell', tagOrId], slot, value) + end + def cell_configinfo(tagOrId, slot=nil) + itemconfiginfo(['cell', tagOrId], slot) + end + def current_cell_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['cell', tagOrId], slot) + end + alias cellcget cell_cget + alias cellcget_strict cell_cget_strict + alias cellconfigure cell_configure + alias cellconfiginfo cell_configinfo + alias current_cellconfiginfo current_cell_configinfo + + def column_cget(tagOrId, option) + itemcget(['column', tagOrId], option) + end + def column_cget_strict(tagOrId, option) + itemcget_strict(['column', tagOrId], option) + end + def column_configure(tagOrId, slot, value=None) + itemconfigure(['column', tagOrId], slot, value) + end + def column_configinfo(tagOrId, slot=nil) + itemconfiginfo(['column', tagOrId], slot) + end + def current_column_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['column', tagOrId], slot) + end + alias columncget column_cget + alias columncget_strict column_cget_strict + alias columnconfigure column_configure + alias columnconfiginfo column_configinfo + alias current_columnconfiginfo current_column_configinfo + + def row_cget(tagOrId, option) + itemcget(['row', tagOrId], option) + end + def row_cget_strict(tagOrId, option) + itemcget_strict(['row', tagOrId], option) + end + def row_configure(tagOrId, slot, value=None) + itemconfigure(['row', tagOrId], slot, value) + end + def row_configinfo(tagOrId, slot=nil) + itemconfiginfo(['row', tagOrId], slot) + end + def current_row_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['row', tagOrId], slot) + end + alias rowcget row_cget + alias rowcget_strict row_cget_strict + alias rowconfigure row_configure + alias rowconfiginfo row_configinfo + alias current_rowconfiginfo current_row_configinfo + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +class Tk::Tcllib::Tablelist + include Tk::Tcllib::TablelistItemConfig + include Scrollable + + TkCommandNames = ['::tablelist::tablelist'.freeze].freeze + WidgetClassName = 'Tablelist'.freeze + WidgetClassNames[WidgetClassName] = self + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + ########################## + + def __numval_optkeys + super() + ['titlecolumns'] + end + private :__numval_optkeys + + def __strval_optkeys + super() + ['snipstring'] + end + private :__strval_optkeys + + def __boolval_optkeys + super() + [ + 'forceeditendcommand', 'movablecolumns', 'movablerows', + 'protecttitlecolumns', 'resizablecolumns', + 'showarrow', 'showlabels', 'showseparators' + ] + end + private :__boolval_optkeys + + def __listval_optkeys + super() + ['columns'] + end + private :__listval_optkeys + + def __tkvariable_optkeys + super() + ['listvariable'] + end + private :__tkvariable_optkeys + + def __val2ruby_optkeys # { key=>proc, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "proc.call(value)" is called. + super().update('stretch'=>proc{|v| (v == 'all')? v: simplelist(v)}) + end + private :__val2ruby_optkeys + + def __ruby2val_optkeys # { key=>proc, ... } + # The method is used to convert a ruby's object to a opt-value. + # When set the value of the option "key", "proc.call(value)" is called. + # That is, "-#{key} #{proc.call(value)}". + super().update('stretch'=>proc{|v| + (v.kind_of?(Array))? v.collect{|e| _to_idx(e)}: v + }) + end + private :__ruby2val_optkeys + + def __font_optkeys + super() + ['labelfont'] + end + private :__font_optkeys + + ########################## + + def __item_strval_optkeys(id) + if id[0] == 'cell' + super(id) + ['title'] + else + super(id) - ['text'] + ['title'] + end + end + private :__item_strval_optkeys + + def __item_boolval_optkeys(id) + super(id) + [ + 'editable', 'hide', 'resizable', 'showarrow', 'stretchable', + ] + end + private :__item_boolval_optkeys + + def __item_listval_optkeys(id) + if id[0] == 'cell' + super(id) + else + super(id) + ['text'] + end + end + private :__item_listval_optkeys + + def __item_font_optkeys(id) + # maybe need to override + super(id) + ['labelfont'] + end + private :__item_font_optkeys + + ########################## + + def activate(index) + tk_send('activate', _to_idx(index)) + self + end + + def activate_cell(index) + tk_send('activatecell', _to_idx(index)) + self + end + alias activatecell activate_cell + + def get_attrib(name=nil) + if name && name != None + tk_send('attrib', name) + else + ret = [] + lst = simplelist(tk_send('attrib')) + until lst.empty? + ret << ( [lst.shift] << lst.shift ) + end + ret + end + end + def set_attrib(*args) + tk_send('attrib', *(args.flatten)) + self + end + + def bbox(index) + list(tk_send('bbox', _to_idx(index))) + end + + def bodypath + window(tk_send('bodypath')) + end + + def bodytag + TkBindTag.new_by_name(tk_send('bodytag')) + end + + def cancel_editing + tk_send('cancelediting') + self + end + alias cancelediting cancel_editing + + def cellindex(idx) + _from_idx(tk_send('cellindex', _to_idx(idx))) + end + + def cellselection_anchor(idx) + tk_send('cellselection', 'anchor', _to_idx(idx)) + self + end + + def cellselection_clear(first, last=nil) + if first.kind_of?(Array) + tk_send('cellselection', 'clear', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('cellselection', 'clear', first, last) + end + self + end + + def cellselection_includes(idx) + bool(tk_send('cellselection', 'includes', _to_idx(idx))) + end + + def cellselection_set(first, last=nil) + if first.kind_of?(Array) + tk_send('cellselection', 'set', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('cellselection', 'set', first, last) + end + self + end + + def columncount + number(tk_send('columncount')) + end + + def columnindex(idx) + number(tk_send('columnindex', _to_idx(idx))) + end + + def containing(y) + idx = num_or_str(tk_send('containing', y)) + (idx.kind_of?(Fixnum) && idx < 0)? nil: idx + end + + def containing_cell(x, y) + idx = _from_idx(tk_send('containingcell', x, y)) + if idx.kind_of?(Array) + [ + ((idx[0].kind_of?(Fixnum) && idx[0] < 0)? nil: idx[0]), + ((idx[1].kind_of?(Fixnum) && idx[1] < 0)? nil: idx[1]) + ] + else + idx + end + end + alias containingcell containing_cell + + def containing_column(x) + idx = num_or_str(tk_send('containingcolumn', x)) + (idx.kind_of?(Fixnum) && idx < 0)? nil: idx + end + alias containingcolumn containing_column + + def curcellselection + simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)} + end + + def curselection + list(tk_send('curselection')) + end + + def delete_items(first, last=nil) + if first.kind_of?(Array) + tk_send('delete', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('delete', first, last) + end + self + end + alias delete delete_items + alias deleteitems delete_items + + def delete_columns(first, last=nil) + if first.kind_of?(Array) + tk_send('deletecolumns', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('deletecolumns', first, last) + end + self + end + alias deletecolumns delete_columns + + def edit_cell(idx) + tk_send('editcell', _to_idx(idx)) + self + end + alias editcell edit_cell + + def editwinpath + window(tk_send('editwinpath')) + end + + def entrypath + window(tk_send('entrypath')) + end + + def fill_column(idx, txt) + tk_send('fillcolumn', _to_idx(idx), txt) + self + end + alias fillcolumn fill_column + + def finish_editing + tk_send('finishediting') + self + end + alias finishediting finish_editing + + def get(first, last=nil) + if first.kind_of?(Array) + simplelist(tk_send('get', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) } + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + simplelist(tk_send('get', first, last)) + end + end + + def get_cells(first, last=nil) + if first.kind_of?(Array) + simplelist(tk_send('getcells', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) } + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + simplelist(tk_send('getcells', first, last)) + end + end + alias getcells get_cells + + def get_columns(first, last=nil) + if first.kind_of?(Array) + simplelist(tk_send('getcolumns', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) } + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + simplelist(tk_send('getcolumns', first, last)) + end + end + alias getcolumns get_columns + + def get_keys(first, last=nil) + if first.kind_of?(Array) + simplelist(tk_send('getkeys', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) } + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + simplelist(tk_send('getkeys', first, last)) + end + end + alias getkeys get_keys + + def imagelabelpath(idx) + window(tk_send('imagelabelpath', _to_idx(idx))) + end + + def index(idx) + number(tk_send('index', _to_idx(idx))) + end + + def insert(idx, *items) + tk_send('insert', _to_idx(idx), *items) + self + end + + def insert_columnlist(idx, columnlist) + tk_send('insertcolumnlist', _to_idx(idx), columnlist) + self + end + alias insertcolumnlist insert_columnlist + + def insert_columns(idx, *args) + tk_send('insertcolums', _to_idx(idx), *args) + self + end + alias insertcolumns insert_columns + + def insert_list(idx, list) + tk_send('insertlist', _to_idx(idx), list) + self + end + alias insertlist insert_list + + def itemlistvar + TkVarAccess.new(tk_send('itemlistvar')) + end + + def labelpath(idx) + window(tk_send('labelpath', _to_idx(idx))) + end + + def labels + simplelist(tk_send('labels')) + end + + def move(src, target) + tk_send('move', _to_idx(src), _to_idx(target)) + self + end + + def move_column(src, target) + tk_send('movecolumn', _to_idx(src), _to_idx(target)) + self + end + alias movecolumn move_column + + def nearest(y) + _from_idx(tk_send('nearest', y)) + end + + def nearest_cell(x, y) + _from_idx(tk_send('nearestcell', x, y)) + end + alias nearestcell nearest_cell + + def nearest_column(x) + _from_idx(tk_send('nearestcolumn', x)) + end + alias nearestcolumn nearest_column + + def reject_input + tk_send('rejectinput') + self + end + alias rejectinput reject_input + + def reset_sortinfo + tk_send('resetsortinfo') + self + end + alias resetsortinfo reset_sortinfo + + def scan_mark(x, y) + tk_send('scan', 'mark', x, y) + self + end + + def scan_dragto(x, y) + tk_send('scan', 'dragto', x, y) + self + end + + def see(idx) + tk_send('see', _to_idx(idx)) + self + end + + def see_cell(idx) + tk_send('seecell', _to_idx(idx)) + self + end + alias seecell see_cell + + def see_column(idx) + tk_send('seecolumn', _to_idx(idx)) + self + end + alias seecolumn see_column + + def selection_anchor(idx) + tk_send('selection', 'anchor', _to_idx(idx)) + self + end + + def selection_clear(first, last=nil) + if first.kind_of?(Array) + tk_send('selection', 'clear', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('selection', 'clear', first, last) + end + self + end + + def selection_includes(idx) + bool(tk_send('selection', 'includes', _to_idx(idx))) + end + + def selection_set(first, last=nil) + if first.kind_of?(Array) + tk_send('selection', 'set', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('selection', 'set', first, last) + end + self + end + + def separatorpath(idx=nil) + if idx + window(tk_send('separatorpath', _to_idx(idx))) + else + window(tk_send('separatorpath')) + end + end + + def separators + simplelist(tk_send('separators')).collect!{|w| window(w)} + end + + def size + number(tk_send('size')) + end + + def sort(order=nil) + if order + order = order.to_s + order = '-' << order if order[0] != ?- + if order.length < 2 + order = nil + end + end + if order + tk_send('sort', order) + else + tk_send('sort') + end + self + end + def sort_increasing + tk_send('sort', '-increasing') + self + end + def sort_decreasing + tk_send('sort', '-decreasing') + self + end + + DEFAULT_sortByColumn_cmd = '::tablelist::sortByColumn' + + def sort_by_column(idx, order=nil) + if order + order = order.to_s + order = '-' << order if order[0] != ?- + if order.length < 2 + order = nil + end + end + if order + tk_send('sortbycolumn', _to_idx(idx), order) + else + tk_send('sortbycolumn', _to_idx(idx)) + end + self + end + def sort_by_column_increasing(idx) + tk_send('sortbycolumn', _to_idx(idx), '-increasing') + self + end + def sort_by_column_decreasing(idx) + tk_send('sortbycolumn', _to_idx(idx), '-decreasing') + self + end + + def sortcolumn + idx = num_or_str(tk_send('sortcolum')) + (idx.kind_of?(Fixnum) && idx < 0)? nil: idx + end + + def sortorder + tk_send('sortorder') + end + + def toggle_visibility(first, last=nil) + if first.kind_of?(Array) + tk_send('togglevisibility', first.collect{|idx| _to_idx(idx)}) + else + first = _to_idx(first) + last = (last)? _to_idx(last): first + tk_send('togglevisibility', first, last) + end + self + end + alias togglevisibility toggle_visibility + + def windowpath(idx) + window(tk_send('windowpath', _to_idx(idx))) + end +end + +class << Tk::Tcllib::Tablelist + ############################################################ + # helper commands + def getTablelistPath(descendant) + window(Tk.tk_call('::tablelist::getTablelistPath', descendant)) + end + + def convEventFields(descendant, x, y) + window(Tk.tk_call('::tablelist::convEventFields', descendant, x, y)) + end + + + ############################################################ + # with the BWidget package + def addBWidgetEntry(name=None) + Tk.tk_call('::tablelist::addBWidgetEntry', name) + end + + def addBWidgetSpinBox(name=None) + Tk.tk_call('::tablelist::addBWidgetSpinBox', name) + end + + def addBWidgetComboBox(name=None) + Tk.tk_call('::tablelist::addBWidgetComboBox', name) + end + + + ############################################################ + # with the Iwidgets ([incr Widgets]) package + def addIncrEntryfield(name=None) + Tk.tk_call('::tablelist::addIncrEntry', name) + end + + def addIncrDateTimeWidget(type, seconds=false, name=None) + # type := 'datefield'|'dateentry'|timefield'|'timeentry' + if seconds && seconds != None + seconds = '-seconds' + else + seconds = None + end + Tk.tk_call('::tablelist::addDateTimeWidget', type, seconds, name) + end + + def addIncrSpinner(name=None) + Tk.tk_call('::tablelist::addIncrSpinner', name) + end + + def addIncrSpinint(name=None) + Tk.tk_call('::tablelist::addIncrSpinint', name) + end + + def addIncrCombobox(name=None) + Tk.tk_call('::tablelist::addIncrCombobox', name) + end + + + ############################################################ + # with Bryan Oakley's combobox package + def addOakleyCombobox(name=None) + Tk.tk_call('::tablelist::addOakleyCombobox', name) + end + + ############################################################ + # with the multi-entry package Mentry is a library extension + def addDateMentry(format, separator, gmt=false, name=None) + if gmt && gmt != None + gmt = '-gmt' + else + gmt = None + end + Tk.tk_call('::tablelist::addDateMentry', format, separator, gmt, name) + end + + def addTimeMentry(format, separator, gmt=false, name=None) + if gmt && gmt != None + gmt = '-gmt' + else + gmt = None + end + Tk.tk_call('::tablelist::addTimeMentry', format, separator, gmt, name) + end + + def addFixedPointMentry(count1, count2, comma=false, name=None) + if comma && comma != None + comma = '-comma' + else + comma = None + end + Tk.tk_call('::tablelist::addFixedPoingMentry', count1, count2, comma, name) + end + + def addIPAddrMentry(name=None) + Tk.tk_call('::tablelist::addIPAddrMentry', name) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb new file mode 100644 index 0000000..0cb4eb7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb @@ -0,0 +1,25 @@ +# +# tkextlib/tcllib/tablelist_tlie.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * A multi-column listbox + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('tablelist_tile', '4.2') +TkPackage.require('Tablelist_tile') + +unless defined? Tk::Tcllib::Tablelist_usingTile + Tk::Tcllib::Tablelist_usingTile = true +end + +requrie 'tkextlib/tcllib/tablelist_core' + +module Tk + module Tcllib + Tablelist_Tile = Tablelist + TableList_Tile = Tablelist + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb new file mode 100644 index 0000000..b366e01 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tkpiechart.rb @@ -0,0 +1,314 @@ +# +# tkextlib/tcllib/tkpiechart.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Create 2D or 3D pies with labels in Tcl canvases +# + +require 'tk' +require 'tk/canvas' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('tkpiechart', '6.6') +TkPackage.require('tkpiechart') + +module Tk + module Tcllib + module Tkpiechart + end + end +end + +module Tk::Tcllib::Tkpiechart + PACKAGE_NAME = 'tkpiechart'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('tkpiechart') + rescue + '' + end + end + + module ConfigMethod + include TkConfigMethod + + def __pathname + self.path + ';' + self.tag + end + private :__pathname + + def __cget_cmd + ['::switched::cget', self.tag] + end + + def __config_cmd + ['::switched::configure', self.tag] + end + private :__config_cmd + + def __configinfo_struct + {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, + :default_value=>1, :current_value=>2} + end + private :__configinfo_struct + + def __boolval_optkeys + super() << 'select' << 'autoupdate' << 'selectable' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'bordercolor' << 'textbackground' << + 'widestvaluetext' << 'title' + end + private :__strval_optkeys + + def __listval_optkeys + super() << 'colors' + end + private :__listval_optkeys + end + + #################################### + class PieChartObj < TkcItem + include ConfigMethod + + def __font_optkeys + ['titlefont'] + end + private :__font_optkeys + end + + #################################### + class Pie < TkcItem + include ConfigMethod + + def create_self(x, y, width, height, keys=None) + if keys and keys != None + @tag_key = tk_call_without_enc('::stooop::new', 'pie', + @c, x, y, *hash_kv(keys, true)) + else + @tag_key = tk_call_without_enc('::stooop::new', 'pie', @c, x, y) + end + + @slice_tbl = {} + + id = "pie(#{@tag_key})" + + @tag = @tag_pie = TkcNamedTag(@c, id) + @tag_slices = TkcNamedTag(@c, "pieSlices(#{@tag_key})") + + id + end + private :create_self + + def tag_key + @tag_key + end + def tag + @tag + end + def canvas + @c + end + def _entry_slice(slice) + @slice_tbl[slice.to_eval] = slice + end + def _delete_slice(slice) + @slice_tbl.delete(slice.to_eval) + end + + def delete + tk_call_without_enc('::stooop::delete', @tag_key) + CItemID_TBL.mutex.synchronize{ + CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path] + } + self + end + + def new_slice(text=None) + Slice.new(self, text) + end + + def delete_slice(slice) + unless slice.kind_of?(Slice) + unless (slice = @slice_tbl[slice]) + return tk_call_without_enc('pie::deleteSlice', @tag_key, slice) + end + end + unless slice.kind_of?(Slice) && slice.pie == self + fail ArgumentError, "argument is not a slice of self" + end + slice.delete + end + + def selected_slices + tk_split_simplelist(tk_call_without_enc('pie::selectedSlices', + @tag_key)).collect{|slice| + @slice_tbl[slice] || Slice.new(:no_create, self, slice) + } + end + end + + #################################### + class Slice < TkcItem + include ConfigMethod + + def __config_cmd + ['::switched::configure', self.tag] + end + private :__config_cmd + + #------------------------ + + def initialize(pie, *args) + unless pie.kind_of?(Pie) && pie != :no_create + fail ArgumentError, "expects TkPiechart::Pie for 1st argument" + end + + if pie == :no_create + @pie, @tag_key = args + else + text = args[0] || None + @pie = pie + @tag_key = tk_call_without_enc('pie::newSlice', @pie.tag_key, text) + end + @parent = @c = @pie.canvas + @path = @parent.path + + @pie._entry_slice(self) + + @id = "slices(#{@tag_key})" + @tag = TkcNamedTag.new(@pie.canvas, @id) + + CItemID_TBL.mutex.synchronize{ + CItemID_TBL[@path] = {} unless CItemID_TBL[@path] + CItemID_TBL[@path][@id] = self + } + end + + def tag_key + @tag_key + end + def tag + @tag + end + def pie + @pie + end + + def delete + tk_call_without_enc('pie::deleteSlice', @pie.tag_key, @tag_key) + CItemID_TBL.mutex.synchronize{ + CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path] + } + @pie._delete_slice(self) + self + end + + def size(share, disp=None) + tk_call_without_enc('pie::sizeSlice', + @pie.tag_key, @tag_key, share, disp) + self + end + + def label(text) + tk_call_without_enc('pie::labelSlice', @pie.tag_key, @tag_key, text) + self + end + end + + #################################### + class BoxLabeler < TkcItem + include ConfigMethod + + def __config_cmd + ['::switched::configure', self.tag] + end + private :__config_cmd + + #------------------------ + + def create_self(keys=None) + if keys and keys != None + @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler', + *hash_kv(keys, true)) + else + @tag_key = tk_call_without_enc('::stooop::new', 'pieBoxLabeler') + end + + id = "pieBoxLabeler(#{@tag_key})" + @tag = TkcNamedTag(@c, id) + + id + end + private :create_self + end + + #################################### + class PeripheralLabeler < TkcItem + include ConfigMethod + + def __font_optkeys + ['font', 'smallfont'] + end + private :__font_optkeys + + def __config_cmd + ['::switched::configure', self.tag] + end + private :__config_cmd + + #------------------------ + + def create_self(keys=None) + if keys and keys != None + @tag_key = tk_call_without_enc('::stooop::new', + 'piePeripheralLabeler', + *hash_kv(keys, true)) + else + @tag_key = tk_call_without_enc('::stooop::new', 'piePeripheralLabeler') + end + + id = "piePeripheralLabeler(#{@tag_key})" + @tag = TkcNamedTag(@c, id) + + id + end + private :create_self + end + + #################################### + class Label < TkcItem + include ConfigMethod + + def __config_cmd + ['::switched::configure', self.tag] + end + private :__config_cmd + + #------------------------ + + def create_self(x, y, keys=None) + if keys and keys != None + @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', + @c, x, y, width, height, + *hash_kv(keys, true)) + else + @tag_key = tk_call_without_enc('::stooop::new', 'canvasLabel', + @c, x, y, width, height) + end + + id = "canvasLabel(#{@tag_key})" + @tag = TkcNamedTag(@c, id) + + id + end + private :create_self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tooltip.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tooltip.rb new file mode 100644 index 0000000..4301b39 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/tooltip.rb @@ -0,0 +1,95 @@ +# +# tkextlib/tcllib/tooltip.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * Provides tooltips, a small text message that is displayed when the +# mouse hovers over a widget. +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('tooltip', '1.1') +TkPackage.require('tooltip') + +module Tk::Tcllib + module Tooltip + PACKAGE_NAME = 'tooltip'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('tooltip') + rescue + '' + end + end + end +end + +module Tk::Tcllib::Tooltip + extend TkCore + + WidgetClassName = 'Tooltip'.freeze + def self.database_classname + self::WidgetClassName + end + def self.database_class + WidgetClassNames[self::WidgetClassName] + end + + def self.clear(glob_path_pat = None) + self.clear_glob(glob_path_pat) + end + + def self.clear_glob(glob_path_pat) + tk_call_without_enc('::tooltip::tooltip', 'clear', glob_path_pat) + end + + def self.clear_widgets(*args) + self.clear_glob("{#{args.collect{|w| _get_eval_string(w)}.join(',')}}") + end + + def self.clear_children(*args) + self.clear_glob("{#{args.collect{|w| s = _get_eval_string(w); "#{s},#{s}.*"}.join(',')}}") + end + + def self.delay(millisecs=None) + number(tk_call_without_enc('::tooltip::tooltip', 'delay', millisecs)) + end + def self.delay=(millisecs) + self.delay(millisecs) + end + + def self.disable + tk_call_without_enc('::tooltip::tooltip', 'disable') + false + end + def self.off + self.disable + end + + def self.enable + tk_call_without_enc('::tooltip::tooltip', 'enable') + true + end + def self.on + self.enable + end + + def self.register(widget, msg, keys=nil) + if keys.kind_of?(Hash) + args = hash_kv(keys) << msg + else + args = msg + end + tk_call_without_enc('::tooltip::tooltip', widget.path, *args) + end + + def self.erase(widget) + tk_call_without_enc('::tooltip::tooltip', widget.path, '') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/widget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/widget.rb new file mode 100644 index 0000000..ed69f67 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tcllib/widget.rb @@ -0,0 +1,48 @@ +# +# tkextlib/tcllib/widget.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# * Part of tcllib extension +# * megawidget package that uses snit as the object system (snidgets) +# + +require 'tk' +require 'tkextlib/tcllib.rb' + +# TkPackage.require('widget', '3.0') +TkPackage.require('widget') + +module Tk::Tcllib + module Widget + PACKAGE_NAME = 'widget'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('widget') + rescue + '' + end + end + end +end + +module Tk::Tcllib::Widget + autoload :Dialog, 'tkextlib/tcllib/dialog' + + autoload :Panelframe, 'tkextlib/tcllib/panelframe' + autoload :PanelFrame, 'tkextlib/tcllib/panelframe' + + autoload :Ruler, 'tkextlib/tcllib/ruler' + + autoload :Screenruler, 'tkextlib/tcllib/screenruler' + autoload :ScreenRuler, 'tkextlib/tcllib/screenruler' + + autoload :Scrolledwindow, 'tkextlib/tcllib/scrollwin' + autoload :ScrolledWindow, 'tkextlib/tcllib/scrollwin' + + autoload :Superframe, 'tkextlib/tcllib/superframe' + autoload :SuperFrame, 'tkextlib/tcllib/superframe' +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx.rb new file mode 100644 index 0000000..3a4ff27 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx.rb @@ -0,0 +1,13 @@ +# +# TclX support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tclx/setup.rb' + +# load library +require 'tkextlib/tclx/tclx' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/tclx.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/tclx.rb new file mode 100644 index 0000000..5a908fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tclx/tclx.rb @@ -0,0 +1,74 @@ +# +# tclx/tclx.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tclx/setup.rb' + +# TkPackage.require('Tclx', '8.0') +TkPackage.require('Tclx') + +module Tk + module TclX + PACKAGE_NAME = 'Tclx'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Tclx') + rescue + '' + end + end + + def self.infox(*args) + Tk.tk_call('infox', *args) + end + + def self.signal(*args) + warn("Warning: Don't recommend to use TclX's 'signal' command. Please use Ruby's 'Signal.trap' method") + Tk.tk_call('signal', *args) + end + + def self.signal_restart(*args) + warn("Warning: Don't recommend to use TclX's 'signal' command. Please use Ruby's 'Signal.trap' method") + Tk.tk_call('signal', '-restart', *args) + end + + ############################## + + class XPG3_MsgCat + class << self + alias open new + end + + def initialize(catname, fail_mode=false) + if fail_mode + @msgcat_id = Tk.tk_call('catopen', '-fail', catname) + else + @msgcat_id = Tk.tk_call('catopen', '-nofail', catname) + end + end + + def close(fail_mode=false) + if fail_mode + Tk.tk_call('catclose', '-fail', @msgcat_id) + else + Tk.tk_call('catclose', '-nofail', @msgcat_id) + end + self + end + + def get(setnum, msgnum, defaultstr) + Tk.tk_call('catgets', @msgcat_id, setnum, msgnum, defaultstr) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile.rb new file mode 100644 index 0000000..60ea012 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile.rb @@ -0,0 +1,419 @@ +# +# Tile theme engin (tile widget set) support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/ttk_selector' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# library directory +require 'tkextlib/tile/setup.rb' + +# load package +# TkPackage.require('tile', '0.4') +# TkPackage.require('tile', '0.6') +# TkPackage.require('tile', '0.7') +if Tk::TK_MAJOR_VERSION > 8 || + (Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION >= 5) + TkPackage.require('tile') # for compatibility (version check of 'tile') + verstr = TkPackage.require('Ttk') +else + verstr = TkPackage.require('tile') +end + +ver = verstr.split('.') +if ver[0].to_i == 0 + # Tile extension package + if ver[1].to_i <= 4 + # version 0.4 or former + module Tk + module Tile + USE_TILE_NAMESPACE = true + USE_TTK_NAMESPACE = false + TILE_SPEC_VERSION_ID = 0 + end + end + elsif ver[1].to_i <= 6 + # version 0.5 -- version 0.6 + module Tk + module Tile + USE_TILE_NAMESPACE = true + USE_TTK_NAMESPACE = true + TILE_SPEC_VERSION_ID = 5 + end + end + elsif ver[1].to_i <= 7 + module Tk + module Tile + USE_TILE_NAMESPACE = false + USE_TTK_NAMESPACE = true + TILE_SPEC_VERSION_ID = 7 + end + end + else + # version 0.8 or later + module Tk + module Tile + USE_TILE_NAMESPACE = false + USE_TTK_NAMESPACE = true + TILE_SPEC_VERSION_ID = 8 + end + end + end + + module Tk::Tile + PACKAGE_NAME = 'tile'.freeze + end +else + # Ttk package merged Tcl/Tk core (Tcl/Tk 8.5+) + module Tk + module Tile + USE_TILE_NAMESPACE = false + USE_TTK_NAMESPACE = true + TILE_SPEC_VERSION_ID = 8 + + PACKAGE_NAME = 'Ttk'.freeze + end + end +end + +# autoload +module Tk + module Tile + TkComm::TkExtlibAutoloadModule.unshift(self) + + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require(PACKAGE_NAME) + rescue + '' + end + end + + def self.__Import_Tile_Widgets__! + warn 'Warning: "Tk::Tile::__Import_Tile_Widgets__!" is obsolete.' << + ' To control default widget set, use "Tk.default_widget_set = :Ttk"' + Tk.tk_call('namespace', 'import', '-force', 'ttk::*') + end + + def self.__define_LoadImages_proc_for_compatibility__! + # Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure. + # So, some old scripts doen't work, because those scripts use the + # procedure to define local styles. + # Of course, rewriting such Tcl/Tk scripts isn't difficult for + # Tcl/Tk users. However, it may be troublesome for Ruby/Tk users + # who use such Tcl/Tk scripts as it is. + # This method may help Ruby/Tk users who don't want to modify old + # Tcl/Tk scripts for the latest version of Ttk (Tile) extension. + # This method defines a comaptible 'LoadImages' procedure on the + # Tcl/Tk interpreter working under Ruby/Tk. + # Please give attention to use this method. It may conflict with + # some definitions on Tcl/Tk scripts. + klass_name = self.name + proc_name = 'LoadImages' + if Tk::Tile::USE_TTK_NAMESPACE + ns_list = ['::tile'] + if Tk.info(:commands, "::ttk::#{proc_name}").empty? + ns_list << '::ttk' + end + else # Tk::Tile::USE_TILE_NAMESPACE + ns_list = ['::ttk'] + if Tk.info(:commands, "::tile::#{proc_name}").empty? + ns_list << '::tile' + end + end + + ns_list.each{|ns| + cmd = "#{ns}::#{proc_name}" + unless Tk.info(:commands, cmd).empty? + #fail RuntimeError, "can't define '#{cmd}' command (already exist)" + + # do nothing !!! + warn "Warning: can't define '#{cmd}' command (already exist)" if $DEBUG + next + end + TkNamespace.eval(ns){ + TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}', + <<-'EOS') + foreach pattern $patterns { + foreach file [glob -directory $imgdir $pattern] { + set img [file tail [file rootname $file]] + if {![info exists images($img)]} { + set images($img) [image create photo -file $file] + } + } + } + return [array get images] + EOS + } + } + end + + def self.load_images(imgdir, pat=nil) + if Tk::Tile::TILE_SPEC_VERSION_ID < 8 + if Tk::Tile::USE_TTK_NAMESPACE + cmd = '::ttk::LoadImages' + else # Tk::Tile::USE_TILE_NAMESPACE + cmd = '::tile::LoadImages' + end + pat ||= TkComm::None + images = Hash[*TkComm.simplelist(Tk.tk_call(cmd, imgdir, pat))] + images.keys.each{|k| + images[k] = TkPhotoImage.new(:imagename=>images[k], + :without_creating=>true) + } + else ## TILE_SPEC_VERSION_ID >= 8 + pat ||= '*.gif' + if pat.kind_of?(Array) + pat_list = pat + else + pat_list = [ pat ] + end + Dir.chdir(imgdir){ + pat_list.each{|pat| + Dir.glob(pat).each{|f| + img = File.basename(f, '.*') + unless TkComm.bool(Tk.info('exists', "images(#{img})")) + Tk.tk_call('set', "images(#{img})", + Tk.tk_call('image', 'create', 'photo', '-file', f)) + end + } + } + } + images = Hash[*TkComm.simplelist(Tk.tk_call('array', 'get', 'images'))] + images.keys.each{|k| + images[k] = TkPhotoImage.new(:imagename=>images[k], + :without_creating=>true) + } + end + + images + end + + def self.style(*args) + args.map!{|arg| TkComm._get_eval_string(arg)}.join('.') + end + + def self.themes(glob_ptn = nil) + if TILE_SPEC_VERSION_ID < 8 && Tk.info(:commands, '::ttk::themes').empty? + fail RuntimeError, 'not support glob option' if glob_ptn + cmd = ['::tile::availableThemes'] + else + glob_ptn = '*' unless glob_ptn + cmd = ['::ttk::themes', glob_ptn] + end + + begin + TkComm.simplelist(Tk.tk_call_without_enc(*cmd)) + rescue + TkComm.simplelist(Tk.tk_call('lsearch', '-all', '-inline', + Tk::Tile::Style.theme_names, + glob_ptn)) + end + end + + def self.set_theme(theme) + if TILE_SPEC_VERSION_ID < 8 && Tk.info(:commands, '::ttk::setTheme').empty? + cmd = '::tile::setTheme' + else + cmd = '::ttk::setTheme' + end + + begin + Tk.tk_call_without_enc(cmd, theme) + rescue + Tk::Tile::Style.theme_use(theme) + end + end + + module KeyNav + if Tk::Tile::TILE_SPEC_VERSION_ID < 8 + def self.enableMnemonics(w) + Tk.tk_call('::keynav::enableMnemonics', w) + end + def self.defaultButton(w) + Tk.tk_call('::keynav::defaultButton', w) + end + else # dummy + def self.enableMnemonics(w) + "" + end + def self.defaultButton(w) + "" + end + end + end + + module Font + Default = 'TkDefaultFont' + Text = 'TkTextFont' + Heading = 'TkHeadingFont' + Caption = 'TkCaptionFont' + Tooltip = 'TkTooltipFont' + + Fixed = 'TkFixedFont' + Menu = 'TkMenuFont' + SmallCaption = 'TkSmallCaptionFont' + Icon = 'TkIconFont' + + TkFont::SYSTEM_FONT_NAMES.add [ + 'TkDefaultFont', 'TkTextFont', 'TkHeadingFont', + 'TkCaptionFont', 'TkTooltipFont', 'TkFixedFont', + 'TkMenuFont', 'TkSmallCaptionFont', 'TkIconFont' + ] + end + + module ParseStyleLayout + def _style_layout(lst) + ret = [] + until lst.empty? + sub = [lst.shift] + keys = {} + + until lst.empty? + if lst[0][0] == ?- + k = lst.shift[1..-1] + children = lst.shift + children = _style_layout(children) if children.kind_of?(Array) + keys[k] = children + else + break + end + end + + sub << keys unless keys.empty? + ret << sub + end + ret + end + private :_style_layout + end + + module TileWidget + include Tk::Tile::ParseStyleLayout + + def __val2ruby_optkeys # { key=>proc, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "proc.call(value)" is called. + super().update('style'=>proc{|v| _style_layout(list(v))}) + end + private :__val2ruby_optkeys + + def ttk_instate(state, script=nil, &b) + if script + tk_send('instate', state, script) + elsif b + tk_send('instate', state, Proc.new(&b)) + else + bool(tk_send('instate', state)) + end + end + alias tile_instate ttk_instate + + def ttk_state(state=nil) + if state + tk_send('state', state) + else + list(tk_send('state')) + end + end + alias tile_state ttk_state + + def ttk_identify(x, y) + ret = tk_send_without_enc('identify', x, y) + (ret.empty?)? nil: ret + end + alias tile_identify ttk_identify + + # remove instate/state/identify method + # to avoid the conflict with widget options + if Tk.const_defined?(:USE_OBSOLETE_TILE_STATE_METHOD) && Tk::USE_OBSOLETE_TILE_STATE_METHOD + alias instate ttk_instate + alias state ttk_state + alias identify ttk_identify + end + end + + ###################################### + + autoload :TButton, 'tkextlib/tile/tbutton' + autoload :Button, 'tkextlib/tile/tbutton' + + autoload :TCheckButton, 'tkextlib/tile/tcheckbutton' + autoload :CheckButton, 'tkextlib/tile/tcheckbutton' + autoload :TCheckbutton, 'tkextlib/tile/tcheckbutton' + autoload :Checkbutton, 'tkextlib/tile/tcheckbutton' + + autoload :Dialog, 'tkextlib/tile/dialog' + + autoload :TEntry, 'tkextlib/tile/tentry' + autoload :Entry, 'tkextlib/tile/tentry' + + autoload :TCombobox, 'tkextlib/tile/tcombobox' + autoload :Combobox, 'tkextlib/tile/tcombobox' + + autoload :TFrame, 'tkextlib/tile/tframe' + autoload :Frame, 'tkextlib/tile/tframe' + + autoload :TLabelframe, 'tkextlib/tile/tlabelframe' + autoload :Labelframe, 'tkextlib/tile/tlabelframe' + autoload :TLabelFrame, 'tkextlib/tile/tlabelframe' + autoload :LabelFrame, 'tkextlib/tile/tlabelframe' + + autoload :TLabel, 'tkextlib/tile/tlabel' + autoload :Label, 'tkextlib/tile/tlabel' + + autoload :TMenubutton, 'tkextlib/tile/tmenubutton' + autoload :Menubutton, 'tkextlib/tile/tmenubutton' + autoload :TMenuButton, 'tkextlib/tile/tmenubutton' + autoload :MenuButton, 'tkextlib/tile/tmenubutton' + + autoload :TNotebook, 'tkextlib/tile/tnotebook' + autoload :Notebook, 'tkextlib/tile/tnotebook' + + autoload :TPaned, 'tkextlib/tile/tpaned' + autoload :Paned, 'tkextlib/tile/tpaned' + autoload :PanedWindow, 'tkextlib/tile/tpaned' + autoload :Panedwindow, 'tkextlib/tile/tpaned' + + autoload :TProgressbar, 'tkextlib/tile/tprogressbar' + autoload :Progressbar, 'tkextlib/tile/tprogressbar' + + autoload :TRadioButton, 'tkextlib/tile/tradiobutton' + autoload :RadioButton, 'tkextlib/tile/tradiobutton' + autoload :TRadiobutton, 'tkextlib/tile/tradiobutton' + autoload :Radiobutton, 'tkextlib/tile/tradiobutton' + + autoload :TScale, 'tkextlib/tile/tscale' + autoload :Scale, 'tkextlib/tile/tscale' + autoload :TProgress, 'tkextlib/tile/tscale' + autoload :Progress, 'tkextlib/tile/tscale' + + autoload :TScrollbar, 'tkextlib/tile/tscrollbar' + autoload :Scrollbar, 'tkextlib/tile/tscrollbar' + autoload :XScrollbar, 'tkextlib/tile/tscrollbar' + autoload :YScrollbar, 'tkextlib/tile/tscrollbar' + + autoload :TSeparator, 'tkextlib/tile/tseparator' + autoload :Separator, 'tkextlib/tile/tseparator' + + autoload :TSquare, 'tkextlib/tile/tsquare' + autoload :Square, 'tkextlib/tile/tsquare' + + autoload :SizeGrip, 'tkextlib/tile/sizegrip' + autoload :Sizegrip, 'tkextlib/tile/sizegrip' + + autoload :Treeview, 'tkextlib/tile/treeview' + + autoload :Style, 'tkextlib/tile/style' + end +end + +Ttk = Tk::Tile diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/dialog.rb new file mode 100644 index 0000000..ef2d1fe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/dialog.rb @@ -0,0 +1,96 @@ +# +# ttk::dialog (tile-0.7+) +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class Dialog < TkWindow + end + end +end + +class Tk::Tile::Dialog + TkCommandNames = ['::ttk::dialog'.freeze].freeze + + def self.show(*args) + dialog = self.new(*args) + dialog.show + [dialog.status, dialog.value] + end + def self.display(*args) + self.show(*args) + end + + def self.define_dialog_type(name, keys) + Tk.tk_call('::ttk::dialog::define', name, keys) + name + end + + def self.style(*args) + ['Dialog', *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + ######################### + + def initialize(keys={}) + @keys = _symbolkey2str(keys) + super(*args) + end + + def create_self(keys) + # dummy + end + private :create_self + + def show + tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys)) + end + alias display show + + def client_frame + window(tk_call_without_enc('::ttk::dialog::clientframe', @path)) + end + + def cget_strict(slot) + @keys[slot.to_s] + end + def cget(slot) + @keys[slot.to_s] + end +=begin + def cget(slot) + unless TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + cget_strict(slot) + else + cget_strict(slot) rescue nil + end + end +=end + + def configure(slot, value=None) + if slot.kind_of?(Hash) + slot.each{|k, v| configure(k, v)} + else + slot = slot.to_s + value = _symbolkey2str(value) if value.kind_of?(Hash) + if value && value != None + @keys[slot] = value + else + @keys.delete(slot) + end + end + self + end + + def configinfo(slot = nil) + if slot + slot = slot.to_s + [ slot, nil, nil, nil, @keys[slot] ] + else + @keys.collect{|k, v| [ k, nil, nil, nil, v ] } + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/sizegrip.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/sizegrip.rb new file mode 100644 index 0000000..c506891 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/sizegrip.rb @@ -0,0 +1,29 @@ +# +# ttk::sizegrip widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class SizeGrip < TkWindow + end + Sizegrip = SizeGrip + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Sizegrip, :TkSizegrip, :TkSizeGrip) + + +class Tk::Tile::SizeGrip < TkWindow + include Tk::Tile::TileWidget + + TkCommandNames = ['::ttk::sizegrip'.freeze].freeze + WidgetClassName = 'TSizegrip'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/style.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/style.rb new file mode 100644 index 0000000..ca7ee99 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/style.rb @@ -0,0 +1,316 @@ +# +# style commands +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + module Style + end + end +end + +module Tk::Tile::Style + extend TkCore +end + +class << Tk::Tile::Style + if Tk::Tile::TILE_SPEC_VERSION_ID < 8 + TkCommandNames = ['style'.freeze].freeze + + # --- Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! --- + # On Ttk (Tile) extension, 'style' command has imcompatible changes + # depend on the version of the extention. It requires modifying the + # Tcl/Tk scripts to define local styles. The rule for modification + # is a simple one. But, if users want to keep compatibility between + # versions of the extension, they will have to contrive to do that. + # It may be troublesome, especially for Ruby/Tk users. + # This method may help such work. This method make some definitions + # on the Tcl/Tk interpreter to work with different version of style + # command format. Please give attention to use this method. It may + # conflict with some definitions on Tcl/Tk scripts. + if Tk::Tile::TILE_SPEC_VERSION_ID < 7 + def __define_wrapper_proc_for_compatibility__! + __define_themes_and_setTheme_proc__! + + unless Tk.info(:commands, '::ttk::style').empty? + # fail RuntimeError, + # "can't define '::ttk::style' command (already exist)" + + # do nothing !!! + warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG + return + end + TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS') + if [string equal [lrange $args 0 1] {element create}] { + if [string equal [lindex $args 3] image] { + set spec [lindex $args 4] + set map [lrange $spec 1 end] + if [llength $map] { + # return [eval [concat [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]] + return [uplevel 1 [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]] + } + } + } + # return [eval "::style $args"] + return [uplevel 1 ::style $args] + EOS + ######################### + end + else ### TILE_SPEC_VERSION_ID == 7 + def __define_wrapper_proc_for_compatibility__! + __define_themes_and_setTheme_proc__! + + unless Tk.info(:commands, '::ttk::style').empty? + # fail RuntimeError, + # "can't define '::ttk::style' command (already exist)" + + # do nothing !!! + warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG + return + end + TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS') + if [string equal [lrange $args 0 1] {element create}] { + if [string equal [lindex $args 3] image] { + set spec [lindex $args 4] + set map [lrange $spec 1 end] + if [llength $map] { + # return [eval [concat [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]] + return [uplevel 1 [list ::style element create [lindex $args 2] image [lindex $spec 0] -map $map] [lrange $args 5 end]]] + } + } + } elseif [string equal [lindex $args 0] default] { + # return [eval "::style [lreplace $args 0 0 configure]"] + return [uplevel 1 ::style [lreplace $args 0 0 configure]] + } + # return [eval "::style $args"] + return [uplevel 1 ::style $args] + EOS + ######################### + end + end + else ### TILE_SPEC_VERSION_ID >= 8 + TkCommandNames = ['::ttk::style'.freeze].freeze + + def __define_wrapper_proc_for_compatibility__! + __define_themes_and_setTheme_proc__! + + unless Tk.info(:commands, '::style').empty? + # fail RuntimeError, "can't define '::style' command (already exist)" + + # do nothing !!! + warn "Warning: can't define '::style' command (already exist)" if $DEBUG + return + end + TkCore::INTERP.add_tk_procs('::style', 'args', <<-'EOS') + if [string equal [lrange $args 0 1] {element create}] { + if [string equal [lindex $args 3] image] { + set name [lindex $args 4] + set opts [lrange $args 5 end] + set idx [lsearch $opts -map] + if {$idx >= 0 && [expr $idx % 2 == 0]} { + # return [eval [concat [list ::ttk::style element create [lindex $args 2] image [concat $name [lindex $opts [expr $idx + 1]]]] [lreplace $opts $idx [expr $idx + 1]]]] + return [uplevel 1 [list ::ttk::style element create [lindex $args 2] image [concat $name [lindex $opts [expr $idx + 1]]]] [lreplace $opts $idx [expr $idx + 1]]] + } + } + } elseif [string equal [lindex $args 0] default] { + # return [eval "::ttk::style [lreplace $args 0 0 configure]"] + return [uplevel 1 ::ttk::style [lreplace $args 0 0 configure]] + } + # return [eval "::ttk::style $args"] + return [uplevel 1 ::ttk::style $args] + EOS + ######################### + end + end + + def __define_themes_and_setTheme_proc__! + TkCore::INTERP.add_tk_procs('::ttk::themes', '{ptn *}', <<-'EOS') + #set themes [list] + set themes [::ttk::style theme names] + foreach pkg [lsearch -inline -all -glob [package names] ttk::theme::$ptn] { + set theme [namespace tail $pkg] + if {[lsearch -exact $themes $theme] < 0} { + lappend themes $theme + } + } + foreach pkg [lsearch -inline -all -glob [package names] tile::theme::$ptn] { + set theme [namespace tail $pkg] + if {[lsearch -exact $themes $theme] < 0} { + lappend themes $theme + } + } + return $themes + EOS + ######################### + TkCore::INTERP.add_tk_procs('::ttk::setTheme', 'theme', <<-'EOS') + variable currentTheme + if {[lsearch -exact [::ttk::style theme names] $theme] < 0} { + package require [lsearch -inline -regexp [package names] (ttk|tile)::theme::$theme] + } + ::ttk::style theme use $theme + set currentTheme $theme + EOS + end + private :__define_themes_and_setTheme_proc__! + + def configure(style=nil, keys=nil) + if style.kind_of?(Hash) + keys = style + style = nil + end + style = '.' unless style + + if Tk::Tile::TILE_SPEC_VERSION_ID < 7 + sub_cmd = 'default' + else + sub_cmd = 'configure' + end + + if keys && keys != None + tk_call(TkCommandNames[0], sub_cmd, style, *hash_kv(keys)) + else + tk_call(TkCommandNames[0], sub_cmd, style) + end + end + alias default configure + + def map(style=nil, keys=nil) + if style.kind_of?(Hash) + keys = style + style = nil + end + style = '.' unless style + + if keys && keys != None + if keys.kind_of?(Hash) + tk_call(TkCommandNames[0], 'map', style, *hash_kv(keys)) + else + simplelist(tk_call(TkCommandNames[0], 'map', style, '-' << keys.to_s)) + end + else + ret = {} + Hash[*(simplelist(tk_call(TkCommandNames[0], 'map', style)))].each{|k, v| + ret[k[1..-1]] = list(v) + } + ret + end + end + alias map_configure map + + def map_configinfo(style=nil, key=None) + style = '.' unless style + map(style, key) + end + + def map_default_configinfo(key=None) + map('.', key) + end + + def lookup(style, opt, state=None, fallback_value=None) + tk_call(TkCommandNames[0], 'lookup', style, + '-' << opt.to_s, state, fallback_value) + end + + include Tk::Tile::ParseStyleLayout + + def layout(style=nil, spec=nil) + if style.kind_of?(Hash) + spec = style + style = nil + end + style = '.' unless style + + if spec + tk_call(TkCommandNames[0], 'layout', style, spec) + else + _style_layout(list(tk_call(TkCommandNames[0], 'layout', style))) + end + end + + def element_create(name, type, *args) + if type == 'image' || type == :image + element_create_image(name, *args) + else + tk_call(TkCommandNames[0], 'element', 'create', name, type, *args) + end + end + + def element_create_image(name, *args) + fail ArgumentError, 'Must supply a base image' unless (spec = args.shift) + if (opts = args.shift) + if opts.kind_of?(Hash) + opts = _symbolkey2str(opts) + else + fail ArgumentError, 'bad option' + end + end + fail ArgumentError, 'too many arguments' unless args.empty? + + if spec.kind_of?(Array) + # probably, command format is tile 0.8+ (Tcl/Tk8.5+) style + if Tk::Tile::TILE_SPEC_VERSION_ID >= 8 + if opts + tk_call(TkCommandNames[0], + 'element', 'create', name, 'image', spec, opts) + else + tk_call(TkCommandNames[0], 'element', 'create', name, 'image', spec) + end + else + fail ArgumentError, 'illegal arguments' if opts.key?('map') + base = spec.shift + opts['map'] = spec + tk_call(TkCommandNames[0], + 'element', 'create', name, 'image', base, opts) + end + else + # probably, command format is tile 0.7.8 or older style + if Tk::Tile::TILE_SPEC_VERSION_ID >= 8 + spec = [spec, *(opts.delete('map'))] if opts.key?('map') + end + if opts + tk_call(TkCommandNames[0], + 'element', 'create', name, 'image', spec, opts) + else + tk_call(TkCommandNames[0], 'element', 'create', name, 'image', spec) + end + end + end + + def element_names() + list(tk_call(TkCommandNames[0], 'element', 'names')) + end + + def element_options(elem) + simplelist(tk_call(TkCommandNames[0], 'element', 'options', elem)) + end + + def theme_create(name, keys=nil) + name = name.to_s + if keys && keys != None + tk_call(TkCommandNames[0], 'theme', 'create', name, *hash_kv(keys)) + else + tk_call(TkCommandNames[0], 'theme', 'create', name) + end + name + end + + def theme_settings(name, cmd=nil, &b) + name = name.to_s + cmd = Proc.new(&b) if !cmd && b + tk_call(TkCommandNames[0], 'theme', 'settings', name, cmd) + name + end + + def theme_names() + list(tk_call(TkCommandNames[0], 'theme', 'names')) + end + + def theme_use(name) + name = name.to_s + tk_call(TkCommandNames[0], 'theme', 'use', name) + name + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tbutton.rb new file mode 100644 index 0000000..5d7db10 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tbutton.rb @@ -0,0 +1,33 @@ +# +# tbutton widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TButton < Tk::Button + end + Button = TButton + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Button, :TkButton) + + +class Tk::Tile::TButton < Tk::Button + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::button'.freeze].freeze + else + TkCommandNames = ['::tbutton'.freeze].freeze + end + WidgetClassName = 'TButton'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcheckbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcheckbutton.rb new file mode 100644 index 0000000..172225f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcheckbutton.rb @@ -0,0 +1,36 @@ +# +# tcheckbutton widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TCheckButton < Tk::CheckButton + end + TCheckbutton = TCheckButton + CheckButton = TCheckButton + Checkbutton = TCheckButton + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Checkbutton, + :TkCheckbutton, :TkCheckButton) + + +class Tk::Tile::TCheckButton < Tk::CheckButton + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::checkbutton'.freeze].freeze + else + TkCommandNames = ['::tcheckbutton'.freeze].freeze + end + WidgetClassName = 'TCheckbutton'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcombobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcombobox.rb new file mode 100644 index 0000000..b64372f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tcombobox.rb @@ -0,0 +1,54 @@ +# +# tcombobox widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TCombobox < Tk::Tile::TEntry + end + Combobox = TCombobox + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Combobox, :TkCombobox) + + +class Tk::Tile::TCombobox < Tk::Tile::TEntry + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::combobox'.freeze].freeze + else + TkCommandNames = ['::tcombobox'.freeze].freeze + end + WidgetClassName = 'TCombobox'.freeze + WidgetClassNames[WidgetClassName] = self + + def __boolval_optkeys + super() << 'exportselection' + end + private :__boolval_optkeys + + def __listval_optkeys + super() << 'values' + end + private :__listval_optkeys + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + def current + number(tk_send_without_enc('current')) + end + def current=(idx) + tk_send_without_enc('current', idx) + end + + def set(val) + tk_send('set', val) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tentry.rb new file mode 100644 index 0000000..0bea98d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tentry.rb @@ -0,0 +1,48 @@ +# +# tentry widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TEntry < Tk::Entry + end + Entry = TEntry + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Entry, :TkEntry) + + +class Tk::Tile::TEntry < Tk::Entry + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::entry'.freeze].freeze + else + TkCommandNames = ['::tentry'.freeze].freeze + end + WidgetClassName = 'TEntry'.freeze + WidgetClassNames[WidgetClassName] = self + + def __optkey_aliases + {:vcmd=>:validatecommand, :invcmd=>:invalidcommand} + end + private :__optkey_aliases + + def __boolval_optkeys + super() << 'exportselection' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'show' + end + private :__strval_optkeys + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tframe.rb new file mode 100644 index 0000000..3b5f98b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tframe.rb @@ -0,0 +1,33 @@ +# +# tframe widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TFrame < Tk::Frame + end + Frame = TFrame + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Frame, :TkFrame) + + +class Tk::Tile::TFrame < Tk::Frame + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::frame'.freeze].freeze + else + TkCommandNames = ['::tframe'.freeze].freeze + end + WidgetClassName = 'TFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabel.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabel.rb new file mode 100644 index 0000000..7d074d3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabel.rb @@ -0,0 +1,33 @@ +# +# tlabel widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TLabel < Tk::Label + end + Label = TLabel + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Label, :TkLabel) + + +class Tk::Tile::TLabel < Tk::Label + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::label'.freeze].freeze + else + TkCommandNames = ['::tlabel'.freeze].freeze + end + WidgetClassName = 'TLabel'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabelframe.rb new file mode 100644 index 0000000..cff66d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tlabelframe.rb @@ -0,0 +1,36 @@ +# +# tlabelframe widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TLabelframe < Tk::Tile::TFrame + end + TLabelFrame = TLabelframe + Labelframe = TLabelframe + LabelFrame = TLabelframe + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Labelframe, + :TkLabelframe, :TkLabelFrame) + + +class Tk::Tile::TLabelframe < Tk::Tile::TFrame + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::labelframe'.freeze].freeze + else + TkCommandNames = ['::tlabelframe'.freeze].freeze + end + WidgetClassName = 'TLabelframe'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tmenubutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tmenubutton.rb new file mode 100644 index 0000000..7c6ab28 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tmenubutton.rb @@ -0,0 +1,36 @@ +# +# tmenubutton widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TMenubutton < Tk::Menubutton + end + TMenuButton = TMenubutton + Menubutton = TMenubutton + MenuButton = TMenubutton + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Menubutton, + :TkMenubutton, :TkMenuButton) + + +class Tk::Tile::TMenubutton < Tk::Menubutton + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::menubutton'.freeze].freeze + else + TkCommandNames = ['::tmenubutton'.freeze].freeze + end + WidgetClassName = 'TMenubutton'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tnotebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tnotebook.rb new file mode 100644 index 0000000..4d65e36 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tnotebook.rb @@ -0,0 +1,139 @@ +# +# tnotebook widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TNotebook < TkWindow + end + Notebook = TNotebook + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Notebook, :TkNotebook) + + +class Tk::Tile::TNotebook < TkWindow + ################################ + include TkItemConfigMethod + + def __item_cget_cmd(id) + [self.path, 'tab', id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'tab', id] + end + private :__item_config_cmd + + def __item_listval_optkeys(id) + [] + end + private :__item_listval_optkeys + + def __item_methodcall_optkeys(id) # { key=>method, ... } + {} + end + private :__item_methodcall_optkeys + + #alias tabcget itemcget + #alias tabcget_strict itemcget_strict + alias tabconfigure itemconfigure + alias tabconfiginfo itemconfiginfo + alias current_tabconfiginfo current_itemconfiginfo + + def tabcget_strict(tagOrId, option) + tabconfigure(tagOrId, option)[-1] + end + def tabcget(tagOrId, option) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tabcget_strict(tagOrId, option) + else + begin + tabcget_strict(tagOrId, option) + rescue => e + begin + if current_tabconfiginfo(tagOrId).has_key?(option.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + ################################ + + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::notebook'.freeze].freeze + else + TkCommandNames = ['::tnotebook'.freeze].freeze + end + WidgetClassName = 'TNotebook'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + def enable_traversal() + if Tk::Tile::TILE_SPEC_VERSION_ID < 5 + tk_call_without_enc('::tile::enableNotebookTraversal', @path) + elsif Tk::Tile::TILE_SPEC_VERSION_ID < 7 + tk_call_without_enc('::tile::notebook::enableTraversal', @path) + else + tk_call_without_enc('::ttk::notebook::enableTraversal', @path) + end + self + end + + def add(child, keys=nil) + if keys && keys != None + tk_send('add', _epath(child), *hash_kv(keys)) + else + tk_send('add', _epath(child)) + end + self + end + + def forget(idx) + tk_send('forget', idx) + self + end + + def index(idx) + number(tk_send('index', idx)) + end + + def insert(idx, subwin, keys=nil) + if keys && keys != None + tk_send('insert', idx, subwin, *hash_kv(keys)) + else + tk_send('insert', idx, subwin) + end + self + end + + def select(idx) + tk_send('select', idx) + self + end + + def selected + window(tk_send_without_enc('select')) + end + + def tabs + list(tk_send('tabs')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tpaned.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tpaned.rb new file mode 100644 index 0000000..d96ff43 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tpaned.rb @@ -0,0 +1,231 @@ +# +# tpaned widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TPaned < TkWindow + end + PanedWindow = Panedwindow = Paned = TPaned + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Panedwindow, + :TkPanedwindow, :TkPanedWindow) + + +class Tk::Tile::TPaned < TkWindow + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + if Tk::Tile::TILE_SPEC_VERSION_ID < 8 + TkCommandNames = ['::ttk::paned'.freeze].freeze + else + TkCommandNames = ['::ttk::panedwindow'.freeze].freeze + end + else + TkCommandNames = ['::tpaned'.freeze].freeze + end + WidgetClassName = 'TPaned'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + def add(*args) + keys = args.pop + fail ArgumentError, "no window in arguments" unless keys + + if keys && keys.kind_of?(Hash) + fail ArgumentError, "no window in arguments" if args == [] + opts = hash_kv(keys) + else + args.push(keys) if keys + opts = [] + end + + args.each{|win| + tk_send_without_enc('add', _epath(win), *opts) + } + self + end + + def forget(pane) + pane = _epath(pane) + tk_send_without_enc('forget', pane) + self + end + + def insert(pos, win, keys) + win = _epath(win) + tk_send_without_enc('insert', pos, win, *hash_kv(keys)) + self + end + + def panecget_strict(pane, slot) + pane = _epath(pane) + tk_tcl2ruby(tk_send_without_enc('pane', pane, "-#{slot}")) + end + alias pane_cget_strict panecget_strict + + def panecget(pane, slot) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + panecget_strict(pane, slot) + else + begin + panecget_strict(pane, slot) + rescue => e + begin + if current_paneconfiginfo(pane).has_key?(slot.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + alias pane_cget panecget + + def paneconfigure(pane, key, value=nil) + pane = _epath(pane) + if key.kind_of? Hash + params = [] + key.each{|k, v| + params.push("-#{k}") + # params.push((v.kind_of?(TkObject))? v.epath: v) + params.push(_epath(v)) + } + tk_send_without_enc('pane', pane, *params) + else + # value = value.epath if value.kind_of?(TkObject) + value = _epath(value) + tk_send_without_enc('pane', pane, "-#{key}", value) + end + self + end + alias pane_config paneconfigure + alias pane_configure paneconfigure + + def paneconfiginfo(win) + if TkComm::GET_CONFIGINFO_AS_ARRAY + win = _epath(win) + if key + conf = tk_split_list(tk_send_without_enc('pane', win, "-#{key}")) + conf[0] = conf[0][1..-1] + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + conf[4] = bool(conf[4]) unless conf[4].empty? + end + conf + else + tk_split_simplelist(tk_send_without_enc('pane', + win)).collect{|conflist| + conf = tk_split_simplelist(conflist) + conf[0] = conf[0][1..-1] + if conf[3] + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf[4] + if conf[0] == 'hide' + conf[4] = bool(conf[4]) unless conf[4].empty? + elsif conf[4].index('{') + conf[4] = tk_split_list(conf[4]) + else + conf[4] = tk_tcl2ruby(conf[4]) + end + end + conf[1] = conf[1][1..-1] if conf.size == 2 # alias info + conf + } + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + win = _epath(win) + if key + conf = tk_split_list(tk_send_without_enc('pane', win, "-#{key}")) + key = conf.shift[1..-1] + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + conf[3] = bool(conf[3]) unless conf[3].empty? + end + { key => conf } + else + ret = {} + tk_split_simplelist(tk_send_without_enc('pane', + win)).each{|conflist| + conf = tk_split_simplelist(conflist) + key = conf.shift[1..-1] + if key + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + elsif conf[2].index('{') + conf[2] = tk_split_list(conf[2]) + else + conf[2] = tk_tcl2ruby(conf[2]) + end + end + if conf[3] + if key == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') + conf[3] = tk_split_list(conf[3]) + else + conf[3] = tk_tcl2ruby(conf[3]) + end + end + if conf.size == 1 + ret[key] = conf[0][1..-1] # alias info + else + ret[key] = conf + end + } + ret + end + end + end + alias pane_configinfo paneconfiginfo + + def current_paneconfiginfo(win, key=nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if key + conf = paneconfiginfo(win, key) + {conf[0] => conf[4]} + else + ret = {} + paneconfiginfo(win).each{|conf| + ret[conf[0]] = conf[4] if conf.size > 2 + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + paneconfiginfo(win, key).each{|k, conf| + ret[k] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + alias current_pane_configinfo current_paneconfiginfo + + def identify(x, y) + list(tk_send_without_enc('identify', x, y)) + end + + def sashpos(idx, newpos=None) + num_or_str(tk_send_without_enc('sashpos', idx, newpos)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tprogressbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tprogressbar.rb new file mode 100644 index 0000000..f786d37 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tprogressbar.rb @@ -0,0 +1,56 @@ +# +# tprogressbar widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TProgressbar < TkWindow + end + Progressbar = TProgressbar + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Progressbar, :TkProgressbar) + + +class Tk::Tile::TProgressbar + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::progressbar'.freeze].freeze + else + TkCommandNames = ['::tprogressbar'.freeze].freeze + end + WidgetClassName = 'TProgressbar'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + def step(amount=None) + tk_send_without_enc('step', amount).to_f + end + #def step=(amount) + # tk_send_without_enc('step', amount) + #end + + def start(interval=None) + if Tk::Tile::TILE_SPEC_VERSION_ID < 5 + tk_call_without_enc('::tile::progressbar::start', @path, interval) + else + tk_send_without_enc('start', interval) + end + end + + def stop(amount=None) + if Tk::Tile::TILE_SPEC_VERSION_ID < 5 + tk_call_without_enc('::tile::progressbar::stop', @path) + else + tk_send_without_enc('stop', amount) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tradiobutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tradiobutton.rb new file mode 100644 index 0000000..d653a6d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tradiobutton.rb @@ -0,0 +1,36 @@ +# +# tradiobutton widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TRadioButton < Tk::RadioButton + end + TRadiobutton = TRadioButton + RadioButton = TRadioButton + Radiobutton = TRadioButton + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Radiobutton, + :TkRadiobutton, :TkRadioButton) + + +class Tk::Tile::TRadioButton < Tk::RadioButton + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::radiobutton'.freeze].freeze + else + TkCommandNames = ['::tradiobutton'.freeze].freeze + end + WidgetClassName = 'TRadiobutton'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/treeview.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/treeview.rb new file mode 100644 index 0000000..566e48d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/treeview.rb @@ -0,0 +1,1239 @@ +# +# treeview widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class Treeview < TkWindow + end + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Treeview, :TkTreeview) + + +module Tk::Tile::TreeviewConfig + include TkItemConfigMethod + + def __item_configinfo_struct(id) + # maybe need to override + {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, + :default_value=>nil, :current_value=>1} + end + private :__item_configinfo_struct + + def __itemconfiginfo_core(tagOrId, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) + fontkey = $2 + return [slot.to_s, tagfontobj(tagid(tagOrId), fontkey)] + else + if slot + slot = slot.to_s + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/ + begin + # On tile-0.7.{2-8}, 'state' options has no '-' at its head. + val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot)) + rescue + # Maybe, 'state' option has '-' in future. + val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + end + return [slot, val] + + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] + optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + return [slot, val] + + when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] + return [slot, self.__send__(method, tagOrId)] + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + rescue + val = nil + end + return [slot, val] + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + return [slot, val] + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + rescue + val = nil + end + return [slot, val] + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + return [slot, val] + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val =~ /^[0-9]/ + return [slot, list(val)] + else + return [slot, val] + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + return [slot, val] + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val.empty? + return [slot, nil] + else + return [slot, TkVarAccess.new(val)] + end + + else + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val.index('{') + return [slot, tk_split_list(val)] + else + return [slot, tk_tcl2ruby(val)] + end + end + + else # ! slot + ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf| + conf[0] = conf[0][1..-1] if conf[0][0] == ?- + case conf[0] + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[conf[0]] + optval = conf[1] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[1] = val + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # do nothing + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + conf[1] = number(conf[1]) + rescue + conf[1] = nil + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + conf[1] = num_or_str(conf[1]) + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + conf[1] = bool(conf[1]) + rescue + conf[1] = nil + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + conf[1] = simplelist(conf[1]) + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + if conf[1] =~ /^[0-9]/ + conf[1] = list(conf[1]) + end + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + if conf[1].empty? + conf[1] = nil + else + conf[1] = TkVarAccess.new(conf[1]) + end + + else + if conf[1].index('{') + conf[1] = tk_split_list(conf[1]) + else + conf[1] = tk_tcl2ruby(conf[1]) + end + end + + conf + } + + __item_font_optkeys(tagid(tagOrId)).each{|optkey| + optkey = optkey.to_s + fontconf = ret.assoc(optkey) + if fontconf + ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/} + fontconf[1] = tagfontobj(tagid(tagOrId), optkey) + ret.push(fontconf) + end + } + + __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| + ret << [optkey.to_s, self.__send__(method, tagOrId)] + } + + ret + end + end + + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) + fontkey = $2 + return {slot.to_s => tagfontobj(tagid(tagOrId), fontkey)} + else + if slot + slot = slot.to_s + + alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} + if real_name + slot = real_name.to_s + end + + case slot + when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/ + begin + # On tile-0.7.{2-8}, 'state' option has no '-' at its head. + val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot)) + rescue + # Maybe, 'state' option has '-' in future. + val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + end + return {slot => val} + + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] + optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + return {slot => val} + + when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] + return {slot => self.__send__(method, tagOrId)} + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + rescue + val = nil + end + return {slot => val} + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + return {slot => val} + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + rescue + val = nil + end + return {slot => val} + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) + return {slot => val} + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val =~ /^[0-9]/ + return {slot => list(val)} + else + return {slot => val} + end + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + return {slot => val} + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val.empty? + return {slot => nil} + else + return {slot => TkVarAccess.new(val)} + end + + else + val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) + if val.index('{') + return {slot => tk_split_list(val)} + else + return {slot => tk_tcl2ruby(val)} + end + end + + else # ! slot + ret = {} + ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf| + conf[0] = conf[0][1..-1] if conf[0][0] == ?- + + optkey = conf[0] + case optkey + when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ + method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey] + optval = conf[1] + begin + val = method.call(tagOrId, optval) + rescue => e + warn("Warning:: #{e.message} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG + val = optval + end + conf[1] = val + + when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ + # do nothing + + when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + conf[1] = number(conf[1]) + rescue + conf[1] = nil + end + + when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ + conf[1] = num_or_str(conf[1]) + + when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ + begin + conf[1] = bool(conf[1]) + rescue + conf[1] = nil + end + + when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ + conf[1] = simplelist(conf[1]) + + when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ + if conf[1] =~ /^[0-9]/ + conf[1] = list(conf[1]) + end + + when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ + if conf[1].empty? + conf[1] = nil + else + conf[1] = TkVarAccess.new(conf[1]) + end + + else + if conf[1].index('{') + return [slot, tk_split_list(conf[1])] + else + return [slot, tk_tcl2ruby(conf[1])] + end + end + + ret[conf[0]] = conf[1] + } + + __item_font_optkeys(tagid(tagOrId)).each{|optkey| + optkey = optkey.to_s + fontconf = ret[optkey] + if fontconf.kind_of?(Array) + ret.delete(optkey) + ret.delete('latin' << optkey) + ret.delete('ascii' << optkey) + ret.delete('kanji' << optkey) + fontconf[1] = tagfontobj(tagid(tagOrId), optkey) + ret[optkey] = fontconf + end + } + + __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| + ret[optkey.to_s] = self.__send__(method, tagOrId) + } + + ret + end + end + end + end + + ################### + + def __item_cget_cmd(id) + [self.path, *id] + end + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, *id] + end + private :__item_config_cmd + + def __item_numstrval_optkeys(id) + case id[0] + when :item, 'item' + ['width'] + when :column, 'column' + super(id[1]) + ['minwidth'] + when :tag, 'tag' + super(id[1]) + when :heading, 'heading' + super(id[1]) + else + super(id[1]) + end + end + private :__item_numstrval_optkeys + + def __item_strval_optkeys(id) + case id[0] + when :item, 'item' + super(id) + ['id'] + when :column, 'column' + super(id[1]) + when :tag, 'tag' + super(id[1]) + when :heading, 'heading' + super(id[1]) + else + super(id[1]) + end + end + private :__item_strval_optkeys + + def __item_boolval_optkeys(id) + case id[0] + when :item, 'item' + ['open'] + when :column, 'column' + super(id[1]) + ['stretch'] + when :tag, 'tag' + super(id[1]) + when :heading, 'heading' + super(id[1]) + end + end + private :__item_boolval_optkeys + + def __item_listval_optkeys(id) + case id[0] + when :item, 'item' + ['values'] + when :column, 'column' + [] + when :heading, 'heading' + [] + else + [] + end + end + private :__item_listval_optkeys + + def __item_val2ruby_optkeys(id) + case id[0] + when :item, 'item' + { + 'tags'=>proc{|arg_id, val| + simplelist(val).collect{|tag| + Tk::Tile::Treeview::Tag.id2obj(self, tag) + } + } + } + when :column, 'column' + {} + when :heading, 'heading' + {} + else + {} + end + end + private :__item_val2ruby_optkeys + + def __tile_specific_item_optkeys(id) + case id[0] + when :item, 'item' + [] + when :column, 'column' + [] + when :heading, 'heading' + ['state'] # On tile-0.7.{2-8}, 'state' options has no '-' at its head. + else + [] + end + end + private :__item_val2ruby_optkeys + + def itemconfiginfo(tagOrId, slot = nil) + __itemconfiginfo_core(tagOrId, slot) + end + + def current_itemconfiginfo(tagOrId, slot = nil) + if TkComm::GET_CONFIGINFO_AS_ARRAY + if slot + org_slot = slot + begin + conf = __itemconfiginfo_core(tagOrId, slot) + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + return {conf[0] => conf[-1]} + end + slot = conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] + end while(org_slot != slot) + fail RuntimeError, + "there is a configure alias loop about '#{org_slot}'" + else + ret = {} + __itemconfiginfo_core(tagOrId).each{|conf| + if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ + || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) + ret[conf[0]] = conf[-1] + end + } + ret + end + else # ! TkComm::GET_CONFIGINFO_AS_ARRAY + ret = {} + __itemconfiginfo_core(tagOrId, slot).each{|key, conf| + ret[key] = conf[-1] if conf.kind_of?(Array) + } + ret + end + end + + alias __itemcget itemcget + alias __itemcget_strict itemcget_strict + alias __itemconfigure itemconfigure + alias __itemconfiginfo itemconfiginfo + alias __current_itemconfiginfo current_itemconfiginfo + + private :__itemcget, :__itemcget_strict + private :__itemconfigure, :__itemconfiginfo, :__current_itemconfiginfo + + # Treeview Item + def itemcget(tagOrId, option) + __itemcget([:item, tagOrId], option) + end + def itemcget_strict(tagOrId, option) + __itemcget_strict([:item, tagOrId], option) + end + def itemconfigure(tagOrId, slot, value=None) + __itemconfigure([:item, tagOrId], slot, value) + end + def itemconfiginfo(tagOrId, slot=nil) + __itemconfiginfo([:item, tagOrId], slot) + end + def current_itemconfiginfo(tagOrId, slot=nil) + __current_itemconfiginfo([:item, tagOrId], slot) + end + + # Treeview Column + def columncget(tagOrId, option) + __itemcget([:column, tagOrId], option) + end + def columncget_strict(tagOrId, option) + __itemcget_strict([:column, tagOrId], option) + end + def columnconfigure(tagOrId, slot, value=None) + __itemconfigure([:column, tagOrId], slot, value) + end + def columnconfiginfo(tagOrId, slot=nil) + __itemconfiginfo([:column, tagOrId], slot) + end + def current_columnconfiginfo(tagOrId, slot=nil) + __current_itemconfiginfo([:column, tagOrId], slot) + end + alias column_cget columncget + alias column_cget_strict columncget_strict + alias column_configure columnconfigure + alias column_configinfo columnconfiginfo + alias current_column_configinfo current_columnconfiginfo + + # Treeview Heading + def headingcget_strict(tagOrId, option) + if __tile_specific_item_optkeys([:heading, tagOrId]).index(option.to_s) + begin + # On tile-0.7.{2-8}, 'state' options has no '-' at its head. + tk_call(*(__item_cget_cmd([:heading, tagOrId]) << option.to_s)) + rescue + # Maybe, 'state' option has '-' in future. + tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{option}")) + end + else + __itemcget_strict([:heading, tagOrId], option) + end + end + def headingcget(tagOrId, option) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + headingcget_strict(tagOrId, option) + else + begin + headingcget_strict(tagOrId, option) + rescue => e + begin + if current_headingconfiginfo(tagOrId).has_key?(option.to_s) + # not tag error & option is known -> error on known option + fail e + else + # not tag error & option is unknown + nil + end + rescue + fail e # tag error + end + end + end + end + def headingconfigure(tagOrId, slot, value=None) + if slot.kind_of?(Hash) + slot = _symbolkey2str(slot) + sp_kv = [] + __tile_specific_item_optkeys([:heading, tagOrId]).each{|k| + sp_kv << k << _get_eval_string(slot.delete(k)) if slot.has_key?(k) + } + tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(sp_kv))) + tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(hash_kv(slot)))) + elsif __tile_specific_item_optkeys([:heading, tagOrId]).index(slot.to_s) + begin + # On tile-0.7.{2-8}, 'state' options has no '-' at its head. + tk_call(*(__item_cget_cmd([:heading, tagOrId]) << slot.to_s << value)) + rescue + # Maybe, 'state' option has '-' in future. + tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{slot}" << value)) + end + else + __itemconfigure([:heading, tagOrId], slot, value) + end + self + end + def headingconfiginfo(tagOrId, slot=nil) + __itemconfiginfo([:heading, tagOrId], slot) + end + def current_headingconfiginfo(tagOrId, slot=nil) + __current_itemconfiginfo([:heading, tagOrId], slot) + end + alias heading_cget headingcget + alias heading_cget_strict headingcget_strict + alias heading_configure headingconfigure + alias heading_configinfo headingconfiginfo + alias current_heading_configinfo current_headingconfiginfo + + # Treeview Tag + def tagcget(tagOrId, option) + __itemcget([:tag, :configure, tagOrId], option) + end + def tagcget_strict(tagOrId, option) + __itemcget_strict([:tag, :configure, tagOrId], option) + end + def tagconfigure(tagOrId, slot, value=None) + __itemconfigure([:tag, :configure, tagOrId], slot, value) + end + def tagconfiginfo(tagOrId, slot=nil) + __itemconfiginfo([:tag, :configure, tagOrId], slot) + end + def current_tagconfiginfo(tagOrId, slot=nil) + __current_itemconfiginfo([:tag, :configure, tagOrId], slot) + end + alias tag_cget tagcget + alias tag_cget_strict tagcget_strict + alias tag_configure tagconfigure + alias tag_configinfo tagconfiginfo + alias current_tag_configinfo current_tagconfiginfo +end + +######################## + +class Tk::Tile::Treeview::Item < TkObject + ItemID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + Tk::Tile::Treeview::Item::ItemID_TBL.clear + } + } + + def self.id2obj(tree, id) + tpath = tree.path + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] + (Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id])? \ + Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id]: id + else + id + end + } + end + + def self.assign(tree, id) + tpath = tree.path + obj = nil + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] && + Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] + return Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] + end + + obj = self.allocate + obj.instance_eval{ + @parent = @t = tree + @tpath = tpath + @path = @id = id + } + Tk::Tile::Treeview::Item::ItemID_TBL[tpath] ||= {} + Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] = obj + } + obj + end + + def _insert_item(tree, parent_item, idx, keys={}) + keys = _symbolkey2str(keys) + id = keys.delete('id') + if id + num_or_str(tk_call(tree, 'insert', + parent_item, idx, '-id', id, *hash_kv(keys))) + else + num_or_str(tk_call(tree, 'insert', parent_item, idx, *hash_kv(keys))) + end + end + private :_insert_item + + def initialize(tree, parent_item = '', idx = 'end', keys = {}) + if parent_item.kind_of?(Hash) + keys = parent_item + idx = 'end' + parent_item = '' + elsif idx.kind_of?(Hash) + keys = idx + idx = 'end' + end + + @parent = @t = tree + @tpath = tree.path + @path = @id = _insert_item(@t, parent_item, idx, keys) + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + ItemID_TBL[@tpath] = {} unless ItemID_TBL[@tpath] + ItemID_TBL[@tpath][@id] = self + } + end + def id + @id + end + + def cget(option) + @t.itemcget(@id, option) + end + def cget_strict(option) + @t.itemcget_strict(@id, option) + end + + def configure(key, value=None) + @t.itemconfigure(@id, key, value) + self + end + + def configinfo(key=nil) + @t.itemconfiginfo(@id, key) + end + + def current_configinfo(key=nil) + @t.current_itemconfiginfo(@id, key) + end + + def open? + cget('open') + end + def open + configure('open', true) + self + end + def close + configure('open', false) + self + end + + def bbox(column=None) + @t.bbox(@id, column) + end + + def children + @t.children(@id) + end + def set_children(*items) + @t.set_children(@id, *items) + self + end + + def delete + @t.delete(@id) + self + end + + def detach + @t.detach(@id) + self + end + + def exist? + @t.exist?(@id) + end + + def focus + @t.focus_item(@id) + end + + def index + @t.index(@id) + end + + def insert(idx='end', keys={}) + @t.insert(@id, idx, keys) + end + + def move(parent, idx) + @t.move(@id, parent, idx) + self + end + + def next_item + @t.next_item(@id) + end + + def parent_item + @t.parent_item(@id) + end + + def prev_item + @t.prev_item(@id) + end + + def see + @t.see(@id) + self + end + + def selection_add + @t.selection_add(@id) + self + end + + def selection_remove + @t.selection_remove(@id) + self + end + + def selection_set + @t.selection_set(@id) + self + end + + def selection_toggle + @t.selection_toggle(@id) + self + end + + def get_directory + @t.get_directory(@id) + end + alias get_dictionary get_directory + + def get(col) + @t.get(@id, col) + end + + def set(col, value) + @t.set(@id, col, value) + end +end + +######################## + +class Tk::Tile::Treeview::Root < Tk::Tile::Treeview::Item + def self.new(tree, keys = {}) + tpath = tree.path + obj = nil + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] && + Tk::Tile::Treeview::Item::ItemID_TBL[tpath][''] + obj = Tk::Tile::Treeview::Item::ItemID_TBL[tpath][''] + else + #super(tree, keys) + (obj = self.allocate).instance_eval{ + @parent = @t = tree + @tpath = tree.path + @path = @id = '' + Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {} + Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self + } + end + } + obj.configure(keys) if keys && ! keys.empty? + obj + end + + def initialize(tree, keys = {}) + # dummy:: not called by 'new' method + @parent = @t = tree + @tpath = tree.path + @path = @id = '' + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + Tk::Tile::Treeview::Item::ItemID_TBL[@tpath] ||= {} + Tk::Tile::Treeview::Item::ItemID_TBL[@tpath][@id] = self + } + end +end + +######################## + +class Tk::Tile::Treeview::Tag < TkObject + include TkTreatTagFont + + TagID_TBL = TkCore::INTERP.create_table + + (Tag_ID = ['tile_treeview_tag'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + Tk::Tile::Treeview::Tag::TagID_TBL.mutex.synchronize{ + Tk::Tile::Treeview::Tag::TagID_TBL.clear + } + } + + def self.id2obj(tree, id) + tpath = tree.path + Tk::Tile::Treeview::Tag::TagID_TBL.mutex.synchronize{ + if Tk::Tile::Treeview::Tag::TagID_TBL[tpath] + (Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id])? \ + Tk::Tile::Treeview::Tag::TagID_TBL[tpath][id]: id + else + id + end + } + end + + def initialize(tree, keys=nil) + @parent = @t = tree + @tpath = tree.path + Tag_ID.mutex.synchronize{ + @path = @id = Tag_ID.join(TkCore::INTERP._ip_id_) + Tag_ID[1].succ! + } + TagID_TBL.mutex.synchronize{ + TagID_TBL[@tpath] = {} unless TagID_TBL[@tpath] + TagID_TBL[@tpath][@id] = self + } + if keys && keys != None + tk_call_without_enc(@tpath, 'tag', 'configure', @id, *hash_kv(keys,true)) + end + end + def id + @id + end + + def bind(seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @t.tag_bind(@id, seq, cmd, *args) + self + end + + def bind_append(seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + @t.tag_bind_append(@id, seq, cmd, *args) + self + end + + def bind_remove(seq) + @t.tag_bind_remove(@id, seq) + self + end + + def bindinfo(seq=nil) + @t.tag_bindinfo(@id, seq) + end + + def cget(option) + @t.tagcget(@id, option) + end + def cget_strict(option) + @t.tagcget_strict(@id, option) + end + + def configure(key, value=None) + @t.tagconfigure(@id, key, value) + self + end + + def configinfo(key=nil) + @t.tagconfiginfo(@id, key) + end + + def current_configinfo(key=nil) + @t.current_tagconfiginfo(@id, key) + end +end + +######################## + +class Tk::Tile::Treeview < TkWindow + include Tk::Tile::TileWidget + include Scrollable + + include Tk::Tile::TreeviewConfig + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::treeview'.freeze].freeze + else + TkCommandNames = ['::treeview'.freeze].freeze + end + WidgetClassName = 'Treeview'.freeze + WidgetClassNames[WidgetClassName] = self + + def __destroy_hook__ + Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ + Tk::Tile::Treeview::Item::ItemID_TBL.delete(@path) + } + Tk::Tile::Treeview::Tag::ItemID_TBL.mutex.synchronize{ + Tk::Tile::Treeview::Tag::ItemID_TBL.delete(@path) + } + end + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end + + def tagid(id) + if id.kind_of?(Tk::Tile::Treeview::Item) || + id.kind_of?(Tk::Tile::Treeview::Tag) + id.id + elsif id.kind_of?(Array) + # size is 2 or 3 + id[0..-2] << _get_eval_string(id[-1]) + else + _get_eval_string(id) + end + end + + def root + Tk::Tile::Treeview::Root.new(self) + end + + def bbox(item, column=None) + list(tk_send('item', 'bbox', item, column)) + end + + def children(item) + simplelist(tk_send_without_enc('children', item)).collect{|id| + Tk::Tile::Treeview::Item.id2obj(self, id) + } + end + def set_children(item, *items) + tk_send_without_enc('children', item, + array2tk_list(items.flatten, true)) + self + end + + def delete(*items) + tk_send_without_enc('delete', array2tk_list(items.flatten, true)) + self + end + + def detach(*items) + tk_send_without_enc('detach', array2tk_list(items.flatten, true)) + self + end + + def exist?(item) + bool(tk_send_without_enc('exists', _get_eval_enc_str(item))) + end + + def focus_item(item = nil) + if item + tk_send('focus', item) + item + else + id = tk_send('focus') + (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id) + end + end + + def identify(x, y) + # tile-0.7.2 or previous + ret = simplelist(tk_send('identify', x, y)) + case ret[0] + when 'heading', 'separator' + ret[-1] = num_or_str(ret[-1]) + when 'cell' + ret[1] = Tk::Tile::Treeview::Item.id2obj(self, ret[1]) + ret[-1] = num_or_str(ret[-1]) + when 'item', 'row' + ret[1] = Tk::Tile::Treeview::Item.id2obj(self, ret[1]) + end + end + + def row_identify(x, y) + id = tk_send('identify', 'row', x, y) + (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id) + end + + def column_identify(x, y) + tk_send('identify', 'column', x, y) + end + + def index(item) + number(tk_send('index', item)) + end + + # def insert(parent, idx='end', keys={}) + # keys = _symbolkey2str(keys) + # id = keys.delete('id') + # if id + # num_or_str(tk_send('insert', parent, idx, '-id', id, *hash_kv(keys))) + # else + # num_or_str(tk_send('insert', parent, idx, *hash_kv(keys))) + # end + # end + def insert(parent, idx='end', keys={}) + Tk::Tile::Treeview::Item.new(self, parent, idx, keys) + end + + # def instate(spec, cmd=Proc.new) + # tk_send('instate', spec, cmd) + # end + # def state(spec=None) + # tk_send('state', spec) + # end + + def move(item, parent, idx) + tk_send('move', item, parent, idx) + self + end + + def next_item(item) + id = tk_send('next', item) + (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id) + end + + def parent_item(item) + if (id = tk_send('parent', item)).empty? + Tk::Tile::Treeview::Root.new(self) + else + Tk::Tile::Treeview::Item.id2obj(self, id) + end + end + + def prev_item(item) + id = tk_send('prev', item) + (id.empty?)? nil: Tk::Tile::Treeview::Item.id2obj(self, id) + end + + def see(item) + tk_send('see', item) + self + end + + def selection + simplelist(tk_send('selection')).collect{|id| + Tk::Tile::Treeview::Item.id2obj(self, id) + } + end + alias selection_get selection + + def selection_add(*items) + tk_send('selection', 'add', array2tk_list(items.flatten, true)) + self + end + def selection_remove(*items) + tk_send('selection', 'remove', array2tk_list(items.flatten, true)) + self + end + def selection_set(*items) + tk_send('selection', 'set', array2tk_list(items.flatten, true)) + self + end + def selection_toggle(*items) + tk_send('selection', 'toggle', array2tk_list(items.flatten, true)) + self + end + + def get_directory(item) + # tile-0.7+ + ret = [] + lst = simplelist(tk_send('set', item)) + until lst.empty? + col = lst.shift + val = lst.shift + ret << [col, val] + end + ret + end + alias get_dictionary get_directory + + def get(item, col) + tk_send('set', item, col) + end + def set(item, col, value) + tk_send('set', item, col, value) + self + end + + def tag_bind(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([@path, 'tag', 'bind', tag], seq, cmd, *args) + self + end + alias tagbind tag_bind + + def tag_bind_append(tag, seq, *args) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args) + self + end + alias tagbind_append tag_bind_append + + def tag_bind_remove(tag, seq) + _bind_remove([@path, 'tag', 'bind', tag], seq) + self + end + alias tagbind_remove tag_bind_remove + + def tag_bindinfo(tag, context=nil) + _bindinfo([@path, 'tag', 'bind', tag], context) + end + alias tagbindinfo tag_bindinfo +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscale.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscale.rb new file mode 100644 index 0000000..2c46fd9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscale.rb @@ -0,0 +1,53 @@ +# +# tscale & tprogress widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TScale < Tk::Scale + end + Scale = TScale + + class TProgress < TScale + end + Progress = TProgress + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Scale, :TkScale) + + +class Tk::Tile::TScale < Tk::Scale + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::scale'.freeze].freeze + else + TkCommandNames = ['::tscale'.freeze].freeze + end + WidgetClassName = 'TScale'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end + +class Tk::Tile::TProgress < Tk::Tile::TScale + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::progress'.freeze].freeze + else + TkCommandNames = ['::tprogress'.freeze].freeze + end + WidgetClassName = 'TProgress'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscrollbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscrollbar.rb new file mode 100644 index 0000000..163b8f4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tscrollbar.rb @@ -0,0 +1,54 @@ +# +# tscrollbar widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TScrollbar < Tk::Scrollbar + end + Scrollbar = TScrollbar + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Scrollbar, :TkScrollbar) + + +class Tk::Tile::TScrollbar < Tk::Scrollbar + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::scrollbar'.freeze].freeze + else + TkCommandNames = ['::tscrollbar'.freeze].freeze + end + WidgetClassName = 'TScrollbar'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end + +class Tk::Tile::XScrollbar < Tk::Tile::TScrollbar + def create_self(keys) + keys = {} unless keys + keys['orient'] = 'horizontal' + super(keys) + end + private :create_self +end + +class Tk::Tile::YScrollbar < Tk::Tile::TScrollbar + def create_self(keys) + keys = {} unless keys + keys['orient'] = 'vertical' + super(keys) + end + private :create_self +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::XScrollbar, :TkXScrollbar) +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::YScrollbar, :TkYScrollbar) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tseparator.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tseparator.rb new file mode 100644 index 0000000..30fae2c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tseparator.rb @@ -0,0 +1,33 @@ +# +# tseparator widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TSeparator < TkWindow + end + Separator = TSeparator + end +end + +Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Separator, :TkSeparator) + + +class Tk::Tile::TSeparator < TkWindow + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::separator'.freeze].freeze + else + TkCommandNames = ['::tseparator'.freeze].freeze + end + WidgetClassName = 'TSeparator'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tsquare.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tsquare.rb new file mode 100644 index 0000000..600b55e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tile/tsquare.rb @@ -0,0 +1,30 @@ +# +# tsquare widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TSquare < TkWindow + end + Square = TSquare + end +end + +class Tk::Tile::TSquare < TkWindow + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::square'.freeze].freeze + else + TkCommandNames = ['::tsquare'.freeze].freeze + end + WidgetClassName = 'TSquare'.freeze + WidgetClassNames[WidgetClassName] = self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND.rb new file mode 100644 index 0000000..5d52e34 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND.rb @@ -0,0 +1,18 @@ +# +# TkDND (Tk Drag & Drop Extension) support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkDND/setup.rb' + +module Tk + module TkDND + autoload :DND, 'tkextlib/tkDND/tkdnd' + autoload :Shape, 'tkextlib/tkDND/shape' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/shape.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/shape.rb new file mode 100644 index 0000000..d44068e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/shape.rb @@ -0,0 +1,125 @@ +# +# tkextlib/tkDND/shape.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkDND/setup.rb' + +# TkPackage.require('Shape', '0.3') +TkPackage.require('Shape') + +module Tk + module TkDND + module Shape + extend TkCore + + PACKAGE_NAME = 'Shape'.freeze + def self.package_name + PACKAGE_NAME + end + +=begin + def self.package_version + begin + TkPackage.require('Shape') + rescue + '' + end + end +=end + class << self + def package_version + Tk.tk_call('set', 'shape_version') + end + alias shape_version package_version + + def package_patchlevel + Tk.tk_call('set', 'shape_patchLevel') + end + alias shape_patchlevel package_patchlevel + + def version + tk_call('shape', 'version') + end + alias xshape_version version + end + + ############################ + + def shape_bounds(kind=nil) + if kind + ret = tk_call('shape', 'bounds', @path, "-#{kind}") + else + ret = tk_call('shape', 'bounds', @path) + end + if ret == "" + nil + else + list(ret) + end + end + + def shape_get(kind=nil) + if kind + list(tk_call('shape', 'get', @path, "-#{kind}")) + else + list(tk_call('shape', 'get', @path)) + end + end + + def shape_offset(x, y, kind=nil) + if kind + tk_call('shape', 'get', @path, "-#{kind}", x, y) + else + tk_call('shape', 'get', @path, x, y) + end + self + end + + def _parse_shapespec_param(args) + cmd = [] + + kind_keys = ['bounding', 'clip', 'both'] + offset_keys = ['offset'] + srckind_keys = ['bitmap', 'rectangles', 'reset', 'test', 'window'] + + cmd << "-#{args.shift}" if kind_keys.member?(args[0].to_s) + + if offset_keys.member?(args[0].to_s) + cmd << "-#{args.shift}" + cmd << args.shift # xOffset + cmd << args.shift # yOffset + end + + if srckind_keys.member?(args[0].to_s) + cmd << "-#{args.shift}" + end + + cmd.concat(args) + + cmd + end + private :_parse_shapespec_param + + def shape_set(*args) # ?kind? ?offset ? srckind ?arg ...? + tk_call('shape', 'set', @path, *(_parse_shapespec_param(args))) + self + end + + def shape_update(op, *args) # ?kind? ?offset ? srckind ?arg ...? + tk_call('shape', 'update', @path, op, *(_parse_shapespec_param(args))) + self + end + end + end +end + +class TkWindow + include Tk::TkDND::Shape +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/tkdnd.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/tkdnd.rb new file mode 100644 index 0000000..9a9b2dc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkDND/tkdnd.rb @@ -0,0 +1,182 @@ +# +# tkextlib/tkDND/tkdnd.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkDND/setup.rb' + +TkPackage.require('tkdnd') + +module Tk + module TkDND + PACKAGE_NAME = 'tkdnd'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('tkdnd') + rescue + '' + end + end + + class DND_Subst < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?a, ?l, :actions ], + [ ?A, ?s, :action ], + [ ?b, ?L, :codes ], + [ ?c, ?s, :code ], + [ ?d, ?l, :descriptions ], + [ ?D, ?l, :data ], + [ ?L, ?l, :source_types ], + [ ?m, ?l, :modifiers ], + [ ?t, ?l, :types ], + [ ?T, ?s, :type ], + [ ?W, ?w, :widget ], + [ ?x, ?n, :x ], + [ ?X, ?n, :x_root ], + [ ?y, ?n, :y ], + [ ?Y, ?n, :y_root ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?l, TkComm.method(:list) ], + [ ?L, TkComm.method(:simplelist) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + # setup tables + _setup_subst_table(KEY_TBL, PROC_TBL); + end + + module DND + def self.version + begin + TkPackage.require('tkdnd') + rescue + '' + end + end + + def dnd_bindtarget_info(type=nil, event=nil) + if event + procedure(tk_call('dnd', 'bindtarget', @path, type, event)) + elsif type + procedure(tk_call('dnd', 'bindtarget', @path, type)) + else + simplelist(tk_call('dnd', 'bindtarget', @path)) + end + end + + #def dnd_bindtarget(type, event, cmd=Proc.new, prior=50, *args) + # event = tk_event_sequence(event) + # if prior.kind_of?(Numeric) + # tk_call('dnd', 'bindtarget', @path, type, event, + # install_bind_for_event_class(DND_Subst, cmd, *args), + # prior) + # else + # tk_call('dnd', 'bindtarget', @path, type, event, + # install_bind_for_event_class(DND_Subst, cmd, prior, *args)) + # end + # self + #end + def dnd_bindtarget(type, event, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + + prior = 50 + prior = args.shift unless args.empty? + + event = tk_event_sequence(event) + if prior.kind_of?(Numeric) + tk_call('dnd', 'bindtarget', @path, type, event, + install_bind_for_event_class(DND_Subst, cmd, *args), + prior) + else + tk_call('dnd', 'bindtarget', @path, type, event, + install_bind_for_event_class(DND_Subst, cmd, prior, *args)) + end + self + end + + def dnd_cleartarget + tk_call('dnd', 'cleartarget', @path) + self + end + + def dnd_bindsource_info(type=nil) + if type + procedure(tk_call('dnd', 'bindsource', @path, type)) + else + simplelist(tk_call('dnd', 'bindsource', @path)) + end + end + + #def dnd_bindsource(type, cmd=Proc.new, prior=None) + # tk_call('dnd', 'bindsource', @path, type, cmd, prior) + # self + #end + def dnd_bindsource(type, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + + args = [None] if args.empty + + tk_call('dnd', 'bindsource', @path, type, cmd, *args) + self + end + + def dnd_clearsource() + tk_call('dnd', 'clearsource', @path) + self + end + + def dnd_drag(keys=nil) + tk_call('dnd', 'drag', @path, *hash_kv(keys)) + self + end + end + end +end + +class TkWindow + include Tk::TkDND::DND +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML.rb new file mode 100644 index 0000000..5fddde7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML.rb @@ -0,0 +1,13 @@ +# +# TkHtml support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkHTML/setup.rb' + +# load library +require 'tkextlib/tkHTML/htmlwidget' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb new file mode 100644 index 0000000..d893a83 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb @@ -0,0 +1,453 @@ +# +# tkextlib/tkHTML/htmlwidget.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkHTML/setup.rb' + +# TkPackage.require('Tkhtml', '2.0') +TkPackage.require('Tkhtml') + +module Tk + class HTML_Widget < TkWindow + PACKAGE_NAME = 'Tkhtml'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Tkhtml') + rescue + '' + end + end + + class ClippingWindow < TkWindow + end + end +end + +class Tk::HTML_Widget::ClippingWindow + WidgetClassName = 'HtmlClip'.freeze + WidgetClassNames[WidgetClassName] = self + + HtmlClip_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + HtmlClip_TBL.mutex.synchronize{ HtmlClip_TBL.clear } + } + + def self.new(parent, keys={}) + if parent.kind_of?(Hash) + keys = TkComm._symbolkey2str(parent) + parent = keys.delete('parent') + end + + if parent.kind_of?(String) + ppath = parent.path + elsif parent + ppath = parent + else + ppath = '' + end + HtmlClip_TBL.mutex.synchronize{ + return HtmlClip_TBL[ppath] if HtmlClip_TBL[ppath] + } + + widgetname = keys.delete('widgetname') + if widgetname =~ /^(.*)\.[^.]+$/ + ppath2 = $1 + if ppath2[0] != ?. + ppath2 = ppath + '.' + ppath2 + end + HtmlClip_TBL.mutex.synchronize{ + return HtmlClip_TBL[ppath2] if HtmlClip_TBL[ppath2] + } + + ppath = ppath2 + end + + parent = TkComm._genobj_for_tkwidget(ppath) + unless parent.kind_of?(Tk::HTML_Widget) + fail ArgumentError, "parent must be a Tk::HTML_Widget instance" + end + + super(parent) + end + + def initialize(parent) + @parent = parent + @ppath = parent.path + @path = @id = @ppath + '.x' + HtmlClip_TBL.mutex.synchronize{ + HtmlClip_TBL[@ppath] = self + } + end + + def method_missing(m, *args, &b) + @parent.__send__(m, *args, &b) + end +end + +class Tk::HTML_Widget + include Scrollable + + TkCommandNames = ['html'.freeze].freeze + WidgetClassName = 'Html'.freeze + WidgetClassNames[WidgetClassName] = self + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + def __strval_optkeys + super() << 'base' << 'selectioncolor' << 'unvisitedcolor' << 'visitedcolor' + end + private :__strval_optkeys + + ################################### + # class methods + ################################### + def self.reformat(src, dst, txt) + tk_call('html', 'reformat', src, dst, txt) + end + + def self.url_join(*args) # args := sheme authority path query fragment + tk_call('html', 'urljoin', *args) + end + + def self.url_split(uri) + tk_call('html', 'urlsplit', uri) + end + + def self.lockcopy(src, dst) + tk_call('html', 'lockcopy', src, dst) + end + + def self.gzip_file(file, dat) + tk_call('html', 'gzip', 'file', file, dat) + end + + def self.gunzip_file(file, dat) + tk_call('html', 'gunzip', 'file', filet) + end + + def self.gzip_data(dat) + tk_call('html', 'gzip', 'data', file, dat) + end + + def self.gunzip_data(dat) + tk_call('html', 'gunzip', 'data', filet) + end + + def self.base64_encode(dat) + tk_call('html', 'base64', 'encode', dat) + end + + def self.base64_decode(dat) + tk_call('html', 'base64', 'encode', dat) + end + + def self.text_format(dat, len) + tk_call('html', 'text', 'format', dat, len) + end + + def self.xor(cmd, *args) + tk_call('html', 'xor', cmd, *args) + end + + def self.stdchan(cmd, channel) + tk_call('html', 'stdchan', cmd, channel) + end + + def self.crc32(data) + tk_call('html', 'crc32', data) + end + + ################################### + # instance methods + ################################### + def clipping_window + ClippingWindow.new(self) + end + alias clipwin clipping_window + alias htmlclip clipping_window + + def bgimage(image, tid=None) + tk_send('bgimage', image, tid) + self + end + + def clear() + tk_send('clear') + self + end + + def coords(index=None, percent=None) + tk_send('coords', index, percent) + end + + def forminfo(*args) + tk_send('forminfo', *args) + end + alias form_info forminfo + + def href(x, y) + simplelist(tk_send('href', x, y)) + end + + def image_add(id, img) + tk_send('imageadd', id, img) + self + end + + def image_at(x, y) + tk_send('imageat', x, y) + end + + def images() + list(tk_send('images')) + end + + def image_set(id, num) + tk_send('imageset', id, num) + self + end + + def image_update(id, imgs) + tk_send('imageupdate', id, imgs) + self + end + + def index(idx, count=None, unit=None) + tk_send('index', idx, count, unit) + end + + def insert_cursor(idx) + tk_send('insert', idx) + end + + def names() + simple_list(tk_send('names')) + end + + def on_screen(id, x, y) + bool(tk_send('onscreen', id, x, y)) + end + + def over(x, y) + list(tk_send('over', x, y)) + end + + def over_markup(x, y) + list(tk_send('over', x, y, '-muponly')) + end + + def over_attr(x, y, attrs) + list(tk_send('overattr', x, y, attrs)) + end + + def parse(txt) + tk_send('parse', txt) + self + end + + def resolver(*uri_args) + tk_send('resolver', *uri_args) + end + + def selection_clear() + tk_send('selection', 'clear') + self + end + + def selection_set(first, last) + tk_send('selection', 'set', first, last) + self + end + + def refresh(*opts) + tk_send('refresh', *opts) + end + + def layout() + tk_send('layout') + end + + def sizewindow(*args) + tk_send('sizewindow', *args) + end + + def postscript(*args) + tk_send('postscript', *args) + end + + def source() + tk_send('source') + end + + def plain_text(first, last) + tk_send('text', 'ascii', first, last) + end + alias ascii_text plain_text + alias text_ascii plain_text + + def text_delete(first, last) + tk_send('text', 'delete', first, last) + self + end + + def html_text(first, last) + tk_send('text', 'html', first, last) + end + alias text_html html_text + + def text_insert(idx, txt) + tk_send('text', 'insert', idx, txt) + self + end + + def break_text(idx) + tk_send('text', 'break', idx) + end + alias text_break break_text + + def text_find(txt, *args) + tk_send('text', 'find', txt, *args) + end + + def text_table(idx, imgs=None, attrs=None) + tk_send('text', 'table', idx, imgs, attrs) + end + + def token_append(tag, *args) + tk_send('token', 'append', tag, *args) + self + end + + def token_delete(first, last=None) + tk_send('token', 'delete', first, last) + self + end + + def token_define(*args) + tk_send('token', 'defile', *args) + self + end + + def token_find(tag, *args) + list(tk_send('token', 'find', tag, *args)) + end + + def token_get(first, last=None) + list(tk_send('token', 'get', first, last)) + end + + def token_list(first, last=None) + list(tk_send('token', 'list', first, last)) + end + + def token_markup(first, last=None) + list(tk_send('token', 'markup', first, last)) + end + + def token_DOM(first, last=None) + list(tk_send('token', 'domtokens', first, last)) + end + alias token_dom token_DOM + alias token_domtokens token_DOM + alias token_dom_tokens token_DOM + + def token_get_end(idx) + tk_send('token', 'getend', idx) + end + alias token_getend token_get_end + + def token_offset(start, num1, num2) + list(tk_send('token', 'offset', start, num1, num2)) + end + + def token_get_attr(idx, name=None) + list(tk_send('token', 'attr', idx, name)) + end + + def token_set_attr(idx, name=None, val=None) + tk_send('token', 'attr', idx, name, val) + self + end + + def token_handler(tag, cmd=nil, &b) + cmd = Proc.new(&b) if !cmd && b + if cmd + tk_send('token', 'handler', tag, cmd) + return self + else + return tk_send('token', 'handler', tag) + end + end + + def token_insert(idx, tag, *args) + tk_send('token', 'insert', idx, tag, *args) + self + end + + def token_attrs(*args) + list(tk_send('token', 'attrs', *args)) + end + + def token_unique(*args) + list(tk_send('token', 'unique', *args)) + end + + def token_on_events(*args) + list(tk_send('token', 'onEvents', *args)) + end + + def dom_nameidx(tag, name) + number(tk_send('dom', 'nameidx', tag, name)) + end + alias dom_name_index dom_nameidx + + def dom_radioidx(tag, name) + number(tk_send('dom', 'radioidx', tag, name)) + end + alias dom_radio_index dom_radioidx + + def dom_id(*spec) + tk_send('dom', 'id', *spec) + end + + def dom_ids(*spec) + list(tk_send('dom', 'ids', *spec)) + end + + def dom_value(*spec) + list(tk_send('dom', 'value', *spec)) + end + + def dom_attr(idx) + tk_send('dom', 'attr', idx) + end + + def dom_formel(name) + tk_send('dom', 'formel', name) + end + alias dom_form_element dom_formel + + def dom_tree(idx, val) + list(tk_send('dom', 'tree', idx, val)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkHTML/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg.rb new file mode 100644 index 0000000..c01359d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg.rb @@ -0,0 +1,36 @@ +# +# TkImg extension support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# load all image format handlers +#TkPackage.require('Img', '1.3') +TkPackage.require('Img') + +module Tk + module Img + PACKAGE_NAME = 'Img'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('Img') + rescue + '' + end + end + end +end + +# autoload +autoload :TkPixmapImage, 'tkextlib/tkimg/pixmap' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/README b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/README new file mode 100644 index 0000000..65d3636 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/README @@ -0,0 +1,26 @@ + + [ Tcl/Tk Image formats (TkImg) support ] + +TkImg contains a collection of format handlers for the Tk photo +image type, and a new image type, pixmaps. + +Supported formats of TkImg version 1.3 are +------------------------------------------------------- + bmp : Windows Bitmap Format + gif : Graphics Interchange Format + ico : Windows Icon Format + jpeg : Joint Picture Expert Group format + pcx : Paintbrush Format + pixmap : Pixmap Image type + png : Portable Network Graphics format + ppm : Portable Pixmap format + ps : Adobe PostScript Format + sgi : SGI Native Format + sun : Sun Raster Format + tga : Truevision Targa Format + tiff : Tagged Image File Format + window : Tk Windows + xbm : X Window Bitmap Format + xpm : X Window Pixmap Format +------------------------------------------------------- + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/bmp.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/bmp.rb new file mode 100644 index 0000000..ea90181 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/bmp.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'bmp' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +#TkPackage.require('img::bmp', '1.3') +TkPackage.require('img::bmp') + +module Tk + module Img + module BMP + PACKAGE_NAME = 'img::bmp'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::bmp') + rescue + '' + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/gif.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/gif.rb new file mode 100644 index 0000000..d542d47 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/gif.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'gif' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::gif', '1.3') +TkPackage.require('img::gif') + +module Tk + module Img + module GIF + PACKAGE_NAME = 'img::gif'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::gif') + rescue + '' + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ico.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ico.rb new file mode 100644 index 0000000..e79bdf4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/ico.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'ico' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::ico', '1.3') +TkPackage.require('img::ico') + +module Tk + module Img + module ICO + PACKAGE_NAME = 'img::ico'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::ico') + rescue + '' + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/jpeg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/jpeg.rb new file mode 100644 index 0000000..2126120 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/jpeg.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'jpeg' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::jpeg', '1.3') +TkPackage.require('img::jpeg') + +module Tk + module Img + module JPEG + PACKAGE_NAME = 'img::jpeg'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::jpeg') + rescue + '' + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pcx.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pcx.rb new file mode 100644 index 0000000..6831f4d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pcx.rb @@ -0,0 +1,33 @@ +# +# TkImg - format 'pcx' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::pcx', '1.3') +TkPackage.require('img::pcx') + +module Tk + module Img + module PCX + PACKAGE_NAME = 'img::pcx'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::pcx') + rescue + '' + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pixmap.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pixmap.rb new file mode 100644 index 0000000..bd1b870 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tkimg/pixmap.rb @@ -0,0 +1,44 @@ +# +# TkImg - format 'pixmap' +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tkimg/setup.rb' + +# TkPackage.require('img::pixmap', '1.3') +TkPackage.require('img::pixmap') + +module Tk + module Img + module PIXMAP + PACKAGE_NAME = 'img::pixmap'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('img::pixmap') + rescue + '' + end + end + end + end +end + +class TkPixmapImagemethod, ... } + super(id).update('window'=>proc{|v| window(v)}) + end + private :__item_val2ruby_optkeys + + def tag_cget(tagOrId, option) + itemcget(['tag', tagid(tagOrId)], option) + end + def tag_cget_strict(tagOrId, option) + itemcget_strict(['tag', tagid(tagOrId)], option) + end + def tag_configure(tagOrId, slot, value=None) + itemconfigure(['tag', tagid(tagOrId)], slot, value) + end + def tag_configinfo(tagOrId, slot=nil) + itemconfiginfo(['tag', tagid(tagOrId)], slot) + end + def current_tag_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['tag', tagid(tagOrId)], slot) + end + + def window_cget(tagOrId, option) + itemcget(['window', tagid(tagOrId)], option) + end + def window_cget_strict(tagOrId, option) + itemcget_strict(['window', tagid(tagOrId)], option) + end + def window_configure(tagOrId, slot, value=None) + if slot == :window || slot == 'window' + value = _epath(value) + elsif slot.kind_of?(Hash) + if slot.key?(:window) || slot.key?('window') + slot = _symbolkey2str(slot) + slot['window'] = _epath(slot['window']) + end + end + itemconfigure(['window', tagid(tagOrId)], slot, value) + end + def window_configinfo(tagOrId, slot=nil) + itemconfiginfo(['window', tagid(tagOrId)], slot) + end + def current_window_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['window', tagid(tagOrId)], slot) + end + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +##################################################### + +class Tk::TkTable::CellTag + include TkTreatTagFont + + CellTagID_TBL = TkCore::INTERP.create_table + + (CellTag_ID = ['tktbl:celltag'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + CellTagID_TBL.mutex.synchronize{ CellTagID_TBL.clear } + } + + def self.id2obj(table, id) + tpath = table.path + CellTagID_TBL.mutex.synchronize{ + if CellTagID_TBL[tpath] + CellTagID_TBL[tpath][id]? CellTagID_TBL[tpath][id] : id + else + id + end + } + end + + def initialize(parent, keys=nil) + @parent = @t = parent + @tpath - parent.path + CellTag_ID.mutex.synchronize{ + @path = @id = CellTag_ID.join(TkCore::INTERP._ip_id_) + CellTag_ID[1].succ! + } + CellTagID_TBL.mutex.synchronize{ + CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath] + CellTagID_TBL[@tpath][@id] = self + } + configure(keys) if keys + end + + def id + @id + end + + def destroy + tk_call(@tpath, 'tag', 'delete', @id) + CellTagID_TBL.mutex.synchronize{ + CellTagID_TBL[@tpath].delete(@id) if CellTagID_TBL[@tpath] + } + self + end + alias delete destroy + + def exist? + @t.tag_exist?(@id) + end + def include?(idx) + @t.tag_include?(@id, idx) + end + + def add_cell(*args) + @t.tag_cell(@id, *args) + end + def add_col(*args) + @t.tag_col(@id, *args) + end + def add_row(*args) + @t.tag_row(@id, *args) + end + + def raise(target=None) + @t.tag_raise(@id, target) + end + def lower(target=None) + @t.tag_lower(@id, target) + end + + def cget(key) + @t.tag_cget(@id, key) + end + def cget_strict(key) + @t.tag_cget_strict(@id, key) + end + def configure(key, val=None) + @t.tag_configure(@id, key, val) + end + def configinfo(key=nil) + @t.tag_configinfo(@id, key) + end + def current_configinfo(key=nil) + @t.current_tag_configinfo(@id, key) + end +end + +class Tk::TkTable::NamedCellTag < Tk::TkTable::CellTag + def self.new(parent, name, keys=nil) + obj = nil + CellTagID_TBL.mutex.synchronize{ + if CellTagID_TBL[parent.path] && CellTagID_TBL[parent.path][name] + obj = CellTagID_TBL[parent.path][name] + else + #super(parent, name, keys) + (obj = self.allocate).instance_eval{ + @parent = @t = parent + @tpath = parent.path + @path = @id = name + CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath] + CellTagID_TBL[@tpath][@id] = self + } + end + } + obj.configure(keys) if keys && ! keys.empty? + obj + end + + def initialize(parent, name, keys=nil) + # dummy:: not called by 'new' method + @parent = @t = parent + @tpath = parent.path + @path = @id = name + CellTagID_TBL.mutex.synchronize{ + CellTagID_TBL[@tpath] = {} unless CellTagID_TBL[@tpath] + CellTagID_TBL[@tpath][@id] = self + } + configure(keys) if keys && ! keys.empty? + end +end + +##################################################### + +class Tk::TkTable + TkCommandNames = ['table'.freeze].freeze + WidgetClassName = 'Table'.freeze + WidgetClassNames[WidgetClassName] = self + + include Scrollable + include Tk::TkTable::ConfigMethod + include Tk::ValidateConfigure + + def __destroy_hook__ + Tk::TkTable::CelTag::CellTagID_TBL.mutex.synchronize{ + Tk::TkTable::CelTag::CellTagID_TBL.delete(@path) + } + end + + def __boolval_optkeys + super() << 'autoclear' << 'flashmode' << 'invertselected' << + 'multiline' << 'selecttitle' << 'wrap' + end + private :__boolval_optkeys + + def __strval_optkeys + super() << 'colseparator' << 'ellipsis' << 'rowseparator' << 'sparsearray' + end + private :__strval_optkeys + + + ################################# + + class BrowseCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?n, :column ], + [ ?C, ?s, :index ], + [ ?i, ?x, :cursor ], + [ ?r, ?n, :row ], + [ ?s, ?s, :last_index ], + [ ?S, ?s, :new_index ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?x, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + ['browsecommand', 'browsecmd'] + end + end + #-------------------------------- + class CellCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?n, :column ], + [ ?C, ?s, :index ], + [ ?i, ?m, :rw_mode ], + [ ?r, ?n, :row ], + [ ?s, ?v, :value ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + [ ?m, proc{|val| (val == '0')? (:r) : (:w)} ], + [ ?v, proc{|val| TkComm.tk_tcl2ruby(val, true, false)} ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + TkComm._get_eval_string(val) + end + end + + def self._config_keys + ['command'] + end + end + #-------------------------------- + class SelectionCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?n, :sel_columns ], + [ ?C, ?s, :sel_area ], + [ ?i, ?n, :total ], + [ ?r, ?n, :sel_rows ], + [ ?s, ?s, :value ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val.to_s + end + end + + def self._config_keys + ['selectioncommand', 'selcmd'] + end + end + #-------------------------------- + class ValidateCommand < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?c, ?n, :column ], + [ ?C, ?s, :index ], + [ ?i, ?x, :cursor ], + [ ?r, ?n, :row ], + [ ?s, ?v, :current_value ], + [ ?S, ?v, :new_value ], + [ ?W, ?w, :widget ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?x, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?w, TkComm.method(:window) ], + [ ?v, proc{|val| TkComm.tk_tcl2ruby(val, true, false)} ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + end + + def self._config_keys + ['vcmd', 'validatecommand'] + end + end + + ################################# + + def __validation_class_list + super() << + BrowseCommand << CellCommand << SelectionCommand << ValidateCommand + end + + Tk::ValidateConfigure.__def_validcmd(binding, BrowseCommand) + Tk::ValidateConfigure.__def_validcmd(binding, CellCommand) + Tk::ValidateConfigure.__def_validcmd(binding, SelectionCommand) + Tk::ValidateConfigure.__def_validcmd(binding, ValidateCommand) + + ################################# + + def activate(idx) + tk_send('activate', tagid(idx)) + end + + def bbox(idx) + list(tk_send('bbox', tagid(idx))) + end + + def border_mark(x, y) + simplelist(tk_send('border', 'mark', x, y)) + end + def border_mark_row(x, y) + tk_send('border', 'mark', x, y, 'row') + end + def border_mark_col(x, y) + tk_send('border', 'mark', x, y, 'col') + end + def border_dragto(x, y) + tk_send('border', 'dragto', x, y) + end + + def clear_cache(first=None, last=None) + tk_send('clear', 'cache', tagid(first), tagid(last)) + self + end + def clear_sizes(first=None, last=None) + tk_send('clear', 'sizes', tagid(first), tagid(last)) + self + end + def clear_tags(first=None, last=None) + tk_send('clear', 'tags', tagid(first), tagid(last)) + self + end + def clear_all(first=None, last=None) + tk_send('clear', 'all', tagid(first), tagid(last)) + self + end + + def curselection + simplelist(tk_send('curselection')) + end + def curselection=(val) + tk_send('curselection', val) + val + end + + def curvalue + tk_tcl2ruby(tk_send('curvalue'), true, false) + end + def curvalue=(val) + tk_send('curvalue', val) + val + end + + def delete_active(idx1, idx2=None) + tk_send('delete', 'active', tagid(idx1), tagid(idx2)) + self + end + def delete_cols(*args) # ?switches_array?, index, ?count? + params = [] + if args[0].kind_of?(Array) + switches = args.shift + switches.each{|k| params << "-#{k}"} + end + params << '--' + params << tagid(args.shift) + params.concat(args) + tk_send('delete', 'cols', *params) + self + end + def delete_rows(*args) # ?switches_array?, index, ?count? + params = [] + if args[0].kind_of?(Array) + switches = args.shift + switches.each{|k| params << "-#{k}"} + end + params << '--' + params << tagid(args.shift) + params.concat(args) + tk_send('delete', 'rows', *params) + self + end + + def get(idx) + tk_tcl2ruby(tk_send('get', tagid(idx)), true, false) + end + def get_area(idx1, idx2) + simplelist(tk_send('get', tagid(idx1), tagid(idx2))).collect{|v| + tk_tcl2ruby(v, true, false) + } + end + + def height_list + list(tk_send('height')) + end + def height(row) + number(tk_send('height', row)) + end + def set_height(*pairs) + tk_send('height', *(pairs.flatten)) + self + end + + def hidden_list + simplelist(tk_send('hidden')) + end + def hidden?(idx, *args) + if args.empty? + if (ret = tk_send('hidden', tagid(idx))) == '' + false + else + ret + end + else + bool(tk_send('hidden', tagid(idx), *(args.collect{|i| tagid(i)}))) + end + end + + def icursor + number(tk_send('icursor')) + end + def icursor_set(idx) + number(tk_send('icursor', tagid(idx))) + end + + def index(idx) + tk_send('index', tagid(idx)) + end + def row_index(idx) + number(tk_send('index', tagid(idx), 'row')) + end + def col_index(idx) + number(tk_send('index', tagid(idx), 'col')) + end + + def insert_active(idx, val) + tk_send('insert', 'active', tagid(idx), val) + self + end + def insert_cols(*args) # ?switches_array?, index, ?count? + params = [] + if args[0].kind_of?(Array) + switches = args.shift + switches.each{|k| params << "-#{k}"} + end + params << '--' + params.concat(args) + params << tagid(args.shift) + tk_send('insert', 'cols', *params) + self + end + def insert_rows(*args) # ?switches_array?, index, ?count? + params = [] + if args[0].kind_of?(Array) + switches = args.shift + switches.each{|k| params << "-#{k}"} + end + params << '--' + params << tagid(args.shift) + params.concat(args) + tk_send('insert', 'rows', *params) + self + end + + # def postscript(*args) + # tk_send('postscript', *args) + # end + + def reread + tk_send('reread') + self + end + + def scan_mark(x, y) + tk_send('scan', 'mark', x, y) + self + end + def scan_dragto(x, y) + tk_send('scan', 'dragto', x, y) + self + end + + def see(idx) + tk_send('see', tagid(idx)) + self + end + + def selection_anchor(idx) + tk_send('selection', 'anchor', tagid(idx)) + self + end + def selection_clear(first, last=None) + tk_send('selection', 'clear', tagid(first), tagid(last)) + self + end + def selection_clear_all + selection_clear('all') + end + def selection_include?(idx) + bool(tk_send('selection', 'includes', tagid(idx))) + end + def selection_present + bool(tk_send('selection', 'present')) + end + def selection_set(first, last=None) + tk_send('selection', 'set', tagid(first), tagid(last)) + self + end + + def set(*pairs) # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', *args) + self + end + def set_row(*pairs) # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', 'row', *args) + self + end + def set_col(*pairs) # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', 'col', *args) + self + end +=begin + def set(*pairs) # idx, val, idx, val, ... OR [idx, val], [idx, val], ... + if pairs[0].kind_of?(Array) + # [idx, val], [idx, val], ... + args = [] + pairs.each{|idx, val| args << tagid(idx) << val } + tk_send('set', *args) + else + # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', *args) + end + self + end + def set_row(*pairs) + if pairs[0].kind_of?(Array) + # [idx, val], [idx, val], ... + args = [] + pairs.each{|idx, val| args << tagid(idx) << val } + tk_send('set', 'row', *args) + else + # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', 'row', *args) + end + self + end + def set_col(*pairs) + if pairs[0].kind_of?(Array) + # [idx, val], [idx, val], ... + args = [] + pairs.each{|idx, val| args << idx << val } + tk_send('set', 'col', *args) + else + # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + args << pairs[i+1] + } + tk_send('set', 'col', *args) + end + self + end +=end + + def spans + simplelist(tk_send('spans')).collect{|inf| + lst = simplelist(inf) + idx = lst[0] + rows, cols = lst[1].split(',').map!{|n| Integer(n)} + [idx [rows, cols]] + } + end + alias span_list spans + def span(idx) + lst = simplelist(tk_send('spans', tagid(idx))) + idx = lst[0] + rows, cols = lst[1].split(',').map!{|n| Integer(n)} + [idx [rows, cols]] + end + def set_spans(*pairs) + # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + val = pairs[i+1] + if val.kind_of?(Array) + args << val.join(',') + else + args << val + end + } + tk_send('spans', *args) + self + end +=begin + def set_spans(*pairs) + if pairs[0].kind_of?(Array) + # [idx, val], [idx, val], ... + args = [] + pairs.each{|idx, val| + args << tagid(idx) + if val.kind_of?(Array) + args << val.join(',') + else + args << val + end + } + tk_send('spans', *args) + else + # idx, val, idx, val, ... + args = [] + 0.step(pairs.size-1, 2){|i| + args << tagid(pairs[i]) + val = pairs[i+1] + if val.kind_of?(Array) + args << val.join(',') + else + args << val + end + } + tk_send('spans', *args) + end + self + end +=end + + def tagid(tag) + if tag.kind_of?(Tk::TkTable::CellTag) + tag.id + elsif tag.kind_of?(Array) + if tag[0].kind_of?(Integer) && tag[1].kind_of?(Integer) + # [row, col] + tag.join(',') + else + tag + end + else + tag + end + end + + def tagid2obj(tagid) + Tk::TkTable::CellTag::CellTagID_TBL.mutex.synchronize{ + if Tk::TkTable::CellTag::CellTagID_TBL.key?(@path) + if Tk::TkTable::CellTag::CellTagID_TBL[@path].key?(tagid) + Tk::TkTable::CellTag::CellTagID_TBL[@path][tagid] + else + tagid + end + else + tagid + end + } + end + + def tag_cell(tag, *cells) + tk_send('tag', 'cell', tagid(tag), *(cells.collect{|idx| tagid(idx)})) + self + end + def tag_reset(*cells) + tk_send('tag', 'cell', '', *(cells.collect{|idx| tagid(idx)})) + self + end + def tag_col(tag, *cols) + tk_send('tag', 'col', tagid(tag), *cols) + self + end + def tag_col_reset(*cols) + tk_send('tag', 'col', '', *cols) + self + end + def tag_delete(tag) + tk_send('tag', 'delete', tagid(tag)) + Tk::TkTable::CellTag::CellTagID_TBL.mutex.synchronize{ + if Tk::TkTable::CellTag::CellTagID_TBL[@path] + if tag.kind_of? Tk::TkTable::CellTag + Tk::TkTable::CellTag::CellTagID_TBL[@path].delete(tag.id) + else + Tk::TkTable::CellTag::CellTagID_TBL[@path].delete(tag) + end + end + } + self + end + def tag_exist?(tag) + bool(tk_send('tag', 'exists', tagid(tag))) + end + def tag_include?(tag, idx) + bool(tk_send('tag', 'includes', tagid(tag), tagid(idx))) + end + def tag_lower(tag, target=None) + tk_send('tag', 'lower', tagid(tag), tagid(target)) + self + end + def tag_names(pat=None) + simplelist(tk_send('tag', 'names', pat)).collect{|tag| tagid2obj(tag)} + end + def tag_raise(tag, target=None) + tk_send('tag', 'raise', tagid(tag), tagid(target)) + self + end + def tag_row(tag, *rows) + tk_send('tag', 'row', tagid(tag), *rows) + self + end + def tag_row_reset(*rows) + tk_send('tag', 'row', '', *rows) + self + end + + def validate(idx) + bool(tk_send('validate', tagid(idx))) + end + + def width_list + list(tk_send('width')) + end + def width(row) + number(tk_send('width', row)) + end + def set_width(*pairs) + tk_send('width', *(pairs.flatten)) + self + end + + def window_delete(*args) + tk_send('window', 'delete', *(args.collect{|idx| tagid(idx)})) + self + end + def window_move(from_idx, to_idx) + tk_send('window', 'move', tagid(from_idx), tagid(to_idx)) + self + end + def window_names(pat=None) + simplelist(tk_send('window', 'names', pat)) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans.rb new file mode 100644 index 0000000..c5de5be --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans.rb @@ -0,0 +1,14 @@ +# +# TkTrans support (win32 only) +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tktrans/setup.rb' + +# load library +require 'tkextlib/tktrans/tktrans' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/tktrans.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/tktrans.rb new file mode 100644 index 0000000..e051c09 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/tktrans/tktrans.rb @@ -0,0 +1,64 @@ +# +# TkTrans support (win32 only) +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tktrans/setup.rb' + +TkPackage.require('tktrans') rescue Tk.load_tcllibrary('tktrans') + +module Tk + module TkTrans + PACKAGE_NAME = 'tktrans'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('tktrans') + rescue + '' + end + end + end +end + +class TkWindow + def tktrans_set_image(img) + tk_send('tktrans::setwidget', @path, img) + self + end + def tktrans_get_image() + tk_send('tktrans::setwidget', @path) + end +end + +class Tk::Root + undef tktrans_set_image, tktrans_get_image + + def tktrans_set_image(img) + tk_send('tktrans::settoplevel', @path, img) + self + end + def tktrans_get_image() + tk_send('tktrans::settoplevel', @path) + end +end + +class Tk::Toplevel + undef tktrans_set_image, tktrans_get_image + + def tktrans_set_image(img) + tk_send('tktrans::settoplevel', @path, img) + self + end + def tktrans_get_image() + tk_send('tktrans::settoplevel', @path) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl.rb new file mode 100644 index 0000000..1944fb8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl.rb @@ -0,0 +1,13 @@ +# +# TkTreeCtrl support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/treectrl/setup.rb' + +# load library +require 'tkextlib/treectrl/tktreectrl' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb new file mode 100644 index 0000000..e10e6e2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb @@ -0,0 +1,2461 @@ +# +# tkextlib/treectrl/tktreectrl.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/treectrl/setup.rb' + +# TkPackage.require('treectrl', '1.0') +# TkPackage.require('treectrl', '1.1') +TkPackage.require('treectrl') + +module Tk + class TreeCtrl < TkWindow + BindTag_FileList = TkBindTag.new_by_name('TreeCtrlFileList') + + PACKAGE_NAME = 'treectrl'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('treectrl') + rescue + '' + end + end + + HasColumnCreateCommand = + (TkPackage.vcompare(self.package_version, '1.1') >= 0) + + # dummy :: + # pkgIndex.tcl of TreeCtrl-1.0 doesn't support auto_load for + # 'loupe' command (probably it is bug, I think). + # So, calling a 'treectrl' command for loading the dll with + # the auto_load facility. + begin + tk_call('treectrl') + rescue + end + def self.loupe(img, x, y, w, h, zoom) + # NOTE: platform == 'unix' only + + # img => TkPhotoImage + # x, y => screen coords + # w, h => magnifier width and height + # zoom => zooming rate + Tk.tk_call_without_enc('loupe', img, x, y, w, h, zoom) + end + + def self.text_layout(font, text, keys={}) + TkComm.list(Tk.tk_call_without_enc('textlayout', font, text, keys)) + end + + def self.image_tint(img, color, alpha) + Tk.tk_call_without_enc('imagetint', img, color, alpha) + end + + class NotifyEvent < TkUtil::CallbackSubst + end + + module ConfigMethod + end + end + TreeCtrl_Widget = TreeCtrl +end + +############################################## + +class Tk::TreeCtrl::NotifyEvent + # [ <'%' subst-key char>, , ] + KEY_TBL = [ + [ ?c, ?n, :item_num ], + [ ?d, ?s, :detail ], + [ ?D, ?l, :items ], + [ ?e, ?e, :event ], + [ ?I, ?n, :id ], + [ ?l, ?n, :lower_bound ], + [ ?p, ?n, :active_id ], + [ ?P, ?e, :pattern ], + [ ?S, ?l, :sel_items ], + [ ?T, ?w, :widget ], + [ ?u, ?n, :upper_bound ], + [ ?W, ?o, :object ], + [ ??, ?x, :parm_info ], + nil + ] + + # [ , ] + PROC_TBL = [ + [ ?n, TkComm.method(:num_or_str) ], + [ ?s, TkComm.method(:string) ], + [ ?l, TkComm.method(:list) ], + [ ?w, TkComm.method(:window) ], + + [ ?e, proc{|val| + case val + when /^<<[^<>]+>>$/ + TkVirtualEvent.getobj(val[1..-2]) + when /^<[^<>]+>$/ + val[1..-2] + else + val + end + } + ], + + [ ?o, proc{|val| TkComm.tk_tcl2ruby(val)} ], + + [ ?x, proc{|val| + begin + inf = {} + Hash[*(TkComm.list(val))].each{|k, v| + if keyinfo = KEY_TBL.assoc(k[0]) + if cmd = PROC_TBL.assoc(keyinfo[1]) + begin + new_v = cmd.call(v) + v = new_v + rescue + end + end + end + inf[k] = v + } + inf + rescue + val + end + } ], + + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + # setup tables to be used by scan_args, _get_subst_key, _get_all_subst_keys + # + # _get_subst_key() and _get_all_subst_keys() generates key-string + # which describe how to convert callback arguments to ruby objects. + # When binding parameters are given, use _get_subst_key(). + # But when no parameters are given, use _get_all_subst_keys() to + # create a Event class object as a callback parameter. + # + # scan_args() is used when doing callback. It convert arguments + # ( which are Tcl strings ) to ruby objects based on the key string + # that is generated by _get_subst_key() or _get_all_subst_keys(). + # + _setup_subst_table(KEY_TBL, PROC_TBL); +end + +############################################## + +module Tk::TreeCtrl::ConfigMethod + include TkItemConfigMethod + + def treectrl_tagid(key, obj) + if key.kind_of?(Array) + key = key.join(' ') + else + key = key.to_s + end + + if (obj.kind_of?(Tk::TreeCtrl::Column) || + obj.kind_of?(Tk::TreeCtrl::Element) || + obj.kind_of?(Tk::TreeCtrl::Item) || + obj.kind_of?(Tk::TreeCtrl::Style)) + obj = obj.id + end + + case key + when 'column' + obj + + when 'debug' + None + + when 'dragimage' + None + + when 'element' + obj + + when 'item element' + obj + + when 'marquee' + None + + when 'notify' + obj + + when 'style' + obj + + else + obj + end + end + + def tagid(mixed_id) + if mixed_id == 'debug' + ['debug', None] + elsif mixed_id == 'dragimage' + ['dragimage', None] + elsif mixed_id == 'marquee' + ['marquee', None] + elsif mixed_id.kind_of?(Array) + [mixed_id[0], treectrl_tagid(*mixed_id)] + else + tagid(mixed_id.split(':')) + end + end + + def __item_cget_cmd(mixed_id) + if mixed_id[0] == 'column' && mixed_id[1] == 'drag' + return [self.path, 'column', 'dragcget'] + end + + if mixed_id[1].kind_of?(Array) + id = mixed_id[1] + else + id = [mixed_id[1]] + end + + if mixed_id[0].kind_of?(Array) + ([self.path].concat(mixed_id[0]) << 'cget').concat(id) + else + [self.path, mixed_id[0], 'cget'].concat(id) + end + end + private :__item_cget_cmd + + def __item_config_cmd(mixed_id) + if mixed_id[0] == 'column' && mixed_id[1] == 'drag' + return [self.path, 'column', 'dragconfigure'] + end + + if mixed_id[1].kind_of?(Array) + id = mixed_id[1] + else + id = [mixed_id[1]] + end + + if mixed_id[0].kind_of?(Array) + ([self.path].concat(mixed_id[0]) << 'configure').concat(id) + else + [self.path, mixed_id[0], 'configure'].concat(id) + end + end + private :__item_config_cmd + + def __item_pathname(id) + if id.kind_of?(Array) + key = id[0] + if key.kind_of?(Array) + key = key.join(' ') + end + + tag = id[1] + if tag.kind_of?(Array) + tag = tag.join(' ') + end + + id = [key, tag].join(':') + end + [self.path, id].join(';') + end + private :__item_pathname + + def __item_configinfo_struct(id) + if id.kind_of?(Array) && id[0].to_s == 'notify' + {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, + :default_value=>nil, :current_value=>1} + else + {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, + :default_value=>3, :current_value=>4} + end + end + private :__item_configinfo_struct + + + def __item_font_optkeys(id) + if id.kind_of?(Array) && (id[0] == 'element' || + (id[0].kind_of?(Array) && id[0][1] == 'element')) + [] + else + ['font'] + end + end + private :__item_font_optkeys + + def __item_numstrval_optkeys(id) + if id == 'debug' + ['displaydelay'] + else + super(id) + end + end + private :__item_numstrval_optkeys + + def __item_boolval_optkeys(id) + if id == 'debug' + ['data', 'display', 'enable'] + elsif id == 'dragimage' + ['visible'] + elsif id == 'marquee' + ['visible'] + elsif id.kind_of?(Array) + case id[0] + when 'item' + ['button', 'visible'] + when 'column' + if id[1] == 'drag' + ['enable'] + else + ['button', 'expand', 'resize', 'squeeze', 'sunken', + 'visible', 'widthhack'] + end + when 'element' + ['draw', 'filled', 'showfocus', 'destroy'] + when 'notify' + ['active'] + when 'style' + ['detach'] + else + if id[0].kind_of?(Array) && id[0][1] == 'element' + ['filled', 'showfocus'] + else + super(id) + end + end + else + super(id) + end + end + private :__item_boolval_optkeys + + def __item_strval_optkeys(id) + if id == 'debug' + ['erasecolor'] + elsif id.kind_of?(Array) + case id[0] + when 'column' + if id[1] == 'drag' + ['indicatorcolor'] + else + super(id) << 'textcolor' + end + when 'element' + super(id) << 'fill' << 'outline' << 'format' + else + super(id) + end + else + super(id) + end + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + if id.kind_of?(Array) + case id[0] + when 'column' + ['itembackground'] + when 'element' + ['relief'] + when 'style' + ['union'] + else + if id[0].kind_of?(Array) && id[0][1] == 'element' + ['relief'] + else + [] + end + end + else + [] + end + end + private :__item_listval_optkeys + + def __item_keyonly_optkeys(id) # { def_key=>(undef_key|nil), ... } + { + 'notreally'=>nil, + 'increasing'=>'decreasing', + 'decreasing'=>'increasing', + 'ascii'=>nil, + 'dictionary'=>nil, + 'integer'=>nil, + 'real'=>nil + } + end + private :__item_keyonly_optkeys + + def column_cget(tagOrId, option) + itemcget(['column', tagOrId], option) + end + def column_cget_strict(tagOrId, option) + itemcget_strict(['column', tagOrId], option) + end + def column_configure(tagOrId, slot, value=None) + itemconfigure(['column', tagOrId], slot, value) + end + def column_configinfo(tagOrId, slot=nil) + itemconfiginfo(['column', tagOrId], slot) + end + def current_column_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['column', tagOrId], slot) + end + + def column_dragcget(option) + itemcget(['column', 'drag'], option) + end + def column_dragcget_strict(option) + itemcget_strict(['column', 'drag'], option) + end + def column_dragconfigure(slot, value=None) + itemconfigure(['column', 'drag'], slot, value) + end + def column_dragconfiginfo(slot=nil) + itemconfiginfo(['column', 'drag'], slot) + end + def current_column_dragconfiginfo(slot=nil) + current_itemconfiginfo(['column', 'drag'], slot) + end + + def debug_cget(option) + itemcget('debug', option) + end + def debug_cget_strict(option) + itemcget_strict('debug', option) + end + def debug_configure(slot, value=None) + itemconfigure('debug', slot, value) + end + def debug_configinfo(slot=nil) + itemconfiginfo('debug', slot) + end + def current_debug_configinfo(slot=nil) + current_itemconfiginfo('debug', slot) + end + + def dragimage_cget(option) + itemcget('dragimage', option) + end + def dragimage_cget_strict(option) + itemcget_strict('dragimage', option) + end + def dragimage_configure(slot, value=None) + itemconfigure('dragimage', slot, value) + end + def dragimage_configinfo(slot=nil) + itemconfiginfo('dragimage', slot) + end + def current_dragimage_configinfo(slot=nil) + current_itemconfiginfo('dragimage', slot) + end + + def element_cget(tagOrId, option) + itemcget(['element', tagOrId], option) + end + def element_cget_strict(tagOrId, option) + itemcget_strict(['element', tagOrId], option) + end + def element_configure(tagOrId, slot, value=None) + itemconfigure(['element', tagOrId], slot, value) + end + def element_configinfo(tagOrId, slot=nil) + itemconfiginfo(['element', tagOrId], slot) + end + def current_element_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['element', tagOrId], slot) + end + + def item_cget(tagOrId, option) + itemcget(['item', tagOrId], option) + end + def item_cget_strict(tagOrId, option) + itemcget_strict(['item', tagOrId], option) + end + def item_configure(tagOrId, slot, value=None) + itemconfigure(['item', tagOrId], slot, value) + end + def item_configinfo(tagOrId, slot=nil) + itemconfiginfo(['item', tagOrId], slot) + end + def current_item_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['item', tagOrId], slot) + end + + def item_element_cget(item, column, elem, option) + itemcget([['item', 'element'], [item, column, elem]], option) + end + def item_element_cget_strict(item, column, elem, option) + itemcget_strict([['item', 'element'], [item, column, elem]], option) + end + def item_element_configure(item, column, elem, slot, value=None) + itemconfigure([['item', 'element'], [item, column, elem]], slot, value) + end + def item_element_configinfo(item, column, elem, slot=nil) + itemconfiginfo([['item', 'element'], [item, column, elem]], slot) + end + def current_item_element_configinfo(item, column, elem, slot=nil) + current_itemconfiginfo([['item', 'element'], [item, column, elem]], slot) + end + + def marquee_cget(option) + itemcget('marquee', option) + end + def marquee_cget_strict(option) + itemcget_strict('marquee', option) + end + def marquee_configure(slot, value=None) + itemconfigure('marquee', slot, value) + end + def marquee_configinfo(slot=nil) + itemconfiginfo('marquee', slot) + end + def current_marquee_configinfo(slot=nil) + current_itemconfiginfo('marquee', slot) + end + + def notify_cget(win, pattern, option) + pattern = "<#{pattern}>" + # "notify" doesn't have cget subcommand. + current_itemconfiginfo(['notify', [win, pattern]])[option.to_s] + end + def notify_cget_strict(win, pattern, option) + pattern = "<#{pattern}>" + # "notify" doesn't have cget subcommand. + info = current_itemconfiginfo(['notify', [win, pattern]]) + option = option.to_s + unless info.has_key?(option) + fail RuntimeError, "unknown option \"#{option}\"" + else + info[option] + end + end + def notify_configure(win, pattern, slot, value=None) + pattern = "<#{pattern}>" + itemconfigure(['notify', [win, pattern]], slot, value) + end + def notify_configinfo(win, pattern, slot=nil) + pattern = "<#{pattern}>" + itemconfiginfo(['notify', [win, pattern]], slot) + end + def current_notify_configinfo(tagOrId, slot=nil) + pattern = "<#{pattern}>" + current_itemconfiginfo(['notify', [win, pattern]], slot) + end + + def style_cget(tagOrId, option) + itemcget(['style', tagOrId], option) + end + def style_cget_strict(tagOrId, option) + itemcget_strict(['style', tagOrId], option) + end + def style_configure(tagOrId, slot, value=None) + itemconfigure(['style', tagOrId], slot, value) + end + def style_configinfo(tagOrId, slot=nil) + itemconfiginfo(['style', tagOrId], slot) + end + def current_style_configinfo(tagOrId, slot=nil) + current_itemconfiginfo(['style', tagOrId], slot) + end + + private :itemcget, :itemcget_strict + private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo +end + +############################################## + +class Tk::TreeCtrl + include Tk::TreeCtrl::ConfigMethod + include Scrollable + + TkCommandNames = ['treectrl'.freeze].freeze + WidgetClassName = 'TreeCtrl'.freeze + WidgetClassNames[WidgetClassName] = self + + ######################### + + def __destroy_hook__ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.delete(@path) + } + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.delete(@path) + } + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.delete(@path) + } + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.delete(@path) + } + end + + ######################### + + def __strval_optkeys + super() + [ + 'buttoncolor', 'columnprefix', 'itemprefix', 'linecolor' + ] + end + private :__strval_optkeys + + def __boolval_optkeys + [ + 'itemwidthequal', 'usetheme', + 'showbuttons', 'showheader', 'showlines', 'showroot', + 'showrootbutton', 'showrootlines', + ] + end + private :__boolval_optkeys + + def __listval_optkeys + [ 'defaultstyle' ] + end + private :__listval_optkeys + + ######################### + + def install_bind(cmd, *args) + install_bind_for_event_class(Tk::TreeCtrl::NotifyEvent, cmd, *args) + end + + ######################### + + def create_self(keys) + if keys and keys != None + tk_call_without_enc(self.class::TkCommandNames[0], @path, + *hash_kv(keys, true)) + else + tk_call_without_enc(self.class::TkCommandNames[0], @path) + end + end + private :create_self + + ######################### + + def activate(desc) + tk_send('activate', desc) + self + end + + def canvasx(x) + number(tk_send('canvasx', x)) + end + + def canvasy(y) + number(tk_send('canvasy', y)) + end + + def collapse(*dsc) + tk_send_without_enc('collapse', *(dsc.map!{|d| _get_eval_string(d, true)})) + self + end + + def collapse_recurse(*dsc) + tk_send_without_enc('collapse', '-recurse', + *(dsc.map!{|d| _get_eval_string(d, true)})) + self + end + + def column_bbox(idx) + list(tk_send('column', 'bbox', idx)) + end + + def column_compare(column1, op, column2) + bool(tk_send('column', 'compare', column1, op, column2)) + end + + def column_count + num_or_str(tk_send('column', 'count')) + end + + def column_create(keys=nil) + if keys && keys.kind_of?(Hash) + num_or_str(tk_send('column', 'create', *hash_kv(keys))) + else + num_or_str(tk_send('column', 'create')) + end + end + + def column_delete(idx) + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path] + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path].delete(idx) + end + } + tk_send('column', 'delete', idx) + self + end + + def column_index(idx) + num_or_str(tk_send('column', 'index', idx)) + end + + def column_id(idx) + tk_send('column', 'id', idx) + end + + def column_list(visible=false) + if visible + simplelist(tk_send('column', 'list', '-visible')) + else + simplelist(tk_send('column', 'list')) + end + end + def column_visible_list + column_list(true) + end + + def column_move(idx, before) + tk_send('column', 'move', idx, before) + self + end + + def column_needed_width(idx) + num_or_str(tk_send('column', 'neededwidth', idx)) + end + alias column_neededwidth column_needed_width + + def column_order(column, visible=false) + if visible + num_or_str(tk_send('column', 'order', column, '-visible')) + else + num_or_str(tk_send('column', 'order', column)) + end + end + def column_visible_order(column) + column_order(column, true) + end + + def column_width(idx) + num_or_str(tk_send('column', 'width', idx)) + end + + def compare(item1, op, item2) + bool(tk_send('compare', item1, op, item2)) + end + + def contentbox() + list(tk_send('contentbox')) + end + + def depth(item=None) + num_or_str(tk_send_without_enc('depth', _get_eval_string(item, true))) + end + + def dragimage_add(item, *args) + tk_send('dragimage', 'add', item, *args) + self + end + + def dragimage_clear() + tk_send('dragimage', 'clear') + self + end + + def dragimage_offset(*args) # x, y + if args.empty? + list(tk_send('dragimage', 'offset')) + else + tk_send('dragimage', 'offset', *args) + self + end + end + + def dragimage_visible(*args) # mode + if args..empty? + bool(tk_send('dragimage', 'visible')) + else + tk_send('dragimage', 'visible', *args) + self + end + end + def dragimage_visible? + dragimage_visible() + end + + def debug_dinfo + tk_send('debug', 'dinfo') + self + end + + def debug_scroll + tk_send('debug', 'scroll') + end + + def element_create(elem, type, keys=nil) + if keys && keys.kind_of?(Hash) + tk_send('element', 'create', elem, type, *hash_kv(keys)) + else + tk_send('element', 'create', elem, type) + end + end + + def element_delete(*elems) + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path] + elems.each{|elem| + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path].delete(elem) + } + end + } + tk_send('element', 'delete', *elems) + self + end + + def element_names() + list(tk_send('element', 'names')).collect!{|elem| + Tk::TreeCtrl::Element.id2obj(self, elem) + } + end + + def _conv_element_perstate_val(opt, val) + case opt + when 'background', 'foreground', 'fill', 'outline', 'format' + val + when 'draw', 'filled', 'showfocus', 'destroy' + bool(val) + else + tk_tcl2ruby(val) + end + end + private :_conv_element_perstate_val + + def element_perstate(elem, opt, st_list) + tk_send('element', 'perstate', elem, "-{opt}", st_list) + end + + def element_type(elem) + tk_send('element', 'type', elem) + end + + def element_class(elem) + Tk::TreeCtrl::Element.type2class(element_type(elem)) + end + + def expand(*dsc) + tk_send('expand', *dsc) + self + end + + def expand_recurse(*dsc) + tk_send('expand', '-recurse', *dsc) + self + end + + def identify(x, y) + lst = list(tk_send('identify', x, y)) + + if lst[0] == 'item' + lst[1] = Tk::TreeCtrl::Item.id2obj(self, lst[1]) + size = lst.size + i = 2 + while i < size + case lst[i] + when 'line' + i += 1 + lst[i] = Tk::TreeCtrl::Item.id2obj(self, lst[i]) + i += 1 + + when 'button' + i += 1 + + when 'column' + i += 2 + + when 'elem' + i += 1 + lst[i] = Tk::TreeCtrl::Element.id2obj(self, lst[i]) + i += 1 + + else + i += 1 + end + end + end + + lst + end + + def index(idx) + num_or_str(tk_send('index', idx)) + end + + def item_ancestors(item) + list(tk_send('item', 'ancestors', item)).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def item_bbox(item, *args) + list(tk_send('item', 'bbox', item, *args)) + end + + def item_children(item) + list(tk_send('item', 'children', item)).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def item_collapse(item) + tk_send_without_enc('item', 'collapse', _get_eval_string(item, true)) + self + end + + def item_collapse_recurse(item) + tk_send_without_enc('item', 'collapse', + _get_eval_string(item, true), '-recurse') + self + end + + def item_compare(item1, op, item2) + bool(tk_send('item', 'compare', item1, op, item2)) + end + + def item_complex(item, *args) + tk_send_without_enc('item', 'complex', + _get_eval_string(item, true), + *(args.map!{|arg| _get_eval_string(arg, true)})) + self + end + + def item_count + num_or_str(tk_send('item', 'count')) + end + + def item_create(keys={}) + num_or_str(tk_send_without_enc('item', 'create', *hash_kv(keys, true))) + end + + def _erase_children(item) + item_children(item).each{|i| _erase_children(i)} + # table is already locked + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path].delete(item) + end + private :_erase_children + + def item_delete(first, last=None) + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path] + if first == 'all' || first == :all || last == 'all' || last == :all + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path].clear + elsif last == None + _erase_children(first) + else + self.range(first, last).each{|id| + _erase_children(id) + } + end + end + } + tk_send('item', 'delete', first, last) + self + end + + def item_dump(item) + list(tk_send('item', 'dump', item)) + end + + def item_dump_hash(item) + Hash[*list(tk_send('item', 'dump', item))] + end + + def item_element_actual(item, column, elem, key) + tk_send('item', 'element', 'actual', item, column, elem, "-#{key}") + end + + def item_element_perstate(elem, opt, st_list) + tk_send('item', 'element', 'perstate', elem, "-{opt}", st_list) + end + + def item_expand(item) + tk_send('item', 'expand', item) + self + end + + def item_expand_recurse(item) + tk_send('item', 'expand', item, '-recurse') + self + end + + def item_firstchild(parent, child=nil) + if child + tk_send_without_enc('item', 'firstchild', + _get_eval_string(parent, true), + _get_eval_string(child, true)) + self + else + id = num_or_str(tk_send_without_enc('item', 'firstchild', + _get_eval_string(parent, true))) + Tk::TreeCtrl::Item.id2obj(self, id) + end + end + alias item_first_child item_firstchild + + def item_hasbutton(item, st=None) + if st == None + bool(tk_send_without_enc('item', 'hasbutton', + _get_eval_string(item, true))) + else + tk_send_without_enc('item', 'hasbutton', + _get_eval_string(item, true), + _get_eval_string(st)) + self + end + end + alias item_has_button item_hasbutton + + def item_hasbutton?(item) + item_hasbutton(item) + end + alias item_has_button? item_hasbutton? + + def item_id(item) + tk_send('item', 'id', item) + end + + def item_image(item, column=nil, *args) + if args.empty? + if column + img = tk_send('item', 'image', item, column) + TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img + else + simplelist(tk_send('item', 'image', item)).collect!{|img| + TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img + } + end + else + tk_send('item', 'image', item, column, *args) + self + end + end + def get_item_image(item, column=nil) + item_image(item, column) + end + def set_item_image(item, col, img, *args) + item_image(item, col, img, *args) + end + + def item_index(item) + list(tk_send('item', 'index', item)) + end + + def item_isancestor(item, des) + bool(tk_send('item', 'isancestor', item, des)) + end + alias item_is_ancestor item_isancestor + alias item_isancestor? item_isancestor + alias item_is_ancestor? item_isancestor + + def item_isopen(item) + bool(tk_send('item', 'isopen', item)) + end + alias item_is_open item_isopen + alias item_isopen? item_isopen + alias item_is_open? item_isopen + alias item_isopened? item_isopen + alias item_is_opened? item_isopen + + def item_lastchild(parent, child=nil) + if child + tk_send_without_enc('item', 'lastchild', + _get_eval_string(parent, true), + _get_eval_string(child, true)) + self + else + id = num_or_str(tk_send_without_enc('item', 'lastchild', + _get_eval_string(parent, true))) + Tk::TreeCtrl::Item.id2obj(self, id) + end + end + alias item_last_child item_lastchild + + def item_nextsibling(sibling, nxt=nil) + if nxt + tk_send('item', 'nextsibling', sibling, nxt) + self + else + id = num_or_str(tk_send('item', 'nextsibling', sibling)) + Tk::TreeCtrl::Item.id2obj(self, id) + end + end + alias item_next_sibling item_nextsibling + + def item_numchildren(item) + number(tk_send_without_enc('item', 'numchildren', + _get_eval_string(item, true))) + end + alias item_num_children item_numchildren + alias item_children_size item_numchildren + + def item_order(item, visible=false) + if visible + ret = num_or_str(tk_send('item', 'order', item, '-visible')) + else + ret = num_or_str(tk_send('item', 'order', item)) + end + + (ret.kind_of?(Fixnum) && ret < 0)? nil: ret + end + def item_visible_order(item) + item_order(item, true) + end + + def item_parent(item) + id = num_or_str(tk_send('item', 'parent', item)) + Tk::TreeCtrl::Item.id2obj(self, id) + end + + def item_prevsibling(sibling, prev=nil) + if prev + tk_send('item', 'prevsibling', sibling, prev) + self + else + id = num_or_str(tk_send('item', 'prevsibling', sibling)) + Tk::TreeCtrl::Item.id2obj(self, id) + end + end + alias item_prev_sibling item_prevsibling + + def item_range(first, last) + simplelist(tk_send('item', 'range', first, last)) + end + + def item_remove(item) + tk_send('item', 'remove', item) + self + end + + def item_rnc(item) + list(tk_send('item', 'rnc', item)) + end + + def _item_sort_core(real_sort, item, *opts) + # opts ::= sort_param [, sort_param, ... ] + # sort_param ::= {key=>val, ...} + # [type, desc, {key=>val, ...}] + # param + opts = opts.collect{|param| + if param.kind_of?(Hash) + param = _symbolkey2str(param) + if param.key?('column') + key = '-column' + desc = param.delete('column') + elsif param.key?('element') + key = '-element' + desc = param.delete('element') + else + key = nil + end + + if param.empty? + param = None + else + param = hash_kv(__conv_item_keyonly_opts(item, param)) + end + + if key + [key, desc].concat(param) + else + param + end + + elsif param.kind_of?(Array) + if param[2].kind_of?(Hash) + param[2] = hash_kv(__conv_item_keyonly_opts(item, param[2])) + end + param + + elsif param.kind_of?(String) && param =~ /\A[a-z]+\Z/ + '-' << param + + elsif param.kind_of?(Symbol) + '-' << param.to_s + + else + param + end + }.flatten + + if real_sort + tk_send('item', 'sort', item, *opts) + self + else + list(tk_send('item', 'sort', item, '-notreally', *opts)) + end + end + private :_item_sort_core + + def item_sort(item, *opts) + _item_sort_core(true, item, *opts) + end + def item_sort_not_really(item, *opts) + _item_sort_core(false, item, *opts) + end + + def item_span(item, column=nil, *args) + if args.empty? + if column + list(tk_send('item', 'span', item, column)) + else + simplelist(tk_send('item', 'span', item)).collect!{|elem| list(elem)} + end + else + tk_send('item', 'span', item, column, *args) + self + end + end + def get_item_span(item, column=nil) + item_span(item, column) + end + def set_item_span(item, col, num, *args) + item_span(item, col, num, *args) + end + + def item_state_forcolumn(item, column, *args) + tk_send('item', 'state', 'forcolumn', item, column, *args) + end + alias item_state_for_column item_state_forcolumn + + def item_state_get(item, *args) + if args.empty? + list(tk_send('item', 'state', 'get', item *args)) + else + bool(tk_send('item', 'state', 'get', item)) + end + end + + def item_state_set(item, *args) + tk_send('item', 'state', 'set', item, *args) + end + + def item_style_elements(item, column) + list(tk_send('item', 'style', 'elements', item, column)).collect!{|id| + Tk::TreeCtrl::Style.id2obj(self, id) + } + end + + def item_style_map(item, column, style, map) + tk_send('item', 'style', 'map', item, column, style, map) + self + end + + def item_style_set(item, column=nil, *args) + if args.empty? + if column + id = tk_send_without_enc('item', 'style', 'set', + _get_eval_string(item, true), + _get_eval_string(column, true)) + Tk::TreeCtrl::Style.id2obj(self, id) + else + list(tk_send_without_enc('item', 'style', 'set', + _get_eval_string(item, true))).collect!{|id| + Tk::TreeCtrl::Style.id2obj(self, id) + } + end + else + tk_send_without_enc('item', 'style', 'set', + _get_eval_string(item, true), + _get_eval_string(column, true), + *(args.flatten.map!{|arg| + _get_eval_string(arg, true) + })) + self + end + end + + def item_text(item, column, txt=nil, *args) + if args.empty? + if txt + tk_send('item', 'text', item, column, txt) + self + else + tk_send('item', 'text', item, column) + end + else + tk_send('item', 'text', item, column, txt, *args) + self + end + end + + def item_toggle(item) + tk_send('item', 'toggle', item) + self + end + + def item_toggle_recurse(item) + tk_send('item', 'toggle', item, '-recurse') + self + end + + def item_visible(item, st=None) + if st == None + bool(tk_send('item', 'visible', item)) + else + tk_send('item', 'visible', item, st) + self + end + end + def item_visible?(item) + item_visible(item) + end + + def marquee_anchor(*args) + if args.empty? + list(tk_send('marquee', 'anchor')) + else + tk_send('marquee', 'anchor', *args) + self + end + end + + def marquee_coords(*args) + if args.empty? + list(tk_send('marquee', 'coords')) + else + tk_send('marquee', 'coords', *args) + self + end + end + + def marquee_corner(*args) + if args.empty? + tk_send('marquee', 'corner') + else + tk_send('marquee', 'corner', *args) + self + end + end + + def marquee_identify() + list(tk_send('marquee', 'identify')).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def marquee_visible(st=None) + if st == None + bool(tk_send('marquee', 'visible')) + else + tk_send('marquee', 'visible', st) + self + end + end + def marquee_visible?() + marquee_visible() + end + + #def notify_bind(obj, event, cmd=Proc.new, *args) + # _bind([@path, 'notify', 'bind', obj], event, cmd, *args) + # self + #end + def notify_bind(obj, event, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind([@path, 'notify', 'bind', obj], event, cmd, *args) + self + end + + #def notify_bind_append(obj, event, cmd=Proc.new, *args) + # _bind_append([@path, 'notify', 'bind', obj], event, cmd, *args) + # self + #end + def notify_bind_append(obj, event, *args) + # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + if TkComm._callback_entry?(args[0]) || !block_given? + cmd = args.shift + else + cmd = Proc.new + end + _bind_append([@path, 'notify', 'bind', obj], event, cmd, *args) + self + end + + def notify_bind_remove(obj, event) + _bind_remove([@path, 'notify', 'bind', obj], event) + self + end + + def notify_bindinfo(obj, event=nil) + _bindinfo([@path, 'notify', 'bind', obj], event) + end + + def notify_detailnames(event) + list(tk_send('notify', 'detailnames', event)) + end + + def notify_eventnames() + list(tk_send('notify', 'eventnames')) + end + + def notify_generate(pattern, char_map=None, percents_cmd=None) + pattern = "<#{pattern}>" + tk_send('notify', 'generate', pattern, char_map, percents_cmd) + self + end + + def notify_install(pattern, percents_cmd=nil, &b) + pattern = "<#{pattern}>" + percents_cmd = Proc.new(&b) if !percents_cmd && b + if percents_cmd + procedure(tk_send('notify', 'install', pattern, percents_cmd)) + else + procedure(tk_send('notify', 'install', pattern)) + end + end + + def notify_install_detail(event, detail, percents_cmd=nil, &b) + percents_cmd = Proc.new(&b) if !percents_cmd && b + if percents_cmd + tk_send('notify', 'install', 'detail', event, detail, percents_cmd) + else + tk_send('notify', 'install', 'detail', event, detail) + end + end + + def notify_install_event(event, percents_cmd=nil, &b) + percents_cmd = Proc.new(&b) if !percents_cmd && b + if percents_cmd + tk_send('notify', 'install', 'event', event, percents_cmd) + else + tk_send('notify', 'install', 'event', event) + end + end + + def notify_linkage(pattern, detail=None) + if detail != None + tk_send('notify', 'linkage', pattern, detail) + else + begin + if pattern.to_s.index(?-) + # TreeCtrl 1.1 format? + begin + tk_send('notify', 'linkage', "<#{pattern}>") + rescue + # TreeCtrl 1.0? + tk_send('notify', 'linkage', pattern) + end + else + # TreeCtrl 1.0 format? + begin + tk_send('notify', 'linkage', pattern) + rescue + # TreeCtrl 1.1? + tk_send('notify', 'linkage', "<#{pattern}>") + end + end + end + end + end + + def notify_unbind(pattern=nil) + if pattern + tk_send('notify', 'unbind', "<#{pattern}>") + else + tk_send('notify', 'unbind') + end + self + end + + def notify_uninstall(pattern) + pattern = "<#{pattern}>" + tk_send('notify', 'uninstall', pattern) + self + end + + def notify_uninstall_detail(event, detail) + tk_send('notify', 'uninstall', 'detail', event, detail) + self + end + + def notify_uninstall_event(event) + tk_send('notify', 'uninstall', 'event', event) + self + end + + def numcolumns() + num_or_str(tk_send('numcolumns')) + end + alias num_columns numcolumns + alias columns_size numcolumns + + def numitems() + num_or_str(tk_send('numitems')) + end + alias num_items numitems + alias items_size numitems + + def orphans() + list(tk_send('orphans')).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def range(first, last) + list(tk_send('range', first, last)).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def state_define(name) + tk_send('state', 'define', name) + self + end + + def state_linkage(name) + tk_send('state', 'linkage', name) + end + + def state_names() + list(tk_send('state', 'names')) + end + + def state_undefine(*names) + tk_send('state', 'undefine', *names) + self + end + + def see(item) + tk_send('see', item) + self + end + + def selection_add(first, last=None) + tk_send('selection', 'add', first, last) + self + end + + def selection_anchor(item=None) + id = num_or_str(tk_send('selection', 'anchor', item)) + Tk::TreeCtrl::Item.id2obj(self, id) + end + + def selection_clear(*args) # first, last + tk_send('selection', 'clear', *args) + self + end + + def selection_count() + number(tk_send('selection', 'count')) + end + + def selection_get() + list(tk_send('selection', 'get')).collect!{|id| + Tk::TreeCtrl::Item.id2obj(self, id) + } + end + + def selection_includes(item) + bool(tk_send('selection', 'includes', item)) + end + + def selection_modify(sel, desel) + tk_send('selection', 'modify', sel, desel) + self + end + + def style_create(style, keys=None) + if keys && keys != None + tk_send('style', 'create', style, *hash_kv(keys)) + else + tk_send('style', 'create', style) + end + end + + def style_delete(*args) + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path] + args.each{|sty| + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path].delete(sty) + } + end + } + tk_send('style', 'delete', *args) + self + end + + def style_elements(style, *elems) + if elems.empty? + list(tk_send('style', 'elements', style)).collect!{|id| + Tk::TreeCtrl::Element.id2obj(self, id) + } + else + tk_send('style', 'elements', style, elems.flatten) + self + end + end + + def _conv_style_layout_val(sty, val) + case sty.to_s + when 'padx', 'pady', 'ipadx', 'ipady' + lst = list(val) + (lst.size == 1)? lst[0]: lst + when 'detach', 'indent' + bool(val) + when 'union' + simplelist(val).collect!{|elem| + Tk::TreeCtrl::Element.id2obj(self, elem) + } + else + val + end + end + private :_conv_style_layout_val + + def style_layout(style, elem, keys=None) + if keys && keys != None + if keys.kind_of?(Hash) + tk_send('style', 'layout', style, elem, *hash_kv(keys)) + self + else + _conv_style_layout_val(keys, + tk_send('style', 'layout', + style, elem, "-#{keys}")) + end + else + ret = Hash.new + Hash[*simplelist(tk_send('style', 'layout', style, elem))].each{|k, v| + k = k[1..-1] + ret[k] = _conv_style_layout_val(k, v) + } + ret + end + end + def get_style_layout(style, elem, opt=None) + style_layout(style, elem, opt) + end + def set_style_layout(style, elem, slot, value=None) + if slot.kind_of?(Hash) + style_layout(style, elem, slot) + else + style_layout(style, elem, {slot=>value}) + end + end + + def style_names() + list(tk_send('style', 'names')).collect!{|id| + Tk::TreeCtrl::Style.id2obj(self, id) + } + end + + def toggle(*items) + tk_send('toggle', *items) + self + end + + def toggle_recurse() + tk_send('toggle', '-recurse', *items) + self + end +end + +##################### + +class Tk::TreeCtrl::Column < TkObject + TreeCtrlColumnID_TBL = TkCore::INTERP.create_table + + (TreeCtrlColumnID = ['treectrl_column'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.clear + } + } + + def self.id2obj(tree, id) + tpath = tree.path + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath] + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath][id]? \ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[tpath][id] : id + else + id + end + } + end + + def initialize(parent, keys={}) + @tree = parent + @tpath = parent.path + + keys = _symbolkey2str(keys) + + Tk::TreeCtrl::Column::TreeCtrlColumnID.mutex.synchronize{ + @path = @id = + keys.delete('tag') || + Tk::TreeCtrl::Column::TreeCtrlColumnID.join(TkCore::INTERP._ip_id_) + Tk::TreeCtrl::Column::TreeCtrlColumnID[1].succ! + } + + keys['tag'] = @id + + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[@tpath] ||= {} + Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[@tpath][@id] = self + } + + @tree.column_create(keys) + end + + def id + @id + end + + def to_s + @id.to_s.dup + end + + def cget(opt) + @tree.column_cget(@tree.column_index(@id), opt) + end + def cget_strict(opt) + @tree.column_cget_strict(@tree.column_index(@id), opt) + end + + def configure(*args) + @tree.column_configure(@tree.column_index(@id), *args) + end + + def configinfo(*args) + @tree.column_configinfo(@tree.column_index(@id), *args) + end + + def current_configinfo(*args) + @tree.current_column_configinfo(@tree.column_index(@id), *args) + end + + def delete + @tree.column_delete(@tree.column_index(@id)) + self + end + + def index + @tree.column_index(@id) + end + + def move(before) + @tree.column_move(@tree.column_index(@id), before) + self + end + + def needed_width + @tree.column_needed_width(@tree.column_index(@id)) + end + alias neededwidth needed_width + + def current_width + @tree.column_width(@tree.column_index(@id)) + end +end + +##################### + +class Tk::TreeCtrl::Element < TkObject + TreeCtrlElementID_TBL = TkCore::INTERP.create_table + + (TreeCtrlElementID = ['treectrl_element'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + TreeCtrlElemTypeToClass = {} + + TkCore::INTERP.init_ip_env{ + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.clear + } + } + + def self.type2class(type) + TreeCtrlElemTypeToClass[type] || type + end + + def self.id2obj(tree, id) + tpath = tree.path + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath] + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id]? \ + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id] : id + else + id + end + } + end + + def initialize(parent, type, keys=nil) + @tree = parent + @tpath = parent.path + @type = type.to_s + Tk::TreeCtrl::Element::TreeCtrlElementID.mutex.synchronize{ + @path = @id = + Tk::TreeCtrl::Element::TreeCtrlElementID.join(TkCore::INTERP._ip_id_) + Tk::TreeCtrl::Element::TreeCtrlElementID[1].succ! + } + + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath] ||= {} + Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath][@id] = self + } + + @tree.element_create(@id, @type, keys) + end + + def id + @id + end + + def to_s + @id.dup + end + + def cget(opt) + @tree.element_cget(@id, opt) + end + def cget_strict(opt) + @tree.element_cget_strict(@id, opt) + end + + def configure(*args) + @tree.element_configure(@id, *args) + end + + def configinfo(*args) + @tree.element_configinfo(@id, *args) + end + + def current_configinfo(*args) + @tree.current_element_configinfo(@id, *args) + end + + def delete + @tree.element_delete(@id) + self + end + + def element_type + @tree.element_type(@id) + end + + def element_class + @tree.element_class(@id) + end +end + +class Tk::TreeCtrl::BitmapElement < Tk::TreeCtrl::Element + TreeCtrlElemTypeToClass['bitmap'] = self + + def initialize(parent, keys=nil) + super(parent, 'bitmap', keys) + end +end + +class Tk::TreeCtrl::BorderElement < Tk::TreeCtrl::Element + TreeCtrlElemTypeToClass['border'] = self + + def initialize(parent, keys=nil) + super(parent, 'border', keys) + end +end + +class Tk::TreeCtrl::ImageElement < Tk::TreeCtrl::Element + TreeCtrlElemTypeToClass['image'] = self + + def initialize(parent, keys=nil) + super(parent, 'image', keys) + end +end + +class Tk::TreeCtrl::RectangleElement < Tk::TreeCtrl::Element + TreeCtrlElemTypeToClass['rect'] = self + + def initialize(parent, keys=nil) + super(parent, 'rect', keys) + end +end + +##################### + +class Tk::TreeCtrl::Item < TkObject + TreeCtrlItemID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.clear + } + } + + def self.id2obj(tree, id) + tpath = tree.path + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath] + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id]? \ + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id] : id + else + id + end + } + end + + def initialize(parent, keys={}) + @tree = parent + @tpath = parent.path + @path = @id = @tree.item_create(keys) + + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath] ||= {} + Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath][@id] = self + } + end + + def id + @id + end + + def to_s + @id.to_s.dup + end + + def ancestors + @tree.item_ancestors(@id) + end + + def bbox(*args) + @tree.item_bbox(@id, *args) + end + + def children + @tree.item_children(@id) + end + + def collapse + @tree.item_collapse(@id) + self + end + + def collapse_recurse + @tree.item_collapse_recurse(@id) + self + end + + def complex(*args) + @tree.item_complex(@id, *args) + self + end + + def cget(opt) + @tree.item_cget(@id, opt) + end + def cget_strict(opt) + @tree.item_cget_strict(@id, opt) + end + + def configure(*args) + @tree.item_configure(@id, *args) + end + + def configinfo(*args) + @tree.item_configinfo(@id, *args) + end + + def current_configinfo(*args) + @tree.current_item_configinfo(@id, *args) + end + + def delete + @tree.item_delete(@id) + self + end + + def element_dump + @tree.item_dump(@id) + end + + def element_dump_hash + @tree.item_dump_hash(@id) + end + + def element_actual(column, elem, key) + @tree.item_element_actual(@id, column, elem, key) + end + + def element_cget(opt) + @tree.item_element_cget(@id, opt) + end + def element_cget_strict(opt) + @tree.item_element_cget_strict(@id, opt) + end + + def element_configure(*args) + @tree.item_element_configure(@id, *args) + end + + def element_configinfo(*args) + @tree.item_element_configinfo(@id, *args) + end + + def current_element_configinfo(*args) + @tree.current_item_element_configinfo(@id, *args) + end + + def expand + @tree.item_expand(@id) + self + end + + def expand_recurse + @tree.item_expand_recurse(@id) + self + end + + def firstchild(child=nil) + if child + @tree.item_firstchild(@id, child) + self + else + @tree.item_firstchild(@id) + end + end + alias first_child firstchild + + def hasbutton(st=None) + if st == None + @tree.item_hasbutton(@id) + else + @tree.item_hasbutton(@id, st) + self + end + end + alias has_button hasbutton + + def hasbutton? + @tree.item_hasbutton(@id) + end + alias has_button? hasbutton? + + def index + @tree.item_index(@id) + end + + def isancestor(des) + @tree.item_isancestor(@id, des) + end + alias is_ancestor isancestor + alias isancestor? isancestor + alias is_ancestor? isancestor + alias ancestor? isancestor + + def isopen + @tree.item_isopen(@id) + end + alias is_open isopen + alias isopen? isopen + alias is_open? isopen + alias isopened? isopen + alias is_opened? isopen + alias open? isopen + + def lastchild(child=nil) + if child + @tree.item_lastchild(@id, child) + self + else + @tree.item_lastchild(@id) + end + end + alias last_child lastchild + + def nextsibling(nxt=nil) + if nxt + @tree.item_nextsibling(@id, nxt) + self + else + @tree.item_nextsibling(@id) + end + end + alias next_sibling nextsibling + + def numchildren + @tree.item_numchildren(@id) + end + alias num_children numchildren + alias children_size numchildren + + def parent_index + @tree.item_parent(@id) + end + + def prevsibling(nxt=nil) + if nxt + @tree.item_prevsibling(@id, nxt) + self + else + @tree.item_prevsibling(@id) + end + end + alias prev_sibling prevsibling + + def remove + @tree.item_remove(@id) + end + + def rnc + @tree.item_rnc(@id) + end + + def sort(*opts) + @tree.item_sort(@id, *opts) + end + def sort_not_really(*opts) + @tree.item_sort_not_really(@id, *opts) + self + end + + def state_forcolumn(column, *args) + @tree.item_state_forcolumn(@id, column, *args) + self + end + alias state_for_column state_forcolumn + + def state_get(*args) + @tree.item_state_get(@id, *args) + end + + def state_set(*args) + @tree.item_state_set(@id, *args) + self + end + + def style_elements(column) + @tree.item_style_elements(@id, column) + end + + def style_map(column, style, map) + @tree.item_style_map(@id, column, style, map) + self + end + + def style_set(column=nil, *args) + if args.empty? + @tree.item_style_set(@id, column) + else + @tree.item_style_set(@id, column, *args) + self + end + end + + def item_text(column, txt=nil, *args) + if args.empty? + if txt + @tree.item_text(@id, column, txt) + self + else + @tree.item_text(@id, column) + end + else + @tree.item_text(@id, column, txt, *args) + self + end + end + + def toggle + @tree.item_toggle(@id) + self + end + + def toggle_recurse + @tree.item_toggle_recurse(@id) + self + end + + def visible(st=None) + if st == None + @tree.item_visible(@id) + else + @tree.item_visible(@id, st) + self + end + end +end + +##################### + +class Tk::TreeCtrl::Style < TkObject + TreeCtrlStyleID_TBL = TkCore::INTERP.create_table + + (TreeCtrlStyleID = ['treectrl_style'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.clear + } + } + + def self.id2obj(tree, id) + tpath = tree.path + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ + if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath] + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id]? \ + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id] : id + else + id + end + } + end + + def initialize(parent, keys=nil) + @tree = parent + @tpath = parent.path + + Tk::TreeCtrl::Style::TreeCtrlStyleID.mutex.synchronize{ + @path = @id = + Tk::TreeCtrl::Style::TreeCtrlStyleID.join(TkCore::INTERP._ip_id_) + Tk::TreeCtrl::Style::TreeCtrlStyleID[1].succ! + } + + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath] ||= {} + Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath][@id] = self + } + + @tree.style_create(@id, keys) + end + + def id + @id + end + + def to_s + @id.dup + end + + def cget(opt) + @tree.style_cget(@id, opt) + end + def cget_strict(opt) + @tree.style_cget_strict(@id, opt) + end + + def configure(*args) + @tree.style_configure(@id, *args) + end + + def configinfo(*args) + @tree.style_configinfo(@id, *args) + end + + def current_configinfo(*args) + @tree.current_style_configinfo(@id, *args) + end + + def delete + @tree.style_delete(@id) + self + end + + def elements(*elems) + if elems.empty? + @tree.style_elements(@id) + else + @tree.style_elements(@id, *elems) + self + end + end + + def layout(elem, keys=None) + if keys && keys != None && keys.kind_of?(Hash) + @tree.style_layout(@id, elem, keys) + self + else + @tree.style_layout(@id, elem, keys) + end + end +end + +module Tk::TreeCtrl::BindCallback + include Tk + extend Tk +end + +class << Tk::TreeCtrl::BindCallback + def percentsCmd(*args) + tk_call('::TreeCtrl::PercentsCmd', *args) + end + def cursorCheck(w, x, y) + tk_call('::TreeCtrl::CursorCheck', w, x, y) + end + def cursorCheckAux(w) + tk_call('::TreeCtrl::CursorCheckAux', w) + end + def cursorCancel(w) + tk_call('::TreeCtrl::CursorCancel', w) + end + def buttonPress1(w, x, y) + tk_call('::TreeCtrl::ButtonPress1', w, x, y) + end + def doubleButton1(w, x, y) + tk_call('::TreeCtrl::DoubleButton1', w, x, y) + end + def motion1(w, x, y) + tk_call('::TreeCtrl::Motion1', w, x, y) + end + def leave1(w, x, y) + tk_call('::TreeCtrl::Leave1', w, x, y) + end + def release1(w, x, y) + tk_call('::TreeCtrl::Release1', w, x, y) + end + def beginSelect(w, el) + tk_call('::TreeCtrl::BeginSelect', w, el) + end + def motion(w, le) + tk_call('::TreeCtrl::Motion', w, el) + end + def beginExtend(w, el) + tk_call('::TreeCtrl::BeginExtend', w, el) + end + def beginToggle(w, el) + tk_call('::TreeCtrl::BeginToggle', w, el) + end + def cancelRepeat + tk_call('::TreeCtrl::CancelRepeat') + end + def autoScanCheck(w, x, y) + tk_call('::TreeCtrl::AutoScanCheck', w, x, y) + end + def autoScanCheckAux(w) + tk_call('::TreeCtrl::AutoScanCheckAux', w) + end + def autoScanCancel(w) + tk_call('::TreeCtrl::AutoScanCancel', w) + end + def up_down(w, n) + tk_call('::TreeCtrl::UpDown', w, n) + end + def left_right(w, n) + tk_call('::TreeCtrl::LeftRight', w, n) + end + def setActiveItem(w, idx) + tk_call('::TreeCtrl::SetActiveItem', w, idx) + end + def extendUpDown(w, amount) + tk_call('::TreeCtrl::ExtendUpDown', w, amount) + end + def dataExtend(w, el) + tk_call('::TreeCtrl::DataExtend', w, el) + end + def cancel(w) + tk_call('::TreeCtrl::Cancel', w) + end + def selectAll(w) + tk_call('::TreeCtrl::selectAll', w) + end + def marqueeBegin(w, x, y) + tk_call('::TreeCtrl::MarqueeBegin', w, x, y) + end + def marqueeUpdate(w, x, y) + tk_call('::TreeCtrl::MarqueeUpdate', w, x, y) + end + def marqueeEnd(w, x, y) + tk_call('::TreeCtrl::MarqueeEnd', w, x, y) + end + def scanMark(w, x, y) + tk_call('::TreeCtrl::ScanMark', w, x, y) + end + def scanDrag(w, x, y) + tk_call('::TreeCtrl::ScanDrag', w, x, y) + end + + # filelist-bindings + def fileList_button1(w, x, y) + tk_call('::TreeCtrl::FileListButton1', w, x, y) + end + def fileList_motion1(w, x, y) + tk_call('::TreeCtrl::FileListMotion1', w, x, y) + end + def fileList_motion(w, x, y) + tk_call('::TreeCtrl::FileListMotion', w, x, y) + end + def fileList_leave1(w, x, y) + tk_call('::TreeCtrl::FileListLeave1', w, x, y) + end + def fileList_release1(w, x, y) + tk_call('::TreeCtrl::FileListRelease1', w, x, y) + end + def fileList_edit(w, i, s, e) + tk_call('::TreeCtrl::FileListEdit', w, i, s, e) + end + def fileList_editCancel(w) + tk_call('::TreeCtrl::FileListEditCancel', w) + end + def fileList_autoScanCheck(w, x, y) + tk_call('::TreeCtrl::FileListAutoScanCheck', w, x, y) + end + def fileList_autoScanCheckAux(w) + tk_call('::TreeCtrl::FileListAutoScanCheckAux', w) + end + + def entryOpen(w, item, col, elem) + tk_call('::TreeCtrl::EntryOpen', w, item, col, elem) + end + def entryExpanderOpen(w, item, col, elem) + tk_call('::TreeCtrl::EntryExpanderOpen', w, item, col, elem) + end + def entryClose(w, accept) + tk_call('::TreeCtrl::EntryClose', w, accept) + end + def entryExpanderKeypress(w) + tk_call('::TreeCtrl::EntryExpanderKeypress', w) + end + def textOpen(w, item, col, elem, width=0, height=0) + tk_call('::TreeCtrl::TextOpen', w, item, col, elem, width, height) + end + def textExpanderOpen(w, item, col, elem, width) + tk_call('::TreeCtrl::TextOpen', w, item, col, elem, width) + end + def textClose(w, accept) + tk_call('::TreeCtrl::TextClose', w, accept) + end + def textExpanderKeypress(w) + tk_call('::TreeCtrl::TextExpanderKeypress', w) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs.rb new file mode 100644 index 0000000..5914e51 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs.rb @@ -0,0 +1,13 @@ +# +# trofs support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/trofs/setup.rb' + +# load library +require 'tkextlib/trofs/trofs.rb' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/trofs.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/trofs.rb new file mode 100644 index 0000000..7a2606a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/trofs/trofs.rb @@ -0,0 +1,51 @@ +# +# tkextlib/trofs/trofs.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/trofs/setup.rb' + +# TkPackage.require('trofs', '0.4') +TkPackage.require('trofs') + +module Tk + module Trofs + extend TkCore + + PACKAGE_NAME = 'trofs'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('trofs') + rescue + '' + end + end + + ############################################## + + def self.create_archive(dir, archive) + tk_call('::trofs::archive', dir, archive) + archive + end + + def self.mount(archive, mountpoint=None) + # returns the normalized path to mountpoint + tk_call('::trofs::mount', archive, mountpoint) + end + + def self.umount(mountpoint) + tk_call('::trofs::umount', mountpoint) + mountpoint + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/version.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/version.rb new file mode 100644 index 0000000..82ed7ef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/version.rb @@ -0,0 +1,6 @@ +# +# release date of tkextlib +# +module Tk + Tkextlib_RELEASE_DATE = '2008-11-25'.freeze +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu.rb new file mode 100644 index 0000000..d2234eb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu.rb @@ -0,0 +1,48 @@ +# +# The vu widget set support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/vu/setup.rb' + +# load package +# TkPackage.require('vu', '2.1') +TkPackage.require('vu') + +# autoload +module Tk + module Vu + TkComm::TkExtlibAutoloadModule.unshift(self) + + PACKAGE_NAME = 'vu'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('vu') + rescue + '' + end + end + + ########################################## + + autoload :Dial, 'tkextlib/vu/dial' + + autoload :Pie, 'tkextlib/vu/pie' + autoload :PieSlice, 'tkextlib/vu/pie' + autoload :NamedPieSlice, 'tkextlib/vu/pie' + + autoload :Spinbox, 'tkextlib/vu/spinbox' + + autoload :Bargraph, 'tkextlib/vu/bargraph' + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/bargraph.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/bargraph.rb new file mode 100644 index 0000000..27ff3c7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/bargraph.rb @@ -0,0 +1,61 @@ +# +# ::vu::bargraph widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# create module/class +module Tk + module Vu + class Bargraph < TkWindow + end + end +end + + +# call setup script -- /tkextlib/vu.rb +require 'tkextlib/vu.rb' + +class Tk::Vu::Bargraph < TkWindow + TkCommandNames = ['::vu::bargraph'.freeze].freeze + WidgetClassName = 'Bargraph'.freeze + WidgetClassNames[WidgetClassName] = self + + ############################### + + def __boolval_optkeys + ['showminmax', 'showvalue'] + end + private :__boolval_optkeys + + def __strval_optkeys + super() + [ + 'title', + 'barbackground', 'barcolor', 'barcolour', + 'tickcolor', 'tickcolour', + 'textcolor', 'textcolour', + ] + end + private :__strval_optkeys + + def __listval_optkeys + ['alabels', 'blabels'] + end + private :__listval_optkeys + + def __font_optkeys + ['alabfont', 'blabfont'] + end + private :__font_optkeys + + ############################### + + def set(val = None) + tk_call_without_enc(@path, 'set', val) + self + end + + def get() + num_or_str(tk_call_without_enc(@path, 'get')) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/charts.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/charts.rb new file mode 100644 index 0000000..ee4298f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/charts.rb @@ -0,0 +1,53 @@ +# +# charts -- Create and manipulate canvas Add-On Items +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tk/canvas' + +# call setup script -- /tkextlib/vu.rb +require 'tkextlib/vu.rb' + +module Tk + module Vu + module ChartsConfig + include TkItemConfigOptkeys + def __item_boolval_optkeys(id) + super(id) << 'lefttrunc' << 'autocolor' + end + private :__item_boolval_optkeys + + def __item_strval_optkeys(id) + super(id) << 'bar' << 'color' << 'outline' << + 'fill' << 'scaleline' << 'stripline' + end + private :__item_strval_optkeys + + def __item_listval_optkeys(id) + super(id) << 'values' << 'tags' + end + private :__item_listval_optkeys + end + + class TkcSticker < TkcItem + include ChartsConfig + + CItemTypeName = 'sticker'.freeze + CItemTypeToClass[CItemTypeName] = self + end + + class TkcStripchart < TkcItem + include ChartsConfig + + CItemTypeName = 'stripchart'.freeze + CItemTypeToClass[CItemTypeName] = self + end + + class TkcBarchart < TkcItem + include ChartsConfig + + CItemTypeName = 'barchart'.freeze + CItemTypeToClass[CItemTypeName] = self + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/dial.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/dial.rb new file mode 100644 index 0000000..e27a38a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/dial.rb @@ -0,0 +1,102 @@ +# +# ::vu::dial widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# create module/class +module Tk + module Vu + class Dial < TkWindow + end + end +end + +# call setup script -- /tkextlib/vu.rb +require 'tkextlib/vu.rb' + +# define module/class +class Tk::Vu::Dial < TkWindow + TkCommandNames = ['::vu::dial'.freeze].freeze + WidgetClassName = 'Dial'.freeze + WidgetClassNames[WidgetClassName] = self + + ############################### + + def __methodcall_optkeys # { key=>method, ... } + {'coords'=>'coords'} + end + private :__methodcall_optkeys + + ############################### + + def coords(val = nil) + if val + tk_split_list(tk_send_without_enc('coords')) + else + tk_send_without_enc('coords', val) + self + end + end + + def constrain(val = None) + num_or_str(tk_call(@path, 'constrain', val)) + end + + def get(*args) + num_or_str(tk_call(@path, 'get', *args)) + end + + def identify(x, y) + tk_call(@path, 'identify', x, y) + end + + def get_label(val=nil) + if val + tk_call(@path, 'label', val) + else + ret = [] + lst = simplelist(tk_call(@path, 'label')) + while lst.size > 0 + ret << ([num_or_str(lst.shift)] << lst.shift) + end + end + end + + def set_label(val, str, *args) + tk_call(@path, 'label', val, str, *args) + self + end + + def set_label_constrain(val, str, *args) + tk_call(@path, 'label', '-constrain', val, str, *args) + self + end + + def get_tag(val=nil) + if val + tk_call(@path, 'tag', val) + else + ret = [] + lst = simplelist(tk_call(@path, 'tag')) + while lst.size > 0 + ret << ([num_or_str(lst.shift)] << lst.shift) + end + end + end + + def set_tag(val, str, *args) + tk_call(@path, 'tag', val, str, *args) + self + end + + def set_tag_constrain(val, str, *args) + tk_call(@path, 'tag', '-constrain', val, str, *args) + self + end + + def set(val = None) + tk_call_without_enc(@path, 'set', val) + self + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/pie.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/pie.rb new file mode 100644 index 0000000..c1fb685 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/pie.rb @@ -0,0 +1,282 @@ +# +# ::vu::pie widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# create module/class +module Tk + module Vu + module PieSliceConfigMethod + end + class Pie < TkWindow + end + class PieSlice < TkObject + end + class NamedPieSlice < PieSlice + end + end +end + +# call setup script -- /tkextlib/vu.rb +require 'tkextlib/vu.rb' + +module Tk::Vu::PieSliceConfigMethod + include TkItemConfigMethod + + def __item_pathname(tagOrId) + if tagOrId.kind_of?(Tk::Vu::PieSlice) + self.path + ';' + tagOrId.id.to_s + else + self.path + ';' + tagOrId.to_s + end + end + private :__item_pathname +end + +class Tk::Vu::Pie < TkWindow + TkCommandNames = ['::vu::pie'.freeze].freeze + WidgetClassName = 'Pie'.freeze + WidgetClassNames[WidgetClassName] = self + + def __destroy_hook__ + Tk::Vu::PieSlice::SliceID_TBL.delete(@path) + end + + ############################### + + include Tk::Vu::PieSliceConfigMethod + + def tagid(tag) + if tag.kind_of?(Tk::Vu::PieSlice) + tag.id + else + # tag + _get_eval_string(tag) + end + end + + ############################### + + def delete(*glob_pats) + tk_call(@path, 'delete', *glob_pats) + self + end + + def explode(slice, *args) + tk_call(@path, 'explode', slice, *args) + self + end + + def explode_value(slice) + num_or_str(tk_call(@path, 'explode', slice)) + end + + def lower(slice, below=None) + tk_call(@path, 'lower', slice, below) + self + end + + def names(*glob_pats) + simplelist(tk_call(@path, 'names', *glob_pats)) + end + alias slices names + + def order(*args) + tk_call(@path, 'order', *args) + self + end + + def raise(slice, above=None) + tk_call(@path, 'raise', slice, above) + self + end + + def swap(slice1, slice2) + tk_call(@path, 'swap', slice1, slice2) + self + end + + def set(slice, *args) + num_or_str(tk_call(@path, 'set', slice, *args)) + end + alias set_value set + alias set_values set + alias create set + + def slice_value(slice) + num_or_str(tk_call(@path, 'set', slice)) + end + + def value(val = None) + num_or_str(tk_call_without_enc(@path, 'value')) + end + alias sum_value value +end + +class Tk::Vu::PieSlice + SliceID_TBL = TkCore::INTERP.create_table + + (Pie_Slice_ID = ['vu:pie'.freeze, '00000'.taint]).instance_eval{ + @mutex = Mutex.new + def mutex; @mutex; end + freeze + } + + TkCore::INTERP.init_ip_env{ + SliceID_TBL.mutex.synchronize{ SliceID_TBL.clear } + } + + def self.id2obj(pie, id) + pie_path = pie.path + SliceID_TBL.mutex.synchronize{ + if SliceID_TBL[pie_path] + SliceID_TBL[pie_path][id]? SliceID_TBL[pie_path][id]: id + else + id + end + } + end + + def initialize(parent, *args) + unless parent.kind_of?(Tk::Vu::Pie) + fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument" + end + @parent = @pie = parent + @ppath = parent.path + Pie_Slice_ID.mutex.synchronize{ + @path = @id = Pie_Slice_ID.join(TkCore::INTERP._ip_id_) + Pie_Slice_ID[1].succ! + } + SliceID_TBL.mutex.synchronize{ + SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath] + SliceID_TBL[@ppath][@id] = self + } + + if args[-1].kind_of?(Hash) + keys = args.unshift + end + @pie.set(@id, *args) + configure(keys) + end + + def id + @id + end + + def [](key) + cget key + end + + def []=(key,val) + configure key, val + val + end + + def cget(slot) + @pie.itemcget(@id, slot) + end + + def cget_strict(slot) + @pie.itemcget_strict(@id, slot) + end + + def configure(*args) + @pie.itemconfigure(@id, *args) + self + end + + def configinfo(*args) + @pie.itemconfiginfo(@id, *args) + end + + def current_configinfo(*args) + @pie.current_itemconfiginfo(@id, *args) + end + + def delete + @pie.delete(@id) + end + + def explode(value) + @pie.explode(@id, value) + self + end + + def explode_value + @pie.explode_value(@id) + end + + def lower(other=None) + @pie.lower(@id, other) + self + end + + def raise(other=None) + @pie.raise(@id, other) + self + end + + def set(value) + @pie.set(@id, value) + self + end + alias set_value set + + def value + @pie.set(@id) + end +end + +class Tk::Vu::NamedPieSlice + def self.new(parent, name, *args) + obj = nil + SliceID_TBL.mutex.synchronize{ + if SliceID_TBL[parent.path] && SliceID_TBL[parent.path][name] + obj = SliceID_TBL[parent.path][name] + else + #super(parent, name, *args) + unless parent.kind_of?(Tk::Vu::Pie) + fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument" + end + obj = self.allocate + obj.instance_eval{ + @parent = @pie = parent + @ppath = parent.path + @path = @id = name.to_s + SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath] + SliceID_TBL[@ppath][@id] = self + } + end + } + obj.instance_eval{ + if args[-1].kind_of?(Hash) + keys = args.unshift + end + @pie.set(@id, *args) + configure(keys) + } + + obj + end + + def initialize(parent, name, *args) + # dummy:: not called by 'new' method + unless parent.kind_of?(Tk::Vu::Pie) + fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument" + end + @parent = @pie = parent + @ppath = parent.path + @path = @id = name.to_s + SliceID_TBL.mutex.synchronize{ + SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath] + SliceID_TBL[@ppath][@id] = self + } + + if args[-1].kind_of?(Hash) + keys = args.unshift + end + @pie.set(@id, *args) + configure(keys) + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/spinbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/spinbox.rb new file mode 100644 index 0000000..a7e40ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/vu/spinbox.rb @@ -0,0 +1,22 @@ +# +# ::vu::spinbox widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# a standard spinbox (<= 8.3) +# This is the same as the 8.4 core spinbox widget. +# +require 'tk' + +if (Tk::TK_MAJOR_VERSION < 8 || + (Tk::TK_MAJOR_VERSION == 8 && Tk::TK_MINOR_VERSION < 4)) + # call setup script -- /tkextlib/vu.rb + require 'tkextlib/vu.rb' + + Tk.tk_call('namespace', 'import', '::vu::spinbox') +end + +module Tk + module Vu + Spinbox = Tk::Spinbox + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico.rb new file mode 100644 index 0000000..ce7b8ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico.rb @@ -0,0 +1,14 @@ +# +# winico -- Windows Icon extension support +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/tktable/setup.rb' + +# load library +require 'tkextlib/winico/winico' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/setup.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/setup.rb new file mode 100644 index 0000000..ce0f0bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/setup.rb @@ -0,0 +1,8 @@ +# +# setup.rb -- setup script before calling TkPackage.require() +# +# If you need some setup operations (for example, add a library path +# to the library search path) before using Tcl/Tk library packages +# wrapped by Ruby scripts in this directory, please write the setup +# operations in this file. +# diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/winico.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/winico.rb new file mode 100644 index 0000000..00316fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkextlib/winico/winico.rb @@ -0,0 +1,224 @@ +# +# tkextlib/winico/winico.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' + +# call setup script for general 'tkextlib' libraries +require 'tkextlib/setup.rb' + +# call setup script +require 'tkextlib/winico/setup.rb' + +# TkPackage.require('winico', '0.5') +# TkPackage.require('winico', '0.6') +TkPackage.require('winico') + +module Tk + class Winico < TkObject + PACKAGE_NAME = 'winico'.freeze + def self.package_name + PACKAGE_NAME + end + + def self.package_version + begin + TkPackage.require('winico') + rescue + '' + end + end + end +end + +class Tk::Winico + WinicoID_TBL = TkCore::INTERP.create_table + + TkCore::INTERP.init_ip_env{ + WinicoID_TBL.mutex.synchronize{ WinicoID_TBL.clear } + } + + def self.id2obj(id) + WinicoID_TBL.mutex.synchronize{ + (WinicoID_TBL.key?(id))? WinicoID_TBL[id] : id + } + end + + def self.info + simplelist(Tk.tk_call('winico', 'info')).collect{|id| + Tk::Winico.id2obj(id) + } + end + + def self.icon_info(id) + simplelist(Tk.tk_call('winico', 'info', id)).collect{|inf| + h = Hash[*list(inf)] + h.keys.each{|k| h[k[1..-1]] = h.delete(k)} + } + end + + ################################# + + def self.new_from_file(file_name) + self.new(file_name) + end + + def self.new_from_resource(resource_name, file_name = nil) + self.new(file_name, resource_name) + end + + def initialize(file_name, resource_name=nil, winico_id=nil) + if resource_name + # from resource + if file_name + @id = Tk.tk_call('winico', 'load', resource_name, file_name) + else + @id = Tk.tk_call('winico', 'load', resource_name) + end + elsif file_name + # from .ico file + @id = Tk.tk_call('winico', 'createfrom', file_name) + elsif winico_id + @id = winico_id + else + fail ArgumentError, + "must be given proper information from where loading icons" + end + @path = @id + WinicoID_TBL.mutex.synchronize{ + WinicoID_TBL[@id] = self + } + end + + def id + @id + end + + def set_window(win_id, *opts) # opts := ?'big'|'small'?, ?pos? + # NOTE:: the window, which is denoted by win_id, MUST BE MAPPED. + # If not, then this may fail or crash. + tk_call('winico', 'setwindow', win_id, @id, *opts) + end + + def delete + tk_call('winico', 'delete', @id) + WinicoID_TBL.mutex.synchronize{ + WinicoID_TBL.delete(@id) + } + self + end + alias destroy delete + + def info + Tk::Winico.icon_info(@id) + end + + ################################# + + class Winico_callback < TkValidateCommand + class ValidateArgs < TkUtil::CallbackSubst + KEY_TBL = [ + [ ?m, ?s, :message ], + [ ?i, ?x, :icon ], + [ ?x, ?n, :x ], + [ ?y, ?n, :y ], + [ ?X, ?n, :last_x ], + [ ?Y, ?n, :last_y ], + [ ?t, ?n, :tickcount ], + [ ?w, ?n, :icon_idnum ], + [ ?l, ?n, :msg_idnum ], + nil + ] + + PROC_TBL = [ + [ ?n, TkComm.method(:number) ], + [ ?s, TkComm.method(:string) ], + [ ?x, proc{|id| + Tk::Winico::WinicoID_TBL.mutex.synchronize{ + if Tk::Winico::WinicoID_TBL.key?(id) + obj = Tk::Winico::WinicoID_TBL[id] + else + # Tk::Winico.new(nil, nil, id) + obj = Tk::Winico.allocate + obj.instance_eval{ @path = @id = id } + Tk::Winico::WinicoID_TBL[id] = obj + end + obj + } + } ], + nil + ] + +=begin + # for Ruby m17n :: ?x --> String --> char-code ( getbyte(0) ) + KEY_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + inf[1] = inf[1].getbyte(0) if inf[1].kind_of?(String) + end + inf + } + + PROC_TBL.map!{|inf| + if inf.kind_of?(Array) + inf[0] = inf[0].getbyte(0) if inf[0].kind_of?(String) + end + inf + } +=end + + _setup_subst_table(KEY_TBL, PROC_TBL); + + def self.ret_val(val) + val + end + end + + def self._config_keys + ['callback'] + end + end + + ################################# + + def add_to_taskbar(keys = {}) + keys = _symbolkey2str(keys) + Winico_callback._config_keys.each{|k| + if keys[k].kind_of?(Array) + cmd, *args = keys[k] + #keys[k] = Winico_callback.new(cmd, args.join(' ')) + keys[k] = Winico_callback.new(cmd, *args) + # elsif keys[k].kind_of?(Proc) + elsif TkComm._callback_entry?(keys[k]) + keys[k] = Winico_callback.new(keys[k]) + end + } + tk_call('winico', 'taskbar', 'add', @id, *(hash_kv(keys))) + self + end + alias taskbar_add add_to_taskbar + + def modify_taskbar(keys = {}) + keys = _symbolkey2str(keys) + Winico_callback._config_keys.each{|k| + if keys[k].kind_of?(Array) + cmd, *args = keys[k] + #keys[k] = Winico_callback.new(cmd, args.join(' ')) + keys[k] = Winico_callback.new(cmd, *args) + # elsif keys[k].kind_of?(Proc) + elsif TkComm._callback_entry?(keys[k]) + keys[k] = Winico_callback.new(keys[k]) + end + } + tk_call('winico', 'taskbar', 'modify', @id, *(hash_kv(keys))) + self + end + alias taskbar_modify modify_taskbar + + def delete_from_taskbar + tk_call('winico', 'taskbar', 'delete', @id) + self + end + alias taskbar_delete delete_from_taskbar +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkfont.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkfont.rb new file mode 100644 index 0000000..38a9663 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkfont.rb @@ -0,0 +1,4 @@ +# +# tkfont.rb - load tk/font.rb +# +require 'tk/font' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmacpkg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmacpkg.rb new file mode 100644 index 0000000..35560e7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmacpkg.rb @@ -0,0 +1,4 @@ +# +# tkmacpkg.rb - load tk/macpkg.rb +# +require 'tk/macpkg' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmenubar.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmenubar.rb new file mode 100644 index 0000000..70214fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmenubar.rb @@ -0,0 +1,4 @@ +# +# tkmenubar.rb - load tk/menubar.rb +# +require 'tk/menubar' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmngfocus.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmngfocus.rb new file mode 100644 index 0000000..fe70950 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkmngfocus.rb @@ -0,0 +1,4 @@ +# +# tkmngfocus.rb - load tk/mngfocus.rb +# +require 'tk/mngfocus' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkpalette.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkpalette.rb new file mode 100644 index 0000000..56b203b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkpalette.rb @@ -0,0 +1,4 @@ +# +# tkpalette.rb - load tk/palette.rb +# +require 'tk/palette' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkscrollbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkscrollbox.rb new file mode 100644 index 0000000..6093b2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkscrollbox.rb @@ -0,0 +1,4 @@ +# +# tkscrollbox.rb - load tk/scrollbox.rb +# +require 'tk/scrollbox' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tktext.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tktext.rb new file mode 100644 index 0000000..97ad62a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tktext.rb @@ -0,0 +1,4 @@ +# +# tktext.rb - load tk/text.rb +# +require 'tk/text' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkvirtevent.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkvirtevent.rb new file mode 100644 index 0000000..f4fae19 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkvirtevent.rb @@ -0,0 +1,4 @@ +# +# tkvirtevent.rb - load tk/virtevent.rb +# +require 'tk/virtevent' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/lib/tkwinpkg.rb b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkwinpkg.rb new file mode 100644 index 0000000..83371c5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/lib/tkwinpkg.rb @@ -0,0 +1,4 @@ +# +# tkwinpkg.rb - load tk/winpkg.rb +# +require 'tk/winpkg' diff --git a/lib/ruby-1.9.1-rc1/ext/tk/old-README.tcltklib.eucj b/lib/ruby-1.9.1-rc1/ext/tk/old-README.tcltklib.eucj new file mode 100644 index 0000000..fd75202 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/old-README.tcltklib.eucj @@ -0,0 +1,159 @@ +(tof) + 2003/06/19 Hidetoshi NAGAI + +Ëܥɥ­¥å¥á¥ó¥È¤Ë¤Ï¸Å¤¤ tcltk ¥é¥¤¥Ö¥é¥ê¡¤tcltklib ¥é¥¤¥Ö¥é¥ê¤ÎÀâÌÀ +¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¤¤½¤Îµ­½ÒÆâÍƤϸŤ¤¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ + +¤Þ¤º¡¤¸½ºß¤Î Ruby/Tk ¤ÎÃæ¿´¤Ç¤¢¤ë tk.rb ¤Ï wish ¤ò¸Æ¤Ó½Ð¤·¤¿¤ê¤Ï¤» +¤º¡¤tcltklib ¥é¥¤¥Ö¥é¥ê¤ò wrap ¤·¤ÆÆ°ºî¤¹¤ë¤â¤Î¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥¤½¤Î +¤¿¤á¡¤¸Å¤¤ÀâÌÀµ­½Ò¤Ç½Ò¤Ù¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¥×¥í¥»¥¹´ÖÄÌ¿®¤Ë¤è¤ë¥ª¡¼¥Ð +¥Ø¥Ã¥É¤Ï¸ºß¤·¤Þ¤»¤ó¡¥ + +¸½ºß¤Î tcltklib ¥é¥¤¥Ö¥é¥ê¤Ç¤â¡¤Tcl/Tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤ò¥ê¥ó¥¯¤·¤Æ +ľÀܤËÆ°¤«¤¹¤³¤È¤Ç¡¤¥ª¡¼¥Ð¥Ø¥Ã¥É¤ò²¡¤µ¤¨¤Ä¤Ä Tcl/Tk ¥¤¥ó¥¿¡¼¥×¥ê¥¿ +¤Î¤Û¤ÜÁ´µ¡Ç½¡Ê³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ò´Þ¤à¡Ë¤ò»È¤¨¤ëÅÀ¤ÏƱ¤¸¤Ç¤¹¡¥¤·¤«¤·¡¤ +¤½¤ÎÌò³ä¤Ï¤Û¤Ü¡Ötk.rb °Ê²¼¤Î¥é¥¤¥Ö¥é¥ê¤ò¸ú²ÌŪ¤ËƯ¤«¤»¤ë¤¿¤á¤Î¤â¤Î¡× +¤È¸«¤Ê¤µ¤ì¤Æ¤ª¤ê¡¤¤½¤ÎÌÜŪ¤Ç¥á¥ó¥Æ¥Ê¥ó¥¹¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ + +tk.rb ¤Î¹âµ¡Ç½²½¤Ëȼ¤Ã¤Æ¡¤Ãæ¿å½à¤Î¥é¥¤¥Ö¥é¥ê¤Ç¤¢¤ë tcltk ¥é¥¤¥Ö¥é¥ê +¡Êtcltk.rb¡Ë¤Ï¤½¤Î¸ºß°ÕµÁ¤ò¸º¤¸¤Æ¤ª¤ê¡¤¸½ºß¤Ç¤Ï¥á¥ó¥Æ¥Ê¥ó¥¹¤Ï¹Ô¤ï +¤ì¤Æ¤¤¤Þ¤»¤ó¡¥ + +¤Ê¤ª¡¤¸Å¤¤ÀâÌÀ¤Ç¤Ï¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ë¤ª¤±¤ë¥¹¥¯¥ê¥×¥È¤ÎÄɲäϤǤ­¤Ê¤¤¤³ +¤È¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¤¸½ºß¤Î tk.rb ¤Ç¤Ï¤³¤ì¤â²Äǽ¤Ç¤¢¤ë¤³¤È¤òÊä­¤·¤Æ +¤ª¤­¤Þ¤¹¡¥ + +°Ê²¼¤¬¥é¥¤¥Ö¥é¥ê¤Î¸Å¤¤ÀâÌÀʸ½ñ¤Ç¤¹¡¥ +============================================================== + tcltk ¥é¥¤¥Ö¥é¥ê + tcltklib ¥é¥¤¥Ö¥é¥ê + Sep. 19, 1997 Y. Shigehiro + +°Ê²¼, ¡Ötcl/tk¡×¤È¤¤¤¦É½µ­¤Ï, tclsh ¤ä wish ¤ò¼Â¸½¤·¤Æ¤¤¤ë, °ìÈ̤Ǥ¤¤¦ +¤È¤³¤í¤Î tcl/tk ¤ò»Ø¤·¤Þ¤¹. ¡Ötcltk ¥é¥¤¥Ö¥é¥ê¡×, ¡Ötcltklib ¥é¥¤¥Ö¥é +¥ê¡×¤È¤¤¤¦É½µ­¤Ï, Ëܥѥ屡¼¥¸¤Ë´Þ¤Þ¤ì¤ë ruby ÍѤΥ饤¥Ö¥é¥ê¤ò»Ø¤·¤Þ¤¹. + +[¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ] + +README.euc : ¤³¤Î¥Õ¥¡¥¤¥ë(Ãí°Õ, ÆÃħ, ¥¤¥ó¥¹¥È¡¼¥ë¤ÎÊýË¡). +MANUAL.euc : ¥Þ¥Ë¥å¥¢¥ë. + +lib/, ext/ : ¥é¥¤¥Ö¥é¥ê¤Î¼ÂÂÎ. + +sample/ : ¥Þ¥Ë¥å¥¢¥ëÂå¤ï¤ê¤Î¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à. +sample/sample0.rb : tcltklib ¥é¥¤¥Ö¥é¥ê¤Î¥Æ¥¹¥È. +sample/sample1.rb : tcltk ¥é¥¤¥Ö¥é¥ê¤Î¥Æ¥¹¥È. + tcl/tk (wish) ¤Ç¤Ç¤­¤½¤¦¤Ê¤³¤È¤ò°ìÄ̤ê½ñ¤¤¤Æ¤ß¤Þ¤·¤¿. +sample/sample2.rb : tcltk ¥é¥¤¥Ö¥é¥ê¤Î¥µ¥ó¥×¥ë. + maeda shugo (shugo@po.aianet.ne.jp) »á¤Ë¤è¤ë + (`rb.tk' ¤Ç½ñ¤«¤ì¤Æ¤¤¤¿) ruby ¤Î¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à + http://www.aianet.or.jp/~shugo/ruby/othello.rb.gz + ¤ò tcltk ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¤è¤¦¤Ë, µ¡³£Åª¤ËÊѹ¹¤·¤Æ¤ß¤Þ¤·¤¿. + +demo/ : 100 ËܤÎÀþ¤ò 100 ²óÉÁ¤¯¥Ç¥â¥×¥í¥°¥é¥à. + ºÇ½é¤Ë¶õ¥ë¡¼¥×¤Î»þ´Ö¤ò¬Äꤷ, ³¤¤¤Æ¼ÂºÝ¤ËÀþ¤ò°ú¤¯»þ´Ö¤ò¬Äꤷ¤Þ¤¹. + tcl/tk ¤Ï(ºÆ)ÉÁ²è¤Î¤È¤­¤Ë backing store ¤ò»È¤ï¤º¤ËΧµÁ¤Ë 10000 ËÜ(?) + Àþ¤ò°ú¤¯¤Î¤Ç, (ºÆ)ÉÁ²è¤ò»Ï¤á¤ë¤È, ¥Þ¥·¥ó¤¬¤«¤Ê¤ê½Å¤¯¤Ê¤ê¤Þ¤¹. +demo/lines0.tcl : wish ÍѤΥ¹¥¯¥ê¥×¥È. +demo/lines1.rb : `tk.rb' ÍѤΥ¹¥¯¥ê¥×¥È. +demo/lines2.rb : tcltk ¥é¥¤¥Ö¥é¥êÍѤΥ¹¥¯¥ê¥×¥È. + +[Ãí°Õ] + +¥³¥ó¥Ñ¥¤¥ë/¼Â¹Ô¤Ë¤Ï, tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤¬É¬ÍפǤ¹. + +¤³¤Î¥é¥¤¥Ö¥é¥ê¤Ï, + + ruby-1.0-970701, ruby-1.0-970911, ruby-1.0-970919 + FreeBSD 2.2.2-RELEASE + ¤ª¤è¤Ó¤½¤Î¥Ñ¥Ã¥±¡¼¥¸ jp-tcl-7.6.tgz, jp-tk-4.2.tgz + +¤ÇºîÀ®/Æ°ºî³Îǧ¤·¤Þ¤·¤¿. ¾¤Î´Ä¶­¤Ç¤ÏÆ°ºî¤¹¤ë¤«¤É¤¦¤«¤ï¤«¤ê¤Þ¤»¤ó. + +TclTkLib.mainloop ¤ò¼Â¹ÔÃæ¤Ë Control-C ¤¬¸ú¤«¤Ê¤¤¤Î¤ÏÉÔÊؤʤΤÇ, ruby +¤Î¥½¡¼¥¹¤ò»²¹Í¤Ë, #include "sig.h" ¤·¤Æ trap_immediate ¤òÁàºî¤·¤Æ¤¤¤Þ +¤¹¤¬, ruby ¤Î README.EXT ¤Ë¤â½ñ¤¤¤Æ¤Ê¤¤¤Î¤Ë, ¤³¤ó¤Ê¤³¤È¤ò¤·¤ÆÎɤ¤¤Î¤« +¤É¤¦¤«¤ï¤«¤ê¤Þ¤»¤ó. + +-d ¥ª¥×¥·¥ç¥ó¤Ç¥Ç¥Ð¥Ã¥°¾ðÊó¤òɽ¼¨¤µ¤»¤ë¤¿¤á¤Ë, ruby ¤Î¥½¡¼¥¹¤ò»²¹Í¤Ë, +debug ¤È¤¤¤¦Âç°èÊÑ¿ô¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¤¬, ruby ¤Î README.EXT ¤Ë¤â½ñ¤¤¤Æ +¤Ê¤¤¤Î¤Ë, ¤³¤ó¤Ê¤³¤È¤ò¤·¤ÆÎɤ¤¤Î¤«¤É¤¦¤«¤ï¤«¤ê¤Þ¤»¤ó. + +extconf.rb ¤Ï½ñ¤­¤Þ¤·¤¿¤¬, (¤¤¤í¤¤¤í¤Ê°ÕÌ£¤Ç)¤³¤ì¤ÇÎɤ¤¤Î¤«Îɤ¯Ê¬¤«¤ê +¤Þ¤»¤ó. + +[ÆÃħ] + +ruby ¤«¤é tcl/tk ¥é¥¤¥Ö¥é¥ê¤òÍøÍѤǤ­¤Þ¤¹. + +tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤Î¥¹¥¯¥ê¥×¥È¤Ï, µ¡³£Åª¤Ë tcltk ¥é¥¤¥Ö¥é¥êÍѤΠruby +¥¹¥¯¥ê¥×¥È¤ËÊÑ´¹¤Ç¤­¤Þ¤¹. + +(`tk.rb' ¤È¤Î°ã¤¤) + +1. tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤Î¥¹¥¯¥ê¥×¥È¤¬, ¤É¤Î¤è¤¦¤Ë, tcltk ¥é¥¤¥Ö¥é¥êÍѤΠ+ ruby ¥¹¥¯¥ê¥×¥È¤ËÊÑ´¹¤µ¤ì¤ë¤«¤¬Íý²ò¤Ç¤­¤ì¤Ð, ¥Þ¥Ë¥å¥¢¥ëÎब̵¤¤¤ËÅù + ¤·¤¤ `tk.rb' ¤È¤Ï°Û¤Ê¤ê + + tcl/tk ¤Î¥Þ¥Ë¥å¥¢¥ë¤ä¥ª¥ó¥é¥¤¥ó¥É¥­¥å¥á¥ó¥È¤òÍѤ¤¤Æ + + ¸úΨÎɤ¯¥×¥í¥°¥é¥ß¥ó¥°¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹. + µ­½ÒÊýË¡¤¬¤ï¤«¤é¤Ê¤¤, ¥³¥Þ¥ó¥É¤ËÍ¿¤¨¤ë¥Ñ¥é¥á¡¼¥¿¤¬¤ï¤«¤é¤Ê¤¤... + - Canvas.new { ... } ¤È, ¤Ê¤¼¥¤¥Æ¥ì¡¼¥¿¥Ö¥í¥Ã¥¯¤ò½ñ¤±¤ë¤Î?? + - Canvas ¤Î bbox ¤Ï¿ôÃͤΥꥹ¥È¤òÊÖ¤¹¤Î¤Ë, xview ¤Ïʸ»úÎó¤òÊÖ¤¹¤Î?? + ¤È, ¤¤¤Á¤¤¤Á, ¥é¥¤¥Ö¥é¥ê¤Î¥½¡¼¥¹¤òÄɤ¤¤«¤±¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó. + +2. ¸Ä¡¹¤Îµ¡Ç½(¥ª¥×¥·¥ç¥ó)¤ò¸ÄÊ̽èÍý¤Ë¤è¤ê¥µ¥Ý¡¼¥È¤·¤Æ¤ª¤ê, ¤½¤Î¤¿¤á¥µ + ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤µ¡Ç½¤Ï»È¤¦¤³¤È¤¬¤Ç¤­¤Ê¤¤(ËÜÅö¤Ï»È¤¨¤Ê¤¤¤³¤È¤â¤Ê¤¤¤Î + ¤Ç¤¹¤¬) `tk.rb' ¤È¤Ï°Û¤Ê¤ê, tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤Ç²Äǽ¤Ê¤³¤È¤Ï + + ¤Û¤È¤ó¤É + + ruby ¤«¤é¤â¼Â¹Ô¤Ç¤­¤Þ¤¹. ¸½ºß, ruby ¤«¤é¼Â¹Ô¤Ç¤­¤Ê¤¤¤³¤È¤¬³Îǧ¤µ¤ì + ¤Æ¤¤¤ë¤Î¤Ï, + + bind ¥³¥Þ¥ó¥É¤Ç¥¹¥¯¥ê¥×¥È¤òÄɲ乤빽ʸ + ¡Öbind tag sequence +script¡× + ^ + + ¤Î¤ß¤Ç¤¹. + - `. configure -width' ¤ò¤·¤è¤¦¤È¤·¤Æ, `Tk.root.height()' ¤È½ñ¤¤ + ¤¿¤Î¤Ë, `undefined method `height'' ¤ÈÅܤé¤ì¤Æ¤·¤Þ¤Ã¤¿. tk.rb ¤ò + Æɤó¤Ç¤ß¤Æ, ¥¬¡¼¥ó. ¤Ç¤­¤Ê¤¤¤Î¤«... + ¤È¤¤¤¦¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó. + +3. wish ¥×¥í¥»¥¹¤òµ¯Æ°¤·¥×¥í¥»¥¹´ÖÄÌ¿®¤Ç wish ¤òÍøÍѤ¹¤ë `tk.rb' ¤È¤Ï + °Û¤Ê¤ê, tcl/tk ¤Î C ¥é¥¤¥Ö¥é¥ê¤ò¥ê¥ó¥¯¤· + + ¤è¤ê¹â®¤Ë (¤È¤¤¤Ã¤Æ¤â, »×¤Ã¤¿Äø¤Ï®¤¯¤Ê¤¤¤Ç¤¹¤¬) + + ½èÍý¤ò¹Ô¤¤¤Þ¤¹. + +4. `tk.rb' ¤Û¤É, ¹â¿å½à¤Ê¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÈ÷¤¨¤Æ¤¤¤Ê¤¤¤¿¤á, tcl/tk ¥¤ + ¥ó¥¿¥×¥ê¥¿¤ÎÀ¸À®Åù + + ²¿¤«¤é²¿¤Þ¤Ç¼«Ê¬¤Çµ­½Ò + + ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó(¤½¤ÎÂå¤ï¤ê, tcl/tk ¥é¥¤¥Ö¥é¥ê¤Î»ÅÍÍÄ̤ê, + tcl/tk ¥¤¥ó¥¿¥×¥ê¥¿¤òÊ£¿ôÀ¸À®¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¤¬). + ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï(¤ª¤½¤é¤¯) ruby ¤Î»×Áۤ˱è¤Ã¤¿¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó. + ¤Þ¤¿, ¥¹¥¯¥ê¥×¥È¤Îµ­½Ò¤Ï + + ¥À¥µ¥À¥µ + + ¤Ç¤¹. ¥¹¥¯¥ê¥×¥È¤Ï, °ì¸«, ÆɤߤŤ餤¤â¤Î¤È¤Ê¤ê¤Þ¤¹. ¤¬, ½ñ¤¯¿Í¤Ë¤È¤Ã + ¤Æ¤Ï, ¤½¤ì¤Û¤ÉÈѤ路¤¤¤â¤Î¤Ç¤Ï¤Ê¤¤¤È»×¤¤¤Þ¤¹. + +[¥¤¥ó¥¹¥È¡¼¥ë¤ÎÊýË¡] + +0. ruby ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë(ruby-1.0-¤Ê¤ó¤¿¤é.tgz)¤òŸ³«¤·¤Æ¤ª¤­¤Þ¤¹. + +1. ruby-1.0-¤Ê¤ó¤¿¤é/ext ¤Ë ext/tcltklib ¤ò¥³¥Ô¡¼¤·¤Þ¤¹. + cp -r ext/tcltklib ???/ruby-1.0-¤Ê¤ó¤¿¤é/ext/ + +2. ruby ¤Î¥¤¥ó¥¹¥È¡¼¥ëË¡¤Ë½¾¤¤ make Åù¤ò¤·¤Þ¤¹. + +3. ruby ¤Î¥é¥¤¥Ö¥é¥êÃÖ¾ì¤Ë lib/* ¤ò¥³¥Ô¡¼¤·¤Þ¤¹. + cp lib/* /usr/local/lib/ruby/ + +(eof) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/24hr_clock.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/24hr_clock.rb new file mode 100644 index 0000000..60d8072 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/24hr_clock.rb @@ -0,0 +1,286 @@ +#!/usr/bin/env ruby + +require 'tk' + +class Clock + def initialize(clock24 = true) + @clock = (clock24)? 24: 12 + + @size = 200 + @cdot_size = 5 + + @cdot_color = 'black' + @hour_hand_color = 'black' + @minute_hand_color = 'gray25' + @second_hand_color = 'gray50' + + @mark_font = 'Helvetica -14' + @mark_width = 3 + @mark_color = 'black' + @submark_color = 'gray50' + + @c = TkCanvas.new(:width=>2*@size, :height=>2*@size, + :scrollregion=>[-@size, -@size, @size, @size] + ).pack(:fill=>:both, :expand=>true) + + @tag = TkcTag.new(@c) + @hand_tag = TkcTag.new(@c) + + @circle_coords = [[-0.9*@size, -0.9*@size], [0.9*@size, 0.9*@size]] + @oval = TkcOval.new(@c, @circle_coords, :fill=>'white', :tags=>[@tag]) + + f = TkFrame.new.pack + TkLabel.new(f, :text=>'CURRENT:').pack(:side=>:left) + @now = TkLabel.new(f, :text=>'00:00:00').pack(:side=>:left, :padx=>2) + TkLabel.new(f, :text=>' ').pack(:side=>:left) + TkLabel.new(f, :text=>' ').pack(:side=>:right) + @l = TkLabel.new(f, :text=>'00:00').pack(:side=>:right, :padx=>2) + TkLabel.new(f, :text=>'MOUSE-POINTER:').pack(:side=>:right) + + cmd = proc{|x, y| + @l.text = '%02d:%02d' % coords_to_time(@c.canvasx(x), @c.canvasy(y)) + } + @c.bind('Motion', cmd, '%x %y') + @tag.bind('Motion', cmd, '%x %y') + + _create_hands + _create_marks + + timer_proc = proc{ + t = Time.now + @now.text = '%02d:%02d:%02d' % [t.hour, t.min, t.sec] + set_hands(t.hour, t.min, t.sec) + } + + timer_proc.call + @timer = TkRTTimer.start(100, -1, timer_proc) + end + + def _create_marks + @mark_tag = TkcTag.new(@c) + + TkcLine.new(@c, 0, -0.90*@size, 0, -0.85*@size, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, 0.90*@size, 0, 0.85*@size, 0, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, 0, 0.90*@size, 0, 0.85*@size, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, -0.90*@size, 0, -0.85*@size, 0, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + + TkcText.new(@c, [0, -0.92*@size], :text=>0, + :anchor=>'s', :fill=>@mark_color) + TkcText.new(@c, [0.92*@size, 0], :text=>@clock.div(4), + :anchor=>'w', :fill=>@mark_color) + TkcText.new(@c, [0, 0.92*@size], :text=>@clock.div(2), + :anchor=>'n', :fill=>@mark_color) + TkcText.new(@c, [-0.92*@size, 0], :text=>@clock.div(4)*3, + :anchor=>'e', :fill=>@mark_color) + + [30.0, 60.0].each{|angle| + rad = Math::PI * angle / 180.0 + x_base = @size*Math::sin(rad) + y_base = @size*Math::cos(rad) + + x1 = 0.90*x_base + y1 = 0.90*y_base + + x2 = 0.85*x_base + y2 = 0.85*y_base + + TkcLine.new(@c, x1, y1, x2, y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, x1, -y1, x2, -y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, -x1, y1, -x2, y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + TkcLine.new(@c, -x1, -y1, -x2, -y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@mark_color) + + x3 = 0.92*x_base + y3 = 0.92*y_base + + if @clock == 24 + dh = angle.to_i/15 + else # @clock == 12 + dh = angle.to_i/30 + end + + TkcText.new(@c, x3, -y3, :text=>dh, + :anchor=>'sw', :fill=>@mark_color) + TkcText.new(@c, x3, y3, :text=>@clock.div(2)-dh, + :anchor=>'nw', :fill=>@mark_color) + TkcText.new(@c, -x3, y3, :text=>@clock.div(2)+dh, + :anchor=>'ne', :fill=>@mark_color) + TkcText.new(@c, -x3, -y3, :text=>@clock-dh, + :anchor=>'se', :fill=>@mark_color) + } + + if @clock == 24 + [15.0, 45.0, 75.0].each{|angle| + rad = Math::PI * angle / 180.0 + x_base = @size*Math::sin(rad) + y_base = @size*Math::cos(rad) + + x1 = 0.90*x_base + y1 = 0.90*y_base + + x2 = 0.875*x_base + y2 = 0.875*y_base + + TkcLine.new(@c, x1, y1, x2, y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@submark_color) + TkcLine.new(@c, x1, -y1, x2, -y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@submark_color) + TkcLine.new(@c, -x1, y1, -x2, y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@submark_color) + TkcLine.new(@c, -x1, -y1, -x2, -y2, + :tags=>[@tag, @mark_tag], + :width=>@mark_width, :fill=>@submark_color) + } + end + end + + def _create_hands + hour_hand_len = 0.55*@size + minute_hand_len = 0.85*@size + second_hand_len = 0.88*@size + + hour_hand_width = 1.8*@cdot_size + minute_hand_width = 1.0*@cdot_size + second_hand_width = 1 # 0.4*@cdot_size + + @hour_hand_coords = [ + [0, -0.5*@cdot_size], + [hour_hand_width, -0.5*@cdot_size-hour_hand_width], + [hour_hand_width, -hour_hand_len+hour_hand_width], + [0, -hour_hand_len], + [-hour_hand_width, -hour_hand_len+hour_hand_width], + [-hour_hand_width, -0.5*@cdot_size-hour_hand_width], + ] + @minute_hand_coords = [ + [0, -0.5*@cdot_size], + [minute_hand_width, -0.5*@cdot_size - minute_hand_width], + [minute_hand_width, -minute_hand_len+minute_hand_width], + [0, -minute_hand_len], + [-minute_hand_width, -minute_hand_len+minute_hand_width], + [-minute_hand_width, -0.5*@cdot_size-minute_hand_width], + ] + @second_hand_coords = [ + [0, -0.5*@cdot_size], + [second_hand_width, -0.5*@cdot_size - second_hand_width], + [second_hand_width, -second_hand_len+second_hand_width], + [0, -second_hand_len], + [-second_hand_width, -second_hand_len+second_hand_width], + [-second_hand_width, -0.5*@cdot_size-second_hand_width], + ] + + @hour_hand = TkcPolygon.new(@c, @hour_hand_coords, + :tags=>[@tag, @hand_tag], + :outline=>@hour_hand_color, + :fill=>@hour_hand_color) + + @minute_hand = TkcPolygon.new(@c, @minute_hand_coords, + :tags=>[@tag, @hand_tag], + :outline=>@minute_hand_color, + :fill=>@minute_hand_color) + + @second_hand = TkcPolygon.new(@c, @second_hand_coords, + :tags=>[@tag, @hand_tag], + :outline=>@second_hand_color, + :fill=>@second_hand_color) + + @center_dot = TkcOval.new(@c, + [-@cdot_size, -@cdot_size], + [@cdot_size, @cdot_size], + :outline=>@cdot_color, :fill=>@cdot_color) + end + private :_create_hands + + def _raise_hands + @hour_hand.raise + @minute_hand.raise + @second_hand.raise + @center_dot.raise + end + private :_raise_hands + + def _raise_marks + @mark_tag.raise + end + private :_raise_marks + + def set_hands(hh, mm, ss) + ss_angle = Math::PI * ss / 30.0 + mm_angle = Math::PI * (mm + ss/60.0) / 30.0 + hh_angle = Math::PI * (hh + (mm + ss/60.0)/60.0) / (@clock.div(2)) + + @second_hand.coords = @second_hand_coords.collect{|x, y| + r = Math::hypot(y, x) + a = Math::atan2(y, x) + ss_angle + [Math::cos(a) * r, Math::sin(a) * r] + } + + @minute_hand.coords = @minute_hand_coords.collect{|x, y| + r = Math::hypot(y, x) + a = Math::atan2(y, x) + mm_angle + [Math::cos(a) * r, Math::sin(a) * r] + } + + @hour_hand.coords = @hour_hand_coords.collect{|x, y| + r = Math::hypot(y, x) + a = Math::atan2(y, x) + hh_angle + [Math::cos(a) * r, Math::sin(a) * r] + } + + _raise_hands + _raise_marks + end + + def coords_to_time(x, y) + return ((y < 0)? [0, 0]: [@clock.div(2), 0]) if x == 0 + if @clock == 24 + offset = (x<0&&y<0)? 1800.0: 360.0 + m_half = 720.0 + else # @clock == 12 + offset = (x<0&&y<0)? 900.0: 180.0 + m_half = 360.0 + end + (offset + m_half*Math.atan2(y,x)/Math::PI).round.divmod(60) + end + + def create_pie(hh, mm, span, color='red') + if @clock == 24 + start = 90.0 - (hh*60 + mm)/4.0 # 360.0*(hh*60+mm)/(24*60) + extent = -span/4.0 + else # @clock == 12 + start = 90.0 - (hh*60 + mm)/2.0 # 360.0*(hh*60+mm)/(12*60) + extent = -span/2.0 + end + + pie = TkcArc.new(@c, @circle_coords, :tags=>[@tag], + :outline=>'black', 'fill'=>color, + :start=>start, :extent=>extent) + _raise_hands + _raise_marks + pie + end +end + +sched = Clock.new +sched.create_pie(0,0, 60) # 60 minutes from 00:00 +sched.create_pie(6,30, 280, 'green') # 280 minutes from 06:30 +sched.create_pie(15,20, 90, 'blue') # 90 minutes from 15:20 + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/binding_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/binding_sample.rb new file mode 100644 index 0000000..693cc7d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/binding_sample.rb @@ -0,0 +1,87 @@ +#!/usr/bin/env ruby + +require 'tk' + +class Button_clone < TkLabel + def initialize(*args) + @command = nil + + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + @command = keys.delete('command') + + keys['highlightthickness'] = 1 unless keys.key?('highlightthickness') + keys['padx'] = '3m' unless keys.key?('padx') + keys['pady'] = '1m' unless keys.key?('pady') + keys['relief'] = 'raised' unless keys.key?('relief') + + args.push(keys) + end + + super(*args) + + @press = false + + self.bind('Enter', proc{self.background(self.activebackground)}) + self.bind('Leave', proc{ + @press = false + self.background(self.highlightbackground) + self.relief('raised') + }) + + self.bind('ButtonPress-1', proc{@press = true; self.relief('sunken')}) + self.bind('ButtonRelease-1', proc{ + self.relief('raised') + @command.call if @press && @command + @press = false + }) + end + + def command(cmd = Proc.new) + @command = cmd + end + + def invoke + if @command + @command.call + else + '' + end + end +end + +TkLabel.new(:text=><'red').pack(:pady=>3) + +v = TkVariable.new(0) + +TkFrame.new{|f| + TkLabel.new(f, :text=>'click count : ').pack(:side=>:left) + TkLabel.new(f, :textvariable=>v).pack(:side=>:left) +}.pack + +TkButton.new(:text=>'normal Button widget', + :command=>proc{ + puts 'button is clicked!!' + lbl.text 'button is clicked!!' + v.numeric += 1 + }){ + pack(:fill=>:x, :expand=>true) +} + +Button_clone.new(:text=>'Label with Button binding', + :command=>proc{ + puts 'label is clicked!!' + lbl.text 'label is clicked!!' + v.numeric += 1 + }){ + pack(:fill=>:x, :expand=>true) +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/bindtag_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/bindtag_sample.rb new file mode 100644 index 0000000..8c93b4a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/bindtag_sample.rb @@ -0,0 +1,127 @@ +#!/usr/bin/env ruby +require 'tk' + +TkLabel.new(:text=><:left).pack +This is a sample of bindtags and usage of +Tk.callback_break/Tk.callback_continue. +Please check the work of following buttons +(attend the difference between before/after + pressing the bottom button), and see the +source code. +EOT + +def set_class_bind + TkButton.bind('ButtonPress-1', + proc{puts 'bind "ButtonPress-1" of TkButton class'}) + TkButton.bind('ButtonRelease-1', + proc{puts 'bind "ButtonRelease-1" of TkButton class'}) +end + +# set root binding +r = TkRoot.new +r.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of root widget'}) +r.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of root widget'}) + +# set 'all' binding +TkBindTag::ALL.bind('ButtonPress-1', + proc{puts 'bind "ButtonPress-1" of the tag "all"'}) +TkBindTag::ALL.bind('ButtonRelease-1', + proc{puts 'bind "ButtonRelease-1" of the tag "all"'}) + +# create buttons +b1 = TkButton.new(:text=>'button-1', + :command=>proc{puts "command of button-1"}).pack +b2 = TkButton.new(:text=>'button-2', + :command=>proc{puts "command of button-2"}).pack +b3 = TkButton.new(:text=>'button-3', + :command=>proc{puts "command of button-3"}).pack +b4 = TkButton.new(:text=>'button-4', + :command=>proc{puts "command of button-4"}).pack +b5 = TkButton.new(:text=>'button-5', + :command=>proc{puts "command of button-5"}).pack + +# set button binding +b1.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-1'}) +b1.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-1'}) + +b2.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-2'}) +b2.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-2'}) + +b3.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-3'}) +b3.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-3'}) + +b4.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-4'}) +b4.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-4'}) + +b5.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-5'}) +b5.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of button-5'}) + +# create bindtag and set binding +tag1 = TkBindTag.new +tag1.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of tag1'}) +tag1.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of tag1'}) + +tag2 = TkBindTag.new +tag2.bind('ButtonPress-1', + proc{ + puts 'bind "ButtonPress-1" of tag2' + puts 'call Tk.callback_continue' + Tk.callback_continue + puts 'never see this message' + }) +tag2.bind('ButtonRelease-1', + proc{ + puts 'bind "ButtonRelease-1" of tag2' + puts 'call Tk.callback_continue' + Tk.callback_continue + puts 'never see this message' + }) + +tag3 = TkBindTag.new +tag3.bind('ButtonPress-1', + proc{ + puts 'bind "ButtonPress-1" of tag3' + puts 'call Tk.callback_break' + Tk.callback_break + puts 'never see this message' + }) +tag3.bind('ButtonRelease-1', + proc{ + puts 'bind "ButtonRelease-1" of tag3' + puts 'call Tk.callback_break' + Tk.callback_break + puts 'never see this message' + }) + +# set bindtags +p b1.bindtags + +tags = b2.bindtags +tags[2,0] = tag1 +tags[0,0] = tag1 +b2.bindtags(tags) +p b2.bindtags + +tags = b3.bindtags +tags[2,0] = tag2 +tags[0,0] = tag2 +b3.bindtags(tags) +p b3.bindtags + +tags = b4.bindtags +tags[2,0] = tag3 +tags[0,0] = tag3 +b4.bindtags(tags) +p b4.bindtags + +b5.bindtags([tag1, TkButton, tag2, b5]) + +# create button to set button class binding +TkButton.new(:text=>'set binding to TkButton class', + :command=>proc{ + puts 'call "set_class_bind"' + set_class_bind + }).pack(:pady=>7) + +# start event-loop +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/binstr_usage.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/binstr_usage.rb new file mode 100644 index 0000000..be8399b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/binstr_usage.rb @@ -0,0 +1,45 @@ +#!/usr/bin/env ruby + +require "tk" + +TkMessage.new(:width=>360, :text=><ImgFile) +p ph1.configinfo + +b_str = Tk::BinaryString(IO.read(ImgFile)) +p [b_str, b_str.encoding] + +ph2 = TkPhotoImage.new(:data=>b_str) +p ph2.configinfo +p ph2.data(:grayscale=>true) + +ph3 = TkPhotoImage.new(:palette=>256) +ph3.put(ph2.data) + +ph4 = TkPhotoImage.new() +ph4.put(ph2.data(:grayscale=>true)) + +#p [b_str.encoding, b_str.rb_encoding] + +f = TkFrame.new.pack +TkButton.new(:parent=>f, :image=>ph1, :command=>proc{exit}).pack(:side=>:left) +TkButton.new(:parent=>f, :image=>ph2, :command=>proc{exit}).pack(:side=>:left) +TkButton.new(:parent=>f, :image=>ph3, :command=>proc{exit}).pack(:side=>:left) +TkButton.new(:parent=>f, :image=>ph4, :command=>proc{exit}).pack(:side=>:left) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/btn_with_frame.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/btn_with_frame.rb new file mode 100644 index 0000000..d04c95a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/btn_with_frame.rb @@ -0,0 +1,20 @@ +require 'tk' + +class Button_with_Frame < TkButton + def create_self(keys) + @frame = TkFrame.new('widgetname'=>@path, 'background'=>'yellow') + install_win(@path) # create new @path which is a daughter of old @path + super(keys) + TkPack(@path, :padx=>7, :pady=>7) + @epath = @frame.path + end + def epath + @epath + end +end + +Button_with_Frame.new(:text=>'QUIT', :command=>proc{exit}) { + pack(:padx=>15, :pady=>5) +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/cd_timer.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/cd_timer.rb new file mode 100644 index 0000000..9154e89 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/cd_timer.rb @@ -0,0 +1,81 @@ +#!/usr/bin/env ruby +# +# countdown timer +# usage: cd_timer min [, min ... ] +# ( e.g. cd_timer 0.5 1 3 5 10 ) +# +require 'tk' + +if ARGV.empty? + $stderr.puts 'Error:: No time arguments for counting down' + exit(1) +end + +width = 10 + +TkButton.new(:text=>'exit', + :command=>proc{exit}).pack(:side=>:bottom, :fill=>:x) + +b = TkButton.new(:text=>'start').pack(:side=>:top, :fill=>:x) + +f = TkFrame.new(:relief=>:ridge, :borderwidth=>2).pack(:fill=>:x) +TkLabel.new(f, :relief=>:flat, :pady=>3, + :background=>'black', :foreground=>'white', + :text=>' elapsed: ').pack(:fill=>:x, :side=>:left, :expand=>true) +now = TkLabel.new(f, :width=>width, :relief=>:flat, :pady=>3, :anchor=>:w, + :background=>'black', :foreground=>'white', + :text=>'%4d:%02d.00' % [0, 0]).pack(:side=>:right) + +timers = [ TkRTTimer.new(10){|tm| + t = (tm.return_value || 0) + 1 + s, u = t.divmod(100) + m, s = s.divmod(60) + now.text('%4d:%02d.%02d' % [m, s, u]) + t + }.set_start_proc(0, proc{ + now.text('%4d:%02d.00' % [0,0]) + now.foreground('white') + 0 + }) +] + +ARGV.collect{|arg| (Float(arg) * 60).to_i}.sort.each_with_index{|time, idx| + f = TkFrame.new(:relief=>:ridge, :borderwidth=>2).pack(:fill=>:x) + TkLabel.new(f, :relief=>:flat, :pady=>3, + :text=>' %4d:%02d --> ' % (time.divmod(60))).pack(:side=>:left) + l = TkLabel.new(f, :width=>width, :relief=>:flat, :pady=>3, :anchor=>:w, + :text=>'%4d:%02d' % (time.divmod(60))).pack(:side=>:right) + timers << TkRTTimer.new(1000){|tm| + t = (tm.return_value || time) - 1 + if t < 0 + l.text('%4d:%02d' % ((-t).divmod(60))) + else + l.text('%4d:%02d' % (t.divmod(60))) + end + if t.zero? + l.foreground('red') + idx.times{Tk.bell} + end + t + }.set_start_proc(0, proc{ + l.text('%4d:%02d' % (time.divmod(60))) + l.foreground('black') + time + }) +} + +mode = :start +b.command(proc{ + if mode == :start + timers.each{|timer| timer.restart} + b.text('reset') + mode = :reset + else + timers.each{|timer| timer.stop.reset} + b.text('start') + mode = :start + end + }) + +Tk.mainloop + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_res_test.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_res_test.rb new file mode 100644 index 0000000..6e954f2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_res_test.rb @@ -0,0 +1,17 @@ +require 'tk' +TkOptionDB.readfile(File.expand_path('cmd_resource', + File.dirname(__FILE__))) +f = TkFrame.new(:class=>'BtnFrame').pack +b = TkButton.new(:parent=>f, :widgetname=>'hello').pack +cmd1 = TkOptionDB.new_proc_class(b, [:show_msg, :bye_msg], 3) +cmd2 = TkOptionDB.new_proc_class(:ZZZ, [:show_msg, :bye_msg], 3, false, cmd1) +cmd3 = TkOptionDB.new_proc_class(:ZZZ, [:show_msg, :bye_msg], 3, false, b) +cmd4 = TkOptionDB.new_proc_class(:BTN_CMD, [:show_msg, :bye_msg], 3){ + def self.__check_proc_string__(str) + "{|arg| print [arg, $SAFE].inspect, ': '; Proc.new#{str}.call(arg)}" + end +} +cmd1.show_msg('cmd1') +cmd2.show_msg('cmd2') +cmd3.show_msg('cmd3') +cmd4.show_msg('cmd4') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_resource b/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_resource new file mode 100644 index 0000000..9cc4915 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/cmd_resource @@ -0,0 +1,5 @@ +*BtnFrame.hello.text: HELLO +*BtnFrame.hello.command: ruby {puts "Hello World!!"} +*BTN_CMD.show_msg: {|arg| print "Hello, #{arg}!!\n"} +*hello.show_msg: {|arg| print "Hello, Hello, #{arg}!!\n"} +*hello.ZZZ.show_msg: {|arg| print "Hello, Hello, ZZZ:#{arg}!!\n"} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog new file mode 100644 index 0000000..c3f66cf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog @@ -0,0 +1,64 @@ +2002-08-29 16:30 matt + + * ChangeLog: ChangeLog is auto-generated *from* CVS log. + +2002-08-29 16:27 matt + + * ChangeLog.prev: [no log message] + +2002-08-28 18:07 matt + + * browse1, browse2, hello, ixset, rmt, rolodex, rolodex-j, square, + tcolor, timer, widget: Changed #! lines to the slightly more + portable '#!/usr/bin/env ruby'. + +2002-08-28 17:56 matt + + * icon.rb, items.rb, label.rb, menu.rb, ruler.rb: Changed bitmap + file extensions from .bmp to .xbm. + +2002-08-28 17:55 matt + + * images/: face.bmp, face.xbm, flagdown.bmp, flagdown.xbm, + flagup.bmp, flagup.xbm, gray25.bmp, gray25.xbm, letters.bmp, + letters.xbm, noletter.bmp, noletter.xbm, pattern.bmp, pattern.xbm: + Changed X bitmap file extensions from .bmp to the more intuitive + .xbm. + +2002-08-28 17:35 matt + + * bitmap.rb, colors.rb, cscroll.rb, ctext.rb, hello, ixset, + menubu.rb, patch_1.1c1, rmt, style.rb, timer, ChangeLog, README, + README.tkencoding, arrow.rb, bind.rb, browse1, browse2, button.rb, + check.rb, clrpick.rb, dialog1.rb, dialog2.rb, entry1.rb, entry2.rb, + filebox.rb, floor.rb, form.rb, hscale.rb, icon.rb, image1.rb, + image2.rb, items.rb, label.rb, menu.rb, msgbox.rb, plot.rb, + puzzle.rb, radio.rb, rolodex, rolodex-j, ruler.rb, sayings.rb, + search.rb, square, states.rb, tcolor, text.rb, tkencoding.rb, + twind.rb, vscale.rb, widget, doc.org/README, doc.org/README.JP, + doc.org/README.tk80, doc.org/license.terms, + doc.org/license.terms.tk80, images/earth.gif, images/earthris.gif, + images/face.bmp, images/flagdown.bmp, images/flagup.bmp, + images/gray25.bmp, images/grey.25, images/grey.5, + images/letters.bmp, images/noletter.bmp, images/pattern.bmp, + images/tcllogo.gif, images/teapot.ppm: Initial revision + +2002-08-28 17:35 matt + + * bitmap.rb, colors.rb, cscroll.rb, ctext.rb, hello, ixset, + menubu.rb, patch_1.1c1, rmt, style.rb, timer, ChangeLog, README, + README.tkencoding, arrow.rb, bind.rb, browse1, browse2, button.rb, + check.rb, clrpick.rb, dialog1.rb, dialog2.rb, entry1.rb, entry2.rb, + filebox.rb, floor.rb, form.rb, hscale.rb, icon.rb, image1.rb, + image2.rb, items.rb, label.rb, menu.rb, msgbox.rb, plot.rb, + puzzle.rb, radio.rb, rolodex, rolodex-j, ruler.rb, sayings.rb, + search.rb, square, states.rb, tcolor, text.rb, tkencoding.rb, + twind.rb, vscale.rb, widget, doc.org/README, doc.org/README.JP, + doc.org/README.tk80, doc.org/license.terms, + doc.org/license.terms.tk80, images/earth.gif, images/earthris.gif, + images/face.bmp, images/flagdown.bmp, images/flagup.bmp, + images/gray25.bmp, images/grey.25, images/grey.5, + images/letters.bmp, images/noletter.bmp, images/pattern.bmp, + images/tcllogo.gif, images/teapot.ppm: Taking over demo package + from Jonathan Conway. + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog.prev b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog.prev new file mode 100644 index 0000000..536ce30 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ChangeLog.prev @@ -0,0 +1,9 @@ +2001-07-26 + + * Moved files to directory ruby-tk81-demos-english in tarball. + +2001-07-26 + + * Added test to widget and hello versus Tk::TCL_VERSION & Tk::JAPANIZED_TK (per Guy Decoux in [ruby-talk:18559]) before requiring tkencoding.rb. + + \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README new file mode 100644 index 0000000..2908aa3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README @@ -0,0 +1,138 @@ +Current Maintainer: + Jonathan Conway + rise@knavery.net + + Please direct all bug reports/requests/suggestions to the above + address. + + +Notes: + +* The files hello and widget have been changed to test Tk::TCL_VERSION + and Tk::JAPANIZED_TK before requiring tkencoding.rb to prevent an + infinite loop. This test was taken from a message in + [ruby-talk:18559] by Guy Decoux. + +* The .bmp files in the images directory are X bitmaps (i.e. XBM to many + graphics packages), not Windows bitmaps (.bmp). You will not be + able to use images exported by a graphics program as Windows + bitmaps with this demo collection nor will you be able to edit the + included images without setting the file type correctly. + +-- Jonathan Conway, 2001-07-26 + + +#------------------------------------------------------------------------------ +# ==== Introduction. ==== +# +# To create this version of the Ruby/Tk widget demo, I took the +# ruby-tk81-demos and removed all the Kanji strings and comments. I +# have tried to restore the original English strings and comments +# using the Tcl/Tk8.2.2 version of the widget demo. +# +# When I tried running the Kanji version, all I got was a mostly blank +# panel with a non-functional "File" button. I disovered that if all +# non-ASCII characters were replaced with blanks, then I could get the +# gutted stuff running. +# +# Since English Ruby/Tk documentation is lacking and I needed this +# code to see how it worked and to use as the basis of my try-it +# prototype (The Ruby Yielding Interactive Toolkit), plus the fact +# that no help was forthcoming for making the Kanji version work (plus +# the fact that I can't read Kanji anyway), I decided to embark on +# this English restoration project. +# +# Thanks to everyone who worked on the original Ruby/Tk widget demo +# (and the preceding Tcl/Tk version for that matter). The +# comparatively simple task of changing text strings and comments has +# made me appreciate the great amount of original work that went into +# this. +# +# -- Conrad Schneiker, 2000-07-23. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# ==== Known bugs. ==== +# +# ^C-ing the demo gives Ruby interrupt and stack message; clean exit needed. +# Font settings don't work correctly. +# Dismissing the embedded windows demo (tkwind.rb) kills the widget demo. +# Rerunning the canvas item demo from the code widow get errors. +# The "press me" button in the canvas item demo doesn't time out. +# The simple 2 d plot starts up extremely slow compared to the Tcl version. +# The first item message on the icon menu on the menu and cascades demo doesn't work. +#------------------------------------------------------------------------------ + + +###################### Original README ######################################## + + Ruby/Tk81 widget-demo 1999/08/13 + + ËÌΦÀèüÂç¾ðÊó²Ê³Ø¸¦µæ²Ê + ΩÀÐ + +Tcl/Tk8.1¤Ç¤Ïunicode(UTF8)¤¬ºÎÍѤµ¤ì¡¢unicode¤ËÊÑ´¹¤µ¤ì¤¿ÆüËܸì¤Ç¤¢¤ì¤Ð +Widget¤Ëɽ¼¨¤µ¤»¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£ËÜ¥¢¡¼¥«¥¤¥Ö¤Ë¤Ï°ÊÁ°¤Ë±Ê°æ¤µ¤ó¤¬Ãæ¿´¤È +¤Ê¤é¤ì¤ÆºîÀ®¤µ¤ì¤¿Ruby/Tk¤Î¥µ¥ó¥×¥ë¤Ë½¤Àµ¤ò²Ã¤¨¡¢°Ê²¼¤Î´Ä¶­¤Ë¤ª¤¤¤Æ¤ÇÆ°ºî +¤ò³Îǧ¤·¤¿¤â¤Î¤Ç¤¹¡£ + +* ruby-1.3.7,ruby-1.4.0 +* tcl8.1, tk8.1 +* linux-2.2 + +Windows(Cygwin)¤Ë¤ª¤¤¤Æ¡¢¥µ¥ó¥×¥ë¤òÆ°¤«¤¹¤Ë¤Ïruby¤ò-Ke¤È¤¤¤¦¥ª¥×¥·¥ç¥ó¤òÉÕ +¤±¤Æµ¯Æ°¤µ¤»¤ë¤ÈÎɤ¤¤½¤¦¤Ç¤¹¡£ + ¾ðÊóÄ󶡡§ÅÏÊÕ¤µ¤ó + + +---------------------------------------------------------------------------- + Ruby/Tk widget-demo + version 1.1 ( 1998/07/24 ) + ±Ê°æ¡÷ÃÎǽ¡¥¶å¹©Âç (nagai@ai.kyutech.ac.jp) + +ɸ½àÇÛÉۤΠTcl/Tk ³ÈÄ¥¥Ñ¥Ã¥±¡¼¥¸¤ò¼è¤ê¹þ¤ó¤À Ruby (°Ê²¼ Ruby/Tk ¤È¸Æ¤Ó¤Þ¤¹) +¤Ç¤Ï¡¤Tk widget ¤òÍѤ¤¤¿ GUI ¤ÎºîÀ®¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥¼ÂºÝ¤Ë GUI ¤òºîÀ® +¤·¤Æ¤¤¤¯¾ì¹ç¤Ë¤ÏÍÍ¡¹¤Ê¼ÂÎ㤬¥µ¥ó¥×¥ë¤È¤·¤Æ¸ºß¤¹¤ë¤ÈÊØÍø¤Ê¤Î¤Ç¤¹¤¬¡¤Ruby/Tk +¤Ë¤Ï¤½¤Î¤è¤¦¤ÊŬÅö¤Ê¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È½¸¹ç¤Ï¸ºß¤·¤Þ¤»¤ó¤Ç¤·¤¿¡¥¤½¤ì¤ËÂФ·¡¤ +³ÈÄ¥¥Ñ¥Ã¥±¡¼¥¸¤Î¸µ¤Ç¤¢¤ë Tcl/Tk ¤Ë¤Ï¡¤Tk widget ¤òÍѤ¤¤Æ¤É¤Î¤è¤¦¤Ê¤³¤È¤¬¤Ç +¤­¤ë¤«¤ò¼¨¤¹¤â¤Î¤È¤·¤Æ widget-demo ¤¬Â¸ºß¤·¤ª¤ê¡¤Tcl/Tk ¤òÍѤ¤¤¿ GUI ¤ÎºîÀ® +¤ò½¬ÆÀ¤¹¤ëºÝ¤ÎÂåɽŪ¥µ¥ó¥×¥ë¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ËÜ¥¢¡¼¥«¥¤¥Ö¤Ï¡¤Ruby/Tk ¤Î½¬ÆÀ¤Î +¤¿¤á¤ÎÂåɽŪ¤Ê¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È¤È¤¹¤Ù¤¯¡¤Tcl/Tk ¤Î widget-demo ¤ò°Ü¿¢¤·¤¿¤â +¤Î¤Ç¤¹¡¥ + +ËÜ¥¢¡¼¥«¥¤¥Ö¤Ë´Þ¤Þ¤ì¤ë¥¹¥¯¥ê¥×¥È¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Ë¤Ï¡¤ruby-1.1c2 °Ê¾å¤Ç¤¢¤ë¤³ +¤È¤¬É¬ÍפǤ¹¡¥1.1c1 ¤Î¾ì¹ç¤Ï¡¤ËÜ¥¢¡¼¥«¥¤¥Ö¤Ë´Þ¤Þ¤ì¤ë patck_1.1c1 ¤ò Ruby ¤Î +¥é¥¤¥Ö¥é¥ê¤Ë¤¢¤Æ¤Æ¤¯¤À¤µ¤¤¡¥ÁȤ߹þ¤à Tk ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¤4.2 ¤Ç¤â 8.0 ¤Ç¤â½¤ +Àµ¤Ê¤¯Æ°¤«¤»¤ë¤Ï¤º¤Ç¤¹¡¥¤¿¤À¤·¡¤ÆüËܸìÈǤǤΰܿ¢¤È¤Ê¤Ã¤Æ¤¤¤ë¤¿¤á¡¤ÆüËܸ첽¤µ +¤ì¤¿ Tk ¤ò¤´ÍøÍѤ¯¤À¤µ¤¤¡¥¥¹¥¯¥ê¥×¥È¤Î¥Æ¥¹¥È¤Ï¡¤Tk4.2jp ¤È Tk8.0jp ¤Î¾å¤Ç¹Ô +¤¤¤Þ¤·¤¿ (´°àú¤Ë¤Ç¤Ï¤Ê¤¤¤Ç¤¹¤¬)¡¥ + +ËÜ¥¢¡¼¥«¥¤¥Ö¤Ë´Þ¤Þ¤ì¤ë¥¹¥¯¥ê¥×¥È¤Î¿¤¯¤Ï¡¤¸µ¤È¤Ê¤Ã¤Æ¤¤¤ë Tcl/Tk ÈǤËÈæ³ÓŪ¶á +¤¤¥¹¥¯¥ê¥×¥Èµ­½Ò¤È¤Ê¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¡¥¤½¤Î¤¿¤á¡¤Ruby/Tk ¤Î¥µ¥ó¥×¥ë¤È¸À¤¦¤Ë +¤Ï¡¤¤¢¤Þ¤ê Ruby ¤é¤·¤¯¤Ê¤¤¤È¤â¸À¤¨¤ë¤Ç¤·¤ç¤¦¡¥¤Ë¤â¤«¤«¤ï¤é¤º¡¤¤½¤Î¤è¤¦¤Êµ­½Ò +¤ò¼è¤Ã¤Æ¤¤¤ëÍýͳ¤Ï¡¤Ruby/Tk ¤Î¥É¥­¥å¥á¥ó¥ÈÉÔ­¤Ë¤¢¤ê¤Þ¤¹¡¥ + +Tcl/Tk ¤Ë¤ÏŬÅö¤Ê»²¹Í½ñ¤¬²¿ºý¤«Â¸ºß¤·¤Æ¤¤¤Þ¤¹¤«¤é¡¤Ruby/Tk ¥¹¥¯¥ê¥×¥È¤òºîÀ® +¤¹¤ëºÝ¤Ï¡¤¤½¤Î¤è¤¦¤Ê Tcl/Tk ¤Î»²¹Í½ñ¤Ç¾ðÊó¤òÊ䤤¤Ê¤¬¤éºîÀ®¤¹¤ë¤³¤È¤Ë¤Ê¤ë¤È»× +¤¤¤Þ¤¹¡¥³Æ widget ¤Î»ÈÍÑÎã¤È¤·¤Æ¡¤Tcl/Tk ¤Î widget-demo ¤ò»²¾È¤¹¤ë¤³¤È¤â¤¢¤ë +¤Ç¤·¤ç¤¦¡¥Ruby/Tk ÈǤε­½Ò¤ò widget-demo ¤ò Tcl/Tk ÈǤε­½Ò¤Ë¶á¤¤¤â¤Î¤Ë¤·¤Æ +¤ª¤±¤Ð¡¤¤½¤ÎÂÐÈæ¤Ë¤è¤Ã¤Æ¡¤Ruby/Tk ¤ÎÍý²ò¤òÁá¤á¤ë¤³¤È¤¬¤Ç¤­¤ë¤È¹Í¤¨¤é¤ì¤Þ¤¹¡¥ +°ìö Ruby/Tk ¤Ç¤Î ³Æ widget ¤Î»ÈÍÑÊýË¡¤ò½¬ÆÀ¤·¤Æ¤·¤Þ¤¨¤Ð¡¤Ruby ¤é¤·¤¤¥¹¥¯¥ê +¥×¥È¤òºîÀ®¤¹¤ë¤³¤È¤ÏÆñ¤·¤¯¤Ê¤¤¤Ç¤·¤ç¤¦¡¥ËÜ¥¢¡¼¥«¥¤¥Ö¤Î¥¹¥¯¥ê¥×¥È¤Ï¡¤Ruby/Tk +¤òºÇ½é¤Ë½¬ÆÀ¤¹¤ë¤Þ¤Ç¤ÎƧÂæ¤È¤·¤ÆÍøÍѤ·¤Æ¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡¥ + +widget-demo ¤Î°Ü¿¢¤Ë¤¢¤¿¤Ã¤Æ¤Ï¡¤¼¡¤ÎÊý¤Ë¤â°Ü¿¢¤·¤¿¥¹¥¯¥ê¥×¥È¤òÄ󶡤·¤Æ¤¤¤¿¤À +¤­¤Þ¤·¤¿¡¥¤³¤³¤Ë´¶¼Õ¤Î°Õ¤òɽ¤·¤Þ¤¹¡¥ + + ΩÀС÷JAIST (ttate@jaist.ac.jp) ¤µ¤ó + Ê¿¾¾¾Í»Ë (hiramatu@cdrom.co.jp) ¤µ¤ó + +Ê¿¾¾¤µ¤ó¤Ë¤è¤ë Ruby/Tk ÆþÌç¤Î Web page (http://www.cdrom.co.jp/~hiramatu/) +¤â Ruby/Tk ¤Î½¬ÆÀ¤ËÍ­ÍѤȻפ¨¤Þ¤¹¤Î¤Ç¡¤¤¼¤Ò¤´»²¾È¤¯¤À¤µ¤¤¡¥ + +¤Þ¤¿¡¤Á°¶¶ (maebashi@iij.ad.jp) ¤µ¤ó¤ò¤Ï¤¸¤á¤È¤·¤Æ¡¤widget-demo ¤Î°Ü¿¢¤ËºÝ¤· +¤ÆɬÍפȤʤä¿ Ruby ¤Î Tk ´ØÏ¢¥é¥¤¥Ö¥é¥ê½¤Àµ¤Ë¤Ä¤¤¤Æ¡¤ÌäÂêÅÀ¡¤¥Ð¥°¤Î»ØŦ¤ò¤· +¤Æ¤¤¤¿¤À¤¤¤¿Êý¡¹¤Ë¤â´¶¼ÕÃפ·¤Þ¤¹¡¥ + +¤½¤·¤ÆºÇ¸å¤ËºÇÂç¤Î´¶¼Õ¤ò Ruby À߷׼ԤΠ¤Þ¤Ä¤â¤È ¤æ¤­¤Ò¤í (matz@netlab.co.jp) +¤µ¤ó¤ËÊû¤²¤¿¤¤¤È»×¤¤¤Þ¤¹¡¥ diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.1st b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.1st new file mode 100644 index 0000000..e031f12 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.1st @@ -0,0 +1,18 @@ +There are Ruby/Tk demo scripts. + +Files with '.rb' extension are sub-scripts which are launched 'widget' +script. Those files don't work independently. Please call them from +'widget' script. + +If you want start some sub-scripts at same time when the launcher +script tarts, please give the sub-script names as arguments. +(e.g. /usr/local/bin/ruby widget button.rb entry1.rb text.rb ) +You can ommit '.rb' of the sub-scripts +(e.g. /usr/local/bin/ruby widget button entry1 text ) + +If you don't need launcher's main window, give -n option. +(e.g. /usr/local/bin/ruby widget -n button.rb entry1.rb text.rb ) + +Others (browse1, hello, and so on) are standalone scripts. + + 2004/04/14 Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.tkencoding b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.tkencoding new file mode 100644 index 0000000..f576bc5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/README.tkencoding @@ -0,0 +1,29 @@ +This is a original document of 'tkencoding.rb'. +The library 'tkencoding.rb' is obsolete. +Functions of tkencoding.rb is already included into Ruby/Tk. + +------------------------------------------------- +tkencoding.rb¤òÍѤ¤¤¿ÆüËܸì¤Îɽ¼¨¤Ë¤Ä¤¤¤Æ + +Copyright (C) 1999/07, Takaaki Tateishi + + +1. tkencoding.rb¤È¤Ï¡© + +tkencoding.rb¤ÏTcl/Tk8.1¤òÍøÍѤ·¤¿Ruby/Tk¤Î¤¿¤á¤Î¥é¥¤¥Ö¥é¥ê +¤Ç¤¹¡£tkencoding.rb¤òrequire¤¹¤ë¤³¤È¤Ë¤è¤Ã¤ÆWedget¤Ëɽ¼¨¤µ +¤ì¤ë¥Æ¥­¥¹¥È¤ÏÁ´¤Æunicode(UTF8)¤ØÊÑ´¹¤µ¤ì¤Þ¤¹¡£ + + +2. »È¤¤Êý + +tkencoding.rb¤òrequire¤·¤ÆTk.encoding¤Ç»ÈÍѤ·¤Æ¤¤¤ëʸ»ú¥³¡¼¥É +¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡£Î㤨¤Ð°Ê²¼¤Î¤è¤¦¤Ê´¶¤¸¤Ë¤Ê¤ê¤Þ¤¹¡£ + +---- +require 'tk' +require 'tkencoding' + +Tk.encoding = "euc-jp" +# Tk.encoding = "shiftjis" +--- diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/anilabel.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/anilabel.rb new file mode 100644 index 0000000..0b9bc73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/anilabel.rb @@ -0,0 +1,174 @@ +# +# animated label widget demo (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +if defined?($anilabel_demo) && $anilabel_demo + $anilabel_demo.destroy + $anilabel_demo = nil +end + +# demo toplevel widget +$anilabel_demo = TkToplevel.new {|w| + title("Animated Label Demonstration") + iconname("anilabel") + positionWindow(w) +} + +base_frame = TkFrame.new($anilabel_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "Four animated labels are displayed below; each of the labels on the left is animated by making the text message inside it appear to scroll, and the label on the right is animated by animating the image that it displays." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $anilabel_demo + $anilabel_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'anilabel'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# create frame for label demo +f_left = TkLabelFrame.new(base_frame, :text=>'Scrolling Texts') +f_right = TkLabelFrame.new(base_frame, :text=>'GIF Image') +Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both', + 'padx'=>10, 'pady'=>10) + +# animated label +class AnimatedTextLabel < TkLabel + def initialize(*args) + super(*args) + @timer = TkTimer.new{ _animation_callback } + @timer.loop_exec = -1 + # bind('Destroy'){ @timer.stop } + @btag = TkBindTag.new('Destroy'){ @timer.stop } + self.bindtags_unshift(@btag) + end + + def _animation_callback() + txt = self.text + self.text = (txt[1..-1] << txt[0]) + end + private :_animation_callback + + def start(interval) + @timer.set_interval(interval) + @timer.start + end + + def stop + @timer.stop + end +end + +# animated image +class AnimatedImageLabel < AnimatedTextLabel + def initialize(*args) + super(*args) + @destroy_image = false + @btag.bind_append('Destroy'){ + if @destroy_image + begin + self.image.delete + rescue + end + end + } + end + attr_accessor :destroy_image + + def _animation_callback() + img = self.image + + fmt = img.format + if fmt.kind_of?(Array) + if fmt[1].kind_of?(Hash) + # fmt == ['GIF', {'index'=>idx}] + idx = fmt[1]['index'] + else + # fmt == ['GIF', '-index', idx] :: Ruby1.8.2 returns this. + idx = fmt[2] + end + elsif fmt.kind_of?(String) && fmt =~ /GIF -index (\d+)/ + idx = $1.to_i + else + idx = -1 + end + + begin + img.format("GIF -index #{idx + 1}") + rescue => e + img.format("GIF -index 0") + end + end + private :_animation_callback +end + +# create labels +l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge, + :font=>{:family=>'Courier', :size=>10}) +l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove, + :font=>{:family=>'Courier', :size=>10}) +l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat, + :font=>{:family=>'Courier', :size=>10}, :width=>18) +Tk.pack(l1, l2, l3, + :side=>:top, :expand=>true, :anchor=>:w, :padx=>10, :pady=>10) + +limg = AnimatedImageLabel.new(f_right, :borderwidth=>0) +limg.pack(:side=>:top, :expand=>true, :padx=>10, :pady=>10) + +# base64-encoded animated GIF file +tclPowerdData = <'GIF', :data=>tclPowerdData)).start(100) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/aniwave.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/aniwave.rb new file mode 100644 index 0000000..63a04a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/aniwave.rb @@ -0,0 +1,118 @@ +# +# animated wave demo (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +# destroy toplevel widget for this demo script +if defined?($aniwave_demo) && $aniwave_demo + $aniwave_demo.destroy + $aniwave_demo = nil +end + +# create toplevel widget +$aniwave_demo = TkToplevel.new {|w| + title("Animated Wave Demonstration") + iconname("aniwave") + positionWindow(w) +} + +base_frame = TkFrame.new($aniwave_demo).pack(:fill=>:both, :expand=>true) + +# create label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text 'This demonstration contains a canvas widget with a line item inside it. The animation routines work by adjusting the coordinates list of the line.' +} +msg.pack('side'=>'top') + +# create frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $aniwave_demo + $aniwave_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'aniwave'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# animated wave +class AnimatedWaveDemo + def initialize(frame, dir=:left) + @direction = dir + + # create canvas widget + @c = TkCanvas.new(frame, :width=>300, :height=>200, + :background=>'black') + @c.pack(:padx=>10, :pady=>10, :expand=>true) + + # Creates a coordinates list of a wave. + @waveCoords = [] + @backupCoords = [] + n = 0 + (-10..300).step(5){|n| @waveCoords << [n, 100]; @backupCoords << [n, 100] } + n = 305 + @waveCoords << [n, 0]; @backupCoords << [n, 0] + @waveCoords << [n+5, 200]; @backupCoords << [n+5, 200] + @coordsLen = @waveCoords.length + + # Create a smoothed line and arrange for its coordinates to be the + # contents of the variable waveCoords. + @line = TkcLine.new(@c, @waveCoords, + :width=>1, :fill=>'green', :smooth=>true) + + # Main animation "loop". + # Theoretically 100 frames-per-second (==10ms between frames) + @timer = TkTimer.new(10){ basicMotion; reverser } + + # Arrange for the animation loop to stop when the canvas is deleted + @c.bindtags_unshift(TkBindTag.new('Destroy'){ @timer.stop }) + end + + # Basic motion handler. Given what direction the wave is travelling + # in, it advances the y coordinates in the coordinate-list one step in + # that direction. + def basicMotion + @backupCoords, @waveCoords = @waveCoords, @backupCoords + (0...@coordsLen).each{|idx| + if @direction == :left + @waveCoords[idx][1] = @backupCoords[(idx+1 == @coordsLen)? 0: idx+1][1] + else + @waveCoords[idx][1] = @backupCoords[(idx == 0)? -1: idx-1][1] + end + } + @line.coords(@waveCoords) + end + + # Oscillation handler. This detects whether to reverse the direction + # of the wave by checking to see if the peak of the wave has moved off + # the screen (whose size we know already.) + def reverser + if @waveCoords[0][1] < 10 + @direction = :right + elsif @waveCoords[-1][1] < 10 + @direction = :left + end + end + + # animation control + def move + @timer.start + end + + def stop + @timer.stop + end +end + +# Start the animation processing +AnimatedWaveDemo.new(base_frame, :left).move diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/arrow.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/arrow.rb new file mode 100644 index 0000000..055cd2a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/arrow.rb @@ -0,0 +1,249 @@ +# arrow.rb +# +# This demonstration script creates a canvas widget that displays a +# large line with an arrowhead whose shape can be edited interactively. +# +# arrowhead widget demo (called by 'widget') +# + +# arrowSetup -- +# This method regenerates all the text and graphics in the canvas +# window. It's called when the canvas is initially created, and also +# whenever any of the parameters of the arrow head are changed +# interactively. +# +# Arguments: +# c - Name of the canvas widget. + +def arrowSetup(c) + v = $demo_arrowInfo + + # Remember the current box, if there is one. + tags = c.gettags('current') + if tags != [] + cur = tags.find{|t| t.kind_of?(String) && t =~ /^box[1-3]$/ } + else + cur = nil + end + + # Create the arrow and outline. + c.delete('all') + TkcLine.new(c, v.x1, v.y, v.x2, v.y, + { 'width'=>10 * v.width, + 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c], + 'arrow'=>'last' + }.update(v.bigLineStyle) ) + xtip = v.x2 - 10*v.b + deltaY = 10*v.c + 5*v.width + TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY, + v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y, + 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round') + + # Create the boxes for reshaping the line and arrowhead. + TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5, + {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) ) + TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5, + {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) ) + TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5, + {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) ) + c.itemconfigure cur, v.activeStyle if cur + + # Create three arrows in actual size with the same parameters + TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2) + tmp = v.x2+100 + TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + + # Create a bunch of other arrows and text items showing the + # current dimensions. + tmp = v.x2+10 + TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w') + tmp = v.x1-10 + TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e') + tmp = v.y+5*v.width+10*v.c+10 + TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n') + tmp = tmp+25 + TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n') + + if $tk_version =~ /^4.*/ + TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w', + 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*') + TkcText.new(c, v.x1, 330, + 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",'anchor'=>'w', + 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*') + else + TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w', + 'font'=>'Helvetica 18') + TkcText.new(c, v.x1, 330, + 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", + 'anchor'=>'w', 'font'=>'Helvetica 18') + end + + v.count += 1 +end + +# toplevel widget +if defined?($arrow_demo) && $arrow_demo + $arrow_demo.destroy + $arrow_demo = nil +end + +# demo toplevel widget +$arrow_demo = TkToplevel.new {|w| + title("Arrowhead Editor Demonstration") + iconname("arrow") + positionWindow(w) +} + +base_frame = TkFrame.new($arrow_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"This widget allows you to experiment with different widths and arrowhead shapes for lines in canvases. To change the line width or the shape of the arrowhead, drag any of the three boxes attached to the oversized arrow. The arrows on the right give examples at normal scale. The text at the bottom shows the configuration options as you'd enter them for a canvas line item."){ + pack('side'=>'top') +} + +# frame +$arrow_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $arrow_demo + $arrow_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'arrow'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas +$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350, + 'relief'=>'sunken', 'borderwidth'=>2) +$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both') + +# +unless Struct.const_defined?("ArrowInfo") + $demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc, + :x1, :x2, :y, :smallTips, :count, + :bigLineStyle, :boxStyle, :activeStyle).new +end +$demo_arrowInfo.a = 8 +$demo_arrowInfo.b = 10 +$demo_arrowInfo.c = 3 +$demo_arrowInfo.width = 2 +$demo_arrowInfo.motionProc = proc{} +$demo_arrowInfo.x1 = 40 +$demo_arrowInfo.x2 = 350 +$demo_arrowInfo.y = 150 +$demo_arrowInfo.smallTips = [5, 5, 2] +$demo_arrowInfo.count = 0 +if TkWinfo.depth($arrow_canvas) > 1 + $demo_arrowInfo.bigLineStyle = {'fill'=>'SkyBlue1'} + $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1} + $demo_arrowInfo.activeStyle = {'fill'=>'red', 'outline'=>'black', 'width'=>1} +else + $demo_arrowInfo.bigLineStyle = {'fill'=>'black', + 'stipple'=>'@'+[$demo_dir,'..','images','grey.25'].join(File::Separator)} + $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1} + $demo_arrowInfo.activeStyle = {'fill'=>'black','outline'=>'black','width'=>1} +end +$arrowTag_box = TkcTag.new($arrow_canvas) +arrowSetup $arrow_canvas +$arrowTag_box.bind('Enter', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.activeStyle)}) +$arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.boxStyle)}) +$arrowTag_box.bind('B1-Enter', proc{}) +$arrowTag_box.bind('B1-Leave', proc{}) +$arrow_canvas.itembind('box1', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove1 $arrow_canvas, x, y}}) +$arrow_canvas.itembind('box2', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove2 $arrow_canvas, x, y}}) +$arrow_canvas.itembind('box3', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove3 $arrow_canvas, x, y}}) +$arrowTag_box.bind('B1-Motion', + proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y") +$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas}) + +# arrowMove1 -- +# This method is called for each mouse motion event on box1 (the +# one at the vertex of the arrow). It updates the controlling parameters +# for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove1(c,x,y) + v = $demo_arrowInfo + newA = (v.x2+5-c.canvasx(x).round)/10 + newA = 0 if newA < 0 + newA = 25 if newA > 25 + if newA != v.a + c.move('box1', 10*(v.a-newA), 0) + v.a = newA + end +end + +# arrowMove2 -- +# This method is called for each mouse motion event on box2 (the +# one at the trailing tip of the arrowhead). It updates the controlling +# parameters for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove2(c,x,y) + v = $demo_arrowInfo + newB = (v.x2+5-c.canvasx(x).round)/10 + newB = 0 if newB < 0 + newB = 25 if newB > 25 + newC = (v.y+5-c.canvasy(y).round-5*v.width)/10 + newC = 0 if newC < 0 + newC = 20 if newC > 20 + if newB != v.b || newC != v.c + c.move('box2', 10*(v.b-newB), 10*(v.c-newC)) + v.b = newB + v.c = newC + end +end + +# arrowMove3 -- +# This method is called for each mouse motion event on box3 (the +# one that controls the thickness of the line). It updates the +# controlling parameters for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove3(c,x,y) + v = $demo_arrowInfo + newWidth = (v.y+2-c.canvasy(y).round)/5 + newWidth = 0 if newWidth < 0 + newWidth = 20 if newWidth > 20 + if newWidth != v.width + c.move('box3', 0, 5*(v.width-newWidth)) + v.width = newWidth + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bind.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bind.rb new file mode 100644 index 0000000..665592a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bind.rb @@ -0,0 +1,127 @@ +# bind.rb +# +# This demonstration script creates a text widget with bindings set +# up for hypertext-like effects. +# +# text (tag bindings) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($bind_demo) && $bind_demo + $bind_demo.destroy + $bind_demo = nil +end + +# demo toplevel widget +$bind_demo = TkToplevel.new {|w| + title("Text Demonstration - Tag Bindings") + iconname("bind") + positionWindow(w) +} + +base_frame = TkFrame.new($bind_demo).pack(:fill=>:both, :expand=>true) + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $bind_demo + $bind_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'bind'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# bind +def tag_binding_for_bind_demo(tag, enter_style, leave_style) + tag.bind('Any-Enter', proc{tag.configure enter_style}) + tag.bind('Any-Leave', proc{tag.configure leave_style}) +end + +# text +txt = TkText.new(base_frame){|t| + # + setgrid 'true' + #width 60 + #height 24 + font $font + wrap 'word' + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # + if TkWinfo.depth($root).to_i > 1 + tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised', + 'borderwidth'=>1} + tagstyle_normal = {'background'=>'', 'relief'=>'flat'} + else + tagstyle_bold = {'foreground'=>'white', 'background'=>'black'} + tagstyle_normal = {'foreground'=>'', 'background'=>''} + end + + # insert text + insert 'insert', "The same tag mechanism that controls display styles in text widgets can also be used to associate Tcl commands with regions of text, so that mouse or keyboard actions on the text cause particular Tcl commands to be invoked. For example, in the text below the descriptions of the canvas demonstrations have been tagged. When you move the mouse over a demo description the description lights up, and when you press button 1 over a description then that particular demonstration is invoked. + +" + insert('end', '1. Samples of all the different types of items that can be created in canvas widgets.', (d1 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '2. A simple two-dimensional plot that allows you to adjust the positions of the data points.', (d2 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '3. Anchoring and justification modes for text items.', + (d3 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '4. An editor for arrow-head shapes for line items.', + (d4 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '5. A ruler with facilities for editing tab stops.', + (d5 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', + '6. A grid that demonstrates how canvases can be scrolled.', + (d6 = TkTextTag.new(t)) ) + + # binding + [d1, d2, d3, d4, d5, d6].each{|tag| + tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal) + } + d1.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, 'items.rb') + }) + d2.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, 'plot.rb') + }) + d3.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, 'ctext.rb') + }) + d4.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, 'arrow.rb') + }) + d5.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, 'ruler.rb') + }) + d6.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, 'cscroll.rb') + }) + + TkTextMarkInsert.new(t, '0.0') + configure('state','disabled') +} + +txt.width 60 +txt.height 24 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bitmap.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bitmap.rb new file mode 100644 index 0000000..133adb0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/bitmap.rb @@ -0,0 +1,75 @@ +# bitmap.rb +# +# This demonstration script creates a toplevel window that displays +# all of Tk's built-in bitmaps.# +# bitmap widget demo (called by 'widget') +# + +# bitmapRow -- +# Create a row of bitmap items in a window. +# +# Arguments: +# w - The parent window that is to contain the row. +# args - The names of one or more bitmaps, which will be displayed +# in a new row across the bottom of w along with their +# names. + +def bitmapRow(w,*args) + TkFrame.new(w){|row| + pack('side'=>'top', 'fill'=>'both') + for bitmap in args + TkFrame.new(row){|base| + pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c') + TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom') + Tk::Label.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom') + } + end + } +end + +# toplevel widget +if defined?($bitmap_demo) && $bitmap_demo + $bitmap_demo.destroy + $bitmap_demo = nil +end + +# demo toplevel widget +$bitmap_demo = TkToplevel.new {|w| + title("Bitmap Demonstration") + iconname("bitmap") + positionWindow(w) +} + +base_frame = TkFrame.new($bitmap_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"This window displays all of Tk's built-in bitmaps, along with the names you can use for them in Tcl scripts."){ + pack('side'=>'top') +} + +# frame +$bitmap_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $bitmap_demo + $bitmap_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'bitmap'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$bitmap_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +TkFrame.new(base_frame){|f| + bitmapRow(f,'error','gray25','gray50','hourglass') + bitmapRow(f,'info','question','questhead','warning') + pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both') +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse1 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse1 new file mode 100644 index 0000000..03e2510 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse1 @@ -0,0 +1,63 @@ +#!/usr/bin/env ruby + +# browse -- +# This script generates a directory browser, which lists the working +# directory and allow you to open files or subdirectories by +# double-clicking. + +require 'tk' + +# Create a scrollbar on the right side of the main window and a listbox +# on the left side. + +listbox = TkListbox.new(nil, 'relief'=>'sunken', + 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l| + TkScrollbar.new(nil, 'command'=>proc{|*args| l.yview *args}) {|s| + pack('side'=>'right', 'fill'=>'y') + l.yscrollcommand(proc{|first,last| s.set(first,last)}) + } + + pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') +} + +root = TkRoot.new +root.minsize(1,1) + +# The procedure below is invoked to open a browser on a given file; if the +# file is a directory then another instance of this program is invoked; if +# the file is a regular file then the Mx editor is invoked to display +# the file. + +def browse (dir, file) + file = dir + File::Separator + file if dir != '.' + type = File.ftype(file) + if type == 'directory' + system($0 + ' ' + file + ' &') + else + if type == 'file' + if ENV['EDITOR'] + system(ENV['EDITOR'] + ' ' + file + ' &') + else + system('xedit ' + file + ' &') + end + else + STDOUT.print "\"#{file}\" isn't a directory or regular file" + end + end +end + +# Fill the listbox with a list of all the files in the directory (run +# the "ls" command to get that information). + +dir = ARGV[0] ? ARGV[0] : '.' +open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname| + listbox.insert('end', fname.chomp) +} + +# Set up bindings for the browser. + +Tk.bind_all('Control-c', proc{root.destroy}) +listbox.bind('Double-Button-1', + proc{TkSelection.get.each{|f| browse dir, f}}) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse2 new file mode 100644 index 0000000..edad04d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/browse2 @@ -0,0 +1,82 @@ +#!/usr/bin/env ruby + +# browse -- +# This script generates a directory browser, which lists the working +# directory and allow you to open files or subdirectories by +# double-clicking. + +require 'tk' + +class Browse + BROWSE_WIN_COUNTER = TkVariable.new(0) + + def initialize(dir) + BROWSE_WIN_COUNTER.value = BROWSE_WIN_COUNTER.to_i + 1 + + # create base frame + base = TkToplevel.new { + minsize(1,1) + title('Browse : ' + dir) + } + + # Create a scrollbar on the right side of the main window and a listbox + # on the left side. + list = TkListbox.new(base, 'relief'=>'sunken', + 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l| + TkScrollbar.new(base, 'command'=>proc{|*args| l.yview *args}) {|s| + pack('side'=>'right', 'fill'=>'y') + l.yscrollcommand(proc{|first,last| s.set(first,last)}) + } + + pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') + + # Fill the listbox with a list of all the files in the directory (run + # the "ls" command to get that information). + open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname| + l.insert('end', fname.chomp) + } + + } + + # Set up bindings for the browser. + base.bind('Destroy', proc{ + Browse::BROWSE_WIN_COUNTER.value = \ + Browse::BROWSE_WIN_COUNTER.to_i - 1 + }) + base.bind('Control-c', proc{base.destroy}) + list.bind('Double-Button-1', + proc{TkSelection.get.each{|f| self.browse dir, f}}) + end + + # The method below is invoked to open a browser on a given file; if the + # file is a directory then another instance of this program is invoked; if + # the file is a regular file then the Mx editor is invoked to display + # the file. + def browse (dir, file) + file = dir + File::Separator + file if dir != '.' + type = File.ftype(file) + if type == 'directory' + Browse.new(file) + else + if type == 'file' + if ENV['EDITOR'] + system(ENV['EDITOR'] + ' ' + file + ' &') + else + system('xedit ' + file + ' &') + end + else + STDOUT.print "\"#{file}\" isn't a directory or regular file" + end + end + end + +end + +Browse.new(ARGV[0] ? ARGV[0] : '.') + +TkRoot.new { + withdraw + Browse::BROWSE_WIN_COUNTER.trace('w', proc{exit if Browse::BROWSE_WIN_COUNTER.to_i == 0}) +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/button.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/button.rb new file mode 100644 index 0000000..5c03bd4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/button.rb @@ -0,0 +1,84 @@ +# button.rb +# +# This demonstration script creates a toplevel window containing +# several button widgets. +# +# button widget demo (called by 'widget') +# + +# toplevel widget +if defined?($button_demo) && $button_demo + $button_demo.destroy + $button_demo = nil +end + +# demo toplevel widget +$button_demo = TkToplevel.new {|w| + title("Button Demonstration") + iconname("button") + positionWindow(w) +} + +# label +msg = TkLabel.new($button_demo) { + font $kanji_font + wraplength '4i' + justify 'left' + text "If you click on any of the four buttons below, the background of the button area will change to the color indicated in the button. You can press Tab to move among the buttons, then press Space to invoke the current button." +} +msg.pack('side'=>'top') + +# frame +$button_buttons = Tk::Frame.new($button_demo) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $button_demo + $button_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'button'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# button +TkButton.new($button_demo){ + text "Peach Puff" + width 10 + command proc{ + $button_demo.configure('bg','PeachPuff1') + $button_buttons.configure('bg','PeachPuff1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Light Blue" + width 10 + command proc{ + $button_demo.configure('bg','LightBlue1') + $button_buttons.configure('bg','LightBlue1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Sea Green" + width 10 + command proc{ + $button_demo.configure('bg','SeaGreen2') + $button_buttons.configure('bg','SeaGreen2') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Yellow" + width 10 + command proc{ + $button_demo.configure('bg','Yellow1') + $button_buttons.configure('bg','Yellow1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check.rb new file mode 100644 index 0000000..2951962 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check.rb @@ -0,0 +1,72 @@ +# check.rb +# +# This demonstration script creates a toplevel window containing +# several checkbuttons. +# +# checkbutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($check_demo) && $check_demo + $check_demo.destroy + $check_demo = nil +end + +# demo toplevel widget +$check_demo = TkToplevel.new {|w| + title("Checkbutton Demonstration") + iconname("check") + positionWindow(w) +} + +base_frame = TkFrame.new($check_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "Three checkbuttons are displayed below. If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton. Click the \"See Variables\" button to see the current values of the variables." +} +msg.pack('side'=>'top') + +# +wipers = TkVariable.new(0) +brakes = TkVariable.new(0) +sober = TkVariable.new(0) + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $check_demo + $check_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'check'} + }.pack('side'=>'left', 'expand'=>'yes') + + + TkButton.new(frame) { + text 'See Variables' + command proc{ + showVars(base_frame, + ['wipers', wipers], ['brakes', brakes], ['sober', sober]) + } + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +# checkbutton +[ TkCheckButton.new(base_frame, 'text'=>'Wipers OK', 'variable'=>wipers), + TkCheckButton.new(base_frame, 'text'=>'Brakes OK', 'variable'=>brakes), + TkCheckButton.new(base_frame, 'text'=>'Driver Sober', 'variable'=>sober) +].each{|w| w.relief('flat'); w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check2.rb new file mode 100644 index 0000000..faea748 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/check2.rb @@ -0,0 +1,109 @@ +# +# checkbutton widget demo2 (called by 'widget') +# + +# delete old toplevel widget +if defined?($check2_demo) && $check2_demo + $check2_demo.destroy + $check2_demo = nil +end + +# create demo toplevel widget +$check2_demo = TkToplevel.new {|w| + title("Checkbutton Demonstration 2") + iconname("check2") + positionWindow(w) +} + +base_frame = TkFrame.new($check2_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "Four checkbuttons are displayed below. If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton. The first button also follows the state of the other three. If only some of the three are checked, the first button will display the tri-state mode. Click the \"See Variables\" button to see the current values of the variables." +} +msg.pack('side'=>'top') + +# variable +safety = TkVariable.new(0) +wipers = TkVariable.new(0) +brakes = TkVariable.new(0) +sober = TkVariable.new(0) + +# frame +TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'See Variables', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars($check2_demo, + ['safety', safety], ['wipers', wipers], + ['brakes', brakes], ['sober', sober]) + }), + TkButton.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'check2'}), + TkButton.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $check2_demo + $check2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) +}.pack('side'=>'bottom', 'fill'=>'x') + + +# checkbutton +TkCheckButton.new(base_frame, :text=>'Safety Check', :variable=>safety, + :relief=>:flat, :onvalue=>'all', :offvalue=>'none', + :tristatevalue=>'partial'){ + pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + +[ TkCheckButton.new(base_frame, 'text'=>'Wipers OK', 'variable'=>wipers), + TkCheckButton.new(base_frame, 'text'=>'Brakes OK', 'variable'=>brakes), + TkCheckButton.new(base_frame, 'text'=>'Driver Sober', 'variable'=>sober) +].each{|w| + w.relief('flat') + w.pack('side'=>'top', 'padx'=>15, 'pady'=>2, 'anchor'=>'w') +} + +# tristate check +in_check = false +tristate_check = proc{|n1,n2,op| + unless in_check + in_check = true + begin + if n1 == safety + if safety == 'none' + wipers.value = 0 + brakes.value = 0 + sober.value = 0 + elsif safety == 'all' + wipers.value = 1 + brakes.value = 1 + sober.value = 1 + end + else + if wipers == 1 && brakes == 1 && sober == 1 + safety.value = 'all' + elsif wipers == 1 || brakes == 1 || sober == 1 + safety.value = 'partial' + else + safety.value = 'none' + end + end + ensure + in_check = false + end + end +} + +[wipers, brakes, sober, safety].each{|v| v.trace('w', tristate_check)} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/clrpick.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/clrpick.rb new file mode 100644 index 0000000..431439d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/clrpick.rb @@ -0,0 +1,87 @@ +# clrpick.rb +# +# This demonstration script prompts the user to select a color. +# +# widget demo prompts the user to select a color (called by 'widget') +# +# Note: don't support ttk_wrapper. work with standard widgets only. +# + +# toplevel widget +if defined?($clrpick_demo) && $clrpick_demo + $clrpick_demo.destroy + $clrpick_demo = nil +end + +# demo toplevel widget +$clrpick_demo = TkToplevel.new {|w| + title("Color Selection Dialogs") + iconname("colors") + positionWindow(w) +} + +base_frame = TkFrame.new($clrpick_demo).pack(:fill=>:both, :expand=>true) + +# label +#TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left', +Tk::Label.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"Press the buttons below to choose the foreground and background colors for the widgets in this window.").pack('side'=>'top') + +# frame +#TkFrame.new($clrpick_demo) {|frame| +Tk::Frame.new($clrpick_demo) {|frame| + # TkButton.new(frame) { + Tk::Button.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $clrpick_demo + $clrpick_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + # TkButton.new(frame) { + Tk::Button.new(frame) { + text 'Show Code' + command proc{showCode 'clrpick'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# button +# TkButton.new($clrpick_demo, 'text'=>'Set background color ...') {|b| +Tk::Button.new($clrpick_demo, 'text'=>'Set background color ...') {|b| + command(proc{setColor $clrpick_demo, b, 'background', + ['background', 'highlightbackground']}) + pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m') +} + +# TkButton.new($clrpick_demo, 'text'=>'Set foreground color ...') {|b| +Tk::Button.new($clrpick_demo, 'text'=>'Set foreground color ...') {|b| + command(proc{setColor $clrpick_demo, b, 'foreground', ['foreground']}) + pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m') +} + +def setColor(w,button,name,options) + w.grab + initialColor = button[name] + color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w, + 'initialcolor'=>initialColor) + if color != "" + setColor_helper(w,options,color) + end + + w.grab('release') +end + +def setColor_helper(w, options, color) + options.each{|opt| + begin + w[opt] = color + rescue + end + } + TkWinfo.children(w).each{|child| + setColor_helper child, options, color + } +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/colors.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/colors.rb new file mode 100644 index 0000000..4300a66 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/colors.rb @@ -0,0 +1,158 @@ +# colors.rb +# +# This demonstration script creates a listbox widget that displays +# many of the colors from the X color database. You can click on +# a color to change the application's palette. +# +# listbox widget demo 'colors' (called by 'widget') +# + +# toplevel widget +if defined?($colors_demo) && $colors_demo + $colors_demo.destroy + $colors_demo = nil +end + +# demo toplevel widget +$colors_demo = TkToplevel.new {|w| + title("Listbox Demonstration (colors)") + iconname("colors") + positionWindow(w) +} + +base_frame = TkFrame.new($colors_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "A listbox containing several color names is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by dragging in the listbox window with button 2 pressed. If you double-click button 1 on a color, then the application's color palette will be set to match that color" +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $colors_demo + $colors_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'colors'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +colors_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + s = TkScrollbar.new(w) + colors_lbox = TkListbox.new(w) { + setgrid 1 + width 10 + height 12 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| colors_lbox.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + colors_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both') +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +#colors_lbox.bind('Double-1', proc{TkPalette.setPalette TkSelection.get}) +colors_lbox.bind('Double-1', proc{ + begin + TkPalette.setPalette TkSelection.get + rescue => e + p e + Tk.tk_call_without_enc('destroy', '.___tk_set_palette') + end + }) + +ins_data = [ + 'gray60','gray70','gray80','gray85','gray90','gray95', + 'snow1','snow2','snow3','snow4','seashell1','seashell2', + 'seashell3','seashell4','AntiqueWhite1','AntiqueWhite2', + 'AntiqueWhite3','AntiqueWhite4','bisque1','bisque2', + 'bisque3','bisque4','PeachPuff1','PeachPuff2', + 'PeachPuff3','PeachPuff4','NavajoWhite1','NavajoWhite2', + 'NavajoWhite3','NavajoWhite4','LemonChiffon1', + 'LemonChiffon2','LemonChiffon3','LemonChiffon4', + 'cornsilk1','cornsilk2','cornsilk3','cornsilk4', + 'ivory1','ivory2','ivory3','ivory4','honeydew1', + 'honeydew2','honeydew3','honeydew4','LavenderBlush1', + 'LavenderBlush2','LavenderBlush3','LavenderBlush4', + 'MistyRose1','MistyRose2','MistyRose3','MistyRose4', + 'azure1','azure2','azure3','azure4','SlateBlue1', + 'SlateBlue2','SlateBlue3','SlateBlue4','RoyalBlue1', + 'RoyalBlue2','RoyalBlue3','RoyalBlue4','blue1','blue2', + 'blue3','blue4','DodgerBlue1','DodgerBlue2', + 'DodgerBlue3','DodgerBlue4','SteelBlue1','SteelBlue2', + 'SteelBlue3','SteelBlue4','DeepSkyBlue1','DeepSkyBlue2', + 'DeepSkyBlue3','DeepSkyBlue4','SkyBlue1','SkyBlue2', + 'SkyBlue3','SkyBlue4','LightSkyBlue1','LightSkyBlue2', + 'LightSkyBlue3','LightSkyBlue4','SlateGray1', + 'SlateGray2','SlateGray3','SlateGray4', + 'LightSteelBlue1','LightSteelBlue2','LightSteelBlue3', + 'LightSteelBlue4','LightBlue1','LightBlue2', + 'LightBlue3','LightBlue4','LightCyan1','LightCyan2', + 'LightCyan3','LightCyan4','PaleTurquoise1', + 'PaleTurquoise2','PaleTurquoise3','PaleTurquoise4', + 'CadetBlue1','CadetBlue2','CadetBlue3','CadetBlue4', + 'turquoise1','turquoise2','turquoise3','turquoise4', + 'cyan1','cyan2','cyan3','cyan4','DarkSlateGray1', + 'DarkSlateGray2','DarkSlateGray3','DarkSlateGray4', + 'aquamarine1','aquamarine2','aquamarine3','aquamarine4', + 'DarkSeaGreen1','DarkSeaGreen2','DarkSeaGreen3', + 'DarkSeaGreen4','SeaGreen1','SeaGreen2','SeaGreen3', + 'SeaGreen4','PaleGreen1','PaleGreen2','PaleGreen3', + 'PaleGreen4','SpringGreen1','SpringGreen2', + 'SpringGreen3','SpringGreen4','green1','green2', + 'green3','green4','chartreuse1','chartreuse2', + 'chartreuse3','chartreuse4','OliveDrab1','OliveDrab2', + 'OliveDrab3','OliveDrab4','DarkOliveGreen1', + 'DarkOliveGreen2','DarkOliveGreen3','DarkOliveGreen4', + 'khaki1','khaki2','khaki3','khaki4','LightGoldenrod1', + 'LightGoldenrod2','LightGoldenrod3','LightGoldenrod4', + 'LightYellow1','LightYellow2','LightYellow3', + 'LightYellow4','yellow1','yellow2','yellow3','yellow4', + 'gold1','gold2','gold3','gold4','goldenrod1', + 'goldenrod2','goldenrod3','goldenrod4','DarkGoldenrod1', + 'DarkGoldenrod2','DarkGoldenrod3','DarkGoldenrod4', + 'RosyBrown1','RosyBrown2','RosyBrown3','RosyBrown4', + 'IndianRed1','IndianRed2','IndianRed3','IndianRed4', + 'sienna1','sienna2','sienna3','sienna4','burlywood1', + 'burlywood2','burlywood3','burlywood4','wheat1', + 'wheat2','wheat3','wheat4','tan1','tan2','tan3','tan4', + 'chocolate1','chocolate2','chocolate3','chocolate4', + 'firebrick1','firebrick2','firebrick3','firebrick4', + 'brown1','brown2','brown3','brown4','salmon1','salmon2', + 'salmon3','salmon4','LightSalmon1','LightSalmon2', + 'LightSalmon3','LightSalmon4','orange1','orange2', + 'orange3','orange4','DarkOrange1','DarkOrange2', + 'DarkOrange3','DarkOrange4','coral1','coral2','coral3', + 'coral4','tomato1','tomato2','tomato3','tomato4', + 'OrangeRed1','OrangeRed2','OrangeRed3','OrangeRed4', + 'red1','red2','red3','red4','DeepPink1','DeepPink2', + 'DeepPink3','DeepPink4','HotPink1','HotPink2', + 'HotPink3','HotPink4','pink1','pink2','pink3','pink4', + 'LightPink1','LightPink2','LightPink3','LightPink4', + 'PaleVioletRed1','PaleVioletRed2','PaleVioletRed3', + 'PaleVioletRed4','maroon1','maroon2','maroon3', + 'maroon4','VioletRed1','VioletRed2','VioletRed3', + 'VioletRed4','magenta1','magenta2','magenta3', + 'magenta4','orchid1','orchid2','orchid3','orchid4', + 'plum1','plum2','plum3','plum4','MediumOrchid1', + 'MediumOrchid2','MediumOrchid3','MediumOrchid4', + 'DarkOrchid1','DarkOrchid2','DarkOrchid3', + 'DarkOrchid4','purple1','purple2','purple3','purple4', + 'MediumPurple1','MediumPurple2','MediumPurple3', + 'MediumPurple4','thistle1','thistle2','thistle3', 'thistle4' +] + +colors_lbox.insert(0, *ins_data) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/combo.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/combo.rb new file mode 100644 index 0000000..0907d9e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/combo.rb @@ -0,0 +1,96 @@ +# combo.rb -- +# +# This demonstration script creates several combobox widgets. +# +# based on "Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($combo_demo) && $combo_demo + $combo_demo.destroy + $combo_demo = nil +end + +$combo_demo = TkToplevel.new {|w| + title("Combobox Demonstration") + iconname("combo") + positionWindow(w) +} + +base_frame = TkFrame.new($combo_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top, :fill=>:x) +Three different combo-boxes are displayed below. \ +You can add characters to the first \ +one by pointing, clicking and typing, just as with an entry; pressing \ +Return will cause the current value to be added to the list that is \ +selectable from the drop-down list, and you can choose other values \ +by pressing the Down key, using the arrow keys to pick another one, \ +and pressing Return again. The second combo-box is fixed to a \ +particular value, and cannot be modified at all. The third one only \ +allows you to select values from its drop-down list of Australian \ +cities. +EOL + +## variables +firstValue = TkVariable.new +secondValue = TkVariable.new +ozCity = TkVariable.new + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Variables', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, + ['firstVariable', firstValue], + ['secondVariable', secondValue], + ['ozCity', ozCity]) + }), + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'combo'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $combo_demo.destroy + $combo_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +australianCities = [ + 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide', 'Brisbane', + 'Hobart', 'Darwin', 'Alice Springs' +] + + +secondValue.value = 'unchangable' +ozCity.value = 'Sydney' + +Tk.pack(Ttk::Labelframe.new(frame, :text=>'Fully Editable'){|f| + Ttk::Combobox.new(f, :textvariable=>firstValue){|b| + b.bind('Return', '%W'){|w| + w.values <<= w.value unless w.values.include?(w.value) + } + }.pack(:pady=>5, :padx=>10) + }, + + Ttk::LabelFrame.new(frame, :text=>'Disabled'){|f| + Ttk::Combobox.new(f, :textvariable=>secondValue, :state=>:disabled) . + pack(:pady=>5, :padx=>10) + }, + + Ttk::LabelFrame.new(frame, :text=>'Defined List Only'){|f| + Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly, + :values=>australianCities) . + pack(:pady=>5, :padx=>10) + }, + + :side=>:top, :pady=>5, :padx=>10) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/cscroll.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/cscroll.rb new file mode 100644 index 0000000..259ed3b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/cscroll.rb @@ -0,0 +1,136 @@ +# cscroll.rb +# +# This demonstration script creates a simple canvas that can be +# scrolled in two dimensions. +# +# simple scrollable canvas widget demo (called by 'widget') +# + +# toplevel widget +if defined?($cscroll_demo) && $cscroll_demo + $cscroll_demo.destroy + $cscroll_demo = nil +end + +# demo toplevel widget +$cscroll_demo = TkToplevel.new {|w| + title("Scrollable Canvas Demonstration") + iconname("cscroll") + positionWindow(w) +} + +base_frame = TkFrame.new($cscroll_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', + 'justify'=>'left', 'text'=>"This window displays a canvas widget that can be scrolled either using the scrollbars or by dragging with button 2 in the canvas. If you click button 1 on one of the rectangles, its indices will be printed on stdout."){ + pack('side'=>'top') +} + +# frame +$cscroll_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $cscroll_demo + $cscroll_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'cscroll'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$cscroll_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +unless $tk_version =~ /^4\.[01]/ + $cscroll_grid = TkFrame.new(base_frame) { + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + } + TkGrid.rowconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0) +end + +# canvas +$cscroll_canvas = TkCanvas.new(base_frame, + 'relief'=>'sunken', 'borderwidth'=>2, + 'scrollregion'=>['-11c', '-11c', '50c', '20c'] + ) {|c| + if $tk_version =~ /^4\.[01]/ + pack('expand'=>'yes', 'fill'=>'both') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}) {|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + if $tk_version =~ /^4\.[01]/ + pack('side'=>'right', 'fill'=>'y') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + } + + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}) {|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + if $tk_version =~ /^4\.[01]/ + pack('side'=>'bottom', 'fill'=>'x') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + } +} + +bg = $cscroll_canvas.configinfo('bg')[4] +(0..19).each{|i| + x = -10+3*i + y = -10 + (0..9).each{|j| + TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c", + 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect') + TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c", + 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text') + y += 3 + } +} + +$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas}) +$cscroll_canvas.itembind('all', 'Any-Leave', proc{scrollLeave $cscroll_canvas}) +$cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas}) +$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas}) +$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y') +$cscroll_canvas.bind('B2-Motion', + proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y') + +def scrollEnter(c) + id = c.find_withtag('current')[0].id + id -= 1 if c.gettags('current').include?('text') + $oldFill = c.itemconfiginfo(id, 'fill')[4] + if TkWinfo.depth(c) > 1 + c.itemconfigure(id, 'fill'=>'SeaGreen1') + else + c.itemconfigure(id, 'fill'=>'black') + c.itemconfigure(id+1, 'fill'=>'white') + end +end + +def scrollLeave(c) + id = c.find_withtag('current')[0].id + id -= 1 if c.gettags('current').include?('text') + c.itemconfigure(id, 'fill'=>$oldFill) + c.itemconfigure(id+1, 'fill'=>'black') +end + +def scrollButton(c) + id = c.find_withtag('current')[0].id + id += 1 unless c.gettags('current').include?('text') + print "You buttoned at #{c.itemconfiginfo(id,'text')[4]}\n" +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ctext.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ctext.rb new file mode 100644 index 0000000..01374b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ctext.rb @@ -0,0 +1,207 @@ +# ctext.rb +# +# This demonstration script creates a canvas widget with a text +# item that can be edited and reconfigured in various ways. +# +# Canvas Text widget demo (called by 'widget') +# + +# toplevel widget +if defined?($ctext_demo) && $ctext_demo + $ctext_demo.destroy + $ctext_demo = nil +end + +# demo toplevel widget +$ctext_demo = TkToplevel.new {|w| + title("Canvas Text Demonstration") + iconname("Text") + positionWindow(w) +} + +base_frame = TkFrame.new($ctext_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"This window displays a string of text to demonstrate the text facilities of canvas widgets. You can click in the boxes to adjust the position of the text relative to its positioning point or change its justification. The text also supports the following simple bindings for editing: + 1. You can point, click, and type. + 2. You can also select with button 1. + 3. You can copy the selection to the mouse position with button 2. + 4. Backspace and Control+h delete the selection if there is one; + otherwise they delete the character just before the insertion cursor. + 5. Delete deletes the selection if there is one; otherwise it deletes + the character just after the insertion cursor."){ + pack('side'=>'top') +} + +# frame +$ctext_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $ctext_demo + $ctext_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'ctext'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas +$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat', + 'borderwidth'=>0, 'width'=>500, 'height'=>350) +$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both') + +# font +if $tk_version =~ /^4.*/ + textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*' +else + textFont = 'Helvetica 24' +end + +# canvas +TkcRectangle.new($ctext_canvas, 245, 195, 255, 205, + 'outline'=>'black', 'fill'=>'red') + +ctag_text_param = { + 'text'=>"This is just a string of text to demonstrate the text facilities of canvas widgets. Bindings have been been defined to support editing (see above).", + 'width'=>440, 'anchor'=>'n', 'justify'=>'left' +} +if $tk_version =~ /^4.*/ + ctag_text_param['font'] = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*' +else + ctag_text_param['font'] = 'Helvetica 24' +end + +$ctag_text = TkcTag.new($ctext_canvas) +$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200, ctag_text_param)) + +$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('Shift-1', + proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"}, + "%x %y") +$ctag_text.bind('Shift-B1-Motion', + proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A") +$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"}) +$ctag_text.bind('Control-h', proc{textBs $ctext_canvas}) +$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas}) +$ctag_text.bind('Delete', proc{textDel $ctext_canvas}) +$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"}, + "%x %y") + +# Next, create some items that allow the text's anchor position +# to be edited. + +def mkTextConfig(w,x,y,option,value,color) + item = TkcRectangle.new(w, x, y, x+30, y+30, + 'outline'=>'black', 'fill'=>color, 'width'=>1) + item.bind('1', proc{$ctag_text.configure option, value}) + w.addtag_withtag('config', item) +end + +x = 50 +y = 50 +color = 'LightSkyBlue1' +mkTextConfig $ctext_canvas, x, y, 'anchor', 'se', color +mkTextConfig $ctext_canvas, x+30, y, 'anchor', 's', color +mkTextConfig $ctext_canvas, x+60, y, 'anchor', 'sw', color +mkTextConfig $ctext_canvas, x, y+30, 'anchor', 'e', color +mkTextConfig $ctext_canvas, x+30, y+30, 'anchor', 'center', color +mkTextConfig $ctext_canvas, x+60, y+30, 'anchor', 'w', color +mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color +mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color +mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color +item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50, + 'outline'=>'black', 'fill'=>'red') +item.bind('1', proc{$ctag_text.configure 'anchor', 'center'}) +if $tk_version =~ /^4.*/ + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', + 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*', + 'anchor'=>'s', 'fill'=>'brown') +else + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', + 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown') +end + +# Lastly, create some items that allow the text's justification to be +# changed. + +x = 350 +y = 50 +color = 'SeaGreen2' +mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color +mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color +mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color +if $tk_version =~ /^4.*/ + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', + 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*', + 'anchor'=>'s', 'fill'=>'brown') +else + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', + 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown') +end + +$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas}) +$ctext_canvas.itembind('config', 'Leave', + proc{$ctext_canvas\ + .itemconfigure('current', + 'fill'=>$textConfigFill)}) + +$textConfigFill = '' + +def textEnter(w) + $textConfigFill = (w.itemconfiginfo 'current', 'fill')[4] + w.itemconfigure 'current', 'fill', 'black' +end + +def textInsert(w, string) + return if string == "" + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + end + $ctag_text.insert 'insert', string +end + +def textPaste(w, pos) + begin + $ctag_text.insert pos, TkSelection.get + rescue + end +end + +def textB1Press(w,x,y) + w.icursor 'current', "@#{x},#{y}" + w.itemfocus 'current' + w.focus + w.select_from 'current', "@#{x},#{y}" +end + +def textB1Move(w,x,y) + w.select_to 'current', "@#{x},#{y}" +end + +def textBs(w) + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + char = $ctag_text.index('insert').to_i - 1 + $ctag_text.dchars(char) if char >= 0 + end +end + +def textDel(w) + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + $ctag_text.dchars 'insert' + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog1.rb new file mode 100644 index 0000000..af476ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog1.rb @@ -0,0 +1,38 @@ +# +# a dialog box with a local grab (called by 'widget') +# +class TkDialog_Demo1 < TkDialog + ############### + private + ############### + def title + "Dialog with local grab" + end + + def message + 'This is a modal dialog box. It uses Tk\'s "grab" command to create a "local grab" on the dialog box. The grab prevents any pointer-related events from getting to any other windows in the application until you have answered the dialog by invoking one of the buttons below. However, you can still interact with other applications.' + end + + def bitmap + 'info' + end + + def default_button + 0 + end + + def buttons + # ["Dismiss", "", "Show Code"] + ["OK", "Cancel", "Show Code"] + end +end + +ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value +case ret +when 0 + print "You pressed OK\n" +when 1 + print "You pressed Cancel\n" +when 2 + showCode 'dialog1' +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog2.rb new file mode 100644 index 0000000..efc4b71 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/dialog2.rb @@ -0,0 +1,41 @@ +# +# a dialog box with a global grab (called by 'widget') +# +class TkDialog_Demo2 < TkDialog + ############### + private + ############### + def title + "Dialog with global grab" + end + + def message + "This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don't use them unless you're truly desperate." + end + + def bitmap + 'info' + end + + def default_button + 0 + end + + def buttons + ["OK", "Cancel", "Show Code"] + end +end + +ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'}, + 'prev_command'=>proc{|dialog| + Tk.after 100, proc{dialog.grab('global')} + }).value +case ret +when 0 + print "\You pressed OK\n" +when 1 + print "You pressed Cancel\n" +when 2 + showCode 'dialog2' +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README new file mode 100644 index 0000000..90677d3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README @@ -0,0 +1,7 @@ +This directory contains a collection of demonstration programs that +are translated into Japanese. You need to use a Japanized "wish" to +see these Japanese-translated demonstration programs. You also need +to put this directory ("demos.jp") at the next to "demos" since some +of the programs refer to the image files at "demos". + +Please refer to the README file at "demos" for more detail. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.JP b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.JP new file mode 100644 index 0000000..42b4929 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.JP @@ -0,0 +1,14 @@ +This directory contains "widget" demo for the Japanized Tcl7.6/Tk4.2. +Most of the messages in the original are translated to Japanese. +But other tools in this directory are not translated. + +Following 2 kanji fonts are defined at the beginning of the file "widget." + + -*--24-*-jisx0208.1983-0 + -*--16-*-jisx0208.1983-0 + +These fonts are all part of the core distribution of X11R5, so +if you are running X11R5, you don't have to modify the file. + +But if you don't have these fonts, replace them with appropriate ones. +"-*--14-*-jisx0208.1983-0" will be a good choice. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.tk80 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.tk80 new file mode 100644 index 0000000..c71f977 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/README.tk80 @@ -0,0 +1,46 @@ +This directory contains a collection of programs to demonstrate +the features of the Tk toolkit. The programs are all scripts for +"wish", a windowing shell. If wish has been installed in /usr/local +then you can invoke any of the programs in this directory just +by typing its file name to your command shell. Otherwise invoke +wish with the file as its first argument, e.g., "wish hello". +The rest of this file contains a brief description of each program. +Files with names ending in ".tcl" are procedure packages used by one +or more of the demo programs; they can't be used as programs by +themselves so they aren't described below. + +hello - Creates a single button; if you click on it, a message + is typed and the application terminates. + +widget - Contains a collection of demonstrations of the widgets + currently available in the Tk library. Most of the .tcl + files are scripts for individual demos available through + the "widget" program. + +ixset - A simple Tk-based wrapper for the "xset" program, which + allows you to interactively query and set various X options + such as mouse acceleration and bell volume. Thanks to + Pierre David for contributing this example. + +rolodex - A mock-up of a simple rolodex application. It has much of + the user interface for such an application but no back-end + database. This program was written in response to Tom + LaStrange's toolkit benchmark challenge. + +tcolor - A color editor. Allows you to edit colors in several + different ways, and will also perform automatic updates + using "send". + +rmt - Allows you to "hook-up" remotely to any Tk application + on the display. Select an application with the menu, + then just type commands: they'll go to that application. + +timer - Displays a seconds timer with start and stop buttons. + Control-c and control-q cause it to exit. + +browse - A simple directory browser. Invoke it with and argument + giving the name of the directory you'd like to browse. + Double-click on files or subdirectories to browse them. + Control-c and control-q cause the program to exit. + +sccs id = SCCS: @(#) README 1.3 96/02/16 10:49:14 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms new file mode 100644 index 0000000..03ca6fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms @@ -0,0 +1,39 @@ +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., and other parties. The following +terms apply to all files associated with the software unless explicitly +disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms.tk80 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms.tk80 new file mode 100644 index 0000000..03ca6fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/doc.org/license.terms.tk80 @@ -0,0 +1,39 @@ +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., and other parties. The following +terms apply to all files associated with the software unless explicitly +disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry1.rb new file mode 100644 index 0000000..6f5b10f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry1.rb @@ -0,0 +1,58 @@ +# +# entry (no scrollbars) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($entry1_demo) && $entry1_demo + $entry1_demo.destroy + $entry1_demo = nil +end + +# demo toplevel widget +$entry1_demo = TkToplevel.new {|w| + title("Entry Demonstration (no scrollbars)") + iconname("entry1") + positionWindow(w) +} + +base_frame = TkFrame.new($entry1_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "Three different entries are displayed below. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries by dragging with mouse button2 pressed." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $entry1_demo + $entry1_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'entry1'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# +e1 = TkEntry.new(base_frame, 'relief'=>'sunken') +e2 = TkEntry.new(base_frame, 'relief'=>'sunken') +e3 = TkEntry.new(base_frame, 'relief'=>'sunken') +[e1,e2,e3].each{|w| w.pack('side'=>'top', 'padx'=>10, 'pady'=>5, 'fill'=>'x')} + +# +e1.insert(0, 'Initial value') +e2.insert('end', "This entry contains a long value, much too long ") +e2.insert('end', "to fit in the window at one time, so long in fact ") +e2.insert('end', "that you'll have to scan or scroll to see the end.") +e2.insert('end', "") + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry2.rb new file mode 100644 index 0000000..d67d04b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry2.rb @@ -0,0 +1,93 @@ +# entry2.rb +# +# This demonstration script is the same as the entry1.tcl script +# except that it creates scrollbars for the entries. +# +# entry (with scrollbars) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($entry2_demo) && $entry2_demo + $entry2_demo.destroy + $entry2_demo = nil +end + +# demo toplevel widget +$entry2_demo = TkToplevel.new {|w| + title("Entry Demonstration (with scrollbars)") + iconname("entry2") + positionWindow(w) +} + +base_frame = TkFrame.new($entry2_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "Three different entries are displayed below, with a scrollbar for each entry. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries with the scrollbars, or by dragging with mouse button2 pressed." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $entry2_demo + $entry2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'entry2'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + # entry 1 + s1 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e1 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s1.set first,last} + } + s1.command(proc{|*args| e1.xview(*args)}) + e1.pack('side'=>'top', 'fill'=>'x') + s1.pack('side'=>'top', 'fill'=>'x') + + # spacer + TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x') + + # entry 2 + s2 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e2 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s2.set first,last} + } + s2.command(proc{|*args| e2.xview(*args)}) + e2.pack('side'=>'top', 'fill'=>'x') + s2.pack('side'=>'top', 'fill'=>'x') + + # spacer + TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x') + + # entry 3 + s3 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e3 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s3.set first,last} + } + s3.command(proc{|*args| e3.xview(*args)}) + e3.pack('side'=>'top', 'fill'=>'x') + s3.pack('side'=>'top', 'fill'=>'x') + + # + e1.insert(0, 'Initial value') + e2.insert('end', "This entry contains a long value, much too long ") + e2.insert('end', "to fit in the window at one time, so long in fact ") + e2.insert('end', "that you'll have to scan or scroll to see the end.") + e2.insert('end', "") + +}.pack('side'=>'top', 'fill'=>'x', 'expand'=>'yes') + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry3.rb new file mode 100644 index 0000000..f7df3a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/entry3.rb @@ -0,0 +1,220 @@ +# entry3.rb -- +# +# This demonstration script creates several entry widgets whose +# permitted input is constrained in some way. It also shows off a +# password entry. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($entry3_demo) && $entry3_demo + $entry3_demo.destroy + $entry3_demo = nil +end + +$entry3_demo = TkToplevel.new {|w| + title("Constrained Entry Demonstration") + iconname("entry3") + positionWindow(w) +} + +base_frame = TkFrame.new($entry3_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top) +Four different entries are displayed below. You can add characters \ +by pointing, clicking and typing, though each is constrained in what \ +it will accept. The first only accepts integers or the empty string \ +(checking when focus leaves it) and will flash to indicate any \ +problem. The second only accepts strings with fewer than ten \ +characters and sounds the bell when an attempt to go over the limit \ +is made. The third accepts US phone numbers, mapping letters to \ +their digit equivalent and sounding the bell on encountering an \ +invalid character or if trying to type over a character that is not \ +a digit. The fourth is a password field that accepts up to eight \ +characters (silently ignoring further ones), and displaying them as \ +asterisk characters. +EOL + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $entry3_demo.destroy + $entry3_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'entry3' + }).pack(:side=>:left, :expand=>true) +} + +# focusAndFlash -- +# Error handler for entry widgets that forces the focus onto the +# widget and makes the widget flash by exchanging the foreground and +# background colours at intervals of 200ms (i.e. at approximately +# 2.5Hz). +# +# Arguments: +# widget - entry widget to flash +# fg - Initial foreground colour +# bg - Initial background colour +# count - Counter to control the number of times flashed +def focusAndFlash(widget, fg, bg, count=5) + return if count <= 0 + if fg && !fg.empty? && bg && !bg.empty? + TkTimer.new(200, count, + proc{widget.configure(:foreground=>bg, :background=>fg)}, + proc{widget.configure(:foreground=>fg, :background=>bg)} + ).start + else + # TkTimer.new(150, 3){Tk.bell}.start + Tk.bell + TkTimer.new(200, count, + proc{widget.configure(:foreground=>'white', + :background=>'black')}, + proc{widget.configure(:foreground=>'black', + :background=>'white')} + ).at_end{begin + widget.configure(:foreground=>fg, + :background=>bg) + rescue + # ignore + end}.start + end + widget.focus(true) +end + +l1 = TkLabelFrame.new(base_frame, :text=>"Integer Entry") +TkEntry.new(l1, :validate=>:focus, + :vcmd=>[ + proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' + ]) {|e| + fg = e.foreground + bg = e.background + invalidcommand [proc{|w| focusAndFlash(w, fg, bg)}, '%W'] + pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') +} + +l2 = TkLabelFrame.new(base_frame, :text=>"Length-Constrained Entry") +TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell}, + :vcmd=>[proc{|s| s.length < 10}, '%P'] + ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') + +### PHONE NUMBER ENTRY ### +# Note that the source to this is quite a bit longer as the behaviour +# demonstrated is a lot more ambitious than with the others. + +# Initial content for the third entry widget +entry3content = TkVariable.new("1-(000)-000-0000") + +# Mapping from alphabetic characters to numbers. +$phoneNumberMap = {} +Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n| + chars.split('').each{|c| + $phoneNumberMap[c] = n + $phoneNumberMap[c.upcase] = n + } +} + +# phoneSkipLeft -- +# Skip over fixed characters in a phone-number string when moving left. +# +# Arguments: +# widget - The entry widget containing the phone-number. +def phoneSkipLeft(widget) + idx = widget.index('insert') + if idx == 8 + # Skip back two extra characters + widget.cursor = idx - 2 + elsif idx == 7 || idx == 12 + # Skip back one extra character + widget.cursor = idx - 1 + elsif idx <= 3 + # Can't move any further + Tk.bell + Tk.callback_break + end +end + +# phoneSkipRight -- +# Skip over fixed characters in a phone-number string when moving right. +# +# Arguments: +# widget - The entry widget containing the phone-number. +# add - Offset to add to index before calculation (used by validation.) +def phoneSkipRight(widget, add = 0) + idx = widget.index('insert') + if (idx + add == 5) + # Skip forward two extra characters + widget.cursor = idx + 2 + elsif (idx + add == 6 || idx + add == 10) + # Skip forward one extra character + widget.cursor = idx + 1 + elsif (idx + add == 15 && add == 0) + # Can't move any further + Tk.bell + Tk.callback_break + end +end + +# validatePhoneChange -- +# Checks that the replacement (mapped to a digit) of the given +# character in an entry widget at the given position will leave a +# valid phone number in the widget. +# +# widget - entry widget to validate +# vmode - The widget's validation mode +# idx - The index where replacement is to occur +# char - The character (or string, though that will always be +# refused) to be overwritten at that point. + +def validatePhoneChange(widget, vmode, idx, char) + return true if idx == nil + Tk.after_idle(proc{widget.configure(:validate=>vmode, + :invcmd=>proc{Tk.bell})}) + if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/ + widget.delete(idx) + widget.insert(idx, $phoneNumberMap[char] || char) + Tk.after_idle(proc{phoneSkipRight(widget, -1)}) + return true + # Tk.update(true) # <- Don't work 'update' inter validation callback. + # It depends on Tcl/Tk side (tested on Tcl/Tk8.5a1). + end + return false +end + + +l3 = TkLabelFrame.new(base_frame, :text=>"US Phone-Number Entry") +TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell}, + :textvariable=>entry3content, + :vcmd=>[ + proc{|w,v,i,s| validatePhoneChange(w,v,i,s)}, + "%W %v %i %S" + ]){|e| + # Click to focus goes to the first editable character... + bind('FocusIn', proc{|d,w| + if d != "NotifyAncestor" + w.cursor = 3 + Tk.after_idle(proc{w.selection_clear}) + end + }, '%d %W') + bind('Left', proc{|w| phoneSkipLeft(w)}, '%W') + bind('Right', proc{|w| phoneSkipRight(w)}, '%W') + pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') +} + +l4 = TkLabelFrame.new(base_frame, :text=>"Password Entry") +TkEntry.new(l4, :validate=>:key, :show=>'*', + :vcmd=>[ + proc{|s| s.length <= 8}, + '%P' + ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') + +TkFrame.new(base_frame){|f| + lower + TkGrid.configure(l1, l2, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew) + TkGrid.configure(l3, l4, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew) + TkGrid.columnconfigure(f, [0,1], :uniform=>1) + pack(:fill=>:both, :expand=>true) +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/filebox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/filebox.rb new file mode 100644 index 0000000..676c347 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/filebox.rb @@ -0,0 +1,102 @@ +# filebox.rb +# +# This demonstration script prompts the user to select a file.# +# widget demo prompts the user to select a file (called by 'widget') +# + +# toplevel widget +if defined?($filebox_demo) && $filebox_demo + $filebox_demo.destroy + $filebox_demo = nil +end + +# demo toplevel widget +$filebox_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("filebox") + positionWindow(w) +} + +base_frame = TkFrame.new($filebox_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog.").pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $filebox_demo + $filebox_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'filebox'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +['open', 'save'].each{|type| + TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>"Select a file to #{type}: ", 'anchor'=>'e')\ + .pack('side'=>'left') + + TkEntry.new(f, 'width'=>20) {|e| + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x') + + TkButton.new(f, 'text'=>'Browse ...', + 'command'=>proc{fileDialog base_frame,e,type})\ + .pack('side'=>'left') + } + + pack('fill'=>'x', 'padx'=>'1c', 'pady'=>3) + } +} + +$tk_strictMotif = TkVarAccess.new('tk_strictMotif') +if ($tk_platform['platform'] == 'unix') + TkCheckButton.new(base_frame, + 'text'=>'Use Motif Style Dialog', + 'variable'=>$tk_strictMotif, + 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c') +end + +def fileDialog(w,ent,operation) + # Type names Extension(s) Mac File Type(s) + # + #-------------------------------------------------------- + types = [ + ['Text files', ['.txt','.doc'] ], + ['Text files', [], 'TEXT' ], + ['Ruby Scripts', ['.rb'], 'TEXT' ], + ['Tcl Scripts', ['.tcl'], 'TEXT' ], + ['C Source Files', ['.c','.h'] ], + ['All Source Files', ['.rb','.tcl','.c','.h'] ], + ['Image Files', ['.gif'] ], + ['Image Files', ['.jpeg','.jpg'] ], + ['Image Files', [], ['GIFF','JPEG']], + ['All files', '*' ] + ] + + if operation == 'open' + file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w) + else + file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w, + 'initialfile'=>'Untitled', + 'defaultextension'=>'.txt') + end + if file != "" + ent.delete 0, 'end' + ent.insert 0, file + # ent.xview 'end' + Tk.update_idletasks # need this for Tk::Tile::Entry + # (to find right position of 'xview'). + ent.xview(ent.index('end')) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor.rb new file mode 100644 index 0000000..7023f2a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor.rb @@ -0,0 +1,1723 @@ +# floor.rb +# +# This demonstration script creates a canvas widet that displays the +# floorplan for DEC's Western Research Laboratory. +# +# floorDisplay widget demo (called by 'widget') +# + +# floorDisplay -- +# Recreate the floorplan display in the canvas given by "w". The +# floor given by "active" is displayed on top with its office structure +# visible. +# +# Arguments: +# w - Name of the canvas window. +# active - Number of active floor (1, 2, or 3). + +def floorDisplay(w,active) + return if $activeFloor == active + + w.delete('all') + $activeFloor = active + + # First go through the three floors, displaying the backgrounds for + # each floor. + + floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1']) + floor_bg2(w,$floor_colors['bg2'],$floor_colors['outline2']) + floor_bg3(w,$floor_colors['bg3'],$floor_colors['outline3']) + + # Raise the background for the active floor so that it's on top. + + w.raise("floor#{active}") + + # Create a dummy item just to mark this point in the display list, + # so we can insert highlights here. + + TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker') + + # Add the walls and labels for the active floor, along with + # transparent polygons that define the rooms on the floor. + # Make sure that the room polygons are on top. + + $floorLabels.clear + $floorItems.clear + send("floor_fg#{active}", w, $floor_colors['offices']) + w.raise('room') + + # Offset the floors diagonally from each other. + + w.move('floor1', '2c', '2c') + w.move('floor2', '1c', '1c') + + # Create items for the room entry and its label. + TkcWindow.new(w, 600, 100, 'anchor'=>'w', 'window'=>$floor_entry) + TkcText.new(w, 600, 100, 'anchor'=>'e', 'text'=>"Room: ") + w['scrollregion'] = w.bbox('all') +end + +# newRoom -- +# This method is invoked whenever the mouse enters a room +# in the floorplan. It changes tags so that the current room is +# highlighted. +# +# Arguments: +# w - The name of the canvas window. + +def newRoom(w) + id = w.find_withtag('current')[0] + $currentRoom.value = $floorLabels[id.id] if id != "" + Tk.update(true) +end + +# roomChanged -- +# This method is invoked whenever the currentRoom variable changes. +# It highlights the current room and unhighlights any previous room. +# +# Arguments: +# w - The canvas window displaying the floorplan. +# args - Not used. + +def roomChanged(w,*args) + w.delete('highlight') + item = $floorItems[$currentRoom.value] + return if item == nil + new = TkcPolygon.new(w, *(w.coords(item))) + new.configure('fill'=>$floor_colors['active'], 'tags'=>'highlight') + w.raise(new, 'marker') +end + +# floor_bg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg1(w,fill,outline) + TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104, + 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725, + 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327, + 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404, + 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325, + 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332, + 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363, + 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391, + 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7, + 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221, + 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5, + 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70, + 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill) + TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg']) +end + +# floor_bg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg2(w,fill,outline) + TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129, + 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391, + 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280, + 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644, + 367,802,367,802,129,725,129,725,133,559,133,559,129, + 'tags'=>['floor2','bg'], 'fill'=>fill) + TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) +end + +# floor_bg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg3(w,fill,outline) + TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96, + 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300, + 'tags'=>['floor3','bg'], 'fill'=>fill) + TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129, + 315,129,315,133,176,133,176,129,159,129,159,370,258,370, + 'tags'=>['floor3','bg'], 'fill'=>fill) + TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,107,300,159,300,159,248,107,248,107,300, + 'fill'=>outline, 'tags'=>['floor3','bg']) +end + +# floor_fg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the first +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg1(w,color) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '101' + $floorItems['101'] = i + TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Pub Lift1' + $floorItems['Pub Lift1'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Priv Lift1' + $floorItems['Priv Lift1'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,42,389,42,337,1,337,1,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '110' + $floorItems['110'] = i + TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '109' + $floorItems['109'] = i + TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,300,51,253,6,253,6,300, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '111' + $floorItems['111'] = i + TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,98,248,98,309,79,309,79,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117B' + $floorItems['117B'] = i + TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,251,51,204,6,204,6,251, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '112' + $floorItems['112'] = i + TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,6,156,51,156,51,203,6,203, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '113' + $floorItems['113'] = i + TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,85,169,79,169,79,192,85,192, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117A' + $floorItems['117A'] = i + TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,77,302,77,168,53,168,53,302, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117' + $floorItems['117'] = i + TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,155,51,115,6,115,6,155, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '114' + $floorItems['114'] = i + TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,95,115,53,115,53,168,95,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '115' + $floorItems['115'] = i + TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,87,113,87,27,10,27,10,113, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '116' + $floorItems['116'] = i + TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,89,91,128,91,128,113,89,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '118' + $floorItems['118'] = i + TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,178,128,178,132,216,132,216,91, + 163,91,163,112,149,112,149,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '120' + $floorItems['120'] = i + TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192, + 156,192,156,169,175,169,175,246,79,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '122' + $floorItems['122'] = i + TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,169,154,169,154,191,138,191, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '121' + $floorItems['121'] = i + TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,99,300,126,300,126,309,99,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106A' + $floorItems['106A'] = i + TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '105' + $floorItems['105'] = i + TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,174,309,174,300,152,300,152,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106B' + $floorItems['106B'] = i + TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '104' + $floorItems['104'] = i + TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,385,138,337,91,337,91,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '108' + $floorItems['108'] = i + TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,256,337,140,337,140,385,256,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '107' + $floorItems['107'] = i + TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,300,353,300,329,260,329,260,353, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Smoking' + $floorItems['Smoking'] = i + TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '123' + $floorItems['123'] = i + TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '103' + $floorItems['103'] = i + TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '124' + $floorItems['124'] = i + TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '125' + $floorItems['125'] = i + TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '126' + $floorItems['126'] = i + TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,409,209,409,229,399,229,399,253, + 486,253,486,239,474,239,474,209, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '127' + $floorItems['127'] = i + TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,501,164,501,174,495,174,495,188, + 490,188,490,204,476,204,476,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'MShower' + $floorItems['MShower'] = i + TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Closet' + $floorItems['Closet'] = i + TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'WShower' + $floorItems['WShower'] = i + TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166, + 697,166,697,275,553,275,531,254,515,254, + 515,174,503,174,503,161,486,161, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '130' + $floorItems['130'] = i + TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,308,242,339,242,339,248,342,248, + 342,246,397,246,397,276,393,276, + 393,309,300,309,300,248,308,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '102' + $floorItems['102'] = i + TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,255,486,255,486,276,397,276, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '128' + $floorItems['128'] = i + TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,510,309,486,309,486,255,530,255, + 552,277,561,277,561,325,510,325, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '129' + $floorItems['129'] = i + TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,696,281,740,281,740,387,642,387, + 642,389,561,389,561,277,696,277, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '133' + $floorItems['133'] = i + TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,742,387,742,281,800,281,800,387, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '132' + $floorItems['132'] = i + TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,800,168,800,280,699,280,699,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '134' + $floorItems['134'] = i + TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,726,131,726,166,800,166,800,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '135' + $floorItems['135'] = i + TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366, + 304,312,396,312,396,288,400,288,404,288, + 409,290,413,292,418,297,421,302,422,309, + 421,318,417,325,411,330,405,332,397,333, + 344,333,340,334,336,336,335,338,332,342, + 331,347,332,351,334,354,336,357,341,359, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Ramona Stair' + $floorItems['Ramona Stair'] = i + TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20, + 122,28,123,32,123,68,220,68,220,87,90,87,90,23, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'University Stair' + $floorItems['University Stair'] = i + TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56, + 358,48,363,39,365,29,348,25,335,22,321,14, + 300,5,283,1,260,0,246,0,242,2,236,4,231,8, + 227,13,223,17,221,22,220,34,260,34, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Plaza Stair' + $floorItems['Plaza Stair'] = i + TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49, + 323,56,337,70,350,83,365,94,377,100, + 386,104,386,128,220,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Plaza Deck' + $floorItems['Plaza Deck'] = i + TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106' + $floorItems['106'] = i + TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115, + 95,128,114,128,114,151,157,151,157,153,112,153, + 112,130,97,130,97,168,175,168,175,131,146,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '119' + $floorItems['119'] = i + TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall']) +end + +# floor_fg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the second +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg2(w,color) + i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222, + 800,222,800,168,748,168, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '238' + $floorItems['238'] = i + TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '237' + $floorItems['237'] = i + TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324, + 643,324,643,291,641,291,641,205,696,205, + 696,291,694,291,694,314,715,314,715,291, + 715,205,755,205,755,190,724,190,724,187, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '246' + $floorItems['246'] = i + TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,694,279,643,279,643,314,694,314, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '247' + $floorItems['247'] = i + TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246, + 397,246,397,255,476,255,476,250,482,250,559,250, + 559,274,482,274,482,278,396,278,396,274,232,274, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '202' + $floorItems['202'] = i + TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196, + 306,196,306,180,175,180,175,169,156,169, + 156,196,176,196,176,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '206' + $floorItems['206'] = i + TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,277,6,277,6,338,51,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '212' + $floorItems['212'] = i + TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '245' + $floorItems['245'] = i + TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,560,389,599,389,599,326,560,326, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '244' + $floorItems['244'] = i + TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,601,389,601,326,643,326,643,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '243' + $floorItems['243'] = i + TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,688,316,645,316,645,365,688,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '242' + $floorItems['242'] = i + TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,802,367,759,367,759,226,802,226, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Barbecue Deck' + $floorItems['Barbecue Deck'] = i + TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,262,755,314,717,314,717,262, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '240' + $floorItems['240'] = i + TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,316,689,316,689,365,755,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '241' + $floorItems['241'] = i + TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,206,717,206,717,261,755,261, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '239' + $floorItems['239'] = i + TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,695,277,643,277,643,206,695,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '248' + $floorItems['248'] = i + TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,676,135,676,185,724,185,724,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '236' + $floorItems['236'] = i + TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '235' + $floorItems['235'] = i + TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,626,143,633,143,633,135,572,135, + 572,143,579,143,579,185,626,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '234' + $floorItems['234'] = i + TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,135,571,135,571,145,578,145, + 578,185,527,185,527,131,557,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '233' + $floorItems['233'] = i + TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,249,557,249,557,205,476,205, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '230' + $floorItems['230'] = i + TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '232' + $floorItems['232'] = i + TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,186,495,186,495,204,476,204, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '229' + $floorItems['229'] = i + TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '227' + $floorItems['227'] = i + TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '228' + $floorItems['228'] = i + TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '226' + $floorItems['226'] = i + TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '225' + $floorItems['225'] = i + TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,198,306,198,306,249,234,249, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '224' + $floorItems['224'] = i + TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '223' + $floorItems['223'] = i + TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,268,179,221,179,221,135,268,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '222' + $floorItems['222'] = i + TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,177,179,219,179,219,135,177,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '221' + $floorItems['221'] = i + TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '204' + $floorItems['204'] = i + TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '205' + $floorItems['205'] = i + TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,256,385,256,340,212,340,212,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '207' + $floorItems['207'] = i + TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,210,340,164,340,164,385,210,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '208' + $floorItems['208'] = i + TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,115,340,162,340,162,385,115,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '209' + $floorItems['209'] = i + TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,228,89,156,53,156,53,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '217' + $floorItems['217'] = i + TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,169,97,169,97,190,89,190, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '217A' + $floorItems['217A'] = i + TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '216' + $floorItems['216'] = i + TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,179,51,135,6,135,6,179, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '215' + $floorItems['215'] = i + TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,227,6,227,6,180,51,180, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '214' + $floorItems['214'] = i + TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,275,6,275,6,229,51,229, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '213' + $floorItems['213'] = i + TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,114,340,67,340,67,385,114,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '210' + $floorItems['210'] = i + TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '211' + $floorItems['211'] = i + TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '203' + $floorItems['203'] = i + TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198, + 154,198,154,192,109,192,109,169,99,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '220' + $floorItems['220'] = i + TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Priv Lift2' + $floorItems['Priv Lift2'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Pub Lift 2' + $floorItems['Pub Lift 2'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '218' + $floorItems['218'] = i + TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '219' + $floorItems['219'] = i + TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '201' + $floorItems['201'] = i + TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall']) +end + +# floor_fg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the third +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg3(w,color) + i = TkcPolygon.new(w,89,228,89,180,70,180,70,228, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316' + $floorItems['316'] = i + TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,115,368,162,368,162,323,115,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '309' + $floorItems['309'] = i + TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,164,323,164,368,211,368,211,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '308' + $floorItems['308'] = i + TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,256,368,212,368,212,323,256,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '307' + $floorItems['307'] = i + TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '305' + $floorItems['305'] = i + TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,219,251,203,244,203,244,219, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324B' + $floorItems['324B'] = i + TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,249,244,249,244,232,251,232, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324A' + $floorItems['324A'] = i + TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,223,135,223,179,177,179,177,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '320' + $floorItems['320'] = i + TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,114,368,114,323,67,323,67,368, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '310' + $floorItems['310'] = i + TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,277,23,321,68,321,68,277, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '312' + $floorItems['312'] = i + TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,229,68,229,68,275,23,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '313' + $floorItems['313'] = i + TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,68,227,23,227,23,180,68,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '314' + $floorItems['314'] = i + TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,95,179,95,135,23,135,23,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '315' + $floorItems['315'] = i + TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,99,226,99,204,91,204,91,226, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316B' + $floorItems['316B'] = i + TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,91,202,99,202,99,180,91,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316A' + $floorItems['316A'] = i + TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198, + 174,198,174,226,101,226,101,179,97,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '319' + $floorItems['319'] = i + TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '311' + $floorItems['311'] = i + TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '318' + $floorItems['318'] = i + TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '317' + $floorItems['317'] = i + TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,274,194,274,221,306,221,306,194, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '323' + $floorItems['323'] = i + TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,306,222,274,222,274,249,306,249, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '325' + $floorItems['325'] = i + TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,263,179,224,179,224,135,263,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '321' + $floorItems['321'] = i + TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,314,169,306,169,306,192,273,192, + 264,181,264,135,314,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '322' + $floorItems['322'] = i + TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = 'Pub Lift3' + $floorItems['Pub Lift3'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = 'Priv Lift3' + $floorItems['Priv Lift3'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '303' + $floorItems['303'] = i + TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,272,203,272,249,252,249,252,230, + 244,230,244,221,252,221,252,203, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324' + $floorItems['324'] = i + TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '304' + $floorItems['304'] = i + TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '301' + $floorItems['301'] = i + TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,397,246,377,246,377,185,397,185, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '327' + $floorItems['327'] = i + TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '326' + $floorItems['326'] = i + TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282, + 375,274,397,274,397,248,339,248,339,242,308,242, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '302' + $floorItems['302'] = i + TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203, + 272,193,263,180,242,180,175,180,175,169,156,169, + 156,196,177,196,177,228,107,228,70,228,70,275,107,275, + 107,248,160,248,160,301,107,301,107,275,70,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '306' + $floorItems['306'] = i + TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall']) +end + +# Below is the "main program" that creates the floorplan demonstration. + +# toplevel widget +if defined?($floor_demo) && $floor_demo + $floor_demo.destroy + $floor_demo = nil +end + +# demo toplevel widget +$floor_demo = TkToplevel.new {|w| + title("Floorplan Canvas Demonstration") + iconname("Floorplan") + positionWindow(w) + geometry('+20+20') + minsize(100,100) +} + +base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left', + 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){ + pack('side'=>'top') +} + +# frame +$floor_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $floor_demo + $floor_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'floor'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$floor_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# +$floorLabels = {} +$floorItems = {} + +# canvas +if $tk_version =~ /^4\.[01]/ + $floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken', + 'highlightthickness'=>2) + $floor_canvas = TkCanvas.new($floor_canvas_frame, + 'width'=>900, 'height'=>500, 'borderwidth'=>0, + 'highlightthickness'=>0) {|c| + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}){|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + pack('side'=>'bottom', 'fill'=>'x') + } + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + } + $floor_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes') + $floor_canvas.pack('expand'=>'yes', 'fill'=>'both') + +else + TkFrame.new(base_frame) {|f| + pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + + h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal') + v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical') + + TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1| + $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500, + 'borderwidth'=>0, + 'highlightthickness'=>0) { + xscrollcommand(proc{|first,last| h.set first,last}) + yscrollcommand(proc{|first,last| v.set first,last}) + pack('expand'=>'yes', 'fill'=>'both') + } + grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + } + + v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + v.command(proc{|*args| $floor_canvas.yview(*args)}) + h.command(proc{|*args| $floor_canvas.xview(*args)}) + } +end + + +# Create an entry for displaying and typing in current room. + +$currentRoom = TkVariable.new +$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken', + 'bd'=>2, 'textvariable'=>$currentRoom) + +# Choose colors, then fill in the floorplan. + +$floor_colors = {} +if TkWinfo.depth($floor_canvas) > 1 + $floor_colors['bg1'] = '#a9c1da' + $floor_colors['outline1'] = '#77889a' + $floor_colors['bg2'] = '#9ab0c6' + $floor_colors['outline2'] = '#687786' + $floor_colors['bg3'] = '#8ba0b3' + $floor_colors['outline3'] = '#596673' + $floor_colors['offices'] = 'Black' + $floor_colors['active'] = '#c4d1df' +else + $floor_colors['bg1'] = 'white' + $floor_colors['outline1'] = 'black' + $floor_colors['bg2'] = 'white' + $floor_colors['outline2'] = 'black' + $floor_colors['bg3'] = 'white' + $floor_colors['outline3'] = 'black' + $floor_colors['offices'] = 'Black' + $floor_colors['active'] = 'black' +end + +$activeFloor = '' +floorDisplay $floor_canvas,3 + +# Set up event bindings for canvas: + +$floor_canvas.itembind('floor1', '1', proc{floorDisplay $floor_canvas,1}) +$floor_canvas.itembind('floor2', '1', proc{floorDisplay $floor_canvas,2}) +$floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3}) +$floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas}) +$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''}) +$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y') +$floor_canvas.bind('B2-Motion', + proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y') +$floor_canvas.bind('Destroy', proc{$currentRoom.unset}) +$currentRoom.value = '' +$currentRoom.trace('w',proc{roomChanged $floor_canvas}) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor2.rb new file mode 100644 index 0000000..88b07ae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/floor2.rb @@ -0,0 +1,1722 @@ +%# floor2.rb +# +# This demonstration script creates a canvas widet that displays the +# floorplan for DEC's Western Research Laboratory. +# +# floorDisplay widget demo (called by 'widget') +# + +# floorDisplay2 -- +# Recreate the floorplan display in the canvas given by "w". The +# floor given by "active" is displayed on top with its office structure +# visible. +# +# Arguments: +# w - Name of the canvas window. +# active - Number of active floor (1, 2, or 3). + +def floorDisplay2(w,active) + return if $activeFloor2 == active + + w.delete('all') + $activeFloor2 = active + + # First go through the three floors, displaying the backgrounds for + # each floor. + + floor2_bg1(w,$floor2_colors['bg1'],$floor2_colors['outline1']) + floor2_bg2(w,$floor2_colors['bg2'],$floor2_colors['outline2']) + floor2_bg3(w,$floor2_colors['bg3'],$floor2_colors['outline3']) + + # Raise the background for the active floor so that it's on top. + + w.raise("floor#{active}") + + # Create a dummy item just to mark this point in the display list, + # so we can insert highlights here. + + w.create(TkcRectangle,0,100,1,101,'fill'=>'','outline'=>'','tags'=>'marker') + + # Add the walls and labels for the active floor, along with + # transparent polygons that define the rooms on the floor. + # Make sure that the room polygons are on top. + + $floorLabels2.clear + $floorItems2.clear + send("floor2_fg#{active}", w, $floor2_colors['offices']) + w.raise('room') + + # Offset the floors diagonally from each other. + + w.move('floor1', '2c', '2c') + w.move('floor2', '1c', '1c') + + # Create items for the room entry and its label. + w.create(TkcWindow, 600, 100, 'anchor'=>'w', 'window'=>$floor2_entry) + w.create(TkcText, 600, 100, 'anchor'=>'e', 'text'=>"Room: ") + w['scrollregion'] = w.bbox('all') +end + +# newRoom2 -- +# This method is invoked whenever the mouse enters a room +# in the floorplan. It changes tags so that the current room is +# highlighted. +# +# Arguments: +# w - The name of the canvas window. + +def newRoom2(w) + id = w.find_withtag('current')[0] + $currentRoom2.value = $floorLabels2[id.id] if id != "" + Tk.update(true) +end + +# roomChanged2 -- +# This method is invoked whenever the currentRoom variable changes. +# It highlights the current room and unhighlights any previous room. +# +# Arguments: +# w - The canvas window displaying the floorplan. +# args - Not used. + +def roomChanged2(w,*args) + w.delete('highlight') + item = $floorItems2[$currentRoom2.value] + return if item == nil + new = TkcPolygon.new(w, *(w.coords(item))) + new.configure('fill'=>$floor2_colors['active'], 'tags'=>'highlight') + w.raise(new, 'marker') +end + +# floor2_bg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg1(w,fill,outline) + w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104, + 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725, + 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327, + 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404, + 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325, + 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332, + 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363, + 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391, + 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7, + 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221, + 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5, + 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70, + 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill) + w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg']) +end + +# floor2_bg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg2(w,fill,outline) + w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129, + 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391, + 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280, + 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644, + 367,802,367,802,129,725,129,725,133,559,133,559,129, + 'tags'=>['floor2','bg'], 'fill'=>fill) + w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) +end + +# floor2_bg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg3(w,fill,outline) + w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96, + 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300, + 'tags'=>['floor3','bg'], 'fill'=>fill) + w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129, + 315,129,315,133,176,133,176,129,159,129,159,370,258,370, + 'tags'=>['floor3','bg'], 'fill'=>fill) + w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,107,300,159,300,159,248,107,248,107,300, + 'fill'=>outline, 'tags'=>['floor3','bg']) +end + +# floor2_fg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the first +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg1(w,color) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '101' + $floorItems2['101'] = i + w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Pub Lift1' + $floorItems2['Pub Lift1'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Priv Lift1' + $floorItems2['Priv Lift1'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,42,389,42,337,1,337,1,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '110' + $floorItems2['110'] = i + w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '109' + $floorItems2['109'] = i + w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,300,51,253,6,253,6,300, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '111' + $floorItems2['111'] = i + w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,98,248,98,309,79,309,79,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117B' + $floorItems2['117B'] = i + w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,251,51,204,6,204,6,251, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '112' + $floorItems2['112'] = i + w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,6,156,51,156,51,203,6,203, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '113' + $floorItems2['113'] = i + w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,85,169,79,169,79,192,85,192, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117A' + $floorItems2['117A'] = i + w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,77,302,77,168,53,168,53,302, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117' + $floorItems2['117'] = i + w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,155,51,115,6,115,6,155, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '114' + $floorItems2['114'] = i + w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,95,115,53,115,53,168,95,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '115' + $floorItems2['115'] = i + w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,87,113,87,27,10,27,10,113, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '116' + $floorItems2['116'] = i + w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,89,91,128,91,128,113,89,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '118' + $floorItems2['118'] = i + w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,178,128,178,132,216,132,216,91, + 163,91,163,112,149,112,149,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '120' + $floorItems2['120'] = i + w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192, + 156,192,156,169,175,169,175,246,79,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '122' + $floorItems2['122'] = i + w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,169,154,169,154,191,138,191, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '121' + $floorItems2['121'] = i + w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,99,300,126,300,126,309,99,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106A' + $floorItems2['106A'] = i + w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '105' + $floorItems2['105'] = i + w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,174,309,174,300,152,300,152,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106B' + $floorItems2['106B'] = i + w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '104' + $floorItems2['104'] = i + w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,385,138,337,91,337,91,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '108' + $floorItems2['108'] = i + w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,256,337,140,337,140,385,256,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '107' + $floorItems2['107'] = i + w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,300,353,300,329,260,329,260,353, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Smoking' + $floorItems2['Smoking'] = i + w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '123' + $floorItems2['123'] = i + w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '103' + $floorItems2['103'] = i + w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '124' + $floorItems2['124'] = i + w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '125' + $floorItems2['125'] = i + w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '126' + $floorItems2['126'] = i + w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,409,209,409,229,399,229,399,253, + 486,253,486,239,474,239,474,209, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '127' + $floorItems2['127'] = i + w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,501,164,501,174,495,174,495,188, + 490,188,490,204,476,204,476,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'MShower' + $floorItems2['MShower'] = i + w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Closet' + $floorItems2['Closet'] = i + w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'WShower' + $floorItems2['WShower'] = i + w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166, + 697,166,697,275,553,275,531,254,515,254, + 515,174,503,174,503,161,486,161, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '130' + $floorItems2['130'] = i + w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,308,242,339,242,339,248,342,248, + 342,246,397,246,397,276,393,276, + 393,309,300,309,300,248,308,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '102' + $floorItems2['102'] = i + w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,255,486,255,486,276,397,276, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '128' + $floorItems2['128'] = i + w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,510,309,486,309,486,255,530,255, + 552,277,561,277,561,325,510,325, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '129' + $floorItems2['129'] = i + w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,696,281,740,281,740,387,642,387, + 642,389,561,389,561,277,696,277, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '133' + $floorItems2['133'] = i + w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,742,387,742,281,800,281,800,387, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '132' + $floorItems2['132'] = i + w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,800,168,800,280,699,280,699,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '134' + $floorItems2['134'] = i + w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,726,131,726,166,800,166,800,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '135' + $floorItems2['135'] = i + w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366, + 304,312,396,312,396,288,400,288,404,288, + 409,290,413,292,418,297,421,302,422,309, + 421,318,417,325,411,330,405,332,397,333, + 344,333,340,334,336,336,335,338,332,342, + 331,347,332,351,334,354,336,357,341,359, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Ramona Stair' + $floorItems2['Ramona Stair'] = i + w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20, + 122,28,123,32,123,68,220,68,220,87,90,87,90,23, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'University Stair' + $floorItems2['University Stair'] = i + w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56, + 358,48,363,39,365,29,348,25,335,22,321,14, + 300,5,283,1,260,0,246,0,242,2,236,4,231,8, + 227,13,223,17,221,22,220,34,260,34, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Plaza Stair' + $floorItems2['Plaza Stair'] = i + w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49, + 323,56,337,70,350,83,365,94,377,100, + 386,104,386,128,220,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Plaza Deck' + $floorItems2['Plaza Deck'] = i + w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106' + $floorItems2['106'] = i + w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115, + 95,128,114,128,114,151,157,151,157,153,112,153, + 112,130,97,130,97,168,175,168,175,131,146,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '119' + $floorItems2['119'] = i + w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall']) +end + +# floor2_fg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the second +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg2(w,color) + i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222, + 800,222,800,168,748,168, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '238' + $floorItems2['238'] = i + w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '237' + $floorItems2['237'] = i + w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324, + 643,324,643,291,641,291,641,205,696,205, + 696,291,694,291,694,314,715,314,715,291, + 715,205,755,205,755,190,724,190,724,187, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '246' + $floorItems2['246'] = i + w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,694,279,643,279,643,314,694,314, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '247' + $floorItems2['247'] = i + w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246, + 397,246,397,255,476,255,476,250,482,250,559,250, + 559,274,482,274,482,278,396,278,396,274,232,274, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '202' + $floorItems2['202'] = i + w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196, + 306,196,306,180,175,180,175,169,156,169, + 156,196,176,196,176,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '206' + $floorItems2['206'] = i + w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,277,6,277,6,338,51,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '212' + $floorItems2['212'] = i + w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '245' + $floorItems2['245'] = i + w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,560,389,599,389,599,326,560,326, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '244' + $floorItems2['244'] = i + w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,601,389,601,326,643,326,643,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '243' + $floorItems2['243'] = i + w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,688,316,645,316,645,365,688,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '242' + $floorItems2['242'] = i + w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,802,367,759,367,759,226,802,226, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Barbecue Deck' + $floorItems2['Barbecue Deck'] = i + w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,262,755,314,717,314,717,262, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '240' + $floorItems2['240'] = i + w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,316,689,316,689,365,755,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '241' + $floorItems2['241'] = i + w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,206,717,206,717,261,755,261, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '239' + $floorItems2['239'] = i + w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,695,277,643,277,643,206,695,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '248' + $floorItems2['248'] = i + w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,676,135,676,185,724,185,724,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '236' + $floorItems2['236'] = i + w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '235' + $floorItems2['235'] = i + w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,626,143,633,143,633,135,572,135, + 572,143,579,143,579,185,626,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '234' + $floorItems2['234'] = i + w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,135,571,135,571,145,578,145, + 578,185,527,185,527,131,557,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '233' + $floorItems2['233'] = i + w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,249,557,249,557,205,476,205, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '230' + $floorItems2['230'] = i + w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '232' + $floorItems2['232'] = i + w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,186,495,186,495,204,476,204, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '229' + $floorItems2['229'] = i + w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '227' + $floorItems2['227'] = i + w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '228' + $floorItems2['228'] = i + w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '226' + $floorItems2['226'] = i + w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '225' + $floorItems2['225'] = i + w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,198,306,198,306,249,234,249, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '224' + $floorItems2['224'] = i + w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '223' + $floorItems2['223'] = i + w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,268,179,221,179,221,135,268,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '222' + $floorItems2['222'] = i + w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,177,179,219,179,219,135,177,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '221' + $floorItems2['221'] = i + w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '204' + $floorItems2['204'] = i + w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '205' + $floorItems2['205'] = i + w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,256,385,256,340,212,340,212,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '207' + $floorItems2['207'] = i + w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,210,340,164,340,164,385,210,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '208' + $floorItems2['208'] = i + w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,115,340,162,340,162,385,115,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '209' + $floorItems2['209'] = i + w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,228,89,156,53,156,53,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '217' + $floorItems2['217'] = i + w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,169,97,169,97,190,89,190, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '217A' + $floorItems2['217A'] = i + w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '216' + $floorItems2['216'] = i + w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,179,51,135,6,135,6,179, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '215' + $floorItems2['215'] = i + w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,227,6,227,6,180,51,180, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '214' + $floorItems2['214'] = i + w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,275,6,275,6,229,51,229, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '213' + $floorItems2['213'] = i + w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,114,340,67,340,67,385,114,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '210' + $floorItems2['210'] = i + w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '211' + $floorItems2['211'] = i + w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '203' + $floorItems2['203'] = i + w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198, + 154,198,154,192,109,192,109,169,99,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '220' + $floorItems2['220'] = i + w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Priv Lift2' + $floorItems2['Priv Lift2'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Pub Lift 2' + $floorItems2['Pub Lift 2'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '218' + $floorItems2['218'] = i + w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '219' + $floorItems2['219'] = i + w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '201' + $floorItems2['201'] = i + w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall']) +end + +# floor2_fg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the third +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg3(w,color) + i = TkcPolygon.new(w,89,228,89,180,70,180,70,228, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316' + $floorItems2['316'] = i + w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,115,368,162,368,162,323,115,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '309' + $floorItems2['309'] = i + w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,164,323,164,368,211,368,211,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '308' + $floorItems2['308'] = i + w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,256,368,212,368,212,323,256,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '307' + $floorItems2['307'] = i + w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '305' + $floorItems2['305'] = i + w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,219,251,203,244,203,244,219, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324B' + $floorItems2['324B'] = i + w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,249,244,249,244,232,251,232, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324A' + $floorItems2['324A'] = i + w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,223,135,223,179,177,179,177,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '320' + $floorItems2['320'] = i + w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,114,368,114,323,67,323,67,368, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '310' + $floorItems2['310'] = i + w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,277,23,321,68,321,68,277, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '312' + $floorItems2['312'] = i + w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,229,68,229,68,275,23,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '313' + $floorItems2['313'] = i + w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,68,227,23,227,23,180,68,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '314' + $floorItems2['314'] = i + w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,95,179,95,135,23,135,23,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '315' + $floorItems2['315'] = i + w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,99,226,99,204,91,204,91,226, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316B' + $floorItems2['316B'] = i + w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,91,202,99,202,99,180,91,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316A' + $floorItems2['316A'] = i + w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198, + 174,198,174,226,101,226,101,179,97,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '319' + $floorItems2['319'] = i + w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '311' + $floorItems2['311'] = i + w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '318' + $floorItems2['318'] = i + w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '317' + $floorItems2['317'] = i + w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,274,194,274,221,306,221,306,194, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '323' + $floorItems2['323'] = i + w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,306,222,274,222,274,249,306,249, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '325' + $floorItems2['325'] = i + w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,263,179,224,179,224,135,263,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '321' + $floorItems2['321'] = i + w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,314,169,306,169,306,192,273,192, + 264,181,264,135,314,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '322' + $floorItems2['322'] = i + w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = 'Pub Lift3' + $floorItems2['Pub Lift3'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = 'Priv Lift3' + $floorItems2['Priv Lift3'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '303' + $floorItems2['303'] = i + w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,272,203,272,249,252,249,252,230, + 244,230,244,221,252,221,252,203, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324' + $floorItems2['324'] = i + w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '304' + $floorItems2['304'] = i + w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '301' + $floorItems2['301'] = i + w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,397,246,377,246,377,185,397,185, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '327' + $floorItems2['327'] = i + w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '326' + $floorItems2['326'] = i + w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282, + 375,274,397,274,397,248,339,248,339,242,308,242, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '302' + $floorItems2['302'] = i + w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203, + 272,193,263,180,242,180,175,180,175,169,156,169, + 156,196,177,196,177,228,107,228,70,228,70,275,107,275, + 107,248,160,248,160,301,107,301,107,275,70,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '306' + $floorItems2['306'] = i + w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall']) +end + +# Below is the "main program" that creates the floorplan demonstration. + +# toplevel widget +if defined?($floor2_demo) && $floor2_demo + $floor2_demo.destroy + $floor2_demo = nil +end + +# demo toplevel widget +$floor2_demo = TkToplevel.new {|w| + title("Floorplan Canvas Demonstration 2") + iconname("Floorplan2") + positionWindow(w) + geometry('+20+20') + minsize(100,100) +} + +base_frame = TkFrame.new($floor2_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left', + 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){ + pack('side'=>'top') +} + +# frame +$floor2_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $floor2_demo + $floor2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'floor2'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$floor2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# +$floorLabels2 = {} +$floorItems2 = {} + +# canvas +if $tk_version =~ /^4\.[01]/ + $floor2_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken', + 'highlightthickness'=>2) + $floor2_canvas = TkCanvas.new($floor2_canvas_frame, + 'width'=>900, 'height'=>500, 'borderwidth'=>0, + 'highlightthickness'=>0) {|c| + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}){|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + pack('side'=>'bottom', 'fill'=>'x') + } + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + } + $floor2_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes') + $floor2_canvas.pack('expand'=>'yes', 'fill'=>'both') + +else + TkFrame.new(base_frame) {|f| + pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + + h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal') + v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical') + + TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1| + $floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500, + 'borderwidth'=>0, + 'highlightthickness'=>0) { + xscrollcommand(proc{|first,last| h.set first,last}) + yscrollcommand(proc{|first,last| v.set first,last}) + pack('expand'=>'yes', 'fill'=>'both') + } + grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + } + + v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + v.command(proc{|*args| $floor2_canvas.yview(*args)}) + h.command(proc{|*args| $floor2_canvas.xview(*args)}) + } +end + + +# Create an entry for displaying and typing in current room. + +$currentRoom2 = TkVariable.new +$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken', + 'bd'=>2, 'textvariable'=>$currentRoom2) + +# Choose colors, then fill in the floorplan. + +$floor2_colors = {} +if TkWinfo.depth($floor2_canvas) > 1 + $floor2_colors['bg1'] = '#a9c1da' + $floor2_colors['outline1'] = '#77889a' + $floor2_colors['bg2'] = '#9ab0c6' + $floor2_colors['outline2'] = '#687786' + $floor2_colors['bg3'] = '#8ba0b3' + $floor2_colors['outline3'] = '#596673' + $floor2_colors['offices'] = 'Black' + $floor2_colors['active'] = '#c4d1df' +else + $floor2_colors['bg1'] = 'white' + $floor2_colors['outline1'] = 'black' + $floor2_colors['bg2'] = 'white' + $floor2_colors['outline2'] = 'black' + $floor2_colors['bg3'] = 'white' + $floor2_colors['outline3'] = 'black' + $floor2_colors['offices'] = 'Black' + $floor2_colors['active'] = 'black' +end + +$activeFloor2 = '' +floorDisplay2 $floor2_canvas,3 + +# Set up event bindings for canvas: + +$floor2_canvas.itembind('floor1', '1', proc{floorDisplay2 $floor2_canvas,1}) +$floor2_canvas.itembind('floor2', '1', proc{floorDisplay2 $floor2_canvas,2}) +$floor2_canvas.itembind('floor3', '1', proc{floorDisplay2 $floor2_canvas,3}) +$floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas}) +$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''}) +$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y') +$floor2_canvas.bind('B2-Motion', + proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y') +$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset}) +$currentRoom2.value = '' +$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas}) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/form.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/form.rb new file mode 100644 index 0000000..3119752 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/form.rb @@ -0,0 +1,64 @@ +# +# form widget demo (called by 'widget') +# + +# toplevel widget +if defined?($form_demo) && $form_demo + $form_demo.destroy + $form_demo = nil +end + +# demo toplevel widget +$form_demo = TkToplevel.new {|w| + title("Form Demonstration") + iconname("form") + positionWindow(w) +} + +base_frame = TkFrame.new($form_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "This window contains a simple form where you can type in the various entries and use tabs to move circularly between the entries." +} +msg.pack('side'=>'top', 'fill'=>'x') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $form_demo + $form_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'form'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# entry +form_data = [] +(1..5).each{|i| + f = TkFrame.new(base_frame, 'bd'=>2) + e = TkEntry.new(f, 'relief'=>'sunken', 'width'=>40) + l = TkLabel.new(f) + e.pack('side'=>'right') + l.pack('side'=>'left') + form_data[i] = {'frame'=>f, 'entry'=>e, 'label'=>l} +} + +# +form_data[1]['label'].text('Name:') +form_data[2]['label'].text('Address:') +form_data[5]['label'].text('Phone:') + +# pack +(1..5).each{|i| form_data[i]['frame'].pack('side'=>'top', 'fill'=>'x')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/goldberg.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/goldberg.rb new file mode 100644 index 0000000..c6fa37c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/goldberg.rb @@ -0,0 +1,2006 @@ +# +# Ruby/Tk Goldverg demo (called by 'widget') +# +# Based on Tcl/Tk8.5a2 widget demos. +# The following is the original comment of TkGoldberg.tcl. +# +#>>##+################################################################# +#>># +#>># TkGoldberg.tcl +#>># by Keith Vetter, March 13, 2003 +#>># +#>># "Man will always find a difficult means to perform a simple task" +#>># Rube Goldberg +#>># +#>># Reproduced here with permission. +#>># +#>>##+################################################################# +#>># +#>># Keith Vetter 2003-03-21: this started out as a simple little program +#>># but was so much fun that it grew and grew. So I apologize about the +#>># size but I just couldn't resist sharing it. +#>># +#>># This is a whizzlet that does a Rube Goldberg type animation, the +#>># design of which comes from an New Years e-card from IncrediMail. +#>># That version had nice sound effects which I eschewed. On the other +#>># hand, that version was in black and white (actually dark blue and +#>># light blue) and this one is fully colorized. +#>># +#>># One thing I learned from this project is that drawing filled complex +#>># objects on a canvas is really hard. More often than not I had to +#>># draw each item twice--once with the desired fill color but no +#>># outline, and once with no fill but with the outline. Another trick +#>># is erasing by drawing with the background color. Having a flood fill +#>># command would have been extremely helpful. +#>># +#>># Two wiki pages were extremely helpful: Drawing rounded rectangles +#>># which I generalized into Drawing rounded polygons, and regular +#>># polygons which allowed me to convert ovals and arcs into polygons +#>># which could then be rotated (see Canvas Rotation). I also wrote +#>># Named Colors to aid in the color selection. +#>># +#>># I could comment on the code, but it's just 26 state machines with +#>># lots of canvas create and move calls. + +if defined?($goldberg_demo) && $goldberg_demo + $goldberg_demo.destroy + $goldberg_demo = nil +end + +# demo toplevel widget +$goldberg_demo = TkToplevel.new {|w| + title("Tk Goldberg (demonstration)") + iconname("goldberg") +# positionWindow(w) +} + +base_frame = TkFrame.new($goldberg_demo).pack(:fill=>:both, :expand=>true) + +=begin +# label +msg = TkLabel.new($goldberg_demo) { + font 'Arial 10' + wraplength '4i' + justify 'left' + text "This is a demonstration of just how complex you can make your animations become. Click the ball to start things moving!\n\n\"Man will always find a difficult means to perform a simple task\"\n - Rube Goldberg" +} +msg.pack('side'=>'top') +=end + +=begin +# frame +TkFrame.new($goldberg_demo) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $goldberg_demo + $goldberg_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'goldberg'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') +=end + +######################################### + +class TkGoldberg_Demo + def initialize(parent) + @parent = parent + + @S = {} + @S['title'] = 'Tk Goldberg' + @S['speed'] = TkVariable.new(5) + @S['cnt'] = TkVariable.new(0) + @S['message'] = TkVariable.new("\\nWelcome\\nto\\nRuby/Tk") + @S['pause'] = TkVariable.new + @S['details'] = TkVariable.new(true) + + @S['mode'] = TkVariable.new(:MSTART, :symbol) + # :MSTART, :MGO, :MPAUSE, :MSSTEP, :MBSTEP, :MDONE, :MDEBUG + + # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + @speed = [1, 10, 20, 50, 80, 100, 150, 200, 300, 400, 500] + + # colors + @C = {} + @C['fg'] = 'black' + # @C['bg'] = 'gray75' + @C['bg'] = 'cornflowerblue' + + @C['0'] = 'white'; @C['1a'] = 'darkgreen'; @C['1b'] = 'yellow' + @C['2'] = 'red'; @C['3a'] = 'green'; @C['3b'] = 'darkblue' + @C['4'] = @C['fg']; @C['5a'] = 'brown'; @C['5b'] = 'white' + @C['6'] = 'magenta'; @C['7'] = 'green'; @C['8'] = @C['fg'] + @C['9'] = 'blue4'; @C['10a'] = 'white'; @C['10b'] = 'cyan' + @C['11a'] = 'yellow'; @C['11b'] = 'mediumblue'; @C['12'] = 'tan2' + @C['13a'] = 'yellow'; @C['13b'] = 'red'; @C['14'] = 'white' + @C['15a'] = 'green'; @C['15b'] = 'yellow'; @C['16'] = 'gray65' + @C['17'] = '#A65353'; @C['18'] = @C['fg']; @C['19'] = 'gray50' + @C['20'] = 'cyan'; @C['21'] = 'gray65'; @C['22'] = @C['20'] + @C['23a'] = 'blue'; @C['23b'] = 'red'; @C['23c'] = 'yellow' + @C['24a'] = 'red'; @C['24b'] = 'white'; + + @STEP = TkVariable.new_hash + @STEP.default_value_type = :numeric + + @XY = {} + + @XY6 = { + '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192], + '-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176], + '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164], + '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151], + '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219], + '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324], + '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346], + '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391], + '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456], + '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443], + '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437], + '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424], + '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412], + '13,15'=>[376, 410], '13,16'=>[360, 403] + } + + @timer = TkTimer.new(@speed[@S['speed'].numeric]){|timer| + timer.set_interval(go) + } + + do_display + reset + + # Start everything going + @timer.start + end + + def do_display() + @ctrl = TkFrame.new(@parent, :relief=>:ridge, :bd=>2, :padx=>5, :pady=>5) + @screen = TkFrame.new(@parent, :bd=>2, + :relief=>:raised).pack(:side=>:left, :fill=>:both, + :expand=>true) + + @canvas = TkCanvas.new(@parent, :width=>850, :height=>700, + :bg=>@C['bg'], :highlightthickness=>0){ + scrollregion([0, 0, 1000, 1000]) # Kludge to move everything up + yview_moveto(0.05) + }.pack(:in=>@screen, :side=>:top, :fill=>:both, :expand=>true) + + @canvas.bind('3'){ @pause.invoke } + @canvas.bind('Destroy'){ @timer.stop } + + do_ctrl_frame + do_detail_frame + + # msg = TkLabel.new(@parent, :bg=>@C['bg'], :fg=>'white') { + msg = Tk::Label.new(@parent, :bg=>@C['bg'], :fg=>'white') { + font 'Arial 10' + wraplength 600 + justify 'left' + text "This is a demonstration of just how complex you can make your animations become. Click the ball to start things moving!\n\"Man will always find a difficult means to perform a simple task\" - Rube Goldberg" + } + msg.place(:in=>@canvas, :relx=>0, :rely=>0, :anchor=>:nw) + + frame = TkFrame.new(@parent, :bg=>@C['bg']) + + # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + text 'Dismiss' + command proc{ + tmppath = $goldberg_demo + $goldberg_demo = nil + tmppath.destroy + } + }.pack('side'=>'left') + + # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + text 'See Code' + command proc{showCode 'goldberg'} + }.pack('side'=>'left', 'padx'=>5) + + # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl}, + @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl}, + :bg=>@C['bg'], :activebackground=>@C['bg']) + @show.pack('side'=>'left') + frame.place(:in=>@canvas, :relx=>1, :rely=>0, :anchor=>:ne) + + Tk.update + end + + def do_ctrl_frame + @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6, + :command=>proc{do_button(0)}) + if font = @start['font'] + @start.font(font.weight('bold')) + end + + @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font, + :command=>proc{do_button(1)}, :relief=>:raised, + :variable=>@S['pause']) + + @step = TkButton.new(@parent, :text=>'Single Step', :font=>font, + :command=>proc{do_button(2)}) + @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font, + :command=>proc{do_button(4)}) + @reset = TkButton.new(@parent, :text=>'Reset', :font=>font, + :command=>proc{do_button(3)}) + + @details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge) + @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font, + :relief=>:raised, :variable=>@S['details']) + + @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'], + :justify=>:center) + @speed_scale = TkScale.new(@parent, :orient=>:horizontal, + :from=>1, :to=>10, :font=>font, + :variable=>@S['speed'], :bd=>2, + :relief=>:ridge, :showvalue=>false) + @about = TkButton.new(@parent, :text=>'About', + :command=>proc{about}, :font=>font) + + Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew) + @ctrl.grid_rowconfigure(1, :minsize=>10) + Tk.grid(@pause, :in=>@ctrl, :row=>2, :sticky=>:ew) + Tk.grid(@step, :in=>@ctrl, :sticky=>:ew) + Tk.grid(@bstep, :in=>@ctrl, :sticky=>:ew) + Tk.grid(@reset, :in=>@ctrl, :sticky=>:ew) + @ctrl.grid_rowconfigure(10, :minsize=>20) + Tk.grid(@details, :in=>@ctrl, :row=>11, :sticky=>:ew) + Tk.grid(@detail, :in=>@details, :row=>0, :sticky=>:ew) + @ctrl.grid_rowconfigure(50, :weight=>1) + + @S['mode'].trace('w', proc{|*args| active_GUI(*args)}) + @S['details'].trace('w', proc{|*args| active_GUI(*args)}) + @S['speed'].trace('w', proc{|*args| active_GUI(*args)}) + + Tk.grid(@msg_entry, :in=>@ctrl, :row=>98, :sticky=>:ew, :pady=>5) + Tk.grid(@speed_scale, :in=>@ctrl, :row=>99, :sticky=>:ew) + Tk.grid(@about, :in=>@ctrl, :row=>100, :sticky=>:ew) + + @reset.bind('3'){@S['mode'].value = -1} # Debugging + end + + def do_detail_frame + @f_details = TkFrame.new(@details) + + @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'], + :bd=>1, :relief=>:solid, :bg=>'white') + Tk.grid(@label, '-', '-', '-', :sticky=>:ew, :row=>0) + + idx = 1 + loop { + break unless respond_to?("move#{idx}") + l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e, + :width=>2, :bd=>1, :relief=>:solid, :bg=>'white') + @STEP[idx] = 0 + ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx), + :width=>5, :bd=>1, :relief=>:solid, :bg=>'white') + row = (idx + 1)/2 + col = ((idx + 1) & 1) * 2 + Tk.grid(l, :sticky=>:ew, :row=>row, :column=>col) + Tk.grid(ll, :sticky=>:ew, :row=>row, :column=>(col + 1)) + idx += 1 + } + @f_details.grid_columnconfigure(1, :weight=>1) + end + + def show_ctrl + if @ctrl.winfo_mapped? + @ctrl.pack_forget + @show.text('>>') + else + @ctrl.pack(:side=>:right, :fill=>:both, :ipady=>5) + @show.text('<<') + end + end + + def draw_all + reset_step + @canvas.delete(:all) + idx = 0 + loop{ + m = "draw#{idx}" + break unless respond_to?(m) + send(m) + idx += 1 + } + end + + def active_GUI(var1, var2, op) + st = {false=>:disabled, true=>:normal} + + m = @S['mode'].to_sym + @S['pause'].value = (m == :MPAUSE) + @start.state(st[m != :MGO]) + @pause.state(st[m != :MSTART && m != :MDONE]) + @step.state(st[m != :MGO && m != :MDONE]) + @bstep.state(st[m != :MGO && m != :MDONE]) + @reset.state(st[m != :MSTART]) + + if @S['details'].bool + Tk.grid(@f_details, :in=>@details, :row=>2, :sticky=>:ew) + else + Tk.grid_forget(@f_details) + end + @speed_scale.label("Speed: #{@S['speed'].value}") + end + + def start + @S['mode'].value = :MGO + end + + def do_button(what) + case what + when 0 # Start + reset if @S['mode'].to_sym == :MDONE + @S['mode'].value = :MGO + + when 1 # Pause + @S['mode'].value = ((@S['pause'].bool)? :MPAUSE: :MGO) + + when 2 # Step + @S['mode'].value = :MSSTEP + + when 3 # Reset + reset + + when 4 # Big step + @S['mode'].value = :MBSTEP + end + end + + def go(who = nil) + now = Tk::Clock.clicks(:miliseconds) + if who # Start here for debugging + @S['active'] = [who] + @S['mode'].value = :MGO + end + return if @S['mode'].to_sym == :MDEBUG # Debugging + # If not paused, do the next move + n = next_step if @S['mode'].to_sym != :MPAUSE + @S['mode'].value = :MPAUSE if @S['mode'].to_sym == :MSSTEP # Single step + @S['mode'].value = :MSSTEP if @S['mode'].to_sym == :MBSTEP && n # big step + elapsed = Tk::Clock.clicks(:miliseconds) - now + delay = @speed[@S['speed'].to_i] - elapsed + delay = 1 if delay <= 0 + return delay + end + + def next_step + retval = false # Return value + + if @S['mode'].to_sym != :MSTART && @S['mode'].to_sym != :MDONE + @S['cnt'].numeric += 1 + end + alive = [] + @S['active'].each{|who| + who = who.to_i + n = send("move#{who}") + if (n & 1).nonzero? # This guy still alive + alive << who + end + if (n & 2).nonzero? # Next guy is active + alive << (who + 1) + retval = true + end + if (n & 4).nonzero? # End of puzzle flag + @S['mode'].value = :MDONE # Done mode + @S['active'] = [] # No more animation + return true + end + } + @S['active'] = alive + return retval + end + + def about + msg = "Ruby/Tk Version ::\nby Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)\n\n" + msg += "Original Version ::\n" + msg += "#{@S['title']}\nby Keith Vetter, March 2003\n(Reproduced by kind permission of the author)\n\n" + msg += "Man will always find a difficult means to perform a simple task" + msg += "\nRube Goldberg" + Tk.messageBox(:message=>msg, :title=>'About') + end + + ################################################################ + # + # All the drawing and moving routines + # + + # START HERE! banner + def draw0 + color = @C['0'] + TkcText.new(@canvas, [579, 119], :text=>'START HERE!', + :fill=>color, :anchor=>:w, + :tag=>'I0', :font=>['Times Roman', 12, :italic, :bold]) + TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color, + :width=>5, :arrow=>:last, :arrowshape=>[18, 18, 5]) + @canvas.itembind('I0', '1'){ start } + end + + def move0(step = nil) + step = get_step(0, step) + + if @S['mode'].to_sym != :MSTART # Start the ball rolling + move_abs('I0', [-100, -100]) # Hide the banner + return 2 + end + + pos = [ + [673, 119], [678, 119], [683, 119], [688, 119], + [693, 119], [688, 119], [683, 119], [678, 119] + ] + step = step % pos.length + move_abs('I0', pos[step]) + return 1 + end + + # Dropping ball + def draw1 + color = @C['1a'] + color2 = @C['1b'] + TkcPolygon.new(@canvas, + [ 844, 133, 800, 133, 800, 346, 820, 346, + 820, 168, 844, 168, 844, 133 ], + :width=>3, :fill=>color, :outline=>'') + TkcPolygon.new(@canvas, + [ 771, 133, 685, 133, 685, 168, 751, 168, + 751, 346, 771, 346, 771, 133 ], + :width=>3, :fill=>color, :outline=>'') + TkcOval.new(@canvas, box(812, 122, 9), + :tag=>'I1', :fill=>color2, :outline=>'') + + @canvas.itembind('I1', '1'){ start } + end + + def move1(step = nil) + step = get_step(1, step) + pos = [ + [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153], + [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438], + [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601], + [-100, -100] + ] + return 0 if step >= pos.length + where = pos[step] + move_abs('I1', where) + move15a if where[2] == :y + return 3 if where[2] == :x + return 1 + end + + # Lighting the match + def draw2 + color = @C['2'] + + # Fulcrum + TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392], + :fill=>@C['fg'], :outline=>@C['fg']) + + # Strike box + TkcRectangle.new(@canvas, [628, 335, 660, 383], + :fill=>'', :outline=>@C['fg']) + (0..2).each{|y| + yy = 335 + y*16 + TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25', + :anchor=>:nw, :foreground=>@C['fg']) + TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25', + :anchor=>:nw, :foreground=>@C['fg']) + } + + # Lever + TkcLine.new(@canvas, [702, 366, 798, 366], + :fill=>@C['fg'], :width=>6, :tag=>'I2_0') + + # R strap + TkcLine.new(@canvas, [712, 363, 712, 355], + :fill=>@C['fg'], :width=>3, :tag=>'I2_1') + + # L strap + TkcLine.new(@canvas, [705, 363, 705, 355], + :fill=>@C['fg'], :width=>3, :tag=>'I2_2') + + # Match stick + TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356], + :fill=>@C['fg'], :width=>3, :tag=>'I2_3') + + # Match head + TkcPolygon.new(@canvas, + [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1, + 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ], + :fill=>color, :outline=>color, :tag=>'I2_4') + end + + def move2(step = nil) + step = get_step(2, step) + + stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1] + xy = [] + xy[0] = [ + 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307, + 662, 318, 662, 328, 671, 336 + ] + xy[1] = [ + 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311, + 661, 327, 671, 335 + ] + xy[2] = [ + 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298, + 666, 309, 660, 324, 672, 336 + ] + + if step >= stages.length + @canvas.delete('I2') + return 0 + end + + if step == 0 # Rotate the match + beta = 20 + + ox, oy = anchor('I2_0', :s) # Where to pivot + + i = 0 + until @canvas.find_withtag("I2_#{i}").empty? + rotate_item("I2_#{i}", ox, oy, beta) + i += 1 + end + + # For the flame + TkcPolygon.new(@canvas, [], :tag=>'I2', :smooth=>true, :fill=>@C['2']) + + return 1 + end + @canvas.coords('I2', xy[stages[step]]) + return ((step == 7)? 3: 1) + end + + # Weight and pulleys + def draw3 + color = @C['3a'] + color2 = @C['3b'] + + xy = [ [602, 296], [577, 174], [518, 174] ] + xy.each{|x, y| # 3 Pulleys + TkcOval.new(@canvas, box(x, y, 13), + :fill=>color, :outline=>@C['fg'], :width=>3) + TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg']) + } + + # Wall to flame + TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s', + :width=>3, :fill=>@C['fg'], :smooth=>true) + + # Flame to pulley 1 + TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0', + :width=>3, :fill=>@C['fg'], :smooth=>true) + TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1', + :width=>3, :fill=>@C['fg'], :smooth=>true) + + # Pulley 1 half way to 2 + TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2', + :width=>3, :fill=>@C['fg']) + + # Pulley 1 other half to 2 + TkcLine.new(@canvas, [589, 235, 589, 174], :width=>3, :fill=>@C['fg']) + + # Across the top + TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg']) + + # Down to weight + TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w', + :width=>3, :fill=>@C['fg']) + + # Draw the weight as 2 circles, two rectangles and 1 rounded rectangle + x1, y1, x2, y2 = [515, 207, 495, 207] + TkcOval.new(@canvas, box(x1, y1, 6), + :tag=>'I3_', :fill=>color2, :outline=>color2) + TkcOval.new(@canvas, box(x2, y2, 6), + :tag=>'I3_', :fill=>color2, :outline=>color2) + TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6, + :tag=>'I3_', :fill=>color2, :outline=>color2) + + TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15), + :smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2) + + TkcLine.new(@canvas, [500, 217, 511, 217], + :tag=>'I3_', :fill=>color2, :width=>10) + + # Bottom weight target + TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465], + :tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10) + end + + def move3(step = nil) + step = get_step(3, step) + + pos = [ [505, 247], [505, 297], [505, 386.5], [505, 386.5] ] + rope = [] + rope[0] = [750, 309, 729, 301, 711, 324, 690, 300] + rope[1] = [750, 309, 737, 292, 736, 335, 717, 315, 712, 320] + rope[2] = [750, 309, 737, 309, 740, 343, 736, 351, 725, 340] + rope[3] = [750, 309, 738, 321, 746, 345, 742, 356] + + return 0 if step >= pos.length + + @canvas.delete("I3_#{step}") # Delete part of the rope + move_abs('I3_', pos[step]) # Move weight down + @canvas.coords('I3_s', rope[step]) # Flapping rope end + @canvas.coords('I3_w', [505, 174].concat(pos[step])) + if step == 2 + @canvas.move('I3__', 0, 30) + return 2 + end + return 1 + end + + # Cage and door + def draw4 + color = @C['4'] + x0, y0, x1, y1 = [527, 356, 611, 464] + + # Horizontal bars + y0.step(y1, 12){|y| + TkcLine.new(@canvas, [x0, y, x1, y], :fill=>color, :width=>1) + } + + # Vertical bars + x0.step(x1, 12){|x| + TkcLine.new(@canvas, [x, y0, x, y1], :fill=>color, :width=>1) + } + + # Swing gate + TkcLine.new(@canvas, [518, 464, 518, 428], + :tag=>'I4', :fill=>color, :width=>1) + end + + def move4(step = nil) + step = get_step(4, step) + + angles = [-10, -20, -30, -30] + return 0 if step >= angles.length + + rotate_item('I4', 518, 464, angles[step]) + @canvas.raise('I4') + + return((step == 3)? 3: 1) + end + + # Mouse + def draw5 + color = @C['5a'] + color2 = @C['5b'] + + xy = [377, 248, 410, 248, 410, 465, 518, 465] # Mouse course + xy.concat [518, 428, 451, 428, 451, 212, 377, 212] + + TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3) + + xy = [ + 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446, + 575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452 + ] + TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color) + + TkcLine.new(@canvas, [573, 452, 592, 458, 601, 460, 613, 456], # Tail + :tag=>['I5', 'I5_1'], :fill=>color, :smooth=>true, :width=>3) + + xy = box(540, 446, 2) # Eye + xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445] + TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'], + :outline=>'', :smooth=>true) + + xy = [538, 454, 535, 461] # Front leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_3'], :fill=>color, :width=>2) + + xy = [566, 455, 569, 462] # Back leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_4'], :fill=>color, :width=>2) + + xy = [544, 455, 545, 460] # 2nd front leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_5'], :fill=>color, :width=>2) + + xy = [560, 455, 558, 460] # 2nd back leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_6'], :fill=>color, :width=>2) + end + + def move5(step = nil) + step = get_step(5, step) + + pos = [ + [553, 452], [533, 452], [513, 452], [493, 452], [473, 452], + [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414], + [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294], + [422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237] + ] + + return 0 if step >= pos.length + + x, y, beta, nxt = pos[step] + move_abs('I5', [x, y]) + if beta + ox, oy = centroid('I5_0') + (0..6).each{|id| rotate_item("I5_#{id}", ox, oy, beta) } + end + return 3 if nxt == :x + return 1 + end + + # Dropping gumballs + def draw6 + color = @C['6'] + xy = [324, 130, 391, 204] # Ball holder + xy = round_rect(xy, 10) + TkcPolygon.new(@canvas, xy, :smooth=>true, + :outline=>@C['fg'], :width=>3, :fill=>color) + xy = [339, 204, 376, 253] # Below the ball holder + TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3, + :fill=>color, :tag=>'I6c') + xy = box(346, 339, 28) + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc, + :start=>80, :extent=>205) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc, + :start=>-41, :extent=>85) + + xy = box(346, 339, 15) # Center of rotor + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'], :tag=>'I6m') + xy = [352, 312, 352, 254, 368, 254, 368, 322] # Top drop to rotor + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'') + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2) + + xy = [353, 240, 367, 300] # Poke bottom hole + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + xy = [341, 190, 375, 210] # Poke another hole + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + + xy = [ + 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403, + 352, 403, 352, 366 + ] + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', + :width=>2) # Below rotor + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2) + xy = box(275, 342, 7) # On/off rotor + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg']) + xy = [276, 334, 342, 325] # Fan belt top + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [276, 349, 342, 353] # Fan belt bottom + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = [337, 212, 337, 247] # What the mouse pushes + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_') + xy = [392, 212, 392, 247] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_') + xy = [337, 230, 392, 230] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>7, :tag=>'I6_') + + who = -1 # All the balls + colors = %w(red cyan orange green blue darkblue) + colors *= 3 + + (0..16).each{|i| + loc = -i + color = colors[i] + x, y = @XY6["#{loc}"] + TkcOval.new(@canvas, box(x, y, 5), + :fill=>color, :outline=>color, :tag=>"I6_b#{i}") + } + draw6a(12) # The wheel + end + + def draw6a(beta) + @canvas.delete('I6_0') + ox, oy = [346, 339] + (0..3).each{|i| + b = beta + i * 45 + x, y = rotate_c(28, 0, 0, 0, b) + xy = [ox + x, oy + y, ox - x, oy - y] + TkcLine.new(@canvas, xy, :tag=>'I6_0', :fill=>@C['fg'], :width=>2) + } + end + + def move6(step = nil) + step = get_step(6, step) + + return 0 if step > 62 + + if step < 2 # Open gate for balls to drop + @canvas.move('I6_', -7, 0) + if step == 1 # Poke a hole + xy = [348, 226, 365, 240] + TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill), + :outline=>'') + end + return 1 + end + + s = step - 1 # Do the gumball drop dance + (0..(((s - 1)/3).to_i)).each{|i| + tag = "I6_b#{i}" + break if @canvas.find_withtag(tag).empty? + loc = s - 3*i + + if @XY6["#{loc},#{i}"] + move_abs(tag, @XY6["#{loc},#{i}"]) + elsif @XY6["#{loc}"] + move_abs(tag, @XY6["#{loc}"]) + end + } + if s % 3 == 1 + first = (s + 2)/3 + i = first + loop { + tag = "I6_b#{i}" + break if @canvas.find_withtag(tag).empty? + loc = first - i + move_abs(tag, @XY6["#{loc}"]) + i += 1 + } + end + if s >= 3 # Rotate the motor + idx = s % 3 + draw6a(12 + s * 15) + end + return((s == 3)? 3 : 1) + end + + # On/off switch + def draw7 + color = @C['7'] + xy = [198, 306, 277, 374] # Box + TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2, + :fill=>color, :tag=>'I7z') + @canvas.lower('I7z') + xy = [275, 343, 230, 349] + TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last, + :arrowshape=>[23, 23, 8], :width=>6) + xy = [225, 324] # On button + x, y = xy + TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg']) + xy = [218, 323] # On text + font = ['Times Roman', 8] + TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e, + :fill=>@C['fg'], :font=>font) + xy = [225, 350] # Off button + x, y = xy + TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg']) + xy = [218, 349] # Off text + TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e, + :fill=>@C['fg'], :font=>font) + end + + def move7(step = nil) + step = get_step(7, step) + + numsteps = 30 + return 0 if step > numsteps + beta = 30.0 / numsteps + rotate_item('I7', 275, 343, beta) + + return((step == numsteps)? 3: 1) + end + + # Electricity to the fan + def draw8 + sine([271, 248, 271, 306], 5, 8, :tag=>'I8_s', :fill=>@C['8'], :width=>3) + end + + def move8(step = nil) + step = get_step(8, step) + + return 0 if step > 3 + if step == 0 + sparkle(anchor('I8_s', :s), 'I8') + return 1 + elsif step == 1 + move_abs('I8', anchor('I8_s', :c)) + elsif step == 2 + move_abs('I8', anchor('I8_s', :n)) + else + @canvas.delete('I8') + end + return((step == 2)? 3: 1) + end + + # Fan + def draw9 + color = @C['9'] + xy = [266, 194, 310, 220] + TkcOval.new(@canvas, xy, :outline=>color, :fill=>color) + xy = [280, 209, 296, 248] + TkcOval.new(@canvas, xy, :outline=>color, :fill=>color) + xy = [ + 288, 249, 252, 249, 260, 240, 280, 234, + 296, 234, 316, 240, 324, 249, 288, 249 + ] + TkcPolygon.new(@canvas, xy, :fill=>color, :smooth=>true) + + xy = [248, 205, 265, 214, 264, 205, 265, 196] # Spinner + TkcPolygon.new(@canvas, xy, :fill=>color) + + xy = [255, 206, 265, 234] # Fan blades + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I9_0') + xy = [255, 176, 265, 204] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I9_0') + xy = [255, 206, 265, 220] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>1, :tag=>'I9_1') + xy = [255, 190, 265, 204] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>1, :tag=>'I9_1') + end + + def move9(step = nil) + step = get_step(9, step) + + if (step & 1).nonzero? + @canvas.itemconfigure('I9_0', :width=>4) + @canvas.itemconfigure('I9_1', :width=>1) + @canvas.lower('I9_1', 'I9_0') + else + @canvas.itemconfigure('I9_0', :width=>1) + @canvas.itemconfigure('I9_1', :width=>4) + @canvas.lower('I9_0', 'I9_1') + end + return 3 if step == 0 + return 1 + end + + # Boat + def draw10 + color = @C['10a'] + color2 = @C['10b'] + xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail + TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'], + :tag=>'I10') + xy = box(209, 204, 31) # Front + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie, + :start=>120, :extent=>120, :tag=>'I10') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>120, :extent=>120, :tag=>'I10') + xy = box(249, 204, 31) # Back + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3, + :style=>:pie, :start=>120, :extent=>120, :tag=>'I10') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>120, :extent=>120, :tag=>'I10') + + xy = [200, 171, 200, 249] # Mast + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10') + xy = [159, 234, 182, 234] # Bow sprit + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10') + xy = [180, 234, 180, 251, 220, 251] # Hull + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6, :tag=>'I10') + + xy = [92, 255, 221, 255] # Waves + sine(xy, 2, 25, :fill=>color2, :width=>1, :tag=>'I10w') + + xy = @canvas.coords('I10w')[4..-5] # Water + xy.concat([222, 266, 222, 277, 99, 277]) + TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>color2) + xy = [222, 266, 222, 277, 97, 277, 97, 266] # Water bottom + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = box(239, 262, 17) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>95, :extent=>103) + xy = box(76, 266, 21) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :extent=>190) + end + + def move10(step = nil) + step = get_step(10, step) + + pos = [ + [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212], + [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212], + [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212], + [116, 212], [111, 212] + ] + + return 0 if step >= pos.length + + where = pos[step] + move_abs('I10', where) + + return 3 if where[2] == :x + return 1 + end + + # 2nd ball drop + def draw11 + color = @C['11a'] + color2 = @C['11b'] + xy = [23, 264, 55, 591] # Color the down tube + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + xy = box(71, 460, 48) # Color the outer loop + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') + + xy = [55, 264, 55, 458] # Top right side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [55, 504, 55, 591] # Bottom right side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = box(71, 460, 48) # Outer loop + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>110, :extent=>-290, :tag=>'I11i') + xy = box(71, 460, 16) # Inner loop + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'', + :width=>3, :tag=>'I11i') + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3) + + xy = [23, 264, 23, 591] # Left side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = box(1, 266, 23) # Top left curve + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, + :style=>:arc, :extent=>90) + + xy = box(75, 235, 9) # The ball + TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'', + :width=>3, :tag=>'I11') + end + + def move11(step = nil) + step = get_step(11, step) + + pos = [ + [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266], + [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472], + [100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591] + ] + + return 0 if step >= pos.length + where = pos[step] + move_abs('I11', where) + return 3 if where[2] == :x + return 1 + end + + # Hand + def draw12 + xy = [ + 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590, + 60, 590, 60, 610, 60, 610 + ] + xy.concat([60, 610, 65, 620, 60, 631]) # Thumb + xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669, + 56, 669, 50, 669, 50, 662, 50, 637]) + + y0 = 637 # Bumps for fingers + y1 = 645 + 50.step(21, -10){|x| + x1 = x - 5 + x2 = x - 10 + xy << x << y0 << x1 << y1 << x2 << y0 + } + TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'], + :smooth=>true, :tag=>'I12', :width=>3) + end + + def move12(step = nil) + step = get_step(12, step) + + pos = [[42.5, 641, :x]] + return 0 if step >= pos.length + where = pos[step] + move_abs('I12', where) + return 3 if where[2] == :x + return 1 + end + + # Fax + def draw13 + color = @C['13a'] + xy = [86, 663, 149, 663, 149, 704, 50, 704, 50, 681, 64, 681, 86, 671] + xy2 = [ + 784, 663, 721, 663, 721, 704, 820, 704, 820, 681, 806, 681, 784, 671 + ] + radii = [2, 9, 9, 8, 5, 5, 2] + + round_poly(@canvas, xy, radii, :width=>3, + :outline=>@C['fg'], :fill=>color) + round_poly(@canvas, xy2, radii, :width=>3, + :outline=>@C['fg'], :fill=>color) + + xy = [56, 677] + x, y = xy + TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I13') + xy = [809, 677] + x, y = xy + TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I13R') + + xy = [112, 687] # Label + TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'], + :font=>['Times Roman', 12, :bold]) + xy = [762, 687] + TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'], + :font=>['Times Roman', 12, :bold]) + + xy = [138, 663, 148, 636, 178, 636] # Paper guide + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3) + xy = [732, 663, 722, 636, 692, 636] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3) + + sine([149, 688, 720, 688], 5, 15, + :tag=>'I13_s', :fill=>@C['fg'], :width=>3) + end + + def move13(step = nil) + step = get_step(13, step) + + numsteps = 7 + + if step == numsteps + 2 + move_abs('I13_star', [-100, -100]) + @canvas.itemconfigure('I13R', :fill=>@C['13b'], :width=>2) + return 2 + end + if step == 0 # Button down + @canvas.delete('I13') + sparkle([-100, -100], 'I13_star') # Create off screen + return 1 + end + x0, y0 = anchor('I13_s', :w) + x1, y1 = anchor('I13_s', :e) + x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f + move_abs('I13_star', [x, y0]) + return 1 + end + + # Paper in fax + def draw14 + color = @C['14'] + xy = [102, 661, 113, 632, 130, 618] # Left paper edge + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14L_0') + xy = [148, 629, 125, 640, 124, 662] # Right paper edge + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14L_1') + draw14a('L') + + xy = [ + 768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171 + ] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14R_0') + @canvas.lower('I14R_0') + # NB. these numbers are VERY sensitive, you must start with final size + # and shrink down to get the values + xy = [ + 745.947897349, 662.428358855, 745.997829056, 662.452239237, 746.0, 662.5 + ] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14R_1') + @canvas.lower('I14R_1') + end + + def draw14a(side) + color = @C['14'] + xy = @canvas.coords("I14#{side}_0") + xy2 = @canvas.coords("I14#{side}_1") + x0, y0, x1, y1, x2, y2 = xy + x3, y3, x4, y4, x5, y5 = xy2 + + zz = [ + x0, y0, x0, y0, xy, x2, y2, x2, y2, + x3, y3, x3, y3, xy2, x5, y5, x5, y5 + ].flatten + @canvas.delete("I14#{side}") + TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true, + :fill=>color, :outline=>color, :width=>3) + @canvas.lower("I14#{side}") + end + + def move14(step = nil) + step = get_step(14, step) + + # Paper going down + sc = 0.9 - 0.05*step + if sc < 0.3 + @canvas.delete('I14L') + return 0 + end + + ox, oy = @canvas.coords('I14L_0') + @canvas.scale('I14L_0', ox, oy, sc, sc) + ox, oy = @canvas.coords('I14L_1')[-2..-1] + @canvas.scale('I14L_1', ox, oy, sc, sc) + draw14a('L') + + # Paper going up + sc = 0.35 + 0.05*step + sc = 1/sc + + ox, oy = @canvas.coords('I14R_0') + @canvas.scale('I14R_0', ox, oy, sc, sc) + ox, oy = @canvas.coords('I14R_1')[-2..-1] + @canvas.scale('I14R_1', ox, oy, sc, sc) + draw14a('R') + + return((step == 10)? 3: 1) + end + + # Light beam + def draw15 + color = @C['15a'] + xy = [824, 599, 824, 585, 820, 585, 829, 585] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I15a') + xy = [789, 599, 836, 643] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [778, 610, 788, 632] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [766, 617, 776, 625] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + + xy = [633, 600, 681, 640] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [635, 567, 657, 599] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2) + xy = [765, 557, 784, 583] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2) + + sine([658, 580, 765, 580], 3, 15, + :tag=>'I15_s', :fill=>@C['fg'], :width=>3) + end + + def move15a + color = @C['15b'] + @canvas.scale('I15a', 824, 599, 1, 0.3) # Button down + xy = [765, 621, 681, 621] + TkcLine.new(@canvas, xy, :dash=>'-', :width=>3, :fill=>color, :tag=>'I15') + end + + def move15(step = nil) + step = get_step(15, step) + + numsteps = 6 + + if step == numsteps + 2 + move_abs('I15_star', [-100, -100]) + return 2 + end + if step == 0 # Break the light beam + sparkle([-100, -100], 'I15_star') + xy = [765, 621, 745, 621] + @canvas.coords('I15', xy) + return 1 + end + x0, y0 = anchor('I15_s', :w) + x1, y1 = anchor('I15_s', :e) + x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f + move_abs('I15_star', [x, y0]) + return 1 + end + + # Bell + def draw16 + color = @C['16'] + xy = [722, 485, 791, 556] + TkcRectangle.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>3) + xy = box(752, 515, 25) # Bell + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black', + :tag=>'I16b', :width=>2) + xy = box(752, 515, 5) # Bell button + TkcOval.new(@canvas, xy, :fill=>'black', :outline=>'black', :tag=>'I16b') + + xy = [784, 523, 764, 549] # Clapper + TkcLine.new(@canvas, xy, :width=>3, :tag=>'I16c', :fill=>@C['fg']) + xy = box(784, 523, 4) + TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>@C['fg'], :tag=>'I16d') + end + + def move16(step = nil) + step = get_step(16, step) + + # Note: we never stop + ox, oy = [760, 553] + if (step & 1).nonzero? + beta = 12 + @canvas.move('I16b', 3, 0) + else + beta = -12 + @canvas.move('I16b', -3, 0) + end + rotate_item('I16c', ox, oy, beta) + rotate_item('I16d', ox, oy, beta) + + return ((step == 1)? 3: 1) + end + + # Cat + def draw17 + color = @C['17'] + + xy = [584, 556, 722, 556] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [584, 485, 722, 485] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = [664, 523, 717, 549] # Body + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3, + :style=>:chord, :start=>128, :extent=>260, :tag=>'I17') + + xy = [709, 554, 690, 543] # Paw + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, + :width=>3, :tag=>'I17') + xy = [657, 544, 676, 555] + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, + :width=>3, :tag=>'I17') + + xy = box(660, 535, 15) # Lower face + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>150, :extent=>240, :tag=>'I17_') + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:chord, :start=>150, :extent=>240, :tag=>'I17_') + xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1, + :tag=>['I17_', 'I17_c']) + xy = [652, 542, 628, 539] # Whiskers + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [652, 543, 632, 545] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [652, 546, 632, 552] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + + xy = [668, 543, 687, 538] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + xy = [668, 544, 688, 546] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + xy = [668, 547, 688, 553] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + + xy = [649, 530, 654, 538, 659, 530] # Left eye + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + xy = [671, 530, 666, 538, 661, 530] # Right eye + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + xy = [655, 543, 660, 551, 665, 543] # Mouth + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + end + + def move17(step = nil) + step = get_step(17, step) + + if step == 0 + @canvas.delete('I17') # Delete most of the cat + xy = [655, 543, 660, 535, 665, 543] # Mouth + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :smooth=>true, :tag=>'I17_') + xy = box(654, 530, 4) # Left eye + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'', + :tag=>'I17_') + xy = box(666, 530, 4) # Right eye + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'', + :tag=>'I17_') + + @canvas.move('I17_', 0, -20) # Move face up + xy = [652, 528, 652, 554] # Front leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [670, 528, 670, 554] # 2nd front leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + + xy = [ # Body + 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525, + 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527, + 668, 527, 668, 527, 675, 522, 676, 517, 677, 512 + ] + TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill), + :outline=>@C['fg'], :width=>3, :smooth=>true, + :tag=>'I17_') + xy = [716, 514, 716, 554] # Back leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [694, 532, 694, 554] # 2nd back leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :smooth=>true, :tag=>'I17_') + + @canvas.raise('I17w') # Make whiskers visible + @canvas.move('I17_', -5, 0) # Move away from the wall a bit + return 2 + end + return 0 + end + + # Sling shot + def draw18 + color = @C['18'] + xy = [721, 506, 627, 506] # Sling hold + TkcLine.new(@canvas, xy, :width=>4, :fill=>@C['fg'], :tag=>'I18') + + xy = [607, 500, 628, 513] # Sling rock + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :tag=>'I18a') + + xy = [526, 513, 606, 507, 494, 502] # Sling band + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>4, :tag=>'I18b') + xy = [485, 490, 510, 540, 510, 575, 510, 540, 535, 491] # Sling + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6) + end + + def move18(step = nil) + step = get_step(18, step) + + pos = [ + [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x], + [136, 506], [16, 506], [-100, -100] + ] + + b = [] + b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing + b[1] = [ + 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525, + 553, 536, 538, 534, 532, 519, 529, 499 + ] + b[2] = [ + 491, 503, 508, 563, 542, 533, 551, 526, 561, 539, 549, 550, 530, 500 + ] + b[3] = [ + 491, 503, 508, 563, 530, 554, 541, 562, 525, 568, 519, 544, 530, 501 + ] + + return 0 if step >= pos.length + + if step == 0 + @canvas.delete('I18') + @canvas.itemconfigure('I18b', :smooth=>true) + end + if b[step] + @canvas.coords('I18b', b[step]) + end + + where = pos[step] + move_abs('I18a', where) + return 3 if where[2] == :x + return 1 + end + + # Water pipe + def draw19 + color = @C['19'] + xx = [[249, 181], [155, 118], [86, 55], [22, 0]] + xx.each{|x1, x2| + TkcRectangle.new(@canvas, x1, 453, x2, 467, + :fill=>color, :outline=>'', :tag=>'I19') + TkcLine.new(@canvas, x1, 453, x2, 453, + :fill=>@C['fg'], :width=>1) # Pipe top + TkcLine.new(@canvas, x1, 467, x2, 467, + :fill=>@C['fg'], :width=>1) # Pipe bottom + } + @canvas.raise('I11i') + + xy = box(168, 460, 16) # Bulge by the joint + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc, + :start=>21, :extent=>136) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc, + :start=>-21, :extent=>-130) + + xy = [249, 447, 255, 473] # First joint 26x6 + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + + xy = box(257, 433, 34) # Bend up + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>0, :extent=>-91) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>-90) + xy = box(257, 433, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>0, :extent=>-92) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>-90) + xy = box(257, 421, 34) # Bend left + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>0, :extent=>91) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>90) + xy = box(257, 421, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>0, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>90) + xy = box(243, 421, 34) # Bend down + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>90, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>90, :extent=>90) + xy = box(243, 421, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>90, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>90, :extent=>90) + + xy = [270, 427, 296, 433] # 2nd joint bottom + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [270, 421, 296, 427] # 2nd joint top + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [249, 382, 255, 408] # Third joint right + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [243, 382, 249, 408] # Third joint left + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [203, 420, 229, 426] # Last joint + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + + xy = box(168, 460, 6) # Handle joint + TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>'', :tag=>'I19a') + xy = [168, 460, 168, 512] # Handle bar + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>5, :tag=>'I19b') + end + + def move19(step = nil) + step = get_step(19, step) + + angles = [30, 30, 30] + return 2 if step == angles.length + ox, oy = centroid('I19a') + rotate_item('I19b', ox, oy, angles[step]) + + return 1 + end + + # Water pouring + def draw20 + # do nothing + end + + def move20(step = nil) + step = get_step(20, step) + + pos = [451, 462, 473, 484, 496, 504, 513, 523, 532] + freq = [20, 40, 40, 40, 40, 40, 40, 40, 40] + pos = [ + [451, 20], [462, 40], [473, 40], [484, 40], [496, 40], + [504, 40], [513, 40], [523, 40], [532, 40, :x] + ] + return 0 if step >= pos.length + + @canvas.delete('I20') + where = pos[step] + y, f = where + h20(y, f) + return 3 if where[2] == :x + return 1 + end + + def h20(y, f) + color = @C['20'] + @canvas.delete('I20') + + sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'], + :width=>3, :fill=>color, :smooth=>true) + TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3, + :fill=>color, :smooth=>1, :tag=>['I20', 'I20a']) + TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3, + :fill=>color, :smooth=>1, :tag=>['I20', 'I20b']) + @canvas.move('I20a', 8, 0) + @canvas.move('I20b', 16, 0) + end + + # Bucket + def draw21 + color = @C['21'] + xy = [217, 451, 244, 490] # Right handle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a') + xy = [201, 467, 182, 490] # Left handle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a') + + xy = [245, 490, 237, 535] # Right side + xy2 = [189, 535, 181, 490] # Left side + TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'', + :tag=>['I21', 'I21f']) + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21') + TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21') + + xy = [182, 486, 244, 498] # Top + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2, + :tag=>['I21', 'I21f']) + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2, + :tag=>['I21', 'I21t']) + xy = [189, 532, 237, 540] # Bottom + TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2, + :tag=>['I21', 'I21b']) + end + + def move21(step = nil) + step = get_step(21, step) + + numsteps = 30 + return 0 if step >= numsteps + + x1, y1, x2, y2 = @canvas.coords('I21b') + # lx1, ly1, lx2, ly2 = @canvas.coords('I21t') + lx1, ly1, lx2, ly2 = [183, 492, 243, 504] + + f = step / numsteps.to_f + y2 = y2 - 3 + xx1 = x1 + (lx1 - x1) * f + yy1 = y1 + (ly1 - y1) * f + xx2 = x2 + (lx2 - x2) * f + yy2 = y2 + (ly2 - y2) * f + + @canvas.itemconfigure('I21b', :fill=>@C['20']) + @canvas.delete('I21w') + TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1, + :tag=>['I21', 'I21w'], :outline=>'', :fill=>@C['20']) + @canvas.lower('I21w', 'I21') + @canvas.raise('I21b') + @canvas.lower('I21f') + + return((step == numsteps - 1)? 3: 1) + end + + # Bucket drop + def draw22 + # do nothing + end + + def move22(step = nil) + step = get_step(22, step) + pos = [[213, 513], [213, 523], [213, 543, :x], [213, 583], [213, 593]] + + @canvas.itemconfigure('I21f', :fill=>@C['22']) if step == 0 + return 0 if step >= pos.length + where = pos[step] + move_abs('I21', where) + h20(where[1], 40) + @canvas.delete('I21_a') # Delete handles + + return 3 if where[2] == :x + return 1 + end + + # Blow dart + def draw23 + color = @C['23a'] + color2 = @C['23b'] + color3 = @C['23c'] + + xy = [185, 623, 253, 650] # Block + TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'], + :width=>2, :tag=>'I23a') + xy = [187, 592, 241, 623] # Balloon + TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b', + :style=>:arc, :start=>12, :extent=>336) + xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle + TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b') + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b') + + xy = [285, 611, 250, 603] # Dart body + TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], + :width=>3, :tag=>'I23d') + xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail + TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'], + :width=>3, :tag=>'I23d') + xy = [249, 607, 268, 607] # Dart detail + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d') + xy = [285, 607, 305, 607] # Dart needle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d') + end + + def move23(step = nil) + step = get_step(23, step) + + pos = [ + [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607], + [487, 607], [587, 607], [687, 607], [787, 607], [-100, -100] + ] + + return 0 if step >= pos.length + if step <= 1 + ox, oy = anchor('I23a', :n) + @canvas.scale('I23b', ox, oy, 0.9, 0.5) + end + where = pos[step] + move_abs('I23d', where) + + return 3 if where[2] == :x + return 1 + end + + # Balloon + def draw24 + color = @C['24a'] + xy = [366, 518, 462, 665] # Balloon + TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], + :width=>3, :tag=>'I24') + xy = [414, 666, 414, 729] # String + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I24') + xy = [410, 666, 404, 673, 422, 673, 418, 666] # Nozzle + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], + :width=>3, :tag=>'I24') + + xy = [387, 567, 390, 549, 404, 542] # Reflections + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [395, 568, 399, 554, 413, 547] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [403, 570, 396, 555, 381, 553] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [408, 564, 402, 547, 386, 545] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + end + + def move24(step = nil) + step = get_step(24, step) + + return 0 if step > 4 + return 2 if step == 4 + + if step == 0 + @canvas.delete('I24') # Exploding balloon + xy = [ + 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594, + 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738, + 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613, + 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508, + 431, 441, 431, 440, 400, 502, 347, 465, 347, 465 + ] + TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'], + :outline=>@C['24a'], :width=>10, :smooth=>true) + msg = Tk.subst(@S['message'].value) + TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'], + :justify=>:center, :font=>['Times Roman', 18, :bold]) + return 1 + end + + @canvas.itemconfigure('I24t', :font=>['Times Roman', 18 + 6*step, :bold]) + @canvas.move('I24', 0, -60) + ox, oy = centroid('I24') + @canvas.scale('I24', ox, oy, 1.25, 1.25) + return 1 + end + + # Displaying the message + def move25(step = nil) + step = get_step(25, step) + + if step == 0 + @XY['25'] = Tk::Clock.clicks(:miliseconds) + return 1 + end + elapsed = Tk::Clock.clicks(:miliseconds) - @XY['25'] + return 1 if elapsed < 5000 + return 2 + end + + # Collapsing balloon + def move26(step = nil) + step = get_step(26, step) + + if step >= 3 + @canvas.delete('I24', 'I26') + TkcText.new(@canvas, 430, 740, :anchor=>:s, :tag=>'I26', + :text=>'click to continue', + :font=>['Times Roman', 24, :bold]) + @canvas.bind('1', proc{reset}) + return 4 + end + + ox, oy = centroid('I24') + @canvas.scale('I24', ox, oy, 0.8, 0.8) + @canvas.move('I24', 0, 60) + @canvas.itemconfigure('I24t', :font=>['Times Roman', 30 - 6*step, :bold]) + return 1 + end + + ################################################################ + # + # Helper functions + # + def box(x, y, r) + [x - r, y - r, x + r, y + r] + end + + def move_abs(item, xy) + x, y = xy + ox, oy = centroid(item) + dx = x - ox + dy = y - oy + @canvas.move(item, dx, dy) + end + + def rotate_item(item, ox, oy, beta) + xy = @canvas.coords(item) + xy2 = [] + 0.step(xy.length - 1, 2){|idx| + x, y = xy[idx, 2] + xy2.concat(rotate_c(x, y, ox, oy, beta)) + } + @canvas.coords(item, xy2) + end + + def rotate_c(x, y, ox, oy, beta) + # rotates vector (ox,oy)->(x,y) by beta degrees clockwise + + x -= ox # Shift to origin + y -= oy + + beta = beta * Math.atan(1) * 4 / 180.0 # Radians + xx = x * Math.cos(beta) - y * Math.sin(beta) # Rotate + yy = x * Math.sin(beta) + y * Math.cos(beta) + + xx += ox # Shift back + yy += oy + + [xx, yy] + end + + def reset + draw_all + @canvas.bind_remove('1') + @S['mode'].value = :MSTART + @S['active'] = [0] + end + + # Each Move## keeps its state info in STEP, this retrieves and increments it + def get_step(who, step) + if step + @STEP[who] = step + else + if !@STEP.exist?(who) || @STEP[who] == "" + @STEP[who] = 0 + else + @STEP[who] += 1 + end + end + @STEP[who] + end + + def reset_step + @S['cnt'].value = 0 + @STEP.keys.each{|k| @STEP[k] = ''} + end + + def sine(xy0, amp, freq, opts = {}) + x0, y0, x1, y1 = xy0 + step = 2 + xy = [] + if y0 == y1 # Horizontal + x0.step(x1, step){|x| + beta = (x - x0) * 2 * Math::PI / freq + y = y0 + amp * Math.sin(beta) + xy << x << y + } + else + y0.step(y1, step){|y| + beta = (y - y0) * 2 * Math::PI / freq + x = x0 + amp * Math.sin(beta) + xy << x << y + } + end + TkcLine.new(@canvas, xy, opts) + end + + def round_rect(xy, radius, opts={}) + x0, y0, x3, y3 = xy + r = @canvas.winfo_pixels(radius) + d = 2 * r + + # Make sure that the radius of the curve is less than 3/8 size of the box! + maxr = 0.75 + if d > maxr * (x3 - x0) + d = maxr * (x3 - x0) + end + if d > maxr * (y3 - y0) + d = maxr * (y3 - y0) + end + + x1 = x0 + d + x2 = x3 - d + y1 = y0 + d + y2 = y3 - d + + xy = [x0, y0, x1, y0, x2, y0, x3, y0, x3, y1, x3, y2] + xy.concat([x3, y3, x2, y3, x1, y3, x0, y3, x0, y2, x0, y1]) + return xy + end + + def round_poly(canv, xy, radii, opts) + lenXY = xy.length + lenR = radii.length + if lenXY != 2*lenR + raise "wrong number of vertices and radii" + end + + knots = [] + x0 = xy[-2]; y0 = xy[-1] + x1 = xy[0]; y1 = xy[1] + xy << xy[0] << xy[1] + + 0.step(lenXY - 1, 2){|i| + radius = radii[i/2] + r = canv.winfo_pixels(radius) + + x2 = xy[i+2]; y2 = xy[i+3] + z = _round_poly2(x0, y0, x1, y1, x2, y2, r) + knots.concat(z) + + x0 = x1; y0 = y1 + x1 = x2; y1 = y2 + } + TkcPolygon.new(canv, knots, {:smooth=>true}.update(opts)) + end + + def _round_poly2(x0, y0, x1, y1, x2, y2, radius) + d = 2 * radius + maxr = 0.75 + + v1x = x0 - x1 + v1y = y0 - y1 + v2x = x2 - x1 + v2y = y2 - y1 + + vlen1 = Math.sqrt(v1x*v1x + v1y*v1y) + vlen2 = Math.sqrt(v2x*v2x + v2y*v2y) + + if d > maxr * vlen1 + d = maxr * vlen1 + end + if d > maxr * vlen2 + d = maxr * vlen2 + end + + xy = [] + xy << (x1 + d * v1x / vlen1) << (y1 + d * v1y / vlen1) + xy << x1 << y1 + xy << (x1 + d * v2x / vlen2) << (y1 + d * v2y / vlen2) + + return xy + end + + def sparkle(oxy, tag) + xy = [ + [299, 283], [298, 302], [295, 314], [271, 331], + [239, 310], [242, 292], [256, 274], [281, 273] + ] + xy.each{|x, y| + TkcLine.new(@canvas, 271, 304, x, y, + :fill=>'white', :width=>3, :tag=>tag) + } + move_abs(tag, oxy) + end + + def centroid(item) + anchor(item, :c) + end + + def anchor(item, where) + x1, y1, x2, y2 = @canvas.bbox(item) + case(where) + when :n + y = y1 + when :s + y = y2 + else + y = (y1 + y2) / 2.0 + end + case(where) + when :w + x = x1 + when :e + x = x2 + else + x = (x1 + x2) / 2.0 + end + return [x, y] + end +end + +TkGoldberg_Demo.new(base_frame) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hello b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hello new file mode 100644 index 0000000..5e86ad7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hello @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'tk' + +#unless /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK +# require 'tkencoding' +#end + +TkButton.new(nil, + 'text'=>"Hello Ruby world!", + 'font'=>TkFont.new('k14'), + 'command'=>proc{print "Hello Ruby world!\n"; exit} +).pack + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hscale.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hscale.rb new file mode 100644 index 0000000..e660216 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/hscale.rb @@ -0,0 +1,75 @@ +require "tkcanvas" + +if defined?($hscale_demo) && $hscale_demo + $hscale_demo.destroy + $hscale_demo = nil +end + +$hscale_demo = TkToplevel.new {|w| + title("Horizontal Scale Demonstration") + iconname("hscale") +} +positionWindow($hscale_demo) + +base_frame = TkFrame.new($hscale_demo).pack(:fill=>:both, :expand=>true) + +msg = TkLabel.new(base_frame) { + font $font + wraplength '3.5i' + justify 'left' + text "An arrow and a horizontal scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the length of the arrow." +} +msg.pack('side'=>'top') + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc { + tmppath = $hscale_demo + $hscale_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc { showCode 'hscale' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +def setWidth(w, width) + width = width + 21 + x2 = width - 30 + if x2 < 21 + x2 = 21 + end + w.coords 'poly',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15 + w.coords 'line',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15 +end + +TkFrame.new(base_frame) {|frame| + canvas = TkCanvas.new(frame) {|c| + width 50 + height 50 + bd 0 + highlightthickness 0 + TkcPolygon.new(c, '0', '0', '1', '1', '2', '2') { + fill 'DeepSkyBlue' + tags 'poly' + } + TkcLine.new(c, '0', '0', '1', '1', '2', '2', '0', '0') { + fill 'black' + tags 'line' + } + }.pack('side'=>'top', 'expand'=>'yes', 'anchor'=>'s', 'fill'=>'x', 'padx'=>'15') + scale = TkScale.new(frame) { + orient 'horizontal' + length 284 + from 0 + to 250 + command proc{|value| setWidth(canvas, value)} + tickinterval 50 + }.pack('side'=>'bottom', 'expand'=>'yes', 'anchor'=>'n') + scale.set 75 +}.pack('side'=>'top', 'fill'=>'x') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/icon.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/icon.rb new file mode 100644 index 0000000..a3921d2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/icon.rb @@ -0,0 +1,105 @@ +# icon.rb +# +# This demonstration script creates a toplevel window containing +# buttons that display bitmaps instead of text. +# +# iconic button widget demo (called by 'widget') +# + +# toplevel widget +if defined?($icon_demo) && $icon_demo + $icon_demo.destroy + $icon_demo = nil +end + +# demo toplevel widget +$icon_demo = TkToplevel.new {|w| + title("Iconic Button Demonstration") + iconname("icon") + positionWindow(w) +} + +base_frame = TkFrame.new($icon_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "This window shows three ways of using bitmaps or images in radiobuttons and checkbuttons. On the left are two radiobuttons, each of which displays a bitmap and an indicator. In the middle is a checkbutton that displays a different image depending on whether it is selected or not. On the right is a checkbutton that displays a single bitmap but changes its background color to indicate whether or not it is selected. (This change is visible when the mouse pointer is not directy over the button.)" +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $icon_demo + $icon_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'icon'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# image +flagup = \ +TkBitmapImage.new('file'=>[$demo_dir,'..', + 'images','flagup.xbm'].join(File::Separator), + 'maskfile'=>\ + [$demo_dir,'..','images','flagup.xbm'].join(File::Separator)) +flagdown = \ +TkBitmapImage.new('file'=>[$demo_dir,'..', + 'images','flagdown.xbm'].join(File::Separator), + 'maskfile'=>\ + [$demo_dir,'..', + 'images','flagdown.xbm'].join(File::Separator)) + +# create variable +letters = TkVariable.new + +# frame +TkFrame.new(base_frame, 'borderwidth'=>10){|w| + TkFrame.new(w) {|f| + # TkRadioButton.new(f){ + Tk::RadioButton.new(f){ + bitmap '@' + [$demo_dir,'..', + 'images','letters.xbm'].join(File::Separator) + variable letters + value 'full' + }.pack('side'=>'top', 'expand'=>'yes') + + # TkRadioButton.new(f){ + Tk::RadioButton.new(f){ + bitmap '@' + [$demo_dir,'..', + 'images','noletter.xbm'].join(File::Separator) + variable letters + value 'empty' + }.pack('side'=>'top', 'expand'=>'yes') + + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + + # TkCheckButton.new(w) { + Tk::CheckButton.new(w) { + image flagdown + selectimage flagup + indicatoron 0 + selectcolor self['background'] + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + + # TkCheckButton.new(w) { + Tk::CheckButton.new(w) { + bitmap '@' + [$demo_dir,'..', + 'images','letters.xbm'].join(File::Separator) + indicatoron 0 + selectcolor 'SeaGreen1' + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + +}.pack('side'=>'top') + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image1.rb new file mode 100644 index 0000000..a9072bb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image1.rb @@ -0,0 +1,65 @@ +## image1.rb +# +# This demonstration script displays two image widgets. +# +# two image widgets demo (called by 'widget') +# + +# toplevel widget +if defined?($image1_demo) && $image1_demo + $image1_demo.destroy + $image1_demo = nil +end + +# demo toplevel widget +$image1_demo = TkToplevel.new {|w| + title('Image Demonstration #1') + iconname("Image1") + positionWindow(w) +} + +base_frame = TkFrame.new($image1_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "This demonstration displays two images, each in a separate label widget." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $image1_demo + $image1_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'image1'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# image +image1a = \ +TkPhotoImage.new('file'=>[$demo_dir,'..', + 'images','earth.gif'].join(File::Separator)) +image1b = \ +TkPhotoImage.new('file'=>[$demo_dir,'..', + 'images','earthris.gif'].join(File::Separator)) + +# label +#[ TkLabel.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'), +# TkLabel.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken') +#].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')} +[ Tk::Label.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'), + Tk::Label.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken') +].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image2.rb new file mode 100644 index 0000000..1975dd6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image2.rb @@ -0,0 +1,107 @@ +# image2.rb +# +# This demonstration script creates a simple collection of widgets +# that allow you to select and view images in a Tk label. +# +# widget demo 'load image' (called by 'widget') +# + +# toplevel widget +if defined?($image2_demo) && $image2_demo + $image2_demo.destroy + $image2_demo = nil +end + +# demo toplevel widget +$image2_demo = TkToplevel.new {|w| + title('Image Demonstration #2') + iconname("Image2") + positionWindow(w) +} + +base_frame = TkFrame.new($image2_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "This demonstration allows you to view images using a Tk \"photo\" image. First type a directory name in the listbox, then press Enter to load the directory into the listbox. Then double-click on a file name in the listbox to see that image." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $image2_demo + $image2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'image2'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# create variable +$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator)) + +# image +$image2a = TkPhotoImage.new + +# +TkLabel.new(base_frame, 'text'=>'Directory:')\ +.pack('side'=>'top', 'anchor'=>'w') + +image2_e = TkEntry.new(base_frame) { + width 30 + textvariable $dirName +}.pack('side'=>'top', 'anchor'=>'w') + +TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20)\ +.pack('side'=>'top', 'anchor'=>'w') + +TkLabel.new(base_frame, 'text'=>'File:')\ +.pack('side'=>'top', 'anchor'=>'w') + +TkFrame.new(base_frame){|w| + s = TkScrollbar.new(w) + l = TkListbox.new(w) { + width 20 + height 10 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| l.yview(*args)}) + l.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y') + s.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y') + #l.insert(0,'earth.gif', 'earthris.gif', 'mickey.gif', 'teapot.ppm') + l.insert(0,'earth.gif', 'earthris.gif', 'teapot.ppm') + l.bind('Double-1', proc{|x,y| loadImage $image2a,l,x,y}, '%x %y') + + image2_e.bind 'Return', proc{loadDir l} + +}.pack('side'=>'top', 'anchor'=>'w') + +# image +[ TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20), + TkLabel.new(base_frame, 'text'=>'Image:'), + TkLabel.new(base_frame, 'image'=>$image2a) +].each{|w| w.pack('side'=>'top', 'anchor'=>'w')} + +# +def loadDir(w) + w.delete(0,'end') + Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f| + w.insert('end',File.basename(f)) + } +end + +def loadImage(img,w,x,y) + img.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator)) +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image3.rb new file mode 100644 index 0000000..43afab7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/image3.rb @@ -0,0 +1,125 @@ +# image3.rb +# +# This demonstration script creates a simple collection of widgets +# that allow you to select and view images in a Tk label. +# +# widget demo 'load image' (called by 'widget') +# + +# toplevel widget +if defined?($image3_demo) && $image3_demo + $image3_demo.destroy + $image3_demo = nil +end + +# demo toplevel widget +$image3_demo = TkToplevel.new {|w| + title('Image Demonstration #3') + iconname("Image3") + positionWindow(w) +} + +base_frame = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true) + +# +def loadDir3(w) + w.delete(0,'end') + Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f| + w.insert('end',File.basename(f)) + } +end + +# selectAndLoadDir3 -- +# This procedure pops up a dialog to ask for a directory to load into +# the listobx and (if the user presses OK) reloads the directory +# listbox from the directory named in the demo's entry. +# +# Arguments: +# w - Name of the toplevel window of the demo. +def selectAndLoadDir3(w, lbox) + dir = Tk.chooseDirectory(:initialdir=>$dirName.value, + :parent=>w, :mustexist=>true) + if dir.length > 0 + $dirName.value = dir + loadDir3(lbox) + end +end + +def loadImage(w,x,y) + $image3a.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator)) +end + + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "This demonstration allows you to view images using a Tk \"photo\" image. First type a directory name in the listbox, then type Return to load the directory into the listbox. Then double-click on a file name in the listbox to see that image." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $image3_demo + $image3_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'image3'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# variable +$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator)) + +# image +begin + $image3a.delete +rescue +end +$image3a = TkPhotoImage.new + +# +image3_f = TkFrame.new(base_frame).pack(:fill=>:both, :expand=>true) + +image3_df = TkLabelFrame.new(base_frame, :text=>'Directory:') + +image3_ff = TkLabelFrame.new(base_frame, :text=>'File:', + :padx=>'2m', :pady=>'2m') +image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) { + pack(:side=>:left, :fill=>:y, :expand=>true) + yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y, + :expand=>true)) + insert(0, *(%w(earth.gif earthris.gif teapot.ppm))) + bind('Double-1', proc{|x,y| loadImage(self, x, y)}, '%x %y') +} + +image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){ + pack(:side=>:left, :fill=>:both, :padx=>'2m', :pady=>'2m', :expand=>true) + bind('Return', proc{loadDir3(image3_lbx)}) +} + +TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"Select Dir.", + :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) { + pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m') +} + +image3_if = TkLabelFrame.new(base_frame, :text=>'Image:') {|f| + # TkLabel.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m') + Tk::Label.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m') +} + +Tk.grid(image3_df, '-', + :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f) +Tk.grid(image3_ff, image3_if, + :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f) +TkGrid.columnconfigure(image3_f, 1, :weight=>1) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/items.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/items.rb new file mode 100644 index 0000000..3fd44fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/items.rb @@ -0,0 +1,381 @@ +# items.rb +# +# This demonstration script creates a canvas that displays the +# canvas item types. +# +# canvas item types widget demo (called by 'widget') +# + +# toplevel widget +if defined?($items_demo) && $items_demo + $items_demo.destroy + $items_demo = nil +end + +# demo toplevel widget +$items_demo = TkToplevel.new {|w| + title("Canvas Item Demonstration") + iconname("Items") + positionWindow(w) +} + +base_frame = TkFrame.new($items_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "This window contains a canvas widget with examples of the various kinds of items supported by canvases. The following operations are supported:\n Button-1 drag:\tmoves item under pointer.\n Button-2 drag:\trepositions view.\n Button-3 drag:\tstrokes out area.\n Ctrl+f:\t\tprints items under area." +}.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $items_demo + $items_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'items'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +cvs = nil +TkFrame.new(base_frame) {|cf| + # canvas + cvs = TkCanvas.new(cf) {|c| + focus + scrollregion '0c 0c 30c 24c' + width '15c' + height '10c' + relief 'sunken' + borderwidth 2 + + hs = TkScrollbar.new(cf) {|s| + orient 'horizontal' + command proc{|*args| c.xview(*args)} + c.xscrollcommand proc{|first,last| s.set first,last} + } + + vs = TkScrollbar.new(cf) {|s| + command proc{|*args| c.yview(*args)} + c.yscrollcommand proc{|first,last| s.set first,last} + } + + if $tk_version =~ /^4\.[01]/ + hs.pack('side'=>'bottom', 'fill'=>'x') + vs.pack('side'=>'right', 'fill'=>'y') + c.pack('in'=>cf, 'expand'=>'yes', 'fill'=>'both') + + else + c.grid('in'=>cf, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + vs.grid('row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + hs.grid('row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0) + + end + + } +}.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + +# Display a 3x3 rectangular grid +TkcRectangle.new(cvs, '0c', '0c', '30c', '24c', 'width'=>2) +TkcLine.new(cvs, '0c', '8c', '30c', '8c', 'width'=>2) +TkcLine.new(cvs, '0c', '16c', '30c', '16c', 'width'=>2) +TkcLine.new(cvs, '10c', '0c', '10c', '24c', 'width'=>2) +TkcLine.new(cvs, '20c', '0c', '20c', '24c', 'width'=>2) + +if $tk_version =~ /^4.*/ + font1 = '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*' + font2 = '-Adobe-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*' +else + font1 = 'Helvetica 12' + font2 = 'Helvetica 24 bold' +end +if TkWinfo.depth($root).to_i > 1 + blue = 'DeepSkyBlue3' + red = 'red' + bisque = 'bisque3' + green = 'SeaGreen3' +else + blue = 'black' + red = 'black' + bisque = 'black' + green = 'black' +end + +# tag +$tag_item = TkcGroup.new(cvs) + +# Set up demos within each of the areas of the grid. +TkcText.new(cvs, '5c', '.2c', 'text'=>'Lines', 'anchor'=>'n') +TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c', + 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt', + 'join'=>'miter', 'tags'=>$tag_item ) +TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item) +TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item) +TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c', + '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c', + '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c', + 'width'=>3, 'fill'=>red, 'tags'=>$tag_item ) +TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item ) +TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c', + 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round', + 'tags'=>$tag_item ) + +TkcText.new(cvs, '15c', '.2c', + 'text'=>'Curves (smoothed lines)', 'anchor'=>'n') +TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c', + 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item ) +TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c', + 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item ) +TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c', + '16.5c','4.5c','13.5c','7.5c','12c','6c', + 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator), + 'fill'=>red, 'tags'=>$tag_item ) + +TkcText.new(cvs, '25c', '.2c', 'text'=>'Polygons', 'anchor'=>'n') +TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c', + '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c', + 'fill'=>'green', 'outline'=>'black', 'width'=>4, + 'tags'=>$tag_item ) +TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c', + '28c','1c','29c','1c','29c','4c','29c','4c', + 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item) +TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c', + '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c', + '7.5c','22c','7.5c', + 'stipple'=>'@' + [$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator), + 'outline'=>'black', 'tags'=>$tag_item ) + +TkcText.new(cvs, '5c', '8.2c', 'text'=>'Rectangles', 'anchor'=>'n') +TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c', + 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item) +TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c', + 'fill'=>green, 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'fill'=>blue, 'tags'=>$tag_item ) + +TkcText.new(cvs, '15c', '8.2c', 'text'=>'Ovals', 'anchor'=>'n') +TkcOval.new(cvs, '11c','9.5c','14c','12.5c', + 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item) +TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c', + 'fill'=>green, 'tags'=>$tag_item ) +TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'fill'=>blue, 'tags'=>$tag_item ) + +TkcText.new(cvs, '25c', '8.2c', 'text'=>'Text', 'anchor'=>'n') +TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c') +TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c', + 'text'=>'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c') +TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue, + 'text'=>"Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.", 'justify'=>'center', 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c') +if $tk_version =~ /^4\.[01]/ + TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red, + 'stipple'=>'@' + [$demo_dir, '..', + 'images', 'grey.5'].join(File::Separator), + 'text'=>'Stippled characters', 'tags'=>$tag_item ) +else + TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red, + 'stipple'=>'gray50', 'text'=>'Stippled characters', + 'tags'=>$tag_item ) +end + +TkcText.new(cvs, '5c', '16.2c', 'text'=>'Arcs', 'anchor'=>'n') +TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black', + 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item) +#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc', +# 'outline'=>blue, 'start'=>135, 'extent'=>270, +# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator), +# 'tags'=>$tag_item) +TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc', + 'outline'=>blue, 'start'=>135, 'extent'=>270, + 'outlinestipple'=>'@'+[$demo_dir, '..', + 'images','gray25.xbm'].join(File::Separator), + 'tags'=>$tag_item) +TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice', + 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90, + 'tags'=>$tag_item) +TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord', + 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270, + 'tags'=>$tag_item) + +TkcText.new(cvs, '15c', '16.2c', 'text'=>'Bitmaps', 'anchor'=>'n') +#TkcBitmap.new(cvs, '13c','20c', +# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator), +# 'tags'=>$tag_item) +TkcBitmap.new(cvs, '13c','20c', + 'bitmap'=>'@' + [$demo_dir, '..', + 'images', 'face.xbm'].join(File::Separator), + 'tags'=>$tag_item) +#TkcBitmap.new(cvs, '17c','18.5c', +# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator), +# 'tags'=>$tag_item) +TkcBitmap.new(cvs, '17c','18.5c', + 'bitmap'=>'@' + [$demo_dir, '..', + 'images', 'noletter.xbm'].join(File::Separator), + 'tags'=>$tag_item) +#TkcBitmap.new(cvs, '17c','21.5c', +# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator), +# 'tags'=>$tag_item) +# +TkcBitmap.new(cvs, '17c','21.5c') { + bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator) + tags $tag_item +} +#TkcBitmap.new(cvs, '17c','21.5c') { +# bitmap '@' + ['images', 'letters'].join(File::Separator) +# tags $tag_item +#} + +TkcText.new(cvs, '25c', '16.2c', 'text'=>'Windows', 'anchor'=>'n') +TkButton.new(cvs) {|b| + text 'Press Me' + command proc{butPress cvs, red} + TkcWindow.new(cvs, '21c','18c', + 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item) +} +TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e| + insert 'end', 'Edit this text' + TkcWindow.new(cvs, '21c','21c', + 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item) +} +TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c', + 'width'=>'.5c', 'tickinterval'=>0 ) {|scl| + TkcWindow.new(cvs, '28.5c','17.5c', + 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item) +} +TkcText.new(cvs, '21c', '17.9c', 'text'=>'Button:', 'anchor'=>'sw') +TkcText.new(cvs, '21c', '20.9c', 'text'=>'Entry:', 'anchor'=>'sw') +TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'Scale:', 'anchor'=>'s') + +# Set up event bindings for canvas: +cvs.itembind($tag_item, 'Any-Enter', proc{itemEnter cvs}) +cvs.itembind($tag_item, 'Any-Leave', proc{itemLeave cvs}) +cvs.bind('2', proc{|x,y| cvs.scan_mark x,y}, '%x %y') +cvs.bind('B2-Motion', proc{|x,y| cvs.scan_dragto x,y}, '%x %y') +cvs.bind('3', proc{|x,y| itemMark cvs,x,y}, '%x %y') +cvs.bind('B3-Motion', proc{|x,y| itemStroke cvs,x,y}, '%x %y') +cvs.bind('Control-f', proc{itemsUnderArea cvs}) +cvs.bind('1', proc{|x,y| itemStartDrag cvs,x,y}, '%x %y') +cvs.bind('B1-Motion', proc{|x,y| itemDrag cvs,x,y}, '%x %y') +# Utility methods for highlighting the item under the pointer + +$restoreCmd = nil +def itemEnter (c) + if TkWinfo.depth(c).to_i == 1 + $restoreCmd = nil + return + end + type = c.itemtype('current') + if type == TkcWindow + $restoreCmd = nil + return + end + if type == TkcBitmap + bg = (c.itemconfiginfo('current', 'background'))[4] + $restoreCmd = proc{c.itemconfigure 'current', 'background', bg} + c.itemconfigure 'current', 'background', 'SteelBlue2' + return + end + fill = (c.itemconfiginfo('current', 'fill'))[4] + if (type == TkcRectangle || type == TkcOval || type == TkcArc) && fill == [] + outline = (c.itemconfiginfo('current', 'outline'))[4] + $restoreCmd = proc{c.itemconfigure 'current', 'outline', outline} + c.itemconfigure 'current', 'outline', 'SteelBlue2' + else + $restoreCmd = proc{c.itemconfigure 'current', 'fill', fill} + c.itemconfigure 'current', 'fill', 'SteelBlue2' + end +end + +def itemLeave(c) + $restoreCmd.call if $restoreCmd +end + +# Utility methods for stroking out a rectangle and printing what's +# underneath the rectangle's area. + +def itemMark(c,x,y) + $areaX1 = c.canvasx(x) + $areaY1 = c.canvasy(y) + c.delete 'area' +end + +def itemStroke(c,x,y) + x = c.canvasx(x) + y = c.canvasy(y) + if $areaX1 != x && $areaY1 != y + c.delete 'area' + c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y, + '-outline', 'black') + $areaX2 = x + $areaY2 = y + end +end + +def itemsUnderArea(c) + area = c.find_withtag('area') + items = [] + c.find_enclosed($areaX1,$areaY1,$areaX2,$areaY2).each{|i| + items.push(i) if i.gettags.include?($tag_item) + } + print "Items enclosed by area: #{items.inspect}\n"; STDOUT.flush + items.clear + c.find_overlapping($areaX1,$areaY1,$areaX2,$areaY2).each{|i| + items.push(i) if i.gettags.include?($tag_item) + } + print "Items overlapping area: #{items.inspect}\n"; STDOUT.flush +end + +$areaX1 = 0 +$areaY1 = 0 +$areaX2 = 0 +$areaY2 = 0 + +# Utility methods to support dragging of items. + +def itemStartDrag(c,x,y) + $lastX = c.canvasx(x) + $lastY = c.canvasy(y) +end + +def itemDrag(c,x,y) + x = c.canvasx(x) + y = c.canvasy(y) + c.move 'current', x - $lastX, y - $lastY + $lastX = x + $lastY = y +end + +# Method that's invoked when the button embedded in the canvas +# is invoked. + +def butPress(w,color) + i = TkcText.new(w, '25c', '18.1c', + 'text'=>'Ouch!!', 'fill'=>color, 'anchor'=>'n') + Tk.after(500, proc{w.delete i}) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset new file mode 100644 index 0000000..979894f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset @@ -0,0 +1,333 @@ +#!/usr/bin/env ruby + +# ixset -- +# A nice interface to "xset" to change X server settings +# + +require 'tk' + +class Xsettings + # + # Button actions + # + def quit + @root.destroy + end + + def ok + writesettings + quit + end + + def cancel + readsettings + dispsettings + end + + # apply is just "writesettings" + + + # + # Read current settings + # + def readsettings + xfd = open("|xset q", 'r') + xfd.readlines.each{|line| + fields = line.chomp.strip.split(/\s+/) + case fields[0] + when "auto" + if fields[1] == 'repeat:' + @kbdrep = fields[2] + @w_kbdrep.set(@kbdrep) + @kbdcli = fields[6] + end + + when "bell" + @bellvol = fields[2] + @bellpit = fields[5] + @belldur = fields[8] + + when "acceleration:" + @mouseacc = fields[1] + @mousethr = fields[3] + + when "prefer" + if fields[2] == 'yes' + @screenbla = 'blank' + else + @screenbla = 'noblank' + end + @w_screenbla.set(@screenbla) + + when "timeout:" + @screentim = fields[1] + @screencyc = fields[3] + + end + } + + xfd.close + end + + # + # Write settings into the X server + # + def writesettings + @bellvol = @w_bellvol.get + @bellpit = @w_bellpit.get + @belldur = @w_belldur.get + + @kbdrep = @w_kbdrep.get + if @kbdrep == 'on' + @kbdcli = @w_kbdcli.get + else + @kbdcli = 'off' + end + + @mouseacc = @w_mouseacc.get + @mousethr = @w_mousethr.get + + @screentim = @w_screentim.get + @screencyc = @w_screencyc.get + @screenbla = @w_screenbla.get + + system("xset \ + b #{@bellvol} #{@bellpit} #{@belldur} \ + c #{@kbdcli} \ + r #{@kbdrep} \ + m #{@mouseacc} #{@mousethr} \ + s #{@screentim} #{@screencyc} \ + s #{@screenbla}") + end + + # + # Sends all settings to the window + # + def dispsettings + @w_bellvol.set(@bellvol) + @w_bellpit.set(@bellpit) + @w_belldur.set(@belldur) + + @w_kbdonoff.set(@w_kbdrep.get) + @w_kbdcli.set(@kbdcli) + + @w_mouseacc.set(@mouseacc) + @w_mousethr.set(@mousethr) + + @w_screenblank.set(@w_screenbla.get) + @w_screenpat.set(@w_screenbla.get) + + @w_screentim.set(@screentim) + @w_screencyc.set(@screencyc) + end + + # + # Create all windows, and pack them + # + class LabelEntry + def initialize(parent, text, length) + @frame = TkFrame.new(parent) + TkLabel.new(@frame, 'text'=>text).pack('side'=>'left','expand'=>'y') + @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') { + pack('side'=>'left','expand'=>'y') + } + end + def pack(keys) + @frame.pack(keys) + end + def get + @entry.value + end + def set(value) + @entry.delete(0,'end') + @entry.insert(0, value) + end + end + + def createwindows + win = self + + # + # Buttons + # + buttons = TkFrame.new(@root) {|f| + [ TkButton.new(f, 'command'=>proc{win.ok}, 'text'=>'Ok'), + TkButton.new(f, 'command'=>proc{win.writesettings}, 'text'=>'Apply'), + TkButton.new(f, 'command'=>proc{win.cancel}, 'text'=>'Cancel'), + TkButton.new(f, 'command'=>proc{win.quit}, 'text'=>'Quit') ].each{|b| + b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) + } + } + + # + # Bell settings + # + bell = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(bell, 'text'=>'Bell Settings') + @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>"Volume (%)") + + f = TkFrame.new(bell) + @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6) + @w_bellpit.pack('side'=>'left', 'padx'=>5) + @w_belldur = LabelEntry.new(f, "Duration (ms)", 6) + @w_belldur.pack('side'=>'right', 'padx'=>5) + + l.pack('side'=>'top', 'expand'=>'yes') + @w_bellvol.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Keyboard settings + # + kbdonoff = nil + kbdcli = nil + kbd = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(kbd, 'text'=>'Keyboard Repeat Settings') + f = TkFrame.new(kbd) + @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat', + 'onvalue'=>'on', 'offvalue'=>'off', + 'variable'=>@w_kbdrep ) { + def self.set(value) + if value == 'on' + self.select + else + self.deselect + end + end + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both') + } + @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>'Click Volume (%)') + @w_kbdcli.pack('side'=>'left', 'expand'=>'yes') + l.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x') + + # + # Mouse settings + # + mouse = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(mouse, 'text'=>'Mouse Settings') + f = TkFrame.new(mouse) + @w_mouseacc = LabelEntry.new(f, 'Acceleration', 3) + @w_mouseacc.pack('side'=>'left') + @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3) + @w_mousethr.pack('side'=>'right') + l.pack('side'=>'top') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Screen Saver settings + # + screen = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(screen, 'text'=>'Screen-saver Settings') + f = TkFrame.new(screen) + ff1 = TkFrame.new(f) + [ @w_screenblank = TkRadioButton.new(ff1, 'text'=>'Blank', + 'relief'=>'flat', + 'variable'=>@w_screenbla, + 'value'=>'blank') { + def self.set(value) + if value == 'blank' + self.select + else + self.deselect + end + end + }, + @w_screenpat = TkRadioButton.new(ff1, 'text'=>'Pattern', + 'relief'=>'flat', + 'variable'=>@w_screenbla, + 'value'=>'noblank') { + def self.set(value) + if value != 'blank' + self.select + else + self.deselect + end + end + } + ].each {|w| w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') } + + ff2 = TkFrame.new(f) + [ @w_screentim = LabelEntry.new(ff2, 'Timeout (s)', 5), + @w_screencyc = LabelEntry.new(ff2, 'Cycle (s)', 5) ].each{|w| + w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'e') + } + + ff1.pack('side'=>'left') + ff2.pack('side'=>'left') + + l.pack('side'=>'top') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Main window + # + buttons.pack('side'=>'top', 'fill'=>'both') + bell.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + kbd.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + mouse.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + screen.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + + # + # Let the user resize our window + # + @root.minsize(10,10) + end + + def initialize + @root = TkRoot.new + + @kbdrep = 'on' + @w_kbdrep = TkVariable.new(@kbdrep) + def @w_kbdrep.get + self.value + end + def @w_kbdrep.set(val) + self.value=val + end + + @kbdcli = 0 + + @bellvol = 100 + @bellpit = 440 + @belldur = 100 + + @mouseacc = "3/1" + @mousethr = 4 + + @screenbla = "blank" + @w_screenbla = TkVariable.new(@screenbla) + def @w_screenbla.get + self.value + end + def @w_screenbla.set(val) + self.value=val + end + + @screentim = 600 + @screencyc = 600 + + # + # Listen what "xset" tells us... + # + readsettings + + # + # Create all windows + # + createwindows + + # + # Write xset parameters + # + dispsettings + end +end + +Xsettings.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset2 new file mode 100644 index 0000000..ce8472a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ixset2 @@ -0,0 +1,367 @@ +#!/usr/bin/env ruby +# +# ixset -- +# A nice interface to "xset" to change X server settings +# + +require 'tk' + +class Xsettings + # + # Button actions + # + def quit + @root.destroy + end + + def ok + writesettings + quit + end + + def cancel + readsettings + dispsettings + @btn_APPLY.state(:disabled) + @btn_CANCEL.state(:disabled) + end + + # apply is just "writesettings" + def apply + writesettings + @btn_APPLY.state(:disabled) + @btn_CANCEL.state(:disabled) + end + + # + # Read current settings + # + def readsettings + xfd = open("|xset q", 'r') + xfd.readlines.each{|line| + fields = line.chomp.strip.split(/\s+/) + case fields[0] + when "auto" + if fields[1] == 'repeat:' + @kbdrep = fields[2] + @w_kbdrep.set(@kbdrep) + @kbdcli = fields[6] + end + + when "bell" + @bellvol = fields[2] + @bellpit = fields[5] + @belldur = fields[8] + + when "acceleration:" + @mouseacc = fields[1] + @mousethr = fields[3] + + when "prefer" + if fields[2] == 'yes' + @screenbla = 'blank' + else + @screenbla = 'noblank' + end + @w_screenbla.set(@screenbla) + + when "timeout:" + @screentim = fields[1] + @screencyc = fields[3] + + end + } + + xfd.close + end + + # + # Write settings into the X server + # + def writesettings + @bellvol = @w_bellvol.get + @bellpit = @w_bellpit.get + @belldur = @w_belldur.get + + @kbdrep = @w_kbdrep.get + if @kbdrep == 'on' + @kbdcli = @w_kbdcli.get + else + @kbdcli = 'off' + end + + @mouseacc = @w_mouseacc.get + @mousethr = @w_mousethr.get + + @screentim = @w_screentim.get + @screencyc = @w_screencyc.get + @screenbla = @w_screenbla.get + + system("xset \ + b #{@bellvol} #{@bellpit} #{@belldur} \ + c #{@kbdcli} \ + r #{@kbdrep} \ + m #{@mouseacc} #{@mousethr} \ + s #{@screentim} #{@screencyc} \ + s #{@screenbla}") + end + + # + # Sends all settings to the window + # + def dispsettings + @w_bellvol.set(@bellvol) + @w_bellpit.set(@bellpit) + @w_belldur.set(@belldur) + + @w_kbdonoff.set(@w_kbdrep.get) + @w_kbdcli.set(@kbdcli) + + @w_mouseacc.set(@mouseacc) + @w_mousethr.set(@mousethr) + + @w_screenblank.set(@w_screenbla.get) + @w_screenpat.set(@w_screenbla.get) + + @w_screentim.set(@screentim) + @w_screencyc.set(@screencyc) + end + + # + # Create all windows, and pack them + # + class LabelEntry + def initialize(parent, text, length, range=[]) + @frame = TkFrame.new(parent) + TkLabel.new(@frame, 'text'=>text).pack('side'=>'left') + if range.size > 0 + @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken', + 'from'=>range[0], 'to'=>range[1]) + else + @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') + end + @entry.pack('side'=>'right','expand'=>'y', 'fill'=>'x') + end + def epath + @frame + end + def pack(keys) + @frame.pack(keys) + end + def get + @entry.value + end + def set(value) + @entry.delete(0,'end') + @entry.insert(0, value) + end + end + + def createwindows + win = self + + # + # Buttons + # + btn_frame = TkFrame.new(@root) + buttons = [ + @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok}, + 'default'=>'active', 'text'=>'Ok'), + @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings}, + 'default'=>'normal', 'text'=>'Apply', + 'state'=>'disabled'), + @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel}, + 'default'=>'normal', 'text'=>'Cancel', + 'state'=>'disabled'), + @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit}, + 'default'=>'normal', 'text'=>'Quit') + ] + buttons.each{|b| b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) } + + @root.bind('Return', proc{@btn_OK.flash; @btn_OK.invoke}) + @root.bind('Escape', proc{@btn_QUIT.flash; @btn_QUIT.invoke}) + @root.bind('1', proc{|w| + unless buttons.index(w) + @btn_APPLY.state(:normal) + @btn_CANCEL.state(:normal) + end + }, '%W') + @root.bind('Key', proc{|w, k| + unless buttons.index(w) + case k + when 'Return', 'Escape', 'Tab', /.*Shift.*/ + # do nothing + else + @btn_APPLY.state(:normal) + @btn_CANCEL.state(:normal) + end + end + }, '%W %K') + + # + # Bell settings + # + bell = TkLabelframe.new(@root, 'text'=>'Bell Settings', + 'padx'=>'1.5m', 'pady'=>'1.5m') + @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>"Volume (%)") + + f = TkFrame.new(bell) + @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6, [25, 20000]) + @w_bellpit.pack('side'=>'left', 'padx'=>5) + @w_belldur = LabelEntry.new(f, "Duration (ms)", 6, [1, 10000]) + @w_belldur.pack('side'=>'right', 'padx'=>5) + + @w_bellvol.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Keyboard settings + # + kbdonoff = nil + kbdcli = nil + kbd = TkLabelframe.new(@root, 'text'=>'Keyboard Repeat Settings', + 'padx'=>'1.5m', 'pady'=>'1.5m') + f = TkFrame.new(kbd) + @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat', + 'onvalue'=>'on', 'offvalue'=>'off', + 'variable'=>@w_kbdrep ) { + def self.set(value) + if value == 'on' + self.select + else + self.deselect + end + end + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>[0, '1m']) + } + @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>'Click Volume (%)') + @w_kbdcli.pack('side'=>'left', 'expand'=>'yes', + 'fill'=>'x', 'padx'=>['1m', 0]) + f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x') + + # + # Mouse settings + # + mouse = TkLabelframe.new(@root, 'text'=>'Mouse Settings', + 'padx'=>'1.5m', 'pady'=>'1.5m') + f = TkFrame.new(mouse) + @w_mouseacc = LabelEntry.new(f, 'Acceleration', 5) + @w_mouseacc.pack('side'=>'left', 'padx'=>[0, '1m']) + @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3, [1, 2000]) + @w_mousethr.pack('side'=>'right', 'padx'=>['1m', 0]) + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Screen Saver settings + # + screen = TkLabelframe.new(@root, 'text'=>'Screen-saver Settings', + 'padx'=>'1.5m', 'pady'=>'1.5m') + @w_screenblank = TkRadioButton.new(screen, 'text'=>'Blank', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, + 'value'=>'blank') { + def self.set(value) + if value == 'blank' + self.select + else + self.deselect + end + end + } + + @w_screenpat = TkRadioButton.new(screen, 'text'=>'Pattern', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, + 'value'=>'noblank') { + def self.set(value) + if value != 'blank' + self.select + else + self.deselect + end + end + } + + @w_screentim = LabelEntry.new(screen, 'Timeout (s)', 5, [1, 100000]) + @w_screencyc = LabelEntry.new(screen, 'Cycle (s)', 5, [1, 100000]) + + Tk.grid(@w_screenblank, @w_screentim, 'sticky'=>'e') + Tk.grid(@w_screenpat, @w_screencyc, 'sticky'=>'e') + TkGrid.configure(@w_screenblank, @w_screenpat, 'sticky'=>'ew') + + # + # Main window + # + param = { + 'side'=>'top', 'fill'=>'both', 'expand'=>'yes', + 'padx'=>'1m', 'pady'=>'1m' + } + btn_frame.pack('side'=>'top', 'fill'=>'both') + bell.pack(param) + kbd.pack(param) + mouse.pack(param) + screen.pack(param) + + # + # Let the user resize our window + # + @root.minsize(10,10) + end + + def initialize(title) + @root = TkRoot.new('title'=>title) + + @kbdrep = 'on' + @w_kbdrep = TkVariable.new(@kbdrep) + def @w_kbdrep.get + self.value + end + def @w_kbdrep.set(val) + self.value=val + end + + @kbdcli = 0 + + @bellvol = 100 + @bellpit = 440 + @belldur = 100 + + @mouseacc = "3/1" + @mousethr = 4 + + @screenbla = "blank" + @w_screenbla = TkVariable.new(@screenbla) + def @w_screenbla.get + self.value + end + def @w_screenbla.set(val) + self.value=val + end + + @screentim = 600 + @screencyc = 600 + + # + # Listen what "xset" tells us... + # + readsettings + + # + # Create all windows + # + createwindows + + # + # Write xset parameters + # + dispsettings + end +end + +Xsettings.new(File.basename($0,'.rb')) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/knightstour.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/knightstour.rb new file mode 100644 index 0000000..618fce5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/knightstour.rb @@ -0,0 +1,271 @@ +# Based on the widget demo of Tcl/Tk8.5.2 +# The following is the original copyright text. +#---------------------------------------------------------------------------- +# Copyright (C) 2008 Pat Thoyts +# +# Calculate a Knight's tour of a chessboard. +# +# This uses Warnsdorff's rule to calculate the next square each +# time. This specifies that the next square should be the one that +# has the least number of available moves. +# +# Using this rule it is possible to get to a position where +# there are no squares available to move into. In this implementation +# this occurs when the starting square is d6. +# +# To solve this fault an enhancement to the rule is that if we +# have a choice of squares with an equal score, we should choose +# the one nearest the edge of the board. +# +# If the call to the Edgemost function is commented out you can see +# this occur. +# +# You can drag the knight to a specific square to start if you wish. +# If you let it repeat then it will choose random start positions +# for each new tour. +#---------------------------------------------------------------------------- +require 'tk' + +class Knights_Tour + # Return a list of accessible squares from a given square + def valid_moves(square) + moves = [] + [ + [-1,-2], [-2,-1], [-2,1], [-1,2], [1,2], [2,1], [2,-1], [1,-2] + ].each{|col_delta, row_delta| + col = (square % 8) + col_delta + row = (square.div(8)) + row_delta + moves << (row * 8 + col) if row > -1 && row < 8 && col > -1 && col < 8 + } + moves + end + + # Return the number of available moves for this square + def check_square(square) + valid_moves(square).find_all{|pos| ! @visited.include?(pos)}.length + end + + # Select the next square to move to. Returns -1 if there are no available + # squares remaining that we can move to. + def next_square(square) + minimum = 9 + nxt = -1 + valid_moves(square).each{|pos| + unless @visited.include?(pos) + cnt = check_square(pos) + if cnt < minimum + minimum = cnt + nxt = pos + elsif cnt == minimum + nxt = edgemost(nxt, pos) + end + end + } + nxt + end + + # Select the square nearest the edge of the board + def edgemost(nxt, pos) + col_A = 3 - ((3.5 - nxt % 8).abs.to_i) + col_B = 3 - ((3.5 - pos % 8).abs.to_i) + row_A = 3 - ((3.5 - nxt.div(8)).abs.to_i) + row_B = 3 - ((3.5 - pos.div(8)).abs.to_i) + (col_A * row_A < col_B * row_B)? nxt : pos + end + + # Display a square number as a standard chess square notation. + def _N(square) + '%c%d' % [(97 + square % 8), (square.div(8) + 1)] + end + + # Perform a Knight's move and schedule the next move. + def move_piece(last, square) + @log.insert(:end, "#{@visited.length}. #{_N last} -> #{_N square}\n", '') + @log.see(:end) + @board.itemconfigure(1+last, :state=>:normal, :outline=>'black') + @board.itemconfigure(1+square, :state=>:normal, :outline=>'red') + @knight.coords(@board.coords(1+square)[0..1]) + @visited << square + if (nxt = next_square(square)) != -1 + @after_id = Tk.after(@delay.numeric){move_piece(square, nxt) rescue nil} + else + @start_btn.state :normal + if @visited.length == 64 + if @initial == square + @log.insert :end, 'Closed tour!' + else + @log.insert :end, "Success\n", {} + Tk.after(@delay.numeric * 2){tour(rand(64))} if @continuous.bool + end + else + @log.insert :end, "FAILED!\n", {} + end + end + end + + # Begin a new tour of the board given a random start position + def tour(square = nil) + @visited.clear + @log.clear + @start_btn.state :disabled + 1.upto(64){|n| + @board.itemconfigure(n, :state=>:disabled, :outline=>'black') + } + unless square + square = @board.find_closest(*(@knight.coords << 0 << 65))[0].to_i - 1 + end + @initial = square + Tk.after_idle{ move_piece(@initial, @initial) rescue nil } + end + + def _stop + Tk.after_cancel(@after_id) rescue nil + end + + def _exit + _stop + $knightstour.destroy + end + + def set_delay(new) + @delay.numeric = new.to_i + end + + def drag_start(w, x, y) + w.dtag('selected') + w.addtag('selected', :withtag, 'current') + @dragging = [x, y] + end + + def drag_motion(w, x, y) + return unless @dragging + w.move('selected', x - @dragging[0], y - @dragging[1]) + @dragging = [x, y] + end + + def drag_end(w, x, y) + square = w.find_closest(x, y, 0, 65) + w.coords('selected', w.coords(square)[0..1]) + w.dtag('selected') + @dragging = nil + end + + def make_SeeDismiss + ## See Code / Dismiss + frame = Ttk::Frame.new($knightstour) + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'knightstour'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $knightstour.destroy + $knightstour = nil + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) + frame + end + + def create_gui(parent = nil) + $knightstour.destroy rescue nil + $knightstour = Tk::Toplevel.new(parent, :title=>"Knight's tour") + $knightstour.withdraw + base_f = Ttk::Frame.new($knightstour) + @board = Tk::Canvas.new(base_f, :width=>240, :height=>240) + @log = Tk::Text.new(base_f, :width=>12, :height=>1, + :font=>'Arial 8', :background=>'white') + scr = @log.yscrollbar(Ttk::Scrollbar.new(base_f)) + + @visited = [] + @delay = TkVariable.new(600) + @continuous = TkVariable.new(false) + + tool_f = Ttk::Frame.new($knightstour) + label = Ttk::Label.new(tool_f, :text=>'Speed') + scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay, + :command=>proc{|n| set_delay(n)}) + check = Ttk::Checkbutton.new(tool_f, :text=>'Repeat', + :variable=>@continuous) + @start_btn = Ttk::Button.new(tool_f, :text=>'Start', + :command=>proc{tour()}) + @exit_btn = Ttk::Button.new(tool_f, :text=>'Exit', + :command=>proc{_exit()}) + + 7.downto(0){|row| + 0.upto(7){|col| + if ((col & 1) ^ (row & 1)).zero? + fill = 'bisque' + dfill = 'bisque3' + else + fill = 'tan3' + dfill = 'tan4' + end + coords = [col * 30 + 4, row * 30 + 4, col * 30 + 30, row * 30 + 30] + @board.create(TkcRectangle, coords, + :fill=>fill, :disabledfill=>dfill, + :width=>2, :state=>:disabled) + } + } + + @knight_font = TkFont.new(:size=>-24) + @knight = TkcText.new(@board, 0, 0, :font=>@knight_font, + :text=>Tk::UTF8_String.new('\u265e'), + :anchor=>'nw', # :tags=>'knight', + :fill=>'black', :activefill=>'#600000') + @knight.coords(@board.coords(rand(64)+1)[0..1]) + @knight.bind('ButtonPress-1', '%W %x %y'){|w,x,y| drag_start(w,x,y)} + @knight.bind('Motion', '%W %x %y'){|w,x,y| drag_motion(w,x,y)} + @knight.bind('ButtonRelease-1', '%W %x %y'){|w,x,y| drag_end(w,x,y)} + + Tk.grid(@board, @log, scr, :sticky=>'news') + base_f.grid_rowconfigure(0, :weight=>1) + base_f.grid_columnconfigure(0, :weight=>1) + + Tk.grid(base_f, '-', '-', '-', '-', '-', :sticky=>'news') + widgets = [label, scale, check, @start_btn] + sg = nil + unless $RubyTk_WidgetDemo + widgets << @exit_btn + if Tk.windowingsystem != 'aqua' + #widgets.unshift(Ttk::SizeGrip.new(tool_f)) + Ttk::SizeGrip.new(tool_f).pack(:side=>:right, :anchor=>'se') + end + end + Tk.pack(widgets, :side=>:right) + if Tk.windowingsystem == 'aqua' + TkPack.configure(widgets, :padx=>[4, 4], :pady=>[12, 12]) + TkPack.configure(widgets[0], :padx=>[4, 24]) + TkPack.configure(widgets[-1], :padx=>[16, 4]) + end + + Tk.grid(tool_f, '-', '-', '-', '-', '-', :sticky=>'ew') + + if $RubyTk_WidgetDemo + Tk.grid(make_SeeDismiss(), '-', '-', '-', '-', '-', :sticky=>'ew') + end + + $knightstour.grid_rowconfigure(0, :weight=>1) + $knightstour.grid_columnconfigure(0, :weight=>1) + + $knightstour.bind('Control-F2'){TkConsole.show} + $knightstour.bind('Return'){@start_btn.invoke} + $knightstour.bind('Escape'){@exit_btn.invoke} + $knightstour.bind('Destroy'){ _stop } + $knightstour.protocol('WM_DELETE_WINDOW'){ _exit } + + $knightstour.deiconify + $knightstour.tkwait_destroy + end + + def initialize(parent = nil) + create_gui(parent) + end +end + +Tk.root.withdraw unless $RubyTk_WidgetDemo +Thread.new{Tk.mainloop} if __FILE__ == $0 +Knights_Tour.new diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/label.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/label.rb new file mode 100644 index 0000000..91e41e4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/label.rb @@ -0,0 +1,72 @@ +# label.rb +# +# This demonstration script creates a toplevel window containing +# several label widgets. +# +# label widget demo (called by 'widget') +# + +# toplevel widget +if defined?($label_demo) && $label_demo + $label_demo.destroy + $label_demo = nil +end + +# demo toplevel widget +$label_demo = TkToplevel.new {|w| + title("Label Demonstration") + iconname("label") + positionWindow(w) +} + +base_frame = TkFrame.new($label_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "Five labels are displayed below: three textual ones on the left, and a bitmap label and a text label on the right. Labels are pretty boring because you can't do anything with them." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $label_demo + $label_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'label'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# label demo +f_left = TkFrame.new(base_frame) +f_right = TkFrame.new(base_frame) +[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes', + 'padx'=>10, 'pady'=>10, 'fill'=>'both')} + +# label +[ TkLabel.new(f_left, 'text'=>'First label'), + TkLabel.new(f_left, 'text'=>'Second label, raised', + 'relief'=>'raised'), + TkLabel.new(f_left, 'text'=>'Third label, sunken', 'relief'=>'sunken') +].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')} + +# TkLabel.new(f_right) { +Tk::Label.new(f_right) { + bitmap('@' + [$demo_dir,'..','images','face.xbm'].join(File::Separator)) + borderwidth 2 + relief 'sunken' +}.pack('side'=>'top') + +TkLabel.new(f_right) { text 'Tcl/Tk Proprietor' }.pack('side'=>'top') + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/labelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/labelframe.rb new file mode 100644 index 0000000..c912ff4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/labelframe.rb @@ -0,0 +1,95 @@ +# labelframe.rb +# +# This demonstration script creates a toplevel window containing +# several labelframe widgets. +# +# based on "Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp" + + +if defined?($labelframe_demo) && $labelframe_demo + $labelframe_demo.destroy + $labelframe_demo = nil +end + +$labelframe_demo = TkToplevel.new {|w| + title("Labelframe Demonstration") + iconname("labelframe") + positionWindow(w) +} + +base_frame = TkFrame.new($labelframe_demo).pack(:fill=>:both, :expand=>true) + +# Some information +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +Labelframes are used to group related widgets together. \ +The label may be either plain text or another widget. \ +If your Tk library linked to Ruby doesn't include a 'labelframe' widget, \ +this demo doesn't work. Please use later version of Tk \ +which supports a 'labelframe' widget. +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $labelframe_demo.destroy + $labelframe_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'labelframe' + }).pack(:side=>:left, :expand=>true) +} + +# Demo area +w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both, + :expand=>true) + +# A group of radiobuttons in a labelframe +TkLabelFrame.new(w, :text=>'Value', + :padx=>2, :pady=>2) {|f| + grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m') + + v = TkVariable.new + (1..4).each{|i| + TkRadiobutton.new(f, :text=>"This is value #{i}", + :variable=>v, :value=>i) { + pack(:side=>:top, :fill=>:x, :pady=>2) + } + } +} + + +# Using a label window to control a group of options. +$lfdummy = TkVariable.new(0) + +def lfEnableButtons(w) + TkWinfo.children(w).each{|child| + next if child.path =~ /\.cb$/ + if $lfdummy == 1 + child.state(:normal) + else + child.state(:disabled) + end + } +end + +TkLabelFrame.new(w, :pady=>2, :padx=>2){|f| + TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy, + :text=>"Use this option.", :padx=>0) {|cb| + command proc{lfEnableButtons(f)} + f.labelwidget(cb) + } + grid(:row=>0, :column=>1, :pady=>'2m', :padx=>'2m') + + %w(Option1 Option2 Option3).each{|str| + TkCheckbutton.new(f, :text=>str).pack(:side=>:top, :fill=>:x, :pady=>2) + } + + lfEnableButtons(f) +} + +TkGrid.columnconfigure(w, [0,1], :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/mclist.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/mclist.rb new file mode 100644 index 0000000..a849eba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/mclist.rb @@ -0,0 +1,117 @@ +# mclist.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# tree widget configured as a multi-column listbox. +# +# based on "Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($mclist_demo) && $mclist_demo + $mclist_demo.destroy + $mclist_demo = nil +end + +$mclist_demo = TkToplevel.new {|w| + title("Multi-Column List") + iconname("mclist") + positionWindow(w) +} + +base_frame = TkFrame.new($mclist_demo).pack(:fill=>:both, :expand=>true) + +## Explanatory text +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', + :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6], + :text=><:x) +Ttk is the new Tk themed widget set. \ +One of the widgets it includes is a tree widget, \ +which can be configured to display multiple columns of informational data \ +without displaying the tree itself. \ +This is a simple way to build a listbox that has multiple columns. \ +Clicking on the heading for a column will sort the data by that column. \ +You can also change the width of the columns \ +by dragging the boundary between them. +EOL + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'mclist'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $mclist_demo.destroy + $mclist_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +container = Ttk::Frame.new(base_frame) +tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency), + :show=>:headings) +if Tk.windowingsystem != 'aqua' + vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame)) +else + vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame)) +end + +container.pack(:fill=>:both, :expand=>true) +Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew') +Tk.grid(hsb, :in=>container, :sticky=>'nsew') +container.grid_columnconfigure(0, :weight=>1) +container.grid_rowconfigure(0, :weight=>1) + +## The data we're going to insert +data = [ + ['Argentina', 'Buenos Aires', 'ARS'], + ['Australia', 'Canberra', 'AUD'], + ['Brazil', 'Brazilia', 'BRL'], + ['Canada', 'Ottawa', 'CAD'], + ['China', 'Beijing', 'CNY'], + ['France', 'Paris', 'EUR'], + ['Germany', 'Berlin', 'EUR'], + ['India', 'New Delhi', 'INR'], + ['Italy', 'Rome', 'EUR'], + ['Japan', 'Tokyo', 'JPY'], + ['Mexico', 'Mexico City', 'MXN'], + ['Russia', 'Moscow', 'RUB'], + ['South Africa', 'Pretoria', 'ZAR'], + ['United Kingdom', 'London', 'GBP'], + ['United States', 'Washington, D.C.', 'USD'], +] + +## Code to insert the data nicely +font = Ttk::Style.lookup(tree[:style], :font) +cols = %w(country capital currency) +cols.zip(%w(Country Capital Currency)).each{|col, name| + tree.heading_configure(col, :text=>name, + :command=>proc{sort_by(tree, col, false)}) + tree.column_configure(col, :width=>TkFont.measure(font, name)) +} + +data.each{|country, capital, currency| + #tree.insert('', :end, :values=>[country, capital, currency]) + tree.insert(nil, :end, :values=>[country, capital, currency]) + cols.zip([country, capital, currency]).each{|col, val| + len = TkFont.measure(font, "#{val} ") + if tree.column_cget(col, :width) < len + tree.column_configure(col, :width=>len) + end + } +} + +## Code to do the sorting of the tree contents when clicked on +def sort_by(tree, col, direction) + tree.children(nil).map!{|row| [tree.get(row, col), row.id]} . + sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) . + each_with_index{|info, idx| tree.move(info[1], nil, idx)} + + tree.heading_configure(col, :command=>proc{sort_by(tree, col, ! direction)}) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu.rb new file mode 100644 index 0000000..bf6c22c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu.rb @@ -0,0 +1,196 @@ +# +# menus widget demo (called by 'widget') +# + +# toplevel widget +if defined?($menu_demo) && $menu_demo + $menu_demo.destroy + $menu_demo = nil +end + +# demo toplevel widget +$menu_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("menu") + positionWindow(w) +} + +base_frame = TkFrame.new($menu_demo).pack(:fill=>:both, :expand=>true) + +# menu frame +$menu_frame = TkFrame.new(base_frame, 'relief'=>'raised', 'bd'=>2) +$menu_frame.pack('side'=>'top', 'fill'=>'x') + +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + text("This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.") + else + text("This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.") + end +}.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $menu_demo + $menu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'menu'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# menu +TkMenubutton.new($menu_frame, 'text'=>'File', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|file_menu| + m.configure('menu'=>file_menu) + add('command', 'label'=>'Open...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Open..." entry'}) + add('command', 'label'=>'New', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "New" entry'}) + add('command', 'label'=>'Save', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save" entry'}) + add('command', 'label'=>'Save As...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save As..." entry'}) + add('separator') + add('command', 'label'=>'Print Setup...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print Setup..." entry'}) + add('command', 'label'=>'Print...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print..." entry'}) + add('separator') + add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu_demo.destroy}) + } +} + +if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + modifier = 'Command' +elsif $tk_platform['platform'] == 'windows' + modifier = 'Control' +else + modifier = 'Meta' +end + +TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|basic_menu| + m.configure('menu'=>basic_menu) + add('command', 'label'=>'Long entry that does nothing') + ['A','B','C','D','E','F','G'].each{|c| + add('command', 'label'=>"Print letter \"#{c}\"", + 'underline'=>14, 'accelerator'=>"Meta+#{c}", + 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") + $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|cascade_menu| + m.configure('menu'=>cascade_menu) + add('command', 'label'=>'Print hello', + 'command'=>proc{print "Hello\n"}, + 'accelerator'=>"#{modifier}+H", 'underline'=>6) + $menu_demo.bind("#{modifier}-h", proc{print "Hello\n"}) + add('command', 'label'=>'Print goodbye', + 'command'=>proc{print "Goodbye\n"}, + 'accelerator'=>"#{modifier}+G", 'underline'=>6) + $menu_demo.bind("#{modifier}-g", proc{print "Goodbye\n"}) + + TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_check| + cascade_menu.add('cascade', 'label'=>'Check buttons', + 'menu'=>cascade_check, 'underline'=>0) + oil = TkVariable.new(0) + add('check', 'label'=>'Oil checked', 'variable'=>oil) + trans = TkVariable.new(0) + add('check', 'label'=>'Transmission checked', 'variable'=>trans) + brakes = TkVariable.new(0) + add('check', 'label'=>'Brakes checked', 'variable'=>brakes) + lights = TkVariable.new(0) + add('check', 'label'=>'Lights checked', 'variable'=>lights) + add('separator') + add('command', 'label'=>'Show current values', + 'command'=>proc{showVars($menu_demo, + ['oil', oil], + ['trans', trans], + ['brakes', brakes], + ['lights', lights])} ) + invoke 1 + invoke 3 + } + + TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_radio| + cascade_menu.add('cascade', 'label'=>'Radio buttons', + 'menu'=>cascade_radio, 'underline'=>0) + pointSize = TkVariable.new + add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10) + add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14) + add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18) + add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24) + add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32) + add('separator') + style = TkVariable.new + add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman') + add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold') + add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic') + add('separator') + add('command', 'label'=>'Show current values', + 'command'=>proc{showVars($menu_demo, + ['pointSize', pointSize], + ['style', style])} ) + invoke 1 + invoke 7 + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|icon_menu| + m.configure('menu'=>icon_menu) + add('command', + 'bitmap'=>'@'+[$demo_dir,'..', + 'images','pattern.xbm'].join(File::Separator), + 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry', + 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.', + 'bitmap'=>'', 'default'=>0, + 'buttons'=>'Dismiss')} ) + ['info', 'questhead', 'error'].each{|icon| + add('command', 'bitmap'=>icon, + 'command'=>proc{print "You invoked the #{icon} bitmap\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|more_menu| + m.configure('menu'=>more_menu) + [ 'An entry','Another entry','Does nothing','Does almost nothing', + 'Make life meaningful' ].each{|i| + add('command', 'label'=>i, + 'command'=>proc{print "You invoked \"#{i}\"\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m) {|colors_menu| + m.configure('menu'=>colors_menu) + ['red', 'orange', 'yellow', 'green', 'blue'].each{|c| + add('command', 'label'=>c, 'background'=>c, + 'command'=>proc{print "You invoked \"#{c}\"\n"}) + } + } +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu84.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu84.rb new file mode 100644 index 0000000..4029ce5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menu84.rb @@ -0,0 +1,215 @@ +# +# menus widget demo (called by 'widget') +# + +# toplevel widget +if defined?($menu84_demo) && $menu84_demo + $menu84_demo.destroy + $menu84_demo = nil +end + +# demo toplevel widget +$menu84_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("menu84") + positionWindow(w) +} + +base_frame = TkFrame.new($menu84_demo).pack(:fill=>:both, :expand=>true) + +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + text("This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.") + else + text("This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.") + end +}.pack('side'=>'top') + + +menustatus = TkVariable.new(" ") +TkFrame.new(base_frame) {|frame| + TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken', + 'bd'=>1, 'font'=>['Helvetica', '10'], + 'anchor'=>'w').pack('side'=>'left', 'padx'=>2, + 'expand'=>true, 'fill'=>'both') + pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2) +} + + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $menu84_demo + $menu84_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'menu84'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +# create menu frame +$menu84_frame = TkMenu.new($menu84_demo, 'tearoff'=>false) + +# menu +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'File', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Open...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Open..." entry'}) + add('command', 'label'=>'New', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "New" entry'}) + add('command', 'label'=>'Save', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save" entry'}) + add('command', 'label'=>'Save As...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Save As..." entry'}) + add('separator') + add('command', 'label'=>'Print Setup...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print Setup..." entry'}) + add('command', 'label'=>'Print...', 'command'=>proc{fail 'this is just a demo: no action has been defined for the "Print..." entry'}) + add('separator') + add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu84_demo.destroy}) +} + +if $tk_platform['platform'] == 'macintosh' || + windowingsystem = "classic" || windowingsystem = "aqua" + modifier = 'Command' +elsif $tk_platform['platform'] == 'windows' + modifier = 'Control' +else + modifier = 'Meta' +end + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Basic', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Long entry that does nothing') + ['A','B','C','D','E','F','G'].each{|c| + add('command', 'label'=>"Print letter \"#{c}\"", + 'underline'=>14, 'accelerator'=>"Meta+#{c}", + 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") + $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) + } +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Cascades', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Print hello', + 'command'=>proc{print "Hello\n"}, + 'accelerator'=>"#{modifier}+H", 'underline'=>6) + $menu84_demo.bind("#{modifier}-h", proc{print "Hello\n"}) + add('command', 'label'=>'Print goodbye', + 'command'=>proc{print "Goodbye\n"}, + 'accelerator'=>"#{modifier}+G", 'underline'=>6) + $menu84_demo.bind("#{modifier}-g", proc{print "Goodbye\n"}) + + TkMenu.new(m, 'tearoff'=>false) {|cascade_check| + m.add('cascade', 'label'=>'Check buttons', + 'menu'=>cascade_check, 'underline'=>0) + oil = TkVariable.new(0) + add('check', 'label'=>'Oil checked', 'variable'=>oil) + trans = TkVariable.new(0) + add('check', 'label'=>'Transmission checked', 'variable'=>trans) + brakes = TkVariable.new(0) + add('check', 'label'=>'Brakes checked', 'variable'=>brakes) + lights = TkVariable.new(0) + add('check', 'label'=>'Lights checked', 'variable'=>lights) + add('separator') + add('command', 'label'=>'Show current values', + 'command'=>proc{showVars($menu84_demo, + ['oil', oil], + ['trans', trans], + ['brakes', brakes], + ['lights', lights])} ) + invoke 1 + invoke 3 + } + + TkMenu.new(m, 'tearoff'=>false) {|cascade_radio| + m.add('cascade', 'label'=>'Radio buttons', + 'menu'=>cascade_radio, 'underline'=>0) + pointSize = TkVariable.new + add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10) + add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14) + add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18) + add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24) + add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32) + add('separator') + style = TkVariable.new + add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman') + add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold') + add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic') + add('separator') + add('command', 'label'=>'Show current values', + 'command'=>proc{showVars($menu84_demo, + ['pointSize', pointSize], + ['style', style])} ) + invoke 1 + invoke 7 + } +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0) + add('command', 'hidemargin'=>1, + 'bitmap'=>'@'+[$demo_dir,'..', + 'images','pattern.xbm'].join(File::Separator), + 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry', + 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.', + 'bitmap'=>'', 'default'=>0, + 'buttons'=>'Dismiss')} ) + ['info', 'questhead', 'error'].each{|icon| + add('command', 'bitmap'=>icon, 'hidemargin'=>1, + 'command'=>proc{print "You invoked the #{icon} bitmap\n"}) + } + + entryconfigure(2, :columnbreak=>true) +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'More', 'menu'=>m, 'underline'=>0) + [ 'An entry','Another entry','Does nothing','Does almost nothing', + 'Make life meaningful' ].each{|i| + add('command', 'label'=>i, + 'command'=>proc{print "You invoked \"#{i}\"\n"}) + } + + m.entryconfigure('Does almost nothing', + 'bitmap'=>'questhead', 'compound'=>'left', + 'command'=>proc{ + TkDialog.new('title'=>'Compound Menu Entry', + 'message'=>'The menu entry you invoked'+ + 'displays both a bitmap and '+ + 'a text string. Other than '+ + 'this, it isjust like any '+ + 'other menu entry.', + 'buttons'=>['OK'], 'bitmap'=>'') + }) +} + +TkMenu.new($menu84_frame) {|m| + $menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0) + ['red', 'orange', 'yellow', 'green', 'blue'].each{|c| + add('command', 'label'=>c, 'background'=>c, + 'command'=>proc{print "You invoked \"#{c}\"\n"}) + } +} + +$menu84_demo.menu($menu84_frame) + +TkMenu.bind('', proc{|w| + begin + label = w.entrycget('active', 'label') + rescue + label = " " + end + menustatus.value = label + Tk.update(true) + }, '%W') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menubu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menubu.rb new file mode 100644 index 0000000..b37367e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/menubu.rb @@ -0,0 +1,237 @@ +# menubutton.rb +# +# This demonstration script creates a window with a bunch of menus +# and cascaded menus using menubuttons. + +require "tkcanvas" + +def optionMenu(menubutton, varName, firstValue, *rest) + varName.value = firstValue + configoptions = {'textvariable'=>varName,'indicatoron'=>'on', + 'relief'=>'raised','borderwidth'=>2,'highlightthickness'=>2, + 'anchor'=>'c','direction'=>'flush'} + configoptions.each {|key, value| + menubutton.configure(key, value) + } + menu = TkMenu.new(menubutton) { + tearoff 'off' + add 'radio', 'label'=>firstValue, 'variable'=>varName + } + menubutton.menu(menu) + for i in rest + menu.add 'radio', 'label'=>i, 'variable'=>varName + end + + return menu +end + +if defined?($menubu_demo) && $menubu_demo + $menubu_demo.destroy + $menubu_demo = nil +end + +$menubu_demo = TkToplevel.new {|w| + title("Menu Button Demonstration") + iconname("menubutton") +} + +positionWindow($menubu_demo) + +base_frame = TkFrame.new($menubu_demo).pack(:fill=>:both, :expand=>true) + +# version check +if $tk_version.to_f < 8.0 + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + text("This is a demonstration of menubuttons. The \"Below\" menubutton pops its menu below the button; the \"Right\" button pops to the right, etc. There are two option menus directly below this text; one is just a standard menu and the other is a 16-color palette.") +}.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $menubu_demo + $menubu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'menubu'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +else ; # Tk8.x + +body = TkFrame.new(base_frame) +body.pack('expand'=>'yes', 'fill'=>'both') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +right = TkMenubutton.new(body) { + text "Right" + underline 0 + direction 'right' + relief 'raised' +} +rightMenu = TkMenu.new(right) { + tearoff 0 + add 'command', 'label'=>"Right menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""} + add 'command', 'label'=>"Right menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Right menu.\""} +} +right.menu(rightMenu) +right.grid('row'=>1, 'column'=>0, 'sticky'=>'w') + +left = TkMenubutton.new(body) { + text "Left" + underline 0 + direction 'left' + relief 'raised' +} +leftMenu = TkMenu.new(left) { + tearoff 0 + add 'command', 'label'=>"Left menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""} + add 'command', 'label'=>"Left menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Left menu.\""} +} +left.menu(leftMenu) +left.grid('row'=>1, 'column'=>2, 'sticky'=>'e') + +center = TkFrame.new(body) { + grid('row'=>1, 'column'=>1, 'sticky'=>'news') +} + +above = TkMenubutton.new(body) { + text "Above" + underline 0 + direction 'above' + relief 'raised' +} +aboveMenu = TkMenu.new(above) { + tearoff 0 + add 'command', 'label'=>"Above menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Above menu.\""} + add 'command', 'label'=>"Above menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Above menu.\""} +} +above.menu(aboveMenu) +above.grid('row'=>2, 'column'=>1, 'sticky'=>'s') + +center = TkFrame.new(body) { + grid('row'=>1, 'column'=>1, 'sticky'=>'news') +} + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc { + tmppath = $menubu_demo + $menubu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc { showCode 'menubu' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'expand'=>'yes', 'fill'=>'x', 'pady'=>'2m') + +msg = TkLabel.new(center) { +# font $font + wraplength '4i' + justify 'left' + text "This is a demonstration of menubuttons. The \"Below\" menubutton pops its menu below the button; the \"Right\" button pops to the right, etc. There are two option menus directly below this text; one is just a standard menu and the other is a 16-color palette." +} +msg.pack('side'=>'top', 'padx'=>25, 'pady'=>25) + +TkFrame.new(center) {|f| + menubuttonoptions = TkVariable.new + mbutton = TkMenubutton.new(f) + options = optionMenu(mbutton, menubuttonoptions, + 'one', 'two', 'three') + mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25) + paletteColor = TkVariable.new + colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75', + 'Red','Green','Blue','gray50','Yellow','Cyan','Magenta', + 'White','Brown','DarkSeaGreen','DarkViolet'] + colorMenuButton = TkMenubutton.new(f) + m = optionMenu(colorMenuButton, paletteColor, *colors) + begin + windowingsystem = Tk.windowingsystem() + rescue + windowingsystem = "" + end + if windowingsystem == "classic" || windowingsystem == "aqua" + topBorderColor = 'Black' + bottomBorderColor = 'Black' + else + topBorderColor = 'gray50' + bottomBorderColor = 'gray75' + end + for i in 0..15 + image = TkPhotoImage.new('height'=>16, 'width'=>16) + image.put(topBorderColor, 0, 0, 16, 1) + image.put(topBorderColor, 0, 1, 1, 16) + image.put(bottomBorderColor, 0, 15, 16, 16) + image.put(bottomBorderColor, 15, 1, 16, 16) + image.put(colors[i], 1, 1, 15, 15) + + selectimage = TkPhotoImage.new('height'=>16, 'width'=>16) + selectimage.put('Black', 0, 0, 16, 2) + selectimage.put('Black', 0, 2, 2, 16) + selectimage.put('Black', 2, 14, 16, 16) + selectimage.put('Black', 14, 2, 16, 14) + selectimage.put(colors[i], 2, 2, 14, 14) + + m.entryconfigure(i, 'image'=>image, 'selectimage'=>selectimage, 'hidemargin'=>'on') + end + m.configure('tearoff', 'on') + for c in ['Black', 'gray75', 'gray50', 'White'] + m.entryconfigure(c, 'columnbreak'=>1) + end + colorMenuButton.pack('side'=>'left', 'padx'=>25, 'pady'=>25) + pack 'padx'=>25, 'pady'=>25 +} + +end ; # Tk8.x diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox.rb new file mode 100644 index 0000000..62b1f2b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox.rb @@ -0,0 +1,90 @@ +# msgbox.rb +# +# This demonstration script creates message boxes of various type +# +# message boxes widget demo (called by 'widget') +# + +# toplevel widget +if defined?($msgbox_demo) && $msgbox_demo + $msgbox_demo.destroy + $msgbox_demo = nil +end + +# demo toplevel widget +$msgbox_demo = TkToplevel.new {|w| + title("Message Box Demonstration") + iconname("messagebox") + positionWindow(w) +} + +base_frame = TkFrame.new($msgbox_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box.").pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $msgbox_demo + $msgbox_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'msgbox'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Message Box' + command proc{showMessageBox $msgbox_demo} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +$msgbox_leftframe = TkFrame.new(base_frame) +$msgbox_rightframe = TkFrame.new(base_frame) +$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') +$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') + +TkLabel.new($msgbox_leftframe, 'text'=>'Icon').pack('side'=>'top') +TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxIcon = TkVariable.new('info') +['error', 'info', 'question', 'warning'].each {|icon| + TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon, + 'relief'=>'flat', 'value'=>icon, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +TkLabel.new($msgbox_rightframe, 'text'=>'Type').pack('side'=>'top') +TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxType = TkVariable.new('ok') +['abortretryignore', 'ok', 'okcancel', + 'retrycancel', 'yesno', 'yesnocancel'].each {|type| + TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType, + 'relief'=>'flat', 'value'=>type, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +def showMessageBox(w) + button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value, + 'title'=>'Message', 'parent'=>w, + 'message'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon") + + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w, + 'message'=>"You have selected \"#{button}\"") +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox2.rb new file mode 100644 index 0000000..136a723 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/msgbox2.rb @@ -0,0 +1,91 @@ +# msgbox2.rb +# +# This demonstration script creates message boxes of various type +# +# message boxes widget demo (called by 'widget') +# + +# toplevel widget +if defined?($msgbox2_demo) && $msgbox2_demo + $msgbox2_demo.destroy + $msgbox2_demo = nil +end + +# demo toplevel widget +$msgbox2_demo = TkToplevel.new {|w| + title("Message Box Demonstration") + iconname("messagebox") + positionWindow(w) +} + +base_frame = TkFrame.new($msgbox2_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box with both of a message and a detail.").pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $msgbox2_demo + $msgbox2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'msgbox2'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Message Box' + command proc{showMessageBox2 $msgbox2_demo} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +$msgbox_leftframe = TkFrame.new(base_frame) +$msgbox_rightframe = TkFrame.new(base_frame) +$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') +$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') + +TkLabel.new($msgbox_leftframe, 'text'=>'Icon').pack('side'=>'top') +TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxIcon = TkVariable.new('info') +['error', 'info', 'question', 'warning'].each {|icon| + TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon, + 'relief'=>'flat', 'value'=>icon, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +TkLabel.new($msgbox_rightframe, 'text'=>'Type').pack('side'=>'top') +TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxType = TkVariable.new('ok') +['abortretryignore', 'ok', 'okcancel', + 'retrycancel', 'yesno', 'yesnocancel'].each {|type| + TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType, + 'relief'=>'flat', 'value'=>type, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +def showMessageBox2(w) + button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value, + 'title'=>'Message', 'parent'=>w, + 'message'=>"\"#{$msgboxType.value}\" Type MessageBox", + 'detail'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon. Please click one of the following button.") + + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w, + 'message'=>"You have selected \"#{button}\"") +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned1.rb new file mode 100644 index 0000000..26941b8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned1.rb @@ -0,0 +1,47 @@ +# paned1.rb +# +# This demonstration script creates a toplevel window containing +# a paned window that separates two windows horizontally. +# +# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp" + +if defined?($paned1_demo) && $paned1_demo + $paned1_demo.destroy + $paned1_demo = nil +end + +$paned1_demo = TkToplevel.new {|w| + title("Horizontal Paned Window Demonstration") + iconname("paned1") + positionWindow(w) +} + +base_frame = TkFrame.new($paned1_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.) +If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'. +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $paned1_demo.destroy + $paned1_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'paned1' + }).pack(:side=>:left, :expand=>true) +} + +TkPanedwindow.new(base_frame, :orient=>:horizontal){|f| + add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'), + Tk::Label.new(f, :text=>"This is the\nright side", :bg=>'cyan')) + + pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m') +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned2.rb new file mode 100644 index 0000000..0e62013 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/paned2.rb @@ -0,0 +1,94 @@ +# paned2.rb -- +# +# This demonstration script creates a toplevel window containing +# a paned window that separates two windows vertically. +# +# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp" + +if defined?($paned2_demo) && $paned2_demo + $paned2_demo.destroy + $paned2_demo = nil +end + +$paned2_demo = TkToplevel.new {|w| + title("Vertical Paned Window Demonstration") + iconname("paned2") + positionWindow(w) +} + +base_frame = TkFrame.new($paned2_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +The sash between the two scrolled windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.) +If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'. +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $paned2_demo.destroy + $paned2_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'paned2' + }).pack(:side=>:left, :expand=>true) +} + +paneList = TkVariable.new # define as normal variable (not array) +paneList.value = [ # ruby's array --> tcl's list + 'List of Ruby/Tk Widgets', + 'TkButton', + 'TkCanvas', + 'TkCheckbutton', + 'TkEntry', + 'TkFrame', + 'TkLabel', + 'TkLabelframe', + 'TkListbox', + 'TkMenu', + 'TkMenubutton', + 'TkMessage', + 'TkPanedwindow', + 'TkRadiobutton', + 'TkScale', + 'TkScrollbar', + 'TkSpinbox', + 'TkText', + 'TkToplevel' +] + +# Create the pane itself +TkPanedwindow.new(base_frame, :orient=>:vertical){|f| + pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m') + + add(TkFrame.new(f){|paned2_top| + TkListbox.new(paned2_top, :listvariable=>paneList) { + # Invert the first item to highlight it + itemconfigure(0, :background=>self.cget(:foreground), + :foreground=>self.cget(:background) ) + yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right, + :fill=>:y)) + pack(:fill=>:both, :expand=>true) + } + }, + + TkFrame.new(f, :height=>120) {|paned2_bottom| + # The bottom window is a text widget with scrollbar + paned2_xscr = TkScrollbar.new(paned2_bottom) + paned2_yscr = TkScrollbar.new(paned2_bottom) + paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) { + insert('1.0', "This is just a normal text widget") + xscrollbar(paned2_xscr) + yscrollbar(paned2_yscr) + } + Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew') + Tk.grid(paned2_xscr, :sticky=>'nsew') + TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1) + TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1) + } ) +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/pendulum.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/pendulum.rb new file mode 100644 index 0000000..5f7d361 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/pendulum.rb @@ -0,0 +1,240 @@ +# +# This demonstration illustrates how Tcl/Tk can be used to construct +# simulations of physical systems. +# (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +# destroy toplevel widget for this demo script +if defined?($pendulum_demo) && $pendulum_demo + $pendulum_demo.destroy + $pendulum_demo = nil +end + +# create toplevel widget +$pendulum_demo = TkToplevel.new {|w| + title("Pendulum Animation Demonstration") + iconname("pendulum") + positionWindow(w) +} + +base_frame = TkFrame.new($pendulum_demo).pack(:fill=>:both, :expand=>true) + +# create label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text 'This demonstration shows how Ruby/Tk can be used to carry out animations that are linked to simulations of physical systems. In the left canvas is a graphical representation of the physical system itself, a simple pendulum, and in the right canvas is a graph of the phase space of the system, which is a plot of the angle (relative to the vertical) against the angular velocity. The pendulum bob may be repositioned by clicking and dragging anywhere on the left canvas.' +} +msg.pack('side'=>'top') + +# create frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $pendulum_demo + $pendulum_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Code' + command proc{showCode 'pendulum'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# animated wave +class PendulumAnimationDemo + def initialize(frame) + # Create some structural widgets + @pane = TkPanedWindow.new(frame, :orient=>:horizontal).pack(:fill=>:both, :expand=>true) +# @pane.add(@lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation')) +# @pane.add(@lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space')) + @lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation') + @lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space') + + # Create the canvas containing the graphical representation of the + # simulated system. + @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white', + :borderwidth=>2, :relief=>:sunken) + TkcText.new(@c, 5, 5, :anchor=>:nw, + :text=>'Click to Adjust Bob Start Position') + # Coordinates of these items don't matter; they will be set properly below + @plate = TkcLine.new(@c, 0, 25, 320, 25, :width=>2, :fill=>'grey50') + @rod = TkcLine.new(@c, 1, 1, 1, 1, :width=>3, :fill=>'black') + @bob = TkcOval.new(@c, 1, 1, 2, 2, + :width=>3, :fill=>'yellow', :outline=>'black') + TkcOval.new(@c, 155, 20, 165, 30, :fill=>'grey50', :outline=>'') + + # pack + @c.pack(:fill=>:both, :expand=>true) + + # Create the canvas containing the phase space graph; this consists of + # a line that gets gradually paler as it ages, which is an extremely + # effective visual trick. + @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white', + :borderwidth=>2, :relief=>:sunken) + @y_axis = TkcLine.new(@k, 160, 200, 160, 0, :fill=>'grey75', :arrow=>:last) + @x_axis = TkcLine.new(@k, 0, 100, 320, 100, :fill=>'grey75', :arrow=>:last) + + @graph = {} + 90.step(0, -10){|i| + # Coordinates of these items don't matter; + # they will be set properly below + @graph[i] = TkcLine.new(@k, 0, 0, 1, 1, :smooth=>true, :fill=>"grey#{i}") + } + + # labels + @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne, + :text=>'q', :font=>'Symbol 8') + @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne, + :text=>'dq', :font=>'Symbol 8') + + # pack + @k.pack(:fill=>:both, :expand=>true) + + # Initialize some variables + @points = [] + @theta = 45.0 + @dTheta = 0.0 + @length = 150 + + # animation loop + @timer = TkTimer.new(15){ repeat } + + # binding + @c.bindtags_unshift(btag = TkBindTag.new) + btag.bind('Destroy'){ @timer.stop } + btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)}, + '%x %y') + btag.bind('B1-Motion', proc{|x, y| showPendulum(x.to_i, y.to_i)}, '%x %y') + btag.bind('ButtonRelease-1', + proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start }, + '%x %y') + + btag.bind('Configure', proc{|w| @plate.coords(0, 25, w.to_i, 25)}, '%w') + + @k.bind('Configure', proc{|h, w| + h = h.to_i + w = w.to_i + @psh = h/2; + @psw = w/2 + @x_axis.coords(2, @psh, w-2, @psh) + @y_axis.coords(@psw, h-2, @psw, 2) + @label_theta.coords(@psw-4, 6) + @label_dtheta.coords(w-6, @psh+4) + }, '%h %w') + + # add + Tk.update + @pane.add(@lf1) + @pane.add(@lf2) + + # init display + showPendulum + + # animation start + @timer.start(500) + end + + # This procedure makes the pendulum appear at the correct place on the + # canvas. If the additional arguments x, y are passed instead of computing + # the position of the pendulum from the length of the pendulum rod and its + # angle, the length and angle are computed in reverse from the given + # location (which is taken to be the centre of the pendulum bob.) + def showPendulum(x=nil, y=nil) + if x && y && (x != 160 || y != 25) + @dTheta = 0.0 + x2 = x - 160 + y2 = y - 25 + @length = Math.hypot(x2, y2) + @theta = Math.atan2(x2,y2)*180/Math::PI + else + angle = @theta*Math::PI/180 + x = 160 + @length*Math.sin(angle) + y = 25 + @length*Math.cos(angle) + end + + @rod.coords(160, 25, x, y) + @bob.coords(x-15, y-15, x+15, y+15) + end + + # Update the phase-space graph according to the current angle and the + # rate at which the angle is changing (the first derivative with + # respect to time.) + def showPhase + unless @psw && @psh + @psw = @k.width/2 + @psh = @k.height/2 + end + @points << @theta + @psw << -20*@dTheta + @psh + if @points.length > 100 + @points = @points[-100..-1] + end + (0...100).step(10){|i| + first = - i + last = 11 - i + last = -1 if last >= 0 + next if first > last + lst = @points[first..last] + @graph[i].coords(lst) if lst && lst.length >= 4 + } + end + + # This procedure is the "business" part of the simulation that does + # simple numerical integration of the formula for a simple rotational + # pendulum. + def recomputeAngle + scaling = 3000.0/@length/@length + + # To estimate the integration accurately, we really need to + # compute the end-point of our time-step. But to do *that*, we + # need to estimate the integration accurately! So we try this + # technique, which is inaccurate, but better than doing it in a + # single step. What we really want is bound up in the + # differential equation: + # .. - sin theta + # theta + theta = ----------- + # length + # But my math skills are not good enough to solve this! + + # first estimate + firstDDTheta = -Math.sin(@theta * Math::PI/180) * scaling + midDTheta = @dTheta + firstDDTheta + midTheta = @theta + (@dTheta + midDTheta)/2 + # second estimate + midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling + midDTheta = @dTheta + (firstDDTheta + midDDTheta)/2 + midTheta = @theta + (@dTheta + midDTheta)/2 + # Now we do a double-estimate approach for getting the final value + # first estimate + midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling + lastDTheta = midDTheta + midDDTheta + lastTheta = midTheta + (midDTheta+ lastDTheta)/2 + # second estimate + lastDDTheta = -Math.sin(lastTheta * Math::PI/180) * scaling + lastDTheta = midDTheta + (midDDTheta + lastDDTheta)/2 + lastTheta = midTheta + (midDTheta + lastDTheta)/2 + # Now put the values back in our globals + @dTheta = lastDTheta + @theta = lastTheta + end + + # This method ties together the simulation engine and the graphical + # display code that visualizes it. + def repeat + # Simulate + recomputeAngle + + # Update the display + showPendulum + showPhase + end +end + +# Start the animation processing +PendulumAnimationDemo.new(base_frame) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/plot.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/plot.rb new file mode 100644 index 0000000..628c9df --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/plot.rb @@ -0,0 +1,124 @@ +# plot.rb +# +# This demonstration script creates a canvas widget showing a 2-D +# plot with data points that can be dragged with the mouse. +# +# 2-D plot widget demo (called by 'widget') +# + +# toplevel widget +if defined?($plot_demo) && $plot_demo + $plot_demo.destroy + $plot_demo = nil +end + +# demo toplevel widget +$plot_demo = TkToplevel.new {|w| + title("Plot Demonstration") + iconname("Plot") + positionWindow(w) +} + +base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"This window displays a canvas widget containing a simple 2-dimensional plot. You can doctor the data by dragging any of the points with mouse button 1."){ + pack('side'=>'top') +} + +# frame +$plot_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $plot_demo + $plot_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'plot'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$plot_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# font +plotFont = '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + +# canvas +$plot_canvas = TkCanvas.new(base_frame,'relief'=>'raised','width'=>450,'height'=>300) +$plot_canvas.pack('side'=>'top', 'fill'=>'x') + +# plot +TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2) +TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2) +TkcText.new($plot_canvas, 225, 20, + 'text'=>"A Simple Plot", 'font'=>plotFont, 'fill'=>'brown') + +(0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2) + TkcText.new($plot_canvas, x, 254, + 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n') +} +(0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2) + TkcText.new($plot_canvas, 96, y, + 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e') +} + +for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' +end + +$plot_canvas.itembind('point', 'Any-Enter', + proc{$plot_canvas.itemconfigure 'current','fill','red'}) +$plot_canvas.itembind('point', 'Any-Leave', + proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'}) +$plot_canvas.itembind('point', '1', + proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y") +$plot_canvas.itembind('point', 'ButtonRelease-1', + proc{$plot_canvas.dtag 'selected'}) +$plot_canvas.bind('B1-Motion', + proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y") + +$plot = {'lastX'=>0, 'lastY'=>0} + +# plotDown -- +# This method is invoked when the mouse is pressed over one of the +# data points. It sets up state to allow the point to be dragged. +# +# Arguments: +# w - The canvas window. +# x, y - The coordinates of the mouse press. + +def plotDown (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $plot['lastX'] = x + $plot['lastY'] = y +end + +# plotMove -- +# This method is invoked during mouse motion events. It drags the +# current item. +# +# Arguments: +# w - The canvas window. +# x, y - The coordinates of the mouse. + +def plotMove (w, x, y) + w.move 'selected', x - $plot['lastX'], y - $plot['lastY'] + $plot['lastX'] = x + $plot['lastY'] = y +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/puzzle.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/puzzle.rb new file mode 100644 index 0000000..43c61f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/puzzle.rb @@ -0,0 +1,134 @@ +# puzzle.rb +# +# This demonstration script creates a 15-puzzle game using a collection +# of buttons. +# +# widet demo 'puzzle' (called by 'widget') +# + +# toplevel widget +if defined?($puzzle_demo) && $puzzle_demo + $puzzle_demo.destroy + $puzzle_demo = nil +end + +# demo toplevel widget +$puzzle_demo = TkToplevel.new {|w| + title("15-Puzzle Demonstration") + iconname("15-Puzzle") + positionWindow(w) +} + +base_frame = TkFrame.new($puzzle_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "A 15-puzzle appears below as a collection of buttons. Click on any of the pieces next to the space, and that piece will slide over the space. Continue this until the pieces are arranged in numerical order from upper-left to lower-right." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $puzzle_demo + $puzzle_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'puzzle'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame + +# Special trick: select a darker color for the space by creating a +# scrollbar widget and using its trough color. +begin + if Tk.windowingsystem() == 'aqua' + frameWidth = 168 + frameHeight = 168 + elsif Tk.default_widget_set == :Ttk + frameWidth = 148 + frameHeight = 124 + else + frameWidth = 120 + frameHeight = 120 + end +rescue + frameWidth = 120 + frameHeight = 120 +end + +# depend_on_button_width = true +depend_on_button_width = false + +s = TkScrollbar.new(base_frame) +base = TkFrame.new(base_frame) { + width frameWidth + height frameHeight + borderwidth 2 + relief 'sunken' + bg s['troughcolor'] +} +s.destroy +base.pack('side'=>'top', 'padx'=>'1c', 'pady'=>'1c') + +def def_puzzleswitch_proc(w, num) + proc{puzzleSwitch w, num} +end + +$xpos = {} +$ypos = {} +order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12] +(0..14).each{|i| + num = order[i] + $xpos[num] = (i % 4) * 0.25 + $ypos[num] = (i / 4) * 0.25 + TkButton.new(base) {|w| + relief 'raised' + text num + highlightthickness 0 + command def_puzzleswitch_proc(w, num) + if depend_on_button_width && (w.winfo_reqwidth * 4 > base.width) + base.width = w.winfo_reqwidth * 4 + end + }.place('relx'=>$xpos[num], 'rely'=>$ypos[num], + 'relwidth'=>0.25, 'relheight'=>0.25) +} +$xpos['space'] = 0.75 +$ypos['space'] = 0.75 + + +# puzzleSwitch -- +# This procedure is invoked when the user clicks on a particular button; +# if the button is next to the empty space, it moves the button into the +# empty space. + +def puzzleSwitch(w, num) + if ( ($ypos[num] >= ($ypos['space'] - 0.01)) \ + && ($ypos[num] <= ($ypos['space'] + 0.01)) \ + && ($xpos[num] >= ($xpos['space'] - 0.26)) \ + && ($xpos[num] <= ($xpos['space'] + 0.26))) \ + || (($xpos[num] >= ($xpos['space'] - 0.01)) \ + && ($xpos[num] <= ($xpos['space'] + 0.01)) \ + && ($ypos[num] >= ($ypos['space'] - 0.26)) \ + && ($ypos[num] <= ($ypos['space'] + 0.26))) + tmp = $xpos['space'] + $xpos['space'] = $xpos[num] + $xpos[num] = tmp + tmp = $ypos['space'] + $ypos['space'] = $ypos[num] + $ypos[num] = tmp + w.place('relx'=>$xpos[num], 'rely'=>$ypos[num]) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio.rb new file mode 100644 index 0000000..25cfac2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio.rb @@ -0,0 +1,86 @@ +# radio.rb +# +# This demonstration script creates a toplevel window containing +# several radiobutton widgets. +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($radio_demo) && $radio_demo + $radio_demo.destroy + $radio_demo = nil +end + +# demo toplevel widget +$radio_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration") + iconname("radio") + positionWindow(w) +} + +base_frame = TkFrame.new($radio_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "Two groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. Click the \"See Variables\" button to see the current values of the variables." +} +msg.pack('side'=>'top') + +# +size = TkVariable.new +color = TkVariable.new + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $radio_demo + $radio_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'radio'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Variables' + command proc{ + showVars(base_frame, ['size', size], ['color', color]) + } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +f_left = TkFrame.new(base_frame) +f_right = TkFrame.new(base_frame) +f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') + +# radiobutton +[10, 12, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "Point Size #{sz}" + variable size + relief 'flat' + value sz + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + +['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col| + TkRadioButton.new(f_right) { + text col + variable color + relief 'flat' + value col.downcase + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio2.rb new file mode 100644 index 0000000..6c02aef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio2.rb @@ -0,0 +1,109 @@ +# radio2.rb +# +# This demonstration script creates a toplevel window containing +# several radiobutton widgets. +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($radio2_demo) && $radio2_demo + $radio2_demo.destroy + $radio2_demo = nil +end + +# demo toplevel widget +$radio2_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration 2") + iconname("radio2") + positionWindow(w) +} + +base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "Three groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. Click the \"See Variables\" button to see the current values of the variables." +} +msg.pack('side'=>'top') + +# +size = TkVariable.new +color = TkVariable.new +align = TkVariable.new + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $radio2_demo + $radio2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'radio2'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'See Variables' + command proc{ + showVars(base_frame, + ['size', size], ['color', color], ['compound', align]) + } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +f_left = TkLabelFrame.new(base_frame, 'text'=>'Point Size', + 'pady'=>2, 'padx'=>2) +f_mid = TkLabelFrame.new(base_frame, 'text'=>'Color', + 'pady'=>2, 'padx'=>2) +f_right = TkLabelFrame.new(base_frame, 'text'=>'Alignment', + 'pady'=>2, 'padx'=>2) +f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') + +# radiobutton +[10, 12, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "Point Size #{sz}" + variable size + relief 'flat' + value sz + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x') +} + +['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col| + TkRadioButton.new(f_mid) { + text col + variable color + relief 'flat' + value col.downcase + anchor 'w' + }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x') +} + +# label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead', +label = Tk::Label.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead', + 'compound'=>'left') +label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top') +label.height(TkWinfo.reqheight(label)) +abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a| + lower = a.downcase + TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat', + 'value'=>lower, 'indicatoron'=>0, 'width'=>7, + 'command'=>proc{label.compound(align.value)}) +} + +Tk.grid('x', abtn[0]) +Tk.grid(abtn[1], label, abtn[2]) +Tk.grid('x', abtn[3]) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio3.rb new file mode 100644 index 0000000..9c9d75e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/radio3.rb @@ -0,0 +1,117 @@ +# radio3.rb +# +# This demonstration script creates a toplevel window containing +# several radiobutton widgets. +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($radio3_demo) && $radio3_demo + $radio3_demo.destroy + $radio3_demo = nil +end + +# demo toplevel widget +$radio3_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration 3") + iconname("radio3") + positionWindow(w) +} + +base_frame = TkFrame.new($radio3_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "Three groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Tcl variable is associated with each group to indicate which of the group's buttons is selected. When the 'Tristate' button is pressed, the radio buttons will display the tri-state mode. Selecting any radio button will return the buttons to their respective on/off state. Click the \"See Variables\" button to see the current values of the variables." +} +msg.grid(:row=>0, :column=>0, :columnspan=>3, :sticky=>'nsew') + +# variable +size = TkVariable.new +color = TkVariable.new +align = TkVariable.new + +# frame +TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'See Variables', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, ['size', size], + ['color', color], ['compound', align]) + }), + TkButton.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'radio3'}), + TkButton.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $radio3_demo + $radio3_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) + TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew') +} + +# frame +f_left = TkLabelFrame.new(base_frame, 'text'=>'Point Size', + 'pady'=>2, 'padx'=>2) +f_mid = TkLabelFrame.new(base_frame, 'text'=>'Color', + 'pady'=>2, 'padx'=>2) +f_right = TkLabelFrame.new(base_frame, 'text'=>'Alignment', + 'pady'=>2, 'padx'=>2) +f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) +f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) +f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c') + +TkButton.new(base_frame, 'text'=>'Tristate', + 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){ + grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c') +} + +# radiobutton +[10, 12, 14, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "Point Size #{sz}" + variable size + relief 'flat' + value sz + tristatevalue 'multi' + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x') +} + +['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col| + TkRadioButton.new(f_mid) { + text col + variable color + relief 'flat' + value col.downcase + anchor 'w' + tristatevalue 'multi' + command proc{f_mid.fg(color.value)} + }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x') +} + +# label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead', +label = Tk::Label.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead', + 'compound'=>'left') +label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top') +label.height(TkWinfo.reqheight(label)) +a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a| + TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat', + 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7, + 'command'=>proc{label.compound(align.value)}) +} + +Tk.grid('x', a_btn[0]) +Tk.grid(a_btn[1], label, a_btn[2]) +Tk.grid('x', a_btn[3]) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rmt b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rmt new file mode 100644 index 0000000..73f6311 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rmt @@ -0,0 +1,268 @@ +#!/usr/bin/env ruby + +# rmt -- +# This script implements a simple remote-control mechanism for +# Tk applications. It allows you to select an application and +# then type commands to that application. + +require 'tk' + +class Rmt + def initialize(parent=nil) + win = self + + unless parent + parent = TkRoot.new + end + root = TkWinfo.toplevel(parent) + root.minsize(1,1) + + # The instance variable below keeps track of the remote application + # that we're sending to. If it's an empty string then we execute + # the commands locally. + @app = 'local' + @mode = 'Ruby' + + # The instance variable below keeps track of whether we're in the + # middle of executing a command entered via the text. + @executing = 0 + + # The instance variable below keeps track of the last command executed, + # so it can be re-executed in response to !! commands. + @lastCommand = "" + + # Create menu bar. Arrange to recreate all the information in the + # applications sub-menu whenever it is cascaded to. + + TkFrame.new(root, 'relief'=>'raised', 'bd'=>2) {|f| + pack('side'=>'top', 'fill'=>'x') + TkMenubutton.new(f, 'text'=>'File', 'underline'=>0) {|mb| + TkMenu.new(mb) {|mf| + mb.menu(mf) + TkMenu.new(mf) {|ma| + postcommand proc{win.fillAppsMenu ma} + mf.add('cascade', 'label'=>'Select Application', + 'menu'=>ma, 'underline'=>0) + } + add('command', 'label'=>'Quit', + 'command'=>proc{root.destroy}, 'underline'=>0) + } + pack('side'=>'left') + } + } + + # Create text window and scrollbar. + + @txt = TkText.new(root, 'relief'=>'sunken', 'bd'=>2, 'setgrid'=>true) { + yscrollbar(TkScrollbar.new(root){pack('side'=>'right', 'fill'=>'y')}) + pack('side'=>'left') + } + + @promptEnd = TkTextMark.new(@txt, 'insert') + + # Create a binding to forward commands to the target application, + # plus modify many of the built-in bindings so that only information + # in the current command can be deleted (can still set the cursor + # earlier in the text and select and insert; just can't delete). + + @txt.bindtags([@txt, TkText, root, 'all']) + @txt.bind('Return', proc{ + @txt.set_insert('end - 1c') + @txt.insert('insert', "\n") + win.invoke + Tk.callback_break + }) + @txt.bind('Delete', proc{ + begin + @txt.tag_remove('sel', 'sel.first', @promptEnd) + rescue + end + if @txt.tag_nextrange('sel', '1.0', 'end') == [] + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + end + }) + @txt.bind('BackSpace', proc{ + begin + @txt.tag_remove('sel', 'sel.first', @promptEnd) + rescue + end + if @txt.tag_nextrange('sel', '1.0', 'end') == [] + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + end + }) + @txt.bind('Control-d', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Control-k', proc{ + if @txt.compare('insert', '<', @promptEnd) + @txt.set_insert(@promptEnd) + end + }) + @txt.bind('Control-t', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Meta-d', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Meta-BackSpace', proc{ + if @txt.compare('insert', '<=', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Control-h', proc{ + if @txt.compare('insert', '<=', @promptEnd) + Tk.callback_break + end + }) + + @txt.tag_configure('bold', 'font'=>['Courier', 12, 'bold']) + + @app = Tk.appname('rmt') + if (@app =~ /^rmt(.*)$/) + root.title("Tk Remote Controller#{$1}") + root.iconname("Tk Remote#{$1}") + end + prompt + @txt.focus + #@app = TkWinfo.appname(TkRoot.new) + end + + def tkTextInsert(w,s) + return if s == "" + begin + if w.compare('sel.first','<=','insert') \ + && w.compare('sel.last','>=','insert') + w.tag_remove('sel', 'sel.first', @promptEnd) + w.delete('sel.first', 'sel.last') + end + rescue + end + w.insert('insert', s) + w.see('insert') + end + + # The method below is used to print out a prompt at the + # insertion point (which should be at the beginning of a line + # right now). + + def prompt + @txt.insert('insert', "#{@app}: ") + @promptEnd.set('insert') + @promptEnd.gravity = 'left' + @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd) + end + + # The method below executes a command (it takes everything on the + # current line after the prompt and either sends it to the remote + # application or executes it locally, depending on "app". + + def invoke + cmd = @txt.get(@promptEnd, 'insert') + @executing += 1 + case (@mode) + when 'Tcl' + if Tk.info('complete', cmd) + if (cmd == "!!\n") + cmd = @lastCommand + else + @lastCommand = cmd + end + begin + msg = Tk.appsend(@app, false, cmd) + rescue + msg = "Error: #{$!}" + end + @txt.insert('insert', msg + "\n") if msg != "" + prompt + @promptEnd.set('insert') + end + + when 'Ruby' + if (cmd == "!!\n") + cmd = @lastCommand + end + complete = true + begin + eval("proc{#{cmd}}") + rescue + complete = false + end + if complete + @lastCommand = cmd + begin +# msg = Tk.appsend(@app, false, +# 'ruby', +# '"(' + cmd.gsub(/[][$"]/, '\\\\\&') + ').to_s"') + msg = Tk.rb_appsend(@app, false, cmd) + rescue + msg = "Error: #{$!}" + end + @txt.insert('insert', msg + "\n") if msg != "" + prompt + @promptEnd.set('insert') + end + end + + @executing -= 1 + @txt.yview_pickplace('insert') + end + + # The following method is invoked to change the application that + # we're talking to. It also updates the prompt for the current + # command, unless we're in the middle of executing a command from + # the text item (in which case a new prompt is about to be output + # so there's no need to change the old one). + + def newApp(appName, mode) + @app = appName + @mode = mode + if @executing == 0 + @promptEnd.gravity = 'right' + @txt.delete("#{@promptEnd.path} linestart", @promptEnd) + @txt.insert(@promptEnd, "#{appName}: ") + @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd) + @promptEnd.gravity = 'left' + end + end + + # The method below will fill in the applications sub-menu with a list + # of all the applications that currently exist. + + def fillAppsMenu(menu) + win = self + begin + menu.delete(0,'last') + rescue + end + TkWinfo.interps.sort.each{|ip| + begin + if Tk.appsend(ip, false, 'info commands ruby') == "" + mode = 'Tcl' + else + mode = 'Ruby' + end + menu.add('command', 'label'=>format("%s (#{mode}/Tk)", ip), + 'command'=>proc{win.newApp ip, mode}) + rescue + menu.add('command', 'label'=>format("%s (unknown Tk)", ip), + 'command'=>proc{win.newApp ip, mode}, 'state'=>'disabled') + end + } + menu.add('command', 'label'=>format("local (Ruby/Tk)"), + 'command'=>proc{win.newApp 'local', 'Ruby'}) + end +end + +Rmt.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rolodex b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rolodex new file mode 100644 index 0000000..9a4030e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/rolodex @@ -0,0 +1,320 @@ +#!/usr/bin/env ruby +# +# rolodex -- +# This script is a part of Tom LaStrange's rolodex +# +# Copyright (C) 1998 by Takaaki Tateishi +# Time-stamp: "03/08/02 06:23:06 nagai" +# + +require "tk" + + +def show_help(topic,x=0,y=0) + if( topic.is_a?(TkWindow) ) + w = TkWinfo.containing(x,y) + if( TkWinfo.exist?(w) ) + topic = w + end + end + + if( $helpTopics.include?(topic) ) + msg = $helpTopics[topic] + else + msg = "Sorry, but no help is available for this topic" + end + TkDialog.new("title"=>"Rolodex Help", + "message"=>"Information on #{topic}:\n\n#{msg}", + "default_button"=>0, + "buttons"=>["OK"]) +end + +def fillCard + clearAction + $root.frame.entry[1].insert(0,"Takaaki Tateishi") + $root.frame.entry[2].insert(0,"Japan Advanced Institute of Science and Techonology") + $root.frame.entry[3].insert(0,"1-1 Asahidai, Tatsunokuchi") + $root.frame.entry[4].insert(0,"Ishikawa 923-1292, Japan") + $root.frame.entry[5].insert(0,"private") + $root.frame.entry[6].insert(0,"***-***-****") + $root.frame.entry[7].insert(0,"***-***-****") +end + +def addAction + for i in 1..7 + STDERR.print format("%-12s %s\n", + RolodexFrame::LABEL[i], + $root.frame.entry[i].value) + end +end + +def clearAction + for i in 1..7 + $root.frame.entry[i].delete(0,"end") + end +end + +def fileAction + TkDialog.new("title"=>"File Selection", + "message"=>"This is a dummy file selection dialog box.\n", + "default_button"=>0, + "buttons"=>["OK"]) + STDERR.print "dummy file name\n" +end + +def deleteAction + result = TkDialog.new("title"=>"Confirm Action", + "message"=>"Are you sure?", + "default_button"=>0, + "buttons"=>["Cancel"]) + if( result.value == 0 ) + clearAction + end +end + + +class RolodexFrame < TkFrame + attr_reader :entry, :label + + LABEL = ["","Name:","Address:","","","Home Phone:","Work Phone:","Fax:"] + + def initialize(parent=nil,keys=nil) + super(parent,keys) + self["relief"] = "flat" + + @i = [] + @label = [] + @entry = [] + for i in 1..7 + @i[i] = TkFrame.new(self) + @i[i].pack("side"=>"top", + "pady"=>2, + "anchor"=>"e") + @label[i] = TkLabel.new(@i[i], + "text"=>LABEL[i], + "anchor"=>"e") + @entry[i] = TkEntry.new(@i[i], + "width"=>30, + "relief"=>"sunken") + @entry[i].pack("side"=>"right") + @label[i].pack("side"=>"right") + end + end +end + +class RolodexButtons < TkFrame + attr_reader :clear, :add, :search, :delete + + def initialize(parent,keys=nil) + super(parent,keys) + @clear = TkButton.new(self, + "text" => "Clear") + @add = TkButton.new(self, + "text" => "Add") + @search = TkButton.new(self, + "text" => "Search") + @delete = TkButton.new(self, + "text" => "Delete") + for w in [@clear,@add,@search,@delete] + w.pack("side"=>"left", "padx"=>2) + end + end +end + +class RolodexMenuFrame < TkFrame + attr_reader :file_menu, :help_menu, :file, :help + + def initialize(parent,keys=nil) + super(parent,keys) + configure("relief"=>"raised", + "borderwidth"=>1) + + @file = TkMenubutton.new(self, + "text"=>"File", + "underline"=>0) + @file_menu = TkMenu.new(@file) + @file_menu.add("command", + "label" => "Load ...", + "command" => proc{fileAction}, + "underline" => 0) + @file_menu.add("command", + "label" => "Exit", + "command" => proc{$root.destroy}, + "underline" => 0) + @file.menu(@file_menu) + @file.pack("side"=>"left") + + @help = TkMenubutton.new(self, + "text"=>"Help", + "underline"=>0) + @help_menu = TkMenu.new(@help) + @help_menu.add("command", + "label"=>"On Context...", + "command"=>proc{show_help("context")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Help...", + "command"=>proc{show_help("help")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Window...", + "command"=>proc{show_help("window")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Keys...", + "command"=>proc{show_help("keys")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On version...", + "command"=>proc{show_help("version")}, + "underline"=>3) + @help.menu(@help_menu) + @help.pack("side"=>"right") + end +end + +class Rolodex < TkRoot + attr_reader :frame, :buttons, :menu + + def initialize(*args) + super(*args) + @frame = RolodexFrame.new(self) + @frame.pack("side"=>"top", + "fill"=>"y", + "anchor"=>"center") + @buttons = RolodexButtons.new(self) + @buttons.pack("side"=>"bottom", + "pady"=>2, + "anchor"=>"center") + @menu = RolodexMenuFrame.new(self) + @menu.pack("before"=>@frame, + "side"=>"top", + "fill"=>"x") + end +end + +$root = Rolodex.new + +$root.buttons.delete.configure("command"=>proc{deleteAction}) +$root.buttons.add.configure("command"=>proc{addAction}) +$root.buttons.clear.configure("command"=>proc{clearAction}) +$root.buttons.search.configure("command"=>proc{addAction; fillCard}) + +$root.buttons.clear.configure("text"=>"Clear Ctrl+C") +$root.bind("Control-c",proc{clearAction}) + +$root.buttons.add.configure("text"=>"Add Ctrl+A") +$root.bind("Control-a",proc{addAction}) + +$root.buttons.search.configure("text"=>"Search Ctrl+S") +$root.bind("Control-s",proc{addAction; fillCard}) + +$root.buttons.delete.configure("text"=>"Delete... Ctrl+D") +$root.bind("Control-d",proc{deleteAction}) + +$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F") +$root.bind("Control-f",proc{fileAction}) + +$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q") +$root.bind("Control-q",proc{$root.destroy}) + +$root.frame.entry[1].focus + +$root.bind("Any-F1", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) +$root.bind("Any-Help", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) + + +$helpTopics = {} + +$helpTopics[$root.menu.file] = <:both, :expand=>true) + +# label +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button."){ + pack('side'=>'top') +} + +# frame +$ruler_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $ruler_demo + $ruler_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'ruler'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$ruler_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas +$ruler_canvas = TkCanvas.new(base_frame, 'width'=>'14.8c', 'height'=>'2.5c') +$ruler_canvas.pack('side'=>'top', 'fill'=>'x') + +# +unless Struct.const_defined?("RulerInfo") + $demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y, + :top, :bottom, :size, :normalStyle, + :activeStyle, :deleteStyle).new +end +$demo_rulerInfo.grid = '.25c' +$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c') +$demo_rulerInfo.right = TkWinfo.fpixels($ruler_canvas, '13c') +$demo_rulerInfo.top = TkWinfo.fpixels($ruler_canvas, '1c') +$demo_rulerInfo.bottom = TkWinfo.fpixels($ruler_canvas, '1.5c') +$demo_rulerInfo.size = TkWinfo.fpixels($ruler_canvas, '.2c') +$demo_rulerInfo.normalStyle = {'fill'=>'black'} +if TkWinfo.depth($ruler_canvas) > 1 + $demo_rulerInfo.activeStyle = {'fill'=>'red', 'stipple'=>''} + $demo_rulerInfo.deleteStyle = {'fill'=>'red', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator)} +else + $demo_rulerInfo.activeStyle = {'fill'=>'black', 'stipple'=>''} + $demo_rulerInfo.deleteStyle = {'fill'=>'black', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator)} +end + +TkcLine.new($ruler_canvas, + '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1) +(0..11).each{|i| + x = i+1 + TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.25c", '1c', "#{x}.25c", '0.8c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.5c", '1c', "#{x}.5c", '0.7c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.75c", '1c', "#{x}.75c", '0.8c', 'width'=>1) + TkcText.new($ruler_canvas, "#{x}.15c", '0.75c', 'text'=>i, 'anchor'=>'sw') +} + +$rulerTag_well = TkcTag.new($ruler_canvas) +$ruler_canvas\ +.addtag_withtag($rulerTag_well, + TkcRectangle.new($ruler_canvas, + '13.2c', '1c', '13.8c', '0.5c', + 'outline'=>'black', + 'fill'=>($ruler_canvas\ + .configinfo('background'))[4]) ) +$ruler_canvas\ +.addtag_withtag($rulerTag_well, + rulerMkTab($ruler_canvas, + TkWinfo.pixels($ruler_canvas, '13.5c'), + TkWinfo.pixels($ruler_canvas, '.65c') ) ) + +$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.itembind('tab', '1', + proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.bind('B1-Motion', + proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)}) + +# rulerNewTab -- +# Does all the work of creating a tab stop, including creating the +# triangle object and adding tags to it to give it tab behavior. +# +# Arguments: +# c - The canvas window. +# x, y - The coordinates of the tab stop. + +def rulerNewTab(c,x,y) + v = $demo_rulerInfo + c.addtag_withtag('active', rulerMkTab(c,x,y)) + c.addtag_withtag('tab', 'active') + v.x = x + v.y = y + rulerMoveTab(c,x,y) +end + +# rulerSelectTab -- +# This method is invoked when mouse button 1 is pressed over +# a tab. It remembers information about the tab so that it can +# be dragged interactively. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse (identifies the point by +# which the tab was picked up for dragging). + +def rulerSelectTab(c,x,y) + v = $demo_rulerInfo + v.x = c.canvasx(x, v.grid) + v.y = v.top+2 + c.addtag_withtag('active', 'current') + c.itemconfigure('active', v.activeStyle) + c.raise('active') +end + +# rulerMoveTab -- +# This method is invoked during mouse motion events to drag a tab. +# It adjusts the position of the tab, and changes its appearance if +# it is about to be dragged out of the ruler. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse. + +def rulerMoveTab(c,x,y) + v = $demo_rulerInfo + return if c.find_withtag('active') == [] + cx = c.canvasx(x,v.grid) + cy = c.canvasy(y) + cx = v.left if cx < v.left + cx = v.right if cx > v.right + if (cy >= v.top && cy <= v.bottom) + cy = v.top+2 + c.itemconfigure('active', v.activeStyle) + else + cy = cy-v.size-2 + c.itemconfigure('active', v.deleteStyle) + end + c.move('active', cx-v.x, cy-v.y) + v.x = cx + v.y = cy +end + +# rulerReleaseTab -- +# This method is invoked during button release events that end +# a tab drag operation. It deselects the tab and deletes the tab if +# it was dragged out of the ruler. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse. + +def rulerReleaseTab(c) + v = $demo_rulerInfo + return if c.find_withtag('active') == [] + if v.y != v.top+2 + c.delete('active') + else + c.itemconfigure('active', v.normalStyle) + c.dtag('active') + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/sayings.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/sayings.rb new file mode 100644 index 0000000..06ec7c1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/sayings.rb @@ -0,0 +1,106 @@ +# sayings.rb +# +# This demonstration script creates a listbox that can be scrolled +# both horizontally and vertically. It displays a collection of +# well-known sayings. +# +# listbox widget demo 'sayings' (called by 'widget') +# + +# toplevel widget +if defined?($sayings_demo) && $sayings_demo + $sayings_demo.destroy + $sayings_demo = nil +end + +# demo toplevel widget +$sayings_demo = TkToplevel.new {|w| + title("Listbox Demonstration (well-known sayings)") + iconname("sayings") + positionWindow(w) +} + +base_frame = TkFrame.new($sayings_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "The listbox below contains a collection of well-known sayings. You can scan the list using either of the scrollbars or by dragging in the listbox window with button 2 pressed." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $sayings_demo + $sayings_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'sayings'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +sayings_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + sv = TkScrollbar.new(w) + sh = TkScrollbar.new(w, 'orient'=>'horizontal') + sayings_lbox = TkListbox.new(w) { + setgrid 1 + width 20 + height 10 + yscrollcommand proc{|first,last| sv.set first,last} + xscrollcommand proc{|first,last| sh.set first,last} + } + sv.command(proc{|*args| sayings_lbox.yview(*args)}) + sh.command(proc{|*args| sayings_lbox.xview(*args)}) + + if $tk_version =~ /^4\.[01]/ + sv.pack('side'=>'right', 'fill'=>'y') + sh.pack('side'=>'bottom', 'fill'=>'x') + sayings_lbox.pack('expand'=>'yes', 'fill'=>'y') + + else + sayings_lbox.grid('row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + sv.grid('row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + sh.grid('row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0) + end + +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +sayings_lbox.insert(0, +"Waste not, want not", +"Early to bed and early to rise makes a man healthy, wealthy, and wise", +"Ask not what your country can do for you, ask what you can do for your country", +"I shall return", +"NOT", +"A picture is worth a thousand words", +"User interfaces are hard to build", +"Thou shalt not steal", +"A penny for your thoughts", +"Fool me once, shame on you; fool me twice, shame on me", +"Every cloud has a silver lining", +"Where there's smoke there's fire", +"It takes one to know one", +"Curiosity killed the cat; but satisfaction brought it back", +"Take this job and shove it", +"Up a creek without a paddle", +"I'm mad as hell and I'm not going to take it any more", +"An apple a day keeps the doctor away", +"Don't look a gift horse in the mouth" +) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/search.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/search.rb new file mode 100644 index 0000000..e1fc565 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/search.rb @@ -0,0 +1,187 @@ +# search.rb +# +# This demonstration script creates a collection of widgets that +# allow you to load a file into a text widget, then perform searches +# on that file. +# +# Text Search widget demo (called by 'widget') +# + +# textLoadFile -- +# This method below loads a file into a text widget, discarding +# the previous contents of the widget. Tags for the old widget are +# not affected, however. +# +# Arguments: +# w - The window into which to load the file. Must be a +# text widget. +# file - The name of the file to load. Must be readable. + +def textLoadFile(w,file) + w.delete('1.0', 'end') + f = open(file, 'r') + while(!f.eof?) + w.insert('end', f.read(1000)) + end + f.close +end + +# textSearch -- +# Search for all instances of a given string in a text widget and +# apply a given tag to each instance found. +# +# Arguments: +# w - The window in which to search. Must be a text widget. +# string - The string to search for. The search is done using +# exact matching only; no special characters. +# tag - Tag to apply to each instance of a matching string. + +def textSearch(w, string, tag) + tag.remove('0.0', 'end') + return if string == "" + cur = '1.0' + loop { + cur, len = w.search_with_length(string, cur, 'end') + break if cur == "" + tag.add(cur, "#{cur} + #{len} char") + cur = w.index("#{cur} + #{len} char") + } +end + +# textToggle -- +# This method is invoked repeatedly to invoke two commands at +# periodic intervals. It normally reschedules itself after each +# execution but if an error occurs (e.g. because the window was +# deleted) then it doesn't reschedule itself. +# +# Arguments: +# cmd1 - Command to execute when method is called. +# sleep1 - Ms to sleep after executing cmd1 before executing cmd2. +# cmd2 - Command to execute in the *next* invocation of this method. +# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again. + +def textToggle(cmd1,sleep1,cmd2,sleep2) + sleep_list = [sleep2, sleep1] + TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep}, + -1, cmd1, cmd2).start(sleep1) +end + +# toplevel widget +if defined?($search_demo) && $search_demo + $search_demo.destroy + $search_demo = nil +end + +# demo toplevel widget +$search_demo = TkToplevel.new {|w| + title("Text Demonstration - Search and Highlight") + iconname("search") + positionWindow(w) +} + +base_frame = TkFrame.new($search_demo).pack(:fill=>:both, :expand=>true) + +# frame +$search_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $search_demo + $search_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'search'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>'File name:', + 'width'=>13, 'anchor'=>'w').pack('side'=>'left') + $search_fileName = TkVariable.new + TkEntry.new(f, 'width'=>40, + 'textvariable'=>$search_fileName) { + pack('side'=>'left') + bind('Return', proc{textLoadFile($search_text, $search_fileName.value) + $search_string_entry.focus}) + focus + } + TkButton.new(f, 'text'=>'Load File', + 'command'=>proc{textLoadFile($search_text, + $search_fileName.value)})\ + .pack('side'=>'left', 'pady'=>5, 'padx'=>10) +}.pack('side'=>'top', 'fill'=>'x') + +TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>'Search string:', + 'width'=>13, 'anchor'=>'w').pack('side'=>'left') + $search_searchString = TkVariable.new + $search_string_entry = TkEntry.new(f, 'width'=>40, + 'textvariable'=>$search_searchString) { + pack('side'=>'left') + bind('Return', proc{textSearch($search_text, $search_searchString.value, + $search_Tag)}) + } + TkButton.new(f, 'text'=>'Highlight', + 'command'=>proc{textSearch($search_text, + $search_searchString.value, + $search_Tag)}) { + pack('side'=>'left', 'pady'=>5, 'padx'=>10) + } +}.pack('side'=>'top', 'fill'=>'x') + +$search_text = TkText.new(base_frame, 'setgrid'=>true, 'wrap'=>'word') {|t| + $search_Tag = TkTextTag.new(t) + TkScrollbar.new(base_frame, 'command'=>proc{|*args| t.yview(*args)}) {|sc| + t.yscrollcommand(proc{|first,last| sc.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + pack('expand'=>'yes', 'fill'=>'both') +} + +# Set up display styles for text highlighting. + +if TkWinfo.depth($search_demo) > 1 + textToggle(proc{ + $search_Tag.configure('background'=>'#ce5555', + 'foreground'=>'white') + }, + 800, + proc{ + $search_Tag.configure('background'=>'', 'foreground'=>'') + }, + 200 ) +else + textToggle(proc{ + $search_Tag.configure('background'=>'black', + 'foreground'=>'white') + }, + 800, + proc{ + $search_Tag.configure('background'=>'', 'foreground'=>'') + }, + 200 ) +end +$search_text.insert('1.0', "\ +This window demonstrates how to use the tagging facilities in text \ +widgets to implement a searching mechanism. First, type a file name \ +in the top entry, then type or click on \"Load File\". Then \ +type a string in the lower entry and type or click on \ +\"Load File\". This will cause all of the instances of the string to \ +be tagged with the tag \"search\", and it will arrange for the tag\'s \ +display attributes to change to make all of the strings blink.") +$search_text.insert('end', "\ +The current directory to load a file is \"#{Dir.pwd}\".\ +") +$search_text.set_insert '0.0' + +$search_fileName.value = '' +$search_searchString.value = '' + +$search_text.width = 60 +$search_text.height = 20 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/spin.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/spin.rb new file mode 100644 index 0000000..c2a3a89 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/spin.rb @@ -0,0 +1,65 @@ +# spin.rb -- +# +# This demonstration script creates several spinbox widgets. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($spin_demo) && $spin_demo + $spin_demo.destroy + $spin_demo = nil +end + +$spin_demo = TkToplevel.new {|w| + title("Spinbox Demonstration") + iconname("spin") + positionWindow(w) +} + +base_frame = TkFrame.new($spin_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top) +Three different spin-boxes are displayed below. \ +You can add characters by pointing, clicking and typing. \ +The normal Motif editing characters are supported, along with \ +many Emacs bindings. For example, Backspace and Control-h \ +delete the character to the left of the insertion cursor and \ +Delete and Control-d delete the chararacter to the right of the \ +insertion cursor. For values that are too large to fit in the \ +window all at once, you can scan through the value by dragging \ +with mouse button2 pressed. Note that the first spin-box will \ +only permit you to type in integers, and the third selects from \ +a list of Australian cities. +If your Tk library linked to Ruby doesn't include a 'spinbox' widget, \ +this demo doesn't work. Please use later version of Tk \ +which supports a 'spinbox' widget. +EOL + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $spin_demo.destroy + $spin_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'spin' + }).pack(:side=>:left, :expand=>true) +} + +australianCities = [ + 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide', + 'Brisbane', 'Hobart', 'Darwin', 'Alice Springs' +] + +[ + TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key, + :validatecommand=>[ + proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' + ]), + TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5, + :format=>'%05.2f', :width=>10), + TkSpinbox.new(base_frame, :values=>australianCities, :width=>10) +].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/square b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/square new file mode 100644 index 0000000..00bfde5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/square @@ -0,0 +1,81 @@ +#!/usr/bin/env ruby + +# square -- +# This script generates a demo application containing only +# a "square" widget. It's only usable if Tk has been compiled +# with tkSquare.c and with the -DSQUARE_DEMO compiler switch. +# This demo arranges the following bindings for the widget: +# +# Button-1 press/drag: moves square to mouse +# "a": toggle size animation on/off +# + +require 'tk' +require 'tkafter' + +class TkSquare'yes', 'fill'=>'both') + bind('1', proc{|x,y| center(x,y)}, '%s %y') + bind('B1-Motion', proc{|x,y| center(x,y)}, '%s %y') + bind('a', proc{animate}) + focus +} +TkRoot.new.minsize(1,1) + +# The procedure below centers the square on a given position. + +def center(x,y) + a = $s.size + $s.position(x-(a/2), y-(a/2)) +end + +# The procedures below provide a simple form of animation where +# the box changes size in a pulsing pattern: larger, smaller, larger, +# and so on. + +$inc = 0 + +def timer_proc + a = $s.size + return if $inc == 0 + $inc = -3 if a >= 40 + $inc = 3 if a <= 10 + $s.size(a+$inc) +end + +$timer = TkAfter.new(30, -1, proc{timer_proc}) + +def animate + if $inc == 0 + $inc = 3 + $timer.start + else + $inc = 0 + $timer.stop + end +end + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/states.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/states.rb new file mode 100644 index 0000000..add0e84 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/states.rb @@ -0,0 +1,80 @@ +# states.rb +# +# This demonstration script creates a listbox widget that displays +# the names of the 50 states in the United States of America. +# +# listbox widget demo 'states' (called by 'widget') +# + +# toplevel widget +if defined?($states_demo) && $states_demo + $states_demo.destroy + $states_demo = nil +end + +# demo toplevel widget +$states_demo = TkToplevel.new {|w| + title("Listbox Demonstration (states)") + iconname("states") + positionWindow(w) +} + +base_frame = TkFrame.new($states_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "A listbox containing the 50 states is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by scanning. To scan, press button 2 in the widget and drag up or down." +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $states_demo + $states_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'states'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +states_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>'.5c') {|w| + s = TkScrollbar.new(w) + states_lbox = TkListbox.new(w) { + setgrid 1 + height 12 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| states_lbox.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + states_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both') +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +ins_data = [ + 'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', + 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', + 'Hawaii', 'Idaho', 'Illinois', + 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', + 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', + 'Montana', 'Nebraska', 'Nevada', 'New_Hampshire', 'New_Jersey', 'New_Mexico', + 'New_York', 'North_Carolina', 'North_Dakota', + 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode_Island', + 'South_Carolina', 'South_Dakota', + 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', + 'West_Virginia', 'Wisconsin', 'Wyoming' +] + +states_lbox.insert(0, *ins_data) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/style.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/style.rb new file mode 100644 index 0000000..c2fed23 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/style.rb @@ -0,0 +1,231 @@ +# style.rb +# +# This demonstration script creates a text widget that illustrates the +# various display styles that may be set for tags. +# +# text (display styles) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($style_demo) && $style_demo + $style_demo.destroy + $style_demo = nil +end + +# demo toplevel widget +$style_demo = TkToplevel.new {|w| + title("Text Demonstration - Display Styles") + iconname("style") + positionWindow(w) +} + +base_frame = TkFrame.new($style_demo).pack(:fill=>:both, :expand=>true) + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $style_demo + $style_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'style'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# text +txt = TkText.new(base_frame){|t| + # + setgrid 'true' + #width 70 + #height 32 + wrap 'word' + font $font + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # + family = 'Courier' + + if $tk_version =~ /^4.*/ + style_tag_bold = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-O-Normal--*-120-*-*-*-*-*-*') + style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font) + style_tag_verybig = TkTextTag.new(t, 'font'=>'-*-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*') + # style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font) + style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*') + else + style_tag_bold = TkTextTag.new(t, 'font'=>[family, 12, :bold, :italic]) + style_tag_big = TkTextTag.new(t, 'font'=>[family, 14, :bold]) + style_tag_verybig = TkTextTag.new(t, 'font'=>['Helvetica', 24, :bold]) + style_tag_small = TkTextTag.new(t, 'font'=>'Times 8 bold') + end +### +# case($tk_version) +# when /^4.*/ +# style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font) +# style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font) +# when /^8.*/ +# unless $style_demo_do_first +# $style_demo_do_first = true +# Tk.tk_call('font', 'create', '@bigascii', +# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*') +# Tk.tk_call('font', 'create', '@smallascii', +# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*') +# Tk.tk_call('font', 'create', '@cBigFont', +# '-compound', '@bigascii @msg_knj') +# Tk.tk_call('font', 'create', '@cSmallFont', +# '-compound', '@smallascii @kanji') +# end +# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont') +# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont') +# end + + # + if TkWinfo.depth($root).to_i > 1 + style_tag_color1 = TkTextTag.new(t, 'background'=>'#a0b7ce') + style_tag_color2 = TkTextTag.new(t, 'foreground'=>'red') + style_tag_raised = TkTextTag.new(t, 'relief'=>'raised', 'borderwidth'=>1) + style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1) + else + style_tag_color1 = TkTextTag.new(t, 'background'=>'black', + 'foreground'=>'white') + style_tag_color2 = TkTextTag.new(t, 'background'=>'black', + 'foreground'=>'white') + style_tag_raised = TkTextTag.new(t, 'background'=>'white', + 'relief'=>'raised', 'borderwidth'=>1) + style_tag_sunken = TkTextTag.new(t, 'background'=>'white', + 'relief'=>'sunken', 'borderwidth'=>1) + end + + # + if $tk_version =~ /^4\.[01]/ + style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black', + 'borderwidth'=>0, + 'bgstipple'=>'gray25') + else + style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black', + 'borderwidth'=>0, + 'bgstipple'=>'gray12') + end + style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50') + style_tag_underline = TkTextTag.new(t, 'underline'=>'on') + style_tag_overstrike = TkTextTag.new(t, 'overstrike'=>'on') + style_tag_right = TkTextTag.new(t, 'justify'=>'right') + style_tag_center = TkTextTag.new(t, 'justify'=>'center') + if $tk_version =~ /^4.*/ + style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*') + style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*') + else + style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>[family, 10]) + style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>[family, 10]) + end + style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m', + 'rmargin'=>'10m') + style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p', + 'lmargin1'=>'12m', 'lmargin2'=>'6m', + 'rmargin'=>'10m') + + # + insert('end', 'Text widgets like this one allow you to display information in a +variety of styles. Display styles are controlled using a mechanism +called ') + insert('end', 'tags', style_tag_big) + insert('end', '. Tags are just textual names that you can apply to one +or more ranges of characters within a text widget. You can configure +tags with various display styles. If you do this, then the tagged +characters will be displayed with the styles you chose. The +available display styles are: +') + insert('end', "\n1. Font.", style_tag_big) + insert('end', " You can choose any X font, ") + insert('end', "large", style_tag_verybig) + insert('end', " or ") + insert('end', "small", style_tag_small) + insert('end', ".\n") + insert('end', "\n2. Color.", style_tag_big) + insert('end', " You can change either the ") + insert('end', "background", style_tag_color1) + insert('end', " or ") + insert('end', "foreground", style_tag_color2) + insert('end', "\ncolor, or ") + insert('end', "both", style_tag_color1, style_tag_color2) + insert('end', ".\n") + insert('end', "\n3. Stippling.", style_tag_big) + insert('end', " You can cause either the ") + insert('end', "background", style_tag_bgstipple) + insert('end', " or ") + insert('end', "foreground", style_tag_fgstipple) + insert('end', "\ninformation to be drawn with a stipple fill instead of a solid fill.\n") + insert('end', "\n4. Underlining.", style_tag_big) + insert('end', " You can ") + insert('end', "underline", style_tag_underline) + insert('end', " ranges of text.\n") + insert('end', "\n5. Overstrikes.", style_tag_big) + insert('end', " You can ") + insert('end', "draw lines through", style_tag_overstrike) + insert('end', " ranges of text.\n") + insert('end', "\n6. 3-D effects.", style_tag_big) + insert('end', " You can arrange for the background to be drawn\nwith a border that makes characters appear either\n") + insert('end', "raised", style_tag_raised) + insert('end', " or ") + insert('end', "sunken", style_tag_sunken) + insert('end', ".\n") + insert('end', "\n7. Justification.", style_tag_big) + insert('end', " You can arrange for lines to be displayed\n") + insert('end', "left-justified,\n") + insert('end', "right-justified, or\n", style_tag_right) + insert('end', "centered.\n", style_tag_center) + insert('end', "\n8. Superscripts and subscripts.", style_tag_big) + insert('end', " You can control the vertical\n") + insert('end', "position of text to generate superscript effects like 10") + insert('end', "n", style_tag_super) + insert('end', " or\nsubscript effects like X") + insert('end', "i", style_tag_sub) + insert('end', ".\n") + insert('end', "\n9. Margins.", style_tag_big) + insert('end', " You can control the amount of extra space left") + insert('end', " on\neach side of the text:\n") + insert('end', "This paragraph is an example of the use of ", style_tag_margins) + insert('end', "margins. It consists of a single line of text ", style_tag_margins) + insert('end', "that wraps around on the screen. There are two ", style_tag_margins) + insert('end', "separate left margin values, one for the first ", style_tag_margins) + insert('end', "display line associated with the text line, ", style_tag_margins) + insert('end', "and one for the subsequent display lines, which ", style_tag_margins) + insert('end', "occur because of wrapping. There is also a ", style_tag_margins) + insert('end', "separate specification for the right margin, ", style_tag_margins) + insert('end', "which is used to choose wrap points for lines.\n", style_tag_margins) + insert('end', "\n10. Spacing.", style_tag_big) + insert('end', " You can control the spacing of lines with three\n") + insert('end', "separate parameters. \"Spacing1\" tells how much ") + insert('end', "extra space to leave\nabove a line, \"spacing3\" ") + insert('end', "tells how much space to leave below a line,\nand ") + insert('end', "if a text line wraps, \"spacing2\" tells how much ") + insert('end', "space to leave\nbetween the display lines that ") + insert('end', "make up the text line.\n") + insert('end', "These indented paragraphs illustrate how spacing ", style_tag_spacing) + insert('end', "can be used. Each paragraph is actually a ", style_tag_spacing) + insert('end', "single line in the text widget, which is ", style_tag_spacing) + insert('end', "word-wrapped by the widget.\n", style_tag_spacing) + insert('end', "Spacing1 is set to 10 points for this text, ", style_tag_spacing) + insert('end', "which results in relatively large gaps between ", style_tag_spacing) + insert('end', "the paragraphs. Spacing2 is set to 2 points, ", style_tag_spacing) + insert('end', "which results in just a bit of extra space ", style_tag_spacing) + insert('end', "within a pararaph. Spacing3 isn't used ", style_tag_spacing) + insert('end', "in this example.\n", style_tag_spacing) + insert('end', "To see where the space is, select ranges of ", style_tag_spacing) + insert('end', "text within these paragraphs. The selection ", style_tag_spacing) + insert('end', "highlight will cover the extra space.", style_tag_spacing) + +} + +txt.width 70 +txt.height 32 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tcolor b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tcolor new file mode 100644 index 0000000..3c63d67 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tcolor @@ -0,0 +1,526 @@ +#!/usr/bin/env ruby +# +# tcolor -- +# simple color editor which supports RGB, HSB and CYM color space +# +# Copyright (C) 1998 Takaaki Tateishi(ttate@jaist.ac.jp) +# last update: Thu Jun 18 06:32:35 JST 1998 +# + +require "tk" + + +# use TkVariable instance for the variable which is changed by Tk interpreter + +$colorSpace = TkVariable.new(:rgb) +$master = nil +$red = 65535 +$green = 0 +$blue = 0 +$color = "#ffff00000000" +$updating = TkVariable.new(0) +$autoUpdate = TkVariable.new(1) +$name = TkVariable.new($color) +$command = TkVariable.new("print(%%,\"\n\")") +# $command = TkVariable.new("") +$label1 = TkVariable.new("label1") +$label2 = TkVariable.new("label2") +$label3 = TkVariable.new("label3") + + +# setup the entry of the resourc database +if (TkVarAccess.new('tcl_platform')['platform'] == 'unix') + TkOptionDB.add('*Entry.background', 'white') +end + + +# methods for events + +def rgbToHsv(red,green,blue) + + if ( red > green ) + max = red + min = green + else + max = green + min = red + end + + if ( blue > max ) + max = blue + else + if ( blue < min ) + min = blue + end + end + + range = max - min + + if ( max == 0 ) + sat = 0.0 + else + sat = (max-min)/max + end + + if ( sat == 0 ) + hue = 0.0 + else + rc = (max-red)/range + gc = (max-green)/range + bc = (max-blue)/range + if ( red == max ) + hue = 0.166667 * (bc - gc) + else + if ( green == max ) + hue = 0.166667 * (2.0 + rc - bc) + else + hue = 0.166667 * (4.0 + gc - rc) + end + end + if ( hue < 0.0 ) + hue = hue + 1.0 + end + end + + [hue,sat,max/65535] +end + + +def hsbToRgb(hue,sat,value) + v = 65535.0 * value + if( sat == 0 ) + ans = [v,v,v] + else + hue = hue*6.0 + if ( hue >= 6 ) + hue = 0.0 + end + i = hue.to_i + f = hue - i + p = 65535.0 * value * (1.0 - sat) + q = 65535.0 * value * (1.0 - (sat * f)) + t = 65535.0 * value * (1.0 - (sat * (1.0 - f))) + case i + when 0 + ans = [v,t,p] + when 1 + ans = [q,v,p] + when 2 + ans = [p,v,t] + when 3 + ans = [p,q,v] + when 4 + ans = [t,p,v] + when 5 + ans = [v,p,q] + else + raise(eException,"i value #{i} is out of range") + end + end + return ans +end + + +def _null_binding + Module.new.instance_eval{binding} +end +private :_null_binding + +def doUpdate + newCmd = $command.to_s.gsub("%%","\"#{$color}\"") + eval(newCmd, _null_binding) +end + + +def tc_scaleChanged + if( $updating.to_i == 1 ) + return + end + + $master = :scale if $master == nil + + scale1 = $root.middle.middle.scale1 + scale2 = $root.middle.middle.scale2 + scale3 = $root.middle.middle.scale3 + + case $colorSpace.value.intern + when :rgb + $red = (scale1.get * 65.535).to_i + $green = (scale2.get * 65.535).to_i + $blue = (scale3.get * 65.535).to_i + when :cmy + $red = (65535 - scale1.get * 65.535).to_i + $green = (65535 - scale2.get * 65.535).to_i + $blue = (65535 - scale3.get * 65.535).to_i + when :hsb + list = hsbToRgb(scale1.get / 1000.0, + scale2.get / 1000.0, + scale3.get / 1000.0) + $red = list[0] + $green = list[1] + $blue = list[2] + else + raise(Exception,"unknown colorSpace") + end + $color = format("#%04x%04x%04x",$red.to_i,$green.to_i,$blue.to_i) + $name.value = $color if $master == :scale + $root.middle.right.set_color($color) + if( $autoUpdate.to_i == 1 ) + doUpdate + end + Tk.update(true) + $master = nil if $master == :scale +end + + +def tc_setScales + $updating.value = 1 + + scale1 = $root.middle.middle.scale1 + scale2 = $root.middle.middle.scale2 + scale3 = $root.middle.middle.scale3 + + case $colorSpace.value.intern + when :rgb + scale1.set($red / 65.535) + scale2.set($green / 65.535) + scale3.set($blue / 65.535) + when :cmy + scale1.set((65535 - $red) / 65.535) + scale2.set((65535 - $green) / 65.535) + scale3.set((65535 - $blue) / 65.535) + when :hsb + list = rgbToHsv($red,$green,$blue) + scale1.set( list[0] * 1000.0 ) + scale2.set( list[1] * 1000.0 ) + scale3.set( list[2] * 1000.0 ) + else + raise(Exception,"unknown colorSpace") + end + + $updating.value = 0 +end + + +def tc_loadNamedColor(name) + $name.value = name + $master = :name if $master == nil + if name[0,1] != "#" + list = TkWinfo.rgb($root.middle.right.swatch,name) + $red = list[0] + $green = list[1] + $blue = list[2] + else + case name.length + when 4 + fmt = /#(.{1})(.{1})(.{1})/ + shift = 12 + when 7 + fmt = /#(.{2})(.{2})(.{2})/ + shift = 8 + when 10 + fmt = /#(.{3})(.{3})(.{3})/ + shift = 4 + when 13 + fmt = /#(.{4})(.{4})(.{4})/ + shift = 0 + else + raise(eException,"syntax error in color name \"#{name}\"") + end + name.scan(fmt){|strlist| + if strlist.length != 3 + raise(eException,"syntax error in color name \"#{name}\"") + end + $red = strlist[0].hex + $green = strlist[1].hex + $blue = strlist[2].hex + } + $red = $red << shift + $green = $green << shift + $blue = $blue << shift + end + + tc_setScales + $color = format("#%04x%04x%04x",$red,$green,$blue) + $root.middle.right.set_color($color) + if $autoUpdate.to_i == 1 + doUpdate + end + Tk.update(true) + $master = nil if $master == :name +end + + +def changeColorSpace(space) + case space + when :rgb + $label1.value = "Red" + $label2.value = "Green" + $label3.value = "Blue" + when :cmy + $label1.value = "Cyan" + $label2.value = "Magenta" + $label3.value = "Yellow" + when :hsb + $label1.value = "Hue" + $label2.value = "Saturation" + $label3.value = "Brightness" + end + tc_setScales +end + + +# menu + +class TkColorMenuFrame"raised", + "borderwidth"=>"2") + + # File menubutton + @file = TkMenubutton.new(self){|button| + + # File menu + @file_menu = TkMenu.new(button){ + add "radio", + "label" => "RGB color space", + "variable" => $colorSpace, + "value" => :rgb, + "underline" => "0", + "command" => proc{changeColorSpace(:rgb)} + add "radio", + "label" => "CMY color space", + "variable" => $colorSpace, + "value" => :cmy, + "underline" => "0", + "command" => proc{changeColorSpace(:cmy)} + add "radio", + "label" => "HSB color space", + "variable" => $colorSpace, + "value" => :hsb, + "underline" => "0", + "command" => proc{changeColorSpace(:hsb)} + add "separator" + add "radio", + "label" => "Automatic updates", + "variable" => $autoUpdate, + "value" => "1", + "underline" => "0" + add "radio", + "label" => "Manual updates", + "variable" => $autoUpdate, + "value" => "0", + "underline" => "0" + add "separator" + add "command", + "label" => "Exit program", + "underline" => "0", + "command" => proc{exit} + } + + # assign File menu to File button + menu @file_menu + + text "File" + underline "0" + }.pack("side"=>"left") + + self + end +end + + +# bottom frame +class TkColorBotFrame "raised", + "borderwidth"=> 2) + + @commandLabel = TkLabel.new(self, + "text"=> "Command:") + @command = TkEntry.new(self, + "relief"=> "sunken", + "borderwidth"=> "2", + "textvariable"=> $command, + "font"=> "-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @update = TkButton.new(self, + "text"=> "Update", + "command"=> proc{doUpdate}) + @commandLabel.pack("side"=>"left") + @update.pack("side"=>"right","pady"=>".1c","padx"=>".25c") + @command.pack("expand"=>"yes","fill"=>"x","ipadx"=>".25c") + + self + end +end + + +# left side frame of middle level +class TkColorMiddleLeftFrame"vertical", + "relief"=>"sunken", + "borderwidth"=>"2") + @scroll.pack("side"=>"right","fill"=>"y") + @names = TkListbox.new(self, + "width"=>"20", + "height"=>"12", + "yscrollcommand"=> proc{|first,last| @scroll.set first,last}, + "relief"=>"sunken", + "borderwidth"=>"2", + "exportselection"=>"false") + @scroll.command(proc{|*args| @names.yview(*args)}) + @names.bind("Double-1",proc{ + tc_loadNamedColor(@names.get(@names.curselection))}) + @names.pack("side"=>"left") + while (line = f.gets) + line.chop! + linelist = line.split(/[ \t]+/) + if linelist.length == 4 + @names.insert("end",linelist[3]) + end + end + f.close + break + end + + self + end +end + + +# middle frame of middle level +class TkColorMiddleMiddleFrame"top","expand"=>"yes") + end + @f4.pack("side"=>"top","expand"=>"yes","fill"=>"x") + + @label1 = TkLabel.new(self,"textvariable"=>$label1) + @scale1 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale1.pack("side"=>"top","anchor"=>"w") + @label1.pack("side"=>"top","anchor"=>"w") + + @label2 = TkLabel.new(self,"textvariable"=>$label2) + @scale2 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale2.pack("side"=>"top","anchor"=>"w") + @label2.pack("side"=>"top","anchor"=>"w") + + @label3 = TkLabel.new(self,"textvariable"=>$label3) + @scale3 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale3.pack("side"=>"top","anchor"=>"w") + @label3.pack("side"=>"top","anchor"=>"w") + + @nameLabel = TkLabel.new(self,"text"=>"Name:") + @name = TkEntry.new(self,"relief"=>"sunken","borderwidth"=>"2", + "textvariable"=>$name,"width"=>"10", + "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @nameLabel.pack("side"=>"left") + @name.pack("side"=>"right", "expand"=>"1", "fill"=>"x") + @name.bind("Return",proc{tc_loadNamedColor $name.to_s}) + + self + end +end + + +class TkColorMiddleRightFrame"2c", "height"=>"5c", + "background"=>$color) + @value = TkLabel.new(self, + "text"=>$color, + "width"=>"13", + "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @swatch.pack("side"=>"top","expand"=>"yes","fill"=>"both") + @value.pack("side"=>"bottom","pady"=>".25c") + + self + end + + def set_color(color) + @swatch["background"] = color + @value["text"] = color + end +end + + + +# middle level frame +class TkColorMiddleFrame "raised", + "borderwidth"=> "2") + + @left = TkColorMiddleLeftFrame.new(self) + @left.pack("side"=>"left","padx"=>".25c","pady"=>".25c") + + @middle = TkColorMiddleMiddleFrame.new(self) + @middle.pack("side"=>"left","expand"=>"yes","fill"=>"y") + + @right = TkColorMiddleRightFrame.new(self) + @right.pack("side"=>"left","padx"=>".25c","pady"=>".25c","anchor"=>"s") + + self + end +end + + +class TkColor"top", "fill"=>"x") + + @bottom = TkColorBotFrame.new(self) + @bottom.pack("side"=>"bottom","fill"=>"x") + + @middle = TkColorMiddleFrame.new(self) + @middle.pack("side"=>"top","fill"=>"both") + + self + end +end + + +$root = TkColor.new +changeColorSpace :rgb + +# start eventloop +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/text.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/text.rb new file mode 100644 index 0000000..3ce8cdf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/text.rb @@ -0,0 +1,128 @@ +# text.rb +# +# This demonstration script creates a text widget that describes +# the basic editing functions. +# +# text (basic facilities) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($text_demo) && $text_demo + $text_demo.destroy + $text_demo = nil +end + +# demo toplevel widget +$text_demo = TkToplevel.new {|w| + title("Text Demonstration - Basic Facilities") + iconname("text") + positionWindow(w) +} + +base_frame = TkFrame.new($text_demo).pack(:fill=>:both, :expand=>true) + +# version check +if ((Tk::TK_VERSION.split('.').collect{|n| n.to_i} <=> [8,4]) < 0) + undo_support = false +else + undo_support = true +end + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $text_demo + $text_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'text'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# text +TkText.new(base_frame){|t| + relief 'sunken' + bd 2 + setgrid 1 + height 30 + if undo_support + undo true + autoseparators true + end + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # + insert('0.0', <:both, :expand=>true) + +count = [0] + +## Define a widget that we peer from; it won't ever actually be shown though +first = TkText.new(base_frame, :widgetname=>"text#{count[0] += 1}") +first.insert :end,"This is a coupled pair of text widgets; they are peers to " +first.insert :end,"each other. They have the same underlying data model, but " +first.insert :end,"can show different locations, have different current edit " +first.insert :end,"locations, and have different selections. You can also " +first.insert :end,"create additional peers of any of these text widgets using " +first.insert :end,"the Make Peer button beside the text widget to clone, and " +first.insert :end,"delete a particular peer widget using the Delete Peer " +first.insert :end,"button." + +Tk.update_idletasks ## for 'first' widget + +## Procedures to make and kill clones; most of this is just so that the demo +## looks nice... +def makeClone(count, win, txt) + cnt = (count[0] += 1) + peer = TkText::Peer.new(txt, win, :widgetname=>"text#{cnt}") + sbar = TkScrollbar.new(win, :widgetname=>"sb#{cnt}") + peer.yscrollbar sbar + b1 = TkButton.new(win, :widgetname=>"clone#{cnt}", :text=>'Make Peer', + :command=>proc{makeClone(count, win, peer)}) + b2 = TkButton.new(win, :widgetname=>"kill#{cnt}", :text=>'Delete Peer', + :command=>proc{killClone(win, cnt)}) + row = cnt * 2 + TkGrid.configure(peer, sbar, b1, :sticky=>'nsew', :row=>row) + TkGrid.configure('^', '^', b2, :sticky=>'nsew', :row=>(row+=1)) + TkGrid.configure(b1, b2, :sticky=>'new') + TkGrid.rowconfigure(win, b2, :weight=>1) +end + +def killClone(win, cnt) + Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}", + "#{win.path}.clone#{cnt}", "#{win.path}.kill#{cnt}") +end + +## Now set up the GUI +makeClone(count, base_frame, first) +makeClone(count, base_frame, first) +first.destroy + +## See Code / Dismiss buttons +TkFrame.new(base_frame){|f| + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $textpeer_demo.destroy + $textpeer_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'textpeer' + }).pack(:side=>:left, :expand=>true) + + TkGrid.configure(f, '-', '-', :sticky=>'ew', :row=>5000) +} +TkGrid.columnconfigure(base_frame, 0, :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/timer b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/timer new file mode 100644 index 0000000..58a41d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/timer @@ -0,0 +1,136 @@ +#!/usr/bin/env ruby +# +# timer -- +# This script generates a counter with start,stop and reset buttons. +# +# Copyright (C) 1998 Takaaki Tateishi (ttate@jaist.ac.jp) +# last update: Sat Jun 27 12:24:14 JST 1998 +# + +require "tk" +require "thread" +require "tkafter" + +$time = "0.00" +$m = Mutex.new +$loop = false + +def timer_stop + $loop = false + $m.lock +end + +def timer_start + $loop = true + $m.unlock +end + +def timer_reset + $time = "0.00" + $root.countframe.counter['text'] = $time +end + +def timer_loop + if $loop + $time = $time.succ + $root.countframe.counter['text'] = $time + end + Tk.after(10,proc{timer_loop}) +end + + +# +# thread version +# +def timer_loop2 + while true + $m.lock + $time = $time.succ + $root.countframe.counter['text'] = $time + sleep(0.01) + $m.unlock + end +end + +# +# TkAfter +# +def timer_loop3 + if $loop + $time = $time.succ + $root.countframe.counter['text'] = $time + end +end + + +class CountFrame < TkFrame + attr_reader :counter + + def initialize(parent=nil,keys=nil) + super(parent,keys) + @counter = TkLabel.new(self, + 'text'=>$time, + 'relief'=>'raised') + @counter.pack('fill'=>'both') + self + end +end + + +class ButtonFrame < TkFrame + def initialize(parent=nil,keys=nil) + super(parent,keys) +=begin + @stop = TkButton.new(self, + 'text'=>'Stop', + 'command'=>proc{timer_stop}) + @start = TkButton.new(self, + 'text'=>'Start', + 'command'=>proc{timer_start}) +=end + @stop = TkButton.new(self, :text=>'Stop', :state=>:disabled) + @start = TkButton.new(self, :text=>'Start', :state=>:normal) + + @stop.command proc{ + timer_stop + @start.state(:normal) + @stop.state(:disabled) + } + @start.command proc{ + timer_start + @stop.state(:normal) + @start.state(:disabled) + } + + @reset = TkButton.new(self, + 'text'=>'Reset', + 'command'=>proc{timer_reset}) + for b in [@stop,@start,@reset] + b.pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') + end + end +end + + +class Timer < TkRoot + attr_reader :countframe + + def initialize(*args) + super(*args) + @countframe = CountFrame.new(self) + @buttonframe = ButtonFrame.new(self) + for f in [@buttonframe,@countframe] + f.pack('side'=>'top', 'fill'=>'both') + end + self + end +end + + +$root = Timer.new + +#$thread = Thread.start{timer_loop2} +#timer_loop +TkAfter.new(10,-1,proc{timer_loop3}).start + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tkencoding.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tkencoding.rb new file mode 100644 index 0000000..727491a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tkencoding.rb @@ -0,0 +1,42 @@ +# -*- ruby -*- +# +# tkencoding.rb +# written by ttate@jaist.ac.jp + +class TclTkIp + alias __eval _eval + alias __invoke _invoke + private :__eval + private :__invoke + + attr_accessor :encoding + + def _eval(cmd) + if( @encoding ) + _fromUTF8(__eval(_toUTF8(cmd,@encoding)),@encoding) + else + __eval(cmd) + end + end + + def _invoke(*cmds) + if( @encoding ) + cmds = cmds.collect{|cmd| _toUTF8(cmd,@encoding)} + _fromUTF8(__invoke(*cmds),@encoding) + else + __invoke(*cmds) + end + end +end + +module Tk + INTERP = TkCore::INTERP + + def encoding=(name) + INTERP.encoding = name + end + + def encoding + INTERP.encoding + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/toolbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/toolbar.rb new file mode 100644 index 0000000..633c52c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/toolbar.rb @@ -0,0 +1,130 @@ +# toolbar.rb -- +# +# This demonstration script creates a toolbar that can be torn off. +# +# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($toolbar_demo) && $toolbar_demo + $toolbar_demo.destroy + $toolbar_demo = nil +end + +$toolbar_demo = TkToplevel.new {|w| + title("Ttk Menu Buttons") + iconname("toolbar") + positionWindow(w) +} + +base_frame = Ttk::Frame.new($toolbar_demo).pack(:fill=>:both, :expand=>true) + +if Tk.windowingsystem != 'aqua' + msg = Ttk::Label.new(base_frame, :wraplength=>'4i', + :text=>Tk::UTF8_String.new(<'4i', + :text=>Tk::UTF8_String.new(<'toolbar') # for window title +sep = Ttk::Separator.new(base_frame) +to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur') +if Tk.windowingsystem != 'aqua' + to = Ttk::Separator.new(to_base, :orient=>:vertical) + to2 = Ttk::Separator.new(to_base, :orient=>:vertical) + to.pack(:fill=>:y, :expand=>true, :padx=>2, :side=>:left) + to2.pack(:fill=>:y, :expand=>true, :side=>:left) +end + +contents = Ttk::Frame.new(tbar_base) +Tk.grid(to_base, contents, :sticky=>'nsew') +tbar_base.grid_columnconfigure(contents, :weight=>1) +contents.grid_columnconfigure(1000, :weight=>1) + +if Tk.windowingsystem != 'aqua' + ## Bindings so that the toolbar can be torn off and reattached + to_base.bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + to. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + to2. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + def tbar_base.tearoff(w, x, y) + on_win = TkWinfo.containing(x, y) + return unless (on_win && on_win.path =~ /^#{@path}(\.|$)/) + self.grid_remove + w.grid_remove + self.wm_manage + # self.wm_title('Toolbar') # if you don't want to use its widget name as a window title. + self.wm_protocol('WM_DELETE_WINDOW'){ self.untearoff(w) } + end + def tbar_base.untearoff(w) + self.wm_forget + w.grid + self.grid + end +end + +## Some content for the rest of the toplevel +text = TkText.new(base_frame, :width=>40, :height=>10) + +## Toolbar contents +tb_btn = Ttk::Button.new(tbar_base, :text=>'Button', :style=>'Toolbutton', + :command=>proc{text.insert(:end, "Button Pressed\n")}) +tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'Check', :style=>'Toolbutton', + :variable=>(check = TkVariable.new), + :command=>proc{ + text.insert(:end, "Check is #{check.value}\n") + }) +tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'Menu') +tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families, + :state=>:readonly) +tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn)) +menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")}) +menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")}) +menu.add(:command, :label=>'Example', + :command=>proc{text.insert(:end, "Example\n")}) +tb_combo.bind(''){ text.font.family = tb_combo.get } + +## Arrange contents +Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo, + :in=>contents, :padx=>2, :sticky=>'ns') +Tk.grid(tbar_base, :sticky=>'ew') +Tk.grid(sep, :sticky=>'ew') +Tk.grid(msg, :sticky=>'ew') +Tk.grid(text, :sticky=>'nsew') +base_frame.grid_rowconfigure(text, :weight=>1) +base_frame.grid_columnconfigure(text, :weight=>1) + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'toolbar'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $toolbar_demo.destroy + $toolbar_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + Tk.grid(frame, :sticky=>'ew') +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tree.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tree.rb new file mode 100644 index 0000000..0c7f0e7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/tree.rb @@ -0,0 +1,119 @@ +# tree.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# tree widget. +# +# based on "Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp" + +if defined?($tree_demo) && $tree_demo + $tree_demo.destroy + $tree_demo = nil +end + +$tree_demo = TkToplevel.new {|w| + title("Directory Browser") + iconname("tree") + positionWindow(w) +} + +base_frame = TkFrame.new($tree_demo).pack(:fill=>:both, :expand=>true) + +## Explanatory text +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', + :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6], + :text=><:x) +Ttk is the new Tk themed widget set. \ +One of the widgets it includes is a tree widget, \ +which allows the user to browse a hierarchical data-set such as a filesystem. \ +The tree widget not only allows for the tree part itself, \ +but it also supports an arbitrary number of additional columns \ +which can show additional data (in this case, the size of the files \ +found in your filesystem). \ +You can also change the width of the columns \ +by dragging the boundary between them. +EOL + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'tree'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $tree_demo.destroy + $tree_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +## Code to populate the roots of the tree (can be more than one on Windows) +def populate_roots(tree) + TkComm.simplelist(Tk.tk_call('file', 'volumes')).sort.each{|dir| + populate_tree(tree, tree.insert(nil, :end, :text=>dir, + :values=>[dir, 'directory'])) + } +end + +## Code to populate a node of the tree +def populate_tree(tree, node) + return if tree.get(node, :type) != 'directory' + + path = tree.get(node, :fullpath) + tree.delete(tree.children(node)) + Dir.glob("#{path}/*").sort.each{|f| + type = File.ftype(f) + id = tree.insert(node, :end, + :text=>File.basename(f), :values=>[f, type]).id + if type == 'directory' + ## Make it so that this node is openable + tree.insert(id, 0, :text=>'dummy') + tree.itemconfigure(id, :text=>File.basename(f)) + elsif type == 'file' + size = File.size(f) + if size >= 1024*1024*1024 + size = '%.1f GB' % (size.to_f/1024/1024/1024) + elsif size >= 1024*1024 + size = '%.1f MB' % (size.to_f/1024/1024) + elsif size >= 1024 + size = '%.1f KB' % (size.to_f/1024) + else + size = '%.1f bytes' % (size.to_f/1024) + end + tree.set(id, :size, size) + end + } + + # Stop this code from rerunning on the current node + tree.set(node, :type, 'processed_directory') +end + +## Create the tree and set it up +tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size), + :displaycolumns=>['size']) +if Tk.windowingsystem != 'aqua' + vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame)) +else + vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame)) +end + +tree.heading_configure('#0', :text=>'Directory Structure') +tree.heading_configure('size', :text=>'File Size') +tree.column_configure('size', :stretch=>0, :width=>70) +populate_roots(tree) +tree.bind('', '%W'){|w| populate_tree(w, w.focus_item)} + +## Arrange the tree and its scrollbars in the toplevel +container = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +container.lower +Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew') +Tk.grid(hsb, :in=>container, :sticky=>'nsew') +container.grid_columnconfigure(0, :weight=>1) +container.grid_rowconfigure(0, :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkbut.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkbut.rb new file mode 100644 index 0000000..b5780f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkbut.rb @@ -0,0 +1,139 @@ +# ttkbut.rb +# +# This demonstration script creates a toplevel window containing several +# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and +# radiobuttons. +# +# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkbut_demo) && $ttkbut_demo + $ttkbut_demo.destroy + $ttkbut_demo = nil +end + +$ttkbut_demo = TkToplevel.new {|w| + title("Simple Ttk Widgets") + iconname("ttkbut") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +Ttk is the new Tk themed widget set. This is a Ttk themed label, \ +and below are three groups of Ttk widgets in Ttk labelframes. \ +The first group are all buttons that set the current application theme \ +when pressed. The second group contains three sets of checkbuttons, \ +with a separator widget between the sets. Note that the "Enabled" \ +button controls whether all the other themed widgets in this toplevel are \ +in the disabled state. The third group has a collection of linked \ +radiobuttons. +EOL + +## Add buttons for setting the theme +buttons = Ttk::Labelframe.new(base_frame, :text=>'Buttons') +# Ttk::Style.theme_names.each{|theme| +# Ttk::Button.new(buttons, :text=>theme, +# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2) +# } +Ttk.themes.each{|theme| + Ttk::Button.new(buttons, :text=>theme, + :command=>proc{Ttk.set_theme theme}).pack(:pady=>2) +} + +## Helper procedure for the top checkbutton +def setState(root, value, *excepts) + return if excepts.member?(root) + + ## Non-Ttk widgets (e.g. the toplevel) will fail, so make it silent + begin + root.state = value + rescue + end + + ## Recursively invoke on all children of this root that are in the same + ## toplevel widget + root.winfo_children.each{|w| + setState(w, value, *excepts) if w.winfo_toplevel == root.winfo_toplevel + } +end + +## Set up the checkbutton group +checks = Ttk::Labelframe.new(base_frame, :text=>'Checkbuttons') +enabled = TkVariable.new(true) +e = Ttk::Checkbutton.new(checks, :text=>'Enabled', :variable=>enabled, + :command=>proc{ + setState($ttkbut_demo, + ((enabled.bool)? "!disabled" : "disabled"), + e) + }) + +## See ttk_widget(n) for other possible state flags +sep1 = Ttk::Separator.new(checks) +sep2 = Ttk::Separator.new(checks) + +cheese = TkVariable.new +tomato = TkVariable.new +basil = TkVariable.new +oregano = TkVariable.new + +c1 = Ttk::Checkbutton.new(checks, :text=>'Cheese', :variable=>cheese) +c2 = Ttk::Checkbutton.new(checks, :text=>'Tomato', :variable=>tomato) +c3 = Ttk::Checkbutton.new(checks, :text=>'Basil', :variable=>basil) +c4 = Ttk::Checkbutton.new(checks, :text=>'Oregano', :variable=>oregano) + +Tk.pack(e, sep1, c1, c2, sep2, c3, c4, :fill=>:x, :pady=>2) + +## Set up the radiobutton group +radios = Ttk::Labelframe.new(base_frame, :text=>'Radiobuttons') + +happyness = TkVariable.new + +r1 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Great', :value=>'great') +r2 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Good', :value=>'good') +r3 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Ok', :value=>'ok') +r4 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Poor', :value=>'poor') +r5 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Awful', :value=>'awful') + +Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2) + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Variables', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, ['enabled', enabled], + ['cheese', cheese], ['tomato', tomato], + ['basil', basil], ['oregano', oregano], + ['happyness', happyness]) + }), + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkbut'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $ttkbut_demo + $ttkbut_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x, :expand=>true) +} + +## Arrange things neatly +f = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +f.lower +Tk.grid(buttons, checks, radios, :in=>f, :sticky=>'nwe', :pady=>2, :padx=>3) +f.grid_columnconfigure([0, 1, 2], :weight=>1, :uniform=>:yes) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkmenu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkmenu.rb new file mode 100644 index 0000000..75ecdb0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkmenu.rb @@ -0,0 +1,85 @@ +# ttkmenu.rb -- +# +# This demonstration script creates a toplevel window containing several Ttk +# menubutton widgets. +# +# based on "Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkmenu_demo) && $ttkmenu_demo + $ttkmenu_demo.destroy + $ttkmenu_demo = nil +end + +$ttkmenu_demo = TkToplevel.new {|w| + title("Ttk Menu Buttons") + iconname("ttkmenu") + positionWindow(w) +} + +base_frame = Ttk::Frame.new($ttkmenu_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +Ttk is the new Tk themed widget set, \ +and one widget that is available in themed form is the menubutton. \ +Below are some themed menu buttons \ +that allow you to pick the current theme in use. \ +Notice how picking a theme changes the way \ +that the menu buttons themselves look, \ +and that the central menu button is styled differently \ +(in a way that is normally suitable for toolbars). \ +However, there are no themed menus; the standard Tk menus were judged \ +to have a sufficiently good look-and-feel on all platforms, \ +especially as they are implemented as native controls in many places. +EOL + +Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x) + +## See Code / Dismiss +Ttk::Frame.new($ttkmenu_demo) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkmenu'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkmenu_demo.destroy + $ttkmenu_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +b1 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:above) +b2 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:left) +b3 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:right) +b4 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:flush, + :style=>Ttk::Menubutton.style('Toolbutton')) +b5 = Ttk::Menubutton.new(base_frame,:text=>'Select a theme',:direction=>:below) + +b1.menu(m1 = Tk::Menu.new(b1, :tearoff=>false)) +b2.menu(m2 = Tk::Menu.new(b2, :tearoff=>false)) +b3.menu(m3 = Tk::Menu.new(b3, :tearoff=>false)) +b4.menu(m4 = Tk::Menu.new(b4, :tearoff=>false)) +b5.menu(m5 = Tk::Menu.new(b5, :tearoff=>false)) + +Ttk.themes.each{|theme| + m1.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m2.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m3.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m4.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m5.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) +} + +f = Ttk::Frame.new(base_frame).pack(:fill=>:x) +f1 = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +f.lower + +f.grid_anchor(:center) +TkGrid('x', b1, 'x', :in=>f, :padx=>3, :pady=>2) +TkGrid(b2, b4, b3, :in=>f, :padx=>3, :pady=>2) +TkGrid('x', b5, 'x', :in=>f, :padx=>3, :pady=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttknote.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttknote.rb new file mode 100644 index 0000000..c2a22b4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttknote.rb @@ -0,0 +1,89 @@ +# ttknote.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# notebook widget. +# +# based on "Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttknote_demo) && $ttknote_demo + $ttknote_demo.destroy + $ttknote_demo = nil +end + +$ttknote_demo = TkToplevel.new {|w| + title("Ttk Notebook Widget") + iconname("ttknote") + positionWindow(w) +} + +## See Code / Dismiss +Ttk::Frame.new($ttknote_demo) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttknote'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttknote_demo.destroy + $ttknote_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +base_frame = Ttk::Frame.new($ttknote_demo).pack(:fill=>:both, :expand=>true) + +## Make the notebook and set up Ctrl+Tab traversal +notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true, + :padx=>2, :pady=>3) +notebook.enable_traversal + +## Popuplate the first pane +f_msg = Ttk::Frame.new(notebook) +msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'4i', + :justify=>:left, :anchor=>'n', :text=><'Neat!', :underline=>0, + :command=>proc{ + neat.value = 'Yeah, I know...' + Tk.after_cancel(after_id) if after_id + after_id = Tk.after(500){neat.value = ''} + }) +msg_b.winfo_toplevel.bind('Alt-n'){ msg_b.focus; msg_b.invoke } +msg_l = Ttk::Label.new(f_msg, :textvariable=>neat) +notebook.add(f_msg, :text=>'Description', :underline=>0, :padding=>2) +Tk.grid(msg_m, '-', :sticky=>'new', :pady=>2) +Tk.grid(msg_b, msg_l, :pady=>[2, 4]) +f_msg.grid_rowconfigure(1, :weight=>1) +f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1) + +## Populate the second pane. Note that the content doesn't really matter +f_disabled = Ttk::Frame.new(notebook) +notebook.add(f_disabled, :text=>'Disabled', :state=>:disabled) + +## Popuplate the third pane +f_editor = Ttk::Frame.new(notebook) +notebook.add(f_editor, :text=>'Text Editor', :underline=>0) +editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char) +if Tk.windowingsystem != 'aqua' + editor_s = editor_t.yscrollbar(Ttk::Scrollbar.new(f_editor)) +else + editor_s = editor_t.yscrollbar(Tk::Scrollbar.new(f_editor)) +end +editor_s.pack(:side=>:right, :fill=>:y, :padx=>[0,2], :pady=>2) +editor_t.pack(:fill=>:both, :expand=>true, :padx=>[2,0], :pady=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkpane.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkpane.rb new file mode 100644 index 0000000..56df613 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkpane.rb @@ -0,0 +1,213 @@ +# ttkpane.rb -- +# +# This demonstration script creates a Ttk pane with some content. +# +# based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkpane_demo) && $ttkpane_demo + $ttkpane_demo.destroy + $ttkpane_demo = nil +end + +$ttkpane_demo = TkToplevel.new {|w| + title("Themed Nested Panes") + iconname("ttkpane") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +This demonstration shows off a nested set of themed paned windows. \ +Their sizes can be changed by grabbing the area \ +between each contained pane and dragging the divider. +EOL + +Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x) + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkpane'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkpane_demo.destroy + $ttkpane_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +outer = Ttk::Panedwindow.new(frame, :orient=>:horizontal) +outer.add(in_left = Ttk::Panedwindow.new(outer, :orient=>:vertical)) +outer.add(in_right = Ttk::Panedwindow.new(outer, :orient=>:vertical)) +in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'Button')) +in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'Clocks')) +in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'Progress')) +in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'Text')) +if Tk.windowingsystem == 'aqua' + [left_top, left_bot, right_top, right_bot].each{|w| w.padding(3) } +end + +# Fill the button pane +Ttk::Button.new(left_top, :text=>'Press Me', + :command=>proc{ + Tk.messageBox(:type=>'ok', :icon=>'info', :message=>'Ouch!', + :detail=>'That hurt...', :parent=>base_frame, + :title=>'Button Pressed') + }).pack(:padx=>2, :pady=>5) + + +zones_list = [ + [':Europe/Berlin'], + [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'], + [':Africa/Johannesburg'], + [':Europe/London'], + [':America/Los_Angeles'], + [':Europe/Moscow'], + [':America/New_York'], + [':Asia/Singapore'], + [':Australia/Sydney'], + [':Asia/Tokyo'], +] + +zones = [] + +# Check tzinfo support +if $tk_major_ver > 8 || ($tk_major_ver == 8 && $tk_minor_ver >= 5) + tzinfo = :tcl + + # Force a pre-load of all the timezones needed; otherwise can end up + # poor-looking synch problems! + zones_list.each{|list| + list.each{|zone| + begin + Tk.tk_call('clock', 'format', '0', '-timezone', zone) + rescue RuntimeError + # ignore + else + zones << [zone, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + +else + begin + require 'tzinfo' + tzinfo = :tzinfo + rescue Exception + begin + require 'tzfile' + tzinfo = :tzfile + rescue Exception + tzinfo = nil + end + end + + case tzinfo + when :tzinfo + zones_list.each{|list| + list.each{|zone| + begin + tz = TZInfo::Timezone.get(zone[%r<[^:]+$>]) + rescue Exception + # ignore + else + zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + + when :tzfile + zones_list.each{|list| + list.each{|zone| + begin + tz = TZFile.create(zone[%r<[^:]+$>]) + rescue Exception + # ignore + else + zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + + else + [ -7, -4, -2, -1, 0, +1, +3, +8, +9, +10 ].each{|zone| + zones << [zone, 'UTC%+03d00' % zone] + } + end +end + +time = TkVariable.new_hash + +case tzinfo +when :tcl + update_proc = proc{|now, tz, label| + time[label] = Tk.tk_call('clock', 'format', now.tv_sec, + '-timezone', tz, '-format', '%T') + } +when :tzinfo + update_proc = proc{|now, tz, label| + time[label] = tz.utc_to_local(now).strftime('%H:%M:%S') + } +when :tzfile + update_proc = proc{|now, tz, label| + time[label] = tz.at(now.tv_sec).strftime('%H:%M:%S') + } +else + update_proc = proc{|now, tz, label| + time[label] = (now + (tz * 3600)).strftime('%H:%M:%S') + } +end + +# Fill the clocks pane +zones.each_with_index{|(zone, label), idx| + Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0 + Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x) + Ttk::Label.new(left_bot, :textvariable=>time.ref(label), + :anchor=>'w').pack(:fill=>:x) +} + +# Timer start +every = proc{ + now = Time.now.utc + zones.each{|zone, label| update_proc.call(now, zone, label) } +} +TkRTTimer.new(1000, -1, every).start(0, every) + +# Fill the progress pane +Ttk::Progressbar.new(right_top, :mode=>:indeterminate).pack(:fill=>:both, :expand=>true).start + +# Fill the text pane +if Tk.windowingsystem != 'aqua' + # The trick with the ttk::frame makes the text widget look like it fits with + # the current Ttk theme despite not being a themed widget itself. It is done + # by styling the frame like an entry, turning off the border in the text + # widget, and putting the text widget in the frame with enough space to allow + # the surrounding border to show through (2 pixels seems to be enough). + f = Ttk::Frame.new(right_bot, :style=>Ttk::Entry) + txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0) + txt.pack(:fill=>:both, :expand=>true, :in=>f, :pady=>2, :padx=>2) + scr = txt.yscrollbar(Ttk::Scrollbar.new(frame)) + scr.pack(:side=>:right, :fill=>:y, :in=>right_bot) + f.pack(:fill=>:both, :expand=>true) + outer.pack(:fill=>:both, :expand=>true) +else + txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0) + scr = txt.yscrollbar(TkScrollbar.new(frame)) + scr.pack(:side=>:right, :fill=>:y, :in=>right_bot) + txt.pack(:fill=>:both, :expand=>true, :in=>right_bot) + outer.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>[6, 10]) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkprogress.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkprogress.rb new file mode 100644 index 0000000..3eb9a64 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/ttkprogress.rb @@ -0,0 +1,66 @@ +# ttkprogress.rb -- +# +# This demonstration script creates several progress bar widgets. +# +# based on "Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkprogress_demo) && $ttkprogress_demo + $ttkprogress_demo.destroy + $ttkprogress_demo = nil +end + +$ttkprogress_demo = TkToplevel.new {|w| + title("Progress Bar Demonstration") + iconname("ttkprogress") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=>Tk::UTF8_String.new(<:top, :fill=>:x) +Below are two progress bars. \ +The top one is a \\u201Cdeterminate\\u201D progress bar, \ +which is used for showing how far through a defined task the program has got. \ +The bottom one is an \\u201Cindeterminate\\u201D progress bar, \ +which is used to show that the program is busy \ +but does not know how long for. Both are run here in self-animated mode, \ +which can be turned on and off using the buttons underneath. +EOL + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkprogress'}), + Ttk::Button.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkprogress_demo.destroy + $ttkprogress_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +p1 = Ttk::Progressbar.new(frame, :mode=>:determinate) +p2 = Ttk::Progressbar.new(frame, :mode=>:indeterminate) + +start = Ttk::Button.new(frame, :text=>'Start Progress', + :command=>proc{ p1.start; p2.start }) +stop = Ttk::Button.new(frame, :text=>'Stop Progress', + :command=>proc{ p1.stop; p2.stop }) + +Tk.grid(p1, '-', :pady=>5, :padx=>10) +Tk.grid(p2, '-', :pady=>5, :padx=>10) +Tk.grid(start, stop, :padx=>10, :pady=>5) +start.grid_configure(:sticky=>'e') +stop.grid_configure(:sticky=>'w') +frame.grid_columnconfigure(:all, :weight=>1) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind.rb new file mode 100644 index 0000000..65ee712 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind.rb @@ -0,0 +1,291 @@ +# twind.rb +# +# This demonstration script creates a text widget with a bunch of +# embedded windows. +# +# text (embedded windows) widget demo (called by 'widget') +# + +# toplevel widget +if defined?($twind_demo) && $twind_demo + $twind_demo.destroy + $twind_demo = nil +end + +# demo toplevel widget +$twind_demo = TkToplevel.new {|w| + title("Text Demonstration - Embedded Windows") + iconname("Embedded Windows") + positionWindow(w) +} + +base_frame = TkFrame.new($twind_demo).pack(:fill=>:both, :expand=>true) + +# frame +$twind_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc{ + tmppath = $twind_demo + $twind_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc{showCode 'twind'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +$twind_text = nil +TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, + 'relief'=>'sunken') {|f| + $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font, + 'width'=>'70', 'height'=>35, 'wrap'=>'word', + 'highlightthickness'=>0, 'borderwidth'=>0 ){|t| + TkScrollbar.new(f) {|s| + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + }.pack('side'=>'right', 'fill'=>'y') + }.pack('expand'=>'yes', 'fill'=>'both') +}.pack('expand'=>'yes', 'fill'=>'both') + +# +$tag_center = TkTextTag.new($twind_text, + 'justify' =>'center', + 'spacing1'=>'5m', + 'spacing3'=>'5m' ) +$tag_buttons = TkTextTag.new($twind_text, + 'lmargin1'=>'1c', + 'lmargin2'=>'1c', + 'rmargin' =>'1c', + 'spacing1'=>'3m', + 'spacing2'=>0, + 'spacing3'=>0 ) + +$twind_text.insert('end', "A text widget can contain other widgets embedded ") +$twind_text.insert('end', "it. These are called \"embedded windows\", ") +$twind_text.insert('end', "and they can consist of arbitrary widgets. ") +$twind_text.insert('end', "For example, here are two embedded button ") +$twind_text.insert('end', "widgets. You can click on the first button to ") +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + #text 'ON' + text 'Turn On' + command proc{textWindOn $twind_text,$twind_buttons} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', " horizontal scrolling, which also turns off ") +$twind_text.insert('end', "word wrapping. Or, you can click on the second ") +$twind_text.insert('end', "button to\n") +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + #text 'OFF' + text 'Turn Off' + command proc{textWindOff $twind_text} + cursor 'top_left_arrow' + }) + +$twind_text.insert('end', " horizontal scrolling and turn back on word wrapping.\n\n") +$twind_text.insert('end', "Or, here is another example. If you ") +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text 'Click Here' + command proc{textWindPlot $twind_text} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', " a canvas displaying an x-y plot will appear right here.") +$mark_plot = TkTextMark.new($twind_text, 'insert') +$mark_plot.gravity='left' +$twind_text.insert('end', " You can drag the data points around with the mouse, ") +$twind_text.insert('end', "or you can click here to ") +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text 'Delete' + command proc{textWindDel $twind_text} + cursor 'top_left_arrow' + }) + +$twind_text.insert('end', " the plot again.\n\n") +$twind_text.insert('end', "You may also find it useful to put embedded windows in ") +$twind_text.insert('end', "a text without any actual text. In this case the ") +$twind_text.insert('end', "text widget acts like a geometry manager. For ") +$twind_text.insert('end', "example, here is a collection of buttons laid out ") +$twind_text.insert('end', "neatly into rows by the text widget. These buttons ") +$twind_text.insert('end', "can be used to change the background color of the ") +$twind_text.insert('end', "text widget (\"Default\" restores the color to ") +$twind_text.insert('end', "its default). If you click on the button labeled ") +$twind_text.insert('end', "\"Short\", it changes to a longer string so that ") +$twind_text.insert('end', "you can see how the text widget automatically ") +$twind_text.insert('end', "changes the layout. Click on the button again ") +$twind_text.insert('end', "to restore the short string.\n") + + +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) {|b| + text 'Default' + command proc{embDefBg $twind_text} + cursor 'top_left_arrow' + $tag_buttons.add('end') + }, + 'padx'=>3 ) +embToggle = TkVariable.new('Short') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkCheckButton.new($twind_text) { + textvariable embToggle + indicatoron 0 + variable embToggle + onvalue 'A much longer string' + offvalue 'Short' + cursor 'top_left_arrow' + pady 5 + padx 2 + }, + 'padx'=>3, + 'pady'=>2 ) + +[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4', + 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1', + 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1', + 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4' +].each{|twind_color| + TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text twind_color + cursor 'top_left_arrow' + command proc{$twind_text.bg twind_color} + }, + 'padx'=>3, + 'pady'=>2 ) +} + +# +def textWindOn (w,f) + if defined? $twind_scroll + begin + $twind_scroll.destroy + rescue + end + $twind_scroll = nil + end + + base = TkWinfo.parent( TkWinfo.parent(w) ) + $twind_scroll = TkScrollbar.new(base) {|s| + orient 'horizontal' + command proc{|*args| w.xview(*args)} + w.xscrollcommand proc{|first,last| s.set first,last} + w.wrap 'none' + pack('after'=>f, 'side'=>'bottom', 'fill'=>'x') + } + + return nil +end + +def textWindOff (w) + if defined? $twind_scroll + begin + $twind_scroll.destroy + rescue + end + $twind_scroll = nil + end + w.xscrollcommand '' + w.wrap 'word' +end + +def textWindPlot (t) + if (defined? $twind_plot) && TkWinfo.exist?($twind_plot) + return + end + + $twind_plot = TkCanvas.new(t) { + relief 'sunken' + width 450 + height 300 + cursor 'top_left_arrow' + } + + if $tk_version =~ /^4.*/ + font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + else + font = 'Helvetica 18' + end + + TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2) + TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2) + TkcText.new($twind_plot, 225, 20, + 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown') + + (0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2) + TkcText.new($twind_plot, x, 254, + 'text'=>10*i, 'font'=>font, 'anchor'=>'n') + } + (0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2) + TkcText.new($twind_plot, 96, y, + 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e') + } + + for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' + end + + $twind_plot.itembind('point', 'Any-Enter', + proc{$twind_plot.itemconfigure 'current', 'fill', 'red'}) + $twind_plot.itembind('point', 'Any-Leave', + proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'}) + $twind_plot.itembind('point', '1', + proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y") + $twind_plot.itembind('point', 'ButtonRelease-1', + proc{$twind_plot.dtag 'selected'}) + $twind_plot.bind('B1-Motion', + proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y") + while ($twind_text.get($mark_plot) =~ /[ \t\n]/) + $twind_text.delete $mark_plot + end + $twind_text.insert $mark_plot,"\n" + TkTextWindow.new($twind_text, $mark_plot, 'window'=>$twind_plot) + $tag_center.add $mark_plot + $twind_text.insert $mark_plot,"\n" +end + +$embPlot = {'lastX'=>0, 'lastY'=>0} + +def embPlotDown (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $embPlot['lastX'] = x + $embPlot['lastY'] = y +end + +def embPlotMove (w, x, y) + w.move 'selected', x - $embPlot['lastX'], y - $embPlot['lastY'] + $embPlot['lastX'] = x + $embPlot['lastY'] = y +end + +def textWindDel (w) + if (defined? $twind_text) && TkWinfo.exist?($twind_plot) + $twind_text.delete $twind_plot + $twind_plot = nil + while ($twind_text.get($mark_plot) =~ /[ \t\n]/) + $twind_text.delete $mark_plot + end + $twind_text.insert $mark_plot," " + end +end + +def embDefBg (w) + w['background'] = w.configinfo('background')[3] +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind2.rb new file mode 100644 index 0000000..43990c1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/twind2.rb @@ -0,0 +1,384 @@ +# +# text (embedded windows) widget demo 2 (called by 'widget') +# + +# delete toplevel widget +if defined?($twind2_demo) && $twind2_demo + $twind2_demo.destroy + $twind2_demo = nil +end + +# demo toplevel widget +$twind2_demo = TkToplevel.new {|w| + title("Text Demonstration - Embedded Windows 2") + iconname("Embedded Windows") + positionWindow(w) +} + +base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true) + +# frame +$twind2_buttons = TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'twind2'}), + TkButton.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $twind2_demo + $twind2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) +} +$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +$twind2_text = nil +TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, + 'relief'=>'sunken') {|f| + $twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font, + # 'width'=>'70', 'height'=>35, 'wrap'=>'word', + 'width'=>'70', 'height'=>35, 'wrap'=>'char', + 'highlightthickness'=>0, 'borderwidth'=>0 ){|t| + TkScrollbar.new(f) {|s| + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + }.pack('side'=>'right', 'fill'=>'y') + }.pack('expand'=>'yes', 'fill'=>'both') +}.pack('expand'=>'yes', 'fill'=>'both') + +# text tags +$tag2_center = TkTextTag.new($twind2_text, + 'justify' =>'center', + 'spacing1'=>'5m', + 'spacing3'=>'5m' ) +$tag2_buttons = TkTextTag.new($twind2_text, + 'lmargin1'=>'1c', + 'lmargin2'=>'1c', + 'rmargin' =>'1c', + 'spacing1'=>'3m', + 'spacing2'=>0, + 'spacing3'=>0 ) + +# insert text +$twind2_text.insert('end', + 'A text widget can contain many different kinds of items, ') +$twind2_text.insert('end', + "both active and passive. It can lay these out in various ") +$twind2_text.insert('end', + "ways, with wrapping, tabs, centering, etc. In addition, ") +$twind2_text.insert('end', + "when the contents are too big for the window, smooth ") +$twind2_text.insert('end', "scrolling in all directions is provided.\n\n") + +$twind2_text.insert('end', "A text widget can contain other widgets embedded ") +$twind2_text.insert('end', "it. These are called \"embedded windows\", ") +$twind2_text.insert('end', "and they can consist of arbitrary widgets. ") +$twind2_text.insert('end', "For example, here are two embedded button ") +$twind2_text.insert('end', "widgets. You can click on the first button to ") +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text 'ON' + command proc{textWindOn2 $twind2_text,$twind2_buttons} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', " horizontal scrolling, which also turns off ") +$twind2_text.insert('end', "word wrapping. Or, you can click on the second ") +$twind2_text.insert('end', "button to\n") +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text 'OFF' + command proc{textWindOff2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', + " horizontal scrolling and turn back on word wrapping.\n\n") + +$twind2_text.insert('end', "Or, here is another example. If you ") +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text 'Click Here' + command proc{textWindPlot2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', + " a canvas displaying an x-y plot will appear right here.") +$mark2_plot = TkTextMark.new($twind2_text, 'insert') +$mark2_plot.gravity='left' +$twind2_text.insert('end', + " You can drag the data points around with the mouse, ") +$twind2_text.insert('end', "or you can click here to ") +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text 'Delete' + command proc{textWindDel2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', " the plot again.\n\n") + +$twind2_text.insert('end', + "You may also find it useful to put embedded windows in ") +$twind2_text.insert('end', + "a text without any actual text. In this case the ") +$twind2_text.insert('end', "text widget acts like a geometry manager. For ") +$twind2_text.insert('end', + "example, here is a collection of buttons laid out ") +$twind2_text.insert('end', + "neatly into rows by the text widget. These buttons ") +$twind2_text.insert('end', + "can be used to change the background color of the ") +$twind2_text.insert('end', "text widget (\"Default\" restores the color to ") +$twind2_text.insert('end', + "its default). If you click on the button labeled ") +$twind2_text.insert('end', "\"Short\", it changes to a longer string so that ") +$twind2_text.insert('end', "you can see how the text widget automatically ") +$twind2_text.insert('end', "changes the layout. Click on the button again ") +$twind2_text.insert('end', "to restore the short string.\n") + +btn_default = TkButton.new($twind2_text) {|b| + text 'Default' + command proc{embDefBg2 $twind2_text} + cursor 'top_left_arrow' +} +TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3) +embToggle = TkVariable.new('Short') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkCheckButton.new($twind2_text) { + textvariable embToggle + indicatoron 0 + variable embToggle + onvalue 'A much longer string' + offvalue 'Short' + cursor 'top_left_arrow' + pady 5 + padx 2 + }, + 'padx'=>3, + 'pady'=>2 ) + +[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4', + 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1', + 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1', + 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4' +].each{|twind_color| + TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text twind_color + cursor 'top_left_arrow' + command proc{$twind2_text.bg twind_color} + }, + 'padx'=>3, + 'pady'=>2 ) +} + +$tag2_buttons.add(btn_default, 'end') + +$text_normal2 = {} +$text_normal2['border'] = $twind2_text.cget('borderwidth') +$text_normal2['highlight'] = $twind2_text.cget('highlightthickness') +$text_normal2['pad'] = $twind2_text.cget('padx') + +$twind2_text.insert('end', "\nYou can also change the usual border width and ") +$twind2_text.insert('end', "highlightthickness and padding.\n") + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big borders", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigB2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small borders", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallB2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big highlight", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigH2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small highlight", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallH2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big pad", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigP2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small pad", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallP2 $twind2_text + })) + +$twind2_text.insert('end', + "\n\nFinally, images fit comfortably in text widgets too:") + +TkTextImage.new($twind2_text, 'end', + 'image'=>TkBitmapImage.new(:file=>[ + $demo_dir, '..', + 'images', 'face.xbm' + ].join(File::Separator))) + +# methods +def textWinBigB2(w) + w.borderwidth 15 +end +def textWinSmallB2(w) + w.borderwidth $text_normal2['border'] +end +def textWinBigH2(w) + w.highlightthickness 15 +end +def textWinSmallH2(w) + w.highlightthickness $text_normal2['highlight'] +end +def textWinBigP2(w) + w.configure(:padx=>15, :pady=>15) +end +def textWinSmallP2(w) + w.configure(:padx=>$text_normal2['pad'], :pady=>$text_normal2['pad']) +end + +def textWindOn2 (w,f) + if defined? $twind2_scroll + begin + $twind2_scroll.destroy + rescue + end + $twind2_scroll = nil + end + + base = TkWinfo.parent( TkWinfo.parent(w) ) + $twind2_scroll = TkScrollbar.new(base) {|s| + orient 'horizontal' + command proc{|*args| w.xview(*args)} + w.xscrollcommand proc{|first,last| s.set first,last} + w.wrap 'none' + pack('after'=>f, 'side'=>'bottom', 'fill'=>'x') + } + + return nil +end + +def textWindOff2 (w) + if defined? $twind2_scroll + begin + $twind2_scroll.destroy + rescue + end + $twind2_scroll = nil + end + w.xscrollcommand '' + #w.wrap 'word' + w.wrap 'char' +end + +def textWindPlot2 (t) + if (defined? $twind2_plot) && (TkWinfo.exist?($twind2_plot)) + return + end + + $twind2_plot = TkCanvas.new(t) { + relief 'sunken' + width 450 + height 300 + cursor 'top_left_arrow' + } + + #font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + font = 'Helvetica 18' + + TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2) + TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2) + TkcText.new($twind2_plot, 225, 20, + 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown') + + (0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2) + TkcText.new($twind2_plot, x, 254, + 'text'=>10*i, 'font'=>font, 'anchor'=>'n') + } + (0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2) + TkcText.new($twind2_plot, 96, y, + 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e') + } + + for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' + end + + $twind2_plot.itembind('point', 'Any-Enter', + proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'}) + $twind2_plot.itembind('point', 'Any-Leave', + proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'}) + $twind2_plot.itembind('point', '1', + proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y") + $twind2_plot.itembind('point', 'ButtonRelease-1', + proc{$twind2_plot.dtag 'selected'}) + $twind2_plot.bind('B1-Motion', + proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y") + while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/) + $twind2_text.delete $mark2_plot + end + $twind2_text.insert $mark2_plot,"\n" + TkTextWindow.new($twind2_text, $mark2_plot, 'window'=>$twind2_plot) + $tag2_center.add $mark2_plot + $twind2_text.insert $mark2_plot,"\n" +end + +$embPlot2 = {'lastX'=>0, 'lastY'=>0} + +def embPlotDown2 (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $embPlot2['lastX'] = x + $embPlot2['lastY'] = y +end + +def embPlotMove2 (w, x, y) + w.move 'selected', x - $embPlot2['lastX'], y - $embPlot2['lastY'] + $embPlot2['lastX'] = x + $embPlot2['lastY'] = y +end + +def textWindDel2 (w) + if (defined? $twind2_text) && TkWinfo.exist?($twind2_plot) + $twind2_text.delete $twind2_plot + $twind2_plot = nil + while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/) + $twind2_text.delete $mark2_plot + end + $twind2_text.insert $mark2_plot," " + end +end + +def embDefBg2 (w) + w['background'] = w.configinfo('background')[3] +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/unicodeout.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/unicodeout.rb new file mode 100644 index 0000000..9c230a2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/unicodeout.rb @@ -0,0 +1,114 @@ +# unicodeout.rb -- +# +# This demonstration script shows how you can produce output (in label +# widgets) using many different alphabets. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($unicodeout_demo) && $unicodeout_demo + $unicodeout_demo.destroy + $unicodeout_demo = nil +end + +$unicodeout_demo = TkToplevel.new {|w| + title("Unicode Label Demonstration") + iconname("unicodeout") + positionWindow(w) +} + +base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5.4i', :justify=>:left, + :text=><:top) +This is a sample of Tk's support for languages that use non-Western \ +character sets. However, what you will actually see below depends \ +largely on what character sets you have installed, and what you see \ +for characters that are not present varies greatly between platforms as well. \ +Please try to click the 'See Code' button, \ +and click the 'Rerun Demo' button after editing \ +(the source file is not changed) \ +the definition of @@font on the Unicodeout_SampleFrame class. +The strings are written in Tcl using UNICODE characters \ +using the \\uXXXX escape so as to do so in a portable fashion. + +ATTENTION: +The strings are converted to the encoded string objects \ +(completed to rewrite Tcl's escapes) by Tk::UTF8_String method. \ +And the Tk::UTF8_String objects are passed to the label widgets. +EOL + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ + $unicodeout_demo.destroy + $unicodeout_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ + showCode 'unicodeout' + }).pack(:side=>:left, :expand=>true) +} + +wait_msg = TkLabel.new(base_frame, + :text=>"Please wait while loading fonts...", + :font=>"Helvetica 12 italic").pack + +class Unicodeout_SampleFrame < TkFrame + @@font = $font + # @@font = 'Helvetica 14' + # @@font = 'Courier 12' + # @@font = 'clearlyu 16' + # @@font = 'fixed 12' + # @@font = 'Times 12' + # @@font = 'Newspaper 12' + # @@font = '{New century schoolbook} 12' + + def initialize(base) + super(base) + grid_columnconfig(1, :weight=>1) + end + + def add_sample(lang, *args) + sample_txt = Tk::UTF8_String(args.join('')) + l = TkLabel.new(self, :font=>@@font, :text=>lang+':', + :anchor=>:nw, :pady=>0) + #s = TkLabel.new(self, :font=>@@font, :text=>sample_txt, + s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt, + :anchor=>:nw, :width=>30, :pady=>0) + Tk.grid(l, s, :sticky=>:ew, :pady=>0) + l.grid_config(:padx, '1m') + end +end +f = Unicodeout_SampleFrame.new(base_frame) +f.pack(:expand=>true, :fill=>:both, :padx=>'2m', :pady=>'1m') + +# Processing when some characters are missing might take a while, so make +# sure we're displaying something in the meantime... + +oldCursor = $unicodeout_demo.cursor +$unicodeout_demo.cursor('watch') +Tk.update + +f.add_sample('Arabic', + '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94', + '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D') +f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57') +f.add_sample('Simpl. Chinese', '\u6C49\u8BED') +f.add_sample('Greek', + '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ', + '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1') +f.add_sample('Hebrew', + '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ', + '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9') +f.add_sample('Japanese', + '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ', + '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA') +f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00') +f.add_sample('Russian', + '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ', + '\u044F\u0437\u044B\u043A') + +wait_msg.destroy +$unicodeout_demo.cursor(oldCursor) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/vscale.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/vscale.rb new file mode 100644 index 0000000..b05ed12 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/vscale.rb @@ -0,0 +1,79 @@ +# vscale.rb +# +# This demonstration script shows an example with a vertical scale. + +require "tkcanvas" + +if defined?($vscale_demo) && $vscale_demo + $vscale_demo.destroy + $vscale_demo = nil +end + +$vscale_demo = TkToplevel.new {|w| + title("Vertical Scale Demonstration") + iconname("vscale") +} +positionWindow($vscale_demo) + +base_frame = TkFrame.new($vscale_demo).pack(:fill=>:both, :expand=>true) + +msg = TkLabel.new(base_frame) { + font $font + wraplength '3.5i' + justify 'left' + text "An arrow and a vertical scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the size of the arrow." +} +msg.pack('side'=>'top', 'padx'=>'.5c') + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + text 'Dismiss' + command proc { + tmppath = $vscale_demo + $vscale_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'Show Code' + command proc { showCode 'vscale' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +def setHeight(w, height) + height = height + 21 + y2 = height - 30 + if y2 < 21 + y2 = 21 + end + w.coords 'poly',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20 + w.coords 'line',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20 +end + +TkFrame.new(base_frame) {|frame| + borderwidth 10 + canvas = TkCanvas.new(frame) {|c| + width 50 + height 50 + bd 0 + highlightthickness 0 + TkcPolygon.new(c, 0, 0, 1, 1, 2, 2) { + fill 'SeaGreen3' + tags 'poly' + } + TkcLine.new(c, 0, 0, 1, 1, 2, 2, 0, 0) { + fill 'black' + tags 'line' + } + }.pack('side'=>'left', 'anchor'=>'nw', 'fill'=>'y') + scale = TkScale.new(frame) { + orient 'vertical' + length 284 + from 0 + to 250 + command proc{|value| setHeight(canvas, value)} + tickinterval 50 + }.pack('side'=>'left', 'anchor'=>'ne') + scale.set 75 +}.pack diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/widget b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/widget new file mode 100644 index 0000000..9a0605d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-en/widget @@ -0,0 +1,1084 @@ +#!/usr/bin/env ruby + +# widget -- +# This script demonstrates the various widgets provided by Tk, +# along with many of the features of the Tk toolkit. This file +# only contains code to generate the main window for the +# application, which invokes individual demonstrations. The +# code for the actual demonstrations is contained in separate +# ".rb" files is this directory, which are sourced by this script +# as needed. + +require 'tk' +# require 'tkafter' + +### $DEBUG=1 ########## + +$RubyTk_WidgetDemo = true + +#---------------------------------------------------------------- +# The code below create the main window, consisting of a menu bar +# and a text widget that explains how to use the program, plus lists +# all of the demos as hypertext items. +#---------------------------------------------------------------- + +# widget demo directory +# $demo_dir = File.dirname($0) +$demo_dir = File.dirname(__FILE__) + +# root +$root = TkRoot.new{title "Ruby/Tk Widget Demonstration"} + +# tk +$tk_version = Tk::TK_VERSION +$tk_major_ver, $tk_minor_ver = $tk_version.split('.').map{|n| n.to_i} +$tk_patchlevel = Tk::TK_PATCHLEVEL + +# tcl_platform +$tk_platform = TkVarAccess.new('tcl_platform') + +# +case($tk_version) +when /^4.*/ + $font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil) +else + $font = TkFont.new('Helvetica -12') +end + +# images +$image = {} + +if $tk_major_ver >= 8 +$image['refresh'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['view'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['delete'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['print'] = TkPhotoImage.new(:height=>19, :format=>'GIF', :data=><= 8 + $root.add_menubar([[['File', 0], + ['About ... ', proc{aboutBox}, 0, ''], + '---', + ['Quit', proc{exit}, 0, 'Ctrl-Q'] + ]]) +else + TkMenubar.new($root, + [[['File', 0], + ['About ... ', proc{aboutBox}, 0, ''], + '---', + ['Quit', proc{exit}, 0, 'Ctrl-Q'] + ]]).pack('side'=>'top', 'fill'=>'x') +end +$root.bind('F1', proc{aboutBox}) +$root.bind('Control-q', proc{exit}) + +=begin +TkFrame.new($root){|frame| + TkMenubutton.new(frame){|button| + m = TkMenu.new(button) { + add 'command', 'label'=>'Quit', 'command'=>proc{exit}, 'underline'=>0 + } + menu m + text 'File' + underline 0 + }.pack('side'=>'left') +}.pack('side'=>'top', 'fill'=>'x') +=end + +# +if $tk_version =~ /^4\.[01]/ + scr = TkScrollbar.new($root, 'orient'=>'vertical') + txt = TkText.new($root) { + wrap 'word' + width 70 + height 30 + font $font + setgrid 'yes' + yscrollcommand proc{|first,last| scr.set first,last} + } + scr.command(proc{|*args| txt.yview(*args)}) + scr.pack('side'=>'right', 'fill'=>'y') + txt.pack('expand'=>'yes', 'fill'=>'both') +else + textFrame = TkFrame.new($root) + scr = TkScrollbar.new($root, 'orient'=>'vertical', + 'highlightthickness'=>0, 'takefocus'=>1) { + pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1) + } + txt = TkText.new($root) { + wrap 'word' + width 70 + height 30 + font $font + setgrid 'yes' + highlightthickness 0 + padx 4 + pady 2 + takefocus 0 + bd 1 + yscrollcommand proc{|first,last| scr.set first,last} + } + scr.command(proc{|*args| txt.yview(*args)}) +# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both', 'padx'=>1) + txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both') +# textFrame.pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>2) + textFrame.pack('expand'=>'yes', 'fill'=>'both') + + statusBar = TkFrame.new($root) {|f| + if $tk_version =~ /^4.*/ + statusfont = '-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*' + else + statusfont = 'Helvetica 10' + end + $statusBarLabel = \ + TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w', + 'font'=>statusfont) \ + .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both') + TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w', + 'font'=>statusfont) \ + .pack('side'=>'left', 'padx'=>2) + }.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2) +end + +# Create a bunch of tags to use in the text widget, such as those for +# section titles and demo descriptions. Also define the bindings for +# tags. + +if $tk_version =~ /^4.*/ + tag_title = TkTextTag.new(txt, 'font'=>'-*-Helvetica-Bold-R-Normal--*-180-*-*-*-*-*-*') +else + tag_title = TkTextTag.new(txt, 'font'=>'Helvetica 18 bold') +end + +# We put some "space" characters to the left and right of each demo description +# so that the descriptions are highlighted only when the mouse cursor +# is right over them (but not when the cursor is to their left or right) + +tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c') + +if TkWinfo.depth($root) == 1 + tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'underline'=>1) + $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'underline'=>1) + tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white') +else + tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'foreground'=>'blue', 'underline'=>1) + $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'foreground'=>'#303080', 'underline'=>1) +# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1, +# 'background'=>'SeaGreen3') + tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red') +end + +#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')}) +tag_demo.bind('ButtonRelease-1', + proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y') + +lastLine = TkVariable.new("") +newLine = TkVariable.new("") +tag_demo.bind('Enter', proc{|x,y| + lastLine.value = txt.index("@#{x},#{y} linestart") + tag_hot.add(lastLine.value, "#{lastLine.value} lineend") + showStatus txt, txt.index("@#{x},#{y}") + }, + '%x %y') +tag_demo.bind('Leave', + proc{ + tag_hot.remove('1.0','end') + txt.configure('cursor','xterm') + $statusBarLabel.configure('text'=>"") + }) +tag_demo.bind('Motion', proc{|x, y| + newLine.value = txt.index("@#{x},#{y} linestart") + if newLine.value != lastLine.value + tag_hot.remove('1.0','end') + lastLine.value = newLine.value + if ( txt.tag_names("@#{x},#{y}").find{|t| + t.kind_of?(String) && t =~ /^demo-/ + } ) + tag_hot.add(lastLine.value, + "#{lastLine.value} lineend -1 chars") + end + end + showStatus txt, txt.index("@#{x},#{y}") + }, + '%x %y') + +# Create the text for the text widget. + +txt.insert('end', "Ruby/Tk Widget Demonstrations\n\n", tag_title) +txt.insert('end', <:both, :expand=>true) + TkLabel.new(base) { + text "Variable values:" + width 20 + anchor 'center' + if $tk_version =~ /^4.*/ + font '-Adobe-helvetica-medium-r-normal--*-180-*-*-*-*-*-*' + else + font 'Helvetica 14' + end + }.pack('side'=>'top', 'fill'=>'x') + len = 1 + args.each{|vnam,vbody| + len = vnam.to_s.length if vnam.to_s.length > len + } + args.each{|vnam,vbody| + TkFrame.new(w){|f| + #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left') + TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left') + TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\ + .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x') + }.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x') + } + TkButton.new(base) { + text "OK" + command proc{w.destroy} + }.pack('side'=>'bottom', 'pady'=>2) + } + $showVarsWin[parent.path] = w +end + +def showVars2(parent, *args) + if $showVarsWin[parent.path] + begin + $showVarsWin[parent.path].destroy + rescue + end + end + $showVarsWin[parent.path] = TkToplevel.new(parent) {|top| + title "Variable values" + + base = TkFrame.new(top).pack(:fill=>:both, :expand=>true) + + TkLabelFrame.new(base, :text=>"Variable values:", + :font=>{:family=>'Helvetica', :size=>14}){|f| + args.each{|vnam,vbody| + TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'), + TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'), + :padx=>2, :pady=>2, :sticky=>'w') + } + + f.grid(:sticky=>'news', :padx=>4) + f.grid_columnconfig(1, :weight=>1) + f.grid_rowconfig(100, :weight=>1) + } + TkButton.new(base, :text=>"OK", :width=>8, :default=>:active, + :command=>proc{top.destroy}){|b| + top.bind('Return', proc{b.invoke}) + top.bind('Escape', proc{b.invoke}) + + b.grid(:sticky=>'e', :padx=>4, :pady=>[6, 4]) + } + base.grid_columnconfig(0, :weight=>1) + base.grid_rowconfig(0, :weight=>1) + } +end + +if $tk_major_ver < 8 + alias showVars showVars1 +elsif $tk_major_ver == 8 && $tk_minor_ver < 4 + alias showVars showVars1 +else # ver >= 8.4 + alias showVars showVars2 +end + +# Pseudo-Toplevel support +module PseudoToplevel_Evaluable + def pseudo_toplevel_eval(body = Proc.new) + Thread.current[:TOPLEVEL] = self + begin + body.call + ensure + Thread.current[:TOPLEVEL] = nil + end + end + + def pseudo_toplevel_evaluable? + @pseudo_toplevel_evaluable + end + def pseudo_toplevel_evaluable=(mode) + @pseudo_toplevel_evaluable = (mode)? true: false + end + + def self.extended(mod) + mod.__send__(:extend_object, mod) + mod.instance_variable_set('@pseudo_toplevel_evaluable', true) + end +end + +class Object + alias __method_missing__ method_missing + private :__method_missing__ + + def method_missing(id, *args) + begin + has_top = (top = Thread.current[:TOPLEVEL]) && + top.respond_to?(:pseudo_toplevel_evaluable?) && + top.pseudo_toplevel_evaluable? && + top.respond_to?(id) + rescue Exception => e + has_top = false + end + + if has_top + top.__send__(id, *args) + else + __method_missing__(id, *args) + end + end +end + +class Proc + def initialize(*args, &b) + super + @__pseudo_toplevel__ = Thread.current[:TOPLEVEL] + end + + alias __call__ call + def call(*args, &b) + if top = @__pseudo_toplevel__ + orig_top = Thread.current[:TOPLEVEL] + Thread.current[:TOPLEVEL] = top + begin + __call__(*args, &b) + ensure + Thread.current[:TOPLEVEL] = orig_top + end + else + __call__(*args, &b) + end + end +end + +def proc(&b) + Proc.new(&b) +end +def lambda(&b) + Proc.new(&b) +end + +def _null_binding + Module.new.instance_eval{extend PseudoToplevel_Evaluable} + # binding + # Module.new.instance_eval{binding} +end +private :_null_binding + +def eval_samplecode(code, file=nil) + #eval(code) + #_null_binding.pseudo_toplevel_eval{ eval(code) } + #Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } } + Thread.new{ + _null_binding.pseudo_toplevel_eval{ + begin + if file + eval(code, binding, "(eval:#{file})") + else + eval(code) + end + rescue Exception=>e + #p e + TkBgError.show(e.class.inspect + ': ' + e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------") + end + } + } + Tk.update +end + +# invoke -- +# This procedure is called when the user clicks on a demo description. +# It is responsible for invoking the demonstration. +# +# Arguments: +# txt - Name of text widget +# index - The index of the character that the user clicked on. +def invoke(txt, idx) + tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/} + return unless tag + + cursor = txt.cget('cursor') + txt.cursor('watch') + Tk.update + # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding) + # Tk.update + eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb') + txt.cursor(cursor) + + $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars") +end +=begin +def invoke (txt, idx) + tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/} + return unless tag + current_cursor = txt.cget('cursor') + txt.cursor('watch') + Tk.update +# eval `cat #{tag[5..-1]}.rb` +# eval `cat #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb` + eval IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join + Tk.update +# txt.cursor('xterm') + txt.cursor(current_cursor) + + $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars") +end +=end +# showStatus -- +# +# Show the name of the demo program in the status bar. This procedure +# is called when the user moves the cursor over a demo description. +# + +def showStatus (txt, index) + tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/} + cursor = txt.cget('cursor') + unless tag + $statusBarLabel.configure('text', " ") + newcursor = 'xterm' + else + demoname = tag[5..-1] + $statusBarLabel.configure('text', + "Run the \"#{demoname}\" sample program") + newcursor = 'hand2' + end + txt.configure('cursor'=>newcursor) if cursor != newcursor +end + +# showCode -- +# This procedure creates a toplevel window that displays the code for +# a demonstration and allows it to be edited and reinvoked. +# +# Arguments: +# demo - The name of the demonstration's window, which can be +# used to derive the name of the file containing its code. + +def showCode1(demo) + file = "#{demo}.rb" + $code_window = nil unless defined? $code_window + if $code_window == nil || TkWinfo.exist?($code_window) == false + $code_window = TkToplevel.new(nil) + f = TkFrame.new($code_window) + + TkButton.new(f) { + text "Dismiss" + command proc{ + $code_window.destroy + $code_window = nil + } + }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2, 'padx'=>25) + TkButton.new(f) { + text "Rerun Demo" + # command proc{eval($code_text.get('1.0','end'), _null_binding)} + command proc{eval_samplecode($code_text.get('1.0','end'), '')} + }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2) + + TkLabel.new(f,'text'=>'line:').pack('side'=>'left') + linenum =TkLabel.new(f,'text'=>'').pack('side'=>'left') + TkLabel.new(f,'text'=>' pos:').pack('side'=>'left') + posnum =TkLabel.new(f,'text'=>'').pack('side'=>'left') + + $set_linenum = proc{|w| + line, pos = w.index('insert').split('.') + linenum.text = line + posnum.text = pos + } + + f.pack('side'=>'bottom', 'expand'=>'true', 'fill'=>'x') + + if $tk_version =~ /^4\.[01]/ + s = TkScrollbar.new($code_window, 'orient'=>'vertical') + $code_text = TkText.new($code_window) { + height 40 + setgrid 'yes' + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| $code_text.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + $code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both') + else + TkFrame.new($code_window) {|f| + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + hs = TkScrollbar.new($code_window, 'highlightthickness'=>0, + 'orient'=>'horizontal') + vs = TkScrollbar.new($code_window, 'highlightthickness'=>0, + 'orient'=>'vertical') + $code_text = TkText.new($code_window) {|t| + height 40 + wrap 'word' + xscrollcommand proc{|first,last| hs.set first,last} + yscrollcommand proc{|first,last| vs.set first,last} + setgrid 'yes' + highlightthickness 0 + pady 2 + padx 3 + hs.command(proc{|*args| $code_text.xview(*args)}) + vs.command(proc{|*args| $code_text.yview(*args)}) + } + + $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') +# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, +# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + +# JKC 2001-07-26: segfaults under 1.7.1 (2001-06-19) [i686-linux] + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + } + end + + btag = TkBindTag.new + + btag.bind('Key', $set_linenum, '%W') + btag.bind('Button', $set_linenum, '%W') + + btags = $code_text.bindtags + btags.insert(btags.index($code_text.class) + 1, btag) + $code_text.bindtags = btags + + else + $code_window.deiconify + $code_window.raise + end + + $code_window.title("Demo code: #{file}") + $code_window.iconname(file) +# fid = open(file, 'r') + fid = open([$demo_dir, file].join(File::Separator), 'r') + $code_text.delete('1.0', 'end') + #$code_text.insert('1.0', `cat #{file}`) + $code_text.insert('1.0', fid.read) + #$code_mark = TkTextMark.new($code_text, '1.0') + #$code_text.set_insert('1.0') + TkTextMarkInsert.new($code_text,'1.0') + + $set_linenum.call($code_text) + + fid.close +end + +def showCode2(demo) + file = "#{demo}.rb" + $code_window = nil unless defined? $code_window + if $code_window == nil || TkWinfo.exist?($code_window) == false + $code_window = TkToplevel.new(nil) + tf = TkFrame.new($code_window) + $code_text = TkText.new(tf, :font=>'Courier 10', :height=>30, + :wrap=>'word', :bd=>1, :setgrid=>true, + :highlightthickness=>0, :pady=>2, :padx=>3) + xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)} + yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)} + TkGrid($code_text, yscr, :sticky=>'news') + #TkGrid(xscr) + tf.grid_rowconfigure(0, :weight=>1) + tf.grid_columnconfigure(0, :weight=>1) + + bf = TkFrame.new($code_window) + + lf = TkFrame.new(bf) + TkLabel.new(lf, :text=>'line:').pack(:side=>:left) + linenum =TkLabel.new(lf, :text=>'').pack(:side=>:left) + TkLabel.new(lf, :text=>' pos:').pack(:side=>:left) + posnum =TkLabel.new(lf, :text=>'').pack(:side=>:left) + + $set_linenum = proc{|w| + line, pos = w.index('insert').split('.') + linenum.text = line + posnum.text = pos + } + + b_dis = TkButton.new(bf, :text=>'Dismiss', :default=>:active, + :command=>proc{ + $code_window.destroy + $code_window = nil + }, + :image=>$image['delete'], :compound=>:left) + b_prn = TkButton.new(bf, :text=>'Print Code', + :command=>proc{printCode($code_text, file)}, + :image=>$image['print'], :compound=>:left) + b_run = TkButton.new(bf, :text=>'Rerun Demo', + :command=>proc{ + # eval($code_text.get('1.0','end'), _null_binding) + eval_samplecode($code_text.get('1.0','end'), '') + }, + :image=>$image['refresh'], :compound=>:left) + + TkGrid(lf, 'x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4]) + bf.grid_columnconfigure(1, :weight=>1) + + TkGrid(tf, :sticky=>'news') + TkGrid(bf, :sticky=>'ew') + $code_window.grid_columnconfigure(0, :weight=>1) + $code_window.grid_rowconfigure(0, :weight=>1) + + $code_window.bind('Return', proc{|win| + b_dis.invoke unless win.kind_of?(TkText) + }, '%W') + $code_window.bindinfo('Return').each{|cmd, arg| + $code_window.bind_append('Escape', cmd, arg) + } + + btag = TkBindTag.new + + btag.bind('Key', $set_linenum, '%W') + btag.bind('Button', $set_linenum, '%W') + btag.bind('Configure', $set_linenum, '%W') + + btags = $code_text.bindtags + btags.insert(btags.index($code_text.class) + 1, btag) + $code_text.bindtags = btags + + else + $code_window.deiconify + $code_window.raise + end + + $code_window.title("Demo code: #{file}") + $code_window.iconname(file) + fid = open([$demo_dir, file].join(File::Separator), 'r') + $code_text.delete('1.0', 'end') + $code_text.insert('1.0', fid.read) + TkTextMarkInsert.new($code_text,'1.0') + + $set_linenum.call($code_text) + + fid.close +end + +if $tk_major_ver < 8 + alias showCode showCode1 +elsif $tk_major_ver == 8 && $tk_minor_ver < 4 + alias showCode showCode1 +else # ver >= 8.4 + alias showCode showCode2 +end + + +# printCode -- +# Prints the source code currently displayed in the See Code dialog. +# Much thanks to Arjen Markus for this. +# +# Arguments: +# txt - Name of text widget containing code to print +# file - Name of the original file (implicitly for title) + +def printCode(txt, file) + code = txt.get('1.0', 'end - 1c') + dir = '.' + dir = ENV['HOME'] if ENV['HOME'] + dir = ENV['TMP'] if ENV['TMP'] + dir = ENV['TEMP'] if ENV['TEMP'] + + fname = [dir, 'tkdemo-' + file].join(File::Separator) + open(fname, 'w'){|fid| fid.print(code)} + begin + case Tk::TCL_PLATFORM('platform') + when 'unix' + msg = `lp -c #{fname}` + unless $?.exitstatus == 0 + Tk.messageBox(:title=>'Print spooling failure', + :message=>'Print spooling probably failed: ' + msg) + end + when 'windows' + begin + printTextWin32(fname) + rescue => e + Tk.messageBox(:title=>'Print spooling failure', + :message=>'Print spooling probably failed: ' + + e.message) + end + when 'macintosh' + Tk.messageBox(:title=>'Operation not Implemented', + :message=>'Oops, sorry: not implemented yet!') + else + Tk.messageBox(:title=>'Operation not Implemented', + :message=>'Wow! Unknown platform: ' + + Tk::TCL_PLATFORM('platform')) + end + ensure + File.delete(fname) + end +end + +# printTextWin32 -- +# Print a file under Windows +# +# Arguments: +# filename - Name of the file +# +def printTextWin32(fname) + require 'win32/registry' + begin + app = Win32::Registry::HKEY_CLASSES_ROOT['.txt'] + pcmd = nil + Win32::Registry::HKEY_CLASSES_ROOT.open("#{app}\\shell\\print"){|reg| + pcmd = reg['command'] + } + rescue + app = Tk.tk_call('auto_execok', 'notepad.exe') + pcmd = "#{app} /p %1" + end + + pcmd.gsub!('%1', fname) + puts pcmd + cmd = Tk.tk_call('auto_execok', 'start') + ' /min ' + pcmd + + msg = `#{cmd}` + unless $?.exitstatus == 0 + fail RuntimeError, msg + end +end + +# aboutBox +# +# Pops up a message box with an "about" message +# +def aboutBox + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo', + 'message'=>"Ruby/Tk widget demonstration Ver.1.7.0-en\n\n" + + "based on demos of Tk8.1 -- 8.5 " + + "( Copyright of Tcl/Tk demos:: " + + "(c) 1996-1997 Sun Microsystems, Inc. / " + + "(c) 1997-2000 Ajuba Solutions, Inc. / " + + "(c) 2001-2007 Donal K. Fellows / " + + "(c) 2002-2007 Daniel A. Steffen )\n\n" + + "Your Ruby & Tk Version ::\n" + + "Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}\n\n" + + "Ruby/Tk release date :: tcltklib #{TclTkLib::RELEASE_DATE}; tk #{Tk::RELEASE_DATE}") +end + +######################################### +# start demos if given at command line +no_launcher = false +if ARGV[0] == '-n' + ARGV.shift + no_launcher = true if ARGV.size > 0 +else + # show the root widget to make it lower then demo windows + Tk.update +end +ARGV.each{|cmd| + if cmd =~ /(.*).rb/ + cmd = $1 + end + #eval(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, + # _null_binding) + eval_samplecode(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, cmd + '.rb') +} +if no_launcher + $root.withdraw # hide root window + Thread.start{ + loop do + count = 0 + $root.winfo_children.each{|w| + count += 1 if w.kind_of?(TkToplevel) + } + $root.destroy if count == 0 + end + } +end + +######################################### +# start eventloop +Tk.mainloop + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README new file mode 100644 index 0000000..42bec16 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README @@ -0,0 +1,54 @@ + + Ruby/Tk widget-demo + version 1.2 ( 2000/04/08 ) + ±Ê°æ¡÷ÃÎǽ¡¥¶å¹©Âç (nagai@ai.kyutech.ac.jp) + +ɸ½àÇÛÉۤΠTcl/Tk ³ÈÄ¥¥Ñ¥Ã¥±¡¼¥¸¤ò¼è¤ê¹þ¤ó¤À Ruby (°Ê²¼ Ruby/Tk ¤È¸Æ¤Ó¤Þ¤¹) +¤Ç¤Ï¡¤Tk widget ¤òÍѤ¤¤¿ GUI ¤ÎºîÀ®¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥¼ÂºÝ¤Ë GUI ¤òºîÀ® +¤·¤Æ¤¤¤¯¾ì¹ç¤Ë¤ÏÍÍ¡¹¤Ê¼ÂÎ㤬¥µ¥ó¥×¥ë¤È¤·¤Æ¸ºß¤¹¤ë¤ÈÊØÍø¤Ê¤Î¤Ç¤¹¤¬¡¤Ruby/Tk +¤Ë¤Ï¤½¤Î¤è¤¦¤ÊŬÅö¤Ê¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È½¸¹ç¤Ï¸ºß¤·¤Þ¤»¤ó¤Ç¤·¤¿¡¥¤½¤ì¤ËÂФ·¡¤ +³ÈÄ¥¥Ñ¥Ã¥±¡¼¥¸¤Î¸µ¤Ç¤¢¤ë Tcl/Tk ¤Ë¤Ï¡¤Tk widget ¤òÍѤ¤¤Æ¤É¤Î¤è¤¦¤Ê¤³¤È¤¬¤Ç +¤­¤ë¤«¤ò¼¨¤¹¤â¤Î¤È¤·¤Æ widget-demo ¤¬Â¸ºß¤·¤ª¤ê¡¤Tcl/Tk ¤òÍѤ¤¤¿ GUI ¤ÎºîÀ® +¤ò½¬ÆÀ¤¹¤ëºÝ¤ÎÂåɽŪ¥µ¥ó¥×¥ë¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ËÜ¥¢¡¼¥«¥¤¥Ö¤Ï¡¤Ruby/Tk ¤Î½¬ÆÀ¤Î +¤¿¤á¤ÎÂåɽŪ¤Ê¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È¤È¤¹¤Ù¤¯¡¤Tcl/Tk ¤Î widget-demo ¤ò°Ü¿¢¤·¤¿¤â +¤Î¤Ç¤¹¡¥ + +º£²ó¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï ruby-1.4.x ¤ËÂбþ¤È¤·¤Æ¤ª¤­¤Þ¤¹¤¬¡¤µì¥Ð¡¼¥¸¥ç¥ó¤ËÈæ¤Ù¤Æ¡¤ +¤Û¤È¤ó¤ÉÊѹ¹¤Ï¤¢¤ê¤Þ¤»¤ó¡¥ruby-1.1c2 °Ê¾å¤Ê¤éÆ°¤¯¤È»×¤¤¤Þ¤¹¡¥ruby-1.5.x ¤Ë¤Ä +¤¤¤Æ¤Ï¥Æ¥¹¥È¤·¤Æ¤¤¤Þ¤»¤ó¡¥¤½¤Î¤¿¤á¡¤Èó¸ß´¹¤Î±Æ¶Á¤¬½Ð¤ë¤³¤È¤¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤» +¤ó¤¬¡¤¤½¤Î¾ì¹ç¤Ç¤â¾¯¤·¤Î½¤Àµ¤ÇÆ°¤«¤»¤ë¤È»×¤¤¤Þ¤¹¡¥ÁȤ߹þ¤à Tk ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¤ +4.2 ¤Ç¤â 8.0 ¤Ç¤â½¤Àµ¤Ê¤¯Æ°¤«¤»¤ë¤Ï¤º¤Ç¤¹¡¥¤¿¤À¤·¡¤ÆüËܸìÈǤǤΰܿ¢¤È¤Ê¤Ã¤Æ +¤¤¤ë¤¿¤á¡¤ÆüËܸ첽¤µ¤ì¤¿ Tk ¤ò¤´ÍøÍѤ¯¤À¤µ¤¤¡¥¥¹¥¯¥ê¥×¥È¤Î¥Æ¥¹¥È¤Ï¡¤µì¥Ð¡¼¥¸¥ç +¥ó¤ÎºÝ¤Ë Tk4.2jp ¤È Tk8.0jp ¤Î¾å¤Ç¹Ô¤Ã¤Æ¤¤¤Þ¤¹ (´°àú¤Ë¤Ç¤Ï¤Ê¤¤¤Ç¤¹¤¬)¡¥º£²ó +¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï ruby-1.4.x + Tk8.0jp ¾å¤Ç¤Î´Êñ¤Ê¥Æ¥¹¥È¤·¤«¹Ô¤Ã¤Æ¤¤¤Þ¤»¤ó¤¬¡¤ +½¤Àµ¤È¤¤¤¦¤Û¤É¤Î½¤Àµ¤Ï¤·¤Æ¤¤¤Þ¤»¤ó¤Î¤ÇÌäÂê¤Ï¤Ê¤¤¤È¹Í¤¨¤Æ¤¤¤Þ¤¹¡¥ + +ËÜ¥¢¡¼¥«¥¤¥Ö¤Ë´Þ¤Þ¤ì¤ë¥¹¥¯¥ê¥×¥È¤Î¿¤¯¤Ï¡¤¸µ¤È¤Ê¤Ã¤Æ¤¤¤ë Tcl/Tk ÈǤËÈæ³ÓŪ¶á +¤¤¥¹¥¯¥ê¥×¥Èµ­½Ò¤È¤Ê¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¡¥¤½¤Î¤¿¤á¡¤Ruby/Tk ¤Î¥µ¥ó¥×¥ë¤È¸À¤¦¤Ë +¤Ï¡¤¤¢¤Þ¤ê Ruby ¤é¤·¤¯¤Ê¤¤¤È¤â¸À¤¨¤ë¤Ç¤·¤ç¤¦¡¥¤Ë¤â¤«¤«¤ï¤é¤º¡¤¤½¤Î¤è¤¦¤Êµ­½Ò +¤ò¼è¤Ã¤Æ¤¤¤ëÍýͳ¤Ï¡¤Ruby/Tk ¤Î¥É¥­¥å¥á¥ó¥ÈÉÔ­¤Ë¤¢¤ê¤Þ¤¹¡¥ + +Tcl/Tk ¤Ë¤ÏŬÅö¤Ê»²¹Í½ñ¤¬²¿ºý¤«Â¸ºß¤·¤Æ¤¤¤Þ¤¹¤«¤é¡¤Ruby/Tk ¥¹¥¯¥ê¥×¥È¤òºîÀ® +¤¹¤ëºÝ¤Ï¡¤¤½¤Î¤è¤¦¤Ê Tcl/Tk ¤Î»²¹Í½ñ¤Ç¾ðÊó¤òÊ䤤¤Ê¤¬¤éºîÀ®¤¹¤ë¤³¤È¤Ë¤Ê¤ë¤È»× +¤¤¤Þ¤¹¡¥³Æ widget ¤Î»ÈÍÑÎã¤È¤·¤Æ¡¤Tcl/Tk ¤Î widget-demo ¤ò»²¾È¤¹¤ë¤³¤È¤â¤¢¤ë +¤Ç¤·¤ç¤¦¡¥Ruby/Tk ÈǤε­½Ò¤ò widget-demo ¤ò Tcl/Tk ÈǤε­½Ò¤Ë¶á¤¤¤â¤Î¤Ë¤·¤Æ +¤ª¤±¤Ð¡¤¤½¤ÎÂÐÈæ¤Ë¤è¤Ã¤Æ¡¤Ruby/Tk ¤ÎÍý²ò¤òÁá¤á¤ë¤³¤È¤¬¤Ç¤­¤ë¤È¹Í¤¨¤é¤ì¤Þ¤¹¡¥ +°ìö Ruby/Tk ¤Ç¤Î ³Æ widget ¤Î»ÈÍÑÊýË¡¤ò½¬ÆÀ¤·¤Æ¤·¤Þ¤¨¤Ð¡¤Ruby ¤é¤·¤¤¥¹¥¯¥ê +¥×¥È¤òºîÀ®¤¹¤ë¤³¤È¤ÏÆñ¤·¤¯¤Ê¤¤¤Ç¤·¤ç¤¦¡¥ËÜ¥¢¡¼¥«¥¤¥Ö¤Î¥¹¥¯¥ê¥×¥È¤Ï¡¤Ruby/Tk +¤òºÇ½é¤Ë½¬ÆÀ¤¹¤ë¤Þ¤Ç¤ÎƧÂæ¤È¤·¤ÆÍøÍѤ·¤Æ¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡¥ + +widget-demo ¤Î°Ü¿¢¤Ë¤¢¤¿¤Ã¤Æ¤Ï¡¤¼¡¤ÎÊý¤Ë¤â°Ü¿¢¤·¤¿¥¹¥¯¥ê¥×¥È¤òÄ󶡤·¤Æ¤¤¤¿¤À +¤­¤Þ¤·¤¿¡¥¤³¤³¤Ë´¶¼Õ¤Î°Õ¤òɽ¤·¤Þ¤¹¡¥ + + ΩÀС÷JAIST (ttate@jaist.ac.jp) ¤µ¤ó + Ê¿¾¾¾Í»Ë (hiramatu@cdrom.co.jp) ¤µ¤ó + +Ê¿¾¾¤µ¤ó¤Ë¤è¤ë Ruby/Tk ÆþÌç¤Î Web page (http://www.cdrom.co.jp/~hiramatu/) +¤â Ruby/Tk ¤Î½¬ÆÀ¤ËÍ­ÍѤȻפ¨¤Þ¤¹¤Î¤Ç¡¤¤¼¤Ò¤´»²¾È¤¯¤À¤µ¤¤¡¥ + +¤Þ¤¿¡¤Á°¶¶ (maebashi@iij.ad.jp) ¤µ¤ó¤ò¤Ï¤¸¤á¤È¤·¤Æ¡¤widget-demo ¤Î°Ü¿¢¤ËºÝ¤· +¤ÆɬÍפȤʤä¿ Ruby ¤Î Tk ´ØÏ¢¥é¥¤¥Ö¥é¥ê½¤Àµ¤Ë¤Ä¤¤¤Æ¡¤ÌäÂêÅÀ¡¤¥Ð¥°¤Î»ØŦ¤ò¤· +¤Æ¤¤¤¿¤À¤¤¤¿Êý¡¹¤Ë¤â´¶¼ÕÃפ·¤Þ¤¹¡¥ + +¤½¤·¤ÆºÇ¸å¤ËºÇÂç¤Î´¶¼Õ¤ò Ruby À߷׼ԤΠ¤Þ¤Ä¤â¤È ¤æ¤­¤Ò¤í (matz@netlab.co.jp) +¤µ¤ó¤ËÊû¤²¤¿¤¤¤È»×¤¤¤Þ¤¹¡¥ diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README.1st b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README.1st new file mode 100644 index 0000000..60b278d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/README.1st @@ -0,0 +1,20 @@ +¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ï Ruby/Tk ¤Î¥Ç¥â¥¹¥¯¥ê¥×¥È¤¬¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡¥ + +'.rb' ¤È¤¤¤¦³ÈÄ¥»Ò¤ò»ý¤Ã¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Ï¡¤¥é¥ó¥Á¥ã¨¡¥¹¥¯¥ê¥×¥È¤Ç +¤¢¤ë 'widget' ¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ë¥µ¥Ö¥¹¥¯¥ê¥×¥È¤Ç¤¹¡¥¤½¤ì¤¾¤ìÆÈΩ¤Ë +¤ÏÆ°¤­¤Þ¤»¤ó¡¥'widget' ¥¹¥¯¥ê¥×¥È¤«¤é¸Æ¤Ó½Ð¤·¤Æ¤¯¤À¤µ¤¤¡¥ + +¤â¤·¥é¥ó¥Á¥ã¨¡¥¹¥¯¥ê¥×¥È 'widget' ¤Îµ¯Æ°¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î¥µ¥Ö¥¹ +¥¯¥ê¥×¥È¤òµ¯Æ°¤·¤¿¤±¤ì¤Ð¡¤¤½¤Î¥µ¥Ö¥¹¥¯¥ê¥×¥È¤Î̾Á°¤ò°ú¿ô¤È¤·¤ÆÍ¿ +¤¨¤Æ¤¯¤À¤µ¤¤¡¥ +( Îã: /usr/local/bin/ruby widget button.rb entry1.rb text.rb ) +¥µ¥Ö¥¹¥¯¥ê¥×¥È¤Î³ÈÄ¥»Ò '.rb' ¤Ï¾Êά¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡¥ +( Îã: /usr/local/bin/ruby widget button entry1 text ) + +¤â¤·¥é¥ó¥Á¥ã¨¡¥¹¥¯¥ê¥×¥È¤Î¥¦¥£¥ó¥É¥¦¤¬É¬Íפʤ¤¾ì¹ç¤Ë¤Ï¡¤'-n' ¥ª +¥×¥·¥ç¥ó¤òÍ¿¤¨¤Æ¤¯¤À¤µ¤¤¡¥ +( Îã: /usr/local/bin/ruby widget -n button.rb entry1.rb text.rb ) + +¾¤Î¥Õ¥¡¥¤¥ë (browse1 ¤ä hello ¤Ê¤É) ¤ÏñÆȤÇÆ°¤«¤¹¤³¤È¤¬²Äǽ¤Ç¤¹¡¥ + + 2004/04/14 Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/anilabel.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/anilabel.rb new file mode 100644 index 0000000..aee57f9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/anilabel.rb @@ -0,0 +1,177 @@ +# -*- coding: euc-jp -*- +# +# animated label widget demo (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($anilabel_demo) && $anilabel_demo + $anilabel_demo.destroy + $anilabel_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$anilabel_demo = TkToplevel.new {|w| + title("Animated Label Demonstration") + iconname("anilabel") + positionWindow(w) +} + +base_frame = TkFrame.new($anilabel_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï4¤Ä¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥é¥Ù¥ë¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£º¸Â¦¤Ë¤¢¤ë¥é¥Ù¥ë¤Ï¡¢ÆâÉô¤Î¥Æ¥­¥¹¥È¥á¥Ã¥»¡¼¥¸¤ò¥¹¥¯¥í¡¼¥ë¤·¤¿¤è¤¦¤Ë¸«¤»¤ë¤³¤È¤ÇÆ°¤­¤òÉÕ¤±¤Æ¤¤¤Þ¤¹¡£±¦Â¦¤Î¥é¥Ù¥ë¤Ï¡¢É½¼¨¤¹¤ë¥¤¥á¡¼¥¸¤òÊѲ½¤µ¤»¤ë¤³¤È¤ÇÆ°¤­¤òÍ¿¤¨¤Æ¤¤¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $anilabel_demo + $anilabel_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'anilabel'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# label demo Íѥե졼¥àÀ¸À® +f_left = TkLabelFrame.new(base_frame, :text=>'Scrolling Texts') +f_right = TkLabelFrame.new(base_frame, :text=>'GIF Image') +Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both', + 'padx'=>10, 'pady'=>10) + +# animated label +class AnimatedTextLabel < TkLabel + def initialize(*args) + super(*args) + @timer = TkTimer.new{ _animation_callback } + @timer.loop_exec = -1 + # bind('Destroy'){ @timer.stop } + @btag = TkBindTag.new('Destroy'){ @timer.stop } + self.bindtags_unshift(@btag) + end + + def _animation_callback() + txt = self.text + self.text = (txt[1..-1] << txt[0]) + end + private :_animation_callback + + def start(interval) + @timer.set_interval(interval) + @timer.start + end + + def stop + @timer.stop + end +end + +# animated image +class AnimatedImageLabel < AnimatedTextLabel + def initialize(*args) + super(*args) + @destroy_image = false + @btag.bind_append('Destroy'){ + if @destroy_image + begin + self.image.delete + rescue + end + end + } + end + attr_accessor :destroy_image + + def _animation_callback() + img = self.image + + fmt = img.format + if fmt.kind_of?(Array) + if fmt[1].kind_of?(Hash) + # fmt == ['GIF', {'index'=>idx}] + idx = fmt[1]['index'] + else + # fmt == ['GIF', '-index', idx] :: Ruby1.8.2 returns this. + idx = fmt[2] + end + elsif fmt.kind_of?(String) && fmt =~ /GIF -index (\d+)/ + idx = $1.to_i + else + idx = -1 + end + + begin + img.format("GIF -index #{idx + 1}") + rescue => e + img.format("GIF -index 0") + end + end + private :_animation_callback +end + +# label À¸À® +l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge, + :font=>{:family=>'Courier', :size=>10}) +l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove, + :font=>{:family=>'Courier', :size=>10}) +l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat, + :font=>{:family=>'Courier', :size=>10}, :width=>18) +Tk.pack(l1, l2, l3, + :side=>:top, :expand=>true, :anchor=>:w, :padx=>10, :pady=>10) + +limg = AnimatedImageLabel.new(f_right, :borderwidth=>0) +limg.pack(:side=>:top, :expand=>true, :padx=>10, :pady=>10) + +# base64-encoded animated GIF file +tclPowerdData = <'GIF', :data=>tclPowerdData)).start(100) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/aniwave.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/aniwave.rb new file mode 100644 index 0000000..8fa14f6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/aniwave.rb @@ -0,0 +1,120 @@ +# -*- coding: euc-jp -*- +# +# animated wave demo (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +# destroy toplevel widget for this demo script +if defined?($aniwave_demo) && $aniwave_demo + $aniwave_demo.destroy + $aniwave_demo = nil +end + +# create toplevel widget +$aniwave_demo = TkToplevel.new {|w| + title("Animated Wave Demonstration") + iconname("aniwave") + positionWindow(w) +} + +base_frame = TkFrame.new($aniwave_demo).pack(:fill=>:both, :expand=>true) + +# create label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text '¤³¤Î¥Ç¥â¤Ç¤Ï¡¢¥é¥¤¥ó¥¢¥¤¥Æ¥à¤¬°ì¤Ä¤À¤±ÉÁ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹¥¦¥£¥¸¥§¥Ã¥È¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥¢¥Ë¥á¡¼¥·¥ç¥ó½èÍý¤Ï¡¢¤½¤Î¥é¥¤¥ó¥¢¥¤¥Æ¥à¤ÎºÂɸÃͤòÊѹ¹¤¹¤ë¤³¤È¤Ç¼Â¸½¤·¤Æ¤¤¤Þ¤¹¡£' +} +msg.pack('side'=>'top') + +# create frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $aniwave_demo + $aniwave_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'aniwave'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# animated wave +class AnimatedWaveDemo + def initialize(frame, dir=:left) + @direction = dir + + # create canvas widget + @c = TkCanvas.new(frame, :width=>300, :height=>200, + :background=>'black') + @c.pack(:padx=>10, :pady=>10, :expand=>true) + + # Creates a coordinates list of a wave. + @waveCoords = [] + @backupCoords = [] + n = 0 + (-10..300).step(5){|n| @waveCoords << [n, 100]; @backupCoords << [n, 100] } + n = 305 + @waveCoords << [n, 0]; @backupCoords << [n, 0] + @waveCoords << [n+5, 200]; @backupCoords << [n+5, 200] + @coordsLen = @waveCoords.length + + # Create a smoothed line and arrange for its coordinates to be the + # contents of the variable waveCoords. + @line = TkcLine.new(@c, @waveCoords, + :width=>1, :fill=>'green', :smooth=>true) + + # Main animation "loop". + # Theoretically 100 frames-per-second (==10ms between frames) + @timer = TkTimer.new(10){ basicMotion; reverser } + + # Arrange for the animation loop to stop when the canvas is deleted + @c.bindtags_unshift(TkBindTag.new('Destroy'){ @timer.stop }) + end + + # Basic motion handler. Given what direction the wave is travelling + # in, it advances the y coordinates in the coordinate-list one step in + # that direction. + def basicMotion + @backupCoords, @waveCoords = @waveCoords, @backupCoords + (0...@coordsLen).each{|idx| + if @direction == :left + @waveCoords[idx][1] = @backupCoords[(idx+1 == @coordsLen)? 0: idx+1][1] + else + @waveCoords[idx][1] = @backupCoords[(idx == 0)? -1: idx-1][1] + end + } + @line.coords(@waveCoords) + end + + # Oscillation handler. This detects whether to reverse the direction + # of the wave by checking to see if the peak of the wave has moved off + # the screen (whose size we know already.) + def reverser + if @waveCoords[0][1] < 10 + @direction = :right + elsif @waveCoords[-1][1] < 10 + @direction = :left + end + end + + # animation control + def move + @timer.start + end + + def stop + @timer.stop + end +end + +# Start the animation processing +AnimatedWaveDemo.new(base_frame, :left).move diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/arrow.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/arrow.rb new file mode 100644 index 0000000..3c49e67 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/arrow.rb @@ -0,0 +1,247 @@ +# -*- coding: euc-jp -*- +# +# arrowhead widget demo (called by 'widget') +# + +# arrowSetup -- +# This method regenerates all the text and graphics in the canvas +# window. It's called when the canvas is initially created, and also +# whenever any of the parameters of the arrow head are changed +# interactively. +# +# Arguments: +# c - Name of the canvas widget. + +def arrowSetup(c) + v = $demo_arrowInfo + + # Remember the current box, if there is one. + tags = c.gettags('current') + if tags != [] + cur = tags.find{|t| t.kind_of?(String) && t =~ /^box[1-3]$/ } + else + cur = nil + end + + # Create the arrow and outline. + c.delete('all') + TkcLine.new(c, v.x1, v.y, v.x2, v.y, + { 'width'=>10 * v.width, + 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c], + 'arrow'=>'last' + }.update(v.bigLineStyle) ) + xtip = v.x2 - 10*v.b + deltaY = 10*v.c + 5*v.width + TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY, + v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y, + 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round') + + # Create the boxes for reshaping the line and arrowhead. + TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5, + {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) ) + TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5, + {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) ) + TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5, + {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) ) + c.itemconfigure cur, v.activeStyle if cur + + # Create three arrows in actual size with the same parameters + TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2) + tmp = v.x2+100 + TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width, + 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c]) + + # Create a bunch of other arrows and text items showing the + # current dimensions. + tmp = v.x2+10 + TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w') + tmp = v.x1-10 + TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e') + tmp = v.y+5*v.width+10*v.c+10 + TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n') + tmp = tmp+25 + TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp, + 'arrow'=>'both', 'arrowshape'=>v.smallTips) + TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n') + + if $tk_version =~ /^4.*/ + TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w', + 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*') + TkcText.new(c, v.x1, 330, + 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",'anchor'=>'w', + 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*') + else + TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w', + 'font'=>'Helvetica 18') + TkcText.new(c, v.x1, 330, + 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", + 'anchor'=>'w', 'font'=>'Helvetica 18') + end + + v.count += 1 +end + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($arrow_demo) && $arrow_demo + $arrow_demo.destroy + $arrow_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$arrow_demo = TkToplevel.new {|w| + title("Arrowhead Editor Demonstration") + iconname("arrow") + positionWindow(w) +} + +base_frame = TkFrame.new($arrow_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"¤³¤Î widget ¤Ç¡¢¥­¥ã¥ó¥Ð¥¹¤Ç»È¤ï¤ì¤ë¥é¥¤¥ó¤Ë¤Ä¤¤¤ÆÍÍ¡¹¤ÊÉý¤äÌð°õ¤ÎƬ¤Î·Á¤ò»î¤·¤Æ¤ß¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Àþ¤ÎÉý¤äÌð°õ¤Î·Á¤òÊѤ¨¤ë¤Ë¤Ï¡¢³ÈÂ礵¤ì¤¿Ìð°õ¤Ë¤Ä¤¤¤Æ¤¤¤ë 3¤Ä¤Î»Í³Ñ¤ò¥É¥é¥Ã¥°¤·¤Æ¤¯¤À¤µ¤¤¡£±¦Â¦¤ÎÌð°õ¤ÏÉáÄ̤ÎÂ礭¤µ¤Ç¤Î¥µ¥ó¥×¥ë¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£²¼¤Î¥Æ¥­¥¹¥È¤Ï¥é¥¤¥ó¥¢¥¤¥Æ¥à¤ËÂФ¹¤ëÀßÄꥪ¥×¥·¥ç¥ó¤Ç¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$arrow_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $arrow_demo + $arrow_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'arrow'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas ÀßÄê +$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350, + 'relief'=>'sunken', 'borderwidth'=>2) +$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both') + +# ÃÍÀßÄê +unless Struct.const_defined?("ArrowInfo") + $demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc, + :x1, :x2, :y, :smallTips, :count, + :bigLineStyle, :boxStyle, :activeStyle).new +end +$demo_arrowInfo.a = 8 +$demo_arrowInfo.b = 10 +$demo_arrowInfo.c = 3 +$demo_arrowInfo.width = 2 +$demo_arrowInfo.motionProc = proc{} +$demo_arrowInfo.x1 = 40 +$demo_arrowInfo.x2 = 350 +$demo_arrowInfo.y = 150 +$demo_arrowInfo.smallTips = [5, 5, 2] +$demo_arrowInfo.count = 0 +if TkWinfo.depth($arrow_canvas) > 1 + $demo_arrowInfo.bigLineStyle = {'fill'=>'SkyBlue1'} + $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1} + $demo_arrowInfo.activeStyle = {'fill'=>'red', 'outline'=>'black', 'width'=>1} +else + $demo_arrowInfo.bigLineStyle = {'fill'=>'black', + 'stipple'=>'@'+[$demo_dir,'..','images','grey.25'].join(File::Separator)} + $demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1} + $demo_arrowInfo.activeStyle = {'fill'=>'black','outline'=>'black','width'=>1} +end +$arrowTag_box = TkcTag.new($arrow_canvas) +arrowSetup $arrow_canvas +$arrowTag_box.bind('Enter', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.activeStyle)}) +$arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.boxStyle)}) +$arrowTag_box.bind('B1-Enter', proc{}) +$arrowTag_box.bind('B1-Leave', proc{}) +$arrow_canvas.itembind('box1', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove1 $arrow_canvas, x, y}}) +$arrow_canvas.itembind('box2', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove2 $arrow_canvas, x, y}}) +$arrow_canvas.itembind('box3', '1', + proc{$demo_arrowInfo.motionProc \ + = proc{|x,y| arrowMove3 $arrow_canvas, x, y}}) +$arrowTag_box.bind('B1-Motion', + proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y") +$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas}) + +# arrowMove1 -- +# This method is called for each mouse motion event on box1 (the +# one at the vertex of the arrow). It updates the controlling parameters +# for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove1(c,x,y) + v = $demo_arrowInfo + newA = (v.x2+5-c.canvasx(x).round)/10 + newA = 0 if newA < 0 + newA = 25 if newA > 25 + if newA != v.a + c.move('box1', 10*(v.a-newA), 0) + v.a = newA + end +end + +# arrowMove2 -- +# This method is called for each mouse motion event on box2 (the +# one at the trailing tip of the arrowhead). It updates the controlling +# parameters for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove2(c,x,y) + v = $demo_arrowInfo + newB = (v.x2+5-c.canvasx(x).round)/10 + newB = 0 if newB < 0 + newB = 25 if newB > 25 + newC = (v.y+5-c.canvasy(y).round-5*v.width)/10 + newC = 0 if newC < 0 + newC = 20 if newC > 20 + if newB != v.b || newC != v.c + c.move('box2', 10*(v.b-newB), 10*(v.c-newC)) + v.b = newB + v.c = newC + end +end + +# arrowMove3 -- +# This method is called for each mouse motion event on box3 (the +# one that controls the thickness of the line). It updates the +# controlling parameters for the line and arrowhead. +# +# Arguments: +# c - The name of the canvas window. +# x, y - The coordinates of the mouse. + +def arrowMove3(c,x,y) + v = $demo_arrowInfo + newWidth = (v.y+2-c.canvasy(y).round)/5 + newWidth = 0 if newWidth < 0 + newWidth = 20 if newWidth > 20 + if newWidth != v.width + c.move('box3', 0, 5*(v.width-newWidth)) + v.width = newWidth + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bind.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bind.rb new file mode 100644 index 0000000..a1bcfdd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bind.rb @@ -0,0 +1,125 @@ +# -*- coding: euc-jp -*- +# +# text (tag bindings) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($bind_demo) && $bind_demo + $bind_demo.destroy + $bind_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$bind_demo = TkToplevel.new {|w| + title("Text Demonstration - Tag Bindings") + iconname("bind") + positionWindow(w) +} + +base_frame = TkFrame.new($bind_demo).pack(:fill=>:both, :expand=>true) + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $bind_demo + $bind_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'bind'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# bind Íѥ᥽¥Ã¥É +def tag_binding_for_bind_demo(tag, enter_style, leave_style) + tag.bind('Any-Enter', proc{tag.configure enter_style}) + tag.bind('Any-Leave', proc{tag.configure leave_style}) +end + +# text À¸À® +txt = TkText.new(base_frame){|t| + # À¸À® + setgrid 'true' + #width 60 + #height 24 + font $font + wrap 'word' + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # ¥¹¥¿¥¤¥ëÀßÄê + if TkWinfo.depth($root).to_i > 1 + tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised', + 'borderwidth'=>1} + tagstyle_normal = {'background'=>'', 'relief'=>'flat'} + else + tagstyle_bold = {'foreground'=>'white', 'background'=>'black'} + tagstyle_normal = {'foreground'=>'', 'background'=>''} + end + + # ¥Æ¥­¥¹¥ÈÁÞÆþ + insert 'insert', "¥Æ¥­¥¹¥Èwidget¤Îɽ¼¨¥¹¥¿¥¤¥ë¤òÀ©¸æ¤¹¤ë¤Î¤ÈƱ¤¸¥¿¥°¤Î¥á¥«¥Ë¥º¥à¤ò»È¤Ã¤Æ¡¢¥Æ¥­¥¹¥È¤ËTcl¤Î¥³¥Þ¥ó¥É¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤ì¤Ë¤è¤ê¡¢¥Þ¥¦¥¹¤ä¥­¡¼¥Ü¡¼¥É¤Î¥¢¥¯¥·¥ç¥ó¤ÇÆÃÄê¤ÎTcl¤Î¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£Î㤨¤Ð¡¢²¼¤Î¥­¥ã¥ó¥Ð¥¹¤Î¥Ç¥â¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤ÎÀâÌÀʸ¤Ë¤Ï¤½¤Î¤è¤¦¤Ê¥¿¥°¤¬¤Ä¤¤¤Æ¤¤¤Þ¤¹¡£¥Þ¥¦¥¹¤òÀâÌÀʸ¤Î¾å¤Ë»ý¤Ã¤Æ¤¤¤¯¤ÈÀâÌÀʸ¤¬¸÷¤ê¡¢¥Ü¥¿¥ó1¤ò²¡¤¹¤È¤½¤ÎÀâÌÀ¤Î¥Ç¥â¤¬»Ï¤Þ¤ê¤Þ¤¹¡£ + +" + insert('end', '1. ¥­¥ã¥ó¥Ð¥¹ widget ¤Ëºî¤ë¤³¤È¤Î¤Ç¤­¤ë¥¢¥¤¥Æ¥à¤Î¼ïÎàÁ´¤Æ¤Ë´Ø¤¹¤ë¥µ¥ó¥×¥ë¡£', (d1 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '2. ´Êñ¤Ê 2¼¡¸µ¤Î¥×¥í¥Ã¥È¡£¥Ç¡¼¥¿¤òɽ¤¹ÅÀ¤òÆ°¤«¤¹¤³¤È¤¬¤Ç¤­¤ë¡£', (d2 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '3. ¥Æ¥­¥¹¥È¥¢¥¤¥Æ¥à¤Î¥¢¥ó¥«¡¼¤È¹Ô·¤¨¡£', + (d3 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '4. ¥é¥¤¥ó¥¢¥¤¥Æ¥à¤Î¤¿¤á¤ÎÌð°õ¤ÎƬ¤Î·Á¤Î¥¨¥Ç¥£¥¿¡£', + (d4 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', '5. ¥¿¥Ö¥¹¥È¥Ã¥×¤òÊѹ¹¤¹¤ë¤¿¤á¤Îµ¡Ç½¤Ä¤­¤Î¥ë¡¼¥é¡¼¡£', + (d5 = TkTextTag.new(t)) ) + insert('end', "\n\n") + insert('end', + '6. ¥­¥ã¥ó¥Ð¥¹¤¬¤É¤¦¤ä¤Ã¤Æ¥¹¥¯¥í¡¼¥ë¤¹¤ë¤Î¤«¤ò¼¨¤¹¥°¥ê¥Ã¥É¡£', + (d6 = TkTextTag.new(t)) ) + + # binding + [d1, d2, d3, d4, d5, d6].each{|tag| + tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal) + } + d1.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, 'items.rb') + }) + d2.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, 'plot.rb') + }) + d3.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, 'ctext.rb') + }) + d4.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, 'arrow.rb') + }) + d5.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, 'ruler.rb') + }) + d6.bind('1', + proc{ + eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, 'cscroll.rb') + }) + + TkTextMarkInsert.new(t, '0.0') + configure('state','disabled') +} + +txt.width 60 +txt.height 24 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bitmap.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bitmap.rb new file mode 100644 index 0000000..b6b0e54 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/bitmap.rb @@ -0,0 +1,74 @@ +# -*- coding: euc-jp -*- +# +# bitmap widget demo (called by 'widget') +# + +# bitmapRow -- +# Create a row of bitmap items in a window. +# +# Arguments: +# w - The parent window that is to contain the row. +# args - The names of one or more bitmaps, which will be displayed +# in a new row across the bottom of w along with their +# names. + +def bitmapRow(w,*args) + TkFrame.new(w){|row| + pack('side'=>'top', 'fill'=>'both') + for bitmap in args + TkFrame.new(row){|base| + pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c') + TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom') + Tk::Label.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom') + } + end + } +end + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($bitmap_demo) && $bitmap_demo + $bitmap_demo.destroy + $bitmap_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$bitmap_demo = TkToplevel.new {|w| + title("Bitmap Demonstration") + iconname("bitmap") + positionWindow(w) +} + +base_frame = TkFrame.new($bitmap_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¡¢Tk ¤ËÁȤ߹þ¤Þ¤ì¤¿¤¹¤Ù¤Æ¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×¤¬¡¢¤½¤ì¤é¤Î̾Á°¤È¶¦¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Tcl ¤Î¥¹¥¯¥ê¥×¥ÈÃæ¤Ç¤Ï¡¢¤½¤ì¤¾¤ì¤Î̾Á°¤òÍѤ¤¤Æ»²¾È¤·¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$bitmap_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $bitmap_demo + $bitmap_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'bitmap'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$bitmap_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame ÀßÄê +TkFrame.new(base_frame){|f| + bitmapRow(f,'error','gray25','gray50','hourglass') + bitmapRow(f,'info','question','questhead','warning') + pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both') +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse1 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse1 new file mode 100644 index 0000000..03e2510 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse1 @@ -0,0 +1,63 @@ +#!/usr/bin/env ruby + +# browse -- +# This script generates a directory browser, which lists the working +# directory and allow you to open files or subdirectories by +# double-clicking. + +require 'tk' + +# Create a scrollbar on the right side of the main window and a listbox +# on the left side. + +listbox = TkListbox.new(nil, 'relief'=>'sunken', + 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l| + TkScrollbar.new(nil, 'command'=>proc{|*args| l.yview *args}) {|s| + pack('side'=>'right', 'fill'=>'y') + l.yscrollcommand(proc{|first,last| s.set(first,last)}) + } + + pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') +} + +root = TkRoot.new +root.minsize(1,1) + +# The procedure below is invoked to open a browser on a given file; if the +# file is a directory then another instance of this program is invoked; if +# the file is a regular file then the Mx editor is invoked to display +# the file. + +def browse (dir, file) + file = dir + File::Separator + file if dir != '.' + type = File.ftype(file) + if type == 'directory' + system($0 + ' ' + file + ' &') + else + if type == 'file' + if ENV['EDITOR'] + system(ENV['EDITOR'] + ' ' + file + ' &') + else + system('xedit ' + file + ' &') + end + else + STDOUT.print "\"#{file}\" isn't a directory or regular file" + end + end +end + +# Fill the listbox with a list of all the files in the directory (run +# the "ls" command to get that information). + +dir = ARGV[0] ? ARGV[0] : '.' +open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname| + listbox.insert('end', fname.chomp) +} + +# Set up bindings for the browser. + +Tk.bind_all('Control-c', proc{root.destroy}) +listbox.bind('Double-Button-1', + proc{TkSelection.get.each{|f| browse dir, f}}) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse2 new file mode 100644 index 0000000..edad04d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/browse2 @@ -0,0 +1,82 @@ +#!/usr/bin/env ruby + +# browse -- +# This script generates a directory browser, which lists the working +# directory and allow you to open files or subdirectories by +# double-clicking. + +require 'tk' + +class Browse + BROWSE_WIN_COUNTER = TkVariable.new(0) + + def initialize(dir) + BROWSE_WIN_COUNTER.value = BROWSE_WIN_COUNTER.to_i + 1 + + # create base frame + base = TkToplevel.new { + minsize(1,1) + title('Browse : ' + dir) + } + + # Create a scrollbar on the right side of the main window and a listbox + # on the left side. + list = TkListbox.new(base, 'relief'=>'sunken', + 'width'=>20, 'height'=>20, 'setgrid'=>'yes') {|l| + TkScrollbar.new(base, 'command'=>proc{|*args| l.yview *args}) {|s| + pack('side'=>'right', 'fill'=>'y') + l.yscrollcommand(proc{|first,last| s.set(first,last)}) + } + + pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') + + # Fill the listbox with a list of all the files in the directory (run + # the "ls" command to get that information). + open("|ls -a #{dir}", 'r'){|fid| fid.readlines}.each{|fname| + l.insert('end', fname.chomp) + } + + } + + # Set up bindings for the browser. + base.bind('Destroy', proc{ + Browse::BROWSE_WIN_COUNTER.value = \ + Browse::BROWSE_WIN_COUNTER.to_i - 1 + }) + base.bind('Control-c', proc{base.destroy}) + list.bind('Double-Button-1', + proc{TkSelection.get.each{|f| self.browse dir, f}}) + end + + # The method below is invoked to open a browser on a given file; if the + # file is a directory then another instance of this program is invoked; if + # the file is a regular file then the Mx editor is invoked to display + # the file. + def browse (dir, file) + file = dir + File::Separator + file if dir != '.' + type = File.ftype(file) + if type == 'directory' + Browse.new(file) + else + if type == 'file' + if ENV['EDITOR'] + system(ENV['EDITOR'] + ' ' + file + ' &') + else + system('xedit ' + file + ' &') + end + else + STDOUT.print "\"#{file}\" isn't a directory or regular file" + end + end + end + +end + +Browse.new(ARGV[0] ? ARGV[0] : '.') + +TkRoot.new { + withdraw + Browse::BROWSE_WIN_COUNTER.trace('w', proc{exit if Browse::BROWSE_WIN_COUNTER.to_i == 0}) +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/button.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/button.rb new file mode 100644 index 0000000..18e4200 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/button.rb @@ -0,0 +1,83 @@ +# -*- coding: euc-jp -*- +# +# button widget demo (called by 'widget') +# +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($button_demo) && $button_demo + $button_demo.destroy + $button_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$button_demo = TkToplevel.new {|w| + title("Button Demonstration") + iconname("button") + positionWindow(w) +} + +# label À¸À® +msg = TkLabel.new($button_demo) { + font $kanji_font + wraplength '4i' + justify 'left' + text "¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ü¥¿¥ó¤ÎÇØ·Ê¿§¤¬¤½¤Î¥Ü¥¿¥ó¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¿§¤Ë¤Ê¤ê¤Þ¤¹¡£¥Ü¥¿¥ó¤«¤é¥Ü¥¿¥ó¤Ø¤Î°ÜÆ°¤Ï¥¿¥Ö¤ò²¡¤¹¤³¤È¤Ç¤â²Äǽ¤Ç¤¹¡£¤Þ¤¿¥¹¥Ú¡¼¥¹¤Ç¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +$button_buttons = Tk::Frame.new($button_demo) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $button_demo + $button_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'button'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# button À¸À® +TkButton.new($button_demo){ + text "Peach Puff" + width 10 + command proc{ + $button_demo.configure('bg','PeachPuff1') + $button_buttons.configure('bg','PeachPuff1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Light Blue" + width 10 + command proc{ + $button_demo.configure('bg','LightBlue1') + $button_buttons.configure('bg','LightBlue1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Sea Green" + width 10 + command proc{ + $button_demo.configure('bg','SeaGreen2') + $button_buttons.configure('bg','SeaGreen2') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) + +TkButton.new($button_demo){ + text "Yellow" + width 10 + command proc{ + $button_demo.configure('bg','Yellow1') + $button_buttons.configure('bg','Yellow1') + } +}.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check.rb new file mode 100644 index 0000000..b953e7f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check.rb @@ -0,0 +1,70 @@ +# -*- coding: euc-jp -*- +# +# checkbutton widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($check_demo) && $check_demo + $check_demo.destroy + $check_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$check_demo = TkToplevel.new {|w| + title("Checkbutton Demonstration") + iconname("check") + positionWindow(w) +} + +base_frame = TkFrame.new($check_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï 3 ¤Ä¤Î¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥¯¥ê¥Ã¥¯¤¹¤ë¤È¥Ü¥¿¥ó¤ÎÁªÂò¾õÂÖ¤¬ÊѤï¤ê¡¢Tcl ÊÑ¿ô ( TkVariable ¥ª¥Ö¥¸¥§¥¯¥È¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹ ) ¤Ë¤½¤Î¥Ü¥¿¥ó¤Î¾õÂÖ¤ò¼¨¤¹ÃͤòÀßÄꤷ¤Þ¤¹¡£¸½ºß¤ÎÊÑ¿ô¤ÎÃͤò¸«¤ë¤Ë¤Ï¡ÖÊÑ¿ô»²¾È¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# ÊÑ¿ôÀ¸À® +wipers = TkVariable.new(0) +brakes = TkVariable.new(0) +sober = TkVariable.new(0) + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $check_demo + $check_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'check'} + }.pack('side'=>'left', 'expand'=>'yes') + + + TkButton.new(frame) { + text 'ÊÑ¿ô»²¾È' + command proc{ + showVars(base_frame, + ['wipers', wipers], ['brakes', brakes], ['sober', sober]) + } + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +# checkbutton À¸À® +[ TkCheckButton.new(base_frame, 'text'=>'¥ï¥¤¥Ñ¡¼ OK', 'variable'=>wipers), + TkCheckButton.new(base_frame, 'text'=>'¥Ö¥ì¡¼¥­ OK', 'variable'=>brakes), + TkCheckButton.new(base_frame, 'text'=>'±¿Å¾¼ê ÁÇÌÌ', 'variable'=>sober) +].each{|w| w.relief('flat'); w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check2.rb new file mode 100644 index 0000000..7f7cb9e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/check2.rb @@ -0,0 +1,110 @@ +# -*- coding: euc-jp -*- +# +# checkbutton widget demo2 (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($check2_demo) && $check2_demo + $check2_demo.destroy + $check2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$check2_demo = TkToplevel.new {|w| + title("Checkbutton Demonstration 2") + iconname("check2") + positionWindow(w) +} + +base_frame = TkFrame.new($check2_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï£´¤Ä¤Î¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥¯¥ê¥Ã¥¯¤¹¤ë¤È¥Ü¥¿¥ó¤ÎÁªÂò¾õÂÖ¤¬ÊѤï¤ê¡¢TclÊÑ¿ô¡ÊTkVariable¥ª¥Ö¥¸¥§¥¯¥È¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡Ë¤Ë¤½¤Î¥Ü¥¿¥ó¤Î¾õÂÖ¤ò¼¨¤¹ÃͤòÀßÄꤷ¤Þ¤¹¡£ºÇ½é¤Î¥Ü¥¿¥ó¤Î¾õÂ֤Ͼ¤Î£³¤Ä¤Î¥Ü¥¿¥ó¤Î¾õÂ֤ˤâ°Í¸¤·¤ÆÊѲ½¤·¤Þ¤¹¡£¤â¤·£³¤Ä¤Î¥Ü¥¿¥ó¤Î°ìÉô¤À¤±¤Ë¥Á¥§¥Ã¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¾ì¹ç¡¢ºÇ½é¤Î¥Ü¥¿¥ó¤Ï¥È¥é¥¤¥¹¥Æ¡¼¥È¡Ê£³¾õÂ֡˥⡼¥É¤Ç¤Îɽ¼¨¤ò¹Ô¤¤¤Þ¤¹¡£¸½ºß¤ÎÊÑ¿ô¤ÎÃͤò¸«¤ë¤Ë¤Ï¡ÖÊÑ¿ô»²¾È¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# ÊÑ¿ôÀ¸À® +safety = TkVariable.new(0) +wipers = TkVariable.new(0) +brakes = TkVariable.new(0) +sober = TkVariable.new(0) + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars($check2_demo, + ['safety', safety], ['wipers', wipers], + ['brakes', brakes], ['sober', sober]) + }), + TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'check2'}), + TkButton.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $check2_demo + $check2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) +}.pack('side'=>'bottom', 'fill'=>'x') + + +# checkbutton À¸À® +TkCheckButton.new(base_frame, :text=>'°ÂÁ´À­¸¡ºº', :variable=>safety, + :relief=>:flat, :onvalue=>'all', :offvalue=>'none', + :tristatevalue=>'partial'){ + pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + +[ TkCheckButton.new(base_frame, 'text'=>'¥ï¥¤¥Ñ¡¼ OK', 'variable'=>wipers), + TkCheckButton.new(base_frame, 'text'=>'¥Ö¥ì¡¼¥­ OK', 'variable'=>brakes), + TkCheckButton.new(base_frame, 'text'=>'±¿Å¾¼ê ÁÇÌÌ', 'variable'=>sober) +].each{|w| + w.relief('flat') + w.pack('side'=>'top', 'padx'=>15, 'pady'=>2, 'anchor'=>'w') +} + +# tristate check +in_check = false +tristate_check = proc{|n1,n2,op| + unless in_check + in_check = true + begin + if n1 == safety + if safety == 'none' + wipers.value = 0 + brakes.value = 0 + sober.value = 0 + elsif safety == 'all' + wipers.value = 1 + brakes.value = 1 + sober.value = 1 + end + else + if wipers == 1 && brakes == 1 && sober == 1 + safety.value = 'all' + elsif wipers == 1 || brakes == 1 || sober == 1 + safety.value = 'partial' + else + safety.value = 'none' + end + end + ensure + in_check = false + end + end +} + +[wipers, brakes, sober, safety].each{|v| v.trace('w', tristate_check)} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/clrpick.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/clrpick.rb new file mode 100644 index 0000000..ce6b99a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/clrpick.rb @@ -0,0 +1,84 @@ +# -*- coding: euc-jp -*- +# +# widget demo prompts the user to select a color (called by 'widget') +# +# Note: don't support ttk_wrapper. work with standard widgets only. +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($clrpick_demo) && $clrpick_demo + $clrpick_demo.destroy + $clrpick_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$clrpick_demo = TkToplevel.new {|w| + title("Color Selection Dialogs") + iconname("colors") + positionWindow(w) +} + +# label À¸À® +#TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left', +Tk::Label.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"°Ê²¼¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¾å¤Ë¤¢¤ë¥¦¥£¥¸¥§¥Ã¥È¤ÎÁ°·Ê¿§¤ÈÇØ·Ê¿§¤òÁªÂò¤·¤Æ²¼¤µ¤¤¡£").pack('side'=>'top') + +# frame À¸À® +# TkFrame.new($clrpick_demo) {|frame| +Tk::Frame.new($clrpick_demo) {|frame| + # TkButton.new(frame) { + Tk::Button.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $clrpick_demo + $clrpick_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + # TkButton.new(frame) { + Tk::Button.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'clrpick'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# button À¸À® +# TkButton.new($clrpick_demo, 'text'=>'ÇØ·Ê¿§¤òÀßÄê ...') {|b| +Tk::Button.new($clrpick_demo, 'text'=>'ÇØ·Ê¿§¤òÀßÄê ...') {|b| + command(proc{setColor $clrpick_demo, b, 'background', + ['background', 'highlightbackground']}) + pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m') +} + +# TkButton.new($clrpick_demo, 'text'=>'Á°·Ê¿§¤òÀßÄê ...') {|b| +Tk::Button.new($clrpick_demo, 'text'=>'Á°·Ê¿§¤òÀßÄê ...') {|b| + command(proc{setColor $clrpick_demo, b, 'foreground', ['foreground']}) + pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m') +} + +def setColor(w,button,name,options) + w.grab + initialColor = button[name] + color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w, + 'initialcolor'=>initialColor) + if color != "" + setColor_helper(w,options,color) + end + + w.grab('release') +end + +def setColor_helper(w, options, color) + options.each{|opt| + begin + w[opt] = color + rescue + end + } + TkWinfo.children(w).each{|child| + setColor_helper child, options, color + } +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/colors.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/colors.rb new file mode 100644 index 0000000..91817a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/colors.rb @@ -0,0 +1,155 @@ +# -*- coding: euc-jp -*- +# +# listbox widget demo 'colors' (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($colors_demo) && $colors_demo + $colors_demo.destroy + $colors_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$colors_demo = TkToplevel.new {|w| + title("Listbox Demonstration (colors)") + iconname("colors") + positionWindow(w) +} + +base_frame = TkFrame.new($colors_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï¿§¤Î̾Á°¤¬Æþ¤Ã¤¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼ÉդΥꥹ¥È¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥ê¥¹¥È¤ò¥¹¥¯¥í¡¼¥ë¤µ¤»¤ë¤Î¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ç¤â¤Ç¤­¤Þ¤¹¤·¡¢¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÃæ¤Ç¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2(Ãæ¥Ü¥¿¥ó)¤ò²¡¤·¤¿¤Þ¤Þ¥É¥é¥Ã¥°¤·¤Æ¤â¤Ç¤­¤Þ¤¹¡£¤¢¤ë¿§¤ò¥Ü¥¿¥ó1(º¸¥Ü¥¿¥ó)¤Ç¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤¹¤ë¤È¥¢¥×¥ê¥±¡¼¥·¥ç¥óÁ´ÂΤ¬¤½¤Î¿§¤Ë¤Ê¤ê¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $colors_demo + $colors_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'colors'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +colors_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + s = TkScrollbar.new(w) + colors_lbox = TkListbox.new(w) { + setgrid 1 + width 10 + height 12 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| colors_lbox.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + colors_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both') +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +#colors_lbox.bind('Double-1', proc{TkPalette.setPalette TkSelection.get}) +colors_lbox.bind('Double-1', proc{ + begin + TkPalette.setPalette TkSelection.get + rescue => e + p e + Tk.tk_call_without_enc('destroy', '.___tk_set_palette') + end + }) + +ins_data = [ + 'gray60','gray70','gray80','gray85','gray90','gray95', + 'snow1','snow2','snow3','snow4','seashell1','seashell2', + 'seashell3','seashell4','AntiqueWhite1','AntiqueWhite2', + 'AntiqueWhite3','AntiqueWhite4','bisque1','bisque2', + 'bisque3','bisque4','PeachPuff1','PeachPuff2', + 'PeachPuff3','PeachPuff4','NavajoWhite1','NavajoWhite2', + 'NavajoWhite3','NavajoWhite4','LemonChiffon1', + 'LemonChiffon2','LemonChiffon3','LemonChiffon4', + 'cornsilk1','cornsilk2','cornsilk3','cornsilk4', + 'ivory1','ivory2','ivory3','ivory4','honeydew1', + 'honeydew2','honeydew3','honeydew4','LavenderBlush1', + 'LavenderBlush2','LavenderBlush3','LavenderBlush4', + 'MistyRose1','MistyRose2','MistyRose3','MistyRose4', + 'azure1','azure2','azure3','azure4','SlateBlue1', + 'SlateBlue2','SlateBlue3','SlateBlue4','RoyalBlue1', + 'RoyalBlue2','RoyalBlue3','RoyalBlue4','blue1','blue2', + 'blue3','blue4','DodgerBlue1','DodgerBlue2', + 'DodgerBlue3','DodgerBlue4','SteelBlue1','SteelBlue2', + 'SteelBlue3','SteelBlue4','DeepSkyBlue1','DeepSkyBlue2', + 'DeepSkyBlue3','DeepSkyBlue4','SkyBlue1','SkyBlue2', + 'SkyBlue3','SkyBlue4','LightSkyBlue1','LightSkyBlue2', + 'LightSkyBlue3','LightSkyBlue4','SlateGray1', + 'SlateGray2','SlateGray3','SlateGray4', + 'LightSteelBlue1','LightSteelBlue2','LightSteelBlue3', + 'LightSteelBlue4','LightBlue1','LightBlue2', + 'LightBlue3','LightBlue4','LightCyan1','LightCyan2', + 'LightCyan3','LightCyan4','PaleTurquoise1', + 'PaleTurquoise2','PaleTurquoise3','PaleTurquoise4', + 'CadetBlue1','CadetBlue2','CadetBlue3','CadetBlue4', + 'turquoise1','turquoise2','turquoise3','turquoise4', + 'cyan1','cyan2','cyan3','cyan4','DarkSlateGray1', + 'DarkSlateGray2','DarkSlateGray3','DarkSlateGray4', + 'aquamarine1','aquamarine2','aquamarine3','aquamarine4', + 'DarkSeaGreen1','DarkSeaGreen2','DarkSeaGreen3', + 'DarkSeaGreen4','SeaGreen1','SeaGreen2','SeaGreen3', + 'SeaGreen4','PaleGreen1','PaleGreen2','PaleGreen3', + 'PaleGreen4','SpringGreen1','SpringGreen2', + 'SpringGreen3','SpringGreen4','green1','green2', + 'green3','green4','chartreuse1','chartreuse2', + 'chartreuse3','chartreuse4','OliveDrab1','OliveDrab2', + 'OliveDrab3','OliveDrab4','DarkOliveGreen1', + 'DarkOliveGreen2','DarkOliveGreen3','DarkOliveGreen4', + 'khaki1','khaki2','khaki3','khaki4','LightGoldenrod1', + 'LightGoldenrod2','LightGoldenrod3','LightGoldenrod4', + 'LightYellow1','LightYellow2','LightYellow3', + 'LightYellow4','yellow1','yellow2','yellow3','yellow4', + 'gold1','gold2','gold3','gold4','goldenrod1', + 'goldenrod2','goldenrod3','goldenrod4','DarkGoldenrod1', + 'DarkGoldenrod2','DarkGoldenrod3','DarkGoldenrod4', + 'RosyBrown1','RosyBrown2','RosyBrown3','RosyBrown4', + 'IndianRed1','IndianRed2','IndianRed3','IndianRed4', + 'sienna1','sienna2','sienna3','sienna4','burlywood1', + 'burlywood2','burlywood3','burlywood4','wheat1', + 'wheat2','wheat3','wheat4','tan1','tan2','tan3','tan4', + 'chocolate1','chocolate2','chocolate3','chocolate4', + 'firebrick1','firebrick2','firebrick3','firebrick4', + 'brown1','brown2','brown3','brown4','salmon1','salmon2', + 'salmon3','salmon4','LightSalmon1','LightSalmon2', + 'LightSalmon3','LightSalmon4','orange1','orange2', + 'orange3','orange4','DarkOrange1','DarkOrange2', + 'DarkOrange3','DarkOrange4','coral1','coral2','coral3', + 'coral4','tomato1','tomato2','tomato3','tomato4', + 'OrangeRed1','OrangeRed2','OrangeRed3','OrangeRed4', + 'red1','red2','red3','red4','DeepPink1','DeepPink2', + 'DeepPink3','DeepPink4','HotPink1','HotPink2', + 'HotPink3','HotPink4','pink1','pink2','pink3','pink4', + 'LightPink1','LightPink2','LightPink3','LightPink4', + 'PaleVioletRed1','PaleVioletRed2','PaleVioletRed3', + 'PaleVioletRed4','maroon1','maroon2','maroon3', + 'maroon4','VioletRed1','VioletRed2','VioletRed3', + 'VioletRed4','magenta1','magenta2','magenta3', + 'magenta4','orchid1','orchid2','orchid3','orchid4', + 'plum1','plum2','plum3','plum4','MediumOrchid1', + 'MediumOrchid2','MediumOrchid3','MediumOrchid4', + 'DarkOrchid1','DarkOrchid2','DarkOrchid3', + 'DarkOrchid4','purple1','purple2','purple3','purple4', + 'MediumPurple1','MediumPurple2','MediumPurple3', + 'MediumPurple4','thistle1','thistle2','thistle3', 'thistle4' +] + +colors_lbox.insert(0, *ins_data) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/combo.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/combo.rb new file mode 100644 index 0000000..da00d71 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/combo.rb @@ -0,0 +1,98 @@ +# -*- coding: euc-jp -*- +# +# combo.rb -- +# +# This demonstration script creates several combobox widgets. +# +# based on "Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($combo_demo) && $combo_demo + $combo_demo.destroy + $combo_demo = nil +end + +$combo_demo = TkToplevel.new {|w| + title("Combobox Demonstration") + iconname("combo") + positionWindow(w) +} + +base_frame = TkFrame.new($combo_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top, :fill=>:x) +°Ê²¼¤Ç¤Ï3¼ïÎà¤Î¥³¥ó¥Ü¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥\ +ºÇ½é¤Î¤â¤Î¤Ï¡¤¥¨¥ó¥È¥ê¥¦¥£¥¸¥§¥Ã¥È¤ÈƱ¤¸Íͤˡ¤\ +¥Ý¥¤¥ó¥È¤·¤¿¤ê¡¤¥¯¥ê¥Ã¥¯¤·¤¿¤ê¡¤¥¿¥¤¥×¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥\ +¤Þ¤¿¡¤Return¥­¡¼¤òÆþÎϤ¹¤ì¤Ð¸½ºß¤ÎÃͤ¬¥ê¥¹¥È¤ËÄɲ䵤졤\ +¥É¥í¥Ã¥×¥À¥¦¥ó¥ê¥¹¥È¤«¤éÁªÂò¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥\ +¢­(²¼¸þ¤­Ìð°õ)¥­¡¼¤ò²¡¤·¤Æɽ¼¨¤µ¤ì¤¿¥ê¥¹¥È¤«¤é\ +Ìð°õ¥­¡¼¤Ç¾¤Î¸õÊä¤òÁª¤ó¤ÇReturn¥­¡¼¤ò²¡¤»¤Ð¡¤ÃͤòÁªÂò¤Ç¤­¤Þ¤¹¡¥\ +2ÈÖÌܤΥ³¥ó¥Ü¥Ü¥Ã¥¯¥¹¤ÏÆÃÄê¤ÎÃͤ˸ÇÄꤵ¤ì¤Æ¤ª¤ê¡¤°ìÀÚÊѹ¹¤Ç¤­¤Þ¤»¤ó¡¥\ +3ÈÖÌܤΤâ¤Î¤Ï¥ª¡¼¥¹¥È¥é¥ê¥¢¤ÎÅԻԤΥɥí¥Ã¥×¥À¥¦¥ó¥ê¥¹¥È¤«¤é\ +ÁªÂò¤¹¤ë¤³¤È¤À¤±¤¬²Äǽ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ +EOL + +## variables +firstValue = TkVariable.new +secondValue = TkVariable.new +ozCity = TkVariable.new + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'ÊÑ¿ô»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, + ['firstVariable', firstValue], + ['secondVariable', secondValue], + ['ozCity', ozCity]) + }), + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'combo'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $combo_demo.destroy + $combo_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +australianCities = [ + '¥­¥ã¥ó¥Ù¥é', '¥·¥É¥Ë¡¼', '¥á¥ë¥Ü¥ë¥ó', '¥Ñ¡¼¥¹', '¥¢¥Ç¥ì¡¼¥É', + '¥Ö¥ê¥¹¥Ù¡¼¥ó', '¥Û¥Ð¡¼¥È', '¥À¡¼¥¦¥£¥ó', '¥¢¥ê¥¹ ¥¹¥×¥ê¥ó¥°¥¹' +] + + +secondValue.value = 'Êѹ¹ÉÔ²Ä' +ozCity.value = '¥·¥É¥Ë¡¼' + +Tk.pack(Ttk::Labelframe.new(frame, :text=>'Fully Editable'){|f| + Ttk::Combobox.new(f, :textvariable=>firstValue){|b| + b.bind('Return', '%W'){|w| + w.values <<= w.value unless w.values.include?(w.value) + } + }.pack(:pady=>5, :padx=>10) + }, + + Ttk::LabelFrame.new(frame, :text=>'Disabled'){|f| + Ttk::Combobox.new(f, :textvariable=>secondValue, :state=>:disabled) . + pack(:pady=>5, :padx=>10) + }, + + Ttk::LabelFrame.new(frame, :text=>'Defined List Only'){|f| + Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly, + :values=>australianCities) . + pack(:pady=>5, :padx=>10) + }, + + :side=>:top, :pady=>5, :padx=>10) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/cscroll.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/cscroll.rb new file mode 100644 index 0000000..8459526 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/cscroll.rb @@ -0,0 +1,134 @@ +# -*- coding: euc-jp -*- +# +# simple scrollable canvas widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($cscroll_demo) && $cscroll_demo + $cscroll_demo.destroy + $cscroll_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$cscroll_demo = TkToplevel.new {|w| + title("Scrollable Canvas Demonstration") + iconname("cscroll") + positionWindow(w) +} + +base_frame = TkFrame.new($cscroll_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', + 'justify'=>'left', 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ä¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2 ¤Ç¥¹¥¯¥í¡¼¥ë¤Ç¤­¤ë¥­¥ã¥ó¥Ð¥¹ widget ¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£»Í³Ñ¤Î¾å¤Ç¥Ü¥¿¥ó1 ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬É¸½à½ÐÎϤ˽ÐÎϤµ¤ì¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$cscroll_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $cscroll_demo + $cscroll_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'cscroll'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$cscroll_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame ÀßÄê +unless $tk_version =~ /^4\.[01]/ + $cscroll_grid = TkFrame.new(base_frame) { + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + } + TkGrid.rowconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure($cscroll_grid, 0, 'weight'=>1, 'minsize'=>0) +end + +# canvas ÀßÄê +$cscroll_canvas = TkCanvas.new(base_frame, + 'relief'=>'sunken', 'borderwidth'=>2, + 'scrollregion'=>['-11c', '-11c', '50c', '20c'] + ) {|c| + if $tk_version =~ /^4\.[01]/ + pack('expand'=>'yes', 'fill'=>'both') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}) {|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + if $tk_version =~ /^4\.[01]/ + pack('side'=>'right', 'fill'=>'y') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + } + + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}) {|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + if $tk_version =~ /^4\.[01]/ + pack('side'=>'bottom', 'fill'=>'x') + else + grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + end + } +} + +bg = $cscroll_canvas.configinfo('bg')[4] +(0..19).each{|i| + x = -10+3*i + y = -10 + (0..9).each{|j| + TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c", + 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect') + TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c", + 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text') + y += 3 + } +} + +$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas}) +$cscroll_canvas.itembind('all', 'Any-Leave', proc{scrollLeave $cscroll_canvas}) +$cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas}) +$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas}) +$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y') +$cscroll_canvas.bind('B2-Motion', + proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y') + +def scrollEnter(c) + id = c.find_withtag('current')[0].id + id -= 1 if c.gettags('current').include?('text') + $oldFill = c.itemconfiginfo(id, 'fill')[4] + if TkWinfo.depth(c) > 1 + c.itemconfigure(id, 'fill'=>'SeaGreen1') + else + c.itemconfigure(id, 'fill'=>'black') + c.itemconfigure(id+1, 'fill'=>'white') + end +end + +def scrollLeave(c) + id = c.find_withtag('current')[0].id + id -= 1 if c.gettags('current').include?('text') + c.itemconfigure(id, 'fill'=>$oldFill) + c.itemconfigure(id+1, 'fill'=>'black') +end + +def scrollButton(c) + id = c.find_withtag('current')[0].id + id += 1 unless c.gettags('current').include?('text') + print "You buttoned at #{c.itemconfiginfo(id,'text')[4]}\n" +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ctext.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ctext.rb new file mode 100644 index 0000000..05ca732 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ctext.rb @@ -0,0 +1,204 @@ +# -*- coding: euc-jp -*- +# +# Canvas Text widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($ctext_demo) && $ctext_demo + $ctext_demo.destroy + $ctext_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$ctext_demo = TkToplevel.new {|w| + title("Canvas Text Demonstration") + iconname("Text") + positionWindow(w) +} + +base_frame = TkFrame.new($ctext_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Î¥Æ¥­¥¹¥Èʸ»úÎó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Þ¥¦¥¹¤ò»Í³Ñ¤ÎÃæ¤Ë»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤¹¤ë¤È°ÌÃÖ¤®¤áÍѤÎÅÀ¤«¤é¤ÎÁêÂаÌÃÖ¤òÊѤ¨¤¿¤ê¡¢¹Ô·¤¨¤òÊѤ¨¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿°Ê²¼¤Î¤è¤¦¤ÊÊÔ½¸¤Î¤¿¤á¤Î´Êñ¤Ê¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ + + 1. ¥Þ¥¦¥¹¤ò»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤·¡¢ÆþÎϤǤ­¤Þ¤¹¡£ + 2. ¥Ü¥¿¥ó1¤ÇÁªÂò¤Ç¤­¤Þ¤¹¡£ + 3. ¥Þ¥¦¥¹¤Î°ÌÃ֤˥ܥ¿¥ó2¤ÇÁªÂò¤·¤¿¥Æ¥­¥¹¥È¤ò¥³¥Ô¡¼¤Ç¤­¤Þ¤¹¡£ + 4.¥Ð¥Ã¥¯¥¹¥Ú¡¼¥¹¤ò¥³¥ó¥È¥í¡¼¥ë-H¤ÇÁÞÆþ¥«¡¼¥½¥ë¤ÎľÁ°¤Îʸ»ú¤òºï½ü¤·¤Þ¤¹¡£ + 5. Delete¥­¡¼¤ÏÁÞÆþ¥«¡¼¥½¥ë¤Îľ¸å¤Îʸ»ú¤òºï½ü¤·¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$ctext_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $ctext_demo + $ctext_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'ctext'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas À¸À® +$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat', + 'borderwidth'=>0, 'width'=>500, 'height'=>350) +$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both') + +# font ÀßÄê +if $tk_version =~ /^4.*/ + textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*' +else + textFont = 'Helvetica 24' +end + +# canvas ÀßÄê +TkcRectangle.new($ctext_canvas, 245, 195, 255, 205, + 'outline'=>'black', 'fill'=>'red') + +ctag_text_param = { + 'text'=>"¤³¤ì¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Îʸ»úÎó¤Ç¤¹¡£\n¾å¤Ç½Ò¤Ù¤¿¤è¤¦¤ÊÊÔ½¸¤ò²Äǽ¤È¤¹¤ë¤¿¤á¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò»Ü¤·¤Æ¤¤¤Þ¤¹¡£", + 'width'=>440, 'anchor'=>'n', 'justify'=>'left' +} +if $tk_version =~ /^4.*/ + ctag_text_param['font'] = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*' + ctag_text_param['kanjifont'] = '-*-r-*--24-*-jisx0208.1983-0' +else + ctag_text_param['font'] = 'Helvetica 24' +end +$ctag_text = TkcTag.new($ctext_canvas) +$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200, ctag_text_param)) + +$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('Shift-1', + proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"}, + "%x %y") +$ctag_text.bind('Shift-B1-Motion', + proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y") +$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A") +$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"}) +$ctag_text.bind('Control-h', proc{textBs $ctext_canvas}) +$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas}) +$ctag_text.bind('Delete', proc{textDel $ctext_canvas}) +$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"}, + "%x %y") + +# Next, create some items that allow the text's anchor position +# to be edited. + +def mkTextConfig(w,x,y,option,value,color) + item = TkcRectangle.new(w, x, y, x+30, y+30, + 'outline'=>'black', 'fill'=>color, 'width'=>1) + item.bind('1', proc{$ctag_text.configure option, value}) + w.addtag_withtag('config', item) +end + +x = 50 +y = 50 +color = 'LightSkyBlue1' +mkTextConfig $ctext_canvas, x, y, 'anchor', 'se', color +mkTextConfig $ctext_canvas, x+30, y, 'anchor', 's', color +mkTextConfig $ctext_canvas, x+60, y, 'anchor', 'sw', color +mkTextConfig $ctext_canvas, x, y+30, 'anchor', 'e', color +mkTextConfig $ctext_canvas, x+30, y+30, 'anchor', 'center', color +mkTextConfig $ctext_canvas, x+60, y+30, 'anchor', 'w', color +mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color +mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color +mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color +item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50, + 'outline'=>'black', 'fill'=>'red') +item.bind('1', proc{$ctag_text.configure 'anchor', 'center'}) +if $tk_version =~ /^4.*/ + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', + 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*', + 'anchor'=>'s', 'fill'=>'brown') +else + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', + 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown') +end + +# Lastly, create some items that allow the text's justification to be +# changed. + +x = 350 +y = 50 +color = 'SeaGreen2' +mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color +mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color +mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color +if $tk_version =~ /^4.*/ + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', + 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*', + 'anchor'=>'s', 'fill'=>'brown') +else + TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', + 'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown') +end + +$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas}) +$ctext_canvas.itembind('config', 'Leave', + proc{$ctext_canvas\ + .itemconfigure('current', + 'fill'=>$textConfigFill)}) + +$textConfigFill = '' + +def textEnter(w) + $textConfigFill = (w.itemconfiginfo 'current', 'fill')[4] + w.itemconfigure 'current', 'fill', 'black' +end + +def textInsert(w, string) + return if string == "" + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + end + $ctag_text.insert 'insert', string +end + +def textPaste(w, pos) + begin + $ctag_text.insert pos, TkSelection.get + rescue + end +end + +def textB1Press(w,x,y) + w.icursor 'current', "@#{x},#{y}" + w.itemfocus 'current' + w.focus + w.select_from 'current', "@#{x},#{y}" +end + +def textB1Move(w,x,y) + w.select_to 'current', "@#{x},#{y}" +end + +def textBs(w) + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + char = $ctag_text.index('insert').to_i - 1 + $ctag_text.dchars(char) if char >= 0 + end +end + +def textDel(w) + begin + $ctag_text.dchars 'sel.first', 'sel.last' + rescue + $ctag_text.dchars 'insert' + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog1.rb new file mode 100644 index 0000000..07e5030 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog1.rb @@ -0,0 +1,39 @@ +# -*- coding: euc-jp -*- +# +# a dialog box with a local grab (called by 'widget') +# +class TkDialog_Demo1 < TkDialog + ############### + private + ############### + def title + "Dialog with local grab" + end + + def message + '¥â¡¼¥À¥ë¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤Ç¤¹¡£Tk ¤Î "grab" ¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Æ¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤Ç¡Ö¥í¡¼¥«¥ë¥°¥é¥Ö¡×¤·¤Æ¤¤¤Þ¤¹¡£²¼¤Î¤¤¤º¤ì¤«¤Î¥Ü¥¿¥ó¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¤³¤Î¥À¥¤¥¢¥í¥°¤ËÅú¤¨¤ë¤Þ¤Ç¡¢¤³¤Î¥°¥é¥Ö¤Ë¤è¤Ã¤Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¾¤Î¥¦¥£¥ó¥É¥¦¤Ç¤Ï¡¢¥Ý¥¤¥ó¥¿´Ø·¸¤Î¥¤¥Ù¥ó¥È¤ò¼õ¤±¼è¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£' + end + + def bitmap + 'info' + end + + def default_button + 0 + end + + def buttons +# "λ²ò ¥­¥ã¥ó¥»¥ë ¥³¡¼¥É»²¾È" + ["λ²ò", "¥­¥ã¥ó¥»¥ë", "¥³¡¼¥É»²¾È"] + end +end + +ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value +case ret +when 0 + print "¤¢¤Ê¤¿¤Ï¡Öλ²ò¡×¤ò²¡¤·¤Þ¤·¤¿¤Í¡£\n" +when 1 + print "¤¢¤Ê¤¿¤Ï¡Ö¥­¥ã¥ó¥»¥ë¡×¤ò²¡¤·¤Þ¤·¤¿¤Í¡£\n" +when 2 + showCode 'dialog1' +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog2.rb new file mode 100644 index 0000000..f747f8d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/dialog2.rb @@ -0,0 +1,43 @@ +# -*- coding: euc-jp -*- +# +# a dialog box with a global grab (called by 'widget') +# +class TkDialog_Demo2 < TkDialog + ############### + private + ############### + def title + "Dialog with global grab" + end + + def message + '¤³¤Î¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¤Ï¥°¥í¡¼¥Ð¥ë¥°¥é¥Ö¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£²¼¤Î¥Ü¥¿¥ó¤ò¼Â¹Ô¤¹¤ë¤Þ¤Ç¡¢¥Ç¥£¥¹¥×¥ì¥¤¾å¤Î¤¤¤«¤Ê¤ë¤â¤Î¤È¤âÂÐÏäǤ­¤Þ¤»¤ó¡£¥°¥í¡¼¥Ð¥ë¥°¥é¥Ö¤ò»ÈÍѤ¹¤ë¤³¤È¤Ï¡¢¤Þ¤ºÎɤ¤¹Í¤¨¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤É¤¦¤·¤Æ¤âɬÍפˤʤë¤Þ¤Ç»È¤ª¤¦¤È»×¤ï¤Ê¤¤¤Ç²¼¤µ¤¤¡£' + end + + def bitmap + 'info' + end + + def default_button + 0 + end + + def buttons +# "λ²ò ¥­¥ã¥ó¥»¥ë ¥³¡¼¥É»²¾È" + ["λ²ò", "¥­¥ã¥ó¥»¥ë", "¥³¡¼¥É»²¾È"] + end +end + +ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'}, + 'prev_command'=>proc{|dialog| + Tk.after 100, proc{dialog.grab('global')} + }).value +case ret +when 0 + print "¤¢¤Ê¤¿¤Ï¡Öλ²ò¡×¤ò²¡¤·¤Þ¤·¤¿¤Í¡£\n" +when 1 + print "¤¢¤Ê¤¿¤Ï¡Ö¥­¥ã¥ó¥»¥ë¡×¤ò²¡¤·¤Þ¤·¤¿¤Í¡£\n" +when 2 + showCode 'dialog2' +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README new file mode 100644 index 0000000..90677d3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README @@ -0,0 +1,7 @@ +This directory contains a collection of demonstration programs that +are translated into Japanese. You need to use a Japanized "wish" to +see these Japanese-translated demonstration programs. You also need +to put this directory ("demos.jp") at the next to "demos" since some +of the programs refer to the image files at "demos". + +Please refer to the README file at "demos" for more detail. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.JP b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.JP new file mode 100644 index 0000000..42b4929 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.JP @@ -0,0 +1,14 @@ +This directory contains "widget" demo for the Japanized Tcl7.6/Tk4.2. +Most of the messages in the original are translated to Japanese. +But other tools in this directory are not translated. + +Following 2 kanji fonts are defined at the beginning of the file "widget." + + -*--24-*-jisx0208.1983-0 + -*--16-*-jisx0208.1983-0 + +These fonts are all part of the core distribution of X11R5, so +if you are running X11R5, you don't have to modify the file. + +But if you don't have these fonts, replace them with appropriate ones. +"-*--14-*-jisx0208.1983-0" will be a good choice. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.tk80 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.tk80 new file mode 100644 index 0000000..c71f977 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/README.tk80 @@ -0,0 +1,46 @@ +This directory contains a collection of programs to demonstrate +the features of the Tk toolkit. The programs are all scripts for +"wish", a windowing shell. If wish has been installed in /usr/local +then you can invoke any of the programs in this directory just +by typing its file name to your command shell. Otherwise invoke +wish with the file as its first argument, e.g., "wish hello". +The rest of this file contains a brief description of each program. +Files with names ending in ".tcl" are procedure packages used by one +or more of the demo programs; they can't be used as programs by +themselves so they aren't described below. + +hello - Creates a single button; if you click on it, a message + is typed and the application terminates. + +widget - Contains a collection of demonstrations of the widgets + currently available in the Tk library. Most of the .tcl + files are scripts for individual demos available through + the "widget" program. + +ixset - A simple Tk-based wrapper for the "xset" program, which + allows you to interactively query and set various X options + such as mouse acceleration and bell volume. Thanks to + Pierre David for contributing this example. + +rolodex - A mock-up of a simple rolodex application. It has much of + the user interface for such an application but no back-end + database. This program was written in response to Tom + LaStrange's toolkit benchmark challenge. + +tcolor - A color editor. Allows you to edit colors in several + different ways, and will also perform automatic updates + using "send". + +rmt - Allows you to "hook-up" remotely to any Tk application + on the display. Select an application with the menu, + then just type commands: they'll go to that application. + +timer - Displays a seconds timer with start and stop buttons. + Control-c and control-q cause it to exit. + +browse - A simple directory browser. Invoke it with and argument + giving the name of the directory you'd like to browse. + Double-click on files or subdirectories to browse them. + Control-c and control-q cause the program to exit. + +sccs id = SCCS: @(#) README 1.3 96/02/16 10:49:14 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms new file mode 100644 index 0000000..03ca6fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms @@ -0,0 +1,39 @@ +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., and other parties. The following +terms apply to all files associated with the software unless explicitly +disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms.tk80 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms.tk80 new file mode 100644 index 0000000..03ca6fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/doc.org/license.terms.tk80 @@ -0,0 +1,39 @@ +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., and other parties. The following +terms apply to all files associated with the software unless explicitly +disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry1.rb new file mode 100644 index 0000000..2be29c1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry1.rb @@ -0,0 +1,60 @@ +# -*- coding: euc-jp -*- +# +# entry (no scrollbars) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($entry1_demo) && $entry1_demo + $entry1_demo.destroy + $entry1_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$entry1_demo = TkToplevel.new {|w| + title("Entry Demonstration (no scrollbars)") + iconname("entry1") + positionWindow(w) +} + +base_frame = TkFrame.new($entry1_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "3¼ïÎà¤Î°Û¤Ê¤ë¥¨¥ó¥È¥ê¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Ê¸»ú¤òÆþÎϤ¹¤ë¤Ë¤Ï¥Ý¥¤¥ó¥¿¤ò»ý¤Ã¤Æ¹Ô¤­¡¢¥¯¥ê¥Ã¥¯¤·¤Æ¤«¤é¥¿¥¤¥×¤·¤Æ¤¯¤À¤µ¤¤¡£É¸½àŪ¤ÊMotif¤ÎÊÔ½¸µ¡Ç½¤¬¡¢Emacs¤Î¥­¡¼¥Ð¥¤¥ó¥É¤È¤È¤â¤Ë¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Î㤨¤Ð¡¢¥Ð¥Ã¥¯¥¹¥Ú¡¼¥¹¤È¥³¥ó¥È¥í¡¼¥ë-H¤Ï¥«¡¼¥½¥ë¤Îº¸¤Îʸ»ú¤òºï½ü¤·¡¢¥Ç¥ê¡¼¥È¥­¡¼¤È¥³¥ó¥È¥í¡¼¥ë-D¤Ï¥«¡¼¥½¥ë¤Î±¦Â¦¤Îʸ»ú¤òºï½ü¤·¤Þ¤¹¡£Ä¹²á¤®¤Æ¥¦¥£¥ó¥É¥¦¤ËÆþ¤êÀÚ¤é¤Ê¤¤¤â¤Î¤Ï¡¢¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2¤ò²¡¤·¤¿¤Þ¤Þ¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¥¹¥¯¥í¡¼¥ë¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ÆüËܸì¤òÆþÎϤ¹¤ë¤Î¤Ï¥³¥ó¥È¥í¡¼¥ë-¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Ç¤¹¡£kinput2¤¬Æ°¤¤¤Æ¤¤¤ì¤ÐÆþÎϤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $entry1_demo + $entry1_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'entry1'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# entry À¸À® +e1 = TkEntry.new(base_frame, 'relief'=>'sunken') +e2 = TkEntry.new(base_frame, 'relief'=>'sunken') +e3 = TkEntry.new(base_frame, 'relief'=>'sunken') +[e1,e2,e3].each{|w| w.pack('side'=>'top', 'padx'=>10, 'pady'=>5, 'fill'=>'x')} + +# ½é´üÃÍÁÞÆþ +e1.insert(0, '½é´üÃÍ') +e2.insert('end', "¤³¤Î¥¨¥ó¥È¥ê¤Ë¤ÏŤ¤Ê¸»úÎó¤¬Æþ¤Ã¤Æ¤¤¤Æ¡¢") +e2.insert('end', "Ť¹¤®¤Æ¥¦¥£¥ó¥É¥¦¤Ë¤ÏÆþ¤êÀÚ¤é¤Ê¤¤¤Î¤Ç¡¢") +e2.insert('end', "¼ÂºÝ¤Î½ê½ª¤ê¤Þ¤Ç¸«¤ë¤Ë¤Ï¥¹¥¯¥í¡¼¥ë¤µ¤»¤Ê¤±¤ì¤Ð") +e2.insert('end', "¤Ê¤é¤Ê¤¤¤Ç¤·¤ç¤¦¡£") + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry2.rb new file mode 100644 index 0000000..2675b5d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry2.rb @@ -0,0 +1,91 @@ +# -*- coding: euc-jp -*- +# +# entry (with scrollbars) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($entry2_demo) && $entry2_demo + $entry2_demo.destroy + $entry2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$entry2_demo = TkToplevel.new {|w| + title("Entry Demonstration (with scrollbars)") + iconname("entry2") + positionWindow(w) +} + +base_frame = TkFrame.new($entry2_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "3¼ïÎà¤Î°Û¤Ê¤ë¥¨¥ó¥È¥ê¤¬³Æ¡¹¥¹¥¯¥í¡¼¥ë¥Ð¡¼ÉÕ¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Ê¸»ú¤òÆþÎϤ¹¤ë¤Ë¤Ï¥Ý¥¤¥ó¥¿¤ò»ý¤Ã¤Æ¹Ô¤­¡¢¥¯¥ê¥Ã¥¯¤·¤Æ¤«¤é¥¿¥¤¥×¤·¤Æ¤¯¤À¤µ¤¤¡£É¸½àŪ¤ÊMotif¤ÎÊÔ½¸µ¡Ç½¤¬¡¢Emacs¤Î¥­¡¼¥Ð¥¤¥ó¥É¤È¤È¤â¤Ë¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Î㤨¤Ð¡¢¥Ð¥Ã¥¯¥¹¥Ú¡¼¥¹¤È¥³¥ó¥È¥í¡¼¥ë-H¤Ï¥«¡¼¥½¥ë¤Îº¸¤Îʸ»ú¤òºï½ü¤·¡¢¥Ç¥ê¡¼¥È¥­¡¼¤È¥³¥ó¥È¥í¡¼¥ë-D¤Ï¥«¡¼¥½¥ë¤Î±¦Â¦¤Îʸ»ú¤òºï½ü¤·¤Þ¤¹¡£Ä¹²á¤®¤Æ¥¦¥£¥ó¥É¥¦¤ËÆþ¤êÀÚ¤é¤Ê¤¤¤â¤Î¤Ï¡¢¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2¤ò²¡¤·¤¿¤Þ¤Þ¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¥¹¥¯¥í¡¼¥ë¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ÆüËܸì¤òÆþÎϤ¹¤ë¤Î¤Ï¥³¥ó¥È¥í¡¼¥ë-¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Ç¤¹¡£kinput2¤¬Æ°¤¤¤Æ¤¤¤ì¤ÐÆþÎϤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $entry2_demo + $entry2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'entry2'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + # entry 1 + s1 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e1 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s1.set first,last} + } + s1.command(proc{|*args| e1.xview(*args)}) + e1.pack('side'=>'top', 'fill'=>'x') + s1.pack('side'=>'top', 'fill'=>'x') + + # spacer + TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x') + + # entry 2 + s2 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e2 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s2.set first,last} + } + s2.command(proc{|*args| e2.xview(*args)}) + e2.pack('side'=>'top', 'fill'=>'x') + s2.pack('side'=>'top', 'fill'=>'x') + + # spacer + TkFrame.new(w, 'width'=>20, 'height'=>10).pack('side'=>'top', 'fill'=>'x') + + # entry 3 + s3 = TkScrollbar.new(w, 'relief'=>'sunken', 'orient'=>'horiz') + e3 = TkEntry.new(w, 'relief'=>'sunken') { + xscrollcommand proc{|first,last| s3.set first,last} + } + s3.command(proc{|*args| e3.xview(*args)}) + e3.pack('side'=>'top', 'fill'=>'x') + s3.pack('side'=>'top', 'fill'=>'x') + + # ½é´üÃÍÁÞÆþ + e1.insert(0, '½é´üÃÍ') + e2.insert('end', "¤³¤Î¥¨¥ó¥È¥ê¤Ë¤ÏŤ¤Ê¸»úÎó¤¬Æþ¤Ã¤Æ¤¤¤Æ¡¢") + e2.insert('end', "Ť¹¤®¤Æ¥¦¥£¥ó¥É¥¦¤Ë¤ÏÆþ¤êÀÚ¤é¤Ê¤¤¤Î¤Ç¡¢") + e2.insert('end', "¼ÂºÝ¤Î½ê½ª¤ê¤Þ¤Ç¸«¤ë¤Ë¤Ï¥¹¥¯¥í¡¼¥ë¤µ¤»¤Ê¤±¤ì¤Ð") + e2.insert('end', "¤Ê¤é¤Ê¤¤¤Ç¤·¤ç¤¦¡£") + +}.pack('side'=>'top', 'fill'=>'x', 'expand'=>'yes') + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry3.rb new file mode 100644 index 0000000..6b9cd4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/entry3.rb @@ -0,0 +1,225 @@ +# -*- coding: euc-jp -*- +# entry3.rb -- +# +# This demonstration script creates several entry widgets whose +# permitted input is constrained in some way. It also shows off a +# password entry. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($entry3_demo) && $entry3_demo + $entry3_demo.destroy + $entry3_demo = nil +end + +$entry3_demo = TkToplevel.new {|w| + title("Constrained Entry Demonstration") + iconname("entry3") + positionWindow(w) +} + +base_frame = TkFrame.new($entry3_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top) +°Ê²¼¤Ë¤Ï£´¼ïÎà¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥³Æ¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Ï¡¤\ +¥Þ¥¦¥¹¥¯¥ê¥Ã¥¯¤ÇÁªÂò¤·Ê¸»ú¤òÂǤÁ¹þ¤à¤³¤È¤¬²Äǽ¤Ç¤¹¤¬¡¤¤½¤ì¤¾¤ì¤¬¤É¤Î¤è¤¦¤Ê\ +ÆþÎϤò¼õ¤±ÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤«¤Ë¤ÏÀ©Ìó¤¬Àߤ±¤é¤ì¤Æ¤¤¤Þ¤¹¡¥\ +°ì¤Ä¤á¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤ÏÀ°¿ô¤È¸«¤Ê¤µ¤ì¤ëʸ»úÎó¤«ÆþÎÏʸ»ú¤¬¤Ê¤¤¶õ¤Î¾õÂÖ¤«\ +¤Î¾ì¹ç¤À¤±¤ò¼õ¤±ÉÕ¤±¡¤ÌäÂ꤬¤¢¤ë¾ì¹ç¤Ï¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤¬ÅÀÌǤ·¤Þ¤¹\ +¡Ê¥Õ¥©¡¼¥«¥¹¤¬µî¤ë»þ¤Ë¥Á¥§¥Ã¥¯¤µ¤ì¤Þ¤¹¡Ë¡¥\ +Æó¤Ä¤á¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Ï¡¤ÆþÎϤµ¤ì¤¿Ê¸»úÎó¤ÎŤµ¤¬\ +£±£°Ê¸»ṳ́Ëþ¤Î¾ì¹ç¤À¤±¤ò¼õ¤±ÉÕ¤±¡¤À©¸Â¤ò±Û¤¨¤Æ½ñ¤­¹þ¤â¤¦¤È¤·¤¿¤È¤­¤Ë¤Ï\ +¥Ù¥ë¤òÌĤ餷¤ÆÃΤ餻¤Þ¤¹¡¥\ +»°¤Ä¤á¤ÏÊƹñ¤ÎÅÅÏÃÈÖ¹æ¤ò¼õ¤±ÉÕ¤±¤ë¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Ç¤¹¡¥\ +¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¤Ï¡¤ÅÅÏõ¡¤Î¥À¥¤¥ä¥ë¾å¤ÇÂбþ¤Å¤±¤é¤ì¤Æ¤¤¤ë¿ô»ú¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡¥\ +ÉÔŬÀÚ¤Êʸ»ú¤¬ÆþÎϤµ¤ì¤¿¤ê¿ô»ú°Ê³°¤Îʸ»ú¤Î°ÌÃ֤˿ô»ú¤òÆþÎϤ·¤è¤¦¤È¤·¤¿¤ê\ +¤·¤¿¾ì¹ç¤Ë¤Ï·Ù¹ð¤Î¥Ù¥ë¤¬ÌĤê¤Þ¤¹¡¥\ +»Í¤Ä¤á¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Ï¡¤£¸Ê¸»ú¤Þ¤Ç¤ÎÆþÎϤò¼õ¤±ÉÕ¤±¤ë\ +¥Ñ¥¹¥ï¡¼¥É¥Õ¥£¡¼¥ë¥É¤Ç¤¹¡Ê£¸Ê¸»ú°Ê¾å¤ÏÆä˷ٹð¤ò½Ð¤¹¤³¤È¤Ê¤¯Ìµ»ë¤µ¤ì¤Þ¤¹¡Ë¡¥\ +ÆþÎϤµ¤ì¤¿Ê¸»ú¤Ï¥¢¥¹¥¿¥ê¥¹¥¯µ­¹æ¤ËÃÖ¤­´¹¤¨¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡¥ +EOL + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $entry3_demo.destroy + $entry3_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'entry3' + }).pack(:side=>:left, :expand=>true) +} + +# focusAndFlash -- +# Error handler for entry widgets that forces the focus onto the +# widget and makes the widget flash by exchanging the foreground and +# background colours at intervals of 200ms (i.e. at approximately +# 2.5Hz). +# +# Arguments: +# widget - entry widget to flash +# fg - Initial foreground colour +# bg - Initial background colour +# count - Counter to control the number of times flashed +def focusAndFlash(widget, fg, bg, count=5) + return if count <= 0 + if fg && !fg.empty? && bg && !bg.empty? + TkTimer.new(200, count, + proc{widget.configure(:foreground=>bg, :background=>fg)}, + proc{widget.configure(:foreground=>fg, :background=>bg)} + ).start + else + # TkTimer.new(150, 3){Tk.bell}.start + Tk.bell + TkTimer.new(200, count, + proc{widget.configure(:foreground=>'white', + :background=>'black')}, + proc{widget.configure(:foreground=>'black', + :background=>'white')} + ).at_end{begin + widget.configure(:foreground=>fg, + :background=>bg) + rescue + # ignore + end}.start + end + widget.focus(true) +end + +l1 = TkLabelFrame.new(base_frame, :text=>"À°¿ô¥¨¥ó¥È¥ê") +TkEntry.new(l1, :validate=>:focus, + :vcmd=>[ + proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' + ]) {|e| + fg = e.foreground + bg = e.background + invalidcommand [proc{|w| focusAndFlash(w, fg, bg)}, '%W'] + pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') +} + +l2 = TkLabelFrame.new(base_frame, :text=>"ŤµÀ©ÌóÉÕ¤­¥¨¥ó¥È¥ê") +TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell}, + :vcmd=>[proc{|s| s.length < 10}, '%P'] + ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') + +### PHONE NUMBER ENTRY ### +# Note that the source to this is quite a bit longer as the behaviour +# demonstrated is a lot more ambitious than with the others. + +# Initial content for the third entry widget +entry3content = TkVariable.new("1-(000)-000-0000") + +# Mapping from alphabetic characters to numbers. +$phoneNumberMap = {} +Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n| + chars.split('').each{|c| + $phoneNumberMap[c] = n + $phoneNumberMap[c.upcase] = n + } +} + +# phoneSkipLeft -- +# Skip over fixed characters in a phone-number string when moving left. +# +# Arguments: +# widget - The entry widget containing the phone-number. +def phoneSkipLeft(widget) + idx = widget.index('insert') + if idx == 8 + # Skip back two extra characters + widget.cursor = idx - 2 + elsif idx == 7 || idx == 12 + # Skip back one extra character + widget.cursor = idx - 1 + elsif idx <= 3 + # Can't move any further + Tk.bell + Tk.callback_break + end +end + +# phoneSkipRight -- +# Skip over fixed characters in a phone-number string when moving right. +# +# Arguments: +# widget - The entry widget containing the phone-number. +# add - Offset to add to index before calculation (used by validation.) +def phoneSkipRight(widget, add = 0) + idx = widget.index('insert') + if (idx + add == 5) + # Skip forward two extra characters + widget.cursor = idx + 2 + elsif (idx + add == 6 || idx + add == 10) + # Skip forward one extra character + widget.cursor = idx + 1 + elsif (idx + add == 15 && add == 0) + # Can't move any further + Tk.bell + Tk.callback_break + end +end + +# validatePhoneChange -- +# Checks that the replacement (mapped to a digit) of the given +# character in an entry widget at the given position will leave a +# valid phone number in the widget. +# +# widget - entry widget to validate +# vmode - The widget's validation mode +# idx - The index where replacement is to occur +# char - The character (or string, though that will always be +# refused) to be overwritten at that point. + +def validatePhoneChange(widget, vmode, idx, char) + return true if idx == nil + Tk.after_idle(proc{widget.configure(:validate=>vmode, + :invcmd=>proc{Tk.bell})}) + if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/ + widget.delete(idx) + widget.insert(idx, $phoneNumberMap[char] || char) + Tk.after_idle(proc{phoneSkipRight(widget, -1)}) + # Tk.update(true) # <- Don't work 'update' inter validation callback. + # It depends on Tcl/Tk side (tested on Tcl/Tk8.5a1). + return true + end + return false +end + + +l3 = TkLabelFrame.new(base_frame, :text=>"ÊƹñÅÅÏÃÈֹ楨¥ó¥È¥ê") +TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell}, + :textvariable=>entry3content, + :vcmd=>[ + proc{|w,v,i,s| validatePhoneChange(w,v,i,s)}, + "%W %v %i %S" + ]){|e| + # Click to focus goes to the first editable character... + bind('FocusIn', proc{|d,w| + if d != "NotifyAncestor" + w.cursor = 3 + Tk.after_idle(proc{w.selection_clear}) + end + }, '%d %W') + bind('Left', proc{|w| phoneSkipLeft(w)}, '%W') + bind('Right', proc{|w| phoneSkipRight(w)}, '%W') + pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') +} + +l4 = TkLabelFrame.new(base_frame, :text=>"¥Ñ¥¹¥ï¡¼¥É¥¨¥ó¥È¥ê") +TkEntry.new(l4, :validate=>:key, :show=>'*', + :vcmd=>[ + proc{|s| s.length <= 8}, + '%P' + ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m') + +TkFrame.new(base_frame){|f| + lower + TkGrid.configure(l1, l2, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew) + TkGrid.configure(l3, l4, :in=>f, :padx=>'3m', :pady=>'1m', :sticky=>:ew) + TkGrid.columnconfigure(f, [0,1], :uniform=>1) + pack(:fill=>:both, :expand=>true) +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/filebox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/filebox.rb new file mode 100644 index 0000000..b8846d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/filebox.rb @@ -0,0 +1,102 @@ +# -*- coding: euc-jp -*- +# +# widget demo prompts the user to select a file (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($filebox_demo) && $entry2_demo + $filebox_demo.destroy + $filebox_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$filebox_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("filebox") + positionWindow(w) +} + +base_frame = TkFrame.new($filebox_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left', + 'text'=>"¥¨¥ó¥È¥ê¤Ë¥Õ¥¡¥¤¥ë̾¤òľÀÜÆþÎϤ¹¤ë¤«¡¢\"Browse\" ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥Õ¥¡¥¤¥ëÁªÂò¥À¥¤¥¢¥í¥°¤«¤é¥Õ¥¡¥¤¥ë̾¤òÁª¤ó¤Ç²¼¤µ¤¤¡£").pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $filebox_demo + $filebox_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'filebox'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +['³«¤¯', 'Êݸ'].each{|type| + TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>"¥Õ¥¡¥¤¥ë¤ò#{type}: ", 'anchor'=>'e')\ + .pack('side'=>'left') + + TkEntry.new(f, 'width'=>20) {|e| + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x') + + TkButton.new(f, 'text'=>'Browse ...', + 'command'=>proc{fileDialog base_frame,e,type})\ + .pack('side'=>'left') + } + + pack('fill'=>'x', 'padx'=>'1c', 'pady'=>3) + } +} + +$tk_strictMotif = TkVarAccess.new('tk_strictMotif') +if ($tk_platform['platform'] == 'unix') + TkCheckButton.new(base_frame, + 'text'=>'Motif¥¹¥¿¥¤¥ë¤Î¥À¥¤¥¢¥í¥°¤òÍѤ¤¤ë', + 'variable'=>$tk_strictMotif, + 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c') +end + +def fileDialog(w,ent,operation) + # Type names Extension(s) Mac File Type(s) + # + #-------------------------------------------------------- + types = [ + ['Text files', ['.txt','.doc'] ], + ['Text files', [], 'TEXT' ], + ['Ruby Scripts', ['.rb'], 'TEXT' ], + ['Tcl Scripts', ['.tcl'], 'TEXT' ], + ['C Source Files', ['.c','.h'] ], + ['All Source Files', ['.rb','.tcl','.c','.h'] ], + ['Image Files', ['.gif'] ], + ['Image Files', ['.jpeg','.jpg'] ], + ['Image Files', [], ['GIFF','JPEG']], + ['All files', '*' ] + ] + + if operation == '³«¤¯' + file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w) + else + file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w, + 'initialfile'=>'Untitled', + 'defaultextension'=>'.txt') + end + if file != "" + ent.delete 0, 'end' + ent.insert 0, file + # ent.xview 'end' + Tk.update_idletasks # need this for Tk::Tile::Entry + # (to find right position of 'xview'). + ent.xview(ent.index('end')) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor.rb new file mode 100644 index 0000000..a2ec2e9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor.rb @@ -0,0 +1,1721 @@ +# -*- coding: euc-jp -*- +# +# floorDisplay widget demo (called by 'widget') +# + +# floorDisplay -- +# Recreate the floorplan display in the canvas given by "w". The +# floor given by "active" is displayed on top with its office structure +# visible. +# +# Arguments: +# w - Name of the canvas window. +# active - Number of active floor (1, 2, or 3). + +def floorDisplay(w,active) + return if $activeFloor == active + + w.delete('all') + $activeFloor = active + + # First go through the three floors, displaying the backgrounds for + # each floor. + + floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1']) + floor_bg2(w,$floor_colors['bg2'],$floor_colors['outline2']) + floor_bg3(w,$floor_colors['bg3'],$floor_colors['outline3']) + + # Raise the background for the active floor so that it's on top. + + w.raise("floor#{active}") + + # Create a dummy item just to mark this point in the display list, + # so we can insert highlights here. + + TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker') + + # Add the walls and labels for the active floor, along with + # transparent polygons that define the rooms on the floor. + # Make sure that the room polygons are on top. + + $floorLabels.clear + $floorItems.clear + send("floor_fg#{active}", w, $floor_colors['offices']) + w.raise('room') + + # Offset the floors diagonally from each other. + + w.move('floor1', '2c', '2c') + w.move('floor2', '1c', '1c') + + # Create items for the room entry and its label. + TkcWindow.new(w, 600, 100, 'anchor'=>'w', 'window'=>$floor_entry) + TkcText.new(w, 600, 100, 'anchor'=>'e', 'text'=>"Éô²°ÈÖ¹æ: ") + w['scrollregion'] = w.bbox('all') +end + +# newRoom -- +# This method is invoked whenever the mouse enters a room +# in the floorplan. It changes tags so that the current room is +# highlighted. +# +# Arguments: +# w - The name of the canvas window. + +def newRoom(w) + id = w.find_withtag('current')[0] + $currentRoom.value = $floorLabels[id.id] if id != "" + Tk.update(true) +end + +# roomChanged -- +# This method is invoked whenever the currentRoom variable changes. +# It highlights the current room and unhighlights any previous room. +# +# Arguments: +# w - The canvas window displaying the floorplan. +# args - Not used. + +def roomChanged(w,*args) + w.delete('highlight') + item = $floorItems[$currentRoom.value] + return if item == nil + new = TkcPolygon.new(w, *(w.coords(item))) + new.configure('fill'=>$floor_colors['active'], 'tags'=>'highlight') + w.raise(new, 'marker') +end + +# floor_bg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg1(w,fill,outline) + TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104, + 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725, + 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327, + 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404, + 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325, + 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332, + 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363, + 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391, + 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7, + 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221, + 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5, + 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70, + 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill) + TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg']) + TkcLine.new(w,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg']) +end + +# floor_bg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg2(w,fill,outline) + TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129, + 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391, + 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280, + 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644, + 367,802,367,802,129,725,129,725,133,559,133,559,129, + 'tags'=>['floor2','bg'], 'fill'=>fill) + TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) +end + +# floor_bg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor_bg3(w,fill,outline) + TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96, + 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300, + 'tags'=>['floor3','bg'], 'fill'=>fill) + TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129, + 315,129,315,133,176,133,176,129,159,129,159,370,258,370, + 'tags'=>['floor3','bg'], 'fill'=>fill) + TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + TkcLine.new(w,107,300,159,300,159,248,107,248,107,300, + 'fill'=>outline, 'tags'=>['floor3','bg']) +end + +# floor_fg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the first +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg1(w,color) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '101' + $floorItems['101'] = i + TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Pub Lift1' + $floorItems['Pub Lift1'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Priv Lift1' + $floorItems['Priv Lift1'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,42,389,42,337,1,337,1,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '110' + $floorItems['110'] = i + TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '109' + $floorItems['109'] = i + TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,300,51,253,6,253,6,300, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '111' + $floorItems['111'] = i + TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,98,248,98,309,79,309,79,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117B' + $floorItems['117B'] = i + TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,251,51,204,6,204,6,251, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '112' + $floorItems['112'] = i + TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,6,156,51,156,51,203,6,203, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '113' + $floorItems['113'] = i + TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,85,169,79,169,79,192,85,192, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117A' + $floorItems['117A'] = i + TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,77,302,77,168,53,168,53,302, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '117' + $floorItems['117'] = i + TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,155,51,115,6,115,6,155, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '114' + $floorItems['114'] = i + TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,95,115,53,115,53,168,95,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '115' + $floorItems['115'] = i + TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,87,113,87,27,10,27,10,113, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '116' + $floorItems['116'] = i + TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,89,91,128,91,128,113,89,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '118' + $floorItems['118'] = i + TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,178,128,178,132,216,132,216,91, + 163,91,163,112,149,112,149,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '120' + $floorItems['120'] = i + TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192, + 156,192,156,169,175,169,175,246,79,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '122' + $floorItems['122'] = i + TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,169,154,169,154,191,138,191, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '121' + $floorItems['121'] = i + TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,99,300,126,300,126,309,99,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106A' + $floorItems['106A'] = i + TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '105' + $floorItems['105'] = i + TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,174,309,174,300,152,300,152,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106B' + $floorItems['106B'] = i + TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '104' + $floorItems['104'] = i + TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,385,138,337,91,337,91,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '108' + $floorItems['108'] = i + TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,256,337,140,337,140,385,256,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '107' + $floorItems['107'] = i + TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,300,353,300,329,260,329,260,353, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Smoking' + $floorItems['Smoking'] = i + TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '123' + $floorItems['123'] = i + TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '103' + $floorItems['103'] = i + TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '124' + $floorItems['124'] = i + TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '125' + $floorItems['125'] = i + TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '126' + $floorItems['126'] = i + TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,409,209,409,229,399,229,399,253, + 486,253,486,239,474,239,474,209, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '127' + $floorItems['127'] = i + TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,501,164,501,174,495,174,495,188, + 490,188,490,204,476,204,476,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'MShower' + $floorItems['MShower'] = i + TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Closet' + $floorItems['Closet'] = i + TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'WShower' + $floorItems['WShower'] = i + TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166, + 697,166,697,275,553,275,531,254,515,254, + 515,174,503,174,503,161,486,161, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '130' + $floorItems['130'] = i + TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,308,242,339,242,339,248,342,248, + 342,246,397,246,397,276,393,276, + 393,309,300,309,300,248,308,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '102' + $floorItems['102'] = i + TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,255,486,255,486,276,397,276, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '128' + $floorItems['128'] = i + TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,510,309,486,309,486,255,530,255, + 552,277,561,277,561,325,510,325, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '129' + $floorItems['129'] = i + TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,696,281,740,281,740,387,642,387, + 642,389,561,389,561,277,696,277, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '133' + $floorItems['133'] = i + TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,742,387,742,281,800,281,800,387, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '132' + $floorItems['132'] = i + TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,800,168,800,280,699,280,699,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '134' + $floorItems['134'] = i + TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,726,131,726,166,800,166,800,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '135' + $floorItems['135'] = i + TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366, + 304,312,396,312,396,288,400,288,404,288, + 409,290,413,292,418,297,421,302,422,309, + 421,318,417,325,411,330,405,332,397,333, + 344,333,340,334,336,336,335,338,332,342, + 331,347,332,351,334,354,336,357,341,359, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Ramona Stair' + $floorItems['Ramona Stair'] = i + TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20, + 122,28,123,32,123,68,220,68,220,87,90,87,90,23, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'University Stair' + $floorItems['University Stair'] = i + TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56, + 358,48,363,39,365,29,348,25,335,22,321,14, + 300,5,283,1,260,0,246,0,242,2,236,4,231,8, + 227,13,223,17,221,22,220,34,260,34, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Plaza Stair' + $floorItems['Plaza Stair'] = i + TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49, + 323,56,337,70,350,83,365,94,377,100, + 386,104,386,128,220,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = 'Plaza Deck' + $floorItems['Plaza Deck'] = i + TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '106' + $floorItems['106'] = i + TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115, + 95,128,114,128,114,151,157,151,157,153,112,153, + 112,130,97,130,97,168,175,168,175,131,146,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels[i.id] = '119' + $floorItems['119'] = i + TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + TkcLine.new(w,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall']) +end + +# floor_fg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the second +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg2(w,color) + i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222, + 800,222,800,168,748,168, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '238' + $floorItems['238'] = i + TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '237' + $floorItems['237'] = i + TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324, + 643,324,643,291,641,291,641,205,696,205, + 696,291,694,291,694,314,715,314,715,291, + 715,205,755,205,755,190,724,190,724,187, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '246' + $floorItems['246'] = i + TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,694,279,643,279,643,314,694,314, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '247' + $floorItems['247'] = i + TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246, + 397,246,397,255,476,255,476,250,482,250,559,250, + 559,274,482,274,482,278,396,278,396,274,232,274, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '202' + $floorItems['202'] = i + TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196, + 306,196,306,180,175,180,175,169,156,169, + 156,196,176,196,176,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '206' + $floorItems['206'] = i + TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,277,6,277,6,338,51,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '212' + $floorItems['212'] = i + TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '245' + $floorItems['245'] = i + TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,560,389,599,389,599,326,560,326, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '244' + $floorItems['244'] = i + TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,601,389,601,326,643,326,643,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '243' + $floorItems['243'] = i + TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,688,316,645,316,645,365,688,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '242' + $floorItems['242'] = i + TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,802,367,759,367,759,226,802,226, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Barbecue Deck' + $floorItems['Barbecue Deck'] = i + TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,262,755,314,717,314,717,262, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '240' + $floorItems['240'] = i + TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,316,689,316,689,365,755,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '241' + $floorItems['241'] = i + TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,206,717,206,717,261,755,261, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '239' + $floorItems['239'] = i + TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,695,277,643,277,643,206,695,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '248' + $floorItems['248'] = i + TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,676,135,676,185,724,185,724,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '236' + $floorItems['236'] = i + TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '235' + $floorItems['235'] = i + TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,626,143,633,143,633,135,572,135, + 572,143,579,143,579,185,626,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '234' + $floorItems['234'] = i + TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,135,571,135,571,145,578,145, + 578,185,527,185,527,131,557,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '233' + $floorItems['233'] = i + TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,249,557,249,557,205,476,205, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '230' + $floorItems['230'] = i + TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '232' + $floorItems['232'] = i + TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,186,495,186,495,204,476,204, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '229' + $floorItems['229'] = i + TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '227' + $floorItems['227'] = i + TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '228' + $floorItems['228'] = i + TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '226' + $floorItems['226'] = i + TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '225' + $floorItems['225'] = i + TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,198,306,198,306,249,234,249, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '224' + $floorItems['224'] = i + TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '223' + $floorItems['223'] = i + TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,268,179,221,179,221,135,268,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '222' + $floorItems['222'] = i + TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,177,179,219,179,219,135,177,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '221' + $floorItems['221'] = i + TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '204' + $floorItems['204'] = i + TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '205' + $floorItems['205'] = i + TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,256,385,256,340,212,340,212,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '207' + $floorItems['207'] = i + TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,210,340,164,340,164,385,210,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '208' + $floorItems['208'] = i + TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,115,340,162,340,162,385,115,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '209' + $floorItems['209'] = i + TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,228,89,156,53,156,53,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '217' + $floorItems['217'] = i + TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,169,97,169,97,190,89,190, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '217A' + $floorItems['217A'] = i + TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '216' + $floorItems['216'] = i + TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,179,51,135,6,135,6,179, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '215' + $floorItems['215'] = i + TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,227,6,227,6,180,51,180, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '214' + $floorItems['214'] = i + TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,275,6,275,6,229,51,229, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '213' + $floorItems['213'] = i + TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,114,340,67,340,67,385,114,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '210' + $floorItems['210'] = i + TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '211' + $floorItems['211'] = i + TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '203' + $floorItems['203'] = i + TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198, + 154,198,154,192,109,192,109,169,99,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '220' + $floorItems['220'] = i + TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Priv Lift2' + $floorItems['Priv Lift2'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = 'Pub Lift 2' + $floorItems['Pub Lift 2'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '218' + $floorItems['218'] = i + TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '219' + $floorItems['219'] = i + TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels[i.id] = '201' + $floorItems['201'] = i + TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall']) +end + +# floor_fg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the third +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor_fg3(w,color) + i = TkcPolygon.new(w,89,228,89,180,70,180,70,228, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316' + $floorItems['316'] = i + TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,115,368,162,368,162,323,115,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '309' + $floorItems['309'] = i + TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,164,323,164,368,211,368,211,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '308' + $floorItems['308'] = i + TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,256,368,212,368,212,323,256,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '307' + $floorItems['307'] = i + TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '305' + $floorItems['305'] = i + TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,219,251,203,244,203,244,219, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324B' + $floorItems['324B'] = i + TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,249,244,249,244,232,251,232, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324A' + $floorItems['324A'] = i + TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,223,135,223,179,177,179,177,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '320' + $floorItems['320'] = i + TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,114,368,114,323,67,323,67,368, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '310' + $floorItems['310'] = i + TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,277,23,321,68,321,68,277, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '312' + $floorItems['312'] = i + TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,229,68,229,68,275,23,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '313' + $floorItems['313'] = i + TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,68,227,23,227,23,180,68,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '314' + $floorItems['314'] = i + TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,95,179,95,135,23,135,23,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '315' + $floorItems['315'] = i + TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,99,226,99,204,91,204,91,226, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316B' + $floorItems['316B'] = i + TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,91,202,99,202,99,180,91,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '316A' + $floorItems['316A'] = i + TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198, + 174,198,174,226,101,226,101,179,97,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '319' + $floorItems['319'] = i + TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '311' + $floorItems['311'] = i + TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '318' + $floorItems['318'] = i + TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '317' + $floorItems['317'] = i + TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,274,194,274,221,306,221,306,194, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '323' + $floorItems['323'] = i + TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,306,222,274,222,274,249,306,249, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '325' + $floorItems['325'] = i + TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,263,179,224,179,224,135,263,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '321' + $floorItems['321'] = i + TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,314,169,306,169,306,192,273,192, + 264,181,264,135,314,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '322' + $floorItems['322'] = i + TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = 'Pub Lift3' + $floorItems['Pub Lift3'] = i + TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = 'Priv Lift3' + $floorItems['Priv Lift3'] = i + TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '303' + $floorItems['303'] = i + TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,272,203,272,249,252,249,252,230, + 244,230,244,221,252,221,252,203, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '324' + $floorItems['324'] = i + TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '304' + $floorItems['304'] = i + TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '301' + $floorItems['301'] = i + TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,397,246,377,246,377,185,397,185, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '327' + $floorItems['327'] = i + TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '326' + $floorItems['326'] = i + TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282, + 375,274,397,274,397,248,339,248,339,242,308,242, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '302' + $floorItems['302'] = i + TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203, + 272,193,263,180,242,180,175,180,175,169,156,169, + 156,196,177,196,177,228,107,228,70,228,70,275,107,275, + 107,248,160,248,160,301,107,301,107,275,70,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels[i.id] = '306' + $floorItems['306'] = i + TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + TkcLine.new(w,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall']) +end + +# Below is the "main program" that creates the floorplan demonstration. + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($floor_demo) && $floor_demo + $floor_demo.destroy + $floor_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$floor_demo = TkToplevel.new {|w| + title("Floorplan Canvas Demonstration") + iconname("Floorplan") + positionWindow(w) + geometry('+20+20') + minsize(100,100) +} + +base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left', + 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$floor_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $floor_demo + $floor_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'floor'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$floor_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# ÊÑ¿ôÀßÄê +$floorLabels = {} +$floorItems = {} + +# canvas ÀßÄê +if $tk_version =~ /^4\.[01]/ + $floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken', + 'highlightthickness'=>2) + $floor_canvas = TkCanvas.new($floor_canvas_frame, + 'width'=>900, 'height'=>500, 'borderwidth'=>0, + 'highlightthickness'=>0) {|c| + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}){|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + pack('side'=>'bottom', 'fill'=>'x') + } + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + } + $floor_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes') + $floor_canvas.pack('expand'=>'yes', 'fill'=>'both') + +else + TkFrame.new(base_frame) {|f| + pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + + h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal') + v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical') + + TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1| + $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500, + 'borderwidth'=>0, + 'highlightthickness'=>0) { + xscrollcommand(proc{|first,last| h.set first,last}) + yscrollcommand(proc{|first,last| v.set first,last}) + pack('expand'=>'yes', 'fill'=>'both') + } + grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + } + + v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + v.command(proc{|*args| $floor_canvas.yview(*args)}) + h.command(proc{|*args| $floor_canvas.xview(*args)}) + } +end + + +# Create an entry for displaying and typing in current room. + +$currentRoom = TkVariable.new +$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken', + 'bd'=>2, 'textvariable'=>$currentRoom) + +# Choose colors, then fill in the floorplan. + +$floor_colors = {} +if TkWinfo.depth($floor_canvas) > 1 + $floor_colors['bg1'] = '#a9c1da' + $floor_colors['outline1'] = '#77889a' + $floor_colors['bg2'] = '#9ab0c6' + $floor_colors['outline2'] = '#687786' + $floor_colors['bg3'] = '#8ba0b3' + $floor_colors['outline3'] = '#596673' + $floor_colors['offices'] = 'Black' + $floor_colors['active'] = '#c4d1df' +else + $floor_colors['bg1'] = 'white' + $floor_colors['outline1'] = 'black' + $floor_colors['bg2'] = 'white' + $floor_colors['outline2'] = 'black' + $floor_colors['bg3'] = 'white' + $floor_colors['outline3'] = 'black' + $floor_colors['offices'] = 'Black' + $floor_colors['active'] = 'black' +end + +$activeFloor = '' +floorDisplay $floor_canvas,3 + +# Set up event bindings for canvas: + +$floor_canvas.itembind('floor1', '1', proc{floorDisplay $floor_canvas,1}) +$floor_canvas.itembind('floor2', '1', proc{floorDisplay $floor_canvas,2}) +$floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3}) +$floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas}) +$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''}) +$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y') +$floor_canvas.bind('B2-Motion', + proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y') +$floor_canvas.bind('Destroy', proc{$currentRoom.unset}) +$currentRoom.value = '' +$currentRoom.trace('w',proc{roomChanged $floor_canvas}) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor2.rb new file mode 100644 index 0000000..d4381c5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/floor2.rb @@ -0,0 +1,1719 @@ +# -*- coding: euc-jp -*- +# +# floorDisplay widget demo 2 (called by 'widget') +# + +# floorDisplay2 -- +# Recreate the floorplan display in the canvas given by "w". The +# floor given by "active" is displayed on top with its office structure +# visible. +# +# Arguments: +# w - Name of the canvas window. +# active - Number of active floor (1, 2, or 3). + +def floorDisplay2(w,active) + return if $activeFloor2 == active + + w.delete('all') + $activeFloor2 = active + + # First go through the three floors, displaying the backgrounds for + # each floor. + + floor2_bg1(w,$floor2_colors['bg1'],$floor2_colors['outline1']) + floor2_bg2(w,$floor2_colors['bg2'],$floor2_colors['outline2']) + floor2_bg3(w,$floor2_colors['bg3'],$floor2_colors['outline3']) + + # Raise the background for the active floor so that it's on top. + + w.raise("floor#{active}") + + # Create a dummy item just to mark this point in the display list, + # so we can insert highlights here. + + w.create(TkcRectangle,0,100,1,101,'fill'=>'','outline'=>'','tags'=>'marker') + + # Add the walls and labels for the active floor, along with + # transparent polygons that define the rooms on the floor. + # Make sure that the room polygons are on top. + + $floorLabels2.clear + $floorItems2.clear + send("floor2_fg#{active}", w, $floor2_colors['offices']) + w.raise('room') + + # Offset the floors diagonally from each other. + + w.move('floor1', '2c', '2c') + w.move('floor2', '1c', '1c') + + # Create items for the room entry and its label. + w.create(TkcWindow, 600, 100, 'anchor'=>'w', 'window'=>$floor2_entry) + w.create(TkcText, 600, 100, 'anchor'=>'e', 'text'=>"Éô²°ÈÖ¹æ: ") + w['scrollregion'] = w.bbox('all') +end + +# newRoom2 -- +# This method is invoked whenever the mouse enters a room +# in the floorplan. It changes tags so that the current room is +# highlighted. +# +# Arguments: +# w - The name of the canvas window. + +def newRoom2(w) + id = w.find_withtag('current')[0] + $currentRoom2.value = $floorLabels2[id.id] if id != "" + Tk.update(true) +end + +# roomChanged2 -- +# This method is invoked whenever the currentRoom variable changes. +# It highlights the current room and unhighlights any previous room. +# +# Arguments: +# w - The canvas window displaying the floorplan. +# args - Not used. + +def roomChanged2(w,*args) + w.delete('highlight') + item = $floorItems2[$currentRoom2.value] + return if item == nil + new = TkcPolygon.new(w, *(w.coords(item))) + new.configure('fill'=>$floor2_colors['active'], 'tags'=>'highlight') + w.raise(new, 'marker') +end + +# floor2_bg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg1(w,fill,outline) + w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104, + 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725, + 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327, + 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404, + 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325, + 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332, + 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363, + 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391, + 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7, + 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221, + 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5, + 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70, + 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill) + w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,0,337,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,3,114,3,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,162,398,162, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,398,162,398,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,278,484,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,327,508,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,644,391,559,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,644,389,644,391, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,133,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,129,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,802,389,802,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,3,337,0,337, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,559,391,559,327, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,802,389,644,389, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,8,25,8,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,8,114,3,114, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,30,25,8,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,484,278,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,30,25,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,93,5,30,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,98,5,93,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,104,7,98,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,110,10,104,7, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,116,16,110,10, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,119,20,116,16, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,122,28,119,20, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,123,32,122,28, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,123,68,123,32, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,68,123,68, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,386,129,386,104, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,386,104,375,99, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,375,99,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,353,85,363,92, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,68,220,34, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,337,70,352,56, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,352,56,358,48, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,358,48,363,39, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,363,39,365,29, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,365,29,348,25, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,348,25,335,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,22,321,14, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,321,14,300,5, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,300,5,283,1, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,283,1,260,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,260,0,246,0, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,246,0,242,2, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,242,2,236,4, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,236,4,231,8, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,231,8,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,223,17,227,13, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,221,22,223,17, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,220,34,221,22, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,340,360,335,363, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,363,331,365, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,331,365,326,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,326,366,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,304,355,304,366, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,395,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,404,288,400,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,409,290,404,288, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,413,292,409,290, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,418,297,413,292, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,302,418,297, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,422,309,421,302, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,318,422,309, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,421,318,417,325, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,417,325,411,330, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,411,330,405,332, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,405,332,397,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,397,333,344,333, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,344,333,340,334, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,340,334,336,336, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,336,336,335,338, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,335,338,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,331,347,332,342, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,332,351,331,347, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,334,354,332,351, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,336,357,334,354, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,341,359,336,357, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,341,359,340,360, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,395,288,395,278, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,304,355,258,355, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,347,80,344,76, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,344,76,337,70, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,349,82,347,80, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,351,84,349,82, 'fill'=>outline, 'tags'=>['floor1','bg']) + w.create(TkcLine,353,85,351,84, 'fill'=>outline, 'tags'=>['floor1','bg']) +end + +# floor2_bg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg2(w,fill,outline) + w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129, + 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391, + 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280, + 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644, + 367,802,367,802,129,725,129,725,133,559,133,559,129, + 'tags'=>['floor2','bg'], 'fill'=>fill) + w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,129,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,725,133,725,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,129,559,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,133,725,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,162,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,559,129,484,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,802,367,644,367, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,644,367,644,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,644,391,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,558,327,558,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,558,327,508,327, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,508,327,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,311,508,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,280,484,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,162,484,162, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,484,280,395,280, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,395,280,395,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,258,387,60,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,133,3,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,339,0,339, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,0,339,0,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,258,329,258,387, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,395,311,350,311, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,398,129,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,133,315,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,3,133,96,133, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,176,133,176,129, 'fill'=>outline, 'tags'=>['floor2','bg']) + w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor2','bg']) +end + +# floor2_bg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the background information for the first +# floor. +# +# Arguments: +# w - The canvas window. +# fill - Fill color to use for the floor's background. +# outline - Color to use for the floor's outline. + +def floor2_bg3(w,fill,outline) + w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96, + 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300, + 'tags'=>['floor3','bg'], 'fill'=>fill) + w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129, + 315,129,315,133,176,133,176,129,159,129,159,370,258,370, + 'tags'=>['floor3','bg'], 'fill'=>fill) + w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,315,133,176,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,315,133,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,129,315,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,311,399,129, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,399,311,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,350,329,350,311, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,350,329,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,258,370,258,329, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,370,258,370, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,370,60,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,60,391,0,391, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,0,391,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg']) + w.create(TkcLine,107,300,159,300,159,248,107,248,107,300, + 'fill'=>outline, 'tags'=>['floor3','bg']) +end + +# floor2_fg1 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the first +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg1(w,color) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '101' + $floorItems2['101'] = i + w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Pub Lift1' + $floorItems2['Pub Lift1'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Priv Lift1' + $floorItems2['Priv Lift1'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,42,389,42,337,1,337,1,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '110' + $floorItems2['110'] = i + w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '109' + $floorItems2['109'] = i + w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,300,51,253,6,253,6,300, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '111' + $floorItems2['111'] = i + w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,98,248,98,309,79,309,79,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117B' + $floorItems2['117B'] = i + w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,251,51,204,6,204,6,251, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '112' + $floorItems2['112'] = i + w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,6,156,51,156,51,203,6,203, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '113' + $floorItems2['113'] = i + w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,85,169,79,169,79,192,85,192, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117A' + $floorItems2['117A'] = i + w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,77,302,77,168,53,168,53,302, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '117' + $floorItems2['117'] = i + w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,51,155,51,115,6,115,6,155, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '114' + $floorItems2['114'] = i + w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,95,115,53,115,53,168,95,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '115' + $floorItems2['115'] = i + w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,87,113,87,27,10,27,10,113, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '116' + $floorItems2['116'] = i + w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,89,91,128,91,128,113,89,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '118' + $floorItems2['118'] = i + w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,178,128,178,132,216,132,216,91, + 163,91,163,112,149,112,149,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '120' + $floorItems2['120'] = i + w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192, + 156,192,156,169,175,169,175,246,79,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '122' + $floorItems2['122'] = i + w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,169,154,169,154,191,138,191, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '121' + $floorItems2['121'] = i + w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,99,300,126,300,126,309,99,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106A' + $floorItems2['106A'] = i + w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '105' + $floorItems2['105'] = i + w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,174,309,174,300,152,300,152,309, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106B' + $floorItems2['106B'] = i + w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '104' + $floorItems2['104'] = i + w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,138,385,138,337,91,337,91,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '108' + $floorItems2['108'] = i + w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,256,337,140,337,140,385,256,385, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '107' + $floorItems2['107'] = i + w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,300,353,300,329,260,329,260,353, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Smoking' + $floorItems2['Smoking'] = i + w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '123' + $floorItems2['123'] = i + w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '103' + $floorItems2['103'] = i + w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '124' + $floorItems2['124'] = i + w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '125' + $floorItems2['125'] = i + w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '126' + $floorItems2['126'] = i + w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,409,209,409,229,399,229,399,253, + 486,253,486,239,474,239,474,209, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '127' + $floorItems2['127'] = i + w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,501,164,501,174,495,174,495,188, + 490,188,490,204,476,204,476,164, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'MShower' + $floorItems2['MShower'] = i + w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Closet' + $floorItems2['Closet'] = i + w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'WShower' + $floorItems2['WShower'] = i + w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166, + 697,166,697,275,553,275,531,254,515,254, + 515,174,503,174,503,161,486,161, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '130' + $floorItems2['130'] = i + w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,308,242,339,242,339,248,342,248, + 342,246,397,246,397,276,393,276, + 393,309,300,309,300,248,308,248, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '102' + $floorItems2['102'] = i + w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,397,255,486,255,486,276,397,276, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '128' + $floorItems2['128'] = i + w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,510,309,486,309,486,255,530,255, + 552,277,561,277,561,325,510,325, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '129' + $floorItems2['129'] = i + w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,696,281,740,281,740,387,642,387, + 642,389,561,389,561,277,696,277, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '133' + $floorItems2['133'] = i + w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,742,387,742,281,800,281,800,387, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '132' + $floorItems2['132'] = i + w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,800,168,800,280,699,280,699,168, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '134' + $floorItems2['134'] = i + w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,726,131,726,166,800,166,800,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '135' + $floorItems2['135'] = i + w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366, + 304,312,396,312,396,288,400,288,404,288, + 409,290,413,292,418,297,421,302,422,309, + 421,318,417,325,411,330,405,332,397,333, + 344,333,340,334,336,336,335,338,332,342, + 331,347,332,351,334,354,336,357,341,359, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Ramona Stair' + $floorItems2['Ramona Stair'] = i + w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20, + 122,28,123,32,123,68,220,68,220,87,90,87,90,23, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'University Stair' + $floorItems2['University Stair'] = i + w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56, + 358,48,363,39,365,29,348,25,335,22,321,14, + 300,5,283,1,260,0,246,0,242,2,236,4,231,8, + 227,13,223,17,221,22,220,34,260,34, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Plaza Stair' + $floorItems2['Plaza Stair'] = i + w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49, + 323,56,337,70,350,83,365,94,377,100, + 386,104,386,128,220,128, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = 'Plaza Deck' + $floorItems2['Plaza Deck'] = i + w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '106' + $floorItems2['106'] = i + w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115, + 95,128,114,128,114,151,157,151,157,153,112,153, + 112,130,97,130,97,168,175,168,175,131,146,131, + 'fill'=>'', 'tags'=>['floor1','room']) + $floorLabels2[i.id] = '119' + $floorItems2['119'] = i + w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor1','label']) + w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,169,176,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,176,247,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,376,246,376,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,307,247,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,147,129,176,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,202,133,176,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,352,258,387, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,0,337,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,3,114,3,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,237,52,273, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,189,52,225, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,140,52,177, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,306,395,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,531,254,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,475,178,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,502,162,398,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,129,398,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,408,208,475,208, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,278,484,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,327,508,327, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,644,391,559,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,644,389,644,391, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,514,205,475,205, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,189,496,187, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,149,725,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,129,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,389,802,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,739,167,802,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,0,337,9,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,58,337,21,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,43,391,43,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,105,337,75,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,91,387,91,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,154,337,117,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,139,387,139,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,227,337,166,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,337,251,337, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,328,302,328, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,302,355,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,311,302,311, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,484,278,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,395,294,395,278, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,473,278,473,275, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,473,256,473,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,533,257,531,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,553,276,551,274, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,276,553,276, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,559,391,559,327, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,389,644,389, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,741,314,741,389, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,280,698,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,707,280,698,280, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,802,280,731,280, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,741,280,741,302, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,698,167,727,167, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,725,137,725,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,514,254,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,175,514,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,502,175,502,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,475,166,475,162, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,496,176,496,175, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,491,189,496,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,491,205,491,189, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,238,475,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,240,487,238, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,487,252,487,254, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,315,133,304,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,256,133,280,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,247,270,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,307,247,294,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,214,133,232,133, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,247,217,266, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,309,217,291, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,217,309,172,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,154,309,148,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,175,300,175,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,151,300,175,300, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,151,247,151,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,237,78,265, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,286,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,106,309,78,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,130,309,125,309, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,99,309,99,247, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,127,299,99,299, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,127,309,127,299, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,155,191,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,137,169,137,191, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,171,78,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,78,190,78,218, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,86,192,86,169, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,86,192,78,192, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,301,3,301, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,286,52,301, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,252,3,252, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,203,3,203, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,3,156,52,156, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,8,25,8,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,63,114,3,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,75,114,97,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,108,114,129,114, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,129,114,129,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,52,114,52,128, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,132,89,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,88,25,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,88,114,88,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,144,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,147,111,147,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,111,147,111, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,109,162,111, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,162,96,162,89, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,218,94, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,218,89,218,119, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,8,25,88,25, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,258,337,258,328, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,129,96,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,302,355,258,355, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,386,104,386,129, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,377,100,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,365,94,377,100, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,350,83,365,94, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,337,70,350,83, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,337,70,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,312,49,323,56, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,295,40,312,49, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,282,37,295,40, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,260,34,282,37, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,253,34,260,34, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,386,128,386,104, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,156,152, 'fill'=>color, 'tags'=>['floor1','wall']) + w.create(TkcLine,113,152,113,129, 'fill'=>color, 'tags'=>['floor1','wall']) +end + +# floor2_fg2 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the second +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg2(w,color) + i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222, + 800,222,800,168,748,168, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '238' + $floorItems2['238'] = i + w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '237' + $floorItems2['237'] = i + w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324, + 643,324,643,291,641,291,641,205,696,205, + 696,291,694,291,694,314,715,314,715,291, + 715,205,755,205,755,190,724,190,724,187, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '246' + $floorItems2['246'] = i + w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,694,279,643,279,643,314,694,314, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '247' + $floorItems2['247'] = i + w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246, + 397,246,397,255,476,255,476,250,482,250,559,250, + 559,274,482,274,482,278,396,278,396,274,232,274, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '202' + $floorItems2['202'] = i + w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196, + 306,196,306,180,175,180,175,169,156,169, + 156,196,176,196,176,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '206' + $floorItems2['206'] = i + w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,277,6,277,6,338,51,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '212' + $floorItems2['212'] = i + w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '245' + $floorItems2['245'] = i + w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,560,389,599,389,599,326,560,326, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '244' + $floorItems2['244'] = i + w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,601,389,601,326,643,326,643,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '243' + $floorItems2['243'] = i + w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,688,316,645,316,645,365,688,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '242' + $floorItems2['242'] = i + w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,802,367,759,367,759,226,802,226, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Barbecue Deck' + $floorItems2['Barbecue Deck'] = i + w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,262,755,314,717,314,717,262, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '240' + $floorItems2['240'] = i + w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,316,689,316,689,365,755,365, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '241' + $floorItems2['241'] = i + w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,755,206,717,206,717,261,755,261, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '239' + $floorItems2['239'] = i + w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,695,277,643,277,643,206,695,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '248' + $floorItems2['248'] = i + w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,676,135,676,185,724,185,724,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '236' + $floorItems2['236'] = i + w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '235' + $floorItems2['235'] = i + w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,626,143,633,143,633,135,572,135, + 572,143,579,143,579,185,626,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '234' + $floorItems2['234'] = i + w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,557,135,571,135,571,145,578,145, + 578,185,527,185,527,131,557,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '233' + $floorItems2['233'] = i + w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,249,557,249,557,205,476,205, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '230' + $floorItems2['230'] = i + w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '232' + $floorItems2['232'] = i + w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,476,186,495,186,495,204,476,204, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '229' + $floorItems2['229'] = i + w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '227' + $floorItems2['227'] = i + w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '228' + $floorItems2['228'] = i + w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '226' + $floorItems2['226'] = i + w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '225' + $floorItems2['225'] = i + w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,198,306,198,306,249,234,249, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '224' + $floorItems2['224'] = i + w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '223' + $floorItems2['223'] = i + w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,268,179,221,179,221,135,268,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '222' + $floorItems2['222'] = i + w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,177,179,219,179,219,135,177,135, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '221' + $floorItems2['221'] = i + w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '204' + $floorItems2['204'] = i + w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '205' + $floorItems2['205'] = i + w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,256,385,256,340,212,340,212,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '207' + $floorItems2['207'] = i + w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,210,340,164,340,164,385,210,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '208' + $floorItems2['208'] = i + w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,115,340,162,340,162,385,115,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '209' + $floorItems2['209'] = i + w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,228,89,156,53,156,53,228, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '217' + $floorItems2['217'] = i + w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,169,97,169,97,190,89,190, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '217A' + $floorItems2['217A'] = i + w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '216' + $floorItems2['216'] = i + w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,179,51,135,6,135,6,179, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '215' + $floorItems2['215'] = i + w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,227,6,227,6,180,51,180, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '214' + $floorItems2['214'] = i + w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,51,275,6,275,6,229,51,229, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '213' + $floorItems2['213'] = i + w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,114,340,67,340,67,385,114,385, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '210' + $floorItems2['210'] = i + w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '211' + $floorItems2['211'] = i + w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '203' + $floorItems2['203'] = i + w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198, + 154,198,154,192,109,192,109,169,99,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '220' + $floorItems2['220'] = i + w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Priv Lift2' + $floorItems2['Priv Lift2'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = 'Pub Lift 2' + $floorItems2['Pub Lift 2'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '218' + $floorItems2['218'] = i + w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '219' + $floorItems2['219'] = i + w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor2','room']) + $floorLabels2[i.id] = '201' + $floorItems2['201'] = i + w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor2','label']) + w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,634,144,627,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,572,133,572,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,572,144,579,144, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,129,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,174,197,175,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,175,197,175,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,206,757,221, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,396,188,408,188, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,727,189,725,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,747,167,802,167, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,747,167,747,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,755,189,739,189, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,769,224,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,802,224,802,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,802,129,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,189,725,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,186,690,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,676,133,676,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,627,144,627,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,629,186,593,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,579,144,579,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,559,129,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,725,133,559,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,162,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,559,129,484,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,526,129,526,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,540,186,581,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,528,186,523,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,511,186,475,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,496,190,496,186, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,496,205,496,202, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,205,527,205, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,205,539,205, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,205,558,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,249,475,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,662,206,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,206,675,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,278,642,278, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,642,291,642,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,695,291,695,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,208,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,206,716,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,221,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,793,224,802,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,262,716,262, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,220,716,264, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,716,315,716,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,315,703,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,325,757,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,757,367,644,367, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,689,367,689,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,647,315,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,659,315,691,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,600,325,600,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,627,325,644,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,644,391,644,315, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,615,325,575,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,644,391,558,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,563,325,558,325, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,391,558,314, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,327,508,327, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,275,484,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,558,302,558,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,508,327,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,311,508,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,275,484,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,208,408,208, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,206,408,210, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,222,408,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,227,398,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,227,398,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,408,188,408,194, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,383,188,376,188, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,188,398,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,162,484,162, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,475,162,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,254,475,254, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,484,280,395,280, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,395,311,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,197,293,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,278,197,233,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,233,197,233,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,179,284,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,233,249,278,249, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,269,179,269,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,220,179,220,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,191,110,191, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,90,190,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,98,169,98,190, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,133,52,165, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,214,52,177, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,226,52,262, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,274,52,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,234,275,234,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,226,339,258,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,211,387,211,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,214,339,177,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,258,387,60,387, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,3,133,3,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,165,339,129,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,117,339,80,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,68,339,59,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,0,339,46,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,0,339,0,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,60,387,60,391, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,258,329,258,387, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,395,311,350,311, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,398,129,315,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,133,315,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,3,133,96,133, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,66,387,66,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,115,387,115,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,163,387,163,339, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,234,275,276,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,288,275,309,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,321,275,341,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,375,275,395,275, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,376,245,376,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,245,340,224, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,293,250,307,250, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,271,179,238,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,226,179,195,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,174,169,176,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,162,169,90,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,96,169,96,129, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,175,227,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,90,190,90,227, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,179,3,179, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,228,3,228, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,52,276,3,276, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,110,191,110,169, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,155,189,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor2','wall']) + w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor2','wall']) +end + +# floor2_fg3 -- +# This method represents part of the floorplan database. When +# invoked, it instantiates the foreground information for the third +# floor (office outlines and numbers). +# +# Arguments: +# w - The canvas window. +# color - Color to use for drawing foreground information. + +def floor2_fg3(w,color) + i = TkcPolygon.new(w,89,228,89,180,70,180,70,228, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316' + $floorItems2['316'] = i + w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,115,368,162,368,162,323,115,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '309' + $floorItems2['309'] = i + w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,164,323,164,368,211,368,211,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '308' + $floorItems2['308'] = i + w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,256,368,212,368,212,323,256,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '307' + $floorItems2['307'] = i + w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '305' + $floorItems2['305'] = i + w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,219,251,203,244,203,244,219, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324B' + $floorItems2['324B'] = i + w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,251,249,244,249,244,232,251,232, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324A' + $floorItems2['324A'] = i + w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,223,135,223,179,177,179,177,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '320' + $floorItems2['320'] = i + w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,114,368,114,323,67,323,67,368, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '310' + $floorItems2['310'] = i + w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,277,23,321,68,321,68,277, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '312' + $floorItems2['312'] = i + w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,23,229,68,229,68,275,23,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '313' + $floorItems2['313'] = i + w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,68,227,23,227,23,180,68,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '314' + $floorItems2['314'] = i + w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,95,179,95,135,23,135,23,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '315' + $floorItems2['315'] = i + w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,99,226,99,204,91,204,91,226, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316B' + $floorItems2['316B'] = i + w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,91,202,99,202,99,180,91,180, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '316A' + $floorItems2['316A'] = i + w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198, + 174,198,174,226,101,226,101,179,97,179, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '319' + $floorItems2['319'] = i + w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '311' + $floorItems2['311'] = i + w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,154,191,111,191,111,169,154,169, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '318' + $floorItems2['318'] = i + w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,175,168,97,168,97,131,175,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '317' + $floorItems2['317'] = i + w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,274,194,274,221,306,221,306,194, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '323' + $floorItems2['323'] = i + w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,306,222,274,222,274,249,306,249, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '325' + $floorItems2['325'] = i + w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,263,179,224,179,224,135,263,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '321' + $floorItems2['321'] = i + w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,314,169,306,169,306,192,273,192, + 264,181,264,135,314,135, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '322' + $floorItems2['322'] = i + w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,307,240,339,240,339,206,307,206, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = 'Pub Lift3' + $floorItems2['Pub Lift3'] = i + w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,339,205,307,205,307,171,339,171, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = 'Priv Lift3' + $floorItems2['Priv Lift3'] = i + w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '303' + $floorItems2['303'] = i + w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,272,203,272,249,252,249,252,230, + 244,230,244,221,252,221,252,203, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '324' + $floorItems2['324'] = i + w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '304' + $floorItems2['304'] = i + w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,375,246,375,172,341,172,341,246, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '301' + $floorItems2['301'] = i + w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,397,246,377,246,377,185,397,185, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '327' + $floorItems2['327'] = i + w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '326' + $floorItems2['326'] = i + w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282, + 375,274,397,274,397,248,339,248,339,242,308,242, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '302' + $floorItems2['302'] = i + w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203, + 272,193,263,180,242,180,175,180,175,169,156,169, + 156,196,177,196,177,228,107,228,70,228,70,275,107,275, + 107,248,160,248,160,301,107,301,107,275,70,275, + 'fill'=>'', 'tags'=>['floor3','room']) + $floorLabels2[i.id] = '306' + $floorItems2['306'] = i + w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color, + 'anchor'=>'c', 'tags'=>['floor3','label']) + w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,129,399,311, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,202,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,350,283,350,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,251,231,243,231, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,220,251,220, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,250,243,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,197,155,190, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,110,192,110,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,192,110,192, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,197,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,280,69,274, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,276,69,276, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,262,69,226, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,228,69,228, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,179,75,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,69,179,69,214, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,220,90,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,204,90,202, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,203,100,203, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,187,90,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,90,227,176,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,100,179,100,227, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,100,179,87,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,96,179,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,162,169,96,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,173,169,176,169, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,182,179,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,129,176,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,195,179,226,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,224,133,224,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,264,179,264,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,238,179,264,179, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,207,273,193, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,235,273,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,224,273,219, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,193,307,193, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,222,307,222, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,384,247,376,247, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,206,307,206, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,187,340,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,210,340,201, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,247,340,224, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,340,241,307,241, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,247,376,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,307,250,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,170,307,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,129,315,170, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,283,366,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,376,283,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,275,376,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,341,275,320,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,341,283,350,283, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,298,275,298,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,308,275,298,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,322,243,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,243,275,284,275, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,322,226,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,212,370,212,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,214,322,177,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,163,370,163,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,165,322,129,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,84,322,117,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,71,322,64,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,115,322,115,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,66,322,66,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,52,322,21,322, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,331,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,21,331,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,96,133,21,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,176,129,96,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,133,176,133, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,315,129,399,129, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,399,311,350,311, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,350,329,258,329, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,322,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,370,258,370, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,370,60,391, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,0,391,0,331, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,60,391,0,391, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,307,250,307,242, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,273,250,307,250, 'fill'=>color, 'tags'=>['floor3','wall']) + w.create(TkcLine,258,250,243,250, 'fill'=>color, 'tags'=>['floor3','wall']) +end + +# Below is the "main program" that creates the floorplan demonstration. + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($floor2_demo) && $floor2_demo + $floor2_demo.destroy + $floor2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$floor2_demo = TkToplevel.new {|w| + title("Floorplan Canvas Demonstration 2") + iconname("Floorplan2") + positionWindow(w) + geometry('+20+20') + minsize(100,100) +} + +base_frame = TkFrame.new($floor2_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left', + 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$floor2_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $floor2_demo + $floor2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'floor2'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$floor2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# ÊÑ¿ôÀßÄê +$floorLabels2 = {} +$floorItems2 = {} + +# canvas ÀßÄê +if $tk_version =~ /^4\.[01]/ + $floor2_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken', + 'highlightthickness'=>2) + $floor2_canvas = TkCanvas.new($floor2_canvas_frame, + 'width'=>900, 'height'=>500, 'borderwidth'=>0, + 'highlightthickness'=>0) {|c| + TkScrollbar.new(base_frame, 'orient'=>'horiz', + 'command'=>proc{|*args| c.xview(*args)}){|hs| + c.xscrollcommand(proc{|first,last| hs.set first,last}) + pack('side'=>'bottom', 'fill'=>'x') + } + TkScrollbar.new(base_frame, 'command'=>proc{|*args| c.yview(*args)}){|vs| + c.yscrollcommand(proc{|first,last| vs.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + } + $floor2_canvas_frame.pack('side'=>'top','fill'=>'both', 'expand'=>'yes') + $floor2_canvas.pack('expand'=>'yes', 'fill'=>'both') + +else + TkFrame.new(base_frame) {|f| + pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + + h = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'horizontal') + v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical') + + TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1| + $floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500, + 'borderwidth'=>0, + 'highlightthickness'=>0) { + xscrollcommand(proc{|first,last| h.set first,last}) + yscrollcommand(proc{|first,last| v.set first,last}) + pack('expand'=>'yes', 'fill'=>'both') + } + grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + } + + v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + v.command(proc{|*args| $floor2_canvas.yview(*args)}) + h.command(proc{|*args| $floor2_canvas.xview(*args)}) + } +end + +# Create an entry for displaying and typing in current room. + +$currentRoom2 = TkVariable.new +$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken', + 'bd'=>2, 'textvariable'=>$currentRoom2) + +# Choose colors, then fill in the floorplan. + +$floor2_colors = {} +if TkWinfo.depth($floor2_canvas) > 1 + $floor2_colors['bg1'] = '#a9c1da' + $floor2_colors['outline1'] = '#77889a' + $floor2_colors['bg2'] = '#9ab0c6' + $floor2_colors['outline2'] = '#687786' + $floor2_colors['bg3'] = '#8ba0b3' + $floor2_colors['outline3'] = '#596673' + $floor2_colors['offices'] = 'Black' + $floor2_colors['active'] = '#c4d1df' +else + $floor2_colors['bg1'] = 'white' + $floor2_colors['outline1'] = 'black' + $floor2_colors['bg2'] = 'white' + $floor2_colors['outline2'] = 'black' + $floor2_colors['bg3'] = 'white' + $floor2_colors['outline3'] = 'black' + $floor2_colors['offices'] = 'Black' + $floor2_colors['active'] = 'black' +end + +$activeFloor2 = '' +floorDisplay2 $floor2_canvas,3 + +# Set up event bindings for canvas: + +$floor2_canvas.itembind('floor1', '1', proc{floorDisplay2 $floor2_canvas,1}) +$floor2_canvas.itembind('floor2', '1', proc{floorDisplay2 $floor2_canvas,2}) +$floor2_canvas.itembind('floor3', '1', proc{floorDisplay2 $floor2_canvas,3}) +$floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas}) +$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''}) +$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y') +$floor2_canvas.bind('B2-Motion', + proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y') +$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset}) +$currentRoom2.value = '' +$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas}) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/form.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/form.rb new file mode 100644 index 0000000..4de7056 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/form.rb @@ -0,0 +1,66 @@ +# -*- coding: euc-jp -*- +# +# form widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($form_demo) && $form_demo + $form_demo.destroy + $form_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$form_demo = TkToplevel.new {|w| + title("Form Demonstration") + iconname("form") + positionWindow(w) +} + +base_frame = TkFrame.new($form_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï´Êñ¤Ê¥Õ¥©¡¼¥àÆþÎÏÍѤˤʤäƤ¤¤Æ¡¢¤µ¤Þ¤¶¤Þ¤Ê¥¨¥ó¥È¥ê¤ËÆþÎϤ¬¤Ç¤­¤Þ¤¹¡£¥¿¥Ö¤Ç¥¨¥ó¥È¥ê¤ÎÀÚÂؤ¨¤¬¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top', 'fill'=>'x') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $form_demo + $form_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'form'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# entry À¸À® +form_data = [] +(1..5).each{|i| + f = TkFrame.new(base_frame, 'bd'=>2) + e = TkEntry.new(f, 'relief'=>'sunken', 'width'=>40) + l = TkLabel.new(f) + e.pack('side'=>'right') + l.pack('side'=>'left') + form_data[i] = {'frame'=>f, 'entry'=>e, 'label'=>l} +} + +# ʸ»úÎóÀßÄê +form_data[1]['label'].text('̾Á°:') +form_data[2]['label'].text('½»½ê:') +form_data[5]['label'].text('ÅÅÏÃ:') + +# pack +(1..5).each{|i| form_data[i]['frame'].pack('side'=>'top', 'fill'=>'x')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/goldberg.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/goldberg.rb new file mode 100644 index 0000000..a81c7ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/goldberg.rb @@ -0,0 +1,2011 @@ +# -*- coding: euc-jp -*- +# +# Ruby/Tk Goldverg demo (called by 'widget') +# +# Based on Tcl/Tk8.5a2 widget demos. +# The following is the original comment of TkGoldberg.tcl. +# +#>>##+################################################################# +#>># +#>># TkGoldberg.tcl +#>># by Keith Vetter, March 13, 2003 +#>># +#>># "Man will always find a difficult means to perform a simple task" +#>># Rube Goldberg +#>># +#>># Reproduced here with permission. +#>># +#>>##+################################################################# +#>># +#>># Keith Vetter 2003-03-21: this started out as a simple little program +#>># but was so much fun that it grew and grew. So I apologize about the +#>># size but I just couldn't resist sharing it. +#>># +#>># This is a whizzlet that does a Rube Goldberg type animation, the +#>># design of which comes from an New Years e-card from IncrediMail. +#>># That version had nice sound effects which I eschewed. On the other +#>># hand, that version was in black and white (actually dark blue and +#>># light blue) and this one is fully colorized. +#>># +#>># One thing I learned from this project is that drawing filled complex +#>># objects on a canvas is really hard. More often than not I had to +#>># draw each item twice--once with the desired fill color but no +#>># outline, and once with no fill but with the outline. Another trick +#>># is erasing by drawing with the background color. Having a flood fill +#>># command would have been extremely helpful. +#>># +#>># Two wiki pages were extremely helpful: Drawing rounded rectangles +#>># which I generalized into Drawing rounded polygons, and regular +#>># polygons which allowed me to convert ovals and arcs into polygons +#>># which could then be rotated (see Canvas Rotation). I also wrote +#>># Named Colors to aid in the color selection. +#>># +#>># I could comment on the code, but it's just 26 state machines with +#>># lots of canvas create and move calls. + +if defined?($goldberg_demo) && $goldberg_demo + $goldberg_demo.destroy + $goldberg_demo = nil +end + +# demo toplevel widget +$goldberg_demo = TkToplevel.new {|w| + title("Tk Goldberg (demonstration)") + iconname("goldberg") +# positionWindow(w) +} + +base_frame = TkFrame.new($goldberg_demo).pack(:fill=>:both, :expand=>true) + +=begin +# label +msg = TkLabel.new($goldberg_demo) { + font 'Arial 10' + wraplength '4i' + justify 'left' + text "¤³¤ì¤Ï¡¢¤¢¤Ê¤¿¤¬¼«Ê¬¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ò¤¤¤«¤ËÆþ¤êÁȤó¤À¤â¤Î¤Ë¤Ç¤­¤ë¤«¤ò¼¨¤¹¤È¤¤¤¦¤À¤±¤Î¤¿¤á¤Î¥Ç¥â¤Ç¤¹¡£¥Ü¡¼¥ë¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ðʪ¤¬Æ°¤­»Ï¤á¤Þ¤¹¡ª\n\n\"Man will always find a difficult means to perform a simple task\"\n - Rube Goldberg" +} +msg.pack('side'=>'top') +=end + +=begin +# frame +TkFrame.new($goldberg_demo) {|frame| + TkButton.new(frame) { + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $goldberg_demo + $goldberg_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'goldberg'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') +=end + +######################################### + +class TkGoldberg_Demo + def initialize(parent) + @parent = parent + + @S = {} + @S['title'] = 'Tk Goldberg' + @S['speed'] = TkVariable.new(5) + @S['cnt'] = TkVariable.new(0) + # @S['message'] = TkVariable.new("\\nWelcome\\nto\\nRuby/Tk") + @S['message'] = TkVariable.new("\\n ¤è¤¦¤³¤½¡ª\\nRuby/Tk\\n¤Î\\nÀ¤³¦¤Ø") + @S['pause'] = TkVariable.new + @S['details'] = TkVariable.new(true) + + @S['mode'] = TkVariable.new(:MSTART, :symbol) + # :MSTART, :MGO, :MPAUSE, :MSSTEP, :MBSTEP, :MDONE, :MDEBUG + + # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + @speed = [1, 10, 20, 50, 80, 100, 150, 200, 300, 400, 500] + + # colors + @C = {} + @C['fg'] = 'black' + # @C['bg'] = 'gray75' + @C['bg'] = 'cornflowerblue' + + @C['0'] = 'white'; @C['1a'] = 'darkgreen'; @C['1b'] = 'yellow' + @C['2'] = 'red'; @C['3a'] = 'green'; @C['3b'] = 'darkblue' + @C['4'] = @C['fg']; @C['5a'] = 'brown'; @C['5b'] = 'white' + @C['6'] = 'magenta'; @C['7'] = 'green'; @C['8'] = @C['fg'] + @C['9'] = 'blue4'; @C['10a'] = 'white'; @C['10b'] = 'cyan' + @C['11a'] = 'yellow'; @C['11b'] = 'mediumblue'; @C['12'] = 'tan2' + @C['13a'] = 'yellow'; @C['13b'] = 'red'; @C['14'] = 'white' + @C['15a'] = 'green'; @C['15b'] = 'yellow'; @C['16'] = 'gray65' + @C['17'] = '#A65353'; @C['18'] = @C['fg']; @C['19'] = 'gray50' + @C['20'] = 'cyan'; @C['21'] = 'gray65'; @C['22'] = @C['20'] + @C['23a'] = 'blue'; @C['23b'] = 'red'; @C['23c'] = 'yellow' + @C['24a'] = 'red'; @C['24b'] = 'white'; + + @STEP = TkVariable.new_hash + @STEP.default_value_type = :numeric + + @XY = {} + + @XY6 = { + '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192], + '-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176], + '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164], + '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151], + '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219], + '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324], + '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346], + '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391], + '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456], + '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443], + '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437], + '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424], + '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412], + '13,15'=>[376, 410], '13,16'=>[360, 403] + } + + @timer = TkTimer.new(@speed[@S['speed'].numeric]){|timer| + timer.set_interval(go) + } + + do_display + reset + + # Start everything going + @timer.start + end + + def do_display() + @ctrl = TkFrame.new(@parent, :relief=>:ridge, :bd=>2, :padx=>5, :pady=>5) + @screen = TkFrame.new(@parent, :bd=>2, + :relief=>:raised).pack(:side=>:left, :fill=>:both, + :expand=>true) + + @canvas = TkCanvas.new(@parent, :width=>850, :height=>700, + :bg=>@C['bg'], :highlightthickness=>0){ + scrollregion([0, 0, 1000, 1000]) # Kludge to move everything up + yview_moveto(0.05) + }.pack(:in=>@screen, :side=>:top, :fill=>:both, :expand=>true) + + @canvas.bind('3'){ @pause.invoke } + @canvas.bind('Destroy'){ @timer.stop } + + do_ctrl_frame + do_detail_frame + + # msg = TkLabel.new(@parent, :bg=>@C['bg'], :fg=>'white') { + msg = Tk::Label.new(@parent, :bg=>@C['bg'], :fg=>'white') { + font 'Arial 10' + wraplength 600 + justify 'left' + text "¤³¤ì¤Ï¡¢¤¢¤Ê¤¿¤¬¼«Ê¬¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ò¤¤¤«¤ËÆþ¤êÁȤó¤À¤â¤Î¤Ë¤Ç¤­¤ë¤«¤ò¼¨¤¹¤È¤¤¤¦¤À¤±¤Î¤¿¤á¤Î¥Ç¥â¤Ç¤¹¡£¥Ü¡¼¥ë¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ðʪ¤¬Æ°¤­»Ï¤á¤Þ¤¹¡ª\n\"Man will always find a difficult means to perform a simple task\" - Rube Goldberg" + } + msg.place(:in=>@canvas, :relx=>0, :rely=>0, :anchor=>:nw) + + frame = TkFrame.new(@parent, :bg=>@C['bg']) + + # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $goldberg_demo + $goldberg_demo = nil + tmppath.destroy + } + }.pack('side'=>'left') + + # TkButton.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + Tk::Button.new(frame, :bg=>@C['bg'], :activebackground=>@C['bg']) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'goldberg'} + }.pack('side'=>'left', 'padx'=>5) + + # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl}, + @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl}, + :bg=>@C['bg'], :activebackground=>@C['bg']) + @show.pack('side'=>'left') + frame.place(:in=>@canvas, :relx=>1, :rely=>0, :anchor=>:ne) + + Tk.update + end + + def do_ctrl_frame + @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6, + :command=>proc{do_button(0)}) + if font = @start['font'] + @start.font(font.weight('bold')) + end + + @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font, + :command=>proc{do_button(1)}, :relief=>:raised, + :variable=>@S['pause']) + + @step = TkButton.new(@parent, :text=>'Single Step', :font=>font, + :command=>proc{do_button(2)}) + @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font, + :command=>proc{do_button(4)}) + @reset = TkButton.new(@parent, :text=>'Reset', :font=>font, + :command=>proc{do_button(3)}) + + @details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge) + @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font, + :relief=>:raised, :variable=>@S['details']) + + @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'], + :justify=>:center) + @speed_scale = TkScale.new(@parent, :orient=>:horizontal, + :from=>1, :to=>10, :font=>font, + :variable=>@S['speed'], :bd=>2, + :relief=>:ridge, :showvalue=>false) + @about = TkButton.new(@parent, :text=>'About', + :command=>proc{about}, :font=>font) + + Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew) + @ctrl.grid_rowconfigure(1, :minsize=>10) + Tk.grid(@pause, :in=>@ctrl, :row=>2, :sticky=>:ew) + Tk.grid(@step, :in=>@ctrl, :sticky=>:ew) + Tk.grid(@bstep, :in=>@ctrl, :sticky=>:ew) + Tk.grid(@reset, :in=>@ctrl, :sticky=>:ew) + @ctrl.grid_rowconfigure(10, :minsize=>20) + Tk.grid(@details, :in=>@ctrl, :row=>11, :sticky=>:ew) + Tk.grid(@detail, :in=>@details, :row=>0, :sticky=>:ew) + @ctrl.grid_rowconfigure(50, :weight=>1) + + @S['mode'].trace('w', proc{|*args| active_GUI(*args)}) + @S['details'].trace('w', proc{|*args| active_GUI(*args)}) + @S['speed'].trace('w', proc{|*args| active_GUI(*args)}) + + Tk.grid(@msg_entry, :in=>@ctrl, :row=>98, :sticky=>:ew, :pady=>5) + Tk.grid(@speed_scale, :in=>@ctrl, :row=>99, :sticky=>:ew) + Tk.grid(@about, :in=>@ctrl, :row=>100, :sticky=>:ew) + + @reset.bind('3'){@S['mode'].value = -1} # Debugging + end + + def do_detail_frame + @f_details = TkFrame.new(@details) + + @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'], + :bd=>1, :relief=>:solid, :bg=>'white') + Tk.grid(@label, '-', '-', '-', :sticky=>:ew, :row=>0) + + idx = 1 + loop { + break unless respond_to?("move#{idx}") + l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e, + :width=>2, :bd=>1, :relief=>:solid, :bg=>'white') + @STEP[idx] = 0 + ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx), + :width=>5, :bd=>1, :relief=>:solid, :bg=>'white') + row = (idx + 1)/2 + col = ((idx + 1) & 1) * 2 + Tk.grid(l, :sticky=>:ew, :row=>row, :column=>col) + Tk.grid(ll, :sticky=>:ew, :row=>row, :column=>(col + 1)) + idx += 1 + } + @f_details.grid_columnconfigure(1, :weight=>1) + end + + def show_ctrl + if @ctrl.winfo_mapped? + @ctrl.pack_forget + @show.text('>>') + else + @ctrl.pack(:side=>:right, :fill=>:both, :ipady=>5) + @show.text('<<') + end + end + + def draw_all + reset_step + @canvas.delete(:all) + idx = 0 + loop{ + m = "draw#{idx}" + break unless respond_to?(m) + send(m) + idx += 1 + } + end + + def active_GUI(var1, var2, op) + st = {false=>:disabled, true=>:normal} + + m = @S['mode'].to_sym + @S['pause'].value = (m == :MPAUSE) + @start.state(st[m != :MGO]) + @pause.state(st[m != :MSTART && m != :MDONE]) + @step.state(st[m != :MGO && m != :MDONE]) + @bstep.state(st[m != :MGO && m != :MDONE]) + @reset.state(st[m != :MSTART]) + + if @S['details'].bool + Tk.grid(@f_details, :in=>@details, :row=>2, :sticky=>:ew) + else + Tk.grid_forget(@f_details) + end + @speed_scale.label("Speed: #{@S['speed'].value}") + end + + def start + @S['mode'].value = :MGO + end + + def do_button(what) + case what + when 0 # Start + reset if @S['mode'].to_sym == :MDONE + @S['mode'].value = :MGO + + when 1 # Pause + @S['mode'].value = ((@S['pause'].bool)? :MPAUSE: :MGO) + + when 2 # Step + @S['mode'].value = :MSSTEP + + when 3 # Reset + reset + + when 4 # Big step + @S['mode'].value = :MBSTEP + end + end + + def go(who = nil) + now = Tk::Clock.clicks(:miliseconds) + if who # Start here for debugging + @S['active'] = [who] + @S['mode'].value = :MGO + end + return if @S['mode'].to_sym == :MDEBUG # Debugging + # If not paused, do the next move + n = next_step if @S['mode'].to_sym != :MPAUSE + @S['mode'].value = :MPAUSE if @S['mode'].to_sym == :MSSTEP # Single step + @S['mode'].value = :MSSTEP if @S['mode'].to_sym == :MBSTEP && n # big step + elapsed = Tk::Clock.clicks(:miliseconds) - now + delay = @speed[@S['speed'].to_i] - elapsed + delay = 1 if delay <= 0 + return delay + end + + def next_step + retval = false # Return value + + if @S['mode'].to_sym != :MSTART && @S['mode'].to_sym != :MDONE + @S['cnt'].numeric += 1 + end + alive = [] + @S['active'].each{|who| + who = who.to_i + n = send("move#{who}") + if (n & 1).nonzero? # This guy still alive + alive << who + end + if (n & 2).nonzero? # Next guy is active + alive << (who + 1) + retval = true + end + if (n & 4).nonzero? # End of puzzle flag + @S['mode'].value = :MDONE # Done mode + @S['active'] = [] # No more animation + return true + end + } + @S['active'] = alive + return retval + end + + def about + msg = "Ruby/Tk Version ::\nby Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)\n\n" + msg += "Original Version ::\n" + msg += "#{@S['title']}\nby Keith Vetter, March 2003\n(Reproduced by kind permission of the author)\n\n" + msg += "Man will always find a difficult means to perform a simple task" + msg += "\nRube Goldberg" + Tk.messageBox(:message=>msg, :title=>'About') + end + + ################################################################ + # + # All the drawing and moving routines + # + + # START HERE! banner + def draw0 + color = @C['0'] + TkcText.new(@canvas, + # [579, 119], :text=>'START HERE!', + [558, 119], :text=>'¤³¤³¤«¤é¥¹¥¿¡¼¥È¡ª', + :fill=>color, :anchor=>:w, + :tag=>'I0', :font=>['Times Roman', 12, :italic, :bold]) + TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color, + :width=>5, :arrow=>:last, :arrowshape=>[18, 18, 5]) + @canvas.itembind('I0', '1'){ start } + end + + def move0(step = nil) + step = get_step(0, step) + + if @S['mode'].to_sym != :MSTART # Start the ball rolling + move_abs('I0', [-100, -100]) # Hide the banner + return 2 + end + + pos = [ + [673, 119], [678, 119], [683, 119], [688, 119], + [693, 119], [688, 119], [683, 119], [678, 119] + ] + step = step % pos.length + move_abs('I0', pos[step]) + return 1 + end + + # Dropping ball + def draw1 + color = @C['1a'] + color2 = @C['1b'] + TkcPolygon.new(@canvas, + [ 844, 133, 800, 133, 800, 346, 820, 346, + 820, 168, 844, 168, 844, 133 ], + :width=>3, :fill=>color, :outline=>'') + TkcPolygon.new(@canvas, + [ 771, 133, 685, 133, 685, 168, 751, 168, + 751, 346, 771, 346, 771, 133 ], + :width=>3, :fill=>color, :outline=>'') + TkcOval.new(@canvas, box(812, 122, 9), + :tag=>'I1', :fill=>color2, :outline=>'') + + @canvas.itembind('I1', '1'){ start } + end + + def move1(step = nil) + step = get_step(1, step) + pos = [ + [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153], + [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438], + [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601], + [-100, -100] + ] + return 0 if step >= pos.length + where = pos[step] + move_abs('I1', where) + move15a if where[2] == :y + return 3 if where[2] == :x + return 1 + end + + # Lighting the match + def draw2 + color = @C['2'] + + # Fulcrum + TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392], + :fill=>@C['fg'], :outline=>@C['fg']) + + # Strike box + TkcRectangle.new(@canvas, [628, 335, 660, 383], + :fill=>'', :outline=>@C['fg']) + (0..2).each{|y| + yy = 335 + y*16 + TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25', + :anchor=>:nw, :foreground=>@C['fg']) + TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25', + :anchor=>:nw, :foreground=>@C['fg']) + } + + # Lever + TkcLine.new(@canvas, [702, 366, 798, 366], + :fill=>@C['fg'], :width=>6, :tag=>'I2_0') + + # R strap + TkcLine.new(@canvas, [712, 363, 712, 355], + :fill=>@C['fg'], :width=>3, :tag=>'I2_1') + + # L strap + TkcLine.new(@canvas, [705, 363, 705, 355], + :fill=>@C['fg'], :width=>3, :tag=>'I2_2') + + # Match stick + TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356], + :fill=>@C['fg'], :width=>3, :tag=>'I2_3') + + # Match head + TkcPolygon.new(@canvas, + [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1, + 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ], + :fill=>color, :outline=>color, :tag=>'I2_4') + end + + def move2(step = nil) + step = get_step(2, step) + + stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1] + xy = [] + xy[0] = [ + 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307, + 662, 318, 662, 328, 671, 336 + ] + xy[1] = [ + 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311, + 661, 327, 671, 335 + ] + xy[2] = [ + 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298, + 666, 309, 660, 324, 672, 336 + ] + + if step >= stages.length + @canvas.delete('I2') + return 0 + end + + if step == 0 # Rotate the match + beta = 20 + + ox, oy = anchor('I2_0', :s) # Where to pivot + + i = 0 + until @canvas.find_withtag("I2_#{i}").empty? + rotate_item("I2_#{i}", ox, oy, beta) + i += 1 + end + + # For the flame + TkcPolygon.new(@canvas, [], :tag=>'I2', :smooth=>true, :fill=>@C['2']) + + return 1 + end + @canvas.coords('I2', xy[stages[step]]) + return ((step == 7)? 3: 1) + end + + # Weight and pulleys + def draw3 + color = @C['3a'] + color2 = @C['3b'] + + xy = [ [602, 296], [577, 174], [518, 174] ] + xy.each{|x, y| # 3 Pulleys + TkcOval.new(@canvas, box(x, y, 13), + :fill=>color, :outline=>@C['fg'], :width=>3) + TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg']) + } + + # Wall to flame + TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s', + :width=>3, :fill=>@C['fg'], :smooth=>true) + + # Flame to pulley 1 + TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0', + :width=>3, :fill=>@C['fg'], :smooth=>true) + TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1', + :width=>3, :fill=>@C['fg'], :smooth=>true) + + # Pulley 1 half way to 2 + TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2', + :width=>3, :fill=>@C['fg']) + + # Pulley 1 other half to 2 + TkcLine.new(@canvas, [589, 235, 589, 174], :width=>3, :fill=>@C['fg']) + + # Across the top + TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg']) + + # Down to weight + TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w', + :width=>3, :fill=>@C['fg']) + + # Draw the weight as 2 circles, two rectangles and 1 rounded rectangle + x1, y1, x2, y2 = [515, 207, 495, 207] + TkcOval.new(@canvas, box(x1, y1, 6), + :tag=>'I3_', :fill=>color2, :outline=>color2) + TkcOval.new(@canvas, box(x2, y2, 6), + :tag=>'I3_', :fill=>color2, :outline=>color2) + TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6, + :tag=>'I3_', :fill=>color2, :outline=>color2) + + TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15), + :smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2) + + TkcLine.new(@canvas, [500, 217, 511, 217], + :tag=>'I3_', :fill=>color2, :width=>10) + + # Bottom weight target + TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465], + :tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10) + end + + def move3(step = nil) + step = get_step(3, step) + + pos = [ [505, 247], [505, 297], [505, 386.5], [505, 386.5] ] + rope = [] + rope[0] = [750, 309, 729, 301, 711, 324, 690, 300] + rope[1] = [750, 309, 737, 292, 736, 335, 717, 315, 712, 320] + rope[2] = [750, 309, 737, 309, 740, 343, 736, 351, 725, 340] + rope[3] = [750, 309, 738, 321, 746, 345, 742, 356] + + return 0 if step >= pos.length + + @canvas.delete("I3_#{step}") # Delete part of the rope + move_abs('I3_', pos[step]) # Move weight down + @canvas.coords('I3_s', rope[step]) # Flapping rope end + @canvas.coords('I3_w', [505, 174].concat(pos[step])) + if step == 2 + @canvas.move('I3__', 0, 30) + return 2 + end + return 1 + end + + # Cage and door + def draw4 + color = @C['4'] + x0, y0, x1, y1 = [527, 356, 611, 464] + + # Horizontal bars + y0.step(y1, 12){|y| + TkcLine.new(@canvas, [x0, y, x1, y], :fill=>color, :width=>1) + } + + # Vertical bars + x0.step(x1, 12){|x| + TkcLine.new(@canvas, [x, y0, x, y1], :fill=>color, :width=>1) + } + + # Swing gate + TkcLine.new(@canvas, [518, 464, 518, 428], + :tag=>'I4', :fill=>color, :width=>1) + end + + def move4(step = nil) + step = get_step(4, step) + + angles = [-10, -20, -30, -30] + return 0 if step >= angles.length + + rotate_item('I4', 518, 464, angles[step]) + @canvas.raise('I4') + + return((step == 3)? 3: 1) + end + + # Mouse + def draw5 + color = @C['5a'] + color2 = @C['5b'] + + xy = [377, 248, 410, 248, 410, 465, 518, 465] # Mouse course + xy.concat [518, 428, 451, 428, 451, 212, 377, 212] + + TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3) + + xy = [ + 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446, + 575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452 + ] + TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color) + + TkcLine.new(@canvas, [573, 452, 592, 458, 601, 460, 613, 456], # Tail + :tag=>['I5', 'I5_1'], :fill=>color, :smooth=>true, :width=>3) + + xy = box(540, 446, 2) # Eye + xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445] + TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'], + :outline=>'', :smooth=>true) + + xy = [538, 454, 535, 461] # Front leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_3'], :fill=>color, :width=>2) + + xy = [566, 455, 569, 462] # Back leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_4'], :fill=>color, :width=>2) + + xy = [544, 455, 545, 460] # 2nd front leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_5'], :fill=>color, :width=>2) + + xy = [560, 455, 558, 460] # 2nd back leg + TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_6'], :fill=>color, :width=>2) + end + + def move5(step = nil) + step = get_step(5, step) + + pos = [ + [553, 452], [533, 452], [513, 452], [493, 452], [473, 452], + [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414], + [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294], + [422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237] + ] + + return 0 if step >= pos.length + + x, y, beta, nxt = pos[step] + move_abs('I5', [x, y]) + if beta + ox, oy = centroid('I5_0') + (0..6).each{|id| rotate_item("I5_#{id}", ox, oy, beta) } + end + return 3 if nxt == :x + return 1 + end + + # Dropping gumballs + def draw6 + color = @C['6'] + xy = [324, 130, 391, 204] # Ball holder + xy = round_rect(xy, 10) + TkcPolygon.new(@canvas, xy, :smooth=>true, + :outline=>@C['fg'], :width=>3, :fill=>color) + xy = [339, 204, 376, 253] # Below the ball holder + TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3, + :fill=>color, :tag=>'I6c') + xy = box(346, 339, 28) + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc, + :start=>80, :extent=>205) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc, + :start=>-41, :extent=>85) + + xy = box(346, 339, 15) # Center of rotor + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg'], :tag=>'I6m') + xy = [352, 312, 352, 254, 368, 254, 368, 322] # Top drop to rotor + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'') + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2) + + xy = [353, 240, 367, 300] # Poke bottom hole + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + xy = [341, 190, 375, 210] # Poke another hole + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + + xy = [ + 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403, + 352, 403, 352, 366 + ] + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', + :width=>2) # Below rotor + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2) + xy = box(275, 342, 7) # On/off rotor + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['fg']) + xy = [276, 334, 342, 325] # Fan belt top + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [276, 349, 342, 353] # Fan belt bottom + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = [337, 212, 337, 247] # What the mouse pushes + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_') + xy = [392, 212, 392, 247] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I6_') + xy = [337, 230, 392, 230] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>7, :tag=>'I6_') + + who = -1 # All the balls + colors = %w(red cyan orange green blue darkblue) + colors *= 3 + + (0..16).each{|i| + loc = -i + color = colors[i] + x, y = @XY6["#{loc}"] + TkcOval.new(@canvas, box(x, y, 5), + :fill=>color, :outline=>color, :tag=>"I6_b#{i}") + } + draw6a(12) # The wheel + end + + def draw6a(beta) + @canvas.delete('I6_0') + ox, oy = [346, 339] + (0..3).each{|i| + b = beta + i * 45 + x, y = rotate_c(28, 0, 0, 0, b) + xy = [ox + x, oy + y, ox - x, oy - y] + TkcLine.new(@canvas, xy, :tag=>'I6_0', :fill=>@C['fg'], :width=>2) + } + end + + def move6(step = nil) + step = get_step(6, step) + + return 0 if step > 62 + + if step < 2 # Open gate for balls to drop + @canvas.move('I6_', -7, 0) + if step == 1 # Poke a hole + xy = [348, 226, 365, 240] + TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill), + :outline=>'') + end + return 1 + end + + s = step - 1 # Do the gumball drop dance + (0..(((s - 1)/3).to_i)).each{|i| + tag = "I6_b#{i}" + break if @canvas.find_withtag(tag).empty? + loc = s - 3*i + + if @XY6["#{loc},#{i}"] + move_abs(tag, @XY6["#{loc},#{i}"]) + elsif @XY6["#{loc}"] + move_abs(tag, @XY6["#{loc}"]) + end + } + if s % 3 == 1 + first = (s + 2)/3 + i = first + loop { + tag = "I6_b#{i}" + break if @canvas.find_withtag(tag).empty? + loc = first - i + move_abs(tag, @XY6["#{loc}"]) + i += 1 + } + end + if s >= 3 # Rotate the motor + idx = s % 3 + draw6a(12 + s * 15) + end + return((s == 3)? 3 : 1) + end + + # On/off switch + def draw7 + color = @C['7'] + xy = [198, 306, 277, 374] # Box + TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2, + :fill=>color, :tag=>'I7z') + @canvas.lower('I7z') + xy = [275, 343, 230, 349] + TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last, + :arrowshape=>[23, 23, 8], :width=>6) + xy = [225, 324] # On button + x, y = xy + TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg']) + xy = [218, 323] # On text + font = ['Times Roman', 8] + TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e, + :fill=>@C['fg'], :font=>font) + xy = [225, 350] # Off button + x, y = xy + TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg']) + xy = [218, 349] # Off text + TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e, + :fill=>@C['fg'], :font=>font) + end + + def move7(step = nil) + step = get_step(7, step) + + numsteps = 30 + return 0 if step > numsteps + beta = 30.0 / numsteps + rotate_item('I7', 275, 343, beta) + + return((step == numsteps)? 3: 1) + end + + # Electricity to the fan + def draw8 + sine([271, 248, 271, 306], 5, 8, :tag=>'I8_s', :fill=>@C['8'], :width=>3) + end + + def move8(step = nil) + step = get_step(8, step) + + return 0 if step > 3 + if step == 0 + sparkle(anchor('I8_s', :s), 'I8') + return 1 + elsif step == 1 + move_abs('I8', anchor('I8_s', :c)) + elsif step == 2 + move_abs('I8', anchor('I8_s', :n)) + else + @canvas.delete('I8') + end + return((step == 2)? 3: 1) + end + + # Fan + def draw9 + color = @C['9'] + xy = [266, 194, 310, 220] + TkcOval.new(@canvas, xy, :outline=>color, :fill=>color) + xy = [280, 209, 296, 248] + TkcOval.new(@canvas, xy, :outline=>color, :fill=>color) + xy = [ + 288, 249, 252, 249, 260, 240, 280, 234, + 296, 234, 316, 240, 324, 249, 288, 249 + ] + TkcPolygon.new(@canvas, xy, :fill=>color, :smooth=>true) + + xy = [248, 205, 265, 214, 264, 205, 265, 196] # Spinner + TkcPolygon.new(@canvas, xy, :fill=>color) + + xy = [255, 206, 265, 234] # Fan blades + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I9_0') + xy = [255, 176, 265, 204] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I9_0') + xy = [255, 206, 265, 220] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>1, :tag=>'I9_1') + xy = [255, 190, 265, 204] + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], + :width=>1, :tag=>'I9_1') + end + + def move9(step = nil) + step = get_step(9, step) + + if (step & 1).nonzero? + @canvas.itemconfigure('I9_0', :width=>4) + @canvas.itemconfigure('I9_1', :width=>1) + @canvas.lower('I9_1', 'I9_0') + else + @canvas.itemconfigure('I9_0', :width=>1) + @canvas.itemconfigure('I9_1', :width=>4) + @canvas.lower('I9_0', 'I9_1') + end + return 3 if step == 0 + return 1 + end + + # Boat + def draw10 + color = @C['10a'] + color2 = @C['10b'] + xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail + TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'], + :tag=>'I10') + xy = box(209, 204, 31) # Front + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie, + :start=>120, :extent=>120, :tag=>'I10') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>120, :extent=>120, :tag=>'I10') + xy = box(249, 204, 31) # Back + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3, + :style=>:pie, :start=>120, :extent=>120, :tag=>'I10') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>120, :extent=>120, :tag=>'I10') + + xy = [200, 171, 200, 249] # Mast + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10') + xy = [159, 234, 182, 234] # Bow sprit + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I10') + xy = [180, 234, 180, 251, 220, 251] # Hull + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6, :tag=>'I10') + + xy = [92, 255, 221, 255] # Waves + sine(xy, 2, 25, :fill=>color2, :width=>1, :tag=>'I10w') + + xy = @canvas.coords('I10w')[4..-5] # Water + xy.concat([222, 266, 222, 277, 99, 277]) + TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>color2) + xy = [222, 266, 222, 277, 97, 277, 97, 266] # Water bottom + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = box(239, 262, 17) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>95, :extent=>103) + xy = box(76, 266, 21) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :extent=>190) + end + + def move10(step = nil) + step = get_step(10, step) + + pos = [ + [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212], + [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212], + [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212], + [116, 212], [111, 212] + ] + + return 0 if step >= pos.length + + where = pos[step] + move_abs('I10', where) + + return 3 if where[2] == :x + return 1 + end + + # 2nd ball drop + def draw11 + color = @C['11a'] + color2 = @C['11b'] + xy = [23, 264, 55, 591] # Color the down tube + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'') + xy = box(71, 460, 48) # Color the outer loop + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') + + xy = [55, 264, 55, 458] # Top right side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [55, 504, 55, 591] # Bottom right side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = box(71, 460, 48) # Outer loop + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>110, :extent=>-290, :tag=>'I11i') + xy = box(71, 460, 16) # Inner loop + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'', + :width=>3, :tag=>'I11i') + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3) + + xy = [23, 264, 23, 591] # Left side + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = box(1, 266, 23) # Top left curve + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, + :style=>:arc, :extent=>90) + + xy = box(75, 235, 9) # The ball + TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'', + :width=>3, :tag=>'I11') + end + + def move11(step = nil) + step = get_step(11, step) + + pos = [ + [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266], + [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472], + [100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591] + ] + + return 0 if step >= pos.length + where = pos[step] + move_abs('I11', where) + return 3 if where[2] == :x + return 1 + end + + # Hand + def draw12 + xy = [ + 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590, + 60, 590, 60, 610, 60, 610 + ] + xy.concat([60, 610, 65, 620, 60, 631]) # Thumb + xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669, + 56, 669, 50, 669, 50, 662, 50, 637]) + + y0 = 637 # Bumps for fingers + y1 = 645 + 50.step(21, -10){|x| + x1 = x - 5 + x2 = x - 10 + xy << x << y0 << x1 << y1 << x2 << y0 + } + TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'], + :smooth=>true, :tag=>'I12', :width=>3) + end + + def move12(step = nil) + step = get_step(12, step) + + pos = [[42.5, 641, :x]] + return 0 if step >= pos.length + where = pos[step] + move_abs('I12', where) + return 3 if where[2] == :x + return 1 + end + + # Fax + def draw13 + color = @C['13a'] + xy = [86, 663, 149, 663, 149, 704, 50, 704, 50, 681, 64, 681, 86, 671] + xy2 = [ + 784, 663, 721, 663, 721, 704, 820, 704, 820, 681, 806, 681, 784, 671 + ] + radii = [2, 9, 9, 8, 5, 5, 2] + + round_poly(@canvas, xy, radii, :width=>3, + :outline=>@C['fg'], :fill=>color) + round_poly(@canvas, xy2, radii, :width=>3, + :outline=>@C['fg'], :fill=>color) + + xy = [56, 677] + x, y = xy + TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I13') + xy = [809, 677] + x, y = xy + TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'], + :width=>3, :tag=>'I13R') + + xy = [112, 687] # Label + TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'], + :font=>['Times Roman', 12, :bold]) + xy = [762, 687] + TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'], + :font=>['Times Roman', 12, :bold]) + + xy = [138, 663, 148, 636, 178, 636] # Paper guide + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3) + xy = [732, 663, 722, 636, 692, 636] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3) + + sine([149, 688, 720, 688], 5, 15, + :tag=>'I13_s', :fill=>@C['fg'], :width=>3) + end + + def move13(step = nil) + step = get_step(13, step) + + numsteps = 7 + + if step == numsteps + 2 + move_abs('I13_star', [-100, -100]) + @canvas.itemconfigure('I13R', :fill=>@C['13b'], :width=>2) + return 2 + end + if step == 0 # Button down + @canvas.delete('I13') + sparkle([-100, -100], 'I13_star') # Create off screen + return 1 + end + x0, y0 = anchor('I13_s', :w) + x1, y1 = anchor('I13_s', :e) + x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f + move_abs('I13_star', [x, y0]) + return 1 + end + + # Paper in fax + def draw14 + color = @C['14'] + xy = [102, 661, 113, 632, 130, 618] # Left paper edge + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14L_0') + xy = [148, 629, 125, 640, 124, 662] # Right paper edge + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14L_1') + draw14a('L') + + xy = [ + 768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171 + ] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14R_0') + @canvas.lower('I14R_0') + # NB. these numbers are VERY sensitive, you must start with final size + # and shrink down to get the values + xy = [ + 745.947897349, 662.428358855, 745.997829056, 662.452239237, 746.0, 662.5 + ] + TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color, + :width=>3, :tag=>'I14R_1') + @canvas.lower('I14R_1') + end + + def draw14a(side) + color = @C['14'] + xy = @canvas.coords("I14#{side}_0") + xy2 = @canvas.coords("I14#{side}_1") + x0, y0, x1, y1, x2, y2 = xy + x3, y3, x4, y4, x5, y5 = xy2 + + zz = [ + x0, y0, x0, y0, xy, x2, y2, x2, y2, + x3, y3, x3, y3, xy2, x5, y5, x5, y5 + ].flatten + @canvas.delete("I14#{side}") + TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true, + :fill=>color, :outline=>color, :width=>3) + @canvas.lower("I14#{side}") + end + + def move14(step = nil) + step = get_step(14, step) + + # Paper going down + sc = 0.9 - 0.05*step + if sc < 0.3 + @canvas.delete('I14L') + return 0 + end + + ox, oy = @canvas.coords('I14L_0') + @canvas.scale('I14L_0', ox, oy, sc, sc) + ox, oy = @canvas.coords('I14L_1')[-2..-1] + @canvas.scale('I14L_1', ox, oy, sc, sc) + draw14a('L') + + # Paper going up + sc = 0.35 + 0.05*step + sc = 1/sc + + ox, oy = @canvas.coords('I14R_0') + @canvas.scale('I14R_0', ox, oy, sc, sc) + ox, oy = @canvas.coords('I14R_1')[-2..-1] + @canvas.scale('I14R_1', ox, oy, sc, sc) + draw14a('R') + + return((step == 10)? 3: 1) + end + + # Light beam + def draw15 + color = @C['15a'] + xy = [824, 599, 824, 585, 820, 585, 829, 585] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I15a') + xy = [789, 599, 836, 643] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [778, 610, 788, 632] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [766, 617, 776, 625] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + + xy = [633, 600, 681, 640] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>3) + xy = [635, 567, 657, 599] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2) + xy = [765, 557, 784, 583] + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2) + + sine([658, 580, 765, 580], 3, 15, + :tag=>'I15_s', :fill=>@C['fg'], :width=>3) + end + + def move15a + color = @C['15b'] + @canvas.scale('I15a', 824, 599, 1, 0.3) # Button down + xy = [765, 621, 681, 621] + TkcLine.new(@canvas, xy, :dash=>'-', :width=>3, :fill=>color, :tag=>'I15') + end + + def move15(step = nil) + step = get_step(15, step) + + numsteps = 6 + + if step == numsteps + 2 + move_abs('I15_star', [-100, -100]) + return 2 + end + if step == 0 # Break the light beam + sparkle([-100, -100], 'I15_star') + xy = [765, 621, 745, 621] + @canvas.coords('I15', xy) + return 1 + end + x0, y0 = anchor('I15_s', :w) + x1, y1 = anchor('I15_s', :e) + x = x0 + (x1 - x0) * (step - 1) / numsteps.to_f + move_abs('I15_star', [x, y0]) + return 1 + end + + # Bell + def draw16 + color = @C['16'] + xy = [722, 485, 791, 556] + TkcRectangle.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>3) + xy = box(752, 515, 25) # Bell + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black', + :tag=>'I16b', :width=>2) + xy = box(752, 515, 5) # Bell button + TkcOval.new(@canvas, xy, :fill=>'black', :outline=>'black', :tag=>'I16b') + + xy = [784, 523, 764, 549] # Clapper + TkcLine.new(@canvas, xy, :width=>3, :tag=>'I16c', :fill=>@C['fg']) + xy = box(784, 523, 4) + TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>@C['fg'], :tag=>'I16d') + end + + def move16(step = nil) + step = get_step(16, step) + + # Note: we never stop + ox, oy = [760, 553] + if (step & 1).nonzero? + beta = 12 + @canvas.move('I16b', 3, 0) + else + beta = -12 + @canvas.move('I16b', -3, 0) + end + rotate_item('I16c', ox, oy, beta) + rotate_item('I16d', ox, oy, beta) + + return ((step == 1)? 3: 1) + end + + # Cat + def draw17 + color = @C['17'] + + xy = [584, 556, 722, 556] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + xy = [584, 485, 722, 485] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3) + + xy = [664, 523, 717, 549] # Body + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3, + :style=>:chord, :start=>128, :extent=>260, :tag=>'I17') + + xy = [709, 554, 690, 543] # Paw + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, + :width=>3, :tag=>'I17') + xy = [657, 544, 676, 555] + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, + :width=>3, :tag=>'I17') + + xy = box(660, 535, 15) # Lower face + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc, + :start=>150, :extent=>240, :tag=>'I17_') + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:chord, :start=>150, :extent=>240, :tag=>'I17_') + xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1, + :tag=>['I17_', 'I17_c']) + xy = [652, 542, 628, 539] # Whiskers + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [652, 543, 632, 545] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [652, 546, 632, 552] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + + xy = [668, 543, 687, 538] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + xy = [668, 544, 688, 546] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + xy = [668, 547, 688, 553] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :tag=>['I17_', 'I17_w']) + + xy = [649, 530, 654, 538, 659, 530] # Left eye + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + xy = [671, 530, 666, 538, 661, 530] # Right eye + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + xy = [655, 543, 660, 551, 665, 543] # Mouth + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, + :smooth=>true, :tag=>'I17') + end + + def move17(step = nil) + step = get_step(17, step) + + if step == 0 + @canvas.delete('I17') # Delete most of the cat + xy = [655, 543, 660, 535, 665, 543] # Mouth + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :smooth=>true, :tag=>'I17_') + xy = box(654, 530, 4) # Left eye + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'', + :tag=>'I17_') + xy = box(666, 530, 4) # Right eye + TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'', + :tag=>'I17_') + + @canvas.move('I17_', 0, -20) # Move face up + xy = [652, 528, 652, 554] # Front leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [670, 528, 670, 554] # 2nd front leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + + xy = [ # Body + 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525, + 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527, + 668, 527, 668, 527, 675, 522, 676, 517, 677, 512 + ] + TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill), + :outline=>@C['fg'], :width=>3, :smooth=>true, + :tag=>'I17_') + xy = [716, 514, 716, 554] # Back leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [694, 532, 694, 554] # 2nd back leg + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_') + xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, + :smooth=>true, :tag=>'I17_') + + @canvas.raise('I17w') # Make whiskers visible + @canvas.move('I17_', -5, 0) # Move away from the wall a bit + return 2 + end + return 0 + end + + # Sling shot + def draw18 + color = @C['18'] + xy = [721, 506, 627, 506] # Sling hold + TkcLine.new(@canvas, xy, :width=>4, :fill=>@C['fg'], :tag=>'I18') + + xy = [607, 500, 628, 513] # Sling rock + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :tag=>'I18a') + + xy = [526, 513, 606, 507, 494, 502] # Sling band + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>4, :tag=>'I18b') + xy = [485, 490, 510, 540, 510, 575, 510, 540, 535, 491] # Sling + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>6) + end + + def move18(step = nil) + step = get_step(18, step) + + pos = [ + [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x], + [136, 506], [16, 506], [-100, -100] + ] + + b = [] + b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing + b[1] = [ + 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525, + 553, 536, 538, 534, 532, 519, 529, 499 + ] + b[2] = [ + 491, 503, 508, 563, 542, 533, 551, 526, 561, 539, 549, 550, 530, 500 + ] + b[3] = [ + 491, 503, 508, 563, 530, 554, 541, 562, 525, 568, 519, 544, 530, 501 + ] + + return 0 if step >= pos.length + + if step == 0 + @canvas.delete('I18') + @canvas.itemconfigure('I18b', :smooth=>true) + end + if b[step] + @canvas.coords('I18b', b[step]) + end + + where = pos[step] + move_abs('I18a', where) + return 3 if where[2] == :x + return 1 + end + + # Water pipe + def draw19 + color = @C['19'] + xx = [[249, 181], [155, 118], [86, 55], [22, 0]] + xx.each{|x1, x2| + TkcRectangle.new(@canvas, x1, 453, x2, 467, + :fill=>color, :outline=>'', :tag=>'I19') + TkcLine.new(@canvas, x1, 453, x2, 453, + :fill=>@C['fg'], :width=>1) # Pipe top + TkcLine.new(@canvas, x1, 467, x2, 467, + :fill=>@C['fg'], :width=>1) # Pipe bottom + } + @canvas.raise('I11i') + + xy = box(168, 460, 16) # Bulge by the joint + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc, + :start=>21, :extent=>136) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc, + :start=>-21, :extent=>-130) + + xy = [249, 447, 255, 473] # First joint 26x6 + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + + xy = box(257, 433, 34) # Bend up + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>0, :extent=>-91) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>-90) + xy = box(257, 433, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>0, :extent=>-92) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>-90) + xy = box(257, 421, 34) # Bend left + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>0, :extent=>91) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>90) + xy = box(257, 421, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>0, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>0, :extent=>90) + xy = box(243, 421, 34) # Bend down + TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1, + :style=>:pie, :start=>90, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>90, :extent=>90) + xy = box(243, 421, 20) + TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1, + :style=>:pie, :start=>90, :extent=>90) + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, + :style=>:arc, :start=>90, :extent=>90) + + xy = [270, 427, 296, 433] # 2nd joint bottom + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [270, 421, 296, 427] # 2nd joint top + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [249, 382, 255, 408] # Third joint right + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [243, 382, 249, 408] # Third joint left + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + xy = [203, 420, 229, 426] # Last joint + TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1) + + xy = box(168, 460, 6) # Handle joint + TkcOval.new(@canvas, xy, :fill=>@C['fg'], :outline=>'', :tag=>'I19a') + xy = [168, 460, 168, 512] # Handle bar + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>5, :tag=>'I19b') + end + + def move19(step = nil) + step = get_step(19, step) + + angles = [30, 30, 30] + return 2 if step == angles.length + ox, oy = centroid('I19a') + rotate_item('I19b', ox, oy, angles[step]) + + return 1 + end + + # Water pouring + def draw20 + # do nothing + end + + def move20(step = nil) + step = get_step(20, step) + + pos = [451, 462, 473, 484, 496, 504, 513, 523, 532] + freq = [20, 40, 40, 40, 40, 40, 40, 40, 40] + pos = [ + [451, 20], [462, 40], [473, 40], [484, 40], [496, 40], + [504, 40], [513, 40], [523, 40], [532, 40, :x] + ] + return 0 if step >= pos.length + + @canvas.delete('I20') + where = pos[step] + y, f = where + h20(y, f) + return 3 if where[2] == :x + return 1 + end + + def h20(y, f) + color = @C['20'] + @canvas.delete('I20') + + sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'], + :width=>3, :fill=>color, :smooth=>true) + TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3, + :fill=>color, :smooth=>1, :tag=>['I20', 'I20a']) + TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3, + :fill=>color, :smooth=>1, :tag=>['I20', 'I20b']) + @canvas.move('I20a', 8, 0) + @canvas.move('I20b', 16, 0) + end + + # Bucket + def draw21 + color = @C['21'] + xy = [217, 451, 244, 490] # Right handle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a') + xy = [201, 467, 182, 490] # Left handle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21_a') + + xy = [245, 490, 237, 535] # Right side + xy2 = [189, 535, 181, 490] # Left side + TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'', + :tag=>['I21', 'I21f']) + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21') + TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21') + + xy = [182, 486, 244, 498] # Top + TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2, + :tag=>['I21', 'I21f']) + TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2, + :tag=>['I21', 'I21t']) + xy = [189, 532, 237, 540] # Bottom + TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2, + :tag=>['I21', 'I21b']) + end + + def move21(step = nil) + step = get_step(21, step) + + numsteps = 30 + return 0 if step >= numsteps + + x1, y1, x2, y2 = @canvas.coords('I21b') + # lx1, ly1, lx2, ly2 = @canvas.coords('I21t') + lx1, ly1, lx2, ly2 = [183, 492, 243, 504] + + f = step / numsteps.to_f + y2 = y2 - 3 + xx1 = x1 + (lx1 - x1) * f + yy1 = y1 + (ly1 - y1) * f + xx2 = x2 + (lx2 - x2) * f + yy2 = y2 + (ly2 - y2) * f + + @canvas.itemconfigure('I21b', :fill=>@C['20']) + @canvas.delete('I21w') + TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1, + :tag=>['I21', 'I21w'], :outline=>'', :fill=>@C['20']) + @canvas.lower('I21w', 'I21') + @canvas.raise('I21b') + @canvas.lower('I21f') + + return((step == numsteps - 1)? 3: 1) + end + + # Bucket drop + def draw22 + # do nothing + end + + def move22(step = nil) + step = get_step(22, step) + pos = [[213, 513], [213, 523], [213, 543, :x], [213, 583], [213, 593]] + + @canvas.itemconfigure('I21f', :fill=>@C['22']) if step == 0 + return 0 if step >= pos.length + where = pos[step] + move_abs('I21', where) + h20(where[1], 40) + @canvas.delete('I21_a') # Delete handles + + return 3 if where[2] == :x + return 1 + end + + # Blow dart + def draw23 + color = @C['23a'] + color2 = @C['23b'] + color3 = @C['23c'] + + xy = [185, 623, 253, 650] # Block + TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'], + :width=>2, :tag=>'I23a') + xy = [187, 592, 241, 623] # Balloon + TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b') + TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b', + :style=>:arc, :start=>12, :extent=>336) + xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle + TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b') + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b') + + xy = [285, 611, 250, 603] # Dart body + TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], + :width=>3, :tag=>'I23d') + xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail + TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'], + :width=>3, :tag=>'I23d') + xy = [249, 607, 268, 607] # Dart detail + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d') + xy = [285, 607, 305, 607] # Dart needle + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d') + end + + def move23(step = nil) + step = get_step(23, step) + + pos = [ + [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607], + [487, 607], [587, 607], [687, 607], [787, 607], [-100, -100] + ] + + return 0 if step >= pos.length + if step <= 1 + ox, oy = anchor('I23a', :n) + @canvas.scale('I23b', ox, oy, 0.9, 0.5) + end + where = pos[step] + move_abs('I23d', where) + + return 3 if where[2] == :x + return 1 + end + + # Balloon + def draw24 + color = @C['24a'] + xy = [366, 518, 462, 665] # Balloon + TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], + :width=>3, :tag=>'I24') + xy = [414, 666, 414, 729] # String + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I24') + xy = [410, 666, 404, 673, 422, 673, 418, 666] # Nozzle + TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], + :width=>3, :tag=>'I24') + + xy = [387, 567, 390, 549, 404, 542] # Reflections + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [395, 568, 399, 554, 413, 547] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [403, 570, 396, 555, 381, 553] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + xy = [408, 564, 402, 547, 386, 545] + TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true, + :width=>2, :tag=>'I24') + end + + def move24(step = nil) + step = get_step(24, step) + + return 0 if step > 4 + return 2 if step == 4 + + if step == 0 + @canvas.delete('I24') # Exploding balloon + xy = [ + 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594, + 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738, + 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613, + 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508, + 431, 441, 431, 440, 400, 502, 347, 465, 347, 465 + ] + TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'], + :outline=>@C['24a'], :width=>10, :smooth=>true) + msg = Tk.subst(@S['message'].value) + TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'], + :justify=>:center, :font=>['Times Roman', 18, :bold]) + return 1 + end + + @canvas.itemconfigure('I24t', :font=>['Times Roman', 18 + 6*step, :bold]) + @canvas.move('I24', 0, -60) + ox, oy = centroid('I24') + @canvas.scale('I24', ox, oy, 1.25, 1.25) + return 1 + end + + # Displaying the message + def move25(step = nil) + step = get_step(25, step) + + if step == 0 + @XY['25'] = Tk::Clock.clicks(:miliseconds) + return 1 + end + elapsed = Tk::Clock.clicks(:miliseconds) - @XY['25'] + return 1 if elapsed < 5000 + return 2 + end + + # Collapsing balloon + def move26(step = nil) + step = get_step(26, step) + + if step >= 3 + @canvas.delete('I24', 'I26') + TkcText.new(@canvas, 430, 735, :anchor=>:s, :tag=>'I26', + #:text=>'click to continue', + :text=>'¥¯¥ê¥Ã¥¯¤Ç¥ê¥»¥Ã¥È¤·¤Þ¤¹', + :font=>['Times Roman', 20, :bold]) + @canvas.bind('1', proc{reset}) + return 4 + end + + ox, oy = centroid('I24') + @canvas.scale('I24', ox, oy, 0.8, 0.8) + @canvas.move('I24', 0, 60) + @canvas.itemconfigure('I24t', :font=>['Times Roman', 30 - 6*step, :bold]) + return 1 + end + + ################################################################ + # + # Helper functions + # + def box(x, y, r) + [x - r, y - r, x + r, y + r] + end + + def move_abs(item, xy) + x, y = xy + ox, oy = centroid(item) + dx = x - ox + dy = y - oy + @canvas.move(item, dx, dy) + end + + def rotate_item(item, ox, oy, beta) + xy = @canvas.coords(item) + xy2 = [] + 0.step(xy.length - 1, 2){|idx| + x, y = xy[idx, 2] + xy2.concat(rotate_c(x, y, ox, oy, beta)) + } + @canvas.coords(item, xy2) + end + + def rotate_c(x, y, ox, oy, beta) + # rotates vector (ox,oy)->(x,y) by beta degrees clockwise + + x -= ox # Shift to origin + y -= oy + + beta = beta * Math.atan(1) * 4 / 180.0 # Radians + xx = x * Math.cos(beta) - y * Math.sin(beta) # Rotate + yy = x * Math.sin(beta) + y * Math.cos(beta) + + xx += ox # Shift back + yy += oy + + [xx, yy] + end + + def reset + draw_all + @canvas.bind_remove('1') + @S['mode'].value = :MSTART + @S['active'] = [0] + end + + # Each Move## keeps its state info in STEP, this retrieves and increments it + def get_step(who, step) + if step + @STEP[who] = step + else + if !@STEP.exist?(who) || @STEP[who] == "" + @STEP[who] = 0 + else + @STEP[who] += 1 + end + end + @STEP[who] + end + + def reset_step + @S['cnt'].value = 0 + @STEP.keys.each{|k| @STEP[k] = ''} + end + + def sine(xy0, amp, freq, opts = {}) + x0, y0, x1, y1 = xy0 + step = 2 + xy = [] + if y0 == y1 # Horizontal + x0.step(x1, step){|x| + beta = (x - x0) * 2 * Math::PI / freq + y = y0 + amp * Math.sin(beta) + xy << x << y + } + else + y0.step(y1, step){|y| + beta = (y - y0) * 2 * Math::PI / freq + x = x0 + amp * Math.sin(beta) + xy << x << y + } + end + TkcLine.new(@canvas, xy, opts) + end + + def round_rect(xy, radius, opts={}) + x0, y0, x3, y3 = xy + r = @canvas.winfo_pixels(radius) + d = 2 * r + + # Make sure that the radius of the curve is less than 3/8 size of the box! + maxr = 0.75 + if d > maxr * (x3 - x0) + d = maxr * (x3 - x0) + end + if d > maxr * (y3 - y0) + d = maxr * (y3 - y0) + end + + x1 = x0 + d + x2 = x3 - d + y1 = y0 + d + y2 = y3 - d + + xy = [x0, y0, x1, y0, x2, y0, x3, y0, x3, y1, x3, y2] + xy.concat([x3, y3, x2, y3, x1, y3, x0, y3, x0, y2, x0, y1]) + return xy + end + + def round_poly(canv, xy, radii, opts) + lenXY = xy.length + lenR = radii.length + if lenXY != 2*lenR + raise "wrong number of vertices and radii" + end + + knots = [] + x0 = xy[-2]; y0 = xy[-1] + x1 = xy[0]; y1 = xy[1] + xy << xy[0] << xy[1] + + 0.step(lenXY - 1, 2){|i| + radius = radii[i/2] + r = canv.winfo_pixels(radius) + + x2 = xy[i+2]; y2 = xy[i+3] + z = _round_poly2(x0, y0, x1, y1, x2, y2, r) + knots.concat(z) + + x0 = x1; y0 = y1 + x1 = x2; y1 = y2 + } + TkcPolygon.new(canv, knots, {:smooth=>true}.update(opts)) + end + + def _round_poly2(x0, y0, x1, y1, x2, y2, radius) + d = 2 * radius + maxr = 0.75 + + v1x = x0 - x1 + v1y = y0 - y1 + v2x = x2 - x1 + v2y = y2 - y1 + + vlen1 = Math.sqrt(v1x*v1x + v1y*v1y) + vlen2 = Math.sqrt(v2x*v2x + v2y*v2y) + + if d > maxr * vlen1 + d = maxr * vlen1 + end + if d > maxr * vlen2 + d = maxr * vlen2 + end + + xy = [] + xy << (x1 + d * v1x / vlen1) << (y1 + d * v1y / vlen1) + xy << x1 << y1 + xy << (x1 + d * v2x / vlen2) << (y1 + d * v2y / vlen2) + + return xy + end + + def sparkle(oxy, tag) + xy = [ + [299, 283], [298, 302], [295, 314], [271, 331], + [239, 310], [242, 292], [256, 274], [281, 273] + ] + xy.each{|x, y| + TkcLine.new(@canvas, 271, 304, x, y, + :fill=>'white', :width=>3, :tag=>tag) + } + move_abs(tag, oxy) + end + + def centroid(item) + anchor(item, :c) + end + + def anchor(item, where) + x1, y1, x2, y2 = @canvas.bbox(item) + case(where) + when :n + y = y1 + when :s + y = y2 + else + y = (y1 + y2) / 2.0 + end + case(where) + when :w + x = x1 + when :e + x = x2 + else + x = (x1 + x2) / 2.0 + end + return [x, y] + end +end + +TkGoldberg_Demo.new(base_frame) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hello b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hello new file mode 100644 index 0000000..08f154d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hello @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +# -*- coding: euc-jp -*- +require 'tk' + +TkButton.new(nil, + 'text'=>"¤³¤ó¤Ë¤Á¤Ï¡¢À¤³¦", + 'command'=>proc{print "¤³¤ó¤Ë¤Á¤Ï¡¢À¤³¦\n"; exit} +).pack + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hscale.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hscale.rb new file mode 100644 index 0000000..5615aa5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/hscale.rb @@ -0,0 +1,78 @@ +# -*- coding: euc-jp -*- +require "tkcanvas" + +if defined?($hscale_demo) && $hscale_deom + $hscale_demo.destroy + $hscale_demo = nil +end + +$hscale_demo = TkToplevel.new {|w| + title("Horizontal Scale Demonstration") + iconname("hscale") +} +positionWindow($hscale_demo) + +base_frame = TkFrame.new($hscale_demo).pack(:fill=>:both, :expand=>true) + +msg = TkLabel.new(base_frame) { + font $font + wraplength '3.5i' + justify 'left' + text "²¼¤Ë¤ÏÌð°õ¤¬1¤Ä¤È¿åÊ¿¤Ê¥¹¥±¡¼¥ë¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\ +¥¹¥±¡¼¥ë¾å¤Ç¥Þ¥¦¥¹¥Ü¥¿¥ó1¤ò¥¯¥ê¥Ã¥¯¡¢¤Þ¤¿¤Ï¥É¥é¥Ã¥°¤¹¤ë¤È\ +Ìð°õ¤ÎŤµ¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc { + tmppath = $hscale_demo + $hscale_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc { showCode 'hscale' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +def setWidth(w, width) + width = width + 21 + x2 = width - 30 + if x2 < 21 + x2 = 21 + end + w.coords 'poly',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15 + w.coords 'line',20,15,20,35,x2,35,x2,45,width,25,x2,5,x2,15,20,15 +end + +TkFrame.new(base_frame) {|frame| + canvas = TkCanvas.new(frame) {|c| + width 50 + height 50 + bd 0 + highlightthickness 0 + TkcPolygon.new(c, '0', '0', '1', '1', '2', '2') { + fill 'DeepSkyBlue' + tags 'poly' + } + TkcLine.new(c, '0', '0', '1', '1', '2', '2', '0', '0') { + fill 'black' + tags 'line' + } + }.pack('side'=>'top', 'expand'=>'yes', 'anchor'=>'s', 'fill'=>'x', 'padx'=>'15') + scale = TkScale.new(frame) { + orient 'horizontal' + length 284 + from 0 + to 250 + command proc{|value| setWidth(canvas, value)} + tickinterval 50 + }.pack('side'=>'bottom', 'expand'=>'yes', 'anchor'=>'n') + scale.set 75 +}.pack('side'=>'top', 'fill'=>'x') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/icon.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/icon.rb new file mode 100644 index 0000000..a2ca665 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/icon.rb @@ -0,0 +1,103 @@ +# -*- coding: euc-jp -*- +# +# iconic button widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($icon_demo) && $icon_demo + $icon_demo.destroy + $icon_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$icon_demo = TkToplevel.new {|w| + title("Iconic Button Demonstration") + iconname("icon") + positionWindow(w) +} + +base_frame = TkFrame.new($icon_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥é¥¸¥ª¥Ü¥¿¥ó¤È¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¾å¤Ë¥Ó¥Ã¥È¥Þ¥Ã¥×¤ä²èÁü¤òɽ¼¨¤¹¤ë 3 ¤Ä¤ÎÊýË¡¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£º¸¤Ë¤¢¤ë¤Î¤Ï2¤Ä¤Î¥é¥¸¥ª¥Ü¥¿¥ó¤Ç¡¢¤½¤ì¤¾¤ì¤¬¡¢¥Ó¥Ã¥È¥Þ¥Ã¥×¤ÈÁªÂò¤ò¼¨¤¹¥¤¥ó¥¸¥±¡¼¥¿¤Ç¤Ç¤­¤Æ¤¤¤Þ¤¹¡£Ãæ±û¤Ë¤¢¤ë¤Î¤Ï¡¢ÁªÂòºÑ¤ß¤«¤É¤¦¤«¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë²èÁü¤òɽ¼¨¤¹¤ë¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¤Ç¤¹¡£±¦Â¦¤Ë¤¢¤ë¤Î¤ÏÁªÂòºÑ¤ß¤«¤É¤¦¤«¤Ë¤è¤Ã¤ÆÇØ·Ê¿§¤¬ÊѤï¤ë¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤¹¤ë¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¤Ç¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $icon_demo + $icon_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'icon'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# image À¸À® +flagup = \ +TkBitmapImage.new('file'=>[$demo_dir,'..', + 'images','flagup.xbm'].join(File::Separator), + 'maskfile'=>\ + [$demo_dir,'..','images','flagup.xbm'].join(File::Separator)) +flagdown = \ +TkBitmapImage.new('file'=>[$demo_dir,'..', + 'images','flagdown.xbm'].join(File::Separator), + 'maskfile'=>\ + [$demo_dir,'..', + 'images','flagdown.xbm'].join(File::Separator)) + +# ÊÑ¿ôÀ¸À® +letters = TkVariable.new + +# frame À¸À® +TkFrame.new(base_frame, 'borderwidth'=>10){|w| + TkFrame.new(w) {|f| + # TkRadioButton.new(f){ + Tk::RadioButton.new(f){ + bitmap '@' + [$demo_dir,'..', + 'images','letters.xbm'].join(File::Separator) + variable letters + value 'full' + }.pack('side'=>'top', 'expand'=>'yes') + + # TkRadioButton.new(f){ + Tk::RadioButton.new(f){ + bitmap '@' + [$demo_dir,'..', + 'images','noletter.xbm'].join(File::Separator) + variable letters + value 'empty' + }.pack('side'=>'top', 'expand'=>'yes') + + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + + # TkCheckButton.new(w) { + Tk::CheckButton.new(w) { + image flagdown + selectimage flagup + indicatoron 0 + selectcolor self['background'] + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + + # TkCheckButton.new(w) { + Tk::CheckButton.new(w) { + bitmap '@' + [$demo_dir,'..', + 'images','letters.xbm'].join(File::Separator) + indicatoron 0 + selectcolor 'SeaGreen1' + }.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'5m') + +}.pack('side'=>'top') + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image1.rb new file mode 100644 index 0000000..d9435cc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image1.rb @@ -0,0 +1,64 @@ +# -*- coding: euc-jp -*- +# +# two image widgets demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($image1_demo) && $image1_demo + $image1_demo.destroy + $image1_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$image1_demo = TkToplevel.new {|w| + title('Image Demonstration #1') + iconname("Image1") + positionWindow(w) +} + +base_frame = TkFrame.new($image1_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "¤³¤Î¥Ç¥â¤Ç¤Ï2¤Ä¤Î¥é¥Ù¥ë¾å¤Ë²èÁü¤ò¤½¤ì¤¾¤ìɽ¼¨¤·¤Æ¤¤¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $image1_demo + $image1_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'image1'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# image À¸À® +image1a = \ +TkPhotoImage.new('file'=>[$demo_dir,'..', + 'images','earth.gif'].join(File::Separator)) +image1b = \ +TkPhotoImage.new('file'=>[$demo_dir,'..', + 'images','earthris.gif'].join(File::Separator)) + +# label À¸À® +#[ TkLabel.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'), +# TkLabel.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken') +#].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')} +[ Tk::Label.new(base_frame, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'), + Tk::Label.new(base_frame, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken') +].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image2.rb new file mode 100644 index 0000000..1bb2c9e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image2.rb @@ -0,0 +1,106 @@ +# -*- coding: euc-jp -*- +# +# widget demo 'load image' (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($image2_demo) && $image2_demo + $image2_demo.destroy + $image2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$image2_demo = TkToplevel.new {|w| + title('Image Demonstration #2') + iconname("Image2") + positionWindow(w) +} + +base_frame = TkFrame.new($image2_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "¤³¤Î¥Ç¥â¤Ç¤ÏTk¤Î photo image ¤ò»ÈÍѤ·¤Æ²èÁü¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ºÇ½é¤Ë¥¨¥ó¥È¥êÆâ¤Ë¤Ë¥Ç¥£¥ì¥¯¥È¥ê̾¤òÆþ¤ì¤Æ²¼¤µ¤¤¡£¼¡¤Ë²¼¤Î¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤Ë¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò¥í¡¼¥É¤¹¤ë¤¿¤á¡¢¥ê¥¿¡¼¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤Î¸å¡¢²èÁü¤òÁªÂò¤¹¤ë¤¿¤á¤Ë¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÃæ¤Î¥Õ¥¡¥¤¥ë̾¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $image2_demo + $image2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'image2'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# ÊÑ¿ôÀ¸À® +$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator)) + +# image À¸À® +$image2a = TkPhotoImage.new + +# ¥Õ¥¡¥¤¥ë̾ÆþÎÏÉô +TkLabel.new(base_frame, 'text'=>'¥Ç¥£¥ì¥¯¥È¥ê:')\ +.pack('side'=>'top', 'anchor'=>'w') + +image2_e = TkEntry.new(base_frame) { + width 30 + textvariable $dirName +}.pack('side'=>'top', 'anchor'=>'w') + +TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20)\ +.pack('side'=>'top', 'anchor'=>'w') + +TkLabel.new(base_frame, 'text'=>'¥Õ¥¡¥¤¥ë:')\ +.pack('side'=>'top', 'anchor'=>'w') + +TkFrame.new(base_frame){|w| + s = TkScrollbar.new(w) + l = TkListbox.new(w) { + width 20 + height 10 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| l.yview(*args)}) + l.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y') + s.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y') + #l.insert(0,'earth.gif', 'earthris.gif', 'mickey.gif', 'teapot.ppm') + l.insert(0,'earth.gif', 'earthris.gif', 'teapot.ppm') + l.bind('Double-1', proc{|x,y| loadImage $image2a,l,x,y}, '%x %y') + + image2_e.bind 'Return', proc{loadDir l} + +}.pack('side'=>'top', 'anchor'=>'w') + +# image ÇÛÃÖ +[ TkFrame.new(base_frame, 'height'=>'3m', 'width'=>20), + TkLabel.new(base_frame, 'text'=>'²èÁü:'), + # TkLabel.new(base_frame, 'image'=>$image2a) + Tk::Label.new(base_frame, 'image'=>$image2a) +].each{|w| w.pack('side'=>'top', 'anchor'=>'w')} + +# ¥á¥½¥Ã¥ÉÄêµÁ +def loadDir(w) + w.delete(0,'end') + Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f| + w.insert('end',File.basename(f)) + } +end + +def loadImage(img,w,x,y) + img.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator)) +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image3.rb new file mode 100644 index 0000000..12b8aaf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/image3.rb @@ -0,0 +1,127 @@ +# -*- coding: euc-jp -*- +# image3.rb +# +# This demonstration script creates a simple collection of widgets +# that allow you to select and view images in a Tk label. +# +# widget demo 'load image' (called by 'widget') +# + +# toplevel widget +if defined?($image3_demo) && $image3_demo + $image3_demo.destroy + $image3_demo = nil +end + +# demo toplevel widget +$image3_demo = TkToplevel.new {|w| + title('Image Demonstration #3') + iconname("Image3") + positionWindow(w) +} + +base_frame = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true) + +# +def loadDir3(w) + w.delete(0,'end') + Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f| + w.insert('end',File.basename(f)) + } +end + +# selectAndLoadDir3 -- +# This procedure pops up a dialog to ask for a directory to load into +# the listobx and (if the user presses OK) reloads the directory +# listbox from the directory named in the demo's entry. +# +# Arguments: +# w - Name of the toplevel window of the demo. +def selectAndLoadDir3(w, lbox) + dir = Tk.chooseDirectory(:initialdir=>$dirName.value, + :parent=>w, :mustexist=>true) + if dir.length > 0 + $dirName.value = dir + loadDir3(lbox) + end +end + +def loadImage3(w,x,y) + $image3a.file([$dirName, w.get("@#{x},#{y}")].join(File::Separator)) +end + + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "¤³¤Î¥Ç¥â¤Ç¤ÏTk¤Î photo image ¤ò»ÈÍѤ·¤Æ²èÁü¤ò ¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ºÇ½é¤Ë¥¨¥ó¥È¥êÆâ¤Ë¤Ë¥Ç¥£¥ì¥¯¥È¥ê̾¤òÆþ¤ì¤Æ²¼¤µ¤¤¡£¼¡¤Ë²¼¤Î¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤Ë¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò¥í¡¼¥É¤¹¤ë¤¿¤á¡¢¥ê¥¿¡¼¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£¤½¤Î¸å¡¢²èÁü¤òÁªÂò¤¹¤ë¤¿¤á¤Ë¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÃæ¤Î¥Õ¥¡¥¤¥ë̾¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $image3_demo + $image3_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'image3'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# variable +$dirName = TkVariable.new([$demo_dir,'..','images'].join(File::Separator)) + +# image +begin + $image3a.delete +rescue +end +$image3a = TkPhotoImage.new + +# +image3_f = TkFrame.new(base_frame).pack(:fill=>:both, :expand=>true) + +image3_df = TkLabelFrame.new(base_frame, :text=>'¥Ç¥£¥ì¥¯¥È¥ê:') + +image3_ff = TkLabelFrame.new(base_frame, :text=>'¥Õ¥¡¥¤¥ë:', + :padx=>'2m', :pady=>'2m') +image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) { + pack(:side=>:left, :fill=>:y, :expand=>true) + yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y, + :expand=>true)) + insert(0, *(%w(earth.gif earthris.gif teapot.ppm))) + bind('Double-1', proc{|x,y| loadImage3(self, x, y)}, '%x %y') +} + +image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){ + pack(:side=>:left, :fill=>:both, :padx=>'2m', :pady=>'2m', :expand=>true) + bind('Return', proc{loadDir3(image3_lbx)}) +} + +TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"¥Ç¥£¥ì¥¯¥È¥êÁªÂò", + :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) { + pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m') +} + +image3_if = TkLabelFrame.new(base_frame, :text=>'¥¤¥á¡¼¥¸:') {|f| + # TkLabel.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m') + Tk::Label.new(f, :image=>$image3a).pack(:padx=>'2m', :pady=>'2m') +} + +Tk.grid(image3_df, '-', + :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f) +Tk.grid(image3_ff, image3_if, + :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f) +TkGrid.columnconfigure(image3_f, 1, :weight=>1) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/items.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/items.rb new file mode 100644 index 0000000..64ceeff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/items.rb @@ -0,0 +1,379 @@ +# -*- coding: euc-jp -*- +# +# canvas item types widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($items_demo) && $items_demo + $items_demo.destroy + $items_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$items_demo = TkToplevel.new {|w| + title("Canvas Item Demonstration") + iconname("Items") + positionWindow(w) +} + +base_frame = TkFrame.new($items_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤ª¤ê¡¢¤½¤ÎÃæ¤Ë¤Ï¥­¥ã¥ó¥Ð¥¹ widget ¤¬¥µ¥Ý¡¼¥È¤¹¤ëÍÍ¡¹¤Ê¥¿¥¤¥×¤Î¥¢¥¤¥Æ¥à¤ÎÎ㤬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¼¡¤Î¤è¤¦¤ÊÁàºî¤¬¤Ç¤­¤Þ¤¹¡£\n ¥Ü¥¿¥ó-1 ¥É¥é¥Ã¥°:\t¥¢¥¤¥Æ¥à¤òÆ°¤«¤¹¡£\n ¥Ü¥¿¥ó-2 ¥É¥é¥Ã¥°:\t¸«¤¨¤Æ¤¤¤ëÉôʬ¤ò¤º¤é¤¹¡£\n ¥Ü¥¿¥ó-3 ¥É¥é¥Ã¥°:\tÎΰè¤ò°Ï¤¦¡£\n ¥³¥ó¥È¥í¡¼¥ë-F:\tÎΰè¤Î²¼¤Î¥¢¥¤¥Æ¥à¤òɽ¼¨¤¹¤ë¡£" +}.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $items_demo + $items_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'items'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +cvs = nil +TkFrame.new(base_frame) {|cf| + # canvas À¸À® + cvs = TkCanvas.new(cf) {|c| + focus + scrollregion '0c 0c 30c 24c' + width '15c' + height '10c' + relief 'sunken' + borderwidth 2 + + hs = TkScrollbar.new(cf) {|s| + orient 'horizontal' + command proc{|*args| c.xview(*args)} + c.xscrollcommand proc{|first,last| s.set first,last} + } + + vs = TkScrollbar.new(cf) {|s| + command proc{|*args| c.yview(*args)} + c.yscrollcommand proc{|first,last| s.set first,last} + } + + if $tk_version =~ /^4\.[01]/ + hs.pack('side'=>'bottom', 'fill'=>'x') + vs.pack('side'=>'right', 'fill'=>'y') + c.pack('in'=>cf, 'expand'=>'yes', 'fill'=>'both') + + else + c.grid('in'=>cf, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + vs.grid('row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + hs.grid('row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0) + + end + + } +}.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + +# Display a 3x3 rectangular grid +TkcRectangle.new(cvs, '0c', '0c', '30c', '24c', 'width'=>2) +TkcLine.new(cvs, '0c', '8c', '30c', '8c', 'width'=>2) +TkcLine.new(cvs, '0c', '16c', '30c', '16c', 'width'=>2) +TkcLine.new(cvs, '10c', '0c', '10c', '24c', 'width'=>2) +TkcLine.new(cvs, '20c', '0c', '20c', '24c', 'width'=>2) + +if $tk_version =~ /^4.*/ + font1 = '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*' + font2 = '-Adobe-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*' +else + font1 = 'Helvetica 12' + font2 = 'Helvetica 24 bold' +end +if TkWinfo.depth($root).to_i > 1 + blue = 'DeepSkyBlue3' + red = 'red' + bisque = 'bisque3' + green = 'SeaGreen3' +else + blue = 'black' + red = 'black' + bisque = 'black' + green = 'black' +end + +# tag ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À® +$tag_item = TkcGroup.new(cvs) + +# Set up demos within each of the areas of the grid. +TkcText.new(cvs, '5c', '.2c', 'text'=>'¥é¥¤¥ó', 'anchor'=>'n') +TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c', + 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt', + 'join'=>'miter', 'tags'=>$tag_item ) +TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item) +TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item) +TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c', + '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c', + '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c', + 'width'=>3, 'fill'=>red, 'tags'=>$tag_item ) +TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item ) +TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c', + 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round', + 'tags'=>$tag_item ) + +TkcText.new(cvs, '15c', '.2c', + 'text'=>'¶ÊÀþ (³ê¤é¤«¤Ë¤Ä¤Ê¤¤¤ÀľÀþ)', 'anchor'=>'n') +TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c', + 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item ) +TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c', + 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item ) +TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c', + '16.5c','4.5c','13.5c','7.5c','12c','6c', + 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator), + 'fill'=>red, 'tags'=>$tag_item ) + +TkcText.new(cvs, '25c', '.2c', 'text'=>'¿³Ñ·Á', 'anchor'=>'n') +TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c', + '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c', + 'fill'=>'green', 'outline'=>'black', 'width'=>4, + 'tags'=>$tag_item ) +TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c', + '28c','1c','29c','1c','29c','4c','29c','4c', + 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item) +TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c', + '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c', + '7.5c','22c','7.5c', + 'stipple'=>'@' + [$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator), + 'outline'=>'black', 'tags'=>$tag_item ) + +TkcText.new(cvs, '5c', '8.2c', 'text'=>'¶ë·Á', 'anchor'=>'n') +TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c', + 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item) +TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c', + 'fill'=>green, 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'fill'=>blue, 'tags'=>$tag_item ) + +TkcText.new(cvs, '15c', '8.2c', 'text'=>'Âʱß', 'anchor'=>'n') +TkcOval.new(cvs, '11c','9.5c','14c','12.5c', + 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item) +TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c', + 'fill'=>green, 'tags'=>$tag_item ) +TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'', + 'stipple'=>'@'+[$demo_dir,'..', + 'images','gray25.xbm'].join(File::Separator), + 'fill'=>blue, 'tags'=>$tag_item ) + +TkcText.new(cvs, '25c', '8.2c', 'text'=>'¥Æ¥­¥¹¥È', 'anchor'=>'n') +TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c') +TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c', + 'text'=>'û¤¤¥Æ¥­¥¹¥È¡£¥ï¡¼¥É¥é¥Ã¥×¡¢º¸Â·¤¨¡¢¥¢¥ó¥«¡¼¤ÏËÌ(¾å)¡£¢¢¤Ï³Æ¥Æ¥­¥¹¥È¤Î¥¢¥ó¥«¡¼¥Ý¥¤¥ó¥È¤ò¼¨¤¹¡£', 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c') +TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue, + 'text'=>"¤¤¤¯¤Ä¤«¤Î¹Ô¡£\n¤½¤ì¤¾¤ìÆÈΩ¤Ë\n¹Ô·¤¨¡£\nÁ´¤Æº¸Ã¼¤¬¥¢¥ó¥«¡¼¤µ¤ì¤Æ¤¤¤ë¡£", 'justify'=>'center', 'tags'=>$tag_item ) +TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c') +if $tk_version =~ /^4\.[01]/ + TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red, + 'stipple'=>'@' + [$demo_dir, '..', + 'images', 'grey.5'].join(File::Separator), + 'text'=>'Stippled characters', 'tags'=>$tag_item ) +else + TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red, + 'stipple'=>'gray50', 'text'=>'Stippled characters', + 'tags'=>$tag_item ) +end + +TkcText.new(cvs, '5c', '16.2c', 'text'=>'¸Ì', 'anchor'=>'n') +TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black', + 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item) +#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc', +# 'outline'=>blue, 'start'=>135, 'extent'=>270, +# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator), +# 'tags'=>$tag_item) +TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc', + 'outline'=>blue, 'start'=>135, 'extent'=>270, + 'outlinestipple'=>'@'+[$demo_dir, '..', + 'images','gray25.xbm'].join(File::Separator), + 'tags'=>$tag_item) +TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice', + 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90, + 'tags'=>$tag_item) +TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord', + 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270, + 'tags'=>$tag_item) + +TkcText.new(cvs, '15c', '16.2c', 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×', 'anchor'=>'n') +#TkcBitmap.new(cvs, '13c','20c', +# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator), +# 'tags'=>$tag_item) +TkcBitmap.new(cvs, '13c','20c', + 'bitmap'=>'@' + [$demo_dir, '..', + 'images', 'face.xbm'].join(File::Separator), + 'tags'=>$tag_item) +#TkcBitmap.new(cvs, '17c','18.5c', +# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator), +# 'tags'=>$tag_item) +TkcBitmap.new(cvs, '17c','18.5c', + 'bitmap'=>'@' + [$demo_dir, '..', + 'images', 'noletter.xbm'].join(File::Separator), + 'tags'=>$tag_item) +#TkcBitmap.new(cvs, '17c','21.5c', +# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator), +# 'tags'=>$tag_item) +# ¢­¤Î·Á¼°¤Ç¤â²Äǽ +TkcBitmap.new(cvs, '17c','21.5c') { + bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator) + tags $tag_item +} +#TkcBitmap.new(cvs, '17c','21.5c') { +# bitmap '@' + ['images', 'letters'].join(File::Separator) +# tags $tag_item +#} + +TkcText.new(cvs, '25c', '16.2c', 'text'=>'¥¦¥£¥ó¥É¥¦', 'anchor'=>'n') +TkButton.new(cvs) {|b| + text '²¡¤·¤Æ¤Í' + command proc{butPress cvs, red} + TkcWindow.new(cvs, '21c','18c', + 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item) +} +TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e| + insert 'end', 'ÊÔ½¸¤·¤Æ¤Í' + TkcWindow.new(cvs, '21c','21c', + 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item) +} +TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c', + 'width'=>'.5c', 'tickinterval'=>0 ) {|scl| + TkcWindow.new(cvs, '28.5c','17.5c', + 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item) +} +TkcText.new(cvs, '21c', '17.9c', 'text'=>'¥Ü¥¿¥ó:', 'anchor'=>'sw') +TkcText.new(cvs, '21c', '20.9c', 'text'=>'¥¨¥ó¥È¥ê:', 'anchor'=>'sw') +TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'¥¹¥±¡¼¥ë:', 'anchor'=>'s') + +# Set up event bindings for canvas: +cvs.itembind($tag_item, 'Any-Enter', proc{itemEnter cvs}) +cvs.itembind($tag_item, 'Any-Leave', proc{itemLeave cvs}) +cvs.bind('2', proc{|x,y| cvs.scan_mark x,y}, '%x %y') +cvs.bind('B2-Motion', proc{|x,y| cvs.scan_dragto x,y}, '%x %y') +cvs.bind('3', proc{|x,y| itemMark cvs,x,y}, '%x %y') +cvs.bind('B3-Motion', proc{|x,y| itemStroke cvs,x,y}, '%x %y') +cvs.bind('Control-f', proc{itemsUnderArea cvs}) +cvs.bind('1', proc{|x,y| itemStartDrag cvs,x,y}, '%x %y') +cvs.bind('B1-Motion', proc{|x,y| itemDrag cvs,x,y}, '%x %y') +# Utility methods for highlighting the item under the pointer + +$restoreCmd = nil +def itemEnter (c) + if TkWinfo.depth(c).to_i == 1 + $restoreCmd = nil + return + end + type = c.itemtype('current') + if type == TkcWindow + $restoreCmd = nil + return + end + if type == TkcBitmap + bg = (c.itemconfiginfo('current', 'background'))[4] + $restoreCmd = proc{c.itemconfigure 'current', 'background', bg} + c.itemconfigure 'current', 'background', 'SteelBlue2' + return + end + fill = (c.itemconfiginfo('current', 'fill'))[4] + if (type == TkcRectangle || type == TkcOval || type == TkcArc) && fill == [] + outline = (c.itemconfiginfo('current', 'outline'))[4] + $restoreCmd = proc{c.itemconfigure 'current', 'outline', outline} + c.itemconfigure 'current', 'outline', 'SteelBlue2' + else + $restoreCmd = proc{c.itemconfigure 'current', 'fill', fill} + c.itemconfigure 'current', 'fill', 'SteelBlue2' + end +end + +def itemLeave(c) + $restoreCmd.call if $restoreCmd +end + +# Utility methods for stroking out a rectangle and printing what's +# underneath the rectangle's area. + +def itemMark(c,x,y) + $areaX1 = c.canvasx(x) + $areaY1 = c.canvasy(y) + c.delete 'area' +end + +def itemStroke(c,x,y) + x = c.canvasx(x) + y = c.canvasy(y) + if $areaX1 != x && $areaY1 != y + c.delete 'area' + c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y, + '-outline', 'black') + $areaX2 = x + $areaY2 = y + end +end + +def itemsUnderArea(c) + area = c.find_withtag('area') + items = [] + c.find_enclosed($areaX1,$areaY1,$areaX2,$areaY2).each{|i| + items.push(i) if i.gettags.include?($tag_item) + } + print "Items enclosed by area: #{items.inspect}\n"; STDOUT.flush + items.clear + c.find_overlapping($areaX1,$areaY1,$areaX2,$areaY2).each{|i| + items.push(i) if i.gettags.include?($tag_item) + } + print "Items overlapping area: #{items.inspect}\n"; STDOUT.flush +end + +$areaX1 = 0 +$areaY1 = 0 +$areaX2 = 0 +$areaY2 = 0 + +# Utility methods to support dragging of items. + +def itemStartDrag(c,x,y) + $lastX = c.canvasx(x) + $lastY = c.canvasy(y) +end + +def itemDrag(c,x,y) + x = c.canvasx(x) + y = c.canvasy(y) + c.move('current', x - $lastX, y - $lastY) + $lastX = x + $lastY = y +end + +# Method that's invoked when the button embedded in the canvas +# is invoked. + +def butPress(w,color) + i = TkcText.new(w, '25c', '18.1c', + 'text'=>'¤¤¤Æ¤Æ!!', 'fill'=>color, 'anchor'=>'n') + Tk.after(500, proc{w.delete i}) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset new file mode 100644 index 0000000..46c2378 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset @@ -0,0 +1,333 @@ +#!/usr/bin/env ruby + +# ixset -- +# A nice interface to "xset" to change X server settings +# + +require 'tk' + +class Xsettings + # + # Button actions + # + def quit + @root.destroy + end + + def ok + writesettings + quit + end + + def cancel + readsettings + dispsettings + end + + # apply is just "writesettings" + + + # + # Read current settings + # + def readsettings + xfd = open("|xset q", 'r') + xfd.readlines.each{|line| + fields = line.chomp.strip.split(/\s+/) + case fields[0] + when "auto" + if fields[1] == 'repeat:' + @kbdrep = fields[2] + @w_kbdrep.set(@kbdrep) + @kbdcli = fields[6] + end + + when "bell" + @bellvol = fields[2] + @bellpit = fields[5] + @belldur = fields[8] + + when "acceleration:" + @mouseacc = fields[1] + @mousethr = fields[3] + + when "prefer" + if fields[2] == 'yes' + @screenbla = 'blank' + else + @screenbla = 'noblank' + end + @w_screenbla.set(@screenbla) + + when "timeout:" + @screentim = fields[1] + @screencyc = fields[3] + + end + } + + xfd.close + end + + # + # Write settings into the X server + # + def writesettings + @bellvol = @w_bellvol.get + @bellpit = @w_bellpit.get + @belldur = @w_belldur.get + + @kbdrep = @w_kbdrep.get + if @kbdrep == 'on' + @kbdcli = @w_kbdcli.get + else + @kbdcli = 'off' + end + + @mouseacc = @w_mouseacc.get + @mousethr = @w_mousethr.get + + @screentim = @w_screentim.get + @screencyc = @w_screencyc.get + @screenbla = @w_screenbla.get + + system("xset \ + b #{@bellvol} #{@bellpit} #{@belldur} \ + c #{@kbdcli} \ + r #{@kbdrep} \ + m #{@mouseacc} #{@mousethr} \ + s #{@screentim} #{@screencyc} \ + s #{@screenbla}") + end + + # + # Sends all settings to the window + # + def dispsettings + @w_bellvol.set(@bellvol) + @w_bellpit.set(@bellpit) + @w_belldur.set(@belldur) + + @w_kbdonoff.set(@w_kbdrep.get) + @w_kbdcli.set(@kbdcli) + + @w_mouseacc.set(@mouseacc) + @w_mousethr.set(@mousethr) + + @w_screenblank.set(@w_screenbla.get) + @w_screenpat.set(@w_screenbla.get) + + @w_screentim.set(@screentim) + @w_screencyc.set(@screencyc) + end + + # + # Create all windows, and pack them + # + class LabelEntry + def initialize(parent, text, length) + @frame = TkFrame.new(parent) + TkLabel.new(@frame, 'text'=>text).pack('side'=>'left','expand'=>'y') + @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') { + pack('side'=>'left','expand'=>'y') + } + end + def pack(keys) + @frame.pack(keys) + end + def get + @entry.value + end + def set(value) + @entry.delete(0,'end') + @entry.insert(0, value) + end + end + + def createwindows + win = self + + # + # Buttons + # + buttons = TkFrame.new(@root) {|f| + [ TkButton.new(f, 'command'=>proc{win.ok}, 'text'=>'Ok'), + TkButton.new(f, 'command'=>proc{win.writesettings}, 'text'=>'Apply'), + TkButton.new(f, 'command'=>proc{win.cancel}, 'text'=>'Cancel'), + TkButton.new(f, 'command'=>proc{win.quit}, 'text'=>'Quit') ].each{|b| + b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) + } + } + + # + # Bell settings + # + bell = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(bell, 'text'=>'Bell Settings') + @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>"Volume (%)") + + f = TkFrame.new(bell) + @w_bellpit = LabelEntry.new(f, "Pitch (Hz)", 6) + @w_bellpit.pack('side'=>'left', 'padx'=>5) + @w_belldur = LabelEntry.new(f, "Duration (ms)", 6) + @w_belldur.pack('side'=>'right', 'padx'=>5) + + l.pack('side'=>'top', 'expand'=>'yes') + @w_bellvol.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Keyboard settings + # + kbdonoff = nil + kbdcli = nil + kbd = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(kbd, 'text'=>'Keyboard Repeat Settings') + f = TkFrame.new(kbd) + @w_kbdonoff = TkCheckButton.new(f, 'text'=>'On', 'relief'=>'flat', + 'onvalue'=>'on', 'offvalue'=>'off', + 'variable'=>@w_kbdrep ) { + def self.set(value) + if value == 'on' + self.select + else + self.deselect + end + end + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both') + } + @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>'Click Volume (%)') + @w_kbdcli.pack('side'=>'left', 'expand'=>'yes') + l.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x') + + # + # Mouse settings + # + mouse = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(mouse, 'text'=>'Mouse Settings') + f = TkFrame.new(mouse) + @w_mouseacc = LabelEntry.new(f, 'Acceleration', 3) + @w_mouseacc.pack('side'=>'left') + @w_mousethr = LabelEntry.new(f, 'Threshold (pixels)', 3) + @w_mousethr.pack('side'=>'right') + l.pack('side'=>'top') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Screen Saver settings + # + screen = TkFrame.new(@root, 'relief'=>'raised', 'borderwidth'=>2) + l = TkLabel.new(screen, 'text'=>'Screen-saver Settings') + f = TkFrame.new(screen) + ff1 = TkFrame.new(f) + [ @w_screenblank = TkRadioButton.new(ff1, 'text'=>'Blank', + 'relief'=>'flat', + 'variable'=>@w_screenbla, + 'value'=>'blank') { + def self.set(value) + if value == 'blank' + self.select + else + self.deselect + end + end + }, + @w_screenpat = TkRadioButton.new(ff1, 'text'=>'Pattern', + 'relief'=>'flat', + 'variable'=>@w_screenbla, + 'value'=>'noblank') { + def self.set(value) + if value != 'blank' + self.select + else + self.deselect + end + end + } + ].each {|w| w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') } + + ff2 = TkFrame.new(f) + [ @w_screentim = LabelEntry.new(ff2, 'Timeout (s)', 5), + @w_screencyc = LabelEntry.new(ff2, 'Cycle (s)', 5) ].each{|w| + w.pack('side'=>'top', 'pady'=>2, 'anchor'=>'e') + } + + ff1.pack('side'=>'left') + ff2.pack('side'=>'left') + + l.pack('side'=>'top') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Main window + # + buttons.pack('side'=>'top', 'fill'=>'both') + bell.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + kbd.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + mouse.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + screen.pack('side'=>'top', 'fill'=>'both', 'ipady'=>5, 'expand'=>'yes') + + # + # Let the user resize our window + # + @root.minsize(10,10) + end + + def initialize + @root = TkRoot.new + + @kbdrep = 'on' + @w_kbdrep = TkVariable.new(@kbdrep) + def @w_kbdrep.get + self.value + end + def @w_kbdrep.set(val) + self.value=val + end + + @kbdcli = 0 + + @bellvol = 100 + @bellpit = 440 + @belldur = 100 + + @mouseacc = "3/1" + @mousethr = 4 + + @screenbla = "blank" + @w_screenbla = TkVariable.new(@screenbla) + def @w_screenbla.get + self.value + end + def @w_screenbla.set(val) + self.value=val + end + + @screentim = 600 + @screencyc = 600 + + # + # Listen what "xset" tells us... + # + readsettings + + # + # Create all windows + # + createwindows + + # + # Write xset parameters + # + dispsettings + end +end + +Xsettings.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset2 new file mode 100644 index 0000000..5b816e4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ixset2 @@ -0,0 +1,369 @@ +#!/usr/bin/env ruby +# -*- coding: euc-jp -*- +# +# ixset -- +# A nice interface to "xset" to change X server settings +# + +require 'tk' + +class Xsettings + # + # Button actions + # + def quit + @root.destroy + end + + def ok + writesettings + quit + end + + def cancel + readsettings + dispsettings + @btn_APPLY.state(:disabled) + @btn_CANCEL.state(:disabled) + end + + # apply is just "writesettings" + def apply + writesettings + @btn_APPLY.state(:disabled) + @btn_CANCEL.state(:disabled) + end + + # + # Read current settings + # + def readsettings + xfd = open("|xset q", 'r') + xfd.readlines.each{|line| + fields = line.chomp.strip.split(/\s+/) + case fields[0] + when "auto" + if fields[1] == 'repeat:' + @kbdrep = fields[2] + @w_kbdrep.set(@kbdrep) + @kbdcli = fields[6] + end + + when "bell" + @bellvol = fields[2] + @bellpit = fields[5] + @belldur = fields[8] + + when "acceleration:" + @mouseacc = fields[1] + @mousethr = fields[3] + + when "prefer" + if fields[2] == 'yes' + @screenbla = 'blank' + else + @screenbla = 'noblank' + end + @w_screenbla.set(@screenbla) + + when "timeout:" + @screentim = fields[1] + @screencyc = fields[3] + + end + } + + xfd.close + end + + # + # Write settings into the X server + # + def writesettings + @bellvol = @w_bellvol.get + @bellpit = @w_bellpit.get + @belldur = @w_belldur.get + + @kbdrep = @w_kbdrep.get + if @kbdrep == 'on' + @kbdcli = @w_kbdcli.get + else + @kbdcli = 'off' + end + + @mouseacc = @w_mouseacc.get + @mousethr = @w_mousethr.get + + @screentim = @w_screentim.get + @screencyc = @w_screencyc.get + @screenbla = @w_screenbla.get + + system("xset \ + b #{@bellvol} #{@bellpit} #{@belldur} \ + c #{@kbdcli} \ + r #{@kbdrep} \ + m #{@mouseacc} #{@mousethr} \ + s #{@screentim} #{@screencyc} \ + s #{@screenbla}") + end + + # + # Sends all settings to the window + # + def dispsettings + @w_bellvol.set(@bellvol) + @w_bellpit.set(@bellpit) + @w_belldur.set(@belldur) + + @w_kbdonoff.set(@w_kbdrep.get) + @w_kbdcli.set(@kbdcli) + + @w_mouseacc.set(@mouseacc) + @w_mousethr.set(@mousethr) + + @w_screenblank.set(@w_screenbla.get) + @w_screenpat.set(@w_screenbla.get) + + @w_screentim.set(@screentim) + @w_screencyc.set(@screencyc) + end + + # + # Create all windows, and pack them + # + class LabelEntry + def initialize(parent, text, length, range=[]) + @frame = TkFrame.new(parent) + TkLabel.new(@frame, 'text'=>text).pack('side'=>'left') + if range.size > 0 + @entry = TkSpinbox.new(@frame, 'width'=>length, 'relief'=>'sunken', + 'from'=>range[0], 'to'=>range[1]) + else + @entry = TkEntry.new(@frame, 'width'=>length, 'relief'=>'sunken') + end + @entry.pack('side'=>'right','expand'=>'y', 'fill'=>'x') + end + def epath + @frame + end + def pack(keys) + @frame.pack(keys) + end + def get + @entry.value + end + def set(value) + @entry.delete(0,'end') + @entry.insert(0, value) + end + end + + def createwindows + win = self + + # + # Buttons + # + btn_frame = TkFrame.new(@root) + buttons = [ + @btn_OK = TkButton.new(btn_frame, 'command'=>proc{win.ok}, + 'default'=>'active', 'text'=>'λ²ò'), + @btn_APPLY = TkButton.new(btn_frame, 'command'=>proc{win.writesettings}, + 'default'=>'normal', 'text'=>'ŬÍÑ', + 'state'=>'disabled'), + @btn_CANCEL = TkButton.new(btn_frame, 'command'=>proc{win.cancel}, + 'default'=>'normal', 'text'=>'¼è¾Ã', + 'state'=>'disabled'), + @btn_QUIT = TkButton.new(btn_frame, 'command'=>proc{win.quit}, + 'default'=>'normal', 'text'=>'Ãæ»ß') + ] + buttons.each{|b| b.pack('side'=>'left', 'expand'=>'yes', 'pady'=>5) } + + @root.bind('Return', proc{@btn_OK.flash; @btn_OK.invoke}) + @root.bind('Escape', proc{@btn_QUIT.flash; @btn_QUIT.invoke}) + @root.bind('1', proc{|w| + unless buttons.index(w) + @btn_APPLY.state(:normal) + @btn_CANCEL.state(:normal) + end + }, '%W') + @root.bind('Key', proc{|w, k| + unless buttons.index(w) + case k + when 'Return', 'Escape', 'Tab', /.*Shift.*/ + # do nothing + else + @btn_APPLY.state(:normal) + @btn_CANCEL.state(:normal) + end + end + }, '%W %K') + + # + # Bell settings + # + bell = TkLabelframe.new(@root, 'text'=>'¥Ù¥ëÀßÄê', + 'padx'=>'1.5m', 'pady'=>'1.5m') + @w_bellvol = TkScale.new(bell, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>"²»ÎÌ (%)") + + f = TkFrame.new(bell) + @w_bellpit = LabelEntry.new(f, "²»Äø (Hz)", 6, [25, 20000]) + @w_bellpit.pack('side'=>'left', 'padx'=>5) + @w_belldur = LabelEntry.new(f, "»ý³»þ´Ö (ms)", 6, [1, 10000]) + @w_belldur.pack('side'=>'right', 'padx'=>5) + + @w_bellvol.pack('side'=>'top', 'expand'=>'yes') + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Keyboard settings + # + kbdonoff = nil + kbdcli = nil + kbd = TkLabelframe.new(@root, 'text'=>'¥­¡¼¥Ü¡¼¥É¥ê¥Ô¡¼¥ÈÀßÄê', + 'padx'=>'1.5m', 'pady'=>'1.5m') + f = TkFrame.new(kbd) + @w_kbdonoff = TkCheckButton.new(f, 'text'=>'¥¯¥ê¥Ã¥¯²»¤¢¤ê', + 'relief'=>'flat', + 'onvalue'=>'on', 'offvalue'=>'off', + 'variable'=>@w_kbdrep ) { + def self.set(value) + if value == 'on' + self.select + else + self.deselect + end + end + pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x', 'padx'=>[0, '1m']) + } + @w_kbdcli = TkScale.new(f, 'from'=>0, 'to'=>100, 'length'=>200, + 'tickinterval'=>20, 'orient'=>'horizontal', + 'label'=>'¥¯¥ê¥Ã¥¯²»ÎÌ (%)') + @w_kbdcli.pack('side'=>'left', 'expand'=>'yes', + 'fill'=>'x', 'padx'=>['1m', 0]) + f.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'fill'=>'x') + + # + # Mouse settings + # + mouse = TkLabelframe.new(@root, 'text'=>'¥Þ¥¦¥¹ÀßÄê', + 'padx'=>'1.5m', 'pady'=>'1.5m') + f = TkFrame.new(mouse) + @w_mouseacc = LabelEntry.new(f, '²Ã®ÎÌ', 5) + @w_mouseacc.pack('side'=>'left', 'padx'=>[0, '1m']) + @w_mousethr = LabelEntry.new(f, 'ïçÃÍ (pixels)', 3, [1, 2000]) + @w_mousethr.pack('side'=>'right', 'padx'=>['1m', 0]) + f.pack('side'=>'top', 'expand'=>'yes') + + # + # Screen Saver settings + # + screen = TkLabelframe.new(@root, 'text'=>'¥¹¥¯¥ê¡¼¥ó¥»¡¼¥ÐÀßÄê', + 'padx'=>'1.5m', 'pady'=>'1.5m') + @w_screenblank = TkRadioButton.new(screen, 'text'=>'¥Ö¥é¥ó¥¯É½¼¨', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, + 'value'=>'blank') { + def self.set(value) + if value == 'blank' + self.select + else + self.deselect + end + end + } + + @w_screenpat = TkRadioButton.new(screen, 'text'=>'¥Ñ¥¿¡¼¥óɽ¼¨', + 'relief'=>'flat', 'anchor'=>'w', + 'variable'=>@w_screenbla, + 'value'=>'noblank') { + def self.set(value) + if value != 'blank' + self.select + else + self.deselect + end + end + } + + @w_screentim = LabelEntry.new(screen, '¥¿¥¤¥à¥¢¥¦¥È (s)', 5, [1, 100000]) + @w_screencyc = LabelEntry.new(screen, '¼þ´ü (s)', 5, [1, 100000]) + + Tk.grid(@w_screenblank, @w_screentim, 'sticky'=>'e') + Tk.grid(@w_screenpat, @w_screencyc, 'sticky'=>'e') + TkGrid.configure(@w_screenblank, @w_screenpat, 'sticky'=>'ew') + + # + # Main window + # + param = { + 'side'=>'top', 'fill'=>'both', 'expand'=>'yes', + 'padx'=>'1m', 'pady'=>'1m' + } + btn_frame.pack('side'=>'top', 'fill'=>'both') + bell.pack(param) + kbd.pack(param) + mouse.pack(param) + screen.pack(param) + + # + # Let the user resize our window + # + @root.minsize(10,10) + end + + def initialize(title) + @root = TkRoot.new('title'=>title) + + @kbdrep = 'on' + @w_kbdrep = TkVariable.new(@kbdrep) + def @w_kbdrep.get + self.value + end + def @w_kbdrep.set(val) + self.value=val + end + + @kbdcli = 0 + + @bellvol = 100 + @bellpit = 440 + @belldur = 100 + + @mouseacc = "3/1" + @mousethr = 4 + + @screenbla = "blank" + @w_screenbla = TkVariable.new(@screenbla) + def @w_screenbla.get + self.value + end + def @w_screenbla.set(val) + self.value=val + end + + @screentim = 600 + @screencyc = 600 + + # + # Listen what "xset" tells us... + # + readsettings + + # + # Create all windows + # + createwindows + + # + # Write xset parameters + # + dispsettings + end +end + +Xsettings.new(File.basename($0,'.rb')) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/knightstour.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/knightstour.rb new file mode 100644 index 0000000..d4595ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/knightstour.rb @@ -0,0 +1,273 @@ +# -*- coding: euc-jp -*- +# +# Based on the widget demo of Tcl/Tk8.5.2 +# The following is the original copyright text. +#---------------------------------------------------------------------------- +# Copyright (C) 2008 Pat Thoyts +# +# Calculate a Knight's tour of a chessboard. +# +# This uses Warnsdorff's rule to calculate the next square each +# time. This specifies that the next square should be the one that +# has the least number of available moves. +# +# Using this rule it is possible to get to a position where +# there are no squares available to move into. In this implementation +# this occurs when the starting square is d6. +# +# To solve this fault an enhancement to the rule is that if we +# have a choice of squares with an equal score, we should choose +# the one nearest the edge of the board. +# +# If the call to the Edgemost function is commented out you can see +# this occur. +# +# You can drag the knight to a specific square to start if you wish. +# If you let it repeat then it will choose random start positions +# for each new tour. +#---------------------------------------------------------------------------- +require 'tk' + +class Knights_Tour + # Return a list of accessible squares from a given square + def valid_moves(square) + moves = [] + [ + [-1,-2], [-2,-1], [-2,1], [-1,2], [1,2], [2,1], [2,-1], [1,-2] + ].each{|col_delta, row_delta| + col = (square % 8) + col_delta + row = (square.div(8)) + row_delta + moves << (row * 8 + col) if row > -1 && row < 8 && col > -1 && col < 8 + } + moves + end + + # Return the number of available moves for this square + def check_square(square) + valid_moves(square).find_all{|pos| ! @visited.include?(pos)}.length + end + + # Select the next square to move to. Returns -1 if there are no available + # squares remaining that we can move to. + def next_square(square) + minimum = 9 + nxt = -1 + valid_moves(square).each{|pos| + unless @visited.include?(pos) + cnt = check_square(pos) + if cnt < minimum + minimum = cnt + nxt = pos + elsif cnt == minimum + nxt = edgemost(nxt, pos) + end + end + } + nxt + end + + # Select the square nearest the edge of the board + def edgemost(nxt, pos) + col_A = 3 - ((3.5 - nxt % 8).abs.to_i) + col_B = 3 - ((3.5 - pos % 8).abs.to_i) + row_A = 3 - ((3.5 - nxt.div(8)).abs.to_i) + row_B = 3 - ((3.5 - pos.div(8)).abs.to_i) + (col_A * row_A < col_B * row_B)? nxt : pos + end + + # Display a square number as a standard chess square notation. + def _N(square) + '%c%d' % [(97 + square % 8), (square.div(8) + 1)] + end + + # Perform a Knight's move and schedule the next move. + def move_piece(last, square) + @log.insert(:end, "#{@visited.length}. #{_N last} -> #{_N square}\n", '') + @log.see(:end) + @board.itemconfigure(1+last, :state=>:normal, :outline=>'black') + @board.itemconfigure(1+square, :state=>:normal, :outline=>'red') + @knight.coords(@board.coords(1+square)[0..1]) + @visited << square + if (nxt = next_square(square)) != -1 + @after_id = Tk.after(@delay.numeric){move_piece(square, nxt) rescue nil} + else + @start_btn.state :normal + if @visited.length == 64 + if @initial == square + @log.insert :end, '¼þÍ·(closed tour)À®¸ù¡ª' + else + @log.insert :end, "À®¸ù\n", {} + Tk.after(@delay.numeric * 2){tour(rand(64))} if @continuous.bool + end + else + @log.insert :end, "¼ºÇÔ¡ª\n", {} + end + end + end + + # Begin a new tour of the board given a random start position + def tour(square = nil) + @visited.clear + @log.clear + @start_btn.state :disabled + 1.upto(64){|n| + @board.itemconfigure(n, :state=>:disabled, :outline=>'black') + } + unless square + square = @board.find_closest(*(@knight.coords << 0 << 65))[0].to_i - 1 + end + @initial = square + Tk.after_idle{ move_piece(@initial, @initial) rescue nil } + end + + def _stop + Tk.after_cancel(@after_id) rescue nil + end + + def _exit + _stop + $knightstour.destroy + end + + def set_delay(new) + @delay.numeric = new.to_i + end + + def drag_start(w, x, y) + w.dtag('selected') + w.addtag('selected', :withtag, 'current') + @dragging = [x, y] + end + + def drag_motion(w, x, y) + return unless @dragging + w.move('selected', x - @dragging[0], y - @dragging[1]) + @dragging = [x, y] + end + + def drag_end(w, x, y) + square = w.find_closest(x, y, 0, 65) + w.coords('selected', w.coords(square)[0..1]) + w.dtag('selected') + @dragging = nil + end + + def make_SeeDismiss + ## See Code / Dismiss + frame = Ttk::Frame.new($knightstour) + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'knightstour'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $knightstour.destroy + $knightstour = nil + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) + frame + end + + def create_gui(parent = nil) + $knightstour.destroy rescue nil + $knightstour = Tk::Toplevel.new(parent, :title=>"Knight's tour") + $knightstour.withdraw + base_f = Ttk::Frame.new($knightstour) + @board = Tk::Canvas.new(base_f, :width=>240, :height=>240) + @log = Tk::Text.new(base_f, :width=>12, :height=>1, + :font=>'Arial 8', :background=>'white') + scr = @log.yscrollbar(Ttk::Scrollbar.new(base_f)) + + @visited = [] + @delay = TkVariable.new(600) + @continuous = TkVariable.new(false) + + tool_f = Ttk::Frame.new($knightstour) + label = Ttk::Label.new(tool_f, :text=>'¼Â¹Ô®ÅÙ') + scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay, + :command=>proc{|n| set_delay(n)}) + check = Ttk::Checkbutton.new(tool_f, :text=>'È¿Éü', + :variable=>@continuous) + @start_btn = Ttk::Button.new(tool_f, :text=>'³«»Ï', + :command=>proc{tour()}) + @exit_btn = Ttk::Button.new(tool_f, :text=>'½ªÎ»', + :command=>proc{_exit()}) + + 7.downto(0){|row| + 0.upto(7){|col| + if ((col & 1) ^ (row & 1)).zero? + fill = 'bisque' + dfill = 'bisque3' + else + fill = 'tan3' + dfill = 'tan4' + end + coords = [col * 30 + 4, row * 30 + 4, col * 30 + 30, row * 30 + 30] + @board.create(TkcRectangle, coords, + :fill=>fill, :disabledfill=>dfill, + :width=>2, :state=>:disabled) + } + } + + @knight_font = TkFont.new(:size=>-24) + @knight = TkcText.new(@board, 0, 0, :font=>@knight_font, + :text=>Tk::UTF8_String.new('\u265e'), + :anchor=>'nw', # :tags=>'knight', + :fill=>'black', :activefill=>'#600000') + @knight.coords(@board.coords(rand(64)+1)[0..1]) + @knight.bind('ButtonPress-1', '%W %x %y'){|w,x,y| drag_start(w,x,y)} + @knight.bind('Motion', '%W %x %y'){|w,x,y| drag_motion(w,x,y)} + @knight.bind('ButtonRelease-1', '%W %x %y'){|w,x,y| drag_end(w,x,y)} + + Tk.grid(@board, @log, scr, :sticky=>'news') + base_f.grid_rowconfigure(0, :weight=>1) + base_f.grid_columnconfigure(0, :weight=>1) + + Tk.grid(base_f, '-', '-', '-', '-', '-', :sticky=>'news') + widgets = [label, scale, check, @start_btn] + sg = nil + unless $RubyTk_WidgetDemo + widgets << @exit_btn + if Tk.windowingsystem != 'aqua' + #widgets.unshift(Ttk::SizeGrip.new(tool_f)) + Ttk::SizeGrip.new(tool_f).pack(:side=>:right, :anchor=>'se') + end + end + Tk.pack(widgets, :side=>:right) + if Tk.windowingsystem == 'aqua' + TkPack.configure(widgets, :padx=>[4, 4], :pady=>[12, 12]) + TkPack.configure(widgets[0], :padx=>[4, 24]) + TkPack.configure(widgets[-1], :padx=>[16, 4]) + end + + Tk.grid(tool_f, '-', '-', '-', '-', '-', :sticky=>'ew') + + if $RubyTk_WidgetDemo + Tk.grid(make_SeeDismiss(), '-', '-', '-', '-', '-', :sticky=>'ew') + end + + $knightstour.grid_rowconfigure(0, :weight=>1) + $knightstour.grid_columnconfigure(0, :weight=>1) + + $knightstour.bind('Control-F2'){TkConsole.show} + $knightstour.bind('Return'){@start_btn.invoke} + $knightstour.bind('Escape'){@exit_btn.invoke} + $knightstour.bind('Destroy'){ _stop } + $knightstour.protocol('WM_DELETE_WINDOW'){ _exit } + + $knightstour.deiconify + $knightstour.tkwait_destroy + end + + def initialize(parent = nil) + create_gui(parent) + end +end + +Tk.root.withdraw unless $RubyTk_WidgetDemo +Thread.new{Tk.mainloop} if __FILE__ == $0 +Knights_Tour.new diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/label.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/label.rb new file mode 100644 index 0000000..2e6b3e7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/label.rb @@ -0,0 +1,69 @@ +# -*- coding: euc-jp -*- +# +# label widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($label_demo) && $label_demo + $label_demo.destroy + $label_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$label_demo = TkToplevel.new {|w| + title("Label Demonstration") + iconname("label") + positionWindow(w) +} + +base_frame = TkFrame.new($label_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï5¤Ä¤Î¥é¥Ù¥ë¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£º¸Â¦¤Ë¤Ï¥Æ¥­¥¹¥È¥é¥Ù¥ë¤¬3¤Ä¤¢¤ê¡¢±¦Â¦¤Ë¤Ï¥Ó¥Ã¥È¥Þ¥Ã¥×¥é¥Ù¥ë¤È¥Æ¥­¥¹¥È¥é¥Ù¥ë¤¬¤¢¤ê¤Þ¤¹¡£¥é¥Ù¥ë¤È¤¤¤¦¤Î¤Ï¤¢¤Þ¤êÌÌÇò¤¤¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤Ê¤¼¤Ê¤éį¤á¤ë°Ê³°²¿¤â¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $label_demo + $label_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'label'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# label demo Íѥե졼¥àÀ¸À® +f_left = TkFrame.new(base_frame) +f_right = TkFrame.new(base_frame) +[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes', + 'padx'=>10, 'pady'=>10, 'fill'=>'both')} + +# label À¸À® +[ TkLabel.new(f_left, 'text'=>'ºÇ½é¤Î¥é¥Ù¥ë'), + TkLabel.new(f_left, 'text'=>'2 ÈÖÌÜ¡£¤Á¤ç¤Ã¤ÈÉ⤭¾å¤¬¤é¤»¤Æ¤ß¤Þ¤·¤¿', + 'relief'=>'raised'), + TkLabel.new(f_left, 'text'=>'3 ÈÖÌÜ¡£ÄÀ¤ó¤Ç¤¤¤Þ¤¹ ', 'relief'=>'sunken') +].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')} + +# TkLabel.new(f_right) { +Tk::Label.new(f_right) { + bitmap('@' + [$demo_dir,'..','images','face.xbm'].join(File::Separator)) + borderwidth 2 + relief 'sunken' +}.pack('side'=>'top') + +TkLabel.new(f_right) { text 'Tcl/Tk ½êÍ­¼Ô' }.pack('side'=>'top') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/labelframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/labelframe.rb new file mode 100644 index 0000000..11b0d27 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/labelframe.rb @@ -0,0 +1,102 @@ +# -*- coding: euc-jp -*- +# +# labelframe.rb +# +# This demonstration script creates a toplevel window containing +# several labelframe widgets. +# +# based on "Id: labelframe.tcl,v 1.2 2001/10/30 11:21:50 dkf Exp" + + +if defined?($labelframe_demo) && $labelframe_demo + $labelframe_demo.destroy + $labelframe_demo = nil +end + +$labelframe_demo = TkToplevel.new {|w| + title("Labelframe Demonstration") + iconname("labelframe") + positionWindow(w) +} + +base_frame = TkFrame.new($labelframe_demo).pack(:fill=>:both, :expand=>true) + +# Some information +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +TkLabelFrame ¥¦¥£¥¸¥§¥Ã¥È¤Ï´ØÏ¢¤¹¤ë widget +·²¤ò¤Þ¤È¤á¤Æ¼è¤ê°·¤¦¤¿¤á¤ËÍѤ¤¤é¤ì¤Þ¤¹¡£¥é +¥Ù¥ë¤ÏÄ̾ï¤Îʸ»úÎó¤Ç¤â²¿¤é¤«¤Î¥¦¥£¥¸¥§¥Ã¥È +¤Ç¤â¤«¤Þ¤¤¤Þ¤»¤ó¡£¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë +Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤¬ +labelframe ¥¦¥£¥¸¥§¥Ã¥È¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤ +¾ì¹ç¡¢¤³¤Î¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£ +¤½¤Î¾ì¹ç¤Ë¤Ï labelframe ¥¦¥£¥¸¥§¥Ã¥È¤¬¼ÂÁõ +¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î Tk +¤òÁȤ߹ç¤ï¤»¤Æ»î¤¹¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $labelframe_demo.destroy + $labelframe_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'labelframe' + }).pack(:side=>:left, :expand=>true) +} + +# Demo area +w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both, + :expand=>true) + +# A group of radiobuttons in a labelframe +TkLabelFrame.new(w, :text=>'ÁªÂòÃÍ', + :padx=>2, :pady=>2) {|f| + grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m') + + v = TkVariable.new + (1..4).each{|i| + TkRadiobutton.new(f, :text=>"This is value #{i}", + :variable=>v, :value=>i) { + pack(:side=>:top, :fill=>:x, :pady=>2) + } + } +} + + +# Using a label window to control a group of options. +$lfdummy = TkVariable.new(0) + +def lfEnableButtons(w) + TkWinfo.children(w).each{|child| + next if child.path =~ /\.cb$/ + if $lfdummy == 1 + child.state(:normal) + else + child.state(:disabled) + end + } +end + +TkLabelFrame.new(w, :pady=>2, :padx=>2){|f| + TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy, + :text=>"¥ª¥×¥·¥ç¥ó¤ò»ÈÍÑ", :padx=>0) {|cb| + command proc{lfEnableButtons(f)} + f.labelwidget(cb) + } + grid(:row=>0, :column=>1, :pady=>'2m', :padx=>'2m') + + %w(¥ª¥×¥·¥ç¥ó1 ¥ª¥×¥·¥ç¥ó2 ¥ª¥×¥·¥ç¥ó3).each{|str| + TkCheckbutton.new(f, :text=>str).pack(:side=>:top, :fill=>:x, :pady=>2) + } + + lfEnableButtons(f) +} + +TkGrid.columnconfigure(w, [0,1], :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/mclist.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/mclist.rb new file mode 100644 index 0000000..a7834d2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/mclist.rb @@ -0,0 +1,121 @@ +# -*- coding: euc-jp -*- +# +# mclist.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# tree widget configured as a multi-column listbox. +# +# based on "Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($mclist_demo) && $mclist_demo + $mclist_demo.destroy + $mclist_demo = nil +end + +$mclist_demo = TkToplevel.new {|w| + title("Multi-Column List") + iconname("mclist") + positionWindow(w) +} + +base_frame = TkFrame.new($mclist_demo).pack(:fill=>:both, :expand=>true) + +## Explanatory text +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', + :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6], + :text=><:x) +Ttk¤È¤Ï¡¤¥Æ¡¼¥Þ»ØÄê²Äǽ¤Ê¿·¤·¤¤¥¦¥£¥¸¥§¥Ã¥È½¸¹ç¤Ç¤¹¡¥\ +Ttk::Treeview¥¦¥£¥¸¥§¥Ã¥È¤Ï\ +Ttk¥¦¥£¥¸¥§¥Ã¥È¥»¥Ã¥È¤Ë´Þ¤Þ¤ì¤ë¥¦¥£¥¸¥§¥Ã¥È¤Î°ì¤Ä¤Ç¡¤\ +¤½¤ì¤¬ÊÝ»ý¤¹¤ëÌÚ¹½Â¤¤Î¥Ç¡¼¥¿¤½¤Î¤â¤Î¤Þ¤Ç¤Ïɽ¼¨¤¹¤ë¤³¤È¤Ê¤¯¡¤\ +¼¨¤·¤¿¤¤¾ðÊó¤ò¥Þ¥ë¥Á¥«¥é¥à¤Çɽ¼¨¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥ +¤³¤Î¥µ¥ó¥×¥ë¤Ï¡¤Ê£¿ô¤Î¥«¥é¥à¤ò»ý¤Ã¤¿¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤òºîÀ®¤¹¤ë´Êñ¤ÊÎã¤Ç¤¹¡¥ +³Æ¥«¥é¥à¤Î¥¿¥¤¥È¥ë(heading)¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¡¤\ +¤½¤Î¥«¥é¥à¤Î¾ðÊó¤Ë´ð¤Å¤¤¤Æ¥ê¥¹¥È¤ÎʤÙÂؤ¨¤¬¤Ê¤µ¤ì¤ë¤Ï¤º¤Ç¤¹¡¥\ +¤Þ¤¿¡¤¥«¥é¥à¤Î¥¿¥¤¥È¥ë´Ö¤Î¶èÀÚ¤êÉôʬ¤ò¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¡¤\ +¥«¥é¥à¤ÎÉý¤òÊѹ¹¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡¥ +EOL + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'mclist'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $mclist_demo.destroy + $mclist_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +container = Ttk::Frame.new(base_frame) +tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency), + :show=>:headings) +if Tk.windowingsystem != 'aquq' + vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame)) +else + vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame)) +end + +container.pack(:fill=>:both, :expand=>true) +Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew') +Tk.grid(hsb, :in=>container, :sticky=>'nsew') +container.grid_columnconfigure(0, :weight=>1) +container.grid_rowconfigure(0, :weight=>1) + +## The data we're going to insert +data = [ + ['¥¢¥ë¥¼¥ó¥Á¥ó', '¥Ö¥¨¥Î¥¹¥¢¥¤¥ì¥¹', 'ARS'], + ['¥ª¡¼¥¹¥È¥é¥ê¥¢', '¥­¥ã¥ó¥Ù¥é', 'AUD'], + ['¥Ö¥é¥¸¥ë', '¥Ö¥é¥¸¥ê¥¢', 'BRL'], + ['¥«¥Ê¥À', '¥ª¥¿¥ï', 'CAD'], + ['Ãæ¹ñ', 'Ë̵þ', 'CNY'], + ['¥Õ¥é¥ó¥¹', '¥Ñ¥ê', 'EUR'], + ['¥É¥¤¥Ä', '¥Ù¥ë¥ê¥ó', 'EUR'], + ['¥¤¥ó¥É', '¥Ë¥å¡¼¥Ç¥ê¡¼', 'INR'], + ['¥¤¥¿¥ê¥¢', '¥í¡¼¥Þ', 'EUR'], + ['ÆüËÜ', 'Åìµþ', 'JPY'], + ['¥á¥­¥·¥³', '¥á¥­¥·¥³¥·¥Æ¥£', 'MXN'], + ['¥í¥·¥¢', '¥â¥¹¥¯¥ï', 'RUB'], + ['Æ¥Õ¥ê¥«', '¥×¥ì¥È¥ê¥¢', 'ZAR'], + ['±Ñ¹ñ', '¥í¥ó¥É¥ó', 'GBP'], + ['¥¢¥á¥ê¥«', '¥ï¥·¥ó¥È¥ó D.C.', 'USD'], +] + +## Code to insert the data nicely +font = Ttk::Style.lookup(tree[:style], :font) +cols = %w(country capital currency) +cols.zip(%w(¹ñ̾ ¼óÅÔ Ä̲ß)).each{|col, name| + tree.heading_configure(col, :text=>name, + :command=>proc{sort_by(tree, col, false)}) + tree.column_configure(col, :width=>TkFont.measure(font, name)) +} + +data.each{|country, capital, currency| + #tree.insert('', :end, :values=>[country, capital, currency]) + tree.insert(nil, :end, :values=>[country, capital, currency]) + cols.zip([country, capital, currency]).each{|col, val| + len = TkFont.measure(font, "#{val} ") + if tree.column_cget(col, :width) < len + tree.column_configure(col, :width=>len) + end + } +} + +## Code to do the sorting of the tree contents when clicked on +def sort_by(tree, col, direction) + tree.children(nil).map!{|row| [tree.get(row, col), row.id]} . + sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) . + each_with_index{|info, idx| tree.move(info[1], nil, idx)} + + tree.heading_configure(col, :command=>proc{sort_by(tree, col, ! direction)}) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu.rb new file mode 100644 index 0000000..c3d9517 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu.rb @@ -0,0 +1,201 @@ +# -*- coding: euc-jp -*- +# +# menus widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($menu_demo) && $menu_demo + $menu_demo.destroy + $menu_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$menu_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("menu") + positionWindow(w) +} + +base_frame = TkFrame.new($menu_demo).pack(:fill=>:both, :expand=>true) + +# menu frame À¸À® +$menu_frame = TkFrame.new(base_frame, 'relief'=>'raised', 'bd'=>2) +$menu_frame.pack('side'=>'top', 'fill'=>'x') + +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤ÏÍÍ¡¹¤Ê¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Command-X ¤òÆþÎϤ¹¤ë¤È¡¢X¤¬¥³¥Þ¥ó¥É¥­¡¼µ­¹æ¤Ë³¤¤¤Æɽ¼¨¤µ¤ì¤Æ¤¤¤ëʸ»ú¤Ê¤é¤Ð¡¢¥¢¥¯¥»¥é¥ì¡¼¥¿¤ò»È¤Ã¤¿¹àÌܵ¯Æ°¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼Í×ÁÇÃæ¡¢ºÇ¸å¤Î¤â¤Î¤Ï¡¢¤½¤Î¥á¥Ë¥å¡¼¤ÎºÇ½é¤Î¹àÌܤòÁªÂò¤¹¤ë¤³¤È¤ÇÆÈΩ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£") + else + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤ÏÍÍ¡¹¤Ê¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Alt-X ¤òÆþÎϤ¹¤ë¤È¡¢X¤¬¥á¥Ë¥å¡¼¤Ë¥¢¥ó¥À¡¼¥é¥¤¥óÉÕ¤­¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ëʸ»ú¤Ê¤é¤Ð¡¢¥­¡¼¥Ü¡¼¥É¤«¤é¤Î»ØÄ꤬¤Ç¤­¤Þ¤¹¡£Ìð°õ¥­¡¼¤Ç¥á¥Ë¥å¡¼¤Î¥È¥é¥Ð¡¼¥¹¤â²Äǽ¤Ç¤¹¡£¥á¥Ë¥å¡¼¤¬»ØÄꤵ¤ì¤¿ºÝ¤Ë¤Ï¡¢¥¹¥Ú¡¼¥¹¥­¡¼¤Ç¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¢¤ë¤¤¤Ï¡¢¥¢¥ó¥À¡¼¥é¥¤¥óÉÕ¤­¤Îʸ»ú¤òÆþÎϤ¹¤ë¤³¤È¤Ç¤â¼Â¹Ô¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼¤Î¥¨¥ó¥È¥ê¤¬¥¢¥¯¥»¥é¥ì¡¼¥¿¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤½¤Î¥¢¥¯¥»¥é¥ì¡¼¥¿¤òÆþÎϤ¹¤ë¤³¤È¤Ç¥á¥Ë¥å¡¼¤ò»ØÄꤹ¤ë¤³¤È¤Ê¤·¤Ë¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼Í×ÁÇÃæ¡¢ºÇ¸å¤Î¤â¤Î¤Ï¡¢¤½¤Î¥á¥Ë¥å¡¼¤ÎºÇ½é¤Î¹àÌܤòÁªÂò¤¹¤ë¤³¤È¤ÇÆÈΩ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£") + end +}.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $menu_demo + $menu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'menu'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# menu À¸À® +TkMenubutton.new($menu_frame, 'text'=>'File', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|file_menu| + m.configure('menu'=>file_menu) + add('command', 'label'=>'³«¤¯ ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"³«¤¯ ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'¿·µ¬', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¿·µ¬"¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Êݸ', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"Êݸ"¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Êݸ(»ØÄê) ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"Êݸ(»ØÄê) ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'¥×¥ê¥ó¥ÈÀßÄê ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¥×¥ê¥ó¥ÈÀßÄê ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'¥×¥ê¥ó¥È ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¥×¥ê¥ó¥È ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'½ªÎ»', 'command'=>proc{$menu_demo.destroy}) + } +} + +if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + modifier = 'Command' +elsif $tk_platform['platform'] == 'windows' + modifier = 'Control' +else + modifier = 'Meta' +end + +TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|basic_menu| + m.configure('menu'=>basic_menu) + add('command', 'label'=>'²¿¤â¤·¤Ê¤¤Ä¹¤¤¥¨¥ó¥È¥ê') + ['A','B','C','D','E','F','G'].each{|c| + # add('command', 'label'=>"ʸ»ú \"#{c}\" ¤ò°õ»ú", 'underline'=>4, + add('command', 'label'=>"Print letter \"#{c}\" (ʸ»ú \"#{c}\" ¤ò°õ»ú)", + 'underline'=>14, 'accelerator'=>"Meta+#{c}", + 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") + $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|cascade_menu| + m.configure('menu'=>cascade_menu) + add('command', 'label'=>'Print hello(¤³¤ó¤Ë¤Á¤Ï)', + 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"}, + 'accelerator'=>"#{modifier}+H", 'underline'=>6) + $menu_demo.bind("#{modifier}-h", proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"}) + add('command', 'label'=>'Print goodbye(¤µ¤è¤¦¤Ê¤é)', + 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"}, + 'accelerator'=>"#{modifier}+G", 'underline'=>6) + $menu_demo.bind("#{modifier}-g", proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"}) + + # TkMenu.new(m, 'tearoff'=>false) {|cascade_check| + TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_check| + cascade_menu.add('cascade', 'label'=>'Check buttons(¥Á¥§¥Ã¥¯¥Ü¥¿¥ó)', + 'menu'=>cascade_check, 'underline'=>0) + oil = TkVariable.new(0) + add('check', 'label'=>'¥ª¥¤¥ëÅÀ¸¡', 'variable'=>oil) + trans = TkVariable.new(0) + add('check', 'label'=>'¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', 'variable'=>trans) + brakes = TkVariable.new(0) + add('check', 'label'=>'¥Ö¥ì¡¼¥­ÅÀ¸¡', 'variable'=>brakes) + lights = TkVariable.new(0) + add('check', 'label'=>'¥é¥¤¥ÈÅÀ¸¡', 'variable'=>lights) + add('separator') + add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨', + 'command'=>proc{showVars($menu_demo, + ['¥ª¥¤¥ëÅÀ¸¡', oil], + ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans], + ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes], + ['¥é¥¤¥ÈÅÀ¸¡', lights])} ) + invoke 1 + invoke 3 + } + + #TkMenu.new(m, 'tearoff'=>false) {|cascade_radio| + TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_radio| + cascade_menu.add('cascade', 'label'=>'Radio buttons(¥é¥¸¥ª¥Ü¥¿¥ó)', + 'menu'=>cascade_radio, 'underline'=>0) + pointSize = TkVariable.new + add('radio', 'label'=>'10 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>10) + add('radio', 'label'=>'14 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>14) + add('radio', 'label'=>'18 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>18) + add('radio', 'label'=>'24 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>24) + add('radio', 'label'=>'32 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>32) + add('separator') + style = TkVariable.new + add('radio', 'label'=>'¥í¡¼¥Þ¥ó', 'variable'=>style, 'value'=>'roman') + add('radio', 'label'=>'¥Ü¡¼¥ë¥É', 'variable'=>style, 'value'=>'bold') + add('radio', 'label'=>'¥¤¥¿¥ê¥Ã¥¯', 'variable'=>style, 'value'=>'italic') + add('separator') + add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨', + 'command'=>proc{showVars($menu_demo, + ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize], + ['¥¹¥¿¥¤¥ë', style])} ) + invoke 1 + invoke 7 + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|icon_menu| + m.configure('menu'=>icon_menu) + add('command', + 'bitmap'=>'@'+[$demo_dir,'..', + 'images','pattern.xbm'].join(File::Separator), + 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry', + 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£', + 'bitmap'=>'', 'default'=>0, + 'buttons'=>'λ²ò')} ) + ['info', 'questhead', 'error'].each{|icon| + add('command', 'bitmap'=>icon, + 'command'=>proc{print "You invoked the #{icon} bitmap\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m, 'tearoff'=>false) {|more_menu| + m.configure('menu'=>more_menu) + [ '¥¨¥ó¥È¥ê','Ê̤Υ¨¥ó¥È¥ê','²¿¤â¤·¤Ê¤¤','¤Û¤È¤ó¤É²¿¤â¤·¤Ê¤¤', + '¿ÍÀ¸¤ò°ÕµÁ¤¢¤ë¤â¤Î¤Ë' ].each{|i| + add('command', 'label'=>i, + 'command'=>proc{print "You invoked \"#{i}\"\n"}) + } + } +} + +TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m| + pack('side'=>'left') + TkMenu.new(m) {|colors_menu| + m.configure('menu'=>colors_menu) + ['red', 'orange', 'yellow', 'green', 'blue'].each{|c| + add('command', 'label'=>c, 'background'=>c, + 'command'=>proc{print "You invoked \"#{c}\"\n"}) + } + } +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu84.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu84.rb new file mode 100644 index 0000000..a631bac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu84.rb @@ -0,0 +1,213 @@ +# -*- coding: euc-jp -*- +# +# menus widget demo (called by 'widget') +# + +# toplevel widget +if defined?($menu84_demo) && $menu84_demo + $menu84_demo.destroy + $menu84_demo = nil +end + +# demo toplevel widget +$menu84_demo = TkToplevel.new {|w| + title("File Selection Dialogs") + iconname("menu84") + positionWindow(w) +} + +base_frame = TkFrame.new($menu84_demo).pack(:fill=>:both, :expand=>true) + +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + +# label +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤ò»ý¤Ä¥á¥Ë¥å¡¼¥Ð¡¼¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤Þ¤¹¡£Command+x ('x'¤Ï¥³¥Þ¥ó¥É¥­¡¼¥·¥ó¥Ü¥ë¤Ë³¤±¤Æɽ¼¨¤µ¤ì¤Æ¤¤¤ëʸ»ú¤Ç¤¹) ¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¤â¹àÌܤε¡Ç½¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ºÇ¸å¤Î¥á¥Ë¥å¡¼¤Ï¡¢¥Þ¥¦¥¹¤Ç¥¦¥£¥ó¥É¥¦¤Î³°¤Ë¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ÆÈΩ¤·¤¿¥Ñ¥ì¥Ã¥È¤È¤Ê¤ë¤è¤¦¤ËÀÚ¤êÊü¤¹¤³¤È¤¬²Äǽ¤Ç¤¹¡£") + else + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤ò»ý¤Ä¥á¥Ë¥å¡¼¥Ð¡¼¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤Þ¤¹¡£Alt+x ('x'¤Ï¥á¥Ë¥å¡¼¾å¤Ç²¼Àþ¤¬°ú¤«¤ì¤¿Ê¸»ú¤Ç¤¹) ¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¤â¥á¥Ë¥å¡¼¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Ìð°õ¥­¡¼¤ò»È¤Ã¤Æ¡¢¥á¥Ë¥å¡¼´Ö¤ò°ÜÆ°¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£¥á¥Ë¥å¡¼¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ë»þ¤Ë¤Ï¡¢¸½ºß°ÌÃ֤ιàÌܤò¥¹¥Ú¡¼¥¹¥­¡¼¤ÇÁªÂò¤·¤¿¤ê¡¢²¼Àþ¤¬°ú¤«¤ì¤¿Ê¸»ú¤òÆþÎϤ¹¤ë¤³¤È¤Ç¤½¤Î¹àÌܤòÁªÂò¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤â¤·¹àÌܤ˥¢¥¯¥»¥é¥ì¡¼¥¿¤Î»ØÄ꤬¤Ê¤µ¤ì¤Æ¤¤¤¿¤Ê¤é¤Ð¡¢¤½¤Î»ØÄꤵ¤ì¤¿¥­¡¼ÆþÎϤò¹Ô¤¦¤³¤È¤Ç¡¢¥á¥Ë¥å¡¼¤òɽ¼¨¤µ¤»¤ë¤³¤È¤Ê¤¯Ä¾Àܤ½¤Î¹àÌܤε¡Ç½¤ò¸Æ¤Ó½Ð¤»¤Þ¤¹¡£ºÇ¸å¤Î¥á¥Ë¥å¡¼¤Ï¡¢¥á¥Ë¥å¡¼¤ÎºÇ½é¤Î¹àÌܤòÁªÂò¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ÆÈΩ¤·¤¿¥Ñ¥ì¥Ã¥È¤È¤Ê¤ë¤è¤¦¤ËÀÚ¤êÊü¤¹¤³¤È¤¬²Äǽ¤Ç¤¹¡£") + end +}.pack('side'=>'top') + + +menustatus = TkVariable.new(" ") +TkFrame.new(base_frame) {|frame| + TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken', + 'bd'=>1, 'font'=>['Helvetica', '10'], + 'anchor'=>'w').pack('side'=>'left', 'padx'=>2, + 'expand'=>true, 'fill'=>'both') + pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2) +} + + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $menu84_demo + $menu84_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'menu84'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +# create menu frame +$menu84_frame = TkMenu.new($menu84_demo, 'tearoff'=>false) + +# menu +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'File', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Open...', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"Open..." ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'New', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"New" ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Save', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"Save" ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Save As...', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"Save As..." ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'Print Setup...', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"Print Setup..." ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Print...', 'command'=>proc{fail '¤³¤ì¤Ïñ¤Ê¤ë¥Ç¥â¤Ç¤¹¤«¤é¡¢"Print..." ¹àÌܤε¡Ç½¤ÏÆäËÄêµÁ¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'Dismiss Menus Demo', 'command'=>proc{$menu84_demo.destroy}) +} + +if $tk_platform['platform'] == 'macintosh' || + windowingsystem = "classic" || windowingsystem = "aqua" + modifier = 'Command' +elsif $tk_platform['platform'] == 'windows' + modifier = 'Control' +else + modifier = 'Meta' +end + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Basic', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Long entry that does nothing') + ['A','B','C','D','E','F','G'].each{|c| + add('command', 'label'=>"Print letter \"#{c}\"", + 'underline'=>14, 'accelerator'=>"Meta+#{c}", + 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") + $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) + } +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Cascades', 'menu'=>m, 'underline'=>0) + add('command', 'label'=>'Print hello', + 'command'=>proc{print "Hello\n"}, + 'accelerator'=>"#{modifier}+H", 'underline'=>6) + $menu84_demo.bind("#{modifier}-h", proc{print "Hello\n"}) + add('command', 'label'=>'Print goodbye', + 'command'=>proc{print "Goodbye\n"}, + 'accelerator'=>"#{modifier}+G", 'underline'=>6) + $menu84_demo.bind("#{modifier}-g", proc{print "Goodbye\n"}) + + TkMenu.new(m, 'tearoff'=>false) {|cascade_check| + m.add('cascade', 'label'=>'Check button', + 'menu'=>cascade_check, 'underline'=>0) + oil = TkVariable.new(0) + add('check', 'label'=>'¥ª¥¤¥ë¸¡ºº', 'variable'=>oil) + trans = TkVariable.new(0) + add('check', 'label'=>'¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥ó¸¡ºº', 'variable'=>trans) + brakes = TkVariable.new(0) + add('check', 'label'=>'¥Ö¥ì¡¼¥­¸¡ºº', 'variable'=>brakes) + lights = TkVariable.new(0) + add('check', 'label'=>'¥é¥¤¥È¸¡ºº', 'variable'=>lights) + add('separator') + add('command', 'label'=>'Show current values', + 'command'=>proc{showVars($menu84_demo, + ['¥ª¥¤¥ë', oil], + ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥ó', trans], + ['¥Ö¥ì¡¼¥­', brakes], + ['¥é¥¤¥È', lights])} ) + invoke 1 + invoke 3 + } + + TkMenu.new(m, 'tearoff'=>false) {|cascade_radio| + m.add('cascade', 'label'=>'Radio buttons', + 'menu'=>cascade_radio, 'underline'=>0) + pointSize = TkVariable.new + add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10) + add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14) + add('radio', 'label'=>'18 point', 'variable'=>pointSize, 'value'=>18) + add('radio', 'label'=>'24 point', 'variable'=>pointSize, 'value'=>24) + add('radio', 'label'=>'32 point', 'variable'=>pointSize, 'value'=>32) + add('separator') + style = TkVariable.new + add('radio', 'label'=>'Roman', 'variable'=>style, 'value'=>'roman') + add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold') + add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic') + add('separator') + add('command', 'label'=>'¸½ºßÃͤÎɽ¼¨', + 'command'=>proc{showVars($menu84_demo, + ['pointSize', pointSize], + ['style', style])} ) + invoke 1 + invoke 7 + } +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0) + add('command', 'hidemargin'=>1, + 'bitmap'=>'@'+[$demo_dir,'..', + 'images','pattern.xbm'].join(File::Separator), + 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry', + 'text'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢Ê¸»úÎó¤ÎÂå¤ï¤ê¤Ë¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Ç¹àÌܤòɽ¼¨¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£', + 'bitmap'=>'', 'default'=>0, + 'buttons'=>'ÊĤ¸¤ë')} ) + ['info', 'questhead', 'error'].each{|icon| + add('command', 'bitmap'=>icon, 'hidemargin'=>1, + 'command'=>proc{print "You invoked the #{icon} bitmap\n"}) + } + + entryconfigure(2, :columnbreak=>true) +} + +TkMenu.new($menu84_frame, 'tearoff'=>false) {|m| + $menu84_frame.add('cascade', 'label'=>'More', 'menu'=>m, 'underline'=>0) + [ 'An entry','Another entry','Does nothing','Does almost nothing', + 'Make life meaningful' ].each{|i| + add('command', 'label'=>i, + 'command'=>proc{print "You invoked \"#{i}\"\n"}) + } + + m.entryconfigure('Does almost nothing', + 'bitmap'=>'questhead', 'compound'=>'left', + 'command'=>proc{ + TkDialog.new('title'=>'Compound Menu Entry', + 'message'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Èʸ»úÎó¤È¤òƱ»þ¤Ë°ì¤Ä¤Î¹àÌܤËɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£', + 'buttons'=>['λ²ò'], 'bitmap'=>'') + }) +} + +TkMenu.new($menu84_frame) {|m| + $menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0) + ['red', 'orange', 'yellow', 'green', 'blue'].each{|c| + add('command', 'label'=>c, 'background'=>c, + 'command'=>proc{print "You invoked \"#{c}\"\n"}) + } +} + +$menu84_demo.menu($menu84_frame) + +TkMenu.bind('', proc{|w| + begin + label = w.entrycget('active', 'label') + rescue + label = " " + end + menustatus.value = label + Tk.update(true) + }, '%W') diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu8x.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu8x.rb new file mode 100644 index 0000000..9249f24 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menu8x.rb @@ -0,0 +1,233 @@ +# -*- coding: euc-jp -*- +# +# menus widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($menu8x_demo) && $menu8x_demo + $menu8x_demo.destroy + $menu8x_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$menu8x_demo = TkToplevel.new {|w| + title("Menu Demonstration (Tk8.x)") + iconname("menu") + positionWindow(w) +} + +base_frame = TkFrame.new($menu8x_demo).pack(:fill=>:both, :expand=>true) + +# version check +if $tk_version.to_f < 8.0 + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + text("¼Â¹Ô¤·¤è¤¦¤È¤·¤¿¥¹¥¯¥ê¥×¥È¤Ï Tk8.0 °Ê¾å¤ÇÍøÍѤǤ­¤ëµ¡Ç½¤òÍøÍѤ·¤Æ¤¤¤ë¤¿¤á¡¢¤¢¤Ê¤¿¤Î Ruby#{VERSION}/Tk#{$tk_version}#{(Tk::JAPANIZED_TK)? 'jp': ''} ¤Ç¤ÏÀµ¾ï¤Ë¼Â¹Ô¤Ç¤­¤Þ¤»¤ó¡£¤è¤Ã¤Æ¥Ç¥â¤Î¼Â¹Ô¤òÃæ»ß¤·¤Þ¤·¤¿¡£¤¿¤À¤·¡¢²¼¤Î¥³¡¼¥É»²¾È¥Ü¥¿¥ó¤ò²¡¤¹¤³¤È¤Ç¡¢¼Â¹Ô¤¬Ãæ»ß¤µ¤ì¤¿¥¹¥¯¥ê¥×¥È¤Î¥½¡¼¥¹¤ò»²¾È¤¹¤ë¤³¤È¤Ï²Äǽ¤Ç¤¹¡£") +}.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $menu8x_demo + $menu8x_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'menu8x'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +else ; # Tk8.x + +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤ÏÍÍ¡¹¤Ê¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Command-X ¤òÆþÎϤ¹¤ë¤È¡¢X¤¬¥³¥Þ¥ó¥É¥­¡¼µ­¹æ¤Ë³¤¤¤Æɽ¼¨¤µ¤ì¤Æ¤¤¤ëʸ»ú¤Ê¤é¤Ð¡¢¥¢¥¯¥»¥é¥ì¡¼¥¿¤ò»È¤Ã¤¿¹àÌܵ¯Æ°¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼Í×ÁÇÃæ¡¢ºÇ¸å¤Î¤â¤Î¤Ï¡¢¤½¤Î¥á¥Ë¥å¡¼¤ÎºÇ½é¤Î¹àÌܤòÁªÂò¤¹¤ë¤³¤È¤ÇÆÈΩ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£") + else + text("¤³¤Î¥¦¥£¥ó¥É¥¦¤ÏÍÍ¡¹¤Ê¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¥á¥Ë¥å¡¼¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Alt-X ¤òÆþÎϤ¹¤ë¤È¡¢X¤¬¥á¥Ë¥å¡¼¤Ë¥¢¥ó¥À¡¼¥é¥¤¥óÉÕ¤­¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ëʸ»ú¤Ê¤é¤Ð¡¢¥­¡¼¥Ü¡¼¥É¤«¤é¤Î»ØÄ꤬¤Ç¤­¤Þ¤¹¡£Ìð°õ¥­¡¼¤Ç¥á¥Ë¥å¡¼¤Î¥È¥é¥Ð¡¼¥¹¤â²Äǽ¤Ç¤¹¡£¥á¥Ë¥å¡¼¤¬»ØÄꤵ¤ì¤¿ºÝ¤Ë¤Ï¡¢¥¹¥Ú¡¼¥¹¥­¡¼¤Ç¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¢¤ë¤¤¤Ï¡¢¥¢¥ó¥À¡¼¥é¥¤¥óÉÕ¤­¤Îʸ»ú¤òÆþÎϤ¹¤ë¤³¤È¤Ç¤â¼Â¹Ô¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼¤Î¥¨¥ó¥È¥ê¤¬¥¢¥¯¥»¥é¥ì¡¼¥¿¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤½¤Î¥¢¥¯¥»¥é¥ì¡¼¥¿¤òÆþÎϤ¹¤ë¤³¤È¤Ç¥á¥Ë¥å¡¼¤ò»ØÄꤹ¤ë¤³¤È¤Ê¤·¤Ë¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¥Ë¥å¡¼Í×ÁÇÃæ¡¢ºÇ¸å¤Î¤â¤Î¤Ï¡¢¤½¤Î¥á¥Ë¥å¡¼¤ÎºÇ½é¤Î¹àÌܤòÁªÂò¤¹¤ë¤³¤È¤ÇÆÈΩ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£") + end +}.pack('side'=>'top') + +# ¾õÂÖɽ¼¨¤ÎÀ¸À® +$menu8xstatus = TkVariable.new(" ") +TkFrame.new(base_frame) {|frame| + TkLabel.new(frame, 'textvariable'=>$menu8xstatus, 'relief'=>'sunken', + 'bd'=>1, 'font'=>['Helvetica', '10'], 'anchor'=>'w')\ + .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2) + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $menu8x_demo + $menu8x_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'menu8x'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# menu À¸À® +TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m| + TkMenu.new(m, 'tearoff'=>false) {|file_menu| + m.add('cascade', 'label'=>'File', 'menu'=>file_menu, 'underline'=>0) + add('command', 'label'=>'³«¤¯ ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"³«¤¯ ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'¿·µ¬', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¿·µ¬"¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Êݸ', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"Êݸ"¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'Êݸ(»ØÄê) ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"Êݸ(»ØÄê) ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'¥×¥ê¥ó¥ÈÀßÄê ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¥×¥ê¥ó¥ÈÀßÄê ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('command', 'label'=>'¥×¥ê¥ó¥È ...', 'command'=>proc{fail '¤³¤ì¤Ï¡¢¥Ç¥â¤Ç¤¹¤Î¤Ç"¥×¥ê¥ó¥È ..."¤ËÂФ¹¤ë¥¢¥¯¥·¥ç¥ó¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£'}) + add('separator') + add('command', 'label'=>'½ªÎ»', 'command'=>proc{$menu8x_demo.destroy}) + } + + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" + modifier = 'Command' + elsif $tk_platform['platform'] == 'windows' + modifier = 'Control' + else + modifier = 'Meta' + end + + TkMenu.new(m, 'tearoff'=>false) {|basic_menu| + m.add('cascade', 'label'=>'Basic', 'menu'=>basic_menu, 'underline'=>0) + add('command', 'label'=>'²¿¤â¤·¤Ê¤¤Ä¹¤¤¥¨¥ó¥È¥ê') + ['A','B','C','D','E','F','G'].each{|c| + # add('command', 'label'=>"ʸ»ú \"#{c}\" ¤ò°õ»ú", 'underline'=>4, + add('command', 'label'=>"Print letter \"#{c}\" (ʸ»ú \"#{c}\" ¤ò°õ»ú)", + 'underline'=>14, 'accelerator'=>"Meta+#{c}", + 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") + $menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) + } + } + + TkMenu.new(m, 'tearoff'=>false) {|cascade_menu| + m.add('cascade', 'label'=>'Cascades', 'menu'=>cascade_menu, 'underline'=>0) + add('command', 'label'=>'Print hello(¤³¤ó¤Ë¤Á¤Ï)', + 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"}, + 'accelerator'=>"#{modifier}+H", 'underline'=>6) + $menu8x_demo.bind("#{modifier}-h", proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"}) + add('command', 'label'=>'Print goodbye(¤µ¤è¤¦¤Ê¤é)', + 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"}, + 'accelerator'=>"#{modifier}+G", 'underline'=>6) + $menu8x_demo.bind("#{modifier}-g", proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"}) + + TkMenu.new(m, 'tearoff'=>false) {|cascade_check| + cascade_menu.add('cascade', 'label'=>'Check buttons(¥Á¥§¥Ã¥¯¥Ü¥¿¥ó)', + 'menu'=>cascade_check, 'underline'=>0) + oil = TkVariable.new(0) + add('check', 'label'=>'¥ª¥¤¥ëÅÀ¸¡', 'variable'=>oil) + trans = TkVariable.new(0) + add('check', 'label'=>'¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', 'variable'=>trans) + brakes = TkVariable.new(0) + add('check', 'label'=>'¥Ö¥ì¡¼¥­ÅÀ¸¡', 'variable'=>brakes) + lights = TkVariable.new(0) + add('check', 'label'=>'¥é¥¤¥ÈÅÀ¸¡', 'variable'=>lights) + add('separator') + add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨', + 'command'=>proc{showVars($menu8x_demo, + ['¥ª¥¤¥ëÅÀ¸¡', oil], + ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans], + ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes], + ['¥é¥¤¥ÈÅÀ¸¡', lights])} ) + invoke 1 + invoke 3 + } + + TkMenu.new(m, 'tearoff'=>false) {|cascade_radio| + cascade_menu.add('cascade', 'label'=>'Radio buttons(¥é¥¸¥ª¥Ü¥¿¥ó)', + 'menu'=>cascade_radio, 'underline'=>0) + pointSize = TkVariable.new + add('radio', 'label'=>'10 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>10) + add('radio', 'label'=>'14 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>14) + add('radio', 'label'=>'18 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>18) + add('radio', 'label'=>'24 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>24) + add('radio', 'label'=>'32 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>32) + add('separator') + style = TkVariable.new + add('radio', 'label'=>'¥í¡¼¥Þ¥ó', 'variable'=>style, 'value'=>'roman') + add('radio', 'label'=>'¥Ü¡¼¥ë¥É', 'variable'=>style, 'value'=>'bold') + add('radio', 'label'=>'¥¤¥¿¥ê¥Ã¥¯', 'variable'=>style, 'value'=>'italic') + add('separator') + add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨', + 'command'=>proc{showVars($menu8x_demo, + ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize], + ['¥¹¥¿¥¤¥ë', style])} ) + invoke 1 + invoke 7 + } + } + + TkMenu.new(m, 'tearoff'=>false) {|icon_menu| + m.add('cascade', 'label'=>'Icons', 'menu'=>icon_menu, 'underline'=>0) + add('command', + 'bitmap'=>'@'+[$demo_dir,'..', + 'images','pattern.xbm'].join(File::Separator), + 'hidemargin'=>1, + 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry', + 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£', + 'bitmap'=>'', 'default'=>0, + 'buttons'=>'λ²ò')} ) + ['info', 'questhead', 'error'].each{|icon| + add('command', 'bitmap'=>icon, 'hidemargin'=>1, + 'command'=>proc{print "You invoked the #{icon} bitmap\n"}) + } + + entryconfigure(2, 'columnbreak'=>1) + } + + TkMenu.new(m, 'tearoff'=>false) {|more_menu| + m.add('cascade', 'label'=>'More', 'menu'=>more_menu, 'underline'=>0) + [ '¥¨¥ó¥È¥ê','Ê̤Υ¨¥ó¥È¥ê','²¿¤â¤·¤Ê¤¤','¤Û¤È¤ó¤É²¿¤â¤·¤Ê¤¤', + '¿ÍÀ¸¤ò°ÕµÁ¤¢¤ë¤â¤Î¤Ë' ].each{|i| + add('command', 'label'=>i, + 'command'=>proc{print "You invoked \"#{i}\"\n"}) + } + } + + TkMenu.new(m) {|colors_menu| + m.add('cascade', 'label'=>'Colors', 'menu'=>colors_menu, 'underline'=>1) + ['red', 'orange', 'yellow', 'green', 'blue'].each{|c| + add('command', 'label'=>c, 'background'=>c, + 'command'=>proc{print "You invoked \"#{c}\"\n"}) + } + } + + $menu8x_demo.configure('menu'=>m) +} + +TkMenu.bind('', + proc{|w| + begin + label = w.entrycget('active', 'label') + rescue + label = ' ' + end + $menu8xstatus.value = label + Tk.update('idletasks') + }, '%W') + +end ; # Tk 8.x diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menubu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menubu.rb new file mode 100644 index 0000000..90dc367 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/menubu.rb @@ -0,0 +1,238 @@ +# -*- coding: euc-jp -*- +require "tkcanvas" + +def optionMenu(menubutton, varName, firstValue, *rest) + varName.value = firstValue + configoptions = {'textvariable'=>varName,'indicatoron'=>'on', + 'relief'=>'raised','borderwidth'=>2,'highlightthickness'=>2, + 'anchor'=>'c','direction'=>'flush'} + configoptions.each {|key, value| + menubutton.configure(key, value) + } + menu = TkMenu.new(menubutton) { + tearoff 'off' + add 'radio', 'label'=>firstValue, 'variable'=>varName + } + menubutton.menu(menu) + for i in rest + menu.add 'radio', 'label'=>i, 'variable'=>varName + end + + return menu +end + +if defined?($menubu_demo) && $menubu_demo + $menubu_demo.destroy + $menubu_demo = nil +end + +$menubu_demo = TkToplevel.new {|w| + title("Menu Button Demonstration") + iconname("menubutton") +} + +positionWindow($menubu_demo) + +base_frame = TkFrame.new($menubu_demo).pack(:fill=>:both, :expand=>true) + +# version check +if $tk_version.to_f < 8.0 + +# label À¸À® +TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { + text("¼Â¹Ô¤·¤è¤¦¤È¤·¤¿¥¹¥¯¥ê¥×¥È¤Ï Tk8.0 °Ê¾å¤ÇÍøÍѤǤ­¤ëµ¡Ç½¤òÍøÍѤ·¤Æ¤¤¤ë¤¿¤á¡¢¤¢¤Ê¤¿¤Î Ruby#{VERSION}/Tk#{$tk_version}#{(Tk::JAPANIZED_TK)? 'jp': ''} ¤Ç¤ÏÀµ¾ï¤Ë¼Â¹Ô¤Ç¤­¤Þ¤»¤ó¡£¤è¤Ã¤Æ¥Ç¥â¤Î¼Â¹Ô¤òÃæ»ß¤·¤Þ¤·¤¿¡£¤¿¤À¤·¡¢²¼¤Î¥³¡¼¥É»²¾È¥Ü¥¿¥ó¤ò²¡¤¹¤³¤È¤Ç¡¢¼Â¹Ô¤¬Ãæ»ß¤µ¤ì¤¿¥¹¥¯¥ê¥×¥È¤Î¥½¡¼¥¹¤ò»²¾È¤¹¤ë¤³¤È¤Ï²Äǽ¤Ç¤¹¡£") +}.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $menubu_demo + $menubu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'menubu'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +else ; # Tk8.x + +body = TkFrame.new(base_frame) +body.pack('expand'=>'yes', 'fill'=>'both') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +below = TkMenubutton.new(body) { + text "Below" + underline 0 + direction 'below' + relief 'raised' +} +belowMenu = TkMenu.new(below) { + tearoff 0 + add 'command', 'label'=>"Below menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Below menu.\""} + add 'command', 'label'=>"Below menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Below menu.\""} +} +below.menu(belowMenu) +below.grid('row'=>0, 'column'=>1, 'sticky'=>'n') + +right = TkMenubutton.new(body) { + text "Right" + underline 0 + direction 'right' + relief 'raised' +} +rightMenu = TkMenu.new(right) { + tearoff 0 + add 'command', 'label'=>"Right menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""} + add 'command', 'label'=>"Right menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Right menu.\""} +} +right.menu(rightMenu) +right.grid('row'=>1, 'column'=>0, 'sticky'=>'w') + +left = TkMenubutton.new(body) { + text "Left" + underline 0 + direction 'left' + relief 'raised' +} +leftMenu = TkMenu.new(left) { + tearoff 0 + add 'command', 'label'=>"Left menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Left menu.\""} + add 'command', 'label'=>"Left menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Left menu.\""} +} +left.menu(leftMenu) +left.grid('row'=>1, 'column'=>2, 'sticky'=>'e') + +center = TkFrame.new(body) { + grid('row'=>1, 'column'=>1, 'sticky'=>'news') +} + +above = TkMenubutton.new(body) { + text "Above" + underline 0 + direction 'above' + relief 'raised' +} +aboveMenu = TkMenu.new(above) { + tearoff 0 + add 'command', 'label'=>"Above menu: first item", 'command'=>proc {puts "\"You have selected the first item from the Above menu.\""} + add 'command', 'label'=>"Above menu: second item", 'command'=>proc {puts "\"You have selected the second item from the Above menu.\""} +} +above.menu(aboveMenu) +above.grid('row'=>2, 'column'=>1, 'sticky'=>'s') + +center = TkFrame.new(body) { + grid('row'=>1, 'column'=>1, 'sticky'=>'news') +} + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc { + tmppath = $menubu_demo + $menubu_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc { showCode 'menubu' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'expand'=>'yes', 'fill'=>'x', 'pady'=>'2m') + +msg = TkLabel.new(center) { +# font $font + wraplength '4i' + justify 'left' + text "¤³¤ì¤Ï¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤Î¥Ç¥â¤Ç¤¹¡£\"Below\"¤Î¥Ü¥¿¥ó¤Ï\ +²¼¤Ë¥á¥Ë¥å¡¼¤ò½Ð¤·¡¢\"Right\"¤Î¥Ü¥¿¥ó¤Ï±¦¤Ë¥á¥Ë¥å¡¼¤ò½Ð¤·¤Æ¡¢\ +¡Ä¡Ä¤È¤Ê¤ê¤Þ¤¹¡£¤³¤Îʸ¾Ï¤Î²¼¤Ë¤Ï2¤Ä¤Î¥ª¥×¥·¥ç¥ó¥á¥Ë¥å¡¼¤¬¤¢¤ê¤Þ¤¹¡£\ +1¤Ä¤ÏÉáÄ̤Υá¥Ë¥å¡¼¤Ç¡¢¤â¤¦1¤Ä¤Ï16¿§¤Î¥Ñ¥ì¥Ã¥È¤Ç¤¹¡£" +} +msg.pack('side'=>'top', 'padx'=>25, 'pady'=>25) + +TkFrame.new(center) {|f| + menubuttonoptions = TkVariable.new + mbutton = TkMenubutton.new(f) + options = optionMenu(mbutton, menubuttonoptions, + 'one', 'two', 'three') + mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25) + paletteColor = TkVariable.new + colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75', + 'Red','Green','Blue','gray50','Yellow','Cyan','Magenta', + 'White','Brown','DarkSeaGreen','DarkViolet'] + colorMenuButton = TkMenubutton.new(f) + m = optionMenu(colorMenuButton, paletteColor, *colors) + begin + windowingsystem = Tk.windowingsystem() + rescue + windowingsystem = "" + end + if windowingsystem == "classic" || windowingsystem == "aqua" + topBorderColor = 'Black' + bottomBorderColor = 'Black' + else + topBorderColor = 'gray50' + bottomBorderColor = 'gray75' + end + for i in 0..15 + image = TkPhotoImage.new('height'=>16, 'width'=>16) + image.put(topBorderColor, 0, 0, 16, 1) + image.put(topBorderColor, 0, 1, 1, 16) + image.put(bottomBorderColor, 0, 15, 16, 16) + image.put(bottomBorderColor, 15, 1, 16, 16) + image.put(colors[i], 1, 1, 15, 15) + + selectimage = TkPhotoImage.new('height'=>16, 'width'=>16) + selectimage.put('Black', 0, 0, 16, 2) + selectimage.put('Black', 0, 2, 2, 16) + selectimage.put('Black', 2, 14, 16, 16) + selectimage.put('Black', 14, 2, 16, 14) + selectimage.put(colors[i], 2, 2, 14, 14) + + m.entryconfigure(i, 'image'=>image, 'selectimage'=>selectimage, 'hidemargin'=>'on') + end + m.configure('tearoff', 'on') + for c in ['Black', 'gray75', 'gray50', 'White'] + m.entryconfigure(c, 'columnbreak'=>1) + end + colorMenuButton.pack('side'=>'left', 'padx'=>25, 'pady'=>25) + pack 'padx'=>25, 'pady'=>25 +} + +end ; # Tk8.x diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox.rb new file mode 100644 index 0000000..88380e0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox.rb @@ -0,0 +1,89 @@ +# -*- coding: euc-jp -*- +# +# message boxes widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($msgbox_demo) && $msgbox_demo + $msgbox_demo.destroy + $msgbox_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$msgbox_demo = TkToplevel.new {|w| + title("Message Box Demonstration") + iconname("messagebox") + positionWindow(w) +} + +base_frame = TkFrame.new($msgbox_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"¤Þ¤ºÉ½¼¨¤¹¤ë¥¢¥¤¥³¥ó¤È¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Î¼ïÎà¤òÁª¤ó¤Ç²¼¤µ¤¤¡£¤½¤Î¸å¤Ë\"¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹\"¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢»ØÄꤷ¤¿¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£").pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $msgbox_demo + $msgbox_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'msgbox'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹' + command proc{showMessageBox $msgbox_demo} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +$msgbox_leftframe = TkFrame.new(base_frame) +$msgbox_rightframe = TkFrame.new(base_frame) +$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') +$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') + +TkLabel.new($msgbox_leftframe, 'text'=>'¥¢¥¤¥³¥ó').pack('side'=>'top') +TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxIcon = TkVariable.new('info') +['error', 'info', 'question', 'warning'].each {|icon| + TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon, + 'relief'=>'flat', 'value'=>icon, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +TkLabel.new($msgbox_rightframe, 'text'=>'¼ïÎà').pack('side'=>'top') +TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxType = TkVariable.new('ok') +['abortretryignore', 'ok', 'okcancel', + 'retrycancel', 'yesno', 'yesnocancel'].each {|type| + TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType, + 'relief'=>'flat', 'value'=>type, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +def showMessageBox(w) + button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value, + 'title'=>'Message', 'parent'=>w, + 'message'=>"¤³¤ì¤Ï\"#{$msgboxType.value}\"¤È¤¤¤¦¼ïÎà¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Ç¡¢\"#{$msgboxIcon.value}\"¤Î¥¢¥¤¥³¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£") + + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w, + 'message'=>"¤¢¤Ê¤¿¤Ï \"#{button}\" ¤ò²¡¤·¤Þ¤·¤¿¤Í¡£") +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox2.rb new file mode 100644 index 0000000..e2944c5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/msgbox2.rb @@ -0,0 +1,90 @@ +# -*- coding: euc-jp -*- +# +# message boxes widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($msgbox2_demo) && $msgbox2_demo + $msgbox2_demo.destroy + $msgbox2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$msgbox2_demo = TkToplevel.new {|w| + title("Message Box Demonstration") + iconname("messagebox") + positionWindow(w) +} + +base_frame = TkFrame.new($msgbox2_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"¤Þ¤ºÉ½¼¨¤¹¤ë¥¢¥¤¥³¥ó¤È¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Î¼ïÎà¤òÁª¤ó¤Ç²¼¤µ¤¤¡£¤½¤Î¸å¤Ë\"¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹\"¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢»ØÄꤵ¤ì¤¿·Á¼°¤Ç¡¢¥á¥Ã¥»¡¼¥¸¤È¾ÜºÙ¥Æ¥­¥¹¥È¤È¤ò»ý¤Ã¤¿¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£").pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $msgbox2_demo + $msgbox2_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'msgbox2'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹' + command proc{showMessageBox2 $msgbox2_demo} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +$msgbox_leftframe = TkFrame.new(base_frame) +$msgbox_rightframe = TkFrame.new(base_frame) +$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') +$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y', + 'pady'=>'.5c', 'padx'=>'.5c') + +TkLabel.new($msgbox_leftframe, 'text'=>'¥¢¥¤¥³¥ó').pack('side'=>'top') +TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxIcon = TkVariable.new('info') +['error', 'info', 'question', 'warning'].each {|icon| + TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon, + 'relief'=>'flat', 'value'=>icon, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +TkLabel.new($msgbox_rightframe, 'text'=>'¼ïÎà').pack('side'=>'top') +TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\ +.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no') + +$msgboxType = TkVariable.new('ok') +['abortretryignore', 'ok', 'okcancel', + 'retrycancel', 'yesno', 'yesnocancel'].each {|type| + TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType, + 'relief'=>'flat', 'value'=>type, 'width'=>16, + 'anchor'=>'w').pack('side'=>'top', 'pady'=>2, + 'anchor'=>'w', 'fill'=>'x') +} + +def showMessageBox2(w) + button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value, + 'title'=>'Message', 'parent'=>w, + 'message'=>"\"#{$msgboxType.value}\"¥¿¥¤¥×¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹", + 'detail'=>"¤³¤ì¤Ï\"#{$msgboxType.value}\"¤È¤¤¤¦¼ïÎà¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Ç¡¢\"#{$msgboxIcon.value}\"¤Î¥¢¥¤¥³¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£²¼¤Î¥Ü¥¿¥ó¤Î¤¤¤º¤ì¤«¤òÁªÂò¤·¤Æ¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£") + + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w, + 'message'=>"¤¢¤Ê¤¿¤Ï \"#{button}\" ¤ò²¡¤·¤Þ¤·¤¿¤Í¡£") +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned1.rb new file mode 100644 index 0000000..f994e83 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned1.rb @@ -0,0 +1,52 @@ +# -*- coding: euc-jp -*- +# +# paned1.rb +# +# This demonstration script creates a toplevel window containing +# a paned window that separates two windows horizontally. +# +# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp" + +if defined?($paned1_demo) && $paned1_demo + $paned1_demo.destroy + $paned1_demo = nil +end + +$paned1_demo = TkToplevel.new {|w| + title("Horizontal Paned Window Demonstration") + iconname("paned1") + positionWindow(w) +} + +base_frame = TkFrame.new($paned1_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +²¼¤Î¿§ÉÕ¤±¤µ¤ì¤¿Æó¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Î´Ö¤Î»ÅÀÚ¤êÏȤϡ¢°ì¤Ä¤ÎÎΰè¤ò¤½¤ì¤¾¤ì¤Î¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ëʬ³ä¤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£º¸¥Ü¥¿¥ó¤Ç»ÅÀÚ¤ê¤òÁàºî¤¹¤ë¤È¡¢Ê¬³ä¥µ¥¤¥ºÊѹ¹¤ÎÁàºîÅÓÃæ¤Ç¤ÏºÆɽ¼¨¤Ï¤Ê¤µ¤ì¤º¡¢³ÎÄꤵ¤»¤¿¤È¤­¤Ëɽ¼¨¤¬¹¹¿·¤µ¤ì¤Þ¤¹¡£¥Þ¥¦¥¹¤Ë¤è¤ë»ÅÀÚ¤ê¤ÎÁàºî¤ËÄɿ路¤Æ¥µ¥¤¥º¤òÊѹ¹¤·¤¿É½¼¨¤¬¤Ê¤ï¤ì¤ë¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥Þ¥¦¥¹¤ÎÃæ±û¥Ü¥¿¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ +¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤¬ panedwindow ¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤ +¾ì¹ç¡¢¤³¤Î¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤Ï panedwindow ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê +¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î Tk ¤òÁȤ߹ç¤ï¤»¤Æ»î¤¹ +¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $paned1_demo.destroy + $paned1_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'paned1' + }).pack(:side=>:left, :expand=>true) +} + +TkPanedwindow.new(base_frame, :orient=>:horizontal){|f| + add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'), + Tk::Label.new(f, :text=>"This is the\nright side", :bg=>'cyan')) + + pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m') +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned2.rb new file mode 100644 index 0000000..cdc8253 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/paned2.rb @@ -0,0 +1,100 @@ +# -*- coding: euc-jp -*- +# +# paned2.rb -- +# +# This demonstration script creates a toplevel window containing +# a paned window that separates two windows vertically. +# +# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp" + +if defined?($paned2_demo) && $paned2_demo + $paned2_demo.destroy + $paned2_demo = nil +end + +$paned2_demo = TkToplevel.new {|w| + title("Vertical Paned Window Demonstration") + iconname("paned2") + positionWindow(w) +} + +base_frame = TkFrame.new($paned2_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top) +²¼¤Î¥¹¥¯¥í¡¼¥ë¥Ð¡¼ÉÕ¤­¤Î¥¦¥£¥¸¥§¥Ã¥È¤¬ÃÖ¤«¤ì¤¿Æó¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Î´Ö¤Î»ÅÀÚ¤êÏȤϡ¢°ì¤Ä¤ÎÎΰè¤ò¤½¤ì¤¾¤ì¤Î¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ëʬ³ä¤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£º¸¥Ü¥¿¥ó¤Ç»ÅÀÚ¤ê¤òÁàºî¤¹¤ë¤È¡¢Ê¬³ä¥µ¥¤¥ºÊѹ¹¤ÎÁàºîÅÓÃæ¤Ç¤ÏºÆɽ¼¨¤Ï¤Ê¤µ¤ì¤º¡¢³ÎÄꤵ¤»¤¿¤È¤­¤Ëɽ¼¨¤¬¹¹¿·¤µ¤ì¤Þ¤¹¡£¥Þ¥¦¥¹¤Ë¤è¤ë»ÅÀÚ¤ê¤ÎÁàºî¤ËÄɿ路¤Æ¥µ¥¤¥º¤òÊѹ¹¤·¤¿É½¼¨¤¬¤Ê¤ï¤ì¤ë¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥Þ¥¦¥¹¤ÎÃæ±û¥Ü¥¿¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ +¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤¬ panedwindow ¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤ +¾ì¹ç¡¢¤³¤Î¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤Ï panedwindow ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê +¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î Tk ¤òÁȤ߹ç¤ï¤»¤Æ»î¤¹ +¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ +EOL + +# The bottom buttons +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $paned2_demo.destroy + $paned2_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'paned2' + }).pack(:side=>:left, :expand=>true) +} + +paneList = TkVariable.new # define as normal variable (not array) +paneList.value = [ # ruby's array --> tcl's list + 'Ruby/Tk ¤Î¥¦¥£¥¸¥§¥Ã¥È°ìÍ÷', + 'TkButton', + 'TkCanvas', + 'TkCheckbutton', + 'TkEntry', + 'TkFrame', + 'TkLabel', + 'TkLabelframe', + 'TkListbox', + 'TkMenu', + 'TkMenubutton', + 'TkMessage', + 'TkPanedwindow', + 'TkRadiobutton', + 'TkScale', + 'TkScrollbar', + 'TkSpinbox', + 'TkText', + 'TkToplevel' +] + +# Create the pane itself +TkPanedwindow.new(base_frame, :orient=>:vertical){|f| + pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m') + + add(TkFrame.new(f){|paned2_top| + TkListbox.new(paned2_top, :listvariable=>paneList) { + # Invert the first item to highlight it + itemconfigure(0, :background=>self.cget(:foreground), + :foreground=>self.cget(:background) ) + yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right, + :fill=>:y)) + pack(:fill=>:both, :expand=>true) + } + }, + + TkFrame.new(f, :height=>120) {|paned2_bottom| + # The bottom window is a text widget with scrollbar + paned2_xscr = TkScrollbar.new(paned2_bottom) + paned2_yscr = TkScrollbar.new(paned2_bottom) + paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) { + insert('1.0', '¤³¤³¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢' + + '¤´¤¯ÉáÄ̤Υƥ­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ç¤¹¡£') + xscrollbar(paned2_xscr) + yscrollbar(paned2_yscr) + } + Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew') + Tk.grid(paned2_xscr, :sticky=>'nsew') + TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1) + TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1) + } ) +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/pendulum.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/pendulum.rb new file mode 100644 index 0000000..b115f5b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/pendulum.rb @@ -0,0 +1,242 @@ +# -*- coding: euc-jp -*- +# +# This demonstration illustrates how Tcl/Tk can be used to construct +# simulations of physical systems. +# (called by 'widget') +# +# based on Tcl/Tk8.5a2 widget demos + +# destroy toplevel widget for this demo script +if defined?($pendulum_demo) && $pendulum_demo + $pendulum_demo.destroy + $pendulum_demo = nil +end + +# create toplevel widget +$pendulum_demo = TkToplevel.new {|w| + title("Pendulum Animation Demonstration") + iconname("pendulum") + positionWindow(w) +} + +base_frame = TkFrame.new($pendulum_demo).pack(:fill=>:both, :expand=>true) + +# create label +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text '¤³¤Î¥Ç¥â¤Ï¡¢ÊªÍý·Ï¤Î¥·¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ë´Ø¤ï¤ë¤è¤¦¤Ê¥¢¥Ë¥á¡¼¥·¥ç¥ó¼Â¹Ô¤¹¤ë¤¿¤á¤Ë Ruby/Tk ¤ò¤É¤Î¤è¤¦¤ËÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë¤«¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£º¸Â¦¤Î¥­¥ã¥ó¥Ð¥¹¤Ïñ½ã¤Ê¿¶¤ê»Ò¤Ç¤¢¤ëʪÍý·Ï¼«ÂΤΥ°¥é¥Õ¥£¥«¥ëɽ¸½¤Ç¤¢¤ë¤Î¤ËÂФ·¡¢±¦Â¦¤Î¥­¥ã¥ó¥Ð¥¹¤Ï·Ï¤Î°ÌÁê¶õ´Ö¤Î¥°¥é¥Õ¡Ê³Ñ®Å٤ȳÑÅ٤Ȥò¥×¥í¥Ã¥È¤·¤¿¤â¤Î¡Ë¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£º¸Â¦¤Î¥­¥ã¥ó¥Ð¥¹¾å¤Ç¥¯¥ê¥Ã¥¯¤ª¤è¤Ó¥É¥é¥Ã¥°¤ò¹Ô¤Ã¤Æ¿¶¤ê»Ò¤Î½Å¤ê¤Î°ÌÃÖ¤òÊѤ¨¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£' +} +msg.pack('side'=>'top') + +# create frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $pendulum_demo + $pendulum_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'pendulum'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# animated wave +class PendulumAnimationDemo + def initialize(frame) + # Create some structural widgets + @pane = TkPanedWindow.new(frame, :orient=>:horizontal).pack(:fill=>:both, :expand=>true) +# @pane.add(@lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation')) +# @pane.add(@lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space')) + @lf1 = TkLabelFrame.new(@pane, :text=>'Pendulum Simulation') + @lf2 = TkLabelFrame.new(@pane, :text=>'Phase Space') + + # Create the canvas containing the graphical representation of the + # simulated system. + @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white', + :borderwidth=>2, :relief=>:sunken) + TkcText.new(@c, 5, 5, :anchor=>:nw, + :text=>'Click to Adjust Bob Start Position') + # Coordinates of these items don't matter; they will be set properly below + @plate = TkcLine.new(@c, 0, 25, 320, 25, :width=>2, :fill=>'grey50') + @rod = TkcLine.new(@c, 1, 1, 1, 1, :width=>3, :fill=>'black') + @bob = TkcOval.new(@c, 1, 1, 2, 2, + :width=>3, :fill=>'yellow', :outline=>'black') + TkcOval.new(@c, 155, 20, 165, 30, :fill=>'grey50', :outline=>'') + + # pack + @c.pack(:fill=>:both, :expand=>true) + + # Create the canvas containing the phase space graph; this consists of + # a line that gets gradually paler as it ages, which is an extremely + # effective visual trick. + @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white', + :borderwidth=>2, :relief=>:sunken) + @y_axis = TkcLine.new(@k, 160, 200, 160, 0, :fill=>'grey75', :arrow=>:last) + @x_axis = TkcLine.new(@k, 0, 100, 320, 100, :fill=>'grey75', :arrow=>:last) + + @graph = {} + 90.step(0, -10){|i| + # Coordinates of these items don't matter; + # they will be set properly below + @graph[i] = TkcLine.new(@k, 0, 0, 1, 1, :smooth=>true, :fill=>"grey#{i}") + } + + # labels + @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne, + :text=>'q', :font=>'Symbol 8') + @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne, + :text=>'dq', :font=>'Symbol 8') + + # pack + @k.pack(:fill=>:both, :expand=>true) + + # Initialize some variables + @points = [] + @theta = 45.0 + @dTheta = 0.0 + @length = 150 + + # animation loop + @timer = TkTimer.new(15){ repeat } + + # binding + @c.bindtags_unshift(btag = TkBindTag.new) + btag.bind('Destroy'){ @timer.stop } + btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)}, + '%x %y') + btag.bind('B1-Motion', proc{|x, y| showPendulum(x.to_i, y.to_i)}, '%x %y') + btag.bind('ButtonRelease-1', + proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start }, + '%x %y') + + btag.bind('Configure', proc{|w| @plate.coords(0, 25, w.to_i, 25)}, '%w') + + @k.bind('Configure', proc{|h, w| + h = h.to_i + w = w.to_i + @psh = h/2; + @psw = w/2 + @x_axis.coords(2, @psh, w-2, @psh) + @y_axis.coords(@psw, h-2, @psw, 2) + @label_theta.coords(@psw-4, 6) + @label_dtheta.coords(w-6, @psh+4) + }, '%h %w') + + # add + Tk.update + @pane.add(@lf1) + @pane.add(@lf2) + + # init display + showPendulum + + # animation start + @timer.start(500) + end + + # This procedure makes the pendulum appear at the correct place on the + # canvas. If the additional arguments x, y are passed instead of computing + # the position of the pendulum from the length of the pendulum rod and its + # angle, the length and angle are computed in reverse from the given + # location (which is taken to be the centre of the pendulum bob.) + def showPendulum(x=nil, y=nil) + if x && y && (x != 160 || y != 25) + @dTheta = 0.0 + x2 = x - 160 + y2 = y - 25 + @length = Math.hypot(x2, y2) + @theta = Math.atan2(x2,y2)*180/Math::PI + else + angle = @theta*Math::PI/180 + x = 160 + @length*Math.sin(angle) + y = 25 + @length*Math.cos(angle) + end + + @rod.coords(160, 25, x, y) + @bob.coords(x-15, y-15, x+15, y+15) + end + + # Update the phase-space graph according to the current angle and the + # rate at which the angle is changing (the first derivative with + # respect to time.) + def showPhase + unless @psw && @psh + @psw = @k.width/2 + @psh = @k.height/2 + end + @points << @theta + @psw << -20*@dTheta + @psh + if @points.length > 100 + @points = @points[-100..-1] + end + (0...100).step(10){|i| + first = - i + last = 11 - i + last = -1 if last >= 0 + next if first > last + lst = @points[first..last] + @graph[i].coords(lst) if lst && lst.length >= 4 + } + end + + # This procedure is the "business" part of the simulation that does + # simple numerical integration of the formula for a simple rotational + # pendulum. + def recomputeAngle + scaling = 3000.0/@length/@length + + # To estimate the integration accurately, we really need to + # compute the end-point of our time-step. But to do *that*, we + # need to estimate the integration accurately! So we try this + # technique, which is inaccurate, but better than doing it in a + # single step. What we really want is bound up in the + # differential equation: + # .. - sin theta + # theta + theta = ----------- + # length + # But my math skills are not good enough to solve this! + + # first estimate + firstDDTheta = -Math.sin(@theta * Math::PI/180) * scaling + midDTheta = @dTheta + firstDDTheta + midTheta = @theta + (@dTheta + midDTheta)/2 + # second estimate + midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling + midDTheta = @dTheta + (firstDDTheta + midDDTheta)/2 + midTheta = @theta + (@dTheta + midDTheta)/2 + # Now we do a double-estimate approach for getting the final value + # first estimate + midDDTheta = -Math.sin(midTheta * Math::PI/180) * scaling + lastDTheta = midDTheta + midDDTheta + lastTheta = midTheta + (midDTheta+ lastDTheta)/2 + # second estimate + lastDDTheta = -Math.sin(lastTheta * Math::PI/180) * scaling + lastDTheta = midDTheta + (midDDTheta + lastDDTheta)/2 + lastTheta = midTheta + (midDTheta + lastDTheta)/2 + # Now put the values back in our globals + @dTheta = lastDTheta + @theta = lastTheta + end + + # This method ties together the simulation engine and the graphical + # display code that visualizes it. + def repeat + # Simulate + recomputeAngle + + # Update the display + showPendulum + showPhase + end +end + +# Start the animation processing +PendulumAnimationDemo.new(base_frame) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/plot.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/plot.rb new file mode 100644 index 0000000..9ff7190 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/plot.rb @@ -0,0 +1,126 @@ +# -*- coding: euc-jp -*- +# +# 2-D plot widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($plot_demo) && $plot_demo + $plot_demo.destroy + $plot_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$plot_demo = TkToplevel.new {|w| + title("Plot Demonstration") + iconname("Plot") + positionWindow(w) +} + +base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left', + 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï´Êñ¤Ê2¼¡¸µ¤Î¥×¥í¥Ã¥È¤ò´Þ¤ó¤À¥­¥ã¥ó¥Ð¥¹ widget¤Ç¤¹¡£É½¼¨¤µ¤ì¤¿ÅÀ¤ò¥Þ¥¦¥¹¥Ü¥¿¥ó1¤Ç¥É¥é¥Ã¥°¤·¤Æ¥Ç¡¼¥¿¤ò¤¤¤¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$plot_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $plot_demo + $plot_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'plot'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$plot_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# font ÀßÄê + if $tk_version =~ /^4.*/ + plotFont = '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + else + font = 'Helvetica 18' + end + +# canvas ÀßÄê +$plot_canvas = TkCanvas.new(base_frame,'relief'=>'raised','width'=>450,'height'=>300) +$plot_canvas.pack('side'=>'top', 'fill'=>'x') + +# plot À¸À® +TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2) +TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2) +TkcText.new($plot_canvas, 225, 20, + 'text'=>"´Êñ¤Ê¥×¥í¥Ã¥È", 'font'=>plotFont, 'fill'=>'brown') + +(0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2) + TkcText.new($plot_canvas, x, 254, + 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n') +} +(0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2) + TkcText.new($plot_canvas, 96, y, + 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e') +} + +for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' +end + +$plot_canvas.itembind('point', 'Any-Enter', + proc{$plot_canvas.itemconfigure 'current','fill','red'}) +$plot_canvas.itembind('point', 'Any-Leave', + proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'}) +$plot_canvas.itembind('point', '1', + proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y") +$plot_canvas.itembind('point', 'ButtonRelease-1', + proc{$plot_canvas.dtag 'selected'}) +$plot_canvas.bind('B1-Motion', + proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y") + +$plot = {'lastX'=>0, 'lastY'=>0} + +# plotDown -- +# This method is invoked when the mouse is pressed over one of the +# data points. It sets up state to allow the point to be dragged. +# +# Arguments: +# w - The canvas window. +# x, y - The coordinates of the mouse press. + +def plotDown (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $plot['lastX'] = x + $plot['lastY'] = y +end + +# plotMove -- +# This method is invoked during mouse motion events. It drags the +# current item. +# +# Arguments: +# w - The canvas window. +# x, y - The coordinates of the mouse. + +def plotMove (w, x, y) + w.move 'selected', x - $plot['lastX'], y - $plot['lastY'] + $plot['lastX'] = x + $plot['lastY'] = y +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/puzzle.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/puzzle.rb new file mode 100644 index 0000000..2febc2c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/puzzle.rb @@ -0,0 +1,131 @@ +# -*- coding: euc-jp -*- +# +# widet demo 'puzzle' (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($puzzle_demo) && $puzzle_demo + $puzzle_demo.destroy + $puzzle_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$puzzle_demo = TkToplevel.new {|w| + title("15-Puzzle Demonstration") + iconname("15-Puzzle") + positionWindow(w) +} + +base_frame = TkFrame.new($puzzle_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Î15-¥Ñ¥º¥ë¤Ï¥Ü¥¿¥ó¤ò½¸¤á¤Æ¤Ç¤­¤Æ¤¤¤Þ¤¹¡£¶õ¤¤¤Æ¤¤¤ë½ê¤ÎÎ٤Υԡ¼¥¹¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥Ô¡¼¥¹¤¬¤½¤Î¶õ¤¤¤Æ¤¤¤ë¾ì½ê¤Ë¥¹¥é¥¤¥É¤·¤Þ¤¹¡£¤³¤ÎÁàºî¤ò³¤±¡¢¥Ô¡¼¥¹¤¬¤½¤Î¿ô¤Î½ç¤Ë¾å¤«¤é²¼¡¢º¸¤«¤é±¦¤Ëʤ֤褦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $puzzle_demo + $puzzle_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'puzzle'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +# +# Special trick: scrollbar widget ¤òÀ¸À®¤·¤Æ¤½¤Î trough color ¤òÍѤ¤¤ë¤³¤È¤Ç +# ¶õÇòÉôʬ¤Î¤¿¤á¤Î°Å¿§¤òÁªÂò¤·¡¤ÀßÄꤹ¤ë +# +begin + if Tk.windowingsystem() == 'aqua' + frameWidth = 168 + frameHeight = 168 + elsif Tk.default_widget_set == :Ttk + frameWidth = 148 + frameHeight = 124 + else + frameWidth = 120 + frameHeight = 120 + end +rescue + frameWidth = 120 + frameHeight = 120 +end + +# depend_on_button_width = true +depend_on_button_width = false + +s = TkScrollbar.new(base_frame) +base = TkFrame.new(base_frame) { + width frameWidth + height frameHeight + borderwidth 2 + relief 'sunken' + bg s['troughcolor'] +} +s.destroy +base.pack('side'=>'top', 'padx'=>'1c', 'pady'=>'1c') + +# proc ¤Î¥¹¥³¡¼¥×¤òÊĤ¸¤ë¤¿¤á¡¤proc À¸À®¥á¥½¥Ã¥É¤òÍÑ°Õ +# ¤³¤¦¤·¤Æ¤ª¤«¤Í¤Ð¡¤¥ë¡¼¥×Ãæ¤ÇÃͤ¬ÊѲ½¤¹¤ë num ¤Î±Æ¶Á¤ò¼õ¤±¤Æ +# puzzleSwitch ¤ÎÂè 2 °ú¿ô¤¬ÊѲ½¤·¤Æ¤·¤Þ¤¤¡¤´üÂÔÄ̤ê¤Ë¤Ï¤Ê¤é¤Ê¤¤¡¥ +def def_puzzleswitch_proc(w, num) + proc{puzzleSwitch w, num} +end + +$xpos = {} +$ypos = {} +order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12] +(0..14).each{|i| + num = order[i] + $xpos[num] = (i % 4) * 0.25 + $ypos[num] = (i / 4) * 0.25 + TkButton.new(base) {|w| + relief 'raised' + text num + highlightthickness 0 + command def_puzzleswitch_proc(w, num) + if depend_on_button_width && (w.winfo_reqwidth * 4 > base.width) + base.width = w.winfo_reqwidth * 4 + end + }.place('relx'=>$xpos[num], 'rely'=>$ypos[num], + 'relwidth'=>0.25, 'relheight'=>0.25) +} +$xpos['space'] = 0.75 +$ypos['space'] = 0.75 + +############ +def puzzleSwitch(w, num) + if ( ($ypos[num] >= ($ypos['space'] - 0.01)) \ + && ($ypos[num] <= ($ypos['space'] + 0.01)) \ + && ($xpos[num] >= ($xpos['space'] - 0.26)) \ + && ($xpos[num] <= ($xpos['space'] + 0.26))) \ + || (($xpos[num] >= ($xpos['space'] - 0.01)) \ + && ($xpos[num] <= ($xpos['space'] + 0.01)) \ + && ($ypos[num] >= ($ypos['space'] - 0.26)) \ + && ($ypos[num] <= ($ypos['space'] + 0.26))) + tmp = $xpos['space'] + $xpos['space'] = $xpos[num] + $xpos[num] = tmp + tmp = $ypos['space'] + $ypos['space'] = $ypos[num] + $ypos[num] = tmp + w.place('relx'=>$xpos[num], 'rely'=>$ypos[num]) + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio.rb new file mode 100644 index 0000000..a61ad46 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio.rb @@ -0,0 +1,84 @@ +# -*- coding: euc-jp -*- +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($radio_demo) && $radio_demo + $radio_demo.destroy + $radio_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$radio_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration") + iconname("radio") + positionWindow(w) +} + +base_frame = TkFrame.new($radio_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤Ï2¤Ä¤Î¥é¥¸¥ª¥Ü¥¿¥ó¥°¥ë¡¼¥×¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥Ü¥¿¥ó¤À¤±¤¬¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤ÇÁªÂò¤µ¤ì¤Þ¤¹¡£³Æ¥°¥ë¡¼¥×¤ËÂФ·¤Æ¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤Î¤É¤Î¥Ü¥¿¥ó¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¤«¤ò¼¨¤¹ÊÑ¿ô¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£¸½ºß¤ÎÊÑ¿ô¤ÎÃͤò¸«¤ë¤Ë¤Ï¡ÖÊÑ¿ô»²¾È¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# ÊÑ¿ôÀ¸À® +size = TkVariable.new +color = TkVariable.new + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $radio_demo + $radio_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'radio'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'ÊÑ¿ô»²¾È' + command proc{ + showVars(base_frame, ['size', size], ['color', color]) + } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +f_left = TkFrame.new(base_frame) +f_right = TkFrame.new(base_frame) +f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') + +# radiobutton À¸À® +[10, 12, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "¥Ý¥¤¥ó¥È¥µ¥¤¥º #{sz}" + variable size + relief 'flat' + value sz + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + +['ÀÖ', 'ÎÐ', 'ÀÄ', '²«', 'Üô', '»ç'].each {|col| + TkRadioButton.new(f_right) { + text col + variable color + relief 'flat' + value col.downcase + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w') +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio2.rb new file mode 100644 index 0000000..cf53e3e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio2.rb @@ -0,0 +1,112 @@ +# -*- coding: euc-jp -*- +# +# radio2.rb +# +# This demonstration script creates a toplevel window containing +# several radiobutton widgets. +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($radio2_demo) && $radio2_demo + $radio2_demo.destroy + $radio2_demo = nil +end + +# demo toplevel widget +$radio2_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration 2") + iconname("radio2") + positionWindow(w) +} + +base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text "²¼¤Ë¤Ï3¤Ä¤Î¥é¥¸¥ª¥Ü¥¿¥ó¥°¥ë¡¼¥×¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥Ü¥¿¥ó¤À¤±¤¬¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤ÇÁªÂò¤µ¤ì¤Þ¤¹¡£³Æ¥°¥ë¡¼¥×¤ËÂФ·¤Æ¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤Î¤É¤Î¥Ü¥¿¥ó¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¤«¤ò¼¨¤¹ÊÑ¿ô¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£¸½ºß¤ÎÊÑ¿ô¤ÎÃͤò¸«¤ë¤Ë¤Ï¡ÖÊÑ¿ô»²¾È¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top') + +# +size = TkVariable.new +color = TkVariable.new +align = TkVariable.new + +# frame +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $radio2_demo + $radio2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'radio2'} + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text 'ÊÑ¿ô»²¾È' + command proc{ + showVars(base_frame, + ['size', size], ['color', color], ['compound', align]) + } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame +f_left = TkLabelFrame.new(base_frame, 'text'=>'ʸ»ú¥µ¥¤¥º', + 'pady'=>2, 'padx'=>2) +f_mid = TkLabelFrame.new(base_frame, 'text'=>'¿§', + 'pady'=>2, 'padx'=>2) +f_right = TkLabelFrame.new(base_frame, 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×ÇÛÃÖ', + 'pady'=>2, 'padx'=>2) +f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') +f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c') + +# radiobutton +[10, 12, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "¥Ý¥¤¥ó¥È¥µ¥¤¥º #{sz}" + variable size + relief 'flat' + value sz + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x') +} + +['ÀÖ', 'ÎÐ', 'ÀÄ', '²«', 'Üô', '»ç'].each {|col| + TkRadioButton.new(f_mid) { + text col + variable color + relief 'flat' + value col.downcase + anchor 'w' + }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x') +} + +# label = TkLabel.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead', +label = Tk::Label.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead', + 'compound'=>'left') +label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top') +label.height(TkWinfo.reqheight(label)) +abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a| + lower = a.downcase + TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat', + 'value'=>lower, 'indicatoron'=>0, 'width'=>7, + 'command'=>proc{label.compound(align.value)}) +} + +Tk.grid('x', abtn[0]) +Tk.grid(abtn[1], label, abtn[2]) +Tk.grid('x', abtn[3]) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio3.rb new file mode 100644 index 0000000..4bbc1b3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/radio3.rb @@ -0,0 +1,119 @@ +# -*- coding: euc-jp -*- +# +# radio3.rb +# +# This demonstration script creates a toplevel window containing +# several radiobutton widgets. +# +# radiobutton widget demo (called by 'widget') +# + +# toplevel widget +if defined?($radio3_demo) && $radio3_demo + $radio3_demo.destroy + $radio3_demo = nil +end + +# demo toplevel widget +$radio3_demo = TkToplevel.new {|w| + title("Radiobutton Demonstration 3") + iconname("radio3") + positionWindow(w) +} + +base_frame = TkFrame.new($radio3_demo).pack(:fill=>:both, :expand=>true) + +# label +msg = TkLabel.new(base_frame) { + font $font + wraplength '5i' + justify 'left' + text '²¼¤Ë¤Ï3¤Ä¤Î¥é¥¸¥ª¥Ü¥¿¥ó¥°¥ë¡¼¥×¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥°¥ë¡¼¥×¤Ë°¤¹¤ë¤¹¤Ù¤Æ¤Î¥Ü¥¿¥ó¤ÎÃæ¤Ç¥¯¥ê¥Ã¥¯¤·¤¿¥Ü¥¿¥ó¤À¤±¤¬ÁªÂò¤µ¤ì¤¿¾õÂ֤ˤʤê¤Þ¤¹¡£³Æ¥°¥ë¡¼¥×¤Ë¤Ï¡¢¤½¤Î¥°¥ë¡¼¥×¤ÎÃæ¤Î¤É¤Î¥Ü¥¿¥ó¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¤«¤ò¼¨¤¹ÊÑ¿ô¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£¡Ö¥È¥é¥¤¥¹¥Æ¡¼¥È¡×¥Ü¥¿¥ó¤¬²¡¤µ¤ì¤¿¤È¤­¤Ë¤Ï¡¢¥é¥¸¥ª¥Ü¥¿¥ó¤Îɽ¼¨¤¬¥È¥é¥¤¥¹¥Æ¡¼¥È¥â¡¼¥É¤Ë¤Ê¤ê¤Þ¤¹¡£¤¤¤º¤ì¤«¤Î¥Ü¥¿¥ó¤òÁªÂò¤¹¤ì¤Ð¡¢¥Ü¥¿¥ó¤Î¾õÂ֤ϸµ¤Î¤è¤¦¤Ë¸Ä¡¹¤Î¥Ü¥¿¥ó¤Îon/off¾õÂÖ¤ò¼¨¤¹¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¸½ºß¤ÎÊÑ¿ô¤ÎÃͤò¸«¤ë¤Ë¤Ï¡ÖÊÑ¿ô»²¾È¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£' +} +msg.grid(:row=>0, :column=>0, :columnspan=>3, :sticky=>'nsew') + +# variable +size = TkVariable.new +color = TkVariable.new +align = TkVariable.new + +# frame +TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, ['size', size], + ['color', color], ['compound', align]) + }), + TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'radio3'}), + TkButton.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $radio3_demo + $radio3_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) + TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew') +} + +# frame +f_left = TkLabelFrame.new(base_frame, 'text'=>'ʸ»ú¥µ¥¤¥º', + 'pady'=>2, 'padx'=>2) +f_mid = TkLabelFrame.new(base_frame, 'text'=>'¿§', + 'pady'=>2, 'padx'=>2) +f_right = TkLabelFrame.new(base_frame, 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×ÇÛÃÖ', + 'pady'=>2, 'padx'=>2) +f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) +f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) +f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c') + +TkButton.new(base_frame, 'text'=>'¥È¥é¥¤¥¹¥Æ¡¼¥È', + 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){ + grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c') +} + +# radiobutton +[10, 12, 14, 18, 24].each {|sz| + TkRadioButton.new(f_left) { + text "¥Ý¥¤¥ó¥È¥µ¥¤¥º #{sz}" + variable size + relief 'flat' + value sz + tristatevalue 'multi' + }.pack('side'=>'top', 'pady'=>2, 'anchor'=>'w', 'fill'=>'x') +} + +['Red', 'Green', 'Blue', 'Yellow', 'Orange', 'Purple'].each {|col| + TkRadioButton.new(f_mid) { + text col + variable color + relief 'flat' + value col.downcase + anchor 'w' + tristatevalue 'multi' + command proc{f_mid.fg(color.value)} + }.pack('side'=>'top', 'pady'=>2, 'fill'=>'x') +} + +# label = TkLabel.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead', +label = Tk::Label.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead', + 'compound'=>'left') +label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top') +label.height(TkWinfo.reqheight(label)) +a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a| + TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat', + 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7, + 'command'=>proc{label.compound(align.value)}) +} + +Tk.grid('x', a_btn[0]) +Tk.grid(a_btn[1], label, a_btn[2]) +Tk.grid('x', a_btn[3]) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rmt b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rmt new file mode 100644 index 0000000..73f6311 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rmt @@ -0,0 +1,268 @@ +#!/usr/bin/env ruby + +# rmt -- +# This script implements a simple remote-control mechanism for +# Tk applications. It allows you to select an application and +# then type commands to that application. + +require 'tk' + +class Rmt + def initialize(parent=nil) + win = self + + unless parent + parent = TkRoot.new + end + root = TkWinfo.toplevel(parent) + root.minsize(1,1) + + # The instance variable below keeps track of the remote application + # that we're sending to. If it's an empty string then we execute + # the commands locally. + @app = 'local' + @mode = 'Ruby' + + # The instance variable below keeps track of whether we're in the + # middle of executing a command entered via the text. + @executing = 0 + + # The instance variable below keeps track of the last command executed, + # so it can be re-executed in response to !! commands. + @lastCommand = "" + + # Create menu bar. Arrange to recreate all the information in the + # applications sub-menu whenever it is cascaded to. + + TkFrame.new(root, 'relief'=>'raised', 'bd'=>2) {|f| + pack('side'=>'top', 'fill'=>'x') + TkMenubutton.new(f, 'text'=>'File', 'underline'=>0) {|mb| + TkMenu.new(mb) {|mf| + mb.menu(mf) + TkMenu.new(mf) {|ma| + postcommand proc{win.fillAppsMenu ma} + mf.add('cascade', 'label'=>'Select Application', + 'menu'=>ma, 'underline'=>0) + } + add('command', 'label'=>'Quit', + 'command'=>proc{root.destroy}, 'underline'=>0) + } + pack('side'=>'left') + } + } + + # Create text window and scrollbar. + + @txt = TkText.new(root, 'relief'=>'sunken', 'bd'=>2, 'setgrid'=>true) { + yscrollbar(TkScrollbar.new(root){pack('side'=>'right', 'fill'=>'y')}) + pack('side'=>'left') + } + + @promptEnd = TkTextMark.new(@txt, 'insert') + + # Create a binding to forward commands to the target application, + # plus modify many of the built-in bindings so that only information + # in the current command can be deleted (can still set the cursor + # earlier in the text and select and insert; just can't delete). + + @txt.bindtags([@txt, TkText, root, 'all']) + @txt.bind('Return', proc{ + @txt.set_insert('end - 1c') + @txt.insert('insert', "\n") + win.invoke + Tk.callback_break + }) + @txt.bind('Delete', proc{ + begin + @txt.tag_remove('sel', 'sel.first', @promptEnd) + rescue + end + if @txt.tag_nextrange('sel', '1.0', 'end') == [] + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + end + }) + @txt.bind('BackSpace', proc{ + begin + @txt.tag_remove('sel', 'sel.first', @promptEnd) + rescue + end + if @txt.tag_nextrange('sel', '1.0', 'end') == [] + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + end + }) + @txt.bind('Control-d', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Control-k', proc{ + if @txt.compare('insert', '<', @promptEnd) + @txt.set_insert(@promptEnd) + end + }) + @txt.bind('Control-t', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Meta-d', proc{ + if @txt.compare('insert', '<', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Meta-BackSpace', proc{ + if @txt.compare('insert', '<=', @promptEnd) + Tk.callback_break + end + }) + @txt.bind('Control-h', proc{ + if @txt.compare('insert', '<=', @promptEnd) + Tk.callback_break + end + }) + + @txt.tag_configure('bold', 'font'=>['Courier', 12, 'bold']) + + @app = Tk.appname('rmt') + if (@app =~ /^rmt(.*)$/) + root.title("Tk Remote Controller#{$1}") + root.iconname("Tk Remote#{$1}") + end + prompt + @txt.focus + #@app = TkWinfo.appname(TkRoot.new) + end + + def tkTextInsert(w,s) + return if s == "" + begin + if w.compare('sel.first','<=','insert') \ + && w.compare('sel.last','>=','insert') + w.tag_remove('sel', 'sel.first', @promptEnd) + w.delete('sel.first', 'sel.last') + end + rescue + end + w.insert('insert', s) + w.see('insert') + end + + # The method below is used to print out a prompt at the + # insertion point (which should be at the beginning of a line + # right now). + + def prompt + @txt.insert('insert', "#{@app}: ") + @promptEnd.set('insert') + @promptEnd.gravity = 'left' + @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd) + end + + # The method below executes a command (it takes everything on the + # current line after the prompt and either sends it to the remote + # application or executes it locally, depending on "app". + + def invoke + cmd = @txt.get(@promptEnd, 'insert') + @executing += 1 + case (@mode) + when 'Tcl' + if Tk.info('complete', cmd) + if (cmd == "!!\n") + cmd = @lastCommand + else + @lastCommand = cmd + end + begin + msg = Tk.appsend(@app, false, cmd) + rescue + msg = "Error: #{$!}" + end + @txt.insert('insert', msg + "\n") if msg != "" + prompt + @promptEnd.set('insert') + end + + when 'Ruby' + if (cmd == "!!\n") + cmd = @lastCommand + end + complete = true + begin + eval("proc{#{cmd}}") + rescue + complete = false + end + if complete + @lastCommand = cmd + begin +# msg = Tk.appsend(@app, false, +# 'ruby', +# '"(' + cmd.gsub(/[][$"]/, '\\\\\&') + ').to_s"') + msg = Tk.rb_appsend(@app, false, cmd) + rescue + msg = "Error: #{$!}" + end + @txt.insert('insert', msg + "\n") if msg != "" + prompt + @promptEnd.set('insert') + end + end + + @executing -= 1 + @txt.yview_pickplace('insert') + end + + # The following method is invoked to change the application that + # we're talking to. It also updates the prompt for the current + # command, unless we're in the middle of executing a command from + # the text item (in which case a new prompt is about to be output + # so there's no need to change the old one). + + def newApp(appName, mode) + @app = appName + @mode = mode + if @executing == 0 + @promptEnd.gravity = 'right' + @txt.delete("#{@promptEnd.path} linestart", @promptEnd) + @txt.insert(@promptEnd, "#{appName}: ") + @txt.tag_add('bold', "#{@promptEnd.path} linestart", @promptEnd) + @promptEnd.gravity = 'left' + end + end + + # The method below will fill in the applications sub-menu with a list + # of all the applications that currently exist. + + def fillAppsMenu(menu) + win = self + begin + menu.delete(0,'last') + rescue + end + TkWinfo.interps.sort.each{|ip| + begin + if Tk.appsend(ip, false, 'info commands ruby') == "" + mode = 'Tcl' + else + mode = 'Ruby' + end + menu.add('command', 'label'=>format("%s (#{mode}/Tk)", ip), + 'command'=>proc{win.newApp ip, mode}) + rescue + menu.add('command', 'label'=>format("%s (unknown Tk)", ip), + 'command'=>proc{win.newApp ip, mode}, 'state'=>'disabled') + end + } + menu.add('command', 'label'=>format("local (Ruby/Tk)"), + 'command'=>proc{win.newApp 'local', 'Ruby'}) + end +end + +Rmt.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex new file mode 100644 index 0000000..9f87ae2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/rolodex @@ -0,0 +1,320 @@ +#!/usr/bin/env ruby +# +# rolodex -- +# This script is a part of Tom LaStrange's rolodex +# +# Copyright (C) 1998 by Takaaki Tateishi +# Time-stamp: "03/08/02 12:45:21 nagai" +# + +require "tk" + + +def show_help(topic,x=0,y=0) + if( topic.is_a?(TkWindow) ) + w = TkWinfo.containing(x,y) + if( TkWinfo.exist?(w) ) + topic = w + end + end + + if( $helpTopics.include?(topic) ) + msg = $helpTopics[topic] + else + msg = "Sorry, but no help is available for this topic" + end + TkDialog.new("title"=>"Rolodex Help", + "message"=>"Information on #{topic}:\n\n#{msg}", + "default_button"=>0, + "buttons"=>["OK"]) +end + +def fillCard + clearAction + $root.frame.entry[1].insert(0,"Takaaki Tateishi") + $root.frame.entry[2].insert(0,"Japan Advanced Institute of Science and Techonology") + $root.frame.entry[3].insert(0,"1-1 Asahidai, Tatsunokuchi") + $root.frame.entry[4].insert(0,"Ishikawa 923-1292, Japan") + $root.frame.entry[5].insert(0,"private") + $root.frame.entry[6].insert(0,"***-***-****") + $root.frame.entry[7].insert(0,"***-***-****") +end + +def addAction + for i in 1..7 + STDERR.print format("%-12s %s\n", + RolodexFrame::LABEL[i], + $root.frame.entry[i].value) + end +end + +def clearAction + for i in 1..7 + $root.frame.entry[i].delete(0,"end") + end +end + +def fileAction + TkDialog.new("title"=>"File Selection", + "message"=>"This is a dummy file selection dialog box.\n", + "default_button"=>0, + "buttons"=>["OK"]) + STDERR.print "dummy file name\n" +end + +def deleteAction + result = TkDialog.new("title"=>"Confirm Action", + "message"=>"Are you sure?", + "default_button"=>0, + "buttons"=>["Cancel"]) + if( result.value == 0 ) + clearAction + end +end + + +class RolodexFrame < TkFrame + attr_reader :entry, :label + + LABEL = ["","Name:","Address:","","","Home Phone:","Work Phone:","Fax:"] + + def initialize(parent=nil,keys=nil) + super(parent,keys) + self["relief"] = "flat" + + @i = [] + @label = [] + @entry = [] + for i in 1..7 + @i[i] = TkFrame.new(self) + @i[i].pack("side"=>"top", + "pady"=>2, + "anchor"=>"e") + @label[i] = TkLabel.new(@i[i], + "text"=>LABEL[i], + "anchor"=>"e") + @entry[i] = TkEntry.new(@i[i], + "width"=>30, + "relief"=>"sunken") + @entry[i].pack("side"=>"right") + @label[i].pack("side"=>"right") + end + end +end + +class RolodexButtons < TkFrame + attr_reader :clear, :add, :search, :delete + + def initialize(parent,keys=nil) + super(parent,keys) + @clear = TkButton.new(self, + "text" => "Clear") + @add = TkButton.new(self, + "text" => "Add") + @search = TkButton.new(self, + "text" => "Search") + @delete = TkButton.new(self, + "text" => "Delete") + for w in [@clear,@add,@search,@delete] + w.pack("side"=>"left", "padx"=>2) + end + end +end + +class RolodexMenuFrame < TkFrame + attr_reader :file_menu, :help_menu, :file, :help + + def initialize(parent,keys=nil) + super(parent,keys) + configure("relief"=>"raised", + "borderwidth"=>1) + + @file = TkMenubutton.new(self, + "text"=>"File", + "underline"=>0) + @file_menu = TkMenu.new(@file) + @file_menu.add("command", + "label" => "Load ...", + "command" => proc{fileAction}, + "underline" => 0) + @file_menu.add("command", + "label" => "Exit", + "command" => proc{$root.destroy}, + "underline" => 0) + @file.menu(@file_menu) + @file.pack("side"=>"left") + + @help = TkMenubutton.new(self, + "text"=>"Help", + "underline"=>0) + @help_menu = TkMenu.new(@help) + @help_menu.add("command", + "label"=>"On Context...", + "command"=>proc{show_help("context")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Help...", + "command"=>proc{show_help("help")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Window...", + "command"=>proc{show_help("window")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On Keys...", + "command"=>proc{show_help("keys")}, + "underline"=>3) + @help_menu.add("command", + "label"=>"On version...", + "command"=>proc{show_help("version")}, + "underline"=>3) + @help.menu(@help_menu) + @help.pack("side"=>"right") + end +end + +class Rolodex < TkRoot + attr_reader :frame, :buttons, :menu + + def initialize(*args) + super(*args) + @frame = RolodexFrame.new(self) + @frame.pack("side"=>"top", + "fill"=>"y", + "anchor"=>"center") + @buttons = RolodexButtons.new(self) + @buttons.pack("side"=>"bottom", + "pady"=>2, + "anchor"=>"center") + @menu = RolodexMenuFrame.new(self) + @menu.pack("before"=>@frame, + "side"=>"top", + "fill"=>"x") + end +end + +$root = Rolodex.new + +$root.buttons.delete.configure("command"=>proc{deleteAction}) +$root.buttons.add.configure("command"=>proc{addAction}) +$root.buttons.clear.configure("command"=>proc{clearAction}) +$root.buttons.search.configure("command"=>proc{addAction; fillCard}) + +$root.buttons.clear.configure("text"=>"Clear Ctrl+C") +$root.bind("Control-c",proc{clearAction}) + +$root.buttons.add.configure("text"=>"Add Ctrl+A") +$root.bind("Control-a",proc{addAction}) + +$root.buttons.search.configure("text"=>"Search Ctrl+S") +$root.bind("Control-s",proc{addAction; fillCard}) + +$root.buttons.delete.configure("text"=>"Delete... Ctrl+D") +$root.bind("Control-d",proc{deleteAction}) + +$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F") +$root.bind("Control-f",proc{fileAction}) + +$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q") +$root.bind("Control-q",proc{$root.destroy}) + +$root.frame.entry[1].focus + +$root.bind("Any-F1", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) +$root.bind("Any-Help", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) + + +$helpTopics = {} + +$helpTopics[$root.menu.file] = < +# Time-stamp: "04/04/09 00:32:12 nagai" +# + +require "tk" +Tk.encoding = "euc-jp" + +def show_help(topic,x=0,y=0) + if( topic.is_a?(TkWindow) ) + w = TkWinfo.containing(x,y) + if( w.is_a?(TkWindow) ) + if( TkWinfo.exist?(w) ) + topic = w + end + end + end + + if( $helpTopics.include?(topic) ) + msg = $helpTopics[topic] + else + msg = "¤³¤Î¥È¥Ô¥Ã¥¯¤Ë¤Ä¤¤¤Æ¤Î¥Ø¥ë¥×¤Ï¤Þ¤À»ÈÍѤǤ­¤Þ¤»¤ó" + end + TkDialog.new("title"=>"Rolodex Help", + "message"=>"¡Ö#{topic}¡×\n\n#{msg}", + "default_button"=>0, + "buttons"=>["OK"]) +end + +def fillCard + clearAction + $root.frame.entry[1].insert(0, "ΩÀÐ ¹§¾´") + $root.frame.entry[2].insert(0, "923-1292 ÀÐÀ") + $root.frame.entry[3].insert(0, "ä¸ýÄ® °°Âæ 1-1") + $root.frame.entry[4].insert(0, "ËÌΦÀèü²Ê³Øµ»½ÑÂç³Ø±¡Âç³Ø") + $root.frame.entry[5].insert(0,"private") + $root.frame.entry[6].insert(0,"***-***-****") + $root.frame.entry[7].insert(0,"***-***-****") +end + +def addAction + for i in 1..7 + STDERR.print format("%-12s %s\n", + RolodexFrame::LABEL[i], + $root.frame.entry[i].value) + end +end + +def clearAction + for i in 1..7 + $root.frame.entry[i].delete(0,"end") + end +end + +def fileAction + TkDialog.new("title"=>"File Selection", + "message"=>"¤³¤ì¤Ï¥Õ¥¡¥¤¥ëÁªÂò¥À¥¤¥¢¥í¥°¤Î¥À¥ß¡¼¤Ç¤¹¡£\n", + "default_button"=>0, + "buttons"=>["OK"]) + STDERR.print "dummy file name\n" +end + +def deleteAction + result = TkDialog.new("title"=>"Confirm Action", + "message"=>"¤è¤í¤·¤¤¤Ç¤¹¤«¡©", + "default_button"=>0, + "buttons"=>["¥­¥ã¥ó¥»¥ë"]) + if( result.value == 0 ) + clearAction + end +end + + +class RolodexFrame < TkFrame + attr_reader :entry, :label + + LABEL = ["","̾Á°:","½»½ê","","","ÅÅÏÃ(¼«Âð):","ÅÅÏÃ(²ñ¼Ò):","Fax:"] + + def initialize(parent=nil,keys=nil) + super(parent,keys) + self["relief"] = "flat" + @i = [] + @label = [] + @entry = [] + for i in 1..7 + @i[i] = TkFrame.new(self) + @i[i].pack("side"=>"top", + "pady"=>2, + "anchor"=>"e") + @label[i] = TkLabel.new(@i[i], + "text"=>LABEL[i], + "anchor"=>"e") + @entry[i] = TkEntry.new(@i[i], + "width"=>30, + "relief"=>"sunken") + @entry[i].pack("side"=>"right") + @label[i].pack("side"=>"right") + end + end +end + +class RolodexButtons < TkFrame + attr_reader :clear, :add, :search, :delete + + def initialize(parent,keys=nil) + super(parent,keys) + @clear = TkButton.new(self,"text" => "¥¯¥ê¥¢¡¼") + @add = TkButton.new(self, "text" => "ÄɲÃ") + @search = TkButton.new(self, "text" => "¸¡º÷") + @delete = TkButton.new(self, "text" => "¾Ãµî") + for w in [@clear,@add,@search,@delete] + w.pack("side"=>"left", "padx"=>2) + end + end +end + +class RolodexMenuFrame < TkFrame + attr_reader :file_menu, :help_menu, :file, :help + + def initialize(parent,keys=nil) + super(parent,keys) + configure("relief"=>"raised", + "borderwidth"=>1) + + @file = TkMenubutton.new(self, + "text"=> "¥Õ¥¡¥¤¥ë", + "underline"=>0) + @file_menu = TkMenu.new(@file) + @file_menu.add("command", + "label" => "Æɤ߹þ¤ß ...", + "command" => proc{fileAction}, + "underline" => 0) + @file_menu.add("command", + "label" => "½ªÎ»", + "command" => proc{$root.destroy}, + "underline" => 0) + @file.menu(@file_menu) + @file.pack("side"=>"left") + + @help = TkMenubutton.new(self, + "text"=> "¥Ø¥ë¥×", + "underline"=>0) + @help_menu = TkMenu.new(@help) + @help_menu.add("command", + "label"=> "¥³¥ó¥Æ¥­¥¹¥È¤Ë¤Ä¤¤¤Æ", + "command"=>proc{show_help("¥³¥ó¥Æ¥­¥¹¥È")}, + "underline"=>3) + @help_menu.add("command", + "label"=> "¥Ø¥ë¥×¤Ë¤Ä¤¤¤Æ", + "command"=>proc{show_help("¥Ø¥ë¥×")}, + "underline"=>3) + @help_menu.add("command", + "label"=> "¥¦¥£¥ó¥É¥¦¤Ë¤Ä¤¤¤Æ", + "command"=>proc{show_help("¥¦¥£¥ó¥É¥¦")}, + "underline"=>3) + @help_menu.add("command", + "label"=> "¥­¡¼Áàºî¤Ë¤Ä¤¤¤Æ", + "command"=>proc{show_help("¥­¡¼Áàºî")}, + "underline"=>3) + @help_menu.add("command", + "label"=> "¥Ð¡¼¥¸¥ç¥ó¾ðÊó", + "command"=>proc{show_help("¥Ð¡¼¥¸¥ç¥ó¾ðÊó")}, + "underline"=>3) + @help.menu(@help_menu) + @help.pack("side"=>"right") + end +end + +class Rolodex < TkRoot + attr_reader :frame, :buttons, :menu + + def initialize(*args) + super(*args) + @frame = RolodexFrame.new(self) + @frame.pack("side"=>"top", + "fill"=>"y", + "anchor"=>"center") + @buttons = RolodexButtons.new(self) + @buttons.pack("side"=>"bottom", + "pady"=>2, + "anchor"=>"center") + @menu = RolodexMenuFrame.new(self) + @menu.pack("before"=>@frame, + "side"=>"top", + "fill"=>"x") + end +end + +$root = Rolodex.new + +$root.buttons.delete.configure("command"=>proc{deleteAction}) +$root.buttons.add.configure("command"=>proc{addAction}) +$root.buttons.clear.configure("command"=>proc{clearAction}) +$root.buttons.search.configure("command"=>proc{addAction; fillCard}) + +$root.buttons.clear.configure("text"=> "¥¯¥ê¥¢¡¼ Ctrl+C") +$root.bind("Control-c",proc{clearAction}) + +$root.buttons.add.configure("text"=> "Äɲà Ctrl+A") +$root.bind("Control-a",proc{addAction}) + +$root.buttons.search.configure("text"=> "¸¡º÷ Ctrl+S") +$root.bind("Control-s",proc{addAction; fillCard}) + +$root.buttons.delete.configure("text"=> "¾Ãµî Ctrl+D") +$root.bind("Control-d",proc{deleteAction}) + +$root.menu.file_menu.entryconfigure(1, "accel"=>"Ctrl+F") +$root.bind("Control-f",proc{fileAction}) + +$root.menu.file_menu.entryconfigure(2, "accel"=>"Ctrl+Q") +$root.bind("Control-q",proc{$root.destroy}) + +$root.frame.entry[1].focus + +$root.bind("Any-F1", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) +$root.bind("Any-Help", + proc{|event| show_help(event.widget, event.x_root, event.y_root)}) + + +$helpTopics = {} + +$helpTopics[$root.menu.file] = <:both, :expand=>true) + +# label À¸À® +TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left', + 'text'=>"¤³¤Î¥­¥ã¥ó¥Ð¥¹widget¤Ï¥ë¡¼¥é¡¼¤ÎÌÏ·¿¤Ç¤¹¡£¥ë¡¼¥é¡¼¤Î±¦¤Ë¤¢¤ë¤Î¤Ï¥¿¥Ö¥¹¥È¥Ã¥×¤Î°æ¸Í¤Ç¡¢¤³¤³¤«¤é°ú¤ÃÄ¥¤Ã¤Æ¤¯¤ë¤³¤È¤Ë¤è¤Ã¤Æ¥¿¥Ö¥¹¥È¥Ã¥×¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢¤¹¤Ç¤Ë¤¢¤ë¥¿¥Ö¥¹¥È¥Ã¥×¤òÆ°¤«¤¹¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¥¿¥Ö¥¹¥È¥Ã¥×¤ò¾åÊý¤Þ¤¿¤Ï²¼Êý¤Ë¤«¤¹¤ì¤Æɽ¼¨¤µ¤ì¤ë¤Þ¤Ç¥É¥é¥Ã¥°¤¹¤ë¤È¡¢¥Þ¥¦¥¹¥Ü¥¿¥ó¤òÎ¥¤·¤¿»þ¤Ë¤½¤Î¥¿¥Ö¥¹¥È¥Ã¥×¤Ï¾Ã¤¨¤Þ¤¹¡£"){ + pack('side'=>'top') +} + +# frame À¸À® +$ruler_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $ruler_demo + $ruler_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'ruler'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$ruler_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# canvas ÀßÄê +$ruler_canvas = TkCanvas.new(base_frame, 'width'=>'14.8c', 'height'=>'2.5c') +$ruler_canvas.pack('side'=>'top', 'fill'=>'x') + +# ÃÍÀßÄê +unless Struct.const_defined?("RulerInfo") + $demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y, + :top, :bottom, :size, :normalStyle, + :activeStyle, :deleteStyle).new +end +$demo_rulerInfo.grid = '.25c' +$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c') +$demo_rulerInfo.right = TkWinfo.fpixels($ruler_canvas, '13c') +$demo_rulerInfo.top = TkWinfo.fpixels($ruler_canvas, '1c') +$demo_rulerInfo.bottom = TkWinfo.fpixels($ruler_canvas, '1.5c') +$demo_rulerInfo.size = TkWinfo.fpixels($ruler_canvas, '.2c') +$demo_rulerInfo.normalStyle = {'fill'=>'black'} +if TkWinfo.depth($ruler_canvas) > 1 + $demo_rulerInfo.activeStyle = {'fill'=>'red', 'stipple'=>''} + $demo_rulerInfo.deleteStyle = {'fill'=>'red', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator)} +else + $demo_rulerInfo.activeStyle = {'fill'=>'black', 'stipple'=>''} + $demo_rulerInfo.deleteStyle = {'fill'=>'black', + 'stipple'=>'@'+[$demo_dir, '..', + 'images', 'gray25.xbm'].join(File::Separator)} +end + +TkcLine.new($ruler_canvas, + '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1) +(0..11).each{|i| + x = i+1 + TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.25c", '1c', "#{x}.25c", '0.8c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.5c", '1c', "#{x}.5c", '0.7c', 'width'=>1) + TkcLine.new($ruler_canvas, "#{x}.75c", '1c', "#{x}.75c", '0.8c', 'width'=>1) + TkcText.new($ruler_canvas, "#{x}.15c", '0.75c', 'text'=>i, 'anchor'=>'sw') +} + +$rulerTag_well = TkcTag.new($ruler_canvas) +$ruler_canvas\ +.addtag_withtag($rulerTag_well, + TkcRectangle.new($ruler_canvas, + '13.2c', '1c', '13.8c', '0.5c', + 'outline'=>'black', + 'fill'=>($ruler_canvas\ + .configinfo('background'))[4]) ) +$ruler_canvas\ +.addtag_withtag($rulerTag_well, + rulerMkTab($ruler_canvas, + TkWinfo.pixels($ruler_canvas, '13.5c'), + TkWinfo.pixels($ruler_canvas, '.65c') ) ) + +$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.itembind('tab', '1', + proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.bind('B1-Motion', + proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y') +$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)}) + +# rulerNewTab -- +# Does all the work of creating a tab stop, including creating the +# triangle object and adding tags to it to give it tab behavior. +# +# Arguments: +# c - The canvas window. +# x, y - The coordinates of the tab stop. + +def rulerNewTab(c,x,y) + v = $demo_rulerInfo + c.addtag_withtag('active', rulerMkTab(c,x,y)) + c.addtag_withtag('tab', 'active') + v.x = x + v.y = y + rulerMoveTab(c,x,y) +end + +# rulerSelectTab -- +# This method is invoked when mouse button 1 is pressed over +# a tab. It remembers information about the tab so that it can +# be dragged interactively. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse (identifies the point by +# which the tab was picked up for dragging). + +def rulerSelectTab(c,x,y) + v = $demo_rulerInfo + v.x = c.canvasx(x, v.grid) + v.y = v.top+2 + c.addtag_withtag('active', 'current') + c.itemconfigure('active', v.activeStyle) + c.raise('active') +end + +# rulerMoveTab -- +# This method is invoked during mouse motion events to drag a tab. +# It adjusts the position of the tab, and changes its appearance if +# it is about to be dragged out of the ruler. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse. + +def rulerMoveTab(c,x,y) + v = $demo_rulerInfo + return if c.find_withtag('active') == [] + cx = c.canvasx(x,v.grid) + cy = c.canvasy(y) + cx = v.left if cx < v.left + cx = v.right if cx > v.right + if (cy >= v.top && cy <= v.bottom) + cy = v.top+2 + c.itemconfigure('active', v.activeStyle) + else + cy = cy-v.size-2 + c.itemconfigure('active', v.deleteStyle) + end + c.move('active', cx-v.x, cy-v.y) + v.x = cx + v.y = cy +end + +# rulerReleaseTab -- +# This method is invoked during button release events that end +# a tab drag operation. It deselects the tab and deletes the tab if +# it was dragged out of the ruler. +# +# Arguments: +# c - The canvas widget. +# x, y - The coordinates of the mouse. + +def rulerReleaseTab(c) + v = $demo_rulerInfo + return if c.find_withtag('active') == [] + if v.y != v.top+2 + c.delete('active') + else + c.itemconfigure('active', v.normalStyle) + c.dtag('active') + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/sayings.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/sayings.rb new file mode 100644 index 0000000..aa24b3a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/sayings.rb @@ -0,0 +1,103 @@ +# -*- coding: euc-jp -*- +# +# listbox widget demo 'sayings' (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($sayings_demo) && $sayings_demo + $sayings_demo.destroy + $sayings_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$sayings_demo = TkToplevel.new {|w| + title("Listbox Demonstration (well-known sayings)") + iconname("sayings") + positionWindow(w) +} + +base_frame = TkFrame.new($sayings_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Î¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤Ë¤Ï¤¤¤í¤¤¤í¤Ê³Ê¸À¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¥ê¥¹¥È¤ò¥¹¥¯¥í¡¼¥ë¤µ¤»¤ë¤Î¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ç¤â¤Ç¤­¤Þ¤¹¤·¡¢¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÃæ¤Ç¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2(Ãæ¥Ü¥¿¥ó)¤ò²¡¤·¤¿¤Þ¤Þ¥É¥é¥Ã¥°¤·¤Æ¤â¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $sayings_demo + $sayings_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'sayings'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +sayings_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>10) {|w| + sv = TkScrollbar.new(w) + sh = TkScrollbar.new(w, 'orient'=>'horizontal') + sayings_lbox = TkListbox.new(w) { + setgrid 1 + width 20 + height 10 + yscrollcommand proc{|first,last| sv.set first,last} + xscrollcommand proc{|first,last| sh.set first,last} + } + sv.command(proc{|*args| sayings_lbox.yview(*args)}) + sh.command(proc{|*args| sayings_lbox.xview(*args)}) + + if $tk_version =~ /^4\.[01]/ + sv.pack('side'=>'right', 'fill'=>'y') + sh.pack('side'=>'bottom', 'fill'=>'x') + sayings_lbox.pack('expand'=>'yes', 'fill'=>'y') + + else + sayings_lbox.grid('row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + sv.grid('row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + sh.grid('row'=>1, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0) + end + +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +sayings_lbox.insert(0, +"Waste not, want not", +"Early to bed and early to rise makes a man healthy, wealthy, and wise", +"Ask not what your country can do for you, ask what you can do for your country", +"I shall return", +"NOT", +"A picture is worth a thousand words", +"User interfaces are hard to build", +"Thou shalt not steal", +"A penny for your thoughts", +"Fool me once, shame on you; fool me twice, shame on me", +"Every cloud has a silver lining", +"Where there's smoke there's fire", +"It takes one to know one", +"Curiosity killed the cat", +"Take this job and shove it", +"Up a creek without a paddle", +"I'm mad as hell and I'm not going to take it any more", +"An apple a day keeps the doctor away", +"Don't look a gift horse in the mouth" +) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/search.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/search.rb new file mode 100644 index 0000000..9838ff5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/search.rb @@ -0,0 +1,184 @@ +# -*- coding: euc-jp -*- +# +# Text Search widget demo (called by 'widget') +# + +# textLoadFile -- +# This method below loads a file into a text widget, discarding +# the previous contents of the widget. Tags for the old widget are +# not affected, however. +# +# Arguments: +# w - The window into which to load the file. Must be a +# text widget. +# file - The name of the file to load. Must be readable. + +def textLoadFile(w,file) + w.delete('1.0', 'end') + f = open(file, 'r') + while(!f.eof?) + w.insert('end', f.read(1000)) + end + f.close +end + +# textSearch -- +# Search for all instances of a given string in a text widget and +# apply a given tag to each instance found. +# +# Arguments: +# w - The window in which to search. Must be a text widget. +# string - The string to search for. The search is done using +# exact matching only; no special characters. +# tag - Tag to apply to each instance of a matching string. + +def textSearch(w, string, tag) + tag.remove('0.0', 'end') + return if string == "" + cur = '1.0' + loop { + cur, len = w.search_with_length(string, cur, 'end') + break if cur == "" + tag.add(cur, "#{cur} + #{len} char") + cur = w.index("#{cur} + #{len} char") + } +end + +# textToggle -- +# This method is invoked repeatedly to invoke two commands at +# periodic intervals. It normally reschedules itself after each +# execution but if an error occurs (e.g. because the window was +# deleted) then it doesn't reschedule itself. +# +# Arguments: +# cmd1 - Command to execute when method is called. +# sleep1 - Ms to sleep after executing cmd1 before executing cmd2. +# cmd2 - Command to execute in the *next* invocation of this method. +# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again. + +def textToggle(cmd1,sleep1,cmd2,sleep2) + sleep_list = [sleep2, sleep1] + TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep}, + -1, cmd1, cmd2).start(sleep1) +end + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($search_demo) && $search_demo + $search_demo.destroy + $search_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$search_demo = TkToplevel.new {|w| + title("Text Demonstration - Search and Highlight") + iconname("search") + positionWindow(w) +} + +base_frame = TkFrame.new($search_demo).pack(:fill=>:both, :expand=>true) + +# frame À¸À® +$search_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $search_demo + $search_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'search'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>'¥Õ¥¡¥¤¥ë̾:', + 'width'=>13, 'anchor'=>'w').pack('side'=>'left') + $search_fileName = TkVariable.new + TkEntry.new(f, 'width'=>40, + 'textvariable'=>$search_fileName) { + pack('side'=>'left') + bind('Return', proc{textLoadFile($search_text, $search_fileName.value) + $search_string_entry.focus}) + focus + } + TkButton.new(f, 'text'=>'Æɤ߹þ¤ß', + 'command'=>proc{textLoadFile($search_text, + $search_fileName.value)})\ + .pack('side'=>'left', 'pady'=>5, 'padx'=>10) +}.pack('side'=>'top', 'fill'=>'x') + +TkFrame.new(base_frame) {|f| + TkLabel.new(f, 'text'=>'¸¡º÷ʸ»úÎó:', + 'width'=>13, 'anchor'=>'w').pack('side'=>'left') + $search_searchString = TkVariable.new + $search_string_entry = TkEntry.new(f, 'width'=>40, + 'textvariable'=>$search_searchString) { + pack('side'=>'left') + bind('Return', proc{textSearch($search_text, $search_searchString.value, + $search_Tag)}) + } + TkButton.new(f, 'text'=>'ȿž', + 'command'=>proc{textSearch($search_text, + $search_searchString.value, + $search_Tag)}) { + pack('side'=>'left', 'pady'=>5, 'padx'=>10) + } +}.pack('side'=>'top', 'fill'=>'x') + +$search_text = TkText.new(base_frame, 'setgrid'=>true) {|t| + $search_Tag = TkTextTag.new(t) + TkScrollbar.new(base_frame, 'command'=>proc{|*args| t.yview(*args)}) {|sc| + t.yscrollcommand(proc{|first,last| sc.set first,last}) + pack('side'=>'right', 'fill'=>'y') + } + pack('expand'=>'yes', 'fill'=>'both') +} + +# Set up display styles for text highlighting. + +if TkWinfo.depth($search_demo) > 1 + textToggle(proc{ + $search_Tag.configure('background'=>'#ce5555', + 'foreground'=>'white') + }, + 800, + proc{ + $search_Tag.configure('background'=>'', 'foreground'=>'') + }, + 200 ) +else + textToggle(proc{ + $search_Tag.configure('background'=>'black', + 'foreground'=>'white') + }, + 800, + proc{ + $search_Tag.configure('background'=>'', 'foreground'=>'') + }, + 200 ) +end +$search_text.insert('1.0', "\ +¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï¸¡º÷µ¡¹½¤ò¼Â¸½¤¹¤ë¤Î¤Ë¥Æ¥­¥¹¥È widget ¤Î¥¿¥°µ¡Ç½¤¬¤É¤Î \ +¤è¤¦¤Ë»È¤ï¤ì¤ë¤Î¤«¤ò¥Ç¥â¤¹¤ë¤â¤Î¤Ç¤¹¡£¤Þ¤º¾å¤Î¥¨¥ó¥È¥ê¤Ë¥Õ¥¡¥¤¥ë̾¤òÆþ \ +¤ì¡¢<¥ê¥¿¡¼¥ó> ¤ò²¡¤¹¤«¡Ö¥í¡¼¥É¡×¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£¼¡¤Ë¤½¤Î²¼¤Î \ +¥¨¥ó¥È¥ê¤Ëʸ»úÎó¤òÆþÎϤ·¡¢<¥ê¥¿¡¼¥ó> ¤ò²¡¤¹¤«¡Öȿž¡×¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤¯ \ +¤À¤µ¤¤¡£¤¹¤ë¤È¥Õ¥¡¥¤¥ëÃæ¤Î¡¢¸¡º÷ʸ»úÎó¤È°ìÃפ¹¤ëÉôʬ¤ËÁ´¤Æ \"search_Tag\" \ +¤È¤¤¤¦¥¿¥°¤¬¤Ä¤±¤é¤ì¡¢¥¿¥°¤Îɽ¼¨Â°À­¤È¤·¤Æ¤½¤Îʸ»úÎó¤¬ÅÀÌǤ¹¤ë¤è¤¦¤Ë \ +ÀßÄꤵ¤ì¤Þ¤¹¡£\n") +$search_text.insert('end', "\ +¥Õ¥¡¥¤¥ëÆɤ߹þ¤ß¤Î¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ï \"#{Dir.pwd}\" ¤Ç¤¹¡£\ +") +$search_text.set_insert '0.0' + +$search_fileName.value = '' +$search_searchString.value = '' + +$search_text.width = 60 +$search_text.height = 20 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/spin.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/spin.rb new file mode 100644 index 0000000..8d4e33c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/spin.rb @@ -0,0 +1,71 @@ +# -*- coding: euc-jp -*- +# +# spin.rb -- +# +# This demonstration script creates several spinbox widgets. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($spin_demo) && $spin_demo + $spin_demo.destroy + $spin_demo = nil +end + +$spin_demo = TkToplevel.new {|w| + title("Spinbox Demonstration") + iconname("spin") + positionWindow(w) +} + +base_frame = TkFrame.new($spin_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><:top) +²¼¤Ë¤Ï£³¼ïÎà¤Î¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +¤½¤ì¤¾¤ì¡¢¥Þ¥¦¥¹¤ÇÁªÂò¤·¤Æʸ»ú¤òÆþÎϤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +ÊÔ½¸Áàºî¤È¤·¤Æ¤Ï¡¢Emacs ·Á¼°¤Î¿¤¯¤Ë²Ã¤¨¤Æ¡¢°ìÈÌŪ¤Ê +Motif ·Á¼°¤Î¥­¡¼Áàºî¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ +Backspace ¤È Control-h ¤È¤ÏÆþÎÏ¥«¡¼¥½¥ë¤Îº¸Â¦¤Îʸ»ú¤ò +ºï½ü¤·¡¢Delete ¤È Control-d ¤È¤Ï±¦Â¦¤Îʸ»ú¤òºï½ü¤·¤Þ¤¹¡£ +ÆþÎÏÏȤÎŤµ¤ò±Û¤¨¤ë¤è¤¦¤ÊŤ¤Ê¸»úÎó¤òÆþÎϤ·¤¿¾ì¹ç¤Ë¤Ï¡¢ +¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó£²¤ò²¡¤·¤Æ¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¡¢ÆþÎÏʸ»úÎó +¤ò¥¹¥­¥ã¥ó¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£ +¤Ê¤ª¡¢ºÇ½é¤Î¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹¤Ï¡¢À°¿ôÃͤȤߤʤµ¤ì¤ë¤è¤¦¤Ê +ʸ»úÎó¤·¤«ÆþÎϤ¬µö¤µ¤ì¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢ +£³ÈÖÌܤΥ¹¥Ô¥ó¥Ü¥Ã¥¯¥¹¤ÇÁªÂò¸õÊä¤Ë¸½¤ì¤ë¤Î¤Ï¥ª¡¼¥¹¥È¥é +¥ê¥¢¤ÎÅÔ»Ô̾¤Î¥ê¥¹¥È¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ +¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤ +¥Ö¥é¥ê¤¬ spinbox ¥¦¥£¥¸¥§¥Ã¥È¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¤³¤Î +¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤Ï spinbox ¥¦¥£ +¥¸¥§¥Ã¥È¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î Tk +¤òÁȤ߹ç¤ï¤»¤Æ»î¤¹¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ +EOL + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $spin_demo.destroy + $spin_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'spin' + }).pack(:side=>:left, :expand=>true) +} + +australianCities = [ + 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide', + 'Brisbane', 'Hobart', 'Darwin', 'Alice Springs' +] + +[ + TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key, + :validatecommand=>[ + proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' + ]), + TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5, + :format=>'%05.2f', :width=>10), + TkSpinbox.new(base_frame, :values=>australianCities, :width=>10) +].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/square b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/square new file mode 100644 index 0000000..00bfde5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/square @@ -0,0 +1,81 @@ +#!/usr/bin/env ruby + +# square -- +# This script generates a demo application containing only +# a "square" widget. It's only usable if Tk has been compiled +# with tkSquare.c and with the -DSQUARE_DEMO compiler switch. +# This demo arranges the following bindings for the widget: +# +# Button-1 press/drag: moves square to mouse +# "a": toggle size animation on/off +# + +require 'tk' +require 'tkafter' + +class TkSquare'yes', 'fill'=>'both') + bind('1', proc{|x,y| center(x,y)}, '%s %y') + bind('B1-Motion', proc{|x,y| center(x,y)}, '%s %y') + bind('a', proc{animate}) + focus +} +TkRoot.new.minsize(1,1) + +# The procedure below centers the square on a given position. + +def center(x,y) + a = $s.size + $s.position(x-(a/2), y-(a/2)) +end + +# The procedures below provide a simple form of animation where +# the box changes size in a pulsing pattern: larger, smaller, larger, +# and so on. + +$inc = 0 + +def timer_proc + a = $s.size + return if $inc == 0 + $inc = -3 if a >= 40 + $inc = 3 if a <= 10 + $s.size(a+$inc) +end + +$timer = TkAfter.new(30, -1, proc{timer_proc}) + +def animate + if $inc == 0 + $inc = 3 + $timer.start + else + $inc = 0 + $timer.stop + end +end + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/states.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/states.rb new file mode 100644 index 0000000..5e242b7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/states.rb @@ -0,0 +1,74 @@ +# -*- coding: euc-jp -*- +# +# listbox widget demo 'states' (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($states_demo) && $states_demo + $states_demo.destroy + $states_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$states_demo = TkToplevel.new {|w| + title("Listbox Demonstration (states)") + iconname("states") + positionWindow(w) +} + +base_frame = TkFrame.new($states_demo).pack(:fill=>:both, :expand=>true) + +# label À¸À® +msg = TkLabel.new(base_frame) { + font $font + wraplength '4i' + justify 'left' + text "²¼¤Ë¤¢¤ë¤Î¤ÏÅÔÆ»Éܸ©Ì¾¤¬Æþ¤Ã¤¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼ÉդΥꥹ¥È¥Ü¥Ã¥¯¥¹¤Ç¤¹¡£¥ê¥¹¥È¤ò¥¹¥¯¥í¡¼¥ë¤µ¤»¤ë¤Î¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ç¤â¤Ç¤­¤Þ¤¹¤·¡¢¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÃæ¤Ç¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2(Ãæ¥Ü¥¿¥ó)¤ò²¡¤·¤¿¤Þ¤Þ¥É¥é¥Ã¥°¤·¤Æ¤â¤Ç¤­¤Þ¤¹¡£" +} +msg.pack('side'=>'top') + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $states_demo + $states_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'states'} + }.pack('side'=>'left', 'expand'=>'yes') + +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +states_lbox = nil +TkFrame.new(base_frame, 'borderwidth'=>'.5c') {|w| + s = TkScrollbar.new(w) + states_lbox = TkListbox.new(w) { + setgrid 1 + height 12 + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| states_lbox.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + states_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both') +}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y') + +ins_data = [ + '°¦ÃÎ','ÀÄ¿¹','½©ÅÄ','ÀÐÀî','°ñ¾ë','´ä¼ê','°¦É²', + 'Âçʬ','Âçºå','²¬»³','²­Æì','¹áÀî','¼¯»ùÅç','¿ÀÆàÀî', + '´ôÉì','µþÅÔ','·§ËÜ','·²ÇÏ','¹âÃÎ','ºë¶Ì','º´²ì', + '¼¢²ì','ÀŲ¬','Å纬','ÀéÍÕ','Åìµþ','ÆÁÅç','ÆÊÌÚ', + 'Ä»¼è','ÉÙ»³','Ĺºê','ĹÌî','ÆàÎÉ','¿·³ã','ʼ¸Ë', + '¹­Åç','Ê¡°æ','Ê¡²¬','Ê¡Åç','Ë̳¤Æ»','»°½Å','µÜ¾ë', + 'µÜºê','»³·Á','»³¸ý','»³Íü','ϲλ³' +] + +states_lbox.insert(0, *ins_data) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/style.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/style.rb new file mode 100644 index 0000000..66b6de0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/style.rb @@ -0,0 +1,270 @@ +# -*- coding: euc-jp -*- +# +# text (display styles) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($style_demo) && $style_demo + $style_demo.destroy + $style_demo = nil +end + + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$style_demo = TkToplevel.new {|w| + title("Text Demonstration - Display Styles") + iconname("style") + positionWindow(w) +} + +base_frame = TkFrame.new($style_demo).pack(:fill=>:both, :expand=>true) + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $style_demo + $style_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'style'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + + +# text À¸À® +txt = TkText.new(base_frame){|t| + # À¸À® + setgrid 'true' + #width 70 + #height 32 + wrap 'word' + font $font + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # ¥Æ¥­¥¹¥È¥¿¥°ÀßÄê (¥Õ¥©¥ó¥È´ØÏ¢) + family = 'Courier' + + if $tk_version =~ /^4.*/ + style_tag_bold = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-O-Normal--*-120-*-*-*-*-*-*') + style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font) + style_tag_verybig = TkTextTag.new(t, 'font'=>'-*-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*') + # style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font) + style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*') + else + style_tag_bold = TkTextTag.new(t, 'font'=>[family, 12, :bold, :italic]) + style_tag_big = TkTextTag.new(t, 'font'=>[family, 14, :bold]) + style_tag_verybig = TkTextTag.new(t, 'font'=>['Helvetica', 24, :bold]) + style_tag_small = TkTextTag.new(t, 'font'=>'Times 8 bold') + end +### +# case($tk_version) +# when /^4.*/ +# style_tag_big = TkTextTag.new(t, 'font'=>'-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*', 'kanjifont'=>$msg_kanji_font) +# style_tag_small = TkTextTag.new(t, 'font'=>'-Adobe-Helvetica-Bold-R-Normal-*-100-*', 'kanjifont'=>$kanji_font) +# when /^8.*/ +# unless $style_demo_do_first +# $style_demo_do_first = true +# Tk.tk_call('font', 'create', '@bigascii', +# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*') +# Tk.tk_call('font', 'create', '@smallascii', +# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*') +# Tk.tk_call('font', 'create', '@cBigFont', +# '-compound', '@bigascii @msg_knj') +# Tk.tk_call('font', 'create', '@cSmallFont', +# '-compound', '@smallascii @kanji') +# end +# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont') +# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont') +# end + + # ¥Æ¥­¥¹¥È¥¿¥°ÀßÄê (¿§¡¤¥ì¥ê¡¼¥Õ´ØÏ¢) + if TkWinfo.depth($root).to_i > 1 + style_tag_color1 = TkTextTag.new(t, 'background'=>'#a0b7ce') + style_tag_color2 = TkTextTag.new(t, 'foreground'=>'red') + style_tag_raised = TkTextTag.new(t, 'relief'=>'raised', 'borderwidth'=>1) + style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1) + else + style_tag_color1 = TkTextTag.new(t, 'background'=>'black', + 'foreground'=>'white') + style_tag_color2 = TkTextTag.new(t, 'background'=>'black', + 'foreground'=>'white') + style_tag_raised = TkTextTag.new(t, 'background'=>'white', + 'relief'=>'raised', 'borderwidth'=>1) + style_tag_sunken = TkTextTag.new(t, 'background'=>'white', + 'relief'=>'sunken', 'borderwidth'=>1) + end + + # ¥Æ¥­¥¹¥È¥¿¥°ÀßÄê (¤½¤Î¾) + if $tk_version =~ /^4\.[01]/ + style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black', + 'borderwidth'=>0, + 'bgstipple'=>'gray25') + else + style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black', + 'borderwidth'=>0, + 'bgstipple'=>'gray12') + end + style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50') + style_tag_underline = TkTextTag.new(t, 'underline'=>'on') + style_tag_overstrike = TkTextTag.new(t, 'overstrike'=>'on') + style_tag_right = TkTextTag.new(t, 'justify'=>'right') + style_tag_center = TkTextTag.new(t, 'justify'=>'center') + if $tk_version =~ /^4.*/ + style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*') + style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*') + else + style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>[family, 10]) + style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>[family, 10]) + end + style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m', + 'rmargin'=>'10m') + style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p', + 'lmargin1'=>'12m', 'lmargin2'=>'6m', + 'rmargin'=>'10m') + + # ¥Æ¥­¥¹¥ÈÁÞÆþ + insert('end', '¤³¤Î¤è¤¦¤Ë¥Æ¥­¥¹¥È widget ¤Ï¾ðÊó¤òÍÍ¡¹¤Ê¥¹¥¿¥¤¥ë¤Çɽ¼¨¤¹¤ë¤³¤È +¤¬¤Ç¤­¤Þ¤¹¡£') + insert('end', '¥¿¥°', style_tag_big) + insert('end', '¤È¤¤¤¦¥á¥«¥Ë¥º¥à¤Ç¥³¥ó¥È¥í¡¼¥ë¤µ¤ì¤Þ¤¹¡£ +¥¿¥°¤È¤Ï¥Æ¥­¥¹¥È widget Æâ¤Î¤¢¤ëʸ»ú (¤ÎÈÏ°Ï)¤ËÂФ·¤ÆŬÍѤǤ­¤ë +ñ¤Ê¤ë̾Á°¤Î¤³¤È¤Ç¤¹¡£¥¿¥°¤ÏÍÍ¡¹¤Êɽ¼¨¥¹¥¿¥¤¥ë¤ËÀßÄê¤Ç¤­¤Þ¤¹¡£ +ÀßÄꤹ¤ë¤È¡¢¤½¤Î¥¿¥°¤Î¤Ä¤¤¤¿Ê¸»ú¤Ï»ØÄꤷ¤¿¥¹¥¿¥¤¥ë¤Çɽ¼¨¤µ¤ì¤ë +¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£»ÈÍѤǤ­¤ëɽ¼¨¥¹¥¿¥¤¥ë¤Ï¼¡¤ÎÄ̤ê¤Ç¤¹¡£ +') + insert('end', ' +1. ¥Õ¥©¥ó¥È', style_tag_big) + insert('end', ' ¤É¤ó¤Ê X ¤Î¥Õ¥©¥ó¥È¤Ç¤â»È¤¨¤Þ¤¹¡£') + insert('end', 'large', style_tag_verybig) + insert('end', ' +¤È¤«') +# insert('end', '¾®¤µ¤¤', style_tag_small) + insert('end', 'small', style_tag_small) + insert('end', '¤È¤«¡£ +') + insert('end', ' +2. ¿§', style_tag_big) + insert('end', ' ') + insert('end', 'ÇØ·Ê¿§', style_tag_color1) + insert('end', '¤â') + insert('end', 'Á°·Ê¿§', style_tag_color2) + insert('end', '¤â') + insert('end', 'ξÊý', style_tag_color1, style_tag_color2) + insert('end', '¤È¤âÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +3. ÌÖ¤«¤±', style_tag_big) + insert('end', ' ¤³¤Î¤è¤¦¤ËÉÁ²è¤ÎºÝ¤Ë') + insert('end', 'Çطʤâ', style_tag_bgstipple) + insert('end', 'ʸ»ú¤â', style_tag_fgstipple) + insert('end', 'ñ¤Ê¤ëÅɤê¤Ä¤Ö¤· +¤Ç¤Ê¤¯¡¢ÌÖ¤«¤±¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +4. ²¼Àþ', style_tag_big) + insert('end', ' ¤³¤Î¤è¤¦¤Ë') + insert('end', 'ʸ»ú¤Ë²¼Àþ¤ò°ú¤¯', style_tag_underline) + insert('end', '¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +5. ÂǤÁ¾Ã¤·Àþ', style_tag_big) + insert('end', ' ¤³¤Î¤è¤¦¤Ë') + insert('end', 'ʸ»ú¤Ë½Å¤Í¤ÆÀþ¤ò°ú¤¯', style_tag_overstrike) + insert('end', '¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +6. 3D ¸ú²Ì', style_tag_big) + insert('end', ' ÇطʤËÏȤò¤Ä¤±¤Æ¡¢Ê¸»ú¤ò') + insert('end', 'Èô¤Ó½Ð¤¹', style_tag_raised) + insert('end', '¤è¤¦¤Ë¤·¤¿¤ê') + insert('end', 'ÄÀ¤à', style_tag_sunken) + insert('end', ' +¤è¤¦¤Ë¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +7. ¹Ô·¤¨', style_tag_big) + insert('end', ' ¤³¤Î¤è¤¦¤Ë¹Ô¤ò +') + insert('end', 'º¸¤Ë·¤¨¤¿¤ê +') + insert('end', '±¦¤Ë·¤¨¤¿¤ê +', style_tag_right) + insert('end', '¿¿Ãæ¤Ë·¤¨¤¿¤ê¤Ç¤­¤Þ¤¹¡£ +', style_tag_center) + insert('end', ' +8. ¸ªÉÕ¤­Ê¸»ú¤Èź»ú', style_tag_big) + insert('end', ' 10') + insert('end', 'n', style_tag_super) + insert('end', ' ¤Î¤è¤¦¤Ë¸ªÉÕ¤­Ê¸»ú¤Î¸ú²Ì¤ä¡¢') + insert('end', ' +X') + insert('end', 'i', style_tag_sub) + insert('end', '¤Î¤è¤¦¤Ëź»ú¤Î¸ú²Ì¤ò½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +') + insert('end', ' +9. ¥Þ¡¼¥¸¥ó', style_tag_big) + insert('end', '¥Æ¥­¥¹¥È¤Îº¸Â¦¤Ë;ʬ¤Ê¶õÇò¤òÃÖ¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹: +') + insert('end', '¤³¤ÎÃÊÍî¤Ï¥Þ¡¼¥¸¥ó¤Î»ÈÍÑÎã¤Ç¤¹¡£¥¹¥¯¥ê¡¼¥ó', + style_tag_margins) + insert('end', '¾å¤ÇÀÞ¤êÊÖ¤µ¤ì¤Æɽ¼¨¤µ¤ì¤Æ¤¤¤ë1¹Ô¤Î¥Æ¥­¥¹¥È¤Ç¤¹¡£', + style_tag_margins) + insert('end', 'º¸Â¦¤Ë¤Ï2¼ïÎà¤Î¥Þ¡¼¥¸¥ó¤ò»ý¤Á¤Þ¤¹¡£', style_tag_margins) + insert('end', '1¹ÔÌܤËÂФ¹¤ë¤â¤Î¤È¡¢', style_tag_margins) + insert('end', '2¹ÔÌܰʹߤÎϢ³¤·¤¿¥Þ¡¼¥¸¥ó', style_tag_margins) + insert('end', '¤Ç¤¹¡£¤Þ¤¿±¦Â¦¤Ë¤â¥Þ¡¼¥¸¥ó¤¬¤¢¤ê¤Þ¤¹¡£', style_tag_margins) + insert('end', '¹Ô¤ÎÀÞ¤êÊÖ¤·°ÌÃÖ¤ò·è¤á¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +', style_tag_margins) + insert('end', ' +10. ¥¹¥Ú¡¼¥·¥ó¥°', style_tag_big) + insert('end', '3¤Ä¤Î¥Ñ¥é¥á¡¼¥¿¤Ç¹Ô¤Î¥¹¥Ú¡¼¥·¥ó¥°¤ò') + insert('end', 'À©¸æ¤¹ +¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Spacing1¤Ç¡¢¹Ô¤Î') + insert('end', '¾å¤Ë¤É¤Î¤¯¤é¤¤¤Î¶õ´Ö¤òÃÖ¤¯¤«¡¢ +spacing3') + insert('end', '¤Ç¹Ô¤Î²¼¤Ë¤É¤Î¤¯¤é¤¤¤Î¶õ´Ö¤òÃÖ¤¯¤«¡¢') + insert('end', '¹Ô¤¬ÀÞ¤êÊÖ¤µ¤ì¤Æ¤¤¤ë¤Ê¤é +¤Ð¡¢spacing2¤Ç¡¢') + insert('end', '¥Æ¥­¥¹¥È¹Ô¤òÀ¸À®¤·¤Æ¤¤¤ë¹Ô¤Î´Ö¤Ë¤É¤Î¤¯¤é¤¤') + insert('end', '¤Î¶õ´Ö¤òÃÖ +¤¯¤«¤ò¼¨¤·¤Þ¤¹¡£ +') + insert('end', '¤³¤ì¤é¤Î¥¤¥ó¥Ç¥ó¥È¤µ¤ì¤¿ÃÊÍî¤Ï¤É¤Î¤è¤¦¤Ë', + style_tag_spacing) + insert('end', '¥¹¥Ú¡¼¥·¥ó¥°¤¬¤¬¹Ô¤ï¤ì¤ë¤Î¤«¤ò¼¨¤·¤Þ¤¹¡£', + style_tag_spacing) + insert('end', '³ÆÃÊÍî¤Ï¼ÂºÝ¤Ï¥Æ¥­¥¹¥Èwidget', style_tag_spacing) + insert('end', '¤Î1¹Ô¤Ç¡¢widget¤Ë¤è¤Ã¤ÆÀÞ¤ê¾ö¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +', style_tag_spacing) + insert('end', 'Spacing1¤Ï¤³¤Î¥Æ¥­¥¹¥È¤Ç¤Ï10point¤Ë', style_tag_spacing) + insert('end', 'ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£', style_tag_spacing) + insert('end', '¤³¤ì¤Ë¤è¤ê¡¢ÃÊÍî¤Î´Ö¤ËÂ礭¤Ê´Ö³Ö¤¬', style_tag_spacing) + insert('end', '¸ºß¤·¤Æ¤¤¤Þ¤¹¡£', style_tag_spacing) + insert('end', 'Spacing2¤Ï2point¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£', style_tag_spacing) + insert('end', '¤³¤ì¤ÇÃÊÍî¤ÎÃæ¤Ë¤Û¤ó¤Î¾¯¤·´Ö³Ö¤¬Â¸ºß¤·¤Æ¤¤¤Þ¤¹¡£', + style_tag_spacing) + insert('end', 'Spacing3¤Ï¤³¤ÎÎã¤Ç¤Ï»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +', style_tag_spacing) + insert('end', '´Ö³Ö¤¬¤É¤³¤Ë¤¢¤ë¤«¤ò¸«¤¿¤±¤ì¤Ð¡¢¤³¤ì¤é¤ÎÃÊÍî¤Î', + style_tag_spacing) + insert('end', '¤Ê¤«¤Ç¥Æ¥­¥¹¥È¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£ÁªÂò¤Î', style_tag_spacing) + insert('end', 'ȿž¤·¤¿Éôʬ¤Ë¤Ï;ʬ¤Ë¤È¤é¤ì¤¿´Ö³Ö¤¬', style_tag_spacing) + insert('end', '´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +', style_tag_spacing) + +} + +txt.width 70 +txt.height 32 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tcolor b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tcolor new file mode 100644 index 0000000..17f7e13 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tcolor @@ -0,0 +1,534 @@ +#!/usr/bin/env ruby +# -*- coding: euc-jp -*- +# +# tcolor -- +# ¤³¤Î¥¹¥¯¥ê¥×¥È¤ÏRGB,HSB,CYM·Á¼°¤ò¥µ¥Ý¡¼¥È¤¹¤ë +# ´Ê°×¥«¥é¡¼¥¨¥Ç¥£¥¿¤Ç¤¹¡£ +# +# Copyright (C) 1998 Takaaki Tateishi(ttate@jaist.ac.jp) +# last update: Thu Jun 18 06:32:35 JST 1998 +# + +# ¤Þ¤º¤Ïtk.rb¤òÆɤ߹þ¤à¡£ + +require "tk" + + +# Tk¤Ë¤è¤Ã¤ÆÊѹ¹¤µ¤ì¤ëÊÑ¿ô¤ÏTkVariable¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤ò»È¤¦¡£ + +$colorSpace = TkVariable.new(:rgb) +$master = nil +$red = 65535 +$green = 0 +$blue = 0 +$color = "#ffff00000000" +$updating = TkVariable.new(0) +$autoUpdate = TkVariable.new(1) +$name = TkVariable.new($color) +$command = TkVariable.new("print(%%,\"\n\")") +# $command = TkVariable.new("") +$label1 = TkVariable.new("label1") +$label2 = TkVariable.new("label2") +$label3 = TkVariable.new("label3") + + +# ¥ê¥½¡¼¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÀßÄê +if (TkVarAccess.new('tcl_platform')['platform'] == 'unix') + TkOptionDB.add('*Entry.background', 'white') +end + + +# ³Æ¥¤¥Ù¥ó¥ÈÍѤΥ᥽¥Ã¥É + +def rgbToHsv(red,green,blue) + + if ( red > green ) + max = red + min = green + else + max = green + min = red + end + + if ( blue > max ) + max = blue + else + if ( blue < min ) + min = blue + end + end + + range = max - min + + if ( max == 0 ) + sat = 0.0 + else + sat = (max-min)/max + end + + if ( sat == 0 ) + hue = 0.0 + else + rc = (max-red)/range + gc = (max-green)/range + bc = (max-blue)/range + if ( red == max ) + hue = 0.166667 * (bc - gc) + else + if ( green == max ) + hue = 0.166667 * (2.0 + rc - bc) + else + hue = 0.166667 * (4.0 + gc - rc) + end + end + if ( hue < 0.0 ) + hue = hue + 1.0 + end + end + + [hue,sat,max/65535] +end + + +def hsbToRgb(hue,sat,value) + v = 65535.0 * value + if( sat == 0 ) + ans = [v,v,v] + else + hue = hue*6.0 + if ( hue >= 6 ) + hue = 0.0 + end + i = hue.to_i + f = hue - i + p = 65535.0 * value * (1.0 - sat) + q = 65535.0 * value * (1.0 - (sat * f)) + t = 65535.0 * value * (1.0 - (sat * (1.0 - f))) + case i + when 0 + ans = [v,t,p] + when 1 + ans = [q,v,p] + when 2 + ans = [p,v,t] + when 3 + ans = [p,q,v] + when 4 + ans = [t,p,v] + when 5 + ans = [v,p,q] + else + raise(eException,"i value #{i} is out of range") + end + end + return ans +end + + +def _null_binding + Module.new.instance_eval{binding} +end +private :_null_binding + +def doUpdate + newCmd = $command.to_s.gsub("%%","\"#{$color}\"") + eval(newCmd, _null_binding) +end + + +def tc_scaleChanged + if( $updating.to_i == 1 ) + return + end + + $master = :scale if $master == nil + + scale1 = $root.middle.middle.scale1 + scale2 = $root.middle.middle.scale2 + scale3 = $root.middle.middle.scale3 + + case $colorSpace.value.intern + when :rgb + $red = (scale1.get * 65.535).to_i + $green = (scale2.get * 65.535).to_i + $blue = (scale3.get * 65.535).to_i + when :cmy + $red = (65535 - scale1.get * 65.535).to_i + $green = (65535 - scale2.get * 65.535).to_i + $blue = (65535 - scale3.get * 65.535).to_i + when :hsb + list = hsbToRgb(scale1.get / 1000.0, + scale2.get / 1000.0, + scale3.get / 1000.0) + $red = list[0] + $green = list[1] + $blue = list[2] + else + raise(Exception,"unknown colorSpace") + end + $color = format("#%04x%04x%04x",$red.to_i,$green.to_i,$blue.to_i) + $name.value = $color if $master == :scale + $root.middle.right.set_color($color) + if( $autoUpdate.to_i == 1 ) + doUpdate + end + Tk.update(true) + $master = nil if $master == :scale +end + + +def tc_setScales + $updating.value = 1 + + scale1 = $root.middle.middle.scale1 + scale2 = $root.middle.middle.scale2 + scale3 = $root.middle.middle.scale3 + + case $colorSpace.value.intern + when :rgb + scale1.set($red / 65.535) + scale2.set($green / 65.535) + scale3.set($blue / 65.535) + when :cmy + scale1.set((65535 - $red) / 65.535) + scale2.set((65535 - $green) / 65.535) + scale3.set((65535 - $blue) / 65.535) + when :hsb + list = rgbToHsv($red,$green,$blue) + scale1.set( list[0] * 1000.0 ) + scale2.set( list[1] * 1000.0 ) + scale3.set( list[2] * 1000.0 ) + else + raise(Exception,"unknown colorSpace") + end + + $updating.value = 0 +end + + +def tc_loadNamedColor(name) + $name.value = name + $master = :name if $master == nil + if name[0,1] != "#" + list = TkWinfo.rgb($root.middle.right.swatch,name) + $red = list[0] + $green = list[1] + $blue = list[2] + else + case name.length + when 4 + fmt = /#(.{1})(.{1})(.{1})/ + shift = 12 + when 7 + fmt = /#(.{2})(.{2})(.{2})/ + shift = 8 + when 10 + fmt = /#(.{3})(.{3})(.{3})/ + shift = 4 + when 13 + fmt = /#(.{4})(.{4})(.{4})/ + shift = 0 + else + raise(eException,"syntax error in color name \"#{name}\"") + end + name.scan(fmt){|strlist| + if strlist.length != 3 + raise(eException,"syntax error in color name \"#{name}\"") + end + $red = strlist[0].hex + $green = strlist[1].hex + $blue = strlist[2].hex + } + $red = $red << shift + $green = $green << shift + $blue = $blue << shift + end + + tc_setScales + $color = format("#%04x%04x%04x",$red,$green,$blue) + $root.middle.right.set_color($color) + if $autoUpdate.to_i == 1 + doUpdate + end + Tk.update(true) + $master = nil if $master == :name +end + + +def changeColorSpace(space) + case space + when :rgb + $label1.value = "Red" + $label2.value = "Green" + $label3.value = "Blue" + when :cmy + $label1.value = "Cyan" + $label2.value = "Magenta" + $label3.value = "Yellow" + when :hsb + $label1.value = "Hue" + $label2.value = "Saturation" + $label3.value = "Brightness" + end + tc_setScales +end + + + + + +# tcolorÍѤΥá¥Ë¥å¡¼ + +class TkColorMenuFrame"raised", + "borderwidth"=>"2") + + # File¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤ÎÀ¸À® + @file = TkMenubutton.new(self){|button| + + # File¥á¥Ë¥å¡¼¤ÎºîÀ® + @file_menu = TkMenu.new(button){ + add "radio", + "label" => "RGB color space", + "variable" => $colorSpace, + "value" => :rgb, + "underline" => "0", + "command" => proc{changeColorSpace(:rgb)} + add "radio", + "label" => "CMY color space", + "variable" => $colorSpace, + "value" => :cmy, + "underline" => "0", + "command" => proc{changeColorSpace(:cmy)} + add "radio", + "label" => "HSB color space", + "variable" => $colorSpace, + "value" => :hsb, + "underline" => "0", + "command" => proc{changeColorSpace(:hsb)} + add "separator" + add "radio", + "label" => "Automatic updates", + "variable" => $autoUpdate, + "value" => "1", + "underline" => "0" + add "radio", + "label" => "Manual updates", + "variable" => $autoUpdate, + "value" => "0", + "underline" => "0" + add "separator" + add "command", + "label" => "Exit program", + "underline" => "0", + "command" => proc{exit} + } + + # File¥á¥Ë¥å¡¼¤ÈFile¥Ü¥¿¥ó¤ò´ØÏ¢ÉÕ¤±¤ë + menu @file_menu + + text "File" + underline "0" + }.pack("side"=>"left") + + self + end +end + + +# ²¼Éô¤Î¥Õ¥ì¡¼¥à¤Î¤¿¤á¤Î¥¯¥é¥¹ +class TkColorBotFrame "raised", + "borderwidth"=> 2) + + @commandLabel = TkLabel.new(self, + "text"=> "Command:") + @command = TkEntry.new(self, + "relief"=> "sunken", + "borderwidth"=> "2", + "textvariable"=> $command, + "font"=> "-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @update = TkButton.new(self, + "text"=> "Update", + "command"=> proc{doUpdate}) + @commandLabel.pack("side"=>"left") + @update.pack("side"=>"right","pady"=>".1c","padx"=>".25c") + @command.pack("expand"=>"yes","fill"=>"x","ipadx"=>".25c") + + self + end +end + + +# ÃæÃʺ¸¤Î¥Õ¥ì¡¼¥à +class TkColorMiddleLeftFrame"vertical", + "relief"=>"sunken", + "borderwidth"=>"2") + @scroll.pack("side"=>"right","fill"=>"y") + @names = TkListbox.new(self, + "width"=>"20", + "height"=>"12", + "yscrollcommand"=> proc{|first,last| @scroll.set first,last}, + "relief"=>"sunken", + "borderwidth"=>"2", + "exportselection"=>"false") + @scroll.command(proc{|*args| @names.yview(*args)}) + @names.bind("Double-1",proc{ + tc_loadNamedColor(@names.get(@names.curselection))}) + @names.pack("side"=>"left") + while (line = f.gets) + line.chop! + linelist = line.split(/[ \t]+/) + if linelist.length == 4 + @names.insert("end",linelist[3]) + end + end + f.close + break + end + + self + end +end + + +# ÃæÃÊÃæ±û¤Î¥Õ¥ì¡¼¥à +class TkColorMiddleMiddleFrame"top","expand"=>"yes") + end + @f4.pack("side"=>"top","expand"=>"yes","fill"=>"x") + + @label1 = TkLabel.new(self,"textvariable"=>$label1) + @scale1 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale1.pack("side"=>"top","anchor"=>"w") + @label1.pack("side"=>"top","anchor"=>"w") + + @label2 = TkLabel.new(self,"textvariable"=>$label2) + @scale2 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale2.pack("side"=>"top","anchor"=>"w") + @label2.pack("side"=>"top","anchor"=>"w") + + @label3 = TkLabel.new(self,"textvariable"=>$label3) + @scale3 = TkScale.new(self,"from"=>"0","to"=>"1000","length"=>"6c", + "orient"=>"horizontal", + "command"=>proc{tc_scaleChanged}) + @scale3.pack("side"=>"top","anchor"=>"w") + @label3.pack("side"=>"top","anchor"=>"w") + + @nameLabel = TkLabel.new(self,"text"=>"Name:") + @name = TkEntry.new(self,"relief"=>"sunken","borderwidth"=>"2", + "textvariable"=>$name,"width"=>"10", + "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @nameLabel.pack("side"=>"left") + @name.pack("side"=>"right", "expand"=>"1", "fill"=>"x") + @name.bind("Return",proc{tc_loadNamedColor $name.to_s}) + + self + end +end + + +class TkColorMiddleRightFrame"2c", "height"=>"5c", + "background"=>$color) + @value = TkLabel.new(self, + "text"=>$color, + "width"=>"13", + "font"=>"-Adobe-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*") + @swatch.pack("side"=>"top","expand"=>"yes","fill"=>"both") + @value.pack("side"=>"bottom","pady"=>".25c") + + self + end + + def set_color(color) + @swatch["background"] = color + @value["text"] = color + end +end + + + +# ÃæÃʤΥե졼¥à +class TkColorMiddleFrame "raised", + "borderwidth"=> "2") + + @left = TkColorMiddleLeftFrame.new(self) + @left.pack("side"=>"left","padx"=>".25c","pady"=>".25c") + + @middle = TkColorMiddleMiddleFrame.new(self) + @middle.pack("side"=>"left","expand"=>"yes","fill"=>"y") + + @right = TkColorMiddleRightFrame.new(self) + @right.pack("side"=>"left","padx"=>".25c","pady"=>".25c","anchor"=>"s") + + self + end +end + + +class TkColor"top", "fill"=>"x") + + @bottom = TkColorBotFrame.new(self) + @bottom.pack("side"=>"bottom","fill"=>"x") + + @middle = TkColorMiddleFrame.new(self) + @middle.pack("side"=>"top","fill"=>"both") + + self + end +end + + +$root = TkColor.new + +# ¥¤¥Ù¥ó¥È¤òÂԤİ٤˥롼¥×¤ËÆþ¤ë¡£ +changeColorSpace :rgb +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/text.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/text.rb new file mode 100644 index 0000000..0ae480e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/text.rb @@ -0,0 +1,120 @@ +# -*- coding: euc-jp -*- +# +# text (basic facilities) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($text_demo) && $text_demo + $text_demo.destroy + $text_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$text_demo = TkToplevel.new {|w| + title("Text Demonstration - Basic Facilities") + iconname("text") + positionWindow(w) +} + +base_frame = TkFrame.new($text_demo).pack(:fill=>:both, :expand=>true) + +# version check +if ((Tk::TK_VERSION.split('.').collect{|n| n.to_i} <=> [8,4]) < 0) + undo_support = false +else + undo_support = true +end + +# frame À¸À® +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $text_demo + $text_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'text'} + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# text À¸À® +TkText.new(base_frame){|t| + # À¸À® + relief 'sunken' + bd 2 + setgrid 1 + height 30 + TkScrollbar.new(base_frame) {|s| + pack('side'=>'right', 'fill'=>'y') + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + } + pack('expand'=>'yes', 'fill'=>'both') + + # ¥Æ¥­¥¹¥ÈÁÞÆþ + insert('0.0', <:both, :expand=>true) + +count = [0] + +## Define a widget that we peer from; it won't ever actually be shown though +first = TkText.new(base_frame, :widgetname=>"text#{count[0] += 1}") +first.insert :end,"¤³¤Î¥Ç¥â¤Ï°ì¤Ä¤ÎÁȤòÀ®¤·¤¿¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ò¼¨¤·¤Þ¤¹¡£" +first.insert :end,"¤½¤ì¤é¤Î¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ÏÂÐÅù(¥Ô¥¢;peer)¤Î´Ø·¸¤Ë" +first.insert :end,"¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£" +first.insert :end,"¤½¤ì¤é¤Ï¡¢´ðÈפȤʤë¥Ç¡¼¥¿¥â¥Ç¥ë¤Ï¶¦Ä̤Τâ¤Î¤ò»ý¤Á¤Þ¤¹¤¬¡¢" +first.insert :end,"²èÌÌɽ¼¨°ÌÃÖ¡¢ÊÔ½¸°ÌÃÖ¡¢ÁªÂòÈÏ°Ï(selection)¤Ë¤Ä¤¤¤Æ¤Ï" +first.insert :end,"ÆÈΩ¤Ë»ý¤Ä¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" +first.insert :end,"³Æ¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ÎÏƤˤ¢¤ë" +first.insert :end,"¡Ö¥Ô¥¢(peer)¤ÎºîÀ®¡×¥Ü¥¿¥ó¤ò»È¤¨¤Ð¡¢" +first.insert :end,"¿·¤¿¤Ê¥Ô¥¢¤òÄɲ乤뤳¤È¤¬²Äǽ¤Ç¤¹¡£" +first.insert :end,"¤Þ¤¿¡Ö¥Ô¥¢(peer)¤Î¾Ãµî¡×¥Ü¥¿¥ó¤ò»È¤¨¤Ð¡¢" +first.insert :end,"ÆÃÄê¤Î¥Ô¥¢¥¦¥£¥¸¥§¥Ã¥È¤ò¾Ãµî¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£" + +Tk.update_idletasks ## for 'first' widget + +## Procedures to make and kill clones; most of this is just so that the demo +## looks nice... +def makeClone(count, win, txt) + cnt = (count[0] += 1) + peer = TkText::Peer.new(txt, win, :widgetname=>"text#{cnt}") + sbar = TkScrollbar.new(win, :widgetname=>"sb#{cnt}") + peer.yscrollbar sbar + b1 = TkButton.new(win, :widgetname=>"clone#{cnt}", + :text=>'¥Ô¥¢(peer)¤ÎºîÀ®', + :command=>proc{makeClone(count, win, peer)}) + b2 = TkButton.new(win, :widgetname=>"kill#{cnt}", + :text=>'¥Ô¥¢(peer)¤Î¾Ãµî', + :command=>proc{killClone(win, cnt)}) + row = cnt * 2 + TkGrid.configure(peer, sbar, b1, :sticky=>'nsew', :row=>row) + TkGrid.configure('^', '^', b2, :sticky=>'nsew', :row=>(row+=1)) + TkGrid.configure(b1, b2, :sticky=>'new') + TkGrid.rowconfigure(win, b2, :weight=>1) +end + +def killClone(win, cnt) + Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}", + "#{win.path}.clone#{cnt}", "#{win.path}.kill#{cnt}") +end + +## Now set up the GUI +makeClone(count, base_frame, first) +makeClone(count, base_frame, first) +first.destroy + +## See Code / Dismiss buttons +TkFrame.new(base_frame){|f| + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $textpeer_demo.destroy + $textpeer_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'textpeer' + }).pack(:side=>:left, :expand=>true) + + TkGrid.configure(f, '-', '-', :sticky=>'ew', :row=>5000) +} +TkGrid.columnconfigure(base_frame, 0, :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/timer b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/timer new file mode 100644 index 0000000..58a41d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/timer @@ -0,0 +1,136 @@ +#!/usr/bin/env ruby +# +# timer -- +# This script generates a counter with start,stop and reset buttons. +# +# Copyright (C) 1998 Takaaki Tateishi (ttate@jaist.ac.jp) +# last update: Sat Jun 27 12:24:14 JST 1998 +# + +require "tk" +require "thread" +require "tkafter" + +$time = "0.00" +$m = Mutex.new +$loop = false + +def timer_stop + $loop = false + $m.lock +end + +def timer_start + $loop = true + $m.unlock +end + +def timer_reset + $time = "0.00" + $root.countframe.counter['text'] = $time +end + +def timer_loop + if $loop + $time = $time.succ + $root.countframe.counter['text'] = $time + end + Tk.after(10,proc{timer_loop}) +end + + +# +# thread version +# +def timer_loop2 + while true + $m.lock + $time = $time.succ + $root.countframe.counter['text'] = $time + sleep(0.01) + $m.unlock + end +end + +# +# TkAfter +# +def timer_loop3 + if $loop + $time = $time.succ + $root.countframe.counter['text'] = $time + end +end + + +class CountFrame < TkFrame + attr_reader :counter + + def initialize(parent=nil,keys=nil) + super(parent,keys) + @counter = TkLabel.new(self, + 'text'=>$time, + 'relief'=>'raised') + @counter.pack('fill'=>'both') + self + end +end + + +class ButtonFrame < TkFrame + def initialize(parent=nil,keys=nil) + super(parent,keys) +=begin + @stop = TkButton.new(self, + 'text'=>'Stop', + 'command'=>proc{timer_stop}) + @start = TkButton.new(self, + 'text'=>'Start', + 'command'=>proc{timer_start}) +=end + @stop = TkButton.new(self, :text=>'Stop', :state=>:disabled) + @start = TkButton.new(self, :text=>'Start', :state=>:normal) + + @stop.command proc{ + timer_stop + @start.state(:normal) + @stop.state(:disabled) + } + @start.command proc{ + timer_start + @stop.state(:normal) + @start.state(:disabled) + } + + @reset = TkButton.new(self, + 'text'=>'Reset', + 'command'=>proc{timer_reset}) + for b in [@stop,@start,@reset] + b.pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') + end + end +end + + +class Timer < TkRoot + attr_reader :countframe + + def initialize(*args) + super(*args) + @countframe = CountFrame.new(self) + @buttonframe = ButtonFrame.new(self) + for f in [@buttonframe,@countframe] + f.pack('side'=>'top', 'fill'=>'both') + end + self + end +end + + +$root = Timer.new + +#$thread = Thread.start{timer_loop2} +#timer_loop +TkAfter.new(10,-1,proc{timer_loop3}).start + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/toolbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/toolbar.rb new file mode 100644 index 0000000..1bb265d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/toolbar.rb @@ -0,0 +1,136 @@ +# -*- coding: euc-jp -*- +# +# toolbar.rb -- +# +# This demonstration script creates a toolbar that can be torn off. +# +# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($toolbar_demo) && $toolbar_demo + $toolbar_demo.destroy + $toolbar_demo = nil +end + +$toolbar_demo = TkToplevel.new {|w| + title("Ttk Menu Buttons") + iconname("toolbar") + positionWindow(w) +} + +base_frame = Ttk::Frame.new($toolbar_demo).pack(:fill=>:both, :expand=>true) + +if Tk.windowingsystem != 'aqua' + msg = Ttk::Label.new(base_frame, :wraplength=>'4i', :text=><'4i', :text=><'toolbar') # ¥¦¥£¥ó¥É¥¦¥¿¥¤¥È¥ëʸ»úÎó¤È¤¹¤ë¤¿¤á¤Ë¡¤¥¦¥£¥¸¥§¥Ã¥È̾¤òÌÀ¼¨¤·¤Æ¤¤¤Þ¤¹¡¥ +sep = Ttk::Separator.new(base_frame) +to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur') +if Tk.windowingsystem != 'aqua' + to = Ttk::Separator.new(to_base, :orient=>:vertical) + to2 = Ttk::Separator.new(to_base, :orient=>:vertical) + to.pack(:fill=>:y, :expand=>true, :padx=>2, :side=>:left) + to2.pack(:fill=>:y, :expand=>true, :side=>:left) +end + +contents = Ttk::Frame.new(tbar_base) +Tk.grid(to_base, contents, :sticky=>'nsew') +tbar_base.grid_columnconfigure(contents, :weight=>1) +contents.grid_columnconfigure(1000, :weight=>1) + +if Tk.windowingsystem != 'aqua' + ## Bindings so that the toolbar can be torn off and reattached + to_base.bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + to. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + to2. bind('B1-Motion', '%X %Y'){|x, y| tbar_base.tearoff(to_base, x, y)} + def tbar_base.tearoff(w, x, y) + on_win = TkWinfo.containing(x, y) + return unless (on_win && on_win.path =~ /^#{@path}(\.|$)/) + self.grid_remove + w.grid_remove + self.wm_manage + # self.wm_title('Toolbar') # ¤â¤·¥¦¥£¥¸¥§¥Ã¥È̾¤ò¥¦¥£¥ó¥É¥¦¥¿¥¤¥È¥ë¤Ë¤·¤¿¤¯¤Ê¤¤¤Ê¤é¡¤¤³¤³¤ÇÀßÄꤷ¤Æ¤¯¤À¤µ¤¤ + self.wm_protocol('WM_DELETE_WINDOW'){ self.untearoff(w) } + end + def tbar_base.untearoff(w) + self.wm_forget + w.grid + self.grid + end +end + +## Some content for the rest of the toplevel +text = TkText.new(base_frame, :width=>40, :height=>10) + +## Toolbar contents +tb_btn = Ttk::Button.new(tbar_base, :text=>'¥Ü¥¿¥ó', :style=>'Toolbutton', + :command=>proc{ + text.insert(:end, "¥Ü¥¿¥ó¤¬²¡¤µ¤ì¤Þ¤·¤¿¡¥\n") + }) +tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'¥Á¥§¥Ã¥¯¥Ü¥¿¥ó', + :style=>'Toolbutton', + :variable=>(check = TkVariable.new), + :command=>proc{ + text.insert(:end, "¥Á¥§¥Ã¥¯¥Ü¥¿¥ó¤ÎÃͤÏ#{check.value}¤Ç¤¹¡¥\n") + }) +tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'¥á¥Ë¥å¡¼') +tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families, + :state=>:readonly) +tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn)) +menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")}) +menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")}) +menu.add(:command, :label=>'Example', + :command=>proc{text.insert(:end, "Example\n")}) +tb_combo.bind(''){ text.font.family = tb_combo.get } + +## Arrange contents +Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo, + :in=>contents, :padx=>2, :sticky=>'ns') +Tk.grid(tbar_base, :sticky=>'ew') +Tk.grid(sep, :sticky=>'ew') +Tk.grid(msg, :sticky=>'ew') +Tk.grid(text, :sticky=>'nsew') +base_frame.grid_rowconfigure(text, :weight=>1) +base_frame.grid_columnconfigure(text, :weight=>1) + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'toolbar'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $toolbar_demo.destroy + $toolbar_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + Tk.grid(frame, :sticky=>'ew') +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tree.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tree.rb new file mode 100644 index 0000000..c3b4191 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/tree.rb @@ -0,0 +1,120 @@ +# -*- coding: euc-jp -*- +# +# tree.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# tree widget. +# +# based on "Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp" + +if defined?($tree_demo) && $tree_demo + $tree_demo.destroy + $tree_demo = nil +end + +$tree_demo = TkToplevel.new {|w| + title("Directory Browser") + iconname("tree") + positionWindow(w) +} + +base_frame = TkFrame.new($tree_demo).pack(:fill=>:both, :expand=>true) + +## Explanatory text +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', + :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6], + :text=><:x) +Ttk¤È¤Ï¡¤¥Æ¡¼¥Þ»ØÄê²Äǽ¤Ê¿·¤·¤¤¥¦¥£¥¸¥§¥Ã¥È½¸¹ç¤Ç¤¹¡¥\ +¤³¤Î¥µ¥ó¥×¥ë¤Ï¡¤¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¤è¤¦¤Ê³¬ÁØŪ¤Ê¥Ç¡¼¥¿½¸¹ç¤ò\ +»²¾È¤Ç¤­¤ë¤è¤¦¤Ë¤·¤¿Ttk::Treeview¥¦¥£¥¸¥§¥Ã¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡¥\ +Ttk::Treeview¥¦¥£¥¸¥§¥Ã¥È¤Ï¡¤ÌÚ¹½Â¤¼«ÂΤÎɽ¼¨¤ò²Äǽ¤Ë¤¹¤ë¤À¤±¤Ç¤Ê¤¯¡¤\ +ÄɲþðÊó(¤³¤Î¥µ¥ó¥×¥ë¤Î¾ì¹ç¤Ï¥Õ¥¡¥¤¥ë¥µ¥¤¥º)¤òɽ¼¨¤¹¤ë¤¿¤á¤Ë\ +Ǥ°Õ¤Î¸Ä¿ô¤ÎÄɲå«¥é¥à¤â°·¤¦¤³¤È¤â¤Ç¤­¤Þ¤¹¡¥\ +¤Þ¤¿¡¤¥«¥é¥à¤Î¥¿¥¤¥È¥ë´Ö¤Î¶èÀÚ¤êÉôʬ¤ò¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¡¤\ +¥«¥é¥à¤ÎÉý¤òÊѹ¹¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡¥ +EOL + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'tree'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $tree_demo.destroy + $tree_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +## Code to populate the roots of the tree (can be more than one on Windows) +def populate_roots(tree) + TkComm.simplelist(Tk.tk_call('file', 'volumes')).sort.each{|dir| + populate_tree(tree, tree.insert(nil, :end, :text=>dir, + :values=>[dir, 'directory'])) + } +end + +## Code to populate a node of the tree +def populate_tree(tree, node) + return if tree.get(node, :type) != 'directory' + + path = tree.get(node, :fullpath) + tree.delete(tree.children(node)) + Dir.glob("#{path}/*").sort.each{|f| + type = File.ftype(f) + id = tree.insert(node, :end, + :text=>File.basename(f), :values=>[f, type]).id + if type == 'directory' + ## Make it so that this node is openable + tree.insert(id, 0, :text=>'dummy') + tree.itemconfigure(id, :text=>File.basename(f)) + elsif type == 'file' + size = File.size(f) + if size >= 1024*1024*1024 + size = '%.1f GB' % (size.to_f/1024/1024/1024) + elsif size >= 1024*1024 + size = '%.1f MB' % (size.to_f/1024/1024) + elsif size >= 1024 + size = '%.1f KB' % (size.to_f/1024) + else + size = '%.1f bytes' % (size.to_f/1024) + end + tree.set(id, :size, size) + end + } + + # Stop this code from rerunning on the current node + tree.set(node, :type, 'processed_directory') +end + +## Create the tree and set it up +tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size), + :displaycolumns=>['size']) +if Tk.windowingsystem != 'aqua' + vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Ttk::Scrollbar.new(base_frame)) +else + vsb = tree.yscrollbar(Tk::Scrollbar.new(base_frame)) + hsb = tree.xscrollbar(Tk::Scrollbar.new(base_frame)) +end + +tree.heading_configure('#0', :text=>'Directory Structure') +tree.heading_configure('size', :text=>'File Size') +tree.column_configure('size', :stretch=>0, :width=>70) +populate_roots(tree) +tree.bind('', '%W'){|w| populate_tree(w, w.focus_item)} + +## Arrange the tree and its scrollbars in the toplevel +container = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +container.lower +Tk.grid(tree, vsb, :in=>container, :sticky=>'nsew') +Tk.grid(hsb, :in=>container, :sticky=>'nsew') +container.grid_columnconfigure(0, :weight=>1) +container.grid_rowconfigure(0, :weight=>1) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkbut.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkbut.rb new file mode 100644 index 0000000..4d57712 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkbut.rb @@ -0,0 +1,145 @@ +# -*- coding: euc-jp -*- +# +# ttkbut.rb +# +# This demonstration script creates a toplevel window containing several +# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and +# radiobuttons. +# +# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkbut_demo) && $ttkbut_demo + $ttkbut_demo.destroy + $ttkbut_demo = nil +end + +$ttkbut_demo = TkToplevel.new {|w| + title("Simple Ttk Widgets") + iconname("ttkbut") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +Ttk¤È¤Ï¡¤¥Æ¡¼¥Þ»ØÄê²Äǽ¤Ê¿·¤·¤¤¥¦¥£¥¸¥§¥Ã¥È½¸¹ç¤Ç¤¹¡¥\ +º£¡¤¤¢¤Ê¤¿¤¬Ìܤˤ·¤Æ¤¤¤ë¤Î¤ÏTtk¤Î¥Æ¡¼¥Þ²½¥é¥Ù¥ë¤Ç¡¤\ +²¼¤Ë¤ÏTtk¤Î¥é¥Ù¥ë¥Õ¥ì¡¼¥à¤ÎÃæ¤Ë»°¤Ä¤Î¥°¥ë¡¼¥×¤ÎTtk¥¦¥£¥¸¥§¥Ã¥È¤¬\ +ɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥ +ºÇ½é¤Î¥°¥ë¡¼¥×¤ÏÁ´¤Æ¥Ü¥¿¥ó¤Ç¤¢¤ê¡¤\ +¤½¤ì¤¾¤ì¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¸½ºß¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥Æ¡¼¥Þ¤¬ÀßÄꤵ¤ì¤Þ¤¹¡¥ +£²ÈÖÌܤΥ°¥ë¡¼¥×¤Ï»°¤Ä¤Î¥Á¥§¥Ã¥¯¥Ü¥¿¥ó½¸¹ç¤Ç¤¹¡¥\ +³Æ½¸¹ç¤Î´Ö¤Ë¤Ï¡¤¥»¥Ñ¥ì¡¼¥¿¥¦¥£¥¸¥§¥Ã¥È¤¬ÃÖ¤«¤ì¤Æ¤¤¤Þ¤¹¡¥\ +¤Ê¤ª¡ÖÍ­¸ú²½¡×¥Ü¥¿¥ó¤Ï¡¤¤³¤Î¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥¸¥§¥Ã¥ÈÆâ¤Î\ +¾¤Î¤¹¤Ù¤Æ¤Î¥Æ¡¼¥Þ²½¥¦¥£¥¸¥§¥Ã¥È¤Î¾õÂÖ(state)¤¬"disabled"¤«¤É¤¦¤«¤ò\ +¥³¥ó¥È¥í¡¼¥ë¤¹¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡¥ +£³ÈÖÌܤΥ°¥ë¡¼¥×¤Ï´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥é¥¸¥ª¥Ü¥¿¥ó½¸¹ç¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥ +EOL + +## Add buttons for setting the theme +buttons = Ttk::Labelframe.new(base_frame, :text=>'¥Ü¥¿¥ó') +# Ttk::Style.theme_names.each{|theme| +# Ttk::Button.new(buttons, :text=>theme, +# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2) +# } +Ttk.themes.each{|theme| + Ttk::Button.new(buttons, :text=>theme, + :command=>proc{Ttk.set_theme theme}).pack(:pady=>2) +} + +## Helper procedure for the top checkbutton +def setState(root, value, *excepts) + return if excepts.member?(root) + + ## Non-Ttk widgets (e.g. the toplevel) will fail, so make it silent + begin + root.state = value + rescue + end + + ## Recursively invoke on all children of this root that are in the same + ## toplevel widget + root.winfo_children.each{|w| + setState(w, value, *excepts) if w.winfo_toplevel == root.winfo_toplevel + } +end + +## Set up the checkbutton group +checks = Ttk::Labelframe.new(base_frame, :text=>'¥Á¥§¥Ã¥¯¥Ü¥¿¥ó') +enabled = TkVariable.new(true) +e = Ttk::Checkbutton.new(checks, :text=>'Í­¸ú²½', :variable=>enabled, + :command=>proc{ + setState($ttkbut_demo, + ((enabled.bool)? "!disabled" : "disabled"), + e) + }) + +## See ttk_widget(n) for other possible state flags +sep1 = Ttk::Separator.new(checks) +sep2 = Ttk::Separator.new(checks) + +cheese = TkVariable.new +tomato = TkVariable.new +basil = TkVariable.new +oregano = TkVariable.new + +c1 = Ttk::Checkbutton.new(checks, :text=>'¥Á¡¼¥º', :variable=>cheese) +c2 = Ttk::Checkbutton.new(checks, :text=>'¥È¥Þ¥È', :variable=>tomato) +c3 = Ttk::Checkbutton.new(checks, :text=>'¥Ð¥¸¥ë', :variable=>basil) +c4 = Ttk::Checkbutton.new(checks, :text=>'¥ª¥ì¥¬¥Î', :variable=>oregano) + +Tk.pack(e, sep1, c1, c2, sep2, c3, c4, :fill=>:x, :pady=>2) + +## Set up the radiobutton group +radios = Ttk::Labelframe.new(base_frame, :text=>'¥é¥¸¥ª¥Ü¥¿¥ó') + +happyness = TkVariable.new + +r1 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Great', :value=>'great') +r2 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Good', :value=>'good') +r3 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Ok', :value=>'ok') +r4 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Poor', :value=>'poor') +r5 = Ttk::Radiobutton.new(radios, :variable=>happyness, + :text=>'Awful', :value=>'awful') + +Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2) + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'ÊÑ¿ô»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars(base_frame, ['Í­¸ú²½', enabled], + ['¥Á¡¼¥º', cheese], ['¥È¥Þ¥È', tomato], + ['¥Ð¥¸¥ë', basil], ['¥ª¥ì¥¬¥Î', oregano], + ['¹¬Ê¡ÅÙ', happyness]) + }), + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkbut'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $ttkbut_demo + $ttkbut_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x, :expand=>true) +} + +## Arrange things neatly +f = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +f.lower +Tk.grid(buttons, checks, radios, :in=>f, :sticky=>'nwe', :pady=>2, :padx=>3) +f.grid_columnconfigure([0, 1, 2], :weight=>1, :uniform=>:yes) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkmenu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkmenu.rb new file mode 100644 index 0000000..d349b42 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkmenu.rb @@ -0,0 +1,91 @@ +# -*- coding: euc-jp -*- +# +# ttkmenu.rb -- +# +# This demonstration script creates a toplevel window containing several Ttk +# menubutton widgets. +# +# based on "Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkmenu_demo) && $ttkmenu_demo + $ttkmenu_demo.destroy + $ttkmenu_demo = nil +end + +$ttkmenu_demo = TkToplevel.new {|w| + title("Ttk Menu Buttons") + iconname("ttkmenu") + positionWindow(w) +} + +base_frame = Ttk::Frame.new($ttkmenu_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +Ttk¤È¤Ï¡¤¥Æ¡¼¥Þ»ØÄê²Äǽ¤Ê¿·¤·¤¤¥¦¥£¥¸¥§¥Ã¥È½¸¹ç¤Ç¤¹¡¥\ +¤³¤ì¤Ë¤è¤ê¥Æ¡¼¥Þ¤ËÂбþ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¥¦¥£¥¸¥§¥Ã¥È¤Î¤Ò¤È¤Ä¤Ë\ +¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤¬¤¢¤ê¤Þ¤¹¡¥\ +°Ê²¼¤Ç¤Ï¡¤¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤¬¤¤¤¯¤Ä¤«É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥\ +¤½¤ì¤é¤ò»È¤Ã¤Æ¡¤¸½ºß»ÈÍÑÃæ¤Î¥Æ¡¼¥Þ¤òÊѹ¹¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡¥\ +¥Æ¡¼¥Þ¤ÎÁªÂò¤¬¥á¥Ë¥å¡¼¥Ü¥¿¥ó¼«¿È¤Î¸«³Ý¤±¤òÊѲ½¤µ¤»¤ëÍͻҤ䡤\ +Ãæ±û¤Î¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤À¤±¤¬°Û¤Ê¤ë¥¹¥¿¥¤¥ë\ +(¥Ä¡¼¥ë¥Ð¡¼¤Ç¤Î°ìÈÌŪ¤Êɽ¼¨¤ËŬ¤·¤¿¤â¤Î)¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ëÍͻҤË\ +ÃíÌܤ·¤Æ¤¯¤À¤µ¤¤¡¥\ +¤Ê¤ª¡¤¥á¥Ë¥å¡¼¥Ü¥¿¥ó¤Ë¤Ä¤¤¤Æ¤Ï¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥¦¥£¥¸¥§¥Ã¥È¤¬¤¢¤ê¤Þ¤¹¤¬¡¤\ +¥á¥Ë¥å¡¼¤Ë¤Ä¤¤¤Æ¤Ï¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥¦¥£¥¸¥§¥Ã¥È¤Ï´Þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó¡¥\ +¤½¤ÎÍýͳ¤Ï¡¤É¸½à¤ÎTk¤Î¥á¥Ë¥å¡¼¥¦¥£¥¸¥§¥Ã¥È¤¬\ +¤¹¤Ù¤Æ¤Î¥×¥é¥Ã¥È¥Û¡¼¥à¤Ç½½Ê¬¤ËÎɹ¥¤Ê¸«³Ý¤±¤ÈÁàºîÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡¤\ +Æäˡ¤Â¿¤¯¤Î´Ä¶­¤Ç¤½¤Î´Ä¶­ËÜÍè¤ÎÁàºîÂηϤȤʤë¤è¤¦¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤È\ +ȽÃǤµ¤ì¤¿¤³¤È¤Ë¤è¤ê¤Þ¤¹¡¥ +EOL + +Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x) + +## See Code / Dismiss +Ttk::Frame.new($ttkmenu_demo) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkmenu'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkmenu_demo.destroy + $ttkmenu_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +b1 = Ttk::Menubutton.new(base_frame,:text=>'¥Æ¡¼¥Þ¤òÁªÂò',:direction=>:above) +b2 = Ttk::Menubutton.new(base_frame,:text=>'¥Æ¡¼¥Þ¤òÁªÂò',:direction=>:left) +b3 = Ttk::Menubutton.new(base_frame,:text=>'¥Æ¡¼¥Þ¤òÁªÂò',:direction=>:right) +b4 = Ttk::Menubutton.new(base_frame,:text=>'¥Æ¡¼¥Þ¤òÁªÂò',:direction=>:flush, + :style=>Ttk::Menubutton.style('Toolbutton')) +b5 = Ttk::Menubutton.new(base_frame,:text=>'¥Æ¡¼¥Þ¤òÁªÂò',:direction=>:below) + +b1.menu(m1 = Tk::Menu.new(b1, :tearoff=>false)) +b2.menu(m2 = Tk::Menu.new(b2, :tearoff=>false)) +b3.menu(m3 = Tk::Menu.new(b3, :tearoff=>false)) +b4.menu(m4 = Tk::Menu.new(b4, :tearoff=>false)) +b5.menu(m5 = Tk::Menu.new(b5, :tearoff=>false)) + +Ttk.themes.each{|theme| + m1.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m2.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m3.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m4.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) + m5.add(:command, :label=>theme, :command=>proc{Ttk.set_theme theme}) +} + +f = Ttk::Frame.new(base_frame).pack(:fill=>:x) +f1 = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) +f.lower + +f.grid_anchor(:center) +TkGrid('x', b1, 'x', :in=>f, :padx=>3, :pady=>2) +TkGrid(b2, b4, b3, :in=>f, :padx=>3, :pady=>2) +TkGrid('x', b5, 'x', :in=>f, :padx=>3, :pady=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttknote.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttknote.rb new file mode 100644 index 0000000..09cc796 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttknote.rb @@ -0,0 +1,97 @@ +# -*- coding: euc-jp -*- +# +# ttknote.rb -- +# +# This demonstration script creates a toplevel window containing a Ttk +# notebook widget. +# +# based on "Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttknote_demo) && $ttknote_demo + $ttknote_demo.destroy + $ttknote_demo = nil +end + +$ttknote_demo = TkToplevel.new {|w| + title("Ttk Notebook Widget") + iconname("ttknote") + positionWindow(w) +} + +## See Code / Dismiss +Ttk::Frame.new($ttknote_demo) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttknote'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttknote_demo.destroy + $ttknote_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +base_frame = Ttk::Frame.new($ttknote_demo).pack(:fill=>:both, :expand=>true) + +## Make the notebook and set up Ctrl+Tab traversal +notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true, + :padx=>2, :pady=>3) +notebook.enable_traversal + +## Popuplate the first pane +f_msg = Ttk::Frame.new(notebook) +msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i', + :justify=>:left, :anchor=>'n', :text=><'¤¹¤Æ¤­¤À¡ª(Neat!)', :underline=>6, + :command=>proc{ + neat.value = '¤¢¤¡¡¤¤½¤Î¤È¤ª¤ê¤µ¡¥¡¥¡¥' + Tk.after_cancel(after_id) if after_id + after_id = Tk.after(500){neat.value = ''} + }) +msg_b.winfo_toplevel.bind('Alt-n'){ msg_b.focus; msg_b.invoke } +msg_l = Ttk::Label.new(f_msg, :textvariable=>neat) +notebook.add(f_msg, :text=>'ÀâÌÀ(Description)', :underline=>3, :padding=>2) +Tk.grid(msg_m, '-', :sticky=>'new', :pady=>2) +Tk.grid(msg_b, msg_l, :pady=>[2, 4], :padx=>20) +msg_b.grid_configure(:sticky=>'e') +msg_l.grid_configure(:sticky=>'w') +f_msg.grid_rowconfigure(1, :weight=>1) +f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1) + +## Populate the second pane. Note that the content doesn't really matter +f_disabled = Ttk::Frame.new(notebook) +notebook.add(f_disabled, :text=>'̵¸ú²½¤µ¤ì¤¿¥¿¥Ö', :state=>:disabled) + +## Popuplate the third pane +f_editor = Ttk::Frame.new(notebook) +notebook.add(f_editor, :text=>'¥Æ¥­¥¹¥È¥¨¥Ç¥£¥¿(Text Editor)', :underline=>9) +editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char) +if Tk.windowingsystem != 'aqua' + editor_s = editor_t.yscrollbar(Ttk::Scrollbar.new(f_editor)) +else + editor_s = editor_t.yscrollbar(Tk::Scrollbar.new(f_editor)) +end +editor_s.pack(:side=>:right, :fill=>:y, :padx=>[0,2], :pady=>2) +editor_t.pack(:fill=>:both, :expand=>true, :padx=>[2,0], :pady=>2) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkpane.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkpane.rb new file mode 100644 index 0000000..96670c0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkpane.rb @@ -0,0 +1,216 @@ +# -*- coding: euc-jp -*- +# +# ttkpane.rb -- +# +# This demonstration script creates a Ttk pane with some content. +# +# based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkpane_demo) && $ttkpane_demo + $ttkpane_demo.destroy + $ttkpane_demo = nil +end + +$ttkpane_demo = TkToplevel.new {|w| + title("Themed Nested Panes") + iconname("ttkpane") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +¤³¤Î¥Ç¥â¤Ï¡¤Ëä¤á¹þ¤ß´Ø·¸¤Ë¤¢¤ë¥Æ¡¼¥ÞÉÕ¤­¥Ú¥¤¥ó¥É¥¦¥£¥ó¥É¥¦¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡¥\ +¤½¤ì¤¾¤ì¤ÎÂ礭¤µ¤Ï¡¤´Þ¤Þ¤ì¤Æ¤¤¤ë¥Ú¥¤¥ó¤Î´Ö¤Ë¤¢¤ë¥¨¥ê¥¢¤ò¤Ä¤«¤ó¤Ç\ +¶­³¦¤ò¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤ÇÊѹ¹¤Ç¤­¤Þ¤¹¡¥ +EOL + +Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x) + +## See Code / Dismiss +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkpane'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkpane_demo.destroy + $ttkpane_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +outer = Ttk::Panedwindow.new(frame, :orient=>:horizontal) +outer.add(in_left = Ttk::Panedwindow.new(outer, :orient=>:vertical)) +outer.add(in_right = Ttk::Panedwindow.new(outer, :orient=>:vertical)) +in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'¥Ü¥¿¥ó')) +in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'»þ·×')) +in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'¥×¥í¥°¥ì¥¹')) +in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'¥Æ¥­¥¹¥È')) +if Tk.windowingsystem == 'aqua' + [left_top, left_bot, right_top, right_bot].each{|w| w.padding(3) } +end + +# Fill the button pane +Ttk::Button.new(left_top, :text=>'²¡¤·¤Æ¤Í', + :command=>proc{ + Tk.messageBox(:type=>'ok', :icon=>'info', + :message=>'¤¤¤Æ¤Æ¡ª', + :detail=>'That hurt...', :parent=>base_frame, + :title=>'Button Pressed') + }).pack(:padx=>2, :pady=>5) + + +zones_list = [ + [':Europe/Berlin'], + [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'], + [':Africa/Johannesburg'], + [':Europe/London'], + [':America/Los_Angeles'], + [':Europe/Moscow'], + [':America/New_York'], + [':Asia/Singapore'], + [':Australia/Sydney'], + [':Asia/Tokyo'], +] + +zones = [] + +# Check tzinfo support +if $tk_major_ver > 8 || ($tk_major_ver == 8 && $tk_minor_ver >= 5) + tzinfo = :tcl + + zones_list.each{|list| + list.each{|zone| + begin + # Force a pre-load of all the timezones needed; otherwise can end up + # poor-looking synch problems! + Tk.tk_call('clock', 'format', '0', '-timezone', zone) + rescue RuntimeError + # ignore + else + zones << [zone, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + +else + begin + require 'tzinfo' + tzinfo = :tzinfo + rescue Exception + begin + require 'tzfile' + tzinfo = :tzfile + rescue Exception + tzinfo = nil + end + end + + case tzinfo + when :tzinfo + zones_list.each{|list| + list.each{|zone| + begin + tz = TZInfo::Timezone.get(zone[%r<[^:]+$>]) + rescue Exception + # ignore + else + zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + + when :tzfile + zones_list.each{|list| + list.each{|zone| + begin + tz = TZFile.create(zone[%r<[^:]+$>]) + rescue Exception + # ignore + else + zones << [tz, zone[%r<[^/:]+$>].tr('_', ' ')] + break + end + } + } + + else + [ -7, -4, -2, -1, 0, +1, +3, +8, +9, +10 ].each{|zone| + zones << [zone, 'UTC%+03d00' % zone] + } + end +end + +time = TkVariable.new_hash + +case tzinfo +when :tcl + update_proc = proc{|now, tz, label| + time[label] = Tk.tk_call('clock', 'format', now.tv_sec, + '-timezone', tz, '-format', '%T') + } +when :tzinfo + update_proc = proc{|now, tz, label| + time[label] = tz.utc_to_local(now).strftime('%H:%M:%S') + } +when :tzfile + update_proc = proc{|now, tz, label| + time[label] = tz.at(now.tv_sec).strftime('%H:%M:%S') + } +else + update_proc = proc{|now, tz, label| + time[label] = (now + (tz * 3600)).strftime('%H:%M:%S') + } +end + +# Fill the clocks pane +zones.each_with_index{|(zone, label), idx| + Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0 + Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x) + Ttk::Label.new(left_bot, :textvariable=>time.ref(label), + :anchor=>'w').pack(:fill=>:x) +} + +# Timer start +every = proc{ + now = Time.now.utc + zones.each{|zone, label| update_proc.call(now, zone, label) } +} +TkRTTimer.new(1000, -1, every).start(0, every) + +# Fill the progress pane +Ttk::Progressbar.new(right_top, :mode=>:indeterminate).pack(:fill=>:both, :expand=>true).start + +# Fill the text pane +if Tk.windowingsystem != 'aqua' + # The trick with the ttk::frame makes the text widget look like it fits with + # the current Ttk theme despite not being a themed widget itself. It is done + # by styling the frame like an entry, turning off the border in the text + # widget, and putting the text widget in the frame with enough space to allow + # the surrounding border to show through (2 pixels seems to be enough). + f = Ttk::Frame.new(right_bot, :style=>Ttk::Entry) + txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0) + txt.pack(:fill=>:both, :expand=>true, :in=>f, :pady=>2, :padx=>2) + scr = txt.yscrollbar(Ttk::Scrollbar.new(frame)) + scr.pack(:side=>:right, :fill=>:y, :in=>right_bot) + f.pack(:fill=>:both, :expand=>true) + outer.pack(:fill=>:both, :expand=>true) +else + txt = TkText.new(frame, :wrap=>:word, :width=>30, :borderwidth=>0) + scr = txt.yscrollbar(TkScrollbar.new(frame)) + scr.pack(:side=>:right, :fill=>:y, :in=>right_bot) + txt.pack(:fill=>:both, :expand=>true, :in=>right_bot) + outer.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>[6, 10]) +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkprogress.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkprogress.rb new file mode 100644 index 0000000..43a9cbc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/ttkprogress.rb @@ -0,0 +1,71 @@ +# -*- coding: euc-jp -*- +# +# ttkprogress.rb -- +# +# This demonstration script creates several progress bar widgets. +# +# based on "Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" + +if defined?($ttkprogress_demo) && $ttkprogress_demo + $ttkprogress_demo.destroy + $ttkprogress_demo = nil +end + +$ttkprogress_demo = TkToplevel.new {|w| + title("Progress Bar Demonstration") + iconname("ttkprogress") + positionWindow(w) +} + +base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=>:both, :expand=>true) + +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, + :text=><:top, :fill=>:x) +²¼¤Ë¤¢¤ë¤Î¤ÏÆó¤Ä¤Î¥×¥í¥°¥ì¥¹¥Ð¡¼¤Ç¤¹¡¥\ +¾å¤Î¤â¤Î¤Ï"determinate"¥¿¥¤¥×¤Î¥×¥í¥°¥ì¥¹¥Ð¡¼¤Ç¡¤\ +Î㤨¤Ð¥×¥í¥°¥é¥à¤¬Í¿¤¨¤é¤ì¤¿¥¿¥¹¥¯¤ò½ªÎ»¤¹¤ë¤Þ¤Ç¤Ë¤É¤Î¤¯¤é¤¤¤«¤«¤ë¤«¤ò\ +¼¨¤¹¤È¤­¤Ê¤É¤ËÍѤ¤¤é¤ì¤Þ¤¹¡¥\ +²¼¤Î¤â¤Î¤Ï"indeterminate"¥¿¥¤¥×¤Î¥×¥í¥°¥ì¥¹¥Ð¡¼¤Ç¡¤\ +Î㤨¤Ð¥×¥í¥°¥é¥à¤¬¼Â¹ÔÃæ(busy)¤Ç¤¢¤ë¤â¤Î¤Î\ +½ªÎ»¤Þ¤Ç¤Ë¤É¤ì¤¯¤é¤¤¤«¤«¤ë¤«¤Ïʬ¤«¤é¤Ê¤¤¤È¤¤¤¦¾õÂÖ¤ò\ +¼¨¤¹¤È¤­¤Ê¤É¤ËÍѤ¤¤é¤ì¤Þ¤¹¡¥\ +¤¤¤º¤ì¤Î¥×¥í¥°¥ì¥¹¥Ð¡¼¤â¡¤¤¹¤°²¼¤Ë¤¢¤ë¥Ü¥¿¥ó¤ò»È¤¦¤³¤È¤Ç\ +¼«Æ°¥¢¥Ë¥á¡¼¥·¥ç¥ó¥â¡¼¥É¤ÎON/OFF¤òÀÚÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥ +EOL + +## See Code / Dismiss buttons +Ttk::Frame.new(base_frame) {|frame| + sep = Ttk::Separator.new(frame) + Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + Ttk::Button.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'ttkprogress'}), + Ttk::Button.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + $ttkprogress_demo.destroy + $ttkprogress_demo = nil + }), + :padx=>4, :pady=>4) + grid_columnconfigure(0, :weight=>1) + pack(:side=>:bottom, :fill=>:x) +} + +frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true) + +p1 = Ttk::Progressbar.new(frame, :mode=>:determinate) +p2 = Ttk::Progressbar.new(frame, :mode=>:indeterminate) + +start = Ttk::Button.new(frame, :text=>'Start Progress', + :command=>proc{ p1.start; p2.start }) +stop = Ttk::Button.new(frame, :text=>'Stop Progress', + :command=>proc{ p1.stop; p2.stop }) + +Tk.grid(p1, '-', :pady=>5, :padx=>10) +Tk.grid(p2, '-', :pady=>5, :padx=>10) +Tk.grid(start, stop, :padx=>10, :pady=>5) +start.grid_configure(:sticky=>'e') +stop.grid_configure(:sticky=>'w') +frame.grid_columnconfigure(:all, :weight=>1) + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind.rb new file mode 100644 index 0000000..faefaef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind.rb @@ -0,0 +1,292 @@ +# -*- coding: euc-jp -*- +# +# text (embedded windows) widget demo (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($twind_demo) && $twind_demo + $twind_demo.destroy + $twind_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$twind_demo = TkToplevel.new {|w| + title("Text Demonstration - Embedded Windows") + iconname("Embedded Windows") + positionWindow(w) +} + +base_frame = TkFrame.new($twind_demo).pack(:fill=>:both, :expand=>true) + +# frame À¸À® +$twind_buttons = TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc{ + tmppath = $twind_demo + $twind_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc{showCode 'twind'} + }.pack('side'=>'left', 'expand'=>'yes') +} +$twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +$twind_text = nil +TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, + 'relief'=>'sunken') {|f| + $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font, + 'width'=>'70', 'height'=>35, 'wrap'=>'word', + 'highlightthickness'=>0, 'borderwidth'=>0 ){|t| + TkScrollbar.new(f) {|s| + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + }.pack('side'=>'right', 'fill'=>'y') + }.pack('expand'=>'yes', 'fill'=>'both') +}.pack('expand'=>'yes', 'fill'=>'both') + +# ¥¿¥°À¸À® +$tag_center = TkTextTag.new($twind_text, + 'justify' =>'center', + 'spacing1'=>'5m', + 'spacing3'=>'5m' ) +$tag_buttons = TkTextTag.new($twind_text, + 'lmargin1'=>'1c', + 'lmargin2'=>'1c', + 'rmargin' =>'1c', + 'spacing1'=>'3m', + 'spacing2'=>0, + 'spacing3'=>0 ) + +# ¥Æ¥­¥¹¥È¤ÎÀ¸À® +$twind_text.insert('end', + '¥Æ¥­¥¹¥Èwidget¾å¤Ë¾¤Îwidget¤òÁȤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +$twind_text.insert('end', + 'ÁȤ߹þ¤ß¥¦¥£¥ó¥É¥¦¤È¸Æ¤Ð¤ì¡¢Ç¤°Õ¤Îwidget¤¬²Äǽ¤Ç¤¹¡£') +$twind_text.insert('end', + 'Î㤨¤Ð¡¢¤³¤³¤Ë2¤Ä¤Î¥Ü¥¿¥ówidget¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£') +$twind_text.insert('end', 'ºÇ½é¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤È¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + #text 'ON' + text '¥ª¥ó' + command proc{textWindOn $twind_text,$twind_buttons} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', "¤Ë¤·¤Þ¤¹¡£¤Þ¤¿2¤Ä¤á¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È\n") +$twind_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + #text 'OFF' + text '¥ª¥Õ' + command proc{textWindOff $twind_text} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', '¤Ë¤·¤Þ¤¹¡£') + +$twind_text.insert('end', '¤â¤¦¤Ò¤È¤Ä¤ÎÎã¤Ç¤¹¡£') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text '¤³¤³¤ò¥¯¥ê¥Ã¥¯' + command proc{textWindPlot $twind_text} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', '¤¹¤ë¤È¡¢x-y¥×¥í¥Ã¥È¤¬¤³¤³¤Ë¸½¤ì¤Þ¤¹¡£') +$mark_plot = TkTextMark.new($twind_text, 'insert') +$mark_plot.gravity='left' +$twind_text.insert('end', '¥Þ¥¦¥¹¤Ç¥Ç¡¼¥¿¤òÉÁ²è¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text '¾Ãµî' + command proc{textWindDel $twind_text} + cursor 'top_left_arrow' + }) +$twind_text.insert('end', '¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£ + +') + +$twind_text.insert('end', 'ÁȤ߹þ¤ß¥¦¥£¥ó¥É¥¦¤À¤±¤ò¥Æ¥­¥¹¥Èwidget¾å¤Ë¡¢¼ÂºÝ¤Î') +$twind_text.insert('end', '¥Æ¥­¥¹¥È¤Ï¤Ê¤·¤ÇÁȤ߹þ¤à¤³¤È¤ÏÊØÍø¤Ç¤¹¡£') +$twind_text.insert('end', '¤³¤Î¾ì¹ç¤Ï¡¢¥Æ¥­¥¹¥Èwidget¤Ï¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤Î') +$twind_text.insert('end', '¤è¤¦¤ËÆ°ºî¤·¤Þ¤¹¡£Î㤨¤Ð¡¢¤³¤³¤Ë¤Ï¥Æ¥­¥¹¥Èwidget¤Ë') +$twind_text.insert('end', '¤è¤Ã¤Æ¥Ü¥¿¥ó¤¬¤­¤ì¤¤¤Ëʤ٤é¤ì¤Æ¤¤¤Þ¤¹¡£') +$twind_text.insert('end', '¤³¤ì¤é¤Î¥Ü¥¿¥ó¤ÇÇØ·Ê¿§¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹') +$twind_text.insert('end', '("Default"¤Ç¸µ¤Î¿§¤ËÌ᤹¤³¤È¤¬¤Ç¤­¤Þ¤¹)¡£') +$twind_text.insert('end', '"Short"¤È¤¤¤¦¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤Èʸ»úÎó¤ÎŤµ¤¬') +$twind_text.insert('end', 'ÊѤï¤ê¤Þ¤¹¡£¤¹¤ë¤È¼«Æ°Åª¤Ë¥Æ¥­¥¹¥Èwidget¤¬') +$twind_text.insert('end', '¥ì¥¤¥¢¥¦¥È¤òÀ°¤¨¤Æ¤¯¤ì¤Þ¤¹¡£') +$twind_text.insert('end', '¤â¤¦°ìÅÙƱ¤¸¥Ü¥¿¥ó¤ò²¡¤¹¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£ + +') + +TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) {|b| + text '¥Ç¥Õ¥©¥ë¥È' + command proc{embDefBg $twind_text} + cursor 'top_left_arrow' + $tag_buttons.add('end') + }, + 'padx'=>3 ) +embToggle = TkVariable.new('Short') +TkTextWindow.new($twind_text, 'end', + 'window'=>TkCheckButton.new($twind_text) { + textvariable embToggle + indicatoron 0 + variable embToggle + onvalue 'A much longer string' + offvalue 'Short' + cursor 'top_left_arrow' + pady 5 + padx 2 + }, + 'padx'=>3, + 'pady'=>2 ) + +[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4', + 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1', + 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1', + 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4' +].each{|twind_color| + TkTextWindow.new($twind_text, 'end', + 'window'=>TkButton.new($twind_text) { + text twind_color + cursor 'top_left_arrow' + command proc{$twind_text.bg twind_color} + }, + 'padx'=>3, + 'pady'=>2 ) +} + +# ¥á¥½¥Ã¥ÉÄêµÁ +def textWindOn (w,f) + if defined? $twind_scroll + begin + $twind_scroll.destroy + rescue + end + $twind_scroll = nil + end + + base = TkWinfo.parent( TkWinfo.parent(w) ) + $twind_scroll = TkScrollbar.new(base) {|s| + orient 'horizontal' + command proc{|*args| w.xview(*args)} + w.xscrollcommand proc{|first,last| s.set first,last} + w.wrap 'none' + pack('after'=>f, 'side'=>'bottom', 'fill'=>'x') + } + + return nil +end + +def textWindOff (w) + if defined? $twind_scroll + begin + $twind_scroll.destroy + rescue + end + $twind_scroll = nil + end + w.xscrollcommand '' + w.wrap 'word' +end + +def textWindPlot (t) + if (defined? $twind_plot) && (TkWinfo.exist?($twind_plot)) + return + end + + $twind_plot = TkCanvas.new(t) { + relief 'sunken' + width 450 + height 300 + cursor 'top_left_arrow' + } + + if $tk_version =~ /^4.*/ + font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + else + font = 'Helvetica 18' + end + + TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2) + TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2) + TkcText.new($twind_plot, 225, 20, + 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown') + + (0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2) + TkcText.new($twind_plot, x, 254, + 'text'=>10*i, 'font'=>font, 'anchor'=>'n') + } + (0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2) + TkcText.new($twind_plot, 96, y, + 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e') + } + + for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' + end + + $twind_plot.itembind('point', 'Any-Enter', + proc{$twind_plot.itemconfigure 'current', 'fill', 'red'}) + $twind_plot.itembind('point', 'Any-Leave', + proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'}) + $twind_plot.itembind('point', '1', + proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y") + $twind_plot.itembind('point', 'ButtonRelease-1', + proc{$twind_plot.dtag 'selected'}) + $twind_plot.bind('B1-Motion', + proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y") + while ($twind_text.get($mark_plot) =~ /[ \t\n]/) + $twind_text.delete $mark_plot + end + $twind_text.insert $mark_plot,"\n" + TkTextWindow.new($twind_text, $mark_plot, 'window'=>$twind_plot) + $tag_center.add $mark_plot + $twind_text.insert $mark_plot,"\n" +end + +$embPlot = {'lastX'=>0, 'lastY'=>0} + +def embPlotDown (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $embPlot['lastX'] = x + $embPlot['lastY'] = y +end + +def embPlotMove (w, x, y) + w.move 'selected', x - $embPlot['lastX'], y - $embPlot['lastY'] + $embPlot['lastX'] = x + $embPlot['lastY'] = y +end + +def textWindDel (w) + if (defined? $twind_text) && TkWinfo.exist?($twind_plot) + $twind_text.delete $twind_plot + $twind_plot = nil + while ($twind_text.get($mark_plot) =~ /[ \t\n]/) + $twind_text.delete $mark_plot + end + $twind_text.insert $mark_plot," " + end +end + +def embDefBg (w) + w['background'] = w.configinfo('background')[3] +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind2.rb new file mode 100644 index 0000000..2a26b28 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/twind2.rb @@ -0,0 +1,384 @@ +# -*- coding: euc-jp -*- +# +# text (embedded windows) widget demo 2 (called by 'widget') +# + +# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë +if defined?($twind2_demo) && $twind2_demo + $twind2_demo.destroy + $twind2_demo = nil +end + +# demo ÍѤΠtoplevel widget ¤òÀ¸À® +$twind2_demo = TkToplevel.new {|w| + title("Text Demonstration - Embedded Windows 2") + iconname("Embedded Windows") + positionWindow(w) +} + +base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true) + +# frame À¸À® +$twind2_buttons = TkFrame.new(base_frame) {|frame| + TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + TkGrid('x', + TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'twind2'}), + TkButton.new(frame, :text=>'ÊĤ¸¤ë', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $twind2_demo + $twind2_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) + frame.grid_columnconfigure(0, :weight=>1) +} +$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +# frame À¸À® +$twind2_text = nil +TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, + 'relief'=>'sunken') {|f| + $twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font, + # 'width'=>'70', 'height'=>35, 'wrap'=>'word', + 'width'=>'70', 'height'=>35, 'wrap'=>'char', + 'highlightthickness'=>0, 'borderwidth'=>0 ){|t| + TkScrollbar.new(f) {|s| + command proc{|*args| t.yview(*args)} + t.yscrollcommand proc{|first,last| s.set first,last} + }.pack('side'=>'right', 'fill'=>'y') + }.pack('expand'=>'yes', 'fill'=>'both') +}.pack('expand'=>'yes', 'fill'=>'both') + +# ¥¿¥°À¸À® +$tag2_center = TkTextTag.new($twind2_text, + 'justify' =>'center', + 'spacing1'=>'5m', + 'spacing3'=>'5m' ) +$tag2_buttons = TkTextTag.new($twind2_text, + 'lmargin1'=>'1c', + 'lmargin2'=>'1c', + 'rmargin' =>'1c', + 'spacing1'=>'3m', + 'spacing2'=>0, + 'spacing3'=>0 ) + +# ¥Æ¥­¥¹¥È¤ÎÀ¸À® +$twind2_text.insert('end', '¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë¤Ï¿§¡¹¤Ê¼ïÎà¤Î¥¢¥¤¥Æ¥à') +$twind2_text.insert('end', '¡ÊưŪ¤Ê¤â¤Î¤äÀÅŪ¤Ê¤â¤Î¤ÎξÊý¤¬¤¢¤ê¤Þ¤¹¡Ë¤ò') +$twind2_text.insert('end', '¿ô¿¤¯´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤½¤¦¤·¤¿¥¢¥¤¥Æ¥à¤Ï') +$twind2_text.insert('end', '¹ÔÂؤ¨¡¢¥¿¥Ö¡¢Ãæ±û·¤¨¤Ê¤É¤ÎÍÍ¡¹¤ÊÊýË¡¤Ç') +$twind2_text.insert('end', 'ÇÛÃÖ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +$twind2_text.insert('end', '²Ã¤¨¤Æ¡¢¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ÎÆâÍÆʪ¤¬') +$twind2_text.insert('end', '¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ËÈæ¤Ù¤ÆÂ礭¤¹¤®¤ë¾ì¹ç¤Ç¤â') +$twind2_text.insert('end', '¤¹¤Ù¤Æ¤ÎÊý¸þ¤Ë¥¹¥à¡¼¥º¤Ë¥¹¥¯¥í¡¼¥ë¤µ¤»¤Æ') +$twind2_text.insert('end', '³Îǧ¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£') +$twind2_text.insert('end', "\n\n") +$twind2_text.insert('end', '¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¾å¤Ë¤Ï¾¤Î¥¦¥£¥¸¥§¥Ã¥È¤ò') +$twind2_text.insert('end', '´Þ¤á¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤³¤¦¤·¤¿¤â¤Î¤Ï') +$twind2_text.insert('end', '¡ÖËä¤á¹þ¤ß¥¦¥£¥ó¥É¥¦¡×¤È¸Æ¤Ð¤ì¡¢¤½¤ÎÃæ¤Ë') +$twind2_text.insert('end', '¤¤¤«¤Ê¤ë¥¦¥£¥¸¥§¥Ã¥È¤Ç¤âµÍ¤á¹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +$twind2_text.insert('end', 'Î㤨¤Ð¡¤¤³¤³¤Ë¤Ï£²¤Ä¤Î') +$twind2_text.insert('end', '¥Ü¥¿¥ó¥¦¥£¥¸¥§¥Ã¥È¤¬Ëä¤á¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£') +$twind2_text.insert('end', 'ºÇ½é¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢') +$twind2_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò ') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + #text 'ON' + text '¥ª¥ó' + command proc{textWindOn2 $twind2_text,$twind2_buttons} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', "¤Ë¤·¤Þ¤¹¡£¤Þ¤¿¡¢£²¤Ä¤á¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È\n") +$twind2_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + #text 'OFF' + text '¥ª¥Õ' + command proc{textWindOff2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', "¤Ë¤·¤Þ¤¹¡£\n\n") + +$twind2_text.insert('end', '¼¡¤Ï¤â¤¦¤Ò¤È¤Ä¤ÎÎã¤Ç¤¹¡£') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text '¤³¤³¤ò¥¯¥ê¥Ã¥¯' + command proc{textWindPlot2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', '¤¹¤ë¤È¡¢x-y¥×¥í¥Ã¥È¤¬¤³¤³¤Ë¸½¤ì¤Þ¤¹¡£') +$mark2_plot = TkTextMark.new($twind2_text, 'insert') +$mark2_plot.gravity='left' +$twind2_text.insert('end', '¥Þ¥¦¥¹¤Ç¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¡¢') +$twind2_text.insert('end', '¥×¥í¥Ã¥È¾å¤Î¥Ç¡¼¥¿ÅÀ¤ò°ÜÆ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text '¾Ãµî' + command proc{textWindDel2 $twind2_text} + cursor 'top_left_arrow' + }) +$twind2_text.insert('end', '¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£') +$twind2_text.insert('end', "\n\n") + +$twind2_text.insert('end', 'ɽ¼¨¤¹¤ë¥Æ¥­¥¹¥È¤Ê¤·¤ËËä¤á¹þ¤ß¥¦¥£¥ó¥É¥¦¤À¤±¤ò') +$twind2_text.insert('end', '¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë´Þ¤á¤ë¤³¤È¤âÍ­ÍѤǤ·¤ç¤¦¡£') +$twind2_text.insert('end', '¤³¤Î¾ì¹ç¡¢¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ï') +$twind2_text.insert('end', '¥¸¥ª¥á¥È¥ê¥Þ¥Í¡¼¥¸¥ã¤Î¤è¤¦¤ËƯ¤­¤Þ¤¹¡£') +$twind2_text.insert('end', 'Î㤨¤Ð¡¢¤³¤³¤Ë¤Ï¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë') +$twind2_text.insert('end', '¤è¤Ã¤Æ¥Ü¥¿¥ó¤¬¤­¤ì¤¤¤ËÀ°Îó¤·¤ÆÇÛÃÖ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£') +$twind2_text.insert('end', '¤³¤ì¤é¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤Ç¡¢') +$twind2_text.insert('end', '¤³¤Î¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ÎÇØ·Ê¿§¤ò') +$twind2_text.insert('end', 'ÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹("¥Ç¥Õ¥©¥ë¥È"¥Ü¥¿¥ó¤Ç') +$twind2_text.insert('end', '¸µ¤Î¿§¤ËÌ᤹¤³¤È¤¬¤Ç¤­¤Þ¤¹)¡£') +$twind2_text.insert('end', '"Short"¤È¤¤¤¦¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤Èʸ»úÎó¤ÎŤµ¤¬') +$twind2_text.insert('end', 'ÊѤï¤ê¡¢¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤¬¼«Æ°Åª¤Ë') +$twind2_text.insert('end', '¥ì¥¤¥¢¥¦¥È¤òÀ°¤¨¤ëÍͻҤò¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£') +$twind2_text.insert('end', '¤â¤¦°ìÅÙƱ¤¸¥Ü¥¿¥ó¤ò²¡¤¹¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£') +$twind2_text.insert('end', "\n") + +btn_default = TkButton.new($twind2_text) {|b| + text '¥Ç¥Õ¥©¥ë¥È' + command proc{embDefBg2 $twind2_text} + cursor 'top_left_arrow' +} +TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3) +embToggle = TkVariable.new('Short') +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkCheckButton.new($twind2_text) { + textvariable embToggle + indicatoron 0 + variable embToggle + onvalue 'A much longer string' + offvalue 'Short' + cursor 'top_left_arrow' + pady 5 + padx 2 + }, + 'padx'=>3, + 'pady'=>2 ) + +[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4', + 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1', + 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1', + 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4' +].each{|twind_color| + TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text) { + text twind_color + cursor 'top_left_arrow' + command proc{$twind2_text.bg twind_color} + }, + 'padx'=>3, + 'pady'=>2 ) +} + +$tag2_buttons.add(btn_default, 'end') + +$text_normal2 = {} +$text_normal2['border'] = $twind2_text.cget('borderwidth') +$text_normal2['highlight'] = $twind2_text.cget('highlightthickness') +$text_normal2['pad'] = $twind2_text.cget('padx') + +$twind2_text.insert('end', "\nborder width ¤ä highlightthickness, ") +$twind2_text.insert('end', "padding ¤òÄ̾ï¤ÎÃͤ«¤éÊѹ¹¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£\n") + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big borders", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigB2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small borders", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallB2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big highlight", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigH2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small highlight", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallH2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Big pad", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinBigP2 $twind2_text + })) + +TkTextWindow.new($twind2_text, 'end', + 'window'=>TkButton.new($twind2_text, :text=>"Small pad", + :cursor=>'top_left_arrow', + 'command'=>proc{ + textWinSmallP2 $twind2_text + })) + +$twind2_text.insert('end', "\n\n¹¹¤Ë¥¤¥á¡¼¥¸¤â¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë") +$twind2_text.insert('end', "¤¦¤Þ¤¯ÇÛÃ֤Ǥ­¤Þ¤¹¡§") + +TkTextImage.new($twind2_text, 'end', + 'image'=>TkBitmapImage.new(:file=>[ + $demo_dir, '..', + 'images', 'face.xbm' + ].join(File::Separator))) + +# ¥á¥½¥Ã¥ÉÄêµÁ +def textWinBigB2(w) + w.borderwidth 15 +end +def textWinSmallB2(w) + w.borderwidth $text_normal2['border'] +end +def textWinBigH2(w) + w.highlightthickness 15 +end +def textWinSmallH2(w) + w.highlightthickness $text_normal2['highlight'] +end +def textWinBigP2(w) + w.configure(:padx=>15, :pady=>15) +end +def textWinSmallP2(w) + w.configure(:padx=>$text_normal2['pad'], :pady=>$text_normal2['pad']) +end + +def textWindOn2 (w,f) + if defined? $twind2_scroll + begin + $twind2_scroll.destroy + rescue + end + $twind2_scroll = nil + end + + base = TkWinfo.parent( TkWinfo.parent(w) ) + $twind2_scroll = TkScrollbar.new(base) {|s| + orient 'horizontal' + command proc{|*args| w.xview(*args)} + w.xscrollcommand proc{|first,last| s.set first,last} + w.wrap 'none' + pack('after'=>f, 'side'=>'bottom', 'fill'=>'x') + } + + return nil +end + +def textWindOff2 (w) + if defined? $twind2_scroll + begin + $twind2_scroll.destroy + rescue + end + $twind2_scroll = nil + end + w.xscrollcommand '' + #w.wrap 'word' + w.wrap 'char' +end + +def textWindPlot2 (t) + if (defined? $twind2_plot) && (TkWinfo.exist?($twind2_plot)) + return + end + + $twind2_plot = TkCanvas.new(t) { + relief 'sunken' + width 450 + height 300 + cursor 'top_left_arrow' + } + + #font = '-Adobe-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*' + font = 'Helvetica 18' + + TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2) + TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2) + TkcText.new($twind2_plot, 225, 20, + 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown') + + (0..10).each {|i| + x = 100 + (i * 30) + TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2) + TkcText.new($twind2_plot, x, 254, + 'text'=>10*i, 'font'=>font, 'anchor'=>'n') + } + (0..5).each {|i| + y = 250 - (i * 40) + TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2) + TkcText.new($twind2_plot, 96, y, + 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e') + } + + for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]] + x = 100 + (3*xx) + y = 250 - (4*yy)/5 + item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6, + 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2') + item.addtag 'point' + end + + $twind2_plot.itembind('point', 'Any-Enter', + proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'}) + $twind2_plot.itembind('point', 'Any-Leave', + proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'}) + $twind2_plot.itembind('point', '1', + proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y") + $twind2_plot.itembind('point', 'ButtonRelease-1', + proc{$twind2_plot.dtag 'selected'}) + $twind2_plot.bind('B1-Motion', + proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y") + while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/) + $twind2_text.delete $mark2_plot + end + $twind2_text.insert $mark2_plot,"\n" + TkTextWindow.new($twind2_text, $mark2_plot, 'window'=>$twind2_plot) + $tag2_center.add $mark2_plot + $twind2_text.insert $mark2_plot,"\n" +end + +$embPlot2 = {'lastX'=>0, 'lastY'=>0} + +def embPlotDown2 (w, x, y) + w.dtag 'selected' + w.addtag_withtag 'selected', 'current' + w.raise 'current' + $embPlot2['lastX'] = x + $embPlot2['lastY'] = y +end + +def embPlotMove2 (w, x, y) + w.move 'selected', x - $embPlot2['lastX'], y - $embPlot2['lastY'] + $embPlot2['lastX'] = x + $embPlot2['lastY'] = y +end + +def textWindDel2 (w) + if (defined? $twind2_text) && TkWinfo.exist?($twind2_plot) + $twind2_text.delete $twind2_plot + $twind2_plot = nil + while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/) + $twind2_text.delete $mark2_plot + end + $twind2_text.insert $mark2_plot," " + end +end + +def embDefBg2 (w) + w['background'] = w.configinfo('background')[3] +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/unicodeout.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/unicodeout.rb new file mode 100644 index 0000000..178077e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/unicodeout.rb @@ -0,0 +1,119 @@ +# -*- coding: euc-jp -*- +# +# unicodeout.rb -- +# +# This demonstration script shows how you can produce output (in label +# widgets) using many different alphabets. +# +# based on Tcl/Tk8.4.4 widget demos + +if defined?($unicodeout_demo) && $unicodeout_demo + $unicodeout_demo.destroy + $unicodeout_demo = nil +end + +$unicodeout_demo = TkToplevel.new {|w| + title("Unicode Label Demonstration") + iconname("unicodeout") + positionWindow(w) +} + +base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true) + +TkLabel.new(base_frame, + :font=>$font, :wraplength=>'5.4i', :justify=>:left, + :text=><:top) +¤³¤ì¤Ï¡¤Tk¤Ë¤ª¤±¤ëÈó²¤ÊÆʸ»ú½¸¹ç¤òÍѤ¤¤ë¸À¸ì¤ËÂФ¹¤ë¥µ¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ¤Î\ +¥µ¥ó¥×¥ë¤Ç¤¹¡¥¤¿¤À¤·¡¤²¼¤Îɽ¼¨¤Ë¤ª¤¤¤Æ¤¢¤Ê¤¿¤¬¼ÂºÝ¤Ë¤É¤Î¤è¤¦¤Êɽ¼¨¤ò\ +Ìܤˤ¹¤ë¤«¤Ï¡¤¤¢¤Ê¤¿¤Î´Ä¶­¤Ë¤É¤Î¤è¤¦¤Êʸ»ú½¸¹ç¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤Ë\ +Â礭¤¯°Í¸¤·¤Þ¤¹¡¥¤Þ¤¿¡¤ÂоݤȤʤëʸ»ú½¸¹ç¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë\ +¤É¤Î¤è¤¦¤Êɽ¼¨¤¬¤Ê¤µ¤ì¤ë¤«¤â¤¢¤Ê¤¿¤Î´Ä¶­¼¡Âè¤Ç¤¹¡¥\ +¡Ö¥³¡¼¥É»²¾È¡×¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥½¡¼¥¹¤òɽ¼¨¤·¡¤\ +Unicodeout_SampleFrame¥¯¥é¥¹¤Î@@font¤ÎÄêµÁ¤ò½ñ¤­´¹¤¨¤Æ\ +(¥Õ¥¡¥¤¥ë¤ÎÆâÍƤÏÊѹ¹¤µ¤ì¤Þ¤»¤ó)\ +¡ÖºÆ¼Â¹Ô¡×¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡¥ +¥¹¥¯¥ê¥×¥È¤¬²ÄÈÂÀ­¤ò»ý¤Ä¤è¤¦¤Ë¡¤Ê¸»úÎó¤Ï\\uXXXX¤È¤¤¤¦\ +Tcl¤Î¥¨¥¹¥±¡¼¥×ɽ¸½¤òÍѤ¤¤¿UNICODEʸ»úÎó¤Ç½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡¥\ +ʸ»úÎó¤Ï¡¤Tk::UTF8_String¥á¥½¥Ã¥É¤Ë¤è¤Ã¤Æ¡¤\ +¡ÖUTF8·Á¼°¤Îʸ»úÎó¤Ç¤¢¤ë¡×¤È¤¤¤¦\ +¥¨¥ó¥³¡¼¥É¾ðÊóÉÕ¤­¤Îʸ»úÎ󥪥֥¸¥§¥¯¥È\ +(Tcl¤Î¥¨¥¹¥±¡¼¥×ɽ¸½¤ÎÊÑ´¹ºÑ¤ß)¤ËÊÑ´¹¤·¤Æ\ +¥é¥Ù¥ë¥¦¥£¥¸¥§¥Ã¥È¤ËÅϤ·¤Æ¤¤¤ëÅÀ¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡¥ +EOL +#' + +TkFrame.new(base_frame){|f| + pack(:side=>:bottom, :fill=>:x, :pady=>'2m') + + TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{ + $unicodeout_demo.destroy + $unicodeout_demo = nil + }).pack(:side=>:left, :expand=>true) + + TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{ + showCode 'unicodeout' + }).pack(:side=>:left, :expand=>true) +} + +wait_msg = TkLabel.new(base_frame, + :text=>"¥Õ¥©¥ó¥ÈÆɤ߹þ¤ß¤Î´°Î»¤Þ¤Ç" + + "¤·¤Ð¤é¤¯¤ªÂÔ¤Á²¼¤µ¤¤¡¥¡¥¡¥", + :font=>"Helvetica 12 italic").pack + +class Unicodeout_SampleFrame < TkFrame + @@font = $font + # @@font = 'Helvetica 14' + # @@font = 'Courier 12' + # @@font = 'clearlyu 16' + # @@font = 'fixed 12' + # @@font = 'Times 12' + # @@font = 'Newspaper 12' + # @@font = '{New century schoolbook} 12' + + def initialize(base) + super(base) + grid_columnconfig(1, :weight=>1) + end + + def add_sample(lang, *args) + sample_txt = Tk::UTF8_String(args.join('')) + l = TkLabel.new(self, :font=>@@font, :text=>lang+':', + :anchor=>:nw, :pady=>0) + #s = TkLabel.new(self, :font=>@@font, :text=>sample_txt, + s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt, + :anchor=>:nw, :width=>30, :pady=>0) + Tk.grid(l, s, :sticky=>:ew, :pady=>0) + l.grid_config(:padx, '1m') + end +end +f = Unicodeout_SampleFrame.new(base_frame) +f.pack(:expand=>true, :fill=>:both, :padx=>'2m', :pady=>'1m') + +# Processing when some characters are missing might take a while, so make +# sure we're displaying something in the meantime... + +oldCursor = $unicodeout_demo.cursor +$unicodeout_demo.cursor('watch') +Tk.update + +f.add_sample('Arabic', + '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94', + '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D') +f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57') +f.add_sample('Simpl. Chinese', '\u6C49\u8BED') +f.add_sample('Greek', + '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ', + '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1') +f.add_sample('Hebrew', + '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ', + '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9') +f.add_sample('Japanese', + '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ', + '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA') +f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00') +f.add_sample('Russian', + '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ', + '\u044F\u0437\u044B\u043A') + +wait_msg.destroy +$unicodeout_demo.cursor(oldCursor) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/vscale.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/vscale.rb new file mode 100644 index 0000000..a1097fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/vscale.rb @@ -0,0 +1,80 @@ +# -*- coding: euc-jp -*- +require "tkcanvas" + +if defined?($vscale_demo) && $vscale_demo + $vscale_demo.destroy + $vscale_demo = nil +end + +$vscale_demo = TkToplevel.new {|w| + title("Vertical Scale Demonstration") + iconname("vscale") +} +positionWindow($vscale_demo) + +base_frame = TkFrame.new($vscale_demo).pack(:fill=>:both, :expand=>true) + +msg = TkLabel.new(base_frame) { + font $font + wraplength '3.5i' + justify 'left' +# text "²¼¤Ë¤ÏÌð°õ¤¬1¤Ä¤È¾èľ¤Ê¥¹¥±¡¼¥ë¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\ +#¥¹¥±¡¼¥ë¾å¤Ç¥Þ¥¦¥¹¥Ü¥¿¥ó1¤ò¥¯¥ê¥Ã¥¯¡¢¤Þ¤¿¤Ï¥É¥é¥Ã¥°¤¹¤ë¤È\ +#Ìð°õ¤ÎŤµ¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" + text "¤Ë¤Ï¥Ð¡¼¤È½Ä·¿¤Î¥¹¥±¡¼¥ë¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥¹¥±¡¼¥ë¤Ç¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó1 ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤«¥É¥é¥Ã¥°¤·¤Æ¥Ð¡¼¤Î¹â¤µ¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£½ª¤Ã¤¿¤é¡Öλ²ò¡×¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£" +} +msg.pack('side'=>'top', 'padx'=>'.5c') + +TkFrame.new(base_frame) {|frame| + TkButton.new(frame) { + #text 'λ²ò' + text 'ÊĤ¸¤ë' + command proc { + tmppath = $vscale_demo + $vscale_demo = nil + tmppath.destroy + } + }.pack('side'=>'left', 'expand'=>'yes') + + TkButton.new(frame) { + text '¥³¡¼¥É»²¾È' + command proc { showCode 'vscale' } + }.pack('side'=>'left', 'expand'=>'yes') +}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') + +def setHeight(w, height) + height = height + 21 + y2 = height - 30 + if y2 < 21 + y2 = 21 + end + w.coords 'poly',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20 + w.coords 'line',15,20,35,20,35,y2,45,y2,25,height,5,y2,15,y2,15,20 +end + +TkFrame.new(base_frame) {|frame| + borderwidth 10 + canvas = TkCanvas.new(frame) {|c| + width 50 + height 50 + bd 0 + highlightthickness 0 + TkcPolygon.new(c, 0, 0, 1, 1, 2, 2) { + fill 'SeaGreen3' + tags 'poly' + } + TkcLine.new(c, 0, 0, 1, 1, 2, 2, 0, 0) { + fill 'black' + tags 'line' + } + }.pack('side'=>'left', 'anchor'=>'nw', 'fill'=>'y') + scale = TkScale.new(frame) { + orient 'vertical' + length 284 + from 0 + to 250 + command proc{|value| setHeight(canvas, value)} + tickinterval 50 + }.pack('side'=>'left', 'anchor'=>'ne') + scale.set 75 +}.pack diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/widget b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/widget new file mode 100644 index 0000000..132953f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/demos-jp/widget @@ -0,0 +1,1118 @@ +#!/usr/bin/env ruby +# -*- coding: euc-jp -*- + +# ´Á»ú¥³¡¼¥ÉÀßÄê ( tk.rb ¤Î¥í¡¼¥É»þ¤Î encoding ¿äÄê/ÀßÄê¤Ë»È¤ï¤ì¤ë ) +#if RUBY_VERSION < '1.9.0' ### !!!!!!!!!!!!!! +unless defined?(::Encoding.default_external) + $KCODE = 'euc' +else + DEFAULT_TK_ENCODING = 'EUC-JP' +end + +# tk ´Ø·¸¥é¥¤¥Ö¥é¥ê¤ÎÆɤ߹þ¤ß +require 'tk' +# require 'tkafter' + +$RubyTk_WidgetDemo = true + +# widget demo directory °ÌÃ֤γÍÆÀ +# $demo_dir = File.dirname($0) +$demo_dir = File.dirname(__FILE__) + +# root ¤ÎÀ¸À® +$root = TkRoot.new{title "Ruby/Tk Widget Demonstration"} + +# tk ¥Ð¡¼¥¸¥ç¥ó¤Î¼èÆÀ +$tk_version = Tk::TK_VERSION +$tk_major_ver, $tk_minor_ver = $tk_version.split('.').map{|n| n.to_i} +$tk_patchlevel = Tk::TK_PATCHLEVEL + +# tcl_platform ¾ðÊó¤Ø¤Î¥¢¥¯¥»¥¹¥ª¥Ö¥¸¥§¥¯¥È +$tk_platform = TkVarAccess.new('tcl_platform') + +# ¥Õ¥©¥ó¥ÈÀßÄê +####### +case($tk_version) +when /^4.*/ + $font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil) + knjfont = '-*--16-*-jisx0208.1983-0' + $kanji_font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', + knjfont) + TkOption.add('*kanjiFont', knjfont, 'startupFile') + $msg_kanji_font=TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', + '-*--24-*-jisx0208.1983-0') + +#when '8.0' +# $font = TkFont.new('Helvetica -12') +# $kanji_font = TkFont.new('Helvetica -12', 'Mincho -12') +# TkOption.add('*kanjiFont', knjfont, 'startupFile') +# $msg_kanji_font=TkFont.new('Helvetica 16', 'Gothic 16 bold') + +when /^8.*/ + $font = TkFont.new('Helvetica -12') + $kanji_font = TkFont.new('Helvetica -12', 'Mincho -12') + TkOption.add('*kanjiFont', knjfont, 'startupFile') + $msg_kanji_font=TkFont.new('Helvetica 14 bold', 'Gothic 14 bold') + +else + $font = TkFont.new('Helvetica 14', nil) + knjfont = '-*--16-*-jisx0208.1983-0' + $kanji_font = TkFont.new('Helvetic 14', knjfont) + TkOption.add('*kanjiFont', knjfont, 'startupFile') + $msg_kanji_font=TkFont.new('Helvetica 14', + '-*--24-*-jisx0208.1983-0') +end +####### + +# ¥¤¥á¡¼¥¸ÀßÄê +$image = {} + +if $tk_major_ver >= 8 +$image['refresh'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['view'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['delete'] = TkPhotoImage.new(:height=>16, :format=>'GIF', :data=><= 8 +$image['print'] = TkPhotoImage.new(:height=>19, :format=>'GIF', :data=><= 8 + $root.add_menubar([[['File', 0], + ['About ... ', proc{aboutBox}, 0, ''], + '---', + ['Quit', proc{exit}, 0, 'Ctrl-Q'] + ]]) +else + TkMenubar.new($root, + [[['File', 0], + ['About ... ', proc{aboutBox}, 0, ''], + '---', + ['Quit', proc{exit}, 0, 'Ctrl-Q'] + ]]).pack('side'=>'top', 'fill'=>'x') +end +$root.bind('F1', proc{aboutBox}) +$root.bind('Control-q', proc{exit}) + +=begin +TkFrame.new($root){|frame| + TkMenubutton.new(frame){|button| + m = TkMenu.new(button) { + add 'command', 'label'=>'Quit', 'command'=>proc{exit}, 'underline'=>0 + } + menu m + text 'File' + underline 0 + }.pack('side'=>'left') +}.pack('side'=>'top', 'fill'=>'x') +=end + +# ¥Æ¥­¥¹¥È¥Ü¥Ã¥¯¥¹¤ÎÀ¸À® +if $tk_version =~ /^4\.[01]/ + scr = TkScrollbar.new($root, 'orient'=>'vertical') + txt = TkText.new($root) { + #wrap 'word' + wrap 'char' + width 70 + height 30 + font $font + setgrid 'yes' + yscrollcommand proc{|first,last| scr.set first,last} + } + scr.command(proc{|*args| txt.yview(*args)}) + scr.pack('side'=>'right', 'fill'=>'y') + txt.pack('expand'=>'yes', 'fill'=>'both') +else + textFrame = TkFrame.new($root) + scr = TkScrollbar.new($root, 'orient'=>'vertical', + 'highlightthickness'=>0, 'takefocus'=>1) { + pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1) + } + txt = TkText.new($root) { + #wrap 'word' + wrap 'char' + width 70 + height 30 + font $font + setgrid 'yes' + highlightthickness 0 + padx 4 + pady 2 + takefocus 0 + bd 1 + yscrollcommand proc{|first,last| scr.set first,last} + } + scr.command(proc{|*args| txt.yview(*args)}) +# txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both', 'padx'=>1) + txt.pack('in'=>textFrame, 'expand'=>'yes', 'fill'=>'both') +# textFrame.pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>2) + textFrame.pack('expand'=>'yes', 'fill'=>'both') + + statusBar = TkFrame.new($root) {|f| + if $tk_version =~ /^4.*/ + statusfont = '-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*' + else + statusfont = 'Helvetica 10' + end + $statusBarLabel = \ + TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w', + 'font'=>statusfont) \ + .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both') + TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w', + 'font'=>statusfont) \ + .pack('side'=>'left', 'padx'=>2) + }.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2) +end + +# ¥Æ¥­¥¹¥È¥¿¥°ÀßÄê +if $tk_version =~ /^4.*/ + tag_title = TkTextTag.new(txt, 'font'=>'-*-Helvetica-Bold-R-Normal--*-180-*-*-*-*-*-*') +else + tag_title = TkTextTag.new(txt, 'font'=>'Helvetica 18 bold') +end +#tag_kanji_title = TkTextTag.new(txt, 'kanjifont'=>$msg_kanji_font) +#tag_middle = TkTextTag.new(txt, 'kanjifont'=>$kanji_font) +tag_kanji_title = TkTextTag.new(txt, 'font'=>$msg_kanji_font) +tag_middle = TkTextTag.new(txt, 'font'=>$kanji_font) +tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c') + +if TkWinfo.depth($root) == 1 + tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'underline'=>1) + $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'underline'=>1) + tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white') +else + tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'foreground'=>'blue', 'underline'=>1) + $tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c', + 'foreground'=>'#303080', 'underline'=>1) +# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1, +# 'background'=>'SeaGreen3') + tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red') +end + +#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')}) +tag_demo.bind('ButtonRelease-1', + proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y') + +lastLine = TkVariable.new("") +newLine = TkVariable.new("") +tag_demo.bind('Enter', proc{|x,y| + lastLine.value = txt.index("@#{x},#{y} linestart") + tag_hot.add(lastLine.value, "#{lastLine.value} lineend") + showStatus txt, txt.index("@#{x},#{y}") + }, + '%x %y') +tag_demo.bind('Leave', + proc{ + tag_hot.remove('1.0','end') + txt.configure('cursor','xterm') + $statusBarLabel.configure('text'=>"") + }) +tag_demo.bind('Motion', proc{|x, y| + newLine.value = txt.index("@#{x},#{y} linestart") + if newLine.value != lastLine.value + tag_hot.remove('1.0','end') + lastLine.value = newLine.value + if ( txt.tag_names("@#{x},#{y}").find{|t| + t.kind_of?(String) && t =~ /^demo-/ + } ) + tag_hot.add(lastLine.value, + "#{lastLine.value} lineend -1 chars") + end + end + showStatus txt, txt.index("@#{x},#{y}") + }, + '%x %y') + +# ¥Æ¥­¥¹¥ÈÀ¸À® +txt.insert('end', 'Ruby/Tk : Widget', tag_title) +#txt.insert('end', " ¥Ç¥â¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó\n", tag_middle) +txt.insert('end', " ¥Ç¥â¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó\n", tag_kanji_title) +txt.insert('end', <<"EOT") + +¤³¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢Tk Widget ¤òÍѤ¤¤Æ¤É¤Î¤è¤¦¤Ê¤³¤È¤¬¤Ç¤­¤ë¤«\ +¤ò¼¨¤¹¤¿¤á¤Î¡¢¤¤¤¯¤Ä¤«¤Î¾®¤µ¤Ê¥¹¥¯¥ê¥×¥È¤ËÂФ¹¤ë¥Õ¥í¥ó¥È¥¨¥ó¥É¤òÄó\ +¶¡¤·¤Æ¤¤¤Þ¤¹¡£°Ê²¼¤Ë½çÈ֤˵󤲤é¤ì¤Æ¤¤¤ë¥Ç¥â¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó¤ò¼Â¹Ô\ +¤¹¤ë¤Ë¤Ï¥Þ¥¦¥¹¤Ç¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Ç¥â¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó¤Î¥¦¥£¥ó\ +¥É¥¦¤¬¸½¤ì¤ë¤È¡¢¥Ç¥â¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó¤òÀ¸À®¤·¤¿ Ruby/Tk ¤Î¥³¡¼¥É¤ò¸«\ +¤ë¤¿¤á¤Ë¡¢"¥³¡¼¥É»²¾È"¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¢¤Ê¤¿¤¬\ +˾¤à¤Ê¤é¡¢¤½¤Î¥³¡¼¥É¤ò½¤Àµ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£½¤Àµ¤·¤¿¥³¡¼¥É¤Ç¥Ç¥â\ +¥ó¥¹¥È¥ì¡¼¥·¥ç¥ó¤òºÆ¼Â¹Ô¤¹¤ë¤¿¤á¤Ë¤Ï¡¢¥³¡¼¥É¤¬½ñ¤«¤ì¤¿¥¦¥£¥ó¥É¥¦¤Ë\ +¤¢¤ë"¥Ç¥âºÆ¼Â¹Ô" ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£\ +¥³¡¼¥É¤ò½¤Àµ¤·¤Æ¤â¥ª¥ê¥¸¥Ê¥ë¤Î¥Õ¥¡¥¤¥ë¤¬½ñ¤­´¹¤¨¤é¤ì¤ë¤³¤È¤Ï\ +¤¢¤ê¤Þ¤»¤ó¤«¤é¡¢¿´ÇÛ¤»¤º¤Ë¿§¡¹¤ÊÊѹ¹¤ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ + +°ìÉô¤Î¥Ç¥â¤Ç¤Ï¡¢Èæ³ÓŪºÇ¶á¤Î¥Ð¡¼¥¸¥ç¥ó¤Î Tk ¤Ç¤Ê¤±¤ì¤Ð¥µ¥Ý¡¼¥È¤·¤Æ\ +¤¤¤Ê¤¤µ¡Ç½¤ò»È¤Ã¤Æ¼ÂÁõ¤·¤Æ¤¤¤Þ¤¹(Î㤨¤Ð Tk8.4 °Ê¾å¤Ê¤É)¡£¤½¤Î¤¿¤á¡¢\ +¤½¤¦¤·¤¿µ¡Ç½¤ò»ý¤¿¤Ê¤¤ Tk ¥é¥¤¥Ö¥é¥ê¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¤½¤¦¤·¤¿\ +¥Ç¥â¤ÏÀµ¤·¤¯Æ°¤­¤Þ¤»¤ó¡£¤½¤Î¤è¤¦¤Êµ¡Ç½¤¬É¬ÍפǤ¢¤ì¤Ð¡¢¤½¤ì¤ò¥µ¥Ý¡¼¥È\ +¤·¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¤è¤¦¤Ë tcltklib ¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤Ê¤ª¤·¤Æ\ +¤¯¤À¤µ¤¤¡£ + +¤â¤·¤¢¤Ê¤¿¤Î Tk ¤¬ (ºÇ½é¤«¤é´Þ¤à¤«¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤«¤Ë¤è¤ê) \ +Ttk (Tile) ³ÈÄ¥¤òÍøÍѤǤ­¤ë¾õÂ֤Ǥ¢¤ë¤Ê¤é¡¢\ +Ttk ³ÈÄ¥¤Î¥Ç¥â (sample/tkextlib/tile/demo.rb) ¤â¤¼¤Ò»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ +( ¿ʬ¡¤¸½ºß¤Î¤¢¤Ê¤¿¤Î´Ä¶­¤Ë¤Ï Ttk ³ÈÄ¥¤Ï\ +#{ +begin + require 'tkextlib/tile' + "¤¹¤Ç¤ËƳÆþ¤µ¤ì¤Æ¤¤¤Þ¤¹" +rescue + "¤Þ¤À¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" +end +}\ +¡£) +Ttk ³ÈÄ¥¤Ï¡¢Tk8.5 °Ê¾å¤Ç¤Ïɸ½à¤Îµ¡Ç½¤È¤·¤ÆÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ + + +EOT + +#txt.insert('end',"¥é¥Ù¥ë, ¥Ü¥¿¥ó, ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó, ¥é¥¸¥ª¥Ü¥¿¥ó\n",tag_middle) +txt.insert('end', "¥é¥Ù¥ë, ¥Ü¥¿¥ó, ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó, ¥é¥¸¥ª¥Ü¥¿¥ó\n", + tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥é¥Ù¥ë (¥Æ¥­¥¹¥È, ¥Ó¥Ã¥È¥Þ¥Ã¥×)\n", + tag_demo, "demo-label") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¥é¥Ù¥ë¤ÈUNICODE¥Æ¥­¥¹¥È (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-unicodeout") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥Ü¥¿¥ó \n", tag_demo, "demo-button") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó (Ê£¿ô¤òÁªÂò²Äǽ)\n", + tag_demo, "demo-check") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. £³¾õÂÖ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-check2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "6. ¥é¥¸¥ª¥Ü¥¿¥ó (Ǥ°Õ¤Î°ì¤Ä¤òÁªÂò²Äǽ)\n", + tag_demo, "demo-radio") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "7. ¥é¥¸¥ª¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-radio2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "8. £³¾õÂ֥饸¥ª¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-radio3") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "9. ¥Ü¥¿¥ó¤Çºî¤é¤ì¤¿15-¥Ñ¥º¥ë¥²¡¼¥à\n", + tag_demo, "demo-puzzle") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "10. ¥Ó¥Ã¥È¥Þ¥Ã¥×¤ò»ÈÍѤ·¤¿¥¢¥¤¥³¥ó¥Ü¥¿¥ó\n", + tag_demo, "demo-icon") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "11. ²èÁü¤òɽ¼¨¤¹¤ëÆó¤Ä¤Î¥é¥Ù¥ë\n", + tag_demo, "demo-image1") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "12. ²èÁü¤ò¸«¤ë¤¿¤á¤Î´Êñ¤Ê¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹\n", + tag_demo, "demo-image2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "13. ²èÁü¤ò¸«¤ë¤¿¤á¤Î´Êñ¤Ê¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-image3") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "14. ¥é¥Ù¥ëÉÕ¤­¥Õ¥ì¡¼¥à (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-labelframe") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "15. ¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥¦¥£¥¸¥§¥Ã¥È¤Î´Êñ¤ÊÎã (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo, "demo-ttkbut") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥ê¥¹¥È¥Ü¥Ã¥¯¥¹\n", tag_middle) +txt.insert('end', "¥ê¥¹¥È¥Ü¥Ã¥¯¥¹\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ÅÔÆ»Éܸ©.\n", tag_demo, "demo-states") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¿§: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¤¿¤á¤ÎÇÛ¿§¤òÊѤ¨¤ë\n", + "#{tag_demo.id} demo-colors") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ³Ê¸À½¸\n", tag_demo, "demo-sayings") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¹ñ¤Ë¤Ä¤¤¤Æ¤Î¥Þ¥ë¥Á¥«¥é¥à¥ê¥¹¥È (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo, "demo-mclist") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. ¥Ç¥£¥ì¥¯¥È¥ê¥Ö¥é¥¦¥¶ (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo, "demo-tree") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥¨¥ó¥È¥ê¤È¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹\n", tag_middle) +txt.insert('end', "¥¨¥ó¥È¥ê\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ê¤·\n", tag_demo, "demo-entry1") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤¢¤ê\n", tag_demo, "demo-entry2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ǧ¾Ú½èÍýÉÕ¤­¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤È¥Ñ¥¹¥ï¡¼¥É¥Õ¥£¡¼¥ë¥É (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-entry3") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-spin") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. ¥³¥ó¥Ü¥Ü¥Ã¥¯¥¹ (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo, "demo-combo") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "6. ´Êñ¤Ê¥Õ¥©¡¼¥à\n", tag_demo, "demo-form") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥Æ¥­¥¹¥È\n", tag_middle) +txt.insert('end', "¥Æ¥­¥¹¥È\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ´ðËÜŪ¤Ê¥Æ¥­¥¹¥È\n", tag_demo, "demo-text") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ɽ¼¨¥¹¥¿¥¤¥ë.\n", tag_demo, "demo-style") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥Ï¥¤¥Ñ¡¼¥Æ¥­¥¹¥È(¥¿¥°¥Ð¥¤¥ó¥É).\n", + tag_demo, "demo-bind") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¥¦¥£¥ó¥É¥¦¤òËä¤á¹þ¤ó¤À¥Æ¥­¥¹¥È\n", + tag_demo, "demo-twind") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. ¥¦¥£¥ó¥É¥¦¤òËä¤á¹þ¤ó¤À¥Æ¥­¥¹¥È (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-twind2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "6. ¸¡º÷\n", tag_demo, "demo-search") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "7. ¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤ÎÂÐÅù²½(peering) (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-textpeer") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥­¥ã¥ó¥Ð¥¹\n", tag_middle) +txt.insert('end', "¥­¥ã¥ó¥Ð¥¹\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥¢¥¤¥Æ¥à¤Î·¿\n", tag_demo, "demo-items") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. 2 ¼¡¸µ¤Î¥×¥í¥Ã¥È\n", tag_demo, "demo-plot") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥Æ¥­¥¹¥È\n", tag_demo, "demo-ctext") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. Ìð°õ¤Î·Á\n", tag_demo, "demo-arrow") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. ¥ë¡¼¥é¡¼\n", tag_demo, "demo-ruler") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "6. ¥Õ¥í¥¢¥×¥é¥ó\n", tag_demo, "demo-floor") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "7. ¥Õ¥í¥¢¥×¥é¥ó (°Û¤Ê¤ë¥­¥ã¥ó¥Ð¥¹¥¢¥¤¥Æ¥àºîÀ®ÊýË¡¤ò»ÈÍÑ)\n", tag_demo, "demo-floor2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "8. ¥¹¥¯¥í¡¼¥ë²Äǽ¤Ê¥­¥ã¥ó¥Ð¥¹\n", + tag_demo, "demo-cscroll") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "9. ¥Á¥§¥¹¥Ü¡¼¥É¾å¤Îµ³»Î¤Î½ä²ó (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo, "demo-knightstour") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥¹¥±¡¼¥ë¤È¥×¥í¥°¥ì¥¹¥Ð¡¼\n", tag_middle) +txt.insert('end', "¥¹¥±¡¼¥ë¤È¥×¥í¥°¥ì¥¹¥Ð¡¼\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¿âľ¥¹¥±¡¼¥ë\n", tag_demo.id, "demo-vscale") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¿åÊ¿¥¹¥±¡¼¥ë\n", tag_demo.id, "demo-hscale") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥×¥í¥°¥ì¥¹¥Ð¡¼ (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", tag_demo.id, "demo-ttkprogress") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +txt.insert('end', "¥Ú¥¤¥ó¥É¥¦¥£¥ó¥É¥¦¤È¥Î¡¼¥È¥Ö¥Ã¥¯\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¿åÊ¿Êý¸þ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo.id, "demo-paned1") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¿âľÊý¸þ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo.id, "demo-paned2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿Ëä¤á¹þ¤ß¥Ú¥¤¥ó (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo.id, "demo-ttkpane") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¥Î¡¼¥È¥Ö¥Ã¥¯¥¦¥£¥¸¥§¥Ã¥È (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo.id, "demo-ttknote") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥á¥Ë¥å¡¼¤È¥Ä¡¼¥ë¥Ð¡¼\n", tag_middle) +txt.insert('end', "¥á¥Ë¥å¡¼¤È¥Ä¡¼¥ë¥Ð¡¼\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¤ò´Þ¤ó¤À¥¦¥£¥ó¥É¥¦\n", + tag_demo, "demo-menu") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¤ò´Þ¤ó¤À¥¦¥£¥ó¥É¥¦ (Tk8.x ÀìÍÑ)\n", + tag_demo, "demo-menu8x") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¡· (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", + tag_demo, "demo-menu84") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¥á¥Ë¥å¡¼¥Ü¥¿¥ó (Tk8.x ÀìÍÑ)\n", + tag_demo, "demo-menubu") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "5. ¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥á¥Ë¥å¡¼¥Ü¥¿¥ó (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo.id, "demo-ttkmenu") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "6. ¥Æ¡¼¥Þ¤ËÂбþ¤·¤¿¥Ä¡¼¥ë¥Ð¡¼ (Tile/Ttk³ÈÄ¥¤Ø¤ÎÂбþ¤¬É¬Í×)\n", + tag_demo.id, "demo-toolbar") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥À¥¤¥¢¥í¥°¥¦¥£¥ó¥É¥¦\n", tag_middle) +txt.insert('end', "¥À¥¤¥¢¥í¥°¥¦¥£¥ó¥É¥¦\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹\n", tag_demo, "demo-msgbox") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¾ÜºÙ¥Æ¥­¥¹¥ÈÉÕ¤­¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-msgbox2") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥Õ¥¡¥¤¥ëÁªÂò¥À¥¤¥¢¥í¥°\n", tag_demo, "demo-filebox") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. ¿§ÁªÂò¥À¥¤¥¢¥í¥°\n", tag_demo, "demo-clrpick") +txt.insert('end', " \n ", tag_demospace) + +txt.insert('end', "\n") +#txt.insert('end', "¥¢¥Ë¥á¡¼¥·¥ç¥ó\n", tag_middle) +txt.insert('end', "¥¢¥Ë¥á¡¼¥·¥ç¥ó\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ¥¢¥Ë¥á¡¼¥·¥ç¥ó¥é¥Ù¥ë (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-anilabel") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ÇÈ·Á¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-aniwave") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¿¶¤ê»Ò¤Î¥·¥ß¥å¥ì¡¼¥·¥ç¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-pendulum") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "4. A celebration of Rube Goldberg (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-goldberg") + +txt.insert('end', "\n") +#txt.insert('end', "¤½¤Î¾\n", tag_middle) +txt.insert('end', "¤½¤Î¾\n", tag_kanji_title) +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "1. ÁȤ߹þ¤ß¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×\n", tag_demo, "demo-bitmap") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "2. ¥â¡¼¥À¥ë¥À¥¤¥¢¥í¥°(¥í¡¼¥«¥ë¥°¥é¥Ö)\n", + tag_demo, "demo-dialog1") +txt.insert('end', " \n ", tag_demospace) +txt.insert('end', "3. ¥â¡¼¥À¥ë¥À¥¤¥¢¥í¥°(¥°¥í¡¼¥Ð¥ë¥°¥é¥Ö)\n", + tag_demo, "demo-dialog2") +txt.insert('end', " \n ", tag_demospace) + +txt.state('disabled') +scr.focus + +################################ +# method ÄêµÁ +################################ +def positionWindow(w) + w.geometry('+300+300') +end + +# ¿Æ¥¦¥£¥¸¥§¥Ã¥È¤È¡¤ÊÑ¿ô̾¤È TkVariable ¤È¤ÎÁÈ(ÇÛÎó)¤ÎʤӤòÅϤ¹ +$showVarsWin = {} +def showVars1(parent, *args) + if $showVarsWin[parent.path] + begin + $showVarsWin[parent.path].destroy + rescue + end + end + top = TkToplevel.new(parent) {|w| + title "Variable values" + base = TkFrame.new(w).pack(:fill=>:both, :expand=>true) + TkLabel.new(base) { + text "ÊÑ¿ôÃÍ:" + width 20 + anchor 'center' + if $tk_version =~ /^4.*/ + font '-Adobe-helvetica-medium-r-normal--*-180-*-*-*-*-*-*' + else + font 'Helvetica 14' + end + }.pack('side'=>'top', 'fill'=>'x') + len = 1 + args.each{|vnam,vbody| + len = vnam.to_s.length if vnam.to_s.length > len + } + args.each{|vnam,vbody| + TkFrame.new(base){|f| + #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left') + TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left') + TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\ + .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x') + }.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x') + } + TkButton.new(base) { + text "λ²ò" + command proc{w.destroy} + }.pack('side'=>'bottom', 'pady'=>2) + } + $showVarsWin[parent.path] = top +end + +def showVars2(parent, *args) + if $showVarsWin[parent.path] + begin + $showVarsWin[parent.path].destroy + rescue + end + end + $showVarsWin[parent.path] = TkToplevel.new(parent) {|top| + title "Variable values" + + base = TkFrame.new(top).pack(:fill=>:both, :expand=>true) + + TkLabelFrame.new(base, :text=>"ÊÑ¿ôÃÍ:", + :font=>{:family=>'Helvetica', :size=>14}){|f| + args.each{|vnam,vbody| + TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'), + TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'), + :padx=>2, :pady=>2, :sticky=>'w') + } + + f.grid(:sticky=>'news', :padx=>4) + f.grid_columnconfig(1, :weight=>1) + f.grid_rowconfig(100, :weight=>1) + } + TkButton.new(base, :text=>"λ²ò", :width=>8, :default=>:active, + :command=>proc{top.destroy}){|b| + top.bind('Return', proc{b.invoke}) + top.bind('Escape', proc{b.invoke}) + + b.grid(:sticky=>'e', :padx=>4, :pady=>[6, 4]) + } + base.grid_columnconfig(0, :weight=>1) + base.grid_rowconfig(0, :weight=>1) + } +end + +if $tk_major_ver < 8 + alias showVars showVars1 +elsif $tk_major_ver == 8 && $tk_minor_ver < 4 + alias showVars showVars1 +else # ver >= 8.4 + alias showVars showVars2 +end + +# µ¿»÷¥È¥Ã¥×¥ì¥Ù¥ë¥µ¥Ý¡¼¥È +module PseudoToplevel_Evaluable + def pseudo_toplevel_eval(body = Proc.new) + Thread.current[:TOPLEVEL] = self + begin + body.call + ensure + Thread.current[:TOPLEVEL] = nil + end + end + + def pseudo_toplevel_evaluable? + @pseudo_toplevel_evaluable + end + def pseudo_toplevel_evaluable=(mode) + @pseudo_toplevel_evaluable = (mode)? true: false + end + + def self.extended(mod) + mod.__send__(:extend_object, mod) + mod.instance_variable_set('@pseudo_toplevel_evaluable', true) + end +end + +class Object + alias __method_missing__ method_missing + private :__method_missing__ + + def method_missing(id, *args) + begin + has_top = (top = Thread.current[:TOPLEVEL]) && + top.respond_to?(:pseudo_toplevel_evaluable?) && + top.pseudo_toplevel_evaluable? && + top.respond_to?(id) + rescue Exception => e + has_top = false + end + + if has_top + top.__send__(id, *args) + else + __method_missing__(id, *args) + end + end +end + +class Proc + def initialize(*args, &b) + super + @__pseudo_toplevel__ = Thread.current[:TOPLEVEL] + end + + alias __call__ call + def call(*args, &b) + if top = @__pseudo_toplevel__ + orig_top = Thread.current[:TOPLEVEL] + Thread.current[:TOPLEVEL] = top + begin + __call__(*args, &b) + ensure + Thread.current[:TOPLEVEL] = orig_top + end + else + __call__(*args, &b) + end + end +end + +def proc(&b) + Proc.new(&b) +end +def lambda(&b) + Proc.new(&b) +end + +def _null_binding + Module.new.instance_eval{extend PseudoToplevel_Evaluable} + # binding + # Module.new.instance_eval{binding} +end +private :_null_binding + +def eval_samplecode(code, file=nil) + #eval(code) + #_null_binding.pseudo_toplevel_eval{ eval(code) } + #Thread.new{ _null_binding.pseudo_toplevel_eval{ eval(code) } } + Thread.new{ + _null_binding.pseudo_toplevel_eval{ + begin + if file + eval(code, binding, "(eval:#{file})") + else + eval(code) + end + rescue Exception=>e + #p e + TkBgError.show(e.message + "\n" + + "\n---< backtrace of Ruby side >-----\n" + + e.backtrace.join("\n") + + "\n---< backtrace of Tk side >-------") + end + } + } + Tk.update +end + +# ¥Æ¥­¥¹¥È¾å¤Ç¤Î click ¤ËÂФ¹¤ëÆ°ºî +def invoke(txt, idx) + tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/} + return unless tag + + cursor = txt.cget('cursor') + txt.cursor('watch') + Tk.update + # eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding) + # Tk.update + eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb') + txt.cursor(cursor) + + $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars") +end +=begin +def invoke (txt, idx) + tag = txt.tag_names(idx).find{|t| t.kind_of?(String) && t =~ /^demo-/} + return unless tag + current_cursor = txt.cget('cursor') + txt.cursor('watch') + Tk.update +# eval `cat #{tag[5..-1]}.rb` +# eval `cat #{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb` + eval IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join + Tk.update +# txt.cursor('xterm') + txt.cursor(current_cursor) + + $tag_visited.add("#{idx} linestart +1 chars", "#{idx} lineend +1 chars") +end +=end + +# ¾õÂÖɽ¼¨ +def showStatus (txt, index) + tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/} + cursor = txt.cget('cursor') + unless tag + $statusBarLabel.configure('text', " ") + newcursor = 'xterm' + else + demoname = tag[5..-1] + $statusBarLabel.configure('text', + "¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à \"#{demoname}\" ¤Î¼Â¹Ô ") + newcursor = 'hand2' + end + txt.configure('cursor'=>newcursor) if cursor != newcursor +end + +# ¥½¡¼¥¹¥³¡¼¥É¤Îɽ¼¨ +def showCode1(demo) + file = "#{demo}.rb" + $code_window = nil unless defined? $code_window + if $code_window == nil || TkWinfo.exist?($code_window) == false + $code_window = TkToplevel.new(nil) + f = TkFrame.new($code_window) + + TkButton.new(f) { + #text "λ²ò" + text "ÊĤ¸¤ë" + command proc{ + $code_window.destroy + $code_window = nil + } + }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2) + TkButton.new(f) { + text "ºÆ¼Â¹Ô" + # command proc{eval($code_text.get('1.0','end'), _null_binding)} + command proc{eval_samplecode($code_text.get('1.0','end'), '')} + }.pack('side'=>'right', 'expand'=>'false', 'pady'=>2) + + TkLabel.new(f,'text'=>'line:').pack('side'=>'left') + linenum =TkLabel.new(f,'text'=>'').pack('side'=>'left') + TkLabel.new(f,'text'=>' pos:').pack('side'=>'left') + posnum =TkLabel.new(f,'text'=>'').pack('side'=>'left') + + $set_linenum = proc{|w| + line, pos = w.index('insert').split('.') + linenum.text = line + posnum.text = pos + } + + f.pack('side'=>'bottom', 'expand'=>'true', 'fill'=>'x') + + if $tk_version =~ /^4\.[01]/ + s = TkScrollbar.new($code_window, 'orient'=>'vertical') + $code_text = TkText.new($code_window) { + height 40 + setgrid 'yes' + yscrollcommand proc{|first,last| s.set first,last} + } + s.command(proc{|*args| $code_text.yview(*args)}) + s.pack('side'=>'right', 'fill'=>'y') + $code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both') + else + TkFrame.new($code_window) {|f| + pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1) + + hs = TkScrollbar.new($code_window, 'highlightthickness'=>0, + 'orient'=>'horizontal') + vs = TkScrollbar.new($code_window, 'highlightthickness'=>0, + 'orient'=>'vertical') + $code_text = TkText.new($code_window) {|t| + height 40 + #wrap 'word' + wrap 'char' + xscrollcommand proc{|first,last| hs.set first,last} + yscrollcommand proc{|first,last| vs.set first,last} + setgrid 'yes' + highlightthickness 0 + pady 2 + padx 3 + hs.command(proc{|*args| $code_text.xview(*args)}) + vs.command(proc{|*args| $code_text.yview(*args)}) + } + + $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1, + 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') +# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0, +# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news') + TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0) + } + end + + btag = TkBindTag.new + + btag.bind('Key', $set_linenum, '%W') + btag.bind('Button', $set_linenum, '%W') + + btags = $code_text.bindtags + btags.insert(btags.index($code_text.class) + 1, btag) + $code_text.bindtags = btags + + else + $code_window.deiconify + $code_window.raise + end + + $code_window.title("Demo code: #{file}") + $code_window.iconname(file) + code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read } + $code_text.delete('1.0', 'end') + code.force_encoding('EUC-JP') if defined?(::Encoding.default_external) + $code_text.insert('1.0', code) + TkTextMarkInsert.new($code_text,'1.0') + $set_linenum.call($code_text) +end + +def showCode2(demo) + file = "#{demo}.rb" + $code_window = nil unless defined? $code_window + if $code_window == nil || TkWinfo.exist?($code_window) == false + $code_window = TkToplevel.new(nil) + tf = TkFrame.new($code_window) + $code_text = TkText.new(tf, :font=>'Courier 10', :height=>30, + :wrap=>'word', :bd=>1, :setgrid=>true, + :highlightthickness=>0, :pady=>2, :padx=>3) + xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)} + yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)} + TkGrid($code_text, yscr, :sticky=>'news') + #TkGrid(xscr) + tf.grid_rowconfigure(0, :weight=>1) + tf.grid_columnconfigure(0, :weight=>1) + + bf = TkFrame.new($code_window) + + lf = TkFrame.new(bf) + TkLabel.new(lf, :text=>'line:').pack(:side=>:left) + linenum =TkLabel.new(lf, :text=>'').pack(:side=>:left) + TkLabel.new(lf, :text=>' pos:').pack(:side=>:left) + posnum =TkLabel.new(lf, :text=>'').pack(:side=>:left) + + $set_linenum = proc{|w| + line, pos = w.index('insert').split('.') + linenum.text = line + posnum.text = pos + } + + #b_dis = TkButton.new(bf, :text=>'λ²ò', :default=>:active, + b_dis = TkButton.new(bf, :text=>'ÊĤ¸¤ë', :default=>:active, + :command=>proc{ + $code_window.destroy + $code_window = nil + }, + :image=>$image['delete'], :compound=>:left) + b_prn = TkButton.new(bf, :text=>'°õºþ', + :command=>proc{printCode($code_text, file)}, + :image=>$image['print'], :compound=>:left) + b_run = TkButton.new(bf, :text=>'ºÆ¼Â¹Ô', + :command=>proc{ + # eval($code_text.get('1.0','end'), _null_binding) + eval_samplecode($code_text.get('1.0','end'), '') + }, + :image=>$image['refresh'], :compound=>:left) + + TkGrid(lf, 'x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4]) + bf.grid_columnconfigure(1, :weight=>1) + + TkGrid(tf, :sticky=>'news') + TkGrid(bf, :sticky=>'ew') + $code_window.grid_columnconfigure(0, :weight=>1) + $code_window.grid_rowconfigure(0, :weight=>1) + + $code_window.bind('Return', proc{|win| + b_dis.invoke unless win.kind_of?(TkText) + }, '%W') + $code_window.bindinfo('Return').each{|cmd, arg| + $code_window.bind_append('Escape', cmd, arg) + } + + btag = TkBindTag.new + + btag.bind('Key', $set_linenum, '%W') + btag.bind('Button', $set_linenum, '%W') + + btags = $code_text.bindtags + btags.insert(btags.index($code_text.class) + 1, btag) + $code_text.bindtags = btags + + else + $code_window.deiconify + $code_window.raise + end + + $code_window.title("Demo code: #{file}") + $code_window.iconname(file) + code = open([$demo_dir, file].join(File::Separator), 'r'){|fid| fid.read } + $code_text.delete('1.0', 'end') + code.force_encoding('EUC-JP') if defined?(::Encoding.default_external) + $code_text.insert('1.0', code) + TkTextMarkInsert.new($code_text,'1.0') + $set_linenum.call($code_text) +end + +if $tk_major_ver < 8 + alias showCode showCode1 +elsif $tk_major_ver == 8 && $tk_minor_ver < 4 + alias showCode showCode1 +else # ver >= 8.4 + alias showCode showCode2 +end + + +# printCode -- +# Prints the source code currently displayed in the See Code dialog. +# Much thanks to Arjen Markus for this. +# +# Arguments: +# txt - Name of text widget containing code to print +# file - Name of the original file (implicitly for title) + +def printCode(txt, file) + code = txt.get('1.0', 'end - 1c') + dir = '.' + dir = ENV['HOME'] if ENV['HOME'] + dir = ENV['TMP'] if ENV['TMP'] + dir = ENV['TEMP'] if ENV['TEMP'] + + fname = [dir, 'tkdemo-' + file].join(File::Separator) + open(fname, 'w'){|fid| fid.print(code)} + begin + case Tk::TCL_PLATFORM('platform') + when 'unix' + msg = `lp -c #{fname}` + unless $?.exitstatus == 0 + Tk.messageBox(:title=>'Print spooling failure', + :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' + + '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' + msg) + end + when 'windows' + begin + printTextWin32(fname) + rescue => e + Tk.messageBox(:title=>'Print spooling failure', + :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' + + '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' + + e.message) + end + when 'macintosh' + Tk.messageBox(:title=>'Operation not Implemented', + :message=>'°õºþµ¡Ç½¤Ï¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó') + else + Tk.messageBox(:title=>'Operation not Implemented', + :message=>'¸¡½Ð¤µ¤ì¤¿´Ä¶­ ' + + Tk::TCL_PLATFORM('platform') + + ' ¤Ï̤ÃΤδĶ­¤Ç¤¢¤ë¤¿¤á¡¤' + + '°õºþµ¡Ç½¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó: ') + end + ensure + File.delete(fname) + end +end + +# printTextWin32 -- +# Print a file under Windows +# +# Arguments: +# filename - Name of the file +# +def printTextWin32(fname) + require 'win32/registry' + begin + app = Win32::Registry::HKEY_CLASSES_ROOT['.txt'] + pcmd = nil + Win32::Registry::HKEY_CLASSES_ROOT.open("#{app}\\shell\\print"){|reg| + pcmd = reg['command'] + } + rescue + app = Tk.tk_call('auto_execok', 'notepad.exe') + pcmd = "#{app} /p %1" + end + + pcmd.gsub!('%1', fname) + puts pcmd + cmd = Tk.tk_call('auto_execok', 'start') + ' /min ' + pcmd + + msg = `#{cmd}` + unless $?.exitstatus == 0 + fail RuntimeError, msg + end +end + +# aboutBox +# +# Pops up a message box with an "about" message +# +def aboutBox + Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo', + 'message'=>"Ruby/Tk ¥¦¥£¥¸¥§¥Ã¥È¥Ç¥â Ver.1.7.0-jp\n\n" + + "based on demos of Tk8.1 -- 8.5 " + + "( Copyright of Tcl/Tk demos:: " + + "(c) 1996-1997 Sun Microsystems, Inc. / " + + "(c) 1997-2000 Ajuba Solutions, Inc. / " + + "(c) 2001-2007 Donal K. Fellows / " + + "(c) 2002-2007 Daniel A. Steffen )\n\n" + + "Your Ruby & Tk Version ::\n" + + "Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}\n\n" + + "Ruby/Tk release date :: tcltklib #{TclTkLib::RELEASE_DATE}; tk #{Tk::RELEASE_DATE}") +end + +#################################### +# °ú¿ô¤Ç»ØÄꤵ¤ì¤¿¥Ç¥â¤òµ¯Æ°¤¹¤ë +no_launcher = false +if ARGV[0] == '-n' + ARGV.shift + no_launcher = true if ARGV.size > 0 +else + # show the root widget to make it lower then demo windows + Tk.update +end +ARGV.each{|cmd| + if cmd =~ /(.*).rb/ + cmd = $1 + end + #eval(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, + # _null_binding) + eval_samplecode(IO.readlines("#{[$demo_dir, cmd].join(File::Separator)}.rb").join, cmd + '.rb') +} +if no_launcher + $root.withdraw # hide root window + Thread.start{ + loop do + count = 0 + $root.winfo_children.each{|w| + count += 1 if w.kind_of?(TkToplevel) + } + $root.destroy if count == 0 + end + } +end + +################################ +# ¥¤¥Ù¥ó¥ÈÂÔ¤Á¤ËÆþ¤ë +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/editable_listbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/editable_listbox.rb new file mode 100644 index 0000000..99345da --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/editable_listbox.rb @@ -0,0 +1,69 @@ +# +# Editable_TkListbox class +# +# When "DoubleClick-1" on a listbox item, the entry box is opend on the +# item. And when hit "Return" key on the entry box after modifying the +# text, the entry box is closed and the item is changed. Or when hit +# "Escape" key, the entry box is closed without modification. +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +class Editable_TkListbox < TkListbox + def _ebox_placer(coord_y) + idx = self.nearest(coord_y) + x, y, w, h = self.bbox(idx) + @ebox.place(:x => 0, :relwidth => 1.0, + :y => y - self.selectborderwidth, + :height => h + 2 * self.selectborderwidth) + @ebox.pos = idx + @ebox.value = self.listvariable.list[idx] + @ebox.focus + end + private :_ebox_placer + + + def create_self(keys) + super(keys) + + unless self.listvariable + self.listvariable = TkVariable.new(self.get(0, :end)) + end + + @ebox = TkEntry.new(self){ + @pos = -1 + def self.pos; @pos; end + def self.pos=(idx); @pos = idx; end + } + + @ebox.bind('Return'){ + list = self.listvariable.list + list[@ebox.pos] = @ebox.value + self.listvariable.value = list + @ebox.place_forget + @ebox.pos = -1 + } + + @ebox.bind('Escape'){ + @ebox.place_forget + @ebox.pos = -1 + } + + self.bind('Double-1', '%y'){|y| _ebox_placer(y) } + end +end + +if $0 == __FILE__ + scr = TkScrollbar.new.pack(:side=>:right, :fill=>:y) + + lbox1 = Editable_TkListbox.new.pack(:side=>:left) + lbox2 = Editable_TkListbox.new.pack(:side=>:left) + + scr.assign(lbox1, lbox2) + + lbox1.insert(:end, *%w(a b c d e f g h i j k l m n)) + lbox2.insert(:end, 0,1,2,3,4,5,6,7,8,9,0,1,2,3) + + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/encstr_usage.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/encstr_usage.rb new file mode 100644 index 0000000..b22c250 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/encstr_usage.rb @@ -0,0 +1,30 @@ +require 'tk' + +TkMessage.new(:width=>400, :text=><5).pack +t2 = TkText.new(:height=>5).pack +t3 = TkText.new(:height=>5).pack + +src_str = IO.readlines(File.join(File.dirname(__FILE__),'iso2022-kr.txt')).join + +t1.insert('end', + "use neither Tk::EncodedString class nor Tk.encoding= method\n\n") +t1.insert('end', src_str) + +enc_str = Tk::EncodedString(src_str, 'iso2022-kr') +t2.insert('end', + "use Tk::EncodedString class (Tk.encoding => '#{Tk.encoding}')\n\n") +t2.insert('end', enc_str) + +Tk.encoding = 'iso2022-kr' +t3.insert('end', "use Tk.encoding = 'iso2022-kr' (Tk.force_default_encoding? == #{Tk.force_default_encoding?})\n\n") + +t3.insert('end', src_str) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/figmemo_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/figmemo_sample.rb new file mode 100644 index 0000000..1b6979d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/figmemo_sample.rb @@ -0,0 +1,456 @@ +#!/usr/bin/env ruby +require 'tk' + +begin + # try to use Img extension + require 'tkextlib/tkimg' +rescue Exception + # cannot use Img extention --> ignore +end + + +############################ +# scrolled_canvas +class TkScrolledCanvas < TkCanvas + include TkComposite + + def initialize_composite(keys={}) + @h_scr = TkScrollbar.new(@frame) + @v_scr = TkScrollbar.new(@frame) + + @canvas = TkCanvas.new(@frame) + @path = @canvas.path + + @canvas.xscrollbar(@h_scr) + @canvas.yscrollbar(@v_scr) + + TkGrid.rowconfigure(@frame, 0, :weight=>1, :minsize=>0) + TkGrid.columnconfigure(@frame, 0, :weight=>1, :minsize=>0) + + @canvas.grid(:row=>0, :column=>0, :sticky=>'news') + @h_scr.grid(:row=>1, :column=>0, :sticky=>'ew') + @v_scr.grid(:row=>0, :column=>1, :sticky=>'ns') + + delegate('DEFAULT', @canvas) + delegate('background', @canvas, @h_scr, @v_scr) + delegate('activebackground', @h_scr, @v_scr) + delegate('troughcolor', @h_scr, @v_scr) + delegate('repeatdelay', @h_scr, @v_scr) + delegate('repeatinterval', @h_scr, @v_scr) + delegate('borderwidth', @frame) + delegate('relief', @frame) + + delegate_alias('canvasborderwidth', 'borderwidth', @canvas) + delegate_alias('canvasrelief', 'relief', @canvas) + + delegate_alias('scrollbarborderwidth', 'borderwidth', @h_scr, @v_scr) + delegate_alias('scrollbarrelief', 'relief', @h_scr, @v_scr) + + configure(keys) unless keys.empty? + end +end + +############################ +class PhotoCanvas < TkScrolledCanvas + +USAGE = <@photo) + + width = self.width + height = self.height + @scr_region = [-width, -height, width, height] + self.scrollregion(@scr_region) + self.xview_moveto(0.25) + self.yview_moveto(0.25) + + @col = 'red' + @font = 'Helvetica -12' + + @memo_id_num = -1 + @memo_id_head = 'memo_' + @memo_id_tag = nil + @overlap_d = 2 + + @state = TkVariable.new + @border = 2 + @selectborder = 1 + @delta = @border + @selectborder + @entry = TkEntry.new(self, :relief=>:ridge, :borderwidth=>@border, + :selectborderwidth=>@selectborder, + :highlightthickness=>0) + @entry.bind('Return'){@state.value = 0} + + @mode = old_mode = 0 + + _state0() + + bind('2', :x, :y){|x,y| scan_mark(x,y)} + bind('B2-Motion', :x, :y){|x,y| scan_dragto(x,y)} + + bind('3'){ + next if (old_mode = @mode) == 0 + @items.each{|item| item.delete } + _state0() + } + + bind('Double-3', :widget, :x, :y){|w, x, y| + next if old_mode != 0 + x = w.canvasx(x) + y = w.canvasy(y) + tag = nil + w.find_overlapping(x - @overlap_d, y - @overlap_d, + x + @overlap_d, y + @overlap_d).find{|item| + ! (item.tags.find{|name| + if name =~ /^(#{@memo_id_head}\d+)$/ + tag = $1 + end + }.empty?) + } + w.delete(tag) if tag + } + end + + #----------------------------------- + private + def _state0() # init + @mode = 0 + + @memo_id_num += 1 + @memo_id_tag = @memo_id_head + @memo_id_num.to_s + + @target = nil + @items = [] + @mark = [0, 0] + bind_remove('Motion') + bind('ButtonRelease-1', proc{|x,y| _state1(x,y)}, '%x', '%y') + end + + def _state1(x,y) # set center + @mode = 1 + + @target = TkcOval.new(self, + [canvasx(x), canvasy(y)], [canvasx(x), canvasy(y)], + :outline=>@col, :width=>3, :tags=>[@memo_id_tag]) + @items << @target + @mark = [x,y] + + bind('Motion', proc{|x,y| _state2(x,y)}, '%x', '%y') + bind('ButtonRelease-1', proc{|x,y| _state3(x,y)}, '%x', '%y') + end + + def _state2(x,y) # create circle + @mode = 2 + + r = Integer(Math.sqrt((x-@mark[0])**2 + (y-@mark[1])**2)) + @target.coords([canvasx(@mark[0] - r), canvasy(@mark[1] - r)], + [canvasx(@mark[0] + r), canvasy(@mark[1] + r)]) + end + + def _state3(x,y) # set line start + @mode = 3 + + @target = TkcLine.new(self, + [canvasx(x), canvasy(y)], [canvasx(x), canvasy(y)], + :arrow=>:first, :arrowshape=>[10, 14, 5], + :fill=>@col, :tags=>[@memo_id_tag]) + @items << @target + @mark = [x, y] + + bind('Motion', proc{|x,y| _state4(x,y)}, '%x', '%y') + bind('ButtonRelease-1', proc{|x,y| _state5(x,y)}, '%x', '%y') + end + + def _state4(x,y) # create line + @mode = 4 + + @target.coords([canvasx(@mark[0]), canvasy(@mark[1])], + [canvasx(x), canvasy(y)]) + end + + def _state5(x,y) # set text + @mode = 5 + + if x - @mark[0] >= 0 + justify = 'left' + dx = - @delta + + if y - @mark[1] >= 0 + anchor = 'nw' + dy = - @delta + else + anchor = 'sw' + dy = @delta + end + else + justify = 'right' + dx = @delta + + if y - @mark[1] >= 0 + anchor = 'ne' + dy = - @delta + else + anchor = 'se' + dy = @delta + end + end + + bind_remove('Motion') + + @entry.value = '' + @entry.configure(:justify=>justify, :font=>@font, :foreground=>@col) + + ewin = TkcWindow.new(self, [canvasx(x)+dx, canvasy(y)+dy], + :window=>@entry, :state=>:normal, :anchor=>anchor, + :tags=>[@memo_id_tag]) + + @entry.focus + @entry.grab + @state.wait + @entry.grab_release + + ewin.delete + + @target = TkcText.new(self, [canvasx(x), canvasy(y)], + :anchor=>anchor, :justify=>justify, + :fill=>@col, :font=>@font, :text=>@entry.value, + :tags=>[@memo_id_tag]) + + _state0() + end + + #----------------------------------- + public + def load_photo(filename) + @photo.configure(:file=>filename) + end + + def modified? + ! ((find_withtag('all') - [@img]).empty?) + end + + def fig_erase + (find_withtag('all') - [@img]).each{|item| item.delete} + end + + def reset_region + width = @photo.width + height = @photo.height + + if width > @scr_region[2] + @scr_region[0] = -width + @scr_region[2] = width + end + + if height > @scr_region[3] + @scr_region[1] = -height + @scr_region[3] = height + end + + self.scrollregion(@scr_region) + self.xview_moveto(0.25) + self.yview_moveto(0.25) + end + + def get_texts + ret = [] + find_withtag('all').each{|item| + if item.kind_of?(TkcText) + ret << item[:text] + end + } + ret + end +end +############################ + +# define methods for menu +def open_file(canvas, fname) + if canvas.modified? + ret = Tk.messageBox(:icon=>'warning',:type=>'okcancel',:default=>'cancel', + :message=>'Canvas may be modified. Realy erase? ') + return if ret == 'cancel' + end + + filetypes = [ + ['GIF Files', '.gif'], + ['GIF Files', [], 'GIFF'], + ['PPM Files', '.ppm'], + ['PGM Files', '.pgm'] + ] + + begin + if Tk::Img::package_version != '' + filetypes << ['JPEG Files', ['.jpg', '.jpeg']] + filetypes << ['PNG Files', '.png'] + filetypes << ['PostScript Files', '.ps'] + filetypes << ['PDF Files', '.pdf'] + filetypes << ['Windows Bitmap Files', '.bmp'] + filetypes << ['Windows Icon Files', '.ico'] + filetypes << ['PCX Files', '.pcx'] + filetypes << ['Pixmap Files', '.pixmap'] + filetypes << ['SGI Files', '.sgi'] + filetypes << ['Sun Raster Files', '.sun'] + filetypes << ['TGA Files', '.tga'] + filetypes << ['TIFF Files', '.tiff'] + filetypes << ['XBM Files', '.xbm'] + filetypes << ['XPM Files', '.xpm'] + end + rescue + end + + filetypes << ['ALL Files', '*'] + + fpath = Tk.getOpenFile(:filetypes=>filetypes) + return if fpath.empty? + + begin + canvas.load_photo(fpath) + rescue => e + Tk.messageBox(:icon=>'error', :type=>'ok', + :message=>"Fail to read '#{fpath}'.\n#{e.message}") + end + + canvas.fig_erase + canvas.reset_region + + fname.value = fpath +end + +# -------------------------------- +def save_memo(canvas, fname) + initname = fname.value + if initname != '-' + initname = File.basename(initname, File.extname(initname)) + fpath = Tk.getSaveFile(:filetypes=>[ ['Text Files', '.txt'], + ['ALL Files', '*'] ], + :initialfile=>initname) + else + fpath = Tk.getSaveFile(:filetypes=>[ ['Text Files', '.txt'], + ['ALL Files', '*'] ]) + end + return if fpath.empty? + + begin + fid = open(fpath, 'w') + rescue => e + Tk.messageBox(:icon=>'error', :type=>'ok', + :message=>"Fail to open '#{fname.value}'.\n#{e.message}") + end + + begin + canvas.get_texts.each{|txt| + fid.print(txt, "\n") + } + ensure + fid.close + end +end + +# -------------------------------- +def ps_print(canvas, fname) + initname = fname.value + if initname != '-' + initname = File.basename(initname, File.extname(initname)) + fpath = Tk.getSaveFile(:filetypes=>[ ['Postscript Files', '.ps'], + ['ALL Files', '*'] ], + :initialfile=>initname) + else + fpath = Tk.getSaveFile(:filetypes=>[ ['Postscript Files', '.ps'], + ['ALL Files', '*'] ]) + end + return if fpath.empty? + + bbox = canvas.bbox('all') + canvas.postscript(:file=>fpath, :x=>bbox[0], :y=>bbox[1], + :width=>bbox[2] - bbox[0], :height=>bbox[3] - bbox[1]) +end + +# -------------------------------- +def quit(canvas) + ret = Tk.messageBox(:icon=>'warning', :type=>'okcancel', + :default=>'cancel', + :message=>'Realy quit? ') + exit if ret == 'ok' +end + +# -------------------------------- +# setup root +root = TkRoot.new(:title=>'Fig Memo') + +# create canvas frame +canvas = PhotoCanvas.new(root).pack(:fill=>:both, :expand=>true) +usage_frame = TkFrame.new(root, :relief=>:ridge, :borderwidth=>2) +hide_btn = TkButton.new(usage_frame, :text=>'hide usage', + :font=>{:size=>8}, :pady=>1, + :command=>proc{usage_frame.unpack}) +hide_btn.pack(:anchor=>'e', :padx=>5) +usage = TkLabel.new(usage_frame, :text=>PhotoCanvas::USAGE, + :font=>'Helvetica 8', :justify=>:left).pack + +show_usage = proc{ + usage_frame.pack(:before=>canvas, :fill=>:x, :expand=>true) +} + +fname = TkVariable.new('-') +f = TkFrame.new(root, :relief=>:sunken, :borderwidth=>1).pack(:fill=>:x) +label = TkLabel.new(f, :textvariable=>fname, + :font=>{:size=>-12, :weight=>:bold}, + :anchor=>'w').pack(:side=>:left, :fill=>:x, :padx=>10) + +# create menu +mspec = [ + [ ['File', 0], + ['Show Usage', proc{show_usage.call}, 5], + '---', + ['Open Image File', proc{open_file(canvas, fname)}, 0], + ['Save Memo Texts', proc{save_memo(canvas, fname)}, 0], + '---', + ['Save Postscript', proc{ps_print(canvas, fname)}, 5], + '---', + ['Quit', proc{quit(canvas)}, 0] + ] +] +root.add_menubar(mspec) + +# manage wm_protocol +root.protocol(:WM_DELETE_WINDOW){quit(canvas)} + +# show usage +show_usage.call + +# -------------------------------- +# start eventloop +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/earth.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/earth.gif new file mode 100644 index 0000000000000000000000000000000000000000..2c229eb1101cfd51df5cc91a4cef18e38b5fcef6 GIT binary patch literal 51712 zcmXt;XIPWT_xIBqE%Xpt=tvDc6g7nsngj$1O+yce8Wc4uy6J>!K*Wfs0YQVH8xR#0 z-6RyFq6TcJtQ(4ouImr$vb!$(s;S_u9r&q|JM)*92$W`pmAt4 z4x?8L4x=}mUOh25Pfr{k?@1v1pAiXoA`wrd>W!dhDiKem;;94zl}Mmc2~-+^O4kFC zN+VL~L@Gn?g{KkmGy;J}B+#e?8ch#G8kI<+5ovTHjiCoBjZUR8s5GYjX#$-{pi>ES znjVOBDv?ej(&>7j(rHvWol0j==}bM)=nNX2Nu#s$svjpZs6+-$uT%z&%Aivj3_Z{o zbQ*&}V=!q9mLBK~CY`~eGuV1%FxYw*B9lsG(x^;2mC4WpjY+3588jx7#$@T4&ScP; zOgfWAXR`IcV6qrYHiOC0E0f7#GR1mF8jDV2G4x7jG3YENoyF2CgT-R7*bEj&4@?%D z$>K0sVkS$X2Np}rVo6vmsb1MEDVs&3vFUU+gU)8^jlpIy*lfKr*=#18!(@x~z+!V) zY%z;1VX>upV6!D`wv^45>6OElaoBPWTglNs%V9C~KO8oT!(nm6dS!FOY>tG@k+L~5 zJ##n`4oAx2$T%Fi9>g4(m?IZ+6#4r?u2+dfE|DlCl3_haB?_rzSSnFU_5D)0M5@rMRH~3lhow@b9%RyC znN+D)xl}3F_sbMA*|1Eel*trw*|1!ul*=@FQ|MW)l*=`GRme38xmIt(dQfPF6f4KlhtOBg@bfN^H;=_#`f{98QSzurh5hcgXgCHQI z=xQpOL}{?_K2$+q6pjmE26oW^Gv_!l8lK&O`vL^ROdRMO$($N)=HJy|x(oi;J9|=?1v* zyq_H3$>STCxOZIshx5O@6MO6-r~Xj_^Wf%H5wZ6|x4qWvc#d+fAn}R~t?;>2Ta}u5 zuPh*1sl-xXPi+b=y;^P$sWHR`GjvK4_ynGo0HC&0=Sm^2{$}E&x zp2a{VPJ50)tDXxt8kIT)tegSTV4Tcw+0dV%AHTDrQYb%|uA4 zTO}l1k(+4Wo34$9u)}kYBI1kecNx3lPaTE7b33vp3+3ujbGD2KGTbL1-@`w^yZjdN zjBwP_`#ilX!A*329_cfH=id*y4{&MV91I+v44KKLoIXeo`DWnVA)ezQifZ??mzDl1 zf5h0n=8Dyp)rtZ6LT%%_C1Std_478_SLb62v#)%%0g2hr3@T2`kRsZ`g0&xYF{i**c!piRF2Npcm;MleptaLCL{di=Z-Z z#bZ#C_xW62rOUbQLw7yTRtMJkV4tNWg}fO$VoZ3=ymX&%t@O)M&;vq{A^sNUBg<*C zglHv(H3021@RB-PX5w6;w!lm4eZHzDa)53?z8bT!#} z^(8(o{6&6bC5yk;9r8Fx*4$VTbp~@~8S1nD6KXR}Z4k9gOu7CPGd_m$SKLL`0NSiE ze=tEe|IX;|ICs7`#5c|g)u=`Bv9hCX*~^LdCDNlo&*%mfKSk%fV1s*JEgcRsuCh&f zY-tb0EQY^LXgcbk4*SRu02?}thsRvcg;*|zHxAftV6^}Z4>?)N7jf{6P86MX#!g{Z zg9kw5n-!nUTIhW2W2K11F0eRE9dk+BJ8E~R%T!|_^bs^0ZAS;#&jN0TDS?eS97Ee# z%^SktTti8}#O7NT)IM7=Qj**lw7YWiH?8L_Bm0S1UO@I2Y!Jq=Hs#>lDqnfNiU)ky z4FhZL#$WPN9&wsV34MG%`FV?g`=jTAB#l?=JeARLjT9Ya?%SlpcA;SwxFb5yZ2R4X zj?YU7UmF}36Dm!}D44fY(Z=y;E5j{gT~=+&6x)yW6$T{v_$a|jT7I=TyWc`m+ ztFBaa;)#fBCm*;&fX=(`fPA~CzEkyiDD=bsI!0fF7YlfAcdin_xMi-jg|nqYF4X($ zC@EzLguTUq1u(hD6ndBWaR%S+1MYDgZ)Yi zuVJdOoU?FV`yn=bW~ymt!-DvwW+LQztz{+z1kbj(e|V4JS=A|KX+_yWeZmEOR?p4R6?jc1t|NXbmwW#0k zK&zH;o8N1%-92KhR9S(X(O?hu)ai6Zmvukxv3GlFLj`qoWCGy6@tn886XBm$DchnQ z7A3#_QU1)Le`Uruw$h-mdjocQNfbGo+Emi+V*h4Ev>MLNY^o?2?I+%Xm<}9 z-Tl|Yly_c^3=eg@oosA@Uy=lyF8k70{|Xg6CF|l*p{zAW-dEh{xU4e z*c5j0?|6D%+J$~fA=L#tpzC~JTium;~EKqc{E&lqZ$OMHd{48Z}g zV9tPKLsxNWN#lh2(cgs?h~uG`?b8Uxxu42cUqaGM%^@3f^Wv8lM544|rDbk9bMAr5 zF@uOXvsL6yub}|r5+=y{x-2$8I#*wum}B#BB7Zug)MzU%&*mz^-3gEiPZ_>w`ru%+ zgXqp5kJm=BX%_E2(@P)cvCd%c5&VPi&wboGG;05D88*mQ6{e>$j-W4qPoJ5zIg&(DyyjQZRu;e^^^UcNr@_yh@58q?mmahDI) z)b?~ucZaa)C?WoA!^J(VOR8tkGYaJF-@}#{h@$qZ5pViJf5lF-{+>Q|zTs?r;q&<0 z-!bn2;tL+2mxu8&&oYjEJ^K&Hx`#a$5Vy)jEW=VTS^r*azMnQ3JN?=)ih;JL5dYx-~bI!G5 zqxHqN`w@%wP7?(NKzpB3d%HQmSrW1LO}0efU)Kr5bC7*H(rK2#RfWNOo$>a!#-DV? znU^!>aYhrm;>4P&bF}Jtt&tL5vN?9o840420WDy_XC^4>vE8%ZD;|~@wxbQRz8MWD z44%pi6gbqyAXFC~#gH0Yml?hXm=wku&k!B6R0eV!v?#T#e8^?pyjO}j%e%{lyb$AM z#t?L}O~ZVSI*E65rtA`~TdjNIg8=~JoYzaAmc{ed)6~AV)Xw5F@hGkvBHhj>Gj)4m zdG5~mH(e^M9n&BL03{zSOr80rec@G1*64>0+HH~A7WFOAp%5v2?h4ELS z$tRBJy(Hr|&(-RbQlqg1iZ*=_i@~THQN5aMg+lbH@G%UL& zZx0^!TvV0(w*B$dyt6XH*Lb5*ozVi-;|zW5^vM4i+vWZYU8=5=1N>8UujR&+UF%V)R{Nazow~gFG|-=K-D8XafUThM%B<9>KG}W}2UKI@+1?>0F9yfy+AqgCBr_Xk7LT zoaC6=G~}<1%%|_H_2R|5eA~6Y+{JBk>)Dp)c7bor{#}#yW9RXD7mr=#vUY+4j0aWn`)0;Zu4o@3;lW0-trRnIHC()Jyx zxmzFqC-Nr-Y`+XHQNXLw$ZGBR;iJe-n!zBtZ(td9Ucu|b1zjW}{|sHlejnPwtV~11 z1|Jl8{dmHZrqcfrI5C@hEOkAN=fsI#`x3GxwxwCAJWQAM)(YN!h-&}pLYT#!vt4m% zsDQ$yPN1Ixc>%C_U^qQtxBQ%Ln=(`IK=bp<;=DAgZ2~+jl?4e$LnY@8YgwrG43lqw z^F7$}iR1OXM-clNurk(wO&`2jdtNR>^_L@0QL%V*mGEp8rMc&}-F1V)vi4eh zDu8Z#?m=o{V-S4(ci!fwMSYJDJBdj(`;R1vul#d;clhcIvKNBc0=IM6X#_k_aWk-Ne4Gx_t7*2nkKXF^)3J%+zB3>sL_2_~dLTebV26SJc9 zZ4v~71I<*z%W1IpeXwRU@(4#ChVWcFm#xU7GGwj_=~|mmcLO!G4_VCF!72tO zjIxYpw+Kk<=612I@IHTkZ~Eg1j+Y1R4L(x@w9$gs*ct{$4Rp$ zMa3g%{nSjwPAxQ#1EsK5?-k*oX?SRc1XfIgZdBa*Ywe zpV5RX$57iP*UCsXudgW!(tCCvyOO|0R z0L0G{)IkOOs01Zfz%e%-eNFsDPD4sLH>I)!IcMU$4qj+;;r@{gFDgR*_xNy4=ItMH zdSp% z`wn>cd96WE(&&*3c@}>ki1!d0uf5Cv6;}lDP~e6Fk;6mCTQYsbzMNK_)|t>{@)^w#BjH>;ssBJ%vQ!FdI;Wf?xCLv_f; z4=U#;qL44eNIng5R6&ZqF#a^DXWzF{o3u;Yxy+8K_ge>M1p_|3Qk#3Avy;4IkDR54 zzGAO(PY(G8^g5Qe;V6W0ZtqZ@-Y0V2eKh)6jVt3xN z-BX1u)az9(FK_Dosk=$E8PG>?ZwEY2zkRYtA6>3EM?>{Uz~WO4^qQ_P2#m*qZNx(o z8PHN9%>EFpR0rqLkUuTMt64eYEaPVi=v^Xcpt0DclRCVS>bf5Y&;;`d&juQ*cc`!R3F6b+#J!%z4A0c7`vw|LIX9tmP{ z261;8dEwe`%9-6BC+}@!Kr3+ zALozNTKaE)jHo;lwP!+rd<4B)?3r|k_|B|ka?x*feei#{o7Y;`MCM(`XC+5WzK&|N zT_0F{zdfMv>>fANrI|nT?aH4b>L~A~T}fPs>RR->6j@Sle{1}uvs(AWqu;6R0@`7+ z@Th0%XY-1j@Lex1_Wts{{+L&~-6OUF(7A5oiI6R1&6*=`{`)U_|2q!@(ICV97~M?E zGl;#*={<{=%X$$V=M&DK@1Lge<=4-1{I1`{dPfgphP{7QIMC~(hY|R#KDVr72JS;e zMM@6#=KMXLiQl_%>siCdN$GFK8)I#LTW9NXSTnIS88|6rfa<0LUw%lqAN(@EVfUNb zH!DF+@3a8-x>W-I@cJ3g#TM@&@tMZ;gnd2c8xYS& z4Z|LD_~^vPTFT+z>7|88p;-adj3}5pYqxXgx#+|$#Wj)5pK08OjcA9(hrb-(-laQt zk+Bl(;Z7<9}ebcC6u$IA-##Z0s4k!3Dk7MV& z>az#sF-o8ExQ5hzrsJ~CjM368qPo0|dae1by~8JAO^j{hko_L{V6gjV;apAHWbJK- zT`!o6M|_ieW395b2fRLlH_N|dx-lvKL-QzhfIk>u^?Mh>OFler7@|ZJHHDp>aW)E1 z&tEWFKPY#WtWzk|b-}a59>e#y>Z1<}R#zm^X34TUu_r38m`>PKoU-|5y>Vjz!tC$& z_kMOiO&5kL+luCqPl2h|%PMmIJHe*5N^bl7c+BNqmuoeylgyg%_D75w0rC;4y;LwoGYbTu1T zmo^x1_T(P3W|yHT@w*A@F9 z9lNgZ?~rL4#URA)+vwr-s|s~P@Z`*bY%Ok%-x80=KYOfV+Vt&-{EjJ+OC5O6CCm>R(=|p#Q-G&pQd$zoD5<#UaWh{e&%Ce zo4=BMQHr+Q^KNZ7kr(}{1MVdjMRR{<6U}~M#fCn8LfA?@L)}MhsPH-_zB5BI&X<^( zw=sUMe*HVNYZu8ZU&lWrG_Hz3xR_`7iKsVo#_aA<+evmTUYh?)(+BRlHMN|B{h_$_WfT!^hD;bHhqiYl zX9m7YNf;|J+dNl8y1lwTA$@jFr<@4@-_2Fl{H-RBEdH^5pHqGw^=ntT%F_?UNzI~a z$UjFhz}uH%f}Vc6IHCGItf~3FhqFsffZaa zI3DklRnt;Bj7J>k;oR38jFY#Kgt-xn{EPMn-Kk8L>6+(ArzQGRk1MDnd&HGlaVfhT$@w*O|@Re)Al||cpRlpNuWahzTuoKV8X!o#- z!&k}eNX;k1Ef6q99vzb!4p6pYwsP~1Ac2`7IK9Aa+ATJu#kYs}+_oWCdun13l*UgE$zgo-;Xw zr?CGdrpHH5S0DKR#^FEJXS$xjrd^0zs|z^Hf{a?;T!Q*X@KEuS#N%7dB^y3Qn8OyM zE3RN){-^vNa(pCk{nm}P-h0zzsC2nk#jX>g)i$-cnNqPQ{9ag$h4Xgqk?qx;^{c?| z)Az4^6@q-J;~RH)-VXhaZagf(FohV{zBKos+!gMv_78l=5h6TsS%pz5ATxsiRQ}AQ zdA0VTCX-;qxwf!d0tm_=qrKr;| zOQyCsD-oRNRqg*t4#BN3U~?4@O%CdMT}25F)Fq&C%P@rJLP9Wt!FC_eaX0Nwi9#v4w|cC~a} z@9#MwS(|@#@VOOQ{W^yGPh0Nh&%ks57<*R&yLRtFiPPFH)0n0P^y=$t#ZS`D8l=ns z-+lNC?1$fXkIfi!u`?CADLI8n1(32_UCQixooVOtq+fq(V;*L~s(+p+h#f_Sv{yCF{89#ZM?)h1<>8VT$srYXW3Hfm3 zboLt0imiRuyh>Z&E6XELOog zZTZ_@jUfv0&#-s!)1I;W>!QTYHiE3UsKx5%ImGm^#ZZwOk0o?*%|E+UB5<6QK`EoN z+B6*BqUoG4tea$3j)=z1F2loRWFyhcn3rp+C}<_Wr5W?W)oTj1o%+q;n+zVMGi}_$ zgl^K;$?7lrEOUBhA^>-e9@DyQeviz*(Y|Hs@Y&(opKZ><;_JHE=vFGKFy3l-RKm)4 z+KzOxXufi@@5)%6solMRk!DloR5NUt<3op*((J|}g&{4%6#AJQ3{>bB_d+6%d{Q z!eegH#jrxQAcY3og{~=57}-Y{{z?xjX8O%aptx+v3(Q3)1&EXea?$eED~}`vg4alR z;WXY-FUWNnvrLZpEtUdo$+tEVq|p+}b82HX7>w8P{Fe+P=q)sA zqYJgmQwf%=F2KrYcCjo!e6)bR3<<{xC}?514pxeWrmjFzh>$o5-;E85VnZBqMZ#WT zj&gYWiu0^enn$=ZN{C+^g#K0t2`cBiD1pwLa3}Gt<}7d!9_*#z;Q`R~G`=rFxI+um zm$^eUybnmPZ}Wn5YPT1_(H9T-tmUth-&%+E>MRH@;$#VfN=Iov#C@OX&$I5Q(r-=-LKzk zw)s+Lmdm+zq(1ANfr%nwmvckTFtjlNLS~(eVxRPz;Z<*>gktzS3t<`)vU*S95yfaJ zr-=#>qM{jS76TH+ghVriNdy5!0ggimb2PA0IW!d^OwmA6=#bbY-ishnil>mt64BU@ z96GF00`qToafpCUgqzhSu5ES0JWqr`EwO7qfAZzcPBu?B4Mx*X}_h14Hr2*GF+p_eh zVJx4r$WGfEXO%qD@_n^7&CNfvkwy|hIsi5fTurGff{5l-SfD98K1BnL)t5rh zLj8YOQz!FSCCHA-)6WPFz{5znHkcUwTpd-zQ{I`b6%_S|AB^7TqRS_8GKr z3SZP|8t`S6fQnV0q^q2M=a_o4V1r#2)|Ddw2T6M=3zkFG%zqFhF~FfRK0#`@f00K3 zfFtpcWHdAn*Kn{Otk0aSOR!z^M>#Cf;mbmXMi7JFkh=6JK*4oc0VN}#DH=g2lSkn| z)0og?1iXk2--m{82h_0WHMWb5d>ekOIOy%7rkEPPkq+-oSmcB@XM<$mHaH}j~;uW=w zq3Y|Fc|S|GHCuRg$MBf7p&fP?K)F@L^iDGys~=d3H1BG@hyXUxq4~o?I<9rY3M2{r z+~x5j!V)i3177!sU;|FyFPggnjb*fKpj+=+5~VRk1sqWkAX-#JP4*O4v0%0=p#9Qq zHv-Rz2E=P1$vAzQz^f%SY&3i;v1aG8&=JiKVBSxoi|T`5WF|k_Q@EQ2FGknw9LlX^Xdt*Q$P@d z+%Qv6(;HdN3!8b~h_s18+bacQIC`z*%1h-rg{0y*=h`Dvb%JTdU(YO_pSVd)!qzuO zmT(L?)9IS?n>fPkB>@Eknb-0BIN&D?u%8SZCl_Xmp}87pzCw7ok&vo@&T64WVi9u~ zn!|!+$u+U8n*j(o3k?hQhKAFCISyPaI@bljk6`fQB=7?oQMICG<2_j73~=pk$csf) z9?{%=4RkB3CXZfIJ+nTT&O2rbj=)3o{@zrc>k2SY11*;bJ(odVcnC=f_RxS!m!ZBy zaD*px3kOVE0sF7A`2L=d2sS^=6GEJU_-h4a=$eE2i(g83H9)jQ0{OkNHJAWKToxpM z7H*UOiJ}rEyi5r{K!q1kUz7m&pNERgIlclA zm?_g$&%h7L;5iDe2@P1h&U`CXun`T{?Rt?)uh~wAA6SAVviZK+YrZUyhwj7bZ;u5r z!vY$;W6@{j!i36+4OG{QYNcs2kMr-SX6!n2s*$R$BJKp#8s-Ak|nJgmUe;@>IpPa|M9U!rjUZ_l9Jd6ecxCj(ZgN!f;|sgk|f ztAQV+G1;=3T}1dcPeC+Z#8%cEl-I;&GOLG0;mhC+;_dMmlazW$;*3}z7Hr)XlCFeM zaDp%@cS}_dY~l0?I`SVG;BvVl$PfL!sTO71SHPEaBLcDxqc{JAHk_%y{^@_)d(WDg z8Ccd@-LUDnY48dYjKg%Q8u8*!Qb_#LDdGy);!j8pN4S0k6tD!@p%c;3kQgy^hqR_* ziRY#R#SxxYacbUR1t~a)&+5{#G-l1~_L>7T`uU*kpZSw57ADa^=4hZfn;U?G>a%V; zx(0WvCYMvQGcl@|aOb6x(2xT!#0XoS2%_);{Yl^nZi*K>!-dL=(+QJ^BGLcuRv>EP zl^`FyAOfLJznTL&Q3Vs`^V{CntNTVvz8+N6?9>TT#N!7`t73nF@6kcCaVDRhhkv}* z4eVb3chJ$yjnE_lBx#uMjsP0tYhj&$i(*brIsRWx&wt2)%zW9ATRnMMeKN!inhB$vMfKI&cLgee%UUDRpM(>6a=zo_Jq@+jZy~c`!D-&kdIi93ybHig>C@| z*WU#fiEH+=;iwXr9h&dN;8A9v2bAzV66g*pe2YZ1lj&HBhM!JhI>E#hWAc9o_w3km z>)=1{wnTIfr4|J0^s;3?ubl}eqSsSe%wiB|Re0&o03?>kp`lto(Kc8uh z+V}fc;7rZK+$(VtMZP&#wx9Ib_kA&|9{xZ&d|>74+=;iwG&{Q}h1f}G_}n8ncK?U@ zD;FKs?mhj$^RBCC)A0T;gL6AK`Putk7aX}C{7AgnL5Ipw9;8O@`L-ghJRZ^0*PE(j< zp^PRa2dj&K5L04?Ic&o<0STIFFI1&lhAA&IvHP8KyAbT1{Ybgj(~t)}1c<1ai2I zaS{0~Pd;i2e-J&I9HG(fN(sBR)TM@dj7Z>4I~NC%qCRQB#L9o@mm2U_(at91KgH&` zr4Qp>48q<#HaEdC4V?rAg|p2yYd$|7-C#@5<)eZISElRS=sHrJKU2B$p6{)SK$z3V z#a$+Ae?@m~vlUd&8-~3=6h4Uh53B|>(}r#xn$?0i|6I-PPjs!10xf!V`u zi6{InzGO@o`@{S&;XR?SVa;EQXI@mPcDtmk`&H&t@7^Hb!Hhz*61Zp2$lITPsas5K z@E7O?G}zL|fsJk(>{QSIqppR?k=N3NM6(zjhi{g%+MhaZ-EMKIDGL4vrH}mIbzZzj zn}D2zA0JvU4ts|FT`1?(|jGpD+8PNBuT2EMlL6C$nE+2k-gn$_Lew0-f+rth2@pQ2BQy;Y-_ zt9UpeA*|z|w9qhbiR&T(*4h!AP@q+>n6Sy_CV|~;bQ2whbx;{5KXx|fc#a3WQ1TPF zh5PmrdDy26sPnQCwUJ8ps%Jn6A3&sU5?bZ^sgqlVoXl^ojD>3F8cT;LR_Y}%&OINQ zmAhcmE7{_zo|$AB?1&ge77!_zQvgW* z44{VK<80BnLa`N-8e$&LHC*nx?L5gf&g$mdj>=#GW{;o|j8Xfi3JS)d(;!7NXZ2hj z8}%{3q|kL9zFxV?_ub>vSgui-PvbURcrg`L#z?W7r%go6I~h&?F={iY02rTuCw!r@Z&iH_iZ$Af!3$prD<4j0F#^BYK4-_J2 z>Kv+(RTFuBu8Cds(EjystS^~Vw?V(Ee&xi47pQ91uQ(m8prwavRJCi9K$hp(7u+_0 z5dLBg_(Rfhs7yTwL%b6hHPqh84kfl)_MY(l=T75F%_UTc%&*+^NJg5p=b%}YVAH4R z=~tj%Fa9tTVsI+|?x)A7#INWsPf@6%8A<3Tp)2TMJLV_DQo9A4SGc%fGt-*AtT?BS z)VS4%!6|4}HQ3<~4lEGc8J1j~V8<~Z$GpNAl)6%|ZzSUeT@rY~Oo7c+?HC5#X(;z{ zb^Oe_?c1N<6rN3Sc(e4f_Ssxh=n~H4ITP$`m|ByA88v4T)R?i(!v_tYJA70K3@3Dm zT}l@v_Q7q*yHCbh#0A@zN|5!8MC6^+iOifKn+-CcYi57}M0?Bd*-u&9Xnfm8p89&& zXj9@3{e`e4K5lgxwWVso{;h1RcIjMQA}$r3pe)(BwScIDWp?GV;DZ|vKD{RnB=JjSyel*C59;x^{%=FN5>##{}7_4x?!+ez7&Yx<}93^~a1 zsDzKxNkA{3YNnMJOd+D_!1(pJ;n4l(2*u7^oAG}4gs$gDx>ucnZHlDp`2mSplY^H2 z#qmkok=c0=th#%x5;}J@KhE9h{N4sW#?b$Q>r*8>RM2H!wFC*j+ga<1YqR*QjJt4s z0NeM%#c`e;y{7Hcj(7Ci*t@K;2wkPgMG&J_-PsX!T_vXIxTe3%zh8Sk)vz$Q%k<(g zIAO)tskYVF1XRC8GbmOXJyB=l&UPE zR=N9KNoGkZODXV22GCOHYy;t%%DJ`(GL}HX(zrNR1CJ3ht^;U?8x4`G``DE4iqTM= z`q4I?mxdem9qN^&_Fm>uiNA)MakpKVGN~D4k&fs^fjAN;r9cN$LbWd;Dz{Sd4 z-4Q%o5y)qZ>_g=H(?(Ou;_RnIk&B!Cmf{^;`4O_NKtVwmBPUEl4)p8_$AjMW^8=)* zVLE;!XVkYkcWu<^>lV*v2x`$hA!;Q=2}$)-G;eXDan)uv`r#e^>h8d z@*Jh0wOTMwJ4(QVgA_bBIobb$J{KTPBOusEs2hZwAOH}}j&<2QtC%ji*O9jlWxe)6 zVe?EhYuJ{~ zvt&QStPQX$e1#JrF&4~_)-apaV89%qpM??WdCKgTk9LgNtLZmnK06eG%inCO1j&0@`3h$=qrZ*PB%oF z)^3B|D?lei(k>hqu=|P6VgdG{4JPQ}jS`92_{r zCjz9Q0e>7 z+*YZw|DiIIbM@!7Zbd*#Pp(xf*NQr5*~+zy+VsQn9B}{o@gT@%wJU>+TLEHMRC%Bhug)|37l|GKurEjI zUBNY-;TSVWCQC%?56S|_1793Jq>3LrruK;9;qf4s8J-_?)c1pWpA-~WMG1toL@t3? zReZu2CAdn3X{cP&jUg;&M0rv|1r&Z2*!mB07=2W7Au$3&SwrVX7EvNJbwM;ru-&M$ zmgi{=_>5X)-N)W&1}JqH%u!FlDSl6%iy9H0ahF}-Vls~xL^T1SHm~9-Q2&- zNajqH-Hfv-m1J4Lb!PEGs`piDxC?z%AnM zBJNBY*B1P*AsIkRMeJJJmUIRg^xt9|g!OEb;DvEQW|p9~twVxtISEF0W_0Voig>Sn zUU}ixvJK>a)5+ct@{@*5AG1}ac2-u1mspz0O8PmJ!S~0HTCtC#Rybyi4r@lL`3(7U zOtbGS&$Ei`;zJH}au*wEw~NgN#1Y0+(OxG3(%3ji_u8KvO%CLxuYH zO(ZuN$w&vVTb%^1i2{3TL4GvVo!!qJI~M$D`WL1`GbYy|lVr`PjF9j%vcLp{V?^sH zzJljC#&yr-xwFU~)Fh`QwX2e3P?eOfbdP)${cpsv)w}zFcWfreZKYj%jkdScl^6qX(xO07YH1bp0|aVS3^@{TM3Sn`fKqZODZt^5zvtV zv}CGqhND4aWbYyJEn}`JlWV%fG4lZ$z9ofpg9)B|-v+hE%mWV{Fhopo(dfg69GuSg z!;wAP)e(#Q;MP}?$|fJos6IE>u& z1^1;wE5owFB{j1`GqbdYO~fTbGqW9+%*qPODO(5B)Xa+3v8L&ZW@XDXwoExqBU|WoRpHiib5_2I;)E}L+qbD`8a{IJy5eI?t9wm_?R$N9lPcwG(HhV=W<>!(Kr^CH$o_d5L$Ri2kqgM~q( z$l(57$(jHCaC>8Kqwq5+xPa1~q4;&X{KH10l_8DH?VXo}nx_eIaYc6SJQy10#i>CA z45>W~RuM}h=8OA$IQ@24j?C!}p~ua{%zq~2H`MZ*l)jV5vdj;wPYCG~fRp!{@Q$Tn zJrTbAh(NJ0(`0;h7Bz>5Vp<}bIN^KbpY{x+4J2nUko)!{XuNgS-TQ29jLcl`QlB3C zT)7>L-~uSuECj7g9)BIdnie<(y$vFviaR)bT}D?KiYHRA(~xXUtHm4O{$mBT%rG;A z1OAR|i@LCwU%c2bQZR;ovg|;j9{ukM8Cw6K0mw-?B)U_$ZQuI`1x`zsnXQxfywnj4 zMq}{&BJ@k^UZ;tf$p80#SeGgySaOMkoJ8H<*D^Z0srV3jkKq9r|bG9Y<|L61T_WTlqdETZM zefvL$>&w1LaaX<2uQ!Y-FeHYPSS&kaRE^si0>x6NYp5^gyDnSJKrn_tm(dsR{8wnb z`WKo1yGO*PnWb~b%6BJ#h_wecY`=MfwRtGc8Sm9Tg{;M$;Ev?G(~2e@ZZ0&E%=yK_j`}1{j0V=eSM^C;^u3ot!>-d znA^0;F-`?pH#2RPFe?eH^&?%;jcZ$O%84!mCRchv$xS0Ap~}jAPgq0O;Nh|ap$6r{OhcNe6H zlh)QR+TN_Pm*D=6Y)aSM%i1;P46l{o!DtyLyJ&NB89CeW{Z*_x`teX=DLYJYqu|b)vzl6lG}k*ok@d7c6_azeYkAnMvHfI96#*DSbHhJ zb6w}Xq{ifUV?5qvrzT>5@tO1pV#CAK+1Z%E^i7;I_RY+7bx|!M{<2n(qpGl@=Yg%!<%F1E`?}p5D_W zw?53XxSRCgydTY!a$H}aLT)|$v(jM%r<(O#cj+!>oVr>pB!rkkpDY~YUwL!5w4pC# z!twRIbEPmwckD{eVc!s24FGmTohI^i$f5l(=HY|5&rLZc&yg=L%3=;rg~6%EN@3~& zLG79^8MYQjs@HZoAzZ4k>t;v$sf^^jt1ldXfqJb!NFZmnmVz7wDcH3#+GbgV<0}7wiSUn=VGS*6_rL>l7<{AFHZJFP-e5>k`|i^B{Z4;t zDuNQz$!o>yY|b&t9cdqNtIC`)(bLE_w7lGRNKV95aBA?@-uI$uur3qo1Y0p3Cnd7D;@C zD~3>h6F~J!euU$u9|QAzId~YYpfzaGtmg*M{i+V-0Hyrtw2k!?Gh1s4NqN7TE`Q;F zyz}lkJ2w~U&6igP!_7&%r|v8PCfK_9M}LrAetIDTr)!ZUoebqGt=OFAYunY?@3sO# zD!Qt4e94Xp&PPy+yIWa%`F-rNB$b;KNk40dZRWkD}dqAF*(MIyu}V$Ig`?2w~@t_ficgrgYXfo@Cy{o7!`PP@e~L zW}mS#)MD7W!=yw*NaYPX?oHO!!h!_7DEv-+b?c#b`DVs@!@$+#q{=vp9Q8&w7&?+v zJCdz*cnN_HGabAZuW14KK@aG4Kv%hf*J_(%h?w)C>veW_FDXce@W&ZJewdIIbm~m_ z@JD5gDVN?_qPn-y9}H&n9gS{1ejCtHOZ#8M{?lW|c;(h^Y(jdrm#BR5(yJrcy_8iY zy;eafDC9~6)^}Rx|NmOvA)(JFZAD1Y7(Totow8ek4YosIgScb(O$O1z+veF!*OQ_Y zokIAC_os7Y5-v}qT+yq&hupuMSgc5>)DXnf9M_wZqSgxgS|Enb?5}Kf{>TnYjweV zBI^Bqr-|Gf%%NzEH`GV(6szY%-`lle^1Wjsqi=T2TtYOrHF|fhiY3Y>tm3vh{54ux zY*Rxn5fXcvY67dqO@REv~r(d*(Zs_poramw1I5wt~y zUWQq)dqZxf^` zhWZ`uPpM&jI#g|rWJ#JyTYx}EGgJ}Ofgo1`NSAyll2s;~arl6~CVq8p_q)e8Snn7y z+sa&qT><`53jfZ_kgVF!Zj{A@hAONG^OR^CT+-APBdX&ohg7l|l$45SVjX&{I2n2m>lpEKvjZ~z(SX@Xy^x;AAw88* z8YK{r{#?5lTLa_s%vhR64p!lH5>mXtX+%KR$!$q;azAW8iEw($aZn=|?sD>DxOW)9 zY1lY|64&BKd}zj~4mh8>nU(c>>sf#Ec1(Ow^)~otdXwTvi-;8Qw_JDqbKjzpq>BAzn?f zINz9FZ&qxaoz{zLK%SbfIX>UX0Q5vPypIU8!|!FhLHNq7hQ^r50$Q?>p69W7bj-0# zP8u+U1Zj7(AV zUjuCF_c;6Ox0szA>L+u2c3bS*vCH`&sdB<;oa6R~*(#bt`UKk)BJ4>c#Bl>OE+f{; zu(|OzGfIhz{iMxCj+M@g)v>9$&aT=qTT(MEMQ-&a|L$`^o(1q$98buV;WFaMS1q=P zW7cQQ1cmNc5rjVn*rbh-u9}IKVR{s>S|K2Q-G!?GC}x<9Yqoxt#fTXxAe+-Uypj)`uWdLw}%T@ znCkzY=8NsB=LN9uY!|#qMlfUo+tqT%QMvsc9VvT?&(oD|Pfo1GvMP_2w0OKi}R1|5SC6Ae4lcLjY!qaCGnCU%_jq&mK zk9Ih_|0!_a6wT}qGCLPi?!2*!7Eq=n_(=ddmxFIS`#dOnaTY*rYq9DzV_WW9H8wlk zf&GDIXhvt}J!YjvIK7uUp%vt3pPrZKa4iN>({9{znDfxEEb&rh_cqmLR9j=;k8Rsd^n&C_^b;>g!+3i(b+-eK#%n zcyU$v%VK4*3gcAaGW_%lg8K#`!wf&Q3bVVF5P>flN=l4cmzZ?oR)~Z-ET@-nY{kvV zOUIac4g&}v55Xk0oN1CfnB|U#njO34j2e!^p&5i_I-{t^SUiD4o{>Iaq~qk&Tm#Nx zf0>aG^)h0XyVYgb^ADJ^af|D$F`IUw=O?pGah7LtfZO`X>`&_)KQuc%lpn511;?bbiP0n2ns&jx(41j~{$52aI1n+e?#N(cgqgC$qY)R1VFT=gvi%VO#JkDDYzWL>(GK5qa-02_6 z^|t_zbeT*1_Aagkrngf@w9hYYtJpp5P%RY{JI2K08qWV3<#^k;H-I{l&1(cH}HL9kA8=tBr*Zu5+F zh+y+~S=Qatm=FVM!`#%R72@2_r#tT@IzW55lAEh@_}LrlJ#W_6znCAg4k>#*|FKI$ z*~WDX@GD~XV9vBP58`^wHb+E%m2FwR{8!Bh=LOrcY#MshGupM?t_e+BmOCJb zzp*|0*iRbGDc1m~M@F%%ktxj(Uv52O=5K;AxOvoGz|+xaV@WtS{F*;ypmhiwr0Le( zvizU{{Br~80zf7ps9K}LAr3|(p`B;H)3EVpB(!QazC}YBy+csXoaNOnAwM$^OaSGX zg#6r0o-o+8aSAU9nAbT>P4mB12z#}$^yRny8W~ooV^(CIzG_osw>L+S!)=C%Ld9JTf)-2D}FH(d)PM~9=C5d()mVPvjNu$eAy{$J)@WQ z0hV2j^+t33Ef8D7W<51JoRM2!XX9-yVV%b8XK?RH27}E|y6yMB7yoeXWxL|D&3+AL z(gm0R+Tooih?c7{KA+kk`F0=vUylq@83Q+R7#q_UW+UkJ2!|#kl$=fth#?p1z<3#| z(tS4( zP8wGz?UUSZNykaqNx+L4+AlCgEQer(wU)z><=LCkaYF-mK4RdZgy!du8yM_<#>N$y zrw^FP8)4i@n0P@);iuE?ux-i^klqaKG?GsmNOnJhVp~i#-*;=}vQeEc)b3O19lr=|P8k%XVA2dXgXk<*AGeErM_} z97bgEa|q>vn0M87J~NABp(KGawy^LZtsJ(nPbiIJEO!BUfNgUJz(FtYq;%>l9VsZf z?xwn8oot!I7OSOl(Df1t_)P72>l_e9X|il^vdI^8|Rq2!9`WxFVDOXe{ca-#k`!z%bu?h zab4D4!*kiTb4L$yIJCUARKA>{Z?;znLQbVSL0yhz0tZjdGVd|Mh1wU&9n)vNJ%?Pd zlWeSrjXeNkx6ANFKVK|8==vG<{Bh{+n*Q9H^qxOtZbzYeR}4>QoW|_pIi7<$;!`vJ zF%Wn%6gnf>^j}-cw$-hFYppID&{{SwTLNyBY%6L_VszA;lfR6ehvv84V-Xz#~)*IV~JS^L-e zGL&!WaA4>dW{ehwaL8z;g*4lpG&%+}I(nzy^L0%cHq(xW^q$!_-EP3;!I|T-*nO}~ zq?~xj{B%*e>*93yCH(5YG;#SA>A}^1LGwKm1T*xF^46UI$sn`b(nVcns;{7X<`OQ8 zy{-Amu|6Gf0HCgrg&>6ST6Ux?cYks=0kWT?aNQPhEWX}#ZMT@CoT!3aGLiVPu64=K zytOJDkAS3www`M{#r~;lhiwD1PsXl84)0|K=6wBP)m>$OcFxZ4hDz6)yV;8$4FBzH zGZ0fnp`Ki^!(ixL22#0c|9*#0EyFFlS#|B?Ua!%UD_p{Qq(%jbXv-K~Yc_9O1`?;9 zt}@N@TXQDOap@NJsP8z|Q50N@#?z7qJ9ul~-XMr(OP&n>T>6@H_f-5(j}!MhzwEYY zJie=^(^(Z;@3lzhO;|>3Z06S%rzRB5c=k-0Gt~|Y){Y#QGnTI7=k!htQeKNbF#?OL zwTEVHndmM+R*)UMe;S?OSGIy=TTyQf{=tvIrm(0BByWBuSm$7M+@z^nLypQ7+^{X> z3ZiZ8+|mbZ^AnR)w$W(+idk8>2@!iKyPsxH8knHjFSR70{iN@WdmQ9x$v0hh0^@_s z`uAfMZbxHV7rGZqn-v77vZ&G3E6J6QR!Dr<6U)^0f6G?dWwGff>$Ev;5+Wa9tdUvq z#A{NX+S*}k5+zLyHatL%t&KzO&#GN^Zg|%9>E7X4N`u9-`DeFsn4`;5;BBK51(6Xe zJDP8(Rx}C9qjruIXm~RZN0UkOejCk*@pxR6ndsDKq^lhVcX_gGR)t}2P#1K+KH`0} z?EVl#G|Is;))+ownJf8Yk+kT<*a$+9o^W(?Mp059IS8`qCk2g2QC7)Kf@rItAYwlW zW)}?1DinQEGgDj<&2~GVL6PLxj)HRLlBLGZSvhFIo`oq5N#)FSVyg!>wY>9#PHUTt z6|;6m3R`FW)M3QV`YEv`p4TTqMxPBovep&@L9ZUI$WGn+IHM|cFa2ghxI~OubAp9v zSe?pl*Z#EQ$=Wp}mhRYIu3zvmNk-L_*j4D_cGEQ>z%Rwk3^Yd{;P&1yL^YmF1HG9)Kz`+I4*qstmuzx zuU9*Zc>ZeEYMl||ke1twwp%HZM_NVNyk(h1H3FRVt>^5h3j*L?KD2~^aDdu#LX}o4 z56NSEI!EgIB6kB3D#)}#@W4hpD8ss19T7zToYRrM!gj5;8O^=^UJ$*wG_nQjigxgh zo7I4Ju5`QhG*=~sDT`1^-K%NQP=+pr(qJ7XYZ>zx^=Ced>Za!LYDLC7!Z1D}{Rn=FFa z`x%pZuG)$u&T_UMltu?i1f=zC5sr_5n0dova|>)DY>tc6(t)WXS9f`aFOc+_tN7}e zuomK<1&iq8P{ov9KzxzZo1eCsmVHmQDP401lJX$-`mfnj|jx3_Fhuj%w>(#G25teYWjW=)hx3XZB@cXeXRapgQ@WP(hn~aD~t)^VzuiRIR7JfA^unJ4#7sp{}uy9eqJWjxIv2y+H%{xs|p-VTCO7szqZ=s60 zTnbTa>a{8>KjMsQ27@7mRkI#tH|f9N$y+1+xmI=e9$XXEgp65u(VJ~iNS9a!970{W zI}S(@e|^&z;B&LB{|aOMf4S;51NYUw(pB#; z4TkCrruF^~O^xdp34V>Z#oi#h5j0vrb{PR7ndbFO=&O&EqVB$fx0?n6DFtXZ27>TV zh7GMrB5yV*o!*LL!d|6QONaU@zO$US_--W__m5kLax)lqMqKnzdJpa}ihjY+c^96B8L|5EIxqtmkP-}lQ(S5>@z+v z8o!p?Yt?N+$BE=Phhc?Ho9yiIfh@8zQR#GFt3KAqsb8<}ce7vy)JeUxlkD4eQbh>QvuMXv~gg_+i`=^8THL^3>T9_;UIwUc1G~ z&WI&>2b_}hx#|sAi&Si%rHfrA#x;EQt6;A2TM4;>p06_zzIUuJZ1gD@BOd{n7R6vc4b4O%}Gg^O3NV+IE*g2sW;2-MUwMMBG^r<@NMY|Djh^DD@$FlzW|fD z)gQR9)~tlq7W#R<|hvguZ?D?1D<+ z`!T{^E*M-k!*LFfI6J(Ft(ZG1sLd&Q38{OY)Ws0l&a)6wsoTrh)y zU0du&b}sih*F{c*GOUAafBm0dGTLpTnfcNLx|5QK8yotPZ<|!CAd46q)XPsd9p`_l zqi!3T`|r3pdb88V%4N27}u6tv`d5_A+0Jy}TO zmq-6v?~?`-O$N)Dh2N`1pZw~*z(8t*R>d0pMEfvX&4e5n9dB5x2Jo&)`G1b14F>Eo z9TxKnE9a3MC$V)lafK#AhZfA0&Ck(;D@7Qt8S!QFwkRRP`Rn$zFX=DZ?Pj~UE>VPs zeFkhHx*gl@_(aAZN?YHr8C?ww8*PH*({{QP_b}34zL!wfC7IDeaY0EI5?}sOHlC9X zCL1ss*;@ZPOpXETo0Kf%L38xz3KJf0yJ$av+aSdR>yUSUM!lR(`6Q)!R?K@RAsLgX zAGJH*nJFJc)W>F4y3})(9+e1TvNmHc)@kwqY>sFN?UNUt5522H%S~X46kUHl=5Z7h zWk`NP6IrkTD z{jWT9XAlh?xdVkqJE2npRU^#AJj*&KBY%^U*Tst`Hq1 zMIHCY1dV|yW^fZb>F5&Z(J^$cwg}c@-@(*h%%COrTAvv*A0nKRV8jsaAV4^1z`G@Z z(r;@vnXox#Fk1(1HWME3C{F>>W(fDsIZ5j_aj726)`H8WXs#X+H@<+(*7~Xg^B!&6 zndF`}BPbW2qnC3MRx}6X)gf|_8EFEwIK3`7)9r!%#vSPZVySE4JzF{(JpYYx347$< z$Gn9Xu%i#^jV{iCM&FT?_1Rj?N&n#O4SPlus7MKVp3D;ZcA8^G2Ah#03HhCb+B#Wy z)8F%`ggh)E{SHt*v8m=Me9+dtCqE%WfZ8+&TOq-<8OU7#uE-=>t_L^i!8j?J&+|Qc z0n9N~_jaKD4#-z5-&b8PUoi#7$`-y1#&P}B9>1KsfUe(ARG#^_GGVm>Sd*;Hz#X1gvV284LMkO+ zlM#g0M=o95WFeOonF$&R?Dx+(j+<@R63HIgoZt;bKBm3iuss?%gbEQk zKDH2N%{mK=_%WN@ZOeL@L;g!oF>)w>vB}%m*li}(2_$B*G&eyMr-TU4Ao2qpex(ef z7-ue%tT}JxwA2j#jrErTmQ@%GytSiFyX^XaH9y5Gv$lpU>0s+u2Rns4M4lkI&i%XZ0xq)$;1By;a#4x zm-1})EZ;a0;Xb#WPBpkSE(g}MXcy+vR}1WZiw@uyBR*RPR`}O#Ik`N@g@O38@%;l8 z&-#Qg>BNR{wGhM~Fc5RJgf5uU$P<2W!~FzfHo(h%wzGEIyTtf;O|5%y@HQWq=^dxX zBpASWDSFNn?v7}2k{$J);2A6TuQuc<&~gEFVv&60&#ZT9^K9P`e8FUFy``$QTLALW_to zp|XwelHLo&0Z13 zL;qTjS_xQ+8B=SImVEJUZ}mAIi1Gl~kG3Q~arSvEMDbxvrWuTrA$btxiy~{?HC&r*Cj1JJ@UJ#~&#>&1Hst`S9Z-6n1nnWY z7H{Da;1=Yp4UESvxYFIRro=7F)^2lMio%oLRCcY1nTZKzyuX!jDyBR46A;=+IAL(t zBC^btgnBKZ(?GZm%kvG``E|J^QtW;M;l08+T8is|iMhOkv(xweQi6$vd~&jo?owp< zI#fJhQMrl3Q1ASS2;bM0uYg(HoW({2Wn52emE{zh@znt7f(f%w@0G8|NT$$h*tp1j zRux$_0twQ}nHve@yV#=LWP1Wl-U|=;B+L3Uf|A=m2e%M?BBYpwq8YTegkV`>n53k; z0C~R-8z?QR(&Eo(2`eGo9y8dM2|_gMl?MD(9zI({_{~IEC)#@BiglqB-(j%+$&#Vh zVJd0c_FxaGt6Zs4w@VY@#)*woDWE7w*_sEh5SEQ#9vIrpLj(*GU8nWzSMyKNrvAeK_7)kCt%`P z2~NSghHTn%gMki^AUP7GhskBW1&m;Ujffh)wo$s*k|+1+`np)dddtO}vuz5Q!NYBV zh-XcX31+nF7N+nu`ssmP7qXA_)<;E&XrnX9`;yt0Xyr#^CC3CZ^x;#p+LgX9=Onir zLrZkM&81zRtBeB~mxehS%ao(%(2A5|U zW=o`X%kj_NZX#r`n*~^jfwjm5I^r9c`bA1^kfDE7pb=@fH4x!f9f6(8qZ^XkX;-)g=|0p6LckiJS4^?zs0AtDU z%3XB+`IHY2wjn$YsSyZg$yoW?6J~pSwjOJt{ysSa?uGFMFs4Y0y?%Y+} z0XSN)7`xY$Kl>ytTJI#3Am4Jly`)G#Ju<}Xw2SQ-fAiE=J@s!L%PoI~ zd__W7vLBZT6Mp`LPBUNVzJ2DfhkQjNzJE1rpTW;4kxd;Q!2%6TtloO7s>j-h!U) z0ov&qC3v}?;nitmwkdTAJg8rP?gY3|k9~g*69FJE{=NH;6t!R%eg1DL$1AR-3LiGk z3;4_Wdhp5)vB3Rpv>KgShkSErEPI*-{_#)B3G*ea)-)D4{`m?-c1WKpm8luHHw-nb0XRREQ2E6xl47q1*);j~O-!PDN+xF=LzOJ$_#} zE+xE^?feQo{iNOb(E?G|VpSqy`V?9u!&=`(SDDGj0I>ew577p^UUxKD>$K_3B?2x_ zK80OhC97-q`7VH(GgsfDp*^O8FN&eK{E)*aOq>AStH3I!$gg24(0uy74Rd*?gfOSZ zULTlzGRq_IM*3dQWbfq8VzVUY9zj?-6ZHMTYYZ{@*tqv)bM_)I%CV^YN#KcFgzzh0 zzr;18{8o27i>^Y)`5v27I)1M5v%1zZ`&!6{nWUoAsl0^s!^VTl@2otxb$asJ=LQdY zca&6Ota6Lh?&ZX(a30AnQI$4x4ruUE2_!uC_#%7j*_#f(-}3jTu|3!`M=p(ihy7BUxQz(LL-R$!U zPs8B;BZ{h<4zqMs$Bwvb<2=q3&BS}o#^Ofbx`Es#1A=h<%Nseq@V@Nyg_NHKq!l$wpNoyy)eV;u{%&1#FyQ(!Tu z&aHe=>sBNl$MP=l6=1MM8a-50EYGM}(r<-jZOK2lW!8?bHwO_|TMY7( zor)?2fvX3Ujk7vVo;q9ql#qZbqPrw?7~7jP$(G(O+T zRhtN2Qqkh3MVY%6c*~Us+f18s#+Ii%@y8M)sI}oAKvAiLC#gB}KE0Ki`Xp^twJB;p{dUTW8Y_tA(Uqf}KZ%J<_Vuv#mK3zqHT6 z%)<+&)5-Bo0&MaCZQpzV32!$%tZK6c*#@`xdxS>}Y2Yzkly}OT{fiIWZwQ#rMlI_C zupEhd`@gYXsmcS5XZmHQ%P}#L-7uJJY;;2^ZGVwQxrw@}#M(Z36GO$*bXBE%X`!Ry zENn*@<5E=3_|h{tf4pn=j|Zd;h-Rs32_oq`;Y(8sRxDDThV9q#UX8_aATt z{6j#D)(Wr<#r>V~V|m&5`%BKf>OJlzO9)PVy5x?c)m`AW*1BW3DJ`H|U-U3RfKJ#S z%V<3LzF)aX92H-V*tH(lYX1~B;CIfywm{!vJ1QA)9PPWTbP5RMn-f2De2i* zFqgfMbirC-GaZ0m)}wUp5TWx@0x?!X_kd-lYkBq2;S3 zW6|ZaMIK9rJuS4`9WU4M-^4c-)*t)$wI(-nJ3t-nC+5Hr4%cM^{4>qF3Qa+b+ZLJo zIaE3S3&&;pBf?88ui}{4*y7lSp);fY)DrK%oW|i8@9XKLNK?kK=dgNqtyXE*VG&U# zJ8>y`ltZT(y?}os?cd^q+dCrYHBi)sw|OCHbMhRg#1(HFx~lJ0DlG=$!GLi@ZL$dE z^tXO6Y#_Zx#BOE$5j)6hVk;nx4(AcuYnN+@p77H__gFb@g;`1eVkRb;1y%>(3U}@p zadS_Eb%_YIhL+LGIjUHA|&K1xF?{b-MOiU7nh~YJ0r)a<}PY%QuhE&dJ63{oRZYxiM)^2wLg< z$bTA7ctUK%LD>waX?;hFZ9jXEKbk}-B(>Y0#O#L3DynXx$E}yi{X$mH&YA zo^?_Aic73>Q!2OX5=~;hvvpHPq;+Jb0y+d^X7don7yy;o6H)Yaa^-xp6-CNLvA)K( zo(2Hf{juSq_P)V4?w6=#D%Pzp`oZwG_b6HKh1NCP8=-Aucn1|5^kE2zM>Z>5Ek4f> zOZfPLP8F3qj_>ZkIH@_R@L>)Ih3EIy@W8myknZ{<(fFQ_gtv;F`P$vc)&0sZ+fQ9 z&*~3k%x`0lhZXtWb&!V;fA!p@PxXp$8PZvDYYv)K6BpLXnw-uIe%egV*0(_2<{M1* zQdQX6v9kZ3+zr~H)okc5t^G50kabHy&YpIrSX69BVKY96CC74;NaiH!-O-7EL=&RBU$ zrd;>b$#zsRH&;%FP`qhmSgz7<8W}W%N`sL9A0*}?Y&Di{7U?~D><;s&1?{&b6y-X3 z#2;5NXvP3fsLr{H028&^pj;@`RF9pu?NWGZbeH9*a2$Fre@0<51(3uYZue*|mG+fY z`)w3VuL7Bl=dtHpr|U1*fmq?t-Ok@x!7zSCJ_L$`AQGAy{k#l)2w8;Dr~ffEnNtAjk-uuQNRFKS`c}; zYQbga2m>)h?C-{NvggTNb+C0V!m$Ivn37u(zgA)dH&zwdQ*NPN8J}Phn1{~tZ`W$jvBmV}=b7s7ey5u8ooaJjFR-qYn&TF@;2vyyr@aCf9fS><& zKoJy+s?g|yN>D_aYJow)oC1iGXBw^g&WnK-pxXUm-N<=-L_jZ(o5vPW* z9kSC1=aKXEh6h|E(D%nV!Xa6GDnq~Cpk4!GB!GIUR9)Ou0iN(o(UeQ{NX}@VwOl#R ztPnHQL1MH;z6gs&TH{dZ3~Z6O-va&g;KZ=Mb_o)`E^L_rxg^C78uBa1)G`=rGo71ZzsZuBoDU z6wGca7Y(WWOVrsW1(T=XnED@oIX{Piv^66l#pqO=dIO{uNEL3P83erq!2^_TL+DgJ zW;1-LRMu0fjaqqW@9tAKTy29_U)^gsQBfkpmH^mQdSw*g6s9X5XQQdy^AJw%xB=-h zO_{Bg$CQ8@WaViv+P4Rp2rKW^Tq@AYnK;CUOLAw)z`82L%}9i83A(tXVzW$T&)(-` z(wuWaUOI*J;`w?2bFA0Vcb6#T6UPG?NSl(MwMgd`2hV!lvpUT1Tje11;rMA`8~frS!GkiLmKrCKe< zxXBcYhRWAZsuHE@kdAV%COONj;At^%9=Ku#2d;t97T_s!3c<3_Wc5gqQQ;y&x|uG` z)+l^N5f=ZjizOUrKsx5SIfxM4A(UlmU&rVyk)A4plk1fWu8!PVS$Cs8BDsv==&~0( z%L@}@R)|W#R1MM=kV8`dRU~)MMcT@gVGw2(4`Y#+qoy$MBw}$Jf+kg2aDzFJ!b^vE z^X9=n+TE+pwe!Sa+&|@ok?r1EWP!(V*GWr$5*@46RGSp@q^LO>HlLw_^$I2=UtZ1m zcA(NyTs8r+gZM{(xju4lJ5bfq@%iZ^tOlqa<~C{;SN0xotvR6f2HsqywWI??hWsDb z3dtnKf>ca1sb>;pn7D&j3m~|tN4Ds6N|mN0=wr5`8Qo#iKgP`xBR$sX%+A;ge8$oi$zlF~nV&IBWle(lx zA=Fs##}a=rCRSYMY(jeIkUlzP0?+LQd zsA%9;s|Z+NZp#T-!{4#(AFuk6{65C_GQQHzZP~AB1J2$9W3$RH45`v_;BvEikcTbg zS7i2p93ArLVT1*K>~BUVNc)S#6sHxN^Q$DUxC0M-_7nih6&A z10xjz5LSA`ESbXB92nA}+O=@-SZchbuh~y2vg+SHz^c-tW3` zKkk0r=Hz$+wrCOzbmJpucc4P_$1L~>!Db{+_x~a8Xc)|9 zD1|V>%AzrOBB+0({A3HWRr0kmY_SC6$51Ytfy<@Mbjxd`3uUUWntlEmK`>)ZVv};o z%6Zn)GU7Dhu)POX7JGsxJIkgWZnmct;t$_EQ1-Rzu+C2sO7u9vb@0e&OTFr`Keoc= z8U1OM@*IsQk$vx1BiDn6E~B&IUkh@vTbnFk!b9sJ7cVx_Xz5N*E4HUawv_s_-x%HhXR^IHLIX4a#F$A>_s`J%OGhQb2VG$b97+vc)#J zH|vUh3vhP+yvh2+x&JHP__44aCzCn0R2>yfIzO%ZHhgvEOG2~M&+^9B4~2}{a~J7Q zkuOniW?)MhZ;H9teD;>rv7bG7iVz;s(bC~hsR}Kxf63I@L#X^wun>3q%vyB9HZ>JM z@YYT_XcF7(5ROvxuS-;W*P^5O=;k_5elSFw_fNiryXrx5NlB^F$*rHV$QAVd-Z#WPWev*Ncy?R*{ zt|ZLGH-dA{_ijXU%b)ctZhdgD_ajR&8}y#}CiR9P@M2ZPcB$oT|Fc=E@{ppudgP%D zWt0fT;l8zmIeZ|6^=(9?2xGy~i}b3Qv`Ms31}2w)Arh(OXIFjRYBeo$;-eEvR1%po zhKE@-RGutWMMxAeJnv`=yxoAZodu5W^WdB_(>Cao8}kJi>PH6uv-DF z1y8H;p`Oy0BzOJs(1{boHq#Y?3)OJfQkmVp}F9WO9g^UYK3NIW`$;k zWrb#?WeuB(ONM4+ z=Q;QLzF&8aKvYS`ar3A33Pp*fLvE_fWKdLD(!(?bp9Dx8m6M#$7r2fbcAR4+3`CPA zREUTI+oF?W?IS2!Jp`WlMZu8 z6G9DX*G$c)NDnMMVOW<1kor`pD=y*P#QTN;Qg~0u{;HvOM^A^O4ow!cdenQZX@1JT z**{!Kwwfo>k9Wl$>Dl&Z?Bs=A-hVBG{JZt>^)uW4dSCec{mtc%-;vp(%Vke~h;9?e zR_w&O=^6H|I!=1}ew+2~t2~nj!WY<(y*fg(rpJ$OUjCvVMaf+>8GPwvB!=Wwt!WxM zYky^(zYK)6lU5K}5%Ppq&}h0MyJ=`%5!x4H8}Uq{MBDj)NrEtrKeMI=c;nSdhXtrJjqoIfdsx*@Og0Kq7&j*q;SoLIeNO=rf^ zplcK>SX6CTdLKV0BlmWM+dq87f(_!~gU?d?v7RI2pI0yVr~TksYEfqn+`hkEDWo^y zVbRp%lhtv&*SeC*zyhNgid&;s;yA}LE?9&f&J*uM747&GMRL#*mjoE{`-%x^YF3%w zK+X9I-`~7m+;%N6#g|x~*zv=FzBqk;>B6s??WY!AyPx^T)}B9WEyHG_m+$wvolRci zb31xD-YxZ~#NIxis3e5EF8pl4s#NQ`kFqvtKIiHDO!(xwv1a&20X-KOM^sCjt}pqtk@Tld01pztA4 z=sXd)EX2n_5VL!}bcz<)Go6GX@wda-EtLYMOK=wdrvGU3e!0}qQgL&c%XCX)x0B1l z-8aGP(xIGG82#`1l0$DumU+n_wuaYFL7EXZ&rHNE!>TK$kCnT+TkL}d%95T7EW*?R z`VBGEQ3^^l-MVFJ7Qnt_0<7OoFdjnybUjneolK`SbD~17p!a8Z2pO+?5DvKz5I406 z=9RB@EL?veXaY8``^a4CspN;J694SCpX!VZ>8YyNBo@*xG9!E@J7FY^1R*pkEQgr* zjP7FFQklqYh*_2}FhM#_jC2g|LMM1Ylbhrbl^+V1Q>G& zoRd(Cr97e4DY2RfH{-G((CZ^6#DYWtW~)hMBPGHtQ{_-0=~iFc5i6t|4sgCl2h2~X z(X~olP|3;BYxCIjn;aL`h0+m;6aOIRwEV->wn3+4L&@98hz#&#eoVLaO^Ke-b zs2;7O^r2ITN@ANt#U9gBKFDu`-SQ#iN!Hswlb3|#)1wOYD%(a$xQD!|M3UVMD|8>3 zqql-zuuf^4H4VWe8L3fDjyB+Eizh-@?iqtIO6dT8rc-U%%g1xICA{RpQ+rOI+Sq$! z)2Rf6zl`p9;A2;p&_h-DfV}ZFR?a0aL-Phujcf^?8QX zI#Rv@nvtuUhat$6{?t(_sOp&uXqc=W=f93(I1(&~;N9 zZabdh@TL7m_E*r%$WUQ4Jx*RjOsMmO>36ZN*gK4=q=Lg-t{m!HVG9T-T(2n(KCiU=_bJVGiKfrTShe31-^pIrZC?T|F04102{h4s$q8U$NlrM_$Op(8*nesf^d81Bz2Gs0A_+Z$w}r z?a`s!H{1g&pkUTtOz8Czk!z*EV(VKbwQ(3h?bDXXIvwq95~G6q?q5zl&Bo@_)kK+u z6~=(s-jTp|yw|A{#E!Pc@ge`UiqhD)bipPuj3_s%!QwX1&)!El%|`}Q6d>D<)!mGq zNWtxVu+OsU*UbUxbBiiEPp8@B?&f`DY%)b2JcdoYRmqO-3jM{_<<{PHH#2gZEmK>r zR3{^ty9E~iK8MYJqJ^=O<1zC)&GbIL@Iu-(^?WISiy7`?^TCyn%OX8p@O8^f(|%V* zA9*l;2(wTeXvp}Nuv&5ez0d@Wnlzxan+CkZ2>)F@d-}df4>8UkNCbYSK_%GJ|EJ7W&`|AG2&akkc!$NFat2*f(I6#}rq0G_7Zh=^{Bv zVWo%5^r(tIk$z|pBsy#+T}BUai@Wx32EhVn+Xt*q8PyBn8tbi+I;y7vmNO8;(=SbxFPR*G_rgP$7=te2 zwaFF!E5ys324fkEaSK7!0P3xSI?eQX_b5FZjwTs}!Qf9J5!Mm0)+U3W1ZL}@u*wF& zbUJlJVc#pDX$+*FkhR(U3mB`fc`7-D{h?!mEDis%R!;L!u(T^sZ~yq|33G4~dN{#O zJyV5n?shPaYCcA8n~t=|#p3cL#Y1JN*CFW)jO+~agP_=L2%TNun!afp4_Eet5iA(qH6=a{VuoCW1iC3#Ze zJ{0c81mSJ{Tq4XPS!qpCkVQ&6^zep%3=T{tGzB1`fq$75#qgrYLU<#hNX(4ui&i74 z{97652!cFhHdV%rR2>sB(ps(LfLZJDA}<8sXNr z{h=b2V=pWi4fB{(5Go*)LW3nw@FeVBkiQaqdi6^scy&JAHmpiKUdFKh5ccK6?+@Vid-U|pLmTXp0cSpx zNY{|{ig`r9CR#z19%xvlH%ROQ53MglM?eN2JXs|Q3yzB&u#AKo5f>j-wznW&4qy`W z+fwx9b!vb$f~#G=g|spFNE~bs4a?)ZC)3=cp-yP1uU;h_g%NUK;AQkC_7R5p*jc?@ z1z^unvh)U81wc0f3_jq%=wtR8tU48*$-)I zLdhOb+gXTZH-wNu)4+HKr-%>qPwW5Tkxe=Nt7UA8X72n)@B z;xFxU{6g@4g!N^>e8c+v+8Lg`N*3MV0t#bafQ{7X{KbHR0uaNNqZ+0fpRD>he&DB^ z93f>Mvy%TT9DpBJ10qwuNVK>;S~Cpaba@SQf5n1L+E{7Jaf_myEHUgK^|Hz3e;`&` zC9iaEg*tT_{CoTP8>T_>S}RZ)fqA9E4}-|(g6bk!_G_PT(qX*Pc3!(FrUZ-O@)e!Qu9M=xPjLXql2w{eAnLW=#4bmD7w9|UD z8~{y~86BeZLWhhrSVfLTT%!ca;sI=6_za z3HZ60d?%5slL+c6f+daghxVvKyM=x_ffX8X)I(kKU(uQ2_G1D@rviivvonmT-EbX2bC+U1tBdNKnbYXAq4f}008Oag8>3QG_h;;{~` z;ae60RPhaev=F>^0*QT8k9FH+>(1Re%(&e}SnRQzf74Ma3Xhy?5_h~Z@RQOjhxFs}hG`Jf2%vp)ep3T&GmQJ;lDy!s)3KmPD$*NwNKl z9yh6Aj|tdZaCpe4^ZaqlYOA;4hkRVk1RW2uJGe^63WWt1pnTyIzR2lD#VB9spDhfP zIVVNG4Q&Ot%Gw~A&~KzPP|e<9hI$fVjZ&EJ*t{WM7*{;yuIpon!fkqstlAAWXhG`8 z5yP`pza|ZcxR6CsX5-6~jSKOSlShm@nH&A$BDrxQsje;l{3NQs$ryu5Qg zx3`b3hBC$sc6caVmSIWhe;ueQJR%J21S}I(K{9CU#s-Hnl|Q;9I8nvAw0iG7Rfwi5 zU_6`+U&ogAah#NE=7N=U9@J}i2U{daxx%MN!)aWDGRmNMr$=i5Po_0yl7B5k0bUlI zKj6s=PreM^bvADDKB`DzIo7YLDCJ(Y;^C@?TGDzeh zyU@?e-^j=hchmm^o@HD);gOFFL&f3q^Pya0xcxH&o2aysfk<6Gp$Fo?JiGUraL$JC zlF1YJ^7_3rLZ5Ec=2lg3o@#R)Onp}sHY^Mqe*E&;ZuJ>qh`QgGdFzZ*KgUNIGz{f* zVjN5YFK)O)a)M*0yuwZSSlUNukYl^$Sdewn%V*KgJ67q`vc!X zz4AWptAY6phjZXi{Fs6GQ*S?+@AaN{U>htTUl#uoU) zsqaJhB8#DsD&Cu*n`&e$;6BqAFslrL@4_Ee1xspNP8;ZxbA7xD;b1zz7y#%DsB3rM ze4@}*t#HYMa{c4KlmZ|M!_vdxC3aYHxF4kEx~?AzG4^MS`3H@6`*Oe|Lr7SUDx|PK zq#bs4JB*h-{Zii_lJP!sputCP?K`e?f#5jyP&c@WI}i@K;xMy%Cg%pHS5E%I$2CCE zvvLea!P11&dJ`?%D{lV zxwU(BF8}5C>a6&#)b95lw_wMUPI3((-}XZD5ZWp}Ie#X;V?T;iWa22vY^9W##rx~3yKqTAAeTJ&tWpwCN}rE?7;1*Eq`=x9!dE#M?F8eV@X3`+7+khB^9;- zF@@7ckOiQE6H;BpoeFtbN~#F!)ItaO`wQO zl$k(FV?G$FW0plTi{~EPWB%umqKEwLAldeNF(Fl=EatuCs{Hd`zqHN1<<`a6*yFab zAv2|*xn^4u+f~ch)V`j+PAzD&7E*1>$f4Q!%?Fo4o0O#?3s;?RD4bEa+HXFUQ>+a; zZJs*1v%bp3e#2JQpzZE4;FVp*Dd2|f=Aoy^{b9AGnP>8hKA$~vPE|!7S<_JJToYAh zfLSKA`3%*jgylFLPHkX0S2;B3UZ`jd&G$w&bfKkFNXm;~)_fI$8-K1MU4pA@>3sL5rJ_ zT(RJ2rx&3{Ro)9xLw=UP7TgaiAL;=Q3j2&rU@rKKF7saa{rTs6A%CMmw+)UX=QFXq zJc!}H_w$FZVE(uH!&3$Q{8q&;|GO<_!oFS5^DV`T5p|n;%$W^aI?c$2oH831@}?wZ z)gemUbn`)J!~LN{A(u>jmBKgj7D8}irx~@Ty$jh`Fau&|c0YA1u}$IG4A$q4mS$3< zahIKsY-p&Ns@kM`>%!RHv$(iQ9CCKbZk;Wws3x_Ubi95`Lzd`pdRb|4T}mIQduk-ze`Qd6>aaF&HB0?*WM3K~B9k-h|bwr#Q4IT7e zkZZ%y73}!!!uzYA#^*2l@#=TK1HbOH$d`n{&ad}gq`v&}ta*=faWZIA_N`k~RJ*J5 z+IOhz2;0>W zHV;7rYHmCzbvoKLf|ESkc03kEzfGpHy)wKwxY>*ms+*}Ab1b`u2r^P9 zU~V%4EA0Ius+vt<&B{@HJ&Z9c!6#1}XkcDG9pou_qgC`;9o*3rk6PQ)hvGBs5{zuh z^?Ibg1ZA-Xzn&g?MM%!o!E9PhK56YoED|8f*LkM3umXp|hHsw9R{X*bw#)Km7>9i| zB?WKFpI^m8Z-3R|fC)!U-`qxEgDq&C;E8`utmNW%XavO31Hx7}E$k;wX!)8yn6K!{ z;ltKXNl<|r7EY?wFkb1xu`zs2g08>et>oyOJ+ZVTg^^C`;vfUEn_72|3*EidQK4#9 z$p*RO`iIj;IU)g8K!RfbqNgY8(<--Qv{0Hm5pEeI(1aUKsied1Y2&fWo`o}B8WBPH zFk`YloDe?~P8;Hvh`JTH)O@8CzDs4LVPf;8O7Vi+yz9w)y@<(l=4&TbX4J` zL3yf`ZjIRrvit7ffi-;_!%%!Vv|*#eNB!-BR|SWQ?mlk(nQ;U7k>WDI-~w0M>N8(lXX?1Z4o`;49%}dtIW+8+STy@%o`%M?HbHs zW_ZYR?Z+Z7bUFuYd*bc{4(xvR!U299wcWrfk8px9{^X;A^1oW78(EgScn0*P^tK+b zHY`sO>60tPt}eVoX_3Mm_Ysk6_$|G$rz8Dj&7~pWVM@$}vp>nvd`=T)N3s(p0Ro%n zVL&?dz&Mp@lEf};=^q!RkU0=FLd8O9juvCsD+(9F6t(7=P<%YDkx9U zLaDnnFvfMAn&NQ;3GVDPo`;f356mv2%Kdmxraq6h8pB$OymNtVhK){!>Kxif4Ky3wg1H%Q>u6P_$Wkq!Wtf*cGn zj|wm?2L!#UPc!-(5YD&CFXMilUvz&lA9dWjYBf>&GXm-Xfqr^SZXz#DKNG$Egf70Cw^__%2aK`b9?EgDMUTjl6s`4G!|vlYLI zOfiFyDvVNs&4eJt`ryX?=QVOvqV9!Hx z%eriAvIi+6`xF-GkOZnCV^r{VRM1k!qMGDfje#1Yup4V~m;&BEZOT$AydbxzaV*r7tl+kV`uWhxjpTBfiZQIL-=Rv;B=*Yzin`pC5ot!i$ zF_Vo7#y&l2tqCX6lj@r+7-kzK%W_D9*Gn*$bhrWi&AJb^Z3ZHkX$vWVzi&5%>mOsc zhDb-;*2xLiC1}kp992Q)v&ilOi?ebp2>6mS(NezkW*zET0;+ct%&F}^Bdm5}TWGuM z>dw=19vz`0&a0|((AjsJZR=U|3<+XDPH=x6liF@SQfjAG z*z9InY5_ZR8clC-mL zSq(vnO&$szQp`k1<>2S2^f)SMbM35o^>s&X%f|oKV#4sI)w7?d$6f0t4;C)8c$XTGhee(mPaPp1W6Tk5AGU?;NDDC)Idt!(%Nv|C~g(n>i^>k^Vj zn(es4ewYQ)HeL5hsJ;RsK|vp$6MTJcXlNDegr~u+09%QfG@7P^k1if*vOylO@{gLw6{$~6E&{M_Ljl^y~5#=0KE5XuBS2ln{c!3E@w@MN`nm@ zu&FfDyPK?MB>0q3vqVqYB(S?~wsTLUP!t#ugtS0G;hSyF3h2oYFkz1Y&n1ca4(98Q zg^Ax2m|y^&$YT+n^KqZBcyQzDW)gc%7SACsGW^k7A(%K)P6|Jy{VnTLe>4gF>(!)A z9f0gC{cjjSBV9WG47SGT`11VATGR14tIW_(-uJAOdz~_&qF7*F^H2ZDI!YwFyGwF~ zB+UHCpDSDHf3s$v10VK7PRkcqbIsPf1q6Zt#FK)D7Q1f6`VNCODQGs2?MMfh)*~GGK1#F&*Xc{wdpN`&Vw%eKpD(~6lf^3`f z_CtV8h?&@D`W(rk>Y1onKgJBxQp2Kk3qJ3Jpgze7@0pY^1tJyVZZz0|!IBOZX-JQ1 zkPtpWXvHj=PC(B-gyWo@;F~H39=iYLj!9)=YIT@;U4$7zXk-#DnUK*Ei)to_VZ@Y~ zJX8{-QU~gONHBit?o)vM`rN9^4WS@+*#&0W4ZBg= z&5UjXwcTugemU}98Y9JQ5v@nW0JO*^+c6g2=9I&QgN$NBwyl|ziCyvWHo>WszExmz z-C*0EW^zUlo3z>Q!iy8jxhI`-!HGyJ>9IQXpH4U+tb|)T9jfFQ>(vlR`NoIT- zAFY89LjT5dg2>7sz#2xWWv=-JVW)Bb7)H;$f9FW_-UlI zX6woqR#=0jmWi3GX5wTz(0htb0K?(+$Z8X|0)mp{z>{ACmXB`V8u4Cp_dH=|t?VRi ze`056MJjvMqA~B?**>A!l>oAJ?{s#zZFtRxC_h!{Q77eEBV{ir+0ykk$6p`(pDRXM zOOu;vE(*L-j(%jamIBleGeM@H*R!-|;r4Qt?IqUw3|ITVbci|~rB{MqD4^h_c4a`w zRfA|~>A|nK=1(S49uQVO>|Se*xg`K8;Wo)UO0&r|T(BK7Yd3S(KhI1r18f`9=n}K# zjEOFTMH-uIE7M4L14VS2*pP+N6iF0 z_9)16I@#OmhnI4ls9m18~V;pHXAa&&>Kt1IeAU ze5{g*9{9hZWW{T67*uK#0$p}f6QndJAr*u~KB|Y0kTF-`4J5D_U~5yzWr4FXjWK}y zJ)1?THDiA#F1?lJ@<738Hf#<}OPDrc@-yGm2;9yCHZxw$TEKQ|AMq2@rn2{(BhA)| zMQPNP+z+PQU4^F@h`S*P)u)Lr6`=11Gs+|41w_8WI%KYiTCAWKD~c8u(o+rAqNkQ# zXWO>_h89CmY6-GT0#d+nORu0M!U8Jf_uCZYeZ+dyX)8)d4mKWQ7G6Iq$#I}2VHF2R#E30?3vrV+Gd~B-@T@NAi znyk47Z2kb5$_jm=pz9&DM#F`YCPGX#Tm%LM zuwYMnZ4cv;;%y2GPe~)y7ve<P5?E(M^&Zl~eP0R;!t_6mzP`GVOEb-B>r>yZFSx%!((~fg zb3ClZ4T>y;AuM7X2d4I&eSA6REz08cvv2jp;(H63R$>LMPGOU%=nZBJ7VoioZo=id z(%#oFz~g-5IN866DrFH{U&6|C@Bxq&%EZqOQS(@|O$t)tAj8PAA8)po3@kWGeq=N= zdco5hKxmf0_dzI-aXX!WifvhR8;HDQ_@%^5mo}Bv>?oK1|VjPq%pxlZk zPwR+J^|&6$+~go1?`5_m-fh{epw}6)-sy?9cP$q;SmV>~yw+QG>oC<2>n$O;HYTP< zhu*}*w9Aog{m`wX)VWWi+ZV5%Sk``fgm&=x2^%OA%jD=GfI>w;JMnsSX<&&GIz%Ri zG=p-XSMoUB42AEvn;$0alpA13;=G!|F8_2gMQ zW_qj%*|GEfUg5?d`;ff1#`u;U!^IlQMU*9X71Ub%xZ~8}XoRi`~UJ z*%)+VhjUcCSMDDnn^lpxvKDc@%sv+GTGkZ4^bP&W77f`WrC)ySQyz-aEj*ExW3V+zu_QK6n{of(adf2??~K9Q&ij(h>iIRv@k-1RPFElMd5x+v@EE;m*stFMT2A*?LyA0h z8V!R~-7`|LXSXyR%bTuwuq1fj5m;r=+wOyvp|86iEDe6DK0nNwlkf~`&U1M&-e*j^ z{%-KJmOLIfsoQ?H>187Ij&CEWztr;zfBRCui`>t6GCN7%9W z26;Hn^TO~GyHn-8xktBk_Cjwt7fXECFt_!X?FmbIs)~0kP9&*NcK&L}?tcTm%-j9t z<4S#j#mN(m0_2k0V&JKRlXmxq6@PmI=K7N7fX_*IywX{~O+!-S_&~{*(cAi7T)Ubr zVjH?gV}kcikLqb3GbUom-;Yip+(gw_zo<3+Bi$UixgJ};i_T@$> z)9bZXbH{kags+5kS5yjrF_$v^{>l z`)~7akbVC+^WL2w>nnMFVd~`8=W>i~k6!s|jk;0f;rIV-HC%JrH%*Sj%=1XU z@}^QsDz#=lTfP`->s{m2&MzDr(8K%j++GPZk`SQz6z9LPii|&1GDf<^?dnY^@w&lm zS@P@T7!(&!mF2f2V4Jx(=z2V1`{Zlym&~~m2<&)$mdBLc!`bq6tvdsRi}y1oqjiD) zAL~Q$Y)Ts0jwOBx522?M4uM_aJVR-g_ztcp}8N5#u%Q(#+{MV{2f zx762aU4_%d+!@OyCFh;zkiUPl*qM5#PGOZO!AB6bHK-Vm=|~@)pkgBfrfMe*a_dDU zV%`Mt8ZgM##NXLSY$51*k=)`m-+?Em$T}&)b((uDghL<~MI+{O4ITV1=F+{g=6R!9 zp$W%dz;Zs z^5WH+VvCG1C8dN|^jv55&uwUleie-h?N#jGE`!--KtV&G*&>VXw&|rQ(zo4gflK!k z#~*#VZVvj=qRZFMSAFVKV6S=qU765soQ~R9_XWGulujQmKzOdbUn*v_*yzW@zon9} zSMM~FkI)C~lYplJIvd1%4mfian87t{VvSbqG^HDG+0DW&=P0oYxenzOgywGCG3p(} z@*mv1W@E^j$fDRYaA&8>4puK-?F{!s%AN9w(C2Z1HQsWA$k{UZ{znERfnYHj!T#^; z@2TNdDCaR}8r|KU1ClmJ!bxi}#osdT;{=TL0XOAC;2e8D7^t9J%rEk&j(_}n18n{~ z{tX^B)M67nMt)B=yG=A?^9MT0(>_k15Ay?iUdH@LdlqfPU+UZwFy>c2_Z1rf z)HKiZN#J#5@yBF%jpfB?7k?l*|HR*a&bFmn*VGjSD}ai15ZJbU3BtFtYJWl$((WlQ zDzG+Z|5&t2{*IHVyPlSIU7aO24j0{t^LczM9wrz4feY<3uQ+*=SC&&R#CbnlM_xV;@EKWE1skfL8fedgtN+UYSjpo;xVb7fA`GX)9{frf|3h&_WJmA zVJ|?~RtK~1)fLY-K@h{xbC++yn6PIXo6*}YMA+>n?n|s$^XHEw(fA?A)|_$(mftPJ zXFwLE53FHyLEs!y!so#12$ys>#~|C~4Gq&G&yf2OWvotW-=~O<5I~KX|l7N$2p^~z^66$VMjb~xyk}1Zu0w)A2&uElFI!b)Wq*?()MW zn=(&byEW1ma_5&3Biy&_+DKl5@Lbl7w!rt9=m_GAB0VvPF7Y{;{BZ;IG-Fa8iN^$XElpV!tMTxBI5Eb6<6@$~W~&b8i&QRG$4iEIlt8 zpsJ^>N`sD5+`oUA3LsP8ja9wb6g(q{VITgP*!sUy!EXnTE*}>%;nmTD^LHC?YYTtS zuIY+S{MwawH~$~Idrr)!zq4$PAKcOTt$)a03!J<+>}xy7AM$(kL6R%Ww0+F97LO1ahWlA(#Xd(n?eh5c z>*U)ucOuqyA~r%CAddkX6Z7GDNOqe8h%s1|M}*2fr#?jxH-un*i@4yJieY=6c@S*T zl=ISu%gBwou8Lx$Tiw4P{cU4d2x<9^U95_!u({xzLZ{Jru0FsbRwUC|HT+-=-UMvx z#De`kr%kwX`mDwzT)$ZIRBQ2+OE62EUYabX_c?xw58X%iO|Jo7lmPUH*Os33`hnKUbr`biBT$6S5JZmduihz94?OAJOW!8&87}26x{&9zmdaEM;*b(oy= zXyn`=-E$R%Bx|d=RW$E*?(ww5Lw$!rF8DR}@jUUJOp6@IgLKFx6?w;ZvU3Eh=Qmbt zbkTxC?4cLxtX1j_?#pMsvz>wESQrUiB_65vo@YcI9>P6;fH!gpiwE2540+3FE}4fp z@Ugt2<2HK}2oGfVV0R6pOkgZ79m?diZCcspzPV6Ssy>wN_`Uuv^5|nzwvl`Ej!e-p zo|Qe0JNJLZTbN`%%wG$Sal-5~qV^b3DO$uzIb0-$+Rqd``V?WZIriBc5r5MX;|pn_ zHNG*+Qr}c;+v#AW$A1vCQ4b$-?(zs>MWS@xNEtvECq(6|{kqihNp;}2x!fF4k&+S} z@-o+-w#TRHQ2r4n8nPDO3Gn3DAMk?%V*C*k?(s}Gtk$AA!^!e>3Grs0*2bn@5OY^g zZ+Wv~K(mR7Y+ldS_{eJ*2 zX4O{_NJd?y1u+${iTe<|kLpCfLmI^s`|S)3F|WO(BI$_3h5=a)HN^N`HUFb(as~Oy zh3z;l5V{K>Hj^w(2`2PmJQsNLQW~6g*#BFj+efB3pwe$e4yxbld4SBk1K=1@HM#>~ zf8&mDaTjO8E1u%VO*Y^BBzI@1v92W@B#V^a@E7$fKF_VZ;*=%Wd8p23DDKp)xFZ^Y zZ>{!;DchTJ#MrrbgpY4e#$D832rJ(^^%Zx|+^LY9{yHSuBtcwW0e6u^toNU{YIo+V zs+#te3jaFKM>iwJt9Mg_Qdf6)u5t@~1suEdnN02?%k}{4gMTBMAnrS?K9rri+0yxU zy7#-m=>3uG`!Azi!ad6#DHr58p!i<9ze2twudAHTIIYDjOe%X&V;gtEVhV2YfLU@F zcjSibGRWZjL$=HH-#Cvw*)A!i4q?@u{scxya#h+6^`MRSWcUL~$FNMXsJ2WIgu6a- z_4kDFo5Y9}Gu^CCfX1yr#;fM2gJ%+MTCSapPb|Cm;O4yT#SZs6 zB1UIxRtgU~mrFz1utsJz7lQS32XtBSD zkt?}-|IP2{=XOx=77w`=M}g!yNBrFxyu;?|f|4cs#^cm4Ene{BUh7Ktp^u#MN!~;| z;?EedDjY-PZ2eyvOrnC7pC{VH$TZ zK%MWVe)au?|4VNL1G=>n)1k#GB*;uT;-nG#n8@=7?>xaRJ|7o!riS%&j^_a?zHh-C0W(MJ^2t!}tDi zwR;3}?N<1?LmMvkAVsSY{*W`Vg=5RMIJCEnwZNXWygI(v?U2ap@9~j~OYf-usAwA< z%zc@4Vn<@aGy|aMqxzS#7i{=#_S7Tz`d_{8vq(M(0f%c{U5mRM+ffPRaQaJ!T);)% zx-w8)GjrijRax9%VlBIF6k>5xJC}Bksc66%P70>$w%Bx#UXSr(UzgaBr}0OfW|Rf~ z-B0k_1xrUoO9>xd8%(&1T-?Lo6lc$*#MZRliGkg@3Rp^ZpLIN&^lT(GZB$R!o)zo<;BJp&@ze~DG+{)E^_?ouIE z?kj*-?ROU-er23zUZZi>UypiMZ#8qX()H8wiKQSxJ}2+k;r~3;q#S_BMQmk)q<_qh z=>^=I>kkhkLVs>jt8R6-FhZ{VxshJFOGXkoGm(j1SnWM=e83{dz9sx7Zw zuYUtOoxFcxXGr(l{FO*b&yToU%)cL^kQ%FZwqt#;!|>A%vQGWh_^ZTn2X3eC+^VY~ zAD&ykF+nxHn|{Fi#^%$xnN`kyb}kil7c%>cNy4ucPyMsU8y2XL@1FQ=X>E!q4}6#6 zFCC9LT)U+{`9kK1hBQAiF8OSxp>VUy!nZ!2Dd*O9r4N>_II;97cZJpDjRVyAnWu=r zeZ}7cSFJ;@{EU{o9BTY2-Z@#)wKoa?xyfT$qmF>V$8Vy7Gd{WGx|6So)d4TpC}7Av zk`7$md6N>w(dkbj9R16btrZgoxEDIZW82SO$8HiJiL+vF3XQKn0VRT+avjQBZYO$~ z(8U}YY7TemEZla6sqyD5jySY-pW>~plxbINBdLH*-Aqf|N7KM zSI4HaaV~Xfa!e%M%(?oG?zX-@si!vv5JFA$$>twd- zof7yh|D;TmHY4EjQpay^=byZ$9lENSS00v<*z)hx?NWI?yRUt)l%c;Dk9>3fHs_jE zD$yI|n@?2Xa`)#ty_!b;PduA2I$&lMB`N?X@(vueX9vjo7R9<^e85%=9&GA?3!pN~f>u3j zAla$E0&J~dffY7btdYtZfo`R(izp6blyT=5b-Zh5uxh;af*;lJ0~J@V6G|wVfeTC+LJc9Iix;aXQjwnY3nRhHIFVVBx}IdFC;7r%4@4lmd_fC@W#&l*>%}X0 z!5mg#0u`H+L@Giz3G1vOP&4?LRa(NI7b-wL=o#L5UN*Bwxd%OBeX_FC%Kr%K4K;Qx&u)^Gigf3U~LXf=Z1u%Hw3t%9yT@kz>{&IkE z!FD0gVRA|rErL<7Vf2C)z4)LjR>29)rQ#B(K!qes`G-IF!3;(?fd@8lffyx`R1y&x zPx?}yXz5NPD@j>L1~92mnQVuqnvX7NHlF_ope8|c5!zgWJQbzwjm~?KPq<>2rdS|p z#NuYtu6UJUJ)i+ujM}m~L{0*I#aY5ikQt5mlfDGTSzIBb7lWdfXufKVX3LTDX5}`! z@DBt*xWe2}0Wnv6kQWP0C?N$|K)q2Wkp?r8BsnR_U$}x5w5Z%HT%pm3bK1XNUwTF`+q#L5vlNRV*)B;R{3x@_JVKIg;$o|Z)bHW+D!FnM!i6}LJT~hItU?XFbaSj4ek4=MSX;|P5mu# z2k>H%WW=>DlE_hodLN7=pqLs7A_0`yx<|37sMqod0e}*ewJui?D0fc%o3B2KyQ9HF%U$McNDTgKmq{) zI{*Lx00000000000000000000000000000000L2O zh&><*iUkl*j3pu}qW50J0;o6n9zO4%@jhp*Svm9Unb~{xIzPmlPIIu2rGmr2d0_Q$ z>3AWRE|bZGOuAUe6brdbJRlQuWiqjt%Y@!!Vj&#>#1KNZddC%t#bOy0@K7z2PG@rQ zOfCc!GV##85b6S50C*-;!leUvx=<*FQc!m$9hybw;_+hfY6~V4>Le4=@mvTGO_XsV zI1`T-(&?*{A&`&`rJ&(lF2su|TO|V}xlkp5hh}nxT)bE&hT3qsP=Jn12$AM;0RRFp znNSn15TMiXbmnR!h#(iraD@=1|Djh|Km}a943aNq;vwdA2)5du3z1tLAQR#NsJj^A z&*jR5LI9vc4?xG`SDAA0^#3gg(hO-7%9vsq7gEFogfgfUQb-p=48=@nSpc00kpj4o zP^fmb9*>726A#g2GVx3yes#0|+t+Fe@1LzRHRRbX|s{v9AtpIXQD8tibbU?PMVpS5fbeUN8KlA^84;HHnSp62L7%2c^ z*82$f{RJ2mv*=+#!<{0mk?&cbuEx7%n%28t4tF&Toy2*RuBUf5-#}TgRGwPMK|c(A)M<9W?RLq+Xr}(BVD4Jglhg z*(EZZaat0?hIcD5{FgKON2U~TKs0Y&P~rSOhpw3X9)w)&hT*@RO$Q?H_N5mo zV%_+KV@lNMREAgk90lQQp%v)DE`1c5__;3dW((4-So){)@y+W?|4Qyi%k($jy0P+Y z?rF!4C%10?URrp!M|HtX1pD<}PL(0JO$8AsL@Nu((qsXsb!W>Za5>U43ji6oHynqY zg#pkcCYuW25m+j6Lnsvh&9RaOIX!pDTY0@sP0>2+F+w~NHqlxS*h!W>PDs^aJV2N# zmJgbqW#xnGa3y@UA}NNSkHLvV@DT0d{7S_?rn5(a)LD0rU?@D+mV~W$C6$UeKB#VI zBQZfL2m4IarcCWJMWQ92@@vuAsZ{t8>3xu|1AEYa6ttnj8o~9FWWcaj(+B~38L{iQ z{4gQDTuLn8)dE+iQqQ^5rtvV@#!vdJ4(&dGC2f^o5y3GQk{v98t5yf7{hgOkd6mKk z+XuCu&$b2HRReH2o8d1#kF5M!x+xY1+fkvubmIaziNSkWT40aB*KtefcdTaz3AD-|>}t!efF)+|jD;*j+ee~)u|Nmy2Ch24wB zBDDky;5gYvd)IN8gh2%56|i?${1>~M@~VYNvx+uaix|8hf?Gipl@3jcz2w%D|DdFGh?Kg;jRy{%Se zE5lP(-t%^Lu6#IqpmPP>zoQU_O$gw_)C7eKH3$O3En-`Etg-W#@Jvb02L(k22VoZd z^F@;IqVz@N&NWy!dEzqG6PshJ@0O6zkQt^_kr$iKEXYqgIBOYQ&PE1M4GNcb-K2TO zkKeV$?gqY3!hrL-ph&4}+XnFWVwC6_vsZlUzYjQvJIZStZ@}(|+D!LIVtV1i-zOh25@h)(XlMyDRHl_@jc)kh@58B(Y%g*6mJ>^AW@IeUe$>miZ@Dp`lsCCNGt`6yKB zXg;N^;l2DPWtCJkVm1aIAir3yNRAi@)9I9wrN9Bwzh zxfacGd)pmo_nv`t%^=g1p6=Q-!Yei@B&NjertVY}DOe?WoWD1RMl8Fb7^p2JNF2Pf z9av9Sx7|E#3Pp35xUK2cn?4(j*r*w4mr@brUmsvJQbgc!5zWMKdb;sk00{V< z+*{b>l&NOSr-w1A?Me>6F+&DQQ?6OMK@U9#r>imps295DTU}Wluwy{U*#v1Luko^_ z*^8gTzDE~R4vdIj|N41Fw5Bt)$nWKh_EO()KxbOj$jc8-OIJsacV?XTdo|A{AtM^( zzdk-tWr{J)d3a|8aqs%IYyJ{o>SCZ??`J@@R|6A#bp%<%su^}*TW97!(lA*-swp0| zxK#EE!1G1lty+-ryDqU!8JtHx0EX%?f=J;zwfl<>y3UPc2k~KRiU1Psj9z4E>S>rx zHUZi9Ac>#?Gh5z_BbNV*a8G@!`I!%I{3O~Y6d)JZT)HtC#dgIEPs zSVHVTaGQIAyF{~1bPq->9;7+}H}4F;w{Z+}-}z4?;;nzSg6PfzDWdY2>U&QUSV$jB zU2*32-vIyMKZ?7$1TU%?`aNq~dk@K?-`7$_OfyGCc zMo@u2&o&MmtGWTt{@R%N?Utp=Y_1b_V4q?aI=?r@=E45Q*e`K2LE>LieUC499(eS5 z`|n@RL~DhDqJS@PI=`O}2MW8Z@>ChyTioQGK=^i(NTRU_nLsLh%L`Cl(=zAzU-o`U9-u z5sU)jQ&S-9xfv=3k#{9`n2W#QZTzayv&|m(?wzxnUKMWoqPvIUrMBaf|yTp|J;9+*zF^Dr{(Au4<; z39vS_Iu&`$E7exDbl_Q-cqr_3FUToO%Tlwew8y{xs873-g2GyMcIUkxG`8?&MynXt zWQ8R(N4gFNEOmJ=b%C#EX$maP5rlD&A&V7ZHI{~cY6puHoJ@`>z?S>Mo)YqAOmvq` zb_{~L#RR`eQ{BarwzFPgy*= zR)G}2g%Plx;xO%MPFZ1qPC?;MCDb$`+*8GdFht4xPQ-N;(F|C*1WDv0xD2^ec8&fRpisU| zZpyiqyxp3FHbOaPx&fYEwb(BB7Nt04mXit<;Y>wT~ANBUCmW>_! zV@X};+r;y2=y-BWGaT_xqWV8SoL8n1Azz(OjUw{KTt*!mq$^H^v6|<0Z61Sb63W$+ zg4Rpr67HnC+*kR_{pb3;vDoV#E)$M!%A^|0a=^{5QRBmIp%O@^s=xHw^Cew7P=ZjB zAV$&?E)}TLB`Ep=f_|;31XW|nQukDcDPrpZ1`r$rD&W*^lj98*T53tLx-5iBmZlH& zT(UvJCKOtU1Xm`(MQ?#rN&TLm)jzhxy9!XQqH`ab>p;3w_}&d@l)neIMmE3ZBfu#>;QYiFNMpYE>s8`x`bXFX&(@sh7T@ z_AO|Gxiy#0VT(Z6A{d}@Nt>nO#zBz<*ycdd@I6?3?pic8hZI|q*% z1Ca|FhqHD@p*9YxtbgC$FmHxcz{)2kVV|^7?VUC)oPvFumP@Ums!X)5W$cmpQakNB zn<`*=U2t~*d3rapr)$eYSP7lSo$0n-B?qH8Y zZI9FS9v5+s>+c?_POrOjuV+**?O?A@ZLjb3UVm{fvWrex03!G~;2eXk!U%oVBkZHh z)8Mt2z2zC`4;WkzB?=Q`sO-@FHmi)nhHEXrU#a5Kw;cP~1$-$6oN?$hh8hY7EHw%( zV!|XzFyo;^6SMmC#cUZm9hr*%wq%j}uBhQ#x|P66i7Tvhq~KN1N=6=apZzIBvTYn9 zk$8IB0!?SM=&`!*5yJjDRR)HHa!f_`97Kj=Iq_J)LU8^1?<@D!f#^|W!)F`$QF5IQ z8Quev3U6o$wrun{U`Gd%GL595&%e^C)JuCTmpyY@DX_LU&*W}Pp8?NVBrwhnD3uW<4xda@Y&@{_|Q1}u7R`(!j)|y0CFH(kY%IeZ%IG;` zY>%Ut>|LhEWmDT?Q|XMq&f={$#BIG9|CqgG1U3iJmZ|nR0u>; zed^QnQ&eq4-6JxxMUeYLD?Vt2JF&^ZVtBo=2gSREZFZ^KN03JMNwYXNbH^v`(dHrh z!}0h1XHzkWo4rg~ClwyA2@gVIkv0*gmDqe6QkKi zksfdE9U{b=pG_4~=>c{FoWTzLzil3AGJHJV+06GE&o6PT)|>wc;!Kdg9#$06>hlZsalIXE1)M8)yt?v$wXeFSypHW)HUobE$J2NG%2 z|K7*_JsJLLaFW&K2WXOCvLjIq0NcJ0czrKqn*MqOpi2qWA z=l0b|f8gJT>i?hulafCyBkGbCh|WUAg+Y^wGitG$3iibp}$@RdK^f+IOW1m zu_&^yZMjN}=e!&|(Kv3Cq-(b4i~bnJ*OgcG$tT5o*{rGe&O?`{=wQ6{aWH&wvlsXM z8ZQTd`y<){E%Qs?je&rvyq6z8-u&Df1lr=y9bm{w0BTbfVwEbPiX&66THgV;zAD6wPBhvlvXH>_+Lx!k>foSF2l8yZo?Bzr6 za@EwhTG7~8)eXOcH)tt_U>`sE+x6|z-q54Lla9tP%VjULAcX1dPaZAdIFq$06>9I8 zzh4__31D(3Z;TB2cR2L@_fP3wjb}?=Q<9IDd9+28Ac^JxxV<{S=xM+nFT)GVQiB^e z?|H`Os2bau#lsOX@OS?OOeKfE88+IZVrRbd4y_5$iU~g-_-!fAod4J#XZ_AiWh>7% zP(EfVK9ciizp<{Z1Tv7>v6&@rBDbJ81cq9>U5v4Wm(^ms#Jr4b{9e{g0Tuc|! zxP{+ca#A+Lr<_iEXGT268hZGJc1=5FeyL$d<&Q=7C;b8uI$1znoFSC-GdwDJh8>P1 za&gw7e@p*tPopeLdUd^)228D6^-H|c&M4mlbZPZg)|5DIam&7aoQS&Re<_Y>e-VgH zoo~0V2{)e33s|Hb(8K}#B33>OiNUr~sVr6jLfwKv<%y!E`-Hqs~NjrXy}dy eRIqk>y)Uq_1Nyptp%E)xFyBf~4S5U(aQ;6wk~v=h literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/face.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/face.xbm new file mode 100644 index 0000000..03d829f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/face.xbm @@ -0,0 +1,173 @@ +#define face_width 108 +#define face_height 144 +#define face_x_hot 48 +#define face_y_hot 80 +static char face_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09, + 0x20, 0x80, 0x24, 0x05, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x88, + 0x24, 0x20, 0x80, 0x24, 0x00, 0x00, 0x00, 0x10, 0x80, 0x04, 0x00, 0x01, + 0x00, 0x01, 0x40, 0x0a, 0x09, 0x00, 0x92, 0x04, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x40, 0x12, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x84, + 0x24, 0x40, 0x22, 0xa8, 0x02, 0x14, 0x84, 0x92, 0x40, 0x42, 0x12, 0x04, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x11, 0x00, 0x12, 0x00, + 0x40, 0x02, 0x00, 0x20, 0x00, 0x08, 0x00, 0xaa, 0x02, 0x54, 0x85, 0x24, + 0x00, 0x10, 0x12, 0x00, 0x00, 0x81, 0x44, 0x00, 0x90, 0x5a, 0x00, 0xea, + 0x1b, 0x00, 0x80, 0x40, 0x40, 0x02, 0x00, 0x08, 0x00, 0x20, 0xa2, 0x05, + 0x8a, 0xb4, 0x6e, 0x45, 0x12, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02, + 0xa8, 0x92, 0x00, 0xda, 0x5f, 0x10, 0x00, 0x10, 0xa1, 0x04, 0x20, 0x41, + 0x02, 0x00, 0x5a, 0x25, 0xa0, 0xff, 0xfb, 0x05, 0x41, 0x02, 0x04, 0x00, + 0x00, 0x08, 0x40, 0x80, 0xec, 0x9b, 0xec, 0xfe, 0x7f, 0x01, 0x04, 0x20, + 0x90, 0x02, 0x04, 0x00, 0x08, 0x20, 0xfb, 0x2e, 0xf5, 0xff, 0xff, 0x57, + 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x01, 0xc1, 0x6e, 0xab, 0xfa, 0xff, + 0xff, 0x05, 0x90, 0x20, 0x48, 0x02, 0x00, 0x04, 0x20, 0xa8, 0xdf, 0xb5, + 0xfe, 0xff, 0xff, 0x0b, 0x01, 0x00, 0x01, 0x00, 0x80, 0x80, 0x04, 0xe0, + 0xbb, 0xef, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x04, 0x48, 0x02, 0x00, 0x20, + 0x80, 0xf4, 0x6f, 0xfb, 0xff, 0xff, 0xff, 0x20, 0x90, 0x40, 0x02, 0x00, + 0x00, 0x04, 0x08, 0xb8, 0xf6, 0xff, 0xff, 0xdf, 0xbe, 0x12, 0x45, 0x10, + 0x90, 0x04, 0x90, 0x00, 0x22, 0xfa, 0xff, 0xff, 0xff, 0xbb, 0xd7, 0xe9, + 0x3a, 0x02, 0x02, 0x00, 0x04, 0x90, 0x80, 0xfe, 0xdf, 0xf6, 0xb7, 0xef, + 0xbe, 0x56, 0x57, 0x40, 0x48, 0x09, 0x00, 0x04, 0x00, 0xfa, 0xf5, 0xdf, + 0xed, 0x5a, 0xd5, 0xea, 0xbd, 0x09, 0x00, 0x00, 0x40, 0x00, 0x92, 0xfe, + 0xbf, 0x7d, 0xb7, 0x6a, 0x55, 0xbf, 0xf7, 0x02, 0x11, 0x01, 0x00, 0x91, + 0x00, 0xff, 0xff, 0xaf, 0x55, 0x55, 0x5b, 0xeb, 0xef, 0x22, 0x04, 0x04, + 0x04, 0x00, 0xa4, 0xff, 0xf7, 0xad, 0xaa, 0xaa, 0xaa, 0xbe, 0xfe, 0x03, + 0x20, 0x00, 0x10, 0x44, 0x80, 0xff, 0x7f, 0x55, 0x12, 0x91, 0x2a, 0xeb, + 0xbf, 0x0b, 0x82, 0x02, 0x00, 0x00, 0xd1, 0x7f, 0xdf, 0xa2, 0xa4, 0x54, + 0x55, 0xfd, 0xfd, 0x47, 0x08, 0x08, 0x00, 0x21, 0xe4, 0xff, 0x37, 0x11, + 0x09, 0xa5, 0xaa, 0xb6, 0xff, 0x0d, 0x80, 0x00, 0x00, 0x04, 0xd0, 0xff, + 0x4f, 0x44, 0x20, 0x48, 0x55, 0xfb, 0xff, 0x27, 0x11, 0x02, 0x40, 0x40, + 0xe2, 0xfb, 0x15, 0x11, 0x4a, 0x55, 0x4a, 0x7d, 0xf7, 0x0f, 0x00, 0x00, + 0x04, 0x08, 0xf8, 0xdf, 0x52, 0x44, 0x01, 0x52, 0xb5, 0xfa, 0xff, 0x0f, + 0x49, 0x02, 0x00, 0x02, 0xe9, 0xf6, 0x0a, 0x11, 0xa4, 0x88, 0x4a, 0x6d, + 0xff, 0x5f, 0x00, 0x00, 0x10, 0x20, 0xf0, 0x2f, 0x21, 0x44, 0x10, 0x52, + 0xb5, 0xfa, 0xff, 0x0f, 0x44, 0x04, 0x80, 0x08, 0xf8, 0xab, 0x8a, 0x00, + 0x81, 0xa4, 0xd4, 0xd6, 0xfe, 0x2f, 0x00, 0x00, 0x04, 0x40, 0xb5, 0x2d, + 0x21, 0x08, 0x04, 0x90, 0xaa, 0xfa, 0xff, 0x1f, 0x11, 0x01, 0x00, 0x04, + 0xf0, 0x57, 0x0a, 0x22, 0x40, 0x4a, 0xda, 0x5e, 0xfb, 0x1f, 0x40, 0x00, + 0x40, 0x20, 0xba, 0x95, 0x90, 0x00, 0x01, 0xa0, 0xaa, 0xea, 0xff, 0x5f, + 0x02, 0x02, 0x00, 0x01, 0xe8, 0x57, 0x05, 0x00, 0x00, 0x12, 0xd5, 0xfe, + 0xfd, 0x1f, 0x48, 0x00, 0x04, 0x48, 0x7a, 0x95, 0x08, 0x02, 0x10, 0x40, + 0xaa, 0x55, 0xf7, 0x1f, 0x00, 0x09, 0x20, 0x00, 0xf8, 0x57, 0x22, 0x10, + 0x00, 0x28, 0xa9, 0xfa, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x49, 0xdd, 0x29, + 0x01, 0x00, 0x80, 0x80, 0xaa, 0xd7, 0xff, 0x0f, 0x10, 0x00, 0x08, 0x00, + 0xf8, 0x96, 0x08, 0x00, 0x00, 0x20, 0x54, 0xfa, 0xee, 0x3f, 0x81, 0x04, + 0x40, 0x24, 0xfe, 0x55, 0x82, 0x00, 0x00, 0x82, 0xd2, 0xad, 0xff, 0x0f, + 0x08, 0x00, 0x04, 0x80, 0x6c, 0x97, 0x00, 0x00, 0x02, 0x20, 0xa9, 0xf6, + 0xdf, 0x5f, 0x00, 0x02, 0x20, 0x09, 0xfa, 0x49, 0x12, 0x00, 0x20, 0x84, + 0x54, 0xdb, 0xfe, 0x1f, 0x91, 0x00, 0x00, 0x00, 0xf8, 0x2b, 0x00, 0x20, + 0x00, 0x40, 0xa4, 0xf6, 0xbb, 0x1f, 0x04, 0x00, 0x44, 0x92, 0x7e, 0x95, + 0x02, 0x00, 0x00, 0x89, 0xaa, 0xdd, 0xff, 0x1f, 0x20, 0x09, 0x10, 0x00, + 0xf4, 0x57, 0x20, 0x01, 0x08, 0x20, 0xa9, 0x76, 0xff, 0x5f, 0x02, 0x00, + 0x00, 0x21, 0xfc, 0x4a, 0x05, 0x00, 0x01, 0x80, 0x54, 0xdb, 0xff, 0x1e, + 0x08, 0x02, 0x04, 0x08, 0xf9, 0x2b, 0x00, 0x00, 0x40, 0x28, 0xd2, 0xf6, + 0xff, 0xbf, 0x80, 0x00, 0x90, 0x00, 0xbc, 0x92, 0x08, 0x10, 0x00, 0x82, + 0x54, 0xdb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x44, 0xf9, 0x55, 0x02, 0x01, + 0x00, 0x20, 0xaa, 0xbd, 0xfd, 0x3f, 0x08, 0x04, 0x04, 0x10, 0xf4, 0x2a, + 0x01, 0x00, 0x22, 0x80, 0xd4, 0xf6, 0xff, 0x5f, 0x82, 0x00, 0x40, 0x02, + 0xf8, 0x55, 0x20, 0x00, 0x00, 0x50, 0x6a, 0xdf, 0xfe, 0x3f, 0x00, 0x00, + 0x00, 0x48, 0xe9, 0x4a, 0x05, 0x08, 0x00, 0xa5, 0xd5, 0xf5, 0xff, 0x3f, + 0x10, 0x01, 0x10, 0x01, 0xb0, 0xab, 0x92, 0x02, 0x40, 0xf8, 0xbf, 0xde, + 0xfe, 0x5f, 0x02, 0x04, 0x04, 0x48, 0xfa, 0xd4, 0x6f, 0x20, 0x84, 0xef, + 0xff, 0xfb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xe0, 0xed, 0xbf, 0x0b, + 0xa1, 0x7e, 0xff, 0xbf, 0xfd, 0x5f, 0x04, 0x01, 0x20, 0x49, 0xd2, 0xfb, + 0xfe, 0x55, 0xd4, 0xff, 0xff, 0xf6, 0xff, 0x07, 0x00, 0x04, 0x00, 0x00, + 0xc0, 0xaa, 0xfb, 0x2b, 0xa2, 0xfe, 0xff, 0xdf, 0xee, 0x1f, 0x91, 0x00, + 0x82, 0xa4, 0xa4, 0xf5, 0xff, 0x57, 0xd5, 0xff, 0xbf, 0xfd, 0xff, 0x4d, + 0x00, 0x00, 0x20, 0x00, 0x88, 0x5b, 0xff, 0x2f, 0x69, 0xff, 0xff, 0xdb, + 0xfe, 0x1f, 0x24, 0x02, 0x00, 0x49, 0xa2, 0xd6, 0xff, 0x5f, 0xea, 0xff, + 0x7f, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x40, 0xab, 0xf7, 0xbb, + 0xf0, 0xdf, 0xff, 0xd5, 0xff, 0xbf, 0x82, 0x04, 0x42, 0x24, 0x91, 0xd5, + 0xaa, 0xae, 0xd4, 0xaa, 0x52, 0x7b, 0xff, 0x15, 0x08, 0x00, 0x00, 0x01, + 0x04, 0x55, 0xd5, 0x55, 0x70, 0x5b, 0x75, 0xdd, 0xdf, 0x1f, 0x40, 0x00, + 0x08, 0x48, 0xa0, 0x4a, 0xa9, 0x56, 0xea, 0x56, 0xad, 0x6a, 0x7d, 0x9b, + 0x04, 0x01, 0x00, 0x02, 0x42, 0x2a, 0xd5, 0xaa, 0xa8, 0xaa, 0xaa, 0xfa, + 0xdf, 0x2f, 0x10, 0x04, 0x22, 0x48, 0x08, 0x45, 0x2a, 0x15, 0x68, 0x55, + 0x55, 0xd7, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x40, 0x2a, 0x80, 0xa0, + 0xb2, 0x09, 0x48, 0xb9, 0xdf, 0x17, 0x22, 0x01, 0x00, 0x24, 0x45, 0x8a, + 0x24, 0x4a, 0x54, 0x51, 0x91, 0xf6, 0x6e, 0x4b, 0x00, 0x04, 0x90, 0x00, + 0x80, 0x52, 0x00, 0x20, 0x69, 0x05, 0xa4, 0xaa, 0xff, 0x1e, 0x48, 0x00, + 0x02, 0x92, 0x08, 0x05, 0x81, 0x94, 0xd4, 0x92, 0x40, 0xfd, 0xb6, 0x8b, + 0x00, 0x01, 0x40, 0x00, 0x82, 0x54, 0x00, 0x48, 0x68, 0x05, 0x90, 0xa4, + 0xef, 0x06, 0x24, 0x00, 0x08, 0x12, 0x10, 0x05, 0x00, 0x10, 0xb5, 0x01, + 0x42, 0xfb, 0xbf, 0x43, 0x00, 0x09, 0x00, 0x40, 0x81, 0xa8, 0x08, 0x4a, + 0xaa, 0x96, 0x90, 0xac, 0x6d, 0x15, 0x22, 0x00, 0x20, 0x09, 0x04, 0x15, + 0x80, 0x28, 0xdc, 0x01, 0x24, 0xfb, 0xbf, 0x01, 0x80, 0x04, 0x09, 0x00, + 0x40, 0x48, 0x02, 0x45, 0xb2, 0x2e, 0x41, 0x6d, 0xef, 0x05, 0x11, 0x00, + 0x40, 0x52, 0x02, 0x15, 0x29, 0x2a, 0xac, 0x42, 0x54, 0xfb, 0x3b, 0x51, + 0x84, 0x00, 0x08, 0x00, 0x20, 0x54, 0x80, 0x05, 0xb5, 0x3d, 0xa2, 0xb6, + 0xdf, 0x00, 0x20, 0x04, 0x20, 0x49, 0x89, 0xa8, 0x6a, 0x29, 0xac, 0xd6, + 0x54, 0xff, 0x3f, 0x84, 0x00, 0x01, 0x04, 0x10, 0x00, 0x94, 0xa8, 0x56, + 0xda, 0x5f, 0xab, 0xd5, 0x1e, 0x10, 0x48, 0x00, 0x90, 0x82, 0x48, 0xa8, + 0xb2, 0xac, 0xfd, 0x55, 0xd5, 0xfe, 0x9f, 0x80, 0x00, 0x0a, 0x02, 0x08, + 0x02, 0x55, 0x5a, 0x75, 0xff, 0xaf, 0xb6, 0xf7, 0x2d, 0x12, 0x92, 0x00, + 0x10, 0x20, 0x10, 0xa8, 0x54, 0xd5, 0xbf, 0x5d, 0xad, 0xdd, 0x0f, 0x00, + 0x00, 0x04, 0x40, 0x09, 0x84, 0xa8, 0xaa, 0x5a, 0xed, 0xeb, 0x6a, 0xff, + 0x9f, 0xa4, 0x24, 0x01, 0x02, 0xa0, 0x20, 0x50, 0x55, 0xd5, 0xbe, 0xae, + 0xad, 0xfd, 0x16, 0x00, 0x10, 0x04, 0x20, 0x0a, 0x08, 0xb4, 0xaa, 0x95, + 0xaa, 0x7b, 0xb7, 0xdb, 0x5f, 0x92, 0x04, 0x01, 0x84, 0x20, 0x21, 0x51, + 0xd5, 0x2a, 0xa9, 0xee, 0xd5, 0xfe, 0x0d, 0x00, 0x20, 0x04, 0x10, 0x00, + 0x08, 0x50, 0xe9, 0xd7, 0xd4, 0xfb, 0xb5, 0xff, 0x9f, 0x24, 0x09, 0x01, + 0x42, 0x4a, 0xa2, 0x64, 0xd5, 0x55, 0x7b, 0x7f, 0xda, 0x7d, 0x4f, 0x00, + 0x20, 0x04, 0x00, 0x80, 0x00, 0xa0, 0x2a, 0x13, 0x84, 0x6a, 0x55, 0xff, + 0x1d, 0x48, 0x8a, 0x00, 0x94, 0x24, 0x8a, 0xc8, 0xaa, 0x42, 0x20, 0x5d, + 0xf5, 0xff, 0x5f, 0x01, 0x00, 0x02, 0x01, 0x00, 0x20, 0xa2, 0x4a, 0x1a, + 0x82, 0x56, 0xda, 0xbd, 0x3f, 0x92, 0x92, 0x00, 0x90, 0x92, 0x00, 0x40, + 0x95, 0x6a, 0xf4, 0x55, 0x6d, 0xff, 0xd6, 0x00, 0x00, 0x0a, 0x04, 0x20, + 0x14, 0x49, 0x4b, 0xaa, 0xaa, 0x56, 0xf5, 0xff, 0xbf, 0xab, 0xa4, 0x00, + 0x20, 0x89, 0x40, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xde, 0xbf, 0xeb, 0x03, + 0x00, 0x02, 0x04, 0x02, 0x0a, 0x10, 0x2b, 0x2a, 0x55, 0x5b, 0xf5, 0xff, + 0xd7, 0x2f, 0x92, 0x00, 0x10, 0x28, 0x21, 0x01, 0x56, 0x95, 0xa0, 0x56, + 0xdf, 0xef, 0xea, 0x87, 0x40, 0x0a, 0x42, 0x41, 0x00, 0x90, 0xaa, 0x52, + 0xb6, 0xad, 0xfa, 0xff, 0xd5, 0x2f, 0x14, 0x00, 0x00, 0x04, 0x95, 0x04, + 0xaa, 0xac, 0x55, 0x6b, 0xff, 0xb7, 0xea, 0x9f, 0x40, 0x02, 0x28, 0x51, + 0x00, 0x40, 0x58, 0xd5, 0xda, 0xd6, 0x6e, 0x7f, 0xf9, 0x3f, 0x12, 0x04, + 0x02, 0x04, 0x49, 0x25, 0x55, 0xaa, 0x77, 0xab, 0xff, 0x2b, 0xfd, 0x3f, + 0x48, 0x01, 0x20, 0x41, 0x00, 0x00, 0x58, 0xa9, 0xda, 0xea, 0xfd, 0xaf, + 0xfa, 0xff, 0x02, 0x04, 0x08, 0x14, 0x29, 0x49, 0x52, 0x55, 0x55, 0x55, + 0xff, 0x8d, 0xfe, 0x3f, 0xa8, 0x00, 0x02, 0x41, 0x00, 0x02, 0xa0, 0xa2, + 0xaa, 0xea, 0xff, 0x53, 0xfd, 0xff, 0x02, 0x04, 0x50, 0x04, 0x25, 0xa8, + 0x54, 0x49, 0x52, 0xb5, 0xbf, 0x8a, 0xfe, 0xff, 0xa9, 0x08, 0x04, 0x50, + 0x80, 0x02, 0xa1, 0x2a, 0x95, 0xea, 0xff, 0xa1, 0xff, 0xff, 0x03, 0x02, + 0x90, 0x02, 0x09, 0x08, 0x44, 0x49, 0x52, 0xbd, 0x7f, 0xca, 0xff, 0xff, + 0x2b, 0x09, 0x04, 0x48, 0x40, 0x82, 0x90, 0x56, 0xa9, 0xf6, 0xbf, 0xd0, + 0xff, 0xff, 0x47, 0x00, 0x50, 0x02, 0x15, 0x11, 0x40, 0x95, 0xaa, 0xfd, + 0x2f, 0xe9, 0xff, 0xff, 0x8f, 0x0a, 0x84, 0x50, 0x40, 0x84, 0x14, 0xaa, + 0x6a, 0xff, 0x5f, 0xf2, 0xff, 0xff, 0x7f, 0x00, 0x10, 0x02, 0x09, 0x10, + 0x40, 0x7d, 0xf7, 0xff, 0x0b, 0xfc, 0xff, 0xff, 0xaf, 0x02, 0x84, 0x50, + 0x42, 0x85, 0x12, 0xd0, 0xdd, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0xff, 0x04, + 0x00, 0x0a, 0x08, 0x10, 0x48, 0xf8, 0xff, 0xff, 0x0a, 0xfe, 0xff, 0xff, + 0x7f, 0x03, 0xa4, 0x80, 0xa2, 0x8a, 0x02, 0x68, 0xff, 0xff, 0x52, 0xfd, + 0xff, 0xff, 0xff, 0x07, 0x00, 0x2a, 0x08, 0x20, 0x28, 0xdc, 0xff, 0x5f, + 0x05, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x92, 0x40, 0x22, 0x09, 0x02, 0xea, + 0xfb, 0xaf, 0x48, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x12, 0x81, 0xa0, + 0x48, 0x9c, 0x6e, 0x93, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa8, 0x40, + 0x28, 0x0a, 0x02, 0x74, 0xb5, 0x45, 0x81, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x02, 0x0a, 0x81, 0x20, 0x08, 0xae, 0xaa, 0x90, 0xe8, 0xff, 0xff, 0xff, + 0xff, 0x0f, 0x90, 0x40, 0x28, 0x88, 0x12, 0x58, 0x15, 0x50, 0xd0, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x44, 0x0a, 0x41, 0x21, 0x08, 0xae, 0x04, 0x14, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x14, 0x88, 0x04, 0xba, + 0x02, 0x28, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x15, 0x41, 0x21, + 0x05, 0xad, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, + 0x24, 0x8a, 0x0e, 0x36, 0x00, 0x0a, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x42, 0x25, 0x90, 0xd0, 0x8b, 0xc2, 0x41, 0x05, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0x0f, 0x10, 0x08, 0x05, 0xe8, 0x8e, 0x58, 0x80, 0x02, 0xfa, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x4a, 0x20, 0xa8, 0xba, 0x0b, 0x2b, 0x51, 0x01, + 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x8a, 0x02, 0xe8, 0xaf, 0x84, + 0x90, 0x04, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x21, 0x54, 0xbf, + 0x1f, 0x15, 0xa5, 0x02, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x08, + 0x01, 0xfa, 0xb6, 0xa4, 0x52, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x4a, 0xa2, 0x54, 0xef, 0x5f, 0x4b, 0xa4, 0x80, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0f, 0x80, 0x10, 0x82, 0xfe, 0xbf, 0x92, 0x52, 0x42, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x12, 0x42, 0xa8, 0xbf, 0x1f, 0x24, 0x80, 0xa0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0x8a, 0xf7, 0x37, 0x80, + 0x52, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x82, 0xe0, 0xff, + 0x1f, 0x00, 0x20, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, + 0xca, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x10, 0x42, 0xf0, 0xfd, 0x1b, 0x00, 0x50, 0xf0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0f, 0xa4, 0x10, 0xc5, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x22, 0xf8, 0xff, 0x0e, 0x00, 0x00, 0xf0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xaa, 0x88, 0xe2, 0xff, 0x0f, 0x10, + 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x25, 0xfa, 0xff, + 0x0f, 0x01, 0x11, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xfb, + 0xfb, 0xff, 0x7f, 0x5d, 0xd5, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagdown.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagdown.xbm new file mode 100644 index 0000000..55abc51 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagdown.xbm @@ -0,0 +1,27 @@ +#define flagdown_width 48 +#define flagdown_height 48 +static char flagdown_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x70, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, + 0x00, 0x00, 0x03, 0x00, 0x06, 0x06, 0x00, 0x80, 0x01, 0x00, 0x06, 0x07, + 0x00, 0xc0, 0x1f, 0x00, 0x87, 0x07, 0x00, 0xe0, 0x7f, 0x80, 0xc7, 0x07, + 0x00, 0x70, 0xe0, 0xc0, 0xe5, 0x07, 0x00, 0x38, 0x80, 0xe1, 0x74, 0x07, + 0x00, 0x18, 0x80, 0x71, 0x3c, 0x07, 0x00, 0x0c, 0x00, 0x3b, 0x1e, 0x03, + 0x00, 0x0c, 0x00, 0x1f, 0x0f, 0x00, 0x00, 0x86, 0x1f, 0x8e, 0x07, 0x00, + 0x00, 0x06, 0x06, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x05, 0x00, + 0x00, 0x06, 0x00, 0xc6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, + 0x7f, 0x06, 0x00, 0x06, 0xe4, 0xff, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, + 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00, + 0x00, 0x06, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, + 0x00, 0x06, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x3e, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0x2f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x27, 0x00, 0x00, + 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, + 0xf7, 0xbf, 0x8e, 0xfc, 0xdf, 0xf8, 0x9d, 0xeb, 0x9b, 0x76, 0xd2, 0x7a, + 0x46, 0x30, 0xe2, 0x0f, 0xe1, 0x47, 0x55, 0x84, 0x48, 0x11, 0x84, 0x19}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagup.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagup.xbm new file mode 100644 index 0000000..6eb0d84 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/flagup.xbm @@ -0,0 +1,27 @@ +#define flagup_width 48 +#define flagup_height 48 +static char flagup_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00, + 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00, + 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00, + 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00, + 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00, + 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00, + 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00, + 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00, + 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00, + 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, + 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00, + 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00, + 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00, + 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00, + 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a, + 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a, + 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a, + 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, + 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, + 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a, + 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a, + 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a, + 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/gray25.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/gray25.xbm new file mode 100644 index 0000000..b234b3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/gray25.xbm @@ -0,0 +1,6 @@ +#define grey_width 16 +#define grey_height 16 +static char grey_bits[] = { + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.25 b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.25 new file mode 100644 index 0000000..b234b3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.25 @@ -0,0 +1,6 @@ +#define grey_width 16 +#define grey_height 16 +static char grey_bits[] = { + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, + 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.5 b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.5 new file mode 100644 index 0000000..3768889 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/grey.5 @@ -0,0 +1,6 @@ +#define grey_width 16 +#define grey_height 16 +static char grey_bits[] = { + 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, + 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, + 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/letters.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/letters.xbm new file mode 100644 index 0000000..0f12568 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/letters.xbm @@ -0,0 +1,27 @@ +#define letters_width 48 +#define letters_height 48 +static char letters_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, + 0x00, 0xfa, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, + 0x00, 0x3a, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2e, + 0xe0, 0xff, 0xff, 0xff, 0xff, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, + 0xa0, 0x03, 0x00, 0x00, 0x70, 0x21, 0x20, 0x00, 0x00, 0x00, 0x50, 0x21, + 0xa0, 0x1f, 0x00, 0x00, 0x50, 0x21, 0x20, 0x00, 0x00, 0x00, 0x70, 0x21, + 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21, + 0xfa, 0x01, 0x00, 0x80, 0x0b, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0a, 0x21, + 0xba, 0x01, 0x00, 0x80, 0x0a, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0b, 0x21, + 0x3a, 0x00, 0x00, 0x00, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21, + 0x02, 0xc0, 0xfb, 0x03, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3f, + 0x02, 0xc0, 0xbd, 0x0f, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x02, 0xc0, 0x7f, 0x7b, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x02, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, + 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/noletter.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/noletter.xbm new file mode 100644 index 0000000..5774124 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/noletter.xbm @@ -0,0 +1,27 @@ +#define noletters_width 48 +#define noletters_height 48 +static char noletters_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, + 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, + 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01, + 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x07, + 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x78, 0x0e, + 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x1c, + 0x38, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x38, 0x00, 0x00, 0x80, 0x07, 0x38, + 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x1c, 0x04, 0x00, 0xe0, 0x41, 0x70, + 0x1c, 0x04, 0x00, 0xf0, 0x40, 0x70, 0x1c, 0x74, 0x00, 0x78, 0x4e, 0x70, + 0x0e, 0x04, 0x00, 0x3c, 0x4a, 0xe0, 0x0e, 0x74, 0x03, 0x1e, 0x4a, 0xe0, + 0x0e, 0x04, 0x00, 0x0f, 0x4e, 0xe0, 0x0e, 0x04, 0x80, 0x07, 0x40, 0xe0, + 0x0e, 0x04, 0xf8, 0x0f, 0x40, 0xe0, 0x0e, 0x04, 0xe0, 0x01, 0x40, 0xe0, + 0x0e, 0x04, 0xf8, 0x00, 0x40, 0xe0, 0x0e, 0x04, 0x78, 0x00, 0x40, 0xe0, + 0x0e, 0x04, 0xfc, 0xf3, 0x40, 0xe0, 0x1c, 0x04, 0x1e, 0x00, 0x40, 0x70, + 0x1c, 0x04, 0x0f, 0x00, 0x40, 0x70, 0x1c, 0x84, 0x07, 0x00, 0x40, 0x70, + 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x38, 0xe0, 0x01, 0x00, 0x00, 0x38, + 0x38, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x78, 0x00, 0x00, 0x00, 0x1c, + 0xf0, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0xe0, 0x1e, 0x00, 0x00, 0x00, 0x0e, + 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07, + 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01, + 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, + 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/pattern.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/pattern.xbm new file mode 100644 index 0000000..df31baf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/pattern.xbm @@ -0,0 +1,6 @@ +#define foo_width 16 +#define foo_height 16 +static char foo_bits[] = { + 0x60, 0x06, 0x90, 0x09, 0x90, 0x09, 0xb0, 0x0d, 0x4e, 0x72, 0x49, 0x92, + 0x71, 0x8e, 0x8e, 0x71, 0x8e, 0x71, 0x71, 0x8e, 0x49, 0x92, 0x4e, 0x72, + 0xb0, 0x0d, 0x90, 0x09, 0x90, 0x09, 0x60, 0x06}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/tcllogo.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/tcllogo.gif new file mode 100644 index 0000000000000000000000000000000000000000..4603d4ff417d9ec1cc1ba3c0d1eeec29120a3f8d GIT binary patch literal 2341 zcmbu7{XdlX8ppq$AF{I}#1t}vjX@{w9%f?NQRAtER>qJbbnBJFK{-0ksl`Zx)TE-D zvL0)iG>J{5(;BQM?nG4Da#EhM#a5f@RIl!H-TsC1eZA&~>%P9<&-MO%uJH@-*A_&_Z-_bQ@|o7>*-4Nbm<^p~5g6Ly#-j1qx{52*VNN z2uVW#zy;SKXmATrLLPt#uOSX#0>j`Cs6h;%;U!=J2Mh*nkVf>1=-beS8V-VuL6G1N z#zKW5L@#iD{WQh=M(KUdFNubl&z)ZHe3Uffd^+^D=MB@y^B(Bs&tuUJ<|lzP{2gFR z5FU7%MQ8+}HiVQ2$q>pwC=4MHLL7ul0ptH@&(6+{jEuCkwJDWKnM{_Ekr5UaCK8D_ z9FD0et?ddw7!{9@A%(OIt^FG+)lx$sy*{P!+)P}OWqL{-(xamv|+40bI!q5 zC>+T4Il@Xu5v?Aw-qICu+C*x5+guHAC&kF?V`BoDyiGGn2Z#VbpQ#wyE*9JYvjVUjLKJ9}{0B zuXmT$Ev?vLUDed9(aUK$IFqKYezeKnFJ*gW_w3osx#p{DnIG@<|MS>T!^qx0e9zqK z%(QqB<-D(S!I5yvAk92WVE5=+vO)jI`FD>!)6Rci-D#VZ8LS-IEC1@|ZKKFvq?>Sm z+HR|bhF4Q*F_RQ#i})#5Eq6V#*%B_ObyBcBwpZ?YDl|==Ba+=C_Gbx<_9)n_g!?`r zvh4fagQkWGd38abJbQDYo?3A#?v~9Pl*d~uCE1=GC!_KOJKx7jgxrY8JReoZAfrlc zIT3W_o0U?T&f9%LTOY3GdC)3z;Ye0uu{h+1>{a4e#`}}gCdC@Ps&fe*Z-?rHDf(9G zAVYaXEw{-zqr9SXM7*KK(|rwdTj9>>vO`WK7vh*f>eFS3tK`FB-Y50_hU>nyDi~v* z>4_<24E#!+zn>YMzn>e(2+1GgD(%J+ZJEB|+kW&ENL(U?^(i%H`*gM2O>&Z2PhK&s z^oh10mBT&_7nA0mML(FV+|yh)QTec@t0&&FCBf#nR7I*fOf$Vr%9aPpOlu{Q*^b01 z_QKA^}ED~f9%P7)u{Q{W*qS0(~x_H z=DGjIj!)LY%aY=+B_-U&w#C66Vy}?KVD~kp54bLoT4|MW0|kweVVi0;b6BYemTo(> zi(SYAedf#HL*~)+EMpfJnM~(wy~f*Dqxu|w zKUhKecMGnowEaaI&UoCAQdM04%ZJyu#=H+FhAHw25|q^f3&ovKHI<*9tCRoms;l!{ z`=^gX6`nDN@;(n;bG2hl9bgV^G-|zmT-M)OZ=uy6)bO8mf0j#4j5#OTinx(iE=!*F zke3-ie%F(^^M26b|%Uvsy5|A@g(SfYtc<)(Tf<#J68|eB63c zT3S_?kP)znG48vpN8NpJqZV7ovPP;q(U&&ZWbmo)d3jE~JchMa#E>UA+Kt+0?dC^Z zpd8F|!>o?*i+0cUU&Xg@x}+O6=u3m-0iz4=3;4XujiEbeK07 zb;P3e(u*w4iquE{&U%e>e@=}QtUo&0qir3nKh2x?jpdf{+Q4t-dv8SC60e8eLw&4gX>r zLiLvRD+Nz(6h(7#%{5+Tyf4O7l>lG^{xdGn@&N*Cc zHw)(x+0!|~o0U4>(#y>l6m$=$>kbVoj_!eaYr|tah8= zzlv*G_-N)*JU1b!R;pj^*QgTNdsNCq@u!*9GLeI$^X-6;g%+3b)r~BpOFF&_yvmJ- Q-#541xs+_MkcmA12d>*S0{{R3 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/images/teapot.ppm b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/teapot.ppm new file mode 100644 index 0000000..b8ab85f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/images/teapot.ppm @@ -0,0 +1,31 @@ +P6 +256 256 +255 +\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[7 eOLjQLmSMoTMnSMlRMhPL_9 \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀnSMtVMzYN~[N~[N\N\O€\O€]O€]O€]O€]O€\O€\O}[NyYNtVM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-wXN}[N€]O„^O†_O†`O‡`Oˆ`Oˆ`OˆaO‰aO‰aO‰aO‰aO‰aO‰aOˆaOˆ`O†_Oƒ^O\N \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaMLyYN…_O‰aP‹bPcPŽcPŽdPŽdPdPdPdPdPdPdPdPeP‘eP’eP’eP‘ePdPcP…_OpUM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN…_OdP“fP•gQ–hQ˜hQ˜iQ™iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœjQœjQœjQ›jQœjQ™iQ“fP‡`O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJiQL‹bP—hQkQ¡mR¤nR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦pR¨pS©qSªqS«rS¬rS«rS©qS¤oRœjQ€]O\KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀfOLrUMcPŸlR©qS¯tS²uTµwT·xT¸xT¹yTºyT»zT»zU¼zU¼zU¼zU»zUºyT¸xT¶wT¯tS¡mR‰aOhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àa0 cNLqUM€\O”fQ¦pS²wVºzV¿|VÂ}VÄVÆVǀVɂW̅[Տeæ w÷³‹êª…Ĉg§qT“fQ{ZNYIK9\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀO1{G#‘JkRMqUMtVN–iS¨v\·€d¹bµzZ±vU°uT®sSªqS¤nRœjQ’eP„^OrUMHh>!T4\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-V5wE"~I#†M%U+¥e7²l:°g2®b*­a(­`(©^(¥])¡^-›]1ŠS,qC$`9 R3G-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@)J/i>!pA"tD"wF$yH&xH&tE$wE#yG%}M+ƒT4S5mE*Z7!K/B*;'\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‰aO¦oR½{UǀVυX<(F-a: e!j@#k@$h>"dµf-¨^(¡Z'šW&–T&œN>)F-J/b; g>#nD(jB&c y< u: r9 o7 l6 +j5 +h4 +g3 +5$D,K/b; h>"wM1tK.e="a<#cA,U8&E-<(9&.!a0 b1 c1     + ++3#@)46G<:HMCIXHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀU*´vT¿~X¸{YÃk+›W&‰N$|> u: p8 k5 +f3 +a0 _/ ]. [- I¡\*ª_(‘LkRMmSMmSMnSMnSMD,R3W5mA"|O0|P1j?"c!a: X/K%&4$+2F=;HPEJL&\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸlR¶xT­sTµd)ŠO$w; m6 +g3 +a0 Z- \/ T*Q(ŠHµm8kRMmSMnTMoTMpTMpUM15G15G05G04G04GpUMpTM5^9 d!Y0W+]. s=‡M$dPŸlR\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀoTM¥oRdPvE"V+K%A 99†F¤['qUMtVM99H:9H:9H:9H:9H:9H:9H:9H:9H:9H99H99H99H99H99H99H:9H;:H>;HB=HPDJ\JKmSMwXN|ZN°y[ᦆ֘uº{W¹yU¿€]Á„b­tU£nR—hQˆaO{ZNvWNtVMvXNwXNyYNzYN{ZN|ZN}[N}[N~[N~[N~[N~[N~[N~[N~[N}[N}[N{ZNzYNxXN…L$f3 +I$L&P(U*\. €J#\O›jQ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀžkR‰aOo9 L&C!:4f3 +X&pUMuWMwXNxXN<:H<:H<:H<:H<;H<;H<;H<;H=;H=;H=;H=;H>;H>;H?HG@ILBIREJ[JKcNLjQL§pR±uTºzUÃ~VȁW˂X֎cäsҎe¼{V²vT¨pSžkR•gQŒbP†_O‚^O]O€\O€\O€\O€\O€]O]O]O]O]O]O]O]O]O]O]O€\O€\O~\N}[N|ZNxXN•T%H$G#K%Q(W+zG#nTM˜iQ\À\À\À\À\À\À\À\À\À\À\À\ÀdOLrUMuWNwXNyYN{ZN}[N{ZNwXNsVM \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àˆ`OcPnA"M&@ 8F#m6 +›W&rVMvWNyYNzYN|ZN}[N}[N>HE?IG@IIAIKBIODJSFJWHK—hQŸlR§pR°b(¾i*Én+Ù|7Û|6Ïr,Íq+Êp-Ãl+»g)±b(®sS§pS lRšiQ•gQePcPŠaPˆaO‡`O‡`O†_O†_O…_O…_O…_O…_O…_O…_O…_O„_O„^O„^Oƒ^Oƒ^O‚]O]O€\O~[N{ZN•T%F#B!Y,L&U*~I#„^O†`O\À\À\À\ÀcNLrUMzYN\O„^Oˆ`OŠbPŒcPdPeP’fP“fP“fQ“fQ”fQ‘ePcP‰aP~[N\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’fPsVM^/ C!7 ŽQ%tVMwXNzYN|ZN}[N\N\O€\O]O]O‚]O‚]OA=HB=HB=HB>HC>HC>ID?IE?IF@IG@IIAIKBIŒcPdP’eP–gQšiQŸlR£nR¤\'´d)¿i*Æm+Îs/Ïs/Êo+Én+Ål*¾i*ºg)³c(ª_(ªqS¦oR¡mRkQ™iQ•gQ“fP‘ePŽdPcPŒbP‹bPŠbPŠaP‰aP‰aO‰aOˆaOˆ`Oˆ`O‡`O‡`O‡`O†`O†_O…_O„^Oƒ^O‚]O\O}[N›QD"?D"K%_/ kRL’fPODJSFJ†_OŠbPŽcP‘eP“fQ–gQ™iQœjQžkR lR¡mR£nR¤nR¥oR¥oR¥oR¤nR¢mRŸlRšiQ‘eP…_O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀB+‘ePI#L&90y< šPxXN{ZN}[N\N€\O]O‚]Oƒ^Oƒ^O„^O„_O…_O…_O†_O†`O‡`O‡`Oˆ`O‰aOŠaP‹bPŒbPcPŽdP‘eP“fP•gQ˜hQšiQžkR¢mR¡Z'«_(¶e)½h)Âk*Çn,Çn,Æm*Æl*Áj*ºf)¶e)²c(«_(¦]'§pR¤nR¡mRžkR›jQ™iQ–gQ”gQ“fP‘ePdPdPŽdPŽcPcPŒcPŒbP‹bP‹bP‹bPŠbPŠaP‰aP‰aO‰aOˆ`O‡`O†_O…_Oƒ^O]Oª_(@ B!I$B!N'w=‘eP`LKbNLeOLkR mR£nR¥oR§pSªqS¬rS®sS¯tS°tS°tS±uS±uS°tS¯tS­sSªrS§pS¢mRšjQŒbPjQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‹bPpTME"5‡M$tVM{ZN}[N\O]O‚^Oƒ^O„_O…_O†_O†`O‡`Oˆ`Oˆ`O‰aO‰aPŠaPŠbP‹bPŒbPcPŽcPdPdP’eP“fP•gQ—hQ™iQ›jQkR lR¢mR¡Z'¬`(µd)ºg)ÇgÀj*Àj*¾i*¿i*»g)µd)²c(¯a(ª_(¤\'§pR¥oR¢nR mRžkRœjQšiQ˜iQ—hQ•gQ”gQ“fP’eP‘eP‘ePdPdPdPŽcPŽcPcPcPŒcPŒbP‹bP‹bPŠbPŠaP‰aOˆ`O†_O„^O\NœQ@ <G#_LKŽcPlSMnTMpUMsVM°tS²uT³vTµwT¶wT¶xT¶xT¶wTµwT´vT²uT¯tS¬sSªqS§pS¤oR¢nRžkR˜hQ‹bPeOL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN\NJ%01ŽJvWN}[N\O]Oƒ^O…_O†_O†`O‡`Oˆ`O‰aO‰aPŠaPŠbP‹bPŒbPŒbPcPŽcPŽdPdPdP‘eP’eP”fQ•gQ–gQ˜hQ™iQ›jQkQŸlR¡mRžY&¦]'­`(³c(·e)Àc¸\¸\¹\º]»]¶^®a(¬`(©^'£['¢['¥oR£nR¡mR lRžkRœkQ›jQšiQ˜iQ—hQ–gQ•gQ”gQ”fQ“fP’eP’eP‘eP‘ePdPdPdPdPŽdPŽcPcPcPŒbP‹bPŠaPˆaO†`O]O˜OG#7F#uWMƒ^OwXNxXNzYN{ZN|ZN¹yT¸yT·xT´wT±uT­sS¨pS¡mRœjQ•gQdPŒbP‰aP‰aPŒbPŽcP‘ePcP|ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[JKŠbP^/ 1 01|> wXN}[N]Oƒ^O…_O‡`O‡`OˆaO‰aPŠaP‹bP‹bPŒbPŒcPcPŽcPŽcPdPdPdP‘eP’eP“fP”fQ•gQ–gQ—hQ˜hQ™iQ›jQœkQžkRŸlR mRžY&¦]'­`(±b(·[ÇgÉiÉhÅfÂdÃe¿c«Uª_(§]'£[' Z'¤nR£nR¡mR mRŸlRžkRkQœjQšjQšiQ™iQ˜hQ—hQ–gQ•gQ•gQ”fQ”fQ“fP“fP’eP’eP‘eP‘ePePdPdPdPŽcPcPŒbPŠbPˆ`Oƒ^O‰D 4M&dPnSM|[N|[O|[OzZOxXNªrS¢nR˜hQŽcPƒ^OvXNiQL^KKRFJMCJJAIKBISFJ\JKnSMxYN†_O€\OaMK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀB!qUMŠaPC!/00a0 uWN}[N‚]O…_O†`Oˆ`O‰aPŠaP‹bPŒbPŒcPcPŽcPŽcPdPdPdP‘eP‘eP’eP“fP“fQ”fQ•gQ–gQ—hQ˜hQ™iQ™iQ›jQœjQkRžlRŸlRœX&¢['¨^'¬`(´ZÂdÄfÈiÆgÂd¿c¿c¼a¸_©T¥\'£[' Z'ŸY&£nR¢mR¡mR lRŸlRžkRkQœjQ›jQšjQšiQ™iQ˜hQ—hQ—hQ–hQ–gQ•gQ•gQ”gQ”fQ”fQ“fQ“fP’fP’eP‘eP‘ePdPdPŽcPŒbP‰aOƒ^Ox< :ŠaP]Oj8sVMmSMfOL^KKUGJIAIQEJ?IeZY638*  B\À\À\À\À\À,  4 .G1!\TU¡ƒrsVM{ZN`MK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[JKyYNŒbP/0ˆN$]O…_Oˆ`O‹bPŒbPcPŽcPdPdPdP‘eP‘eP’eP’fP“fP“fQ”fQ”gQ•gQ–gQ–gQ—hQ—hQ˜hQ™iQ™iQšiQ›jQœjQœkQkRžkRŸlRœO¡Z'¥\'©^'­V¼a¾bÁeÆi!Ãf¾b»a¹`·_³]²\µZ¢[' Z'ŸY&œQ¡mR¡mR mR lRŸlRŸlRžkRkRkQœkQœjQ›jQ›jQšjQšiQšiQ™iQ™iQ˜iQ˜hQ˜hQ—hQ—hQ—hQ–hQ–gQ–gQ•gQ•gQ”fQ’fPdPcPšW&dPŠaPrUM + B\À\À\À\À\À\À\À\À\À\À%7!!C*F#P) {dYœze»p€\OgPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ`LKvWNŠaPm6 + X,uWM‚]O‡`OŠbPcPŽdPdPdP‘eP’eP’fP“fP“fQ”fQ”gQ•gQ•gQ–gQ–gQ—hQ—hQ˜hQ˜iQ™iQ™iQšiQ›jQ›jQœjQœkQkQžkRžlRŸlR¢Z'¤\'§]'·_¹`¼a½bÁeÅi"Áe¼aº`·_¶_²]²\±\«Y¡Z' Z'¡Z'¡mR¡mR mR lR lRŸlRŸlRžlRžkRžkRkRkQœkQœjQœjQ›jQ›jQ›jQšjQšiQšiQšiQ™iQ™iQ™iQ˜iQ˜hQ˜hQ—hQ–gQ•gQ“fQdP†_Oq8 –gQˆ`OuWM”T%\À\À\À\À\À\À\À\À\À\À B B!!T,c5ƒF‚T3ț~Ɠqƒ^OfOL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXHK_LKsVM‡`OcP ’S%]OŠbPcPdP‘eP’eP“fP“fQ”fQ”gQ•gQ•gQ–gQ–gQ—hQ—hQ—hQ˜hQ˜iQ™iQ™iQšiQšiQ›jQ›jQœjQœjQkQkRžkRžlRŸlRŸlR¥\'¦]'¨^'­Vº`»a½bÁfÄi"Àe»a¹`·_¶_³]±\±\¤R¢Z'¢Z'£['¡mR¡mR¡mR¡mR mR lR lRŸlRŸlRŸlRžlRžkRžkRkRkRkQkQœjQœjQœjQœjQœjQ›jQ›jQ›jQ›jQšjQšiQ™iQ™iQ˜hQ–gQ‘eP§Sq8 ‰aO•gQ‡`OtVMœX&\À\À\À\À\À\À\À\À\À\À B B B l@!{A…L$›Y'½†a“fPˆaO]KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀODJ[JKaMKqUM\OcPƒ^OvE"‚]OŠaPdP‘eP“fP”fQ•gQ•gQ–gQ–hQ—hQ—hQ˜hQ˜hQ˜iQ™iQ™iQ™iQšiQšjQ›jQ›jQœjQœjQœkQkQkRžkRžkRŸlRŸlRŸlR lR©^'©^'ª_(®W»a¼a¾cÂg Äi"¿e»a¹`·_¶_³^±\±\¤R£['£['§]'¢mR¢mR¡mR¡mR¡mR¡mR mR lR lR lR lRŸlRŸlRŸlRŸlRžlRžlRžkRžkRžkRžkRkRkRkRkRkQkQkQœjQœjQšiQ˜hQ’ePšW&M&oTMšiQ‘eP…_OtVMmSMdOL\À\À\À\À\À\À\À\À\À B B B ‘J Z'ª_(œkQ™iQ‡`OSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTFJ\JKcNLlRMzYN‡`O’ePzZN \Nˆ`OdP“fQ•gQ–gQ—hQ˜hQ˜hQ™iQ™iQ™iQšiQšiQšiQ›jQ›jQ›jQœjQœjQœjQœkQkQkRžkRžkRžlRŸlRŸlRŸlR lR lR mR®a(­`(¬`(¶[½a½b¿dÃh!Äi"¿d»a¹`¸_¶_µ^²]³]¦S¤\'§]'«_(¢nR¢mR¢mR¢mR¢mR¢mR¢mR¡mR¡mR¡mR¡mR¡mR mR mR mR mR lR lR lR lR lR lR lR lR lRŸlRŸlR lRŸlRžkRœkQ™iQePt: kQ˜hQcP€]OtVMlSMa2 \À\À\À\À\À\À\À\À\À B B +$5 ¬`(¶e)£nRœjQƒ^OJAI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXIK^KKdNLhPLuWM‚]OŒbP”fQeP m6 +†`OŽcP“fQ—hQ˜hQ™iQšiQšjQ›jQ›jQ›jQœjQœjQœjQœkQkQkQkRžkRžkRžkRžlRŸlRŸlRŸlR lR lR lR¡mR¡mR¡mR¡mRºg)³c(²c(±b(­V¿cÂeÅi!Åi!Àd¼bº`¹`·_·_¶^¢Q§]'ª_(­`(¹f)£nR£nR£nR£nR£nR£nR£nR¢nR¢nR¢nR¢nR¢nR¢nR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR¢mR¢mR£nR¢mR¢mR¡mR mRkR—hQˆGa0 ŠbP mRœjQ“fQ‰aP}[NrUMmSM…L$\À\À\À\À\À\À\À\À B B #C, 8&H.Z7 §pR›jQ{ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJ[JK`LKdNLhQLqUM{ZN…_OŽcP–gQ—hQ +‹bP‘eP–hQšiQ›jQœjQkQkQkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlR lR lR lR mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢nR£nRÀj*ºg)·e)¶d)Âd°XÅgÅhÂe¿c½b½b¾bªU­`(®a(¯a(³c(¾i*¤oR¤oR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¥oR¥oR¤nR¡mR›jQŽQ%Z- œjQ£nRŸlR—hQŽdP…_OuWMpTMnSMkRLa: \À\À\À\À\À\À\À B B&D2 @*S6#G@IPDJ˜hQmSM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ]KKbMLeOLiQLlRMvWN\OˆaO‘eP—hQœjQ•gQoTM•gQ™iQkQŸlRŸlR lR mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR£nR£nR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nRÆl*Ãl+¾j+¹g)¸f)¶e)µd)¶e)¶e)·e)·e)¸f)¾i*Ìs0Ðs.¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦pR§pR§pR§pR§pR§pS§pS¨pS¨qS©qS©qS©qS¨pS©qS§pS¤nRŸlR‘I˜hQ§pR¥oR¡mRšiQ’ePŠaP€\OsVMpTMnTMlRM–X)\À\À\À\À\À\À\À B%C)D$;J/[8"LBITGJYIKWHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK_LKcNLgPLjQLlRMpUMzYNƒ^O‹bP‘eP˜hQkQŸlR”fQ- —hQ›jQŸlR¢mR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦oR¦oR¦oR¦pR¦pR§pRàpßy-Ûw-Ûw-Þy.â{-ãu§pS§pS§pS§pS§pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨qS©qS©qS©qS©qS©qS©qS©qSªqSªrS«rS«rS¬rS¬rS¬rS¬rS¬sS«rSªqS¦oRšiQ™iQ©qSªqS§pR¡mRœjQ•gQcP„_O{ZNtVMpUMoTMmSMjQL_9 \À\À\À\À\À B "C(D#*A$[<)dI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JKaMKeOLhPLkRLmSMoTMuWM}[N…_O‹bP’eP˜hQžkR¢mR£nRžkR!-EkR¡mR¤nR¥oR¦pR§pR§pS§pS§pS§pS§pS§pS§pS§pR§pS§pS§pS§pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨pS¨qS¨qS¨qS©qS©qS©qS©qS©qS©qS©qS©qS©qS©qS©qSªqSªqSªqSªqSªrS«rS«rS«rS«rS«rS«rS¬rS¬rS¬rS¬sS­sS®sS®sS¯tS¯tS¯tS¯tS°tS°uS°tS®sS«rS£nR¦oR®sS­sS«rS§pR¢mRœjQ–gQdPˆaO\OyYNuWMqUMoTMnSMkRLo8 \À\À\À\À\À B'D+E$(1 J/jH1NCJUGJYIKUGJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXHK]KKbNLfOLiQLkRMmSMoTMqUMxXN\N†_OŒbP’fP˜hQkQ¡mR¥oR§pS¦pR˜hQ¢mR¥oR¨pSªqS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rSªrSªrSªrS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS«rS¬rS¬rS¬rS¬rS¬rS¬rS¬rS¬sS¬sS­sS­sS­sS­sS­sS­sS®sS®sS®sS®sS®tS¯tS°tS°uS±uS±uT±uT²uT²uT²uT´vTµwT´vT³vT²uT¯tS¢mR¯tS±uT±uS®tS«rS§pR¢mRkQ—hQ‘ePŠaPƒ^O\N{ZNvXNqUMpTMnSMlRMP%\À\À\À\À B#C*E$.E- .!G$Y:%d<"SFJYIKZIKNCJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀPDJZIK_LKdNLgPLjQLlRMnSMpTMqUMuWMyYN€\O†`OcP’fP—hQœjQ¡mR¥oR¨qS«rS«rSªrS mR«rS­sS¯tS°tS°tS°tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS®tS®sS®sS®sS®sS®sS®sS®sS®sS®sS®tS®tS®tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS¯tS°tS°tS°tS±uS±uS±uT²uT²vT³vT³vT´vT´vT´wTµwTµwTµwT·xT·xT¸xT¸yT¸yU·xU¥\'©qS³vTµwTµwT´vT±uT®tTªrS¦oR¡mRkQ˜hQ’eP‹bP‡`Oƒ^O€\O|ZNxXNtVMpTMoTMmSMjQLh7\À\À\À B(D"-E*1F, 4#K)pL5PEJWHK[JKXHK:9H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUGJ\JKaMLeOLhPLkRLmSMoTMpUMrVMvWNyYN|ZN]O‡`OŒcP‘eP—hQ›jQ lR¤nR§pSªqS­sS¯tS°uS¯tS­sS mR^/ ²vT³vT´vT´wTµwT´wT´vT³vT´vT´vT´vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT³vT´vT´vT´vT´vT´wTµwTµwTµwTµwT¶wT¶wT¶xT·xT·xT·xT¸xT¸xT¸xT¹yTºyT»zU¼zU½{U½{V½|V•gQ¬rSµwT¸xT¹yU¹yU¹zV·yVµxV±vU­tT©qS¥oS mRœjQ—hQ’ePcPŠbP‡`O„_O]O}[NyYNuWMpUMoTMmSMkRL}H#\À\À &D -E(1F/!2#8 W7"iA&UGJ[JK\JKREJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMCIXIK^KKcNLfOLiQLkRMmSMoTMqUMsVMwXNzYN}[N€\Oƒ^O‡`OŒbP‘eP–gQšjQžkR¢mR¥oR©qS¬rS¯tS±uS³vT´vTµwT´wT²uT­sS lR«_(¹yT¹yTºyTºyTºyTºyTºyT¹yT¹yT¸yT¸xT¸xT¸xT¸xT¸xT¸xT¸yT¸yT¸yT¸yT¹yT¹yT¹yT¹yT¹yT¹yT¹yTºyTºyTºyTºyTºzT»zT¼zU¼{U½{U¾{U¾|U¿|UÀ}VÁ~VÂWÀY™iQ«rSµwT¹yT¼zU½|V¿}XÁ€Z]Á]¾€]»~[¶zY±wW¬tU¨qS¤nSŸlR›jQ–gQ“fPePŽcP‹bPˆ`O…_O‚]O~\NzZNvXNqUMoTMnSMlRMiQLg=!\À +!C+E'0F.4F7%8%U/lG.SFJZIK]KKZIKB=H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀREJZJK`LKdNLgPLjQLlRMnSMpTMqUMtWMxXN{ZN~[N]O„^O†`O‰aO‹bPdP•gQ™iQœkQ lR¤nR§pSªrS­sS¯tT²uT´vT¶wT·xT¹yT¹yTºyTºyT¹yT¶xT´vT¬rS¢nR—hQ¿|U¿|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ}UÀ}UÁ}UÁ}UÁ}UÁ}UÂ}UÂ~UÃ~UÃ~VÃ~VÄVŀWƁX®a(ŸlRªrS´vT¸yT¼zU¾|UÁ~VÃXƂ[Ɇ_΋dӑjԓmԓnБlʌhĆd½_¶{[°vWªsU¦pS¢nRžkRšiQ˜hQ•gQ“fQ‘ePdPŒbP‰aO†_Oƒ^O€\O|ZNxXNsVMpTMnTMmSMjQL€C B)D&/F-3F47G6%>" Y7 kA$YIK]KK^KKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\KKbMLeOLhPLkRLmSMnTMpTMrUMuWNyYN|ZN\N‚]O„_O‡`OŠaPŒbPŽcPeP“fP—hQ›jQžlR¢nR¥oS©qT¬sT¯uU²vU´wV¶xV¸yV¹yUºzU»zU¼{U½{U¾{U¾|U¿|U¿|U¿|U¿|U¾{U½{U¼{U¼zU»zTºyT¹yT¸xTµwT³vT´vT´vT´vT´wT´wTµwT·xT¹yTºzT¼zU½{U¾{U¿|UÀ|UÂ}UÄVŀWǂYɄ\͈_ьdٔláuç£|쩂ſt명榁ޟ{՗sˎl†d¹^³yZ­uW¨qU¤oSŸlRžkRœjQšiQ˜hQ–gQ”fQ‘ePdPcPŠaP‡`O„^O]O}[NyYNuWMpTMoTMmSMkRLgPL&D#.E,3F46G;'<(D"iB(VGJ]KK`LK[JKB>H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRMmSMoTMqUMsVMvXNzYN}[N€\O‚^O…_Oˆ`OŠaPŒcPdP‘eP“fQ•gQ—hQ™iQkR mS¤oT¨rU¬tW°wY´zZ¸}\»]¾€^À^Á‚^‚^\Á€ZÁYÁXÁ~WÁ~WÂ~VÂ~VÂ~VÃ~VÃ~UÃ~UÄ~UÄ~UÄUÄUÅVÅVÅVÅVÆVƀVƀVǀWǁWȂXɃZ˅[͇^ЊaӍdؒiܗnâtè£zó¯‡ø´û¸‘üº“û¹“÷¶ñ±Œé©…à¡~֘vˏmÇf»€`´z[®vX©rU¥pT£oS¢nS lRžkRœkRšjQ˜iQ–hQ”fQ’ePdPcP‹bPˆ`O…_O‚]O~[NzYNvWNpTMoTMnSMkRMhQLo7 ,2F36G99HC+@ ]8 nA"\JK`ML_LKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_OˆaO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRžlR mS£oU§rW¬vZ²{]¹€a¿…fŊjˏnГqӕsՖsՖrՖqՔoӒmяjύg͊cˈaɆ^Ȅ\ǂ[ƁYŀXŀWÅWÅWÅVÅVÅWŀWƀWǁXȂYɃ[ʅ\͇_ϊaҍeՑhٕmݙqávä¡zç¤}꧀멃몄騃奀ߠ|ٛwӕȑmƉh¿„c¸~^²yZ®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRœkR›jQ™iQ—hQ•gQ“fPePŽcP‹bPˆaO…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQL~I#26G99G?IQ2P+XHK_LLfQOcNLXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À©qSºyTÃ~VΈ`遲ޜv¾€]ªqS–LŽG|> g3 +S)?*%.—hQ—hQ‘eP‡`OuWM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMoTMqUMsVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽdP‘eP“fP•gQ—hQ˜iQšjRœkRŸlS¡nT¤pV§sX«vZ°z^¶b¼…gËmʒsјz؟€Þ¤…㩊譍ꯏ및ꯎ謋娇ं۞|֙wѓq̎lljgÅbÀ‚_½\»}Zº{X¹zW¸yV·yU·xU·xU·xT·xT·xU·xU·xU·yV·yV·yW¸zW¸{X¹{Y¹|Zº}[º}[º}\º~\¹~]¹~]¸}]·|\µ{\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS¡mRŸlRkRœjQšiQ˜hQ–gQ”fQ’ePdPcPŠbP‡`O…_O‚]O~[NzZNvWNrUMoTMmSMlRMiQLeOLJAIJ(h>!]KKfQOgQN_LKD>I\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À™iQ°tS¸yT¼{UÂYΌeרּô´Õ—u¶|\ Z'™LˆD |> ’eP¦oR¨qS¦oR¡mRšjQ‘eP„^OhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀWHJ\KKaMLeOLhPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_Oˆ`OŠbPcPdP‘eP“fQ•gQ—hQ™iQ›jRkRŸmS¢nT¤qV¨sX¬w[±{_¶€c½†hČn˒tҙz؟€Þ¥…㩉筍ꯎꯎꮍ竊䧆ߣÛž|՘vГpˎkljfÅbÀ‚_½\»}Yº{X¸zW¸yV·xU·xU·xT¶xT¶xT¶xU¶xU·xU·xU·yV·yV·zW¸zX¸{Y¹|Y¹|Z¹}[¹}[¹}\¹}\¸}\·}\¶|\µ{[³zZ²yZ°wY®vX¬tWªsV¨rU¦pT¤oS£nS¡mRŸlRžkRœjQšiQ˜hQ–gQ”fQ’ePdPŽcP‹bPˆ`O…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQLfOLJ(V.]KKePNkUQcNLQEJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‚]O¡mR©qS¬rS°tS³vTµwT·xUº{WĆbғqךxʏo +K«rS´vT¶wT´vT²uT®sSªqS¤nRkQ•gQˆ`OuWNY,\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^KKbNLfOLhQLkRLmSMoTMpUMrUMuWMxXN{ZN~[N]O„^O†_O‰aO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRkRŸmS¢oT¥qV¨tX­w[±|_·d½†iČn˓tҙz؟€Þ¥…㩉笌鮎ꮎ魌檉㧅ߢ€Ú{՗uϒpˍjƈf…b¿^½\»|Y¹{X¸zV·yV·xU·xU¶xT¶xT¶xT¶xU¶xU¶xU¶xU·yV·yV·yW¸zW¸{X¸{Y¸|Z¹|Z¹|[¹}[¸}\¸}\·|\¶|[µ{[³zZ±xY°wX®vX¬tWªsV¨rU¦pT¥oS£nS¡mRŸlRžkRœjQšjQ˜iQ—hQ”gQ’fPdPŽcP‹bP‰aO†_Oƒ^O€\O|ZNxXNtVMoTMnSMlRMjQLgPLzG#\JKcOMoXUgPMZIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À’fP”gQ•gQ—hQ™iQkQ lR¤nR§pRªqS¬sS¯tS:"r<zYN­sS¹yT¾|UÁ~WƄ^ˊeˋgƈe¾‚aµz[­tV¦pS¢mRkQ–gQŠbPzYNkRL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀRFJZJK`LKcNLfPLiQLkRMmSMoTMqUMrVMvWNyYN|ZN\N]O„^O‡`O‰aO‹bPcPdP’eP”fQ–gQ—hQ™iQ›jRlR mS¢oU¥qV©tY­x\²|`¸d¾‡iōo˓uҙ{ٟ€Þ¥…㩉笌鮍鮍謋婈⦄ޡٜzԗtϑoʌjƈe„a¿^½~[»|Y¹{X¸zV·yV·xU¶xU¶xT¶xT¶xT¶xT¶xU¶xU¶xU¶xV·yV·yW·zW·zX¸{Y¸{Y¸|Z¸|Z¸|[¸|[·|[·|[¶{[´z[³yZ±xY°wX®vW¬tWªsV¨rU¦pT¥oS£nS¡mRŸlRžkRœkRšjQ™iQ—hQ•gQ“fP‘ePŽdPŒbP‰aP†`Oƒ^O€]O}[NyYNuWNqUMnSMlSMkRLhPLcNLbNLpYVlUP`LK>;H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À›jQ‡`O{ZN©^'¨^'­`(·e)½h)Ãk*Êo+±b(£nRºyTÃ~UǁXҍdãŸwò°‰ñ°‹è©…ÝŸ}Ԙvȍm¾„eµ}_®x[°y\®x[«tW§qT¡mRœjQ–gQ‹bP}[NlRM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\JKaMKdNLgPLjQLlRMnSMpTMqUMsVMvXNzYN|[N\O‚]O…_O‡`O‰aPŒbPŽcPdP’eP”fQ–gQ˜hQšiQœjRžlS mS£oU¦rW©uY®x\³|`¸d¾‡jōo̓uҚ{Ù €Þ¥…㩉欋譍譌竊婇᥃ݠ~؛yӖtΑoʌjňe„a¿^¼~[º|Y¹{W¸zV·yV·xU¶xU¶xT¶xT¶xT¶xT¶xU¶xU¶xU¶xU¶xV·yV·yW·zX·zX¸{Y¸{Z¸{Z·|Z·|[·|[¶{[µ{[´zZ³yZ±xY¯wX®uW¬tVªsV¨rU¦pT¥oS£nS¡mR lRžkRœkR›jQ™iQ—hQ•gQ“fQ‘ePdPŒcPŠaP‡`O„^O]O~[NzYNvWNrUMnSMmSMkRLiQLeOLoXUu]XdOLKBI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À:9H\N–hQ¸}\¯uU­sT¯tT¯tS¨qS¤nR£nR¢nRŸlR›jQšiQ˜hQ—hQ–gQ”fQ’eP‘eP—hQœkR mS¥pUªtX«uY¨sW¦qU mS›jQ•gQƒB’S%jQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀLBIXHK^KKbMLeOLhPLjRLlSMnSMpTMqUMtVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽcPeP’fP”fQ–gQ˜hQšiRœkRžlS nT£pU¦rWªuY®y]³}`¹‚e¿ˆjŎp̔vӚ{Ù Þ¤…⨉櫋笌笋櫊䨆ंܟ~ךxҕsΐnɌiŇeÁ„a¾€^¼~[º|Y¹{W¸yV·yV·xU¶xU¶xT¶wT¶wT¶wT¶xT¶xU¶xU¶xU¶xV¶yV¶yW·zW·zX·zY·{Y·{Z·{Z·{Z¶{Z¶{ZµzZ³yZ²yY±xY¯vX­uW¬tVªsU¨rU¦pT¥oS£nS¡mR lRžlRkR›jQ™iQ—hQ•gQ“fQ‘ePdPcPŠaP‡`O…_O‚]O\N{ZNwXNsVMnSMmSMkRMiQLfOL_LKhQMUGJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À (6BFP>=DKHMqjk€trwf`~kc„ndŠqesete¯Ž{w`¡v[\N†_OcP“fP˜iQœjRŸlS£oT¦qV¥qV£oTžlR™iQº^‡`OQ%hPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJZIK_LKcNLfOLiQLkRLmSMoTMpUMrUMuWMxXN{ZN~[N€]Oƒ^O…_Oˆ`OŠaPŒcPŽdP‘eP“fP”gQ–hQ˜iQšjRœkRžlS¡nT£pU¦rWªuZ®y]³}a¹‚e¿ˆkƎp̔vӚ{ٟ€Þ¤…⨈媊櫋櫊婈⦅ߣÛž}֚xѕr͐mȋićdÁƒa¾€]¼~[º|Y¹zW¸yV·yU¶xU¶xU¶wT¶wT¶wT¶wT¶wT¶xU¶xU¶xU¶xU¶xV¶yV¶yW¶zX·zX·zY¶zY¶{Y¶{Z¶{ZµzZ´zZ³yY²xY°wX¯vX­uW«tVªsU¨rU¦pT¥oS£nS¡mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ‘ePdPcP‹bPˆ`O…_O‚]O\O|ZNxXNtVMoTMmSMlRMjQLgPLbML[JK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À%5 (6$/79CEEKjgkrc_›…{‘uf±{Ÿw_ºq]Oˆ`OŽcP”fQ˜hQ›jRžlR¡nT¢oT¡nTkR˜hQŽdP¦]'ŽQ%\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀUGJ[JK`MKdNLgPLiQLkRMmSMoTMqUMrUMuWNxXN{ZN~[N]Oƒ^O†_Oˆ`OŠbPcPdP£['µd)•gQ—hQ˜iQšjRœkRžlS¡nT£pU§rWªvZ¯y]´~aºƒfÀˆkƎp̔vӚ{؟€Ý¤„ᧇ䩉媊媉䨇᥄ޡ€Ú|՘wДȑmȊhĆdÀƒ`¾€]»}[º|Y¸zW·yV·xU¶xU¶xU¶wTµwTµwTµwTµwTµwUµwUµxUµxUµxV¶xV¶yW¶yW¶yX¶zX¶zY¶zYµzYµzY´zY´yY²yY±xY°wX®vW­uW«tVªsU¨qU¦pT¥oS£nS¢mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ’ePdPcP‹bPˆaO†_Oƒ^O€\O|[NxYNtWMpUMmSMlRMjQLgPLcNLA;=\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À#*6+.8;:AHEJmgjd\]‡pe«}œxc w^»pƒ^OŠaP‘eP–gQšiQžlR mS¢nT mS›jR•gQ»h*œX&ˆM$\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀC+WHJ]KKaMLdOLgPLjQLlRMnSMoTMqUMrVMvWNyYN|ZN\N]O„^O†_OˆaO‹bPcPžY&«_(³c(•gQ—hQ™iQšjRœkRŸlS¡nT¤pV§sX«vZ¯z^´~bºƒfÀ‰kƎp̔vҚ{؟€Ý£„ই㩉䩉䩈⧆ःܠ؜{ԗvϓqˎlljgÆcÀ‚`½]»}Z¹{Y¸zW·yV¶xU¶xU¶wUµwTµwTµwTµwTµwTµwTµwUµwUµxUµxVµxVµxVµyWµyWµyXµyXµyYµzY´yY´yY³yY²xY±wX°wX®vW­uV«tVªrU¨qU¦pT¥oS£nS¢mS mRžlRkR›jQ™iQ˜hQ–gQ”fQ’ePdPŽcP‹bP‰aO†_Oƒ^O€\O}[NyYNuWNqUMmSMlRMjQLhPLdNL\1\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À+.775;ICFphhŠztŠre¯}Ÿya¢vZ]OŠaP‘eP–gQšiQkRŸlS¡nTžlS™iQÌq.¯b*“S%zG#\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀMCJXHK^KKbMLeOLhPLjRLlSMnSMpTMqUMsVMvWNyYN|ZN\N‚]O„^O†`O‰aO‹bP—U&¥\'¯a(»g)Ìr/—hQ™iQ›jRkRŸmS¡nT¤pV§sX«v[¯z^´~bºƒfÀ‰kƎp̔vҙ{מÜ£ƒà¦†â¨ˆã¨ˆã¨‡á¦…Þ£‚ÛŸ~כyӖuΒpʍkƉg…c¿‚_½]»}Z¹{X¸zW·yV¶xU¶xUµwTµwTµwTµwTµwTµwTµwTµwUµwUµwUµxUµxVµxVµxWµyWµyWµyXµyX´yX´yY³yY³xX²xX°wX¯vW®uW¬tV«sV©rU¨qT¦pT¥oS£nS¡mR mRžlRkR›jQšiQ˜hQ–gQ”fQ’ePdPŽcPŒbP‰aO†`Oƒ^O€]O}[NzYNvWNrUMmSMlRMjQLhQLeOL_LK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À,)/ZTVXON„uq‡od®}Ÿyb»s]OŠaPeP•gQšiQkRžlRŸlSœkR–hQ»g*¤\(ŽQ%`LK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À B B_LKcNLfOLiQLkRLmSMoTMpTMrUMtVMwXNzYN}[N\O‚]O„_O‡`O‰aOQ%ŸY&©^'±b(¾i*Õ{8—hQ™iQ›jRkRŸmS¡nT¤qV§sX«v[°z^µ~bºƒfÀ‰kƎp̔vҙ{מÛ¢ƒß¥…ᧇ⧇ᦆऄݢÚž}֚xҕt͑oɌjňf…b¿_¼\º}Z¹{X·zW·yV¶xU¶xUµwTµwTµwTµwTµwTµwTµwTµwT´wU´wU´wU´xVµxVµxVµxW´xW´yW´yX´yX³xX³xX²xX±wX°wW¯vW­uW¬tV«sU©rU§qT¦pT¤oS£nS¡mR mRžlRkR›jQšiQ˜hQ–gQ”gQ’fPdPŽcPŒbP‰aP‡`O„^O]O~[N{ZNvXNrVMnSMlRMjRLhQLeOLaML+O+O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀHFLXQRTJH~pm‚la¬Ž}Ÿzc»t¤tT‰aPdP•gQšiQœjRžlRžlS›jRÖ|:´e*˜V&ˆN$\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À B B`LKdNLgPLiQLkRMmSMoTMpUMrUMtVMwXNzYN}[N€\O‚]O…_O‡`O‰aPšW&£['«_(´d)Âl,݃@Òt.™iQ›jRkRŸmS¡oU¤qV¨sX«w[°z^µbºƒgÀ‰kƎp̔uљz֝~Ú¡‚Þ¤„ॆআॅޣ‚Ü ؝{ՙwєs̐nȌjňfÁ„b¾_¼~\º|Z¸{X·yW¶yV¶xUµwUµwTµwTµwTµwT´wT´wT´wT´wT´wU´wU´wU´wU´wV´xV´xV´xW´xW³xW³xW³xX²xX±wX°wW¯vW®uW­uV¬tVªsU©rU§qT¦pT¤oS£nS¡mR lRžlRkR›jQšiQ˜hQ–hQ”gQ’fPdPŽcPŒbPŠaP‡`O„^O]O~[N{ZNwXNsVMoTMlRMjRLiQLfOLbML+O+O‚+O‚+O‚\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À6./fZXeVRHAIZIKiQLuWM¤tU‰aOdP–gQšjQkRžlRkR˜iQÄn/¬b,‘R%rC"\À\À\À\À\À\À\À\À\À\À\À\À"Fx"Fx!Fx!Fx B B BdNLgPLjQLlRMmSMoTMqUMrUMtWMwXNzZN}[N€\O‚^O…_O‡`O“S%X&¥\'®a(·g+Ês2Ó{9Àj*™iQ›jRkSŸmS¢oU¤qV¨sX«w[°z^µbº„gÀ‰kƎp˓uИy՜}Ù Ü¢ƒÞ¤„ߤ„Þ£ƒÝ¡ÚŸ~כzӗvϓrˏmNjićeÀƒa¾€^»~\¹|Z¸zX·yW¶xVµxUµwUµwTµwT´wT´wT´wT´wT´wT´wT´wT´wU´wU´wU´wU´wV³wV³xV³xW³xW²wW²wW±wW±wW°vW¯vW®uV¬tV«sUªsU¨rT§qT¦pT¤oS£nS¡mR lRžlRkR›jQšiQ˜hQ–gQ”gQ’fPePŽcPŒbPŠaP‡`O„_O]O~\N{ZNxXNsVMoTMlRMjRLiQLfPLbNL +O‚+O‚+P‚+P‚+P‚\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@89dWT@IIAI\JKlRMyYN„^OcP”gQ™iQkRžlRžkR™iRÍt3±d-’S%I#\À\À\À:^‘:^‘:^‘:^‘:^:^:^:^:^"Fx"Fx B B B BeOLhPLjRLlSMnSMpTMqUMrVMuWMxXN{ZN~[N€]Oƒ^O…_O“S%›W&¢['©^(¹k2½i+Ó{:•gQ—hQ™iQ›jRkSŸmT¢oU¤qV¨tY¬w[°{_µbºƒf¿ˆkčoʒtϖxӚ|ם~Ù €Û¡Û¡Û €Ùž~כ{ԘwДs̐oɌkʼng…c¿‚`¼]º}[¸{Y·zX¶yVµxVµwU´wU´wT´wT´vT´vT´vT´vT³vT³vT³vT³vT³vU³vU³vU³wU²wU²wV²wV²wV±wV±vV°vV°vV¯uV®uV­tV¬tUªsU©rU¨qT§pT¥pS¤oS¢nS¡mR lRžlRkR›jQ™iQ˜hQ–gQ”gQ’fPePŽdPŒbPŠaPˆ`O…_O‚]O\N|ZNxYNtWMpTMlRMjRLiQLgPLcNL_LK+P‚+P‚+P‚,P‚,P‚,P‚,P‚,P‚Nr¤\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À]QNl\VG@IMCI_LKoTM|ZN†`OdP–gQšjQkRžlRœkR—hQºh*¤^,ŒP%X3:_‘:_‘:_‘:_‘:_‘:_‘:_‘:_‘:^‘:^‘:^‘:^‘"Fx B B B BfOLiQLkRLmSMnTMpTMqUMrVMuWNxYN{ZN~[N€]Oƒ^OŽP%—U&X&£['¬`)½n4Ãn/Àj*•gQ—hQ™iQ›jRkSŸmT¢oU¤qW¨tY«w[°z^´~b¹ƒf¿ˆjČoɑsΕwҙ{՜}؞ٟ€ÚŸ€Ùž~ל|՚yҗvϓrˏnNjjĈfÁ„c¾`¼]¹}[¸{Y·zW¶xVµxU´wU´wT´wT´vT´vT³vT³vT³vT³vT³vT³vT³vT³vT²vU²vU²vU²vU²vU±vV±vV±vV°vV°vV¯uV®uV­uV¬tU«sUªrU©rT¨qT¦pT¥oS£oS¢nS¡mRŸlRžkRœkR›jQ™iQ˜hQ–gQ”gQ“fPePŽdPŒbPŠaPˆ`O…_O‚]O\N|ZNyYNuWMpUMlRMjQLiQLgPLdNL_LK,P‚,P‚,P‚,P‚,P‚Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaSOD>IJAIQEJbNLrUM~[NˆaO‘eP—hQœjQžkRŸlR›jRÌs0²e,“T&ƒK$;_‘;_‘;_‘;_‘;_‘;_‘;_‘:_‘:_‘:_‘:_‘:_‘:_‘ B B B BgPLiQLkRLmSMoTMpTMqUMsVMuWNxYN{ZN~[N]O‡M$“S%™V&ŸY&¥\'±e-¹j/Ñz:”fQ•gQ—hQ™iR›jRkSŸmT¢oU¤qW¨tY«w[¯z^´~b¹ƒf¾‡jÌnȐr͔vјyԛ|֝~מ~؞~ם}՛{ӘxЕt͒qʎmƊiÇeÀ„b½_»~\¹|Z·{Y¶yWµxVµxU´wU´wT´vT³vT³vT³vT³vT³vT³vT³vT³vT²vT²vT²vT²vU²vU²vU±vU±vU±vU°vV°vV¯uV®uV®uV­tU¬sU«sUªrU¨qT§qT¦pS¥oS£nS¢nR¡mRŸlRžkRœkR›jQ™iQ˜hQ–gQ”gQ’fPePŽdPŒbPŠaPˆ`O…_O‚]O\O|ZNyYNuWMqUMlSMjQLhQLfPLdNL_LK,P‚,P‚Nr¤Nr¤Nr¤Nr¤Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀdUOG@IMCITFJeOLtWM€]O‹bP“fP™iQkRŸlRkR™iQ¾j,©c/P%[JK;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘;_‘ B B B BgPLiQLkRMmSMoTMpTMqUMsVMvWNyYN{ZN~[N|H#ŽQ%•T%›W& Z'¦]'ºm5¸f*Ív5”fQ•gQ—hQ™iR›jRkSŸmT¡oU¤qW§sY«v[¯z^³~b¸‚e½‡i‹nǏq˓uϖxҙzԛ|֜}֜|՛{ԙyіvϓs̐oȍlʼnh†e¿ƒa¼€_º~\¸|Z·zX¶yWµxV´wU´wU³vT³vT³vT³vT³vT³vT³vT²vT²vT²vT²vT²vT²vT±vT±vU±vU±vU°uU°uU°uU¯uU®uU®tU­tU¬tU«sUªrU©rT¨qT§pT¥pS¤oS£nS¢mR mRŸlRžkRœjR›jQ™iQ—hQ–gQ”fQ’fPePŽcPŒbPŠaPˆ`O…_O‚^O\O|ZNyYNuWNqUMmSMjQLhQLfPLdNL`LKNr¤Nr¤Nr¥Nr¥Nr¥Ns¥Ns¥Ns¥Ns¥Os¥Os¥Os¥Os¥Os¥Os¥\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À2#TB3REJVGJ`LKpTM}[N‰aO’ePšiQžkR lRžlR˜hQ·e)¢^.P%^8 #Gy#Gy#Gy#Gy#Gy#Gy#Gy#Gy * B B B B BjQLlRMnSMoTMpUMrUMsVMxF#‡M$ŽQ%’S%–U&šW&žY&¢['ªa+¿s;¹g+dP‘eP“fQ”gQ–hQ˜iQšjRœkSžlS nU£pV¦rX©uZ¬x]°{_´~b¸‚e¼…iÀ‰kÌnƎpȐrʑs˒sˑrʐqɏoǍmŋkÈhÀ…e¾ƒb¼€`º~^¸|[¶{ZµyX´xW³wV²vU²vU²vT±uT±uT±uT±uT±uT±uT±uT±uT°uT°uT°tT°tT¯tT¯tT¯tT¯tT®tT®tT­sT­sT¬sT¬sT«rTªrT©rT©qT¨qS§pS¦pS¥oS£nS¢nR¡mR lRŸlRkRœjQ›jQ™iQ˜hQ–gQ•gQ“fP‘ePdPcP‹bP‰aO‡`O„^O‚]O\N|ZNxXNuWMqUMmSMhPLgPLeOLcNL`LKZIK,Pƒ,Pƒ,QƒOs¦Os¦Ot¦Ot¦Ot¦Ot¦Pt¦Pt¦Pt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀvšÍvšÍv›Ív›Ív›Ív›Ív›Íw›Íw›Í=a“=a“=a“#Gy#Gy#Gy#Gy#Gy#Gy#Gy#GymYPODJUGJXIKeOLtWM‚]OcP•gQœjQ lR mRkRÈp.´g0”T&ˆN$]8 #Gy#Gy#Gy#Gy#Gy#Gy#Gy * B B B B BjQLlRMnSMoTMpUMrUMv>„L$ŒP%‘R%•T%˜V&œX& Z'¤\'°f0¹m5Äq3dP‘eP“fQ”gQ–gQ˜hQ™jR›kSlS nT¢pV¥rX¨tZ«w\¯z_³}a·dº„g¾‡jÁŠlČnƎpǏqȏqȏpǎoƍmŋkÉiÁ‡g¿„d½‚aº_¸}]·|[µzY´yX³xW³wV²vU²vU±uT±uT±uT±uT±uT±uT°uS°uS°tS°tS°tS¯tS¯tT¯tT¯tT®tT®tT®sT­sT­sT¬sT¬sT«rTªrTªrT©qT¨qS§pS¦pS¥oS¤oS£nS¢mR¡mRŸlRžlRkRœjQšjQ™iQ—hQ–gQ”fQ’fP‘ePdPcP‹bP‰aO†`O„^O]O~\N{ZNxXNuWMqUMiQLgPLfOLeOLbNL_LKZIK,Qƒ,Qƒ,Qƒ,Qƒ,QƒOt¦Pt¦Pt¦Pt¦Pt¦Pt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àv›Ív›Ív›Ív›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Í=a“=a“=a“=a“=a“#Gz#Gz#Gz#Gz#Gz#Gz#GzgUOS=2RFJWHJ[JKlRMzYN†`OeP˜iQžkR mRŸlR™iQ¼h*°h4‘R%ˆN$^9 [JK#Gy#Gy#Gy#Gy#Gy * B B B B BjQLlRMnSMoTMpUMI#†L$‹O$Q%“S%—U&šW&X&¡Z'¦](·l5´f,Èt5dPeP’fP”fQ–gQ—hQ™iR›kRlSŸmT¢oV¤qW§tY«v[®y^±|aµc¸‚f¼…h¿ˆkÁŠlÌnōnōoōnŌmċk‰iÁ‡g¿…e½ƒc»€`¹~^·|\¶{Z´yY³xW²wV²vU±vU±uT±uT±uT°uT°uT°tS°tS°tS°tS°tS¯tS¯tS¯tS¯tS®tS®tS®sS­sT­sT­sT¬sT¬rT«rTªrTªrS©qS¨qS§pS¦pS¦oS¥oS¤nS¢nR¡mR mRŸlRžkRkR›jQšiQ˜iQ—hQ•gQ”fQ’ePePdPcPŠbPˆ`O†_Oƒ^O]O~[N{ZNxXNtVMqUMhPLgPLfOLdNLbML_LKbE6,Qƒ,Qƒ,Qƒ,Qƒ-Qƒ-Qƒ-QƒPt¦-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Qƒ-Q„-Q„-Q„\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@d–w›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Íw›Îw›Îw›Î=a”=a”=a”=a”=a”=a”=a“#Hz#Gz#Gz#Gz#Gz#Gz#GzmYPPDJUGJYIKbMLqUM\NŠbP”fQ›jQŸlR¡mRžlRËp,µe+ \+R%ˆN$b; ]8 [7 XHKO+N1L/L/L/K/K/ eb”>b”>b”>b”>b”>b”>b”>b”=b”=b”=b”=b”=b”=b”=b”=b”YEUGJYIK_LKnSM|ZNˆ`O’ePšiQŸlR¡mR mR™iQºg*´j4šW'‘R%ŽQ%h>!g=!f=!db”>b”>b”>b”>b”>b”>b”$Hz$Hz$Hz$Hz$Hz>b”>b”>b”>b”>b”gVOS=2RFJWHK[JKeOLsVM€]OŒbP•gQœjQ lR¡mRžlRÌr/¹g*²h2–U&“S%‘R%Q%ŽQ%ŒP%£['¨]'¬`(°b(´d)¸f)»g)¾i*Áj*I#¡Z'¡Z' Z' Z'¡Z'£['¤['¥\'¦]'ª_)±d,³d)Äq3‹bPcPdP‘eP’fQ”fQ–gQ—hQ™iR›kSlSŸmU¡oV¤qW¦sY©u[¬x]¯z^±|`´~b¶€d¸‚eºƒf»„f»„f¼„f»ƒe»‚dºb¹€a·~_¶}^µ{\´zZ³yY²wX±wW°vV°uU¯uU¯tT¯tT¯tT®tS®tS®tS®sS®sS®sS®sS®sS­sS­sS­sS­sS¬sS¬rS¬rS«rS«rSªrSªqS©qS©qS¨pS§pS¦pS¦oS¥oS¤oR£nR¢nR¡mR mRŸlRžkRkRœjQšjQ™iQ˜hQ–hQ•gQ“fQ’ePdPŽcPŒcPŠbPˆ`O†_O„^O]O\N|ZNyYNuWNrUMnSMjQLdNLcNLaMK_LK[JK`D6Pt¦Pt¦Pt§Pt§Pt§Pu§Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§-Q„-Q„-Q„-R„-R„-R„-R„-R„-R„-R„-R„-R„.R„.R„Rv¨Rv¨Rv¨~¢Ô~¢Ô~¢Ô~¢Ô\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@e—@e—@e—@e—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—xœÏxœÏxœÏxÏxÏxÏxÏyÏyÏ>b•>b”>b”$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>b”>b”>b”>b”>b”YDb”>b”>b”>b”Q@:R<2fL@WHJZJKaMKoTM|ZNˆ`O‘eP™iQŸlR¡mR¡mRœjRÇo-»i-´h0«`)§]'¨]'¬`(°b(´d)¸f)¼h)Àj*Ãk*Æm*Én+Ìp+Ïq+Òr,§]'§]'§]'¨^'ª_(«_(¬`(­`(¯b)²c)ºi.ˆ`OŠaPŒbPŽcPdP‘eP“fQ”gQ–hQ˜iRšjR›kSlTŸnU¢oV¤qW¦sY©uZ«w\­y]°{_²|`³}aµ~b¶b¶b¶b¶a¶~`µ}_µ|^´{]³z[²yZ±xY°wX¯vW¯uV®uU®tU®tT­tT­sT­sS­sS­sS­sS­sS­sS­sS­sS¬sS¬rS¬rS¬rS«rS«rS«rSªrSªqS©qS©qS¨qS¨pS§pS¦pS¦oS¥oR¤oR¤nR£nR¢mR¡mR lRŸlRžkRkRœjQšjQ™iQ˜hQ–hQ•gQ“fQ’ePdPdPcP‹bP‰aO‡`O…_O‚]O\O}[NzYNwXNtVMpTMlRMhPLcNLaMK_LK]KKbR]C5Pu§Pu§Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨-R„-R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae˜Ae˜Ae˜Ae˜yÏyÏyÏAf˜Af˜Af˜$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>b•>b•>b”>b”WD3TFJXHK[JKfOLsVM€]O‹bP”gQœjQ lR¡mR mRœkRÅm,½i,ºj/²d+±c)²c(¶e)ºf)¾h*Áj*Ål*Én+Ëo+Îq+Ñr+Ós,Õt,ƒK$ª^(ª_(«_(¬`(®a(¯a)°b)³d*¶f+¾m1‡`O‰aP‹bPcPdPeP’fQ”fQ•gQ—hR™iR›kSlTŸmT¡oV£pW¥rX§tY©v[¬w\®y]¯z^±{_²|`³}`´}`´}`´}_´|^³{^³{\²z[±yZ°xY°wX¯vW®uV®tU­tU­tT­sT­sT­sS­sS¬sS¬sS¬sS¬rS¬rS¬rS¬rS¬rS«rS«rS«rS«rSªrSªqSªqS©qS©qS¨qS¨pS§pS¦pS¦oS¥oR¤oR¤nR£nR¢mR¡mR mRŸlRžlRkRœjQ›jQšiQ˜iQ—hQ–gQ”fQ“fP‘ePdPŽcPŒbPŠaPˆ`O†_O„^O]O\N|ZNyYNvWNsVMoTMkRLgPLbML`LK^KK\JK~aR[B5Pu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ£Õ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe—Ae—Ae—Ae—Ae—Ae—Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Af˜Af˜Af˜yÐAf˜Af˜Af˜Af˜Af˜Bf˜$H{$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>c•>c•>b•>b•O?:[E|aRZA5-QƒQu§Qu§Qu§Qu§Qu§Qu§Qu§Qu¨Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„Rv¨Rv¨Rv©Rv©Rv©Rw©£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö£Ö\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAe˜Ae˜Ae˜Ae˜Ae˜Ae˜Ae˜Af˜Af˜Af˜Af˜Af˜yžÐyžÐyžÐzžÐzžÐzžÐBf˜Bf˜Bf˜Bf˜Bf˜$H{$H{$H{$H{$H{$H{$H{$H{$H{$Hz$Hz$Hz$Hz$Hz$Hz$Hz$Hz>c•>c•>c•>c•VC^C6W@5-Q„-Q„Qu§Qu§Qu§Qu§Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„Rv©Rw©Rw©Rw©¤Ö¤Ö¤Ö¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö¤Ö¤Ö¤Ö\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAf˜Af˜Af˜Af˜Af˜Af˜Af˜Af˜zžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐBf˜Bf˜Bf˜Bf˜$I{$I{$I{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$H{$Hz$Hz$Hz$Hz$Hz YE\C6T>4-Q„-Q„-Q„-R„Qu¨Qu¨Qv¨Qv¨Qv¨Qv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„Rw©Sw©€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›Ei›\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀAf˜Af˜Bf˜Bf˜Bf˜zžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÐzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑBf˜Bf˜Bf˜$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$H{$H{$H{$H{?c•?c•?c•?c•$H{$H{$H{SB;R<2zbVUGJXIK[JK[JKuWN€\OŠaP’fP™iQŸlR¡mR£nS£nS¥pTà€9Þ9Õw2Öw0Öv/Öv.Ùx/Üz0Þz0á|1ã~2æ€3è5éƒ6ë…8ë…8ºm4¼o7¾q8Äu;Ãs9Ãs8ºj0‚]O„^O†_Oˆ`OŠaPŒbPcPdP‘eP’fQ”fQ•gQ—hR™iRšjSœkSlTŸnU¡oV¢pV¤qW¦rX§sY¨tY©uYªuZ«uZ«vZ«vY«uY«uX«uX«tW«tV«sVªsUªsUªrTªrTªrTªrSªqSªqSªqSªqSªqS©qS©qS©qS©qS©qS©qS©qS©qS¨qS¨pS¨pS§pS§pR§pR¦oR¦oR¥oR¥oR¤nR£nR£nR¢mR¡mR mR lRŸlRžkRkRœjQ›jQšiQ™iQ—hQ–gQ•gQ”fQ’eP‘ePdPcPŒbPŠaPˆ`O†_O„^O‚]O\O}[NzYNwXNtVMqUMnSMiQLeOL`LK]KKmP?kN?|aSZA5P<4-R„-R„-R„-R„-R„-R„Qv¨Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×€¤×Ei›Ei›Ei›Ei›Ei›Ei›Ei›\À\À\À\À\À\À\À\À\À\À\À\ÀBf˜zžÐzžÐzžÐzžÐzžÐzžÐzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑBf™Bf™Bf™%I{$I{$I{$I{$I{$I{$I{$I{$I{$I{$I{?c–?c–?c–?c–?c–?c•?c•?c•?c•$H{$H{$H{jXP^H=}dXUGJXHKZIKkRLwXN‚]O‹bP”fQšiQžkR mR£nS¥pT¨qU¨rUç…;ç†>ì‰?è†<å‚9ê†;î‰=ðŠ=ðŠ>ôŽAø‘Dü•Hÿ˜Kù’E¿r:Àt;Àt;Át<Ãt:½n4´f,]Oƒ^O…_O‡`O‰aO‹bPŒcPŽcPdP‘eP“fQ”gQ–hQ˜iR™jR›kSœlSžmTŸnU¡oV¢pV¤qW¥rW¦rX§sX¨tX©tX©tX©tX©tXªtWªsW©sV©sV©rU©rU©rT©qT©qT©qS©qS©qS©qS©qS©qS©qS©qS©qS¨qS¨qS¨pS¨pS¨pS¨pS§pS§pS§pR¦pR¦oR¦oR¥oR¥oR¤nR¤nR£nR¢nR¢mR¡mR mR lRŸlRžkRkRœjQ›jQšiQ™iQ˜hQ–hQ•gQ”fQ’fP‘ePdPŽcPŒcP‹bP‰aO‡`O…_Oƒ^O]O~[N{ZNyYNvWNsVMpTMlRMgPLcNL†gUƒeUlO?~bT{`SW@5-R„-R„-R„-R„-R„-R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R….R…Ei›Ei›Ei›€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×€¥×Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›\À\À\À\À\À\À\À\À\À\ÀzžÑzžÑzžÑzžÑzŸÑzŸÑzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒBg™Bg™Bg™%I{%I{%I{%I{%I{%I{%I{@d–?d–?d–?d–?d–?d–?d–?d–?d–?c–?c–?c–?c–$I{$I{L=:WD`KA-R„-R„-R„.R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R„.R….R….R….R…EiœEiœEiœEiœEiœEiœ¥×¥×¥×¥×¥×¥×¥×EiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœEiœ\À\À\À\À\À\À\À\ÀzŸÑzŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒ{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| ÒCg™Cg™%I{%I{%I{@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–?d–?d–?d–?d–?d–?d–$I{$I{dUPYEXG@-R„.R„.R„.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©.R„.R„.R„.R„.R„.R„.R„.R„.R….R….R….R….R….R….S…EiœEiœEiœEjœEjœEjœEjœEjœ¥×¥×¥×EjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEiœEiœEiœ\À\À\À\À\À\À{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÑ{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| ÒCg™@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–?d–$I{$I{RA;P<3zcXnVIuh™~pdNLpUMÁ”w¬zZ«vS‘eP–gQœjQžlR¡mR¤oS§pT­uV¯vW±xY¶|\¼€_ÆdƉgȊhʌi̎kΏlÿRñF¶k4²g1¯d-­b+ª_(¢Z'}[N€\O‚]O„^O†_Oˆ`O‰aP‹bPcPŽcPdP‘eQ’fQ”gQ•gQ—hR˜iR™jR›kSœkSlTžmT nT¡nU¡oU¢oU£pU¤pU¤pU¤pU¥pU¥pT¥pT¥pT¥pT¥pS¥pS¥oS¦oS¦oS¦oS¦oS¦oS¦oR¦oR¦oR¦oR¦oR¦oR¦oR¦oR¥oR¥oR¥oR¥oR¤oR¤nR¤nR£nR£nR¢nR¢mR¡mR¡mR lRŸlRŸlRžkRkRœkQœjQ›jQšiQ™iQ˜hQ—hQ•gQ”gQ“fP’ePePdPcPŒbPŠbP‰aO‡`O…_Oƒ^O]O~\N|[NzYNwXNtVMpUM—pY”oXzWBuUB…gVlP@jO@|bUx`TcMB3!.R„Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©.R„.R„.R„.R„.R….R….R….R….R….S….S….S…EjœEjœEjœEjœEjœEjœEjœEjœEjœ¦Ø¦ØEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœEjœ\À\À\À\ÀBg™{ŸÒ{ŸÒ{ŸÒ{ Ò{ Ò{ Ò{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| ÒCg™Cg™Cg™Cg™|¡Ó@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–%I{;0/SB;R=4fODpXL‘xkš€r˜vbº“zÀ”x«{[ÏldP•gQ™iQ›jQŸlR£nR¦pS¨qTªrT¬tU°wWµ{Z¸}\¸|\¸}\¹~]»]å}+Ý~6­d.ªa+¨_)§^(¤\'zYN|ZN~\N€]Oƒ^O„_O†_Oˆ`OŠaP‹bPcPŽdPdP‘eQ“fQ”gQ•gQ—hR˜iR™jRšjSœkSlSžlTŸmT mT nT¡nT¢nT¢oT£oT£oT£oT£oT¤oS¤oS¤oS¤oS¤oS¤oS¤oS¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¥oR¤oR¤oR¤nR¤nR¤nR£nR£nR£nR¢mR¢mR¡mR¡mR lR lRŸlRžlRžkRkQœjQ›jQšjQ™iQ™iQ˜hQ—hQ•gQ”gQ“fQ’ePePdPŽcPŒbPŠbP‰aO‡`O…_Oƒ^O]O\N}[NzZNxXNuWMrUM™rZ–pY|XCxVCsTBmQAkOA~cVzaU`I>\IARv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©.R….R….R….R….R….S….S….S….S…FjœFjœFjœFjœFjœFjœFjœFjœ‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦ØFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœ\À\ÀBg™{ Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ò| Ó| ÓCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™}¡Ó@e—@e—@e—@e—@e—@e—@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–@d–%I{<1/J82^I@gQFqYN‘xl™€s—vc¢{d¿”yª{\«wUči‘eP•gQ˜hQkQ mR¢mR¤nR¥oS§pSªrT¬tU¬tU¬tU¬tU­tU®tUÒt.ƒL&¤](¢['¡Z'žY&xYN{ZN}[N\N]Oƒ^O…_O‡`OˆaOŠaPŒbPcPdPeP‘eQ“fQ”gQ•gQ—hR˜iR™iRšjR›kSœkSlSžlSŸmSŸmS mS nS¡nS¡nS¢nS¢nS¢nS¢nS£nS£nS£nR£nR£nR£nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR£nR£nR£nR£nR£nR¢nR¢mR¢mR¡mR¡mR¡mR lR lRŸlRžlRžkRkRœkQœjQ›jQšiQ™iQ˜iQ—hQ–hQ•gQ”fQ“fP’ePePdPŽcPŒbP‹bP‰aO‡`O†_O„^O‚]O\O}[N{ZNxYNvWNsVM›s[˜rZ~ZDnYŒkYqSBkPAiOA|cVbK?\G>NB?Rv¨Rv¨Rv¨Rv¨Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©.S….S….S….S….S….S…FjœFjœFjœFjœFjœFjœ‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦Ø‚¦ØFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœCg™Cg™| Ò| Ò| Ò| Ò| Ò| Ó| Ó| Ó| Ó|¡Ó|¡ÓCg™Cg™Cg™Cg™Cg™Cg™Cg™CgšCgšCgšCgšCgš}¡ÓAe—Ae—Ae—@e—@e—@e—@e—@e—@e—@e—@e—@d—@d—@d—@d—@d—@d—@d–@d–@d–@d–%I{@d–@d–<1/H72\I@ePGpYNxm˜€t–vc¡{e¾”zÁ“u‘p«wU¬uQ‘eP•gQ™iQšjQœjQžlR¡mR£nR¤nR¤oR¤oR¤oR¤oR¤oRÇgb;  Z'žY&›W&“S%vXNyYN{ZN~[N€\O‚]Oƒ^O…_O‡`O‰aOŠaPŒbPcPdPdP‘eQ“fQ”gQ•gQ–hQ˜iR™iRšjR›jR›kSœkSlSžlSžlSŸlSŸmS mS mS¡mS¡mS¡mR¡mR¢mR¢mR¢mR¢mR¢nR¢nR¢nR£nR£nR£nR£nR£nR¢nR¢nR¢mR¢mR¢mR¢mR¡mR¡mR¡mR mR lRŸlRŸlRžlRžkRkRkQœjQ›jQ›jQšiQ™iQ˜hQ—hQ–gQ•gQ”fQ“fP‘ePdPdPcPŒbP‹bP‰aO‡`O†_O„^O‚]O€\O}[N{ZNyYNvXNtVMu\„]E€[E’oZŽmZŠkYnRBjOB}cVdL@`I?XGARv¨Rv¨Rv¨Rv¨Rv©Rv©Rw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwª.S….S….S….S…/S…FjœFjœFjœFjœ‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦Ù‚¦ÙFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœ‚¦Ù‚¦ÙCg™Cg™| Ó| Ó|¡Ó|¡Ó|¡Ó|¡Ó|¡ÓCg™Cg™Cg™Cg™CgšCgšCgšCgšCgšCgšCgšCgšChšChšChšChšChš}¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—@e—@e—@e—@e—@e—@e—@e—@d—%I{%I{%I{%I{%I{@d–@d–<10F61o]Vye]„oeŽxmœ‚u”udŸ{e¥}d¨|aÀ’tÁpÏl¬uQdP’eP”fQ–gQ˜iQ›jQœjQœjQœjQœjQœkQœkQkQ_9 œX&™V&•T%rUMuWMwXNzYN|ZN~[N€\O‚]O„^O…_O‡`O‰aOŠbPŒbPcPŽdPdP‘eQ’fQ”fQ•gQ–hQ—hR˜iR™iRšjR›jRœkRœkRkRlRžlRžlRŸlRŸlRŸlR lR mR mR mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR¡mR mR lR lRŸlRŸlRŸlRžkRžkRkRkQœjQ›jQ›jQšiQ™iQ˜iQ—hQ–hQ•gQ”gQ“fQ’fP‘ePdPdPcPŒbPŠbP‰aO‡`O†_O„^O‚]O€\O~[N{ZNyYNwXNtVMrUM†^F‚]F”q\o[ŒlZqTD€fX}dWeMAbK@O=6NB@Rv¨Rv©Rv©Rv©Rw©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxª/S…/S…FjœFjœFjœƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœFjœƒ§Ùƒ§Ùƒ§Ùƒ§ÙCg™Cg™Cg™}¡Ó}¡Ó}¡ÓCg™CgšCgšCgšCgšCgšCgšCgšChšChšChšChšChšChšChšChšChšChšDhšDhšDhš~¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—%I{%I{%I{%I{%I{%I{%I{%I{%I{@d—@d—E:9D61m\Vwe]lXOuaX„k_¨‹z±|¡|e¥|c§|`©z]ªyXnÏlĎkĎidP’eP“fP“fP“fP’fP“fP“fP“fP[7 —U&”T%P%pTMsVMuWMxXNzYN|ZN~[N€\O‚]O„^O†_O‡`O‰aOŠbPŒbPcPŽdPdP‘eP’eQ“fQ”gQ•gQ–hQ—hQ˜iR™iRšjR›jR›jRœkRœkRkRkRžkRžlRžlRŸlRŸlRŸlRŸlR lR lR lR lR lR lR lR lR lR lR lR lR lRŸlRŸlRŸlRŸlRžkRžkRkRkQœkQœjQ›jQ›jQšiQ™iQ˜iQ˜hQ—hQ–gQ•gQ”fQ“fP’eP‘ePdPŽdPcPŒbPŠbP‰aO‡`O…_O„^O‚]O€\O~[N|ZNyYNwXNuWMrUM‡`G„^G–r]|ZFxXFtVEgY~eY{cXbLA[H?REA.R„.R„Rv©Rw©Rw©Rw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSxªSxªSxªSxªTxªTxªTxªƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙFjFjFjFjFjFjFjFjFjFjFjƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§Ùƒ§ÙCg™Cgš}¡Ó}¡ÓCgšCgšCgšCgšChšChšChšChšChšChšChšChšChšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš~¢ÔAe—Ae—Ae—Ae—Ae—Ae—Ae—Ae—Ae—%I|%I|%I|%I{%I{%I{%I{%I{%I{%I{%I{%I{%I{%I{@e—@e—B99B51k[Vud]iWPr_Wye] †yªŒ|²}¡|e¤|c¾’w¨{^¨z\©yZÁp«xW«wU«wU«wU«wUÎlÎlŽlŽlkD(’S%ŒP%nSMoTMqUMsVMvWNxXNzYN|ZN~[N€\O‚]O„^O†_O‡`O‰aOŠaP‹bPcPŽcPdPeP’eQ“fQ”fQ•gQ–gQ–hQ—hQ˜iQ™iR™iRšjR›jR›jRœjRœkRœkRkRkRkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRŸlRžlRžkRžkRžkRkRkQkQœkQœjQ›jQ›jQšjQšiQ™iQ˜iQ˜hQ—hQ–gQ•gQ”gQ“fQ’fP‘ePePdPŽcPcP‹bPŠaPˆaO‡`O…_Oƒ^O‚]O€\O~[N|ZNyYNwXNuWMrUMŸw_œv_˜t^~\GzYGvWF†j[fZ|dYybX\I@VGB5/2.R„.R„.R„.R„Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªSxªTxªTxªTxªTxªFkFkFkFkƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§ÚFkFkFkFkFkFkFkFkƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Úƒ§Ú}¡Ó}¡Ó}¡Ô}¡ÔChšChšChšChšChšChšChšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš~£ÕAe˜Ae˜Ae˜Ae˜Ae˜%J|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I{%I{%I{%I{%I{%I{@e—@e—<68?31gYVpa\bRMjYTq`Z€j`¡‡z«}²‘}¶’|¸’{º’z»’x¼’w§z^¿‘t¿‘s¿‘s¿s¿r¿r¾r¾r°h2‹O$„L$mSMnSMnTMoTMtVMvWNxXNzYN|ZN~[N€\O‚]O„^O…_O‡`OˆaOŠaP‹bPŒcPŽcPdPdP‘eP’eQ“fQ”fQ•gQ–gQ–hQ—hQ˜hQ˜iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœkQœkQkQkRkRkRkRkRkRkRkRkRkQkQkQœkQœjQœjQœjQ›jQ›jQšjQšiQ™iQ™iQ˜hQ—hQ—hQ–gQ•gQ•gQ”fQ“fP’eP‘ePdPdPcPŒbP‹bP‰aPˆ`O†`O…_Oƒ^O]O€\O~[N|ZNyYNwXNtWM£z` y`w`šu_€]I|[HwXGˆl\ƒi[}eZycYr_WjZU;23.R„.R„.R„.R„.R….R….R…Sw©Sw©Sw©Sw©Sw©SwªSwªSwªSxªSxªSxªTxªTxªTxªTxª/S…/S…GkGkGkGkGkGkGkƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨ÚGkGkGkƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Ú}¢Ô}¢Ô}¢Ô}¢Ô~¢ÔDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš£ÕAf˜%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I|%I{%I{Ae—Ae—Ae—?89H=:?YUY`QGfVLudXjeitlm{po|qp}rp~rpsqsq€tqŒr_=1+xJ)’o[~[F€\G‚^H„_I…`IkRLlRMnSMpTMrVMuWMwXNyYN{ZN}[N~\N€\O‚]Oƒ^O„_O†_O‡`Oˆ`O‰aPŠbP‹bPŒcPcPŽcPdPdPeP‘eP’eP’fP“fQ“fQ”fQ”gQ•gQ•gQ•gQ–gQ–gQ–gQ–hQ–hQ—hQ—hQ—hQ—hQ—hQ–hQ–hQ–gQ–gQ–gQ•gQ•gQ•gQ”fQ”fQ“fQ“fP’eP‘eP‘ePdPdPŽdPŽcPcPŒbP‹bPŠaP‰aO‡`O†_O…_Oƒ^O‚]O€\O~\N}[N{ZNyYNwXNuWM“iOhOŽgO‹eOžze›yd—wd”tcrbtYKjTIaOG[KFj]Y^UU?;@.R….R….S….S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…/S…GkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkžGkž…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û…©Û…©Û£Õ£Õ£Õ£Õ£Õ£Õ£Õ£ÕDh›Dh›Dh›Dh›Di›Di›Di›Di›Di›¤Ö¤Ö¤Ö¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|Af˜Ae˜Ae˜%J|%J|%J|%I|%I|%I|%I|#-#%.()1MEAQIEUMI]SL]TM=4.1+(=.#6,&5( 1%"ŒlYn[“p\•r]]Hƒ_I…`JœwažybkRLmSMpTMrUMtVMvWNxXNzYN|ZN}[N\N€]O‚]Oƒ^O…_O†_O‡`OˆaO‰aPŠaP‹bPŒbPcPŽcPŽdPdPdPeP‘eP‘eP’eP’fP“fP“fQ“fQ”fQ”fQ”fQ”gQ”gQ•gQ•gQ•gQ•gQ•gQ”gQ”fQ”fQ”fQ”fQ“fQ“fP“fP’eP’eP‘eP‘ePdPdPdPŽcPcPŒcPŒbP‹bPŠaP‰aO‡`O†_O…_Oƒ^O‚]O]O\O}[N|ZNzYNxXNvWN¬‚gªg¨€ghPŒfPŸ|fœzf˜xe”vdscsYLiTK_NHYKFh\Z]UV=;@.R….S….S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxª/S…/S…/S…/S…GlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlžGlž…©Û…©Û…©Û…©Û£Õ£Õ£Õ£Õ£Õ£Õ£Ö£ÖDi›Di›Di›Di›Di›Di›¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×Ei›&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Af˜Af˜Af˜Af˜Af˜%J|%J|%J|%J|%J|%J|%I|%I|%I|, +,!.! "`E6†iYŒlZo\“q]•s^^J™va›wbycŸzd {e¤}foTMqUMsVMuWNwXNyYN{ZN|ZN~[N\O]O‚]Oƒ^O…_O†_O‡`Oˆ`O‰aOŠaP‹bPŒbPŒcPcPŽcPŽdPdPdPdPeP‘eP‘eP‘eP’eP’eP’eP’eP’fP’fP’fP“fP’fP’fP’fP’eP’eP’eP‘eP‘eP‘ePePdPdPdPŽdPŽcPcPŒcPŒbP‹bPŠaP‰aOˆ`O‡`O†_O…_Oƒ^O‚]O]O\O~[N|[N{ZNyYNwXN®ƒi¬ƒiª‚i¨i¦€hŒhR‰fQ†dQ‚bP•wfx]Oˆpdkbtd_m`]OEDG?A;:@.S….S….S….S….S…/S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTx«Tx«Tx«Ty«/S†GlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž…ªÜ…ªÜ…ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž…ªÜ…ªÜ£Ö£Ö£Ö£Ö¤Ö¤Ö¤Ö¤Ö¤ÖEi›€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×€¥×€¥×€¥×Bg™Bg™Bg™Bg™Bg™&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Af˜Af˜%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|%I| +,YA5jPBpSD‹l[o]’q^–t`‚_Kšwbœycžze {f¡}g¤h¨i”lSrVMtWMvWNxXNyYN{ZN|[N~[N\O]O‚]Oƒ^O„_O…_O†`O‡`Oˆ`O‰aPŠaP‹bP‹bPŒbPcPcPŽcPŽcPdPdPdPdPdPdPdPdPePePePePePdPdPdPdPdPdPdPŽcPŽcPcPcPŒbP‹bP‹bPŠaP‰aOˆ`O‡`O†`O…_O„^Oƒ^O‚]O€]O\O~[N|[N{ZNyYNxXN°…j®„j¬„jªƒj¨‚j¦€jŒhSŠgS†eRƒcR|`QŒsf…oe}jcrd`k_]LCDC=@,,3(4F(4F.S….S…/S…/S…/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«…ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžChšChš¤Ö€¤Ö€¤Ö€¤Ö€¤ÖEi›Ei›Ei›€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤Ö€¤×€¤×€¤×€¤×Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|%I|%I|%I|#5H71O;3V?4iOBoSDsVFo]{[I^Kƒ`L…bN‡dOŸ{f }g¢~h¥€j’kT•mU˜oVšqWrWwXNxXNzYN{ZN}[N~[N\O€]O‚]Oƒ^O„^O…_O…_O†`O‡`Oˆ`O‰aO‰aPŠaP‹bP‹bPŒbPŒbPŒcPcPcPcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPŽcPcPcPcPŒcPŒbP‹bP‹bP‹bPŠaP‰aP‰aOˆ`O‡`O†_O…_O„_O„^Oƒ^O]O€\O\N~[N|ZN{ZNyYN›oTšoT™oT—nT¬„lªƒl¨‚ljUŒiTŠhT†fT€cSvi‰rgnfyidqdah^^HBD?<@)+3OZkMYk(5F(5F(5F/S…/S…/S…/S…/S…TxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Ty«Uy«†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžDhšDhšDhšChš&K}&K}&K}&K}&K}&K}ChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|&J|&J|&J|&J|&J|Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%J|%I|%I|A99N?;L:2T>4gNBlRD‡k\‹n^z[J~^LaN…cO‡dP‰fQŠgRŒhTjU’lV•nW˜pXšrXsY¶‹q¸qºŽr¼r½r¿s©z[©z[ªz[«{[¬{[¬{ZœrŒqŒqŒpŒpőo­yV­xV¬xU¬wT¬wTŠaPŠbP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bP‹bPŠaPŠaPŠaP‰aP‰aOˆaOˆ`O‡`O‡`O†_O…_O„^Oƒ^O‚^O‚]O]O€\O~\N}[N|ZNzYNpTœpU›pUšpU˜oV—oV•nV“mV‘lVkVŒjVˆhVƒfU~cUuj†qh~mfugdkaad\^E@D98?$(2minffm^blV^lMYk(5F(5F/S…TxªTxªTxªTxªTxªTxªTxªTx«Tx«Ty«Ty«Ty«Uy«Uy«†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸHlŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}ChšChšChšChšChšChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|&J|&J|&J|%J|%J|%J|%J|%J|%J|%J|Ae˜Ae˜;GY<68I=:I82Q=4XA6~fZ„j\‰m^p`|]L€`NƒcP†eQˆgS¡j£€l¦‚m©„n•oX˜qYšrZt[¶Œr¸sºs¼t½t¾‘t¨z]©{]ª{]«{\«{\¬{\¬{[ēsērĒrĒqĒpđp¬yWĐoÐnÏmÏlŽlŽkÁkˆaOˆaOˆaOˆaOˆaOˆaOˆaOˆ`Oˆ`O‡`O‡`O‡`O†`O†_O…_O…_O„_O„^Oƒ^O‚]O]O€]O\O~\N}[N|ZN¶‰l¶‰lµˆmœqV›qVšqV™pW˜pW–oW¬…nª…n§„n¤‚nŸ€n›~n€eW‘xlŠtk‚piykfodcf_`JDG@>C*,5$1MYktr~tstmolinadmX_lNZkMZkTxªTxªTxªTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«ÝHlŸHlŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸ†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸHmŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšChšChšChšChšChšChšChšCgšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™&J}&J}&J}Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜&J|&J|&J|&J|&J|&J|&J|&J|&J|&J|Af˜Af˜Af˜Af˜;GY;GY;GY1'!D:9N?;N;3]I?zdY€h[†l^‹oasc“ue€bQ„dR‡fT l¢m¦ƒn©…o«‡p®ˆq±Šr³‹sžv] w]¹u»u¼‘u¾‘u¿’v¨{^©{^ª|^«|]«|]«{\¬{\¬{[¬{[¬zZ«zZ«yY«yX«xXonnÁŽmÁŽm¨uT¨uS§tS§tS§tR¦sR¦sQ…_O…_O…_O„^O„^Oƒ^Oƒ^O‚^O‚]O]O€]O¢rS¡rS¡rS¸‰k·‰l·‰l¶‰m¶‰mµ‰m´‰n³‰n›qWšqX™qX®‡o­‡o«†p¨…p¤ƒp pœp—}o{cXv`Vp]U}nishfhaba\_DAF::B$)4MYkMYkMYkŒtctq\QPPIKFDI;>H/8GMZkTxªTx«Tx«Tx«Ty«Ty«Ty«Uy«Uy«Uy«†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸHmŸHmŸImŸImŸImŸImŸImŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšChšChšChšChšChšChšChšChšCgšCgš&K}&K}&K}&K}&J}&J}Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜&J|&J|&J|&J|&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;GY;GY;GY;GY;,#I=:H82YF?^JA|e[‚j]ˆn`Œqcte”wg—yiš|k~l €n£‚o¤ƒp¦…q­‰s°Šs›u]žv^Ÿw^¡x_£y_¤z_¥z_¦{_¿“w¿“wÀ“vÁ“vÁ“v“u“u“tª{\ª{\ªz[ªzZªyZªyY©xXÁpÀo¨wW¨vV§vV§uU¦uU¦uT¥tT½Œl¼‹k¼‹k¼‹k»‹k»‹kºŠk¢sT¢rT¢rT¡rT¡rT¡rU rU rV·Šn¶ŠnµŠnµŠo´Šo³‰o²‰p±‰p™qY®ˆq¬‡qª†r§…r¤„r ‚rœ€q€gZ{dYvaXp^WiYU`TRVNOb]aEBH<+[NL^SQWNNKFJ?AI2:HTx«Ty«Ty«Ty«Uy«Uy«Uy«Uy«Uy«‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝImŸImŸImŸImŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšChš&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}CgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™Bg™Bg™Bf™Bf™Bf™&J|&J|Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;HY;HY;HY;HY;GY3("D::B41RB=YG@wcZ}g\ƒk_‡nbŒrdug}aRdT„gV‡iX‰kY¢ƒq¤„r¥…s§†t‘p^’q^Ÿw` x`¢y`£z`¤za¥{a½“x¾“x¿“w¿“wÀ“wÀ“vÀ“vÀ“vÀ“uÀ’uÀ’tÀ‘sÀ‘sÀ‘r¿r¿q¿q¾p¾Žp¾Žo½Žo¥vW¼n¼Œn»Œn»Œn»ŒnºŒnº‹m¢tV¡sV¡sV¡sV sV sWŸsWŸsXžsXµŠpµŠp´ŠpœsY›sYšrZ˜r[–r\”q\‘p]¦†t£„tŸƒsœs€h\{e[vbYo^XhZV`USXPQNJMECJRS[47A+((MYkMYkMYkMZk(5F(5F(5FOHJT=+YML_SRZQQMGJABI2:H/T†Uy«Uy«Uy«Uy«Uy«Uy«‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬Þ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhšDhš'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}CgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Bg™Bg™Bg™Bg™&J|&J|Bf™Bf™Bf™Bf™Bf˜Bf˜Bf˜Bf˜Bf˜;HY;HY;HY;HY;HY;HY>DM>DM;HY89<:+#9&B52I94ZHAxd[}g^k`†nc‹rey_R}bTeVƒgX…iYˆk[Šl\Œn]o^¥‡v§ˆvšvaœwažxa yb¢zb¤{b¤{a¼“x½“x¦|a§|a§|`§{`§{_§{_§{^§z^¾‘u¾‘t¾‘t¾s½s½r½r¥wZ¤wZ¤vY¤vY£vY£uX¢uX¢uX¢uX¹Œp¸Œp¸Œp·Œp·‹p¶‹p¶‹pµ‹qµ‹qtZ›t[šs\™s\˜s]–r]”r^’q^p^o^Šn^‡l^ƒj^h]{f\ub[n^YgZW_UTWPQOKOEEKST]JNY>=?JJIMYkMYk(5F(5F(5F(5F(5F)5G)5GK=4S<*XMLbWVYPPLGJ@AI/T†/T†Uy«Uy«Uy«‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞImŸImŸImŸIm ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞIm Im Im Im Im Im Im Im ˆ¬Þˆ¬Þˆ¬Þˆ¬Þ'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Dh›Dh›Dh›Dh›DhšDhšDhšDhš'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}ChšChšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™Cg™&J|&J|&J|&J|&J|Bg™Bg™Bg™Bf™Bf™Bf™Bf™Bf˜Bf˜;HY;HY;HY;HY;HY;HYCIR>DMCIR;HYCIR.$0"8&?*G/V=+w[F{g^€kanXMs\Px_S{bU~dWfYƒhZ†j\ˆl]Šm^¢…v§ˆwªŠx­Œy¯y±Žz´zµz·‘z¹’z£{b£{b¤{b¥{b¥{a¥{a¥{`¥{`¥z_¥z_¥z^¼‘u¥y]¤y]¤x]¤x\£w\£w[¢w[¢v[¢v[¡v[¡v[¸r·r¶r¶ŒsµŒs´Œs´Œs²Œt±‹u°‹u˜t^–s_•s_“r_’r`q`p`¡…wž„v›‚v—€u“~twd]sb[l^ZeYW]TUUORLJOYYaRU^JOZ>>@!$)RXaMYk39B-3<-3<(5F)5G)5G)5G)5G)5GFDJK9*^K=YONg\\TLMIFJ:>I0T†0T†ImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞIm Im In In In In In In ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßIn In In In In ˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ß'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}Di›Di›Dh›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}ChšChšChšChšChšCgšCgšCgšCgšCgšCg™Cg™Cg™Cg™Cg™Cg™&J}&J}&J}&J}&J|&J|&J|&J|&J|Bg™Bg™Bg™Bg™Bg™Bf™Bf™EM>EMCIR;HY;HYCIRCIR)6&8&@*H0I1!\B0}_JhTKjM8q[Pt]Sw`U{cW~eYg[ƒi\…k^‡m_Ÿ…v¢†w¥ˆx¨Šyª‹z­z¯Ž{±{²{³{´{žzdŸzd zc zc¡zc¸‘y¸‘y¸‘y¸‘x¸x¸x·w·w·w·wŸw_Ÿw_žw_µŽv´Žv³v²v²w±w°Œw¯Œw®Œw­‹w«‹xªŠx¨‰x¦‰x¥ˆx£‡x¡†xž…x›ƒw—v’~vŽ|t‰ys„vrh\YcXX[TUSNRIHOUXaNS^JFE>>A')+"%(4:C(5F(5F3:B3:B-3<-3<)5G)5G)5G)5G)5G)5GE:4O:*TKLbXWcZZPIKDCJIm Im Im Im ˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßIn In In In In In Jn Jn Jn Jn Jn ˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn ‰­ß‰­ß‰­ß‰­ßˆ­ßˆ­ßˆ­ßˆ­ß'K~'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšChšChšChšChšChšChšCgšCgšCgšCgš&K}&K}&J}&J}&J}&J}&J}&J}&J}&J}&J|&J|&J|Cg™Cg™Cg™Bg™Bg™Bg™EMCIRCIRCIR888DGNCJRCIRBBB(0 8&<)G0M5"X@0z^K†bFŠkUlXPp[Rs^TvaVzcX}fZg\i]™u›‚v„wŸ†x¢‡y¥‰z§Šz©‹{ªŒ{•ve–ve—we˜we°|°|±{²{²{²{²{²{±z±z±Žz±Žz±Žz°Žy™vb˜vb—vb–ub•ub•uc”tc“tc’sbscrcqc¢‡y †y…y›„x˜‚x•w’w|uˆytƒvs~sqyooslmVQTOLR[\dQU`KHHAAD:<@68; &Z`i-4<%');AJ4:C4:C4:C-4<)5G)5G)5G)5G)6G)6G@84H8-N?5YPQmccoghd`dIn In In In In In ˆ¬ßˆ¬ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßˆ­ßJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~Ei›Ei›Ei›Ei›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhšDhšChšChšChš&K}&K}&K}&K}&K}&K}&K}&K}&J}&J}&J}&J}&J}&J}&J}&J}&J}Cg™Cg™Cg™Cg™B9;>68;Z`iZ`iMZk)5G4:C-4<4:C4:C-4<;BJ)5G)6G)6G)6G)6G)6GC6-L;.leg„{{ypqhbeVYcJn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ßJn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn Jn ‰­ß‰­ß‰­ß‰­ß‰­ß‰­ß‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­à‰­àJn¡Jn¡Jn¡Jn¡Jn¡Jn¡Jn¡‰­à‰­à‰­à‰­à‰­à'L~'L~'L~'L~'L~'L~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›'K~'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}DhšDhšDhšDhšDhš'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&K}&J}&J}&J}&J}&J}&J}Cg™Cg™Cg™<535=AG=?D?AD==1(B3)B2&F4'E4)gTGlXJs^OzcTzaPqfethgvjhbVTcWUdXVeYWfZXg[Yh\Zi]Zi][j^\€us€ususts~tt~tt}tt|st{stut~tt|sszrsyqrwpquoqsmpqloXTXTQWPOULLSSJEA<:=99757335./2113)+.'),)+.8:="(3@QJMPV\eT[cNZlNZlZ`iZ`iZ`iZ`iSYbY`h4;C.4=)6GCPaCPaCPaCPaCPaEQbZOGa_emhkŠƒ„nfgeaeJn¡Jn¡Jn¡Jn¡Jn¡Jn¡Š®àŠ®àŠ®àŠ®àŠ®àJo¡Jo¡Jo¡Jo¡Jo¡Jo¡Jo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Š®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡ƒ§Úƒ§Úƒ§Úƒ¨Úƒ¨Úƒ¨Úƒ¨Úƒ¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨ÚEjœEiœEiœEiœEiœ'L~'L~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K}'K}'K}'K}'K}'K}'K}Di›Di›Di›Di›Dh›Dh›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}&K}&K}&K}&K}$.>=I[=I[2)>0&A2'C3(I8-^OFbRHfUJjXMq^RwcVzfYfRDfQCdN@zdTqijrjksklrklrklrklqjmpjmpjmojmojmnimmimkhliflscYm`Xg\VbYT^VRE>;A<:>98:77645:873220/0,-/)+.*,/#%( &15;5BSKKKJMP]dlU[dNZlNZlZ`iTZcZaiZaiZ`iZ`iSZbŽ”LS[V]eDPbDPbDPbDPbDPbDPbWMF^^diei®”†…rkeaeJo¡Jo¡Jo¡Jo¡Š®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àŠ®àKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Š¯áŠ¯áŠ¯áŠ¯áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡ƒ¨Úƒ¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨ÛGk'L~'L~'L~'L~'L~'L~'K~'K~'K~'K~'K~'K~'K~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Di›Di›Di›Di›Di›'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}&K}&K}&K}&K}%/> ,>=I[=I[ ,> ,>#)2(.7#)2(.7#)2#)2#)2#)2(.7(.7(.767@D>A214$+3#%("$'###""""""&&&888888cB*}\I@!%+%!5*$:/(;0)<1*>3+@4+>1(bUKN@6OA6L=3QB8M?4_RKaTLbUMcVNcVNcVObVOaVOaUO`UO_UO^UO^TO\SOYRNWPNUOMWPKYSOWRN;63953:76755333,/2'),%(+"%(!' "&,KXi04:JMP]_b^emU[dNZlNZlT[cU[dU[dU[d[aj•ž•ž•žˆŽ—–¥W]fDPbDPbDPbDPbDPbDPb‘nSž…w—|m¨‚ƒqjKo¡Ko¡Ko¡Š®àŠ®àŠ®àŠ®áŠ®áŠ®áŠ®áŠ®áŠ®áŠ¯áŠ¯áŠ¯áKo¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¡Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨Û„¨Û„¨Û„¨Û„©Û„©Û„©Û„©ÛGkGkGkGkGkGk'L~'L~'L~'L~'K~'K~'K~Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Ei›Di›Di›'K}'K}'K}'K}HlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}'K}'K}'K}'K}'K}'K}&K}*2? ->=I[=I[ ,> ,> ,>#)2#)2#)2(.7(.7#)2#)2(.7(.7(.7(.7/28:79G@A<89',4#%(#%(######""""""8888888887'vS:‹jW;) + &3#.$-% .% .& /&!,#,#@70A71XNHXNHWNHWNHZRLYQLYQLXQLWQLWPLUOLSNLQMKOLJMJJ0//.-.,,-&(+"(!' 15;6CT37=MMMKMP^ad_enY`hNZlNZlU\dV\eŠ‘™Š™Š™–Ÿ–Ÿ–ž•ž“œ—¦Œ’›ƒ¡DQbDQbDQbDQbDQbMUc¤ƒ‘ylŸ‡|€oiKo¡Š¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯áŠ¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áKo¢Ko¢Ko¢Ko¢Ko¢Ko¢Ko¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢Kp¢‹¯â‹¯â‹¯â‹¯âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢„¨Ú„¨Ú„¨Ú„¨Ú„¨Ú„¨Û„¨Û„¨Û„¨Û„©Û„©Û„©Û„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©ÛGkžGkžGkžGkžGkžGkžGkžGkžGkž…©Û…©Ü…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}'K}'K}'K}'K}'K}HO\=J[=J[=J[ -> ,> ,>(.7#)2#)2(.7(.7(.7#)2(.7(.7(/7(/7)/8/28114H7,99@.05&,5$&)$$$######"""(((8888888888888884"nO9„gXˆjZE/ (-" + %' %$#" ! !$ 48>7CU:GX JJJLLLKMPagp_enNZlLPV˜Ÿ§Œ’›Œ’›Œ’›‹’š‹‘šŠ‘™‘— –Ÿ–Ÿ–Ÿ“œ“œ—¦„¢„¢DQbDQbDQbDQbNVc…uo‡rjѼ³º«§‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯áKp¢Kp¢Kp¢Kp¢Kp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢‹°â‹°â‹°â‹°âŒ°âŒ°âŒ°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢„¨Û„¨Û„¨Û„©Û„©Û„©Û„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©ÛGkžGkžGkžGlžGlžGlž…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž'K}'K}'K}'K}DhšDhšDhšIP\=J[=J[=J[=J[ -> ->(.7#)2#)2(.7(.7(.7#)2(.7(/7(/7)/8)/8)/803966:E?AC>A856,07%'*%')$$$######(((DDDBBB8888888880 cF1w]OcS{`QS;+57'   *      ;?E7CU;HY=I[ JJJMMMKMPacfbhq‘— ƒ¡ƒ¡‘— “œ“œ“œŒ“›Œ’›Œ’›‹‘š‘— ‘— —Ÿ™Ÿ¨”œ“œ“œ„‘¢„‘¢„‘¢„‘¢EQcHScNVd´¨§¿®¨Èµ®¯‘‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯á‹¯â‹¯â‹¯â‹¯â‹¯â‹¯â‹°â‹°â‹°â‹°â‹°â‹°â‹°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Œ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âLp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp¢Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£Lp£„©Û„©Û„©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Û…©Ü…©Ü…©ÜGlžGlž…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÝHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž‡«Ý‡«ÝDhšDhšDhšDhš=J[=J[=J[=J[=J[=J[ ->(/7#)2#)2(.7(.7(.7#*2(/7)/8)/8)/8)/8)08*0903:56:88@KBB=;@348*08&(+'(*%%%$$$(((EEE(((&&&">-"bF3oXMs[Ow]Py^PqbpXMdH5R<,Q;, &%%#'-"'-&3DS_qP\nR_p>J\?K]AG@B::@66:-29'),)'%BBBFFFEEE)))))))))&&& @@@FFFACFZ\_[ajagp„¢„¢„¢ž¥­Ÿ¦®—¦–¥–ž•žŽ•Ž””œ“œ‘— —Ÿ›¡ªš ©™ ¨Ž•Ž”Ž”…‘£…‘£…‘£EQcGRcKTdPWd­¥§¿¯ª‹°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãLp£Lp£Lq£Lq£Lq£Lq£Lq£Lq£Lq£Œ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£…©Û…©Û…©Û…©Û…©Û…©Û…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHlžHlžHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«ÞŸ>J\>J\=J[=J[=J[=J[FLU39B#*2(/7)/7)/8$*3$*3$*3)/8)08*09*09*19',5(-5*.6.17338@<=G@BH@BXW]UUXLPWFHKDFHKKKHHH+++%%%%%%$$$###!!!!!!777777777777777777777AAAFFFACFACF\^aeltbhqDQbDQbDQbŸ¥®¡§°¡§°¡§°¡§°—¦–Ÿ”š£”š£“™¢’™¡’˜¡‘˜ ‘— ›¡ª›¡ªš ©•ž™Ÿ¨Ž”ERcERcERcERcHScLUdRXd|njŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°âŒ°ãŒ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£Mq£…©Ü…©Ü…©Ü…©Ü…©Ü…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÜ†ªÜ†ªÜ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬ÞŽŸŽŸŽŸŽŸ>J\=J[=J[FLUFLU(/7(/7*08*08%+3$*3$+3$+3*09*09*19&,5&,5'-6).6*/7-18NPURRVXUVc]^f^_[X]\XYTUZLQYKMPFHJ)))(((&&&%%%%%%$$$$$$###!!!!!!!!!777777777BBBEEEACGADGFIL\ckZ`iTZcDQbDQbDQbagpbiqcircir¢©±¢¨±¡¨°¡§°•œ¤•›¤”›£”š£“™¢’™¡’˜¡œ¢«œ¢«›¡ªš¡©•žY`hY_hERcERcERcGSdJTdNVdTYeLp¢Lp¢Œ°ãŒ°ãŒ°ãŒ°ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ãŒ±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ãMq£Mq£±ã±ã±ã±ä±ä±ä±ä±ä±ä±ä±ä±ä±ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²ä²äMq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤Mq¤…ªÜ…ªÜ…ªÜ…ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†ªÝ†ªÝ†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«ÝHmŸ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞŽŸŽŸŽŸŽŸŽŸŽŸŽŸFLUFLUFLU)/8+08+08&+3&+3%+4%+4%+4*19+1:&,5'-5'-6(.6FLTHMTINUKOVOQWSTXYWX`[^lbac]_f_\a_aY\aRX_,.1*,.*+-***((('''&&&%%%%%%$$$$$$$$$###!!!!!!!!!!!!!!!%%%%%%%%%%%%"""""""""KKKJJJFFFGIL]_b^dm\bkV]eDQbEQcEQcEQccirdjsdksektdjsdjscir£©²¢¨±¢¨±–œ¥•œ¤•›¤”›£”š£“™¢’™¡£¬œ¢«›¢ª[ajZ`iOU^ERcERcFRdFRdITdLUdPWeVZeLp£Lq£Lq£Lq£±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ã±ä±ä±ä±ä±ä±ä²ä²ä²äMq£²ä²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äMr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤Mr¤†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž†«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«ÞHmŸHmŸHmŸ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ÞŽŸŽŸŽŸŽŸ‚Ž ‚Ž ‚Ž ‚Ž ”›£Š™ŠŽ•-18,18',3',4',4&,4%,4+1:,2:'-5DJSEKSEKTFLTFLUHMUINVKOWLPWQSYTUZWWZpjje^`offb\_h`]eaaCCG8;A27?-/2+-/.+)******)))((('''&&&&&&%%%%%%$$$$$$$$$$$$$$$$$$######???EEEEEEEEE((((((###&&&%%%HJMHJMHJMHJM_en]dlZ`i_enEQcEQcEQcEQcbhqektflufluflufluektektdksdjscjr£©²¢©±¢¨±–œ¥•œ¤•›¤”›£”š£“™¢£¬\ckQW`[ajZaiOU^FRdFRdFRdHSdKUdNVeRXeX\fLq£Mq£Mq£Mq£Mq£±ã±ã±ã±ã±ã±ä±ä±ä±ä±ä²ä²ä²ä²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äMr¤Mr¤Mr¤Mr¤Mr¤Ž²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åŽ²åNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤†ªÜ†ªÜ†ªÜ†ªÜ†ªÜ†ªÜHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlž‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬ÞHmŸHmŸHmŸHmŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ‚Ž ”›£Š‘™‹•‹•PT[KOVJOV(-4(-4'-5'-5JOXEKSEKSEKTFLTFLTGMUGMUHNVIOWKPWLQXMRYPTZTV[\]a_^asljd^azporjkE@CLEBIEFEDG29A28A17@135,.1+-0+,/./1..0'),)))++++++++++++***FFFFFFACFACFEEEACFACFŠŒJLOJLOKQZ_en]clY_hU[dEQcEQcEQcEQcEQcagp[aj\bk\bkgnvgnvgmvgmvfluflueltektdksdjscjrcir¢©±—¦–œ¥•œ¤•›¤TZcSYbRYaRXaQW`[bj[ajZ`iFSdFSdGSdJTdLVePXeTZfZ]fMq£Mq£Mq£Mq£Mq£Mq£Mq£²ä²ä²ä²ä²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äŽ²äNr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Nr¤Ž²åŽ²åŽ²åŽ²åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³åŽ³å³å³å³å³å³å³å³åNr¤Nr¤Nr¤Nr¤Nr¤³å³å†ªÜ†ªÜ†ªÝHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlžHlŸHlŸHlŸHlŸHlŸHlŸ‡«Ý‡«Ý‡«Ý‡«Ý‡«Ý‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡«Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬Þ‡¬ÞImŸImŸImŸImŸImŸImŸImŸImŸImŸImŸˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬Þˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ¬ßˆ­ß‚Ž ‚Ž ‚Ž ‚Ž ‚ ‚ ‚ ‚ ‚ …Œ”’•šŒ•‘”›LPVLPWKPW‹—‹—‹˜•‹‘™FLTFLTFLUGMUGMUHMVHNVINWIOWKPXLQYMRYNSZTX`X[a[]b]^c__ccacib`JDGi__aYYPJLD@C=;AKEDTQR@?A>>A;/5>.4=-4'IRB console') +top.protocol(:WM_DELETE_WINDOW){ Tk.exit } + +case (Tk.windowingsystem) +when 'win32' + fnt = ['MS Gothic', '-12'] +else + fnt = ['courier', '-12'] +end + +console = TkTextIO.new(top, :mode=>:console, + :width=>80).pack(:side=>:left, + :expand=>true, :fill=>:both) +console.yscrollbar(TkScrollbar.new(top, :width=>10).pack(:before=>console, + :side=>:right, + :expand=>false, + :fill=>:y)) + +# save original I/O +out = $stdout +err = $stderr + +irb_thread = nil +ev_loop = Thread.new{ + begin + Tk.mainloop + ensure + $stdout = out + $stderr = err + irb_thread.kill if irb_thread + end +} + +# window position control +root = Tk.root + +r_x = root.winfo_rootx +r_y = root.winfo_rooty +r_w = root.winfo_width + +t_x = top.winfo_rootx +t_y = top.winfo_rooty +t_w = top.winfo_width + +delta = 10 + +ratio = 0.8 +s_w = (ratio * root.winfo_screenwidth).to_i + +if r_x < t_x + r_x, t_x = t_x, r_x +end +if t_x + t_w + r_w + delta < s_w + r_x = t_x + t_w + delta +elsif t_w + r_w + delta < s_w + r_x = s_w - r_w + t_x = r_x - t_w +else + r_x = s_w - r_w + t_x = 0 +end + +root.geometry("+#{r_x}+#{r_y}") +top.geometry("+#{t_x}+#{t_y}") + +root.raise +console.focus + +# I/O setup +$stdin = console +$stdout = console +$stderr = console + +# dummy for rubyw.exe on Windows +def STDIN.tty? + true +end + +# IRB setup +IRB.init_config(nil) +IRB.conf[:USE_READLINE] = false +IRB.init_error +irb = IRB::Irb.new +IRB.conf[:MAIN_CONTEXT] = irb.context + +class IRB::StdioInputMethod + def gets + prompt = "\n" << @prompt + $stdin.instance_eval{ + flush + @prompt = prompt + _set_console_line + @prompt = nil + _see_pos + } + + @line[@line_no += 1] = $stdin.gets + end +end + +# IRB start +$stdout.print("*** IRB console on Ruby/Tk (#{release}) ") +irb_thread = Thread.new{ + catch(:IRB_EXIT){ + loop { + begin + irb.eval_input + rescue Exception + end + } + } +} + +console.bind('Control-c'){ + console.insert('end', "^C\n") + irb_thread.raise RubyLex::TerminateLineInput +} + +irb_thread.join + +# exit +ev_loop.kill +Tk.exit diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/iso2022-kr.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/iso2022-kr.txt new file mode 100644 index 0000000..2e3fe6e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/iso2022-kr.txt @@ -0,0 +1,2 @@ +Sample text: +$)C Hangul (GQ1[) >H3gGO<H3gGO=J4O1n diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar1.rb new file mode 100644 index 0000000..9fa1201 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar1.rb @@ -0,0 +1,51 @@ +# +# menubar sample 1 : use frame and menubuttons +# + +require 'tk' + +radio_var = TkVariable.new('y') + +menu_spec = [ + [['File', 0], + {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0}, + '---', + ['Check_A', TkVariable.new(true), 6], + {:type=>'checkbutton', :label=>'Check_B', + :variable=>TkVariable.new, :underline=>6}, + '---', + ['Radio_X', [radio_var, 'x'], 6, '', {:foreground=>'black'}], + ['Radio_Y', [radio_var, 'y'], 6], + ['Radio_Z', [radio_var, 'z'], 6], + '---', + ['cascade', [ + ['sss', proc{p 'sss'}, 0], + ['ttt', proc{p 'ttt'}, 0], + ['uuu', proc{p 'uuu'}, 0], + ['vvv', proc{p 'vvv'}, 0], + ], + 0, '', + {:font=>'Courier 16 italic', + :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}], + '---', + ['Quit', proc{exit}, 0]], + + [['Edit', 0], + ['Cut', proc{puts('Cut clicked')}, 2], + ['Copy', proc{puts('Copy clicked')}, 0], + ['Paste', proc{puts('Paste clicked')}, 0]], + + [['Help', 0, {:menu_name=>'help'}], + ['About This', proc{puts('Ruby/Tk menubar sample 1')}, 6]] +] + +menubar = TkMenubar.new(nil, menu_spec, + 'tearoff'=>false, + 'foreground'=>'grey40', + 'activeforeground'=>'red', + 'font'=>'Helvetia 12 bold') +menubar.pack('side'=>'top', 'fill'=>'x') + +TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec. Maybe, on windows, this menubar does not work properly about keyboard shortcuts. Then, please use "menu" option of root/toplevel widget (see sample/menubar2.rb).') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar2.rb new file mode 100644 index 0000000..4507d8b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/menubar2.rb @@ -0,0 +1,56 @@ +# +# menubar sample 2 : use 'menu' option of root/toplevel widget +# + +require 'tk' + +radio_var = TkVariable.new('y') + +menu_spec = [ + [['File', 0], + {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0}, + '---', + ['Check_A', TkVariable.new(true), 6], + {:type=>'checkbutton', :label=>'Check_B', + :variable=>TkVariable.new, :underline=>6}, + '---', + ['Radio_X', [radio_var, 'x'], 6, '', {:foreground=>'black'}], + ['Radio_Y', [radio_var, 'y'], 6], + ['Radio_Z', [radio_var, 'z'], 6], + '---', + ['cascade', [ + ['sss', proc{p 'sss'}, 0], + ['ttt', proc{p 'ttt'}, 0], + ['uuu', proc{p 'uuu'}, 0], + ['vvv', proc{p 'vvv'}, 0], + ], + 0, '', + {:font=>'Courier 16 italic', + :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}], + '---', + ['Quit', proc{exit}, 0]], + + [['Edit', 0], + ['Cut', proc{puts('Cut clicked')}, 2], + ['Copy', proc{puts('Copy clicked')}, 0], + ['Paste', proc{puts('Paste clicked')}, 0]], + + [['Help', 0, {:menu_name=>'help'}], + ['About This', proc{puts('Ruby/Tk menubar sample 2')}, 6]] +] + +mbar = Tk.root.add_menubar(menu_spec, + # followings are default configure options + 'tearoff'=>'false', + 'foreground'=>'grey40', + 'activeforeground'=>'red', + 'font'=>'Helvetia 12 bold') +# This (default configure options) is NOT same the following. +# +# mbar = Tk.root.add_menubar(menu_spec) +# mbar.configure('foreground'=>'grey40', 'activeforeground'=>'red', +# 'font'=>'Helvetia 12 bold') + +TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec.') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/README new file mode 100644 index 0000000..2e3ff2a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/README @@ -0,0 +1,3 @@ +Message catalogs in this directory depend on Tcl/Tk's message catalogs. +Texts of each locale are copied from Tcl/Tk8.5a1 widget demos. +Please refer '../msgs_tk/README'. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/cs.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/cs.msg new file mode 100644 index 0000000..199f2a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/cs.msg @@ -0,0 +1,84 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + cs "Application Error", "Chyba programu" + cs "Blue", "Modr\341" + cs "Color", "Barva" + cs "Delete", "Smazat" + cs "Error", "Chyba" + cs "Exit", "Konec" + cs "Green", "Zelen\341" + cs "Red", "\\u010cerven\341" + cs "blue", "modr\341" + cs "green", "zelen\341" + cs "red", "\\u010derven\341" +} + +TkMsgCatalog.new('::tk') { + cs "&Abort", "&P\\u0159eru\\u0161it" + cs "About...", "O programu..." + cs "All Files", "V\\u0161echny soubory" + cs "Application Error", "Chyba programu" + cs "&Blue", "&Modr\341" + cs "&Cancel", "&Zru\\u0161it" + cs "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Nemohu zm\\u011bnit atku\341ln\355 adres\341\\u0159 na \"%1\$s\".\nP\\u0159\355stup odm\355tnut." + cs "Choose Directory", "V\375b\\u011br adres\341\\u0159e" + cs "Clear", "Smazat" + cs "Color", "Barva" + cs "Console", "Konzole" + cs "Copy", "Kop\355rovat" + cs "Cut", "Vy\\u0159\355znout" + cs "Delete", "Smazat" + cs "Details >>", "Detaily >>" + cs "Directory \"%1\$s\" does not exist.", "Adres\341\\u0159 \"%1\$s\" neexistuje." + cs "&Directory:", "&Adres\341\\u0159:" + cs "Error: %1\$s", "Chyba: %1\$s" + cs "Exit", "Konec" + cs "File \"%1\$s\" already exists.\n\n", "Soubor \"%1\$s\" ji\\u017e existuje.\n\n" + cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Soubor \"%1\$s\" ji\\u017e existuje.\nChcete jej p\\u0159epsat?" + cs "File \"%1\$s\" does not exist.", "Soubor \"%1\$s\" neexistuje." + cs "File &name:", "&Jm\351no souboru:" + cs "File &names:", "&Jm\351na soubor\\u016f:" + cs "Files of &type:", "&Typy soubor\\u016f:" + cs "Fi&les:", "Sou&bory:" + cs "&Filter", "&Filtr" + cs "Fil&ter:", "Fil&tr:" + cs "&Green", "Ze&len\341" + cs "Hi" + cs "Hide Console", "Skr\375t konsolu" + cs "&Ignore", "&Ignorovat" + cs "Invalid file name \"%1\$s\".", "\\u0160patn\351 jm\351no souboru \"%1\$s\"." + cs "Log Files", "Log soubory" + cs "&No", "&Ne" + cs "&OK" + cs "Ok" + cs "Open", "Otev\\u0159\355t" + cs "&Open", "&Otev\\u0159\355t" + cs "Open Multiple Files", "Otev\\u0159\355t v\355ce soubor\\u016f" + cs "Paste", "Vlo\\u017eit" + cs "Quit", "Skon\\u010dit" + cs "&Red", " \\u010ce&rven\341" + cs "Replace existing file?", "Nahradit st\341vaj\355c\355 soubor?" + cs "&Retry", "Z&novu" + cs "&Save", "&Ulo\\u017eit" + cs "Save As", "Ulo\\u017eit jako" + cs "Save To Log", "Ulo\\u017eit do logu" + cs "Select Log File", "Vybrat log soubor" + cs "Select a file to source", "Vybrat soubor k nahr\341n\355" + cs "&Selection:", "&V\375b\\u011br:" + cs "Skip Messages", "P\\u0159esko\\u010dit zpr\341vy" + cs "Source...", "Nahr\341t..." + cs "Tcl Scripts", "Tcl skripty" + cs "Tcl for Windows", "Tcl pro Windows" + cs "Text Files", "Textov\351 soubory" + cs "&Yes", "&Ano" + cs "abort", "p\\u0159eru\\u0161it" + cs "blue", "modr\341" + cs "cancel", "zru\\u0161it" + cs "extension", "p\\u0159\355pona" + cs "extensions", "p\\u0159\355pony" + cs "green", "zelen\341" + cs "ignore", "ignorovat" + cs "ok" + cs "red", "\\u010derven\341" + cs "retry", "znovu" + cs "yes", "ano" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/de.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/de.msg new file mode 100644 index 0000000..283874d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/de.msg @@ -0,0 +1,88 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + de "Application Error", "Applikationsfehler" + de "Blue", "Blau" + de "Color", "Farbe" + de "Delete", "L\\u00f6schen" + de "Error", "Fehler" + de "Exit", "Ende" + de "Green", "Gr\\u00fcn" + de "Red", "Rot" + de "blue", "blau" + de "green", "gr\\u00fcn" + de "red", "rot" +} + +TkMsgCatalog.new('::tk') { + de "&Abort", "&Abbruch" + de "&About...", "&\\u00dcber..." + de "All Files", "Alle Dateien" + de "Application Error", "Applikationsfehler" + de "&Blue", "&Blau" + de "&Cancel", "&Abbruch" + de "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden." + de "Choose Directory", "W\\u00e4hle Verzeichnis" + de "&Clear", "&R\\u00fccksetzen" + de "&Clear Console", "&Konsole l\\u00f6schen" + de "Color", "Farbe" + de "Console", "Konsole" + de "&Copy", "&Kopieren" + de "Cu&t", "Aus&schneiden" + de "&Delete", "&L\\u00f6schen" + de "Details >>" + de "Directory \"%1\$s\" does not exist.", "Das Verzeichnis \"%1\$s\" existiert nicht." + de "&Directory:", "&Verzeichnis:" + de "&Edit", "&Bearbieten" + de "Error: %1\$s", "Fehler: %1\$s" + de "E&xit", "&Ende" + de "&File", "&Datei" + de "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei \\u00fcberschreiben ?" + de "File \"%1\$s\" already exists.\n\n", "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n" + de "File \"%1\$s\" does not exist.", "Die Datei \"%1\$s\" existiert nicht." + de "File &name:", "Datei&name:" + de "File &names:", "Datei&namen:" + de "Files of &type:", "Dateien des &Typs:" + de "Fi&les:", "Dat&eien:" + de "&Filter" + de "Fil&ter:" + de "&Green", "&Gr\\u00fcn" + de "&Help", "&Hilfe" + de "Hi", "Hallo" + de "&Hide Console", "&Konsole unsichtbar machen" + de "&Ignore", "&Ignorieren" + de "Invalid file name \"%1\$s\".", "Ung\\u00fcltiger Dateiname \"%1\$s\"." + de "Log Files", "Protokolldatei" + de "&No", "&Nein" + de "OK" + de "Ok" + de "Open", "\\u00d6ffnen" + de "&Open", "\\u00d6&ffnen" + de "Open Multiple Files" + de "P&aste", "E&inf\\u00fcgen" + de "&Quit", "&Beenden" + de "&Red", "&Rot" + de "Replace existing file?", "Existierende Datei ersetzen?" + de "&Retry", "&Wiederholen" + de "&Save", "&Speichern" + de "Save As", "Speichern unter" + de "Save To Log", "In Protokoll speichern" + de "Select Log File", "Protokolldatei ausw\\u00e4hlen" + de "Select a file to source", "Auszuf\\u00fchrende Datei ausw\\u00e4hlen" + de "&Selection:", "Auswah&l:" + de "Skip Messages", "Weitere Nachrichten \\u00fcberspringen" + de "&Source...", "&Ausf\\u00fchren..." + de "Tcl Scripts", "Tcl-Skripte" + de "Tcl for Windows", "Tcl f\\u00fcr Windows" + de "Text Files", "Textdateien" + de "&Yes", "&Ja" + de "abort", "abbrechen" + de "blue", "blau" + de "cancel", "abbrechen" + de "extension", "Erweiterung" + de "extensions", "Erweiterungen" + de "green", "gr\\u00fcn" + de "ignore", "ignorieren" + de "ok" + de "red", "rot" + de "retry", "wiederholen" + de "yes", "ja" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/el.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/el.msg new file mode 100644 index 0000000..f314ae0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/el.msg @@ -0,0 +1,98 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + el 'Application Error', '\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2' + el 'Blue', '\u039c\u03c0\u03bb\u03b5' + el 'Color', '\u03a7\u03c1\u03ce\u03bc\u03b1' + el 'Delete', '\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae' + el 'Error', '\u039b\u03ac\u03b8\u03bf\u03c2' + el 'Exit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2' + el 'Green', '\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf' + el 'Red', '\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf' + el 'blue', '\u03bc\u03c0\u03bb\u03b5' + el 'green', '\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf' + el 'red', '\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf' +} + +TkMsgCatalog.new('::tk') { + el '&Abort', '\u03a4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2' + el 'About...', '\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac...' + el 'All Files', '\u038c\u03bb\u03b1 \u03c4\u03b1 \u0391\u03c1\u03c7\u03b5\u03af\u03b1' + el 'Application Error', '\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2' + el '&Blue', '\u039c\u03c0\u03bb\u03b5' + el '&Cancel', '\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7' + el 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', \ + '\u0394\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae \u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03ba\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 \u03c3\u03b5 "%1\$s".' \ + "\n" \ + '\u0397 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03c4\u03b1\u03b9.' + el 'Choose Directory', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u039a\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5' + el 'Clear', '\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2' + el 'Color', '\u03a7\u03c1\u03ce\u03bc\u03b1' + el 'Console', '\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1' + el 'Copy', '\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae' + el 'Cut', '\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae' + el 'Delete', '\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae' + el 'Details >>', '\u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2 >>' + el 'Directory "%1\$s", does not exist.', \ + '\u039f \u03ba\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \'%1\$s\' \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' + el '&Directory:', '&\u039a\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2:' + el 'Error: %1\$s', '\u039b\u03ac\u03b8\u03bf\u03c2: %1\$s' + el 'Exit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2' + el 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', \ + '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' \ + "\n" \ + '\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03c5\u03c6\u03b8\u03b5\u03af;' + el 'File "%1\$s" already exists.' "\n\n", \ + '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' "\n\n" + el 'File "%1\$s" does not exist.', \ + '\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf "%1\$s" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.' + el 'File &name:', '\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5:' + el 'File &names:', '\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd:' + el 'Files of &type:', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u03c4\u03bf\u03c5 &\u03c4\u03cd\u03c0\u03bf\u03c5:' + el 'Fi&les:', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1:' + el '&Filter', '\u03a6\u03af\u03bb\u03c4\u03c1\u03bf' + el 'Fil&ter:', '\u03a6\u03af\u03bb\u03c4\u03c1\u03bf:' + el '&Green', '\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf' + el 'Hi', '\u0393\u03b5\u03b9\u03b1' + el 'Hide Console', '\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03ba\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1\u03c2' + el '&Ignore', '\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7' + el 'Invalid file name "%1\$s".', \ + '\u0386\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 "%1\$s".' + el 'Log Files', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2' + el '&No', '\u038c\u03c7\u03b9' + el '&OK', '\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9' + el '&Ok', '\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9' + el 'Open', '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1' + el '&Open', '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1' + el 'Open Multiple Files', \ + '\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ce\u03bd \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd' + el 'Paste', '\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7' + el 'Quit', '\u0388\u03be\u03bf\u03b4\u03bf\u03c2' + el '&Red', '\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf' + el 'Replace existing file?', \ + '\u0395\u03c0\u03b9\u03ba\u03ac\u03bb\u03c5\u03c8\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5;' + el '&Retry', '\u03a0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac' + el '&Save', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7' + el 'Save As', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03b1\u03bd' + el 'Save To Log', '\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2' + el 'Select Log File', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2' + el 'Select a file to source', \ + '\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b3\u03b9\u03b1 \u03b5\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7' + el '&Selection:', '\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae:' + el 'Skip Messages', '\u0391\u03c0\u03bf\u03c6\u03c5\u03b3\u03ae \u03bc\u03c5\u03bd\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd' + el 'Source...', '\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7...' + el 'Tcl Scripts', 'Tcl Scripts' + el 'Tcl for Windows', 'Tcl \u03b3\u03b9\u03b1 Windows' + el 'Text Files', '\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5' + el '&Yes', '\u039d\u03b1\u03b9' + el 'abort', '\u03c4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2' + el 'blue', '\u03bc\u03c0\u03bb\u03b5' + el 'cancel', '\u03b1\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7' + el 'extension', '\u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7' + el 'extensions', '\u03b5\u03c0\u03b5\u03ba\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2' + el 'green', '\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf' + el 'ignore', '\u03b1\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7' + el 'ok', '\u03b5\u03bd\u03c4\u03ac\u03be\u03b5\u03b9' + el 'red', '\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf' + el 'retry', '\u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac' + el 'yes', '\u03bd\u03b1\u03b9' +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en.msg new file mode 100644 index 0000000..9b70239 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en.msg @@ -0,0 +1,83 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + en "Application Error" + en "Blue" + en "Color" + en "Delete" + en "Error" + en "Green" + en "Red" + en "blue" + en "green" + en "red" +} + +TkMsgCatalog.new('::tk') { + en "&Abort" + en "About..." + en "All Files" + en "Application Error" + en "&Blue" + en "&Cancel" + en "Cannot change to the directory \"%1\$s\".\nPermission denied." + en "Choose Directory" + en "Clear" + en "Color" + en "Console" + en "Copy" + en "Cut" + en "Delete" + en "Details >>" + en "Directory \"%1\$s\" does not exist." + en "&Directory:" + en "Error: %1\$s" + en "Exit" + en "File \"%1\$s\" already exists.\nDo you want to overwrite it?" + en "File \"%1\$s\" already exists.\n\n" + en "File \"%1\$s\" does not exist." + en "File &name:" + en "File &names:" + en "Files of &type:" + en "Fi&les:" + en "&Filter" + en "Fil&ter:" + en "&Green" + en "Hi" + en "Hide Console" + en "&Ignore" + en "Invalid file name \"%1\$s\"." + en "Log Files" + en "&No" + en "&OK" + en "Ok" + en "Open" + en "&Open" + en "Open Multiple Files" + en "Paste" + en "Quit" + en "&Red" + en "Replace existing file?" + en "&Retry" + en "&Save" + en "Save As" + en "Save To Log" + en "Select Log File" + en "Select a file to source" + en "&Selection:" + en "Skip Messages" + en "Source..." + en "Tcl Scripts" + en "Tcl for Windows" + en "Text Files" + en "&Yes" + en "abort" + en "blue" + en "cancel" + en "extension" + en "extensions" + en "green" + en "ignore" + en "ok" + en "red" + en "retry" + en "yes" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en_gb.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en_gb.msg new file mode 100644 index 0000000..97c5895 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/en_gb.msg @@ -0,0 +1,7 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + en_gb 'Color', 'Colour' +} + +TkMsgCatalog.new('::tk') { + en_gb 'Color', 'Colour' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/eo.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/eo.msg new file mode 100644 index 0000000..1630df5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/eo.msg @@ -0,0 +1,87 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + eo 'Application Error', 'Aplikoerraro' + eo 'Blue', 'Blua' + eo 'Color', 'Farbo' + eo 'Delete', 'Forprenu' + eo 'Error', 'Eraro' + eo 'Exit', 'Eliru' + eo 'Green', 'Verda' + eo 'Red', 'Rosa' + eo 'blue', 'blua' + eo 'green', 'verda' + eo 'red', 'ru\u011da' +} + +TkMsgCatalog.new('::tk') { + eo '&Abort', '&\u0108esigo' + eo '&About...', 'Pri...' + eo 'All Files', '\u0108ioj dosieroj' + eo 'Application Error', 'Aplikoerraro' + eo '&Blue', '&Blua' + eo '&Cancel', '&Rezignu' + eo 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Neeble \u0109angi al dosierulon "%1\$s".' "\n" 'Vi ne rajtas tion.' + eo 'Choose Directory', 'Elektu Dosierujo' + eo '&Clear', '&Klaru' + eo '&Clear Console', '&Klaru konzolon' + eo 'Color', 'Farbo' + eo 'Console', 'Konzolo' + eo '&Copy', '&Kopiu' + eo 'Cu&t', '&Enpo\u015digu' + eo '&Delete', '&Forprenu' + eo 'Details >>', 'Detaloj >>' + eo 'Directory "%1\$s" does not exist.', 'La dosierujo "%1\$s" ne ekzistas.' + eo '&Directory:', '&Dosierujo:' + eo '&Edit', '&Redaktu' + eo 'Error: %1\$s', 'Eraro: %1\$s' + eo 'E&xit', '&Eliru' + eo '&File', '&Dosiero' + eo 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'La dosiero "%1\$s" jam ekzistas.' "\n" '\u0108u vi volas anstata\u00fbigi la dosieron?' + eo 'File "%1\$s" already exists.' "\n\n", 'La dosiero "%1\$s" jam egzistas.' "\n\n" + eo 'File "%1\$s" does not exist.', 'La dosierp "%1\$s" ne estas.' + eo 'File &name:', 'Dosiero&nomo:' + eo 'File &names:', 'Dosiero&nomoj:' + eo 'Files of &type:', 'Dosieroj de &Typo:' + eo 'Fi&les:', 'Do&sieroj:' + eo '&Filter', '&Filtrilo' + eo 'Fil&ter:', '&Filtrilo:' + eo '&Green', '&Verda' + eo '&Help', '&Helpu' + eo 'Hi', 'Saluton' + eo '&Hide Console', '&Ka\u015du konzolon' + eo '&Ignore', '&Ignoru' + eo 'Invalid file name "%1\$s".', 'Malvalida dosieronomo "%1\$s".' + eo 'Log Files', 'Protokolo' + eo '&No', '&Ne' + eo 'OK' + eo 'Ok' + eo 'Open', 'Malfermu' + eo '&Open', '&Malfermu' + eo 'Open Multiple Files', 'Melfermu multan dosierojn' + eo 'P&aste', '&Elpo\u015digi' + eo '&Quit', '&Finigu' + eo '&Red', '&Rosa' + eo 'Replace existing file?', '\u0108u anstata\u00fbu ekzistantan dosieron?' + eo '&Retry', '&Ripetu' + eo '&Save', '&Savu' + eo 'Save As', 'Savu kiel' + eo 'Save To Log', 'Savu en protokolon' + eo 'Select Log File', 'Elektu prokolodosieron' + eo 'Select a file to source', 'Elektu dosieron por interpreti' + eo '&Selection:', '&Elekto:' + eo 'Skip Messages', 'transsaltu pluajn mesa\u011dojn' + eo '&Source...', '&Fontoprogramo...' + eo 'Tcl Scripts', 'Tcl-skriptoj' + eo 'Tcl for Windows', 'Tcl por vindoso' + eo 'Text Files', 'Tekstodosierojn' + eo '&Yes', '&Jes' + eo 'abort', '\u0109esigo' + eo 'blue', 'blua' + eo 'cancel', 'rezignu' + eo 'extension', 'ekspansio' + eo 'extensions', 'ekspansioj' + eo 'green', 'verda' + eo 'ignore', 'ignorieren' + eo 'red', 'ru\u011da' + eo 'retry', 'ripetu' + eo 'yes', 'jes' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/es.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/es.msg new file mode 100644 index 0000000..460dbe8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/es.msg @@ -0,0 +1,84 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + es "Application Error", "Error de la aplicaci\\u00f3n" + es "Blue", "Azul" + es "Color", "Color" + es "Delete", "Borrar" + es "Error", "Error" + es "Exit", "Salir" + es "Green", "Verde" + es "Red", "Rojo" + es "blue", "azul" + es "green", "verde" + es "red", "rojo" +} + +TkMsgCatalog.new('::tk') { + es "&Abort", "&Abortar" + es "About...", "Acerca de ..." + es "All Files", "Todos los archivos" + es "Application Error", "Error de la aplicaci\\u00f3n" + es "&Blue", "&Azul" + es "&Cancel", "&Cancelar" + es "Cannot change to the directory \"%1\$s\".\nPermission denied.", "No es posible acceder al directorio \"%1\$s\".\nPermiso denegado." + es "Choose Directory", "Elegir directorio" + es "Clear", "Borrar" + es "Color", "Color" + es "Console", "Consola" + es "Copy", "Copiar" + es "Cut", "Cortar" + es "Delete", "Borrar" + es "Details >>", "Detalles >>" + es "Directory \"%1\$s\" does not exist.", "El directorio \"%1\$s\" no existe." + es "&Directory:", "&Directorio:" + es "Error: %1\$s", "Error: %1\$s" + es "Exit", "Salir" + es "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "El archivo \"%1\$s\" ya existe.\nDesea sobreescribirlo?" + es "File \"%1\$s\" already exists.\n\n", "El archivo \"%1\$s\" ya existe.\n\n" + es "File \"%1\$s\" does not exist.", "El archivo \"%1\$s\" no existe." + es "File &name:", "&Nombre de archivo:" + es "File &names:", "&Nombres de archivo:" + es "Files of &type:", "Archivos de &tipo:" + es "Fi&les:", "&Archivos:" + es "&Filter", "&Filtro" + es "Fil&ter:", "Fil&tro:" + es "&Green", "&Verde" + es "Hi", "Hola" + es "Hide Console", "Esconder la consola" + es "&Ignore", "&Ignorar" + es "Invalid file name \"%1\$s\".", "Nombre de archivo inv\\u00e1lido \"%1\$s\"." + es "Log Files", "Ficheros de traza" + es "&No", "&No" + es "&OK", "&OK" + es "Ok", "Ok" + es "Open", "Abrir" + es "&Open", "&Abrir" + es "Open Multiple Files", "Abrir m\\u00faltiples archivos" + es "Paste", "Pegar" + es "Quit", "Abandonar" + es "&Red", "&Rojo" + es "Replace existing file?", "Reemplazar el archivo existente?" + es "&Retry", "&Reintentar" + es "&Save", "&Salvar" + es "Save As", "Salvar como" + es "Save To Log", "Salvar al archivo de traza" + es "Select Log File", "Elegir un archivo de traza" + es "Select a file to source", "Seleccionar un archivo a evaluar" + es "&Selection:", "&Selecci\\u00f3n:" + es "Skip Messages", "Omitir los mensajes" + es "Source...", "Evaluar..." + es "Tcl Scripts", "Scripts Tcl" + es "Tcl for Windows", "Tcl para Windows" + es "Text Files", "Archivos de texto" + es "&Yes", "&S\\u00ed" + es "abort", "abortar" + es "blue", "azul" + es "cancel", "cancelar" + es "extension", "extensi\\u00f3n" + es "extensions", "extensiones" + es "green", "verde" + es "ignore", "ignorar" + es "ok", "ok" + es "red", "rojo" + es "retry", "reintentar" + es "yes", "s\\u00ed" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/fr.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/fr.msg new file mode 100644 index 0000000..ea85cf1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/fr.msg @@ -0,0 +1,84 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + fr 'Application Error', "Erreur d'application" + fr 'Blue', 'Bleu' + fr 'Color', 'Couleur' + fr 'Delete', 'Effacer' + fr 'Error', 'Erreur' + fr 'Exit', 'Quitter' + fr 'Green', 'Vert' + fr 'Red', 'Rouge' + fr 'blue', 'bleu' + fr 'green', 'vert' + fr 'red', 'rouge' +} + +TkMsgCatalog.new('::tk') { + fr '&Abort', '&Annuler' + fr 'About...', '\u00c0 propos...' + fr 'All Files', 'Tous les fichiers' + fr 'Application Error', "Erreur d'application" + fr '&Blue', '&Bleu' + fr '&Cancel', '&Annuler' + fr 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Impossible d\'acc\u00e9der au r\u00e9pertoire "%1\$s".' "\n" 'Permission refus\u00e9e.' + fr 'Choose Directory', 'Choisir r\u00e9pertoire' + fr 'Clear', 'Effacer' + fr 'Color', 'Couleur' + fr 'Console' + fr 'Copy', 'Copier' + fr 'Cut', 'Couper' + fr 'Delete', 'Effacer' + fr 'Details >>', 'D\u00e9tails >>' + fr 'Directory "%1\$s" does not exist.', 'Le r\u00e9pertoire "%1\$s" n\'existe pas.' + fr '&Directory:', '&R\u00e9pertoire:' + fr 'Error: %1\$s', 'Erreur: %1\$s' + fr 'Exit', 'Quitter' + fr 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'Le fichier "%1\$s" existe d\u00e9j\u00e0.' "\n" 'Voulez-vous l\'\u00e9craser?' + fr 'File "%1\$s" already exists.' "\n\n", 'Le fichier "%1\$s" existe d\u00e9j\u00e0.' "\n\n" + fr 'File "%1\$s" does not exist.', 'Le fichier "%1\$s" n\'existe pas.' + fr 'File &name:', '&Nom de fichier:' + fr 'File &names:', '&Noms de fichiers:' + fr 'Files of &type:', '&Type de fichiers:' + fr 'Fi&les:', 'Fich&iers:' + fr '&Filter', '&Filtre' + fr 'Fil&ter:', 'Fil&tre:' + fr '&Green', '&Vert' + fr 'Hi', 'Salut' + fr 'Hide Console', 'Cacher la Console' + fr '&Ignore', '&Ignorer' + fr 'Invalid file name "%1\$s".', 'Nom de fichier invalide "%1\$s".' + fr 'Log Files', 'Fichiers de trace' + fr '&No', '&Non' + fr '&OK' + fr 'Ok' + fr 'Open', 'Ouvrir' + fr '&Open', '&Ouvrir' + fr 'Open Multiple Files', 'Ouvrir plusieurs fichiers' + fr 'Paste', 'Coller' + fr 'Quit', 'Quitter' + fr '&Red', '&Rouge' + fr 'Replace existing file?', 'Remplacer le fichier existant?' + fr '&Retry', '&R\u00e9-essayer' + fr '&Save', '&Sauvegarder' + fr 'Save As', 'Sauvegarder sous' + fr 'Save To Log', 'Sauvegarde au fichier de trace' + fr 'Select Log File', 'Choisir un fichier de trace' + fr 'Select a file to source', 'Choisir un fichier \u00e0 \u00e9valuer' + fr '&Selection:', '&S\u00e9lection:' + fr 'Skip Messages', 'Omettre les messages' + fr 'Source...', '\u00c9valuer...' + fr 'Tcl Scripts', 'Scripts Tcl' + fr 'Tcl for Windows', 'Tcl pour Windows' + fr 'Text Files', 'Fichiers texte' + fr '&Yes', '&Oui' + fr 'abort', 'abandonner' + fr 'blue', 'bleu' + fr 'cancel', 'annuler' + fr 'extension' + fr 'extensions' + fr 'green', 'vert' + fr 'ignore', 'ignorer' + fr 'ok' + fr 'red', 'rouge' + fr 'retry', 'r\u00e9essayer' + fr 'yes', 'oui' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/it.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/it.msg new file mode 100644 index 0000000..a180bdb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/it.msg @@ -0,0 +1,84 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + it "Application Error", "Errore dell' applicazione" + it "Blue", "Blu" + it "Color", "Colore" + it "Delete", "Incolla" + it "Error", "Errore" + it "Exit", "Esci" + it "Green", "Verde" + it "Red", "Rosso" + it "blue", "blu" + it "green", "verde" + it "red", "rosso" +} + +TkMsgCatalog.new('::tk') { + it "&Abort", "&Interrompi" + it "About...", "Informazioni ..." + it "All Files", "Tutti i file" + it "Application Error", "Errore dell' applicazione" + it "&Blue", "&Blu" + it "&Cancel", "&Annulla" + it "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Impossibile accedere alla directory \"%1\$s\".\nPermesso negato." + it "Choose Directory", "Scegli directory" + it "Clear", "Azzera" + it "Color", "Colore" + it "Console" + it "Copy", "Copia" + it "Cut", "Taglia" + it "Delete", "Incolla" + it "Details >>", "Dettagli >>" + it "Directory \"%1\$s\" does not exist.", "La directory \"%1\$s\" non esiste." + it "&Directory:" + it "Error: %1\$s", "Errore: %1\$s" + it "Exit", "Esci" + it "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Il file \"%1\$s\" esiste gi\\u00e0.\nVuoi sovrascriverlo?" + it "File \"%1\$s\" already exists.\n\n", "Il file \"%1\$s\" esiste gi\\u00e0.\n\n" + it "File \"%1\$s\" does not exist.", "Il file \"%1\$s\" non esiste." + it "File &name:", "&Nome del file:" + it "File &names:", "&Nomi dei file:" + it "Files of &type:", "File di &tipo:" + it "Fi&les:", "Fi&le:" + it "&Filter", "&Filtro" + it "Fil&ter:", "Fil&tro:" + it "&Green", "&Verde" + it "Hi", "Salve" + it "Hide Console", "Nascondi la console" + it "&Ignore", "&Ignora" + it "Invalid file name \"%1\$s\".", "Nome di file non valido \"%1\$s\"." + it "Log Files", "File di log" + it "&No" + it "&OK" + it "Ok" + it "&Open", "A&pri" + it "Open", "Apri" + it "Open Multiple Files", "Apri file multipli" + it "Paste", "Incolla" + it "Quit", "Esci" + it "&Red", "&Rosso" + it "Replace existing file?", "Sostituisci il file esistente?" + it "&Retry", "&Riprova" + it "&Save", "&Salva" + it "Save As", "Salva come" + it "Save To Log", "Salva il log" + it "Select Log File", "Scegli un file di log" + it "Select a file to source", "Scegli un file da eseguire" + it "&Selection:", "&Selezione:" + it "Skip Messages", "Salta i messaggi" + it "Source...", "Esegui..." + it "Tcl Scripts", "Scripts Tcl" + it "Tcl for Windows", "Tcl per Windows" + it "Text Files", "File di testo" + it "&Yes", "&Si" + it "abort", "interrompi" + it "blue", "blu" + it "cancel", "annulla" + it "extension", "estensione" + it "extensions", "estensioni" + it "green", "verde" + it "ignore", "ignora" + it "ok" + it "red", "rosso" + it "retry", "riprova" + it "yes", "si" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ja.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ja.msg new file mode 100644 index 0000000..40587c1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ja.msg @@ -0,0 +1,13 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + ja 'Application Error', '\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30A8\u30E9\u30FC' + ja 'Blue', '\u9752' + ja 'Color', '\u80CC\u666F\u8272' + ja 'Delete', '\u6D88\u53BB' + ja 'Error', '\u30A8\u30E9\u30FC' + ja 'Exit', '\u7D42\u4E86' + ja 'Green', '\u7DD1' + ja 'Red', '\u8D64' + ja 'blue', '\u9752' + ja 'green', '\u7DD1' + ja 'red', '\u8D64' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/nl.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/nl.msg new file mode 100644 index 0000000..24e41da --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/nl.msg @@ -0,0 +1,123 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + nl "Application Error", "Toepassingsfout" + nl "Blue", "Blauw" + nl "Color", "Kleur" + nl "Delete", "Wissen" + nl "Error", "Fout" + nl "Exit", "Be\\u00ebindigen" + nl "Green", "Groen" + nl "Red", "Rood" + nl "blue", "blauw" + nl "green", "groen" + nl "red", "rood" +} + +TkMsgCatalog.new('::tk') { + nl "\"%1\$s\" must be an absolute pathname", "\"%1\$s\" moet een absolute pad-naam zijn" + nl "%1\$s is not a toplevel window", "%1\$s is geen toplevel window" + nl ", or", ", of" + nl "-default, -icon, -message, -parent, -title, or -type", "-default, -icon, -message, -parent, -title, of -type" + nl "-initialdir, -mustexist, -parent, or -title", "-initialdir, -mustexist, -parent, of -title" + nl "&Abort", "&Afbreken" + nl "About...", "Over..." + nl "All Files", "Alle Bestanden" + nl "Application Error", "Toepassingsfout" + nl "&Blue", "&Blauw" + nl "&Cancel", "&Annuleren" + nl "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kan niet naar map \"%1\$s\" gaan.\nU heeft hiervoor geen toestemming." + nl "Choose Directory", "Kies map" + nl "Clear", "Wissen" + nl "Clear entry, Press OK; Enter %1\$s, press OK", "Wis veld, Druk op OK; typ %1\$s in, druk op OK" + nl "&Clear Console", "&Wis Console" + nl "Color", "Kleur" + nl "Console" + nl "Copy", "Kopi\\u00ebren" + nl "Cut", "Knippen" + nl "Delete", "Wissen" + nl "Details" + nl "Details >>" + nl "Directory \"%1\$s\" does not exist.", "Map \"%1\$s\" bestaat niet." + nl "&Directory:", "&Map:" + nl "Edit", "Bewerken" + nl "Enter \"%1\$s\", press OK", "Typ \"%1\$s\", druk op OK" + nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK", "Typ \"%1\$s\", druk op OK, typ \"%2\$s\", druk op OK" + nl "Error: %1\$s", "Fout: %1\$s" + nl "Exit", "Be\\u00ebindigen" + nl "File", "Bestand" + nl "File \"%1\$s\" already exists.\n\n", "Bestand \"%1\$s\" bestaat al.\n\n" + nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?" + nl "File \"%1\$s\" does not exist.", "Bestand \"%1\$s\" bestaat niet." + nl "File &name:", "Bestands&naam:" + nl "File &names:", "Bestands&namen:" + nl "Files of &type:", "Bestanden van het &type:" + nl "Fi&les:", "&Bestanden:" + nl "&Filter" + nl "Fil&ter:" + nl "&Green", "&Groen" + nl "Hi", "H\\u00e9" + nl "Hide Console", "Verberg Console" + nl "&Ignore", "&Negeren" + nl "Invalid file name \"%1\$s\".", "Ongeldige bestandsnaam \"%1\$s\"." + nl "Log Files", "Log Bestanden" + nl "&No", "&Nee" + nl "&OK" + nl "Ok" + nl "&Open", "&Openen" + nl "Open", "Openen" + nl "Open Multiple Files", "Open meerdere bestanden" + nl "Paste", "Plakken" + nl "Please press %1\$s", "Druk op %1\$s, A.U.B." + nl "Please press ok", "Druk op ok, A.U.B." + nl "Press Cancel", "Druk op Annuleren" + nl "Press Ok", "Druk op Ok" + nl "Quit", "Stoppen" + nl "&Red", "&Rood" + nl "Replace existing file?", "Vervang bestaand bestand?" + nl "&Retry", "&Herhalen" + nl "&Save", "Op&slaan" + nl "Save As", "Opslaan als" + nl "Save To Log", "Opslaan naar Log" + nl "Select Log File", "Selecteer Log bestand" + nl "Select a file to source", "Selecteer bronbestand" + nl "&Selection:", "&Selectie:" + nl "Skip Messages", "Berichten overslaan" + nl "Source...", "Bron..." + nl "Tcl Scripts" + nl "Tcl for Windows", "Tcl voor Windows" + nl "Text Files", "Tekstbestanden" + nl "&Yes", "&Ja" + nl "abort", "afbreken" + nl "abort, retry, ignore, ok, cancel, no, or yes", "afbreken, opnieuw, negeren, ok, annuleren, nee, of ja" + nl "abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel", "abortretryignore, ok, okcancel, retrycancel, yesno, of yesnocancel" + nl "bad %1\$s value \"%2\$s\": must be %3\$s", "verkeerde %1\$s waarde \"%2\$s\": moet zijn %3\$s" + nl "bad file type \"%1\$s\", should be", "verkeerd bestandstype \"%1\$s\", moet zijn" + nl "bad option \"%1\$s\": should be %2\$s", "verkeerde optie \"%1\$s\": moet zijn %2\$s" + nl "bad window path name \"%1\$s\"", "verkeerde window-padnaam \"%1\$s\"" + nl "blue", "blauw" + nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)", "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een nieuwe eis in Tk versies 3.0 en later)" + nl "cancel", "annuleren" + nl "default button index greater than number of buttons specified for tk_dialog", "default knop index is groter dan het aantal knoppen beschikbaar voor tk_dialog" + nl "display name to use (current one otherwise)", "te gebruiken schermnaam (anders huidige scherm)" + nl "error, info, question, or warning", "error, info, question, of warning" + nl "extension" + nl "extensions" + nl "focus group \"%1\$s\" doesn't exist", "focusgroep \"%1\$s\" bestaat niet" + nl "green", "groen" + nl "history event %1\$s" + nl "ignore", "negeren" + nl "invalid default button \"%1\$s\"", "ongeldige default knop \"%1\$s\"" + nl "macType" + nl "macTypes" + nl "must specify a background color", "een achtergrondkleur is verplicht" + nl "name of the slave interpreter", "naam van de slaaf-interpreter" + nl "no winfo screen . nor env(DISPLAY)", "geen winfo scherm . noch env(DISPLAY)" + nl "ok" + nl "red", "rood" + nl "retry", "opnieuw" + nl "should contain 5 or 4 elements", "moet 4 of 5 elementen bevatten" + nl "spec" + nl "tk_chooseDirectory command", "tk_chooseDirectory opdracht" + nl "tk_chooseDirectory command, cancel gives null", "tk_chooseDirectory opdracht, annuleren geeft lege waarde" + nl "tk_chooseDirectory command, initialdir", "tk_chooseDirectory opdracht, initi\\u00eble map" + nl "yes", "ja" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/pl.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/pl.msg new file mode 100644 index 0000000..0b3b444 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/pl.msg @@ -0,0 +1,87 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + pl 'Application Error', 'Bl\u0105d w Programie' + pl 'Blue', 'Niebieski' + pl 'Color', 'Kolor' + pl 'Delete', 'Usu\u0144' + pl 'Error', 'B\u0142\u0105d' + pl 'Exit', 'Zako\u0144cz' + pl 'Green', 'Zielony' + pl 'Red', 'Czerwonz' + pl 'blue', 'niebieski' + pl 'green', 'zielony' + pl 'red', 'czerwony' +} + +TkMsgCatalog.new('::tk') { + pl '&Abort', '&Anuluj' + pl '&About...', 'O Programie...' + pl 'All Files', 'Wszystkie pliki' + pl 'Application Error', 'Bl\u0105d w Programie' + pl '&Blue', '&Niebieski' + pl '&Cancel', '&Anuluj' + pl 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.', 'Katalog "%1\$s" nie mo\u017ce zosta\u0107 odczytany lub nie istnieje.' + pl 'Choose Directory', 'Wybierz katalog' + pl '&Clear', '&Wyczy\u015b\u0107' + pl '&Clear Console', '&Wyczy\u015b\u0107 konsol\u0119' + pl 'Color', 'Kolor' + pl 'Console', 'Konsola' + pl '&Copy', '&Kopiuj' + pl 'Cu&t', '&Wytnij' + pl '&Delete', '&Usu\u0144' + pl 'Details >>', 'Detale >>' + pl 'Directory "%1\$s" does not exist.', 'Katalog "%1\$s" nie istniej.' + pl '&Directory:', '&Katalog:' + pl '&Edit', '&Edytuj' + pl 'Error: %1\$s', 'B\u0142\u0105d: %1\$s' + pl 'E&xit', '&Zako\u0144cz' + pl '&File', '&Plik' + pl 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?', 'Plik "%1\$s" ju\u017c istnieje.' "\n" 'Czy chcesz go zast\u0105pi\u0107?' + pl 'File "%1\$s" already exists.' "\n\n", 'Plik "%1\$s" ju\u017c istnieje. ' "\n\n" + pl 'File "%1\$s" does not exist.', 'Plik "%1\$s" nie istnieje.' + pl 'File &name:', 'Nazwa &pliku:' + pl 'File &names:', 'Nazwy &plik\u00f3w:' + pl 'Files of &type:', 'Pliki &typu:' + pl 'Fi&les:', 'Pli&ki:' + pl '&Filter', '&Filter' + pl 'Fil&ter:', '&Filter:' + pl '&Green', '&Zielony' + pl '&Help', '&Pomoc' + pl 'Hi', 'Witaj' + pl '&Hide Console', '&Schowaj konsol\u0119' + pl '&Ignore', '&Ignoruj' + pl 'Invalid file name "%1\$s".', 'Niew\u0142a\u015bciwa nazwa pliku "%1\$s".' + pl 'Log Files', 'Protoko\u0142uj' + pl '&No', '&Nie' + pl 'OK' + pl 'Ok' + pl 'Open', 'Wczytaj' + pl '&Open', '&Wczytaj' + pl 'Open Multiple Files', 'Wczytuj wiele plik\u00f3w' + pl 'P&aste', '&Wklej' + pl '&Quit', '&Zako\u0144cz' + pl '&Red', '&Czerwonz' + pl 'Replace existing file?', 'Czy zost\u0105pi\u0107 instniej\u0105cy plik?' + pl '&Retry', '&Powt\u00f3rz' + pl '&Save', '&Zapisz' + pl 'Save As', 'Zapisz jako' + pl 'Save To Log', 'Wpisz do protoko\u0142u' + pl 'Select Log File', 'Wybierz plik proko\u0142u' + pl 'Select a file to source', 'Wybierz plik do wykonania' + pl '&Selection:', '&Wyb\u00f3r:' + pl 'Skip Messages', 'Omi\u0144 pozosta\u0142e komunikaty' + pl '&Source...', '&Kod \u017ar\u00f3d\u0142owy...' + pl 'Tcl Scripts', 'Tcl-skrypty' + pl 'Tcl for Windows', 'Tcl dla Okienek (Windows)' + pl 'Text Files', 'Pliki Tekstowe' + pl '&Yes', '&Tak' + pl 'abort', 'zako\u0144cz' + pl 'blue', 'niebieski' + pl 'cancel', 'anuluj' + pl 'extension', 'rozszerzenie' + pl 'extensions', 'rozszerzenia' + pl 'green', 'zielony' + pl 'ignore', 'ignoruj' + pl 'red', 'czerwony' + pl 'retry', 'potw\u00f3rz' + pl 'yes', 'tak' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ru.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ru.msg new file mode 100644 index 0000000..f389dff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb/ru.msg @@ -0,0 +1,87 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + ru 'Application Error', '\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435' + ru 'Blue', ' \u0413\u043e\u043b\u0443\u0431\u043e\u0439' + ru 'Color', '\u0426\u0432\u0435\u0442' + ru 'Delete', '\u0423\u0434\u0430\u043b\u0438\u0442\u044c' + ru 'Error', '\u041e\u0448\u0438\u0431\u043a\u0430' + ru 'Exit', '\u0412\u044b\u0445\u043e\u0434' + ru 'Green', '\u0417\u0435\u043b\u0435\u043d\u044b\u0439' + ru 'Red', '\u041a\u0440\u0430\u0441\u043d\u044b\u0439' + ru 'blue', ' \u0433\u043e\u043b\u0443\u0431\u043e\u0439' + ru 'green', ' \u0437\u0435\u043b\u0435\u043d\u044b\u0439' + ru 'red', ' \u043a\u0440\u0430\u0441\u043d\u044b\u0439' +} + +TkMsgCatalog.new('::tk') { + ru '&Abort', '&\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c' + ru 'About...', '\u041f\u0440\u043e...' + ru 'All Files', '\u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b' + ru 'Application Error', '\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435' + ru '&Blue', ' &\u0413\u043e\u043b\u0443\u0431\u043e\u0439' + ru '&Cancel', '\u041e\u0442&\u043c\u0435\u043d\u0430' + ru 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.' \ + '\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 "%1\$s".' "\n" '\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430' + ru 'Choose Directory', '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433' + ru 'Clear', '\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c' + ru 'Color', '\u0426\u0432\u0435\u0442' + ru 'Console', '\u041a\u043e\u043d\u0441\u043e\u043b\u044c' + ru 'Copy', '\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c' + ru 'Cut', '\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c' + ru 'Delete', '\u0423\u0434\u0430\u043b\u0438\u0442\u044c' + ru 'Details >>', '\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 >>' + ru 'Directory "%1\$s" does not exist.', '\u041a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 "%1\$s" \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' + ru '&Directory:', '&\u041a\u0430\u0442\u0430\u043b\u043e\u0433:' + ru 'Error: %1\$s', '\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s' + ru 'Exit', '\u0412\u044b\u0445\u043e\u0434' + ru 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?' \ + '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n" '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?' + ru 'File "%1\$s" already exists.' "\n\n", '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n\n" + ru 'File "%1\$s" does not exist.', '\u0424\u0430\u0439\u043b "%1\$s" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.' + ru 'File &name:', '&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:' + ru 'File &names:', '&\u0418\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432:' + ru 'Files of &type:', '&\u0422\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432:' + ru 'Fi&les:', '\u0424\u0430\u0439&\u043b\u044b:' + ru '&Filter', '&\u0424\u0438\u043b\u044c\u0442\u0440' + ru 'Fil&ter:', '\u0424\u0438\u043b\u044c&\u0442\u0440:' + ru '&Green', ' &\u0417\u0435\u043b\u0435\u043d\u044b\u0439' + ru 'Hi', '\u041f\u0440\u0438\u0432\u0435\u0442' + ru 'Hide Console', '\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c' + ru '&Ignore', '&\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c' + ru 'Invalid file name "%1\$s".', '\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 "%1\$s".' + ru 'Log Files', '\u0424\u0430\u0439\u043b\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0430' + ru '&No', '&\u041d\u0435\u0442' + ru '&OK', '&\u041e\u041a' + ru 'Ok', '\u0414\u0430' + ru 'Open', '\u041e\u0442\u043a\u0440\u044b\u0442\u044c' + ru '&Open', '&\u041e\u0442\u043a\u0440\u044b\u0442\u044c' + ru 'Open Multiple Files', '\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432' + ru 'Paste', '\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c' + ru 'Quit', '\u0412\u044b\u0445\u043e\u0434' + ru '&Red', ' &\u041a\u0440\u0430\u0441\u043d\u044b\u0439' + ru 'Replace existing file?', '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b?' + ru '&Retry', '&\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c' + ru '&Save', '&\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c' + ru 'Save As', '\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a' + ru 'Save To Log', '\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b' + ru 'Select Log File', '\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b' + ru 'Select a file to source', '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438' + ru '&Selection:', '&Selection:' + ru 'Skip Messages', '\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f' + ru 'Source...', '\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b...' + ru 'Tcl Scripts', '\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 TCL' + ru 'Tcl for Windows', 'TCL \u0434\u043b\u044f Windows' + ru 'Text Files', '\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b' + ru '&Yes', '&\u0414\u0430' + ru 'abort', '\u043e\u0442\u043c\u0435\u043d\u0430' + ru 'blue', ' \u0433\u043e\u043b\u0443\u0431\u043e\u0439' + ru 'cancel', '\u043e\u0442\u043c\u0435\u043d\u0430' + ru 'extension', '\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435' + ru 'extensions', '\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f' + ru 'green', ' \u0437\u0435\u043b\u0435\u043d\u044b\u0439' + ru 'ignore', '\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c' + ru 'ok', '\u043e\u043a' + ru 'red', ' \u043a\u0440\u0430\u0441\u043d\u044b\u0439' + ru 'retry', '\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c' + ru 'yes', '\u0434\u0430' +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/README new file mode 100644 index 0000000..b8aa114 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/README @@ -0,0 +1,5 @@ +Message catalogs in this directory are written in encodings except +UTF-8. As if you have a trouble to edit UTF-8 text, you can write +message catalogs in your familier encoding. + +Please see '../msgs_rb/README' too. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/de.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/de.msg new file mode 100644 index 0000000..0d6c82d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/de.msg @@ -0,0 +1,88 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + de 'Application Error', 'Applikationsfehler' + de 'Blue', 'Blau' + de 'Color', 'Farbe' + de 'Delete', 'Löschen', 'iso8859-1' + de 'Error', 'Fehler' + de 'Exit', 'Ende' + de 'Green', 'Grün', 'iso8859-1' + de 'Red', 'Rot' + de 'blue', 'blau' + de 'green', 'grün', 'iso8859-1' + de 'red', 'rot' +} + +TkMsgCatalog.new('::tk') { + de "&Abort", "&Abbruch" + de "&About...", "&Über...", 'iso8859-1' + de "All Files", "Alle Dateien" + de "Application Error", "Applikationsfehler" + de "&Blue", "&Blau" + de "&Cancel", "&Abbruch" + de "Cannot change to the directory \"%1\$s\".\nPermission denied.", "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden." + de "Choose Directory", "Wähle Verzeichnis", 'iso8859-1' + de "&Clear", "&Rücksetzen", 'iso8859-1' + de "&Clear Console", "&Konsole löschen", 'iso8859-1' + de "Color", "Farbe" + de "Console", "Konsole" + de "&Copy", "&Kopieren" + de "Cu&t", "Aus&schneiden" + de '&Delete', '&Löschen', 'iso8859-1' + de "Details >>" + de "Directory \"%1\$s\" does not exist.", "Das Verzeichnis \"%1\$s\" existiert nicht." + de "&Directory:", "&Verzeichnis:" + de "&Edit", "&Bearbieten" + de "Error: %1\$s", "Fehler: %1\$s" + de "E&xit", "&Ende" + de "&File", "&Datei" + de "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei überschreiben ?", 'iso8859-1' + de "File \"%1\$s\" already exists.\n\n", "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n" + de "File \"%1\$s\" does not exist.", "Die Datei \"%1\$s\" existiert nicht." + de "File &name:", "Datei&name:" + de "File &names:", "Datei&namen:" + de "Files of &type:", "Dateien des &Typs:" + de "Fi&les:", "Dat&eien:" + de "&Filter" + de "Fil&ter:" + de '&Green', '&Grün', 'iso8859-1' + de "&Help", "&Hilfe" + de "Hi", "Hallo" + de "&Hide Console", "&Konsole unsichtbar machen" + de "&Ignore", "&Ignorieren" + de "Invalid file name \"%1\$s\".", "Ungültiger Dateiname \"%1\$s\".", 'iso8859-1' + de "Log Files", "Protokolldatei" + de "&No", "&Nein" + de "OK" + de "Ok" + de "Open", "Öffnen", 'iso8859-1' + de "&Open", "Ö&ffnen", 'iso8859-1' + de "Open Multiple Files" + de "P&aste", "E&infügen", 'iso8859-1' + de "&Quit", "&Beenden" + de "&Red", "&Rot" + de "Replace existing file?", "Existierende Datei ersetzen?" + de "&Retry", "&Wiederholen" + de "&Save", "&Speichern" + de "Save As", "Speichern unter" + de "Save To Log", "In Protokoll speichern" + de "Select Log File", "Protokolldatei auswählen", 'iso8859-1' + de "Select a file to source", "Auszuführende Datei auswählen", 'iso8859-1' + de "&Selection:", "Auswah&l:" + de "Skip Messages", "Weitere Nachrichten überspringen", 'iso8859-1' + de "&Source...", "&Ausführen...", 'iso8859-1' + de "Tcl Scripts", "Tcl-Skripte" + de "Tcl for Windows", "Tcl für Windows", 'iso8859-1' + de "Text Files", "Textdateien" + de "&Yes", "&Ja" + de "abort", "abbrechen" + de "blue", "blau" + de "cancel", "abbrechen" + de "extension", "Erweiterung" + de "extensions", "Erweiterungen" + de 'green', 'grün', 'iso8859-1' + de "ignore", "ignorieren" + de "ok" + de "red", "rot" + de "retry", "wiederholen" + de "yes", "ja" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/ja.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/ja.msg new file mode 100644 index 0000000..84e89aa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_rb2/ja.msg @@ -0,0 +1,85 @@ +TkMsgCatalog.new('::tkmsgcat_demo') { + ja 'Application Error', '¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥¨¥é¡¼', 'euc-jp' + ja 'Blue', 'ÀÄ', 'euc-jp' + ja 'Color', '¿§ÁªÂò', 'euc-jp' + ja 'Delete', '¾Ãµî', 'euc-jp' + ja 'Error', '¥¨¥é¡¼', 'euc-jp' + ja 'Exit', '½ªÎ»', 'euc-jp' + ja 'Green', 'ÎÐ', 'euc-jp' + ja 'Red', 'ÀÖ', 'euc-jp' + ja 'blue', 'ÀÄ', 'euc-jp' + ja 'green', 'ÎÐ', 'euc-jp' + ja 'red', 'ÀÖ', 'euc-jp' +} + +TkMsgCatalog.new('::tk') { + ja "&Abort", 'Ãæ»ß', 'euc-jp' + ja "About..." + ja "All Files", '¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë', 'euc-jp' + ja "Application Error", '¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥¨¥é¡¼', 'euc-jp' + ja "&Blue", 'ÀÄ', 'euc-jp' + ja "&Cancel", '¼è¤ê¾Ã¤·', 'euc-jp' + ja "Cannot change to the directory \"%1\$s\".\nPermission denied.", "¥Ç¥£¥ì¥¯¥È¥ê \"%1\$s\" ¤ËÊѹ¹¤Ç¤­¤Þ¤»¤ó¡¥\nµö²Ä¤¬¤¢¤ê¤Þ¤»¤ó¡¥", 'euc-jp' + ja "Choose Directory", '¥Ç¥£¥ì¥¯¥È¥ê¤òÁªÂò', 'euc-jp' + ja "Clear", '¾Ãµî', 'euc-jp' + ja "Color", '¿§', 'euc-jp' + ja "Console", '¥³¥ó¥½¡¼¥ë', 'euc-jp' + ja "Copy", '¥³¥Ô¡¼', 'euc-jp' + ja "Cut", 'ÀÚ¤ê¼è¤ê', 'euc-jp' + ja "Delete", '¾Ãµî', 'euc-jp' + ja "Details >>", '¾ÜºÙ >>', 'euc-jp' + ja "Directory \"%1\$s\" does not exist.", '"%1$s" ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤Ï¸ºß¤·¤Þ¤»¤ó¡¥', 'euc-jp' + ja "&Directory:", '¥Ç¥£¥ì¥¯¥È¥ê', 'euc-jp' + ja "Error: %1\$s" + ja "Exit", '½ªÎ»', 'euc-jp' + ja "File \"%1\$s\" already exists.\nDo you want to overwrite it?", "\"%1\$s\" ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤Ï´û¤Ë¸ºß¤·¤Æ¤¤¤Þ¤¹¡¥\n½ñ¤­´¹¤¨¤Þ¤¹¤«¡©", 'euc-jp' + ja "File \"%1\$s\" already exists.\n\n", "\"%1\$s\" ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤Ï´û¤Ë¸ºß¤·¤Æ¤¤¤Þ¤¹¡¥\n\n", 'euc-jp' + ja "File \"%1\$s\" does not exist.", '"%1$s" ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤Ï¸ºß¤·¤Þ¤»¤ó¡¥', 'euc-jp' + ja "File &name:", '¥Õ¥¡¥¤¥ë̾', 'euc-jp' + ja "File &names:", '¥Õ¥¡¥¤¥ë̾', 'euc-jp' + ja "Files of &type:", '¥Õ¥¡¥¤¥ë·Á¼°', 'euc-jp' + ja "Fi&les:", '¥Õ¥¡¥¤¥ë', 'euc-jp' + ja "&Filter", '¥Õ¥£¥ë¥¿¡¼', 'euc-jp' + ja "Fil&ter:", '¥Õ¥£¥ë¥¿¡¼', 'euc-jp' + ja "&Green", 'ÎÐ', 'euc-jp' + ja "Hi", '¤³¤ó¤Ë¤Á¤Ï', 'euc-jp' + ja "Hide Console", '¥³¥ó¥½¡¼¥ë¤ò±£¤¹', 'euc-jp' + ja "&Ignore", '̵»ë', 'euc-jp' + ja "Invalid file name \"%1\$s\".", '"%1$s" ¤ÏÉÔÀµ¤Ê¥Õ¥¡¥¤¥ë̾¤Ç¤¹¡¥', 'euc-jp' + ja "Log Files", '¥í¥°¥Õ¥¡¥¤¥ë', 'euc-jp' + ja "&No", '¤¤¤¤¤¨', 'euc-jp' + ja "&OK", 'λ²ò', 'euc-jp' + ja "OK", 'λ²ò', 'euc-jp' + ja "Ok", 'λ²ò', 'euc-jp' + ja "Open", '³«¤¯', 'euc-jp' + ja "&Open", '³«¤¯', 'euc-jp' + ja "Open Multiple Files", 'Ê£¿ô¤Î¥Õ¥¡¥¤¥ë¤ò³«¤¯', 'euc-jp' + ja "Paste", 'Ž¤êÉÕ¤±', 'euc-jp' + ja "Quit", '½ªÎ»', 'euc-jp' + ja "&Red", 'ÀÖ', 'euc-jp' + ja "Replace existing file?", '´û¸¤Î¥Õ¥¡¥¤¥ë¤òÃÖ¤­´¹¤¨¤Þ¤¹¤«¡©', 'euc-jp' + ja "&Retry", 'ºÆ¼Â¹Ô', 'euc-jp' + ja "&Save", 'Êݸ', 'euc-jp' + ja "Save As", '̾Á°¤òÉÕ¤±¤ÆÊݸ', 'euc-jp' + ja "Save To Log", '¥í¥°¤òÊݸ', 'euc-jp' + ja "Select Log File", '¥í¥°¥Õ¥¡¥¤¥ë¤òÁªÂò', 'euc-jp' + ja "Select a file to source", '¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤òÁªÂò', 'euc-jp' + ja "&Selection:", 'ÁªÂò', 'euc-jp' + ja "Skip Messages", '¥á¥Ã¥»¡¼¥¸¤ò¤È¤Ð¤¹', 'euc-jp' + ja "Source...", '¥½¡¼¥¹...', 'euc-jp' + ja "Tcl Scripts", 'Tcl ¥¹¥¯¥ê¥×¥È', 'euc-jp' + ja "Tcl for Windows" + ja "Text Files", '¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë', 'euc-jp' + ja "&Yes", '¤Ï¤¤', 'euc-jp' + ja "abort", 'Ãæ»ß', 'euc-jp' + ja "blue", 'ÀÄ', 'euc-jp' + ja "cancel", '¼è¤ê¾Ã¤·', 'euc-jp' + ja "extension", '³ÈÄ¥»Ò', 'euc-jp' + ja "extensions", '³ÈÄ¥»Ò', 'euc-jp' + ja "green", 'ÎÐ', 'euc-jp' + ja "ignore", '̵»ë', 'euc-jp' + ja "ok", 'λ²ò', 'euc-jp' + ja "red", 'ÀÖ', 'euc-jp' + ja "retry", 'ºÆ¼Â¹Ô', 'euc-jp' + ja "yes", '¤Ï¤¤', 'euc-jp' +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/README b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/README new file mode 100644 index 0000000..c7422e3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/README @@ -0,0 +1,4 @@ +Almost all of Message-Catalog files in this directory are quoted +from Tcl/Tk8.5a1 source archive (only a little are modified for +'tkmsgcat-load_tk.rb'). Please read the file 'license.terms' in +this directry (That was included in demo directory of Tcl/Tk8.5a1). diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/cs.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/cs.msg new file mode 100644 index 0000000..6970709 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/cs.msg @@ -0,0 +1,84 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset cs "Application Error" "Chyba programu" + ::msgcat::mcset cs "Blue" "Modr\341" + ::msgcat::mcset cs "Color" "Barva" + ::msgcat::mcset cs "Delete" "Smazat" + ::msgcat::mcset cs "Error" "Chyba" + ::msgcat::mcset cs "Exit" "Konec" + ::msgcat::mcset cs "Green" "Zelen\341" + ::msgcat::mcset cs "Red" "\u010cerven\341" + ::msgcat::mcset cs "blue" "modr\341" + ::msgcat::mcset cs "green" "zelen\341" + ::msgcat::mcset cs "red" "\u010derven\341" +} + +namespace eval ::tk { + ::msgcat::mcset cs "&Abort" "&P\u0159eru\u0161it" + ::msgcat::mcset cs "About..." "O programu..." + ::msgcat::mcset cs "All Files" "V\u0161echny soubory" + ::msgcat::mcset cs "Application Error" "Chyba programu" + ::msgcat::mcset cs "&Blue" "&Modr\341" + ::msgcat::mcset cs "&Cancel" "&Zru\u0161it" + ::msgcat::mcset cs "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nemohu zm\u011bnit atku\341ln\355 adres\341\u0159 na \"%1\$s\".\nP\u0159\355stup odm\355tnut." + ::msgcat::mcset cs "Choose Directory" "V\375b\u011br adres\341\u0159e" + ::msgcat::mcset cs "Clear" "Smazat" + ::msgcat::mcset cs "Color" "Barva" + ::msgcat::mcset cs "Console" "Konzole" + ::msgcat::mcset cs "Copy" "Kop\355rovat" + ::msgcat::mcset cs "Cut" "Vy\u0159\355znout" + ::msgcat::mcset cs "Delete" "Smazat" + ::msgcat::mcset cs "Details >>" "Detaily >>" + ::msgcat::mcset cs "Directory \"%1\$s\" does not exist." "Adres\341\u0159 \"%1\$s\" neexistuje." + ::msgcat::mcset cs "&Directory:" "&Adres\341\u0159:" + ::msgcat::mcset cs "Error: %1\$s" "Chyba: %1\$s" + ::msgcat::mcset cs "Exit" "Konec" + ::msgcat::mcset cs "File \"%1\$s\" already exists.\n\n" "Soubor \"%1\$s\" ji\u017e existuje.\n\n" + ::msgcat::mcset cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Soubor \"%1\$s\" ji\u017e existuje.\nChcete jej p\u0159epsat?" + ::msgcat::mcset cs "File \"%1\$s\" does not exist." "Soubor \"%1\$s\" neexistuje." + ::msgcat::mcset cs "File &name:" "&Jm\351no souboru:" + ::msgcat::mcset cs "File &names:" "&Jm\351na soubor\u016f:" + ::msgcat::mcset cs "Files of &type:" "&Typy soubor\u016f:" + ::msgcat::mcset cs "Fi&les:" "Sou&bory:" + ::msgcat::mcset cs "&Filter" "&Filtr" + ::msgcat::mcset cs "Fil&ter:" "Fil&tr:" + ::msgcat::mcset cs "&Green" "Ze&len\341" + ::msgcat::mcset cs "Hi" + ::msgcat::mcset cs "Hide Console" "Skr\375t konsolu" + ::msgcat::mcset cs "&Ignore" "&Ignorovat" + ::msgcat::mcset cs "Invalid file name \"%1\$s\"." "\u0160patn\351 jm\351no souboru \"%1\$s\"." + ::msgcat::mcset cs "Log Files" "Log soubory" + ::msgcat::mcset cs "&No" "&Ne" + ::msgcat::mcset cs "&OK" + ::msgcat::mcset cs "Ok" + ::msgcat::mcset cs "Open" "Otev\u0159\355t" + ::msgcat::mcset cs "&Open" "&Otev\u0159\355t" + ::msgcat::mcset cs "Open Multiple Files" "Otev\u0159\355t v\355ce soubor\u016f" + ::msgcat::mcset cs "Paste" "Vlo\u017eit" + ::msgcat::mcset cs "Quit" "Skon\u010dit" + ::msgcat::mcset cs "&Red" " \u010ce&rven\341" + ::msgcat::mcset cs "Replace existing file?" "Nahradit st\341vaj\355c\355 soubor?" + ::msgcat::mcset cs "&Retry" "Z&novu" + ::msgcat::mcset cs "&Save" "&Ulo\u017eit" + ::msgcat::mcset cs "Save As" "Ulo\u017eit jako" + ::msgcat::mcset cs "Save To Log" "Ulo\u017eit do logu" + ::msgcat::mcset cs "Select Log File" "Vybrat log soubor" + ::msgcat::mcset cs "Select a file to source" "Vybrat soubor k nahr\341n\355" + ::msgcat::mcset cs "&Selection:" "&V\375b\u011br:" + ::msgcat::mcset cs "Skip Messages" "P\u0159esko\u010dit zpr\341vy" + ::msgcat::mcset cs "Source..." "Nahr\341t..." + ::msgcat::mcset cs "Tcl Scripts" "Tcl skripty" + ::msgcat::mcset cs "Tcl for Windows" "Tcl pro Windows" + ::msgcat::mcset cs "Text Files" "Textov\351 soubory" + ::msgcat::mcset cs "&Yes" "&Ano" + ::msgcat::mcset cs "abort" "p\u0159eru\u0161it" + ::msgcat::mcset cs "blue" "modr\341" + ::msgcat::mcset cs "cancel" "zru\u0161it" + ::msgcat::mcset cs "extension" "p\u0159\355pona" + ::msgcat::mcset cs "extensions" "p\u0159\355pony" + ::msgcat::mcset cs "green" "zelen\341" + ::msgcat::mcset cs "ignore" "ignorovat" + ::msgcat::mcset cs "ok" + ::msgcat::mcset cs "red" "\u010derven\341" + ::msgcat::mcset cs "retry" "znovu" + ::msgcat::mcset cs "yes" "ano" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/de.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/de.msg new file mode 100644 index 0000000..437f2ed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/de.msg @@ -0,0 +1,88 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset de "Application Error" "Applikationsfehler" + ::msgcat::mcset de "Blue" "Blau" + ::msgcat::mcset de "Color" "Farbe" + ::msgcat::mcset de "Delete" "L\u00f6schen" + ::msgcat::mcset de "Error" "Fehler" + ::msgcat::mcset de "Exit" "Ende" + ::msgcat::mcset de "Green" "Gr\u00fcn" + ::msgcat::mcset de "Red" "Rot" + ::msgcat::mcset de "blue" "blau" + ::msgcat::mcset de "green" "gr\u00fcn" + ::msgcat::mcset de "red" "rot" +} + +namespace eval ::tk { + ::msgcat::mcset de "&Abort" "&Abbruch" + ::msgcat::mcset de "&About..." "&\u00dcber..." + ::msgcat::mcset de "All Files" "Alle Dateien" + ::msgcat::mcset de "Application Error" "Applikationsfehler" + ::msgcat::mcset de "&Blue" "&Blau" + ::msgcat::mcset de "&Cancel" "&Abbruch" + ::msgcat::mcset de "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden." + ::msgcat::mcset de "Choose Directory" "W\u00e4hle Verzeichnis" + ::msgcat::mcset de "&Clear" "&R\u00fccksetzen" + ::msgcat::mcset de "&Clear Console" "&Konsole l\u00f6schen" + ::msgcat::mcset de "Color" "Farbe" + ::msgcat::mcset de "Console" "Konsole" + ::msgcat::mcset de "&Copy" "&Kopieren" + ::msgcat::mcset de "Cu&t" "Aus&schneiden" + ::msgcat::mcset de "&Delete" "&L\u00f6schen" + ::msgcat::mcset de "Details >>" + ::msgcat::mcset de "Directory \"%1\$s\" does not exist." "Das Verzeichnis \"%1\$s\" existiert nicht." + ::msgcat::mcset de "&Directory:" "&Verzeichnis:" + ::msgcat::mcset de "&Edit" "&Bearbieten" + ::msgcat::mcset de "Error: %1\$s" "Fehler: %1\$s" + ::msgcat::mcset de "E&xit" "&Ende" + ::msgcat::mcset de "&File" "&Datei" + ::msgcat::mcset de "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei \u00fcberschreiben ?" + ::msgcat::mcset de "File \"%1\$s\" already exists.\n\n" "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n" + ::msgcat::mcset de "File \"%1\$s\" does not exist." "Die Datei \"%1\$s\" existiert nicht." + ::msgcat::mcset de "File &name:" "Datei&name:" + ::msgcat::mcset de "File &names:" "Datei&namen:" + ::msgcat::mcset de "Files of &type:" "Dateien des &Typs:" + ::msgcat::mcset de "Fi&les:" "Dat&eien:" + ::msgcat::mcset de "&Filter" + ::msgcat::mcset de "Fil&ter:" + ::msgcat::mcset de "&Green" "&Gr\u00fcn" + ::msgcat::mcset de "&Help" "&Hilfe" + ::msgcat::mcset de "Hi" "Hallo" + ::msgcat::mcset de "&Hide Console" "&Konsole unsichtbar machen" + ::msgcat::mcset de "&Ignore" "&Ignorieren" + ::msgcat::mcset de "Invalid file name \"%1\$s\"." "Ung\u00fcltiger Dateiname \"%1\$s\"." + ::msgcat::mcset de "Log Files" "Protokolldatei" + ::msgcat::mcset de "&No" "&Nein" + ::msgcat::mcset de "OK" + ::msgcat::mcset de "Ok" + ::msgcat::mcset de "Open" "\u00d6ffnen" + ::msgcat::mcset de "&Open" "\u00d6&ffnen" + ::msgcat::mcset de "Open Multiple Files" + ::msgcat::mcset de "P&aste" "E&inf\u00fcgen" + ::msgcat::mcset de "&Quit" "&Beenden" + ::msgcat::mcset de "&Red" "&Rot" + ::msgcat::mcset de "Replace existing file?" "Existierende Datei ersetzen?" + ::msgcat::mcset de "&Retry" "&Wiederholen" + ::msgcat::mcset de "&Save" "&Speichern" + ::msgcat::mcset de "Save As" "Speichern unter" + ::msgcat::mcset de "Save To Log" "In Protokoll speichern" + ::msgcat::mcset de "Select Log File" "Protokolldatei ausw\u00e4hlen" + ::msgcat::mcset de "Select a file to source" "Auszuf\u00fchrende Datei ausw\u00e4hlen" + ::msgcat::mcset de "&Selection:" "Auswah&l:" + ::msgcat::mcset de "Skip Messages" "Weitere Nachrichten \u00fcberspringen" + ::msgcat::mcset de "&Source..." "&Ausf\u00fchren..." + ::msgcat::mcset de "Tcl Scripts" "Tcl-Skripte" + ::msgcat::mcset de "Tcl for Windows" "Tcl f\u00fcr Windows" + ::msgcat::mcset de "Text Files" "Textdateien" + ::msgcat::mcset de "&Yes" "&Ja" + ::msgcat::mcset de "abort" "abbrechen" + ::msgcat::mcset de "blue" "blau" + ::msgcat::mcset de "cancel" "abbrechen" + ::msgcat::mcset de "extension" "Erweiterung" + ::msgcat::mcset de "extensions" "Erweiterungen" + ::msgcat::mcset de "green" "gr\u00fcn" + ::msgcat::mcset de "ignore" "ignorieren" + ::msgcat::mcset de "ok" + ::msgcat::mcset de "red" "rot" + ::msgcat::mcset de "retry" "wiederholen" + ::msgcat::mcset de "yes" "ja" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/el.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/el.msg new file mode 100644 index 0000000..1e3a539 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/el.msg @@ -0,0 +1,103 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset el "Application Error" "\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2" + ::msgcat::mcset el "Blue" "\u039c\u03c0\u03bb\u03b5" + ::msgcat::mcset el "Color" "\u03a7\u03c1\u03ce\u03bc\u03b1" + ::msgcat::mcset el "Delete" "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae" + ::msgcat::mcset el "Error" "\u039b\u03ac\u03b8\u03bf\u03c2" + ::msgcat::mcset el "Exit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2" + ::msgcat::mcset el "Green" "\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf" + ::msgcat::mcset el "Red" "\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf" + ::msgcat::mcset el "blue" "\u03bc\u03c0\u03bb\u03b5" + ::msgcat::mcset el "green" "\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf" + ::msgcat::mcset el "red" "\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf" +} + + +# followings are same to original file included into Tk8.5a1's widget demos. + +## Messages for the Greek (Hellenic - "el") language. +## Please report any changes/suggestions to: +## petasis@iit.demokritos.gr + +namespace eval ::tk { + ::msgcat::mcset el "&Abort" "\u03a4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2" + ::msgcat::mcset el "About..." "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac..." + ::msgcat::mcset el "All Files" "\u038c\u03bb\u03b1 \u03c4\u03b1 \u0391\u03c1\u03c7\u03b5\u03af\u03b1" + ::msgcat::mcset el "Application Error" "\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2" + ::msgcat::mcset el "&Blue" "\u039c\u03c0\u03bb\u03b5" + ::msgcat::mcset el "&Cancel" "\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7" + ::msgcat::mcset el \ +"Cannot change to the directory \"%1\$s\".\nPermission denied." \ +"\u0394\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae \u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03ba\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 \u03c3\u03b5 \"%1\$s\".\n\u0397 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03c4\u03b1\u03b9." + ::msgcat::mcset el "Choose Directory" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u039a\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5" + ::msgcat::mcset el "Clear" "\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2" + ::msgcat::mcset el "Color" "\u03a7\u03c1\u03ce\u03bc\u03b1" + ::msgcat::mcset el "Console" "\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1" + ::msgcat::mcset el "Copy" "\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae" + ::msgcat::mcset el "Cut" "\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae" + ::msgcat::mcset el "Delete" "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae" + ::msgcat::mcset el "Details >>" "\u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2 >>" + ::msgcat::mcset el "Directory \"%1\$s\" does not exist." \ + "\u039f \u03ba\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9." + ::msgcat::mcset el "&Directory:" "&\u039a\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2:" + ::msgcat::mcset el "Error: %1\$s" "\u039b\u03ac\u03b8\u03bf\u03c2: %1\$s" + ::msgcat::mcset el "Exit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2" + ::msgcat::mcset el \ + "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \ + "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03c5\u03c6\u03b8\u03b5\u03af;" + ::msgcat::mcset el "File \"%1\$s\" already exists.\n\n" \ + "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\n" + ::msgcat::mcset el "File \"%1\$s\" does not exist." \ + "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9." + ::msgcat::mcset el "File &name:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5:" + ::msgcat::mcset el "File &names:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd:" + ::msgcat::mcset el "Files of &type:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u03c4\u03bf\u03c5 &\u03c4\u03cd\u03c0\u03bf\u03c5:" + ::msgcat::mcset el "Fi&les:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1:" + ::msgcat::mcset el "&Filter" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf" + ::msgcat::mcset el "Fil&ter:" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf:" + ::msgcat::mcset el "&Green" "\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf" + ::msgcat::mcset el "Hi" "\u0393\u03b5\u03b9\u03b1" + ::msgcat::mcset el "Hide Console" "\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03ba\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1\u03c2" + ::msgcat::mcset el "&Ignore" "\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7" + ::msgcat::mcset el "Invalid file name \"%1\$s\"." \ + "\u0386\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \"%1\$s\"." + ::msgcat::mcset el "Log Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2" + ::msgcat::mcset el "&No" "\u038c\u03c7\u03b9" + ::msgcat::mcset el "&OK" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9" + ::msgcat::mcset el "&Ok" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9" + ::msgcat::mcset el "Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1" + ::msgcat::mcset el "&Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1" + ::msgcat::mcset el "Open Multiple Files" \ + "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ce\u03bd \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd" + ::msgcat::mcset el "Paste" "\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7" + ::msgcat::mcset el "Quit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2" + ::msgcat::mcset el "&Red" "\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf" + ::msgcat::mcset el "Replace existing file?" \ + "\u0395\u03c0\u03b9\u03ba\u03ac\u03bb\u03c5\u03c8\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5;" + ::msgcat::mcset el "&Retry" "\u03a0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac" + ::msgcat::mcset el "&Save" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7" + ::msgcat::mcset el "Save As" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03b1\u03bd" + ::msgcat::mcset el "Save To Log" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2" + ::msgcat::mcset el "Select Log File" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2" + ::msgcat::mcset el "Select a file to source" \ + "\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b3\u03b9\u03b1 \u03b5\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7" + ::msgcat::mcset el "&Selection:" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae:" + ::msgcat::mcset el "Skip Messages" "\u0391\u03c0\u03bf\u03c6\u03c5\u03b3\u03ae \u03bc\u03c5\u03bd\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd" + ::msgcat::mcset el "Source..." "\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7..." + ::msgcat::mcset el "Tcl Scripts" "Tcl Scripts" + ::msgcat::mcset el "Tcl for Windows" "Tcl \u03b3\u03b9\u03b1 Windows" + ::msgcat::mcset el "Text Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5" + ::msgcat::mcset el "&Yes" "\u039d\u03b1\u03b9" + ::msgcat::mcset el "abort" "\u03c4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2" + ::msgcat::mcset el "blue" "\u03bc\u03c0\u03bb\u03b5" + ::msgcat::mcset el "cancel" "\u03b1\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7" + ::msgcat::mcset el "extension" "\u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7" + ::msgcat::mcset el "extensions" "\u03b5\u03c0\u03b5\u03ba\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2" + ::msgcat::mcset el "green" "\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf" + ::msgcat::mcset el "ignore" "\u03b1\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7" + ::msgcat::mcset el "ok" "\u03b5\u03bd\u03c4\u03ac\u03be\u03b5\u03b9" + ::msgcat::mcset el "red" "\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf" + ::msgcat::mcset el "retry" "\u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac" + ::msgcat::mcset el "yes" "\u03bd\u03b1\u03b9" +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en.msg new file mode 100644 index 0000000..de586d1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en.msg @@ -0,0 +1,83 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset en "Application Error" + ::msgcat::mcset en "Blue" + ::msgcat::mcset en "Color" + ::msgcat::mcset en "Delete" + ::msgcat::mcset en "Error" + ::msgcat::mcset en "Green" + ::msgcat::mcset en "Red" + ::msgcat::mcset en "blue" + ::msgcat::mcset en "green" + ::msgcat::mcset en "red" +} + +namespace eval ::tk { + ::msgcat::mcset en "&Abort" + ::msgcat::mcset en "About..." + ::msgcat::mcset en "All Files" + ::msgcat::mcset en "Application Error" + ::msgcat::mcset en "&Blue" + ::msgcat::mcset en "&Cancel" + ::msgcat::mcset en "Cannot change to the directory \"%1\$s\".\nPermission denied." + ::msgcat::mcset en "Choose Directory" + ::msgcat::mcset en "Clear" + ::msgcat::mcset en "Color" + ::msgcat::mcset en "Console" + ::msgcat::mcset en "Copy" + ::msgcat::mcset en "Cut" + ::msgcat::mcset en "Delete" + ::msgcat::mcset en "Details >>" + ::msgcat::mcset en "Directory \"%1\$s\" does not exist." + ::msgcat::mcset en "&Directory:" + ::msgcat::mcset en "Error: %1\$s" + ::msgcat::mcset en "Exit" + ::msgcat::mcset en "File \"%1\$s\" already exists.\nDo you want to overwrite it?" + ::msgcat::mcset en "File \"%1\$s\" already exists.\n\n" + ::msgcat::mcset en "File \"%1\$s\" does not exist." + ::msgcat::mcset en "File &name:" + ::msgcat::mcset en "File &names:" + ::msgcat::mcset en "Files of &type:" + ::msgcat::mcset en "Fi&les:" + ::msgcat::mcset en "&Filter" + ::msgcat::mcset en "Fil&ter:" + ::msgcat::mcset en "&Green" + ::msgcat::mcset en "Hi" + ::msgcat::mcset en "Hide Console" + ::msgcat::mcset en "&Ignore" + ::msgcat::mcset en "Invalid file name \"%1\$s\"." + ::msgcat::mcset en "Log Files" + ::msgcat::mcset en "&No" + ::msgcat::mcset en "&OK" + ::msgcat::mcset en "Ok" + ::msgcat::mcset en "Open" + ::msgcat::mcset en "&Open" + ::msgcat::mcset en "Open Multiple Files" + ::msgcat::mcset en "Paste" + ::msgcat::mcset en "Quit" + ::msgcat::mcset en "&Red" + ::msgcat::mcset en "Replace existing file?" + ::msgcat::mcset en "&Retry" + ::msgcat::mcset en "&Save" + ::msgcat::mcset en "Save As" + ::msgcat::mcset en "Save To Log" + ::msgcat::mcset en "Select Log File" + ::msgcat::mcset en "Select a file to source" + ::msgcat::mcset en "&Selection:" + ::msgcat::mcset en "Skip Messages" + ::msgcat::mcset en "Source..." + ::msgcat::mcset en "Tcl Scripts" + ::msgcat::mcset en "Tcl for Windows" + ::msgcat::mcset en "Text Files" + ::msgcat::mcset en "&Yes" + ::msgcat::mcset en "abort" + ::msgcat::mcset en "blue" + ::msgcat::mcset en "cancel" + ::msgcat::mcset en "extension" + ::msgcat::mcset en "extensions" + ::msgcat::mcset en "green" + ::msgcat::mcset en "ignore" + ::msgcat::mcset en "ok" + ::msgcat::mcset en "red" + ::msgcat::mcset en "retry" + ::msgcat::mcset en "yes" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en_gb.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en_gb.msg new file mode 100644 index 0000000..1aa5b49 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/en_gb.msg @@ -0,0 +1,7 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset en_gb Color Colour +} + +namespace eval ::tk { + ::msgcat::mcset en_gb Color Colour +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/eo.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/eo.msg new file mode 100644 index 0000000..e683cef --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/eo.msg @@ -0,0 +1,87 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset eo "Application Error" "Aplikoerraro" + ::msgcat::mcset eo "Blue" "Blua" + ::msgcat::mcset eo "Color" "Farbo" + ::msgcat::mcset eo "Delete" "Forprenu" + ::msgcat::mcset eo "Error" "Eraro" + ::msgcat::mcset eo "Exit" "Eliru" + ::msgcat::mcset eo "Green" "Verda" + ::msgcat::mcset eo "Red" "Rosa" + ::msgcat::mcset eo "blue" "blua" + ::msgcat::mcset eo "green" "verda" + ::msgcat::mcset eo "red" "ru\u011da" +} + +namespace eval ::tk { + ::msgcat::mcset eo "&Abort" "&\u0108esigo" + ::msgcat::mcset eo "&About..." "Pri..." + ::msgcat::mcset eo "All Files" "\u0108ioj dosieroj" + ::msgcat::mcset eo "Application Error" "Aplikoerraro" + ::msgcat::mcset eo "&Blue" "&Blua" + ::msgcat::mcset eo "&Cancel" "&Rezignu" + ::msgcat::mcset eo "Cannot change to the directory \"%1\$s\".\nPermission denied." "Neeble \u0109angi al dosierulon \"%1\$s\".\nVi ne rajtas tion." + ::msgcat::mcset eo "Choose Directory" "Elektu Dosierujo" + ::msgcat::mcset eo "&Clear" "&Klaru" + ::msgcat::mcset eo "&Clear Console" "&Klaru konzolon" + ::msgcat::mcset eo "Color" "Farbo" + ::msgcat::mcset eo "Console" "Konzolo" + ::msgcat::mcset eo "&Copy" "&Kopiu" + ::msgcat::mcset eo "Cu&t" "&Enpo\u015digu" + ::msgcat::mcset eo "&Delete" "&Forprenu" + ::msgcat::mcset eo "Details >>" "Detaloj >>" + ::msgcat::mcset eo "Directory \"%1\$s\" does not exist." "La dosierujo \"%1\$s\" ne ekzistas." + ::msgcat::mcset eo "&Directory:" "&Dosierujo:" + ::msgcat::mcset eo "&Edit" "&Redaktu" + ::msgcat::mcset eo "Error: %1\$s" "Eraro: %1\$s" + ::msgcat::mcset eo "E&xit" "&Eliru" + ::msgcat::mcset eo "&File" "&Dosiero" + ::msgcat::mcset eo "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "La dosiero \"%1\$s\" jam ekzistas.\n\u0108u vi volas anstata\u00fbigi la dosieron?" + ::msgcat::mcset eo "File \"%1\$s\" already exists.\n\n" "La dosiero \"%1\$s\" jam egzistas. \n\n" + ::msgcat::mcset eo "File \"%1\$s\" does not exist." "La dosierp \"%1\$s\" ne estas." + ::msgcat::mcset eo "File &name:" "Dosiero&nomo:" + ::msgcat::mcset eo "File &names:" "Dosiero&nomoj:" + ::msgcat::mcset eo "Files of &type:" "Dosieroj de &Typo:" + ::msgcat::mcset eo "Fi&les:" "Do&sieroj:" + ::msgcat::mcset eo "&Filter" "&Filtrilo" + ::msgcat::mcset eo "Fil&ter:" "&Filtrilo:" + ::msgcat::mcset eo "&Green" "&Verda" + ::msgcat::mcset eo "&Help" "&Helpu" + ::msgcat::mcset eo "Hi" "Saluton" + ::msgcat::mcset eo "&Hide Console" "&Ka\u015du konzolon" + ::msgcat::mcset eo "&Ignore" "&Ignoru" + ::msgcat::mcset eo "Invalid file name \"%1\$s\"." "Malvalida dosieronomo \"%1\$s\"." + ::msgcat::mcset eo "Log Files" "Protokolo" + ::msgcat::mcset eo "&No" "&Ne" + ::msgcat::mcset eo "OK" + ::msgcat::mcset eo "Ok" + ::msgcat::mcset eo "Open" "Malfermu" + ::msgcat::mcset eo "&Open" "&Malfermu" + ::msgcat::mcset eo "Open Multiple Files" "Melfermu multan dosierojn" + ::msgcat::mcset eo "P&aste" "&Elpo\u015digi" + ::msgcat::mcset eo "&Quit" "&Finigu" + ::msgcat::mcset eo "&Red" "&Rosa" + ::msgcat::mcset eo "Replace existing file?" "\u0108u anstata\u00fbu ekzistantan dosieron?" + ::msgcat::mcset eo "&Retry" "&Ripetu" + ::msgcat::mcset eo "&Save" "&Savu" + ::msgcat::mcset eo "Save As" "Savu kiel" + ::msgcat::mcset eo "Save To Log" "Savu en protokolon" + ::msgcat::mcset eo "Select Log File" "Elektu prokolodosieron" + ::msgcat::mcset eo "Select a file to source" "Elektu dosieron por interpreti" + ::msgcat::mcset eo "&Selection:" "&Elekto:" + ::msgcat::mcset eo "Skip Messages" "transsaltu pluajn mesa\u011dojn" + ::msgcat::mcset eo "&Source..." "&Fontoprogramo..." + ::msgcat::mcset eo "Tcl Scripts" "Tcl-skriptoj" + ::msgcat::mcset eo "Tcl for Windows" "Tcl por vindoso" + ::msgcat::mcset eo "Text Files" "Tekstodosierojn" + ::msgcat::mcset eo "&Yes" "&Jes" + ::msgcat::mcset eo "abort" "\u0109esigo" + ::msgcat::mcset eo "blue" "blua" + ::msgcat::mcset eo "cancel" "rezignu" + ::msgcat::mcset eo "extension" "ekspansio" + ::msgcat::mcset eo "extensions" "ekspansioj" + ::msgcat::mcset eo "green" "verda" + ::msgcat::mcset eo "ignore" "ignorieren" + ::msgcat::mcset eo "red" "ru\u011da" + ::msgcat::mcset eo "retry" "ripetu" + ::msgcat::mcset eo "yes" "jes" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/es.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/es.msg new file mode 100644 index 0000000..ba98123 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/es.msg @@ -0,0 +1,84 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n" + ::msgcat::mcset es "Blue" "Azul" + ::msgcat::mcset es "Color" "Color" + ::msgcat::mcset es "Delete" "Borrar" + ::msgcat::mcset es "Error" "Error" + ::msgcat::mcset es "Exit" "Salir" + ::msgcat::mcset es "Green" "Verde" + ::msgcat::mcset es "Red" "Rojo" + ::msgcat::mcset es "blue" "azul" + ::msgcat::mcset es "green" "verde" + ::msgcat::mcset es "red" "rojo" +} + +namespace eval ::tk { + ::msgcat::mcset es "&Abort" "&Abortar" + ::msgcat::mcset es "About..." "Acerca de ..." + ::msgcat::mcset es "All Files" "Todos los archivos" + ::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n" + ::msgcat::mcset es "&Blue" "&Azul" + ::msgcat::mcset es "&Cancel" "&Cancelar" + ::msgcat::mcset es "Cannot change to the directory \"%1\$s\".\nPermission denied." "No es posible acceder al directorio \"%1\$s\".\nPermiso denegado." + ::msgcat::mcset es "Choose Directory" "Elegir directorio" + ::msgcat::mcset es "Clear" "Borrar" + ::msgcat::mcset es "Color" "Color" + ::msgcat::mcset es "Console" "Consola" + ::msgcat::mcset es "Copy" "Copiar" + ::msgcat::mcset es "Cut" "Cortar" + ::msgcat::mcset es "Delete" "Borrar" + ::msgcat::mcset es "Details >>" "Detalles >>" + ::msgcat::mcset es "Directory \"%1\$s\" does not exist." "El directorio \"%1\$s\" no existe." + ::msgcat::mcset es "&Directory:" "&Directorio:" + ::msgcat::mcset es "Error: %1\$s" "Error: %1\$s" + ::msgcat::mcset es "Exit" "Salir" + ::msgcat::mcset es "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "El archivo \"%1\$s\" ya existe.\nDesea sobreescribirlo?" + ::msgcat::mcset es "File \"%1\$s\" already exists.\n\n" "El archivo \"%1\$s\" ya existe.\n\n" + ::msgcat::mcset es "File \"%1\$s\" does not exist." "El archivo \"%1\$s\" no existe." + ::msgcat::mcset es "File &name:" "&Nombre de archivo:" + ::msgcat::mcset es "File &names:" "&Nombres de archivo:" + ::msgcat::mcset es "Files of &type:" "Archivos de &tipo:" + ::msgcat::mcset es "Fi&les:" "&Archivos:" + ::msgcat::mcset es "&Filter" "&Filtro" + ::msgcat::mcset es "Fil&ter:" "Fil&tro:" + ::msgcat::mcset es "&Green" "&Verde" + ::msgcat::mcset es "Hi" "Hola" + ::msgcat::mcset es "Hide Console" "Esconder la consola" + ::msgcat::mcset es "&Ignore" "&Ignorar" + ::msgcat::mcset es "Invalid file name \"%1\$s\"." "Nombre de archivo inv\u00e1lido \"%1\$s\"." + ::msgcat::mcset es "Log Files" "Ficheros de traza" + ::msgcat::mcset es "&No" "&No" + ::msgcat::mcset es "&OK" "&OK" + ::msgcat::mcset es "Ok" "Ok" + ::msgcat::mcset es "Open" "Abrir" + ::msgcat::mcset es "&Open" "&Abrir" + ::msgcat::mcset es "Open Multiple Files" "Abrir m\u00faltiples archivos" + ::msgcat::mcset es "Paste" "Pegar" + ::msgcat::mcset es "Quit" "Abandonar" + ::msgcat::mcset es "&Red" "&Rojo" + ::msgcat::mcset es "Replace existing file?" "Reemplazar el archivo existente?" + ::msgcat::mcset es "&Retry" "&Reintentar" + ::msgcat::mcset es "&Save" "&Salvar" + ::msgcat::mcset es "Save As" "Salvar como" + ::msgcat::mcset es "Save To Log" "Salvar al archivo de traza" + ::msgcat::mcset es "Select Log File" "Elegir un archivo de traza" + ::msgcat::mcset es "Select a file to source" "Seleccionar un archivo a evaluar" + ::msgcat::mcset es "&Selection:" "&Selecci\u00f3n:" + ::msgcat::mcset es "Skip Messages" "Omitir los mensajes" + ::msgcat::mcset es "Source..." "Evaluar..." + ::msgcat::mcset es "Tcl Scripts" "Scripts Tcl" + ::msgcat::mcset es "Tcl for Windows" "Tcl para Windows" + ::msgcat::mcset es "Text Files" "Archivos de texto" + ::msgcat::mcset es "&Yes" "&S\u00ed" + ::msgcat::mcset es "abort" "abortar" + ::msgcat::mcset es "blue" "azul" + ::msgcat::mcset es "cancel" "cancelar" + ::msgcat::mcset es "extension" "extensi\u00f3n" + ::msgcat::mcset es "extensions" "extensiones" + ::msgcat::mcset es "green" "verde" + ::msgcat::mcset es "ignore" "ignorar" + ::msgcat::mcset es "ok" "ok" + ::msgcat::mcset es "red" "rojo" + ::msgcat::mcset es "retry" "reintentar" + ::msgcat::mcset es "yes" "s\u00ed" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/fr.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/fr.msg new file mode 100644 index 0000000..ebbba48 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/fr.msg @@ -0,0 +1,84 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset fr "Application Error" "Erreur d'application" + ::msgcat::mcset fr "Blue" "Bleu" + ::msgcat::mcset fr "Color" "Couleur" + ::msgcat::mcset fr "Delete" "Effacer" + ::msgcat::mcset fr "Error" "Erreur" + ::msgcat::mcset fr "Exit" "Quitter" + ::msgcat::mcset fr "Green" "Vert" + ::msgcat::mcset fr "Red" "Rouge" + ::msgcat::mcset fr "blue" "bleu" + ::msgcat::mcset fr "green" "vert" + ::msgcat::mcset fr "red" "rouge" +} + +namespace eval ::tk { + ::msgcat::mcset fr "&Abort" "&Annuler" + ::msgcat::mcset fr "About..." "\u00c0 propos..." + ::msgcat::mcset fr "All Files" "Tous les fichiers" + ::msgcat::mcset fr "Application Error" "Erreur d'application" + ::msgcat::mcset fr "&Blue" "&Bleu" + ::msgcat::mcset fr "&Cancel" "&Annuler" + ::msgcat::mcset fr "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossible d'acc\u00e9der au r\u00e9pertoire \"%1\$s\".\nPermission refus\u00e9e." + ::msgcat::mcset fr "Choose Directory" "Choisir r\u00e9pertoire" + ::msgcat::mcset fr "Clear" "Effacer" + ::msgcat::mcset fr "Color" "Couleur" + ::msgcat::mcset fr "Console" + ::msgcat::mcset fr "Copy" "Copier" + ::msgcat::mcset fr "Cut" "Couper" + ::msgcat::mcset fr "Delete" "Effacer" + ::msgcat::mcset fr "Details >>" "D\u00e9tails >>" + ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." "Le r\u00e9pertoire \"%1\$s\" n'existe pas." + ::msgcat::mcset fr "&Directory:" "&R\u00e9pertoire:" + ::msgcat::mcset fr "Error: %1\$s" "Erreur: %1\$s" + ::msgcat::mcset fr "Exit" "Quitter" + ::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\nVoulez-vous l'\u00e9craser?" + ::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\n\n" + ::msgcat::mcset fr "File \"%1\$s\" does not exist." "Le fichier \"%1\$s\" n'existe pas." + ::msgcat::mcset fr "File &name:" "&Nom de fichier:" + ::msgcat::mcset fr "File &names:" "&Noms de fichiers:" + ::msgcat::mcset fr "Files of &type:" "&Type de fichiers:" + ::msgcat::mcset fr "Fi&les:" "Fich&iers:" + ::msgcat::mcset fr "&Filter" "&Filtre" + ::msgcat::mcset fr "Fil&ter:" "Fil&tre:" + ::msgcat::mcset fr "&Green" "&Vert" + ::msgcat::mcset fr "Hi" "Salut" + ::msgcat::mcset fr "Hide Console" "Cacher la Console" + ::msgcat::mcset fr "&Ignore" "&Ignorer" + ::msgcat::mcset fr "Invalid file name \"%1\$s\"." "Nom de fichier invalide \"%1\$s\"." + ::msgcat::mcset fr "Log Files" "Fichiers de trace" + ::msgcat::mcset fr "&No" "&Non" + ::msgcat::mcset fr "&OK" + ::msgcat::mcset fr "Ok" + ::msgcat::mcset fr "Open" "Ouvrir" + ::msgcat::mcset fr "&Open" "&Ouvrir" + ::msgcat::mcset fr "Open Multiple Files" "Ouvrir plusieurs fichiers" + ::msgcat::mcset fr "Paste" "Coller" + ::msgcat::mcset fr "Quit" "Quitter" + ::msgcat::mcset fr "&Red" "&Rouge" + ::msgcat::mcset fr "Replace existing file?" "Remplacer le fichier existant?" + ::msgcat::mcset fr "&Retry" "&R\u00e9-essayer" + ::msgcat::mcset fr "&Save" "&Sauvegarder" + ::msgcat::mcset fr "Save As" "Sauvegarder sous" + ::msgcat::mcset fr "Save To Log" "Sauvegarde au fichier de trace" + ::msgcat::mcset fr "Select Log File" "Choisir un fichier de trace" + ::msgcat::mcset fr "Select a file to source" "Choisir un fichier \u00e0 \u00e9valuer" + ::msgcat::mcset fr "&Selection:" "&S\u00e9lection:" + ::msgcat::mcset fr "Skip Messages" "Omettre les messages" + ::msgcat::mcset fr "Source..." "\u00c9valuer..." + ::msgcat::mcset fr "Tcl Scripts" "Scripts Tcl" + ::msgcat::mcset fr "Tcl for Windows" "Tcl pour Windows" + ::msgcat::mcset fr "Text Files" "Fichiers texte" + ::msgcat::mcset fr "&Yes" "&Oui" + ::msgcat::mcset fr "abort" "abandonner" + ::msgcat::mcset fr "blue" "bleu" + ::msgcat::mcset fr "cancel" "annuler" + ::msgcat::mcset fr "extension" + ::msgcat::mcset fr "extensions" + ::msgcat::mcset fr "green" "vert" + ::msgcat::mcset fr "ignore" "ignorer" + ::msgcat::mcset fr "ok" + ::msgcat::mcset fr "red" "rouge" + ::msgcat::mcset fr "retry" "r\u00e9essayer" + ::msgcat::mcset fr "yes" "oui" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/it.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/it.msg new file mode 100644 index 0000000..b144fcc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/it.msg @@ -0,0 +1,84 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset it "Application Error" "Errore dell' applicazione" + ::msgcat::mcset it "Blue" "Blu" + ::msgcat::mcset it "Color" "Colore" + ::msgcat::mcset it "Delete" "Incolla" + ::msgcat::mcset it "Error" "Errore" + ::msgcat::mcset it "Exit" "Esci" + ::msgcat::mcset it "Green" "Verde" + ::msgcat::mcset it "Red" "Rosso" + ::msgcat::mcset it "blue" "blu" + ::msgcat::mcset it "green" "verde" + ::msgcat::mcset it "red" "rosso" +} + +namespace eval ::tk { + ::msgcat::mcset it "&Abort" "&Interrompi" + ::msgcat::mcset it "About..." "Informazioni ..." + ::msgcat::mcset it "All Files" "Tutti i file" + ::msgcat::mcset it "Application Error" "Errore dell' applicazione" + ::msgcat::mcset it "&Blue" "&Blu" + ::msgcat::mcset it "&Cancel" "&Annulla" + ::msgcat::mcset it "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossibile accedere alla directory \"%1\$s\".\nPermesso negato." + ::msgcat::mcset it "Choose Directory" "Scegli directory" + ::msgcat::mcset it "Clear" "Azzera" + ::msgcat::mcset it "Color" "Colore" + ::msgcat::mcset it "Console" + ::msgcat::mcset it "Copy" "Copia" + ::msgcat::mcset it "Cut" "Taglia" + ::msgcat::mcset it "Delete" "Incolla" + ::msgcat::mcset it "Details >>" "Dettagli >>" + ::msgcat::mcset it "Directory \"%1\$s\" does not exist." "La directory \"%1\$s\" non esiste." + ::msgcat::mcset it "&Directory:" + ::msgcat::mcset it "Error: %1\$s" "Errore: %1\$s" + ::msgcat::mcset it "Exit" "Esci" + ::msgcat::mcset it "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Il file \"%1\$s\" esiste gi\u00e0.\nVuoi sovrascriverlo?" + ::msgcat::mcset it "File \"%1\$s\" already exists.\n\n" "Il file \"%1\$s\" esiste gi\u00e0.\n\n" + ::msgcat::mcset it "File \"%1\$s\" does not exist." "Il file \"%1\$s\" non esiste." + ::msgcat::mcset it "File &name:" "&Nome del file:" + ::msgcat::mcset it "File &names:" "&Nomi dei file:" + ::msgcat::mcset it "Files of &type:" "File di &tipo:" + ::msgcat::mcset it "Fi&les:" "Fi&le:" + ::msgcat::mcset it "&Filter" "&Filtro" + ::msgcat::mcset it "Fil&ter:" "Fil&tro:" + ::msgcat::mcset it "&Green" "&Verde" + ::msgcat::mcset it "Hi" "Salve" + ::msgcat::mcset it "Hide Console" "Nascondi la console" + ::msgcat::mcset it "&Ignore" "&Ignora" + ::msgcat::mcset it "Invalid file name \"%1\$s\"." "Nome di file non valido \"%1\$s\"." + ::msgcat::mcset it "Log Files" "File di log" + ::msgcat::mcset it "&No" + ::msgcat::mcset it "&OK" + ::msgcat::mcset it "Ok" + ::msgcat::mcset it "&Open" "A&pri" + ::msgcat::mcset it "Open" "Apri" + ::msgcat::mcset it "Open Multiple Files" "Apri file multipli" + ::msgcat::mcset it "Paste" "Incolla" + ::msgcat::mcset it "Quit" "Esci" + ::msgcat::mcset it "&Red" "&Rosso" + ::msgcat::mcset it "Replace existing file?" "Sostituisci il file esistente?" + ::msgcat::mcset it "&Retry" "&Riprova" + ::msgcat::mcset it "&Save" "&Salva" + ::msgcat::mcset it "Save As" "Salva come" + ::msgcat::mcset it "Save To Log" "Salva il log" + ::msgcat::mcset it "Select Log File" "Scegli un file di log" + ::msgcat::mcset it "Select a file to source" "Scegli un file da eseguire" + ::msgcat::mcset it "&Selection:" "&Selezione:" + ::msgcat::mcset it "Skip Messages" "Salta i messaggi" + ::msgcat::mcset it "Source..." "Esegui..." + ::msgcat::mcset it "Tcl Scripts" "Scripts Tcl" + ::msgcat::mcset it "Tcl for Windows" "Tcl per Windows" + ::msgcat::mcset it "Text Files" "File di testo" + ::msgcat::mcset it "&Yes" "&Si" + ::msgcat::mcset it "abort" "interrompi" + ::msgcat::mcset it "blue" "blu" + ::msgcat::mcset it "cancel" "annulla" + ::msgcat::mcset it "extension" "estensione" + ::msgcat::mcset it "extensions" "estensioni" + ::msgcat::mcset it "green" "verde" + ::msgcat::mcset it "ignore" "ignora" + ::msgcat::mcset it "ok" + ::msgcat::mcset it "red" "rosso" + ::msgcat::mcset it "retry" "riprova" + ::msgcat::mcset it "yes" "si" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ja.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ja.msg new file mode 100644 index 0000000..44a2583 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ja.msg @@ -0,0 +1,13 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset ja "Application Error" "\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30A8\u30E9\u30FC" + ::msgcat::mcset ja "Blue" "\u9752" + ::msgcat::mcset ja "Color" "\u80CC\u666F\u8272" + ::msgcat::mcset ja "Delete" "\u6D88\u53BB" + ::msgcat::mcset ja "Error" "\u30A8\u30E9\u30FC" + ::msgcat::mcset ja "Exit" "\u7D42\u4E86" + ::msgcat::mcset ja "Green" "\u7DD1" + ::msgcat::mcset ja "Red" "\u8D64" + ::msgcat::mcset ja "blue" "\u9752" + ::msgcat::mcset ja "green" "\u7DD1" + ::msgcat::mcset ja "red" "\u8D64" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/license.terms b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/license.terms new file mode 100644 index 0000000..03ca6fc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/license.terms @@ -0,0 +1,39 @@ +This software is copyrighted by the Regents of the University of +California, Sun Microsystems, Inc., and other parties. The following +terms apply to all files associated with the software unless explicitly +disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/nl.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/nl.msg new file mode 100644 index 0000000..d9642e8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/nl.msg @@ -0,0 +1,123 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset nl "Application Error" "Toepassingsfout" + ::msgcat::mcset nl "Blue" "Blauw" + ::msgcat::mcset nl "Color" "Kleur" + ::msgcat::mcset nl "Delete" "Wissen" + ::msgcat::mcset nl "Error" "Fout" + ::msgcat::mcset nl "Exit" "Be\u00ebindigen" + ::msgcat::mcset nl "Green" "Groen" + ::msgcat::mcset nl "Red" "Rood" + ::msgcat::mcset nl "blue" "blauw" + ::msgcat::mcset nl "green" "groen" + ::msgcat::mcset nl "red" "rood" +} + +namespace eval ::tk { + ::msgcat::mcset nl "\"%1\$s\" must be an absolute pathname" "\"%1\$s\" moet een absolute pad-naam zijn" + ::msgcat::mcset nl "%1\$s is not a toplevel window" "%1\$s is geen toplevel window" + ::msgcat::mcset nl ", or" ", of" + ::msgcat::mcset nl "-default, -icon, -message, -parent, -title, or -type" "-default, -icon, -message, -parent, -title, of -type" + ::msgcat::mcset nl "-initialdir, -mustexist, -parent, or -title" "-initialdir, -mustexist, -parent, of -title" + ::msgcat::mcset nl "&Abort" "&Afbreken" + ::msgcat::mcset nl "About..." "Over..." + ::msgcat::mcset nl "All Files" "Alle Bestanden" + ::msgcat::mcset nl "Application Error" "Toepassingsfout" + ::msgcat::mcset nl "&Blue" "&Blauw" + ::msgcat::mcset nl "&Cancel" "&Annuleren" + ::msgcat::mcset nl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan niet naar map \"%1\$s\" gaan.\nU heeft hiervoor geen toestemming." + ::msgcat::mcset nl "Choose Directory" "Kies map" + ::msgcat::mcset nl "Clear" "Wissen" + ::msgcat::mcset nl "Clear entry, Press OK; Enter %1\$s, press OK" "Wis veld, Druk op OK; typ %1\$s in, druk op OK" + ::msgcat::mcset nl "&Clear Console" "&Wis Console" + ::msgcat::mcset nl "Color" "Kleur" + ::msgcat::mcset nl "Console" + ::msgcat::mcset nl "Copy" "Kopi\u00ebren" + ::msgcat::mcset nl "Cut" "Knippen" + ::msgcat::mcset nl "Delete" "Wissen" + ::msgcat::mcset nl "Details" + ::msgcat::mcset nl "Details >>" + ::msgcat::mcset nl "Directory \"%1\$s\" does not exist." "Map \"%1\$s\" bestaat niet." + ::msgcat::mcset nl "&Directory:" "&Map:" + ::msgcat::mcset nl "Edit" "Bewerken" + ::msgcat::mcset nl "Enter \"%1\$s\", press OK" "Typ \"%1\$s\", druk op OK" + ::msgcat::mcset nl "Enter \"%1\$s\", press OK, enter \"%2\$s\", press OK" "Typ \"%1\$s\", druk op OK, typ \"%2\$s\", druk op OK" + ::msgcat::mcset nl "Error: %1\$s" "Fout: %1\$s" + ::msgcat::mcset nl "Exit" "Be\u00ebindigen" + ::msgcat::mcset nl "File" "Bestand" + ::msgcat::mcset nl "File \"%1\$s\" already exists.\n\n" "Bestand \"%1\$s\" bestaat al.\n\n" + ::msgcat::mcset nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?" + ::msgcat::mcset nl "File \"%1\$s\" does not exist." "Bestand \"%1\$s\" bestaat niet." + ::msgcat::mcset nl "File &name:" "Bestands&naam:" + ::msgcat::mcset nl "File &names:" "Bestands&namen:" + ::msgcat::mcset nl "Files of &type:" "Bestanden van het &type:" + ::msgcat::mcset nl "Fi&les:" "&Bestanden:" + ::msgcat::mcset nl "&Filter" + ::msgcat::mcset nl "Fil&ter:" + ::msgcat::mcset nl "&Green" "&Groen" + ::msgcat::mcset nl "Hi" "H\u00e9" + ::msgcat::mcset nl "Hide Console" "Verberg Console" + ::msgcat::mcset nl "&Ignore" "&Negeren" + ::msgcat::mcset nl "Invalid file name \"%1\$s\"." "Ongeldige bestandsnaam \"%1\$s\"." + ::msgcat::mcset nl "Log Files" "Log Bestanden" + ::msgcat::mcset nl "&No" "&Nee" + ::msgcat::mcset nl "&OK" + ::msgcat::mcset nl "Ok" + ::msgcat::mcset nl "&Open" "&Openen" + ::msgcat::mcset nl "Open" "Openen" + ::msgcat::mcset nl "Open Multiple Files" "Open meerdere bestanden" + ::msgcat::mcset nl "Paste" "Plakken" + ::msgcat::mcset nl "Please press %1\$s" "Druk op %1\$s, A.U.B." + ::msgcat::mcset nl "Please press ok" "Druk op ok, A.U.B." + ::msgcat::mcset nl "Press Cancel" "Druk op Annuleren" + ::msgcat::mcset nl "Press Ok" "Druk op Ok" + ::msgcat::mcset nl "Quit" "Stoppen" + ::msgcat::mcset nl "&Red" "&Rood" + ::msgcat::mcset nl "Replace existing file?" "Vervang bestaand bestand?" + ::msgcat::mcset nl "&Retry" "&Herhalen" + ::msgcat::mcset nl "&Save" "Op&slaan" + ::msgcat::mcset nl "Save As" "Opslaan als" + ::msgcat::mcset nl "Save To Log" "Opslaan naar Log" + ::msgcat::mcset nl "Select Log File" "Selecteer Log bestand" + ::msgcat::mcset nl "Select a file to source" "Selecteer bronbestand" + ::msgcat::mcset nl "&Selection:" "&Selectie:" + ::msgcat::mcset nl "Skip Messages" "Berichten overslaan" + ::msgcat::mcset nl "Source..." "Bron..." + ::msgcat::mcset nl "Tcl Scripts" + ::msgcat::mcset nl "Tcl for Windows" "Tcl voor Windows" + ::msgcat::mcset nl "Text Files" "Tekstbestanden" + ::msgcat::mcset nl "&Yes" "&Ja" + ::msgcat::mcset nl "abort" "afbreken" + ::msgcat::mcset nl "abort, retry, ignore, ok, cancel, no, or yes" "afbreken, opnieuw, negeren, ok, annuleren, nee, of ja" + ::msgcat::mcset nl "abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel" "abortretryignore, ok, okcancel, retrycancel, yesno, of yesnocancel" + ::msgcat::mcset nl "bad %1\$s value \"%2\$s\": must be %3\$s" "verkeerde %1\$s waarde \"%2\$s\": moet zijn %3\$s" + ::msgcat::mcset nl "bad file type \"%1\$s\", should be" "verkeerd bestandstype \"%1\$s\", moet zijn" + ::msgcat::mcset nl "bad option \"%1\$s\": should be %2\$s" "verkeerde optie \"%1\$s\": moet zijn %2\$s" + ::msgcat::mcset nl "bad window path name \"%1\$s\"" "verkeerde window-padnaam \"%1\$s\"" + ::msgcat::mcset nl "blue" "blauw" + ::msgcat::mcset nl "can't post %1\$s: it isn't a descendant of %2\$s (this is a new requirement in Tk versions 3.0 and later)" "kan %1\$s niet verzenden: het is geen afstammeling van %2\$s (dit is een nieuwe eis in Tk versies 3.0 en later)" + ::msgcat::mcset nl "cancel" "annuleren" + ::msgcat::mcset nl "default button index greater than number of buttons specified for tk_dialog" "default knop index is groter dan het aantal knoppen beschikbaar voor tk_dialog" + ::msgcat::mcset nl "display name to use (current one otherwise)" "te gebruiken schermnaam (anders huidige scherm)" + ::msgcat::mcset nl "error, info, question, or warning" "error, info, question, of warning" + ::msgcat::mcset nl "extension" + ::msgcat::mcset nl "extensions" + ::msgcat::mcset nl "focus group \"%1\$s\" doesn't exist" "focusgroep \"%1\$s\" bestaat niet" + ::msgcat::mcset nl "green" "groen" + ::msgcat::mcset nl "history event %1\$s" + ::msgcat::mcset nl "ignore" "negeren" + ::msgcat::mcset nl "invalid default button \"%1\$s\"" "ongeldige default knop \"%1\$s\"" + ::msgcat::mcset nl "macType" + ::msgcat::mcset nl "macTypes" + ::msgcat::mcset nl "must specify a background color" "een achtergrondkleur is verplicht" + ::msgcat::mcset nl "name of the slave interpreter" "naam van de slaaf-interpreter" + ::msgcat::mcset nl "no winfo screen . nor env(DISPLAY)" "geen winfo scherm . noch env(DISPLAY)" + ::msgcat::mcset nl "ok" + ::msgcat::mcset nl "red" "rood" + ::msgcat::mcset nl "retry" "opnieuw" + ::msgcat::mcset nl "should contain 5 or 4 elements" "moet 4 of 5 elementen bevatten" + ::msgcat::mcset nl "spec" + ::msgcat::mcset nl "tk_chooseDirectory command" "tk_chooseDirectory opdracht" + ::msgcat::mcset nl "tk_chooseDirectory command, cancel gives null" "tk_chooseDirectory opdracht, annuleren geeft lege waarde" + ::msgcat::mcset nl "tk_chooseDirectory command, initialdir" "tk_chooseDirectory opdracht, initi\u00eble map" + ::msgcat::mcset nl "yes" "ja" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/pl.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/pl.msg new file mode 100644 index 0000000..2699e42 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/pl.msg @@ -0,0 +1,87 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset pl "Application Error" "Bl\u0105d w Programie" + ::msgcat::mcset pl "Blue" "Niebieski" + ::msgcat::mcset pl "Color" "Kolor" + ::msgcat::mcset pl "Delete" "Usu\u0144" + ::msgcat::mcset pl "Error" "B\u0142\u0105d" + ::msgcat::mcset pl "Exit" "Zako\u0144cz" + ::msgcat::mcset pl "Green" "Zielony" + ::msgcat::mcset pl "Red" "Czerwonz" + ::msgcat::mcset pl "blue" "niebieski" + ::msgcat::mcset pl "green" "zielony" + ::msgcat::mcset pl "red" "czerwony" +} + +namespace eval ::tk { + ::msgcat::mcset pl "&Abort" "&Anuluj" + ::msgcat::mcset pl "&About..." "O Programie..." + ::msgcat::mcset pl "All Files" "Wszystkie pliki" + ::msgcat::mcset pl "Application Error" "Bl\u0105d w Programie" + ::msgcat::mcset pl "&Blue" "&Niebieski" + ::msgcat::mcset pl "&Cancel" "&Anuluj" + ::msgcat::mcset pl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Katalog \"%1\$s\" nie mo\u017ce zosta\u0107 odczytany lub nie istnieje." + ::msgcat::mcset pl "Choose Directory" "Wybierz katalog" + ::msgcat::mcset pl "&Clear" "&Wyczy\u015b\u0107" + ::msgcat::mcset pl "&Clear Console" "&Wyczy\u015b\u0107 konsol\u0119" + ::msgcat::mcset pl "Color" "Kolor" + ::msgcat::mcset pl "Console" "Konsola" + ::msgcat::mcset pl "&Copy" "&Kopiuj" + ::msgcat::mcset pl "Cu&t" "&Wytnij" + ::msgcat::mcset pl "&Delete" "&Usu\u0144" + ::msgcat::mcset pl "Details >>" "Detale >>" + ::msgcat::mcset pl "Directory \"%1\$s\" does not exist." "Katalog \"%1\$s\" nie istniej." + ::msgcat::mcset pl "&Directory:" "&Katalog:" + ::msgcat::mcset pl "&Edit" "&Edytuj" + ::msgcat::mcset pl "Error: %1\$s" "B\u0142\u0105d: %1\$s" + ::msgcat::mcset pl "E&xit" "&Zako\u0144cz" + ::msgcat::mcset pl "&File" "&Plik" + ::msgcat::mcset pl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Plik \"%1\$s\" ju\u017c istnieje.\nCzy chcesz go zast\u0105pi\u0107?" + ::msgcat::mcset pl "File \"%1\$s\" already exists.\n\n" "Plik \"%1\$s\" ju\u017c istnieje. \n\n" + ::msgcat::mcset pl "File \"%1\$s\" does not exist." "Plik \"%1\$s\" nie istnieje." + ::msgcat::mcset pl "File &name:" "Nazwa &pliku:" + ::msgcat::mcset pl "File &names:" "Nazwy &plik\u00f3w:" + ::msgcat::mcset pl "Files of &type:" "Pliki &typu:" + ::msgcat::mcset pl "Fi&les:" "Pli&ki:" + ::msgcat::mcset pl "&Filter" "&Filter" + ::msgcat::mcset pl "Fil&ter:" "&Filter:" + ::msgcat::mcset pl "&Green" "&Zielony" + ::msgcat::mcset pl "&Help" "&Pomoc" + ::msgcat::mcset pl "Hi" "Witaj" + ::msgcat::mcset pl "&Hide Console" "&Schowaj konsol\u0119" + ::msgcat::mcset pl "&Ignore" "&Ignoruj" + ::msgcat::mcset pl "Invalid file name \"%1\$s\"." "Niew\u0142a\u015bciwa nazwa pliku \"%1\$s\"." + ::msgcat::mcset pl "Log Files" "Protoko\u0142uj" + ::msgcat::mcset pl "&No" "&Nie" + ::msgcat::mcset pl "OK" + ::msgcat::mcset pl "Ok" + ::msgcat::mcset pl "Open" "Wczytaj" + ::msgcat::mcset pl "&Open" "&Wczytaj" + ::msgcat::mcset pl "Open Multiple Files" "Wczytuj wiele plik\u00f3w" + ::msgcat::mcset pl "P&aste" "&Wklej" + ::msgcat::mcset pl "&Quit" "&Zako\u0144cz" + ::msgcat::mcset pl "&Red" "&Czerwonz" + ::msgcat::mcset pl "Replace existing file?" "Czy zost\u0105pi\u0107 instniej\u0105cy plik?" + ::msgcat::mcset pl "&Retry" "&Powt\u00f3rz" + ::msgcat::mcset pl "&Save" "&Zapisz" + ::msgcat::mcset pl "Save As" "Zapisz jako" + ::msgcat::mcset pl "Save To Log" "Wpisz do protoko\u0142u" + ::msgcat::mcset pl "Select Log File" "Wybierz plik proko\u0142u" + ::msgcat::mcset pl "Select a file to source" "Wybierz plik do wykonania" + ::msgcat::mcset pl "&Selection:" "&Wyb\u00f3r:" + ::msgcat::mcset pl "Skip Messages" "Omi\u0144 pozosta\u0142e komunikaty" + ::msgcat::mcset pl "&Source..." "&Kod \u017ar\u00f3d\u0142owy..." + ::msgcat::mcset pl "Tcl Scripts" "Tcl-skrypty" + ::msgcat::mcset pl "Tcl for Windows" "Tcl dla Okienek (Windows)" + ::msgcat::mcset pl "Text Files" "Pliki Tekstowe" + ::msgcat::mcset pl "&Yes" "&Tak" + ::msgcat::mcset pl "abort" "zako\u0144cz" + ::msgcat::mcset pl "blue" "niebieski" + ::msgcat::mcset pl "cancel" "anuluj" + ::msgcat::mcset pl "extension" "rozszerzenie" + ::msgcat::mcset pl "extensions" "rozszerzenia" + ::msgcat::mcset pl "green" "zielony" + ::msgcat::mcset pl "ignore" "ignoruj" + ::msgcat::mcset pl "red" "czerwony" + ::msgcat::mcset pl "retry" "potw\u00f3rz" + ::msgcat::mcset pl "yes" "tak" +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ru.msg b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ru.msg new file mode 100644 index 0000000..a1192b7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/msgs_tk/ru.msg @@ -0,0 +1,87 @@ +namespace eval ::tkmsgcat_demo { + ::msgcat::mcset ru "Application Error" "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435" + ::msgcat::mcset ru "Blue" " \u0413\u043e\u043b\u0443\u0431\u043e\u0439" + ::msgcat::mcset ru "Color" "\u0426\u0432\u0435\u0442" + ::msgcat::mcset ru "Delete" "\u0423\u0434\u0430\u043b\u0438\u0442\u044c" + ::msgcat::mcset ru "Error" "\u041e\u0448\u0438\u0431\u043a\u0430" + ::msgcat::mcset ru "Exit" "\u0412\u044b\u0445\u043e\u0434" + ::msgcat::mcset ru "Green" "\u0417\u0435\u043b\u0435\u043d\u044b\u0439" + ::msgcat::mcset ru "Red" "\u041a\u0440\u0430\u0441\u043d\u044b\u0439" + ::msgcat::mcset ru "blue" " \u0433\u043e\u043b\u0443\u0431\u043e\u0439" + ::msgcat::mcset ru "green" " \u0437\u0435\u043b\u0435\u043d\u044b\u0439" + ::msgcat::mcset ru "red" " \u043a\u0440\u0430\u0441\u043d\u044b\u0439" +} + +namespace eval ::tk { + ::msgcat::mcset ru "&Abort" "&\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c" + ::msgcat::mcset ru "About..." "\u041f\u0440\u043e..." + ::msgcat::mcset ru "All Files" "\u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b" + ::msgcat::mcset ru "Application Error" "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435" + ::msgcat::mcset ru "&Blue" " &\u0413\u043e\u043b\u0443\u0431\u043e\u0439" + ::msgcat::mcset ru "&Cancel" "\u041e\u0442&\u043c\u0435\u043d\u0430" + ::msgcat::mcset ru "Cannot change to the directory \"%1\$s\".\nPermission denied." \ + "\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \"%1\$s\".\n\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430" + ::msgcat::mcset ru "Choose Directory" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433" + ::msgcat::mcset ru "Clear" "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c" + ::msgcat::mcset ru "Color" "\u0426\u0432\u0435\u0442" + ::msgcat::mcset ru "Console" "\u041a\u043e\u043d\u0441\u043e\u043b\u044c" + ::msgcat::mcset ru "Copy" "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c" + ::msgcat::mcset ru "Cut" "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c" + ::msgcat::mcset ru "Delete" "\u0423\u0434\u0430\u043b\u0438\u0442\u044c" + ::msgcat::mcset ru "Details >>" "\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 >>" + ::msgcat::mcset ru "Directory \"%1\$s\" does not exist." "\u041a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \"%1\$s\" \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442." + ::msgcat::mcset ru "&Directory:" "&\u041a\u0430\u0442\u0430\u043b\u043e\u0433:" + ::msgcat::mcset ru "Error: %1\$s" "\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s" + ::msgcat::mcset ru "Exit" "\u0412\u044b\u0445\u043e\u0434" + ::msgcat::mcset ru "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \ + "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?" + ::msgcat::mcset ru "File \"%1\$s\" already exists.\n\n" "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\n" + ::msgcat::mcset ru "File \"%1\$s\" does not exist." "\u0424\u0430\u0439\u043b \"%1\$s\" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d." + ::msgcat::mcset ru "File &name:" "&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:" + ::msgcat::mcset ru "File &names:" "&\u0418\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432:" + ::msgcat::mcset ru "Files of &type:" "&\u0422\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432:" + ::msgcat::mcset ru "Fi&les:" "\u0424\u0430\u0439&\u043b\u044b:" + ::msgcat::mcset ru "&Filter" "&\u0424\u0438\u043b\u044c\u0442\u0440" + ::msgcat::mcset ru "Fil&ter:" "\u0424\u0438\u043b\u044c&\u0442\u0440:" + ::msgcat::mcset ru "&Green" " &\u0417\u0435\u043b\u0435\u043d\u044b\u0439" + ::msgcat::mcset ru "Hi" "\u041f\u0440\u0438\u0432\u0435\u0442" + ::msgcat::mcset ru "Hide Console" "\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c" + ::msgcat::mcset ru "&Ignore" "&\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c" + ::msgcat::mcset ru "Invalid file name \"%1\$s\"." "\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \"%1\$s\"." + ::msgcat::mcset ru "Log Files" "\u0424\u0430\u0439\u043b\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0430" + ::msgcat::mcset ru "&No" "&\u041d\u0435\u0442" + ::msgcat::mcset ru "&OK" "&\u041e\u041a" + ::msgcat::mcset ru "Ok" "\u0414\u0430" + ::msgcat::mcset ru "Open" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c" + ::msgcat::mcset ru "&Open" "&\u041e\u0442\u043a\u0440\u044b\u0442\u044c" + ::msgcat::mcset ru "Open Multiple Files" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432" + ::msgcat::mcset ru "Paste" "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c" + ::msgcat::mcset ru "Quit" "\u0412\u044b\u0445\u043e\u0434" + ::msgcat::mcset ru "&Red" " &\u041a\u0440\u0430\u0441\u043d\u044b\u0439" + ::msgcat::mcset ru "Replace existing file?" "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b?" + ::msgcat::mcset ru "&Retry" "&\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c" + ::msgcat::mcset ru "&Save" "&\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c" + ::msgcat::mcset ru "Save As" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a" + ::msgcat::mcset ru "Save To Log" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b" + ::msgcat::mcset ru "Select Log File" "\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b" + ::msgcat::mcset ru "Select a file to source" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438" + ::msgcat::mcset ru "&Selection:" "&Selection:" + ::msgcat::mcset ru "Skip Messages" "\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f" + ::msgcat::mcset ru "Source..." "\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b..." + ::msgcat::mcset ru "Tcl Scripts" "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 TCL" + ::msgcat::mcset ru "Tcl for Windows" "TCL \u0434\u043b\u044f Windows" + ::msgcat::mcset ru "Text Files" "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b" + ::msgcat::mcset ru "&Yes" "&\u0414\u0430" + ::msgcat::mcset ru "abort" "\u043e\u0442\u043c\u0435\u043d\u0430" + ::msgcat::mcset ru "blue" " \u0433\u043e\u043b\u0443\u0431\u043e\u0439" + ::msgcat::mcset ru "cancel" "\u043e\u0442\u043c\u0435\u043d\u0430" + ::msgcat::mcset ru "extension" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435" + ::msgcat::mcset ru "extensions" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f" + ::msgcat::mcset ru "green" " \u0437\u0435\u043b\u0435\u043d\u044b\u0439" + ::msgcat::mcset ru "ignore" "\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c" + ::msgcat::mcset ru "ok" "\u043e\u043a" + ::msgcat::mcset ru "red" " \u043a\u0440\u0430\u0441\u043d\u044b\u0439" + ::msgcat::mcset ru "retry" "\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c" + ::msgcat::mcset ru "yes" "\u0434\u0430" +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample.rb new file mode 100644 index 0000000..8d6e1bc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample.rb @@ -0,0 +1,102 @@ +#!/usr/bin/env ruby +# This script is a sample of MultiTkIp class + +require "multi-tk" + +# create slave interpreters +trusted_slave = MultiTkIp.new_slave +safe_slave1 = MultiTkIp.new_safeTk +safe_slave2 = MultiTkIp.new_safeTk('fill'=>:none, 'expand'=>false) +#safe_slave2 = MultiTkIp.new_safeTk('fill'=>:none) +#safe_slave2 = MultiTkIp.new_safeTk('expand'=>false) + +cmd = Proc.new{|txt| + ##################### + ## from TkTimer2.rb + + if TkCore::INTERP.safe? + # safeTk doesn't have permission to call 'wm' command + else + root = TkRoot.new(:title=>'timer sample') + end + + label = TkLabel.new(:parent=>root, :relief=>:raised, :width=>10) \ + .pack(:side=>:bottom, :fill=>:both) + + tick = proc{|aobj| + cnt = aobj.return_value + 5 + label.text format("%d.%02d", *(cnt.divmod(100))) + cnt + } + + timer = TkTimer.new(50, -1, tick).start(0, proc{ label.text('0.00'); 0 }) + +=begin + TkButton.new(:text=>'Start') { + command proc{ timer.continue unless timer.running? } + pack(:side=>:left, :fill=>:both, :expand=>true) + } + TkButton.new(:text=>'Restart') { + command proc{ timer.restart(0, proc{ label.text('0.00'); 0 }) } + pack('side'=>'right','fill'=>'both','expand'=>'yes') + } + TkButton.new(:text=>'Stop') { + command proc{ timer.stop if timer.running? } + pack('side'=>'right','fill'=>'both','expand'=>'yes') + } +=end + b_start = TkButton.new(:text=>'Start', :state=>:disabled) { + pack(:side=>:left, :fill=>:both, :expand=>true) + } + b_stop = TkButton.new(:text=>'Stop', :state=>:normal) { + pack('side'=>'left', 'fill'=>'both', 'expand'=>'yes') + } + + b_start.command { + timer.continue + b_stop.state(:normal) + b_start.state(:disabled) + } + + b_stop.command { + timer.stop + b_start.state(:normal) + b_stop.state(:disabled) + } + + TkButton.new(:text=>'Reset', :state=>:normal) { + command { timer.reset } + pack('side'=>'right', 'fill'=>'both', 'expand'=>'yes') + } + + ev_quit = TkVirtualEvent.new('Control-c', 'Control-q') + Tk.root.bind(ev_quit, proc{Tk.exit}).focus +} + +# call on the default master interpreter +trusted_slave.eval_proc(cmd, 'trusted') # label -> .w00012 +safe_slave1.eval_proc(cmd, 'safe1') # label -> .w00016 +safe_slave2.eval_proc(cmd, 'safe2') # label -> .w00020 +cmd.call('master') # label -> .w00024 + +#second_master = MultiTkIp.new(&cmd) + +TkTimer.new(2000, -1, proc{p ['safe1', safe_slave1.deleted?]}).start +TkTimer.new(2000, -1, proc{p ['safe2', safe_slave2.deleted?]}).start +TkTimer.new(2000, -1, proc{p ['trusted', trusted_slave.deleted?]}).start + +TkTimer.new(5000, 1, + proc{ + safe_slave1.eval_proc{Tk.root.destroy} + safe_slave1.delete + print "*** The safe_slave1 is deleted by the timer.\n" + }).start + +TkTimer.new(10000, 1, + proc{ + trusted_slave.eval_proc{Tk.root.destroy} + trusted_slave.delete + print "*** The trusted_slave is deleted by the timer.\n" + }).start + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample2.rb new file mode 100644 index 0000000..f4a45d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/multi-ip_sample2.rb @@ -0,0 +1,29 @@ +require 'multi-tk.rb' + +th = Thread.new{Tk.mainloop} + +TkLabel.new(:text=>'this is a primary master').pack + +ip1 = MultiTkIp.new_slave(:safe=>1) +ip2 = MultiTkIp.new_slave(:safe=>2) + +cmd = proc{|s| + require 'tk' + + TkButton.new(:text=>'b1: p self', :command=>proc{p self}).pack(:fill=>:x) + sleep s + TkButton.new(:text=>'b2: p $SAFE', :command=>proc{p $SAFE}).pack(:fill=>:x) + sleep s + TkButton.new(:text=>'b3: p MultiTkIp.ip_name', + :command=>proc{p MultiTkIp.ip_name}).pack(:fill=>:x) + sleep s + TkButton.new(:text=>'EXIT', :command=>proc{exit}).pack(:fill=>:x) + + Tk.mainloop +} + +Thread.new{ip1.eval_proc(cmd, 1.1)} +Thread.new{ip2.eval_proc(cmd, 0.3)} +cmd.call(0.7) + +th.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/optobj_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/optobj_sample.rb new file mode 100644 index 0000000..cafacbd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/optobj_sample.rb @@ -0,0 +1,67 @@ +#!/usr/bin/env ruby +# +# sample script of Tk::OptionObj +# +require "tk" + +optobj = Tk::OptionObj.new('foreground'=>'red', 'background'=>'black') + +f = TkFrame.new.pack(:side=>:left, :anchor=>:n, :padx=>5, :pady=>30) + +b1 = TkButton.new(f, :text=>'AAA').pack(:fill=>:x) +b2 = TkButton.new(f, :text=>'BBB').pack(:fill=>:x) +b3 = TkButton.new(f, :text=>'CCC').pack(:fill=>:x) + +optobj.assign( b1, + [ b2, 'configure', + { 'foreground'=>'background', + 'background'=>'foreground' } ], + [ b3, nil, + { 'foreground'=>'background', + 'activeforeground'=>nil, + 'background'=>['foreground', 'activeforeground'] } ] ) + +optobj.update('activeforeground'=>'yellow') + +TkButton.new(f){ + configure( optobj.assign(self) + {:text=>'DDD'} ) + pack(:fill=>:x) +} + +TkButton.new(f){ + configure( optobj.assign([self, nil, + {'foreground'=>'activeforeground', + 'background'=>'foreground', + 'activeforeground'=>'background'}]) \ + + {:text=>'EEE', :relief=>:groove, :borderwidth=>5} ) + pack(:fill=>:x) +} + +optobj.notify # To apply the convert_key ( 3rd element of widget info + # (that is, {'foreground'=>'activeforeground', ,,, } ) + # of the 'EEE' button + +TkButton.new(f, :text=>'toggle', + :command=>proc{ + fg = optobj['foreground'] + bg = optobj['background'] + optobj.configure('foreground'=>bg, 'background'=>fg) + }).pack(:fill=>:x, :pady=>10) + +TkButton.new(f, :text=>'exit', + :command=>proc{exit}).pack(:fill=>:x, :pady=>10) + +TkFrame.new{|f| + pack(:side=>:right, :expand=>true, :fill=>:both) + TkLabel.new(f, :text=>'source::').pack(:anchor=>:w) + TkFrame.new(f){|ff| + TkText.new(ff){ + yscrollbar(TkScrollbar.new(ff){pack(:fill=>:y, :side=>:right)}) + insert('end', File.read(__FILE__)) + pack(:side=>:left, :expand=>true, :fill=>:both) + } + pack(:expand=>true, :fill=>:both) + } +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/propagate.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/propagate.rb new file mode 100644 index 0000000..800cef5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/propagate.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +require 'tk' + +TkLabel.new(:text=>"Please click the bottom frame").pack + +f = TkFrame.new(:width=>400, :height=>100, :background=>'yellow', + :relief=>'ridge', :borderwidth=>5).pack + +# TkPack.propagate(f, false) # <== important!! +f.pack_propagate(false) # <== important!! + +list = (1..3).collect{|n| + TkButton.new(f, :text=>"button#{'-X'*n}"){ + command proc{ + puts "button#{'-X'*n}" + self.unpack + } + } +} + +list.unshift(nil) + +f.bind('1', proc{ + w = list.shift + w.unpack if w + list.push(w) + list[0].pack(:expand=>true, :anchor=>:center) if list[0] + }) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample.rb new file mode 100644 index 0000000..3696a20 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample.rb @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require 'remote-tk' + +puts <proc{puts 'This procesure is on the controller-ip (Ruby/Tk)'}, :text=>'print on Ruby/Tk (controller-ip)').pack(:fill=>:x)} +ip.eval_proc{TkButton.new(:command=>'puts {This procesure is on the remote-ip (wish)}', :text=>'print on wish (remote-ip)').pack(:fill=>:x)} + +# If your remote-ip is Ruby/Tk, you can control the remote Ruby by +# 'ruby' or 'ruby_eval' or 'ruby_cmd' on the Tk interpreter. +if ip.is_rubytk? + ip.eval_proc{TkButton.new(:command=>'ruby {p 111; p Array.new(3,"ruby")}', :text=>'ruby cmd on the remote-ip').pack(:fill=>:x)} +end + +ip.eval_proc{TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x)} + +TkButton.new(:command=>proc{exit}, :text=>'QUIT', + :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample2.rb new file mode 100644 index 0000000..e12b2a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/remote-ip_sample2.rb @@ -0,0 +1,56 @@ +#!/usr/bin/env ruby + +require 'remote-tk' + +# start sub-process +ip_name = 'remote_ip' +ip_list = TkWinfo.interps +fork{ + exec "/usr/bin/env ruby -r tk -e \"Tk.appname('#{ip_name}');Tk.mainloop\"" +} +sleep 1 until (app = (TkWinfo.interps - ip_list)[0]) && app =~ /^#{ip_name}/ +p TkWinfo.interps + +# create RemoteTkIp object +ip = RemoteTkIp.new(app) + +# setup remote-ip window +btns = [] +ip.eval_proc{ + btns << + TkButton.new(:command=>proc{ + puts 'This procesure is on the controller-ip (Ruby-side)' + }, + :text=>'print on controller-ip (Ruby-side)').pack(:fill=>:x) + + btns << + TkButton.new(:command=> + 'puts {This procesure is on the remote-ip (Tk-side)}', + :text=>'print on remote-ip (Tk-side)').pack(:fill=>:x) + + btns << + TkButton.new(:command=> + 'ruby { + puts "This procedure is on the remote-ip (Ruby-side)" + p Array.new(3,"ruby") + }', + :text=>'ruby cmd on the remote-ip').pack(:fill=>:x) + + TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x) +} + +# setup controller-ip window +btns.each_with_index{|btn, idx| + # The scope of the eval-block of 'eval_proc' method is different from + # the enternal. If you want to pass local values to the eval-block, + # use arguments of eval_proc method. They are passed to block-arguments. + TkButton.new(:command=>proc{ip.eval_proc(btn){|b| b.flash}}, + :text=>"flash button-#{idx}", + :padx=>10).pack(:padx=>10, :pady=>2) +} + +TkButton.new(:command=>proc{exit}, :text=>'QUIT', + :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7) + +# start eventloop +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.en b/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.en new file mode 100644 index 0000000..39b4013 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.en @@ -0,0 +1,13 @@ +! +! see Tcl/Tk's "options" manual for "Database Name" and "Database Class" +! +*BtnFrame.borderWidth: 5 +*BtnFrame.relief: ridge +*BtnFrame.Button.background: wheat +*BtnFrame.Button.foreground: red +*hello.text: HELLO +*quit.text: QUIT +*BTN_CMD.show_msg: {|arg| print "($SAFE=#{$SAFE}) ";\ + print "Hello!! This is a sample of #{arg}.";\ + print "(<<< $SAFE=#{$SAFE})\n"} +*BTN_CMD.bye_msg: {print "($SAFE=#{$SAFE} >>>) Good-bye¡¥(<<< $SAFE=#{$SAFE})\n"} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.ja b/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.ja new file mode 100644 index 0000000..a61390f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/resource.ja @@ -0,0 +1,13 @@ +! +! see Tcl/Tk's "options" manual for "Database Name" and "Database Class" +! +*BtnFrame.borderWidth: 5 +*BtnFrame.relief: ridge +*BtnFrame.Button.background: wheat +*BtnFrame.Button.foreground: red +*hello.text: ¤³¤ó¤Ë¤Á¤Ï +*quit.text: ½ªÎ» +*BTN_CMD.show_msg: {|arg| print "($SAFE=#{$SAFE} >>>) ";\ + print "¤³¤ó¤Ë¤Á¤Ï¡ª¡ª #{arg} ¤Î¥µ¥ó¥×¥ë¤Ç¤¹¡¥";\ + print "(<<< $SAFE=#{$SAFE})\n"} +*BTN_CMD.bye_msg: {print "($SAFE=#{$SAFE} >>>) ¤µ¤è¤¦¤Ê¤é¡¥(<<< $SAFE=#{$SAFE})\n"} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/safe-tk.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/safe-tk.rb new file mode 100644 index 0000000..e228969 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/safe-tk.rb @@ -0,0 +1,115 @@ +#!/usr/bin/env ruby +# This script is a sample of MultiTkIp class + +require "multi-tk" + +############################### + +TkLabel.new(:text=>'This is the Default Master Ipnterpreter').pack(:padx=>5, :pady=>3) +TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack(:pady=>3) +TkFrame.new(:borderwidth=>2, :height=>3, + :relief=>:sunken).pack(:fill=>:x, :expand=>true, + :padx=>10, :pady=>7) + +############################### + +puts "---- create a safe slave IP with Ruby's safe-level == 1 ----------" +ip = MultiTkIp.new_safe_slave(1) + +puts "\n---- create procs ----------" +puts 'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}' +x = proc{p ['proc x', "$SAFE==#{$SAFE}"]; exit} +TkLabel.new(:text=>'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}', + :anchor=>:w).pack(:fill=>:x) + +puts 'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}' +y = proc{|label| p ['proc y', "$SAFE==#{$SAFE}", label]; label.text($SAFE)} +TkLabel.new(:text=>'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}', + :anchor=>:w).pack(:fill=>:x) + +puts 'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}' +z = proc{p ['proc z', "$SAFE==#{$SAFE}"]; exit} +TkLabel.new(:text=>'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}', + :anchor=>:w).pack(:fill=>:x) + +puts "\n---- call 1st eval_proc ----------" +print 'lbl = ' +p lbl = ip.eval_proc{ + TkLabel.new(:text=>"1st eval_proc : $SAFE == #{$SAFE}").pack + + f = TkFrame.new.pack + TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left) + # TkLabel.new(f, :text=>" (<-- 'lbl' widget is here)").pack(:side=>:right) + l = TkLabel.new(f).pack(:side=>:right) + + TkButton.new(:text=>':command=>proc{l.text($SAFE)}', + :command=>proc{l.text($SAFE)}).pack(:fill=>:x, :padx=>5) + TkButton.new(:text=>':command=>x', :command=>x).pack(:fill=>:x, :padx=>5) + TkButton.new(:text=>':command=>proc{exit}', + :command=>proc{exit}).pack(:fill=>:x, :padx=>5) + TkFrame.new(:borderwidth=>2, :height=>3, + :relief=>:sunken).pack(:fill=>:x, :expand=>true, + :padx=>10, :pady=>7) + l # return the label widget +} + +puts "\n---- change the safe slave IP's safe-level ==> 3 ----------" +ip.safe_level = 3 + +puts "\n---- call 2nd eval_proc ----------" +p ip.eval_proc(proc{ + TkLabel.new(:text=>"2nd eval_proc : $SAFE == #{$SAFE}").pack + f = TkFrame.new.pack + TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left) + l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right) + TkButton.new(:text=>':command=>proc{l.text($SAFE)}', + :command=>proc{l.text($SAFE)}).pack(:fill=>:x, + :padx=>5) + TkButton.new(:text=>':command=>proc{y.call(l)}', + :command=>proc{y.call(l)}).pack(:fill=>:x, + :padx=>5) + TkButton.new(:text=>':command=>proc{Thread.new(l, &y).value}', + :command=>proc{ + Thread.new(l, &y).value + }).pack(:fill=>:x, :padx=>5) + TkButton.new(:text=>':command=>proc{z.call}', + :command=>proc{z.call}).pack(:fill=>:x, :padx=>5) + TkFrame.new(:borderwidth=>2, :height=>3, + :relief=>:sunken).pack(:fill=>:x, :expand=>true, + :padx=>10, :pady=>7) + }) + +puts "\n---- call 1st and 2nd eval_str ----------" +p bind = ip.eval_str(' + TkLabel.new(:text=>"1st and 2nd eval_str : $SAFE == #{$SAFE}").pack + f = TkFrame.new.pack + TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left) + l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right) + TkButton.new(:text=>":command=>proc{y.call(l)}", + :command=>proc{y.call(l)}).pack(:fill=>:x, :padx=>5) + binding +', binding) + +p ip.eval_str(" + TkButton.new(:text=>':command=>proc{ l.text = $SAFE }', + :command=>proc{ l.text = $SAFE }).pack(:fill=>:x, :padx=>5) + TkFrame.new(:borderwidth=>2, :height=>3, + :relief=>:sunken).pack(:fill=>:x, :expand=>true, + :padx=>10, :pady=>7) +", bind) + +puts "\n---- change the safe slave IP's safe-level ==> 4 ----------" +ip.safe_level = 4 + +puts "\n---- call 3rd and 4th eval_proc ----------" +p ip.eval_proc{ + TkLabel.new(:text=>"3rd and 4th eval_proc : $SAFE == #{$SAFE}").pack +} +p ip.eval_proc{ + TkButton.new(:text=>':command=>proc{ lbl.text = $SAFE }', + :command=>proc{ lbl.text = $SAFE }).pack(:fill=>:x, :padx=>5) +} + +puts "\n---- start event-loop ( current $SAFE == #{$SAFE} ) ----------" + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/scrollframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/scrollframe.rb new file mode 100644 index 0000000..b0ac6d3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/scrollframe.rb @@ -0,0 +1,237 @@ +# +# Tk::ScrollFrame class +# +# This widget class is a frame widget with scrollbars. +# The ScrollFrame doesn't propagate the size of embedded widgets. +# When it is configured, scrollregion of the container is changed. +# +# Scrollbars can be toggled by Tk::ScrollFrame#vscroll & hscroll. +# If horizontal or virtical scrollbar is turned off, the horizontal +# or virtical size of embedded widgets is propagated. +# +# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +class Tk::ScrollFrame < TkFrame + include TkComposite + + DEFAULT_WIDTH = 200 + DEFAULT_HEIGHT = 200 + + def initialize_composite(keys={}) + @frame.configure(:width=>DEFAULT_WIDTH, :height=>DEFAULT_HEIGHT) + + # create scrollbars + @h_scroll = TkScrollbar.new(@frame, 'orient'=>'horizontal') + @v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical') + + # create a canvas widget + @canvas = TkCanvas.new(@frame, + :borderwidth=>0, :selectborderwidth=>0, + :highlightthickness=>0) + + # allignment + TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) + TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0) + @canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'news') + @frame.grid_propagate(false) + + # assign scrollbars + @canvas.xscrollbar(@h_scroll) + @canvas.yscrollbar(@v_scroll) + + # convert hash keys + keys = _symbolkey2str(keys) + + # check options for the frame + framekeys = {} + if keys.key?('classname') + keys['class'] = keys.delete('classname') + end + if @classname = keys.delete('class') + framekeys['class'] = @classname + end + if @colormap = keys.delete('colormap') + framekeys['colormap'] = @colormap + end + if @container = keys.delete('container') + framekeys['container'] = @container + end + if @visual = keys.delete('visual') + framekeys['visual'] = @visual + end + if @classname.kind_of? TkBindTag + @db_class = @classname + @classname = @classname.id + elsif @classname + @db_class = TkDatabaseClass.new(@classname) + else + @db_class = self.class + @classname = @db_class::WidgetClassName + end + + # create base frame + @base = TkFrame.new(@canvas, framekeys) + + # embed base frame + @cwin = TkcWindow.new(@canvas, [0, 0], :window=>@base, :anchor=>'nw') + @canvas.scrollregion(@cwin.bbox) + + # binding to reset scrollregion + @base.bind('Configure'){ _reset_scrollregion(nil, nil) } + + # set default receiver of method calls + @path = @base.path + + # scrollbars ON + vscroll(keys.delete('vscroll'){true}) + hscroll(keys.delete('hscroll'){true}) + + # please check the differences of the following definitions + option_methods( + :scrollbarwidth + ) + + # set receiver widgets for configure methods (with alias) + delegate_alias('scrollbarrelief', 'relief', @h_scroll, @v_scroll) + + # set receiver widgets for configure methods + delegate('DEFAULT', @base) + delegate('background', @frame, @base, @canvas, @h_scroll, @v_scroll) + delegate('width', @frame) + delegate('height', @frame) + delegate('activebackground', @h_scroll, @v_scroll) + delegate('troughcolor', @h_scroll, @v_scroll) + delegate('repeatdelay', @h_scroll, @v_scroll) + delegate('repeatinterval', @h_scroll, @v_scroll) + delegate('borderwidth', @frame) + delegate('relief', @frame) + + # do configure + configure keys unless keys.empty? + end + + # callback for Configure event + def _reset_scrollregion(h_mod=nil, v_mod=nil) + cx1, cy1, cx2, cy2 = @canvas.scrollregion + x1, y1, x2, y2 = @cwin.bbox + @canvas.scrollregion([x1, y1, x2, y2]) + + if h_mod.nil? && v_mod.nil? + if x2 != cx2 && TkGrid.info(@h_scroll).size == 0 + @frame.grid_propagate(true) + @canvas.width = x2 + Tk.update_idletasks + @frame.grid_propagate(false) + end + if y2 != cy2 && TkGrid.info(@v_scroll).size == 0 + @frame.grid_propagate(true) + @canvas.height = y2 + Tk.update_idletasks + @frame.grid_propagate(false) + end + else + @h_scroll.ungrid if h_mod == false + @v_scroll.ungrid if v_mod == false + + h_flag = (TkGrid.info(@h_scroll).size == 0) + v_flag = (TkGrid.info(@v_scroll).size == 0) + + @frame.grid_propagate(true) + + @canvas.width = (h_flag)? x2: @canvas.winfo_width + @canvas.height = (v_flag)? y2: @canvas.winfo_height + + @h_scroll.grid('row'=>1, 'column'=>0, 'sticky'=>'ew') if h_mod + @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns') if v_mod + + Tk.update_idletasks + + @frame.grid_propagate(false) + end + end + private :_reset_scrollregion + + # forbid to change binding of @base frame + def bind(*args) + @frame.bind(*args) + end + def bind_append(*args) + @frame.bind_append(*args) + end + def bind_remove(*args) + @frame.bind_remove(*args) + end + def bindinfo(*args) + @frame.bindinfo(*args) + end + + # set width of scrollbar + def scrollbarwidth(width = nil) + if width + @h_scroll.width(width) + @v_scroll.width(width) + else + @h_scroll.width + end + end + + # vertical scrollbar : ON/OFF + def vscroll(mode) + Tk.update_idletasks + st = TkGrid.info(@v_scroll) + if mode && st.size == 0 then + @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns') + _reset_scrollregion(nil, true) + elsif !mode && st.size != 0 then + _reset_scrollregion(nil, false) + else + _reset_scrollregion(nil, nil) + end + self + end + + # horizontal scrollbar : ON/OFF + def hscroll(mode) + Tk.update_idletasks + st = TkGrid.info(@h_scroll) + if mode && st.size == 0 then + _reset_scrollregion(true, nil) + elsif !mode && st.size != 0 then + _reset_scrollregion(false, nil) + else + _reset_scrollregion(nil, nil) + end + self + end +end + +# test +if __FILE__ == $0 + f = Tk::ScrollFrame.new(:scrollbarwidth=>10, :width=>300, :height=>200) + f.pack(:expand=>true, :fill=>:both) + + TkButton.new(f, :text=>'foo button', :command=>proc{puts 'foo'}).pack + TkButton.new(f, :text=>'baaar button', :command=>proc{puts 'baaar'}).pack + TkButton.new(f, :text=>'baz button', :command=>proc{puts 'baz'}).pack + TkButton.new(f, :text=>'hoge hoge button', + :command=>proc{puts 'hoge hoge'}).pack(:side=>:bottom) + + # f.hscroll(false) + + Tk.after(3000){ + t = TkText.new(f).pack(:expand=>true, :fill=>:both) + t.insert(:end, 'Here is a text widget') + } + + Tk.after(6000){ f.vscroll(false) } + + Tk.after(9000){ f.vscroll(true) } + + Tk.after(12000){ f.hscroll(false) } + + Tk.after(15000){ f.hscroll(true) } + + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/batsu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/batsu.gif new file mode 100644 index 0000000000000000000000000000000000000000..880cc73e091d8c2d8cef69f65e32cb87caf2bcad GIT binary patch literal 538 zcmV+#0_FWjNk%v~VL$*t0P+9;^Ef#5RaN(Karljm`l_n@#>V~P;{X5uEC2ui06+jh z000C2c)HyFFv>}*y*TU5yZ>M)j$~<`oS_;;TM#he7OR0$^&HD?eNQ>pZsz+%f~{e1 zWjwBCgQzsRD@u^B7?JtFPN!Aw^(oXYRS@r&8nZf8I&;g-P_M&iAUP?gi5qqU0)qlm zGiiHSJ1|>$4uOP)QiolMi+ywpkc5UVh;U_>jW(5_EmM)5EuSo*i=!AdJ78@!mY1(* zq!zL5dg-FQZ|<8IOyNWkd9V19EU1WL~k)c6r?G|=1l@BQ_SQk$fp2xB6bor zdi0%6lAI>#+QAfQ29}bdjG}7PDl`>b2dVM{Hbzya*`SJ*I!CQduNR>7{OJbkSPpWd zB*Y2NF53clUDO<8)vs1h8}b$q^>V5xaSkN#*n c^$OOntG50$d*|uhxi1_~zP$PK77_peI}H#4djJ3c literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines0.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines0.tcl new file mode 100644 index 0000000..8ed3c5e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines0.tcl @@ -0,0 +1,42 @@ +#! /usr/local/bin/wish + +proc drawlines {} { + puts [clock format [clock seconds]] + + for {set j 0} {$j < 100} {incr j} { + puts -nonewline "*" + flush stdout + if {$j & 1} { + set c "blue" + } { + set c "red" + } + for {set i 0} {$i < 100} {incr i} { +# .a create line $i 0 0 [expr 500 - $i] -fill $c + } + } + + puts [clock format [clock seconds]] + + for {set j 0} {$j < 100} {incr j} { + puts -nonewline "*" + flush stdout + if {$j & 1} { + set c "blue" + } { + set c "red" + } + for {set i 0} {$i < 100} {incr i} { + .a create line $i 0 0 [expr 500 - $i] -fill $c + } + } + + puts [clock format [clock seconds]] +# destroy . +} + +canvas .a -height 500 -width 500 +button .b -text draw -command drawlines +pack .a .b -side left + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines1.rb new file mode 100644 index 0000000..9f21ae6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines1.rb @@ -0,0 +1,50 @@ +#! /usr/local/bin/ruby + +require "tcltk" + +def drawlines() + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 +# $a.e("create line", i, 0, 0, 500 - i, "-fill", col) + end + end + + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 + $a.e("create line", i, 0, 0, 500 - i, "-fill", col) + end + end + + print Time.now, "\n" +# $ip.commands()["destroy"].e($root) +end + +$ip = TclTkInterpreter.new() +$root = $ip.rootwidget() +$a = TclTkWidget.new($ip, $root, "canvas", "-height 500 -width 500") +$c = TclTkCallback.new($ip, proc{drawlines()}) +$b = TclTkWidget.new($ip, $root, "button", "-text draw -command", $c) + +$ip.commands()["pack"].e($a, $b, "-side left") + +TclTk.mainloop + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines2.rb new file mode 100644 index 0000000..e459589 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines2.rb @@ -0,0 +1,54 @@ +#! /usr/local/bin/ruby + +require "tk" + +def drawlines() + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 +# TkcLine.new($a, i, 0, 0, 500 - i, "-fill", col) + end + end + + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 + TkcLine.new($a, i, 0, 0, 500 - i, "-fill", col) + end + end + + print Time.now, "\n" +# Tk.root.destroy +end + +$a = TkCanvas.new{ + height(500) + width(500) +} + +$b = TkButton.new{ + text("draw") + command(proc{drawlines()}) +} + +TkPack.configure($a, $b, {"side"=>"left"}) + +Tk.mainloop + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines3.rb new file mode 100644 index 0000000..caa50f9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines3.rb @@ -0,0 +1,54 @@ +#! /usr/local/bin/ruby + +require "tk" + +def drawlines() + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 +# $a.create(TkcLine, i, 0, 0, 500 - i, "fill"=>col) + end + end + + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 + $a.create(TkcLine, i, 0, 0, 500 - i, "fill"=>col) + end + end + + print Time.now, "\n" +# Tk.root.destroy +end + +$a = TkCanvas.new{ + height(500) + width(500) +} + +$b = TkButton.new{ + text("draw") + command(proc{drawlines()}) +} + +TkPack.configure($a, $b, {"side"=>"left"}) + +Tk.mainloop + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines4.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines4.rb new file mode 100644 index 0000000..7a1175b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/lines4.rb @@ -0,0 +1,54 @@ +#! /usr/local/bin/ruby + +require "tk" + +def drawlines() + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 +# TkCore::INTERP.__invoke($a.path, "create", "line", i.to_s, '0', '0', (500 - i).to_s, "-fill", col) + end + end + + print Time.now, "\n" + + for j in 0 .. 99 + print "*" + $stdout.flush + if (j & 1) != 0 + col = "blue" + else + col = "red" + end + for i in 0 .. 99 + TkCore::INTERP.__invoke($a.path, "create", "line", i.to_s, '0', '0', (500 - i).to_s, "-fill", col) + end + end + + print Time.now, "\n" +# Tk.root.destroy +end + +$a = TkCanvas.new{ + height(500) + width(500) +} + +$b = TkButton.new{ + text("draw") + command(proc{drawlines()}) +} + +TkPack.configure($a, $b, {"side"=>"left"}) + +Tk.mainloop + +# eof diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/maru.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/maru.gif new file mode 100644 index 0000000000000000000000000000000000000000..2c0202892ec410978d406c2a5cd3322f40fd32bf GIT binary patch literal 481 zcmV<70UrKGNk%v~VL$*t0P+9;adG#Jjrgjn`o_lm)YSaq;{E^s{{R30EC2ui06+jh z000C2Xu90~Fv>}*y*TU5yZ>M)j$~<`V4)U6I|y(r&vY%j!&+cEZvVg;PRCpMf=JtN zRa705(AZLic?ts9K=hZ@N?lc#th=?5zpZdUfe|a!O z4}Expfqs87h7O1@gMf>Yla5S>D~xu5lU{|H4px{{ACW>}52P`V9jG^|qhd9#9I$#2 ztf8hJxN))#NGQV(#U{tXLBz|(&B)IN1k(hcGR!~>)YX?U*gx9T*4`({+v70bHsRAs z!6fF??rG)G+w*(%*$ekIa{AyFaLV#e#4iB_4GhGRFvTW+!4?K+c", c5) + cb.push(c5) + + #### tcl/tk ¤Î¥¤¥á¡¼¥¸¤ËÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È(TclTkImage)¤ÎÁàºî + + # ¥Ç¡¼¥¿¤ò»ØÄꤷ¤ÆÀ¸À®¤¹¤ë. + i1 = TclTkImage.new(ip, "photo", "-file maru.gif") + # ¥é¥Ù¥ë¤ËÄ¥¤êÉÕ¤±¤Æ¤ß¤ë. + l3 = TclTkWidget.new(ip, root, label, "-relief raised -image", i1) + place.e(l3, "-x 0 -rely 0.4 -relwidth 0.2 -relheight 0.2") + # ¶õ¤Î¥¤¥á¡¼¥¸¤òÀ¸À®¤·¤Æ¸å¤ÇÁàºî¤¹¤ë. + i2 = TclTkImage.new(ip, "photo") + # ¥¤¥á¡¼¥¸¤òÁàºî¤¹¤ë. + i2.e("copy", i1) + i2.e("configure -gamma 0.5") + l4 = TclTkWidget.new(ip, root, label, "-relief raised -image", i2) + place.e(l4, "-relx 0.2 -rely 0.4 -relwidth 0.2 -relheight 0.2") + + #### + end + + # ¥µ¥ó¥×¥ë¤Î¤¿¤á¤Î¥¦¥£¥¸¥§¥Ã¥È¤òÀ¸À®¤¹¤ë. + def sample(ip, parent) + bind, button, destroy, grid, toplevel, wm = ip.commands().values_at( + "bind", "button", "destroy", "grid", "toplevel", "wm") + + ## toplevel + + # ¿·¤·¤¤¥¦¥¤¥ó¥É¥¦¤ò³«¤¯¤Ë¤Ï, toplevel ¤ò»È¤¦. + t1 = TclTkWidget.new(ip, parent, toplevel) + # ¥¿¥¤¥È¥ë¤òÉÕ¤±¤Æ¤ª¤¯ + wm.e("title", t1, "sample") + + # ¥¦¥£¥¸¥§¥Ã¥È¤¬Ç˲õ¤µ¤ì¤¿¤È¤­, ¥³¡¼¥ë¥Ð¥Ã¥¯¤¬ GC ¤ÎÂоݤˤʤë¤è¤¦¤Ë¤¹¤ë. + cb = [] + cb.push(c = TclTkCallback.new(ip, proc{|w| TclTk.dcb(cb, t1, w)}, "%W")) + bind.e(t1, "", c) + + # ¥Ü¥¿¥ó¤ÎÀ¸À®. + wid = [] + # toplevel ¥¦¥£¥¸¥§¥Ã¥È¤òÇ˲õ¤¹¤ë¤Ë¤Ï destroy ¤¹¤ë. + cb.push(c = TclTkCallback.new(ip, proc{destroy.e(t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text close -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_label(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text label -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_button(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text button -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_checkbutton(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text checkbutton -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_radiobutton(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text radiobutton -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_scale(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text scale -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_entry(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text entry -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_text(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text text -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_raise(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text raise/lower -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_modal(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text message/modal -command", + c)) + cb.push(c = TclTkCallback.new(ip, proc{test_menu(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text menu -command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_listbox(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text listbox/scrollbar", + "-command", c)) + cb.push(c = TclTkCallback.new(ip, proc{test_canvas(ip, t1)})) + wid.push(TclTkWidget.new(ip, t1, button, "-text canvas -command", c)) + + # grid ¤Çɽ¼¨¤¹¤ë. + ro = co = 0 + wid.each{|w| + grid.e(w, "-row", ro, "-column", co, "-sticky news") + ro += 1 + if ro == 7 + ro = 0 + co += 1 + end + } + end + + # inittoplevel(ip, parent, title) + # °Ê²¼¤Î½èÍý¤ò¤Þ¤È¤á¤Æ¹Ô¤¦. + # 1. toplevel ¥¦¥£¥¸¥§¥Ã¥È¤òºîÀ®¤¹¤ë. + # 2. ¥³¡¼¥ë¥Ð¥Ã¥¯¤òÅÐÏ¿¤¹¤ëÇÛÎó¤òÍÑ°Õ¤·, toplevel ¥¦¥£¥¸¥§¥Ã¥È¤Î + # ¥¤¥Ù¥ó¥È¤Ë¥³¡¼¥ë¥Ð¥Ã¥¯¤òºï½ü¤¹¤ë¼ê³¤­¤òÅÐÏ¿¤¹¤ë. + # 3. ¥¯¥í¡¼¥º¥Ü¥¿¥ó¤òºî¤ë. + # ºîÀ®¤·¤¿ toplevel ¥¦¥£¥¸¥§¥Ã¥È, ¥¯¥í¡¼¥º¥Ü¥¿¥ó, ¥³¡¼¥ë¥Ð¥Ã¥¯ÅÐÏ¿ÍÑÊÑ¿ô + # ¤òÊÖ¤¹. + # ip: ¥¤¥ó¥¿¥×¥ê¥¿ + # parent: ¿Æ¥¦¥£¥¸¥§¥Ã¥È + # title: toplevel ¥¦¥£¥¸¥§¥Ã¥È¤Î¥¦¥¤¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë + def inittoplevel(ip, parent, title) + bind, button, destroy, toplevel, wm = ip.commands().values_at( + "bind", "button", "destroy", "toplevel", "wm") + + # ¿·¤·¤¤¥¦¥¤¥ó¥É¥¦¤ò³«¤¯¤Ë¤Ï, toplevel ¤ò»È¤¦. + t1 = TclTkWidget.new(ip, parent, toplevel) + # ¥¿¥¤¥È¥ë¤òÉÕ¤±¤Æ¤ª¤¯ + wm.e("title", t1, title) + + # ¥¦¥£¥¸¥§¥Ã¥È¤¬Ç˲õ¤µ¤ì¤¿¤È¤­, ¥³¡¼¥ë¥Ð¥Ã¥¯¤¬ GC ¤ÎÂоݤˤʤë¤è¤¦¤Ë¤¹¤ë. + cb = [] + cb.push(c = TclTkCallback.new(ip, proc{|w| TclTk.dcb(cb, t1, w)}, "%W")) + bind.e(t1, "", c) + # close ¥Ü¥¿¥ó¤òºî¤Ã¤Æ¤ª¤¯. + # toplevel ¥¦¥£¥¸¥§¥Ã¥È¤òÇ˲õ¤¹¤ë¤Ë¤Ï destroy ¤¹¤ë. + cb.push(c = TclTkCallback.new(ip, proc{destroy.e(t1)})) + b1 = TclTkWidget.new(ip, t1, button, "-text close -command", c) + + return t1, b1, cb + end + + # label ¤Î¥µ¥ó¥×¥ë. + def test_label(ip, parent) + button, global, label, pack = ip.commands().values_at( + "button", "global", "label", "pack") + t1, b1, cb = inittoplevel(ip, parent, "label") + + ## label + + # ¤¤¤í¤¤¤í¤Ê·Á¤Î¥é¥Ù¥ë. + l1 = TclTkWidget.new(ip, t1, label, "-text {default(flat)}") + l2 = TclTkWidget.new(ip, t1, label, "-text raised -relief raised") + l3 = TclTkWidget.new(ip, t1, label, "-text sunken -relief sunken") + l4 = TclTkWidget.new(ip, t1, label, "-text groove -relief groove") + l5 = TclTkWidget.new(ip, t1, label, "-text ridge -relief ridge") + l6 = TclTkWidget.new(ip, t1, label, "-bitmap error") + l7 = TclTkWidget.new(ip, t1, label, "-bitmap questhead") + + # pack ¤·¤Æ¤âɽ¼¨¤µ¤ì¤ë. + pack.e(b1, l1, l2, l3, l4, l5, l6, l7, "-pady 3") + + ## -textvariable + + # tcltk ¥é¥¤¥Ö¥é¥ê¤Î¼ÂÁõ¤Ç¤Ï, ¥³¡¼¥ë¥Ð¥Ã¥¯¤Ï tcl/tk ¤Î``¼ê³¤­''¤òÄ̤·¤Æ + # ¸Æ¤Ð¤ì¤ë. ¤·¤¿¤¬¤Ã¤Æ, ¥³¡¼¥ë¥Ð¥Ã¥¯¤ÎÃæ¤Ç(Âç°è)ÊÑ¿ô¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤È¤­¤Ï, + # global ¤¹¤ëɬÍפ¬¤¢¤ë. + # global ¤¹¤ëÁ°¤ËÊÑ¿ô¤ËÃͤòÀßÄꤷ¤Æ¤·¤Þ¤¦¤È¥¨¥é¡¼¤Ë¤Ê¤ë¤Î¤Ç, + # tcl/tk ¤Ë¤ª¤±¤ëɽ¸½·Á¤À¤±À¸À®¤·¤Æ, ¼ÂºÝ¤ËÃͤòÀßÄꤷ¤Ê¤¤¤è¤¦¤Ë, + # 2 ÈÖÌܤΰú¿ô¤Ë¤Ï nil ¤òÍ¿¤¨¤ë. + v1 = TclTkVariable.new(ip, nil) + global.e(v1) + v1.set(100) + # -textvariable ¤ÇÊÑ¿ô¤òÀßÄꤹ¤ë. + l6 = TclTkWidget.new(ip, t1, label, "-textvariable", v1) + # ¥³¡¼¥ë¥Ð¥Ã¥¯¤ÎÃ椫¤éÊÑ¿ô¤òÁàºî¤¹¤ë. + cb.push(c = TclTkCallback.new(ip, proc{ + global.e(v1); v1.set(v1.get().to_i + 10)})) + b2 = TclTkWidget.new(ip, t1, button, "-text +10 -command", c) + cb.push(c = TclTkCallback.new(ip, proc{ + global.e(v1); v1.set(v1.get().to_i - 10)})) + b3 = TclTkWidget.new(ip, t1, button, "-text -10 -command", c) + pack.e(l6, b2, b3) + end + + # button ¤Î¥µ¥ó¥×¥ë. + def test_button(ip, parent) + button, pack = ip.commands().values_at("button", "pack") + t1, b1, cb = inittoplevel(ip, parent, "button") + + ## button + + # ¥³¡¼¥ë¥Ð¥Ã¥¯Æâ¤Ç»²¾È¤¹¤ëÊÑ¿ô¤ÏÀè¤ËÀë¸À¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. + b3 = b4 = nil + cb.push(c = TclTkCallback.new(ip, proc{b3.e("flash"); b4.e("flash")})) + b2 = TclTkWidget.new(ip, t1, button, "-text flash -command", c) + cb.push(c = TclTkCallback.new(ip, proc{b2.e("configure -state normal")})) + b3 = TclTkWidget.new(ip, t1, button, "-text normal -command", c) + cb.push(c = TclTkCallback.new(ip, proc{b2.e("configure -state disabled")})) + b4 = TclTkWidget.new(ip, t1, button, "-text disable -command", c) + pack.e(b1, b2, b3, b4) + end + + # checkbutton ¤Î¥µ¥ó¥×¥ë. + def test_checkbutton(ip, parent) + checkbutton, global, pack = ip.commands().values_at( + "checkbutton", "global", "pack") + t1, b1, cb = inittoplevel(ip, parent, "checkbutton") + + ## checkbutton + + v1 = TclTkVariable.new(ip, nil) + global.e(v1) + # -variable ¤ÇÊÑ¿ô¤òÀßÄꤹ¤ë. + ch1 = TclTkWidget.new(ip, t1, checkbutton, "-onvalue on -offvalue off", + "-textvariable", v1, "-variable", v1) + pack.e(b1, ch1) + end + + # radiobutton ¤Î¥µ¥ó¥×¥ë. + def test_radiobutton(ip, parent) + global, label, pack, radiobutton = ip.commands().values_at( + "global", "label", "pack", "radiobutton") + t1, b1, cb = inittoplevel(ip, parent, "radiobutton") + + ## radiobutton + + v1 = TclTkVariable.new(ip, nil) + global.e(v1) + # ¥Ì¥ë¥¹¥È¥ê¥ó¥°¤Ï "{}" ¤Ç»ØÄꤹ¤ë. + v1.set("{}") + l1 = TclTkWidget.new(ip, t1, label, "-textvariable", v1) + # -variable ¤ÇƱ¤¸ÊÑ¿ô¤ò»ØÄꤹ¤ë¤ÈƱ¤¸¥°¥ë¡¼¥×¤Ë¤Ê¤ë. + ra1 = TclTkWidget.new(ip, t1, radiobutton, + "-text radio1 -value r1 -variable", v1) + ra2 = TclTkWidget.new(ip, t1, radiobutton, + "-text radio2 -value r2 -variable", v1) + cb.push(c = TclTkCallback.new(ip, proc{global.e(v1); v1.set("{}")})) + ra3 = TclTkWidget.new(ip, t1, radiobutton, + "-text clear -value r3 -variable", v1, "-command", c) + pack.e(b1, l1, ra1, ra2, ra3) + end + + # scale ¤Î¥µ¥ó¥×¥ë. + def test_scale(ip, parent) + global, pack, scale = ip.commands().values_at( + "global", "pack", "scale") + t1, b1, cb = inittoplevel(ip, parent, "scale") + + ## scale + + v1 = TclTkVariable.new(ip, nil) + global.e(v1) + v1.set(219) + # ¥³¡¼¥ë¥Ð¥Ã¥¯Æâ¤Ç»²¾È¤¹¤ëÊÑ¿ô¤ÏÀè¤ËÀë¸À¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. + sca1 = nil + cb.push(c = TclTkCallback.new(ip, proc{global.e(v1); v = v1.get(); + sca1.e("configure -background", format("#%02x%02x%02x", v, v, v))})) + sca1 = TclTkWidget.new(ip, t1, scale, + "-label scale -orient h -from 0 -to 255 -variable", v1, "-command", c) + pack.e(b1, sca1) + end + + # entry ¤Î¥µ¥ó¥×¥ë. + def test_entry(ip, parent) + button, entry, global, pack = ip.commands().values_at( + "button", "entry", "global", "pack") + t1, b1, cb = inittoplevel(ip, parent, "entry") + + ## entry + + v1 = TclTkVariable.new(ip, nil) + global.e(v1) + # ¥Ì¥ë¥¹¥È¥ê¥ó¥°¤Ï "{}" ¤Ç»ØÄꤹ¤ë. + v1.set("{}") + en1 = TclTkWidget.new(ip, t1, entry, "-textvariable", v1) + cb.push(c = TclTkCallback.new(ip, proc{ + global.e(v1); print(v1.get(), "\n"); v1.set("{}")})) + b2 = TclTkWidget.new(ip, t1, button, "-text print -command", c) + pack.e(b1, en1, b2) + end + + # text ¤Î¥µ¥ó¥×¥ë. + def test_text(ip, parent) + button, pack, text = ip.commands().values_at( + "button", "pack", "text") + t1, b1, cb = inittoplevel(ip, parent, "text") + + ## text + + te1 = TclTkWidget.new(ip, t1, text) + cb.push(c = TclTkCallback.new(ip, proc{ + # 1 ¹ÔÌܤΠ0 ʸ»úÌܤ«¤éºÇ¸å¤Þ¤Ç¤òɽ¼¨¤·, ºï½ü¤¹¤ë. + print(te1.e("get 1.0 end")); te1.e("delete 1.0 end")})) + b2 = TclTkWidget.new(ip, t1, button, "-text print -command", c) + pack.e(b1, te1, b2) + end + + # raise/lower ¤Î¥µ¥ó¥×¥ë. + def test_raise(ip, parent) + button, frame, lower, pack, raise = ip.commands().values_at( + "button", "frame", "lower", "pack", "raise") + t1, b1, cb = inittoplevel(ip, parent, "raise/lower") + + ## raise/lower + + # button ¤ò±£¤¹¥Æ¥¹¥È¤Î¤¿¤á¤Ë, frame ¤ò»È¤¦. + f1 = TclTkWidget.new(ip, t1, frame) + # ¥³¡¼¥ë¥Ð¥Ã¥¯Æâ¤Ç»²¾È¤¹¤ëÊÑ¿ô¤ÏÀè¤ËÀë¸À¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. + b2 = nil + cb.push(c = TclTkCallback.new(ip, proc{raise.e(f1, b2)})) + b2 = TclTkWidget.new(ip, t1, button, "-text raise -command", c) + cb.push(c = TclTkCallback.new(ip, proc{lower.e(f1, b2)})) + b3 = TclTkWidget.new(ip, t1, button, "-text lower -command", c) + lower.e(f1, b3) + + pack.e(b2, b3, "-in", f1) + pack.e(b1, f1) + end + + # modal ¤Ê¥¦¥£¥¸¥§¥Ã¥È¤Î¥µ¥ó¥×¥ë. + def test_modal(ip, parent) + button, frame, message, pack, tk_chooseColor, tk_getOpenFile, + tk_messageBox = ip.commands().values_at( + "button", "frame", "message", "pack", "tk_chooseColor", + "tk_getOpenFile", "tk_messageBox") + # ºÇ½é¤Ë load ¤µ¤ì¤Æ¤¤¤Ê¤¤¥é¥¤¥Ö¥é¥ê¤Ï ip.commands() ¤Ë¸ºß¤·¤Ê¤¤¤Î¤Ç, + # TclTkLibCommand ¤òÀ¸À®¤¹¤ëɬÍפ¬¤¢¤ë. + tk_dialog = TclTkLibCommand.new(ip, "tk_dialog") + t1, b1, cb = inittoplevel(ip, parent, "message/modal") + + ## message + + mes = "¤³¤ì¤Ï message ¥¦¥£¥¸¥§¥Ã¥È¤Î¥Æ¥¹¥È¤Ç¤¹." + mes += "°Ê²¼¤Ï modal ¤Ê¥¦¥£¥¸¥§¥Ã¥È¤Î¥Æ¥¹¥È¤Ç¤¹." + me1 = TclTkWidget.new(ip, t1, message, "-text {#{mes}}") + + ## modal + + # tk_messageBox + cb.push(c = TclTkCallback.new(ip, proc{ + print tk_messageBox.e("-type yesnocancel -message messageBox", + "-icon error -default cancel -title messageBox"), "\n"})) + b2 = TclTkWidget.new(ip, t1, button, "-text messageBox -command", c) + # tk_dialog + cb.push(c = TclTkCallback.new(ip, proc{ + # ¥¦¥£¥¸¥§¥Ã¥È̾¤òÀ¸À®¤¹¤ë¤¿¤á¤Ë¥À¥ß¡¼¤Î frame ¤òÀ¸À®. + print tk_dialog.e(TclTkWidget.new(ip, t1, frame), + "dialog dialog error 2 yes no cancel"), "\n"})) + b3 = TclTkWidget.new(ip, t1, button, "-text dialog -command", c) + # tk_chooseColor + cb.push(c = TclTkCallback.new(ip, proc{ + print tk_chooseColor.e("-title chooseColor"), "\n"})) + b4 = TclTkWidget.new(ip, t1, button, "-text chooseColor -command", c) + # tk_getOpenFile + cb.push(c = TclTkCallback.new(ip, proc{ + print tk_getOpenFile.e("-defaultextension .rb", + "-filetypes {{{Ruby Script} {.rb}} {{All Files} {*}}}", + "-title getOpenFile"), "\n"})) + b5 = TclTkWidget.new(ip, t1, button, "-text getOpenFile -command", c) + + pack.e(b1, me1, b2, b3, b4, b5) + end + + # menu ¤Î¥µ¥ó¥×¥ë. + def test_menu(ip, parent) + global, menu, menubutton, pack = ip.commands().values_at( + "global", "menu", "menubutton", "pack") + tk_optionMenu = TclTkLibCommand.new(ip, "tk_optionMenu") + t1, b1, cb = inittoplevel(ip, parent, "menu") + + ## menu + + # menubutton ¤òÀ¸À®¤¹¤ë. + mb1 = TclTkWidget.new(ip, t1, menubutton, "-text menu") + # menu ¤òÀ¸À®¤¹¤ë. + me1 = TclTkWidget.new(ip, mb1, menu) + # mb1 ¤«¤é me1 ¤¬µ¯Æ°¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë. + mb1.e("configure -menu", me1) + + # cascade ¤Çµ¯Æ°¤µ¤ì¤ë menu ¤òÀ¸À®¤¹¤ë. + me11 = TclTkWidget.new(ip, me1, menu) + # radiobutton ¤Î¥µ¥ó¥×¥ë. + v1 = TclTkVariable.new(ip, nil); global.e(v1); v1.set("r1") + me11.e("add radiobutton -label radio1 -value r1 -variable", v1) + me11.e("add radiobutton -label radio2 -value r2 -variable", v1) + me11.e("add radiobutton -label radio3 -value r3 -variable", v1) + # cascade ¤Ë¤è¤ê mb11 ¤¬µ¯Æ°¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë. + me1.e("add cascade -label cascade -menu", me11) + + # checkbutton ¤Î¥µ¥ó¥×¥ë. + v2 = TclTkVariable.new(ip, nil); global.e(v2); v2.set("none") + me1.e("add checkbutton -label check -variable", v2) + # separator ¤Î¥µ¥ó¥×¥ë. + me1.e("add separator") + # command ¤Î¥µ¥ó¥×¥ë. + v3 = nil + cb.push(c = TclTkCallback.new(ip, proc{ + global.e(v1, v2, v3); print "v1: ", v1.get(), ", v2: ", v2.get(), + ", v3: ", v3.get(), "\n"})) + me1.e("add command -label print -command", c) + + ## tk_optionMenu + + v3 = TclTkVariable.new(ip, nil); global.e(v3); v3.set("opt2") + om1 = TclTkWidget.new(ip, t1, tk_optionMenu, v3, "opt1 opt2 opt3 opt4") + + pack.e(b1, mb1, om1, "-side left") + end + + # listbox ¤Î¥µ¥ó¥×¥ë. + def test_listbox(ip, parent) + clipboard, frame, grid, listbox, lower, menu, menubutton, pack, scrollbar, + selection = ip.commands().values_at( + "clipboard", "frame", "grid", "listbox", "lower", "menu", "menubutton", + "pack", "scrollbar", "selection") + t1, b1, cb = inittoplevel(ip, parent, "listbox") + + ## listbox/scrollbar + + f1 = TclTkWidget.new(ip, t1, frame) + # ¥³¡¼¥ë¥Ð¥Ã¥¯Æâ¤Ç»²¾È¤¹¤ëÊÑ¿ô¤ÏÀè¤ËÀë¸À¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. + li1 = sc1 = sc2 = nil + # ¼Â¹Ô»þ¤Ë, ¸å¤í¤Ë¥Ñ¥é¥á¡¼¥¿¤¬¤Ä¤¯¥³¡¼¥ë¥Ð¥Ã¥¯¤Ï, + # ¥¤¥Æ¥ì¡¼¥¿ÊÑ¿ô¤Ç¤½¤Î¥Ñ¥é¥á¡¼¥¿¤ò¼õ¤±¼è¤ë¤³¤È¤¬¤Ç¤­¤ë. + # (Ê£¿ô¤Î¥Ñ¥é¥á¡¼¥¿¤Ï¤Ò¤È¤Ä¤Îʸ»úÎó¤Ë¤Þ¤È¤á¤é¤ì¤ë.) + cb.push(c1 = TclTkCallback.new(ip, proc{|i| li1.e("xview", i)})) + cb.push(c2 = TclTkCallback.new(ip, proc{|i| li1.e("yview", i)})) + cb.push(c3 = TclTkCallback.new(ip, proc{|i| sc1.e("set", i)})) + cb.push(c4 = TclTkCallback.new(ip, proc{|i| sc2.e("set", i)})) + # listbox + li1 = TclTkWidget.new(ip, f1, listbox, + "-xscrollcommand", c3, "-yscrollcommand", c4, + "-selectmode extended -exportselection true") + for i in 1..20 + li1.e("insert end {line #{i} line #{i} line #{i} line #{i} line #{i}}") + end + # scrollbar + sc1 = TclTkWidget.new(ip, f1, scrollbar, "-orient horizontal -command", c1) + sc2 = TclTkWidget.new(ip, f1, scrollbar, "-orient vertical -command", c2) + + ## selection/clipboard + + mb1 = TclTkWidget.new(ip, t1, menubutton, "-text edit") + me1 = TclTkWidget.new(ip, mb1, menu) + mb1.e("configure -menu", me1) + cb.push(c = TclTkCallback.new(ip, proc{ + # clipboard ¤ò¥¯¥ê¥¢. + clipboard.e("clear") + # selection ¤«¤éʸ»úÎó¤òÆɤ߹þ¤ß clipboard ¤ËÄɲ乤ë. + clipboard.e("append {#{selection.e('get')}}")})) + me1.e("add command -label {selection -> clipboard} -command",c) + cb.push(c = TclTkCallback.new(ip, proc{ + # li1 ¤ò¥¯¥ê¥¢. + li1.e("delete 0 end") + # clipboard ¤«¤éʸ»úÎó¤ò¼è¤ê½Ð¤·, 1 ¹Ô¤º¤Ä + selection.e("get -selection CLIPBOARD").split(/\n/).each{|line| + # li1 ¤ËÁÞÆþ¤¹¤ë. + li1.e("insert end {#{line}}")}})) + me1.e("add command -label {clipboard -> listbox} -command",c) + + grid.e(li1, "-row 0 -column 0 -sticky news") + grid.e(sc1, "-row 1 -column 0 -sticky ew") + grid.e(sc2, "-row 0 -column 1 -sticky ns") + grid.e("rowconfigure", f1, "0 -weight 100") + grid.e("columnconfigure", f1, "0 -weight 100") + f2 = TclTkWidget.new(ip, t1, frame) + lower.e(f2, b1) + pack.e(b1, mb1, "-in", f2, "-side left") + pack.e(f2, f1) + end + + # canvas ¤Î¥µ¥ó¥×¥ë. + def test_canvas(ip, parent) + canvas, lower, pack = ip.commands().values_at("canvas", "lower", "pack") + t1, b1, cb = inittoplevel(ip, parent, "canvas") + + ## canvas + + ca1 = TclTkWidget.new(ip, t1, canvas, "-width 400 -height 300") + lower.e(ca1, b1) + # rectangle ¤òºî¤ë. + idr = ca1.e("create rectangle 10 10 20 20") + # oval ¤òºî¤ë. + ca1.e("create oval 60 10 100 50") + # polygon ¤òºî¤ë. + ca1.e("create polygon 110 10 110 30 140 10") + # line ¤òºî¤ë. + ca1.e("create line 150 10 150 30 190 10") + # arc ¤òºî¤ë. + ca1.e("create arc 200 10 250 50 -start 0 -extent 90 -style pieslice") + # i1 ¤ÏËÜÅö¤Ï, ¤É¤³¤«¤ÇÇ˲õ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤¬, ÌÌÅݤʤΤÇÊü¤Ã¤Æ¤¢¤ë. + i1 = TclTkImage.new(ip, "photo", "-file maru.gif") + # image ¤òºî¤ë. + ca1.e("create image 100 100 -image", i1) + # bitmap ¤òºî¤ë. + ca1.e("create bitmap 260 50 -bitmap questhead") + # text ¤òºî¤ë. + ca1.e("create text 320 50 -text {drag rectangle}") + # window ¤òºî¤ë(¥¯¥í¡¼¥º¥Ü¥¿¥ó). + ca1.e("create window 200 200 -window", b1) + + # bind ¤Ë¤è¤ê rectangle ¤ò drag ¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë. + cb.push(c = TclTkCallback.new(ip, proc{|i| + # i ¤Ë x ¤È y ¤ò¼õ¤±¼è¤ë¤Î¤Ç, ¼è¤ê½Ð¤¹. + x, y = i.split(/ /); x = x.to_f; y = y.to_f + # ºÂɸ¤òÊѹ¹¤¹¤ë. + ca1.e("coords current #{x - 5} #{y - 5} #{x + 5} #{y + 5}")}, + # x, y ºÂɸ¤ò¶õÇò¤Ç¶èÀڤ俤â¤Î¤ò¥¤¥Æ¥ì¡¼¥¿ÊÑ¿ô¤ØÅϤ¹¤è¤¦¤Ë»ØÄê. + "%x %y")) + # rectangle ¤Ë bind ¤¹¤ë. + ca1.e("bind", idr, "", c) + + pack.e(ca1) + end +end + +# test driver + +if ARGV.size == 0 + print "#{$0} n ¤Ç, n ¸Ä¤Î¥¤¥ó¥¿¥×¥ê¥¿¤òµ¯Æ°¤·¤Þ¤¹.\n" + n = 1 +else + n = ARGV[0].to_i +end + +print "start\n" +ip = [] + +# ¥¤¥ó¥¿¥×¥ê¥¿, ¥¦¥£¥¸¥§¥Ã¥ÈÅù¤ÎÀ¸À®. +for i in 1 .. n + ip.push(Test1.new()) +end + +# ÍÑ°Õ¤¬¤Ç¤­¤¿¤é¥¤¥Ù¥ó¥È¥ë¡¼¥×¤ËÆþ¤ë. +TclTk.mainloop() +print "exit from mainloop\n" + +# ¥¤¥ó¥¿¥×¥ê¥¿¤¬ GC ¤µ¤ì¤ë¤«¤Î¥Æ¥¹¥È. +ip = [] +print "GC.start\n" if $DEBUG +GC.start() if $DEBUG +print "end\n" + +exit + +# end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample2.rb new file mode 100644 index 0000000..110e81e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tcltklib/sample2.rb @@ -0,0 +1,451 @@ +#!/usr/local/bin/ruby +#----------------------> pretty simple othello game <----------------------- +# othello.rb +# +# version 0.3 +# maeda shugo (shuto@po.aianet.ne.jp) +#--------------------------------------------------------------------------- + +# Sep. 17, 1997 modified by Y. Shigehiro for tcltk library +# maeda shugo (shugo@po.aianet.ne.jp) »á¤Ë¤è¤ë +# (ruby/tk ¤Ç½ñ¤«¤ì¤Æ¤¤¤¿) ruby ¤Î¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à +# http://www.aianet.or.jp/~shugo/ruby/othello.rb.gz +# ¤ò tcltk ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¤è¤¦¤Ë, µ¡³£Åª¤ËÊѹ¹¤·¤Æ¤ß¤Þ¤·¤¿. +# +# ¤Ê¤ë¤Ù¤¯¥ª¥ê¥¸¥Ê¥ë¤ÈƱ¤¸¤Ë¤Ê¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹. + +require "observer" +require "tcltk" +$ip = TclTkInterpreter.new() +$root = $ip.rootwidget() +$button, $canvas, $checkbutton, $frame, $label, $pack, $update, $wm = + $ip.commands().values_at( + "button", "canvas", "checkbutton", "frame", "label", "pack", "update", "wm") + +class Othello + + EMPTY = 0 + BLACK = 1 + WHITE = - BLACK + + attr :in_com_turn + attr :game_over + + class Board + + include Observable + + DIRECTIONS = [ + [-1, -1], [-1, 0], [-1, 1], + [ 0, -1], [ 0, 1], + [ 1, -1], [ 1, 0], [ 1, 1] + ] + + attr_accessor :com_disk + + def initialize(othello) + @othello = othello + reset + end + + def notify_observers(*arg) + if @observer_peers != nil + super(*arg) + end + end + + def reset + @data = [ + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, WHITE, BLACK, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, BLACK, WHITE, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY], + [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY] + ] + changed + notify_observers + end + + def man_disk + return - @com_disk + end + + def other_disk(disk) + return - disk + end + + def get_disk(row, col) + return @data[row][col] + end + + def reverse_to(row, col, my_disk, dir_y, dir_x) + y = row + x = col + begin + y += dir_y + x += dir_x + if y < 0 || x < 0 || y > 7 || x > 7 || + @data[y][x] == EMPTY + return + end + end until @data[y][x] == my_disk + begin + @data[y][x] = my_disk + changed + notify_observers(y, x) + y -= dir_y + x -= dir_x + end until y == row && x == col + end + + def put_disk(row, col, disk) + @data[row][col] = disk + changed + notify_observers(row, col) + DIRECTIONS.each do |dir| + reverse_to(row, col, disk, *dir) + end + end + + def count_disk(disk) + num = 0 + @data.each do |rows| + rows.each do |d| + if d == disk + num += 1 + end + end + end + return num + end + + def count_point_to(row, col, my_disk, dir_y, dir_x) + return 0 if @data[row][col] != EMPTY + count = 0 + loop do + row += dir_y + col += dir_x + break if row < 0 || col < 0 || row > 7 || col > 7 + case @data[row][col] + when my_disk + return count + when other_disk(my_disk) + count += 1 + when EMPTY + break + end + end + return 0 + end + + def count_point(row, col, my_disk) + count = 0 + DIRECTIONS.each do |dir| + count += count_point_to(row, col, my_disk, *dir) + end + return count + end + + def corner?(row, col) + return (row == 0 && col == 0) || + (row == 0 && col == 7) || + (row == 7 && col == 0) || + (row == 7 && col == 7) + end + + def search(my_disk) + max = 0 + max_row = nil + max_col = nil + for row in 0 .. 7 + for col in 0 .. 7 + buf = count_point(row, col, my_disk) + if (corner?(row, col) && buf > 0) || max < buf + max = buf + max_row = row + max_col = col + end + end + end + return max_row, max_col + end + end #--------------------------> class Board ends here + + class BoardView < TclTkWidget + + BACK_GROUND_COLOR = "DarkGreen" + HILIT_BG_COLOR = "green" + BORDER_COLOR = "black" + BLACK_COLOR = "black" + WHITE_COLOR = "white" + STOP_COLOR = "red" + + attr :left + attr :top + attr :right + attr :bottom + + class Square + + attr :oval, TRUE + attr :row + attr :col + + def initialize(view, row, col) + @view = view + @id = @view.e("create rectangle", + *(view.tk_rect(view.left + col, + view.top + row, + view.left + col + 1, + view.top + row + 1) \ + << "-fill #{BACK_GROUND_COLOR}") ) + @row = row + @col = col + @view.e("itemconfigure", @id, + "-width 0.5m -outline #{BORDER_COLOR}") + @view.e("bind", @id, "", TclTkCallback.new($ip, proc{ + if @oval == nil + view.e("itemconfigure", @id, "-fill #{HILIT_BG_COLOR}") + end + })) + @view.e("bind", @id, "", TclTkCallback.new($ip, proc{ + view.e("itemconfigure", @id, "-fill #{BACK_GROUND_COLOR}") + })) + @view.e("bind", @id, "", TclTkCallback.new($ip, + proc{ + view.click_square(self) + })) + end + + def blink(color) + @view.e("itemconfigure", @id, "-fill #{color}") + $update.e() + sleep(0.1) + @view.e("itemconfigure", @id, "-fill #{BACK_GROUND_COLOR}") + end + end #-----------------------> class Square ends here + + def initialize(othello, board) + super($ip, $root, $canvas) + @othello = othello + @board = board + @board.add_observer(self) + + @squares = Array.new(8) + for i in 0 .. 7 + @squares[i] = Array.new(8) + end + @left = 1 + @top = 0.5 + @right = @left + 8 + @bottom = @top + 8 + + i = self.e("create rectangle", *tk_rect(@left, @top, @right, @bottom)) + self.e("itemconfigure", i, + "-width 1m -outline #{BORDER_COLOR} -fill #{BACK_GROUND_COLOR}") + + for row in 0 .. 7 + for col in 0 .. 7 + @squares[row][col] = Square.new(self, row, col) + end + end + + update + end + + def tk_rect(left, top, right, bottom) + return left.to_s + "c", top.to_s + "c", + right.to_s + "c", bottom.to_s + "c" + end + + def clear + each_square do |square| + if square.oval != nil + self.e("delete", square.oval) + square.oval = nil + end + end + end + + def draw_disk(row, col, disk) + if disk == EMPTY + if @squares[row][col].oval != nil + self.e("delete", @squares[row][col].oval) + @squares[row][col].oval = nil + end + return + end + + $update.e() + sleep(0.05) + oval = @squares[row][col].oval + if oval == nil + oval = self.e("create oval", *tk_rect(@left + col + 0.2, + @top + row + 0.2, + @left + col + 0.8, + @top + row + 0.8)) + @squares[row][col].oval = oval + end + case disk + when BLACK + color = BLACK_COLOR + when WHITE + color = WHITE_COLOR + else + fail format("Unknown disk type: %d", disk) + end + self.e("itemconfigure", oval, "-outline #{color} -fill #{color}") + end + + def update(row = nil, col = nil) + if row && col + draw_disk(row, col, @board.get_disk(row, col)) + else + each_square do |square| + draw_disk(square.row, square.col, + @board.get_disk(square.row, square.col)) + end + end + @othello.show_point + end + + def each_square + @squares.each do |rows| + rows.each do |square| + yield(square) + end + end + end + + def click_square(square) + if @othello.in_com_turn || @othello.game_over || + @board.count_point(square.row, + square.col, + @board.man_disk) == 0 + square.blink(STOP_COLOR) + return + end + @board.put_disk(square.row, square.col, @board.man_disk) + @othello.com_turn + end + + private :draw_disk + public :update + end #----------------------> class BoardView ends here + + def initialize + @msg_label = TclTkWidget.new($ip, $root, $label) + $pack.e(@msg_label) + + @board = Board.new(self) + @board_view = BoardView.new(self, @board) + #### added by Y. Shigehiro + ## board_view ¤ÎÂ礭¤µ¤òÀßÄꤹ¤ë. + x1, y1, x2, y2 = @board_view.e("bbox all").split(/ /).collect{|i| i.to_f} + @board_view.e("configure -width", x2 - x1) + @board_view.e("configure -height", y2 - y1) + ## scrollregion ¤òÀßÄꤹ¤ë. + @board_view.e("configure -scrollregion {", @board_view.e("bbox all"), + "}") + #### ¤³¤³¤Þ¤Ç + $pack.e(@board_view, "-fill both -expand true") + + panel = TclTkWidget.new($ip, $root, $frame) + + @play_black = TclTkWidget.new($ip, panel, $checkbutton, + "-text {com is black} -command", TclTkCallback.new($ip, proc{ + switch_side + })) + $pack.e(@play_black, "-side left") + + quit = TclTkWidget.new($ip, panel, $button, "-text Quit -command", + TclTkCallback.new($ip, proc{ + exit + })) + $pack.e(quit, "-side right -fill x") + + reset = TclTkWidget.new($ip, panel, $button, "-text Reset -command", + TclTkCallback.new($ip, proc{ + reset_game + })) + $pack.e(reset, "-side right -fill x") + + $pack.e(panel, "-side bottom -fill x") + +# root = Tk.root + $wm.e("title", $root, "Othello") + $wm.e("iconname", $root, "Othello") + + @board.com_disk = WHITE + @game_over = FALSE + + TclTk.mainloop + end + + def switch_side + if @in_com_turn + @play_black.e("toggle") + else + @board.com_disk = @board.man_disk + com_turn unless @game_over + end + end + + def reset_game + if @board.com_disk == BLACK + @board.com_disk = WHITE + @play_black.e("toggle") + end + @board_view.clear + @board.reset + $wm.e("title", $root, "Othello") + @game_over = FALSE + end + + def com_turn + @in_com_turn = TRUE + $update.e() + sleep(0.5) + begin + com_disk = @board.count_disk(@board.com_disk) + man_disk = @board.count_disk(@board.man_disk) + if @board.count_disk(EMPTY) == 0 + if man_disk == com_disk + $wm.e("title", $root, "{Othello - Draw!}") + elsif man_disk > com_disk + $wm.e("title", $root, "{Othello - You Win!}") + else + $wm.e("title", $root, "{Othello - You Loose!}") + end + @game_over = TRUE + break + elsif com_disk == 0 + $wm.e("title", $root, "{Othello - You Win!}") + @game_over = TRUE + break + elsif man_disk == 0 + $wm.e("title", $root, "{Othello - You Loose!}") + @game_over = TRUE + break + end + row, col = @board.search(@board.com_disk) + break if row == nil || col == nil + @board.put_disk(row, col, @board.com_disk) + end while @board.search(@board.man_disk) == [nil, nil] + @in_com_turn = FALSE + end + + def show_point + black = @board.count_disk(BLACK) + white = @board.count_disk(WHITE) + @msg_label.e("configure -text", + %Q/{#{format("BLACK: %.2d WHITE: %.2d", black, white)}}/) + end +end #----------------------> class Othello ends here + +Othello.new + +#----------------------------------------------> othello.rb ends here diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkalignbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkalignbox.rb new file mode 100644 index 0000000..32915a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkalignbox.rb @@ -0,0 +1,225 @@ +# +# tkalignbox.rb : align widgets with same width/height +# +# by Hidetoshi NAGAI +# +# The box size depends on 'reqheight' and 'reqwidth' of contained widgets. +# If you want to give the box size when those requested sizes are 0, +# please set box.propagate = false (See the test routine at the tail of +# this file). + +require 'tk' + +class TkAlignBox < TkFrame + def initialize(*args) + if self.class == TkAlignBox + fail RuntimeError, "TkAlignBox is an abstract class" + end + @padx = 0 + @pady = 0 + if args[-1].kind_of? Hash + keys = _symbolkey2str(args.pop) + @padx = keys.delete('padx') || 0 + @pady = keys.delete('pady') || 0 + args.push(keys) + end + super(*args) + @max_width = 0 + @max_height = 0 + @propagate = true + @widgets = [] + end + + def _set_framesize + fail RuntimeError, "TkAlignBox is an abstract class" + end + private :_set_framesize + + def _place_config(widget, idx, cnt) + fail RuntimeError, "TkAlignBox is an abstract class" + end + private :_place_config + + def align + widgets = [] + @widgets.each{|w| widgets << w if w.winfo_exist?} + @widgets = widgets + cnt = @widgets.size.to_f + @widgets.each_with_index{|w, idx| _place_config(w, idx, cnt)} + @widgets = widgets + _set_framesize if @propagate + self + end + + def add(*widgets) + widgets.each{|w| + unless w.kind_of? TkWindow + fail RuntimeError, "#{w.inspect} is not a widget instance." + end + @widgets.delete(w) + @widgets << w + sz = w.winfo_reqwidth + @max_width = sz if @max_width < sz + sz = w.winfo_reqheight + @max_height = sz if @max_height < sz + } + align + end + + def <<(widget) + add(widget) + end + + def insert(idx, widget) + unless widget.kind_of? TkWindow + fail RuntimeError, "#{widget.inspect} is not a widget instance." + end + @widgets.delete(widget) + @widgets[idx,0] = widget + sz = widget.winfo_reqwidth + @max_width = sz if @max_width < sz + sz = widget.winfo_reqheight + @max_height = sz if @max_height < sz + align + end + + def delete(idx) + ret = @widgets.delete_at(idx) + @req_size = 0 + @widget.each{|w| + sz = w.winfo_reqwidth + @max_width = sz if @max_width < sz + sz = w.winfo_reqheight + @max_height = sz if @max_height < sz + } + align + ret + end + + def padx(size = nil) + if size + @padx = size + align + else + @padx + end + end + + def pady(size = nil) + if size + @pady = size + align + else + @pady + end + end + + attr_accessor :propagate +end + +class TkHBox < TkAlignBox + def _set_framesize + bd = self.borderwidth + self.width((@max_width + 2*@padx) * @widgets.size + 2*bd) + self.height(@max_height + 2*@pady + 2*bd) + end + private :_set_framesize + + def _place_config(widget, idx, cnt) + widget.place_in(self, + 'relx'=>idx/cnt, 'x'=>@padx, + 'rely'=>0, 'y'=>@pady, + 'relwidth'=>1.0/cnt, 'width'=>-2*@padx, + 'relheight'=>1.0, 'height'=>-2*@pady) + end + private :_place_config +end +TkHLBox = TkHBox + +class TkHRBox < TkHBox + def _place_config(widget, idx, cnt) + widget.place_in(self, + 'relx'=>(cnt - idx - 1)/cnt, 'x'=>@padx, + 'rely'=>0, 'y'=>@pady, + 'relwidth'=>1.0/cnt, 'width'=>-2*@padx, + 'relheight'=>1.0, 'height'=>-2*@pady) + end + private :_place_config +end + +class TkVBox < TkAlignBox + def _set_framesize + bd = self.borderwidth + self.width(@max_width + 2*@padx + 2*bd) + self.height((@max_height + 2*@pady) * @widgets.size + 2*bd) + end + private :_set_framesize + + def _place_config(widget, idx, cnt) + widget.place_in(self, + 'relx'=>0, 'x'=>@padx, + 'rely'=>idx/cnt, 'y'=>@pady, + 'relwidth'=>1.0, 'width'=>-2*@padx, + 'relheight'=>1.0/cnt, 'height'=>-2*@pady) + end + private :_place_config +end +TkVTBox = TkVBox + +class TkVBBox < TkVBox + def _place_config(widget, idx, cnt) + widget.place_in(self, + 'relx'=>0, 'x'=>@padx, + 'rely'=>(cnt - idx - 1)/cnt, 'y'=>@pady, + 'relwidth'=>1.0, 'width'=>-2*@padx, + 'relheight'=>1.0/cnt, 'height'=>-2*@pady) + end + private :_place_config +end + +################################################ +# test +################################################ +if __FILE__ == $0 + f = TkHBox.new(:borderwidth=>3, :relief=>'ridge').pack + f.add(TkButton.new(f, :text=>'a'), + TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'), + TkButton.new(f, :text=>'aaa'), + TkButton.new(f, :text=>'aaaa')) + + f = TkHBox.new(:borderwidth=>3, :relief=>'ridge', + :padx=>7, :pady=>3, :background=>'yellow').pack + f.add(TkButton.new(f, :text=>'a'), + TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'), + TkButton.new(f, :text=>'aaa'), + TkButton.new(f, :text=>'aaaa')) + + f = TkVBox.new(:borderwidth=>5, :relief=>'groove').pack + f.add(TkButton.new(f, :text=>'a'), + TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'), + TkButton.new(f, :text=>'aaa'), + TkButton.new(f, :text=>'aaaa')) + + f = TkHRBox.new(:borderwidth=>3, :relief=>'raised').pack(:fill=>:x) + f.add(TkButton.new(f, :text=>'a'), + TkButton.new(f, :text=>'aa'), + TkButton.new(f, :text=>'aaa')) + + f = TkVBBox.new(:borderwidth=>3, :relief=>'ridge').pack(:fill=>:x) + f.propagate = false + f.height 100 + f.add(TkFrame.new(f){|ff| + TkButton.new(ff, :text=>'a').pack(:pady=>4, :padx=>6, + :fill=>:both, :expand=>true) + }, + TkFrame.new(f){|ff| + TkButton.new(ff, :text=>'aa').pack(:pady=>4, :padx=>6, + :fill=>:both, :expand=>true) + }, + TkFrame.new(f){|ff| + TkButton.new(ff, :text=>'aaaa').pack(:pady=>4, :padx=>6, + :fill=>:both, :expand=>true) + }) + + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkballoonhelp.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkballoonhelp.rb new file mode 100644 index 0000000..c2c95f7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkballoonhelp.rb @@ -0,0 +1,194 @@ +# +# tkballoonhelp.rb : simple balloon help widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +# Add a balloon help to a widget. +# This widget has only poor featureas. If you need more useful features, +# please try to use the Tix extension of Tcl/Tk under Ruby/Tk. +# +# The interval time to display a balloon help is defined 'interval' option +# (default is 1000ms). +# +require 'tk' + +class TkBalloonHelp'bisque').pack + @label.configure(_symbolkey2str(keys)) unless keys.empty? + @path = @label + end + + def epath + @epath + end + + def interval(val) + if val + @timer.interval(val) + else + @interval + end + end + + def command(cmd = Proc.new) + @command = cmd + self + end + + def show + x = TkWinfo.pointerx(@parent) + y = TkWinfo.pointery(@parent) + @frame.geometry("+#{x+1}+#{y+1}") + + if @command + case @command.arity + when 0 + @command.call + when 2 + @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent)) + when 3 + @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent), + self) + else + @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent), + self, @parent) + end + end + + @frame.deiconify + @frame.raise + + @org_cursor = @parent['cursor'] + @parent.cursor('crosshair') + end + + def erase + @parent.cursor(@org_cursor) + @frame.withdraw + end + + def destroy + @frame.destroy + end +end + +################################################ +# test +################################################ +if __FILE__ == $0 + TkButton.new('text'=>'This button has a balloon help') {|b| + pack('fill'=>'x') + TkBalloonHelp.new(b, 'text'=>' Message ') + } + TkButton.new('text'=>'This button has another balloon help') {|b| + pack('fill'=>'x') + TkBalloonHelp.new(b, 'text'=>'configured message', + 'interval'=>200, 'font'=>'courier', + 'background'=>'gray', 'foreground'=>'red') + } + + sb = TkScrollbox.new.pack(:fill=>:x) + sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm)) +=begin + # CASE1 : command takes no arguemnt + bh = TkBalloonHelp.new(sb, :interval=>500, + :relief=>:ridge, :background=>'white', + :command=>proc{ + y = TkWinfo.pointery(sb) - TkWinfo.rooty(sb) + bh.text "current index == #{sb.nearest(y)}" + }) +=end +=begin + # CASE2 : command takes 2 arguemnts + bh = TkBalloonHelp.new(sb, :interval=>500, + :relief=>:ridge, :background=>'white', + :command=>proc{|x, y| + bh.text "current index == #{sb.nearest(y)}" + }) +=end +=begin + # CASE3 : command takes 3 arguemnts + TkBalloonHelp.new(sb, :interval=>500, + :relief=>:ridge, :background=>'white', + :command=>proc{|x, y, bhelp| + bhelp.text "current index == #{sb.nearest(y)}" + }) +=end +=begin + # CASE4a : command is a Proc object and takes 4 arguemnts + cmd = proc{|x, y, bhelp, parent| + bhelp.text "current index == #{parent.nearest(y)}" + } + + TkBalloonHelp.new(sb, :interval=>500, + :relief=>:ridge, :background=>'white', + :command=>cmd) + + sb2 = TkScrollbox.new.pack(:fill=>:x) + sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM)) + TkBalloonHelp.new(sb2, :interval=>500, + :padx=>5, :relief=>:raised, + :background=>'gray25', :foreground=>'white', + :command=>cmd) +=end +#=begin + # CASE4b : command is a Method object and takes 4 arguemnts + def set_msg(x, y, bhelp, parent) + bhelp.text "current index == #{parent.nearest(y)}" + end + cmd = self.method(:set_msg) + + TkBalloonHelp.new(sb, :interval=>500, + :relief=>:ridge, :background=>'white', + :command=>cmd) + + sb2 = TkScrollbox.new.pack(:fill=>:x) + sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM)) + TkBalloonHelp.new(sb2, :interval=>500, + :padx=>5, :relief=>:raised, + :background=>'gray25', :foreground=>'white', + :command=>cmd) +#=end + + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbiff.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbiff.rb new file mode 100644 index 0000000..c669962 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbiff.rb @@ -0,0 +1,155 @@ +#!/usr/bin/env ruby + +if ARGV[0] != '-d' + unless $DEBUG + exit if fork + end +else + ARGV.shift +end + +if ARGV.length == 0 + if ENV['MAIL'] + $spool = ENV['MAIL'] + else + $spool = '/var/spool/mail/' + ENV['USER'] + end +else + $spool = ARGV[0] +end + +require "parsedate" +require "base64" + +include ParseDate + +class Mail + def Mail.new(f) + if !f.kind_of?(IO) + f = open(f, "r") + me = super + f.close + else + me = super + end + return me + end + + def initialize(f) + @header = {} + @body = [] + while line = f.gets() + line.chop! + next if /^From / =~ line # skip From-line + break if /^$/ =~ line # end of header + if /^(\S+):\s*(.*)/ =~ line + @header[attr = $1.capitalize] = $2 + elsif attr + sub(/^\s*/, '') + @header[attr] += "\n" + $_ + end + end + + return unless $_ + + while line = f.gets() + break if /^From / =~ line + @body.push($_) + end + end + + def header + return @header + end + + def body + return @body + end + +end + +require "tkscrollbox" + +my_appname = Tk.appname('tkbiff') +$top = TkRoot.new +if ((TkWinfo.interps($top) - [my_appname]).find{|ip| ip =~ /^tkbiff/}) + STDERR.print("Probably other 'tkbiff's are running. Bye.\n") + exit +end + +$top.withdraw +$list = TkScrollbox.new($top) { + relief 'raised' + width 80 + height 8 + setgrid 'yes' + pack +} +TkButton.new($top) { + text 'Dismiss' + command proc {$top.withdraw} + pack('fill'=>'both','expand'=>'yes') +} +$top.bind "Control-c", proc{exit} +$top.bind "Control-q", proc{exit} +$top.bind "space", proc{exit} + +$spool_size = 0 +$check_time = Time.now + +def check + $check_time = Time.now + size = File.size($spool) + if size and size != $spool_size + $spool_size = size + pop_up if size > 0 + end + Tk.after 5000, proc{check} +end + +if defined? Thread + Thread.start do + loop do + sleep 600 + if Time.now - $check_time > 200 + Tk.after 5000, proc{check} + end + end + end +end + +def pop_up + outcount = 0; + $list.delete 0, 'end' + f = open($spool, "r") + while !f.eof? + mail = Mail.new(f) + date, from, subj = mail.header['Date'], mail.header['From'], mail.header['Subject'] + next if !date + y = m = d = 0 + y, m, d = parsedate(date) if date + from = "sombody@somewhere" if ! from + subj = "(nil)" if ! subj + from = decode_b(from) + subj = decode_b(subj) + $list.insert 'end', format('%-02d/%02d/%02d [%-28.28s] %s',y,m,d,from,subj) + outcount += 1 + end + f.close + if outcount == 0 + $list.insert 'end', "You have no mail." + else + $list.see 'end' + end + $top.deiconify + Tk.after 2000, proc{$top.iconify} +end + +$list.insert 'end', "You have no mail." +check +Tk.after 2000, proc{$top.iconify} +begin + Tk.mainloop +rescue + `echo #$! > /tmp/tkbiff` +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbrowse.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbrowse.rb new file mode 100644 index 0000000..4893f57 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkbrowse.rb @@ -0,0 +1,79 @@ +#!/usr/bin/env ruby +# +# This script generates a directory browser, which lists the working +# directory and allows you to open files or subdirectories by +# double-clicking. + +# Create a scrollbar on the right side of the main window and a listbox +# on the left side. + +require "tkscrollbox" + +# The procedure below is invoked to open a browser on a given file; if the +# file is a directory then another instance of this program is invoked; if +# the file is a regular file then the Mx editor is invoked to display +# the file. + +$dirlist = {} + +def browsedir (dir) + if $dirlist.key? dir + $dirlist[dir] + else + top = if $dirlist.size > 0 then TkToplevel.new else nil end + list = TkScrollbox.new(top) { + relief 'raised' + width 20 + height 20 + setgrid 'yes' + pack + } + list.insert 'end', *`ls #{dir}`.split + + # Set up bindings for the browser. + + list.focus + list.bind "Control-q", proc{exit} + list.bind "Control-c", proc{exit} + list.bind "Control-p", proc{ + print "selection <", TkSelection.get, ">\n" + } + + list.bind "Double-Button-1", proc{ + for i in TkSelection.get.split + print "clicked ", i, "\n" + browse dir, i + end + } + $dirlist[dir] = list + end +end + +def browse (dir, file) + file="#{dir}/#{file}" + if File.directory? file + browsedir(file) + else + if File.file? file + if ENV['EDITOR'] + system format("%s %s&", ENV['EDITOR'], file) + else + system "xedit #{file}&" + end + else + STDERR.print "\"#{file}\" isn't a directory or regular file" + end + end +end + +# Fill the listbox with a list of all the files in the directory (run +# the "ls" command to get that information). + +if ARGV.length>0 + dir = ARGV[0] +else + dir="." +end + +browsedir(dir) +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkcombobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkcombobox.rb new file mode 100644 index 0000000..1840270 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkcombobox.rb @@ -0,0 +1,426 @@ +# +# tkcombobox.rb : TkAutoScrollbox & TkCombobox +# +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' + +class TkAutoScrollbox < TkListbox + include TkComposite + + @@up_bmp = TkBitmapImage.new(:data=><<0) + @path = @lbox.path + TkPack.propagate(@lbox, false) + + @scr = TkScrollbar.new(@frame, :width=>10) + + @lbox.yscrollcommand(proc{|*args| @scr.set(*args); _config_proc}) + @scr.command(proc{|*args| @lbox.yview(*args); _config_proc}) + + @up_arrow = TkLabel.new(@lbox, :image=>@@up_bmp, + :relief=>:raised, :borderwidth=>1) + @down_arrow = TkLabel.new(@lbox, :image=>@@down_bmp, + :relief=>:raised, :borderwidth=>1) + + _init_binding + + @lbox.pack(:side=>:left, :fill=>:both, :expand=>:true) + + delegate('DEFAULT', @lbox) + delegate('background', @frame, @scr) + delegate('activebackground', @scr) + delegate('troughcolor', @scr) + delegate('repeatdelay', @scr) + delegate('repeatinterval', @scr) + delegate('relief', @frame) + delegate('borderwidth', @frame) + + delegate_alias('arrowrelief', 'relief', @up_arrow, @down_arrow) + delegate_alias('arrowborderwidth', 'borderwidth', @up_arrow, @down_arrow) + + scrollbar(keys.delete('scrollbar')){false} + + configure keys unless keys.empty? + end + + def _show_up_arrow + unless @up_arrow.winfo_mapped? + @up_arrow.pack(:side=>:top, :fill=>:x) + end + end + + def _show_down_arrow + unless @down_arrow.winfo_mapped? + @down_arrow.pack(:side=>:bottom, :fill=>:x) + end + end + + def _set_sel(idx) + @lbox.activate(idx) + @lbox.selection_clear(0, 'end') + @lbox.selection_set(idx) + end + + def _check_sel(cidx, tidx = nil, bidx = nil) + _set_sel(cidx) + unless tidx + tidx = @lbox.nearest(0) + tidx += 1 if tidx > 0 + end + unless bidx + bidx = @lbox.nearest(10000) + bidx -= 1 if bidx < @lbox.index('end') - 1 + end + if cidx > bidx + _set_sel(bidx) + end + if cidx < tidx + _set_sel(tidx) + end + end + + def _up_proc + cidx = @lbox.curselection[0] + idx = @lbox.nearest(0) + if idx >= 0 + @lbox.see(idx - 1) + _set_sel(idx) + @up_arrow.pack_forget if idx == 1 + @up_timer.stop if idx == 0 + _show_down_arrow if @lbox.bbox('end') == [] + end + if cidx && cidx > 0 && (idx == 0 || cidx == @lbox.nearest(10000)) + _set_sel(cidx - 1) + end + end + + def _down_proc + cidx = @lbox.curselection[0] + eidx = @lbox.index('end') - 1 + idx = @lbox.nearest(10000) + if idx <= eidx + @lbox.see(idx + 1) + _set_sel(cidx + 1) if cidx < eidx + @down_arrow.pack_forget if idx + 1 == eidx + @down_timer.stop if idx == eidx + _show_up_arrow if @lbox.bbox(0) == [] + end + if cidx && cidx < eidx && (eidx == idx || cidx == @lbox.nearest(0)) + _set_sel(cidx + 1) + end + end + + def _key_UP_proc + cidx = @lbox.curselection[0] + _set_sel(cidx = @lbox.index('activate')) unless cidx + cidx -= 1 + if cidx == 0 + @up_arrow.pack_forget + elsif cidx == @lbox.nearest(0) + @lbox.see(cidx - 1) + end + end + + def _key_DOWN_proc + cidx = @lbox.curselection[0] + _set_sel(cidx = @lbox.index('activate')) unless cidx + cidx += 1 + if cidx == @lbox.index('end') - 1 + @down_arrow.pack_forget + elsif cidx == @lbox.nearest(10000) + @lbox.see(cidx + 1) + end + end + + def _config_proc + if @lbox.size == 0 + @up_arrow.pack_forget + @down_arrow.pack_forget + return + end + tidx = @lbox.nearest(0) + bidx = @lbox.nearest(10000) + if tidx > 0 + _show_up_arrow + tidx += 1 + else + @up_arrow.pack_forget unless @up_timer.running? + end + if bidx < @lbox.index('end') - 1 + _show_down_arrow + bidx -= 1 + else + @down_arrow.pack_forget unless @down_timer.running? + end + cidx = @lbox.curselection[0] + _check_sel(cidx, tidx, bidx) if cidx + end + + def _init_binding + @up_timer = TkAfter.new(@interval, -1, proc{_up_proc}) + @down_timer = TkAfter.new(@interval, -1, proc{_down_proc}) + + @up_timer.set_start_proc(@initwait, proc{}) + @down_timer.set_start_proc(@initwait, proc{}) + + @up_arrow.bind('Enter', proc{@up_timer.start}) + @up_arrow.bind('Leave', proc{@up_timer.stop if @up_arrow.winfo_mapped?}) + @down_arrow.bind('Enter', proc{@down_timer.start}) + @down_arrow.bind('Leave', proc{@down_timer.stop if @down_arrow.winfo_mapped?}) + + @lbox.bind('Configure', proc{_config_proc}) + @lbox.bind('Enter', proc{|y| _set_sel(@lbox.nearest(y))}, '%y') + @lbox.bind('Motion', proc{|y| + @up_timer.stop if @up_timer.running? + @down_timer.stop if @down_timer.running? + _check_sel(@lbox.nearest(y)) + }, '%y') + + @lbox.bind('Up', proc{_key_UP_proc}) + @lbox.bind('Down', proc{_key_DOWN_proc}) + end + + ############################ + public + ############################ + def scrollbar(mode) + if mode + @scr.pack(:side=>:right, :fill=>:y) + else + @scr.pack_forget + end + end +end + +################################################ + +class TkCombobox < TkEntry + include TkComposite + + @@down_btn_bmp = TkBitmapImage.new(:data=><< 0 + @lst.see(0) + @lst.activate(0) + @lst.selection_set(0) + end + @top.grab + + begin + @var.tkwait + if (idx = @var.to_i) >= 0 + @ent.value = @lst.get(idx) + end + @top.withdraw + @btn.relief(:raised) + @btn.image(@@down_btn_bmp) + rescue + ensure + begin + @top.grab(:release) + @ent.focus + rescue + end + end + end + private :_button_proc + + def _init_bindings + @btn.bind('1', proc{_button_proc(true)}) + @btn.bind('3', proc{_button_proc(false)}) + + @lst.bind('1', proc{|y| @var.value = @lst.nearest(y)}, '%y') + @lst.bind('Return', proc{@var.value = @lst.curselection[0]}) + + cancel = TkVirtualEvent.new('2', '3', 'Escape') + @lst.bind(cancel, proc{@var.value = -1}) + end + private :_init_bindings + + def initialize_composite(keys={}) + keys = _symbolkey2str(keys) + + @btn = TkLabel.new(@frame, :relief=>:raised, :borderwidth=>3, + :image=>@@down_btn_bmp).pack(:side=>:right, + :ipadx=>2, :fill=>:y) + @ent = TkEntry.new(@frame).pack(:side=>:left) + @path = @ent.path + + @top = TkToplevel.new(@btn, :borderwidth=>1, :relief=>:raised) { + withdraw + transient + overrideredirect(true) + } + + startwait = keys.delete('startwait'){300} + interval = keys.delete('interval'){150} + @lst = TkAutoScrollbox.new(@top, + :startwait=>startwait, + :interval=>interval).pack(:fill=>:both, + :expand=>true) + @ent_list = [] + + @var = TkVariable.new + + _init_bindings + + delegate('DEFAULT', @ent) + delegate('height', @lst) + delegate('relief', @frame) + delegate('borderwidth', @frame) + + delegate('arrowrelief', @lst) + delegate('arrowborderwidth', @lst) + + if mode = keys.delete('scrollbar') + scrollbar(mode) + end + + configure keys unless keys.empty? + end + private :initialize_composite + + def scrollbar(mode) + @lst.scrollbar(mode) + end + + def _reset_width + len = @ent.width + @lst.get(0, 'end').each{|l| len = l.length if l.length > len} + @lst.width(len + 1) + end + private :_reset_width + + def add(ent) + ent = ent.to_s + unless @ent_list.index(ent) + @ent_list << ent + @lst.insert('end', ent) + end + _reset_width + self + end + + def remove(ent) + ent = ent.to_s + @ent_list.delete(ent) + if idx = @lst.get(0, 'end').index(ent) + @lst.delete(idx) + end + _reset_width + self + end + + def values(ary = nil) + if ary + @lst.delete(0, 'end') + @ent_list.clear + ary.each{|ent| add(ent)} + _reset_width + self + else + @lst.get(0, 'end') + end + end + + def see(idx) + @lst.see(@lst.index(idx) - 1) + end + + def list_index(idx) + @lst.index(idx) + end +end + + +################################################ +# test +################################################ +if __FILE__ == $0 + v = TkVariable.new + e = TkCombobox.new(:height=>7, :scrollbar=>true, :textvariable=>v, + :arrowrelief=>:flat, :arrowborderwidth=>0, + :startwait=>400, :interval=>200).pack + e.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu)) + #e.see(e.list_index('end') - 2) + e.value = 'cc' + TkFrame.new{|f| + fnt = TkFont.new('Helvetica 10') + TkLabel.new(f, :font=>fnt, :text=>'TkCombobox value :').pack(:side=>:left) + TkLabel.new(f, :font=>fnt, :textvariable=>v).pack(:side=>:left) + }.pack + + TkFrame.new(:relief=>:raised, :borderwidth=>2, + :height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3) + + l = TkAutoScrollbox.new(nil, :relief=>:groove, :borderwidth=>4, + :width=>20).pack(:fill=>:both, :expand=>true) + (0..20).each{|i| l.insert('end', "line #{i}")} + + TkFrame.new(:relief=>:ridge, :borderwidth=>3){ + TkButton.new(self, :text=>'ON', + :command=>proc{l.scrollbar(true)}).pack(:side=>:left) + TkButton.new(self, :text=>'OFF', + :command=>proc{l.scrollbar(false)}).pack(:side=>:right) + pack(:fill=>:x) + } + Tk.mainloop +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkdialog.rb new file mode 100644 index 0000000..00cc12a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkdialog.rb @@ -0,0 +1,61 @@ +#!/usr/bin/env ruby +require "tk" + +root = TkFrame.new +top = TkFrame.new(root) { + relief 'raised' + border 1 +} +msg = TkMessage.new(top) { + text "File main.c hasn't been saved to disk since \ +it was last modified. What should I do?" + justify 'center' + aspect 200 + font '-Adobe-helvetica-medium-r-normal--*-240*' + pack('padx'=>5, 'pady'=>5, 'expand'=>'yes') +} +top.pack('fill'=>'both') +root.pack + +bot = TkFrame.new(root) { + relief 'raised' + border 1 +} + +TkFrame.new(bot) { |left| + relief 'sunken' + border 1 + pack('side'=>'left', 'expand'=>'yes', 'padx'=>10, 'pady'=> 10) + TkButton.new(left) { + text "Save File" + command "quit 'save'" + pack('expand'=>'yes','padx'=>6,'pady'=> 6) + top.bind "Enter", proc{state 'active'} + msg.bind "Enter", proc{state 'active'} + bot.bind "Enter", proc{state 'active'} + top.bind "Leave", proc{state 'normal'} + msg.bind "Leave", proc{state 'normal'} + bot.bind "Leave", proc{state 'normal'} + Tk.root.bind "ButtonRelease-1", proc{quit 'save'} + Tk.root.bind "Return", proc{quit 'save'} + } +} +TkButton.new(bot) { + text "Quit Anyway" + command "quit 'quit'" + pack('side'=>'left', 'expand'=>'yes', 'padx'=>10) +} +TkButton.new(bot) { + text "Return To Editor" + command "quit 'return'" + pack('side'=>'left', 'expand'=>'yes', 'padx'=>10) +} +bot.pack +root.pack('side'=>'top', 'fill'=>'both', 'expand'=>'yes') + +def quit(button) + print "You pressed the \"#{button}\" button; bye-bye!\n" + exit +end + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt new file mode 100644 index 0000000..71e3595 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt @@ -0,0 +1,61 @@ + + ######################################################################### + ### The following text is the original file of the Tcl/Tk extension. ### + ### Icon data files ( those are 'tkIcons', 'tkIcons-sample.kde', and ### + ### 'tkIcons.kde' ) are quoted from the source archive of ICONS ### + ### extension. As the following document describes, those icon images ### + ### are not applied the license. ### + ######################################################################### + + +IMPORTANT LICENSE INFORMATION +============================= + +The following terms (based on the standard TCL/TK license) apply to all files +contained in this package, except the icon images. + +The icon images can be freely distributed. If you require clarification of +copyright/license details for the images, please contact the appropriate +creator/maintainer. + +ICONS: LICENSE TERMS +==================== + +This software (ICONS) is Copyright 2002 by Adrian Davis (adrian@satisoft.com). +The following terms apply to all files associated with the software except +where noted above. + +The author hereby grants permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that +this notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file +where they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, +OR MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, +the software shall be classified as "Commercial Computer Software" +and the Government shall have only "Restricted Rights" as defined in +Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, +the authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons new file mode 100644 index 0000000..0d5b2c8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons @@ -0,0 +1,195 @@ +actattach16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actbookmark16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actbookmarknew16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigdFQGE0Ix4NBbSAgsWjk+jBIAlcUYrJASChnSXZSoUDelKfoKpFALJA61ueGI2IAZmhogGFmCGGAgXsifiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actcheck16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBMT+xATCBASCBARCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAM2CLrc/itAF8RkdVyVye4FpzUgJwijORCGUhDDOZbLG6Nd2xjwibIQ2y80sRGIl4IBuWk6Af4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actcross16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBMQCBEQCBIQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMuCLrc/hCGFyYLQjQsquLDQ2ScEEJjZkYfyQKlJa2j7AQnMM7NfucLze1FLD78CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actexit16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBDQyNHR2dCH5BAEAAAAALAAAAAAQABAAAAI4hI+pFrHb3nEg1iWiDiINCwYDko0V9XUTda6I1TIsUMpGinyzbB6ZeGuoEr+GUDL4CXqSphPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +acthelp16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQ6XAQCBCyCvARSjAQ+ZGSm1ARCbEyWzESOxIy63ARalAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EEgQqhUz00GEJx2WFUY3BZw5HYh4cu6mSkEy06B72LHkiYFST0NRLIaa4I0oQyZhTKInSq2eAlaaMAuYEv0RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actitemadd16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBARCZPz+/Mzq9BTC3ITC1HSyzGSivAw+XBSStIS6zHy2zAQCDFyatAQOHFSStEyOtAQSJBSq1DR2nCxunCRmlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICCOQTmeaCAMRIC+AVu47xkTBl2Ld16XQNYBQTQBVIOkMHFQJBeMI4tAbSSu2IRDSnhAvFfI97sFRM6RwOMacbjLKckVvgvIJ5EdSU7J648VgXQ7Dmd/hyJ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actitemdelete16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBARCZPz+/Mzq9BTC3AQCDAQOHFSStAQSJAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQwEMhJq704681n+GAISoEwnGg6EAUQrEQsz4ThEkeu77kNIAagMEj0dY7IpHI58UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actlock16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJEQ+FExGHCQiDBwaDGxiLHxyNHRuPIR+TIyGZJSSfFxaRFxWJGRiLJyaXNzWpNTOnMzGnLy2hJSKTGReLKyqjPTu1NzarMS+jLSyfKyibJySXIyGVCQeDLSytPT29Ozu7OTi5NTS1KyurJSSjGxqVFxaXLS2tKSebOzuzLSufJSOXExGLGRiTExONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwGCgGhkhkQDBoEpLKQoBACAyOUID1qTVwoQGvMPxNFgVjAxp6QCQUicSCwVgkG44HJCKRRCYUCAxIFRYXhxgZGhYbHINEHR4fGCAhIiMkFSVKJicoKSoFKwMsLZtDLison6GjLA92qCueoAUvpC2xQhWqrLYDErmEMDEXlDIwMxAHukI0NS01EzY2NAmPAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actredo16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxOHBxSHBRGHKzCtNzu3MTSzBQ2FLzSxIzCjCSKFCyeHDzCLAxGHAwuFDSCNBxKLES+NHSmfBQ6FBxWJAQaDAQWFAw+HDSyLJzOnISyjMTexAQOBAwmDAw+FMzizAQODDymNKzWrAQKDAwaDEy6TFTGTFSyXDyKTAQCBAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ2QIBwSCwaj0hAICBICgcDQsEgaB4PiIRiW0AEiE3sdsFgcK2CBsCheEAcjgYjoigwJRM2pUK0XDAKGRobDRwKHUcegAsfExUdIEcVCgshImojfEUkCiUmJygHACkqHEQpqKkpogAgK5FOQywtprFDKRwptrZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actreload16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCRaJBxWJBxOHBRGBCxeLLTatCSKFCymJBQ6BAwmBNzu3AQCBAQOBCRSJKzWrGy+ZDy+NBxSHFSmTBxWHLTWtCyaHCSSFCx6PETKNBQ+FBwaHCRKJMTixLy6vExOTKyqrFxaXDQyNDw+PBQSFHx6fCwuLJyenDQ2NISChLSytJSSlFxeXAwODCQmJBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIBQGBAMBALCcCksGA4IQkJBUDIDC6gVwGhshY5HlMn9DiCRL1MyYE8iiapaSKlALBdMRiPckDkdeXt9HgxkGhWDXB4fH4ZMGnxcICEiI45kQiQkDCUmJZskmUIiJyiPQgyoQwwpH35LqqgMKiEjq5obqh8rLCMtowAkLqovuH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actrun16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/ISChKSipMTCxLS2tLy+vMzOzMTGxNTS1AAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARlEMgJQqDYyiDGrR8oWJxnCcQXDMU4GEYqFN4UEHB+FEhtv7EBIYEohkjBkwJBqggEMB+ncHhaBsDUZmbAXq67EecQ02x2CMWzkAs504gCO3qcDZjkl11FMJVIN0cqHSpuGYYSfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actstop16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/Gw6NGQuLHQ6NGQmJFweHFQaFPTm5PTa3PTW1Oy+vOS6tNSinKReVDQWFPz+/Nx6fNyCfNyGhNR+dMxybMRiXLxGRIwWFNx2dNx+fNx2bMxuZLQWFBwWFPTu7Pzy9NRqZNRuZMRSVLwmJGwWFNR2dMQiHPTKxMxmXMQyLMxmZNx6dMxiXMRSRMRaVKxybMxaVEQWFMQuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaaQIAQEBAMCAWDYcgkHhAJxYLRcDQBggckIplQKpaLdRh4YDIaSWa94Vw6woAHgv6AMKGPaMQhwQMJJRkfhHmEJhdvRCcgGSCEkCgpbnAECiorGYYfLCItlAAFCygQj5AfbYlwBQwVE5AukG6KBi8tMC0fLi0pHxyzcAAxFxwmMny/wEwOxMm/qlcdJCSJ1H5XQh3a28HY3kx+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actundo16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxSHBxOHMTSzNzu3KzCtBRGHCSKFIzCjLzSxBQ2FAxGHDzCLCyeHBQ+FHSmfAwuFBxKLDSCNMzizISyjJzOnDSyLAw+FAQSDAQeDBxWJAwmDAQOBKzWrDymNAQaDAQODAwaDDyKTFSyXFTGTEy6TAQCBAQKDAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ1QIBwSCwaj0hiQCBICpcDQsFgGAaIguhhi0gohIsrQEDYMhiNrRfgeAQC5fMCAolIDhD2hFI5WC4YRBkaBxsOE2l/RxsHHA4dHmkfRyAbIQ4iIyQlB5NFGCAACiakpSZEJyinTgAcKSesACorgU4mJ6uxR35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actunlock16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJExGHEQ+FCQiDBwaDBweDGxiLHxyNHRuPIR+RIyGZJSSfFxaRGxmLJyaXNzWpNTOnMzGnMS+jJSKTGReLKyqjPTu1NzarLSufKyibJySXIyGVGxiNFxaXLSytPT29Ozu7OTi5NTS1KyurGxqVCQeDJSSjLS2tNTW1KSmpGRiLKSebOzuzJSOXExONExGLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaVQIBwOAwYA8SkMCAYOAnKYiFAIAQGyOgVCggYuEovVxztMpdnwAGRSCgUCwOjIeQ6HpCIZDKRUNYMRBUWF4UYGRoWGxyBRR0eHxgaICEiIyR0QyUmJygpKgUrAxMsLUQlKyieoKIuEAunK52fBS8DLiywQySpnjC1Mbi6QjIzNBeSIBY1EQfDQgosLAEUNjY3Co1DfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbook16:app app16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBDyKhDSChGSinFSWlEySjCx+fHSqrGSipESOjCR6dKTGxISytIy6vFSalBxydAQeHHyurAxubARmZCR+fBx2dDyKjPz+/MzKzLTS1IyOjAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOZGmKQXCWqTCoa0oUxnDAZIrsSaEMCxwgwGggHI3E47eA4AKRogQxcy0mFFhgEW3MCoOKBZsdUrhFxSUMyT7P3bAlhcnk4BoHvb4RBuABGHwpJn+BGX1CLAGJKzmKjpF+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appbookopen16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExCNGSenHRmVCwqJPTq1GxeTHRqXPz+/DwyJPTq3Ny+lOzexPzy5HRuVFSWlNzClPTexIR2ZOzevPz29AxqbPz6/IR+ZDyKjPTy5IyCZPz27ESOjJySfDSGhPTm1PTizJSKdDSChNzWxMS2nIR6ZKyijNzOrOzWtIx+bLSifNTGrMy6lIx+ZCRWRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQEAAQCwWBYJiYEAoGAFIw0E5QCScAIVikUgQqNargtFwdB9KSDhxiEjMiUlgHlB3E48IpdKdLCxzEAQJFxUTblwJGH9zGQgVGhUbbhxdG4wBHQQaCwaTb10emB8EBiAhInp8CSKYIw8kDRSfDiUmJ4xCIxMoKSoRJRMrJyy5uhMtLisTLCQkC8bHGBMj1daARgEjLyN03kPZc09FfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appboxes16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appbox16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECKoR6ys2IVqokF08yMTA1gwkYX5WQK5ma4VceTYPxXnBWdtY6+0834/Bowgzm6APWRQcH4TiMhPK2WYRiZWW7XK7/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbrowser16:app app16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxONCROfCRKfKx6LNy+bNTOpGSS1DRupAwyXBRSnPTSjPTqvOzqzMzSvHSSlKy6ZDxutAxCpBQ2XBxepLTKvPzqzPzy5OTShLS2dLSqRFR2jBRerBQ+jOTixOzetNS2XHx6XDR2tCRexBwyTDyKzOTavPzq1OzKdCx23BRKtCQ6VCQmHFSa7IyirOzSnGSGpIR+bFSO1DyK7DR+5CRixBw2VDQuHFye7IS27NzGXISuhEyS5DR25BRWxBQ+lBQyXCQqPCxSfGyu7GyerKy2ZFR+rERqfCRmxBROtBQ+fBwuTBwmNDSW9JyabLyqRIx+TExSXBQ6bAQCBBQ6ZBxapDR+zBxq3LyaLJySRHxqPGxeNBxGbCRmrHRyRERONDRKNDQ2JCQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAeygACCg4SFhgABAQIDh4MBBAUGBwgDCYcKCwwNDg8QERIThRQVFhcNGBkaGxwdoYMDHhcXHxggISIjEiSvJSYXJwsoISkpIyorLIIDLS4WLzAxMjM0NSo2N8o4OS46OzwzPSk+P0BBgkI8Q0NERUZHCEhJSktMgwk4Qy1NTk9QUVJLphCiUsWKlStYsmjZQiJgIS4KuijQ4iXAFxYCDVFJwGUFmDBhMjYSw0KMyEYoBfkJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appcalc16:app app16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChPz+/AQCBCH5BAEAAAAALAAAAAAQABAAAAI4hI9pwe0Ogpi00hHF2LzzzFlTsIHD45SSx6oCeW4wjK2tl83y7t64pIsJaxrfh2bEAJIlhRPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appclock16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAALy+vAQCBPwCBMQCBIQCBISChPz+/MTCxCH5BAAAAAAALAAAAAAQABAAAANbCLHcrSLKOZcYmDSCsR1aUABAsXDDJwJGa5SBFwgaWxbCG3CWaBwG3C8Y67FawpYiNQscg65fsVkYuoAmJs1pBR522lQB6ILJLqHRwQQOZzYdZnw+dzruDIA/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appdate16:app app16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPzerPyqXMRaBIQCBISChPz+/KSipMTCxPz+BMTCBPwCBPz+xPzCxMQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVxICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +apppencil16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appsheet16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +apptool16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +apptools16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExKTERCRAQCBOzu7Nze3MzKzLy+vCxqZBQ2NJyanKyqrGRiZDRydKza3FRWVPT29LSytDw6PMTm5EySjCxaXGRaJFSanCRSVGxqbPTmvMSqVJTW1GSurHS6vOzq7KSipISChFRKHJSGNPz23GxKFBQ6PKyurCwqLMyufJx2RAQGBJSWlEwyDIRiLNy+lLSKVDwmDJRuNOTOrLyabGRCFDx2dKSCVOzWtHzCxOTGnNSyhAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQIBwCAgIBAOiUiggFAyHASKxDAwUC8Zg0HAglA9IZPGQABoTSqJCFTIOEIsFgHBcEhhHUpKJFCwaGxYYHB0VEx4IEh8gIQwiIyQbJRMcHokmEicfDygAkCkqJQgIGG0rLElCLS4vMCWqQwMCQg0UMTIzNDVLQjaIGDE3ODQlS785CEkxKjowvEOHybG4O6JDCdNKuDUxRAmxRDHeveUAfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appuser16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxISChMT+/ATCxASChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMg5gw00yyDGIAR1YUDggeFWFIZhnSBZrsZxdIOFEGTA2oeBAHeyuGwvzxBlYdUOLROMFzDQntJPrNoqAKUBaqnV+k57ZORruykHDj2LqIzUVKp1u0iuB/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appusers16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxISChAT+BMRaBPyqXARCBPz+/FxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARLEIRJa5Ui673nsGAgeKE1Bl9AUEXbiqTlFlZaGUZoszm4BzhDAVf5BYbAXI+TAR6CS2ZGSZSEiIIqYIsSIEaJ7GRrlY7J1lKA7I8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appwp16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBKSinJyOfPz27Pzy7AwKDExOTJyWlERCRKSelPz69LyyrKymnPz+/MS2fDQyJAQCBOTazLSiXOzivMS2jKSSVOzmxPz25NzSpPTu5KyebOzixNTGjOTWpMSydMSybCwqFGReVKyaXNzSnGxeNJSCVMS2nPz23MSuZIR+bJyShLyqnOTOtGxiXIR6XOTSvIx6RMSubIyCdKSalMS6pOTWxMzKvKSabJyKTOzezHxuPGRmZKyurMTCvPTq3AAAACH5BAEAAAAALAAAAAAQABAAAAajQIBwCAgIiEhiYEA4FgwHRDKhIBAWz4OhgGQ0FAPHA7qFEBONb0Qy0ULeQ2+aUrFcMI+3GYBOZzQbHB0eHyAhIQByDREiEwMjFRIkJQImAgJ+jScjHigkKSorLC0AKg2NFSMoki4qCy+IQgITKDAxkjIzNDWkQxQoJaskMgk2Eb1DNzgoOCoHDDY5yEIwJToAOzw9ET7TQiREAhkZ3kmy5QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cal1day16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANOCLrMEUDIOUS9AFLLhx8LIRZjKYZmMRCkaChFLHty/AIiS3y6q+QtT49wq8VotRtQJGwRf6Zmrlj7DJLQXsupTJmeEIN4TB5nII20wp8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cal5days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANMCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiIdMmcec7jy53q81qP9OO5VMAj8RXTFWzOZW95HDLdEEM4LA4nIE0zgp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cal7days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANPCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiwcp0fucsj873qvGMv5Jw2FIACUsW4WakGW1O046I05qmGYBhTC6TM5CGWuFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calappointment16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxPz+BISCBISChKSipAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARbEMhJaQhA6D1E/wDGeeRgDhOhFoTBEi+REgdrIHScSEVvAD9Xr7cDqGSGpFEnQSqTv2NxCFQOiU1VEAiTZmstHFg1vQKuw+LxxfYaV/AuOQRI2O/4ewhT6Uv8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calbell16:cal cal16 16:photo:16 16:R0lGODlhDwAOAIIAAPwCBISCBPz+BIQCBMTCxISChPz+/AQCBCH5BAEAAAAALAAAAAAPAA4AAAM+CLrR+zCIAWsgLVRGRBhOVQiG94WPVAbHaZHYAWqRYLbge88RsbInGuBCEhRYrZYm4xk4nYdoKzKIbiKHawIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +callist16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/KSipPzerMRaBEQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARDEMhJaQhA6D1E/wDGeeRgDhOhruyatjBRSIRxxOsMEAdC0BUZDcfSEYvDo3Bn++2Cxt7RqFxWhZiCdsvdhjCVsMQfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calmonth16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANSCLrMEUDIOUS9AFLLhx8LIRZjKYbiRxLFIBpK0Q6z7MkwkJIe8b0KEeuWchFysuStVsjtfMbeMQitWpG25YfmNK1WU53XNIUYzug0OgNpuBX+BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +caltoday16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxKSipPyCBMRaBPyqXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARTEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyIQhFfiBIAfuFzaAioBIJBCummRYPCaDPh3vhwsOZdihNfa8Ub/AJXemFZPPNBvGwG672yFMZS7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +caltodo16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBAT+BAQC/AQCjPz+/MTCxPzCxKSipPwCBMQCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARaEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyMYhFXiuFwZiA6qZYbbqJX5BIw2RAPxwAAWCyWMCCsiXFGEEErKz6LQZfOqiTR1YJiGq1rFyyHmo2+/1EKbCl/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connecting16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connectno16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connectyes16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipDQyNMTCxMTGxISChFxaXMzGzAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZxCjgsAtDtUlCOA1gJQ4kl/IDatAoF7xxkS6GgEBr6jAobCyBX42SQBxMOx6A8MhiGASR8YDgrYsNEeJ0zaEGZY7uoH2oB6nOUwtbdLaVOeTUwo/8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devcdmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tOzOvNTqvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/LzKvMTCxDQyNASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAa0QIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTBqUiuUCVmAeiYzmsKlwOt/AAKFIFAIIFx4WHyAhUwIDIgsZFyMkFxchJSYmiBkSBBoIJJwIGgOhiCYFJSEnFyQjFwNZewABISAfFiYnCAEmCREIrwAIFhwVGwcaBAkPGApsQsAVFA0GBQMRbxBTKM0ODQwTEq192ClDgROkBHvYKuNJUu5CKCorX1RDKCkpUn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devcdunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tNzmvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/MTCxLy6vDQyNOTm5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAapQIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTLqUigWsuDwSmMxBQ9lwvoEBQpEoBBAWHRseHyBTAgMhCxgWIiMWFiASJCSHEgQSGQgjmwglGKCHBQUSICYWIyIWAwshIVMBIB8eFSQmCAEFCREIekIIFRsUGgcZEgkPFydrvxUUDg0GBSEREGJfv9AMEySsJxDYQ4DcEhh64UpS6lTs7QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devdiskmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKROzSrOzKpOTGnLSafLySZKxuLMSOVPTWvPzixLSehNyibOzOrGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTOpHxOJKyKXFw+HKSipISChMTCxFxaXIRiPNSWXExOTOS2hLR+PLRyLPTWtMyOTASCBARCBPz+/DTSJIyKjIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwrA3HQ7scQAqFAcEQOUi0zAkFUSFYLghMBloUCDQNGxwdHhwHekcfICEhICIfIxkLJBABJUYCICABIhAOBiYnKJaXmH4CGSkYCCqkSAEfTKenrkOwsrQll0IrS7G5uwArLLaxLbXCLsTFLyDBKy4wZEVHvCwsRn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devdiskunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKRPTWtOzKpOTGnLSafLySZKxuLMSOVOzOrPzm1LSehNyibGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTWvHxOJKyKXFw+HPTOpKSipISChMTCxFxaXIRiPHxaNLRyLNSWXExOTPzixOS2hLR+PMyOTPz+/IyKjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaIQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwGgiD46FdDiCFwoDQAEe0TMkEQSFULIcLBloUCDIaDRscHRsNHhhHHyAhISAiHyMkJSYQASdGAiAgASIQKA0pKguXmJl+AiQGFwgrpUgBH0yoqK9DsbO1J5hbsrq8SrgstlJFHy0gwMVFR1J+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devfloppymount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVrICCOQBCQKBkIw5mqLFG47zoQ+FwbN57TosDhgPD5dMEEIqE04kwlBWKBUEiNVYFpyqAyGEUCgqEtERiNNMLhQKzLQYJg7n7Y4aMAwbCUPvAQeWNgfzQQETAIhSMQEogwgBITQEGGEREmfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devfloppyunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devnetwork16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVmICAGZFmKQiACweCSBImq41AYB5IodLq2hwWO0ejRWDac48Gb/QKNqNRoqspmrVcAUuIJBANS8sBIFCORUgooPEh4J8B67NgdsVBp9C5XWfl9LRMTCyReX19hARNojWlWLH+AAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devpc16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBISChHx+fPz+/AQCBAQC/AT+/AQCxAQChAT+BLy+vAR+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEIAgqK1YzsG754QUDERpmkEpkkXrtoK6EcVgHIibhnNx564Yb0TDvQq7FQ34EiqPOhnREqhWSUPsyZSQAbbg7GcMEgwUiYVivTa1R+y4XEGoWO/4AMAfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devscanner16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MT+/ASChARCRATCxMTCxFxaXKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJgqWBVivEldkUdKSXhVjZfenommglDERh3Tc4E4ZRHAGgkEPr9X6H5AHBERSMRyWzkug8jQXFEhWoOo8dRYxqLXSmGjIJnVaz29Q3fAP3RwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devscreen16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXFRSVPz+/PT29OTm5OTi5DQyNDw+PERGRExKTHx+fISChIyKjHRydFxeXDQ2NCQmJBQSFAQCBERCRMTGxHR2dGRiZExOTDw6PCQiJAwODCwuLFRWVOzu7BweHAwKDCwqLHx6fBQWFGxqbGRmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAanQIBwSCwKAwKkMslEAgSDqDRKqBYKhkNgcDggEorkMrDQchkNhuOhgEQkk0l5S2lUGpYLJqPZTAwMHB0DCmhqAW0Rfh5zAxgOkBcCFAcfIBMECxwBBAEPFw8dChkhcBMDDAcdnQqtFKSWcQMimx4dGRkQBxGxsg6bBQEawx8jl3GnJFoFHRNXVVNRJYIFDAsL1tgiDiQXFx0HABwcXeQH5OjkRutEfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devspeaker16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXAT+/DQyNATCxMTCxPz+/AQCBKSipASChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMgJQqCXziDG2JoUEENhZBkmHIWJVptAmqcIW/Js1MiF56TBzkckAAcHoa9nMRKeA4TyJk0knsHhTeK5khBaH2VwLYVh40TJhQ6RzeIQV32Quz8hfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editcopy16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAFxaXPwCBNze3GxubERCRPz+/Pz29Pzy5OTe3LS2tAQCBPTq3PTizLyulKyqrOzexLymhLy+vPTy9OzWvLyifMTCxHRydOzSrLyihPz6/OTKpLyabOzu7OTm5MS2nMSqjKSipDQyNJyenLSytOTi5NTS1JyanNTW1JSWlLy6vKyurAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAaUQIBwCAgYj0eAYLkcEJBIZWFaGBie0ICUOnBiowKq4YBIKIbJcGG8YDQUDoHTKGU/HhBFpHrVIiQHbQ8TFAoVBRZeSoEIgxcYhhkSAmZKghcXGht6EhwdDmcRHh4NHxgbmwkcCwIgZwqwsbAhCR0CCiIKWQAOCQkjJAolJrpQShK2wicoxVEJKSMqDiAizLuysiF+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editcut16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIwhI9pwaHrGFRBNDdPlYB3bWHQ1YXPtYln+iCpmqCDp6El7Ylsp6ssR1uYSKuW0V8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editdelete16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPT29GxubMzOzDQyNIyKjHRydERCROTi3IyKhPz29Ox6bPzCxPzy7PTm3NS6rIQCBMxCNPTq3PTi1PTezMyynPTm1PTaxOzWvMyulOzGrMymhPTq5OzOtNTKxNTOzNTCtNS+rMSehAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaKQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhSEQkFgrBAcr1URiPhKAsDD3QB8RhA3FM0IlLHnyUTVBMSFBUWfl0XGBMTGBcZGodmcQWKjpAbHIgIBY2LHRoempOdjooTGx8giIOPFYofISJ+DyMXI6AfFySyfiUmJSUnKBYcICIpfgELzM3OZX5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaVMR+RPzKjNze3AQCBMR6RPzGjPyODPz+/MzOzPyKDPyKBPz29OTWzPyGDPyGBOx6BOza1OR2BKROBNSOXKRKBBwOBOzu7PTWxPzizOySZPyCDFxaXOy2lNRyRMxmJCQOBPTm1OzStPTKrMR+XIRWLFxGNCQSBDQyNIRSNDQuJERGRLyqlNzSvIx6ZKRuVEw6LLSyrLymhKSShBwaFFROTJyWjMS+vNzW1OTazNzKrHRqXOzezOTOpPTq3OzWvOTStLyedMS+rLy2pMSynMSulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAewgAAAAYSFhoQCA4IBBI2OjgUGBwiLBAmXlpcKkgsMlZcJBA0JDpIPEBGVjwkSBgOnExSfmBIVBxAMExYXswkYGRobHLq8gh2PHhoeHyAWIYKzIiMkJSYnKCnQg5YNHtQqKywtK9qMBC4vMDEBMjIz2dCMDTQ1Njc4OToz5PEEOzw3ZPToMcLHO23HfogQ0QMIkCA+hPBbhAPHECJFjMyYIUQIvEUpUqwQOXKkSEF+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQiFHRqNIx+LFxSBDw6PKSaRPz+/NTOjKyiZDw+POTe3AQCBIR2HPT23Ly2dIR2FMTCxLS2tCQmJKSipExGLHx+fHR2dJyenJyanJSSlERCRGRmZNTW1ERGRNze3GxubBweHMzOzJSWlIyOjHRydPz29MzKzIyKjPTq3Ly2rLy+vISGhPzy5LymhISChPTizOzWvKyurPTexOzSrDQyNHx6fCwuLGxqbOzKpMSabAQGBMS2nLyulMSidAAAACH5BAEAAAAALAAAAAAQABAAAAa7QIBQGBAMCMMkoMAsGA6IBKFZECoWDEbDgXgYIIRIRDJZMigUMKHCrlgul7KCgcloNJu8fsMpFzoZgRoeHx0fHwsgGyEACiIjIxokhAeVByUmG0snkpIbC5YHF4obBREkJCgon5YmKQsqDAUrqiwsrAcmLSkpLrISLC/CrCYOKTAxvgUywhYvGx+6xzM0vjUSNhdvn7zIMdUMNxw4IByKH8fINDk6DABZWTsbYzw9Li4+7UoAHvD+4X6CAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbGxubMzOzPz69DQyNIyKjERCRPz29PT29OTi3IyKhPz27PTu5PTy5Pz6/Pzy7PTq3OzexLyqlPTm1PTizOzavLyqjOzWvOzaxLyifOzizOTOpAQCBOzezAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaEQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhWEQkFYYHkeqkMxKFBFpq9jgdkEGlPqwrJhCIY2N8FFRYUFxcYGX9dgRKEGhiHiYEOhBcbGBwdiQEOARcBGwEeAZllAgEUnQEfoQEgmp4hrCKtrwEYsrRlTiMBJAG8syN/IyMAxMXHSH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edittrash16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipFxaXPz+/MTCxISChDQyNCH5BAEAAAAALAAAAAAQABAAAANQCKrRsZA5EYZ7K5BdugkdlQVCsRHdoGLMRwqw8UWvIKvGwTICQdmGgY7W+92GEJKPdNwBlMYgMlNkSp3QgOxKXAKFWE0UHHlObI3yyFH2JwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileclose16:file file16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCQiJBwaHAQCBDQyNDw6PFxaXFRSVERGRCwqLAwODGRiZHx6fPz+/GxqbAwKDCQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVaICCOZGmeqBgEwjCkRGEcSKK4JrEcBrMgAdeLVDg0GguGsYEbBQyGYyN6FDoPDIf0+LCKBIgetQERDgGDBGIpNY8GioAU0m6KXFw883w3+/l9f4AkfimGIn4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filedocument16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJSWjPz+/Ozq7GxqbJyanPT29HRydMzOzDQyNIyKjERCROTi3Pz69PTy7Pzy7PTu5Ozm3LyqlJyWlJSSjJSOhOzi1LyulPz27PTq3PTm1OzezLyqjIyKhJSKfOzaxPz29OzizLyidIyGdIyCdOTOpLymhOzavOTStMTCtMS+rMS6pMSynMSulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaQQIAQECgajcNkQMBkDgKEQFK4LFgLhkMBIVUKroWEYlEgMLxbBKLQUBwc52HgAQ4LBo049atWQyIPA3pEdFcQEhMUFYNVagQWFxgZGoxfYRsTHB0eH5UJCJAYICEinUoPIxIcHCQkIiIllQYEGCEhJicoKYwPmiQeKisrKLFKLCwtLi8wHyUlMYwM0tPUDH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filefind16:file file16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBCQmJDw+PBQSFAQCBMza3NTm5MTW1HyChOT29Ozq7MTq7Kze5Kzm7Oz6/NTy9Iza5GzGzKzS1Nzy9Nz29Kzq9HTGzHTK1Lza3AwKDLzu9JTi7HTW5GTCzITO1Mzq7Hza5FTK1ESyvHzKzKzW3DQyNDyqtDw6PIzW5HzGzAT+/Dw+RKyurNTOzMTGxMS+tJSGdATCxHRydLSqpLymnLSijBweHERCRNze3Pz69PTy9Oze1OTSxOTGrMSqlLy+vPTu5OzSvMymjNTGvNS+tMy2pMyunMSefAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe4gACCAAECA4OIiAIEBQYHBAKJgwIICQoLDA0IkZIECQ4PCxARCwSSAxITFA8VEBYXGBmJAQYLGhUbHB0eH7KIGRIMEBAgISIjJKaIJQQLFxERIialkieUGigpKRoIBCqJKyyLBwvJAioEyoICLS4v6QQwMQQyLuqLli8zNDU2BCf1lN3AkUPHDh49fAQAAEnGD1MCCALZEaSHkIUMBQS8wWMIkSJGhBzBmFEGgRsBUqpMiSgdAD+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filenew16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz6/GxubNTKxDQyNIyKhHRydERCROTi3PT29Pz29Pzy7PTq3My2pPzu5PTi1NS+rPTq5PTezMyynPTm1Pz69OzWvMyqjPTu5PTm3OzOtOzGrMSehNTCtNS+tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ/QAAgQCwWhUhhQMBkDgKEQFIpKFgLhgMiOl1eC4iEYrtIer+MxsFRRgYe3wLkMWC0qXE5/T6sfiMSExR8Z1YRFRMWF4RwYIcYFhkahH6AGBuRk2YCCBwSFZgdHR6UgB8gkR0hpJsSGCAZoiEiI4QKtyQlFBQeHrVmC8HCw21+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBOSmZPzSnPzChPzGhPyuZEwyHExOTFROTFxaVFRSTMSGTPT29Ozu7Nze3NTS1MzKzMTGxLy6vLS2tLSytDQyNOTm5OTi5Ly+vKyqrKSmpIyOjLR+RNTW1MzOzJyenGxqZBweHKSinJSWlExKTMTCxKyurGxubBQSFAwKDJyanERCRERGRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaRQIBwGCgGhkhkEWA8HpNPojFJFU6ryitTiw0IBgRBkxsYFAiGtDodDZwPCERCEV8sEk0CI9FoOB4BEBESExQVFgEEBw8PFxcYEBIZGhscCEwdCxAPGA8eHxkUGyAhIkwHEREQqxEZExUjJCVWCBAZJhEmGRUnoygpQioZGxsnxsQrHByzQiJxz3EsLSwWpkJ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileprint16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRKNAQCBPz+/MTCxExKLPTq5Pz29Pz6/OzezPT29PTu7PTy7NzClOzm1PTu5LSabJyanPTm3FxaXOzCjOTKrOzi1OzaxOTSvJyenGRmZLyyTKSipDQyNERCROTi5Hx+fMzKzJSSlIyOjISChLS2tAT+BDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaYQIBwKAwIBMTkMDAYEApIpVBgOCAOg4RRGlAoEAuGIdGITgWOq4LxcCQgZkEkIHksHgYJOR6ZQCgVFhYJFxgTBVMZihoCfxUYDWUbUBGKGREcjBoQEB2TAB4CAx+Vl5WMhyACHiEhH6IfIiMktCQgE0cZJQStr6O2t6EARxO6vK6iEx4dZsMCxbsmBB4nzUTEutVSSUdmfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBFRSVMTCxKyurPz+/JSWlFRWVJyenKSipJSSlOzu7ISChISGhIyOjHR2dJyanIyKjHx6fMzOzGRiZAQGBFxeXGRmZHRydGxqbAwODOTm5ExOTERGRExKTHx+fGxubNza3Dw+PDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaAQIAQECgOj0jBgFAoBpBHpaFAbRqRh0F1a30ClAhuNZHwZhViqgFhJizSjIZXQCAoHOKHYw5xRBiAElQTFAoVQgINFBYXGBkZFxYHGRqIDBQbmRwdHgKeH2YgHpmkIR0HAhFeTqSZIhwCFIdIrBsjAgcPXlBERZ4Gu7xCRZVDfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9HzC3AxmnAQ+XPTm7Dy67DymzITC3IzG5AxypHRydKymrMzOzOzu7BweHByy9AyGtFyy1IzG3NTu/ARupFRSVByazBR6rAyGvFyuzJTK3MTm9BR+tAxWhHS61MTi7Pz+/IymvCxulBRelAx2rHS63Pz6/PTy9PTu9Nza3ISitBRupFSixNTS1CxqnDQyNMzGzOTi5MTCxMTGxGxubGxqbLy2vLSutGRiZLy6vLSytKyurDQuNFxaXKSipDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYHCImDBgkKCwwNBQIBBw4Bhw8QERITFJYEFQUFnoIPFhcYoRkaFBscHR4Ggh8gIRciEiMQJBkltCa6JyUoKSkXKhIrLCQYuQAPLS4TEyUhKb0qLzDVAjEFMjMuNBMoNcw21QY3ODkFOjs82RM1PfDzFRU3fOggcM7Fj2pAgggRokOHDx9DhhAZUqQaISBGhjwMEvEIkiIHEgUAkgSJkiNLmFSMJChAEydPGBSBwvJQgAc0/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folderhtml16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBERGRBQWFMzKzOzq7CwqLDw6NARqnAQ+XHR2dKyqrOTm5ExKTERCRHRydMTi7NTu9HS+1KSmpBweHDy67DyixHS61ITG3AxypByu7DxinBw+ZERmdIySjITC3ARypExOTDRurIR2RPTSdJyulEyGvBw+bFSyzJTK3LzKvPzivOTixNTChLSybGyCfCRSnBQqRASGtFyuzDw+PCRShPzy5OzerOTShKyaTEx6pCxerGRufBR+rOTezPTShNy6bER+1BxCfBQuRAxelFSixBw2VISq3GySrPTWlHyanIyitFSO3IymtCRujAxWhCRqlCQ6XGyWvNS2bFyGvDxuvCRSpLy+vMS+vGxqbFyO1GSi3EyO1FRaVCQuPLS2tDxyzKyWNFxaNCQyPGxubCxajERSVExKNJyenAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfZgACCAAECg4eIAAMEBQICBomDBwgJCgsEDA0BDg8BhwYQERKUDxOYDAyeghQVFhehGBmVlwwOqxobHB0eH6EfIAkPIYIiIyQlJhsnKBcpvrYiKissLS4vMDEyFjOvNAA1LDY3ODk6Oyc8PTIyFzQ1Jj42P0A6QTtCQ0REIEUORkdIkihZwsSekBhNnDyBciCKiSNSplDRUcWKkRhXCGDJYgiGli1cpuTocsILjytfFmRpACAGRTBhRogZgzHlAjKGWnIoY+bMgRgBDHRBo/LAIZoxuhwKatRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folderlocked16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQSFMzKzOTm5CwuLERCRARqnAQ+XHR2dKSmpOzm5GxqbCQiJMTi7NTu9HS+1HRydOTm1Ozq7Dy67DyixHS61ITC3AxypERGRBweHByu7ASGtFyy1DSOtDRmfExOTBSazBR+rCwqLAxWhAxelByGtDSaxAwODHy+1Dw+PPT29IyqvCxujOzu7NTW1Nza3ExGJJyebKyqfMTCpFRSPOTi5DQqHOTezDw2NMTGxKyqhMTGrGxmXDQ2NMTCxMTGpHx6bHx2bBQWFIyOXDQuDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQICBomDBwgJCgsEDAKFDQGHDg8QEZQSlxMUDJ2CDhUWF6AYGZWXFBqCGxwdFh4XGK8fIAohtiIIIx25EZwBDREHgiQjJSYmGScoKSoRKQ8rggIsDC0uJS4oGygoAyjdAAcsLxQUMDEyMzQ1EzapBy8MDDc36tFwgONFjlQ6dgCEEZBHDx8+ctRIRehHAyAwZASZIGRIEBoUBwUwIGMCiwFEaBQJichIjo9FZLBsacRIAB0A/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +foldernew16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBPz+hPz+BOSmZPzSnPzChFxaXMTCBPyuZPz+xPzGhEwyHExOTPz+/MSGTFROTPT29OTm5KyurDQyNNza3Ozq5Nze3LR+RLy+vJyenMzKzNTS1Ly6vJSWlFRSTMzOzMTGxLS2tKSmpGxubBQSFAwKDKSinJyanIyOjCQiJERCRERGRBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaNQIBwSCwaj8ikcokMCIqBaEDoBAQG1meAUDAQpIcBQoy1dg2JdBqhECgQ1IWB0WgcBIOBwIHXBwwPEBEREhIBbG4IExR/DBUVFhIXV2NjDVYYDY8SFU4ZVxpVAQwbGxynGxkdTh6XVh8gGSGzGSITIxokJUImGSMTwLcnKCkprgAqDSt1zCssKxQtQ35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folderopen16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOzi1Ozq7ERCRCwqLPz+/PT29Ozu7OTm5FRSVHRydIR+fISCfMTCvAQ6XARqnJSKfIx6XPz6/MzKxJTa9Mzq9JzO5PTy7OzizJSOhIyCdOTi5Dy65FTC7HS2zMzm7OTSvNTCnIRyVNza3Dw+PASq5BSGrFyqzMyyjMzOzAR+zBRejBxqnBx+rHRmTPTy9IyqvDRylFxaXNze3DRujAQ2VLSyrDQ2NNTW1NTS1AQ6VJyenGxqbMTGxLy6vGRiZKyurKyqrKSmpDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfCgACCAAECg4eIAAMEBQYCB4mHAQgJCgsLDAEGDQGIkw4PBQkJBYwQnRESEREIoRMUE6IVChYGERcYGaoRGhsbHBQdHgu2HyAhGSK6qxsjJCUmJwARKCkpKsjKqislLNIRLS4vLykw2MkRMRAGhDIJMzTiLzDXETUQ0gAGCgU2HjM35N3AkYMdAB0EbCjcwcPCDBguevjIR0jHDwgWLACBECRIBB8GJekQMiRIjhxEIlBMFOBADR9FIhiJ5OnAEQB+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailforward16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRydHxubHxmZGxiXHRmZFxOTFxGPFxKTPwCBLymlMy+pOze3PTq3PTu5Pzy7LSmnOTaxOzm5LyqlNzOtPz69Pz27MzCtLyqrPT27IRubPzuzNTGvNTCxLSelPz25Bw+ZFxKPPzy1Pz65LyupBxKdCxWfPTm1Pz23LyinBxGbGzO5DRafBxWfBxajCymxHTS5BxSdBxKbFTK3EzG1CSGvCyKvCSSxCSavGTO5GRaVPzqzFzK5EzG3BSCtAwiPGxaVPTivPzy3NzKpBxObCRefBxqlPTmzJR2bKyahAwyRPzmvOTOpKyObNS+nPz21AQOFKyOfPzuxAQCBGRORLSadPzyzLymjMy2lOzetDwuJFRCPEw6NEQ6LEQyLEQ6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAAQABAAAAfhgAABAgIDBAQFBgcIBwmOCQIKCwwNDg8OEBESjY8CDBMUFRYVFxgZDJyOGhsPChwVHR4fFSAhjwkaIiMOJBQQDRUVJSa3GicoHw4pEA8SGSorLI8tLtQu19gqLzDECTEyMzQ14zY1Njc3ODkqCTo7MjIxNCs5PD03PjctPwlAQUIihhBpQbCIihtG+CUocASFkAhIkogQ8kFJwkcFlogIkoRJEydPnkBR6GiAxiQLgiiIIkXElFQJqESoMsRKkAhXqkhhApNKFSxZggTJ4nHIEJhaDhzYwoVLFy1avHyB6ScQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailget16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAxKdBRSfCyGvFSm1BxKfCSWzCyWzBRCXCRKfBwuRAQGDDw6PHy23Cym1CSSxByCxBxunBQSFKyurMTCxExihNza3NTW1JSSlMzKzFxaXLS2tNze3KSipCQmJGxmbNTS1KSepLy2vISGhJSWlHx+fERGRPz6/IyKjDw+POzq7JyenMzOzKSmpCwuLDQyNIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQIBwGBAIAsOkUjAgFJRQQMHgjC4PBIEVgAh4D4aEYrGAMhINxwPyiCgYSsmEUmk82grLRZJkYCgXaAEKFxYZcEISGhsZFxwFeY0WHR5CDB8dGCAXG5shGxQicBIMpSMUGxgTGSQlpQwSJicnEwwdI7gdKAwTsykpKiobr8QMKxeHDBcsGRvOzxsT0i0uL9HSHdkT2ZkoMJXF4a8AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBGxaVOTe1Oze3OTWxOTWvNzStNzKpEQ6LOTezPz+/Pzy7Pz69Pz27Pz25Pz21PzuzPzuxEQyLLyinLSmnPz67Pz23LSafKyObDwuJMzCtLSelPzy1My6nLymjNTCxLyqnPzq1LyihKyOfOzavOzetEQ6NPTq3NzOtLymnNTGxJR2bOTOpPTivNTGvLymlKSShKyahEw+NOTe3PTm1Pzu1Pzy3FRCPPz65LSadFxGPOzm3PzqzPTmzPzmvEw6NCH5BAEAAAAALAAAAAAQABAAAAaqQIBwSCwaj8ikMhloOp/QpmAgqAoIhELBUDgcEIGEYrFgNBoLx+IBiRwkgQnFoWAwKhWLhX3BZAILGhsCDXgODhwdGB5vgAofICBlDiEiIx4kJSYBJ2UoEykqHSMrLC0nLWAnFS4UCycvMAcEMR0RLTIBMwaSahw0NTYtFwclNwEdLws4eoc2DxwQOR06ASk7PBAhIRE9Pj0tLSUY1T8I5gjn6Qgy7D8SfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreplyall16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBLymlMy6pOTa1PTq3PTu5Pz27Dw+POzi3PTm1OTWvPz25FRSVERCRLympPzuzPTu7NTGvFxaXKSmpPzu1Pz65Hx6fHxqZPzq1Pz23HR2dBw+ZHx+fISChJSWlDQmJHRydCxWfBxGbJyenExKTHRiXPzqzPzy3CQmJDRafGTO5ExOTERKTGxWVCRSfHTS5CymxBxajBxWfPTmvPzy1CyixCSaxCySxDSaxDSWxDSSvDyaxGS21PTmzPz21AwiPBRejCSavByGtCSezEzG3FzK5FzG3GzO5FTK3CQ2bPTixBxqlCRefBxSdBxSfBx2nCQ+dHxmXPzmvLSafAwmRAwyRPzyzDw6POzavNzKpAQOFPzuxBwWTBw2ZGRORLyWdMy2lOzetPTivAQCBKyObOTOpAweNBwWVEQyLEw2LEQ2LDwuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAf4gAABAgMEBQUGBwgJCguOCwEMDQ4PEBESDA4TjY8DFAwVERYXGBkRm4+QGhsMHB0eGB8bDpyOARogEBceIRgXv8COIiMkGB4lJSYnIcwoKb/DGyoXKywtKS4pHinMLzAxJDIzNDUtNjcv6B0hLzgfMh85OjstPDw99zwd7T4/LTVAgggZQqSIECNHevSAgSSJkiVMmjh5AiWKlClAiFARUeVHFSVWmLS40gNLlh5agGzh0kWDlwZfrIDREKaCAjEqrFA5MMYLmTAxlJTxYoZMozNozqRRs4ZNmy5s3LwhA0dBnDNn5MxBoAABnTp17IitowDrmQV+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreply16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTEw+NFxKTFxGPPwCBLymnMy6pOTa1PTm1Pzy7LymlOzi3HxqZOTWvPz69Pz25My+tLympFRGRHxuZPzu1LymjNTGvNTCxBw+ZPz23PzuzPz65PTu5NzOtCxWfBxKbPzq1DRafGTO5BxGbPzy9HTS5CymxBxajHRiXPzqzCyixCSaxCySxDSaxDSSvGS21GxWVAwmRBRejCSavByGtCSezEzG3FzK5FzG3CQ2bPzuxAwiPBxqlBxKdCRefBxWfBxSdBxSfBx2nCQ+dPzy1CRqlAwyRDQmJPTmvPTixLSafOTOpAQOFPz21BwWTBw2ZPzmvNS6nPTivAQCBAweNBwWVNzKpPzyzLyihGRORLyWdMy2lOzetKyObEQyLEw6NEw2LDwuJEQ2LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfqgAABAgMEBQUGBwgJCguOCwEMDQ4PEJYRDhKNjxMPDBQVFhAXGBUSGY8LGhsQHB0VHh8gFQ6bjgEhIiMMJCUmFbS2CwMnG6IoKSorI7WpEycWFiUsLSou1yXXji8wFiopMTIzNDUz4zbZNxsbODk6Ozw9Pj8pPzEzQDdB60JDOkRFjBw5giRJDCWdlmxwIIRJExAWKDRyMgTIiydLoESRImQKlSUSF1SxUoXAlSBRsGSJoCVICIlbqlThcoBClC5eYFD4EiVIFwUyqywAE0ZMlqNjpJDpIkUBl0dlFChAYOZMmTJoyqQR5icQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailsend16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBHxqZLyqlMy6pOze3PTq3PTu5Pz27Pzy7LyinOTaxOzi3Ozq3LymlOTOtPz69Pzy5My+tLympPzqzNTGvLSelPzy3BxGbBQ6VPzuzPz65LyupNzOtPz+/GzO5BRejPzq1Pz23LymjHTS5CyixCSavBxqlPz25LymnGTO5CymxCSaxByGtHRiXPzy1CySxCSezGxWVPzuxKyOhMy6nDSaxEzG3PTivNzKpKyOfPzu1FzK5PTmzJR2ZLyihLSWfKyObOzmzPzmvDyaxOzavLSafGRORMy2lOzetDwuJEw6NEw2LEQyLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfUgAABAgMEBQUGBwgJCguOCwwNDg8QERITFBUWjY8DFxgZGhsaHB0aD5yODB4TGB+kICEaIiOPCwEkJRcmJyYPKCIpKrWqKywTmC0SIi4vMDHEDCsyMg8zEyI0NTY3z7U4Hhs5Mx+0IyI6OyPrIzw9Gys+PxIy2EBBxAs8Qjk5Q0RFWFxAZySfgSMsilRAkiRECHQ08hHgJ0TJkCU/mECU2ISEkowUlpAQ4QTfowNPoAzJIeRJCyjm8kVRIkWIzSkXhwxJtYAKgp9VrFi5QoWKFZ5+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PUZi0zmTtypflV0VdRJbm6fgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav1leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAP///wAAACH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxqdwoNGTmgvy9px/IEWBWRkKZ2oWrKu4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav2downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pyxf5VohmSlsxmpjTzAHeN5ak6UHpqKRi2GpwvH3Q3eT64RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav2rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pq5HOAjQyVnqfhHue7oAaKH5kiW0AmnLqaHomkj02g+e6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav2uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIghI+pyxfR0HsRzNnuXVqn3mVQZWFRyIDjp65Ga5Ly4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navback16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TBxObISevAQCBNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAwSHBRafBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnBRWfAwmPBRWdByixAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZiQIBwSCwah4HjUTBQFgkFg3MoKBykU0QhoUAIAuAksbpgNByPxQMSGVsVDYlkIqdUiJYLJqORbDgcHRseRR8gISIaEyMkGCVYRBEmeyAnlgaQkSgpmU4RAZ1OKqFOpFNGfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navdown16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObCRKZBxCXAwyTKTK3Ozy/NTm9GSivAQWHNzu/FzC3IzO5CySrAQOHAyuzETS3CSWtAyOtETa5Aw2VLze7ByWtBy61BSavAxWdBRCXAwqPAQCBDR+nKTe7FS+1Eze7ByixBRmjPz+/AyexAyixAQKFBRqjAQGDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZeQIBwSCwaj0hAYCkYEJLKguGASEADigWj4bgaHpBINykwSCYRa5HCFFQsF0xGo9lwhpSOwfORYC4gISJ3RAQdIyQYJSAlImNrh4uNJkl5CoKUUBQnjlB4KJ6hokN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navforward16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAwyTBRObAw2VDR+nCRKZOzy/KTe7Pz+/KTK3Nzu/Lze7FS+1AyexAyuzBSavAyOtBSmzOTy/BRqjNTm9IzO5ETS3ETa5By61AyixByixBRmjAQGDBxCXGSivCySrCSWtBTC3AQOHAQWHAxWdEze7AQKFBRCXAwqPAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZjQIBwSCwahYGjUjBQGgWEpHNYMBCaT4G2UDggos+EwmBYMBpf6VBgYDgeEMgjIpmoAQVKxXLBPDIXGhscRB0eHyAgDSGBGyJFASMiIiMkJYImUwAnmJqbjp4AKCmhAKSlTn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navhome16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tJRqRGQqBNy6pIyKjDwGBPTe1JSWlDQyNOTGrNRiBGwmBIRaLNymdLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaoQIBwCAgIiEjAgAAoGA6I5DBBUBgWjIZDqnwYGgVIoTGQQgyRiGRCgZCR1nTFcsFkHm9hBp2paDYbHAsZHW9eERkYGh4eGx4ag3gfSgMTIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbIiorLB4XEltDrhcaLS4vtbcJra8bMDHAGrcyrTMXHjA0NSypEsO6EzY3IzU4OdoTzK0BCAkDMgkIOjJlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navup16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObAwSHBRSdISevBRWfAweLNzu/BSOrAQWLPz6/FzC3DzW5BxObHTS5ByyzAyixEze7BSStBRWdAyWvByixAQSHCQ2TAQCBBRGZJze7CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZfQIBwSCwaj8hhQJAkDggFQxMQIBwQhUSyqlgwsFpjg6BwPCARySSstC4eFAqEURlYhoMLBpPRUDYcHXt7RgUeFB8gIU0BIoiKjAcUIwiLSQUkJRsmGIwJJwmEU6OkfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playeject16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+py+0R3IFQUtruXVqn3kkWyIARR4rqKvoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playend16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playpause16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playstart16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playstop16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textblock16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textbold16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textbottom16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textcenter16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textitalic16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textleft16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textmiddle16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textmove16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textright16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhhv1ylfFE5jiYwX6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textsortdec16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BPwCBAQCBAQC/FxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CBDM+uKp8KiMsmaAs82dtnGeCHnNp4TjNQ4jq8CbDNOroIe3ROyEx2A4vOgkOBzgFxQ6Xa0owJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textsortinc16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BAQC/AQCBPwCBFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM4CAqxLm61CGBs81FMrQxgpnhKJlaXFJHUGg0w7DrDUmvtPQo8qyuEHoHW6hEVv+DQFvuhWtCFPwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIlhI8Jwe2/AmpTynqPTXSqrnBM+I0kdmpmGmUp+K4nPMvhYx9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +texttop16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textunder16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewchoose16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewdetailed16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewicon16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrcG1AwGOQbw6qANeCEB3pCSZpO6pgowJZqLKuUGE0dnuEhf8IL1kz1shSHDX8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag-16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ+QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7Kmpl0CtLGLvbW2Zn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ8QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7GLArS5Q7O1tmZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag+16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6cAsLECrqeys7WxpqZdtK9Ct8C0fsHAZn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmulticolumn16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrc/ixI0WSgKoyBl+beQFACpo1AqXbKCr1wLAMWS08hGG3dSZqin4sxnBmPD38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewtext16:view view16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIchI+py40BTQSwuovp3DXkv1ia1IHmIXLiyWJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewtree16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBDQyNPz+/PzerAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAMuCLHcri4yGISlj4kxcANgNRBQCIbL6U1Su7bB62rXvGydG25kqpwfIGxILBr9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actattach22:act act22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBMTCxPz+/DQyNKSipAQCBISChFxaXDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARrEMgJgqA4zzus/gLhFd5HCcZAXqsphYPUdhcYFNRcZnvdtpnDqPTbUWgAJKBYwzBlw+bRo3xmkNWoBgm0OrVLn3GC9RgCk8DhUw7c0rHPr4CDu5SYQNyEt7uSY3p/UAKFhYKDSQOLiwgFdhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actbookmark22:act act22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBCQmJCwqLMTGxAQCBBwaHMTCxLSytERGRFRWVLy+vKyqrKSmpHR2dJSSlJyanISGhGxubIyOjKyurGxqbFxeXGRmZHx+fKSipLy6vGRiZLS2tFRSVHRydJSWlHx6fCH5BAEAAAAALAAAAAAWABYAAAWWICCOZGmewamaQrq+wUC8azHINGocOI38iIRAceDNaISFYklkGHOEhoNBfUAOhuOLEJE8HoPiRKFdESiQBqViuTDIUAsEcyAeGJmyiqC5RCwJGg0YcEh9D0V3Dxt6JwQVDRYVHBUdi40mjw0PTgwQHgeYJQQJfxUXFxAOoTkFpQ0fsRSimQkWEQ0VtI62HLt7vjl7JQYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actbookmarknew22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCwqLCQiJCQmJMTGxAQCBLy+vLSytERGRFRWVKyurKyqrLS2tKSmpHR2dJSWlKSipISGhGxubIyOjGxqbIyKjFxaXGRmZHx+fPz+NGRiZPz+ZPz+HMTCBKSiHPz+jFxeXPz+XPz+tPz+zPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAamQIBwSCwaj4Gj0hgQLJ+AAaEAVQoI06pRYDhkoYgwIhEgKBTfZ2FhaBsYDS8VWnA8Go0FJIKeqyUTDw8EDHBpSwUUFQ4UFhcYDQYFfkoFFxEQDG8KEAUZlEeWGBIakw4FG1STiBoYBRwdBR4fHgUdHKBEBSCnIR8iIyIfIblFu6ceIyQjtcXGCbLKzAUKzrq+wMLEVa+xs7W31kOTk6nkWuOf6Ea5QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actexit22:act act22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBHR2dDQyNCH5BAEAAAAALAAAAAAWABYAAAJOhI+py90RnIMyRUOxhDfzJkACdoXBuEDDkQFDi5go0MrKx16kns80b7qdELCgBYaEGWwL5nG1ePFiKp9A6kuYRNuho8vxVrrZivmMRtMLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +acthelp22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBCQuNBwiJAwiLAwaJAwSHAwSFIy+3ERynCw2PCQuPAwmPCxOZCxWdJzG3FSazBwmNAQKDAQGBDRmhBQyTDxujDR2rIy21AwWJDyGxCxmjAwmNDRihAQOFDxmhCxunBQWFAwaLCRahDR6rESGvDQ2PCRWdDRunDSGvCRSdAwWHCwuLDSOzHSmxDyKxBxCZBwqNHSu1DyOzAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAahQIBwCAgIBAPCoGAgOoeBAyKhWCwYDUf0CX1AIhLiJEGpBLiAAaRxdgYsl7Ybk8igBZoN5xmAdDxoanp8HyANISF8EBsiXBMjJBolBEQmGHFoRScbKHIKDykqK5lFAZRCnyknTaROLA8tq61OChgtKqyzQgEYEJi6UC4vI3LAASkbMBPARAEBdszR0sACEaPSMTIQM8W6KzNl3bo0NOJDdEEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actlock22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBHRudFxaXExGTERCRAwGDGxubPz+/Pz2/Ozm7Nza3NTS1KympFRSVHR2dNTO1JSSlKyqrKSipDQyNMTGxDw+PLSutKymrMTCxAQCBHRqLBQODJyanDQuFFxSJFRSJFRGJERCHExCHISChHxyLEQ6HGRaJExKHLSmbLy2fOzitPz23KSiZHxuNHxyNJSOTNTOnMTCjLSudKSaXJSKRJyOTOTetNzWpHxuPOTi5MzKzLS2tFxWXOzq7Ly6vOTe5Ix+RLSqdNzSpLyydKyqbKyiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBAgMEBQKEjI0GBwgJCgsMDY2XjwkOAgQBDxCLl4QNCaGCBBGWooINCAqqrBKgqwATFKaDFRYVtBMXsIMNGBm0GRADjQIJxKIaGxwdHh8gISIhGyMZzIwkGholJiYfJiAfJyEZISDbg90oKCkqKwcHKyooLC0f7IIuLzD2YMSQgW8GDRri+AFoUMOGvRsxUhSsQQPHvmQSchyQtEAHhh0WJHDQcJERjwsKDvRI0BGDjwgicXhQyCOjSgUKPO6AObIkIQESfmxk6REDT4s0bfaYpDNkT4VAha5s+TLmzEYtatwIOHAiDZIKNQAJYk9IjCFEisyoocFEB4UACtBpm0t3LiF4gQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actredo22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3Pz+/JTWbHy+VHTCTMTivPT69BxGDESuJDyiHESiHEymJIzKZAQCBFS2LFzKNGzWPDRqHCxqDFSqLHy2XESCHAwaBAQOBBQqBDyWJHyqZDyKFGSiVESeJBQ6BAwSBGTGPFyWPFSSLEyOLESGJBQiDAwiBBQmDCRGFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaoQIBwSCwaj8hkMcBkKpcBwYAwEDif0YLhwEUkFItFMkAwMBoOR+PxgHwjRDggamhIJpQ8ZbKGKOQLcgEFdhUWEYgRF3sNfhELBHALAhgZFhobRBwREhQdEAIEHpIKHwsaSJwUDQgQIJINARxKESESDQ0dgCIjSpAkDAwPco+ZSJAlJicnKHIAIrNHidOIQxunT0kpCyrZSCss0d5Fj6jjRonn6uvs2QZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actreload22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBCRSFCRSHBw+DBxCFCQ6FBwyDBQWBBxGFCxyLGTChMzqzLzmvHzKjDyOTER+RERyNDSqXNzy3LzivFS+fCyCPBQmBCQiBBxKFBQqDOTy3LTitES2dDR+PCxuJOT25KTarCx+PESSTCxKHDSeVCyKRNT21ESWVDSGPBQyDAQCBBQSFDRuLDSyZDySTGzChCRiJKSmpExKTDS2ZGzGhLy+vGxqbISChDSKRMzKzGxubDQ2NIyOjCQiJCwqLBQWFCwuLKSipERCRERGRHR2dAwKDDw6PFRWVIyKjCQmJFRSVBwaHKyurAQGBExOTBweHFxeXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf9gACCg4IBAgMEBQYHhI2ECAkKCwwNDg8QBAOOhAQREhMUFQgWBxcHGBmbggkaGxwPB4yDB6SbBJIKHQaqtY0eHyAhsqrDgx4aCiKpqoQHAyMjJBMKJaSxzAAHIRsmJgonKA0LHSmDKiuOBywRLSQuLyEwwyoxMuiN6iUzNBXy5jU2bsgoJugABBz95uXQsUMGD3vpPPgTpKIGwx4+HMr4kW4YkCA2hAzxAQSIECI+imBTwVIFESNHerRUgc0cEiFHkjiiyYzeDiVLdvLcySSkkKGEWiZVweSGkIHMmvQosoQlkaZOjvhosvKJjIAxoOAsgpRZkQNLnvSoqspAIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actrun22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAwKDAwKBCQiHNze3AQCBBwWFDw6NPTy9PTy/Dw2NKyytOTi3LS2tMTKzMzOxLy+tLy+vBQODNze5NTS1JyalIyCbIx6VIRyVISGfJyelOTq7EQ+NMTGxKyurGxeRLyKPOSmROSuVOy2XOSiTLzCzNTOzDw+NCwqLHxuVOy6bPzGfOSuXNTW1LSyrMSWRNymTOSmTKSCTPTGjPzSnPzWnMyaVBQSDMTCxPz+/KyahNSeRHxeLJRyTPzmtPzarOy6fJyajNza1Ly6vLyulFRCJPzirPTOlMS2pNTSzMTCvJyenBQWFNzKtPz6vPzyvPzqtOzGlOTe1AwGBFxWTLy6tPTm1PzSpPzutPz2xPTSnOTSxOy2dPzapPzerOzm5IR+dPzu5Pzu1PzqxPzy5Pz+9GRiXGxuZKympHR2bOTm5Pz6/MzSzBwaFJSSjCQmHPz2/AwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeEAQKIjIIDBAQDjYMFBoMHCAkKgwYFhwULDAUKCg0ODxCkBQgRnoUSExMUDxUWFxgZGpAbFIuGHB0eHyAhIiMkIB8lJieIKCUpJCTGIyorLCktKIUDpC4YLzAxIjIyMzQ1NhgdpJI3ODktJTowOyM8Ejc9Pj9AQUIEclAocCMIBQhDiOwgoaKIoCI+jBxBkkSJkCWemIyq0GSHCBVHihRx8gRKFCmpKhGaQqWKFYZXsGR5kkXLFgRUXBUqkCGCFS5AjnTx0sXKlyA6CRVgAAHMAilhxIwhU6ZFkBY5kgKYUoXBAzMKzixZ4AJNGgVm1KxhM0WpmQpUMtooaOPGxAM3Nw60oYLGjNYCbzYJOgAnRzNBJ95oPYQCgpJtkwzFoULlRuRPiy9fNhAIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actstop22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAASC/CQKDBwKDCwODNyKjPzq7My+vIxiXAQCBOSOjPz6/OSelNySjNyGhMR+fLRaTGQ2LPz+/Nx+dNR2bNRybMxuZMxeXMxiZLQSFJQaHFwqJNyKhOSCfNyCfNR6dMxmXMxWVMRORLQODOR+fOSSjNR2dMQ2LJQWFMRWTLwWDNSCfMxeVLwaFKQODNR+fNx+fMxiXKQSDOSWlMRSTMxaVMQ6NMxORMQyJOTS1MxqXLwWFLRORMxKPMQaHMxKTLQWFCH5BAEAAAAALAAAAAAWABYAAAb2QIBwSCwajwGBcikIHIsDQmFKNRwQT2EgoVgsGOCG4wHBIgmRhWRCqVQsF0xGYyYGNgoGh9PpeCQfICEic3UAAWgLIxwRJBsbHSUREyYYJ3RDAQULexGejhueESgpl3WaCxsqJKKsChEUKywtmFoFDC4vCayikzCyMbWHt38NCTKiHhUfMyzBdQIFKsodob0VNDWzwppuKxMRrx6iNjcitNA4bh+iEzkwojc66JkOOxcf7G35PBE9KS1MEUGgIQOIFfk++KjRw9wJgUUIZvhRoyLDFCliQDQisUWLGCJOeNx4hKCGkyhPGnqCoKVLl1liypyZxUAQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actundo22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3PT69MTivHy+VJTWbIzKZEymJESmFESiHDyiHESqLAQCBFzKNGzWPFS2LNTmzCxqDDRqHPz+/KTGnBQqBAQOBAwaBESCHHy2XBxGDOzy7HTCTEyyJDSqFHzWTAwSBBQ6BIy+dESKJFySPFSSNAwiBCRGFBQmDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMsBkKotMwYAwEDiXgYLhwD0gCFZiQKxNKBYMRqPh+D6G16y5AYnYIxBJAyF4AwITTAUJdBESD4gPFBV6Fn6ABBcJDIYPGEQZGhQbHAIdfx4JHw2VSBodGwWfAR4LDSALfkgYAQurBiAhICKfSSMkvQElGyYnGyi9Rxkdj4nOskUYyU9FpxnURikdGtjRKivdRKfQ2Inh5+jpRwZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actunlock22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBGxqbFxaXExOTEQ+RAQCBPz+/PTy9Ozq7Nza3NTS1KSipFRSVOTi5Hx2fJSSlKyqrJyenJyWnDw6PMzKzKyurDQyNFxWXMTCxJyanHRuLHxuLGReJFxSLFROJFxWJExCHERCHBQODISChHxyLHRqNIRyNHRmLLSqbKyiZLy6fOTarPz67Pzy3OzitKymZFxSJJySTNTSnPTy3NzSpMTChLSydKyqbKSaXJySVIyGRGReLPz23NTOnMzCjHxuPLy2vKSmpOTe5LS2tLSutHxuNHRuPMS+xFxWLIR+RDw2HFRKJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SDAQIDBAUChY2EAQYHCAkKCwyOjZANDgIEAQoPjJiDAg2iggQQp5gMBwmrDBESl6MTFKuoFQSjABYRF40CGAW8BRm7hQwNxBobHB0eHx4gISIjBdiEAhYFJBslHOHSHh4hBSHlxIUmJygpKissBiwtLi8pGjDqhBoxMjMuaNSwcSMFjhw6dnjYRyrGCh4ueviw4Q5HDB0/PjAUJCBCAwMIGiiggAEIBFk/FgYLIgRkggQkhxAJkqGExkYMFnxsIGRkSQgLHhRRWUjAggQgG8AsSWRBBiP6VrYMOfKIyaBDNwLo+HHSUplOSyDRqiEHjRkretRQkcLgxayNF0wksQGQxsSKMTIq0QpgCba/gAE7IhMIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appbook22:app app22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBDyGhCyCfFSWlESOjDyKjDSGhCx+fGSinGSenFyanEySjHSqpHSqrGympEySlBx2dISytHyyrCR6dKTGxHyurHSurHyytGSipCR6fARmZFSalEyWlBRubAxubBRydDyKhDSChLSytPz+/MzKzIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbFQIBwSCwaj8ikMhBQIpmCQdM5ZBIKhgNiugwkFAsCI7pNMhuOxkNBgBgEiAi3GkBLJpJHYgEpaClyREwVFhcSEhgOGQoMfgMaERtcARQBFRMYExZ6HB0FUYAekkIBHxqWFmlrC1haESAfG6MBGx+VFRgKYH0hInGRklO0ppYXCwwMWQiQHkwjgrWnFRdYZHIBJCTP0LaWGAcDW9jZ2nMAw9IWTOQkJSZMRsOV49nu8E+19PbmR7TY+1TovONH5V7Ag0QMBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbookopen22:app app22 22:photo:22 22:R0lGODlhFgAWAIYAAAQCBAQ2NPwCBHSurIS2tBx2dBweHPz+/Ozm1GxiTGyqpPz6/Pz69GSqpOzaxPzy5HxuVLSmlOTazPz27PT29NzClPTexHxuXLSmjAxqbFSinPTy9KyehNy+lPTy5Pz29HxyXNzWxKSahOzexPzy7IR2ZOTWtESenPTy7KSWfIyCbKyijAQGBDyalPTu3KSSdDSOjJyOdCSGhPzu3OzizJSGdPTq1PTq3JySdMy6lAyKhOzWtOzi1OTOrJyKbMS2nJySfMS+rAwCBNzOrNTCpNzKpJSGZKyafLSifLyylIx+ZHx6ZDSChAQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAWABYAAAf/gAABAoSFhoeHAAMAiI2IAAQFjI6EAAaJkQeTjwAICYkKBQcLm5WdBwyfhgChB66bp64HCQC1lQ2irqQCAA4PowsLEBESE4wAuLIHFAAVFr+uDBcYxRm1GrmuGxwdFh4Mrh8gGCET1gDYyhsiFSMkDAsMDCUYJhvnJ9kHKCnODwwfPlBQsULCPRYAWogK9sHFiwoOPEyQh0JFPXO1YBSYwBEFghjdHkwQOYGgwQwIZRR44GHGDBogabhAsYEEihrUMAIoUMCEDRs3HODIYQHFA6MPcJA7KICFjgw7eIzo4cOfiwc/gKwIUm2SkKdDdlDt4AABDaU/iIRwwbTSUyJFOow4S3Hkx9oNDDZgXPU0h1wcSIgEGUw4ibVET5WoWMKksePHpdxmyKADAEIWly9HJtQkQJMmlAgZCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +apppencil22:app app22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/IQCBPwCBPyChMQCBPzCxAQCBPz+/MzKzISChKyqrDQyNEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARYEMhJ6wxiEMtpIAWxddwXiqRlikSQeiAbuC+wirNR322gv7zcLobzDU+9XypoBBKTR1lz+RTWDgip8nUwZK1XLyIx5XoVicX2RUAo1DVKi7GOBxjxfNwQAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +apptool22:app app22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBISChFxaXNze3NTS1Ly6vKSipNTO1Ly2vNza3Pz+/MzOzOTe5DQyNOzu7MTCxGRmZMTGxPTy9Ozm7Hx6fPTu9MzGzGxmbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAW1ICCOZGmeaEoGbBsI6joMRGEcbQwESDIrtVtAF1gwDLNaAmfKiVgLBJKgwB1KxQZrBHU0FAXmavFoQLYiB6TxFXMj5AZBwnJI2I3wcNWALyYEcgoKXxRhOHs7XxEVCwsWFgoUDRYUFwwQB25ZCxiNjo6GkwUXN2NsCxEYqhUHoQ0MEglYRQQXErcHrI55FycuB2YSmoyOBTEtB2sXuhU6XAENC2a6z9AKCwq+1tAN3E2J3ySkIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connecting22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxOTi5AQGBNze3Ly6vISChNza3FxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAAR4EMhJqwzY6omD+MNGdR8YilNZnug0qGzrqrL1lnV1fyJBVB6VQEMoGH4ADGwQkxQPBwMiKGA2J8VEAnq0tgiKg5aL/C7C2gTjKCM0zowDQ8tuNQznNL7cKzjOUQsNfER+gguIg19+Pm6ChBZFDmWNi5M5FIyYFHQRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connectno22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBERCBAQCBPz+/MTCxOTi5Nze3OTm5Ly6vNza3ISChFxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAARiEMhJq7046827/+AVCKE0Dh9BAGdaGISAToFGFMcBU+11I4hDYseSZQiKwwKoI/QwBIYiuFDCZseGdIlYEjUNg1SpY6w2N4cUIW6cjwW1lsFwo+MqgtZuw0/ydw5vH34lBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +connectyes22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBKyirPz+/KymrOTi5KSipMzCzNza3OTe5Ozi7MzGzPTq9OTm5ISChMS+xFxaXNze3GReZIyCjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWLICCOZGmeaBkAQpoGg7C6JizTQT7CxPwOwFWgYPChYIXkIHC4uQKGAiKRKCyNpxxUUVViVYNFLkqtLo+DAkMMLXQPXwAy2WCTF4544FGtKuwPDhB6DnxuUmyCcXIQhV1uYoMuEAcOBxEKCHg6TzGFCJUSizuejROKOAM9OY2SnUU7nD89NCcDsLUnIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devscreen22:dev dev22 22:photo:22 22:R0lGODlhFgAWAIcAAPwCBAQCBPTy9PTu9Ozq7OTi5Nze3OTe5Nza3NzW3NTS1MzOzMzKzMzGzMTCxMTGxOzm7AwGDBQOFBQSFCQeHCwmLCwuLDQyNDw6PERCRFROVEQ+RDQ2NLy+vKSipISChGxqbExKTOzu7OTm5Pz+/GRiZMS+xLy6vBQWFLy2vCwiHFQ+NMSmfNSyhIxmTDwuLJx+bLS2tCwmHMyyhMyqfPTqpPzyvLSWbLSWfPzitIx+ZDw2PAwKDCQiJGxWRPTmrPTerMyuhPzqtPz63PTWnPz6zNy+nIRiVDQuLKyWbOTanPz21NS2jNS6lDQqJHRaTPzmrPTSnPzyxOTClPz2xNSuhPTqxPzuvOzSpAQGDOTKnMy2jOzSrPTu1NzKnOzOnBwWHJRuXLSWdPTatPzqvNzClCwmJOzSnOTOnPTuxOzKlOzerOzarOzitJR6ZNTO1IxmXPTWrNSyjPzOjPTSpLSehHRqZOzirOTCjPS+fPzGhOy6bOzKhGROPMy2lPz+1PzmtKRyRHRiNNTCdPz+zNzCjEQ2NKySdDQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAj/AAEIHEiwoMGBARIqXMhQIUIBAwYQIFCggIEDCBIoULBgAYMGDgIIDEBAwMSKBRBk3NjxAciQIwdACBBBwgQKFSxcwJBBwwYMHBx0EAmA5EwPH0CEsCChoYgOQ0cSGCHhA4kSS5syJGDiBNEAFVGUKKEBAwWFFM6SNJHi64gDFEKE4FBBggoKK1i0cPECxokYXw0gsECYggQZM2jAqGHjBo4cOtqOxLhDAg8ePXz8ABJEyBAWRIoYOfJipEoMCZEkuaFkSAslS5jUGJKkSRAnRREo0JDwCZQoTKQAmUKlihQrVa5gKZ1lI+oAK7QM2cJlSZMuU4Z4+TJEx0iNOwKAggkjZkyOFmS8kClzpcUQLRRGbjRD4MgZNEzSqKG+ZgobI2248dUbDDDwABzcxSEHEFpgEcUcdMRRhx1fFejAAx0cgcYdSxiBRx566LEHH0d8QFRRNC3Uhx985CHEH0MAEkhCBxWkgiCDFEFIEYUYUmONMhyCRxVH/PgjBYioYJAdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editcopy22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFPz+/DQyNISChDw6PMzKzMTGxERGRIyKjFxaXMTCvKSmpHR2dPz6/Pz29PTq3MS2rPz69MTCxFxWVHx6dJyWjNzSzPz27Pzy7Pzu5PTm3NTKvIR+fJyGfHxuZHxqXNTCtPTq5PTi1PTezNS+rExOTFRORMyylPTaxOzWxOzSvNze3NTOxMy2nMyulMyqjAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbYQIBwSCwahYGkUnk0BgTQ6IAQaBKfUWhBYKhaAU+CgXAQIAyChLeJzSIQhcH6GFaM0QtGY5kstqEODw8QEQELAhJTc08KBBMEFBUWDRcBE1pca20SGBkaEBscAY5maFRIAgoLHRQRHh8gIQFlZnByqA8ZGSIQIyQjJQEmYgJ5p2ACrK4gJx4gKIZZAgdeAQ4ZI9kjKSor0AwEjeAs1S0cHAslLi4vMDDRWeRIfEsxMeET4ATyVoYLC5fizXEiAR84BeMG+pEm8EsAFhAjSlR4hR6fLxiF0AkCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editcut22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBAwCBPz+/OTi5JyanOzq7DQyNGxqbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARbEMhJq704gxBE0Bf3cZo4kRJqBQNRfBucyudgvJS6VaxLzyMa6/bLiWA9HOg4VIIkL5vzuRkcpkvRIIAorphJLzBW84WEuRZWp6uaT7J2Sh1Hit3OY/ZO7WvsEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editdelete22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAASC/FRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanPz+/Ozu7BQSFCwqLDw+POTi5PTu7MzKxIR+fCQmJPz6/Oze1NTGvPz69Pzy7Pz29LyyrPy+vPyupPTm1BQWFIQCBPwCBMS6rPzSzNTOxPTi1NS+rPTezNzOxPTizOzWxMy2pOzaxMy2nPTaxOzOtMyynOzSvMyqjPx+fOzGpMSihPTq3OzKrOTCpNzKxNTCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf8gACCAQIDBAUGBwgJCgsLgpCRAAwNlZYODxALEY+SkAMNEqKjEw0UD5yegqCjrRMVEqidkgWhraMWF7GptLa3EgEWFRSOnhW+vxgZEBqzkBvItxwdHryRCNGjHyAhHSLOgtgSI60c2yQjJd+eJqEnKK0hJCgnJSngAO0SF+8qEvL0VrBogW+BLX4oVKgIyMIFQU8KfDV4R+8FDBcxZBREthAFiRIsOsygsVEUh4Un3pGoUcPGjZInK65QicPlxg8oX5RwqNJGjo0hdJwQ6EIkjRM6dvDYCKIHSBc1Ztjw4eOH0oIrsgIJEqSFDBo0cuTgsdSTo7No0xYTZCcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBISGhISChHx+fHx6fHR2dGxqbGxubGRmZGRiZFxeXFxaXFRSVIxSLPyuXMzKzMzKxMTCtExOTPzqrPz+/NTS1MS+tOSaVPyWNPz6/IxeNPzavPyKBNTW1PyCBPyGBJxmNPzOpLx6PNRqBMSCRNySTPyCDPSGBMxiBKROBHRydPSylOyydMxmBJxKBAwODPS2lPTq3OyabJxGBPTy5PTGrOyOXPR+DPz69PzmzPzevNxuPORqLMReFPzy7MyCXKxiNIRKHBQWFNTOxPzixJRaPFxONHRqVPz27PTy7PzStCwqJDQyLJSGdIx6ZPz29PTu5HRmTLSKbMSGZHROPFxKPJSKfJyShKyehMyuhDQmHEQuJJyOfLSijMSynMS6pLSefDQyNHx2bKSahLyqhLymhOzi1FRGNIR+bNzKtOTOtOTKrOTKpLyedAQCBFRWVPTq5NzOvLyunLSmlNTCrOTOrNzGrLyidMS+rLyynKyijLymjLyqjAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gAAAAQECAwQFBQYHBggJCgsLDAwADQ6CAQ8QD5ydEJ+gERKWE4ICDxSpqhWqqhYNFxMYphCtqaytGRoXGxgcggSoth25u70eH8APFR0VzMzNziAXIRjIvwAFwq3EqSLUGB/iI4LathS4JCXVJh8nKCmCKrXDFCss1eIfLS4v8ssdmgWsAGNDDBnt3s3wJ+jAtlUhaNSwccNEi4WCBBl4SAHHihw6ZOzg0QNjRgAG6KXK4CNEjBU/gDQI8kLISQAIADobAoMIzCINjLw4YvNkAno4kCRRUuNHESNLmDRxUjSjAlRPfECJImUKlSpMrFzBIqWqoKtJaWSJomULAy5XXrp4+QKGYcYFoCBEWRImi5gmY7CQyVLGriAGD2jEMHMmCxc0Xb6kUbOGTRs3N988gLM4jpw5Y+iwqcOGjZ07mE8yiGABz5c8c/Ts4cOnDJkybS7fdMO7t+/fvDMaCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQWFDw6FHRuFGRaBFxSBAQCBAQKBCQiBIx6HPz6/NTOfKyiXDQuFOTm5Pz+/Ozu7PTq5Pz63PTyxNTOjKSeRExGLMTGxMzKzNTS1NTW1Dw2NKSmpKyqrKSipJyanNzWlLy6ZLSuVIx6FISChIyKhJSSlCQiJLS2tDw6NDQyNCQiFCQmHBQSDGRiZHRydGxubHx6dGxqbFxeXGRmZFxaXCwuLOzq7KyurHx+fDwmFEQuFCweFCQWDBQODBwaHBweHKSinJSWlOTi5JyepHR2dDw6PBQSFNze3ERGRIyKjIyOjISGhPz29Pzy7MS2rMzOzFRWVHx2dHxybDQiFPz27Pzu5PTq3PTm1NTCtJyGdHxuZHxqXPzq3PTaxNS6pFxWVFRKRNS2nPTi1PTStNSulNzOxNSynMymhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwABAgMEBYSLggaOjgcICQoLDA2Pj4MGDg8QEZ4FDxITFBUWFxcYGRobjQ8cHR4fCQ8gCyEiFSMWJCUkJieNEB4dKB4pKissK8wrLS4vMDHBAAYQHx8dFx0fJDIzNDU0M+IyHzaNNyg43Ng5Ojs7Ojw9Pj9AMkCNDiZB/h9CSOx4QLCgihItqBkYgqIDESElitAYWJCgkQcXjjRCgi1Ihw4BB5LAQOLCgyQYHihpUU3DBw5ElpAgAYNixSRJjKjQaECDCRPZPDB5IbIGSQwKLnh4wbInLA4kmJB4oaPiAwVNnER40hRK1BIAaVatUZJEFCkmpmjgCeWDCalFe4q4oFKwSRUrEa5gycLzwq8lUnPQ4PEgSpYcUZ5o2cIlS1O/JHLEDdfjQZMIVrpgweLFy5e+M6WSmBGlxYMYYBRzCaOFi5imHWBIfOEiShLTVjaP6eyFTBmN1TA5OvLDjJksWb58OVMGDRqWjAYdmU79SIvpjqJr104nEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBFRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanOze1Pz+/Ozu7BQSFCwqLDw+POTi5MzKxPTu7LyyrIR+fCQmJPz6/Pz69Pzy7Pz29OzaxPTu5PTq3PTm3My6pPzu5PTq5NS+rPTm1PTi1PTezOzWxPz27MyynOzSvMyulOzOtOzKrMymhOzGpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbpQIAwIBgMCAXDAZFQLBbCqJTRqFobjgdkEYFKowPJZEyeUBqVR/crHDTKZYplovZKCW84+YKZZNZSBXl6EwEEBhVPXxZihGMaGRscdkIdg4QeEnVfCH2OHyAhIhuUAAiXZSEhIyQlJqWnjiEnKCWupRWoYyEgJK0SKaUKjam0JCorLMFfC6iqx8giLa/MGAsT1wsuCyULKwssC9RSzdkfCyALKuALLQsvpeXYIQso3gsiCzALMfENC+dGcMNHUAY/f+jq3ctncMYCGggFrsvHcEGNh/EyPFmg8cmrJxAVkVO0EUDJklHoBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +edittrash22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBERGRExOTDQyNISChBQSFCQiJCwuLPT29Nze3GxqbDw6PGxubHR2dJyanLSytJSWlJSSlOzq7Pz6/Nza3Ly6vFRWVBQWFIyKjMTCxHx6fIyOjLS2tOTi5PTy9OTm5Hx+fNTW1KyurKSmpJyenExKTMzKzKSipFxeXCwqLMzOzKyqrMTGxLy+vHRydBwaHNTS1DQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb8QIBwSCwaj8KAMoA8LgUDQsFwQByay4RiwWg4GA9IRGk0SCYJSsUCsVwwGQ1EsmESD5xOp+L5gDwhBRIZDhcDdkMGDgEiIxAkJQ8Ok5MmAohDAQ1xJxUlKCUlEg0pKpiZJRoLCxmtCw1eURhOcR4rbQ8cGRwLAwgGtBYTDywtGRKjvQTARgEZLhMcKC0OrQMvAirMRc7CHCTU1g2+20TO0NIn1RwDCya/wdHT1Rnt5LToKOq79trx0tR02YPX7Jm8fRxMOIhSLhOJE/LCJSTlr5kFEBQsWDiR4UGGBgsuHDg1BEYAfTE6oEBR4AIBAiS5yWBAAAGBAyaPGAgCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +fileclose22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBERGRERCRDw6PCwqLExOTFRWVHRydGxqbGRiZCQiJISChIyKjHx6fDQyNBwaHJSWlKSipBQWFJyanPz+/JSSlCQmJAwKDCwuLBweHBQSFGxubExKTISGhDQ2NFxeXFRSVDw+PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbZQIBwSCwaj8jkMSAYDAgEJbFgOBwQCUOAoJAaFgvGonHIBhyP5BcSgUAYDWxggD4WFmx3e3HQngkSRgYMEBMUFG4MCId0BGlEAQeEhocVDYcUdBYKF0QCB3gRlJgUAQEYBBkaRAMbDZMMpAYcT46rQwMJrgsdC6QcfwoPnUMOBgkIV6SHHg6bw0QEAQYfBpggBZjPGsRD0gEchxwCIR6HChnQRQ8DIU4DTR4Em+ncRw8O+fmoXPXdRg+gQLFgIYM/KRIkoDP4QMKFf0o0aBAh4qGUixgzCrETBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filefind22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQSFJyanLS6vLzCxISChNTe3OTu9Oz6/Nzy9Nzy/NTy/OT2/Nzi5Mzu9Lzq9KTe7LTq9PT+/Pz+/Nz2/Mzu/Kzm9Jza5HzK1LTi9PTu9IzW5ITO3FxaXNT2/KTi7Iza7GzC1LzW3FRSVMzO1MTq7HTS3Fy6zFS2vKzm7Lze5MTGzHzS5FTG1Ey2xEyyvJze7JzW3ITa5FTK3EymrGS+zFxWXKymrMzi7ESirEyqvLSyrKze7MzOzMTCxKSepAz+/NzW3MzKzBwWHLzS3ERCRAzi3KyurNze3MzGzLy2vLSutCQiJAyytHRydOTe5MTGxLy6tLyqpKyelJSCdOze3NS+tLyupLSmnKSOhCwuLPzy9Pzu7Oze1OzazOTOvMyihOTi5PTm3Pzi1PTazPTWxOzOtNSunDQyNPzy7Pzu5OzKrNzSzNzGvNS6rMyynMymjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwGFhYOIiYQBAgMEAwKHiokBBQYHCAkKCwwFAZOEBQ0IDAsODxARCZ6gAAEGEhMSFBUWFxgZCJ+TjBoMEpkRERscGBGRih0BBAgeFBQOER8gISEfIruIIwEkCCUVwhcgJicoKSrZg9srCRkRGdMsLS4vMNiK2wIKMRsbMiwzXtCocSydIBs3AuCIwIFDiBMucugAoWvSiB2VNPDg0ELHwA0MkCXr4aNSggg8NoDIQOFHgBtAkgURMiDAEAFEVBCJFKCIkSMGOyDRkETJEkOFmABoUsRJQkQdnkzQACWKlBtTplBR6qopxkFRJ0ytYuWKFCxZtBBq+hRA2AlbRrh08fLlCxi1a51g+dQhDFwuYsaQKWPmDBpKXgNETaNGjJgyhNfcVdTTiWI2XpK0cePmzRk4YA5T5otGixY0qFOXbgXAQCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filenew22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBExOTERCRDw6PCwuLBwaHAwODAQCBOze1NTW1OTi5Nze3MTGxLS2tJyanPz+/Ozu7OTi3BQSFCwqLDw+PDQyNFRSVPTu7MzKxLyyrIR+fCQmJPz6/NTOxPz69Pzy7PTu5Pz29Pzu5PTq5PTm1My6pBQWFPTq3PTm3NS+rAwKDPTi1PTezOzWxMy2pPz27PTazOzSvMyynOzaxOzOtPTaxOzKrMyqjOzGpMymhPTizOTCpNzSzNTGvMymjMSihCH5BAEAAAAALAAAAAAWABYAAAboQIBwSCwaiYGAYEAgFAqGg/Q4DCASCsTiymgcHAcqQLB4mM+QiIQBppLPcMjkwQ4bB2X4maKgt4sVCHpnFhQTElNFE3mDDxcYGRp2RBuMgxwIHX9EBZZwHh8gCBmTQ52NISEiIyQlpUImng8hHyInKAgprwAqgnC0IKwrLLpGB4wctLYkwy0uuwd9Z8AnJywsLcVFx2YcL7UnJCwwLTEy0GXJoSgrCCwzNDTnxgjeH9UrKzXwNDY36LRGhEOwLx4NHDmgJbh3QoeOgv127EhojEeHDj16pEhRQoZHHzl+QJNCsqTJSXaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQWDCwaDDwmFPSubPzGhPzCfPy2dOSmZPzKlPzSnPzOlPzKjBQODPzChPzWnPy2bPSmXPyuZOyeXIRSLEQuFEwyHEQqFDQiFCweDKRuPFRSTPT29PTy9Ozq7OTi3Nze3NTW1MzOzMTGxMTCxLy6tLSytKyurDQyNMzKxOTm5OTi5Nza1NTS1MTCvLS2tLSyrKSmpJyenJSWlIyKjHx+fFxeXBwaHKxuPMzKzLy6vIyOjHx6fDw6NPy6dGxubLy+vISChCQmJNza3KyqrBQSFLR2RKSinJyanGxqZAwGBJSSlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeDAYqKiIeLj4wBjQCMhY+NkoiLk5qbhQIDoJyGBAUGBwgEo4MECQoLDA2pDrS1tKQPEAwHERITE77AvxKqhAQNDA8UFRYXFs8YBAQZGqGPxw0RGxwdHR4eHyAhIiMkJSYnKCgpBAYPEhcqHyssLS4kLzAxMjM0NTY3cBA4UCAHBw8gVnhgEcKFjhc7UPDj0cMHAAI/KFgY4YLFio/jRpTYsW8GDyCSCEQw2DChOHIqgsCQSEPIEEEEJFhAoUNECCJEyOk4d6KIyRtGcB7hIJKjixEjHu4oimSGEIs4d8IIUoKECnNB0ElMwkNJJgBLlJBAcQKGiR07KGAURVGViY0mhIwwSTKjr99+THjUoIg0r48hTRIrRtxkiOMhDgrZCQQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileprint22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBFxaXDQyNFxSTPTizOzi1FxORDw2NExKLPTi1Pzy9Pz6/FRWVPz29Pz2/PTy7PTu9OzezPzu5OzavAQCBPzy7PTm3OzazOzKrPTu5FxSRERCRGReXPTq5Pzu7ExGTMS+xKSmpOTKpPTq3JSCDNzSfHRydLyadOzCjOzOtOzSvLyyTMTCxKSipGRiZFROLPz+/KyurJyenJyWnGxmbLSabOzClOzm7LSutJSWlJSSlJyanGxqbNze3OTm5IyGjNTO1Nza3NzW3OTe5IyKjHx6fMzGzMTGxMzOzNTW1IR+hISGhKymrLy6vLSytERGRGxubKyqrLy2vLS2tDQ2NEQ+RASKBAT+BFxeXHRudAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAgOEiYqEAgQFBgcGi5MICQoLmAQDh5OEDA2YCw4ODxARApKUCaGYEAsSCRMUnQysCwoVEhYXGLOLCBCgDqK5GQUXGooCAhscBB0euBUZEAUJvQgIgx8gIR8iCSPiHuIFEREDJCXaANwhJhsnKCnWERcRKiopFCvsBywhQrRwQWGAPAz5EhpQ9wIABRgKYsiYMTEEDQocatiwkUIEP18fbkCAAcMBjhwzdOyQwYNCgBMfKJSgMItBjxs+btwgCSGGjhw/ZoRgQKGZCRMUPgABEgSIkCE3SZok8qNqkR85NtDUEcPIkaVAkCR5SrJBDCVKlmzQ6pCCiRlMTJo4YUH3K5AeMBYYWctW0BOaUH60cBJFypQmII6wyEpFQBVFMSm4UAI3hJUrOGh8oOJrklYKWIromJGDR99Ogz5j4ZGlM+pEnwmBCwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBGxqbAQCBLy+vERCRExKTHRydIyKjMTCxFxaXGRiZFRSVFRWVPz6/Nze3Nzm5Pz+/JyanDw+PExOTHR2dMTGxBQWFLSytHx+fISChOzy9Ly6vAQGBJSWlMzKzAwODJSSlHx6fIyOjOTi5DQ2NISGhGxubCwuLOzq7ERGRFxeXNTW1CwqLPT29Dw6PGRmZKSmpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb/QIBQGBAMj8ikUDAgFAzKKCBwQCQUCcICKh0SEAhGw5EIZAmBrgCxeDQgcDJWyz0GIggJfL+XGwQJRxNgC3yGDwwUFUZDFhdthnwMGAZNQwEZFwQakXANBBQbHIIdERIBnRAOiR4ERx8gsSEMBBmGCyEGG3YGBwcgIr8UCwQHECOgG4xCtRkEJAvBJRklJgkSFBQeJ68hJiEoESkFKiEZIbkGARsLlwEGExENGhorGSkpFAYm66NDLAECpGiBYsUIFA8wLHBBQMWLVkdUCFCwaYVFBOymkVCgYEMgOykEpICBccMBAhhELFigTEqAAgIIwCiQ4eRKDyS6EAlJIAI0EpaudF4iIKDAAn9CkRT5eMROEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +foldernew22:folder folder22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBNzaTPT2FISCBCQaDPz+BExKBDwmFPSubPzChPzCfPy2dPz6BMzOTAQCBOSmZPzKlPzSnPzOlPzKjBQODPz+rPz+3PzWnPyuZPSmXNyaXPTyhISCLIRSLEQuFEwyHPy2bKRuPFRSTPT29PTy9Ozq7Pz+xJyanDQyNPzGhMzKzOTi3Nza3OTiVBQWFDwqFKxuPOTi5JSSjISChHR2dGRmZFxeXPS2dNTSzNTS1OTm5KSipLS2tLSytKyqpIyKhGRiZNze3NTW1MTGxMTCvLy6tIyKjCQmJMTCxMzOzMzKxJyenHx6fLR2RLy6vJSSlHx+fDw6NLy+vIyOjAwGBGxqZKyurCwuLBQSFJSWlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLjI2MAY6HAgOHBJYEhJCDBQaDmgcICQoLB4MGDA0OAQUBDg2cAAcPEBESE6QUuQasFRYVq5SxCRcSCggYGRjIGgYbFs8bHIMHExIJGR0eHx7cB83PFhsDDuTUEyAhIiMjJCQluwEmvsAnKAcp1x4qKyUrLLupWrByxcnFiwQIYIggEaNEiRgBZMyYQaNADRs2REA6cCODBxw5+OnQgWMHjx4+BND4MQOIg1gI0gUREkTHiplDhhApEoCGkRlHBL3I8MEHEhz+WAhJogTJySVMfthwIehAExE5jubAkYQpESc8fOx4AiXKNA8+ekhBgqSpzh5hPHcsmVLjpSAqVZBY6VGkiJMiPQKLnTvjCiEsWU4o3nGC8YksMmT8YCmC6iAXKLRc2cz5yGYtR0JjKWQgEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mailforward22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBJR2dLyijPTixPz69Pzq3Pzy3Pzu5PTu7Ozi1LyelOzavPz+/DwqLLyafPTmvPz67Pz29Pzy7LSWlPzmzPz6/LyajPTitOTSzMyurPz25PTatPTi3KyOjPzuxAwqVDQiJHxiZPTetKySlPzqvPz27BQ6bAwmTPTexLyinNzGxDRunPzy5KySjCQ+ZNzq9KTO7JzC3Nzq/Ozu/LzW7FSm1BR6vGSWvFyq1AyGxAxytAx6vBSKxAxSjMyujLSunES+5BSi1ByGvAQCBNzCrOTaxNTOvMS6rKyelCx6rBx6tBQKDOTWvPzu1PTq1OzezAQOHAxGdBROhAQGFPzy1NzOvIRqXLyynOzarPz21Jx2XPTWrLSShAw2XKSCbPzuzAwePAQCDPzyzPzqzPTmxOzWtAwGBKyObOTSrNzGrKyGbOzatEQyNKyCZOzWrOTGpNS2lCweHCQaHCQWFBwSFBQODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBhBwgQKFSpY0HgBQwYNGzh0mDhRAAUPHziACEGBpYgRJDiUGEkSwoCQJk6opNASRQoOFETQJDkggwoOJlYApcCihQuVL2DUhBDjhIqjJmRwwDCDhswaNm5MjYHjKggOOU7o0CGTA9gdYknG2KCCBw8VJVL0uBgihAUfP+CSNGCjsI/DiBPbAMJBsEQbQYQM+UG5smUiRYw0jlvYxhEkSYyIHm1EyRLTTH40EZvAyZPOR4pAmU07ipIkUKQ0mQIhAZUqVq5gKXzkSBYtyLVEyd1ki8QFXLp4+WJFQowbYLJnD5NbzJiJCjaQnhnvpYwZM0/OPFlvQ/f3iQvQpBlvQc0aCWy4VKnCpY0Y5yQxgEYXZFjghgwZUOHGCW90YQEccUwloBwGyjAHHXUoSAMZb0xhx1QOoMHDHSfIwSEOdTjhAQ1d4MFbTQ6Q4MYacrzxhhx04JCHHhvQsMeLJPHRBxpr+LHCGnusgccfgKixQR1ATtTBlDDAEIggggxCCCGFbLGFHVFKZEdAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailget22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQ6bCQ+ZAwePKTC5Ozu/NTi9GSWvAwSJGSu3JS+5CR+rAQOHPTy/AyKzES23AwOHCw+bOTq/BR6xES+5AwmTBw6ZMTW9Ax6tByi1BRGdAw2XAQCBDQuNDRupKzS9FSm1BR2vBym3EzC7CSGxBROhNTW1Pz+/OTm5NTO1AQGFNzW3Ozq7Ozm7IyKjJyWnMzOzNzq9Nze3OTa5Ly6vCQiJGReZISChKyqrAwqVBRWlOTi5MS6xJSWlNza3OTe5Ly2vGxmbKymrIyGjMzGzISGhKSepCQmJDw6PHR2dJSOlPTy9MTGxLy+vLS2tMzKzLSutMTCxLSytKSipJyenKyurJyanCwqLCwmLCwuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBhgIBA4SLjAABBAUGBwiNlY4FCQoLDJaNAQ0ODwsQnYwREhMUE5ylFYYRFhcYGRgaGxsDHJUdFR4SHyAhEyIjJCUcuo0cJr0nExihxgwoyYscKSnMHicOIw4lKissLdWDHC4vMCu9McYqMjMyNOUANTY3OPEoOTolDCszdrSgwaMcBxs9TMxYOCMHBx8zfPj48QNINQ5BbMBIIUShDIUoTAhR94PHPEEHbQwZckOGjBQviMxYUWQIDCMmdXE4gqRnkiFETAxR8iKFjJU2evZEdmLJkgJIbqS4wXJIUapImj5FtuSEVyRVV1IVi4RIChhEkLVAgcJHEqVwVJUmYdKkiRNkALMRecKECRG/ff8CEQJFCA5kMKJEoUHDCQ/HkB9LmWKECpUeyKoIMSLEyosen0OD7iH2xg1dV7BkqXGlBpbWNTq4Zn2khu0aAAwEAgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mail22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBDQyNCwqLCQiJBwaHBQSFAwKDAQCBDw6PPz+/Pz69Pz27PTy7PTy5PTu5PTu3PTu1PTq1PTqzOzmzPzuvOzitPTmvOzivAQGBDw+POzevPz67Pz25Pz23Pzy1PzyzPzqvOTavERCRKSilPz21OTevIR+ZExKTOTi3JyanLS2tPz6/Pz65KyihJSKbMS6lExOTNTW1JSWlJSKZMSylNTOrNTKpFRSVPz29MTCxPTmzKymjIyCdOTWxOzexOTWrBQWFFRWVOzu7MzKxJyalOzatLSulMzKtOzmxOTarFxaXKyqnPTmtIyGdIR+bOzetOzixBweHGRiZOzm3NzWzNzSrOTetGRmZOzizOTexOzm1JSKdGxqbHRydJySdHR2dOzapHx6fKyijOTixCwuLHx+fFxeXERGRDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLAQECjwORAwSUBZYFBpkHmwgJCgsMDA0OD6UQERITFBMVFhcVGBkangq1ChsLGxwcHQ0dHR4fICEGIiMSCbS3uLq8wCQUJSYGJygpKhQJKyvLLM4Nwi0uLwUwDQsxMtmeuQveHR8UMzQ1NgU3Dgo41jk6ns0cKOzgYaOHjx9AgjTAUUvIECLZNmxoUISHkSM9KiBJQkCJA4kKEoBQoWJJAiYtmjh5AmVCsCJRpHzckKCCySlUUvBYUqUHDysSPnxIEuXKA5pPRiRwxwFLFhRaIEDYUoEChCcDuECoOWKFuwW7nHkg4WELkw8/BHRRwESpt10dU8SSHevlRxIBX6C0WBE27q8GZMkKbTADjIAwYlb4GLMYShYoPTRo6FGiSJEKPyzMIFMmzJcvXbhwkSLFjJkbQW6cOHNGhAgEAdAsmk27tm0ABgIBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailreplyall22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBLyejPTixPz29PTu3Pzu5Pzy7Ozi1LyelPTavPz+/DwqLPz67PTetPz69ERCRLSWlPTmzPz6/OzexLyajPzqvDw+PDQ2NMyurDQiJPz23PTatJyenAQCBPTevPz25LSajOzq7HxiZPTexPz65JyanBQ6bKSmpBwuTOTi5OzaxBRCdHySvGRiZHx6fBQSFERGRNzq9IyOjHx+fGxqbPzu3BwaHFSq3Aw6XAxKfPzy3Gy63ByWzJzO7Mzi9OzavBRytAx6vCSazGRKTPzy1AQKHBRGdBRyrDy63ES+3Cym1CR6rBwWVAQSLAx+xCyCtBRmnPzuzAQWLAwePPzyzKSCbAQOJByGvOTWvPTmxBQODFQ6PPTWrPzqzOzatAwGBKyObLSWfPTivKyCZEQyNKyGZOzWrOzWtOTSrOTGpNS2lJx2XDQmJCweHCQaHCQWFBwSFBQKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpkzGjhAoYMGjZMpMghQgcNFjh4mODhA4gQGkSIHAmBwAgNJEpo8KDSxAkUGjhMSEGz5gUVIiKs2PmBRQudHiwQpUnAxYsXImB0aBqjBcuoU0fKmPGChgUNH2qIqGHjg9u3bicWIFs2rYgbNnDkyGFhb8cccQ3ouJqWQo0dPFr0WMy4h48LFj4gsKriB5AeNngEaSGks+chPnwQOXFAh4oXRYxk9nAEyY7XO2wksWHDx5ATCDIoUXEBsYclTJo4cWJhuIjhSXacSPBEiZLMQY4wgRKluvXqUpyIsDElAxUqVaxcwcGCPQuWLOixaNHCZAsXBU+oqKDSxQqULF6ifNmyn/8VMOtxwcAK36kQRhdJQIFFEmKM4eCDYGyhhYAEkqFEGSuYYcUZLaDxXRpqSNRCEu6twYaFZXTQhgRd2NCCG9918AYELTjoXgNuKAFHB2RQEUYHVbQQRwlUpPHGGFwkyQUEDsgxx4lh9BhCBy2U8UQJcrSg5JIQ0FEHG3bc0QGYK+CRhx57PEGlkhM9sAEffKTQhx9+/AEIIIGoEUgLLRRFR0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreply22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBMSihPTixPz69PTq5Pzy1Pzu5PTq1Pzy7Pzu7Ozi1LyelPTavPz+/DwqLLSajPTetPz27LSWlPzmzPz6/PTexPz67Pz29OTSzMyurPz25LyajBRCdPzuvDQmJOzexPTevOzq5BQ6bBwuTDQiJHxiZPz23Pz65LyinPzmvBxCbHySvAQCBOTi3OTq9CweHOzaxFSq3Aw6XGy63ByWzJzO7Mzi9OzavNzq9BRytAx6vBR6tPzy3AwOHDy63Ax+xCSazCym1CR6rBwWVOzizAQSLES+3CyCtBRyrBRmnGRKTPzu1MzGtAxKfAQWLAwePPTizMy6nByGvNzWxOzWrNzOtBQKDJR2ZNS2lPTmvBQODPTatKSCbOTaxLyqlAQKHFQ6PPzyzPzqzPTu1PTivOzWtKyObPzuzOTOtLSWfPzqvAwGBKyCZPTWrPTmxNzKrEQyNOzatOTGpJx2XCQaHCQWFBwSFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYuIDBQgYNGzh08DCR4oQPIDqEmDBhJQYRIzqQIFkSAoESJCKkDGFiwgkUKTpMwECz5IASKjqsSMlSA4sWQjG4qGnzhYoQSmF0iCFjBgmWGWhQrVHCxg2sOHLo2MGjB0sLYmsWQHq1p4wdPtqemGDhB1UDQFSouKHi7oQgQmSwUMyYxcQDZQWz2EFiCJEiRoyQyLzZyGIIB47YKLwDSRAiSZSoXq1kCRHNLBK8YGKjCYskTp4ogeKkt+8oUaBImZKAAxMmVKrctqL7ihTnz7FkAT5FC4cKFbZwadIFdxcvX8KLss8iJcoUBUcq2KgAJoxyMTy4jCFTxoxEHl2GLyCDncmWM2hUIQMPY2CXhhoTfTEcA2tgVwEba7Thxhs88FdBD/ZB8MUUHMJBRhw2sAGCHBKU4UaFc1RAhxnhcdhhHUzYAUIcFdxRAh4R5KGHinu4OIVEDqTBRx81xhGHHzD8wQYQetDRI4cTAcIHGWT0EQgZa1ApCBqDcBAID1Q94IEHLtBAAyGEFGKIIWqYYQYPYNZkQEAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailsend22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAIR6fIRydHxubHRqbHRmZGxeXGxaXGRWVFxSVFxOTFRGRExCREw+PEQ6PDw2NDwuLPwCBLSijOzixPz69PTq3PTu5PTu3PTu7OTi1KyelOzavPz+/DQqLPz67LSafOzetPz27Pz29KyajPTmzPz6/NzSzLyurCwiJPz25Ozi3JyOjPzuxBRGbAwSHOzexPz23KSSlPzqvBROdISavBxSdAwaLHRiZLSinNTGxMy+vBxGZNzu9BSGrAwWJMSyrKSSjFy61ETO3BRWfPz65PTqzHTK3ByqzBSWxEzW5AQWJOTWxBRCXOTu9BSOvDzO3ByavBRKbOzaxOzizKSWlCQ2TAQCBJza7BRWdNzSxJSCbMzq9BSOtCSKrAwiPOTavPzy3LymlCySrAwmPFRKTPzy1NTGrPzu1JR+bOzatPzyzCy61ByGpOzWtJyCbPTmvPzuzIS+3FymxCSuzBR6nJyCZOTWvKSObMSujOzivAwKDOTSrNzKrJyGbDwyNOzWrMy2lIx2XBwWFBQSFBQODAwGBAQGBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYqMDxAoYMGjZwmEixg4cPGzqA6BBiAggRIzaQGEkSwgAMJCKgnNBhQogSJlKGOFHTpgYUG0TsnJBCxQoSE1i0KErAxYsOJJRuuAAjhkwZM2jUqGnDBQoUHTbciIEjx4YNOmbs4CGjB8kCZlGAALHBx4+YcTcACcJDyFSJBo6iGNIhhQkiG8BOKGLkCBK6SSQisHoWhZIbG5bMYALECI8mTZw8gTL1QJQXZ6VMiUylSpUlVpoYaXLFtm0EGmCjwJLlA2O9MrRsccKlC8kEXr7AdgEmwtkhX2SQ2BIkjBiSYzSQr/nyhUKZLIrJJOcexvlEBV7IvCBjRkmAMzHOaufhxDvJBWiQISAFxUUQQRovJNeEGmu4JxEDbKQhXxsfuFDGGW68IQMcccgxRxUkNRDhC3R8QMQIdZwXQ11JJGFbiB+QYccHaaTxhgt13OFBDGTgkUdRDrhAhx5k2JjGCB/swYcXMXwAYk190OGHHx/4wUaVepTxByAaoPEkSQ5wwMEJZAZipiCDDJIHIYV8OZEdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1downarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBBQSFAQGBDQyNExKTHx6fGxqbFxeXGRiZFRWVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFxaXDw6PPz+/MTCxLS2tIyKjKSmpKSipJyanAwODDQ2NHRydERCRFRSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZzQIBwSCwaj8ikcslsOp/OgHRKlQoCgymRUDAcEIkwYgxWFBYERpHQcDwgEclEQmk8DhWL2kiIXDBwExMNGRoJaUkEEH8bEQ0cGgcWAksEHX8QHBKSHk1sfxMHH5ROBBsOICGkT2wiq1CIULKztLW2t0h2QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1leftarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ5QIBwSCwaj8ikchgQLJGBgfNZDBAKBirRekBMtYGEYsHIgsWNhOO7tCrShDU18Hg/CJAIG0o4wCUQcksTFBUSCRYSEnpUFxgIGQkJGYyNGggbHBaVjR2QCxEeWkITHQ4IH3tPFwEMA2ajAKUgqlQTTbFEE7W5vUgGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1rightarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNGReZAQCBMTCxGRiZMzGzOTm5LSytPTy9Pz+/CwqLOTi5Ly6vCwmLMzKzJyanJSSlBQWFKymrIyGjCQeJJyWnISChISGhHx2fKyurDw6PAwODHx6fHRydDw2PERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ2QIBwSCwaj8hkMRBQKgOCgRMZIBSk06XhEM0SA4iE4uoVLhCMhqLrdSAekMgYO5VM4BQ521mxIC4UFxBWdEkSERYYFxETGQGFSBKCGBEaGRuQSBwdeZaPXpsQCB6YZQMdEI6ZSgMepKusHh+wrCC0rLdlursGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1uparrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBFxeXDw+PMTGxHRudPz+/JSSlLSytIyKjHR2dISChIyGjIyOjLSutLy6vKSepJyanISGhJSOlOzm7Ozu7MzGzKyurJyenDQyNGReZKSmpIR+hCwuLCQiJBwaHBQSFAwKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZtQIBwSCwaj8ikcslsOp9QYyAQFQYEAyr0Sihkn1fDAeHVLsOJNELxVaITC0bDUU6GH5AIQ8KYrNtFVxQVFBYWFxgRCREYdUQZGhYEDwgIGxAHCQocCgWOQhmhGR0epR8gqCFTq1Wtrq+wsUt0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2downarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAQGBBwaHDQyNExKTHx6fGxqbFxeXGRiZFRSVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFRWVDw6PPz+/MTCxLS2tGRmZDQ2NAwODJyanKSmpKSipIyKjHRydBQSFERCRExOTFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAasQIBwSCwah4FkQKBsDpoBIqFgOCASCYRWm1AUFgRGkdBwPCARiWRCaTwOFYvYSIhcMOiJpJGZaDYcR0IEHXceEQ0fICEWIoJDhHcQHxIHgI9SEHeVG46YUh8OISOen1INCqWmUnOYTUxQAU9NUlRWWFtbCiRgrYNlZ2lriG8lYUd1khETE24gCZeCkRgeFBAQIAeNn9OTlXKrBJoYnKrcoaPmpmSpq3S+7u50QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2leftarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAavQIBwSCwaj8gkMiBYNpeDZzEQXRIKBmPgmtUSDgipcAsWjxOKBaN7Tq+n6EbCIQ3E5+KtQk6gjwl7CX11D3sPBBARTQGFDYeJT2R8EhB0koKUfgATFBUSCRYSEoqcnqCiikMXGAgZCQkZqautr7FiFxoIGxwWqQC4ury+qh2tCxEexMbIRhMdDggfYs7Q0kcXAQwDbELY2txEziBmmx3jSRNMR+nk4e2b70ry80QGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2rightarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTGxOzm7CwqLLy2vPTy9Pz+/Ly6vCQiJLSytLS2tLSutOTi5MzGzKSepIyKjJSOlKSmpMzKzJyanIyOjBwaHIyGjISGhJSSlISChBQSFJyenIR+hGxubDw+PHRydHR2dEQ+RHx6fERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8hkIIBcJgEBweAYnTYJUmMAa9USClniFtwlGg6IRFhoUKTXwwWj0FB3F46Hwl6UQyISfAB+EROCQgsUFRYSF3yJEIyBaxgWDBkaGRtclQwSHBIbEGEdGx4fGhcOICEDGBsWHBmqIq1CHRIWGRMMIyRTHRy6Er22tyONq8YdJRe0xkIDwr2/QwMfliMmZQADIxasZd4e4UYDIr7c59rc0eVFA+/m0EQD9PDt0flP/P3+BkEAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav2uparrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBGReZDQyNMTCxHx6fPz+/JyWnKyurHx2fDw6PJSSlISGhIyKjIyGjISChLy6vJyanOTm5PTy9OTi5MzKzLSytKSepMTGxMzGzLS2tLSutKymrHRydCQiJCwmLBwWHAwODLy2vHx+fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAajQIBwSCwaj8RAAMkUBgSDZdP4JBSi06TAcEAkFNLp07BgLLzY5njRcDzO3zB1C4lEGI83Wj58SiYUFRUWdg0XEXFFAwIYGRoWGxwRZQUFHZdgRAObmx4fHiChISFKpVlKWUdPaalOAlasp1sHG4myZGZ7Yltsbgu1mUhjdRF5egmxfQJ/gYOFdrZDi40iFgiSCw8jBQmYcpydn6Ego6WorUwGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navback22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRGZAxCZGyavExmjHyatOTy9CxihISevPz+/KzO3BRylAw+XAQCBDRWbPz6/FzC3CSuzDyexJzO5Mzq9CxSdAQOFISmxNzu9HTS5BSmxAyexDSuzJTa7Mzu9Kzi7GS21CRmjAQOHHSWtLze7AyWvHzG3BRihAQKFCTO3BS+1AyixBSWvBSOtBSStAQWJBSixDzW5BTC3BSqzBS21CTC1ETW3AQSHEze7BRqlBRmjAQCDBR+pBRefBRSdCH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMqBcMpvHgGAANQYIhWdVGDAcENQtIJBQLBgNx0MQaDuQXcghIplQDhBIxXKJYiAZGhscHR4VHyAhIiNWJBklGhIbJoQnFCcTKIxFKSgbKissJi0mJi4vLiYoMEcXKDEyMzQ1Nje2NisoOEg4KDU5K6g6OwwoKAN9SCOeMmgwz884PEq9PT4NYkPLP9jZQikN3d4AKVrjKePp3gZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navdown22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRKZDRSbBxCXJTC1Mzi7Nzq9NTm9Bx2nAQCBNzu9JzG3Hy+1HzG3IzO5BRmjPz6/LTe7Dy61AyStCTC1FzC1AyGrETS3ETC1ETa5BRulAyuzBRylAw+XMTe7Gy+3CSqzAyexBTC3DR+nIS21KTW5Nzu/KzO3FzC3Pz+/ByixEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaRQIBwSCwaj8ikcnkMBAQDgjPAFAYKhsMBkVBUAYEFo+F4QLzVQEQyoVTOX/XBcsHA0+vMRbNBMwkRDhxuHX5GTlIeHh8gISIjFAEeiVRECiQlDAUmgxQjIhwiJHdFlycoKSIUFCEjGiGkRpcqCxYijxorsUezcxYsuoZJsxLAu0qXB7DCTJfHVQrMX9PU1Uh0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navforward22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBBxCXDR+nIS21Aw+XJTC1Nzu/KzO3Pz+/Nzq9Pz6/MTe7KTW5FzC1Nzu9CRKZMzi7IzK3Lzi7LTe7HzG3Gy+3AyuzAyexFzC3DRSbHy+1Dy61CSqzAySvAyStLze7IzO5AyGrETa5ByixBRmjCTC1ETS3BTC3Bx2nAyWvEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaYQIBwSCwaj8hkMqBsBgTN5IAAjRoDBaq1aDggtMuAWDzoJhTgY+CwYLgZDccDwkgXI5IJZVGxXDAZGnR2QxsLHB0PHRgeHyAZDyFfVUQDCyIgIyCPIB+QJCUmlEMBEiInKCQnKSkeKSQeomoqJrUmKiArKSwZsmoCwMEBGCyxo1EGHr3HUQEEvltCBtDRAAbMW0zV29xDBkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navhome22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQiJNze3ERCROTi5MzGzLy6vDw6PKyqrKyurBQSFGRiZGxqbGRmZISChEQ+RExKTExOTHRydDQyNOTe5FROVLSurCwqLMTCxPT29Pz6/LSutFxeXLyytLSytPz+/JSWlKympPTq7KSipNzW3BwaHHx6fKx2VJRWNHQmBFweDOzq7Ly+vNTW1JxWNLSajPTe1Ny6pKxWJNTS1IyOjJRmbPTi3OzKrNSSXMSGVHQiBHx+fJSSlPzy9IxOVOzWxOSyjNSCPLxeDJyWnIRGTOTGtMxmDLRWBHwqBIxGTLRSDDQuNNSunKxKBGwyNMSafMxqHMReDKRGDPTu9LxuPLxaDJQ+DIR+hGQqNIQyBGQiBNTO1EQKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAYSIiYQCAwQCiokEhwACBQYHBAiQhAiHlQYJCgkEC5uCkp8MDQ4NDwylmwgQlgQRERIEBBOkmxQVBgQWFwUFFxEEDLyJGAUZtQoFGhsFHLYdyoOVHsEf0SAbIAUex8mwlAUhtSIFG+3uIyTWvAIGJMEkJe76GyXbEeWUBJg4USKaBhQpVKzYoIFFiwYUBBJa8MAFCw0vYMSQMWOhBhoTKCQSUKMEiw02buDIoWOHBg0GeIhEFKAHDR8afgAJImSIioYliMws1MPkhiJGchxBkmTDCBo1hg4KQMTiBiUyhBxZ8pNFiR5MEtU0WqSJVidJNDyNKraHC5xPNKBEkTLlJ5WvUgWNvfikyhArV34+7ZEXQAAsB2iUyHLlihYtW0pwOYAFgyJDmDNr7jIIWiAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navup22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBHSWtBRmjAQOHISmxNzu9BSmxBRihHyatPz6/Lze7CTO3BSixHTS5BTC3DzW5ByyzPz+/OTy9AyexEze7ByixGyavKzO3FzC3AyWvBS+1BR+pAQKFCRGZExmjCxihBRylCSuzBSWvBS21BSOtBRSdAw+XAxCZDyexDSyzCTC1JzO5JTa7DSuzETW3BRqlAQWJDRWbOT2/Mzq9HzG3JzS5Kzi7BSStGS21CxSdCRmjAQOFAQSHAAAACH5BAEAAAAALAAAAAAWABYAAAaeQIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbUGFAtGw0GFfheHByQi4S6/E8pDUoFYLm5kAEPJaBAVGxIcER0JHlEfICEiIxUkGyUmIgknKIhXASkonCorgSwmKQGcKE9IAi0uLxUwMTJWMzQ1NiYwBLBQHws1N7avXgs4NjkcCblMATU6KhvGyG87PAnUKV1MAj0+2zIFp1bg4eJJdkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playeject22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAwKDJSWlFRSVBQSFKymrOzq7HRydERCRPz+/MzGzISGhJyenKSmpGxqbJyWnJSOlKSepLy2vIyOjGRiZPTu9IyGjLSutFxaXExOTHx2fGReZAQCBAQGBBwaHCQiJLSytKyurJSSlFxeXNze3LS2tIyKjFxWXHRudAwGDBQOFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbVKFQsGItBdBhpgh4PxIJvRC8cA4oiMy8bvQhJhMAYTFBVOURAWEw0QFxcMERAYCBluVxobDxkVHJocmBwEGgmEQx0dHh0CpKmkH6odVlanBR8FtAIFtiCkSB0LISEiGCIGIxAPDySuRwIOBwrOzwoHJRHJRh0jJgMj2gMnERQUCNVFHQQoCBvo6CkICATjRB0qp7b1K6qv+foyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playend22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTCxGReZBQSFOzm7AwKDKymrJSSlFRSVCwqLLy6vPTy9OTe5Ozq7CQiJLSytOTi5BwaHPz+/HRydMzKzKSepJSOlKSipJyanIyGjIyKjKyurISGhMzGzJyWnHR2dISChIyOjLSutDw+PERCRHx6fJSWlIR+hJyenGRmZHx2fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8ikMBBQKgOCgRMZIBSkxYHWoDVWD9EigpBQLLBERsPxCA8NDUhjgTBGJJNGG02RVBQWdUV3FxgZe0IGfoAGdhoXGxwdiAYef4FGFBoeHB8dGSBRihUhIo1FBhkbIyMkJRYmAwYal4JEBh2RChIWJ1IIGxUZFqdECCgkHR6wWAYpFR2YWSobvL5vFgfDaEMDIivMRBEsD9HcQgMWvecDLB0tZ0btsfJa9vLXU/X6/P3+b0EAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playpause22:play play22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBAwODMTCxKSmpJSWlFRSVAQGBBwaHLSutOzq7Ly6vCQeJPz+/Hx2fBQWFGxubLSytJSOlBQOFAwKDJSSlJyWnIyOjHRydNze3GRiZAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWBICCOZGmeaKqubOumQSDEgRjPMSoMRGEcol3vh0IkFAtDDWBEKlGMRKPgEIii0yrqIS1ArADu9KuLNCSOSdCMVp8ohEZFC4DL6SaBpXGh6/l4JX8XZACDhXkYCn1LAoqMUBAZEhBLDJKUSyYBGmhPAJyemiU0NDaloy+qq6ytI8whACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playstart22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExOTAwKDAQGBJSSlHx+fBQSFMTCxKymrFRSVOzu7GxqbLSytLy6vJyanPz+/GReZBwaHHRydKSepKSipGRiZJyWnAwODLSutKSmpISChPTu9ISGhFxaXJSWlIyGjJSOlERCRIyKjDw2PIyOjLy2vOzm7Dw6PLS2tCQmJOTe5GxmbDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa7QIBwSCwaj8ik0hgQLJGBgbMoqBIKU2LAcMgOEQmFYeEFbBmNMgDhYDwWBC0k4pCoJ46IgRIXBioRCRYXamwRGBQIfgaBFhiERhkaenxmCoEbBhyQRYaIGVsdghgem4UWegcEBB8UHhsgIaZGBBgRIpUIIxQhChginEQIIBEklWslFyYnBsFfFCi4WQgpFBwqFxNGKxcsxl4IAS0NZEYCF3vlwgEfUuZV8JEuI2pPAARN9kcE9fr+SwaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playstop22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAwKDBQSFBwaHCQmJJSSlISChJSOlJSWlGxqbGRiZNTS1PTy9Pz+/Ozm7OTi5FRSVIyKjOTe5MTCxIR+hExOTHR2dLy6vLSytLy2vHRydFxWXIyGjIyOjPz2/FRWVHx6fExKTMzOzJyanKSmpKyqrKSipAQGBLSutHx2fDw6PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcslsAgKCAWEQjQ4KgSwyYDAcugZEQqFYYJECA6PhaLcfEEUkgJZAGJB8fkKpWOhHAxcOGBQZGBoaGQgbHIBGAhUOGR0SBxISBh4Xf0iCHxQSlRIIXhsgj0UCIaCXmJgHGyKpRJ+hmB5dHQqOaCENIx0epBIkBhdzngoPGCQlJifQJBvJRygRKRcKGxcXGypys1srEREc5SLnICLiR1koLFVUWfRO9vf4+UwyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textblock22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textbold22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textcenter22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textitalic22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textleft22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textright22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text22:text text22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textunder22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIvhI+py+0PowmUnhpeVVnb1DkbCI1I2JhX+Z0sOr2cTHpwK7a4rUr+hAnufsTirwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewchoose22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewdetailed22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAQ+EMhJq7046817+MLQUQFRGMc4lQaSAkcMx3QltMmrDrSu/sCgEPgJhIiFk89DaL1qPRnlhsgBebWhdstVESIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewicon22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz69PTq5AQCBPz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARWEMhJq7046z2DF0PlBeAVEERhiKhqHgWyUgEsX0KczFOO7JeBYciTCImc5ITIXDKHyqhU9AnRqq9UEVDTvmLbGhin2/qAliOUot5OLc81IO5+2+8WewQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag-22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbKQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/avno2BBf/MCClSob4iBIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbIQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/cunr9S8gAIRFhTCLAgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag+22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbQQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/4zT766vRI+fvHD4CPgwcJ9qg0UB85JA0dDjEQBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmulticolumn22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq7046813+MJQfUF4BURhHGO6noSBsEcNoDJtS4KcsJQe4ncZ1HYT47HDbDqfUAnJRJmKLIGCCjjJbmE5wBI3EyOFxKCPS1EiJW52dE6vZyIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewtext22:view view22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIkhI+py+0Po2ShBlOxzbP7n2yaJoLm+ZTcxqHuC6hXzML2HVEFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewtree22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz+/Pz69Pzu5PTq5OzaxBQOFOzKpFRWVFxWXOzexPTexCH5BAEAAAAALAAAAAAWABYAAARPEMhJq704g6A779kHCORAgNskFMYhakE8FkjyBcoWv+JwJItXaELYCTFHlCSpZKKcoB5jYHpOGgUadLKbIRw3jhEzQDyCSuI4zW673yhDBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde new file mode 100644 index 0000000..51f76a0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde @@ -0,0 +1,658 @@ +1downarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PUZi0zmTtypflV0VdRJbm6fgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +1leftarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAP///wAAACH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxqdwoNGTmgvy9px/IEWBWRkKZ2oWrKu4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +1rightarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +1uparrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +2downarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +2leftarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pyxf5VohmSlsxmpjTzAHeN5ak6UHpqKRi2GpwvH3Q3eT64RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +2rightarrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pq5HOAjQyVnqfhHue7oAaKH5kiW0AmnLqaHomkj02g+e6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +2uparrow-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIghI+pyxfR0HsRzNnuXVqn3mVQZWFRyIDjp65Ga5Ly4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +abs-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAIwhI95ocn2GlySTiME1iC+DIKdNWxANl4HaqWr055cy6Bs6dahmJsyXVFFJJ7gyF8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +airbrush-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPzCxMQCBIQCBPz+/MTCxKSipFxaXDQyNISChAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARUEMhJZxCjanBH3hY2EFJgVt0YcEW7liLxBoVxzPHL2msqUzSeT2c5HBC5jQmROKgAhCgKEVBQo6YAqVQIHBQ93ZbmBWt+nDJRgiYMvmuoThWXT/wRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +attach-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +back-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TBxObISevAQCBNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAwSHBRafBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnBRWfAwmPBRWdByixAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZiQIBwSCwah4HjUTBQFgkFg3MoKBykU0QhoUAIAuAksbpgNByPxQMSGVsVDYlkIqdUiJYLJqORbDgcHRseRR8gISIaEyMkGCVYRBEmeyAnlgaQkSgpmU4RAZ1OKqFOpFNGfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +blend-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBARCRAQCBASChATCxATCBASCBAAAACH5BAEAAAAALAAAAAAQABAAAANHCLrc/izISauYI5NduvlXMIjEQBSnUYCYxnmsSJrouhqh6J4wLo0mWuqWy5heN58seBrGdEdeMgQsNW0ggXbL7Qog4HDDnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +bookmark_add-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigdFQGE0Ix4NBbSAgsWjk+jBIAlcUYrJASChnSXZSoUDelKfoKpFALJA61ueGI2IAZmhogGFmCGGAgXsifiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +bookmark_folder-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExKTBQWFOTi5OTm5CwqLPz+/PTy9Ozu7FRSVNza3PT29KSmpAQ6XARqnNTS1JyenGRiZJTa9Mzq9JzO5MTGxIyOjKSipFxeXMzOzDw+PDy65FTC7HS2zMzm7MzKzKSenASq5Bx+rBSGrFyqzLSytDw6NAR+zBRejBxqnLSyrERCRIyqvDRujKyurMTCvOzq7AQ2VDQ2NNze3KyqrGxqbLS2tLy6vCwuLDw6PAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAawQIAQEBAMh4GjcEAoCAQGYSCpDBwQiQJBEVhQj1YGo1DoNqZTx8PhODAWZUik0ZAkHRNKZe0IWC4RGBkBGhsOHB0eFR97bBdcICEbAA4iIyQlioxrGhEmJ5QoKSoqJCOZiw4rGixEYi0uo6WYDi8wkwAsCTFksLIuMi+tADMLNAsLEBAgLSMpMjW4RCc2MCAgFjA3MA4R0kgzGS84Ny8vDqBKSDkKETUOOurqAQagfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +bookmark-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +bookmark_toolbar-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQ2NKSipAQCBKyqrMTCxKyurISGhJSSlJyanHR2dIyKjGxubIyOjISChHx+fPz+/MTGxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVpICACwWieY1CibCCsrBkMb0zchTEcNYskCsXiwIOdEAzioeFIGE2IB6RBbT5HiAhEIpk6Y9kJBMJoHK6iLIU8kZxFlXhlIp/XJ4BKUIGoWIJ9f3x5e32FeoB5goGAfokTCJEIFJKTlX4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +bottom-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObCRKZBxCXAwyTKTK3Ozy/NTm9GSivAQWHNzu/FzC3IzO5CySrAQOHAyuzETS3CSWtAyOtETa5Aw2VLze7ByWtBy61BSavAxWdBRCXAwqPAQCBDR+nKTe7FS+1Eze7ByixBRmjPz+/AyexAyixAQKFBRqjAQGDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZhQIBwSCwaj0hAYCkYEJLKguGASEADigWj4bgaHpBINykwSCYRa5HCFFQsF0xGo9lwhpSOwfORYC4gISJ3RAQdIyQYJSAlImNrh4uNJkl5CoKUUBQnjlB4KFAcoqOknkh+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +brace-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAI2hI9pEXq8mnsNzggsEMJwbHGimFXS4HUfpKUIq3QJ036vuakyWvbjCJLYbL2WgyW5WIw3g78AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +brackets-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAIzhI8JwXocllMxTlSREGY/2W2iJ1nAEAJklpCfeXAJG8sY6JGowY7jW0sBL0NiqTGBAPwFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +charset-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAInhI+pqxH8kFsvsgtm1vvEaoBZSH6j5FSaRY4me4pyq1ochuf6fvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +colorize-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPz+BAQCBPz+/MTCxISC/AQChMTC/ERCBPyqXMRaBATCxASChPzerKSipMT+/MQCBATCBASCBARCRISChMT+xDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVnICAGgWieZyCQKGuqZPkGgwyv60gONRDvNlqt9Pv5BgRCYVj8IQ3L4qE4KFiZzRiP90MgEj+FYtGLIRiJQaMxUDjIxFoi8YBAIo3FQjIJ7iAUERNqDTI6PBGJfT0oFVpsMSgzkSh+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +colorpicker-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBARCBDQyNMT+xATCBASCBPz+/FxaXISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EMhJZRCjahBIMdlmeV8gBl3xCabWGarBihwBz+eB2O0WHIFEp1f5BU1EilFI4wCZtGWy+JwWj00OynrNTvwRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +completion-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/Ly+vHx+fAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM/CLrcGjBKCYK4+NoMs+jWIBIdZ50QuWGgMASD+oGnO5beR+x7UE3AyGKV0wxnpeSxyDoGN74Hszl8QhxYhj8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +configure-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connect_creating-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connect_established-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipDQyNMTCxMTGxISChFxaXMzGzAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZxCjgsAtDtUlCOA1gJQ4kl/IDatAoF7xxkS6GgEBr6jAobCyBX42SQBxMOx6A8MhiGASR8YDgrYsNEeJ0zaEGZY7uoH2oB6nOUwtbdLaVOeTUwo/8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connect_no-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +contents2-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBDyKhDSChGSinFSWlEySjCx+fHSqrGSipESOjCR6dKTGxISytIy6vFSalBxydAQeHHyurAxubARmZCR+fBx2dDyKjPz+/MzKzLTS1IyOjAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOZGmKQXCWqTCoa0oUxnDAZIrsSaEMCxwgwGggHI3E47eA4AKRogQxcy0mFFhgEW3MCoOKBZsdUrhFxSUMyT7P3bAlhcnk4BoHvb4RBuABGHwpJn+BGX1CLAGJKzmKjpF+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +contents-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExCNGSenHRmVCwqJPTq1GxeTHRqXPz+/DwyJPTq3Ny+lOzexPzy5HRuVFSWlNzClPTexIR2ZOzevPz29AxqbPz6/IR+ZDyKjPTy5IyCZPz27ESOjJySfDSGhPTm1PTizJSKdDSChNzWxMS2nIR6ZKyijNzOrOzWtIx+bLSifNTGrMy6lIx+ZCRWRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQEAAQCwWBYJiYEAoGAFIw0E5QCScAIVikUgQqNargtFwdB9KSDhxiEjMiUlgHlB3E48IpdKdLCxzEAQJFxUTblwJGH9zGQgVGhUbbhxdG4wBHQQaCwaTb10emB8EBiAhInp8CSKYIw8kDRSfDiUmJ4xCIxMoKSoRJRMrJyy5uhMtLisTLCQkC8bHGBMj1daARgEjLyN03kPZc09FfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +contexthelp-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIzhH+hIeiwVmtOUcjENaxqjVjhByaBSZZVl24Y1V6iEVMzkD4bqD700bshgh1fzwd0IfwFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +crop-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMT+xATCBASCBISChPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAM0CLrc/iG+FsQgYapKbp7c4IFCZ2FQOQQE6oSl9Koxabrz/eVDDXat3atAlEEMSKFmyfAnAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +decrypted-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJExGHEQ+FCQiDBwaDBweDGxiLHxyNHRuPIR+RIyGZJSSfFxaRGxmLJyaXNzWpNTOnMzGnMS+jJSKTGReLKyqjPTu1NzarLSufKyibJySXIyGVGxiNFxaXLSytPT29Ozu7OTi5NTS1KyurGxqVCQeDJSSjLS2tNTW1KSmpGRiLKSebOzuzJSOXExONExGLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaVQIBwOAwYA8SkMCAYOAnKYiFAIAQGyOgVCggYuEovVxztMpdnwAGRSCgUCwOjIeQ6HpCIZDKRUNYMRBUWF4UYGRoWGxyBRR0eHxgaICEiIyR0QyUmJygpKgUrAxMsLUQlKyieoKIuEAunK52fBS8DLiywQySpnjC1Mbi6QjIzNBeSIBY1EQfDQgosLAEUNjY3Co1DfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +down-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObCRKZBxCXAwyTKTK3Ozy/NTm9GSivAQWHNzu/FzC3IzO5CySrAQOHAyuzETS3CSWtAyOtETa5Aw2VLze7ByWtBy61BSavAxWdBRCXAwqPAQCBDR+nKTe7FS+1Eze7ByixBRmjPz+/AyexAyixAQKFBRqjAQGDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZeQIBwSCwaj0hAYCkYEJLKguGASEADigWj4bgaHpBINykwSCYRa5HCFFQsF0xGo9lwhpSOwfORYC4gISJ3RAQdIyQYJSAlImNrh4uNJkl5CoKUUBQnjlB4KJ6hokN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editclear-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIuhI+pm+EPnwmi2msDoLgLzQWDV4HlSJof6qki+W0n7LKdCpdyrm/Rr2EIhwp/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editcopy-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAFxaXPwCBNze3GxubERCRPz+/Pz29Pzy5OTe3LS2tAQCBPTq3PTizLyulKyqrOzexLymhLy+vPTy9OzWvLyifMTCxHRydOzSrLyihPz6/OTKpLyabOzu7OTm5MS2nMSqjKSipDQyNJyenLSytOTi5NTS1JyanNTW1JSWlLy6vKyurAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAaUQIBwCAgYj0eAYLkcEJBIZWFaGBie0ICUOnBiowKq4YBIKIbJcGG8YDQUDoHTKGU/HhBFpHrVIiQHbQ8TFAoVBRZeSoEIgxcYhhkSAmZKghcXGht6EhwdDmcRHh4NHxgbmwkcCwIgZwqwsbAhCR0CCiIKWQAOCQkjJAolJrpQShK2wicoxVEJKSMqDiAizLuysiF+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editcut-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIwhI9pwaHrGFRBNDdPlYB3bWHQ1YXPtYln+iCpmqCDp6El7Ylsp6ssR1uYSKuW0V8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editdelete-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPT29GxubMzOzDQyNIyKjHRydERCROTi3IyKhPz29Ox6bPzCxPzy7PTm3NS6rIQCBMxCNPTq3PTi1PTezMyynPTm1PTaxOzWvMyulOzGrMymhPTq5OzOtNTKxNTOzNTCtNS+rMSehAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaKQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhSEQkFgrBAcr1URiPhKAsDD3QB8RhA3FM0IlLHnyUTVBMSFBUWfl0XGBMTGBcZGodmcQWKjpAbHIgIBY2LHRoempOdjooTGx8giIOPFYofISJ+DyMXI6AfFySyfiUmJSUnKBYcICIpfgELzM3OZX5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaVMR+RPzKjNze3AQCBMR6RPzGjPyODPz+/MzOzPyKDPyKBPz29OTWzPyGDPyGBOx6BOza1OR2BKROBNSOXKRKBBwOBOzu7PTWxPzizOySZPyCDFxaXOy2lNRyRMxmJCQOBPTm1OzStPTKrMR+XIRWLFxGNCQSBDQyNIRSNDQuJERGRLyqlNzSvIx6ZKRuVEw6LLSyrLymhKSShBwaFFROTJyWjMS+vNzW1OTazNzKrHRqXOzezOTOpPTq3OzWvOTStLyedMS+rLy2pMSynMSulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAewgAAAAYSFhoQCA4IBBI2OjgUGBwiLBAmXlpcKkgsMlZcJBA0JDpIPEBGVjwkSBgOnExSfmBIVBxAMExYXswkYGRobHLq8gh2PHhoeHyAWIYKzIiMkJSYnKCnQg5YNHtQqKywtK9qMBC4vMDEBMjIz2dCMDTQ1Njc4OToz5PEEOzw3ZPToMcLHO23HfogQ0QMIkCA+hPBbhAPHECJFjMyYIUQIvEUpUqwQOXKkSEF+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQiFHRqNIx+LFxSBDw6PKSaRPz+/NTOjKyiZDw+POTe3AQCBIR2HPT23Ly2dIR2FMTCxLS2tCQmJKSipExGLHx+fHR2dJyenJyanJSSlERCRGRmZNTW1ERGRNze3GxubBweHMzOzJSWlIyOjHRydPz29MzKzIyKjPTq3Ly2rLy+vISGhPzy5LymhISChPTizOzWvKyurPTexOzSrDQyNHx6fCwuLGxqbOzKpMSabAQGBMS2nLyulMSidAAAACH5BAEAAAAALAAAAAAQABAAAAa7QIBQGBAMCMMkoMAsGA6IBKFZECoWDEbDgXgYIIRIRDJZMigUMKHCrlgul7KCgcloNJu8fsMpFzoZgRoeHx0fHwsgGyEACiIjIxokhAeVByUmG0snkpIbC5YHF4obBREkJCgon5YmKQsqDAUrqiwsrAcmLSkpLrISLC/CrCYOKTAxvgUywhYvGx+6xzM0vjUSNhdvn7zIMdUMNxw4IByKH8fINDk6DABZWTsbYzw9Li4+7UoAHvD+4X6CAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbGxubMzOzPz69DQyNIyKjERCRPz29PT29OTi3IyKhPz27PTu5PTy5Pz6/Pzy7PTq3OzexLyqlPTm1PTizOzavLyqjOzWvOzaxLyifOzizOTOpAQCBOzezAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaEQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhWEQkFYYHkeqkMxKFBFpq9jgdkEGlPqwrJhCIY2N8FFRYUFxcYGX9dgRKEGhiHiYEOhBcbGBwdiQEOARcBGwEeAZllAgEUnQEfoQEgmp4hrCKtrwEYsrRlTiMBJAG8syN/IyMAxMXHSH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edittrash-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipFxaXPz+/MTCxISChDQyNCH5BAEAAAAALAAAAAAQABAAAANQCKrRsZA5EYZ7K5BdugkdlQVCsRHdoGLMRwqw8UWvIKvGwTICQdmGgY7W+92GEJKPdNwBlMYgMlNkSp3QgOxKXAKFWE0UHHlObI3yyFH2JwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +encrypted-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJEQ+FExGHCQiDBwaDGxiLHxyNHRuPIR+TIyGZJSSfFxaRFxWJGRiLJyaXNzWpNTOnMzGnLy2hJSKTGReLKyqjPTu1NzarMS+jLSyfKyibJySXIyGVCQeDLSytPT29Ozu7OTi5NTS1KyurJSSjGxqVFxaXLS2tKSebOzuzLSufJSOXExGLGRiTExONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwGCgGhkhkQDBoEpLKQoBACAyOUID1qTVwoQGvMPxNFgVjAxp6QCQUicSCwVgkG44HJCKRRCYUCAxIFRYXhxgZGhYbHINEHR4fGCAhIiMkFSVKJicoKSoFKwMsLZtDLison6GjLA92qCueoAUvpC2xQhWqrLYDErmEMDEXlDIwMxAHukI0NS01EzY2NAmPAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +eraser-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAAT+BMTC/AQCBISC/AQChPzCxPz+/MQCBIQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EMhJZRA120GwnsEgdh8QiqKXnSi5oqNKsbFWGEYrT8Vx4JydpOf7uSrEIkIISPqWtkIS+pH2qCUptgTYavwRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +exec-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBEQ+PBwaHLy+vMzOzGxqZHx+dKyqnKymnIR+dNTW1MTCxJyOfLySVMSaVMSeVMSebJyWhOSmTOSuVNyubPS+dKSWhHR2dDw+PIyKhNymTNSaTEw+JOy+fPzSnLSyrISChDQyNDw6NMzKzLy2rMyiXGxWLAQCBHRqTPzerNy+lMzGvCwuLAwKDDQyLJyWlNy6jPTGhGxaRGxiRPz2vOTStLy2tFRSTMS+tOzGlPzmtPTixGRiXCwqJLy6tOTWxPTq1MzKxMzOxISCfHRybLS2tHR2bCQmJExORMTCvMTGxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAeogACCg4SFhoIBAYeDAogDA4oAjYQCBAEFBgcICQUBCpODAQsMDQ4PEBGWhgUMDxITFBUUFheDGAYZCA0aGxwcHR4QHwwgISILIyQlGiYnJygpKisEIywALS4vMBoxMjM0KTU2LC2ENzg5wDo6Owo8hT0+Lx8/OztAQR9C1oInQz4FMBAp8sEIhgIEMpwYdASJCwAYkihR5OLGkUUAMmTACK8Hx4+C/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +exit-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBDQyNHR2dCH5BAEAAAAALAAAAAAQABAAAAI4hI+pFrHb3nEg1iWiDiINCwYDko0V9XUTda6I1TIsUMpGinyzbB6ZeGuoEr+GUDL4CXqSphPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileclose-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCQiJBwaHAQCBDQyNDw6PFxaXFRSVERGRCwqLAwODGRiZHx6fPz+/GxqbAwKDCQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVaICCOZGmeqBgEwjCkRGEcSKK4JrEcBrMgAdeLVDg0GguGsYEbBQyGYyN6FDoPDIf0+LCKBIgetQERDgGDBGIpNY8GioAU0m6KXFw883w3+/l9f4AkfimGIn4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filefind-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBCQmJDw+PBQSFAQCBMza3NTm5MTW1HyChOT29Ozq7MTq7Kze5Kzm7Oz6/NTy9Iza5GzGzKzS1Nzy9Nz29Kzq9HTGzHTK1Lza3AwKDLzu9JTi7HTW5GTCzITO1Mzq7Hza5FTK1ESyvHzKzKzW3DQyNDyqtDw6PIzW5HzGzAT+/Dw+RKyurNTOzMTGxMS+tJSGdATCxHRydLSqpLymnLSijBweHERCRNze3Pz69PTy9Oze1OTSxOTGrMSqlLy+vPTu5OzSvMymjNTGvNS+tMy2pMyunMSefAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe4gACCAAECA4OIiAIEBQYHBAKJgwIICQoLDA0IkZIECQ4PCxARCwSSAxITFA8VEBYXGBmJAQYLGhUbHB0eH7KIGRIMEBAgISIjJKaIJQQLFxERIialkieUGigpKRoIBCqJKyyLBwvJAioEyoICLS4v6QQwMQQyLuqLli8zNDU2BCf1lN3AkUPHDh49fAQAAEnGD1MCCALZEaSHkIUMBQS8wWMIkSJGhBzBmFEGgRsBUqpMiSgdAD+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filenew-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz6/GxubNTKxDQyNIyKhHRydERCROTi3PT29Pz29Pzy7PTq3My2pPzu5PTi1NS+rPTq5PTezMyynPTm1Pz69OzWvMyqjPTu5PTm3OzOtOzGrMSehNTCtNS+tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ/QAAgQCwWhUhhQMBkDgKEQFIpKFgLhgMiOl1eC4iEYrtIer+MxsFRRgYe3wLkMWC0qXE5/T6sfiMSExR8Z1YRFRMWF4RwYIcYFhkahH6AGBuRk2YCCBwSFZgdHR6UgB8gkR0hpJsSGCAZoiEiI4QKtyQlFBQeHrVmC8HCw21+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBOSmZPzSnPzChPzGhPyuZEwyHExOTFROTFxaVFRSTMSGTPT29Ozu7Nze3NTS1MzKzMTGxLy6vLS2tLSytDQyNOTm5OTi5Ly+vKyqrKSmpIyOjLR+RNTW1MzOzJyenGxqZBweHKSinJSWlExKTMTCxKyurGxubBQSFAwKDJyanERCRERGRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaRQIBwGCgGhkhkEWA8HpNPojFJFU6ryitTiw0IBgRBkxsYFAiGtDodDZwPCERCEV8sEk0CI9FoOB4BEBESExQVFgEEBw8PFxcYEBIZGhscCEwdCxAPGA8eHxkUGyAhIkwHEREQqxEZExUjJCVWCBAZJhEmGRUnoygpQioZGxsnxsQrHByzQiJxz3EsLSwWpkJ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileprint-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRKNAQCBPz+/MTCxExKLPTq5Pz29Pz6/OzezPT29PTu7PTy7NzClOzm1PTu5LSabJyanPTm3FxaXOzCjOTKrOzi1OzaxOTSvJyenGRmZLyyTKSipDQyNERCROTi5Hx+fMzKzJSSlIyOjISChLS2tAT+BDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaYQIBwKAwIBMTkMDAYEApIpVBgOCAOg4RRGlAoEAuGIdGITgWOq4LxcCQgZkEkIHksHgYJOR6ZQCgVFhYJFxgTBVMZihoCfxUYDWUbUBGKGREcjBoQEB2TAB4CAx+Vl5WMhyACHiEhH6IfIiMktCQgE0cZJQStr6O2t6EARxO6vK6iEx4dZsMCxbsmBB4nzUTEutVSSUdmfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filequickprint-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+/ISChERCBDQyNPz+xPz+BFxaXPwCBMTCxAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMhAq5UYBME7D9kkBMNGjqHmeWBoDhwsEIS7coVx1NhbCrmdzROk9SyU4GEJ2twECISOUNokEopsVrobKCgCrZa73IHFYy4VyZ5WNIO4vBhvse8gfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBFRSVMTCxKyurPz+/JSWlFRWVJyenKSipJSSlOzu7ISChISGhIyOjHR2dJyanIyKjHx6fMzOzGRiZAQGBFxeXGRmZHRydGxqbAwODOTm5ExOTERGRExKTHx+fGxubNza3Dw+PDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaAQIAQECgOj0jBgFAoBpBHpaFAbRqRh0F1a30ClAhuNZHwZhViqgFhJizSjIZXQCAoHOKHYw5xRBiAElQTFAoVQgINFBYXGBkZFxYHGRqIDBQbmRwdHgKeH2YgHpmkIR0HAhFeTqSZIhwCFIdIrBsjAgcPXlBERZ4Gu7xCRZVDfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fill-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBMT+xASCBMQCBATCBPwCBIQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARSEMhJq50hXBvE0JsUEMXwhYFBmOeVDsVqgpS6luRc32RR6hLCTSCQ/VqEwwDhK5Z+Ao3wEPAViL6BR6PSZKyCa6uLAbcAZEznLDHQ1BZDiOKPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filter-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipMTCxISChMTGxAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM3CLrcDiGGt6IQQ7pI8PjSVHUeqFVBNxRfFjXSZYqwENoUNFx4rve+wI6WEwKLQ5/CSCw2lQ9/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +find-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1ISChOTy9Mzq7Kze5Kzm7HyChOT29Oz6/Nzy9Lzu7JTW3GTCzERCRLza3NTy9Nz29Mzu9Kzq9Ize7HTGzHzK1AwKDMTq7JTi7HTW5HzGzKzS1IzW5Hza5FTK1ESyvLTa3HTK1GzG1DyqtLzu9IzK1AT+/Dw+RAQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaSQIAQEBAMhkjBUEAoGA4EJXKJSCQUC0ZDCmg0hATHAxKRTCIEYYMiMFYsF0xGs+FUOl0BJRAweCIRHyATIRhpRAEAHSILIyQgJSYhJ4dIBBEoISkmKiuVSQgRIyEsEQgELVNCLgQVCiJRLQSfli9pMAQxMrRcQ1G6tAC9AL+7al+qxALACG1Kw8oxBGt7yWBpfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +finish-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAwyTBRObAw2VDR+nAQCBCRKZOzy/KTe7Pz+/KTK3Nzu/Lze7FS+1AyexAyuzBSavAyOtBSmzOTy/BRqjNTm9IzO5ETS3ETa5By61AyixByixBRmjAQGDBxCXGSivCySrCSWtBTC3AQOHAQWHAxWdEze7AQKFBRCXAwqPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZtQIBwSCwahYGjUjBQGgWE5LCgNBwITSFVKOgKDAZEIqodChSLw4HRcIyTW4Dg0HhAIhGIZEIJxA0VFhcYGRAaGBscHXEeHyAhIQ4iiBwjAHEBJCMjJCUmiSdlRyigU0oolURxRSmrTpevsUN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +flag-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBMTCxPz+/MQCBPzCxPwCBAAAACH5BAEAAAAALAAAAAAQABAAAAM5CLrcruG9QCULokqKR44NJQykQGgXSRaEcYJLsLLu6wSFoRMvCuk1kO9ni8GMt6MForQMl89NxJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_new-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBPz+hPz+BOSmZPzSnPzChFxaXMTCBPyuZPz+xPzGhEwyHExOTPz+/MSGTFROTPT29OTm5KyurDQyNNza3Ozq5Nze3LR+RLy+vJyenMzKzNTS1Ly6vJSWlFRSTMzOzMTGxLS2tKSmpGxubBQSFAwKDKSinJyanIyOjCQiJERCRERGRBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaNQIBwSCwaj8ikcokMCIqBaEDoBAQG1meAUDAQpIcBQoy1dg2JdBqhECgQ1IWB0WgcBIOBwIHXBwwPEBEREhIBbG4IExR/DBUVFhIXV2NjDVYYDY8SFU4ZVxpVAQwbGxynGxkdTh6XVh8gGSGzGSITIxokJUImGSMTwLcnKCkprgAqDSt1zCssKxQtQ35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +forward-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAwyTBRObAw2VDR+nCRKZOzy/KTe7Pz+/KTK3Nzu/Lze7FS+1AyexAyuzBSavAyOtBSmzOTy/BRqjNTm9IzO5ETS3ETa5By61AyixByixBRmjAQGDBxCXGSivCySrCSWtBTC3AQOHAQWHAxWdEze7AQKFBRCXAwqPAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZjQIBwSCwahYGjUjBQGgWEpHNYMBCaT4G2UDggos+EwmBYMBpf6VBgYDgeEMgjIpmoAQVKxXLBPDIXGhscRB0eHyAgDSGBGyJFASMiIiMkJYImUwAnmJqbjp4AKCmhAKSlTn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +frac-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBAQGBIQChCH5BAEAAAAALAAAAAAQABAAAAInhA9hig0SAmQOxeouPrFTzHzbCAzmiZ4k2S1ryHKsoo3tptXg3fgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +frameprint-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRKNAQCBPz+/MTCxExKLPTq5Pz29Pz6/OzezPTy7PT29NzClPTu7PTu5PTm3LSabJyanOzi1FxaXOzCjOTKrOTSvJyenGRmZLyyTKSipDQyNERCROTi5MzKzIyOjLS2tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaPQIBwKAwIBMTkMDAYEApIpVBgOCAOg4RRGlAsEAqFIcGITqnWRcPxSEDMgkhAonA4DO3yMD6BUCoSCYIWEwVTF4gYAhAMFRUMZRlQEYgXERqKGBAQG5IAHAIDHYiUEUcDpwIcHh4doR0fH02zqAIXIASsrqi0TQBHE7e5HqG0Zr8CwSC9qFJHxbRSU7W1fkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +gear-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChMTCxDQyNFxaXKSipPz+/CH5BAEAAAAALAAAAAAQABAAAANdCLobwbAFMciLwBFSihBEFHSG8QnmpQQEBX6loI5G5QTlcMgrZSmEmsGxKqRWNV3hMrFlBtDoA1eTEaKHJdMYhR6+gxkF++UMGbiDzvDVioyHAJSHcchuGLQq4k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +gohome-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tJRqRGQqBNy6pIyKjDwGBPTe1JSWlDQyNOTGrNRiBGwmBIRaLNymdLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaoQIBwCAgIiEjAgAAoGA6I5DBBUBgWjIZDqnwYGgVIoTGQQgyRiGRCgZCR1nTFcsFkHm9hBp2paDYbHAsZHW9eERkYGh4eGx4ag3gfSgMTIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbIiorLB4XEltDrhcaLS4vtbcJra8bMDHAGrcyrTMXHjA0NSypEsO6EzY3IzU4OdoTzK0BCAkDMgkIOjJlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +goto-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIohI8RyKciVnMwTlrlDfkm5QFgaHBWMo0lp22dZ57wO8vpGrLk2iJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +help-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQ6XAQCBCyCvARSjAQ+ZGSm1ARCbEyWzESOxIy63ARalAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EEgQqhUz00GEJx2WFUY3BZw5HYh4cu6mSkEy06B72LHkiYFST0NRLIaa4I0oQyZhTKInSq2eAlaaMAuYEv0RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +history-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBEQ2LEw6POTSrOzWtNS2lAQCBOzatPTm3PTq3MyyjEw+NOzm1Pz29Pz+/Pz6/Pz27FRGPFxKRPTu3Pzy7Pz69Pz67KSGbPzy3Pzu3PTizPzu1Pzq1PTmzOzaxPTixPTmxOzWvOTOtKyWdOTGpOTStNS+nIRmVLymhNzCnOzavLyefAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIBwGCgOj0jBgFAwGJDJAyJBUDihwgWj4XhAqhEJNDKhVLwUSUDyPJIrlgYlLSG0hYELhgLJTBJOd1kaGxgYHB0egkQfHBwgHyEigkUBIwMkBwcEJSZ3ARYWJCcnKCYpJJ5HAQUqFhSjJysoKItOCgehJBISI4tCtyERa79HTrx2WEiBUH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +idea-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+BPzerPz+xPyqXPz+/ISChFxaXKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARMEEgZap14BjG6CJkmEMVQCF+4mQPBpthWtuYJxkJJGK6dbQRCgMBB3XCDzQamMhpDGlvuCFUyoQDLBUsJHBDUKuKQCKsUCIVZtc34IwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +int-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBIQChAQCBAwODAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCKqx/iw0CNukzuJ8d1yCAAziIyliCKjck1ZuaV4igZ1r+raongE4j8YT6QiJC38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +locationbar_erase-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIshI+py40Bo1SywgSFiDq+oG3hZHDhVpUmagFrl7pgN3oqPNuqpe+8Awwi/AUAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +lock-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJEQ+FExGHCQiDBwaDGxiLHxyNHRuPIR+TIyGZJSSfFxaRFxWJGRiLJyaXNzWpNTOnMzGnLy2hJSKTGReLKyqjPTu1NzarMS+jLSyfKyibJySXIyGVCQeDLSytPT29Ozu7OTi5NTS1KyurJSSjGxqVFxaXLS2tKSebOzuzLSufJSOXExGLGRiTExONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwGCgGhkhkQDBoEpLKQoBACAyOUID1qTVwoQGvMPxNFgVjAxp6QCQUicSCwVgkG44HJCKRRCYUCAxIFRYXhxgZGhYbHINEHR4fGCAhIiMkFSVKJicoKSoFKwMsLZtDLison6GjLA92qCueoAUvpC2xQhWqrLYDErmEMDEXlDIwMxAHukI0NS01EzY2NAmPAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +lsub-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAQABAAAAImhI+pFu2+QpxKVppsxkh3fnhh9DyGcC6IwLbqir4HK58tLcfx6xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +lsup-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIlhI95YawYonwp0uoukFO7rCXCSJKPcKYKuqqii7BvS892XJZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mail_forward-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRydHxubHxmZGxiXHRmZFxOTFxGPFxKTPwCBLymlMy+pOze3PTq3PTu5Pzy7LSmnOTaxOzm5LyqlNzOtPz69Pz27MzCtLyqrPT27IRubPzuzNTGvNTCxLSelPz25Bw+ZFxKPPzy1Pz65LyupBxKdCxWfPTm1Pz23LyinBxGbGzO5DRafBxWfBxajCymxHTS5BxSdBxKbFTK3EzG1CSGvCyKvCSSxCSavGTO5GRaVPzqzFzK5EzG3BSCtAwiPGxaVPTivPzy3NzKpBxObCRefBxqlPTmzJR2bKyahAwyRPzmvOTOpKyObNS+nPz21AQOFKyOfPzuxAQCBGRORLSadPzyzLymjMy2lOzetDwuJFRCPEw6NEQ6LEQyLEQ6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAAQABAAAAfhgAABAgIDBAQFBgcIBwmOCQIKCwwNDg8OEBESjY8CDBMUFRYVFxgZDJyOGhsPChwVHR4fFSAhjwkaIiMOJBQQDRUVJSa3GicoHw4pEA8SGSorLI8tLtQu19gqLzDECTEyMzQ14zY1Njc3ODkqCTo7MjIxNCs5PD03PjctPwlAQUIihhBpQbCIihtG+CUocASFkAhIkogQ8kFJwkcFlogIkoRJEydPnkBR6GiAxiQLgiiIIkXElFQJqESoMsRKkAhXqkhhApNKFSxZggTJ4nHIEJhaDhzYwoVLFy1avHyB6ScQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mail_generic-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBGxaVOTe1Oze3OTWxOTWvNzStNzKpEQ6LOTezPz+/Pzy7Pz69Pz27Pz25Pz21PzuzPzuxEQyLLyinLSmnPz67Pz23LSafKyObDwuJMzCtLSelPzy1My6nLymjNTCxLyqnPzq1LyihKyOfOzavOzetEQ6NPTq3NzOtLymnNTGxJR2bOTOpPTivNTGvLymlKSShKyahEw+NOTe3PTm1Pzu1Pzy3FRCPPz65LSadFxGPOzm3PzqzPTmzPzmvEw6NCH5BAEAAAAALAAAAAAQABAAAAaqQIBwSCwaj8ikMhloOp/QpmAgqAoIhELBUDgcEIGEYrFgNBoLx+IBiRwkgQnFoWAwKhWLhX3BZAILGhsCDXgODhwdGB5vgAofICBlDiEiIx4kJSYBJ2UoEykqHSMrLC0nLWAnFS4UCycvMAcEMR0RLTIBMwaSahw0NTYtFwclNwEdLws4eoc2DxwQOR06ASk7PBAhIRE9Pj0tLSUY1T8I5gjn6Qgy7D8SfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail_get-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAxKdBRSfCyGvFSm1BxKfCSWzCyWzBRCXCRKfBwuRAQGDDw6PHy23Cym1CSSxByCxBxunBQSFKyurMTCxExihNza3NTW1JSSlMzKzFxaXLS2tNze3KSipCQmJGxmbNTS1KSepLy2vISGhJSWlHx+fERGRPz6/IyKjDw+POzq7JyenMzOzKSmpCwuLDQyNIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQIBwGBAIAsOkUjAgFJRQQMHgjC4PBIEVgAh4D4aEYrGAMhINxwPyiCgYSsmEUmk82grLRZJkYCgXaAEKFxYZcEISGhsZFxwFeY0WHR5CDB8dGCAXG5shGxQicBIMpSMUGxgTGSQlpQwSJicnEwwdI7gdKAwTsykpKiobr8QMKxeHDBcsGRvOzxsT0i0uL9HSHdkT2ZkoMJXF4a8AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail_replyall-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBLymlMy6pOTa1PTq3PTu5Pz27Dw+POzi3PTm1OTWvPz25FRSVERCRLympPzuzPTu7NTGvFxaXKSmpPzu1Pz65Hx6fHxqZPzq1Pz23HR2dBw+ZHx+fISChJSWlDQmJHRydCxWfBxGbJyenExKTHRiXPzqzPzy3CQmJDRafGTO5ExOTERKTGxWVCRSfHTS5CymxBxajBxWfPTmvPzy1CyixCSaxCySxDSaxDSWxDSSvDyaxGS21PTmzPz21AwiPBRejCSavByGtCSezEzG3FzK5FzG3GzO5FTK3CQ2bPTixBxqlCRefBxSdBxSfBx2nCQ+dHxmXPzmvLSafAwmRAwyRPzyzDw6POzavNzKpAQOFPzuxBwWTBw2ZGRORLyWdMy2lOzetPTivAQCBKyObOTOpAweNBwWVEQyLEw2LEQ2LDwuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAf4gAABAgMEBQUGBwgJCguOCwEMDQ4PEBESDA4TjY8DFAwVERYXGBkRm4+QGhsMHB0eGB8bDpyOARogEBceIRgXv8COIiMkGB4lJSYnIcwoKb/DGyoXKywtKS4pHinMLzAxJDIzNDUtNjcv6B0hLzgfMh85OjstPDw99zwd7T4/LTVAgggZQqSIECNHevSAgSSJkiVMmjh5AiWKlClAiFARUeVHFSVWmLS40gNLlh5agGzh0kWDlwZfrIDREKaCAjEqrFA5MMYLmTAxlJTxYoZMozNozqRRs4ZNmy5s3LwhA0dBnDNn5MxBoAABnTp17IitowDrmQV+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail_reply-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTEw+NFxKTFxGPPwCBLymnMy6pOTa1PTm1Pzy7LymlOzi3HxqZOTWvPz69Pz25My+tLympFRGRHxuZPzu1LymjNTGvNTCxBw+ZPz23PzuzPz65PTu5NzOtCxWfBxKbPzq1DRafGTO5BxGbPzy9HTS5CymxBxajHRiXPzqzCyixCSaxCySxDSaxDSSvGS21GxWVAwmRBRejCSavByGtCSezEzG3FzK5FzG3CQ2bPzuxAwiPBxqlBxKdCRefBxWfBxSdBxSfBx2nCQ+dPzy1CRqlAwyRDQmJPTmvPTixLSafOTOpAQOFPz21BwWTBw2ZPzmvNS6nPTivAQCBAweNBwWVNzKpPzyzLyihGRORLyWdMy2lOzetKyObEQyLEw6NEw2LDwuJEQ2LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfqgAABAgMEBQUGBwgJCguOCwEMDQ4PEJYRDhKNjxMPDBQVFhAXGBUSGY8LGhsQHB0VHh8gFQ6bjgEhIiMMJCUmFbS2CwMnG6IoKSorI7WpEycWFiUsLSou1yXXji8wFiopMTIzNDUz4zbZNxsbODk6Ozw9Pj8pPzEzQDdB60JDOkRFjBw5giRJDCWdlmxwIIRJExAWKDRyMgTIiydLoESRImQKlSUSF1SxUoXAlSBRsGSJoCVICIlbqlThcoBClC5eYFD4EiVIFwUyqywAE0ZMlqNjpJDpIkUBl0dlFChAYOZMmTJoyqQR5icQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mail_send-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBHxqZLyqlMy6pOze3PTq3PTu5Pz27Pzy7LyinOTaxOzi3Ozq3LymlOTOtPz69Pzy5My+tLympPzqzNTGvLSelPzy3BxGbBQ6VPzuzPz65LyupNzOtPz+/GzO5BRejPzq1Pz23LymjHTS5CyixCSavBxqlPz25LymnGTO5CymxCSaxByGtHRiXPzy1CySxCSezGxWVPzuxKyOhMy6nDSaxEzG3PTivNzKpKyOfPzu1FzK5PTmzJR2ZLyihLSWfKyObOzmzPzmvDyaxOzavLSafGRORMy2lOzetDwuJEw6NEw2LEQyLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfUgAABAgMEBQUGBwgJCguOCwwNDg8QERITFBUWjY8DFxgZGhsaHB0aD5yODB4TGB+kICEaIiOPCwEkJRcmJyYPKCIpKrWqKywTmC0SIi4vMDHEDCsyMg8zEyI0NTY3z7U4Hhs5Mx+0IyI6OyPrIzw9Gys+PxIy2EBBxAs8Qjk5Q0RFWFxAZySfgSMsilRAkiRECHQ08hHgJ0TJkCU/mECU2ISEkowUlpAQ4QTfowNPoAzJIeRJCyjm8kVRIkWIzSkXhwxJtYAKgp9VrFi5QoWKFZ5+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +matrix-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBIQChCH5BAEAAAAALAAAAAAQABAAAAIrhI9pwQHt4Jru2Vsjna919lXKeEimh6UZp1lrCEvkfILyirOby3q1OEv4CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +misc-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChMTCxDQyNFxaXKSipPz+/CH5BAEAAAAALAAAAAAQABAAAANdCLobwbAFMciLwBFSihBEFHSG8QnmpQQEBX6loI5G5QTlcMgrZSmEmsGxKqRWNV3hMrFlBtDoA1eTEaKHJdMYhR6+gxkF++UMGbiDzvDVioyHAJSHcchuGLQq4k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +move-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhA8RyKja2HtRrmrxNfDszm3JMpXmiULg6Hyto4kYO49Tfdc04xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +news_subscribe-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/ERCBDQyNAQCBPz+/FxaXIQCBMQCBKSipMTCxATCBMT+xISChASCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARsEEgZxLxYDlJsvsJGDN0nFQRhpKR3DSJxrGMphYQgpDI9WLhdTtjjAFApXZI30m2UQwICVigcEzzolKAYIAIFBAKbQjQX3YGGISZvFtzFQr1uDxT4PH0yYE8FCg0/Jn0MAwsNOiY3IQMBEn4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +news_unsubscribe-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/ERCBDQyNAQCBPz+/FxaXIQCBMQCBMTCxPzCxKSipAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARiEEgZxLxYDlJsvsJGDN0nFQRhpKR3DSJxrGMphYQgpDI9WLhdTtjjAFApXZI30m2UwxjsiOApB4kNLFtQKKopxeCQxR4GAJIXPCInzmhN9zvCljNq8ZvswmzhZHEfOhpofhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +next-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFwyXAQCBOze9BwCHNx21LQCvPSi5NRi7AAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ3EMhJqwUhAMG7DQOxdVwFFuI1nYZIethwIK0aFwjtwrfh15cAYUjcvWyvkm1Z4TGfkyN0avFHAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +ok-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBMT+xATCBASCBARCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAM2CLrc/itAF8RkdVyVye4FpzUgJwijORCGUhDDOZbLG6Nd2xjwibIQ2y80sRGIl4IBuWk6Af4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +openterm-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXFRSVPz+/PT29OTm5OTi5DQyNDw+PERGRExKTHx+fISChIyKjHRydFxeXDQ2NCQmJBQSFAQCBERCRMTGxHR2dGRiZExOTDw6PCQiJAwODCwuLFRWVOzu7BweHAwKDCwqLHx6fBQWFGxqbGRmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAanQIBwSCwKAwKkMslEAgSDqDRKqBYKhkNgcDggEorkMrDQchkNhuOhgEQkk0l5S2lUGpYLJqPZTAwMHB0DCmhqAW0Rfh5zAxgOkBcCFAcfIBMECxwBBAEPFw8dChkhcBMDDAcdnQqtFKSWcQMimx4dGRkQBxGxsg6bBQEawx8jl3GnJFoFHRNXVVNRJYIFDAsL1tgiDiQXFx0HABwcXeQH5OjkRutEfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +paintbrush-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTC/AQChPz+/MTCxKSipDQyNCH5BAEAAAAALAAAAAAQABAAAAM7CLrMIS2qN2Sj1U4xugaYZxFE1wUaURQnKpFBYQTuFRiyXDsCd8y7RYhmCQ2IkiHywmkFN84ibfrxJwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +paren-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAQABAAAAI3hI+JEQq8mnvyzSOhEWJ3CgLcOILV4IlfUx1cwirfYiEvXL83arANSer5UipM5tIzXjRCh8ZfAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +pencil-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +player_eject-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+py+0R3IFQUtruXVqn3kkWyIARR4rqKvoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +player_end-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +player_pause-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +player_start-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +player_stop-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +previous-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFwyXOzC7PTq9OTK7IQyhBwCHNRi7LQCzPSi5IQ6jLwKzORy7AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ8EMhJKwg4W5o1EGAIbt8wEERhHJ0mIEmiLAH5IYxi1JcnvTOeTdDYcVo1gfHY+hxs0IkvSpV2qtgswB8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +prod-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBIQChCH5BAEAAAAALAAAAAAQABAAAAIihI+py50Bo4SKHlsDwk9fn21gJzIcV37miKpuZ0nOTBt+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +queue-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBMTC/Pz+/CH5BAEAAAAALAAAAAAQABAAAAI5hI+pFrEahGgPtCinS2GMlknU0Xkflm2l6YEiw8aRGssTXLe3lZsznvuRViwholEcLZCfynGT8BcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +redo-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxOHBxSHBRGHKzCtNzu3MTSzBQ2FLzSxIzCjCSKFCyeHDzCLAxGHAwuFDSCNBxKLES+NHSmfBQ6FBxWJAQaDAQWFAw+HDSyLJzOnISyjMTexAQOBAwmDAw+FMzizAQODDymNKzWrAQKDAwaDEy6TFTGTFSyXDyKTAQCBAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ2QIBwSCwaj0hAICBICgcDQsEgaB4PiIRiW0AEiE3sdsFgcK2CBsCheEAcjgYjoigwJRM2pUK0XDAKGRobDRwKHUcegAsfExUdIEcVCgshImojfEUkCiUmJygHACkqHEQpqKkpogAgK5FOQywtprFDKRwptrZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +reload-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCRaJBxWJBxOHBRGBCxeLLTatCSKFCymJBQ6BAwmBNzu3AQCBAQOBCRSJKzWrGy+ZDy+NBxSHFSmTBxWHLTWtCyaHCSSFCx6PETKNBQ+FBwaHCRKJMTixLy6vExOTKyqrFxaXDQyNDw+PBQSFHx6fCwuLJyenDQ2NISChLSytJSSlFxeXAwODCQmJBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIBQGBAMBALCcCksGA4IQkJBUDIDC6gVwGhshY5HlMn9DiCRL1MyYE8iiapaSKlALBdMRiPckDkdeXt9HgxkGhWDXB4fH4ZMGnxcICEiI45kQiQkDCUmJZskmUIiJyiPQgyoQwwpH35LqqgMKiEjq5obqh8rLCMtowAkLqovuH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +remove-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBMQCBEQCBIQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMuCLrc/hCGFyYLQjQsquLDQ2ScEEJjZkYfyQKlJa2j7AQnMM7NfucLze1FLD78CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +revert-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAAQCBPwCBPz+/PTizCQeHDQyNBweHAQGBAwKBDQ2NPzu5PTi3ERGRCQiJHR2dPTi1CwqLPz6/Mya/Mxm/GQCzFRWVGRmZAwODFxeXExOTExKTERCRBQWFMTCxKSipMzKzCH5BAEAAAEALAAAAAAQABAAAAV9ICCOQWkGIiqsQloCKCqy7UC8MC4URSsMhsDBNWOJEK4TYJfoGU8vmmJBGI5SyyYj0XDQjMvVQwBxRCQTilowFGwrjG5kTo+0x4OdpcLvV0YXIhcGGH0ZFRobOSccfB2PHR4FiyYAGQwdAI8eEAdQKBsZmR+RBpSVVyMHfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +rotate_ccw-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXIQChEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM0CLrcHjA6JcK4ET68MrNDoIgjOYbdJ4IXagIa3IqVFAMEOqpfn067ErBxG0qGsCJyyQT4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +rotate_cw-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBIQChFxaXEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcHjA6FaG4YbS6At5BR31UKI4mADGhd31rpbmCuZ6qQLA8XvqT2+QhHLKKxqSy4U8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +rotate-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXIQChEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM0CLrcHjA6JcK4ET68MrNDoIgjOYbdJ4IXagIa3IqVFAMEOqpfn067ErBxG0qGsCJyyQT4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +rsub-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAQABAAAAInhI8Jwd26YJBUTVvT1Rlt3x2f6DjQeQiGigLCC7crK7+yC9sty/oFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +rsup-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAImhI+pGtZ7gpwQyWofnnQ7I4SiuAjlqZgpmqgti7gxfMh1OY6LXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +run-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/ISChKSipMTCxLS2tLy+vMzOzMTGxNTS1AAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARlEMgJQqDYyiDGrR8oWJxnCcQXDMU4GEYqFN4UEHB+FEhtv7EBIYEohkjBkwJBqggEMB+ncHhaBsDUZmbAXq67EecQ02x2CMWzkAs504gCO3qcDZjkl11FMJVIN0cqHSpuGYYSfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +signature-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAFxaXPwCBAQCBDQyNPz+/KSipERCBAQChISCBMTCBPz+xMTC/AQC/MTCxPzerAAAACH5BAEAAAEALAAAAAAQABAAAARwEMhJZwgCiM17DoMkEGRpAmGhmSxhAOrakim6DgeLJApRhCPCgJRT8AhGEVFIQigAxgSQsBgwms8oIrDKDZNGxJY7GuYQULHhQj4shAmAuNAQsFc9xY4uUNgvMiQOBIMOfncjeUhICocXAx6RfwF+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +spellcheck-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPzCxPwCBMQCBIQCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLrcGuHBNZ+NIOJ9O4MTaH2e1nDoiFYZJjgwIAzwy8yEgy84RhWDQa4HCwAHxJgxSPApC83YyQnwJwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +sqrt-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBIQChAQCBAwODAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMyCLrcDiHK6eIL9WmsmwWCAAyiwkGKGILihzLq8p1s9onE9a48Iy28ko/WgRCLyGTDnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +stamp-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xMTCBISCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLrR+zAIMQKMguh6GR2g1QEBCBLiGGjo+DSpS3IqXNqxNAnwzisSk3BowRltM8IAZVMqi84lLNoqUVfLrOhoVPgTACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +start-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TAQCBBxObISevNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAQSHBRWfBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnAwmPBRWdByixAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZrQIBwSCwah4HjUTBQEogFw/M4BQgMh2pxijAkFAhBYJwUPq8LRsPxWDwgkSHhelA0JJIJnlKRWy4YGRoSGxwcHRsecgAfICEiGhMjJBglVVMRgBkgJp0El0MRJyhaRFqipUoAFqmqrapHfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +stop-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/Gw6NGQuLHQ6NGQmJFweHFQaFPTm5PTa3PTW1Oy+vOS6tNSinKReVDQWFPz+/Nx6fNyCfNyGhNR+dMxybMRiXLxGRIwWFNx2dNx+fNx2bMxuZLQWFBwWFPTu7Pzy9NRqZNRuZMRSVLwmJGwWFNR2dMQiHPTKxMxmXMQyLMxmZNx6dMxiXMRSRMRaVKxybMxaVEQWFMQuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaaQIAQEBAMCAWDYcgkHhAJxYLRcDQBggckIplQKpaLdRh4YDIaSWa94Vw6woAHgv6AMKGPaMQhwQMJJRkfhHmEJhdvRCcgGSCEkCgpbnAECiorGYYfLCItlAAFCygQj5AfbYlwBQwVE5AukG6KBi8tMC0fLi0pHxyzcAAxFxwmMny/wEwOxMm/qlcdJCSJ1H5XQh3a28HY3kx+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +sum-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBIQChCH5BAEAAAAALAAAAAAQABAAAAIdhI+py60BowyPJriwQ3qb7oGNyJCZtZHixHpu4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_block-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_bold-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +text-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIlhI8Jwe2/AmpTynqPTXSqrnBM+I0kdmpmGmUp+K4nPMvhYx9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +text_italic-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_under-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +toggle_log-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBATCxMTCBPz+xPz+/ERCBASChISCBARCRAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEIQJqpXBBjFI1oGncYU4EUXxSWQZlum6DXDQpeo0tR6KqqgdLXiLBWepHgyYIxF/TKHv9XvtDDfb0So5YHuTgThYCXgH4Q6hqvEGEIm4PLGSyHX4OkZv8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +top-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBBRObAQSHBRSdISevBRWfAweLNzu/BSOrAQWLPz6/FzC3DzW5BxObHTS5ByyzAyixEze7BSStBRWdAyWvByixCQ2TBRGZJze7CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZjQIBwSCwSA8ik0kgUDJhGQsFwgA4FBUTCoLBiF4zGtmt0FBYPSEQyoZCvWQakUok0LISnkHBBYjIVGhscS0UGHRUeHyBWAAIhiYuNAggVIgmMVgYjJBolAZMKJgpIjaanRH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +transform-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCBPz+/Pz+xFxaXAQChAAAACH5BAEAAAAALAAAAAAQABAAAANOCLrcEDAGt4K4F46wmcVCQIzE4F1DukksehVkiUlDYcdfCAyEGI+D2aP3G+UmPF/MAJpwnpuNgMmcKHKgabWSvRi+ums3a32wzmWKw58AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +undo-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxSHBxOHMTSzNzu3KzCtBRGHCSKFIzCjLzSxBQ2FAxGHDzCLCyeHBQ+FHSmfAwuFBxKLDSCNMzizISyjJzOnDSyLAw+FAQSDAQeDBxWJAwmDAQOBKzWrDymNAQaDAQODAwaDDyKTFSyXFTGTEy6TAQCBAQKDAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ1QIBwSCwaj0hiQCBICpcDQsFgGAaIguhhi0gohIsrQEDYMhiNrRfgeAQC5fMCAolIDhD2hFI5WC4YRBkaBxsOE2l/RxsHHA4dHmkfRyAbIQ4iIyQlB5NFGCAACiakpSZEJyinTgAcKSesACorgU4mJ6uxR35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +unlock-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJExGHEQ+FCQiDBwaDBweDGxiLHxyNHRuPIR+RIyGZJSSfFxaRGxmLJyaXNzWpNTOnMzGnMS+jJSKTGReLKyqjPTu1NzarLSufKyibJySXIyGVGxiNFxaXLSytPT29Ozu7OTi5NTS1KyurGxqVCQeDJSSjLS2tNTW1KSmpGRiLKSebOzuzJSOXExONExGLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaVQIBwOAwYA8SkMCAYOAnKYiFAIAQGyOgVCggYuEovVxztMpdnwAGRSCgUCwOjIeQ6HpCIZDKRUNYMRBUWF4UYGRoWGxyBRR0eHxgaICEiIyR0QyUmJygpKgUrAxMsLUQlKyieoKIuEAunK52fBS8DLiywQySpnjC1Mbi6QjIzNBeSIBY1EQfDQgosLAEUNjY3Co1DfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +up-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObAwSHBRSdISevBRWfAweLNzu/BSOrAQWLPz6/FzC3DzW5BxObHTS5ByyzAyixEze7BSStBRWdAyWvByixAQSHCQ2TAQCBBRGZJze7CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZfQIBwSCwaj8hhQJAkDggFQxMQIBwQhUSyqlgwsFpjg6BwPCARySSstC4eFAqEURlYhoMLBpPRUDYcHXt7RgUeFB8gIU0BIoiKjAcUIwiLSQUkJRsmGIwJJwmEU6OkfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_choose-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +view_detailed-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_icon-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrcG1AwGOQbw6qANeCEB3pCSZpO6pgowJZqLKuUGE0dnuEhf8IL1kz1shSHDX8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag--16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ+QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7Kmpl0CtLGLvbW2Zn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ8QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7GLArS5Q7O1tmZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag+-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6cAsLECrqeys7WxpqZdtK9Ct8C0fsHAZn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +view_multicolumn-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrc/ixI0WSgKoyBl+beQFACpo1AqXbKCr1wLAMWS08hGG3dSZqin4sxnBmPD38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +view_text-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIchI+py40BTQSwuovp3DXkv1ia1IHmIXLiyWJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +view_tree-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBDQyNPz+/PzerAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAMuCLHcri4yGISlj4kxcANgNRBQCIbL6U1Su7bB62rXvGydG25kqpwfIGxILBr9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +window_fullscreen-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBNTW1MzOzMTGxLy6vKyurJyenHR2dOTm5Pz+/IQCBOTm1Pz+9Pz+7Pz+5OTmzOTmxOTm3Pz+3OTmvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVuICCOZAkEaKquqzAQRWEYR32gSK7vO5oowKAQmPAtjkPFccEwLoaNhuPYDCSeT2B0+lhAfMHF1kF+PL5W7ZhrjqAk4gW53J0s3AG4nP6Y2BcUKAxLZn1+S4EBDAwQEIsUDBQRFJSJLJcoJpojfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +window_new-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIUAAFxaXGRmZFRWVGQmhFwmfFxeXOTm5MTCxLyWzLySzKyCvKSCvJxyrJRmrIxipIxWpNze3AQCBMTGxJRWtJRatIxOrIRCpHw+pHw6nHQ2lGwulOzu7Pz+/Pz+9Ozu5Pz+7NzexPz+5Pz+hPz+3NzevPz+BMTCBNzetMTCDPz+xNze1NzezPwCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACwALAAAAAAQABAAAAaVQEBAMCAUj0aCYFkwHBAJhWLBYDQcD8ghIjhIJhRKxXLBZDQaiYQLABDe8PiSu+HY7/dOh+PhQvB4eh8fIH6Adh2DHyGFAn+BiQAiISMkhnmSIQAlI5KXHIkfAiUmpCUnhoKLISgpIikmAlwqtCArkiUlIhwiuSKyEcHCESausMEsycrJEaaly9ARIizN1NPQ0dfJfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +window_nofullscreen-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBNTW1MzOzMTGxLy6vKyurJyenHR2dIQCBPz+/OTm5Pz+9OTm1Pz+7OTmzPz+5OTmxPz+3OTmvOTm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVsICCOZAkEaKquqzAQRWEYR32gSK7vO5oowKAQmEAtfr9hgpFoGBWJpDDqcAaOUSHDEU08nkOG2AGBfK/aMYQMiRi7Ywe5674yE3I2JCqZoChLeGwSEgmFfgFNDQ8NjQ0TEROSRSyVKSaYI34hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +wizard-16:actions actions16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xPz+BMTCBPz+/MTCxISChDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAREEMhJg6BYWhAGv5k2EKMXToSgEqc1DEIhvGAWpOvJFSXZyoXOxxY0BDahQDGg4xgOxmbgiWDqpoeqlGrVcZuSbLfpjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +abbrowser-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipMTCxISChPyqXPzerPz+xPz+/FxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARhEMgJQqC4Xms1tkIgDEMYXpMYEEJRCIT6Ea5R2DHFtQZBG6dNoHQrsAyH14DDWiENBsQhBtskEs4Dohe4oiqE5So2zElECEKCrCYgQmcRVnRKnFIdC0L4/az7GXiBg4N+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +access-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBGRufLzi7PT6/NTq9OTy9MTm7LTW5LTS5LTO5KzC1FyGrExSXHzG3Gy+3FSStPz+/ESGpFSmxEySvEyKrER6nERylExqjFSSrKze7EyCrDxulKzG3GSuzGSitEyWvER2nEx6pKzO5DxmhLze7DxqjExihERadLS6xERulEyOrLTC1KzK3ERWbERujFRefGR+nKTO3LS6zLS+zFRmbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAQABAAAAa1QEBgSCwWhYIBocA0CA6IhEKwYAQKDccDAolIJpSK5aKwFhyYDGSQoWgqm4uFYyV0PAeIIPIeayZlVw4OFV19FxoSGoFnH1tcayASIRciVgYfEWoQIxcLk4gHlxQCnJBcJBUSdAEHhQediSV5ExWBBxYQGSZelLkHJyhWsHmSISkHKpsrViwWJ1xPXCAtesIBCiUaGHm6LiYvLybXMAQCMQosBwcoMjIzMTQMAC0M9vf49wB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +acroread-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAASC/PwCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIlhI+pELshmkOhzmTvyZrFDglRxVEiGUoUualtx7gOC36gDGt+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +agent-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipISChPz+BMTCBISCBERCBCH5BAEAAAAALAAAAAAQABAAAANLCLrcHkFBt4IY8EYKYCAT9xVBYRhbM5KFeaRVy56oSsgQ/TLrB567ym10ChiCnRIRaJx8lDdd86UkEWjHaURZwlKRHpM0xPOYGf4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +aktion-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAI5hG+hIuigAmMvLTlfnJiePQndt4SMFFioeaagaEbvySlQF6I2BLPRwYntDLlaylH8VXLDpaiJ8BcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +alevt-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/Pz+/AQCBAT+BPwCBAT+/Pz+BMTCxCH5BAEAAAAALAAAAAAQABAAAANFCLrc/i3ISadQYQhSehFecAGiYJ6oiJmaZrymSrKCJhinXLYmHo+l2skn0KGOPwyBUHPhOrqKVIWsmhqHyqhhPUG+Cn8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +applixware-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBKSipAAAACH5BAEAAAAALAAAAAAQABAAAAIyhI+pGbsBHYtHCGARbMhms1HVB0TieJhcl23liXkinAmhy7732UL9GnsZeixczChB+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +ark-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBAQCBPyCBPzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLoQwTBK6dy8WNQgptAbB33DQGzlx3xE65RpBwgtCw9sR7e1gO8EGYs3DMoUH5rPqFylSrzaygcjHqdQVUYL8ScAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +arts-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPz+/KSipPwCBISChAT+BARCBMTCxDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAMALAAAAAAQABAAAARTEIQ5xbgYAwJksFhhaFTVdeLpURYwAOL7cp6gpmcZHEQPGyIOLRAkiI4GTqmIDG5QwGihuRIBU8boasLzZbEd082QK7VkrvTwo2pvP5m4GxHP+CMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +background-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAAQCBJx6NJR2LIxyNJR6NKSORKyaTJyGRJyORKSWTJyKRKSWRKyOPKSKPHRKLEwiFDwSDEQeDGxGJLSeTKSSRKyaVLyaPLyaTGQqFFwyHGwyFEQWFDQKDDQKFEwmFMSiTMyiVJRuNLx+LOS2VOy2ZNSKTFQeFGRGJLyqXMymVOSiVOy6ZOymZKxyTEQODDQOFLymVKxuNMRyJOSeNMx2FLxiJLRiHFQaDDwOFDQODFw+HLSiVHxSLFQiFIQ+HKxmNJxOLJRSLIxGHDwODGw+HNSSPOSWNNRyFOyyVOSOPARihNSORKRSFLR6TPz+/MTCxKTi9JTW7GSy1Lx2THw+FNSOXJRWNISChASq3ASWxARynEQaFMx+JJRSJFRWVARafARSdHxeLFw6HPz+7Pz+5GxKJDwSFIRSNHxGNPz+3MSCPNSWTMyGNPz+9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAQABAAAAfXgACCg4SFggECAgMEBQYHBwgJCAoLggsMDA0ODxAREg0TCxQVghYWFxgZGhscHR4LE7GCHyAhIiMkJSatJyi+giApGCokKywtLhwvBzAwgiMxGDIzNDU2Nzg5OjsTghc8PT4/QEFC2EMeCZUARKpFRkdISUr09YIYET0qS0wqTUpOnkCJIkWQhxsbpsigUsWKkidXsGTRIkjHgy0YuMjoYkKJFy9KvoARFEZMBAg3UkIA6MTJGDKCBpQ5aebMGTQsx4xJU/FBBIxq1rAB4KTNS56Gkg7yEwgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +bell-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBEwuFLR6PLRqJHQ6DNyuhLx6LKxiHDwiDMSOXLx2NKxaHAQCBHxSLGw+FKRyLFRSHLR6NIRKFExGHNTStOzm1KyqfIRmNHx6PIyGRFxeJNzavOzq1MTGpKymfKyqhKSmdGxqNDw+FPTy7KyuhNzevISGTJSSXLy6jOzq3Ly+lJyabHRyNCQmDKSifAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ6QIBwGCgOj8iAYEAIIJ+BguGAeCYTigXDegw0DI4tl/gQj4WB8hkAgUQeEsaEC6FULBdMRjN/QjYcHR4fICEiVn8jFCAkHxiHfiUjHRYfHyZmR4kdICAeJ5lCECgVKSorJysrLC1IEBgVFSgunSAaoWwTIi28DL5HfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +blender-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBDwiDPSyNOyKLDweBFQuDFQyDPSeNEQmDIxSHFQ2DEQqDARWjARGdASO5AR6xAQiPOymNAQ2XARqtAQKHOSmNEQiDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVqICCOQBCQKBkIA5G+63C+RW3UrIsSQt8fA+CMREAQgIkaUEdSsBK6hZBUeJ4YjRLQIKoOBgVAw/GAAAqRk+EJBkgmDQrAUDGxTAMBAgCR89oFOgF5YQAWdy8EeTeILyV5jY5nBAGFkpJ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +clock-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPzerPyqXMRaBIQCBISChPz+/KSipMTCxPz+BMTCBPwCBPz+xPzCxMQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVxICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +colors-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBAQC/MQCxATCxATCBPyqXPwCBPzerAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMgZ6rwYBCFsvtXWeWA1DBU3ggRhomJQBm14dlJYFFXrbjKNwVDZ9Vw4TWWoKyCDgcNhyXQClVLpMmANIRAhLdGa+36j07GrfM4GiKTAGfsOlmYZfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +cookie-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBNzeDJR+BOzmVNSqPOSmBNSCBKRCJFwuBOSOjMRSTLRaXFQODMxiXOS6vIwiJGwKDHx6fKyqrMSOjNRWVLRaVFwCBJyanJSKhHRydPTy9PT29OyytIQSFPz+/JSSlOTGxIQyLMTGxNTW1Nze3Ozq7OTe3FxSTGxqZNza3Ozu7OTm5MzKzLy6vLS2tNTS1FRKPGxWRMSypJyOhKSOfPTu7LyupFQ6HMzOzEw+NJR2XKyOdFxGNHRSNJx6XGRCLHRCDMy+tGxONDwaBHRiVDwyLEQuHJRyVJyCZLSilIxiPIRePHxOJIRWJFwyFEwqDCwWBBQOBDweBKSCbHRKLHRKHIROHGQyBFwyDDQaBIxqTHxOLGQ2DDwiDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe4gACCgwABAoSIiAMEiY0ABQaHjoQHCJOECQoLDJeCDQ4PEJMRERITFBUWFxgZhKQaGhsKHB0WHrcfEQARGxu3HiAKIRgiIyQlJicoGym+KissLRIuIi8jJTAwJjEyGzIYKxszNDU2Nzg5MDY6OyQ8PT4jP0BBQkNERUZHOkhJSktMZDQBcsTJEyhRpOybcuSIEipVrFxBgEVKFigATkiRgkSLki1UgFzh8kRKFEQbN3aR0qULIT+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +date-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPzerPyqXMRaBIQCBISChPz+/KSipMTCxPz+BMTCBPwCBPz+xPzCxMQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVxICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +dlgedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxFxaXKSipPz+/AQChAAAACH5BAEAAAAALAAAAAAQABAAAANLCLHcrSLKOVccAuvMLf2Rlw0bYRKFGBGZWQioRc4kPKfB+qFFL9ODF+EmKxh6vZOreETCbLiMESkcxnIgATXK2XgFqmxI4SgvAP4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +emacs-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBDQyNKSipPz+/FxaXISChMTCxCH5BAEAAAAALAAAAAAQABAAAANJCBASoXCFoVi8VdL6HHQeB4YjSAxnYQygSLzoSTjbEs9vMF86cbyH34NX+AELQ4zO+Nopm6cBC1PBEQwG6gd3SGo7Xa1STIb4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +email-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBGRWVAQCBOTWvKSShDwyLOTazOTaxPTuzLSilOzi1OzezPzy7Pzu1NTKtKySfPzy5Ozm3Pzy3PTq1NTCrMS2rNzWvNzOvMy+rLSmlPz69LSejIx2bPz29ISChPz6/Oze1HR2dOTi5Pz+/EQyLJyanKSipOTm5MTCxHx+fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaGQIBwSAQEAoJi8RgYEApK49FgOCAS0CFTsVAwEA2CIysMJB6QCEQyoVQsZOMFk3loJoeNAk4MGBQOFAQcDw8IfFoLDB0cEBMICIRxAV6NEB4aHwICk4wLIBYhIiObSxwLBSQkJaOlfQUFpCYnIyMoSVGbtQK3UQCbKCYprkq8m8S+uL4AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +energy-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBBQSFASiBHS2/JzK/KzW/JzO/ASWBATCBASKBHy+/Hy6/ByuHASCBAR+BATOBARyBIzC/MS+BASeBASOBARaBFym/Pz6BASuBEyW5AR2BJS+7Gyq7PT2BARKBDyC1FSS3IR+BJyaBLy2BPz+BCxuxAQ+BDw+BOzmBARiBCxyxBxetPTyBAQCPAxOpAQ6BAQ6jAQ2fAQ2hLy6BAQubAQydAQmXAQmVAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQIBwSCwaj0hAYBkQBJDLAaFgOBCWxcAAkVAsGIyG4/EUBh4ICCIicUAgkwTZjKBULISL3oHJzAMaDhscHYEODhMeExEfSyAhGxsgICIYHiMWJCUYSyYYJw8kIigoKSomKxgmSywYfC0YGCJ8rSwuS7EYJBYYLi+xE5tkARMoMCoYEzEiJDIzMjQiSzExMxGkNTY2NTc4NTNPTOLjWElHfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +enhanced_browsing-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBOTWzIyCrFRSTMy+tCQmVOzi3ExKhAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARFEMhJq6UhyHy3GNmnAeNEFAZwpuRRBiIMkkOBjKuKTsHtgbISybTLYX6hGc+lSxk3tVtMVOkFck9MMNjB7jqkEQdMlvgjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filetypes-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+/ISChKSipPz+/PyqXMTCxFxaXPzerPz+xAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARfEEgZqg0zV8EHF5XWEUMxkBwGBB9REIZLfBgrkEaen+l6F4cYgpA4vEC+ASIYSxQRnlrncEgoFFQP0laCHpSmnk+AEJQ8ZeRkw0mDVJT3JZQZw+trC77Ouu8pfn8AfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fonts-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+/KSipMTCxPwCBFxaXMQCBCH5BAEAAAAALAAAAAAQABAAAANBCLoQ/C+I4GAMY1ZGN80UJ2jA0BFbUxhjF6BWsQroawEyWhN37vKxQo0ChPhOPaGDIhhADr5FinE4TG5PrBbiTwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +gimp-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/FxaXMTCxAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM6CLrc/izAJVWoD4MgtL2R0F2k6HFiOgjDSRBq0FLUKxYDTmKBnf6gGqz3egWFhEvSQ9kxJ9CotOFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +go-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBERGRFRSVDw6PDQ2NDw+PPz+/ERCROTi5Pz6/AQCBKyurERGPOzq7ISGhNTS1DQyNLSytExKTLy+vKx+RGRiZPTipEQ6LOzu7PT29JSOjOzWlEw+LIyKjIx+dLy6vOy6ZEwuFHQ+DCwqLGQ6HNSWPMymfIxmPMyqjKSipCwuLMzKzHx+fBweHOTm5GxubJSSlAQGBHR2dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAadQIBwGAgIiMXhgAAoGAwH4QCRKAgVCwSB8AwwCo2n9ZpwMMSFhyEBGQoLEa5BMnkO3G/Kef2sMIdfCxYXT2oGGAIHCk0ZCBobHE8dHk8MFR+LgSAhXSIRdmNCBxScBiObCAYZI25wJE8SJSYECVVDCg8dERchJygPKSqsQgQNKwQFCw8fLC0KLi+LxH9YMDFX0ngAzzLZ2m4K3kN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +gv-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIxhI+pwaHZ2jNMWMFmvXk1GznHF4DhWF4cJlKpynpwB73ms3Etiq00EAr+hJGJ0eAvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +gvim-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+BPz+/ASCBMTCxISChAQChCH5BAEAAAAALAAAAAAQABAAAANUCBDMEqupNWoNJNgBV/mfwYCFqASgmA1h57VaO71lXLtPytZEBggZ0E7Vy2BQJEaRcDghP6iGb/IsNKBWKghZzb5EUau4g1KFz1QId+ydRRZwiD8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +help_index-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBPwCBAQC/IQCBATCxMT+/Pz+/ISChAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEIRJJZ1ACjF3GGAYaKNFDNfXldLJqmQWcKhcW6tkl1NhFJhdRmIwHIq8m8R3LAIlykCxiZQNl8XsU3eVZg0Y2LD3CyAQlassbEaz1N32Gz5m+SMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +hwinfo-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBBQ+XBRCZAw+XAw6XBRCXCRObCxihCxqjCRijBRSfAwyVCxehDx6nER+pPz+/BxKZAwmPFyWtGyevCRSbBxWfAxGbHSqxGSatCxulBxahBRKbAQiNEyKrBRKdAw6ZAwiNESSLCyCDBxWBDRulBwyRHS6ZDSWHCyKFDQyNCxqlAQmRAwiPMzalPyCBMQCBCx+DAwuRBQqPITCdFxaXCyOFAQeNAwmRAxKdPz6/GyyVMTCxKSirAQCBGzKZAwqTAweNFyuRDyeJFzCTITOdAQiPAQaNHzCbES6NEy6PESyNDyqLDymJPz+xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfBgACCAAECAwSDiYMFBgcICQoLC4qCBQwNDg8PEJERlAYNEhOaFBUWnokBBw4SFxgOGRobCxyJBQkNHZoPpR4fICEiIiMBCSSYmgoKFgslJicoKQQKCSoZmgW+KywtLi8pMDEbFRqaAcwyMyc0NSkiNjc4ObsrKyU6Ozw97j4lNhGSfsgAEkQIDxr7YAwh0qKIDSM2jgRpgbDHPhFIMiZRsoTJkhMgobUDMKKkySYjUKockYJSypcrWypKQbOmTT+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +icons-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPz+/ISChIQChFxaXKSipPzCxPzC/MQCBISCBPyqXMT+/MTCxPwCBMQCxMT+xPz+xMTCBPzerPz+BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAV+IBCMZBkAqCgMa8uyJxoMRFHUtz3Eqk0MBhxBwJsRaqTcLhUQ3AyHAMI0EtEI0pGrpU38SANFQazYGY+LqUChYDQUxCbB8YjOFJAIpGEePOpZAhITIxJxAg8JDwQPMxISERESfXSVTRIQAZKHLyuOFI8US1RNnTApqCJUAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +iconthemes-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPz+xISCBPz+/ISChPz+BIQChFxaXMRaBPyqXIQCBPzC/MT+/MTCxMQCxPzCxMT+xMTCBPzerMQCBPwCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAWLIBCMwhgMJqCKRBEIpWAMBRGsQXG8sIAiLpwNZpAFEAcbjlc0OI9BVcAWSDgHT9MtF1AsZrmamNpNBAyjwgCxpo0U5h1jOhg0HAMbPHB4QNIDEQIRDi5xfgFzBBITIxJUBQ8UD305EhIwEi45FQ+dFVMSES+PIy2nLgUSBpcGQVomqKc3K7WwIwB+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +input_devices_settings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxHx+fISChKSipKSirATCxAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARQEMgQpL03iEEx1gOxdR5YbCJXZUbqjusUhGitZkFri0VFUodXoTfjWCi6oY8Skxl6k4FhxZRRRxMC1TBdWn0CAbcZQFAH4WnGjDPiPICYPwIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kab-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChFxaXKSipDQyNAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANICLocHiyqIMQYUE5Ses8S1V0FGInFIJTalKpsS5FxKDxB/EzV4GUBQsXR87BQnRtNtxphfJ9FAAqbRqUXVfPaMH5MDRx44U8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kappfinder-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExOTDw+PExKTPz+/ISChAQCBPz6/FRSVIyKjJSSlIyOjGRmZNTS1Ozq7Ozu7AxyzPTy9ERCRBQWFIyqxPT29AQ2vOTi5IzG7DR2zNze3Nza3BQSFISy5CRyvBQenISmvBQitMzOzAQGBAw6rDR61Hx6fMzKzAz+/IzW7ASyvCwuLMTGxMTCxBwWFDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQAAgEBAYj0ahckAoEJ5QgkE5fBYO0SeCOigkFE2DeEFgUAUNBwGBeBAcCMHirF4gnhBCBCE5PydqBBQVFhdTSgJPBk8YGRQaG4dCiQQcDh0eHyAhIiN+BHYXJCUNIggmfhUOAQgbJ6YCKGcVKSUaChwGHCYqCyuIDhkhGyIsLcccCL6TFxsNJ8fRLS7KvyNi2GIrAQwK1AsvVOJULi4AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +karm-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBPz+/ISChMTC/MTCxPzCxMQCBPwCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEIRJa5Ui66H3FETHdcTwdcIofkVbUIJbmAEoZl95aoXxUrNdpnAIDFomgRA3yxxhIdxAlaKhAgUNYshyYVGxnMZInS6VzVSQPG0bkWaJZT4B+CMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcalc-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBATCxARCRASChAT+BMTCxFxaXEQCBPzCxPwCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEIBAq5U4iM17wJMwjORIfJkYFCs7nKA2rJQLp0Su66ikGcAg8OYTGA6BA/KAIIYsFudPGJQal8uAFVqxUg2JxBYbUGh7k5J6BppwKyB/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kcharselect-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/MTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANBCLrR+zCIGWCcI1cLpNCa5YHZsCmj2QTlxrZmmRFVSs4E7X13TqMTXsl36gSHuSIQQ+QYP0kncPCTokzWh3LhTwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kchart-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+/ATCBAS6BPyqXPzerPz6/Pz+BPwC/MQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARcEMgJQqB4WiFulhvXfaEwiJ4mEgExFCMVcENgBEXepdVhG7dcABGr/IJCQ8ICAt4IUIuSKAW2XMOD0qC42AIHV4277YIqKHKCy5txbIoyDy2Nr80yjyVwn5OYfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmdevices-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPyCBPyqXPzerPz+xPz+/AAAACH5BAEAAAAALAAAAAAQABAAAANMCLrcHjA6BcW4Q8AWLL7EFSwdOIRoOAKBiZ5EPJYvBMeDba5BQfg52ik4KPgKOVYqZiwYjLzb7/c0JCnSo3VFasFEXE5kMymbzwp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kcmdf-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcmdrkonqi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPzerPz+/PyqXMTCxPz+xAAAACH5BAEAAAAALAAAAAAQABAAAANKCAoRy+6pIESkVuLaKl8b53lOaA3EyIXBUBjpWHKDYNhxNrWv/aaRiWBwKwoIDZCH2EN+TMQjyzR0yhgqiyo4vT4wl48E8g0C/AkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmkicker-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFxaXPz+/ISChMTCxPzerPyqXDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgQqr11AjG6/4FGDEVZBOapWSXbToFhoKkZUjJGEEJvyUDDYQaKATElBOJklB0OgY5SWgnmpFJm4PkMjDxLFYXFGSCyN8mocDaD0xsSO6wUS6K1FBzDD/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcmkwm-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCRiXCRaVPz+/CRmZFRWVISGhMTCxESSjPT29DR6dDyOhDyCfPTy9CxqZOzu7Ozq7ERubOTm5ARehAxefPz6/ByaxBSOvBSGrAxynAxqlBR6nBRylAxmhARWdFxaXCH5BAEAAAAALAAAAAAQABAAAAWHICCKQTCeqCgMhJCihXEYSPuKRWIoC6PYsEZikHA4FA4CEJdoJh4QgXRwiOAeQudDIpEZIpPwhCImhyGGAmBSOVgumExG055w1ZPZhpPpUDwzExBqAAUDhxUVTQ0QEgWOOIcDiU1QjoSFFYiKDZYFmAWJlE9bkCM5iouWpiIfBa6frrKYAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcmmemory-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChAQCBMTCxCH5BAEAAAAALAAAAAAQABAAAAI6hA+Bu+HCmgiiRuNoHZBRXQlc84TmcHzm2WVryE1YvMaZIdbVd2zw7lj4bDKGbxK8hHgX3K2JUDD8BQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kcmmidi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXKSipMTCxPz+/AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLEL/pDJAONs1V2W1ebWJ46kKJxomi5D2QZEwRSyVMNyngf7Eg8FYHAIZMRoyCSNMSA0n85oszTxJwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmpartitions-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcmpci-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAADQyNATCBASCBKSipFxaXAQCBMTC/ISChAQC/IQCBPyCBPz+xPwCBMTCxPz+/AAAACH5BAEAAAwALAAAAAAQABAAAARVEMhJqww4a33F+EL4jUI3EEXoEWzaFbAKzyUQeLihDqrpHQhBQkHyqY49iWCxbDKfJQbASYUCpJbslcHter+NQ3gsLo8bBYd6zWYf0u24GjWr22f+CAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kcmprocessor-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipMTCxISChFxaXDQyNAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLrc/jDGQCWgIleH88jCdgXgB4JVQJxsVgQXIQvrWdwwJc/0jcOG0Y7gqwQVQR3R+EgyJcGjZUoF+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmscsi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCxKSipISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLoQwZAFIV6UYgxi79Qa52WDE3bKV6YOpFpO3L5pJcckLBB8/wQEDezWAQpZqIWxFNAUkqkg6HmJOqGuArUqwfoTACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcmsound-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQC/AQCxFxaXAQChAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLrcDiE+F4SQU4UBLH6VoHjT1okQR6mnuTYuJMWaGlkXW2u4QOipRYDws82AjJsHKez9MgrigAkF+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmsystem-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBGxqFAQCBPz+/PTqtOTOfMSyPNze3Ozi5KyeLMTCxMzGzKSipOTe5MTGxAAAACH5BAEAAAAALAAAAAAQABAAAARfEMhJQah4ihFunsFAEIVXCVJACIJhoBK6CerawsA8HAhbuAnYZrBDKBYMWpCy4S2QSRazyBIwrrjcoNFQzK4KR1bQcHhZjGM2BgWLMYJ2enForHPJtNj+kfHvcB8AfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kcmx-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIAAAASC/PwCBCH5BAEAAAAALAAAAAAQABAAAAIlhI+pm+HB4HkS1flszOCq7C2Qw0wdJ2Lk16BGeK5dSZX2jS9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kcontrol-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/CRyBBxSBExOTNzipOTijOz67NT21LzutJTmlGzaXPz+/OTi5AQCBLy+JKSiJES2NES2LESyLDQyNLy+vLzWhLzWjLS2tGRiZDymJASChIQCBDyuLLzShDyiJMQ2LATCxMQKDDSaHDSWFCQ6tMT+/PzCxLzuvCyKDDSSFKyqrMTCxGzabDw+PISChASSBAT+BDzOPNTW3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAacQEBgSAwIBsikkFAwHBAJhWBBpTIaAccDAolEJIKJWEzBMiuWCyYjaLjd5exDIsE02A1NY9OIMzkcHRkebW99WFoVahkfbSANIYdCBh52IiOFb2VCByIWIh0kbSUNJpIBJ6CgKJlwDUIJKSooswIUt7crrwEsKC2+rC7CLzAuuzEoycmtbgAAAtDR0DLGztYALbm426/Wht9vzn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kcron-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAADxePARCBAQuBNTS1OTi3LSytAQeBMTC/Pz+/AQCBOTi5MTCtISCZAQiBISCfKSipFRWZGRiZERCRHRyZMTOxDxOPMTCxIyCjCQiJAQOBLS2tAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAQABAAAAWFIBCMpCCQpDgQLFusLVEYAXEgOJIQOXIkNF5v19MFWQrCgsFYxIC1InEYvOWmuF9QKrw2aoSkYtksOBwEaBeXeEAiiIdD8rUNJw8EBUGobIcQFggXLglgCohLGA95CQMOGVFDEQ4YGhERdAEWCZ2dDwsSEHMOEA0ABqmqGRkGDQ2pDRV+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kdevelop-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBGSKXEx6RFR+RFSORISidJzCjJS+hISydHSqZDxuNIyuhKzOpLTSrKTGlHyybGyqVDx2LHyedKzKpLzWtMzexLzavIS2fFyWTDyCLCxiHNTmzPT29PT69NTm1GSWVESKNCRmFOz27Pz69PT27MTKxJymnIS6dESGNDR6HFyCTIy2fNzm1Ozy5JyenISKhISOhMTKvESGLBxaFOzy7JSWlIySjCx2FBxGDIyOjOTu5BQ+DFSGRDR+JCx6FBxODDx2NGyaXCRyFCx2HCRqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAexgACCg4SFhgABAgMEh4MFBQYHCAkCCocLDA0MDgcPEAQRhRITFBUWDAcXEBgZGoQIFBscHRweBgkfICGDAQcUIiMdJCUmJxgoKbsAKissLSQuLzAxFgQyKTOCKgk0NS/fNiQtBBk3OIIEEC0cMDkvJiQ6ICk3O4M8FCQcNjAcJBM9fPwgBCQICxI0XtBgQeCGEHuEFGCYwILFBAJCHh7SEGJIRiI/IDaagSNko5OF/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kdisknav-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBERCBBQWFPz+xPz+BISCBERCRPz+/OTm5HRydAQ+XHR2dKSmpNTS1Hy+1AxypNTu9ITC3ARypExOTFSyzHS61JTK3MTi7CwqLBR+rASGtDyixFyuzDw+PAxWhAxmnBRypISitCRujAxelAxmlFSixMzKzCRqlMzOzMTGxMS+vGxubLy+vLy6vKyurCwuLGRiZLSytFxaXJyenGxqbDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAafQIAQEBAYh0jkQEAoFAxJ5EGAaAoSh8BBEUBSrQtGw5EodwHfgsBgeEAWijGW2XTaDRHJJExBrwl1AhUWFxgRDwdCGWkCGhsbHB0WGB5CjB8fICGOGxaJaWwGIiMfJCUTJh50dk4ODiejHyiff2oGDikqK7osiUIGai0pJyouxi+9v2pEMDEyLTIyDckCy0gBMDM0DTU2flFDARk3AH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kdmconfig-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxISChMT+/ATCxASChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMg5gw00yyDGIAR1YUDggeFWFIZhnSBZrsZxdIOFEGTA2oeBAHeyuGwvzxBlYdUOLROMFzDQntJPrNoqAKUBaqnV+k57ZORruykHDj2LqIzUVKp1u0iuB/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kdvi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/MTCxCH5BAEAAAAALAAAAAAQABAAAAJCRI4ZwCYPo1gsiIHHxY86KXmWdiGkCA1Wp6Htc07NOsEv2oVyldLHbuBgEhORJhOxGEkkiLJybCZ3iqrD08hmF/4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +keditbookmarks-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBASCBPz+xPyqXERCBARCBISChMTCxPz+/FxaXAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARXEMgpQ6B4WnGzDgJHWWMYdkAwEF1QFKe2oqDZztr7GpfKjrvAAeFDpQq8ISIRYBotSoTUkiC2ostqYps49BSKIVfaBbcC4MMWcTAbU+iw21NBk+gjuj8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +key_bindings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/MTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANMCAoRy2IEuYIQDsrBld0NN4XaJF5iCppWxBGtCscEAbkDfH2wh+ogiudD5AhvoZWoJEFtckBTE1dzKKfQjMtUjfQUzizjeBN7HgB/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +keyboard-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChPz+/MTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANBCLrR+zCIGWCcI1cLpNCa5YHZsCmj2QTlxrZmmRFVSs4E7X13TqMTXsl36gSHuSIQQ+QYP0kncPCTokzWh3LhTwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +keyboard_layout-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBPwCBMT+/AQC/Pz+/PzCxKSipISChAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARSEEgZqr1hUjFIEQXBZVogDt/XYWxgoEVFzEUt3MGNm7SND4aarPfBFQYCQmtpiTErh+ahMK1SqVHoYcvtUptX67SWDXTPXWltva5q0WfEs+WPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +keystone-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxISChPz+/MT+/AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM/CBDcHkoFQasVUIrBe8fRNDwMAWpjUThmtmxk0IYwOaPx/V6XG3hAjmsRa0Qkg6NSOVo6F0nG88g4TUNDpT8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kfax-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+/MTCxISChERCBFxaXPwCBAT+BARCRAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARVEMhJQ6C4imEzDkLIXR4ADqFAThYRoFu4ti6YbhfdFm+aEzWgAWhB5QyGAMEwWA4PlpyFCWwOkAhCgla1EqxXKbD7vSJnyuUXyV5JuOxtqZV0z+3+CAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kfind-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExOTDw+PExKTPz+/ISChAQCBPz6/FRSVIyKjJSSlIyOjGRmZNTS1Ozq7Ozu7AxyzPTy9ERCRBQWFIyqxPT29AQ2vOTi5IzG7DR2zNze3Nza3BQSFISy5CRyvBQenISmvBQitMzOzAQGBAw6rDR61Hx6fMzKzAz+/IzW7ASyvCwuLMTGxMTCxBwWFDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQAAgEBAYj0ahckAoEJ5QgkE5fBYO0SeCOigkFE2DeEFgUAUNBwGBeBAcCMHirF4gnhBCBCE5PydqBBQVFhdTSgJPBk8YGRQaG4dCiQQcDh0eHyAhIiN+BHYXJCUNIggmfhUOAQgbJ6YCKGcVKSUaChwGHCYqCyuIDhkhGyIsLcccCL6TFxsNJ8fRLS7KvyNi2GIrAQwK1AsvVOJULi4AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kfloppy-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBISChKSipFxaXPyCBAQChMQCBPz+/AQC/MTCxATCxAQCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMgZgggz5zAIBp9GFV8oSqRkikFanapBVgccGAiJBDWL74jd4UUxGBI/IcJQMigSimPSsMDcEFCFVkptKhCDgSBB7m4sA2y5eqqMF2YYKMBgys8nfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kfm-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBGRiZERGRPz+/MTCxAQCBMTGxPzerLy+vLy6vPyqXLS2tLSytKyurKyqrKSmpKSipJyenISChJyanJSWlJSSlIyOjIyKjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAV+IBCMZCAIQKoGw0C8MFEUqmgYrTwXL50GhtegcCgedr4AIpEYHhQKopEWSCwYw1fUeBQxGo3hiBCIUR2OxyAwG8OoD0hkICFABMiZKBKZ0GNkPiIUFBUuEoiIMisVFRZ/MWwqAheVfxICdZIpmZZ1kYIAMxcuJWWhKXl5Kn4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kfm_home-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tJRqRGQqBNy6pIyKjDwGBPTe1JSWlDQyNOTGrNRiBGwmBIRaLNymdLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaoQIBwCAgIiEjAgAAoGA6I5DBBUBgWjIZDqnwYGgVIoTGQQgyRiGRCgZCR1nTFcsFkHm9hBp2paDYbHAsZHW9eERkYGh4eGx4ag3gfSgMTIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbIiorLB4XEltDrhcaLS4vtbcJra8bMDHAGrcyrTMXHjA0NSypEsO6EzY3IzU4OdoTzK0BCAkDMgkIOjJlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kfract-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBAQCxAAAACH5BAEAAAAALAAAAAAQABAAAAInhI+pyxudwoNACiFbuBzHt3XeEYbiBF5mN5HpyayqVrY0hdj4vvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kghostview-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/MTCxCH5BAEAAAAALAAAAAAQABAAAAJCRI4ZwCYPo1gsiIHHxY86KXmWdiGkCA1Wp6Htc07NOsEv2oVyldLHbuBgEhORJhOxGEkkiLJybCZ3iqrD08hmF/4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +khelpcenter-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/FRWVExOTKwCBJQCBIwaHFRSVPz6/LxSVOSqrNyanIQKDHwKDHwCBPz+/OTm5Ozu7JwCBMRKTMxubLxCRNTW1IyOjDQyNEwCBGQCBJyanMRaXNyOjKQODIRydKQqLOzCxEQCBNze3Ly6vJQKDDQ2NIQCBCwCBGwCBFwCBDw6PNyipDwCBKSipEQ6PDw+PJR2dMRiZHwSFPz29BQSFIwODJwuLMTGxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAabQIBwSCwaAQHBgFA4Cg2BwwGRUCwYxobD8YBEBpLJoEGMUA4VywWTaUQOmstww+l45MKM5/DAf0AIDSFFBiIHI3IEHCSDRgEOFSUAJhQNJ0coYikAKpB4RQwrJiycWy0uRQ2AKKQAL3wwKEMCMDEdGEMvWxIKDTICIzMQKZdDKQ0dMSAxBzMPGjRGGCkoNTYaNzTRThgnJ9pFfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +khexedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTC/Pz+/MTCxFxaXPz+xPyCBKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARZEEgZ6rw4CB3wrJUggt03nANIoCUQoDDcvqJAaHXqunBxywFDZWArDHy4lOEwTBEKgYJRyeQJEIEnYrQsvU63abBKIYq2m+4s5mTeTLVRSFdmyy6kvGXijwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kicker-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/FxaXMTCxDQyNAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECLrcEDDKGYQV4+qbie9eGIJEVxTe+QmjUFgnXLLr615oF8x2v0I8DWpF2GV6slkLKSMdYT4nS0WgSkXYAWUbcXgX/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kiconedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwC/AQCBMRaBPyqXPzerPyCBPzCxPwCBPz+xMTCBPz+BISCBMT+xATCBAT+BASCBMTC/AQCxAQC/AQChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOpBicZQoEwjAE6hgQQwvH81AU8OnfuR3QYDgcgAKhjGj8+UgzQkHHw+2mQlQpgEAkFInEYnGDhr/h8VPGYDQcjcZj/iiv4u84vQ6FQCISERETgxN2AX6AgoQThlBOkCR+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +killustrator-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPzerPyqXAAAACH5BAEAAAAALAAAAAAQABAAAANHCLrcGzBK+YK4OAcAx4AXIURj4J2fJYhWh35pOHKoG8+mFxS5HimmXU8HBH4MQyJD+FI+kM3Ug9eENALQk9VhDW4c1y/YnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCxCH5BAEAAAAALAAAAAAQABAAAAIghI+pFrHbXmpRMmoBxXB75IWcKIKk022ZunJtdlSw5BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kjots-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPzerISChPz+/MTCxMTC/AAAACH5BAEAAAAALAAAAAAQABAAAAM8CAHc7kGsR1mc9d1Md/icIgXDB1YXMZQnZBJEIbdKABPGTbSfnuc8mw8W1OlotYER2fgod5iMKRqiNvwJACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +klaptopdaemon-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipAT+BISChFxaXPz+BMRaBPyCBMTCBDQyNAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARtEIBAq5w1TBGEGIM2ESTlVUNhaAFJUAcXgAXCZkFyJEoiIArWYQjj+Xi2yfBA0SU6CuAts4MCk4EdcxbznFhOCsjrWUxRhbRBBk48Z6kCZ2GeuN9xucF8FqcEBnt1OW4saSp7IoRPEjgiGBV+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +klipper-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFQyDEwuFEQuDISGhFRSVEQqFEQuFPz+/PTy7Nze3PT29Ozu7DQyNJx6VIxuRIRiLEwuDIxSFHxSHKSipLSytGRiZGRCHDwmFOzm3HxOHIRWHOTazHRCFHxOFEwyFNTKvHROHFxeXJRqLIxWFFw6DFQ2DNTCrIRaJJxuPMSynHRKHIxqRMSqjGRGHMSifJxeFKyGXHxKFLyaXKyObGxGFEwyDKyOXIxeHKSOdFQ6FIx2THRKFFw+FKx6NKRmFKxuFLyCPLyOTLyabLSefLyijFw6FJRmJIxWHHRGFFQ2FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfFgAAAAQIDBAWIiAMGA4IABwgJCgUICwwKDQ4PEBGCEQsSEwUUFQQWDRepGJ4ZEggIDbENrxobAZ4cHa+7uxAeH4IGICEIIsbGFggjJCWCJicovLwpIcAAGCorCBbc3AoILB2rgy2u0q8OLrcAJS8wr8nJrzEy6yUz79sivDQ1jQA2buB4tU8eghw6xgnYwePcqxcdbAjq4eMHECA+ggiZMYRIESPjShyBgQPJBB48OsiokaTDOoACItgwYULJhw8BbIzzEwgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kljettool-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxKSipISChFxaXATCBDQyNATCxASChAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMg5Q6CYBiFsxhvXXZklimRlDWenBQNRzKJRXCsxHPFcIDGcILYbGHqzAY41NCQSiuNgMLPAmNTElFoFWKecqe8mCRAIq6nt5imb0TC2wZByny3zdslMr3+8fgB+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +klpq-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxFxaXISChPz+/ISCBPz+BKSipAT+BAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJqwUh3xqEz8EWDKT3aVNAFAVBDqYQYitbjARhGDJt34Nc4SBAZAomoDAhKAwyTZZp5XE+O0lp9QVFeLNWUpflJXheTww2ijiLKSBPW/C+xOmzjQRU8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kmail-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPyqXPz+/PzerMTCxFxaXIQCBPyCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMgJgrWU4iAGIUFWFYMldF+okUPJeeAUDEY7FFzXqnNdkIGDgHAKzWgsDuJAFBhbtd1peTAWDFjpaZg6skonYfOZzC3HlduuMj1UZUDZ6RMblTTDokylQYsyFwB+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kmenuedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxAT+/ATCxASChPyqXPz+xMRaBISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARLEMhAq5UY2B3yFGDIYcFgnuNErGwQCl1VzHSJBsbBUSxBIbnEC0YrxICHhFKZCiATlldn8gSlNE7YEurRQHdd19Aa3m6nmV0F448AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kmid-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBKSipISChMTCxPz+BAT+BFxaXPwCBATCxARCRAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARUEMgJgqVYWsFv3lwoeFMwEIQYkkFhouoQlIFhHvCgz9oxjoeDblc6+Q4B4ZBXCSBQx+GIZhNAOURaACsYypq0kNeSSLC2uxm5fGZqAgqFO0OjT/wRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kmidi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/Lz+/CH5BAEAAAAALAAAAAAQABAAAAIzhI+By7oBo5RH2GvDRRhre0xiVHXZVpqfEI5iKkQxalzQIIPGhI+pSAN4cjqA68VIHvwFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kmix-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXAT+/DQyNATCxMTCxPz+/AQCBKSipASChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMgJQqCXziDG2JoUEENhZBkmHIWJVptAmqcIW/Js1MiF56TBzkckAAcHoa9nMRKeA4TyJk0knsHhTeK5khBaH2VwLYVh40TJhQ6RzeIQV32Quz8hfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +knewsticker-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBMTCBPz+xPzCxISCBKSipISChCH5BAEAAAEALAAAAAAQABAAAANTCBCsysEpseQDI08KSPdYNmwUYSraUDRC64iAMbIuLGtOS423BhKFmgj2C+5EhsOoWEsOnB0FsKl0jnLUp3IG0O2sMNpRVHBAJpjyA8KOmNsMfwIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +knode-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAABwaDAQCBPwCBDw6NERCFJSWJAwGBLy+rPz+7IyOJJyeLBQWDIRqZIxydPzCxDQuHPTWzOSypBweDKyqLJyWJKySjPTOxKSCfOyCfOyKhJSSJJSSLFRWTDw+NOSqnOR+dOyWjOzGvNza1ERGFJSWLLy+ZPTGvOTOxOSSjOy6rLSypJSWjKSinAwODHR2HISCJOTWtPTe1Pz+9Ozu5IyKfNzazPy6tExCHMzKfPTy7KyupKSmnEQ2HHx+HKSiLKSiJPz65OzuzOTmrKSmLIyKJLS2TPTyxOzuvNTSlLy6fHx6RLy+RJyaNLS2NNTSnLy6lLy6dMzKpGxqXCQiDKyuNMS+PLy6VMTGPMzKrOzq1CwmDLy+PMzGTNTWxMzOxERCPKSiNCQmJERCRERCHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAQABAAAAffgAABAoQBhoOEAgOGBAUEAocBBoOLBwgBBAkKBAsMAQ0ODwOWEBEBEhMUFAQVFhejCBYYGRCGGhsKFBwdlh4fICEIIoMjBRQkJSYnKCkWCCorLIMtLgUvCjAxMjIzNCw1KoY2NxovFDjbMjk6OjuHNjw9Pj8lMggIQEFCATaDBD4JhhApgsDIESFIkigxJGDEkiJFmDQB4uQJFBxPokgRMIVKkypFrFxBgCVjlnuXtARQUGTLFS4yunipgRLBF0I3moChgsQeAg5hxDBMNCUAlyAcOCBKxJTQmKVNBfgJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +knotes-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBISChMTCxPz+xPwCBPz+/ISCBPz+BMTCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARIEMhJZQg1z6vzxR0VCKE4gCE2lhcRnF1LuAInBjNRfDMn64WCQRCcHS6IRE6nyB0Sx0ACkcwloFiflKp8Pm2bbRblkYJZHX8EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +knotify-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/Pz+BPyqXMRaBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMyCLoQznAFIUKE09krZ+VS9XBaMBBbZKIBUaSYa40kTIPNhyvazje+G2gFI8l8jaLCnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +konqueror-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxONCROfCRKfKx6LNy+bNTOpGSS1DRupAwyXBRSnPTSjPTqvOzqzMzSvHSSlKy6ZDxutAxCpBQ2XBxepLTKvPzqzPzy5OTShLS2dLSqRFR2jBRerBQ+jOTixOzetNS2XHx6XDR2tCRexBwyTDyKzOTavPzq1OzKdCx23BRKtCQ6VCQmHFSa7IyirOzSnGSGpIR+bFSO1DyK7DR+5CRixBw2VDQuHFye7IS27NzGXISuhEyS5DR25BRWxBQ+lBQyXCQqPCxSfGyu7GyerKy2ZFR+rERqfCRmxBROtBQ+fBwuTBwmNDSW9JyabLyqRIx+TExSXBQ6bAQCBBQ6ZBxapDR+zBxq3LyaLJySRHxqPGxeNBxGbCRmrHRyRERONDRKNDQ2JCQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAeygACCg4SFhgABAQIDh4MBBAUGBwgDCYcKCwwNDg8QERIThRQVFhcNGBkaGxwdoYMDHhcXHxggISIjEiSvJSYXJwsoISkpIyorLIIDLS4WLzAxMjM0NSo2N8o4OS46OzwzPSk+P0BBgkI8Q0NERUZHCEhJSktMgwk4Qy1NTk9QUVJLphCiUsWKlStYsmjZQiJgIS4KuijQ4iXAFxYCDVFJwGUFmDBhMjYSw0KMyEYoBfkJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +konsole-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXFRSVPz+/PT29OTm5OTi5DQyNDw+PERGRExKTHx+fISChIyKjHRydFxeXDQ2NCQmJBQSFAQCBERCRMTGxHR2dGRiZExOTDw6PCQiJAwODCwuLFRWVOzu7BweHAwKDCwqLHx6fBQWFGxqbGRmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAanQIBwSCwKAwKkMslEAgSDqDRKqBYKhkNgcDggEorkMrDQchkNhuOhgEQkk0l5S2lUGpYLJqPZTAwMHB0DCmhqAW0Rfh5zAxgOkBcCFAcfIBMECxwBBAEPFw8dChkhcBMDDAcdnQqtFKSWcQMimx4dGRkQBxGxsg6bBQEawx8jl3GnJFoFHRNXVVNRJYIFDAsL1tgiDiQXFx0HABwcXeQH5OjkRutEfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +korganizer-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBASCBISChFxaXPz+/Pz+vKSipLy+/MTCxPz+BPyqXLxaBAQ+BPy+vAAAACH5BAEAAAAALAAAAAAQABAAAARmEIRJqw1ikM37FsFQjMZ4lAVKBESBjCYsFiuBkkk5KG1dJL+CZjBYMES+l2x3RCBqtxHBOFD6DkHmAQj0yXgzmFdIhY2erBJBwTiczDSWq0Eg1gvYrvyHxcMdUEojYWIYHocbDX4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +korn-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBMTCxPz+/PwCBMQCBFxaXISChKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARSEMgQpL03CEExDkO4dR6ghSFBkJa2CSlRcNX0voNQ5Ebn3pvdAWHo/W6IHUJwGFCAm+SrSTm+ZgcY6XnDhlim3wwxKNYymiX17HmCSxO4/OKPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kpackage-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xERCBMTCBISCBDQyNAAAACH5BAEAAAAALAAAAAAQABAAAANPCLoR+7AJ0SALYkxd79za12FgOTlAQBDhRxUFqrKEG8PyOqwEfMeKwGDI8zVGul0vFsAFdaxB43ecKZfUKm1lZD6ERZgBZWn0OpYvGeJPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kpager-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBFxaXISChASChATCxKSipMTCxDQyNERCBPz+/MTC/AAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARWEMhJZ7hADFI4+RpwBYBxFJ1HmMiYJUgiJPI8Bwmp7HyvyBOfMCHR+QwzhAAhMvZKSFgRIOwtJczqboFoBasGGVNUKVNGaEyTlEYL1sX2pYXOyO8XfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kpaint-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPz+BAQCBMTCxPz+/PwCBPzCxPz+xPyqXASCBMQCxAQC/AQChPyCBATCBMT+/ATCxASChIQCBKSipISChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAV1ICCOYxCI5kmigTCYBKGW7WAH8QyYrn3LNFesYDgEjCVXIRYzGgWqgA2BICQUx9pMSkUssgsbFOWighW+7c24KDAKDccjCjVCHAEGo/GYl+wPLwwRfF8oT2mDAwuGWVJiARERAxITJkhaJhMSlJY7NDQpAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kpixmap2bitmap-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwC/AQCBMRaBPyqXPzerPyCBPzCxPwCBPz+xMTCBPz+BISCBMT+xATCBAT+BASCBMTC/AQCxAQC/AQChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOpBicZQoEwjAE6hgQQwvH81AU8OnfuR3QYDgcgAKhjGj8+UgzQkHHw+2mQlQpgEAkFInEYnGDhr/h8VPGYDQcjcZj/iiv4u84vQ6FQCISERETgxN2AX6AgoQThlBOkCR+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kpm-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxKSipPz+/ISChAQChMTCBATCBPyqXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARbEIBAa5BYUsHF+FQ2EUTHfUOoFQVpeuAVGAbrnmg603U7FD8UxXDgGQgoYMyAIBoSyI9Sx2seoj/lRlDFTmUBDs0L0gg2CGwFs93oWJdMOwCPiybhguout2f8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kppp-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAAT+BGSOhERadDxKbDRKZExWXKzG/KzO9KS+tER+lBQyNERaVOTu5PT6/OTy9Lza5LTatISylHSilCQ6LNzq9MTa/LzevKzKzIS6dBwuZISi9MzizLTW3Iyy1IymjHyGbCwuLDRGXHya3HSe9Jy+/MTe5Pz+nPzmhOTSbGyGXGx+XCwyLHyinISe/NzifFRKTFRqXCQmJExSVFyafFyC9MTCvAQCBMTCxExKTDw+PMTGxLy+vNTS1Ly6vMzOzNza3MzKzHRybERCPDQyNPzCxPQODHR6dAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAengACCggECAwQBg4qDBQIGBwgJCouDCwwNDg8QERITlIUUDhUWFxgBC4mKGRoGFQcbHB0eHyCLISIjJCUmJygpKiuLEywjLRYuLy8pMDGLATIzNMk1Nck2lCDJN9TcLziKOTg63DvcPD0ygjk+P9zcQDVBQekAQkMgPjzcPfLy1wAgiBQBAYIHkH5BbPwTBGKIQBBBjAQBsXCRDYJGZFSkJOhIM45+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kpresenter-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwC/AQCBMQCxPwCBAT+/MTCBASChATCxPz+BPz+/ASCBAT+BKSipAQC/AQChARCBCH5BAEAAAAALAAAAAAQABAAAARhEMhJq70YhM2D5UIYDARHBUWxEcRgHKgncWyLuPEc1MOAJLfBRsNSEBYbH8kw3BEUyABjZHzJdsiGI6AYLBQG5qykDSy+jwdLpimj1aVhe7tIr00a6Q4uP02dfRVygRZ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kruler-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFRGDPTijPzmnKSGDOzWdPTahOTGXOzOZOTKXNzCTNy6RNS2NMyqHNSuJCH5BAEAAAAALAAAAAAQABAAAARkEMhJKwg4643FEIQHimHRfaiYmoFxvMLhwi5r3IaA37rBIomgABhEDBM/hHLJVCBYCwFjYVxQBdYFi8GQertSLqshaJgFZbK5wXI4BO63W/Bwt+HzON7BKvj/gIAcgxoWhhN+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kscd-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBKSipFxaXARCRPyqXPwCBAT+BMTCxMT+/AT+/PzCxASCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARbEIRJa5Ui672nsNYgegFhFoRhCuJAEgcsE+wYfHIc0y3JbT2QsOJCGG+/zyShMCICregEsUgEnNCe6/rsPkPTY2LxZLEOh4DEqbBmRQyGen0kjgB4ySSPp+D9EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kscreensaver-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXAQCBOzu7Ozq7OTi5Pz+7Pz+xISChHx+fMTCBARWlARepOTm5ISCBNze3ARalARanKSmpARSlHzC9ARGfLy+vKSipARKhAROhARKfJyenNTW1AROjARSjMTCxJyanNTS1JSWlMzOzNza3MzKzJSSlMTGxLy6vLSytKyqrAT+BIyOjPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAalQEBgOBQYj0fhYEAoCAyHqPRgDAyIggPikOAeFFVCYMHImqnfaiPAKH8VcLij+ghAGJFFlnuUCAJ1ExR5AnACFRUWF39/CxETXQoYGRoaFht/HAEdE2AeGRgVFBUfIH8hmx4doBihGokifyMPAiQcISEjJR+7HyZ/JScfFigpKSoSFxsiKywCAEjR0QDU1AIJFi0tFgnP1dYJ4QgJ4+Xe1tLTAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +ksirc-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAAT+BMROTPz+/KQGBFxaXAQCBDQyNGSGzDRivAw6lAQmbCRGlAw2jHSS1BxGpAwiVGyO1CRWvBRKtJSq3AxCrEx2xAxGtAw+pAw6nDRmxAQmZAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVYICCOQBCQKCoMaRsMbCvPNE3cRA0QRWEciIQigQLyfAtGqtFwPI6GFgQReex60WJEYr36UpOtQgQlUQAVieUyLoskY8Bhi3liEZJ6MaOmWCgJGjYGhCl+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +ksnapshot-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBATCBFxaXISChAT+BASCBAT+/PwCBPzCxAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARLEMhJKw3YViw6HkRgBUVnCkG4GUV5otthsO6A3KJEHm6R3AOYTtAy2QqzHCDwMpiSk8DsxIFGpc6T9YJ9GpSb7laDSYI1yzNa448AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kspreadcalc-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBATCxARCRASChAT+BMTCxFxaXEQCBPzCxPwCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEIBAq5U4iM17wJMwjORIfJkYFCs7nKA2rJQLp0Su66ikGcAg8OYTGA6BA/KAIIYsFudPGJQal8uAFVqxUg2JxBYbUGh7k5J6BppwKyB/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kspread-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +ksysctrl-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBISChHx+fPz+/AQCBAQC/AT+/AQCxAQChAT+BLy+vAR+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEIAgqK1YzsG754QUDERpmkEpkkXrtoK6EcVgHIibhnNx564Yb0TDvQq7FQ34EiqPOhnREqhWSUPsyZSQAbbg7GcMEgwUiYVivTa1R+y4XEGoWO/4AMAfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +ksysguard-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBExKTERCRERGRAQCBFxeXKSinIyOjJSWlKyurKyqrKSqxPTy9LSmxNzS1Nzm7JyitJyipMzOzLS2tOz6/OzW1Ozy9Oy6vNyCjNRydMR+lNza3LSurFReZMTG3Pz29OSmrMx6hDw6PKS2zMTCvOyytOSWnMzi5MTa3NTS1LzCvNTe5Pzm7PTK1PS6vOSapMyKjNTy9KzCzMzS1GxqbISKxOzq7Ozm5Oza3MyytLzS1Nz29OTy9LTS5GyGtOTe3MzKzOT29OTm5KS2vKSurNzy9LTW5OTi5Mza7NTm5KS61KyytOT2/HyChHSChHx6fNTy/LzKzMTCxLS+vMze5KSmpLzS3Ky61JSSlLTGzLTa5FRSVJyanKSipJSWnJyWlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfagACCggECAQEDBIOLAAEFBgcHCAgJAYqLAQoICwwNDg8QERKXjQYTFBUWFxgZGhsJHJcdHB4fHxUgrCEiIyQCjRwWthUlJiG7IycoKQQBKisfLC0uLzACJzExMjMBNBI1Njc4FTkBOjs8PT4/3UBBQjc8FkNEQTtFRUZHhyQySEkHOAyxgOCcEhkSLC1ZwSRGEx1OnBx4EgNKFCmKAkyh0uNADBpDOpyQ0YNEAEJVIFjBZg/bFRIRSAXAwiFLDyNaesiYEJMRgS1cupDg4OXLFlI+DwkQgBSAn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +ksysv-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCxISChIQCBAT+BAAAACH5BAEAAAAALAAAAAAQABAAAANWCLoQzlA5IVyIK1S9L7PDsFHBIJXDFFaViYYEUQpy6orEqq12Aw+FmkjQQxEKwQCBSCz5BrGYkuc06nKU4s8gW4q0UAN3+q3CZJfJRhJ6fDwZOGbhTwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +ktalkd-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipMTCxARCRFxaXASChDQyNATCxISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEMgZqqXU6gCuDIJQDQTBBQX3hUFpmN2hFaxhIPCJDrRo46dPglf7BTvDXsB2OwaSCd8tZ0kWgZ3Uk+hDvHRV5bfyybACPNmkY2EVZKpM5UBPre8fD94fAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kthememgr-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBASCBATCBAQCBDQyNPz+/MTCBPz+xISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhJaw1V6Bs0HgIWYFMnhSERkiU6ekM1FO9IGMcxIFK3jgGDzRADhAypQipI7A0OId1IaGhKntHDjWogTLCB3JbpvULD2ir5i0SPDYjy9ZgWDuQUwqBLLFq+ehZ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +ktimemon-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPz+BHSG5PxSVDRW9PwuLPQKDFze1AQi7CH5BAEAAAAALAAAAAAQABAAAANDCLrc/lCFGeKi1YktAH5c92mcR4HloA4P4RLAyjovLLdvvD5FX+gqgGFoUPh+N2IRcAQcngch0ehzQqVDas/6xBb9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +ktip-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBGxubFxeXAQCBOzu7OTi5NTS1PT29Pz6/Ozq7Nza3PTy9Pz+/Nze3MzKzMzOzOTm5MTCxLS2tKSipNTW1Ly+vKyqrMTGxJyenISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVwICCOQRkIY0oORFEYqCoGw4EcSaHEarAgDESu4RioBIMfA1doPIwpZGJBhTQMEWh04GoqDBLtCKkYNL5hGUAwoZQfFYs46lBQLnK1SICJUCR5egMZGBgZcyoDGAwTh3oiAxMMhogpioyOjwADnIh+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +kuser-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxISChAT+BMRaBPyqXARCBPz+/FxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARLEIRJa5Ui673nsGAgeKE1Bl9AUEXbiqTlFlZaGUZoszm4BzhDAVf5BYbAXI+TAR6CS2ZGSZSEiIIqYIsSIEaJ7GRrlY7J1lKA7I8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kview-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPz+BAQCBPz+/PzCxFxaXPwCBPyCBPzerPz+xASCBMTC/PyqXATCxMT+/ATCBASChIQCBAQChISChMTCxKSipARCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAV0ICCOYxCQaBkIwpmKJsu6qDkIREDMZFwUAYNwRVuxgLfDAUGEsRIJo2LRapUE0ABDsa1aAcZoo+stsnIMwcDQcDQUV9MjF4Q4GJFiQJJuGSYOFHkwezJ+ExUUEicmYDITARATAoomLiuQJhKTlTRgepYBfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kwin-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBFxaXISChASChATCxKSipMTCxDQyNERCBPz+/MTC/AAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARWEMhJZ7hADFI4+RpwBYBxFJ1HmMiYJUgiJPI8Bwmp7HyvyBOfMCHR+QwzhAAhMvZKSFgRIOwtJczqboFoBasGGVNUKVNGaEyTlEYL1sX2pYXOyO8XfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kword-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBPz+/FxaXISChPwCBEQCBIQCBMQCBMTC/ASChARCRAQC/AQChMTCxAAAACH5BAEAAAAALAAAAAAQABAAAARiEMgpQ6B4WnGzDkLIeVs4DAIBWFcpnKJVzCUcz8ZxVOKN/AWNKRQo5HQYELHwQxQSHR7HqDuwMIRisxBQLBbRFdUaYCwYjUZHywIxGI53K0jolRkJdLkhtKwaeWpJYW0AfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +kwrite-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBKSinJyOfPz27Pzy7AwKDExOTJyWlERCRKSelPz69LyyrKymnPz+/MS2fDQyJAQCBOTazLSiXOzivMS2jKSSVOzmxPz25NzSpPTu5KyebOzixNTGjOTWpMSydMSybCwqFGReVKyaXNzSnGxeNJSCVMS2nPz23MSuZIR+bJyShLyqnOTOtGxiXIR6XOTSvIx6RMSubIyCdKSalMS6pOTWxMzKvKSabJyKTOzezHxuPGRmZKyurMTCvPTq3AAAACH5BAEAAAAALAAAAAAQABAAAAajQIBwCAgIiEhiYEA4FgwHRDKhIBAWz4OhgGQ0FAPHA7qFEBONb0Qy0ULeQ2+aUrFcMI+3GYBOZzQbHB0eHyAhIQByDREiEwMjFRIkJQImAgJ+jScjHigkKSorLC0AKg2NFSMoki4qCy+IQgITKDAxkjIzNDWkQxQoJaskMgk2Eb1DNzgoOCoHDDY5yEIwJToAOzw9ET7TQiREAhkZ3kmy5QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +laptop_battery-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipAT+BISChFxaXPz+BMRaBPyCBMTCBDQyNAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARtEIBAq5w1TBGEGIM2ESTlVUNhaAFJUAcXgAXCZkFyJEoiIArWYQjj+Xi2yfBA0SU6CuAts4MCk4EdcxbznFhOCsjrWUxRhbRBBk48Z6kCZ2GeuN9xucF8FqcEBnt1OW4saSp7IoRPEjgiGBV+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +laptop_pcmcia-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwC/AQCBMRaBMTCxPyqXKSipFxaXASChISChMTCBPz+BPz+/PwCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARfEMhJaw3Y2iDGyJoUEIVRfIHGEcaBHCc4jcWbGG2cAuuhKIZE4mX68EgI3M/wORgQGAHr4HICD4NCKoBIJqsv7w6DKDgNi0VuN+O+GIxFl00hlxjakIhbo4cwfnoWfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +locale-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/AQCBPz+/MTCxISChMxKTKSipFxaXERGRGxqbCQiJDQ2NJQaHMwmJDQyNFRSVOR6fGwSFNxSVKQqLFQODJwaHOyGhOySlNRCRMSuBPz65PzupPyCBJyOLMxyJOTKRLSiNIR6JExCFGxaHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaPQEBgGAAYhcWjUMAUEAMDQtIIZRauBaZhKhwIsFjBgFu9HgKHrHNI9QYQCQQarWB313D5Ik68BxgIDQwOCgcJD2wBWwENEBANEQwMEBITFEIOQhWNkhENFhcYl0l/GRobHB0MGBAeo1QdHxsaICEfpyAiQlQhICMiHyMgs8FKASMjRiK/yLrGStDRXNFGfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +looknfeel-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/ERGRExKTLy+vKSmpAQCBPTy9Pz+/IwKFLQWNPT29GwOFExOTIyKPHx2NPz2pIQSHLwWNMzGXFxaLLSytERCHCQmJNze3GxubLS2tHR2dAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAWNICCKgVCWYwoEwUAMhXEQhhocRuHCMpIgiJVBptC9DojDIrFYwRS4wgGJZAIYuwL00Ej6FjOGEXZwPByQCNjAyrnKj4NkAqYUBIIoXC5pVGYUFgIXU2Z8fgdGFhgZiRqHf1EDFgCJGAcafX9aUSIFlxoFBX8vMYmemKJSY6Ijn6oHF26tKbAEGCaUKX4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +lyx-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBAQChARCRKSipASChFxaXISChPyCBATCxPyqXMT+/Pz+xPzerPz+/AAAACH5BAEAAAAALAAAAAAQABAAAARZEMg5Q6C4BnGzHsRgeVZRGIbYaekxuAFijUGRBOqMKPxlJQsLQxjoVWyWBsMxNEp+iRuj2VvVCklHLCZjiRrawGFmNQUajQ129RwYyCMSau2pcNh1AB7jjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mathematica-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChPwC/FxaXIQCBAQCxAQC/KSipAQChPyqXPyCBEQCBARCBASCBDQyNCH5BAEAAAAALAAAAAAQABAAAARlEMhJ6wxChiFFCBUhENtQGIcBUghWDsHxWck7wMpKfXz/ZYBAYeCpKRQLWwkjMCpQJQ3TE8gdUgxPUMDlflINhzfocJB6BNEDqLnKpgRLTJZjBuIUAf1TExR0EyRASWmAFocAfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mouse-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBDQyNKSipPz+/MTCxISChPzCxATCBISC/MTC/AAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARSEIRJqw0Sg32rAANBFNwlhIQhGkNGAaSaouW0iYUBEIdYgzsUIqHAuWAoQlGEE9gMJKaU8IPupqLWy3qVkioAFqkLc9nCg3G5oxFr2ecavOOPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mozilla-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/JxqBHRKBGw6BHwuBHQuBKwmBKQmBIRWBGRGBMQeBKwaBHxSBFQ6BDwaBEwqBEQuBGQuBFQOBGwSBGxGBHQ+BOQiBPQmBLQaBKQaBCQGBIwWBLQeBDwKBHQSBGQ+BIRaBHweBIQWBNQiBKQeBJw6BPxGBNQuBLwiBPwmBKweBIQiBJQmBHwyBIxeBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZzQIBwSCwahYHA8SgYLI2EwpMoMBwQU2FCsRAYGQ3HwwGJSCYPCNnRoAgrlgsmo8hkLJpNpEjhbBYdHhYZEh9HICEiGRMjJAxPJSYmJxkoSocjKSorExYNSwMXLAwgDhYVSwUtRAMORwGfRR8uRpdGWEJ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +multimedia-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBIR+hKSipPz+/MTCxMRaBMTGxOTe5MzGzNyytPyqrPyurLz+tKzqrPTy9LSytNTS1Pz6/Nze3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAWAICCKQWmOKFAKQ9uWacAOJcEWQjDKrxHYJZxONRAQaL+c76DjyY4D4A+RC9B8xkPiQKCySsjAQZAojHMva9pk8iGrCsWC0Wg4HCvT4wApyO0FEAcRJhKGhzUEioolDw8TgYQBEYITCIQqE4IRCnQOEXyYJAFxCwt1dzAxbCcjfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAAQChPwCBAQCBPz+/MTCxKSipFxaXAAAACH5BAEAAAEALAAAAAAQABAAAANDCBoK8TAC8Vy8QUyGr9BaFwmDZonZp66sIhBwLBMFlRl4rhv1IxiDoHDYuw1yw2Dxl0wugTqnjdkUPmezJWv7QXX8CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +netscape-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAEyStPwCBNTKrHRqPAxSfLR6VNzWvAQCBEyOrFxGPMSWdKx6XPz69Ozm1PTy7NTOtOTOxKRqRGxCJPz6/MzGnMS6jDwmHEyGpPz+/Hx2bGxiPOTexFxWNLSmhMy6jLyGXNSqjHxSLLyuhMSyhLSqhDQeDJyWdJyOVNTKtPTu5KSONMS+rLyqdMy+lFxSNOTezKySPEw+FEQ6JKSOPDw6LNSylHxSNKyWPLSeXExGLDQuFIRiRCRCVEwyJAwODLyyjIx+TNzaxMy+jBwaHNzGvMS2hMS2jKSWXGw+JFw6LKR2XCQ6TDw2HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAfVgAABg4QCA4SIBAQFiAYHiIQICQoLAQwNDg0PgxARg4oSChMOBg0UAgYVBRaDFxcIGA4ZGhscHB0eHISKoxkfARsHICEiI7oBrg0kGiUfpCEBJiIngygbKQ0bG5kjKisbFSwtAi4HLx0cBwYiMDEyJh4zMjSKKBQuNTY3Mb8vODk6kLky0GEHjxUyeiigMMPHJ0UCKvw4sQFIECEqhgQUSCSChRFFWhg5MkMjkk9JlJRY4uIEixk5fOhAsuOkqyFLXF1oQYOJTiQIAigaqohCD6JD/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +noatun-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBCQ2PARehAwODASCtASi5ASq7JTK5PT29MzS1JyipISGjAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARlEMgJgrg3zDHkCEQoEhrnVYXBDUVRdmagHjT7AnExHPtg3LldzYXr4FA6juHnMXZkqaiGMpEtOdOmETpAIEy473fV9Xphq7P6DEgMFIpFWm1sJ+4JBec8SFAnd3pveH+AeHcSfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +package_applications-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAFxaXGRmZFRWVARehAxehFxeXOTm5MTGxKze7JzO3ITC1HSyzGSmvFSWtESKpCx6nBxulNze3MTCxAQCBByezByWxBSOtBSGrAx2nAxqlARijARafARWdARSdARKbARGZARCXOzu7Pz+/Pz+9Ozu5Nza3Pz+7NzexPz+5NzivGxqbGxubNze1NS+vPTCvMzKzLz6vLzevPwCBNzevAwOBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADIALAAAAAAQABAAAAamQEBAMCAMikfjQMAsGA6IhGLBaDgeEEJEMhFIJBRKxXLBYDKajeTQBQAGG05n7vl8QABBNyTq+/8iIyRdJSJrgCMjJiYnhCIHEn+JiygpXQaGB32JKgErKiuNAoV+iQIGLBItLhOOgYkrmAYvLikwl6+Lo5gTtjFdLMHCKy8vEyITxV2tzBMFMTCWIgYlEzLX2NcwMy4vstngAS4tLyUGNODprdl+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_development-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/GxKFAQCBNSyhFQ2FOTGnJRuNOzWtPz23FRWVERGRJSGNMyyZHRydOzu7PTy9Ly6vOzq7Nza3JyanMTCxHQCBLxWVKQaHOTm5NyOjMxqbJQSFHwGBDw+POTi5LQiJJwWFPz+/Pz6/PT29NyWlMReXNyenLQqLIwSFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ9QIBwSCQGBMWkMDAgKIuBgsH5FBIO0+oSka0mFAsGtdpwLMbPxONBgCDJEQkEMnkn1RLKRGF3+CtCDRJ7AoUSEgAWFw+AChB8hYUYGRobHIwAHZGbHh8gayEhIqGiIw9+GBgSJBoliiGUrhcOJq0WJyAbKBUhnrocDr4ofkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +package_editors-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBLS2tHx6fOTm5Ozq7OTi5Hx+fPTy9Ozu7PT29Ly+vMTCxPz6/IRuPHROLPz+/LyOdLSCTNSmnOS6vPzmzISGhExOTJSCZPTSxPTKtPS6jPSujNyKZGxqbDQyNDw+PHRaTKRqVLRqRLxqTMxmPOR6NKyurDQqLExCRFxKLKRSFNza3KyqrKSmpDQ6PGwyBNze3NTS1LSytAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaWQIBwSCwahwFA8kgMOAVLpjMgGBCixamgECAYsELtoUAuXJtPRCCRMBu44ecBoVC0F2aC8qkIKBAICQx5X3INh3UMbQMOD05/AQ0QDQoMERITFBUVThZ1Cg0XFxgZGhobHB1KHp4NCR8gISIjJCQlJmGsCAULAicoKSoqDytIrAkGBCwMLS4vKTBNrAUJCzEBMjMuM35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +package_favourite-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+xISCBMTCBPyCBMQCBIQCBPwCBPzCxAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEEgZwrQzVyFq6Bj1gQOxgcBYDSzhnl7Azm7tpWT7VhdHmoFXzweqmYZE4I5C5AQKhkMAYbCMfM9EIWBAIKzNLNRbTRHCBUT6ewn6TOlyJuX2sOftS8YfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_games-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBPz+xISCBMTCBPwCBMTCxMQCBPz+/KSipISChAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrQzVyFq6Bj1gQMxgsBYDSxhqunKtu5bpSQdFDfFkS9DgHD5cTwBIdFnFLiSw2IzGGX+AocDNHQ6GhCJQCJsGRqThm/CoMBUCNc1W9HWmD2Jdsh+CfkjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +package-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECKoR6ys2IVqokF08yMTA1gwkYX5WQK5ma4VceTYPxXnBWdtY6+0834/Bowgzm6APWRQcH4TiMhPK2WYRiZWW7XK7/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +package_graphics-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/MQmJPz+/LwuLLw2NLQiJNTKVNTOZOyydNRaXMxGRJQmJFQuXFRypFySdHS+VLTOfNzWhJQeHFwCBGyGtHyqlIzKdPTapAQCBGRCbKTSjOzqxLzG3MzmxJyanBQSFJSSlBwaHCQmJGxqbFxaXNzmxPzmzOSenExKTLSytAwKDAQGBMTS5LzerOSaTFRWVHR2dJzOhLTKdNyiNDw6PFxeXDw+PLSmvKS2zIyynLzSjNTKXNSGNIx2lIx6tISavNzSbLwmJHRWfNzWfIRurIyexOSmPJweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAejgACCg4SFAYWIgwECAQMEA4mCBYwGBwgICQoFhowLDA0ODxARCAQSkp0TgwwUFRYHFxeLARITGIUZFBobEgUBC7aRHB0eBcC3iRgfGAIgISKRGCMeIhgkJSYniBkoKSgqKywtES6bgy8iMCgYyhwxMjOb7Bg0NTYr7Dc4OTo7PPIrQoRgJ6iHjx8xgMwIEgmAkIMxhsw4lYgBkSI5LEQwcsRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_multimedia-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXHx+fHR2dGxubISChNTS1MzKzLS2tLSmpNSytAQCBOzu7Ozm1Nza3MTGxNS+vOy6vPy2tOTStOzq7Pz6/Nze3MTCxOzOvNTqvLT2tDw+BOTm5MzOzPy+tLz+tLz2tOTi5LSynLz6tPz+/NTW1KSipMy6THx6fMTKxKyOLNTGVPTmbLTOtBQOBBQSBKySLHReFLzKvLzavAQGBCQiDNzKVOTSXLSWLNzGVLyiPNTCTOTaZLymPMSqROzebOzeZMSuPBwaDMyyRFRKHAwKBOzibMSmPMy6RLSaNLyaNDwyFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfKgACCgwECAwQBg4qCBQUGBwgJCgsLiwAFDA0OBg8QERITlYMFFBUMFgYXEBIYGRoboxwMFRQdCAoeGR8glAABBgshFA8BCxsiI5QklY4lJQYbJiQbypQnACgpB5ALy92UKissAAQXDyktlBUuLzALMeG+MjPKNDU2LDc47yqC1Qs5dODYwYJHj3f/Yrxb4QPHiR9Aqr0I4kNFDCExdgxRQaSItyA8jJw4YvFFjBdCGtCotECFjhssVgRR8W8QkgVJlOBb8k3UID+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_network-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBPz+/CRKfERCRAQCBFxONKx6LDw+PDR2rAwyXMzOzOzq7AwKDHSSlKy2ZDxutAxCpExOTBRavBQ+fBQ2XOTi5OzWhFRSVBw2VGRmZDw6POzKdCQ6ZBRKrCQmHAwODIyirGSGpIR+bCRixBRKtCQ6VDQ2JBw2XIS27DRKNISuhESK5DR+5BQ+jCQqPCxSfFSa5Gyu7GyerOzetBw+XBwuTBwmNFSa7Eye7DSW9JyabLyqRBQ+dBRerDR+zDx+3Bxq3LyaLJySRHxqPGxeNBRSnCRmrHRyRERONDw+NCQuLCwqHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAeygACCg4SFhoeEAQGJigIChQEDBIIFBgEHBAgCCYMBCgQBCwyhDA0ODxCcAAqRihGXiooSExSCsYoVDBYEFwEEEBiCrBmgGgUbigMcHRgeth8gAR8hIgQECyMkJSaCAicoICkqASssvi0YLoIvMDExMg4zrjQTNTaDCTcxODk6OwQYJmCYNIhHDx8/gAQRMoRIDRcEBwkoYqTIkSMFkNiISCjBCR40UiQxwdGQEg9LSvoJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_settings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +package_system-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBGxqFAQCBPz+/PTqtOTOfMSyPNze3Ozi5KyeLMTCxMzGzKSipOTe5MTGxAAAACH5BAEAAAAALAAAAAAQABAAAARfEMhJQah4ihFunsFAEIVXCVJACIJhoBK6CerawsA8HAhbuAnYZrBDKBYMWpCy4S2QSRazyBIwrrjcoNFQzK4KR1bQcHhZjGM2BgWLMYJ2enForHPJtNj+kfHvcB8AfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +package_toys-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBJxyLJRqJGxKFIReHKR6NJx2NMSmbEwyFKyGTMSibFw6FMSqdCQWDIxeHNS6hAQCBDQiDNS+jOzexCwiDCQiHLyeXFxGHLSWXJwuJGweFHQiFMx2bLRGNGQeFNTClOzSrLxKPLQ+LLxOPGxOHIxmLEwWDOzatNS+lKyKTIRiJJx2PIRmPJRuNKyGRIReJJxuLKyKRMSqbKSCPEw6HNzKnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAauQIAQEBAMhITCcTg0CA6IhGJwICyYwgWjEQg4HIgHBCuMBCCSM6FBHiIOk4cg0hYiKAFFxUJBtC8YGQgBFhAaBVdMAw8bHB0eHh0cGh9LAAMgAxAhHiKPIxAkH1cXEiVjJiQnKCljECoWCAgEFGUrKBYsYwARKnQIRxG0Ky0QtAAIvwcuAwQpLxDCGDAIMTKyMSczs7sQATQz2mMIMyAXu0IQNDUu6AgQ6EPwu35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +package_utilities-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExKTERCRAQCBOzu7Nze3MzKzLy+vCxqZBQ2NJyanKyqrGRiZDRydKza3FRWVPT29LSytDw6PMTm5EySjCxaXGRaJFSanCRSVGxqbPTmvMSqVJTW1GSurHS6vOzq7KSipISChFRKHJSGNPz23GxKFBQ6PKyurCwqLMyufJx2RAQGBJSWlEwyDIRiLNy+lLSKVDwmDJRuNOTOrLyabGRCFDx2dKSCVOzWtHzCxOTGnNSyhAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQIBwCAgIBAOiUiggFAyHASKxDAwUC8Zg0HAglA9IZPGQABoTSqJCFTIOEIsFgHBcEhhHUpKJFCwaGxYYHB0VEx4IEh8gIQwiIyQbJRMcHokmEicfDygAkCkqJQgIGG0rLElCLS4vMCWqQwMCQg0UMTIzNDVLQjaIGDE3ODQlS785CEkxKjowvEOHybG4O6JDCdNKuDUxRAmxRDHeveUAfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +package_wordprocessing-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBHx6fPT29FxaXPTy9AQCBHRydPT25Pz6/ERGRIR6PJyORHR2LDQyNLy+vNTW1Ozq7Ozu7LSiVKSiTIyKJJyenMTCxMTGxNTGlNTSjLyyRExGTExKTBwaHOzivMy+XBQWFExOTNzOhIyKjFxeXDQuNMSyjNzOnBQSFNTGjDQuLCQiJAwODCwqLGRmZHR2dAwKDCwmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAafQIAwQCwWhcihYMkUDJLIAKG5fEILhoOAgGAmCgXFgsEoNByOxwMCiTTAEsmEAq5ULJbLxQEuYCQZGn0JGwkcCR1gCUIeHyCJfX2JIUIHIiANCQMGIwYkCSUgi0KPHSYdJyAnKCkdHQ1IrhgdGCC1s7UqSCsdKLi0wL2xHY/FxMcssS0JIS4vIy8uIQktHUkgKygsMNwwKCAxUOLjAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +panel-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/FxaXMTCxDQyNAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECLrcEDDKGYQV4+qbie9eGIJEVxTe+QmjUFgnXLLr615oF8x2v0I8DWpF2GV6slkLKSMdYT4nS0WgSkXYAWUbcXgX/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +panel_settings-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxPz+/PzerISChPyqXAAAACH5BAEAAAAALAAAAAAQABAAAANKCLobwRAG4SJw7w5BswoEkQXbRn0h5ggF14FhbIhb68SiOgnbLRsPEovjwwVLRIdhCfwMiR/VZ1A7WS4tntWyynquq+01+h1//AkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +password-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCBPz+BISCBPz+xAAAACH5BAEAAAAALAAAAAAQABAAAANECLrcGi6CIAKUKwxSb/ZasXWPMFwBQRQiZwlqAVnEGbRwKz/ndMep3QNUqKV6kpQh6HFoCIaBMDmQTpOsJsaC6XoZ/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +penguin-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/ISChPz+BMTCBISCBAAAACH5BAEAAAAALAAAAAAQABAAAANHCLrRsTC6F6UId1TYiNtMQRQNqARDOlAgJrzlhr7vqlUufbHMoMO8k+8XY4yGtc9pREIORKRTYVoYDgxUVmBqmGCLJzDYnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +pixie-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXPz+/DQyNAQCBKSipPz+xPzerPyqXPyCBERCBISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARdEMg5Q6C4BjEGyZIlCEFHfJQonEERnB8sE6RxIMkAnGtPBzacjqBQLBiMxS+Y2xmRx+WtSTgmkwQLcwhNKqRCz3VRBOeGvh5wqpPMzO3JQFBguWAYxeiNwnRAEn4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +plan-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxPz+/Pz+xMTCBISChASCBMRaBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEIRJKwU4iD23FwEmDeAwBGYaZiehWutEFK6JqtlM7KZhHhOJbuizIUKBHVGFOOaUPgPlGEsSDNjbKWBgcT0oX5CV2qakIg24OTGA0sxjeSWpUC2ivESf90cAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +proxy-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/KSipFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANGCAHcziuIuFy44045WxhZpkxCB4GEKA1lpIAiVG7XB1bjPMHxqds3y++S6nGOL1ikpYlkbBSZM/oYfXBVaS8LuXCr2IY/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +pybliographic-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBMTG5OTi7Nze/NTS5LSuxOTm/MTCxGxaFIRmFJR6JLy+zOzq9IRqJJR2HLSaNKSirNTOxKySLIR6VLS2vOzu/LSqhNzOXHxqNMzK1KSGJHxmFKSabLy2pIx2JJyCJIRyNNS+VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZhQIBwSCwaj8WAEplULpkAZ0AQgEaVA4K0alQWDAdEQrHgNguMRsHxgJiJgcEg0pA4Jk84ZVCoWC4TGG9CAQkZGnUIG3lDAQocCh0eFB+MjRsgIAsLIYNwASKCnk2WVkR+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +realplayer-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIYAAAwWVBwC7BwC9BQC3BQOvBQCtBQCrBQCvBQO1AwKPAwOVBwC/AwGnAwCXAQGNAQCJAQCHAQGLAQGTAwKjBwG7AQCNAQKRAQGDAQCBAQGJAQGPAQGFAQKVAQGBGRiZBweHFxaXDw+PExKRBQSFERGPFxeXCQqJLy+vAwCjJSanFRSVLzCxJSSjIyGhGxubNTW1KyurAQGHAwODKyqrHR2dBwO7AwSZCwqRDQyLCwuLAQKFAwSjAQCLAQCFAQCDAwSbAwGbBQKvBQCzBQC1AQSNBQKtAwOdBQKnBQCxAQabCwOLDQSNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAQABAAAAe/gAABAgGFAwQFBgcIgwEJCguRDA0ODxCXERITFBUWCwMNDxcYpKUYGRobFQEcFx0dGLCxrx6kFQcYHyAhIiIhIyQlJiekESgYHikqKywtLi0vIDCkMQQbLiQyMzQgLDQzJSCkMjU2NzIYOCYyOSYmH+gYOjUBOzw9PT6mGD4P/AORahj4IaECBFI9gAQhJSSSw0g2fGggsEAIw4eRhhBhEGBBgCKkjAgZSRLFESFIRibZx5KlkpYtlbyEuW+Jn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +remote-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBDQyNISChJyGPGReLAQCBMy+hERCHKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARFEEgZqp0Y1KxD9twEapg1kqhwBgKFvqIIjgMRdy4wFIaNbiiCYXDIAUcH328EQsxiIBXAqWn9MtTSTZLNybizEweY8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +samba-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIUAAAQCBDQyNFRWVASC/Pz+/PTW1OyytNTW9LSy7PTGxOSenNx2dMTG9Jye5OSKjNxiZMw6PIyK5GRi3AwODMwmJLQCBCQmzPS+DPTejPTaJLR+DPT21OzqtNT21MTCxPTyxOTmnNzedMTyxPz6/ISChOTijNzaZMzOPIzijMzKJLS2BPT29Nza3PTmxKSipOzu7LyGJPTKRNSeDFxaXERCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAMALAAAAAAQABAAAAacQIBwCAgIBsjkAEAoGJgHxFC5TCgWAEajyFUCHA8IICJhTggAr4NSGVsAF8wlnSQWBYLMRUNHMjccTB0AGh5dfh8gIQAiAAJCIyRCfiUmJwEokARok0slKSqPApukAZNDRpqbkZMjSROOI5srLAGwS34tGgEuBCMvAjCBA64ALRgxuyzAMnItQmgaMRcypjMByNR9QjQ0adzeaX5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +scsi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCxKSipISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANCCLoQwZAFIV6UYgxi79Qa52WDE3bKV6YOpFpO3L5pJcckLBB8/wQEDezWAQpZqIWxFNAUkqkg6HmJOqGuArUqwfoTACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +style-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBOzqBLS2BPz+HPz+rPz+BPz+lPz+zPz+9Pz+1Pz+nPz+hNyuhPz+pIQCBMTCBIQyBPz+/MTCxFwmfCQiJIxOrHw6nJRWtJxmvJxuvJxyvAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVvICACwWieYiCUwVCiKVEEhjHA6YEcxooHBURCsXihaAYGglEzngKBhsMmMDhH0YcBAu16SY2IKiApm81RMXTCblPelDCrXJlI6hSL5SJOSewVdRMUGHtGZICChHsmZHeAgxkaG41/bWxnjV6bUH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +terminal-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTCxISChPz+/MT+/AAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM/CBDcHkoFQasVUIrBe8fRNDwMAWpjUThmtmxk0IYwOaPx/V6XG3hAjmsRa0Qkg6NSOVo6F0nG88g4TUNDpT8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +wabi-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/ISChPz+xAQC/AQCxPz+BFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARUEMhJgw20XsHxvIEwcKQHBESaDkShmqhKsMb7tW1RHPwOH4ZdYcBDGH+8A2JgLH2MzZHAJgmRBAgZAabNqg7cJMGb5BKSZF4Yfb5Uzmp3piqfS/wRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +window_list-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCRiXCRaVPz+/CRmZFRWVISGhMTCxESSjPT29DR6dDyOhDyCfPTy9CxqZOzu7Ozq7ERubOTm5ARehAxefPz6/ByaxBSOvBSGrAxynAxqlBR6nBRylAxmhARWdFxaXCH5BAEAAAAALAAAAAAQABAAAAWHICCKQTCeqCgMhJCihXEYSPuKRWIoC6PYsEZikHA4FA4CEJdoJh4QgXRwiOAeQudDIpEZIpPwhCImhyGGAmBSOVgumExG055w1ZPZhpPpUDwzExBqAAUDhxUVTQ0QEgWOOIcDiU1QjoSFFYiKDZYFmAWJlE9bkCM5iouWpiIfBa6frrKYAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +winprops-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPz+/ASChATCxISChFxaXKSipPz+xMTCxMTCBPwCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAoALAAAAAAQABAAAARXEMhJqwxAjM23wBMhjGQJEFKhriwrGUcsE3JsvPWBFAAiT7BaIYAA/HAxWk9CO9wAwd0SkJA9g8NiomnDoYqnHDAGroqRyVy3F2i7326LnKKo2+94hT8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +wp-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBAQCxAQChKSipPz+xPz+/ARCRFxaXEQCBMTCxPyqXDQyNPzerISChISCBASCBERCBMTC/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAV1ICCOZDkGgSgMg0AUZWAExyHc7YCQclLYtxtieAoUEApFUIBgnRYMhUHRCDYcDoUIRUhOlYLkYwcIDLvSpAsBiYx0CPQUgXNv4V0ZWEByDBgRcTMGDislTX+CMgISJk1+AQ4zWiYiCCiRDmRbmJ2eKZWhAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +xapp-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChAQCBAAAACH5BAEAAAAALAAAAAAQABAAAAIyhI9pIa0nYAtPUGlTRszJ10UA8xiNRZZmJKoA25boqW7npeHvlKRHyIn9aKYaz6XwFwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xcalc-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChPz+/AQCBCH5BAEAAAAALAAAAAAQABAAAAI4hI9pwe0Ogpi00hHF2LzzzFlTsIHD45SSx6oCeW4wjK2tl83y7t64pIsJaxrfh2bEAJIlhRPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xclipboard-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/MTCxPz+xPzerMRaBISChCH5BAEAAAAALAAAAAAQABAAAANICLoQwdBJIaRjgYbBR66Lo1nfowTER61aWGRd1y5GyrLm+QrxMJ81FQ4T2MV+jUPwBgpVdrdcQ6AUIj8Ha/N06Hq/UpLY5E8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +xclock-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAALy+vAQCBPwCBMQCBIQCBISChPz+/MTCxCH5BAAAAAAALAAAAAAQABAAAANbCLHcrSLKOZcYmDSCsR1aUABAsXDDJwJGa5SBFwgaWxbCG3CWaBwG3C8Y67FawpYiNQscg65fsVkYuoAmJs1pBR522lQB6ILJLqHRwQQOZzYdZnw+dzruDIA/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +xconsole-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/ISChMTCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLrcGjBKCYK4OGcohv/gxw2aRgyjYJXCmVpr5loke82dfaO03vI5Ha5mwxGOyOSRF2qKKpMoxEFl+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xedit-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBMRaBPyCBMQCBMTCxPz+BPz+/KSipFxaXPzerPyqXIQCBARCRDQyNISChCH5BAEAAAAALAAAAAAQABAAAARnEMg5gw00yyDGIJi2FUHhDWEWeEXrgaphHEOBJF8KBLKyLINEIAHbyA6/hbDACDSMBt9PIBA6n4HfIElFXTeKg2LbtTSeu7BiPegIvuA1mwrfOB5r4PusCjimZmgUF4F8IhJnhiJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +xemacs-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBDQyNKSipPz+/FxaXISChMTCxCH5BAEAAAAALAAAAAAQABAAAANJCBASoXCFoVi8VdL6HHQeB4YjSAxnYQygSLzoSTjbEs9vMF86cbyH34NX+AELQ4zO+Nopm6cBC1PBEQwG6gd3SGo7Xa1STIb4EwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +xeyes-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAI4hI+py50Bw4lyBiEggFjvi2VcqIFhdnaDSabZKrbjS3W1OHz2CkJD/vHlKD/Er2g4Ah3MptPgLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xfig-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+BMTCBISCBARCBATCBASCBCH5BAEAAAAALAAAAAAQABAAAANQCLocwbAJ8SIMYgwHHO9Opk2V5xGEplZK0alaui0eDLOB8QTykOKGQ6mnKQWFPILDN8sdng7l69c5CjuKAHNnZb2KnUOhcG3MsmMv7aK2+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xfmail-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPyqXMRaBPz+/AAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANACLHcAVCJSWcYLwaxSPAXBj2bswyiIlUWSr5muGhbdaZjTd1ZzvKMFaOFcbCIpiOnGGs2FM5gLkLrTalQLMCfAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +xload-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+py+3hEoxnUmBpyBjNzWXfJnkGKJ4dBlbjS7Jni9Zsjec66hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +xmag-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipMTCxPz+/IQCBPyCBMRaBCH5BAEAAAAALAAAAAAQABAAAANICKrR+6+JIRxkc4RBww1TQBBNB21io2rRRKpltaDvis4hvJmzBmuslo+zkZ0yu0rBcwJ1AgXD8gJQMaJTaqRwyGqvzO9M4U8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +xosview-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIMAAPwC/AQCBPz+/MTCxAQChPyCBAT+BPz+BAT+/PwCBAQC/AAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARFEIRJa5Ui663HFEQojqEXCAVhrCxLmGB4kCJM03aIHEdC5rfaJ6UotlavT3AEIxaNLuAyd2wlT0thYMDter0BiWU8AfgjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +xpaint-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBPzerMQCBPz+/AQCxPz+BMTCBASCBPyCBPzC/PyqXMQCxIQChKSipMRaBDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVtICCOYmCaZGoKLBuMbykMA1EURFwCgWAQwKBAxxMQDocgAjEkrYAsoS6QGEYJCgWhWVq4tgJGY+iAVbcBB5jLq/aMbzJsYXK0Arky7JFY+BcJDyckDgEPh4d1aUSFJ2l6ARApDpSUKkQpmSJ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +xv-16:apps apps16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPyqXPz+xPyCBPwCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM8CLrc/jC+oIK9Lgg7RuietWhCSWkkVZUbEBBnWxXFSVP1eLt7kPM3X86nEhJrtx/P0tuNilCVZEqtNvwJACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +3floppy_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVrICCOQBCQKBkIw5mqLFG47zoQ+FwbN57TosDhgPD5dMEEIqE04kwlBWKBUEiNVYFpyqAyGEUCgqEtERiNNMLhQKzLQYJg7n7Y4aMAwbCUPvAQeWNgfzQQETAIhSMQEogwgBITQEGGEREmfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +3floppy_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +5floppy_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBFxaXPz+/DQyNISChASCBARCBMT+xAT+BAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARMEMgJQqCYBiFu1sIwdJ+0hSKZnZw4ehPLoW88c0Q7X7JABLlbp+eT/UyzgpADqwgKxKYpeIMZQNWJ4YBhWRHcrgpgQCSkJu3hYPFHAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +5floppy_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBFxaXPz+/DQyNISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM+CLoQwZAFIV6UYox61cwaF32UtlkLSYFnulJEuT6qQATxW9W2enurgo6CaggKvKIn91K6mh0gMepydqwAfwIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +cdaudio_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tOzOvNTqvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/LzKvMTCxDQyNASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAa0QIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTBqUiuUCVmAeiYzmsKlwOt/AAKFIFAIIFx4WHyAhUwIDIgsZFyMkFxchJSYmiBkSBBoIJJwIGgOhiCYFJSEnFyQjFwNZewABISAfFiYnCAEmCREIrwAIFhwVGwcaBAkPGApsQsAVFA0GBQMRbxBTKM0ODQwTEq192ClDgROkBHvYKuNJUu5CKCorX1RDKCkpUn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cdaudio_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tNzmvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/MTCxLy6vDQyNOTm5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAapQIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTLqUigWsuDwSmMxBQ9lwvoEBQpEoBBAWHRseHyBTAgMhCxgWIiMWFiASJCSHEgQSGQgjmwglGKCHBQUSICYWIyIWAwshIVMBIB8eFSQmCAEFCREIekIIFRsUGgcZEgkPFydrvxUUDg0GBSEREGJfv9AMEySsJxDYQ4DcEhh64UpS6lTs7QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cdrom_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tOzOvNTqvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/LzKvMTCxDQyNASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAa0QIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTBqUiuUCVmAeiYzmsKlwOt/AAKFIFAIIFx4WHyAhUwIDIgsZFyMkFxchJSYmiBkSBBoIJJwIGgOhiCYFJSEnFyQjFwNZewABISAfFiYnCAEmCREIrwAIFhwVGwcaBAkPGApsQsAVFA0GBQMRbxBTKM0ODQwTEq192ClDgROkBHvYKuNJUu5CKCorX1RDKCkpUn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cdrom_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tNzmvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/MTCxLy6vDQyNOTm5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAapQIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTLqUigWsuDwSmMxBQ9lwvoEBQpEoBBAWHRseHyBTAgMhCxgWIiMWFiASJCSHEgQSGQgjmwglGKCHBQUSICYWIyIWAwshIVMBIB8eFSQmCAEFCREIekIIFRsUGgcZEgkPFydrvxUUDg0GBSEREGJfv9AMEySsJxDYQ4DcEhh64UpS6lTs7QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cdwriter_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBFxaXISChERCBMTCxKSipAQCBMTCBPzCxPz+xPzerMT+xDQyNMTC/ASCBPyqXPz+BARCBAT+BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAWIICCKgWAGYyoKA+EWhGGogOAaB6Lr8ygUCYWCkEMoEovBSHZUFI8LGYloODJkhWijMbMdiAwBQEbYxmpExFlkgN3QrliXAcvNAuVt4coYKtQ9BlwLCQQFMAlVSmwEUX8IB1UJiQAObEE6BA9VEDMOEUsDDzoHkZ4LoCkyqyIOCxI9NCOfETJ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cdwriter_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXISChERCBMTCxKSipAQCBMTCBPzCxPz+xPzerMT+xDQyNMTC/PyqXPz+BCH5BAEAAAAALAAAAAAQABAAAAR3EEgZhA0zSzGIL4RhaIDgGQeiquMkFImiECmiJMswibdS3wsRhWa4MUSFYKMxMh1oDAFARFiGSjTEVWIAnbCeUJMBSo0C1WXhyJgptC0Dc5EgFECJoo5LCL4RB0UJeRkGMSoEDkUPLYUDDioHgY0kIpYkmJkAfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +dvd_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tOzOvNTqvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/LzKvMTCxDQyNASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAa0QIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTBqUiuUCVmAeiYzmsKlwOt/AAKFIFAIIFx4WHyAhUwIDIgsZFyMkFxchJSYmiBkSBBoIJJwIGgOhiCYFJSEnFyQjFwNZewABISAfFiYnCAEmCREIrwAIFhwVGwcaBAkPGApsQsAVFA0GBQMRbxBTKM0ODQwTEq192ClDgROkBHvYKuNJUu5CKCorX1RDKCkpUn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +dvd_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tNzmvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/MTCxLy6vDQyNOTm5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAapQIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTLqUigWsuDwSmMxBQ9lwvoEBQpEoBBAWHRseHyBTAgMhCxgWIiMWFiASJCSHEgQSGQgjmwglGKCHBQUSICYWIyIWAwshIVMBIB8eFSQmCAEFCREIekIIFRsUGgcZEgkPFydrvxUUDg0GBSEREGJfv9AMEySsJxDYQ4DcEhh64UpS6lTs7QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +hdd_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKROzSrOzKpOTGnLSafLySZKxuLMSOVPTWvPzixLSehNyibOzOrGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTOpHxOJKyKXFw+HKSipISChMTCxFxaXIRiPNSWXExOTOS2hLR+PLRyLPTWtMyOTASCBARCBPz+/DTSJIyKjIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwrA3HQ7scQAqFAcEQOUi0zAkFUSFYLghMBloUCDQNGxwdHhwHekcfICEhICIfIxkLJBABJUYCICABIhAOBiYnKJaXmH4CGSkYCCqkSAEfTKenrkOwsrQll0IrS7G5uwArLLaxLbXCLsTFLyDBKy4wZEVHvCwsRn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +hdd_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKRPTWtOzKpOTGnLSafLySZKxuLMSOVOzOrPzm1LSehNyibGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTWvHxOJKyKXFw+HPTOpKSipISChMTCxFxaXIRiPHxaNLRyLNSWXExOTPzixOS2hLR+PMyOTPz+/IyKjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaIQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwGgiD46FdDiCFwoDQAEe0TMkEQSFULIcLBloUCDIaDRscHRsNHhhHHyAhISAiHyMkJSYQASdGAiAgASIQKA0pKguXmJl+AiQGFwgrpUgBH0yoqK9DsbO1J5hbsrq8SrgstlJFHy0gwMVFR1J+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +memory-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChAQCBMTCxCH5BAEAAAAALAAAAAAQABAAAAI6hA+Bu+HCmgiiRuNoHZBRXQlc84TmcHzm2WVryE1YvMaZIdbVd2zw7lj4bDKGbxK8hHgX3K2JUDD8BQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mo_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipDQyNPz+/MTC/PzC/ISChASCBARCBMT+xAT+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJQqCYBjFu1hxBeN82iCIJDgWaYhtntC4ZCzItdhWOD7mdwHLrAAczoKViIh6Vto5lcDjglppp9UpCTALULRaASGS5E4TCnB2rFyqJO5Gw+CMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mo_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipDQyNPz+/MTC/PzC/ISChCH5BAEAAAAALAAAAAAQABAAAANHCLoQwZAFMV6UlBB759Aahw0FGEITZZQmlwoqq1UNDA/xLDhvhQ8rnKPh4f2EropjcDjAhpJl8ylaBJhTaCelvRC7XqLXnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nfs_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBExKTGRmZPz+/ExOTMTCxAQCBDw6PCwqLIyCRHxyNCQiJOzmxMSybFxSHHRmLIx+NFROHERCRFxaXASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVWICCOZGmeaEoGKiCwwUAI5zsUBnAUQ0CLNhxLFEDwDAnFzTAsBRYJRsORSwUeDUiEWYtJIhFj7+eKCUdPHmxyNj0nFABXRam0RBSLvZW/VFN1FQYGfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nfs_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBExKTGRmZPz+/ExOTMTCxAQCBDw6PCwqLIyCRHxyNCQiJOzmxMSybFxSHHRmLIx+NFROHERCRFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVLICCOZGmeaEoGKiCwwUAI5zsUBnAUQ0CLNhxLFEDwDAnFzTAsBRYJRsORSwUeDUiEWYtJIhFj7+eKCUdPHmxyNj0nOa6q2qrbW/4QACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +printer1-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBFRWVPz+/Ly+vISChMTCxFxaXPT29DQyNJSSlHR2dERCRFRSVERGRBSmnExOTExKTAT+/NTW1MzOzMzKzMTGxLy6vLS2tGRiZFxeXOTm5IyKjISGhLSytKyqrGRmZNTS1Nze3Nza3Hx6fKSmpKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaUQIBwSCwaA0ikkRgQDJCE5LFgOAicUKUwUCAgBuDE9RkFcL3ggbgQUCwYyIIA8VU32ASDwoEcIAoHCQkHbA8EBBARSX0DXQEPEgQCDYpJExQVAWCHBwcNDUkKChQWBBcYARkanaABExsbHB0FGB4fIKoHAWYhpCIBIyQLJSAJGbtbULUTISa4yEVJJSbO0EtmUkR+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +printer2-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBKSipAQCBPz+xPz+/MTCBISCBISChMTCxFxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMggqrwYVDGGzRLXEZ0HhgMpFIXxZZzRBsHxXquAUHqCCBgB6YcoFhNAXMWISCQOv6Dt6DMmQwQntHjwXTVL6mH83Ry31qBO8CSQSmVg2GM74aAVij2UTPojACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +scanner-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MT+/ASChARCRATCxMTCxFxaXKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJgqWBVivEldkUdKSXhVjZfenommglDERh3Tc4E4ZRHAGgkEPr9X6H5AHBERSMRyWzkug8jQXFEhWoOo8dRYxqLXSmGjIJnVaz29Q3fAP3RwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +tablet-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBMTC/Pz+/MTCxFxaXKSipAAAACH5BAEAAAAALAAAAAAQABAAAANECLrc/iosCUEQlEYdRp6dZ4lgKBBEp1kmmpLRMBQu6qWLEdYBn+81F0wnC8oCK+LAQDgGDIaG0vOMPnRIaEUBtW6//gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +zip_mount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BAQCBFxaXMTCxPz+/ASChPwCBKSipASCBARCBMT+xAT+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJQqCYBiFs1lwwdF8VEsR4YVuXoirYFcWbkmY31wPqma2ZwReqBEODQutwEY04oeWqMniGOEzW4HAVZAEImVSCSLDGYIX5/EMoFtNSOWHxRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +zip_unmount-16:devices devices16 16:photo:16 16:R0lGODlhEAAQAIIAAPz+BAQCBFxaXMTCxPz+/ASChPwCBKSipCH5BAEAAAAALAAAAAAQABAAAANICLoQwZAFIVyUNIx6WybE9kBTFYIiVhXFGXJetbYDaHnlathZk2eDQunw0GwomeGoMThmKETS4PAURCMlZccHXXYct60Y4E8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +blockdevice-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBMT+/ATCBAT+/ARCRPz+xARCBPz+BATCxISCBDQyNMTCBCH5BAEAAAAALAAAAAAQABAAAARhEMgZwrwYBCFsvhs3eF8wDMJAVBVmnupazKRmGDFxzMVBBjcDQXfYHRA/QmKpKBYRSMoysVgwGEeoJ1ClLhpXhlbiqJobjcA1Sn48qug06+JwP+I1UMCNzmcqaR8lghN+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +chardevice-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBMTCxISChPz+/MQCBPwCBAAAACH5BAEAAAAALAAAAAAQABAAAANCCBDcHkoFQasVUIrBe8fRNDwMAWojMTZmtmzByp6v7LQhTOLadbkxj3AUWZAcxcUgyYwQm8wYoOCCLgoGK5Nq9ScAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +desktop-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExKTDQyNHRydFRWVKyqpGxubExOTERCRLy6vFxaXBweHFRKPFxeXAQCBIyKjCwqLMS+tKyurDw+PNze3ERGPPTu5Pz+/Pz6/Nza3MzOzKSipISChOzq7NTW1Ly+vHx2ZOzm3Ix2XJx2XIyOjKyqrJSSlPTexPTixKR2VKxyPCQiJPTy9JSWlHRmTOzSrMzKzJyCbKR+XCwuLOTi5CQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQIBwKAwIiEjkgJBsAgoGwcE5RCQUgAWj0WwcHA8FRLhAcIcKhyIiMSwcwglc2ABTDA2Eo9KQoy0PFxgYGRobDxwBDHRgF44YHQ4bHgkfHBUMHQ8gFp2dISIjEQwfBwIkJR0mICcoJycpKgweCisAEAcPGSwtLi8vsQkNtkMrBxswCQ8uMTINY0kzBCQwNB/DVAArBC0NNdlDM9BDfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +file_broken-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/KSipPz+xPzerAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEEgQahVijMmD/oRAbBw1FCgaFFrppeo5didsZTSMDoRBSi/dgfUz6Va7HPIQGB6KnpW0EEB4Oshp5ZlTFRBfFs3ZLDihtTAYwZ14nGbzoS3JfO4ffwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +file_important-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBExGTKQqLPz+/KQqNAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLoQwZAFIV6Es15Jqd2ZtzXUMIhXZqJYaZ5aK7zwp6h0zc05i+c6Eg8oCnWOR0eHQGEKnEWHdDoF+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +file_locked-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/KSipPz+xISCBERCBAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEEgQahVijMmD/oRAbBw1FCgaFFrppeo5didsZTSMDoRBSi/dgfUz6Sq7XGp1CByKQZUUWjsgrtcENYXNUodWhAahVRa65G9hmGgnnpzMZ/7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_blue-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9HzC3AxmnAQ+XPTm7Dy67DymzITC3IzG5AxypHRydKymrMzOzOzu7BweHByy9AyGtFyy1IzG3NTu/ARupFRSVByazBR6rAyGvFyuzJTK3MTm9BR+tAxWhHS61MTi7Pz+/IymvCxulBRelAx2rHS63Pz6/PTy9PTu9Nza3ISitBRupFSixNTS1CxqnDQyNMzGzOTi5MTCxMTGxGxubGxqbLy2vLSutGRiZLy6vLSytKyurDQuNFxaXKSipDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYHCImDBgkKCwwNBQIBBw4Bhw8QERITFJYEFQUFnoIPFhcYoRkaFBscHR4Ggh8gIRciEiMQJBkltCa6JyUoKSkXKhIrLCQYuQAPLS4TEyUhKb0qLzDVAjEFMjMuNBMoNcw21QY3ODkFOjs82RM1PfDzFRU3fOggcM7Fj2pAgggRokOHDx9DhhAZUqQaISBGhjwMEvEIkiIHEgUAkgSJkiNLmFSMJChAEydPGBSBwvJQgAc0/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_blue_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOzi1Ozq7ERCRCwqLPz+/PT29Ozu7OTm5FRSVHRydIR+fISCfMTCvAQ6XARqnJSKfIx6XPz6/MzKxJTa9Mzq9JzO5PTy7OzizJSOhIyCdOTi5Dy65FTC7HS2zMzm7OTSvNTCnIRyVNza3Dw+PASq5BSGrFyqzMyyjMzOzAR+zBRejBxqnBx+rHRmTPTy9IyqvDRylFxaXNze3DRujAQ2VLSyrDQ2NNTW1NTS1AQ6VJyenGxqbMTGxLy6vGRiZKyurKyqrKSmpDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfCgACCAAECg4eIAAMEBQYCB4mHAQgJCgsLDAEGDQGIkw4PBQkJBYwQnRESEREIoRMUE6IVChYGERcYGaoRGhsbHBQdHgu2HyAhGSK6qxsjJCUmJwARKCkpKsjKqislLNIRLS4vLykw2MkRMRAGhDIJMzTiLzDXETUQ0gAGCgU2HjM35N3AkYMdAB0EbCjcwcPCDBguevjIR0jHDwgWLACBECRIBB8GJekQMiRIjhxEIlBMFOBADR9FIhiJ5OnAEQB+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_cyan-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHNTKzOzq7ExGTCwqLERCRBSKjBRSVGxubKymrNTS1Hx2fCQiJMzq7NTy7IzKxHR2dFTW1Ey2rITKzNzy9JTSzBySlHRydKSipDTW1ByelGzCvIzOzByOjFRSVCy2rCSalGS+tJzSzBxudCR6hCSCjITGxMTm5Pz+/JSutDyChBxydCyOlITKxPz6/PTy9Nza3ISqrGSyrOzm7MzKzDQyNMzGzNze3OTi5MTCxNTO1Ly6vLSutGRiZKyurHRudDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe2gACCAAECg4eIAAMEBQYGB4mDCAkKCwwNjYUOAYcPEBESlBMMjAUFnIIPFBUWEBcYGQoaG5gGggMcHRUeFh+fGCCVIakiICMduiQWJa4fCKkdJicoCcjJKSrPAAIrBSwtLtMv1jDaCDEyMgUzNC3SKCA12gYFMjY2KzMzN98uLdo4cujYoa9BAx4IeSywJSgAjgU8evTIgdDHj4WJHAL54cPiDyAMIzkMsSGIkCGREAU4gAOAn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_cyan_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFNze3Ozq7ERCRCwqLPz+/PT29Ozu7OTm5FRSVHRydIR+fIyCdMzGxAxOTBSGhIx6XJSKfMzKzERGRAxOVKTq5Mzy7KTW1Ozi1OzizEzSxGTWzHzCvNTq5OTSvNTCnIRyVNTS1BzKvCSalGy6tAQ6XMyyjMzOzDw+PByqtCR6fCyGjHRmTMS+vJSytDyChCyWlGReVOTi5AxGRKyurDQ2NNza3NTW1AxKTJyenGxqbMTCxMTGxLy6vLS2tLSurKyqrCwuLFxaXKSmpDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfEgACCAAECg4eIAAMEBQYCB4mHAQgJCgsLDAEGDQGIkw4PBQkJBZcQnRESEREIDwoPExSipBUWFxgZGhIXFwkbHBQToQQGFx0eHxoguhEXHCEiIyQGABclJiYnycsSKCkjKisAESwtLi7Y2soXLzDUAaMxMuYuM9kXNDDiAAYFBTU15NGTYeMGNQA4ahAgkEMHiQoxZrTYwWMfIRw9fKio8MMHECAReByUhIPGDSBBhAyJYDFRACJFeBi5cCSSpwM4APgJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9HzC3AxmnAQ+XPTm7Dy67DymzITC3IzG5AxypHRydKymrMzOzOzu7BweHByy9AyGtFyy1IzG3NTu/ARupFRSVByazBR6rAyGvFyuzJTK3MTm9BR+tAxWhHS61MTi7Pz+/IymvCxulBRelAx2rHS63Pz6/PTy9PTu9Nza3ISitBRupFSixNTS1CxqnDQyNMzGzOTi5MTCxMTGxGxubGxqbLy2vLSutGRiZLy6vLSytKyurDQuNFxaXKSipDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYHCImDBgkKCwwNBQIBBw4Bhw8QERITFJYEFQUFnoIPFhcYoRkaFBscHR4Ggh8gIRciEiMQJBkltCa6JyUoKSkXKhIrLCQYuQAPLS4TEyUhKb0qLzDVAjEFMjMuNBMoNcw21QY3ODkFOjs82RM1PfDzFRU3fOggcM7Fj2pAgggRokOHDx9DhhAZUqQaISBGhjwMEvEIkiIHEgUAkgSJkiNLmFSMJChAEydPGBSBwvJQgAc0/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_green-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHNTK1Ozq7ExGTCwqLERCRByGRBROLGxubKymrNTS1Hx2fCQiJMzm1NTy3ITGnKSipFzShFSydIzKnMzq1Nzy5JzSrByKTBweHDzOdCSaTGy+jJTOrFRSVDSuZCySVMzq3IzKpBxuRCR+TCSCVGy6hPz+/JSunDyCXCSOTCyWVCyeVPz6/PTy9IyqlCSCTGSuhPTu9Ozm7Nza3Dx+VBxyRDQyNMzGzNze3OTi5MTGxMTCxLy6vLSutGRiZLSytDQuNKyqrHRudDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe+gACCAAECg4eIAAMEBQYGB4mDCAkKCwwNjYUOAYcPEBESlA4TjAUFnIIPFBUWFxgZGpWXjYIbHB0VHhKtER+UCyC1ISIdxbkSGSMYJAiCByIlJicaxbgoEhDNAAYpBSorJScnLC0uHRLaCC8wMAUNMeAnMgkz2gY0NDUFKTYNBDE3cKzQlkPHDh42djRo0KNhjwUGBgXIscAHgQY6fPz4AQRioolBhGwUIiRIxEiEhoCYQKSIEZSHAhzIAcBPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_green_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFNze3Ozq7ERCRCwqLPz+/PTy9PT29FRSVHRydIR+fISCfOzu7OTm5OTi5MzGxAxOLByCRJSKfIRyVERGRKTmvNTu3KTWvOzi1OzizIx6XIyCdFTOfGzSjITClAxGJOTSvNTCnNTW1Dw+PAxKJCTCVCyWVGy2jAQ6XMyyjMzKzByuZCR+TCyGVNTm3HRmTLy6vJSypESCXGReVLSurDQ2NNTS1MzOzKSipGRiZMTGxMTCxJyanDQyNLSytKyqrCwuLDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfCgACCAAECg4eIAAMEBQYCB4mHAQgJCowLAQYMAYiTDQ4FCgoPEBESnBMUExMIoBUWFaEKBRIXExgZGqoTChscFR0epQYTHyAhGrkUIhMcIyQWJSYAJygpKSrIyissFi0GABMuLzAv19kaMRMyM+ABojQ15ObYEzYz0wAGBQUbBPHkYNQQcQMcABwEEhLIkUMHjRQvTuzIRwgHjx45evTwMWPGiR8GJQGxcWNGkBtCTlBMFGDIgh9CJhCJ1OkADgB+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_grey-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLHx2fKyqrNTS1PTy9CQiJNza3OTi5GxubJSSlISChLSytFxWXDQuNKSipBweHISGhFxaXIR+hLSutFROVHR2dFRSVGReZKymrLy6vFxeXNTW1Pz+/KSepERGRPz6/PTu9Ozm7DQyNMzGzMTCxMTGxGxqbNTO1Ly2vHRydKyurHRudDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAawQIAQEBAMj0jAgFAwHBDJoUGASCgWDEMxETg2HA8FFaJgFgpdYSMiUYAnlErCsmgKL5iMJqJwPzYcCB0eahAZH4gSESAhYAoGQggiBh4eFB8iehEWI5AABiQFFpMeHCIiiCWeJicMDAUOEZMcHBkSngYMKCkpJA4OBCWTk0IqKw8PvwsLLCwtLBCeRCouLC8vK80wGzEHSQEqHxMhMBMyLtLfKh4WCjM0UUgBCCoAfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_grey_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExOTBQWFNze3Ozq7ERGRCwqLPz+/PTy9Ozu7OTi5HRydIR+fISCfPT29Pz6/PTy7MTCxCwuLJSKfIx6XMzKzDQyNOzizJSOhIyCdOTm5Dw+PJSSlKSipLy+vOzi1OTSvNTCnIRyVNTW1GRiZFxaXAQ6XMyyjNTS1GRmZFxeXHRmTFRWVKSmpKyurMzOzGxqbMTGxLS2tJyenKyqrDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAauQIAQEBAMj0jAgFAwCA7JYwCRUCwWgoCBEUBOG47CAxJhSrqT5wERplQoC8ijYDEcJASJ4HKIYDAZFRoFGxwXHR4eH3lqICEiIyQcAAcMJSaIeHonKCMpkxMqAismKyuIixMsH5MBDw8eJS0mJpcdByYSkwAcEQUEBC4lo7UHL7sXwMAkKTAeogceu0QXMRIwFjISMxITNNNDARcmLx8zNTUH4F64NDUTNlHsk35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_home-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tKx6XGQqBNy6pIyKjDwGBOzOvJSWlDQyNIRaLNRiBGwmBNyidLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaoQIBwCAgIiEjAgAAoGA6I5DBBUBgWjIZDqnwYGgVIoTGQQgyRiGRCgZCR1nTFcsFkHm9hBp2paDYbHAsZHW9eERkYGh4eGx4ag3gfSgMTIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbKiQrLB4XEltDrhcaKi0utbcJra8bLzDAGrcxrTIXHi8zNCypEsO6EzU2IzQ3ONoTzK0BCAkDMQkIOTFlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_html-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBERGRBQWFMzKzOzq7CwqLDw6NARqnAQ+XHR2dKyqrOTm5ExKTERCRHRydMTi7NTu9HS+1KSmpBweHDy67DyixHS61ITG3AxypByu7DxinBw+ZERmdIySjITC3ARypExOTDRurIR2RPTSdJyulEyGvBw+bFSyzJTK3LzKvPzivOTixNTChLSybGyCfCRSnBQqRASGtFyuzDw+PCRShPzy5OzerOTShKyaTEx6pCxerGRufBR+rOTezPTShNy6bER+1BxCfBQuRAxelFSixBw2VISq3GySrPTWlHyanIyitFSO3IymtCRujAxWhCRqlCQ6XGyWvNS2bFyGvDxuvCRSpLy+vMS+vGxqbFyO1GSi3EyO1FRaVCQuPLS2tDxyzKyWNFxaNCQyPGxubCxajERSVExKNJyenAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfZgACCAAECg4eIAAMEBQICBomDBwgJCgsEDA0BDg8BhwYQERKUDxOYDAyeghQVFhehGBmVlwwOqxobHB0eH6EfIAkPIYIiIyQlJhsnKBcpvrYiKissLS4vMDEyFjOvNAA1LDY3ODk6Oyc8PTIyFzQ1Jj42P0A6QTtCQ0REIEUORkdIkihZwsSekBhNnDyBciCKiSNSplDRUcWKkRhXCGDJYgiGli1cpuTocsILjytfFmRpACAGRTBhRogZgzHlAjKGWnIoY+bMgRgBDHRBo/LAIZoxuhwKatRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_image-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPz+BAQCBExKTBQWFMzKzOTm5CwuLERCRARqnAQ+XHR2dKSmpHRydCQiJMTi7NTu9HS+1Dy67DyixITC3BR2pBweHByu7ASGtFSyzHS61AxypExOTBSazBRupJQOFBSCtDxKfKTa9AxelNz61MTaxDw+PPzGpLweHJTO3ESu3DRilFymXCxKRBRypBR+rDwCBNxmVORiRKQWFCyKvJTWhDSOPCRONFSixDQaHNROPNQ2JLRubHTC5DR6rHx6fFSqRCRyLGRmXGxqbIymtCRujAxWhMySjMQ2JMyqrKTW5ERijJSenFSGXGRmZLy+vMTGxMTCvERGRMxCNOzq7NTe5LSurISKhHR2fLy6vLS2tKyurGxubCwqLOSKfOzy9Nza3KSmrIyGjGxmZKyqrIRqZIyKjFxaXJyenDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAffgACCAAECg4eIAAMEBQICBomDBwgJCguMAoUMAYcNDg8QlAyXBaWcgg0REhCfExSVpIYAFRYXEhgZE60aCQwbghUcHRQXtri6DxMHgh4fICEiIyTFtxkOJQAeJicoKSojKywtLsUZJS8wMTIpMyA0NTYKIiIaNwc4OTo7PD0+P0BBhAwhUkTFAQNGjiBJomQJExsMmjh5AkVIFANQpEyhsqSKlStXmmDJomVLFC5Gunj5QiALmDAKxGSpMsYiAC5kqjhZUOaKmUdmzoAJgkaQgQYCmogJEmRQAC5pAPgJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_important-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBExGTKQqLPz+/KQqNAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM7CLoQwZAFIV6Es15Jqd2ZtzXUMIhXZqJYaZ5aK7zwp6h0zc05i+c6Eg8oCnWOR0eHQGEKnEWHdDoF+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_locked-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQSFMzKzOTm5CwuLERCRARqnAQ+XHR2dKSmpOzm5GxqbCQiJMTi7NTu9HS+1HRydOTm1Ozq7Dy67DyixHS61ITC3AxypERGRBweHByu7ASGtFyy1DSOtDRmfExOTBSazBR+rCwqLAxWhAxelByGtDSaxAwODHy+1Dw+PPT29IyqvCxujOzu7NTW1Nza3ExGJJyebKyqfMTCpFRSPOTi5DQqHOTezDw2NMTGxKyqhMTGrGxmXDQ2NMTCxMTGpHx6bHx2bBQWFIyOXDQuDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQICBomDBwgJCgsEDAKFDQGHDg8QEZQSlxMUDJ2CDhUWF6AYGZWXFBqCGxwdFh4XGK8fIAohtiIIIx25EZwBDREHgiQjJSYmGScoKSoRKQ8rggIsDC0uJS4oGygoAyjdAAcsLxQUMDEyMzQ1EzapBy8MDDc36tFwgONFjlQ6dgCEEZBHDx8+ctRIRehHAyAwZASZIGRIEBoUBwUwIGMCiwFEaBQJichIjo9FZLBsacRIAB0A/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_man-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFMzKzOzq5ERCRCwqLARqnAQ+XHR2dKSmpHRydCQiJMTi7NTu9HS+1KyqrMzOzOTi5Ozu5Dy67DyixHS61ITC3ARypOzq7ERGRFRWVJyanByu7ASGtFyy1Hy+1FRSVOzu7BSazBR+rFSyzJTK3Dw+PFxaXPTy7LSyrAxWhAxelLy6vMTGxNTS1Ly6tFyuzMS+vPz69NTW1MTCvIyOjPT29OTm5HRybFSixLy+tLS2tISGhGxubIymtCRujCRqlHx6fNza1GRiZMTCxGxqZLy+vFxeXLSytKyurGxqbISChFxeZDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAffgACCAAECg4eIAAMEBQYCB4mDBggJCguMBgEGDAGHDQ4PEJQKERITFBOdgg0VFhegGBmVlxobABwdHh8WIBchsLIKIiIjCyQZJR+7JhcnoBAoKSoqKywtLi8wMbsyrwYpGhowHTMqNCqkyR8XKBwTNTY3KjgFOTopLS0ZO98wPD0+JhR490MAkCAshHyTsCLCEAlEYEgoIsCIjRlHDNzy0UFBDBtIbBzZ4KJHBB0aAQhIoqCHESQ9dAjooWQJE1uCBBRpkoSDExEcUnRYwOTJIQECNmwQwEFQgANQAPgJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOzi1Ozq7ERCRCwqLPz+/PT29Ozu7OTm5FRSVHRydIR+fISCfMTCvAQ6XARqnJSKfIx6XPz6/MzKxJTa9Mzq9JzO5PTy7OzizJSOhIyCdOTi5Dy65FTC7HS2zMzm7OTSvNTCnIRyVNza3Dw+PASq5BSGrFyqzMyyjMzOzAR+zBRejBxqnBx+rHRmTPTy9IyqvDRylFxaXNze3DRujAQ2VLSyrDQ2NNTW1NTS1AQ6VJyenGxqbMTGxLy6vGRiZKyurKyqrKSmpDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfCgACCAAECg4eIAAMEBQYCB4mHAQgJCgsLDAEGDQGIkw4PBQkJBYwQnRESEREIoRMUE6IVChYGERcYGaoRGhsbHBQdHgu2HyAhGSK6qxsjJCUmJwARKCkpKsjKqislLNIRLS4vLykw2MkRMRAGhDIJMzTiLzDXETUQ0gAGCgU2HjM35N3AkYMdAB0EbCjcwcPCDBguevjIR0jHDwgWLACBECRIBB8GJekQMiRIjhxEIlBMFOBADR9FIhiJ5OnAEQB+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_orange-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHNTO1Ozq7ExGTDQuNERCRJxmDFw6DGxubKymrMzOzOzu7Hx2fCwqLOzaxPTm1NSyfKSipBweHOSmRMSKRNy2jJxuFFw+DKyqrOSeJKxqFMyaXNSyhNSufFRSVMSCJKRyHLRuFMSORNy6nPTezHxaFIxmFJxqDJxyHPz+/LyqjJR2NPz6/NTS1KyehIxqNJRmDLyWXPTu9PTy9Ozm7Nza3MzKzMzK1OTi5MTCxMTGxDQ2NMzGzLy+vLy2vKyurGRiZLSytLy6vFxaXHRudDw6PDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe/gACCAAECg4eIAAMEBQYGB4mDCAkKCwwNDgYBBg8BhxAREhOUDxSMBQWeghUWFxOhGBkaCxuMBqscHRceHyCwCbMhqyIZIx0kJR4gJicSIAiCECMoKSorKyS6yhHQAAYsBS0uKSkZHSsdHc+CCC8vqDAxMtQzJDTdBjU2NwUsODg5Wsxz0e2ADhw7/sEgwKOHwwW3BAXwsYAHARg/eAAJIgRiogAHhhApEoSIkCERI4E0QmHDESSREAWAkASAn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_orange_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOTm5ERCRCwqLPz+/PTy9PTy7OTi5FRSVHRydISCfIR+fPT29Ozu7MTCxFw+BJxqBFQ+BJSOhIRyVMTGxPzSlPzmxOTGnOzizIx6XIyCdOyeLPSuTNSubOTSvNTCnNza3Dw+POSGBLRyDMyeXAQ6XMyyjMzKzMyWBKx6FJx2FHRmTLy+xDw6PLyqjJR2LJRyDFxaXOzq7JRuLEw2BKyurDQyNNze3NTW1NTS1MzOzJyenDQ2NGxqbLy6vJyanGRiZLS2tKyqrCwuLKSmpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfEgACCAAECg4eIAAMEBAUCBomHAQcICQoECwEFDAGIkw0OBA8PEIwRnRITFBIHDRAVFhWipBcFEhgZGhMSEg8bGxUcHQQKth4fIBoburwbISIWIyQAEiUmJicnyrooKRYqBdQrEywt1yfJGxQuLzCEozEyM+XnEjQv4QAFEDUKCjE2JrRoYeMGjmkAchAYoWPEDh49YrBQ5SMfoR9AXvRQcSFCkBcUhFgcFCDHEBxBiOAoQgFhpABGaPg4IiFHJE8GbPoJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_red-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExKTBwWHMzKzOzm7ERCRExGTCwqLIw6FFQiDHx2fKyqrOzu7CQiJOzOxPTe1MySfKymrOzq7Nx2TLxmTNSelJQ+FMzOzNxiNKw+HMR6ZMyWhNSajHRydFRSVLxSLJRKJKRKJKQ+HNSWhNSmnHQ6FIRGHJRCHPz6/LSajIRONPTu9Nza3KyShLR6ZPz+/DQyNOTi5NTS1MTCxGxubGxqbMzGzLy6vLSytGRiZHRudDw6PAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAanQIAQEBAMj0jAgFAwHBDJoSGhWDAIDUHgsAgcHQ9IhLqQMAsTr9BBqUTClktVgmkYhIOMprLhdOBUHh9rICEiIyN8JCVwdwAOIiYnJyiHiRtvjgYpBSorJgknIpYRmikpLAUtLp+hIy+aLKkFMC0tGJ4mK44xBDKqLTMEBDTFNY5EMTY0MzM3NDg4OR7IQwExOjnROTk6B1FC1x8SEjs84EcBCDEAfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_red_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOTi5OTm5CwqLPz+/PTy9Ozu7Nze3Ozq7HRydISCfPT29PTy7MTGxFQiDIw6FJSKfIx6XPz6/MzKzERGRNyypPTWzOzi1OzizIyCdDw+PNRuTNyCZMSSfOzW1OTSvNTCnIRyVNTS1ERCRMxGFJxGJIRKJLyCbAQ6XMyyjLRWFHRmTLy+xLSelIxWPEQeBGReVIxOJIRSPKyurDQyNNTW1JxOLEwiDKSipGRiZMTCxLy6vJyenLS2tCwuLFxaXKSmpDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe+gACCAAECg4eIAAMEBQICBomHAQcICQoLAoUMAYiTDQ0LDg4PCgQQnBESEREHoBMUEwUVDgsWFxEYGRiqEQ8aG68cBQQdER4fIBghu6saIiMkJSYAEScoKSrJyxIrLNEd1C0p1ygo2coRLi/gAaIwMSnx5SoyM+uCHQ8LChrv8TQ1ZNiYBuCGgoMKcJSwACNHCh07wAkK0IFHj4UQevjwEeGHREk3ZtjwAcSGjQgfEwUIIuTHEJSROhkgAsBPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_sound-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFMzOzOTm5ERCRCwqLARqnAQ+XHR2dKyqrMzKzHRydCQiJMTi7NTu9HS61KSmpDy67DyexExSVITC3AxypBweHByu7FRiZDRiZHy+1ARypExaXBy2xGRqZFSyzJTK3AQ+RByqtASCtASGtFyuzDw+PATC1ByGlFxeXISGhJSWlFRWVAxmlBR2pBR+rAQ2PAS2xHS2vMTCxJyenLS2tCRujAxWhAxelFSixAQaHARibARudAR2hEySnPTy9Nza3GRiZNTS1IymtCRqlARWXDyCjPz6/MTGxLy+vMS+vGxqbAQiJARaZEx+hLy6vKyurERGRBQuNCw6PISanFxaXDw6PCQ2NDRGRDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfYgACCAAECg4eIAAMEBQYCB4mDBggJCgsMBQIBBg0Bhw4PEBGUDRKMBQWegg4TFBUVEBYXlZeNghgZGhsCFRyhFh0JDRWCAx4fGg0gCiERIqEcBoIjHyQeDcMlJhQnEQ8oANQpKissLS4vMDEmJhEoMjPxNDU2Ny44OTo6FzsGPD0+fgABEUTIECIMiuAzIk3GkR5IbgRJMoSAkiVKmDSRBsDJEyg1hBQYUqNGlBtSGkwZRGUDEyILWCxYcmPBgiYrB1WxEsBTgANXbCwYggVRFi2Ifm4B4CcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_tar-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFMzKzOTm5ERCRCwqLARqnAQ+XHR2dKSmpHRydCQiJMTi7NTu9Hy+1ARypDy67DyixHS61ITC3Ozq7BweHJySbJyWbAxypExOTPz21KyqjPz67OzmxFSyzJTK3LSujASGtDw+PKSehPz69Pz23OzitPTqvOzerKSaZBR2pBR+rKSefMy+dKyeTIR2NAxWhAxelFSixJyadOzirLyubLyqVJySPHRmJIymtCRujCRqlPTqzOzW5OzSzNzSrLyqXLSeTJSGNMTGxMS+vLy6vGxqbJSKZOzOxNzGtNzOhKSSRIR+LGReHLy+vKyurOTWlHxyJFxSFLS2tKyqrERGRHRuRNzKfNTGdGxeJGxiNFxaXJyenDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfcgACCAAECg4eIAAMEBQYCB4mDBggJCguMAgEGDAGHDQ4PEBEJDJcFp52CDRITFKAVo6UEFgaCFxgZGRgUFa8apBsAuhwdHh+5IBQhrwYZIh3PHdAdGSMTyQ4kJR4mJycdKCkqKywtIyMUJC4cKR7EKC8wMTIzMxE0BjUmJjY2NzgwcuggsIOHjB7NfPwAEkTIkBxEdBQxUuQIEgNJgihZwgRGEyJOnhyBciTKxSRSpDBh0iRGjClUjlSJYgXJFQBYbmTREmOLDi4BDnTxsgDJl0E5uXBBFBQMAD+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_txt-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAMR6RPwCBAQCBExKTPzGjBQWFMzOzOTm5ERCRCwqLPyGBPzKjARqnAQ+XHR2dKSmpMzKzHRydPyGDNTu9Hy+1OR2BNSOXHS+1MTi7ITC3AxypOzq7KRKBPyCDOySZPzizPTWxFSyzHS61ITG3FROTCQSBMxmJNRyROy2lOy2nASGtDyixJTK3FxGNIRWLMR+XPzStPTKrBRupBR+tFyuzDw+PDQuJIRSNAxWhAxmnBR2pBR+rPT29FxaVEw6LKRuVIx6ZISitCRujAxelAxmlFSixOzu7JyWjBwaFKSShNTW1MTGxDQ2NMTCxNze3Nza3HRqXMS+vGxubGRiZLSytCwuLERGRJyenGxqbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAfLgAABgwIDg4eIAQSCBQYHCAMJiYMKCwAMDQ4PEAcDAggRApQSlhMUmJqOBweiFQoKBBYXGBMZGpkPBhsIHBUdHh8gISIjtCOoJCUcJicoHykqK8MstBQIASUtLi8wMTIzKtE0Ihg1gwg2Ny8xKDg5OjvhItcBCDw9Pj9AQUI4Q0QMipirZ2TDERJIkihZwg+HEHpMmjg58OQIFANLomSUQi+AACZTohiAkDEKFSocJwmoMoWKSSoPpFiZdEhAgh5XHmBhQjORTZ5+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_video-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExOTBQWFMzKzOTm5ERCRCwqLARqnAQ+XHR2dKSmpHRydCQiJMTi7NTu9Hy+1Hx6dJyenLy6vIyOjDy67DyixHS61ITC3ARypOzq7ERGRFxaPKyqrBweHByu7ASGtFSyzITG3KSOPKyurBSazBR+rJTK3HS+1Hx6ZNzObAxWhAxelAxmlBRupBR+tFyuzDw+POzibNzOZIyqvCRujLyiPJyCPJSWlNTS1ISitFSixHxiFGxeJFxWLExKNCRqlDw2BFROHHxqPMSqVISChMzOzGxqZISCbLSaRKSWTFxWPNzGZNTCZLy+vLSytGxubJSSfGRiTMyyVLymTLyiRMSqTEQ+JGxqbNS+XNzKZOTWbLy2ZFxaXDw6PIyGbOzidOzifMy6XCwmFGxmXDw6LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfigACCAAECg4eIAAMEBQYCB4mDBggJCguMAgEGDAGHDQ4PEJQREowFBZ0TFA0VFhegGBkJEZcaGxwdHh8gFiEXGKAiowIjHCQlCCYgvL4noCgGKSoGCyssLS4vyxYwrzEyM9MSNDUrK9jKIBcGNiMjNwY4Gjk65dcIOwY8PT0+PwYUAuTIQaDeCiAGgggZMoQDEQNFchghMIHiEQNIkihZwoRJkx8RCDhxMuEJFAMGokiZQoRKFStXjpQk0QHLBgDRrEzJomULlwFHukhYgMWLIANfwIAJw+WKmDFkAjQoA8BPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folder_violet-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLHQWhEQOVHR2dKyqrNTS1PTy9Hx2fCQiJOTK7OzW9LyKzGxubLRW1JxOtLyCzMSS1HwijKSipLQ61HwinKxuvHQajFRSVJQytIQqlKRqvMSe1GQebHQihLSCxNzG5Pz+/KyStHQ6hPz6/PTu9Nza3KSGrJxmrOzm7MzOzDw6PDQyNOTi5MzGzMTCxGxqbLy6vLSytHRudGRiZLy2vDQuNFxaXDQ6NCH5BAEAAAAALAAAAAAQABAAAAaoQIAQEBAMj0jAgFAwHBDJoSGhWDAaDkPxEThCIpIJlcJgFgpdIaRiuYAxGcVD02gKBxuOpXPBvD1VH2ogISEceiIXI2ATBmohJAklGYaIJieOAAIoBSkqJCUlHJUmmQYrDiwFLS6foRwvpqkwMCstDTGtJCoyQjMELTQttw01Nsc3B0MBMxQ2DSfGNjg5OplHzDs5ODw5DMlRQgE9PhoMOjPh2BA/AH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_violet_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOTi5OTm5CwqLPz+/PTy7Ozu7HRydISCfPT29Ozq7Nze3MTGxEQOTGwahDwKRJSKfIx6XOzi1Pz6/MTKxNSi5OTS7Mym1OzizJSOhIyCdDw+PKxSzLRq1LSCxOTSvNTCnIRyVNTW1JwixHwqlKRutOTS5AQ6XMyyjNTS1JwerHQmfIQylHRmTLzCvKyWtHRChHwuhFxaXERCRHQ+fLSytDQ2NKSmpGxqbLy6vDwOTJyenDQyNKyqrCwuLDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQICBomHAQcICYwChQoBiJMLCwUMBw0NDg+bEBESEAcLDRMUExUMFggXAhAYGRoREBAIGxscFB0EBB4QHyAhGrq8EBsiIyQlHgAQJicnKMspuyorJCzVEi0uLy7Z2xopEDAx1QEMDDIzLjTZ2hI174I2CQ0EHMi4ge7EDQk4qgHI4aChAxYsLsg4J0GHQkI5dsSIeCFGDB49fFwcFOBHDRw8cOAAAmEkpyA1fOjoISQSJwPV/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_wordprocessing-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExOTBQSFMzKzOTm5ERCRDQuLARqnAQ+XHRydKSmpExKTCQiHMTi7NTu9HS+1HR2dCQiJDy67DyixHS61ITC3AxypKyqrBweHGxqbGRmZFxaXFRSVERGRPz+/ITG3JyalOze1PTm3Ozi1PTm1Hx2bJTK3IyOjPTy9CQqJFyuzDw+PNTGnDQyNPTq3Ozq7MS2hASGtKyaXCwqHBwaHFxWTKyahLSijKyehHRmXHRqNFSixHxyNAwKDERCPAQGBCwqLIymtCRujAxWhCRqlMS+vMTGxIyCVJSSfLy6vLS2tLSytGxubCwqJExGJEQ+JBQWFJyanDw6NDQ2NBQaFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfUgACCAAECg4eIAAMEBQIGB4mDBggJCguMDAEGCgGHDQ4PEJQRlwWmnYISExQVoBYXCREYjAaCGREaGxwdHh8PIJQKhgAhIiMkJSQkJhUnrrUGKCkf1B8pGyoUK60sLSouIS8vMCUhBw0xMjIVBjM0NTY3ODk5Og0NOwgXPCw9AD4BBvwwMABIgCBChhApUqtBhgw1INaIWMPIESMaGiIRsbFjkhpKlmDQYKgGx5MdDyxhgqFJLSdPoMiU+YRGFA5SRk4RRCWDix9TnFRxISiAE6J+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_yellow-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ExGTCwqLERCRJSSDFxWDGxubKyqrNTS1Hx2fCQiJOzqzPTy1NTKfHRydOTWTMSyTNTKjNzOjJyWFHR2dKymrOTaLKyaFLyyRMS6ZFRSVLy2JKSeHNTOnNTKhHR2FISGHIyKHKyeFOzmxPz+/LS2lIyCNJSWJMzKfPz6/PTy9Nze3KyqhLS2XPTu9Ozm7Nza3MzK1LSyjIyONDQyNOTi5NTO1MTGxMTCxMzGzLy6vLSutGRiZLy2vKyurKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe0gACCAAECg4eIAAMEBQYGB4mDCAkKCwwNjYUOAYcPEBESlBMMjAUFnIIPFBUWnxcYChkajAaCAxscHR4SrREWlBkfqSAYIRy5uyKfIwipISQlJhgnx7oSKM0ABikFKivQCSwn1C3ZCC4vLwUwMd/RGDLZBjPqNCk1NTY33zjZOQQ1dOBrsIMHjx49FtQSFCDHgh47GvhA+AOIwkQNgwARUnHIxUiEcnwgwmBBDpCHAjw46ScQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folder_yellow_open-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFNze3Ozq7ERCRCwqLPz+/PTy9PT29FRSVHRydIR+fISCfOzu7OTm5MTCxFRWBIyOFFRSBJSKfIRyVOzqnPTuzNzapOzi1OzizIx6XIyCdNzORNzSZMTCfOzqzOTSvNTCnNTW1NTGFKSaHLy6ZAQ6XMyyjMzKzDw+PLS+DHyGHIySJHRmTLy+xLS2lIyKPISGJGReVOTi5ISGNExKBKyqrDQyNNza3NTS1JyeJKSipGxqbMzOzLS2tJyanKyurLy6vKyutCwuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYCB4mHAQgJCowLAQYMAYiTDQ4FCgoPEBARnBITFBIIoBUWFaEKBREGFBcYGaoUChobFRwdBRAGEh4fIBkhuqsbIiMWJAYAFCUmJifJG7ooKRYqK9QsLS4T19kZGxIvMNMBojEyMy4u5xQ0EeEABgUFBDUxbJBzYeMGjmkAchBYqGPHjggxeMy40UMfoRw+IvxQoSICEBgUgiCUlIOGkCFAiOCgYDFRgCILgqxsGYnQgRwA/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +ftp-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3LSyrJyanPz+/Ozq7GxqbDxinBw+ZERmdIySjHRydMzOzPT29CwuNDRurIR2RPTSdJyulEyGvBw+bLzCxIyKhGxubERCRLzKvPzivPTmxNTChLSybGyCfCRSnBQqPLy6vLy2rCRShOTixPzy5OzerOTShLyaVEx6nCxerGRyhOTi3OzaxPTShNy6bEx6rER6zDRitBxCfPTq3LyulBw2VISq3GySrPTWlHyanIyitFSO3PTm1Ozi1LyqjDQyNCQ6XHSq3GyWvDxuvCRSpLSqpOzezAQCBCxGZCRKZExGLDQuHAwaLBQWHKymnOzexARCBJzOnGy2bDyePCxKJOzWvLymhAx6DAyGDDROLOTOpHRmVLyidLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfRgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkZMICQoLlwwNDgQPghAREhMUCBUWBRcMGBmnEBobHB0eHyAhIg4CIxenJCUmJygpKisVLAIGLSMPJBQuJi8wMTIzNCEWJjU2Dzc4OTo7PD0yK94DPj9AQUIUQ0QwFDFFRjchRz5IbARJEkLJkiVMmDRx8uQBlCgbgDyQMmUKlYpTqlSsYsXFFSwTK2bRMmWkyCxbuICkmKVlySwvpXTh4mWilJs4c3bB8uXLqUEBHggdSvSBn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +link-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBFxaXPz+/AQCBKSipAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMgCLrc/jDKSau9OL/AuwxCKAzfOIwlcZIRKLJQMMyz5CcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +network-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVmICAGZFmKQiACweCSBImq41AYB5IodLq2hwWO0ejRWDac48Gb/QKNqNRoqspmrVcAUuIJBANS8sBIFCORUgooPEh4J8B67NgdsVBp9C5XWfl9LRMTCyReX19hARNojWlWLH+AAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +pipe-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBISChMTCxPz+/ARCBFxaXASChCH5BAEAAAAALAAAAAAQABAAAAM2CLoazpAFIV6UYZB6Yd5BtwRbEYqkYIqAQRir6KpnN8cdCddXivcbAy+S2qEOAuPx8MtZRP4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +shredder-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBERCBAQCBMTCBPz+xFxaXPz+/AQChISCBISC/DQyNPz+BARCRAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARcEMgZhBUzgzuIH4G2FYThnZUlCab5Ed0hC6nZ3Yh8JIKyLjCYboeZKIK6BDHTGwyViopEoWAkdwfqoKhIKLFUwXY79coUtLG4CFAcOOstWyNWyEXMO57p2/vxfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +socket-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xMTCBFxaXKSipDQyNPz+/MTCxISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARKEMgZpr1SjFqx1QHoTaA4AuV2EmmHEUUxsKoHB7FMGPbhI7gCgnchII6+AyJBtBhjx0KC2TsIp9QXcpm1HafNEQF8mhAOCdfEHwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +trashcan_empty-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBKSipERCBARCRPz+/MTCxISChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARREEgZapiYWjGIvVNQjEZ5BKUAApVgjEWJzCtAnIGgC8eZ5bre7ICosQQFVY9Y/CGVwiYmlwwsac7qVRp6WqNGKpQZ9m7DojH2t+lVMtMP3B8BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +trashcan_full-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/Pz+xATCxMTCxMTCBKSipPyqXISCBFxaXISChAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARbEIAQJJU4BzEoIdSFbcNQnIVhBJ02GAeFIGxZjUl8KoHRagfeYqgo3kaxQOEwXPAyk4Mgtgg6jxYp1foETgPEKzSgBXOx0W9VIfZu2d3R5t3WhA5BEdQSQgP8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +www-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3LSyrJyanPz+/Ozq7GxqbDxinBw+ZERmdIySjHRydMzOzPT29CwuNDRurIR2RPTSdJyulEyGvBw+bLzCxIyKhGxubERCPLzKvPzivOTixNTChLSybGyCfCRSnBQqPLy6vOTi3Ly2rCRShPzy5OzerLyaVEx6nCxerGRyhOTezPTShNy6bEx6rER6zDRitBxCfPTu5PTq3LyqjBw2VISq3GySrPTWlHyanIyitFSO3LSqpPTm1DQyNCQ6XHSq3GyWvDxuvCRSpKyurOzizAQCBCxGZCRKZExGLDQuHAwaLBQWHKymnPTmxOzaxHx+fMTCvOzWvLymhHRmVExGPOTOpExOTERCRLyedBwaHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfWgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkZMICQoLlwwNDgQPghAREhMUCBUWBRcMGBmnEBobHB0eHyAhIg4jJBenJRwmJxIoKSoVKwIGwg8lFCwmLS4vMDEyIRYzNDUPNjc4OTo7PDAq3T0+Pj0/QBRBQi4UL0NENiFFPkbijoRAkiSJEiVLmDR54OQJFHEPREQRIWWihYlRMkCZQuXBgyIBihSpIjLAowBWroj7gaUIlpYvXWLJUuWKlgdbHvz44XHnzgdVami5qUinR50/efoJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +zip-16:filesystems filesystems16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBIQChPzC/AQCBMQCxAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMeCBCh/i+IAesShNo4+v5gKI5kaZ7oxzCilLVvq/kJACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cal1day-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANOCLrMEUDIOUS9AFLLhx8LIRZjKYZmMRCkaChFLHty/AIiS3y6q+QtT49wq8VotRtQJGwRf6Zmrlj7DJLQXsupTJmeEIN4TB5nII20wp8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cal5days-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANMCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiIdMmcec7jy53q81qP9OO5VMAj8RXTFWzOZW95HDLdEEM4LA4nIE0zgp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cal7days-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANPCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiwcp0fucsj873qvGMv5Jw2FIACUsW4WakGW1O046I05qmGYBhTC6TM5CGWuFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calappointment-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxPz+BISCBISChKSipAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARbEMhJaQhA6D1E/wDGeeRgDhOhFoTBEi+REgdrIHScSEVvAD9Xr7cDqGSGpFEnQSqTv2NxCFQOiU1VEAiTZmstHFg1vQKuw+LxxfYaV/AuOQRI2O/4ewhT6Uv8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calbell-16:korganizer korganizer16 16:photo:16 16:R0lGODlhDwAOAIIAAPwCBISCBPz+BIQCBMTCxISChPz+/AQCBCH5BAEAAAAALAAAAAAPAA4AAAM+CLrR+zCIAWsgLVRGRBhOVQiG94WPVAbHaZHYAWqRYLbge88RsbInGuBCEhRYrZYm4xk4nYdoKzKIbiKHawIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +callist-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/KSipPzerMRaBEQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARDEMhJaQhA6D1E/wDGeeRgDhOhruyatjBRSIRxxOsMEAdC0BUZDcfSEYvDo3Bn++2Cxt7RqFxWhZiCdsvdhjCVsMQfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calmonth-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANSCLrMEUDIOUS9AFLLhx8LIRZjKYbiRxLFIBpK0Q6z7MkwkJIe8b0KEeuWchFysuStVsjtfMbeMQitWpG25YfmNK1WU53XNIUYzug0OgNpuBX+BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +caltoday-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxKSipPyCBMRaBPyqXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARTEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyIQhFfiBIAfuFzaAioBIJBCummRYPCaDPh3vhwsOZdihNfa8Ub/AJXemFZPPNBvGwG672yFMZS7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +caltodo-16:korganizer korganizer16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBAT+BAQC/AQCjPz+/MTCxPzCxKSipPwCBMQCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARaEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyMYhFXiuFwZiA6qZYbbqJX5BIw2RAPxwAAWCyWMCCsiXFGEEErKz6LQZfOqiTR1YJiGq1rFyyHmo2+/1EKbCl/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +adjustcol-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBGRiZAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAI7hI8JAWL+IgvwUSSY2Lz7VTXXkS2NdJ6TwiSaB3PNQNdCbc/4cO9OjwPmhDQiTxfcHY1MpE35g0IB/gIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +adjustrow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBGRiZAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAI5hI8JEcItooxG1oEzBoJ7oWlHd4VbNZpbx3LqUFGuajTPhI8kSLfsO0rRUCXT5wPkyHhGhsOJs/gLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +black_sum-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+py60BY2QwhVYdytpw/WFXF1LjcW6S1LVu6xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_all-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIjhI+pq+FuHjwyRInqfRkDTXkgQ5YLOH6it00pyqqcPJk26RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_bottom-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInRIynGe0PFTQz2kdxzHf72iSiRDpc2F1niaafBroYQNe2fdx6HfgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_fall-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIyneRYP4wPUKWmr3E5b+DVh9GkYuFALiqnsJp6nObYZB5ow2a3Jvwv6CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +border_horizontal-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAImRIynGe0PFTQz2kdxzHf7CoTiSB7kKUpa1Vlc86rtSjvxnOSL4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_inside-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIygxxYPF4zzyenqxfVk2m0g9lnKiabqqoYl43YwGcqiFWv22zRnD/AXAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +border_left-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInBHKJmxYPY3TyVCozsjMbrk3gM27KyZDlioVQS3qwO7Nl6KC6q/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_outline-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrhI8ZybgQYoTy2YqtwVTunVVfN3HQsaTnc5Kp2Ibw5Zm0PHJ2w7O8I5P5CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +border_remove-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIjRIynGe0PFTQz2kdxzHf72iSiRDpc2F1niaafBrraSMuQXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_right-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAInRIynaOEPH5hRRVrzbJBLn32g1TXJuWBdpYYiy47hBl+yRqH6HfoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_top-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAImhI8ZyRgPo3xgVnmnprbvnUEhx1XmgpLRmH7e+rowFssleuaBXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_up-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAItRIynwOEPH0vRuGkjnFKjpmgX2FVkuBwNhapZKZ3VyMKcGJPv5eJmAkz5RP4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_vertical-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAAQCBPwCBCH5BAEAAAEALAAAAAAQABAAAAIrRIygxxYPF4zzyenqxfVk2m0g9llmsiCmVjJh65Jh59GtGMuzqqQNDQz4CwAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cell_edit-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIshI+pm+EPnwmi2msDoLgLzQWDV4HlSJof6qki+W0nrMKlbN9bxGvMDwwG/QUAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +cell_layout-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+/PzerMTCxPyqXHx+fAAAACH5BAEAAAAALAAAAAAQABAAAANCCLrc/i3ISacKIuutA8ACxWUeJg0DqBHhd6ZiRpQBag9F2n13FRis0q1QUAmCvFuKRTAYWhIi0bhz+SqQrHbL9ScAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +chart-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAQCxAQC/AT+/MTC/Pz+BAAAACH5BAEAAAAALAAAAAAQABAAAANMCLocHiyuIASU6lE7Xx7DdgEBQVwBKE4mqlZjeT4vl7VFkYZUjOuGkMFiuJ1yKUNAWTQGkEKDknUESpdXkkYjnWIWzOVX0SyPJwx/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +comment-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+BPz+/Hx+BAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CLrc/i3ISacKYuStuwhAMBATKRHkAGJeu60qagqmuHK4B6Pn3N0u147Ha8FyOVCowlRCntAo1J8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +deletecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+/PwCBMQCBISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANICLrc/i3ISacKIuutA8BcKAwfNwwmQYDZoJ6tWrBZoRKuXIb2XRS7UG4wC25yOIGHFvu9PJ8KcRbQOVzAheoxbRCyDOKj4E8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +delete_table-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+/PwCBMQCBISChAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANPCLHcDDCIOSUVAaqLeY5O+G2XRQVDdA0DNxCEwrwEu9AFORVw3ee6Cu8HFKFgA2AQQ6uNTJNXYZgCNZKFBay4IhQuMBUFW/LKZlkHoOBPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +dissociatecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAASC/AQCBPz+/PwCBCH5BAEAAAAALAAAAAAQABAAAAI0hI+pm+EPoQlC0GqxnfV2HUzR6HDWgA5Bqppr+qIhcMUqO5Oki+M87KN1ejCRTsJIKhP+AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +first_letter_upper-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIohI+py72RIJOHRmBt3QaGz2GVBGJfKW4aiXhX2sHxbKKneDv6zht+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fontsizedown-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAInhI+pELHqmIkQNZrwfXYvzE1fBUrWoZniOjWdp0agjLL2i7rhDvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +fontsizeup-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pEeoNIFyIzXStw3q/T4VVhJHHlDGjgZ6n1bLyCrqPyuJe4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +funct-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+py60R3IkRVHQzo9BwD1qhqGneRU4gSqlVJ8Zy0mKPhOe6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +insertcell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBPz+/Pz+BATCBAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAM7CLoa/k7IKQCEdNobc+UOMCijCD5jGjAMOowrIc/Wm77ATIe2leuETcrEYpSOJ88HpNxwmqdi40Tl+BMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +inserttable-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIuRI6JwCH/HBSBmUlxbarvO0nQJ0aa5XWodjZsiKbJGrbgaMuzW8M87jPoDgx/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +lower-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIqhI+pELHqmIkQNZrwfXYvzE0QKGniQWmNhbYSeqXn6zJOBJLTuuuh4i8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mergecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ATCBCH5BAEAAAAALAAAAAAQABAAAAIyhI+pm+EPoQlC0GqxnfV2HUzR6HDWgKZpCFyBCrMurMoPvZovPsgd39MBbaQI44hU+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +money-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+BPwCBASCBATCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM+CLrcHMHJIEaUD16sqIUcQAne5pQaBglkZS6lxb6dRoIAQTzuphcFXWeW0xl/utIPGDQOSUdnA7IUhoocfwIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +oscilloscope-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBOTm5Hx+fLy+vAQCfAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANKCLrcGjDK+IS9494AgrbEJ3CeUBRWpp2daaHhhZKuq75jh8pxTRaEQbAgFAIHv1VvR/vsdrnSCmdpagYnjfXS27Q+N29nQuYA/AkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +percent-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIkhI+py70RUHxxQmosu6BOdWkNR35PVm1etqEsaKXnwTn2DfgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +precminus-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAIthH8RiJvrmHogVoXNtFRDpjUf6JWkeUoXlpGBAMfC+cowbd+uwL54/rMFZf4CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +precplus-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAQABAAAAI2hG8Rp4y9IGgszqhyspLueYHih43hiX7Iui5XprGTQNeCPNNBje86L9vBdr2a7xY0AllHm78AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +removecell-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAAQCBASC/Pz+/PwCBCH5BAEAAAEALAAAAAAQABAAAAI5hG+hq+IvAGPwydlqxAohvnjHMChkR6YDcKaougZqCMdyGYqSG+jXKQtoNkGTUHPBDJMTH+jJ8RcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +removecomment-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/AQCBPz+BPz+/Hx+BPwCBMQCBISChCH5BAEAAAAALAAAAAAQABAAAANVCLrc/i3ISacKYuStuwhAMBATKRHkUIScUBSeahhigBbzK+HGgXmHmYHXC41MqKDwcGDFMryCz4gi3YQwkKiFY+ZAoYrUF5g1HV3G7DFuFBvSx8GfAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +resizecol-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBFxaXAQCBDQyNPz+/AAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMyCLrcG0A4CZ90saohuv+XEgxYxkDhQp2lyIBwKhB0bct2TuB6zfe7F5D26xV1x9zFnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +resizerow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBFxaXAQCBPz+/CH5BAEAAAAALAAAAAAQABAAAAIyhI+pmxHinph0GnqH3hoIDwocd3zZ2F0lmoInWq5s/I60xw5hmF8WPnNAhJUK44hM+AsAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +series-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBGRiZAAAACH5BAEAAAAALAAAAAAQABAAAAIjhI+py+0fUGRhGrswVtr1FgiGsGlhZVWAuarr9byyB8f24hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +sort_decrease-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BPwCBAQCBAQC/FxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CBDM+uKp8KiMsmaAs82dtnGeCHnNp4TjNQ4jq8CbDNOroIe3ROyEx2A4vOgkOBzgFxQ6Xa0owJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +sort_incr-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BAQC/AQCBPwCBFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM4CAqxLm61CGBs81FMrQxgpnhKJlaXFJHUGg0w7DrDUmvtPQo8qyuEHoHW6hEVv+DQFvuhWtCFPwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +special_paste-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+xPz+BNTS1MzGLMRaBMzOzPz+rPyqXPz+/MzGNDQyNKSipAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARoEMgJQhBySGx7IEQwFKMWGKgRHNZRIAJSVAm6usIwCEo+BDWVJ/CKzYAplWJZItGSgSVPZBEgU9EFQyGyWoK25XJ4DTO2iob6CxVLe2ys4rw9e8HKd8ybVJ7ndgEVQz09e1YUEmQefhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +strike_out-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBGRiZAAAACH5BAEAAAAALAAAAAAQABAAAAIghI+py+0BgwOS1gXnuS/b6ClCpCUcclJMmKIGWcby5BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_bottom-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +text_center-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +text_left-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +text_middle-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_multirow-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +text_right-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhhv1ylfFE5jiYwX6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_top-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +upper-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pEeoNIFyIzXStw3q/dR2hhEVcJqamuq6Z9brlNtKMeHuKXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +vertical_text-16:kspread kspread16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+pFrHqQHynTRrvyxQ12YWQWJGMpC0f2E1psr4eaj5+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +applix-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRSVFxaXFxeXNze3Ly2rJyanOTi3Pz+/Ozq7HRydFxaVISGhGxubMzOzDQuLExKTCwqLIyKjGxqbERCRCwuLJSSlOTi5BQSFPT29IyKhDQyNISChDw6PBweHMS6pPz69Pz29PTq3Ozm3MSynMTGxAwKDPTu5Ozi1LyulExOTCQiJPTm1OzezLyqlLSyrDw2NOTazOzizOzaxLyqjKSipBwaHOTStLymhLymfGRmXNzKtOTOpLyidMTCtMS+rCH5BAEAAAAALAAAAAAQABAAAAa9QIAQEBAMikfjcCkgOJ2FgCGwFAYOiCwioUAYFtUrgtFFNBzeB5OAgESyEsWEUjFYAJYJ4hLBoDMHBRobAAaGehwdHnoZCQcfEUKHCBQBAxsgISIjJIRCeSUmHAYmJSInKCmRkgYqGw4ZKxMiLC0unoUvFBQQMBQRMTIzNBVDFjUrGwO9Nh8zNzi4BhM2LyIvGhgLNzc5akM6DsEyMjsfPDw9uAALPj4/HyQ0ND31q0ICFRv6FTAb/xE2+AkCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +binary2-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRSVFxaXFxeXFRWVNze3Ly2tJyalHR2dISCfLSyrPTy9Pz+/Ozq7GxubJyanKSmpMTCxMzKzLy6vNTS1JSSlCwuLLy6tMzGxOTi3KSipKyurHx6fOTi5IyKjGxqbERGRDQyNMzOzOzu7GxmZIyKhHRydLS2tNTW1ERCROzm5MS6pIyOjDw+PPTu5PTq3LSqnOTazOzi1GRmZJSWlCQeHPTm1OzizLyqjISGhExOTGxqZDw6PNzSxOzaxGRiZExKTCQiHEQ+NLyulOzavOzWvLymhHRybLyypNTGtOTOpOzexLyidMTCtMS+rMSynLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfqgACCAAECAwQCiIiDjAIFj48GAgcBjIIICQoLDAwNDgwPA4MIBhAREgkTmw4UDBUWAxcYFAUZGggbHB0eDh8gIQkiHSMeFRoUDyQRIxkGJRYmFScTKCcHCCkgJyoNGSsWHCwKCCgIASAgLQoZLi8wISUbEyQUJAEDKQEKMS8yMBYeZmCgMcEcghog9tm4gSNEjgEPdEDYEQJEDR4aetzwgcPCjw8VfiAAwqNFECFDehApYiSEoCMQBVjQkQBJkpVKjFhgNGBGzSRLVhZRwsTloAFNmjhZ8WQIDiZQoOwcFMCCVQshrmYN4ScQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +binary-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz69HRydMzOzDQyNIyKhERCRPT29GxubPTy7Pzy7PTu5Ozm3LyulPTq3Ozi1OzezLyqjPz27OzaxLymhPz29OTStLyifPTm1OzavOTOpLyedMS+rMS6pMSynAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaJQIAQECgajcNkQMBkDgKEQFK4LFgLhgMiOq0WDgVEQrFdKAXfhJWRODTMQ6+64BAMGHAq+pB4hCF2eURoVwgREhMUgl5/EBUWimdWB4cVDxcYiwJiGQcVfBobmhwPEgkWFg8dmWcQEgcWFw99HpoVFR8XGiAhISKLI8EkJRgYGyK/SgvLzM0LfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +colorscm-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIcAAPz+BFxaXNze3Ly2rJyanPz+/Ozq7GxqbJxaLLxOFLQ+HLQ6NMSOnOzi5GxubMzOzDQyNMx6JOSSXOSedNx+ZMxaXLQ6ZKRalNzW3IyKjERCRNSWPPTKnNReNMRGVLxalJRGpHRanNTS3PTy9OTi3ISGfLySNOzCfPTatOy2dNxuFMw6DJxGrHROvEROnHyKrMSmTOzanNzShOSqRNyCFMxCHJxGnFxavDxqxCRmrCxijPTq3Ozm3LyulLyyZOTenNTGZMS6VISKbCyCzASGxAR6rBxmhKyqpOzi1JyuXLTShJzKdHS+XES2XCy6pDSy3Bym3AySxAR2pBxadKyinPTm1OzezLyqjGSWTHS6ZFy+ZCyyVCS2dDy61Dyq1CSOtBRqjExqZKyilOzaxLymhDyeTCSuVByyZCS6hDS2vDSatCx2lCxabIR+dBSKTByeZCSmhCymnCyanCR6hNTCrOTOpLyedCxmVCR+bCR2bCRmZExqbMy+pOTStKSelKyejMSynLyqlLymfLyifAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAjqAAEIBBCgoEGDAxMGEMCQ4YAABAIkFLiwgMUCBg4UiJgQQQIFCxg0sOjgwUYIAiNImEChgoULGApkcHBAA8oNHDhI6ODhA4gQIkaQGFACgokTKFKoWGGBRQsXLwQIHQABRgwZM2jUsHEDRw4dA3bw6AHBxw8ZQIIIGUKESBEjR3YgIZtEyRImTZw8gRJFyhQqVaxcgYAli5YtXJx08fIFTBgxVsaQQVnGzBk0TtKoWcOmzZExklECcPMGThw5czqLoYOijh3RAO7gyaNnTxsxfOr0cQ2boBg/f44AChRI0KDXCiEoX84cgp+AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +core-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/PzuBFxaVNza3Ly2tJyanPyuBPQCBPz+/Ozq7GxqbFRSVHx6dKSmpHRybMzOzDQyNGRiZHRydHx2fExKRCwqLPTy9ISGhERCRCwuLERGTIyOjBQSFGReXJSSlFRSTDQ2NAwKDNze3OTi3Ly2rFxaXAQCBFxeXMzKxOzm3LyqlDw6NCQiJFROTLy2pDw+PGRiXMS2pOzi1CwqJBwaHAwODAQGDJSOhOzWvLymhKSajNTGrJyWhOTOpLSyrKymlKSelMS+rLyidMTCtMS6tMS6pMSynLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfVgAAAAQAChoeHgoqCAgOOjgQCBQKCBoMABwMImwgJCggFC4sGDAQNDZoIDg+gEAcABhESEwoUFQsWFw4KGBmCGhsFGwoLEBwYCRYEFxCEHRceFwofIBwhDSIjJBCCCxISDiUaGRwmJygpKr4AGAIl4issISYtLuncgi8YLxAs5SYwYshQgQ8AixksaNSwYYLDDRc4chS0USMEQxMhHOjYEbEggBUWTQhwwANiD4mLBPj4AYTHjyA9cPQQsq7bkCFEihhRkSPHkSMeBUDIAGFo0aMZ/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +deb-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/FxaXNza3Nze3Ly2rJyanPz+/Ozu7GxqbPz6/JwCBMw+PMQCBLQCBNx6fPT29GxubMzOzIyKhDQyNLwqLLRWVLxaXNyurERCRMzKxOzq5Ozq7MQ2NMRmZLwCDOTi3Ly2tMReXOS2tMTCvPTu5Ozm3LyulMSSlNTOxPTq3Ozi1OSytPTm1OzezLyqjNyqpLxaVNzSxOzaxPTy9Ozm1OzexOzavLymhOzWvOTOpOTStLyidMyShMSulLyifLyedCH5BAEAAAAALAAAAAAQABAAAAa0QIAQECgajcNkQDAYCASEQCGQFC4NWMMBkZhWFQtGw/EwQCIGyWSoaFAqFgblIkEgMGthQ5HRbAQcFAcaBGp6DQEJCx0XFx4ZGx8geQ1ECyECByIMIyQlJnkMRBwnBwYODSgpKqB6RCIcK6gEKiwtLpQKiS8WMAQxKi0yuEOICTM0LSo0NTY2N3kAbhoHBzQ0zjg50EkKHC80LCo2ODo5O9FEBCE8Pe49Pj8/6QET9vf4E35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +document2-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJSWjPz+/Ozq7GxqbJyanPT29HRydMzOzDQyNIyKjERCROTi3Pz69PTy7Pzy7PTu5Ozm3LyqlJyWlJSSjJSOhOzi1LyulPz27PTq3PTm1OzezLyqjIyKhJSKfOzaxPz29OzizLyidIyGdIyCdOTOpLymhOzavOTStMTCtMS+rMS6pMSynMSulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaQQIAQECgajcNkQMBkDgKEQFK4LFgLhkMBIVUKroWEYlEgMLxbBKLQUBwc52HgAQ4LBo049atWQyIPA3pEdFcQEhMUFYNVagQWFxgZGoxfYRsTHB0eH5UJCJAYICEinUoPIxIcHCQkIiIllQYEGCEhJicoKYwPmiQeKisrKLFKLCwtLi8wHyUlMYwM0tPUDH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +document-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz69HRydMzOzDQyNIyKhERCRFQ6LJSKfNTOxJSOhPT29PTy7PTu5Ozm3LyulOzi1PTq3OzezLyqjOzavPz29Pzy7OzWvLymhOTOpOzaxOTStLyedMS+rMTCtMS6pMSynAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaLQIAQECgajcNkQMBkDgKEQFK4LFgLhgMiOq0WCAREQrFdKAVXKyNxaJgBjgck4khLBAPGm4r+ghETeHtEfVaAFBUWg15gjReKZ4YTFBgYGRpvcQoPDggRnwwMG5hnHB2UFxcbHh+LAh0YDA+zDyCtZ5UXIRsiIiAjiyQlJCYnGhofI8BKC83Ozwt+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +dvi-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/FxaXNze3Ly2pJyanKyijPz+/Ozq7GxubIx+RIRyLHRyVGxqbMzOzDQyNHxyTHRqNGxiJHRiLJySVIyKhERCRGQmLMy6ZNS+TMSuPLSePIRaNGReLHRuTPT29FxOFKymdIRmLHRiHGxKLDQuDPTy7Ly2tHQqLLwyPIxqVGw6LIx2LGRSHDwyDDwyFNTOxOzm3LyqlIQuNLy+zKSGdKSSfJRSRKSSNExKJLSmnOzi1LyulIyCZIxiPJyGLExGFOTSvOzezLyqjLyyXAQCBNzGRLyeREw+DFRONNzSvOzaxGxqVKSelJSCNEQ6DFRKFKSajMS2pNzOtOTStLyidEQ+FLSunOTOpIyKdMSulLymhLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfVgACCAAGFhoaDiQECjIwDAQQBiYIBBQUGmAcIBpGTCQqgC5gMDZwOgw8KEBESEwkGFAgMFacAFhcYGRobEBwdHgIDFKcWHwYgBiEhIiMkAyUCJg4nKCgp1SorLC0uBC8wMQ4yMzQnNTM2Nx84LTkNOjunNjY88z0+Hz8kOUBBQqdDiHQoYiREhBZHkORIouSfIAghjCiI8IHEEiYDgAApUAtAEwgfnDzBASWKFCBTqHQE8ONIFRwErFxRcuWKSkU8sBTIkSWLFi1btqwM4KCo0aMO/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +font_bitmap-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/FRWVFxaXNze3Ly2tJyanPz+/Ozq7GxubGxqbNTS1DQyNPS+vPw2NNQeHFw6PPTy9IyKjERCRPzi5PyGhHRWVOTi5PT29OTi3IyKhPza3LySlLQGBGQCBNza3Pz69PTy7MS6pKRubPy6vGQ2NKRSVIxmZPTq3LyqjLQqLHRydPxydHwCBNTSzPTu5Ozi1MSynKQCBOQ+PKwCBIReXJwCBExOTMzGtOzezOzWvEQeHLSytOR+fIxaTOzexLymhEwCBDweHNTOzPTm1LRORIQ6PJyOfOTOpOTe1OTSvLyedMTCtMS+rLyulLyifAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe6gACCAAEChYeGg4oCA42NBAEFAYqCAQMGmAYHCAaSlJaZmAkKnQuKAQwNDg8QBhEJCRKmgwITFA4VFgYXGAQZs5UaGxwdHgYfIAMhwAAiIyQlHCYgECcnKMwpKSoKKywtLicvMMwcHDEyMjM0L+3YgzUsNgH0HCw3ODnvgjU6OwMvBvCQ0cNHjh+zOgAJIqTaECJFOhg5gvAUEmsvksBAAeOIEmYBbixhEgJGExROlHw8taCly5cL/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +font_truetype-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRSTFxaXFxeXNze3Ly6vJyanPz+/Ozq7GxubHx6fCwuLDQyNIyKjKSmpPTy9PT29HRydMzOzCQmJAQCBKyqrFRSVLy+vGRiZNTS1GxqbERCRMzKzJyenOTm5JSWlLy2rIyKhMzK9KSm1Kyq3OTi3OTi5JyezBQSJExOTLy6/CwuXLy+5LyulMTC3LSytHx+7Ly2pLSyxLyqlNza3Gxq1OTWxMS6pLyqjPzy7OzexPTq3LyynOzWvLymhPTy7DQ2bOTOpGRmhERCfNzGpLyedMTCtMy+rAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfIgACCAAECA4WHhoOLAgSOjgUBBgGLggEEB5kHCAkHBgKCCgsKBgwNDg8HEBESngwAExQVBhYXGBmZDREaGwuDHB0CHh+4qgQgIa+CBMEiIyQiJNAlIMoAJgYDJygpKisWLAMtvoIe2S4pLzArMTIBM9YHBRUeNAQ1KwU2NzjWFAwDDEDIgS+GDh39Fl3ykGMHPh46evggJ2gAgR87HAKZYSOID2uECGQUMkRIAiJBioAUYMTIkRs8cODwUUSlQgY4GSzQuVOnn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +font_type1-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/FxaXNze3Ly2rJyanExKRPz+/Ozq7GRmZPz6/HRydMzOzDQyNJRmZPSmpIQuLGwWFKxeXPTy7IyKhNxSVGxCRLy6vPQ+PPT29GQ2LPTCxOROTPz69KQ2NPSGhPTq3Ozm5LyqlGwODPxiZOzi1LyulLwKDORydBQSDOx+fNw+PNS2tOzi3PTm1OzezLyqjNQaHPRubJx+fMS6rOzizOzaxMwuLKQWFHRaXOQuLJSShNzOvOzavOzWvLymfCwiHHx6dOzexOTOpOTStLyedMTCtMS+rMS6pMSulLymhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfFgACCAAGFhoaDiQECjIwDAQQBiYIFAgaXBgcIBgQFk4uYBgkKC5wMiQ0ODxAOERITCggFp4MUFRYCFxUCGAIDE7QAFBkWCRobChIcEr60HR0IHAYeHQQYEh8gIbQbIgjGIw8WEtgkJacmJyjfKSoFKywfLS4vpzAxEAgnHSYyJjMkaNSoB0CEChs3cMjIYULHDho8evig9aPiAQFAHAap0UPIREXYPpAIEnGIECLBABQoYmTGESRIfCQhglIRg5s4czLwEwgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +gf-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPz+BFxaXDQyNAQCBMTCxPz+/ISChKSipERCBMTC/Pz+xPzerMQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARwEEgQahVijMmD/oRAbBw1FCgaFFrppeo5UtILWxlAGNWZHocA4bAxGAnDg9GA8LQCxGTQoHwVNYYEMEHtKYrEA0tctVIOo0Fl2Ct8AQLlKMnzLFg1KIHBCGoUbiR5VSd3C28TThpubgqIEhkfkh9+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +html-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRaVNze3Ly2tJyanPz+/Ozq7GxqbDxinBw+ZERmdIySjMzOzPT29DQyNDRurIR2RPTSdJyulFSGxLzCxIyKjHRydERCRLzKvPzivPTmxNTChLSybGyCfCRSpBQqRLy6vPTy7OTi3IyKhCRShOTixPzy5OzerOTShLyaVEx6nCxerGRyhOzi1LSyrEyGvOzaxPTShNy6bEx6rDxyzDRitCRCfPTq3LyulBw2VISq3GySrPTWlHyanIyitEyO1ER6zBxCfLSqnCQ6XHSq3GyWvFyGvDxuvLSqpPTm1OzezLyqjCxajFyO1GSi3NS2bKyaTCQuPGRufOzexLSmlER2vKyWNFxaNHx6dLyunOzWvLymfERSVExKNDRCNKyilMy+pOTOpLyifFxaVLyidMSynMSulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfYgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkZMICQoLlwcMDQQOgg8QERITnhQFFRYHF6cPGBkaGxwdHh8gISIDI6ckJSYnKCkqKwksAiEtLg4kLzAhMTIzNDU2HxQ3NzgOOTo7PD0+P0A1QR8uNy1CDkMvREUyRjNHHjkfSElKlpxi0sTJjydQAiSIIkXIFBhUTn14UIWGFQhXHHzAkgWGli2nAHxIwIRLFy8bv4DREkZMSEEfYo4hQAVMGJZkXhIaIERImTJmlogRc0ZnAAdIkyp14CcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +image-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPz+BFxaXNze3Nza3Nza1LS2tJyanPz+/PTu5GRqZOTi3HRydMzOzDQyNJQOFDxKfKTW5OTy/OT23MTaxISKhGxmZERCRCwuLJQSFPzGpLweHJTO3ESu3DRilNz61FymXCxKRMTCxPTy7Ly2rIyKhDwCBORiRKQWFEy23CyKvJTWhDSOPCRONDQaHNROPNQ2JLRubHTC5DR6rHR+jFSqRCRyLGxqbOzm3LyulCwqLMySjMQ2JMyqrERijJSenFSGXGRmXMS6tPTq3Ozi1MS+vMxCNKyqrHR2dPTm1OzezOSKfNTe5KSmpIyGjLy2pOzWvLyqjIRqZIyKjHR2fExKTHx2bLyynOzexLymhERGRGRmZKSWhMS6pOTOpLyedMTCtMS6rMSulLymfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfcgACCAAGFhoaDiQECAwICBAUBBgGJggEEB5kHCAkHk5UBCpqZCwyeDYIOAA8QERITmRQLFRYXABgZGhscHR4fICEiAiMkDSUmJicoKQ8qKywLAwgKIxctLi8wMTIzNDUJNiEINzgNOTo7PBA9Pj/QQEFCQzg5F0RFEQQ+RhRHswVIkpS7oEMJgiUhCjBpcqSCkyFPoNjKEYVJCCNSpgSgUsXKlSdYUAG4kCOLlgpAgFTZwuVJFyy2Bi0gEsSJzZYuvYi09OULGC44wmAR48VLDkU5zClt0OACUz+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +info-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2rJyanDROXHSSpISetPz+/Nzm7GxqbGyGnMTS3MzW3JyuvERujLzG1HRydMzOzPT29DQyNMze5Iy2zLTS3Cx+pCRijLS+zIyKhGxubERCRFR6lGSivFyavISuxAxajBRejAxGdDxihJyyvCR6pBRqnAxelAxOfPTu5OTi3IyqvFSOtJy+1IyyzFxyhOzm3LyqlGySrAxejAQ6ZFxqfMzKxPTq3Ozi1LyulCxulAQuVISKjMzGvPTm1OzezLyqjBwmLBROdExOTKSinNTOvOzexBQeLAw2XAQmTCwyPLy2pOzaxOTWxLyedCQmJAQKFAQWJKSalOzavOzWvOTOpLymhKyqpMS+rOTStMSulLymfLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfVgACCAAGFhoaDiQECjIwDAQQBiYIFBgcImAkKCJGJCwwNDg8QmBESEwQUgg4VFhcYGBkaCBsRHB2qHgwfIAghIiMkAhMCAxsUJSYhJygiKc4qCysrLAPILS4oLwgwKcExEisyMxQFNBg1Nb7ONjc4OTo7yAU8IiIIDiIqPT4/QEFCVA0hooJBAg0eehQxciQIEnKCktiYqGQJEwJNnCB5AkWVoChSpkwpQmXAkypWrmDxKAhSlixaTlrZcqWjIi0/BmjhsgNLFy82BwWgQDQK0aNE/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +kmultiple-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXPz+/AQCBISChPz+xMTCxPzerKSipAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEIRJgb04iLEJwaAmjMTwgVbAjeaESmNcGMGrxmOhDqE8HAOVJ7MSFH4qhOmiOQIPNIGB4JJwnIaDaFaTUL4iYxc0MJidQVvROc4Yfz+a+g3V2sAVfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +log-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2rJyanPz+/OTm5GxqbMTCxARiTARSPARCNAQ6LAQyJGx+fGxubMzOzDQyNCxGPARyVARqTARaRLSyBCRGHFRuZIyKhERCRDRuXAx+ZPz+BIyOBFRybOTi3AyGbAx2XExaDBROLOzm3PTy7DRORDyeXBx2VEymVHyuJGRyDPTu5LyqlFyGTBxaNAxqVDR6PARKNPTq3Ozi1LyulCRuTCxeNBSCZDxmJEx6bOzWvPTm1OzezLyqjCSSdCSmhBySdBR+ZARqVEx+bNzSxOzizESCdAQCBNzOvOzexLymhOTStOTOpMS6pLyedMS+rAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfIgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkYIICQkKCgsLDA0ODxCbEQASExQJFRYXpBgZDwcaqxscrgkdHqMfBiADGasIIRwiHSMdJB0YJSYCA6snKCkqFgorHSwdIC0lLqsvvx0wMTIWMxgCNDU2xzcdOBw5EzoKOzw9Pj/WgAQRIiTEkAlEihg5wgMgACRBkpwQIpGDRCVLeDCJACGJx48gAzRxspHQoZNPRkJZNSjAkygDntiwwYQJlJWKIujcyTOCn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +make-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxWVFxaVOTi3Nza3LS2tJyalGRmZMTCxPTy9Pz69Pz+/Ozq7GxubJyWnFRWVHx6fHRydMzKzDQyNHx2bHx+dIyKjERCRGRiZKyilLSifMTCtLy+tISGhOS2bPzerPzuvOzetJSSjFxaXOzu7PTy7MS6pGxqbKSWdPS+dMSidOTerPzqtISCfKyurOzq5LSqnMzKxPS6ZEw6HJSKbOTStHR2dMzGvPTq3OzizLyulFRSTOyyVNymXOy+dKyqpPTm1OzezLyqjJyCTOSqTOSmRLSupNzSxOzaxOzexOzWvOTOpKyinMS6rNTGrLyedMSynAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfagACCAAEChoeGg4oCAwQEjQUCBgGKggcICQoKCwwNCg4CiwQPCBAFmRESCwYTghQCEgYHDBUSChYNDRetGAQZGhscHAIFDAoDHB2tAQYeHyAhIiMIJAolBCYTAicoKSorLBItGC4DLy8wExExKjIzNB81CBI2Nzg5Oq07KDw9Ph4mdgj4IQFIECGtHrgYQqRIjQoPjBzJkQMJQgANkrngYGFAhB8UkyjR0EpQAAkUKkQQkCGHEiVLLg6y8IDJhiZOXsJ8UtLkhpsmoAgRouIJT0UPJihdynSCn0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +man-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXFRWVNze3OTi3Ly2tJyanNza1Pz+/Ozq7GxubMzOzDQyNOzq5KSmpNTS1IyKjGxqbERCRPTy7PT29LSytOTi5MTCvMTCxLy6vMS6rISChLy+vPz69HR2dLSyrLy2rNTW1IyOjOzu7OTm5HRybHx2ZNTOxLyulLS2tIyKhHRuVMS+tHx6fGRmZLyqjISGhJyenMTCtGxqZGxmVMS2pFxeZGxiTMSynLymhHx6dGRiZFxeXFRSVLyifGxmTKSSfLyidMS+rLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAEChYeGg4oBAwMEjQUCBgGKggEHCJkICQoIBgKKkgSamQoLngyWDQ4PpAgQChESqQACExQVFgkXGA8ZBBobtAENDQsGHB0dEx4fBCC0AhYhGCIjFA0kJSYnKMMPHCkqFg0DIQorLN6WCx8OLQsHIQsuKxovtIQwMR4ZHDIYZtCogU+RjQAeUmDAkELBDRw58hHSsWMDjx4XV6DwIZGYCRc/aNz4AeRFkI4sZAipgePFCx9BhkgUwKCmzZsM/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +metafont-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2rJSWlPz+/Ozq7GxqbKSajPT29GxubNTS1DQyNIyKjERCROzi5Ly+vKyqrKSipKSmpKyurISChKyinHRybISGhGRiXJyanIyOjFxeXJyenJSSjMzGxMzOzMTGxLS2tISGjExOTLyulMTCxISWpGx6jExifFxufJyepJymrFRSVLSupLyqjERKROza1OTKzNS6vGRmZLy6vPz29Hx6dMTCvHRydJSKfOTStLymhNTCxLSOjKx6fMS6pLyifLSytHx+fOzWvOTOpLyedMSulLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFCJKKApcFCQoLBQQMnqAFDQoHDqeDAQ8QERITBhQVFhWnF4IVsxgKGRobHB0DrxUeHyAhIiMeGCQVFCWvACYCJygWKSoTFxcD1oMJGissJiwjFC0ZLi+nMBoLMTIPFDMzDS00FvEAYlyQUMNGiBs4OuQgoWMHj2sDe/j44aNCBh1AdgS5BoCGBhNChlxAQGRHESMcYXCI5sHCkRdIkKBUxKCmzZsM/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +midi-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Nza3Ly2tJyanPz69Pz+/ISChOzm3GxqbKSipAQCBHRydMzOzDQyNIyKhERCRPT29OTi3PTu5PTy7LyqjOzi1OzezOzWvLyidOzaxOTOpMS6pMSynLymhLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaOQIAQECgajcOjUTAYEAKFgDBgOFQNiMHhkFAYosQFg2HNbg0Nx/dB3W7NW0hDEWEjxm+BWzIhINhVbnBUFH12eAeDFRQUFoBuiVoGRRQXjgGQiQQLCwELBZaHZJGMARgLGZeZCARRUKgaom8DCAEZGwscqm5YrZyfHLFKRQQdHhYWHxogD0NED9DR0g9+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mime_empty-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz69HRydMzOzDQyNIyKhERCRPT29PTy7Pzy7PTu5Ozm3LyulPTq3Ozi1PTm1OzezLyqjOzexOzavPz29OzWvLymhOzizOTOpOTStLyedMS+rMTCtMSynLymfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIAQECgajcNkQMBkDgKEQFK4LFgLhgMiOq1eEQnFdqEUXK2MxKFBHnqvDsGA0aaaz4iHvE68WxEQERITfG+ADxQVhGV/DxEWFBcYhQIIgBEUFBkak2UbgYkZHBwdlIgUHh4aHB+lZZkVF6sgHyGFIiMiAyQYGCUhtkoLw8TFC35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +misc_doc-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRSVFxaXFxeXFRWVOTi3NzW1Nze3Ly2rJyanPz+/Ozq7GxqbMzOzDQyNHRydExKRERGRExKTERCRCQiJIyKjCwuLGxubDw+PDw6PDQ2NBweHAQCBPT29IyKhNz+3HzmfDTCNASaBBxaHCQmJPz69PTu5JTqlGTOZCSmJAR+BBxSHOzm3LyqlFTKVASCBARmBBxGHNTSzPTq3Ozi1MSynAyeDAROBCQ+JBQSFNTOxPTm1OzezLyqjCwuNAQyBCQ2JMzGtOzexAwODOzaxOzWvLymhMzCrOTOpNTKvMS+rLyifMTCtLyulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfcgACCAAECAwQCiIiDjAMFBgeRCAMJAYyCAQUKmwoLDAoJA5eZnJsMDaAOAA8BEBESExETFAsVDwwTFgAXAhgOGBkaGhscHQUIHqoDAR8gISIjJBQGJSbHugMSJygpKisU0x0mLC2qAhEuKS8wMRsbMiYzNDW6ARM26zc4ORQ6Mzs8evgAACGDChg3fgDhF6SAECE9VEXQYKGiDwtDKAQRQqSIEV25KGzIQZIDhSNFiiAxomoQAwM6kgRRgiQlkiW6BgVIwkQJghpNeixx4qQlJiAWHCh1kFSpBT+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +netscape_doc-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNTW1Nze3Ly2rJyanPz+/Ozq7GxubPz6/OTi1Ozq3GxiTMzOzCwuLMSijGROLLSqjGRiZOze1LSOdIyKjEw+NHxGJNSqjMTGxPTy7Ozm1NzWxLSSfFw+LMzKvHRuVKyeZHxybOTazOTi3Ly2tDQyNOzm3MS6jFxaRPTu5LyulOzi1KSehMTCxKSOdHxuRMzCpJSGXOTStLyqlHRqRIR2TFRKLLyedLyqdGxWLIR6XOzezJyCZJySbEQqHKyKdFRONJSKfOzaxNTCpKSWbJSSjExKNHxuNOzWvLymhIyKhOTOpHRydHx6bIR+dOTOrLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfVgACCAAGFhoaDiQECA40CBAEFAYmCAQMGmAYHCAmSlAEKCwyZCA2dDoIPEIsREgkTFBUICBaoABcYGRobHAodHhkDBBW2AB8fIBwMESEiIxokJSaDJxAUKAwQESkaKicrqBssLS4vBzAfMTIRMwo00zU2LTc4OToQOzU3DDwr04Ixeljw8QNIiCBCYgyJUIxIESMfjuxAwoDDkCRK/j244CNHjhBIPDxYMoPJA1sXIDRxkuOIkycXHsyAEqUYoRk7GDAh8uJFDhw4/lUy4aCo0aJE/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +news-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/AQCBERCBPz+/FxaXIQCBMQCBMTCxISChKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARXEEgZwrxYikFsvtUwBN0nEWIhkh4YiIOhjiX1hqIsHlb4jr8VwoJa/XCCBG4ZZA2bRxEi0QkgeLAloUZKYGEDhLgG6H5JBEFrYg4ItmsMCaGomFyEiz8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +pdf-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAASC/FxaXNze3Nza3LyypJSSlPz+/Pz69Pzq5Ozq7GxqbJyanNyGhNx6dGxubMzOzDQyNERCRPz6/My+vLxaVJxeXKSmpNTGxIyKjNTS1OTi5OzCxLRSVMTCxKyWjOTi3Ly2tIyKhLxmZLSWlOTe3MzKzOza3MyytNyOjAQCBKyqrOzm3LyulPSajMRWXOSGhOyGhKxiXOzi1OxyXKRORIxSTNTKzMy6vLyenLRubLwqLMxiZNSurJRybOzezLyqjJxCRGxSTLy6vGQiJMw+LJR+dMzCrOzaxIyOjKyurHxydNxWPNTCrOTStLymhIR2dKyKhIxuZIR+dJyShOTOpHRmZKSKhJyCdKyilMSulNTCpLyedMS+rMS6pLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfQgACCAAGFhoaDiQECAwKMBAEFAYmCAQMGBwgHCQoGC5OKAgYMDZcODwYFEIkREhMUFRYXGA4OEauCGRkaGxwZHR4ZHyAhuAAdCQgiFR8aHSMkHwS4JRomIicoJykqHh0rLKstLhQcFC8wMR0FHgQy4TM0HDU2Nzg5Ojs8PQQ+P6tAggjRVaLEjiFEihg58k+QBSQdQCTpoITIkhBMmjgxVsBCxydQokiZYoTKxkRVrFy5EgJLFi1NqGwxRohLBy5dsmT54cXLTEUQggodCsFPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +pk-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQChFxaXDQyNAQCBPzC/MTCxMQCxPz+/ISChKSipERCBMTC/Pz+xPzerMQCBCH5BAEAAAAALAAAAAAQABAAAAR6EIAQhLVjECJlKISwjcZgcFNxhATiugKyTaP4wu0JiOyNXBqAIWFpvRQKgUHBSTgNS4UzseBxBMxoMiG1NTcJBpLBLTaaTIVM3fXuFKeQMmk7AwbSU5QocsgkFnAPD0kbFBQdO1hELQ4fK4lWLQ0IASsoEhojIwEjfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +postscript-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxWVFRWVFxaXOTi3Nze3LS2tKSajPT29Pz+/Ozq7GxqbJyanISChPz6/HRydNTS1CwqLMTCxISGhOzu7ERCRDQyNERGRLy2rIyKhExOTAQCBKyqrOTm5KSmpHR2dNza3AQGBNzSxOzm3LyulBweHBQSFKSilOzaxAwKDOzezDw6PJSSlDw+PKSelNzOvLymhAwODNzGrOTStLyqjExKRHRqZLymfMTCvMS+tMS6rLyynMS6pOTOpLyifMTCtMS+rMS2pMSynLyidLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfPgACCAAECA4aIA4OLAgSOBQQGAgcBi4KNCAmaCgsJDAKWjQkNCA4JDxCeEYwSDQ4TFKMPCxUWAA0BEQ0GDggQDxcIBBgZthobExwICB0eFRsSHcOrER8QCwYIIA8bIRwiIyS2JSYVHgsQzhsbJygEJKsl6ykeH9zrJyIq4gAp6xsrWLT45+IFChi2YqwLwcLEvxgHZMygsarBOgsCBGioUcNGxBk3bA0SgCOHjh0oeczo4WPVoAA/fgAJIoQGjSFEiIgUNCCCBZ8Wggq14CcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +readme-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2rJyanDROXHSSpISetPz+/Nzm7GxqbGyGnMTS3MzW3JyuvERujLzG1HRydMzOzPT29DQyNMze5Iy2zLTS3Cx+pCRijLS+zIyKhGxubERCRFR6lGSivFyavISuxAxajBRejAxGdDxihJyyvCR6pBRqnAxelAxOfPTu5OTi3IyqvFSOtJy+1IyyzFxyhOzm3LyqlGySrAxejAQ6ZFxqfMzKxPTq3Ozi1LyulCxulAQuVISKjMzGvPTm1OzezLyqjBwmLBROdExOTKSinNTOvOzexBQeLAw2XAQmTCwyPLy2pOzaxOTWxLyedCQmJAQKFAQWJKSalOzavOzWvOTOpLymhKyqpMS+rOTStMSulLymfLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfVgACCAAGFhoaDiQECjIwDAQQBiYIFBgcImAkKCJGJCwwNDg8QmBESEwQUgg4VFhcYGBkaCBsRHB2qHgwfIAghIiMkAhMCAxsUJSYhJygiKc4qCysrLAPILS4oLwgwKcExEisyMxQFNBg1Nb7ONjc4OTo7yAU8IiIIDiIqPT4/QEFCVA0hooJBAg0eehQxciQIEnKCktiYqGQJEwJNnCB5AkWVoChSpkwpQmXAkypWrmDxKAhSlixaTlrZcqWjIi0/BmjhsgNLFy82BwWgQDQK0aNE/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +recycled-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2rJyanGRmZKyqrMTGxPz+/Ozq7KSinOTi3LzatLTGpJSSlMzKzGxubMzWzPT29DQyNMS+rOTy5KzWlEymLDSSDKTClIyKjGxqbERCRGx+bNzu1Hy+ZESeHDSWDCyKDCyGFMTKxHx6fOTi5ISCfFRuVKzGnJzKjDSOFJy2lNTSzJSSjPTy7Ozm3FR6RJzChGSqRFSePHyqdMzOzLSytNTOvLyulExyREyWPESSJMS+vKyurMzKxPTq3Ozi1BxeDDSCHNTS1Ly+vHx+dIyOfPTm1OzezLyqjBw6FBxmDFSKRMzGxERONOzavBQ6DBROBHSOdCxeLDRCJKSelOzexOzWvLymfCw6LBxGHFRiTOTOpERGRKyqpMy+rLyedMTCtLy2pMSynMSulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfWgACCAAGFhoaDiQECjIwDAQQBiYIFBgcImAkFCJGJCgsMDQ4PmBAREgQTghQVFhcYGZYIGhAbHKodHh8gISIjJCUCEiYDJxMoKSogGCsjLC0GLgkvMAMTMTIzIjQ1LDYHNxo4CTA5Ezo7PDstEQ8HPT4nP0BB5jpCQxFE7kU3RkcHkCRRomoJkyYHnBQZ0OEJARxJoBAUFEWKjilUolSxMiDJFSxZVAnSEmVLFC4EBnzE0iVkIi8EvnwBs5JlGJGCAogRQ2EMmTJZsoS5qWiC0aNIJ/gJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +resource-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRSVFxaXFxeXFRWVOTi3NzW1Nze3Ly2rJyanPz+/Ozq7GxqbMzOzDQyNHRydExKRERGRExKTERCRCQiJIyKjCwuLGxubDw+PDw6PDQ2NBweHAQCBPT29IyKhNz+3HzmfDTCNASaBBxaHCQmJPz69PTu5JTqlGTOZCSmJAR+BBxSHOzm3LyqlFTKVASCBARmBBxGHNTSzPTq3Ozi1MSynAyeDAROBCQ+JBQSFNTOxPTm1OzezLyqjCwuNAQyBCQ2JMzGtOzexAwODOzaxOzWvLymhMzCrOTOpNTKvMS+rLyifMTCtLyulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfcgACCAAECAwQCiIiDjAMFBgeRCAMJAYyCAQUKmwoLDAoJA5eZnJsMDaAOAA8BEBESExETFAsVDwwTFgAXAhgOGBkaGhscHQUIHqoDAR8gISIjJBQGJSbHugMSJygpKisU0x0mLC2qAhEuKS8wMRsbMiYzNDW6ARM26zc4ORQ6Mzs8evgAACGDChg3fgDhF6SAECE9VEXQYKGiDwtDKAQRQqSIEV25KGzIQZIDhSNFiiAxomoQAwM6kgRRgiQlkiW6BgVIwkQJghpNeixx4qQlJiAWHCh1kFSpBT+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +rpm-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/FRaVNze3Ly2tJyanFRSVOTi3PT29Pz+/Ozq7GxqbFxaXHRydNzazDQyNIyKjERCRGRmZExOTLyipOSytLy6vIyCfBweHMzOzNS+vMRqZMRSTNzGxAQCBLxCPMzGvLyulCQmJPz69IxKRIwWFLSGfLyynAwODERGRMTGxGRiXLyqjHR6dIyOjBQWFLSqnNTCpNTKtLyidPTm1OzezOzavOzWvOTOpMTCtMy+rMSynLymfLyedAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAazQIAQECgajcNkQMBkDgKEQFJYMBwQ2ITiEJ0uDFjsgdHgOpIFQRj7UCggZyEksIgoJBPKwVCxnBUXEgwYBgkGGRobHAYDDgUdFx1fawceHh8gDiEdnEthIgcjJCUmDh0nKJwdCCmcKh0WJiumQh0sFR0tFyYuLycwK5u1nBYsFwMuJicTs0MdEhUpDRkxMRkwMDJxQl8zBjM0NTY3N9poKTg5JjorKzsyPNtEDvT19CH0fkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +shellscript2-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3LyypJyanPz+/Ozq7GxqbPT29HRydMzOzPz69DQyNHRaJKyONJR2LJyCJKyCHKSCHMSqZNTOvIyKjGxubERCRGxSFIxyRKR+HMyeHOTCLMSOHLyWFMzGtIyKhHx2bKSGZNyiFHxeDOTi3Ly2rMyudOTCpOTKxLyqjJR2VJxuDLSGHLSunPTu5Ozm3LyulJx6NNSyXOTCjOzWvPzi3MyqhGxSLFQ2DLSKLNSqTPTWtPzq7NS2nIxyVIx6ZOzezFxCFOy2POSyROTGlPTazPTWxLSiZLSSVMy+rOzaxKyCJMyeNOSyTNy+dLymXLyePNyqPKSWfOTStLymfKR6HMyaPMyaNJR6TMy6pFxKLHxWFKR2FIxiDOTOpLyedMTCtIyCbMSulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfQgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkZOVlwgJCgsEDIINDg8QERITFAUVFgcXpYIYGRobHB0eHwgCAyC0giEiIg8bIyQCCCUmtCInKCkpKissLS4vMDGlMjM0NQsINjc4OQ0U26U6OzQ8CAg9Pj8uQBRBKgxCQ0QzRUY2jiDRkURJkCX5ADBp4uQJjRNQokhpMSUIlSqlcFjpQOQKESlYWmTRQuUirS1cumy04qWBlhpUvoARRihMGDFaBoxRUQXMTEUMggodysBPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +shellscript-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRWVFxaXNza3OTi3Nze3Ly2tJyanPz+/Ozq7GxubNzSxMzOzMTGxHRybDQyNLy+vHRydHx6fKSipISChIyKjGxqbERCRCwuLLy6vGRiZExKTCQiJAwKDLSytLy2rJSSlHx+fDw6PKyqrBQWFPTu5Ozm3LyulLS2tCQmJAQCBPTq3Ozi1MSynCwqLAQGBOTazOzizOzezLyqjBweHNzSvOzaxKyurHRuZNzOtLymhDw+PIyCdOzWvOTOpLyidNzKtOTStLyifMTCtMS+rLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfZgACCAAEChYeGg4oCAwQFjgYBBwGKggEECJkICQoIkwADCwwNDY2mDA4Lng8QDhESsLARExQVDhYXGBkWExIaGw8cHR4SCQQfFQ8eFgUgIQEiwiMSBMYfGB4atwEXDyQd0wQlJicPKAHoFyIpJCoeDgMrLC0YKBsX6i4kL+4OMDEyZijr5oLGNxUqUCioEcPGDAwjPNyI6MEDChQjcOSwsUDHgw07RIgI4KCkAgs8cvTw8eOBogAxQtXIASTISiEuBwUYMoRIixYnZggpUgTDywdIkWJIitRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +sound-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXFRWVExSVNze3Ozi1Ly2rJSWlPz+/Gx6dNTS1Ozq7GxubGxqbDRmbDQyNFRiXBy6xFRmZLy6vIyKjERCRAQ+RBy2xByqtHRydIyOjPT29PTy9OTi3ISGhAQ2PATC1ByGlPz6/MS2pAS2xHS2vMTCxJyenLS2tPTq3Ozm3LSmnAQaHARibARudAR2hEySnOTm5MzGvLyulARKTARWXDyCjOzaxAQiJEx+hNza3MzCtOzexOzavLymhBQuNCxqdLy+vKSelOzWvLymfDxOVISipAQCBNzOtOTOpFRybKSejMS6pOTStLyedMS+rAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfLgACCAAEChYeGg4oDBAUEjwYBBwGKggEICQkKCAsMCJOVAw0OA4wIDZsHD4oQERINDRMIFA0MFauCFhcYARkJGhscHRMeuB8RICEQHgcaBCIcBSOrHyTWJSYnKB4KHCkqK6ssLS4vMA0LMRoyKe0zuDQ1LTYoHBwU7Ck374M4NTkmdHDIsKMAjx4+cAn6ASSIAhRCdvDgMYSIQkJFjBzJsALJjSFJLCoSUKCIkiVMegxpksTJxQATnjwZMWMGER9OXI58wLOnzwd+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +source_c-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNHRydERCROTi3IyKhIyOjPzy7PTu5Ozm3LyqjPz29PTq3Ozi1LyqlPTm1OzizOzWvLymhGxudGRmdFxedFRWdERKdDQ+dHR2dFxidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGhYMJHCq4FuYJBQUEQN5RGlWYBQVFheEVWEYFRkaG40RXw2JGX6MaIiRHGCccQKAkRodHh4fjQ+tICEiIyQkJY0mJg8FJwWzJbVKD7gnI7K+v3EOycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source_cpp-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNHR2bERCROTi3IyKhIyOjPTy7Pz29PTq3Ozm3LyqlPTu5Ozi1LyulPzy7LyqjPTm1OzizOzWvLymhHRydHR2ZHR2XHRyTHRyRHRyPHR2dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGhYMJHCq4FuYJBQUEQN5RGlWYBUWFxiEVWEVGRYaG40RXw0ckV8djYaZFh5gnGgKnx4fICAhjSIPrSMkJCUmJ6woBQ8FJAUlJ7VKDygPD7G9vo0OycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source_f-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNGR2ZERCROTi3IyKhIyOjPTy7PTm1LyqlPzy7PTq3LyulLyqjPTu5OzexOzWvLymhHRydHR2bFx2XFx2VFR2TEx2RHR2dFR2VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGo4MJHCq4FuYJBQUdnlEaVZgCgYVFoNVYRcYGBEZjBFfDRePEgkajIUXGxgVYJxoCp+hHBwdHowfIK4PDyEiIyStJSUFDwUmJiS2Sq8PILG+v4wOycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMS+rPT29GxubMzOzPz69DQyNMTCtHRydERCROTi3IyKhIyOjPzy7PTu5Ozm3LyqjPz29PTq3Ozi1MSynPz27PTm1OzizOzaxOzWvLymhLyifOzexLyedLymfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaJQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJSCx7WAgBwi52FAsi4oBINJnCpAqCkPChUSA3tEEmoFahUWFxiGSwphGRYaGxyQEn4NHZVfj2iLlR5qoHICGYyWHyAhIpB9Dxp+IYAjsGokaiFqJZAJDwkDHBwYJiW+Sg7LzM0OfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +source_h-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxubPT29IyKjMTCtMzOzDQyNHRydERCROTi3IyChIyOjPzy7Pz27PTu5Ozm3LyulPz29PTq3Ozi1Pz69LymhOzizLyqjPTm1OzWvIyGhIR6dIRubIRmZHxaVHxSTHxCPIRydIReXHxWVHxKRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaIQIAQECgajcNkQMBkDgKEQFK4LFgLhgMiOl0mFFbEYVEgMJQC8DXRODjOw8DjGhYMIHCq4FuIKBASDwN5RGlWYBMUFRaEVWEXFBgZjEoPXxoSkX4bjYaZGBxgHZ2AkR4cHx+cSiAJCRAhIiMkJSaNCREgBScFKCkqtkq4sLK0JsFxDMrLzAx+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +source_java-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRWVFxaXNza3OTi3Nze3Ly2tJyanPz+/Ozq7GxubFRWXHRydMzOzDQyLIyKjGxqbERCRCwuLHx6dKSinKymnLyyrNza1PTy9Ly2rIyKhDQyNGReXKyejKSWhIx+bJSCdIRuZCQiJISCfGxaPJSKdHxuVHReRHxiVHxeVGRGPKSajMS+tMSynAQCBFxeXGROLFxCLFxCNFw6LGxiXFxiZMTCtOzi1ERGRLSytJSWlERKTNzSxOzaxKymlOTi5JSSjISChBwaFNzGrLyqjKSmpDw+PMS+rOTStLyqlLyifGRmZKyqpLyidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfWgACCAAEChYeGg4oCAwQFjgYBBwGKggEECJkICQoIk5ULmJoIDA2eDoqXowgPDBAREoIRExQVFhYEBA0XGBkaGwAcHR4dHx4gIRMGDBcEFg4iIyQlJicoISkqISssBC0OLi8lMDAxMiozNDUUNjctEjg5OjklDCEcOy4OFDw9Pg4QfuQAEgTCDglCHAQYMaQHEVRFBhRhIACHAyMLIHg4guShIAg6KDwYMYHBhBVJhiBRgmrQkhxMKlBo0ULlkCYtLbGwYYNmCyJNguYk5KBoUQlGi/oJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +source_l-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNHRydERCROTi3IyKhIyOjPzy7PTu5Ozm3LyqjPz29PTq3Ozi1LyqlPTm1OzizOzWvLymhGxudGRmdFxedFRWdERKdDQ+dHR2dFxidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGhYMJHCq4FuYJBQUEQN5RGlWYBQVFheEVWEYFRkaG40RXw2JGX6MaIiRHGCccQKAkRodHh4fjQ+tICEiIyQkJY0mJg8FJwWzJbVKD7gnI7K+v3EOycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source_moc-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIQAAPz+BKSipISChERCBPz+/AQCBMTC/MTCxISC/FxaXDQyNASChARCRPzCxAQC/PzerMRaBPyCBPyqXISCBPwC/MQCxIQChATCxMT+xATCBASCBIQCBARCBPwCBMQCBMTCBCH5BAEAAAAALAAAAAAQABAAAAWOICACQRkI6DCuJOG+JysGL1wIMm0YNHEUBNwqsDMgEL5AIqEYIhZPxqtwUI0CzwRDSih4E6KGeLl1vB4FMAASkTC1icmjmxZBKBXL4YLJaAoPgWoQEBsbGX4JHHR1Ih0eChkTGoqADQ9qMwR+GhwcXlSZAAJzDQNogZeiAUBeaAcNHw2iAygocQkCuQN+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +source_o-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNGR2ZERCROTi3IyKhIyOjPTy7PTm1LyqlPzy7PTq3LyulLyqjPTu5OzexOzWvLymhHRydHR2bFx2XFx2VFR2TEx2RHR2dFR2VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGo4MJHCq4FuYJBQUdnlEaVZgCgYVFoNVYRcYGBEZjBFfDRePEgkajIUXGxgVYJxoCp+hHBwdHowfIK4PDyEiIyStJSUFDwUmJiS2Sq8PILG+v4wOycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source_p-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxDQyNPz+/FxaXKSipPz+xPzerISChATCBARCBASCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARVEEgQqrUz3yqGCJlUESRZEFVooWZAfJpbEkU9gNMqo4KBi7vSAfWjyFxIUnEkJAwPy9EugEDFSE+nMzojVKvLREGsKCgWjMVybDaj0eH2OZ2Objb+CAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +source_pl-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMS+rPT29GxubMzOzPz69DQyNMTCtHRydERCROTi3IyKhIyOjPzy7PTu5Ozm3LyqjPz29PTq3Ozi1MSynPz27PTm1OzizOzaxOzWvLymhLyifOzexLyedLymfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaJQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJSCx7WAgBwi52FAsi4oBINJnCpAqCkPChUSA3tEEmoFahUWFxiGSwphGRYaGxyQEn4NHZVfj2iLlR5qoHICGYyWHyAhIpB9Dxp+IYAjsGokaiFqJZAJDwkDHBwYJiW+Sg7LzM0OfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +source_py-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNza1Nze3Ly2rJyanPz+/Ozq7GxqbPz6/NTSzDQyNKSujIyKhHRydERCRGR2PHyaLLzObIyqNKzCZIymRKy6jPTy7OTi3ISChFx+HISaNKyuPJyaBKTCRKS+VISiVGyKJHSGPLzWdKS+TMzefISCJHRiBGySJJSyNLTGbKzKRHSaHJSWhLyulHSKNJy6RKzCXISWRLTOZJSuVIyuJGyOHHyWLOzaxJSqTGyGJJSmXHySPJS+JHSOHIy2JHR2XLyqlERaHGSGHFRqJHSOJGR+JFxmPNTOxIySbHyORHSWJPTm1ISiHHyiJFRuHMSqjPTu5OzexFx6LMTCtMS+rJyidISqJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfKgACCAAGFhoaDiQECAwMCAgQBBQGJggEDBpkGBwgJk5WXmgYJCAqeC4kFAwysCQYNDggPqIMQERITFBUWFxgEGagaGhsVHB0eH8ggvQQLISIjJCUmJygpKissLRcuCy8wMSMqMhszMzQ1Njc43QA5Njo0Ozw9Pig/LCxAQbRCOkM2iBQxgsLGjyJH+CXKoEABkiRKWCxhQYQBLUsYLhxgwkRJEydPoFwkhCEKRylKbNSYIlIRASpVCFj5UeMKhJaDAizYybPnAj+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +source_s-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbIyKjMTCtPT29GxubMzOzPz69DQyNHRydERCROTi3IyKhIyOjPzy7PTu5Ozm3LyqjPz29PTq3Ozi1LyqlPTm1OzizOzWvLymhGxudGRmdFxedFRWdERKdDQ+dHR2dFxidAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaHQIAQECgajcNkQMBkDgKEQFK4LFgLhkMhOl0iElbFgtEgOJQC8BXxOEDOw0DkGhYMJHCq4FuYJBQUEQN5RGlWYBQVFheEVWEYFRkaG40RXw2JGX6MaIiRHGCccQKAkRodHh4fjQ+tICEiIyQkJY0mJg8FJwWzJbVKD7gnI7K+v3EOycrLDn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +source_y-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxubPT29IyKjMTCtMzOzDQyNHRydERCROTi3IyChIyOjPzy7Pz27PTu5Ozm3LyulPz29PTq3Ozi1Pz69LymhOzizLyqjPTm1OzWvIyGhIR6dIRubIRmZHxaVHxSTHxCPIRydIReXHxWVHxKRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaIQIAQECgajcNkQMBkDgKEQFK4LFgLhgMiOl0mFFbEYVEgMJQC8DXRODjOw8DjGhYMIHCq4FuIKBASDwN5RGlWYBMUFRaEVWEXFBgZjEoPXxoSkX4bjYaZGBxgHZ2AkR4cHx+cSiAJCRAhIiMkJSaNCREgBScFKCkqtkq4sLK0JsFxDMrLzAx+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +tar-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaXNze3Ly2tJyanPz+/Ozq7GxqbJySbJyadPT29Pz69GxubMzOzDQyNPz21LSujPz25OzmxNTS1IyKhERCRKyqjLy2rKSehPz67Pz23OzerKSaZMzGxPTy7PTqvOzirMy+dKyeTIR2NPTq3LyubLyqVJySPHxyJOzi1LyunPTqzOzW5OzSzNzOrJSGNGxiNLy2pPTm1OzezLyqjJSKZOTStOzOxNzGtOTSjKSSRIR+LGReHLyynOzexLymhOTWlNzOhFxSFHRuRNzKfNTGdHxuLGxeJIyCbMy6pLyifLyqlNS+pOTOpLyedHRydJySfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfLgACCAAGFhoaDiQECjIwDAQQBiYKLBZYFBgcFkZMICAkICgULDA0LBA6Cnw8QERKgExQHDBWpCBAQFrm4EAkKAhcUqRgRGRqsGxIbHB0eAgOpCRofCw8WICEiIwMkJBDRCwsgICUmIico3CkqtissLS7mJy8wMTIzNKk1Njc4OSI6Xuzg0WOGjx/6gOQIEkTHiB0ohKjwYQOhoCEliBQxcuQIDCRJbNhQkmoQRhgflzAR2cRJSUFPekDpQbMHjR9OXCpywLOnTwd+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +tex-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxDQyNPz+/FxaXAQChKSipPz+xPzerAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARgEEgQqrUz3yqGCJlUESRZEFU4lkQREJ/2skU9BEaezzmRCwccwDCc+XwIFGhI0ZEMxiURxzIQkghp0+qjJlDDHdRnQPSyGu4oEfguRTrs9fqmWAjfPHpSkWMReyIbg34RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +tgz-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBIQChFxaXMQCxNze3Ly2tJyanPzC/Pz+/OTi3GxubJySbJyWbPT29MzOzPz69DQyNPz21LSujPz67OzmxJyadNTS1IyKjGxqbERCRKyqjLymhLy2rIyKhKSehPz23Pz+9OTevOzmtKSaZMzGxPTu5PTqzMy+dKyeTIR2NPTq3LyulOzirLyubLyqVJySPHxyJOzi1OzW5OzOxNzOrJSGNHRmJOzezJSKZOTSjGReHLyunOzaxOTWlNzOhKSSRIR+LFxSFLyynOzWvHRuRNzKfNTGdGxeJGxiNIyCbMy6pNS+pNzSrAQCBHRydLSunMSynAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfYgACCAQKFhoaCiQOEBI2NBQIGAooHjAiXCAkKCJIAAZ8BCwsMCw2XCg4PBhCCohESExQVCxYXChgZrAsSvBIaGxIbDA0JHB2sHh8gHx8SISIiIyQlBBysFR8mzBIiJygpBSUqK9cPEywiLS4oLzAFKjHkAAwmMjM06y81NgUmNxuscNCYQSIHuxopdOy4wQMgABw9cvjw8SMFEBhBhPAY4hAAkRZFjKQ4cgRJEiWgAiTy2AKJSSFLmAQ4MKDJSidPFggRAmXFhgADNthMJACC0aMQAjRZ6icQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +txt-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaVPzKjMR6RNze3Ly2tJyanPyODPz+/Ozq7GxqbPyKBPyGDPzGjPT29HRydMzOzDQuJOx6BPyGBPyKDOTWzIyKjERGRDQyNKROBOR2BOzezIyKhBwOBKRKBNSOXOza1CQOBPyCDOySZPzizPTWxPTy7Pz69Pz29PTq3LyqlMxmJNRyROy2lPTu5OTi3MSulFxGNIRWLMR+XPTKrOzStPTm3IRSNOzizOzavLymhLSyrEw6LKRuVIx6ZNzSvOzexNzWxNzW1FROTBwaFKSShOzWvOTOpOTazJyWjHRqXNzKrOTStLyifMS+vMS+rMS6pLymfLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfOgACCAAGFhoaDAgOCAQSOjgUBBgGCB4qEBAiaCAkKCJMACwwNA42bCA4PEA4GERITFKQVpwgWDwoXGBkaE6MDG6cOBAUcGB0eGgsTDR8gmw4OGwURACHIIiMkJSYIJygpKSoYgtYrLC0kLdAuKS8w1IIdMTIzNDUbLjYpG+KDABcRbtRrYWMDjhw6xg0KsCMAjx4+fmwAEiShvwBCChgYQqSIkRpHdMBjZCIFkh1JlCxhcqSJQkZOnjyBAgOGjihSpLwkhAFDBJ9Ae0bwEwgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +unknown-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXIyKjNTW1Nze3LS2tJyanER2RGS+VPz+/PTu5GxqbPz69BQ6BCxeLFSqRPT29HRydMzOzDQyNERmPKSypCRWHIyKhERCRDyGPKz2nESiLBxGHCyCHGxubPz6/PTy7Ozi1Ly2rKSipOzm3LyqlKSWhCRyFOzizLymhNTKtNzOvOzaxOTStPz27OzWvOTOpLSupLyedMS+rMS6pMSulLyqjLymfLyifAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAamQIAQECgajcOkYEBoDgoBQyAJOCCuiENCsWBIh9aGw9F4HCARiXciRDQoBUnlYRlcIgsMG5CxXAgMGhscBRAEBRd7AB0eBBoIgxUfICEiikSPgyMMIAokJZcBkBybJgomIaBJAZoMpyCmqkMBFCcVCrgKKAwpoSorKqchKCwtvasIFBIhLiYvLzDHsxQNMcMKLDAwMqEz3jQ1NTY3ONyrE+jp6hN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +vcalendar-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/ISChAQChKSipAQC/Pz+xPzerPyqXMRaBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARyEEgQahVijMmD/oRAbBw1FCgaFFrpEbB6jt1g3OpFAscxwATUiIAgBRKJXiqIYJEMBQNSWSAYgptrMDo9FJqKrHArTR4WLGisSkbebE12gXFFGRBFyd3eaFSvbx1xCDBXC2E1e1EECo07ABkaBh4fGn4RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +vcard-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXDQyNAQCBMTCxPz+/ISChKSipISC/ERCBMTC/Pz+xPzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARvEEgQahVijMmD/oRAbBw1FCgaFFrppeo5drKhXqQUEIfREyweqWIoHo4GDYtkGxwQ0CjitEkUrCyfYjtdbJoFW/agmLJWWZSY3B0EbGJ4uAwcHlK2HpTg7YgHBgQjDH0THoGBCwULjDkAGR+RH34RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +video-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaTFxaXIxuHJyCLHx6ZLy6vJSSlNze3Ly2rMy2RNS+TKyqrMzKzPz+/Ozq7GxubJyanLSePKySNKSSPNTS1JSWlDQyNMSqPLSmVNzKZJyenIyKjHRydGxqbERCROTWXNS6XOzidNzOZPT29MS6rISChLSulMy2TLyeNKSOPJyCPOTi3JSSfHxiFGxaJFxWLFROLPTu5Ozm3ISCdDw2BFRKHHxqPFxWPLymTMzCvPTq3OzezKSWTMzCbNzGZExKNHx6dLyqjMy6XMSqTMSmTEQ+JHRybMSynISCbMyyVOTWbLy2ZBQWFGxqZOzifDw6LCwiDISCZJR6LIRqJBwWDExKRHRuXHxmJGxeJFxSHCQiFFRGFGRSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfhgACCAAECAoWHhoMDBAUGBwiRkQkCBwGCCgsLBQwNDp8ODxAOEQIAChITFJwVoA4QnhYXEhgZBRoFG62fHB0eHxcgIQUiIyO5uyQIJSYXJwUoKSoUKwEWniQkLCUXHy0DLi8vMDEfBw0kMjMnFwAfNDU2Nzc4OTgmOjs87ILvEj04NPj4ASRICR5C2vVrEWAIEQwSihg5giThIHdJiCgJMWIJkyZOLA4K8CHJkycimEAJEcWJQkECEHyQEqIHFAJTqFSxcjGAjhIfrlzAkkWLDS1bel5Y+mELly5YCEyQ4CcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +wordprocessing-16:mimetypes mimetypes16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFRSVFxaXFxWTNze3Ly2rJyanPz+/Ozq7GxqbHR2dHRydGRmZERGRMzOzCwqLJyWjOzi1Oze1PTm1PTm3IyKjDQyNERCPPTy7HRmXCwqJPT29DQ2NNTGnOzm3PTq3CQqJMS2hDQuLKyaXCQmHBwaHKyahLSijKyehBQaFCQiHHRqNPTu5LyulCwuLHxyNAQGBBQSFERCRBweHOzezIyCVJSSfOzavLyqjOzexOzWvLymhExGJEQ+JExCJExGLCwqHOTOpDw6POTStLyifMTCtMSynMSulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfWgACCAAECAwIChYeDjAIEj48FAgYBjIIBBAeaBwgJBwYDjAoLDIkNmgsOnw+CEBESExQSEgsHFQsJDRYAFxWbmhgZGhsEBRUcHQ8cEB4fzhAWICEYxSIjJCUDJicnKBkpKissFC0uLwAwMDEyFzHpDxgfES27DyozMyX6+TMTEzQtWJWoIYGgQRsl/t3AsStFQRoGIYrIkUPHDhcANPDo0cMHxx9AUtzQEWQHKwAcSDy4IAQbh5FDghDZNShAkZsFjBzBgaQnh0YcHojgIMIFBwtBXfgJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +1downarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBBQSFAQGBDQyNExKTHx6fGxqbFxeXGRiZFRWVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFxaXDw6PPz+/MTCxLS2tIyKjKSmpKSipJyanAwODDQ2NHRydERCRFRSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZzQIBwSCwaj8ikcslsOp/OgHRKlQoCgymRUDAcEIkwYgxWFBYERpHQcDwgEclEQmk8DhWL2kiIXDBwExMNGRoJaUkEEH8bEQ0cGgcWAksEHX8QHBKSHk1sfxMHH5ROBBsOICGkT2wiq1CIULKztLW2t0h2QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +1leftarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ5QIBwSCwaj8ikchgQLJGBgfNZDBAKBirRekBMtYGEYsHIgsWNhOO7tCrShDU18Hg/CJAIG0o4wCUQcksTFBUSCRYSEnpUFxgIGQkJGYyNGggbHBaVjR2QCxEeWkITHQ4IH3tPFwEMA2ajAKUgqlQTTbFEE7W5vUgGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +1rightarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNGReZAQCBMTCxGRiZMzGzOTm5LSytPTy9Pz+/CwqLOTi5Ly6vCwmLMzKzJyanJSSlBQWFKymrIyGjCQeJJyWnISChISGhHx2fKyurDw6PAwODHx6fHRydDw2PERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ2QIBwSCwaj8hkMRBQKgOCgRMZIBSk06XhEM0SA4iE4uoVLhCMhqLrdSAekMgYO5VM4BQ521mxIC4UFxBWdEkSERYYFxETGQGFSBKCGBEaGRuQSBwdeZaPXpsQCB6YZQMdEI6ZSgMepKusHh+wrCC0rLdlursGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +1uparrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBFxeXDw+PMTGxHRudPz+/JSSlLSytIyKjHR2dISChIyGjIyOjLSutLy6vKSepJyanISGhJSOlOzm7Ozu7MzGzKyurJyenDQyNGReZKSmpIR+hCwuLCQiJBwaHBQSFAwKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZtQIBwSCwaj8ikcslsOp9QYyAQFQYEAyr0Sihkn1fDAeHVLsOJNELxVaITC0bDUU6GH5AIQ8KYrNtFVxQVFBYWFxgRCREYdUQZGhYEDwgIGxAHCQocCgWOQhmhGR0epR8gqCFTq1Wtrq+wsUt0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +2downarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAQGBBwaHDQyNExKTHx6fGxqbFxeXGRiZFRSVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFRWVDw6PPz+/MTCxLS2tGRmZDQ2NAwODJyanKSmpKSipIyKjHRydBQSFERCRExOTFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAasQIBwSCwah4FkQKBsDpoBIqFgOCASCYRWm1AUFgRGkdBwPCARiWRCaTwOFYvYSIhcMOiJpJGZaDYcR0IEHXceEQ0fICEWIoJDhHcQHxIHgI9SEHeVG46YUh8OISOen1INCqWmUnOYTUxQAU9NUlRWWFtbCiRgrYNlZ2lriG8lYUd1khETE24gCZeCkRgeFBAQIAeNn9OTlXKrBJoYnKrcoaPmpmSpq3S+7u50QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +2leftarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAavQIBwSCwaj8gkMiBYNpeDZzEQXRIKBmPgmtUSDgipcAsWjxOKBaN7Tq+n6EbCIQ3E5+KtQk6gjwl7CX11D3sPBBARTQGFDYeJT2R8EhB0koKUfgATFBUSCRYSEoqcnqCiikMXGAgZCQkZqautr7FiFxoIGxwWqQC4ury+qh2tCxEexMbIRhMdDggfYs7Q0kcXAQwDbELY2txEziBmmx3jSRNMR+nk4e2b70ry80QGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +2rightarrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTGxOzm7CwqLLy2vPTy9Pz+/Ly6vCQiJLSytLS2tLSutOTi5MzGzKSepIyKjJSOlKSmpMzKzJyanIyOjBwaHIyGjISGhJSSlISChBQSFJyenIR+hGxubDw+PHRydHR2dEQ+RHx6fERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8hkIIBcJgEBweAYnTYJUmMAa9USClniFtwlGg6IRFhoUKTXwwWj0FB3F46Hwl6UQyISfAB+EROCQgsUFRYSF3yJEIyBaxgWDBkaGRtclQwSHBIbEGEdGx4fGhcOICEDGBsWHBmqIq1CHRIWGRMMIyRTHRy6Er22tyONq8YdJRe0xkIDwr2/QwMfliMmZQADIxasZd4e4UYDIr7c59rc0eVFA+/m0EQD9PDt0flP/P3+BkEAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +2uparrow-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBGReZDQyNMTCxHx6fPz+/JyWnKyurHx2fDw6PJSSlISGhIyKjIyGjISChLy6vJyanOTm5PTy9OTi5MzKzLSytKSepMTGxMzGzLS2tLSutKymrHRydCQiJCwmLBwWHAwODLy2vHx+fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAajQIBwSCwaj8RAAMkUBgSDZdP4JBSi06TAcEAkFNLp07BgLLzY5njRcDzO3zB1C4lEGI83Wj58SiYUFRUWdg0XEXFFAwIYGRoWGxwRZQUFHZdgRAObmx4fHiChISFKpVlKWUdPaalOAlasp1sHG4myZGZ7Yltsbgu1mUhjdRF5egmxfQJ/gYOFdrZDi40iFgiSCw8jBQmYcpydn6Ego6WorUwGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +abs-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAWABYAAAJLhI+pF+vW4HMR1InqxbJzBiLCeIxCaIkneQJk6rkl+2qlONzeNi+2YvKhEIOW4iczvJSoSDDIbCpbq2oGBXUtd59r7IPshsHdB70AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +airbrush-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/AQCBPyChMwCBIQCBPz+/MzKzKyqrISChDQyNPwCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAR8EMhJKw3BahvEyNvWDV+ojQMBAhgmeukaFHSxTqh6FYZx3CyYbtf7XYRAFs8nQ56WxiBpyOEdjLkkrnA9IAKGqXbnTYAP1NDMe0Z8JYR4nPP1seEqTHpWZMupVHx2by03Q4JXbxuBfYoaaVZ3i4YKbo4WaQAKBCxjcEAGEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appearance-22:actions actions22 22:photo:22 22:R0lGODlhFwAWAIYAAPz+BAQCBBweHPTy7Ozq5ExKRPTu5NzStLy2lCQmJAQGBOTezNTKrLyylNTKpOzm3NzWvOzm1MTCpNzaxISuvBSGvLy+pKSehOTexISutKTa7IzS7GSarJTW9HTK7CyazBRypMzGpDw2LOTaxEyKpCSSxARGbERCROTizMS6nDx2jARajIR+bOzi1OTi1MzCnLy6lOSupNx6dGS2rJS6pMy+pOS2pNxGTKwaLDSmpHTOzES2tIyuhLSmjPyqrMw6RLSOhLzSrGyqbFSmXJSyhNTOtGTCvLzm5CyOjEQ+NPRqbOxOVKyKfMzizKzepFyuZJSqlBR6fCRmZJSKdDw6NLxqZLQiNIwyNLSejDSCRJzWnEyiVHySbBRiZDQyJMSijGS6ZHSCZJyafDRmPISKbJyifDw6LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAXABYAAAf/gACCg4SFhoYBAgGHjIQBAwQEBYwBlYiQAwYGi4UBBwcInIIJA6WRBAqdCwcMDA2pggEEDpUODwSiAAEQnwwHnI8RwBIGsLoLExQVFg4XiwEPD6IKGBjAExkaGxUcocfSgwHV1uITFR0eHyAhIroRERLAC/PVIxMkJSUgJvHH1RAKTixAgQzZhAkpVKwwwYKWrgnzFrRY4IIgBoMTRryQAGPjs4zzYsgYQdIgsgMzaNRw0CCBLgn2bNzAceMgSZITcujYwaNGj2sjcPjw8QNIECFDiEgoYuSIDiQOkoSTMAGHkiU4mAhp4uQJDyhRjOSQMiUXFQdVrOC4giWLFidbRri8QBKlyxQviIp8udKjRhYwYLKEedFAjJgvucI5cFBEgoMxkMm82PjFmCERix1wLCNmcg8viRGZ6aHZcQ8zoRtVWp16UCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +attach-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBMTCxPz+/DQyNKSipAQCBISChFxaXDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARrEMgJgqA4zzus/gLhFd5HCcZAXqsphYPUdhcYFNRcZnvdtpnDqPTbUWgAJKBYwzBlw+bRo3xmkNWoBgm0OrVLn3GC9RgCk8DhUw7c0rHPr4CDu5SYQNyEt7uSY3p/UAKFhYKDSQOLiwgFdhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +back-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRGZAxCZGyavExmjHyatOTy9CxihISevPz+/KzO3BRylAw+XAQCBDRWbPz6/FzC3CSuzDyexJzO5Mzq9CxSdAQOFISmxNzu9HTS5BSmxAyexDSuzJTa7Mzu9Kzi7GS21CRmjAQOHHSWtLze7AyWvHzG3BRihAQKFCTO3BS+1AyixBSWvBSOtBSStAQWJBSixDzW5BTC3BSqzBS21CTC1ETW3AQSHEze7BRqlBRmjAQCDBR+pBRefBRSdCH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMqBcMpvHgGAANQYIhWdVGDAcENQtIJBQLBgNx0MQaDuQXcghIplQDhBIxXKJYiAZGhscHR4VHyAhIiNWJBklGhIbJoQnFCcTKIxFKSgbKissJi0mJi4vLiYoMEcXKDEyMzQ1Nje2NisoOEg4KDU5K6g6OwwoKAN9SCOeMmgwz884PEq9PT4NYkPLP9jZQikN3d4AKVrjKePp3gZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +blend-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQmJAQyNAQ6PARGRARSVARmZARubARuXARmTARiPAReLARaHARKBAROBAQCBERydESChESOjESanESmpESytES+vETKzETKtETCpES+lES2fESybESqXESiRAQ+PARiZARybASGhASWlASmpAS6tASynASqhASiZASaTASSNASKHAR+BARiBARydAR+fAS2tARKTDRaXARaXASOjASKdASCZAR+TAR2PARuJARqFAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa3QIBwSCwaj8ikcslcBp6CAaFQMBwOiIRiwWg4HA9hAAKJSCaUiuVywWQ0G07H4wkDxp8CKCQakUolJicoKSorLC12eHouL34lMIKEhoiKEFMgLn0kMIGDhSyVYhADjJuAkoWHiaMEMXuOnJ6Tq5alBpp+nSeflKx3l6a6s6CiwKWZm52pvpaue8rEzaPIubLMta2Mscu9ob8BMgIfBDPJNDQ1Njc4OTotDXYP8/T19vZN+fr7SXRBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +bookmark_add-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCwqLCQiJCQmJMTGxAQCBLy+vLSytERGRFRWVKyurKyqrLS2tKSmpHR2dJSWlKSipISGhGxubIyOjGxqbIyKjFxaXGRmZHx+fPz+NGRiZPz+ZPz+HMTCBKSiHPz+jFxeXPz+XPz+tPz+zPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAamQIBwSCwaj4Gj0hgQLJ+AAaEAVQoI06pRYDhkoYgwIhEgKBTfZ2FhaBsYDS8VWnA8Go0FJIKeqyUTDw8EDHBpSwUUFQ4UFhcYDQYFfkoFFxEQDG8KEAUZlEeWGBIakw4FG1STiBoYBRwdBR4fHgUdHKBEBSCnIR8iIyIfIblFu6ceIyQjtcXGCbLKzAUKzrq+wMLEVa+xs7W31kOTk6nkWuOf6Ea5QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +bookmark-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBCQmJCwqLMTGxAQCBBwaHMTCxLSytERGRFRWVLy+vKyqrKSmpHR2dJSSlJyanISGhGxubIyOjKyurGxqbFxeXGRmZHx+fKSipLy6vGRiZLS2tFRSVHRydJSWlHx6fCH5BAEAAAAALAAAAAAWABYAAAWWICCOZGmewamaQrq+wUC8azHINGocOI38iIRAceDNaISFYklkGHOEhoNBfUAOhuOLEJE8HoPiRKFdESiQBqViuTDIUAsEcyAeGJmyiqC5RCwJGg0YcEh9D0V3Dxt6JwQVDRYVHBUdi40mjw0PTgwQHgeYJQQJfxUXFxAOoTkFpQ0fsRSimQkWEQ0VtI62HLt7vjl7JQYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_all-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI+hI+pyw0Bo5wR0TttUJDv0yWhRopfaYzguaKt6aasrGFYbVPxM/O7Snv9WEAfTIgMKpNGWU63emYc1GrVUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_bottom-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KQLUVm8Zch4ozbcq6l7L+D4QhgsTf7Xi0FwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_fall-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI/hI+pyw3xIpwypgBRdg/v9h2eyBnZCIKYxX2oEsJruVKjHS8vk3duKZnpHKjeRSTU0HYpTcxWgRqB1KrVYC8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_horizontal-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KwLbuyybw7KY216Einpv377FRhhUV78igFwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_inside-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI7hI+pyw3xIgxTRvcg1oku3njbBx4liV3dqYbsSsXyLBr0Pad1iCovsmOwgjbdz9TrGHWWSeWZikoXhgIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_left-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI6hI+pyw0Rnox0ygNXdG9z43Xal30gUiYhk5LoenJQRVtti5FwE+Kx4+O9RrIda6gwDmvMi+kJjTIMBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +border_outline-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI8hI+pyw0Bo5ww0SttcKci/ymgMTZl+Yjbt3Jn26lautX0A+OizHJkjsrper7XbkZ0ATEYDZPii0qnU3sBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_remove-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIthI+pyw3xIpwyOgOv1dvl+2lhMzIlyZ1KQLUVm8Zch4ozbcq6F7s+fgsKb4YCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_right-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI7hI+pyw3xIpzyQRdVuIZj+3nHhogOiZng+I1qoqIdRVfbWy5y1u5M7MFphB1dsDULGXO15goJjUoRhgIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_top-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIyhI+pyw0Bo5ww0SvdCdrw7oGfNnZlczIpKorc+8RwZbZgXOc2uevOqpjJhrCb8QgwFAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +border_up-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI/hI+pyw3xIpwyOgNRyPq+zTkcuIQKaV3T1pgHinmfm7AUedMa64Vw3bLJMr9TiZcSFUsnkw54q0Rl1KrVYSgAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +border_vertical-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI6hI+pyw3xIgxTRvcg1oku3njbBx4liV3dqYbsalFeJTp1iCovcjNsb9iZhMFcJwXUxTJLYuoJjR7sBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +bottom-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRKZDRSbBxCXJTC1Mzi7Nzq9NTm9Bx2nAQCBNzu9JzG3Hy+1HzG3IzO5BRmjPz6/LTe7Dy61AyStCTC1FzC1AyGrETS3ETC1ETa5BRulAyuzBRylAw+XMTe7Gy+3CSqzAyexBTC3DR+nIS21KTW5Nzu/KzO3FzC3Pz+/ByixEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaXQIBwSCwaj8ikcnkMBAQDgjPAFAYKhsMBkVBUAYEFo+F4QLzVQEQyoVTOX/XBcsHA0+vMRbNBMwkRDhxuHX5GTlIeHh8gISIjFAEeiVRECiQlDAUmgxQjIhwiJHdFlycoKSIUFCEjGiGkRpcqCxYijxorsUezcxYsuoZJsxLAu0qXB7DCTJfHvArR0tPSSNTX1V/a20J2QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +brace-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAWABYAAAJRhI+pGbHYVHzQnUnrtXn7/gEYIJRHKRgYZraGuXLp28LcNL/Dqd4cYmJYRqegsKcY5DRIUhHYFDlQJGMuVn1ljdhqjhoiZrogKbMjFh/LHUMBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +brackets-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAWABYAAAJRhI+pyw0Bg3vxwImu0Zha2XkbaAjmYQrjh6qnCpwcB8evTGp1PKDrnzglZqTWDsg5DI5IUE1Yatpc0BrRFr2xfiljJlecXEPjDjG5iIRDCHsBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +centrejust-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIhhI+py+1vgpy0TogztlT7j3CiBJbZWJlqg4rry7jw/BoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +charset-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBAQCBAQGBFxaXAwKDBQWFAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANLCLrc/jDKuQK1zmKo3/YVJSpBSZYmKaTkAAwYoQwFELjvpisyaTM7H6AH+3lQMZQwExrOOiBh7/cJGokaXHGpQVaUo7B4TC6bw4AEACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +colorize-22:actions actions22 22:photo:22 22:R0lGODlhFwAWAIYAAPz+BAQCBBweHPTy7Ozq5ExKRPTu5NzStLy2lCQmJAQGBOTezNTKrLyylNTKpOzm3NzWvOzm1MTCpNzaxISuvBSGvLy+pKSehOTexISutKTa7IzS7GSarJTW9HTK7CyazBRypMzGpDw2LOTaxEyKpCSSxARGbERCROTizMS6nDx2jARajIR+bOzi1OTi1MzCnLy6lOSupNx6dGS2rJS6pMy+pOS2pNxGTKwaLDSmpHTOzES2tIyuhLSmjPyqrMw6RLSOhLzSrGyqbFSmXJSyhNTOtGTCvLzm5CyOjEQ+NPRqbOxOVKyKfMzizKzepFyuZJSqlBR6fCRmZJSKdDw6NLxqZLQiNIwyNLSejDSCRJzWnEyiVHySbBRiZDQyJMSijGS6ZHSCZJyafDRmPISKbJyifDw6LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAXABYAAAf/gACCg4SFhoYBAgGHjIQBAwQEBYwBlYiQAwYGi4UBBwcInIIJA6WRBAqdCwcMDA2pggEEDpUODwSiAAEQnwwHnI8RwBIGsLoLExQVFg4XiwEPD6IKGBjAExkaGxUcocfSgwHV1uITFR0eHyAhIroRERLAC/PVIxMkJSUgJvHH1RAKTixAgQzZhAkpVKwwwYKWrgnzFrRY4IIgBoMTRryQAGPjs4zzYsgYQdIgsgMzaNRw0CCBLgn2bNzAceMgSZITcujYwaNGj2sjcPjw8QNIECFDiEgoYuSIDiQOkoSTMAGHkiU4mAhp4uQJDyhRjOSQMiUXFQdVrOC4giWLFidbRri8QBKlyxQviIp8udKjRhYwYLKEedFAjJgvucI5cFBEgoMxkMm82PjFmCERix1wLCNmcg8viRGZ6aHZcQ8zoRtVWp16UCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +colorpicker-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBMT+xASaBASyBASCBARCBPz+/KyqrISChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARZEMhJ6wzBahvEyNvWEcMXcgJBFuApjavRhlgaz6J9u5dQDAUZ73VA+FhDQOAQQCQEQt6ymcjgREznlZatJpXdLZYq1ky137M3qS5zwl8lOR5IIDBx5TpviAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +configure-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBISChFxaXNze3NTS1Ly6vKSipNTO1Ly2vNza3Pz+/MzOzOTe5DQyNOzu7MTCxGRmZMTGxPTy9Ozm7Hx6fPTu9MzGzGxmbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAW1ICCOZGmeaEoGbBsI6joMRGEcbQwESDIrtVtAF1gwDLNaAmfKiVgLBJKgwB1KxQZrBHU0FAXmavFoQLYiB6TxFXMj5AZBwnJI2I3wcNWALyYEcgoKXxRhOHs7XxEVCwsWFgoUDRYUFwwQB25ZCxiNjo6GkwUXN2NsCxEYqhUHoQ0MEglYRQQXErcHrI55FycuB2YSmoyOBTEtB2sXuhU6XAENC2a6z9AKCwq+1tAN3E2J3ySkIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connect_creating-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxOTi5AQGBNze3Ly6vISChNza3FxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAAR4EMhJqwzY6omD+MNGdR8YilNZnug0qGzrqrL1lnV1fyJBVB6VQEMoGH4ADGwQkxQPBwMiKGA2J8VEAnq0tgiKg5aL/C7C2gTjKCM0zowDQ8tuNQznNL7cKzjOUQsNfER+gguIg19+Pm6ChBZFDmWNi5M5FIyYFHQRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connect_established-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBKyirPz+/KymrOTi5KSipMzCzNza3OTe5Ozi7MzGzPTq9OTm5ISChMS+xFxaXNze3GReZIyCjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWLICCOZGmeaBkAQpoGg7C6JizTQT7CxPwOwFWgYPChYIXkIHC4uQKGAiKRKCyNpxxUUVViVYNFLkqtLo+DAkMMLXQPXwAy2WCTF4544FGtKuwPDhB6DnxuUmyCcXIQhV1uYoMuEAcOBxEKCHg6TzGFCJUSizuejROKOAM9OY2SnUU7nD89NCcDsLUnIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connect_no-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBERCBAQCBPz+/MTCxOTi5Nze3OTm5Ly6vNza3ISChFxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAARiEMhJq7046827/+AVCKE0Dh9BAGdaGISAToFGFMcBU+11I4hDYseSZQiKwwKoI/QwBIYiuFDCZseGdIlYEjUNg1SpY6w2N4cUIW6cjwW1lsFwo+MqgtZuw0/ydw5vH34lBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +contents2-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBDyGhCyCfFSWlESOjDyKjDSGhCx+fGSinGSenFyanEySjHSqpHSqrGympEySlBx2dISytHyyrCR6dKTGxHyurHSurHyytGSipCR6fARmZFSalEyWlBRubAxubBRydDyKhDSChLSytPz+/MzKzIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbFQIBwSCwaj8ikMhBQIpmCQdM5ZBIKhgNiugwkFAsCI7pNMhuOxkNBgBgEiAi3GkBLJpJHYgEpaClyREwVFhcSEhgOGQoMfgMaERtcARQBFRMYExZ6HB0FUYAekkIBHxqWFmlrC1haESAfG6MBGx+VFRgKYH0hInGRklO0ppYXCwwMWQiQHkwjgrWnFRdYZHIBJCTP0LaWGAcDW9jZ2nMAw9IWTOQkJSZMRsOV49nu8E+19PbmR7TY+1TovONH5V7Ag0QMBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +contents-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAAQCBAQ2NPwCBHSurIS2tBx2dBweHPz+/Ozm1GxiTGyqpPz6/Pz69GSqpOzaxPzy5HxuVLSmlOTazPz27PT29NzClPTexHxuXLSmjAxqbFSinPTy9KyehNy+lPTy5Pz29HxyXNzWxKSahOzexPzy7IR2ZOTWtESenPTy7KSWfIyCbKyijAQGBDyalPTu3KSSdDSOjJyOdCSGhPzu3OzizJSGdPTq1PTq3JySdMy6lAyKhOzWtOzi1OTOrJyKbMS2nJySfMS+rAwCBNzOrNTCpNzKpJSGZKyafLSifLyylIx+ZHx6ZDSChAQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAWABYAAAf/gAABAoSFhoeHAAMAiI2IAAQFjI6EAAaJkQeTjwAICYkKBQcLm5WdBwyfhgChB66bp64HCQC1lQ2irqQCAA4PowsLEBESE4wAuLIHFAAVFr+uDBcYxRm1GrmuGxwdFh4Mrh8gGCET1gDYyhsiFSMkDAsMDCUYJhvnJ9kHKCnODwwfPlBQsULCPRYAWogK9sHFiwoOPEyQh0JFPXO1YBSYwBEFghjdHkwQOYGgwQwIZRR44GHGDBogabhAsYEEihrUMAIoUMCEDRs3HODIYQHFA6MPcJA7KICFjgw7eIzo4cOfiwc/gKwIUm2SkKdDdlDt4AABDaU/iIRwwbTSUyJFOow4S3Hkx9oNDDZgXPU0h1wcSIgEGUw4ibVET5WoWMKksePHpdxmyKADAEIWly9HJtQkQJMmlAgZCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +contexthelp-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBAQChAAAACH5BAEAAAAALAAAAAAWABYAAAJQhI8Qy5F/ghBsLuOgpHHy+0hZ94HINiqWwoQrtjYpNqJ0A8Hcjbs73yPNZEHVDygTJohJWqiZe0JPM5ajtXxFMkXnklqNgsPiWzmHPatzhgIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +crop-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBMT+xASyBASCBASaBISChMTCxPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARUEMhJq704681r+EFHBcIwEKFImmfKkURhoh1cyO0rxEWZa7bezIUJ7gg04O62A22MyeeyF1XymrUSs5pZmbA61u+FLBOBhrThozq4D2cgYo6IawwRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +decrypted-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBGxqbFxaXExOTEQ+RAQCBPz+/PTy9Ozq7Nza3NTS1KSipFRSVOTi5Hx2fJSSlKyqrJyenJyWnDw6PMzKzKyurDQyNFxWXMTCxJyanHRuLHxuLGReJFxSLFROJFxWJExCHERCHBQODISChHxyLHRqNIRyNHRmLLSqbKyiZLy6fOTarPz67Pzy3OzitKymZFxSJJySTNTSnPTy3NzSpMTChLSydKyqbKSaXJySVIyGRGReLPz23NTOnMzCjHxuPLy2vKSmpOTe5LS2tLSutHxuNHRuPMS+xFxWLIR+RDw2HFRKJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SDAQIDBAUChY2EAQYHCAkKCwyOjZANDgIEAQoPjJiDAg2iggQQp5gMBwmrDBESl6MTFKuoFQSjABYRF40CGAW8BRm7hQwNxBobHB0eHx4gISIjBdiEAhYFJBslHOHSHh4hBSHlxIUmJygpKissBiwtLi8pGjDqhBoxMjMuaNSwcSMFjhw6dnjYRyrGCh4ueviw4Q5HDB0/PjAUJCBCAwMIGiiggAEIBFk/FgYLIgRkggQkhxAJkqGExkYMFnxsIGRkSQgLHhRRWUjAggQgG8AsSWRBBiP6VrYMOfKIyaBDNwLo+HHSUplOSyDRqiEHjRkretRQkcLgxayNF0wksQGQxsSKMTIq0QpgCba/gAE7whEIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +down-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRKZDRSbBxCXJTC1Mzi7Nzq9NTm9Bx2nAQCBNzu9JzG3Hy+1HzG3IzO5BRmjPz6/LTe7Dy61AyStCTC1FzC1AyGrETS3ETC1ETa5BRulAyuzBRylAw+XMTe7Gy+3CSqzAyexBTC3DR+nIS21KTW5Nzu/KzO3FzC3Pz+/ByixEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaRQIBwSCwaj8ikcnkMBAQDgjPAFAYKhsMBkVBUAYEFo+F4QLzVQEQyoVTOX/XBcsHA0+vMRbNBMwkRDhxuHX5GTlIeHh8gISIjFAEeiVRECiQlDAUmgxQjIhwiJHdFlycoKSIUFCEjGiGkRpcqCxYijxorsUezcxYsuoZJsxLAu0qXB7DCTJfHVQrMX9PU1Uh0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editclear-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAWABYAAAJBhI+py+0PYZi0WnqC2Lx7HhjaR3YhMArBUHpnuramCLLy9tY3TuP2nfPtVD3VTxY0DpNDHqo5E12mlYj1is1e7QUAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editcopy-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFPz+/DQyNISChDw6PMzKzMTGxERGRIyKjFxaXMTCvKSmpHR2dPz6/Pz29PTq3MS2rPz69MTCxFxWVHx6dJyWjNzSzPz27Pzy7Pzu5PTm3NTKvIR+fJyGfHxuZHxqXNTCtPTq5PTi1PTezNS+rExOTFRORMyylPTaxOzWxOzSvNze3NTOxMy2nMyulMyqjAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbYQIBwSCwahYGkUnk0BgTQ6IAQaBKfUWhBYKhaAU+CgXAQIAyChLeJzSIQhcH6GFaM0QtGY5kstqEODw8QEQELAhJTc08KBBMEFBUWDRcBE1pca20SGBkaEBscAY5maFRIAgoLHRQRHh8gIQFlZnByqA8ZGSIQIyQjJQEmYgJ5p2ACrK4gJx4gKIZZAgdeAQ4ZI9kjKSor0AwEjeAs1S0cHAslLi4vMDDRWeRIfEsxMeET4ATyVoYLC5fizXEiAR84BeMG+pEm8EsAFhAjSlR4hR6fLxiF0AkCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editcut-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBAwCBPz+/OTi5JyanOzq7DQyNGxqbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARbEMhJq704gxBE0Bf3cZo4kRJqBQNRfBucyudgvJS6VaxLzyMa6/bLiWA9HOg4VIIkL5vzuRkcpkvRIIAorphJLzBW84WEuRZWp6uaT7J2Sh1Hit3OY/ZO7WvsEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editdelete-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAASC/FRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanPz+/Ozu7BQSFCwqLDw+POTi5PTu7MzKxIR+fCQmJPz6/Oze1NTGvPz69Pzy7Pz29LyyrPy+vPyupPTm1BQWFIQCBPwCBMS6rPzSzNTOxPTi1NS+rPTezNzOxPTizOzWxMy2pOzaxMy2nPTaxOzOtMyynOzSvMyqjPx+fOzGpMSihPTq3OzKrOTCpNzKxNTCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf8gACCAQIDBAUGBwgJCgsLgpCRAAwNlZYODxALEY+SkAMNEqKjEw0UD5yegqCjrRMVEqidkgWhraMWF7GptLa3EgEWFRSOnhW+vxgZEBqzkBvItxwdHryRCNGjHyAhHSLOgtgSI60c2yQjJd+eJqEnKK0hJCgnJSngAO0SF+8qEvL0VrBogW+BLX4oVKgIyMIFQU8KfDV4R+8FDBcxZBREthAFiRIsOsygsVEUh4Un3pGoUcPGjZInK65QicPlxg8oX5RwqNJGjo0hdJwQ6EIkjRM6dvDYCKIHSBc1Ztjw4eOH0oIrsgIJEqSFDBo0cuTgsdSTo7No0xYTZCcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBISGhISChHx+fHx6fHR2dGxqbGxubGRmZGRiZFxeXFxaXFRSVIxSLPyuXMzKzMzKxMTCtExOTPzqrPz+/NTS1MS+tOSaVPyWNPz6/IxeNPzavPyKBNTW1PyCBPyGBJxmNPzOpLx6PNRqBMSCRNySTPyCDPSGBMxiBKROBHRydPSylOyydMxmBJxKBAwODPS2lPTq3OyabJxGBPTy5PTGrOyOXPR+DPz69PzmzPzevNxuPORqLMReFPzy7MyCXKxiNIRKHBQWFNTOxPzixJRaPFxONHRqVPz27PTy7PzStCwqJDQyLJSGdIx6ZPz29PTu5HRmTLSKbMSGZHROPFxKPJSKfJyShKyehMyuhDQmHEQuJJyOfLSijMSynMS6pLSefDQyNHx2bKSahLyqhLymhOzi1FRGNIR+bNzKtOTOtOTKrOTKpLyedAQCBFRWVPTq5NzOvLyunLSmlNTCrOTOrNzGrLyidMS+rLyynKyijLymjLyqjAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gAAAAQECAwQFBQYHBggJCgsLDAwADQ6CAQ8QD5ydEJ+gERKWE4ICDxSpqhWqqhYNFxMYphCtqaytGRoXGxgcggSoth25u70eH8APFR0VzMzNziAXIRjIvwAFwq3EqSLUGB/iI4LathS4JCXVJh8nKCmCKrXDFCss1eIfLS4v8ssdmgWsAGNDDBnt3s3wJ+jAtlUhaNSwccNEi4WCBBl4SAHHihw6ZOzg0QNjRgAG6KXK4CNEjBU/gDQI8kLISQAIADobAoMIzCINjLw4YvNkAno4kCRRUuNHESNLmDRxUjSjAlRPfECJImUKlSpMrFzBIqWqoKtJaWSJomULAy5XXrp4+QKGYcYFoCBEWRImi5gmY7CQyVLGriAGD2jEMHMmCxc0Xb6kUbOGTRs3N988gLM4jpw5Y+iwqcOGjZ07mE8yiGABz5c8c/Ts4cOnDJkybS7fdMO7t+/fvDMaCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQWFDw6FHRuFGRaBFxSBAQCBAQKBCQiBIx6HPz6/NTOfKyiXDQuFOTm5Pz+/Ozu7PTq5Pz63PTyxNTOjKSeRExGLMTGxMzKzNTS1NTW1Dw2NKSmpKyqrKSipJyanNzWlLy6ZLSuVIx6FISChIyKhJSSlCQiJLS2tDw6NDQyNCQiFCQmHBQSDGRiZHRydGxubHx6dGxqbFxeXGRmZFxaXCwuLOzq7KyurHx+fDwmFEQuFCweFCQWDBQODBwaHBweHKSinJSWlOTi5JyepHR2dDw6PBQSFNze3ERGRIyKjIyOjISGhPz29Pzy7MS2rMzOzFRWVHx2dHxybDQiFPz27Pzu5PTq3PTm1NTCtJyGdHxuZHxqXPzq3PTaxNS6pFxWVFRKRNS2nPTi1PTStNSulNzOxNSynMymhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwABAgMEBYSLggaOjgcICQoLDA2Pj4MGDg8QEZ4FDxITFBUWFxcYGRobjQ8cHR4fCQ8gCyEiFSMWJCUkJieNEB4dKB4pKissK8wrLS4vMDHBAAYQHx8dFx0fJDIzNDU0M+IyHzaNNyg43Ng5Ojs7Ojw9Pj9AMkCNDiZB/h9CSOx4QLCgihItqBkYgqIDESElitAYWJCgkQcXjjRCgi1Ihw4BB5LAQOLCgyQYHihpUU3DBw5ElpAgAYNixSRJjKjQaECDCRPZPDB5IbIGSQwKLnh4wbInLA4kmJB4oaPiAwVNnER40hRK1BIAaVatUZJEFCkmpmjgCeWDCalFe4q4oFKwSRUrEa5gycLzwq8lUnPQ4PEgSpYcUZ5o2cIlS1O/JHLEDdfjQZMIVrpgweLFy5e+M6WSmBGlxYMYYBRzCaOFi5imHWBIfOEiShLTVjaP6eyFTBmN1TA5OvLDjJksWb58OVMGDRqWjAYdmU79SIvpjqJr104nEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBFRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanOze1Pz+/Ozu7BQSFCwqLDw+POTi5MzKxPTu7LyyrIR+fCQmJPz6/Pz69Pzy7Pz29OzaxPTu5PTq3PTm3My6pPzu5PTq5NS+rPTm1PTi1PTezOzWxPz27MyynOzSvMyulOzOtOzKrMymhOzGpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbpQIAwIBgMCAXDAZFQLBbCqJTRqFobjgdkEYFKowPJZEyeUBqVR/crHDTKZYplovZKCW84+YKZZNZSBXl6EwEEBhVPXxZihGMaGRscdkIdg4QeEnVfCH2OHyAhIhuUAAiXZSEhIyQlJqWnjiEnKCWupRWoYyEgJK0SKaUKjam0JCorLMFfC6iqx8giLa/MGAsT1wsuCyULKwssC9RSzdkfCyALKuALLQsvpeXYIQso3gsiCzALMfENC+dGcMNHUAY/f+jq3ctncMYCGggFrsvHcEGNh/EyPFmg8cmrJxAVkVO0EUDJklHoBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +edittrash-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBERGRExOTDQyNISChBQSFCQiJCwuLPT29Nze3GxqbDw6PGxubHR2dJyanLSytJSWlJSSlOzq7Pz6/Nza3Ly6vFRWVBQWFIyKjMTCxHx6fIyOjLS2tOTi5PTy9OTm5Hx+fNTW1KyurKSmpJyenExKTMzKzKSipFxeXCwqLMzOzKyqrMTGxLy+vHRydBwaHNTS1DQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb8QIBwSCwaj8KAMoA8LgUDQsFwQByay4RiwWg4GA9IRGk0SCYJSsUCsVwwGQ1EsmESD5xOp+L5gDwhBRIZDhcDdkMGDgEiIxAkJQ8Ok5MmAohDAQ1xJxUlKCUlEg0pKpiZJRoLCxmtCw1eURhOcR4rbQ8cGRwLAwgGtBYTDywtGRKjvQTARgEZLhMcKC0OrQMvAirMRc7CHCTU1g2+20TO0NIn1RwDCya/wdHT1Rnt5LToKOq79trx0tR02YPX7Jm8fRxMOIhSLhOJE/LCJSTlr5kFEBQsWDiR4UGGBgsuHDg1BEYAfTE6oEBR4AIBAiS5yWBAAAGBAyaPGAgCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +encrypted-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBHRudFxaXExGTERCRAwGDGxubPz+/Pz2/Ozm7Nza3NTS1KympFRSVHR2dNTO1JSSlKyqrKSipDQyNMTGxDw+PLSutKymrMTCxAQCBHRqLBQODJyanDQuFFxSJFRSJFRGJERCHExCHISChHxyLEQ6HGRaJExKHLSmbLy2fOzitPz23KSiZHxuNHxyNJSOTNTOnMTCjLSudKSaXJSKRJyOTOTetNzWpHxuPOTi5MzKzLS2tFxWXOzq7Ly6vOTe5Ix+RLSqdNzSpLyydKyqbKyiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBAgMEBQKEjI0GBwgJCgsMDY2XjwkOAgQBDxCLl4QNCaGCBBGWooINCAqqrBKgqwATFKaDFRYVtBMXsIMNGBm0GRADjQIJxKIaGxwdHh8gISIhGyMZzIwkGholJiYfJiAfJyEZISDbg90oKCkqKwcHKyooLC0f7IIuLzD2YMSQgW8GDRri+AFoUMOGvRsxUhSsQQPHvmQSchyQtEAHhh0WJHDQcJERjwsKDvRI0BGDjwgicXhQyCOjSgUKPO6AObIkIQESfmxk6REDT4s0bfaYpDNkT4VAha5s+TLmzEYtatwIOHAiDZIKNQAJYk9IjCFEisyoocFEB4UACtBpm0t3LiEsgQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +eraser-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBMTC/AQChAQCBISC/PzCxPz+/MQCBIQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARfEMhJKwhi2F0DIRnHeR+oiRRZmqikrmD7wgI6r+EI4+d2l7lNwWDYsTiFw4FI61mSymXxE3xGo8xqBXpVGrQUbveAcG7H0bKowEar12wx2SyMp+lI+7s1ie/5fX8tBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +exec-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAwKDAwKBCQiHNze3AQCBBwWFDw6NPTy9PTy/Dw2NKyytOTi3LS2tMTKzMzOxLy+tLy+vBQODNze5NTS1JyalIyCbIx6VIRyVISGfJyelOTq7EQ+NMTGxKyurGxeRLyKPOSmROSuVOy2XOSiTLzCzNTOzDw+NCwqLHxuVOy6bPzGfOSuXNTW1LSyrMSWRNymTOSmTKSCTPTGjPzSnPzWnMyaVBQSDMTCxPz+/KyahNSeRHxeLJRyTPzmtPzarOy6fJyajNza1Ly6vLyulFRCJPzirPTOlMS2pNTSzMTCvJyenBQWFNzKtPz6vPzyvPzqtOzGlOTe1AwGBFxWTLy6tPTm1PzSpPzutPz2xPTSnOTSxOy2dPzapPzerOzm5IR+dPzu5Pzu1PzqxPzy5Pz+9GRiXGxuZKympHR2bOTm5Pz6/MzSzBwaFJSSjCQmHPz2/AwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeEAQKIjIIDBAQDjYMFBoMHCAkKgwYFhwULDAUKCg0ODxCkBQgRnoUSExMUDxUWFxgZGpAbFIuGHB0eHyAhIiMkIB8lJieIKCUpJCTGIyorLCktKIUDpC4YLzAxIjIyMzQ1NhgdpJI3ODktJTowOyM8Ejc9Pj9AQUIEclAocCMIBQhDiOwgoaKIoCI+jBxBkkSJkCWemIyq0GSHCBVHihRx8gRKFCmpKhGaQqWKFYZXsGR5kkXLFgRUXBUqkCGCFS5AjnTx0sXKlyA6CRVgAAHMAilhxIwhU6ZFkBY5kgKYUoXBAzMKzixZ4AJNGgVm1KxhM0WpmQpUMtooaOPGxAM3Nw60oYLGjNYCbzYJOgAnRzNBJ95oPYQCgpJtkwzFoULlRuRPiy9fNhAIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +exit-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBHR2dDQyNCH5BAEAAAAALAAAAAAWABYAAAJOhI+py90RnIMyRUOxhDfzJkACdoXBuEDDkQFDi5go0MrKx16kns80b7qdELCgBYaEGWwL5nG1ePFiKp9A6kuYRNuho8vxVrrZivmMRtMLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +fileclose-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBERGRERCRDw6PCwqLExOTFRWVHRydGxqbGRiZCQiJISChIyKjHx6fDQyNBwaHJSWlKSipBQWFJyanPz+/JSSlCQmJAwKDCwuLBweHBQSFGxubExKTISGhDQ2NFxeXFRSVDw+PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbZQIBwSCwaj8jkMSAYDAgEJbFgOBwQCUOAoJAaFgvGonHIBhyP5BcSgUAYDWxggD4WFmx3e3HQngkSRgYMEBMUFG4MCId0BGlEAQeEhocVDYcUdBYKF0QCB3gRlJgUAQEYBBkaRAMbDZMMpAYcT46rQwMJrgsdC6QcfwoPnUMOBgkIV6SHHg6bw0QEAQYfBpggBZjPGsRD0gEchxwCIR6HChnQRQ8DIU4DTR4Em+ncRw8O+fmoXPXdRg+gQLFgIYM/KRIkoDP4QMKFf0o0aBAh4qGUixgzCrETBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filefind-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQSFJyanLS6vLzCxISChNTe3OTu9Oz6/Nzy9Nzy/NTy/OT2/Nzi5Mzu9Lzq9KTe7LTq9PT+/Pz+/Nz2/Mzu/Kzm9Jza5HzK1LTi9PTu9IzW5ITO3FxaXNT2/KTi7Iza7GzC1LzW3FRSVMzO1MTq7HTS3Fy6zFS2vKzm7Lze5MTGzHzS5FTG1Ey2xEyyvJze7JzW3ITa5FTK3EymrGS+zFxWXKymrMzi7ESirEyqvLSyrKze7MzOzMTCxKSepAz+/NzW3MzKzBwWHLzS3ERCRAzi3KyurNze3MzGzLy2vLSutCQiJAyytHRydOTe5MTGxLy6tLyqpKyelJSCdOze3NS+tLyupLSmnKSOhCwuLPzy9Pzu7Oze1OzazOTOvMyihOTi5PTm3Pzi1PTazPTWxOzOtNSunDQyNPzy7Pzu5OzKrNzSzNzGvNS6rMyynMymjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwGFhYOIiYQBAgMEAwKHiokBBQYHCAkKCwwFAZOEBQ0IDAsODxARCZ6gAAEGEhMSFBUWFxgZCJ+TjBoMEpkRERscGBGRih0BBAgeFBQOER8gISEfIruIIwEkCCUVwhcgJicoKSrZg9srCRkRGdMsLS4vMNiK2wIKMRsbMiwzXtCocSydIBs3AuCIwIFDiBMucugAoWvSiB2VNPDg0ELHwA0MkCXr4aNSggg8NoDIQOFHgBtAkgURMiDAEAFEVBCJFKCIkSMGOyDRkETJEkOFmABoUsRJQkQdnkzQACWKlBtTplBR6qopxkFRJ0ytYuWKFCxZtBBq+hRA2AlbRrh08fLlCxi1a51g+dQhDFwuYsaQKWPmDBpKXgNETaNGjJgyhNfcVdTTiWI2XpK0cePmzRk4YA5T5otGixY0qFOXbgXAQCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filenew-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBExOTERCRDw6PCwuLBwaHAwODAQCBOze1NTW1OTi5Nze3MTGxLS2tJyanPz+/Ozu7OTi3BQSFCwqLDw+PDQyNFRSVPTu7MzKxLyyrIR+fCQmJPz6/NTOxPz69Pzy7PTu5Pz29Pzu5PTq5PTm1My6pBQWFPTq3PTm3NS+rAwKDPTi1PTezOzWxMy2pPz27PTazOzSvMyynOzaxOzOtPTaxOzKrMyqjOzGpMymhPTizOTCpNzSzNTGvMymjMSihCH5BAEAAAAALAAAAAAWABYAAAboQIBwSCwaiYGAYEAgFAqGg/Q4DCASCsTiymgcHAcqQLB4mM+QiIQBppLPcMjkwQ4bB2X4maKgt4sVCHpnFhQTElNFE3mDDxcYGRp2RBuMgxwIHX9EBZZwHh8gCBmTQ52NISEiIyQlpUImng8hHyInKAgprwAqgnC0IKwrLLpGB4wctLYkwy0uuwd9Z8AnJywsLcVFx2YcL7UnJCwwLTEy0GXJoSgrCCwzNDTnxgjeH9UrKzXwNDY36LRGhEOwLx4NHDmgJbh3QoeOgv127EhojEeHDj16pEhRQoZHHzl+QJNCsqTJSXaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQWDCwaDDwmFPSubPzGhPzCfPy2dOSmZPzKlPzSnPzOlPzKjBQODPzChPzWnPy2bPSmXPyuZOyeXIRSLEQuFEwyHEQqFDQiFCweDKRuPFRSTPT29PTy9Ozq7OTi3Nze3NTW1MzOzMTGxMTCxLy6tLSytKyurDQyNMzKxOTm5OTi5Nza1NTS1MTCvLS2tLSyrKSmpJyenJSWlIyKjHx+fFxeXBwaHKxuPMzKzLy6vIyOjHx6fDw6NPy6dGxubLy+vISChCQmJNza3KyqrBQSFLR2RKSinJyanGxqZAwGBJSSlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeDAYqKiIeLj4wBjQCMhY+NkoiLk5qbhQIDoJyGBAUGBwgEo4MECQoLDA2pDrS1tKQPEAwHERITE77AvxKqhAQNDA8UFRYXFs8YBAQZGqGPxw0RGxwdHR4eHyAhIiMkJSYnKCgpBAYPEhcqHyssLS4kLzAxMjM0NTY3cBA4UCAHBw8gVnhgEcKFjhc7UPDj0cMHAAI/KFgY4YLFio/jRpTYsW8GDyCSCEQw2DChOHIqgsCQSEPIEEEEJFhAoUNECCJEyOk4d6KIyRtGcB7hIJKjixEjHu4oimSGEIs4d8IIUoKECnNB0ElMwkNJJgBLlJBAcQKGiR07KGAURVGViY0mhIwwSTKjr99+THjUoIg0r48hTRIrRtxkiOMhDgrZCQQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileprint-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBFxaXDQyNFxSTPTizOzi1FxORDw2NExKLPTi1Pzy9Pz6/FRWVPz29Pz2/PTy7PTu9OzezPzu5OzavAQCBPzy7PTm3OzazOzKrPTu5FxSRERCRGReXPTq5Pzu7ExGTMS+xKSmpOTKpPTq3JSCDNzSfHRydLyadOzCjOzOtOzSvLyyTMTCxKSipGRiZFROLPz+/KyurJyenJyWnGxmbLSabOzClOzm7LSutJSWlJSSlJyanGxqbNze3OTm5IyGjNTO1Nza3NzW3OTe5IyKjHx6fMzGzMTGxMzOzNTW1IR+hISGhKymrLy6vLSytERGRGxubKyqrLy2vLS2tDQ2NEQ+RASKBAT+BFxeXHRudAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAgOEiYqEAgQFBgcGi5MICQoLmAQDh5OEDA2YCw4ODxARApKUCaGYEAsSCRMUnQysCwoVEhYXGLOLCBCgDqK5GQUXGooCAhscBB0euBUZEAUJvQgIgx8gIR8iCSPiHuIFEREDJCXaANwhJhsnKCnWERcRKiopFCvsBywhQrRwQWGAPAz5EhpQ9wIABRgKYsiYMTEEDQocatiwkUIEP18fbkCAAcMBjhwzdOyQwYNCgBMfKJSgMItBjxs+btwgCSGGjhw/ZoRgQKGZCRMUPgABEgSIkCE3SZok8qNqkR85NtDUEcPIkaVAkCR5SrJBDCVKlmzQ6pCCiRlMTJo4YUH3K5AeMBYYWctW0BOaUH60cBJFypQmII6wyEpFQBVFMSm4UAI3hJUrOGh8oOJrklYKWIromJGDR99Ogz5j4ZGlM+pEnwmBCwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBGxqbAQCBLy+vERCRExKTHRydIyKjMTCxFxaXGRiZFRSVFRWVPz6/Nze3Nzm5Pz+/JyanDw+PExOTHR2dMTGxBQWFLSytHx+fISChOzy9Ly6vAQGBJSWlMzKzAwODJSSlHx6fIyOjOTi5DQ2NISGhGxubCwuLOzq7ERGRFxeXNTW1CwqLPT29Dw6PGRmZKSmpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb/QIBQGBAMj8ikUDAgFAzKKCBwQCQUCcICKh0SEAhGw5EIZAmBrgCxeDQgcDJWyz0GIggJfL+XGwQJRxNgC3yGDwwUFUZDFhdthnwMGAZNQwEZFwQakXANBBQbHIIdERIBnRAOiR4ERx8gsSEMBBmGCyEGG3YGBwcgIr8UCwQHECOgG4xCtRkEJAvBJRklJgkSFBQeJ68hJiEoESkFKiEZIbkGARsLlwEGExENGhorGSkpFAYm66NDLAECpGiBYsUIFA8wLHBBQMWLVkdUCFCwaYVFBOymkVCgYEMgOykEpICBccMBAhhELFigTEqAAgIIwCiQ4eRKDyS6EAlJIAI0EpaudF4iIKDAAn9CkRT5eMROEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fill-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/AQCBMT+xASCBMQCBASaBPyChASyBATCBPwCBARmBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAASCEMhJq704axB2DkLnVeAwiCNHDMWZcsbaul5ZyCaKBcZwFDcgDRNbHX7AmW4SMx2MSOFQQlitEAhosrVcDQQE7NMXzVGqA6xAgCUckabQpJoIYBFsxBspUKBiHQEHaoNvBQJTgBIBdnh5B4hLihONeJBTc0uMaphMS4uRGQYfny9EEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filter-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBAwKDMzKzMTGxNTS1MzOzAQGBLS2tLy+vKyqrLSytLy6vMTCxBQWFKyurCQmJBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAV7ICCOZGmeaHoGbKuOAjsQhVG764EgyT7YhaCBVQogFMhFImEABoUBknFxRDAazac2Kg00djystkA0sQ4BgzgYK6+Ch/bBseOmAmMD4gF5ifBCDwoRfiOABgyEhYYFCA6LUo19kH+Nj5QAaQh2kHibmJkFBJydpKCnfnYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +find-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQSFJSWlFxaXJyanKy2tLzCxDw+PHyChNTa3Nzq7Nz29NTy9Mzu9OT29Nzi5Oz6/Mzy9Kzi7Jze5Lze5Nzy9JyenIyKjHR2dMTu9Kzm7JzW3ITW3ISChGxubERGROz+/Lzq9IzW5HzK1LTm7FRSVHTS3GS+zLTS1DQ2NMzOzMTq7Lzq7ITW5FS2vMTi5ExOTKTm7EzCzEy2vEyutJTa5FTK1ESirGy+zMzi5ESerESmtITa5OTy9KTe5KyqrAz+/Azi3ASutERCRExKTFRWVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCggGFhYOIAAIDiYUEBQYFAoeJAweKhAgJCgsLDA0OCAGJg4wBCA8QDhENEhMUFaKDFhcYgwEJCxAQDBkaGxwSFaMAFh0eAx8AAQIKECAODCEaIiMjJJMAtQMlygEGEBkVva4mJycTKKMYJd0pyyoOKyssGhMtIycuGi/EMB/vlhmoQEFDjHsmZMygUUMdqWUCGgCbYMKEjRk3cEjI9jBADg3Wzs3QsYOHA2IdO1SQkI/GjRMtFhBA2RFBDwk+OASrMPMHkIe3AhBA8QLFzAAHgvyg2dEQMSEHPCwltQgooSFSmVpSxKjjh6wPtwINgHVqsVpWESEFeywZ17RkED2s40YEgFirlIq4SwvUQCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +finish-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBBxCXDR+nIS21Aw+XJTC1Nzu/KzO3Pz+/Nzq9Pz6/MTe7KTW5FzC1Nzu9CRKZMzi7IzK3Lzi7LTe7HzG3Gy+3AyuzAyexFzC3DRSbHy+1Dy61CSqzAySvAyStLze7IzO5AyGrEze7BRmjCTC1ETS3ETa5BTC3Bx2nAyWvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAakQIBwSCwaj8hkMqBsBgTN5IAAJQqqykCBasUmDQcEV3gtBs7oATihGJeJgcOCQWc0HA8Ig/seRiQTFAsVFhcYGRp6VH1CGwscHQ8dGB4fIBkPIWKMAAMLIiAjIJcgH5gkGSWcARIiJicoJikpHikoHqqrKiW8JSogKymoqgCrV8cCARgkuFWcRwYeqVjPRgEExEPVRQbZ2l5IBuBRQ0zk5+hRBkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder_new-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBNzaTPT2FISCBCQaDPz+BExKBDwmFPSubPzChPzCfPy2dPz6BMzOTAQCBOSmZPzKlPzSnPzOlPzKjBQODPz+rPz+3PzWnPyuZPSmXNyaXPTyhISCLIRSLEQuFEwyHPy2bKRuPFRSTPT29PTy9Ozq7Pz+xJyanDQyNPzGhMzKzOTi3Nza3OTiVBQWFDwqFKxuPOTi5JSSjISChHR2dGRmZFxeXPS2dNTSzNTS1OTm5KSipLS2tLSytKyqpIyKhGRiZNze3NTW1MTGxMTCvLy6tIyKjCQmJMTCxMzOzMzKxJyenHx6fLR2RLy6vJSSlHx+fDw6NLy+vIyOjAwGBGxqZKyurCwuLBQSFJSWlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLjI2MAY6HAgOHBJYEhJCDBQaDmgcICQoLB4MGDA0OAQUBDg2cAAcPEBESE6QUuQasFRYVq5SxCRcSCggYGRjIGgYbFs8bHIMHExIJGR0eHx7cB83PFhsDDuTUEyAhIiMjJCQluwEmvsAnKAcp1x4qKyUrLLupWrByxcnFiwQIYIggEaNEiRgBZMyYQaNADRs2REA6cCODBxw5+OnQgWMHjx4+BND4MQOIg1gI0gUREkTHiplDhhApEoCGkRlHBL3I8MEHEhz+WAhJogTJySVMfthwIehAExE5jubAkYQpESc8fOx4AiXKNA8+ekhBgqSpzh5hPHcsmVLjpSAqVZBY6VGkiJMiPQKLnTvjCiEsWU4o3nGC8YksMmT8YCmC6iAXKLRc2cz5yGYtR0JjKWQgEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +forward-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBBxCXDR+nIS21Aw+XJTC1Nzu/KzO3Pz+/Nzq9Pz6/MTe7KTW5FzC1Nzu9CRKZMzi7IzK3Lzi7LTe7HzG3Gy+3AyuzAyexFzC3DRSbHy+1Dy61CSqzAySvAyStLze7IzO5AyGrETa5ByixBRmjCTC1ETS3BTC3Bx2nAyWvEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaYQIBwSCwaj8hkMqBsBgTN5IAAjRoDBaq1aDggtMuAWDzoJhTgY+CwYLgZDccDwkgXI5IJZVGxXDAZGnR2QxsLHB0PHRgeHyAZDyFfVUQDCyIgIyCPIB+QJCUmlEMBEiInKCQnKSkeKSQeomoqJrUmKiArKSwZsmoCwMEBGCyxo1EGHr3HUQEEvltCBtDRAAbMW0zV29xDBkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +frac-22:actions actions22 22:photo:22 22:R0lGODlhFwAWAIIAAPwCBAQCBAwODAwKDAQGBIQChAAAAAAAACH5BAEAAAAALAAAAAAXABYAAANICLrc/iwEJSEUQA45LcOKMHWeU5XWiUYZsZClOIjj+naqrS9F7/9A326YCYBypREOpMPBVifjkBRw7SpIG+eJIg2IWC5UikoAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +frameprint-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBFxaXDQyNFxSTPTizOzi1FxORDw2NExKLPTi1Pzy9Pz6/FRWVPz29Pz2/PTu9PTu5OzezPzu5OzavAQCBPzy7PTm3OzazOzOtPTu7ERCRGReXPzu7PTq5OzKrExGTMS+xKSmpOTKpPTq3JSCDNzSfHRydLyadOzCjOzSvLyyTMTCxKSipGxmbOzClFROLPz+/LSutJSWlJyWnOzm7JSSlJyenOTe5OTi5MzKzASKBAT+BNzW3OTm5KyurMzGzMTGxMzOzNTW1KyqrLy2vERGRGxubIyGjLSytGRiZISChAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAgOEiYqEAgQFBgcGi5MICQoLmAQDh5OEDA2YCw4LDxARApKUCaGYDwsSCRMUnQysCxUKEhYXGLOLCBCgow4VEhkFF6mMAhobBRAcChUVGR0FCR4UCAiDHyAhHyIJCRAjHOUJEREDJCXcAN4hJhonKBjXESn5Kdkq7wcrQoRg0YLCgBMuRFxIwTCFgXYvAFCA0SCGjBkYQxQMUE8EBhEUVPj6QOMBDBgLLM6oYYMFhYkvYcSkwOAGDho3TyqIUaPGyZ9AKXzIoWMHDx44bvQ4+WAi0KA1fPwAEiTIjyBCkDp9KlMiBRMzhhAhsqLsD64/fQEo8tLIERZIH8Ru5arow8skSmTMDdpJQ0y0XTsJ2gtU8GCZMBMbCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +funct-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI+hI+py+0PIwhUohpMXfl6103h1nTUNproEU6am62v1pLsPX/siO9Jiou9TD2XyHfMGUs65aVmiUqn1CrCUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +gear-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFCQiJERGRBwaHFxeXHx+fDw+PGRmZExOTGxubKSipDQyNHx6fIyKjJSSlJyanISGhISChLS2tIyOjHR2dAwKDAQGBJyenAQCBCwqLLy+vKyqrAwODMTGxKyurFRWVLSytLy6vMTCxMzOzGRiZNTW1CwuLMzKzFxaXJSWlOTm5Nze3Ozu7OTi5Ozq7GxqbDw6PHRydAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb/QIBwSBwGBMVkMjAgFAwHBFJpPB4SiQJCsWAQqEJB4prdNhQNx7QYIFwLD0ikQZdMHgelOPGYULQVDg4QEAVfRAEBBwUTEE0WFwcYhAuNF0QDBQULDwwZGUIaEAuVGxgBRAIFEhwHHUQMCxwTHAVrAAwFFRwKFkQZsxseDqBDGXMSHwfFQiAhIiMeJApEBwcOcahDJcLSJCYcGkQKcRAnQhkF0SgmEykHXkObox8q1iEjKN8rENqYD7MmeBCmzwSLFS1I3AqzYIPDESS+sWCxgQMLEgOSJKjozeAKFyskCDigQFwSBhJMjDDhAlyLFyVA+dIzAUUKEi0eaNhAIg8YGiEMenkwASNDDBkLqRQAEEAkup9KDkEFgC4IACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +gohome-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQiJNze3ERCROTi5MzGzLy6vDw6PKyqrKyurBQSFGRiZGxqbGRmZISChEQ+RExKTExOTHRydDQyNOTe5FROVLSurCwqLMTCxPT29Pz6/LSutFxeXLyytLSytPz+/JSWlKympPTq7KSipNzW3BwaHHx6fKx2VJRWNHQmBFweDOzq7Ly+vNTW1JxWNLSajPTe1Ny6pKxWJNTS1IyOjJRmbPTi3OzKrNSSXMSGVHQiBHx+fJSSlPzy9IxOVOzWxOSyjNSCPLxeDJyWnIRGTOTGtMxmDLRWBHwqBIxGTLRSDDQuNNSunKxKBGwyNMSafMxqHMReDKRGDPTu9LxuPLxaDJQ+DIR+hGQqNIQyBGQiBNTO1EQKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAYSIiYQCAwQCiokEhwACBQYHBAiQhAiHlQYJCgkEC5uCkp8MDQ4NDwylmwgQlgQRERIEBBOkmxQVBgQWFwUFFxEEDLyJGAUZtQoFGhsFHLYdyoOVHsEf0SAbIAUex8mwlAUhtSIFG+3uIyTWvAIGJMEkJe76GyXbEeWUBJg4USKaBhQpVKzYoIFFiwYUBBJa8MAFCw0vYMSQMWOhBhoTKCQSUKMEiw02buDIoWOHBg0GeIhEFKAHDR8afgAJImSIioYliMws1MPkhiJGchxBkmTDCBo1hg4KQMTiBiUyhBxZ8pNFiR5MEtU0WqSJVidJNDyNKraHC5xPNKBEkTLlJ5WvUgWNvfikyhArV34+7ZEXQAAsB2iUyHLlihYtW0pwOYAFgyJDmDNr7jIIWiAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +goto-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBBQSDAwODAQCBCwiHDQuJExCNFRCNAwGBDwuJEw+NFxKPBQODEQ6LFxOPEw6NCwmHDQmJBwaFCQaFEQ2LCQeFDwyJBwWFDwyLDQqJAwKBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWSICCOJBkEQqmWA1EYR4Gsq5Aoy2EYKU0yDcPCkSP4SgShw2FoDI6jQeNxYD6MUBFCEXxAelkRgxCRhEWQiW/wXE2CataAUmiXKo+Fwg6YWxQWfCQEAxckUgoYDRSCR4gKB4ZnFVwUCgUMZ30KCRQUhJpzBRQQjUcSnmyaM32mPgQNmZpRBwmSsxAZBBqzUa4iBiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +help-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBCQuNBwiJAwiLAwaJAwSHAwSFIy+3ERynCw2PCQuPAwmPCxOZCxWdJzG3FSazBwmNAQKDAQGBDRmhBQyTDxujDR2rIy21AwWJDyGxCxmjAwmNDRihAQOFDxmhCxunBQWFAwaLCRahDR6rESGvDQ2PCRWdDRunDSGvCRSdAwWHCwuLDSOzHSmxDyKxBxCZBwqNHSu1DyOzAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAahQIBwCAgIBAPCoGAgOoeBAyKhWCwYDUf0CX1AIhLiJEGpBLiAAaRxdgYsl7Ybk8igBZoN5xmAdDxoanp8HyANISF8EBsiXBMjJBolBEQmGHFoRScbKHIKDykqK5lFAZRCnyknTaROLA8tq61OChgtKqyzQgEYEJi6UC4vI3LAASkbMBPARAEBdszR0sACEaPSMTIQM8W6KzNl3bo0NOJDdEEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +int-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBIQChAQCBBwaHAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANJCLrc/iDAuYKlU0r8NHfXB24iEyrCIAjAynakQLQuDS+vrTcnI1M9HyaIykFOKwUhZ6zEWC5oU9GrRY+kkqdUiXCdWW74SzYkAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +leftjust-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIihI+py+1vgpy0Tohzs1T7z3CiBJbQWJnqg4rre7jwTBtGAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +locationbar_erase-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBPz+/AAAACH5BAEAAAAALAAAAAAWABYAAAJChI+py+0PX5i0VmbzVboHPgmCJVoJJY5haR5VGsCa+6ZqZ2Sy95E2n0OVdi2A8EacIIS+YpC3WUIpi6kygs1qsYYCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +lock-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBHRudFxaXExGTERCRAwGDGxubPz+/Pz2/Ozm7Nza3NTS1KympFRSVHR2dNTO1JSSlKyqrKSipDQyNMTGxDw+PLSutKymrMTCxAQCBHRqLBQODJyanDQuFFxSJFRSJFRGJERCHExCHISChHxyLEQ6HGRaJExKHLSmbLy2fOzitPz23KSiZHxuNHxyNJSOTNTOnMTCjLSudKSaXJSKRJyOTOTetNzWpHxuPOTi5MzKzLS2tFxWXOzq7Ly6vOTe5Ix+RLSqdNzSpLyydKyqbKyiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBAgMEBQKEjI0GBwgJCgsMDY2XjwkOAgQBDxCLl4QNCaGCBBGWooINCAqqrBKgqwATFKaDFRYVtBMXsIMNGBm0GRADjQIJxKIaGxwdHh8gISIhGyMZzIwkGholJiYfJiAfJyEZISDbg90oKCkqKwcHKyooLC0f7IIuLzD2YMSQgW8GDRri+AFoUMOGvRsxUhSsQQPHvmQSchyQtEAHhh0WJHDQcJERjwsKDvRI0BGDjwgicXhQyCOjSgUKPO6AObIkIQESfmxk6REDT4s0bfaYpDNkT4VAha5s+TLmzEYtatwIOHAiDZIKNQAJYk9IjCFEisyoocFEB4UACtBpm0t3LiF4gQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +lsub-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAWABYAAAI9hI+pe+EPHTNhgjox04srn4CI2FgkZaaZurGd+5nRfAiCYVuJzfN6jbvdfrshEZE7ApNGXa+nZDaVVIOhAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +lsup-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAI5hI+pF2G9YpszKgcgtgtyuX2I44UcRYkM5qmWAMcyzAn1/eKRnfe7vuD9fEGgQlgkHo2JmRPpStgLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mail_forward-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBJR2dLyijPTixPz69Pzq3Pzy3Pzu5PTu7Ozi1LyelOzavPz+/DwqLLyafPTmvPz67Pz29Pzy7LSWlPzmzPz6/LyajPTitOTSzMyurPz25PTatPTi3KyOjPzuxAwqVDQiJHxiZPTetKySlPzqvPz27BQ6bAwmTPTexLyinNzGxDRunPzy5KySjCQ+ZNzq9KTO7JzC3Nzq/Ozu/LzW7FSm1BR6vGSWvFyq1AyGxAxytAx6vBSKxAxSjMyujLSunES+5BSi1ByGvAQCBNzCrOTaxNTOvMS6rKyelCx6rBx6tBQKDOTWvPzu1PTq1OzezAQOHAxGdBROhAQGFPzy1NzOvIRqXLyynOzarPz21Jx2XPTWrLSShAw2XKSCbPzuzAwePAQCDPzyzPzqzPTmxOzWtAwGBKyObOTSrNzGrKyGbOzatEQyNKyCZOzWrOTGpNS2lCweHCQaHCQWFBwSFBQODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBhBwgQKFSpY0HgBQwYNGzh0mDhRAAUPHziACEGBpYgRJDiUGEkSwoCQJk6opNASRQoOFETQJDkggwoOJlYApcCihQuVL2DUhBDjhIqjJmRwwDCDhswaNm5MjYHjKggOOU7o0CGTA9gdYknG2KCCBw8VJVL0uBgihAUfP+CSNGCjsI/DiBPbAMJBsEQbQYQM+UG5smUiRYw0jlvYxhEkSYyIHm1EyRLTTH40EZvAyZPOR4pAmU07ipIkUKQ0mQIhAZUqVq5gKXzkSBYtyLVEyd1ki8QFXLp4+WJFQowbYLJnD5NbzJiJCjaQnhnvpYwZM0/OPFlvQ/f3iQvQpBlvQc0aCWy4VKnCpY0Y5yQxgEYXZFjghgwZUOHGCW90YQEccUwloBwGyjAHHXUoSAMZb0xhx1QOoMHDHSfIwSEOdTjhAQ1d4MFbTQ6Q4MYacrzxhhx04JCHHhvQsMeLJPHRBxpr+LHCGnusgccfgKixQR1ATtTBlDDAEIggggxCCCGFbLGFHVFKZEdAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mail_generic-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBDQyNCwqLCQiJBwaHBQSFAwKDAQCBDw6PPz+/Pz69Pz27PTy7PTy5PTu5PTu3PTu1PTq1PTqzOzmzPzuvOzitPTmvOzivAQGBDw+POzevPz67Pz25Pz23Pzy1PzyzPzqvOTavERCRKSilPz21OTevIR+ZExKTOTi3JyanLS2tPz6/Pz65KyihJSKbMS6lExOTNTW1JSWlJSKZMSylNTOrNTKpFRSVPz29MTCxPTmzKymjIyCdOTWxOzexOTWrBQWFFRWVOzu7MzKxJyalOzatLSulMzKtOzmxOTarFxaXKyqnPTmtIyGdIR+bOzetOzixBweHGRiZOzm3NzWzNzSrOTetGRmZOzizOTexOzm1JSKdGxqbHRydJySdHR2dOzapHx6fKyijOTixCwuLHx+fFxeXERGRDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLAQECjwORAwSUBZYFBpkHmwgJCgsMDA0OD6UQERITFBMVFhcVGBkangq1ChsLGxwcHQ0dHR4fICEGIiMSCbS3uLq8wCQUJSYGJygpKhQJKyvLLM4Nwi0uLwUwDQsxMtmeuQveHR8UMzQ1NgU3Dgo41jk6ns0cKOzgYaOHjx9AgjTAUUvIECLZNmxoUISHkSM9KiBJQkCJA4kKEoBQoWJJAiYtmjh5AmVCsCJRpHzckKCCySlUUvBYUqUHDysSPnxIEuXKA5pPRiRwxwFLFhRaIEDYUoEChCcDuECoOWKFuwW7nHkg4WELkw8/BHRRwESpt10dU8SSHevlRxIBX6C0WBE27q8GZMkKbTADjIAwYlb4GLMYShYoPTRo6FGiSJEKPyzMIFMmzJcvXbhwkSLFjJkbQW6cOHNGhAgEAdAsmk27tm0ABgIBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mail_get-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQ6bCQ+ZAwePKTC5Ozu/NTi9GSWvAwSJGSu3JS+5CR+rAQOHPTy/AyKzES23AwOHCw+bOTq/BR6xES+5AwmTBw6ZMTW9Ax6tByi1BRGdAw2XAQCBDQuNDRupKzS9FSm1BR2vBym3EzC7CSGxBROhNTW1Pz+/OTm5NTO1AQGFNzW3Ozq7Ozm7IyKjJyWnMzOzNzq9Nze3OTa5Ly6vCQiJGReZISChKyqrAwqVBRWlOTi5MS6xJSWlNza3OTe5Ly2vGxmbKymrIyGjMzGzISGhKSepCQmJDw6PHR2dJSOlPTy9MTGxLy+vLS2tMzKzLSutMTCxLSytKSipJyenKyurJyanCwqLCwmLCwuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBhgIBA4SLjAABBAUGBwiNlY4FCQoLDJaNAQ0ODwsQnYwREhMUE5ylFYYRFhcYGRgaGxsDHJUdFR4SHyAhEyIjJCUcuo0cJr0nExihxgwoyYscKSnMHicOIw4lKissLdWDHC4vMCu9McYqMjMyNOUANTY3OPEoOTolDCszdrSgwaMcBxs9TMxYOCMHBx8zfPj48QNINQ5BbMBIIUShDIUoTAhR94PHPEEHbQwZckOGjBQviMxYUWQIDCMmdXE4gqRnkiFETAxR8iKFjJU2evZEdmLJkgJIbqS4wXJIUapImj5FtuSEVyRVV1IVi4RIChhEkLVAgcJHEqVwVJUmYdKkiRNkALMRecKECRG/ff8CEQJFCA5kMKJEoUHDCQ/HkB9LmWKECpUeyKoIMSLEyosen0OD7iH2xg1dV7BkqXGlBpbWNTq4Zn2khu0aAAwEAgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mail_replyall-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBLyejPTixPz29PTu3Pzu5Pzy7Ozi1LyelPTavPz+/DwqLPz67PTetPz69ERCRLSWlPTmzPz6/OzexLyajPzqvDw+PDQ2NMyurDQiJPz23PTatJyenAQCBPTevPz25LSajOzq7HxiZPTexPz65JyanBQ6bKSmpBwuTOTi5OzaxBRCdHySvGRiZHx6fBQSFERGRNzq9IyOjHx+fGxqbPzu3BwaHFSq3Aw6XAxKfPzy3Gy63ByWzJzO7Mzi9OzavBRytAx6vCSazGRKTPzy1AQKHBRGdBRyrDy63ES+3Cym1CR6rBwWVAQSLAx+xCyCtBRmnPzuzAQWLAwePPzyzKSCbAQOJByGvOTWvPTmxBQODFQ6PPTWrPzqzOzatAwGBKyObLSWfPTivKyCZEQyNKyGZOzWrOzWtOTSrOTGpNS2lJx2XDQmJCweHCQaHCQWFBwSFBQKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpkzGjhAoYMGjZMpMghQgcNFjh4mODhA4gQGkSIHAmBwAgNJEpo8KDSxAkUGjhMSEGz5gUVIiKs2PmBRQudHiwQpUnAxYsXImB0aBqjBcuoU0fKmPGChgUNH2qIqGHjg9u3bicWIFs2rYgbNnDkyGFhb8cccQ3ouJqWQo0dPFr0WMy4h48LFj4gsKriB5AeNngEaSGks+chPnwQOXFAh4oXRYxk9nAEyY7XO2wksWHDx5ATCDIoUXEBsYclTJo4cWJhuIjhSXacSPBEiZLMQY4wgRKluvXqUpyIsDElAxUqVaxcwcGCPQuWLOixaNHCZAsXBU+oqKDSxQqULF6ifNmyn/8VMOtxwcAK36kQRhdJQIFFEmKM4eCDYGyhhYAEkqFEGSuYYcUZLaDxXRpqSNRCEu6twYaFZXTQhgRd2NCCG9918AYELTjoXgNuKAFHB2RQEUYHVbQQRwlUpPHGGFwkyQUEDsgxx4lh9BhCBy2U8UQJcrSg5JIQ0FEHG3bc0QGYK+CRhx57PEGlkhM9sAEffKTQhx9+/AEIIIGoEUgLLRRFR0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail_reply-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBMSihPTixPz69PTq5Pzy1Pzu5PTq1Pzy7Pzu7Ozi1LyelPTavPz+/DwqLLSajPTetPz27LSWlPzmzPz6/PTexPz67Pz29OTSzMyurPz25LyajBRCdPzuvDQmJOzexPTevOzq5BQ6bBwuTDQiJHxiZPz23Pz65LyinPzmvBxCbHySvAQCBOTi3OTq9CweHOzaxFSq3Aw6XGy63ByWzJzO7Mzi9OzavNzq9BRytAx6vBR6tPzy3AwOHDy63Ax+xCSazCym1CR6rBwWVOzizAQSLES+3CyCtBRyrBRmnGRKTPzu1MzGtAxKfAQWLAwePPTizMy6nByGvNzWxOzWrNzOtBQKDJR2ZNS2lPTmvBQODPTatKSCbOTaxLyqlAQKHFQ6PPzyzPzqzPTu1PTivOzWtKyObPzuzOTOtLSWfPzqvAwGBKyCZPTWrPTmxNzKrEQyNOzatOTGpJx2XCQaHCQWFBwSFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYuIDBQgYNGzh08DCR4oQPIDqEmDBhJQYRIzqQIFkSAoESJCKkDGFiwgkUKTpMwECz5IASKjqsSMlSA4sWQjG4qGnzhYoQSmF0iCFjBgmWGWhQrVHCxg2sOHLo2MGjB0sLYmsWQHq1p4wdPtqemGDhB1UDQFSouKHi7oQgQmSwUMyYxcQDZQWz2EFiCJEiRoyQyLzZyGIIB47YKLwDSRAiSZSoXq1kCRHNLBK8YGKjCYskTp4ogeKkt+8oUaBImZKAAxMmVKrctqL7ihTnz7FkAT5FC4cKFbZwadIFdxcvX8KLss8iJcoUBUcq2KgAJoxyMTy4jCFTxoxEHl2GLyCDncmWM2hUIQMPY2CXhhoTfTEcA2tgVwEba7Thxhs88FdBD/ZB8MUUHMJBRhw2sAGCHBKU4UaFc1RAhxnhcdhhHUzYAUIcFdxRAh4R5KGHinu4OIVEDqTBRx81xhGHHzD8wQYQetDRI4cTAcIHGWT0EQgZa1ApCBqDcBAID1Q94IEHLtBAAyGEFGKIIWqYYQYPYNZkQEAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail_send-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAIR6fIRydHxubHRqbHRmZGxeXGxaXGRWVFxSVFxOTFRGRExCREw+PEQ6PDw2NDwuLPwCBLSijOzixPz69PTq3PTu5PTu3PTu7OTi1KyelOzavPz+/DQqLPz67LSafOzetPz27Pz29KyajPTmzPz6/NzSzLyurCwiJPz25Ozi3JyOjPzuxBRGbAwSHOzexPz23KSSlPzqvBROdISavBxSdAwaLHRiZLSinNTGxMy+vBxGZNzu9BSGrAwWJMSyrKSSjFy61ETO3BRWfPz65PTqzHTK3ByqzBSWxEzW5AQWJOTWxBRCXOTu9BSOvDzO3ByavBRKbOzaxOzizKSWlCQ2TAQCBJza7BRWdNzSxJSCbMzq9BSOtCSKrAwiPOTavPzy3LymlCySrAwmPFRKTPzy1NTGrPzu1JR+bOzatPzyzCy61ByGpOzWtJyCbPTmvPzuzIS+3FymxCSuzBR6nJyCZOTWvKSObMSujOzivAwKDOTSrNzKrJyGbDwyNOzWrMy2lIx2XBwWFBQSFBQODAwGBAQGBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYqMDxAoYMGjZwmEixg4cPGzqA6BBiAggRIzaQGEkSwgAMJCKgnNBhQogSJlKGOFHTpgYUG0TsnJBCxQoSE1i0KErAxYsOJJRuuAAjhkwZM2jUqGnDBQoUHTbciIEjx4YNOmbs4CGjB8kCZlGAALHBx4+YcTcACcJDyFSJBo6iGNIhhQkiG8BOKGLkCBK6SSQisHoWhZIbG5bMYALECI8mTZw8gTL1QJQXZ6VMiUylSpUlVpoYaXLFtm0EGmCjwJLlA2O9MrRsccKlC8kEXr7AdgEmwtkhX2SQ2BIkjBiSYzSQr/nyhUKZLIrJJOcexvlEBV7IvCBjRkmAMzHOaufhxDvJBWiQISAFxUUQQRovJNeEGmu4JxEDbKQhXxsfuFDGGW68IQMcccgxRxUkNRDhC3R8QMQIdZwXQ11JJGFbiB+QYccHaaTxhgt13OFBDGTgkUdRDrhAhx5k2JjGCB/swYcXMXwAYk190OGHHx/4wUaVepTxByAaoPEkSQ5wwMEJZAZipiCDDJIHIYV8OZEdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +matrix-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBIQChCH5BAEAAAAALAAAAAAWABYAAAJHhI+pyw0Bw4sTVmmw1C/3/20ex2VUtJ2Uwx7oBb9eR45ziNfgy6tW2+pZhJicjXbTiZA7X2q4AjqIsajSuDsuty5n9SddGAoAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +message_get-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBFxatHx+/Hx69GRixFRWtHR29FxaxHx6/Gxq9ExKxGRm/FRW9Dw+xFxavFxazFRS1ExO9ERC/DQy5CQmzBwaxBQSpCwqLMS+xBwatExK/DQy9CQm/BQW3AQCjJyavAQCBMzGzAwOtDQ21DQy/Cwq/BQW9AwK5JSStOTi5AwKDKyurMTGxLS2xISGpNTS1IyKjJyanMTCxAQC1MzKzNza3MzOzCQiJGxqbHx6fKyqrLy61NTO1JSSlNTW1NzW3Nze3HRydKSipISChDw6PLy+vFxaXPTy9ISGhPz+/Ly6vLSytJSWlHx+fCQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBAgIDBISLjIWHiY2RggWHBgeSkYYICQqYjQUICwwNnoMFDg8QDBESExQVFpgXGBkQERoSGxwdHh8gkiAhGCIjJCUmJx4oKb+NKissIS0iHcgeLi8pzI0gMDEyLzIiM9c0NTU2zYQ3ODk6L/A7yvDnPBjqgiA5PTYvPvU+fvh4AeQFDXwgggTBwEIIOB8sakB0iO7gIH05hvToIeQFBo4eNwoJEaIZiAtEUgbhWGQjRxk9hhhJSeQXiCM4jxBxyXMjEiI5bR5JQnRnT5dDiNCgIcNmCiBAfAShSZVmECVKltgc+MIGCxlgw4pdskKHEJtMZRTJuqStW7dCImLEYGLTrJC4PeYy0asXxpAhTZpdGHzBSWHDiBPfWCzIQCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +misc-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFCQiJERGRBwaHFxeXHx+fDw+PGRmZExOTGxubKSipDQyNHx6fIyKjJSSlJyanISGhISChLS2tIyOjHR2dAwKDAQGBJyenAQCBCwqLLy+vKyqrAwODMTGxKyurFRWVLSytLy6vMTCxMzOzGRiZNTW1CwuLMzKzFxaXJSWlOTm5Nze3Ozu7OTi5Ozq7GxqbDw6PHRydAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb/QIBwSBwGBMVkMjAgFAwHBFJpPB4SiQJCsWAQqEJB4prdNhQNx7QYIFwLD0ikQZdMHgelOPGYULQVDg4QEAVfRAEBBwUTEE0WFwcYhAuNF0QDBQULDwwZGUIaEAuVGxgBRAIFEhwHHUQMCxwTHAVrAAwFFRwKFkQZsxseDqBDGXMSHwfFQiAhIiMeJApEBwcOcahDJcLSJCYcGkQKcRAnQhkF0SgmEykHXkObox8q1iEjKN8rENqYD7MmeBCmzwSLFS1I3AqzYIPDESS+sWCxgQMLEgOSJKjozeAKFyskCDigQFwSBhJMjDDhAlyLFyVA+dIzAUUKEi0eaNhAIg8YGiEMenkwASNDDBkLqRQAEEAkup9KDkEFACUIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +move-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAI6hI8RyJ26nAQQzlbrdWrP7nHRNh5gwpxmaZxWylJdRtf2fcux2rr7n8LsQrxQzyhE9mhIplKjPE5wBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +news_subscribe-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAASC/Dw6PAQCBHRydPT29GxqbCQiJPz+9PTy9JwCBKwqLPz6/GRiZERCRPz+/FRSVDQyNBQSFBwaHDQ2NKSipJyanHx+fMzOzNza3FTCFGRmZCwqLAwODLzqpCwuLExOTLzqrFTGFAQGBES+BETCBEzCDDSqBBQ+BLTqnBRCBFRWVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb0QIBwCAgIiMgkckAoHJVQgEFAOCCc0WThcEgoDgvGMztFJLiJ83Ws3C4ODIY1jUCIlQ0Bd+FwMLZmCXV3Qw8CCAICfW9wBQhddVgAEIcCCwuJDlxWBQx1AhFPjlyJlwISj1ZWBJQTAImIerGqVwgEiAwUR46ysAeJcKoEoYkTVLGPvrWVDBUWEwEXF1aziMGfAhhiAhAVFdKPyMux2YkAEc3fF3WcdQTAGYkQQxAF3uAIGggbCBwCHfEEeEBiIB0+BB8cgHAQogMIKPXurRMxgkQJExjZELT3jUGDEyhMpDhxIouUOB8qqAhZ0iS9CJMStTQQBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +next-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBOze9ORy7Pzy/PSi5LQCvNSG1JQ2nNx21LQCzMRGzNRy3KQCpLwKzAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq704axC671WAfR8VCOKUbudApCBHksVgHO+5agFiHwVBAuYZ+RQLBmLHatgMS8mMyREsDI7oRipEeLWsKVG8Fce26EspzeaR2vDQNE7PGCIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +openterm-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIcAAPwCBAQCBPTy9PTu9Ozq7OTi5Nze3OTe5Nza3NzW3NTS1MzOzMzKzMzGzMTCxMTGxOzm7AwGDBQOFBQSFCQeHCwmLCwuLDQyNDw6PERCRFROVEQ+RDQ2NLy+vKSipISChGxqbExKTOzu7OTm5Pz+/GRiZMS+xLy6vBQWFLy2vCwiHFQ+NMSmfNSyhIxmTDwuLJx+bLS2tCwmHMyyhMyqfPTqpPzyvLSWbLSWfPzitIx+ZDw2PAwKDCQiJGxWRPTmrPTerMyuhPzqtPz63PTWnPz6zNy+nIRiVDQuLKyWbOTanPz21NS2jNS6lDQqJHRaTPzmrPTSnPzyxOTClPz2xNSuhPTqxPzuvOzSpAQGDOTKnMy2jOzSrPTu1NzKnOzOnBwWHJRuXLSWdPTatPzqvNzClCwmJOzSnOTOnPTuxOzKlOzerOzarOzitJR6ZNTO1IxmXPTWrNSyjPzOjPTSpLSehHRqZOzirOTCjPS+fPzGhOy6bOzKhGROPMy2lPz+1PzmtKRyRHRiNNTCdPz+zNzCjEQ2NKySdDQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAj/AAEIHEiwoMGBARIqXMhQIUIBAwYQIFCggIEDCBIoULBgAYMGDgIIDEBAwMSKBRBk3NjxAciQIwdACBBBwgQKFSxcwJBBwwYMHBx0EAmA5EwPH0CEsCChoYgOQ0cSGCHhA4kSS5syJGDiBNEAFVGUKKEBAwWFFM6SNJHi64gDFEKE4FBBggoKK1i0cPECxokYXw0gsECYggQZM2jAqGHjBo4cOtqOxLhDAg8ePXz8ABJEyBAWRIoYOfJipEoMCZEkuaFkSAslS5jUGJKkSRAnRREo0JDwCZQoTKQAmUKlihQrVa5gKZ1lI+oAK7QM2cJlSZMuU4Z4+TJEx0iNOwKAggkjZkyOFmS8kClzpcUQLRRGbjRD4MgZNEzSqKG+ZgobI2248dUbDDDwABzcxSEHEFpgEcUcdMRRhx1fFejAAx0cgcYdSxiBRx566LEHH0d8QFRRNC3Uhx985CHEH0MAEkhCBxWkgiCDFEFIEYUYUmONMhyCRxVH/PgjBYioYJAdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +paintbrush-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBMTC/AQCtAQCdPz+/MzKzOzu7KyqrCwuLAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARZEMhJ6wxiDMsp1lvHfRohWuRAmOeVlUTQSukqz3U8A/nd9rtCAWTbAQoGg0q3OyANCOYPA0UgfCdMJnHFimre72sZ7pBWiTLqRUirK5hV7A0P2O3GvD5PjwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +paren-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBBQSFCH5BAEAAAAALAAAAAAWABYAAAJThI+pGou9oDuS1hlqnkxu/niVQB6kYHzAiJYoUK7paLrxpr6GMJjWeqlFGirEaQhcDHQJnEQX2/1kMBv08Yu1ttNkFRr1ikHjIiYYjDjSWLIbUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +pencil-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/IQCBPwCBPyChMQCBPzCxAQCBPz+/MzKzISChKyqrDQyNEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARYEMhJ6wxiEMtpIAWxddwXiqRlikSQeiAbuC+wirNR322gv7zcLobzDU+9XypoBBKTR1lz+RTWDgip8nUwZK1XLyIx5XoVicX2RUAo1DVKi7GOBxjxfNwQAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +percent-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIzhI+py+0P4wkU1XfDhBdo/zndF4qh1pkGKYFk2XpTqoJr9G5YfmOz3hixfBZa7IhMJg0FACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +player_eject-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAwKDJSWlFRSVBQSFKymrOzq7HRydERCRPz+/MzGzISGhJyenKSmpGxqbJyWnJSOlKSepLy2vIyOjGRiZPTu9IyGjLSutFxaXExOTHx2fGReZAQCBAQGBBwaHCQiJLSytKyurJSSlFxeXNze3LS2tIyKjFxWXHRudAwGDBQOFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbVKFQsGItBdBhpgh4PxIJvRC8cA4oiMy8bvQhJhMAYTFBVOURAWEw0QFxcMERAYCBluVxobDxkVHJocmBwEGgmEQx0dHh0CpKmkH6odVlanBR8FtAIFtiCkSB0LISEiGCIGIxAPDySuRwIOBwrOzwoHJRHJRh0jJgMj2gMnERQUCNVFHQQoCBvo6CkICATjRB0qp7b1K6qv+foyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +player_end-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTCxGReZBQSFOzm7AwKDKymrJSSlFRSVCwqLLy6vPTy9OTe5Ozq7CQiJLSytOTi5BwaHPz+/HRydMzKzKSepJSOlKSipJyanIyGjIyKjKyurISGhMzGzJyWnHR2dISChIyOjLSutDw+PERCRHx6fJSWlIR+hJyenGRmZHx2fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8ikMBBQKgOCgRMZIBSkxYHWoDVWD9EigpBQLLBERsPxCA8NDUhjgTBGJJNGG02RVBQWdUV3FxgZe0IGfoAGdhoXGxwdiAYef4FGFBoeHB8dGSBRihUhIo1FBhkbIyMkJRYmAwYal4JEBh2RChIWJ1IIGxUZFqdECCgkHR6wWAYpFR2YWSobvL5vFgfDaEMDIivMRBEsD9HcQgMWvecDLB0tZ0btsfJa9vLXU/X6/P3+b0EAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +player_pause-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBAwODMTCxKSmpJSWlFRSVAQGBBwaHLSutOzq7Ly6vCQeJPz+/Hx2fBQWFGxubLSytJSOlBQOFAwKDJSSlJyWnIyOjHRydNze3GRiZAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWBICCOZGmeaKqubOumQSDEgRjPMSoMRGEcol3vh0IkFAtDDWBEKlGMRKPgEIii0yrqIS1ArADu9KuLNCSOSdCMVp8ohEZFC4DL6SaBpXGh6/l4JX8XZACDhXkYCn1LAoqMUBAZEhBLDJKUSyYBGmhPAJyemiU0NDaloy+qq6ytI8whACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +player_start-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExOTAwKDAQGBJSSlHx+fBQSFMTCxKymrFRSVOzu7GxqbLSytLy6vJyanPz+/GReZBwaHHRydKSepKSipGRiZJyWnAwODLSutKSmpISChPTu9ISGhFxaXJSWlIyGjJSOlERCRIyKjDw2PIyOjLy2vOzm7Dw6PLS2tCQmJOTe5GxmbDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa7QIBwSCwaj8ik0hgQLJGBgbMoqBIKU2LAcMgOEQmFYeEFbBmNMgDhYDwWBC0k4pCoJ46IgRIXBioRCRYXamwRGBQIfgaBFhiERhkaenxmCoEbBhyQRYaIGVsdghgem4UWegcEBB8UHhsgIaZGBBgRIpUIIxQhChginEQIIBEklWslFyYnBsFfFCi4WQgpFBwqFxNGKxcsxl4IAS0NZEYCF3vlwgEfUuZV8JEuI2pPAARN9kcE9fr+SwaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +player_stop-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAwKDBQSFBwaHCQmJJSSlISChJSOlJSWlGxqbGRiZNTS1PTy9Pz+/Ozm7OTi5FRSVIyKjOTe5MTCxIR+hExOTHR2dLy6vLSytLy2vHRydFxWXIyGjIyOjPz2/FRWVHx6fExKTMzOzJyanKSmpKyqrKSipAQGBLSutHx2fDw6PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcslsAgKCAWEQjQ4KgSwyYDAcugZEQqFYYJECA6PhaLcfEEUkgJZAGJB8fkKpWOhHAxcOGBQZGBoaGQgbHIBGAhUOGR0SBxISBh4Xf0iCHxQSlRIIXhsgj0UCIaCXmJgHGyKpRJ+hmB5dHQqOaCENIx0epBIkBhdzngoPGCQlJifQJBvJRygRKRcKGxcXGypys1srEREc5SLnICLiR1koLFVUWfRO9vf4+UwyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +prec_minus-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBKSipPz+/CH5BAEAAAAALAAAAAAWABYAAAJAhI+py62RgnRnGguZ3BlTYIHdl13jh3goFpIleggvTK8ctw76Pswav/MtAkCd8NHj9HLFY6S4JEGdqdumtjAUAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +prec_plus-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBKSipPz+/CH5BAEAAAAALAAAAAAWABYAAAJHhI+py22hgjwSonktxBZU7GnhkyXc6JmmeDpnG2lg1YCOInT3zrvfxwsMhsSBrkYUDo8MpTEZNH6M0SV058xWi1Tsj9ZjGAoAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +previous-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBOzC7PTq9NSG1MxW3LQCzNRi7MRGzLQCvPz2/NRq3ORy7HQCdJwClAAAACH5BAEAAAAALAAAAAAWABYAAARUEMhJq70Yh813rl1HheInBYIwrEJwktxJFEbRmuOBJIXivp5LQLcj+HCnBaPBMBhdMBBjw0w8ccEA0/EzdQHaHywmnIyDyDSIrG4LQ+64OSqvx+kRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +prod-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBIQChCH5BAEAAAAALAAAAAAWABYAAAI7hI+py+1/gpy0hlVRZlP19mmSE0YjeIoXuqpkarYYbJQeDdiJrrs77gvOZDVg7Eb8JXtFSpMJiUoB9AIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +queue-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBAQCBKSipMTC/Pz+/AAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANfCLrc/jDKEGQMQlDLKM5aZQXDQIHZ9nhleaLqEhAE1bofKCozXZO3l0bmK9qCQ2LRCDQlAb3lkoTZQaVS6jOKpWmt3O5X2fU6wWXfuBM2mmINCpbKkavho56VI9s7DAkAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +redo-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3Pz+/JTWbHy+VHTCTMTivPT69BxGDESuJDyiHESiHEymJIzKZAQCBFS2LFzKNGzWPDRqHCxqDFSqLHy2XESCHAwaBAQOBBQqBDyWJHyqZDyKFGSiVESeJBQ6BAwSBGTGPFyWPFSSLEyOLESGJBQiDAwiBBQmDCRGFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaoQIBwSCwaj8hkMcBkKpcBwYAwEDif0YLhwEUkFItFMkAwMBoOR+PxgHwjRDggamhIJpQ8ZbKGKOQLcgEFdhUWEYgRF3sNfhELBHALAhgZFhobRBwREhQdEAIEHpIKHwsaSJwUDQgQIJINARxKESESDQ0dgCIjSpAkDAwPco+ZSJAlJicnKHIAIrNHidOIQxunT0kpCyrZSCss0d5Fj6jjRonn6uvs2QZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +reload-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBCRSFCRSHBw+DBxCFCQ6FBwyDBQWBBxGFCxyLGTChMzqzLzmvHzKjDyOTER+RERyNDSqXNzy3LzivFS+fCyCPBQmBCQiBBxKFBQqDOTy3LTitES2dDR+PCxuJOT25KTarCx+PESSTCxKHDSeVCyKRNT21ESWVDSGPBQyDAQCBBQSFDRuLDSyZDySTGzChCRiJKSmpExKTDS2ZGzGhLy+vGxqbISChDSKRMzKzGxubDQ2NIyOjCQiJCwqLBQWFCwuLKSipERCRERGRHR2dAwKDDw6PFRWVIyKjCQmJFRSVBwaHKyurAQGBExOTBweHFxeXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf9gACCg4IBAgMEBQYHhI2ECAkKCwwNDg8QBAOOhAQREhMUFQgWBxcHGBmbggkaGxwPB4yDB6SbBJIKHQaqtY0eHyAhsqrDgx4aCiKpqoQHAyMjJBMKJaSxzAAHIRsmJgonKA0LHSmDKiuOBywRLSQuLyEwwyoxMuiN6iUzNBXy5jU2bsgoJugABBz95uXQsUMGD3vpPPgTpKIGwx4+HMr4kW4YkCA2hAzxAQSIECI+imBTwVIFESNHerRUgc0cEiFHkjiiyYzeDiVLdvLcySSkkKGEWiZVweSGkIHMmvQosoQlkaZOjvhosvKJjIAxoOAsgpRZkQNLnvSoqspAIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +revert-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAAQCBPwCBPz+/BQSFPTy9CQiJNTW1ERCRLSytAQGBISChMzKzFRWVDQyNCwqLMTCxFxeXOTm1KSipPz69BweHHR2dJSWlMya/Mxm/GQCzOzWxGRmZPzOzMzOzMzOnExOTDw6PNze3Ozq7OTi5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAWABYAAAbrQIBwSAwYAwDjUCloOgUDQlJJFCKfzoLAMF0ih9jmASGQfq3IBECgYC8YCsah4Rgc7+Bw2fCY4pNrCg8QboIIEX5HXXoEjWZ3eAIMgxITcRRVmVdOE50TBRV6TkJsD3EWDBUOoRcXGBmwsAJqT44aoKJNtAoVDAwWFRUFGwKxxhkCQhMEyxEcGrfEuWoGBgsdDwseHhQQvt++Hx8HmUQU4OHiICAJkHcDDB8hBCIj1QYfDomQAOIiHwxCPBiYr507JeNGAOQz8IC+g0YKrAtxAMQDBBgPFDB4EACIAwIHDkQAAhNEKuUStDMQBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +rightjust-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIhhI+py+1vgpy0Toizjvbur3WiBJbhSJnqgorri7nwDBoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +rsub-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBIQChAAAACH5BAEAAAAALAAAAAAWABYAAAI+hI+pFu3f1gmSVUBrlnt19SUhMk5XaWnnqrYc+2rQfNWHIBi4feP+zssBdkJez5gAIodDYbH2+yGBymXCUAAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +rsup-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBIQChAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAI6hI+pyxBhXlOv1omggxon6VFdGG1laFmkyQLCC8fvJNB2U+M3k/P70gP+FEHiMFFEHhFJJk0GXUkNBQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +run-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBOzq5MzOzPTy9KyurNze3PTy7IyOjOTi5MTGxNza3MTCxMzKzHx+fOTm5NTSzNTS1NTW1FxaXAQGBLy+vJSWlGxqbGRmZIyKhDw6PAQGDJyenAwKDLy6vLSytBQSFLy6tKyqrHR2dLS2tJyanJSSlISGhKSmpCQiJISGjCwqLBwaHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbcQIBwSCwaj8RAAMkUBgSDZdMpBQQIharyGDAclsoDYhtIKKrDwMEgUBMWiwSj3HCg0w+DfgGJQAYSDRMUTAELBhJ8fw0KFXdJBwkLEhYXGAUNDBUZj0pXkxYaARsIDRUMHJ5pAgQHkxEYUh0JFR4fHAVZTgMFCAt+sUIgBB4hIggOI1pKCQO8CB0gAgYkJGNbRQEKEYwNCa7VIhOPaRAKCpoV1QUl5E5mDJrFJAW4JuRlCuMnKB+94yVQ2DGi7QSYABcQgACTDF+VFChULJsiZIUCiRS5sMjIsQidIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +showmenu-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBBwaHERCRIyKjBQi/ERO7HR+1Ly+1Pz+/Ozq7MTCxOzu7NTS1AAAAAAAACH5BAEAAAAALAAAAAAWABYAAARkEMhJq7046z2D/2AoDAQVFGiqqsaBmGH8jWWX3Hiu3+YdKglPMIDrDXc+Is92zAmFi5pECWIkjySj0EkUZplb3JP4nV65WCmAqhR3yeo2Emmc0zsyGc3U6Pv/gAAKHISFhoQGEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +signature-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAISGhISChHx+fHx6fHR2dHRydGxubGxqbGRmZGRiZFxeXFxaXFRWVFRSVExOTPwCBAQCBMzKzMzOzMTCtMS2dJSCTCwqLPz+/PTu1MzCtERCRMSydPTqxPz+9Pz6/MS+rNzKlKSSVOTarPz69ISCtGxurJyaxPT29MS6pOzmvNzSnHRyrPz29OTi5LyqXOzavMy6fFxanHR2rOzq5JyKTOzizPTqzKyWVGxqpPTy7LymZGRipLSy1PTu5KSSZFRKLExKTGRaNPz27PTq3LSiXPTq1GRWNDQ2NMTC3FxSNLymXGxqrPzy7IRyPDQyNCQmJGRinJSCdHxuVBQSDPTy5PTm1IR2RJyOfKSSfBweHGRenFxepNzGrKyejNS+pNTCnNzCpLyedBwaFBQWFNzOrOTOtOTOrBQSFOzStOTKpAwKBMS+tMS6rMS2nMSylMSulLymhLymfAQGBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAA8ALAAAAAAWABYAAAf/gAAAAQIDBAUGBwgJCgsMDQ4OD5MPEAEREpmYmJqaE5IPFBUWAxEXp6ipqJ+TFRgVBaaqsxcZGhUVGxwdBrK0qB4fFSAhIiMYCLIkJSa0JygVKSIhKSoJvhcrqh4sLRUuKR4vITAL2DGpMiMzNBs1FzYiKjcMER6oOKglLDkVOinwRMCAAcKBrx33eMTwkKPHPx8/RGxwEaICkIMXcOBgMaJfCgw/fMCgWCGIhoMlSOQQkmMIkSJGUoysGOTBEVlIZMTg16NHhSJJZCqhOenmqSU5cDDB0JJIzJlNak5yYoqHDBY7hmgN8aPGhhslKU16EgHJDiY9oGz9EcJFkChSaKaIfUC2I5UhMarU+GElyJUrWHzIFZslAtqWVbRs4dIFi5cvYMKImTsmQs8qVVrUePGCDJcyZkCEGUzpTAQMmGts5ozGTJo0XEbPVTNhDRsUbdy82Q0HTpwwwNXMlQOhuPHjyIWLNRAIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +spellcheck-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAASC/AQCBFxaXBQWFAwKDPzCxPwaHPwiJNQGBOxKTPQ6PNQCBGwCBPQ+POwCBPwqLMwCBHwCBBwCBFQCBLQCBPwCBBQCBCQCBPQCBOQCBDQCBFwCBJQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWGICCOZGmeaAoErMi+4xuQgQAI8yoKw2rfOZ1LRIgJh0hhDncsyXKypNMIKAKbNGpwFjxukcza7jt8xmCAgkpVMKxRhQOCnTAVFAtGqtBwLEgFDxAREigBExQVFRAibYNdJhaIigmODBdvF4gYDwoZDBpvIhKIGYOFoi4bHBGQogESqKlvBiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +sqrt-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIIAAPwCBIQChAQCBBwaHAQGBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAANPCLrc/jDCQKutkcqQJeCP5k3g6IjCIAjAynYt0brzUn7gW++i0i8CGcNiuyl0NlyysYKhXgQdUvmcNZtDTo/mmvo+ptMvjDOSzWey+mFIAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +start-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBCRGZAxCZGyavExmjHyatOTy9CxihISevPz+/KzO3BRylAw+XDRWbPz6/FzC3CSuzDyexJzO5Mzq9CxSdAQOFISmxNzu9HTS5BSmxAyexDSuzJTa7Mzu9Kzi7GS21CRmjAQOHHSWtLze7AyWvHzG3BRihCTO3BS+1AyixBSWvBSOtBSStAQWJDzW5BTC3BSqzBS21CTC1ETW3AQSHEze7BRqlBRmjAQCDBR+pBRefBRSdAQKFAAAACH5BAEAAAAALAAAAAAWABYAAAa0QIBwSCwaj8ikMqBcMpsCQTEwIDQBUWKgYHgqs8LAAZGwQqWAgGLBaDgEj0Fgjh5mxRBERDKhICAQFRYXRVEBGBAZGhscHR4VHyAhIiOFAiQZJRoSGyaNJxQnEyiVRFEoGykqKyYsJiYtLi0mKC+WFygrMDEyMzQ1wDQqKDaWADYoMzcqsjg5DSgoBISmaCOoMG4v29s2OsZCyDs8DldgQtc95WdFPg7rV0Y+XvHt9ff4SXRBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +stop-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAASC/CQKDBwKDCwODNyKjPzq7My+vIxiXAQCBOSOjPz6/OSelNySjNyGhMR+fLRaTGQ2LPz+/Nx+dNR2bNRybMxuZMxeXMxiZLQSFJQaHFwqJNyKhOSCfNyCfNR6dMxmXMxWVMRORLQODOR+fOSSjNR2dMQ2LJQWFMRWTLwWDNSCfMxeVLwaFKQODNR+fNx+fMxiXKQSDOSWlMRSTMxaVMQ6NMxORMQyJOTS1MxqXLwWFLRORMxKPMQaHMxKTLQWFCH5BAEAAAAALAAAAAAWABYAAAb2QIBwSCwajwGBcikIHIsDQmFKNRwQT2EgoVgsGOCG4wHBIgmRhWRCqVQsF0xGYyYGNgoGh9PpeCQfICEic3UAAWgLIxwRJBsbHSUREyYYJ3RDAQULexGejhueESgpl3WaCxsqJKKsChEUKywtmFoFDC4vCayikzCyMbWHt38NCTKiHhUfMyzBdQIFKsodob0VNDWzwppuKxMRrx6iNjcitNA4bh+iEzkwojc66JkOOxcf7G35PBE9KS1MEUGgIQOIFfk++KjRw9wJgUUIZvhRoyLDFCliQDQisUWLGCJOeNx4hKCGkyhPGnqCoKVLl1liypyZxUAQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +sum-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBIQChCH5BAEAAAAALAAAAAAWABYAAAIyhI+py+1/gpyUMrvm1bdhFTgfhIykYZ4pyZ2o5EZwDLSurc7ZFnqZDgLKKsQe7QihFwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_block-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_bold-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +text_center-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_italic-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_left-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_right-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text_under-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIvhI+py+0PowmUnhpeVVnb1DkbCI1I2JhX+Z0sOr2cTHpwK7a4rUr+hAnufsTirwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +toggle_log-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIYAAAQCBAQ2NPwCBATW1KSWfBweHATS1Pz+/Ozm1GxiTATOzPz6/Pz69ATGxKSahOzaxPzy5HxuVLSmlOTazPz27AS+vPT29NzClPTexHxuXLSmjAyKhPTy9KyehNy+lPTy5Pz29HxyXNzWxAS2tOzexPzy7IR6ZASytPTy7ASurPTu3KSSdIx+bASqrJyOdIyCbASmpJySfPzu3OzizJyKbKyijASipJSGdOTWtPTq1PTq3NS+lJySdOzWtOzi1My6lMS+rOTOrMS2nNTGrNTCpNzKpJSGZKyafLSifIx+ZHx6ZFR6bFR+dAQyNAQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAWABYAAAf/gAABAoSFhoeHAAMAiI2IigSMjoQABYkGBAeSjwAICYkKmQublJ0HDJ+GAA0OB66bpq4HCQC1lA2ZrqMCAA8QBwvBERITFIwAFa2yFgAXGL+uDBkaxRu1FQQLshwdHhgfDK4gIRoiFNYAI8quHA4XJCUMCwwMJhLm6Ce5rigEzhAMQICwYKLcuVopWgUDoWLFhQcfKNCjwOLeQQAtCFDYiAKBC28QKITk8MIgOhgxIHyQIWOGi4cfIHAogYJGjWq1bNzAkSOHjgc0dmBAgQKCUR43S1jjVeFGDx8PcNAAKePDjxg1gOCThOxFEBxBgpJQMQGpkCETEIBYSqkpkSJGOYTyOCJkgg4OIDaybXvjh5ELLpAMUYEAgQ7COPbyTWJEiY3HkCOTaruESYVamDPbQtTESedJhOgEAgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +top-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAw2VHSWtBRihAQOHISmxNzu9BSmxHyatPz6/Lze7CTO3AyixAQSHHTS5BTC3DzW5ByyzPz+/OTy9AyexEze7GyavKzO3FzC3AyWvBSqzBR+pAQKFCRGZExmjCxihBRylCSuzBSWvBS21BSStBRSdAw+XAxCZDyexDSuzCTC1BSOtJzO5JTa7ETW3BRqlAQWJDRWbOT2/Mzq9HzG3BRmjJzS5Kzi7GS21BS+1CxSdCRmjAQOFAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaoQIBwSCwaj8jkMMBsOp3Ip7SpHAoGhELVKDAcENmtNaFYMBoEh1hAPjwgEUlYyZ5QHpIKxALWIgUXFBgZCBUaG3AcBB1HAh4fICEiFRUjJCUhBCYnjEQCAignoikqhissKAKiJwFJAS0uKhovMDFiADIzNDUsLza2Yh4KNDcsEbW3Ago4NSUrBMBbAjQ5KRo60Mk7PATdKH5bAT0xDg4xPa236uvsShRBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +undo-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3PT69MTivHy+VJTWbIzKZEymJESmFESiHDyiHESqLAQCBFzKNGzWPFS2LNTmzCxqDDRqHPz+/KTGnBQqBAQOBAwaBESCHHy2XBxGDOzy7HTCTEyyJDSqFHzWTAwSBBQ6BIy+dESKJFySPFSSNAwiBCRGFBQmDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMsBkKotMwYAwEDiXgYLhwD0gCFZiQKxNKBYMRqPh+D6G16y5AYnYIxBJAyF4AwITTAUJdBESD4gPFBV6Fn6ABBcJDIYPGEQZGhQbHAIdfx4JHw2VSBodGwWfAR4LDSALfkgYAQurBiAhICKfSSMkvQElGyYnGyi9Rxkdj4nOskUYyU9FpxnURikdGtjRKivdRKfQ2Inh5+jpRwZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +up-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBHSWtBRmjAQOHISmxNzu9BSmxBRihHyatPz6/Lze7CTO3BSixHTS5BTC3DzW5ByyzPz+/OTy9AyexEze7ByixGyavKzO3FzC3AyWvBS+1BR+pAQKFCRGZExmjCxihBRylCSuzBSWvBS21BSOtBRSdAw+XAxCZDyexDSyzCTC1JzO5JTa7DSuzETW3BRqlAQWJDRWbOT2/Mzq9HzG3JzS5Kzi7BSStGS21CxSdCRmjAQOFAQSHAAAACH5BAEAAAAALAAAAAAWABYAAAaeQIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbUGFAtGw0GFfheHByQi4S6/E8pDUoFYLm5kAEPJaBAVGxIcER0JHlEfICEiIxUkGyUmIgknKIhXASkonCorgSwmKQGcKE9IAi0uLxUwMTJWMzQ1NiYwBLBQHws1N7avXgs4NjkcCblMATU6KhvGyG87PAnUKV1MAj0+2zIFp1bg4eJJdkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_choose-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_detailed-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAQ+EMhJq7046817+MLQUQFRGMc4lQaSAkcMx3QltMmrDrSu/sCgEPgJhIiFk89DaL1qPRnlhsgBebWhdstVESIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_icon-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz69PTq5AQCBPz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARWEMhJq7046z2DF0PlBeAVEERhiKhqHgWyUgEsX0KczFOO7JeBYciTCImc5ITIXDKHyqhU9AnRqq9UEVDTvmLbGhin2/qAliOUot5OLc81IO5+2+8WewQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag--22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbKQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/avno2BBf/MCClSob4iBIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbIQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/cunr9S8gAIRFhTCLAgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag+-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbQQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/4zT766vRI+fvHD4CPgwcJ9qg0UB85JA0dDjEQBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +view_multicolumn-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq7046813+MJQfUF4BURhHGO6noSBsEcNoDJtS4KcsJQe4ncZ1HYT47HDbDqfUAnJRJmKLIGCCjjJbmE5wBI3EyOFxKCPS1EiJW52dE6vZyIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +view_sidetree-22:actions actions22 22:photo:22 22:R0lGODlhFgAVAIUAAPwCBFRWVFxWXFxaXExKTNTO1NTS1Nze3Hx6fLSutMzGzLy6vMTCxDQyNMzOzPT29Pz6/Pz+/PTu9Ozq7OTi5Pz2/Ozm7MzKzGxmbIyKjAQCBPTy9FROVFRSVPTq5OzOpMS+xPzu5OTKpExOTJSOlOzu7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABUAAAb/QIBwSCwaAQFBcqlsLgcBAnFQqBqqhwIiUVB4F4wGMeB4QMyPSCFQkEwmlMlCPKRC7pCKmjpxTyxzUwVmEBF6FxiDbxZyUnUFdxERhQUZbX4TDBlEAgUVkQ8DogEDAqYBTwEaAw54eQNusRMPs319Gp0PFZ8PAhMRGpLCwxOrFw/IFRuwwMICHAIEkhK4lxK0A7/Bkh0RHtvFAwp9D27MGugRAh4f29TithIW2c2SBOjgqwxv/AIS9cOEvQPBiBEFetsidOhAQFqEcCDgWLBAwR9AARFCuMPFAMwCEAsQpuMQQkS+EQ1SNkBAwuKwe+kiUDuSzU0JPyUm5HSj4Qi+Bp9A8QEIAgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +view_text-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIkhI+py+0Po2ShBlOxzbP7n2yaJoLm+ZTcxqHuC6hXzML2HVEFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +view_tree-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz+/Pz69Pzu5PTq5OzaxBQOFOzKpFRWVFxWXOzexPTexCH5BAEAAAAALAAAAAAWABYAAARPEMhJq704g6A779kHCORAgNskFMYhakE8FkjyBcoWv+JwJItXaELYCTFHlCSpZKKcoB5jYHpOGgUadLKbIRw3jhEzQDyCSuI4zW673yhDBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +window_fullscreen-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBNTW1NTS1MzOzMTGxLy+vLy6vLS2tKyurKyqrKSmpKSipJyenMzKzMTCxLSytFxaXPz+/Pz+9Pz+7IQCBMzOvMzOtPz+1MzOrPz+5Pz+3MzOpMzOnMzOxAAAACH5BAEAAAAALAAAAAAWABYAAAWxICCOZGmeKBqsbOu+rjAQRFEYxoEkibIwjUZMRnAUHjkEpPcLriLQqHQ6XRUk2Kw2O+lSKIUVoUKubLflikVcPnO75cvKkXZL4HG2pK31lilqc1lmfRNfgBQYGBlidl5fGhobGxqMAQNnXYaQkZOLjVgVmpsUkRoVnpZje2SkphtlGBUcbH+br5NptAF0rYe4G4plHSseaaW4irLDcxYOFtDRFhnU1B3X1zDa2indIwYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +window_nofullscreen-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBNTW1NTS1MzOzMTGxLy+vLy6vLS2tKyurKyqrKSmpKSipJyenMzKzMTCxLSytFxaXPz+/Pz+9Pz+7IQCBMzOvMzOtPz+5Pz+3MzOrPz+1Pz+zMzOpPz+xMzOxMzOnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbKQIBwSCwaj0hkYMlsOp9OwYBAKBQMhgMikVAsGI1GVEpwFB5ZBKT7DS8j8Lh8Pl8WJPiJfr/PTygUBUsEEhV4h4h+ExUUFoMVkIWJhxWLkBeDhZCGiXqbFRiYAYSanId7mxihSwOlphJ6gJ8ZGksOiqd/gKoYGRmipIh7gBSqvhkbtaOuw7sYn8mseJuxxcabGxwdmZ/EvL6f2o+Qz869yBUem9sBH4sYf7znG/Qb6h4gSx8fDh8W/wA1CBTYoSCIfFASQknCcIiBIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +wizard-22:actions actions22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBNzaTPz6BAQCBPz+BExKBMzOTPz+rPz+3ISCBPTyhISCLISChPz+xOTiVPz+/MTCxKSipKyqrExOTDw+PDQyNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAV+ICCOZAkEZqoKqoqKAzHAb1sIxhAQwWAQhRaJd0AcdgkhqaBAOBUL5WjAaD6TUqog0DAildqcg+cDtgaPACTCiM0AOhV6sG4DWOAHnf2uyfV1b1lsgVIwEgwTFHaGA2yKFYJgiJCSQo6JFJGGcJSalkKPn5wimZukAJWoIgYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons.kde b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons.kde new file mode 100644 index 0000000..0d5b2c8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/tkIcons.kde @@ -0,0 +1,195 @@ +actattach16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBPz+/AQCBAAAACH5BAEAAAAALAAAAAAQABAAAAI2hAOCxg2h0nJHyEshi9HpxU1GOCLdZoKpQ15nibUoprKp9lh2oucUxsBRXsJh4Hjs/QTMpr8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actbookmark16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy+vERGRFRWVDQ2NKSmpAQCBKyurMTGxISChJyanHR2dIyKjGxubHRydGRmZIyOjFxeXHx6fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICACwWieY1CibCCsrBkMb0zchSEcNYskCtqBBzshFkOGQFk0IRqOxqPBODRHCMhCQKteRc9FI/KQWGOIyFYgkDC+gPR4snCcfRGKOIKIgSMQE31+f4OEYCZ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actbookmarknew16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCwqLLSytLy6vERGRFRWVDQyNKSipAQCBMTGxKyurISChJSSlJyanHR2dIyKjPz+xISGhPz+BGxubMTCBHx+fPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVfICACwWieY1CibCCsrBkMb0zchTEcNYsIiYHiwIOdEAvigdFQGE0Ix4NBbSAgsWjk+jBIAlcUYrJASChnSXZSoUDelKfoKpFALJA61ueGI2IAZmhogGFmCGGAgXsifiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actcheck16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBMT+xATCBASCBARCBAQCBEQCBAAAACH5BAEAAAAALAAAAAAQABAAAAM2CLrc/itAF8RkdVyVye4FpzUgJwijORCGUhDDOZbLG6Nd2xjwibIQ2y80sRGIl4IBuWk6Af4EACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actcross16:act act16 16:photo:16 16:R0lGODlhEAAQAIIAAASC/PwCBMQCBEQCBIQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMuCLrc/hCGFyYLQjQsquLDQ2ScEEJjZkYfyQKlJa2j7AQnMM7NfucLze1FLD78CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actexit16:act act16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBDQyNHR2dCH5BAEAAAAALAAAAAAQABAAAAI4hI+pFrHb3nEg1iWiDiINCwYDko0V9XUTda6I1TIsUMpGinyzbB6ZeGuoEr+GUDL4CXqSphPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +acthelp16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQ6XAQCBCyCvARSjAQ+ZGSm1ARCbEyWzESOxIy63ARalAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQ/EEgQqhUz00GEJx2WFUY3BZw5HYh4cu6mSkEy06B72LHkiYFST0NRLIaa4I0oQyZhTKInSq2eAlaaMAuYEv0RACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actitemadd16:act act16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBARCZPz+/Mzq9BTC3ITC1HSyzGSivAw+XBSStIS6zHy2zAQCDFyatAQOHFSStEyOtAQSJBSq1DR2nCxunCRmlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVbICCOQTmeaCAMRIC+AVu47xkTBl2Ld16XQNYBQTQBVIOkMHFQJBeMI4tAbSSu2IRDSnhAvFfI97sFRM6RwOMacbjLKckVvgvIJ5EdSU7J648VgXQ7Dmd/hyJ+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actitemdelete16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBARCZPz+/Mzq9BTC3AQCDAQOHFSStAQSJAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAQwEMhJq704681n+GAISoEwnGg6EAUQrEQsz4ThEkeu77kNIAagMEj0dY7IpHI58UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actlock16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJEQ+FExGHCQiDBwaDGxiLHxyNHRuPIR+TIyGZJSSfFxaRFxWJGRiLJyaXNzWpNTOnMzGnLy2hJSKTGReLKyqjPTu1NzarMS+jLSyfKyibJySXIyGVCQeDLSytPT29Ozu7OTi5NTS1KyurJSSjGxqVFxaXLS2tKSebOzuzLSufJSOXExGLGRiTExONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwGCgGhkhkQDBoEpLKQoBACAyOUID1qTVwoQGvMPxNFgVjAxp6QCQUicSCwVgkG44HJCKRRCYUCAxIFRYXhxgZGhYbHINEHR4fGCAhIiMkFSVKJicoKSoFKwMsLZtDLison6GjLA92qCueoAUvpC2xQhWqrLYDErmEMDEXlDIwMxAHukI0NS01EzY2NAmPAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actredo16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxOHBxSHBRGHKzCtNzu3MTSzBQ2FLzSxIzCjCSKFCyeHDzCLAxGHAwuFDSCNBxKLES+NHSmfBQ6FBxWJAQaDAQWFAw+HDSyLJzOnISyjMTexAQOBAwmDAw+FMzizAQODDymNKzWrAQKDAwaDEy6TFTGTFSyXDyKTAQCBAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ2QIBwSCwaj0hAICBICgcDQsEgaB4PiIRiW0AEiE3sdsFgcK2CBsCheEAcjgYjoigwJRM2pUK0XDAKGRobDRwKHUcegAsfExUdIEcVCgshImojfEUkCiUmJygHACkqHEQpqKkpogAgK5FOQywtprFDKRwptrZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actreload16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCRaJBxWJBxOHBRGBCxeLLTatCSKFCymJBQ6BAwmBNzu3AQCBAQOBCRSJKzWrGy+ZDy+NBxSHFSmTBxWHLTWtCyaHCSSFCx6PETKNBQ+FBwaHCRKJMTixLy6vExOTKyqrFxaXDQyNDw+PBQSFHx6fCwuLJyenDQ2NISChLSytJSSlFxeXAwODCQmJBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIBQGBAMBALCcCksGA4IQkJBUDIDC6gVwGhshY5HlMn9DiCRL1MyYE8iiapaSKlALBdMRiPckDkdeXt9HgxkGhWDXB4fH4ZMGnxcICEiI45kQiQkDCUmJZskmUIiJyiPQgyoQwwpH35LqqgMKiEjq5obqh8rLCMtowAkLqovuH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actrun16:act act16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/ISChKSipMTCxLS2tLy+vMzOzMTGxNTS1AAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARlEMgJQqDYyiDGrR8oWJxnCcQXDMU4GEYqFN4UEHB+FEhtv7EBIYEohkjBkwJBqggEMB+ncHhaBsDUZmbAXq67EecQ02x2CMWzkAs504gCO3qcDZjkl11FMJVIN0cqHSpuGYYSfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actstop16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAASC/Gw6NGQuLHQ6NGQmJFweHFQaFPTm5PTa3PTW1Oy+vOS6tNSinKReVDQWFPz+/Nx6fNyCfNyGhNR+dMxybMRiXLxGRIwWFNx2dNx+fNx2bMxuZLQWFBwWFPTu7Pzy9NRqZNRuZMRSVLwmJGwWFNR2dMQiHPTKxMxmXMQyLMxmZNx6dMxiXMRSRMRaVKxybMxaVEQWFMQuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaaQIAQEBAMCAWDYcgkHhAJxYLRcDQBggckIplQKpaLdRh4YDIaSWa94Vw6woAHgv6AMKGPaMQhwQMJJRkfhHmEJhdvRCcgGSCEkCgpbnAECiorGYYfLCItlAAFCygQj5AfbYlwBQwVE5AukG6KBi8tMC0fLi0pHxyzcAAxFxwmMny/wEwOxMm/qlcdJCSJ1H5XQh3a28HY3kx+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actundo16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBxSHBxOHMTSzNzu3KzCtBRGHCSKFIzCjLzSxBQ2FAxGHDzCLCyeHBQ+FHSmfAwuFBxKLDSCNMzizISyjJzOnDSyLAw+FAQSDAQeDBxWJAwmDAQOBKzWrDymNAQaDAQODAwaDDyKTFSyXFTGTEy6TAQCBAQKDAwiFBQyHAwSFAwmHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ1QIBwSCwaj0hiQCBICpcDQsFgGAaIguhhi0gohIsrQEDYMhiNrRfgeAQC5fMCAolIDhD2hFI5WC4YRBkaBxsOE2l/RxsHHA4dHmkfRyAbIQ4iIyQlB5NFGCAACiakpSZEJyinTgAcKSesACorgU4mJ6uxR35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actunlock16:act act16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaVAQCBKSipDQyNMTCxISChFxaLFxSJExGHEQ+FCQiDBwaDBweDGxiLHxyNHRuPIR+RIyGZJSSfFxaRGxmLJyaXNzWpNTOnMzGnMS+jJSKTGReLKyqjPTu1NzarLSufKyibJySXIyGVGxiNFxaXLSytPT29Ozu7OTi5NTS1KyurGxqVCQeDJSSjLS2tNTW1KSmpGRiLKSebOzuzJSOXExONExGLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaVQIBwOAwYA8SkMCAYOAnKYiFAIAQGyOgVCggYuEovVxztMpdnwAGRSCgUCwOjIeQ6HpCIZDKRUNYMRBUWF4UYGRoWGxyBRR0eHxgaICEiIyR0QyUmJygpKgUrAxMsLUQlKyieoKIuEAunK52fBS8DLiywQySpnjC1Mbi6QjIzNBeSIBY1EQfDQgosLAEUNjY3Co1DfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbook16:app app16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBDyKhDSChGSinFSWlEySjCx+fHSqrGSipESOjCR6dKTGxISytIy6vFSalBxydAQeHHyurAxubARmZCR+fBx2dDyKjPz+/MzKzLTS1IyOjAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVkICCOZGmKQXCWqTCoa0oUxnDAZIrsSaEMCxwgwGggHI3E47eA4AKRogQxcy0mFFhgEW3MCoOKBZsdUrhFxSUMyT7P3bAlhcnk4BoHvb4RBuABGHwpJn+BGX1CLAGJKzmKjpF+IQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appbookopen16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBExCNGSenHRmVCwqJPTq1GxeTHRqXPz+/DwyJPTq3Ny+lOzexPzy5HRuVFSWlNzClPTexIR2ZOzevPz29AxqbPz6/IR+ZDyKjPTy5IyCZPz27ESOjJySfDSGhPTm1PTizJSKdDSChNzWxMS2nIR6ZKyijNzOrOzWtIx+bLSifNTGrMy6lIx+ZCRWRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQEAAQCwWBYJiYEAoGAFIw0E5QCScAIVikUgQqNargtFwdB9KSDhxiEjMiUlgHlB3E48IpdKdLCxzEAQJFxUTblwJGH9zGQgVGhUbbhxdG4wBHQQaCwaTb10emB8EBiAhInp8CSKYIw8kDRSfDiUmJ4xCIxMoKSoRJRMrJyy5uhMtLisTLCQkC8bHGBMj1daARgEjLyN03kPZc09FfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appboxes16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMT+xAT+BASCBATCBMT+/AT+/ASChATCxPz+xPz+BISCBMTCBAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEEgZwrwYBCFqvhs3DNYXjChRlWBRjIRqGN4UuEUczMZxsDeXykdEsDQVVSLhQxhBCkVlmXA+KVHFYhFYOoHbMGN6pTQaW8YYiQmcG+q16a0+Zipw+4e9B/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appbox16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBPz+xISCBMTCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANECKoR6ys2IVqokF08yMTA1gwkYX5WQK5ma4VceTYPxXnBWdtY6+0834/Bowgzm6APWRQcH4TiMhPK2WYRiZWW7XK7/gQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbrowser16:app app16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxONCROfCRKfKx6LNy+bNTOpGSS1DRupAwyXBRSnPTSjPTqvOzqzMzSvHSSlKy6ZDxutAxCpBQ2XBxepLTKvPzqzPzy5OTShLS2dLSqRFR2jBRerBQ+jOTixOzetNS2XHx6XDR2tCRexBwyTDyKzOTavPzq1OzKdCx23BRKtCQ6VCQmHFSa7IyirOzSnGSGpIR+bFSO1DyK7DR+5CRixBw2VDQuHFye7IS27NzGXISuhEyS5DR25BRWxBQ+lBQyXCQqPCxSfGyu7GyerKy2ZFR+rERqfCRmxBROtBQ+fBwuTBwmNDSW9JyabLyqRIx+TExSXBQ6bAQCBBQ6ZBxapDR+zBxq3LyaLJySRHxqPGxeNBxGbCRmrHRyRERONDRKNDQ2JCQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAeygACCg4SFhgABAQIDh4MBBAUGBwgDCYcKCwwNDg8QERIThRQVFhcNGBkaGxwdoYMDHhcXHxggISIjEiSvJSYXJwsoISkpIyorLIIDLS4WLzAxMjM0NSo2N8o4OS46OzwzPSk+P0BBgkI8Q0NERUZHCEhJSktMgwk4Qy1NTk9QUVJLphCiUsWKlStYsmjZQiJgIS4KuijQ4iXAFxYCDVFJwGUFmDBhMjYSw0KMyEYoBfkJBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appcalc16:app app16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBISChPz+/AQCBCH5BAEAAAAALAAAAAAQABAAAAI4hI9pwe0Ogpi00hHF2LzzzFlTsIHD45SSx6oCeW4wjK2tl83y7t64pIsJaxrfh2bEAJIlhRPhLwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appclock16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAALy+vAQCBPwCBMQCBIQCBISChPz+/MTCxCH5BAAAAAAALAAAAAAQABAAAANbCLHcrSLKOZcYmDSCsR1aUABAsXDDJwJGa5SBFwgaWxbCG3CWaBwG3C8Y67FawpYiNQscg65fsVkYuoAmJs1pBR522lQB6ILJLqHRwQQOZzYdZnw+dzruDIA/AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appdate16:app app16 16:photo:16 16:R0lGODlhEAAQAIQAAASC/AQCBPzerPyqXMRaBIQCBISChPz+/KSipMTCxPz+BMTCBPwCBPz+xPzCxMQCBISCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVxICCOQGCeJjkGwkC8RFEEavkax2G8dB0QuRyhhzoBg8MSYsncJXKJZIDZHCoWP1ogGIwGrtnSgUFmHLyNRHhrdpjRamnO/SYkromHdnxwnwkKVxByZW8DgQsQM2JcfwZXO0MBCZSVBgMuLzJaRZ0pfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +apppencil16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAASC/IQCBMQCBPzCxAQCBPz+/MTCxISChDQyNKSipEQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARDEMhJZRBD1H2z3lMnjKCFjUJQimOgcmcbELCXzjXq0hV785WCQYcDFQjDXeloMByKG6YTAdwIDAlqSZJSVFeKLcUfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +appsheet16:app app16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBAT+/Pz+/KSipPz+BAAAAAAAACH5BAEAAAAALAAAAAAQABAAAANFCBDc7iqIKUW98WkWpx1DAIphR41ouWya+YVpoBAaCKtMoRfsyue8WGC3YxBii5+RtiEWmASFdDVs6GRTKfCa7UK6AH8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +apptool16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBISChGRmZMTCxKSipLS2tHx6fPz+/OTm5FxaXOzu7DQyNMzOzAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAReEMhAq7wYBDECKVSGBcbRfcEYauSZXgFCrEEXgDCSeIEyzKSXZoBYVCoJVIqBGByKu0Cy8QHxmgNngWCkGgqsGWFseu6oMApoXHAWhWnKrv0UqeYDe0YO10/6fhJ+EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +apptools16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBExKTERCRAQCBOzu7Nze3MzKzLy+vCxqZBQ2NJyanKyqrGRiZDRydKza3FRWVPT29LSytDw6PMTm5EySjCxaXGRaJFSanCRSVGxqbPTmvMSqVJTW1GSurHS6vOzq7KSipISChFRKHJSGNPz23GxKFBQ6PKyurCwqLMyufJx2RAQGBJSWlEwyDIRiLNy+lLSKVDwmDJRuNOTOrLyabGRCFDx2dKSCVOzWtHzCxOTGnNSyhAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAahQIBwCAgIBAOiUiggFAyHASKxDAwUC8Zg0HAglA9IZPGQABoTSqJCFTIOEIsFgHBcEhhHUpKJFCwaGxYYHB0VEx4IEh8gIQwiIyQbJRMcHokmEicfDygAkCkqJQgIGG0rLElCLS4vMCWqQwMCQg0UMTIzNDVLQjaIGDE3ODQlS785CEkxKjowvEOHybG4O6JDCdNKuDUxRAmxRDHeveUAfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appuser16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MTCxISChMT+/ATCxASChFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMg5gw00yyDGIAR1YUDggeFWFIZhnSBZrsZxdIOFEGTA2oeBAHeyuGwvzxBlYdUOLROMFzDQntJPrNoqAKUBaqnV+k57ZORruykHDj2LqIzUVKp1u0iuB/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appusers16:app app16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxISChAT+BMRaBPyqXARCBPz+/FxaXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARLEIRJa5Ui673nsGAgeKE1Bl9AUEXbiqTlFlZaGUZoszm4BzhDAVf5BYbAXI+TAR6CS2ZGSZSEiIIqYIsSIEaJ7GRrlY7J1lKA7I8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appwp16:app app16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBKSinJyOfPz27Pzy7AwKDExOTJyWlERCRKSelPz69LyyrKymnPz+/MS2fDQyJAQCBOTazLSiXOzivMS2jKSSVOzmxPz25NzSpPTu5KyebOzixNTGjOTWpMSydMSybCwqFGReVKyaXNzSnGxeNJSCVMS2nPz23MSuZIR+bJyShLyqnOTOtGxiXIR6XOTSvIx6RMSubIyCdKSalMS6pOTWxMzKvKSabJyKTOzezHxuPGRmZKyurMTCvPTq3AAAACH5BAEAAAAALAAAAAAQABAAAAajQIBwCAgIiEhiYEA4FgwHRDKhIBAWz4OhgGQ0FAPHA7qFEBONb0Qy0ULeQ2+aUrFcMI+3GYBOZzQbHB0eHyAhIQByDREiEwMjFRIkJQImAgJ+jScjHigkKSorLC0AKg2NFSMoki4qCy+IQgITKDAxkjIzNDWkQxQoJaskMgk2Eb1DNzgoOCoHDDY5yEIwJToAOzw9ET7TQiREAhkZ3kmy5QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cal1day16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANOCLrMEUDIOUS9AFLLhx8LIRZjKYZmMRCkaChFLHty/AIiS3y6q+QtT49wq8VotRtQJGwRf6Zmrlj7DJLQXsupTJmeEIN4TB5nII20wp8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +cal5days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANMCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiIdMmcec7jy53q81qP9OO5VMAj8RXTFWzOZW95HDLdEEM4LA4nIE0zgp/AgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +cal7days16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANPCLrMEUDIOUS9AFLLhx8LIRZjKYbj55GioRRwoQ5x4QIiwcp0fucsj873qvGMv5Jw2FIACUsW4WakGW1O046I05qmGYBhTC6TM5CGWuFPAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calappointment16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxPz+BISCBISChKSipAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARbEMhJaQhA6D1E/wDGeeRgDhOhFoTBEi+REgdrIHScSEVvAD9Xr7cDqGSGpFEnQSqTv2NxCFQOiU1VEAiTZmstHFg1vQKuw+LxxfYaV/AuOQRI2O/4ewhT6Uv8EQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calbell16:cal cal16 16:photo:16 16:R0lGODlhDwAOAIIAAPwCBISCBPz+BIQCBMTCxISChPz+/AQCBCH5BAEAAAAALAAAAAAPAA4AAAM+CLrR+zCIAWsgLVRGRBhOVQiG94WPVAbHaZHYAWqRYLbge88RsbInGuBCEhRYrZYm4xk4nYdoKzKIbiKHawIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +callist16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/KSipPzerMRaBEQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARDEMhJaQhA6D1E/wDGeeRgDhOhruyatjBRSIRxxOsMEAdC0BUZDcfSEYvDo3Bn++2Cxt7RqFxWhZiCdsvdhjCVsMQfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +calmonth16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBAQC/AQCjPz+/MTCxKSipAAAACH5BAEAAAEALAAAAAAQABAAAANSCLrMEUDIOUS9AFLLhx8LIRZjKYbiRxLFIBpK0Q6z7MkwkJIe8b0KEeuWchFysuStVsjtfMbeMQitWpG25YfmNK1WU53XNIUYzug0OgNpuBX+BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +caltoday16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBPwCBAQC/AQCjPz+/MTCxKSipPyCBMRaBPyqXAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARTEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyIQhFfiBIAfuFzaAioBIJBCummRYPCaDPh3vhwsOZdihNfa8Ub/AJXemFZPPNBvGwG672yFMZS7xRwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +caltodo16:cal cal16 16:photo:16 16:R0lGODlhEAAQAIMAAAQCBAT+BAQC/AQCjPz+/MTCxPzCxKSipPwCBMQCBIQCBAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAARaEMhJaQhA6D1E/wDGeeRgDhOhFmurpi5LyMYhFXiuFwZiA6qZYbbqJX5BIw2RAPxwAAWCyWMCCsiXFGEEErKz6LQZfOqiTR1YJiGq1rFyyHmo2+/1EKbCl/gjACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connecting16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZbihUiz60FPnfaA0iBpBVGdHEYWxToEoSHBRHHM9AgSEQRcj+AYkYAJxIPKQFUJiOdTJQFIDU6dYzKKFhTCM+E5g4mXaDAyrlogEG+DGTecA7wsP8EcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connectno16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBPz+BMTCBAQCBERCBPz+/MTCxMTGxISChFxaXMzGzKSipAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARPEMhJq704axBEHoPUEdhQGMNYFuwxkKInDYjBniEnwMCQIIebSzXx/WwsFK+YMABZikWuYlrUCtZpEYv4WRPaHhb064YB41kCfJFSQBh/BAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connectyes16:connect connect16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/KSipDQyNMTCxMTGxISChFxaXMzGzAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARaEMhJZxCjgsAtDtUlCOA1gJQ4kl/IDatAoF7xxkS6GgEBr6jAobCyBX42SQBxMOx6A8MhiGASR8YDgrYsNEeJ0zaEGZY7uoH2oB6nOUwtbdLaVOeTUwo/8UcAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devcdmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tOzOvNTqvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/LzKvMTCxDQyNASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAa0QIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTBqUiuUCVmAeiYzmsKlwOt/AAKFIFAIIFx4WHyAhUwIDIgsZFyMkFxchJSYmiBkSBBoIJJwIGgOhiCYFJSEnFyQjFwNZewABISAfFiYnCAEmCREIrwAIFhwVGwcaBAkPGApsQsAVFA0GBQMRbxBTKM0ODQwTEq192ClDgROkBHvYKuNJUu5CKCorX1RDKCkpUn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devcdunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXISChNTS1MzKzMTGxMy+vNSytAQCBOzq7OTi5Nza3Oy6vPy2tOTStPz6/Ozu7Nze3MTKxOS2tNzmvLT2tDw+BPTy9MzOzLS2tPy+tLz+tLz2tLSynLzqvLzavLTOtNTW1KSipPz+/MTCxLy6vDQyNOTm5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAapQIBQGBAYA8Ok0DggFAwHBEIJECQUi8GT0XBMh9YHJDKQTLqUigWsuDwSmMxBQ9lwvoEBQpEoBBAWHRseHyBTAgMhCxgWIiMWFiASJCSHEgQSGQgjmwglGKCHBQUSICYWIyIWAwshIVMBIB8eFSQmCAEFCREIekIIFRsUGgcZEgkPFydrvxUUDg0GBSEREGJfv9AMEySsJxDYQ4DcEhh64UpS6lTs7QB+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devdiskmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKROzSrOzKpOTGnLSafLySZKxuLMSOVPTWvPzixLSehNyibOzOrGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTOpHxOJKyKXFw+HKSipISChMTCxFxaXIRiPNSWXExOTOS2hLR+PLRyLPTWtMyOTASCBARCBPz+/DTSJIyKjIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaTQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwrA3HQ7scQAqFAcEQOUi0zAkFUSFYLghMBloUCDQNGxwdHhwHekcfICEhICIfIxkLJBABJUYCICABIhAOBiYnKJaXmH4CGSkYCCqkSAEfTKenrkOwsrQll0IrS7G5uwArLLaxLbXCLsTFLyDBKy4wZEVHvCwsRn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devdiskunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBDQyNIRuVKyCXMSKRPTWtOzKpOTGnLSafLySZKxuLMSOVOzOrPzm1LSehNyibGxaVJx+XOzGnFw2FJRuPKx+TPTSrHRWPKyKZPTWvHxOJKyKXFw+HPTOpKSipISChMTCxFxaXIRiPHxaNLRyLNSWXExOTPzixOS2hLR+PMyOTPz+/IyKjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaIQIBwCAgYA8SkMCAYDARI5ZJQMBwQiWgyoFgwGgiD46FdDiCFwoDQAEe0TMkEQSFULIcLBloUCDIaDRscHRsNHhhHHyAhISAiHyMkJSYQASdGAiAgASIQKA0pKguXmJl+AiQGFwgrpUgBH0yoqK9DsbO1J5hbsrq8SrgstlJFHy0gwMVFR1J+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devfloppymount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVASCBARCBDTSJIT+bAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVrICCOQBCQKBkIw5mqLFG47zoQ+FwbN57TosDhgPD5dMEEIqE04kwlBWKBUEiNVYFpyqAyGEUCgqEtERiNNMLhQKzLQYJg7n7Y4aMAwbCUPvAQeWNgfzQQETAIhSMQEogwgBITQEGGEREmfiEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devfloppyunmount16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBMTCxARmZPz+/FSWlLSytKSipERCRIyOjISChOTm5HRydNza3GRiZFRSVCH5BAEAAAAALAAAAAAQABAAAARcEMgJQqCYBjFu1hxReN82EOhYGieaklJwHIjrqnGCJLqNWhUFYoFQCG1FgWXIIDIYNQKCoawQGI0swuFAbKsxgmDsfZjBkwDBsNM90Jot9A3DbBD0Dwiur9QnfhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devnetwork16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBAQCBISChPz+/Nza3ARaZESanCyKlARudARGTLy+vNzq7ARmbMTCxARufAROVMzOzKSipARyfOzq7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVmICAGZFmKQiACweCSBImq41AYB5IodLq2hwWO0ejRWDac48Gb/QKNqNRoqspmrVcAUuIJBANS8sBIFCORUgooPEh4J8B67NgdsVBp9C5XWfl9LRMTCyReX19hARNojWlWLH+AAH4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +devpc16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBISChHx+fPz+/AQCBAQC/AT+/AQCxAQChAT+BLy+vAR+BAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARYEIAgqK1YzsG754QUDERpmkEpkkXrtoK6EcVgHIibhnNx564Yb0TDvQq7FQ34EiqPOhnREqhWSUPsyZSQAbbg7GcMEgwUiYVivTa1R+y4XEGoWO/4AMAfAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devscanner16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBAQCBPz+/MT+/ASChARCRATCxMTCxFxaXKSipDQyNAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARTEMgJgqWBVivEldkUdKSXhVjZfenommglDERh3Tc4E4ZRHAGgkEPr9X6H5AHBERSMRyWzkug8jQXFEhWoOo8dRYxqLXSmGjIJnVaz29Q3fAP3RwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devscreen16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXFRSVPz+/PT29OTm5OTi5DQyNDw+PERGRExKTHx+fISChIyKjHRydFxeXDQ2NCQmJBQSFAQCBERCRMTGxHR2dGRiZExOTDw6PCQiJAwODCwuLFRWVOzu7BweHAwKDCwqLHx6fBQWFGxqbGRmZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAanQIBwSCwKAwKkMslEAgSDqDRKqBYKhkNgcDggEorkMrDQchkNhuOhgEQkk0l5S2lUGpYLJqPZTAwMHB0DCmhqAW0Rfh5zAxgOkBcCFAcfIBMECxwBBAEPFw8dChkhcBMDDAcdnQqtFKSWcQMimx4dGRkQBxGxsg6bBQEawx8jl3GnJFoFHRNXVVNRJYIFDAsL1tgiDiQXFx0HABwcXeQH5OjkRutEfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +devspeaker16:dev dev16 16:photo:16 16:R0lGODlhEAAQAIMAAPwCBFxaXAT+/DQyNATCxMTCxPz+/AQCBKSipASChAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAARWEMgJQqCXziDG2JoUEENhZBkmHIWJVptAmqcIW/Js1MiF56TBzkckAAcHoa9nMRKeA4TyJk0knsHhTeK5khBaH2VwLYVh40TJhQ6RzeIQV32Quz8hfwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editcopy16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAFxaXPwCBNze3GxubERCRPz+/Pz29Pzy5OTe3LS2tAQCBPTq3PTizLyulKyqrOzexLymhLy+vPTy9OzWvLyifMTCxHRydOzSrLyihPz6/OTKpLyabOzu7OTm5MS2nMSqjKSipDQyNJyenLSytOTi5NTS1JyanNTW1JSWlLy6vKyurAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAaUQIBwCAgYj0eAYLkcEJBIZWFaGBie0ICUOnBiowKq4YBIKIbJcGG8YDQUDoHTKGU/HhBFpHrVIiQHbQ8TFAoVBRZeSoEIgxcYhhkSAmZKghcXGht6EhwdDmcRHh4NHxgbmwkcCwIgZwqwsbAhCR0CCiIKWQAOCQkjJAolJrpQShK2wicoxVEJKSMqDiAizLuysiF+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editcut16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIEAAPwCBAQCBPz+/ISChCH5BAEAAAAALAAAAAAQABAAAAIwhI9pwaHrGFRBNDdPlYB3bWHQ1YXPtYln+iCpmqCDp6El7Ylsp6ssR1uYSKuW0V8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editdelete16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPT29GxubMzOzDQyNIyKjHRydERCROTi3IyKhPz29Ox6bPzCxPzy7PTm3NS6rIQCBMxCNPTq3PTi1PTezMyynPTm1PTaxOzWvMyulOzGrMymhPTq5OzOtNTKxNTOzNTCtNS+rMSehAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaKQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhSEQkFgrBAcr1URiPhKAsDD3QB8RhA3FM0IlLHnyUTVBMSFBUWfl0XGBMTGBcZGodmcQWKjpAbHIgIBY2LHRoempOdjooTGx8giIOPFYofISJ+DyMXI6AfFySyfiUmJSUnKBYcICIpfgELzM3OZX5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBFxaVMR+RPzKjNze3AQCBMR6RPzGjPyODPz+/MzOzPyKDPyKBPz29OTWzPyGDPyGBOx6BOza1OR2BKROBNSOXKRKBBwOBOzu7PTWxPzizOySZPyCDFxaXOy2lNRyRMxmJCQOBPTm1OzStPTKrMR+XIRWLFxGNCQSBDQyNIRSNDQuJERGRLyqlNzSvIx6ZKRuVEw6LLSyrLymhKSShBwaFFROTJyWjMS+vNzW1OTazNzKrHRqXOzezOTOpPTq3OzWvOTStLyedMS+rLy2pMSynMSulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAewgAAAAYSFhoQCA4IBBI2OjgUGBwiLBAmXlpcKkgsMlZcJBA0JDpIPEBGVjwkSBgOnExSfmBIVBxAMExYXswkYGRobHLq8gh2PHhoeHyAWIYKzIiMkJSYnKCnQg5YNHtQqKywtK9qMBC4vMDEBMjIz2dCMDTQ1Njc4OToz5PEEOzw3ZPToMcLHO23HfogQ0QMIkCA+hPBbhAPHECJFjMyYIUQIvEUpUqwQOXKkSEF+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQiFHRqNIx+LFxSBDw6PKSaRPz+/NTOjKyiZDw+POTe3AQCBIR2HPT23Ly2dIR2FMTCxLS2tCQmJKSipExGLHx+fHR2dJyenJyanJSSlERCRGRmZNTW1ERGRNze3GxubBweHMzOzJSWlIyOjHRydPz29MzKzIyKjPTq3Ly2rLy+vISGhPzy5LymhISChPTizOzWvKyurPTexOzSrDQyNHx6fCwuLGxqbOzKpMSabAQGBMS2nLyulMSidAAAACH5BAEAAAAALAAAAAAQABAAAAa7QIBQGBAMCMMkoMAsGA6IBKFZECoWDEbDgXgYIIRIRDJZMigUMKHCrlgul7KCgcloNJu8fsMpFzoZgRoeHx0fHwsgGyEACiIjIxokhAeVByUmG0snkpIbC5YHF4obBREkJCgon5YmKQsqDAUrqiwsrAcmLSkpLrISLC/CrCYOKTAxvgUywhYvGx+6xzM0vjUSNhdvn7zIMdUMNxw4IByKH8fINDk6DABZWTsbYzw9Li4+7UoAHvD+4X6CAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbGxubMzOzPz69DQyNIyKjERCRPz29PT29OTi3IyKhPz27PTu5PTy5Pz6/Pzy7PTq3OzexLyqlPTm1PTizOzavLyqjOzWvOzaxLyifOzizOTOpAQCBOzezAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaEQAAgQCwahcihYMkcBAiBpLJApRoOBWgyIKhWEQkFYYHkeqkMxKFBFpq9jgdkEGlPqwrJhCIY2N8FFRYUFxcYGX9dgRKEGhiHiYEOhBcbGBwdiQEOARcBGwEeAZllAgEUnQEfoQEgmp4hrCKtrwEYsrRlTiMBJAG8syN/IyMAxMXHSH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edittrash16:edit edit16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBAQCBKSipFxaXPz+/MTCxISChDQyNCH5BAEAAAAALAAAAAAQABAAAANQCKrRsZA5EYZ7K5BdugkdlQVCsRHdoGLMRwqw8UWvIKvGwTICQdmGgY7W+92GEJKPdNwBlMYgMlNkSp3QgOxKXAKFWE0UHHlObI3yyFH2JwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileclose16:file file16 16:photo:16 16:R0lGODlhEAAQAIQAAPwCBCQiJBwaHAQCBDQyNDw6PFxaXFRSVERGRCwqLAwODGRiZHx6fPz+/GxqbAwKDCQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAVaICCOZGmeqBgEwjCkRGEcSKK4JrEcBrMgAdeLVDg0GguGsYEbBQyGYyN6FDoPDIf0+LCKBIgetQERDgGDBGIpNY8GioAU0m6KXFw883w3+/l9f4AkfimGIn4hACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filedocument16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJSWjPz+/Ozq7GxqbJyanPT29HRydMzOzDQyNIyKjERCROTi3Pz69PTy7Pzy7PTu5Ozm3LyqlJyWlJSSjJSOhOzi1LyulPz27PTq3PTm1OzezLyqjIyKhJSKfOzaxPz29OzizLyidIyGdIyCdOTOpLymhOzavOTStMTCtMS+rMS6pMSynMSulLyedAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaQQIAQECgajcNkQMBkDgKEQFK4LFgLhkMBIVUKroWEYlEgMLxbBKLQUBwc52HgAQ4LBo049atWQyIPA3pEdFcQEhMUFYNVagQWFxgZGoxfYRsTHB0eH5UJCJAYICEinUoPIxIcHCQkIiIllQYEGCEhJicoKYwPmiQeKisrKLFKLCwtLi8wHyUlMYwM0tPUDH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +filefind16:file file16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBCQmJDw+PBQSFAQCBMza3NTm5MTW1HyChOT29Ozq7MTq7Kze5Kzm7Oz6/NTy9Iza5GzGzKzS1Nzy9Nz29Kzq9HTGzHTK1Lza3AwKDLzu9JTi7HTW5GTCzITO1Mzq7Hza5FTK1ESyvHzKzKzW3DQyNDyqtDw6PIzW5HzGzAT+/Dw+RKyurNTOzMTGxMS+tJSGdATCxHRydLSqpLymnLSijBweHERCRNze3Pz69PTy9Oze1OTSxOTGrMSqlLy+vPTu5OzSvMymjNTGvNS+tMy2pMyunMSefAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAe4gACCAAECA4OIiAIEBQYHBAKJgwIICQoLDA0IkZIECQ4PCxARCwSSAxITFA8VEBYXGBmJAQYLGhUbHB0eH7KIGRIMEBAgISIjJKaIJQQLFxERIialkieUGigpKRoIBCqJKyyLBwvJAioEyoICLS4v6QQwMQQyLuqLli8zNDU2BCf1lN3AkUPHDh49fAQAAEnGD1MCCALZEaSHkIUMBQS8wWMIkSJGhBzBmFEGgRsBUqpMiSgdAD+BAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filenew16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFxaXNze3Ly2rJyanPz+/Ozq7GxqbPz6/GxubNTKxDQyNIyKhHRydERCROTi3PT29Pz29Pzy7PTq3My2pPzu5PTi1NS+rPTq5PTezMyynPTm1Pz69OzWvMyqjPTu5PTm3OzOtOzGrMSehNTCtNS+tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ/QAAgQCwWhUhhQMBkDgKEQFIpKFgLhgMiOl1eC4iEYrtIer+MxsFRRgYe3wLkMWC0qXE5/T6sfiMSExR8Z1YRFRMWF4RwYIcYFhkahH6AGBuRk2YCCBwSFZgdHR6UgB8gkR0hpJsSGCAZoiEiI4QKtyQlFBQeHrVmC8HCw21+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBOSmZPzSnPzChPzGhPyuZEwyHExOTFROTFxaVFRSTMSGTPT29Ozu7Nze3NTS1MzKzMTGxLy6vLS2tLSytDQyNOTm5OTi5Ly+vKyqrKSmpIyOjLR+RNTW1MzOzJyenGxqZBweHKSinJSWlExKTMTCxKyurGxubBQSFAwKDJyanERCRERGRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaRQIBwGCgGhkhkEWA8HpNPojFJFU6ryitTiw0IBgRBkxsYFAiGtDodDZwPCERCEV8sEk0CI9FoOB4BEBESExQVFgEEBw8PFxcYEBIZGhscCEwdCxAPGA8eHxkUGyAhIkwHEREQqxEZExUjJCVWCBAZJhEmGRUnoygpQioZGxsnxsQrHByzQiJxz3EsLSwWpkJ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileprint16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBFRKNAQCBPz+/MTCxExKLPTq5Pz29Pz6/OzezPT29PTu7PTy7NzClOzm1PTu5LSabJyanPTm3FxaXOzCjOTKrOzi1OzaxOTSvJyenGRmZLyyTKSipDQyNERCROTi5Hx+fMzKzJSSlIyOjISChLS2tAT+BDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaYQIBwKAwIBMTkMDAYEApIpVBgOCAOg4RRGlAoEAuGIdGITgWOq4LxcCQgZkEkIHksHgYJOR6ZQCgVFhYJFxgTBVMZihoCfxUYDWUbUBGKGREcjBoQEB2TAB4CAx+Vl5WMhyACHiEhH6IfIiMktCQgE0cZJQStr6O2t6EARxO6vK6iEx4dZsMCxbsmBB4nzUTEutVSSUdmfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave16:file file16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBFRSVMTCxKyurPz+/JSWlFRWVJyenKSipJSSlOzu7ISChISGhIyOjHR2dJyanIyKjHx6fMzOzGRiZAQGBFxeXGRmZHRydGxqbAwODOTm5ExOTERGRExKTHx+fGxubNza3Dw+PDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaAQIAQECgOj0jBgFAoBpBHpaFAbRqRh0F1a30ClAhuNZHwZhViqgFhJizSjIZXQCAoHOKHYw5xRBiAElQTFAoVQgINFBYXGBkZFxYHGRqIDBQbmRwdHgKeH2YgHpmkIR0HAhFeTqSZIhwCFIdIrBsjAgcPXlBERZ4Gu7xCRZVDfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +folder16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9HzC3AxmnAQ+XPTm7Dy67DymzITC3IzG5AxypHRydKymrMzOzOzu7BweHByy9AyGtFyy1IzG3NTu/ARupFRSVByazBR6rAyGvFyuzJTK3MTm9BR+tAxWhHS61MTi7Pz+/IymvCxulBRelAx2rHS63Pz6/PTy9PTu9Nza3ISitBRupFSixNTS1CxqnDQyNMzGzOTi5MTCxMTGxGxubGxqbLy2vLSutGRiZLy6vLSytKyurDQuNFxaXKSipDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYHCImDBgkKCwwNBQIBBw4Bhw8QERITFJYEFQUFnoIPFhcYoRkaFBscHR4Ggh8gIRciEiMQJBkltCa6JyUoKSkXKhIrLCQYuQAPLS4TEyUhKb0qLzDVAjEFMjMuNBMoNcw21QY3ODkFOjs82RM1PfDzFRU3fOggcM7Fj2pAgggRokOHDx9DhhAZUqQaISBGhjwMEvEIkiIHEgUAkgSJkiNLmFSMJChAEydPGBSBwvJQgAc0/QQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folderhtml16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBERGRBQWFMzKzOzq7CwqLDw6NARqnAQ+XHR2dKyqrOTm5ExKTERCRHRydMTi7NTu9HS+1KSmpBweHDy67DyixHS61ITG3AxypByu7DxinBw+ZERmdIySjITC3ARypExOTDRurIR2RPTSdJyulEyGvBw+bFSyzJTK3LzKvPzivOTixNTChLSybGyCfCRSnBQqRASGtFyuzDw+PCRShPzy5OzerOTShKyaTEx6pCxerGRufBR+rOTezPTShNy6bER+1BxCfBQuRAxelFSixBw2VISq3GySrPTWlHyanIyitFSO3IymtCRujAxWhCRqlCQ6XGyWvNS2bFyGvDxuvCRSpLy+vMS+vGxqbFyO1GSi3EyO1FRaVCQuPLS2tDxyzKyWNFxaNCQyPGxubCxajERSVExKNJyenAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfZgACCAAECg4eIAAMEBQICBomDBwgJCgsEDA0BDg8BhwYQERKUDxOYDAyeghQVFhehGBmVlwwOqxobHB0eH6EfIAkPIYIiIyQlJhsnKBcpvrYiKissLS4vMDEyFjOvNAA1LDY3ODk6Oyc8PTIyFzQ1Jj42P0A6QTtCQ0REIEUORkdIkihZwsSekBhNnDyBciCKiSNSplDRUcWKkRhXCGDJYgiGli1cpuTocsILjytfFmRpACAGRTBhRogZgzHlAjKGWnIoY+bMgRgBDHRBo/LAIZoxuhwKatRPIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +folderlocked16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQSFMzKzOTm5CwuLERCRARqnAQ+XHR2dKSmpOzm5GxqbCQiJMTi7NTu9HS+1HRydOTm1Ozq7Dy67DyixHS61ITC3AxypERGRBweHByu7ASGtFyy1DSOtDRmfExOTBSazBR+rCwqLAxWhAxelByGtDSaxAwODHy+1Dw+PPT29IyqvCxujOzu7NTW1Nza3ExGJJyebKyqfMTCpFRSPOTi5DQqHOTezDw2NMTGxKyqhMTGrGxmXDQ2NMTCxMTGpHx6bHx2bBQWFIyOXDQuDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQICBomDBwgJCgsEDAKFDQGHDg8QEZQSlxMUDJ2CDhUWF6AYGZWXFBqCGxwdFh4XGK8fIAohtiIIIx25EZwBDREHgiQjJSYmGScoKSoRKQ8rggIsDC0uJS4oGygoAyjdAAcsLxQUMDEyMzQ1EzapBy8MDDc36tFwgONFjlQ6dgCEEZBHDx8+ctRIRehHAyAwZASZIGRIEBoUBwUwIGMCiwFEaBQJichIjo9FZLBsacRIAB0A/AQCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +foldernew16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAQCBPz+hPz+BOSmZPzSnPzChFxaXMTCBPyuZPz+xPzGhEwyHExOTPz+/MSGTFROTPT29OTm5KyurDQyNNza3Ozq5Nze3LR+RLy+vJyenMzKzNTS1Ly6vJSWlFRSTMzOzMTGxLS2tKSmpGxubBQSFAwKDKSinJyanIyOjCQiJERCRERGRBweHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaNQIBwSCwaj8ikcokMCIqBaEDoBAQG1meAUDAQpIcBQoy1dg2JdBqhECgQ1IWB0WgcBIOBwIHXBwwPEBEREhIBbG4IExR/DBUVFhIXV2NjDVYYDY8SFU4ZVxpVAQwbGxynGxkdTh6XVh8gGSGzGSITIxokJUImGSMTwLcnKCkprgAqDSt1zCssKxQtQ35BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +folderopen16:folder folder16 16:photo:16 16:R0lGODlhEAAQAIYAAPwCBAQCBExKTBQWFOzi1Ozq7ERCRCwqLPz+/PT29Ozu7OTm5FRSVHRydIR+fISCfMTCvAQ6XARqnJSKfIx6XPz6/MzKxJTa9Mzq9JzO5PTy7OzizJSOhIyCdOTi5Dy65FTC7HS2zMzm7OTSvNTCnIRyVNza3Dw+PASq5BSGrFyqzMyyjMzOzAR+zBRejBxqnBx+rHRmTPTy9IyqvDRylFxaXNze3DRujAQ2VLSyrDQ2NNTW1NTS1AQ6VJyenGxqbMTGxLy6vGRiZKyurKyqrKSmpDw6PDw6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAfCgACCAAECg4eIAAMEBQYCB4mHAQgJCgsLDAEGDQGIkw4PBQkJBYwQnRESEREIoRMUE6IVChYGERcYGaoRGhsbHBQdHgu2HyAhGSK6qxsjJCUmJwARKCkpKsjKqislLNIRLS4vLykw2MkRMRAGhDIJMzTiLzDXETUQ0gAGCgU2HjM35N3AkYMdAB0EbCjcwcPCDBguevjIR0jHDwgWLACBECRIBB8GJekQMiRIjhxEIlBMFOBADR9FIhiJ5OnAEQB+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailforward16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRydHxubHxmZGxiXHRmZFxOTFxGPFxKTPwCBLymlMy+pOze3PTq3PTu5Pzy7LSmnOTaxOzm5LyqlNzOtPz69Pz27MzCtLyqrPT27IRubPzuzNTGvNTCxLSelPz25Bw+ZFxKPPzy1Pz65LyupBxKdCxWfPTm1Pz23LyinBxGbGzO5DRafBxWfBxajCymxHTS5BxSdBxKbFTK3EzG1CSGvCyKvCSSxCSavGTO5GRaVPzqzFzK5EzG3BSCtAwiPGxaVPTivPzy3NzKpBxObCRefBxqlPTmzJR2bKyahAwyRPzmvOTOpKyObNS+nPz21AQOFKyOfPzuxAQCBGRORLSadPzyzLymjMy2lOzetDwuJFRCPEw6NEQ6LEQyLEQ6NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAAAQABAAAAfhgAABAgIDBAQFBgcIBwmOCQIKCwwNDg8OEBESjY8CDBMUFRYVFxgZDJyOGhsPChwVHR4fFSAhjwkaIiMOJBQQDRUVJSa3GicoHw4pEA8SGSorLI8tLtQu19gqLzDECTEyMzQ14zY1Njc3ODkqCTo7MjIxNCs5PD03PjctPwlAQUIihhBpQbCIihtG+CUocASFkAhIkogQ8kFJwkcFlogIkoRJEydPnkBR6GiAxiQLgiiIIkXElFQJqESoMsRKkAhXqkhhApNKFSxZggTJ4nHIEJhaDhzYwoVLFy1avHyB6ScQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailget16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAxKdBRSfCyGvFSm1BxKfCSWzCyWzBRCXCRKfBwuRAQGDDw6PHy23Cym1CSSxByCxBxunBQSFKyurMTCxExihNza3NTW1JSSlMzKzFxaXLS2tNze3KSipCQmJGxmbNTS1KSepLy2vISGhJSWlHx+fERGRPz6/IyKjDw+POzq7JyenMzOzKSmpCwuLDQyNIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaeQIBwGBAIAsOkUjAgFJRQQMHgjC4PBIEVgAh4D4aEYrGAMhINxwPyiCgYSsmEUmk82grLRZJkYCgXaAEKFxYZcEISGhsZFxwFeY0WHR5CDB8dGCAXG5shGxQicBIMpSMUGxgTGSQlpQwSJicnEwwdI7gdKAwTsykpKiobr8QMKxeHDBcsGRvOzxsT0i0uL9HSHdkT2ZkoMJXF4a8AfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mail16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBGxaVOTe1Oze3OTWxOTWvNzStNzKpEQ6LOTezPz+/Pzy7Pz69Pz27Pz25Pz21PzuzPzuxEQyLLyinLSmnPz67Pz23LSafKyObDwuJMzCtLSelPzy1My6nLymjNTCxLyqnPzq1LyihKyOfOzavOzetEQ6NPTq3NzOtLymnNTGxJR2bOTOpPTivNTGvLymlKSShKyahEw+NOTe3PTm1Pzu1Pzy3FRCPPz65LSadFxGPOzm3PzqzPTmzPzmvEw6NCH5BAEAAAAALAAAAAAQABAAAAaqQIBwSCwaj8ikMhloOp/QpmAgqAoIhELBUDgcEIGEYrFgNBoLx+IBiRwkgQnFoWAwKhWLhX3BZAILGhsCDXgODhwdGB5vgAofICBlDiEiIx4kJSYBJ2UoEykqHSMrLC0nLWAnFS4UCycvMAcEMR0RLTIBMwaSahw0NTYtFwclNwEdLws4eoc2DxwQOR06ASk7PBAhIRE9Pj0tLSUY1T8I5gjn6Qgy7D8SfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreplyall16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBLymlMy6pOTa1PTq3PTu5Pz27Dw+POzi3PTm1OTWvPz25FRSVERCRLympPzuzPTu7NTGvFxaXKSmpPzu1Pz65Hx6fHxqZPzq1Pz23HR2dBw+ZHx+fISChJSWlDQmJHRydCxWfBxGbJyenExKTHRiXPzqzPzy3CQmJDRafGTO5ExOTERKTGxWVCRSfHTS5CymxBxajBxWfPTmvPzy1CyixCSaxCySxDSaxDSWxDSSvDyaxGS21PTmzPz21AwiPBRejCSavByGtCSezEzG3FzK5FzG3GzO5FTK3CQ2bPTixBxqlCRefBxSdBxSfBx2nCQ+dHxmXPzmvLSafAwmRAwyRPzyzDw6POzavNzKpAQOFPzuxBwWTBw2ZGRORLyWdMy2lOzetPTivAQCBKyObOTOpAweNBwWVEQyLEw2LEQ2LDwuJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAf4gAABAgMEBQUGBwgJCguOCwEMDQ4PEBESDA4TjY8DFAwVERYXGBkRm4+QGhsMHB0eGB8bDpyOARogEBceIRgXv8COIiMkGB4lJSYnIcwoKb/DGyoXKywtKS4pHinMLzAxJDIzNDUtNjcv6B0hLzgfMh85OjstPDw99zwd7T4/LTVAgggZQqSIECNHevSAgSSJkiVMmjh5AiWKlClAiFARUeVHFSVWmLS40gNLlh5agGzh0kWDlwZfrIDREKaCAjEqrFA5MMYLmTAxlJTxYoZMozNozqRRs4ZNmy5s3LwhA0dBnDNn5MxBoAABnTp17IitowDrmQV+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreply16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTEw+NFxKTFxGPPwCBLymnMy6pOTa1PTm1Pzy7LymlOzi3HxqZOTWvPz69Pz25My+tLympFRGRHxuZPzu1LymjNTGvNTCxBw+ZPz23PzuzPz65PTu5NzOtCxWfBxKbPzq1DRafGTO5BxGbPzy9HTS5CymxBxajHRiXPzqzCyixCSaxCySxDSaxDSSvGS21GxWVAwmRBRejCSavByGtCSezEzG3FzK5FzG3CQ2bPzuxAwiPBxqlBxKdCRefBxWfBxSdBxSfBx2nCQ+dPzy1CRqlAwyRDQmJPTmvPTixLSafOTOpAQOFPz21BwWTBw2ZPzmvNS6nPTivAQCBAweNBwWVNzKpPzyzLyihGRORLyWdMy2lOzetKyObEQyLEw6NEw2LDwuJEQ2LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfqgAABAgMEBQUGBwgJCguOCwEMDQ4PEJYRDhKNjxMPDBQVFhAXGBUSGY8LGhsQHB0VHh8gFQ6bjgEhIiMMJCUmFbS2CwMnG6IoKSorI7WpEycWFiUsLSou1yXXji8wFiopMTIzNDUz4zbZNxsbODk6Ozw9Pj8pPzEzQDdB60JDOkRFjBw5giRJDCWdlmxwIIRJExAWKDRyMgTIiydLoESRImQKlSUSF1SxUoXAlSBRsGSJoCVICIlbqlThcoBClC5eYFD4EiVIFwUyqywAE0ZMlqNjpJDpIkUBl0dlFChAYOZMmTJoyqQR5icQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailsend16:mail mail16 16:photo:16 16:R0lGODlhEAAQAIYAAIx+fIRubHxubHxqbHxmZGxeXHRmZGROTFRCPFxKTFxGPPwCBHxqZLyqlMy6pOze3PTq3PTu5Pz27Pzy7LyinOTaxOzi3Ozq3LymlOTOtPz69Pzy5My+tLympPzqzNTGvLSelPzy3BxGbBQ6VPzuzPz65LyupNzOtPz+/GzO5BRejPzq1Pz23LymjHTS5CyixCSavBxqlPz25LymnGTO5CymxCSaxByGtHRiXPzy1CySxCSezGxWVPzuxKyOhMy6nDSaxEzG3PTivNzKpKyOfPzu1FzK5PTmzJR2ZLyihLSWfKyObOzmzPzmvDyaxOzavLSafGRORMy2lOzetDwuJEw6NEw2LEQyLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAsALAAAAAAQABAAAAfUgAABAgMEBQUGBwgJCguOCwwNDg8QERITFBUWjY8DFxgZGhsaHB0aD5yODB4TGB+kICEaIiOPCwEkJRcmJyYPKCIpKrWqKywTmC0SIi4vMDHEDCsyMg8zEyI0NTY3z7U4Hhs5Mx+0IyI6OyPrIzw9Gys+PxIy2EBBxAs8Qjk5Q0RFWFxAZySfgSMsilRAkiRECHQ08hHgJ0TJkCU/mECU2ISEkowUlpAQ4QTfowNPoAzJIeRJCyjm8kVRIkWIzSkXhwxJtYAKgp9VrFi5QoWKFZ5+AgEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PUZi0zmTtypflV0VdRJbm6fgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav1leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAP///wAAACH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxqdwoNGTmgvy9px/IEWBWRkKZ2oWrKu4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIdhI+pyxCtwoNHTmpvy3rxnnwQh1mUI52o6rCu6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIYhI+py+0PWwhxzmetzFpxnnxfRJbmufgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav2downarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+pq+EPXYpxUckoO3AjbF3dJwahllXe6AFgC8d+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2leftarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pyxf5VohmSlsxmpjTzAHeN5ak6UHpqKRi2GpwvH3Q3eT64RcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav2rightarrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAImhI+pq5HOAjQyVnqfhHue7oAaKH5kiW0AmnLqaHomkj02g+e6XwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav2uparrow16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIghI+pyxfR0HsRzNnuXVqn3mVQZWFRyIDjp65Ga5Ly4hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navback16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRSdBRObCQ2TBxObISevAQCBNzu/BRGZPz6/FzC3Pz+/HTS5ByyzJze7Mzq9ITC3AQWLAyWvBSavFyuxAwaLAwSHBRafBSOrDzW5AyixCS61ETW3CzG1AQeLAweLAxefBSStEze7CSWtCyatBSCnBRWfAwmPBRWdByixAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZiQIBwSCwah4HjUTBQFgkFg3MoKBykU0QhoUAIAuAksbpgNByPxQMSGVsVDYlkIqdUiJYLJqORbDgcHRseRR8gISIaEyMkGCVYRBEmeyAnlgaQkSgpmU4RAZ1OKqFOpFNGfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navdown16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObCRKZBxCXAwyTKTK3Ozy/NTm9GSivAQWHNzu/FzC3IzO5CySrAQOHAyuzETS3CSWtAyOtETa5Aw2VLze7ByWtBy61BSavAxWdBRCXAwqPAQCBDR+nKTe7FS+1Eze7ByixBRmjPz+/AyexAyixAQKFBRqjAQGDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZeQIBwSCwaj0hAYCkYEJLKguGASEADigWj4bgaHpBINykwSCYRa5HCFFQsF0xGo9lwhpSOwfORYC4gISJ3RAQdIyQYJSAlImNrh4uNJkl5CoKUUBQnjlB4KJ6hokN+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navforward16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBAwyTBRObAw2VDR+nCRKZOzy/KTe7Pz+/KTK3Nzu/Lze7FS+1AyexAyuzBSavAyOtBSmzOTy/BRqjNTm9IzO5ETS3ETa5By61AyixByixBRmjAQGDBxCXGSivCySrCSWtBTC3AQOHAQWHAxWdEze7AQKFBRCXAwqPAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZjQIBwSCwahYGjUjBQGgWEpHNYMBCaT4G2UDggos+EwmBYMBpf6VBgYDgeEMgjIpmoAQVKxXLBPDIXGhscRB0eHyAgDSGBGyJFASMiIiMkJYImUwAnmJqbjp4AKCmhAKSlTn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navhome16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBDw6PBQWFCQiJAQCBFxeXMTCxJyanDwyLDQqLFRSVLSytJSSlISChCQmJERGRFRWVGxubKSmpJyenGRmZLy+vOzq7OTi5Ly6vGRiZPTy9Pz6/OTm5ExOTPT29BwaHNza3NS6tJRqRGQqBNy6pIyKjDwGBPTe1JSWlDQyNOTGrNRiBGwmBIRaLNymdLxWBHxGFNySXCwqLKyqrNR6LKxGBNTS1NTW1Jw+BEweDDQ2NAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaoQIBwCAgIiEjAgAAoGA6I5DBBUBgWjIZDqnwYGgVIoTGQQgyRiGRCgZCR1nTFcsFkHm9hBp2paDYbHAsZHW9eERkYGh4eGx4ag3gfSgMTIBshIiMkGyAlCCZTEpciJyQjGxcoKUQBEhcbIiorLB4XEltDrhcaLS4vtbcJra8bMDHAGrcyrTMXHjA0NSypEsO6EzY3IzU4OdoTzK0BCAkDMgkIOjJlAH5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navup16:nav nav16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBBRObAwSHBRSdISevBRWfAweLNzu/BSOrAQWLPz6/FzC3DzW5BxObHTS5ByyzAyixEze7BSStBRWdAyWvByixAQSHCQ2TAQCBBRGZJze7CS61BSavAxefMzq9ETW3CSWtAwmPPz+/CzG1ITC3FyuxBSCnAQeLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZfQIBwSCwaj8hhQJAkDggFQxMQIBwQhUSyqlgwsFpjg6BwPCARySSstC4eFAqEURlYhoMLBpPRUDYcHXt7RgUeFB8gIU0BIoiKjAcUIwiLSQUkJRsmGIwJJwmEU6OkfkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playeject16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+py+0R3IFQUtruXVqn3kkWyIARR4rqKvoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playend16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+py8Eb3ENRggrxjRnrVIWcIoYd91FaenysMU6wTNeLXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playpause16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIfhI+py+1vgoxzyUCxrZd18ClfmIyVyJ1lqkHuC0N+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playstart16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pyxudwlNyguqkqRZh3h0gl43hpoElqlHt9UKw7NG27BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playstop16:play play16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+1vgpySUWpvXXqrHmSaeJEYhKYq6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textblock16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py40Bo5SOzRvrwlgrfnkJOIkPaaaJXwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textbold16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIihI+py70BowPQ1HZpwNv212Vg9IGHmIjoWa4ey5DSRNd+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textbottom16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIVhI+py+0Po5y0hYtzrkB7zH0fN/kFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textcenter16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsnRkqtDnhu1zHfFSpjaY4PavgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textitalic16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+py+0BgztwUmmjBXX3jE0auHHhM5Yq4xcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textleft16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsgRoqr3Vnt102fFSJjUC6nlPoFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textmiddle16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIXhI+py+0PT5i01pisphjt3UmfFZYm5hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textmove16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIbhI+pm+EPIZsg2kfZvblXbwTg10WlA4rjyvgFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textright16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIahI+pm+EPIZstSrqsDhhv1ylfFE5jiYwX6hcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textsortdec16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BPwCBAQCBAQC/FxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM5CBDM+uKp8KiMsmaAs82dtnGeCHnNp4TjNQ4jq8CbDNOroIe3ROyEx2A4vOgkOBzgFxQ6Xa0owJ8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +textsortinc16:text text16 16:photo:16 16:R0lGODlhEAAQAIIAAAT+BAQC/AQCBPwCBFxaXAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAM4CAqxLm61CGBs81FMrQxgpnhKJlaXFJHUGg0w7DrDUmvtPQo8qyuEHoHW6hEVv+DQFvuhWtCFPwEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIlhI8Jwe2/AmpTynqPTXSqrnBM+I0kdmpmGmUp+K4nPMvhYx9+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +texttop16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIWhI9pwe2uYnq0yQtqxbz7D4biSIZ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textunder16:text text16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIjhI+pu+FxXoOIKpds1oBH7hlYxYxRCaIZ01lhJbHy9tTv7BcAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewchoose16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMzCLrcGlAs6UAYgwLdLtEcI4ygQo7VVp2oupGpG4vmaUVTemX523qlFcw0a4RqNlkx5k8AACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewdetailed16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMmCLrc/i1IAVkYg1Z1iRYUKCqitp1oikqBWV3ZOnhkWNagqu+qnwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewicon16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrcG1AwGOQbw6qANeCEB3pCSZpO6pgowJZqLKuUGE0dnuEhf8IL1kz1shSHDX8CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag-16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ+QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7Kmpl0CtLGLvbW2Zn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmag16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAZ8QIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6eUAFCusJSzr7GLArS5Q7O1tmZ+QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag+16:view view16 16:photo:16 16:R0lGODlhEAAQAIUAAPwCBCQmJDw+PAwODAQCBMza3NTm5MTW1HyChOTy9Mzq7Kze5Kzm7OT29Oz6/Nzy9Lzu7JTW3GTCzLza3NTy9Nz29Ize7HTGzHzK1AwKDMTq7Kzq9JTi7HTW5HzGzMzu9KzS1IzW5Iza5FTK1ESyvLTa3HTK1GzGzGzG1DyqtIzK1AT+/AQGBATCxHRydMTCxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAaBQIAQEBAMhkikgFAwHAiC5FCASCQUCwYiKiU0HA9IRAIhSAcTSuXBsFwwk0wyYNBANpyOxPMxIzMgCyEiHSMkGCV+SAQQJicoJCllUgBUECEeKhAIBCuUSxMKIFArBIpJBCxmLQQuL6cAsLECrqeys7WxpqZdtK9Ct8C0fsHAZn5BACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewmulticolumn16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAPwCBDQyNAQCBPz+/PzerAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAMwCLrc/ixI0WSgKoyBl+beQFACpo1AqXbKCr1wLAMWS08hGG3dSZqin4sxnBmPD38CACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewtext16:view view16 16:photo:16 16:R0lGODlhEAAQAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAQABAAAAIchI+py40BTQSwuovp3DXkv1ia1IHmIXLiyWJ+AQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewtree16:view view16 16:photo:16 16:R0lGODlhEAAQAIIAAAQCBPwCBDQyNPz+/PzerAAAAAAAAAAAACH5BAEAAAEALAAAAAAQABAAAAMuCLHcri4yGISlj4kxcANgNRBQCIbL6U1Su7bB62rXvGydG25kqpwfIGxILBr9CQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actattach22:act act22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBMTCxPz+/DQyNKSipAQCBISChFxaXDw6PAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARrEMgJgqA4zzus/gLhFd5HCcZAXqsphYPUdhcYFNRcZnvdtpnDqPTbUWgAJKBYwzBlw+bRo3xmkNWoBgm0OrVLn3GC9RgCk8DhUw7c0rHPr4CDu5SYQNyEt7uSY3p/UAKFhYKDSQOLiwgFdhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actbookmark22:act act22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBCQmJCwqLMTGxAQCBBwaHMTCxLSytERGRFRWVLy+vKyqrKSmpHR2dJSSlJyanISGhGxubIyOjKyurGxqbFxeXGRmZHx+fKSipLy6vGRiZLS2tFRSVHRydJSWlHx6fCH5BAEAAAAALAAAAAAWABYAAAWWICCOZGmewamaQrq+wUC8azHINGocOI38iIRAceDNaISFYklkGHOEhoNBfUAOhuOLEJE8HoPiRKFdESiQBqViuTDIUAsEcyAeGJmyiqC5RCwJGg0YcEh9D0V3Dxt6JwQVDRYVHBUdi40mjw0PTgwQHgeYJQQJfxUXFxAOoTkFpQ0fsRSimQkWEQ0VtI62HLt7vjl7JQYhACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actbookmarknew22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCwqLCQiJCQmJMTGxAQCBLy+vLSytERGRFRWVKyurKyqrLS2tKSmpHR2dJSWlKSipISGhGxubIyOjGxqbIyKjFxaXGRmZHx+fPz+NGRiZPz+ZPz+HMTCBKSiHPz+jFxeXPz+XPz+tPz+zPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAamQIBwSCwaj4Gj0hgQLJ+AAaEAVQoI06pRYDhkoYgwIhEgKBTfZ2FhaBsYDS8VWnA8Go0FJIKeqyUTDw8EDHBpSwUUFQ4UFhcYDQYFfkoFFxEQDG8KEAUZlEeWGBIakw4FG1STiBoYBRwdBR4fHgUdHKBEBSCnIR8iIyIfIblFu6ceIyQjtcXGCbLKzAUKzrq+wMLEVa+xs7W31kOTk6nkWuOf6Ea5QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actexit22:act act22 22:photo:22 22:R0lGODlhFgAWAIEAAPwCBAQCBHR2dDQyNCH5BAEAAAAALAAAAAAWABYAAAJOhI+py90RnIMyRUOxhDfzJkACdoXBuEDDkQFDi5go0MrKx16kns80b7qdELCgBYaEGWwL5nG1ePFiKp9A6kuYRNuho8vxVrrZivmMRtMLACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +acthelp22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBCQuNBwiJAwiLAwaJAwSHAwSFIy+3ERynCw2PCQuPAwmPCxOZCxWdJzG3FSazBwmNAQKDAQGBDRmhBQyTDxujDR2rIy21AwWJDyGxCxmjAwmNDRihAQOFDxmhCxunBQWFAwaLCRahDR6rESGvDQ2PCRWdDRunDSGvCRSdAwWHCwuLDSOzHSmxDyKxBxCZBwqNHSu1DyOzAQSHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAahQIBwCAgIBAPCoGAgOoeBAyKhWCwYDUf0CX1AIhLiJEGpBLiAAaRxdgYsl7Ybk8igBZoN5xmAdDxoanp8HyANISF8EBsiXBMjJBolBEQmGHFoRScbKHIKDykqK5lFAZRCnyknTaROLA8tq61OChgtKqyzQgEYEJi6UC4vI3LAASkbMBPARAEBdszR0sACEaPSMTIQM8W6KzNl3bo0NOJDdEEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actlock22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBHRudFxaXExGTERCRAwGDGxubPz+/Pz2/Ozm7Nza3NTS1KympFRSVHR2dNTO1JSSlKyqrKSipDQyNMTGxDw+PLSutKymrMTCxAQCBHRqLBQODJyanDQuFFxSJFRSJFRGJERCHExCHISChHxyLEQ6HGRaJExKHLSmbLy2fOzitPz23KSiZHxuNHxyNJSOTNTOnMTCjLSudKSaXJSKRJyOTOTetNzWpHxuPOTi5MzKzLS2tFxWXOzq7Ly6vOTe5Ix+RLSqdNzSpLyydKyqbKyiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBAgMEBQKEjI0GBwgJCgsMDY2XjwkOAgQBDxCLl4QNCaGCBBGWooINCAqqrBKgqwATFKaDFRYVtBMXsIMNGBm0GRADjQIJxKIaGxwdHh8gISIhGyMZzIwkGholJiYfJiAfJyEZISDbg90oKCkqKwcHKyooLC0f7IIuLzD2YMSQgW8GDRri+AFoUMOGvRsxUhSsQQPHvmQSchyQtEAHhh0WJHDQcJERjwsKDvRI0BGDjwgicXhQyCOjSgUKPO6AObIkIQESfmxk6REDT4s0bfaYpDNkT4VAha5s+TLmzEYtatwIOHAiDZIKNQAJYk9IjCFEisyoocFEB4UACtBpm0t3LiF4gQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +actredo22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3Pz+/JTWbHy+VHTCTMTivPT69BxGDESuJDyiHESiHEymJIzKZAQCBFS2LFzKNGzWPDRqHCxqDFSqLHy2XESCHAwaBAQOBBQqBDyWJHyqZDyKFGSiVESeJBQ6BAwSBGTGPFyWPFSSLEyOLESGJBQiDAwiBBQmDCRGFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaoQIBwSCwaj8hkMcBkKpcBwYAwEDif0YLhwEUkFItFMkAwMBoOR+PxgHwjRDggamhIJpQ8ZbKGKOQLcgEFdhUWEYgRF3sNfhELBHALAhgZFhobRBwREhQdEAIEHpIKHwsaSJwUDQgQIJINARxKESESDQ0dgCIjSpAkDAwPco+ZSJAlJicnKHIAIrNHidOIQxunT0kpCyrZSCss0d5Fj6jjRonn6uvs2QZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actreload22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBCRSFCRSHBw+DBxCFCQ6FBwyDBQWBBxGFCxyLGTChMzqzLzmvHzKjDyOTER+RERyNDSqXNzy3LzivFS+fCyCPBQmBCQiBBxKFBQqDOTy3LTitES2dDR+PCxuJOT25KTarCx+PESSTCxKHDSeVCyKRNT21ESWVDSGPBQyDAQCBBQSFDRuLDSyZDySTGzChCRiJKSmpExKTDS2ZGzGhLy+vGxqbISChDSKRMzKzGxubDQ2NIyOjCQiJCwqLBQWFCwuLKSipERCRERGRHR2dAwKDDw6PFRWVIyKjCQmJFRSVBwaHKyurAQGBExOTBweHFxeXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf9gACCg4IBAgMEBQYHhI2ECAkKCwwNDg8QBAOOhAQREhMUFQgWBxcHGBmbggkaGxwPB4yDB6SbBJIKHQaqtY0eHyAhsqrDgx4aCiKpqoQHAyMjJBMKJaSxzAAHIRsmJgonKA0LHSmDKiuOBywRLSQuLyEwwyoxMuiN6iUzNBXy5jU2bsgoJugABBz95uXQsUMGD3vpPPgTpKIGwx4+HMr4kW4YkCA2hAzxAQSIECI+imBTwVIFESNHerRUgc0cEiFHkjiiyYzeDiVLdvLcySSkkKGEWiZVweSGkIHMmvQosoQlkaZOjvhosvKJjIAxoOAsgpRZkQNLnvSoqspAIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +actrun22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAwKDAwKBCQiHNze3AQCBBwWFDw6NPTy9PTy/Dw2NKyytOTi3LS2tMTKzMzOxLy+tLy+vBQODNze5NTS1JyalIyCbIx6VIRyVISGfJyelOTq7EQ+NMTGxKyurGxeRLyKPOSmROSuVOy2XOSiTLzCzNTOzDw+NCwqLHxuVOy6bPzGfOSuXNTW1LSyrMSWRNymTOSmTKSCTPTGjPzSnPzWnMyaVBQSDMTCxPz+/KyahNSeRHxeLJRyTPzmtPzarOy6fJyajNza1Ly6vLyulFRCJPzirPTOlMS2pNTSzMTCvJyenBQWFNzKtPz6vPzyvPzqtOzGlOTe1AwGBFxWTLy6tPTm1PzSpPzutPz2xPTSnOTSxOy2dPzapPzerOzm5IR+dPzu5Pzu1PzqxPzy5Pz+9GRiXGxuZKympHR2bOTm5Pz6/MzSzBwaFJSSjCQmHPz2/AwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeEAQKIjIIDBAQDjYMFBoMHCAkKgwYFhwULDAUKCg0ODxCkBQgRnoUSExMUDxUWFxgZGpAbFIuGHB0eHyAhIiMkIB8lJieIKCUpJCTGIyorLCktKIUDpC4YLzAxIjIyMzQ1NhgdpJI3ODktJTowOyM8Ejc9Pj9AQUIEclAocCMIBQhDiOwgoaKIoCI+jBxBkkSJkCWemIyq0GSHCBVHihRx8gRKFCmpKhGaQqWKFYZXsGR5kkXLFgRUXBUqkCGCFS5AjnTx0sXKlyA6CRVgAAHMAilhxIwhU6ZFkBY5kgKYUoXBAzMKzixZ4AJNGgVm1KxhM0WpmQpUMtooaOPGxAM3Nw60oYLGjNYCbzYJOgAnRzNBJ95oPYQCgpJtkwzFoULlRuRPiy9fNhAIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actstop22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAASC/CQKDBwKDCwODNyKjPzq7My+vIxiXAQCBOSOjPz6/OSelNySjNyGhMR+fLRaTGQ2LPz+/Nx+dNR2bNRybMxuZMxeXMxiZLQSFJQaHFwqJNyKhOSCfNyCfNR6dMxmXMxWVMRORLQODOR+fOSSjNR2dMQ2LJQWFMRWTLwWDNSCfMxeVLwaFKQODNR+fNx+fMxiXKQSDOSWlMRSTMxaVMQ6NMxORMQyJOTS1MxqXLwWFLRORMxKPMQaHMxKTLQWFCH5BAEAAAAALAAAAAAWABYAAAb2QIBwSCwajwGBcikIHIsDQmFKNRwQT2EgoVgsGOCG4wHBIgmRhWRCqVQsF0xGYyYGNgoGh9PpeCQfICEic3UAAWgLIxwRJBsbHSUREyYYJ3RDAQULexGejhueESgpl3WaCxsqJKKsChEUKywtmFoFDC4vCayikzCyMbWHt38NCTKiHhUfMyzBdQIFKsodob0VNDWzwppuKxMRrx6iNjcitNA4bh+iEzkwojc66JkOOxcf7G35PBE9KS1MEUGgIQOIFfk++KjRw9wJgUUIZvhRoyLDFCliQDQisUWLGCJOeNx4hKCGkyhPGnqCoKVLl1liypyZxUAQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actundo22:act act22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBCReDJzGjMzivOTu3PT69MTivHy+VJTWbIzKZEymJESmFESiHDyiHESqLAQCBFzKNGzWPFS2LNTmzCxqDDRqHPz+/KTGnBQqBAQOBAwaBESCHHy2XBxGDOzy7HTCTEyyJDSqFHzWTAwSBBQ6BIy+dESKJFySPFSSNAwiBCRGFBQmDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMsBkKotMwYAwEDiXgYLhwD0gCFZiQKxNKBYMRqPh+D6G16y5AYnYIxBJAyF4AwITTAUJdBESD4gPFBV6Fn6ABBcJDIYPGEQZGhQbHAIdfx4JHw2VSBodGwWfAR4LDSALfkgYAQurBiAhICKfSSMkvQElGyYnGyi9Rxkdj4nOskUYyU9FpxnURikdGtjRKivdRKfQ2Inh5+jpRwZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +actunlock22:act act22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBGxqbFxaXExOTEQ+RAQCBPz+/PTy9Ozq7Nza3NTS1KSipFRSVOTi5Hx2fJSSlKyqrJyenJyWnDw6PMzKzKyurDQyNFxWXMTCxJyanHRuLHxuLGReJFxSLFROJFxWJExCHERCHBQODISChHxyLHRqNIRyNHRmLLSqbKyiZLy6fOTarPz67Pzy3OzitKymZFxSJJySTNTSnPTy3NzSpMTChLSydKyqbKSaXJySVIyGRGReLPz23NTOnMzCjHxuPLy2vKSmpOTe5LS2tLSutHxuNHRuPMS+xFxWLIR+RDw2HFRKJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SDAQIDBAUChY2EAQYHCAkKCwyOjZANDgIEAQoPjJiDAg2iggQQp5gMBwmrDBESl6MTFKuoFQSjABYRF40CGAW8BRm7hQwNxBobHB0eHx4gISIjBdiEAhYFJBslHOHSHh4hBSHlxIUmJygpKissBiwtLi8pGjDqhBoxMjMuaNSwcSMFjhw6dnjYRyrGCh4ueviw4Q5HDB0/PjAUJCBCAwMIGiiggAEIBFk/FgYLIgRkggQkhxAJkqGExkYMFnxsIGRkSQgLHhRRWUjAggQgG8AsSWRBBiP6VrYMOfKIyaBDNwLo+HHSUplOSyDRqiEHjRkretRQkcLgxayNF0wksQGQxsSKMTIq0QpgCba/gAE7IhMIACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +appbook22:app app22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBDyGhCyCfFSWlESOjDyKjDSGhCx+fGSinGSenFyanEySjHSqpHSqrGympEySlBx2dISytHyyrCR6dKTGxHyurHSurHyytGSipCR6fARmZFSalEyWlBRubAxubBRydDyKhDSChLSytPz+/MzKzIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbFQIBwSCwaj8ikMhBQIpmCQdM5ZBIKhgNiugwkFAsCI7pNMhuOxkNBgBgEiAi3GkBLJpJHYgEpaClyREwVFhcSEhgOGQoMfgMaERtcARQBFRMYExZ6HB0FUYAekkIBHxqWFmlrC1haESAfG6MBGx+VFRgKYH0hInGRklO0ppYXCwwMWQiQHkwjgrWnFRdYZHIBJCTP0LaWGAcDW9jZ2nMAw9IWTOQkJSZMRsOV49nu8E+19PbmR7TY+1TovONH5V7Ag0QMBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +appbookopen22:app app22 22:photo:22 22:R0lGODlhFgAWAIYAAAQCBAQ2NPwCBHSurIS2tBx2dBweHPz+/Ozm1GxiTGyqpPz6/Pz69GSqpOzaxPzy5HxuVLSmlOTazPz27PT29NzClPTexHxuXLSmjAxqbFSinPTy9KyehNy+lPTy5Pz29HxyXNzWxKSahOzexPzy7IR2ZOTWtESenPTy7KSWfIyCbKyijAQGBDyalPTu3KSSdDSOjJyOdCSGhPzu3OzizJSGdPTq1PTq3JySdMy6lAyKhOzWtOzi1OTOrJyKbMS2nJySfMS+rAwCBNzOrNTCpNzKpJSGZKyafLSifLyylIx+ZHx6ZDSChAQuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAWABYAAAf/gAABAoSFhoeHAAMAiI2IAAQFjI6EAAaJkQeTjwAICYkKBQcLm5WdBwyfhgChB66bp64HCQC1lQ2irqQCAA4PowsLEBESE4wAuLIHFAAVFr+uDBcYxRm1GrmuGxwdFh4Mrh8gGCET1gDYyhsiFSMkDAsMDCUYJhvnJ9kHKCnODwwfPlBQsULCPRYAWogK9sHFiwoOPEyQh0JFPXO1YBSYwBEFghjdHkwQOYGgwQwIZRR44GHGDBogabhAsYEEihrUMAIoUMCEDRs3HODIYQHFA6MPcJA7KICFjgw7eIzo4cOfiwc/gKwIUm2SkKdDdlDt4AABDaU/iIRwwbTSUyJFOow4S3Hkx9oNDDZgXPU0h1wcSIgEGUw4ibVET5WoWMKksePHpdxmyKADAEIWly9HJtQkQJMmlAgZCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +apppencil22:app app22 22:photo:22 22:R0lGODlhFgAWAIMAAASC/IQCBPwCBPyChMQCBPzCxAQCBPz+/MzKzISChKyqrDQyNEQCBAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARYEMhJ6wxiEMtpIAWxddwXiqRlikSQeiAbuC+wirNR322gv7zcLobzDU+9XypoBBKTR1lz+RTWDgip8nUwZK1XLyIx5XoVicX2RUAo1DVKi7GOBxjxfNwQAQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +apptool22:app app22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBISChFxaXNze3NTS1Ly6vKSipNTO1Ly2vNza3Pz+/MzOzOTe5DQyNOzu7MTCxGRmZMTGxPTy9Ozm7Hx6fPTu9MzGzGxmbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAW1ICCOZGmeaEoGbBsI6joMRGEcbQwESDIrtVtAF1gwDLNaAmfKiVgLBJKgwB1KxQZrBHU0FAXmavFoQLYiB6TxFXMj5AZBwnJI2I3wcNWALyYEcgoKXxRhOHs7XxEVCwsWFgoUDRYUFwwQB25ZCxiNjo6GkwUXN2NsCxEYqhUHoQ0MEglYRQQXErcHrI55FycuB2YSmoyOBTEtB2sXuhU6XAENC2a6z9AKCwq+1tAN3E2J3ySkIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +connecting22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBISCBAQCBPz+/MTCxOTi5AQGBNze3Ly6vISChNza3FxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAAR4EMhJqwzY6omD+MNGdR8YilNZnug0qGzrqrL1lnV1fyJBVB6VQEMoGH4ADGwQkxQPBwMiKGA2J8VEAnq0tgiKg5aL/C7C2gTjKCM0zowDQ8tuNQznNL7cKzjOUQsNfER+gguIg19+Pm6ChBZFDmWNi5M5FIyYFHQRACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +connectno22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBPz+BMTCBERCBAQCBPz+/MTCxOTi5Nze3OTm5Ly6vNza3ISChFxaXKSipAAAACH5BAEAAAAALAAAAAAWABYAAARiEMhJq7046827/+AVCKE0Dh9BAGdaGISAToFGFMcBU+11I4hDYseSZQiKwwKoI/QwBIYiuFDCZseGdIlYEjUNg1SpY6w2N4cUIW6cjwW1lsFwo+MqgtZuw0/ydw5vH34lBhEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +connectyes22:connect connect22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBKyirPz+/KymrOTi5KSipMzCzNza3OTe5Ozi7MzGzPTq9OTm5ISChMS+xFxaXNze3GReZIyCjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWLICCOZGmeaBkAQpoGg7C6JizTQT7CxPwOwFWgYPChYIXkIHC4uQKGAiKRKCyNpxxUUVViVYNFLkqtLo+DAkMMLXQPXwAy2WCTF4544FGtKuwPDhB6DnxuUmyCcXIQhV1uYoMuEAcOBxEKCHg6TzGFCJUSizuejROKOAM9OY2SnUU7nD89NCcDsLUnIQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +devscreen22:dev dev22 22:photo:22 22:R0lGODlhFgAWAIcAAPwCBAQCBPTy9PTu9Ozq7OTi5Nze3OTe5Nza3NzW3NTS1MzOzMzKzMzGzMTCxMTGxOzm7AwGDBQOFBQSFCQeHCwmLCwuLDQyNDw6PERCRFROVEQ+RDQ2NLy+vKSipISChGxqbExKTOzu7OTm5Pz+/GRiZMS+xLy6vBQWFLy2vCwiHFQ+NMSmfNSyhIxmTDwuLJx+bLS2tCwmHMyyhMyqfPTqpPzyvLSWbLSWfPzitIx+ZDw2PAwKDCQiJGxWRPTmrPTerMyuhPzqtPz63PTWnPz6zNy+nIRiVDQuLKyWbOTanPz21NS2jNS6lDQqJHRaTPzmrPTSnPzyxOTClPz2xNSuhPTqxPzuvOzSpAQGDOTKnMy2jOzSrPTu1NzKnOzOnBwWHJRuXLSWdPTatPzqvNzClCwmJOzSnOTOnPTuxOzKlOzerOzarOzitJR6ZNTO1IxmXPTWrNSyjPzOjPTSpLSehHRqZOzirOTCjPS+fPzGhOy6bOzKhGROPMy2lPz+1PzmtKRyRHRiNNTCdPz+zNzCjEQ2NKySdDQmJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAj/AAEIHEiwoMGBARIqXMhQIUIBAwYQIFCggIEDCBIoULBgAYMGDgIIDEBAwMSKBRBk3NjxAciQIwdACBBBwgQKFSxcwJBBwwYMHBx0EAmA5EwPH0CEsCChoYgOQ0cSGCHhA4kSS5syJGDiBNEAFVGUKKEBAwWFFM6SNJHi64gDFEKE4FBBggoKK1i0cPECxokYXw0gsECYggQZM2jAqGHjBo4cOtqOxLhDAg8ePXz8ABJEyBAWRIoYOfJipEoMCZEkuaFkSAslS5jUGJKkSRAnRREo0JDwCZQoTKQAmUKlihQrVa5gKZ1lI+oAK7QM2cJlSZMuU4Z4+TJEx0iNOwKAggkjZkyOFmS8kClzpcUQLRRGbjRD4MgZNEzSqKG+ZgobI2248dUbDDDwABzcxSEHEFpgEcUcdMRRhx1fFejAAx0cgcYdSxiBRx566LEHH0d8QFRRNC3Uhx985CHEH0MAEkhCBxWkgiCDFEFIEYUYUmONMhyCRxVH/PgjBYioYJAdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editcopy22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFPz+/DQyNISChDw6PMzKzMTGxERGRIyKjFxaXMTCvKSmpHR2dPz6/Pz29PTq3MS2rPz69MTCxFxWVHx6dJyWjNzSzPz27Pzy7Pzu5PTm3NTKvIR+fJyGfHxuZHxqXNTCtPTq5PTi1PTezNS+rExOTFRORMyylPTaxOzWxOzSvNze3NTOxMy2nMyulMyqjAQCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbYQIBwSCwahYGkUnk0BgTQ6IAQaBKfUWhBYKhaAU+CgXAQIAyChLeJzSIQhcH6GFaM0QtGY5kstqEODw8QEQELAhJTc08KBBMEFBUWDRcBE1pca20SGBkaEBscAY5maFRIAgoLHRQRHh8gIQFlZnByqA8ZGSIQIyQjJQEmYgJ5p2ACrK4gJx4gKIZZAgdeAQ4ZI9kjKSor0AwEjeAs1S0cHAslLi4vMDDRWeRIfEsxMeET4ATyVoYLC5fizXEiAR84BeMG+pEm8EsAFhAjSlR4hR6fLxiF0AkCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +editcut22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBAwCBPz+/OTi5JyanOzq7DQyNGxqbAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARbEMhJq704gxBE0Bf3cZo4kRJqBQNRfBucyudgvJS6VaxLzyMa6/bLiWA9HOg4VIIkL5vzuRkcpkvRIIAorphJLzBW84WEuRZWp6uaT7J2Sh1Hit3OY/ZO7WvsEQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editdelete22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAASC/FRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanPz+/Ozu7BQSFCwqLDw+POTi5PTu7MzKxIR+fCQmJPz6/Oze1NTGvPz69Pzy7Pz29LyyrPy+vPyupPTm1BQWFIQCBPwCBMS6rPzSzNTOxPTi1NS+rPTezNzOxPTizOzWxMy2pOzaxMy2nPTaxOzOtMyynOzSvMyqjPx+fOzGpMSihPTq3OzKrOTCpNzKxNTCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf8gACCAQIDBAUGBwgJCgsLgpCRAAwNlZYODxALEY+SkAMNEqKjEw0UD5yegqCjrRMVEqidkgWhraMWF7GptLa3EgEWFRSOnhW+vxgZEBqzkBvItxwdHryRCNGjHyAhHSLOgtgSI60c2yQjJd+eJqEnKK0hJCgnJSngAO0SF+8qEvL0VrBogW+BLX4oVKgIyMIFQU8KfDV4R+8FDBcxZBREthAFiRIsOsygsVEUh4Un3pGoUcPGjZInK65QicPlxg8oX5RwqNJGjo0hdJwQ6EIkjRM6dvDYCKIHSBc1Ztjw4eOH0oIrsgIJEqSFDBo0cuTgsdSTo7No0xYTZCcQACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +edit22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBISGhISChHx+fHx6fHR2dGxqbGxubGRmZGRiZFxeXFxaXFRSVIxSLPyuXMzKzMzKxMTCtExOTPzqrPz+/NTS1MS+tOSaVPyWNPz6/IxeNPzavPyKBNTW1PyCBPyGBJxmNPzOpLx6PNRqBMSCRNySTPyCDPSGBMxiBKROBHRydPSylOyydMxmBJxKBAwODPS2lPTq3OyabJxGBPTy5PTGrOyOXPR+DPz69PzmzPzevNxuPORqLMReFPzy7MyCXKxiNIRKHBQWFNTOxPzixJRaPFxONHRqVPz27PTy7PzStCwqJDQyLJSGdIx6ZPz29PTu5HRmTLSKbMSGZHROPFxKPJSKfJyShKyehMyuhDQmHEQuJJyOfLSijMSynMS6pLSefDQyNHx2bKSahLyqhLymhOzi1FRGNIR+bNzKtOTOtOTKrOTKpLyedAQCBFRWVPTq5NzOvLyunLSmlNTCrOTOrNzGrLyidMS+rLyynKyijLymjLyqjAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gAAAAQECAwQFBQYHBggJCgsLDAwADQ6CAQ8QD5ydEJ+gERKWE4ICDxSpqhWqqhYNFxMYphCtqaytGRoXGxgcggSoth25u70eH8APFR0VzMzNziAXIRjIvwAFwq3EqSLUGB/iI4LathS4JCXVJh8nKCmCKrXDFCss1eIfLS4v8ssdmgWsAGNDDBnt3s3wJ+jAtlUhaNSwccNEi4WCBBl4SAHHihw6ZOzg0QNjRgAG6KXK4CNEjBU/gDQI8kLISQAIADobAoMIzCINjLw4YvNkAno4kCRRUuNHESNLmDRxUjSjAlRPfECJImUKlSpMrFzBIqWqoKtJaWSJomULAy5XXrp4+QKGYcYFoCBEWRImi5gmY7CQyVLGriAGD2jEMHMmCxc0Xb6kUbOGTRs3N988gLM4jpw5Y+iwqcOGjZ07mE8yiGABz5c8c/Ts4cOnDJkybS7fdMO7t+/fvDMaCAQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +editpaste22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQWFDw6FHRuFGRaBFxSBAQCBAQKBCQiBIx6HPz6/NTOfKyiXDQuFOTm5Pz+/Ozu7PTq5Pz63PTyxNTOjKSeRExGLMTGxMzKzNTS1NTW1Dw2NKSmpKyqrKSipJyanNzWlLy6ZLSuVIx6FISChIyKhJSSlCQiJLS2tDw6NDQyNCQiFCQmHBQSDGRiZHRydGxubHx6dGxqbFxeXGRmZFxaXCwuLOzq7KyurHx+fDwmFEQuFCweFCQWDBQODBwaHBweHKSinJSWlOTi5JyepHR2dDw6PBQSFNze3ERGRIyKjIyOjISGhPz29Pzy7MS2rMzOzFRWVHx2dHxybDQiFPz27Pzu5PTq3PTm1NTCtJyGdHxuZHxqXPzq3PTaxNS6pFxWVFRKRNS2nPTi1PTStNSulNzOxNSynMymhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwABAgMEBYSLggaOjgcICQoLDA2Pj4MGDg8QEZ4FDxITFBUWFxcYGRobjQ8cHR4fCQ8gCyEiFSMWJCUkJieNEB4dKB4pKissK8wrLS4vMDHBAAYQHx8dFx0fJDIzNDU0M+IyHzaNNyg43Ng5Ojs7Ojw9Pj9AMkCNDiZB/h9CSOx4QLCgihItqBkYgqIDESElitAYWJCgkQcXjjRCgi1Ihw4BB5LAQOLCgyQYHihpUU3DBw5ElpAgAYNixSRJjKjQaECDCRPZPDB5IbIGSQwKLnh4wbInLA4kmJB4oaPiAwVNnER40hRK1BIAaVatUZJEFCkmpmjgCeWDCalFe4q4oFKwSRUrEa5gycLzwq8lUnPQ4PEgSpYcUZ5o2cIlS1O/JHLEDdfjQZMIVrpgweLFy5e+M6WSmBGlxYMYYBRzCaOFi5imHWBIfOEiShLTVjaP6eyFTBmN1TA5OvLDjJksWb58OVMGDRqWjAYdmU79SIvpjqJr104nEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +editshred22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBFRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwKDAQCBExOTNze3NTW1MTGxLS2tJyanOze1Pz+/Ozu7BQSFCwqLDw+POTi5MzKxPTu7LyyrIR+fCQmJPz6/Pz69Pzy7Pz29OzaxPTu5PTq3PTm3My6pPzu5PTq5NS+rPTm1PTi1PTezOzWxPz27MyynOzSvMyulOzOtOzKrMymhOzGpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbpQIAwIBgMCAXDAZFQLBbCqJTRqFobjgdkEYFKowPJZEyeUBqVR/crHDTKZYplovZKCW84+YKZZNZSBXl6EwEEBhVPXxZihGMaGRscdkIdg4QeEnVfCH2OHyAhIhuUAAiXZSEhIyQlJqWnjiEnKCWupRWoYyEgJK0SKaUKjam0JCorLMFfC6iqx8giLa/MGAsT1wsuCyULKwssC9RSzdkfCyALKuALLQsvpeXYIQso3gsiCzALMfENC+dGcMNHUAY/f+jq3ctncMYCGggFrsvHcEGNh/EyPFmg8cmrJxAVkVO0EUDJklHoBAEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +edittrash22:edit edit22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBERGRExOTDQyNISChBQSFCQiJCwuLPT29Nze3GxqbDw6PGxubHR2dJyanLSytJSWlJSSlOzq7Pz6/Nza3Ly6vFRWVBQWFIyKjMTCxHx6fIyOjLS2tOTi5PTy9OTm5Hx+fNTW1KyurKSmpJyenExKTMzKzKSipFxeXCwqLMzOzKyqrMTGxLy+vHRydBwaHNTS1DQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb8QIBwSCwaj8KAMoA8LgUDQsFwQByay4RiwWg4GA9IRGk0SCYJSsUCsVwwGQ1EsmESD5xOp+L5gDwhBRIZDhcDdkMGDgEiIxAkJQ8Ok5MmAohDAQ1xJxUlKCUlEg0pKpiZJRoLCxmtCw1eURhOcR4rbQ8cGRwLAwgGtBYTDywtGRKjvQTARgEZLhMcKC0OrQMvAirMRc7CHCTU1g2+20TO0NIn1RwDCya/wdHT1Rnt5LToKOq79trx0tR02YPX7Jm8fRxMOIhSLhOJE/LCJSTlr5kFEBQsWDiR4UGGBgsuHDg1BEYAfTE6oEBR4AIBAiS5yWBAAAGBAyaPGAgCACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +fileclose22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBERGRERCRDw6PCwqLExOTFRWVHRydGxqbGRiZCQiJISChIyKjHx6fDQyNBwaHJSWlKSipBQWFJyanPz+/JSSlCQmJAwKDCwuLBweHBQSFGxubExKTISGhDQ2NFxeXFRSVDw+PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbZQIBwSCwaj8jkMSAYDAgEJbFgOBwQCUOAoJAaFgvGonHIBhyP5BcSgUAYDWxggD4WFmx3e3HQngkSRgYMEBMUFG4MCId0BGlEAQeEhocVDYcUdBYKF0QCB3gRlJgUAQEYBBkaRAMbDZMMpAYcT46rQwMJrgsdC6QcfwoPnUMOBgkIV6SHHg6bw0QEAQYfBpggBZjPGsRD0gEchxwCIR6HChnQRQ8DIU4DTR4Em+ncRw8O+fmoXPXdRg+gQLFgIYM/KRIkoDP4QMKFf0o0aBAh4qGUixgzCrETBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +filefind22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQSFJyanLS6vLzCxISChNTe3OTu9Oz6/Nzy9Nzy/NTy/OT2/Nzi5Mzu9Lzq9KTe7LTq9PT+/Pz+/Nz2/Mzu/Kzm9Jza5HzK1LTi9PTu9IzW5ITO3FxaXNT2/KTi7Iza7GzC1LzW3FRSVMzO1MTq7HTS3Fy6zFS2vKzm7Lze5MTGzHzS5FTG1Ey2xEyyvJze7JzW3ITa5FTK3EymrGS+zFxWXKymrMzi7ESirEyqvLSyrKze7MzOzMTCxKSepAz+/NzW3MzKzBwWHLzS3ERCRAzi3KyurNze3MzGzLy2vLSutCQiJAyytHRydOTe5MTGxLy6tLyqpKyelJSCdOze3NS+tLyupLSmnKSOhCwuLPzy9Pzu7Oze1OzazOTOvMyihOTi5PTm3Pzi1PTazPTWxOzOtNSunDQyNPzy7Pzu5OzKrNzSzNzGvNS6rMyynMymjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCgwGFhYOIiYQBAgMEAwKHiokBBQYHCAkKCwwFAZOEBQ0IDAsODxARCZ6gAAEGEhMSFBUWFxgZCJ+TjBoMEpkRERscGBGRih0BBAgeFBQOER8gISEfIruIIwEkCCUVwhcgJicoKSrZg9srCRkRGdMsLS4vMNiK2wIKMRsbMiwzXtCocSydIBs3AuCIwIFDiBMucugAoWvSiB2VNPDg0ELHwA0MkCXr4aNSggg8NoDIQOFHgBtAkgURMiDAEAFEVBCJFKCIkSMGOyDRkETJEkOFmABoUsRJQkQdnkzQACWKlBtTplBR6qopxkFRJ0ytYuWKFCxZtBBq+hRA2AlbRrh08fLlCxi1a51g+dQhDFwuYsaQKWPmDBpKXgNETaNGjJgyhNfcVdTTiWI2XpK0cePmzRk4YA5T5otGixY0qFOXbgXAQCAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filenew22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBExOTERCRDw6PCwuLBwaHAwODAQCBOze1NTW1OTi5Nze3MTGxLS2tJyanPz+/Ozu7OTi3BQSFCwqLDw+PDQyNFRSVPTu7MzKxLyyrIR+fCQmJPz6/NTOxPz69Pzy7PTu5Pz29Pzu5PTq5PTm1My6pBQWFPTq3PTm3NS+rAwKDPTi1PTezOzWxMy2pPz27PTazOzSvMyynOzaxOzOtPTaxOzKrMyqjOzGpMymhPTizOTCpNzSzNTGvMymjMSihCH5BAEAAAAALAAAAAAWABYAAAboQIBwSCwaiYGAYEAgFAqGg/Q4DCASCsTiymgcHAcqQLB4mM+QiIQBppLPcMjkwQ4bB2X4maKgt4sVCHpnFhQTElNFE3mDDxcYGRp2RBuMgxwIHX9EBZZwHh8gCBmTQ52NISEiIyQlpUImng8hHyInKAgprwAqgnC0IKwrLLpGB4wctLYkwy0uuwd9Z8AnJywsLcVFx2YcL7UnJCwwLTEy0GXJoSgrCCwzNDTnxgjeH9UrKzXwNDY36LRGhEOwLx4NHDmgJbh3QoeOgv127EhojEeHDj16pEhRQoZHHzl+QJNCsqTJSXaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +fileopen22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQWDCwaDDwmFPSubPzGhPzCfPy2dOSmZPzKlPzSnPzOlPzKjBQODPzChPzWnPy2bPSmXPyuZOyeXIRSLEQuFEwyHEQqFDQiFCweDKRuPFRSTPT29PTy9Ozq7OTi3Nze3NTW1MzOzMTGxMTCxLy6tLSytKyurDQyNMzKxOTm5OTi5Nza1NTS1MTCvLS2tLSyrKSmpJyenJSWlIyKjHx+fFxeXBwaHKxuPMzKzLy6vIyOjHx6fDw6NPy6dGxubLy+vISChCQmJNza3KyqrBQSFLR2RKSinJyanGxqZAwGBJSSlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeDAYqKiIeLj4wBjQCMhY+NkoiLk5qbhQIDoJyGBAUGBwgEo4MECQoLDA2pDrS1tKQPEAwHERITE77AvxKqhAQNDA8UFRYXFs8YBAQZGqGPxw0RGxwdHR4eHyAhIiMkJSYnKCgpBAYPEhcqHyssLS4kLzAxMjM0NTY3cBA4UCAHBw8gVnhgEcKFjhc7UPDj0cMHAAI/KFgY4YLFio/jRpTYsW8GDyCSCEQw2DChOHIqgsCQSEPIEEEEJFhAoUNECCJEyOk4d6KIyRtGcB7hIJKjixEjHu4oimSGEIs4d8IIUoKECnNB0ElMwkNJJgBLlJBAcQKGiR07KGAURVGViY0mhIwwSTKjr99+THjUoIg0r48hTRIrRtxkiOMhDgrZCQQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +fileprint22:file file22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBFxaXDQyNFxSTPTizOzi1FxORDw2NExKLPTi1Pzy9Pz6/FRWVPz29Pz2/PTy7PTu9OzezPzu5OzavAQCBPzy7PTm3OzazOzKrPTu5FxSRERCRGReXPTq5Pzu7ExGTMS+xKSmpOTKpPTq3JSCDNzSfHRydLyadOzCjOzOtOzSvLyyTMTCxKSipGRiZFROLPz+/KyurJyenJyWnGxmbLSabOzClOzm7LSutJSWlJSSlJyanGxqbNze3OTm5IyGjNTO1Nza3NzW3OTe5IyKjHx6fMzGzMTGxMzOzNTW1IR+hISGhKymrLy6vLSytERGRGxubKyqrLy2vLS2tDQ2NEQ+RASKBAT+BFxeXHRudAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAgOEiYqEAgQFBgcGi5MICQoLmAQDh5OEDA2YCw4ODxARApKUCaGYEAsSCRMUnQysCwoVEhYXGLOLCBCgDqK5GQUXGooCAhscBB0euBUZEAUJvQgIgx8gIR8iCSPiHuIFEREDJCXaANwhJhsnKCnWERcRKiopFCvsBywhQrRwQWGAPAz5EhpQ9wIABRgKYsiYMTEEDQocatiwkUIEP18fbkCAAcMBjhwzdOyQwYNCgBMfKJSgMItBjxs+btwgCSGGjhw/ZoRgQKGZCRMUPgABEgSIkCE3SZok8qNqkR85NtDUEcPIkaVAkCR5SrJBDCVKlmzQ6pCCiRlMTJo4YUH3K5AeMBYYWctW0BOaUH60cBJFypQmII6wyEpFQBVFMSm4UAI3hJUrOGh8oOJrklYKWIromJGDR99Ogz5j4ZGlM+pEnwmBCwQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +filesave22:file file22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBGxqbAQCBLy+vERCRExKTHRydIyKjMTCxFxaXGRiZFRSVFRWVPz6/Nze3Nzm5Pz+/JyanDw+PExOTHR2dMTGxBQWFLSytHx+fISChOzy9Ly6vAQGBJSWlMzKzAwODJSSlHx6fIyOjOTi5DQ2NISGhGxubCwuLOzq7ERGRFxeXNTW1CwqLPT29Dw6PGRmZKSmpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAb/QIBQGBAMj8ikUDAgFAzKKCBwQCQUCcICKh0SEAhGw5EIZAmBrgCxeDQgcDJWyz0GIggJfL+XGwQJRxNgC3yGDwwUFUZDFhdthnwMGAZNQwEZFwQakXANBBQbHIIdERIBnRAOiR4ERx8gsSEMBBmGCyEGG3YGBwcgIr8UCwQHECOgG4xCtRkEJAvBJRklJgkSFBQeJ68hJiEoESkFKiEZIbkGARsLlwEGExENGhorGSkpFAYm66NDLAECpGiBYsUIFA8wLHBBQMWLVkdUCFCwaYVFBOymkVCgYEMgOykEpICBccMBAhhELFigTEqAAgIIwCiQ4eRKDyS6EAlJIAI0EpaudF4iIKDAAn9CkRT5eMROEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +foldernew22:folder folder22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBNzaTPT2FISCBCQaDPz+BExKBDwmFPSubPzChPzCfPy2dPz6BMzOTAQCBOSmZPzKlPzSnPzOlPzKjBQODPz+rPz+3PzWnPyuZPSmXNyaXPTyhISCLIRSLEQuFEwyHPy2bKRuPFRSTPT29PTy9Ozq7Pz+xJyanDQyNPzGhMzKzOTi3Nza3OTiVBQWFDwqFKxuPOTi5JSSjISChHR2dGRmZFxeXPS2dNTSzNTS1OTm5KSipLS2tLSytKyqpIyKhGRiZNze3NTW1MTGxMTCvLy6tIyKjCQmJMTCxMzOzMzKxJyenHx6fLR2RLy6vJSSlHx+fDw6NLy+vIyOjAwGBGxqZKyurCwuLBQSFJSWlCwqLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLjI2MAY6HAgOHBJYEhJCDBQaDmgcICQoLB4MGDA0OAQUBDg2cAAcPEBESE6QUuQasFRYVq5SxCRcSCggYGRjIGgYbFs8bHIMHExIJGR0eHx7cB83PFhsDDuTUEyAhIiMjJCQluwEmvsAnKAcp1x4qKyUrLLupWrByxcnFiwQIYIggEaNEiRgBZMyYQaNADRs2REA6cCODBxw5+OnQgWMHjx4+BND4MQOIg1gI0gUREkTHiplDhhApEoCGkRlHBL3I8MEHEhz+WAhJogTJySVMfthwIehAExE5jubAkYQpESc8fOx4AiXKNA8+ekhBgqSpzh5hPHcsmVLjpSAqVZBY6VGkiJMiPQKLnTvjCiEsWU4o3nGC8YksMmT8YCmC6iAXKLRc2cz5yGYtR0JjKWQgEAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mailforward22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBJR2dLyijPTixPz69Pzq3Pzy3Pzu5PTu7Ozi1LyelOzavPz+/DwqLLyafPTmvPz67Pz29Pzy7LSWlPzmzPz6/LyajPTitOTSzMyurPz25PTatPTi3KyOjPzuxAwqVDQiJHxiZPTetKySlPzqvPz27BQ6bAwmTPTexLyinNzGxDRunPzy5KySjCQ+ZNzq9KTO7JzC3Nzq/Ozu/LzW7FSm1BR6vGSWvFyq1AyGxAxytAx6vBSKxAxSjMyujLSunES+5BSi1ByGvAQCBNzCrOTaxNTOvMS6rKyelCx6rBx6tBQKDOTWvPzu1PTq1OzezAQOHAxGdBROhAQGFPzy1NzOvIRqXLyynOzarPz21Jx2XPTWrLSShAw2XKSCbPzuzAwePAQCDPzyzPzqzPTmxOzWtAwGBKyObOTSrNzGrKyGbOzatEQyNKyCZOzWrOTGpNS2lCweHCQaHCQWFBwSFBQODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBhBwgQKFSpY0HgBQwYNGzh0mDhRAAUPHziACEGBpYgRJDiUGEkSwoCQJk6opNASRQoOFETQJDkggwoOJlYApcCihQuVL2DUhBDjhIqjJmRwwDCDhswaNm5MjYHjKggOOU7o0CGTA9gdYknG2KCCBw8VJVL0uBgihAUfP+CSNGCjsI/DiBPbAMJBsEQbQYQM+UG5smUiRYw0jlvYxhEkSYyIHm1EyRLTTH40EZvAyZPOR4pAmU07ipIkUKQ0mQIhAZUqVq5gKXzkSBYtyLVEyd1ki8QFXLp4+WJFQowbYLJnD5NbzJiJCjaQnhnvpYwZM0/OPFlvQ/f3iQvQpBlvQc0aCWy4VKnCpY0Y5yQxgEYXZFjghgwZUOHGCW90YQEccUwloBwGyjAHHXUoSAMZb0xhx1QOoMHDHSfIwSEOdTjhAQ1d4MFbTQ6Q4MYacrzxhhx04JCHHhvQsMeLJPHRBxpr+LHCGnusgccfgKixQR1ATtTBlDDAEIggggxCCCGFbLGFHVFKZEdAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailget22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBBQ6bCQ+ZAwePKTC5Ozu/NTi9GSWvAwSJGSu3JS+5CR+rAQOHPTy/AyKzES23AwOHCw+bOTq/BR6xES+5AwmTBw6ZMTW9Ax6tByi1BRGdAw2XAQCBDQuNDRupKzS9FSm1BR2vBym3EzC7CSGxBROhNTW1Pz+/OTm5NTO1AQGFNzW3Ozq7Ozm7IyKjJyWnMzOzNzq9Nze3OTa5Ly6vCQiJGReZISChKyqrAwqVBRWlOTi5MS6xJSWlNza3OTe5Ly2vGxmbKymrIyGjMzGzISGhKSepCQmJDw6PHR2dJSOlPTy9MTGxLy+vLS2tMzKzLSutMTCxLSytKSipJyenKyurJyanCwqLCwmLCwuLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4IBhgIBA4SLjAABBAUGBwiNlY4FCQoLDJaNAQ0ODwsQnYwREhMUE5ylFYYRFhcYGRgaGxsDHJUdFR4SHyAhEyIjJCUcuo0cJr0nExihxgwoyYscKSnMHicOIw4lKissLdWDHC4vMCu9McYqMjMyNOUANTY3OPEoOTolDCszdrSgwaMcBxs9TMxYOCMHBx8zfPj48QNINQ5BbMBIIUShDIUoTAhR94PHPEEHbQwZckOGjBQviMxYUWQIDCMmdXE4gqRnkiFETAxR8iKFjJU2evZEdmLJkgJIbqS4wXJIUapImj5FtuSEVyRVV1IVi4RIChhEkLVAgcJHEqVwVJUmYdKkiRNkALMRecKECRG/ff8CEQJFCA5kMKJEoUHDCQ/HkB9LmWKECpUeyKoIMSLEyosen0OD7iH2xg1dV7BkqXGlBpbWNTq4Zn2khu0aAAwEAgAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +mail22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBDQyNCwqLCQiJBwaHBQSFAwKDAQCBDw6PPz+/Pz69Pz27PTy7PTy5PTu5PTu3PTu1PTq1PTqzOzmzPzuvOzitPTmvOzivAQGBDw+POzevPz67Pz25Pz23Pzy1PzyzPzqvOTavERCRKSilPz21OTevIR+ZExKTOTi3JyanLS2tPz6/Pz65KyihJSKbMS6lExOTNTW1JSWlJSKZMSylNTOrNTKpFRSVPz29MTCxPTmzKymjIyCdOTWxOzexOTWrBQWFFRWVOzu7MzKxJyalOzatLSulMzKtOzmxOTarFxaXKyqnPTmtIyGdIR+bOzetOzixBweHGRiZOzm3NzWzNzSrOTetGRmZOzizOTexOzm1JSKdGxqbHRydJySdHR2dOzapHx6fKyijOTixCwuLHx+fFxeXERGRDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4SFhoeIiYqLAQECjwORAwSUBZYFBpkHmwgJCgsMDA0OD6UQERITFBMVFhcVGBkangq1ChsLGxwcHQ0dHR4fICEGIiMSCbS3uLq8wCQUJSYGJygpKhQJKyvLLM4Nwi0uLwUwDQsxMtmeuQveHR8UMzQ1NgU3Dgo41jk6ns0cKOzgYaOHjx9AgjTAUUvIECLZNmxoUISHkSM9KiBJQkCJA4kKEoBQoWJJAiYtmjh5AmVCsCJRpHzckKCCySlUUvBYUqUHDysSPnxIEuXKA5pPRiRwxwFLFhRaIEDYUoEChCcDuECoOWKFuwW7nHkg4WELkw8/BHRRwESpt10dU8SSHevlRxIBX6C0WBE27q8GZMkKbTADjIAwYlb4GLMYShYoPTRo6FGiSJEKPyzMIFMmzJcvXbhwkSLFjJkbQW6cOHNGhAgEAdAsmk27tm0ABgIBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +mailreplyall22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBLyejPTixPz29PTu3Pzu5Pzy7Ozi1LyelPTavPz+/DwqLPz67PTetPz69ERCRLSWlPTmzPz6/OzexLyajPzqvDw+PDQ2NMyurDQiJPz23PTatJyenAQCBPTevPz25LSajOzq7HxiZPTexPz65JyanBQ6bKSmpBwuTOTi5OzaxBRCdHySvGRiZHx6fBQSFERGRNzq9IyOjHx+fGxqbPzu3BwaHFSq3Aw6XAxKfPzy3Gy63ByWzJzO7Mzi9OzavBRytAx6vCSazGRKTPzy1AQKHBRGdBRyrDy63ES+3Cym1CR6rBwWVAQSLAx+xCyCtBRmnPzuzAQWLAwePPzyzKSCbAQOJByGvOTWvPTmxBQODFQ6PPTWrPzqzOzatAwGBKyObLSWfPTivKyCZEQyNKyGZOzWrOzWtOTSrOTGpNS2lJx2XDQmJCweHCQaHCQWFBwSFBQKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpkzGjhAoYMGjZMpMghQgcNFjh4mODhA4gQGkSIHAmBwAgNJEpo8KDSxAkUGjhMSEGz5gUVIiKs2PmBRQudHiwQpUnAxYsXImB0aBqjBcuoU0fKmPGChgUNH2qIqGHjg9u3bicWIFs2rYgbNnDkyGFhb8cccQ3ouJqWQo0dPFr0WMy4h48LFj4gsKriB5AeNngEaSGks+chPnwQOXFAh4oXRYxk9nAEyY7XO2wksWHDx5ATCDIoUXEBsYclTJo4cWJhuIjhSXacSPBEiZLMQY4wgRKluvXqUpyIsDElAxUqVaxcwcGCPQuWLOixaNHCZAsXBU+oqKDSxQqULF6ifNmyn/8VMOtxwcAK36kQRhdJQIFFEmKM4eCDYGyhhYAEkqFEGSuYYcUZLaDxXRpqSNRCEu6twYaFZXTQhgRd2NCCG9918AYELTjoXgNuKAFHB2RQEUYHVbQQRwlUpPHGGFwkyQUEDsgxx4lh9BhCBy2U8UQJcrSg5JIQ0FEHG3bc0QGYK+CRhx57PEGlkhM9sAEffKTQhx9+/AEIIIGoEUgLLRRFR0AAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailreply22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAJR6fIxydIxubIRqbIRmZHxeXHRaXHRWVGxSVGROTFxGRFxCRFQ+PEw6PEw2NEQuLPwCBMSihPTixPz69PTq5Pzy1Pzu5PTq1Pzy7Pzu7Ozi1LyelPTavPz+/DwqLLSajPTetPz27LSWlPzmzPz6/PTexPz67Pz29OTSzMyurPz25LyajBRCdPzuvDQmJOzexPTevOzq5BQ6bBwuTDQiJHxiZPz23Pz65LyinPzmvBxCbHySvAQCBOTi3OTq9CweHOzaxFSq3Aw6XGy63ByWzJzO7Mzi9OzavNzq9BRytAx6vBR6tPzy3AwOHDy63Ax+xCSazCym1CR6rBwWVOzizAQSLES+3CyCtBRyrBRmnGRKTPzu1MzGtAxKfAQWLAwePPTizMy6nByGvNzWxOzWrNzOtBQKDJR2ZNS2lPTmvBQODPTatKSCbOTaxLyqlAQKHFQ6PPzyzPzqzPTu1PTivOzWtKyObPzuzOTOtLSWfPzqvAwGBKyCZPTWrPTmxNzKrEQyNOzatOTGpJx2XCQaHCQWFBwSFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYuIDBQgYNGzh08DCR4oQPIDqEmDBhJQYRIzqQIFkSAoESJCKkDGFiwgkUKTpMwECz5IASKjqsSMlSA4sWQjG4qGnzhYoQSmF0iCFjBgmWGWhQrVHCxg2sOHLo2MGjB0sLYmsWQHq1p4wdPtqemGDhB1UDQFSouKHi7oQgQmSwUMyYxcQDZQWz2EFiCJEiRoyQyLzZyGIIB47YKLwDSRAiSZSoXq1kCRHNLBK8YGKjCYskTp4ogeKkt+8oUaBImZKAAxMmVKrctqL7ihTnz7FkAT5FC4cKFbZwadIFdxcvX8KLss8iJcoUBUcq2KgAJoxyMTy4jCFTxoxEHl2GLyCDncmWM2hUIQMPY2CXhhoTfTEcA2tgVwEba7Thxhs88FdBD/ZB8MUUHMJBRhw2sAGCHBKU4UaFc1RAhxnhcdhhHUzYAUIcFdxRAh4R5KGHinu4OIVEDqTBRx81xhGHHzD8wQYQetDRI4cTAcIHGWT0EQgZa1ApCBqDcBAID1Q94IEHLtBAAyGEFGKIIWqYYQYPYNZkQEAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +mailsend22:mail mail22 22:photo:22 22:R0lGODlhFgAWAIcAAIR6fIRydHxubHRqbHRmZGxeXGxaXGRWVFxSVFxOTFRGRExCREw+PEQ6PDw2NDwuLPwCBLSijOzixPz69PTq3PTu5PTu3PTu7OTi1KyelOzavPz+/DQqLPz67LSafOzetPz27Pz29KyajPTmzPz6/NzSzLyurCwiJPz25Ozi3JyOjPzuxBRGbAwSHOzexPz23KSSlPzqvBROdISavBxSdAwaLHRiZLSinNTGxMy+vBxGZNzu9BSGrAwWJMSyrKSSjFy61ETO3BRWfPz65PTqzHTK3ByqzBSWxEzW5AQWJOTWxBRCXOTu9BSOvDzO3ByavBRKbOzaxOzizKSWlCQ2TAQCBJza7BRWdNzSxJSCbMzq9BSOtCSKrAwiPOTavPzy3LymlCySrAwmPFRKTPzy1NTGrPzu1JR+bOzatPzyzCy61ByGpOzWtJyCbPTmvPzuzIS+3FymxCSuzBR6nJyCZOTWvKSObMSujOzivAwKDOTSrNzKrJyGbDwyNOzWrMy2lIx2XBwWFBQSFBQODAwGBAQGBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAWABYAAAj/AAEEEDCAQAEDBxAkULCAQQMHDyBInBgggoQJFCpYqMDxAoYMGjZwmEixg4cPGzqA6BBiAggRIzaQGEkSwgAMJCKgnNBhQogSJlKGOFHTpgYUG0TsnJBCxQoSE1i0KErAxYsOJJRuuAAjhkwZM2jUqGnDBQoUHTbciIEjx4YNOmbs4CGjB8kCZlGAALHBx4+YcTcACcJDyFSJBo6iGNIhhQkiG8BOKGLkCBK6SSQisHoWhZIbG5bMYALECI8mTZw8gTL1QJQXZ6VMiUylSpUlVpoYaXLFtm0EGmCjwJLlA2O9MrRsccKlC8kEXr7AdgEmwtkhX2SQ2BIkjBiSYzSQr/nyhUKZLIrJJOcexvlEBV7IvCBjRkmAMzHOaufhxDvJBWiQISAFxUUQQRovJNeEGmu4JxEDbKQhXxsfuFDGGW68IQMcccgxRxUkNRDhC3R8QMQIdZwXQ11JJGFbiB+QYccHaaTxhgt13OFBDGTgkUdRDrhAhx5k2JjGCB/swYcXMXwAYk190OGHHx/4wUaVepTxByAaoPEkSQ5wwMEJZAZipiCDDJIHIYV8OZEdAQEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +nav1downarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBBQSFAQGBDQyNExKTHx6fGxqbFxeXGRiZFRWVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFxaXDw6PPz+/MTCxLS2tIyKjKSmpKSipJyanAwODDQ2NHRydERCRFRSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZzQIBwSCwaj8ikcslsOp/OgHRKlQoCgymRUDAcEIkwYgxWFBYERpHQcDwgEclEQmk8DhWL2kiIXDBwExMNGRoJaUkEEH8bEQ0cGgcWAksEHX8QHBKSHk1sfxMHH5ROBBsOICGkT2wiq1CIULKztLW2t0h2QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1leftarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ5QIBwSCwaj8ikchgQLJGBgfNZDBAKBirRekBMtYGEYsHIgsWNhOO7tCrShDU18Hg/CJAIG0o4wCUQcksTFBUSCRYSEnpUFxgIGQkJGYyNGggbHBaVjR2QCxEeWkITHQ4IH3tPFwEMA2ajAKUgqlQTTbFEE7W5vUgGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1rightarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNGReZAQCBMTCxGRiZMzGzOTm5LSytPTy9Pz+/CwqLOTi5Ly6vCwmLMzKzJyanJSSlBQWFKymrIyGjCQeJJyWnISChISGhHx2fKyurDw6PAwODHx6fHRydDw2PERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZ2QIBwSCwaj8hkMRBQKgOCgRMZIBSk06XhEM0SA4iE4uoVLhCMhqLrdSAekMgYO5VM4BQ521mxIC4UFxBWdEkSERYYFxETGQGFSBKCGBEaGRuQSBwdeZaPXpsQCB6YZQMdEI6ZSgMepKusHh+wrCC0rLdlursGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav1uparrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBFxeXDw+PMTGxHRudPz+/JSSlLSytIyKjHR2dISChIyGjIyOjLSutLy6vKSepJyanISGhJSOlOzm7Ozu7MzGzKyurJyenDQyNGReZKSmpIR+hCwuLCQiJBwaHBQSFAwKDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAZtQIBwSCwaj8ikcslsOp9QYyAQFQYEAyr0Sihkn1fDAeHVLsOJNELxVaITC0bDUU6GH5AIQ8KYrNtFVxQVFBYWFxgRCREYdUQZGhYEDwgIGxAHCQocCgWOQhmhGR0epR8gqCFTq1Wtrq+wsUt0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2downarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAQGBBwaHDQyNExKTHx6fGxqbFxeXGRiZFRSVDw+PAwKDJSWlOzu7LSytJyenJSSlISGhISChIyOjFRWVDw6PPz+/MTCxLS2tGRmZDQ2NAwODJyanKSmpKSipIyKjHRydBQSFERCRExOTFxaXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAasQIBwSCwah4FkQKBsDpoBIqFgOCASCYRWm1AUFgRGkdBwPCARiWRCaTwOFYvYSIhcMOiJpJGZaDYcR0IEHXceEQ0fICEWIoJDhHcQHxIHgI9SEHeVG46YUh8OISOen1INCqWmUnOYTUxQAU9NUlRWWFtbCiRgrYNlZ2lriG8lYUd1khETE24gCZeCkRgeFBAQIAeNn9OTlXKrBJoYnKrcoaPmpmSpq3S+7u50QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2leftarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExKTJSSlHx6fAQGBOzu7GxqbJyenPz+/LSytFxaXMTCxGRiZKSmpISGhFxeXISChAwKDFRWVHRydJSWlBQSFERCRIyKjDQ2NIyOjLS2tDw6PBwaHFRSVDw+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAavQIBwSCwaj8gkMiBYNpeDZzEQXRIKBmPgmtUSDgipcAsWjxOKBaN7Tq+n6EbCIQ3E5+KtQk6gjwl7CX11D3sPBBARTQGFDYeJT2R8EhB0koKUfgATFBUSCRYSEoqcnqCiikMXGAgZCQkZqautr7FiFxoIGxwWqQC4ury+qh2tCxEexMbIRhMdDggfYs7Q0kcXAQwDbELY2txEziBmmx3jSRNMR+nk4e2b70ry80QGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +nav2rightarrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTGxOzm7CwqLLy2vPTy9Pz+/Ly6vCQiJLSytLS2tLSutOTi5MzGzKSepIyKjJSOlKSmpMzKzJyanIyOjBwaHIyGjISGhJSSlISChBQSFJyenIR+hGxubDw+PHRydHR2dEQ+RHx6fERCRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8hkIIBcJgEBweAYnTYJUmMAa9USClniFtwlGg6IRFhoUKTXwwWj0FB3F46Hwl6UQyISfAB+EROCQgsUFRYSF3yJEIyBaxgWDBkaGRtclQwSHBIbEGEdGx4fGhcOICEDGBsWHBmqIq1CHRIWGRMMIyRTHRy6Er22tyONq8YdJRe0xkIDwr2/QwMfliMmZQADIxasZd4e4UYDIr7c59rc0eVFA+/m0EQD9PDt0flP/P3+BkEAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +nav2uparrow22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBGReZDQyNMTCxHx6fPz+/JyWnKyurHx2fDw6PJSSlISGhIyKjIyGjISChLy6vJyanOTm5PTy9OTi5MzKzLSytKSepMTGxMzGzLS2tLSutKymrHRydCQiJCwmLBwWHAwODLy2vHx+fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAajQIBwSCwaj8RAAMkUBgSDZdP4JBSi06TAcEAkFNLp07BgLLzY5njRcDzO3zB1C4lEGI83Wj58SiYUFRUWdg0XEXFFAwIYGRoWGxwRZQUFHZdgRAObmx4fHiChISFKpVlKWUdPaalOAlasp1sHG4myZGZ7Yltsbgu1mUhjdRF5egmxfQJ/gYOFdrZDi40iFgiSCw8jBQmYcpydn6Ego6WorUwGQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navback22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRGZAxCZGyavExmjHyatOTy9CxihISevPz+/KzO3BRylAw+XAQCBDRWbPz6/FzC3CSuzDyexJzO5Mzq9CxSdAQOFISmxNzu9HTS5BSmxAyexDSuzJTa7Mzu9Kzi7GS21CRmjAQOHHSWtLze7AyWvHzG3BRihAQKFCTO3BS+1AyixBSWvBSOtBSStAQWJBSixDzW5BTC3BSqzBS21CTC1ETW3AQSHEze7BRqlBRmjAQCDBR+pBRefBRSdCH5BAEAAAAALAAAAAAWABYAAAalQIBwSCwaj8ikMqBcMpvHgGAANQYIhWdVGDAcENQtIJBQLBgNx0MQaDuQXcghIplQDhBIxXKJYiAZGhscHR4VHyAhIiNWJBklGhIbJoQnFCcTKIxFKSgbKissJi0mJi4vLiYoMEcXKDEyMzQ1Nje2NisoOEg4KDU5K6g6OwwoKAN9SCOeMmgwz884PEq9PT4NYkPLP9jZQikN3d4AKVrjKePp3gZBACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +navdown22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VCRKZDRSbBxCXJTC1Mzi7Nzq9NTm9Bx2nAQCBNzu9JzG3Hy+1HzG3IzO5BRmjPz6/LTe7Dy61AyStCTC1FzC1AyGrETS3ETC1ETa5BRulAyuzBRylAw+XMTe7Gy+3CSqzAyexBTC3DR+nIS21KTW5Nzu/KzO3FzC3Pz+/ByixEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaRQIBwSCwaj8ikcnkMBAQDgjPAFAYKhsMBkVBUAYEFo+F4QLzVQEQyoVTOX/XBcsHA0+vMRbNBMwkRDhxuHX5GTlIeHh8gISIjFAEeiVRECiQlDAUmgxQjIhwiJHdFlycoKSIUFCEjGiGkRpcqCxYijxorsUezcxYsuoZJsxLAu0qXB7DCTJfHVQrMX9PU1Uh0QQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +navforward22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBBxCXDR+nIS21Aw+XJTC1Nzu/KzO3Pz+/Nzq9Pz6/MTe7KTW5FzC1Nzu9CRKZMzi7IzK3Lzi7LTe7HzG3Gy+3AyuzAyexFzC3DRSbHy+1Dy61CSqzAySvAyStLze7IzO5AyGrETa5ByixBRmjCTC1ETS3BTC3Bx2nAyWvEze7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAaYQIBwSCwaj8hkMqBsBgTN5IAAjRoDBaq1aDggtMuAWDzoJhTgY+CwYLgZDccDwkgXI5IJZVGxXDAZGnR2QxsLHB0PHRgeHyAZDyFfVUQDCyIgIyCPIB+QJCUmlEMBEiInKCQnKSkeKSQeomoqJrUmKiArKSwZsmoCwMEBGCyxo1EGHr3HUQEEvltCBtDRAAbMW0zV29xDBkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navhome22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIYAAPwCBAQCBCQiJNze3ERCROTi5MzGzLy6vDw6PKyqrKyurBQSFGRiZGxqbGRmZISChEQ+RExKTExOTHRydDQyNOTe5FROVLSurCwqLMTCxPT29Pz6/LSutFxeXLyytLSytPz+/JSWlKympPTq7KSipNzW3BwaHHx6fKx2VJRWNHQmBFweDOzq7Ly+vNTW1JxWNLSajPTe1Ny6pKxWJNTS1IyOjJRmbPTi3OzKrNSSXMSGVHQiBHx+fJSSlPzy9IxOVOzWxOSyjNSCPLxeDJyWnIRGTOTGtMxmDLRWBHwqBIxGTLRSDDQuNNSunKxKBGwyNMSafMxqHMReDKRGDPTu9LxuPLxaDJQ+DIR+hGQqNIQyBGQiBNTO1EQKBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAf/gACCg4QBAYSIiYQCAwQCiokEhwACBQYHBAiQhAiHlQYJCgkEC5uCkp8MDQ4NDwylmwgQlgQRERIEBBOkmxQVBgQWFwUFFxEEDLyJGAUZtQoFGhsFHLYdyoOVHsEf0SAbIAUex8mwlAUhtSIFG+3uIyTWvAIGJMEkJe76GyXbEeWUBJg4USKaBhQpVKzYoIFFiwYUBBJa8MAFCw0vYMSQMWOhBhoTKCQSUKMEiw02buDIoWOHBg0GeIhEFKAHDR8afgAJImSIioYliMws1MPkhiJGchxBkmTDCBo1hg4KQMTiBiUyhBxZ8pNFiR5MEtU0WqSJVidJNDyNKraHC5xPNKBEkTLlJ5WvUgWNvfikyhArV34+7ZEXQAAsB2iUyHLlihYtW0pwOYAFgyJDmDNr7jIIWiAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +navup22:nav nav22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAw2VAQCBHSWtBRmjAQOHISmxNzu9BSmxBRihHyatPz6/Lze7CTO3BSixHTS5BTC3DzW5ByyzPz+/OTy9AyexEze7ByixGyavKzO3FzC3AyWvBS+1BR+pAQKFCRGZExmjCxihBRylCSuzBSWvBS21BSOtBRSdAw+XAxCZDyexDSyzCTC1JzO5JTa7DSuzETW3BRqlAQWJDRWbOT2/Mzq9HzG3JzS5Kzi7BSStGS21CxSdCRmjAQOFAQSHAAAACH5BAEAAAAALAAAAAAWABYAAAaeQIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbUGFAtGw0GFfheHByQi4S6/E8pDUoFYLm5kAEPJaBAVGxIcER0JHlEfICEiIxUkGyUmIgknKIhXASkonCorgSwmKQGcKE9IAi0uLxUwMTJWMzQ1NiYwBLBQHws1N7avXgs4NjkcCblMATU6KhvGyG87PAnUKV1MAj0+2zIFp1bg4eJJdkEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +playeject22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAwKDJSWlFRSVBQSFKymrOzq7HRydERCRPz+/MzGzISGhJyenKSmpGxqbJyWnJSOlKSepLy2vIyOjGRiZPTu9IyGjLSutFxaXExOTHx2fGReZAQCBAQGBBwaHCQiJLSytKyurJSSlFxeXNze3LS2tIyKjFxWXHRudAwGDBQOFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcqkMCJjHwIBQgBIDhgMiUbVKFQsGItBdBhpgh4PxIJvRC8cA4oiMy8bvQhJhMAYTFBVOURAWEw0QFxcMERAYCBluVxobDxkVHJocmBwEGgmEQx0dHh0CpKmkH6odVlanBR8FtAIFtiCkSB0LISEiGCIGIxAPDySuRwIOBwrOzwoHJRHJRh0jJgMj2gMnERQUCNVFHQQoCBvo6CkICATjRB0qp7b1K6qv+foyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playend22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNFxeXAQCBMTCxGReZBQSFOzm7AwKDKymrJSSlFRSVCwqLLy6vPTy9OTe5Ozq7CQiJLSytOTi5BwaHPz+/HRydMzKzKSepJSOlKSipJyanIyGjIyKjKyurISGhMzGzJyWnHR2dISChIyOjLSutDw+PERCRHx6fJSWlIR+hJyenGRmZHx2fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa6QIBwSCwaj8ikMBBQKgOCgRMZIBSkxYHWoDVWD9EigpBQLLBERsPxCA8NDUhjgTBGJJNGG02RVBQWdUV3FxgZe0IGfoAGdhoXGxwdiAYef4FGFBoeHB8dGSBRihUhIo1FBhkbIyMkJRYmAwYal4JEBh2RChIWJ1IIGxUZFqdECCgkHR6wWAYpFR2YWSobvL5vFgfDaEMDIivMRBEsD9HcQgMWvecDLB0tZ0btsfJa9vLXU/X6/P3+b0EAACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playpause22:play play22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBAwODMTCxKSmpJSWlFRSVAQGBBwaHLSutOzq7Ly6vCQeJPz+/Hx2fBQWFGxubLSytJSOlBQOFAwKDJSSlJyWnIyOjHRydNze3GRiZAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAWBICCOZGmeaKqubOumQSDEgRjPMSoMRGEcol3vh0IkFAtDDWBEKlGMRKPgEIii0yrqIS1ArADu9KuLNCSOSdCMVp8ohEZFC4DL6SaBpXGh6/l4JX8XZACDhXkYCn1LAoqMUBAZEhBLDJKUSyYBGmhPAJyemiU0NDaloy+qq6ytI8whACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +playstart22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBDQyNAQCBExOTAwKDAQGBJSSlHx+fBQSFMTCxKymrFRSVOzu7GxqbLSytLy6vJyanPz+/GReZBwaHHRydKSepKSipGRiZJyWnAwODLSutKSmpISChPTu9ISGhFxaXJSWlIyGjJSOlERCRIyKjDw2PIyOjLy2vOzm7Dw6PLS2tCQmJOTe5GxmbDQ2NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa7QIBwSCwaj8ik0hgQLJGBgbMoqBIKU2LAcMgOEQmFYeEFbBmNMgDhYDwWBC0k4pCoJ46IgRIXBioRCRYXamwRGBQIfgaBFhiERhkaenxmCoEbBhyQRYaIGVsdghgem4UWegcEBB8UHhsgIaZGBBgRIpUIIxQhChginEQIIBEklWslFyYnBsFfFCi4WQgpFBwqFxNGKxcsxl4IAS0NZEYCF3vlwgEfUuZV8JEuI2pPAARN9kcE9fr+SwaCAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +playstop22:play play22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBAQCBAwKDBQSFBwaHCQmJJSSlISChJSOlJSWlGxqbGRiZNTS1PTy9Pz+/Ozm7OTi5FRSVIyKjOTe5MTCxIR+hExOTHR2dLy6vLSytLy2vHRydFxWXIyGjIyOjPz2/FRWVHx6fExKTMzOzJyanKSmpKyqrKSipAQGBLSutHx2fDw6PAwODAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAa1QIBwSCwaj8ikcslsAgKCAWEQjQ4KgSwyYDAcugZEQqFYYJECA6PhaLcfEEUkgJZAGJB8fkKpWOhHAxcOGBQZGBoaGQgbHIBGAhUOGR0SBxISBh4Xf0iCHxQSlRIIXhsgj0UCIaCXmJgHGyKpRJ+hmB5dHQqOaCENIx0epBIkBhdzngoPGCQlJifQJBvJRygRKRcKGxcXGypys1srEREc5SLnICLiR1koLFVUWfRO9vf4+UwyQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textblock22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUWzvNzo33GfFl5jVlonlTrr1DbvFi9vjeeNUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textbold22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIxhI+py+0Powm0VnknjVkH2AEhE45LZ55Wqn6e65TsMc5eYosbksswubJIhsSiccgvAAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +textcenter22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUbz3Sh7yIWfFHKjVl4nmFrr1Lpr7LwkjeeIUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textitalic22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py+0P4wqUSlQvttrkDnyaOHIdeaGRupplAIauVM3xjeeOUQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textleft22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+pyw0Bo5zB2UXz3Sp7yG2fFJajVjonmIor2TJvfL0wjecIXQAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textright22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAImhI+py30Bo5zBWUfz3SZ7yIXdF4kWqZkbCqoMO7kXLC+wVOe6YRQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +text22:text text22 22:photo:22 22:R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRSVCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmKQSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bst9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +textunder22:text text22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIvhI+py+0PowmUnhpeVVnb1DkbCI1I2JhX+Z0sOr2cTHpwK7a4rUr+hAnufsTirwAAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewchoose22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz69PTq5Pz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq70466Cl+AMxBVwnFIVRAmQHCIeBrC1L3tQgJ/SaEbeeC1PLBHE2ybFI9A1HzstHEIK6YCmhDTmBybQaHYJn7QC5zKeytIQe1+pKNE6P2yMAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewdetailed22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAQ+EMhJq7046817+MLQUQFRGMc4lQaSAkcMx3QltMmrDrSu/sCgEPgJhIiFk89DaL1qPRnlhsgBebWhdstVESIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewicon22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz69PTq5AQCBPz+/OzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARWEMhJq7046z2DF0PlBeAVEERhiKhqHgWyUgEsX0KczFOO7JeBYciTCImc5ITIXDKHyqhU9AnRqq9UEVDTvmLbGhin2/qAliOUot5OLc81IO5+2+8WewQAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag-22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbKQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/avno2BBf/MCClSob4iBIAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmag22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbIQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/47vrq9P3s/cunr9S8gAIRFhTCLAgAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewmag+22:view view22 22:photo:22 22:R0lGODlhFgAWAIUAAPwCBBQSFJyanKy2tLzCxHyChNTa3Nzq7Nz29Nzy9Mzy9MTu9OTy9Nzi5Oz6/OT29MTi5Kzi7NTy9KTm7JzW3ITO1Lzq7IzW5HzK1LS+vMTq7Jze7ITW3GTCzGS+zLTS1MzOzLzq9Kzm7Jze5ITW5HTS3FS2vLze5EzCzEyyvEyutJTa5NTu9ITa5FTK1ESirLTm7Mzi5FS6xEy2vESerESmtFSutESmrKyqrAz+/Dw+RAzi3ASutHRydAQCBAAAACH5BAEAAAAALAAAAAAWABYAAAbQQIBQGCgWh8jksCgYEAaCozIZKBgOiIRiwSgEpstCw/HYQiKRhBcMCBgQDodkMaFU0t9pQHCIyy0TFxgYEVF6GQ4LCQkaERscHR4RH3lUIAkWCyEiIyQlHiYjEJVIAQQJJ2gjJSUoKSorlHoCLBQcHC0lLikvHjCGejEiHBgeMjM0NRwPpFQFDBHFNjceHAjAYFWoI7cnCVE4OWxtex8QH1EBOjs4zUpGUjw6Pe3j2fP19u/4zT766vRI+fvHD4CPgwcJ9qg0UB85JA0dDjEQBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 +viewmulticolumn22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBFRSVExKTDQyNPz+/Pz69PTq5AQCBOzaxOTKpAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARTEMhJq7046813+MJQfUF4BURhHGO6noSBsEcNoDJtS4KcsJQe4ncZ1HYT47HDbDqfUAnJRJmKLIGCCjjJbmE5wBI3EyOFxKCPS1EiJW52dE6vZyIAIf5oQ3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxDb3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3dy5kZXZlbGNvci5jb20AOw== +viewtext22:view view22 22:photo:22 22:R0lGODlhFgAWAIAAAPwCBAQCBCH5BAEAAAAALAAAAAAWABYAAAIkhI+py+0Po2ShBlOxzbP7n2yaJoLm+ZTcxqHuC6hXzML2HVEFACH+aENyZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29tADs= +viewtree22:view view22 22:photo:22 22:R0lGODlhFgAWAIMAAPwCBAQCBFRSVExKTDQyNPz+/Pz69Pzu5PTq5OzaxBQOFOzKpFRWVFxWXOzexPTexCH5BAEAAAAALAAAAAAWABYAAARPEMhJq704g6A779kHCORAgNskFMYhakE8FkjyBcoWv+JwJItXaELYCTFHlCSpZKKcoB5jYHpOGgUadLKbIRw3jhEzQDyCSuI4zW673yhDBAAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/viewIcons.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/viewIcons.rb new file mode 100644 index 0000000..fc88eb5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/ICONS/viewIcons.rb @@ -0,0 +1,329 @@ +#!/usr/bin/env ruby +# +# viewIcons.rb +# +# -- Display icons from icon library. +# +# -- Copy the clicked icon data (command string of creating +# a TkPhotoImage instance) to the clipboard. +# +require 'tk' +require 'tkextlib/ICONS' + +class ViewIcons + ##################################### + private + ##################################### + def _create_controls + @controls = base = TkFrame.new + columns = TkFrame.new(base) + line1 = TkFrame.new(base, :height=>2, :borderwidth=>1, :relief=>:sunken) + line2 = TkFrame.new(base, :height=>2, :borderwidth=>1, :relief=>:sunken) + + lbl_library = TkLabel.new(base, :font=>@boldfont, :text=>'Library') + lbl_groups = TkLabel.new(base, :font=>@boldfont, :text=>'Groups') + lbl_columns = TkLabel.new(base, :font=>@boldfont, :text=>'Columns') + + ent_library = TkEntry.new(base, :width=>50, :textvariable=>@library) + ent_groups = TkEntry.new(base, :width=>50, :textvariable=>@groups) + + btn_browse = TkButton.new(base, :text=>'Browse', + :command=>method(:select_icons)) + btn_view = TkButton.new(base, :text=>'View', + :command=>method(:display_icons)) + btn_exit = TkButton.new(base, :text=>'Exit', :command=>proc{exit}) + + @column_btns = {} + 6.step(20, 2){|i| + @column_btns[i] = TkButton.new(columns, + :text=>i.to_s, :width=>2, + :command=>proc{set_columns(i)} + ).pack(:side=>:left) + } + @column_btns[@columns][:relief] = :sunken + + lbl_library.grid(:row=>0, :column=>0, :padx=>4) + ent_library.grid(:row=>0, :column=>1) + btn_browse.grid(:row=>0, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew) + + line1.grid(:row=>1, :column=>0, :pady=>2, :columnspan=>3, :sticky=>:ew) + + lbl_groups.grid(:row=>2, :column=>0, :padx=>4) + ent_groups.grid(:row=>2, :column=>1) + btn_view.grid(:row=>2, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew) + + line1.grid(:row=>3, :column=>0, :pady=>2, :columnspan=>3, :sticky=>:ew) + + lbl_columns.grid(:row=>4, :column=>0, :padx=>4) + columns.grid(:row=>4, :column=>1, :padx=>2, :sticky=>:ew) + btn_exit.grid(:row=>4, :column=>2, :padx=>4, :pady=>2, :sticky=>:ew) + + base.pack + + ent_library.bind('Return', method(:display_icons), '') + ent_groups.bind('Return', method(:display_icons), '') + end + + def _create_display + base = TkFrame.new(:borderwidth=>2, :relief=>:sunken) + + @icons_window = icons = TkCanvas.new(base) + xscr = icons.xscrollbar(TkScrollbar.new(base)) + yscr = icons.yscrollbar(TkScrollbar.new(base)) + + icons.grid(:row=>0, :column=>0, :sticky=>:news) + yscr.grid(:row=>0, :column=>1, :sticky=>:ns) + xscr.grid(:row=>1, :column=>0, :sticky=>:ew) + base.grid_columnconfigure(0, :weight=>1) + base.grid_columnconfigure(1, :weight=>0) + base.grid_rowconfigure(0, :weight=>1) + base.grid_rowconfigure(1, :weight=>0) + # yscr.pack(:side=>:right, :fill=>:y) + # xscr.pack(:side=>:bottom, :fill=>:x) + # icons.pack(:side=>:left, :fill=>:both, :expand=>true) + + @icons_layout = TkFrame.new(icons).pack + TkcWindow.create(icons, 0, 0, :anchor=>:nw, :window=>@icons_layout) + @icons_layout.bind('Configure', method(:layout_resize), '') + + base.pack(:expand=>true, :fill=>:both) + end + + def _create_info_window + @info_window = TkToplevel.new(:background=>'lightyellow', :borderwidth=>1, + :relief=>:solid){|w| + lbl_name = TkLabel.new(w, :text=>'Name', :background=>'lightyellow', + :font=>@boldfont, :justify=>:left) + lbl_grps = TkLabel.new(w, :text=>'Groups', :background=>'lightyellow', + :font=>@boldfont, :justify=>:left) + lbl_type = TkLabel.new(w, :text=>'Type', :background=>'lightyellow', + :font=>@boldfont, :justify=>:left) + lbl_size = TkLabel.new(w, :text=>'Size', :background=>'lightyellow', + :font=>@boldfont, :justify=>:left) + + lbl_name.grid(:row=>0, :column=>0, :sticky=>:w) + lbl_grps.grid(:row=>1, :column=>0, :sticky=>:w) + lbl_type.grid(:row=>2, :column=>0, :sticky=>:w) + lbl_size.grid(:row=>3, :column=>0, :sticky=>:w) + + @name = TkLabel.new(w, :background=>'lightyellow', :justify=>:left) + @grps = TkLabel.new(w, :background=>'lightyellow', :justify=>:left) + @type = TkLabel.new(w, :background=>'lightyellow', :justify=>:left) + @size = TkLabel.new(w, :background=>'lightyellow', :justify=>:left) + + @name.grid(:row=>0, :column=>1, :sticky=>:w) + @grps.grid(:row=>1, :column=>1, :sticky=>:w) + @type.grid(:row=>2, :column=>1, :sticky=>:w) + @size.grid(:row=>3, :column=>1, :sticky=>:w) + + def name(txt) + @name['text'] = txt + end + def groups(txt) + @grps['text'] = txt + end + def type(txt) + @type['text'] = txt + end + def size(txt) + @size['text'] = txt + end + + overrideredirect(true) + withdraw + } + end + + def initialize(init_path = Tk::LIBRARY) + init_path = Tk::LIBRARY unless init_path + init_path = File.expand_path(init_path) + if File.directory?(init_path) + @initial_dir = init_path + @initial_file = 'tkIcons' + else + @initial_dir = File.dirname(init_path) + @initial_file = File.basename(init_path) + end + + if Tk::PLATFORM['platform'] == 'unix' + TkOption.add('*HighlightThickness', 0) + end + + @columns = 14 + @command = "" + + @delay_timer = nil + + dummy = TkLabel.new + @font = dummy.font + @boldfont = TkFont.new(@font, :weight=>:bold) + @icons = {} + @icon_name = {} + @icon_info = {} + + @library = TkVariable.new(File.join(@initial_dir, @initial_file)) + @groups = TkVariable.new('*') + + _create_controls + + _create_display + + _create_info_window + + Tk.root.title('viewIcons') + layout_resize + Tk.root.resizable(false, true) + + display_icons + end + + def init_info(item, name) + @icon_name[item] = name + + item.bind('Button-1', method(:clip_info), '%W') + item.bind('Enter', method(:delay_info), '%W') + item.bind('Leave', method(:cancel_info), '') + end + + def delay_info(item) + cancel_info + @delay_timer = TkTimer.new(200, 1, proc{ show_info(item) }).start + end + + def cancel_info + if @delay_timer + @delay_timer.cancel + @delay_timer = nil + end + @info_window.withdraw + end + + def show_info(item) + name, groups, type, size = @icon_info[@icon_name[item]] + @info_window.name(name) + @info_window.groups(groups) + @info_window.type(type) + @info_window.size(size) + + info_x = item.winfo_rootx + 10 + info_y = item.winfo_rooty + item.winfo_height + + @info_window.geometry("+#{info_x}+#{info_y}") + @info_window.deiconify + + @info_window.raise + + @delay_timer = nil + end + + def primary_transfer(offset, max_chars) + @command + end + + def lost_selection + @command = "" + end + + def clip_info(item) + name = @icon_name[item] + data_width = 60 + + cmd = "#{name} = TkPhotoImage.new(:data=><<'EOD')\n" + + icon_data = Tk::ICONS.query(name, :file=>@library.value, :items=>'d')[0][0] + + icon_data.scan(/.{1,#{data_width}}/m){|s| cmd << ' ' << s << "\n"} + + cmd << "EOD\n" + + @command = cmd + + TkClipboard.clear + TkClipboard.append(@command) + + if Tk::PLATFORM['platform'] == 'unix' + TkSelection.handle(Tk.root, method(:primary_transfer), + :selection=>'PRIMARY') + TkSelection.set_owner(Tk.root, :selection=>'PRIMARY', + :command=>method(:lost_selection)) + end + + Tk.bell + end + + def layout_resize + Tk.update + bbox = @icons_window.bbox('all') + width = @controls.winfo_width - @icons_window.yscrollbar.winfo_width - 8 + + @icons_window.configure(:width=>width, :scrollregion=>bbox, + :xscrollincrement=>'0.1i', + :yscrollincrement=>'0.1i') + end + + def select_icons + new_lib = Tk.getOpenFile(:initialdir=>@initial_dir, + :initialfile=>'tkIcons', + :title=>'Select Icon Library', + :filetypes=>[ + ['Icon Libraries', ['tkIcons*']], + ['All Files', ['*']] + ]) + + @library.value = new_lib if new_lib.length != 0 + display_icons + end + + def display_icons + column = 0 + limit = @columns - 1 + row = 0 + + unless File.exist?(@library.value) + Tk.messageBox(:icon=>'warning', :message=>'File does not exist', + :title=>'viewIcons') + return + end + + cursor = Tk.root[:cursor] + Tk.root[:cursor] = 'watch' + + Tk::ICONS.delete(@icons) + + @icons_frame.destroy if @icons_frame + @icons_frame = TkFrame.new(@icons_layout).pack + + @icons = Tk::ICONS.create(:file=>@library.value, :group=>@groups.value) + + Tk::ICONS.query(:file=>@library.value, :group=>@groups.value).each{|inf| + name = inf[0] + @icon_info[name] = inf + + lbl = TkLabel.new(@icons_frame, :image=>"::icon::#{name}") + lbl.grid(:column=>column, :row=>row, :padx=>3, :pady=>3) + # lbl.grid_columnconfigure column + + init_info(lbl, name) + + if column == limit + column = 0 + row += 1 + else + column += 1 + end + } + + Tk.root[:cursor] = cursor + end + + def set_columns(columns) + @columns = columns + 6.step(20, 2){|i| @column_btns[i][:relief] = :raised } + @column_btns[@columns][:relief] = :sunken + display_icons + end +end + +ViewIcons.new(ARGV[0]) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/barchart5.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/barchart5.rb new file mode 100644 index 0000000..db181d1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/barchart5.rb @@ -0,0 +1,101 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +load File.join(File.dirname(File.expand_path(__FILE__)), + 'scripts', 'stipples.rb') + +TkOption.add('*graph.x.Title', 'X Axis Label') +TkOption.add('*graph.y.Title', 'Y Axis Label') +TkOption.add('*graph.title', 'A Simple Barchart') +TkOption.add('*graph.x.Font', 'Times 10') +TkOption.add('*graph.Element.Relief', :raised) + +visual = Tk.root.winfo_screenvisual +if visual != 'staticgray' && visual != 'grayscale' + TkOption.add('*graph.LineMarker.color', 'yellow') + TkOption.add('*graph.Element.Background', 'white') + TkOption.add('*graph.Legend.activeForeground', 'pink') + TkOption.add('*print.background', 'yellow') + TkOption.add('*quit.background', 'red') + TkOption.add('*graph.background', 'palegreen') + TkOption.add('*graph.plotBackground', 'lightblue') +end + +htext = Tk::BLT::Htext.new(:widgetname=>'.htext', :text=><'print', :text=>'Print', + :command=>proc{ + $graph.postsript(:output=>'bar.ps') + }) + Tk::BLT::Htext::Htext_Widget.window.append(b) + } + +%% button. +%% + + ruby { + $graph = Tk::BLT::Barchart.new(:widgetname=>'.htext.graph', + :relief=>:raised, :borderwidth=>2) + $graph.xaxis_configure(:rotate=>90, :stepsize=>0) + Tk::BLT::Htext::Htext_Widget.window.append($graph, + :fill=>:both, :padx=>4) + } + +%% + Hit the %% + + ruby { + b = TkButton.new(Tk::BLT::Htext::Htext_Widget.window, + :widgetname=>'quit', :text=>'Quit', + :command=>proc{ exit }) + Tk::BLT::Htext::Htext_Widget.window.append(b) + } + +%% button when you've seen enough.%% + + ruby { + l = TkLabel.new(Tk::BLT::Htext::Htext_Widget.window, :bitmap=>'BLT') + Tk::BLT::Htext::Htext_Widget.window.append(l, :padx=>20) + } + +%% +EOD + +names = %w(One Two Three Four Five Six Seven Eight) +if visual == 'staticgray' || visual == 'grayscale' + fgcolors = %w(white white white white white white white white) + bgcolors = %w(black black black black black black black black) +else + fgcolors = %w(yellow orange red magenta purple blue cyan green) + bgcolors = %w(yellow4 orange4 red4 magenta4 purple4 blue4 cyan4 green4) +end + +numColors = names.length + +Tk::TCL_PRECISION.value = 15 + +x = Tk::BLT::Vector.new +y = Tk::BLT::Vector.new +x.seq(-5.0, 5.0, 0.2) +y.expr("sin(#{x})") +barWidth = 0.19 + +$graph.element_create('sin', :relief=>:raised, :borderwidth=>1, + :x=>x, :y=>y, :barwidth=>barWidth) + +Tk::BLT::Table.add(Tk.root, htext, :fill=>:both) + +Tk.root.minsize(0, 0) + +Tk::BLT.zoom_stack($graph) +Tk::BLT.crosshairs($graph) +Tk::BLT.active_legend($graph) +Tk::BLT.closest_point($graph) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/calendar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/calendar.rb new file mode 100644 index 0000000..4fc6d64 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/calendar.rb @@ -0,0 +1,117 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/blt' + +require 'date' + +dir = File.join(File.dirname(File.expand_path(__FILE__)), 'images') +file = File.join(dir, 'chalk.gif') +active = File.join(dir, 'rain.gif') + +texture1 = TkPhotoImage.new(:file=>file) +texture2 = TkPhotoImage.new(:file=>active) + +TkOption.add('*Tile', texture1) + +TkOption.add('*HighlightThickness', 0) +TkOption.add('*calendar.weekframe*Tile', texture2) +TkOption.add('*Calendar.Label.borderWidth', 0) +TkOption.add('*Calendar.Label.relief', :sunken) +TkOption.add('*Calendar.Frame.borderWidth', 2) +TkOption.add('*Calendar.Frame.relief', :raised) +TkOption.add('*Calendar.Label.font', 'Helvetica 11') +TkOption.add('*Calendar.Label.foreground', 'navyblue') +TkOption.add('*button.foreground', 'navyblue') +TkOption.add('*background', 'grey85') +TkOption.add('*Label.ipadX', 200) + +TkOption.add('*tile', texture2) + +class BLT_Calendar_sample + @@monthInfo = [ + nil, # dummy + ['January', 31], + ['February', 28], + ['March', 31], + ['April', 30], + ['May', 31], + ['June', 30], + ['July', 31], + ['August', 31], + ['Septembar', 30], + ['October', 31], + ['November', 30], + ['December', 31] + ] + + @@abbrDays = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ] + + def initialize() + today = Date.today + + if TkComm.bool(Tk.info(:commands, '.calendar')) + Tk.destroy('.calendar') + end + cal = Tk::BLT::Tile::Frame.new(:widgetname=>'.calendar', + :classname=>'Calendar', + :width=>'3i', :height=>'3i') + + mon = Tk::BLT::Tile::Label.new(cal, :font=>'Courier 14 bold', + :text=>"#{@@monthInfo[today.month][0]} " + + "#{today.year}") + Tk::BLT::Table.add(cal, mon, [1, 0], :cspan=>7, :pady=>10) + + week_f = Tk::BLT::Tile::Frame.new(cal, :widgetname=>'weekframe', + :relief=>:sunken, :borderwidth=>1) + Tk::BLT::Table.add(cal, week_f, [2, 0], :columnspan=>7, :fill=>:both) + + @@abbrDays.each_with_index{|dayName, idx| + Tk::BLT::Table.add(cal, + Tk::BLT::Tile::Label.new(cal, :text=>dayName, + :font=>'Helvetica 12'), + [2, idx], :pady=>2, :padx=>2) + } + + Tk::BLT::Table.itemconfigure(cal, 'c*', 'r2', :pad=>4) + + numDays = @@monthInfo[today.month][1] + week = 0 + cnt = 1 + + wkday = today.wday - ((today.day - 1) % 7) + wkday += 7 if wkday < 0 + + while cnt <= numDays + Tk::BLT::Table.add(cal, + Tk::BLT::Tile::Label.new(cal, :text=>cnt){ + self.configure(:borderwidth=>1, + :relief=>:sunken) if cnt == today.day + }, + [week+3, wkday], :fill=>:both, :ipadx=>10, :ipady=>4) + cnt += 1 + wkday += 1 + if wkday == 7 + week += 1 + wkday = 0 + end + end + + Tk::BLT::Tile::Frame.new(cal, :borderwidth=>1, :relief=>:sunken){|f| + Tk::BLT::Table.add(f, + Tk::BLT::Tile::Button.new(f, :widgetname=>'button', + :command=>proc{exit}, + :borderwidth=>2, + :text=>'Quit'), + :padx=>4, :pady=>4) + Tk::BLT::Table.add(cal, f, [week+4, 5], :cspan=>2, :pady=>4) + } + + Tk::BLT::Table.add(Tk.root, cal, :fill=>:both) + Tk::BLT::Table.itemconfigure(cal, 'r0', :resize=>:none) + end +end + +BLT_Calendar_sample.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph6.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph6.rb new file mode 100644 index 0000000..f899b44 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph6.rb @@ -0,0 +1,2222 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/blt' + +Tk::TCL_PRECISION.value = 15 + +[ + ['*Graph.Width', '10i'], + ['*Graph.leftMargin', '.75i'], + ['*Graph.Height', '6i'], + ['*Graph.plotBackground', 'black'], + ['*LineMarker.color', 'white'], + ['*LineMarker.Dashes', 5], + ['*TextMarker.foreground', 'white'], + ['*TextMarker.Background', ''], + + ['*Graph.x.hide', true], + ['*Graph.x.title', ''], + ['*Graph.y.rotate', 90], + # ['*Graph.y.stepSize', 2.0], + ['*Graph.title', ''], + ['*graph.Title', 'Example s27'], + ['*graph.x.hide', false], + ['*graph.topMargin', 0], + ['*graph.bottomMargin', 0], + ['*x.Title', 'Time'], + ['*y.Title', 'Signals'], + ['*Pixels', 1], + + ['*Reduce', 0.5], + ['*bufferElements', false], + + ['*Element.color', 'green4'], + ['*Element.ScaleSymbols', true], + ['*Element.Color', 'grey70'], + ['*Element.Symbol', :none], + ['*Element.LineWidth', 1], + # ['*Element.Smooth', :natural], + ['*Element.Smooth', :catrom], + + ['*activeLine.LineWidth', 2], + ['*activeLine.Color', 'white'], + ['*activeLine.Color', 'green1'], + + # ['*Legend.Hide', true], + ['*Legend.Position', :right], + ['*Legend.Relief', :flat], + ['*Legend.activeRelief', :sunken], + ['*Legend.borderWidth', 2], + #['*Legend.Font', '-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*'], + ['*Legend.Font', 'Helvetica -10'], + ['*Grid.hide', false], + ['*Grid.dashes', [1, 5]], + + # ['*foreground', 'white'], + ['*zoomOutline.outline', 'yellow'], +].each{|k, v| TkOption.add(k, v)} + +############################## + +class BLT_Graph_Demo + def initialize + @graph = Tk::BLT::Graph.new(:widgetname=>'graph') + + @root = Tk.root + @root.minsize(0, 0) + + _set_vectors() + (1..39).each{|i| @graph.element_create("V#{i}", :x=>@x, :y=>@v[i])} + + @top = Tk::BLT::Tile::Toplevel.new +=begin + legend = Tk::BLT::Graph.new(@top, :widgetname=>'legend', + :without_creating=>true) + @graph.legend_configure(:position=>legend) +=end + # legend = @graph.legend_window_create(@top, :widgetname=>'legend') + legend = @graph.legend_window_create(@top) + legend.pack(:fill=>:both, :expand=>true) + + Tk::BLT::Table.add(@root, @graph, [0,0], :fill=>:both) + + @quit_btn = Tk::BLT::Tile::Button.new(:text=>' quit ', :background=>'red', + :command=>proc{exit}) + Tk::BLT::Table.add(@root, @quit_btn, [1,0], :anchor=>:e, :padx=>10) + + @graph.zoom_stack + @graph.crosshairs + @graph.closest_point + @graph.print_key + + @graph.legend_bind(:all, 'ButtonRelease-1', + proc{|w| highlightTrace(w)}, '%W') + @graph.legend_bind(:all, 'ButtonRelease-3', + proc{|w| + w.legend_deactivate('*') + active = w.element_activate + w.element_deactivate(*active) + }, '%W') + end + + private + + def _set_vectors + @x = Tk::BLT::Vector.new(:variable=>'') + @v = [] + (1..39).each{|i| @v[i] = Tk::BLT::Vector.new(:variable=>'')} + + @x.set(<<-'EOD') + 0 1e-10 2e-10 3e-10 4e-10 5e-10 6e-10 7e-10 8e-10 9e-10 + 1e-09 1.1e-09 1.2e-09 1.3e-09 1.4e-09 1.5e-09 1.6e-09 1.7e-09 + 1.8e-09 1.9e-09 2e-09 2.1e-09 2.2e-09 2.3e-09 2.4e-09 2.5e-09 + 2.6e-09 2.7e-09 2.8e-09 2.9e-09 3e-09 3.1e-09 3.2e-09 3.3e-09 + 3.4e-09 3.5e-09 3.6e-09 3.7e-09 3.8e-09 3.9e-09 4e-09 4.1e-09 + 4.2e-09 4.3e-09 4.4e-09 4.5e-09 4.6e-09 4.7e-09 4.8e-09 + 4.9e-09 5e-09 5.1e-09 5.2e-09 5.3e-09 5.4e-09 5.5e-09 5.6e-09 + 5.7e-09 5.8e-09 5.9e-09 6e-09 6.1e-09 6.2e-09 6.3e-09 6.4e-09 + 6.5e-09 6.6e-09 6.7e-09 6.8e-09 6.9e-09 7e-09 7.1e-09 7.2e-09 + 7.3e-09 7.4e-09 7.5e-09 7.6e-09 7.7e-09 7.8e-09 7.9e-09 + 8e-09 8.1e-09 8.2e-09 8.3e-09 8.4e-09 8.5e-09 8.6e-09 8.7e-09 + 8.8e-09 8.9e-09 9e-09 9.1e-09 9.2e-09 9.3e-09 9.4e-09 9.5e-09 + 9.6e-09 9.7e-09 9.8e-09 9.9e-09 1e-08 1.01e-08 1.02e-08 + 1.03e-08 1.04e-08 1.05e-08 1.06e-08 1.07e-08 1.08e-08 1.09e-08 + 1.1e-08 1.11e-08 1.12e-08 1.13e-08 1.14e-08 1.15e-08 1.16e-08 + 1.17e-08 1.18e-08 1.19e-08 1.2e-08 1.21e-08 1.22e-08 1.23e-08 + 1.24e-08 1.25e-08 1.26e-08 1.27e-08 1.28e-08 1.29e-08 1.3e-08 + 1.31e-08 1.32e-08 1.33e-08 1.34e-08 1.35e-08 1.36e-08 1.37e-08 + 1.38e-08 1.39e-08 1.4e-08 1.41e-08 1.42e-08 1.43e-08 1.44e-08 + 1.45e-08 1.46e-08 1.47e-08 1.48e-08 1.49e-08 1.5e-08 1.51e-08 + 1.52e-08 1.53e-08 1.54e-08 1.55e-08 1.56e-08 1.57e-08 1.58e-08 + 1.59e-08 1.6e-08 1.61e-08 1.62e-08 1.63e-08 1.64e-08 1.65e-08 + 1.66e-08 1.67e-08 1.68e-08 1.69e-08 1.7e-08 1.71e-08 1.72e-08 + 1.73e-08 1.74e-08 1.75e-08 1.76e-08 1.77e-08 1.78e-08 1.79e-08 + 1.8e-08 1.81e-08 1.82e-08 1.83e-08 1.84e-08 1.85e-08 1.86e-08 + 1.87e-08 1.88e-08 1.89e-08 1.9e-08 1.91e-08 1.92e-08 1.93e-08 + 1.94e-08 1.95e-08 1.96e-08 1.97e-08 1.98e-08 1.99e-08 2e-08 + 2.01e-08 2.02e-08 2.03e-08 2.04e-08 2.05e-08 2.06e-08 2.07e-08 + 2.08e-08 2.09e-08 2.1e-08 2.11e-08 2.12e-08 2.13e-08 2.14e-08 + 2.15e-08 2.16e-08 2.17e-08 2.18e-08 2.19e-08 2.2e-08 2.21e-08 + 2.22e-08 2.23e-08 2.24e-08 2.25e-08 2.26e-08 2.27e-08 2.28e-08 + 2.29e-08 2.3e-08 2.31e-08 2.32e-08 2.33e-08 2.34e-08 2.35e-08 + 2.36e-08 2.37e-08 2.38e-08 2.39e-08 2.4e-08 2.41e-08 2.42e-08 + 2.43e-08 2.44e-08 2.45e-08 2.46e-08 2.47e-08 2.48e-08 2.49e-08 + 2.5e-08 2.51e-08 2.52e-08 2.53e-08 2.54e-08 2.55e-08 2.56e-08 + 2.57e-08 2.58e-08 2.59e-08 2.6e-08 2.61e-08 2.62e-08 2.63e-08 + 2.64e-08 2.65e-08 2.66e-08 2.67e-08 2.68e-08 2.69e-08 2.7e-08 + 2.71e-08 2.72e-08 2.73e-08 2.74e-08 2.75e-08 2.76e-08 2.77e-08 + 2.78e-08 2.79e-08 2.8e-08 2.81e-08 2.82e-08 2.83e-08 2.84e-08 + 2.85e-08 2.86e-08 2.87e-08 2.88e-08 2.89e-08 2.9e-08 2.91e-08 + 2.92e-08 2.93e-08 2.94e-08 2.95e-08 2.96e-08 2.97e-08 2.98e-08 + 2.99e-08 3e-08 3.01e-08 3.02e-08 3.03e-08 3.04e-08 3.05e-08 + 3.06e-08 3.07e-08 3.08e-08 3.09e-08 3.1e-08 3.11e-08 3.12e-08 + 3.13e-08 3.14e-08 3.15e-08 3.16e-08 3.17e-08 3.18e-08 3.19e-08 + 3.2e-08 3.21e-08 3.22e-08 3.23e-08 3.24e-08 3.25e-08 3.26e-08 + 3.27e-08 3.28e-08 3.29e-08 3.3e-08 3.31e-08 3.32e-08 3.33e-08 + 3.34e-08 3.35e-08 3.36e-08 3.37e-08 3.38e-08 3.39e-08 3.4e-08 + 3.41e-08 3.42e-08 3.43e-08 3.44e-08 3.45e-08 3.46e-08 3.47e-08 + 3.48e-08 3.49e-08 3.5e-08 3.51e-08 3.52e-08 3.53e-08 3.54e-08 + 3.55e-08 3.56e-08 3.57e-08 3.58e-08 3.59e-08 3.6e-08 + EOD + + @v[1].set(<<-'EOD') + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + EOD + + @v[2].set(<<-'EOD') + 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 + 5.32907e-15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 + 5 5 5 5 5 5 5 5 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 + EOD + + @v[3].set(<<-'EOD') + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + EOD + + @v[4].set(<<-'EOD') + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + EOD + + @v[5].set(<<-'EOD') + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + EOD + + @v[6].set(<<-'EOD') + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 8.88178e-16 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1 2.13718e-14 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 + EOD + + @v[7].set(<<-'EOD') + 5 5.16904 4.84159 3.34542 0.317102 0.103304 0.0275721 0.0221534 + 0.017689 0.0142639 0.0113974 0.00918238 0.00742541 0.00616602 + 0.00481195 0.00397049 -0.0659889 -0.025671 0.165495 0.986891 + 3.05229 4.55511 4.91611 4.98192 4.99428 4.99833 4.99095 + 4.97295 4.95493 4.93428 4.90723 4.94799 4.98584 4.99566 + 4.99813 4.99907 4.99947 4.99965 4.99976 4.99984 4.99989 + 4.99992 4.99994 4.99996 4.99998 5.00002 5.00006 5.00002 + 4.99996 4.99994 4.99999 5.00003 5.00002 5 4.99997 4.99997 + 4.99997 4.99997 4.99997 4.99996 4.99997 4.99997 4.99998 + 4.99998 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99998 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.16575 + 4.69986 2.43862 0.0230224 0.035229 -0.0210607 -0.0292766 + -0.0172693 -0.00271479 -0.000912251 -0.000349106 -0.000116866 + -4.24733e-05 -1.39536e-05 -3.01179e-05 -0.0657192 -0.0204835 + 0.183378 1.07181 3.118 4.46472 4.84158 4.94795 4.98173 4.99236 + 4.99762 5.01939 5.0433 5.05332 5.04959 5.03955 5.02851 5.02052 + 5.01422 5.00965 5.00631 5.00405 5.00248 5.00083 5.00012 + 5.00209 5.00387 5.00347 4.99917 4.99213 4.98411 4.97521 + 4.96332 4.94601 4.9304 4.94633 4.97936 4.99264 4.99685 4.99857 + 4.99925 4.99954 4.9997 4.99973 4.9997 4.99973 4.99979 4.99983 + 4.99986 4.99988 4.9999 4.9999 4.99992 4.99993 4.99994 4.99995 + 4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 + 5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 5 5 5.14242 4.76101 3.16003 0.299374 + 0.0645506 -0.000498424 -2.45108e-05 -2.27986e-05 -5.24401e-05 + -4.9884e-05 -4.92491e-05 -2.93354e-05 -3.21402e-05 -2.11851e-05 + -3.37925e-05 -0.0657892 -0.020563 0.182582 1.06058 3.12484 + 4.46552 4.84146 4.95102 4.98556 4.99472 4.99806 4.99909 + 4.99955 4.99976 4.99994 4.99992 5.00029 4.99967 4.99849 + 4.99736 4.99884 5.00099 5.00377 5.00215 4.99994 4.99893 + 4.99788 4.99862 5.00055 5.00134 5.00127 5.00073 5.00039 + 5.00018 5.00006 5.00001 4.99985 5.00026 5.00018 5.00003 + 4.99981 4.99985 4.99987 4.99985 4.99982 4.99982 4.99982 + 4.99983 4.99985 4.99987 4.99989 4.99991 4.99992 4.99994 + 4.99995 4.99995 4.99994 4.99994 4.99996 4.99999 5.00002 + 5.00008 5.00009 5.00006 5.00001 5 4.99999 4.99998 4.99997 + 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 + 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 4.99998 + 4.99998 + EOD + + @v[8].set(<<-'EOD') + 5 5.03758 5.04711 4.96911 4.20882 3.96295 4.01117 4.15521 + 4.2967 4.42274 4.5295 4.6176 4.69014 4.74831 4.7966 4.83537 + 4.80526 4.787 4.79295 4.88588 5.08978 5.15615 5.10778 5.07718 + 5.06652 5.08225 4.9744 4.52977 3.77452 2.69426 1.15294 0.245509 + 0.0981544 0.0567527 0.0367487 0.0252578 0.0180599 0.0133837 + 0.0101497 0.0078616 0.00620186 0.00499056 0.0041027 0.00344223 + 0.00295808 0.00260089 0.00229887 0.00200817 0.00176397 0.00160116 + 0.00147381 0.00134645 0.00125029 0.00116043 0.00107371 0.00101981 + 0.000965921 0.000912028 0.000858135 0.000804242 0.000761669 + 0.00072672 0.000691771 0.000656823 0.000621874 0.000588722 + 0.00057041 0.000552098 0.000533785 0.000515473 0.000497162 + 0.00047885 0.000460537 0.000442226 0.000423914 0.000405601 + 0.000388399 0.000378694 0.000368989 0.000359284 0.00034958 + 0.000339875 0.00033017 0.000320465 0.00031076 0.000301055 + 0.00029135 0.000282207 0.000276247 0.000270287 0.000264327 + 0.000258367 0.000252407 0.000246447 0.000240487 0.000234527 + 0.000228567 0.000222607 0.000217086 0.000213696 0.000210307 + 0.000206918 0.000203528 0.000200139 0.00019675 0.00019336 + 0.000189971 0.000186582 0.000183192 0.000179803 0.000176414 + 0.000173025 0.000169635 0.000166246 0.000162857 0.000159467 + 0.000156078 0.000152689 0.000149299 0.00014591 0.00014255 + 0.0316021 0.163272 0.348732 0.603651 0.35745 0.135965 0.0707354 + 0.0314595 0.0201047 0.00994945 0.00389601 0.00138839 0.00060778 + 0.000329648 0.000492396 -0.0732035 -0.0844077 -0.0789062 + -0.0390837 0.0197559 0.0183094 -0.00180099 -0.0189565 -0.0424144 + -0.0735904 -0.0892423 0.285039 1.13702 2.10809 2.95826 3.60164 + 4.0435 4.35771 4.57254 4.71769 4.81329 4.87534 4.91487 4.94264 + 4.97375 5.01526 5.06517 5.10154 5.06259 4.89005 4.5787 4.12226 + 3.46151 2.49023 1.2586 0.32725 0.116753 0.0701865 0.0455509 + 0.0286914 0.0178176 0.0117599 0.00902715 0.00760583 0.00637745 + 0.00543811 0.00439377 0.00352448 0.0030151 0.00285771 0.002465 + 0.00203114 0.00173004 0.0014839 0.00125177 0.00105327 0.000894905 + 0.000766372 0.000658894 0.000569105 0.000492114 0.000427938 + 0.000370217 0.000314758 0.000266569 0.000233726 0.000209048 + 0.000191957 0.000177169 0.000166604 0.000161 0.000157314 + 0.000143828 0.000130342 0.000116857 0.000103371 8.98855e-05 + 7.63998e-05 6.29141e-05 5.76583e-05 5.30027e-05 4.8347e-05 + 4.36913e-05 3.90357e-05 3.438e-05 2.97243e-05 2.72507e-05 + 2.59083e-05 2.45659e-05 2.32235e-05 2.18811e-05 2.05387e-05 + 1.91963e-05 1.78539e-05 1.65115e-05 1.51691e-05 1.38267e-05 + 1.24843e-05 1.11419e-05 9.79954e-06 8.51574e-06 7.69807e-06 + 6.8804e-06 6.06273e-06 5.24506e-06 0.0287318 0.0317111 -0.0320087 + -0.103609 0.0369639 0.0121128 0.00961197 0.00934971 0.00820853 + 0.00699769 0.00607002 0.00535541 0.00476552 0.00427601 0.00376357 + -0.073012 -0.0866964 -0.0809538 -0.038005 0.0277001 0.0188906 + 0.00614597 0.00373629 0.00489787 0.0146573 0.0191052 0.0151708 + 0.0124224 0.0105859 0.00879272 0.00729464 0.0070047 0.00449575 + -0.00626652 -0.0252417 -0.0147287 0.022538 0.0822905 0.0947372 + 0.0657516 0.0445506 0.0316753 0.0220971 0.0158101 0.0140971 + 0.0161498 0.0139876 0.0122447 0.0106994 0.009397 0.00822236 + 0.00686509 0.00797431 0.00751269 0.00671173 0.00595243 0.00524633 + 0.00459528 0.00401688 0.00350109 0.00303954 0.00260569 0.00222792 + 0.00191033 0.00163917 0.00140949 0.00121464 0.0010471 0.000900638 + 0.000768847 0.000645236 0.000524807 0.000460275 0.000442237 + 0.000446775 0.000397026 0.000301585 0.000228994 0.000190894 + 0.000166569 0.000152261 0.000137953 0.000123644 0.000109336 + 9.50281e-05 8.56557e-05 7.78437e-05 7.00318e-05 6.22198e-05 + 5.44079e-05 4.87539e-05 4.57761e-05 4.27982e-05 3.98203e-05 + 3.68425e-05 3.38646e-05 3.08868e-05 2.79089e-05 2.4931e-05 + 2.19532e-05 1.89753e-05 1.75244e-05 1.64095e-05 1.52946e-05 + 1.41797e-05 1.30648e-05 1.19499e-05 1.0835e-05 9.72011e-06 + 8.60521e-06 7.4903e-06 6.5117e-06 6.10334e-06 5.69497e-06 + 5.2866e-06 4.87824e-06 4.46987e-06 4.06151e-06 3.65314e-06 + 3.24477e-06 + EOD + + @v[9].set(<<-'EOD') + 1.86175 1.99708 2.07867 2.01211 2.43309 3.27194 3.63896 + 3.90426 4.11074 4.27932 4.41496 4.52543 4.61491 4.68862 + 4.7479 4.79666 4.72895 4.68886 4.70354 4.81353 5.01568 5.14184 + 5.10482 5.07362 5.05143 5.03638 5.02323 5.01465 5.00853 + 5.00383 4.99985 5.00454 5.00652 5.00546 5.00411 5.003 5.00214 + 5.00151 5.00106 5.00073 5.0005 5.00034 5.00023 5.00015 5.0001 + 5.00005 5 5.00001 5.00005 5.00005 5.00003 5 4.99998 4.99996 + 4.99994 4.99995 4.99997 4.99998 5 5.00001 5.00002 5.00002 + 5.00003 5.00003 5.00003 5.00003 5.00003 5.00003 5.00002 + 5.00002 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 + 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.17392 4.94828 3.78491 + 1.52079 0.608874 0.244031 0.127087 0.0552995 0.0361032 0.0169025 + 0.006364 0.00217624 0.000921391 0.000457305 0.000786754 + -0.120016 -0.148054 -0.15898 -0.0801463 0.16463 0.174017 + 0.0799249 0.0318788 0.0129696 0.00483397 0.0025677 0.0042079 + 0.00350003 0.00178404 -8.72902e-05 -0.00128497 -0.00142213 + -0.00130018 -0.00106874 -0.000789207 -0.000824335 -0.00104518 + -0.00136799 -0.004366 -0.0102621 -0.0109254 -0.00649259 + -0.00194842 0.00029793 0.00148673 0.00221085 0.00228291 + 0.00185261 0.00139687 0.00148183 0.00562266 0.00844119 0.00754627 + 0.00657396 0.00591212 0.00539269 0.0049282 0.00448417 0.0040572 + 0.00363719 0.00320392 0.00279607 0.00243938 0.00211505 0.00182302 + 0.00156254 0.0013341 0.00113834 0.000971865 0.00082776 0.000706193 + 0.000602499 0.000515059 0.000441401 0.00037897 0.000325459 + 0.00028083 0.000242096 0.000207274 0.000176444 0.000150372 + 0.000126407 0.000103373 9.05522e-05 8.53555e-05 8.63685e-05 + 9.02593e-05 8.37346e-05 7.72099e-05 7.06852e-05 6.41605e-05 + 5.76358e-05 5.11112e-05 4.45865e-05 4.08176e-05 3.72497e-05 + 3.36818e-05 3.01138e-05 2.65459e-05 2.2978e-05 1.94101e-05 + 1.76154e-05 1.67399e-05 1.58645e-05 1.4989e-05 1.41136e-05 + 1.32381e-05 1.23626e-05 1.14872e-05 1.06117e-05 9.73629e-06 + 8.86083e-06 7.98538e-06 7.10993e-06 6.23447e-06 5.44363e-06 + 5.32578e-06 5.20792e-06 5.09007e-06 4.97222e-06 0.0784323 + 0.0474527 -0.0764232 -0.151146 0.0615785 0.0144489 0.00974161 + 0.00947176 0.00849005 0.00728201 0.00630581 0.00554032 0.00487809 + 0.00441504 0.00384139 -0.118943 -0.149894 -0.161173 -0.0825299 + 0.171686 0.176912 0.0816085 0.0335236 0.013791 0.0056976 + 0.00238833 0.00105348 0.000526199 0.00025969 0.000396026 + 0.000837835 0.00170131 0.00196699 -0.000553314 -0.0061621 + -0.0111895 -0.0142698 -0.0124608 -0.00795847 -0.00467822 + -0.0043058 -0.00874449 -0.0118584 -0.00871386 -0.00377892 + 1.95244e-05 0.00218952 0.00325486 0.00386497 0.00422837 + 0.00446883 0.00447065 0.00486647 0.00547838 0.00565398 0.00559092 + 0.00538752 0.00507015 0.00466305 0.00420756 0.00373465 0.00328404 + 0.00287059 0.00250057 0.00216124 0.00184861 0.00156815 0.00134624 + 0.00117857 0.00103412 0.0008948 0.000761012 0.000619853 + 0.000462614 0.000319965 0.000287666 0.000356415 0.000379946 + 0.000339183 0.00027972 0.000252982 0.000226244 0.000199507 + 0.000172769 0.000146031 0.000130097 0.000117578 0.000105059 + 9.25401e-05 8.00213e-05 7.11204e-05 6.67061e-05 6.22918e-05 + 5.78775e-05 5.34632e-05 4.90489e-05 4.46346e-05 4.02203e-05 + 3.5806e-05 3.13916e-05 2.69773e-05 2.4827e-05 2.31747e-05 + 2.15225e-05 1.98702e-05 1.8218e-05 1.65658e-05 1.49135e-05 + 1.32613e-05 1.1609e-05 9.95678e-06 8.50108e-06 7.86765e-06 + 7.23422e-06 6.60079e-06 5.96736e-06 5.33393e-06 4.7005e-06 + 4.06707e-06 3.43363e-06 + EOD + + @v[10].set(<<-'EOD') + 1.86175 1.99308 2.16619 2.46661 3.09359 3.76864 4.31299 + 4.65564 4.83425 4.92153 4.96157 4.98063 4.98649 4.99039 + 4.9945 4.9972 4.96206 4.89882 4.83865 4.83202 4.91016 5.04479 + 5.06078 5.04827 5.03474 5.0246 5.01639 5.00996 5.00569 5.00239 + 5.00043 5.00296 5.00437 5.00382 5.00287 5.00208 5.00148 + 5.00104 5.00073 5.0005 5.00034 5.00023 5.00016 5.00011 5.00008 + 5.00007 5.00007 5.00004 5 4.99998 4.99998 4.99997 4.99998 + 4.99999 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 + 5.00001 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5.10081 + 5.10949 4.98359 5.00733 5.15145 4.37298 2.36126 0.470759 + 0.0577238 0.0115884 0.00262611 0.000671499 0.000389038 0.000291291 + 0.000317347 -0.0167823 -0.0158344 -0.0140559 0.0104849 0.0865874 + 0.107813 0.0524688 0.0214369 0.00876443 0.00341595 0.00170778 + 0.00259042 0.0022241 0.00118519 1.10217e-06 -0.000784506 + -0.000948169 -0.000856256 -0.000696719 -0.000485987 -0.000724787 + -0.000981491 -0.001454 -0.00552498 -0.0114992 -0.0105266 + -0.00543527 -0.000982798 0.00127356 0.00224212 0.00275439 + 0.00281098 0.0025471 0.00230368 0.00222576 0.00485522 0.00729453 + 0.00691796 0.0062615 0.00573987 0.0052688 0.00481185 0.00436934 + 0.00394326 0.00352712 0.00309978 0.00270038 0.00235335 0.00203742 + 0.00175256 0.00150067 0.00128126 0.00109323 0.000933619 + 0.000795113 0.000678182 0.00057843 0.000494345 0.000423609 + 0.000363821 0.000312766 0.000269856 0.000232389 0.000198382 + 0.000168126 0.00014267 0.000119293 9.69034e-05 8.5669e-05 + 8.26828e-05 8.64066e-05 9.26665e-05 8.5454e-05 7.82416e-05 + 7.10291e-05 6.38167e-05 5.66043e-05 4.93918e-05 4.21794e-05 + 3.86073e-05 3.53007e-05 3.19941e-05 2.86876e-05 2.5381e-05 + 2.20744e-05 1.87678e-05 1.70933e-05 1.62648e-05 1.54363e-05 + 1.46079e-05 1.37794e-05 1.2951e-05 1.21225e-05 1.12941e-05 + 1.04656e-05 9.63716e-06 8.80871e-06 7.98026e-06 7.1518e-06 + 6.32335e-06 5.5374e-06 5.08959e-06 4.64178e-06 4.19397e-06 + 3.74616e-06 0.0438026 0.0242078 -0.0602019 -0.0840866 0.00148461 + -0.00292489 0.000442098 0.00219489 0.00281478 0.00290756 + 0.00277945 0.00263896 0.00240099 0.00223283 0.001947 -0.0153629 + -0.0148815 -0.0128673 0.0126017 0.0905161 0.11051 0.0538958 + 0.022562 0.00935726 0.00397422 0.00172534 0.000790207 0.000416322 + 0.000191632 0.000469721 0.0009779 0.00192566 0.00200688 + -0.0016502 -0.00733932 -0.0128113 -0.0147608 -0.0115456 + -0.00668995 -0.00401368 -0.00463908 -0.0101197 -0.0118993 + -0.0076276 -0.00262656 0.000813059 0.00264455 0.00350796 + 0.00399494 0.0043049 0.00451658 0.00444739 0.00503842 0.00559516 + 0.00568213 0.00556459 0.0053176 0.00496654 0.00454337 0.00408592 + 0.00362171 0.00317793 0.00277001 0.00240394 0.00207009 0.00176575 + 0.00149725 0.00129045 0.00114257 0.00101135 0.000871672 + 0.000723764 0.000580438 0.000427507 0.000296956 0.000281834 + 0.000376628 0.000412266 0.000367547 0.000295305 0.000264513 + 0.000233721 0.000202929 0.000172137 0.000141345 0.000124721 + 0.000112577 0.000100433 8.82893e-05 7.61453e-05 6.75517e-05 + 6.33609e-05 5.91701e-05 5.49792e-05 5.07884e-05 4.65976e-05 + 4.24067e-05 3.82159e-05 3.40251e-05 2.98342e-05 2.56434e-05 + 2.36401e-05 2.21181e-05 2.05961e-05 1.90741e-05 1.75521e-05 + 1.60301e-05 1.45081e-05 1.29861e-05 1.14641e-05 9.94208e-06 + 8.59252e-06 7.96439e-06 7.33626e-06 6.70813e-06 6.07999e-06 + 5.45186e-06 4.82373e-06 4.1956e-06 3.56747e-06 + EOD + + @v[11].set(<<-'EOD') + 1.86175 1.73419 1.42874 1.04055 0.943004 0.268275 0.0826455 + 0.0388346 0.0214104 0.0135431 0.00961322 0.00712846 0.00588262 + 0.00432397 0.00377774 0.00270134 -0.00393731 -0.00542187 + -0.00126596 0.0113777 0.0134522 0.00477056 -0.00211067 -0.00229253 + -0.00173355 -0.00122404 -0.00113426 -0.000744931 -0.000520112 + -0.000410048 -0.000220439 0.000508104 5.15856e-05 -0.000112593 + -0.000118917 -9.57394e-05 -7.15727e-05 -5.11847e-05 -3.58275e-05 + -2.47166e-05 -1.68866e-05 -1.14082e-05 -7.66646e-06 -5.12139e-06 + -3.63426e-06 -3.01815e-06 -2.64862e-06 -1.4947e-06 -1.91403e-07 + -2.5763e-08 -7.73699e-07 -1.52164e-06 -1.07268e-06 -3.81696e-07 + 2.6727e-07 4.75489e-07 6.83708e-07 8.91926e-07 1.10014e-06 + 1.30836e-06 1.2482e-06 1.00726e-06 7.66311e-07 5.25364e-07 + 2.84417e-07 6.27857e-08 7.43904e-10 -6.12979e-08 -1.2334e-07 + -1.85382e-07 -2.47423e-07 -3.09465e-07 -3.71507e-07 -4.33549e-07 + -4.95591e-07 -5.57633e-07 -6.04571e-07 -5.4944e-07 -4.9431e-07 + -4.3918e-07 -3.84049e-07 -3.28919e-07 -2.73789e-07 -2.18659e-07 + -1.63528e-07 -1.08398e-07 -5.32678e-08 1.062e-09 5.08502e-08 + 1.00638e-07 1.50427e-07 2.00215e-07 2.50003e-07 2.99791e-07 + 3.4958e-07 3.99368e-07 4.49156e-07 4.98944e-07 5.34512e-07 + 5.01032e-07 4.67553e-07 4.34073e-07 4.00593e-07 3.67113e-07 + 3.33633e-07 3.00153e-07 2.66674e-07 2.33194e-07 1.99714e-07 + 1.66234e-07 1.32754e-07 9.92744e-08 6.57945e-08 3.23147e-08 + -1.16513e-09 -3.4645e-08 -6.81248e-08 -1.01605e-07 -1.35084e-07 + -1.68564e-07 -2.18729e-07 0.0114926 -0.0245378 -0.111828 + 0.0964775 1.61491 3.22668 4.22041 4.54492 4.82845 4.94868 + 4.98588 4.99609 4.9981 4.99908 4.99788 4.98395 4.99294 4.99724 + 5.01939 5.0471 5.00902 4.98194 4.98496 4.99188 4.99623 4.99862 + 5.00025 4.99974 4.99953 4.99946 4.99958 5.00012 4.99997 + 4.99992 4.99988 4.99985 4.9998 4.9997 4.9988 4.99806 4.99982 + 5.00143 5.00159 5.00098 5.00053 5.00028 5.00007 4.99977 + 4.99992 5.00005 5.00133 5.0009 4.99993 4.99972 4.99975 4.9998 + 4.99982 4.99983 4.99983 4.99983 4.99983 4.99984 4.99986 + 4.99987 4.99989 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 + 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99998 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 5 5 5.01457 4.99482 4.96561 4.99326 + 5.03452 5.00424 5.00101 5.00045 5.00004 4.99965 4.99997 + 4.99994 4.99958 4.99999 4.99936 4.9839 4.99248 4.99717 5.01976 + 5.04869 5.0087 4.98143 4.98488 4.99199 4.99622 4.9983 4.99928 + 4.99971 4.99986 5.00031 5.00022 5.00035 5.0001 4.99884 4.99811 + 4.99803 4.99887 5.00078 5.00151 5.00116 5.00007 4.99843 + 4.99915 5.00107 5.00168 5.00141 5.00092 5.00055 5.0003 5.00016 + 5.0001 5.00001 5.00016 5.0002 5.00009 4.99993 4.99975 4.99984 + 4.99991 4.99991 4.99982 4.99974 4.99974 4.99985 4.99995 + 4.99999 4.99998 5.00004 5.00013 5.00015 5.00007 4.99988 + 4.99982 4.99985 4.99995 5.00006 5.0002 5.00025 5.0002 5.00009 + 5.00006 5.00004 5.00002 5 4.99998 4.99997 4.99998 4.99998 + 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 + 4.99998 4.99998 4.99998 + EOD + + @v[12].set(<<-'EOD') + 5 5.16975 4.78685 2.94241 0.126698 0.0487004 -0.00422591 + -0.00130689 -0.000486756 -0.000195875 -0.000108988 -6.66736e-05 + -7.26005e-05 -5.63608e-05 -3.81859e-05 -2.123e-05 -0.0646846 + -0.0184474 0.182248 1.06731 3.10988 4.46133 4.84133 4.95113 + 4.98364 4.99455 4.99694 4.99727 4.9994 4.99975 5.0001 5.00132 + 5.00089 5.00039 5.00019 5.00011 5.00006 5.00005 5.00004 + 5.00001 4.99992 4.99992 5.00002 5.00013 5.00017 5.00009 + 4.99992 4.99991 4.99994 4.99996 4.99998 4.99999 5.00001 + 5.00004 5.00006 5.00005 5.00004 5.00003 5.00002 5.00001 + 5 4.99999 4.99999 4.99998 4.99998 4.99997 4.99997 4.99998 + 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 + 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 5 5.14699 4.78074 + 3.19424 0.305663 0.0611255 -0.00179951 -0.0012032 0.000405978 + 0.000989399 0.000445194 0.000191447 8.30476e-05 3.96236e-05 + 1.91866e-05 1.70665e-05 -0.0655239 -0.0210234 0.1827 1.06848 + 3.11554 4.46518 4.84212 4.94853 4.98244 4.99434 4.9997 5.00081 + 5.00009 4.99972 4.99985 4.99974 4.9995 4.99949 4.99958 4.99973 + 4.99948 4.99914 4.99874 4.99946 5.00309 5.0091 5.01576 5.01835 + 5.01852 5.0176 5.01625 5.01479 5.01345 5.01264 5.011 5.01092 + 5.01344 5.01363 5.01289 5.01184 5.01071 5.00956 5.00848 + 5.00751 5.00663 5.00577 5.00497 5.00427 5.00365 5.0031 5.00264 + 5.00224 5.00191 5.00163 5.00138 5.00117 5.00099 5.00083 + 5.00071 5.00061 5.00053 5.00045 5.00037 5.00029 5.00022 + 5.00019 5.0002 5.00023 5.00024 5.00023 5.00023 5.00022 5.0002 + 5.00018 5.00016 5.00014 5.00011 5.00009 5.00007 5.00006 + 5.00005 5.00005 5.00004 5.00003 5.00002 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00001 5.00001 5.00001 5.14298 4.79809 3.32704 + 0.498385 0.105773 0.0160646 0.0319912 0.0299434 0.0240102 + 0.0185844 0.0130411 0.0106532 0.00864871 0.00744519 0.00660887 + -0.0612913 -0.0203719 0.174998 0.991787 3.06292 4.60005 + 4.93058 4.98917 5.00033 4.9999 4.99909 4.9966 4.9955 4.99488 + 4.99374 4.9943 5.00131 5.00506 4.99311 4.96288 4.93567 4.92439 + 4.94236 4.9732 4.98864 4.99458 5.00031 5.00694 5.01525 5.01945 + 5.01998 5.01953 5.01874 5.01766 5.0164 5.01509 5.01326 5.01423 + 5.01455 5.01361 5.01245 5.01122 5.01002 5.00888 5.00783 + 5.00687 5.00596 5.00514 5.00442 5.00379 5.00325 5.00279 + 5.0024 5.00208 5.0018 5.00153 5.00126 5.00107 5.00094 5.00085 + 5.00078 5.00072 5.00063 5.00053 5.00042 5.00038 5.00034 + 5.0003 5.00027 5.00023 5.00021 5.00019 5.00017 5.00015 5.00013 + 5.00012 5.00011 5.0001 5.0001 5.00009 5.00008 5.00007 5.00007 + 5.00006 5.00005 5.00005 5.00004 5.00004 5.00003 5.00003 + 5.00002 5.00002 5.00002 5.00001 5.00001 5 5 5 5.00001 5.00001 + 5.00001 5.00002 5.00002 5.00002 5.00002 + EOD + + @v[13].set(<<-'EOD') + 9.73784e-10 0.0189926 0.0926769 0.206309 0.111533 0.0953491 + 0.0426966 0.0214177 0.0117943 0.00741442 0.00528816 0.00398417 + 0.0032967 0.00266499 0.00206647 0.00158788 -0.0371391 -0.0439528 + -0.0408653 -0.0188706 0.0150241 0.0126852 0.00209817 -0.000239206 + -5.31488e-05 0.000876324 -0.00451221 -0.0165223 -0.0284127 + -0.0427584 -0.0502453 -0.0257366 -0.00903938 -0.00376456 + -0.00233385 -0.00169922 -0.00130397 -0.00102542 -0.000811435 + -0.000648115 -0.000529266 -0.00043795 -0.00036574 -0.00030716 + -0.00026221 -0.000229662 -0.000205112 -0.000181038 -0.000162045 + -0.000148988 -0.000137633 -0.000126278 -0.000115562 -0.000104976 + -9.49324e-05 -9.0585e-05 -8.62375e-05 -8.18901e-05 -7.75426e-05 + -7.31952e-05 -6.93752e-05 -6.59106e-05 -6.24461e-05 -5.89815e-05 + -5.55169e-05 -5.22412e-05 -5.05263e-05 -4.88114e-05 -4.70966e-05 + -4.53817e-05 -4.36668e-05 -4.19519e-05 -4.0237e-05 -3.85222e-05 + -3.68073e-05 -3.50924e-05 -3.34782e-05 -3.25442e-05 -3.16102e-05 + -3.06763e-05 -2.97423e-05 -2.88083e-05 -2.78744e-05 -2.69404e-05 + -2.60064e-05 -2.50725e-05 -2.41385e-05 -2.32635e-05 -2.27232e-05 + -2.21829e-05 -2.16426e-05 -2.11023e-05 -2.0562e-05 -2.00217e-05 + -1.94814e-05 -1.89411e-05 -1.84007e-05 -1.78604e-05 -1.73647e-05 + -1.70853e-05 -1.68059e-05 -1.65265e-05 -1.62471e-05 -1.59677e-05 + -1.56883e-05 -1.54089e-05 -1.51295e-05 -1.48501e-05 -1.45707e-05 + -1.42913e-05 -1.40119e-05 -1.37325e-05 -1.34531e-05 -1.31737e-05 + -1.28943e-05 -1.26149e-05 -1.23355e-05 -1.20561e-05 -1.17767e-05 + -1.14973e-05 -1.10954e-05 0.0152675 0.0228237 -0.00460678 + -0.0341525 0.0232109 -0.0138039 -0.0416538 -0.0458764 -0.0201967 + -0.00878316 -0.00379173 -0.00164621 -0.000785131 -0.00037575 + -0.000352375 -0.0545586 -0.0746881 -0.0771865 -0.05386 -0.0022199 + 0.0136703 0.00633526 0.00138826 -0.00108934 0.0038886 0.0298077 + 0.0475776 0.0481003 0.0464167 0.047818 0.042789 0.035207 + 0.0264423 0.0193959 0.0151614 0.00624257 -0.00913057 -0.0310696 + -0.0430238 0.016426 0.189762 0.49025 0.820116 1.13919 1.43549 + 1.70658 1.95183 2.17414 2.38506 2.5657 2.73958 2.97905 3.21403 + 3.43025 3.62645 3.8028 3.96002 4.09996 4.22443 4.33427 4.42886 + 4.51097 4.5817 4.64326 4.6957 4.74132 4.7797 4.81298 4.84102 + 4.86512 4.88523 4.90224 4.91649 4.92846 4.93868 4.94755 + 4.95483 4.96114 4.96682 4.97161 4.97502 4.9776 4.97944 4.98141 + 4.98319 4.98467 4.98585 4.9869 4.98796 4.98902 4.99008 4.99114 + 4.9922 4.99326 4.9938 4.99429 4.99479 4.99528 4.99578 4.99628 + 4.99677 4.99704 4.99718 4.99733 4.99747 4.99762 4.99777 + 4.99791 4.99806 4.9982 4.99835 4.9985 4.99864 4.99879 4.99893 + 4.99907 4.99916 4.99925 4.99934 4.99943 5.01473 4.92293 + 4.61974 4.0316 3.7835 3.74195 3.78344 3.87272 3.97386 4.07319 + 4.16686 4.25256 4.33126 4.40264 4.46697 4.49249 4.51807 + 4.55803 4.64055 4.78574 4.86074 4.88334 4.8999 4.91455 4.92814 + 4.93926 4.94761 4.95433 4.95907 4.9654 4.98317 5.0208 5.05134 + 4.85852 4.16041 3.00077 1.68376 0.672707 0.240838 0.0794725 + -0.0106347 -0.00879443 0.107196 0.368163 0.701424 1.03581 + 1.3601 1.6678 1.95731 2.22701 2.47544 2.69099 2.92327 3.16648 + 3.3877 3.59067 3.77344 3.93584 4.08066 4.20863 4.32065 4.41791 + 4.50211 4.57423 4.63614 4.68888 4.73377 4.7721 4.80519 4.83338 + 4.85732 4.87815 4.89514 4.90927 4.92108 4.93122 4.94014 + 4.94845 4.95601 4.96251 4.96576 4.969 4.97225 4.9755 4.97874 + 4.98087 4.98265 4.98442 4.9862 4.98797 4.98924 4.9899 4.99055 + 4.9912 4.99186 4.99251 4.99316 4.99381 4.99447 4.99512 4.99577 + 4.99609 4.99634 4.99659 4.99683 4.99708 4.99732 4.99757 + 4.99782 4.99806 4.99831 4.99853 4.99863 4.99873 4.99883 + 4.99893 4.99903 4.99913 4.99923 4.99933 + EOD + + @v[14].set(<<-'EOD') + 1.86175 2.00147 1.85141 1.0654 0.275481 0.205547 0.0712627 + 0.0313387 0.0151431 0.00864531 0.00593861 0.00438111 0.0037479 + 0.00305857 0.00221221 0.0017081 -0.0896128 -0.109079 -0.121356 + -0.0542001 0.175821 0.177442 0.0814591 0.0333042 0.0134909 + 0.00625777 0.00100092 -0.00552776 -0.00411139 -0.00150395 + -0.000564784 3.48169e-05 -0.000287014 -0.000538515 -0.000456537 + -0.000325677 -0.000275468 -0.000166452 -8.27481e-05 -8.28704e-05 + -7.47644e-05 -4.60552e-05 -2.61481e-06 2.26359e-05 2.53852e-05 + -1.39853e-06 -4.23456e-05 -4.0907e-05 -2.8501e-05 -1.5945e-05 + -9.01122e-06 -2.07747e-06 1.49328e-06 4.38398e-06 6.84248e-06 + 4.76711e-06 2.69173e-06 6.16362e-07 -1.45901e-06 -3.53438e-06 + -4.14256e-06 -3.76238e-06 -3.3822e-06 -3.00202e-06 -2.62184e-06 + -2.24878e-06 -1.93456e-06 -1.62033e-06 -1.3061e-06 -9.91867e-07 + -6.77638e-07 -3.63409e-07 -4.91792e-08 2.6505e-07 5.7928e-07 + 8.93509e-07 1.16076e-06 1.11055e-06 1.06034e-06 1.01014e-06 + 9.59927e-07 9.09719e-07 8.59511e-07 8.09302e-07 7.59094e-07 + 7.08886e-07 6.58678e-07 5.99251e-07 4.87523e-07 3.75795e-07 + 2.64068e-07 1.5234e-07 4.06119e-08 -7.1116e-08 -1.82844e-07 + -2.94572e-07 -4.063e-07 -5.18027e-07 -6.08517e-07 -5.95879e-07 + -5.83241e-07 -5.70604e-07 -5.57966e-07 -5.45328e-07 -5.3269e-07 + -5.20053e-07 -5.07415e-07 -4.94777e-07 -4.8214e-07 -4.69502e-07 + -4.56864e-07 -4.44226e-07 -4.31589e-07 -4.18951e-07 -4.06313e-07 + -3.93676e-07 -3.81038e-07 -3.684e-07 -3.55762e-07 -3.43125e-07 + 1.06736e-05 0.0797407 0.0437947 -0.0645098 -0.0877312 0.0653203 + -0.00621184 -0.0353188 -0.0491378 -0.0251957 -0.0110996 + -0.00481123 -0.0020941 -0.000998038 -0.000478747 -0.000445332 + -0.102046 -0.135753 -0.154351 -0.0827509 0.163348 0.174012 + 0.0794822 0.0310624 0.0112213 0.00249061 0.00130764 0.00181315 + 0.00163875 0.00101454 0.000497435 0.000195258 5.31901e-05 + 2.4607e-05 6.62736e-05 7.90718e-05 4.0372e-05 -0.000141184 + -0.000280623 5.5608e-05 0.000799565 0.000920189 0.000931616 + 0.000494527 0.000162303 -8.24884e-05 -0.000183938 -0.000203899 + -0.000144788 -9.87063e-05 -0.000227929 2.93932e-05 0.000208563 + 1.88958e-06 -7.6335e-05 -0.000172472 -0.000165656 -0.000145889 + -0.000177311 -0.000191058 -0.000168287 -0.00015755 -0.00013142 + -8.10488e-05 -6.36115e-05 -7.8699e-05 -8.11282e-05 -7.98625e-05 + -5.98807e-05 -3.40879e-05 -1.95464e-05 -1.79247e-05 -4.45514e-05 + -7.47995e-05 -8.7682e-05 -7.50806e-05 -3.25561e-05 -4.34114e-05 + -7.69099e-05 -0.000141101 -0.00018743 -0.000148471 -5.06546e-05 + 0.000120195 0.000177635 0.000177052 0.000146344 9.75126e-05 + 8.31233e-05 6.8734e-05 5.43447e-05 3.99554e-05 2.55661e-05 + 1.11768e-05 -3.21253e-06 -3.88937e-06 -3.56628e-06 -3.24318e-06 + -2.92008e-06 -2.59699e-06 -2.27389e-06 -1.9508e-06 -1.73227e-06 + -1.56796e-06 -1.40365e-06 -1.23934e-06 -1.07503e-06 -9.10722e-07 + -7.46412e-07 -5.82101e-07 -4.1779e-07 -2.5348e-07 -8.91694e-08 + 7.51412e-08 2.39452e-07 4.03762e-07 5.95733e-07 1.00771e-06 + 1.41969e-06 1.83167e-06 2.24365e-06 0.0828257 0.231038 0.465438 + 1.54516 2.8461 3.19221 3.40395 3.6382 3.80758 3.93848 4.04882 + 4.15428 4.247 4.32917 4.40235 4.36941 4.397 4.48862 4.64552 + 4.86595 5.03475 5.0348 5.02627 5.01967 5.01542 5.00925 4.98613 + 4.9519 4.91581 4.87357 4.82302 4.80403 4.82565 4.86102 4.89483 + 4.92253 4.94428 4.96257 4.97608 4.98373 4.98823 4.99182 + 4.99437 4.99635 4.99745 4.99802 4.99843 4.99873 4.99895 + 4.99912 4.99925 4.99931 4.99962 4.99973 4.99972 4.99971 + 4.9997 4.99969 4.9997 4.99971 4.99973 4.99974 4.99976 4.99978 + 4.9998 4.99982 4.99985 4.99987 4.99989 4.9999 4.99991 4.99991 + 4.99993 4.99994 4.99997 5.00001 5.00006 5.00008 5.00006 + 5.00002 5 4.99999 4.99998 4.99997 4.99995 4.99995 4.99995 + 4.99995 4.99995 4.99995 4.99995 4.99996 4.99997 4.99997 + 4.99998 4.99999 5 5 5.00001 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 + 5.00001 5.00001 5.00001 5.00001 5 5 5 4.99999 4.99999 4.99999 + EOD + + @v[15].set(<<-'EOD') + 1.86175 2.00199 2.08919 1.84314 1.08254 0.214737 0.0377351 + 0.00952455 0.00232763 0.000563614 0.000263477 0.000148642 + 0.000285086 0.000242592 7.34699e-05 -1.53467e-05 -0.0161874 + -0.0157876 -0.0141194 0.0132576 0.0903272 0.109938 0.0535295 + 0.0224216 0.00940945 0.00466825 -0.000649972 -0.00654752 + -0.00333248 -0.00103671 -0.000508276 -5.8896e-05 -0.00043938 + -0.000544704 -0.00044444 -0.000307093 -0.00024517 -0.000154538 + -8.78602e-05 -7.10461e-05 -6.06485e-05 -3.91039e-05 -8.45988e-06 + 9.43442e-06 1.28351e-05 -2.16734e-06 -2.6142e-05 -2.54768e-05 + -1.88997e-05 -1.17906e-05 -7.3808e-06 -2.97101e-06 1.19146e-07 + 2.94246e-06 5.38942e-06 3.88851e-06 2.38761e-06 8.86704e-07 + -6.14201e-07 -2.11511e-06 -2.59565e-06 -2.38885e-06 -2.18205e-06 + -1.97525e-06 -1.76845e-06 -1.56241e-06 -1.36258e-06 -1.16276e-06 + -9.62939e-07 -7.63116e-07 -5.63293e-07 -3.6347e-07 -1.63647e-07 + 3.61756e-08 2.35999e-07 4.35822e-07 6.07653e-07 5.90323e-07 + 5.72994e-07 5.55665e-07 5.38336e-07 5.21007e-07 5.03678e-07 + 4.86349e-07 4.6902e-07 4.51691e-07 4.34361e-07 4.11899e-07 + 3.60315e-07 3.08731e-07 2.57146e-07 2.05562e-07 1.53977e-07 + 1.02393e-07 5.08082e-08 -7.76222e-10 -5.23607e-08 -1.03945e-07 + -1.47815e-07 -1.54225e-07 -1.60635e-07 -1.67045e-07 -1.73455e-07 + -1.79864e-07 -1.86274e-07 -1.92684e-07 -1.99094e-07 -2.05504e-07 + -2.11914e-07 -2.18324e-07 -2.24734e-07 -2.31144e-07 -2.37554e-07 + -2.43964e-07 -2.50373e-07 -2.56783e-07 -2.63193e-07 -2.69603e-07 + -2.76013e-07 -2.82423e-07 2.92534e-06 0.0446777 0.024278 + -0.0518987 -0.0636547 0.00983929 -0.000518204 -0.000265194 + 0.000154772 0.000299538 3.12715e-05 -3.18225e-05 -2.48268e-05 + -1.16701e-05 -6.05117e-06 7.61116e-06 -0.0163668 -0.0158244 + -0.0141177 0.0100085 0.0857144 0.107784 0.051862 0.0204448 + 0.00629858 0.000967736 0.00121674 0.00190276 0.00154009 + 0.000860922 0.000410386 0.000164585 3.99493e-05 1.93797e-05 + 5.67594e-05 0.000110126 2.49925e-05 -7.17815e-05 -0.000142299 + -1.63109e-05 0.000439529 0.000562489 0.000594599 0.000326164 + 0.000126423 -4.26063e-05 -0.000122927 -0.000114152 -6.72706e-05 + -6.41242e-05 -0.000135588 2.61507e-05 0.000134036 6.43734e-06 + -4.6223e-05 -0.000112047 -0.000101388 -8.67847e-05 -0.000117664 + -0.000133957 -0.000116558 -0.000100873 -7.65448e-05 -4.44964e-05 + -3.6677e-05 -5.26632e-05 -5.45172e-05 -5.13545e-05 -3.73869e-05 + -1.99732e-05 -1.0907e-05 -1.10081e-05 -3.02609e-05 -5.18517e-05 + -6.13597e-05 -5.30706e-05 -2.39572e-05 -3.24146e-05 -5.70062e-05 + -0.000103448 -0.000135376 -0.0001024 -2.39007e-05 0.000110929 + 0.000151226 0.000142044 0.000105922 5.62834e-05 4.78476e-05 + 3.94117e-05 3.09759e-05 2.25401e-05 1.41042e-05 5.66837e-06 + -2.76747e-06 -3.08639e-06 -2.81341e-06 -2.54043e-06 -2.26745e-06 + -1.99447e-06 -1.72149e-06 -1.44851e-06 -1.26226e-06 -1.12096e-06 + -9.79661e-07 -8.38363e-07 -6.97065e-07 -5.55768e-07 -4.1447e-07 + -2.73173e-07 -1.31875e-07 9.42259e-09 1.5072e-07 2.92018e-07 + 4.33315e-07 5.74613e-07 7.10363e-07 8.01984e-07 8.93604e-07 + 9.85225e-07 1.07685e-06 0.04474 0.0928765 0.141327 0.0176048 + -0.071675 -0.0124613 0.989022 2.28104 3.40619 4.21417 4.67173 + 4.87438 4.96044 4.98996 4.99858 4.96672 4.89502 4.79391 + 4.76433 4.8387 4.98612 5.0161 5.01722 5.01437 5.01256 4.99827 + 4.95807 4.9209 4.88217 4.83006 4.78461 4.80759 4.85548 4.89604 + 4.9254 4.94617 4.96126 4.97374 4.98255 4.98792 4.99126 4.99361 + 4.99554 4.99699 4.99792 4.99846 4.99881 4.99905 4.99924 + 4.99938 4.99949 4.99955 4.9997 4.9998 4.99982 4.99982 4.99982 + 4.99982 4.99982 4.99983 4.99984 4.99985 4.99986 4.99987 + 4.99988 4.99989 4.9999 4.99992 4.99993 4.99994 4.99995 4.99995 + 4.99996 4.99996 4.99998 4.99999 5.00001 5.00002 5.00002 + 5.00001 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + EOD + + @v[16].set(<<-'EOD') + 1.86175 1.73073 1.50572 1.89001 3.39004 4.36034 4.79012 + 4.93798 4.98305 4.99539 4.9979 4.99904 4.99772 4.9983 4.99935 + 4.99975 4.98837 4.99456 4.99728 5.01838 5.04568 5.00759 + 4.98112 4.98479 4.99197 4.99641 4.99747 4.99775 5.00043 + 5.0007 5.00035 5.00023 4.99976 5.00002 5.00007 5.0002 4.99993 + 5.00003 5.00021 5.00006 4.99993 4.99992 5.00002 5.00013 + 5.00017 5.00009 4.99992 4.99991 4.99993 4.99996 4.99998 + 4.99999 5.00001 5.00003 5.00005 5.00004 5.00004 5.00003 + 5.00002 5.00001 5 4.99999 4.99999 4.99998 4.99998 4.99997 + 4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 5 5.01498 4.99342 4.96899 5.00301 5.02627 4.9977 + 4.99548 4.99757 5.00277 5.00245 5.0014 5.00069 5.00032 5.00014 + 5.00009 4.9867 4.99262 4.99607 5.01805 5.04713 5.00927 4.98184 + 4.98483 4.9914 4.99616 4.99902 4.9999 4.99987 4.99979 4.99981 + 4.99989 4.99994 4.99998 5.0002 5.00001 5.00008 5.00008 5.0001 + 5.00021 5.00032 5.00025 5.00019 5.00006 5.00007 4.99994 + 4.99997 4.99999 5.00023 5.00008 4.99993 4.99998 4.99986 + 4.99982 5.00003 4.99985 4.99996 5.00014 5 4.99984 4.99979 + 4.99982 4.99993 5.00008 5.00011 5.00002 4.99996 4.9999 4.99994 + 5.00001 5.00007 5.00009 4.99995 4.99978 4.99971 4.99976 + 4.99997 4.99996 4.99989 4.99972 4.99955 4.99953 4.99959 + 4.99976 4.9999 5.00005 5.00023 5.00039 5.00034 5.00029 5.00024 + 5.00019 5.00014 5.00009 5.00004 5.00003 5.00002 5.00001 + 5 5 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 + 5.00001 5.00002 5.00003 5.00004 5.01564 5.03395 5.04932 + 5.11868 3.92502 1.31888 0.163888 0.0946876 0.0789578 0.0565084 + 0.0260333 0.0156986 0.00907667 0.00613629 0.00468417 -0.00174008 + -0.0021422 0.000586962 0.0124937 0.0147977 0.00838454 0.00039383 + -0.000522021 -0.000426598 -0.000290214 -0.00173713 -0.00384132 + -0.00382945 -0.00429219 -0.00580193 -0.00393246 0.0017543 + 0.00423045 0.00408931 0.0031976 0.00245457 0.00187293 0.00159068 + 0.00105697 0.000609902 0.000358825 0.000334125 0.000212708 + 0.000168116 8.97349e-05 5.21578e-05 3.84527e-05 2.93033e-05 + 2.10067e-05 1.59954e-05 1.13917e-05 5.49738e-06 2.77217e-05 + 6.51259e-06 -6.65468e-06 2.09837e-06 -6.617e-06 -4.80187e-06 + 1.55031e-06 4.26536e-06 7.69457e-07 -1.46213e-06 -7.25202e-07 + 3.26501e-06 6.55807e-06 7.524e-06 6.07209e-06 6.00701e-06 + 5.41166e-06 3.86573e-06 1.10651e-06 -2.74603e-06 -2.18566e-06 + 2.3658e-06 8.59956e-06 8.35046e-06 2.90621e-06 -8.75982e-07 + -1.87189e-06 -2.1528e-06 -1.94875e-06 -1.74471e-06 -1.54067e-06 + -1.33662e-06 -1.13258e-06 -8.40567e-07 -5.20743e-07 -2.00918e-07 + 1.18906e-07 4.38731e-07 6.11382e-07 6.01529e-07 5.91675e-07 + 5.81822e-07 5.71968e-07 5.62115e-07 5.52261e-07 5.42407e-07 + 5.32554e-07 5.227e-07 5.12847e-07 4.72812e-07 4.26137e-07 + 3.79462e-07 3.32786e-07 2.86111e-07 2.39436e-07 1.92761e-07 + 1.46086e-07 9.94107e-08 5.27356e-08 -2.77779e-10 -7.98079e-08 + -1.59338e-07 -2.38868e-07 -3.18398e-07 -3.97928e-07 -4.77458e-07 + -5.56988e-07 -6.36519e-07 + EOD + + @v[17].set(<<-'EOD') + 5 5.16963 4.84136 3.33754 0.316206 0.103113 0.0273341 0.0221102 + 0.0177008 0.0143758 0.0115203 0.00929231 0.00752716 0.00625439 + 0.00489872 0.00403656 -0.0657317 -0.0256467 0.165394 0.985963 + 3.05067 4.55799 4.89728 4.92464 4.8882 4.90592 4.97315 4.99241 + 4.99694 4.99845 4.99905 4.99939 4.99959 4.99971 4.9998 4.99986 + 4.9999 4.99993 4.99995 4.99996 4.99997 4.99998 4.99998 4.99999 + 4.99999 4.99999 4.99999 4.99999 5 5.00001 5.00003 5.00005 + 5.00004 5.00002 5 4.99999 4.99999 4.99998 4.99998 4.99997 + 4.99997 4.99998 4.99998 4.99999 4.99999 5 5 5 5 5 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 + 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 + 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5 5 5 5.00025 5.1657 4.69981 2.43895 + 0.0229743 0.0351406 -0.0211974 -0.0312063 -0.0160331 -0.0021718 + -0.000766597 -0.000251052 -5.49363e-05 -3.36364e-06 -2.01983e-06 + -9.70575e-06 -0.0657007 -0.0205247 0.183332 1.07163 3.11839 + 4.46213 4.84163 4.95195 4.99159 5.02084 5.04029 5.04138 + 5.0271 5.00445 4.97957 4.95702 4.95231 4.97819 4.99191 4.9963 + 4.99822 4.99878 4.99903 4.99925 4.99942 4.9995 4.99954 4.99957 + 4.99961 4.99966 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 + 4.99988 4.9999 4.99991 4.99992 4.99994 4.99995 4.99995 4.99996 + 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 + 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.14239 4.76219 + 3.16574 0.299969 0.0631609 -0.00118611 -0.00026052 -5.96333e-05 + -1.44904e-05 -4.3859e-06 -2.99454e-06 1.10547e-06 4.84662e-06 + 1.30971e-05 2.23082e-05 -0.0655844 -0.0204818 0.182507 1.05954 + 3.12277 4.46735 4.83915 4.94512 4.97679 4.98654 4.9966 5.00833 + 5.00776 5.00432 5.00199 5.00086 5.00033 5.00008 5 5.00001 + 5 5.00005 5.00002 4.99981 4.99991 4.99998 4.99979 4.99979 + 4.99984 4.9998 4.9998 5.00006 5.00002 5.00001 5 5 4.99992 + 4.99998 4.99999 5.00002 5.00014 4.99999 4.99987 4.99993 + 5.00003 5.00011 5.00005 4.99996 4.99987 4.99985 4.99994 + 5.00009 5.0001 5 4.99993 4.99997 5.00008 5.00015 5.00021 + 5.00021 5.00007 4.99978 4.99965 4.99973 4.9999 4.99992 4.99995 + 4.99997 4.99999 5.00001 5.00002 5.00001 5.00001 5.00001 + 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 5.00001 5.00002 + 5.00002 5.00002 + EOD + + @v[18].set(<<-'EOD') + 5 5.0333 5.02472 4.92559 4.18383 3.93923 3.9961 4.14293 + 4.28591 4.41336 4.52157 4.61101 4.68472 4.7439 4.79294 4.83239 + 4.80697 4.78808 4.79322 4.8838 5.08529 5.21863 4.88852 3.90198 + 2.14586 0.383977 0.101103 0.0525711 0.0318287 0.020895 0.0146908 + 0.010831 0.00830272 0.00656377 0.00532066 0.00440078 0.00369956 + 0.00315713 0.00272614 0.00237965 0.00209659 0.00186339 0.00167014 + 0.0015081 0.00137172 0.00125607 0.00115393 0.00106076 0.000980166 + 0.000918015 0.000862837 0.00080766 0.000763488 0.000721541 + 0.000680825 0.000653026 0.000625226 0.000597426 0.000569627 + 0.000541827 0.000519087 0.000499756 0.000480424 0.000461093 + 0.000441761 0.000423291 0.000411941 0.00040059 0.00038924 + 0.000377889 0.000366539 0.000355188 0.000343838 0.000332487 + 0.000321137 0.000309786 0.000299055 0.000292509 0.000285963 + 0.000279417 0.000272871 0.000266325 0.000259779 0.000253233 + 0.000246686 0.00024014 0.000233594 0.000227387 0.0002231 + 0.000218813 0.000214526 0.00021024 0.000205953 0.000201666 + 0.000197379 0.000193092 0.000188805 0.000184519 0.000180526 + 0.000177963 0.0001754 0.000172837 0.000170274 0.000167711 + 0.000165148 0.000162585 0.000160022 0.000157459 0.000154895 + 0.000152332 0.000149769 0.000147206 0.000144643 0.00014208 + 0.000139517 0.000136954 0.000134391 0.000131828 0.000129265 + 0.000126702 0.000132838 0.0311184 0.163151 0.34986 0.604501 + 0.357125 0.136137 0.0711304 0.0346959 0.0212674 0.00872193 + 0.00252206 0.000455269 7.59332e-05 2.91532e-05 0.000320562 + -0.0720911 -0.0840491 -0.0791345 -0.0404143 0.0182035 -0.0235871 + -0.0426072 -0.0597501 0.00824773 0.481404 1.32496 2.11949 + 2.57317 2.58202 2.15054 1.33786 0.45702 0.153772 0.0913584 + 0.0604989 0.0421591 0.0271456 0.0170021 0.0115815 0.00907886 + 0.00742466 0.00626096 0.00531127 0.00450501 0.00381927 0.00323718 + 0.00274374 0.00232494 0.00196885 0.00166686 0.00141134 0.00119437 + 0.0010109 0.000855534 0.000723378 0.000611408 0.000516704 + 0.000436769 0.000369523 0.000313026 0.00026526 0.000223976 + 0.000188972 0.000159042 0.000134148 0.000112688 9.49738e-05 + 7.97877e-05 6.721e-05 5.65115e-05 4.77194e-05 4.03591e-05 + 3.42848e-05 2.92627e-05 2.50435e-05 2.1412e-05 1.84532e-05 + 1.58624e-05 1.34673e-05 1.14461e-05 1.00935e-05 9.12375e-06 + 8.50202e-06 7.81431e-06 7.20729e-06 6.73936e-06 6.3702e-06 + 5.90049e-06 5.43077e-06 4.96105e-06 4.49133e-06 4.02162e-06 + 3.5519e-06 3.08218e-06 2.79099e-06 2.51281e-06 2.23463e-06 + 1.95645e-06 1.67827e-06 1.40009e-06 1.12191e-06 1.01376e-06 + 9.9375e-07 9.73741e-07 9.53733e-07 9.33724e-07 9.13715e-07 + 8.93707e-07 8.73698e-07 8.5369e-07 8.33681e-07 8.13673e-07 + 7.93664e-07 7.73655e-07 7.53647e-07 7.21781e-07 5.956e-07 + 4.69419e-07 3.43239e-07 2.17058e-07 0.0284032 0.0374438 + -0.0157543 -0.0680497 0.0504768 0.0100294 0.00222261 0.000528697 + 0.000132929 3.99489e-05 2.46066e-05 4.56327e-06 -6.54853e-06 + 1.33783e-05 -3.68221e-05 -0.0724498 -0.0843663 -0.0792935 + -0.0406426 0.0200019 0.0426259 0.0220753 0.00668555 -0.000968483 + 0.024662 0.0383437 0.0911513 0.087848 0.0602076 0.0390559 + 0.0260573 0.0180444 0.012974 0.00985409 0.00788132 0.0064228 + 0.005545 0.00453571 0.00364245 0.00310278 0.00270523 0.00236439 + 0.0020945 0.00186808 0.00167493 0.00151731 0.00138594 0.00126945 + 0.00116695 0.0010762 0.000996366 0.000928387 0.000864414 + 0.000808258 0.000759574 0.000713865 0.000666712 0.000632716 + 0.000601262 0.000572163 0.000543986 0.000515253 0.0004897 + 0.000468112 0.000449313 0.000432981 0.000417911 0.000401307 + 0.000382712 0.000366678 0.000355736 0.000349171 0.000335727 + 0.000317091 0.000296086 0.000283543 0.000277366 0.000272233 + 0.000267001 0.000263147 0.000256699 0.000250251 0.000243803 + 0.000237355 0.000230907 0.000225424 0.000220247 0.000215069 + 0.000209892 0.000204714 0.000200213 0.000196548 0.000192884 + 0.00018922 0.000185556 0.000181892 0.000178228 0.000174564 + 0.0001709 0.000167236 0.000163572 0.000160824 0.000158279 + 0.000155733 0.000153187 0.000150641 0.000148095 0.000145549 + 0.000143003 0.000140457 0.000137911 0.000135457 0.000133386 + 0.000131315 0.000129245 0.000127174 0.000125103 0.000123032 + 0.000120961 0.000118891 + EOD + + @v[19].set(<<-'EOD') + 1.86175 1.99994 2.0833 2.01627 2.42503 3.25769 3.62134 3.88827 + 4.09688 4.26773 4.40529 4.51734 4.60827 4.68313 4.74346 + 4.79302 4.72815 4.68959 4.70421 4.81316 5.01375 5.14493 + 5.10305 5.0699 5.04484 5.03751 5.03348 5.02504 5.01799 5.01271 + 5.00895 5.00628 5.0044 5.00309 5.00216 5.00151 5.00105 5.00073 + 5.00051 5.00034 5.00023 5.00015 5.0001 5.00007 5.00003 4.99998 + 4.99993 4.99993 4.99995 4.99999 5.00001 5.00003 5.00002 + 5.00001 5 5 5 5 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00017 5.17398 + 4.94779 3.78508 1.52302 0.608808 0.244311 0.126053 0.0597175 + 0.038422 0.0158174 0.00481338 0.00107847 0.000301256 0.000114861 + 0.00059489 -0.118904 -0.147478 -0.158986 -0.080544 0.165361 + 0.171378 0.0776087 0.0435738 0.0428235 0.0423755 0.0347695 + 0.0225061 0.0155539 0.0121357 0.0107997 0.0103976 0.0124406 + 0.016814 0.0167556 0.0149852 0.01459 0.0141182 0.0131934 + 0.0120286 0.0108692 0.0097184 0.00855881 0.00744912 0.00643877 + 0.00554044 0.00475165 0.00406535 0.00347158 0.00295981 0.00251995 + 0.00214318 0.00182101 0.00154613 0.00131196 0.0011119 0.000941587 + 0.000796999 0.000674582 0.000571283 0.000484276 0.000410649 + 0.000347005 0.000292984 0.000246715 0.000208143 0.00017489 + 0.000147412 0.000123854 0.000104332 8.77229e-05 7.40686e-05 + 6.2637e-05 5.32e-05 4.53946e-05 3.88343e-05 3.31864e-05 + 2.85905e-05 2.45725e-05 2.08671e-05 1.77301e-05 1.55911e-05 + 1.40153e-05 1.29421e-05 1.18693e-05 1.09815e-05 1.03484e-05 + 9.87664e-06 9.14446e-06 8.41228e-06 7.68011e-06 6.94793e-06 + 6.21575e-06 5.48357e-06 4.7514e-06 4.38454e-06 4.04432e-06 + 3.7041e-06 3.36388e-06 3.02366e-06 2.68344e-06 2.34322e-06 + 2.15196e-06 2.03791e-06 1.92386e-06 1.80982e-06 1.69577e-06 + 1.58173e-06 1.46768e-06 1.35363e-06 1.23959e-06 1.12554e-06 + 1.0115e-06 8.9745e-07 7.83404e-07 6.69358e-07 4.76113e-07 + -3.47071e-07 -1.17025e-06 -1.99344e-06 -2.81662e-06 0.0783754 + 0.0500262 -0.0659563 -0.120914 0.0815957 0.0154255 0.00347177 + 0.000840357 0.000214582 6.54655e-05 3.91709e-05 8.07396e-06 + -4.44265e-07 1.74384e-05 -4.52725e-05 -0.119379 -0.147984 + -0.159247 -0.0824604 0.169014 0.177628 0.0758742 0.010558 + -0.0346506 -0.0710288 -0.0838952 -0.0599521 -0.034568 -0.0181615 + -0.00968034 -0.00547115 -0.00333511 -0.00232468 -0.00181159 + -0.00143841 -0.00116601 -0.000839755 -0.000569764 -0.000578683 + -0.000490551 -0.000411712 -0.000437859 -0.000408185 -0.000356644 + -0.000311332 -0.000269006 -0.000221396 -0.000210054 -0.0001923 + -0.000175122 -0.000161039 -0.0001428 -0.000126123 -0.000127893 + -8.14516e-05 -0.000120166 -0.000154909 -0.000112733 -8.40377e-05 + -7.11342e-05 -8.09538e-05 -9.77789e-05 -9.82402e-05 -7.73531e-05 + -5.28255e-05 -3.1096e-05 -1.87967e-05 -1.96552e-05 -4.16655e-05 + -5.77185e-05 -5.24142e-05 -2.83153e-05 -1.90012e-05 -1.54415e-05 + -2.52569e-05 -6.23747e-05 -0.000130543 -0.000149394 -0.000110886 + -4.35517e-05 -4.17084e-05 -3.98651e-05 -3.80218e-05 -3.61785e-05 + -3.43352e-05 -3.36249e-05 -3.32729e-05 -3.29208e-05 -3.25687e-05 + -3.22166e-05 -3.17143e-05 -3.10258e-05 -3.03372e-05 -2.96486e-05 + -2.89601e-05 -2.82715e-05 -2.75829e-05 -2.68944e-05 -2.62058e-05 + -2.55173e-05 -2.48287e-05 -2.43043e-05 -2.38159e-05 -2.33276e-05 + -2.28393e-05 -2.2351e-05 -2.18626e-05 -2.13743e-05 -2.0886e-05 + -2.03977e-05 -1.99093e-05 -1.945e-05 -1.91122e-05 -1.87744e-05 + -1.84366e-05 -1.80987e-05 -1.77609e-05 -1.74231e-05 -1.70853e-05 + -1.67474e-05 + EOD + + @v[20].set(<<-'EOD') + 1.86175 1.99724 2.17266 2.48439 3.15933 3.85231 4.38091 + 4.69033 4.85034 4.92851 4.96453 4.98188 4.98736 4.991 4.99482 + 4.9973 4.96422 4.89989 4.83907 4.83151 4.90868 5.04854 5.06104 + 5.04571 5.03219 5.03025 5.02273 5.01707 5.0123 5.0087 5.00611 + 5.00429 5.00301 5.00211 5.00148 5.00103 5.00072 5.0005 5.00035 + 5.00024 5.00016 5.00011 5.00007 5.00005 5.00003 5.00001 + 4.99999 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 + 5 5 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 + 5 5 4.99981 5.10081 5.10903 4.98404 5.00999 5.14946 4.36501 + 2.23938 0.325144 0.00660272 -0.0102186 -0.0082401 -0.00556785 + -0.00374178 -0.00264763 -0.00202823 -0.0182241 -0.0169551 + -0.0150395 0.0103736 0.0877592 0.104382 0.0515938 0.0373818 + 0.0411547 0.0397009 0.0308946 0.0205793 0.0154037 0.0129191 + 0.0119327 0.011527 0.0124295 0.0161152 0.0161076 0.0145391 + 0.0144541 0.0139287 0.0129215 0.0117239 0.0105795 0.00942983 + 0.00827423 0.00718354 0.00619954 0.00532868 0.00456631 0.00390448 + 0.00333254 0.00284003 0.00241714 0.00205524 0.0017458 0.00148202 + 0.00125739 0.0010655 0.000902213 0.000763611 0.000646279 + 0.000547291 0.000463934 0.000393401 0.000332424 0.000280655 + 0.000236328 0.000199386 0.000167536 0.000141218 0.000118654 + 9.99559e-05 8.40479e-05 7.09694e-05 6.00188e-05 5.09786e-05 + 4.3502e-05 3.72191e-05 3.18114e-05 2.74071e-05 2.35539e-05 + 1.99967e-05 1.69871e-05 1.49449e-05 1.3451e-05 1.24492e-05 + 1.14256e-05 1.05669e-05 9.94487e-06 9.47514e-06 8.77318e-06 + 8.07123e-06 7.36927e-06 6.66731e-06 5.96536e-06 5.2634e-06 + 4.56144e-06 4.23044e-06 3.92649e-06 3.62254e-06 3.31858e-06 + 3.01463e-06 2.71068e-06 2.40673e-06 2.23063e-06 2.12082e-06 + 2.01102e-06 1.90121e-06 1.7914e-06 1.68159e-06 1.57178e-06 + 1.46197e-06 1.35216e-06 1.24235e-06 1.13255e-06 1.02274e-06 + 9.12929e-07 8.0312e-07 6.33171e-07 -1.51288e-08 -6.63428e-07 + -1.31173e-06 -1.96003e-06 0.0437517 0.0265689 -0.0515377 + -0.0658688 0.010727 -0.000511921 -8.36924e-05 2.13278e-05 + 1.45207e-05 4.54862e-06 -6.14726e-06 2.0062e-06 1.02709e-06 + 1.4152e-05 -3.08225e-05 -0.0166501 -0.0157139 -0.013957 + 0.0107537 0.0873717 0.111302 0.0454129 -0.00530142 -0.0468336 + -0.0790063 -0.0826944 -0.0534753 -0.0288705 -0.0149009 -0.00801592 + -0.0046342 -0.00291835 -0.00213019 -0.00170055 -0.001352 + -0.00110593 -0.000742655 -0.000532042 -0.000544742 -0.000479206 + -0.000407307 -0.000403575 -0.000366209 -0.000324161 -0.000286183 + -0.000247579 -0.000214281 -0.000203435 -0.000186896 -0.000171033 + -0.00015779 -0.000145259 -0.000128069 -0.000122647 -9.89398e-05 + -0.000114926 -0.000132195 -0.000107872 -8.91015e-05 -7.87996e-05 + -8.14061e-05 -8.9098e-05 -8.83368e-05 -7.6122e-05 -6.14668e-05 + -4.75402e-05 -3.81855e-05 -3.69696e-05 -4.78656e-05 -5.61346e-05 + -5.35007e-05 -4.1459e-05 -3.35411e-05 -2.52374e-05 -2.37479e-05 + -4.6406e-05 -9.41884e-05 -0.000109222 -8.52676e-05 -4.25166e-05 + -4.10125e-05 -3.95085e-05 -3.80045e-05 -3.65004e-05 -3.49964e-05 + -3.41627e-05 -3.3541e-05 -3.29193e-05 -3.22976e-05 -3.16758e-05 + -3.10334e-05 -3.03653e-05 -2.96971e-05 -2.9029e-05 -2.83609e-05 + -2.76928e-05 -2.70246e-05 -2.63565e-05 -2.56884e-05 -2.50203e-05 + -2.43521e-05 -2.38716e-05 -2.34324e-05 -2.29932e-05 -2.25539e-05 + -2.21147e-05 -2.16755e-05 -2.12362e-05 -2.0797e-05 -2.03578e-05 + -1.99186e-05 -1.95079e-05 -1.9217e-05 -1.8926e-05 -1.8635e-05 + -1.8344e-05 -1.8053e-05 -1.7762e-05 -1.74711e-05 -1.71801e-05 + EOD + + @v[21].set(<<-'EOD') + 1.86175 1.73273 1.42016 1.02483 0.944013 0.274107 0.0823742 + 0.0379366 0.020816 0.0132952 0.00955525 0.00717008 0.00592286 + 0.00437379 0.00383557 0.00273694 -0.0037467 -0.0054191 -0.00131454 + 0.0112179 0.0133918 0.00519747 -0.00260113 -0.00252847 -0.00181292 + 0.000183398 -0.000667607 -0.000750747 -0.000594314 -0.000433904 + -0.000308985 -0.000217858 -0.000152926 -0.000107454 -7.54076e-05 + -5.2675e-05 -3.66299e-05 -2.54341e-05 -1.75095e-05 -1.18848e-05 + -7.97289e-06 -5.30239e-06 -3.53615e-06 -2.38504e-06 -2.40158e-06 + -3.84485e-06 -5.29435e-06 -2.57099e-06 1.95189e-06 3.55083e-06 + 2.06179e-06 5.72753e-07 3.30469e-07 3.40296e-07 3.60221e-07 + 4.86081e-07 6.1194e-07 7.37799e-07 8.63659e-07 9.89518e-07 + 9.21274e-07 7.22275e-07 5.23276e-07 3.24277e-07 1.25278e-07 + -5.59467e-08 -9.03265e-08 -1.24706e-07 -1.59086e-07 -1.93466e-07 + -2.27846e-07 -2.62226e-07 -2.96605e-07 -3.30985e-07 -3.65365e-07 + -3.99745e-07 -4.24266e-07 -3.82163e-07 -3.40061e-07 -2.97959e-07 + -2.55857e-07 -2.13755e-07 -1.71652e-07 -1.2955e-07 -8.7448e-08 + -4.53457e-08 -3.24353e-09 3.76901e-08 7.19937e-08 1.06297e-07 + 1.40601e-07 1.74904e-07 2.09208e-07 2.43512e-07 2.77815e-07 + 3.12119e-07 3.46422e-07 3.80726e-07 4.04507e-07 3.77191e-07 + 3.49876e-07 3.22561e-07 2.95246e-07 2.67931e-07 2.40616e-07 + 2.13301e-07 1.85986e-07 1.58671e-07 1.31356e-07 1.04041e-07 + 7.67256e-08 4.94105e-08 2.20955e-08 -5.21962e-09 -3.25347e-08 + -5.98498e-08 -8.71649e-08 -1.1448e-07 -1.41795e-07 -1.6911e-07 + 7.87893e-06 0.0114592 -0.0245712 -0.111637 0.0961324 1.61168 + 3.22343 4.20442 4.53535 4.83834 4.95464 4.98874 4.99746 + 4.99883 4.99948 4.99815 4.98431 4.99298 4.99718 5.01948 + 5.04749 5.008 4.98243 4.98985 4.99781 4.99887 4.99679 4.99616 + 4.99743 4.99859 4.99936 4.99972 5.00058 5.00123 5.0002 4.99945 + 4.99983 4.9998 4.99966 4.99958 4.99956 4.99956 4.99956 4.99958 + 4.99961 4.99965 4.99969 4.99973 4.99977 4.9998 4.99983 4.99985 + 4.99987 4.99989 4.99991 4.99992 4.99993 4.99994 4.99995 + 4.99996 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00001 5.00001 + 5.00001 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5 5 5 4.99999 4.99998 4.99997 4.99996 5.01454 + 4.99566 4.96796 4.99819 5.03232 5.00034 4.99867 4.99937 + 4.99977 4.99992 4.99997 4.99999 5.00001 5.00021 4.99974 + 4.98462 4.99301 4.99723 5.01936 5.04807 5.00929 4.9789 4.97876 + 4.98244 4.9863 4.99575 5.0069 5.00863 5.00624 5.00357 5.0019 + 5.00098 5.00048 5.00025 5.00016 5.00011 5.00013 5.00009 + 4.99982 4.99994 5.00005 4.99994 4.99988 4.99989 4.99997 + 5.00003 5.00005 5.00002 5.00001 5.00001 5.00001 4.99993 + 4.99999 5 5.00021 4.99997 4.99981 5 5.00009 5.0001 5.00001 + 4.99991 4.9999 5 5.00011 5.00017 5.00018 5.00018 5.00014 + 5.00007 4.99999 4.9999 4.9999 5.00001 5.00016 5.00014 4.99999 + 4.99993 4.99999 5.00009 5.00007 5.00006 5.00004 5.00003 + 5.00001 5.00001 5 4.99999 4.99998 4.99997 4.99997 4.99997 + 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 + 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 + 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5 5 + EOD + + @v[22].set(<<-'EOD') + 7.10441e-10 0.00107105 0.000637109 -0.00236346 -0.018079 + -0.0120077 -0.00217059 0.00266679 0.00403383 0.00403836 + 0.00356705 0.00303303 0.00244716 0.00198586 0.0016855 0.00136497 + -3.96022e-05 -0.000367409 -3.77079e-05 0.00194085 0.00506964 + -0.0400214 -0.0402572 0.0524434 0.286234 0.803011 1.44795 + 2.02473 2.54768 3.02748 3.4415 3.78287 4.09667 4.35152 4.53987 + 4.67614 4.77407 4.84319 4.89227 4.92702 4.95119 4.96764 + 4.97846 4.98557 4.98982 4.99209 4.99371 4.99569 4.99727 + 4.99802 4.99834 4.99867 4.99892 4.99915 4.99936 4.99939 + 4.99943 4.99946 4.9995 4.99953 4.99957 4.9996 4.99963 4.99967 + 4.9997 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 4.9998 + 4.99981 4.99982 4.99983 4.99984 4.99985 4.99986 4.99986 + 4.99986 4.99987 4.99987 4.99988 4.99988 4.99989 4.99989 + 4.9999 4.9999 4.9999 4.9999 4.99991 4.99991 4.99991 4.99991 + 4.99992 4.99992 4.99992 4.99992 4.99993 4.99993 4.99993 + 4.99993 4.99993 4.99993 4.99993 4.99993 4.99994 4.99994 + 4.99994 4.99994 4.99994 4.99994 4.99994 4.99994 4.99995 + 4.99995 4.99995 4.99995 4.99995 4.99995 4.99995 5.00145 + 5.00659 5.01209 5.01931 5.00279 4.99273 4.99217 4.99295 + 4.99471 4.99594 4.99696 4.9978 4.99844 4.99891 4.99924 4.99635 + 4.99699 4.99813 5.00068 5.00307 5.0588 4.96365 4.54012 3.6307 + 2.35176 1.0322 0.354379 0.115986 0.0435668 0.0245112 0.020786 + 0.0164656 0.0118409 0.00849698 0.00597078 0.0040105 0.0026076 + 0.0016597 0.00118185 0.00121067 0.00153587 0.00174836 0.00136519 + -0.000189116 -0.00315555 -0.00646603 -0.00898042 -0.010203 + -0.0110896 -0.0123764 -0.00953841 -0.00225795 0.000818314 + 0.00152252 0.00150269 0.00119025 0.000767068 0.000308852 + -3.79272e-05 -0.00019691 -0.000186642 -9.73653e-05 -8.49784e-06 + 2.04147e-05 -9.91086e-06 -1.55959e-05 -1.80499e-05 -1.77097e-05 + -1.51548e-05 -1.1978e-05 -9.84916e-06 -1.29728e-05 -1.67235e-05 + -1.74153e-05 -1.39958e-05 -5.92272e-06 -8.08216e-06 -1.53077e-05 + -2.92531e-05 -3.91049e-05 -2.98935e-05 -7.32122e-06 3.18534e-05 + 4.39134e-05 4.18753e-05 3.22759e-05 1.86766e-05 1.58432e-05 + 1.30098e-05 1.01765e-05 7.34312e-06 4.50975e-06 1.67639e-06 + -1.15697e-06 -1.23877e-06 -1.11991e-06 -1.00106e-06 -8.82208e-07 + -7.63355e-07 -6.44502e-07 -5.2565e-07 -4.29318e-07 -3.44661e-07 + -2.60004e-07 -1.75347e-07 -9.06904e-08 -6.03349e-09 7.86234e-08 + 1.6328e-07 2.47937e-07 3.32594e-07 4.17251e-07 5.01908e-07 + 5.86565e-07 6.71222e-07 7.36123e-07 6.43886e-07 5.5165e-07 + 4.59414e-07 3.67178e-07 0.000334759 -4.60833e-05 -0.00106139 + -0.00166624 0.000859563 0.00102606 0.00410037 0.00419931 + 0.00518997 0.00459791 0.00503125 0.00523877 0.00452158 0.00339924 + 0.00233399 0.000876915 0.000546439 0.000444299 0.000983968 + 0.00119304 -0.0429422 -0.0403983 0.0534896 0.288013 0.807345 + 1.44247 2.03448 2.57021 3.05049 3.47332 3.8131 4.1009 4.34677 + 4.53512 4.67127 4.76531 4.82526 4.86593 4.89586 4.91904 + 4.93806 4.95348 4.96597 4.97629 4.9843 4.98983 4.99335 4.9957 + 4.99741 4.99864 4.99946 4.99994 5.00047 5.00073 5.00086 + 5.00092 5.00094 5.00091 5.00087 5.00081 5.00074 5.00067 + 5.00059 5.00052 5.00046 5.0004 5.00034 5.0003 5.00026 5.00022 + 5.00019 5.00016 5.00014 5.00012 5.0001 5.00009 5.00007 5.00006 + 5.00006 5.00005 5.00004 5.00004 5.00004 5.00003 5.00003 + 5.00003 5.00002 5.00002 5.00002 5.00002 5.00001 5.00001 + 5.00001 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5.00001 5.00001 + 5.00001 5.00001 5.00002 5.00002 + EOD + + @v[23].set(<<-'EOD') + 5 5.00284 5.01266 5.01895 4.98936 4.99575 4.99217 4.99545 + 4.99775 4.99894 4.99946 4.99968 4.99975 4.99977 4.99986 + 4.9999 4.99528 4.99808 5.00039 5.00392 5.00512 4.99985 4.99863 + 4.99942 4.99992 5.00017 4.99897 4.99803 4.99784 4.99739 + 4.99883 5.00365 5.00298 5.00133 5.00048 5.00019 5.00008 + 5.00005 5.00004 5.00003 5.00002 5.00002 5.00001 5.00001 + 5.00001 5.00001 5.00001 5 5 4.99999 4.99997 4.99995 4.99996 + 4.99998 5 5.00001 5.00001 5.00002 5.00002 5.00003 5.00003 + 5.00002 5.00002 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99998 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00002 + 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5 5 5 5 5 5 5 5.00217 5.00108 4.99547 4.99658 5.00667 + 4.99641 4.99532 4.99938 5.00328 5.00222 5.00114 5.00052 + 5.00024 5.00011 5.00009 4.99285 4.99591 4.99897 5.00403 + 5.00786 5.00318 4.99942 4.9992 4.99949 5.001 5.00408 5.00319 + 5.00063 4.99995 5.00014 4.99982 4.99832 4.99838 4.99865 + 4.99912 4.99836 4.99735 4.99606 4.99814 5.00958 5.02973 + 5.05293 5.06103 4.99342 4.80726 4.50744 4.07509 3.41358 + 2.37924 1.03194 0.261552 0.142392 0.0904482 0.0555071 0.0322869 + 0.018289 0.0113802 0.00875182 0.00757055 0.00629906 0.00523 + 0.00403349 0.0031953 0.00280864 0.00286119 0.00250389 0.00202815 + 0.001723 0.00147312 0.0012411 0.00104401 0.000886204 0.000758277 + 0.000651915 0.00056348 0.000487966 0.000424048 0.000365613 + 0.000308178 0.000258725 0.000228061 0.000207976 0.000198491 + 0.00018518 0.000172716 0.000163197 0.000155007 0.000141734 + 0.000128461 0.000115188 0.000101915 8.86417e-05 7.53686e-05 + 6.20956e-05 5.69164e-05 5.23275e-05 4.77385e-05 4.31495e-05 + 3.85605e-05 3.39716e-05 2.93826e-05 2.69449e-05 2.56224e-05 + 2.42999e-05 2.29774e-05 2.16549e-05 2.03324e-05 1.90099e-05 + 1.76873e-05 1.63648e-05 1.50423e-05 1.37198e-05 1.23973e-05 + 1.10748e-05 9.75232e-06 8.48447e-06 7.65129e-06 6.81811e-06 + 5.98494e-06 5.15176e-06 0.00056893 -0.00787906 -0.0217381 + -0.0370066 -0.00770505 0.00659312 0.00975477 0.00949456 + 0.00777552 0.00655645 0.00568776 0.00508782 0.00458121 0.00410187 + 0.00365665 0.0015121 0.00160863 0.00263181 0.00638941 0.00772607 + 0.00225583 0.0010843 0.000882939 0.000801563 0.00075632 + 0.000554992 0.000435131 0.0003474 0.000217667 0.000491602 + 0.0012267 0.00250446 0.000212058 -0.0174972 -0.0527527 -0.0479071 + 0.194908 1.45838 3.40677 4.49242 4.86894 4.97215 5.01218 + 5.04342 5.06228 5.03069 4.87169 4.57056 4.11523 3.38264 + 2.19691 0.715839 0.172818 0.102162 0.0627162 0.0363388 0.020289 + 0.0119414 0.00826608 0.0066417 0.00549092 0.00492505 0.00439443 + 0.0037156 0.00306471 0.00247451 0.00195965 0.0014822 0.0010815 + 0.000904464 0.0010514 0.00152308 0.00120752 0.000228447 + -0.00102833 -0.00116644 -0.00042067 4.78758e-05 5.09599e-05 + -4.45756e-05 -3.22966e-06 3.81163e-05 7.94622e-05 0.000120808 + 0.000162154 0.000161895 0.000148481 0.000135068 0.000121654 + 0.000108241 9.81453e-05 9.2164e-05 8.61827e-05 8.02014e-05 + 7.42201e-05 6.82388e-05 6.22576e-05 5.62763e-05 5.0295e-05 + 4.43137e-05 3.83324e-05 3.54323e-05 3.321e-05 3.09877e-05 + 2.87654e-05 2.65431e-05 2.43209e-05 2.20986e-05 1.98763e-05 + 1.7654e-05 1.54317e-05 1.34612e-05 1.25441e-05 1.1627e-05 + 1.07099e-05 9.79276e-06 8.87564e-06 7.95851e-06 7.04139e-06 + 6.12427e-06 + EOD + + @v[24].set(<<-'EOD') + 5 5.01099 5.00866 4.97845 4.92369 4.9273 4.97413 4.9929 + 4.99826 4.99958 4.99978 5.00005 4.99968 4.99959 5.00014 + 4.99979 4.99914 4.99982 5.00023 5.00295 5.00664 4.99854 + 4.99647 5.00438 5.01722 5.03681 5.04766 5.04799 5.04867 + 5.04873 5.04685 5.04413 5.0367 5.02505 5.01726 5.01183 5.00806 + 5.00549 5.00371 5.00246 5.00162 5.00105 5.00069 5.00045 + 5.00031 5.00024 5.00019 5.00012 5.00007 5.00004 5.00001 + 4.99998 4.99999 4.99999 5 5.00001 5.00001 5.00002 5.00002 + 5.00003 5.00003 5.00003 5.00002 5.00002 5.00001 5.00001 + 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 5 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5.00418 4.99953 4.99152 + 4.99807 5.00497 5.00112 5.00055 5.00038 5.00018 5.00006 + 5.00006 5.00007 5.00006 5.00004 5.00004 4.99853 4.99945 + 4.99998 5.00304 5.00935 5.00742 4.99181 4.97421 4.93603 + 4.8853 4.8927 4.93984 4.97458 4.99039 4.99614 4.99801 4.99851 + 4.99869 4.99924 5.00108 5.00181 5.00119 5.00059 5.00031 + 5.00022 5.00018 5.00011 5.00001 5.00006 4.99981 4.99977 + 4.99982 5.00012 4.99993 5.00008 5.00043 5.00048 5.00024 + 5.00008 4.99984 4.99993 5.00011 4.99996 4.9998 4.99977 4.9998 + 4.99993 5.00008 5.00011 5.00002 4.99995 4.99989 4.99993 + 5 5.00007 5.00009 4.99994 4.99977 4.9997 4.99975 4.99996 + 4.99996 4.99988 4.9997 4.99952 4.9995 4.99956 4.99973 4.99988 + 5.00005 5.00025 5.00042 5.00036 5.00031 5.00025 5.0002 5.00014 + 5.00009 5.00003 5.00002 5.00001 5.00001 5 4.99999 4.99998 + 4.99998 4.99997 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5.00284 + 5.00442 5.00381 4.98997 4.99092 5.00733 5.07791 4.98237 + 4.86434 4.76835 4.74067 4.79278 4.85094 4.90068 4.93603 + 4.95698 4.96984 4.97856 4.98869 4.99904 5.0005 4.99524 5.00181 + 5.01878 5.05177 5.07986 4.98917 4.56217 3.68 2.3539 1.18541 + 0.505772 0.221044 0.115287 0.0760938 0.0589194 0.0476784 + 0.0457213 0.0412911 0.033889 0.0259741 0.0191452 0.0139018 + 0.0100235 0.00711788 0.00497657 0.00349368 0.00250021 0.00176179 + 0.00121843 0.000838368 0.000582711 0.000423458 0.000294608 + 0.000201251 0.000133748 8.6227e-05 5.44252e-05 3.30514e-05 + 1.93926e-05 1.09814e-05 5.29857e-06 1.92247e-06 3.08708e-07 + -3.74311e-07 -6.11121e-07 -7.27807e-07 -4.87604e-07 -4.80493e-07 + -9.15925e-07 -2.03774e-06 -4.01128e-06 -2.46644e-06 2.10626e-06 + 8.22422e-06 1.04922e-05 9.83047e-06 7.27106e-06 3.29654e-06 + -2.06736e-06 -2.18019e-06 -2.29303e-06 -2.40586e-06 -2.51869e-06 + -2.63153e-06 -2.24615e-06 -1.70325e-06 -1.16036e-06 -6.17468e-07 + -7.45754e-08 2.45198e-07 2.88285e-07 3.31373e-07 3.7446e-07 + 4.17548e-07 4.60635e-07 5.03723e-07 5.4681e-07 5.89898e-07 + 6.32985e-07 6.76073e-07 6.19054e-07 5.4001e-07 4.60967e-07 + 3.81923e-07 3.02879e-07 2.23836e-07 1.44792e-07 6.57488e-08 + -1.32948e-08 -9.23383e-08 -1.6698e-07 -2.23206e-07 -2.79432e-07 + -3.35658e-07 -3.91884e-07 -4.48109e-07 -5.04335e-07 -5.60561e-07 + -6.16787e-07 + EOD + + @v[25].set(<<-'EOD') + 1.34824 1.35838 1.36465 1.34675 1.29167 1.23161 1.2201 1.2185 + 1.2181 1.21798 1.21793 1.21788 1.21785 1.21782 1.21779 1.21776 + 1.21655 1.21656 1.21669 1.21871 1.22421 1.22247 1.21858 + 1.2228 1.23803 1.27737 1.10647 0.395248 0.0600669 0.027687 + 0.0192374 0.015425 0.0130881 0.00977445 0.00696598 0.00491122 + 0.00341952 0.00237078 0.00162339 0.00109178 0.000726647 + 0.000478886 0.00031568 0.000207902 0.000143494 0.000109768 + 8.62987e-05 5.69775e-05 3.36547e-05 2.30356e-05 1.86108e-05 + 1.41861e-05 1.08293e-05 7.68835e-06 4.79593e-06 4.51019e-06 + 4.22444e-06 3.9387e-06 3.65295e-06 3.36721e-06 3.04559e-06 + 2.69981e-06 2.35403e-06 2.00825e-06 1.66247e-06 1.34508e-06 + 1.26225e-06 1.17941e-06 1.09657e-06 1.01373e-06 9.30893e-07 + 8.48054e-07 7.65216e-07 6.82378e-07 5.9954e-07 5.16702e-07 + 4.37489e-07 3.82774e-07 3.2806e-07 2.73346e-07 2.18632e-07 + 1.63917e-07 1.09203e-07 5.4489e-08 -2.2523e-10 -5.49395e-08 + -1.09654e-07 -1.52862e-07 -1.3079e-07 -1.08718e-07 -8.6646e-08 + -6.45739e-08 -4.25019e-08 -2.04298e-08 1.64229e-09 2.37144e-08 + 4.57864e-08 6.78585e-08 8.71693e-08 9.30725e-08 9.89758e-08 + 1.04879e-07 1.10782e-07 1.16685e-07 1.22589e-07 1.28492e-07 + 1.34395e-07 1.40298e-07 1.46201e-07 1.52105e-07 1.58008e-07 + 1.63911e-07 1.69814e-07 1.75718e-07 1.81621e-07 1.87524e-07 + 1.93427e-07 1.9933e-07 2.05234e-07 2.11137e-07 2.19788e-07 + 0.000393944 -0.000218983 -0.00105784 0.00172403 -0.00027134 + -0.000204147 8.79968e-06 5.93762e-05 5.83554e-05 4.13815e-05 + 3.71369e-05 3.03372e-05 2.25336e-05 1.5986e-05 1.07284e-05 + -7.5239e-05 5.60593e-05 6.97571e-05 0.000667617 0.000960856 + 0.00131749 -0.00759564 -0.0217897 -0.0450321 -0.076646 -0.128569 + -0.186391 -0.202175 -0.206953 -0.2082 -0.208416 -0.208669 + -0.208934 -0.209111 -0.209234 -0.209329 -0.209389 -0.209416 + -0.2094 -0.209329 -0.20926 -0.209204 -0.209208 -0.209285 + -0.209454 -0.209641 -0.20977 -0.209811 -0.209833 -0.209887 + -0.209653 -0.209127 -0.208893 -0.208811 -0.208777 -0.208758 + -0.208747 -0.20874 -0.208726 -0.208697 -0.208657 -0.208611 + -0.208565 -0.208524 -0.208488 -0.208451 -0.208412 -0.208373 + -0.208333 -0.208294 -0.208256 -0.208219 -0.208183 -0.208145 + -0.208107 -0.208066 -0.208029 -0.207993 -0.207959 -0.207923 + -0.207883 -0.207838 -0.207789 -0.207747 -0.20771 -0.207675 + -0.207642 -0.207605 -0.207568 -0.207531 -0.207494 -0.207457 + -0.20742 -0.207383 -0.207346 -0.207308 -0.207271 -0.207233 + -0.207196 -0.207158 -0.207121 -0.207084 -0.207046 -0.207009 + -0.206972 -0.206935 -0.206898 -0.206861 -0.206823 -0.206786 + -0.206749 -0.206712 -0.206675 -0.206638 -0.2066 -0.206563 + -0.206526 -0.206489 -0.206452 -0.206415 -0.203384 -0.20015 + -0.196872 -0.205024 -0.210727 -0.206779 -0.0685263 0.586138 + 1.4665 2.22945 2.77554 3.076 3.24926 3.34515 3.40164 3.43006 + 3.43713 3.43075 3.42886 3.4384 3.46567 3.49025 3.51287 3.53821 + 3.57841 3.39846 2.80753 2.22947 1.7549 1.30429 0.707786 + 0.303206 0.131352 0.0671706 0.0429955 0.032461 0.0257161 + 0.0239521 0.0217397 0.0179705 0.0138745 0.0102813 0.00749643 + 0.0054328 0.00386817 0.0027004 0.00189442 0.00135552 0.000954715 + 0.000659981 0.000453435 0.000313993 0.000231347 0.000159665 + 0.000108122 7.10528e-05 4.50233e-05 2.77892e-05 1.62765e-05 + 8.9893e-06 4.5471e-06 1.54614e-06 -1.6542e-07 -8.68508e-07 + -1.04369e-06 -9.63086e-07 -8.44294e-07 -6.57339e-07 -7.35885e-07 + -9.80056e-07 -1.39772e-06 -2.10199e-06 -1.37474e-06 6.13269e-07 + 3.3028e-06 4.60941e-06 4.91053e-06 4.14186e-06 2.45258e-06 + -8.7388e-09 -3.59647e-07 -7.10554e-07 -1.06146e-06 -1.41237e-06 + -1.76328e-06 -1.63073e-06 -1.34534e-06 -1.05995e-06 -7.74561e-07 + -4.8917e-07 -2.95733e-07 -2.16326e-07 -1.3692e-07 -5.75135e-08 + 2.18929e-08 1.01299e-07 1.80706e-07 2.60112e-07 3.39519e-07 + 4.18925e-07 4.98332e-07 4.83984e-07 4.4901e-07 4.14035e-07 + 3.79061e-07 3.44087e-07 3.09112e-07 2.74138e-07 2.39163e-07 + 2.04189e-07 1.69215e-07 1.26002e-07 4.83213e-08 -2.9359e-08 + -1.07039e-07 -1.8472e-07 -2.624e-07 -3.4008e-07 -4.1776e-07 + -4.95441e-07 + EOD + + @v[26].set(<<-'EOD') + 7.10441e-10 0.000309731 -0.000308186 -0.001694 -0.00360784 + 8.40909e-05 0.00203175 0.0012896 0.000596548 0.000277191 + 0.000161134 0.000120439 8.4915e-05 9.49929e-05 6.18812e-05 + 1.65433e-05 1.89682e-05 3.97578e-05 4.95446e-05 0.000225325 + 0.000214579 -0.00230134 -0.000451102 0.00997237 0.0341443 + 0.0449314 0.0424411 0.0341996 0.0315315 0.0308892 0.0291614 + 0.024365 0.0190282 0.0188976 0.017238 0.0138526 0.0105645 + 0.00778548 0.00561753 0.0039871 0.00279554 0.00194075 0.0013468 + 0.000934775 0.000664723 0.000498911 0.000377384 0.000254183 + 0.000163421 0.000120773 9.65058e-05 7.22384e-05 5.60316e-05 + 4.14549e-05 2.79516e-05 2.57096e-05 2.34677e-05 2.12257e-05 + 1.89837e-05 1.67417e-05 1.46737e-05 1.27228e-05 1.07719e-05 + 8.82099e-06 6.87009e-06 5.0896e-06 4.71705e-06 4.34451e-06 + 3.97196e-06 3.59941e-06 3.22686e-06 2.85431e-06 2.48176e-06 + 2.10921e-06 1.73666e-06 1.36411e-06 1.02855e-06 9.42931e-07 + 8.57316e-07 7.71701e-07 6.86086e-07 6.00471e-07 5.14856e-07 + 4.29241e-07 3.43626e-07 2.58011e-07 1.72396e-07 9.85409e-08 + 9.14091e-08 8.42773e-08 7.71456e-08 7.00138e-08 6.2882e-08 + 5.57503e-08 4.86185e-08 4.14867e-08 3.4355e-08 2.72232e-08 + 2.05821e-08 1.63235e-08 1.2065e-08 7.80643e-09 3.54786e-09 + -7.10696e-10 -4.96926e-09 -9.22782e-09 -1.34864e-08 -1.77449e-08 + -2.20035e-08 -2.62621e-08 -3.05206e-08 -3.47792e-08 -3.90378e-08 + -4.32963e-08 -4.75549e-08 -5.18134e-08 -5.6072e-08 -6.03306e-08 + -6.45891e-08 -6.88477e-08 -8.76373e-06 0.000131607 -0.00021685 + -0.000433027 0.00047234 0.000211593 -0.000189601 3.2492e-05 + 0.000575955 7.72235e-05 -0.000285172 -0.000242061 -0.000135112 + -3.50117e-05 -2.75868e-05 5.48974e-05 1.80604e-07 5.48911e-05 + 3.97478e-05 0.000192909 0.000297932 0.00402253 -0.0122366 + -0.047853 -0.0963082 -0.108071 -0.0567275 -0.0239271 -0.0178628 + -0.0233027 -0.031853 -0.0400843 -0.0482725 -0.0576154 -0.0627218 + -0.0511236 -0.0279524 -0.0150986 -0.00931091 -0.00652876 + -0.00479286 -0.00344346 -0.00249578 -0.0019532 -0.00157977 + -0.00131848 -0.00111251 -0.000939229 -0.000797445 -0.000708384 + -0.000630452 -0.000539722 -0.000508862 -0.000480596 -0.000439484 + -0.000407217 -0.000363866 -0.000329506 -0.000318642 -0.000307362 + -0.000286511 -0.000266253 -0.000242943 -0.000218107 -0.000204661 + -0.00020241 -0.000194435 -0.000185062 -0.000173042 -0.000160549 + -0.000151407 -0.000145626 -0.000145976 -0.000147342 -0.000145288 + -0.000137979 -0.000124481 -0.000123218 -0.000127453 -0.000139006 + -0.000145486 -0.000129764 -9.82749e-05 -4.72596e-05 -3.08671e-05 + -3.28834e-05 -4.52254e-05 -6.25389e-05 -6.32516e-05 -6.39643e-05 + -6.4677e-05 -6.53897e-05 -6.61023e-05 -6.6815e-05 -6.75277e-05 + -6.61005e-05 -6.45173e-05 -6.29341e-05 -6.13509e-05 -5.97676e-05 + -5.81844e-05 -5.66012e-05 -5.54231e-05 -5.4455e-05 -5.3487e-05 + -5.25189e-05 -5.15508e-05 -5.05828e-05 -4.96147e-05 -4.86466e-05 + -4.76785e-05 -4.67105e-05 -4.57424e-05 -4.47743e-05 -4.38063e-05 + -4.28382e-05 -4.18821e-05 -4.10211e-05 -4.016e-05 -3.9299e-05 + -3.8438e-05 4.29885e-05 5.14113e-05 -0.000127986 -0.000611463 + -0.000149428 0.000882394 0.00297059 -0.00405825 -0.00591067 + -0.00546997 -0.00158744 0.00190677 0.00298403 0.00268595 + 0.00196161 0.00130289 0.000783347 0.000520683 0.000565306 + 0.00053419 -0.00224696 -0.000920818 0.0132755 0.0322504 + 0.0442808 0.0638615 0.0701007 0.0539356 0.0247771 0.056244 + 0.294266 0.831368 1.45424 2.02898 2.54559 2.9937 3.35333 + 3.72609 4.06363 4.32789 4.52413 4.66504 4.7652 4.83637 4.88631 + 4.92109 4.94464 4.96046 4.97218 4.98079 4.98679 4.99076 + 4.99361 4.99555 4.99686 4.99783 4.99853 4.99902 4.99936 + 4.99959 4.99973 4.99983 4.9999 4.99993 4.99996 4.99998 5 + 5.00001 5 4.99999 4.99997 4.99994 4.99993 4.99994 4.99996 + 4.99999 5.00004 5.00006 5.00005 5.00003 5.00002 5.00001 + 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 5 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99998 + EOD + + @v[27].set(<<-'EOD') + 5 4.99984 4.99796 4.99478 4.9889 4.98738 4.98896 4.99087 + 4.99262 4.99419 4.99552 4.99659 4.99743 4.99807 4.99855 + 4.9989 4.99894 4.99908 4.99935 5.00001 5.0007 5.00132 5.00032 + 4.99976 5.00134 5.00339 5.00315 5.00157 5.00091 5.00058 + 5.00012 4.99944 4.99886 4.9994 4.99934 4.99899 4.99876 4.99868 + 4.99872 4.99883 4.99898 4.99914 4.9993 4.99944 4.99956 4.99967 + 4.99976 4.99982 4.99986 4.9999 4.99993 4.99997 4.99997 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5.00009 5.00028 5.00015 4.99983 + 5.00036 4.99996 4.99834 4.99783 5.00383 5.00734 5.00387 + 5.00058 4.99893 4.99836 4.99832 4.99854 4.99873 4.99905 + 4.99927 4.99952 4.99969 4.99834 4.99536 4.99163 4.99073 + 5.0053 5.03631 5.03103 4.9008 4.62503 4.21887 3.70902 3.09967 + 2.35791 1.41912 0.519675 0.210458 0.131362 0.0980819 0.0708209 + 0.0471701 0.0323272 0.0253535 0.0199144 0.0152615 0.0117228 + 0.00917696 0.00738117 0.00609292 0.00512664 0.00436184 0.0037961 + 0.00331639 0.00289006 0.0025477 0.00226529 0.00202925 0.00182793 + 0.00165474 0.00150531 0.00137529 0.00125983 0.00115603 0.00106455 + 0.000982977 0.000911255 0.000846819 0.000790092 0.000738698 + 0.000692816 0.00065107 0.000613595 0.000579642 0.000548935 + 0.00052106 0.000495598 0.000472174 0.000450849 0.000431118 + 0.000412667 0.000395868 0.000381319 0.000368487 0.000357327 + 0.000344212 0.000330334 0.00031622 0.000303298 0.000295809 + 0.00028832 0.000280831 0.000273342 0.000265853 0.000258364 + 0.000250875 0.000245118 0.000239488 0.000233857 0.000228227 + 0.000222596 0.000216966 0.000211336 0.000207047 0.000203455 + 0.000199863 0.00019627 0.000192678 0.000189085 0.000185493 + 0.0001819 0.000178308 0.000174716 0.000171123 0.000167531 + 0.000163938 0.000160346 0.000156835 0.000153973 0.00015111 + 0.000148248 0.000145385 0.000296579 -3.96718e-05 -0.000449085 + 0.000323433 0.000750086 0.000268264 0.000149028 -0.000100249 + 7.00956e-05 0.00012605 0.00022592 0.000193036 0.000120453 + 8.07865e-05 7.65771e-05 -3.27828e-05 0.000116759 0.000169498 + 0.000409804 0.000414965 0.00092323 -0.00590633 -0.0175477 + -0.032433 -0.0559842 -0.0820373 0.0688484 0.626629 1.32929 + 2.01657 2.60925 3.12329 3.38952 3.14128 2.38463 1.23802 + 0.316019 0.107832 0.0694707 0.051837 0.035247 0.0209999 + 0.0116618 0.00967674 0.00789182 0.00574566 0.00386872 0.00258612 + 0.00167126 0.00104169 0.000641093 0.000401246 0.000277928 + 0.000171775 0.000102266 5.89376e-05 3.29258e-05 1.80463e-05 + 1.0057e-05 6.4571e-06 5.10093e-06 4.06791e-06 3.62716e-06 + 3.63321e-06 3.99625e-06 4.64368e-06 5.20886e-06 4.77728e-06 + 3.23919e-06 1.14113e-06 -1.29416e-06 -4.15607e-06 -1.88532e-06 + 5.24411e-06 1.38678e-05 1.28823e-05 3.6758e-06 -2.52285e-06 + -3.97133e-06 -4.03071e-06 -3.37154e-06 -2.71238e-06 -2.05321e-06 + -1.39404e-06 -7.34872e-07 -3.73325e-07 -1.05873e-07 1.61578e-07 + 4.2903e-07 6.96482e-07 8.18468e-07 7.60065e-07 7.01662e-07 + 6.43258e-07 5.84855e-07 5.26452e-07 4.68049e-07 4.09646e-07 + 3.51243e-07 2.9284e-07 2.34437e-07 1.71213e-07 1.06928e-07 + 4.2644e-08 -2.16403e-08 -8.59247e-08 -1.50209e-07 -2.14493e-07 + -2.78778e-07 -3.43062e-07 -4.07346e-07 -4.55065e-07 -4.3348e-07 + -4.11896e-07 -3.90311e-07 -3.68726e-07 -3.47141e-07 -3.25556e-07 + -3.03971e-07 -2.82386e-07 + EOD + + @v[28].set(<<-'EOD') + 0.368163 0.361756 0.327463 0.269513 0.149476 0.0805716 0.0501146 + 0.03403 0.0230886 0.0160474 0.0116071 0.00870013 0.00679614 + 0.00542384 0.00432512 0.00340653 -0.00129719 -0.00399429 + -0.00318719 0.00443085 0.0150156 0.0334147 0.0132288 -0.0189751 + -0.0508377 -0.0252174 -0.0142489 -0.00675908 -0.0038653 + -0.00243423 -0.00168891 -0.00120901 -0.000900426 -0.000685575 + -0.000557595 -0.000457268 -0.000377427 -0.000315269 -0.000266613 + -0.000228397 -0.000198283 -0.000174248 -0.000154886 -0.00013892 + -0.000125864 -0.000115189 -0.000105841 -9.66611e-05 -8.84262e-05 + -8.23872e-05 -7.74668e-05 -7.25463e-05 -6.79992e-05 -6.35276e-05 + -5.92413e-05 -5.68994e-05 -5.45574e-05 -5.22154e-05 -4.98735e-05 + -4.75315e-05 -4.54981e-05 -4.36726e-05 -4.18471e-05 -4.00216e-05 + -3.81961e-05 -3.64559e-05 -3.54209e-05 -3.43858e-05 -3.33508e-05 + -3.23157e-05 -3.12807e-05 -3.02456e-05 -2.92105e-05 -2.81755e-05 + -2.71404e-05 -2.61054e-05 -2.51232e-05 -2.44984e-05 -2.38736e-05 + -2.32487e-05 -2.26239e-05 -2.19991e-05 -2.13742e-05 -2.07494e-05 + -2.01246e-05 -1.94998e-05 -1.88749e-05 -1.82865e-05 -1.79044e-05 + -1.75224e-05 -1.71403e-05 -1.67582e-05 -1.63762e-05 -1.59941e-05 + -1.56121e-05 -1.523e-05 -1.4848e-05 -1.44659e-05 -1.41138e-05 + -1.39075e-05 -1.37011e-05 -1.34947e-05 -1.32883e-05 -1.30819e-05 + -1.28755e-05 -1.26691e-05 -1.24627e-05 -1.22563e-05 -1.205e-05 + -1.18436e-05 -1.16372e-05 -1.14308e-05 -1.12244e-05 -1.1018e-05 + -1.08116e-05 -1.06052e-05 -1.03988e-05 -1.01924e-05 -9.98605e-06 + -9.77966e-06 -2.85319e-05 0.00281092 0.00180106 -0.000981083 + 0.00551926 -0.00119763 -0.0295069 -0.0367677 0.064749 0.119022 + 0.0882007 0.0552062 0.03418 0.0223243 0.015545 0.011949 + 0.00757134 0.00667655 0.00583243 0.00644443 0.00650959 -0.0302575 + -0.0437806 -0.0355466 0.0381776 0.282109 0.674178 1.07582 + 1.45189 1.789 2.08649 2.34663 2.57245 2.81211 3.04778 3.2523 + 3.45877 3.65593 3.83396 3.9923 4.13368 4.25864 4.36719 4.46064 + 4.54086 4.60962 4.66835 4.71838 4.76094 4.79716 4.82796 + 4.85413 4.87634 4.89518 4.91116 4.92476 4.93631 4.94608 + 4.95434 4.9613 4.96715 4.97211 4.97638 4.98001 4.98312 4.98571 + 4.98795 4.98979 4.99138 4.99269 4.99381 4.99474 4.99551 + 4.99615 4.99668 4.99713 4.99752 4.99783 4.99811 4.99836 + 4.99858 4.99873 4.99884 4.99892 4.999 4.99907 4.99912 4.99916 + 4.99921 4.99926 4.99932 4.99937 4.99942 4.99948 4.99953 + 4.99956 4.99958 4.99961 4.99963 4.99966 4.99968 4.99971 + 4.99972 4.99973 4.99974 4.99975 4.99976 4.99977 4.99978 + 4.99979 4.9998 4.9998 4.99981 4.99982 4.99983 4.99984 4.99985 + 4.99986 4.99986 4.99987 4.99987 5.00498 5.00354 4.99359 + 4.98981 5.00498 5.00099 5.00041 5.00022 5.00015 5.00012 + 5.0001 5.00008 5.00005 5.00003 5 4.99431 4.99459 4.99591 + 5.00087 5.01029 5.03935 4.92784 4.51643 3.78356 2.68745 + 1.43417 0.583128 0.205094 0.0777337 0.0391566 0.02723 0.023883 + 0.018808 0.010165 0.00254623 -0.00377463 -0.0038097 0.00144145 + 0.00267231 0.00193045 0.00144538 0.00121758 0.00112893 0.00109424 + 0.0010226 0.000948072 0.000882573 0.000826996 0.000776391 + 0.000729719 0.000686499 0.000647333 0.000610108 0.000575631 + 0.000545069 0.000515485 0.000488514 0.000465316 0.000443215 + 0.000422454 0.00040292 0.00038488 0.000368472 0.000353628 + 0.000339643 0.000326197 0.000313483 0.000302884 0.000294038 + 0.000284003 0.000270941 0.000254925 0.000246511 0.000244089 + 0.000245538 0.000242099 0.000235728 0.000227482 0.000218001 + 0.000207257 0.000202127 0.000196997 0.000191868 0.000186738 + 0.000181608 0.00017758 0.000173899 0.000170219 0.000166538 + 0.000162857 0.000159576 0.00015679 0.000154005 0.000151219 + 0.000148433 0.000145647 0.000142861 0.000140076 0.00013729 + 0.000134504 0.000131718 0.000129603 0.000127635 0.000125668 + 0.0001237 0.000121732 0.000119765 0.000117797 0.000115829 + 0.000113862 0.000111894 0.000109993 0.000108372 0.000106751 + 0.00010513 0.000103509 0.000101887 0.000100266 9.86449e-05 + 9.70237e-05 + EOD + + @v[29].set(<<-'EOD') + 5 4.99899 4.99654 4.99327 4.9863 4.98954 4.99212 4.99378 + 4.9951 4.99624 4.99715 4.99786 4.99839 4.99879 4.99909 4.99931 + 4.99922 4.99933 4.99971 5.00064 5.00084 5.00123 4.99865 + 4.99853 4.99983 5.00457 5.00242 5.00105 5.00062 5.00042 + 4.99971 4.9994 4.9992 4.9996 4.99955 4.99932 4.99918 4.99915 + 4.99919 4.99927 4.99937 4.99948 4.99957 4.99966 4.99974 + 4.9998 4.99985 4.99989 4.99992 4.99993 4.99994 4.99994 4.99996 + 4.99998 5 5 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 + 5.00001 5.00001 5 5 5 5 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 + 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5 5 5 5 5 5 4.9997 4.99998 4.99954 4.99963 + 5.00059 4.99945 4.99732 4.99957 5.00919 5.00558 5.00033 + 4.99851 4.9983 4.99854 4.99871 4.99928 4.99914 4.99939 4.99952 + 4.9998 4.99976 4.99744 4.99598 4.99478 4.99806 5.01911 5.04602 + 5.05469 5.01317 4.89484 4.69655 4.42036 4.06069 3.60793 + 3.12531 2.72975 2.45187 2.25081 2.09841 1.98509 1.90211 + 1.84084 1.79411 1.7574 1.72763 1.70283 1.68188 1.66389 1.64823 + 1.63438 1.62201 1.61088 1.60081 1.59163 1.58323 1.57549 + 1.56835 1.56173 1.55558 1.54985 1.54451 1.53951 1.53479 + 1.53035 1.52615 1.5222 1.51845 1.5149 1.51153 1.50834 1.50529 + 1.5024 1.49964 1.497 1.49449 1.49208 1.48977 1.48755 1.48542 + 1.48336 1.48138 1.47948 1.47765 1.4759 1.47419 1.47255 1.47096 + 1.46949 1.46823 1.46696 1.4657 1.46444 1.46317 1.46191 1.46065 + 1.45956 1.4585 1.45743 1.45636 1.45529 1.45422 1.45315 1.45226 + 1.45145 1.45064 1.44983 1.44902 1.44821 1.4474 1.44659 1.44579 + 1.44498 1.44417 1.44336 1.44255 1.44174 1.44094 1.44019 + 1.43944 1.43868 1.43793 1.43765 1.43679 1.43515 1.43405 + 1.43478 1.43387 1.43345 1.43184 1.43086 1.43021 1.43003 + 1.42988 1.42944 1.42883 1.42818 1.42702 1.42642 1.42595 + 1.42586 1.42616 1.42783 1.41733 1.38106 1.30738 1.3877 2.09819 + 3.05285 3.58059 3.77601 3.87609 4.02557 4.24887 4.4608 4.60411 + 4.72109 4.8255 4.90465 4.97379 5.01253 5.01532 5.01239 5.0092 + 5.00665 5.00474 5.00333 5.00232 5.00163 5.00117 5.00082 + 5.00057 5.00039 5.00027 5.00019 5.00013 5.00009 5.00006 + 5.00004 5.00003 5.00002 5.00001 5.00001 5 5 5 4.99998 4.99995 + 4.99992 4.99996 5.00005 5.00012 5.00008 4.99996 4.9999 4.99985 + 4.99986 4.99997 5.00021 5.0003 5.00024 5.00009 5.00007 5.00005 + 5.00003 5.00001 4.99998 4.99998 4.99998 4.99999 4.99999 + 5 5 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00002 5.00002 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99998 + 4.99998 4.99998 + EOD + + @v[30].set(<<-'EOD') + 7.10441e-10 5.70385e-05 0.000226143 0.000131916 -0.000887764 + -8.01837e-05 -3.49653e-05 9.40039e-05 0.000118663 0.000108025 + 8.6059e-05 6.33268e-05 4.99295e-05 3.16843e-05 3.60692e-05 + 2.07572e-05 -8.6375e-05 3.44583e-05 8.07397e-05 0.000196296 + 0.000115615 -7.12768e-05 -0.000129812 -4.18679e-05 7.94364e-05 + 0.000182034 -5.41226e-05 -0.000451819 -0.000713937 -0.00129863 + -0.00262186 -0.00213417 -0.00133767 0.000775698 0.000969902 + 0.000549281 0.000280946 0.000140321 8.6919e-05 7.22446e-05 + 6.5631e-05 6.45263e-05 6.63087e-05 7.17391e-05 7.59042e-05 + 7.59172e-05 7.03353e-05 6.33558e-05 5.31136e-05 4.64278e-05 + 4.40594e-05 4.16909e-05 4.05674e-05 3.96957e-05 3.87875e-05 + 3.74977e-05 3.62079e-05 3.49181e-05 3.36283e-05 3.23385e-05 + 3.12427e-05 3.02775e-05 2.93124e-05 2.83472e-05 2.7382e-05 + 2.64613e-05 2.59077e-05 2.5354e-05 2.48004e-05 2.42468e-05 + 2.36931e-05 2.31395e-05 2.25859e-05 2.20322e-05 2.14786e-05 + 2.0925e-05 2.03916e-05 1.9995e-05 1.95984e-05 1.92019e-05 + 1.88053e-05 1.84087e-05 1.80122e-05 1.76156e-05 1.7219e-05 + 1.68225e-05 1.64259e-05 1.6051e-05 1.57991e-05 1.55471e-05 + 1.52952e-05 1.50433e-05 1.47913e-05 1.45394e-05 1.42875e-05 + 1.40356e-05 1.37836e-05 1.35317e-05 1.32978e-05 1.31513e-05 + 1.30048e-05 1.28583e-05 1.27118e-05 1.25653e-05 1.24188e-05 + 1.22724e-05 1.21259e-05 1.19794e-05 1.18329e-05 1.16864e-05 + 1.15399e-05 1.13934e-05 1.12469e-05 1.11005e-05 1.0954e-05 + 1.08075e-05 1.0661e-05 1.05145e-05 1.0368e-05 1.02215e-05 + 1.76447e-05 7.21516e-05 -3.59786e-05 -0.000159618 0.000156236 + 0.000135106 -0.000336402 -0.000302283 0.000699323 0.000473866 + -0.000156146 -0.000225625 -0.000123592 -3.78116e-05 8.47472e-06 + 2.43387e-06 -7.44762e-05 7.80111e-05 9.43608e-05 0.000170159 + 8.83919e-05 -0.00018802 -0.000373512 -0.000390597 0.000156875 + 0.0032343 0.00776304 -0.000566905 -0.00760695 -0.0159226 + -0.0245989 -0.0331402 -0.0100902 0.067837 0.266702 0.910818 + 1.82282 2.69714 3.43247 3.98325 4.32893 4.51529 4.67087 + 4.79288 4.87574 4.92797 4.95902 4.97655 4.98622 4.99195 + 4.99526 4.99735 4.9991 4.99974 4.99982 4.99974 4.99961 4.9995 + 4.99943 4.9994 4.9994 4.99942 4.99944 4.99948 4.99952 4.99956 + 4.99961 4.99965 4.9997 4.99974 4.99977 4.99981 4.99983 4.99986 + 4.99988 4.9999 4.99991 4.99992 4.99993 4.99994 4.99995 4.99995 + 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 4.99999 + 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 5 + 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 5 5.00019 4.99888 4.99663 4.99457 4.99902 + 5.00229 5.00323 5.00302 5.0023 5.0015 5.00085 5.00041 5.00013 + 4.99993 4.99979 4.99948 4.99954 4.99983 5.00055 5.00109 + 5.00009 4.9987 4.998 4.99755 4.99676 4.99618 5.01091 5.05272 + 5.04156 4.80112 4.27692 3.42343 2.23953 0.967179 0.429813 + 0.540757 1.32991 2.32147 3.14903 3.78143 4.22325 4.47978 + 4.59448 4.69875 4.79798 4.87419 4.92339 4.95249 4.97174 + 4.98408 4.99124 4.99478 4.99729 4.99868 4.9992 4.99941 4.99947 + 4.99946 4.99943 4.9994 4.99939 4.9994 4.99942 4.99946 4.99951 + 4.99956 4.99961 4.99967 4.99973 4.99977 4.9998 4.99981 4.99983 + 4.99984 4.99987 4.99992 5.00001 5.00005 5.00001 4.99994 + 4.99995 4.99995 4.99996 4.99996 4.99996 4.99997 4.99997 + 4.99997 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 + 4.99998 4.99998 4.99998 + EOD + + @v[31].set(<<-'EOD') + 1.8179e-09 -5.28841e-06 -1.44913e-05 -3.62932e-05 -9.75719e-05 + 0.000141781 3.73396e-05 -1.65603e-05 -1.5271e-05 -6.73884e-06 + 4.40157e-06 -4.85345e-06 -1.02964e-05 2.03126e-05 -1.89457e-05 + -8.75564e-06 7.67422e-06 4.71103e-06 1.29798e-05 6.13469e-06 + -1.14363e-05 -0.0394563 -0.0477298 -0.0622012 -0.0519225 + 0.262499 0.943611 1.67052 2.31017 2.84028 3.28467 3.61582 + 3.85887 4.13011 4.36511 4.54063 4.67013 4.76408 4.83263 + 4.8825 4.91837 4.94373 4.96117 4.97318 4.98093 4.98562 4.98906 + 4.99267 4.99539 4.99666 4.99731 4.99797 4.99844 4.99887 + 4.99927 4.99933 4.99938 4.99944 4.99949 4.99955 4.9996 4.99965 + 4.9997 4.99975 4.9998 4.99985 4.99986 4.99987 4.99989 4.9999 + 4.99991 4.99992 4.99993 4.99995 4.99996 4.99997 4.99998 + 4.99998 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 + 5.00001 5.00001 5 5 5 5 5 5 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99997 5.00002 5.00004 5.0001 5.0001 4.99987 5.00009 + 5.00021 5.00002 5.00004 4.99988 5.00013 4.99993 5.00026 + 4.99973 5 5.00006 5.00009 5.00004 5.00004 5.04854 4.82711 + 4.04208 2.64155 0.838902 0.19014 0.0982549 0.0723197 0.0576863 + 0.0427644 0.0301979 0.020146 0.0135728 0.00980358 0.00774482 + 0.00586604 0.0036687 0.00211511 0.00121906 0.000647581 0.000828436 + 0.00190938 0.00224254 0.00199956 0.00165488 0.00135612 0.00113715 + 0.000984181 0.000877175 0.000789973 0.000741139 0.000689338 + 0.000625676 0.000586082 0.000550152 0.000529573 0.000505606 + 0.000482117 0.000460574 0.000441649 0.000424674 0.000408398 + 0.000391914 0.000376272 0.000361487 0.000348181 0.000336045 + 0.000324466 0.000313545 0.000303046 0.000293056 0.00028356 + 0.000274586 0.000266155 0.000258279 0.000250938 0.000243789 + 0.000236912 0.000230244 0.000224186 0.000219291 0.000215346 + 0.000212468 0.000207291 0.000200862 0.00019368 0.000186767 + 0.000183515 0.000180263 0.00017701 0.000173758 0.000170506 + 0.000167253 0.000164001 0.000161164 0.000158357 0.00015555 + 0.000152743 0.000149936 0.000147129 0.000144322 0.000142066 + 0.000140096 0.000138127 0.000136157 0.000134187 0.000132218 + 0.000130248 0.000128278 0.000126308 0.000124339 0.000122369 + 0.000120399 0.000118429 0.00011646 0.000114527 0.000112892 + 0.000111258 0.000109623 0.000107988 0.000103598 6.86052e-05 + 3.337e-05 7.00783e-05 0.000218764 0.000221318 0.000118593 + -0.000113962 5.78552e-05 9.42068e-05 0.000237037 0.000171302 + 0.0001033 6.16066e-05 5.52908e-05 6.30233e-05 7.01897e-05 + 8.48573e-05 0.000106859 8.37213e-05 -0.0391541 -0.047722 + -0.0618454 -0.0169804 0.345725 1.03426 1.74825 2.37152 2.88737 + 3.32173 3.66761 3.9707 4.17762 3.98832 3.30483 2.09737 0.710892 + 0.148159 0.0707463 0.0555808 0.045618 0.0319116 0.0199589 + 0.0133357 0.00898528 0.00586075 0.00375478 0.00245443 0.00156038 + 0.000962344 0.000590953 0.000375107 0.000250243 0.00015882 + 0.000100203 6.18122e-05 3.7372e-05 2.23009e-05 1.32569e-05 + 8.29437e-06 5.72457e-06 3.96832e-06 2.98935e-06 2.59699e-06 + 2.75024e-06 3.38689e-06 4.0453e-06 3.50095e-06 1.64988e-06 + -3.84371e-07 -2.03828e-06 -3.46401e-06 -1.24301e-06 4.63458e-06 + 1.14104e-05 1.02619e-05 2.15487e-06 -2.98487e-06 -3.67221e-06 + -2.94279e-06 -2.58649e-06 -2.23019e-06 -1.87389e-06 -1.5176e-06 + -1.1613e-06 -7.92127e-07 -4.18889e-07 -4.56502e-08 3.27588e-07 + 7.00827e-07 8.79539e-07 8.17025e-07 7.5451e-07 6.91996e-07 + 6.29481e-07 5.66966e-07 5.04452e-07 4.41937e-07 3.79422e-07 + 3.16908e-07 2.54393e-07 1.90078e-07 1.25366e-07 6.0654e-08 + -4.05776e-09 -6.87696e-08 -1.33481e-07 -1.98193e-07 -2.62905e-07 + -3.27617e-07 -3.92329e-07 -4.40392e-07 -4.18802e-07 -3.97213e-07 + -3.75624e-07 -3.54035e-07 -3.32446e-07 -3.10856e-07 -2.89267e-07 + -2.67678e-07 + EOD + + @v[32].set(<<-'EOD') + 1.10294 1.10297 1.10291 1.10277 1.10259 1.10294 1.10313 + 1.10306 1.10299 1.10296 1.10295 1.10295 1.10294 1.10294 + 1.10294 1.10294 1.10294 1.10294 1.10294 1.10296 1.10296 + 1.00547 0.998599 1.5201 2.49297 3.31258 3.73162 3.84757 + 3.92505 4.02965 4.16599 4.30294 4.41541 4.52886 4.64414 + 4.73865 4.81065 4.86391 4.90315 4.93188 4.95258 4.96726 + 4.97738 4.98436 4.98888 4.99162 4.99363 4.99573 4.99731 + 4.99804 4.99843 4.99881 4.99909 4.99934 4.99957 4.9996 4.99964 + 4.99967 4.9997 4.99973 4.99977 4.9998 4.99983 4.99986 4.99988 + 4.99991 4.99992 4.99992 4.99993 4.99994 4.99994 4.99995 + 4.99996 4.99996 4.99997 4.99997 4.99998 4.99998 4.99999 + 4.99999 4.99999 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 5.00028 4.99988 4.99968 + 5.00019 4.99987 5.00021 4.99973 4.99977 4.99996 4.99997 + 5.0002 4.99957 5.00026 4.99947 5.00074 5.00003 4.99987 4.99979 + 5.00008 4.99997 5.08794 5.05993 4.76875 3.99197 3.10174 + 2.5197 2.21771 2.04 1.92235 1.83874 1.77592 1.72665 1.686 + 1.65276 1.6286 1.61299 1.60039 1.58934 1.57954 1.57083 1.56306 + 1.55604 1.54963 1.54375 1.53832 1.53331 1.52865 1.52432 + 1.52026 1.51645 1.51287 1.50949 1.50629 1.50327 1.50039 + 1.49766 1.49505 1.49257 1.49019 1.48792 1.48574 1.48365 + 1.48164 1.47971 1.47784 1.47604 1.47431 1.47264 1.47102 + 1.46945 1.46794 1.46647 1.46505 1.46367 1.46233 1.46103 + 1.45976 1.45853 1.45733 1.45616 1.45502 1.45392 1.45284 + 1.45179 1.45076 1.44975 1.4488 1.44795 1.44711 1.44626 1.44541 + 1.44457 1.44372 1.44287 1.44212 1.44138 1.44063 1.43989 + 1.43914 1.4384 1.43766 1.43701 1.43641 1.43581 1.43522 1.43462 + 1.43402 1.43342 1.43282 1.43223 1.43163 1.43103 1.43043 + 1.42984 1.42924 1.42865 1.42808 1.42752 1.42695 1.42639 + 1.42584 1.42529 1.42472 1.42412 1.42365 1.42326 1.42304 + 1.42162 1.42082 1.42032 1.42029 1.42026 1.41995 1.41947 + 1.41894 1.41841 1.4179 1.41742 1.41699 1.41656 1.32097 1.30963 + 1.78765 2.64656 3.35764 3.747 3.86589 3.94217 4.04185 4.18453 + 4.3561 4.53439 4.68621 4.74905 4.77848 4.84629 4.91261 4.97541 + 5.01284 5.01548 5.01248 5.00924 5.00666 5.00475 5.00334 + 5.00234 5.00164 5.00118 5.00083 5.00058 5.0004 5.00028 5.00019 + 5.00013 5.00009 5.00007 5.00004 5.00003 5.00002 5.00001 + 5.00001 5.00001 5 5 4.99999 4.99995 4.99992 4.99996 5.00006 + 5.00012 5.00009 4.99997 4.9999 4.99985 4.99986 4.99997 5.00021 + 5.00031 5.00024 5.0001 5.00007 5.00005 5.00003 5.00001 4.99998 + 4.99998 4.99999 4.99999 4.99999 5 5 5 5 5 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00002 5.00002 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 + 5 4.99999 4.99999 4.99999 4.99998 4.99998 4.99998 + EOD + + @v[33].set(<<-'EOD') + 5 5.00012 5.00023 5.0003 4.99972 4.99988 4.99984 4.99991 + 4.99996 4.99999 5.00008 5.00009 4.99986 5.00003 5.00007 + 4.99995 4.9999 4.99997 5.00013 5.00014 5.00013 4.99701 4.99763 + 4.99742 4.99998 5.02836 5.07262 4.96856 4.57267 3.85637 + 2.79544 1.45942 0.408016 0.084885 0.0271375 0.0119294 0.00707546 + 0.0051087 0.00373035 0.00264737 0.00186477 0.00130379 0.000915857 + 0.000653121 0.000483893 0.000380852 0.000302362 0.000219498 + 0.000154435 0.000121928 0.000104026 8.61242e-05 7.48526e-05 + 6.49216e-05 5.56238e-05 5.29689e-05 5.03139e-05 4.7659e-05 + 4.5004e-05 4.23491e-05 4.00356e-05 3.79522e-05 3.58687e-05 + 3.37852e-05 3.17018e-05 2.97592e-05 2.89804e-05 2.82016e-05 + 2.74228e-05 2.66441e-05 2.58653e-05 2.50865e-05 2.43077e-05 + 2.35289e-05 2.27501e-05 2.19714e-05 2.12346e-05 2.07821e-05 + 2.03295e-05 1.98769e-05 1.94244e-05 1.89718e-05 1.85192e-05 + 1.80667e-05 1.76141e-05 1.71615e-05 1.6709e-05 1.62828e-05 + 1.60061e-05 1.57294e-05 1.54527e-05 1.5176e-05 1.48993e-05 + 1.46226e-05 1.43459e-05 1.40692e-05 1.37925e-05 1.35158e-05 + 1.3262e-05 1.31191e-05 1.29761e-05 1.28332e-05 1.26903e-05 + 1.25474e-05 1.24045e-05 1.22615e-05 1.21186e-05 1.19757e-05 + 1.18328e-05 1.16898e-05 1.15469e-05 1.1404e-05 1.12611e-05 + 1.11182e-05 1.09752e-05 1.08323e-05 1.06894e-05 1.05465e-05 + 1.04036e-05 1.02606e-05 1.00185e-05 3.8343e-05 -3.06781e-05 + -0.000111758 0.000111673 0.000130815 -0.000210491 -0.000231304 + 0.000310226 0.000265303 3.0878e-05 -4.48405e-05 -1.2852e-05 + -7.84469e-06 3.29986e-05 -1.23286e-05 -6.07871e-05 5.35082e-05 + 7.69194e-05 0.000126221 6.57178e-05 0.00223349 -0.0148854 + -0.0476636 -0.0491447 0.220125 1.11174 2.03988 2.90209 3.61069 + 4.13554 4.50679 4.71501 4.83916 4.91027 4.95284 4.98086 + 4.99151 4.98651 4.97113 4.95075 4.93102 4.93683 4.95457 + 4.97071 4.98212 4.98948 4.99386 4.99636 4.99785 4.9987 4.99927 + 4.99989 5.00014 5.00007 4.99988 4.99982 4.99976 4.99973 + 4.99972 4.99972 4.99973 4.99974 4.99975 4.99977 4.99979 + 4.99981 4.99984 4.99986 4.99988 4.99989 4.99991 4.99992 + 4.99993 4.99994 4.99995 4.99996 4.99996 4.99997 4.99997 + 4.99998 4.99998 4.99998 4.99998 4.99999 4.99999 4.99999 + 4.99999 5 5 5 5.00001 5.00001 5.00001 5.00002 5.00001 5.00001 + 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 5 4.99999 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 4.99999 + 4.99999 4.99999 4.99999 5 5.00012 4.99946 4.99839 4.99733 + 4.99948 5.00114 5.00158 5.00147 5.00113 5.00073 5.00043 + 5.0002 5.00006 4.99995 4.99986 4.99973 4.99976 4.9999 5.00029 + 5.00055 4.99704 4.99734 4.9972 5.00278 5.03354 5.07184 4.94057 + 4.51936 3.75638 2.60982 1.23803 0.315016 0.0796102 0.0252894 + 0.0165723 0.0827785 0.491298 1.40686 2.33436 3.1251 3.7691 + 4.22201 4.49976 4.68115 4.80513 4.88509 4.93208 4.95861 + 4.97579 4.98655 4.99268 4.99571 4.99771 4.99881 4.99929 + 4.99954 4.99965 4.9997 4.99971 4.99971 4.99971 4.99971 4.99972 + 4.99974 4.99976 4.99978 4.99981 4.99984 4.99987 4.99989 + 4.99991 4.99991 4.99992 4.99992 4.99993 4.99997 5.00003 + 5.00006 5.00004 5.00001 5 4.99999 4.99998 4.99998 4.99997 + 4.99997 4.99997 4.99998 4.99998 4.99998 4.99999 4.99999 + 4.99999 4.99999 5 5 5 5 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5 5 5 5 5 5 5 4.99999 + 4.99999 4.99999 4.99999 4.99998 4.99998 + EOD + + @v[34].set(<<-'EOD') + 5 5.00207 5.00813 5.01486 5.00156 5.0018 4.99861 4.99844 + 4.99888 4.9993 4.99956 4.99971 4.99979 4.99983 4.99987 4.99989 + 4.99671 4.9974 4.99864 5.00131 5.00377 5.0021 5.00039 4.99993 + 5.00004 5.0009 5.00109 4.99636 4.98617 4.96778 4.92047 4.89528 + 4.91112 4.9559 4.98286 4.99369 4.99812 4.99951 4.99994 5.00014 + 5.00008 4.99994 4.99984 4.99989 4.99998 5.00004 5.00004 + 5.00006 5.00005 5.00001 4.99997 4.99992 4.99993 4.99994 + 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 + 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 4.99996 + 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 + 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 + 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 4.99997 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 + 4.99998 4.99998 4.99998 4.99998 5.00131 5.00072 4.9977 4.99811 + 5.00325 4.99647 4.98948 4.99459 5.00262 5.00276 5.00156 + 5.00072 5.0003 5.00013 4.99995 4.99668 4.99775 4.99917 5.00173 + 5.00386 5.00188 4.99888 4.99757 4.99951 5.01712 5.0557 5.07088 + 5.07704 5.07758 5.06958 5.04223 5.03331 5.0279 5.03408 5.07611 + 5.01911 4.68594 3.99152 2.92195 1.69878 0.809 0.344091 0.154663 + 0.0788717 0.0467212 0.0336168 0.0280514 0.0254947 0.024173 + 0.0223567 0.0220555 0.0271514 0.0295872 0.0296052 0.0283971 + 0.0264726 0.0241813 0.0218244 0.0195349 0.017368 0.0152495 + 0.013295 0.0115444 0.00996982 0.00857091 0.00733891 0.00627261 + 0.0053494 0.00456316 0.00388373 0.00331073 0.00282181 0.00240991 + 0.00206389 0.00177187 0.00152283 0.00131167 0.00112558 0.000954373 + 0.000805726 0.00069326 0.000600991 0.000525743 0.00047355 + 0.00044359 0.000434815 0.000436053 0.000402511 0.000368969 + 0.000335427 0.000301886 0.000268344 0.000234802 0.00020126 + 0.000184967 0.000169932 0.000154896 0.000139861 0.000124825 + 0.00010979 9.47546e-05 8.67896e-05 8.24901e-05 7.81906e-05 + 7.38911e-05 6.95915e-05 6.5292e-05 6.09925e-05 5.66929e-05 + 5.23934e-05 4.80939e-05 4.37943e-05 3.94948e-05 3.51953e-05 + 3.08957e-05 2.67968e-05 2.42936e-05 2.17904e-05 1.92872e-05 + 1.6784e-05 0.00125927 -0.00794344 -0.0305499 -0.0621697 + -0.0463796 -0.0224608 -0.00538381 0.00546086 0.0108675 0.012883 + 0.0131787 0.0127271 0.0119702 0.0110398 0.0100635 0.00649617 + 0.00489388 0.00545863 0.0098351 0.0167428 0.0126563 0.00697542 + 0.00427027 0.00330002 0.00390774 0.00408999 -0.00259143 + -0.0160578 -0.0451849 -0.0409651 0.1301 0.597429 1.3848 + 2.63426 3.81272 4.51373 4.8412 4.98731 4.88165 4.37165 3.40034 + 2.17681 1.12217 0.505129 0.219703 0.104992 0.0622333 0.0448317 + 0.0355782 0.0311867 0.0293529 0.0274615 0.0288739 0.0307845 + 0.0304909 0.029245 0.0273602 0.0251006 0.022697 0.0202765 + 0.0179357 0.0157106 0.0136562 0.0117951 0.0101273 0.00865784 + 0.00739394 0.00634364 0.00551356 0.00480538 0.00415747 0.00356084 + 0.00297585 0.00236711 0.00181853 0.00160713 0.00169822 0.00166542 + 0.00145504 0.00120252 0.00109259 0.000982658 0.00087273 + 0.000762802 0.000652874 0.000584068 0.000528263 0.000472458 + 0.000416653 0.000360848 0.000321155 0.000301442 0.000281729 + 0.000262016 0.000242303 0.00022259 0.000202877 0.000183164 + 0.000163451 0.000143738 0.000124025 0.000114582 0.000107399 + 0.000100216 9.30332e-05 8.58502e-05 7.86672e-05 7.14841e-05 + 6.43011e-05 5.7118e-05 4.9935e-05 4.35378e-05 4.04281e-05 + 3.73184e-05 3.42088e-05 3.10991e-05 2.79894e-05 2.48798e-05 + 2.17701e-05 1.86604e-05 + EOD + + @v[35].set(<<-'EOD') + 7.24585e-12 2.21843e-05 3.20014e-05 1.25076e-05 -2.44947e-05 + 1.8425e-05 5.50546e-06 3.53025e-05 -1.07551e-05 -3.94383e-06 + -2.27848e-06 -9.04789e-05 7.44215e-05 -2.7662e-05 0.000200038 + -2.11998e-05 -2.09011e-05 2.37098e-05 2.18751e-05 -2.28422e-05 + -6.23659e-05 3.58241e-05 1.76386e-05 -4.28311e-05 0.000355626 + 0.00156903 0.00100999 -0.0085304 -0.02067 -0.0389485 -0.0651568 + -0.128475 -0.314362 -0.406837 -0.421558 -0.421277 -0.418176 + -0.414481 -0.410845 -0.407348 -0.403971 -0.400716 -0.397582 + -0.394563 -0.391658 -0.388866 -0.386178 -0.383585 -0.381094 + -0.378789 -0.376569 -0.37435 -0.372256 -0.370188 -0.36815 + -0.366422 -0.364694 -0.362967 -0.361239 -0.359511 -0.357888 + -0.356334 -0.354781 -0.353227 -0.351674 -0.350152 -0.348888 + -0.347625 -0.346361 -0.345098 -0.343834 -0.342571 -0.341307 + -0.340044 -0.33878 -0.337517 -0.336279 -0.335215 -0.334152 + -0.333088 -0.332024 -0.330961 -0.329897 -0.328833 -0.32777 + -0.326706 -0.325642 -0.324601 -0.323683 -0.322766 -0.321849 + -0.320932 -0.320014 -0.319097 -0.31818 -0.317263 -0.316345 + -0.315428 -0.314545 -0.313825 -0.313106 -0.312387 -0.311667 + -0.310948 -0.310228 -0.309509 -0.308789 -0.30807 -0.307351 + -0.306631 -0.305912 -0.305192 -0.304473 -0.303754 -0.303034 + -0.302315 -0.301595 -0.300876 -0.300157 -0.299437 -0.298716 + -0.29798 -0.297329 -0.296691 -0.295837 -0.29516 -0.294725 + -0.294044 -0.292917 -0.292351 -0.291965 -0.291365 -0.290687 + -0.290027 -0.289376 -0.288772 -0.288193 -0.287505 -0.286892 + -0.28626 -0.285714 -0.284545 -0.289246 -0.298717 -0.298492 + -0.214163 0.181451 0.0749974 0.0454707 0.0292987 0.0196837 + 0.0124119 0.00884715 0.00527181 0.00585821 0.0296361 0.169856 + 0.361207 0.538856 0.67469 0.685933 0.392802 0.17772 0.0813085 + 0.0424601 0.0246654 0.0175258 0.0144256 0.0129859 0.012205 + 0.0112846 0.010933 0.0134813 0.0147254 0.0147981 0.0142156 + 0.0132732 0.0121355 0.0109587 0.00981238 0.00872731 0.00767007 + 0.00669346 0.00581341 0.00502167 0.00431819 0.00369842 0.00316168 + 0.00269663 0.00230035 0.00195801 0.00166928 0.00142286 0.00121522 + 0.00104072 0.000893384 0.000767675 0.000661268 0.000567659 + 0.000481766 0.000407101 0.000350044 0.000302721 0.000263424 + 0.000236813 0.00022199 0.000218182 0.000219548 0.0002027 + 0.000185853 0.000169006 0.000152158 0.000135311 0.000118463 + 0.000101616 9.33782e-05 8.57685e-05 7.81588e-05 7.0549e-05 + 6.29393e-05 5.53296e-05 4.77199e-05 4.36954e-05 4.15296e-05 + 3.93637e-05 3.71978e-05 3.50319e-05 3.28661e-05 3.07002e-05 + 2.85343e-05 2.63685e-05 2.42026e-05 2.20367e-05 1.98709e-05 + 1.7705e-05 1.55391e-05 1.34772e-05 1.22416e-05 1.10061e-05 + 9.77055e-06 8.535e-06 0.000631271 -0.00362586 -0.0146235 + -0.0308486 -0.0237466 -0.0117522 -0.00304171 0.00251033 + 0.00531986 0.0063897 0.00657351 0.00636494 0.00599705 0.00553442 + 0.00505994 0.00330925 0.00246671 0.0027006 0.00473161 0.00830333 + 0.00649147 0.00356815 0.00217448 0.00187579 0.00270447 0.00219543 + -0.00546118 -0.0179576 -0.0445306 -0.0649309 0.0197935 0.473629 + 0.87268 0.269542 0.0086094 0.0844602 0.606456 1.04929 0.906014 + 0.916205 0.919425 0.872867 0.556244 0.262457 0.11838 0.0571226 + 0.0333451 0.0237133 0.0185096 0.0159617 0.0148663 0.0138683 + 0.0144081 0.0153797 0.0152551 0.0146487 0.0137192 0.0125973 + 0.0113996 0.0101903 0.00901851 0.00790495 0.00687502 0.00593994 + 0.00510092 0.00436111 0.00372439 0.0031945 0.00277537 0.00241888 + 0.002095 0.00179943 0.00150419 0.00119264 0.00090934 0.000802394 + 0.000852816 0.000838368 0.000730842 0.000601028 0.000546616 + 0.000492205 0.000437793 0.000383381 0.000328969 0.00029454 + 0.000266428 0.000238317 0.000210205 0.000182093 0.000162091 + 0.000152145 0.000142198 0.000132252 0.000122306 0.000112359 + 0.000102413 9.24665e-05 8.25201e-05 7.25738e-05 6.26274e-05 + 5.78553e-05 5.42216e-05 5.05878e-05 4.69541e-05 4.33204e-05 + 3.96867e-05 3.60529e-05 3.24192e-05 2.87855e-05 2.51518e-05 + 2.19153e-05 2.03406e-05 1.8766e-05 1.71913e-05 1.56167e-05 + 1.4042e-05 1.24674e-05 1.08927e-05 9.31806e-06 + EOD + + @v[36].set(<<-'EOD') + 5 5.01426 5.02852 5.01923 4.77685 4.56471 4.52338 4.56813 + 4.63122 4.693 4.74776 4.79385 4.83258 4.86358 4.88918 4.91021 + 4.90553 4.89733 4.89554 4.91953 5.00757 5.07101 5.06318 + 5.05241 5.05535 5.08042 5.07251 4.90973 4.56136 3.98637 + 3.237 2.67216 2.33678 2.13529 2.00544 1.91429 1.84638 1.79461 + 1.75338 1.71958 1.69175 1.6686 1.64918 1.63258 1.61836 1.60607 + 1.59506 1.58483 1.57575 1.56847 1.56193 1.55538 1.54968 + 1.54416 1.5388 1.53523 1.53165 1.52807 1.52449 1.52091 1.51771 + 1.51477 1.51182 1.50888 1.50593 1.50309 1.50113 1.49917 + 1.4972 1.49524 1.49328 1.49132 1.48935 1.48739 1.48543 1.48346 + 1.48157 1.48012 1.47868 1.47724 1.47579 1.47435 1.47291 + 1.47146 1.47002 1.46857 1.46713 1.46574 1.46462 1.4635 1.46238 + 1.46126 1.46014 1.45902 1.4579 1.45678 1.45567 1.45455 1.45349 + 1.45275 1.45201 1.45127 1.45053 1.44979 1.44905 1.44831 + 1.44757 1.44683 1.44609 1.44535 1.44461 1.44387 1.44313 + 1.44239 1.44165 1.44091 1.44017 1.43943 1.43869 1.43795 + 1.43721 1.43874 1.43976 1.43619 1.43182 1.43726 1.43084 + 1.42587 1.42383 1.42642 1.42728 1.42736 1.4271 1.42669 1.42621 + 1.42569 1.41703 1.41244 1.41019 1.41199 1.41833 1.42502 + 1.41504 1.37535 1.28381 1.44779 2.33713 3.25835 3.67554 + 3.84975 4.01125 4.2253 4.45433 4.62215 4.74478 4.82998 4.8868 + 4.92396 4.94768 4.96498 4.98537 5.0128 5.04467 5.06722 5.06535 + 5.01475 4.91956 4.80647 4.7242 4.7059 4.73552 4.76379 4.81684 + 4.87376 4.92276 4.96112 4.9884 5.0045 5.00999 5.00933 5.00619 + 5.00384 5.00342 5.00373 5.00362 5.00309 5.00272 5.00239 + 5.00204 5.00172 5.00146 5.00124 5.00105 5.00089 5.00076 + 5.00065 5.00057 5.00048 5.00041 5.00034 5.00028 5.00023 + 5.00019 5.00015 5.00015 5.00016 5.0002 5.00023 5.00021 5.00019 + 5.00017 5.00015 5.00012 5.0001 5.00008 5.00007 5.00006 5.00005 + 5.00004 5.00003 5.00002 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00002 5.00002 5.00002 5.00002 + 5.00002 5.00002 5.00002 5.00002 5.00002 5.00002 5.00001 + 5.00001 5.00001 5.00062 4.99506 4.9835 4.96726 4.9728 4.97877 + 4.98675 4.9966 5.00406 5.00679 5.00629 5.00561 5.00487 5.00429 + 5.00384 5.002 5.00164 5.00229 5.00484 5.00769 5.00019 5.00242 + 5.01319 5.0335 5.07265 5.10129 5.11485 5.12551 5.13953 5.16048 + 5.18862 5.22811 5.25656 5.25627 5.19975 4.9139 4.24745 3.43732 + 2.8202 2.43224 2.17409 2.01333 1.93951 1.94622 1.98861 2.02217 + 2.05383 2.08376 2.11184 2.13793 2.16191 2.18267 2.20502 + 2.22837 2.24958 2.26901 2.28648 2.302 2.31582 2.32802 2.33869 + 2.34795 2.35596 2.36282 2.3687 2.37371 2.37797 2.38161 2.38476 + 2.38743 2.3897 2.39168 2.39329 2.39463 2.39575 2.39671 2.39756 + 2.39835 2.39907 2.39968 2.39999 2.4003 2.40061 2.40091 2.40122 + 2.40142 2.40159 2.40176 2.40193 2.4021 2.40222 2.40228 2.40234 + 2.4024 2.40247 2.40253 2.40259 2.40265 2.40271 2.40277 2.40284 + 2.40287 2.40289 2.40291 2.40294 2.40296 2.40298 2.40301 + 2.40303 2.40305 2.40308 2.4031 2.40311 2.40312 2.40313 2.40314 + 2.40315 2.40316 2.40317 2.40318 + EOD + + @v[37].set(<<-'EOD') + 5 5.01732 5.03181 5.05944 5.12686 5.20725 5.28103 5.31254 + 5.32901 5.33709 5.3408 5.34257 5.34311 5.34347 5.34386 5.34411 + 5.3406 5.33484 5.32942 5.32904 5.33644 5.34869 5.35001 5.34882 + 5.34758 5.34672 5.34599 5.34496 5.34364 5.34165 5.33712 + 5.33502 5.3366 5.34067 5.34306 5.34398 5.34434 5.34442 5.34443 + 5.34443 5.34441 5.34439 5.34437 5.34437 5.34438 5.34438 + 5.34438 5.34438 5.34438 5.34437 5.34437 5.34436 5.34436 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 5.34437 + 5.34437 5.34437 5.34437 5.34437 5.34437 5.35377 5.35451 + 5.34265 5.34488 5.35861 5.28622 4.90033 4.75027 4.89731 + 4.97098 4.99293 4.99832 4.99909 4.99956 4.99858 4.99829 + 4.9998 5.00035 5.0038 5.00989 5.00251 4.99438 4.9953 4.99761 + 4.99985 5.00152 5.0011 5.00046 4.99996 4.99925 4.99862 4.99919 + 4.99961 5.00048 5.00234 4.99654 4.98235 4.95936 4.83738 + 4.53021 4.21004 4.00593 3.91207 3.88059 3.87822 3.89117 + 3.91278 3.94044 3.97376 4.01152 4.05052 4.10679 4.17908 + 4.25673 4.33414 4.40875 4.47879 4.54342 4.60258 4.65595 + 4.70291 4.74414 4.78018 4.81185 4.83915 4.86291 4.88301 + 4.90048 4.91528 4.92802 4.9387 4.94777 4.95539 4.9618 4.96725 + 4.97195 4.97588 4.97932 4.98247 4.98512 4.98697 4.98831 + 4.98919 4.99015 4.99101 4.99169 4.99222 4.99282 4.99341 + 4.994 4.9946 4.99519 4.99578 4.99638 4.99667 4.99693 4.9972 + 4.99747 4.99773 4.998 4.99827 4.99841 4.99849 4.99856 4.99864 + 4.99872 4.9988 4.99888 4.99896 4.99904 4.99911 4.99919 4.99927 + 4.99935 4.99943 4.9995 4.99955 4.9996 4.99965 4.9997 5.00736 + 4.98252 4.87516 4.66727 4.49142 4.43103 4.4301 4.4571 4.49729 + 4.5407 4.5835 4.62363 4.66114 4.69577 4.72738 4.74632 4.75971 + 4.77576 4.80671 4.87073 4.91665 4.93252 4.94418 4.95331 + 4.96094 4.96727 4.97148 4.97471 4.97612 4.98276 5.00247 + 5.04086 5.08628 5.10673 5.08887 5.0564 5.02767 5.01336 4.99685 + 4.97422 4.90866 4.67035 4.33117 4.07888 3.94432 3.89105 + 3.88174 3.89292 3.91442 3.94564 3.98708 4.0355 4.09134 4.16315 + 4.24088 4.31918 4.39527 4.46693 4.53337 4.59405 4.6486 4.69693 + 4.73938 4.77617 4.80809 4.83551 4.85895 4.87894 4.89596 + 4.91081 4.92417 4.93651 4.94552 4.95198 4.9565 4.96096 4.96523 + 4.96972 4.97428 4.97868 4.98064 4.9826 4.98455 4.98651 4.98847 + 4.98967 4.99064 4.9916 4.99257 4.99353 4.99422 4.99457 4.99493 + 4.99528 4.99563 4.99598 4.99633 4.99668 4.99703 4.99738 + 4.99773 4.9979 4.99804 4.99817 4.9983 4.99843 4.99856 4.99869 + 4.99883 4.99896 4.99909 4.99921 4.99926 4.99931 4.99937 + 4.99942 4.99948 4.99953 4.99959 4.99964 + EOD + + @v[38].set(<<-'EOD') + 4.49849 4.53282 4.58329 4.66625 4.83345 4.97823 5.0207 5.01816 + 5.01116 5.00595 5.00296 5.00148 5.00073 5.00062 5.00033 + 5.0003 4.99864 4.99661 4.99652 4.99928 5.00361 5.12573 5.17251 + 5.22612 5.33479 5.44503 5.44432 5.44379 5.44334 5.443 5.44276 + 5.44258 5.44246 5.44238 5.44232 5.44228 5.44225 5.44223 + 5.44221 5.4422 5.44219 5.44219 5.44218 5.44218 5.44218 5.44218 + 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 + 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 + 5.44217 5.44217 5.44217 5.44217 5.44217 5.44217 5.44216 + 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 + 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 5.44216 + 5.44216 5.44216 5.44216 5.44216 5.44215 5.44215 5.44215 + 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 + 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 + 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 5.44215 + 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 5.44214 + 5.44214 5.44214 5.44214 5.44214 5.44212 5.45159 5.45236 + 5.44064 5.44307 5.45616 5.38122 4.77163 3.53297 2.74466 + 2.34448 2.11802 1.9783 1.88656 1.82001 1.77389 1.72955 1.69632 + 1.66971 1.6526 1.65236 1.56034 1.53764 1.97139 2.75096 3.39212 + 3.74042 3.82345 3.85696 3.88547 3.91862 3.9585 4.00467 4.05903 + 4.1254 4.19533 4.26791 4.34517 4.42112 4.49238 4.55807 4.6179 + 4.6713 4.71815 4.75889 4.79418 4.82456 4.85062 4.87291 4.89196 + 4.90823 4.92209 4.93388 4.9439 4.95242 4.95968 4.96585 4.97108 + 4.9755 4.97923 4.98237 4.98503 4.98732 4.98927 4.99094 4.99233 + 4.99353 4.99452 4.99538 4.99608 4.99668 4.99718 4.9976 4.99794 + 4.99822 4.99847 4.99867 4.99884 4.99899 4.99913 4.99924 + 4.99932 4.99938 4.99943 4.99947 4.99951 4.99953 4.99955 + 4.99958 4.99961 4.99964 4.99967 4.99969 4.99972 4.99975 + 4.99977 4.99978 4.99979 4.99981 4.99982 4.99983 4.99985 + 4.99986 4.99986 4.99987 4.99987 4.99988 4.99988 4.99988 + 4.99989 4.99989 4.9999 4.9999 4.99991 4.99991 4.99992 4.99992 + 4.99993 4.99993 4.99993 4.99994 5.00381 5.00064 4.99246 + 4.99823 5.00349 5.00076 5.00033 5.00015 5.00009 5.00007 + 5.00005 5.00004 5.00003 5.00002 4.99988 4.99732 4.99728 + 4.9978 5.00187 5.00927 5.08712 5.07654 4.92855 4.4863 3.76162 + 3.00049 2.49834 2.20883 2.03492 1.92384 1.84676 1.79021 + 1.74716 1.7132 1.68576 1.66309 1.64406 1.62785 1.61383 1.60162 + 1.59081 1.58117 1.57253 1.56473 1.55765 1.55117 1.54527 + 1.53988 1.53485 1.53012 1.5257 1.5216 1.51773 1.51411 1.51071 + 1.50746 1.50438 1.50146 1.49868 1.49603 1.4935 1.49109 1.48878 + 1.48657 1.48445 1.48242 1.48046 1.47858 1.47677 1.47502 + 1.47333 1.4717 1.47012 1.46859 1.46711 1.46568 1.46428 1.46292 + 1.4616 1.46034 1.45923 1.45812 1.45701 1.4559 1.45479 1.45378 + 1.45279 1.45181 1.45082 1.44983 1.44893 1.44813 1.44732 + 1.44652 1.44571 1.44491 1.4441 1.4433 1.44249 1.44169 1.44089 + 1.44019 1.43951 1.43883 1.43815 1.43747 1.4368 1.43612 1.43544 + 1.43476 1.43408 1.43342 1.43283 1.43223 1.43163 1.43104 + 1.43044 1.42984 1.42924 1.42865 + EOD + + @v[39].set(<<-'EOD') + 5 5.01048 5.01221 4.98887 4.76261 4.54943 4.51564 4.56249 + 4.62621 4.68843 4.74374 4.79044 4.82972 4.86127 4.88724 + 4.90862 4.90791 4.89858 4.89589 4.91767 5.00405 5.16956 + 5.12391 4.7557 3.87953 3.01124 2.48482 2.20424 2.03812 1.92679 + 1.84956 1.79256 1.74907 1.71487 1.68724 1.6644 1.64513 1.6287 + 1.61446 1.60197 1.59095 1.58117 1.57245 1.5646 1.55752 1.55109 + 1.54516 1.53958 1.53444 1.53008 1.52606 1.52205 1.51843 + 1.5149 1.51146 1.50893 1.50639 1.50387 1.50133 1.4988 1.49651 + 1.49436 1.49222 1.49007 1.48793 1.48585 1.48433 1.4828 1.48128 + 1.47975 1.47823 1.4767 1.47518 1.47365 1.47213 1.4706 1.46912 + 1.46795 1.46678 1.46561 1.46444 1.46327 1.4621 1.46093 1.45976 + 1.45859 1.45741 1.45628 1.45534 1.45441 1.45347 1.45254 + 1.4516 1.45067 1.44973 1.4488 1.44786 1.44693 1.44604 1.44539 + 1.44475 1.4441 1.44345 1.44281 1.44216 1.44151 1.44086 1.44022 + 1.43957 1.43892 1.43828 1.43763 1.43698 1.43633 1.43569 + 1.43504 1.43439 1.43375 1.4331 1.43245 1.4318 1.43157 1.43089 + 1.43001 1.43042 1.42899 1.42439 1.42216 1.43447 1.44048 + 1.43705 1.43314 1.43039 1.42861 1.42739 1.42651 1.42548 + 1.42488 1.4243 1.42392 1.4235 1.32443 1.31149 1.78169 2.64844 + 3.43211 3.95252 4.20231 4.3746 4.49948 4.58929 4.65742 4.71183 + 4.77057 4.83196 4.88354 4.92894 4.96625 4.99235 5.00651 + 5.00941 5.00813 5.00689 5.00588 5.00504 5.00431 5.00368 + 5.00314 5.00268 5.00228 5.00194 5.00165 5.0014 5.00118 5.001 + 5.00085 5.00072 5.00061 5.00052 5.00044 5.00037 5.00031 + 5.00027 5.00022 5.00019 5.00016 5.00013 5.00011 5.00009 + 5.00008 5.00007 5.00006 5.00005 5.00004 5.00003 5.00003 + 5.00003 5.00002 5.00002 5.00002 5.00001 5.00001 5.00001 + 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 5.00001 + 5.00001 5.00001 5 5 5 5 5 4.99999 4.99999 4.99999 4.99998 + 4.99998 4.99998 4.99998 4.99998 4.99998 4.99998 4.99999 + 4.99999 4.99999 4.99999 4.99999 4.99999 5 5 5 5 5.00001 + 5.00002 5.00003 5.00004 5.00022 4.99974 4.99942 4.99997 + 5.00063 5.00002 5.00003 4.99994 4.99998 4.99999 5 5 5 5 + 5 4.99981 4.99998 5.00004 5.00036 5.00049 5.12012 5.16315 + 5.19712 5.21835 4.87874 4.10151 3.31555 2.74207 2.38075 + 2.15872 2.01614 1.91886 1.84852 1.79401 1.75052 1.71508 + 1.68672 1.66467 1.64602 1.62985 1.61576 1.60343 1.59256 + 1.58287 1.57418 1.56632 1.55922 1.55282 1.54687 1.54132 + 1.53618 1.53143 1.52698 1.52282 1.51895 1.51527 1.5118 1.50851 + 1.5054 1.50244 1.49963 1.49695 1.4944 1.49196 1.48963 1.4874 + 1.48527 1.48322 1.48124 1.47934 1.47751 1.47574 1.47403 + 1.47239 1.4708 1.46926 1.46777 1.46632 1.46491 1.46355 1.46237 + 1.4612 1.46002 1.45884 1.45766 1.45659 1.45555 1.45451 1.45346 + 1.45242 1.45147 1.45062 1.44978 1.44894 1.44809 1.44725 + 1.4464 1.44556 1.44472 1.44387 1.44303 1.4423 1.44159 1.44088 + 1.44017 1.43947 1.43876 1.43805 1.43734 1.43664 1.43593 + 1.43524 1.43462 1.434 1.43338 1.43276 1.43213 1.43151 1.43089 + 1.43027 + EOD + end + + def highlightTrace(graph) + entry = graph.legend_get(:current) + active_list = graph.legend_activate + if active_list.include?(entry) + graph.legend_deactivate(entry) + graph.element_deactivate(entry) + else + graph.legend_activate(entry) + graph.element_activate(entry) + end + end + +end + +BLT_Graph_Demo.new + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7.rb new file mode 100644 index 0000000..27fbe53 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7.rb @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +length = 250000 +graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points") +graph.xaxis_configure(:loose=>false, :title=>'X Axis Label') +graph.yaxis_configure(:title=>'Y Axis Label') +graph.legend_configure(:activerelief=>:sunken, :background=>'') + +Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both) + +v_x = Tk::BLT::Vector.new(length) +v_y = Tk::BLT::Vector.new(length) +v_x.expr("random(#{v_x})") +v_y.expr("random(#{v_y})") +v_x.sort(v_y) + +plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square, + :color=>'green4', :fill=>'green2', + :linewidth=>0, :outlinewidth=>1, + :pixels=>4, :label=>'plot', + :xdata=>v_x, :ydata=>v_y) + +Tk.root.minsize(0, 0) + +#graph.zoom_stack +#graph.crosshairs +#graph.active_legend +#graph.closest_point +Tk::BLT.zoom_stack(graph) +Tk::BLT.crosshairs(graph) +Tk::BLT.active_legend(graph) +Tk::BLT.closest_point(graph) + +Tk::BLT::Busy.hold(graph) +Tk.update +Tk::BLT::Busy.release(graph) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7a.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7a.rb new file mode 100644 index 0000000..a014f72 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7a.rb @@ -0,0 +1,63 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +file = File.join(File.dirname(File.expand_path(__FILE__)), + 'images', 'buckskin.gif') +bgTexture = TkPhotoImage.new(:file=>file) + +TkOption.add('*Graph.Tile', bgTexture) +TkOption.add('*Label.Tile', bgTexture) +TkOption.add('*Frame.Tile', bgTexture) +TkOption.add('*Htext.Tile', bgTexture) +TkOption.add('*TileOffset', 0) +TkOption.add('*HighlightThickness', 0) +TkOption.add('*Element.ScaleSybols', false) +TkOption.add('*Element.Smooth', :linear) +TkOption.add('*activeLine.Color', 'yellow4') +TkOption.add('*activeLine.Fill', 'yellow') +TkOption.add('*activeLine.LineWidth', 0) +TkOption.add('*Element.Pixels', 3) +TkOption.add('*Graph.halo', '7i') + +if Tk.root.winfo_screenvisual != 'staticgray' + TkOption.add('*print.background', 'yellow') + TkOption.add('*quit.background', 'red') +end + +length = 250000 +graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points") +graph.xaxis_configure(:loose=>false, :title=>'X Axis Label') +graph.yaxis_configure(:title=>'Y Axis Label') +graph.legend_configure(:activerelief=>:sunken, :background=>'') + +Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both) + +v_x = Tk::BLT::Vector.new(length) +v_y = Tk::BLT::Vector.new(length) +v_x.expr("random(#{v_x})") +v_y.expr("random(#{v_y})") +v_x.sort(v_y) + +plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square, + :color=>'green4', :fill=>'green2', + :linewidth=>0, :outlinewidth=>1, + :pixels=>4, :label=>'plot', + :xdata=>v_x, :ydata=>v_y) + +Tk.root.minsize(0, 0) + +#graph.zoom_stack +#graph.crosshairs +#graph.active_legend +#graph.closest_point +Tk::BLT.zoom_stack(graph) +Tk::BLT.crosshairs(graph) +Tk::BLT.active_legend(graph) +Tk::BLT.closest_point(graph) + +Tk::BLT::Busy.hold(graph) +Tk.update +Tk::BLT::Busy.release(graph) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7b.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7b.rb new file mode 100644 index 0000000..c589f18 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7b.rb @@ -0,0 +1,41 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +length = 250000 +graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points") +graph.xaxis_configure(:loose=>false, :title=>'X Axis Label') +graph.yaxis_configure(:title=>'Y Axis Label') +graph.legend_configure(:activerelief=>:sunken, :background=>'') + +Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both) + +x = Array.new(length) +y = Array.new(length) +(0...length).each{|i| + x[i] = rand + y[i] = rand +} + +plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square, + :color=>'green4', :fill=>'green2', + :linewidth=>0, :outlinewidth=>1, + :pixels=>4, :label=>'plot', + :xdata=>x, :ydata=>y) + +Tk.root.minsize(0, 0) + +#graph.zoom_stack +#graph.crosshairs +#graph.active_legend +#graph.closest_point +Tk::BLT.zoom_stack(graph) +Tk::BLT.crosshairs(graph) +Tk::BLT.active_legend(graph) +Tk::BLT.closest_point(graph) + +Tk::BLT::Busy.hold(graph) +Tk.update +Tk::BLT::Busy.release(graph) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7c.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7c.rb new file mode 100644 index 0000000..495b66f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/graph7c.rb @@ -0,0 +1,45 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +length = 250000 +graph = Tk::BLT::Graph.new(:title=>"Scatter Plot\n#{length} points") +graph.xaxis_configure(:loose=>false, :title=>'X Axis Label') +graph.yaxis_configure(:title=>'Y Axis Label') +graph.legend_configure(:activerelief=>:sunken, :background=>'') + +Tk::BLT::Table.add(Tk.root, graph, [0,0], :fill=>:both) + +v_x = Tk::BLT::Vector.new(length) +v_y = Tk::BLT::Vector.new(length) +x = Array.new(length) +y = Array.new(length) +(0...length).each{|i| + x[i] = rand + y[i] = rand +} +v_x.set(x) +v_y.set(y) + +plot = Tk::BLT::PlotComponent::Element.new(graph, :symbol=>:square, + :color=>'green4', :fill=>'green2', + :linewidth=>0, :outlinewidth=>1, + :pixels=>4, :label=>'plot', + :xdata=>v_x, :ydata=>v_y) + +Tk.root.minsize(0, 0) + +#graph.zoom_stack +#graph.crosshairs +#graph.active_legend +#graph.closest_point +Tk::BLT.zoom_stack(graph) +Tk::BLT.crosshairs(graph) +Tk::BLT.active_legend(graph) +Tk::BLT.closest_point(graph) + +Tk::BLT::Busy.hold(graph) +Tk.update +Tk::BLT::Busy.release(graph) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/buckskin.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/buckskin.gif new file mode 100644 index 0000000000000000000000000000000000000000..e2d7be9d6280f77925a171b3fcfc8c9a53ac4d95 GIT binary patch literal 7561 zcmeHK=U3ASwEQK3kkAReCJ;KJfRs=r^iTuRi!?>Lp{Rg>2_%qEG;~5ULAnYEN|7SH zs3;;Tbqxp#f-btKfUdlKf5&_C>E3U1=A5~A#ujITF$g{f!~;J8p!S?meW20pK-2m_ zlZGIphG5gCV56oG)4QQ&Ef>u0g_+%rIMaU7v?IdoVU$@%^qGgzXL_Q{dZW+W2{XTU z5!)JpZHvaXMOk%3Vjo6fJ7Tb1u@>$BtufXQFIo4-TJ&GC?7d{wMX>COv+ho`?IlXdvpaicm>yY)u}JZejv$VFvV#o!Fu?z?bub@;VZbY ztGLl5`|)J^iByN-6sL(4$B|U$i8SY_6o=_+PSfem&#t>nT*Hs1;m6bQPtx%-*Il0w zU7nF#CW-$It}`Up7i705neNXsJf4u@EbiQxQtwYTjsHjx~!cHG3+(2NaUU zD{T?IQT{%(ut4c%xh}%0UZ4b7)^y<;87``PHX3?ZFgn32BA*&^&8ndq{>n}bS~!H2 z?G0%o2v5C)yQM24Cv>0idm;Okk_+Dt)%DN_o*6YGOI~h}MV5d{_@4z;Sq_7ed8L3e zq<_0U+oB!j-rumWHYlvbjNLk*4-Z3`QX-xrAzBaGEd^dVdEpb?H7^A4RGD%JSxYB% z55w2;8!ZJLbg|>fPFnZJsJkHf%4oBG{g70rSzBx2pW8&s^k0Yb0Te+P1`OAf=$Vgq zH+((s#;t7yzBmyh>P}(b*YfqTEB{$bRqWuj@;eoftQ3RRUt3FdTq(0mSDjxdv8tBM zlHt{6qel6kX-aJH$DB;ufT1~5gS`T(nP7gy=yGz|sT3LqLT%(nO)a+n2Lf@<*)<$t zcaW9Iqq3*Qf`PtFp?NV6;3`;W!$xwmr|7g#O^R6kYp!GVzrFH^#!Y=|YWCp9C@Z@~ zVl2%@XchASkAdRlW@7kgqQJ;EYzyiyUu zn{zpvexJ9G3L`f8Q|^=%|0uPz;rH+^CR@p8iBvw3_m&KWg(#19t$gV_#UW75&fuxX zRxFQw)zRK%p%qvhZI353{_gEB_+Y_6Cn}9}a;tRD4#PTjAYri1MT;v{>MQM|#3R8# zR`2UvtEe$VU&utZ+*)U^=2BxJUwLUeX+~KC3K{Zxc$eIz5x8k#DO&NH4ns=R&zCf% zZEeO5j6WpLTHb6LqaqobN-Wo&iBW$2prmiF{wNT<<{$f<3j55~_({;}zGybE!G*30 z8s#^U_)5;*ryaO%v<e67mXkQmLlB?BBkV zYV;c;U~QtEEV7k7B^KjCKltJ>dHTg0>OKoeIh;`;tL>})Q*Ct9D{eLPJfTO79l;@# z42&LR8Lw(?>V43FAFX!|zQs?&F1^I&*lb9ldDqYgM}a?i=8C6Zw_3nchd_SqI+7A( zm=%4P$7c3+p*7jqVF|cvK>&-Hob9k;y!}4W{@2#FGTm zFgw&#kY)z+IPZZawX$KR1QM@*khzJ|`M?(=vI5r*Mg=NPSzXRtj$%%UmEF}yO5~7_ zG@m4EDv>#faK{Dz*Y{-BA~-b#LwQOq$+G))&}m{^en3`a7*F&i!x zANkyt^59t98Zt1E0LMJDxTE;&P8wFVp0CbZS)&^Ot)(RnsQTdJwx#;&Vmlvpcb zV+S&^%M!RsP~xA7;r{yQg)MQ`WU+n2%0|YsKTlL4_cG!VdKBMT}x;}=IT%mnt)h88*9 zn#8WXi@++t!-q!m*tH*{iPQ1fZF#%TbtiH(&eqe$nz}BQEZz0?&);o~*R*uHPq%`@qR^CC8Li-Gqw zV)L6Fg`(%=_*qvJpHK<}e0O~Fcel@2!s%9W%OueaPpF2(aHw88Fd4}Neb!qf7<$%ptNgXM7&UpRY7c(7~~)G-8+bFdum3gYa$ zN2IU%6#%9&gX-TL=&Ja(msffsWWKb=_0b3_k>R!~GO&YI^@+tL7Lg@h_;B(~7w^}p z1oOEM4Wst}I$Co>-asnFrSmRNSlvbkQ~#+F$w}q?hm~%8_Plc%+;2Bk>_LIebXm%0 z=x;QbY4ix(-7v&C$GgGr9t18Ci%-3lK@t$`epPqB%`Q6rqVQw#jpy?3{7Q)*(GxK@ zs~*B59z{dmDt|d6;cfokX^WaT$6gU{0zx(BRI>9gOxJ-doaX1;T-{XSX(Mbun_nk+ zKlxphd63`)wwE%WL2#Bo5rLkV1M$~MujYOJK6=U=Bp=As5L;8?@!!K#jTv)U(7Oe1 zXdUYYh=O1vA#X_%@83-Y^T&!gSWHpaaaHWkZUSfbtugrRggbrx7r*z?RhT>4#~&?V zXM_ZZ<`u{(X~q0_B-A*$zI!Ex>vTw-!_feipWlDk(aT6cWU1s<5OG}?=o;s{_L8UR z-?x3SMC;TJ5czLF<<0q&srNtJukZ!K>hC(2Et4VL^h-N5BRRhx&-Z1@?eyVT>>_23 z$lqhS8hNX|?bY+cgr}ydfB)!-2HPL8>(B4l-%8+(Hcy(Wp3-dTLToeSe#o#jF{w|6 z7FVAq$DjW3R@lybi4sWS`v-SI2KmB13^}XR%JcVCje}A5y*0!4?AViwk8lN;UnPI` z01THn|K{~-V2$TGxO?23Dmka$q){SY60!gXZ?-ewP?NVVD> zK|nDMt6e7~)>T?LqY@e*zLRN+TZt<_(>nKkUz|=C4N4b12|HL@Y7NnCKTljwaPd7^&C<kmk89+3U*LW@frZbGx+sMx`BfP40wzdTr(kf&-6akP`l$3T$YIr$h0i3%?ExDu#+ zU1=|es+#-kKsx^*@8tqj&pf{mBQMqta0})Q+mU6$acvj~t30<;BnOF+bDWA8xAu9T zm>-12UGAZ*YfC*`$WzBa3{bR52|ocK(6Z?UoB(hD*_KV7tp_(w?}<+*6@2&3wb!Sq zx91}8^8c;@tJt$jKyI&U=wAnri(?K z%%cC&G#5|+4+2K)KojC%WDpnyfVF4^oVXmeZKwyV&>3FhW>``}DSXmXn9eGe!a~I1 zU}eEF)BC|9K}Apk0L24rNm&vwa%cLhwPlCea)GH*@Ep*sZ@#YYOK!IN;qjeuv>$1VrZSZL(US*HPlXLq;5r~%v z;tm2pbQYLU3f2NXC)dF6Ak&tr_Bm#IhNI*#7>9x2-UJ-`fLB@Os|D4i^CvL-we96( zok&Xi_c~N0^?fgan+S|21CYIji-!#m0#K0*z|29W+!X|$Tk5{m?eT@Gk_~<(^@2?E zngx$zK{gUgau|Qz!i4Ra6GX0o*9YXL#e7eN_Yv zU>%hQ#pNe<2lLI!c142!FzDx6%ztv1w@k?zSTQYnDJ_e5{-8FoZ=!OuNZ!5jy^7K? z++BuY;}xkEZqzMia=uG%FfSW9#gRL`&@%7aWUz4}f2o*fyVh>2$#Gj3-WPn#KXg-K z5|Hd`K>Vs4J8GEBX@xQG&a~7v9Tkh$Qqao*M=+NMOC7Bx4i9qL7Q>mkVLsPITlons z*r--X!TaW)8n$tDV!v8z?OU#?gTi=9!dq~9N8+A#)z{(oid0<;ESR=i8OYK+n3wX5 zLMs9QZyqrpskChSvPM5OPaM@qe=5x+QJj_Q zzKxf$Zk<`Wr&q;IQEh%G#Y!*N3DMs z<>H1L=}#;&w@_!@c2O86C8O zls;ygYAtE_wgie{Y{)2XE~;QK1b*jE_abxPMN-(Z`sM*F2_@kDG?Ff&5Zlu z*E`*Bze~=uf`jWdu5R`gjW^dA`!Gb*^TurpdVI>DRgW8!A>AJf)|O9P_XQWJH=i&X z@`S54ZC7=vmG$6~%^sBw(nbwd(hGdjYmbs!B_3*T4}ZtVxtEiTs1ARA)p7XV(Uhhm zr}Bp6<&5Nuau(}Fhv`v=^v~I&MvFDkYI)p2sqWh&s;G+N4^cTo1;|5Kp)|f)^HXDM zcssVg(12|@vseP~cJiT0MIsrcIFiueIiC`Pd6zf3xUH6mOt!y2A+B~f64K-i2D%T~W1hSpY1t01{3vE$J z`ir@UMVhs|%k&gwSy?)%H*ag@*`vOjX2De7g|SZ9WZMVoa%t{-Ptfl7r;^?ggR0pZ z?oTIwlc#@BQGAr+w--L8Qp8;!?7yaTs!FGlvX51CUKWKrA~Ie|#=MGZ@_cu#95q7* zS!V_H1km4#H}?vgU7jyhnuIn%R1kQ*p2W=+Awzbx%y(p24{eebCOn(|(H11LcVAox zOe{`4$hOk6OIhSf=CiA$Wyu4E4n(kFtLoXeSYR}+OGVn7qRmNn?+wOZM-6ak2Co0 zvF#c0VSvEwj-cO0VAh26gN1Pb^2=ATx#~3j!nB!CD>*X-RhGDc&=nO#a!wba+a^)W zcBOAKO5o&qv034?3_>MT^>|Vo3Z@vi&ZwM>)jEGTo7Z}!R4^O+G{o&C|AJvl=W<_HfOA&9N2!@$( zIAl3HD||i5xcf@f`UentHcDgY+$H7U5M_BgnX+oAUe`K?{1djQtd+oKemza0Aru}U0``U? z=Neot!0tZTR}bd1$WE~)Sy1w2Oz0?iVMPm{S)@Z*x|o# z{Kv{RV$UYA*m0&BzNoy!;8+_Tg>rB0pGlQaUx$#n&K6vgSR;$^C$K2*D=fZfw~6JQ z)Ddfegup*nFx!p)W^25Fl|A7Zd9dGen?9mi3JamielV6NbN>3KZUEz+W19;&6R=sb z=fg>ucfX&$xU*#6^S7axKlKz(Cng{gTi0_ zx!<+&yQPJ>4qcI-5sR0J?V0Gwn9}(8DM8-p)eUo!X6Y>NEptN9rRnL!5Q=jIA89cgICmp z#94V=xjdpCRr6)V9_?oqY<P`$m6we&1{_HE#x=Q8Ngl1z%OTWyxG;A9vLRm&xj;Xr!D zMcCP4A!KA9&dUN$dQX!AG!0CUNkd!fSK|0C(a@v$>+rqU)nQICrr$xP7%~M0erG2k z&nX^4WN|6vz>=~h+}I24}(UU`u+3G5&r5{`d$mC zq-E^`h2$^`ZZ)A>!ygoiVHoH`KNN}FHtfm2W)tBk+^z6|_4prL_(OOJNT=?~9~h+R>g)Bd{2i0{x;Ij8hq<84(~O+aGJox!b| zb0U~^p%>Axv`kCp&)KrVyt`19kAC1UpT^BFX?zBuw{I<-4?3-MzBRt`Y~{C#+a$X* zZiU2L_!Sd37LVjf63mM4P^Y%w8MD<=Nw_G+Ox*C@L-TahA4NYQ_xS!NFCAml3DN>S z6FO29C5jva?8AKlv(NfKX=31f-Gr@GJJex@1nhuwyA{hSR>7JhWU-h~_@0DMe~b@e z@q64*e&LOlbUC9x*^!_#R^l+lS))W%&1rjiJRIPw_8@-nL|E}Cwj##>Pgt_M9@D9K ztWPHy#_m83wfqq+2AuWSX+Nc}r4dgO>b~>trEJ#@PygsF2{by-p%_kD`t$(u?DAeE zW(U;pX3Qb*s8EB4Pn28z+blGt7=GPvNnBgMUe$2;(vA>Hw647_T1T^;Q%(5=6vrf+Pt;&^M8p*(p!&A)A*D zRH3(WW5VIKvv(jDb*3IaN3{!v109*^S3GzNXSnDC_a>_V&a#l_1yy%8hINS~K3yWq zddCwN?k22E6?jNAqIuV5EujydDEqA=x_xORUV@i~$=#SmXbXqxt{C@?aeqe@MuzsE z-BV*T8;LpYW*-#b4<*LEQ}Gr7ii>2$#eBycec)X!`7_6G(MI_0)h;D-5I5+*j%xfr D1jcKn literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/chalk.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/chalk.gif new file mode 100644 index 0000000000000000000000000000000000000000..30d29a72216297fbe3201803c4b3b2a78a95276b GIT binary patch literal 4378 zcmcgu_gfO$|34@iT6Sf)a^gbCG)ImyL&dF$iiqaGi6e7cn%yhzQ5J4149(qbs73RJ z;>gjp(1uzWZmldqE9>41Uwc0P!}t9Bem$>s-p@HsE{>KKp%g#?-vO9;H}`&Kp7(xX zmbW-JyEH$yyfDAAxUjmk_+feJvc z1^jOtg72FfTVFSS5TF18m;fLEfbDk&?HncohJX=Z0HAnG9s+@Y!C;m^S-@n85P%H> zy(p+E4~Qec_K2Y}XlF4I009Fq9`s%uScd@-46ug*)RYN+LjY(GK=GM!A_QR@3GD}9 z9RLv&u!&$Xnc1})0oes35TBxw`5n7O2pAjY2gM%;>)8M*U;<~TdpqDD01O7UH3Afq zDThE1U@&(c;P9C+5rVvk5_IuI5Coe5GaCX%Z9oD6#3=yqw@CnC0{{hW|1$=FySum; zXWJqG1mF%HahU5cgoprRrvkABl)D~}Bk{{L0VqRzSSSRL15o!iz;OrJV$5}b5CIt5 zUDk{vFoKCB2y6ma6mRPS2ng6l^!(c=XuBptAlNY2jthr3_)zg*<6s5qo&h+(oe4PW z044$iwi!_0_!T3By$u6x6y~}dLIi`c%~0waJQe`k#WLl#i%x1OaRUZ;SAi&libAY&ILHL&3IQ2msqX{qI_AtN;H!2EXWj?E-)afs6{_InOpP zcbBwXHjmkx1C>S@kb9VoxuuFmnvXsBfMWJl!Gz_m=s8uVUq zDbyaDPm}Z(_x#^db=S$+IOj@5WLWA-@ejtBsk{%Z~7U=d8<5J??JeEq47aMJek4yKp zqH*$IyCrM-4+?bfl4li0n*F^gGaRH=wfrPWyZ@QOF*nDc%}l5>kJ= zDjGrzTv+iT2~VdFKYk>OEmr16+bv^+WI7O#aXC-1!6 z5tJwKHXk_DJ8YutKhj#tQ_3>#R*_NfsI_>>;7ua&tSS{(D3O&H?u_7)-uRf+Rce)q z)0Qep=ElHZ%v`E=&cVC@3Qy&t+e5|K%_!SUS!jk9Bz?AaK0!~1M30|!`KlZ(bou(~ z*wdh`?8t%0YK<(-VsglF++YMD64iE>6eK<=SMG$+OpKx-n`2rEBp&~ecRjby%r?_j zh6T@;mR@RUl7><1GB2gIsW)C8SeSBCip=936P6AJJg@F+7?Ab3P(0;Tq-k@zgBr}0 zrUmHe*9LUT&fa~Sd_Bx;n%rqvGSgfe&_0nl_TQ<%1P7&&wXReh3qOIFjlt3i{%rlGG?jN!w>abk7USZx}%F3i@jkeZ+#Pkb5mnjxwKVPqI1|r z+dmqsY)yn)nCSX?+!ed*uSGT7TlJI+Nu;gnKt-} z^&UHf4({lbGZMe;xDFB|q5E+VUU@rF82{OY<@QbbJ^f7-u z6GUwGKBqInJHFQ+pZMdvypS85Z}cZ7#LjigUp%_mkar)h?>K*gDmisv+AyVh!+~gc zFdcvIW^~d``PriukRr83-xEVd_!&2()e@o9fMKOK{eJpJ(97Ynx0BZfs!JE1xTe3O z$9OzG>_=i+L4E8>kBZ`o#%F`4YxfnTKTlK^rY+PZcd!kP|90wq$Ju<7XtYZ@Hx`xa z=%Yr{>w&PwJsxUQV1jKWC=26n>!7vS1HG%M#b~!h6GVOYkcW$=?NPBk*%fY#bxRp- zWICmZk!?)1$3A?6E6Z0vt}ao9carKu<+H6N2R~V3={;{J1q~x^a_rBn1uYCEc7SqU>66C$g z07OO&{+owUp}xPvMZt}CmB%&B;^sVJ7q!b%W!%$?f4jt*Kd8~%bYXz*<|fFkF<1M% zugW^;+*oa+-{%`naHf2XVZ>+_t=MW;@}lXQ#f_1}dj4l(WOgXH+zJW9+Akr?b~5@# zW9P>0TN_4hhKcPL4Mi6P3DNTDGfuKj=%@6ATr~m7srgn`j1#X!=ibi@Wl?H-pfpS8js`#Cg;lSebux7pFOEA-%#L%>wRjZhS=#6VL4SxbkVJ%CAucL~F$N)1 zQ!{U!E1b7*#-303Lw|Lh?4HzL#Mj=}ORRj+{gZsn&oob`i=xd)m-KbAsZyb=m>8RU zm3FC^DtF`Fapn2r+x@k9VunxDFWFvC_g^DD%PG-giQQ~yya=ELF$R|*E~eqOE!2?$ zS8I90cwPSMChrP$&Elp84ECs*QNGVPtL}(8x9YItKj2`z)n;$`M>n#)Wp2<*;^kqP zfVQIQC;ygdwigQ-p%>;az4CgZb?Uz|8rEW>i0pLrw7wRqxhY#Sc;)Josq4qd>DM11 z6q4XvnX69++;%y9xLe-oO^*Kf1QR*bOyVnM$o2%*=#AY-_Z^Y4sA%P-?r`|-ANzK3?Vd}9(GTbSb9?4?=cA0yCbV8<8CO-nygr{+x{tG z_uZ;uq;(w(&u2QOTkI|>mkz<3#QGhH$g~o>E$rxBBj$!W}CVjJ=3Ft;~yVssR@!zYFe|` zZgi-hRy!Ll^la1b>3VQ&`VA4;aJba0Pkm1ZzCP2B5&I$H0GsmDZP!cuAXKqjbb2`LTdx26fQ>hFTLwCJU`&#tV05-J*a~3B3f!^BGZr~qiKxMHKBtk z-L+qTdYH$lZ;@SWKcBm+!l#m)yZ+2%-#4=$bk&Hjp}B(t1F0x8IL-MIDwV)ldHu&} zxq}z|f(_}RU*>7$SS1Igrb-Bv;opkgN2@*;qoSu`zkRz%%ICI@Y^-r`GEgX_3 zWI-2t7@u2_hw3kn-}UNL?o}^y$HX#Y#Uh&iL$1OQMz+L0>8^2*k;##1!2#whHPZ_r z5Ob~J#`?F|s<1HkC*%U>wzu#Uo~|M((5-DYyP6VnX54ZE;Yusd7fyt$?lDV8F9$a- zYn-^Nf=E8`Btj>mNJBx(uGm(kRl#*$Ae+}%5@rK`xd zlb*w3ax!mM=JnzA+9Zg~ld6hEnw(8aTfgJazCypQ?6Cg*V;t{0nzl1|6t&1oq5BVi zLDqQ_GGSA%#Be zH{qDH1)t?DL~x3wv}9x`l`^8GJmKJ}ooebQVb?W#`029Ja-^D98s>9@t5j0_&L-1T zWPrs>w?8T|KblU;I?|g{wSID=tt<6*4y2G+en+~LvKNIGbb+seS@1*65L1V8C?V}L zt-LGLwWXW5V_Y$sYcBfcT*PSddT+%WX!XDV%=gN@6bzgs+3EQ(7F&Ko%OsKDCUYVR8-r^U$wA*L>u=n7bvk6&Xr zJP{M+7Y}MmTfEPS%~{?ZbisvdG}YFeu_tw#8F;=9K2Yf$*+eQ>&7JkJj&?Cr`>t8k zY1=Yj>5-BIT1{vBGG3iLdWe4@C7sTYvaKjIcH}#H`T@N`c!cJmm2OQ5qCs64+}T;v z-UlTPv2EBaIHcwKC8c7n*=C)udc^L)C;N;hp@d;gFCrq;Q#%iRwo|8eOXsk5%}sn7 zx7{rgZQ=UT)5|6G=X|J~`o9B|=sRdYADwKG-ioS)1dPlvG2M%t$Q#SgwakO z;jI=9R)`LpNR;N-@N>LJyA9BHN@JcFxg)67miyTlN3o{FY{!C0`wCogWPL?h-=dMv zuwxEa;YFnU`Dki}!tb%6*XbyQsFkd6`l1WVWyZDZTCd@}Vz-7Uq{{xj7WrP3# literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/qv100.t.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/qv100.t.gif new file mode 100644 index 0000000000000000000000000000000000000000..1e738ee86bbf7ba9366f6905eb5e8e6d12534330 GIT binary patch literal 2694 zcmZXTdsGv57RM(KH1Zrkapa*1QI=?cOavvZb%)_04A{njB1WL#P>Y7P&{12NK7tIT z%79q1mExS90H#YTv1o~p-KIvw6a~_VIu*5Pz`Egd(NNbm$F@s0J*Q{Sp0mHde!qL} z_kQoa=kwc?my^D}G7Crmya3?y`Mh4Q$K!Fk-A<>I<2a+ysMqUhnx-gU(sc8{BLIvKrQLlBTeA_75~hJY9&jB8|CN=A?p zl9AyANi#5taULIIwo`heOhZ|mUe>~?2-;}(utt*##Y7U7$zn$_Tn4KcvlEn|64GY2 z*z~NCq-fZmffIm43rHxh*T->AyPY$eEf$N-Xf&~`9|@LW{8TU`>F0vhYDtcB6NJ`c zvE#U(5dy<-6vZft(P}A`3WZ^nNCY}Lx826+8P@0Zc|Bf_+vDV%oSn1V>=wVb#b!2{ zO-2(<`I#Yc40qezG)a5i9?qX&GHWoL#0h_wG)YN7$ZfQ+G-G7+J{#vV`a3f@S(DFf z^D;)K*N2~{PuR5oQLiTd*goBRrxnO?eOWz)6b80ZPhwH z3IVrwA4~nL?8M~ho#Gg{oI7*7=S35jx-07V)cYOcrE3McRqEPW$L+?-J8#I!$7Z1> zZFp>M)V|pUS>a@K?48(}TmK+JJ8x<}?%z6HHuiR!sCd6nxUlQ&<+R#07lm&v3tkt0 zP0J~FjrL@BBqSZ%SQ_2=A+Zk;Bn!@kCI(dMCP}MfX`)Nqwv}HO8#<5t{S|BRlVEZA zmt*&>_63cr>eDj&@>l3~j_;WIE(N?W|K!*4uXqZpD}qs6_^l^D)qZ#VcZly>?^w#> z+KTp+n?(WyhzU(a6u%@2?kZQl4}}~&E!sN$>Z;|Ak(96v$QXP{crQQ6(VrWy7)90w z9qvxo#biVQNGp#YVC_bhC=7>Ftht$DnK1d1v|%g1u;l~I#@-bIpBalEZQH^p zTIJ)4-k`Pp-$!Ju6K=j&AirLf8UNdw2yuB!|4lcW6wlqc4;qO4vxzw z+E-2*kFHbmh3Bh?uLNC_>%j$IrxPJ*IeF5%sbd9VUd?=PV#m_D=9O37y%Xv#El*!Q zHMulzZjwAt?YnU5~ICpz)=;X8F zy5TTpnN)Z*HK+f)ZKIl>V&9p`%Q$}Z{fx9R5DQs5bPH_|h73$t6%qN!jq!B1{73fZ ziC=@10|80f1Yw93qb@NU+S9(46Qg-Sa`D*u3wIx#RtzazfZ^H!{#DtBqAW~)O0H_( z7!esMSAw%cRz;X&>Y*dFhz$`AXCdJH^=nYYc=B@DTu@T+(~t5M6$xYvz!w<~{^_sn zd@JxNI6OXiATF|B0Mdij&qKvhdG&)(!9^GZi^hTa=R00{cmMRG*Q7gg#C3x}sz?`~ zgB4mO(X~Jb58d2eaCv07y1&X$_P1qyd&w`)Dn}I^lBDZjw6&bLkZ#pU&k773}uu{vN~O3eZ|MxU)0x<(fwiey|KG*W|aP&FpA>kcU8_V%zX+Auruf z3BElN2YfGPYK9y6zledf+YRdivnrsyjlle)=1&&hnA$cUnVSamH3V<#U9;y&hw!vS zesEP|!)`xn{EP(~0T*wcY!`@eS5wfSG`2ebUFqx+URCOI)kmjaxYl-L=rK?6;tO?C zNh?2S6(+02ubgX)4-9X92B_fGJ2ID_69*_DNn9LbjTJi%-9MsMj-*#IvFhxBfz>T9 zoX@^A_%U*@Qn4ug78;e<-n?N(5WAvwq3U5>X#I`Gn7rS_!sV{4f`bq72Zy%!ik7x& zT+?g%N-ql&fsa)M41dk7jHPUCy<=MQ3Fjn1|(uo9Ya}B|?i(gv<1T0r<+W3@+M?Zkyxv~cl z9e?ks18Qlsb>3l3`gwoQY{B)C{k>M{+}+~0)g~8Av6NSWOnORLWd}@ zsPgSAGbIdK(fnNYt9{)q;ST!9Qw_nJqB*K;YyU+iLTx?RmA4=uaW0i8osKw`Uc(;R z5?ovpzjP=uC()6>+i|0{qZ4deIX9E{?CQgU<#S+NXZJVXWdDUP0YU_e&tPu_7q4j3 z&0D1j0B;k6C>rDXPs~LPEkw|Wc7q^6({Krfc{xk+t z!~5VbDw^OdG?IUoUgDg}hLI;aP(KZI0-NKKSM`lX+~e^RM^blIhJbgcRsTM|d2dRL zbU|my%e&W}I&|c+Zo!!3OL8VriCVe9O>n&d&5;N81XYjhNa99-_G4)f5!G6r`>fK^ zHrus1{z=CaKf3xO(bqlW7sY2GY|$*zoc#KE-iazJ{3yL>z6m**WxDhl-TIsJT={B# z|BEH8lnkOphFEZ9TS=Z{ddJHNWxC>}hAY|0wavVz|*Uf1J;GaAK2=$qni?5hZE{Onv Gr~dJIl literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/rain.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/rain.gif new file mode 100644 index 0000000000000000000000000000000000000000..d7bb417939dfe246c4975da10a5abd9096eeba4e GIT binary patch literal 3785 zcmV;)4mR;eNk%v~VQc_w0OJ4v|NsBQ=Kqw-|GeP;v)ccu)BlLX|98CqpUeN0#Q%uA z|97+h0H6P6ssBHp{{R30EC2ui0Bitk06+x)P??01x+w|7d8XA?a0M}TWo2NNf)s@S zuFBU=n!QzarW`;6=didaiXPnSWUN^hhvs5|t9hO^+Gm20wS3birt=J2%g8S%!R0j* zBbJ(`5R5Wi)}qmvPWe!NK!1FNh7JyVM2LKhgMCpphDA<(R9<)-GCLh2Fgz~^bQeTy z7j`^oQ5TaxmKS@Ljfe{t4T*bw1}m!|6-H4LGAq7IpPnQpB?HRIJiBl((#r%UJrpCn zwZBdtP9H`ZNgG}Q=H@Te(gY~e%gh4-0Rzm{^!D`h^Y_am(&@@z5V%L6hX`(M#Ch1k ziNrJx>bhhi!AzhDW9r`J+sKjNx_Kl2s#OSuY{|fk9#FJf7tt6%6DI?PjRg$_$W5SBUu0Qz#3R8XMBWLX3dL z-X3GU(7^FUV#5_zH26*BkPQXXVoO|=kO{`t9TOMQ%sYFHm>&n=h%#XA$f`G(X7BiC zOz8`H{*DsVCvRRri$0;wG#>QR2XB`A2oZ2WTd%DX!gUo|TU!dYj6g?7yw92{W;5-RNUiG4Nv(4AVC zk#RtYZJ|g6-f0l3k%VZb_@SGGytn`uHY3O&ffI_!(!h;Hs1-|&Q7mQzAVer~ zL>QvUkV_c6C6J>FUoeyjCL*HMofx`pbHfpU_)$o9*%?v@B8>dt00W7Xd1Mg_E=frS zL||}ECkhQmU|6Ey21_S)G-Jw!6+Br+eQc7lB$P~QxP^ta6+<9XK4lbBK9UlJkxT>K zL*-O>nW)eQbJ8|eW(gW4&;b6VR{%%N?bFdc`8cOq7bU8eYD_w{M%qd>mRQ_LP@$@c zfHql5UQba)RZ+54tvUezK(v}?9I(XYWEG_Ep%+u6?V-TlrdrW}N^8<;GSPtP#BdE9 zL|Ipih3=&G4=2`$!>G5bv4#yo3t>3J2}JcHxtc zfV1*it-n0&WP!qpQNW!OM_%~@XWXqpW2DV=KmbUp!9*P&^ettmwRWt3>RB8?nqA>oy3XVAtk2UM{+PGwtp8&^r_d4}dHuffGIdcG*Q zWzdw^!;u6lmZ2O5=r`GomNm^KCB_GqfF+U0@MP`gO1)PoFV`pDND23$V-ZCBmW%gY zehL09eW3pc6brUe$znDNQ+;iA?zFTR2BTQk_+EAirkIByQv()(rduQe7Lah5`{2YR zk9DD6K+}XB;vl;)7%WdKh=qQ}=e<9KiF^iB6C)b2BjEK%dV=^yI2@G{_oT;LWRU~t zaMw9Dj4yR2%#axf0f-C`Nk4A^-7}m38_;D9Y|z06rqq>z)MSK13UNgdq_>~i8LCGh z1IM~-6|i>yKqOfk(VDVgwU48;%U0_k2)OP*3jKX*UGf_b4;peDGp5QNl!`}l;PI-B z$ckBZQ4OU`LmM`pOjJ~oQgQAy8j2|Aj*{}@9{UJJtOey-X{^W^E5yPUuEZ`&0gxkK z7`Cj{BaBLXPNopR4o5YG8ble*c<$INBvR{C-5TZ4oRSn(vImVxd6r0cHY$kJV`!st z3bxXfL|nb_ZYU{7X|6NNGgc1-ymSd$s5Kp)uqRVZsZ=w)QWC3JgEOU(Syzf#6<_=$ zn+Y-p-o8kyuP8HX(TNw`T1kdtzT__Y^2BS_nX|b$!*n><1uKn1NTuPdpsApd1r~J- za{`qA1s;+gL_t)vgS-wd5!H~sM4AJ$?dmOXDS)B~Gsi{#NeN5K3mvZ$nbYkH6OjpD z+AipWCpl&@YzT(E^hE<8Mre0ZyVqMdGls=&3^JILk2je17%Y(?M{LRfA#jwsp>k#v zG^^Ye6bb{J2!IX~&_YW)AOy?_EH)jRXlSe@QjHc&X}znSITqy>+q_OUnGmT}6s?{-! zwkAuoHDP9WSU03*l59=OlIj3wrdoAOmT(I_RC%CkbL9c7x@a(L6Y5sBXCbOJD^uG4 zN*34Fb4H%<5{-hH$Yf2yv8qByB2pw7+%T|C;{4>FTwEk8i^b2{`05`tMT>R`#k7fa zKzXtG?nC>AE?$G#GeR30QYQgbEgf#CuU7nO z0~zjhuLu6_=p^(xmk5?&T5zg-SZB4zxu#{ru+CI*V55NQU`1XC?+czs3B(W*8Oy!c z3S)ED%>fLa;gWESYXlB`#Sle_QSxJ520~BetJ9Kh|Pz!@34DwmZLEf?d_QqPc zh!)SgNa_q23Z-XoyxDlN>qKkE@MtJ#;CgdyvK0W@Bsq}TMy7*ak*L6nEhwN5$vqx0 zV0{2UND(nM>e3im`)TpER5NmpTIg6aiYss#OtD}a^4z3BHz5#&MR-L?Uri*)@S4Gi zDhindt zNq|LYKmiS??nuMwOA7<41LtJVqG{zelo)n~%(n+z^t;@%pv9{PuJIo^jM@pDw4AaH z7WWLxHKe#AzPIE*e|zbJ<_@6)0?u(-#}>S=VA^+PO15l;Wnd(#PzHtn#KAyxut*)u zxC3&tfD!URhr#HC$il~(8uMjdQz;Kh(zR3wyKCsH5ZRa525DFmqD;@TIINeOWt-XS zbf9#Jt-$#SUh06F?!popdL+D`PKbXLcs28=-~${~WkzoK6??weOs~y~;WR-B@)T#S& z$_S}GE~_H7od!W7ip{09SwWv-8AiE{vw^ImI>D+3Z+)hZSHUDBM?4ijY(JJJcthJV z^_YyUV_0C_5{-=2W7l5gD(0YyS=7j6MQ;3p`>h<2HwJLEj-fICew_cClC*x5gbx95 z6y9VL8qrGJ7XuRZ7uTdQ?}QWp<9`TvMCs>ysH7|f7zzi7DfJLh!@(U{Q51qPSiwVANYdvrW+?H#SgF#}Xo~5r@|GTvg~rJ;M)-mqZ?sE@&7L z3wQ^FAvUO|6!Gy`?9@xel6#n>TRl@LuVfy*1c_$z37b*>f8wxz|3Wv_frgtHX6WZN zSZGEq0f?h05?F=|r>HI!qY}e{5y=r*>lKUvf_^<1FYcfY2f;Vy#10oT7HZ{5!U%XO(<` z5is$=W>F9)2Xkx321Jwtd$=P!ZdPA611~0WF{V)ed+)+9as`IQh9ZxVHuu+BS;ZxN zV0pJgJSHTQOi6qZNjM250VYWn7~@cUh7~r_Ilo~pt(9;+gavpIQ>K$?7X?KK6%7w$ zkyW6UpinkLb~|1+QoCbcgm!bhb~N3PCpKU+v)3En5Ho;@2g?;RgvmFBhZz9&ZC^%X z)8HfolMuoKWpBA><5-nr253waLp9SljZ#v2H5E{$P_)TK3@HNkH&--CD}+@c64wN6 z22f}AXHfuRBWYOi_>Dr8L=oi`w%02Kpk9W~om9i1-AryrK zeFarC8juYpB$OLtL!A>N+($G@u>;Om66QDm5PLL(J&}8;l@y35B4np9vo|Oh&}CCt zh+@G?8(17L$Q<&3d+C*o7j|-9Bu$lJTu^|M2pS$jm3Z28Pc^ZDXcP~pq<*sETeOsY zVOTC6!G`utAJ+af-rcNXxXTvB)SAKHa zdP*At$$eiSGK8lhWuvHk=6&;#b%^+WpE|0Biq$T}2VpwsAfOUwXhCVY5kK(4V}LSM zgsCyDs$O=tMf~KRzY`cbd0^n-0ac|o@mVpp+L{tZ4mxR{RdEsA)n@>ij~xazeQ{vL zb~aynW$5dZ)?nc1i1 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/sample.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/images/sample.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d8a4010c38cbe2d487433459f389e5e224ec2ad GIT binary patch literal 186103 zcmWifg;x`d*T&j<%El6<=ZgUufqnu2P%u;@y)uJMyd}++-_o;XY`Dlu z{AIf7n2okIE6mM8sys-3b+QW=c(o?`wu6E&tGxC~R{rJ=BR4c8)7GP@sm|HPgP_2h zt;iG9{%pCm(20;TKRYcQ9LtBaYPJ;(%ZO}8Dh)N4JP1Z~h6JjxFok8@B@p7m*?2#< z7Um-@yLL|W&2>+9r$;JLQz6Q)nz6AK7ort01Urw1);L>r%fXzy=84rT1HO})7cW9$ zo~N0iWQA!s`255E-dIHvH8oZ_wTU&AZ% zD&wV|W`ul*OmDgDmVeph4oVq;PkcZyquOXG67s@5e9q2(wu)&|?mU`FjJ%_$6(4|! zvewHGxsacfnUxkfk*N1(xxc1=Cb6r_K?xBfs`h2zj*_@qV@9|($`mFiUj4vuM z1`%H(sCP*RhdWt$EUcp$Y+zow{BH6xVW>KBupFw=AZ~g`z6+>*wW#`iyx9RTd1)_YIA1)taJEnZA+XcLd{uE zwdJyI@Qvd7$|gM>-Sv&VNY6NR!%#lM5XY>>CvBZ4Q=Jn@PCvfP4isH~-kcONFm_kj zLYN6w#*TQKZGvZI6OmJ`uy%<@@+J_jC+dmydt5beyO!PF@vgGKxw0<-W!}1axZ)A2 zU)Y*6yPl_@e%g9J$3Tfb{=C1sSsC!3{l69f%;$hbW^wDz+F=SaAJTJ*3NI&byE=u8 zkaDujIN16^zeo8@=0W7t3B;_IsC3V^9^2w>TU#=2Va&CacyBgeOejNCv7SYOMZu}b zKKuIXzIv-Gae2QAeb`udFZT$$%k9&Vs?a{o%E0YDIlI5v>l2uzl?X0Fld;fae>Q^{ zVRfp3mXc#1@=X#X{%CXH{Q9xNv!OG5P51PHnQcLdV@>_3z7so}VT@yY zXQwkqO)28bG;o0g5k%G6g7RfRJkQYnS5!dA_nd(>@0hLaiM_}wOQ+@bI z>loC^L#`wp*``jlNN0aDwveaQ$6su(Etyt|Q>fYT4fM43;dic%j$N_Ud%3iP!_R9t z>1UiRNfpP}jCRkeOV=3U#Hbq z6O&AXOQ_ivLN#&AT{#jG=j}n0Z{prg&(t7yvdfhc&s!E)P}0_9CN{V$!vApopD3dpNL_f_&)KLe*F872PCW_rB+0T^6bk(sAUde(!?!JAWiSXGWj zZV8p3c~en!>5`q>sInW>%NtC~+cX1=wv0c=ucxZVqBaz)6g8qqKiy*kp+)ZWzya_{Xzt5gd_uVwV6qb=^K?8z``- zs*tbO;?eHf=a;E2LpQ7Syuajf66P~-uRMieQx|aO*JYG<=}PvqHRgx;1GAqE#&POc zP76`d3HQk)4f(@Tw%d6%5fbsbZc2^W&RWxb_t)y4glGIye(kxOM2g+EwVbI%dd~6t z2pobbI!bfiGTBb9tYu*d>z?DX!t286_@GR#diRr4L#SiR#EvZ+$15 zZSF%OxOf!l4y!PT!RDEq`U)sBm=txbMn%8g=M50GlJj;c zER1PEowxpe8>uVA%0l1e_Ci{h7mews*1eQsP0ZyXcXu$x&9CbpT37Inl3p91WZV0) z2rYpOX`3&t#@K|tg*#aY{XtjVwm5zz+|%yqsrS9Y^3v&LcWy);)G@_(5tVmVteM97ju|T)3han zYhVr56B|38eM9$Ge25U(Au&xCOPrGKfvEU#$axow7(|BMua++Mw)Tb0#un!aejKS> zdqHsZxN@B}2ZD6Ue!)U!om7Hp*OKLN;--+US~Ix@Q+ds7L{%T(^hdn&LyeUdwDWm; z8YH7!h0Ma9pT6Z@>^h%j>wDtKZ0BTZHz7oRZvl@Xq>9gw&D#=WV=naw2^FOlYY@kD z75rA6{xWwpHgaK`Ye!w$ii)D6e8oFRt#(zqmKW!p%%9HZ=T8(uk>T~y=BpI`eR}!( zPa4f^voqNNsn2QeAx(c?Puc5-@Y$!&p>jdBL_mU$6WJl$1K@|}!{2vm>@e(YsJ*Py zV#hwy;l5dSMZpyV@im|WhiP>7w^1xU_CR4dnklF$D%+1A%*#PHz0f(04?n;n4a9Bq zXQV(g3qY(mA(dHI3B=JN&DF*rahV&ki9cX-=zUUe!8IZCLd5Ahe&{@CZzxk=?8ki> zrWW!6IGN*oRp-GQ*gVkeew1eEzcX zW2(A6GPJbRvm{o0YLodvKCUmO>hksPZl4((HRf4+5XP~oa{{XJK5dv?*@uIT8zVx* zTWE{T`hkF~s>K4qVe+pm1^^C_9XLqeypx3^JXPSD4^*FC2js}2Gd+Z-GLJZAN43;< zOHY9%Mz&;g=yHucy)|Y2VWW@7pa{>hh!N9aa*^w}DT|cMc|I*y6~Qa3I)$*=qb>07 zrHtMAF+@1d7zy558P8%zrCmZXyprAo$bE2#xtwfvX?f`*<2&;5i6DSr*@*iN|hvys8BzyG~SUCk>h~W z>ssOuqvs47yXPVzD{7925;)Dte_o`&=gw@2pq=xiGSW}8%v_}wZTm`tUt-L&c~KTq z`givF`i&Co@7oT=d=4}SU{-aPmB^pzEh$&m;Skr)wiH{hi)LWJ*I6!S_(;ocC`S|| z=DB|HkYqn z9f(LWSN{WtnW5{seut1W(F~Z~z5=TPemuF);a8eEOjUg9K^%w1yJ$cguj?vBYy-Plg&+SbNwCZib7^qf7VRYcb)SwfTlyTxQtD)?V>_yEA6?dNfN<~V`Tk)_)zS@ z_SqDlv#RR5$fkqWb!T@M2Dd~cS|dh!H$qgfB`ISPs_@bDExcexm(J+w<{IUr06}b*tVir8sJJl5nq+k zZK_AI%VK)F!`@3NJ(t(p9tI>%DtVw`=U5;VaG@p&rA!Ci+yrm{%!)GoYNJ4KZs^P= zUk5Fwly{ z&na0$PR;$+ak>7QfWVO}&us?eHn+%|u{@YdiUEwg^GaqmL5kEJ4HITneZ*(d<@hU8 zAI2B+f|=)FQQujLY#T#jDS{vAB=6Q{$!?{NZV|$w`Rggx@Kin(xVV#X#5 zDS*ygIfig8SXTKkb8WI^2)k~yl#Uw5*r$NPzI>m8O0z>vlQ(x0U>1+GUa{O&p+V#D>*i1V886RAr=L$To zwX9Y28sSmE)+Sh`2rLcYOhdr7oDpdw0A&rTRiREML?fJhF=NYFTPsc#MRki6s^-yS=34xHpzEn4^^|0_jj9`yaEJf0xg`G+=J$BNYsP~9-(My$r zdJ~G}XNa8hGM<{&e}hvrVF{lx&@MDI0}d^+f;dToDjBd#R6X=!6>AjB&03)Fw}A0Y zHexL+7s&M?NyGdyPX?ZacOFvv*d!VgwT~e1YZTPJvbZ8I)MFi3g)Ge@d)}d%WP#-HL|?a^I%uc2OqP7)o}QNoV~ZoJX`1)~*iBLGfrGGDRMNby+>& zVqDE5O;I{A97L3j-wLXeM;fuultr1?*QPm)*pIq zUN4(tswAS~3}@3?8(O0mK@6Wl{W_`VkBE;R<*Jp!(LA!3G@{@1m_?EGalR#Cyjqko zg9D0y2V6+JlTTp2YNw}dVw=hJw?0l+D6ro7=>Z>)fRHpcA?;LF2tL|n;;IEqnZc?$VXOd-Qj!rnmYo3L*a*I3 zz{GjM4z|mEHI7XPXb-L9zN6h<=~yI{b_U02A>!#^KDz&nO~AzOt8shv1#d0n^kOq*gEyLPGa_doNBX;xH}=F7VR?8m8wdcXtmP; z^XsCvshw5moO&OD)+gu7h2SL~$*sCVx_nx;hwt4JyNN4$|5kF43pq4dis!0^X5iCG zHcu;ursef+r*{SZRLFA$4m!C^s>)&CTk9U(Xf%$NmvI6%T&7)a8{M^nWsn|6ONltZ zZz3DzW%|R*k%?ugI)r$@bT;gqE?Y1BVX)r!QD<`aD0{ zfQ;7ySm7Wku}GqNQcS-`JoCiIMMx=l{x+8LHXODBhdFc_-JBQda}w&u7-?yQ)@NL- zTIz7M(80=`qldRHo*&r2AZ{V?VXwL#MCio}+D!2U*wO!pbfJevm^lB(c<2mYD)}_z z+{x_K&s_QmP`$C__*7rLNT4~HTf$l1X;?1!aLz9w?P66f#T6l^5e<1^U~Hv()UDyaj-AA6px%g}T+Rznbbam6alV6Yti95qWV5&Gd32a6a8x|4t~gINVFe z%;XaI;**n!KfSSPr4z3WCc96l9-8P`slrBWw*dDC1FwCIm@(XkPb4eswt4EdF|Uk| zrp(SA>i-cd*32GCtz*A(wzTo)P1Rqu2ajZegA7GK$cZEb<;UE$mG%D1>oR`g91ir> z(zO1WX`qmq`e5|!k2&7v#C=08^sIj=Nr&pKIJ}8leE7eabmz@C_HTC_&v$fVRPTM0vDb#b{>Zxz zd$(CCs5)NE^p^FKley1J^F`#{dt%ly3)TgFd%t9?JaLM18e*^@+c5VBhX!s2){7i7 z;^$MwqP_g_CMkCO+C$dA>;#VO{ym&hv#Hk%(aU}I1}k|`WOBg#4dsC$yM3NUeZ3X2 zM`*V9jIg|=x4`c^Cd;}_2nyg+AXvahLSl9VKJb~G^}hEH7O&0_^ZR)>LEO#5G|X#W zqc%;KbLj~ildr%7k;%^+gS`6}9EZ##>&=eDv53~0n-|dRkcd`@H)8$~zWv>lS!s96&e%9S zRx46^X8+aP$wJsy;>DjjtzW-*AJ%zmBwdPWp#1z$a6N463i*y<@wJ%@4d{)!1m$7_&RpXs?SYOaR&IQ}^ zu7j+Y1083Va}z~8G_*L?=8yGf>q$fl#l`+4cAH}3K7Q5JKh_eu{c!JME$^qc2}Q2a z+QC1zByWlD7aq>sQF@wok{+o%vR4Nvbg)goCBUxR3b)GvdvGoor3pK|H_s7J@gAc& zZCe&d7^gr)zRCy{O56`Os?dBtUCQkdDtpk)I$h2c(v7ty_X{x4cJV!oJ-Ruu5W?3O?vD($lbS= zpxDT9=Vee<43s=$`z%A^%8&5%UbW9XN70DLa`V{VWoLXSi-zadU-sCX5{T8hv!a2b zB_S*As18f_$dym-Pp(r^bi{7n$3Ka`7nInRJh;9eUDcPRI{ei2N#wx$-ixuJc$WR2 z*NVB&0|3uF7JpT>I`R(J|$27X$^{g*OPP&vta=bCBXx;wJ0NizDWMuZU(E z76R@8UE}Ks#Vrb(-bFn1G~$end?j^eUV5ipNy+ej9N#~Br3}y)!=sn$p;KR8fIljp z_ADS(zE9LmE7q=4ayr_EiVq(M_LRUoTOl!R&(BXyzjO|XDzOhk)b5>Ahn3~ij=POy zhSvT7S$lKd5ha{XI8OSGnEuST47I zVc|m=TtV`I96z!+-H3j)>~c7-tpP(obKNfNzQ(zHoyy*y4v+#oW+)qP6Zg-VKZ+f?@#T4@t7VhfAP?#j?S6|vcR(BQ z-OYUB?|&ay34KvIITX4v+tf{Xyj4`m}%m{n4%b zOP`nZCCiYRCzREF?6MB!>8_y%=F$gHT&dT1BraH^_GU{F{ono$dp>)YV{{)JT-u7y zDSVyU5Ua%XV&$qb7ewhh$ZTf4LR@iU+#p-FZ z2Smv`S07R%UGm4|59}wWq&g-;o*JxrBoKw|dS|Mu&2u5OtNbj0J=N<2UX|+u1_f^d z@BG`v27P)q&MMgy>47&D3CteiAd-NA+IQZuE?9cUNt+|`(vb;?BYZ?s`Ro|M^0|Wk zi|v-P?Bv+fPxYd57d&@utG;%OH5Mw#?h=>I=U@0jQW|a7_uj@A^=*8~e)~!BX_Hpx zpGI=LmibG^#Kz}VrZz3XNT1b1mo-0(z@yn2h3Yfu^^A1(%M*P2J@RP^C1e~;;Z!XA z;p3GoXX}C+A76W3d~fyUhoFqreWe0T=T~LI&XrPLJGSYvvT{s{jku3{*MUJ26uGz% zn}%1v+ek__Wt>KzMXG?eD$$QiJCxX51t+AZ#DISfY(@Gnq z2R3S5Xmdq5FVPX*0Y`bVCi3uaz{6)djpv_@ECSNWRgdT`Kg;`05s{ZFR@j?!Ix7>oa~&iusu=oJje z`n98c)&aV1B&D`^xg*rerY3yFfY2HHI5 zCC!^B8Z+FskNw+vuL%%9qAI_4=FWxrDjMSI)+az;Sj!WaPgsj=^r0ScPiNmva)jso zwg{^}{_fn{v}gY=8L2cq@bXh)FShgB?Kz;_hcPN@)k^qd03*szvb(Vc1^ z7^8gD=a28UzklN%rKxxQb7;t3$0^ghn1#Siehtq-+DKH~dBFMEP3rZPzLoY&?Jhs@k7Um8iRQ2hlgtD0 z(%;or%9S3e^C15I$xiUJ`mU0H{><(HU!XvW=u$0lyw&ac>nV&Sd}8QeUB=)3b|LIw zdoJI!XGgnv5$RNQ&ER;O*#a>!pBk@z5_e{3hRWV89LEh)6DsxDMvq zn*_$NzIuJ)7JuPcqhQd{##$!!E=yHn+gz(n`Yn^`q$I?^EYcnxl#NJn8vUh;Zw$@RR_uDmCY&`&+|fHEf8gZEx1=_QReu-Ac*J^&)H3%-ewBZAkr(+rX}3_MVu0`j*u$Hh6G`F}QMpE=>#mD!T`N z5PMQC>niQUlJkArsJ`O7a`IbU=EuP=Sk7j21H}a;KR;5js?{Y{)ufKh1F}BDBfG!x z4lq|dAmkw#l?xylXrkdxAv`TfJN9*z{712kbxCd3A;C=m4?NY6n=H>DMb)OVAX4q% zAS8ptBbzEs1u>y8Ox!?yA1Hy4YUV?dCqeXR00IMm;|6k&FdVfMK>}GK&*WpSJbXy! zBb8K8FRpxo82Qas!>xhc>U2!}Z`W%*?b7=({FqkB)?GU~KmZ~)%Kg6$w4QMMvC;iE zy5WCY**#m8HT4rR_2s`-RlBwfyth&T;`%L>^`W_9kWUiJRq!Y+_BPE5{Z{ldAVPb+ zc=J(<;dyrp$@4LNR2E4EOD7Do;KzNUz;2yDo=)nkp_^H zcADNQ#i-UC3C|Qx09|DOIL;^zXQ`K#02ijfOf)DH1Hd#zj$#apCXeIuChjQ9?Jly= zDb)#KozoamWnV2-G&KU<-}twrcwIBgy6A=$=eO&YtpVjNt_1_k>4H9}nXT$;(ls^G zr3F{G+NoMtuw`ubvqN=Z?18~?ORHuc4J_LBm@0Z(v6jBc_6J@3Jgd0#n5`q4{(*iJbQhZ5y@Z^)*6b(5iR0=f(01MAA0;Ob358#dAK)xf?6Wjt zwrs0n#9w|LWyMF@x&C6g9a9%%dAdHyntg*m@v`B2eOg+sHOEM9jzpV_@kD|!eQe1oh1}!gu1P~K9 z$e|YGkN_pFI!QA~@`y}hZlEK(gESV9?m13NPKUuk1|$dR7rA{0P_{wYlE_`uP>4c8^()J|1R?W(4W-3UU2To=JUG9?W}+KiZM97{$FP8 zJVm*tRCE!h(QJ0K)Sr8rMwL4@4t3JISb_*&!_Lu7n4(A~```c+M0A&A#ysxbIB&L} z=7@sqD)aG0fTUJ295jGlLb^l04MGm2N2S=}&6yZ!m&Au15DN~+=?*?52a*$y4^)pd zXN*mkPXL?s&)+^>h(^8K{WvU0bCPTTD>=9j&l8|-%nrC(kQfc%whF%B19-2!m>ft_ zW?q~N!^enZhM#2aZC&WJH|g9Npibexo-V5L%Zg`TtWjFJv2|Zdsef$bv1Kf3l4wW! z&EYBXPkLcHkCv{G7Q<18j$kbYD8svs+k0}+`Wp5ul{rI&Pgr^y@e+^myNzZv+}s(O zd*gv16@VINZrmB%4QqaA{tQX7z&C&hXbQK3v)(Z@EGktRO<_TeJHSC<2~g3cX@@AV z2HrV(In4xM!DKD|@Qq^Ik#n0d{zf1v+J|J;;_TCFLxgAMw~sl{0AW}ghnTSx<20T$ zC)_GT5pQk)z$0rZlI>~p9GT})K5h$*sTUb(MtB?BB>-_hou5JCpQ5bSq%X`-JT_q* zo0%KS(^wkx0s|l>oS}D|uFjmnyqW3YZtP4uGXMS){c8Zem)JDB@jMGm0Ib@%&h%jKRTGwnA@cP<1BRy@2;h!e86YhV}heRgKbTAHo#&?7;X9 z)kn%K)^CT7x>mTGBLXdw8F#?(9+hT=P!{ z!LUaPppfSECsxMoXph0Nu!DDomE2XM>;j?P+rB2T7RZO~Y|W*BY+=~rl4pXo^KCaJ4XDrnDuu{BZkFW>MPv}+7%3ls z-Z>V)gvcZ^ARL?XuL1xU0v(9d6^XJHV{RLc{#2YSXnXlT6)_Q~z=QlVt%Q zah38$8-t`xi%(Ia7=VVp4}43QJ<0@4qG)Iz4_}bCGEiRpW8ltX=zx3YFY;t=ru}mZ zJYqJrM@Eu!HA5?jz0@f$xq;88NgueF=P_=w+W@|=!h*}9n6v;Dm=Df_%k~J*g65lo z7VqpSbY_V3`y!d4m;YkO#msFtcLJa*-U8!}=1d+ax3)$KFp6?B!+{9LBk_lgK~Oga zWUF+=p`Rdq43u7lJobV@0Wb&kG>2oLb!UeBzPV&)P)t;6nBW0b_sh3}AcX{wq|de6 zWj>NV2fPUsobsXI8wwF|Xtp2pPS8Rq<=JS8$&R**m1HLS0EYKF-ztCVe;Qu#nl|2l zsO*HtLV0+F-km0UfW*gUiQR))DGmxhh zS}}DxIdnzu{cMM+a-;ju<>xaX7(Shs`Djt_TA^S>u;jI`CSMlfQgK;eGj7|ptY^_p zPC_rkKZF5Aj3Jz)k7nq{?hQ^z62$s!D>(wBm~h3s91M$c62t=j>s6u|Ojof0X%a*` zA@!@}mrJnk47Y11mfQI$o6=}&WJ{XF_bD+Pe(MD_@9$-V%Et3=8HwI(r{(Kl}S0P1#1KR1Mxa*td&AJ&m-X!x=rFDr8OQc+DGv!J$it>|ls zB7d~9sUhW}2x_=EqmFyZJJsW8a(ac)BR%!}JLWxs^{^yMIScG~@%l+zDiwC5!*z7~ z(sitRNCYAS-#5`T(INV+6>mtEIozGU;b74?fqul)*vMx?=BMGU-RLY}WvM$&6 z2KS@|RiMHdAvh&fW-63}N_q9-+Xo&C7Sea4cf;7T>(?{JwZG3ieDTT%=0*txnc>~9 zBADEI$SF*(!~}u$dav~MDWXB?2j}3h1WG280}m-}=Nn0Keeq&)CNT7&cu!;9w3 z`U&Yb%P?jnCS1aiy+y%kl=7T=>-l^1U{v@;;cq{iXlnp*q|9AmrBpE;r+@#44j%R`fPfB6MWShmXnO_Ze?pNHH^Vc%!}2XNp^!hqe8*P#Uy8 zYHXB))-q4eX)A9+R?W_10~T+NX+Hv-8jBE5bYmh>`3Onq#%LmD;#6B4!;K zQtD<`OmxaQJzQwVRT?;)FZP5ewR%oO=iA1$x_04Y%{j!7D(fv_^WAUcF{Y~#9j0qX zxq2m#Cmo-H6vI($S4Vlfl})O5;hB@SrR)mWE6mzwssH|>RO@T)G}K!at493RK3r;Z ze+2M0sK=I{ixkhKt&C+H3 z6|dMTPv2g-Wl!g>Wm})fH-cr5YaAJ`b(8mip-N;B}{0hIBm5uOieO&>5HLSpVFiHZY~rkrH&J$Sle z$`&p+cqPI+zqb;?emd-#cz7@v);#|24@l>i5Wwq{CpY6OyTGgvTrn@=&sCT0fO*hO z*W^=MOD2|)x86_l?Hb*H@A%62)rBYaY$M{rYiK{}{&~ z!gVFB>>e{|qDffgYKcnZoQ~EZAITTfNR#V*_R5%0!5Jz*&RIJvJU9%VEo zHM02H_s-?+Yumvq__D?t?Ijf{9b#G7gmV>i2I)aa(Q8n3{~JrhrV{pLlE!nk5+Gb?HON?13R{iDNeqp|5_2I~9xw^ILYBC-2RFVKE0}hM!MNT+_(arrNI1^TtZdOwV&L zOaa`2A}m!NDi5x5y1sr-d;hSF@Ksg(1<(4|(S~LtIo0eJmr6S|OTS}Oeaj7Lp3hSC z)raMjO2s6^hBXbeLq6FDEC~BEe>1x($P_2{vH0$ptH{OW&zi@)OF>C6Eu?dCLRbiP z-C0J=00rP45S58G>8)-!igvYrlp#i+e_Cac@5Oxj@^?STq`y~1u`3F#li~LA<{=-- zaUTq3GH+jc8m-%qjSH!l7EO~+#~9X|@>NDL8-!01*(Bf|Q+~ti)bwK3#*L!A2{8ll z5kx6%Wyiz);mFw+l*WK(wTups}akTI4N&E`YSyX6ST9nvT-!0~RflF!YL19>)tR;Tlk`pJa z?KPV#!wYo5S+DUltHW22`O?~&v5Bh*>2k=|6E=&QjlI>yo5S@20=Lg&l>B~s;?;u% zwFQdH$Ut_rTP;n3-17d{5+$ahMuCBE9X0KrzL~8~Kva0i3%Wg3U4kTua#{~Fg&Yqr zG`Tn9Sk9*o1FS%sO=QUcW3+5hA+6&U&Nd~oc<+9%` zK#80vo@lfstku;{k(I6ko_K%eZ0JFX8dw84oDmu1I)%4;9FwS<#`lHGnW}lm>XON_ zJ~!q^N(XeK$S2y)d;dY_&fLOJ-$T$k4L%oMpAm(Ac6_ubc7;Cm!SRcCcJ3@-SvdEz zfCMGpVb2+f_JE=#9m&-~?`b4RwP`%z-{Zaaht5;km5=<+>vZ;=@ss`5w#tJRUge-~ za`mjgRFi+zX?Q4TuE>2Kc#(&^qg@PD7;KMU*vUJ7)*i9)S4GDIYr)ax1Ol5)4o&}Z zs2*;a)Vy=$CA|VD!5cXKzcKklr}SOZ=Xu+3=`X`*FH$*1Irhbg`ChIG(y9A zT(fsKSGg><){^IPi1aR8z&jt&S1&7vO7iYCI(RYL z)&5R;Oc;o8^${-fV#PTMP}IHGmxSoFPc3F?nwsT^-4m6cnhUYNKXdmUwN}aB^2?a% z$oMg?*1dKYe7j)&WmUDpnAGbxz^iPgPQ44~mlQJs&ua^Vw!jw%aM*RvmRncqShbn| ze*9|=Q(RgNW<#dqN}1ESQ;E#~`>XKKbSU3f5jt>OlV(}B`Hx~v56aC_@sXxU3;c>s z0al#^#yiW#Zx&7c3Oeu6UM?Ex`8twz^1&XKi{Eb-4j1Jeh)MnxI3Zg6X;k)P&Du!* zZUd_k!>I7^rTdj7riHij?Wr4Kg6rQ${{($1{FZcJ$;rh~|F>Oke-ZTeUA>cdj!%yn z^aplWeRUHo8mua~BHa1zf1D(kEBf78>uZ~xVHu-Tp#+Tnko7InKewJjpVN!RV})U{ zRa3EL?cpVpHJ9ZBmy+|#%$;0qdQTd6{+q9)!%ihTM!pe0WL~3s zIp|m!}Qp@JeH~p*kH=q_Fi~mY-43;jRhR^&s zDr8U>Q57(*0GBZ9*`D^ww>?W36&rzLuw*Sjv|dVbm7eWop|FHb+`TJcJ1OBxO8&(b z?rJJ|nyO_4VkcnOl>wT}K$z1klL|chXl*ymR8U-Ud$<&agFl}aZM$jJ5|Q8YDT_Iw z@@-a;MIh%RJU=wl21%~AN-S~H&ht#*WOaMd$x+cCHC^QKLhXdtZ`1N)kE8nc&12&# zO#vrYhYDAyZE%bwugTs0+Wh;~OkivBdDGdVKp8IDweG47*AodV9r}E;Z{gP|oVqLk z^}r0&K5Bpk2$W<%vPim9zIAmJ9TM0~z+19xR7sg6s6K*FCJC|o$)$n81Q1pnnsp@h zXlE`baeX(tuKg%uwkE^A2L9Y=C51nYxdaUU`zmaHv11O;;$1LIt)D(B@jP8UI$DT$ zvr@XcKm+hh?2lhPOXrXjkuk7T6Mf^$;4Cf7JJa@ZHTF7=S<`U#3O}>@O|w+moR6{h z_egh<1iIYjDJg~pPF#z<_;!w6wIh>n)qL8D5{fYN4s{p%}e?k+%9>PD$) zPBnr0R$tnVE<3yNY0TW0XKKK;9a<2!OxwZQgbx=ft!>QJ1cW)TsH_zoR!?6kVe#X~ z9kV!9vGX|dymR63?O7|RRR)$vGx0Jt_BFy^(kzv!pqRAcgf4I=gR7+<#&tFV85&VK zOVv51N0pFnAkgUu09RCVqIzaaR3V>uYMPXDNB}vv*5PTOcZskmhdtfGlK)9(uBkfd z5y?iG1Qs0n$5V8jy(LwAco~HyU+^R;F$38>(Of&^TWKRQe@Q}T*18t&y!lp9X97v*u;HR2md|XWXlQ zGYljURaa0rP!Rrh(=W?@LBnN|nCy$_j&PhlOHI@kBmZ!0xk<5~(!~0ddoFxr7bo zX@s<~WBz|18z(g7>4o2)RvsI%f7qxFtK9imvon!38_1DS1z8L)`&jfoNbs-ELdT0< z#S1vxLElp+tI`Px5n3XSqI*oLYP~}2p9FgXp#38P{OwA#kec7*3$nnPGK|O>hJB0# zGNM-%@(ES2dbT#l!5eP9Ky(KT8{zMmuhQkwV^U|Miq>e()6hFXGmYmG21@|dzh>$$ zK;Wl5LRid2S&~TJs7(7P|0=-4nl98c45CulZmyb|lnsi5U@x2=-=tcQ|6#|ELZVzQ zWR+j+0q{%>BVEmgEJR%s_`^SC$@?|rH@?jqq)Ep~1~*dO$1L}v&d0|)|Eo04p(!l= zMVxAL(%ev&k2{+mQLi5zOrN!fISOvod0J|K8i!Iuo=$UwMA6w1uHt z3>7B>`%_V#WF>CpgR)^IRQsVf<-)1i#W8?-URAT}?L-ttgWXN2Ku~XH*)vhpd53BN73asF6cZ{UPVvxd8Vqdk1A_32n4!tEkLOOBbn!~{&!A^nI!Uwyt5*d zqgyg4JC)n#`#LQZxznmMW~xE2@B3Zfr~_`6mRQOIY6Y9I8UD3b@c zUOu0ma`4cl0fEUI$sv`?pKsvJ*l8FpPcrHg3B^9lO&|*! zDu9Y++oAKfk7{(Lipc_v+9@Iga(knXkvBs?Ap5*XTBK=McWi`+0`MRd3=t$S_7joa zEu^l8!$Xwqv!Z2X?l{Z=d+ zWPP)dtiZCAC0jn>5h(&Ul8kLj3`gV&w@H+-rpxcu+<_?BL$BW-H&6eN%mRf;`21z4 zL!F#U!&J8Sia`EaD*rLfQtJNhVscZEY)fKUW+K!9r}}}&I>~252lJCfXh6MhshnTv zT(A=%=9B#*v@ksSqVjq4e`?|H2|wx)6eCk(I_Rh1F zNNc(xq&mTPSVA0lCnbk}X+Q8XhfR&PfM-AlM?(=wK3M9wU?8HT78|~`w6Rd4>XrBQ zYtLI=clO9*M!NmL55KMR+DHRFmr0s2K zVV>Mk?mwM^r>TPf<>rT%%Cv%tXf1L+>Gyj#SIh)cRj~p@9HmF8lXmi^jxlB! zTYo8W{wL=LIuP)Sv#nu=E*fq1NKwS>oDD!es3_iq?BBBRem{3+2JlX>QjPNq2C6st^K3%XG7>+>rx&<3!VMjO zM&SpITEjZK^eyj;_250c*SCgyBRUBqIvZxH(p_fG!%fbs-_xffL%{k~&6AvCSr+-r zOOM{$41=YqTx6*GLkIVN{!l8inO zlKpM|7!d8n9#*s&PSLbqDBrh$UY5734pC<+QZmK7MhEJ^=r%g9LnOG`KT+PIThbhg z;e&ef$RxgPTV0K8+6pV|?%*igs2|_zuSGwFa=iCRjsQEOPhW4#@Qb6UPXE5zsB|G! z9dCGP{0zVFDxAkTK>zB^XhQsP0VaIQMDHQs>ik`un|E;HRK8A{{_cpb7On9E$VhtM z=ccFE6Ut>bbNcs7eBqlfGQ9bS=5cf_*ghCV4FK6V>(Jj+52o?PDd4iTe*fd87}0n{ z(v^vHUN2zJ#j{9<;r22B&THg~5s)Y?Ps55HlQZ(NxmDOWJ(3#wJiCb4RD^&Nr)y;2W2S1lIX55Yw|nbUA$z7BQZdI2 z6GHa=Tylht!#EBigJ)|vk~|7p?zm61JKym@^7gs&A=~?GNtJ!d%N{k-ff|*%=+}c` z@1yj`P0ycsc=>nmD&C9o?m-ggyy=cwV8Btv)VkEDA}Z){&I`McEnP1j)o_R=KNjBkSRi6y&RR*>S{?Swm8%xz5$dcnSAPX}Lt$lGuIyFVy;S~4 zAI`KKQTn>$-8Vz{Cd^v?z0Kg8md1LHWSso)@+DJq>pVfmEe4R!q0%e^y;4KT zloTrmK~IzL04NG;FwQB!sj6{bGOt03$NtQ|d}EGxvz3gUQvrjz)w>8`b1dlZ+6Y;Nrp`BQq>zxJYV?^FLz zPmFGC&a0V$d3jt$4o`-Yu-#v-gKdVfr^2Tf>H}J|z2nkemmtE*q<Rc`CWG?Zlk{tngmV2yp|*DbZ$Ueq1b5}Owe3_mC;-` za=kh+ugU`TLH0__^uLz-#U+uwZ4S0ltcpxsIYXeOwnMFmFmLFL#t50L-j21Fyaek!+Is?qvm%oMelMj`a*QBwO(Mk*m2%7w^;doi0Hn z(y1apj}3@Q!2HQjq|Y#nYbKM|pTy*TYi0Gbcmuf;Vusb8&Ao~MU_k-CpqHGT>Ky?n zcaq=F1kGHMh#Bv7iE7jxeX(>R2%t=+X*y`*5ZN&FixYOmy(2fAd^#-cT`Nuyq8b%K zHG@$nGM|J`$W$3yDxT!Zd@A4t)qvt@J{l|^vtd5t;Re;HF7BIal6RDMEY&k5Fg0yc zrbAU`8f+4DaVXddKdEV{;*Kf#clBNWac?$0i;%!G14pswSi&lTBeD(uiUHN9+}V zRKe^C5Yo(FCVec#_T{LUs5ezJ9g%TuoSv@SNkE^B9978V27Ws+w{uhI(wb3YCKU0RaCmuI@(c=s` z>G&ODp4+cYG<=q$g}tv!AE_7y1bEdRi+iCf`gZ~8%m4?5nAO`cB9wEseP>3@)4Uw0 z@Xt|AV(xTTv0bXCbNOrGLT0Ag{WXpYBqHY*R+^>{?O{+H6c;+3slK3rv_;@?B8&I7 z2#A7b=X^m45+KTbQ1{{sb!iEI|KW@H0Sol^uN}%_Rc8!el7I;mAO%s0-efwV>j0e;-At~p-*Ys zYrffVP&(srJ#mBpyR|voPSZN)>;AdISzm*n2Ie?-O1-l&N&Lt1575kZS%lhZnm))A z?Y#vxPG_TAC7-rnCSCl^-gGH#SI6dk38!21jOGXAlxwLcX~gLhpy#4d5AxTCMcaUc z*J2XLMDjSV_8zo~EAC+jWt4)neN5>7G zulSzS*0z--p0!7v=x;y%*X56b z`2b37RfSjL4xt>-7UNGdyHID_5E9;9RJ9{L6LENj6{!(drTN-)fQql=kh@q53s|J{lz+k^gUdcS=}DkMnHDDrv|}SS5*mjhCHSckOJceU7d+qA zOvx^TaLeVwzka)Cjb_|KjXa0H>pKcRxT?0sYo*~k-}u$MDx@haj%yBdoqF}Na%qg& z)3)stL))qRu`n~>)%lp-a^1(t<%!1e`)d#2l_lPS1w!(FGxFEt;=ghKR5)xJ>bn9q zV!Xo@{hN3uw3YIXy8h9PSHl3t1Y)@!e7m#fBXhOf!My*X@>+$#=*M6f;-z`KKZvMC)Hg{5^r6I9`gyzLi7B#lS3)wnw2{{>Tgqee>=$bVW{wTk?_Nt- zd)!+1gvy&hv)km(+sU2Zq804pQXR6V_McmH3Vnj!19gkoptQi>&HPl=KRI%#k~+2@ z_h$6Ah4#Y6e@=F44rRTvQs!XRSP5m$Q{NLHfi;TKutNYKspg>#6EiL2o+t%H_#r5x zJgH2cxK-}8RiWi!z$6sBLgPHA1mt_--7-8w3K2<%oJ{X{yHk=O#+1`SJ4N`@7wZ3ey})ZZOp#bnNe#DTr&^bf*u5u zamCWG9wJzl1(XG}CPVi2GbLusY}+6=eCy>2A^bCe{N!2TPyVdFVFiK>DwI-dMzgt2 zMXCEI`e#ch;t)-!+a{8d{f@#vTkK&WQ`s3J95!8Bfex-09P(2;YePeoKdJH*KGsD4 za?0?&U&SUtgv0RXR9C>ttdi6|0f z>NY|YiKpRR$?()9{V%kLTv?+JIDfdJn>MQG_*J`fO`3G?fq37?lNguTh zIRMp6P-YE?SbN1AAd*htD}R4Ypw{xKE%!4Os2?drphvzmIMl*aiKplL&e)2t8AyP& zHw|n(Z~IO6*>bVtD_zbKlV=5n7Z5i_Zgkt*mp*`fe9^Al-i-1mQc->mzz9Sf0AbG%dy);o`pCt}8! z{D&;wF{=LlEXKzaoJ>UYve4n)cPf8gBa^&Opw`{lUb=6W>ym?K)@vs!3$jGXIIg=ENtmBp|?za zSt=r($~#LS7G9A5K8ck5Fi72z(S+R_+|U%RH=VU@$;A3Kk4gEDz40BJTA|m8n1Qgg zK-tg5n_UVY!)o<2iE!Z zO)wIjn>0jOE7X#5tVeYdd6iMEx_-m;T896bpWpE_@l(9(5Ov1m<978^j4Bh*!QvdL zfr^=;eQV$pIT!;g#9*6ZSC}aL&brS>q<-$9hlJ#kbD=aqM1X*fH|tn-PON7LD3iTg zxEfTc{PSA|YpTFpCQO^mHzFaT9nJTZ==F`o8%RX5YQzr#pN3eta3<^rmG^*1oUzF> zGZz*iz7ABD9{g~uc0-Jor^`{47}r<@YR^cmjRqwld%;D)OSEFqcN7?799>ef|I^6}|}nVY~$q z(#+zJbm?2cn{GCeWFV%nwLpm)=m-t_mkHR~Mk7p(Id@|YiD*|UDjs;kk|8qvl~;^a zU!Ntw22$ZfP|=XN`{J{&syVjiwE_ag**lEL=#e2$CuY<`y_Mhq;5Pj%(>S2ld?J==iU49dwqPR9##dG;riWf!$ zj$vqLIZU}bw}Oqh#ZJStYXVmiH%eLUQJ)^2wYhM+yH;tWo?454$7MfF&v0m1qctA& zKc{vRqR>mvVRqKJyEx2Za%vMY#FqvcV}bA%A+PHoVvd?CfeJEpAq^$&XQ7^RMcRw}|b zeO`AwWtIkKuLH%H$1OfaBi4}V#4R2c!j~rIGYshPL&ObZD2$Cmz~Uhh!;%oVDuG#E zjqzuikrbn}uT zKc>2WjV-)Q)&Cj?oL9y0sJp2$#T=gC*7_9RNuZzKar&fjO}|TO+Kki(^cT?6x%VMJ z^}k|WFXe8K!eZCa!*kDfr0nWUvO;Xxe|ss`zlt-JQ}cG-#@|{d=Gh#-`>vjZUfe)& z=Bk_@Pz$;JV+5lfe&O60KJ)7BvN}bM1lpYL(}-#oh^d9#znv>jJwshZhJE5-n3|lH zfR35E#jOgh42!a8B5zs9LYChTVm%i%62u#Kq9t}WAYgcy|9}iC?55uX{lB^gp^-ec41B!VmX$dwS=~5W>3`5*3#V3$xE?^DQ+yD(; zjFl|N_Mn*tXPk0#;|Pmmr$)Sd9Wg^a`YI7^D#vUG{wE3jC5snx64gjJ|K%GflLex#Vw-vE z^h_acz;o{jwt@t>_A2kRgb2()B!LK-T+KtAkt<* zEfNNL`mX<>F!W)cFGpD8VzYe2sAgYIoS{dudp=yeb)`v&x$0v)azO%IL~W#h?{itY zU3!~iOF+^xe2uf1Yr8G3Y5?XkDj*NN%z)st>G~YPXk-efal- zlJ=r~i=>o~z$?A7c0qfk%{B4ydQIAhGUBn$i{u~v&T53hF#3s~+LPCR_)9vAj1Oml z*|hm-8$*&E^1!d?+GE}k#%7fgXCCmgax}neIA(;!c+rPRCgU91hhomkgw;d75P`|A zQ;SN+v;4RPh**LtUw$%b1SsSMoVmqVuPd3+^W$!2@g|sJUq%L4QW1n^X9{b^bP|feYJy>u>82Ta_P^Ii*7AQ4x5{&eOrev666 zthVHivthobV9g@nh$&?3KB$=*aElBgm~!t%2UHTV8%%uPc!NEQ<179afzuQ)g36N% z`9X@Ce-#Imc!5F@Mw*w#zNI?R?n~#}+r+qDE9%WGc63 z=s0w5b*ykeq&i%`CwR17|H7BHUy;1XcEi}x{8!PNWC4w3I?=XDp$o#X~DU1PgRu(2lhf9-8Nt~{P6 z_8@3FRFMJ9e;)L>Sj^Z&B10;*Leq0>`@x8vU{F3ORVh4VHB<0!dBJ13y#x>rW>;_a z%(N|e^^uHaCuxj`6RBZ};*3mhayw1RiE}#I;2%pwAM)ApwnUGZ%16)6f#9qoN=j5@ zMgFKMb-#I9!f_IaGK6p)OgJABYcIDSz5$wugO@^=~Pgfbonf*2R(RA521??+5 z1(1&Ghh0dpJ}f33A>tEL9@K82`zm%yveN5Z&E=OBy^KhpP)O~qVDHepJDp3xeXmk0 z{Yo!iS?;UJe<>U`#A)pO9f#yb<%*mh$G(Y|v`JL$>b+92}aq7#@#Oo1u(` zTBLdfmXEtQRx7>uP{93jc-|SKp-f_&+6d{gReN9DfK&>WpR-ax5O$~J1Z?6sj2Fu# zU`o=RQ;p(@q}^}AFTK7cSIbYYIt#56`n1PH6Hv#?R1IQEPNtR#;B*tO#j8BNLTXdw> z1a<9y7!XDz{w?$(dH)FnjY3er2q5jsa7`LRGM(te{l4E6!Yi53Wouv|J&e*$EtMJ( zw%zH<=x`&BPJ=6(6-Q+K9@I>UUC{?%IdKA#bcvaBwM31U`KLtrnqDHD*HPOP9>;b2 zgW#2%_Ll-Zo7Ml7_r5;gDiroUGe-4%gG!8dsLD#r!|;Q$3Dtk?JAFBSY+0x8P0{aT z5NaDspL|btE?&GofBV`=Yci~kF{+wAjJYnS{SFBgV!mWcA1s`WIKc!MQOE!-WhSrr zEc%r8E__g#g}?}!tFA@n#BJ1y3-nXDFk`6W<-oIv2r$it!hxw+c#pbK2@wL+ z-J%ecQ)~_updeh#BvG#EDT;1Dtit^|f!Ss%g4u<%*{{K+HdFI0NEqm34U(5qEpkAB zV+As7(uhIa<&S97Mppi1uVBCGzpJw!soVP(8_ejh$pORtl&aRvJO_g7+LwFRbh1|+ z?sk``tmjYYe*Jpp0{c-%d}=N2j}IAKVJ@<5L^=k#`jmK!`v%>;^UP{ZEleEcvPaCR z#IF;@1s+LfUrJ84V=@IWv(~!l0f;p+7&%19Rg#{}-Sr}hLpR`HW&nz#<`I6HNRt|4 zT%Zc)i@#pQlHHJXjvvjT_dPAAi4Iyjwu*6?el}%Z8E}ox`Q^BvRDpbC+JFEUt4>Wi zWRBvb@d|HOG&nPrLyj-9ECu5tIfg5Sadc%mZzkW15`7vRn-7o*l1OtB8L@04G)njs zLmvul^SqL9!jb+XuDr1xZXMjt&ak7nU3`skgW4>4ckC^1QzhMC0Zw2^g=9^Ex@-F~z5i0s!E z#T2v7L3V&?BECwz5T7*uz)R++hZrs}4?;3zHQ$9_zw*#lY#eac$kBWz(;mE;mJ<-F zXP8pjqfAqtuhIP^Jk1Nq#NuU<%TfV$#V4OFFjzM`VOv8OhsJ~3J^Xn1p z;fJb8;!KFOHpkwgAELH+{d01ZR=CD`!S@WmHw(w*WS>SprDyzJactMQlkhQ7?q<*p z|MBL=szc!??7qX5*Gr9aRX_Is)n^IE37*xTq|Mz6Eb{vN#eM;k&5HL_=~T1eSa-Pj z>$yUJ%b(1Mw+AnlxK$al`6rL@Hd8-wRFF`Z1O|`ZhGpL!W-=m&_G$nRr}=6S`r-2L z0ux5KwS#LX3}^^3>o9Z9n6*bn;p6Gs5W?DnK6rjfo&|P;zN|su+ShK?-!c`9VU(Ra z3UASDkg@A7^xolMi^;c&Epa9|&*2rab@%D`4fmmRTH5ZczlUy7$rGjEqFuJL@R#%B zO|P{N`!r4kI{0^_JQ)i&pZQenF?q^7k|R^rs(zSnP;A}g=Zo9#S6ui1QO#9V&aP@4 ztV~16Z)M)Jp0qgPq~N;1LCBBLv0;z$*O%t}yt+kE-K5dVhCOS4{cA`R)lPVEY7! z!mODt5gQMTHL(N*lOVWGx~hwfYQLj{rRDRH^Y<-;MHw(tSi-JcY%Lp(Yb>Ovpu)%IBi___)p7ThP%9~oJ zs$l1rcaHzu7cLDZ9%@~)kn^og4SUW>`p7G~5Gi_wa_!(lCfD~XqS_c4vW?pZPEif0 z{U#i}2d1cI$rWf^L{?w%`UUqSSUg39-z)YgpnYV z&2Pq6N(;B7RA;&qcC1V;q$~F@Q2#pNA-k{_jB^4>)mtY)@tvrvM}w{esHFN?iKYzI zv|`Q0<6lNY9`l#jOx=Vp5C?!nJ-A4%N2q5;v{e}cG>Xy?%<})8$^R3_q?Ga($sCku z3@qXF<_QjfYzK8%QUyBjLk+BxU{Gv+Qyr#c2oqO_seVI-lTp%lz=U#i+^+0Nkcv3(@eO-mT>h$0KRnh%Z`9o1|iD~^>Qo&rIQw{KH ze5P^=ta;d7B`QQ9(Mm@-_(~`qWzdNnq9B8ls{5^~eqVxX;V~w7slqPdysps75a;HC zt6F6@_ZNh9D zo2GI9r5B}AK(C~RvDG87f9fENrUO>%kg*w zFd+^s*9$?Y^X{;lWEd0Rk7T&}6SMTs^$EXj7Dab|i5EOcEC6)s{=gGz&9M1q&_i!z zM@IO=Nppz<7Jof!byeA?2CE4eo zN9A`<=qJhJ0{K z#1qCKi@O052Ym=er^PR`%M2uVckrHkBjtCX!5Eryhx&KdPjU}{aDhk!YXl3UuX)_K z>K!7Op}fpWaSoKxnGlb5;d2}YgdD)n5DD6pLD?1pR=%CN1QwC)2xnbxZ$%n3S_Enb z?NC5g)Fx^E`;j(|4;oT)TinhIM9rjCr3_YmoV@=;&t&gJeVzb{Ey4nPvn!C4zVJN~ z9=Y37;Zpq8)v0Xq0n;yWN0Yeu=z-o@r_s5LwKCsF8l)M{u#>i={$;h6{IEq0NH7`P zk^1o91Id7hisNmX^cHvSthpjhz#%+Dip*Y2GZpedd9!>ReN@7M3+yEIe2Ka7Ebfy! z)leoN5+yFRQt{dQipRA_g;_KBSi&%^X`jqWG6a^=HE&K!2gVN7=InzIf%Qila< zSb$c*h|7zVz2Rram*K8V!1XTSiGt?EvrbEkf^~L7fMWK|f9t}z-xG}=5v#4De@FRR z$vqTdKzEt3c`MPGev!lZ&m@!w;tIJU1j{-Aavgb(N?OG~Z+dW`|hV*taa zBhHXyuO?gQ{it*g88x(OkAODF-D&)nDeo@nwUHukuz<@R9A1V;S#^;Vz^mwdc{jUO~dG+jH;zHaZ+?=ul zOjt8@rCELOCaL}OcNc|ZCT`N|y&{(-5$LW{5Pa;_{JF<=4fkTNcTdv=PO87)I{~sJ z$1g0Q6*}L#A8{;qs3XdR@IClaFxiX`hZ!MUIY|hw;g9~LWvdP?X&YmA`UiPEy)jiV zs#8yEY)X#k{xAILR#nqStLDop&9`b!mAUx4lYmzV7YZsp74{(5-NL!4sD@1Eq|~8$ zZ)cu%qP_5X!y6HHuk$pg`sC^m=#B`A_hdK)*v9DZc@m8;0-FGsFO(kWzJBJ+!VVA! z-bBPLidGOFxX;Shi-DRiU}cxFY_0k52$sw9%+98B<`QAnA~bp%0p<_LRnEq~$*FQ% zxOco!jFHmvg()sgYaUUkHJf(lWvG&At>fCDjV8WAo+LA<+-1BEEA_Gn&OeNv< z^}Uuaslu1r)_x+RyESG%ewZEM3`@vnw6&KE8k$Z?s0XP-{h4nfdWCj$LmVAvcojh{e0FQNDiW|NfD4GIh+Q?pd1>>|j>Tbj6l3+u`tnQ&V z%3TYuipPc0s&ZQ%cJH$5)Kamc;qgLSe0{$IBHUqm$+fte&OIh9?wd=}0CmQZ@UYYs za4*ZW7?O3dUp`9GivV2>+`YH+X77G~tY~4vva<6`g}wWI&Rc?9 zC7jQdTBBeAFNmlgl{)9MisIxVspoA~m@#p=c&>WavhdpkD#qD`!9z_>Wq&C6z=~ggBKgtw)nS|8bPV-p+tunZEe15zi#NIm% zGo)Jh@!G^RJ<*LsM%sy!^>?vPoAj>L7YqXl47gP8RKp{2Fab*#wdOy>pZ$WR0N`RN zzyStC9ss|^zJ0K(4x5t?bZK#ozQUn+kyEP^6}$uCU;-~s-iT%Uk{lfe9``>)zu*y5 zNq(~EdtYn{ce--!<7Oi&Sa9vz-hbA43p)86*K3YD*IoTR`ihZ0w4&pD@GZmCvlYy9 z=c!Ysuk$tZAnB#c4^PU&&}*i09++hSUIu`X_L^mx0=6)vl(UW5t!}qsiU&4TP3h>r z9Ts@kP@n6O5~iu)1ybYuy1Ogi1GJK>`klom%4v_19W*Mvc;CI+UYfDjS^@9QTlGk@zLpll@zPWIQ@L>OWul(9ehRktT7fHEg zy>0ilZSHoYL$>D|PCa|8SiG;u)gAsvm6p(|yxG(C&nfZmQATn7V*bPGL_X~AzjGgM z9=}$B{*ez*0HL*akD?AYiYct1MUjJIher(1(?8u}aH*;%m1w%wSc`bXQ$NtNb@$g% zD$_OVhDh%aS}x`5WRjSuje6Y;P2KJHd1@V@V7QiQTy64dT%2`fXZk@{e>kc>N4w34 zJ+G|vTvLifKT&M^wY9VQC=u4v5t)*s)S)nn)0$xtIxn#l*7JCp5oth)t!9gK!GDN# zkPL~^l&v%-NUxS4?hLne=fz-6Kwta!N ze7@cGdhjW56qpUnQyc2+;=~*h{L+ud3$lbNX7v3HYL_H}9$T|HU2RaH znw8HA&zhA5dzKI))}>+j=1s|RxszEc#BqfrNG7EpkfI>eEs;Xm3ZaejDGGWeX&wm9 zJ&_n)!?=gCV zXU%UzZ($4QX$-@O68+e$i)#>fGZ)@_Upme2-`nXNbu`*B+xvWSsy!>g7+L+q=l=f2 zz5j;3cR%@Y>fbJS@%V973adBzRP5DZI5OK9E+&gfn7Y)a8jvnQ!Ag}SZjCT*`gCM` zSXE1%rCT50*_QidvTBbT1KH|_fZouzueQ!+qE|SRl8@t+p(O+YP=_g{+c|>yJDac1W~A^Wq(c^&z9(nY zQ>0dgg)El6m8#7Y9ZE2Y4XX=9Ppw)C1~vmFxFyi;QhN5oow}u&HJzIiJpYB)DMXhu z6}dqDuc0mm@VN}l=K;dwj!i~}fiC9@1qLFjiomGA2$7z6 zCkR8Ww!>1zVmMOtrztf{Vc({>gJpEsI8d5yZa|8DI2~cltW$dW z6>9s#tZ)(FVD%Oc(;zW1(hO@<@B$)s5+J5Y0%aTm>>Z6h`|=uP2}<`?p;Kh!omc?G zsqZ5SB`qhUkL5Jg2kN@eNL6<#UZc-yU5^TboxiW(;d-3~i14yW|HiYTsL06NWm&mC zd!8HXJ$yst`lFk6hjKCHDL0gz(8lWpA_)uJR_gSQ=pPcNuN_`YhELKiMQk*G65F59 zo&f~xW6mHmkDxlo{Ja5q>0LlZQer-pLptOUVU+>V?+B)qxIe^5_DF0Z$D1!>x}iZU!y_eO)bp8g2ulJ zK)RjL`5;CX7lrjgjdY_?z^i`uN+|3E+N%fEiHGewoY=eVYltLZOsFDmh4 z>hFkESlvhEFV?Nq!lo>M+Nvm}+ zcOIiX`z1-8kR^N^XAusvoOi{&TFY&aspsG~33FU7jRW0F zPdHCMdef&ywAZ(SN9FIzW&8`zTYY=tzcj^jhUKk%ms@z}o?Rr-zi5 zuW6S;J>#}}%!ahp$=oSrzqq*wT0LWRPknjec0;@Hcsz>NTpgic8~4a9QzaB67l#L zuVkCRe3S27%~J#vE1>t~vQ|9ZKq88MBy7Gz;2!%`B}TOen~Es4v7Obn}_rP=C!MBKopgEO5bx|N=mM{ZwGi(wjaFHp$-8UZ~jB7zD{ce6U zIrgtk_)tF8+7galQcu&s7)x4L8E|vi+&(Vw2>VU__%}r@zZB13j^j6|$W2MLEkmA|H#NSVY?Zq#|59Pv zQ$&SiKa#j)Og5r-9Q#_4r90!)f z1Kr6~5eA5J2|~%Au|w#obaUwV_xl>8{CLH+gU%|`IGP5$qgHNTcLLob57ym+!v27d ze7*M)#Si++G`#?Ce5l>}MS0PWxBx0QDWLbKpje{uv%}$ygdwr;nn#7GS*qTDOkqPR z`}o~X7c<(68nTgRLd9)`~q_ctyt$mgHw3k zR@VX9kWQ-&`I()07$^B?1{ltvek8I&I0OV>qz8`@TxyWeIs-PukO7A2LykO0#b!v2 z!gb+x$Wv5Gth~cb0c>`+Stx&<&+CM4YqCMk3I0gV0z`&!!vOSm`YjvHKVc?9 zmBL$-YQUX)e0ZR1x~1dtQ+Q{po(-t@D^!C5KC=sjk^o=EOpQOOzaDw_YZ zZ#M3illVT_l%{6#ee1t}?RC4bNdGgSmik4j)1tF4Lxn+8sW$^21iXHVi0Nt0!(Cm&N!mL)+ixTnbG(`c1{rTdM2c__RXC_ex1>sB zl4dtabFaruXo!4_26#pE!k9sD!%b)CC{jHo$pD@Px+58SW(lkq0^*>;tV75CJqN=9?eAH@kF|mm6!hSIK@UWd{P?6M zE9G)z7PO_4RRQYNY)O{ayGaDwge=fS5E0bWcMYH;XfMRZn?i+6EoYYjy$hY*9uZ{7v>K85w1iE9$TNW?SQ5_hBErjF_G)hQn9I=%qQ+8g?}%`9U!|h;>4`Smxui()c)UkAFBak9-@!=HVmBKaqT4Z&HF1vN(Q8MQ>+~wW!XqUr3225Hl+W|k zB$?|cpYY-w`krRaqMnO}{y-Y0gZU6nsBI6HznoqMQPh^rP0MFc0(OawV z-PP^qV%O(-?nS@S#DlfcX_B2wA5fA+!00@|dbCRM zv7Ks<`*T5ifQ-1fkFtJ;#hKF|7e-fN=X`vSPj{7H_CCiS7bx0Th3b;QZt2w0PR=Wo zR@hZKIwZ8E5hK|RasnY$1>mZzNBw=MkG~%F59RW53L!}|C_K&4*D@&;!dBRQx%pip znw+-RmR~xY57(!Qr^3taisVZkoU=in5eDfti(iie^sWKPh-YWx1y{8Z#z$)+jC5m; zFwXoW*>F>UcQ)=zboR869_D%FaUITi|8gaPxey`PRvrh8a)!lT521J!-P( zC8{hXNt&AcCKbl{Hc65ZabBm~lM1<(7;(g9{}nA?lDWX$4pQ4R zZ6LhO9_{sFG)&>Npe?BGa&)=SaWMuFv+EtJiH)S`9%+Xh?sjw z+||#?sv*m|$*ZbxtJwWdO9OvKdao@pAJQs%WjUMcR878`Q?v(%>c#Ie7YCrwb9o6v(+Vgj_Y^E1#j=k6(`i@m!mJDDoIODGQKuQQ=5 z`hOJNhhI|r{|9h3f`F)~xWU|-;>=m#M04OCS>YaOp_wb|0&Y{onN}Lk)XYe&w5$uR z)U2$`QRW4;u9X#*b-jJd`{VZ?oX2^b^El`89?uur_q*eIPe(5aZ(Dw@s8%rmHcsH6 zKBdB?-47N=ahM!DCsj;<7-Ji9r#AZ0d)#YNx!^GULKqW5OVAV;fQW@~<3H?>^%n-P zxU-z4FIp_E9UAET(4Rj|?F?DxQzT|Rbh&+f!KBEClx-)qv{3g-_5NYy_I1y*UsY2! zJfA%ChHt9fkAZQ(OTh`#Gk?j)0?zASbk>I}RKD`Qke8O_w|qZkp?5uv3o>OwVt9VN zTOOMHf;!nlp8}7{*@7~eMaV}5`s&r6!4FR-p0j)ppZt-GkZq|+zC6LIgZ<$veRbc1 zwL80A%djI}b#Y6H4?oqJPn^H$l5`HaCq72qV(o`Tz@=N2rGMauaYs*nEKqjwG5Q|F zetJVXlb@G#YaV7rI>1b(56++b2)3inNgw_&eVY}vxqxU|0qrUtJwTP?R#av5VHb zwW(eH?Ll?H&^sO+UVqT6A^A{>(N2Jqz*w%2{03%qE)YS!;`ZD2l+i-h)xO-f{N`hd zH=|y(O_f-CD-5J8jFex>=v}^>@#Sv8YwN!c-Dx&?HeirN63O|-wHQ?jJ=paDH4cNM z*lDQF$Bu}mo`2cO!HyL;U>%e6Ua+AOe$2cV+Gu=z=|i%S>W^235re#OZ>3D1E61|0 zo-q{FDCk)~+p<|LeR=C?#d#Y2Z7JkN#07aT6l!ZAu|%R1zTZ1|yfzmmH*Q1(jR*Y|-Q(zR;-6}t!I zuydt3|1EF1B))F`HYQ(_*jDN8xZ_t?x>}Y#t`Ix;b^2W7HXVi$FSaU2X}WD=4( zk=O@Tug{!mkDPUKcy3TH??VV?Hi?Pb|GKJDZ zAEw+AQ_@6=hg6(a?#u@qeb$V&f9UO(@428&T#}br{N{!?>7xkj%%6=NcDen0$z4rt z9ed6Y{Coag&hY&r#nXvz-qqE55$g#Tldr!-veUN(VEbU+Y*A7Mu)X?^uc?Avg8JS8 zK3RS@d34-5h*V!lRA2RcAJM^C`9NiSI8ugBa7HX;q)-YUigAX(u z4;rLh>!bs1_doC(hpeSKp2GPCq_oEB2l^rUf)1xny{(Ha$eypCtwN+6W;~DWnMr+? z+tsk|0wN?kHDQ6*LVVKpck#tYwBkYHghu*!>i531=V|Wrt9mk(#JaN?9H~l&9fz;H3IgKBNM`l8rNy!G-{q@Bp`KyErARq8b2O(u`Gb& zL{er#Dd=N@L-5Wyy2($rQQ1B~-pfu+M8G0A;U!6rN<2pqEsl}q9k1DR#T*pX2Q)!y zx)}uqKC4Lo+u8^AmO#DYM0|tc^f8aAnUe-JOE)*4A2_)6C9ZK=I%0PVpvmU>kR#}y zwJel%XoZP+N#Q8m?E&p=CL)&31}?L1g;Umj{*u*o>G1)Pj&LSSkJggb&mDn$W|RbpSu#uHmbJRwMS@9BTzNCs*?&&KUK1-&`K65lYhvX! zymWzfDP{NV0wzss^3jv_Qwp%#Re6bHI^8XY8!z)Kd|V0)?akzZ^0l?EB^2v7EW>Da zww@v{55vY>Bz)}EgX=Zljp&hKMvtG*_jSek_XoZ(d9$bgN#*tAl%?_4);dbEfOk1R zA(!C>tIng^eAZ;3liP7zp6dN|kXa~SN-Co~B7$G}Z|>xQBE^v;8+v)7K|)8&ly&I* zm(;u2Z~mE^PDeC&gj}QpZ1uSTbdHw9mndAqChcDOwK+zpP4M>btIzYs3Y^ouX28iG@C^xZF6FEu ze7;>ik?<6zmklL^$qs95N7LLpH8R)<@)?rypM%I>)itc`n%KqWN)1W(+E)+E*vLU& zyM_RslX-8M&X~TDwE8R016CzyM?=N=h)-1`)-M(I{@M~4f}(}5=M7oNIr(dZ1m#Sd z#{i$`I2oyTrAiLIumOwB%+HWwd&J}5tEob#^9wEIn5_C=X9Kpxa-)Bco zf;SKqz0Xc2zAAhC`g3(Z?RJSqoDdMyb1Wt{C@OjIBGhkSJ38oPO>Q5j(4!?iAhtIU zmHJ{K70ZGa;vZ`ETzj#r0vU}>@mNTEZC;U~(SiuXKYBNaMFx?hLAT8-KFL`W*hc`a z)=af({>Bz+yJYOq-WkDaiJ^N@EVao)9$Hpuol|qcemS89Y|(;zS5(lov7gegAl3J8gjlDg-BOm=SA2k55VB za8>Um-V08NcW!|Y1fZ0OgVUI)!3To8YeXLx)oa2ZKHRj@;7u*(8~-yeynR#Jk9w*= z4xswtOGwAU?&tQRPD9#kZOVn0IwXKp)xar!-?xl6`Gnm*j~yO`w|#b6yZztvR-a5tLs z)V^w5K&37XKeYR6qH?bRZg(T!`NhNijC1(fwTdgpLJbrfpAwK5n>$CEt$dC==`;P^ zf9>%Rly%svf^= z)BpRDOBSz)R0z6}*4}P&C}-9!KK0oE(Eper0dC9W0>zi3XU9(bvi)2Qf)>itS;n(0 z%I=18q05tZ4i$Ss6&SXaXCUJ$I^kEZpYy{>A4&!R5}Zj9PF6NRIXZujx!c}+f? zobR;s3QP5l&^QMNA<%jjo-hMVAG`MJ(GA%u!49xAYfRNa zLk4%H#Rh2O6671|nr-GW265H%iwr?1)rQs&r82oJ{9tWCAm{aT&81L>e2u`oMh{8O zhhGk-Tv<@oG535i3p3c`irE3|OP~C-aY#7O07nR$sEU|v@Q4V&K{Noj0n{uY(KbSc z4){kjEg$Ht`+=na7@0{4K+6@%djY^bfjn&Z;RMwiJ+sJyCAmbYqg3XuVQ51_iZgT) zoyct23W79kS1aH~5A5)bB~)86b9g+`t{|*_2wJD^UenQMlSX@pe_s)ey}}s!RFG3 zb|QSa6v}KYeRE`nTk@r{L_TFn0#C?5M%AU}|9gY{Gu9m;EQw?kx|3zbL;#qOyzT9+ zJPi8r31CXSqVqYxipMuhaMooDGxTXDuUrs=K(O)LWbN+K7oAC!AU6IjUp0K%u*L60 zJqM!3Hf+)dtRGe%snj3Pn@MQjh#Z6`% zQf_v|xCk0UK~l*8#dN^lbc(gH;9>2OQ443HP4iw^*{ggf(qy1Fo4TyPa>Vlm{Cu4! zkA~Gs4{E=h<1kCrX54ouCX$a?Xt}&wQ_C3W(M}$D@W~j~qpB05Yc(~HEeafXRzSLn zuZsL|eZ}xr&>_KF7YMFF3^ndrw>hP(VU0-=xau!5tu`npCUhbnKWfx2Y(gR3wWCbd z*)MXL%2av5Cct)+=_%Flz2}wTwgBazW52rrjAuOz)QFM#F3`w*c4yfA_43QCw?G9N z1vxW&lw6nl3IrICK^(j$L-@Ux(q8<_GL{fw0v?O@n4f9c% z_*39~Ks!oHOHH0cp^8CgKl697HNfo%W`>QxkO5Xq0PCLB%9_KRo}W_R27!K-ftFcoe8@8xSBx!ZG3S6r+cr{$#$7?SzSLUBgr*cvB`^Nrq2TC3ydr) z%O{?o-Xy$UAIl|Ce{K~iPszEo3l?~;+&Vw!xIEFAk!M4o%aEIX*+Tg{J}Ox;;&VV$ z#F)mv6nj26PMa*dekf9bWlD96NzT7sOZh9TTuz_mGoJ5-^Jcr{L(8D*Gw%b%E+J@- zn!wQiWz|m<2kmebPG-bl=6Zf*wHZ;STiC_$ATn>RS-tATm+xL0y{`|K%rSNQRI-@DM&26afAYd)1C`58_Z*K)(^x#)QS2sJS&E{Q&(>v* z*0PkrU!g@E&mzR|JQ`*FtkGiyts6NHf#0jW9Ymfxe?I`)wZBmA60VLN%Uu`W z9hvwza3g6dlq41TcW<7FM2vO-7FrkoVR<~*pu}*Hpe_kV>{J0-t^fEBQd^4N|`t6=W(>V6{9Zco(c`32ki!yJr7F_ zt@CnyTDtgaz-y>W?$VUne-}MmQrd6E$o63``jMCiEGfo#l7XT4?63cKEg|ka$bVQL z6?CjV5JOMdc0DTN@<%WRhE~LxHTqqgD<;_LDi3>P7~aQYS(U zm4Ov@Qm(eJf#f>%sdvU6NRx}l#Sf9)Akz1v6OP~P{&+}W)6lo~UTby+rEl5g zrrId)QG%$Wph_Q#74P+|ek28A_!WEF;0S%n0X`7flLz2gk}i8IkJ46YHITq3M3Ust zajm=H2I@{jq|3w`U~eh?x~WYcC^XLsN72@#bkoP&hp9}#u2Qs@r1m=s7I(b;Ty4Gq z2}_&`N^aJ5Z3_e>>9S@fF9*FZCqA0#`nTixp$nn)gIwx!k_w63Hjh$y-*lwR>qaqC ziYm~s;s2HuKsW%SxyK$fz(4OjcB+yu-Qp=I&0821J_jt}8GF0WIw_0UHpQb-HH;T{ zKH^@ARr2aTVQMqBf@;4plZ&6`Ez>i^WV1zP)P#@CjFSeo%7|cY!~v_Sj~EP=AFX`b zVwEas14`k0;AWZDH~((DY<-|nA9prQ;dNSZ1k(`@(+=bt-7V)i)x`JC4PG`%ZJ34j z8HMvGf8R|%-O98wz7Tnrw!Z8Z8C;?HKX+*wUuJjeTqLy|{%xeJhIOD2Xapcu@C~EC zk6P`tjww&5)?7#Z<)LU)3awE#sC+s_e;yEX>3#e8|M?fp^rpGzXir-%xEIC@IquDr z=*YkFLam=n->)l+Wf|_20fFmKlG|ej@m`1CE%S^!+p}o{F~d zrm2v-kBmxV%arhBIUDbC9A(|Hea?=Rc;jUHUnRFTSjAXdg*+)N;$NLX3W*~Ltputv zoD653?Z^17XP+71dv6w-fvr{AFPB3kWP?rm{-LmjgXzcq>{sx;)2or-T*EiS0xfaC z+mkGZs|fi9b?`u8?tkZzI^im_qiUI{yGnmiHhHeY)&|wc@gy(8A0)EZ%qNIZa!h(Y zFdu^8Fjuk}D=$0T11Fvf-~8BH2*NopX$=Lx&X+Gnq}yr#bkjcOy;v0K8nQROREapftp-Fzz3jhHRyFzl!f3EA- zFN`(v@+P7`dz;Ws@4lAJr`YtkDHcC-`YljcKDE)?yXw=b@XSrYhL6@sK2EW|_=tDl zv7P!$p@RL-`f9eqCW}a8(a5{h;qDh_2@rL0Di_pc@-el#^Px=}U(J`&)yfCsA)Q~2 z(;Rv!bME>H{QBF`p8*l>q!Z2c0{r$U-r=bk10rzL#AHF-$6S`1S<7?Cf@9^zlY-X+ zUqjE}Ymyfq9VrPFm@4lU@1t} zQ>sSt<5!dNgu*~)bj?u9=^_nm@ht~|E>h}KX-}jwjHJer*(vf45EzS{9W2?HUqE%2 zH?M3iWIp3@lpq2@nEcff0(@8<0i{%STZq{p-4i9JPnN#FIruyOsTy zyWVMTf}XSt>WkT0Y?+><1^K5XzD!b`Nihp4b-8u?4eqi&!-r~H6+3Hqon2VP>??rS zxgSctSOqxjQ~-TeE8G%FIat7c0Us2QEkwJ*-gK3vi_q~gF`V}#MtWd4AIvF>{k4X4o7R< z;jrCPa8tmmKM=Y#cN>c0X&qsAAmHq2f<%5F-Fh3@6oNJvUoa_AdfmRQ*l5 zM2Kqx1~56xp43%2tz^=AX~qZ%EQ1qrh-IdMi1vcuLB@L>ZRfB={krGeR(!$FmL!K) z*iujXPxzVVH};OJ77Ow{vsPJp9a&l|xrxC3?)yn%o%%o0#8Pdk;ba4wxU2@zLM(HKQ}l*S&d4#%+Y=bdU!Q!EV3r@6I?-a+>5Hb9q7d-d%81b)02 z_6!85s4RlA{V)`}Fl!U)=BeU)8-NV-diA%-mwrY#bS2d~RI- z5$a}w)w$%QCoZa=`e&(Y^RH8Ei*+JkH1PbzgFOt6VM=f%R;yT}9_W+c!b_j>G>K&* zH9Kjp5I94&RTjDV{%^U{pQ-)BTLUf|6mfB5{qz^ARsZE?eDyw$trW(#mxfPTDv$w)WJO*=SR)hbRwv5b&%uE=6t5 z85rhc+b&NVFaXv!VjKgR&LXKi&GX%i^~t`Xq}X;vsT4NOz(7L*uv_f$mUX;&NUfNd z|4S~2aDUqJq+_AZ=hr8Yg$+Iml@rRnr8N5Uex$a}-|X2`hxa+hY*d#+ zx?jQsUF5QXu#HIpn(j%s-3>3DMb4Y`ZhiQ1>=#wxf%z{Ixakl&>yf$+C}b6swQ1W@ z4Bv43l2Xu8I-XjuU!55K5c#NXDe0j32aBf<-qgMRI;HpN7sF5b6WgGI5e>4$&5n91 z{-jfYDH?-oK>GU2QI&C?tfd+W2=-x0$?H$39)F=_Z8c+``OzoalY3|5Fvm0e;w2E% ztUzn0CEKB%4U)i`zl2BDI8$Ut0NPI;vk`E=hl5JS(XBJ&NwE-n%i7CfQ{n_}MYM4pc8r8HU zLL~rHMYExY;@e6u@GNzY;ee7?>`Coc#eF1?^A72@BeJgosE2QM*{c`}a!ka41IbQO zwV@InOQBl#{d;Pew1;#u&k8360B;o+*)z8ECl9CT9Gu1}L^#9k^1*1C9Zcq{ZGdu3 ztkKZoVP&eY^hoI%a&>0}naTjF;UzL@0^Fg7K5Q`X1*Bxdb`(CNI!;#-{OW7^^)2?s z`x)gniH_KekMDiKl$Ka3-gYmi_REy+M#`M7XIdqUVm!A+XXkCO2ECxlZ=taYxU5mI z9J%9nY&=8Zkw3xXI|m*qpEuAf#I4La1aAtI<{3>^y8KdY{+iSY`nb_DCtq8ik5=H2 ziO0s#j@S1Fs! zNr<7De!`?=fN^rF_qN>)#10dapH@>j?KV`|M#Q-=HC(nbIGr`*40mw>h&;}f8NYsB z(YP2ob+Txmq!#9BgZo+oKy_-%c`4~T{jY-qNy}gJF=&{IX&AUFGCoe*J4rb(n4#}m z?*#X(2R3U<*XTAY?3&fDdP$oHp)?5drqNaJu20P71s%?VXk+23g@g)XZlqK%X*66I z$t3;i)s&1CTC^*BXX-yyH@A85aTo8X*TdFnxQUAEhBnMFPFxnL9<{k1Tc39P*coov zNTPq9N|v!=)BeR#9jDsy{mb7DJKSMlO%!?T@15 zRJsBhA$S@BmY;_V#5&nH`5{8$fI5lA-a#}@6bocqYztPW+Ff~PRP8xd4Y5`S z!!JB*%4l}ozjgSKMT;5wXU`j-6W7m!i-Z6p+-U@Og=Vg#?TozOfDLGL*agmx`YbIqc8sFBu}jm! z1;nsWl^`|S;?c=xDJ+{AK1juB#J&Yvpgbc~$8d(MK690jHxs;MI^!-5mR6G_zf1c_ zBPwz?^L_qv=~)xAOifao0^M&I-teZHS>Gg61DU|ESta#O8Yb9*?j2dk%`glNft7R{ zx@Q&GWQf_agN+Cn{s(y54qFVl8{BKo$L5GCE3+1IES6l2XkTIUdZI=&b*?uzve-G0 zAbm-rq^@9f(7v4oR2%&IVHhtEa}10aOQo9rRFHM9V7|BbsnzVN;c}ngLSnY3dE}Y= zRRiMPE1n74eH1yjV{YM(OBJKF0^|lf9-UrMJ#nWuMa7P{@OtI$E}LvM9b&QerD=2i z?^AS`ZqCC0R@SqrRz293->Zd><<9*4GjiX<&i)Z4v&B(ETWpj?+}E-T>VX)B8TjH+ z5ITIy|U$^_2GebPzjI zeub~{>ruyNvT$06oS{c%xFTkR$Uve_22koQ9sRBu<3gdqVpAuGYRf{Ys+505oK0OI za>W3-b;&tVFcMgVDQuN9jI{N4|9=x|qr121iM?U*c{u|^6TVD@2vAQ^pA!Mj3ZLM( zQma(^CazQk0kM8OrlJcj(JF(rv{m%gimLqR*Zs297HLLl*kts9xR_!F`CowNAUc~a$X-FMd|VBZ)Sg%c{!ifVV-dIrm? zW|QQZKy{Nym_FTg*4ep_D7op6dHPP<0Ia_Wa`oz;XNz$Jn!>ICxFXP6BdE3klzsy6 z5dE{CnP)wP@8)8V^tV#aV=8wsW{TQOX%_+JE?;q82)oVFu{@@@$kj}T8WPy1D}^06 zE}k1HPkUIq!5ziZJ-k+H(+DzgM70i*j0+Qj<9f-Jo_8uR6dJSZK+j)W+j zRXq8mEr*Ul1HeK6n8Zho2$6+pHeMf-$EL9>F(4N{+>!~TKI)mW-9#VE}AeEe4b{`L_IYDRPsCww+YfJ zdf|OgU2TH-tnO)zJ+Dkgtq(>iA0B-*6L0xs>X6&o>$BBh^Yiy%(|_{EX2gl)#c~%a z%Y_U7YxddhH^ai_UdS(hZ}kN~hp$n{Wo}C-1u{bXCXUgLXi0v8yuQkPA1r!Hjf8C! z#jlc;IsC`7Km?Bu(r;^@1tidQ;|7SBT!2~|0q;Un*5H9wx%h60RFt5Q#79Jw{h1}4 zTH(t`y`Pd3qODorvN73BvdShM9Tlk?Cz6?DL4HPRX0>oNnD2IU9WD!j8KZ92qI6H^ zQx3)f5s5x^dt|-PG6%gZP?mg0UUBZuQe=1| zO26osZ_#@f(opq6e7 z;gP2?(L3okNds3cy4!c|CN}mxwwg_Bysfj(V{LlwJ#I$F@|Uzjck`Q{WFS@a##kKd z^p-FhV<%wnwTi=rwC!*8^Ot>1b6KohmYTVav|NSvfe{bbxaNwe@FxK6U!hvu4ciey zcmOPb4)n_(V-&)>MUWERIFbuym!+kkk4a_{;M?lS9bk&MaGUJBbIhxhDU?Dw;>hiv zZvfs!YLsy$=AMEzOQGso19tq3MsjH1H$)FhAvs@dQY5o$NeD10Lw+NivRNC!lVktW zk?CZr{g5!3ET`b!~I?+P<78z!okj zl#BNPpaWqD0HDj5DYMOY>1L_65mZ+qcb%f&IfNTK?^NS-nX0)!rM_l_@6@(HXiGT2fWvm%tzPp?bpf~?L07+f4f2tLb{rSqW~l1CRF z$P|GhHl#Gjf7idS&ec|;iI7o%Cb?(&R0Z?JIi1f>sf8m|?6o2TnG|Fm@NBeP$rvzH z3H7O$78z@l<(=8f+HWlHf1j;H6&n2{!kRt~4X_n*4fc;kJxxE)7OQ^9+>u?^lL2e5+r|!~+GJ)-UHr$8w8zaet;CD<4wr+LaMP#ulm?nK zqfJFfxoVg}iN`iW+lGl#;evQ%jFg=8fB?KBOek9bsqjIwlCrLx(h70ac+7ze+2c!x zxsU+rWOBPuvyDtw;o^Br)fQ&9ksO-IO0Zm)tKh42Y~6JsXgjfi#X=J~06q|(J>Ps* zlfJjuIy-0$C)0$CLLQskcxXWl%scQ{5Q0 z?yjnyE-6|UU}0XywlLQbJ?Db({bo8;`TsSmV`~?NLB<&mQU0<&vP9B-i?_8;ZRao{ zef3HkdxmH`W#f4`l}{ELtxD$>cWxgGT6+KL`PIgzr)ihWY@D5mxe5urmGM1X7^>~p zj}2$qor5E7X4NlKRQ_eR^h0n$j9amkOL^2cOB-0MR-}ol8|LV_Vwq0jTVsGU51^zX zR9^+yuF^q(b?c;V6=Sk;n^1k7fEi>R_$yLArlS8GOO?l!;W6K$NMKEzQ`tsETQQVN zM7|)XS&L%A7k?bT(a@xIvBjexv)y4G=5~FgK>0m-hVOLG5-}!}-XOA02JSk<6GttD z(m%-O{)l(azjvkzoiU@G{Ynn*##9F7;4oZx#Fp3m9zAkwCFIeudcFdK$?X6r8m=oS@3`6ax9&F%e4$j&7~FH6&6J+KS~Lc+Az9~@kT4|By0b1JyhYV z?JOcrskXEkADp8XH0i`>*6JE{R&`ms$Gp*{d|~)qmh$+y#HOD4OZ07`Y8+EljSpB`*EHz`1~>Bx z!jx;8@p7l-rEp3n6q&LxXC4p%Sqc@ek6QA*O87EI zMAEwwCYnBEC6pOps%fZ{{*U#NTXI5B!ML_MH3!Ofr^Dx1%5D^CNkDtdn!zjQ5PS?$ zDoM}DLoG@e;7NuR5=GS7p83FXeVz0Vmx}*)?-{#ZjD6ul|2Eq+rlJe$T?sA~Ie*U~ zC{2*JC)lN<%+7HZq~hS{---+~ZY6nHN^b&TM^QLZeJ|$4rM^>Pg=V?KMdSC-mQ6BN zNA~;-cU~U+N$6(DB})z5Xq{-NKK^y&{YYxy*RaW5`<0b}ygwwo`-h+YzliD2i}hhT zs>kDCB#=@eP|2DE_?JJk#yzbtfEPMoiiH$22%bZrw-Qu8a6vUJtwTerW2e?hJdhgs z>AA@D^~+!=)>*BM{gbbi*1VS_1iK00X9=DMh@WSj5EWDYk1@yHVkjG!;H5e%mn5UK>;twOm}ij zTQ%5usDcw3V4&b%O!N$4=?VZZJS2PG#O8-f@;4XX3(Kj+5HneeLnW+va+EItRSOI zbS(G734;SwG#&4Yw1gy^XNB*cw+CH_v(bjmjFcfT<}DP9QKu`)IhO;kb)X;JlV9e! zR95X(wSlLu#GVW2S?DKI!>13jcw$gbZP^(*3;dE1F02h>RW;`Uo< zTkly*8bYZ82u2_M6;VI4>)iF~QQT6CkzZ8l-=_jh)C~4icq?aqoNulNsnp*JvdH!J z;ItHe88EvdjL(3%F3WDPjbUYNZq^(QZs%dUrgz5%I!6?pZrwR=2W^f~nu4{+T zRBR*s(SRJj&Fx!KEl&SooL!#DYdOYUJ0*V-Uc0uvw)qjMpcg|RgZ z3DNEPHmp%0^|8`PKZY%mC7nOjl}gk3C1E5%qy}pF zqiHF~Ch z@9t1tO}%Y%F!bimng#qIb3;_*oY(oLcu$l0YKg8Jeyvn(pjZno`*VhQK&}4m*fEAq9eHyj*jW2%8P0n2d2EHgsozx+T& z?tj$EO7NgC{IPo59BtGvVVgC9II{s{Qmw|ee4)#sG_(OaCQsg^IBgbU!%mZTwZ3U7 z;zQ!WBN)xO$vrsf97Y{e!zv=pC4`tSrpQQ_kw)O{`AlG-C%^LGfxBJhOUpsJvUzvK zGaYkT?rK}(8nGO4f$sVBN_SIho=76-O56*mcwlrwY5SMi7zn18Dv)pAWy>9!ST#-C z>VPP101;V0c;;Jo%LnuV)lEP4Da#g3r380;1?@g$xf#}<;FF%;Phv6O=RajVISFZT z5>lCV-O&KJ_AHy$LsdL+?+D^E?azpsrwSo-u<7d6{L07fh%81C%7kp5=KapWl0;Tb zP~_iz@444!12WIdXi@Z|I;&69o*mgHb_Yo%9o=kE?s_+FRX3UFa|l%SYm2w{V!Mj5 z*i|!l>sC-`vq~@>XfPjBptrGk+|$k<^FCNxPfe~exaZR2Cux(n9fX+NR<_|U3db-# zjsChA?9pA>p}(oE>R&vH*kI|CSuhcOkxbNC3R^$=4T5z4yug!&mVO`1%Xf~j9L+3c_? z@X-&KMcQ3v1Jg;e@R-H?{nV1Z{6WcIUn=@^Mj2#FQtvfkg3_$atfXT%pkr9rKV^}c zN}+n%?|)D&fm(`ci*9o*b81p55Y3w*{%8pu}U>u}9wDb+d?ioalIIO}FU7 z`92#F=FIGxq2j$#^^|JP+2;+fUv)INdiFI|3?x^RjHaLsAAl+}S6V;k#abYrCZ7d2 zsiEX&PKxy6)7a4URJMF)6;6>nYDf($R~{o`vSxK@vU!PgHZ%g!V34Fzrb0q3P+%8l5i;;l)>}?w3jqX2}|0fl2})jMPK| zV%7ml7M(!*%e!=hVm%HXO*WMuU<1RHIs3ld4?Ba%QZ{nosM!yWNFn=+=))th=UNXn zKO+u=@F;3WN##IDdI4UWe8RP!uaxV@J{!@Didtm&=iaY*Onl$s{yfZIj+eTk%|+A6 z05u^Kn6>le&j6Z}%&J+wg9{lpJe2BRrv)YG8Pmxy^VDLC4mNaXgRh*UQt@L%*hWD% z9(gn>dUifyN7TGYr2N~~Qc zx>`1V%vf|^r-W<0a-1=lGWU7^w zJeGOtW$?-TtfGDHApuzc@}Bxtt3p`zI1}dVAFQNfD2tCeCW^FqL6FbF9jngXJ{7mY z2cM(ncn@aR#N?!cFwF#~*I0F1EPRlJ8s($q{J@GVm?9VbQV6i+1NW1pF$@H83sPt; zugEpfNR>vuQuXusA+a91Z(D>-e!IJ6V)r+i$BwL;GPvnz`|( z_1(^77G)|CTR2)_1f*|&h@qC%NnCx=K7+7m=;2X!o3F6KLW7!rQe9V%ZO2(OWjSsZ zDfJf9J%t4dSZ8hut7shOmMgW`kH`+3xL-;!lT3obx5|MbYKo0xKw{m zjfY_PgL1G?hc!U9Tp6lau2u^wAc1S-;kU4M&;AAs?UNV0lOGN&|4#^5CL;y(asdf7 z&a|z0s2qR=|G?2aX5q(asN+2Mvo5TVHX|efcAAkIxUoN0jMQ{ic?af509KeD#u+CA zSCHu;V+^>GykkT`YO1$RU5^-MIgz@sCk$l{b;W{j@JzxKVZ$8cN&aygj=2&Y&`Xxe z#=^|GRmqV$<2?A^6ex;@u*imL(Q8~2rDi32rDUjUHqxO~-Cj9RSFVlh2``$3xDBBh zL+QJPW7@bbs*XhRWdMIwN+W`6WxpfUz8NE?rAaSjVh{w?ljxgr!N0#&c&EWR#mYJ4 zi;3-duHg9VoXkC-BFY}Oy=ll6K#_9Qg=4pZ)6%bo?y+JAXZfwkgq%bcj7t``4bH=} zZCc_w{_&|SQT&wP=dBgR9V9fyLkFl`^C!D91A<$SQ9k69Fgo^;A9PAPVp&}F1zR>^ z<82=4HS4PAONQ71F=OyEZ9F*z9^{XA;8fbdb9c*>ff&0;g9l^isVqd19DFzw-2Df`^l3?u()7@>hBoh)^Q zL_z?DV1o@Nm6=-bbu3IT7IvBp%@)JgXC*Q_B%KU3xKvGfi)RURY&-L8$$7S+h*}~3 z{4AuKM4G6CU8kRp`|0Du-B-;52kF%Yzv`8qI2D(f5xXQ4E!228E907ew4s~e%S9`k zltipyGK<>MCxWleB9-Nkwj|5c#3J`r^@KL{{k26-;~`k*EWPJChg-C|vC@~)y$WiJ z(Y(;Zd3&bxo4?d3*FqCLPP^7*IdY81?m%kJY+H4McA_L=AZcT8Yp&37K`p8eyg}jBWm^JPBHnUZ zojCA|fCJnAK*0>?aXxZV5(k34^3OGsf@UaU`V_kREb@O{D1T5E7qrC%%aT#n%+^AQ zZpuK<1Q1|ia6TUu1wa{f;=YaCI0A=%BmR`4ls+%K`-aj&P)y0KPh{}Wtd!OZ)A}rn z`ymYpkqAYhjB7tJYk?SNX=yuqJMoZP#>W6kkd_X}ECprd)v9HgrDeXo@65S}c~*m) zG!&ZCRQL{dcN}!(f}$%syApPn5#3uZZE|r!aVZ~Hkv!zQoEk1)THB_44J*CBqeg*d zd&~(rPLG)8qKt`9KRWQsYsl= zFOz}y5VndEkAd5n7pRYBlzpM=R@Lqslsi$Gk8zdo+T2rbqxWwf0#>FDE5o>bB!?O6<-Cqo3woaR7HrTeW8!ppS=tPjFb{3M*L-OM2l`^*Z%p?Bs(VkUbRb`Q@gZr3l&M7q~}gMkYHsv-ni&)SX>^m_4S z%Y;{F2=GPE`!DkCgr}&Su*Ir;%sfA+hZ9TLmJB{a`)PZ(F2UDHfJxzlKKT259c4u-s*U5~wf$G<`=_oG(!uR9@_!LuDmtF4E6H2E`pOie=e+SXIwH;VV& z8tSY(T+I!wn6NgkZC&y{^&bmm_1-nkrRHzJnNH^%ct~qmIEDb9(}P;@*qIF6D+b7z zi(ad}ED8qe0Wf|9y~q3X2bHAvbCFAY^ck{T59v|QyI~9gdWmnN4!nOx2;eX;U!#HB z$Up(-)y0#GVLi?=V%SEdMzR=gK$7kk;c6}xBBQ1S<%M>*1eb74}m zFi#Eu$3?EuVj@TwkN~=u55;11U&>yvoC7%<)R^l7QOAi6;h9%M2hwRkF30-PJ=}3w zaCRzs=ef*bt1JJE_G-^+#9@tg(v0F8*0@RLX3?s$&npebi#$i3hxie)kFiq(wXy=jz2Q*9mn7S9Mq(BY`X3EN z?nBPMlYVp>(f{uwA>;6WJomN%q~q3y#@%SIVKulS!M59>2fg)Sut2)&eqnuKNmYrW zuT-5!E_A92gyQVA<@UYb!-M}HMd$v{nNnfM>Rh@1=;uF2OUA8QItaC{V$iK+yct3=?x8nllRIi$f1T!GL5 z2z(ZJ!nY}%t)B;6rD_IP&Fqft zE_=Vi0sY>{sso=i-;l2gWS$vm@s}n7C!e`5`>VNm-1YTcgUo3l8~U!>ic@YA68B*l z-r9S``FiG;qc(-m>gP!V4b?qoWb4=No@2OwJ=>`8y&^BCgpOR_R_}>h(X?#wUDWZj zk`r+b4u!GjZ%2eo?=_qmT~$gkgv4TsVJj?R!Nhm^wVaZFR=(`fdAhBy#4_yJeVrTs zpzLg#?$dgoEO~iD^m$;H|HJ$fTe8%D&PUr|+h|eh_T#OnHQ24=xfg5#xAfAtk7-ZI zPZf_e8SH4FT~V(MZT9rAjlV4VAiM0@M*aiIgI~X%kikn$yw}NcLS#6VURHjrm1ZSW zoI1y9>a}?sF?gl*jB>!>f8rnS*RP$t3lsh`$oO+g9BS@8G0m;>mj+*@1nVqW^ejC= z?I2DTEN$Viqzv0ZHe^W$F1X%x0EaX;4<&|JE6ETg3h6`@;oY)tCYfa|w%AMciNv1* zU6b1UI=Q9R2RDJO9~R44Mfw2D>Zyrsg_~<)`CYe%sWugZ{$-c%+MidHhdP}fJ!6P+ z-G?8{c&L#;R=kPMU;6We5HR<9+0dvsFi4YPJzR_A#v3~OVR;9ftF%#6ruFcO!@SFu zEA2)F6Hr~xM(qM=drkfsrz>fyFjQNqV%5^V&8H2WJwL`sxGRqEkH_40JEF66qx-j* znDfN5k3z#vpBoANovI*mUfSp8^cy)wwca_wKg(r@yf0k3>9ypMJ;;I4n!gPZ2m?HM(AChxTQzc{OBykDr~njuI-! zkw(b{3dG;E?lS0m9Z@%%qDOgTq;gBKdQ(<;-@8*6ck?v;+}Fa(RoAL6?GMm< zrVes%-$h$U-|9S89(E=D41)AU0q1bnVV&sG9bObPPXozR(;@t-KJe^hFX|T)?KTRK zy|_JoEs3DD;d$O|a&|@pU+h^k==NDz?|OMy79o1&-JpSxtSgIY>8DIN)9~H4vv7Wl zRdT8tPMXw+DtK0?=5#imfLpxrWW@wG@k*gVvkJX23A%d?(SPZ8HVlpw_>t5~+Zy<_ z(5ni(e?NOEA?X?fwS;W=t4lKJQdST@36kAny9dy!!?+54rMe%|tVS%SQBWJ&p40f6 zB8xv1RG<)W<(Gn2wTe+G=?F9-uWeT|gxEF9B3Zumq7}anJ^CE}w)_ggU5vk+a4SX@v=H5Q1XoPSa8?+Tv)H}3=2 zEz~o7!zFr#$$gAR*Nrn{q=XJhE>{dV1QNEsP`d?#-evxB11(VPk zj47c=7pj zH<{FjFC#oIZTcWxd-^m2UCKnb5!tK~%{`{A0Q#QTLmQccteL04HxPTQbop>hn^i_3 zq!*Ty4qC71A_b)5s{&r%zkjnSEa^SjE16ud7Wb;Ma8;*V4008uDIk^V+!g;aUlh$Y zTipC0w%|>mGq_WhpV~yMadDY_^DA(uC>T@W-LC7cf*eMI-4`?KBPnD;6FRylK_#&0x|&bpYo3=3K{AR{0))E1G8MMLm>~b$)4$yM`}i z|B21@<)sIh<_bc#IEzr{EU!^Qw#H|zjcg0>N!8@VlJc!=TIweT13YS@vr-@?!J0BUnh~|bNVt}$09&P>{E7m zSMc>*WOe$k0Nls}fN5X3t^dsSu+2g(AWkB~f8Mi9TDb564O1~oYl=Gj{%iv{lxqeJ zSl-A2wuDQ}M8cghe*e?YZ~Caa-FZX6zvRuu<2RwXLz{f}h#ou(KDO(2*81AlgIWh} z*$>=>zfb1wLY}S^{Mey;pw_)J`)SWlRJ%hjh3&AC~&v{9j3<&eghWBR8e`QUsYUH6J|=<4A}+ zV8cO*OtC#z;_m?Z{``_pmH1#k*m*+4n?=NGL{4qp4rQ0*+Ap0)6B-`5rI~&B5bOo%C?@*uYYx7_ zf^c{_KB+pH8qoA5ljSw1kBBg@GAc_o;1W#0Jq*)CG$6;9!_rYo4*m2-4_dw+^@B9$ zGMWGjAz|#j@y9BV4lTF(SDui?idKS+c(7i7Fq50RiU)RU1+Qq8m{v$uE*LLHQzWRW zLt7W1whJOX&l)JDvx8)`4g&Zj0BR~|)Lyz`*7Gc?)QyJy72Y;Ew9vFi69f+wFN zpInmY@9(hp9QJAT^$>IzC9jw~7ySNw-y|!F^!JWu;j(BhfQZZa#;M)XD&d+^=Y1S+ zCY(P?K7T8eQ1h5*X*h3J1u}9uVP);)Rt31J zA--JJhI4@KC^2s>G#LOTdosO*h#WCES&sew2rhb#O_#&c8-Y))BHsl}JdpRkvBZGb zY(}c5dSBR*j&UU3}Bx??S{X%w_a$j! z;4Hbg|2B9{0 zjvZXHhm@Qr!%~E@Ck)rR*+q~3xUj#mFRV@W&-uQz32|7J7}YAWt14brAW1{QuPtCc z$t9lLTz=|}EFmIUmy-Tp_UkBcFxr4oS<;l|b3RwXvk2kHnLbiWM(^9w`w}B{4 zoX$g5;fCiL&iw>?P{gs8VtUN#@X%va9KubOmpv)hDHy+Vp>LoywmU^t_=RH;WlG(j|)NR$bQ(DtvZXB z_=#tTHVAAX4(A@F*VCtYRQ>Pq;HUcQ`0^|9_~!=*zWT|&!uGzfGrsTHsExGTSlp|k z3d-#7O8Lz5j?eR;koJahl;qmhZeF7(LJo@s z@*Y)z0+zsML~qh`W9?Io&0^rJ^)c}pIARv0Ez6;Vceb=apI%eus@!Vdi7kj?>o(Eq zzlBEioaM*C`}jFveQ_O?6w3kOXPvWVJC~|O_0(fw4<+Js#Q6{q5Ooox!fj~FZ3qQ# ztTK7C>dKuXdgrznoGt`?V`@ooIo3j$u}Ew-4cZCQU!l3dUuAyk<&r&gu(N(HZ^Ph$m7UJ&IUla6yKYTu2vy8AT*=5bHUU^H(L7 zLP&?# ztq^Ain_YM~@#>jTp!3GHIsUHh(I+^mQOly)wY9(b)g{zB${t?r9Mt7M>q$ zFo`-}c>JeBlyj8-+U~PS;`Du?(W%$A7COyw){lLxAE`=-N5UM1* z+2GANWIo^~zn4`ieLr2F)w0Q+uVY)V2$|wt@FeDLvx)3iG)ZwH9w{f-+SWkdk!g-11J=NTQAu#N*Z>Ps`)UZ z702_lMPXdp5=gfN5t!~|!`fu9=Udi{iY=x=xi*c`gf6hq zpQTCnu%@Wb`{zN05d7@z1F2H?mk1J4nurr!-!6@*0OdUfW$_aene)3eF5Fb$Xokr` zd+yKqHNfMGt_!lz|IUgvxTD3O!EJnwZ(sW(*m{1VCsTCqyO!VE88nKpVvX)kmBn+# zT~Xp2t0k5!5NHv3sR(&##Aw~9(Yhxux%|A3d;M+qO^FRZ_F;2;2^XS1`$qk1G-doE zNn_hTTKGJnN)*`wXFI%>&vz^zDOCNvdNI1z)93IHkE8+${)m+Fx$G2jb+ z9lr`4{yuZqzd|oGC0dai>p3F$POBfpBKQ}I*TOE!jPWtLo(BhFk)d?wTrv_CTLp{d zo(#S#;qn2zQ^_kJ?;tWaC$joIC8xyoM%m}19(xh7{mLxP&l2y6^n3lNS=he%3GA9r z&jM+5aGKn%H^J#t4QSut(|E-d z>$AWTMxF<9E1?yUpx$UhhhzG8CUV7_Gzc?hcK;d)0}elxChA-zB6{Acyr1CkvNTej z7ulAHZv*3L6hBeWMo&p_@1=p4h#9AC1cf-i7%)pk3>g9Od5|G+U5Bs zP@jFqhc;!|_yxN@*qrV=dS)v5;s?*?Wup0QFTN)dULQ!y8aBQV_2mZq%t&tU=ySqG z>Re@A#!`K4WTX4S`J!>7h!2&ww=L^-cgHpL--XHXS|k}%^og&MOgF8+wR2PM;zbii z4JK0(ux`1IQRBCKd~iffYy&Udr>wXOA3Nq2*Cy}wuP{k%iiIdPJw_$#)+^qvvMRyG zw~a&sW=-b*i0VIi?4FMxhDDJAVE= zY?tBbaL8@`;g{Eij(*0W*1}gGhFBfYk zzWJ_8_j5}(UNMP@%0do%&~`mCaeJ{LEh@lFFL02H-Ehez^uRhDu=(E7hkYolLL9hO!x6(t=Q9@@LP?xhQ7&vewF}WQHea{0 z8HkYv*)?&??n4_YN>iIf(*l--s#~=ZbxybIzK@Ed--p@DIIfLj`Iloo-PHkTqjB2d zm4vaRue!@QBN|z=-F!g=_DSlpv&=kmQfd}N3xI_QFm)kIV5=xMT^LAuKIU(B`hA^tuPa@;YXEUTrfS0K)C{J&_r?71Y*))(ehKU$VEWiz}W4tWDMr zjQ`23jJ>}0Oy%A$^q!+z;x_-CPj&rY^3i>{drlu`OpX0L{_gH-vj!cXqARDXTmD`A zbuwYVXxFx9+3M3X!e{H70iTQu20}&N=*(+WLu2oMoNs5@)lJaHA|%N<3Sw?O=wL+D zF>(^+8g#SJnsnt&c}^~xVnY~H<{(}v55v<>!N1gpxS!w_9b8Z%474KSrMNRNKupk* zxS(n!k7rh&H3V}4F_iP6A>>~F|}e@PE!*ao>AQb>?{StV;0 z>XFMIRgerjNki3*hz*)zZ{jcn({?KB6R`{7-3^7%>oE8A*ZoI+O#_5{QkbTb)QXd> zjiVs5r{VU!29DllQy`XveW<8ThcR8RUn~dwGU-UrwYqBXGX(j2Ss^k_>-)4t`S>2S zwrT4!gP~u-G{d4W%?WpZic2{Wxsn=nommGbsi!3@5#uD=|nv#WVebG{_ghtNTGqqWP0P zBC!9}c>(;h21OdWjCR9Oot$ex?eo``HobnV{RgBvPtKO0x&`3d$ZB6;|NfU~HzNR#LNkHM(MVY+{V;>?*52IMWK@KU6qdarOtIhs< zCy4R6|IDpi0CnPlQ5*p3^YX(>Quphkrw*(Kvm%81I9AsI32|xpi7`v6$M%lqp-U!E zi@+m;Y6S?Z9Rxby=5HK2nwMNuX2R&#fL#ZQ-aM-|`PaqXZyPPZ&-Exk7-e_*@*(C= z>TV=X)ti0fg3Q6UEF#q!B0LC0_HM5E)2~3%G&SYBuim$}R@O%fMTVtk+mCG6j2<`~ ztzUFB$~DmBR95<`ublyRT+W|cnYH(XVSmh>Be(9Z%6boRE&%1nhIdmKo{Jy1Uf>!= z3((xH4*aAUV0alSGUyGTV#5k z*Gz~}0TzlvQv+dM`_-sGotRf~dqrRUjxj%^{b7$}P|(gPbWpt~bG^=Fu6d0T|A|ou z*1OzyMBN|v)Wg`!7}w?4qHysp&n-R48gwGgR;TmR+=NLc=D}a(CF>`!dK8NF)5f5; z5h_fJFlQ=3AtDL|TH}YUr%|bSfA9Fgayrmj$G} zWEQ@U7F^f<+swxzU1k+uk4)(>|8}c^;S&4#Zlc2@&WdNrqwLUBQr0c^G; zx;$a78~oX?5JG!`nP>4rKsV~bE-{aL6v37gx-g>z?{U_RKMYiCg@wTuz|NyU zTwBljwai=l%aG5yO`#!v8ZG-y2^q(1Y=&){8DWKsmzF9GOS>%Qqn6G~;7D=L^y-8u zmD8wE2CQ5!nq_gCximm&*st7T@+{)ThMkw-jJD3rLKdFJ)bAGc?TPnZFY<|3>eG}! zo07(qGCe^QMer@b0CSM+L1dYQvxhSBNS))(V}rn0k$N+cJbM&9)8#^Y;gsZmfL8I2 z%w{A>?D!&*^?h$8%c@(tsH)_}&RnT&3>k6cWoZ(#oH_gXkSy+AZ~ z1EWTnqMntEQl=I2@WI#qhwk)y&2)J=jUMV}PFxbxPe95siWS|XWqkPOW=MY2%Ze2b z-khs=do3pHLd6%xSg>FuI0Uu8So>XgH!LbK{91K&T^@|-?=lYpZ$4>=3}AVR4O>MX zMFnS>HIaejA&xeqE^d#H^>43G2FF$!u2OzPU!vL zLh1*BC|Z~Pkz*1D<@b7UKs&^{Otr11*FtN`d>kHFSgk8#>tZH0%|5424C|f&ugF#zR*7p$ zUvGVf@#a;V$RWdR661L$-btyOU1L!N(p9q2{vr53N~;-w^zKl@Fq|TUcr+fRPscyW z&Le>bYv`e}uN#(lC#=6M6Z#9Au-C%vU)gCw% zhPK*;z$Qbx==93q0I_R;%GiWO&~{p8@3m?CEo$sZ^ws3%$LmG_yvE-nwZU~%v^Ja> zTUvZ;9CUH?vCsSf;4kCMD#5xq9k(*rOb-DtAZwIb8k{yHzX+potwBtb;xw^Tx&+aEO{kQ?s<8f3wyi$~W-#x#RFuu@Oe>C|7M+2&p@AdZz)yp8Gwh@YJ1N}y=lUqJ5NwJex|EusC?|>x*^qHn0d%A!GvTx1g|{_8 zr=0+kLDj+-{i=~_-XZqP+1ktpN4bmn%TJ)@)u9p}-Z^CMfS&!CV~{F^?+>$RoiNJ`vj{I=~`^NjTT3@5MBLLO@^8M&W=nz{aL_8$U*S(4?+4 zK%`L^+1luL&yl}ksmz=k>&bNL1|eP)2E~ayMygq|4yScyRA`5KI z>)H=8fr}m@=_$foVd~b!=6c%cYx$LFQ^LE7adcEpA-xughh5xq+Gz zmTt}-G;a0xV~qb?O#RrsUW6ek?dG?u>ELAz{w9BraQ-N9wiDOTsaqn!(LZo6)z!x! zph&hEQDr$Remo6&urlxZ_|f?~soK7&&G)c#zjC^UZK_sMFq;m}Bi|wW3*`~xD2_Ao zt*@L#A3^v*A=s-Bn@NZ-#-G}#x_zBZbn|zXO=9$FF$n3?TDA|}$u7PXXcX({`Hznh z%a8z;!G3&Ie+=?;FpKIk(&QNA94Sw|j8ul|xbcI;#Rk>rsB4z$YA zo-fQphxdfE?@Cl38;hAsz392b-M|=ty%DQCwBv?yN5S-nYC^_&2eCH9v2mas%l!+(R)}g4KD_$LOfnWajKhx zN>B#dqZ^EfQC5Ff-IyJ?K!7-7Ag?L|2z&_A4M6rw2xFksx{^Zdms~J%S@}AoF z;?x(R5j9FwjlD%tpX+q*gZQ>6TCE*=>jyjS-5 z7Z2jd70KE<4YOJ6_P(DlcYwrno{eT1Xf+2J-*ff7v0Q4=t}=+&a^a=eCmR4SI2#Ot zem6nDJUAWIZ`ZEGVO0MVbpjmhx|vr1=orF@Z8@T{%#@~{IX-7|tj2l~w-xuoB52hM zn%JdA8o3V)7Iq$@Rfv#xogJzqwbJww7V@*yhpR0LgZe<1{Q$j`JwwCh$NBWA%>oNBdZqBI#1#WeR_OH(F1$TUsl&`^h1l4at-d0>tlHI?YeY2-Q8X(_=3p zaBB!%4hG_-TpWEtrJbeoPHXd724Zv{-xEI436PrT5tB*%#{K&D=)k$k_X7(QJ@azy z>X28qO1DDwx*H&!iwanT5zYG$*-E=XmCm4Qm{(hpqkQ05;@x&}WK?#X3Ka^KS64e) zbQgpl6s< z(4N&|tqrCdRr%i%gsW$#o4dxwjTc{`OE8?bUX3hjcWoq_=krJI;uLJf1OvM)U_zf%X%AzZk~P#E%0`cJC@6rt|Z=4q$g*g+GgYnk4wS4NnmUwi)1 z*}Xg62Ytm8l#zG$-SrDQuty?aZ!UaU>YjFF$=kS-<}JK@SjIZ#;WySvmo|pPmj)?7 zH>!Igx>;HfTSq_?Y=P}Td*b5+MlO+nB+`95rEAD#h!9o7h?1_INO(VhanitQ0Z+ys z_uDy;DF7i-`_Kz-#V@J@cx(%LCE}&}=wl^#P({Yw*J}q1peq>aq5-rn|9g*tmWCrl zIywQ46)I!gQQX3lb&E!3bxpRZpyGpCf{(;R$;QZ+&XwHZR|3QYrhW5HHL%~FpL>8o z$VkWQW^2aw<8=jK*5YUw_P-I@wP(A}9UE*6Wnz1x*R8p8#YfY<40iqoP z@)%^I(6N*SI+gL}Y$sVh(G8N>L!zn(63!>)7XngN;fe zmws@XlR{<_uS!i~I-J{8rtzI+tcsV=@8zi_v(0IhM@FgwAB0?}I5zj|?U8?j*Qy3X z9~dk)jvX%6`yo3t&jU%W0B2`end2u6Fi93p`z&}}W><~oR`=AaWf8AoeovI=+v?1J zuncMeoe_Z9$~%1_&V8GR^H?Zpd1kO8LhY4txd6d7k0kqw>{*hRN22c6dPwOuwEcGvlg)fpAy(rYnC zRvj~H>$!U!9^Z@}OYqj@CifP3Y8trBbD#c=*44bE4zrt{VbTqgTAI%Ef%3=^OUB36 z6-Qn>^dzO-YEmS>7PUl?CP>71e#Em1p)p3~}49pOy32-6eT( z@z34EcI1!GuDGjzKMH$va_PpF_+^il=HAIU6?S-aN4D23{HhA2im&O?84Rb>@^uj< zyD=}0X!r>O;S&7xe1(v9%uPYzK516<21oACe?NCr{h6WiHY7qtT~+(FHKeMY@H!SN zas(&J6}nP$Pc9*iAz+~Tt!!0LCRb3qm^mB>fVinLY=Rths?24FSKnb4V>3h-G~~6( zf-$%Z3oxBL1@IL~sojVDpV3n=j0$Dq$;2YBGsPZG0ic}SnS86F#D)OXiRCjaf!X@Y z1VAsbZIyqhjc?7Q#Qsy;D>0%#2%IW^lbwJzKckfAEiaTCJXlfKb_%(;6}kVbrO$tZ zhw}n|j2|8f{7`ckVTZo#Z)(Jw)&@T+63>D-zqkrLw}>qfUgb?=9LorkxYO_zRfU{G zu@xDVGZyEy1t=ZN`8Tn{HM9vUphk!k;mOD5+Ybd4A{%1env3yDLvY6?p)nu+DlarIJ$F};?SB+nx_bani-j(6TcqzIzg`KJr&;&`JNzz*(5dP z8!|N&s%x0aoztz_TFS~v9O2k0JsxhB<;FkT{FX>6nfp^M%yfx76w)pRa7dgOobMx2 zy$Ugjsxs3hd@ma|Fzog0BibznfjHKK7`Mn+k5h_8Ua}_ixf! zJK}p#u>=3q_arQgm&nc8`-t$zxUrBhi|T*)Xfcp@t(2o*hycIqLNSjxypDljOIuOa z%r#iGgd)yKn`#sXxfVNsWkS+UPb_ z1$rnaL|J^QZnPYRsPT8!Y5(9DRmJoOphyn>u|jKA94Ta?hfjEg-^-L@9W+u#5LLIq zvwC&RiLV}un!as1WpGw9eb@mHP14F zX(Uz;l`wYeB>IjbcI%Q$XH7&DWg<@Y3AoxbeBTYwRD<`RZ3IYWAlVP zR;2pTK*u(PURd|a;LdD+%pVN`!WW(NBtmrQnv(w|hxlxW>+>F;yGI7qLq+@t9P*FC zz;K8T2aq+TRu2!>omv+9z9#egB|Xq|r@;fR*+*A>D^lxr3s(xs4DO+lb4Xe37dx`!m3LDYLm@ zt#{$1Q5m^g4*%G(1FWkt_MGHm+#;Gt8!9^2OwE?SYm^(>WA zW2yV*Ent(2{2p-o+M%ZPT7oSlk1#+5uS^|ATZxrNH-lvBJv;ULtiL+XFi|)61o#Ex z*gn1VT;lJ;Cqo;T<)Zi6YAyGn#0A`vT5f#8wYM3Co~-5Xzv6Pe?RdY3_2?B82xQmx z@ZMC2WVTK^x@2>9s5%F;CC{>IyBNBS`B48MO1?c4f{Flov-}lxiG#=BZ;AGr#%}mN z85}TQ2wd?6r1KB%==N3V|N8dMVjd1NL&3xVsz30AMNY&}zeQJm&#=kD>81};qeO#K zzBT|mRnJr6UP5_cr95|0k5b`|--mFdt5@pvuWA5#>=wOV+`cSqGH9?iT#G4~LOF?K zWKW&^*wIqAndvT7;O&AGvkWi10AxQp(aeX1nd(VDCU07Y-K})6{JqD2F#cV?rxt8s zxqOgQqYm|zwZ%s+aQ09Ko6BY0Ifvcz_lWc{h#9RXPlJ>AzhxvRTY&*^)a2S+X>9ww z)%k#lx*G(F~1^PD$6j!E5O4 ze71=lFM!ZWpNMl))}Qwj!-Bd_wT)05aR>4|)WbWh`(Zfs&j{~^t_RWG)upoNfm zEZkiIo+U3cwl2-xu`priqlT8Bqd?({gBy^UI0>$#CU5+~i61NZ0793Qw<@zB;C+Yn#PE){}n{EY@$MfZp6Y(L8Y$TlVLIMI{hjW;l0`% zmy0r@Vyug@trn@z~z90xp2v^sqsnZ#fGqpQy+B+(=W!m(K8<} zj(3x$WG~GrmqPs`EEjD~IZum-r`-;uUYQiZ(n{P;Xenr0uZHTF8Rg{2ldqL_d8NF; zoA(M7I<&z+J5IPY;VhJR23;L8?_FdYw5u`Az-dtFNJN9%y-Yc%;9sCV`kf zp&j>vMuh0`?t@=bkrEA*q|g&?b=i%?ep0}<@Js)^w#eq^8960RDToyl7L&@(@u4G} zyYMtV@g<+wEi$D{m~q5y4iC&0P*514_;VNV73l8fBM1~rfMW8VZ@PP;uSuj6Cm=sm zpcebjVfsPG8Y!0NMBg3iEFHzVonnxK81zM>f8ZZf1dDK4VYpjh93UR#mJhDx!vX}b zPjxnd69j8bZJc0%GJ&7%4!>#z4V^gK@z(#=+3>|6)ET9hNJS;K+>~q%Ht&N@sp{n% zJ$$g=lUG)FrjPI2Ms2}2Q-BLcV~RkqXMjJWPM;*eUFYk#3NYwCOcIj^2=Ek9SE)ks z{T~Z7)gZ{uAXLokrI;%zU`d^RKi0%b1(AmlI|MFu8Z(YRyfFaLLBR|vTaqZ4Or=4< zz)&eR^p-TB{#AHMoyCD2e?&W4TCm>cie*WPgP$}==;;@Kg1PY1i!bM!(2&zFjdH}6 z=Os=^=~RHv`} zfUW~9y$$!xfKczfn|obf!GZvDa|MYu0spjEXFY+U_6fpsnEi2)Iz>fjU8<#t=KJ;s z-%~DnSne>YWD;gZBEnoF!|*m?4{J9(w7$YOwpPw3uuO*DVV`vSgo;n5OoiV%6?Gq~ z`$^^iDIWEg%Ggs2?NNk5_oA_2GZEE179fy-C)XcK|>a!K0h>$0vxhAPbxV zTcHGYsLVnEFhhjlbDd9U9F8>TPYQOq3UEmc*wuNNNlNHzfys92UIqnO$s)=?I;F3{ z^edqp3dUJw-mT#IwEEEb7L-k$avoY%G5I$j|c;|AugVZWzL2!GEYmzbc^%MX~?8XnuT&&p@Qz3s#h1YW-n#f*mq@hAG;@R3x3w1S|rYLR{pmrDKx zw;)M2f+JRz+LUBHKss23D2mVxlp+}SVw}HSZem>zDlrR)Fdq}QrEI-^b>edTVwss1 zgqxaBgwHj_fOTA(_0lU5Gd8;M$=8Cw`)r3$%@g_4TroW%%y9DNptDf`V3tp@BM@|^ zsIzSogxUnKQEtVPp7rw_lgr}&#nf>h>*%y<%!~vE4HWXNos z9@WMo)GWp3>p#mgVfUefb*NOzp$jB44zRU(_&?i*GD88x9t>9k1#dB1=%e9WzW)$&z z{%(R9kXWE1acD&(m$uQv1fhoE5n*b3+V2H)(P~4A!7xN;R*v=%7{~!EhdSG;D)SJT z8r6Y~&K(MQEg0xre-%ttQcV|WHw}BivyK0JRU)zh;}oVA{)>)K7#w3laV^AW&csE5 z(XHg5t)j!dF6^5;qLVUkb7#@ib%MZYsSX2xj$Gv4HLo`?{1fp5S z3HR{YN{cnvs`cp(M&j8hg+&t6YKjHR^9DMo_iRH$_%?cl@Wa6-ZTmLJvC`HufcD4 zbEG#gK`koc&Y|Mp;XNWON2zNa`md@Jb53Yb7gNF3Ej;aT+K+{l--`digNT_r@c{rC zqp~lp9dbLN^fgnaK#^>+VR=UC2cp-~;_E zsHe#KsK};xv2$a2=V!sYqc3gjvTcsOjJQJ4Auu-rC zk{X?}RmNI=N(%+Up_mUS^jk0M4{d7N3dIB+3vXk?;_{%b)MkeEq)JJg1yGH3i>9`9 z38+ios&h`^nV}>q<|Q6=MrHKA&g9I5vG62DLK)iD@5R+PZ075v0wE8Zu)WOYQoEtF zq_cM*dgFqS@jM@;HSHiCF`V?<4;nFeYo+=ZYHqJb;+@FpVy>`C{3l7&+S+12&3(VX zrJVK>Cfr#)5fj=OZR_~oc`-OxQVaqEx3)Aimc=EDBi)&MN#1+vSDGG6NNqx8)+5&E z+qut=-*kJ0w=Zi*@uWl#=X*qF)hPB&%U*QZxec!ve$|blWHR=2w`JDJiKaa#VqQIZ z+YPl3cvmk*^Os|u+d7Ve}_||Lt*wA zzh=FP8+tL@1qt!#PZPTjSq$y|Lv*Ph6s=HWdg3nsA4m7$*3|j94g6$p2ni!VfUv_5 z!<218*h9lKAZnNbiUvhRgf;_0n1(4!4G79o15!n+HY`Cz3Q=VUW zx3s%hr#&w(_Y3*@FJ0j6xIDYdW`R`YPM=zC(@_1}ZE)h&vNgu`)cR?)t#N6+LLDz9 z2d+Oj36vQEt{}Qd4-5ouv)~NljC5N}6~q%8Lle**33pV>Ogs!nJ)!nac_*zx5afHL zqZMfP6}r&=-_^(W+|G?`3X?6I6v`mujE;oR{ehvyi=vne@ec4isnmD-Fi;K9w0)C8 z9DfUa9O{@XSu98JZol^fw(NKi;X&e9-|#i&}Z03KzY`H!WPJ zTH!|FLj^dA2*N=vTqDZ~NYU*yaK$-JEMm2GVo>x}ER%zdo zaO>OxAFqeo)Oz4yPD!o)01CR#5mCwkIj;WiPG9$vFbCub#pp0ZBca9}#;vezoc z^AFzB-e#k3QfS=t!xpC3SUH5V8{j#WK?X-&$x&&n3pi(6ph}NcW87Qil3PQc@CXsU zWD@_!yHEyO+2Mw@Bg&70JTbSu00$8r66V&pF*;{b+EY1>8%j8W&Jz52^bt;BAFz-+ z8?Lh_KbuAm(2gA#gXu)qTTZyFq}xpp&g$&Cc`{^!h|Y^1KXKA#{p`{sJ3?7?p?VYa zWs%X|0RmI~zy2hVO(%Y))WVb`53z3Ah*%8KvHLA=TPaTrrGVcilNv|Bg*3@nCGQpN5tX0J_HcP$op za9Y$SR9!!Zq=quZa>dq@;?RRbBhkFlJw>(*)mL08#*>%eI3JDc39r)KTv)`Vt(9uJ zDo|F0Q^yG@8fMdMXCn4NOaPv8JSh z)eLoQNx`ltDbZhC=&EB1OKAo)!vp;d&@A9L*dY|}*Fl2#ar2|BL+*;Fg{IeyLH7$= zwaCC8y&1gW)G<5PL5&J3IsE1xX?ylX;ptORCrZo}gU1L;!1W+cw2i$L6(k$`dx!?z zQr1e|PA#-@O%NuG+r~~lMnMH@o(VY==1x_MbG#REByH1&cxRsPnqypH%sUPJn~i|$ z*^3O`cLc0@+#_X6P&+#o$sxDSmkx0&@;ewhC^}-UwbmFLjk>D$vTb1b3WPtknLq4s1HpIw^by zhV7%@&AMmOSId}m@@=Ti3p)0{QQ;rn{7p@b>3g?=r5YALC9BJ&+F>!D?uBq)?pNIr zZx?ewjm@R1BBLKUaFT>j#cVS>2d#TFio#qu@La&xs8zNl(}{DJ`*ASH$ARDPw+Iac zc!rzx{Ry*50ud?Nm&ZWcM7^xlMq+L!-WPgvleEkgSUoPtrO%a~ynq+MTq1>*WPl)vwbde9GHw5ErCceoEw= zzW!|yW4AFx4rQFSi5DO?wI^&uZEt>~@Q|3JtHXv9ACcDUL%JA3fbJFk+<}5YAh@20 zJXTP2lw?X2y82tVenf#fIQX=OBaVLu2>b__aIMBF;KOBOx9|+3!ZlxuXW=g?<1e*e ztldj|vRNCaf|LS1n*^zNJ@u6*lqFyY@SdzC9dtQiDvx={4BI^-v} zQ2NWL7~F}?+enY~xmUVu2q5o*7X+;n-t28Hx+tjcU2woUVTH&6Bs{n+N?7aq-YUtW zkQi7dLj7Q(Blw+KK<}2oabtASbsmmP^VqlM>sS>FsW{~ZF$0A9ZE~|fF%7iuc9s5n z2Yb7Xy*RP7MZFDg_E7aV@5a8MmvgvO9G_V3jpu{5AYuL(n!2g&;_RnIAMGEDZ~q)= zm?p5)TiahE-ws?tpFZx?_R7>K+SXV*eGP#unFdrLHM>zz+9Cw8q5iWHa!qLv!UB=G z?iy^^=S%MIpZqitPCko=-CM$-IS0=6S=rM7CKtG^L|^5icAL_9N>H8xmm-30dVU0C zXAn^osFf79kCO?f!EbVa{}k$bY5^(@cJc_F%T){N0H2ei9&s(-OCcNyio*jw(ji~h zfGi*U{-VQs#A=ZWHC6vxNJExO0Q~FiJOHy_hW(R+xh_Rk(os+Vq%^mra8;D=>7mb;*5WY(cIyX&a&zjIO7YdQVq z@#-?0NMB+L*w*_WoBMN!7z#1Z3}GoRiO?qANrbi0p}q>l)Y5L#R^z$ z3Zw)=QipRRDtB7SwrEqZeviY#2ZNt31*@?@)0XBbunOjkkfB`g*mPacIv%9b_LO+cB^F|n{!<4t z;&YZ;JOxBaN$;iW#7F^*5*D<%2H<0$_B8MniGGhXFnYw8r%Iesu#eJGaUkp<2eK}& zW6CjRcoiS1rW&HIZH4N{)c(B)_Bev|@_{^}Lo#J*ath>HF~a;!VCWdQhK`$gT)1(M z2pq)zU%oj{%cRI!s&5?o;Yi%H4A zQlL2}UY+YZnPMBXDAA%|^63YA=A)h*i+8$-{yKx`maFN3kt!~(s~-(L2_C>}g~?LB zQMGzmpv^ALfB=Tm06q7Aa-1a|LGHv^=wS~s9Bqaj9C>QzKN2><`+%dzMhny`#PBv2 zPHc()+W|t9A?~t@9XVPdG06cgj_#&Tb99GJ-;g;P#P*L zg{vy&LrvB$p5kE==^#xS){Fxg!DC0z`$On8%lqAl(Gjt4(_Vj6pP(Ftur}3R(dzl% zT(+~|hXHlC@L=2sK9C1{Ol#0x-||(V_EC~IndjR6295sT6pP+9s}#mg=hLQ}$91wO4u29tSOEvs6QurM z;jZs6AJ*WuK*e0EOSckpiVI6rVl+AJsnxpSyd;w<-NuCWH2PL;8pzoZ5@*3{%c?#; zh_D29=qVDe(y*09Fq}j)D#0ZWeB1OBg+@%?{7q8)Z<*i?nyQ=D7wX(albi`TOPIc8;C<}Gs zq+3qv-6A^TdkEt6FtGkWegDaxVLZGx;KZgfgDis**y;4xh%X67uX}5{D6ng;To$sV_&8RY3JA?29cFSc>Z{FQp%;?O@(A53&yEcW+~!9XNk|^a%60uUC^V+M4FX zum(@`qb4Bp4k1Srj$3Y(TspEPGC*T!|JI#1>|Tzl9oBU8q~pzAhW(EfBInv!#F3JY zJBIitcK++%CP&yzpVFp>WG3XN0op`v)s{+P+-IoPO#BK9GAb{2RANrlXoP+_y*hyK zRl@5rj;2TLO7RFwe84DXlhC&N4&q~q$;;sA<9ox`)GR63HU%yV|7(;C)p($N0T0V> z!wzt?!iT}RjhZHp^DZsq<%(jErEEbxhINygtk9Nr1udxM29A>8PU_=DRi(7-Sn>u;0y))76*Gy3i*!$X#-#u zYq+6JnZ<)O%%5wRPaIUps%)wKSbzmYQ-LHGfy?pmbtZOw4e?cq124B3{cCam1js?r zN2LH&L*{RaV}EA*w7)v*sCmt7|FxUWyKnzuea!Z}?7wH9gKTzki@p1I2PDUD*USbt zN(0Q|#qro96vPAtws#jcYYa?ONtDvuQ3c_9RfSH3F2C`XGyUL-kB+U&KIvqb|7W$k zmmGF3+FMEy&p0md#o#rBL;l)+`^D zuZQxLAqM54F>zRrXIfc2*dJV-oPcV>>d-W$Ru&B;o<pGc6L>*V3PZifc3mYBr^46S@8?1!fvPQ-2iQD?>`~u+MGiYKRd*k@4>dG=Yxz zJOT>Rbsz180&}R(6bwv;^UOD>jg07wNhi?4{qtu>)%uYHO_6H_T4n;*mJQjPa zcQ_l;7*OD>oxSb0kB?%2AR-M2!WaC_xq6rb*I^a7A5kmhs=50-d9P4+rlE-07zQ2w znD>ssnNvG;_zSh?qXgw3Gq=jdHUz2vck=LTVsao2RZZW-S>AujS$&#e`+jDVI#(gC z8aiiw256?*+&+fTk>yyA9dX+|*3;*!BCNXmb_cD;TSVC0H7{WmSjX-D;4}!HchDd@ zE=*7mX|z4W3%N&>fP~UAV6r!NZR$6+;|Kg7b@t|QaY+IG%g?w$SC@6Tv(Ds`V3kKq z#KY#jAbSS2elOA?9w83<`V0vdi%9lJ6l=l9}=cd?)!cs z-4H87{QeSarv!UY{#{Z))VZi>qL-l(R29xJKM49H3po0hUH%$8UkO*p^-rzA#sOT4 z5<%jDzFPnHH_y9n4$kV!qR+t10VG3)wE&=}wqS2f5pP!<&ZRY3E07=QsyC(O5ipiw z52;v|?U44)Qq=9K5NpL#(Wj?U9R3|k%5vaJ37$D4vgvh!W zp(#v`svtYX#I-_{P=hM(g*M;f&sW&a+2-qIU*rfB1xN!)FLYgc1PxS^KFk>s&KA2q zwdO(INS{@QsL8)QxIPFbU_LBOD#M40iNLd%hqA8)nW0{D>#ipwTK^8LJz;y{=)Y4# zUEXaLA#Zn=Md32rIvV_Dc>0Yf7x{lj@s~(9h-tQ*!6Qor4v2+y&+u};r;UgH$dEKH zhM+4wPGqo2n84G8&!2sFr5KG3c6pfNlNMjL>2*HL?Z;iU|NVaZLFIDW-jFUY!nof2 z#agGXKw+tMm$Fs93AxGTGT_8enHKV~Y)u{$ryC$(Hg?D*7Nqgk>g3lAV|8|+^_R3` zvEO9Hk=LK5=>Pn>Q(C>F4&PpznOjroV;A?-Pmo!sdImJUy~B}2ej)=KxXT7aPi8mmV4k})m{+EHkA&+Z5!dds&!x|yu#pe-=?Ty zmK#I04&Ut|MW%)WfZ?gHd`MyTEG_kXe%augYI}kz+OfN>^Gy@wmR0qZE`X+zOe6iY z3=EU!5$ak)q}Nr^1|ibfU!wf9@JNePwS0zi(QiLoCJR^Vy zQ#SclJtyC`Vt5USXi1M%t7+xl;I|8i{>-wCV4) zpa!-{QnYOJ(*Ck?6Z4X_vMCVCwG7cwdWoxrQl!}xXgUhcnC(L2N0#4RAUTmY5IDni z$`&mI_9k|*|-%iXU-A2#P$ z{>CYICxm%ZIG38J+>`GKPLoVEvf7XE*9KO7Z=uZx1-La}bJ;(2J~ z7rD=XWf$Y6!BF)z;JUZ0*gl_TeIK=JNod2rJ1g-=5=UmMQ?zi-wD<+ z$c^Im3Ut}L{dg9>&0+YF)xoyoNGuh$bq8j`}b)r8Q85`Xm< zL80U&O7p{oLT>)}lgAkf1V*w%IMcy!?w{t(^7e!G*pn2tG)wPs5sb|)v~7d7t0sYc zE}XjPqx(z&aqdSG#)tHzcocOu5jR8K1a!#LC16dCA#8qBXc$$P*(`vN(`J}k3#8yL zRE%wVRkiP~_Du0mK*T2vL?f-kZIX}ryI$bs!ycwU6I@>`-*YMjKg7ioa0&>vYA-T0bjrQMC+nTmgsjD2tAg) z>(0fJs2ndXiVAzo1|Xyw_jhWRGfW}vLHOvA7zTN%N6hXvd5aFxNM5U~NNYpJB?oCU z9jZ*&gL>*~p@A8#Jj<>Jdn{si?Vpdn>g^;Yb>4qsa7-WOM&-dm(b+(*#qV*?(u=W< zvMp}CJn%CVGke6$V~&HO%x7KH%O&F5#6r!9Qt1CwMgD5MzsrC&XT%q%9tM;DyfGVLGI(&l}U{Q$w zc)b$#I_z7+#RHPlU8`pGpVIs}-k*0^EayB1qz!g9vkq?Ng8t}ya z;f|}=p1mI)i~Tz|2Dzn+NH6$&l)?Y{j>w_5i*5$tMvT*^N8-Pf6;UL{6x43DJIkDFINzo;5sL-Tye z%QTP^8zQr%l@o(mIO*uceP3qVejcsf8&AD)=U}g;qRZak@2Cr;rT>aF>24p{?w?#L zX0bfQqCrfBsJfdSY{ZGw+O6u>cmg8lzl!$+=(!_#0CbyOYEX#N5r|p`FTHBBSVaES zNxw8H;C&->I2)k>#ra zHEveB-@f(OryB456l*Oile70NAyLz`!9hyiwKjzO-ps>blSu6Oi?D)e98-m-a+myR zU5!P1>5YakvH&mzI*et;IwC=lhj%_yH9cnV4nN*q(=LqlrFcaGaFmH$oiLx|bm^~S zmqBthU1jd?a+m*MBIj((04elVAd+km@}KdoB%^XVh&l6plc~wAb{ z)wFiEYwd{@+y=5#_nPRH!p@6>h!{sZDd9sWWqJ#CUi0<39UwD&X;tw+2%zpnA1d#( zjPvoyq!Mehz=mn$>++#!N+D{a=;s_n1m5-x3l&kX_kwr&+8Th7SvtC5=z&sx1O7%TEh;V_lel{+ zMIj`MzTL2Rk_uKV)_f_9=C)5Fo2Z+T8_odVk0!{>aj@(rpwjr(q$278hci`@$KeL( zhEDTwLF70X#W9$(k~j?GYfSKow)d=#O02AITcWC(mw<4o|I1kL>-z$0DFnxbS*-9e z19d1Q{LtFP6}(%55}qIf_SN%@=`f!_n2$IhHL%cF35&!d_ELpAIf8f^?=`VoR^q*V z1yMo=r7`)D7x=5c3KJo410`ZdT2TnTG1_5!bQbtP8dP@x>M8w2qom~%v-Yh3J8B|M z%|d{dTaK{=`81*Z%65Y)WRkseF%S8`1o;;eq3DBG09z_Ikld%@dBPc0qtdsfcoisL zC7BumrfS*6o4LhjEIR--sn9|Kvywo9)5w-95T+~WJiTo^wjw^ZFg;f{LM27A3r`Hx zcNpU`=~L}VrMgu+gg$#6_Gsj zyu?B_vT6@oaFQiL4}j_fqtJAI4Cx-bz(K6a;@y(0*YE~US?u=24^>O{+j>qpZu%!J zpDXCPZLLw2i6j`tf=$m_2`PacK!oKtc!{Vcv3K$o)d~ z6&2Xok70pxXu#WH$O#%`*M`7mO{j54yGB!n2D+gp$EBUwa@2j9w{9V+IA=Bhz$+{_^eVAi0=|%xFMn{98w$nx0=4n<`AU%xH7d zvB%xEoX!Eyd_r~t<@OVDnn3<2hkl02Prnt0a>X+_{4q8xkS-L3Z;=L}-%Vl~Z`L;n zt*)G^|%i3vFSzrGQ)9FCd5@3+P?O_Pr{LrizH19YqXbe^A9k zaj_n|_l5NLUL~YW|6*=qMf7F3AsrIGVfKlomOTJH6u7mXj~&@y{9a?)S1VwPg$X`I zk14R(U*Na!dR_y58>la+x)K>eB$ed*MLoJOq4yb#6Zaq2_+j@iw! z?2dR{TAhJZKgF5IuMj1hLj7=f;6_o{_#U4nID#T@T`SaO?#d*QpNMz#MZQP?L-z(> zwQNI=23jC2o_rcFt()%D)n!dG4c2RRmW+=6<7<`Z`BX#HAvngKo@N(0pVitcvDB4( zum#lEl9%^2zy`N11_UMpbx;XEx*Z;FTu4c?ZYqbwOL-<=p6)Wy+F??H;zIVRd};Ar zGmfMIpx_~ zhAi_MRRl>z)3B?!;f8T@R3F-m`yipdnmA&I5Ep({lpW0nPl>zTUYDr|NP0g*PyxxT=;y^mU-k!tJn7z_bm7o>lH!mJqMqko5^xW$|ES=RYtBAZ8DWS zYKw-&QS!(WPaCtxH_Nra^X?>pM#u9aBQbWIeZ$dhGd48$pUus)CWi8k?P>^LGd_Htx?iM8XTUmR7{5Z5z^l;-W2}EEt6Y~qOV`ZNV?a9T{nF;Q6E$J!z)4#_0Nmd z;K%Y^3yKCxJnUy1(W%!Jsx&Ew3ObZ?D}nvQ+w~PwuJP;b{Z=)5_EBI5IBts^&;b&8 z&rcT&p{Iw7?Tnw-J05KEi?YLP#NZ&qv79DzEUrfDK0ycIk z>Dr$D^rk~pQk}njQYZSR=Z_l663G8&RaWo5fLdH=j%O!??u6F^2NX@+dqW%>dK<#V z{FY_qEu!*o`k%SHFa?zUl<$BPZd)tdjt9r&0FX5yZ3ST-$U_dBt#&X)j}%t~47w6&=ny8Nt6XCka|tMz4IN6NM|;EzPK$C0#5jg}EO zPh9+4w>V^Kyi6~xEnousEu%EVWXE&Wl~=xxM>A+t4twZ&Rb@7#IAMoUdR_Xbz}L@2 z%Pd3K6_)t-A@u+=x3N6S?$jx=cRfF6>cf|kOF6;6dMoW0bBd_cvBiP<8;ccxY?vXheE25Btr!06EdM#{%02tJ;o0U<*YbBI<_&&=1eZ&$^l~bIh^{Ye zJP%VF=YujObyplp{qW~6j!sXHKEx0=8*>Y=6uso=e{;! zBnNOG7hK*yzjPC1^9Ha!189gLTd#g~s2u4HBsQI$Y@fIEeg;8M5E@be(C6e&FLYaj zplOgTNJPv408?4+^>?8x@ODEwC~%D#upZ5CS@{p+|D-kpFGNWJLsu=N464op&Ox-v z6YDw3bx_UoW85MYH$55CZ49OtX8&iu=v}>mtjz%`6)5|zd=;`(z43f#v^Db^5|ezU zX+9W1C%N$oh{zHTarwjXz;mX*_LJU;?vpIVxKp3hGnK*&YId(HGkplwXTB8~k}CNS zm1F(S;K`7Eu8g3vO_IIu4xqzwR(?hIu}}?C(Dw1ZMS<*}dMq!e=)lmgi60bfdSXlc z)kH_d`eLfF7}s2PX#JW>tNB$&mOi;q$g7Xjy3+c2|}N zLmca-Jil99!0pbe%E%f3|jufD4nYCT4=QGk* zL*@@$eu-8L74A+sv~ctAWA0$nb@Z8-_>FtzO*)5bV~+p%BJ8N^+8@@>>o#60>bOax zB{#B^ieRvTd#rm1b)ie^H9MrPd17d=NGm%xVe>Z(G z^Ug{7*8}fBQ0Yjuhx$a**qB)!C&h^7uzobuZY&#dj-X7xG(vjs*#SL~lc#g;gfeU3 zETHZ)umfxke3omR@#KVQ_-*VTh1h+P4;#dEJpQgvs`%k${IbH{n_{ZY zfa@kzhyslRG>?p%Ak6Yv_os*euwm%2BT86l_zgtYbhkdX3?=08oT7JL3H!3cR_Wv{ z)Qp&<31K@&6L8^kJ&A)+;Vl{~Smt!hEH+Tw8HS5%u^%?r+1x+?PRw#1hDTcYmcWRc zu1Y!$Vm>l;*0JXZ!brQBg4NDz#v=#-(E89{dxdXd^sJf1fSpZF0#SZR7Z$=Mq%AnB z{MnPJ3uz;kyN$BAkzqU4Ta2TEgJVk~{XX!LL3-M;@(RQ=)=)rw+eRPyQcAINOzh>6 zU&^Vi2P0!S|4jW7cIO|$#TdPpYc^*RqYHi^#fhK7o^aAhF|a#p=+GxAv3c-DXelzo&^w-iXD2CGFds;3(80ucl_{0UZE9;31ptv@N0{4^x&}lDw zTkeR)-5O&N;a$)0S=FjJ5@G0hbJs6(f2Z6x$ILWdLRjU-F@g`U>m;8}ZvH`;E=SnB zV`DXEN(3yQS!PCSqyEq>eUfaN>6Oh(?jlAhUAIRL(%z<{~?% zqT(}c^z;v{;%~14{t}y=RvTyJ+UM7tbndw~rPI`_&E^$CCVW*S=(|qerp$d^1!>M7 zZV!j~swtOdJ^uIO^Axt^tHuh-C_H$=yiG1rfitcWMeZD>7ab-1OT)v8C%rHm?tC&^ zAp0=FfNmR>+G}=aHOqpX^Eg?8@7lhg9puI%Ox+1Fq)~AZVLLtqI?M7m`ZVki%xcxf zaS-Q434>R-f2n<&hJWP@m7|iG=#RhF5;N#`JS2jsd>=4+|0WOPw8l4Bm5rcUrA7a( zDG5z17<H%1*mL~Q!?O5dA5Qi^{xmfjm8Xy-jNFA44`CBAha z-CDMBBy;Hdtr-XuP`2f8_yYo3sa~1V0-o!5cy$6oagTxE_NnUfywBn#%6=qsV_4@3 zMQztwD;7Qgm@W>Ycc}!MgnIDf8fodBltAEXj!#|Go1mR9TGUC5BCV3FTZyhxaDI-@ zg!|L-U4LED&!Y#RYPe6&&vw`?_4eO+FFd^XR`RFx^^Icy(-$=`T--D0YN*P{ zHk_hsWN3!{k6av3;Sv8vwBA8VSIe%qnJLXtY!+oKtX1!MH;n3NL$p&zOg>14fS`nc zPn`Rx7u9=lZLbO<2i1;S-6rbwE&g_5jpy>|8?yC9ERJ*gwdr^LlAm6rYqpafm|TO( zt-qUfQ=2K& zseIz!JUE?IVBo0iV%9{Nw;xH7D%?~>0)PS%ucmVKJE+PofPnZNQ;_bw4GbMHQI?o{G6l}Oswpj{lnKG+A^!PiMYFVchpV|0DDsnXnehzu>;OXPPXpM!Ek;WP7*C3w}_cRHA+d474S(^qiP@b|9z`wlUQ z<;8^#E{q~pKSeWpEdZ9B1rE#}+IPY2y~Z^bV5_)f`K|4xSt>=ukuebNo1@a>+&-0A*%*b+uT z!|JB78X({y>ZZ$o07Lq#^N-xKr?>qxwaX(33CUUDBa)OSn3NK|pP5dD8X(i5E!IO7 zf6LPkaK8_urz!>NyEx}Vt_)8XgiEZ)CJ6Z3dilWK{v4X7Sx0@odn{~b&tsR3$$@(* zFu-G~0D79UHRl5`w!ICH$b{~s`E>L1?qG(UO)oc!pX$xJiRit-2)-b*wJB$xi2Y|84G6hU?bSUZjIkAL5-;~ouhYf(ILFexqm** zcPC^vTH0al(HPRu>lxZjp2qxXFH%b1%76T5{`@{;HnmT_dXf&-KP!EZ=9?84t;5Na zNPvSdbdFuP7HJE?r+l|L^A)Lt47x^Lv|abnu~=R)1_mi%G8b0 z%UeSCQuoPyr}t^@OC3(|y|aZOD_))>=JnOk+xWe9EYP3>4mOy?u9n!*cKNE)?e5 zz&#%>(|!Y$r`#F%O9_O|B(H)PWs-l!4G3g)*AB2N{*gb`&q%3zfeZN}Aq7PPb~(6` zrwiEILzNAhc1j=eBu}=9ANOAXc~*k8*Fj&_iyLfO`7=T?{`;B13bX zfny~Z(S6)ljJ`s@zCuwPxsCYkfva8kJ}2$rl@LZS_MeXrT%&wkkqp-Yrg=Z0{Wj#v zoS&DA{}BG3T_KfY=NZWcb)-I- z`5?1&J{%vRyD=CD#+6khdraz}p^@%UQi2j>D3K!M!HAeMYQ=-9XsjDlxK%dO=s5_L z4dnu0(1HL#=WPoGJ9AJp)hHD7G42KDF%JoM^4XrI>e~%^$D1qh)qesN4yy1gzS!|{ z;HK#5c*(5QD@nV^9Hr8Ei~bW=Wmkx^P~o@z(GTV9d=!nsu$i7YQ;$3N7Sv83YI-O~ z+4{IN$6iwXXDJO1(ycKyzQ|bm&Yr!e`M#PXdQTeY5o6>(h{Z3Mer!9=$SY{Wte zYQ}klijsHCeCO-N^Tf(Q?`ASAw+M*$fv_M@Isjx}mc*4CuBkX@p;y{2l2~qWP_;b= zvGE!-52aV$jocP0sEtT}(#iyTzT$rD@D(7)1I+vODUTO+!H$d<<-`|dBgDxmk7du9 zuiuta7Rz0y%9oMNcaiZwExz%su8Kc2{gHRf+2p6Z`%E_An~#baH}?hsC;j*k-$4e& z7sndDo>Kw|9P~hr9zB9NxpBpXS97caWkuQ_yO|Z;6%4wpgm$u-WV&F!M?mJjK-EiZ zb4#4#Pdjk_YWRqz#6dKa0^CZ5?GcE!6Fm%%?7{|<#Xu~N`H`mC=KQ*4=w92+M3^sV z8%s#!c2hyT_ce8sAvgxM^I({mnZV6XK{Q)m2*t*`w zGjGV*Y{r?y(_I!A6%2w41~-p!5NH)w4JA(e@#H5E(?|vkOi0{zQzE58=f;)fq>>qH099e&C5oHnkYMaCtuwBsn~1=?HpCQhSYLTsJTdnMz!77JzjFGuH0pHiH;m{U*R`a6|u+q!E^07>pHIX2Pi2XbNaJdrgqBYbq15}FsHX$Jk^q8U9& zSDCnB$AW*XgR*~u#w?!x=IvN=)rV{iF=-uSJ2w}PmJnGIYwe54z(H*%5Q00oZ{Z*T z)B}Gx>cV~=+s40J0RQTh23ioRT4q|yO%^I2e!dRAUODO@kKP5|jKM_cN_g;t0?iF! zT)~$ek!4qlZTC$Ue!Ei{&!rm-9D9%}Lv;Ify?tP}&doc-v^~gkz>v4RayVvo9fXzY zcJ#LYBh-bSN&37(A`8*1ulL`UV;2<1Gd`vsExv(rP$l#ilpvic;OQm+`*G#yNkkL8Lj7x4K|!-vHomA_D7ihTm9Zl`WSe4< z?9z^Oo)*V_BCjm>Rq+-rdzlqa)Cl4dSzw|wmyp@vi@h>g=0>l_`Tmt~7$={qngcL+ zaem&Oe-?sFQ)^pYWq;SLTQ>)Hp||efYWaHl+Eax~8k+}Nk7@P&ggR;X#zG7@QBEHV zHqn-;i;u>x%r(4^f~e01ou!X@An_&V|A{SxIy)_SY{;AN-R;@6H|AX%N7RNRQ5O^i zsPK^H`|!$ZK%mlO*2?~l(vPU&f91{vO)r1jWQNdPL+8JfppG~qeHgER40{V2)KwKq zkQckB;RAo<`=Cv8swRoQZ^5=T$zMC!4R5-dmdvm%z~0upCyb%qx&6g1Q2sE&4gPQ8 zz79V|4B!lap*@rBonu%3DX7ro>zeV8v5RK%{!Ri>%akQ>h-<-^0{(kuBt zK6*tDo3mLYEClBSPU+@3c*$?{@^K1xx6KXjz*g~#k9>1z`o|~diL36HuG~MgbFj|E z$Ak5L>1$ZlKIHfx)B@m!Sl*=N|F8bSAPmUZa>KmTsl}O`P&QAl3{)#RX;(=NI%dFP zEvIH0jRvF*UpZ`_FT)bz1zSVq6A);l?uo9;ee%nvVG)7-9~Xtb>IAd4R5pu!K}7W0 z*`@U|l@DWP&aF%SA{N$E3)=cCQ93eo6LS9BUVxtpgMhVzO$pz3V?wdcBP7A1f5$da#SVP2rsQCYf=J?Dho!+O5I z@r$Ci){#MT?mg>>xbBugEz68eT$OdDYfVSdX%zR^j$*=GNl4@5WmSv53huNr*%DO! zdT21fR;^`#`}&h!cCGd0I@|O)-wCbU&RpELPksv(TbDO~1hs%}*6p&d*w9#1HPZB( zPyBM|m{&+$=6UAPCwX_G>&!P@1Lv=AK@_pOT*ZIoH@ODp$*jftqf_AtMxJGZOu*bOREauH zL9*o9d-62=LDN=?s9UL0=~@3|IYfQW@6&|=<`;q2VBJ;J%aW}Jk*Q+j!L&COmZ6Db z#n#5+Ha>8c9&nlvOh;^n(n12IKIRKPaHK7l&N`iWEWKPgn4jXvaaNA-Tq~U zNvW!Yx}pb{UvK6I`O|p?**j%vurB^UDriRKWb<0 z31AzNLToy4HYW^v=)h71;@LInnFr6fcg`xc){?o8R7cqc>LUuA)^~pPPOZum9asyI zPV0RayP3Lv*#51m8a#n=qk1)#NQL^1(0KumggvCcv{6kiO z#XlliEbXOcF$;{7o^D<_xx%SIp*>=O7&p;|sASXWzUS+ORK%U|cH z7T}bA_VIUqm>Wr@+B%946wB?R7*MCk1+W2I=C=DbcB;z|cofG~KS;czJ`@I%DO&!H z;Xr!k1NStRiMnQ#+xBA&SQpA{3bd*_-bDQuh7ypJ6Ip(LP-Ph7+R@zBj2C=uF$nwD1A=7R34D5S zCE#TxPy7f>_4VcIef5X=Hgeqec~h8foZN&!j{6WBs^cv~eRJ}>*C#ecaA<1h8T^gG ze;e`BUAb@BcL-;*G5-#J z+>(`To~Kg8pFZ)*UKYj(L#yYNy})Slo?fOR$F6k+aMZ49ssc8Cc+@qN*tV-%L~ z0@#|~X2~5RmsC?eRXTAj2>Xy))CP8m%IW~pk_OH{Cs8rdT^DG`zz_$C(&X$;_T^Ym z=E|#(xkxee+=9*Bu63hpg?I+>iB1NVk9oF~GX*OfNfupUHgU zu@ec8HItZ7iy>yf+DWOt+S)K!`kIVoG^s+JivECo>xjMRe`t$8=hVpbv3)B<$UgJ1 zlDhQ29rVFq8n70rxDUeV#l;r8j*FYXWK^nH}-5x+2xQ;=iE{a$`28>HxXfN_coQhreb`oy>( zRtoH914bN<`PeZuQ za$){B?^r8RkzX(r5u_&d`1j?Y72s;$L?IdePT9wTpHRfeG*nx}_)_IEo~6u>Eh$H< zRIw|NhUYbpP87o0gbNA82&HBJ0fYF36qI7K7E6)3?-uR2_Lq~|h2#0GI1*P!N6-H1 zJFT5kaQ$!j#_&0n^PFvoNW{=;6f>WuLem7Bx;iVPs|MsN!H%szwjVI4Setm242L@{ z@6od%?%8rj*)TW$8(zny*px*@Xxl9+n!bzBqlvr_!iIWonvX&L@CrT`2he9p$u+p* zn8LwlOFZePtC0mtvrPtjIK^6B$Ca9&W2a75uGT-zee?d~p2^=!bda_^Ew0#}US?y_ zd2Ni6k@o{xIyT+tSg?Fd@w- zD&GHuM;akoY$0vKny0Bg7sGBfcdx8Kniuy4f53m*jOkhEV-H07gZ9^5j1hU>dY(b5 z^v5^=bse~fXi|xdS(HR(HL_?hlZ+fH&}o(vb!e^FBUvyLDeO5=v+F)}QN%QVWs($B z(&KYAjo8;YAQ%ZMon1ga9|Qgnm3Pvqm6UBATxcl3;m~e}D|Gfo*>1rH+pgr5p?38g zntG;8L5XVY3&sTS)T>0wLNlyQuBs-(wZR<Tpu))T z%+aIw0wWM@;c6{YFoC>Qjd3r1`uZv(-?*tkN=_>K%V7~|xrVg6&>zW@MRSdkS_AW> zIg5bOj)Ayf&-m+~E?JFTnhD=Q4-7*!!i@3QzkQ0oEjmnNc0UBD#<2-%-vlvJr! z8={l4m|&?e>X|~pVrpMvDr$sG11kOC=;+eA4gofACLQl%lPrPg(gh&G~AHebX9g32{+Bm3x>9-yYvl%#`{I!2K-id4OmvmwE+?VA2}Tfftl94nqu z+kug)Bd7|1FUG=P=E}x^{mgeM7Q~pNVBoA3qLy1()nJVT)rG7&x=;KGv zFg0V2%Qm8G4nUU$(yifuF>sBK_Sr{*8!AH``kBv@iVk5~5J^OsjVV&M+1IBy7vJ%7 zjriFuQR`~?xJ*ibFb!--`jzxAnXhR(mXRp{1tJGi(2jPS6ke*P$j`CV%d@^vpD)#i z!4y25K3S|(vseEYsb0;>=Qj}D0m0QA)5`UjJ_U027!D($UT{HD4I*KtG z9Pu(T$>&6)Ct1kR>t7~^x4^Cs$e*(WLD6Dzc(~#0Ku9tSS=s4Rsl1+lQpa;5 zv?Xd|ab858PbZ>S1ttt~$u}$ofI(M_K}mEC;W(&~xxdB2;--=HNd#;X5ZvQKu2$On zF-bj83TmePvqs)V@q|GeElgjBwP=>I3gI^|!f1~T4t2URKD)ZB#L<^VUcqWOyDhR! zFhO4G_hg8B9L;Y@zx<24Bvp@Dpnu}nv6@uV#n>tV!knn~NCX|) z6_=W<8>a}ICGy&*+!n1g!mW3!?TkGap%Ijqc&Q1*x&IVVv{xoJ_#vkM7|?fk?Tugc zTsx6`Y#>=l5sf4dYjoRV03+$MXyaBSV084ki2?lrE+m%&o2TamnsTh@%0om#0?^Bl zgI?qk=76tJ07xTU14UHId*I$P0KA9PT?8mm2JpJkhwxBnid1B$;pe_NbRIrcP1DqW zbnIZ?5gYUtLP+P2<-q@jvL2WE;+g}riU<$WBXn0f@vMkjr9A#HK86uXBu8z~tQ6o3 zQgco~(`puhs!6cRiD*OLBunD8Bop$}J|=88sbgWEIjjt3V(k8wv^JXEo<$RifFcAS zvL|T*K>qYlIKqNe0}ost0EQ}Ewv=A#^dVV#l0v0dW}A?Vg2;(H%Oe6csZYM4FG+sS z&g6sfts|aPyR-&)NkcaGxh1H?5;vRTtuq^|Gm&BFkfi>t!qtfv+oH;fw?4d$i1q~P zzIuG}NLNEONz0sApOCESYpo6mv z{nFe-T-a!|bx=DGwaeSlK4tsB%bmR|@udCe>Js~%y4&hqgCCsO(PfYQ zB1Ki9a{Yvt+d%Te0m9Ao@xUR%H&t&I2R*1%lA4lkMpVw^5CmKZg(!H=QGZUOTP+}d za6v4hawQO}aUZmbYcL|ZE~e?!Fjac!%&3LxlXMMB?tV_)RXzL_L}LK>!N0^!Y463VTZd^Vn_qeoj@rE{QamVVn^6f_69jM7 zeooRz*(-U$JF{$ZR--1CZn%e-S2*|Yipv0ERW5_c*ig%4O#%RKB?TxTOg>ZX$Nr-O zz6hsI{Ez)=eKMtcR#-%x5}+Q8zX>7`_jo4iuK22L<6u?*_Z<77V`duW((_-J?hNjA zxZZA?(p}#p(>tpOxZv!43Ix~IwWHIg(g|MdYOmZ4-D%o|-%}Y+0FCpc{4^$flW zG70`fLi42dkf<+Hl=7UZ{#=Hq?qqZZsh3;1K3G~AYex>=ZwM75WgVb4u}_1nr_j4Y z5d{6<{E?n5Kc5#r0v%`%Uk&`}C$~wR?lixEF`C8~afrr-Xvme{DO?s*uH9zSEWdglqSzdo;cBdLIW!eY<|*}r3PG**h$ zy8-R9GQ6CmgeXUtmmz40(I={)Z4f;Qannz>#Z_>K-v!nWzB4)pT>E@ZZa#kg{DZI_p>%yLu^ou zqQAw1q)?fRMBes*`a4kRvPZ$D=kM|UX&@MgXzAoc@2GQ78jgNL-&&wn7bOjJJFNoO z)eg7Z5RzN&Ao08V*~6233@5;Jzr;JXsBqd+ ztFI`=8F~_XrJ>k!N#WA0`DG@*=$vhy25*@-^9MZJD%MNYvQkYlh9JLb^*dIy|7jmd zMZ>goR8bS{TLzB?+%bLUWc4c#q;#%`6I?e9v#MCK3|jT?+M66;VHF>Dxnr;;@T6V5 zZrSdI&3;OEYV9+gKTiLr>!8JllI#1is_(XU{P==Mex;2JDf|?P+8W@mZ+=v+JV$Q~ z){4GWpz>Wg-}bBd#YgNee0u%Pw`VS2Wm#KA8oS_~He81j11!hS-Ol(o_}u50<55@M z{BtwJb|37wTbL&Z8_$$+BjTyU1#g3oOACf)=I7 z-}N4|zTVjzid=CL&z4a~5QZ*xHbXd#?lydx%||B&-Lg9u)J*E(utAP~BjRQo?;(|Y zkX!Md5OuPEmP*C=151o?P74qhB%oKOW?tjGP)HF4EY=w|5&=blLvyd{c40P#^stHs z9&E%K=QY@E`7ZAq*3FuN<-^if^!Dp^tf=ziA|Q>zX!E52PUKP{bS|ZL6ge0}Lz|gW zREzYR@6k$w?Ggvjj@d&k#o~O407KP$s=(0P)Y9mVhho^C2J=opGpzlzBKclT%!O|8 zyYdp!%VHZ6UAC+Y+&1@iVh#kew+|INJf4ng0DZlhKzIVw+kKW3IVq*!*z} zG28(|v!&~*cJ_=ZtHv<0B2&N8$IL&zTgN&D#xZLhIK)Y*EBapHFj8lwZ2W3-+EW$4 zk&BHIeSd$;Y{z#-tpxjS!A$9qzD?QKjP|>x^AC1SWD9myCjK*TRoQPchPrYWwk^xz z-JlebD8c&@QV-D|7%rrQK-K?ZO@772HG6JBZM|s&)N8zZ_1V2A{=m;;FH$jGmlL-4!>xx8MeYt+~IC!+T_z!G~KAJ1vrQP&_ZOVs;T}@yB<>U z2!a{xG9m-ssn5PL$;Y2Eq=)P{HF9KEz>&mWZ|I!Aijo{2+dvNd_#<_IOF6GL5n!r5 zN*>nt-uN`s<-LKsr*q5uY5?>zX98gSZjEzCCCR1@qHA;Um*mKFdbXV6k z4E4ry=N0e_AkJH527+2q{cRfw+Nf?b4IV%h6-1s>8|9JhP@Fr9^mh$XjDk8+@|7YT zB{Wnz!UDyb06Qkws0uHSfp!eec%~bvXgepW>ooh~EGGbmQpPhjiUdk z0`1#W*9gsRQ?ZPp>E{Cq#{o>P@jFY~iz>qo>{hLbcjYdXT5vc4SK607U@tjzKXZ4h zUF-WrwH!elp>A){W)=-`k`lVvZcX4;PR5#zdg%|+G0_6L`uShYX+5$tXR=J(zGxkL z7Dwb-ri{4j#?-SQ#oCG!SdV9SLH4gt6gg3svxQ|11r$G%ac7EWg!J~tw`>ghjDIc& z5hj4Fne1<9LSGk5m^+B>hKzj>n*bpOjR4FMF0by1ldk5M-inAXJ2iEg$Nq2$5o#1jAImonnGD2ep)0rMe|Zi z$f;#cE<-;0|KqFX%+=~#B*X8H`;MgJb0?Z%X5Lz6{Hh8{%*19p`XK7{21M!CxH&7Y zm~eXWRC;+7cAhO&B)C_)FD4OAQIZl;j~mYn7U`Ut7%^WaLRH+#OFZ5nI)qZy@HKJj z{0dL4nTgKwFT;9;@pThyc!`C}cy_mRN0Uf7L=hLk5;pDlGJ!T)qwC-DDF`U+MxW)H z*wzk|n}x}DJ-16CWiRQ@Th&F6x0WQ`3f?VHt-oqv2yOJ2x%rZ@ZEmGI=Bz}t@~q0uBUn3J?}p> zPIAIHBdWhY-Dz`MFk{TDoQpP#YWML9B=d99RXU}A&;42GONILRoa{c1kHhI1HzWO0 zF38KN4)m!q=?L;{FeEjYh*I?Sm{>SxMtEV*K`np9Wbtp*r z_IuZ6>81UhpbDYP_xF)S0DKl;Irp_B__+$)dEyGl^gR!1l}(_rz?$mPfXjMom~iE- zsKqOQ{a+i4)7eefkoBO}Mq;sL;w11k4xEm5kX-vVkXrXnu=9zFU)I_J1nvJ8S%)v$ zUTed09)Iv+UZ?K6zvyP$ftEvC*?mtY934Wu;-N7MJMi%X&Z!fFvxwsbez-v=vlXAs zqus?!1tf7%x$c0gt?k3yn+uyNl$_yy{S1($ABTNeq zQ;S$mb2Ay=j@hd^$Xh8FgUEX+qU(qinqMwge`x`f7gJ<>Q&BV<#~{OIw`(wh?>{G5 z4V&`oT?{RY`q;##_bCHCCQ`0$%zv1q{DfBwD%9yR*4wmzXFYQMVH5de=+420a~}(7 zo}0{%9*0Gi>&>2T8`)?ty7kxlkB$_t?I@g~1<+Btek`-^?ZrJ|eCSNh$y40q8VVZ*-z{4EzOPZz}iyOAg zcd9!%{3LcVXiEWX0;jBK@Hy;*@)vR*I4XNH!GWHeTa&zFgsyUOm`0cs*w~GB7Q=O< z=o2zy-pdR>GVb>9?g}I96ad8#s?YgA4vXNM!>!-3K^JgG=97SWO`3y^)G@YJCCSm{ zGt&prlLmU_0VhWEnhsrcnoaojk3TjW zd4Y|D-A3P*q7kE*ksfLo-Dma`2enYr5DrY3QF{XixK8fLmZ01?<_C(7eVx$&tVJL2 zwqmVOKN64G;*|Rt$}A~GRi;Y%u4-Kfxo4xS2Jo{{fu18DO-KWlMk@Eq3_YZ_-8jY1 zqSdGI8N+b81hLtAGc!!HOu3smd?&IE zOpH__;?xOEhD?hcG@kLr58kgG-PD^F?{UFf3%pq z6*6v+RemHxi}|L2lnBnJ3YZ$@lUY=GBc<|HdDDQ+5}z6AQCq-v1;)k~ZyullT?5TK(m>f9^rb;` z>_ArINxjB(^{28}S1rrK66=pdBY`kP4HM`{g646X zVuT!jVQe5?DIU3Fe%(RSG(_0_r_a_J!~HwDfjYtcZ6Suh^E7Bq0H}*rl;;eo6G7en zg+_4y+#eIN3zthaDcr*gp@YljyU{nN{^Xqsomn{PyED<~&p$mxsI87lm)hip9=OzF z{{%(>(6V-N>m0GelqBWAJzga@`t9`D=Msox7&ba*O>DUiP~IyqM4{(Lfpb(a`a4T`q3raO$%<{ z_CRZ-icQ59Aq(}E_H&B1XASn<7HZ8mb$CqK_rp$p_gLiBH;<*TFvbF$3jRN!GL=z;_>DnDWUlw)kmu^BQ^HU&V- z7>BaiD(&PGF`%6J1;Ca^8VXRiMhdD1fWp{D%>ZS4HnN`y{=J5Y4a=&yDtfvKd2{vr zo0{F(BF?OzIc8$hL~h4Aspf5w_G5)X2{5Vwc067W>&~^?b-JdnyRC=obbyB0Dno6R zfb-gsdDq}O)=(HJAXk!Hm(`uCMDwpWhXh=D76~ z_-s3>15jri4OM98w|@{j94lI4Nv57V4e;c>4lvV356>3zD=il(^P)9*iygw*`?T6My7PrleXqAX+NvBnKcOY;*OJdfF~XEPJGwYgr}7p8-+- zNmIx7PUa9nA75pfmHXMVFWNG(8UW?Ozf|&4wp*Y8%^amUrr(j=^M@HKAu>R{5c=8L zb}vDHpdP085_?BgsfAF}KB;}xZO66F>lvr*Zb+fdG^n;@?;1JFp9s#Ft@G^mnfnXc4|H^=(XxD{_8*3CCrC@p3mbdV|9`71=&%iwep2W zD|v;m!|I+{Vz_h-^WZB!>mlgi^6{$2|K_L()bt@bqW?V9S|eK>{z5nO zCIWq}POw~xd6Peche;K0uHcRSl_dc`%45ztuSpD!myZ*D6+uM%=L&F= z?-xEiA)>mO5MR-oWBXsoMSuS7>bRg>c5zHk_c9u=uo+%#DaSvGoa2R(uH(^~R+hkE zBnmiUnecS~Bth2+1Q9Xt_)0u5upG&0N;+3=mY32uuGYGpfch3F0t=@C9yFj1fa0dx z$0nkmlxuI&?ub%%=_nP`y@mz~wNy=R*3*naFGpqnx;$1jydwsa8z&%EeZ^ddAUO-C z30pZ<#=3usfBEB6MoTC&-+dM|XRlvb$$NS&`6X}>UZ(X&-ry4OnCX_l$lbc9@4UJ_ zV`5PA>p(VoqT#@r_j?HAa(Z)hYMFwnw|AfSf86$MsN{sUz0hg$c2gW$h{qkFA{o0dPTyViLNI*tBM)WYo z-tfN?Emqpi-p%!iX$sj6#V+we#Yey4oirI!8NitdR*uzQn4qMAoFA3(5O$V|^MDKNY- zO5Wy!igNnDo*K8%h_ZSl%NggD&hyI}5%c^YTP%LBrq#a0-uv4>#3mLU{BR)RfwPZw zdPz)@^UG@6-@55Rn|~WskDJFKQ*|(&$QG2>waC88m>OJaiHl47Z2>B2LGfW72|N#q z(*5tz7{h5Tu}0VPZeqQ0^u<9+OXxGXZ@Xn20$TB*{~*GYpC=q`+&fP-X)3o|6*LJM z`rlT^m*abj}nT{VJ4g%CNar0W>%kug;$6VzG>jiQsz+>$qH5Q@*n zWcCh|z23=2LNQsT6O@CVsSoUKH1+Z>I&DxboDKr)r=u^x%24J4o{kb*Q5|2^=($)o z{-q7(Z8_nz+s*Ph(igSDKJfaCew24X(Rbm>UF4^jsS%LU1oNVU(uQjGtuqseb$af3 zu%QBoBk<0tC#|peKH(E`#H({h3r^EYnQSdKVR!T-g9rDSZLWPDZLQ<|vvi>G)*El# zV`|L2m19u%KtQ3}W55EhZh1m7P<*s-1XKo-$h@#d(avH&4|Y;1dGLr$1 znefq)pq{WIZdTI!9){JU;hxfn8YgIwt=>z|d(lr*BGeqV;#z(=zZ^<=kY)b$j)DC{ zUAu}8N-al!dP7@#!aiVg{zSf0l1`hMOJD|+Qm|~)*CB~+ZjDaW5rN?Fv;klkqCD(X zx{pQN$pLd~rn=igRR09fMlr=pE}{%cgu}-xq(H20qDF#mc-8e$8q)H6kYOad@|d?W z))>GsCISrPXWkDXGgcBV;!~?Fn=Q6SF{l5CIerc~l&Buf#A^pm!`s}%7Ug4uG{Tyh zft!e=7(^cNEC7`a`ykbMw}g_t?MQ`!raUX&2{K+pSUjKl%pJqbv}`x zoJAZ|Ndg9N0IBw4`wCRqJcr;5Tw#BcD&g)OP>cYi@q_7L7c2#y=hm0;z0Nt^T*7D| zMyOW6@+U+w%vLeGXD8x@_yf^io@WG#ZTO47z?vSbw~-UXVkf65Mbjn7Rmg!JkhfK8 zKbr{KD^*e6JKI~hmeP;*8@kk-@M+h7SN2!y2DeB3eEaA} z-OAsAcazZSqN+wu^)ho6hx5fTtFOjEq3?HamCNGZ>otZ_&1m)yGYeq&66(W_JC z@2@1kby@;ji2)f;2eeO7x>(wKYstYTY2)boWbn0~`~Ei8=fvfsl-K}MkrbO$q*x_8E5)wr$Ak_5-=A(jn3Urk{LFi5ZE{*3x_?l0%WG4Lc;>)CuM+j} zdv1SwaRWk5R;fAFFj~zKmKq(bBv>*uR%vGJAV6tKj44t>s@1`t-DPi4{>%@0nuwyz z-f<3ZJ6;i)VxUXEto*eU@78a4#qnL4l}tKwxD!Hf=5pM~bUrapCJkLX@o#NyS42u8 z(ieJ1XE<+_;0(5awF^A{E0%vutH;QT|>F;M5ljXie6*+6Jim_{}gQcKi77Qv{yB zE4ZT2c`4E4b0OL2su1gMb?cnPX&z}ryCI?IZpXpV11HMiKBFJfu9RtqbDG+IOIkg@ zoz|nVcxCc#SXG+Tr&oPT#^V)iS%0^#5|Qg8|6TH6hTWrW2x@e#al3HftFWPP9^)Uz zra5@%H<*^&V9;$V<-)a1ri|0xhezw6X>6ntg9&pC=%GroK?HICT!{8DLGnNF-A`E~ zeSO}JZQ^ni#|z>i=u!4KUu;UKUHS8^vBs;Z-a_&LKYLC+G~q-5+aLJ%E!&6YY~b9c z6OoL#@JO&RTY$<T~?hJ z0vQ)C9v9{Fjk1da8JyxH#J9RH20{`Ay0c*0BnK3L4`DcFXAra-m99&9RRU>0)6satPDm(+ zx*0BgDj%kRe9g5yK3zSuWJvpQHHv9e=WH~FIPFz>`j=O8(NYP%7NEj`VV&zKQtfm? zWt#xZVhEF%*B_idUbj@C->vg+569p%@IL`>zqZTgN5G36R@Hl&JW@F zCz6Ww3D|-BV%-S-ej;?A)c7;`My8P0{F!RRslP@q*ez5^?B5&}?qw;tq*BJ4b>_~> z_)HvME1 zCw1JPEmcj~_PUmx3}v|)t`yGLf;!Tx_r{(yDHwkLrfO3d3R9&{@vOF!0f+_84SArf zHE6U`ftg67N-Bu^d24T*{i^Hblx)&Xq5a9(;_IV+Wo&z)1nwXK;whVhnqfg~XFd^# zW~l$Si|g_E@4Iz?+x-f*u=9)*WNB7v$x_2eK%dzFN;tHlkz-a1vL*sifUAF3NwX%E zEqN26$QFHsj z(b7K_>NuHz;q{oJpKtqu`XM_wC_8E;Ze6c;605YrKYp&25i02nv+rKsG!wW`*aG$I>5JFR)gIQ-Lc5 z#B|c~O=|XZDX&w}(zLTWe(m%_sdCL^Ia~tL{-UlgXD~7Vu#8&ninPEA!spSa{EY*D zn%SyxgQqQleGSy7F^)fTqJGYAOQ%+9?ea2>Irglr;tOLKqJ#a9 zZF+G4t-pd+n2izn#fM{q*N8>`x_F0+_=QREYhr$iOY0JVVpI#kj+&|iA-huV&s8gQ z_2MNQOjW>RJVmjsrC+-sUe!2{pHOe1b?A_e` zSF{imD^rCjpahXZm2<;TuDn|=*a0yZSA~93G4NY4+k9XPI*Ai{V9TlSEpB^7%ej9% zDl>4iKn1k}4BNnL&R@!)6Hk724BoJnKjwADi~<96icKgCK!5qs&rs_;g~uqp!SP70 zwMaTZDx1Ai*`{=irQtANY&{FFMsULwG$spW64ic^9&Zj|hQ6Deo`ZRsLzge7;6$ zKjBO@p;D~j=F)`cmb4HV#>gFNTIIF6L# z>)`_1q`PpZg88DUB*Z_e{=$ktY*b+P@HMb0^BC#)<8)ztq|cc{+A0a@$M*mM1nZE; zP81JHh=;V|tda>nTiz|}q&-;{bwYIrgJ`v=cB>P~g=7 z**L@B?aoC@VX9PM=Io31pGCViisTib1MGt5bDmv^D(b+hP7?GgPceUu2FOZXg)NjA z84-QfNl;{Ch}y`28cO*J4LU*uR!FqGtb$M>$3vyaHe>eV`f%}Ow@=OIBEp~sjH1-w zhl9xvpEmvVZ~5@1xB72`iH4(mm$s_ayF}_|{rB9)mASuS?k3VLPS{DfMeG7Nr2z6C z482^eBx$-vC`mqjIX2m%dDG<^jRL^{Cs`2ZM1l7I5F8f3lZf0rNpbK5x3*SeJAm)Y zDomD3{gV9^iV`0}!7H(B44ljJSX8G8O_VNYW z3$^1C$Qtw@r&x*e>cEAu;Ijov6oqljA+QzK4T~lgz$pCvxQ4YHQ#gY^e(w*{ez2wv zKBxm7mYV=z!Y7l^N`itU7U#t%GF=MVrwDIYIU9iH_blhI~9~pOeL*$Na^16S0b7bd!&2!+)O}HZ<<_aRLe*X0us9 z7ZI;O4~~p6vqaiDAbpuBC%(?XM!noUwMrX50qdT{Od7_1duo$X9!r+%AB}z)Pkg)d?xuB5pEE;dB=pgumE5@yukL`}ZqO zlKtn!=use6A#I1iUUY)hprmRHS{o3@v4gFUMEPYW~$&cBBrYbXKlb#WB9vfcPy{)C_-?O-mxSp zbakVCg;kl^zpGd4_(A)GT#C+r@*d7nHeffWd~)(eDB^_G0wDANF>|BHdOi}b%G9y6ZHoje!uyUM=gLC-kMP*k&!6+cYnqp-(6Bjfm{Emy zj@14e2<{OzYIixV#kPbA$ZOze;fGtO5;JB^32iE7WVdo=d^DzfV0P15D91Dgk$;01 zCF^q(aU3V&57`FFA2PK*@1uKur9oF5Gy1i%q*iwUr^gttg2%rr-*{iz?&R>ja(k}rZKDVf ztJ#?54c1^*^gOJbX$y*KL>bArlh?p@LeNo8;*Y|=Vw||Uh>1M)f|onw8j|#}Qn&N_ zEu2?<%9(yY4&XE|%JK7{Z^1Qpvq`~?}edH`ZrVZRR^soOoUISc9XjD4ZE%^EE@@ZD~Icq02WaW_n z6iU!0FqoXFSIydL*CU4v#XLSHDU(H^cW;4KW|lBDR?X*B1N4)>wVr zN{hiIns{d|NsQod7mrbOv(d4Cz_}}dF}A9&v|+~fk5Me8ofoata$b+AOQ|FjGlFxm z>BjEB0{jY~Im4Vtd+n0A$N3qn;6YxV(C_do34b??6?u~`aIwy?&w247=C60o-JUE7m$F1~<1pP9Jn<&~~pr}fcf$gH)( z&pzuhzzHb2gUkcWODGp6jJ9>B%g#u8iONbEi8^gQXHs794*&Sn#BSn4aEeMb-beQ% z+pAQy2$)Pq=K};7&U6D~oP3uM=BIbpC|L=27ZF~JB+O)!)Mhg!TU!TSu zO}sxhQl}8N;d%KDt!Qo5p{rxA^HE-b22Tn8C^MG#@d~gl>uR9Eu&@zsrXlJx}2K0I5}C@(@*>Gx4S;-@rb}; z5???Y7AsHC{nU@N(p%3(`Ma34#P^ZgAm`bVHx5+^^E;b%LCibao-l{$loMBa(wi=3 zE}6sCEkO@1M0H-jZ}mjhaiOcKv~Kmn4gZNiN=#Poki!{&UYRo1r833fFa zS}HMpol@wD)Q4n`*xdKFxeI&ZPlJPX`xgCyP-ag?RO~Ws*upyac%jZUb?%(njGfJh z$CvacHQPqmO16Ic9;e!(4uAF8`hZ(e6uPsv=-aG3xt$K1)0?SwC`zw;A8j{zdYu7D zcT0)xd;DzR%Ac7lZrKp1TJ3tN)7IMTA*fG0j;ED|yW{QlPwnKf1Wh%CH)_15@L}(Z zCq*%F`!%1dnvRBX{|E|@auF9;O>hGpJAk?|Jv{Y8Y%p>^zRha$+%K$-3kJGyONSm&1 z5^gq_*GPTV|H@kiDvbhbym%uHLC*)rhM=48$vEJrDLd%~tjLJ_=5f0Z1pJSqdyi+j z|NjU6-uZkm8^bViSV(i0s2!YgYJ`w9l8|ajrBc@p&Zj0Soj0K+YNXP6b4o7Nl%!IP zPAb)uN_}eAZ{OeF{&IWs-fPd-^KpOt-I2NauKmqYY0%+6HWi@YdArnGRX~ax*rD?- zR=>9k?EFI}qQ%b zR~XLLxYj8=#$0N#ri+c;r0cV&2CxU1P}}~lfo1ueb6bybaZXICRd&XqvdTi6FvAdO zOD^8uQ%qf@4Rj?v*cZ$+kQzuyRHn8p56QQ*7l?f}<-(U8o4{Ji`bjYdB;~)j;44?- z;yBS|k=Jbu)TP9_n_v8YVTm77_SM%94qeo;;ZDku03GXm=@bX0((^F)zwSS@Z92yi zrAy3cvAMW7w%9Xp@l#{lhxG$?kzV_+NGLRJ=UsmrPwuOTtP@15bL|(rB=gml)v8O* z1!{Q5_0i2ww^t<--x=RtcF(d{RIx09<)j}Do0w-1P999I)HpolO{)(}+LLefw{OU;4CQ@j^@$wuu!s6CcoY_^W zk!NRVrd=A!M<_NLC04-)Bm{?Ys7W)Z&^s~IyiD1*u(~@spsPQ;ZFrbJ%LnNIjzz|& z7+idNdARa^NY+Im411wGJK24Yhad*kwY4NX*_Ilq(rf3xHC(<6ZSyxMV0J0d@GE92 zz^znd{emS9;Mve76oDAKZQZ%ALGXKmB5T^m5?Gyxazmj-1s&*FQq)j>sl3SjwV(%W zFh6Mn-3r=w#`EBolHg zw=otWs&lPn7`5jX?MZchVIw~q8HNHTa0xjb5KCE+eVWY~9+O2`qGjO~Y0fL+Y!KeQ z9B?KVoM_UE-CQaP*m7yjdP5@Gy{k|kkRb@)p=HCmrtO*gJxn1VU0knrHu3{|AkHp} z+@hke4`PiE_wv4ZoRDXvHC{hF|5(IeeU|yp&e40@tDB%fGL>mD6N>EUCTy)>Fa13X z*}ES&s0&rWdWl6lDmTN2chU~gJi8uGsnJnMnzO&Zc!yQCyUSE-3@M@QZfI*s7#VwRe3bez)kU2s8=balV9vYI5Y69>amlt>m zI9^>dpUh%k;dcpqR_aUgP}%onq&TU{hD9ukT7C+Y!0310u9PhFE$H^m^>26#zJXq~LfaRXvTQcdy3-ZUZ2cjtzni`*Aq zx5u2hx@min;w%m8gE^i6-gb0DtkH9=)ku}ArgrMAi9pp84BW=K9wKr? zp@?TQ(D3c0fL4ZCtEos4l$N@Uu+A+unWVlMTpO9U?9i@Huc({-LmW~%2qC*{9jkK! z7uzjU%7AVNZbL9|gk2HJ5)u|JJm}<0#KgIXAQxN2PB}n?TVZNnnyv`)64-~a<4;%3 zwPTC*HoRn|m1)aqHIx4j%4~!R%NN{s#kuS_4l8y!%NKdYt08w1xS;Gf)&tf2!~L;v zkB8$}??e9;8n(&Z_sz#<^#3t;+q%&uh#|p^{(<55PEhvhdW^7Im3y5H);3(|^_vgM znkNcR`HlaX+9P%-Y=G(C{aSh*lAOpYie-5Q_SiBGp#F5jSt8p4gKf|C7#Q%mjtpyx zb&t3oTZ1Q#CGo28m3Ca)&>ox}xXoVth05mr8fjY~HX;idG$Zd;wJnoCq>5~z1fm_M zEo;D>1riRN^mZZp(Lp{sHcs{EPb{}{k;tlR-|Ae5YXl3YQ*BkOzzvA>kaP)oh$Ru0 zBqXS?a|R~yB(9XzJS1@ua!iHYw+#Dp_1(lqjun!?h+2>7AiZ@u$Yd@4^O^Ey@3 zF5|4>=RLS73B9Xf$yAS1@FA1$=))0~zPjoy--!@qw{d4Mji`nad+o`E)C7sN?|5*b zculhZr9X7FslBQRU!C_a6$|zad$33$bn^t`upIwR305ca|HBCw z>GAR8_P9XISSnA(A(^Utsa;gd5NFqXm2*xvB|;B49}A)uvXlHDdOYc23b`RSfnGUQY)3i25~!#kDiQ z_xCVnVZZSdXfeOUoB8CBzlaa0_|WPf+g>KnK+ctG7LCi{v*1MqY*H_aG|M8*sh#W9 zo5s~!p-*=RZu4`jcXahbWg1_mxn(cgI*?5^u$Y1SzF!}JyFkb;+@mi1*?OS)FWCDJ zCoD*k3L`*9!RW8_*}}T!HjyWPAnivr+JRE+qPFejSjrlVy7&tM#mqp7QJ1;*xXhEP z#wC|B0dX}WR?9;j6y9H~=c`{$AxX1Ue~!WP{@fM%3cdZ=*4HJFKRrwHPnMdL>brQQ57WR6R^VpRHw!AV&9$_LN>M< zf3ai$*f){FQ4}qnmM}L$hsLp2$l!`*iCbMag07;ci?IVLL(gCBC>K<9#NSrzlSe;1 zHm+y<0*o@BTR?lPnd20x&>1=8#!!36xnQjtt8Dt7Q0-%rqg92o5i@K4N9&t6QE>@kp_@tI>S4? z$D9u#3-2lSok0KrYtsb00~z6D9ccGTuX9uTUjX247Bb? z63h%0nLsLo?=kBv&-NsUv9q4V|l^%kl>QiZ5`;3!N=F;VV z@=)`yb7{RIcO7p2ID2&}+d4S}6`O;iflz5H(!HNYPfE-0 zfWjQk4aN``#OFtBNGw`9euPe+a_*jVelQu(stQny`^v_RK1I2_X8S7HDK%gtqT0FA zh|Ob>#w3q#gkMthRUdi&L_T%xSmyQQQ zNEa@umw2WFwZV}1zuoTnTpSc~`yO~H7K8#Ir}V)XXO=`=^O9nK9d)c|2bCYt!<>EN zDFp>(kX&ZZedz|7U5B2=SPRne1bo;tMc-MKOnEkR5X4ITSzEC zEY4d<@D)8`jO;30x4~CLVU>YrMd17oKdu)i)CnyzIcK(Zbf76A4EEeQ-_pPyDi54ik&{%MOw2tduGzUz^Ku(;naZxIDl}3Zc+A z|GKlR8inw#+=a8_MY{iz)xQ zki*Zu9^J$qboBmoa;)4w{L{uKXviN41S&Dfkhmn5(yuoxLW(Wu1B68a2e-(NgDg|LcDZ&y3bIQ50)D;$QplxtqEAM>>T(&jqy6xlkc|04_NT^ zo_93~AWYt@;b~L&#ae+UrtXl19oxFq>3;{$|8Lhx3l?|q>Wp==+BvxgY&aCvsi#&y z*uk^-b;MyYS+^^*ipGmDp3XKs4xCLSwC}&?F0Ec;MK1v|bm>RpF#9YEN<9Sw=8eqe z_pz6)4x*nuZA%Sx97_TPHXGFg&~G4UV39vhQjnRxd;tgiblU--bjQdVu`fHvDYw%o zSK#Mj&IdKtfH6Y=CbOiPUS>>MX7X4#cXJg^i~O0qpJx)x_s=$RS=SeL%%UP0UHQX8 z|Bk&q24oq_vDePP<`S86Li*1&lynpH#laY1`B@kB{OL5pcj9ey$IxNgnO2jBU`7*f za=u0cWeSnl^i9{ht)@i~mc(VKC-GwsvfDhdVu1s_qN%i-1f|p#fc)Q4?4Ui)1y*MA zVT&=Y5di-rPUp1NEZT9(D;v7E#FB=bKk0Dp#Dk)woI=-;p=2b>?|P8olax@+2z=Dm!(68W zn81ny*F@He*|2@QnXJ0USvN+perTDER~-T z$dady-VCR`j1z)Umbv%@RmQ}EQj3(fkCG#_?CHF;SS(aro^xr*-Ri8x>i!e zd%Gnq6g19CdJH;ia~~eT!R_d=V^qEk4I-@XK`|iKI*{RJD>3)Z$_2U0O=G=OkLo;; zq*gJEoP*0L^X`4S!!C7SCU-}s1jbjF-rC&fw`L8YAL6pk$$xU*5AcGAJr;+yTg4_@ z7IUpSdyI%|7l3zwbQzsExb32tag4KIJNndJv6E);CYXK@UlgVgq}e?yhsk-)5tU1M zB68#9@dDwq)8Q9v>L1Y30yZ^$r^_#O`C(9izNeUXA>?NV*GqF{l+2B10=}VaNLR?W{OWhw zsEP#Hn&!G$Y+Og=egAa+@^!K=_a!lpx<9YU_!_7z5`Ij4d1MBAVD*0-9~J;=^n;F7 z`}2DgALThd$Wn+_Dl$2};_u@4*B zZvopRFbJTr3fhH&-mf+D)}HlD=1gKy``6z)8ke+Z$oE`1)X!FS!&dDybTJveB-!F? z-vR42(#DZ9wFB|)tKNPX@6zwsTofb=_Y0c8eOd7}C=mbYO84MO>ouDSZW!jGku@ZH zQbe>^%tV90c@u69+@N{8tIW^v+V3a$_2g@jOhf4)Z7Bc8m7Y`Sf{E^{b=v5FgbTuL zAHmCa8jiHb&Bh~I+t>Yj@A?`?LxR?%vbQqTBSUIyA8|sNHRhcMDJ)zKCg-OglZK#( zS8pxP_y3hrML4&*?N96}_1bUP8qLfuTX8VGyZ0?Lr^BtG*3Zwa8`*Zr-NVQ4&EdwQ z%ZT=CB{=074|M9B0#39AX^IIZQVo~Dnxz-PHnt2ygi*`dRbq3gLT^h_$nlYdc2 z-hNEA{HXb+H)>Qs21{bW+u8f&Jn4jNBrv~IV+(Uq@KuR6gNHv>WSx1`NLx@$S7U8E z1nIDl?YXaQD?0{6l7lRC)=~S2uNUy!FW+IO#HnULH2ed=>6G;Ar$aA~ZUKiWDp}bR zMD96#{+n{=LB=Zyp?@yDG&b4o6%t*lkllaY=oVt06?i42ZuJ8tqr$I&1+g;IF+j(c zl+q^-*m(!eJ3r4Vp9}v(0y2(2z)E_kkJ6gpgez&l+rG?q_&j}VXP^bL z^mUEp_EtqdiWO1#nh5tD2tI7A9Mj&(+8f=thv6;T67Bka-+zZPBYd}3<@DDDMd)kQ zx0bZ2p}+q3(l$a^l_h(>ydYZ}Zvtw*)Mn$C?pud=ZL^Q=nQdfPBsz1w1aF%KLA_yf zb^xiOC9yr|K&R9*p*3f+6)kWtI&4dZ5QfpE#zfKkoDyVCj1xxT;9O{)SH^0{Vzh!P)} z8np9k7(BcGc&P5A)N~;Bk-DLG*d)e|Vd~N+6 z&wi`hX8mp@h7>pLRHi8_as!lQeve_WhdyF8b@Wd89ie+ak>%GMe5w0-^AZ)cnEAP} zk|F4^B4_s6XA2NZh(dr(m%xu-sLYarzy}q0X8HCq>Mn#g=}7mazQfs0+F()ptr+3Y zLV1pZs2Qu0!R6~=&N`JjTDN>-n5mUcr(KGYt`_C{_&qxQ8Fa;PY|GqUh>4ik_R?ti zbQshBcuQ!)iZ0;mIaYNDPefZslq_sMq_=exoHsYTW{qc6)y-fPDn^aV^S$Yq5bRAha%2Q@tZL?h5{#%-UIS?nEaJoZQJ`?CnT`0O%=xI_TqE<5 z97xLIyOWR!IRiZwMY}SIwk0qFlNa+;HWKp$gxr|-s!*uqT9>QAn1X$lp^S;(oLHGHJqW!jf#Q_Tp+T}Aj^JRba|r<=6HU|Lc<`w@+Nj+ z2v1e~o7v!#Jc%Rd?vV@nFOE{Vuun1-vrAoNe2hgM7u1_kL$9_+#f&(`uD%4G->I&S0KK>)I^y9|$Gj*SM1*1NY4hW~SlaHu}A;f^wQgEj3v zt~b6V+S#hMK*ttJIeL{meS7hwmwzA{wUSXP=w# za{17ZwvYBGCzt;!%j8{v_xjwl5?0zPkgL=7%%H+!Dt~`I$zQdFA8A_V zpXn6A#zedF3-iPH)RYOyoY0)w2R(5rx(jO28R)p@(_?RX+s&{Dp=_*pBkn4Hl&S>p zUSM9oz^GxuG{^8%&z(ghk%3APGSlb-3u=TJmDwRraH%pGp`1s^maY5^VB$pt(z%PF z?91Xt^9HSDHhm&qPJO|)(1`Tp*^Mi+g%)X{gcdcpT#X1S$|v0eYxtDzp1^c9v0QEs zk|mr_nG0%Yg$6!R2(n7`SnOe=7ZPJ+9*e3$?j8g~4ajTE)Q_N=DJJ4vxe~bnwVh3l zk^_|hO(#IbitNP=luPP&N$1cn2BxSrkUusiLJx9>5M;Oob`U}*<2AQ6+raW{{43_oW)JteZ1-4PoW^P-O7n=@#clGIW0Rf!yhpBk93^2|5UT9vop-=>x1jBa6U z2<)2;p5%km7{yoD%9ZpLLtCD2mxjh*P%Wtx8XfSd;lQIJ8l%`TDEL3@HiWz!rA38dpIJZh3$?S|eMZ8e~#thG@hM;&tCCAn8n z_qzw{rV_;V2F^6+0^lbHsy};~0dM}uECm3}m5vPrl2`DNV?yXnVb@I|WuVsht`Pjf zMtpV9gsHA%q|v-VxQNCVbf92X%b8n&O;9`S=YMGhPG=H4Vp;IwRHMQP6H+Jjj!cJL zNJ0We2SFABwbilyuN`NOD5A}sAs)>09x6EgDcwU{Y<{Nwi2tjvF56$r z-N|l~J(gOKRW+R%^A4FN3+|3>cGZGB!~Cyv3A4F+k|LGj)Ut$$c02WD+&^qnkRvPh zT_d?elP($R{}QOF8;J^ZuWAZ^M6k4?SBA1sLt0F)c9^-bEY>|COp7Z|1!qjRk~7V_ zCKf3h9WN9DPg>f%0d%%pIE1!%J-GY<^t`S`qEv5xQYaiOk4$e9HpnBVL!r;1=op@r zH{HzJ(CBT0S4=Q>hR1q0fg0!rfR@&g3eFbVZ#zJC1uZJoT4y{0y^ueT2=|+gwCJ3` zmqM5N^?@_!coiER56bTifnwQE&s1`|4C1gzU^#BO` zV>s|NA3V;g%`6Ty1aar0{K0E2V^0||R3N1YE7t0W3upKfCSons2xO$>QyDB+!n~t} zId^VGyD8c|9VK@bqtJ?+$3yCW}M49;8T%%ZKcD1Qpu* z-BOjz*WTAhxc{9M!aSY!N_xR8der#4WlA-4pv5eHrQ-&+qnvNvSQuT>ar91kxE&+% z0koAgu>C!B@7IvgoE=7142y9)Gnp1PPi{g|w`Q~wT=$2B4M0Lggt{K^3wdoCn{tqj z76SzUKSnBBDQ2SusgzJPh^7KN6t%d(Vh5M+H64r<$iYc9yIu?b!KD&@u%O;*c!tW< zTTb$1C*2XzJVmSCvoXzmX0$oXfEx6JpY-EjN}xeTWP@Ayv~yjI(9cy{g!nbJ_$hwM z$)|{nZv4YOTh~e4%MJLy6Z4qjYaLpL(gv7vz;asjaZpQo#8;<3mt7XCGG&5DmIj75-NwQMw8s_^bV3yuRTNhMyW|i~C`6EOb) zn0pG*e8BAK?}r&|h$q{4_Fqc9)=!cOZWWSjyD6}cX5qR88O_PfPz6?Q z$V@h}(E9G-z;XmhcnYHPhs{{@h#18^!=-M0Y1M9Dz?l`AqaD`hR_O08w76!Gl_VJ>E}IVHaCRBWP( z0%Dhe7IwgU19*CbZlaK(J`h(IZ0b&$TT>cUytW>a&jH8ENn5lSZEEf`8+xpXW;J2d z3^Us$|M&7YOiC(ZyXw4YF-5%1$W!WF`_wuED3G$Y&_ASuv?U+TnPfS@Iqz_Gz3ZnV zPaYpPL>+-%c?312k!Ce>`LoYZ-eM3h4qY^%Cc4gDrrS>*bd%{k|0nAF5$17~u~ z&9ZMh%&Oi?1J2(ufWzZ*>sjmP|4R-2q_zaoo?o56!iv0;X|Jwh?)}pRIY?)hkx**-R z>DH-Su&S&HUNH)kWlWmZor(SDZ?{RD(WMp#@?mE5$L!9`4WofQ-WwrxYgj_xqHNow zj`R(a2dm()4IP2On?}xTop%&9zaom?&TBj3T_14PMmlpGv ziZP8c7^gd}qK&#`G4|6>xfhXf^Jx&L#FljVt1m>zKZ$ms0}q`3y|hu@lJhUA<UF^kY+jOXOOT9Mebe?VBVpj<_QntdHGE@LL}dc>5hq;4=~Pixv;2ty{t(*)BJ5h*M} zewrje%Ahi#lL&0!Rp%4Y;MKBTn8AWT&~~K=Z!d9DXiCxU(~=TwzE*w)ee&%YM>w@o z)ICUH43uJ6H!w;!=!;zfpsc-N={D^!&W&P7Oi@M3pOon5u4UjMJlljWcM^xSLD4B`zbkl0qSh!_lYT@b1 zJ}2H7YXQ>X04_&sx`D}YZ%AF(+Sv!?X(o&#HDvWM{RY?I(mq2Q)INH!8cf2VV@kie zZI<($uwp8=DSj#r%y+*Z8b-8gZ@n`TZD_q z2XK*rG1-C73N4bp!flDEemm*OR=eaV-VfXC+IfZWCCdo7KdBqGtXQ?zPKiq>zk6VT zp#**;7~yAFLA)S~8ZXd71amCPw?&%gAL3!Iz6uH|jfJ0DA$J;@BwPp;S>q1@yXWYL z@nbl8aWbGrD_F%8Gf}s98P>4!bTw-RoeYoM0oURUy0-(?Y1P~Cx zCm2t0KaqJ*D??0RN$v|jDB$lpf2|(EMv9r{ta9G~dO@4`wh{J$9e*m#di2_f251MK z%$Qi=94E$(&pZepdxcBu5<>>q)scTvPcPAy5cE2N1=7&3w4fzAcc%K^UJ=qxsAXxH z#r_l>ctt|U(%&@|OdiWNC{%2=AK2G3p|;Y|ojK(?xYb-Ew0*4K^-`+K8uA2+ahS9? z#kQ^BlBTHO(^;Nf#)5v|3DC55bgfL_+DgY-3?nPzsQ){#*Tyi(tcS!OUh7h$(MmWYfn(vN2#y&Da@`JelT4H>+zBO`wtX0h z2h5DTZD4Q#9j$-L62oj?0iK4MZpVm7uWTjS<#jM&9NfDPsHjdWWkJ`d=6n7Srr2Je z0NKkvntHSG3o< zrGW{?-qgd8t5loc389;JzOs1o^-aaKJOWVTfjSn*n7@DF3z=cO0>LfMWZ0Do3SCh2{4Je; zy+V##PtiqduV;gf??Bj3**2B8l(K};tlgdsmZ@}*g*X>xwuY_H2#d*SG^_>j0J2A4 zuVNaukok7zrj;3aG-?0@!$T9x?Lx@{%MEY^n^=Rz;7EtM-oPVzs^_kF5 z2$HuNECW^Dcq@!Ko8{ zgItaS?G9~+H`qG@rB;6C6f#_F)|2=)IAI=r9Xbpmbq3dfsypGK}ebxaXdukt=cJ+ic>AztCgrQX$Tz@MYieXPFj49wbx<-9^vuT32Yu5C*5^hstn| z0F*`mGXP|}0UU${eZ#}=f$y|eB3=`{7JuhQb79e3!VM;Lofh3HfIZPdwym(98}{Pd z2B9CIX1jqwlNG228#{?Pw zpO*;Ttpz5hfdA-V_+`|80PcXg`cuAHw6I`|2=gt3eIHx3zZkYhfEsmNU!}$G-hyi7 zVK?)jC|-t6w*#$NqIHDWs}_eyp~SkZzgk2F5z^!X3OEG8YT@zHf2>jae>l1cH8=|* z?vlWCOq%#%|Hf{aFkv`x$boY2plQPF!Wts3{6H)tuBq}cx&xc-NcKk4Xj zJ=6L>4T6yhlY$yToqj0 zXko%EyfwPKT#jqV4c7M}p6U#i?XqZJ;D`==9>Dd>QCl=AUtnH_Hl7PAprRHsJd8O< zFVbiU-`eRLPldOrthRahk%*Y%M2vyedP0YJGpp51PJkjkPnx)J6 z-YKT&MLL8r3l!h5Lv4>qY)lH*B2NS5G%2h_gTgx^AYN-#d`|lSX{ow=JSKPv2*ec|&qOJml4UzC4fuNx5p7eboF5H}rMKiQ2xOV9eb4EG}oG|t0* z0Z?1$h+H}X&)iweuikv9+E$o65LbPm2B-Jlr$fSUe21TF&V z7SThxdy~Lf`x-y}$apgge2z#kTvEG&HWKy0=&M=y5^8xN>>${@lw4a@)QwXA|}2Q%dwvKJ7Je*?HEM0Xl+V>gX*9J7H%VIUiqf*?R!Lklj z8D5DzK1HakhtJG-A#KaO>2MSX8>l0MOJU(W1Vt0n|HLZ07P7k5D&%stu>ck4ZEVGN z`{!}W_{EjO`(1+gxaHu@XL-1QRG3ynUm!ppm!S&9U{e9=tSsJM2e@e<%lLq7J+MrR zpwB`VZr%4Q!*y9)K@1&c%L5@#cf8FM)Sd>dx>NQay^Vn0H?9GEIt{+XKA${rz%#%R zC`cnNIl+mm*O$VjOpwx>wHr*{{RID*4;&vg9zFzJ#)?~^#oyN8Gqi{>DX^JOSo*C7r(uQGKcjtU(vm?TZcsRnriAKGmTrJ) zP~ie}gS768g$;y+`Fss3M;$rve%nD*8s8L~Dodj=M-B62?)% zvU6*W;YQ3cn=d2O%pGQZ0=+k=Eg0;}ii_M04bere0LTE3wO0d~rWmP|gesX6X$E?f zXP7aeZIdr$RSaZdkO@TC&i`Rv0(TBJVS9HmgX$7TWcnOxc60)ruzTdrL)JC&kwkA# z+`0#s){9``_34E^##$20-2(BO3;N4ivR8v|6`mr+){y734`~oNKSOefg#|>raSftC znC>F8IM|Q-sGvz25zl4U4wgelG`PV_A>R{(Yi$VyJd4c+>{$S7)gl_hXud)Cl~TZz z22n_uO>>a-cB@jv?;-D}-3{ z;l6Z;I~`t>VCL{qpjv4rGRegA4jxsOyr1j%o&$NJBgD`z$bWf#L%c!;P%T!OaCYvc~)fc$vDo$~?0EOz3!3%1~>=}<7vv9Yk|5c#PF zaZ?Bn)WL4jPo}Bh|ELJBd(oah&^MKPKRUv1GC}=6@$EGpHM_tLYe55lNV`kmeJu3C zT(VGWZlXH#l?c`E&U~D?SZ=DBusB^T=QesX^HO77@B9PC{wX+;fVGXBTrIPF> z$~ze_8nE5>4dNyX8Y4q{^DXQ(gq1qjc^*9Vjnm4D1eoV|v|wF$Q*3{T>?WdMUopm5 z>R#p$yXsfSrhqG3j3eBy^-%!4enUr1O{-S-_#YPja>(=N^-Dj|A%A)BHje$dLs!}w z^gCX=vyv?!{+^gnqfG8u?Q2a`)drpz!V%8 zU9&tR1g|t>hoX+y}CCuF0$r!iW zt3qRV_tp{X$t)xE1pa?Q$Q1$Z3LhXB!c`&TM$8B@3EklYK9{7S>_O|!iYR|4QV?mj z_h8lZujmfkXNx0yU2Sj;5w0|Ay%Nd{uuk9VL*dx0={a1m)%xp<)en8H4@rwm6cA2J zaocRLT;KG?RmXo1LUP^hN6PSzv{%dLm+sZVZH+O5s$i5Bld=~!sUZwz0uv>OFvFK< z&B>J}*bwaM{vBq^9#u^QU;~Nof?(CTbXcS^yj=@v*AbXwqyI7ccZT+D3P^dEIl5aF zYvB2RazR#C2|5iPmd+k6d0Bdwv|}4cAcVC1fVR&$D}U^W*Fak}2fwfXaK?K7M_24c z4SATAc+4C+K7Hr7i?D_l*!AKgSn)q-{h<)rp_v(4v zyl{8Q4brQRgGz*b{@hNlbmY+upX-tZCG6sB+q^PlJAG`Tm_xa=oa%3%EsvySc2T}f zCt}Ufn_X*?9+iZ;#I+m|Le?{m%Kx$L5E+BcafwqT$1q`4e{`d6_=)E8Nk)yXR)!+&{hMrGC$!U*Gq&jmp^M zRE1%UlU`^Pd;*N?<<#TMdmGrPCY}Nb!mO8LwUf~f^dKyRU<;RCFhJaROwa&zri+Tv zCSDpoa_JENP5IJV%)s|LL(t*28x0W%Ddpg`Fo zo#&@&R47Vs$5Gq@rSJ%@om#seYxrXmc6RU9ify&mwIV3oc1kAs(0QS7aYntiJRogm zec8sqvLJFx+WzwSV`;C1_6L&mXSyB2PCxCpjrJw3d$@7?`;q2a&T|Koc?Sm?4#@bE z{Kk#dTb7;SZ7E%Vfcx^wn|NCvZF^kn+A_}~X3X~A)^?2A_XV zku6qFURC7xXF^ZRZ}=Wg^B&W}N-%YT)7H0jK)>mIf!dy${36#UWz&Z~aMkYRT6mRN zyiHSaxa$>3Np=hS)yae-!m3NJ8i{i8lf52|wOqfM+b0VbXK_sC*S)8j4!bBo^_?da z7wBe;%-7;tM9k#1`J_;Sa2DC|uJoej$y$olk8i)$%OoaG-_6YOOO9YAGCLBs=52=> z_c~P|ft-G^KO1I{ud{aQO)3jv^UGj`eArE*s4r!gyu{S)96iJsm(XhzVzTN_&jFiH zWfS|&T5bBko^|hsaGr)PClmoWvOl~3N~J(zjPC^gr4Kd2BQQ!?VMJR|J5*|XQc#Qd z@WFFu`Fx>U=5YzqDRkdrSDQ3rqtHQ4T}70iJ?6#MQhO8Y*s^txc!dq~83v&i{Gcf? zF)c1Se`(M#Z{r~N75gmj=Bd^#H!|b!X&}dgH5oIE2djr)Zae$2uS85}KL$X-*-Cm} z*^wvRYyLx|u@oJU{uWH$yP1b^-z-4a8j~l)kmhO)!;V7aA^koZWjJl zhK}u)C?q#(^$^s>Xl3@Fwl!xHg4`N4C~Hr)_w5=9#7SdeMCG8L%-zmWXdy;9-SGdE zAkQ4F(8jji!%HKv8tFKg86ZR~XB}*>7Jzmm8_P9E#9p!>s8t<5bFJN4v%3uI)B}Aa z>i(q1jMG=nq_%;!kb@z#^|#>zueKz;;vQy9fG#1!E%qc7EgUdxt#)Q2QyGv&lg%LO zfsLE6^+8q{?4p1NzHgDj5VT5MQ^0UjMco`xC@uZ!@XJX7(D8^f$YH*RStx5sWqsfGta>qt(s6HYPG z!AEC8NjK4+Li6m{U_+uEy7n#>a40_rE>}SgR~1=4%I9LW6NvcIiKNyp;hltNIAT8^ z`u`}p&$uM_zYpLSQ^0{DBI3f08x0L-;NGd3qFI8Y+?mHpJ=S43aE2pOGsBsgm70}V zrvOJe82{Y_{Q}O4Uv^bt)X}2!FGBU>G@v<7y z#y=PzG~!`wlSp(7`IKEZtK%XA3}#Z-#mZGd^f`*K$TF6ve4w3M&ec?Lo-PCNm2O*w zXTi3O5*@Y>XAz%^V0xnuz=GOPOXYLEt} z(^d@XLi|G%GK;mdD@Nn<3bM9ZkXnGhi*Wn{2=(_KGO@}lE!=L%Y1l9xxo>%KTisP< zb6OzdgOsj@l{edygdwg}j?ORQ@WF-!)ZQVU)@W8CG^jNLmN)`tM5+?a*a}bAo*|-k zB%U&CEuDPGt0|Jjc(@bA;5!=%<4tSmvTm@>Nl_8L%aW(|C>>CAj$34Y@0VfcliczEyO_}OdQ&nGx(gaA?g46E0 zW`sVq`?CJ0O?X<+-ogYAF!2|nXyTfEm9jI3H~e%w#?UVXx9XEUSy-eP-KHHjT|Ce- zU9z<~7d5S6YIjCjbtu+IDJlYtVw{L}iXh@vjt8iCw4#(Z#r%`}%KC&b*VyywVKglT z$3_KNZC)41d}F77i0nmKwV+TXI+^n$M$9q6w}LxkJZ>i(INpH3h8yYsJa0H}`R;p9 z)Lr!~JaPcHI!;8|g^D0gO}L(9n);h?50_tbsNqB_J|`S(B;PK*zA!{w$u3d)l%+s@ zCXI7omzNfxK&KD2Yj+^PA=RM}3$PWQ@sy1y5P}TX$25HgIPi!Ahs<7z2~Tqogjss> zzYV119XEJ;CTq6kM0jdjA##L2d;Xu=E=ld~! z4TX<|f;=b3)s5JgX>PLCFT0;L#}a#*ZGUEg73W_fQLCN@{r_cKUidi=M~n!hEVxN8 z1a?>?ACZRwul!9Sb*6zm{JxUlP`WQc3$-)rjD`)q#DZ8Fn#?IvEGj)|=0C|jF|D_r zH>6Zc?F3N#UEB~dH)M6FAO>7_(yZRdDXXchgGj1sKox#N{Nr?52XJ{tSGYc)u+0x# zUdCav;mNt$TbLC``xJr&;AA2=ZKEoUW^O$V&L#uI5y+nm$tuv9%2#m%;7MQ1E$BL@ z-W3!00~bBH8~`4ktDu+7{!0K>z{4{)h;a>oF~L)TI&xLkUA&VGr7%Il_>vpvw){ru z+GV5Fc;=R5*QQo9ZS>fXu|RnBan8E*Im%-D(d0<84W-Y7Kb< zdf1Z_n9R;?zsi{8{4y#TGy-c2D)9q|{4#l6Sdo=#8BPko*~dfi$XC^D3ju(f03*Ap zAN}=ghUx^hfV134#Fj-)oMCkHsxJA-pZtFC8)cC9wlzyFa2+TAM$~`T`3uz-tr|er z@}0O;ZdAiHBO*8(Q7rhyGZ28ZhS)|zu4y;mnaevk1V9OZ^(xGIjmKpuXeC4c9D>#y zXfw3{b*Hx(pS#loEly>&C33p%N|gj(h|_$?JwA`Mb|N*jUXJc%5{=VHYMvw4lO~T@ z-*F*X6l;;--UY|#UhOwFUFdhOd#2yGndl{f7G?^Y_G16`OKeY+7tw#UUOqV(^H8AJ z*!0tOF3jlYA&BLKF4;B1V-_dI$&hW* zqF5RTv<5YlLo^K~p46fpM5H`zs6ETOm=B3ew#`fhmv7iMQcEehNWt1|f%Mb~CQZON zzQ3u?E3EW0i>*EBR5-;g80J(ZOjqcL1hsW<44hEcv7Z+F7_F$V=fzduN-ZWh@k5XV zJ1uT55XnD}-w}E-x*fnFv7t!Hc+mLG~X@$oel{;!LvN@!$Rx^ z*LJN#0)m?J9;b+kmmsj%;Bl5KXO|ntsb&z447vZvXyviFT7XHqWih-P?zjMYSHL!; za*x>qI-y{tRRsu{rm{B<6*VSMXjR9^3Y{-Ssp^<IC&$l zF*t=x4({)K$W|&C7Fy+$r@j{)9?fKX0!CcwRr^r4{2_2ILWvY`%)t6#_c>68-@tNE zCrjPnMHx7W54M^xHx`+D#K4ZW4&P#h+r15^kU*FGjMNu+Bz#LblO3GJKHR`jmz=&U zd1TSnDEZ?Q@%vr3%426WDC+)3zYpvXb!c(VZZR9WPD}DaOL@eNU`W5w-S(ziNvc6< zCW$YC$2mGZVhm+r(C*sxozxCrp+eMbhe0Ald%7@GSs@<})}G+GPHI@aDNsH{{;a~)4YcinP*ANs|^w%2a3_?#^SbXk10^$Gx$2?Nh$?oq7BV`17PYx*P`yBVwpJyaUF@Zc}k z(=vN{SmU$ua+q!njMB%xbOa1Tcqh;D0@*WL{kCkKh4{@v%p2Hd_K1IeLq`CNo*&vo zJN(q0vm~Qd_lK&az)sb8kUOIYP6dVb0Y49L&4@*2Z{~I);C@8zVNx-2l{ZW(#``E_ zt~$!az2ZCeS$&+txi-#^0-ZY_B|FvMl3^(>FL(T&xqfLQ@a&OY0|&XQ%_M5`Qv3lh zZWV${esMjRg6MW6tp!iy_c{^AUlj(udU=oLf?G||I0mrZ|=+sKkVKO^y6{M4_1j*&tZ*am@0W7H~N&xXBvFR+- zzjr`cS?u)O61kLr>>INFTg%t{79RIC1LXg!ldAssBIlG@NiUF0hR$2kVx5o`c zFDM9!I| zUEEdgLh|7?^uVt$U_FQA;&ie6%=FjBB7e?s==)vCNz$-=qx17X`i&7*mkdy*ms;K~{hbX);P(U!Jy}X<^4-;&!sd>yynMBO&*%G_q+LE| z#aD<@NN7GJ>Jb-0f*iaA%Aa`r@F9RpKC022~C5&k4y0&mo);qQ)*Xr9wCEav6eDH=05vj^idO za*>nNYei3gza~0Yrek$Ki~=(;4t5OKErV9V+KDH`0e98Lsdtb=)9`SSoUpAlJDzH> z$k|C!8#n^C?1Q)6gtYX7O-l}NXNvJ~AnEL-oek{l7SP{KT7zB3t{xJ9njIOGnT!q) zan_w$UYjo0-~jF&WTlsP2 z8FOPh(;JMs8;eQPANRas$Ng4)o^fT@7@;S6+$|oIK~#62KE3~a$JPT1xgrj12>xyy z(Ai+?^+iHNKhCgezl-~52BNgC2Q2w zvOU+tM{iW`oC)3De+m-l*Sh*Ir|o*LC1=LkB1{h}r7Hr+%&F z|7f}45l-!MU&!%BhYUBL>pQNDu;^T^KK4#kwJr8IVr>k?eaZPv_6Bj#S{H4(sx`>? zgVJT_0;$~D?elxV)66f`#kM_j+VyO|(P$4PAhvhppvh2_BgV8^++`ohU;Xc52^HI?2CheDGgi)n(K%(!a%_IF_4DHMU@)x>RA-fA%X56`B-4>}Jci62ZxZw=HFK2Z%w_oHHs)K;%CYT%bIo59Z`-_?Y7AkvS%xk8BkS$sZbDV-6aDL> z`pf=K{n1lvcCM$>IuExu3UHkke(^3-n7Srofn3j8>6)`=g zW1_}#e}iK%eqWxp;Q`!UEqiQwSeJvy@Zw3=JlvqufdCLT_j?-bz^NaQQ_2^y`^`2oOGwU|*4|+px{BSq{P4b7>~ZO6r0YB=$RjqX^LQX1 zw8&AYRiy>1){Xi$8J6X=`dRPpohi~yo1N)#I)wQ8&XtR2d4XU#;l8@xdJPm+2PSHE zW6hd{O|WhKWTd_;T^bcB+H`yrXV>Xf!-(rNeimVS_VI0tJ#Gu>(T8tv$91>oI%LGm z5uaYT{`ra}8e1C#2ARCdkUmdp{Blz3=IKeJAV^y&JX*Y%Vb%zv51OJeuEx{b&0AtG zmB25NRjbCMf~qg<_GL`T&>DGlwey-&)g#4PCvMpBU}nsArF`GxE4ulie6u;qYwPem zd2i1@+mjcHNT3%;n5}aIbBwjfUFeNA5e%)$m%^fqa-kgfx_lVsW+ffhaGdR1DGp~Z zEtb9zGTxjp%sx=2b|+`16iQNYYOid4oV--$)-(Y-LHRmVX(7!LZG9bNgG{oF3oq?F zZn$T1X{jb5`c8RqXaLG-LLRqCDOZ0jG5N1&ri>0G?G=sv1xc~g7`YjWeuF~l^V z>8XaS6Ns?CDe(^=w^EYKfup4dQ+7IhKd26ExuaNw?7qK4ggKLbshsrk^TRtfOD^^@ zn>QDkM{#Xdvas7FTjxV*o5N38g;wPxqu!J-FP}=2dH`%0eeKk+DBF5~yxnxiWWC1p z8>k)wWLw~09#tQO%TNU=t9#w;yfT2w<&X=BAAF35?MgF)R-oU+6^VvBv`CxaWa;G8 z{TqL9Q<|l2+9IvQ2=zju0HlZ`j=_G|6(6c&sYlEPtE_%0QjAzL+1|}jE&#f>2@=p( zzR*!ORpDFs3mRb)`uTlfs=;IRHYUwTIR2M>i0@((m8KTLOpp7vG(<8 zAR7AVDi2Yf`dAFaW3(AQ#)byy04RshJfoCsu|@e|tZ&tp&8kEXqb400&MHM{(d1Ca zR!~}JL!0o=t-@*G*N;t1=Sal};Ek7K9f*)OF`_S_f#QOQDtE}ow1WHi-fU6DWwuA; zjOWOyV2HM>ad1k^kmr|m)fB&P`VJw}?47G1-R*0z4^kG}7!N4eF+|`SeY|I%n1B&O zWO-<9LVsfcbAs>b7;jK!a>_4Dw0ZK)(Fpec4z>Z9S#NSu-PT)Qx_!kOu>yXc(c`m= zZRaOENXC8Co8oS-W9s1*x#ouEV*ZJl&gz`joGBbxs5wCnc}ryvn^Hg+D|7l^1>!PO zRTgST-)#*(nG-A+fk&y1=nFxWrhF#)s?piuc&>U|x{RhqV|ePW8=#KLwu}PG-C6#L zi=;1pzPE48RK|#|{X0G}W*={|%=L=b{?lIBy#ZLm0FN64owmw4cVnAHDh;k;R3xcX zo^u7q30u+s48QH1wu?yXRhf9WD7Ki+dTjewBf88^ymv!rm6zeMk;nkRXpJB!sKk(iXR6>e!ZHuEfu8X+pi5aR+A3(n zbMM`s3Sy6Mu>n_Rcce=kL&wiG#SB=FO5jI1&$Unq#|n}~$X8!*_42!ZZ*s;nr9QUr zCy`b~pLN<_eGtDYk%nR@O|8tJ+$5GF!!9U3e9euXFLz(}eV1fgk*xCy|I;sv_U_Oz zJfO0(&`?on+T?X=$IG?w!+s+#tMeX}@A>L;7G=}LJAkK^WYE6dl!fXBf{~SbZ_+LI zBj7NJ5Tsqm(MV@PEW<-fvm&^N1rHC%Qvo7nehIF9P^Z*CwvAK6S6rg**BIwa=@hn~ zza&(+XGE(o5D@=iCHvwxr>hQ8z^kKa3d$0)cAMtkt4?NO4K7_t+e?aGm&fGxR`br4 zEWTrC?x=9ItMC}pn6S_&*NE(QhK?s%w(X?t$z9XdlW+ZwF<|Dsq2SbhPxPU;1KN89 zZ&Hdn2}iOZ4T`ps?%_sznO<^*Yv$|VsyTAaNl6AzrUR{YeT z5okW}(2SSUR$1mDtTQ@XnL4_Nt3Y_{q|-a;e8zpd0|1pwvs`A^4vNb1o-H-c+brOJ zvnHj>+E*_#RHy_0nK%k zr*z-Prb3LbS{PmCnoYCKh=8)3gPaDGmB2{o$Y?*vPM%uJ0&iPguwv}iPu*Qr$SqG{ zzor> zugr%7Pr<|#D;_x=rH_DMLw&^fpna=TZ@kBM?%pYyUR3cfM#JQ_u_9;Dh{m$mNbV+j z(OhELogIqK0>X*Gw)DJG_c|V)n zJt@G}=A7amcDV0Ikrs7xEp$9!&5ynYu@4Ana_`krz|)@{(ViWFAsC)Pbfp^}J3ny@ zCOqtyPj5p;NrMtgD|x=|3k|XJR-^>793BZ}y9_~ehIkkf2M~&4@4s=LHF4>GL!Bg^SS< ziq30n?I4;ygSW+9tlR5h*KNAbr(v$&=K$WaxHIfT`tz&?QFrMSQ7+c7(?4ao(IDZIfvn+21Do{se zYy9R|3fOPIgPqd7{@-R@5Bifd!qTlj;~%NT8ri#Uc(M|nSXZ6YEH`054ilbOFR{zI z*bf+2|1hUO1{GF`jPmGcDZsnIwX6WtH$^%P5>0_8j6zpyni%v~nGe;TXDoY5mWPsr zzLEZ*`V-#8Ctk66*!0~pm1&OkCJ9a+8#+M6Vtbdy@k>|GI0KqjNHgbE<9=&Jt#raJ}U@%kt6Xq6|IV!>xwDM|9p$aJv7$m8m=Ng z=zn;mF258dsdl0Ncsa5*Tuv@{1(x0;?)tqISj`}~^lb}Ox2 zGgk0Zuk(-~BSw;{9;qpbG=@BsM%nrw=r}D8D;+S^s9@s^$r{-GhyD(I6aqf8k~B}A$4udy7kAK*I&(FI$N~)l&dovU;JGt4W`-2$l6z@ zigr;{hbhN~89dt!O-msMOm5Vmfz=AywEMuT0}{*8uHHj7Jt6G#JvKpo5C=avRuvf8 z^spL+Uwj&!BjfHJdhXP6+jdlt_hIUuu~~||kdNUp*u-&Z0NM7@U73LYy-{^l4m|m# zmDM9XB~i>mEIx=mtb#kV`p-Suxb0LL1#vO)o@&anQj$SX)XVB4K@#NXnUpL~eNl0; zh86EaJE($&$qnWeh!9kWfvN-)ySi$@vl^9nAAAT6U#@F-HhGp50uQ-A-hHPj*1P4| zl1>P$Im9ttvTakmt@%Z5qH+1m>7i1qvYEs>Y^~+b2^)E`AbmtuJDU!6ra>rxF@@%^ z`ci!ju-p_s9snb0Jkuai`Y%oOH=;3G!&Qm7#vZYTJZ&>H0waNhD{pZBnXuY`mRA`q zciw1zPTBMBd~3sjR@ujvcW37_zqGAb58o)1pAmwJyyah@#ri1+Mv*%0T>Wo6;|ATX zFjId+V%WyBoe(b$NT4_52Jwhx&IO%N`*R*(%hi>4bE)rtmAh^V5@7VLeZ?!Rai?Dw z@`s*3xY78{JFhnN4kzifDu?~~GfJN~=O5SIgSVbUpykp5;i?6JrwJa`** z;@QS$hXRRN>}ok`=rO$=z-5mL6c(tkB~hF7m%j{S$vh9r8L zje5-f5_$c%Tr;s&x;n9WmORrHRXy-*PLyRiO;*PqB?OHOxL9264Sl!2EcsNWpEz_)WxGFp3Pdl(a)6_ZEBQwDMtqP#VsF>sf8l$Fab)Gn_ zLOj0~Z^g*eeOEs6MMg;Ik6r-j>6k{G*3gN)T=k9GvgaUf=}q{Hq>77nr=1;G&JF^_ zpMp#3pi*3IUd8U|E?X%4y@lMJ1jjPQT+D&hVGbVgqt}8B?&JQGe@%M>#EN=ja!Wp$ z{A5XT++X(X=EUOr0C>~KeMwfHiL^5(e{+$&1I?3RV&Pm;kpf`~P+l7$c8lGqKjVa+ zYJB#sq7kEHu_{?zgDlct1KaeaS?knK)v5jWK~<@<#Bd`srS3NMR}f{$nNoZE!IZ)+ zau#ID%M-NOUFW)H%SkT- z)=S%D9~9H>1Mm~R$2?7RJe*YN`dH6DRTXUtKW=v}MaE&vCr=Jlrf*($fn1NO_+I&H zdE#CGU~>Qvje!v~FbUfYV*tahAWI#vhTH-kqGOg<^vKHw%Udaapw9(#bnd^FLv$x$ zqDhYABy=S*9o9<8+tCh?3l3Di*l^cbaqlar9O2lA#FekjW8ZO)z4wqF`f~rT%YyQQ z(kh1s>VJo$KkfIsa3wR%uAr@BJoQ}myZUXR`s4xT=gZ8kUs(!2o<=3@#E4g`Y?^QX zG&en-OsTNi(~@WxWO--AKK4nAC*1l*W8Q|%H2?F?=q)bUkgYc$gjE`p0-gog1F||1 zv;%CPM{eSrc%PV_bBen-x6?X;Lvz1d4$4JX~VH)q{@HyW<* zbaB2ff2{2I>8L*+6p!6a1--g{=!7^WL|l zeK=j-TyLAV_ujAe1n`yQ-KkH?;ul9Lq|5!*F_%oE+q?$aPQ^h+f9DZr<{oTiwYfNw zL`4~*D|wJ9pg)nPj;dHJbY~FXlw!IX7Qs4FCkb0`-d}>=GAf|aa*K$Z883Cu6q9iZgVH~y5jAM1Y?I&HcAUtY->Xdwn>sLtv&e%Iwic8^ zbX4B)xtQ<`sZV1Db=FkT=K56Ial^yQhEpc>v&B=9jAcW`uzLPjkoDEN9U3axM0>33 zrH$+dI|fKJRA?WSj?c6jYPZm0SGTqcY}l$T;#XX*4%6uvwA$1pnCwtDd z_+{GZ75Lxv&zbI*Xj1Ms36G`D#Z(l(75zN;B0a*pZ)%_hC!n_(N+I+Gv% z){L73zOb8SeksR8zKs44Mgb3BE22E^nheIX;D<7<@W1b3Tz%PhHt804JAd&MYYqgT z8=G#V^IQkvr~ zcoNZbN0BY zu`c6rtlh-!`n7$fkwdDxzf)qKcixjl)^{)6bKWc+Ll`-iCf#=%ng14Iv;B(#)O}XW z)uz~78|@(^ieQ=;t{RW4Wa|`P#@yXx2zPRJdsFAB!z7l3Qb>#KKF8h6P3v;<tY~Sd}|2(+zpesiq1fd1YioqE_7nQwf zx78!7FXWVpl_N!EyJq`QeyS{+-nAmFO;MR;?1J*H_mJI^ffKiA@qm~7*&ZO`^)D;( z={HW8bkmi=6~!3k_uEB|G{ro8I^`}9Vq9o|w(tQvKu3zxuTcAoGT^9Pz25r*mQH__ zF6vsb+3GjPG}1oGO}so}iRT?rv3#2jJeurlcQovnjh7MXlASoCYsUN6wAsE}s>O!G z>f_A@AKfmmH5NQoRsKB--zJ&f4q2X2R>XGGEd+lE zI-E8E|HxmyZZm1Fh!Kd)6X~Vui4aX}1II0qt&%42(AX&znUlco+cZQi2mQP>D?~0T z-CWcqne;ZEAXdzulAtR*j{g^*P3xSv(?z*985{#vsPFbN)eQCjufjnC4$opx-B95g z-Mwe2?^Rsck-G*Dh_}YJA<&@!p^QUU4Pk0TPV+8LFBG~AfiRhXBIC~YGRuuckV)UT zo+)$0a=z2%@N>Vse6mK@3nxQM1X9IyX^~bU8=ll4RJ_&wJUx}8uRcGp z&;NxXma)bAk=4ie?YnqL>81ITrM_A-sy0(1R z*g`A>o#KygMXlYn;QRaD+U$HCqgG~>1>D-RD0)?ME$G&Bzbxmri&b6Ml;r>)sA))o z)sq$n%e%=20AJXOK{+W`0V?Esm|a;Ij%4pgZoCnl%!vZRn&Z{v7fG(DtTM2iVF+CH z0$u4Z-!U&#`POjz6XO{Qxooc3IvehBNp-o+V+~1uXou{ zA-bgqj)&DKx~5vlv{Ar+C;nDwEMz!-JiC2?t#J6m(!Eci$nD@&%Qin4sXselv&^A3 z@g8OBUOrdj#v2@N9h7}Dlnu7|QtX~9&j+s&4@Z4jb;q{jtByismPFQwJX3aIRm#Eh z`xJCh#R#tkw&{;Pg*1UfU%$-K#n0#%v9Op>=4O?kc#Zt{@rwIk9{SUf021rfwIX=2s5~~-vpzjp0r4dgp&($(>=x?`Gt-|yAd7bx_&-DrjO&hii) zQXna(O+9#`*s2ax1~<0TW_s*sShFlsJ1jwL_1kSJL-oZQ`O$Gifj4MX1gJ7w!Bx30 zw>=}HjW#^77~qlfzME!{&u!q^Ndzh0Gi&q+eHm5j0C{r8;<{|(;eca1ptuKu2| z!hOf3D*GEmQ2FZQXLYgW(_9#3&ljuc)7$uL;N$rNzoXe|6@q6bKaR{L-2Z7=Avi}@ z&O$YA`MqW)cd9^L3vvwyLs}Rd2v%B^fi(Pxn%M?Qer)9_wphS?Ic*)EpQemyRdMc9 zS^Vh!?!2OO>D8*I+Hf~6vVBX=-Pwj>pjC)#1EB-}SPphJkJHG$byl>r03o7^MpP1^ z^~Q89K4~;Dx4ZYLyz=p*srYs&`G0!f@xyY$XJ2CjQt`NdBfKQ%Q?Z}BS*u4Y=7$s! zKvU9@>dT3+WvTulU)%s)>p~ZrK-8iVgV>4N>uJ~@Mv65;+na2>Mj0J{+R* zi>Wt}s44TmT_GBM>fg#w)Gn+D#9Bz!-s?-`EaDXEipS?dwyMto><+r3icr(X0Ihlv zQwV(dD$+Pd(~yIWGOGn-W_1MD@PX|1gVe>N@BTRw>4AT#gr4iY_k&}SySN_ONs8Hi zw7HsLzyC*@hlQiWq8G+BUbSY3G$Rd=_7mh!H0`~_-8DdA!NN@aF`XHY-4PQuKbXJx zLZx#OR4+$k2u=7QRa^!xl(E#y=snZhiJyyf=P&lz8zHQS2!bhdFhNb0Ko}zJD~4CE zEeURl9k9hL9rJxyF|>`iwO&4gF~X>Vz(lEai&UPg)+38_r=$dlP@lbk+z^6R#JEh) zS1V#j-d?qpk5{wJ4lg5b=MN-*Fxr|8DR&fZvmdYS<6wqCszB?u5I|cAs`v{?>usg$ z31tWbxZd%Bu3Wp~iuH}9qah0!a%fcI6||goXQOyoCDmt7l`nkXn+sW4y=$5Lvw>8g zrTZ)@n~iXlfYPP<9Yj>wg02prGXRn#vg!yT1n@||!d!W8ruI93-2BI&R4c`&v`V4~ zli2E{1kzGjxRV`(WAp;UUKn&4=1Bh(Im}dZAWthOye&e%?C%a)nJ+2$ju5; znIYjYm$A5mk=a8cJs?!Kmt1&&q#~@yB)AmCt$KjIU;S^@_M$e~JIr3%dG}R~n2)GY z;)Qgyb~!U<^&QA@LUU?A7hdD}60F)MpED(3FxeEJc1q#G)f)LrYH+ECs{6Zp&Do~O zLBg$w(s)NtLFUSE2wNMI2_dmCp}r6a;gi zw`Mg#t?d(hIHH5v2V@e1%ELQejcj%Fyt;v==6v1e$0L|>0+3k?R)C@(2S!Ll9qn7R zVd~ltO@E2uUi1@(T4CId;CbVah?4!EvK8~Zyd#W7!&!}w^w;$wbX$A=;0w-Lr_=;ONPiSI8oh z|1E$g?h<~Zw8xle84)ev=ozy0!r3lQ&S?Ff`p$$!=GvLWJ}}MZK6tprG&hxV)Ef!* zGtHKm?p=&Tb$@rfXgsj5>w=ngl=xTXjAio!%~8=t%a|qhv9h7{%qtOrHm+Z081(Tgs%S@ED7m! zced~vo2GWNdm9R=-DMyX6toKpL6t|_K|yy>T~ZxYnlcnnsrUo6E=0E}y7z$;`^5X4 z$y&qgmvh!yD;bVf?G8_As>ADWXe(qtQLX+xTT;n>Cu0W#uig-k?!zIPSEesr)EFqQ6aQ}d*>=}!Ug+KhpbX zTlG<&26I(}#na2ZWvysEwu0ejXNlg0l7sboC&ApF zg`(Q_-rUI2OCG__|z2fyNl*20vuKD(__9hStIhf3ZmuyA8UHc=BH%K zHJMG5VF{Wm78-u>_oGeZI0S9fF~BdR5L6~aqoQACnxv!-vE1h^#QSP%)6=%>1 z|6Xv-&K5#gi!;aJ5(slb7#z{6d6S8jH`=C7sva`SVUOAtncuy#5c0#gb(1cMU(n|> zO~!;E!iw&?24nou4G~E%!O{PgZoDH{s^sfLtMA zzI)Pf6*#e8khNT-??s9dWM$tLFt5aw!VqdQ17U6R`#mvhrr^kd*}#F zXGL?!AT6%1v`bmpl!#sBY`-{zVF1{73EP51`!;7)^uD;lOP_xlaiFob@v9Y$)G5x$?J+jV^m;7;%(90D!e={m$f|rFS*R!^G23>Lq0f*dH=?uEL zCq%?-R5U++FtssU!=m+Z2+E1A(nMCy7H--Q;p5-Y=|ub4tFgh`u5Q*#?;{%8jz54MqrDZm# z=Mri_sv1Gph`%0rm2)yF2#2F!7(Ke&?mPG=AUO@e8RpLD(wk7IMFnACPh-_zI9#w4s~l z1AK)YPrKe^^b%W^?zX+n%yo$M;!Ia&&)F;U7pHa4oG)TO|2}q=YYnz6)iqi!nj7Em z+V|_tzSFZ$Tc`*_&X)Z5n&2#Eh>@4)(o+O+OMSO%mOrUzV6wB`9XrYD5?AkEf=)B> zS*;y`z{|5NNXyfyTQ_8o+RKoC#8*>U2M(UwHXc=f;yfE=pc)p#k z_sZiX+WFj`4V75N%*Ab;tPPIReD|8egAJvO1*X0a+LY-0`;k7+tiX(6NciuJna+>6 zXvvvm53Sd-Es?b5ugN%Kv(Qt4Nfh${6wV8QI8|GyY824ycVKa(5Mh}*KhfWQyO7?O zE-a;_(Z&r(RYf@mCM(sN3Tc9(UzvDL$gT1jCm*74h@{PGf~b+&ejKiD;i zYZU!>uNl-47J~JJ^g@R*Y=J5aJUV*O!KcD1p!krUAcj_RFL3?NO5&Rc658xGZO+ES9B87bh=^jh{WD(ml7<04f5Mgfe(ct2A2ei$+wZ+PfTAtqM{DClM3 zAtjiPtwc6v{6oTudsaG90mZzKXL9nRcV1^*di>c!8)os@(fYgqt+?h;o3|Q(kGsJ% z4W&j=Yuirhnf4_(8Hdu*PSCfV4SP{)^7{9h8dr}a0X437X)MX^N4W&qWT0K6^xd8d zK9`CkBIx~~?b@;4J9nNBc+(S2-rXIfGbU&&QP1!53^wk1`Zbu6l5}Z;kT#Xz1v;3O z>seCtgym(JIr6IE%JuKib7C9Jk6ZSHW$sr99^4Kv?YTmw!hiWFXaU6yfn_@TYoudrDE#Ww*Tet3vw53Vit~oFJhf-@tHu|)|6bF|nDD*E zFnXQ!ryeg6{KDMB6aSVPdt?}L=ZSv04-2ltRj<^+tgw&L`{jX(Rb;{ubD0HzQf+PnrqLSDMqBR z>2Tlc2V+I$RP70MKRaH!Jd2}4^-^!jLa2P;dR~a;Syf2UDtwRleg@ZqDm^xvWvz(# zs;pKzdor}!L&LpKOnwyxv8p(yHP|=m$?q6C`IE0uM8H^Slyuy7%hVOoI5wtd%*eY- zgIX*fHO=u$wk&WCvI4s7zptB-cB=f5C8}-N7@T_X#4dCgk|1slYqEg~TA9)&ACcZ-0J`##avdwxZ{fv27TQ5av*VK3*g`Ar(Bc z>sEjyWS^=JP#e@N5CQrd0DQF@nwwLUTbeI%kuC6op$TAh0fd^pF=4{ydD~dbIEEBn z)%pLwbRidQswFE6^b6U1AsLl!mll<26On5-WO4Q^+_&< zZRd1)_XW4uxwMw?h^Z~eLydPkmOgGSPr1A?59Zg^DQ`>BgZ4ID~|xu_P6veVs*TaDDQRPNiwo?*nDD}TkmFIX+_`-!nY z(7P|PZ}DGWvna%-H`C;AKO$q&mvTWFnww@PiS7MveY{7Ji%E(s{W;*S{upd?q*{oa zg&Bq!w;A7(L%eGeO~uxZ?gAP({BmnaAp@*sK6vUp? zy)95YnIQ1}jOuACSHx$sHf$9LH=Ne*%KtPHp3Hj-nKe#F?oK}%DyQpj?ivk z$@%e!+q^Yu`hNHd0um|O!y^g>$xXOmI!rAOb;WjZX1rE9qvxelW328t+{O zNsg{kauc?vu0_!#9PN}09e<#ZdmPX)h9m~f%88F1t3P7)(%kP7SWHrp;Wmy>w20!XrXsyJw<5( zOT64y-D|Ca4kKCx^vl|1QD*X(!>%R44{>#WXH2`MPOap=Y#OS(5_Qtcb28>><`v52 zgo%e2rd33Z@3`N6ufFfQ>aTpKY;Z;6RmOk!hEM*@JW}J8QGamwG5x4}s-Do98*x7*P+juunnb*>eSX=ArxB6eBIs}SBH|dx0#R^*0?Yyk2!|sI zIY5=M)DSkBOOv^wcq)SfsG{O?lEMEuNUU^2mRnt89>_lNHi&)}WRBq*Jq?91VbZ%0 z2~6y%3x_}RgsgqlGvCU8rZ{;irynGMLX#k=eb|z(mR>u6WDY=<8f2pg&BUNG*%>43 zjKe#5=ZX7)Hk6=1sws+UDnf#8C<3o03E+8vOcH8j2j2pB1C^Qa?TGgS%=%8N+=8Ik z-_3jhC<#u;^)ZY3r>c=(EoQGEX{S_Ymz-8(P^)h;tJ<=zMtUx9nTMpDJr!knwa4AB z!Z0VIC?`eZ<)&Cg%DKmTMYs|8qM_zj<%1%(QMD~67x1?D?sm*7e6mgZ!2N$R!9Yi#^LK)4Yb9ZHX_q${# zZ28kepfmw_9fSPpa+9qU5N8Ma1Q}Vn2+OIyh<)W z`PM{XUueK4*oGKiPs+$)#)z^K?rr3c{xs|UmEUU$y(^)?C${HuL9M>3%Z|0|F^jq$ z;mHY$_A#|t=d-(WwKJ9c%c`O)?~WZRxAgB(DeWoRR!dw>)%Xl6?tNF3MG>jQK%N*L zRAx|jHx7)Fkg3VkD6XhUm*`hTZ(AC!W)A(53LT{Yf9EE@cPZUR*-I#E=xUpuf4zfz z#0EwY5EY6jZn=QFH~bgNwuVhyPHFNgL;XGtK3%3X#npLZ9u)u-J+r2DcJ6#WLHNIw zXd(bwNkpsZ)9Xg0lwg2i5$*5E~ zv`~WXETzr(f+RSVv>f0uF6^VN)2A|pqkF(uBan3xFeN9Q)q30^1#U@)>!KaEyT0wojd$ZP?3uCa<8T)oaT58!5!1P#ZaMtIfc0HH-_ZlxX`VwVf{6xFj3!kEW=m$2fEKd^XQt++ek@MR#VOh0e#`TMHOm=(%~LXO2eW9Mp7KB zamgblukkkNBeq|8Qa_v!^&vK)fk zsDo+{R9#TWhlkW0vrO55G3F5ZOecfUF1MKC;$lpG^{f0?l;I84*2H-@FLss zLK2)q0vmJD;ut=ogZ^lT58MaHn6scL4Dwh0B#^ zJwfL8+CnWhJRcg?*9`X6%%cb1NkK3TrdI^~X$N2Ri=S4yA^A{ict=}2mCBhCZ7vsu z=He7%BZuw8#Zqlw#CmI+>b%Whm{L+u^Mvt1;`pG>mjMaF1IjyJ+YE2pzHHrulPRaY zk$Z+BP01p*9C$SV@RA@bI$iFIlZgqC#l4ToLdZV{`G^0kxIv}0vSn4J1#J}J9nI+K z>j$<0s2#3wShv%@5&;&;RySjl{qn)q97yyITY}};n}MkaLQjptUlIWeJHDrgrn1x) zws%VxCCHot#_hl;@!-lI!VfU+_6EJtmLaxZ6FQ^NR!Ef9-AwCm?&;;Kvp+2ki`=`f z;`y}NW8|tk$K}{S`mw&6BT3m7uJ!HS_`Z^F!zxzSKA#GEc_~NQ`&{DRqUV(61?v5; z6wTq$J4#WSQy80ko;6iJ`>YbWk8pmNBKkV%eDp3l3TTtYhP_g@B`Oj{m^i7^EU_q} z$sOJDdLP+&A~U%uZ|xA=Ro658V#bI5t#Wa9{iybO>QkzS8qKbPf>>Y+{27c<`W6(Z zXz(O_zcr9^flwYV@>EHSD_F8qA!{G))lf5m1@b zAgw~v>uiLhpu6(N;r}H_7oAkGB69kUW;*>nTGQt4Gjl9Wuzf1(QTkWaxyx#=PK{iy zP=9FT!LWWLpLjc5<}pk8S#-zQqc1d`A06#N1RnnM_#*{DFhex^C~bfwU&ev@D9El+ z8=$MiYZ0-VAW=t;q&54}Z}F0UNS)=GjCc7r(8Z-aUpvKK>Qo?Gc@#(&#&utcIpNl? zV@jmmw|?<%{l&{}*fP~OrwqOHJ4GCN@Y_>Br#o6pTAK>{!UI%tK=Krz zZfm?b5iiR(fbUeVuK{?ZitCg-6bE2K0LSvgEDWKJ)5;v`GyC9YnL3&G0}6_!Lc~`S zX^x)W2SySN)VkaGQHNs=p`quma1!k5rlV@-hcfd86_N+*JPaP!HikZIKReK{0@-NW zUf})VbC*QK+rL)7wl%W~$ItC*tG1qG04S|Ao>Et0Rzu#Gla=*^xt_F`v>5-6MUyZ#i}iY zlhn=?J2Lu~V^^}wvVQb9B(Z#8S%ZSQypouPuUZnL>yh4TEyd4)JOdhcHR?14~I17{KgacyNc1Ll z;olwnn3Neh=huJ}K~v+x%hn?xM!iG><81rfWao62W{t#)KO(A?%`%EeG2T0OoMTDN z!_gK8KViqxahVtMGJRbjZi}q;3&=DFWJNmqBptJq1aaf=m3&6g6qqk&7yTLXoCDHM z1-0u2v6Jy_(Rhsrd$B+1K8nZ=0_IW~fan8hAe#*bK#rbAFmC}M+MKk;4U(?f={hy9 z4@X*iHl$F;m(+{yomQXwTYy9zn=^4b0a860H2d~};d+S5!?v?*m1pK{kIn1}v)gsO zy1TnS4?=ihdfsEdoRf|n7yp|t?lB^<&sfu8bj{hpY)|UiN<@`CUDwK>z0n^LPtesW zy7^Y{t=5^f2WPzOwNCl2;9v4Y(8*pMg;e5ak*^<=Z3k6RXi77hEl~DdU(3)S#CJWF zAOtA8;#L>nFBoubRP~XGcWbrw05%yap<6OhoX`y~Hr7%FWI?2SHeJe9U8~a#9H%T! zOS%>7^WK&?r>Y%$HD3FzP1J^5>39vJ43Cp9PUG9Ge-*`ENeFSRgeU7o;os=^K8w! zq5pHlgAYPlbB_Il&?6v{23B!DolO~{A8u{7jD8uyMabTAXIcEHfE-FEXRJfEL@QN; z?rfF)6)IJ~*T`-1ynFhih*tvzN_~u=Zau2~z>q(3#zkFTfQ0OB5$}st^T_&k952oK ztj5kS71s$gP*f9F9rRYOE&Jg#_+Q=6gdwc*srNXI=7az31xFS~2|_?jhxaVCGUM;T zg!>jnEbg%J5O{Q$x&DG(BBS_+RJm8~D$I1eB$b3t+~gZdMfbk#vqo3w?qJ}IeLshtwLt^nUhKwHSN{cWZR zpKCxhc;55(pq`TcW&x>bQ0|Qbe{hMkV_f=1N zCC@zsAf!I*T#IS#e-V{sJm7EpWqX*Y zlHRDG*v+xKzs&s7$C#gg@5nRXQ}!lemv%}wVojP=n6YXLNp^p}emV`-4xJbU@hOy} z2p#A;UTL4cm$;4*5^-#A4$x?w#Ol_~i_8SrA+|0`MWrh~PTq1*ry+Hd;CaH&i_XN~ zI$`iQ`&#wnI05QnU+bIk_fV}4tKK=59-TPI}DuID>5q`6*7NZ!^<_fa_jDQ$WJ{f4KgHcVEE96oQ;c*h8YWt?`$;{c5w~-OsXD{Ytg>Y zPi+63MB{jtogfWSW7Wnaj+}DRJA*()YpU1IuDAtUUBS!#Z0)$acl~e!cqt+^S^6me zeCm4FBb-l4ef%Ss6&)vylV3e5%}vpMR9Ml)Xs?v{#HcQm%hA@%7O&H zKBG3?lqEJvoFW|3>3=pYWj66xeFt^A*N9F%m#AK%gwpx6|pY14mW!ROREsp@ptOy7;b*l8j0&GFDBq&%2@1?SZ z$%BNuRdIkN(p1-Y-`j`)H_A0U?!#@i+y&7}Z&eu~$2`Bd7Y8{lg6r4u@bl|LQ8fdL!py$8E~9;nkj7B6CcK z&9&=@?^Q+q@&f1o1~K$S{p8WkdgJU~u5?{KK?Z0`+|Rg2v$q)!_#^vtOv!N6>W`st zWQn@9e(q!zsHP~JBJbt_D120^ullM;ZhqP=HAOb9?mLz%BLoxgdOEOefm;1l3 z)6Lr}lQmCECeH-Ktqp#KpO>$@IGr>Alf2ex58Y=cl%S)UEGUW97H_(=e;NnMHv(j2 zF^)&+6Dt8OR3R51=HpgBOg3alaAg~8nIb2b)^~C(CIu98Z{VsX)D0xE?4(gMAEOjt zrMW_77^jbo7y8`Minq-WElu*ae*u;^ko1Tl0YYoD?-aKOZBT;FNIhANK6#;R^-`d} zYpr%om8-Z2$6^))6F1;t~PNA54F zd~*myB2KDHnFj4l5mV`>i_L7;S0o1VGCo-dWM_fnqt8PeBH=%dcJ*kp2;Sx`iJeL^ z{~Phm;_Bf2Y(9Q^kEo^X89tM31PFSQ_Z>|7T0ChI)bqE$Evvz4 z&)+^*UzyA$z4}-=r*}il{r6elpq8s-NUuBoP~p_TSJ)fh1^F70hM)pUsU$&KIDPq{ z^kPSx|D%6@u6{*jWR^$_YP>A67H*4Dsqm@Gc0#oNp3Raw8UN?$#rJ45^25$8)0=Pq zTjF-#zWD)dJ$m~&T}Yimvyrsyi3EmiXr8aljcb-itjcGuP{YWOuilsc29{2)vttTW z|17hk`Xx`l=mR2ZzqepPfs7yhW#c_H7R;QgxDoOm>j;sHWA| zpd<_o(+(Asl15ES(Jbo(uQxaB4>T{j3$!LPkk>)}+hFkK=(X#JV=m2!J8*9^C_Y>e zfvIaT%Q+`wtz({}%FOX%fes`A!d$3q$tp`TBPhitjH{7uX4I2@6PZpw$D$!Q_s=fF zBMGqDc!wuSa#M3g#s#SF%0)A_dJUjz_m1%yGt^v7;T+~cgwg|RJ7Y_`+a10S*pixE zwn!4!B5+kxWf=0?Vu({R~xa>o*Ul}*5ZQYmyK;$dEfS6-qWS;x>VrxutYK= zgABszXa6J#TN1Hx?L(?u$>Wun06Xk|920*LgGZvaDUp)9HKpj5(jNdgkj9K_u#|7; z`nrNi{YLo1?b=6nmC4dTDV8~N9R_Nt%?sBRwO6m8QVf&_nvM40Mm6`!lFULcx#UK| zkpO6PJ3z&W>`)OuuG?C~;n16&7VU`M3d9;y^p&grh|N%j58Xvo0UZAth%XVU7n+sD zrwa}j74`!PJ9-BD+1YTj8M3eAkWxdpLu;Q3u?qkzSdiPIUXN$+B4#%fU6@A3(W=@W;(mJYi?zOZxr>sWE_wg}+Gy;uw`nFZ;Bg7YsUS}udHT|Vo* zk73$M%49K%5hFOr6)8~#;R94-!Yrn(%$NmLtjP;nraEd+<8b#EE$dM0*3C3Ky1>=N zgh?a_p1_6cRaKTTMdl=n;M&b(&UGunxPSy!`z^|SccmxF>GZc9Hg7DS zbR_4Ujb(gHaByOb`@KWCwq1Kf6l?u9ZWvM2HZ#trKJ}O3q2X?K$%DRaVt-oYtWzGS zP8YXyTMPl+yUg5sXNUjw3<~(W%Qw5Ln_W7gG!f5pZ+~8_&IKP^#)dN)XpGhufsPyH z61#f}K@l}4PO1hAG)K0UrkuPy^n4bipPe+WACjV){LzE_yl+U;bYz1K-q*)QiVTIW z_hG=GL=5Z({!WTVF5W1cx|$QP=c683ka*oJsk@n)FuEzr)MWB42{+y{e9gmYi8T{u zA^cuaL9629+jHfb$vv%RH%*%dO?T*@>Tn}i*-r*f+*fq1_-b28lA}>>GXv}oMBy~V zrfEgq^r}Z0*Dj3qLZAnJ*HZye>4(Mmg^S|8 zNj*?1I+US#b>2NbS@ZZicX?7t;bvL1qN?b!5MopF+{i_p;#{fUvj98ozxf@z+p{|W zknCcg)H{qNkHD3^b7xvBF1A!Ovt#m12Vk&lhhqsw=?2*c2b8^AD1j!M#iDUocj`Ap;-aS)f z@W=1BecR#R17X+vDhu=|%v*aw@ZaTC=5FZc$;Cl0ivyzh{>|X3t>NxjF0z>PitR}G zU-9+n>Pu%pLq)fjlR!Qiv(XPHL>4vCK zGZ?=E)#B>b0kW6b5s9T_M)myfa^{!!2F z_eb0xy!n9A2SIiqjr^lXWPaiOLBXnR-a0{OWeUB)1BYwKk3MJ$+Frf)sgzO&&oRfO z+sdcAHth;L6W%OUL9eEuokQX!p!@IGask3XtaGX-14LF3wJ()fdp6#4A&gfR*>Pdt zTwZz7RJ&!=P)>kGk*4tgYhRaNA=vZ>5nImgcXRY`M>;xA$AxfY^a#)>XS z1$_e-`--D4=ZJB3!dz!iwJCn80GLz_@Hj75v<7y3a!Ztx!#CZ!*R=VV7eSgES9b~o z`#>dM3y8jWAz1F=O{(~ z$KDZSZ&#|Wf8f+6bm_=;HM)cSgidtLY>-NhnU^H&y2}F~$aMKMeG?55qttf$L?$M> z&IF#ZfAr|z+)1?aaHQ5xmnLIY?!FmjGK3{p&DkYlgxXXwEoCv~>#XEE+cZLgvZ;(r zcWm<|V;6sDYo!R}T$wz!fP8f*J`Aia60bNg4cb7I|*%Hr0Kv z{kQU)Lo4XvT|s|T!)-I!5cCZHQ#z#Yu43?pe5_F9iuJ3x#w*XO@5n9T&Vi2Y^U#2H zSVpXgsK#64?WOo*592r`L70aQu^9C&5Ad85x)P&Exf?{%UNx!-1c5f*5k~(9O)qK6 zXr2wYUb?h^k?xwnM4nU@z$A~Ys^F~79bp9VJPSy5S0+K1S>?vim1Sd4^v<{c0u8V4 z0K>TSPt~avM7X#aEwLFQKn1w5;s~BMTJ~IwR&!Z6*K-zuulp0#MO@e_Ln5;-YE&w7o zrx_3#;s=^V9@0gh1gVOI52q~-{7mR*YaeOZHDys^_CLI2`x_dT?3bD)ZX{`HnW>~r zx`*F@t=g)j0w6wsdzp*EkU4f*rRPTyBs>{K|eETV5(;fssa zC^Vu+(C4m5_kQ~xlX%B}UH{8AD1Co+F)3-V1@^)qEe_%R|ldK>J{W+?vl$=RIrRyb9ZaNPI8D?4#o#7<7RWp|)mxCcDDgTei_oZnA;_IORQ!)j_w_5AOen2M0QZdU61nA8nP`Himr z?xWdd5vlcgpQ%otcZJU-FA0*5(76WLmXDtuD{xR^3IYTiE1NY&`!oWo7%l6uVBU_> zI8#L3r!#gJKT#xYnsSNxIsdkeID68)I%no)z=1o_W!#kd8SNVpF)bB2_SN;KmnU7n zzL_k$=v;ss*x|XLGEcnP+Z7utx+jT~Hhz8;vi}69npE^oq*<&~U#htOUZIHUV>~>0 zop&ZLVfk*j;m0XJ-)G%WT>6*R?H7k#U!OYXybQ@)=RvTTH5mUReOLS8pkNZSvy

f zHC{0APa8#6Gmd&)P1;eH^Gh6^_R;^h@Em(Ogw1bG{Vs<<|HlCf2L#ffa9I$q1q2;~ zw9Vpo`F}RkHn({X!-9XH2S(~cV`!+sWOHF?_Tr!yC<}e%a2N>Z1T=l>pf?|8HUpyM$5=#*S3|tnVKhFwu=)6Zt_*6kZOHuEXRb z02b>y&qB}v+7d^wR#E#8vqAIzzlg@CwSSGDTsd$w$N2O%R?Qf_P|h^kukB}Iof>M2 zieXCq^08}#Op}f$ZNX*b#QPW$mX~Ku?(wL-E`aKicx*K|Rdi zp`bQbLilrY@z#!~@WL{HYJn@h-1yKsfh&0y$1p&>J1XJdLB}Qnb6h->?TrRo=2+qi zjtdcv-vFQz#)tvHRs)+ru$2g?WP(_+Xsw7t5<*c7kl7<^DL2+xX_W$1=BPlzGQh;_ zN>|jX0KZBHFK=L&beDN17bZYu?OXbc_Uy$gD0!-i0D!s`?L1XfR#DwYmiSMfmD{i{ zaI&+dSc-z9+Rp2#(N!Nh^chR*mY6bd;&U-RbKo z(?LRG0miLd0CMO9LRDi^33v@IPko5U_}>S6E>JFkconun%2897DtPFhQhuX3Dgs!Q z>y|hweM{R8CC?)n?t$bl5DWM$OKvN3q$T&yDioj$z)eyiLS%-nw{bDw^ds5xL+*MJ z!XvVrM$TV@=~AFYBfMzAK|5OuBUL)(fB4Mj4NZ|lQ)e6bhpi#OVG&}$9=r5qZ*(9a7Q5`yGQp~AjuqG#d`f7YIUWZp zhv`W9(v_y0*|fNSct0SBr8tz{azm~CsEd6N^T|`c_NsP=fSKh*;wJuAQG2YZ2C>{a zF;XwW!zGULp7?9nOZm$rt!;$jX6TzOP-;;U7&Am?(xK+c^a+~=AJ;WOkI{QmCD;)hX_AR7) z(rKE#i!Xi@DQ{6Up=S_^R9xj*sSeU4=rD*f3O(^TA7)bidjWtw=9KTkkRzmm+dxW; zQ#B9s#ar;AeQ*b8ie_Q!S{#Ny$P7(P(Z)nEiZ4v&&$Sc9mzaGjWyY>an)AkYf-AfpsC7;uq*o^RF`r?y7_@0(B;Rqt7S9M4Z!q#+Go=#Zt-z}NSGnZ z_GWxl0*9w0_l^Y=KUelBSmgt`kmk{)G-mz${1X}Z9e`p30Ag_6c&q`52JM(cZs{qG*jA%sSSI#OH+xAN` zYpB}H>=jPgLf72724WHIDl>vD8@E;P0B&QT4c3gXYjU+_w3QX9++8Y8@Nt?(*vL3d zbD8n#W#iUfZR5u&6M?#|?LZ`#rj+F)Qh8B9+fgLT$G67TN=MMj>_OZEfK{_Fp^}5D z;h0i`^e;dE@~=dNyL4<$oPXj^oeRYXfW^ri)#j%b9zeDGUWX;Y^4iag%wV5@FS?Qr z{Qv}O7|itS$?v?Q_0V9VX9@=#6cSL5y^el&dY$gB+TQVasMB5O(B*z7osn#13p9qG z92Y*hx^Jt%sn;6{*7x8*h>}{Iu+e<+Hjj;A^U8m}LDG}2A)JePd$zvp(cyes2lG1P zkZfZ%Q9*;wcWUZ1z~>oExn(6eFxaz)oSYZLQ^Ws79SLGWb54D=|K3mgKvzxLt| z1R67%`@46(ALBSi719};i2wdHKK5cd&e<4)IY6eFbdGA`Ml`iCi8iDmTe7_l?vFK@ zRJoM>+fF|Os6yV7>9^H4s+8n=3ON^LDyyaV>tZ@N_NuG)fn%s4d)Y}lTK{t1vMux9 zsHsM_4hfab99>L8oe8KC%5O#xNAjc^7n7Qwtg^h#H)o_MK4(|a_(xC4-h$$_INL`B z>2(IFmmV=z3m9ab1v@C;1aLnJb6g6GZ&{oJnt1?xtP1RFrS?f)EuyKp_xs&XI)vw4 zK~UF(rQ1QP$sCbw2Nm0Lh}Dv6j-BLl2MrhM>%dA$Nx`FKB5ivkT1JksWj^0%kK69i zP-J_wz}RPQ^)>bKBoO0*Z?hxYyQTs$Ax>M z6Ne7^tUw;1j7yq5<8x_I66;^4=<|sFxbXvxgYgSoynCDjtI50iN%o-w-2g{?!PQ!f z4h-^abRWgaM%#+I09!WIw5&EXiHYNG3{f^c2Z74$qVIp!bEHD2G6>STZ|lKWEX4P@UZ7X*$SJycnKXm+h_T;$octEvOwJOJ3_9 zHLz)u)58pPDX35uGO-N|eZRKb*X^x8%dfuwpC?sqPlkgXk>^~b=Z_2oy#VlEdmlIU7U^*lrCeqA2$Dd>F*dXyad9tS z|4%I{eDbrr;-?6XJ8INEt0#bTezGK$%8_y?gaho+ z+jbxiAVKnhRB3i? z*Ag?i(GwH#?UCBu^Ml-#xS<#hu`=Ez(q3#eS)BYobIFZAqo_%Rf1gIgi0ath*G8X5 zl=p}2RE9xDdot$tL4ki|f-At-&6tsVpz`ZmAVr+`_)Re}rjCOmO3K@y&97_)HEoul zeOl{>#h1MBG1CU_7cZ9|c6z9cW^9J^*-GY*pB_%FOi{;h z5ARCmh%n#bFkb(ae^LQt%QJElzelHEe)dBrjO1|f_T|I9yAyG}xg)cpcdfXzf#hV} z2U@ARL)JLDe)ljI7-ByrpEaT!X8Ycbj{XQVhpZk9etz(zt_jSXuO2-@KmL0FXiglf zxDckmaKJ^;u~Bs2W5tAx)iZ>u!i+R7`)fW4Re4V~vvWC%wUF0^s<&KBKV#x^yIJ&x zY#zDl$6($ebi4gDufdsKtR3s@6Nu}y{Zm~m6E5Wzvx1#)72ngsX2t)ztT`0EmU4(8 z)|suK@XNaKWIO#N_Fvk!%MDT_*N<*Uuy7uj)W?TM^bk16Y z#+K=__JcVOejJ8*h>e+6y-#{u8>Hf3rvN}DIMk1<+M@ZF+mm2bkH2CcfFittOF56_ zQ~<_DK#WMI3+E1D96(5ohy7K#-ja@Sd+x0*^#0TK%r>Cw>^{15J?$ z*WGM5KSqsOZPYsQ`98eK-a7N6U;AE-t$3Q#t4ZYi!$Qtd&;H=Uc?Y1$LN?Zqn&(O* z%ek(w#V#MMT^iV&G~g&T+$I|yeH%|V&9kuR4A$3Hel1i3+H=2tc%0Xh+`0q9%Bq4t z$lbWG7TL0P<4dDW;m}4cO+glzZkof(7r#-?k!>nJQNAG)`aa%g?D_!Vc%azc2)5oEkglW#C0Ew@@%0*n`_R=l|0kPD`hU}Jz?tQGB&k*xyszYC|2xtXt{v3MVlP9pRW!kA`m+81EW*(cliCNQt*QuE! zY`g8Asuy&6tx#3m`*LHt9TLQET#IzLimlBTc~m5R%o87X3bN>ZrnjWgSnXUb^Jn4v z|JRLbOaFQ5f)Dng0RokMugyleSG~e)p7dOHyd58x1B&uC5dF&F8$>6VosMTc8wlZ1 z-r&H%`Aci9y`&cuQdybbVN94+)tTw^U_ZRkgf*Yt2>qO>{fWs z&A#d4ThH&~aOM%8e6aFYBjFN!KHoxXNgg+l^!71IGtlV7i|Xhz)ub18fw!9MN56ku z3T9=VVq_I5pLiwfx=uoA>7UE0&G#lap)&XX_wk6`#qr{7m4M!G+oos%ZFX&pNized zRl*jQmyMvp<-h8tQwksrl)O?Ge2ar{svBV9f@uWtOEFRupe6uPQv#F)Q;Hx6jA%{k zC^89hWfY#CzMe1QMuf`|v)SVa`G5@SfN}v>?;gHc8*hH#D$jNbp5D>TIKXC9N%TwVa!9a~OzP%-rb3_QuD*KIc z=}#iFs=zE|44waz8-?fM9ouR|FHOc>sS}{LiYpdrC}Nef{utG<%gf&6UM{kmQCDm) zm|%3UYhi-n_}U4E?@@!6>iw1!=^17t$@qiz<;uah&M2y6pLn7;c7_qBR_h>tzu*X@ z9xeV(Md+9pGrG&@I`NL6t}NZ7`>giBQaRf)uUTUN-_H#Wnm|! zo_9FQyJSfDAH|UdUx<7ltUvCu{;u7N05l1333#A`XiL^q1av@*K^BuQ!Ff)VlA0;4jZNfw-?F4C?K zls$nm^pMwu`0Tr&J8bhREt_S(m3&K579L>U0A}1#PILN<(2{stmS^dfj-S<3U{?s} ztJQF5)@m9P66WS^>sE8Rb{bDSjaDG7u1{0jRXnweV?pLW0ih7A(QkoXVEQlnR-jqL zRzWG?W&7W}V_Iqjj@OSB>NT;iJ-A{K)tax?T6Ck0+9qQAKKJhj0YUz@@`dSu>(xp{ z(c3E6e}!&dq@3%`kjrNcT_-w1ABg^1+|>D}T!8qaCfr#=;cqeL8gwUvtecg@U$}S- zYCpX>X%!P%GB6u`DN;^|>44{QUTLi=inx3qK}dgV8EN8VKPPXd-8nfX!*7QBhkVTQ zG^!E(%-%PCIaw@#qEM&W!Hw@Ja7(Sbk0m+?B}rMG0v|GRKF``WnKG4>Zei#$OW)Y0 zgKrg&Z`+IDcul6WJfQ_n;UaDhAWm)(z?PGi-&Zs#d$cD=)Yu^!i23)7h{p`Mo;m&F z{Rc2NrH!{I3MMg#cmO~yr+)N+UUS2^|CDoyj0m4Pr%JP23#Q6~QzpLW=DQwCW^LzGsMidR2qMmmF z{-GMGMI+T|Q$;pz!$IV$hG#6t2QX6+o3$(GG6Y5!0+3$ia}pXg6nQ6XAvp=e*pHpW zOF^N6q)Xm_zgs8N_JA-T?Hx{F8XEc>5%XZ!s0^ z8r1h$_^jyITdb$i*CQWO)p;X1TTJ5@H9UJ(;y)5pE~L-#Lo+IL9^oiWh81tdmWutD z^AxER?`?qUz#OTEM5wu}Vk_;qBcI0PmTl4DMv+o-T$pe=36h!aX=lcEX3VEEko}R) zssLit0U$sNV@ru~0iCgdbz3e_gvw>cu1rk`Lb7&mvVvVRWlKVhPLbGpI%ncT1v%~X=on8B0Oc3T3Pv$cIl5^IGAU{ zAE$UQWb;LuT6gZkv5D)-w*Y>A`2dZNjtr7C%_YNmtSrJvQBd3{4mxz3SwG9reZ!x$ z(Xzv1T6%@%`}1!!j}D*k@RYZu+8vG&^zCwJyJQ}ooFn$Mk9O(Zk}}?I&&AF4)SJ4{1Z9%~#jhI52_@|(PY1T!siqJi{F0%tYW72E z=WlEV)AmCCxd&p|Wi0&t5hZ0j6xnWz=r~4|^KucgTE)IU$ND6)Npn_~%gB?DVM4vy zfeFsvVFy)oicj}DpjoUNiVmY9mpnMti43zj*y)NxnE5y>B0_yzDStcg<~bYFR{SRH zu}c=XdZF&6#sS5+{w#V`I>C9z0%F8%*Sqq@;Wd;0#m}V*G(o=RluE86D-G1o-^x%w z8G7AkDl-Q?Or$s;slc;p-rKY#iTyY5EorVv z5>nAca}6OO4L&-_8_v#pc@V}_3)#6$J&&8x{Nl7+9zJcjy`^53lYUciz?q!)0wtzP)()HhWXfJNcX62o>y6@%x)g7YSf9noxwDWKO;A{%#mC6_( z%21KkId-f8Sr}*y+P}5tt72q*W%7EU#}u4^;_^{$xs)?Nudn+MA0jT!B&PLqMXh|w zX;O&7e~gOysN0^VJoRZKkZ?rnGi+B+TCFF^OE_W?&HxlKNC-n|>0xbb%b!-T9GAoL z_$Z+D=`N@Hd45mf+)i7w^#rDtD1@7Z_SQt+KVYNI7eYCCJXX5gG19c3#;y*j z5It48I2IsP5*g^0J2w>+m#1O$b$MHR>)^gZAi)->jx&;8MiJKee}Ba`Z{A#1TGU_Z zv#L-2l+T44meqvHwucM-bPyU}`E44=4+ps@tRetViFDULOOT?L+~d`D{6kuZ2;4J$ z0AhMqgVm%aSpd*!tB;>hZf7W;=T(;MP&Sl9UTR{iIhmeyG6>PpH$X6 z&5-JIFBQ&KGD$#Eow&9d7l2+i9gv_3IqS@gf$f!9AOQfnxUthC+E#4Ib1OObJayb; zjg@wP-g`Nl-z_S^3uByZLGjHs*Kv&`{r<7he;UWL2;dO${6urHc~=Z;S@NW^#L}6Sv{m<3YZYo{bM>C|jH{Pw zj&hHC9V;;X;D)+YUg}2uKtWSe6ldV%5JSd%qFDsk^!u62m@V{hnX|SGow3$B%9XI9 zwDGb!RI22O0ML9G|4rLYXO!F;fNx||fe*$l1#oXJ5jF;+)EWLs%jP)UpjzT1?C$xt zvmh%Wr@en`5A2rD`w>sj6Y-kw8P)-Pgd}YP9x2L&OgtA2*G>5k3zaO!(9|$I+0{;%36EJSbqS=CX z&OWb1rqoB{#{(X77;s%I!&R^DkM`NlQ_9ss921d+6)O9=Z)g{k@VC-{_0a&xKo$(Z zVXnxU)nnRNma@8AX6Y_AAMisg%mM)Qs=!|-3m#SczJwy|D3`0>pYLn~iWW4E);zsY zB-zg9`$Gv&Q|PTGU;cXMTgfLIBL;5Nk}|~V5Ffz(!EU7^aAD$<00lAlcr|$IBEORp^_b%Mh>^f&MXv+SI@{tuX)gX`^;yNWj`N8BEb^?KDmfy8?+Y7l{BO%JsxctOsfXy`7f9e4`&C z^1PhhcwO|6#tKNS$B37kdm9xc++hp{2YQBn9bSNcG$s+c1I-fJ&N*XQXnx?>87{En zbt}q-c!SmnE}c+8<5(6#m+ik=UZZXuoeS9DEw@De)N8F1_!`{0e=||e+U+-o#q~%u zAZZ!(8-SYGzBly&5gPE-GmD?_b84Uk5zCTP9S}%^;X?UPV3AIBd`i2cE-Az6gh-U= z@|n3HQ1lG}W-gj0=g50^Zz@Y|W##VgIx`zSX~tZXx}4*0HXd6E>M48wYV^ht?M4+S zSObt^%~@dJ5n{HbbN8>j`jjbk*NSLcXb-W+ScrBu#);@Z8i6=y3)x>tw=HYr`b0fk z_B8nBA~$dc!_9DOeY3!X_l>S3I}63=tq4d@UL))L{j|m-BAP9?YVhHH4F)R5s*7zP zifLC2ch$!!@dC5!McM}9GjUAtujczYYthQeB|n#>+~!k%>ktt;WS*$&cd&4flZ zq*9drEtv&#ivb8}F0oL7FAW#NNI9$e?^|2Bced&o5A>Bt(<|W*vSRJkrcwn&!*7P= z-i&2#0DIJa)o;XB4r<=pcH-Ku-U%;U3MVV9y0&EZ8P{{l_lC&z$Qbuh7a~|53lc+E zgO_i)zB&uIzkYcCSuNU{UpW!?fkEKhQD+N5&Q4vv)bDjR&kI_`^m`qDd!RY2A6Q2b zV*#4mEaIMPvA&;a>@ZfT{dm$OCp9Ni{RkXaU5b0s^x=>9%KtH!*}?#rd93VRaNem0&G$7&~;%F&B7m8b+Hc9Mo-Z@)O&^CWA!pa z)e2MlVY*n!z-FiqV7kW$9?L%W4-1l}0&B}o@n#t2x3^PwZUYCmtoqI__JN@8rjHME*)Wjp$l|sf|#p4qjr=>ypbqY zPvq|i@QP7qnKh}=*dlW}>plr5&nj!cA_y2w)Jx+r(JHS7kh(>c>06NEn(_JpBT;Ij zr1OF*`ep1FjMtjh#Rwo|n)aUGQHUMzm0;;t?g*1lAMXN4vgpE+#AxA<<&ind3LsRA z`n{0Btvq0hIU}q5rg;@^n;&VrJykM0%9S%_x35BeToj zDbGSaCl|hh@HwaSxv#&W$-Qg%`=;fuZP6FY816|7=>9%QCpq09YL_c@sIlp?BlTv^ zVO4yRpzaN=6xxYvdyV8}m1NJoLbax2T>KKqioQ>FkZnI9KvTZSLW`XqUO`?r2XKKZ zB+h%}aPbZ`V0(W0?LJh`LT|XUK+R!!w;DhV2iZnfbx>SJ#kQH30wcUJMcxtWbuhsb z)QMEhUrIY5-!Kb~Si7)E1D3z?FL39_Z~cCFEGrWw@p(v-2g8Q9S4cJj48RZm(O&&M z?||?unQ={r|E8U<{+$2RCAKcy|K^e&+Qtg#0Q@uVKT7PhZ<_@_Tog?@`{lin156B`pHYPQOMQ?Ul2Q zT2yicBqJWca7$7xi!EVhrSPptp(vW<+>6I@e+JzDhzo}tasU@NOHV`Hg+TmCs@8ej zuM@xCf2_+fe}==UhU>+swXLuNQ%0Q+_gKEi$es@U2*Q7*#co z-!Jv;BC#6mA>G_5?Sj28V+4x5tYGn}&{wj$mM7LufN8onUp6^jHNN-`eN8AbE60%w zadus$M(XYo9iiVg-|6D{>w6QsP($lnNk`yE#atQxw4$M~$bUzXN#~a4Q<%&AnFf7< z=-#dMFSoSYHu8{rKW|sc7XI6V{E#I~#`{O5CjU^-R(a5H((l^m=F3-5ZPy)-qI?5O z2BDlK_6Hsf*kjqBft9;I4qui*Hq;+Gt>#nxQ$(|lALU=h(QjN(Wl4;`+*_!P`{&*i z6=m!B>$FK}-C3TLhYBR2d-q4)HQ^Jb7mVDj`im6>-u?US#o(nEi&{%Tx}SA{$m8Kz zvuE0JiswBgzw9DZs-Ap@8m;|tolm_eGFTiH;zldH!iTEes{~|N3IGEvY8@2rW?6cE|Gb8G{N9^mp1;HS z#iPep$#l|>B_p1|> z3wkfFISjU*5AyQ=JO4AwPiu&+dCqpi0BX$59;C)1{dZ_lqG-BI8rI~7)Olx9I)Bo_ zl@9I14OV2~MeF?=i&Fb18vyi+!U2;hhza<9vh}kYv{dUGJYr`gpIEqiR&(yPoD4r@ z9#k5p9?FF`!n!2|WJVgPSvZ;g(mhwGH`llV@Zn=_KTWYxkSiXqq(EwC=2zud9`^3G zQZ{m+Bs}PCXO`NGT=;;&=?hBDl?slsj)JcQ1+4^UAAgqDk85}RXo;*6EM$$z=@?#d zY(Gu@Y>&t&)Rd^C3F<2nai3x1uVO9q=6Y}-Tm7k&VL){bi>}OD8NX?$7Tiz6wZ%4b z?~0#aD`lL{?-9<^E?$l5UbXyDgO-|1+4j(LnpQ?$%s8I*Ct!EkK`Tr$#*|1SA9U5yJy&3=<|@M z>Z2)iU_(XU9~)mS(#lZqpjPP>ED#sOO3Ncd#Mlioe@Pa+`|j$C#40u8`b!-P4fd^&_WA)bNc;`OzK?{O%cV_I(4FiS&qn-CP*5oXwsi$mX*O1BPgRt0+_xMe$;3*Q=p1-)n zvRPMNNgm`drkPVhWA~h^To#>VFKXCuLv>x##lIiLS{--nkJYu?6TLIGXtalB=HE$N zxml`Q_Znr>;nWBUmU|`OOh9k_t(kGb*bOkxTDD6g=_7Y{>lMan`m;9SAb}$;p}^6K zvU#Bn<2hEY(e74v&3BX!*qDEsbUp)KMmA}yvKS!jU`E-uiq0La1D3j2{Go-K6|{Hh z_rI$jC)#Ku-lc1NrCfu^(coQ10}`Lyt{N;1XCqA*yrUlNf7jv>=fYNzzgM!)tFi?` zr=Jf8liNT0+J?AzR|zrawWTF@_&s}$%F|hceP!8a1PU)tPq|;On|Wp?ki;kQ4J#c< z$tongGq?&*jEG0G8iNw{aWiGXbizE#dLxc(P=3dw_zd>ySigAdia!>y~(ziAMcWhY$Q{!cG)&=CdGz&|} zc9W{^0{7_gus{GK{+t)JKG%sFa{1GdT(XuqeQS=jcE`7pRdM&@8BniPi#F6nO5Ib|ZU$-8S%A&q%)_n2Z1)gIOF@K046sCFX!iqN% zr7u+!cxH$c4-)VekygHO=9qpO7;|PvwxmjtZuQmSCHg%44P`eJQeEw-yjCva7dMg# z$#wa8ka?A)z#Uu14Er;T?BVw5(zd_TKu6sYopfMIC(o$py7KdtSthmRq)V2Zg1a6C za~QY4@*ePq4i+e`p+CX8rf-|_%Iuu`G6!_ijupGA$BC1})Z4B?jDsuG-@d%|HQuS? zXf!m)wdW1tO6Bp5u33h>OJabGwKu)Ie_C4s^jeo6)#ew9o=H#o=ul_l($_6=t`?;Ho{R@8;OUx@~$xZyY zbvpB8LdygedN2@G9N-Z6^@qFU8B15aFg;E{VEu8wuedXa-x7v=~NP=$~ z6{_?qp2Pj!Sh<-0VTQ7lU<6Je8B-^;$K*msJzEs&ph>xGfD4#0`XfB2kAx9K9I!Vx zb|P`Qdy_++dQf_-a?cxUBqBFGP00e^3W;S2ld<2B_+WWk1Y>C6_3=Iw6R&+XJU_Sn zqgLUJXhsZltQZm+0$nba0t|p{0m)tzSP(i0|5}9WC)VsEj~y*=6X!0|kGL2kss#xC zZxC^>)B8-F>n!lRwzZbih~^`6B2h8ky~9d;Pg;u-(k2KylHXax0~3o~XSJXQ=IN(~ zU1jgPoU}cDjwN$JOIr-8drlK*t#|&&vU~=pYaGWd9p}kirmlJhS70ORepgr@$T5Jz z(6N^Oes^v5x&UUcj-M+&YEEhtR%kHb=9k?J9+9 zC=h%V3;I!h?%(W7eJ_!*WZbD3A>MmJTyRty1^T(7aC!h7O;bG~gu?ZUT&xrMM#AWP z3{712FeUS?b|Rt`7+zRdCC#eC)Nm-+G4ZY_M#)j!ryxDvW4=TEu^NjYG2#kBWED=;(K|Bnq+-Nk ziZP2QupI!MwWgl|Cr6cGyZ~1Uui(G{u}lx|>npG%xoC0&@3>w+GT&{lO`#cYH_$0_YEk_bN zZKbAMXd?h%3gE`GE{fxmB#Uu6=QUE87^lz3YAlJfdfzq;#@7IgsBIFu*9E^ythqW3 zahis&8;ZE?UZl<(8_>D**9vlLT4nr~>ILR;{wwq*Ezz+$K%ge@DiP8TI9b>)eI`q4 zItH#v!Ji2bNJWB8Ft8{zSaK+Qw?ZiWhX`uzGP_tUjU2+RqsPREqH{&s``!QDm9QBO z5v6(f*%BYkNT|hgCnP}re&7XbvNI$ckb4W>EVS*5;Le;MEJzHq_ff}@3F-+iEeo_*Qisg7XB z2ch!U4XRROBX7wPSUGu@TK%po@#dHCjboMOJAjIUP(?PMHx)fcj{eBb*I+nl;+uqH zWrgd@-?)2A6<<~DI{D_V|3&#rU#)9~Dc1s5j@%e#fY*h_owl*qb5_edf6H5+S{#p9 zA!p2B4?k`1~d6AkwygCQGvP;?ZD6kl3`$I zxvqY>=ntf>Cl&IePUk~^Mii%6^S?R(@2eAk0{D=>=#JtsQ$8?{n+;A%jmDduu^U&Y zW!Xm+tp=Oe)CBLXcv)4r>;sT!Re(^mAY2qDaMO$DE!$@d;1JQOD5#~#=xxsal|#nz z-dsNw`qD2NuXvAYPh=;T8m6@ARA{eOGDre)Lj7H9JhfONfDH2@!_rs~ z_h|v+gX6Xxr4`eXZFEgr!$1;U$}WfxY7d0QdwN!O%%NmV2SX!8j;i81XEN1vGI3V{ zR|<9?{~bWcF=Hf$uJG(&3P#L5>{!v}raO4|9YvDaO485=EvH{t@qc0YaDzRReu^g0 zs>Hr3$AF6~ z&aX4nFZUgv2vgA&%lklf=o=N}O#$9a#urBj`D@Bv+DD`b;szRU+^QOSF-~u0y}WC1 zB|aS4>~*B@DvS$$yy!WaF0U74r~2B`b*x@wEPRBr0-4QF^_eX~510`xvVWiwe$i`R zQ`@X5B4_Hvz{C)X-)h)k55OiSZpB^ijKD>l`xz|^Gyt0ZeI6P`<#U1wxJfeqQh_^U#!pR2$|otnH06b>j<&dVw5OM` zY=gBfR0kl%U3z{GiT#7bUN>9?_LCs6J?6*WGrSI7n^;}+yJ#(PL+{owd*yB(idH&T04ztgh|3#a2 zAd+j;-qed_Jx_YFsb$NQhGtj?jp*EBgEP$al+Ht3eu)J1UTb4Y|97+ZxJ7YlU7*h~ zniv;OQU9{c29Li&1IAjNTejrWc-%v+#{@L&jw!^41(gYg$t@#Rcc1|*i0HJy8)}F| z-t#D|`LAj~m#dd{I(lXX?ieO5_(<9`-4g-UZDR$VY3dtlbDa;6;h4+nqkm!A4%v5c z?xm82Pj=E;l0P= z9X#Wgj2dWq5GCt4prBe=V~7kuo$db^8C{~-Gn8}hr*U_J;C-)@*RLItOIl_GeeaL* zNwE3IG}yc4=UFx<>xT1B=sdWViJNyH#^@X92k0N0IrdTsJ>V|X1>##?hB-e$BLoZ8 z6Gf|WC`9pRdhf<$Ur5v$~OOIc1B|!kr9krT$3CO!0dZM}`QG6~t32d76 zvDuE<6{|!_ZJq1d-K{zB#wGjQz*SyW3>^0}PclZ)JQmv>O(p5s$FK+ zg`QVAP9Q?2n=zw{>-w*%rdh{ay*v7>daYUxrZ%G8c$ik21AD>$v-Z?NNyf#6Yue8a6Y3STr*rj4l{c}?=He!~2r zc-qAd>9M#8pn!2aa0~nP#d`tZNyg4J*bB>V$%ge#3w)vSIVcVbbj-ilf@9+#+QM3G zGZfM&xRJv5j_mc-wV~~aj$5NE_rAGbfsUTIbUd zwQRD8pIO7}v8b2Ubnb~%&~5dACxxhDI4xl3BMtXqp*g3VV+DL&tQ(J<{ra+-!yo3Q z;013b+CLp0c$RI_VU^e7Jun^&no`K)jM@BiztPb zH;m+zu-||qjEa+nT^`i?C^A>ukD>+YOcPs|B2;UhcJb&N)NEaQP(9=UKZV4Nn*yr;o zZk?_t?ULuM;`aL8`#jqMPFFpX959R#UU@Q>vSv{%YaNLGwbi+rJ`l6}JtRtDOhTux z7oL|#Nlzhz8W6=sJhFS&Ml$YIu}yqZ#|WQ+cQRB* zD~tD~sAmpFdyHdtKK{EMA;xOmmcfLe>Uoc)P6$A^85?~5%0U~sP30Er-2Qn1*1TGC z!B9Jf_f5ws&3xU~du;T$Jukh8&~h(5RZLaIAK>2Nz<}}OcPOfZK7oq%^ZKQp8jEw+ zDv`CpwP_P9UbyolH4}2$^I;YwhN5kGLZ8Bb*LwVA0i+XAl-3c&ww^}STW!hg3Wxa% z?7X{-iz@i8iHAXXtrHj6&rDLEECYvmS~2P308?3#-fGUDb9Kh%eR>&>}# zIKnY1aAHPRZ?16%re}1&(^Hn`+RBh`BbK>&tbm?GLX7`kXTv;F68*9VRVAublHal%+fnjC;yMj=r@0 zohveMN3=g|L-!Jk8NT!>|M}RMz_)6;L=XM?4~nIjO^YQyCr!LOU$Cv7AUd`nr?!TL1Qt;rw`1axD#%DK#% z;N_(s$d`k?8R0cL=ke7|J%7QaOxRpr#nAxjCK6m8%>sBjda1khO^Mr1lX`2JfL|Zg zwcd4|Ao<2VRT|2JcoD$-)R*aQehtXK1WO3noZ;J@F4~gw4D*{#PwJpUo>Ae5xd0Wr zsTO8fXWmKs>GBT2t&;-t!b%tQo(BANkKNxw^r$cMr=QQz>;{Q85j;w~RfhnJL{b_1S)dBR*RF{J=cM`k}>D-Qa33-x1Mo%yjLJ;zGUovJBOs zENZHdF=j!a<2_8l zPI#>2{32Mq4pVMBqGKYAw(DVE~B=3KblbS_PFvdB~|{TjdagE3P|zuBB;GKg=uY+v7i&0fQBKwsY@?Yg^Q8)KOqCaT+Tf zF#pVWDO@3WYJ)oj`CK!(qa5$uf1Sh2(>>tEX+LAmFC|ZUes^Jo-}?t~P~vMpS9>Q7 zx(^uQ(Ilem+XBGL*x?;=XVzcxjI{5EK^bZD98pb%cEK|I^ytxoR&o_C0v!Bi@966- zD>v4na9XPeB1a9FO}D0-*@QW}YzA+0@a>Ft3vcI_3@jBWca!y$s<4kYyxU+-gkO%c{REa!(`6D%FXW zKCf1VcSugSYa=hcTCUbG@HgZZW{TUqX(1&{$i#_Ifi@~T$kN2;< z9fhJ&PpQeTz^{WeM?zGR?A>f!rbkYxukavz%WD%`^48jBT0*bASS)=M?X#AR;=R=) zBmTrj%=c@6%zu^K$0!3_#*TXe%fxk)e|mwstt*l9rW-tAMn!(bAGCW`;SP6p3$HGv z+aX7)zLh+;2n>A4J&Kdy8nj7kekYmJ+xGnFXc6CQ(`${bz1e=B=F{qRJcKX6b9FQL zhiG9nKh{P7ibf<&-r8WB^eJkSY;?)(kOkdVp<0 zL=sc0ubXr*x;k#VX)BBw<#L`Ag>`6{M}!-_BYVR-vWIKmg4~Ho^Vnnbn;MO0(toK}(rB{uMe`RiZ!}9Eo zIBU31n7i7g*+OiXngb@+RbY{9@*U8+L$1nM(f-hq86HOSCtxC$v-p-_0n1qe5hcD_ z*T$#?&#Ano`$xAIx63ZNqT$FAMo%Mwavwf0Grj4BM4iZ2dQO3QO*2_UJzfNg)RDFL z;TWMxlPgZ%?IEHfhh9!bOA~-j+Y_lSwYqo&bPifW0ne%V6tG7B?I>ufd{gOjkVr8B1?>w%l zqHHQ_TnR=3+zQXZM=_ygt~fD7Rd^00prbNFtLPk8eOOB!U&q+iw1om%U{AA3{k?YI zAr7xCre=cq6{f7(L4&pMtFkW>IsgE2ejBwDb&4jpgT^>8a4K40rfF@G)*PX;q_Iq{ z1MO-G(qZZzrN8AWO>x{$yu1O&4fQ7vjxCy4_bJh1du7^2g?i^X=#;xT-GGUuyP#Pt zFjOd=ds=pMhUGd7ofx%Rm6AdUU1voPg^y&~ivjJ6Dqyy)HYQyFl)J!PpAw;j! zz4WpB9#1dJST}_4S!IF8sMW};VjVlt7s(ZmbAW{m7o>@vbkZ!r9In^{p2b-W($GZ& zQGm}=yw284of9n~$t*L)W+NWq?_?{M?7Sr>M4?TUq;!mF8F8%% zr=lk!h)<;f(|eMnh}$HvW`CB|C?~727nw@pFD0QryvPYO&wBhKJ!ACut9~T;p-fJ% z_Vn{S6e?iji0Egh7Il|7HoZMv#J5Op93R76;NR@vCy*i5qeTrzc`HMV@>*fAX5GFf z!|I?e%LAWGobe%45(cWI7XinJ@S|3(>}wE)lu1a)(xAew$iw9lfC|=bn2jR~5dAa- zg2A3tqhv@OfNZF+n%4}%Yqu+lKae7F?XyeQlPIJaUfCDk5@=6g+oR z0kssqJM7e$eC2rR&%4Qm>%Mvf-k_GB=vaa=HKYo*42LF87|Y{d~eN1OcehOiXnyO)(gI zJN4`BRLS78U%%eJkS`7ROUn%g0e%=svT1W)p8kEL`Q~0T-yd4k+0ks?hgI(vt4`6X zW;?3l`tv4?M1svl(dGg?#*#z*AbCB{>C53%i_DeQi?1=CD=%veVxs2lG|TGzb0Eo@ zI#HtoH+?d0?(LuBJ;F(!fND+9F+M`X!j?Rylc+b!Ay&`X!I_$upyFsuwAe@x5d2w7W60x33j9 z(G)uU;Ak%CBo3hyk6l6O2NaN}N)2;;CtoWO-na8%za=YnItBRt4agFD55i+(!~#!Q zWxojS)2@J^@P8IPJepvXVbJlOjBJ%x zJb)};$zJW^VvFAkI-SnPfB0(O4Ei;5O8cbk#6?B~!FukAr$Wc#;TrMPN25g23!b}o ztUa}af=6RNdRDuSN^fbNgT66$?wtE*BzZt%)R2}7jqX0qnqXgUM!}-6^=eyomE2Vd z8AaVfI{8|_W=0Wxk)}Gtzjs@w{WnzC;n7+SM*md$b_=wAAZw8gi(o<8Emi)KZxNQ$ zx#Q9~&{6Zo*PWF?pyrfO!TnzQG!hE3E)fTfIRJW5Dbfz>IE)W#*u3u8N!}tiubyQO zcN#{a5p@Jn?VsYmIueZP7_Sm+)0md4M<`FdFQiv2En{!;Ndvh zH}kn`FAR}G4@ey`Nh-tZ`vFZ$Cl{wq$P=4GpM{x}HhDi=4}R7S5On?u=hKmaPUR;<{;rfFiW$8*FUzL-M%! zqqvTKJuu`Pd~&6|pBa5F1=Mhid_G~h>5y*Ja<=)sAJ~(`X*6<-ep8h~ig#Xyh-5d! zL7`?eoFPrakS2v;ND)p&6p_%5{owF@y#eKiNLtq`&A-$Hr*|ZIneP_ z@=mtrM(M%zE+@h-^_vn)j*{hOhrgmHwX4^@?>nDGyU8`_Y5#vgcKPf|k3Hv!;_?KOzemAz!7i{b<5X}F@ zU+~MSAPil|7_?L&e7|hQ#pLM$N$yi%(G<%>7_9xQ+VI)sa#BX$sIX#iVgl*2NcQL2 z=nsAUGCd&hTleqk-%@^Gvk!O4ec3DWGhLRe(Z&C&A{Tcp_-0P*3ywr?Mrg~g(B@N# zVd)ku-~YZAsAJBgQuT@dnbQBKYd;MCz^u-)JD73YEqy&2di3y zO#RBw-*BSiS`o749iXTP3ylA zcBcPBBkI@pOTYwg%KKWd`vLG!m&T(*Iy8;_a64x07Y#|EEb*I59fH(IAjZ?fE@b4*%ir61Si(732}`}4l*>IG8Q%{%LEm<@-}~P2DfslG zq~zP6|5RqAuXjIPi3qGQ6h5t)?n_=t3p3IufFX(5nmwS?%b8jo8bM*;t2XqE6p+^s znNag)K{(OBU@9T%-wnuIVp-1(ir?C=HIA;i=)Y(G`SxP<$-kXTe{VJQ=9i3~JvORM zi$o2jh{*Kc`DtVs9W!@KFXskKC(csG5%bi!a)ZlXT6w!+TRWG#=+i;wUqP7m-9o)l zm}(2~$cQJ`@?Wbj#MjVta1h4OqDQfGXf3iT)%8AkEUxsxKv(@JMd#5${5eZ-v`BZI zWyR1HQ7>8F$*K=g&n}nX)*l~etpmnO6+LP>lDj}SOhMM7kMe!RQlJ(_1$Z!489)V_ zWNj@9%T}O4=4p;OoTB`?)$>l^Wb3`wS15t)-t=r>_H}8yO7Wb!eZI@LqyHJW?Xx-n zP5jHd58f<__Df1w1o9uHS(ar}G?q2n4ycPfw&H`}sLF59r-e7Br z{7n27gxhgYe-f;}rRbtUy|9mt%k6(+>pHEI6h*FW4Dvc7xv+|EOkl#y?Jy{*8{9joB2#jekqif`EFS zG&&UK@5-$`Y$Z_n&d9=D-QbFL)=lZxuQHV{cd)rV2M7Xs@-{-c1*(C2fx6@qN3l=^ z01$H7z$QpOk34EvSg3XclRZ|fI_s$OoPaOX9h?8oBW6wn0I-Y1I$q1M;L-_GVtmXr z(`Klou-aQ!bEe9BqqtaRO*59wZ<5hiVxPP;Ryvv5jDE?|xEIxudH(y`GntOd)2C~X zw=Bq*)_-6QfjKn~tABfnS-*dSd^`d;aXfT>@7m^rQ%yTU+@m~KQSLjDi;*wfY^npV zeDQ$zWglZ>?mT9Uh=$j^zHqi};MvdHI|GmAE@341Gab_1jFN|yt;&|;4!PjP8Mh`4Y zi=m+x<%3ukc{>1QHw!Es=q#@Hv*@M+2q6?{i9Ub7fp0WOdMw9AEdrz0y2!<4o#L7& zveJ!i;)=K@SZpfZk>g`kCz9YjaO`U*$d(u*>PuTiYy%)Be*#g`6bVabw1TW$5FZf} zsL#&fQ{{NGK?9^&OV#C!f{p<(pLzPqC!%f4AGYvu;(|b|XPt=}Dl}?LK?JnG4axa##&5vT9jsl?d$|((X)(&5DW6pC=g@aUV@@UCKu`C0f81Xm z-|E#)In4LymX;mge4<^^zFqq-``=^VJl1I(_xYdd6c}m;&-=G$lH7C8A)~kX69024 zEx)*9-;&^$){Q6t`Y(swgnT_%lmOJE!a~w2&+^AxjFa4k%=x^cU^xjXxJzhhq}9t9 z*;JP6*C1_yKv@L2!AH9!ph2R4LzLWuyiBXC7dP5xDTEbk5^%h-m^uJwK8xTpgHTW9 zl=0xDKC4@~zBDF*8*IFXV85{inrfX^{wHA8szh#kT}q)hB|B-HnrZRQPCi>=bLBg! zL?&MD%p1zd=UmAoON4ey95vH$e3@k`|CRYCD(`~`ZOna@-;|p)37rF){&QQl>>T9Q z=JYOP#_=2I{g(Xw?h1#yo7#6)4ns9=hfjX%?Yflmcgx_BJe%G>A|1+=F7p%TwU7O* z4CQgT(DTv>9C6q5Lseuzdap_U`SrVt$mb#qMaBq< z1og|B9rLC+jRPJ|zFiB|e?*4cR%Tca0VU8^;DSB-JSqVVBKd?FaYlJV&JuxRi^#MP zR7FAvssY@O!iJMhxn?R?{`=Si6E1FJ?B=Q(fLtVkOo+vWAk~#40Sb7*aR;Zfd%Kyg zLf0D?94*(XlRL5456Ifg1OA}^VoTh`Vt<-nwf+&8*p<5~c(bd?Dk0?jcZO4J;0^7Z zbYZP&xl?|bMV-?5+Svgi+&(qN50t;@H_*%ddTpOa?S8$|zo$jjB&}piydMLI6kNt#n+?{jQ9(>*T z3as;dSDZ^DH{hDX!p$LpGlF;l0SZv!V9_S|xKAeeMBNiy!W~%~@g-|-nv}F*KRz1p zkM}E_gyQe%D)DI=Uk$qup<*G%E9v3I>mkWoR9cfph8=rYKOh=7E(3l0%q$Pna`nUX zM_#+SmhvQsi8m4D9TnuFW-`+1yA&#|`8F{TA!Ry05l&kOiUI~n0S#{5zHny87d6-J zViW5J{uHcekc?PMnJjVWSfe++U4;%Ed~FSxXE@Yxc@k0V(HY~`Nut%pM=Ng z*@{gzNL?1PXKN*O#VOsq=WX=&gA8Is|9-s$&rQhP7iEQPwhd?Hi(620*Nt03YLfO0 znT}%LWHO$sOw%0C-@4%AEh;gS)ZQZd+jqmlT-uyHfG_VTeDL&%FxBAPg%?+|epGuk z-WIf0oTC-y>=;W(Y7U4)E;I;{8RtgQxOkRw__fyBhA!@_W!}E_#U#dL&_zI*@vQLf z3pM4C^-$lBhA%RPPNo2v!v>FMc4@M5{eTRheel9AP5iEzy4Xtp7T`nG>ZEr0oOa~B z)`U4Fzz1LwX7cAms~R>=vh&TugP}`*QX@V7RJ^O``5ypfK$^c{7Z$Pd7;KvYoVhr$ zDRJ(1Z#@=Y`NFmDoq>IJ{lXk3dOC+r3o_9D#igy!@%&~9%~sFd7XE;l|v zgGafV3*H@isaFhg!8R;`C}>GC$imxjLpJ~dDYOkmn91T{K{ddN7%V`dl|+UO*KifZ zgE$C;4AKku7I2Lo=9C1Zq(tNp3Q4%kovcKi?S2x9pC!n8vg$qPE0JB3_^M43l~o zjQ%7d`5<2=ZpU_9BE+5FC2E{^NZiUj++N9CC=Sr~tp|Ac{+w$m&^x`ydyGYE-CTUk z)@;EO0Ro0?3EIg#5L4h2qlM5D+6;Y2-GZngH@t%|P{Ty9$Qopt*eyaBortGBR5aK^ z(Aa_rhzJSVNDU=Jc)^z_bQDOn;CkU*4Za;Zsu$kL-6ENK$3+l)d+mTHAJCPJV@qXN+OBdw`~{`_=%nf%0)hs%OqMx=8+#{ zQXJ}D2^;|>wINU>!4b4c8GvIE%6&5?wBfR%kPXv!C8m%Sr7DCpSA!D z_0(j)U5hM5qQH%rM5xr3B*>ItYXGgl;i~ANavTs9lgiK{55#Y|aNH#X2D%1fmdEnJ9u7h#8bg z11!UhU_%3}K{BAoLRc4yK-Y8WCMk>V@fp(7WhLEU}SXUZK1 z)Ik)e4In^35I6*~H9(o@0g^nx0(bK&?NDNGEM#eMVu8OH2YBr2(}CGkYdSy9GdfQIuF#$J#{ zW6T?QdS^{a&yK-o@xaya{%LCP8Kt$%3M(Do)AF0EULVE9MpcGW_Ysiz08oPNYFBvTu1jy(B$XHNNUb@G`gp4~Gi^%k>?^VX2#fKRv7+@q>FJDf9O6IJ>+`)-PodG;R&g!h9ijL5(60MwXO=jm`V5g;y#&|aE(#r2= zXl<@UEg-JvRQ6~7B<5uPPEXeQ+x|3}R(7A+maY2bD%mP9G%<{6b&$|qP_kmEpV@{y z?IL`{9#bsf%+Q%VZAg5?7B23Yp6Qv;MFuUx10*y6C?7=M)5`C`k`1#m}g62KET>Axbi4;7TJd zqH6fBss{c{@F-lZ>Z&R>%-IT40neY!DXUm4>jjm}+cqns;+AO@;|4<-A4A}9MM?+f z**ewMo!!>ROiD38f--yq)oj2^@t3)(>!$HY*yRvJDHk?m4X`c256j(W>Z{%HYkRTd zdBGYupV!;L*Ge@&GhS&MfkzR%!cnyhpO^$l6iON3gdQQz4oDle-LsyU+nT!Z=EU&= z6p|NwjzS+;AT^tU{pPj3LiPf3?o0tmCPnyGw7wO=BoQ*POh#k8=loXc`tAk%!f$6l zG9}~6&qB*OKnwofBvD$A*9K@+O7g#O#w3$+CwFpBJED?lk6;;a#C(TlNm*xg-^UG* zZT`9Cq}Uc)p0q02#=I3ET&|PN%nXJsNOX42(y&?r$Fft3sQq+esM}Y}EbETa? zuuXF|PnQ^->o0)dH$Yb{;7uL)=nuc01pKRKB5|w{Hr-(+NVyKotB!Bv6BtYycR+sHR=xjxc6n)(AqWNGI_15(TjY zq#(c|_IY*Y5WC|Hnqv@eLoAS{5y%47JVX@q0Tysd2`GRcT!Er(p3Nj0f~_g(jkcXE zK!wG2NgPfcjd6pG@g70j;Z$4F?a@#v7(vQ*gk6E{@OH>uXKs~JmEVCi;E;UR-HweQ9$P|oR2@T&!xtd5~29cGlK?T$S2e?`qw3n~*>w5kA-En5>Zo_${ zm)wOehKH9Cw2&|?EFWk?$Rz<1KF|m#bm`r5op9_;fP_GQJ4g@}Q6)J`B>A|Hdlp-p zLKBi5J$a~O+W-u}s?_$O>W;3!L$_#o5y+m<9`h(k4@_4^bAN{3vQj9G=SWlcrk-yk z(vl-f_aVc^tT24T=hcw8Qt#;DS&1rMJtDT$Rl{+gz}%`U3%Y_Lu-aO%SkTk{C2rzY zQm6B6C5?5_(G!61qOqK1J^i9W?y;z22p@BZFSr5j%0o900Pg-y*Mmz9sYRw?)^H0; zml4>jdHuS3i4Q>YBGKTDN z;{M_X`N3Ma!8^dvl=#;|z-ZIkXweuZiZ~{zRf#fG!2V^9Gf2sxu#aZLLIAIAHR9!w~fdGTVz9E&(z$t>e#!H5N3SQTLi0BcsQ zTe)`i`jxB02k`EcxC$0+TD1*%+<^!0g1ZYxFi@{<%Zv(9Ie!V*tB#GdOU-w37xjQh@mN4)NEI0Bv`d^zC+ zdE^l$n+=4CW)Tb**)YRsu)!u86R`P(#9vGh@dRwLS%QlyT6B?%G}7QAMi;BF(ZyD( z(2>U*TiIrt8$-z=izQ+KvI1eW!J-d#uwu@Q0ZQ88hmEZ4Xr-0JG3AF3Xrig2IdpQx zlmkp@$)}~1nuDhizNE;_phoy4PA2aA08cyLlxl%%7Wj{eBzk}+i6fpkYpp~T)e4;_ z-Z;XnMI}wNw+jg4Yck0m6AdrI1glN{w8SbS%`{RsT?enxVp~HrUpXGj2D`RJET*Xsc<6d71_P4tqnHggm}Z(q zgptRDMb>yY!$nN+@Wc;)`EcSBO;{tAR%EPVMj1mEdBz)Gym3dAb*y5bfvO0l6%IP# zU>vLlN&`r%BZKH%dPLyB+5>y?8J^; zFnRicO**lr2q`$3SinxS{hi36$JN*7c-@>>V?Bd*b={Iv zZgbUL?{)Jhjs+c8_u|?;vG~Y~OTP5V#eh8T(Btl2{=8&2LG#SWg^2?FyVJaWafqS2 zx4J7YVDV!3uZMxrI04~=H?RO3hm(=G;SfbU@nVfnRA!M*wrTN28EG6jWE{EB@nkGx z*^pqi4VZC28L{AiL0G_!oiU^Yez*cjHlh@axMC+2Y05R+WFM??&`lg1Nk!mPk&n2k zgguA~QGmh(u>Is~O8(J_QNFg5os?lB7$o5cBoc#2?G1>G;sG$`7R0*o-~ogg+~7!~ z#0wm5Q-L{E;V>hbDvstfsj}P_xmdW{z$RC@svWMvNJcW=ij2G}Pk^|?p6ujHTiQbpyb5Wbp-80+ z3s`_3lJKBuKp|n+kOwx_kc>5KsA3u$(fdM_qHNT`Wofw4$57@Xk;SNFKANSDfD|Mk z!3<`qAcZn25Q`I#;(-l$z$>IuLO6ktA`7s{N4zi*FI+^L7#zt+JW{2USfnBY@a7N1 zsgWOiI*hFADu3Pm(x-JI~lebx;fc$*I&4?|G79HF3; znM`61BN@i*rJ)JM%UcpUnZw+rH@z7SrYt9|<78%zvtia7QJ1-270Y&URH;hU*c|9c zM>Q?gBds`B#+3H61j2)4x$09%L;jR`@d^(i*~1=f(PxsBM4lzV_a6`5rw4wxPYn9u z3vQfX83|Jc7B&Vk4889}-x$%wK2(cEEMXh^6B)?Z%2pbI43{NaS;`Cuq%5=ouPg(H z6SScW1g_#qwqwN(it++iu#+U>*nu`FIHi^-7K1o3EITcjK^0QOhM5KD+5YpVsFdLc z6A9t|p8(}2np|Th90XqyE>MDh8d0CGO%yt;VGlDH&pU6?tsr%)TZF=;pbVw5sH^1JogTY>*7YYXqV|uMx(<4#$>kZ8`AJVFWr4Wr8IgwYMnQBD`ieU zMHij+M#nkNc}{z$17CDh?_JGXs#6tdwI1yBco-PuAJw%~`~s?}pB+INt`SuO81KRG z2v`hafS@;U<6zTJhA5-pur)*j#I?XiEkuM3P(tAsP)J_^2Esp*-BOl2dQn_)#Ijz7 zVj!Ui#mg$-kT_&P3Vq<&C5q4y#m-?%FHvmJzCb}Ondv5IG73^&z>A~2fKLAPkDmT| z5T`B^r9Vwop=bFNX7HtrKXx+EBH=Lw*}fUhYC*>;j$npd{J9KetlKX|%Q}x6ycX=tyk4%pwe>!!1Dah;nDvx~x zB`E8>VHo6t0v6=K2Vs~X8AiyE#nNX2C>-n;M!3QK^fy~ zf+_%84I*$L8))E}FMNSPUU>NfGFk9M`qaz?$FnI#nFvu9Jd%=_9&9^UNk?>OdXD@g zg9$HN2nWt(nxG9o__0%ilMvgD|2~M|Mcfr%WgAryj*6QxT;XsI{>Ie+eO2f!sj8tR zyDxeX<*oAQd4)c#VKM9bt2&lQk>wimwtRE0J1O_oTVIFhOOi%55kl=|| zA;nyE-E+Blum|j>XL|0VA7Ws9nqeA9ff}fR+v0BSP^@A;DSbp?tpv~SWQmr{?UrhZ zWOn56B!EankOOjn1Dc>30H6kxp%r2w3b3LCd_fG_$tNg+DR5%3;z_Y?!rwH{nJD5K zzy^ahBA!ObnG6fxXu@gQrCnyi>ii?94y<{`AYTCH34jj^|LGwRilHRRq8O?RyQNf= z=rLkN=eX#0NNW1fD|1jMHp0)NhOUj;&vS4EjWj2Y`&jA}jv$^Mw|JcI&ItfpOpf(cLy6Yb$XhI{D2fG(G1++ z1X8R4gMb<~Ans1-L_iG0exVj*f$wM}uL7u+b}?k)3V%4z@B{*8L@)<(Ko$N$571$l zT2L7#PYl3mB8`O@89xkYa1Bj`S$*8}URGu|{mZ1W&}#0LXqYg3m&XsXR=Tq^`-=@fubx5cyg;;il;p0V_O8tJ>bF}=mMcUF1Y5x zAu;VPF2LjTBBLzQb%tY((hzgpF#6C>SmZFi>X82ErXzGb=MG_tB;yOdN|KB~ht;ly zIeZOWJTd;_rT&nol5$}v{G&jY23`t;k?bR==Ra8>oR2 zCSd~{Mj1k+Lx8|TqM;6Aq(*F{MPkg{RK`ZajV#Nut|Wj2OHdUYz_qYI8APD~WPxWW zzzjz35*G{!%YYY}LbQxxBB04^n1HFUCMc{1*_bC!kZn%#BdBtLU2wpttOF>&ZjcNz zL88hRcwiqtb5ia`ivaRmbmx!aLLn3JTp03PieMp|>o6kHxhN9Ttm^@eAO^0$51wGW zvMV?u%?usQ*c@(!Qj#Ic4&t5K()|pv=)pof$-tJ%wsQaPldwlIs_#mT;UaP^bH&WGzO6N!oJBRvWDyCXWB+rOCrPJtU zjUeMgryA*a8WDRc?0WL=k?w^Z{)de`!}IF)FFfx>P_9E9lb{&xt{Z|t7`)-_B*v`x zGh?!07d$3qR^~-A5Jwag#tN@2bu0@`fetu;15^PVfB^ui0SiE(6GXuu9tbxVizzZ_ zB+4M3t||vy?G)r&eG+yP4UM@C- z9*x9cnzr-k&wvaJNRsnbkY;=uTLX! zC=4@s#H?QW!!O?P11PNi4?y7rrZN(!fnhjg4Z7e&6rmRCVDQqQL19K^axrCg5iDIy zMs(z3g0WLofdghC8+HZ>uwVn~;1oo`Nzma9?12$>Kpdd#uw3B)7E2=(%NeFN2X*ji z^=(({>9DreB%GE?T)_+CscI|eg{XwEij^t0@MC=!oLBtf{cL=VFuoSuo8}*=4qRzv7SQ92b+R_#X;YAL4S!Av;J-2-YK&* z2q%c7b=iYlnwUO-S0Le`9|Y_>1<*X+01X=81o(g&ra?lc!Nf*v#7tlV6d@L7 z#PGHu3;tvluXNT&0H~I534iz}Wjd)&8>=P+Tz#z=03Ph@~BR~`hwPXT>HVG9^ zfD*c)7B(Of45qAV0Yji*E@y;Dc4TF=w`M1`X1RBk)`|ng*985+0hECq0HFbDK^`ap z{t9M>1+an#p5Q03V^5&xX+8m^ou=TP28CGq%0}R7R=P2l@CjQ~;_PG+neZI_>jS88 z49@W#k!L?<*9`o?3?6_-YuQJcBf9vaxtPnj1nsxx;xz@Wpnz*GOf91>ax_>+hE-!Z zW3oBXC?&i3OkL8N>r1}qYdT}i{bmiW=WEv1+Wq93bdT5(o%nc^3J3ne>;3~12L!bQ z`x2^$(_L)JhRYQYH7%JA+g z1o27&@+!5>GOx<5EMrUqMP?gRK^2++99ZC^EnyLA0R*C8ML1v$`al~V`3>g&qo|mM z3QOS}mz!&RN)r9cK-f{aqmXM7snFse;1eQ9}^sS>4t`l6r6%rg+;Nelr>Fr0o=MRUt|1I8j=^w~7rEvdl(Wy1&i zrvRis9x2a!!40CI0k9w%Y9YmH;b9&o8Gt|*Mw<)d*no)S@a~G;>X^yPt=x3+wR4uX z!NCF8!GTx+v>yhR3{Mt{p#l297mi>e8RTESgB`~J%?T-r@8wMugfjjEY#_r~U+7Uj zj<^vIv3Kf1x8mZcp6gJ^yIPG8<`(J@EhRG6JE0~LqCPIZn-rmj3)8U6A*smHx+pl5 z6ZIxMCI0)G!dKBG`l5S;KPsd{1AO7 z&lw64EoEGNeKGuKxaOk>R-qW8-~^&!4NT0(*B~3_K^Ex82si-At6c)N;o4IhwO9K< zf8_57RA&LN6;vS`9H0-JzzHk?1eTxx{^!N;YDlP{2}HmUkiiYyK$FT=okrl2q9Q8z zM3YEsS@SD9+!+T9q&^HO>i85P_k}x{6k+FsE^r_=8A5LX9sbUE6QU~eF;GAWJbqjU z163gEQZ7a0sH?b0(@FPYyHeieO^xO(3ZuA)qj;mzNTa+)1Bs>pyy|Epi6f5+QD9-s z)Lku2N9X8m4KGfk#6k>Vq8xsQ&7)zUn_kFuEQxeqAt_PH;R0GN?XW z483jwMHv-XiB25qloSN6@y%JnB z9K$lI|1ivTRID_i?)+R(Gm;8Ycw84CaKOWX!$3iT1_=%{z_1}hf$-e9L&z`&!z1wC z6pK;|8x(o+7A;yMQi_pSr?PO^mPJ&SZQEK&*cPfvl~y-v-n=QHl~0^p(%2lDM(9uu zsyNszS~MtAp-s~`W!i!cm2%{+xVkdniz{(g#EEl7*3}5IXUmq|;i}An9zB>WVDiJ& z99MPm{wP!TN8J%4et1E<;96nBJ<6O_yx^_=fdwP{K$hGXu3Wf1#3Xrw4uI#+phJru zO}ez{)2LI6e(+#Qf+?Ay?dQ;+_R_HzI}W76eX}P zFt`00_VVSgU++d<9rlyh-xEB^UOjv4+~dVhNk9HJd-3DPmv}N?e1a19<3EWnzJ!1O z@y+*N3Fr`5AUX&hh|UxjH0U6MN+{7FJQPag;Dr}F;NTG#VB{f(9l~>ggc3=lggX~V zB#=N74TOV55K$;&K?YzJmyJDqzyw@LJVap(4McGQ7V=QT2R0^vm{$IdDb<-`Rv{G^VA|AzQK5vRfelxbag85l7;w#= zW%N)OWM+Nk3R`6LnWF(aeh?R6BfMbOU5?K2LtrB;u-9LFWjew&X-x`OLklou*$8q0 zwj+0y|u6_{sO* zZ1h13Eq|`1XCHpp(nf5y{PE}Cec)pI?YH6HHz0uLo_ip=Ppl&ybjnEw8;Juo2px16 zP$*r4MKp+!z9?4cAc`fX=njPs#kf!m5D_F$Lzcl+DP~M4iWx%`9)U&_*ihqfH`pj6 zQZ^?!$aNw3M1Ot7%l4PocR~QDG8gWz9LLqQNFMyb^{V@F4oa zrc5xgClh4|TE^1XFyYWaG%~d3HJ@`ZfVn-M z`RC)B8!qVSnoIiRnHNal>P~#C9CP>1`<%VZb%-Jg>qIEwi6^?#yM_1WdvHVqyI5h1 z5FPCBilWYKfEmz3&-V05n1O?ZeMAujHQi7n&ju!pR6!^HWRb;B==)?7m~CEplltbr zgcDRd8Kve_QK89H{!ld2Z~suC2n7S0u!#XAAqH^yLDQPXHd8V10|^-e4kU)vXSSs(Ye;q{zi|S#gS~GmwH3 zG@#fxXJ5_16$)mTFL*JCjU$SqiMHb|2T3S8`4SO^P&6 z!39{Ly>4hD2;YOklE}9bn6-in=yTst*k==$v4jIX36oJ`vOYFNMNCH7pUrsoKcdvE z3ggHE1BmeckgDm32?$Y?j;@iAf_%y#7D^FBA~d_$DY8VqQ(i-KbhUvXvqTkCNQ)#A zgBTov2eP`MHn$m?Y;RaXX9Nc(#K)80^XFZAQTss9Mpvr{{o}OEs z6|1PvC_XWZ^WltwuDHbnRgsGZ9b-Zl%Fu?2k&FdxC_`cQ#^}86IL=`Zg<>P2eeE%h zws8);?A0I(9c*~OOOcCMw7h`~l0qRAq%$LQ0c~uI52V0?Ft9LGC;q~a9rKv*h{ zv7ZTjs6=-QfZh6*j1BE=Zw+cu40#ld?_$uu;x(}0$%v2ef({>5+DGCY#2_L%SVKmb zwSqtorV25@AX@~FBFrEPq_99FHo%P&tic~EX_-&>cO|3#tY<@^iTUCiRW0=os!{## zRB9%a_AO;guq+B4UeO=}jMYv}J0aA{kSMk>WNvvvh{Gxrkq7xkr2~(3}1^(pK z00J}7h}?kzlfnZ79d^eNX6Q}C+PH>yu!cS0afBZCxI;jWEQlDyS$=WWRt$P9W;yFw z%;t(UNWP6`L3>$TWoXLl$#Ryvl{kEgu86?6!zB{1Pb%v3pJ!(1a1AQlZ+@mTzctXA zb-QLb3-^r}dSmP|8l8>WrlfOyriF^@AUz5%um&jP^@N#dxi!ooG00N{8&XXfb?6Nz zumBb|aDo$HBO5@ai3Ha7GcsYxl}N=2OX63PrY>bF_+#ZNd4_6Ds!4r88Al7CaRdhW zA!@v+7(;e60tzE)M|av$!W0&f4qH?={*tkzX~YD;#0|T|8&U6Y0Aquh{wSDuyRo?W z_JAW?fX;M$w3zo!wI&bG9SVH% zZuE}lNB?>MTKthp<=|XLKj+b0Kk#s(S1(5@d%IC z4Xo#OFBlp-I#+L#H)%0`UZRVav=zmmkPjI{+r-N-Kn z`IApN>6Nq2*;C>VmHNZqeKPThP(ne32NdWHS}_N6@B%MjH3ds36HmWlf-4wLMig6L zmN@6)f)KYjq7#GQ!XHIwA3U%gJoGHxqKxpgIYE?!OGJCLw}k8hIt9`?U4#y;qm8;n zAjw5!aU^`vQH4YX58EM*csFuuw1p(~R?3GWz5dft$V7%%BO}$P5Lkm!N5BG_wj|&X z3rMFWaae0o(R5jYe_BEl9MF*W6;*yXe-J5E{&RooHx42&0SWQ|F(3{@pbiHB7+x>} zY*Rv&NRobVCl~Wa6A@`BwtV}dU4H}@lfgC?(QGr~M|EdhJw{lu_>EKq{XiF*b4y zbCU~s!eIx~0}S(4c=RG}l`m~ob1Jl9@u)n51S0R&ir55{#tBa4QHw&PINpMA&ayey zSS~9FTk0Z3wRe?BL}qiwP-%8h66a9g8J-3eQ5UyRxCdOq=Pp~wfF1=Q;`lo5=zIk; zU9!0%)#oFCWsgY%ObCOU3{y=>u#z}X3LjJvN02?T5DV~i3Ith@tyEw%6BPGFhpk{f z@U;Z1M1NZck$}i`6?u^EGY(b20V0rb9N7bAQEYet7%$){I8rqiW??=eNEw!GWGPrD zQlKW35D~HtYZM{R7XwSimKU)8D#jU$1)@XD!DX?>jMV~-uSGdfN|lh4Pe{~+2=zr; zM5O>VP~O>{<(Z|qC7xu8AZu1<3)OL%$Vb9QmhaLa%R!b?KrjpVQFPin5pg{&7KYfR za(o4xSwoW)lR^^2V=*8GvOqpbCsdncKRCm6P={YtVm?Ws6qOl~V-lg7`k|WHbfcCA zbie^l@R>*82a^IAuTX4tu{733lGQdnt0|+H5u5T@QX--pw&6=;6 z>2B{PjxtaLWOk&mSRhk?9|u>2H^_{>7^RF;AD9Di&Z3>uh(%qrtxohGM~J1kC1?M% zm1yRr+sIGA6{f#caT)$+rVSMx>Pasm!hB_UAM@WZm|Gna6sJ0S;QnSP^OL# zFsjNLf(Ca^qUCxk*dEhqIu7@XO$s{Jh>f4qwfnK9vp1DYNUrJ{XJSgOW(!t%a@A#G~=OVq-5RwKxZFNWp0T;O-cW>bba$$fEVTyae05gGp zK=D-gbtN~WN&XP}GyC-tAS;ph6MwS?y8qKk;}8le`*23Yx`R|O$3QKokia!qFXwBrU&wE`Q-XpB~SjGIG@)H9C;Rv!WXVUfSmFJyf7)5vKN~IqkL(7w<|{l(I$-dCt7dKsw~=R-am0Klg>oa(rt2ml?$S|rE0_7}Foooa&osR9NS7NX zLK0D`(4Yz}&^|J;NfF#L5Xz~K$}$zI5?P0-vc{nwN|_XCv9JV7RKx>JNYLTqTsAOwQHxw7# zxt@!e9~-(AnI`NbqI6KA--Hei;9w+qR!q<}USldUy1#)1NC!(JdtwH5VgPkJApt5G zhVhd7l1R(ZFaI(;nAI8|ILwE|yw<{l&FX`G6Sa~9tw1!zPuQ(r)H+_Pu4VhZW_+Dl zIkwuowq@K;>>6k6N^x&%XPsdkxDrw!6?{eP8^ZA#$)$(7#xurN|6&xRjJg;YQg}}fW-a_as&x@ zOA9m?m7*x3vV9J*K-G2)Wn(p`Vu2o21cHP>jqwU&m8yl21hw38C$|tsP)%=e2Z_hi zHIzfLfpDTVPNEaNj^jg23LoL?giJjkUpcN$NVZ`4)Mb0k*}G5Ui^kkprUcTJ?K;k% z0iQpLQRHYG;+;GDd;!N{uP1e{d6ZoPyIt3lpL!gZbty+7R1n&?T^A4ouh0Y%AOV;} zh~uD`{FAYl+^FtjU^LUv8Qh^~(%_dl;1hX&2bl(0B?lv{(J{a&3uJAmJb{0=BTeH# zaC5>hur;}WeKF!upV(Di6N)K$C)OiPbxUObV%rK(Sh}rE>Z?QCV*V|DgE--lt<5rn z)N93@qdJ^HjZo>-SlzwiO4Us+-4RvIYU`c1MW$bwP;k4(a7I$?W?XJsQvKiuunBX^ z^E|w3J%EHT6%v8JJ8kYw5m(bpa&AH?bPcdsw5+fR48Rh*pmdvBRT-*Db4Y3-{C*A{ zU<^)cd??Y6Z9iZa3Y#DX7tRAQKo))>DL=3@C@dCcp(zuH7iMv)#l|TX#%xGRETFb9DIQAlH8Ju%=1R{#ziAPVs{p*!Qq80&S8{OIg=6GCw^i7v91?7=$| zc7gbHyH*6*q|rwZHGP4z)utGD0lRbI!URal55_dtusjm6r+_4hHF6kCFgFmyONk~y z`wqYa(caa+Dn7a#*Ymx?^eabuYxK&m_@&0+m8UH5X{=AAolY|EKgQW7!{Eha~S)?yLz z0Db@shd>800TY&MxsLt0M|FR3maK)*LhI+V*iPv9CZ zmJ^l2f81wV|wyb2PRBLlnlw_$BrK&ne<>{00$12 zCVPx1vmj@W9x-shyKq5?&{zm8&7ynqB!Su~2}-yv5!Wr&wQt|5y*uSWkq12JW{n$IaA0(SvjQ$$xCCOYaT7P* zs&(t+$cYsXzTDU`WXhdAR~{UCvt-VnCpSdBwV^}PtyO~W6;f>3yyf;3A3i8vPvt*x(u$h)bcAWweVVtF2NF*qAkDZD%^;S zEhwWdKtZXYfMjZlBY}K$DWr0vE+|l&v#vRsa0p2zk!Ffv4>}~^V!is>lh3~Q1{BCV zU(>@6*jxQ0_Pt(@Jx|wTajli0P~tmp90q*RiXn%dC<3OJLi)gfF+L#agC4{k7p9Xw z{3s@vV02}Kc5N&}-Bw!_{thUks*_H-qTC^lCZLKcGg79Kv`0y*9^mRqg%@U+p|}8p zE3^dGs!K4%CSEM7y4;Fbw1>U4Sk61?jI-o92?gyjKr8EvvpM-RInXbQ%oRO&9x4F}|;R<*g~X6nI=S6wy0jF5QpI+ts5 z@q-msng~U_^>TG@Spt(iuss3iBac4(isi3YxXl~S*nw;%5L)t{E$F-!G`Qr!hMs^Y ziE_o|t(1{?GXN%-#6^kT%15|{C(UV+$tUBUR)XK+mg~1Tk)V?9UPy<0Qqnu5Y`AvY z$=d3PGAZtOOpQzaz^W~b-=f$qj|T;LO^b78*)x~zeA%?|qfb6q~?j#+c#EF)f4M8s*5w>CN#@gwfe# z;^!1cweS8m@aUS>fYY1&#V?SpLry>3v5!CED_`4r+S8iiG=4=AYD0R32y(DM1&s$k z0PFqvrquVDl7{LRNi194(mELb`&E2P8opJIKgNDpI13 zbYu<(_<@Cz$&rnGgd=5WrZex?KAP~Ph@Q(~<;aE2ukj{pA^~JnbR#vZOl)WuC<4u> zxK4&eCNRbOl3m6a7rhh#Ol%RO7}JE9k!dE4Tnw2VUE|N^rL0cg6X^4BCQzDv&oqAU zgBX<5s3iSyHZd^6Yzi2Iest6xW-tSF@F2-e5oJ@GQpyxEl_{jC)TK&TM@)ytsZ6ay z3H~TZN(mmY2N5XnZx7T@DE$V@WFc!;@WGD-$+OD*G_{p`8&BVs8lUwLu9j7x!VJ{8 znuw5N2pFM=MP9@USBT>a%+LZw#Bl&u{GbdNa@UJ4v;%R#wT4n#P7khOqZ*z>L^%9f zE+}_R9o{bqN$kxLiU6qu3@wW%WM^crq%txtW=mp{OJ&1UJc{YAOKNn}nBKWO?m2Xh z2X!OKN>e>KcJE{bg`@OZQ^yO);B~+l5^hrpv?6tCDKkx}OobcMwyeXPjWw=0V=Ahc zHg=^hm1#*$MU)GWi504lKz@o!9-{6|lz>B)-nL6Yx-m6Cq68%W8vHovPpw z5palbS=`mGP=BgjT-C>K_NiNV#QPstzHNfKYDEN{YAeDSqy-glgD$%=1u^&`LntcA zh-_3Nc75bU1Fqo$F#M4LyW#*t;G8pSXn+Rul^5zT@PIAX;Fnxjublh-5dYwM*d!jY zH$r*96nMacYL(d5Uva_{viN|jBw0^)3DXhophdOJvv+Q~Og`}fs2c-WGTn3#G|5F7 z{y>KojCZNNTIDDqNXiD*XB(|}mVby2zZepx_YRFU+c8UEthJq=`}-=_5+iI&c})J zC5pF3`f8qlPTO7}i!25xnJ(cAF&qJlT_RJ~$B1L^saT(7gya6o#BSt-rfg)C*;&sz z10g;!+hzo1t@T=y_9P2$%E}$Ca8nA?atld)w`m_o`w^9mN+p0^gSY?k=Re>?WhVU? zL&i4|it|Kuf<-;ADf0$rrvmkpb;Ft6lP8ysNgNkR$=UnG-s zTPubK=ybZ%cjvJu9N`j|h?1<+5~VI-c2CwD44S+In9ROW?y5Buj~!a=v-8Ynl%bg& z>l4y2E$0EB^9dSHDW68!J4?YnqBxx-QV!gpCaD;_)BXV@0RkzJcn<4$4zKA4>+qp| zFavVvx4HQ|xfu{OGZtlOvxc)90+E31+B}9E99iPLw$Tr|p}Yl|0Bi7y!ngq5pouZS z0MHSlF}S^vK*HL~g_7V6;CngS;~&n+kZbUo&M||RK)l4eh9%4z0XPoF@vniX9vD2D zkd31FF!1AxDL@VGldQ@h6WoFntoWV5NPu0N0?U%IF!~G7VlB-$j2WB1W&0k5`V*Ux zEyd`+L}bLZLpwPs0RgNdHd4gTNIPb8#M;Q02aK9kA&%mR3L?CXK>9>Wa*B$Q4pbz< zpP(i`!U3%TiXbV9o5~b1@F^}34~EM#HUlrX0k8O&s{UkQ8-mz|pn9`ULdIJ$y}(Hi zJwv5_%KE2+|13NvT|^{}8}gq*oav(cvNK(4ob9Jp9R@5d6e{ zu_$+75=VIyps0!m=tqB?BDAo>#_$pp+eG zDT@st5zZsngccYFT*SpYdn!5u9KLZuG($52X@%@ErTX~1v}uKH*aqwj1vy(P)KkV! z8V4V^13@bcc+e0g_yi^Z7Z6Fb57@>b0vFx@m$M9xwag|R`oy=yz^BNC9>Bo7KV zC>L9vH*%;aAWc9?yR_>uJ3>Uy;7zE>zyYF;{oKUg2*s$76y0daSYwJyiAk&AHA^v- z-QrE5P^ly>9qzb*S6~1UDm~>~!OFwZ4zjabNsnCdpjOC&JUfV{N+r8NIH%N3gtH*R z2^RRUycT$t>1+ivvw^tqiYf2|aX=Bw8G#oFkwlXTZ5#>qB#A_Ofe-OU+v5!;sSUnF z71ap|!ka)xQj$}2O_tOR16Y8JvJKjJz$i%=2eq9i;DIO^Be#&5#c)40N+XULqdmMQ zk6Eb6%r!Kb#7C5^oC&S@11SDmoya5mNEj7ScWO}@mC4$uN8eD^>e$bjxRj>&7fM0W ztANR%C{X6|%Oi;mO$mwzU@AX=ts2Z0dY79lIT+!@zXtB%MW-$CRo_LI@DI#pGbX`+wh5sb&A94 z3EkL0?8ptri-C_lf}e;@SOFwIz(V5q*yT8mq0kE!71akV)x|7GMGO-OozTYg9ar7Z z%ZjIfl*kwzsE1*bfO13wJPiZ<7|~o4UOgdJE!xw>)w!#gYUzx7L7&>-K<20#9|Df3 z2|lks3zX? zi5~ES1(2E}Fn}be*r+%xGjJTwVYS$86(lN-kd=uLJdR8$lL!sfmt7bqm^E3Ory#Q| zEvYQAn?HqwOuAS|;vub-5!T1x(9l8|)65LTIFq}GKd1e_5iQ!CdC@iMUUb;jO8L=E zWDaji-RcV`sgR1;@k^vwpHbP%Y5lu=2^F0jia&T3gRs236-qYC8=yjurc6Boan~%! zf?knVg2*m4{vDj{G~imw*9MBy>EwcO2nAIrPipjoXaWhpN|z6S2XU;Q`#fQhSb*X4 zIZ3OW1<;8Bo4&(x7Z*+vZ_p5rm7#fZDqfYIoc+NgaE)hM5d z5gH|Zn&rqJ9f8>D6A6eC4!?AV51Wmbgx23k5~v}SaT2=flMUAi3UUYq;}qBAl-ta! z+oS4I`&d)LiJ(x}&Me@7cfFMsNUFh^&SJcvQ*tu}Y2ar$xLe8rDmWpoD2xZ_fsGgu zNlP^TKt1H&=nZ!O-HII|oLJ$v!jJ{1978MSYml@acr*=Don|SZhCm3@AXfEV+m$(K?<<6jn4Qz~^<^fjX^1 zJee@|XSD-g?*+*>9$!8|4V@*PCIhaeI3IoyNA1W)19-w*_y8QJ=p#Hu)IF@j`dF#> z*y`(O*Zd=U#3+)E0o9#~y&wWAs08C|g-()Nr#ih_VW1Vv;I)|#?d-wQV`UEThfm(c zDkYEX3J<%fpcEvJ2Cks{z>iSS03!HTbl}QQ0LzZ^%2)BDRE*8(b6?MaC|9TmXVCrv zXJ82&i7OBBoSX27%-NO?u#wLBkSCm+;OL((W7)PapPS@ab4s;QL6*;-1c; zM(U+ZB~&`(odw7FO5H?=BgvAolm`ZIclXrM;?RZb^dlvvDfCD(t4guhIes_m( z)DDQ|j`$ISKi~&3cgloQZuoc`EVb#TdUNq8s_gV+e~1MR;D8AV5ABZb2hKrMN>`&6 zG2aAG{R(Yx0|pR+UKjwkVuc|X0yZE4lg*Hg*xXdB^e(HPZW+hzfCB~}1HppN zxD;vpVa0RnC>+t6B`HIUGJ`j$RNagpPK8NNNiu@G@K*o+isC)&JG=vHu!bnHixQVi zcM{sra4qIRanB$~`ZLVRTugq_wnyBVw6JUsePgtnale=4)woR0j`qGEc8*F}Y(MF3 z_XXYPhj7<8sNhtgE0`fK7$lhrNYT6Din62-E_-in*M8DjT#oHn@Y=vAa_|9#*W@`9 zxM88&?BsxDbe2=df>`+J1y*V`MYz4K0_yzVqM2;bh*qQmdRUBSQU&4oDKB#JfG3Xt&#aZP|dgcCa_9vA2#Q!2*H@8E~K2 z%*UYFS<&=*EYZU~~k6ryXmkfFnaC7c+1!f@fkh8i_y z+~{#*MS~L)ihS~9%0Z4FKLX(BL?XhDD>t@m>Cxs)hbl2DqzLin&4xB>Y9tDv=9HvK zFDRXo!0FNp7vNnuGBrj&Gg{5~A#u%*AFbDTl?lV@ni(AM4D>T#rfolW?%?5QTNlUM z81AHAkjq!e1;BOt!J}Jvuhb%b_H0s>V_T>ylG8|@T!r%G%2gt3PQ#^2t8H1frJ>xa zm4qxDVl|1CWi)6Bty;7K4Z2n2+O;)*uKf8l@Y7YcNeE>;+#hR2kG8yEX2^juA9{?a z-lIp17<6M8=su#%wH{`!8(?Aphk@(YNB;b9RR;Wm9_P`!HFNFS`}_;SEV#D7&sSgJ z;0}6b&}9Y__nE=gdHvv}RX=h0#S~LXJy2m&4`{d$a~*p4A&4Q0IO2y5@u1-Yz$69C z14*TXQ9?Swh>%1FnPk#HPf#?HLo(&G(u_CWIM9wc;>gpFGdYpuOdUB%krOYy6cb4Z z0d-|iN1>zTP(m5C<(2?ULE)HuQ7DxXQ>>#@nkc9l*g8rmA(xzixdRstbrnV!VOqIW zUk~l{;71wcXhF^uWt;_;dRz@!hI=DW$3%7UC4n6)tnBd*16l008E&0vHY#PMl@=Og zrH)et2ZvPP05}|k0-0=~yw*wOFXfM3Z0n16A2VV'Defects Found During Inspection', + :font=>'Helvetica 12', :plotpady=>[12, 4], + :width=>'6i', :height=>'5i') +Tk::BLT::Table.add(Tk.root, b, :fill=>:both) + +data = [ + ["Spot Weld", 82, 'yellow'], + ["Lathe", 49, 'orange'], + ["Gear Cut", 38, 'green'], + ["Drill", 24, 'blue'], + ["Grind", 17, 'red'], + ["Lapping", 12, 'brown'], + ["Press", 8, 'purple'], + ["De-burr", 4, 'pink'], + ["Packaging", 3, 'cyan'], + ["Other", 12, 'magenta'] +] + +# Create an X-Y graph line element to trace the accumulated defects. +b.line_create('accum', :label=>'', :symbol=>:none, :color=>'red') + +# Define a bitmap to be used to stipple the background of each bar. +pattern1 = Tk::BLT::Bitmap.define([ [4, 4], [1, 2, 4, 8] ]) + +# For each process, create a bar element to display the magnitude. +count = 0 +sum = 0 +ydata = [0] +xdata = [0] +labels = [] + +data.each{|label, value, color| + count += 1 + b.element_create(label, :xdata=>count, :ydata=>value, :foreground=>color, + :relief=>:solid, :borderwidth=>1, :stipple=>pattern1, + :background=>'lightblue') + labels[count] = label + # Get the total number of defects. + sum += value + ydata << sum + xdata << count +} + +# Configure the coordinates of the accumulated defects, +# now that we know what they are. +b.element_configure('accum', :xdata=>xdata, :ydata=>ydata) + +# Add text markers to label the percentage of total at each point. +xdata.zip(ydata){|x, y| + percent = (y * 100.0) / sum + if x == 0 + text = ' 0%' + else + text = '%.1f' % percent + end + b.marker_create(:text, :coords=>[x, y], :text=>text, :font=>'Helvetica 10', + :foreground=>'red4', :anchor=>:center, :yoffset=>-5) +} + +# Display an auxillary y-axis for percentages. +b.axis_configure('y2', :hide=>false, :min=>0.0, :max=>100.0, + :title=>'Percentage') + +# Title the y-axis +b.axis_configure('y', :title=>'Defects') + +# Configure the x-axis to display the process names, instead of numbers. +b.axis_configure('x', :title=>'Process', :rotate=>90, :subdivisions=>0, + :command=>proc{|w, val| + val = val.round + labels[val]? labels[val]: val + }) + +# No legend needed. +b.legend_configure(:hide=>true) + +# Configure the grid lines. +b.gridline_configure(:mapx=>:x, :color=>'lightblue') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1.rb new file mode 100644 index 0000000..07dff48 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1.rb @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +graph = Tk::BLT::Graph.new.pack +plot = Tk::BLT::PlotComponent::Element.new(graph, :linewidth=>0, :label=>'foo') +plot.data([[1.0, 3.4], [1.1, 2.8], [1.2, 3.1], [1.4, 2.9]].flatten) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1b.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1b.rb new file mode 100644 index 0000000..eb41e36 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/plot1b.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +graph = Tk::BLT::Graph.new.pack +plot = graph.element_create +plot.configure(:linewidth=>0, :label=>'foo', + :data=>[[1.0, 3.4], [1.1, 2.8], [1.2, 3.1], [1.4, 2.9]].flatten) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/readme.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/readme.txt new file mode 100644 index 0000000..fe12dd8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/readme.txt @@ -0,0 +1,2 @@ +The scripts and image files in this directory are based on demo files +of Tcl/Tk's BLT extention. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/scripts/stipples.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/scripts/stipples.rb new file mode 100644 index 0000000..47f3c4d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/scripts/stipples.rb @@ -0,0 +1,156 @@ +$stipples = {} unless $stipples + +$stipples['bdiagonal1'] = Tk::BLT::Bitmap.new(<file) +else + fail RuntimeError, 'no image file' +end + +width = src.width +height = src.height + +TkOption.add('*Label.font', '*helvetica*10*') +TkOption.add('*Label.background', 'white') + +l_img0 = TkLabel.new(:image=>src) +l_hdr0 = TkLabel.new(:text=>"#{width} x #{height}") +l_ftr0 = TkLabel.new(:text=>'100%') +Tk.root.background('white') + +(2..10).each{|i| + iw = width/i + ih = height/i + r = '%6g'%(100.0/i) + dst = TkPhotoImage.new(:width=>iw, :height=>ih) + Tk::BLT::Winop.image_resample(src, dst, :sinc) + l_hdr = TkLabel.new(:text=>"#{iw} x #{ih}") + l_ftr = TkLabel.new(:text=>"#{r}%") + l_img = TkLabel.new(:image=>dst) + Tk::BLT::Table.add(Tk.root, + [0,i], l_hdr, + [1,i], l_img, + [2,i], l_ftr) + Tk.update +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/winop2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/winop2.rb new file mode 100644 index 0000000..1f674ee --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/blt/winop2.rb @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/blt' + +file = File.join(File.dirname(File.expand_path(__FILE__)), + 'images', 'qv100.t.gif') +if File.exist?(file) + src = TkPhotoImage.new(:file=>file) +else + fail RuntimeError, 'no image file' +end + +width = src.width +height = src.height + +TkOption.add('*Label.font', '*helvetica*10*') +TkOption.add('*Label.background', 'white') + +[0, 90, 180, 270, 360, 45].each_with_index{|r, i| + dest = TkPhotoImage.new + Tk::BLT::Winop.image_rotate(src, dest, r) + l_txt = TkLabel.new(:text=>"#{r} degrees") + l_img = TkLabel.new(:image=>dest) + Tk::BLT::Table.add(Tk.root, [0,i], l_img, [1,i], l_txt) + Tk.update +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt new file mode 100644 index 0000000..0c4c16f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt @@ -0,0 +1,53 @@ + + ###################################################################### + ### The following text is the original 'LICENSE.txt' of BWidget ### + ### extension. ### + ### Original Tcl source files are not include in this directry, ### + ### because of all of them are rewrited to Ruby files. ### + ### However, the bitmap data files ('bwidgtet.xbm' and 'x1.xbm') ### + ### included in this directory are quoted from BWidget source ### + ### archive. So, those bitmaps are under the following license. ### + ###################################################################### + + +BWidget ToolKit +Copyright (c) 1998-1999 UNIFIX. +Copyright (c) 2001-2002 ActiveState Corp. + +The following terms apply to all files associated with the software +unless explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/basic.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/basic.rb new file mode 100644 index 0000000..c152165 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/basic.rb @@ -0,0 +1,198 @@ +# +# basic demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoBasic + @@var = TkVariable.new_hash + @@after = nil + @@count = 0 + + def self.create(nb) + frame = nb.insert('end', 'demoBasic', :text=>'Basic') + topf = TkFrame.new(frame) + + titf1 = Tk::BWidget::TitleFrame.new(topf, :text=>'Label') + titf2 = Tk::BWidget::TitleFrame.new(topf, :text=>'Entry') + + titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>'Button and ArrowButton') + + _label(titf1.get_frame) + _entry(titf2.get_frame) + _button(titf3.get_frame) + + Tk.pack(titf1, titf2, :side=>:left, :fill=>:both, :padx=>4, :expand=>true) + topf.pack(:pady=>2, :fill=>:x) + titf3.pack(:pady=>2, :padx=>4, :fill=>:x) + end + + def self._label(parent) + lab = Tk::BWidget::Label.new(parent, :text=>'This is a Label widget', + :helptext=>'Label widget') + chk = TkCheckbutton.new(parent, :text=>'Disabled', + :variable=>@@var.ref(lab, 'state'), + :onvalue=>'disabled', :offvalue=>'normal', + :command=>proc{lab[:state] = @@var[lab, 'state']}) + lab.pack(:anchor=>:w, :pady=>4) + chk.pack(:anchor=>:w) + end + + def self._entry(parent) + ent = Tk::BWidget::Entry.new(parent, :text=>'Press enter', + :helptext=>'Entry widtet', + :command=>proc{ + @@var['entcmd'] = 'command called' + Tk.after(500, proc{@@var['entcmd'] = ''}) + }) + + chk1 = TkCheckbutton.new(parent, :text=>'Disabled', + :variable=>@@var.ref(ent, 'state'), + :onvalue=>'disabled', :offvalue=>'normal', + :command=>proc{ent.state = @@var[ent, 'state']}) + + chk2 = TkCheckbutton.new(parent, :text=>'Non editable', + :variable=>@@var.ref(ent, 'editable'), + :onvalue=>false, :offvalue=>true, + :command=>proc{ + ent.editable = @@var[ent, 'editable'] + }) + + lab = TkLabel.new(parent, :textvariable=>@@var.ref('entcmd'), + :foreground=>'red') + + ent.pack(:pady=>4, :anchor=>:w) + Tk.pack(chk1, chk2, :anchor=>:w) + lab.pack(:pady=>4) + end + + def self._button(parent) + frame = TkFrame.new(parent) + but = Tk::BWidget::Button.new(frame, :text=>'Press me!', + :repeatdelay=>300, + :command=>proc{_butcmd('command')}, + :helptext=>'This is a Button widget') + + sep1 = Tk::BWidget::Separator.new(frame, :orient=>:vertical) + arr1 = Tk::BWidget::ArrowButton.new(frame, :type=>:button, + :width=>25, :height=>25, :repeatdelay=>300, + :command=>proc{_butcmd('command')}, + :helptext=>"This is an ArrowButton widget\nof type button") + + sep2 = Tk::BWidget::Separator.new(frame, :orient=>:vertical) + arr2 = Tk::BWidget::ArrowButton.new(frame, :type=>:arrow, + :width=>25, :height=>25, :relief=>:sunken, + :ipadx=>0, :ipady=>0, :repeatdelay=>300, + :command=>proc{_butcmd('command')}, + :helptext=>"This is an ArrowButton widget\nof type arrow") + + but.pack(:side=>:left, :padx=>4) + sep1.pack(:side=>:left, :padx=>4, :fill=>:y) + arr1.pack(:side=>:left, :padx=>4) + sep2.pack(:side=>:left, :padx=>4, :fill=>:y) + arr2.pack(:side=>:left, :padx=>4) + frame.pack + + Tk::BWidget::Separator.new(parent, + :orient=>:horizontal).pack(:fill=>:x, :pady=>10) + + labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Command', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1) + subf = labf1.get_frame + chk1 = TkCheckbutton.new(subf, :text=>'Disabled', + :variable=>@@var.ref('bstate'), + :onvalue=>'disabled', :offvalue=>'normal', + :command=>proc{_bstate(@@var['bstate'], + but, arr1, arr2)}) + chk2 = TkCheckbutton.new(subf, :text=>"Use armcommand/\ndisarmcommand", + :variable=>@@var.ref('barmcmd'), + :command=>proc{_barmcmd(@@var['barmcmd'], + but, arr1, arr2)}) + Tk.pack(chk1, chk2, :anchor=>:w) + + label = TkLabel.new(parent, :textvariable=>@@var.ref('butcmd'), + :foreground=>'red').pack(:side=>:bottom, :pady=>4) + + labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Direction', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1) + subf = labf2.get_frame + @@var['bside'] = :top + [:top, :left, :bottom, :right].each{|dir| + TkRadiobutton.new(subf, :text=>"#{dir} arrow", + :variable=>@@var.ref('bside'), :value=>dir, + :command=>proc{_bside(@@var['bside'], arr1, arr2)} + ).pack(:anchor=>:w) + } + + labf3 = Tk::BWidget::LabelFrame.new(parent, :text=>'Relief', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1) + subf = labf3.get_frame + @@var['brelief'] = :raised + [ %w(raised sunken ridge groove), %w(flat solid link)].each{|lrelief| + f = TkFrame.new(subf) + lrelief.each{|relief| + TkRadiobutton.new(f, :text=>relief, + :variable=>@@var.ref('brelief'), :value=>relief, + :command=>proc{ + _brelief(@@var['brelief'], but, arr1, arr2) + }).pack(:anchor=>:w) + } + f.pack(:side=>:left, :padx=>2, :anchor=>:n) + } + Tk.pack(labf1, labf2, labf3, :side=>:left, :fill=>:y, :padx=>4) + end + + def self._bstate(state, but, arr1, arr2) + [but, arr1, arr2].each{|b| b[:state] = state} + end + + def self._brelief(relief, but, arr1, arr2) + but[:relief] = relief + if relief.to_s != 'link' + [arr1, arr2].each{|arr| arr[:relief] = relief} + end + end + + def self._bside(side, *args) + args.each{|arr| arr[:dir] = side} + end + + def self._barmcmd(value, but, arr1, arr2) + if TkComm.bool(value) + but.configure(:armcommand=>proc{_butcmd('arm')}, + :disarmcommand=>proc{_butcmd('disarm')}, + :command=>'') + [arr1, arr2].each{|arr| + arr.configure(:armcommand=>proc{_butcmd('arm')}, + :disarmcommand=>proc{_butcmd('disarm')}, + :command=>'') + } + else + but.configure(:armcommand=>'', :disarmcommand=>'', + :command=>proc{_butcmd('command')}) + [arr1, arr2].each{|arr| + arr.configure(:armcommand=>'', :disarmcommand=>'', + :command=>proc{_butcmd('command')}) + } + end + end + + def self._butcmd(reason) + unless @@after + @@after = TkTimer.new(500, 1, proc{@@var['butcmd'] = ''}) + end + @@after.stop + if (reason == 'arm') + @@count += 1 + @@var['butcmd'] = "#{reason} command called (#{@@count})" + else + @@count = 0 + @@var['butcmd'] = "#{reason} command called" + end + @@after.start + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/bwidget.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/bwidget.xbm new file mode 100644 index 0000000..5451ebb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/bwidget.xbm @@ -0,0 +1,46 @@ +#define bwidget_width 76 +#define bwidget_height 64 +static char bwidget_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0xb6,0x6d,0xdb,0x16,0x00,0x00,0x00,0x00,0xf0, + 0x00,0xdb,0xb6,0x6d,0xab,0x00,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x75, + 0x01,0x00,0x00,0x00,0xf0,0x00,0x6d,0xdb,0xb6,0xad,0x02,0x00,0x00,0x00,0xf0, + 0x00,0xb6,0x6d,0xdb,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x55,0x55,0x55,0x55, + 0x05,0x00,0x00,0x00,0xf0,0x00,0xda,0xb6,0xad,0x6d,0x0b,0x00,0x00,0x00,0xf0, + 0x00,0x6b,0x03,0xc0,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0x56,0x05,0x00,0x55, + 0x0d,0x00,0x00,0x00,0xf0,0x00,0xbb,0x05,0x80,0xdb,0x06,0x00,0x00,0x00,0xf0, + 0x00,0xca,0x06,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0,0x00,0xb6,0x02,0x00,0xaa, + 0x0a,0x00,0x00,0x00,0xf0,0x00,0xab,0x05,0x00,0x6c,0x0b,0x00,0x00,0x00,0xf0, + 0x00,0xdd,0x06,0x00,0xb6,0x05,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0x55, + 0x05,0x00,0x00,0x00,0xf0,0x00,0xb7,0x05,0xc0,0xda,0x02,0x00,0x00,0x00,0xf0, + 0x00,0xd9,0x06,0x50,0x6b,0x01,0x00,0x00,0x00,0xf0,0x00,0x56,0xb5,0xad,0xad, + 0x00,0x00,0x00,0x00,0xf0,0x00,0xdb,0xd6,0x76,0x15,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x6a,0xab,0xaa,0x2d,0x00,0x00,0x00,0x00,0xf0,0x00,0x56,0x75,0xad,0xb6, + 0x02,0x00,0x00,0x00,0xf0,0x00,0xbb,0xad,0xd6,0xaa,0x05,0x00,0x00,0x00,0xf0, + 0x00,0xca,0xb6,0x6b,0xdb,0x2a,0x00,0x00,0x00,0xf0,0x00,0x77,0xd5,0x5c,0x6d, + 0x2d,0x00,0x00,0x00,0xf0,0x00,0x99,0x05,0x00,0xaa,0x56,0x00,0x00,0x00,0xf0, + 0x00,0xee,0x06,0x00,0x6c,0xbb,0x00,0x00,0x00,0xf0,0x00,0xaa,0x02,0x00,0xb0, + 0x55,0x00,0x00,0x00,0xf0,0x00,0x55,0x05,0x00,0xa8,0xd6,0x00,0x00,0x00,0xf0, + 0x00,0xee,0x06,0x00,0xd0,0x6a,0x00,0x00,0x00,0xf0,0x00,0x55,0x03,0x00,0x68, + 0xb7,0xfc,0x00,0x7e,0xf0,0x00,0x6d,0x05,0x00,0xa8,0xaa,0xfc,0x80,0x7e,0xf0, + 0x00,0xb6,0x05,0x00,0x50,0xbb,0xfe,0x01,0x7e,0xf0,0x00,0x55,0x05,0x00,0x78, + 0xad,0xfe,0x81,0x1f,0xf0,0x00,0xb6,0x05,0x00,0xa4,0xb5,0xfe,0x81,0x1f,0xf0, + 0x00,0x5b,0x05,0x80,0xba,0x56,0xfe,0x83,0x1f,0xf0,0x00,0xaa,0x6b,0x5b,0xd5, + 0x5a,0xff,0x85,0x1f,0xf0,0x00,0xdb,0x5a,0xad,0x57,0x2b,0xff,0xc7,0x0f,0xf0, + 0x00,0x6d,0xad,0xd5,0x6a,0x0d,0xff,0xc7,0x0f,0xf0,0x00,0xaa,0xd6,0xb6,0xba, + 0x05,0xdf,0xc7,0x0f,0xf0,0x00,0xb7,0xb5,0x5a,0xab,0x8a,0xdf,0xcf,0x0f,0xf0, + 0x00,0xd9,0x5a,0xab,0x6d,0x8f,0xcf,0xef,0x07,0xf0,0x00,0x56,0xad,0x75,0xb5, + 0xaf,0x8f,0xef,0x07,0xf0,0x00,0xb5,0xeb,0x5a,0x00,0x9f,0xcf,0xef,0x07,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xff,0x8f,0xff,0x07,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfe,0x87,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0xff,0x03,0xff,0x03,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xfe,0x03,0xff,0x03,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfe,0x03,0xff,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0xff,0x03,0xf0, + 0x00,0x00,0x00,0x00,0x00,0xfe,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x01,0xfe,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/demo.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/demo.rb new file mode 100644 index 0000000..785d268 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/demo.rb @@ -0,0 +1,243 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/bwidget' + +module DemoVar + @_wfont = nil + @notebook = nil + @mainframe = nil + @status = TkVariable.new + @prgtext = TkVariable.new + @prgindic = TkVariable.new + @font = nil + @font_name = nil + @toolbar1 = TkVariable.new(true) + @toolbar2 = TkVariable.new(true) +end +class << DemoVar + attr_accessor :_wfont, :notebook, :mainframe, :font, :font_name + attr_reader :status, :prgtext, :prgindic, :toolbar1, :toolbar2 +end + +class BWidget_Demo + DEMODIR = File.dirname(File.expand_path(__FILE__)) + + %w(manager basic select dnd tree tmpldlg).each{|f| + require File.join(DEMODIR, f << '.rb') + } + + def initialize + TkOption.add('*TitleFrame.l.font', 'helvetica 11 bold italic') + + root = TkRoot.new(:title=>'BWidget demo') + root.withdraw + + _create + + Tk::BWidget.place(root, 0, 0, :center) + root.deiconify + root.raise + root.focus(true) + + root.geometry(root.geometry) + end + + def _create + DemoVar.prgtext.value = 'Please wait while loading font...' + DemoVar.prgindic.value = -1 + + intro = _create_intro + + Tk.update + + Tk::BWidget::SelectFont.load_font + + descmenu = [ + '&File', 'all', 'file', 0, [ + ['command', 'E&xit', [], 'Exit BWidget demo', [], + {:command=>proc{exit}}] + ], + '&Options', 'all', 'options', 0, [ + ['checkbutton', 'Toolbar &1', ['all', 'option'], + 'Show/hide toolbar 1', [], + { :variable=>DemoVar.toolbar1, + :command=>proc{ + DemoVar.mainframe.show_toolbar(0, DemoVar.toolbar1.value) + } + } + ], + ['checkbutton', 'Toolbar &2', ['all', 'option'], + 'Show/hide toolbar 2', [], + { :variable=>DemoVar.toolbar2, + :command=>proc{ + DemoVar.mainframe.show_toolbar(1, DemoVar.toolbar2.value) + } + } + ] + ] + ] + + DemoVar.prgtext.value = 'Creating MainFrame...' + DemoVar.prgindic.value = 0 + + DemoVar.mainframe = Tk::BWidget::MainFrame.new( + :menu=>descmenu, + :textvariable=>DemoVar.status, + :progressvar=>DemoVar.prgindic + ) + + # toobar 1 creation + DemoVar.prgindic.numeric += 1 + + DemoVar.mainframe.add_toolbar{|tb1| + Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox| + add(:image=>Tk::BWidget::Bitmap.new('new'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Create a new file" icon'}, + :helptext=>"Create a new file") + + add(:image=>Tk::BWidget::Bitmap.new('open'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Open an existing file" icon'}, + :helptext=>"Open an existing file") + + add(:image=>Tk::BWidget::Bitmap.new('save'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Save file" icon'}, + :helptext=>"Save file") + + pack(:side=>:left, :anchor=>:w) + } + + Tk::BWidget::Separator.new(tb1, :orient=>:vertical){ + pack(:side=>:left, :fill=>:y, :padx=>4, :anchor=>:w) + } + + DemoVar.prgindic.numeric += 1 + + Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox| + add(:image=>Tk::BWidget::Bitmap.new('cut'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Cut selection" icon'}, + :helptext=>"Cut selection") + + add(:image=>Tk::BWidget::Bitmap.new('copy'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Copy selection" icon'}, + :helptext=>"Copy selection") + + add(:image=>Tk::BWidget::Bitmap.new('paste'), + :highlightthickness=>0, :takefocus=>0, :relief=>:link, + :borderwidth=>1, :padx=>1, :pady=>1, + :command=>proc{puts 'select "Paste selection" icon'}, + :helptext=>"Paste selection") + + pack(:side=>:left, :anchor=>:w) + } + } + + # toolbar 2 creation + DemoVar.prgindic.numeric += 1 + + tb2 = DemoVar.mainframe.add_toolbar + DemoVar._wfont = Tk::BWidget::SelectFont::Toolbar.new(tb2, + :command=>proc{update_font(DemoVar._wfont[:font])} + ) + DemoVar.font = DemoVar._wfont[:font] + DemoVar._wfont.pack(:side=>:left, :anchor=>:w) + + DemoVar.mainframe.add_indicator( + :text=>"BWidget #{Tk::BWidget.package_version}" + ) + DemoVar.mainframe.add_indicator(:textvariable=>'tk_patchLevel') + + # NoteBook creation + DemoVar.notebook = Tk::BWidget::NoteBook.new(DemoVar.mainframe.get_frame) + + DemoVar.prgtext.value = "Creating Manager..." + DemoVar.prgindic.numeric += 1 + DemoManager.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Creating Basic..." + DemoVar.prgindic.numeric += 1 + DemoBasic.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Creating Select..." + DemoVar.prgindic.numeric += 1 + DemoSelect.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Creating Dialog..." + DemoVar.prgindic.numeric += 1 + DemoDialog.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Creating Drag and Drop..." + DemoVar.prgindic.numeric += 1 + DemoDnD.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Creating Tree..." + DemoVar.prgindic.numeric += 1 + DemoTree.create(DemoVar.notebook) + + DemoVar.prgtext.value = "Done" + DemoVar.prgindic.numeric += 1 + + DemoVar.notebook.compute_size + DemoVar.notebook.pack(:fill=>:both, :expand=>true, :padx=>4, :pady=>4) + DemoVar.notebook.raise(DemoVar.notebook.get_page(0)) + + DemoVar.mainframe.pack(:fill=>:both, :expand=>true) + + Tk.update_idletasks + + intro.destroy + end + + def update_font(newfont) + root = Tk.root + root[:cursor] = 'watch' + if newfont != '' && DemoVar.font != newfont + DemoVar._wfont[:font] = newfont + DemoVar.notebook[:font] = newfont + DemoVar.font = newfont + end + root[:cursor] = '' + end + + def _create_intro + top = TkToplevel.new(:relief=>:raised, :borderwidth=>2) + top.withdraw + top.overrideredirect(true) + + ximg = TkLabel.new(top, :bitmap=>"@#{File.join(DEMODIR,'x1.xbm')}", + :foreground=>'grey90', :background=>'white') + bwimg = TkLabel.new(ximg, :bitmap=>"@#{File.join(DEMODIR,'bwidget.xbm')}", + :foreground=>'grey90', :background=>'white') + frame = TkFrame.new(ximg, :background=>'white') + TkLabel.new(frame, :text=>'Loading demo', + :background=>'white', :font=>'times 8').pack + TkLabel.new(frame, :textvariable=>DemoVar.prgtext, + :background=>'white', :font=>'times 8', :width=>35).pack + Tk::BWidget::ProgressBar.new(frame, :width=>50, :height=>10, + :background=>'white', + :variable=>DemoVar.prgindic, + :maximum=>10).pack + frame.place(:x=>0, :y=>0, :anchor=>:nw) + bwimg.place(:relx=>1, :rely=>1, :anchor=>:se) + ximg.pack + Tk::BWidget.place(top, 0, 0, :center) + top.deiconify + + top + end +end + +module DemoVar + Demo = BWidget_Demo.new +end + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/dnd.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/dnd.rb new file mode 100644 index 0000000..1c8b036 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/dnd.rb @@ -0,0 +1,46 @@ +# +# dnd demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoDnD + def self.create(nb) + frame = nb.insert('end', 'demoDnD', :text=>'Drag and Drop') + + titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'Drag source') + subf = titf1.get_frame + + ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry', + :labelwidth=>14, :dragenabled=>true, + :dragevent=>3) + labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (text)', + :width=>14) + f = labf1.get_frame + lab = Tk::BWidget::Label.new(f, :text=>'Drag this text', + :dragenabled=>true, :dragevent=>3).pack + + labf2 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (bitmap)', + :width=>14) + f = labf2.get_frame + lab = Tk::BWidget::Label.new(f, :bitmap=>'info', + :dragenabled=>true, :dragevent=>3).pack + + Tk.pack(ent1, labf1, labf2, :side=>:top, :fill=>:x, :pady=>4) + + titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'Drop targets') + subf = titf2.get_frame + + ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry', + :labelwidth=>14, :dropenabled=>true) + labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label', :width=>14) + f = labf1.get_frame + lab = Tk::BWidget::Label.new(f, :dropenabled=>true, + :highlightthickness=>1).pack(:fill=>:x) + Tk.pack(ent1, labf1, :side=>:top, :fill=>:x, :pady=>4) + Tk.pack(titf1, titf2, :pady=>4) + + frame + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/manager.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/manager.rb new file mode 100644 index 0000000..776cb30 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/manager.rb @@ -0,0 +1,150 @@ +# +# manager demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoManager + @@progress = TkVariable.new(false) + @@status = TkVariable.new('Compute in progress...') + @@homogeneous = TkVariable.new(false) + @@constw = TkVariable.new + @@afterobj = nil + + def self.create(nb) + frame = nb.insert('end', 'demoManager', :text=>'Manager') + + topf = TkFrame.new(frame) + titf1 = Tk::BWidget::TitleFrame.new(topf, :text=>"MainFrame") + titf2 = Tk::BWidget::TitleFrame.new(topf, :text=>"NoteBook") + titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>"Paned & ScrolledWindow") + + _mainframe(titf1.get_frame) + _notebook(titf2.get_frame) + _paned(titf3.get_frame) + + Tk.pack(titf1, titf2, :padx=>4, :side=>:left, :fill=>:both, :expand=>true) + Tk.pack(topf, :fill=>:x, :pady=>2) + Tk.pack(titf3, :pady=>2, :padx=>4, :fill=>:both, :expand=>true) + + frame + end + + def self._mainframe(parent) + labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Toolbar', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>2) + subf = labf1.get_frame + chk1 = TkCheckbutton.new(subf, :text=>'View toolbar 1', + :variable=>DemoVar.toolbar1, + :command=>proc{ + DemoVar.mainframe.show_toolbar( + 0, DemoVar.toolbar1.value + ) + }) + chk2 = TkCheckbutton.new(subf, :text=>'View toolbar 2', + :variable=>DemoVar.toolbar2, + :command=>proc{ + DemoVar.mainframe.show_toolbar( + 1, DemoVar.toolbar2.value + ) + }) + + Tk.pack(chk1, chk2, :anchor=>:w, :fill=>:x) + labf1.pack(:fill=>:both) + + labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Status bar', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>2) + subf = labf2.get_frame + chk1 = TkCheckbutton.new(subf, :text=>"Show Progress\nindicator", + :justify=>:left, :variable=>@@progress, + :command=>proc{ _show_progress }) + chk1.pack(:anchor=>:w, :fill=>:x) + + Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :fill=>:both) + end + + def self._notebook(parent) + TkCheckbutton.new(parent, :text=>'Homogeneous label', + :variable=>@@homogeneous, + :command=>proc{ + DemoVar.notebook[:homogeneous] = @@homogeneous.value + }).pack(:side=>:left, :anchor=>:n, :fill=>:x) + end + + def self._paned(parent) + pw1 = Tk::BWidget::PanedWindow.new(parent, :side=>:top) + pane = pw1.add(:minsize=>100) + + pw2 = Tk::BWidget::PanedWindow.new(pane, :side=>:left) + pane1 = pw2.add(:minsize=>100) + pane2 = pw2.add(:minsize=>100) + + pane3 = pw1.add(:minsize=>100) + + [pane1, pane2].each{|pane| + sw = Tk::BWidget::ScrolledWindow.new(pane) + lb = TkListbox.new(sw, :height=>8, :width=>20, :highlightthickness=>0) + (1..8).each{|i| lb.insert('end', "Valur #{i}") } + sw.set_widget(lb) + sw.pack(:fill=>:both, :expand=>true) + } + + sw = Tk::BWidget::ScrolledWindow.new(pane3, :relief=>:sunken, + :borderwidth=>2) + sf = Tk::BWidget::ScrollableFrame.new(sw) + sw.set_widget(sf) + subf = sf.get_frame + lab = TkLabel.new(subf, :text=>'This is a ScrollableFrame') + chk = TkCheckbutton.new(subf, :text=>'Constrained with', + :variable=>@@constw, :command=>proc{ + sf['constrainedwidth'] = @@constw.value + }) + lab.pack + chk.pack(:anchor=>:w) + chk.bind('FocusIn', proc{sf.see(chk)}) + (0..20).each{|i| + ent = TkEntry.new(subf, :width=>50).pack(:fill=>:x, :pady=>4) + ent.bind('FocusIn', proc{sf.see(ent)}) + ent.insert('end', "Text field #{i}") + } + + Tk.pack(sw, pw2, pw1, :fill=>:both, :expand=>true) + end + + def self._show_progress + unless @@afterobj + @@afterobj = TkTimer.new(30, -1, proc{_update_progress}) + end + if @@progress.bool + DemoVar.status.value = 'Compute in progress...' + DemoVar.prgindic.value = 0 + DemoVar.mainframe.show_statusbar(:progression) + @@afterobj.start unless @@afterobj.running? + else + DemoVar.status.value = '' + DemoVar.mainframe.show_statusbar(:status) + @@afterobj.stop + end + end + + def self._update_progress + if @@progress.bool + if DemoVar.prgindic.numeric < 100 + DemoVar.prgindic.numeric += 5 + else + @@progress.value = false + DemoVar.mainframe.show_statusbar(:status) + DemoVar.status.value = 'Done' + @@afterobj.stop + Tk.after(500, proc{ DemoVar.status.value = '' }) + end + else + @@afterobj.stop + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/select.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/select.rb new file mode 100644 index 0000000..ea24b47 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/select.rb @@ -0,0 +1,82 @@ +# +# select demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoSelect + @@var = TkVariable.new_hash + + def self.create(nb) + frame = nb.insert('end', 'demoSelect', :text=>'Spin & Combo') + + titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'SpinBox') + subf = titf1.get_frame + spin = Tk::BWidget::SpinBox.new(subf, :range=>[1, 100, 1], + :textvariable=>@@var.ref('spin', 'var'), + :helptext=>'This is the SpinBox') + ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var', + :labelwidth=>10, :labelanchor=>:w, + :textvariable=>@@var.ref('spin', 'var'), + :editable=>0, + :helptext=>"This is an Entry reflecting\nthe linked var of SpinBox") + labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1, + :helptext=>'Modify some options of SpinBox') + subf = labf.get_frame + chk1 = TkCheckbutton.new(subf, :text=>'Non editable', + :variable=>@@var.ref('spin', 'editable'), + :onvalue=>false, :offvalue=>true, + :command=>proc{ + spin.editable(@@var['spin', 'editable']) + }) + chk2 = TkCheckbutton.new(subf, :text=>'Disabled', + :variable=>@@var.ref('spin', 'state'), + :onvalue=>'disabled', :offvalue=>'normal', + :command=>proc{ + spin.state(@@var['spin', 'state']) + }) + Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w) + Tk.pack(spin, ent, labf, :pady=>4, :fill=>:x) + titf1.pack + + titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'ComboBox') + subf = titf2.get_frame + combo = Tk::BWidget::ComboBox.new(subf, + :textvariable=>@@var.ref('combo', 'var'), + :values=>[ + 'first value', 'second value', + 'third value', 'fourth value', + 'fifth value' + ], + :helptext=>'This is the ComboBox') + ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var', + :labelwidth=>10, :labelanchor=>:w, + :textvariable=>@@var.ref('combo', 'var'), + :editable=>0, :helptext=>"This is an Entry reflecting\nthe linked var of ComboBox") + labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options', :side=>:top, + :anchor=>:w, :relief=>:sunken, + :borderwidth=>1, :helptext=>'Modify some options of ComboBox') + subf = labf.get_frame + chk1 = TkCheckbutton.new(subf, :text=>'Non editable', + :variable=>@@var.ref('combo', 'editable'), + :onvalue=>false, :offvalue=>true, + :command=>proc{ + combo.editable(@@var['combo', 'editable']) + }) + chk2 = TkCheckbutton.new(subf, :text=>'Disabled', + :variable=>@@var.ref('combo', 'state'), + :onvalue=>'disabled', :offvalue=>'normal', + :command=>proc{ + combo.state(@@var['combo', 'state']) + }) + + Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w) + Tk.pack(combo, ent, labf, :pady=>4, :fill=>:x) + Tk.pack(titf1, titf2, :pady=>4) + + frame + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb new file mode 100644 index 0000000..3d19c8d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb @@ -0,0 +1,221 @@ +# +# templdlg demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoDialog + @@tmpl = TkVariable.new_hash + @@msg = TkVariable.new_hash + @@msgdlg = nil + @@progmsg = TkVariable.new + @@progval = TkVariable.new + @@progdlg = nil + @@resources = TkVariable.new('en') + + def self.create(nb) + frame = nb.insert('end', 'demoDlg', :text=>'Dialog') + + titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'Resources') + titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'Template Dialog') + titf3 = Tk::BWidget::TitleFrame.new(frame, :text=>'Message Dialog') + titf4 = Tk::BWidget::TitleFrame.new(frame, :text=>'Other dialog') + + subf = titf1.get_frame + cmd = proc{ TkOption.read_file(File.join(Tk::BWidget::LIBRARY, 'lang', + @@resources.value + '.rc')) } + Tk.pack(TkRadiobutton.new(subf, :text=>'English', :value=>'en', + :variable=>@@resources, :command=>cmd), + TkRadiobutton.new(subf, :text=>'French', :value=>'fr', + :variable=>@@resources, :command=>cmd), + TkRadiobutton.new(subf, :text=>'German', :value=>'de', + :variable=>@@resources, :command=>cmd), + :side=>:left) + + _tmpldlg(titf2.get_frame) + _msgdlg(titf3.get_frame) + _stddlg(titf4.get_frame) + + titf1.pack(:fill=>:x, :pady=>2, :padx=>2) + titf4.pack(:side=>:bottom, :fill=>:x, :pady=>2, :padx=>2) + Tk.pack(titf2, titf3, :side=>:left, :padx=>2, :fill=>:both, :expand=>true) + end + + def self._tmpldlg(parent) + @@tmpl['side'] = :bottom + @@tmpl['anchor'] = :c + + labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button side', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1) + subf = labf1.get_frame + Tk.pack(TkRadiobutton.new(subf, :text=>'Bottom', :value=>:bottom, + :variable=>@@tmpl.ref('side'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Left', :value=>:left, + :variable=>@@tmpl.ref('side'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Right', :value=>:right, + :variable=>@@tmpl.ref('side'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Top', :value=>:top, + :variable=>@@tmpl.ref('side'), :anchor=>:w), + :fill=>:x, :anchor=>:w) + + labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button anchor', + :side=>:top, :anchor=>:w, + :relief=>:sunken, :borderwidth=>1) + subf = labf2.get_frame + Tk.pack(TkRadiobutton.new(subf, :text=>'North', :value=>:n, + :variable=>@@tmpl.ref('anchor'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'West', :value=>:w, + :variable=>@@tmpl.ref('anchor'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'East', :value=>:e, + :variable=>@@tmpl.ref('anchor'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'South', :value=>:s, + :variable=>@@tmpl.ref('anchor'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Center', :value=>:c, + :variable=>@@tmpl.ref('anchor'), :anchor=>:w), + :fill=>:x, :anchor=>:w) + + sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal) + button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_tmpldlg}) + + button.pack(:side=>:bottom) + sep.pack(:side=>:bottom, :fill=>:x, :pady=>10) + Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :anchor=>:n) + end + + def self._msgdlg(parent) + @@msg['type'] = 'ok' + @@msg['icon'] = 'info' + + labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Type', :side=>:top, + :anchor=>:w, :relief=>:sunken, + :borderwidth=>1) + subf = labf1.get_frame + Tk.pack(TkRadiobutton.new(subf, :text=>'Ok', :value=>'ok', + :variable=>@@msg.ref('type'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Ok, Cancel', :value=>'okcancel', + :variable=>@@msg.ref('type'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Retry, Cancel', + :value=>'retrycancel', + :variable=>@@msg.ref('type'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Yes, No', :value=>'yesno', + :variable=>@@msg.ref('type'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Yes, No, Cancel', + :value=>'yesnocancel', + :variable=>@@msg.ref('type'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Abort, Retry, Ignore', + :value=>'abortretryignore', + :variable=>@@msg.ref('type'), :anchor=>:w), + :fill=>:x, :anchor=>:w) + + Tk.pack(TkRadiobutton.new(subf, :text=>'User', :value=>'user', + :variable=>@@msg.ref('type'), :anchor=>:w), + Tk::BWidget::Entry.new(subf, :textvariable=>@@msg.ref('buttons')), + :side=>:left) + + labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Icon', :side=>:top, + :anchor=>:w, :relief=>:sunken, + :borderwidth=>1) + subf = labf2.get_frame + Tk.pack(TkRadiobutton.new(subf, :text=>'Information', :value=>'info', + :variable=>@@msg.ref('icon'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Question', :value=>'question', + :variable=>@@msg.ref('icon'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Warning', :value=>'warning', + :variable=>@@msg.ref('icon'), :anchor=>:w), + TkRadiobutton.new(subf, :text=>'Error', :value=>'error', + :variable=>@@msg.ref('icon'), :anchor=>:w), + :fill=>:x, :anchor=>:w) + + sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal) + button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_msgdlg}) + + button.pack(:side=>:bottom) + sep.pack(:side=>:bottom, :fill=>:x, :pady=>10) + Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :anchor=>:n) + end + + def self._stddlg(parent) + Tk.pack(TkButton.new(parent, :text=>'Select a color '){|w| + command(proc{DemoDialog._show_color(w)}) + }, + TkButton.new(parent, :text=>'Font selector dialog', + :command=>proc{_show_fontdlg}), + TkButton.new(parent, :text=>'Progression dialog', + :command=>proc{_show_progdlg}), + TkButton.new(parent, :text=>'Password dialog', + :command=>proc{_show_passdlg}), + :side=>:left, :padx=>5, :anchor=>:w) + end + + def self._show_color(w) + dlg = Tk::BWidget::SelectColor.new(w, :color=>w.background) + color = dlg.menu([:below, w]) + unless color.empty? + w.background(color) + end + end + + def self._show_tmpldlg + dlg = Tk::BWidget::Dialog.new(:relative=>Tk.root, :modal=>:local, + :separator=>true, :title=>'Template dialog', + :side=>@@tmpl['side'], + :anchor=>@@tmpl['anchor'], + :default=>0, :cancel=>1) + dlg.add('name'=>'ok') + dlg.add('name'=>'cancel') + TkMessage.new(dlg.get_frame, :text=>"Template\nDialog", :justify=>:center, + :anchor=>:c, :width=>80).pack(:fill=>:both, :expand=>true, + :padx=>100, :pady=>100) + dlg.draw + dlg.destroy + end + + def self._show_msgdlg + @@msgdlg.destroy if @@msgdlg + @@msgdlg = Tk::BWidget::MessageDlg.new(:relative=>Tk.root, + :message=>'Message for MessageBox', + :type=>@@msg['type'], + :icon=>@@msg['icon'], + :buttons=>@@msg['buttons']) + @@msgdlg.create + end + + def self._show_fontdlg + font = Tk::BWidget::SelectFont.new(:relative=>Tk.root, + :font=>DemoVar.font).create + DemoVar::Demo.update_font(font) + end + + def self._show_progdlg + @@progmsg.value = "Compute in progress..." + @@progval.value = 0 + + @@progdlg = Tk::BWidget::ProgressDlg.new(:relative=>Tk.root, + :title=>'Wait...', + :type=>'infinite', :width=>20, + :textvariable=>@@progmsg, + :variable=>@@progval, + :stop=>'Stop') { + command(proc{self.destroy}) + create + } + _update_progdlg + end + + def self._update_progdlg + TkTimer.new(20, -1, proc{ + if @@progdlg && @@progdlg.winfo_exist? + @@progval.value = 2 + else + stop + end + }).start + end + + def self._show_passdlg + Tk::BWidget::PasswdDlg.new(:relative=>Tk.root).create + end +end + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tree.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tree.rb new file mode 100644 index 0000000..e1fcaa7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/tree.rb @@ -0,0 +1,289 @@ +# +# templdlg demo --- called from demo.rb +# +unless Object.const_defined?('DemoVar') + fail RuntimeError, "This is NOT a stand alone script. This script is called from 'demo.rb'. " +end + +module DemoTree + @@count = 0 + @@dblclick = false + @@top = nil + + def self.create(nb) + frame = nb.insert('end', 'demoTree', :text=>'Tree') + pw = Tk::BWidget::PanedWindow.new(frame, :side=>:top) + + pane = pw.add(:weight=>1) + title = Tk::BWidget::TitleFrame.new(pane, :text=>'Directory tree') + sw = Tk::BWidget::ScrolledWindow.new(title.get_frame, + :relief=>:sunken, :borderwidth=>2) + tree = Tk::BWidget::Tree.new(sw, :relief=>:flat, :borderwidth=>0, + :width=>15, :highlightthickness=>0, + :redraw=>false, :dropenabled=>true, + :dragenabled=>true, :dragevent=>3, + :droptypes=>[ + 'TREE_NODE', [ + :copy, [], + :move, [], + :link, [] + ], + 'LISTBOX_ITEM', [ + :copy, [], + :move, [], + :link, [] + ] + ], + :opencmd=>proc{|node| + moddir(1, tree, node) + }, + :closecmd=>proc{|node| + moddir(0, tree, node) + }) + sw.set_widget(tree) + + sw.pack(:side=>:top, :expand=>true, :fill=>:both) + title.pack(:fill=>:both, :expand=>true) + + pane = pw.add(:weight=>2) + lf = Tk::BWidget::TitleFrame.new(pane, :text=>'Content') + sw = Tk::BWidget::ScrolledWindow.new(lf.get_frame, + :scrollbar=>:horizontal, + :auto=>:none, :relief=>:sunken, + :borderwidth=>2) + + list = Tk::BWidget::ListBox.new(sw, :relief=>:flat, :borderwidth=>0, + :highlightthickness=>0, :width=>20, + :multicolumn=>true, :redraw=>false, + :dragevent=>3, :dropenabled=>true, + :dragenabled=>true, + :droptypes=>[ + 'TREE_NODE', [ + :copy, [], + :move, [], + :link, [] + ], + 'LISTBOX_ITEM', [ + :copy, [], + :move, [], + :link, [] + ] + ]) + sw.set_widget(list) + + Tk.pack(sw, lf, :fill=>:both, :expand=>true) + + pw.pack(:fill=>:both, :expand=>true) + + tree.textbind('ButtonPress-1', + proc{|node, ev| select('tree', 1, tree, list, node)}) + tree.textbind('Double-ButtonPress-1', + proc{|node, ev| select('tree', 2, tree, list, node)}) + + list.textbind('ButtonPress-1', + proc{|node, ev| select('list', 1, tree, list, node)}) + list.textbind('Double-ButtonPress-1', + proc{|node, ev| select('list', 2, tree, list, node)}) + + list.imagebind('Double-ButtonPress-1', + proc{|node, ev| select('list', 2, tree, list, node)}) + + nb.itemconfigure('demoTree', + :createcmd=>proc{|*args| init(tree, list, *args)}, + :raisecmd=>proc{ + Tk.root.geometry =~ + /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/ + global_w = ($1 || 0).to_i + global_h = ($2 || 0).to_i + if @@top + Tk::BWidget.place(@@top, 0, 0, :at, + global_w - Tk.root.winfo_screenwidth, global_h) + @@top.deiconify + Tk.root.bind('Unmap', proc{@@top.withdraw}) + Tk.root.bind('Map', proc{@@top.deiconify}) + Tk.root.bind('Configure', proc{|w| + if w == Tk.root + Tk.root.geometry =~ + /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/ + global_w = ($1 || 0).to_i + global_h = ($2 || 0).to_i + Tk::BWidget.place(@@top, 0, 0, :at, + global_w - Tk.root.winfo_screenwidth, + global_h) + end + }, '%W') + end + }, + :leavecmd=>proc{ + @@top.withdraw if @@top + Tk.root.bind_remove('Unmap') + Tk.root.bind_remove('Map') + Tk.root.bind_remove('Configure') + true + }) + end + + def self.init(tree, list, *args) + @@count = 0 + if Tk::PLATFORM['platform'] == 'unix' + rootdir = File.expand_path('~') + else + rootdir = 'c:' + end + + tree.insert('end', 'root', 'home', + :text=>rootdir, :data=>rootdir, :open=>true, + :image=>Tk::BWidget::Bitmap.new('openfold')) + getdir(tree, 'home', rootdir) + select('tree', 1, tree, list, 'home') + tree.redraw(true) + list.redraw(true) + + @@top = TkToplevel.new + @@top.withdraw + @@top.protocol('WM_DELETE_WINDOW'){ + # don't kill me + } + @@top.resizable(false, false) + @@top.title('Drag rectangle to scroll directory tree') + @@top.transient(Tk.root) + Tk::BWidget::ScrollView.new(@@top, :window=>tree, :fill=>'white', + :width=>300, :height=>300, :relief=>:sunken, + :bd=>1).pack(:fill=>:both, :expand=>true) + end + + def self.getdir(tree, node, path) + lentries = Dir.glob(File.join(path, '*')).sort + lfiles = [] + lentries.each{|f| + basename = File.basename(f) + if File.directory?(f) + Tk::BWidget::Tree::Node.new(tree, node, + :index=>'end', :text=>basename, + :image=>Tk::BWidget::Bitmap.new('folder'), + :drawcross=>:allways, :data=>f) + @@count += 1 + else + lfiles << basename + end + } + tree.itemconfigure(node, :drawcross=>:auto, :data=>lfiles) + end + + def self.moddir(idx, tree, node) + if (idx != 0 && tree.itemcget(node, :drawcross).to_s == 'allways') + getdir(tree, node, tree.itemcget(node, :data)) + if tree.nodes(node).empty? + tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('folder')) + else + tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('openfold')) + end + else + img = %w(folder openfold)[idx] || 'openfold' + tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new(img)) + end + end + + def self.select(where, num, tree, list, node) + @@dblclick = true + if num == 1 + if (where == 'tree' && + tree.selection_get.find{|x| + TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node) + }) + @@dblclick = false + Tk.after(500, proc{edit('tree', tree, list, node)}) + return + end + if (where == 'list' && + list.selection_get.find{|x| + TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node) + }) + @@dblclick = false + Tk.after(500, proc{edit('list', tree, list, node)}) + return + end + if where == 'tree' + select_node(tree, list, node) + else + list.selection_set(node) + end + elsif (where == 'list' && tree.exist?(node)) + parent = tree.parent(node) + while TkUtil._get_eval_string(parent) != 'root' + tree.itemconfigure(parent, :open=>true) + parent = tree.parent(parent) + end + select_node(tree, list, node) + end + end + + def self.select_node(tree, list, node) + tree.selection_set(node) + Tk.update + list.delete(*(list.items(0, 'end'))) + + dir = tree.itemcget(node, :data) + if tree.itemcget(node, :drawcross).to_s == 'allways' + getdir(tree, node, dir) + dir = tree.itemcget(node, :data) + end + + tree.nodes(node).each{|subnode| + list.insert('end', subnode, + :text=>tree.itemcget(subnode, :text), + :image=>Tk::BWidget::Bitmap.new('folder')) + } + + TkComm.simplelist(dir).each{|f| + Tk::BWidget::ListBox::Item.new(list, 'end', :text=>f, + :image=>Tk::BWidget::Bitmap.new('file')) + } + end + + def self.edit(where, tree, list, node) + return if @@dblclick + + if (where == 'tree' && + tree.selection_get.find{|x| + TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node) + }) + res = tree.edit(node, tree.itemcget(node, :text)) + if res != '' + tree.itemconfigure(node, :text=>res) + if list.exist?(node) + list.itemconfigure(node, :text=>res) + end + tree.selection_set(node) + end + return + end + + if (where == 'list') + res = list.edit(node, list.igemcget(node, :text)) + if res != '' + list.itemconfigure(node, :text=>res) + if tree.exist?(node) + tree.itemconfigure(node, :text=>res) + else + cursel = tree.selection_get[0] + index = list.index(node) - tree.nodes(cursel).size + data = TkComm.simplelist(tree.itemcget(cursel, :data)) + data[index] = res + tree.itemconfigure(cursel, :date=>data) + end + list.selection_set(node) + end + end + end + + def self.expand(tree, but) + unless (cur = tree.selection_get).empty? + if TkComm.bool(but) + tree.opentree(cur) + else + tree.closetree(cur) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/x1.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/x1.xbm new file mode 100644 index 0000000..6137a11 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/bwidget/x1.xbm @@ -0,0 +1,2258 @@ +#define x1_width 626 +#define x1_height 428 +static char x1_bits[] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x03,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0x3f,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x3f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xe0,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x00,0xf0,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0xfc,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00, + 0xf8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc0,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0xe0,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0x00,0x00,0xf8,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x80,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xc0,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xe0,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0x3f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x1f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0x03,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0x01,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x01,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x00,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xff,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x1f,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0xff,0x1f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x07,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x07,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0x03,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0x01,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x01,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0x7f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x0f,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f, + 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x06,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xfd,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00,0x00,0xf8,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xfc,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xfc,0x00,0x00,0x00,0x00,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0xfc,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0xfc,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xfc, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0xfc,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xfc,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xfc,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0xfc,0x00,0x00, + 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0xfc,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00,0x00,0xe0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0xfc,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0xfc,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xfc,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xfc, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0xfc,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xfc,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0xfc,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0xfc,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xfc,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0xfc,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0xfc,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfc,0x00,0xf0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xfc, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xfc,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0xfc,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xfc,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xfc, + 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00, + 0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfc,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0xfc, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0xc0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xe0, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf8,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xfc,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00, + 0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x80,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x80,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0xc0,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xe0,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0xf8,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0x00,0xf8,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfc,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xfe,0xff, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x3f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0xf0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff, + 0xff,0xff,0x03,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x01, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x3f, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0x1f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xf0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x0f,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x07,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff, + 0x01,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xe0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0x7f,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0x03,0x00, + 0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xc0,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, + 0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x01,0x00,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0x1f,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xc0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0x7f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xf8,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xfc, + 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfe,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0x07,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xc0,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, + 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf8,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x7f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x1f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x80,0xff,0xff, + 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00, + 0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x80,0x0f,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0xc0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x80, + 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0xfc}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt new file mode 100644 index 0000000..22f7876 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt @@ -0,0 +1,42 @@ + + ####################################################################### + ### The following text is the original 'license.terms' of iwidges ### + ### extension. ### + ### Original Tcl source files are not include in this directry, ### + ### because of all of them are rewrited to Ruby files. ### + ### However, the image data files in the 'images' directory are ### + ### quoted from iwidgets source archive. ### + ####################################################################### + + +This software is copyrighted by DSC Technologies and private individual +contributors. The copyright holder is specifically listed in the header +of each file. The following terms apply to all files associated with the +software unless explicitly disclaimed in individual files by private +contributors. + +Copyright 1997 DSC Technologies Corporation + +Permission to use, copy, modify, distribute and license this software and +its documentation for any purpose, and without fee or written agreement +with DSC, is hereby granted, provided that the above copyright notice +appears in all copies and that both the copyright notice and warranty +disclaimer below appear in supporting documentation, and that the names of +DSC Technologies Corporation or DSC Communications Corporation not be used +in advertising or publicity pertaining to the software without specific, +written prior permission. + +DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND NON-INFRINGEMENT. +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND +DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, +ENHANCEMENTS, OR MODIFICATIONS. IN NO EVENT SHALL DSC BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +RESTRICTED RIGHTS: Use, duplication or disclosure by the government +is subject to the restrictions as set forth in subparagraph (c) (1) (ii) +of the Rights in Technical Data and Computer Software Clause as DFARS +252.227-7013 and FAR 52.227-19. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm new file mode 100644 index 0000000..7498e15 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm @@ -0,0 +1,14 @@ +#define Tool_32_box_width 32 +#define Tool_32_box_height 32 +static unsigned char Tool_32_box_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, 0x20, 0x00, 0x00, 0x08, + 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, + 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, + 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, + 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, + 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, + 0xe0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gif new file mode 100644 index 0000000000000000000000000000000000000000..bd45628aa7ac5914e13a8c602285d2e822cf1f35 GIT binary patch literal 279 zcmZ?wbhEHbRA5kG*vtR|XMlJn!_1i=3P=M9AUJd8%zvQ3e}?~H3P=N4K%n@Og^_`Q zk3k102{b{0!GYz-g_EAE_bN1>KKSdjvK~XxjOgn!^L{iG9P{y7+zYyh|?| z733o9_)oAhf6Um%{@_AI$Xc(USL|1Im?W&b!DKgU{v(}}t}aUx&q(CmZtS0RD?ab) zfrp=yO@l*1tX0iTJrk2NyM+__dSWJI^farvy1JL-t2pba&#CfOWKdF@ot#xTZ{_4N zeP5~d-sPJXNkpzO+>v6Xty@1;q{E^%G&HLrz+9*!IDEfj$yu56HEmauj!vA!H)X=T P*auG@JrfdSV6X-NC3$oV literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..f91b9e9d1eb3430ca01bbdf42ea4cb84d0c84bf7 GIT binary patch literal 249 zcmZ?wbhEHbRA5kG*vtR|XMlJn!_1i=3P=M9AUJd8%zvQ3e}?~H>OYY89|RPCvM@3* z@G|HCC4nX=FgUO*+i=oz^;2d7jZ8e6TRa-GIy$?$dnD8QGka6|(^OjBC3BUhx7jhwk}av%D6U(^v2^h&?Ul>R m)~;T))OyR-747+OYY89|RPCvM@3* z@G|HCC4nX=FgUR6+Hlfy^<z&9*hREddRy1Ey>bix1vY=iu+M+h(u){<()vcFj0)s=G0!>~=h_AOnLn E0PBlw>Hq)$ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gif new file mode 100644 index 0000000000000000000000000000000000000000..4258b175912efe77c84f6de6f478285f56b43002 GIT binary patch literal 179 zcmZ?wbhEHbRA5kG*vtR|XMlJn!_1i=3P=M9AUJd8%zvQ3e}?~H3P=N4K%n@Og^_`Q zpFsyG2{b{0!GR^=!%5H8do5nq_OmC<=;=%^dXXZR`Fh#n$Ru};Ibu7{<-h-bAYr{& zQlf{5TziJHYLvyfj71_*>u;It z000C2NV?qqFv>}*y*TU5yZ>M)j${d(XsQBbI|4y0&oNN2ZtlS}ZQlW%P{Zrh3WWh| z$g~uDzkxE?tU6AF=PW8+TE7aw;bi1?sbDL>Foq(faBsT0W@~NmIGVV^Nw9PVf^9N* zc~c#Iei49Kiyw-DgGGjUa(s}FiISY1c1MSZ9F13gfTt)Sb)KGWm3oPq3yr8@sUWMY zk_WCyhnE?B4Oq0MvKwN&%DkMsJg;Z5D#IzW#xH%lgaLR00UfzdZ5X(rca))fY8+Wp{LQGSxgG` qNpvUDqda`D%2kIt z000C2Xu90~Fv>}*y*TU5yZ>M)j$~<`r2q(M>#hJHyYwgocpl7kj}bV)ie&)qe8>q< zpc*QKKtgibSPGfKA_01&PM1wAV6lyLy}sQwOjK-(fs#(Az-jEA_%NyOYP7kUd z?aPwCyd5$D(d_Ty*XPXT%G_4eIS7&u(Kv1XR>dh;K?WE;3IhOOh-QStAnT0GF;h^n zhC^m^F5)OqfMZ7*1PT}^;82PdAS6keJn4dk%RcpDmUKiDg^D&+a>k6&69tS27j=#) gYT~Daq%oPAIQmqmN~u`0YTe4UtJkk!B_sdq zfPjDi000000000000000EC2ui0A>It000F3Fv&@)y*TU5yZ>M)j$~<`C>k6r8>Da? zuI=&4cy6sg-_x!N(55SXUcTQU;k!wYO{4Te3s|q#WwVxm0-Vz+bY(ag3|Zz+{li+r z;qkJ3P`IxWr6dS1-pO@#0SgC&E^bSEV0|)H00RjND+zRVg)TNM1p<=^e2h3&1BQSK zf`*3z0tcLlo{JlALa?(sZvd}zEOuYoQ}83$rKrcQ&Sgp~$`dw6b-$&EX1 z1kCo1qD8S*vX}cV6GZ4cifu)GS-9uEJ^!U{01zdCL1KVXQ8*3-+b0S&nTEjUwpTea1tH zUXuPChtixBTBL7f?Tp2u>D-cZpa{YcHDI!-EX^+Sz1auyj2DLvi_RC)=xN)j=>jl( zxAGSoSF6zue&S7TaEKL`j<}rpJdUI6Q7&`^`CjFmt;f273A*SSy-g1j-;LvN?WQad dlH?shKacEHP~6WyeE$Cc1_mhLfCEMV06Wgy2L1p5 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm new file mode 100644 index 0000000..4622ae9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm @@ -0,0 +1,14 @@ +#define lineOp_width 32 +#define lineOp_height 32 +static unsigned char lineOp_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, + 0x80, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, + 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x01, + 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x0f, + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a5be66e76b4fdd96d685fcd3cdf641bdd3fcfeb GIT binary patch literal 183 zcmV;o07(BwNk%v~VIKe=0KxzOX=!Ny007(D+k%3E|NsAaY41rqjsO4vEC2ui03QG! z000Ao2)f+|Q3>e!Pg!edJF+oGyc3a$&QT~OOzx^;scuQW0Rg@jvW z&_liigTb%q>`kdc>$OxRZgpAjms!&mPoaz^1_&@upg@7GFntDv0%1;9WAb`@bPEOs lfO~@sg@=NPi+PBN3Xg%3lZKFugOr+^n3jqLpra!R06V^9O27aB literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gif new file mode 100644 index 0000000000000000000000000000000000000000..9c68ad35f552b9bec43a6e3664a6fd3706daf051 GIT binary patch literal 212 zcmZ?wbhEHbRA5kG*vtR|`u_g=_wT>7rRVFt&Ho7j#h)yU3=B*RIv|}OGaOhN13Va4 z?Y(jCtg1qSM&H8(K8Fi|DX)cI{@QCIQC=*|q`tw=GWPW`PA>N&y&rc3Kb&E3#h>%+ zkCcEQp&71L-LV(13Fjr9-mw1CskGHQ&zzbfWgffSTWWp#`FU^hQ!$Ij3l=V#FD%HwU=0AUifa!5 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gif new file mode 100644 index 0000000000000000000000000000000000000000..bed862c8c41a74fcf04e39e0a398e4504b75f202 GIT binary patch literal 258 zcmZ?wbhEHbRA5kG*vtR|XMlJn!_1i=3P=M9AUJd8%zvQ3e}?~H>OYY89|RPCvM@3* z@G|HCC4nX=FgUQR-*D1%^O<6Z@)&7L_FP~US86Liv=JRe(#WeF%HfujWIlE$? z+*+-(4enuyEv;?s9WCyidbtH{3@*%*rc9nTMOSi?R8DR-N59C#tn7Iy6Bjxy&{?Kg vT`RvLuV%{z_DynIch%{w-nHIukC5g;t7FGc9Jlcji8*(^=VFH-1A{dHYu<0h literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm new file mode 100644 index 0000000..856bd43 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm @@ -0,0 +1,14 @@ +#define ovalOp_width 32 +#define ovalOp_height 32 +static unsigned char ovalOp_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, + 0x00, 0x1c, 0x70, 0x00, 0x00, 0x03, 0x80, 0x01, 0x80, 0x00, 0x00, 0x02, + 0x40, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, + 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x10, + 0x10, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x04, + 0x80, 0x00, 0x00, 0x02, 0x00, 0x03, 0x80, 0x01, 0x00, 0x1c, 0x70, 0x00, + 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gif new file mode 100644 index 0000000000000000000000000000000000000000..9974f23bf573a6beba96f828f7b9c41b227ef58f GIT binary patch literal 376 zcmZ?wbhEHbRA5kG*vtR|XMlJn!_1isXU_Zw(m)mvoB?ux;{O@`gDD^lWC4NVPZmZ7 z1{MY#kWP>p4lMsBobX(|mnDH18BNYvY9VKlnp6vM;`f5s#IJ?!v z#;b?J4;cRXa`2F=_X9?KH3jE=QJ0sVl@<3iTGbPJNy)7A@rkJ!FVh-N%(mD&W6y$3 L>BqPP85pbqPa&ZC literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm new file mode 100644 index 0000000..c50aa4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm @@ -0,0 +1,14 @@ +#define dotPencilOp_width 32 +#define dotPencilOp_height 32 +static unsigned char dotPencilOp_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x12, 0x00, + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x80, 0x04, 0x00, + 0x00, 0x80, 0x04, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, + 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, + 0x00, 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, + 0x00, 0x24, 0x00, 0x18, 0x00, 0x24, 0x00, 0x18, 0x00, 0x12, 0x00, 0x00, + 0x00, 0x12, 0x00, 0x30, 0x00, 0x0e, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x06, 0x0c, 0x30, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x30, 0xa0, 0x01, + 0x00, 0x60, 0xb0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gif new file mode 100644 index 0000000000000000000000000000000000000000..2b595bb9b7fa1cb98b51552c8a15adb1f7ebebef GIT binary patch literal 141 zcmV;80CN9FNk%v~VIKe=0HFW?X=!P`w*N^yj(KVCEC2ui03QG!0007JgpaAq?GK}z zw5ou!-aH7_g`Ds$*np<$s*+&9#;j|?@;%U(jmLU&>iJ4Ll2O3B{SclbGAUa+f;ee| vsw6_NQSF19b6Q_Bv3Cj$TMpoHqPAV~$IjX1f0m7$`W1Pyhfsj^RCv literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gif new file mode 100644 index 0000000000000000000000000000000000000000..d321f17457e3c819a03faed38103529dc01cc6e6 GIT binary patch literal 263 zcmV+i0r>t$Nk%v~VP*g(0Pz3-|Ns90009600NL5uEC2ui0A>It0008uoR6u??GK}z zwAzca-n{z{hT=$;=82~2%0j^l$8t*}0f6Uv9@PH53j%sR8c+tq5sNIKP`BJ5ql%aD zxua&L+Jn{A#T=1Pm^5nEd^t|+um@LDzt%d@zK(U;&$=NjvG#YTM>jPnD8_{}KqzNp zxD@Fn2{>VyaMviuI0)%U8LCDRx4G2`3M!a~3AV`P^~kX5DB9TifE)XF)1Fi4jgx{tt)M)NNWuY(&+B#?JKV9 TpVTikb=ve9GiQl#GFSrutpG}U literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1ceb1a5c40100343edcfd24f0b32ccfe39f0ce5 GIT binary patch literal 270 zcmV+p0rCDvNk%v~VP*g(0Pz3-|Ns90005w%0NL5uEC2ui0A>It0008#oR6u??GK}z zwAzca-n{z{hT=$;=82~2%C@c-#PUqj?-~et&C9o%+X05eVo(tHrH+B36TpPclnLh3 zs6%#m)PwapjBb1eGW81lA8fqyOsJK}w7#X?>I(qTf2&jo_2|Gwg`RQt5M#f3oce*Q4 znTvRtDhmf0y!@&=Hv^r>Cu_~zJUmeuEi>Ik!d>Tm3_c>R9P@1+f?l)E4njE}UvGbp UpRd2q-|znqFrdJJDGC4pJNTh}G5`Po literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gif new file mode 100644 index 0000000000000000000000000000000000000000..f885c9ca5ff51d89d0535d3afbfade8dfe202bc1 GIT binary patch literal 124 zcmZ?wbh9u|lxL7qZ7f^EFgY;Z)x13 z#ux*orIpK$o$8V}vrR7cv|!wAq5IB%s|+8qyjaZ8yLf5$wxn|oD>6=T9k^$ql{NV` Yuc>&{bw_2>{a4;>`^}p#!oXk+0C<})WdHyG literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm new file mode 100644 index 0000000..ffb0686 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm @@ -0,0 +1,14 @@ +#define font_edit_width 32 +#define font_edit_height 32 +static unsigned char font_edit_bits[] = { + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x7b, + 0x00, 0x00, 0x80, 0x7e, 0x00, 0x00, 0xc0, 0xfd, 0x00, 0x00, 0x60, 0xfb, + 0x00, 0x00, 0xb0, 0xf7, 0x00, 0x00, 0xd0, 0xef, 0x00, 0x00, 0xf8, 0xdf, + 0x00, 0x00, 0xd4, 0x7f, 0x00, 0x00, 0xaa, 0x1f, 0x00, 0x00, 0x15, 0x0f, + 0x00, 0x80, 0x82, 0x06, 0x03, 0x40, 0x01, 0x01, 0x07, 0xa0, 0x80, 0x00, + 0x0f, 0x10, 0x40, 0x00, 0x1f, 0x08, 0x20, 0x00, 0x3b, 0xe4, 0x1f, 0x00, + 0x73, 0x1a, 0x00, 0x00, 0xe3, 0x07, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x00, + 0xe3, 0x03, 0x00, 0x00, 0x7b, 0x07, 0x00, 0x00, 0x1f, 0x06, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb new file mode 100644 index 0000000..2b7cd45 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# sample 1 +p bb1 = Tk::Iwidgets::Buttonbox.new +p bb1.add('Yes', :text=>'Yes', :command=>proc{puts 'Yes'}) +p bb1.add('No', :text=>'No', :command=>proc{puts 'No'}) +p bb1.add('Maybe', :text=>'Maybe', :command=>proc{puts 'Maybe'}) +bb1.default('Yes') +bb1.pack(:expand=>true, :fill=>:both, :pady=>5) +print "\n" + +# sample 2 +p bb2 = Tk::Iwidgets::Buttonbox.new +p btn1 = bb2.add(:text=>'Yes', :command=>proc{puts 'Yes'}) +p btn2 = bb2.add(:text=>'No', :command=>proc{puts 'No'}) +p btn3 = bb2.add(:text=>'Maybe', :command=>proc{puts 'Maybe'}) +bb2.default(btn1) +bb2.pack(:expand=>true, :fill=>:both, :pady=>5) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb new file mode 100644 index 0000000..4dd929c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Calendar.new(:command=>proc{|arg| puts(arg.date)}, + :weekendbackground=>'mistyrose', + :weekdaybackground=>'ghostwhite', + :outline=>'black', :startday=>'wednesday', + :days=>%w(We Th Fr Sa Su Mo Tu)).pack +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb new file mode 100644 index 0000000..c7c0430 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Canvasprintbox.new(:orient=>:landscape, :stretch=>1) \ + .pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb new file mode 100644 index 0000000..ea8d63e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Canvasprintdialog.new.activate + +Tk.mainloop + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb new file mode 100644 index 0000000..bae0eba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +cb = Tk::Iwidgets::Checkbox.new +cb.add('bold', :text=>'Bold') +cb.add('italic', :text=>'Italic') +cb.add('underline', :text=>'Underline') +cb.select('underline') +cb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb new file mode 100644 index 0000000..ec9c7a1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb @@ -0,0 +1,32 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# +# Non-editable Dropdown Combobox +# +cb1 = Tk::Iwidgets::Combobox.new(:labeltext=>'Month:', + :selectioncommand=>proc{ + puts(cb1.get_curselection) + }, + :editable=>false, :listheight=>185, + :popupcursor=>'hand1') + +cb1.insert_list('end', *%w(Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec)) + + +# +# Editable Dropdown Combobox +# +cb2 = Tk::Iwidgets::Combobox.new(:labeltext=>'Operating System:', + :selectioncommand=>proc{ + puts(cb2.get_curselection) + }) + +cb2.insert_list('end', *%w(Linux HP-UX SunOS Solaris Irix)) +cb2.insert_entry('end', 'L') + +cb1.pack(:padx=>10, :pady=>10, :fill=>:x) +cb2.pack(:padx=>10, :pady=>10, :fill=>:x) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb new file mode 100644 index 0000000..5727879 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Dateentry.new.pack + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb new file mode 100644 index 0000000..12d4982 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +df = Tk::Iwidgets::Datefield.new(:command=>proc{puts(df.get)}) +df.pack(:fill=>:x, :expand=>true, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb new file mode 100644 index 0000000..3449cd4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Thread.new{Tk.mainloop} + +d = Tk::Iwidgets::Dialog.new(:modality=>:application) + +d.buttonconfigure('OK', :command=>proc{puts 'OK'; d.deactivate true}) +d.buttonconfigure('Apply', :command=>proc{puts 'Apply'}) +d.buttonconfigure('Cancel', :command=>proc{puts 'Cancel'; d.deactivate false}) +d.buttonconfigure('Help', :command=>proc{puts 'Help'}) + +TkListbox.new(d.child_site, :relief=>:sunken).pack(:expand=>true, :fill=>:both) + +if TkComm.bool(d.activate) + puts "Exit via OK button" +else + puts "Exit via Cancel button" +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb new file mode 100644 index 0000000..197521e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +ds = Tk::Iwidgets::Dialogshell.new(:modality=>:none) + +ds.add('OK', :text=>'OK', :command=>proc{puts 'OK'; ds.deactivate}) +ds.add('Cancel', :text=>'Cancel', :command=>proc{puts 'Cancel'; ds.deactivate}) +ds.default('OK') + +TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7, + :command=>proc{puts ds.activate}).pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb new file mode 100644 index 0000000..85c5d03 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +djl = Tk::Iwidgets::Disjointlistbox.new.pack(:fill=>:both, :expand=>true, + :padx=>10, :pady=>10) +djl.set_lhs(*[0,2,4,5]) +djl.set_rhs(3,6) + +djl.insert_lhs(1,7,8) +djl.insert_rhs(9) + +p djl.get_lhs +p djl.get_rhs + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb new file mode 100644 index 0000000..856d883 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb @@ -0,0 +1,39 @@ +#!/usr/bin/env ruby +######################################################### +# +# use Tk::UTF8_String() for a utf8 charecter +# +######################################################### +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"}) + +fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:', + :fixed=>10, :width=>12) + +nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:', + :validate=>:numeric, :width=>12) + +aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:', + :validate=>:alphabetic, :width=>12, + :invalid=>proc{ + puts "Alphabetic contents invalid" + }) + +pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12, + :show=>Tk::UTF8_String("\267"), + ## <=== utf8 character + :command=>proc{puts "Return Pressed"}) + +Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef) + +ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb new file mode 100644 index 0000000..e2b4eec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby +######################################################### +# +# set $KCODE to 'utf' for a utf8 charecter +# +######################################################### +unless defined?(::Encoding.default_external) + $KCODE='utf' +else + DEFAULT_TK_ENCODING = 'UTF-8' +end + +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"}) + +fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:', + :fixed=>10, :width=>12) + +nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:', + :validate=>:numeric, :width=>12) + +aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:', + :validate=>:alphabetic, :width=>12, + :invalid=>proc{ + puts "Alphabetic contents invalid" + }) + +pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12, + :show=>"\267", ## <=== utf8 character + :command=>proc{puts "Return Pressed"}) + +Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef) + +ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb new file mode 100644 index 0000000..bddd542 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby +######################################################### +# +# set Tk.encoding = 'utf-8' for a utf8 charecter +# +######################################################### +require 'tk' +require 'tkextlib/iwidgets' + +Tk.encoding = 'utf-8' + +TkOption.add('*textBackground', 'white') + +ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"}) + +fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:', + :fixed=>10, :width=>12) + +nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:', + :validate=>:numeric, :width=>12) + +aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:', + :validate=>:alphabetic, :width=>12, + :invalid=>proc{ + puts "Alphabetic contents invalid" + }) + +pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12, + :show=>"\267", ## <=== utf8 character + :command=>proc{puts "Return Pressed"}) + +Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef) + +ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) +pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb new file mode 100644 index 0000000..6971052 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Extbutton.new(:text=>'Bitmap example', :bitmap=>'info', + :background=>'bisque', :activeforeground=>'red', + :bitmapforeground=>'blue', :defaultring=>true, + :command=>proc{ + puts "Bisque is beautiful" + }).pack(:expand=>true) + +#img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../../../images/earthris.gif')) +img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/clear.gif')) + +Tk::Iwidgets::Extbutton.new(:text=>'Image example', :relief=>:ridge, + :image=>img, :imagepos=>:e, :font=>'9x15bold', + :activebackground=>'lightyellow', + :background=>'lightgreen').pack(:expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb new file mode 100644 index 0000000..4738084 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Extfileselectionbox.new.pack(:padx=>10, :pady=>10, + :fill=>:both, :expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb new file mode 100644 index 0000000..c1a9b3d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +# +# Non-modal example +# +nmfsd = Tk::Iwidgets::Extfileselectiondialog.new(:title=>'Non-Modal') +nmfsd.buttonconfigure('OK', :command=>proc{ + puts "You selected #{nmfsd.get}" + nmfsd.deactivate + }) +nmfsd.activate + +# +# Modal example +# +mfsd = Tk::Iwidgets::Extfileselectiondialog.new(:modality=>:application) +mfsd.center +if TkComm.bool(mfsd.activate) + puts "You selected #{mfsd.get}" +else + puts "You cancelled the dialog" +end + + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb new file mode 100644 index 0000000..7b87a02 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Feedback.new(:labeltext=>'Status', :steps=>20){|fb| + pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true) + TkTimer.new(500, 20, proc{fb.step}).start(2500) +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb new file mode 100644 index 0000000..2ad3adb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Fileselectionbox.new.pack(:padx=>10, :pady=>10, + :fill=>:both, :expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb new file mode 100644 index 0000000..ff22b2f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +# +# Non-modal example +# +nmfsd = Tk::Iwidgets::Fileselectiondialog.new(:title=>'Non-Modal') +nmfsd.buttonconfigure('OK', :command=>proc{ + puts "You selected #{nmfsd.get}" + nmfsd.deactivate + }) +nmfsd.activate + +# +# Modal example +# +mfsd = Tk::Iwidgets::Fileselectiondialog.new(:modality=>:application) +mfsd.center +if TkComm.bool(mfsd.activate) + puts "You selected #{mfsd.get}" +else + puts "You cancelled the dialog" +end + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb new file mode 100644 index 0000000..110efb9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +st = Tk::Iwidgets::Scrolledtext.new.pack +st.insert('end', "Now is the time for all good men\n") +st.insert('end', "to come to the aid of their country") + +fd = Tk::Iwidgets::Finddialog.new(:textwidget=>st) +fd.center(st) +fd.activate + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb new file mode 100644 index 0000000..ddb08d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +def get_files(file) + dir = (file.empty?)? ENV['HOME'] : TkComm._fromUTF8(file) + Dir.chdir(dir) rescue return '' + Dir['*'].sort.collect{|f| + [TkComm._toUTF8(File.join(dir, f)), TkComm._toUTF8(f)] + } +end + +Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)}, + :visibleitems=>'30x15', + :labeltext=>ENV['HOME']).pack(:side=>:left, + :expand=>true, + :fill=>:both) + +# Tk::Iwidgets::Hierarchy.new(:querycommand=>[proc{|n| get_files(n)}, '%n'], +# :visibleitems=>'30x15', +# :labeltext=>ENV['HOME']).pack(:side=>:left, +# :expand=>true, +# :fill=>:both) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb new file mode 100644 index 0000000..f9c92bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +dir = '/usr/local/ActiveTcl/demos/IWidgets/html/' +href = [ 'hyperhelp.n', 'buttonbox.n', 'calendar.n' ] + +hh = Tk::Iwidgets::Hyperhelp.new(:topics=>href, :helpdir=>dir) +hh.show_topic('hyperhelp.n') +hh.activate + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb new file mode 100644 index 0000000..4e2e21e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +lf = Tk::Iwidgets::Labeledframe.new(:labeltext=>'Entry Frame', :labelpos=>:n) +lf.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10) + +cs = lf.child_site + +Tk::Iwidgets::Entryfield.new(cs, :labeltext=>'Name:').pack(:side=>:top, :fill=>:x) +Tk::Iwidgets::Spinint.new(cs, :labeltext=>'Number:').pack(:side=>:top, :fill=>:x) +Tk::Iwidgets::Pushbutton.new(cs, :text=>'Details:').pack(:side=>:top, :fill=>:x) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb new file mode 100644 index 0000000..1d2e0a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +lw = Tk::Iwidgets::Labeledwidget.new(:labeltext=>'Canvas Widget', + :labelpos=>:s) +lw.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10) + +cw = TkCanvas.new(lw.child_site, :relief=>:raised, :width=>200, :height=>200, + :borderwidth=>3, :background=>:white) +cw.pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb new file mode 100644 index 0000000..b87a6d2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb @@ -0,0 +1,64 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mw = Tk::Iwidgets::Mainwindow.new + +mw.menubar.add(:menubutton, 'file', :text=>'File', :underline=>0, + :padx=>8, :pady=>2, :menu=>[ + [:options, {:tearoff=>false}], + + [:command, 'new', { + :label=>'New', :underline=>0, + :helpstr=>'Create a new file' + } + ], + + [:command, 'open', { + :label=>'Open ...', :underline=>0, + :helpstr=>'Open an existing file' + } + ], + + [:command, 'save', { + :label=>'Save', :underline=>0, + :helpstr=>'Save the current file' + } + ], + + [:command, 'saveas', { + :label=>'Save As', :underline=>5, + :helpstr=>'Save the file as a different name' + } + ], + + [:command, 'print', { + :label=>'Print', :underline=>0, + :helpstr=>'Print the file' + } + ], + + [:separator, 'sep1'], + + [:command, 'close', { + :label=>'Close', :underline=>0, + :helpstr=>'Close the file' + } + ], + + [:separator, 'sep2'], + + [:command, 'exit', { + :label=>'Exit', :underline=>1, + :helpstr=>'Exit this application' + } + ], + + nil + ]) + +Tk::Iwidgets::Scrolledtext.new(mw.child_site).pack(:fill=>:both, :expand=>true) + +mw.activate + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb new file mode 100644 index 0000000..891761a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb @@ -0,0 +1,124 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +helpvar = TkVariable.new +viewmode = TkVariable.new + +menu_spec = [ + [:menubutton, 'file', { + :text=>'File', :menu=>[ + [:options, {:tearoff=>false}], + + [:command, 'new', { + :label=>'New', :helpstr=>'Open new document', + :command=>proc{puts 'NEW'} + } + ], + + [:command, 'close', { + :label=>'Close', :helpstr=>'Close current document', + :command=>proc{puts 'CLOSE'} + } + ], + + [:separator, 'sep1'], + + [:command, 'exit', { + :label=>'Exit', :helpstr=>'Exit application', + :command=>proc{exit} + } + ] + ] + } + ], + + [:menubutton, 'edit', { + :text=>'Edit', :menu=>[ + [:options, {:tearoff=>false}], + + [:command, 'undo', { + :label=>'Undo', :underline=>0, + :helpstr=>'Undo last command', + :command=>proc{puts 'UNDO'} + } + ], + + [:separator, 'sep2'], + + [:command, 'cut', { + :label=>'Cut', :underline=>1, + :helpstr=>'Cut selection to clipboard', + :command=>proc{puts 'CUT'} + } + ], + + [:command, 'copy', { + :label=>'Copy', :underline=>1, + :helpstr=>'Copy selection to clipboard', + :command=>proc{puts 'COPY'} + } + ], + + [:command, 'paste', { + :label=>'Paste', :underline=>0, + :helpstr=>'Paste clipboard contents', + :command=>proc{puts 'PASTE'} + } + ] + ] + } + ], + + [:menubutton, 'options', { + :text=>'Options', :menu=>[ + [:options, {:tearoff=>false, :selectcolor=>'blue'}], + + [:radiobutton, 'byName', { + :variable=>viewmode, :value=>'NAME', + :label=>'by Name', :helpstr=>'View files by name order', + :command=>proc{puts 'NAME'} + } + ], + + [:radiobutton, 'byDate', { + :variable=>viewmode, :value=>'DATE', + :label=>'by Date', :helpstr=>'View files by date order', + :command=>proc{puts 'DATE'} + } + ], + + [:cascade, 'prefs', { + :label=>'Preferences', :menu=>[ + [:command, 'colors', { + :label=>'Colors...', :helpstr=>'Change text colors', + :command=>proc{puts 'COLORS'} + } + ], + + [:command, 'fonts', { + :label=>'Fonts...', :helpstr=>'Change text font', + :command=>proc{puts 'COLORS'} + } + ] + ] + } + ] + ] + } + ] +] + +#mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar, +# :menubuttons=>menu_spec) +mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar) +mb.configure(:menubuttons=>menu_spec) + +fr = TkFrame.new(:width=>300, :height=>300) +ef = TkEntry.new(:textvariable=>helpvar) + +mb.pack(:anchor=>:nw, :fill=>:x, :expand=>true) +fr.pack(:fill=>:both, :expand=>true) +ef.pack(:anchor=>:sw, :fill=>:x, :expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb new file mode 100644 index 0000000..d6f2292 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +helpvar = TkVariable.new +viewmode = TkVariable.new + +mb = Tk::Iwidgets::Menubar.new +mb.menubuttons = [ + [:menubutton, 'file', { + :text=>'File', :menu=>[ + [:command, 'new', {:label=>'New'}], + [:command, 'close', {:label=>'Close'}], + [:separator, 'sep1'], + [:command, 'quit', {:label=>'Quit'}] + ] + } + ], + [:menubutton, 'edit', {:text=>'Edit'}] +] + +mb.add(:command, '.edit.undo', :label=>'Undo', :underline=>0) +mb.add(:separator, '.edit.sep2') +mb.add(:command, '.edit.cut', :label=>'Cut', :underline=>1) +mb.add(:command, '.edit.copy', :label=>'Copy', :underline=>1) +mb.add(:command, '.edit.paste', :label=>'Paste', :underline=>0) + +mb.add(:menubutton, '.options', :text=>'Options', :menu=>[ + [:radiobutton, 'byName', { + :variable=>viewmode, :value=>'NAME', :label=>'by Name'} + ], + [:radiobutton, 'byDate', { + :variable=>viewmode, :value=>'DATE', :label=>'by Date'} + ] + ]) + +mb.add(:cascade, '.options.prefs', :label=>'Preferences', :menu=>[ + [:command, 'colors', {:label=>'Colors...'}], + [:command, 'fonts', {:label=>'Fonts...'}] + ]) + +mb.pack(:side=>:left, :anchor=>:nw, :fill=>:x, :expand=>true) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb new file mode 100644 index 0000000..3221dbc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic, + :labeltext=>'Messages', :labelpos=>:n, + :height=>120, :width=>550, + :savedir=>'/tmp', :textbackground=>'#d9d9d9') +mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true) + +mb.type_add('ERROR', :background=>'red', :foreground=>'white', :bell=>true) +mb.type_add('WARNING', :background=>'yellow', :foreground=>'black') +mb.type_add('INFO', :background=>'white', :foreground=>'black') + +mb.issue('This is an error message in red with a beep', 'ERROR') +mb.issue('This warning message in yellow', 'WARNING') +mb.issue('This is an informational message', 'INFO') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb new file mode 100644 index 0000000..2f0e364 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic, + :labeltext=>'Messages', :labelpos=>:n, + :height=>120, :width=>550, + :savedir=>'/tmp', :textbackground=>'#d9d9d9') +mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true) + +error = mb.type_add(:background=>'red', :foreground=>'white', :bell=>true) +warning = mb.type_add(:background=>'yellow', :foreground=>'black') +info = mb.type_add(:background=>'white', :foreground=>'black') + +mb.issue('This is an error message in red with a beep', error) +mb.issue('This warning message in yellow', warning) +mb.issue('This is an informational message', info) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb new file mode 100644 index 0000000..6c6bfbc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +# +# Standard question message dialog used for confirmation. +# +md = Tk::Iwidgets::Messagedialog.new(:title=>'Message Dialog', + :text=>'Are you sure ? ', + :bitmap=>'questhead', :modality=>:global) + +md.buttonconfigure('OK', :text=>'Yes') +md.buttonconfigure('Cancel', :text=>'No') + +if TkComm.bool(md.activate) + md.text('Are you really sure ? ') + if TkComm.bool(md.activate) + puts 'Yes' + else + puts 'No' + end +else + puts 'No' +end + +md.destroy + +# +# Copyright notice with automatic deactivation. +# +bmp = '@' + File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/text.xbm') + +cr = Tk::Iwidgets::Messagedialog.new(:title=>'Copyright', + :bitmap=>bmp, :imagepos=>:n, + :text=>"Copyright 200x XXX Corporation\nAll rights reserved") + +cr.hide('Cancel') + +cr.activate +Tk.after(7000, proc{cr.deactivate; Tk.root.destroy}) + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb new file mode 100644 index 0000000..e33b81e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# Create the tabnotebook widget and pack it. +nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100) +nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true, + :side=>:left, :padx=>10, :pady=>10) + +# Add two pages to the tabnotebook, +# labelled "Page One" and "Page Two" +nb.add(:label=>'Page One') +nb.add(:label=>'Page Two') + +# Get the child site frames of these two pages. +page1CS = nb.child_site(0) +page2CS = nb.child_site('Page Two') + +# Create buttons on each page of the tabnotebook. +TkButton.new(page1CS, :text=>'Button One').pack +TkButton.new(page2CS, :text=>'Button Two').pack + +# Select the first page of the tabnotebook. +nb.select(0) + +# Create the scrollbar and associate teh scrollbar +# and the notebook together, then pack the scrollbar +nb.scrollbar(TkScrollbar.new).pack(:fill=>:y, :expand=>true, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb new file mode 100644 index 0000000..649de4f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# Create the tabnotebook widget and pack it. +nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100) +nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true, + :side=>:top, :padx=>10, :pady=>0) + +# Add two pages to the tabnotebook, +# labelled "Page One" and "Page Two" +nb.add(:label=>'Page One') +nb.add(:label=>'Page Two') + +# Get the child site frames of these two pages. +page1CS = nb.child_site(0) +page2CS = nb.child_site('Page Two') + +# Create buttons on each page of the tabnotebook. +TkButton.new(page1CS, :text=>'Button One').pack +TkButton.new(page2CS, :text=>'Button Two').pack + +# Select the first page of the tabnotebook. +nb.select(0) + +# Create the scrollbar and associate teh scrollbar +# and the notebook together, then pack the scrollbar +nb.xscrollbar(TkScrollbar.new).pack(:fill=>:x, :expand=>true, :padx=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb new file mode 100644 index 0000000..1fd7a5b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +om = Tk::Iwidgets::Optionmenu.new(:labelmargin=>5, :labelpos=>:w, + :labeltext=>"Operating System :") + +om.insert('end', 'Unix', 'VMS', 'Linux', 'OS/2', 'Windows NT', 'DOS') +om.sort_ascending +om.select('Linux') + +om.pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb new file mode 100644 index 0000000..6e4458e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +pw = Tk::Iwidgets::Panedwindow.new(:width=>300, :height=>300) + +pw.add('top') +pw.add('middle', :margin=>10) +pw.add('bottom', :margin=>10, :minimum=>10) + +pw.pack(:fill=>:both, :expand=>true) + +pw.child_site_list.each{|pane| + TkButton.new(pane, :text=>pane.path, :relief=>:raised, + :borderwidth=>2).pack(:fill=>:both, :expand=>true) +} + +pw.fraction(50,30,20) +pw.paneconfigure(0, :minimum=>20) +pw.paneconfigure('bottom', :margin=>15) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb new file mode 100644 index 0000000..6779cb5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +pw = Tk::Iwidgets::Panedwindow.new(:width=>300, :height=>300) + +top = pw.add +middle = pw.add(:margin=>10) +bottom = pw.add(:margin=>10, :minimum=>10) + +pw.pack(:fill=>:both, :expand=>true) + +pw.child_site_list.each{|pane| + TkButton.new(pane, :text=>pane.path, :relief=>:raised, + :borderwidth=>2).pack(:fill=>:both, :expand=>true) +} + +pw.fraction(50,30,20) +pw.paneconfigure(0, :minimum=>20) # 0 == pw.index(top) +pw.paneconfigure(bottom, :margin=>15) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb new file mode 100644 index 0000000..2c643e5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +TkOption.add('*textBackground', 'white') + +pd = Tk::Iwidgets::Promptdialog.new(:modality=>:global, :title=>'Password', + :labeltext=>'Password:', :show=>'*') +pd.hide('Apply') + +if TkComm.bool(pd.activate) + puts "Password entered: #{pd.get}" +else + puts "Password prompt cancelled" +end diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb new file mode 100644 index 0000000..6e1c3ff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Pushbutton.new(:text=>'Hello', + :command=>proc{puts 'Hello World'}, + :defaultring=>true).pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb new file mode 100644 index 0000000..9cd6a00 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +rb = Tk::Iwidgets::Radiobox.new(:labeltext=>'Fonts') +rb.add('times', :text=>'Times') +rb.add('helvetica', :text=>'Helvetica') +rb.add('courier', :text=>'Courier') +rb.add('symbol', :text=>'Symbol') +rb.select('courier') +rb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb new file mode 100644 index 0000000..92c94b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +sc = Tk::Iwidgets::Scrolledcanvas.new + +sc.create(TkcRectangle, 100, 100, 400, 400, :fill=>'red') +TkcRectangle.new(sc, 300, 300, 600, 600, :fill=>'green') +TkcRectangle.new(sc, [[200, 200], [500, 500]], :fill=>'blue') + +sc.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb new file mode 100644 index 0000000..5219847 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +sf = Tk::Iwidgets::Scrolledframe.new(:width=>150, :height=>180, + :labeltext=>'scrolledframe') +cs = sf.child_site + +TkButton.new(cs, :text=>'Hello').pack(:pady=>10) +TkButton.new(cs, :text=>'World').pack(:pady=>10) +TkButton.new(cs, :text=>'This is a test').pack(:pady=>10) +TkButton.new(cs, :text=>'This is a really big button').pack(:pady=>10) +TkButton.new(cs, :text=>'This is another really big button').pack(:pady=>10) +TkButton.new(cs, :text=>'This is the last really big button').pack(:pady=>10) + +sf.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb new file mode 100644 index 0000000..04334b8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +sh = Tk::Iwidgets::Scrolledhtml.new(:fontname=>'helvetica', + :linkcommand=>proc{|href| + sh.import_link(href) + }) +sh.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +sh.import(Tk.getOpenFile(:title=>'select HTML document')) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb new file mode 100644 index 0000000..0b69751 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +slb = Tk::Iwidgets::Scrolledlistbox.new(:selectmode=>:single, + :vscrollmode=>:static, + :hscrollmode=>:dynamic, + :labeltext=>'List', + :selectioncommand=>proc{ + puts(slb.get_curselection) + }, + :dblclickcommand=>proc{ + puts('Double Click') + puts(slb.get_curselection) + }) +slb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +slb.insert('end', *['Hello', 'Out There', 'World']) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb new file mode 100644 index 0000000..dd1a99a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +st = Tk::Iwidgets::Scrolledtext.new(:hscrollmode=>:dynamic, :wrap=>:none, + :labeltext=>'Password File') +st.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10) + +st.import('/etc/passwd') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb new file mode 100644 index 0000000..a5d623a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +sb = Tk::Iwidgets::Selectionbox.new.pack(:padx=>10, :pady=>10, + :fill=>:both, :expand=>true) + +sb.insert_items('end', *['Hello', 'Out There', 'World']) + +TkLabel.new(sb.child_site, + :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10) + +sb.insert_items(2, 'Cruel Cruel') + +sb.selection_set(1) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb new file mode 100644 index 0000000..f40b419 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +mainloop = Thread.new{Tk.mainloop} + +TkButton.new(:text=>'QUIT', + :command=>proc{Tk.root.destroy}).pack(:padx=>10, :pady=>10) + +Tk::Iwidgets::Selectiondialog.new.activate + +mainloop.join diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb new file mode 100644 index 0000000..c44b555 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +sh = Tk::Iwidgets::Shell.new(:modality=>:application, + :padx=>20, :pady=>20, :title=>'Shell') + +TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7, + :command=>proc{puts sh.activate}).pack(:padx=>10, :pady=>10) + +TkLabel.new(sh.child_site, :text=>'SHELL').pack +TkButton.new(sh.child_site, :text=>'YES', + :command=>proc{sh.deactivate 'press YES'}).pack(:fill=>:x) +TkButton.new(sh.child_site, :text=>'NO', + :command=>proc{sh.deactivate 'press NO'}).pack(:fill=>:x) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb new file mode 100644 index 0000000..17197a6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Spindate.new.pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb new file mode 100644 index 0000000..0bcdefb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +TkOption.add('*textBackground', 'white') + +Tk::Iwidgets::Spinint.new(:labeltext=>'Temperature', :labelpos=>:w, :width=>5, + :fixed=>true, :range=>[32, 212]).pack(:pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb new file mode 100644 index 0000000..295d38e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +class Spinner_demo < TkWindow + Months = %w(January February March April May June July August September October November December) + + def block_input(c) + false + end + + def spin_month(step) + index = Months.index(@spinner.get) + step + index = 11 if index < 0 + index = 0 if index > 11 + + @spinner.value = Months[index] + end + + def initialize(parent=nil) + @spinner = Tk::Iwidgets::Spinner.new(parent, :labeltext=>'Month : ', + :width=>10, :fixed=>10, + :validate=>proc{|c| block_input}, + :decrement=>proc{spin_month -1}, + :increment=>proc{spin_month 1}) + @path = @spinner + @spinner.insert(0, Months[0]) + end +end + +Spinner_demo.new.pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb new file mode 100644 index 0000000..2c13884 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Spintime.new.pack(:padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb new file mode 100644 index 0000000..6f1ecc4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb @@ -0,0 +1,26 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# Create the tabnotebook widget and pack it. +tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100) +tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true, + :side=>:left, :padx=>10, :pady=>10) + +# Add two pages to the tabnotebook, +# labelled "Page One" and "Page Two" +tn.add(:label=>'Page One') +tn.add(:label=>'Page Two') + +# Get the child site frames of these two pages. +page1CS = tn.child_site(0) +page2CS = tn.child_site('Page Two') + +# Create buttons on each page of the tabnotebook. +TkButton.new(page1CS, :text=>'Button One').pack +TkButton.new(page2CS, :text=>'Button Two').pack + +# Select the first page of the tabnotebook. +tn.select(0) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb new file mode 100644 index 0000000..4a5eef5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# Create the tabnotebook widget and pack it. +tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100) +tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true, + :side=>:top, :padx=>10, :pady=>0) + +# Add two pages to the tabnotebook, +# labelled "Page One" and "Page Two" +tn.add(:label=>'Page One') +tn.add(:label=>'Page Two') + +# Get the child site frames of these two pages. +page1CS = tn.child_site(0) +page2CS = tn.child_site('Page Two') + +# Create buttons on each page of the tabnotebook. +TkButton.new(page1CS, :text=>'Button One').pack +TkButton.new(page2CS, :text=>'Button Two').pack + +# Select the first page of the tabnotebook. +tn.select(0) + +# Create the scrollbar +# and the notebook together, then pack the scrollbar +tn.xscrollbar(TkScrollbar.new).pack(:fill=>:x, :expand=>true, :padx=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb new file mode 100644 index 0000000..90be46b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +# Create a listbox with two items (one and two) +l = TkListbox.new(:selectmode=>:single, :exportselection=>false).pack +l.insert('end', 'one') +l.insert('end', 'two') +l.selection_set(0) + +# Define a proc that knows how to select an item +# from a list given an index from the tabset -command callback. +selectItem = proc{|item| + l.selection_clear(l.curselection) + l.selection_set(item) + l.see(item) +} + +# Create a tabset, set its -command to call selectItem +# Add two labels to the tabset (one and two). +ts = Tk::Iwidgets::Tabset.new(:command=>selectItem) +ts.add(:label=>1) +ts.add(:label=>2) +ts.select(0) +ts.pack(:fill=>:x, :expand=>true) + +# Define a proc that knows how to select a tab +# given a y pixel coordinate from the list.. +selectTab = proc{|y| ts.select(l.nearest(y)) } + +# bind button 1 press to the selectTab procedure. +l.bind('ButtonPress-1', proc{|y| selectTab.call(y) }, '%y') + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb new file mode 100644 index 0000000..4659399 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Tk::Iwidgets::Timeentry.new.pack + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb new file mode 100644 index 0000000..bb59450 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +tf = Tk::Iwidgets::Timefield.new(:command=>proc{puts(tf.get)}) +tf.pack(:fill=>:x, :expand=>true, :padx=>10, :pady=>10) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb new file mode 100644 index 0000000..355466e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb @@ -0,0 +1,152 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +########################################## +# icon images +editcopy22 = TkPhotoImage.new(:data=><<'EOD') + R0lGODlhFgAWAIUAAPwCBBQSFPz+/DQyNISChDw6PMzKzMTGxERGRIyKjFxa + XMTCvKSmpHR2dPz6/Pz29PTq3MS2rPz69MTCxFxWVHx6dJyWjNzSzPz27Pzy + 7Pzu5PTm3NTKvIR+fJyGfHxuZHxqXNTCtPTq5PTi1PTezNS+rExOTFRORMyy + lPTaxOzWxOzSvNze3NTOxMy2nMyulMyqjAQCBAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAbY + QIBwSCwahYGkUnk0BgTQ6IAQaBKfUWhBYKhaAU+CgXAQIAyChLeJzSIQhcH6 + GFaM0QtGY5kstqEODw8QEQELAhJTc08KBBMEFBUWDRcBE1pca20SGBkaEBsc + AY5maFRIAgoLHRQRHh8gIQFlZnByqA8ZGSIQIyQjJQEmYgJ5p2ACrK4gJx4g + KIZZAgdeAQ4ZI9kjKSor0AwEjeAs1S0cHAslLi4vMDDRWeRIfEsxMeET4ATy + VoYLC5fizXEiAR84BeMG+pEm8EsAFhAjSlR4hR6fLxiF0AkCACH+aENyZWF0 + ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5 + OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2 + ZWxjb3IuY29tADs= +EOD + +editcut22 = TkPhotoImage.new(:data=><<'EOD') + R0lGODlhFgAWAIMAAPwCBAQCBAwCBPz+/OTi5JyanOzq7DQyNGxqbAAAAAAA + AAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAARbEMhJq704gxBE + 0Bf3cZo4kRJqBQNRfBucyudgvJS6VaxLzyMa6/bLiWA9HOg4VIIkL5vzuRkc + pkvRIIAorphJLzBW84WEuRZWp6uaT7J2Sh1Hit3OY/ZO7WvsEQAh/mhDcmVh + dGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAx + OTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRl + dmVsY29yLmNvbQA7 +EOD + +editpaste22 = TkPhotoImage.new(:data=><<'EOD') + R0lGODlhFgAWAIYAAPwCBBQWFDw6FHRuFGRaBFxSBAQCBAQKBCQiBIx6HPz6 + /NTOfKyiXDQuFOTm5Pz+/Ozu7PTq5Pz63PTyxNTOjKSeRExGLMTGxMzKzNTS + 1NTW1Dw2NKSmpKyqrKSipJyanNzWlLy6ZLSuVIx6FISChIyKhJSSlCQiJLS2 + tDw6NDQyNCQiFCQmHBQSDGRiZHRydGxubHx6dGxqbFxeXGRmZFxaXCwuLOzq + 7KyurHx+fDwmFEQuFCweFCQWDBQODBwaHBweHKSinJSWlOTi5JyepHR2dDw6 + PBQSFNze3ERGRIyKjIyOjISGhPz29Pzy7MS2rMzOzFRWVHx2dHxybDQiFPz2 + 7Pzu5PTq3PTm1NTCtJyGdHxuZHxqXPzq3PTaxNS6pFxWVFRKRNS2nPTi1PTS + tNSulNzOxNSynMymhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAA + LAAAAAAWABYAAAf/gACCgwABAgMEBYSLggaOjgcICQoLDA2Pj4MGDg8QEZ4F + DxITFBUWFxcYGRobjQ8cHR4fCQ8gCyEiFSMWJCUkJieNEB4dKB4pKissK8wr + LS4vMDHBAAYQHx8dFx0fJDIzNDU0M+IyHzaNNyg43Ng5Ojs7Ojw9Pj9AMkCN + DiZB/h9CSOx4QLCgihItqBkYgqIDESElitAYWJCgkQcXjjRCgi1Ihw4BB5LA + QOLCgyQYHihpUU3DBw5ElpAgAYNixSRJjKjQaECDCRPZPDB5IbIGSQwKLnh4 + wbInLA4kmJB4oaPiAwVNnER40hRK1BIAaVatUZJEFCkmpmjgCeWDCalFe4q4 + oFKwSRUrEa5gycLzwq8lUnPQ4PEgSpYcUZ5o2cIlS1O/JHLEDdfjQZMIVrpg + weLFy5e+M6WSmBGlxYMYYBRzCaOFi5imHWBIfOEiShLTVjaP6eyFTBmN1TA5 + OvLDjJksWb58OVMGDRqWjAYdmU79SIvpjqJr104nEAAh/mhDcmVhdGVkIGJ5 + IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5 + OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29y + LmNvbQA7 +EOD + +editdelete22 = TkPhotoImage.new(:data=><<'EOD') + R0lGODlhFgAWAIYAAASC/FRSVExKTERCRDw6PDQyNCwuLBweHBwaHAwODAwK + DAQCBExOTNze3NTW1MTGxLS2tJyanPz+/Ozu7BQSFCwqLDw+POTi5PTu7MzK + xIR+fCQmJPz6/Oze1NTGvPz69Pzy7Pz29LyyrPy+vPyupPTm1BQWFIQCBPwC + BMS6rPzSzNTOxPTi1NS+rPTezNzOxPTizOzWxMy2pOzaxMy2nPTaxOzOtMyy + nOzSvMyqjPx+fOzGpMSihPTq3OzKrOTCpNzKxNTCtAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAA + LAAAAAAWABYAAAf8gACCAQIDBAUGBwgJCgsLgpCRAAwNlZYODxALEY+SkAMN + EqKjEw0UD5yegqCjrRMVEqidkgWhraMWF7GptLa3EgEWFRSOnhW+vxgZEBqz + kBvItxwdHryRCNGjHyAhHSLOgtgSI60c2yQjJd+eJqEnKK0hJCgnJSngAO0S + F+8qEvL0VrBogW+BLX4oVKgIyMIFQU8KfDV4R+8FDBcxZBREthAFiRIsOsyg + sVEUh4Un3pGoUcPGjZInK65QicPlxg8oX5RwqNJGjo0hdJwQ6EIkjRM6dvDY + CKIHSBc1Ztjw4eOH0oIrsgIJEqSFDBo0cuTgsdSTo7No0xYTZCcQACH+aENy + ZWF0ZWQgYnkgQk1QVG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29y + IDE5OTcsMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cu + ZGV2ZWxjb3IuY29tADs= +EOD + +text22 = TkPhotoImage.new(:data=><<'EOD') + R0lGODlhFgAWAIQAAPwCBAQCBBwaHAwKDBQSFLy+vLS2tJSWlBQWFKyqrFRS + VCwqLDQyNNTS1GxqbFxaXJyanIyOjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAWABYAAAVcICCOZGmK + QSoMaZsShBsQBdAapHvgaIDUqUPJlRjSbAoT0fRDKgODRbF0PLUYjZO2F2Bs + t9evNix+dsvDlGKK5jraudQb7qbX6a2HEJ+ycyF+LRE8ZTI+fX5oGCEAIf5o + Q3JlYXRlZCBieSBCTVBUb0dJRiBQcm8gdmVyc2lvbiAyLjUNCqkgRGV2ZWxD + b3IgMTk5NywxOTk4LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KaHR0cDovL3d3 + dy5kZXZlbGNvci5jb20AOw== +EOD + +########################################## + +bmp_dir = File.join(File.dirname(File.expand_path(__FILE__)), + '../catalog_demo/images') + +########################################## + +status_var = TkVariable.new +radio_var = TkVariable.new +check_var1 = TkVariable.new +check_var2 = TkVariable.new + +tb = Tk::Iwidgets::Toolbar.new(:helpvariable=>status_var) + +########################################## + +tb.add(:button, :helpstr=>'Copy It', :image=>editcopy22, + :balloonstr=>'Copy', :command=>proc{puts 'Copy It'}) + +tb.add(:button, :helpstr=>'Cut It', :image=>editcut22, + :balloonstr=>'Cut', :command=>proc{puts 'Cut It'}) + +tb.add(:button, :helpstr=>'Paste It', :image=>editpaste22, + :balloonstr=>'Paste', :command=>proc{puts 'Paste It'}) + +tb.add(:button, :helpstr=>'Delete It', :image=>editdelete22, + :balloonstr=>'Delete', :command=>proc{puts 'Delete It'}) + +#-------------------------------- + +tb.add(:frame, :borderwidth=>1, :width=>10, :height=>10) + +#-------------------------------- + +tb.add(:radiobutton, :variable=>radio_var, :value=>'Box', + :bitmap=>"@#{bmp_dir}/box.xbm", + :helpstr=>'Radio Button #1', :balloonstr=>'Radio', + :command=>proc{puts 'Radio Button "Box"'}) + +tb.add(:radiobutton, :variable=>radio_var, :value=>'Line', + :bitmap=>"@#{bmp_dir}/line.xbm", + :helpstr=>'Radio Button #2', :balloonstr=>'Radio', + :command=>proc{puts 'Radio Button "Line"'}) + +tb.add(:radiobutton, :variable=>radio_var, :value=>'Oval', + :bitmap=>"@#{bmp_dir}/oval.xbm", + :helpstr=>'Radio Button #3', :balloonstr=>'Radio', + :command=>proc{puts 'Radio Button "Oval"'}) + +#-------------------------------- + +tb.add(:frame, :borderwidth=>1, :width=>10, :height=>10) + +#-------------------------------- + +tb.add(:checkbutton, :variable=>check_var1, :onvalue=>'yes', :offvalue=>'no', + :image=>text22, :command=>proc{puts 'Checkbutton 1'}) + +tb.add(:checkbutton, :variable=>check_var2, :onvalue=>'yes', :offvalue=>'no', + :bitmap=>"@#{bmp_dir}/points.xbm", :command=>proc{puts 'Checkbutton 2'}) + +tb.pack(:side=>:top, :anchor=>:nw) + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb new file mode 100644 index 0000000..808c798 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +require 'tk' +require 'tkextlib/iwidgets' + +Thread.new{ + trap('INT') {puts 'catch SIGINT'} + sleep 5 + trap('INT', 'DEFAULT') +} + +Tk::Iwidgets::Watch.new(:state=>:disabled, :showampm=>:no, + :width=>155, :height=>155){|w| + w.pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true) + # TkTimer.new(1000, -1, proc{w.show; Tk.update}).start + TkTimer.new(25, -1, proc{w.show; Tk.update}).start +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt new file mode 100644 index 0000000..2728538 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt @@ -0,0 +1,46 @@ + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + >>> The following text is the original 'license.term' of tklib <<< + >>> extension. <<< + >>> Original Tcl files are not include in this directry, because <<< + >>> of all of them are rewrited to Ruby files. <<< + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + +This software is copyrighted by Ajuba Solutions and other parties. +The following terms apply to all files associated with the software unless +explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/datefield.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/datefield.rb new file mode 100644 index 0000000..cfeca0c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/datefield.rb @@ -0,0 +1,29 @@ +#!/usr/bin/ruby + +require 'tk' +require 'tkextlib/tcllib/datefield' +require 'parsedate' + +Tk.root.title('Datefield example') + + +my_date1 = TkVariable.new +my_date2 = TkVariable.new +my_date1.trace('w'){ + begin + t = Time.local(*(ParseDate.parsedate(my_date1.value))) + my_date2.value = t.strftime('%A') + rescue + # ignore error + end +} + +df = Tk::Tcllib::Datefield.new(:textvariable=>my_date1) +Tk.grid(TkLabel.new(:text=>'Enter a date:', :anchor=>:e), df, :sticky=>:ew) +Tk.grid(TkLabel.new(:text=>'That date ia a:', :anchor=>:e), + TkLabel.new(:textvariable=>my_date2, :relief=>:sunken, :width=>12), + :sticky=>:ew) + +df.set_focus + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb new file mode 100644 index 0000000..053b0de --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb @@ -0,0 +1,158 @@ +#!/usr/bin/ruby + +require 'tk' +require 'tkextlib/tcllib/plotchart' + +############################### + +c1 = TkCanvas.new(:background=>'white', :width=>400, :height=>200) +c2 = TkCanvas.new(:background=>'white', :width=>400, :height=>200) +c3 = TkCanvas.new(:background=>'white', :width=>400, :height=>200) +Tk.pack(c1,c2,c3, :fill=>:both, :side=>:top) + +h = TkToplevel.new(:title=>'h') +hc1 = TkCanvas.new(h, :background=>'white', :width=>400, :height=>200) +hc2 = TkCanvas.new(h, :background=>'white', :width=>400, :height=>200) +Tk.pack(hc1,hc2, :fill=>:both, :side=>:top) + +v = TkToplevel.new(:title=>'v') +vc1 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200) +vc2 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200) +vc3 = TkCanvas.new(v, :background=>'white', :width=>400, :height=>200) +Tk.pack(vc1,vc2,vc3, :fill=>:both, :side=>:top) + +############################### + +s = Tk::Tcllib::Plotchart::XYPlot.new(c1, [0.0, 100.0, 10.0], + [0.0, 100.0, 20.0]) + + +xd = 5.0 +yd = 20.0 +xold = 0.0 +yold = 50.0 + +s.dataconfig('series1', :color=>'red') + +(0..19).each{|i| + xnew = xold + xd + ynew = yold + (rand() - 0.5) * yd + ynew2 = yold + (rand() - 0.5) * 2.0 * yd + s.plot('series1', xnew, ynew) + s.plot('series2', xnew, ynew2) + xold = xnew + yold = ynew +} + +s.xtext "X-coordinate" +s.ytext "Y-data" +s.title "Aha!" + +c1.wait_visibility + +s.save_plot "aha.ps" + +############################### + +s = Tk::Tcllib::Plotchart::Piechart.new(c2) + +s.plot([ ["Long names", 10], ["Short names", 30], + ["Average", 40], ["Ultra-short names", 5] ]) + +# +# Note: title should be shifted up +# - distinguish a separate title area +# +s.title "Okay - this works" + +############################### + +s = Tk::Tcllib::Plotchart::PolarPlot.new(c3, [3.0, 1.0]) + +0.step(359, 10){|angle| + rad = 1.0+Math.cos(angle*Math::PI/180.0) + s.plot('cardioid', rad, angle) +} + +s.title "Cardioid" + +############################### + +s = Tk::Tcllib::Plotchart::Barchart.new(hc1, %w(A B C D E), + [0.0, 10.0, 2.0], 2) + +s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') +s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green') +s.title "Arbitrary data" + +############################### + +s = Tk::Tcllib::Plotchart::Barchart.new(hc2, %w(A B C D E), + [0.0, 20.0, 5.0], :stacked) + +s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') +s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green') +s.title "Stacked diagram" + +############################### + +s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc1, [0.0, 10.0, 2.0], + %w(A B C D E), 2) + +s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') +s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green') +s.title "Arbitrary data" + +############################### + +s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc2, [0.0, 20.0, 5.0], + %w(A B C D E), :stacked) + +s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') +s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green') +s.title "Stacked diagram" + +############################### + +s = Tk::Tcllib::Plotchart::Timechart.new(vc3, "1 january 2004", + "31 december 2004", 4) + +s.period("Spring", "1 march 2004", "1 june 2004", 'green') +s.period("Summer", "1 june 2004", "1 september 2004", 'yellow') +s.vertline("1 jan", "1 january 2004") +s.vertline("1 apr", "1 april 2004") +s.vertline("1 jul", "1 july 2004") +s.vertline("1 oct", "1 october 2004") +s.milestone("Longest day", "21 july 2004") +s.title "Seasons (northern hemisphere)" + +############################### + +z = TkToplevel.new(:title=>'3D') + +zc1 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>300) +zc2 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>250) +Tk.pack(zc1,zc2) + +s = Tk::Tcllib::Plotchart::Plot3D.new(zc1, + [0, 10, 3], [-10, 10, 10], [0, 10, 2.5]) + +s.title "3D Plot" +s.plot_function{|x, y| + # cowboyhat + x1 = x.to_f/9.0 + y1 = y.to_f/9.0 + 3.0 * (1.0-(x1*x1+y1*y1))*(1.0-(x1*x1+y1*y1)) +} + +s = Tk::Tcllib::Plotchart::Plot3D.new(zc2, + [0, 10, 3], [-10, 10, 10], [0, 10, 2.5]) +s.title "3D Plot - data " +s.colour("green", "black") +s.plot_data([ [1.0, 2.0, 1.0, 0.0], + [1.1, 3.0, 1.1, -0.5], + [3.0, 1.0, 4.0, 5.0] ]) + +############################### + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb new file mode 100644 index 0000000..33a6f29 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb @@ -0,0 +1,71 @@ +#!/usr/bin/ruby + +require 'tk' +require 'tkextlib/tcllib/plotchart' + +############################### + +c1 = TkCanvas.new(:background=>'white', :width=>400, :height=>200) +c2 = TkCanvas.new(:background=>'white', :width=>400, :height=>200) +Tk.pack(c1,c2, :fill=>:both, :side=>:top) + +############################### +# Set up a strip chart +############################### +slipchart = Tk::Tcllib::Plotchart::Stripchart.new(c1, [0.0, 100.0, 10.0], + [0.0, 100.0, 20.0]) + +TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object + slipchart, xold, xd, yold, yd = obj.return_value + xnew = xold + xd + ynew = yold + (rand() - 0.5) * yd + ynew2 = yold + (rand() - 0.5) * 2.0 * yd + slipchart.plot('series1', xnew, ynew) + slipchart.plot('series2', xnew, ynew2) + obj.stop if xnew >= 200 + [slipchart, xnew, xd, ynew, yd] # return_value + }).start(100, proc{ + # init return_value + [slipchart, 0.0, 15.0, 50.0, 30.0] + }) + +slipchart.title "Aha!" + +############################### +# Set up an isometric plot +############################### +s = Tk::Tcllib::Plotchart::IsometricPlot.new(c2, [0.0, 100.0], [0.0, 200.0], + :noaxes) + +s.set_zoom_pan + +s.plot('rectangle', [10.0, 10.0, 50.0, 50.0], 'green') +s.plot('filled-rectangle', [20.0, 20.0, 40.0, 40.0], 'red') +s.plot('filled-circle', [70.0, 70.0, 40.0], 'yellow') +s.plot('circle', [70.0, 70.0, 42.0]) + +############################### +# Check the symbols +############################### +h = TkToplevel.new(:title=>'h') +c = TkCanvas.new(h, :bg=>'white', :width=>400, :height=>200).pack(:fill=>:both) + +s = Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0], + [0.0, 100.0, 20.0]) +s.dataconfig('series1', :colour=>'red', :type=>:symbol) +s.dataconfig('series2', :colour=>'green', :type=>:both) + +s.yconfig(:format=>"%12.2e") + +x = 5.0 +%w(plus cross circle up down dot upfilled downfilled).each{|sym| + s.dataconfig('series1', :symbol=>sym) + s.dataconfig('series2', :symbol=>sym) + s.plot('series1', x, 50.0) + s.plot('series2', x, 20) + x += 10 +} + +############################## + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb new file mode 100644 index 0000000..2b5c764 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb @@ -0,0 +1,83 @@ +#!/usr/bin/ruby + +require 'tk' +require 'tkextlib/tcllib/plotchart' + +############################### +# Set up a strip chart +############################### + +Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0], + [0.0, 100.0, 20.0], + :background=>'white', + :width=>400, :height=>200){|chart| + title "Aha!" + pack(:fill=>:both, :side=>:top) + + series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart) + series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart) + + xd = 15.0 + yd = 30.0 + + TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object + xold, yold = obj.return_value + xnew = xold + xd + ynew = yold + (rand() - 0.5) * yd + ynew2 = yold + (rand() - 0.5) * 2.0 * yd + + series1.plot(xnew, ynew) + series2.plot(xnew, ynew2) + + obj.stop if xnew >= 200 + + [xnew, ynew] # return_value + }).start(100, proc{ [0.0, 50.0] }) # init return_value +} + +############################### +# Set up an isometric plot +############################### +Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes, + :background=>'white', + :width=>400, :height=>200){|chart| + pack(:fill=>:both, :side=>:top) + set_zoom_pan + + chart.plot('rectangle', [10.0, 10.0, 50.0, 50.0], 'green') + chart.plot('filled-rectangle', [20.0, 20.0, 40.0, 40.0], 'red') + chart.plot('filled-circle', [70.0, 70.0, 40.0], 'yellow') + chart.plot('circle', [70.0, 70.0, 42.0]) +} + +############################### +# Check the symbols +############################### +TkToplevel.new(:title=>'h'){|h| + Tk::Tcllib::Plotchart::XYPlot.new(h, [0.0, 100.0, 10.0], + [0.0, 100.0, 20.0], + :bg=>'white', + :width=>400, :height=>200){|chart| + pack(:fill=>:both) + + yconfig(:format=>"%12.2e") + + series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'red', + :type=>:symbol) + series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'green', + :type=>:both) + + x = 5.0 + %w(plus cross circle up down dot upfilled downfilled).each{|sym| + series1.dataconfig(:symbol=>sym) + series2.dataconfig(:symbol=>sym) + series1.plot(x, 50.0) + series2.plot(x, 20) + x += 10 + } + } +} + +############################## + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/xyplot.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/xyplot.rb new file mode 100644 index 0000000..8f8c3eb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tcllib/xyplot.rb @@ -0,0 +1,17 @@ +#!/usr/bin/ruby + +require 'tk' +require 'tkextlib/tcllib/plotchart' + +TkCanvas.new(:background=>'white', :width=>400, :height=>200){|c| + pack(:fill=>:both) + Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0], + [0.0, 100.0, 20.0]){ + [ [0.0, 32.0], [10.0, 50.0], [25.0, 60.0], [78.0, 11.0] ].each{|x, y| + plot('series1', x, y) + } + title("Data series") + } +} + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt new file mode 100644 index 0000000..2326ef2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt @@ -0,0 +1,30 @@ + + ###################################################################### + ### The following text is the original 'license.terms' of tile ### + ### extension. ### + ###################################################################### + + +LICENSE ("MIT-style") + +This software is Copyright (C) 2003 Joe English and other parties. + +The following terms apply to all files associated with this software +unless explicitly disclaimed in individual files. + +The author(s) hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS for a PARTICULAR PURPOSE. IN NO EVENT +shall the AUTHORS of THIS SOFTWARE be LIABLE to ANY PARTY for +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, or CONSEQUENTIAL DAMAGES +arising out of the USE of THIS SOFTWARE and its DOCUMENTATION. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/demo.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/demo.rb new file mode 100644 index 0000000..633a072 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/demo.rb @@ -0,0 +1,983 @@ +#!/usr/bin/env ruby +# +# Demo for 'tile' package. +# +require 'tk' + +demodir = File.dirname($0) +themesdir = File.join(demodir, 'themes') +Tk::AUTO_PATH.lappend('.', demodir, themesdir) + +Dir.foreach(themesdir){|name| + next if name == '.' || name == '..' + dir = File.join(themesdir, name) + Tk::AUTO_PATH.lappend(dir) if File.directory?(dir) +} + +require 'tkextlib/tile' + +def version?(ver) + TkPackage.vcompare(Tk::Tile.package_version, ver) >= 0 +end + +# define Tcl/Tk procedures for compatibility +Tk::Tile.__define_LoadImages_proc_for_compatibility__! +Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! + +unless Tk::Tile::Style.theme_names.include?('step') + Tk::Tile::Style.theme_create('step') +end + +Tk.load_tclscript(File.join(demodir, 'toolbutton.tcl')) +Tk.load_tclscript(File.join(demodir, 'repeater.tcl')) + +# This forces an update of the available packages list. It's required +# for package names to find the themes in demos/themes/*.tcl +## Tk.tk_call(TkPackage.unknown_proc, 'Tcl', TkPackage.provide('Tcl')) +## --> This doesn't work. +## Because, unknown_proc may be "command + some arguments". +Tk.ip_eval("#{TkPackage.unknown_proc} Tcl #{TkPackage.provide('Tcl')}") + +TkRoot.new{ + title 'Tile demo' + iconname 'Tile demo' +} + +# The descriptive names of the builtin themes. +$THEMELIST = [ + ['default', 'Default'], + ['classic', 'Classic'], + ['alt', 'Revitalized'], + ['winnative', 'Windows native'], + ['xpnative', 'XP Native'], + ['aqua', 'Aqua'], +] + +$V = TkVariable.new_hash(:THEME => 'default', + :COMPOUND => 'top', + :CONSOLE => false, + :MENURADIO1 => 'One', + :MENUCHECK1 => true, + :PBMODE => 'determinate', + :SELECTED => true, + :CHOICE => 2) + +# Add in any available loadable themes. +TkPackage.names.find_all{|n| n =~ /^(tile|ttk)::theme::/}.each{|pkg| + name = pkg.split('::')[-1] + unless $THEMELIST.assoc(name) + $THEMELIST << [name, Tk.tk_call('string', 'totitle', name)] + end +} + +# Add theme definition written by ruby +$RUBY_THEMELIST = [] +begin + load(File.join(demodir, 'themes', 'kroc.rb'), true) +rescue => e +raise e + $RUBY_THEMELIST << ['kroc-rb', 'Kroc (by Ruby)', false] +else + $RUBY_THEMELIST << ['kroc-rb', 'Kroc (by Ruby)', true] +end + +def makeThemeControl(parent) + c = Tk::Tile::Labelframe.new(parent, :text=>'Theme') + $THEMELIST.each{|theme, name| + b = Tk::Tile::Radiobutton.new(c, :text=>name, :value=>theme, + :variable=>$V.ref(:THEME), + :command=>proc{setTheme(theme)}) + b.grid(:sticky=>:ew) + unless (TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/}) + b.ttk_state(:disabled) + end + } + $RUBY_THEMELIST.each{|theme, name, available| + b = Tk::Tile::Radiobutton.new(c, :text=>name, :value=>theme, + :variable=>$V.ref(:THEME), + :command=>proc{setTheme(theme)}) + b.grid(:sticky=>:ew) + b.ttk_state(:disabled) unless available + } + c +end + +def makeThemeMenu(parent) + m = TkMenu.new(parent) + $THEMELIST.each{|theme, name| + m.add(:radiobutton, :label=>name, :variable=>$V.ref(:THEME), + :value=>theme, :command=>proc{setTheme(theme)}) + unless (TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/}) + m.entryconfigure(:end, :state=>:disabled) + end + } + $RUBY_THEMELIST.each{|theme, name, available| + m.add(:radiobutton, :label=>name, :variable=>$V.ref(:THEME), + :value=>theme, :command=>proc{setTheme(theme)}) + m.entryconfigure(:end, :state=>:disabled) unless available + } + m +end + +def setTheme(theme) + if (pkg = TkPackage.names.find{|n| n =~ /(tile|ttk)::theme::#{theme}/}) + unless Tk::Tile::Style.theme_names.find{|n| n == theme} + TkPackage.require(pkg) + end + end + Tk::Tile::Style.theme_use(theme) +end + +# +# Load icons... +# +$BUTTONS = ['open', 'new', 'save'] +$CHECKBOXES = ['bold', 'italic'] +$ICON = {} + +def loadIcons(file) + Tk.load_tclscript(file) + img_data = TkVarAccess.new('ImgData') + img_data.keys.each{|icon| + $ICON[icon] = TkPhotoImage.new(:data=>img_data[icon]) + } +end + +loadIcons(File.join(demodir, 'iconlib.tcl')) + +# +# Utilities: +# +def foreachWidget(wins, cmd) + wins.each{|w| + cmd.call(w) + foreachWidget(w.winfo_children, cmd) + } +end + +# sbstub +# Used as the :command option for a scrollbar, +# updates the scrollbar's position. +# +def sbstub(sb, cmd, num, units = 'units') + num = TkComm.number(num) + case cmd.to_s + when 'moveto' + sb.set(num, num+0.5) + + when 'scroll' + if units.to_s == 'pages' + delta = 0.2 + else + delta = 0.05 + end + current = sb.get + sb.set(current[0] + delta * num, current[1] + delta * num) + end +end + +# ... for debugging: +TkBindTag::ALL.bind('ButtonPress-3', proc{|w| $W = w}, '%W') +TkBindTag::ALL.bind('Control-ButtonPress-3', proc{|w| w.set_focus}, '%W') + +def showHelp() + Tk.messageBox(:message=>'No help yet...') +end + +# +# See toolbutton.tcl. +TkOption.add('*Toolbar.relief', :groove) +TkOption.add('*Toolbar.borderWidth', 2) + +TkOption.add('*Toolbar.Button.Pad', 2) + +$ROOT = Tk.root +$BASE = $ROOT +Tk.destroy(*($ROOT.winfo_children)) + +$TOOLBARS = [] + +# +# Toolbar button standard vs. tile comparison: +# +def makeToolbars + # + # Tile toolbar: + # + tb = Tk::Tile::Frame.new($BASE, :class=>'Toolbar') + $TOOLBARS << tb + i = 0 + $BUTTONS.each{|icon| + i += 1 + Tk::Tile::Button.new(tb, :text=>icon, :image=>$ICON[icon], + :compound=>$V[:COMPOUND], + :style=>:Toolbutton).grid(:row=>0, :column=>i, + :sticky=>:news) + } + $CHECKBOXES.each{|icon| + i += 1 + Tk::Tile::Checkbutton.new(tb, :text=>icon, :image=>$ICON[icon], + :variable=>$V.ref(icon), + :compound=>$V[:COMPOUND], + :style=>:Toolbutton).grid(:row=>0, :column=>i, + :sticky=>:news) + } + + mb = Tk::Tile::Menubutton.new(tb, :text=>'toolbar', :image=>$ICON['file'], + :compound=>$V[:COMPOUND]) + mb.configure(:menu=>makeCompoundMenu(mb)) + i += 1 + mb.grid(:row=>0, :column=>i, :sticky=>:news) + + i += 1 + tb.grid_columnconfigure(i, :weight=>1) + + # + # Standard toolbar: + # + tb = TkFrame.new($BASE, :class=>'Toolbar') + $TOOLBARS << tb + i = 0 + $BUTTONS.each{|icon| + i += 1 + TkButton.new(tb, :text=>icon, :image=>$ICON[icon], + :compound=>$V[:COMPOUND], :relief=>:flat, + :overrelief=>:raised).grid(:row=>0, :column=>i, + :sticky=>:news) + } + $CHECKBOXES.each{|icon| + i += 1 + TkCheckbutton.new(tb, :text=>icon, :image=>$ICON[icon], + :variable=>$V.ref(icon), :compound=>$V[:COMPOUND], + :indicatoron=>false, :selectcolor=>'', :relief=>:flat, + :overrelief=>:raised).grid(:row=>0, :column=>i, + :sticky=>:news) + } + + mb = TkMenubutton.new(tb, :text=>'toolbar', :image=>$ICON['file'], + :compound=>$V[:COMPOUND]) + mb.configure(:menu=>makeCompoundMenu(mb)) + i += 1 + mb.grid(:row=>0, :column=>i, :sticky=>:news) + + i += 1 + tb.grid_columnconfigure(i, :weight=>1) +end + +# +# Toolbar :compound control: +# +def makeCompoundMenu(mb) + menu = TkMenu.new(mb) + %w(text image none top bottom left right center).each{|str| + menu.add(:radiobutton, :label=>Tk.tk_call('string', 'totitle', str), + :variable=>$V.ref(:COMPOUND), :value=>str, + :command=>proc{ changeToolbars() }) + } + menu +end + +makeToolbars() + +## CONTROLS +control = Tk::Tile::Frame.new($BASE) + +# +# Overall theme control: +# +makeThemeControl(control).grid(:sticky=>:news, :padx=>6, :ipadx=>6) +control.grid_rowconfigure(99, :weight=>1) + +def changeToolbars + foreachWidget($TOOLBARS, + proc{|w| + begin + w.compound($V[:COMPOUND]) + rescue + end + }) +end + +def scrolledWidget(parent, klass, themed, *args) + if themed + f = Tk::Tile::Frame.new(parent) + t = klass.new(f, *args) + vs = Tk::Tile::Scrollbar.new(f) + hs = Tk::Tile::Scrollbar.new(f) + else + f = TkFrame.new(parent) + t = klass.new(f, *args) + vs = TkScrollbar.new(f) + hs = TkScrollbar.new(f) + end + t.yscrollbar(vs) + t.xscrollbar(hs) + + TkGrid.configure(t, vs, :sticky=>:news) + TkGrid.configure(hs, 'x', :sticky=>:news) + TkGrid.rowconfigure(f, 0, :weight=>1) + TkGrid.columnconfigure(f, 0, :weight=>1) + + [f, t] +end + +# +# Notebook demonstration: +# +def makeNotebook + nb = Tk::Tile::Notebook.new($BASE, :padding=>6) + nb.enable_traversal + client = Tk::Tile::Frame.new(nb) + nb.add(client, :text=>'Demo', :underline=>0) + nb.select(client) + + scales = Tk::Tile::Frame.new(nb) + nb.add(scales, :text=>'Scales') + combo = Tk::Tile::Frame.new(nb) + nb.add(combo, :text=>'Combobox', :underline=>7) + tree = Tk::Tile::Frame.new(nb) + nb.add(tree, :text=>'Tree') + others = Tk::Tile::Frame.new(nb) + nb.add(others, :text=>'Others', :underline=>4) + + [nb, client, scales, combo, tree, others] +end + +nb, client, scales, combo, tree, others = makeNotebook() + +# +# Side-by side check, radio, and menu button comparison: +# +def fillMenu(menu) + %w(above below left right flush).each{|dir| + menu.add(:command, :label=>Tk.tk_call('string', 'totitle', dir), + :command=>proc{ menu.winfo_parent.direction(dir) }) + } + menu.add(:cascade, :label=>'Submenu', :menu=>(submenu = TkMenu.new(menu))) + submenu.add(:command, :label=>'Subcommand 1') + submenu.add(:command, :label=>'Subcommand 2') + submenu.add(:command, :label=>'Subcommand 3') + + menu.add(:separator) + menu.add(:command, :label=>'Quit', :command=>proc{Tk.root.destroy}) +end + +l = Tk::Tile::Labelframe.new(client, :text=>'Themed', :padding=>6) +r = TkLabelframe.new(client, :text=>'Standard', :padx=>6, :pady=>6) + +## Styled frame +cb = Tk::Tile::Checkbutton.new(l, :text=>'Checkbutton', + :variable=>$V.ref(:SELECTED), :underline=>2) +rb1 = Tk::Tile::Radiobutton.new(l, :text=>'One', :variable=>$V.ref(:CHOICE), + :value=>1, :underline=>0) +rb2 = Tk::Tile::Radiobutton.new(l, :text=>'Two', :variable=>$V.ref(:CHOICE), + :value=>2) +rb3 = Tk::Tile::Radiobutton.new(l, :text=>'Three', + :variable=>$V.ref(:CHOICE), + :value=>3, :underline=>0) +btn = Tk::Tile::Button.new(l, :text=>'Button', :underline=>0) + +mb = Tk::Tile::Menubutton.new(l, :text=>'Menubutton', :underline=>2) +m = TkMenu.new(mb) +mb.menu(m) +fillMenu(m) + +$entryText = TkVariable.new('Entry widget') +e = Tk::Tile::Entry.new(l, :textvariable=>$entryText) +e.selection_range(6, :end) + +ltext_f, ltext = scrolledWidget(l, TkText, true, + :width=>12, :height=>5, :wrap=>:none) +# NOTE TO MAINTAINERS: +# The checkbuttons are -sticky ew / -expand x on purpose: +# it demonstrates one of the differences between TCheckbuttons +# and standard checkbuttons. +# +Tk.grid(cb, :sticky=>:ew) +Tk.grid(rb1, :sticky=>:ew) +Tk.grid(rb2, :sticky=>:ew) +Tk.grid(rb3, :sticky=>:ew) +Tk.grid(btn, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(mb, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(e, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(ltext_f, :sticky=>:news) + +TkGrid.columnconfigure(l, 0, :weight=>1) +TkGrid.rowconfigure(l, 7, :weight=>1) # text widget (grid is a PITA) + +## Orig frame +cb = TkCheckbutton.new(r, :text=>'Checkbutton', :variable=>$V.ref(:SELECTED)) +rb1 = TkRadiobutton.new(r, :text=>'One', + :variable=>$V.ref(:CHOICE), :value=>1) +rb2 = TkRadiobutton.new(r, :text=>'Two', :variable=>$V.ref(:CHOICE), + :value=>2, :underline=>1) +rb3 = TkRadiobutton.new(r, :text=>'Three', + :variable=>$V.ref(:CHOICE), :value=>3) +btn = TkButton.new(r, :text=>'Button') + +mb = TkMenubutton.new(r, :text=>'Menubutton', :underline=>3, :takefocus=>true) +m = TkMenu.new(mb) +mb.menu(m) +$V[:rmbIndicatoron] = mb.indicatoron +m.add(:checkbutton, :label=>'Indicator?', #' + :variable=>$V.ref(:rmbIndicatoron), + :command=>proc{mb.indicatoron($V[:rmbIndicatoron])}) +m.add(:separator) +fillMenu(m) + +e = TkEntry.new(r, :textvariable=>$entryText) + +rtext_f, rtext = scrolledWidget(r, TkText, false, + :width=>12, :height=>5, :wrap=>:none) + +Tk.grid(cb, :sticky=>:ew) +Tk.grid(rb1, :sticky=>:ew) +Tk.grid(rb2, :sticky=>:ew) +Tk.grid(rb3, :sticky=>:ew) +Tk.grid(btn, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(mb, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(e, :sticky=>:ew, :padx=>2, :pady=>2) +Tk.grid(rtext_f, :sticky=>:news) + +TkGrid.columnconfigure(l, 0, :weight=>1) +TkGrid.rowconfigure(l, 7, :weight=>1) # text widget (grid is a PITA) + +Tk.grid(l, r, :sticky=>:news, :padx=>6, :pady=>6) +TkGrid.rowconfigure(client, 0, :weight=>1) +TkGrid.columnconfigure(client, [0, 1], :weight=>1) + +# +# Add some text to the text boxes: +# +msgs = [ +"The cat crept into the crypt, crapped and crept out again", +"Peter Piper picked a peck of pickled peppers", +"How much wood would a woodchuck chuck if a woodchuck could chuck wood", +"He thrusts his fists against the posts and still insists he sees the ghosts", +"Who put the bomb in the bom-b-bom-b-bom,", +"Is this your sister's sixth zither, sir?", +"Who put the ram in the ramalamadingdong?", +"I am not the pheasant plucker, I'm the pheasant plucker's mate." +] + +nmsgs = msgs.size +(0...50).each{|n| + msg = msgs[n % nmsgs] + ltext.insert(:end, "#{n}: #{msg}\n") + rtext.insert(:end, "#{n}: #{msg}\n") +} +# +# Scales and sliders pane: +# +l = Tk::Tile::Labelframe.new(scales, :text=>'Themed', :padding=>6) +r = TkLabelframe.new(scales, :text=>'Standard', :padx=>6, :pady=>6) + +if version?('0.6') + + # thremed frame + scale = Tk::Tile::Scale.new(l, :orient=>:horizontal, :from=>0, :to=>100, + :variable=>$V.ref(:SCALE)) + vscale = Tk::Tile::Scale.new(l, :orient=>:vertical, :from=>0, :to=>100, + :variable=>$V.ref(:VSCALE)) + progress = Tk::Tile::Progressbar.new(l, :orient=>:horizontal, :maximum=>100) + vprogress = Tk::Tile::Progressbar.new(l, :orient=>:vertical, :maximum=>100) + + if true + def progress.inverted(w, value) + if w.mode == 'indeterminate' + w.value(value) + else + w.value(w.maximum - value) + end + end + scale.command {|value| progress.value(value)} + vscale.command {|value| progress.inverted(vprogress, value) } + else + # This would also work, but the Tk scale widgets + # in the right hand pane cause some interference when + # in autoincrement/indeterminate mode. + # + progress.variable $V.ref(:SCALE) + vprogress.variable $V.ref(:VSCALE) + end + + scale.set(50) + vscale.set(50) + + lmode = Tk::Tile::Label.new(l, :text=>'Progress bar mode') + pbmode0 = Tk::Tile::Radiobutton.new(l, :variable=>$V.ref(:PBMODE), + :text=>'determinate', :value=>'determinate', + :command=>proc{pbMode(progress, vprogress)}) + pbmode1 = Tk::Tile::Radiobutton.new(l, :variable=>$V.ref(:PBMODE), + :text=>'indeterminate', :value=>'indeterminate', + :command=>proc{pbMode(progress, vprogress)}) + def pbMode(progress, vprogress) + if vprogress.mode != $V[:PBMODE] + vprogress.value(vprogress.maximum - vprogress.value) + end + + progress.mode $V[:PBMODE] + vprogress.mode $V[:PBMODE] + end + + start = Tk::Tile::Button.new(l, :text=>"Start", + :command=>proc{pbStart(progress, vprogress)}) + def pbStart(progress, vprogress) + # $V[:PBMODE] = 'indeterminate' + pbMode(progress, vprogress) + progress.start 10 + vprogress.start + end + + stop = Tk::Tile::Button.new(l, :text=>'Stop', + :command=>proc{pbStop(progress, vprogress)}) + def pbStop(progress, vprogress) + progress.stop + vprogress.stop + end + + Tk.grid(scale, :columnspan=>2, :sticky=>'ew') + Tk.grid(progress, :columnspan=>2, :sticky=>'ew') + Tk.grid(vscale, vprogress, :sticky=>'nws') + + Tk.grid(lmode, :sticky=>'we', :columnspan=>2) + Tk.grid(pbmode0, :sticky=>'we', :columnspan=>2) + Tk.grid(pbmode1, :sticky=>'we', :columnspan=>2) + Tk.grid(start, :sticky=>'we', :columnspan=>2) + Tk.grid(stop, :sticky=>'we', :columnspan=>2) + + l.grid_columnconfigure(0, :weight=>1) + l.grid_columnconfigure(1, :weight=>1) + l.grid_rowconfigure(99, :weight=>1) + + # standard frame + TkScale.new(r, :orient=>:horizontal, :from=>0, :to=>100, + :variable=>$V.ref(:SCALE)).grid(:sticky=>'news') + TkScale.new(r, :orient=>:vertical, :from=>0, :to=>100, + :variable=>$V.ref(:VSCALE)).grid(:sticky=>'nws') + + r.grid_columnconfigure(0, :weight=>1) + r.grid_columnconfigure(1, :weight=>1) + r.grid_rowconfigure(99, :weight=>1) + +else # tile 0.5 or earlier + + # themed frame + scale = Tk::Tile::Scale.new(l, :variable=>$V.ref(:SCALE), + :orient=>:horizontal, :from=>0, :to=>100) + vscale = Tk::Tile::Scale.new(l, :variable=>$V.ref(:VSCALE), + :orient=>:vertical, :from=>-25, :to=>25) + + progress = Tk::Tile::Progress.new(l, + :orient=>:horizontal, :from=>0, :to=>100) + vprogress = Tk::Tile::Progress.new(l, + :orient=>:vertical, :from=>-25, :to=>25) + + if true + scale.command{|value| progress.set(value)} + vscale.command{|value| vprogress.set(value)} + else # this would also work. (via TkVariable#trace) + v1 = scale.variable + v2 = vscale.variable + v1.trace('w', proc{ progress.set(v1.value) }) + v2.trace('w', proc{ vprogress.set(v2.value) }) + end + + Tk.grid(scale, :columnspan=>2, :sticky=>:ew) + Tk.grid(progress, :columnspan=>2, :sticky=>:ew) + Tk.grid(vscale, vprogress, :sticky=>:nws) + TkGrid.columnconfigure(l, 0, :weight=>1) + TkGrid.columnconfigure(l, 1, :weight=>1) + + # standard frame + TkScale.new(r, :variable=>$V.ref(:SCALE), + :orient=>:horizontal, :from=>0, :to=>100).grid(:sticky=>'news') + TkScale.new(r, :variable=>$V.ref(:VSCALE), + :orient=>:vertical, :from=>-25, :to=>25).grid(:sticky=>'nws') + + TkGrid.columnconfigure(r, 0, :weight=>1) + TkGrid.columnconfigure(r, 1, :weight=>1) +end + +# layout frames +Tk.grid(l, r, :sticky=>'nwes', :padx=>6, :pady=>6) +scales.grid_columnconfigure(0, :weight=>1) +scales.grid_columnconfigure(1, :weight=>1) +scales.grid_rowconfigure(0, :weight=>1) + +# +# Command box: +# +cmd = Tk::Tile::Frame.new($BASE) +b_close = Tk::Tile::Button.new(cmd, :text=>'Close', + :underline=>0, :default=>:normal, + :command=>proc{Tk.root.destroy}) +b_help = Tk::Tile::Button.new(cmd, :text=>'Help', :underline=>0, + :default=>:normal, :command=>proc{showHelp()}) +Tk.grid('x', b_close, b_help, :pady=>[6, 4], :padx=>4) +TkGrid.columnconfigure(cmd, 0, :weight=>1) + +# +# Set up accelerators: +# +$ROOT.bind('KeyPress-Escape', proc{Tk.event_generate(b_close, '')}) +$ROOT.bind('', proc{Tk.event_generate(b_help, '')}) +Tk::Tile::KeyNav.enableMnemonics($ROOT) +Tk::Tile::KeyNav.defaultButton(b_help) + +Tk.grid($TOOLBARS[0], '-', :sticky=>:ew) +Tk.grid($TOOLBARS[1], '-', :sticky=>:ew) +Tk.grid(control, nb, :sticky=>:news) +Tk.grid(cmd, '-', :sticky=>:ew) +TkGrid.columnconfigure($ROOT, 1, :weight=>1) +TkGrid.rowconfigure($ROOT, 2, :weight=>1) + +# +# Add a menu +# +menu = TkMenu.new($BASE) +$ROOT.menu(menu) +m_file = TkMenu.new(menu, :tearoff=>0) +menu.add(:cascade, :label=>'File', :underline=>0, :menu=>m_file) +m_file.add(:command, :label=>'Open', :underline=>0, + :compound=>:left, :image=>$ICON['open']) +m_file.add(:command, :label=>'Save', :underline=>0, + :compound=>:left, :image=>$ICON['save']) +m_file.add(:separator) +m_f_test = TkMenu.new(menu, :tearoff=>0) +m_file.add(:cascade, :label=>'Test submenu', :underline=>0, :menu=>m_f_test) +m_file.add(:checkbutton, :label=>'Text check', :underline=>5, + :variable=>$V.ref(:MENUCHECK1)) +m_file.insert(:end, :separator) + +if Tk.windowingsystem != 'x11' + TkConsole.create + m_file.insert(:end, :checkbutton, :label=>'Console', :underline=>5, + :variable=>$V.ref(:CONSOLE), :command=>proc{toggle_console()}) + def toggle_console + if TkComm.bool($V[:CONSOLE]) + TkConsole.show + else + TkConsole.hide + end + end +end + +m_file.add(:command, :label=>'Exit', :underline=>1, + :command=>proc{Tk.event_generate(b_close, '')}) + +%w(One Two Three Four).each{|lbl| + m_f_test.add(:radiobutton, :label=>lbl, :variable=>$V.ref(:MENURADIO1)) +} + +# Add Theme menu. +# +menu.add(:cascade, :label=>'Theme', :underline=>3, + :menu=>makeThemeMenu(menu)) + +setTheme($V[:THEME]) + +# +# Combobox demo pane: +# +values = %w(list abc def ghi jkl mno pqr stu vwx yz) +2.times {|i| + cb = Tk::Tile::Combobox.new( + combo, :values=>values, :textvariable=>$V.ref(:COMBO)) + cb.pack(:side=>:top, :padx=>2, :pady=>2, :expand=>false, :fill=>:x) + if i == 1 + cb.ttk_state :readonly + begin + cb.current = 3 # ignore if unsupported (tile0.4) + rescue + end + end +} + +# +# Treeview widget demo pane: +# +if version?('0.5') + + treeview = nil # avoid 'undefined' error + scrollbar = Tk::Tile::Scrollbar.new(tree, + :command=>proc{|*args| treeview.yview(*args)}) + treeview = Tk::Tile::Treeview.new(tree, :columns=>%w(Class), :padding=>4, + :yscrollcommand=>proc{|*args| scrollbar.set(*args)}) + + Tk.grid(treeview, scrollbar, :sticky=>'news') + tree.grid_columnconfigure(0, :weight=>1) + tree.grid_rowconfigure(0, :weight=>1) + tree.grid_propagate(0) + + # Add initial tree node: + # Later nodes will be added in <> binding. + treeview.insert('', 0, :id=>'.', :text=>'Main Window', :open=>false, + :values=>[TkWinfo.classname('.')]) + treeview.headingconfigure('#0', :text=>'Widget') + treeview.headingconfigure('Class', :text=>'Class') + treeview.bind('', proc{fillTree(treeview)}) + + def fillTree(treeview) + id = treeview.focus_item + unless TkWinfo.exist?(id) + treeview.delete(id) + end + # Replace tree item children with current list of child windows. + treeview.delete(treeview.children(id)) + for child in TkWinfo.children(id) + treeview.insert(id, :end, :id=>child, :text=>TkWinfo.appname(child), + :open=>false, :values=>[TkWinfo.classname(child)]) + unless TkWinfo.children(child).empty? + # insert dummy child to show [+] indicator + treeview.insert(child, :end) + end + end + end + +else + Tk::Tile::Label.new(tree, + :text=>'Treeview is supported on tile 0.5 or later...').pack +end + +# +# Other demos: +# +$Timers = {:StateMonitor=>nil, :FocusMonitor=>nil} + +begin + msg = Tk::Tile::Label.new(others, :justify=>:left, :wraplength=>300) +rescue + msg = TkMessage.new(others, :aspect=>200) +end + +$Desc = {} + +showDescription = TkBindTag.new +showDescription.bind('Enter', proc{|w| msg.text($Desc[w.path])}, '%W') +showDescription.bind('Leave', proc{|w| msg.text('')}, '%W') + +[ + [ :trackStates, "Widget states...", + "Display/modify widget state bits" ], + + [ :scrollbarResizeDemo, "Scrollbar resize behavior...", + "Shows how Tile and standard scrollbars differ when they're sized too large" ], + + [ :trackFocus, "Track keyboard focus..." , + "Display the name of the widget that currently has focus" ], + + [ :repeatDemo, "Repeating buttons...", + "Demonstrates custom classes (see demos/repeater.tcl)" ] + +].each{|demo_cmd, label, description| + b = Tk::Tile::Button.new(others, :text=>label, + :command=>proc{ self.__send__(demo_cmd) }) + $Desc[b.path] = description + b.bindtags <<= showDescription + + b.pack(:side=>:top, :expand=>false, :fill=>:x, :padx=>6, :pady=>6) +} + +msg.pack(:side=>:bottom, :expand=>true, :fill=>:both) + + +# +# Scrollbar resize demo: +# +$scrollbars = nil + +def scrollbarResizeDemo + if $scrollbars + begin + $scrollbars.destroy + rescue + end + end + $scrollbars = TkToplevel.new(:title=>'Scrollbars', :geometry=>'200x200') + f = TkFrame.new($scrollbars, :height=>200) + tsb = Tk::Tile::Scrollbar.new(f, :command=>proc{|*args| sbstub(tsb, *args)}) + sb = TkScrollbar.new(f, :command=>proc{|*args| sbstub(sb, *args)}) + Tk.grid(tsb, sb, :sticky=>:news) + + sb.set(0, 0.5) # prevent backwards-compatibility mode for old SB + + f.grid_columnconfigure(0, :weight=>1) + f.grid_columnconfigure(1, :weight=>1) + f.grid_rowconfigure(0, :weight=>1) + + f.pack(:expand=>true, :fill=>:both) +end + +# +# Track focus demo: +# +$FocusInf = TkVariable.new_hash +$focus = nil + +def trackFocus + if $focus + begin + $focus.destroy + rescue + end + end + $focus = TkToplevel.new(:title=>'Keyboard focus') + i = 0 + [ + ["Focus widget:", :Widget], + ["Class:", :WidgetClass], + ["Next:", :WidgetNext], + ["Grab:", :Grab], + ["Status:", :GrabStatus] + ].each{|label, var_index| + Tk.grid(Tk::Tile::Label.new($focus, :text=>label, :anchor=>:e), + Tk::Tile::Label.new($focus, + :textvariable=>$FocusInf.ref(var_index), + :width=>40, :anchor=>:w, :relief=>:groove), + :sticky=>:ew) + i += 1 + } + $focus.grid_columnconfigure(1, :weight=>1) + $focus.grid_rowconfigure(i, :weight=>1) + + $focus.bind('Destroy', proc{Tk.after_cancel($Timers[:FocusMonitor])}) + focusMonitor +end + +def focusMonitor + $FocusInf[:Widget] = focus_win = Tk.focus + if focus_win + $FocusInf[:WidgetClass] = focus_win.winfo_classname + $FocusInf[:WidgetNext] = Tk.focus_next(focus_win) + else + $FocusInf[:WidgetClass] = $FocusInf[:WidgetNext] = '' + end + + $FocusInf[:Grab] = grab_wins = Tk.current_grabs + unless grab_wins.empty? + $FocusInf[:GrabStatus] = grab_wins[0].grab_status + else + $FocusInf[:GrabStatus] = '' + end + + $Timers[:FocusMonitor] = Tk.after(200, proc{ focusMonitor() }) +end + +# +# Widget state demo: +# +$Widget = TkVariable.new + +TkBindTag::ALL.bind('Control-Shift-ButtonPress-1', + proc{|w| + $Widget.value = w + updateStates() + Tk.callback_break + }, '%W') +$states_list = %w(active disabled focus pressed selected + background indeterminate invalid default) +$states_btns = {} +$states = nil + +$State = TkVariable.new_hash + +def trackStates + if $states + begin + $state.destroy + rescue + end + end + $states = TkToplevel.new(:title=>'Widget states') + + l_inf = Tk::Tile::Label.new($states, :text=>"Press Control-Shift-Button-1 on any widget") + + l_lw = Tk::Tile::Label.new($states, :text=>'Widget:', + :anchor=>:e, :relief=>:groove) + l_w = Tk::Tile::Label.new($states, :textvariable=>$Widget, + :anchor=>:w, :relief=>:groove) + + Tk.grid(l_inf, '-', :sticky=>:ew, :padx=>6, :pady=>6) + Tk.grid(l_lw, l_w, :sticky=>:ew) + + $states_list.each{|st| + cb = Tk::Tile::Checkbutton.new($states, :text=>st, + :variable=>$State.ref(st), + :command=>proc{ changeState(st) }) + $states_btns[st] = cb + Tk.grid('x', cb, :sticky=>:nsew) + } + + $states.grid_columnconfigure(1, :weight=>1) + + f_cmd = Tk::Tile::Frame.new($states) + Tk.grid('x', f_cmd, :sticky=>:nse) + + b_close = Tk::Tile::Button.new(f_cmd, :text=>'Close', + :command=>proc{ $states.destroy }) + Tk.grid('x', b_close, :padx=>4, :pady=>[6,4]) + f_cmd.grid_columnconfigure(0, :weight=>1) + + $states.bind('KeyPress-Escape', proc{Tk.event_generate(b_close, '')}) + + $states.bind('Destroy', proc{Tk.after_cancel($Timers[:StateMonitor])}) + stateMonitor() +end + +def stateMonitor + updateStates() if $Widget.value != '' + $Timers[:StateMonitor] = Tk.after(200, proc{ stateMonitor() }) +end + +def updateStates + $states_list.each{|st| + begin + $State[st] = $Widget.window.ttk_instate(st) + rescue + $states_btns[st].ttk_state('disabled') + else + $states_btns[st].ttk_state('!disabled') + end + } +end + +def changeState(st) + if $Widget.value != '' + if $State.bool_element(st) + $Widget.window.ttk_state(st) + else + $Widget.window.ttk_state("!#{st}") + end + end +end + +# +# Repeating buttons demo: +# +def repeatDemo + if defined?($repeatDemo) && $repeatDemo.exist? + $repeatDemo.deiconify; return + end + $repeatDemo = TkToplevel.new(:title=>'Repeating button') + + f = Tk::Tile::Frame.new($repeatDemo) + b = Tk::Tile::Button.new(f, :class=>'Repeater', :text=>'Press and hold') + if version?('0.6') + p = Tk::Tile::Progressbar.new(f, :orient=>:horizontal, :maximum=>10) + else # progressbar is not supported + p = Tk::Tile::Progress.new(f, :orient=>:horizontal, :from=>0, :to=>10) + def p.step + i = self.get + 1 + i = self.from if i > self.to + self.set(i) + end + end + b.command {p.step} + + b.pack(:side=>:left, :expand=>false, :fill=>:none, :padx=>6, :pady=>6) + p.pack(:side=>:right, :expand=>true, :fill=>:x, :padx=>6, :pady=>6) + f.pack(:expand=>true, :fill=>:both) +end + +Tk.mainloop diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/iconlib.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/iconlib.tcl new file mode 100644 index 0000000..9a93ece --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/iconlib.tcl @@ -0,0 +1,110 @@ +array set ImgData { +bold {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI6hI+py60U3wj+ +RYQFJYRvEWFBCeFbRFhQQvhG8YPgX0RYUEL4FhEWlBC+RYQFJYQPFN8IPqYut/8hBQA7} +copy {R0lGODlhEAAQAJEAANnZ2QAAAP///wAAhCH5BAEAAAAALAAAAAAQABAAAAJUhI8JFJ/gY4iI +UEL4FyIiFIXgW0iEUDgfACBI9pzMAAGRiIghWSMDECR7JEKGtkFIRFBG+TIQKDQxtgzcDcmX +IfgwQrFlCD4MyZch+EDzj+Bj6mYBADs=} +cut {R0lGODlhEAAQAJEAANnZ2QAAAAAAhP///yH5BAEAAAAALAAAAAAQABAAAAJFhI+pcUHwEeIi +E0gACIKPEAFBIXy0gMg8EhM+YmQiKSL4eAIiJMI/EQEhQGYGYiQIQAg+iAkIATIzECMBIgT/ +RBARERlSADs=} +dragfile {R0lGODlhGAAYAKIAANnZ2TMzM////wAAAJmZmf///////////yH5BAEAAAAALAAAAAAYABgA +AAPACBi63IqgC4GiyxwogaAbKLrMgSKBoBoousyBogEACIGiyxwoKgGAECI4uiyCExMTOACB +osuNpDoAGCI4uiyCIkREOACBosutSDoAgSI4usyCIjQAGCi63Iw0ACEoOLrMgiI0ABgoutyM +NAAhKDi6zIIiNAAYKLrcjDQAISg4usyCIjQAGCi63Iw0AIGiiqPLIyhCA4CBosvNSAMQKKo4 +ujyCIjQAGCi63Iw0AIGiy81IAxCBpMu9GAMAgKPL3QgJADs=} +dragicon {R0lGODlhGAAYALMAANnZ2TMzM/////8zM8zMzGYAAAAAAJmZmQCZMwAzZgCZzGZmZv////// +/////////yH5BAEAAAAALAAAAAAYABgAAAT/EMAgJ60SAjlBgEJOSoMIEMgZoJCT0iADBFIG +KOSkNMwAAABhwiHnIEKIIIQQAQIZhBBwyDmKEMIEE0yABoAghIBDzlGEENDIaQAIQgg45BwF +CinPOccAECYcUiKEEBFCiHPgMQAEIcQYYyABBUGIQCHlMQCEScZAAhKEEApCECGOARAEIQQp +BRGIpAyCJCGOASBAISdEcqJAVBLiGABggELOAJGUKyiVhDgGABigkJMEhNAKSqkEhTgGgCCl +FCQEGIJSSiUhjgEgQCEnJVBJmYQ4BoAAhZyTQCVnEuIYAAIUckoCk5xSiGMACFDISSs9BoBg +rRXQMQAEKOSklR4DEUAI8MhJ6wwGAACgkZNWCkAEADs=} +error {R0lGODlhIAAgAKIAANnZ2YQAAP8AAISEhP///////////////yH5BAEAAAAALAAAAAAgACAA +AAP/CLoMGLqKoMvtGIqiqxEYCLrcioGiyxwIusyBgaLLLRiBoMsQKLrcjYGgu4Giy+2CAkFX +A0WX2wXFIOgGii7trkCEohsDCACBoktEKLpKhISiGwAIECiqSKooukiqKKoxgACBooukKiIo +SKooujGDECi6iqQqsopEV2MQAkV3kXQZRXdjEAJFl5F0FUWXY3ACRZcFSRdFlyVwJlB0WZB0 +UXRZAmcCRZeRdBVFl2NwAkV3kXQZRXdjcAJFV5FURVaR6GoMDgSKLpKqiKAgqaLoxgwOBIoq +kiqKLpIqimrM4ECg6BIRiq4SIaHoxgyCBoou7a5AhKIbMzgAAIGiy+2CTWJmBhAAAkWX2wXF +zCDoBooud2PMDIKuRqDocgtGzMwg6O4Eii5z4Kgi6DIMhqLoagQGjiqCLvPgYOgqji6CLrfi +6DIj6HI7jq4i6DIkADs=} +file {R0lGODlhCwANAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAALAA0AAAIyhI9G8Q0AguSH +AMQdxQgxEyEFQfItICQokYgEBMm3gBCKLRIQJN8CQii2SECQfAug+FgAOw==} +folder {R0lGODlhEAANAKIAANnZ2YSEhMbGxv//AP///wAAAP///////yH5BAEAAAAALAAAAAAQAA0A +AANjCIqhiqDLITgyEgi6GoIjIyMYugCBpMsaWBA0giMjIzgyUYBBMjIoIyODEgVBODIygiMj +E1gQJIMyMjIoI1GAQSMjODIyghMFQSgjI4MyMhJYEDSCIyMjODJRgKHLXAiApcucADs=} +hourglass {R0lGODlhIAAgAKIAANnZ2YAAAAAAAP8AAP///8DAwICAgP///yH5BAEAAAAALAAAAAAgACAA +AAPZCLrc/jDKSau9OGcUuqyCoMvNGENVhaMrCLrcjaLLgqDL7WhFVIVVZoKgy+1oRUSFVWaC +oMvtaEVEhVVmgqDL7WhFRIVVZoKgy+1oVVaCJWaCoMvtgKxISrBMEHS5fZEVSRkKgi63NzIq +EwRdbndkVCYIutzeyIqqDAVBl9sXWRFJYZkg6HI7ICsiKqwyEwRdbkcrIhKsMhMEXW5HKyIp +lDITBF1uRysyEiwxEwRdbkcrIyuUEhMEXW5H0WVB0OVujKGqwtEVBF1uRtHlRdDl9odRTlrt +xRmjBAA7} +info {R0lGODlhIAAgAKIAANnZ2YSEhMbGxv///wAA/wAAAP///////yH5BAEAAAAALAAAAAAgACAA +AAP/CLoMGLqKoMvtGCo4uhKBgaDLDRghOLqsghEIuryBgqPLPSiBoMsQOLojhEQkOLpTCLob +OLqKpIujq4WgC4Gju0i6OLpbCKohOLorhEQkOLorhaAQOLrc3qgCIARHl9sbSQUEji4j6RKO +Lk9hQODosiKp4ujyFIbi6LIiqeLo8hSG4uiyIqni6PIUhuLosiKp4ujyFIYKji4PkiqOLkth +BASOLg+SKo4uV2AEhODoMpIqju5KYShA4Ogqku7i6E4FRgAAYOHocvugiohAUC0cXe7GiohA +0IUSHF3uQamICATdrULB0WUVrIqIQNBlCCwVHF2pwsJQRdDlDYyoKsHRPMLQDQRdbsDQqBmc +wlBF0OV2jJqZwggEXW5vVDMVgaDL7Y5qKgJBl9sfVUUg6HL7AxSKoMvtr1AEgi5DAgA7} +italic {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAIrhI+py+1A4hN8 +hIjINBITPlpEZBqJCR8tIjKNxISPFhGZQOITfExdbv9FCgA7} +new {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAJFhI95FN8IvgXJ +jyD4ECQ/JAh+kPyICIIdJP+CYAfJvyDYQfIvCHaQ/AuCHST/gmAHyb8g2EHyLwh2kPwLgk3x +MQg+pu4WADs=} +open {R0lGODlhEAAQAKIAANnZ2QAAAP//AP///4SEAP///////////yH5BAEAAAAALAAAAAAQABAA +AANZCLrczigUQZc1EDQgEHSZAwMgIhB0NQIDQkYwdANBNUZwZGQEJxBUQwZlZGRQAkE1RnAE +Q5dVcCSQdDcAYySQdDcAISSQdDcAASKQdDcAAQBDlwNBl9sfApQAOw==} +openfold {R0lGODlhEAANAKIAANnZ2YSEhP///8bGxv//AAAAAP///////yH5BAEAAAAALAAAAAAQAA0A +AANgCIqhiqDLgaIaCLoagkNDIxi6AIFCQ0M4KKpRgCFDQzg0NIQThaHLSxgVKLochRMVMkhD +Q4M0VBFYEDKEQ0NDOFFRgCE0NEhDQ4MVBRAoNDSEQ0NRWAAYuqyFBQBYurwJADs=} +overstrike {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI3hI+py80Uh+Aj +RFhQCP8iMILgWwRGEHyLwAiCbxEYQfCB4iPBhwiMIPgXYREEHyEiguBj6nI7FQA7} +palette {R0lGODlhEAAQAKIAANnZ2QAAAP//AP////8A/4QAhP8AAAD//yH5BAEAAAAALAAAAAAQABAA +AANtCLrcjqGBoMsRKCMTgaALMSgDAYMSCKoxgAFBITgSAIAQEhUIARCAEgAQOBAwghMQEwga +MoIjIxAIEgCAEBEyKBAgg4GgGxAIYTGCgaALcRgQIIGgCwEYICODgaALITgyEoGguxiqCLrc +/lChBAA7} +passwd {R0lGODlhIAAgAMQAANnZ2QAAAICAgICAAP///7CwsMDAwMjIAPjIAOjo6Pj4AODg4HBwcMj4 +ANjY2JiYANDQ0MjIyPj4yKCgoMiYAMjImDAwAMjIMJiYmJCQkP////////////////////// +/yH5BAEAAAAALAAAAAAgACAAAAX/ICCOIhiIIgiII1maZSCMQnCeJyAIQiAIAiAMwxCcJwkk +EAQRCIUwGMSBDEEAAuJIlgKRJEEgGAMRBIGiDENQlqNAJAsYCEwgEEEgBAHSIEMAAuJIAgKR +LEsgGEMgCEJgBMqhHENQlgJILMsSCMRABEFgGAESHMcRgIA4kgKxOIsTBAOhKAITKEGDHMhD +kqIAEqAjisJAgIooBkpwNMcTgIA4jgLhOBAkEAOhKIoSKEGDIMcTkKQICgQEQQIxEIqiBEpw +IMdxPAEIiCMJCEQUMUQ0EIqiHIfSIM3xBGUpCiABCUQyEMqhHMiBHMjxBCAgjuQoEAKxRANB +HMqhHM1x/zxDUJajQIACsUTDQBAEIR3IcQRDAALiSIoCYQiEE03gII7HQR3BEICAOJICYRSC +QDjRNE1CAAzVQR3WE5AkAAqEUQiFQEARBAUAAAzHQR3BEICAOI4CUQhFIBAREwXjUFUHdQRD +QJJAABbCFAhEJBgBAADAMAwXdQRDAALiCAhEIRQCYRiCEZDjUFFHMAQkIBAFOAmTQBiFUAQg +II7AUFXUEQwBCQjEJExBkBRCEZCjMIBD9RxDAALiGEzCFBBYIRTBOI7AQB1DMIoCMQkYGAjL +JEwBCIgjOVDDEJCAQGACJiTTJEwBSY5BEJAiSCCwTAiCZBKmAATEkSzNQBCCYCDBJgELTNMk +g0AMEgwTAhAQR7I0zYARgvM8TyAIznMMAQA7} +paste {R0lGODlhEAAQAKIAANnZ2QAAAP//AISEAISEhP///wAAhP///yH5BAEAAAAALAAAAAAQABAA +AANwCLrcjqGBoKsYqiKrCDSGBkMiJJCGAgCDKBB0gwYDIKYwdJUIAyBokIaGBmloAhBiaAgH +TdcCEIKGBsmwVM0AIYaGcAxL1coQgoYGySoisMzMAoeGxrB01QJpaMiwMHTLAEPVsHTVEHTR +dBlBlxswAQA7} +print {R0lGODlhEAAQAKIAANnZ2QAAAP///4SEhP//AP///////////yH5BAEAAAAALAAAAAAQABAA +AANZCLrcjqG7CLqBoquBoBuCoSqBoBsouhoIuiEYqrKBoIGiqwEYEIChyxAIEYGgywEYgKHL +DAgRCLozgwABARgIukSEABEBGLq8gAEQCLobgAEAgKHLgaDLzZgAOw==} +question {R0lGODlhIAAgAKIAANnZ2YSEhMbGxv///wAAAAAA/////////yH5BAEAAAAALAAAAAAgACAA +AAP/CLoMGLqKoMvtGCo4uhKBgaDLDRghOLqsghEIuryBgqPLPSiBoMsQOLrcjYSgu4GjO4Kl +Kzi6Qwi6EDi6I4UyU1VYgqM7hKAagqM7VTg6VYWFoztCCAqBo6tVWDVThVU4ukqBACE4ulqF +VSNVWIWjq0IYEDi6K4UlU1VYOLpMgRA4uryCpTi6PIShOLq8hVU4uqyEoTi6vIUlOLqshKE4 +uryFhaPLSxgqOLrc3kgoAgJHl0ewSnB0eQhDIQRHl6uwCkeXhTAUIHB0uQqrcHSZAiMAAJBw +dFcKS3B0lwIjAkGVcHS5GykiAkEXSHB0uQeFIiIQdJcIBUeXVZAoIgJBT5chkFRwdIUICUMV +QZc3MIKIBEcJQzcQdLkBQ4NmcAhDFUGX2zFoZggjEHS5vRHNUASCLrc7oqEIBF1uf0QUgaDL +7Q9QKIIut79CEQi6DAkAOw==} +redo {R0lGODlhEAAQAJEAANnZ2QAAhP///////yH5BAEAAAAALAAAAAAQABAAAAIvhI+py+1vSByC +jxAYQXDMwsyAggQAQBB8iwgMgg8REQgUwqbYBDsIPqYutz+MgBQAOw==} +save {R0lGODlhEAAQAJEAANnZ2QAAAISEAP///yH5BAEAAAAALAAAAAAQABAAAAJWhI9pFB8RIIRC ++BYQFqQQvkWEBSmEbyFhQQrhW0hYkEL4FhIWpBC+hYQFSYxvIgFAoXy0AAiSGP8kAIIkxgcI +CSBEQvEBQgIIkVB8gJAAAhgfj+BjWgEAOw==} +underline {R0lGODlhEAAQAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAQABAAAAI3hI+py60UBy4I +vkVcBMG/iIsg+BdxEQT/Ii6C4F/ERRD8i7gIgn8RF0HwkWITfExFin8EH1OXCwA7} +undo {R0lGODlhEAAQAJEAANnZ2QAAhP///////yH5BAEAAAAALAAAAAAQABAAAAIuhI+py+2vSByC +HxdxQCHsCIg7oAAAEUHwLTAiKIQPgRSbYMfd3VEIH1OX2x8mUgA7} +warning {R0lGODlhIAAgAKIAANnZ2YSEAP//AMbGxgAAAISEhP///////yH5BAEAAAAALAAAAAAgACAA +AAP/CLq8gREIutz+KESGEHS5vVGIiAxSIehy+6JAUaUqBF1uBxQoukOFhaDL7RgoukKFhaDL +3RgoujqEVQi63IyBortUWAi63IuBostDWIWgy60YIjKERCMiSFUIutyAISKCpCoiOFSFoMsd +KCpIqiKCQlUIusyBooqkKiIoQ1UIuryBooqkiqJKVQi6rIGii6SKojpUWAi6DIGiG0RIgaJL +VQi6HCi6MoREg6I7VFgIuhsoukqEhKKrVFgIuhoouhuEgaKrQ1iFoAuBortDOCi6S4WFoBso +uiyEostDWIWgGii63K6IqgAAIVB0WQaJBkV3h7AKAAJFl4WQiFB0mQoLRyBQdFkJiQhFl4ew +CgJFl3WQaFB0WQirIFB0ud0RVVWg6HJ7o6GqAgwUXW5fNFRVhQCBpMvti0oVABCwdLndEehi +6XI7I4AEADs=} +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/readme.txt b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/readme.txt new file mode 100644 index 0000000..a76b333 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/readme.txt @@ -0,0 +1,2 @@ +All of *.tcl and under themes/ directory (except kroc.rb) are +quoted from Tcl/Tk's Tile extension. Please read Orig_LICENSE.txt. diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/repeater.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/repeater.tcl new file mode 100644 index 0000000..2e8539f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/repeater.tcl @@ -0,0 +1,117 @@ +# +# $Id: repeater.tcl 11708 2007-02-12 23:01:19Z shyouhei $ +# +# Demonstration of custom classes. +# +# The Tile button doesn't have built-in support for autorepeat. +# Instead of adding -repeatdelay and -repeatinterval options, +# and all the extra binding scripts required to deal with them, +# we create a custom widget class for autorepeating buttons. +# +# Usage: +# ttk::button .b -class Repeater [... other options ...] +# +# TODO: +# Use system settings for repeat interval and initial delay. +# +# Notes: +# Repeater buttons work more like scrollbar arrows than +# Tk repeating buttons: they fire once immediately when +# first pressed, and $State(delay) specifies the initial +# interval before the button starts autorepeating. +# + +namespace eval tile::Repeater { + variable State + set State(timer) {} ;# [after] id of repeat script + set State(interval) 100 ;# interval between repetitions + set State(delay) 300 ;# delay after initial invocation +} + +### Class bindings. +# + +bind Repeater { %W state active } +bind Repeater { %W state !active } + +bind Repeater { tile::Repeater::Activate %W } +bind Repeater <> { tile::Repeater::Activate %W } + +bind Repeater { tile::Repeater::Press %W } +bind Repeater { tile::Repeater::Release %W } +bind Repeater { tile::Repeater::Pause %W } +bind Repeater { tile::Repeater::Resume %W } ;# @@@ see below + +# @@@ Workaround for metacity-induced bug: +bind Repeater \ + { if {"%d" ne "NotifyUngrab"} { tile::Repeater::Resume %W } } + +### Binding procedures. +# + +## Activate -- Keyboard activation binding. +# Simulate clicking the button, and invoke the command once. +# +proc tile::Repeater::Activate {w} { + $w instate disabled { return } + set oldState [$w state pressed] + update idletasks; after 100 + $w state $oldState + after idle [list $w invoke] +} + +## Press -- ButtonPress-1 binding. +# Invoke the command once and start autorepeating after +# $State(delay) milliseconds. +# +proc tile::Repeater::Press {w} { + variable State + $w instate disabled { return } + $w state pressed + $w invoke + after cancel $State(timer) + set State(timer) [after $State(delay) [list tile::Repeater::Repeat $w]] +} + +## Release -- ButtonRelease binding. +# Stop repeating. +# +proc tile::Repeater::Release {w} { + variable State + $w state !pressed + after cancel $State(timer) +} + +## Pause -- B1-Leave binding +# Temporarily suspend autorepeat. +# +proc tile::Repeater::Pause {w} { + variable State + $w state !pressed + after cancel $State(timer) +} + +## Resume -- B1-Enter binding +# Resume autorepeat. +# +proc tile::Repeater::Resume {w} { + variable State + $w instate disabled { return } + $w state pressed + $w invoke + after cancel $State(timer) + set State(timer) [after $State(interval) [list tile::Repeater::Repeat $w]] +} + +## Repeat -- Timer script +# Invoke the command and reschedule another repetition +# after $State(interval) milliseconds. +# +proc tile::Repeater::Repeat {w} { + variable State + $w instate disabled { return } + $w invoke + set State(timer) [after $State(interval) [list tile::Repeater::Repeat $w]] +} + +#*EOF* diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl new file mode 100644 index 0000000..37e3d07 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl @@ -0,0 +1,149 @@ +# blue.tcl - Copyright (C) 2004 Pat Thoyts +# +# blue.tcl,v 1.27 2005/10/08 14:56:57 jenglish Exp +# +# + +namespace eval tile::theme::blue { + + package provide tile::theme::blue 0.7 + + set imgdir [file join [file dirname [info script]] blue] + array set I [tile::LoadImages $imgdir *.gif] + + array set colors { + -frame "#6699cc" + -lighter "#bcd2e8" + -window "#e6f3ff" + -selectbg "#ffff33" + -selectfg "#000000" + -disabledfg "#666666" + } + + style theme create blue -settings { + + style default . \ + -borderwidth 1 \ + -background $colors(-frame) \ + -fieldbackground $colors(-window) \ + -troughcolor $colors(-lighter) \ + -selectbackground $colors(-selectbg) \ + -selectforeground $colors(-selectfg) \ + ; + style map . -foreground [list disabled $colors(-disabledfg)] + + ## Buttons. + # + style default TButton -padding "10 0" + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label + } + } + } + } + + style element create button image $I(button-n) \ + -map [list pressed $I(button-p) active $I(button-h)] \ + -border 4 -sticky ew + + style element create Checkbutton.indicator image $I(check-nu) \ + -width 24 -sticky w -map [list \ + {!disabled active selected} $I(check-hc) \ + {!disabled active} $I(check-hu) \ + {!disabled selected} $I(check-nc) ] + + style element create Radiobutton.indicator image $I(radio-nu) \ + -width 24 -sticky w -map [list \ + {!disabled active selected} $I(radio-hc) \ + {!disabled active} $I(radio-hu) \ + selected $I(radio-nc) ] + + style default TMenubutton -relief raised -padding {10 2} + + ## Toolbar buttons. + # + style default Toolbutton \ + -width 0 -relief flat -borderwidth 2 -padding 4 \ + -background $colors(-frame) -foreground #000000 ; + style map Toolbutton -background [list active $colors(-selectbg)] + style map Toolbutton -foreground [list active $colors(-selectfg)] + style map Toolbutton -relief { + disabled flat + selected sunken + pressed sunken + active raised + } + + ## Entry widgets. + # + style default TEntry \ + -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont + style default TCombobox \ + -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont + + ## Notebooks. + # + style default TNotebook.Tab -padding {4 2 4 2} + style map TNotebook.Tab \ + -background \ + [list selected $colors(-frame) active $colors(-lighter)] \ + -padding [list selected {4 4 4 2}] + + ## Labelframes. + # + style default TLabelframe -borderwidth 2 -relief groove + + ## Scrollbars. + # + style layout Vertical.TScrollbar { + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style element create Horizontal.Scrollbar.thumb image $I(sb-thumb) \ + -map [list {pressed !disabled} $I(sb-thumb-p)] -border 3 + + style element create Vertical.Scrollbar.thumb image $I(sb-vthumb) \ + -map [list {pressed !disabled} $I(sb-vthumb-p)] -border 3 + + foreach dir {up down left right} { + style element create ${dir}arrow image $I(arrow${dir}) \ + -map [list \ + disabled $I(arrow${dir}) \ + pressed $I(arrow${dir}-p) \ + active $I(arrow${dir}-h)] \ + -border 1 -sticky {} + } + + ## Scales. + # + style element create Scale.slider \ + image $I(slider) -map [list {pressed !disabled} $I(slider-p)] + + style element create Vertical.Scale.slider \ + image $I(vslider) -map [list {pressed !disabled} $I(vslider-p)] + + style element create Horizontal.Progress.bar \ + image $I(sb-thumb) -border 2 + style element create Vertical.Progress.bar \ + image $I(sb-vthumb) -border 2 + + } +} + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c1be9d880958303c00527831b0c89de72766017 GIT binary patch literal 315 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNR!2O2`8d9=u z3)7o72B-+0SiI0cWcu0kl3g3PHk>=L?c!dexdECtUpwx&U+|5MPrrRb$&p)kT8f`W m=4GYEr$;q6WF)65$+u+&^Mu(e$ViHd3N!I}xY|21SOWk~x_R9I literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..1cb36ec5543e8058defe8c6de4798ad1720baa44 GIT binary patch literal 312 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNj!2E<45>l+~ zhutxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0udVZGhrW7Dg@xdj=f_AOQJ^fi3L7{f7z~QnGFf z)0;O2s0f}|ywE^o`q}i7T^qPIoIA1Y;$EY<0h%{o8}90TbM|%wU*hxZ;>%}y)4Q`$ ioSs4mE>D8gL%U26=WpEMTMF8JY4M^8LR>GqPi>q literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..cbc3db27567257c45c39d3d3cdfa140b76cb8382 GIT binary patch literal 329 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNc!2ARc9lqAK zB}Fr3w8SoGD4mipTNlB?bX&keE@6Y1V4Vfa1e27W0OxZPEu;ne`Bf*Kkm;Y#q0u0c z(2r8#EFu*)r2xJXW3!Jges(N)Rbk--`OY1VVw literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..14d541b03e3411ca1f99b58ae3788ab550594c1f GIT binary patch literal 327 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNUztxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNQ!2ARc9lqAK zB}Fr3w8So~P&g%Fwk{(3+Q%1Vo%htxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNs!2ARc9lqAK zB}Fr3jKl(1N_GYCNZ(*%ns}B=rvF27w?MlrUx$>F+Zx5g9X6NT&aeu1#s&4iU=}YBoRG%GLww-ENPC}^Vk*Stxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNUztxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNg!2ARc9lqAK zB}Fr3jKl&MOLhhDNZ&YS+AV4!_ki7yr_4ej!^3c`n9Dsutxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNX!2O2`8d9>y z<{#L6FhXMz$CHZz5?wy(AzraD)6b^2-2RYsScD}h>R*~}R_XP-J;!gS@4ma|%IlX= ffjKq#(ajD1O~tPA8C|?Q;Z81Yt{$%TjttfSl+}7` literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..20b6a824f42b0fd9e256f01547dc35fa5ea66ddc GIT binary patch literal 313 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0r61HbC(w3nLeUJ%bL&c#xkM*uoCXPk13A#oFF{ zVL^tCf*|M7rkfRfOotC~P7PY?tZObbGtBnk+u{ti^sC49f8Djtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0udVZGhrW7Dg@xdj=f_AOQJ^fi3*N{f7z~QnGFf z)0;O2s0f}|ywE^o`q}i7T^qPIoIA1Y;$EY)%!ITFe%BWw+8cs*(=CMii-*}@p-t~J2F@U09O6Dr2qf` literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..0947f43b9024931f4f444507adcd96a6a4827173 GIT binary patch literal 696 zcmZ?wbhEHbRA5kGIL5$`HuFq${vlo6G<}22gxb^b&0F*4oGqAt-p;KvuI#j(OMAhr zlckF$f&Tfg#3!}5zQYp=DfzTCOtdf%3tx_W7ox8II#-8o~| z-Ff@&85(6RKKNk8(MS6F8Ea2G-gM@vo?iO)^UwA4)Aw9@aq!x!V>jQNzWeUtgZIZT zKfU(&(9?#e|rDr=e!;hgwx>)x8P~P<|4;xr3_t*i z3kLRo4Gc}qEv;?s9i3g>369fZ25|ntCsUl zYvOa_7udXI>$dG%*EKl_3hmo};NYPHyBM5=MNXbNedg@xqfVk?m#z5H%6S=vhwnB-)M*G#+9qCu8!E)H_34E>g($h z4%fAY9d5h1Ipgvw+iK=necR;<9-o@4y$f&Tfg#3!}5zQYp=DfzTCOtdf%3tx_W7ox8II#-8o~| z-Ff@&85(6RKKNk8(MS6F8Ea2G-gM@vo?iO)^UwA4)Aw9@aq!x!V>jQNzWeUtgZIZT zKfU(&(9?#e|rDr=e!;hgwx>)x8P~P<|4;ym|3saO zQWHy3QxwWGOEMHfGEx=XJ$(ZhbQpjD6iE#1{~8#Ynp;}i+B-VCx)~Umn3*O{nmlDH z6Jsk2D;xXVdGi-6oXf%4!o|(Aa@FcJYgh4dH1jd>3vAoIW9P0NOf5`;LI)2WK63Q% z-ex9Ykuzt{oxgDIL=%&!*!3GXZ{5CmnSn|C;iJb-o<6xJA^Ga{o44=YGD$T{NPqqI z{m0KAFJ%7y`_I74^u~dsxxJY~SSx15goI7}0?J-g(%l!#7BHZ(DP7b4v7%4_}$uZg2N5czmi=`tbA~$%@af z?w$_U=Z!bb;gIv$vEkuC^8x{<3C``0k55qcuG`am{E?hp9RsJ*lFiT0FL2~n4B}v9 Z@?N1TIy0qZVm5>Oggx`tY6vh`0{~xe+U)=U literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf new file mode 100644 index 0000000000000000000000000000000000000000..e38ed19e6107c0064d3f848e17c4dafe29bca95a GIT binary patch literal 1942 zcmY+FT})g>6vywqv{0?6Aly5T`@-WawP~s^ZrN2aJ~T1W#0Qd6Ty_?0VK=bYN@5_f zTGxlBN$ZA%rcHyXG=|uan$}92(u7LGHgsvFB9?9-6x{M5AE^*`=6cTD*>yeHGxMAO znR{mD+}+t=V^i35)X!Y3@o+!`b16qI0oQeCUIE|XJE>{tU}fOjz)Qi)!7IUwgOG~) zLrqPA<_L^6e9(NeB~TX$)Vq!}MjBinGz47lyu1HBjGEw>0%uv!eF!}oj!RnuhXejd zW2m_{5~>Z?MH*x%JDtF&Kus;ezN$*o;DcshQ*{$t&DhteXmfN57fJDakUA z_b*4s96pJf;r$BoY&vtikVCQIg*iF?Eyucd0T>+2z_>S+$0L$;sb9_0yBx+f)&6zd zOI4MclhQOi1DN5xmt)-vIdb~RJeE`Q8-2?e6-Jfnf*u`hr?1X`DA*EeYp%zkEF<)V z;8=DWe1~FuL(eIOPJ2F&cjoa6d0d>wF9Bn&tl=xfHPEtOtnB(A8GSP1Y}Ew}uihB^ zzh)$G>|>c4T1m^Os9^;xbFj8KTps401I%FD6K*rxc*MhWmZ_&l+pTs%QK#)4R)@mQ zW7aW+Uq-E{L_trG6N*leQ=Ha720^<>mlDsCv*K0ABxo<`Rn$lNM5WaFNxz~2GT@N= z3b`WO7R3;I!ZF zC5eJwCYK$;b94FyWDxFabD1yfMXtWS zYOeB`*MYaHt0vc;KHVtY;4`gI9KAYQzPIBf&SPK4E8@OH<`!#YWlY>k6eKdEKi(ZH zALG%{gpuIK?3k0)N0RLj6VX z?0>_{!1&()mc2{x4pUYL7iw-9xW|gJ_m0cai|`rEZ;KYY%oeBZ?bw*M7`C_Bq7$hP xNoqqm`Z-4fc85M}i*Imd4AuWAmeYEW&R|q&+wFg1Jw4rav2Db7cg+6C{uc(EzbpU% literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..e819b1b9516f08eb362a06faab5cc73347204eb9 GIT binary patch literal 769 zcmZ?wbhEHbRA5kGIL5$`HuFqe*WQ$ACv9EZb#>G9_0#R#IunZ5-+T1t{g=?$YVS~DW>J3U(c4!af9%+M(ZsCe{)>-K-+g=V@{^HC!Gl*{?!WwOVqSFn z`R7~DJ{cHfT)g-8+T)MMFF(Eb;Juz+`susxj@^87@Y<_AmtN@Ur*A+1Twgz9)0wAh zPdr|6^pT-a*5ZQ?boJ8a?YlQ)*WKvWos+lU?%Q&+bHnwv)t6h=UTau>v3}*1s)c8( zmR+h?av^2PiIRoqOBY`(n03<5r9H0fbiw@dd2`OjH*Za-Jsq8YNZ%my|4;ym|3saO zQWHy3QxwWGOEMHfGEx=XJ$(ZhbQpjD6iE#1{~8#Ynp;}i+B=#VnL2yhnOP>Xuuhsf zZ8{rUD?110y!i_jF683o;pLmv%r79gcHR078`lY~Y!Vg`-MMS`p1r%oSX#s-jvPI9 z{KPTIgUwRX=Pz8mborvpnI>5|`P+By-n)NC;W`70;oO=OBw>+yaC=Pn*g zy`x=|HG)^gtlXs1J>4Mr)Ev#?7;bTk;#YT07C+~9(oNuy_1d!H;v#!?!H$DlR$g8n zFkg*Tq4_}1>WIx*cUP5aSxO}w?vnK`(>WxSad}nj>9DoDEq>;YPR;e+{w_v_qxi+$ z)7#g_@3RtkC*iYW!^6X^l>#pePc-z)Pf+%r=VNI!L7}BZLgLWQ&Cky-uoTuzT5@5c X_ljU)2d4)ei?44;J}oA~!C(ylK=;}E literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif new file mode 100644 index 0000000000000000000000000000000000000000..b753aead9746368bf7c445ab48936afe6a0cc565 GIT binary patch literal 254 zcmZ?wbhEHb6k-r!XklP@|K(@-;)}PRf390`xpnQeo{cvc7#JpRyESX~-GvA4uQ>8> z{mIAM&OO_E>BW)juTI~2d+Fi(n@>MJc=hE!aX<%X9MC2q1_st<1%lzt& z3Utmld*7*8C!7~3!8SjDlE$%l>UWXkoV zvvCZ!bHtPV%%xwHgeUK3|HfNWt;g5G=g`{5)}hDW>(D!azrR;cK)_+z%$YL;^aSTG aShz?~PiWcl6)T1GnAWaazhSK+gEas(ZHGhv literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..74dbb799a2c3a59ce2dceba0a660ae5712acafc4 GIT binary patch literal 234 zcmZ?wbhEHb6k-r!XklPTn|bE_m!IW}FW!Fsxo*Yf*0tAqHr|-L?bfW_cNZSGzv9Tl z^(P;1JNInwr58u8zdC*A?WKqBZ$AC_;MEtPE@F@l0}z1hVqncrQ0PnX^U

EgR^SYJywz_lai+jiZI&5K$p{`~GeuGCt!_Q%HS zi&|^q^v*n2YK!~-So~X+5^poFeM>8AyAofIeNR7MUyl+$zx~u1Gp6$^3Cx?nV4;AL R;L>HwR|u-DR#RlK1^@v}VL<=@ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif new file mode 100644 index 0000000000000000000000000000000000000000..6f360ffd621e45e90d84deb0de5b94ba803683a9 GIT binary patch literal 229 zcmZ?wbhEHb6k-r!XklQ`)lDm3e6eoD<<_;=dN$seyzSPk-FFurxWD4a!}TX0Z#(yF z@1++fYnFmSUy3JN#;SFV8hZ+KxF03l zudwTIdH>&`X@!H1R6py)#FIHzyo;Jkyw=LObgU^m?b;#qU_-?m0nKwSwnQmL?YRHp vhtrW2x8GN^tvLAp_kUg`zUG$JHa;c(uI`>*ekFm4lO|6QP@Ar%$Y2cs+*XAO literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7c21fb0c31f79f82417c7a3945c536697706663 GIT binary patch literal 1098 zcmd6m$x~AY0LC8_5tJ4|Tfu=*T809(B9=O)P#Q>~P;Eu5!~_NqLYBAWWf3qTWD!D! zG>usvd22e3N(v~#Aj;AtlaQC?4aBid4?Xn2p)=Z!M-QIb(*L5r`EK9u@Lj&I+FQ@@ zt`!1>zzYD7k~>2LCnHial9N;0LwHJtC*^n?Bw`T3LgZeO^1YTwg1#s;6GFV32)2P@ zo2W0WB%(?x0g)*=!AbF?0*`@M81k&a&LzY#k2>a5Kg?^~OB(En8V{l57D6W>W=Dpz zkZTpT&qEUoX!I(^oUqZQwo=2+z%aI|CBrJ3g(*(zOM){|$h`(n&nry60gXjGgbMrQ zJrYE!HmEJ`QDrOK10BQ%gIqp|P<^aH&fyMQ@Bu;d<}l zC>2yQahTqlnu0u=kbPc0?h#2)eoOm@mDNQ>#V5+jc=Zk9K8e<7H@JV&Q=3{krervX zNrN~Gdp2PEoJ{ZN>Xq^88*_7W^Yim-YEED76066oM)$0NS|4U&D8nJ%4a7dD7{4VN zgg@sCii?ZuK0SN2r(Zj6GkF8!^oEq+K!Sy_5bAsg-y{anv5Qy4=RRvV|82(*sM6cK z7W|>XAG+?3EB%~|+?Epw*cVZHAFI9(AV$|9GJ3Ulu=9#Y*xe@qRl{bx*>l%KJ=Xgp z8h=vhPs`~Yn20N9f*SXV)-kJ@oIwrKO5KFUV7oEpHM#Ga$rZzo;Sqma#iU>+Ehmx) zzNPYowAkv1>%pjVR)6cB!4)w17LDYp!M|t5)c%AFPr+1DNwO*;ti^vG!Pj-fnvPu8 z(?J~*8S%3S!zt)(kmOK`Rg+uS>6n&@tCWL1{%cXuP1+3%cabMd2@*>4}rma8Jsw{i-~FWl~kZdo0fwUTGc7Qz1f z5EKGzc0-r&q$y4H+fsr$Ic?Z2Q80; z7fN{Am%nnJ#M9CS-RoDPlBtWwzc2y&3hUa^rOnp7(q^pf64Bx~#?xn2dG57i)uPSG zDsSK$2IznJ$DfDiI_|W(tB3wNvhdwPS8flxFmqqHJit*c_kD}q>*mw>JG0QyrQWbH t<6s3`bZX%F{!`V`2V1q0K2KG50>1occVGI&&L_|K0*47WaO4nB|1U<3QJ4S# literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..a006630388efa1cc1bc541171e6d7109174631a6 GIT binary patch literal 626 zcmZ?wbhEHb6k-r!IL5$`HuFsStTUN&&SuO$lQrjT?!5Db3(prVypTWteD<7k#fvVK zFTGT~{BrHeD|IWc)U3EtvFuXG;)|KH&lW5=U%L2W&5Fw{Yp->0x-ntvt=`Qy+t**O zUv;H?>BXG6=W^zq>)Lo@`p&zH4nA0U?D48&kCz^PID60CzAd*J*Icbxez|MIjoEwe ztvmT-@8y@rZoWBj>+ON7uQs1~y70h*zOAg&VTUvED9bn^DwEoYz2*?X^J!}ZGLmosLctz34wbHnxd`|t0*^y2E{k1sxa|Mczm zr|-XCef)9j+2_O8U#~d&sDJCNqD2?7=bkHEaG__@&80^k-h27w{rBTH z-%j6oH)Y3d208*AkX@j-U|_%Az|hp((%RO{$kfHe+}^>$%Er#l#=+U!$~b|Gn}?T= zUqEo$j3yyr5m7O52?eM2Ny2`0|O^FueDE1?xY=l*&V`?@}g1-p#@zPOD{P_6u8G0 zRV}}~{rqz>kPgsjpihJt7}!=hG!%H~NOd-*eCiP4ndk5LK%zj1tF3vVgM>$Shoj=c z2m`S$m&68#F6lmY6{VR0Qm)WS(pI=USzYFDpSTEDTAVa~h-YZotF-rd_jaq`sZGpknC sH#WDn?{ey4Ehs7}tC;1In4FrPncd|a${ZdU9UJfVG$5|Z$&tYt0EJAb8vpZ>_(&lN7XP`>n1$NKBNn{Q6odaG{bmClVfrtG*q zXYalF`|npQz0|Vy+N5o_R~~z`_QaE_<(J#nU!S(~&eFpVH=cgF_1rTCDghmkIUv6< zux)c_DDcpc>TFE;)FHw%&)@NZM1c@jTk}E(36Jg$N5zE^24Y<txlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`KT+qR)Wnk16ovB4k_?5Aj8p}8Pu~Cr z#h)yUTnzRMIt)Mn@+<>e^nv@14k~S3OcO60&atwUzmVv>Hfp5|W7_GrdB#lL6+U9| zEK{~r&0WW#@?nRJouJFRAAja@y!`#YmXD9WrM0bvkBPUtr?=aMi+j@KDLgK0GiJ`3 O!DR0--__oc!5RQ9Jc3pL literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif new file mode 100644 index 0000000000000000000000000000000000000000..d9bfc0a7bea85fdbc85a6f76047bb3d8e332ac0f GIT binary patch literal 316 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNh!2ARc9lqAK zB}Fr3w8So~m|~a{u|8t;fsZe$_Q$p}IO)wk`KY7nY#6`lhaEC@f&uS-{MoCt;m7}m nI&mh6*0%OmNp|U;-o73gcDcz@rpn1H*t5GSx+>W_GFSruoqKva literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..930d7fd9ffab76babca9f7b94db9b3c4f1ee9914 GIT binary patch literal 333 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`KT+qR)Wnk16ovB4k_?5Aj8p}8Pu~Cr z#h)yUTnzRMIt)Mn@+<>e;DPxGFC?T`+nX;e$goim| literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif new file mode 100644 index 0000000000000000000000000000000000000000..060be5dd41c2783e36275958886606cdeaecedea GIT binary patch literal 308 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0mjI1uc-`PZmZl273k_1|R_WiGeNf!2O2`8d9=u z3)7o72B-+0SiI0cWcu0kl3g3PHu$aBa&fQG;pk1`Yh^Z0E7SlW|_=eZ^A7tW-l;lV13J9gSBs;&pt+pUUthqM2B#i z$$F;JbfM3Mt=29sXOFbmn!DYk!r-sT<1jF2y3pq|H*&<+>M}HN&))7dHgveX(b?tk zHaK@bKy>8n^#A|>A^8LW3IHDfEC2ui00{sN000Fu;3tfvAVv~pVVgIiD(edH+6qoB kJ9%o)y4xfO^vMK6^Z0E7SlW|_=eZ^A7tW-l;lV13J9gSBs;&pt+pUUthqM2B#i z$$F;JbfM3Mt=29sXOFbmn!DYk!r-sT<1jF2y3pq|H*&<+>M}HN&))7dHgveX(b?tk zHaK@bKy>8n^#A|>A^8LW3IHDfEC2ui00{sN000Fu;3tfvAbJ~SQBpLbD(edH+6qoB kJ9KJCJl(AqYfXs1mrr&Sx;~c+$`k!qq13DPq74B6JE?|FNB{r; literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..bc37b31c3de9234f5b47fb99ff828e808da9f607 GIT binary patch literal 183 zcmV;o07(BwNk%w1VGaNZ0E7SlW|_=eZ^A7tW-l;lV13J9gSBs;&pt+pUUthqM2B#i z$$F;JbfM3Mt=29sXOFbmn!DYk!r-sT<1jF2y3pq|H*&<+>M}HN&))7dHgveX(b?tk zHaK@bKy>8n^#A|>A^8LW3IHDfEC2ui01f~N000Fv;3tgEXbN8{cx>xl>L$-LEMj=B ld$3^rz~F`_pcs!xo=C!MI&Ff8bV{{}NTrEDoBD(R06SCxQ5FCI literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif new file mode 100644 index 0000000000000000000000000000000000000000..d3745c7f6285242f01e5107ca992176c2e304e0a GIT binary patch literal 283 zcmZ?wbhEHbtxlk zOC<}>x30aWrsv2cb6P`u>Ry@1A~lR7oMA#7ah6&%E+YP{JnQ3W+glJUcCAA zqnSmyy+g^9H(&2PdXrGRUSB`m*0r61HbC(w3nLeUJ%bL&c#xkM*enjrPk2$lq2_)t zU$etv{srz}r?pW_ow~|SfAwIUwxMFrM=paGTW)FJ*>S&M%>n22w>LUHDp()G#>ij| E023ctd;kCd literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl new file mode 100644 index 0000000..4facac7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl @@ -0,0 +1,6 @@ +# Package index for tile demo pixmap themes. + +if {[file isdirectory [file join $dir blue]]} { + package ifneeded tile::theme::blue 0.7 \ + [list source [file join $dir blue.tcl]] +} diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl new file mode 100644 index 0000000..0c3bd33 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl @@ -0,0 +1,194 @@ +# keramik.tcl - +# +# A sample pixmap theme for the tile package. +# +# Copyright (c) 2004 Googie +# Copyright (c) 2004 Pat Thoyts +# +# $Id: keramik.tcl 11708 2007-02-12 23:01:19Z shyouhei $ + +package require Tk 8.4; # minimum version for Tile +package require tile 0.5; # depends upon tile 0.5 + +namespace eval tile { + namespace eval theme { + namespace eval keramik { + variable version 0.3.2 + } + } +} + +namespace eval tile::theme::keramik { + + variable imgdir [file join [file dirname [info script]] keramik] + variable I + array set I [tile::LoadImages $imgdir *.gif] + + variable colors + array set colors { + -frame "#cccccc" + -lighter "#cccccc" + -window "#ffffff" + -selectbg "#eeeeee" + -selectfg "#000000" + -disabledfg "#aaaaaa" + } + + style theme create keramik -parent alt -settings { + + + # ----------------------------------------------------------------- + # Theme defaults + # + style default . \ + -borderwidth 1 \ + -background $colors(-frame) \ + -troughcolor $colors(-lighter) \ + -font TkDefaultFont \ + ; + + style map . -foreground [list disabled $colors(-disabledfg)] + + # ----------------------------------------------------------------- + # Button elements + # - the button has a large rounded border and needs a bit of + # horizontal padding. + # - the checkbutton and radiobutton have the focus drawn around + # the whole widget - hence the new layouts. + # + style layout TButton { + Button.background + Button.button -children { + Button.focus -children { + Button.label + } + } + } + style layout Toolbutton { + Toolbutton.background + Toolbutton.button -children { + Toolbutton.focus -children { + Toolbutton.label + } + } + } + style element create button image $I(button-n) \ + -border {8 6 8 16} -padding {6 6} -sticky news \ + -map [list {pressed !disabled} $I(button-p) \ + {active !selected} $I(button-h) \ + selected $I(button-s) \ + disabled $I(button-d)] + style default TButton -padding {10 6} + + style element create Toolbutton.button image $I(tbar-n) \ + -border {2 8 2 16} -padding {2 2} -sticky news \ + -map [list {pressed !disabled} $I(tbar-p) \ + {active !selected} $I(tbar-a) \ + selected $I(tbar-p)] + + style element create Checkbutton.indicator image $I(check-u) \ + -width 20 -sticky w \ + -map [list selected $I(check-c)] + + style element create Radiobutton.indicator image $I(radio-u) \ + -width 20 -sticky w \ + -map [list selected $I(radio-c)] + + # The layout for the menubutton is modified to have a button element + # drawn on top of the background. This means we can have transparent + # pixels in the button element. Also, the pixmap has a special + # region on the right for the arrow. So we draw the indicator as a + # sibling element to the button, and draw it after (ie on top of) the + # button image. + style layout TMenubutton { + Menubutton.background + Menubutton.button -children { + Menubutton.focus -children { + Menubutton.padding -children { + Menubutton.label -side left -expand true + } + } + } + Menubutton.indicator -side right + } + style element create Menubutton.button image $I(mbut-n) \ + -map [list {active !disabled} $I(mbut-a) \ + {pressed !disabled} $I(mbut-a) \ + {disabled} $I(mbut-d)] \ + -border {7 10 29 15} -padding {7 4 29 4} -sticky news + style element create Menubutton.indicator image $I(mbut-arrow-n) \ + -width 11 -sticky w -padding {0 0 18 0} + + # ----------------------------------------------------------------- + # Scrollbars, scale and progress elements + # - the scrollbar has three arrow buttons, two at the bottom and + # one at the top. + # + style layout Vertical.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style default TScrollbar -width 16 + + style element create Horizontal.Scrollbar.thumb image $I(hsb-n) \ + -border {6 4} -width 15 -height 16 -sticky news \ + -map [list {pressed !disabled} $I(hsb-p)] + + style element create Vertical.Scrollbar.thumb image $I(vsb-n) \ + -border {4 6} -width 16 -height 15 -sticky news \ + -map [list {pressed !disabled} $I(vsb-p)] + + style element create Scale.slider image $I(hslider-n) \ + -border 3 + + style element create Vertical.Scale.slider image $I(vslider-n) \ + -border 3 + + style element create Horizontal.Progress.bar image $I(hsb-n) \ + -border {6 4} + + style element create Vertical.Progress.bar image $I(vsb-n) \ + -border {4 6} + + style element create uparrow image $I(arrowup-n) \ + -map [list {pressed !disabled} $I(arrowup-p)] + + style element create downarrow image $I(arrowdown-n) \ + -map [list {pressed !disabled} $I(arrowdown-p)] + + style element create rightarrow image $I(arrowright-n) \ + -map [list {pressed !disabled} $I(arrowright-p)] + + style element create leftarrow image $I(arrowleft-n) \ + -map [list {pressed !disabled} $I(arrowleft-p)] + + # ----------------------------------------------------------------- + # Notebook elements + # + style element create tab image $I(tab-n) \ + -map [list selected $I(tab-p) active $I(tab-p)] \ + -border {6 6 6 2} -height 12 + + ## Labelframes. + # + style default TLabelframe -borderwidth 2 -relief groove + } +} + +package provide tile::theme::keramik $::tile::theme::keramik::version diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..2d84f29c60e5decdf0d3eaffe92e361708215925 GIT binary patch literal 273 zcmZ?wbhEHb6krfwXpv+9g5u)h)vH%uxpL*|)vMR9U%z+n-h&4Z9zJ~d`Ki5R#Fq;O^-gz@Ye(g^`Ovo~om^zp^J>-c z87k*mLW5Y|x(l&$wj3@x?JC!K@S%841VeyEkwb#goWRUYTD$Ew2kTv!&Dyf|sm|3~ z9?aX`_q>zZ1zo>`^FAJ*=yOUtAwSXvRy)ri!7q`xIEq>8nMkTd{ J%1nw3)&SG%itGRY literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..52ee7526419541ad01c72db88eea743423e68d9d GIT binary patch literal 258 zcmZ?wbhEHb6krfwXc1xn0!BtgCMG5c2?;qlIc;riLqkJzb8|a8J9~S3XJ=YVt}u z(%Islw+=jiC@>FMd~>+9|9?e6aG@9*#P^Yird^!4@i_V)Jo_xJhv`TP6( z{r&y_|NsC0|NsC0A^sIZa%Ew3Wn>_CX>@2HRA^-&M@dak03rDV0SW*g04x9i000pH z5C8xLh@cRRWNC^Hqpqy#P-BxIN^Rdu6)VgG{XigvGjc>Km?R*{)NFKt2L+SS005e- zrmBHOrD;IXK8VZ!;igWvj9DDfRp4BDAK}YHYN72iQCk%Q^ zl!Xc-WO-k6ukr}m@AYQef`o>H9>=bgx*1DxE=sz%Oi!Zwt4*N4h6tMyCl9-3h>n&L h4=ZCYqhMd3u@Vg) z|NZ;-KN3*+Z^i$R`22jm2hV;ES=76|mD zWOiLzv~JBUk7T9uU)BUXUi|)#Uhd-Vf(k|fW2qR0!#QaT3~Fth+#%~O=!DGJ>Ebqd zLzwoO8s&^ikFleUuhT<`Pgz$hK$}NPnWd|ng`tO;jZ>L*%G7Do V*b6vj&zU=yQAur)3X>v(H2?`djZFXm literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..0323332f30748c3a7d2f7f62663a7e7f0262403c GIT binary patch literal 258 zcmZ?wbhEHb6krfwXc1swWMq_(kkHoFHZ(LeH#fJlv$MCicXf63^70A{3=9eiiin7a zi;GK0NJvXdyMO=we-eS>KT+qR)Wnk16ovB4k_?5Aj8p}8Pu~Cr#h)yUTtGMIFaQC_ zF$}C}3JQHGno1lC*X1;Ja2lQ|@l{#A@co`fi$$#kKP2=dcx4(6=Ge)dQGU!CpfT^p z@(CLkEZP*g@K85Hx@h;|l{s}PBAl-tUYNI-OKIAxmFgWVjE#-_O^r;<^$o4vj7&lw+=jiC@>FMd~>+9|9?e6aG@9*#O^78ZZ^Yrxe_4W1k_V)Mp_xbtx z`}_O-{r&&{|NsC0A^sIZa%Ew3Wn>_CX>@2HRA^-&M@dak03rDV0SW*g04x9i000mG z5dZ)Mf}jwLWLb)o)mhXuNz%h8NHRJL#ckPzSrf*gU<=G3n`G}oX$**?V@8t!{DK6i zQ31(p0N{#*ku6HW=y5s9MZ3w`nR~w8cIWCix9ZND_jquB4}5474Rs6%3>Fzn78Vc% k24)Eg5fqs&6BmjMHw_IA4-cXa4iZch0U{=@BLX1+JM+kqEdT%j literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..129169e4c4d2571b7058ee5e53320eb337c6da5a GIT binary patch literal 271 zcmZ?wbhEHb6krf!Xc1yyWMq_(kdTv;)7I8DG&D3fH@CC1v$wZ*c6N4kb@lS{3JeSk z3JQvdh=_}eOGrpaOG~?d|NeiXf#N?==c3falGGH1^30M9g^-L?1$R&100zaMER0+X z@(el*Kmc+K18cE@LSKre7WWp7oJA6>h5|}!Z2S(JWE--WIJ|kF@k*l0i9tikY@T48 z(@7B_K3?~f-81x>&#k=?E!%ZI#NgqXe`f1>%_4iJF2Dcv^Pk*~*YBN}S-Jgrc(}RQ g8JV(JICLg(@z}ANva+(xoH3KrgG+6JiXwwG09zexp#T5? literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif new file mode 100644 index 0000000000000000000000000000000000000000..fe9bf98f81213acef7c3058ad1b7c1f692c964b0 GIT binary patch literal 1266 zcmV6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW3IP8AEC2ui02lxm000R70RR0%cg~!_g9sCvJBLo-KXc^Bl~ZSK z95`>?GG^qqt>d}YOqR8GuG=EH*tSgt{g0m+p%88rj^1Zjo7YY z+ro*9NSd^`aNE=plZL4gG-0}iX#;mUobB79!D$<&OBl39gCuoNU6~CuO%U==B1D*SqEXk(I3s=J cP2-9YWjHho7&WLM=%9oWN&^&v2ow+iJ5_OOoB#j- literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..210734d1ae36256bd8a79ed76ce04a733ac9bfdd GIT binary patch literal 896 zcmZ?wbhEHblwgoxIL5&6?%lhuU%&qP_3O`{KX2Z=dH??Xr%#`L{`~p*^XC^YUOasG z@ZP<9ckkZ4bLY;32M?Y-d-n9{(_6Q0UB7<)_U+sE@8AFZ`}dC@KfZte{_Weh$B!Rh zyLRo$l`B`TUcGVS#+NT&{{H>@|NsAg|NdRPc=7V(%O_8sJb(WD>({T(ojZ5nz=2Db zE`9v?@$K8U7cN{lapJ_bZQIVCJ$v-%(KTz(738XFsT@7`TiRkdr^uIJC6mz0zoIdUW?Cuh%|J?ZJ` z@$vCDZ{9p}=FFi(haw{*lai96qN3{R>NafHuyNzYw6wI&&d$k`Cr3m?Y~H*%KR$=i-&g(4<8FlJwG2Gm%tPb)`e?WIQayHgoSxU1h|EF@Un`E ziisaMD8VWzB`wIyD=4!?MpjNFm;j89et{x(QB$|<3*w4-C8 z*vQD%FK1^Hv%z7j)>Uq~nlBF+lMnaFDH9bGSRK#Nf zPjj=Nid0m=)eQ{?n^HDNZ;4yL*w!Z|H9;kCQwt{#?_7(ceD@rj`X#-msAMimap}K* zq}_PNx)!&7L9baB3l$%_a=*EJxII1~%c)aHD8r^vXlZksu#U+SA^W?H{n0We8WWA4 zdQ1|M_1M73zA0l7C##*x3IqU%ur;OELm|-)HmUyhgek3 U!K0lT%Vs2r$JHo$C@@$906UJ}SO5S3 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..5e1eafa8544fe30585ff033daf470f998e898609 GIT binary patch literal 881 zcmcK1X-|>?007_@TU$#@OIE9Oe}8{^dU|ql za%N^`adB~Wc6MrN>gecbcXxMUVq$D;%w#f+j*gCxkB^Lu==J*E-rk|1A%nrt)z#J4 z*SEgDE|<%DdU|v^-QeJ0O-+qLq3G}LpP!$%+wBgAqpGS(tJPLiRA@As&dyGWMAFgG zv9hwVwzgJSSlHg)ZZsMf78dw?ep_3cTCJX&o6F73RjE{5E;lnXGc`4p$z*0^WDE=p zu-WW_f`Yoby5ZsB`uh5;tgM!nmbA1qu~;mV$&!}AgeVa04k0}-p4jSY z9R3pydkQ7=s`keCKyL0n?hOr~CxJ+6#`*feZ6pL4B9mVt{k;MLgGewjm;eV-z@Oa; zLpSJ0)e&eRFeUUf3Tdz!&{$e11r7-#P|r}q(Gr_djSaOE!Xg4fBRMh9XGXEI6nz1e z(-@+W;v%w(=)Y7NPdJu{Hnyf;$HHgt{-E1S%CPwJH>9nJ0JG#h{l1F&^vetuf9{c> zmiLtjg5eMp6y+3)FqiWMpPxMlf9(%bts{))sIfpVxG7S>_o_p%jhXa9Nv9~+6%ML{cMYU9`%oI_W;gGqU8d=AB(eJn2|ev-tb)k)9g_h!TRVlCW_Q(F5a=k zI>{+@$vEc`uhL>|M&Oz^z`)g_4WDr z`RwfM`1ttn@bK&F>+0(2{{H^y>FMO;(P zot@Fq(Ug>wi;Ihbf`aAc< zxc~qEA^8LW3IIOGzF4FD7sZx#-BdWlsH7ZPt684VN~7G{Zh zM+qAm6b%_1j2RmWX-XXd7akW493KxLAtDDIrAQqKA|W6TA0reQBqaz81s%r6#sv%r zB_tUXBPJG~83YOn1=-r!*96oSCMOao94ILa*XimC3@PL&5+^DWD=a8P2l@K@O(-lY z5>&L15W+=>2VBS~T!`R7!4MK!ydY>Wf|o5AGZKjKP{Ios6b}+e(IAD%lO+i_G$;W^ z3>he9gs@<8!pW01Q&%?S>wT5W(4#E8*PeDt_MySDAy LH+uLG5(EG{D=Q{+ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif new file mode 100644 index 0000000000000000000000000000000000000000..1095ed75835d5e2e636a487c8e45c59c2100931e GIT binary patch literal 859 zcmci9X-|>?0KoAFBuxbsfk!-0@ZQX_a?C7Q9$cG8Xii_~Cg!XcZf?0bdxZh1SPLy% z=&W#>QF-7j@(vY5!GrR`6BsBiQ*nUTl(H|;?<4&GR5~T*1``WlfiVEs-QBg>Y$qot zr>CcTdwW)^_3-fU=;+99w_7Zh?d|QYt*woX4THg;*Xzw@v&m#K8jWhTdSPKyKHlBky|}n2 zlgTD0Csis{Yip}iDxH{^sIRXd8yn;E`Et2@U|^u4qN2aQe`jZ>w6wIZuWx^Uzo@9F zx3_n6bhMzLU}R+E?Ck8|;2<|QH#0LcB_)MIp`@p$E0sz*onBmA+}74MJw1JVeB9pN zo|Tm)kw~;!ZE9*Nm&@hxcw{nJBoc|mVk(tdSXjtpGKoZDL_|b%bTos(;BYwSHU1mI zF%04Yuz*XzxqnXpCwn=I1wfz8w2wDVhVtzLRp_5+oZ8=0i3`A^QG`I> zd7Qy$P@@6}pYTCA&tOmehQ+XM#s!6h62ih!R%>WW400sN8H1v=ML z+0~$L&NCg@)U4p+Qp6=)P4cJksC=ndEPSte9U0fct<^t)*Im!MD;)0rkoFdxXPm@0 zQz}rz)SRB-FCQ~n!J4<@cN`Qy{9-|vM)`Gn!6o)#vb@V6Lik6+vA>2TI{>7YblFU6 zU@F{^36CDw2*OV75D6NkuFa6S3kfKLKe_ z%69W1CaZ-7&M)z_TLR#I{wt2fbT2MjC!{-urP*)u0z5U V%adcWgGD;FYhjZdWW%7q&A%!S+Qa|= literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif new file mode 100644 index 0000000000000000000000000000000000000000..06e8795df83e26a662cae80f64c2e1d515b658aa GIT binary patch literal 434 zcmZ?wbhEHb6lM@+SZd0^$jGRxt7~FnVq;_D>gwv}=jZS59~l`L6%`d58=I7rl$x5F zmzS5HpI=y5SW!_?TU*=E(9qS@)!W-UXU?3pYu9eruwnc5?R)p`J$CHanKNfDT)1%M z%9X2EuU@}?{r2tKckbM|d-v{x2M-=TeE8_mqsNaQKY8-x>C>k#Uc7kq>ecJluiw0R z^X}cd_wV0-`0(NL=g(iheEItI>$h*;e*XOV@87@wgn;5dQRkx6#FEq$h4Rdj426)4 zR0VfW-v9>1pDc`A4E78<3_t+#ECbs%hu#7Y9Wm#XONv(V2$~zuD)Cx+(#(aYr|o6c z-Yt@9#%qpbw6|2PTbMwn6kjxN zYrlyB-z085lWDy(^tmT-=+0l*7o^28iA`sIf15JfBo+-5!Rp{@8J0=Ripnb5YRanW z>M9DdGR%{hq-A8}6qFPXom5t4n#9BS;Nhc(tdpd~h528-e#0+Z;4CRF_T}q0G4T|) J-@hFhtO2QD*FFFM literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif new file mode 100644 index 0000000000000000000000000000000000000000..3c02fcbe8108d22d3f08a7ddc9b8f1faa41f049b GIT binary patch literal 423 zcmZ?wbhEHb6lM@+SZczctE+2bVq#-s38ylOHl$4s9nwOWC zpPye?SXfa}QCnNv(9qD;)z#bEJ7>^XJcBzI^%m_3O89-+uo5`S0Jq|3m=Af1=Jssfi`2DGKG8B^e4K8L0~H zp1uJLia%KxxftvjbQpjDOBeYcI39vA`l}=3XWRC1ovDB^5O_WqBECrd~!VX=zz` wMTPDAl$02Ixf!lryMB$OS5i!f@BV{_d_o1z5@Mn+U%eI;OL6<~!I8ll0N`fX*#H0l literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d93973c7505f2131fabd7acf496ca8dfe2831f4 GIT binary patch literal 401 zcmZ?wbhEHb6k`xzSgORJW}BvFm#$`)p$V;YLi?bS*W;ZU&Z&^{$ zva+asb$R#t+DThmXYT$_GobiS)VU}%u_QG`p**uBLm?z1Rl(iUH-JI$CkrDNgFS-| z0}y~b%fL4EKx=`Aj+D5lYsSeOtJz%{ClWMd*4@xC6YSCwSSR#Rp1%^mj( zwzE$O^RoJ}$L{^lidTw4(z4PLZSC#NEe%2vQW7E)Cry;>laXo=6qgVanm2#GSes;n zu!NA{%2lfcg@iNW6eak1wr<^!1ew2ZwfsOgx`3o1BOXIFy NyB_F%%iWQ|8US3+%bx%M literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..18fbae08abdd234f3edaab5957f2d1bc2464bf9f GIT binary patch literal 395 zcmZ?wbhEHb6k`xzSgOttomLT(UKO4{BcfndMB%K+!r4*9a}z3;B-boUu34T^yF9aT zb!O9=y!H)+U7L!!HrGtvRWoHz+tdw>GxoR5J<>k!Xvh3x-3yO*FFet^ADQ1SrMJIEN7$>PXJFbmd-Oh4|<;5(6 zi5n_(+6=^E@-tbocHe*7pFYX2&qH})-TC{`uhbN(6l7c5+L{#VV?E^+CnqB#CAMJULMa((kp^)IG0`<^*NKYBh&S+V-L`#)piBcF|Bn4zcQvpvF&{gA e;us4nPXp`u3l}f3a+da7zj3q2{f@gMgEau2FxRC3 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..334e8e4a4012339ba53232d6a285ae6ef4809d8c GIT binary patch literal 592 zcmZ?wbhEHbvGo z60T+Js%RFaW$LbF>aA)Xp=1%OY#Fa?nV@2oq+*?XzDDvBH*}6qrf!B8Tp4}R9JQjxzA5xR%Ha&Uj zq>4DF@r8>QlttMMuiv;XFT|>U@BTemK@QEfXKhjf){gw+9 z?&0C#@$vD>%F5c>+WPwX*4CCzr`z7%)@U?JrE+d=Zf0g?dV2cHmoHkac5!iWVPWC( z=g;Hg<5N>pv$L~mwfgAj=-}XBe}8{(Z%?ICjg5_sjEszqj!sNW?Ck8EoSdAVp6c~_ zg+ehrJlxmUH#9UfI5;R23O{}Nw7Iz{m&<#5dm9@YWipvmDy^-p?eFgwi^U&5eypsl z?Ck7ZUS8&KINjad9UUD50|Ujy#qI6wJv}|Sxw&m^Z32OS&1Sc@w!VM=p21+Ww6rWO zE!EW2(CKuEL{eQ{{qW&K9*-9vA0HhZJvlkq)zuXq9!{gts;a6YA|le$)A@Y<>({T} zy?YlI7gthJLZwpc>+6$}lA4>F6B82y0s=fdJpBCpqN1X*va-Il{9o*K5D*Gr0?xoU z|2+ZVdKQxjfDFLdIk`{s^79NpKqeCcg~1U>lpz}Pvb=)JtH9!_v1mMmX@o`_8vl)i zLGd3N1x?KY6xzhp%nWC4fiaWfV3w9v*0RANxk7#hcGkw$1cx)R6WI~$i4G+7f*L~7 zXco0v;u-8YN8!2iSQ{rhB$4ExKh-1h@lJTI=rI^k>aP%qkY?CBFQ}r-Sx=^sZ|p$I zCJ|`_L^M&A6losPg~oMpVMV(cV`BQ#bhjh`aDgV|Y|PlQki+_%#$?hv&s zRge@70TEwJ@WkGQwzjl`gJk=^ve3^QybFuj-~ZmnAwNJQE3=C%Z5aUB$f36g2K6FQ zWsKbdNL{p`{3kabHq0Ya;sT1Le;t04P-p&}bv0Sp^`~k~mWoIql5O#<5N^xv@^w_~ zP)2*|{%stMa)m7MpLZZT`cu5P?MHh72uaatM@Bly*ik}R7v(%(3S{wx1{Uc1bF3ie zXEB-Z%PBEzLl$3>a>I4gGa)d9j|7|3H9TlA%V|EFlrhn7U>am8hTn8ounj97$ys2` z{d-lHgWaFqE4;FoqRPk6@nY;H`Ub=_bfcAU9c@$U^|Z)sS)(cq{+S}exo+U0reQvJ zyKq6*bn1f8E&qiAY_-*Oj0XoVHN8DT0iiE7l`XzZxuay2Gv>dZFUK_80->BjLLQs_ z5(DyrUuclC$v+&HJpq>lA1=K@M-n{2c69s`^Ist#D2fm=CxUn8boqd5-hOw(NgNr% zgdv8=|5MEkm0=cN=OU&JB!DmTRY>Tiod!*&v9CCNV$ejnPA0~ba^tFmZ J7$X3;e*ud$MqB^@ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..48197cbfc95cfa847e9b5432223480e39a9fb037 GIT binary patch literal 61 zcmZ?wbhEHb&DdE=@ K4zq(97_0%fpb(b; literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a294b49843c37d90d1eb276cd24f110199027e9 GIT binary patch literal 1057 zcmci9`%}^f008jsgZEe9E28;or^^}+pu`~Ci{t*yPiz0J){uh;8#yVuv(*VfinS66*LpUdT1T3T9JSy^6Q-re2x zcsvUW3$wGcPN#Eze%|45OioVD&CN|uPtVNE*zNX_k&&sXslL8GgTY|6THD*($HvCY zX7k3zMngk`$z)O}6h@}*4B=Wj%u}9fj}@gIJmgD*xTD%RaG@G zFre4#)oOKFS=spbxJsoeDJfAZl|@BG`T6-A4yUlN&|=Nq`VY1pf8k34lKo355U%-IUeKZ{7YL1nPtk3}dhm4o@Kd*woyjY$hQpgct+~ zF->^r0S3bKKh-?bYG4AHLLDW+BoslZI3O6bSf_1v`(0WHeFCL~l2LjX30`;L zA;}`ANUsNSP>dwV%AEmVV%D{$mn=4pdW_3p_+~C(q110zIt5Q95baocIa*q0lvBdP zk{GAdU(b=?hgpJi_pcIh2%+U6AL2;q@fXsWHTT6XO;B>%<=eV%R%wU$ce;6ZS|L){ zm6A45j89aeNeIVK4*vWNB%+@Mp6HDnH=RO@X~=JUg2^rN6Vm{=Z)u;J$xfM z%2?%Zct2Yv#Zl=mBY&wf!+&gByH1?^S&TiZP4IjBS^X3-`PGXhkBas7@C}y1PfrbK zL2Ab6JV>Au20g;VG)C!-2$56F%Q*0gaA(_`UYM3e@Jil@D-Fc6m0mqH)6O#x6Sxz$ z6mjPO@2Y3N%x_K$Bqx`gAgW3h3c^9rS*Z4a*QsULUT+6%o{9?OjZKKci6 Cv>3bq literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..65c0e4efa2eee295b707c36b99fd0cea25db3cfd GIT binary patch literal 1095 zcmb`^iB6ga007{h;|JuJC>~%vt46CPV~bTgyGB&-SXE*?8dDXbv#y$Glg^RNAf&d$!^;o-^2$?56o)z#I(!NJzn*2c!h>guY&V9@LJdwYB9>+43N@$Bqu zVPRo*c6M=bacymFX=!PGe*W_E^7#08dU|?ta&m5NZhU-vYHDh1Y;1INbYNg$WMpJw zVq$l9x3{-o5}8bX zJtZY2-QC@ro0}$+iOpuOtgQ6)^+~1Df`WpsuCAGxnby|U+}zyG&Q66wvAn$8(9n>X znJJgc#bR-4YN|*iN=!_QiHV`nXz}s!8jYr|t}ZGnDladuv9VFB)iyOXB_}7hx3|Z} z#`1VPKA%seQtRvMo12>>A|kS~vY1R}KtO=6udlzqKb=nJa=D-XCvInO2pT8?{D6P` zcLE@TcV9Kf#~Q0sx?D;656o3vc94L z?OkUHZr6z}?jD}d4ZZRF^n!%Iy3q<{u5u+D?-c@&8K~-Ftfk8_ArNqQYGvW|Hl&3a zj<&@>v+*IV9%>AfUhA)Z`CAEqO%fAZAfUj~E2V=4aaRoiAy0osksoJ|)kRWO9J8D% zAh_Hc)R7guGK?p~W=8X4Ln$=9ufQqTj>gA;5AuZ+MHued)lDC7fL{A?vCAjgIP!}$ zFC9Sp^fc+8sBqGthYXG|tkf{@B4P4+F&*-65>I{JKw(Uo&NEDBz#?4_1&8nw^3#rXEv4; zD;`9+e<>H(7a6H%`-bs`z*Z5;$`mHVB3~L6JT#5-2`LeWe!lt}>_}%53Wed1oLyVs z7VjoY|AOObL^lF~9x37xv%KT1_?6A!grF)R6iJHCW)^!&P9OCZRYB(b9&aClO!W~uy-nUE#0pmifs1aVd zH)`1N3G}S03^a?vBJ%KZgzsGn)s|Ao08y~i{3jg0gs}(JKOjy+;n@2!9GJ|gEG8tu zTObyWx%B6-S4kguus3NbpCs?TA#cDiK@1);CD)9!Pi1`t1)b=!hsb7?&sO6fniLAG ggS`h5nUP#BF+=EPYF66im|9e?nJN+&4h4e$0bxueMF0Q* literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif new file mode 100644 index 0000000000000000000000000000000000000000..c8257c9336081212c4a2048bf8945e8a62dbe095 GIT binary patch literal 695 zcmZ?wbhEHb6lM@+IF`h~$jGRzt!-vz=IQC_<>eI-5fKv;6CWR+nwpxGm6el|Q&3P) zSXfwET3TLSUQtm|Sy@?KU0qvSTUS@t(9qD>*x1z6)ZE~S3{Qdj)-@kwVX$BPki8>dhCYGe8D3oWGWGIAWq$;?3`UWs4 z{$yd~VyI`(VE_V9WHGS+Zg6aBZfR|6@ks3I@@Q{%PV^6niirsIb#v~s^Ypd1Szzz) zZP#w$;%F%;AtG#L;Ot`N&|+@vXdo`-7r575)5+MhMbk!`TRJ2*J|RBVP}@e$zFE#g zMld9f;SNKWjEA&UGk>_4aCG9`dx>IUd?w8TuJW95ukLoqyKw6_OX|eM1Z?q}*qyA) zHg|(TYs(^?Sh3bjC&i}yj(lD|fr^0>Ckb-69FgAAE-1W5fKp+6B8dFpPHJQm6er~lT%PoP*_-4 zT3T9OUS3gAQCV48U0q#UTU%FG*U-?=*x1_us#N|7i&n|A{&mr6!i7rYMwWmSiY|WTYy%d-?`2DE?$& zT+*yc1rLIj*Jcu@o{zPv-R+?vtD55=VjY& z?(AS8AucRrsqf@$YTsgJQ1+4D6erdzl$8l?H37h&RlxU654uVU%GVrHcF%{YMLV0wV~kQ zu@t73nr5j96DBpq2??@0ZIND*#K58EKhI_1r<9ZJjDmhG(oY_{FtR9TDO?OxVq|1f zND5FsviN8dBO?QgKtjWzb}<{CzYhc#v#@gu>J(@QHnXpFwktYQaPZL49vN%dPE`>O G25SKR^n#oK literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..03099a95beb14fda976d94f0e99c9f731d784a4a GIT binary patch literal 383 zcmV-_0f7ETNk%w1VHf})0E7SlkB^U8Sy@lqv+}zaE)YaA1-QC^L(9qJ- z(%9J8>+9>**4F9i>CVp1&(F{2=jYAM&CJZq(b3V%%gf^8;>ya(-{0TK$;rsb$l2N1 z|NsC0|NsC0|NsC0A^8LW3IHDfEC2ui02lxu000I2;0FYOV4i470-qQRL?O>~O$-4W z7zaZ9z@QLuFa$n=gkr&HI-k&mA|XH~5)FrT%k4IH z!jnqE!teY42^AA~dVhv~frCgB7Z4bakdcxQ7m5NE84@*{G!hvVVHFw^3#F!~s1q8X zNTL-6u(7hUu3;Cev$?XO7q+Wcz`??S8ofxjdc(@Z#sbL8%DleG(81Ejztz^o)7sn3 z&)!$p&e`JR;pg1g)ZXak?(5|h3ibB)_~e)py8WK4ml`z~NU)$mN&qVeG{}%3!cY|; dpqh9JLWP78H)!0*v7<$dnmBQiaIs1V06RaL%(egk literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..abec6aba4065b31d079ac302b75f746ea01425bf GIT binary patch literal 878 zcmZ?wbhEHblweR`IL5%RZQHie(o#P^KN}kxYisMCo}S>~;C1WPJ$Ufo^XJd^@893L zb!&8V^u>!8pFe;8=g*&i|Nd20R<2yR^3I(*KY#uV4Gq0;;liz3x2|8m{^Q4wzkmM* z1_oZbbm{BYuVGtNKY!@Zp(96*eE9GoJ3IT_xpM~(9z1;b@WY1>U%!4`SXg-Az=2nH_V)h%{^`@F-?(vO!GZ->uU=iTV#Vdl zmrtEKb^7$_|AQ4M{$yd~VyI`(VE_V9oG`HeYpAbhU}R!u>FDfYVP;}vXli0*W9Q)H znlW=07bgch8*39c4=*3T0RPHWtC#ch@$zuj3knHyhzRW5wR@Kchp>=fy{MSDgrwA- zQ&N%=;$oup(&92QvQjs0-nuD!Rb0AWPF!9=QDn^v5k&=gak+XWWffI5b&>Bseu}88 zsj4U|{acVR!Rcrh3x}|l&kiToE;fyS8!{d~YGsy?FwQ#j;z4V-n2t)&mK_^aj`hhq zADdvmUL=P=3y6JDdUtQKZ>2%`Xo7u)<}45dC?`qk@jFh;p2Wj0qZoMh``0G zuC6u>^O>=cxuwtE#_r7l!-dC}ZMIc=aN}bm`wjjxc4dD87?!NNyW2tJ&y9zRbt6_- zH*p+v*s&pz$EoSfi&xXw6Ard3tH<#y`uOoHHU7eNzP~DR6ZVO t($(15BIFUW_(9WEg~SCyx+f+v3457bIMgbUwjz<)%V6Rm`9=l?YXE=V{FDFy literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif new file mode 100644 index 0000000000000000000000000000000000000000..2c223ba2c5b33349fbfcbb190514a12e509ca641 GIT binary patch literal 907 zcmV;619bdHNk%w1VF&;m0OtSz000010RaL60s{jB1Ox;H1qB8M1_uWR2nYxX2?+`c z3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW3IP59EC2ui00;ma000PR02>J$*yvxue+Uy6L*9cu3(LO&Zi^&6_J*h8(#OqeOxS6KV|z06QqPvt9rI literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..77ef8a26cf38d0e93d659a05c3df411e58b92844 GIT binary patch literal 238 zcmV+9?4>gws~>FDU_=jZ3<=H}()<>ch#;^N}r;o;!m;N#=t z{r&y=`uh6%`uh6%A^8LW3IHDfEC2ui00;mb000GRARvxoV4kL+uIk{vE+NlEVchtA z?EHZwz#vdTEGia^q>|BSI-8D%bozi;uhxiU%au&N;4h^@E>|q*H2T7BvoY{EJVUS3 oHTXP!!|(GcfPsJz5ru{kOixV*MnwY!kdXxdEGrzBn3o{{J2nxI=>Px# literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..3179b87ad945e5f2dcf9cdca9502db25210d127c GIT binary patch literal 927 zcmV;Q17Q3|Nk%w1VF&;m0OtSz000010RaL60s{jB1Ox;H1qB8M1_uWR2nYxX2?+`c z3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LW3IP59EC2ui00;ma000Pl0Hp{VIIvl^g9xQ;YsZk`KZOk)O3}uy zV#SBl%4yVyaU(}5)X0exiE$)JkS58MG}+PP!))kc#(XJrrb3GsZ{mE&&7Du555dhF zIy5NJqEf)oTe>tT)233&-J3e~p;W5(9-70)m8;gSUZrdW`w(5evuCaTTgx^e06U9b B#1#Ml literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..be01e4a72a8b42b09db402fc277f589b0d70472b GIT binary patch literal 405 zcmZ?wbhEHb6krfzSgORJW}BvFm#$`)p$V;YLi?bS*W;ZU&Z&^{$ zva+asb$R#t+DThmXYT$_GobiS)VU}%u_QG`p**uBLm?z1Rl(iUH-JI$CkrDNgFS-| z0}y~b%fL4CKx>kRj+l7&grbu%S`!u?VR>>h!${bz*`Pv=pa1;w!v|BO8}vl>d@M1M z;A|EQsF$C8jxD+K% zGp9~mIBQz@(nYJgE30eg2e9%<$>tXpGj*|XN>)jTOYrkE@8b{Q*^03Wu^?*IS* literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..0bb39e91ff7ee2c8b09a62d347ff3f43a60906aa GIT binary patch literal 399 zcmZ?wbhEHb6krfzSgOttomLT(UKO4{BcfndMB%K+!r4*9a}z3;B-boUu34T^yF9aT zb!O9=y!H)+U7L!!HrGtvRWoHz+tdw>GxoR5J<>k!Xvh3x-3yO*FFet^=&HCapYpii?TSiTqRjKvHH^T=E_#dj)v|Q+5XPP zoZcxDx|$|Woj7;q{5dnKW=)&4X!i7qWsBGJRMpfi2w)eGS1KqfVd>`Nk*k)KmJt+W h?dISX7CR>*E+fOk+2ng&Eza$>i-*vi+l-D3)&P^L))oK& literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..cf03d7f3252ef7a58776d9b2d7da4caf7b31e9ad GIT binary patch literal 587 zcmZ?wbhEHb6k_0JI2O&oB`CuqtRNsP!6Tx`E2_*Vrphm_&M%=UETt|ett%;`BqVDn zqF^SbY%Qi@E1~9~sH(4^W~iuPBBkXnt?i+#ZLXnXtg34xtLH1L?=NQvGo z60T+Js%RFaW$LbF>aA)Xp=1%OY#Fa?nV@2oq+*?b0VW&2h)`7>6C(p{ z4K)>Id08nw2CEPkGaqkHXM0-> kroc.tcl - Copyright (C) 2004 David Zolli +# + +imgdir = File.join(File.dirname(__FILE__), 'kroc', 'kroc') +$images = Tk::Tile.load_images(imgdir, '*.gif') + +if TkPackage.vcompare(Tk::Tile.package_version, '0.5') >= 0 + $TNotebook_Tab = Tk::Tile::TNotebook.style('Tab') +else + $TNotebook_Tab = 'Tab.TNotebook' +end + +def kroc_rb_settings + # Tk::Tile::Style.default(TkRoot, :background=>'#FCB64F', + # :troughcolor=>'#F8C278', :borderwidth=>1) + # or + # Tk::Tile::Style.default(Tk.root, :background=>'#FCB64F', + # :troughcolor=>'#F8C278', :borderwidth=>1) + # or + # Tk::Tile::Style.default('.', :background=>'#FCB64F', + # :troughcolor=>'#F8C278', :borderwidth=>1) + # or + # Tk::Tile::Style.default(nil, :background=>'#FCB64F', + # :troughcolor=>'#F8C278', :borderwidth=>1) + # or + Tk::Tile::Style.default(:background=>'#FCB64F', :troughcolor=>'#F8C278', + :borderwidth=>1) + # Tk::Tile::Style.default(TkRoot, :font=>Tk::Tile::Font::Default, + # :borderwidth=>1) + # or + # Tk::Tile::Style.default(Tk.root, :font=>Tk::Tile::Font::Default, + # :borderwidth=>1) + # or + # Tk::Tile::Style.default('.', :font=>Tk::Tile::Font::Default, + # :borderwidth=>1) + # or + # Tk::Tile::Style.default(nil, :font=>Tk::Tile::Font::Default, + # :borderwidth=>1) + # or + Tk::Tile::Style.default(:font=>Tk::Tile::Font::Default, :borderwidth=>1) + + # Tk::Tile::Style.map(TkRoot, :background=>[:active, '#694418']) + # or + # Tk::Tile::Style.map(Tk.root, :background=>[:active, '#694418']) + # or + # Tk::Tile::Style.map('.', :background=>[:active, '#694418']) + # or + # Tk::Tile::Style.map(nil, :background=>[:active, '#694418']) + # or + Tk::Tile::Style.map(:background=>[:active, '#694418']) + Tk::Tile::Style.map(:foreground=>[:disabled, '#B2B2B2', :active, '#FFE7CB']) + + # Tk::Tile::Style.default('TButton', :padding=>[10,4]) + Tk::Tile::Style.default(Tk::Tile::TButton, :padding=>[10,4]) + + # Tk::Tile::Style.default('TNotebook.Tab', + Tk::Tile::Style.default($TNotebook_Tab, + :padding=>[10, 3], :font=>Tk::Tile::Font::Default) + # Tk::Tile::Style.map('TNotebook.Tab', + Tk::Tile::Style.map($TNotebook_Tab, + :background=>[:selected, '#FCB64F', '', '#FFE6BA'], + :foreground=>['', 'black'], + :padding=>[:selected, [10, 6, 10, 3]]) + + # Tk::Tile::Style.map('TScrollbar', + Tk::Tile::Style.map(Tk::Tile::TScrollbar, + :background=>[:pressed, '#694418'], + :arrowcolor=>[:pressed, '#FEF7CB'], + :relief=>[:pressed, :sunken]) + + # Tk::Tile::Style.layout('Vertical.TScrollbar', + Tk::Tile::Style.layout(Tk::Tile.style('Vertical', Tk::Tile::TScrollbar), + ['Scrollbar.trough', {:children=>[ + 'Scrollbar.uparrow', {:side=>:top}, + 'Scrollbar.downarrow', {:side=>:bottom}, + 'Scrollbar.uparrow', {:side=>:bottom}, + 'Scrollbar.thumb', {:side=>:top, :expand=>true} + ]} + ]) + + # Tk::Tile::Style.layout('Horizontal.TScrollbar', + Tk::Tile::Style.layout(Tk::Tile.style('Horizontal', Tk::Tile::TScrollbar), + ['Scrollbar.trough', {:children=>[ + 'Scrollbar.leftarrow', {:side=>:left}, + 'Scrollbar.rightarrow', {:side=>:right}, + 'Scrollbar.leftarrow', {:side=>:right}, + 'Scrollbar.thumb', {:side=>:left, :expand=>true} + ]} + ]) + + # + # Elements: + # + if Tk::Tile::TILE_SPEC_VERSION_ID >= 8 + Tk::Tile::Style.element_create('Button.button', + :image, + [ $images['button-n'], + :pressed, $images['button-p'], + :active, $images['button-h'], + ], :border=>3, :sticky=>:ew) + + Tk::Tile::Style.element_create('Checkbutton.indicator', + :image, + [ $images['check-nu'], + [:pressed, :selected],$images['check-nc'], + :pressed, $images['check-nu'], + [:active, :selected], $images['check-hc'], + :active, $images['check-hu'], + :selected, $images['check-nc'], + ], :sticky=>:w) + + Tk::Tile::Style.element_create('Radiobutton.indicator', + :image, + [ $images['radio-nu'], + [:pressed,:selected],$images['radio-nc'], + :pressed, $images['radio-nu'], + [:active,:selected], $images['radio-hc'], + :active, $images['radio-hu'], + :selected, $images['radio-nc'], + ], :sticky=>:w) + + elsif TkPackage.vcompare(Tk::Tile.package_version, '0.5') >= 0 + Tk::Tile::Style.element_create('Button.button', + :image, $images['button-n'], + :map=>[ + :pressed, $images['button-p'], + :active, $images['button-h'], + ], :border=>3, :sticky=>:ew) + + Tk::Tile::Style.element_create('Checkbutton.indicator', + :image, $images['check-nu'], + :map=>[ + [:pressed, :selected],$images['check-nc'], + :pressed, $images['check-nu'], + [:active, :selected], $images['check-hc'], + :active, $images['check-hu'], + :selected, $images['check-nc'], + ], :sticky=>:w) + + Tk::Tile::Style.element_create('Radiobutton.indicator', + :image, $images['radio-nu'], + :map=>[ + [:pressed, :selected],$images['radio-nc'], + :pressed, $images['radio-nu'], + [:active, :selected], $images['radio-hc'], + :active, $images['radio-hu'], + :selected, $images['radio-nc'], + ], :sticky=>:w) + + else # tile 0.4 or earlier + Tk::Tile::Style.element_create('Button.button', :pixmap, + :images=>[ + :pressed, $images['button-p'], + :active, $images['button-h'], + '', $images['button-n'] + ], :border=>3, :tiling=>:tile) + + Tk::Tile::Style.element_create('Checkbutton.indicator', :pixmap, + :images=>[ + [:pressed, :selected],$images['check-nc'], + :pressed, $images['check-nu'], + [:active, :selected], $images['check-hc'], + :active, $images['check-hu'], + :selected, $images['check-nc'], + '', $images['check-nu'], + ], :tiling=>:fixed) + + Tk::Tile::Style.element_create('Radiobutton.indicator', :pixmap, + :images=>[ + [:pressed, :selected],$images['radio-nc'], + :pressed, $images['radio-nu'], + [:active, :selected], $images['radio-hc'], + :active, $images['radio-hu'], + :selected, $images['radio-nc'], + '', $images['radio-nu'], + ], :tiling=>:fixed) + + end + + # + # Settings: + # + # Tk::Tile::Style.layout(Tk::Tile::TButton, + Tk::Tile::Style.layout('TButton', [ + 'Button.button', {:children=>[ + 'Button.focus', {:children=>[ + 'Button.padding', {:children=>[ + 'Button.label', {:expand=>true, :sticky=>''} + ]} + ]} + ]} + ]) + + # Tk::Tile::Style.layout(Tk::Tile::TCheckbutton, + Tk::Tile::Style.layout('TCheckbutton', [ + 'Checkbutton.background', # this is not needed in tile 0.5 or later + 'Checkbutton.border', {:children=>[ + 'Checkbutton.padding', {:children=>[ + 'Checkbutton.indicator', {:side=>:left}, + 'Checkbutton.focus', {:side=>:left, :children=>[ + 'Checkbutton.label' + ]} + ]} + ]} + ]) + + # Tk::Tile::Style.layout(Tk::Tile::TRadiobutton, + Tk::Tile::Style.layout('TRadiobutton', [ + 'Radiobutton.background', # this is not needed in tile 0.5 or later + 'Radiobutton.border', {:children=>[ + 'Radiobutton.padding', {:children=>[ + 'Radiobutton.indicator', {:side=>:left}, + 'Radiobutton.focus', {:expand=>true, :sticky=>:w, :children=>[ + 'Radiobutton.label', {:side=>:right, :expand=>true} + ]} + ]} + ]} + ]) +end + +Tk::Tile::Style.theme_create('kroc-rb', :parent=>'alt', + :settings=>proc{ kroc_rb_settings() }) diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl new file mode 100644 index 0000000..73548ac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl @@ -0,0 +1,163 @@ +# kroc.tcl - Copyright (C) 2004 David Zolli +# +# A sample pixmap theme for the tile package. + +#package require tile::pixmap + +namespace eval tile { + namespace eval kroc { + variable version 0.0.1 + } +} + +namespace eval tile::kroc { + + set imgdir [file join [file dirname [info script]] kroc] + array set Images [tile::LoadImages $imgdir *.gif] + + if {[package vsatisfies [package provide tile] 0.5]} { + set TNoteBook_Tab TNotebook.Tab + } else { + set TNoteBook_Tab Tab.TNotebook + } + + style theme create kroc -parent alt -settings { + + style default . -background #FCB64F -troughcolor #F8C278 -borderwidth 1 + style default . -font TkDefaultFont -borderwidth 1 + style map . -background [list active #694418] + style map . -foreground [list disabled #B2B2B2 active #FFE7CB] + + style default TButton -padding "10 4" + + style default $TNoteBook_Tab -padding {10 3} -font TkDefaultFont + style map $TNoteBook_Tab \ + -background [list selected #FCB64F {} #FFE6BA] \ + -foreground [list {} black] \ + -padding [list selected {10 6 10 3}] + + style map TScrollbar \ + -background { pressed #694418} \ + -arrowcolor { pressed #FFE7CB } \ + -relief { pressed sunken } \ + ; + + style layout Vertical.TScrollbar { + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Scrollbar.thumb -side top -expand true + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Scrollbar.thumb -side left -expand true + } + } + + # + # Elements: + # + if {[package vsatisfies [package provide tile] 0.5]} { + + style element create Button.button image $Images(button-n) \ + -map [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + ] -border 3 -sticky ew + + style element create Checkbutton.indicator image $Images(check-nu) \ + -map [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {active selected} $Images(check-hc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + ] -sticky w + + style element create Radiobutton.indicator image $Images(radio-nu) \ + -map [list \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + ] -sticky w + + } else { + + style element create Button.button pixmap -images [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + {} $Images(button-n) \ + ] -border 3 -tiling tile + + style element create Checkbutton.indicator pixmap -images [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {active selected} $Images(check-hc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + {} $Images(check-nu) \ + ] -tiling fixed + + style element create Radiobutton.indicator pixmap -images [list \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + {} $Images(radio-nu) \ + ] -tiling fixed + + } + + # + # Settings: (*button.background is not needed in tile 0.5 or above) + # + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label -expand true -sticky {} + } + } + } + } + + style layout TCheckbutton { + Checkbutton.border -children { + Checkbutton.background + Checkbutton.padding -children { + Checkbutton.indicator -side left + Checkbutton.focus -side left -children { + Checkbutton.label + } + } + } + } + + style layout TRadiobutton { + Radiobutton.border -children { + Radiobutton.background + Radiobutton.padding -children { + Radiobutton.indicator -side left + Radiobutton.focus -expand true -sticky w -children { + Radiobutton.label -side right -expand true + } + } + } + } + + } } + +# ------------------------------------------------------------------------- + +package provide tile::theme::kroc $::tile::kroc::version + +# ------------------------------------------------------------------------- diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..e7a140dede3b77dc0be6ff24ea030d6cfd48efcb GIT binary patch literal 522 zcmZ?wbhEHbRA5kGXklRZ4+PJ4eVS*M=_2ueSLFZ0sgGva{om&Me@F2DE$;vK#ediw z{eP3=qeTJ#4<`NJ6Z2@E$A@JOm-}olPjdUP!tK!<7Y2wSAcL>~#h)yUTnzFIIzVMW z8x{WJ#?fedcJ&a9d4O>+fI=QCfsoxS(Okk2yytD%EstkhxM8|--~ICECPn^l_bqL- zxXpZ~_wwa@!azJ70ddua07tJAdp&v?RdBTsfxo5chLjw!mAcXq_EaWx+g=sxP} z%ocab{3&Crv`B~Ol}!g92)QUq-o3f`%UR(w)0dhw1s`3SHZRn%=v=ed3iXYgJW<~= z*jEL}I4)sRtrT-RxVkV)z~s!Y1s6k-{{G;tHP=np$UgJa!`VWeLbAHf2UdOwTEHaQ zwZH47&SMSXW6Ybo}LzC^VoN0r*SH`A_Idp E0A4Ba@Bjb+ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..78b506ddebf2a392e1310f849726a8d4243ee212 GIT binary patch literal 554 zcmV+_0@eLTNk%w1VITk?0E7Sl|NsC0=DPBpHvhU=|F~2CzF*>+KL4~w|G{Ga!)4;4 zQ2(+)|F%tOL>Tb1TmQUV;+{zGra=F;O4E)#(~?Hwo=WhjM&g`A00030|NsC0|NsC0 z|NsC0|NsC0|NsC0A^8LW3IHDfEC2ui03ZM$000I4AP|gXX`bjP1OrhR2Z0!F0uRbE zyt{G?HpYw52rz&K2EleHI1IYnE?LOQXv3n8iEQSMzUkp%oe7~@LSaKV3oZsz3q>*zkyVk442?fMurETKt5hd zpjHo9b)`@)3W`>mKoBtw5mRTR5;La-6ETZ`WIv0_G_R5eT5yuKnNr6~lP@k5q;XJU z1A7Zi5J$)1R1{+h5teWaOiMnascW>%gzq*4^?|9(_m)&}M*|*=2j@VY+lR}B9c=~) zAmnpH96B)g0$@9}uV2S&`v`=YK`3O90>`Kj(fAiJ6iF6L&In1VZ6Y!YN*oy=WX2o6 zYeP^{B*5U-P8Kf?2r_51#+O%sY6-cJ55`h?IO;Y6uNBs1?`q)BiA<3CDRRgR*&DM`^ye5@?H s^6QM2h$1lq(gbfXox@b?Ml4E=7GI-c_3RYTptkMXxO3~SjUfa8I|-uoR{#J2 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..a5a4e90be194e4298e69cfdb89692cbcd89c2b72 GIT binary patch literal 548 zcmZ?wbhEHbRA5kGXklRZ4+PJ4eVS*M=_2ueSLFZ0sgGva{om&Me@F2DE$;vK#ediw z{eP3=qeTJ#4<`NJ6Z2@E$A@JOm-}olPjdUP!tK!<7Y2wSAcL>~#eafsiJ2t|iDjwD z3OT6??wPp-42nNl7`Yha8FYYpfzD81U|{{Xz_ceNbKVOLo}^d%oD8fuk~P``WqdY& z-x0U)nu9_~dqa-Eo~Id{@`f63Ws97jdIav4mEZHKS3q}ybc^%RHL0KGut`lw2wqbA z(B0{KhW)M>4_m&JxYQEfMpmxe7#@LoKPMJgei7d&O|2x#j*O#RZ4v&Q#|N z-EH+(=oNzo_hga0{0h?xmsj0e!aPfeM=RyE+w8EZy&NwJ*it0)^aZ9@7%s?vD4ETn z8qsx`t#2*|w}B(aj1x~a-Pt(4@O)YBesuA!fX1e&C7G&9o6bG3FkSLgncX|o$|=}O zTSs%bOX$><4DtL;Wy|;uIURp_DQ&^42p{H_b-ZRd^935K+wzt2S{eFh{LG!KYhot0 eCDt?Cn@4qqarV74k`4{0=Qwwt<56H?um%82RQS^X literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif new file mode 100644 index 0000000000000000000000000000000000000000..41503c5ebd8025e8f81d60c5438511779c8dccad GIT binary patch literal 281 zcmZ?wbhEHb6k-r!XklRZ4+PJ4eVS+Xe~bJ7U6KC}r#@N~@PA+Y|82hicLYD0W%qxR zW2ZO6qj?@5Hb;M0=J0<{%>RQ)|DSC6u)>W2q8(%ePN4Xcg^`OvoTM?p}?lhMV{$Vk|}prtUmjmtr9#MlLSs4 zl;RMZCfK=3NH^)NS=vnDbF7QZB-U@y;`kOO&AwHLQ-C$1I62ll)w-aCha=Z6BdxeM zxkrzqVhUR_SCf~3aJOHC>FlCfn?jR$>>bFIeDKgg5k&@T E0Iy7e;Q#;t literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..b3e512ca6774eae3685d075aaf3e662fa78113d8 GIT binary patch literal 273 zcmZ?wbhEHb6k-r!XklRZ4+PJ4eVS+Xe~bJ7U6KC}r#@N~@PA+Y|82hicLYD0W%qxR zW2ZO6qj?@5Hb;M0=J0<{%>RQ)|DSC6u)>W2q8(%ePN4Xcg^`OvoaaOB4L>+cvkkO8ZxrWqX~!hxRQ)|DSC6u)>W2q8(%ePN4Wt&@C~uL?N*(HCe$YRlz+o zw}3(MCkrDNgFJ%{&;+0}gculDrz;%oNy#)~TI_Hl!G&d!3}=$a5up`ZqAzT|vvymw zqL{e?Z>O^e|M4X`mP#sR!eYXcW+-}GNLpCBd7X#-@>LTOW_dnctz}dt$hIWcX_Hz{ zfr=BW0CQ3u4{Ji8MG;qnsxhbCBv%7&6%Jl@W)Fkb?A%ZfZ|AJO@>IPj=lT46lXxu_ b=PtGOu$*W%+pe6EiSfX}Lx&j|6d9}mCp3uS literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif new file mode 100644 index 0000000000000000000000000000000000000000..5c23931bbcc6e98a772c1530eae24f41708bc0f3 GIT binary patch literal 294 zcmZ?wbhEHb6k-r!XklRZ4+PJ4eVS+Xe~bJ7U6KC}r#@N~@PA+Y|82hicLYD0W%qxR zW2ZO6qj?@5Hb;M0=J0<{%>RQ)|DSC6u)>W2q8(%ePN4Wt&@C~uL?N*(HCe$YRlz+o zw}3(MCkrDNgFJ%{&;+0}gculD`xK7$q+}W~Ep|AO;KH&Po}r0-{XCM2mpS>*V3ZP>pXbE*R6e{Tu+cXLjElKRv6 zPX8XP{kPfu|DKpfv+VwD4|+P^`QL*zPZqf>%GbU)#pBoc-X}}E{vOKwcPRDW&ak(e z694Uu{dZ^Szf1l9_9y+@7yoZpo*~Qt(kwf3X-p;nCNy0`z zh@VfNUy#>YqDR7tcMgLo69eB$OX+5L3o%|MMn>74jHYwUnVZb?#7y_>-YF|R*Q8!k zRY>f_uH%ezjkSyng_JMfV^kC5WR%cXWV(OyiJk$|Q=u1EUrFfcGU;dwX}!FnDX5|D zw}hirXJSL8U`%mAec~SQKA0w}(qyd3xwTr?Y{hv`NZ?l7|;qqXo1$5>y%v nv2ZR@sK`2ypt_8aTSUd7;D7@ole{4(lYj$*9>WYKMh0sDN3DIm literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..9f46b37926ac6aeb9f46b673d06cb352cda6628b GIT binary patch literal 644 zcmZ?wbhEHb6k-r!IL5#*AxW(&P%hh5qBTlsQGwReg$}=WML$~P|8JY`@2vq(m;2Aj z)VMO;?f)jn|2u;J?~8x5DB%CD$p42^AI`M<^e(}tj@i=Ce? zcKdfU_uri*iwd;=A58jwre{Ku`jbVDk7n7uT^siA#+<4^`QKXtp3Zmr_h9Y6&F=r6 z?)bMo=;?gte-GC5gH*cwyE$i3zV@&4y-${S{XLZV?@;Q$ondb`CH~tR`|r-uf0z3I z?N9o*FaF=I$bUz&zn|;>cX#Q(n{)p?SoePj0>yuVZi$&C3W;T@$qGKH3hti10St;i zSs1w(>KSwxfB+Ox4D4qb>YJLKG_|#zotnFw9UbiLIFxN|tgU*Qv@HdM`1zFi1$iyB zd$i4Y=geEcx6(|iS=Ll+x*c{-Po}r0-{XCM2mpS>*V3ZP>pXbE*R6e{Tu+cXLjElKRv6 zPX8XP{kPfu|DKpfv+VwD4|+P^`QL*zPZqf>%GbU)#pBoc-X}}E{vOKwcPRDW&ak(e z694Uu{dZ^Szf1l9_9y+@7yoZp-_*>&$i&3R(A?e3%)-jX&cVsW&D_((#KX(SFTg7(BrL+z!z4OiOk6@jTu4At zO1f8Oy#(V9*&PyddNZ UojVeuN)~cxi-{YsGBH>K0B~A*kN^Mx literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif new file mode 100644 index 0000000000000000000000000000000000000000..2d2aac85971aa36f3b4dbdd56d69cfcd5cf9e763 GIT binary patch literal 621 zcmZ?wbhEHb6k-r!IL5#*AxW(&P%hh5qBTlsQGwReg$}=WML$~P|8JY`@2vq(m;2Aj z)VMO;?f)jn|2u;J?~8x5DB%CD$p42^AI`M<^e(}tj@i=Ce? zcKdfU_uri*iwd;=A58jwre{Ku`jbVDk7n7uT^siA#+<4^`QKXtp3Zmr_h9Y6&F=r6 z?)bMo=;?gte-GC5gH*cwyE$i3zV@&4y-${S{XLZV?@;Q$ondb`CH~tR`|r-uf0z3I z?N9o*FaF=I$bUz&zn|;>cX#Q(n{)p?SoePj0>z&!j9d)$3_1)z0E!a^_EQb@P0b99 zOiYXn&E3t+EUawo9GqO-%sov^JiL7T0=$Ak!XivPOrrC}#04Z4u91}Ll@^*mcmBFL zGO|r_g7Whv_=UxG>{F;$RN~trF;{uPmJ2GXYU(@0_?6e5S*W4Oq$Pe)@aBc>Ldx1q zI*(S~T)TgP{7Xj8>o53roYvLTH{ib*(tG0gnI;w?!+$3jUgRb0W?PlUA?2Vv%Q%NI z`;E|&gKlec<}SJ$aWI3GFF--^nL?-MaXvX)H-!%$nLPx2x?6Z6H!8IX_%t#wSOWk> C@qelS literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl new file mode 100644 index 0000000..aa29e7f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl @@ -0,0 +1,15 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id: pkgIndex.tcl 11708 2007-02-12 23:01:19Z shyouhei $ + +if {![file isdirectory [file join $dir kroc]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::kroc 0.0.1 \ + [list source [file join $dir kroc.tcl]] diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl new file mode 100644 index 0000000..8d7eb25 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl @@ -0,0 +1,16 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id: pkgIndex.tcl 11708 2007-02-12 23:01:19Z shyouhei $ + +if {![file isdirectory [file join $dir plastik]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::plastik 0.3.1 \ + [list source [file join $dir plastik.tcl]] + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl new file mode 100644 index 0000000..0689b58 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl @@ -0,0 +1,125 @@ +# plastik.tcl - Copyright (C) 2004 Googie +# +# A sample pixmap theme for the tile package. +# +# Copyright (c) 2004 Googie +# Copyright (c) 2005 Pat Thoyts +# +# $Id: plastik.tcl 11708 2007-02-12 23:01:19Z shyouhei $ + +package require Tk 8.4 +package require tile 0.5 + +namespace eval tile::theme::plastik { + + variable version 0.3.1 + package provide tile::theme::plastik $version + + variable imgdir [file join [file dirname [info script]] plastik] + variable Images; + array set Images [tile::LoadImages $imgdir *.gif] + + variable colors + array set colors { + -frame "#cccccc" + -disabledfg "#aaaaaa" + -selectbg "#657a9e" + -selectfg "#ffffff" + } + +style theme create plastik -parent default -settings { + style default . \ + -background $colors(-frame) \ + -troughcolor $colors(-frame) \ + -selectbackground $colors(-selectbg) \ + -selectforeground $colors(-selectfg) \ + -font TkDefaultFont \ + -borderwidth 1 \ + ; + + style map . -foreground [list disabled $colors(-disabledfg)] + + # + # Layouts: + # + style layout Vertical.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label -side left -expand true + } + } + } + } + + # + # Elements: + # + style element create Button.button image $Images(button-n) \ + -border 4 -sticky ew \ + -map [list pressed $Images(button-p) active $Images(button-h)] + + style element create Checkbutton.indicator image $Images(check-nu) \ + -sticky {} -map [list \ + {active selected} $Images(check-hc) \ + {pressed selected} $Images(check-pc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + ] + + style element create Radiobutton.indicator image $Images(radio-nu) \ + -sticky {} -map [list \ + {active selected} $Images(radio-hc) \ + {pressed selected} $Images(radio-pc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + ] + + style element create Horizontal.Scrollbar.thumb \ + image $Images(hsb-n) -border 3 -sticky ew + style element create Vertical.Scrollbar.thumb \ + image $Images(vsb-n) -border 3 -sticky ns + + style element create Scale.slider \ + image $Images(hslider-n) -sticky {} + style element create Vertical.Scale.slider \ + image $Images(vslider-n) -sticky {} + + style element create Scrollbar.uparrow image $Images(arrowup-n) \ + -map [list pressed $Images(arrowup-p)] -sticky {} + style element create Scrollbar.downarrow image $Images(arrowdown-n) \ + -map [list pressed $Images(arrowdown-p)] -sticky {} + style element create Scrollbar.leftarrow image $Images(arrowleft-n) \ + -map [list pressed $Images(arrowleft-p)] -sticky {} + style element create Scrollbar.rightarrow image $Images(arrowright-n) \ + -map [list pressed $Images(arrowright-p)] -sticky {} + + # + # Settings: + # + style default TButton -width -10 + style default TNotebook.Tab -padding {6 2 6 2} + style default TLabelframe -borderwidth 2 -relief groove + +} } + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..d914e7a3d38989d4fcee689f459c3213886b59ed GIT binary patch literal 362 zcmZ?wbhEHb6krfwSgOnb1nuqZD_5>OeE9H@BS(%NJ$mfevE#>&pEz;iGS8$U%q_#PaB~4Pt>_6HL)Z$MWH;iBts!2BUQoO z(>H)Y@h1x-7lS>64#eQ*zr%#_bbLQ;Xv**s8JAeNCg$oxhUcC692%z{+)VU}%u_QG`p**uBLm?z1 zRl(iUH-JI$CkrDNgFJ%{0}y~5!@wGsz|fNt+2v%lhWVjbfg#tiMupBzIzEprCP%)V zcKd6cBg5IY%O7hT6gU5H@#;L69AdeoV!w#?bk1cClf55>cgvY+Ud`Q=X%qkQ<2RFR Xaoc|aje^ZWtqhEON^0F5iVW5O&Mt=z literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..9939ae1d50034a9f90eca78f6564a0f3cae1bd38 GIT binary patch literal 378 zcmZ?wbhEHb6krfwSgOPT1nuqZD_5>OeE9H@BS(%MJ9gs4iBqReojG&n+_`fXE?l^D z>C)xPm#hyym|BP-MbGTK79K0>C2Zd|7ivk|A{&mr6!i7rYMwWmSiY|WTYy%d-?`2 zDE?$&9+mYu%p)FIbX!6VTv zf21#UFB`*+*K8A=R|el5g36FFSO`DV># ym_3W#MU-dplBJ8;Ttv85uUWgA)kTeQ*zr%#_bbLQ;Xv**s8JAeNCg$oxhUcC692%z{+)VU}%u_QG`p**uBLm?z1 zRl(iUH-JI$CkrDNgFJ%{0}y~5!@!!qK$syVbJ{_TH94mzH7TCoa%RHeh41&&F|)K3 zc!-#J98_v@vSH%tTrtIIqMD3KbJFgmK|8o~9&FIi-y`z*k)zV;y;&Tb2Upx)S=J^q qA>+q?UXcbtl|;Vwj!wQ7hPJLQAqHjPDO0CSWl&O|t-`3tU=0BDB#aOM literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..f4b563fed21f814b64d3cb8ff46629a0a5bb104a GIT binary patch literal 379 zcmZ?wbhEHb6krfwSgODP1nuqZD_5>OeE9IuqeqV)KYsG$$unopoI7{!!i5W$E?v5O z`SR7PSFc~ce&fcCn>TOXx^?UJ?b~#Q2ZzAT$GwvlA5AWo>`Ki5R#Fq;O^-gz@Ye(g^`Ov zfk6l4MUZD1*ym2|9 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..5459d5e615d2643ac6baf2d298ee2870dda20d65 GIT binary patch literal 266 zcmZ?wbhEHb6krfwXc1v(Z*O0@a^-;o2M!)Qc<9if!-o$aIdbIa(WA$X9Xo#f_=yuI zPM$n@>eQ*zr%#_bbLQ;Xv**s8JAeNCg$oxhUcC692%z{+)VU}%u_QG`p**uBLm?z1 zRl(iUH-JI$CkrDNgFJ%{0}y~5!@!!Cz|fQ8$;PL!Cg(KMql7ahw)&3?-qh?jR%S}_ z(BW%rXquShV&c}?65_ScXQ^g`OeE9H@BS(%NJ$mfevE#>&pEz;iGS8$U%q_#PaB~4Pt>_6HL)Z$MWH;iBts!2BUQoO z(>H)Y@h1x-7lS>64#uPVCkHzl8!HQQy0iNh4@U-T06u8p>Hq)$ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..89f9b38c73b76f1fcaec8ed639515e83d497e63f GIT binary patch literal 251 zcmZ?wbhEHb6krfwXc1v(Z*O0@a^-;o2M!)Qc<9if!-o$aIdbIa(WA$X9Xo#f_=yuI zPM$n@>eQ*zr%#_bbLQ;Xv**s8JAeNCg$oxhUcC692%z{+)VU}%u_QG`p**uBLm?z1 zRl(iUH-JI$CkrDNgFJ%{0}y~5!@wH9K$syVb5bJ*$D0R21&Yjz6J$6hX`DV}!gstS z$Q#I a|F8JVHwZKd2(}8f3z?{Qt1>DwSOWl!o{8xI literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif new file mode 100644 index 0000000000000000000000000000000000000000..548f3769dfe9e835345f963c92e74779a6491231 GIT binary patch literal 439 zcmZ?wbhEHb6lV};SZcx$nKvo5YF>MLd)t)NlNM}SxpL)!gGUb@I(F#r@xw<>965UO z=&@7Bj-Nh$;>?MYXOEvcd-Bw|6Q|FeI(`1+ne(U5TsU?1!kM!dPoKMZ_S~g2=P#W* zfBEc%%jYj#Id}2Og^O3uU%Gnn^0iA>u3x@-wc z6hbmm72G|20~mA|fB@u42DZZo!W`85uZxEC_8mKS?c{M$mppLr(BVVeE^6W@ zPn|wki zUA}zz%9SfuuU@@&?b`M0*Kgdoar5TQTeoiAzJ2@7ojZ5$-o1D4-u?UcA3S*Q@ZrNp zj~+dK{P@X}Cr_U~efI3x^XJcBym;~Q<;z#EUcG+(`pug+Z{NOs_wL>M_wPS^`0(k| zr~ecK#ebsCMX8A;sVNHOnI#ztAsML(?w-B@3_1)z0P-XQ+wlY53=TR{{l^*vCS+O7 zzo4Gb@hW2d4V`IDHii2hY_PCVoMrZ6OV!$G0^YNB)cDPJ?^x1PcmDlnMHgj>=9bpB zR(=;H@t)qk{yshzMX{;Vrq7tp>!Kh!Z~lUX3wT`QMV7BvxoRc1i=6O=jhi-a;&PD{ z+PQ1@p52@-GJ=N=A31u2!$n%)^qI5g&a%5m@n5-m?fNw~7fHUm_wGNq&*~z<`|SCP umoHdc#ChI-`1t7~vx^w_kDtGO|6&SeU}EBu@hEsOMb$${E>MVt!5RRIA`?ac literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif new file mode 100644 index 0000000000000000000000000000000000000000..e83f7ed9855b2d653c85ff8e4348bfdc4f08137c GIT binary patch literal 302 zcmZ?wbhEHb6lV};Xc1*-Z*O0@a^=yZM~@vlcKrD96DLlbJbCiesZ*yk|^(5uj zy3aHm5_=LZYBCG7aPF8lU+UDd^c^OQ(j0LLR?>U|T#IUs2=tUO2qvmFZDA3PSbw8C Kb$15?gEas-a6hL2 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..5b4fb4f037bce16e536429d4f8a02f6220fcd43b GIT binary patch literal 170 zcmZ?wbhEHbEIflaSwDR#jh7(^ys4T+`56+tgm)(%IP7-QM25 za^=eZFrfHP)VU}%u_QG`p**uBLm?z1Rl(iUH-JI$CkrDN13!Zf0}y}=XJE0Lu-5bS zB*oXfX%Yz>Tz5ZdW~`cUZ^E8}L$jEZ?w|N0TT}mnxw#;NL9Fit(}V*#LJdtTOrp3L P*4=n>^iZk`1A{dHYam7Y literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif new file mode 100644 index 0000000000000000000000000000000000000000..b139e02a09c25d7c84c3503cc17438654f04cd5a GIT binary patch literal 235 zcmZ?wbhEHbFMd~>+A3DpEz;iq)C&eOqnuu>eT7er_Y!%W6qp8D_5@kj|vq3 zi8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~VvuLhVE_VzNj(BOcwO#lO(+gGY}BUweRnYmXYQqQW(co(h*6VF?nhhqw$E Y7&KiG_#l;Nvf}pp=E<4sIT;zO0c9L#DF6Tf literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif new file mode 100644 index 0000000000000000000000000000000000000000..fbe391f9d89baf52edfe3cbb03a4ea488a7a8f37 GIT binary patch literal 226 zcmZ?wbhEHbFw?9>+9?9@1Hnv;-pEFrc9YKb?VgV)2GjvF=Ni0IV)GL{EqZUFyU+- MvtLlK8ViFp03||Zx&QzG literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif new file mode 100644 index 0000000000000000000000000000000000000000..75a3bd635c1be6de43456fb522dd9c6dd401250f GIT binary patch literal 169 zcmZ?wbhEHbk|^(3X& zyvqz41A7)+)O0dv;oLEAzSOB@;X6zi#X0g6tfch>xE9qM5$Gvn5KL5U+QPydvHnJP K>h2B(25SJG%s{UI literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..b8ea07ea923d98e99b6fa0aa307bdbcbce49dfca GIT binary patch literal 269 zcmV+o0rLJwNk%w1VHN-o0E8a^hlhu$sj0)m!^FhI#>U3T$jHjd%FN8n&d$!z(9qJ- z($mw^)YR0~)z#M4*4WtC+S=OP-QC~c-{Ilm;^N}u%+;>FMd}>gw$5?CtIC z@9*#M@bL8X^#A|=A^sIZa%Ew3Wn>_CX>@2HRA^-&M@dak04x9i000&M5C8xLd0+sH zWNDhBr><<l_gM@{KgasoL35<=7kBtN)5(t%+mzb6V TBLbbCpP--sA}6IM0U-c8y)=49JS8m(3?bNALXU?2CckbNz^XD&IxNz~}#mkp3 zU%7JS>eZ{)u3fuvVcOO1{`1I-1moH!b(-+| z#h}2T!vF*z&oZz@9cW^3&|zY6I*@+yj|}6yo|0Le0@l;leEXzOr1hX+spFl1a~Y?a zR?OUSe=>`p^2*z)?2A|ry?5qv5#?)c;bZaV>FnZh_vGsD?`8Gmm^x{)C)@NHtjvte Ia~v700Sjs1V*mgE literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif new file mode 100644 index 0000000000000000000000000000000000000000..33917715b0a8237db560daedfe85915ed835ce2e GIT binary patch literal 178 zcmZ?wbhEHbdh zCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~V&G@cVE_V<;S4Np0wmPVcdd{z7g>_7 zaK(c`Cy8 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif new file mode 100644 index 0000000000000000000000000000000000000000..88925d0e1d4a3946867824547919cf4f1b4ee444 GIT binary patch literal 179 zcmZ?wbhEHbQ2ZzAT$GwvlA5AWo>`Ki5R#Fq;O^-gz@Ye(g^`PapFxKK2tbB2u((e+IW;TR zC|tm5g_JnQlIaFlG&FK%2Fz(Vvss|#WW}35iQ&r41sOk{va~MQl+YtM&;Pc%t5ihn XjFyg+-E&oD_kEweFd}Xy2ZJ>Lb}&m9 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif new file mode 100644 index 0000000000000000000000000000000000000000..f8723d367aff72934633055ac1caf6c2a794d6d1 GIT binary patch literal 236 zcmZ?wbhEHbDz7Z*TAH?Ck35>gnm} z>+9?9@1Hnv;>wjP&zw2)pA?|@Pt>_6HL)Z$MWH;iBts!2BUQoO(>H)Y@h1x-7lS;5 z4g(N?9K*mGprB&s5owncCFU1BCF|mulFv>mhdCVdUvLB^9^{r_Y&y!lFo2=Y)?xD$ t51Yk%S8)~|&Esa53oEFY$irqRB-^6E)v{wwf$&(}*Vo_QKXKy3 zl`B`CIdkSe7%2V|buLOxEJ;mKD9CRz|Ww=00bbz8Ccvl zc!p)A8g18_CO$Qc!z)wkL5NDuZLu32XH4dbxvzWgzESePf(s8eOZ2-kCZ0@LrqR42 bgllpS(~TU3sSg?UDa>EyXqaRq$Y2csSUpI_ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif new file mode 100644 index 0000000000000000000000000000000000000000..176225d9e1e0a74145e3abefa4ed063fe0827868 GIT binary patch literal 178 zcmZ?wbhEHbdh zCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~V&G@cVE_V<;S4Np0wlofRIQLw7g&<6 za3z8v$B~2W=vrr9kwfV{4QH9wbLD?XW-V`t6XY;HGi`@|*M=-s!*hHur&@cO&0S~i Lyzz*UAcHjk!q`eW literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif new file mode 100644 index 0000000000000000000000000000000000000000..85bac4579e86023205ed899c68efe58c0f4b8f08 GIT binary patch literal 366 zcmZ?wbhEHb6krfzSgOR(-rl})<;uf{4<9*lwc6hbmm72G|2 z0~mA|fB@u42DYjL3<(}OVyz3#AAkI^#A0@@+vJlx&NI4~I?eP@n$W&jaYx$ryZIF{ zYzbRq^do%C4qq49JS8m(3?bNALXU?2CckbNz^XD&IxNz~}#mkp3 zU%7JS>eZ{)u3fuvVcOO1{`1I-1moH!b(-+| z#h}2T!vF*z&oZ!u9BA60z#!4@c5nj6iU@;QyvrXmYRu$ecQINRqBoPjVdaUu-S-U= z7#yZ-jnR*gG1zhT'HTML File Viewer', :iconname=>'HV') + +file = ARGV[0] + +# +# These images are used in place of GIFs or of form elements +# +biggray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO/// +EOD + +smgray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9m0VADv/ +EOD + +nogifbig = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhJAAkAPEAAACQkADQ0PgAAAAAACwAAAAAJAAkAAACmISPqcsQD6OcdJqKM71PeK15 + AsSJH0iZY1CqqKSurfsGsex08XuTuU7L9HywHWZILAaVJssvgoREk5PolFo1XrHZ29IZ8oo0 + HKEYVDYbyc/jFhz2otvdcyZdF68qeKh2DZd3AtS0QWcDSDgWKJXY+MXS9qY4+JA2+Vho+YPp + FzSjiTIEWslDQ1rDhPOY2sXVOgeb2kBbu1AAADv/ +EOD + +nogifsm = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhEAAQAPEAAACQkADQ0PgAAAAAACwAAAAAEAAQAAACNISPacHtD4IQz80QJ60as25d + 3idKZdR0IIOm2ta0Lhw/Lz2S1JqvK8ozbTKlEIVYceWSjwIAO/// +EOD + +# +# define variables +# +ul_hyper = TkVariable.new(0) +show_tbl = TkVariable.new(0) +show_img = TkVariable.new(1) + +# +# A font chooser routine. +# +# html[:fontcommand] = pick_font +pick_font = proc{|size, attrs| + puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (12 * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') +} + +# +# This routine is called for each form element +# +form_cmd = proc{|n, cmd, style, *args| + # puts "FormCmd: $n $cmd $args" + case cmd + when 'select', 'textarea', 'input' + TkLabel.new(:widgetname=>args[0], :image=>nogifsm) + end +} + +# +# This routine is called for every markup +# +images = {} +old_imgs = {} +big_imgs = {} + +hotkey = {} + +move_big_image = proc{|b| + if big_imgs.key?(b) + b.copy(big_imgs[b]) + big_imgs[b].delete + big_imgs.delete(b) + Tk.update + end +} + +image_cmd = proc{|*args| + if show_img.bool + smgray + else + fn = args[0] + + if old_imgs.key?(fn) + images[fn] = old_imgs[fn] + old_imgs.delete(fn) + images[fn] + + else + begin + img = TkPhotoImage.new(:file=>fn) + rescue + smgray + else + if img.width * img.height > 20000 + b = TkPhotoImage.new(:width=>img.width, :height=>img.height) + big_imgs[b] = img + img = b + Tk.after_idle(proc{ move_big_image.call(b) }) + end + + images[fn] = img + img + end + end + end +} + +# +# This routine is called for every +

+ + + + + + + + + +
Welcome to SlashdotLinuxNewsUnited StatesEducationSpace
+ + + +
faq
code
awards
privacy
slashNET
older stuff
rob's page
preferences
andover.net
submit story
advertising
supporters
past polls
topics
about
jobs
hof + +
+

+ + + +
Sections
+1/23
+apache
+1/29 (3)
+askslashdot
+1/27
+awards
+1/29 (2)
+books
+1/27
+bsd
+1/28 (2)
+features
+1/28 (2)
+interviews
+1/19
+radio
+1/27 (2)
+science
+1/28 (3)
+yro
Andover.Net
+AndoverNews
Ask Reggie
DaveCentral
FreeCode
MediaBuilder

+

+
Who Bought Linux.Net?
Linux Posted by CmdrTaco on Saturday January 29, @10:52AM
from the this-game-again dept.
So Fred VanKampen (who has to hold the record for most money made by reselling two domain names) e-mailed us to say that the Domain Name for 'Linux.Net' has been sold. He won't say to whom, but it supposedly will be announced at LinuxWorld next week. Of course we have no idea what he got for the entry, but the rumors were that he made several million when he sold Linux.com to VA Linux. Hopefully he'll take me for a ride in his yacht. ;)

( Read More... | 58 of 62 comments )

Book Reviews: E-Mails from (Over?) The Edge
News Posted by Hemos on Saturday January 29, @10:43AM
from the touching-story dept.
I'd like to thank the author of this book for sending it to me. Nick's written a book that's touching and endearing, and one that's well worth reading for everyone who's ever had social struggles to deal with. As well, his involvement with the fine folks of TheVenue. I'll warn you - it's not a tech text. But it's still worth reading. Click below to read more.

( Read More... | 6197 bytes in body | 6 of 22 comments )

Linux Kernel 2.3.41
Linux Posted by CmdrTaco on Saturday January 29, @10:21AM
from the download-compile-reboot-repeat dept.
sdriver writes "For those of us who enjoy *panic*, *oops*, and suddenly seeing their video BIOS... the newest version is out! Be the first on your block to submit a new patch! ;) " If you don't know where to get it, you probably should stick to your warm and cuddly 2.2.x kernel *grin*. Now outta my way, I wanna crash my laptop!

( Read More... | 52 of 57 comments )

Congress Still Figuring Out E-Mail
United States Posted by Roblimo on Saturday January 29, @07:28AM
from the voice-of-the-people-can-get-awfully-loud dept.
Jett writes " Vote.com has an interesting article in their Webmag Fifth Estate about how congressmen have responded to the popularity of e-mail in their daily operations. Quote: 'Of the 440 voting and non-voting House of Representatives members, 22 have no e-mail at all. Even House Speaker Dennis Hastert is wired only halfway -- his office receives e-mail, but does not respond to it. And while all U.S. senators have e-mail, they, like their House counterparts, routinely shun non-constituent mail -- even though they chair committees whose decisions affect the entire country.'"

( Read More... | 66 of 66 comments )

Ask Slashdot: Sci Fi Literature 101?
Education Posted by Cliff on Saturday January 29, @06:56AM
from the recommendations-wanted dept.
ohlaadee asks: "My niece (she's 13) wants to start reading science fiction. I do too. I gave us both Asimov's _The Foundation_  for Christmas. We'll read it together. I suppose we could spend the rest of our lives just reading Asimov, but I'm wondering what books and movies you folks would come up with? What does the /. recommended Science Fiction 101 list include?"

( Read More... | 345 of 345 comments )

Could Distributed.Net Help the Mars Polar Lander?
Space Posted by Roblimo on Saturday January 29, @03:35AM
from the food-for-thought dept.
Anonymous Coward writes "This official JPL press release describes the current attempt to listen for faint signals from the Mars Lander. They get three windows a day, and it takes 18 hours to process data because the signal is so weak (if it's really there). Too bad they don't have a deal with distributed.net." Interesting thought. Is anyone at distributed.net or JPL interested in pursuing it?

( Read More... | 99 of 102 comments )

iCrave TV Loses Battle against U.S. Broadcasters
Television Posted by Roblimo on Saturday January 29, @12:21AM
from the shut-down-just-before-the-super-bowl dept.
Doran writes "C|Net has this story about how the Canadian company iCraveTV.com has lost its latest battle in U.S. courts over whether it can rebroadcast TV signals over the Web. The broadcasters say it's theft, while iCraveTV sez it's just doing what's legal for other cable TV companies in Canada (ie. rebroadcasting TV). Of course, by framing the streaming video iCraveTV is doing more than just rebroadcasting, they're also adding more commercial content, which the broadcasters feel dilutes their TV commercials. "

( Read More... | 152 of 170 comments )

Win2k Security holes found
Microsoft Posted by HeUnique on Friday January 28, @04:58PM
from the and-it's-not-even-out-yet dept.
According to a story posted by ZDNN, two security holes have been found on Windows 2000, and that's even before the official release of Windows 2000! Administrators who rush to incorporate the patch from MS beware - according to one of the talkback posts on ZDNN, the patch creates a new problem with Windows 2000 news server service.

( Read More... | 510 of 534 comments )

Encryption Debate at Mitnick Trial
Encryption Posted by Hemos on Friday January 28, @03:33PM
from the gimmie-the-data dept.
A number of people have written about the latest twist in the Mitnick case. Kevin wants to get his data back, but the government is refusing to do so until he gives them the key. Apparently, the government is unable to crack the encryption that he's got on it - you'd think after having the data for five years, they'd be able to brute-force the darn thing. It's a NYT article - free login required.

( Read More... | 504 of 521 comments )

Forum: Future Ports of Games to Linux
Games Posted by CmdrTaco on Friday January 28, @02:26PM
from the it's-been-awhile dept.
It's been a long time since I posted an open forum like this, but I'm curious what people think on this one. What games do you most want to see ported to Linux in the next few months? Of course, for me personally it's StarCraft and Diablo 2, but I'm curious what games have come out or are due soon that people would most like to see a port of (and note that WINE doesn't count. ;)

( Read More... | 648 of 652 comments )

Features
Voting has begun for the $100k Slashdot Beanie Awards. Talk amongst yourselves and choose who deserves the cash.

The latest installment of Geeks in Space is up at The Sync. Listen to CmdrTaco, Hemos, and Nate talk about the latest events to happen - or not happen in the computer world.

Perhaps you are seeking Jon Katz's series of articles related to recent events in Colorado. These articles include Voices from the Hellmouth, More Stories from the Hellmouth or The Price of Being Different,

For something different, try reading a little essay Thoughts from the Furnace about the internet, and flame.

And for a bit of an amusing take on the Open Source world, check out Open Source as an Ant Farm

Update: 01/03 03:10 by CowboyNeal:

Past Features

Ask Slashdot
  • Sci Fi Literature 101?
  • Linux and Satellite Internet Services
  • Open Defensive Patents?
  • Technologies That Shaped the Last Century?
  • Disk Repair Tools for Linux?
  • Why Can't the Command-Line be More Standardized?
  • Packet Radio Networking with PalmOS?
  • Cheap Rackmount Enclosures/Systems?
  • Open Source Software and Tax Breaks?
  • Building an Upgradable Dual Processor System

    if you have a question for Ask Slashdot, send it to askslashdot@slashdot.org

  • Slashdot Login
    Nickname:

    Password:

    Don't have an account yet? Go Create One. A user account will allow you to customize all these nutty little boxes, tailor the stories you see, as well as remember your comment viewing preferences.

    Slashdot Poll
    The Tech Advance I Most Want Is:
    Nanotechnology
    Cold Fusion
    Powerful Fuel Cells
    Hard Wiring my Body
    Universal Strong Crypto
    Interstellar Travel
    Cybernetic Body Armor
    ColecoVision
    [ Results | Polls ]
    Comments:656 | Votes:29121

    Older Stuff

    Friday January 28

  • Abstract Programming and GPL Enforcement (235)
  • Interview: FreeDOS Leader Jim Hall Answers (86)
  • Open Source's Achilles Heel (466)
  • The Virtue of Communal Instincts (237)
  • Gartner Group Debunking Open Source Myths (165)
  • DoubleClick Taken to Court (310)
  • Updated Slash & Server 51 (81)
  • XMMS 1.0.0 Released (128)
  • Linux and Satellite Internet Services (138)
  • UN Wants to Combat Online Racism (531)

    Thursday January 27

  • Crackdowns, Fools and the MPAA (351)
  • Heroes of Might and Magic III Demo Released (157)
  • Sandia Labs Venture Into Nanotechnology (117)
  • CA Announces Program Ports to Linux (195)
  • Interview: Larry Augustin Finally Answers (210)
  • Final Call for Voting in Slashdot's Beanie Awards (178)
  • Transmeta Code Morphing != Just In Time (449)
  • Intrusion Detection (65)
  • Using Enzymes to Help Fight CO2 Build-Up (165)
  • Jon Johansen on ABC World News Tonight (415)


    Older Articles
    Yesterday's Edition

  • Book Reviews

    Jon Katz, Resident Gasbag, has a new, very appropriate book coming out soon, Geeks. Preorder now and receive the book early.

    For probably the best fiction read around, check out Neal Stephenson's Cryptonomicon, an engaging read about WWII, cryptography and buried treasure. And data vaults.

    If you've been doing a lot of work in Perl, you've probably figured out you really need Perl in a Nutshell or The Perl Cookbook. If you're still learning, grab Programming Perl.

    And if you want to learn more about how to become a better coder, grab The Unified Software Development Process or The Practice of Programming Additionally, check out Refactoring: Improving the Design of Existing Code .

    Developing a large application? Grab Eric Greenberg's excellent Network Application Frameworks.

    Visit Our Book Reviews Section for more.
    Update: 11/12 05:19 by H:

    Quick Links
    Cool Sites:
  • Linux.com (What is Linux?)
  • Everything (Blow your Mind)
  • After Y2k (This is Post-Apocalyptic?)
  • User Friendly (Laugh)
  • Themes.org (Make X Perty)

    Support Slashdot:

  • ThinkGeek (Clothe Yourself in Slashdot)
  • CDnow (Support Rob's Who Habit)
  • Slashdot Advertiser Index
  • Freshmeat

    January

  • We should get this out of the door now
  • Is Linux for Crazies?
  • SQN Linux 1.6
  • Limo 0.3.2
  • Fusion GS 1.3
  • MMR 1.5.4
  • KUPS 0.3.4
  • 3DSE patch for XMMS 4
  • Linux 2.3.41
  • Free Code for Linux S/390
    Search Freshmeat:

    More Meat...

  • + + + + + + + + + + +
    +
    + + +
    +
    +
      + Wasn't there something about a PASCAL programmer knowing the value of +everything and the Wirth of nothing? + 
    + + + All trademarks and copyrights on this + page are owned by their respective owners. Comments + are owned by the Poster. + The Rest © 1997-2000 Andover.Net. + +
    +

    + + + [ home | + awards | + supporters | + rob's homepage | + contribute story | + older articles | + Andover.Net | + advertising | + past polls | + about | + faq ] + +
    + + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image1 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image1 new file mode 100644 index 0000000000000000000000000000000000000000..2ed6ddcfe1ca1e2bc82eca40f3ff95260563bfcd GIT binary patch literal 1966 zcmb`^`&W_)8VB%~i}DwA5IWfm#I zB9&X@Qi~j6kt;1qxkZUkDIHy9RVl41gjLmUZC6>_5!PNu5cXcJwpVM{_S&@wyH;=4 zYwdc3QSa!+6(hoAbQIHy$+%)dte7k-7SoCaVYOIRtO&c+x?#0%*byss`^JhRh>eYn zj}HI4+5c-sB8!k;0M46mfuurOS#?Hswz@`Md#+AVfBu59;bLP`^Q9J5>*XuzwyW2! zx8LaK?CS2h*{kX6AGmdUQ2X7GZg}L*sQ&KQc-uiCCq5+5AEL|zGGf{3xqV*^?&U`Z zLIL#f=vZcScnE_*-x}!S?YT8xaKNBSw=?3|$q8}cft0P$W`Xb~r)}c-l)En!kRwDn zS%brUBF!*5*hS&%A5hMEqaj0#kbt7aMdlB6*zjBOw(RBav7X!LwZjXx^j#S|54kNC zS55Nu-p(|vIZ0<*rf_3)@g?2x$+2(oNIVM4ta{OXD{qp>K8^_6)5gSUp z%ruCx9;qWNKRUhGhcb^xWeE+^crPCYmAqD2U5)jKEPPC2W9rh?ah8RP5GUZO3Sxyy1vcQoO=wpn0Y;EyRT&Ehc3sD-g)_(TUWb$~N z-|dv;Y?sr)A~F7zu(&n(anq2vG?!_p*mt(UaF3w4If!xoiwmO(Ls?e;lPGMqsnG0B z^Bj?onuCMdKSif`C3h<3zX%sG(OxxORBOq;t{fTucVD4#5I<>SuX_+<)BcPmI;D6T zoLeZGAg6zT6&UA$fo&K3RU#<(Hw8?|jvdrB-;)}A$PB@yY4tii_kp_QSe$N^>*Sha zes-~X)J${&L=~$AcCZR{y6w< z!cX)ALfRyOVSF*(qpI(oaOVjPPr7t3x|cMgFJmil0KkO7W)cU*hyv7@PkaHj!TWO= z0HYdNv}LbG2pAve>YUEF6-LVD5vHQu&iW)4a%CRDq8>LCrqgXV3d=&x0hl9XHvp^q zca1LwFi!;KVQD<)ElN=zl{;CKN{LB|$iVO1#Q!ms;LXme0R8YWQ(lSSejc6+UghK6 zh)*jGV221x`+QI>#zmdV%EU|<6*3~$%Pb*tPXaJOVpBExc$1LpC3U6%v{QJ;1$sJBG0;j zt!MqqoA>SCmweX&&Mrm+$mSw5hBNKjG5#(_NXjGm zyzronWKY$Q!WLVX1!qQ5w$+tuTK3ZhIRLO+`|Wvl8x_5smj=9YxmJY!#Wf4~*kCyR zFnn_2>l~SdECkSMwbQ;35QV1}40}GcH+{z&TX=<@^H05n50!mrtv`CVgohHQr=l+P zp@RCYOL023I7%VmMT~0J1yIqs}iGDH2_E*f0r2}^}{mB0~P$I7envxMPF9-m(ysP{-NMXd9D5>f9eQD zum^v;>2fCutUoG10T-Ih@*8m-!#$*&x0fD2xUqd`diLwmw=Fh&2kZXPPjQjss>P%b zjKu|o((aPW zq~jrc`i!ZXv38X(8=6QApFfwkSMBpCB<&+bQvd3$+IiicmX(-YJM!@Q%kt3O@!>x- zhAZ2c-z@IRFP*>m%flOqzjo~rj|kg59(88y=+3?{Gj~3Ey-QHpz4zK5C?+6hy*p>N Y`}adLk2Iz0Jt9I+&V4`F@f!Aj0JqyfwEzGB literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image10 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image10 new file mode 100644 index 0000000000000000000000000000000000000000..3021b68990df6023c144935f8d8eba1f724ea789 GIT binary patch literal 255 zcmZ?wbh9u|Sd}^Y5#dTL>nnFgFPBq~zI$FsIs@CYJSc^M*`H%eR=$(l$G|&~<*U YjnLAi0_=U2tJka%UcX`EMnwi|0N}GySpWb4 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image11 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image11 new file mode 100644 index 0000000000000000000000000000000000000000..41d1fe36661a675dcbd48183f903c546e0a4ae5b GIT binary patch literal 590 zcmV-U0F zqn&#W`xu zFkip~6+Qp}00000EC2ui09XJd06+!)peK%GX`X1RuB?hpa4gSsZQppV(-LKIz@PyT zga8Nx2M1sX2AP})fWa9W3>Qv8z(^oC8G&F(074l6Np&pNa1hMFMFJQY6r2j+z$j#$ zfPsR8goTEOh>41ejE#ydkdcy;EsmC#n1@3_0|F7BO9T=UZe~pd02x(j6{-pm5(5KK z016TWsT=|W5<^*67XSrdM-mPhbP1zT4H9S%nbFdhl-1VP*xB0KB-7sChC=}30HufI zN9N$`t3Y&APfdVz0s$33;zU~G1QG2V@0K({qs9Q60U8Jfp)-z(9smLosAEU5qQ#3C zGiuzZk(ZKr>YGPj6B$ELHRSclb8wj8Q zhX+0xsL_zXzyYBe8Uzh8)tM@!K2-sUz@UMK3`yZdxUxViA)Xq9Ie{{dO)j2h5C&NQ z;NCNV928#3n??#efK#XfP=bgjods*Vw-x%21H cqf4Joy}I)b*t2Wj&b_<$@8H9W2Ok0eI~8#LCjbBd literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image12 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image12 new file mode 100644 index 0000000000000000000000000000000000000000..655a686541afd0f6ee26b620828ee0fda8675747 GIT binary patch literal 254 zcmZ?wbh9u|`7eN1zDEXy$(ea^K|$-rskC7 f&oG@l*ROPnDVMP5@)ebJ0MFwjC@bgl^ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image13 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image13 new file mode 100644 index 0000000000000000000000000000000000000000..97d5950e8c54253d210769532202714534da0792 GIT binary patch literal 493 zcmV_WA4X^Wx_1*xl#P)#1j?+`Prsv%S%&w9BBZ z#h0YOjhwoJleBt^u5p8@XnUh!jOSi+om6U~iFJ8SbN`Wj`u^&Hx z9XfUm8Z`tJJ^%m!EC2ui0673806+!);3tk`X`X1RiW=s=a4gSsZEIZ4HNd2E48UOl zC~zhKz$24n903MmB1aJBf&&h~SpZlHg3NDBE}PHjH0Q!@yWjA*d`@St?)dyk&F}lo z2mlET1r-j0L`De!90C9t23bf>ITAt)23|oNU6hk#5uu`^q@|{(sHvfPtgWuEuql7D zv}p>62erCtK|VTAS3Nuj0tbt^NCQ<397GjLK!O8XIkyD6*xB0KV|Cu&;Njxq;<4uE z=;`X~?Cm4m@H!ju^kfeQ1`J~LwH5#iV;&gDw{M^Y4hRfT;80;8!5ji5Kr|rHz=MWP zC>UT?rq_=FSvV}JfFwYI2aa=`d;<3Dz@unNsQK&S;LNirI+W#DWFZIy00K}Nc#=;d zhXDdI8VuCOK>|Li3Wh2`z#%I`i#nu=(Fj2x2aOMMG)&8{t=nuJ;>w*% jx31m0c=N_3$G5NFzkmY=_CUC>;lqd%D_+c)a0mc9>nq&L literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image14 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image14 new file mode 100644 index 0000000000000000000000000000000000000000..6d73ad833ca1407b8ca99a2335be2096e8947e8b GIT binary patch literal 195 zcmZ?wbh9u|V{(yemUY&@IYTh$dJ*O%~93bBaVF|lzoGBPp{4Rk;%L3S~)dL*dyrDV>_ShehsgF=t8QoExFmx!WG zk_fkZf4PTAn=RX<V{s4=p9U~*74g(N?#2J`m=k%{U{g!|6oGrJyH{av< W!O!-{W7@OMWm%eA-bFJoSOWl*xEA#Q literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image16 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image16 new file mode 100644 index 0000000000000000000000000000000000000000..93aa853cf1d69f17d43b18ff04bb7046c12334e5 GIT binary patch literal 157 zcmV;O0Al|~Nk%v~VGaN!0P_F<|NsBt;o-v0=dHcpqobpgsLXtkvw3-WVT|WYOiVa9 zI51zpA|fIL6+Qt00RR91EC2ui01f~o000D1P^Dwa7y{_+I#X1!ab3wA!3dPBqoib8 z!mC`qn#~@$?xnsGFW7kz9Sp+JaabmniX~%7ty-_xtai(_A->>nctI|k&*-#z&2GEV LjktV1j{pEWXcI(x literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image17 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image17 new file mode 100644 index 0000000000000000000000000000000000000000..f46f0308cd2004373645cd58d73cc6e9c96c9d7b GIT binary patch literal 81 zcmZ?wbh9u|tYBba_{hMZ;xbdwVw#M8wYXY}4g(N?#2J{h=Jc;T{g!|6oJF^~H{aXy jo4+l|VcN6KWv@ug_k6e)R0)y~iJJKX`ZR{=4gU-(0x< z^8B@zXRbUydiKe_;}3Tpxxek;-Oc-Muit%Z_4XSpwq9Sp<=Vn^m*=j&ICbf{zImtG zXB=;udbEDh;hO$KrJef=+xF%(?ar#-nO3tSwPt%<*_QD9jUl<~ebQFDC#`geU*Q$KF0>)C#9r0 zG4seqs4(&A>oRaLMoThuGf375H7{S`ugAdYq#WHXA-6$Za+}_^oobTxQZo8(y83Do z^#>#+q|}{uE?Ig0f|EJ}uM~sl8(Em=IV{vrI3Ufyu3BU!Tk%M4qUeTauUf@e G7_0#Wx7Hy5 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image19 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image19 new file mode 100644 index 0000000000000000000000000000000000000000..bd4f6d9677618441b77c2528053c45197470b7ae GIT binary patch literal 53 zcmZ?wbh9u|tYBba_`txR;xdzgfk6j|89*WoOd>7)D^I`WUp!~at?teD_Wb5=dlbUJ GU=09k5D@zS literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image2 new file mode 100644 index 0000000000000000000000000000000000000000..7566dda25d463646aedc500833501df5ede789d4 GIT binary patch literal 49 zcmZ?wbhEHbe#@W8$Y2csAPNgH literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image20 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image20 new file mode 100644 index 0000000000000000000000000000000000000000..358fa95f63de3e7b497639315ebe379fa48ee6e9 GIT binary patch literal 533 zcmZ?wbh9u|tYF|~_{zZW|NsB5-+sOQ@cq@>ug_k6e)R0)y+`k_-+go8`pfgzUY@z~ z{OH*ydyhZZdF1}q19vy?yS;w*t<~FaEZ=f%;kwInR$rXD^jzP(Q%zHk)=xTI-FL9G zbAMsm-rT0$S@k>9YIda7Y>zA35}v;?BzL_}+G^K?6)y2B9AlT;MlQ7sTWl7*P|tUs zy8CPf3V;qsFUT(rZ2t~SE%4Bh>UW>SaWcnh{)H7=G#S@~@GvB7yu_rUeWE==w2NV3 zaq^5)OdJ~h4FWqj7)38_U#;u&zac;%OqxMbSuIx7MNG`OIgLS{h09sF!i9}PMSxMW zOM;;+UZJyb`3h}W0agY95q}oV)oa)LNX1KZuiUfOe*$-%Gee(~7K_USZN+tyoYkwH z&PbnTkcnkx;4kME)!6sofm*`Dr_UPX1zx@K7m{B6TEJJH|L*heD^7{A%wUsrQ5Le< zw8^Q3QBamAM%bv~v@tuISdT!`f<-K%+FDWy?eArlurYTCC@U2%FkxV4s_EX6eN>f4 z+acn$QX&%rZ!DjK#>J0v)=Rh;99H~bOE}c&Fa2cZ8nH(Q7o8a> h^f=hy@9Mke%}v9j5la5dD<4=LVF}r^qKSdQ8UV}*$i)Bv literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image21 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image21 new file mode 100644 index 0000000000000000000000000000000000000000..c81aa52588bbeeddd4dbd4b1852f64337848af7a GIT binary patch literal 564 zcmZ?wbh9u|tYF|~_{zZW|NsB5-+sOQ@cq@>ug_k6e)R0)y+`kF-G6ue?wbqOU!K4A z^30XzN6$Xld;G!9BlkD$y}f?-ttA_;&RuEmO&$(;7LJ0VoIW)MK@}w@ z4n}@0WpM^^%8HA*D5m zl}E8a(J47M#Yu=US6WNHu(-D1O2HF`T;`o>BJA%@fBXL9=P!3D0p;He%x)Ve9cY-q z&Bmjnz^=HESxAxRPjKUeY3wWvyH=b?IMCeH#<{UHB=J!rBb%^)ol2V`Lj!{h3zPK$ z2EWz}1(`ER3m!N}F|y9uVY!K+;fR0`gPKp!M_0bN`r@Y;GtwCt^+dmj+?g_S#n}!a zA%-~_&Ml2@CDL9?KBV>C*w3h5ZfNVS?%KdHXVTYB29MTuk$SZP**Pp96t{Z$T~J!1 I#KB+<01(g1hX4Qo literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image22 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image22 new file mode 100644 index 0000000000000000000000000000000000000000..6cbd63022a11b1e011be85b34d635c9f8d1ff931 GIT binary patch literal 81 zcmZ?wbh9u|tYBba_{hNU|BP`!`2~ac11c^vbr^sEB+kI3HK%{&>9_og=PbI_z4_jr j-~4S!4%41>E_-!q+dJ;#2Yjx7>wW&~-1mR{Kt0v~`!FPe literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image23 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image23 new file mode 100644 index 0000000000000000000000000000000000000000..e8173a74567eabf2ed7329e34db5a69165ceb012 GIT binary patch literal 539 zcmZ?wbh9u|tYF|~_{zZW|BUhXW5(|en7rC+@@$vMqwOa5x0qa8XL@$I>Cr`I2j-dW zm|?bllG*Bh^W{C}b6U)2G+In=u$WwH(OquQUSd&|ZCRFKS(0v<5oeVWZ511472aB5KD#4WI)u1mqV7wto%{ z1s*z5{U??boy@VCAE21kwaOtt$f=Wg#e$Z5E14ULBmyLvGk+;ESSULr6l*o!k>O1c z+3w>j6xh`4t)VO>>?EeHtjNGAslmxAGKrHhMT191l0jXTfqO;)179kqx_G{Zgh-+A zBxcT*En9=yrP#I=?P_6R-hD7I!-Z8{qcb+1VXA0yimL@>h+tqK9W+BlHBjUehWC_#HJ+1rOaRRBW8lYhXZl}QaTJB1#gZ>@GfBR z;81iDW#Cof@L(`yV398Qeo6Aw1f2t0BhO5$RMd2J>9Ao~SL@-{#muQFx35s3P|4YG z4x5HYhJ!$nY!^SDjKmv*w=L_uoU|kj8dmzK*e*J^LMe2mLxa#%?cH(SoQLt3XuR3(}L1L%N6 zKzbQid<0rNSMRlWeRlW%0}4GUne#GMt;>16&sphwN$&lMb?GOF0I`}mF8}}l literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image25 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image25 new file mode 100644 index 0000000000000000000000000000000000000000..c656fa4f3082cc3bd4672d99b45b9d88e4922bec GIT binary patch literal 453 zcmZ?wbh9u|tYF|~_{zZW|NsB5-+sOQ@cq@>ug_k6e)R0)y+`kF-G6uC`pfgzUY@w{ z^yt|qJCEGocJS`{-M3b6zp-%LW=B%x zwz#q_;rSbbbJqK$t#*uEZX3DOGHkI~@IpP`dFt-78K@0(Kn8;R;=uOGVN!vIj#U4N zB}FH5tmX$O9#E8FR8!$|aNfnG&*+e_IbwoLt4_k(A3WDO0!sYWD>L@=Gk<7gVN+3* zX5g1mVdIjMR!L3Ilw}Z+DPl~MRxX=4D}aHOkBMcrtFpqPWy{?v6lO?@oqsNN*P6`(tKYPwISVfdUR&KkB2-__-1$pkdRUtxYvbVR0 zCNfH#f8(B=9l<2X&>g#Xg6LKjKDNv#?hp?dh6xPbyPKUCab_wcI5slOVE7^xn0bWV fE$zaJogWw{vvo5lDac5sP8AkV^2p+1Vz34PgNm8P literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image26 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image26 new file mode 100644 index 0000000000000000000000000000000000000000..bc93fdb259d6ad1cc3a85a56b579447579ed4598 GIT binary patch literal 520 zcmZ?wbh9u|tYF|~_{zZW|NsB5-+sOQ@cq@>ug_k6e)R0)y~iK!J$irZ{=4gU-<-ep z^7Q5BN6$Xld;G!9Blou*yt{t)t>s&;EnIhb?&^y(mY<)x^jzP(Q|&X3H%&cS(|@S6 zbAMsm-khf0S@k>9YIda7Y>zA35}v=&CvCN3>~h=4rIulf&4L%|`OZ^!pUprGpaU`l z)Q8y9y6hi0R2SL2O5HwKPVO{O&+Df|pu z*k%NXH=GdJu)v8yHn6$HQy@f|K~hOMTGUmYfl@vv<0e@F)=c3|-V1l`+1nPv!|K9N=fcU^t{Pp*JTs(0#(B4JEyG0x25u(x zA~D9eeGeZs%S?Ivyj5P{_3IZ-;v(-p1++Vfu`u+rOS%cNCu#6yG=9)H%-E>(pu=h5 z!vnMV*`*3C0-TOCCVf73wb&p*!c9?P*2Y^!3XIFFH0&5YDELm{U`ROPqVOSzxrug_k6e)R0)y+`kF-G6ue?wbqOU!K4A z^30XzN6$Xld;G!9Blp+uzO{VIwT0_0&s}|S#`5!1m!9jJcdBXX(fUb;tNRX?cJ421 z+nd|8JF9+YYR&ezvMu5H8-sJ!`=qUQO<3U=yWBQ%sb$z=v*3k#zVp=GXERU(=zt6X z`Ne_lpTm>_4;`s~cR`MmIac#8tk}ZIxWJE>p`q~-lfnx3_6X4?hWVS5Z)gbk_c|P0VvtZ&jumkc6?N`NV~}OxcHv=B5o3_-l9Xc`OLqA)JLtxW`hPkZsx#kHqF*Gn$T1ZDNWJm~;Wf1h}xvXHC zaV$?>fM-E!`m70D3|@0M7@qNk^FP_K;6*_a3&Ye%@mU5@DY~}8j~7kxkh$R@z+epk DQ%lPf literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image28 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image28 new file mode 100644 index 0000000000000000000000000000000000000000..88f0d7cea6f0a2529388bf55f40379948abcb23e GIT binary patch literal 416 zcmZ?wbh9u|tYF|~_{zZW|NsB5-+sOQ@cr4V&ySvcy!Yt+t^4n;-+go8`peUopC38% zc<=ECJCEGodf@J+y|>rzzO{P$jpbXeEnIhb?&^z^7MGq z+8tN6B|Lv)NbY*ilvS{m!Kv@y?^!PU{P zyn!{KMT|jOMK-ssy~9b0pM`PVY7C;zl6(w|lc%j+ zw|>LMsnUG>+xR!_+~qw(O`M&rUQLOYl}pZvHBn84Bbjse#q1f}Oir9^atSdEi|e`= znD|aydg?brltEdQQQ(b$+DoM+LP{#~3TgrjYo7h{Rq+tvytv+@Q{aCJDF0n3$L&M~>w|`pE1`N55=q zkh`@YTWRW_t(C|G9V6UYNv5EqwtrqAndNoJxJ@IOwf)?VExRj{{t-cKQ*Hl>Kr+wk znB_LfBqQ^Jrv8qRt@Zg@$*iD5#%tPA=+6{L`eiFyCNg%M|p_Z`mH1t!CkQrY-#uuAo1Yx8-zxcK(}ec6~&)(jk#Gb!<7` z%HF}#`Efq2dym|och6~Qqg;eZi$l2* zt?BxvKZLG4HTx6pPm8NO&#NC9nRHBP_(SA&yW0Q9g9|3db^0MV2%_@@}fyMsA{Z`JN&EfX?bT-jNN2_hIEq*47t>Hj8w( zpOswj;whFng^BxrecM1rU`;S}G&u;`WR5|kK>V+NUzi1e=SC@Lu$*?ER8$DvU!f`5V8DRS9%T)1x5jg;CNAXF&j6}Ab_$}p9mKO(Wq=Zad!Xxg4jna|b`7tYQ7ZG7PDTGErcY^7!xW{-4gA3BN~ zbx(OW0H$lDUk;fk^Azrn z9_#x$?s4rtEHm=ND85Lma|E+TD>-@w^X|sALzoxcsUb%?B#qP51cNZTlb1mXUt?R! za*6y{Z|4|X4!>MID+l{{?<$`Pgq2gk7%hVV2*iJZ0-%9>3aFCK5UXj@z#OLTWnT z-NK66_gte!aaoWN+4J&0jb6T_aemgYq>1?2d!IS;iKxD@{UXJ8cRbc&1CTen2q+r> z%T@6B=1!5JfANvXh*^%D^Tm6CC+jN=()e;Cbdb^k_K<2AF?V6{*eMqwM1i$H)la;S zBFD}ArHUzd@mGnG3z|lVbu-AIp{&j#D2STAvbU|18#g>9!4?8)%$bLhoeHF7G zoU-Fzc)B@s_{XQU+8yNk9MxDE-egouK^7%aze6Lsn4HVC?#_KymV;kLLn*2EmHz@O zXU*xOb>fE|5C~dIf?Z&XvW9>n4_Vhq>GX-Xh zt3&SE$kuFOz(P>Am9w3LguQ`JXK72tt7V$#-xXFRypx@zoP)6Ok`HNvMjX4+dYJoilL(-`Xx5 zmak{Lobg}8{MmF=SNbbY?aQL#%7d2EPbTKS-rCcDj{OI1)&2SprOy2>P_$362?z!C z)(1tz|7Kb~EO(~SK&Ok3Q=9C%v>!t^=_*i5v(By#A$Ykvy;T?ZdNypUEOyO!%j7}v zZL^)j2E+k%Zw8{ZdGM;3IH1%2sYz_~$vi%~v1YKoN=rO;zdTmnVEdIT60}`;%8!b- zRqxeqYmGCqO#KD;8w6eQ2&OP<^7uF3*JIq>=j9||^)?F3EnSQ{9tYh#vP8`F_CFHA zYnlHtZH#=GXm%!z1^xB){>t)~wzFdzfg)IkMJ)c7LmEHuV$mZDPjk6H9@RYl)qbw+ zh$U_BvvE~&6bt6|otn4)uaZuJcfwD*;Tc4=6a+>C5CZ@#rw%}jqO*Z8Fj&c)VTf2J ztB1VLR~)AR{7`zz<>dq;&vh29uF)c^v|^WK>H@lCp?FXC@w*Mx-NJliF^OLc9@iTcbC ze|+1*Vu|&peh4@mf0Yq$zGKr@>B~j|7)Ml9Ij_2xWE7w6Eqvq+n^P@HbyOHN`fZ1r z(*m3#az3#EX|F@{sF>cpfyhd7(VolJiF45nOAR>{--m-EV33A$Fta(!-=>rceIO9J9(Qv$YD!jCK6y6xV62*0eR^bAv02PWkxiSFn@DoI9 zraRy{7n({$C=KWC6$a6yxi5wTa8Sm7!&+tz3`j0j{-CzP-_$1`sn|;GN+vD(tK4rC zc)9~z^i?~LlHdqs+S?NCLv#%#2R7YOF-AM+ddc*AH;>rllB^f#CJ(a|;Zb3!9u|Wh zu1z+M+4>GkQN9N~y%+U&)O#+ic)oe!85$aDsOsg1#akG~1ec>inD_&*-F9}WG1EoS zpX}qxRh>jIZjw)d7{=uDEJcW04TwTM58Fg5@ql{}gP8!-4UpSTK}3jC&ep+#H(&)s zm?b~eh2eY);@9`cnI?8Fo3@MsN^cANx|TVwK5D?HKVYjH(9m^cM0dPN>v3|c!;WlG>hdnI}v`R|n;t!Pn#tJry2CE*%swQB0Zg#QWv+PzI zwX&J2k|bkxrCQ!nESE``Hz5>s63$T%o^3Tb+X_3LL<=FS^E{vl6j%%yzKgA1H9#0T z=yU6!h8P1cBl|@IkUd^;BT=TqEs*H#HBYEv|hs zf2fa~$j(zVgzW*gSs2Lu#ws`dfha*kBzqFxTj}cV$mco`f8y!=Ps&Yq(6vaQZ9C}N zopjaBF8aS7SOWN{qXdgXM>%+?JW`8t3spHVqfaT*cXdB|CEwGBiVKP|2!4%g%dgBO zC;5KzVs{(t%Kq(EZ_(j3{6KFE5)mt(??{^!<=}mk(^Jwi5FIgLfp209>cfKHz(ZO4 zuX-F3yTkfIg=Pdel_*DMnf1+Bo~TNz(c9S`?Rpj5aHIMpdEE8)vWBcG*Pil|r{6T( zT{=8mU(+6LQQ#T(cZ0>$lIx5$*Y>-=Rh-#Sw^p@}+z@VCb@;ZfU>M=?{$f_`{rJo; ze+Q30MZ(b-rA{N|(d{e3OvYdcZ3?mHGu_#VzC|6W{_dL>E9ck|8iwA*BN4 zZUYpbKHkUx&L_d^q(~7FsQ1OCCtc0(h4?+RFFpna`=Jx0vNt; zXR=p1`&60Jk@VbiH)!vI{uS>0*kU=%jUVDxFD+U28Td|;VA({;9VD{#u;eXG#}VE9 zxxO|wLifr^0M2UO-iL&-katf4NMaV=9V9>l>U`p$Du^TkZdZ{m^8srzaEXjnK?6bt zN`=+Z>jcrM$11RGDv2n~sa+Y*tu@$ZEcCz)&s404s9G`vBo(xf6J4i~58v80l7WVZ zHeV`Gi#9&b24BrYCT@6%imux7Q8rR!JsN=W<$6pEGodIE+B-vRpDTuf*m#J@FrA1J ziR31qqdL%cPV>Fv(7C$qVyL-JM;FGeUAu2|)xABQ3w% z=Ka&SGerzXJ>K~^SX=O9=;A>ro1Kvy2ESr>$XK9lxlH8)5I+TE*oEP)Z`x-l30jg` zM_XON2B6G9IvZf{{CgN6OO|m&xR8mYA=UUu6pbiELvU!URy_&F2MI;i_J$CL$GfW8 zNW1!iIj>8bDsS{{*`T>AP*oAi^-;*j@UtGBx7N?$GT2}fN~J9u{QI-BR&NYKCHQal zB43eQhZvtYg^Jt2pC$tbPsE&WkW=wu$7RFY|52U1po$(>-7kXmc^r%Y;0SYAGMm?z z~&w21D``3hAZFJKxz4T71-vphS&B_ZC`;XG&XJU3vmzybs#2<&t zvQAP4KE@r}<92s||Fgl3XEzAuy2+LXA<&^c>6Qwyu1!qW2LqPB()0dn9B6sKR%w9E&-CE}0d7>s}TBROiV7W{C1j%?{ zlZ5|7SI3^I_7-fTo-sdh#{PtgzYnURMI|6jUtJX!=ux?H?s7o(+3FXe+uzuQ=;43+ z5_<7Y(VZ}(q7d(E?_-K9s^Y9-6`!%sRyyTS5y#PTmc-QFUCxprQ>`#*FV0j5JDq@l z7$YQ~)BT#TODbzkHDI+0u zSkH9Ed=6xup=0)$r;cT}aZ^|K) zooXddg}gp@=K(D^77sPUK~>VUH5_KM*v^{5yO(4A?&SETb@;6lO6TiK*B#_0>Pml@ zP$yIUb>{siXP!P)$(tO`rHO;4Q~kfy&VA=Xu|Jkx;_^xqhYqm=Um663wP+p4zk$M^ zn$H<>P@rKY+O03C3BqUdD(BKnBA%0$EgSQe_2lIKW?X$qOD4njz1{!uwa(3*y8HL% z|Ky-QV~DbX<{{&X!F?6m(r%6(zNp2->Mqe$m!|iGtUR<-S^MEZzjtPnx~Olz^m6I` zjzjdb{#IUjC1?GXaLG9DzwUcQrp^2^6-BrHmMegq6N7^pyPcDE7f5}^zONZ4z>FBs zz$sx21x}^-GSN^L0Kb(MmQIb$O;J1E8k6lNDrrz{`SHjQ4Gyq)u;CuCcF$Kv!q zf3QYMfA;!6t9`JUwY2<-a%=c~YLfP8lS63BJ+aLZA>wV#R-imN`D=tTfl30dj~gTH>x`S_XYCM>E`_r3h3ckNi8x>mKgyH;fd)BCZT*9OoA&i#P*yoZG{P>&IZ*_!enzz}^}bIi8J&N*iVM zhqqGx( z4`O|#$J>wvxH(x}1cN6NHNH9iVx&ozG=FcsBNX7?W&;SSyJhCc0O`g82oC){>%mds56(n%MC#x zK>S*xp}=h4t@e%Sa;Trh;n_Q;RCoZY>LgRdXuZM^Q4fYVX@r z$c_-ad273s_rCt0l`~t=^5yGSqIf zL1WY+DO+w98J4bPeC&PLr`YlG6o#EZ{|3oDecP+eMJOH(zU%r*7-!#ekpvuaP0|KY3JM|AtE+Z^&uwhw+``^0+99pYVL_jX8;=}((B5Ktnf4Uv?#;p{+M9FZe56Co#R;!um=n)I52 z=F290QiVT%8fns6&uMG*ZR|3;+P=WstivhMF@_awzfYqqZrrJVhoxFFqT8>^MBMhC zrTQZsHrCXrYdv40&GEiJoQ9ZErYV<~5_pR?dzC;d>wKnLZu!py(Ov>I3wPgb7IBQhv%wd+lz~U?Fj#WeMfD5GQjs zYXPE5$f_7l33MM|$@;|=patRbi z0YkfY^16bKCE;!EJA78Kor--Ba{>om-OmWWvV_~X%p+| zZRi!QdTKmv_*dld3?K9I$L7$#qO4@K)%~7y+`Jp8j|I(mox4Y8Q32n>r>$a|Hx>}i zv2@x$Z$&v&HB(O$dDWGQb&}@e*TNXml1;|4V1>OLOCV;0HXR!g-1~0aWkgkVrN56~ z+#w_!u>bmxS0RJ#BM8RSg z;3`6@2)I`I}9T|AmF%Y zV}#U>nZ&|bAz&s<3?wLPK|zR+DtMECU=bTvhnA`fC_tbINLfViFry^{F11leIR^+R zQ8c2_2&nQ0AP1m~oY1Efz;rYR3uZxFW{7~_RF2thDzI|_1Otb`bX=)`?LxNVg<*&W zn8FTS%~rfNH*`=)1l+}SfWuUdPAZG7Nr^st!POEI7*Ddx!gGQ=GqUP!!%_a_p0@+m<@O>t{y1^!^AmIzk)hfYrx->Vq&@+1b7=#0%4g!#M8t;$ zzTNU_7vntsB0n^qBOy-$YbxUmxO3_kq_*LjcW4CsGc;OhkN4B`1)E0|ee1EzbW;PV zzMSd%(JRT~d{5U;cgqoCBT^k5;$X!A92P(zaRKyF1SkkC#a=Lx1`t@GNZz1|&*wI< zLQ?ld6AG@9!d7gc0kBav0QLq@CZsD)_|Aeu_k0x`Fq<6TEC3f}BX5ERR5cJR6|1mk z5z%CJz;ZA^+<@vVEIqMFjK-a!K1X^M7zd+SK#3yET);1ML9hT*3RN3(qwVet3&M?;0SfQnX%I!LT1XTKp`b~Ob+I11npXZR*;2tJ8lz~9xN znkZPY?N;+{ot`QtQO;=|92>baTtL$rWCXZcES>y-chAfa2OKN$L#!)a`D-rifzFpb z3Lklgl^4_(K=Oo)F_n$}nQ-E1Q~LgGG>j_lR$iXdm--;K3GPD@SJ6CVFigr(7xQ7* z3nY0X*G~0GBEmpCchB;Wl`52k*i`ou4tn(_ms|&ODea3W{oFy{+(@{23l4qI;Y1lI z3Pu5 z_Q@5XbQ%{tS8nV{%CVaunyH|rFx$Et4Uu|)AI8_zQv}@lnkKG9fQ-9oNYE5(ss>Rs zm+*Y}M#wD{F!3JL%o*@1I0&sBbqB1I;ZLs}oH8M&My^)1-WKY?4!7vHCKkQBs}R_8 z@kB=qa{wB=u!sY#8t9<-oN=fKU!I(6>Qc}*(Z~i$8;%*fVZbx#3vkD|gK=MoZ1?Uc z;CJvnM40}CxlOGjb`j}R+}TI@mfURRouhB;hLE>^ZPUXp-nnT1F%!M{b&nJYC$p7x zf=+I(oI=%=x@+j^XkK4Lc(K7F8N3*D3>Cp)VD4#IL(A{I z)0pY6E+Tn=J%VMSvAR@2k&@=;^!sD(I_G=7pt8xz<(0>DC~@yl0Y=v9jj~vyUm;3P zx%8kMbO_IOX@UfLCcNq73(1!P&NraotxroZfdxKw%?Au-0f<785zBxAvX+LShS@*^ z0uehduxh^C~IM~-b8Uvg@5~iWR=3Q#aJ^Wgi9kGa>s-D+lMZqKrDaP{uZwdwt?VXRtK_5#C6!8jprbM%Ed zI|xo`rsq#&pa0b&{I`Yh3$2TZMSQGwJX_F5MNow{XgQLVa#Y`GAL<1a#{!=+&6&Q7 zyVUrQ&P$rgPQ=oW=s^LJ`?ESnkM8uD54n=rWw6)UobP1)9b(-Awia)K+n$#>Oy!$= z*R3SCS*0Lr3XoN34bd33&UEN9yXGQWW5^ta6ah$4O_M`mn@{)sBew0Ug|48Y_JxWr zvOrP?rKrpI^~(3A7xjvZJfep0MRZEJLLjMfBpz@3oxO7k;vSv5 z$f;#c;%5+w2gWL84{HxZ*}G41>|4NOAjcknB$RJYsM)TwkdyiD-q*L+Gv9#@;K)!q z1(LeGwAEB!>y~4f?nlC{k4c`N(42(#(x1|ii|;4}Dwi?s)C-XNI81)FMm}1rCFQ-2 z8qP$Rg2pcD2!{sp%b;5RWm=PcrN10X-}PO-QCf@~jN8;2)OQ)I&om{BUT)Ys$emHW zoM7FipW`4xw3>s>1hmb8{A#2-ITC3lU|YQ(ttPlzJ}ob+Ex1VbY0PjRDynJBs1T9w zR7I-T4`{eRH9IgDI)Av=DhxCH^NlWucR=b;)wXzNkB9R zPv4;?(J@vGYWA(kTK&$c$v&#oQMik$1r6B5LLO*qSvk#lX}r3xp`uQ#mBty+^lV38 zxOf|7-MUf%G5!@`bi~^v%iFBmo0kNsU#hlJvAH0shGJ_(W!dFgV~z1cmk21gz3$cp zg>A_`TBlWRm7~OCL;hExuGQ@8Lg2c$pqrrChmd#%)9D2lJd!nis|Agd^8dEe@r?0d zV&$*{Z?t8+t$Tb=HBZ)}wRcV7kNnEVl;Y6D;*j@>miZicL#S>qgUsN@f0~Mn-2Q#e z@2C~{N)AY$dolm}L_Wj+sI{8WO58w$rjqHGwtxpfgh9pxAw?X(axFZz|?-%-yDdr`#!X!&ZAV5B0s z^^OA6pcdj7w~M()Cy{7;t?{cuVme4+uVs&0ydvfH3RHuEU_+#)X zJk>yP8vFjf1z?5Q%n7h4X3p4lVvbm;-(Z@0l$pMq)==p@jdRqf2oOO!e-n)4?|k&l zk@ipWuG*ys#(v%lwfW9xs*4>U2JzV9)IjU*0u(SK_^UwPEX2XT=1N(({rf<>KKCZX zAI(5ehiQ=igE6s*{MSZ3vxGl_DlgoO8t!G&`@?wuyePUuz)PRv?trEk;gwf+Ohp7t zwNE~V87j&>s9fxwvY!Ky!zRAXc_g499{e0){%+%5nsw51hu*3i{k<(_Y$5!yG*m@R3fi2ZG}OaO}T> zSCXJH;WwX76+fE-)AGR%qUTSln>9b)oGYN<4+bX(Pu4g^eizPFSUoz_7)HVk4sg$( z4ByPpL-(Ed@xlVlp`uGK-v(Pyob-xv^y2mxws0K8iw^lptN-rft>$>G=A>ulc%|p4 zQC`_6<&^XyKJe$AM_#$izS=p0*bX6*-HDWa$WmK(!H$~k12Xx9A=?3&J$I(2vhe)y z)4%VL95Vj&!(X_zQ1O+Q{RJwZh7?gy zIT7-#A7Lg0J6z&AeJFV+R?4|n@-8XI(;@C%(kk~7_pP|ZC!b@Q&MiF4bu8g{5mrt3 zuk1Hgz1T5j*J8>}#<+T}33kW3*g*|G4qE*htpSZuVKbHgmY+Ww?!c{)Ptd4q8M=%J z^0|a+UvqZJ`qR}h$UpZ_|A}r!Q&EpqM4!p)UMqU&enJ1h1>f!n=78jCsAbd;B;q7~ z)`5$sD-zxmFPL0^wxGBe zrnE|c*z;Mss}Mc$pfwq6rj=tRe6Pn>T8V?&BUVekSFMV`dW@Vsrc>`-MI2Wl_~A*2 z?%W&Cu)mIe1?3$o@f=O0@&7X6AGIe!U;JM3;+j(4>|f_(arUBB6Vd8YPYF*o{*}(E fqurXF&YIl_VuuXjynpR&&oP(TU1bOa;QYS;rx!D! literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image30 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image30 new file mode 100644 index 0000000000000000000000000000000000000000..4a419504341d1b3e30f403c18f7851fb83af3b86 GIT binary patch literal 663 zcmZ?wbh9u|tYF|~_{zZW|NsB5-~YV(^y~HepU>a^c>L=7gXiDwKmU65-luanKb*e) z{`i%5d(XVycKqe~L(kXjf3|GblZD$J&ENWH#`*_S*4*n|ey4f<&6-))E2dv7opLp= z|8jcQ#gz67iLK{jo6benpAD-y<6nN#qwu(6&QZIpBUb5$%~B2-#2;Xw63_ve1M-Ul z+rI;o3o1T|^!4x;p3JeDe_=(5*V-<%8$FpXIxX~W2YXyvF~djfIJ3$VACGsFXO|rG zyD`1HMoB15%~e=YT}@b0z1}HY#wj*FI$TLjq$+fpw=6@0Is>aZBZm_YgTi7}XYP43 ztCZ(5Ni(oF{a zz|_E{&R1bIk>LOb`;q{`35VaYtl_<{VIts=y+|Na^3hkTkKP?jwPKM&3!_z4 z#2{2K>)YwW-b%^V zO$-W+&l_16X6bem2z}l)Ro6d;VL>9p(}M&tIak*^yZP2U{yOKkt2r^&%!4FCd{ B|6%|D literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image31 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image31 new file mode 100644 index 0000000000000000000000000000000000000000..60f13ed5640d2c02079e788b2c37c2a5ce644ed6 GIT binary patch literal 78 zcmZ?wbh9u|tYBbe_{hKzP=3K6{(yeKdIkmt9Ux`^i8C;%_w=tk{g!|6oJF^~H{aXy ho4-xTVcN6KWv@a^c>L=7gXiDwKmU65-lx;o-ygs7 z?%?@1d(XVya`eUeL(kXjf3|GblSSJf&)@oJ#`*`-*Wd44a=Ur{&H6bvYGz%poPMoz z%GHdni|Jh#Q`#>iww{lyKO0(e+OO=SN8xdo{9|@mN37Bho248wh(EwUC7=T`2jmwA zwtojE7ih>BGBC7tp2)G9e_=(5*V-uGS;w7~&)8WUI@h9N*Lm{sr<*B-Hg*qBdYZhP zp}uHcO~=jX{|!N042sSQ3<6F}jOxk^tV}WtY+Swl6DLpQVpW%8kWd$9WD;R05@wK7 zSL0=HUdqJLxOt1SD1+o`C&gw)K2;~S`ReY~hZY=FpFQ{R3K8{X3s=tbVBm0Q%rztW>d;)!C*VipO8 zm=zr#ID%vp=Y10?DD_}sU}YCOp;cwFa!soCQqPDIt*HWyPuLiKoV>iCQ<+ObKq67Z tiHRY`s!8I@Lq-NOhHH7H*@rZmnG2WBEnpB<2vcO)%_ZkEBT0b48UUxx&Cmb< literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image33 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image33 new file mode 100644 index 0000000000000000000000000000000000000000..c1ecfff6c422579fe3a52ce0a8f3d5fae17acfec GIT binary patch literal 598 zcmZ?wbh9u|tYF|~_{zZW|NsB5-~YV(^y~HepO0UCzyJK}wfmpW-}-R+`upQo-W@pq zX78ET+m63nf9UzLT~8Kme>`u?qZ#WTOkaP$bII-2g}0jL->jc=qh{9i%IViir(DhJ zzntE6F{S-NV(agZKjs)B`#oqdWuDt#WRjxEjl1HDv}SRW*jYcQ1q~ zu-;{DaGJN_&aQg`QVil3m|Ph=PJWvxcbD(RIkkBbSKLxRg}q=}t#R8YhpFP-+ztkY zYmS*54u_iZzZ+%UIk9oEyW&wU$34jj44br^on|b)x;EfQzrjfsiwO@WGw?B}d2n+G zCDkbM&(^3gC_H%fD4*Q2jWw;sv2A=x3k(a`8Cn{d46W0&8WNZrm>B=m`Z6SlbZBug zfm5wW?-42@$JwuhSz)%r&|&l8CV!ZQm;lVl0HyaUKVB?cz~fJmAgYuWzzu$ gW+vvacR3%5rr)zxRVbRlkZ}6Ja?c>L=7ohM(e-ura!=7-bQ-ygs7 zZr|D0+m63nf9Uy|{m+)|da`KyuJDVoLjkgqHKMP3M9tPx+Od^e8;;m~+%F>xfnQVY8G&2Jr_Ns0VaFMuGg|!1m8! za)CvOh|ZBElTK)GXtMUNbTAEQIlHv%^xLZaQ4?K^=Y%*3ak8pBS)!|~`uyOEBfgV* zGMAXeUJ?>dXl`juP-Ws)X5dznWoTk&tYA>+?sev3a1vsWRbyDlz~?lpZTX6oPSOmV z42As+j65n+7?_1Umra?^z@sL^Af&c?)v@DIybOXu+zgWa;;Jm{Qxp^!_+4hntDOtl zr^LXndSv#A7cXDEe)HB@m2vIz-E;S{39&IqKYRDLnU~Rs;lP88NLB`3jno2$%-cJw z7KoG-EL%Qff46r8tA@gA7n8cVHy8pQOqi@5z-{9Buzh2y5aU&!8iyYz9PEtd3h+n> hJen(ZAew<^%I8!jCI*#RD-;S&ZdrM`%#ne?8UPMtyMq7# literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image35 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image35 new file mode 100644 index 0000000000000000000000000000000000000000..aea44f3017ed8e76642112cbf5db078c47286841 GIT binary patch literal 724 zcmZ?wbh9u|tYF|~_{zZW|NsB5-~YV(^y~HepU>a^c>L=7gXiDwKmU65-luanKb*e) z{`i%52hP9Qd*=1_<1aTHdcOY9^ELaQE!*{E(e}slwmh1#{=xM1_j{M$XtLBxrZU4)52l0is$w-Xa%1B0T_PAvvLt)tn_(xD8D3A-0- zY3yc@(po05>m(D03j-@3E5nkwWuk%%3$(ZyKFG2%s;e+?%P~k_V>-p4s&bFDp}|SQ zhK=(n5?p`KVagmIod=EEn-UkZ} z8hwNsm=9SoBq%Id_RC$^Ibe=J5hH^d18=BC0LOtN+Zb8eq$DOJb@&&nY|grSYU}Fo z=?p(O1Q@<#hgGu~MK~CQyzbOV+d8A_d&1QQ0mYyfTNoHunzH|#pmd-z;Q&XhKuhZa zh6m?u`I-1aL@#kSFmgt!lyL-JbJSUITP`lEajPLbax%8@mm3hOmYuBoq)|a>2e2LLh zan%uUb>y17VM?=s(Ca%45)&4D7vN@;GT|_2;9+a^c>L=7ohM%|-T8R#=7-}~-t9f} zdi|m2YxX}|w(H5F?T_bec{F4FgX!z<_b$KFy6{%>{G0W2ZdA{_UOMG!cJHN>_6rFu z=VP1B`In#cC_L_xf6OlHh*kPwWzcZA|98Nqgjem`af_VY*3mQprOPWc>hC14D$^qrY4VA7RCZQ2CfRJZo$<3YoN_-4rRlAEPkQld_toG3oE#af0mLVk^#A|> literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image37 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image37 new file mode 100644 index 0000000000000000000000000000000000000000..6c6ba52b45fcccf221988efccd1ff0ce4aec1665 GIT binary patch literal 124 zcmZ?wbh9u|tYBbc_{_lY|NsBDAAjC?@@2ucN7L8ePi{Z&S$y0v=cqya0S0V92P6p6 z%fMnNaME-2UW?afcmF@8-j|YD##Xp4=e3_p!Jd-bXm*|J~c%Tjwc2g*F#C>pa%pI(L!FT<0=)EZQQ6&SH?@3POMP*7w#qn~SV<9&?e~ z#p5uzEINlt+vG9Ux%5R2jmM&LnG{YJsf$Kf=TH_|BnB17V3nWhQgFh)nuHIU=2c?V|ZGs90_n zj^LxqVfe7Ca2b|#k}ive$ewp-Odk&800Wjq#}Itr90rC)LNaNVEV^YE^&mi!2yhA!&Y&D1(d9CbbP{}T zlec-$J|1h4OXqQD>%0TL2TYSWOcI@nTjY=!G#rmbWHE3gq9vybM>$ZEen1vOr&ux$ z=rFNF9Gphd#bFg#bR@w?fqKA&rmG7V^1(n!gaa-InQ1)Efq=Nd^fkuMku+YtQ&LWS=<92a5 zjP*q(=fG?Sz2Hz-T|_SH05Fk8!H|f$mPjbZ5{lFn+FWPxxD4)rA^+Dt0v2-srfZSM z;Bn~(M*g3h_trNLEVRj6U*{?)2nh)Rpisd7w+#Nb@xNI>3+)5MY!qC&@pdO9pn5YS z-OW!5)>3LNyYxidPka}Kj~uKNu#`(1d!=ZZRM&Vy=WR=hcPFk3XBa;+utsUEj`7^u za2WdJ^TJIZ0T~$v)p>`eY-bWKX1n^2Ej9yRX&wUU;< zQ}evun7EiNFd2n@3`kYB{T+DkltMATCdjDMdC|#{*rT^mGZNj~8tvIe*eZu}o%(bVreIAjj$TP%oH@zeA zrOacdgcs7bUO$S4s_c)dGe0rE*CJ!#D<^Y=dJADWMG95;?1F*A@Dpht*5<$qGOggV z?}G>)X9t3%a|$)GFxM>K+ccM|{YDmygk=KN-%(9Yg%jl77IlxnY^u;g^0^@0$O`Q? z0w3H(yS=3<)Z~?>MM$i-J;IcVd2&RVqAsB0?EoAB&FxM<2l6sjibYW=>MsC8l3U_7 zK!rehVhYy$g#DCOpt$9|qU%q!sgnXia*CR*S9Of|s_gYRh@^n5vNp+frIMx*mzIyZ ze0WA#ie8Lz0$F%edp*^3G&4NkG$1R^V!ESczbY(Cjtn&0kjqb-HI>gfWBb}kvywg4 zt`RPv%nKaTRt``;ZMq>4rVx=+A4l5gS(ethW^t`>q3UP&S?MLGoFjQ-%@hkKmF=+y zVOaBThp?5!F;YVezmFU@-#XLdymkkxxp722c`BwMw6k{Ycu%Zm*Z%8{&I-wp+9nT)$Ot=}c!I z_W|$18LAaHXbhWt#iaE$s!%0)zBgrm+R@(7S+(|0oa>UK#L<40YIh%q@{9gucj1^n z6$Oe8-8oK*rIAM+-j`G?-(P=jvhoBqN=u|ljJ74^vOyy4`R1V+ggh|@Z3qY!{)Wu2 z^>MHp+zfwT3AUAaPDtb^opnb8)Xe`P0qUc{^fArAV>{^YY_D?Qo8tHjbU&Z%&|NAyD$Xp#FE5izv0TL2z?<}+oXYGu(2oIjDVA|6% zKtx?rT{7Il0sa8pJvVVnX5Wj-RY_QbAKk?4jUpRSYuY$31n!SII6xouHA zYFI4Bl_>ZK(BWn1+rTYqRW@-sBj+S3ssz$dFu#^l+LCp>17j-Ub*>|z=cAtzOxEr3 zBw8nX3gDH{u1aE;n)OYIKq}hZPw{a%^>t3~W-4LnN#gc9n$9+5@5CzlDN-K+VAHg{`ViCgQGV3r~CD*=2qm1NNPb!oOhyr@-T&qV?A{%`YL#WqtHnV4l^>Pk*Z zaB~SEXbv2ulcztqRbroFF0^Pn3@2|1!}?bSHVi>*P#T|qJsNs!We7oT>o)k#O`pSe zZjJkmE2tz}sA_1Kz5402wh^J~ayr-KH7vvwo#!`}_3B1J>YZIO!l#!#!$6xB4hBa- z{CYqEd^cpJ&W^}A+9ON8o$8Q#9w(k&U-EKM(A=WU@hG(j6g^8WQo*-12hO)&6Pg(e zjI#(z9ux3y^C`s6*q!$80r3N!qu8c~BZgm}wQ-$0ytRNzt`!9;3r!$R^onS75M^JA zJ}8LoCQ6OhJ3O4M=s(AbIQa*4J8RFTo2N)kV~jP{F66u=qGKQb=h(V)>FM~o>n8QB zNrTbngkpC<$tl!xlW}~2oaa5Tc#2Mm)JhZE%4REWLwQ#FLGDVZjiR2Qjj(hI&Fz(3h%k0QuLJ_*hO z{j_0X_BHuJZp3z(ywkGFH;+T#f|Q=Spep0OUFJxR@vkV1t}P+Uw|0eW_xDa?tEnyJ zZz0E3q!emuABN`m-$%Xm8juB>WuEqp;k#)$_{Cx@i^qKL_@5uFI=e%&vUuk3p}?UR zb?g=a!95X809wIDQuEdswO=No7oDXe$-M;E%@=LOe0{T!G znsw;JR>Ap8QXdbuSk3w)#5(87^U)9q)qq>YS_^~m>#i?e$Jg*f=_V};OKvAqE(rg# zjy005y66$zH_y2=)2csv@#`_KhJpxqn_WIN+(GicLAIcX-6LvLz`n7P5}DI^T~Z7- zQ0~`K_O^55xSr3{U;mbPv}u=OXYl<#vQCSv@aKBA^y`lS{SmPQ7$I;f5n2>TUK`F3 zZ}yZ=lvMI|E#LK|${ep9Rb?W?fJ{_t!I`QEn59?9-AV;DQ;qB?uR^4EK1$)xckha3 z9ZNL4I6wD@x<+kgb+sabj*I zoKkHOe#tB@GEvUtonH5j?)Z*gJw|S@H^wQg__O4pFhKDpu%vY@$gp33yV4GT3NBOE z??r*0oDxl+@>RquEA#pO6Cw7j1`v}J`sDk5NaJM4sTDYQGIW_wICxU1k}P`lrO++5 z=xGGaq2b84Y0)0G;14NKdVyf!lJNWQM}RNGFhc@h>C?j3wVeAL!1qp$ygR9=;dD0F zqnzWEwhL7o|T~#nEoF$!whd^d^s1^ME0^oia7^z`AiZRd900%G2 z=C9d(sT6*4!&h9^PZ4qX8bDYPdaiCtOnphH1}0vygvBliRxh0@{w5T=Wi+aL#Ql}% zZ8mLj_DEK17{4zf!15%;ZtN2Io`D(ZD&w8iU|W3EvXg3 z^rTb5&GL*9#^I#<;g=J@w$(&|)g-Gqkkt)H!`4-|09lxJl#r5z`YFgIgvHl9k=naz zw^oFNrgLsA88kG&R6ppkSA;HI6S{;7zus%2&N27oHw~z45>1f}gh$mNBE(uCHIrEd z#umlNpyF?$RWQ&+0HmT@=-C#34+2u@1!4~weaaOqN6^X>!uF@Boi7Fa6g7{USnt(Z z&+7`j{*@*~b`)86yfEhu(?~3H%2kYlH7kyfxf|YBYZlJP_?W$$f z17x$UWQ`7+7`N6xM#=5BN5lm+C-)`D^h1yBR1^Q@S9AB0nL()eFGuEFj}rc+OEL$lX~EbWty zZIYMvL}xMX-PPG>kL0VU! ziOmxSiCwRUQua2(8USfu_qPpw%McI3?&(u9Ob)SDFsC(zLWXR3miT4XQzVt_B!z-h zdHXsrX8Mop8- zn9+X*qc0VnFUlCVmh|r=%Y?g%^}DLu9bdehd41UV+>BHO3FCVM^OAh5?eH-^H<`c2 z=+1OBKTej+PkIp`rxc(s2?;6H!R<)GrK&1Zym9vmah^YYD}ah+b_$bVziOo7e4%2S zB&V%eDRM!q1E>@@Db_S~ZmrHQ{tw4hi}M&NtmHNN4J`bn8}Ow<`E$2f?Nl$1*R zG?HV-1P`hdjSoOhv$V5S#pcOd!>)}cQcIUJ4>uqG4SIb12G)d*`7WZ?kMO#LH}QL7 z@CknCmZAn}*{jG$=XbNW?5z491x2;gk~Dbs$#+G!GUbmsdjFQBCO7-EGDvwl-oJGG zLR8L8u4hloDK<`>OQ4@WJ8=HfIwu(I@0~i4KvhzP1`zxMn!GOTnFFPp#H1zz)T9cL z0P?soimxXyLu;tmW{4U)G!M^IUUs1mOX|BnbxD7EA?2(IO9od1tfI|)fx(Gi!Bd= z3ExXSl*JY|X6J5AU3rltJT>i$%9UrY<2LR3OE-!dTw$UsF!w*EvchU-4SbL@A4AnrN+`qqE1J*7^DvR~h{6*_Tx#vj9f zovf4+8gSxTK!AhxABMJqZ{gAzTctqfld3}*d@n8tNq$$6RM-y(GnYX6Ftx5|bB0aD zdBsZpA(%4lnQ^bqz)9ph|4Ir9yn?^@KtV<7 z&s!*L5Q-0N+=4&upOee=Elqv>7OG`~5^_x{wHdbWKrhc(AZ*FYUmbiwRHN}(IzuIeDr-%(xw7Evv4pe1sZ-Keb7> zzPGNdiEw$O?o3Z`l|W@!6F=35;xslbAA{4YSp!EbUL9G@#puYS8XgT&H+cmi7=;e! zUwl#aejrLLatE}!ApRI3^ym`R7A-ixCj8owwlG5bkre%&dnEJ6ky}v2tVLrFp=P@k zq4lUHZiDfkK&zW|?Hj)jS!0ETq2iyGK>gjI{3s#Sw(^1`or0+#b+&#lx#G%nU1W7^ zy;-v~r!GaQK~X<;eA-T#vRLLqF`XrK&hF!|3zgN(3iCTL&9Cb}A`i*NDff&iBSsAI z;(>h`+RviY)snccp+??l{!%>X1-|onMT`9}qlxa_*a}(?RAjH}$oqX^ugtJdrj3R1 zHM^$5Q#hbE)X|ZoeS%^Wr{4PIv&YkOAD#oZJexqZ0I;o@&Lco>!L~Ys+mMJ2FRPI2 zy;Vnex0hr6DMe4LE8zBx>FyT+26DtyA(qPFa}p27@SE2ha$}-ce}G< zw$&nG&K5d(c9(UEmFIk3^)uAZQ7?D_gaZ*m$xWa;-GVDig0*a;)03jRNwk5hM;^bR zt(k@eys#3`u%75Zh<0zdnE-|MKSPF7($Ceo^ZI806@RfZ{G$(Dt|GL$)e{~Et5CTb z3;Oj-y2Mz~srXv&nE+p~{eo-}o&Wq*!KsTfG3H%`mAG`sHAN|UF!=UYn z6fch!Gl(h*CD`Ucw@8XLoT7D>F|01t&b+Gc@lmyuTaV3sS1I`B^3v zK`XJt6Mk0I;zX0f;#I~K6-CL$G1HaK)%6~jm!D-X2cFJtYQOYd77EKBko%Z~nG8A` z8k?dsk|S|d*QdpyIpK>^u1)4fW)<8%j0!yWj>Z4Sh>gzx3iG2yCAK3tr9d09$}c+> zcn!CTN;@Mchvuln?PDO(3=AbssUy6FlVb0DLl&6?ihil;A!8Z!ti|=-*D_WraVE0Z z{A}5iV_$hRU2!8^>id?^FVhNkXnu)a2bwL(?Q47BWltTEN_j%%()j&qk?UIDKbpVq z?R!Mf`l+?XzI|s^!}-5jz5h<~q5o?4L`q>}+a075IT?gTV;*!}k-u7JMG~u)NojDN zT!QMuY*H8%(8oJ=vi=}TZxN$`p231Xr{%mHua-7|(S7K~h|$1q)s5T0eLgCAa53jb zHvr%z+M}ULNJ2jSnA6*P!suyaS@jb6I&&5}-3vc58&qV9AXHyBv!XR=h%a24EcJM! z2jNP&tyb*6RIk3-HzKFMJ|_LbdbQqOT-ylgAcMwXG-dOGPzBmYMD2#P=3jeFFkGY~ zgiOEO_2pMO_T}9j&5*BSFORx?#UFX}Cn-nbk<}ViA|MFjhi#8uNYEC8(}L|AOvcFq zrOrylEs_Kc-6!)=&+xUuf!P^6{X;`m+YZtLQ`ZcX3+(i}n635O^kkhPkdR<2~UovVfmPlN;tw+8Po7o`i3CYv3uJImjy9TK<|E_L{-8cWl zzl$|EQXu%;Blamp8kaB#D#vXVy|a9!5HV3X-{f}sM>;WZvBO?lF$$Br8-Eo5{mm>4vNyS%$R^-1Tx#pz~#d2K{9E6u$g zk4X!iZs8<*I=q;;9_o&PTq=O3TKYI*-E800M^%?bZ!9P5XEqYWYq(gN8K&xMX;HqI zNxd$i!D-A3)Nnf(PJyZ|9u9{Z2`Yla+QmqFF_qTJH` zc)vRSg?wj{BHLPBs2(uTiIBJPsgm*S&r;en&Z39l&LaAMUX=l)QyrV-Hcd>x%+7?w^$w(x!Vu$OQLt`#e}(eS0hD* z4&DG02b$$P+4yOz07db}_ld^KP2 za$BXJY-xB=&!fnjoTVJgDC3TDziW`^gTq=2nIaj_UPAQh1*LXB?)wqMC8bw>>KjhO zAb2}NQ9OWOJibZ55WsJE?q>i{73Y0_Mhs{%WT1(3t9y`At9DhEe0U4xiVcu*u~T=i z{Fpy2-Z8^;uM&-HYPpy+lcvHP`Qnz^d2!x})4Do8qMM&NPT+BG>w9TSy(l_<#%r}B z9$VwMn^HA-bJau`a>JfaTY0y?O#BW(5Ap6*F3#_|++bIMF0m)<$D;a;Z5h3=ZL5oT z!Rr2l*EFeNI3==vR5!tCqm;d-ipgiVJf!gE2XU91^HSMurqknQ#5MNPsb5l`z zb-%=nyv`b)9}mm88{Fn>)Dc!F(){245_nk$h{P-bk5vo-KQs-=OnL)jhu5U(vz7U} zmSpVjG3U~>zVemr>uD@|mwM6A!_EUSb379iO}D4m@lA-zyV?;0{Ge6Gc$nGkdlMdM zsW(Fq#J%1uR=}ejBhH_wBNr5B4JH%2^Tj^n`Tw1JxAnd5spNZPr`7YbE}P{~m5C3A z#k%g`x8P^qp_^X$=x7aPVK4UK&pWSDs3+#9Zgiy#ti8Ecd8)TXXD#KC zzp&yWM{efomGNpoe8l3lppn*iWRL9mk8<2?)$OWgk4mA^1(fx5DdPYzwi z3*J%X80_e*|9G-2>hYI zFtzOTT0_-#nbl5#+cc&!pUznFL`L*Pio@1poA2(aJOBRof932#VNq7&_6{9W9X9Ta zEYXP(4E#dYmN_EAjMi;BArs5H861;3mm4;$TD@lNy7e12D(SLuaWb#iX`;&D!>zN! zit8|w4m(%U@grNdF*0$rab9!a|}f yRyL1Bc|#&hU9KfBWL5D=c<9$4$tEhmVBpYksIhQS#miY7&eM)|D>*SRSOWmcDTjyv literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image4 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image4 new file mode 100644 index 0000000000000000000000000000000000000000..9e5e46b7e589b97a19ee9a61510ee9bc17ec6932 GIT binary patch literal 268 zcmZ?wbh9u|6ku#(O^JZdUTfOXsX)os?FLo!v+y%9qt{Vc^ zeOvY|w)URIum271u}bk;b}Ec)sX{GX-93!?shz1=9EB-f{Mos@eO_k8rE{w)YN{74 fTj^U_vMMN;S77s&#%_WA4X^Wx_1*xl#P)#1j?+`Prsv%S%&w9BBZ z#h0YOjhwoJleBt^u5p8@VT|WqbDdObmrG)jLRySCQHC&Iz%O3CFG_(QKY$%Nb`2Ue z1Qk920000000000EC2ui06G9906+!)U?+}bX`X1Rj#ulxa4gSs?P?le;Cen7fP$tX z5C9200Rf=UNB|5C5QoqWD2C;aQV=i_2%LCKE}PHjG}^*$yWjA*d`@q#?)W@P&F}lu zJ!4P~P#O_T5=#|11QG)S8WaEr5d#840F4fdPf;2Q5sr{!5T&N4sHv)}tgWVcu(7hU zv@3tNxO@P+09U!ce*i`X4?I7UQUExeIXesh63kQ25@XC71-k?hz}?>8;A(Z_?A%TGd49WCjZ~#EDLQ`@U0D$=Hg(X3}`diD^-iEhuV{(yemUY&@I+F@(e{pTsUcFEgT$y$|3o99a!rHkvv zifV@otN92jxeCbJ^UK-rN|~~V+A$CZbU?~Lb~&(CKTzpY(d1!$WYIH8#?6t(BUd@# zu+GW1&$+{O9dx96mp(ZWetK)wnPq+*3=!)i))bvqy_?k2-X}iw-GV@MQ(IT##w&|! z{M5_d|ELjX)D{ur=gSRb=k!ZSZO^lB?hNKiwMgzZ&zfR3ZDK)y;M{rh=a(*8yhLc( K@)au-8LR>A2}d&k literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image7 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image7 new file mode 100644 index 0000000000000000000000000000000000000000..0e6ac10affc148be9b65f15df8eab96954283fbf GIT binary patch literal 551 zcmV+?0@(dWNk%v~VMPEW0Q3L=|NsB%?(^d2?bzMt&(-0^&D^}j*0a6QskFS=`gOjv+i>`5lsc3tnVT|WqbDdObmrG)jLRySCQHC&Iz%O3CFG_(dSg{>Cb`2Ue z1Qk920000000000EC2ui07U>K06+!)U?+}bX`X1Ru48t&S1iwTZQppFYrG~5JszN- zSpXy&LSTV7XbJ;>pg>6g1_D4t!vFv<5--v?C^(A4>?FBt2H)_wd`_?1d6v9>&+q&H zfPsQ~EQN-Lhj)sLjEfNf1`-Yr8UX?l1ppKp2@w(k0z6?0JXjG800GC7@VG-8x7RX$%W`fL>8Y+C`Ayd>$lrz_`bP02g zw;XZ+IW}+fOgJ$+@%VI2%HX p9!C>oFs}{|$wd>cgW6Peskb~{pxO3~?&AYen-?u{m06VAi?KJ=Z literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image8 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image8 new file mode 100644 index 0000000000000000000000000000000000000000..ba7fb476b956cedba808f86508fa0fd345faafa0 GIT binary patch literal 497 zcmV_WA4X^Wx_1*xl#P)#1j?+`Prsv%S%&w9BBZ z#h0YOjhwoJleBt^u5p8@VT|WqbDdObmrG)jLRySCQHC&Iz%O3CFG_(fTel@admTD< z4H`8B6+Qp}00000EC2ui06YLB06+!)peK%GX`X1RmRaj&S1iwTZQuC4?HdC~z2Bw* z80;hf0s+9F7zRnh1^}4&b^w7vIvp4Qh0O$TU=%34w0g~MyWjAgWlpc#@A$laZ(sTU zfGTl=goSTDKs*9kOA|;E2UR~J?CtLF@bU6>x%Kw<`1$(#{JQG@00R!Hu!)nvbd(|~tH2<_4u%XYZGae&fd&Q* zqA{3MQCYzLjV9fM7!7E literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image9 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/image9 new file mode 100644 index 0000000000000000000000000000000000000000..b1cad73ae93bb7377320c87fe9f27d383561ecd0 GIT binary patch literal 492 zcmVS=`gOjv+i>`5lsc3tnVT|WqbDdObmrG)jLRySCQHC&Iz%O3CFG_(eS+gZUdmTD< z4H`8B6+Qp}00000EC2ui05||706+!)peK%GX`X1RdRcqDa4gSsZP#1A8Gu6R3&5b@ z*aQm#z$5}-Y#acG1hCjp0)m2JQvehSKSE%EIOxvkw0g~Mvn}wrd`_?1?|92<&+nVu zfPsQ-3_leD14aN15_Vynqu}T?M_vf)xyvr$GP!5{gIwKMKq}8<-njXI;yb%L5T@6^+E>jgT@OHllYC}F$qH`2@4VyL6~sDh6f8m8F^4)L9-41 z96Cs7aRUYfT8gZhund3zN6d170H{V~1ELLLSXLPzNk^A6CIbc literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/index.html b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/index.html new file mode 100644 index 0000000..7eaf2d2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page2/index.html @@ -0,0 +1,433 @@ + + + Tcl Resource Center + + + + + + + + + + +
    Scriptics + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tcl/Tk
    Scripting Solutions for eBusiness Integration
    ProductsCustomersPartnersServicesTcl ResourcesCompany
    +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Software
    Tcl/Tk Core
    Applications
    Extensions
    Patches
    Tcl & Java
    Tcl/Tk Ports
    Tools
    Documentation
    Community
    What's New
    Add URL
    Keyword Search
    Index
    + + + +
    Resource
    +
    + + + + + + + +
    +   +

    Tcl Resource Center

    +Top>Software Central>Extensions>Tk Widgets
    Viewed by name (By date)

    +

    Tk is a toolkit for building graphical user interfaces with Tcl. + Your Tcl/Tk scripts run on UNIX, Windows, and Macintosh.

    +

      +
      BLT 8.0 Unofficial zip and DLL +
      This is a compiled version of BLT 8.0 "unofficial" for +the Windows platform. Edit + (September 24, 1999 06:31)
      BLT 8.0p2 Unofficial tar file +
      This is a contributed patch to make BLT compatible with Tcl/Tk 8.0p2. While still "unofficial", it is widely used. + Make sure you get the 8.0p2 version because the 8.0 version does + not compile under windows. + There is also a 2.3-8.1 version that has been patched to work with 8.1. + README file. Edit + (August 30, 1999 06:38)
      BLT Home Page +
      + Author George Howlett, Version 2.3, + Works with Tk 4.1 through Tk 8.1 +
      Download, BLT2.3.tar.gz, BLT2.4h.tar.gz, BLT2.4i.tar.gz, blt2.4i-for-8.0.exe, blt2.4i-for-8.1.exe
      BLT is a set of widgets for Tk, including a graph widget, +bar chart, drag&drop, a simple command tracer, and much more. +The 2.4 release, which is still under development, works with 8.0 +or higher. +There are also an "unofficial" release for 8.0p2 +and 8.1a2 that were not done by the author. Edit + (October 26, 1999 09:43)
      BWidget +
      A set of native Tk 8.x Widgets using Tcl8.x namespaces. +The ToolKit is available under Unix/X11 and Windows. +The BWidget(s) have a professional look&feel as in other +well known Toolkits (Tix or Incr Widget) but the concept is +radically different because everything is native +so no platform compilation, no compiled extension +library are needed. The code is 100 Pure Tcl/Tk. +More 30 components : Notebook, PageManager, Tree, PanedWindow, ButtonBox, +ScrollView, ComboBox, SpinBox, ListBox, SelectFont, SelectColor, +ProgressBare ... Edit + (September 06, 1999 09:58)
      Dash Patch for Tk +
      This patch has many enhancements to the Tk and its canvas +widget, including dashed lines, smoothed polygons, +and performance enhancements. Edit + (November 21, 1999 06:33)
      Embedded Tk (et) +
      + Author Richard Hipp, Version 8.0b5, + Works with Tk 4.0, 4.1, 4.2, 8.0 +
      Download: et80b5.tar.gz
      Embedded Tk or ``ET'' is tool for making stand-alone executables out of a mixture of C or C++ and Tcl/Tk. +Using ET you can invoke a short Tcl/Tk script in the middle of a C routine, or you can invoke a C routine in the +middle of a Tcl/Tk script. ET also bundles external Tcl/Tk scripts (including the standard Tcl/Tk startup scripts) +into the executable so that the executable can be run on another binary-compatible computer that doesn't have +Tcl/Tk installed. Edit + (August 19, 1999 15:35)
      Enhanced Tk Console (TkCon) +
      + Author Jeff Hobbs, Version 1.3, + Works with Tk 4.1 through Tk 8.1 +
      Download: tkcon.tar.gz
      TkCon is a replacement for the standard console that comes with Tk (on Windows/Mac, but also works on + +Unix). The console itself provides many more features than the standard console. Edit + (August 23, 1999 12:06)
      Frontier-Tk ScriptMeridian project +
      This project seeks to integrate the Tk toolkit +with the Frontier scripting language. Edit + (August 19, 1999 15:36)
      Img image format extension +
      This package enhances Tk, adding support for many other Image formats: +BMP, XBM, XPM, GIF (with transparency), PNG, +JPEG, TIFF and postscript. +This is implemented as a shared library that can be dynamically loaded into +Tcl/Tk. + Edit + (November 21, 1999 06:35)
      mclistbox - a multi-column listbox widget +
      mclistbox is a multi-column listbox that is +written in pure tcl and runs on all platforms +that support tcl/tk 8.0 or higher. This widget +requires no other extensions; it is completely +standalone. Edit + (August 19, 1999 15:37)
      MFC views C++ class for embedding Tk +
      The idea of embedding Tk in MFC windows always seemed very enticing but information was sparse and contradictory - on a + scale between "very easy" and "not yet possible". The only thing for it was to have a go and lo, it wasn't that hard after all. + CTkView is a C++ class which can be used in MFC SDI or MDI applications. An instance of CTkView hosts an embedded Tk + toplevel widget and performs some management chores for the widget so that it can size, update and react correctly to Windows + events. Edit + (August 19, 1999 15:38)
      Pad++ +
      + Author Ben Bederson et al, Version 0.9p1, + Works with 8.0 +
      Download: download.html
      Pad++ is a Tk widget that provides a Zoomable User Interface (ZUI) that supports real-time interactive zoomable graphics in a fashion similar to the Tk Canvas widget. Pad++ supports tens of thousands of objects which include text, images, graphics, portals, lenses, simple html (and more), including transparency and rotation. Edit + (August 19, 1999 15:39)
      Progressbar +
      Progressbar is a megawidget written in pure tcl (ie: no compiling required - runs on all platforms Macintosh, Unix, Windows). +Its primary purpose is to show the progress of any action in percent. Edit + (January 24, 2000 09:19)
      scwoop (Simple Composite Widget Object Oriented Package) +
      Scwoop is a composite widget (also known as mega widget) extension to the great Tk widget library. Scwoop is +entirely written in Tcl using the stooop (Simple Tcl Only Object Oriented Programming) extension. Edit + (January 09, 2000 02:10)
      Supertext - tk text widget with unlimited undo +
      + Author Bryan Oakley, Version 1.0b1, + Works with Tcl 8.0 +
      Download: supertext.tcl
      Supertext is a package that provides a tk text widget with full undo and the ability to execute procedures both before and after a text +widget command has been processed. Supertext may be used as-is, or for the brave it may be used in place of the standard text +widget. Edit + (August 23, 1999 12:06)
      Tabbed Notebook Widget +
      + Author Richard Hipp, Version 1.0, + Works with Tk 4.1 or later. +
      Download: notebook.tcl
      This implements a tabbed notebook using +a canvas widget and embedded frames. +This is pure Tcl +code - not a C extension. Edit + (August 23, 1999 12:08)
      Tcl GD - graphics +
      + Author John Ellson and Spencer Thomas, Version 2.0, + Works with 8.0 and higher +
      Download: Gdtclft2.0.tar.gz
      + Thomas Boutell's Gd package provides a convenient way to generate + PNG images with a C program. If you prefer Tcl for CGI + applications, you'll want the TCL GD extension. Edit + (August 19, 1999 14:52)
      The Meta-GUI Tools +
      The Meta-GUI tools provide a framework for quickly building full +GUI applications. The GUI is rendered by a run-time engine +based on a hierarchical set of definitions you provide. At the bottom +of the hierarchy are abstract data types such as length, angle, +string, etc., and these are used to progressively build up frames, +dialogs, toolbars, menus, and operations. Edit + (August 23, 1999 12:10)
      Tkpiechart Home Page +
      Tkpiechart is a Tcl-only extension that allows the programmer to create and dynamically update 2D or 3D pie +charts in a Tcl/Tk application. This uses the stooop package and builds +pie charts on a Tk canvas. Edit + (January 09, 2000 02:12)
      TkPrint +
      TkPrint is an extension that allows you to print from a + Tk widget. Edit + (October 11, 1999 09:58)
      TkTable Home Page +
      The TkTable widget. The table command creates a +2-dimensional grid of cells. The table can use a Tcl array variable or Tcl + +command for data storage and retrieval. Edit + (November 18, 1999 09:25)
      TkTextMatrix (spreadsheet) +
      + Author John Arthur Tucker, Version 4.1, + Works with Tk 4.1 +
      Download: download.htm, textmatrix4.1.tar.gz
      A Tcl/Tk spreadsheet widget, TkTextmatrix, which is implemented in C++ and is + basically a Tk Canvas widget plus extra behavior for manipulating rows and columns of cell + items many times faster than with a plain Tk Canvas. It actually inserts text nearly as fast + as the Tk Text widget. If you work with or are interested in creating your own Tcl/Tk widgets + in C++, you might want to take a look at the C++ widget library included with this + distribution. Edit + (August 23, 1999 12:14)
      ToGL - a Tk Open GL widget +
      Togl is a Tk widget for OpenGL rendering. Togl is based on OGLTK, originally written by Benjamin Bederson at the +University of New Mexico (who has since moved to the University of Maryland). Togl adds the new features: +
        +
      • color-index mode support including color allocation functions +
      • support for requesting stencil, accumulation, alpha buffers, etc +
      • multiple OpenGL drawing widgets +
      • OpenGL extension testing from Tcl +
      • simple, portable font support +
      • overlay plane support +
      +Togl allows one to create and manage a special Tk/OpenGL widget with Tcl and render into it with a C program. That is, +a typical Togl program will have Tcl code for managing the user interface and a C program for computations and +OpenGL rendering. Edit + (August 23, 1999 12:14)
      Tree Widget +
      This implements a tree display in a canvas widget. +It is similar in layout to that of the +Windows explorer file viewer. This is pure Tcl +code - not a C extension. Edit + (September 29, 1999 14:37)
      Windows Extensions for Tcl/Tk (Michael Schwartz) +
      This site has pointers to several extensions specific to the +Windows platform. The extensions provide printing, +a MAPI interface to send email, and an interface to manipulate +.INI files, among other things. Edit + (October 07, 1999 10:50)
      [incr Widgets] Home Page +
      [incr Widgets] is a set of megawidgets (combo boxes, etc.) that are +upon the [incr Tcl] object system and the [incr Tk] megawidget +framework. This comes bundled with the +[incr Tcl] distributions. Edit + (September 05, 1999 16:08)
      combobox +
      + Author Bryan Oakley, Version 1.03, + Works with 8.x +
      Download: combobox.tcl
      combobox is a pure-tcl implementation of a combobox widget. It is +entirely self contained and does not require any other OO or megawidget +extension. It supports both editable and non-editable entries, and +provides the ability to call a procedure anytime the value of the combobox +changes. Edit + (August 23, 1999 12:15)
      Rnotebook +
      + Author Daniel Roche, Version 1.0, + Works with 8.0 or higher +
      Download: index.html
      This implements a resizeable notebook +widget in pure tcl/tk Edit + (August 19, 1999 15:39)
      saMDI v1.0a1 Multi-Document Interface Extension +
      A multi-document interface (MDI) extension for TCL/Tk 8.0. +This is a common interface format in Microsoft Windows that lets a parent window contain multiple child windows. +In effect you get a window manager inside a window! +Uses and includes the STOOOP object-oriented extension by +Jean-Luc Fontaine. +saMDI v1.0a1 GPL Copyright 1998 Sam Tregar. Edit + (August 23, 1999 12:07)
      Tix Support Site +
      + Author Ioi Lam, (adopted by Gregg Squires), Version 4.1, + Works with Tcl 7.4 through Tcl 8.0 +
      Download, Tix4.1.0.006.tar.gz, Tix41p6.zip, win41p6bin.zip
      Tix has found a new home! +
      + Tix provides over 40 new Tk including the +combo box, file selection dialogs, paned widget, +notebook, hierarchical list, directory tree, and more. + Edit + (August 23, 1999 12:11)
      Tk Tree Widget (C++) +
      Tk Tree widget for Tcl8.0.3. + +This version contains (optional) support for \[incr Tcl\] and \[incr Tk\] +version 3.0. +
      +With the tree widget, you can display a tree in a Tk canvas. The nodes +can be made up of any number of canvas items or even other Tk widgets. +You create the objects that make up a node and the line that connects +it to its parent and pass them to the tree widget. After this the tree +widget manages the positions of the nodes and end points of the tree +lines. Operations are available for inserting, moving and removing +nodes and subtrees and for querrying the position of a node in the +tree. The tree can be displayed horizontally or vertically. + Edit + (August 25, 1999 03:14)
      widget, simple megawidget package +
      + Author Jeffrey Hobbs, Version 0.9, + Works with Tcl/Tk 8.0 or higher +
      Download: widget-0.9.tar.gz
      This is a package of + megawidgets (i.e., compound widgets) that work almost exactly like Tk widgets. + You can also build your own new megawidgets. +Includes: combobox, hierarchy, console, progressbar, +tabnotebook, validating entry, pane geometry manager, baloon help. Edit + (August 23, 1999 12:16)
      +


      Top
      Home + | Products + | Customers + | Partners + | Services + | Tcl Resources + | Company +
      Search + | Site Map + | Feedback + | Contact Us + | info@scriptics.com + +
      + + © 1998-2000 Scriptics Corporation. All rights reserved. + Legal Notice | + Privacy Statement +
      + + \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image1 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image1 new file mode 100644 index 0000000000000000000000000000000000000000..814d1e8f08deefc7659d4a7d75f8784f1d69ce8d GIT binary patch literal 113 zcmZ?wbhEHblxL7*_`m=H|NsA2{K>+|z`)3$1LA{Z7??bI`d6NoWtbBqaPIf2qrTaG zmGT`Oax-VDub35a+s{DftV#0uL^<`Ex*v?ePIDi(DRoU^Q#s|?w5iHd^Z2htc3T7A Ng&Yl8C&9{K4FK(qDBu79 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image10 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image10 new file mode 100644 index 0000000000000000000000000000000000000000..45001faf0523aef6d70c7d90e8c788094463f425 GIT binary patch literal 5088 zcmb7{*CQK@|eR;evWBKB_0NMh8C*lNa( z+M^GpH7or+-}gUwKNsifT%2=pE{=|#ww$cpD%~;NZ@T{>sVXTWBct*kCMvqNx`vL1 zuc5Ck{48w4Y#pN$Q{{ifDL&zFYO0Vz*Jtg6Qwrn-ud6K@QBE$XhckGTztYuc<5EO4{X4j*D|xN zT}I}j(3m`IenDYTaY<=ec|KDHDhI`MEyWU8=iuW_AQCt@tXgeAZtd2c&Anv%#;Zsc zHoQ$^eHzYww2$K5ItSud04;EEbF)#|gw{HjTS;syTN^V6gvQCV5y!FAF(mWJA>B+Y zgBm?r?aE$z_|At2Gy);So@3BdW80qKwykyE%N_B=ZM+CF+I6k4@8KRBMnl&qzZS8= z_4y^G=k0A@As_AfhHKL_vc#Fo%pvrtkam^`pC2D{#9K9QW7lgVoRKW;R3+Dn@&mesFh3E^L0}i=z!kjw*tzitDysFcmte#wI7t}ST zMy&KE^BG_a33Y1&NNM-QK|=k;2=?KFMX5fT$mDWSV#+~UJhXKsfX55cCywBG~ zy3EW3j`m2_dqyqzpDW}vQJdiw!r{hfp@EJ>zW>%1rQUsMxV72;$D{_0X4KYldbrsa zvm|RR7X#d1Qru|g(PCIW9^Y9SvH1&I>h8z_1k+KnY@mQ!NbX>!qYY{#yUg*@hpxxm zbnq*5VRn%unmKYA0kS6BMe%1cFGm3zZll8XqbaJv%!?bmOdxxg?}>5;F$MAMwMZT& z05csQlohB~7_Giuwwk*11D_XWs4cwaYqYJily2rku*|UV+ggjX3=v*OuKl2NWV@7< zujjnOZLQ~ek%Tu;zEiFn=z#T8!Fa*Vt&O}epvWdR3h0KWcNDB}@sE+%-Ygt_%(7LK z4ia)LM!tp#dx_$yTcucp$aWbvMAEUO4A$gYDw?k2z#^V3vQw3x!y;OZU$3aFuHD|Q ztZJc&?3UszK&f7(XeL!waik7ky}rtvSm>CAIkxtkdmy4tDTGP2NigIbi$Aw|GhagM z%hCBvq-NqJLiY-sCA>F12R^s_NWJqV1)i$+ZO57Cd$k?K zbA=y)CAR!@dk^KXaAV-@_aP53`tup&AEML@$nC6qeI2!fb>4ezx0m9@OAUPnc!LI4 z22aXAE)Vn!DT3QiE)(n`gz+a1u@8EKejtt>nt74#nu=Mrs7o>P2g?UpE=9l6xTtTJ z**kyK(=L2sPnL2A7fmW$HMO1Maj^U_d*jPf$ryE3okw1lBeA}T;)2TDB-6uy>M^>o z1^eW?f*y9`@j>rSx&wm5iV%!b0d^bF(!muo!0VKQXhhRVe(W75G=3gvQbnb$rQW+s z*ff2D^5{MSgybh{dtRI(@))um=LrT$cHtzQ&u77plB@$iWpVz+Ah?186l43R1Mt7P z%h813TRPScmu0m7!v5V4_QaoOPj9xKWjYun;3)Z!w(k`-O4L2KbM)^ie+BZz19wTc zlTdcC1uIbE@R>Ck+y$kW##z<_AJ>MlDZ3gnl6?T z^jIR3h9XFkd%wixLiwJtHP&}|PkO0XrOjO>_-Ig9N8f0mjIKf&G&u!RVu;Q6_J$e4 zg|tiK_Upd;)gaNlCDho(t;rgaE=elq=SLUA!cw_Qq?d$;I%QpUEVLIjowBn(wT0bR zAjg|nrQzBnI2(WHAH3qtBctTliK{%tE@Vv^9ogiUPb(+NA`Zl$*H3&_p@ui~bPKQy z!lMP={I-3-t>PH;TW2EX!)$-se!MZew{FkC0waxyq|#9oq1 zp|8%MuY3N`p>%MI3U$1+Gvn>Ig|;5PuJdFCIl%&KC3?Se(@;mP9F;Ut8+IJsn@5;Z zfQE~D*X2go%(fki9)35jSDbq1n4~Ji`?2qV%E1=uz~Wa$gNJ7j*Y*2e!+N!a=ueTP zWqvo6%g>DcMDw}FFv-O`i_h>G||KvZ-z8vA=ZHX0R z3zK5}*?kq*foMzY982fAc-sN;9}Te>iFk5gqwnCX#uVa}FTrTHJnUS{4Jdu)#;c~4 zQa)bvTryH+O~9B{ulJL^^b>2tXA(_mFV+Ux<&Ia4R0co-sf{nH1>M}CNtaEN`ctaH zir$JGx;-~Nn~YVvx$Es>QKm4HUP+1D@mmL(^;kF7`i)hv@VCzl!;b2)7rS;}k!Axq zG79OBcU(<53zGn^8>@}w&55lUUa`O(@nvdiUY%gu({-z#u0<)b)%3ck{K&a8pc>3W0F{@}Va z7N3#L0-Nh*7qcHo84c3Y@LtBps6@-?cBH1&LhmG$^v<3XCZKB#VnOAwLwPI|l;Y zS;WL3yY~9uh9COEuT_KFB#6CV5+&?b=B;RkF|tHt@wh|dfXjrv+^B6*HCh8AG=w;s ztXZ!r{W|z&o;39hH~jdsPvV@_p#`o@#RJN7+42#~@ks2DuU|}J?ivU;&`0z2lYP2v zUPzpZ$nf>Wv!YD~_9xmjuNLL{a3^28A#dtt*S7A?b*g>n^gCL{H6xMhQbC&AU576u z!z@B_?X>&sY7X#;+;{lGXM3JVPAItLmDtF5<-uk5#~mJ)q4eh6ItJ_stT6eE65o|g zQP-ePg)3__p7X55KcAK-JclIcem^O~W5tJ8Gq?!rd}4t|#yQ^GtrTa^MJ`H-<#@&m zkdO3ioma~R$~Lq#P`^>0!JO$yDh)TRuDEA&h|^Xy;R{2k-?gj{UQ0wPwUi)ENKw9g{EKywYRy#7cdN>yKOc;I?ey*^K|! zFSdP)Co%+uDdh3H@1nGwHv>wO=wtZY&3k9#3a!85m0Rtz(Yf|{KPlm#WU7}i9#eCq z8S2cR!Q0O~$h};9_0zxRKUrHXL|Pk2%~8B9flKt4*(y9=(L~}#Jo6Y-)(bb_nEss5loAwLgw$3M7VWZH{9 z)!{-~!*By!aa&;fmvpiZ%|tfFc*G&tnn@9L7~1&K7jWN>3kv0fhOHh2Qb_y&4imc7 zSIPBiY??}D(;tkr)$ifJ>CS%Lru4|g5I{JNQXyHS3q_k}0CF<|tzFn1S{hOY~`ZLIAVt$#`br_Xcj~T zcgqaenGSVJDM?HIVwBt1upaX_m^k*l&g=tSi;av5rM|SCf9bi)D6sqJ@$!bvijE?S zjLeWMc+21KDow}kiCOGbDS5FHd*+)uFDDIK%w(^eh@fwHgE1O({|bg_O2uw?ptcgpq{+s44n31Sr!e?p^aFEaPHP7-3%nHcPf)TRdGg%?0 zSz&!ybAU{~Q9$WW+e?C8@vaKADL(p`_xx#|OWnc&X4#p6*)`z+K1rlLg+BK#U%aSJ2+7@r+}bSriVlzbCT+E(5Km**8mOXxwybwe0DC8klQko+jg4Ueizj#kLor@ zHOPZ&TyuP*b2?M#1@=*+chO_==m~T5R3Ms?jh-c-=V#E1r)cV_ZAS_!1dpn_3%-lh z-X>snXE6WjX_HU0tK`9VjkOwh0ejhbXN0^z@*+RYbJnuO2IDa7+yLM<;AD#?40OXX zgyk{L=COnFuPbQ(E%&06#j8UVJTof z%Lkw3bDrhjwWS`=x+wB;*M02t;jtjOrBNKOR2 zY94bEnJ-MGH_j=xsL<8}Vdw0NKW7WSV1fHFm)KbdJHYY{VI|1a61BG__MI@%8bFol zYa~IuYpVFAf|l2rz|f{1q#c0Bw&Y~j_qQkujpvLODLyDK{KV_(d>t{Urq4Q)G)XF> zBbJsDN*n>@;j=kWX5~YV!-u_}dFHqVZwp{V%JYf$(zk=;Cd>3`XT>N5LF)A!w$t)% z9@UYb6>HIzn+Umaj^wi!Nrmy{x6Vo$MFjsT{otwtPH}sE{y|O9CDI%B_`&xl5_iD& zCRF8DDy?q%F}PNfi3JH`RqDn2d?5n!GwPmA!SRdYQq#oWXWUze-dBHDrV zzGiN@+(4m0X0X!oD;B|L{u~Wb_L)Kj99jVabb;4 zZ@&L02tf>^JQ*1Va!q^1sLYsKYn2mAn|IN5YpyX|`yw`mH4!D z2=}BKvHc&VoT9m}A6lCHQQd)6 zy}IzOD=3Iqd!C>q`I!ZI+gvaGQ7_v&-YTMpN&+8?yIB^jyRW}j;DC&{-3J`(>oM)y zZ|Du%C5L|mr&aNnDy3rQ8`nWRVYGDXm|JFhTF^{0>kQp`Qc8cIw4~@^&83|g`~Rk(cNz@YE@-QLHC`k(HsJmprb>jf(^;8cYxoxgqj()F$(5!L6^ z^GI`2;hS{C^v>WPP2=a;-kw{kO9N>)KMbb%m|z@gZ{JMRXYhGoIk=HBWNQl30 zp~FvBxYcDh)*L=p_IYQp&n2A$2V?>$-%hNf|#9+Rx)U)A8f#zGZ=|cf-76usIwY62lW*i4sR|GM%|ns zoM`Hh$=3|~^)AK@$rF#2Q)$bCc;CTsF7&`l2#@}PYvrGj*jz5LFv8Zkd3gMk>jl9* zxXsd~&G<@Ju#$k|!sLewh(CJTPrM&8G;LBh9X7-tp-d^;osK!zvm#JFE>LU|DDs@h zROOj;tC`H;860_SJ%#X@Ea60@t-bqm#Ch#`JqX;5I+>m$|hhxsMPIydNaKdWA z2D(655SR+5!|bzEurGdBURqFc0000mKrl8oHagw?D@c8)n0000000000000000000000000 z00000EC2ui0OSDo000L5z>9E5yd;Xqq;kn@I-k&}bV{vSiN|H(!svRxiLZD}E}PHj zw0g~MyWjA5*c{*@4EQ|0pzr(tfPsR8goTEOh>41ejC_9&40Q|!6%m$~5eb-^oSmMZ zprN9pq@|{(sHvd`m7JQK2N9862C`#wak;v=6ck;(UmI$`Uc$S_$YQk*m=h^bPwbhf)WYUt-m?k? z4e!8#>*a#ohK4Q>noGB^V8DxN>P7p0*@krRCjq0oc=H~bfM>x1y?_H7B0$%VT|WfCCP+{KgX71L zBTJr4xw7TUm@{kM%(=7Y&!90c-ZJS1jnk-8t6t5zwd>cgW6PdRySDAyxO2be0G8Gb z7{G%IA5Ofu@#DyoD__pMx%21Hqf19Fp?B%&*t2Wj&b_;L?bSp6{!YHU`Sa+>hu=3| zxQ7Pt-#ho<0Y(Gi_tWd&&tLy~-^9TO1APG4mtS%M7MLJ?2lnUSgAg|N-*v+^AOL&~ z0DxhG#{OBD;f5Ms$YF#emI&d52DBHPfbfObKz#__=b{H1Vrb%xIP!<0iomg$p$7s8 z03&h>21%oZLguLClHcvPpMXq8Ddlud>PO#{SZ29gm0EV`<%3*)Ddw2v?fAi&Xr`&= znryb|=9_TFDd(JY)@kRRc;@*giYw^p=bwNED(Iku25OxFWG1R;cZV+O=%dgz3hAVj z8YgL`m{xjercv5(!>6EzD(a}DmI|r}Lz=iL3^SPO>Z_lk3WKMx);g-JwA!lcuBUon zgAM)BI4iHj-XN=`Aqm&&4CT@It9i}>nIcBH=?RPMKEj=L9st#P2QHK2I#{l? z{>N?Vt$F8`*Dj9lS{tsr=_VW8y6(=)UA!jpi=Mya6}T-e-O})_zS{vDVY~0ew_ES55Tt>_jodMQ5@R?saRL{o?#4aJ2(*y^yw`KjEd%$i%{G?IqSR6YE!?|8G6*Dn zCVySug6)kdw%4Bfj5*LXs!gN*>YUqX zx_xxx{Nm}E=Uw=~lN9Xnk(E0gJLUz>u6NLqW0?Hqb*~)t@?SqJFp!FCsJn=$J5PFz z15S@~%>zOm+=W7-pCFR-p`YaV%)@u#?eqVBy7a0W9z5c5Yi{J&^TXSZj6^-%eaL)3 zvQW;@hdtU22YYjCAjKM#GY_RteKler0pZ7;su|~M7IIzsEC?fkWzc``3mote#Xspd zjb{Hs7=$b~pRyrMhTQ?(aF&K0z}+y01Xt*!^u@E@;3YZY5L&W|xF^5akjt+&x zLv}?mI#1kB7PkX|D`IDg!BJPPibcjUn(>Uhde9irs4EVs>juo?lpOx2G`BF?3yDmd zqaKx1wJPrMk2mV$9bu3}KpOHvg3K5m56MVGHpq{Sj3jyzdALOiM+GFvq$W4X$xeFm zlb{TxC`U=kQkwFVs7xg)Vc@0|ROpd|EF=j+pn_W3@|L*Fr7m~L%U=5Om%t3BFo#LZ zVhWR466k<3EuhQ}fFO^Ag8?LAKmrx8@tWAorZ%@}Mi@u{1>iJ62*4==Xi{>2mJCic zZ%~3zb&*u<3{?r<$<2D&^PcteCOKbV0dkrXmWm`KG^;s)0nifyU2JDOZ(vY%zLTE# zjHpB>sw;h>;5QilBqjOQ2AauJoiQHL6y( z+D!>8b*4*g+D)CBQ?8oztP=HR3?#tTwzA-#V@2mvg%ee@+V!s2^rj5<%2yfG0Iqh# z=|}NO*uoaeo2E(43rql5;7qfwhK;ObNrl+qe1NeW4J=s)JK4^9wz9&xY-6SAQK(we zv#5SFG3-UTnw9Uh)!$s3&7Wv?`}D3;0D_Y!SNOFg6Zqv3cCuz z(FCuBH(V+VpEJ7*=CFu=Q(nu$H^Z=n?ub|H;igWQz$@Nxi<_%n6~~yvGfr;{fdkna zJ2=M*1~G+w{Noab_QW5qF^|Jb>R9)7*3VtFty7C@?e2QEy$1a>(*@(7wVX>`iZ4;K;wf6S5r=4IZlbYG$wkx>No$lX~JHpj&cWvJ-X;p_?-e_I- zneok4ee)Zy{{FYR>7C?P?_1zS4LHKhs_=y;m*7}F_rV=b-SVm_1Dy`C#3|ly37nvr z&3vn}C(Uk-Q`DO^7*z~XedunRoTc7ufwX|*RhBdQ-Y)NbKc!= z%ADpX0D8e`U2>w|)1o~0dD3mZai{*f)S@kT!8fNqa(g%3>POu=3P8{Se|BByUkAH3 z^}1IU@b#}}zqtx@L-)Gd{qA_rdv0K`g4V>b+|!h#;Jvf-TyJLvdPj{w6Ynj?JHGDZ zDSRQdLjxNmo&zvQ?Bz56_|Dq~^WTv?G$}v&>_{N+e!eciVL(g%IsCxbAMf(a;t3aEo8*n>K#ebc8L=(ioi z=N%omAxGjjR#P@32prNUgaw#?QAmRi2!1PwLs7VWFPMYVXM_3Yh4*)Z%_oIBXoEhu zgK4;hLx_R5r-AFofupxGVgoe!aWqfJcjo7XImm~7xQD}$huOD>farzJ2Y%BBe)o5Q zd}w~t_lV#ZiHInP&i9CI=!U|lev>DMvzL0k#~e3UB1NbjN7x;kh#i6m9xTWyqnI6~ z$Q`FhC99~4pC~4+{)io~xE(a`0)@hRg>ojo_>01rC$~5qxu_j8AdGxBjLSHT&S)o* zr-`LEc+`lC(l{obM|X>7cVlvlS)zH_SR0rJj=BMQU*e5eQj6!2iqBDuQG$+BqK@Xl zj_22n*C;0P=!x6mj!XiNQZg?Q_b22g;hw9j_6D&7=|6`g)`ZOSr{NP5+B6lLEiL}o)(AcXdGB* zi8&~VdPsx*UrB-_2$oZbg~-Q(EMtc@f|BQWk6)6H>M@H&landwmRjKr9Ef%1@iWS3piCx(e9%?K!hX>NpBjg|==DtVcjc^sL!nVv~) z9@SQ&Ihv$dnx=W0sF|9oxtgrmny&epuo;`O$yOX7dK{p3ozLUOEa5>HsLcoDG+^IkzazW%-BFC5lY2r%n*`3LAKx^YYpffu*!=HQ##s`J1w#{y`zLoxrQG4p&%NfB08cZTB0U;q9Hnm zj2T>(M+0%>Fk~}0xZ^h{6ER%VHc*lu;kctb+IfqmqI^jlkp>;c*C8QOpXM>7$2g=& ziYZFEqDQh6-P6I$yKUJxgIx36`cyacqz!9k><*6w3siaz}q5g8J z@Rq85+Eeq?MWNcNxyn$7Dyyc7sd_q?x!0%g1gwW8tb+P_#)_Ttn1gMS&1Hi86o%T zd*q6$4N9+mX|HlAiUAv#`&z60%B@<0m&cK>U^1}Gfqq&luUv|--xwh1vyZDdJ5>2Q z5!NFY+c^tMk__pcbZKSrN}0t8MSVtonE_UOA4bvh8iXk8^7{9zw}$b^NYMt8UxNsQ70RC>T5{Y`M;CtzXE)^ohw?v20Xh6Oq~b3 zz;YD84xA+r9KlnPNTV^R6r3qlGa8PX!I(0^9t@G{M>eyu&=)!z{c*gA~Gzv?@Y;NJL!3fON!2yhql70G{v)su0Ce zJjGO8#a4X9qyWX6011*{24t}oU>wF`%m!cF1p!b10g%ROyvAs}#%}z^a2&^SJjZlg X$98z?d#1qu9 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image12 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image12 new file mode 100644 index 0000000000000000000000000000000000000000..903e7344a68a8e3799c9810b10f9fe1c10d49479 GIT binary patch literal 3579 zcmVNk%v~VdMb!0QCR>0000mKrl8oHagww7@bLKf_y7O^0000000000000000000000000 z00000EC2ui0OSDo000L5K#Oolv?Pkiq;kn@I-k&}bV{vSiN|HZ!svRxiLZD}E}PHj zw0g~MyWjA5*c{*@4EQ|0pzr(tfPsR8goTEOh>41ejC_9&40Q|!6%m$~5eb-^oSmMZ zprN9pq@|{(sHvd`m7JQK2N9862C`#wak;v=6ck;(Um9w_Uc$S_$YQk*m=h^bPwbhf)WYUt-m?jX z4e!8#>(zpthK4N=noGB^V8DxN>P7p0*@krRCjq0oc=H~bfM>x1y?_H7B0$%VT|WfCCP+}=g5$@K zBTJr4xw7TUm@{kM%(=7Y&!90c-ZII?jMJ!7t6t5zwd>cgW6PdRySDAyxO2bW0G5`G z7r=uHA5Ofu@#DyoD__pMx%21Hqf19Fp?B%&*t2Wj&b_;L?bSp6{!YHU`Sa+>hu=3| zc!vh?-#hQn;Y9=C_tWd&&tLy~-^9W90(}73mtS%M7MLJ?2lnUSgAg|N-*v+^AOL&~ z0DxhG#{OBD;f5Ms$YF#emI&d52DBHPfbfObKz#__=VAvMVrb%xIP!<0iomg$VFv;T z03&h>21%oZLguLClHcvPpMXq8Ddlud>PO#{SZ29gm0EV`<%3*)Ddw2v?dZXoXr`&= znryb|=9_TFDd(JY)@kRRc;@*giYn;o=bwNED(Iku25OxFWG1R;cZV+O=%dgz3hAVj z8YgL`m{xizrZw2$>8GHED(a}DmKtgZLuSg{rZ31~>Z`A!`a-9$)+#EhHPoOajkDV7 ztEsZm`s=VZ$ZBaw!nrC#c{Ju~9*sQS2!ONvHLGiSydJxcaHpLIK(yX{%cQstlB-{V z{@T*Q?F`<6+nu>N!n>cm-X6DUx8~6suDc}ai=MyaphwcJvB(C6pZkccptn zK71U&2JM>f=MKfSz-&ZDp3__I@A_vxy~Km5SR28XZ1<>Q{p*tQ|IaZi3N zLK3flWTE*5@O;=CSF{SmJ%K$ia*#6;10mQqtXYVC=JQaJW_P*=j_`i`+m`4??Vieys z#q1<5IE!=QzpAJo2yiimUzE-jfpafm5$lX-d=-<-n8r4`@mCzWmks`wrK&nkNp@J= z;R||b$3EuhW?A&3AWH;DJ@Rpoh;&dPm$=6!Ci0O_YEU2{NlEi8Qe7(?4hb^A$xeFm zlb{TxC`U=kQkwFVs7$3QSIJ6Mg5U)bh@~uLsRE5D&XA5IK?>f;%U=5Om%#ibEKxwr z4-gXtF>vH1iPA@7Km=)$fK2%o$a3=Zs7UQ4EKk6JraE;6^rR^>ZR*TjCiSXVB^E44 z1%s%Hv!;!_X;#Nd)>3VCI36&8SIKD4s+RSwaQ%%0c$C()zM!a9jjLX-dRF1oHJoe} zsay9-*rWCprfLQ3UE3NQqZanDDm^T4{@PHfBC45<%`0R#TTscqfU+R{>QuuzSk9VO zpq>ToOhtQHs%G}Iuw`dz6I)r<8n3jm&23BPidNc&Hn3nNr)G6aT&42XufAO^a7QcL z;yTy3bWJW%84Dc8KKHs>JuYJHidXD?MmWRR-7tG^%U=+GSHupzuvkre;`DxYy(wlchFRR=`5M^5GF~x_uZv>K zk{H4}_HK`Di&-ECna3_xEr(T%+anWq$Orzhhn@UfDB~ExGp6#BlMG`Y7kSEB-m;Aw zT;DL~*2-lzGi=cu;18=AvTW|KfZzPsI5WA#bl$9;bKK-S*O|-uy|a=1tY<(2Sk7)H zbX@n0WgRP;u#A@SoFDzxNPl_KlqRdCT|4OhOzU;i?(MXv;R@;mk9yIDzHypQUDi@( znboaMHJRHCYf{U)!mF+|R$c9AUGw$UOXf44eVtTZ_nFv+1@?$9ooHmU)Y!vz_D-QK zYH3ef*)eYPv8}yQYJ-{EJoPrF!QEMGdzsVUCik<=O=NVBTivK-ca)h8Z=H&}+4a__ zyss>2eCKY+AhI z04KP@K^}65FWcSzCOLF7erQ3bTjkdLILxal^O?I--4gWfTJha`hGm>o3eNH@5HEyRFd#)CjuLq3RZL0E*! zk%LBjNf!HD2-hKHzw*`bKh0f|ilh)jZsd?<69H!_#pF@nE7=4xq9fuSmA!I&i z6C~Fo9L30sx|oW&r~=ryjjBk9vgnGic#W#qiXZR-<@f=psEX)Vj=*t?si=j`%jOa&?r$~?{ zFq66{jKRnO=!lE0*p4?zkw2-B8yO%n@;WXuB851EllUEnBr+>=I39yE#kh+Kd6B`G zm0LNF?lP19!Pu2KIg_=ti@UgjIT;*AnUkb5ftV5^lKl3AhS?pAxrjD-Ba^u$jyXw{=mLczh=p<{ zp81)75}Ko#nd7A$0Qi|JD4HIynyl$3t_din*m`gY$Pfj+30qxtz?|oX+{2&>5Z5Ii1v5oz{7s%ZW!L=`h&Yo!JJJ?%9OafdHQH3aW6Q_?e&jxu5*mpQK=)n*a%tUztp%|K>8oHqz+Myo$p&%NfA}XR2ilIRO06Q_T BKn(x@ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image13 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image13 new file mode 100644 index 0000000000000000000000000000000000000000..226d4f68c2eb97dd50a157945d92d57bfef9afb2 GIT binary patch literal 5119 zcmV0000mKrl8oHa9E5yd;Xqq;kn@I-k&}bV{vSiN|H(!svRxiLZD}E}PHj zw0g~MyWjA5*c{*@4EQ|0pzr(tfPsR8goTEOh>41ejC_9&40Q|!6%m$~5eb-^oSmMZ zprN9pq@|{(sHvd`m7JQK2N9862C`#wak;v=6ck;(UmI$`Uc$S_$YQk*m=h^bPwbhf)WYUt-m?k? z4e!8#>$QU2hK4H;noGB^V8DxN>P7p0*@krRCjq0oc=H~bfM>x1y?_H7B0$%VT|WfCCP+{KgX71L zBTJr4xw7TUm@{kM%(=7Y&!90c-ZE)MjMJ!7t6t5zwd>cgW6PdRySDAyxO2be0G8H_ z7QllGA5Ofu@#DyoD__pMx%21Hqf19Fp?B%&*t2Wj&b_;L?bSp6{!YHU`Sa+>hu=3| zxQ7Pt-#ho21%oZLguLClHcvPpMXq8Ddlud>PO#{SZ29gm0EV`<%3*)Ddw2v?fAi&Xr`&= znryb|=9_TFDd(JY)@kRRc;@*giYn;o=bwNED(Iku25OxFWG1R;cZV+O=%dgz3hAVj z8YgL`m{xize=^MA>8GHED(a}9iZEoRj&9ll45YT|YN)2lAcJ`{w$SOTxaOLxskZ9s ztE;@;`s=VW@M>vD!m$cNc{K9)9RRW_Nn^D9O*?CPwH~{VaHpLIfV19x%cQstlB-{V z{@T*QZ4BOm+nu>N!n>cm-X6DUx8~6suDc}ai=Myapg3elMO%+?B`y9HGPI zLHw@0$Oeb+iZ8lX-+dz*L zSRjxWD)`}jG%n7gzy%5nCDB+PnK^usH~#t8QLp`WwgXNU2wdgZ16-6E2;0%@V-7Yb=)@=@Q6F68fNSU2LIJ1)A) zOjBR|<~N6)bn!MKAN$`1hF+lgw&xE1;=HTtyL-`N52W+xM~=Pt5#tf$RHr`}HAr$E zl3w&Cm%r()kA2t^SOXDvI3qdFfm6Gjg_LHY3wF?LjcZ_%_Lizg za5*{S8GisL9KlIPZ$snPc3wCy9X>~BIhF6$A$r8;&dP& z#TizyiC1Ld5D{fDVG&DL=<(tg$4JI9n(>UI;?TWjuq;%$aZ0LtV#WS|bFnwtQAs(2 z;vM%`qCC#A1$E@3ARpw%-qG=QM9Lb*To%2B(T{HfLfs%MRY?0Ck~soeV1D-ZqNNF- zbsY>}(v}xJtR)ZtlAENLDoMmk4hIEkLIEV%CY-G0hiS&k+#++i!R&3&crAcsp@vD! zV#-OD6>5+kTkru6nBbWznC0wd8J}9Us8*u%5z}f!yv^lD1p;=uD?N z*U8Ryy3+)Rgrpn|3CMUd(*!a&O&hNSH;kRkK9S5@BwdC!`tb8bKJyt2bi>ewI`pBq zVF5gWR>MCA@}BmbjuU?<097*S0~1YVMd^7_kY?1QC`FD*DgHW7OV*P(D^00Pl@rsW zjnt(j4QX&lz|)@k^rt`#s!)eY)S?>os7Ot!QkTlqq7J8~i)?8tU;0#?0!ITW$f{Pi z%GIuV^{ZeFt60ZM*0P%QtY}RuSlbvJsLB&K%XF&-&`8(1+V!q@{Z&=%$x1G|QaEz; z6ct@X#Q}J#1Tz?{U}u0>P#Lxa5KwGl8=Ke4TK2M_+AB-pYEgRzcCw6}YzaoY*uhdU zvWeVYF4CD^($2YYtxD_`*$!_9qOhqajA1O}8F!1uCdMsiS!`es zW5+Z$Rt*PQ0OTMubjU@XF_IrT&FPe- zvt{RKIm=ycQkt=IWhX}!%3+prdCDxIH7n`N>anwQ+MMFe5}3ys){e6hxE(xKsF5V( z8xW)RLB7RMIEJoeqphrG!zH>ndl8(c*GH+N^yGJ2jSHzY!_MS77;TN?Ik3B3)v z4M_@Q9;PdOpvRkAuHFQo_y+t^`#ReV_~V z>T2!i*V%~P3+w1LYh<##ge z1Rc_W5Gpc*&Kg{BlaIu@BSif6}^& z!8~+1lc!H)ZvouNekZvX)9!%^`k!qcXcVKA=4^K`hdCgD!W;hZh)=xY7ti>{JO1&I zkG$k3Px;DQ-tb$md7NSD0t$Qn^Rr!hx}Wa%(#I(9>NdUVi^KJcuKx88=R53YAN$SI ze)g>&^X)a9``yF7_r6~}@Plvq;S(v_IO|x0UWTwm6Q4xJKmNY=);EJz^FDI};n_y! z@r^xSKhZx8=XxM%~%ftMG6 z0yuyKSb&BXO**!Bw#QqaQvNW8GeQ%@a3S(FBP2gdQ+}W1G6Dm797tC#AbLV4c$(&7 z(D8Hg(J}8A9e_7_T{nWdryS1b94MHA(6NFcn0moRgQ#MI3fOixr-PZogTp2q8c>8r zc!Wrpgi5%COxT1@_=Hdxg;F?$R9J;g7y^1XguyXa9oU6ls9sH{c|N#aT56j_n2V%%iL#f8!g!3eMT`qLhbv%Y&iIVb z7>%`|jAIyaK5*;jg^v(#kh^!I4Rz^jNtfnnB@XQ_Ic=7S?h>K=xB;JD2O8_ zap_@oCxUfKCv^x1k3A@YgZOpzh>uk#kXNUVz@c`+#*6>>X#r`FdFGHBmmLV1fLaKU z!x1-y=4=>wGcaRv;+HcQcN{u5JO$};KVuvd`DFcwgYzh86qPp!b#WKRa**b1hI5nH zcQ=uQL;GeUwuFMa1|*ThF-fC0F}H2zCnHbOaC2CD)!3BucxWEdI$PsBp;R;fR+IHM zYCnRNud_e?x^z42=WiW@lqJ(W*Ys_sR%ztsI26=u{8*6;DN@{oY`~N?Ruhp&<3W}4 zliYS}EOR}6nUz{eQM{CwbE7_mNteQ7ZgAO@@kfH$F>VypNFh^ddWmWgbU~1VePrWm zw!@h}d2+=uZT@2EugQ{<`D3#gCH6>ZRpfjr z`DQCAkGn}_y~!lMnRNuoWpSyHvB{e`*PLKNoy_Tw!^vK9$sI0WfQ{Dz-RYg)37+D4 zc;s1txoMm)7>-&pj!!v)EI@biIiK`dpJ$Q*nHPvHcu()tpZ@uu02-hII-mqPP9K<% z+8F*!(zu`u+Mo`)8f-I--XiN{OlKlXKB9j^Ivln%HCOX)kaU;>@*#j}OCw~TVrrkrq>^#vOwg1%N>ek_hCrxx zZ>)n&24tl2)=i<7Ft`I81-hqv+NbOUg2lO?AeB!suulmklL>PwHq&tg!cQ=Ql_}Sy zMp=|T^Pra6pb`bB+xaX_svYhLo5$IyIP$5wxt^jLA*8CF!_ic%+N!Sls<0ZXOa7Gt zP`W1RDX8zIR=T>YyxOb2`m1LZ10P@k9Z;;qTCDE~nPLd4@$`$x_^e|jtQ~LyC-4Fm zK&>aBi}|UeKS+qs`mMwwt<*XL84v>FdaJ1Dt>C(@xgxGF5CbT1t=WpMZl|v7datA+ zuH#Xz^ZJ|#`dRoIu%RNY?+P68+ONv0pXqv40^6_+_yHZDBIT;BnhKo<=CBPbtR_Hs zhi3s4i=f}Qkj{#+_bRL)@B%2CvM=zl6lt-|O0oj0v4n~m9Kf<>>axBFvjMBI@gxB@ zE1@_`ggT3_Jo{@utDQk>uS5H-MGI+1>!hWcvrD_KO{;598<{UVwcuK{{s(!r%Nn&p ztF=t)Rz6Fw-O8|H3$0u$b6%^k^@_G>i;Qbqw*DHj02{Z$IJa%ftz?L|a!a;*8;`h} zwSJq6dTX|QTeyY`xQOd%BdfTSc(`>-jv@=WxG1>^%eRhexul4><%qQZda;}vxr{rx z?^(H{OS-*9x0x%r3rmNo>xZ7ZkWj0tVH>+|IJ>DjxKfL|Zm7H4>bh?WyT1E{z+17Q zOSr|`g~toBlzX?!%Yn_?vdP=K(JQ^B+q!}Jx{rIk6gIs#TfMjIy`KlZKr6mVOTH6k zzMyNjqN~2&o4ub~ySzKT@GD{LOTXNEzn+)BSZlrfn_&L?wYHo7z5)DS1MIeEOS}h+ zUc!9gU!`r|E~3F8qqa?yI~zOu{vstp|&+^ZUQ{JH)gluGK05=8D9$ ztHcJ(#Fyp7Cm^pozJ;d=R4Cf3;>%Sj!H9ID#E$W-#k zbyl0*5y>Js$)+kDmRyn#Nt+pIy3DE{7qw9;M4H240wDeX0tg5k9UvUfB+2gL%C0ON zvkXlg08S=g939}wu`Euu{E{?^lAesp_B4T_Nu)s{N{dO$zue2OtOC>w%hg=XnHe0l ze9hL}0w4g+;OxrSoXfJ@0_2R%AVAKsY@3?7G`?1orVO^|k;;X$Z2n_A?yRTNOwJ|{ z%&#m?0lm$78qoec%i$c%!7R|RywK>p&g6v5lsSQu^Jv+rzi8~o%Un3}W}{WP&CmqV zDqzjf1(!X5GEIrcE1Ww>2cm6ER&D?y|Q;pI&J)&>EoQ|x?+=14!HqQkN*PpB$cFosn?H_;5ls~P&eb*f^5TAsC zc8N`7V+tpVttV~`)UR6}FhERrH%yn^*lm*8enQr6{84M{UKL!Pq+QykecGrk0ig|@ zVf@9p>%6D?*@?2EvW+FQUE5MpNTcD8xGg3*Ga4b=+h20q!i`5j-8lM}+{(S&%-!71 z{oK$U-O@eX)Lq@y{oDtqDqeZr+}+*Y{oUXl-s0Wdf%8YjttsYx-jkv#>J2IE-QKA( z4G7=~ub>L{ec$+<-}=4Z{7nk=y$O&YHwk7y7Hd)927cgdK;T^v00j^L4*uW}-rx{E h;S^rs7JlIvp5Yq4;T+!K9{%AV9^xS`;TIkR06Pc|FF*hQ literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image14 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image14 new file mode 100644 index 0000000000000000000000000000000000000000..8e8c71814c1a751707f31cc34b6a23dc2637251b GIT binary patch literal 3603 zcmV+u4(#zqNk%v~VdMb!0QCR>0000mKrl8oHagww7@bLKf_y7O^0000000000000000000000000 z00000EC2ui0OSDo000L5K#Oolv?Pkiq;kn@I-k&}bV{vSiN|HZ!svRxiLZD}E}PHj zw0g~MyWjA5*c{*@4EQ|0pzr(tfPsR8goTEOh>41ejC_9&40Q|!6%m$~5eb-^oSmMZ zprN9pq@|{(sHvd`m7JQK2N9862C`#wak;v=6ck;(Um9w_Uc$S_$YQk*m=h^bPwbhf)WYUt-m?jX z4e!8#>(zpthK4N=noGB^V8DxN>P7p0*@krRCjq0oc=H~bfM>x1y?_H7B0$%VT|WfCCP+}=g5$@K zBTJr4xw7TUm@{kM%(=7Y&!90c-ZII?jMJ!7t6t5zwd>cgW6PdRySDAyxO2bW0G5`G z7r=uHA5Ofu@#DyoD__pMx%21Hqf19Fp?B%&*t2Wj&b_;L?bSp6{!YHU`Sa+>hu=3| zc!vh?-#hQn;Y9=C_tWd&&tLy~-^9W90(}73mtS%M7MLJ?2lnUSgAg|N-*v+^AOL&~ z0DxhG#{OBD;f5Ms$YF#emI&d52DBHPfbfObKz#__=VAvMVrb%xIP!<0iomg$VFv;T z03&h>21%oZLguLClHcvPpMXq8Ddlud>PO#{SZ29gm0EV`<%3*)Ddw2v?dZXoXr`&= znryb|=9_TFDd(JY)@kRRc;@*giYn;o=bwNED(Iku25OxFWG1R;cZV+O=%dgz3hAVj z8YgL`m{xjerkqMwgAJgDD(a}DmTGDULlU>?3o@AM>Z_xo`ogEM)_Q7vwA!lcuB6JE zE3d$YifRotSXrQ@Aqm&24CT>Cta;8Bn`5;7(a7U@#}>EgY1m%t9RS{z2=0U9?w75q z{>cW%t$F3L8!n0M@)s|9=MJ~+4BgWEZiMsd*Dt%r-J9>gO8%>Fg)dfE+=f>oSFdma zW9l ztDn~FQ@j14FMaJ(U;hp$Ip}4}eu#72&CX{)tL^Jsw%dnr=m#CMf$oFZF&Mm1*qo{v zM}^PZYZ| z#q2;Jh?5xMuY$$JE_(5cU<@O$_>(IRZOaDC>XaIzL^`3#kA!QCqlx~i)Cbj2mgxk}Iu*L2MK+X#t<s7U4FC}|*qG)cgxzNDcxlSSs1>MLgeNQA8rQ!16;x*( zPF?THH(&y1s((#vSpzGa!B(@dCw-`5Crehw^3<-6{bgjuO4-gL)v~~G>_YL1D7^-g zubxeWuX@Ex*YZZyurEOD zdgm+G_Ab}E^v!R5r+Z)c%2&St4i$HWd*0H@_Ot;`u&4%H-QgOzxCmCTf*EXH{7N{% z6n^h!jeB7LXV{(S@L~AHLmh;uY6=0YgxNoZtjl1 zyyYjiHp(WRGK$Gu+c2Ma%xrG6nQ^OOF(Wz7a<*@Gv5e<3>zTkz?lW!OtY$b1y0e4^ zvX>7%=sBaA#fpw^mKm+sM9)~#lvb^!54`C9Oe5OSMz(XOJw4e?LwMArPOPb2oa#!0 zde2?PbgNzc=LY}y(*K<`TvttHUB{KzYxZ?zUkzwJ3%jqtHuSNrn(R9-d#uey^|P5x zY+DC<+SIOfg^i7EXjgmNvCeh3j~Z=RkGrbn7WcVrn(j%jd$r%L^P8RhZg$68%8^!g zy$9OveSh}eY0kI1{T3pTj9S2IHYksaEK>Y;xgv6xh+mmjOUo* z9Or1lLmqL4;~V58FSy5Vt#N&){G%(s_RE(!@|n{-=G?aV%}pL~l3la;+yh^#!4rN|hCjT3{eJ4ZEB;l9 ze|+Q>Kl#H~p756seCGMSdAxUC?w@~q=-EE{w3puOrx$zbyS{p?w|?rchkERrK6|Ct zzUa6AdG2+-dz<%u=D&Y=@KZi~k{3VZ$LDzRExvq+H(%k;KX~*BK7D^zf8W=yclO_X zRyASZ(HU?2)gQn3tZr4ST@||B$4~y>NPq^UN~`+8?)dhTN~h8iDO6AXcl*l~1tHa1 z9I$^q*MI&8dF!-OwnTsvXa0Z(D0u4xfHHtkyHt1d$A0AJOf2965y*hy$7&CFe-VfR zA0SN?IDcgqf`#`~F%SbQ(1I~Q0~Q!*DWDrRc!M~YgF3i_x$y!j&>CrEZSa*yM93Zd z*LX#kgxGO}aHNDz_#8~wOHVk3%n^lDc!e!gfJlgiT!?~~)`egQZbKJ_U}%M8c!p+p zhGCe7+#v%zh#C&{hTI~DIv9sINFHps9Wzh^Z@2+3U>b7hhk!_jx*>=;=!f5thuYDE z*dYObSSF7cC64$+$Ki;HsD+F;9hoQ{lL(2FxF4Me9(ag}QkWf^7#*S5B$3D@so034 z*nnGz9dIN=tV0~F{sEe-9FU8= z_yWM#jFmWylyfe$Xo=pTh^8ooA%Z>Tb)MRGYvGBeuP9o#63-Uv85Kn}iz^A0#$k{$5+A!G zlM88tr1%~FaI`V>;WZX>GDtZbMM;&?c#gQpmS;&EM;VMMDU?UajLhhRK`D>&c$Z6g zlm!`&74tJ+1CN&oi>C-3hxr^HDT<%yAMtn`GAU9t`EeSzh&D+jkI9%)vY3iFnJgEJ zns}LtZnI&SH65^SFq=_z2D3e$yXY!h``6seTo2og4*)f5z>4UTB0le9pe)5}u za+|THhFI8;#`%PVG#ZhXoK#pfqcMigshnRqoyVz##1lT+xt-kEo!ac@EM=-IiKNaFY;rZ#S+MuLhpql^*l3)g8u@)A3p%}^r71{*>Pyhk&p&%Nf9vY$~TB0U;q9~f8 ZD!QU9+M+J{qA(hxGAg4ZilRXP06Q&8Jj(z8 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image2 new file mode 100644 index 0000000000000000000000000000000000000000..2ddeb3258ce8b4a9b8f228dd4839b3bbc02667f4 GIT binary patch literal 74 zcmZ?wbhEHblwjax_`m=H|NsA2{K>+|z`)3$1LA{Z7?>1$`d98|;OQ@(csBC#-kWdu YlOB3ZTbw>G=$B@~^P+-3F02gJ00bHs-T(jq literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image3 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image3 new file mode 100644 index 0000000000000000000000000000000000000000..1651ba7e415c7ffb7ecd0a6dce27a23555bdffb6 GIT binary patch literal 681 zcmZ?wbhEHblw#m#_{IPNOiWBHEG#@cJOTm&Vq#(v5)v{pGHPmS8X6ipIy!oKdPYV@ zW@cs<78X`kRyH;^c6N3S4h~LEPA)Dk9v&WEUS2*vK7M|FAt51QKok}h5fKp;6%`W` z6BiekkdTm+l$4T^l97>-m6er~larU1S5Qz;R8&+_Qc_k{Rslp66;)MLH8nMLb#)C5 z4NXl=EiEl=ZEYPL9bH{reSLkCCQX_$Wy-W^(`L+=F>BVWdGqEiSg>HxqD4!VELpZ} z*``gKwrtt5ZQHgTJ9g{>qFuZ8?AdeRz=0!2jvPC7?8J!^r%s(ZbLPyYOP8)(xpM8= zwHrWmUM~@yodGh4hvuCefy?XQJ&AWH+K79D_<;#~JKYoCNhqi>` zPZmZ7hByWtkTsww@D!j93Hw&biM4~D8IyImv&3>*|3ycxyW7)(|? cJM7IXsh6i>^hn8tnMsh%;pALva{&fx09W+ppa1{> literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image4 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image4 new file mode 100644 index 0000000000000000000000000000000000000000..b565c8dd0e9d428c1da4c333c5fa408213992584 GIT binary patch literal 3056 zcmV1Nk%w1VTS>~0P+9;0000#KR}*y*TU5yZ>M)j$~<`XsWJk>%MR-&vb3yc&_h!@BhG{ za7Zi~kI1BQ$!t2G(5Q4uty-_xtai)odcWYXcuX#v&*-#z&2GEj@Nob@uiNkVynfH` z`~QG}eFAp@afdJi0Ei}wjE^Y+1CS#D0+g5{0*09&o1LH>0F$8}j-{v*pQ#*{tgj7< zup6thudcQkr@5uFycoE@ppwEDwZ)KhoX8cs%!i6}m(LTy)Nq7!q}LF~+--H+-w)2? zYTD)z*6C-2;_M9G@MHnY^9|+qVfOk9>-}Ed0VE)ApusTt4l3mGZ=pjh1s`%4Ff9qi zcLN0GN+?nP10f0mDn=l5DO-kY02(qFux=DHl^solZ02aDv1Kq9*i^8ySj3nXO!5S< zDdo^QA{`Jdd5NX6Nzw??A>dL$#+1s8I!!5(*fWkmE$nhf09Vflix$nSr-1EDwU_dZ z`m~6xB9UNi@=HaA;5hbGNhwXh!w~s7?-L}yw`s6?Hli})Xjj{ai?D_3{v0>NxqE~As6r=_yA|uHMb3Q3p5v4i1pO7 zO=0RWw$fQ1^2C%*OI38rD%TP48g!3cIK_V&4u#u~`Pq1%k8|kA)&g7=8D5A(-j*LB zo^e8a2tUW($7sw6(8m>pPVrK5lU zNJ-T!Rmj>nM^tq{yK72N*+FVnr%XG|w9|%YUVy0f2`ULA{wYRrRq(h0nd+8NAQZuF zz;3)f`so2n_{Qt*2LA#C;t?s4V1<{aWV${ z8nnxiv_UGtST32B6w}LSH3?azI-GN%Lro%e15_hvh-g@!Yc31p>ccXk9Y0O7if|(- zpqv4=jn7s1ybV}VF%CH)l~4qH(#Y4ic^rLyC3+TDHBR_yz=^}X_+~pfZk6EwJsgbz z=DGYv>y-VqcA@Cf!j|)FHRZO5=bv*`Zcr4Kp3&(%`&g8aOOXO)keMxkaR-{)BI1WA zx>%#4%yFmXz#`UJJY!m7AYfC<)5?5@0_y%ePi7Orxdln1C!&BZaGb-4-4hYK1@}%i z{_!cG1cdxl{LX>-{i651Sowdseg*iWM#UUZFnN{1e(%~JD`2H3!fC;QR!|@X+V>3* zUF0HI+RVIKRHx^h$T>Fg5CmTkz%2X^B5!!jpHFz_&8hGbF+fAGj8bW$*xl!6ws*vJfwvKMI-K>-QU zgiA)jl}K|VGFVbd3n|43pFBb?m6AvS))GHyng(LHc!W~|>zA+_2TELlDV!(+M)i1E zZMNnkaiQZ_*$9)es#Pr(!14*-yudEsKrGu}?JuB#(baIqE>U6Uk5w9**T#k_y18JS z-gAL553v)n1ra4vYzE%ASC*emYi*9&Tii^B%qHwpYYQ8XLTMELP!UuGp`}S@nefRP zSy~~S?Ca$$7&nL5#3p1=y4s{dpgQX1&Sh*;BHGNr(L_ZidCqAOioi3y5Qva^+Z$gz zWbjZU6!n&&^uSSr;?XLARESA+kAqS z)?&iesJA7@S8KZi)gHmO65}lrO4|d?5?8oN&8_;B3pVEeB6kG9Ekbk&$k*q_;J7=` zY+sM4TP$w7x?<>pegy}k9 zyXT$HU`fc|0HZ*@-PNxZ4Sc==Gr_-gV{mZ??1K8PfhD^|j)F(KVF1UL9S{yehylfj z^nQ2@r8TiG?}1<)h?c!zsN^?BJYE>6xCn^-#*G6RgBGut#T))^A{?BB9k+wXlSQ&X z4`JjpG2U)&u3~2jh8(8@U-t};qC#K}pa(2x* z2(yh93Fj*ZdA>oGa-BWV=HK=?ihJgpAD^wMH8XRZDsTePZ)R*cb3MQSW?dWN!%AT!yyYoXyf=vzFQ=PxXmWFml=s`b@Q3LGe|eN%{@~YblTk&&^8PZJZgM*8?J-&yc7CB+v9`ur* z^_B|biav(7Z_UqJq@oXf6;WPtFM?G6o1U0`s?4ozRkS&g;(ld98t|tJ&=VK`R~m^C zX$9CAr)Nuoa#za&ej+0>cS3=q(KxneUPy8{TQnBgHznY4QSV1NO(B9hM}H|pQHoO% zkJEu|rBJ!YH~~0y#m7H_VuBCo7&Zt&hoKqdLlvIk2*Ds4^j8%yVMIiS9~D>;l0bqV zBra6f80>dBG6+5-p*t}WI4+gb{MA#Zak|n0K5r(hff198Pb_j(8H$0m3IYSr$9Mn@eVjUn98f0`l z93&*L=t1Q39mA7T)uTNF;}MI|jNywwwJe7R7`7N1*|8ih zLXEuGa9+1PyqF_BQ48<09N7p%Eg~JjIE^5;>6+S&}*y*TU5yZ>M)j$~<`XsWJk>%MR-&vb3yc&_h!@BhG{ za7Zi~kI1BQ$!t2G(5Q4uty-_xtai)odcWYXcuW$Q&*-#z&2GEj@VIrS;f-00@Yc(*fQGNP{Q6b)ZtIj zW3OB~`FX$#TlOmN3gTj7if8$(lHeAgm|vfjpEM%mA%m z#=*>-6IO;>=<_0jg#$f8h&5BuK7ACJKHZ3P!pnd~r}o<^mVqX+5dbt$+x3FfSpx~g zwFf!Jh-_;^dSP3Z$M1}% zz+|uG7F>IA@65j=BpSU>Tr}g_9GS2Sc z@u#Ez^1v6~8RrQlU;_aXNSJ^L9vI*q0aEvqgr8N$p9BD1I6`n5MzCLp9bg9{17D43 z;tAWGsNx9zougF);7Q=y1Np&d;RQ#fklHo0mcob=;p@JDfKePg=saXT<1M9AGfjX#sWF7@91(mz1#yCVz2~mHwv8g2y8;I);xZ%bbFbD$u;ej7;kMLe7y?3y8%iRLibH_c!%Rc$7x5#FLQ25~I@Qec2h~vZd;(0gj58WbAF8MkCe52^~ z>?Iu*a7f~(PcJdpA^s7g(_lfiER7=3qKIXI8xz@7EGfZwLnG=xN(nSFe3uj2*@jF z(JgQ+WESRF#yTp}CW+J@As_iSN7{*!j1c4suZT%09MS@o>?9Hx$$>tKQVOAL$|;|i zN(X#$l}XU#5F-goC%iH#t*j*wNU1$N>XHe$+{!PH=F1^+a+pYvB?j<_%qH9tL&0oj z4wzZSNlKFlrd%N{uc?z_a+4B&{N^j3DNZs_vz)ZBCOX&2&UU)(LP^U^&-*xN!z8t+GMMpGR`_BI-CQGB6eZOI zG6g2+BveY{F%xz8q9-+p>L;st5Tb7LEm0};GYMUdcf>T&0vXg?^VldvCh?OADUU&6 zjgV8zg}V9hDoO~Y=yB3|8^sxDt7g)w1jr<=g!0NVdJ1b=&q`Im6tz>;s?$bI1r@6F zDMoNIgrE>hvA^;rv1iItU1+mee(0uJfdW)g^8~I-Z56ah4Gf;tRUW1^wlq_b&A#5_ zDfU1}v+t1$W@YQI+ANH+Siy`zMFSw*rYoZrdo5cgix~3%P|7vm`Q59+vH@@v_0G4wT%0+*?L+A9XrS2;{tEJZAIERNP@Of~|TTz)}S z_4aBy!{QZNf>qk8lFPhd67hjqjH6n4*s)+raI!E^l>0PSV5nM+qWlZuw7_P<6>v?5 zFWe0Z4~JAYg3ejGJFD`-I6i%q)p*SXAx*&Nzw;pLOV?}SCv%j(lF^oQ}qkPV(r^1_K36TcAr!%4Rpx=Dq0>w%chDx+BD|O=a zUS`d>lBlu*2C=CCS;ll}PgLS`70E`$)DZJaz~tiD{B*}*{9^TRbd?vyZq;DALRhKC zvuk}Jw$tH~k*o8QuzuYoKXBT$he}bS()h(yyu#P9J&USXW7#bH($B6poh{zvN?iQ< zi?4tDQ#e7T);7k6GPkHoP7pK__+{b_&e@-1t<;nEPN_-XEdqY?&PFCh%?`qOA?G~F TukcK`!WYi)hCAF82><{)ex7A` literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image6 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image6 new file mode 100644 index 0000000000000000000000000000000000000000..1a6b260b4076c404788dba623dc62806c8349ae8 GIT binary patch literal 79 zcmZ?wbhEHb6k_0I_{hNU|NnoB4FwEfp!k!8k%57UK?lSG$ulr1OzF>DxcA_l#*lMa c@@K5lUMb!-Ra0R0Qcs&ZXTrXM7a|PS09Q&FBme*a literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image7 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page3/image7 new file mode 100644 index 0000000000000000000000000000000000000000..cec7aa04d8ff92800b4f446a76050641bad9c79d GIT binary patch literal 1613 zcmV-T2D14_Nk%v~VUYmx0P+9;0000#KR}*y*TU5yZ>M)j$~<`XnGDp>%MR-t90$K?m)tJZw@+}z()+_RINa9 z*%=aWu?&<)a5AqKD@4X^1-IC6MN1=#&kQqV+I=n5=rdfw{aWgAv>K=4=do%^HY|Tv zYEdIogoR6o4Q-Gzc2$gx4|67%l_!opnwuq^5^RxO0iPqKssfW9q6~^VZn7>Uu}zmZ ztthB>JwUh)W=APWBd5I_P{EJF3ZyMkTy&{)k{NiE9Iw<8t6tvK5zuWD$cOIM94!v>*bvNuR{11$-1q?wD=z_X3^=7En$I~hMPh`&bIllv>UTEiV;EMsl)+V~NirOcPDd?_hGoD{oa*-3;ZE>-VoWP%yzKl3p zVT@U+Dc$T;5bBf{b~bP5!u!<#(9J$IE53YVwwy_33iTEA=Q6e=55Hb4um1dp{`FVc zc=O>mAb402aP6U^zn~RRp+ft3DW)*m93OYeiO^LPCW+k2RASa;Q ziD#W#(pYJyak4sQtoPaJDrPy}Dr=f_a&qObtLW;Yk`Y`FZjO74n(_=v5IO(uD6xiGr>?zHC4OK%~6^0@9B zz(z={u^rZuh`&^h;EYC18nuwM=jq;5acU)NdIX8)8r^( zU9vDbC1;l0ZgWd>=RuDeDtA!M^8SwL|}gY%+EsaE%?8$4>*MK zXPLhH??TIa{Y}TufA2pKAB}t@1pJ+kfGIG`{~$7@006*%>r)>I94Nr6p+JHQg<8uzVy; z7H;wuG=kYLh{Azcp@_J&9|DnlE3-mbcBr?XJZAoX{R^K7pko;pjtq(2^57StI7TfJ z4~!in;~CW$Miz4LjRMPHeB?MMI@ZySw8A5-^k_alTEdTe1SF*dIY>hO(U6Bkqz}}k zNEykik@$EdB$qcy5J0e!Z@i=nr{@6-DUwa_!{fpd7)L}#YGPTKSPGvs4vb|HkVb1{ zEI%nVKhDyWwdCV14Y^A~Vgd>@w4ik|VLzxaXd)@Oz;Q0qdmwgns6LG+M~Q+HqI9(AKnJ18c~L}*y*TU5yZ>M)j$~<`XsWJk>%MR-&zxZ2cy13gI_S2{57_JMRL9~) zz-tAR%VAQagIWX)DR9fhGQ8Fam^BVV%1E=g(rxDgO!fJUBWas*G(mqF;LUn)d?HeE zdkeoDh>YLR(>@4O1tqo0zMMDNjYJ3rwFR zRkg5RS)QJ&O1282RKvZunaB=k#v#ur#Fj15t;xm9yv^J$)+W>6M$E$H)#SeBWa!H3 zE8@D?)a%>s^Y850_BTy_#r_-MjR@!92LVur3*L5@1M0CO>2e92owm zUAl6K4o<`Zkz}!sAC*k%)}Z1ZiZ3f>wCD$;M0-}8X}g3|nxTdpGX(Y7Gm9Vw3a|Xs zNx=(`L?+oRWhns+$*Vz{{(NaF6vmP-0j}Blg;vv$d!EXYw{_?evPHqcO^I)=zH@dR z63y$XMBllkvR(-6R?QYcI@acewirg?#!?~Um0Xu{8q1e4@6{}q^EJ<%LB|t4n)ET# zr%{7=OnSgg)g1-^FbkUl0M?>i)*hFaFtFdixlHCe+%E1pjgPY>tDLIw;&YqFH6)#G zbm(xadn8V8vG%*%D|edtU9Vpw8O@i@yrH5*0T*3U{Q85oQ0z;(j=ah>>Hfm*H5?+- zCp*Ze+kfJX##(vJ#evdl__Y<`Q~*9#;dK{gHz9Q!@{}NkA8ME(bJYZA;)y`mCs}zb z?&blDkinRoi@ed;iH!*2_?C_s$mku9Jp#F-kXjL0q>)u2IhK+S0B{?VhyVa(lv6GT zrDD6G*obC1*pbVREr>POQ7II{ogzYQsh(jH_=ZZ7;f=_lH(+*{%1$84>7kx%(ivxn z6xx{+o+1hg1<{cn};aPGFFK(*YukT7K|QX+|>f;8IkP-pRmG1_khhgC@cE5?4%F zsEnmpJdqwmr}*y*TU5yZ>M)j$~<`XsWJk>%MR-&vb3yn1Jtm9|XOi zQ1%-dkEtSZ$^0mr&}b!~lUlC~K^4o5YLNr2cuX#Dh30g50Q;h~Y>qf?3%fV=bL!61 ze+G0jfFynAbPBRGct3PuqWCvfa|3B*TQ8poB~P*0e}26;Nf1lMldOLf{lgoK%sCCz*(7bNm_ z(q~Wt@H{~J3GpaW0?;UUs;KH_ETqytkrBnTk5g{^sv5HTl-{pq28*`&DzR-Ar@OlD zhzNI)%cE3n%E{|cuV0XN|6aW)mlE5)ZWqucytn4tx&X)GO`IcH&xC>p1D2ebuj0a= zpJ9HSS!ZCTxaV zU2{ACSRv;PEOd3^n*vl+$DbCkg>qe5?3r}OPJ_h31`xn;hu}UaKu26BS5;D-ZzSs1 z4TMO@qY)L6uo$2i7^Wv&gbYAO7i_J?2wOIG?C4;EC^CUxesQ(1PH9Ch$HY#mRfD8m zjV(!*X%mfy9erNG6`pY%xK$R_8#m>zsns^DQOfMocbSV~%vRE^zK2nd;kmax=8A&R1n znO9^-<9y`Va;i9R#$c+QN4#2ttd*9E8$+#LpwU97art|#F6hp?4(5$2%( z6 zBd%jf(3_FDSj5ZcyV?nKZ&OKh`R*$Eeo4Z=00%5^zbG)=aGceSWN|SjjW)5DzACrz zIYF>%)W;wLMJ35j;yW_RDkO~Ez={C?zzG1r4Dk@I)yx3^5e}d;%P!jjfWZ^++~Ln8 z2c3b>Hm}Mw%1UE{#|lq>9CZWSUaWOkz*^nQT-aS*^1fepy|LI1uVwbcXj80qvR*d= z_Sy}%O{A+~Ctdd5y4sD4+=kH&u-$&&U1s5@bsRX{XY*aJ;0HTScHepfu9XA-oI=Ss z+md5C$d8+9m|+fi$NhL!U*PDQsEqtZI^^mS4z8ly^+$U!)DUZF=Zf*T>F?{v7U1if z*UkF|IO0e=<)%-5I`fTNE`79>KW}|B)jO}fRER5#_u|lVKK=G0b$=_a<8zRDp zK1$$I|FOt#r(ZtQ_J3cz@w0ACM%Mm=neN&ZEMJ+=dxkO~%jkzLS{x98P`KIv33xMC zJuhqEbE;T@i>7 zM4v#2crGc{=Q5dN6tCi!v5QzHjVbZr6R&qNCcY#auSf)N#PkjiWr>bSvSUMnCn!N- z=yn7Hq~-((lOIHiKd%XeBjLcHY&6GYs&u8C=rmuSMo zrB1020xXhaik`PA2RSHG-%*_&zE~&zgice{31$M>hm;uI?m!w!CG4=WsNY=ZJQtFs z{-!CZLh2_syrh(%E(8_VK!s>Hljh1cmApvF=6Cl{=KgvYOkf62R1_5BH|IGWH=@#& z!|~WA@0lj}MDdtL7jm?FxbFAwd*1FKP>X5MXx*!%gm{(5z zm9T|v>SH0x)}`5XtCS7XWh2`Qz`j6Cxd3NpGphijkw9jfUFli{P(yDF?M$A9L2E&f zAlQv z4LVnVo@!zp@{yv;E?0WmwC(TE$)k#L zoflZcodcoNcx_q-w{2(5Nl{xBxOCmQ2N%p+R$@)S +
      +

      Embedding Tcl in C/C++ Applications

      + + + + + +
      + Presented At: +
      + The Tcl2K Conference
      + Austin, Texas
      + 9:00am, February 15, 2000
      +
      +
        + Instructor: +
      + D. Richard Hipp
      + drh@hwaci.com
      + http://www.hwaci.com/drh/
      + 704.948.4565 +
      +

      +

      + +
      +

      + Copies of these notes, example source code,
      and other + resources related to this tutorial
      are available online at + + http://www.hwaci.com/tcl2k/

      +

      $Id: index.html 11708 2007-02-12 23:01:19Z shyouhei $

      +
      +

      + +


      +

      Tutorial Outline

      +

      • Introduction
      • +
      • Building It Yourself
      • +
        • "Hello, World!" using Tcl
        • +
        • Tcl scripts as C strings
        • +
        • Adding new Tcl commands
        • +
        • A tour of the Tcl API
        • +
        • Tcl initialization scripts
        • +
        • Adding Tk
        • +
      • Tools Survey
      • +
      • Mktclapp
      • +
        • "Hello World" using mktclapp
        • +
        • Adding C code
        • +
        • Other Features
        • +
        • Invoking Tcl from C
        • +
        • Running mktclapp directly
        • +
        • Real-world examples
        • +
      • Summary
      • +

      +


      +

      Embedding Tcl in C/C++ Applications

      +

      • You know how to program in Tcl/Tk
      • You know how to program in C/C++
      • This tutorial is about how to do both at the same time.

      +


      +

      Why Mix C With Tcl/Tk?

      +

      • Use C for the things C is good at and Tcl for the things + Tcl is good at.
      • Generate standalone executables. +
        • Eliminate the need to install Tcl/Tk.
        • +
        • Prevent problems when the wrong version of Tcl/Tk is installed.
        • +
      • Prevent end users from changing the source code. +
        • Keeps users from creating new bugs.
        • +
        • Protects proprietary code.
        • +
      • Office politics
      • Use Tcl/Tk as a portability layer for a large C program
      • Use Tcl as a testing interface

      +


      +

      Why Mix C With Tcl/Tk?

      +

      + "Use C for the things C is good at and use Tcl/Tk for the things + Tcl/Tk is good at." +

      + + + + + +
      + C is good at: +
        +
      • Speed
      • +
      • Complex data structures
      • +
      • Computation
      • +
      • Interacting with hardware
      • +
      • Byte-by-byte data analysis
      • +
      +
        + Tcl/Tk is good at: +
        +
      • Building a user interface
      • +
      • Manipulation of strings
      • +
      • Portability
      • +
      • Opening sockets
      • +
      • Handling events
      • +
      +
      +


      +

      Programming Models

      + + + + + + + + + + + + + + + + +
      + +

      Mainstream Tcl Programming Model:

      +
        + +

      Embedded Tcl Programming Model:  

      +
      + +
      • Add bits of C code to a large Tcl program
      +
        + +
      • Add bits of Tcl code to a large C program
      +
      + +
      • Main Tcl script loads extensions written in C
      +
        + +
      • Main C procedure invokes the Tcl interpreter
      +
      + +
      • Tcl/Tk is a programming language
      +
        + +
      • Tcl/Tk is a C library
      +
      + +

      + Most of the Tcl2K conference is about
      +
        + +

      + This tutorial is about
      +
      + +


      +

      "Hello, World!" Using The Tcl Library

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>    Always include <tcl.h>
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();    Create a new Tcl interpreter
      +  Tcl_Eval(interp, "puts {Hello, World!}");    Execute a Tcl command.
      +  return 0;
      +}
      + +


      +

      Compiling "Hello, World!"

      +

      Unix:

      +
      + $ gcc hello.c -ltcl -lm -ldl
      + $ ./a.out
      + Hello, World!
      + +

      Windows using Cygwin:

      +
      + C:> gcc hello.c -ltcl80 -lm
      + C:> a.exe
      + Hello, World!
      + +

      Windows using Mingw32:

      +
      + C:> gcc -mno-cygwin hello.c -ltcl82 -lm
      +
      + +
      Also works with VC++

      +


      +

      Where Does -ltcl Come From On Unix?

      +

      Build it yourself using these steps:

      +

      • Get tcl8.2.2.tar.gz from Scriptics
      • zcat tcl8.2.2.tar.gz | tar vx
      • cd tcl8.2.2/unix
      • ./configure --disable-shared
      • make
      • Move libtcl8.2.a to your lib directory.
      • Copy ../generic/tcl.h into /usr/include.

      +


      +

      What Other Libraries Are Required For Unix?

      +

      • The sequence of -l options after -ltcl + varies from system to system
      • Observe what libraries the TCL makefile inserts when + it is building tclsh
      • Examples in this talk are for RedHat Linux 6.0 for Intel

      +


      +

      How To Compile Under Unix Without Installing Tcl

      +

      Specify the *.a file directly:

      +
      +  $ gcc -I../tcl8.2.2/generic hello.c \ 
      +      ../tcl8.2.2/unix/libtcl8.2.a -lm -ldl
      +  $ strip a.out
      +  $ ./a.out
      +  Hello, World!
      + +

      Or, tell the C compiler where to look for *.a files:

      +
      +  $ gcc -I../tcl8.2.2/generic hello.c \ 
      +      -L../tcl8.2.2/unix -ltcl -lm -ldl
      +  $ strip a.out
      +  $ ./a.out
      +  Hello, World!
      + +
      The -I../tcl8.2.2 argument + tells the compiler where to + find <tcl.h>.

      +


      +

      What's "Cygwin"?

      +

      • An implementation of GCC/G++ and all development tools + for Windows95/98/NT/2000
      • Available for free download at +
        + http://sourceware.cygnus.com/cygwin/ +
      • Also available shrink-wrapped at your local software retailer or + online at +
        + http://www.cygnus.com/cygwin/index.html +
      • Programs compiled using Cygwin require a special + DLL (cygwin1.dll) that provides a POSIX system API
      • Cygwin1.dll cannot be shipped with proprietary programs + without purchasing a license from Cygnus.
      • Mingw32 is the same compiler as Cygwin, but generates + binaries that do not use cygwin1.dll

      +


      +

      Where Does -ltcl82 Come From On Windows?

      +

      Build it like this:

      +

      • Get tcl82.lib and tcl82.dll from Scriptics.
      • echo EXPORTS >tcl82.def
      • nm tcl82.lib | grep 'T _' | sed 's/.* T _//' >>tcl82.def
      • dlltool --def tcl82.def --dllname tcl82.dll --output-lib libtcl82.a
      • Move libtcl82.a to the lib directory and tcl82.dll + to the bin directory.

      +


      +

      Where Does Your Code Go?

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  /* Your application code goes here */    Insert C code here to do whatever it is your program is + suppose to do
      +  return 0;
      +}
      + +


      +

      Building A Simple TCLSH

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  char *z;
      +  char zLine[2000];
      +  interp = Tcl_CreateInterp();
      +  while( fgets(zLine,sizeof(zLine),stdin) ){    Get one line of input
      +    Tcl_Eval(interp, zLine);    Execute the input as Tcl.
      +    z = Tcl_GetStringResult(interp);
      +    if( z[0] ){
      +      printf("¸üÿ¿PX¶\n", z);
      +    }
          Print result if not empty
      +  }
      +  return 0;
      +}
      +

      +
      What if user types more than 2000 characters?
      +

      + +


      +

      Building A Simple TCLSH

      +

      Use TCL to handle input. Allows input lines of unlimited length.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +/* Tcl code to implement the
      +** input loop */
      +static char zLoop[] = 
      +  "while {![eof stdin]} {\n"
      +  "  set line [gets stdin]\n"    Get one line of input
      +  "  set result [eval $line]\n"    Execute input as Tcl
      +  "  if {$result!=\"\"} {puts $result}\n"    Print result
      +  "}\n"
      +;

      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, zLoop);    Run the Tcl input loop
      +  return 0;
      +}
      +

      +
      But what about commands that span multiple lines of input?
      +

      + +


      +

      Better Handling Of Command-Line Input

      +

      The file "input.tcl"

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +set line {}
      +while {![eof stdin]} {
      +  if {$line!=""} {
      +    puts -nonewline "> "
      +  } else {
      +    puts -nonewline "% "
      +  }
      +  flush stdout
          Prompt for user input. The prompt is normally "%" + but changes to ">" if the current line is a continuation.
      +  append line [gets stdin]
      +  if {[info complete $line]} {
      +    if {[catch {uplevel #0 $line} result]} {    If the command is complete, execute it.
      +      puts stderr "Error: $result"
      +    } elseif {$result!=""} {
      +      puts $result
      +    }
      +    set line {}
      +  } else {
      +    append line \n
      +  }
          If the command is incomplete, append a newline and get + another line of text.
      +}
      + +


      +

      Better Handling Of Command-Line Input

      +

      The file "input.c"

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, "source input.tcl");    Read and execute the input loop
      +  return 0;
      +}
      +

      +
      But now the program is not standalone!
      +

      + +


      +

      Converting Scripts Into C Strings

      + + + + +
      +static char zInputLoop[] = 
      +  "set line {}\n"
      +  "while {![eof stdin]} {\n"
      +  "  if {$line!=\"\"} {\n"
      +  "    puts -nonewline \"> \"\n"
      +  "  } else {\n"
      +  "    puts -nonewline \"% \"\n"
      +  "  }\n"
      +  "  flush stdout\n"
      +  "  append line [gets stdin]\n"
      +  "  if {[info complete $line]} {\n"
      +  "    if {[catch {uplevel #0 $line} result]} {\n"
      +  "      puts stderr \"Error: $result\"\n"
      +  "    } elseif {$result!=\"\"} {\n"
      +  "      puts $result\n"
      +  "    }\n"
      +  "    set line {}\n"
      +  "  } else {\n"
      +  "    append line \\n\n"
      +  "  }\n"
      +  "}\n"
      +;
      + +


      +

      Compile Tcl Scripts Into C Programs

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>
      +
      +
      +static char zInputLoop[] = 
      +  /* Actual code omitted */
      +;
          Copy and paste the converted Tcl script here
      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Eval(interp, zInputLoop);    Execute the Tcl code
      +  return 0;
      +}
      + +


      +

      Converting Scripts To Strings
      Using SED Or TCLSH

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +sed -e 's/\\/\\\\/g' \     Convert \ into \\
      +  -e 's/"/\\"/g' \     Convert " into \"
      +  -e 's/^/  "/' \     Add " to start of each line
      +  -e 's/$/\\n"/' input.tcl    Add \n" to end of each line
      +

      +

      +
      +while {![eof stdin]} {
      +  set line [gets stdin]
      +  regsub -all {\} $line {&&} line    Convert \ into \\
      +  regsub -all {"} $line {\"} line    Convert " into \"
      +  puts "\"$line\\n\""    Add " in front and \n" at the end
      +}
      + +


      +

      Converting Scripts Into C Strings

      +

      You may want to save space by removing comments and extra whitespace + from scripts.

      + + + + +
      +static char zInputLoop[] = 
      +  "set line {}\n"
      +  "while {![eof stdin]} {\n"
      +  "if {$line!=\"\"} {\n"
      +  "puts -nonewline \"> \"\n"
      +  "} else {\n"
      +  "puts -nonewline \"% \"\n"
      +  "}\n"
      +  "flush stdout\n"
      +  "append line [gets stdin]\n"
      +  "if {[info complete $line]} {\n"
      +  "if {[catch {uplevel #0 $line} result]} {\n"
      +  "puts stderr \"Error: $result\"\n"
      +  "} elseif {$result!=\"\"} {\n"
      +  "puts $result\n"
      +  "}\n"
      +  "set line {}\n"
      +  "} else {\n"
      +  "append line \\n\n"
      +  "}\n"
      +  "}\n"
      +;
      + +


      +

      Converting Scripts To Strings

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +sed -e 's/\\/\\\\/g' \ 
      +  -e 's/"/\\"/g' \ 
      +  -e '/^ *#/d' \     Delete lines that begin with #
      +  -e '/^ *$/d' \     Delete blank lines
      +  -e 's/^ */  "/' \     Delete leading spaces
      +  -e 's/$/\\n"/' input.tcl

      +

      +

      +while {![eof stdin]} {
      +  set line [gets stdin]
      +  set line [string trimleft $line]    Remove leading space
      +  if {$line==""} continue    Delete blank lines
      +  if {[string index $line 0]=="#"} {
      +    continue
      +  }
          Delete lines starting with #
      +  regsub -all {\} $line {&&} line
      +  regsub -all {"} $line {\"} line
      +  puts "\"$line\\n\""
      +}
      + +


      +

      Removing Comments Or Leading Space
      Will Break Some Tcl Scripts!

      + + + + + + + + + + + + + + + + + + + + + + +
      +image create bitmap smiley -data {
      +#define smile_width 15
      +#define smile_height 15
          These lines begin with # but are not comment
      +static unsigned char smile_bits[] = {
      +   0xc0, 0x01, 0x30, 0x06, 0x0c, 0x18,
      +   0x04, 0x10, 0x22, 0x22, 0x52, 0x25,
      +   0x01, 0x40, 0x01, 0x40, 0x01, 0x40,
      +   0x12, 0x24, 0xe2, 0x23, 0x04, 0x10,
      +   0x0c, 0x18, 0x30, 0x06, 0xc0, 0x01};
      +}

      +

      +text .t
      +pack .t
      +.t insert end [string trim {
      +She walks in beauty, like the night
      +     Of cloudless climes and starry skies;
      +And all that's best of dark and bright
      +     Meet in her aspect and her eyes;
          Indentation is deleted on lines 2 + and 4
      +}] 

      +
      +

      +
      Problems like these are rare
      +

      + +


      +

      Adding A "continue" Command

      + + + + + + + + + + + + + +
      +set line {}
      +while {![eof stdin]} {
      +  if {$line!=""} {
      +    puts -nonewline "> "
      +  } else {
      +    puts -nonewline "% "
      +  }
      +  flush stdout
      +  append line [gets stdin]
      +  if {[info complete $line]} {
      +    if {[lindex $line 0]=="continue"} {
      +      break;
          Break out of the loop if the command + is "continue"
      +    } elseif {[catch {uplevel #0 $line} result]} {
      +      puts stderr "Error: $result"
      +    } elseif {$result!=""} {
      +      puts $result
      +    }
      +    set line {}
      +  } else {
      +    append line \n
      +  }
      +}
      + +


      +

      Stop For Tcl Input At Various Points
      In A C Program

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl Input loop as a C string */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  /* Application C code */    Do some computation
      +  Tcl_Eval(interp, zInputLoop);    Stop for some Tcl input
      +  /* More application C code */    Do more computation
      +  Tcl_Eval(interp, zInputLoop);    Stop for more Tcl input
      +  /* Finish up the application */    Finish the computation
      +  return 0;
      +}
      + +


      +

      Using Tcl For Testing

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl Input loop as a C string */
      +;

      +
      +int main(int argc, char **argv){
      +#ifdef TESTING
      +  Tcl_Interp *interp;
          Create interpreter only if TESTING + is defined
      +  interp = Tcl_CreateInterp();
      +#endif
      +  /* Application C code */
      +#ifdef TESTING
      +  Tcl_Eval(interp, zInputLoop);
      +#endif
          Accept command-line input only if TESTING + is defined
      +  /* More application C code */
      +#ifdef TESTING
      +  Tcl_Eval(interp, zInputLoop);
      +#endif
      +  /* Finish up the application */
      +  return 0;
      +}
      + +


      +

      Creating A New Tcl Command In C

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int NewCmd(
      +  void *clientData,
      +  Tcl_Interp *interp,
      +  int argc,
      +  char **argv
          The Tcl command is implemented as + a C function with four arguments.
      +){
      +  printf("Hello, World!\n");
      +  return TCL_OK;    Returns TCL_OK or TCL_ERROR
      +}

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateCommand(interp, "helloworld",
      +                    NewCmd, 0, 0);
          Tell the interpreter which C function to call when the + "helloworld" Tcl command is executed
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      Linkage From Tcl To C

      +

      • 3rd parameter of Tcl_CreateCommand() is a pointer to the C subroutine + that implements the command.
      • 4th parameter to Tcl_CreateCommand() becomes the 1st parameter to + the C routine whenever the Tcl command is executed.
      • 1st parameter to Tcl_CreateCommand() must be a valid Tcl interpreter. + The same pointer appears as the second parameter to the C routine + whenever the Tcl command is executed.

      + +


      +

      Linkage From Tcl To C

      +

      • 5th parameter of Tcl_CreateCommand() is a pointer to the C subroutine + that is called when the Tcl command is deleted.
      • 4th parameter to Tcl_CreateCommand() becomes the 1st parameter to + the C routine.

      + +


      +

      When To Use A Delete Proc

      +

      Examples of where the delete proc is used in standard Tcl/Tk:

      + + + + + + + + + + + + + + + + + + + + + + +
      +button .b -text Hello
      +pack .b
      +rename .b {}    Deleting the .b command causes the button to be destroyed
      +

      +
      +image create photo smiley \ 
      +    -file smiley.gif
      +rename smiley {}    Deleting the smiley command destroys the image and reclaims the + memory used to hold the image
      +

      • Always use a delete proc if the clientData is a pointer to + malloced memory or some other resource that needs freeing
      • Delete procs are never used in the Tcl core but are used + extensively in Tk

      + +


      +

      Linkage From Tcl To C

      +

      The argc and argv parameters work just like in + main()

      + + + + + + + +
      +helloworld one {two three} four    argc = 4
      + argv[0] = "helloworld"
      + argv[1] = "one"
      + argv[2] = "two three"
      + argv[3] = "four"
      + argv[4] = NULL
      + +


      +

      A Short-Cut

      +

      In a program with many new Tcl commands implemented in C, it becomes + tedious to type the same four parameters over and over again. So + we define a short-cut.

      + + + + + + + + + + + + + + + + + + + +
      +#define TCLARGS \ 
      +    void *clientData, \ 
      +    Tcl_Interp *interp, \ 
      +    int argc, \ 
      +    char *argv
          Define TCLARGS once in a header file
      + 

      +int NewCmd(TCLARGS){    Use the TCLARGS macro to define new C functions + that implement Tcl commands.
      +   /* implementation... */
      +}
      +

      +
      For brevity, we will use the TCLARGS macro during the + rest of this talk.
      +

      + +


      +

      Returning A Value From C Back To Tcl

      + + + + + + + + + + + + + + + + +
      +int NewCmd(TCLARGS){    Note that the C function returns an "int"
      +  return TCL_OK;    Return value is TCL_OK or TCL_ERROR
      +}
      +

      • TCL_OK and TCL_ERROR are defined in <tcl.h>
      • Other valid return values TCL_RETURN, TCL_BREAK and TCL_CONTINUE + are rarely used
      • Common mistake: forgetting to return TCL_OK

      + +


      +

      Returning A Value From C Back To Tcl

      + + + + + + + + + + + + + +
      +int NewCmd(TCLARGS){
      +  Tcl_SetResult(interp,"Hello!",TCL_STATIC);    Set the result to "Hello!"
      +  return TCL_OK;
      +}
      +

      • Result should be the text of an error message if you + return TCL_ERROR.
      • 3rd argument to Tcl_SetResult() can be TCL_STATIC, + TCL_DYNAMIC, TCL_VOLATILE, or a function pointer.
      • Also consider using Tcl_AppendResult().
      • Direct access to interp->result is deprecated.
      • See the man pages for details.

      + +


      +

      The Tcl_Obj Interface

      +

      • A new way to write Tcl commands in C code
      • First introduced in Tcl8.0
      • Can be much faster, especially for lists or numeric values.
      • Able to handle arbitrary binary data.
      • More difficult to program.

      +


      +

      The Tcl_Obj Interface

      + + + + + + + + + + + + + + + + + + + + + + +
      +int NewObjCmd(
      +  void *clientData,
      +  Tcl_Interp *interp,
      +  int objc,
      +  Tcl_Obj *const* objv    4th parameter is an array Tcl_Objs, not an array of strings
      +){
      +  /* Implementation... */
      +  return TCL_OK;
      +}

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateObjCommand(interp, "newcmd",
      +                       NewObjCmd, 0, 0);
          Use a different function to register the command
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The Tcl_Obj Interface

      +

      • There are countless access methods for reading information from and + placing information in Tcl_Objs. Always use the access methods.
      • Details provided at Lee Bernhard's talk this afternoon.
      • Definitely use Tcl_Objs if you are writing a new Tcl extension.
      • Tcl_Objs address some of the weaknesses of Tcl relative to C/C++. +
          +
        • Tcl_Objs are faster
        • +
        • Tcl_Objs work with binary data
        • +
        + But C/C++ is faster still and better for working with binary data.
      • When mixing C/C++ with Tcl/Tk the benefits of Tcl_Objs are + less important. Using Tcl_Objs in this context may not be + worth the extra trouble.
      • This talk will focus on the string interface.

      +


      +

      Nickel Tour Of The Tcl API

      +

      Memory allocation functions

      +
      + + + +
      + Tcl_Alloc
      +
      + Tcl_Free
      +
      + Tcl_Realloc
      +

      Functions useful in the implementation of new Tcl commands

      +
      + + + +
      + Tcl_AppendElement
      + Tcl_AppendResult
      + Tcl_GetBoolean
      +
      + Tcl_GetDouble
      + Tcl_GetInt
      + Tcl_GetStringResult
      +
      + Tcl_ResetResult
      + Tcl_SetResult
      +

      Functions for controlling the Tcl interpreter

      +
      + + + +
      + Tcl_CreateCommand
      + Tcl_CreateInterp
      +
      + Tcl_CreateObjCommand
      + Tcl_DeleteCommand
      +
      + Tcl_DeleteInterp
      + Tcl_Exit
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      I/O functions

      +
      + + + +
      + Tcl_Close
      + Tcl_Eof
      + Tcl_Flush
      + Tcl_GetChannel
      + Tcl_GetChannelMode
      + Tcl_GetChannelName
      +
      + Tcl_Gets
      + Tcl_OpenCommandChannel
      + Tcl_OpenFileChannel
      + Tcl_OpenTcpClient
      + Tcl_OpenTcpServer
      + Tcl_Read
      +
      + Tcl_Seek
      + Tcl_Tell
      + Tcl_Ungets
      + Tcl_Write
      + Tcl_WriteChars
      +

      Names and meanings of system error codes

      +
      + + + +
      + Tcl_ErrnoId
      + Tcl_ErrnoMsg
      +
      + Tcl_GetErrno
      + Tcl_SetErrno
      +
      + Tcl_SignalId
      + Tcl_SignalMsg
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      General Operating System Calls

      +
      + + + +
      + Tcl_Access
      + Tcl_Chdir
      + Tcl_GetCwd
      +
      + Tcl_GetHostName
      + Tcl_GetNameOfExecutable
      + Tcl_Sleep
      +
      + Tcl_Stat
      +

      String Manipulation And Comparison

      +
      + + + +
      + Tcl_Concat
      + Tcl_Merge
      +
      + Tcl_SplitList
      + Tcl_StringCaseMatch
      +
      + Tcl_StringMatch
      +

      Dynamically Resizable Strings

      +
      + + +
      + Tcl_DStringAppend
      + Tcl_DStringAppendElement
      + Tcl_DStringEndSublist
      + Tcl_DStringInit
      + Tcl_DStringLength
      +
      + Tcl_DStringResult
      + Tcl_DStringSetLength
      + Tcl_DStringStartSublist
      + Tcl_DStringValue
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      Event Handlers

      +
      + + +
      + Tcl_CancelIdleCall
      + Tcl_CreateChannelHandler
      + Tcl_CreateTimerHandler
      + Tcl_DeleteChannelHandler
      +
      + Tcl_DeleteTimerHandler
      + Tcl_DoOneEvent
      + Tcl_DoWhenIdle
      +

      Functions For Reading And Writing Tcl Variables

      +
      + + + +
      + Tcl_GetVar
      + Tcl_GetVar2
      + Tcl_LinkVar
      + Tcl_SetVar
      + Tcl_SetVar2
      +
      + Tcl_TraceVar
      + Tcl_TraceVar2
      + Tcl_UnlinkVar
      + Tcl_UnsetVar
      + Tcl_UnsetVar2
      +
      + Tcl_UntraceVar
      + Tcl_UntraceVar2
      + Tcl_UpdateLinkedVar
      +

      Functions For Executing Tcl Code

      +
      + + + +
      + Tcl_Eval
      + Tcl_EvalFile
      +
      + Tcl_EvalObj
      + Tcl_GlobalEval
      +
      + Tcl_GlobalEvalObj
      + Tcl_VarEval
      +

      +


      +

      Nickel Tour Of The Tcl API

      +

      Functions For Dealing With Unicode

      +
      + + +
      + Tcl_NumUtfChars
      + Tcl_UniCharAtIndex
      + Tcl_UniCharIsAlnum
      + Tcl_UniCharIsAlpha
      + Tcl_UniCharIsControl
      + Tcl_UniCharIsDigit
      + Tcl_UniCharIsGraph
      + Tcl_UniCharIsLower
      + Tcl_UniCharIsPrint
      + Tcl_UniCharIsPunct
      + Tcl_UniCharIsSpace
      + Tcl_UniCharIsUpper
      + Tcl_UniCharIsWordChar
      + Tcl_UniCharLen
      + Tcl_UniCharNcmp
      + Tcl_UniCharToLower
      + Tcl_UniCharToTitle
      +
      + Tcl_UniCharToUpper
      + Tcl_UniCharToUtf
      + Tcl_UniCharToUtfDString
      + Tcl_UtfAtIndex
      + Tcl_UtfBackslash
      + Tcl_UtfCharComplete
      + Tcl_UtfFindFirst
      + Tcl_UtfFindLast
      + Tcl_UtfNcasecmp
      + Tcl_UtfNcmp
      + Tcl_UtfNext
      + Tcl_UtfPrev
      + Tcl_UtfToLower
      + Tcl_UtfToTitle
      + Tcl_UtfToUniChar
      + Tcl_UtfToUniCharDString
      + Tcl_UtfToUpper
      +
      +

      Functions For Dealing With Tcl_Objs

      +
      Too numerous to list...

      +


      +

      Documentation Of The Tcl API

      +

      • Tcl comes with excellent man pages
      • "Use the source, Luke"
      • See tclDecl.h for a list of API functions
      • The header comments on the implementation of API functions usually + gives a good description of what the function does and how it should + be used.
      • Most API functions are used within Tcl and Tk. Use grep to locate + examples.

      +


      +

      Initialization Scripts

      +

      • Run the mini TCLSH implemented above and execute the parray command
      • It doesn't work! What's wrong?

      • parray is really a Tcl proc that is read in when the + interpreter is initialized.

      • parray (and several other commands) are stored in a + handful of "Initialization Scripts"

      • All the initialization scripts are stored in the + "Tcl Library" - a directory on the host + computer.

      +
      Invoke the Tcl_Init() function to locate and read the + Tcl initialization scripts.

      +


      +

      The Tcl_Init() Function

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);    Locate and read the initialization scripts
      +  /* Call Tcl_CreateCommand()? */
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      +

      +
      But Tcl_Init() can fail. We need to check its return value...
      +

      + +


      +

      The Tcl_Init() Function

      + + + + + + + + + + + + + +
      +#include <tcl.h>

      +static char zInputLoop[] = 
      +  /* Tcl code omitted... */
      +;

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  if( Tcl_Init(interp)!=TCL_OK ){
      +    fprintf(stderr,"Tcl_Init() failed: ¸üÿ¿PX¶",
      +       Tcl_GetStringResult(interp));
      +  }
          Print error message if Tcl_Init() fails
      +  /* Call Tcl_CreateCommand()? */
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      +

      +
      But now the program is not standalone.
      +

      + +


      +

      How Tcl_Init() Works

      +

      • Computes the value of variable tcl_libPath.
      • Invokes the procedure named "tclInit"
      • A default tclInit procedure is built into Tcl. + You can define an alternative tclInit procedure + prior to calling Tcl_Init().

      +


      +

      The Default initTcl Procedure

      + + + + +
      +set errors {}
      +set dirs {}
      +if {[info exists tcl_library]} {
      +  lappend dirs $tcl_library
      +} else {
      +  if {[info exists env(TCL_LIBRARY)]} {
      +    lappend dirs $env(TCL_LIBRARY)
      +  }
      +  lappend dirs $tclDefaultLibrary
      +  unset tclDefaultLibrary
      +  set dirs [concat $dirs $tcl_libPath]
      +}
      +foreach i $dirs {
      +  set tcl_library $i
      +  set tclfile [file join $i init.tcl]
      +  if {[file exists $tclfile]} {
      +    if {![catch {uplevel #0 [list source $tclfile]} msg]} {
      +      return
      +    } else {
      +      append errors "$tclfile: $msg\n$errorInfo\n"
      +    }
      +  }
      +}
      +error "Can't find a usable init.tcl ..."
      + +


      +

      The Default Initialization Sequence

      +

      • The tclInit procedure locates and sources the init.tcl + script. The directory that contains init.tcl is stored in + the tcl_library variable.
      • The init.tcl script creates an unknown procedure. + The unknown procedure will run whenever Tcl encounters an + unknown command.
      • The unknown procedure consults the file tclIndex in the + tcl_library directory to see if the command is defined by one of + the initialization scripts.
      • The unknown procedure sources any needed initialization scripts + and retries the command.
      +
      Commands defined in the initialization scripts are loaded + on demand.

      +


      +

      Standalone Initialization Techniques

      +

      Manually execute all initialization scripts

      +
      • Convert all initialization scripts into C strings and + put them in the executable.
      • Call Tcl_Eval() on each initialization script and omit the + call to Tcl_Init()
      • Or, redefine tclInit so that it does not attempt to source + init.tcl then call Tcl_Eval() on each initialization + script after Tcl_Init() returns.
      +
      This approach is not recommended

      +


      +

      Standalone Initialization Techniques

      +

      Redefining the builtin source command

      +
      • Convert all initialization scripts into C strings and + put them in the executable.
      • Create a new source command that + calls Tcl_Eval() on the appropriate built-in string + instead of reading from the disk.
      • Read from disk if the named file is not one that is built in.

      +


      +

      Redefining source

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +static char zInitTcl[] = "...";
      +static char zParrayTcl[] = "...";
          Scripts init.tcl and parray.tcl
      +
      +int NewSourceCmd(TCLARGS){
      +  if( !strcmp(argv[1],"/builtin/init.tcl") )
      +    return Tcl_Eval(interp, zInitTcl);
      +  if( !strcmp(argv[1],"/builtin/parray.tcl") )
      +    return Tcl_Eval(interp, zParrayTcl);
          Call Tcl_Eval() on builtin strings if the names match
      +  return Tcl_EvalFile(interp, argv[1]);    Call Tcl_EvalFile() if no match
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  setenv("TCL_LIBRARY","/builtin");    Causes tclInit to look for init.tcl in /builtin
      +  interp = Tcl_CreateInterp();
      +  Tcl_CreateCommand(interp, "source",
      +                    NewSourceCmd, 0, 0);
          Redefine source
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      Redefining source

      +

      • This approach works for all versions of Tcl and Tk.
      • Also need to redefine the "file exists" Tcl command since it + too is used by tclInit.
      • To verify that the program is really standalone, remove the call + to Tcl_EvalFile().

      +


      +

      Standalone Initialization Techniques

      +

      Use the Tcl*InsertProc() functions

      +
      • Three routines that overload basic file I/O operations: +
          +
        • TclStatInsertProc()
        • +
        • TclAccessInsertProc()
        • +
        • TclOpenFileChannelInsertProc()
        • +
      • Allows us to implement a virtual filesystem that overlays the + real filesystem.
      • The virtual filesystem contains all the initialization scripts + as compiled-in strings. The initialization scripts look like + they are resident on disk even though they are built in.
      • These functions first appeared in Tcl8.0.3. + Presumably to support TclPro Wrapper.
      • The only documentation is comments on the code. + See the Tcl source file generic/tclIOUtil.c

      +


      +

      The TclStatInsertProc() Function

      +

      • Sole argument is a pointer to a function whose interface is the + same as stat()
      • Functions are stacked. Tcl tries each stat function on the + list, beginning with the most recently inserted, until one succeeds.

      +


      +

      The TclStatInsertProc() Function

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tclInt.h>    Rather than <tcl.h>!
      +
      +static int
      +BltinFileStat(char *path,struct stat *buf){
      +  char *zData;
      +  int nData;
      +  zData = FindBuiltinFile(path, 0, &nData);    Check if path is a builtin
      +  if( zData==0 ){
      +    return -1;
      +  }
          Fail if path is not a builtin
      +  memset(buf, 0, sizeof(*buf));
      +  buf->st_mode = 0400;
      +  buf->st_size = nData;
      +  return 0;    Success if it is builtin
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  TclStatInsertProc(BltinFileStat);    Register new stat function
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The TclAccessInsertProc() Function

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tclInt.h>    Rather than <tcl.h>!
      +
      +/* BltinFileStat() not shown... */

      +static int
      +BltinFileAccess(char *path, int mode){
      +  char *zData;
      +  if( mode & 3 ) return -1;    All builtins are read-only
      +  zData = FindBuiltinFile(path, 0, &nData);    Check if path is a builtin
      +  if( zData==0 ) return -1;    Fail if path is not a builtin
      +  return 0;    Success if it is builtin
      +}

      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  TclStatInsertProc(BltinFileStat);
      +  TclAccessInsertProc(BltinFileAccess);
          Register new stat and access functions
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tcl_Eval(interp, zInputLoop);
      +  return 0;
      +}
      + +


      +

      The TclOpenFileChannelInsertProc() Function

      + + + + +
      +static Tcl_Channel BuiltinFileOpen(
      +  Tcl_Interp *interp,   /* The TCL interpreter doing the open */
      +  char *zFilename,      /* Name of the file to open */
      +  char *modeString,     /* Mode string for the open (ignored) */
      +  int permissions       /* Permissions for a newly created file (ignored) */
      +){
      +  char *zData;
      +  BuiltinFileStruct *p;
      +  int nData;
      +  char zName[50];
      +  Tcl_Channel chan;
      +  static int count = 1;

      +  zData = FindBuiltinFile(zFilename, 1, &nData);
      +  if( zData==0 ) return NULL;
      +  p = (BuiltinFileStruct*)Tcl_Alloc( sizeof(BuiltinFileStruct) );
      +  if( p==0 ) return NULL;
      +  p->zData = zData;
      +  p->nData = nData;
      +  p->cursor = 0;
      +  sprintf(zName,"etbi_bffffc7c_8049b04",((int)BuiltinFileOpen)>>12,count++);
      +  chan = Tcl_CreateChannel(&builtinChannelType, zName, 
      +                           (ClientData)p, TCL_READABLE);
      +  return chan;
      +}
      + +


      +

      The TclOpenFileChannelInsertProc() Function

      + + + + +
      +static Tcl_ChannelType builtinChannelType = {
      +  "builtin",          /* Type name. */
      +  NULL,               /* Always non-blocking.*/
      +  BuiltinFileClose,   /* Close proc. */
      +  BuiltinFileInput,   /* Input proc. */
      +  BuiltinFileOutput,  /* Output proc. */
      +  BuiltinFileSeek,    /* Seek proc. */
      +  NULL,               /* Set option proc. */
      +  NULL,               /* Get option proc. */
      +  BuiltinFileWatch,   /* Watch for events on console. */
      +  BuiltinFileHandle,  /* Get a handle from the device. */
      +};
      +

      +

      For additional information see:

      +
        +
      • The man page for Tcl_CreateChannel()
      • +
      • Tk source code file generic/tkConsole.c
      • +
      +

      + +


      +

      Initializing Tk

      +

      • All the same initialization script issues as Tcl
      • Tk initialization scripts are in a different directory + than the Tcl initialization scripts - the "Tk Library"
      • Call Tk_Init() after Tcl_Init()
      • Must have an event loop or Tk will not work!

      +


      +

      Implementing An Event Loop

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +button .b -text Hello -command exit
      +pack .b
          Create a Tk interface
      +
      +
      +bind . <Destroy> {
      +  if {![winfo exists .]} exit
      +}
          Close the application when the main window + is destroyed
      +
      +
      +while 1 {vwait forever}    The event loop
      + +


      +

      "Hello, World!" Using Tk

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tk.h>

      +
      +static char zHello[] =     The application code
      +  "button .b "
      +    "-text {Hello, World} "
      +    "-command exit\n"
      +  "pack .b\n";

      +
      +static char zEventLoop[] =    The event loop
      +  "bind . <Destroy> {\n"
      +  "  if {![winfo exists .]} exit\n"
      +  "}\n"
      +  "while 1 {vwait forever}\n";

      +
      +int main(int argc, char **argv){
      +  Tcl_Interp *interp;
      +  interp = Tcl_CreateInterp();
      +  Tcl_Init(interp);
      +  Tk_Init(interp);
          We really should check the return values of the init functions...
      +  Tcl_Eval(interp, zHello);
      +  Tcl_Eval(interp, zEventLoop);    The event loop never returns
      +  /*NOTREACHED*/
      +}
      + +


      +

      Compiling "Hello, World!" For Tk

      +

      Unix:

      +
      +  $ gcc hello.c -ltk -L/usr/X11R6/lib \ 
      +        -lX11 -ltcl -lm -ldl
      +  $ ./a.out
      + +

      Windows using Cygwin:

      +
      +  C:> gcc hello.c -mwindows -ltk80 -ltcl80 -lm
      +  C:> a.exe
      + +

      Windows using Mingw32:

      +
      +  C:> gcc -mno-cygwin hello.c -mwindows \ 
      +           -ltk82 -ltcl82 -lm
      +  C:> a.exe

      +


      +

      Making The Program Standalone

      +

      To make a Tcl application standalone you have to convert the following + initialization scripts to C strings and compile them into the + executable:

      + + + + + +
      +   auto.tcl
      +   history.tcl
      +   init.tcl +
      +   ldAout.tcl
      +   package.tcl +
      +   parray.tcl
      +   safe.tcl +
      +   tclIndex
      +   word.tcl +
      + +

      To make a Tk application standalone requires these additional + initialization scripts from the Tk Library:

      + + + + + +
      +   bgerror.tcl
      +   button.tcl
      +   clrpick.tcl
      +   comdlg.tcl
      +   console.tcl
      +   dialog.tcl +
      +   entry.tcl
      +   focus.tcl
      +   listbox.tcl
      +   menu.tcl
      +   msgbox.tcl
      +   optMenu.tcl +
      +   palette.tcl
      +   safetk.tcl
      +   scale.tcl
      +   scrlbar.tcl
      +   tclIndex
      +   tearoff.tcl +
      +   text.tcl
      +   tk.tcl
      +   tkfbox.tcl
      +   xmfbox.tcl +
      + +

      Total of about 13K lines and 400K bytes of text or 9K lines and + 250K bytes if you strip comments and leading spaces

      +


      +

      A Review Of The Features We Want

      +

        +
      1. + Combine C/C++ with Tcl/Tk into a single executable. +
      + +
        +
      1. + The executable should be standalone. It must not depend + on files not normally found on the system. +
      + +
        +
      1. + It should be difficult for end users to alter the program + (and introduce bugs). +

      +


      +

      Available Programming Aids

      +

      Several tools are available. The chart below shows which tools + help achieve which objectives.

      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Features The Tool Helps To Achieve
      Tool NameMix C and TclStandaloneHide Source
      SWIG  
      TclPro Wrapper 
      FreeWrap 
      Wrap  
      mktclapp

      +


      +

      SWIG

      + +

      • Creates an interface between an existing C/C++ library and a high-level + programming language. Support for: +
          +
        • Tcl/Tk
        • +
        • Perl
        • +
        • Python
        • +
        • Java
        • +
        • Eiffel
        • +
        • Guile
        • +
      • No changes required to C/C++ code. Can be used with legacy libraries.
      • Generates an extension, not a standalone binary
      • The tutorial on SWIG was yesterday afternoon.
      • http://www.swig.org/

      + +


      +

      Wrapper Programs

      + +

      • Convert a pure Tcl/Tk program into a standalone binary
      • Several wrapper programs are available: +
          +
        • TclPro Wrapper - http://www.scriptics.com/
        • +
        • FreeWrap - http://www.albany.net/~dlabelle/freewrap/freewrap.html
        • +
        • Wrap - http://members1.chello.nl/~j.nijtmans/wrap.html
        • +
      • No C compiler required!
      • TclPro will convert Tcl script into bytecode so that it cannot be + easily read by the end user. FreeWrap encrypts the scripts.
      • FreeWrap uses compression on its executable. + Wrap uses compression on both the executable and on the bundled script files.
      • Usually include extensions like winico and/or BLT

      + +


      +

      mktclapp

      + +

      • Mix C/C++ with Tcl/Tk into a standalone binary
      +
      • mktclapp generates an application initialization file + that contains Tcl scripts as strings and makes all necessary calls + to Tcl_Init, Tcl_CreateCommand, + Tcl*InsertProc, etc.
      • Features to make it easier to write new Tcl command in C
      • xmktclapp.tcl provides a GUI interface to mktclapp
      • http://www.hwaci.com/sw/mktclapp/

      + +


      +

      "Hello, World!" Using Mktclapp

      +

      • Download mktclapp.c and xmktclapp.tcl from + http://www.hwaci.com/sw/mktclapp/
      • Compile mktclapp: +
        +  cc -o mktclapp mktclapp.c
        +  
      • Create "Hello, World!" as a Tcl script in file hw.tcl: +
        +  button .b -text {Hello, World!} -command exit
        +  pack .b
        +  
      • Launch xmktclapp: +
        +  wish xmktclapp.tcl
        +  

      +


      +

      "Hello, World!" Using Mktclapp

      + +

      • Set "Command Line Input?" to "None"
      • Set "Standalone?" to "Yes"
      • Enter "hw.mta" for the Configuration File
      • Enter "hw.c" for the Output C File

      + +


      +

      "Hello, World!" Using Mktclapp

      + +

      • Go to the "Tcl Scripts" page
      • Press "Insert" and add hw.tcl to the list of + Tcl scripts
      • Change the "Startup Script" to be hw.tcl.
      • Select File/Build and File/Exit

      + +


      +

      "Hello, World!" Using Mktclapp

      +

      • Mktclapp generates hw.c. + Compile it something like this: +
        +  cc hw.c -ltk -L/usr/X11R6/lib -lX11 -ltcl -lm -ldl
        +  
      • Or, if using Cygwin: +
        +  gcc hw.c -mwindows -ltk80 -ltcl80 -lm
        +  
      • Or, if using Mingw32: +
        +  gcc -mno-cygwin hw.c -mwindows -ltk82 -ltcl82 -lm
        +  
      • And you're done!

      +


      +

      Adding C Code To Your Program

      +

      Put the new C code in a new source file named "add.c"

      + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"    Generated by mktclapp
      +
      +int ET_COMMAND_add(ET_TCLARGS){    ET_TCLARGS is a macro defined in hw.h
      +  int a, b;
      +  char zResult[30];
      +  a = atoi(argv[1]);
      +  b = atoi(argv[2]);
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Adding C Code To Your Program

      + +

      • Go to the "C/C++ Modules" page of xmktclapp.tcl
      +
      • Press "Insert" and add add.c to the list of + C/C++ modules

      • Select File/Build and File/Exit

      + +


      +

      Adding C Code To Your Program

      +

      • Compile as follows: +
        +  cc add.c hw.c -ltk -L/usr/X11R6/lib -ltcl -lm -ldl
        +  
      • Or construct a Makefile that compiles add.c into add.o + and hw.c into hw.o and then links them.
      • Compile the same way for Windows except use the usual Windows + libraries and options...
      +
      Don't have to worry with Tcl_CreateCommand() - Mktclapp takes + care of that automatically.

      +


      +

      Checking Parameters In The add Command

      +

      Modify add.c to insure the add command + is called with exactly two integer arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"

      +int ET_COMMAND_add(ET_TCLARGS){
      +  int a, b;
      +  char zResult[30];
      +  if( argc!=3 ){
      +    Tcl_AppendResult(interp,
      +      "wrong # args: should be: \"",
      +      argv[0], " VALUE VALUE\"", 0);
      +    return TCL_ERROR;
      +  }
          Report an error if there are not exactly + 2 arguments
      +  if( Tcl_GetInt(interp, argv[1], &a)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
          Report an error if the first argument is + not an integer
      +  if( Tcl_GetInt(interp, argv[2], &b)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
          Do the same for the second argument
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Using The Tcl_Obj Interface

      +

      In the file objadd.c put this code:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include "hw.h"
      +
      +int ET_OBJCOMMAND_add2(ET_OBJARGS){
      +  int a, b;
          Use "ET_OBJCOMMAND" instead of "ET_COMMAND" and + "ET_OBJARGS" instead of "ET_TCLARGS"
      +  if( objc!=3 ){
      +    Tcl_WrongNumArgs(interp, 1, objv,
      +      "number number");
      +    return TCL_ERROR;
      +  }
          A special routine for "wrong # args" error
      +  if( Tcl_GetIntFromObj(interp, objv[1], &a) ){    Instead of Tcl_GetInt
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetIntFromObj(interp, objv[2], &b) ){
      +    return TCL_ERROR;
      +  }
      +  Tcl_SetIntObj(Tcl_GetObjResult(interp), a+b);    Result stored as integer, not a string
      +  return TCL_OK;
      +}
      + +


      +

      Speed Of Tcl_Obj Versus "char*" Interfaces

      +

      • Compile both add and add2 into the same executable.
      • Compare their speeds: +
        +   time {add 123456 654321} 10000
        +  26 microseconds per iteration
        +   time {add2 123456 654321} 10000
        +  4 microseconds per iteration
        +  
      • The Tcl_Obj version is 650 faster!
      • Replace the addition with a "real" computation that takes + 10 milliseconds.
      • Now the Tcl_Obj version is only 0.2 faster!
      +
      In many real-world problems, the Tcl_Obj interface has no noticeable + speed advantage over the string interface.

      +


      +

      More About Built-in Tcl Scripts

      + +

      • Comments and leading white-space are removed from the + script by default. Use the "Don't Strip Comments" + button to change this.
      • The file name must exactly match the name that is + used by the source command.

      + +


      +

      Locations Of Libraries

      + +

      • Tells mktclapp where to look for script libraries.
      • All Tcl scripts in the indicated directories are + compiled into the appinit.c file.
      • Comments and extra white-space are removed. + There is no way to turn this off.

      + +


      +

      Built-in Binary Data Files

      + +

      • Arbitrary files become part of the virtual filesystem
      • No comment or white-space removal is attempted
      • Useful for images or other binary data

      + +


      +

      New Commands In Namespaces

      +

      Two underscores (__) are replaced by two colons (::) in + command names, thus giving the ability to define new commands + in a namespace

      + + + + + + + + + + + + + +
      +#include <hw.h>
      +
      +int ET_COMMAND_adder__add(ET_TCLARGS){
      +  int a, b;
          Creates the Tcl command called "adder::add"
      +  char *zResult[30];
      +  if( argc!=3 ){
      +    Tcl_AppendResult(interp,
      +      "wrong # args: should be: \"",
      +      argv[0], " VALUE VALUE\"", 0);
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetInt(interp, argv[1], &a)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
      +  if( Tcl_GetInt(interp, argv[1], &b)!=TCL_OK ){
      +    return TCL_ERROR;
      +  }
      +  sprintf(zResult, "-1073742724", a+b);
      +  Tcl_SetResult(interp, zResult, TCL_VOLATILE);
      +  return TCL_OK;
      +}
      + +


      +

      Adding Your Own main()

      + + + + + + + + + + + + + +
      +int main(int argc, char **argv){
      +  /* Application specific initialization */
      +  Et_Init(argc, argv);    Never returns!
      +  /*NOTREACHED*/
      +  return 0;
      +}
      +

      +
      The "Autofork" feature is disabled if you supply your own main()
      +

      + +


      +

      Initializing The Tcl Interpreter

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +int counter = 0;

      +int main(int argc, char **argv){
      +   Et_Init(argc, argv);
      +   /*NOTREACHED*/
      +   return 0;
      +}

      +int Et_AppInit(Tcl_Interp *interp){
      +  if( Blt_Init(Interp) ){
      +    return TCL_ERROR;
      +  }
          Example: Initialize an extension
      +  Tcl_LinkVar(interp, "counter", &counter,
      +              TCL_LINK_INT);
          Or link a C variable to a Tcl variable
      +  return TCL_OK;    Return TCL_OK if successful
      +}
      + +


      +

      Writing Your Own Event Loop

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>
      +
      +void Et_CustomMainLoop(Tcl_Interp *interp){    Replaces the default event loop
      +  return;    Ex: Return without handling any events.
      +}

      +int main(int argc, char **argv){
      +  Et_Init(argc, argv);    This now returns after initializing Tcl
      +  /* Application code here */
      +  return 0;
      +}
      + +


      +

      Writing Your Own Event Loop

      + + + + + + + + + + + + + + + + + + + + + + +
      +#include <tcl.h>

      +void Et_CustomMainLoop(Tcl_Interp *interp){
      +  for(;;){
      +    Tcl_DoOneEvent(TCL_ALL_EVENTS|TCL_DONT_WAIT);
      +    /* Other processing... */
      +  }
          Intermix processing and event handling
      +}

      +int main(int argc, char **argv){
      +  Et_Init(argc, argv);    Never returns
      +  /*NOTREACHED*/
      +  return 0;
      +}
      + +


      +

      Mktclapp Initialization Sequence

      +

      • Initialization starts when the Et_Init() + function is called either by client code or by + the main() that mktclapp generates
      • Create the main Tcl interpreter
      • Construct the virtual filesystem overlay by redefining + the source command and by using the + Tcl*InsertProc() functions
      • Call Et_PreInit() if the client defines it
      • Call Tcl_Init() and Tk_Init()
      • Call Tcl_CreateCommand() and Tcl_CreateObjCommand() + for every ET_COMMAND_* and ET_OBJCOMMAND_* function + in the client code
      • Call Et_AppInit() if the client defines it
      • Run the main Tcl script if there is one
      • Call Et_CustomMainLoop() if defined by client code or + else run the built-in event loop

      +


      +

      Invoking Tcl From C

      +

      • Use one of the built-in evaluation functions: +
        + + +
          +
        • Tcl_Eval()
        • +
        • Tcl_VarEval()
        • +
        • Tcl_EvalFile()
        • +
        • Tcl_GlobalEval()
        • +
          +
        • Tcl_EvalObj()
        • +
        • Tcl_GlobalEvalObj()
        • +
      • Mktclapp provides evaluation functions with variable argument + lists as in printf(): +
          +
        • Et_EvalF()
        • +
        • Et_GlobalEvalF()
        • +
      • Mktclapp provides a global variable Et_Interp which is + a pointer to the main interpreter

      +


      +

      Invoking Tcl From C

      +

      Example: A C function that pops up an error message dialog box

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Tcl_SetVar(Et_Interp, "zMsg", zMsg, TCL_GLOBAL_ONLY);
      +  Tcl_GlobalEval(Et_Interp, 
      +    "tk_messageBox -icon error -msg $zMsg -type ok");
      +  Tcl_UnsetVar(Et_Interp, "zMsg", TCL_GLOBAL_ONLY);
      +}
      + +


      +

      Invoking Tcl From C

      +

      The same C function implemented using Et_EvalF() instead + of Tcl_GlobalEval()

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Et_EvalF(Et_Interp, 
      +    "tk_messageBox -icon error -msg {¸üÿ¿PX¶} -type ok",
      +    zMsg);
      +}
      +

      +

      • + Suppose the function is called as follows: +
        + ErrMsg("Syntax error near \"}\""); +
        +
      + +
      • + The command that gets executed is: +
        +    tk_messageBox -icon error -msg \ 
        +        {Syntax error near "}"} -type ok
        +  
        +
      + +
      • + But this is an ill-formed Tcl command! +
      +

      + +


      +

      Invoking Tcl From C

      +

      Use the "" format to generate a quoted string

      + + + + +
      +#include "appinit.h"

      +void ErrMsg(char *zMsg){
      +  Et_EvalF(Et_Interp, 
      +    "tk_messageBox -icon error -msg \"%\" -type ok",
      +    zMsg);
      +}
      +

      • The puts a backslash before all characters that + are special to Tcl
      • The Tcl command becomes: +
        +    tk_messageBox -icon error -msg \ 
        +        "Syntax error near \"\}\"" -type ok
        +  

      + +


      +

      Other Functions Provided By Mktclapp

      +

      • void Et_ResultF(Tcl_Interp*, ...);
      • char *Et_DStringAppendF(Tcl_DString*, ...);
      • int Et_AppendObjF(Tcl_Obj*, ...);
      • char *mprintf(const char *format, ...);
        + char *vmprintf(const char *format, va_list);
      • void Et_NewBuiltinFile(char *filename, char *data, int amt);

      +


      +

      Operating Mktclapp From The Command Line

      +

      • Generate the appinit.h header file like this: +
        + mktclapp -header >appinit.h +
      • Generate the appinit.c file like this: +
        + mktclapp -f appinit.mta >appinit.c +
      • The *.mta file is just a list of command-line options
      • Enter +
        + mktclapp -help +
        + to get a list of available options
      • Look at MTA files generated by xmktclapp.tcl for examples

      +


      +

      Format Of An MTA File

      + + + + + + + + + + + + + + + + + + + +
      +# Configuration file generated by xmktclapp
      +# Hand editing is not recommended
      +#
          Comments begin with one #
      +## Autofork No
      +## CFile:add.c 1
      +## CFile:objadd.c 1
      +## CmdLine Console
      +## ConfigFile hw.mta
      +## Data:check.gif 1
      +## MainScript hw.tcl
      +## Mode Tcl/Tk
      +## NoSource No
      +## OutputFile hw.c
      +## Shroud No
      +## Standalone Yes
      +## TclFile:hw.tcl 1
      +## TclLib /usr/lib/tcl8.0
      +## TkLib /usr/lib/tk8.0
          Lines beginning with two #s are used + by xmktclapp.tcl and ignored by mktclapp
      +-console
      +-main-script "hw.tcl"
      +-tcl-library "/usr/lib/tcl8.0"
      +-tk-library "/usr/lib/tk8.0"
      +"add.c"
      +"objadd.c"
      +-i "check.gif"
      +-strip-tcl "hw.tcl"
          All other lines are read by mktclapp and + ignored by xmktclapp.tcl
      + +


      +

      Summary

      +

      • Use Tcl for the things Tcl is good at and use C/C++ for the things that + C/C++ is good at
      • Use wrapper programs to make pure Tcl programs standalone
      • Use mktclapp to combine Tcl/Tk with C/C++ into a standalone

      +


      diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image1 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image1 new file mode 100644 index 0000000000000000000000000000000000000000..da26d7092e2ab1e6b127f2af153e5e42af7a6e13 GIT binary patch literal 42 lcmZ?wbhEHbWMp7u_`m=Kia%KxK};PG0g_>0Vq{^k1^|0{1S$Xk literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image2 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image2 new file mode 100644 index 0000000000000000000000000000000000000000..e176a96a552e45de1ad70b5b117af0fdb7262eea GIT binary patch literal 14343 zcmbWdRa6{}y0zOlG}bf@0UCD=P6T%dE{z1I(ctddxVr>*cMa|m+(K|C!8OwP^R2zt zK5Ji`f1GjNi@K{CRby1WHRm&@oPw;di0Km2E5I@v;9rCJcR>FPEg2aZEiEl88Hn}o z@Irb284VE;5lKl&4H1xrhK4yb)!f|N^`8m*JE^Iuxw*NezGStvwXLnKy|uNyy}hHU zWTT^_vjEoF+1Ztqm91LZt*w=kj_^9sizA z`v+T9MoUvlLQRH`iw6bi?}cceQPI=@ZvhdH6Wa5QXiQ=9*6uh`P`k`SVtx`B-6;oCe?*!}FM*XphN4uNI3 z!oJWIw9WJF&$q$9W&wC(+QwPlquarl3&R^;dsw8oZc()vJ7Glmsq21tT#-;O2WRcw zNQh4ud1zZ)xoHq6qGB(aSSEuuipR0-MGXJSxSGzQKNBPTUn;v;uNEpw+1zYX5rCbt9C4H$HZ}h$CI-85j6y|Ae;3}CYVkH5 z?@f1;35yploswDyC?s0ZhEZtZcBff>ia`fKp)OS*ofS)rYVoP6xf=1v0Ai-3cX)Rt zRiifS1|6>9wuwOdd@+I?dniwx!c$RYy##EqN_;@Nh@1>SlRI%Pj$|+g%AvuL=9MBS z_C4w&xiT2U_)|v2Q%Jyh3LAn2^lz8}-M(Fq5kFO|_46mi&Y@5T790Us9@%#bxdLD4 z6v52KKGXs43`2_7=)#&l(!Nb?TEMQpb87<9a^&;_P>q6pV01fYS>Ts$ZZ)LbsGKeo z89ZFGG$=ZEN+`--Tbk`!V;vBmO?c6TvP;TpLShX)&aY;;Y3lM9Y*4PO<{<4~%MPeB zX1w-M8NWL%az$nTIX#A;GBpc7|erry@h%TK6`*_h0tAehJ(rDkge67LLVdb#_+Q5#MbN;cb6& z3WW3zP)fN44BpYI892^qUAdf+^cpQUQ3%J|%+d zWaryG;>(V4eE!R@)1Sp3(=((P7tUM|;PGWx=a?wsGKFs`i_KRgvEa2bEi`Fohp0g| z(v*q4v;|<0AI9epejLXeMK2-yAoU)>t*-57yvI^8hK`&Zyjh|>3D6tu3m@^}>Di%k zMelhSXf`EAgywP&HT6hYHKAf+P9dcnPAm*K845}31D>@c1J4#rUla8sB}G;h`r{y3 z1Id2oKThl2<3;iFj{`!`J508!Y+#1?JaTKFH%i@d*1$Q^D@D__;@FNRwEgcH^m8@A z7$TK3HE_{i}2hd{)HKw)~qsew~GrG!T%jGiXhHyrEGM4x0 zl%a2k3iwfvB+7kwlSg@+m14@oYdmFQLU0UNdJK?i_N5Z*v~`u)cbT?Rhk{v_3Y<8r zA>N)$S+hhh&00$5BhEk6gf3sTj0d8Nl84MNAS8;*>0!K@t>vC zGO8i8b#Eyqy>%R-EMpjd8j^@-D3rlUL|0G_Y}X>{v}@aP*>jk(1b2+BtB2jQ=0Qix z$%3`f0ivbvQz$u$@>?2TzglVh6>Wf;%-Jy~P~GjaNLMEvBcQMkz)*#3{|FE_7@DV4 zAEIZ;?Z0<=J>^J^QK7frbehL#Z{#R)j!{Li18r-VL2f#< z(zC84dZQf_${pA%^NAVWlv>R3{wbYLh2^YX1@W^FRHiH$n#Q0RzB%_Mf3cF*uNEPp zmd-x@oH^*w+~9J})dPCEcp2uP9*E#Ok8fwVVq_5$94nvJ9OhYihQhc z#&C~hRF;m5b3E|EsxVyEaQ<-3-!RD}n}}zdH3vFrbG`9S>}>mwqE*SSDnN~N9^V_T zwH)G?u9^c_oCo2z1F%+C<#);rv2+$`@wIzCzrJym9`X%qF=pKI*lxT_$%=>Bw|$P4 zuQYAf@ZK41HKhH`4NU-hFu0fIox(&Jvwv#n8`g-V#VXgk#eOQEZLd5ftr&Vi$g-;h ze^g%JyEDv8#3lEVBT`NJtia&G;QS<^6Pa{s%CLhr&>_R{1}tuhHu(duGZi7yU;K*+ zvsE7pDnxouyRxKvz*Bx{J&wwNYBW2>fuU|?OzoO!T_xq11*$Puxy(J6^LTaHSy?!Z zbci}BMO`d=A6#MRHU0NLp?Gesidt zM3(Z<)yJd>v+@13&E@gDF|kF=!ngEY)obbm4XW^2bUR}f>CJCLzmU3N=PdtCSeoJEV2E)he(ogdB>yst? zK+VJt2fg=Lz4KK|GZW};I4VZJu2!+0u>m6YUp^KZUQqt&0slc@SgJBw1w6I~q@lPi z?FC}45z6i9@R$eUoY>~_y1Hcq5y1#|lKez8Sx?6-sR>`AcaRg4h4AuH3d#hf4F+>B z%KjAc#wGy$mj-M3M}uJlFaW(s0{>q$n0i4l8a6uo1=fQ2*nes;NscISiQpu9TnJBr z2~rpa-~VVZW(u!@e!wgesYfum}It~NF*U8rE)q0a8l7=5GHS0*oz*hi@w%RZ4 zPWzt(`c0~qy4B=1IGr>PLI5r(*wo4$S2B6lQyWy`8AxUo$T&*>Xs|EHIQgny?Ma$} zSYT>lVyv~M)5QwSVj>>V4`$u!yh;^n5+UYQRj%h-GhcQba&wI`(p0(!L$^_U*x%3g z@YwZ472>NYQQkSDsG~_c&h~acmS95>-FTn8s=m#|d+s4-KlT1h!zPg<Cyd@%G45s_{52l2z44j$&4%_ z`zbg;wcvy|I&->CXvzwQaXQf@?7N9G3bimYMDOhBjp9DvzUd2Zqe4_g_!|r!CGD< z>vI6c5IutubQ`_kN_--dxe^566=0)A+*0OTye;IYDx$0i2&g9`!w^Sm-q1O1R3HvQ zDvwz4Ce6w8cq&9f#!=glNaQOy35zYWHBbA3#m|Z&9I(Syqil6ZU$FOsY%lH`9eceR z4#(8D$QJ)|(~MZ74bz6|t)He=s9`^C^RaDCnPS6cqa-@~1UYJ}0R_IrpM;8@`qOhq z4H8j%jkUhje40dcX<#JeuO0v#uz?y2Y;d5H$m>A*%yu9{wL8u_2N#S3U(2=upCNK7 z6armq?lq*2OsjFg&4!!O!`$(VYvJ>WHMiJaR-{Ilk$+Bed&f!_`Eq$$RCWl6(nc?3Xle;j%3Al} z83L@E$b=y{hZHTm;6-@qu@J!pU^(heKmLxB^-Jk5M{kPzgPrUo#ZT3j@?li33DmiSYfOWD-n9U?MFuc#V5f1O7n*=Ss^}gI0`PHKj55z&v?*-Qe=; zOHr2}Y7MfXLG>zds|MsCfYSln*7A3MVpp*B8lEG_O_8JFi$KVS#>nElwl^} z8qtHBLo`v(rlY1D|7w5VQA^>*XuZcXF}e5x>Jh<#*h>V6^AeDm?}D z@WT&IR9eY9EoNh2XC;8?%>lFT>10f_vnTa}WpXlE^@9Xq=}nFracAj>LVACEvpx8_ z0aKBgd>&$fqRSo*6}AB{%Zd}^$~*Whq~b9EfZdy88?xTrwZX3-0&^~d^bGa>+lV_YyWIx7X8(D~Arm27H6dISwwlIw47Dlbha~APbB&A)_5<8hb&&-`B?h)Q z>B^i|#z&c|z8@RXnQvM?$fi_TD4Bp4+pwC4!;Nii%4YmHlX?00X&XZXNb+kGkz3*} z9JH*fW)4eg0WasHKqd<1T_8Iv==U(9tIxoO#1v~+Td8vWpnb-K91IaI79-3hyvB?V zl?+geXe>=;+tVDV?Hc#7><<3IO%c;|jnb`{$|2*JN`Z4OPnJb;it&6@^VhjMCo$77 z9s;PSc5u#v5@_6~;?u{TlP(Hn&~H%-!D=6BbK8(ijO9@zaSuTJ%OS#i2!yS)3eRcd zjEVmA9A&K0_IV+_kC}#l)Kqfb*mOhVa0Zw5heLyPu+7N8Kz!eENg@KKB)1e3@hHRa ziG$3D(Uk8zrX+T;B5HGWdPp!z0nL4{J(a(2Ap4>%9;K`oa461Os?(zw?J5)q92KIJ zTM$LTm4>HrV=v2zS5@_+Ns6C=3=2eycVo^4wWx%jZ|hVLX`6~7vdX768kZw3eqtgs zrZb`qX!DmsQDTOY@8laTjj3Vo&~K#yF796nZEEgVKP`5pO*%lG$Qs@09|qT)7e3)Z zJHylPj2r{xk%3(X(I;&;c@=5T;$(vk?3GY+eh*!h@^+4uo2bRRX7)0 z!3>&e{}o~4kEL?H{sHpDE1mrj*4>zuOa|G~9)jVi1t`o9p`ATql+d%<=hLK+W&@(E zk2gSL6bwppNX+Q#@N5NI77Lxx<|4jqnESXWO>CaPpg9YgN6%F4?s8G0jq_Ano){9N zieQxH`KRx&50K^dUMgR?A$mGWrK8FRnB`Gx6J1dO0*GeN3>}TtShr zTW^8ZyZGCtyggo8P@z`r01sOwHQG(le6#*AD?-b`jk&^8FzWe5&)ROtGmeIXcWw0P zE80A@Usl|6Oj^p>BT56IKgG=R^2z&-)*p@dgV&iyRCew~Oh*8@#6pD9EjgpVw2NL& zXLa89@efaER@%Sj3|W{B&oK!?tr7wJvO5x{%s#&mWls@3gg=R&Kgm#}462KiF&@al zRV%m&x_W#TnO?z>J|`sIwKKfJ9RIi>mG}!G_6vEc+ygI&W{{WIqaE_&NN1?c_;w*k zK9~x{2~a#5h|mqT_e4UKhu~@ml9{{VJq1e!Q-SqtN%TVSjsXL~gt$c-Z$gwHPazTn zG>5j8O440-!hmPt8^U7U~cgN*hFTLqPoYgxWcbdWSSj ztAk*TH&hrNrXU|&^57??7j8lp0Scx<4+@uma?*ctLIqK}wOE)vML1=$sS1Y{>jdLt z1S#s-%Iu4B-%z50B7?{xcO}@0A|fX|BN6~Z+P*op}N-PS!Gl21q2+wx5j{`MvQ6}f8v$!n*dDTD4MsHFb8At)r%(! zNkE;TM(!u_SNBD%CCo2Ker_k#)Jp_sQPdPtyJ&D>lP73_6K@Jh37?aC3BbhzZrJOI zHn)k(n8|EW6g8%#ui;4nX24`OKB>^P(uE1 zT#{K(p0`PI{696Z1_u@-Tp{a!xFii{fv^|o-&|75G@3}|UtF?EI}$f+gCn~&1T6%; z58C0~TC?5^Ta=yd(k@U77Q_Hj{cNe&==QojQ-Q92SL~ggWi+KDde>XOf9Y_2P@(cV z(Cz=|icO>HM?W)a-n?OC*wcA?3{oe>!RzgEKS9@giCA-Q&~0MvMa1Z?<=K0mVRe&G z<*tkQ#Glnq9d`;isS&-qo@%QX?h9OBvOz0&|J*B=s3U#YJ{N!!a!e3%D+AZ`gJ6xD zSp4Q4HwpToVpSOI;+qUdxgwujfEv*Nv&(!5;z0uw#t_GfMMV;^9Y5Ncr&v~nEcnmNS3_hk@fvp z5n096AfGpu71^w?!{zKmQ7gg>5J}X2SxVRQYG7;@1#2+E-6OilBQJmLw5Y>JYwH81 zzA$?-8mr!kX3MO%U7543t%i3?)8TSOW|_BD^Uy|TNkp)%RIrSQ(&;{h|kO0b|$An1$MQVy`RG^}gAd;w;OJ1G2W} zmyOw$p6YNcn0PY{GfEI)Kjoo?dB39m^lM_-v{@!O%qcHbQj{lZ{8Qz}4jSM4izLA` z?7}uQ0gmG_asv*2X@RDk#Ih-@9IHn4y^~U}7wAVc!*&l|b5kp-RRW*Qfl+StRDAFzgwMg{k-hQ;QnYK;5Oue;R`e||q5*Z)EMdc6Ge2Y^!mz>x1p zcHxHn$2W`#KnDyXQUCiJUh9`cAtFKlzh?`L645|_1_Q(Y$`)ctH247xw`Kp%7Fd*0 zSY!X4EijTu7dBZB0NK3-VL=PXlNBaIf3pP=`+=0#u0So;D~=T+(W%M2f3k%Hr^Qi~ zPN8z$de49PT8@P_CyXPbskVmwu|)dqS2&Pk-4ZcgrLF1CX6x8=@_HPj=Y!+FzSeVg z-PPHqS6_Q7U!}XoZsnEA%M1O#*}}H8O2FZ1E9Apue+v71#KPrZ?R2ryM?9BuXp-(9 zL|i2m`^p;X9|YcKE9Do!oyJmQzcM!v&sIY=?9+eJLDNGOfWG9rgCyfwv(M*Uo zwCyYoN{~?1gvG{ujsdS(vI&Bm-g%(l_1LNspA`p3^#8GY_ zP1}RLt8FfZeq*>)R&4{WouH&LKBu#Sre_$4T&K^JY{DmatYb}$VdNOao4NzDW+P(G zNwaLTHkcz|gT?Qn`IvsI@{?^VtL>?y%O!LqI+#lxcoi$0KP#*g)C1K|nIp+`*2zACs97uOS}BANA~7mk z3XEq21xu2#`4lXCxvC~t6}(?perYL{A-iZI)IiIZ8g>Di*P=SW)w(u|66rGiufGsy zVinqz*Lh^0Z*(bSO(sT1&j^2y-KT4@uvrhdcgi}s@#P+oWx6Z)^fZ~XWBEcO>#FM# znwr=0YxLfE0Pl#MX5cd`_I3C{mBmHe+gWAea%W2x=05iOSV$;0HZJ4m8EOZka^%Z) zn?}wLn|ub!k2ZJlJk79%AyA+2t}2ZkR&&3rU=PRGi)zKv2_x>6ix}}gIS!Hrf2O$+ zbDKx6DtnzBD4S*1k=h!PP!kO6S4=+o-tLLBsZx&^R$3rQW?bH%FRb2R-DGFQs5Fke zWUG77xtRRfvT~F3^|%8>>}b|SSyaNmhJ%0|!y@ct49^zL?8Hh=eKw!GvUqbn2DJVt zGk#D5e(x?p5}L68s%75kZM=Mzdbaq8=+NFPwex1#z47-feGHqmacOg4e{!6@bIDz5 zqtmJD)HSKw@{~?ioZdw6*8$REC4-xdXF!ov_poE9P0iGPt<=^qPHvg^FL5=RBqh+S zSbVI`wGSv%Ki4yQ z_zN#9E*)fZX=bvS#V=%31O3_Yk6nZst=;22TF&FIb4N(cD;?cXC6p(ESXwK;E5U{7 zseoebgM8m@Ev)BvW<)C}zXq!b0e!Hkd)-FEzT?G~cjt#rE=sUHM48$`UqA~EKFy}F zMjE16NJx&!r1jePkBKJFos2Yi@v=u1bb%Jq-RN5;IQ8o_;aFH}6R$ZxTlBCpUh{c0 z+|C~-3yUduW`>J4r?JFiy)0GrXd42BI6JX*(Qh%8y?PVfXvhsUirgaU+%x62gRnFF z>~9Clg0E9|4U*@y!pg}eG2?>2?SJvG<`G_>&PqkuZxgoSL7#CAFG6VP*tIOpQb2jr zZe#Vrn>y%eG!Fbxdb7WhJt+@+tGHr~^<7=e(wtgKkCt7)&HRC$={1r9ujhBdiVePGg)pxH>(RTgX5U4Qks~E7tL742 z^K>rj1G-N}tuVVZ`aLVs7Y5+rdOjq3*;i34S!Tm2VXvdZQ4Q7vuml^cyD-g5k@a!R zfFIM)KyW65$|09@(E{9Bxp*dx`Rs?53MyTE&8dwQMP_I-7Bc34{19FMSOB$vzv%Pd zVY3MeHZcea6IU}Ghy>v2m|!**iAND(vuS0{g^Wa!zx^9FgXsT;&Gcn@6JQx&0-J7p zO9S75LN=@YsKvSlvvl?w&9Y&AiHiAXPVbf2C^IV{k;L1DFrZ7RQmHyd)3ncBv2>^NIkMPbJeZ~4<#5$^}h;vVZI*qS{Q8d^>+)Z&hD@`t?x#;S&O#YSN!;e1};Gl3KRyNEqELYl@czz{EKZTcQ(L|j3f*s_k`*ZpHmL!Mcnl=NuN@9X&PIu*l z87wR=VH=HXLnZ2QbvOnMYzsu96B<-XiFWhoPVCfZlZ(tFm836ir`I8+GChQ?M=HXg zI?0HLeJ(BgOo-x0Jf&l-v%I(K;MB`i{zI^A>UmZg`95I%R1gwF65XMr7*wjK zl{e|#(F|QnK zsEoC6?@GKbi9IXK=PGS%GzG|0>5QEN$jA)8qAjQ75Z$!v87lA+*=G8HN3_k8-e>^R zORyEmO`Q@aL`!SfjpdS@2roJ+(`wNvRzGsQW;=~e$j+c~Nz$=4^q7>yd>_7S<8xRz z6D)k1zHNog6&`Y5GOvXN)Gu)8XF6Z0$xf~=YM+m{Gw+cz&LGKb*^6va;zq~I1F!G}EAUs|i&Z*=9^p3yY_v_T^0UXl}TNW_?FYo(YRKNq_ z3BqIm|C0yZXpXwk8vIK)CuLUKB9yyYP8W%)_#l2=t>>$7b%3B4VcTEtyB?qUC0X)f zyFc{pi1><0Sj*sF-R$^MV0z;p-JI{-?tHe^Z1>^B&jhLD%Mc>woodMA{`JY?{skVO z>&N5O>rluPDE6-KlcT`$3gBq-VQ>oLJI+)acJ#?;JA#4qvFc46lxNDvtE!S zD+?Noc;Ruf8%dcC*@H8r!}g*W6ASjDIoeM4VtDF=2V)`A^2KrVOR(a2p$j;Df(U}8 zBtiNCW|1gE=gp9)jMrI`qA0s=k*rBUzMrON6}6Xcm=4&>pt5B-G9WTh(~KYsSv$mA0eW#&7k4ZC!6_V$*;%%Mh^U!&m=kX(pxxf!0a`G_*NKsK3P2y9LAM-}BqQpx! z`=lgeMXxkf>eDk*j$O!eVJ5IG4atk&vZ64%pa@b_jWGViW>?eVb9RL3#N>Stn=i=-~*G6rHRMl2g zN5_*HyP4t{!-aG8vkkImoyI(;j8RF^YqN)TA~ddvAGuclXyZFtDCwG$Mp7-THt9tetEY3HB#%- zH?qCgd7u3@>%VVuPZHZW+lCKB$N=zL{;Btjh3>?Dj#7?r{qK0}yG5LGb@VY-IPxS0`Vbqqs_ z>?0qezn0qTb(4QpHLL4-pQ$C2f|F@uPI9|lqssrb+L>1~VUX_A8~HKOjq7-?>0;`) z9l@)(iTY74#gre$xZsDgN|5NyMMp^_?BDTPCPmuqT*s^oM1yci()KohVi1;=l)@e)Xdc#V`db$ znd64!x4$su!<&vlGQJpo9RV{v=eD3P}mRoF5!_g`k;n zKXmXM9C}yut@2Pt$aek)bRhNu_f%?~9uyaSR|0NQl>n-#r*^fxWuO{&HdfU90~%w* ztgTdCEM7=&a4Q#=NwAM@$}XVL7UOl8fW=QP9fryBC)reK1>b5_bGTROIn0<*>}L*G z+*g-A$CzUd2BnAG*F+{w>FGw3v~=C`n6b`6>&;f$H;6ejc|RNKQXr9T-PapoMH@d( zCTA`YH^A>FFf{0N2f+fgrHVBcGcw2^iy&kI6M*h2#ec8-f5{SzzctLs|F!Z5Pzm`< z^!{IKn8v7urXd6Wfji$b5&b_aUz6dl$1(d?4O2aXQ2fsDziXIQzsT<@maFxek>v~2 zs{U30{-ToetMZkYZ}6e z_w`~U-d9!R=@y>@j@BL(Waf0awfiQI)=L|x08Lq`{gR_tZYDr1phd1Pa^rnU(6t0C z$1_i){iBb4S}Sej>G$@zh(mw*_mQ}}x~8h)^N(KwSR@4?iY(cJi5hWnm_cEfoEG2& zs%!>IBO@$nYOgn3)~g|8F0!kUyj*t&5$aYY+fnqMHn%9 zYe6=)2+TAX_0ws77_bd1C;^2tQ$I^ZQLro>*Li|jHt@mA(%-FTTPkkJaANIxOdnj^)P~1z<%g!tjmos_zD;Pfn2*-yIA5 z6*0xBZ&P-sjvLSv&|l$90V~h<$%e8u6O}l2XILvgr%0f=Bv#<}?cV7*{;1 zdt{yw8~$cS1QSJWX%tKJ6=ym&67Eqs-Nj^~GhHmGbxDK$_wLBI*K4pM=IHg(I=Sjq zSGf*#j4KH-e3irv*rolPPZ;m%t=WFls`l5Et!Q>c{U^S)(&c-bhP{DkQO@>7DvH^| zz9WsE_I`-^7menXyy$GT#Lr)K*UVh~@8^8mbz!x7Z1Ig59q|nU`yQbP;bAVHx|21^ znaqs1mE8buH6tCmEVsUPjU@3h|x$tD& zGRJG;w93Ol0gExxo>1&aeH63o%=a^|tYI0h-x?*x1CmFksq)O)1z-V5xN$jO++os-N zw-X56)w@=CE0Lp3D+u5RzJi%l68Z1zw1!wlFv@AV+wwd62u<45xv?pkLJo_HMGdB2 zGWy#?r{oAjd_Js5mRxv0{1Kq2Zo(#oro7q=%sMNP!qzm9OxX%?=3EpWWHDVToi?vo z4+Y7vcu_x!0otkLD83WlES(hOS=BolIw1@5}H^!^Optmdh^7WCa?hzboFlGRm*d*zdcnIS^lFll?Ym5`KK(4RVOU$+)73$KUqvK90#< zJMY$9owjk5Z0h@ZqbZ0dCsGTgTLABL@4`A?f47;6Y&ua~?M{&oMJm_)wbw=W?5yi> zyqkV}NfpI=pv{<6L&7^H{!LN$KJP4oid?wjw;zE_&fToRr#npWUR4U$@Mv{DUtX)% zUOi&V^Ep=dD&liX*$AM+uvWC3`?C} z{d#AOyl!p1DC^r$PLPlhP(kZ`f)ptA&LNE?R*ACmo@WOR&0gN5X9mh zM?(^;P?{r%fJ#ad#Jw14;7tCLIfSU)dag~ICc=xD$?MZdIPJaZimrOi5~ziMFfBbo zRe<2bK}18Qw9W~{(iI{R{5Bh`MO?w5?JSu!0%0)qwLK-GEKO2!xak zkWP`6S4GVoBrZYqtQVCONpO9WzzRr2CQn2aNkrFA#Pm)CW+mcuCX({1XAo#R4H65u z#)KUy5R-X0CkKMP?0e;5gk;*2vf3VeNsz2SOF~7*kVpyzYIYs{IWI&kWhE=&K=^6| zGPK;`tFABkao`e@Z>cbWb%-Nd1Y3tXlMgKoe-xzTM!eWVrDzD3<=%sj~zt!JRz44Oo4?iSerzu|^Z@OE3o>0u7E`LAF$`LxQ9h2&1)E zCl=6P-s;Gk^~%QJdl_e%&Zy6(psu!dlI5-u6UQ6pSj2>KqqV|l)i)ov$&zB4B|_Kc zfVn|M3D5Oian^eRZ9H1(U=pyd(jy(xmlqY-()uPfZxIC49F?0u(V^aig!A+<-0%%P!dQv zkwlb^%0{k=Xd#Qd+%U3!pBFqLn6*+;#CuO|AY1nNH}X=hEVs@E_$SURc-nw0v6 zFs99?x`LTbn49yg^a-#mD~VNv+sFL{9Ag05I2@ZU6uP literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image3 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image3 new file mode 100644 index 0000000000000000000000000000000000000000..e829d3712cc41f9c50aab42628a353613f90d914 GIT binary patch literal 17750 zcmWifdwfgx|HnV)lAPRgdQb1CSLs!HPwyv5RZtcbMMru;QI=8^#Ys-u1XU@W)mEgK zm33RtSy}g8E~RB=VYZdA#bwlG6JuL#Rlof5e{$Y=Jl>br>-m14$y17@Srv(p4EzKB z{{uk~48sV5peV{wm>?F5lanV-oG6hNqM}KYCKVSKPo6wksZ>sx zGG*%2sne!SD=8_NK7IO(88hB`>n)W^HFM_7S+i!%o;|y?v~&6!t(O+x8Hty(V|6*7cW+;)fE*Lm6erMRaMp1)k~HvS-N!TvSrI^YHF4* zU%q0+ij^x@*4EapTD5BR>ecVO^NvQNsjI77vu4fOwQK9^>({MYw|@Ql4I4HzG&F47 zxN*~_O`A7wZftDavSrKGty{Nk+eT58R;$(NbTm!t_4=l!rsn2mgTY`l8nYqJ$v`=ZEtUX_uY5*?c4X>d+&90bnM^1|NZyh z|KNiUIy*ZL95`_B;K4(O4w=p7uCA`bhYue)a^&dIqaS|w;jv@KKKkgR?(Xj6$B&;l zapL2TKkn)2`Q(#NKK=C5&p!LiVzHb&dGge$Q>Ra#?(OaU{PWMxoH_Hw7hm-C^_@L? z_T0I1Uw-*ze}Dg1Uw!qz|NZalufMihtu~v@Znrxej)8%J^XJcBxNu=`aByg7=;FnT zmo8oU=9_OWU%ve9x8Gj5a^<`4zH>UASFc{ZcJ12t-+zDo`t=`v_~FMNfBfmEpN5Br zZ``#x85{`>EL z{`qHgboAA$SO5O|?|=XOH#Ro*`t|Ga@$olr-X#8i1^j<40MnF>e9r}8wXkz58p_4}jcN2=$mpe|X3%2;bdi4!<_1A(euZu2qPC0$- z+Yh8`AK#kt;+Om_V}Ar*AJEHp6xaNEn0e^yZ9}E$fxUXIsBZkhS9?b-i@*N(o$vQB#-9E1^Ja7c^N+!I zdR&91sA;KxHWyLvuKxS(`6oN}xbJuB4-_{BjvoHi`cc(42lE3Xzmh?s zw$n>?PSr)7zx!M6KYx6_{AL>T^?#G!y3yP5XzbPNCqZZbdNRCxeAiUfuSX!`h4Hr| zV{3Q95theaRRyg5_4(5O>p`|OmDXuMC^3ijDmlL>F?%^FX_I!W7*lsZ^`}|L%u;K>uFBp zQOP~7h}EzDCi^E-)zvwP{%DyblC1k~qPGTI%Kyu`R#@cYxBRzvbIy+n3()gbySV(u z(AJoBt!`;;Qd$OMTSOu14Qp%-BDRBK}FgHUKm&X*06_xK4}S zjnTGG*k@XytZv-ftiQHz-+l!OPO4`c{8pIlmnLqlme`|i_s}zP-}(KY-J8dE{i0v? zVaD%)9fvl$)^7KMl(v@ipW35#SFp}cebjTIc*So=imwG-n_7DJ9usK$jwl79l9N-D z&H-;7L&I9TJNJ*ib;8A^5!1Y9oblIRf@(+B?hqlp_%z8-&5;>-r9W=^p+4Z|@!Gb_ zg6(%oTC$m!kXik+r}{v8*7jt3ZKVR4%-ee<$5lEoch2M34{ohwoV`W`j5!Y%BLVem zrcL}#zqWO5kY9r3TP$ng3+p#IJ71ie`)bM6g36@R5Oy8hV`83EMkCK8zTgDlM>Q97 zes77|J&iE*ul*$Y&5>!08Kd{O!NE$iG2s-xcUP7hA35Y4gulJ|?RWoPK0Q945zy~d zxNG{+#RX6A;~??2`;Hu91B)*7!*s=ELZmkjX8vwLt`<6ll64X%8D)bH%tde|36h*o_ssAss;LGV<5&ig=@q5Z%5 zFS$Q%zS0Ws{J5o_!?$*zb9I94omG()_Xo3nv7MdA zzMrJ-YAtZrwRQV04ePmSD7wblXPtk)dA-B9_|H2j+lSg#=VZ6WSIye}hp#?tLJBKy zY^Lz)z`Z&6jU6#>PCDYh{c~ke(SzcV6b1;<1#fZ5AQOSb9|aJj0Sa0W!CS(MM8e4; zsS6UWR~8jsSpK8w5=;6&%Qa=c3Jn=I?KoO|}W;w66eg7Ao-~JhDkZmve^LfiG^sewwS+VSC%5Le!q_CGF zZvNA{IQseZ6X7>5MZqq*z9o_eNL#Sm%?OteAXbFLw50Im^#HB`&3V^P3ieg+`RK`l zDs*U+O;{A<7ZDH5D#|NiAjksj694&j^Jyf{nj^2Nm;3T=N{LGp7 zTFvUjYma`q9Y5#$*ZP@ZgI}3SUjH`xr-7qI1JOg0rv&X4Qo#yP%OZLsLSO6aBVV|t z%~{1P>e-|Z`%lWm#47&Mp$M2itP6XLvl2`I_?mR#i&6xo(jU2BO0nGd^rHu*OTyh6 zl%t_`OsS-O(g|(2Q@eY8UsdFem_6%OE@glbINaFL@-ic3&XFu`Q z6R&FqW%UbYKR$Ntoc~F~cY&4o)x_Z<_jNO)Ej6x`P(Tuns=xH?c~fy>y?qgX%q z`=kB;yo_vZyEp0J+$pKD!CPKC&!6rDTJIfQg1X_#fZN7NKB%j?wl^wtMq5(;&9+?{ zQQX$z6`u`_<8qU9_-xo7s}8Jo8uC?@ejgeKyiq{;Mr-jN6^e){c5OKlx_!BS;uP<_ z8*V}HTI=LIvVs|VKO*2Ol7{A5xEtD|LjSNvt3`_R1LOB_U>YclZtD*WfxUK#nvze{ z3B>%5iMykd*yUEv*86gNv5|t$xLT?c>9G4&2RdeAFh?t51{%L9xRsioqBaX(sIZuG zcvGS1h^W>~@hYL#dTW5@)!vx*=Rr-rm#z5YVQ*o@3&)RG&o`U@9n9lYZs$q6f}UB< zhkR;jo`v4?3GA~*UQQ7R6i0;<0pzo~?$hJ;==-|Ahu#{0zJqBs2it2Luw>lIoLpV$ zcg`{?p+9SsGB2JqrX`Mdq`%226z+L zkcGR#4f537A4&f2R^etGSz^T`ZsZfUaQvAhv8jIQx))yWtr0{xfyKgaRKY$LMw^=5 zW#yiA@;(DhzKZdZ;ARmZn8H3LxfiVb$_C;3nELX`h38z5%B`&@8D1&?C@>jt?L|HnUWWKtK!yvG~CG1HmASK!Fnb@Cccz4voCj|eHh9Ocx3n)&`T;4_v z8m?MfuHhU|b8If2Rsy~z1T9YBr{TKXyb(h9(pmbN5cC7k=n{NqV!dSsfLyC2xL0sY zNJ3@__X;U^CTUK~@XNUuuoFO?R$;3P5|g}VxbTJB$6D3AtW2|6=lvapNJ;)<4SSwu z91{A@?QrorEHI12zIJiHw+fUb{H0YGKbiTHRp9eT+qKsViO>W;7ldafZ6gJ376ekE z?N-*uCT_ol_p_P>tmqRHf6F@HM`6ba-Ziyg?5=nHtd$HKE_lw5l%P*iSPCZuNTkG? zzRD$NwV(_OdWz!yyGMX%@w4cZLm$TUYrs;s(C9`PR*-2yC#z9~#S$+2T zPr~bSvFEBF;DnYtJ!6vHL2^%Npkhk!)WwQcgWYbP&Bg!4I^{RF@JA9Z(g<$3SknPu zQ1Emd1|)V@#hGLUG8M<6=09@^4wg3mHeMX_B5m7ehiCqY`@FzefMESgatfVb0l|Oj zZmvD)|3TEkU|aEP5Oa>Pv+-2J_O9K3lZ;>s_Z7~mQNtDM7)byqoIJaQ$x*=vU7X7n zUa}Q@OA42pU>vZ2cJl86;XevIJhSAF7(c(1&Bt+&N(%dNCKJGoCRPV%``#qzQh`7f zci6@4Cs-jAv{1#lpyu6ohK<{%ytb@*WkEw-+!ug7pMroDX^^nz0T4}bFX0#gplt;A zl$rMj;X4k5hyN1(p;C@ZVisN#zGDFgG{RmJYYBl)CsC;co$X?*aI*VNf|L|N7hrus za>ut)5JQEoRlM#I~WAqIkT3h?hbL!-`TSJcIwor@n!CqDw9h~j@iFeA)xuZjP?n*UVgC3~;< zMODNblMp@J@aJ0PcF3Qh6;=#jUJ|y3gT(+4OfvUqm;x)bm*nrV!l;$;bc8qO1naSd zJxK!=s(Cle{JSo}tI|WSBJiklX|KiHLlSnl2Ap*9wgA}M&3vC?f8pfaGz;&O3}9yd zNpOx^cxEdCRLEfq{}+wm(>bDNYvMhW(gg>~5-KWYwmPOJzYg0pbJ?^gaFjwv_e3$LCN{6ungSeOgVoDmJ@ z13R?A%-W)6(Im@EaA)Jt2_U?!VP&YnGBxLvN!7bus5b%1Ej(>ydNgJhi5<|e*Qz0y zWZl)U?>uH4u-gOTMmlY8#FCVu; z`Z-#d*Kw}so*=$1dAUC?%!)kL@RzwxirkF%G@igjM?M$jVyG;pRIz{&Cl`NUye`eM(EB=>h(V=x8S5~ZCb+oFGgwF%v zb_*&Xz#<8IpV|{2BR~Qzt;9r5u))eYZswp)=mHREoiNkM?AP$FsRWWqc=A=%JNLgb zFY^jo#}HaLFP;2rfcv>x_<;nQZ$hU6Sf3F;ZA#0)wP*hYJw`P>r)&)GWP)z0C>si1}+ZkiQE1K*bON<}r8VQ;NG7fUidV z51;Y=l|X92+R4;F0yFT^ zK;e=NnNFn0jLuLomui?b6mz-dr?<_FSp=FvqRTa`=MoNwVEpXl&R0QkX4c2<4}ZXi z9suFYh-NrNxYUA#yMt|#2_^ptpKAEuX}G6No5oaveJ-GP2|p(p_79L|oUJustpuwO zfLb&EfC>Q=V~>RMg&Pr=SWiqG84jkH*dI!`7hQ&jX2Iie&D+l0*SlMmrYwMkYW`OuukyHw9z=duVPp4sBqxdZrD1q?Qx$p@d_1enz0pJ=X ztiYk!=>Vbt696Uwl2=2(1RZe;>YNZqjVzI1wQfug*at}71`2E^1Siz|UGBxp+^p?5 z=SU};>0m=B6k~z(U zPFA6lH0bzLE4qkeZXj8-8dKn)LWMyT^tqY8K>`CaQV7seicz6qt|qZoSKVJ`;hzMP zE|hGfmMZaRZy`CRg#PaZssa0a}&XpdkH@s7Hix5o>@*Os?Z86V*!O7 zl2FGjoE|f$pX6Uv4ehd~2f28c+{`o_sW7p>CWIF?SPTJ8vaov9g4cMITg3=6@gGXC zY!{fIV!f+&HK|$cF3v_PNKy$tAsHMA2s5+Zn8x{f3MHNBCKdOZnk{jI_0F!)_k|u8 z7JKYQ^9smE12`VZY=&Z-aE=;5)r{Y89(4muC9t(l=60Oj<>Fi<89tJ8T@=4n1v3D% z-o@NcafV%J6wbdZVP$JTgbLed9@wsC@3*j50w4waGfvb;&Aet7i~xa)8mfG7F{&;1 z1-Wnx7w%I*JQFIlpvMV*hX$KuW=u7sbDZc*31hYz@pWRo4}?w=G>a5mBN#veYXEbV z$Njotu?AhC=ACjeeay_K?$B13@URID#6hK-^&ZYLnAq(uc9RPBCH`6>fdWmiL;~+0 zKg;}?eq3nbAXYg~d4Ni^5;upD?E z#-vq@02~OM*b_H9i2^|?6jTiENvgdf;%7rqtatMcj-aC1LO&74?k!o-&hk1s?eLxt z?Kt)0$y{6<{qK9VyIOe+U@c4U8IHz_Tcii;%$u`|@(?iI4 zVWNMtl+9YNw;%UcoL0{ML_M^=gZg6H4}DYPz=(0?-R6#TY+&qz4=2f>q}_kBbkRe5 zk1zOSYMEtDEshB0p6R}NddNwTI$nw{di%AQ8He(gynnx@jVN4ww{d*W%cvVO8i)1Y zamex-lhbR!W2ReclOWee3uA&Yy!4{~vqL$WOUK^*c!KcYSB-x^zOgm{v$n1L=Zfvc z1ajMWgoT7Jp1qH;J&GNI>aENCCQ8bzG&8!}O#9{GW&~)49|R_)0++|@bSU;NK6fMb z-K-8vebh^z z>$Gv5GarVm|9c|>rrxi+$6)lR5MIh9if+xlJ4Dl7H*btDA-Khix7tS6(T;@%v2&>HNlV2YNlm{}ZHUU~Mn_vWjQ|JMG?2w9;k zzIOcKPN<>n;k)lVcs1C$;qr6Cp~g$wKlERKr`+cRCX>YOZ8@(Xzh@%2O+~=EPunIO+WPd-Ai4KD zXzAXZ{?R)W-V@i%=L6ES<0^;MfK_j`A`7kKcaSE)EHmqT+ck*y>;*GFe817Pzd7Wu z(v3PjNY%)>c_A00+ZXLSdn|MYaH)e!O|GItQ<}@vQ1~c8>mW62pe>nWvU25l7atrd z2^ppj7KAlL@+EeuqqP8)Rkt#`hX&sj!zOA+_T{oD(~LD;%?D-xV^#R1J=%xfUO=hc zzs0`&f&c2JHaiRoRPe6sv2MNJk`u3D50GH=PSD&>r7pl+vdm;dnSi3;gF=!*c^*ym z*zaQO4wl6fxjp_G(cDpR7`L;dw`z3T!_;ny5`-;}4T|whzOc!}a=ovrboqI|(%31A zko8^M(sD=e&(h+!@gJY_vIhu=$AUk2NwH?!subN)V##@=c0u$#E-sxG&?#vW_umQn zw9k&WOBhMy9hTDK$J(sfQSEyq`1vqaz^qP%zp4r!6B|-iYmEW8+4nIyz+qA_(XYmm zB{tqMH!}>V1;0s}ge8$M1PCa~1^GH%hJ_M`s9)WjX0>svd*#AnwGD}=2FVbR4hd?cbcn!q zU@lbw4!9?WN%zxPy?6L+!vj(AHg4ll7#tck5SkR>w2me42@5lM&-lrf$X}4)7R9L^0x}WmjRYAv>#rXmHuC8E(jB?{Q8+HZ{%T%X>$qKGUGLX=Ga!0xTUg#ZD^TcE?W?+pO zM5%P4(RChKY705!w85<=2Cu}-+0{KMu|Ug8>Lwx7xYBKuB<*1IH+W%9P4VGI%16+?I;q!Zd5*|6}ERYrT)*0FCZ$yzcfB&x+!B` z4a^V5;rJSf&aaXDb}>1Sl?>5`QiX7^1y2888%sJaKJ0a{gOSox*II9^^4~tJ~WnxXKquF&U7Ec4U0){T8pqV;MEcgSqWyxt{=F&O= z**?mg*$0bGfaZ)L$g5SOk6tj-07{_nKBa;UyC^1Mh0>yP>H1 z?#jzbL(VZT-ZYI3i#3HJ1t)hEzXTw@!|vm2Mcx^%`ut*~-LofPdO88;sczt)_7lhpC=6Py+1q?nSFooo6PVUL_mNw*|Ti_?#IZ#1Lv zH8Xk3^NxtVY+%HRuNrbpHtwMb`h=Pk15b1(yj%Uui+RV8Un38=W;P^vTa2E1U_-zj z<=e)dZlV~sEf;)o6^I#AhzgvJ)M76^tf7!h1Q5WmR)zSnppXV#s*#rCO=S&?wYXse zX)Y)95^?iN3z~=nKEX6pp_yi+0H9OLnyUJmmx%Q~I0(k|3OCKyKs600#sU+|kTkUx zEn{qKKyeQbQqu`ay1PNE=~g*HeSnPsU* zVC`%tRx|{8o1iEOor~)WjyElLGi!0fDidSM5Ij|!mxDvt2rM-Nkrb<`L3n-CL^bk> zmtHnXPm-dt4*iY)npRPU%_Cn<3BkWQZCEqPT&2_@8vQ!8K9HcIREX4sOfuY)>HtUNs>n!=QnpscADN0}YkZ4Hb-KoI~fa3XKjTxc}WsD!zW zLPR8pE7QxBjFfQza)u3yYY=`J$Qw1xGD8#1&E*|Bpn;Nt>gsG@f3#K$fY_~St1-u%9i#1tFr+$vOxl{ykoXwh1I?@PYBuKKD7T{0? zg-uiG*Z}f0Pqqu)I*JJ6!Vr>rd<2$^Ad@=Kc@0g+ZZg+*V5>*<*%lC>+2Ms7swId( z4Z^x1zWQ(>j>=W&R94eGz+8$O8q9_%Pjfd8V;e2l__l7tdeX28M%J?!6UuB-H!T~{ z&n1qn=x*|pf|-5IiXn<+f-^*@vICvgr=MolPwJ*QWz=#PGb$Kx%?BYB@NobyClqDU z;XO$zHFHr%lftQGDk;>%07&pKVgiE&{w@J?MVP|riODd#J7B|oIv;1KM}()+4XeZm zuYr;}15^aWl3;69j4T)6i5Qy+Jr1Cb=Q>ynC9{w;GY}Y=?^tvk3B{63fJY942H@QX z#j5B`4f1IUV_6Mz<_Nmf+!Wpi4!@uJ;4BsHh9{LVmvqy`H%H8)lKD_A>d-vmFeTut?4dZlA4OD!Im2lZ!r*!=mN!H zk`XHy1)Xp)FjAUSNaTVh8v7^pp>veXrB-x~S_gXsiCMc=*=+Wrm||^ghZZvGCX3N& zWsFjFQ-!g4tr6QeVpuzB&=AdwaArMaXcPzhOW>Q-O$@8HR??h34JvTcMO0Ho4YOW~ zt##8u>DU4#>>&YiGg3k_jX4fT1H$qnMFE zhAIgCtb05=c0b4mG)zS=nh>-w-$HxbUum% zM6th8m#9QCtaQ1GnF+dBQmse9cy)lfsT4!0ohZ3pBG$eyLsq$HAk`KPBVW`~Dyv~q z2gIC@Y#^G0Ss-h;X{z#ni$z$S(t~W!%|?A{H{h#~p13M-W&D2s}=(xEIMR$;2) z1%acwSSpe!IS9;Qm>PJgpeV941L&0^v^bTDbf#oVLqRuVo9Y@*ab+Y{p2llGKH`n6*;mqP}UR6k&@XiCdTF)`Ah;a&c1_Nd<_I3^Ocd(TQRxb{h5m zqsY?j(ILa7Ga|LI4IUb^SW*W2SplpXr*NxIHQZF}k%DfdZU||gN_%Qn(5GEB+$RrC~H8P)6j8?;*9DNDJ`p;v7rx*76YGQIE#Q03sha! zoLB?AyLA}^5-t zhWZBnR?XrZ2~;e_%B6^}l=79(vn|XGPQx}FOIA}QN=zYz5VI~{sh?@-+SF~>*4G?Z z1E!BOPgX-bBRtiDmg3DdeauxI%oS!m!v*FwFqLWuQbQ6Wl2Jw{x!(-v(-_lPS|+Dhn*7u(!=HhJ(o>Os3YtE^PonlGK1#!&vR4MSu#D zB54hD;gHVH0#CxxC~-Wq;U`#4<*FHrjpJwM3^(OUL0Wfn zV#D?lLLZ8Qc5_o20j)VfZyZJwL=;iOm_q5iRoY-PooA$iOopW$w0{{j5l6TdsLs`# z>o!G^h~oyu7VF;`LL-cn&H`?~yPLMT(6|mR z44OAv=s*p~B$|HS(fkf&ctxGqCeg7aO%0>W^$ms!@hY|%%A^=;M==%kNu8!CN|a}6-OV>B%5%S$4ei*tNTbxZXV&JEy zvvG6^#aNH)7oNgMF~l6!{T_wFE@*QfBh%IVwv;Y$VI_V2kcQqMVtjUFT=TS(OiOwFT^Hg*~ z!y1NIH`m$}qM}z=;FrPrK#IyFv3eC6qoO<(J>H4URw9fttyHOvb_#MWl(&SsZD-~Y zI?%04B`C?LK@AX12$G{g3cDlyoK1n#|L`)x(M%Y1(%ak%@>nxsjJmfW=xBMuT+@Rr z^=IOUrj71;s2f)GH7zYMG2d5BS>{lp2I4XxN!(q&h_A70!ou21unF56f2a1 zvJp(?q8LM*VwDc6(QoV1$22fjj?#1SkctFKEXC%DbOJM~9HL@>qL@nk3Mq5C5khb% zOQ{d<01CXMN~!l#Q4wY&b4UkjpmI%9;V^i=5zZy`N+&vh0V*FxqKtqor58DosU6Kp z1mIZ!*NJTI!)5^_ghd6Dl&Aw+MA00a;#r}pQA4BJP^1A5A?ElxfX0?3hyj>1Y8Y;$ ze9Uxy4YK~rl_?`ltEnE&FcojsCrYSTHAC?(L)-_58iX9CgUuA|*3QEpOs;`(Ptrc1 zH=Fed>f2K&{~FTJ*oPrr2gGLq+N&$!i&xF)VN$z23!4cL9!wCQazV4(7xE zZC$Cw{;dcZe~nb!~Qt$a5aNdDEI z)WQxF0Ni(&{OG4-sbA6mZY=9*F`@u2vk%7Yfc+|+A@QH@EZ+y6aNlWDQG#Rn-qqF9 z1}E$HFYDU+F8#e7fWT{wGwa5`Z!I$+Gt5975jQ_$=G^3N=iPf`Q{bG{cY+*bQD^?9 zJTPRx6!ckUWQb7|`O)`@i_SHMZoYn)YE~Um$E}5d{{6Q`uQlyK5K13Uq^mX;8}tbC zz{@-Id$sLeERg_xzU}pe*RO~@Bo>E9G>3Qj zDyF9&w%qBAeOA844wc^bx|ndW!*QkX-+|do&}f={$wxTsGDM$3qgwM`-m3a8zi*Tv z`K@Dzr>C#)FhR)p8(GAz#7eQm9^TXkO%7S9*A8&Fz$%aWX;^mwQfbm!qq030giO$V zcz5&yu}T-Xp7rMizgjaOCp>q0>Ci^iT|I2Lk4y_>Qv_$?H_@{%Ft|7gCEc{vO)Y2_ zL8K350f4W)UO6LubH4?`fUlbL{!xm=u$Q~;4EivD3XO80Y15+0`rJ0wyxz8<*aIzX zTF;8(@HZ)6ORmDPuf~qFPH2|MQ6Og7WbiR+Hj596%$EzFmfcf^EmZ+B@J;6$1~atX zZA<-isBWq6I{ca;{QaWC15k3Gjgx*!RXGWY!~q3O>|OJ11c6%42Z$2Ari~YlCDKzO zm-lLbprC|;GtZl^Qs~;!yHh59-%Y=@_08~$-PvD^b^Qz=u?gZ%Iy#e`bSvb@aca0GZ?N{~NG8$&_5{;$w?yjHwpCjN?SC!I-)8V=hw!)>d z`(_vcw{Wu+hk}|qfjn*0Et?27@@8K?!z}fjjqL42l#*vXUOF(VdQCF|ZkYzfU#NUa zA}R*lkYJzt^v(cIgJqB~l5z$>dd!UI^VL<;C3{*@#vR;=W);jS51IX)%3>EToh~^QCm8 zC}PK=mPjTvLIovicP>xA=UYQTyc#oeZTAs=oZ9M50__|p?cb#=692D_KdD@X_yY=T zow+ODq=r`1ps|{hEo(;O3;*q#obS5BU*N9bgb%d=e=`(P7J+}Px{&(m$<~F{GDz%n zMC7&cR<&1!zj6di)N6VVoI9}ANj{Rkx6(k?7Q2>(v)MD_ei3@u$ ze4)@)VGN75vX^@7vs>1ZRqa|7WzlC9r_fM4#Xv1^mb#9!xVj7S9f4z{GG@#tF7}MP z3mNCG?poV^FZ3r(5l`UMWe-Pq9nhfuqt~clQv`m1bs@_GnwO1K`dWsXbDc9=a$Qhx zFQN0gWML$>bO}E&Gt$m!d6RtafDBdf!~qH*Qkn0Gj-sDud8U1cOLSkP;O!h6DAf&;iYk52D4Sy%0bmg_fhV~1zL~8B52`|XTyi)^qvw^IIiBh4XLVvNtD?rk zdRaw$lwz*d=$MFF7FjfN$5La}q_Lsz3P!wy>uaM#pOm3Njc#bauNjUv!r_vuJ2mJL zf%m922yNT`w$u^q9vLjWbQJ}?vVadvGO*8tDKFatZ)qksk38SKnLL6AZXx*>OspyG zaKH_^DZ0n0g+*F^J%L82-`TO)3i}=DLj&S1KvG)i*CC~&V@%8`)exu{Vn)qSQ$a2n z?tvjOwO!nW=|=+hu;vI4Q$R*V`8M7Ii;W~_N)G@LVmVZ5;#ON>?;n=fLjHAQQ`@x@ zd7cgbOTboHDg!=DD)J`GAROEk(%nVzwMO!JPHS+<)g9`xsL+>AZ0o;myEpbZLWU*9$(47u7hQ+AyAvo7M(HB0kgs`& zX2e<MS!K-jr|-K71atsoXXEd2I_ zOmM~7ocmJ7&-hr2vovUdvGVLd%km2R;ZQ2vY*;|SC(nv z;={Vg>Ii-vf%q*Yv`CAZTjx|n#M@TRlU8z;1x;b9Rr-lXy96VfXy4TYR9OfI&c(r8 zR07(Htjw|wBwpvmuhP&V$0#I@D}e<47BCCIzzud!jn)D`(uy@(nq-p0{w=r`*j1b| z!V&UIS(EP?&tU)#ah4esL45$_qgJTILi^3tKyXQEH0T?*3hg8|J^hH|p@kW_Nv#d$ z>3mPuFr}_Kq0V$Oe9UB!E?u;9PD`ZkKDQ&V*YfxN8j@XGL!bM^jVVpA=*Kcc^LW>; zXsarg?~;e%UYv^FjbVR}7@BW-?OtJ#^NEh_0CtDp#>~)L4UW*e1WPp%8FaJnLdKq% zyrt?$mQN`8M~Vr}ei`AlO(Q!MfK&Ko8@^epz&tb>G_lQ4=P1gtlmFxNE>OCCq9*@Na=~C zc0VJS+jko%0aoKdegGO5SrGud2s`8h=jCEsZCtlR-S z>Ty+C;G~j5?2BxGRZ_~}Y5fVCPYHlKWa6W`RNRqC(aFPFe(#k_fdIj+z{3=4tpbxQ z%xMd<*n&r8!Fiq`40uTt9xV%$z;UW~6H8${o$|iVORaI_IFUuaBa8lW6|G-{TqkB7HF}BCE7*p0P@Q^k%QJ#P+(n=9& zo+5Psj_Q{A40KK60P`+A<0bH`0g%xuXWK*_w!jvx-%IP#NhFjHjc|9OfsSRFics!8=#OP7M!O9~{5qfmK-N*7flj{``0 zr(%ce-GUJ$-|WaFk(2>lRJTo3YV#@6`q#^-8@AwnTX>Ou!b_d>s3K>`QP8W%?xC~p z%VUP2;K#Bsi!H?=@2qkZBnyF}`koGlNH{z#(JHW3Ckq;u5o6jQl?=nJ zkZ}OL41A74z8(owCJXJggW}y3A@vW`iSB zOea#h@S~8ZR_jv)1@=QhBT!iV{rWxf_@lZwqb@eY9w^Z=hq@pYd2PAYZ8C z=_Xj0yUqIKa;Tln>WNVk?K z(#5%T>Fsn*2c28%NO8-Px?!;fj*6B?;PS|HT_jIVNa4^#E#C=zx@DrHo()lF1kWDU zBlEiKQ90IW=ibI@ps-;m)D01YJxnTNYeV*7;aqx;ZMP9d~q)w4OVow}eIiU=WDo?mROCC2OPwhc+T!Xp&jvN#1 zDaAy+u4i>XMm-X@@8+CWNWo=AZVR2xqmxa#SS1`Sg`+(0+Lh>H8+2l;E~N&^9&i-8 z909*63OcT3Na%@2b>ezBs@6WC2Tr^tPYrP-4(Jkxb%`c>{HQKHM3HhGPPD+Wd3I+j z9Mfn|=#?*Pwa0063HRl3luq0rk42IAJb3jid&Ib}jv#b3fsU+BI>+Ql*F1=Cl*c5( zXHwxvwLQAjF1{~+d&z_X7o8XVak?*^WYLL@u)XMMRJtxk1;>`#BgV85A-WJ8jw#c{ z)WYIM-MuOD&~h7>vU>LDu-S@Bv;j`rN0vtu+U?;kt%a0-SFBTSvd572n>@Iw;TLJ2 zBe&O)UE@e~!SRi{7y^!z$RqOPk++D=uVCLPigcbLsUMEl%VVVS$R3-Zgh&F)p2F`!`r$GFbn((5=YtbwqA*q$fHgx8V4CI98&IEVqk$VM(bYr{>{Dzc}*i z6&YfM1kfpY^mqoi=6ZxxkJE)uk&pw3w6CS*Q+a&1Jib$&(638$UCL;ubE#x0z4r1Z zBtwiy?#q*&$|tfMsVXG1%#ltijBF%DqR6OqWR@f8B4px_J-!o8=z$ZW|40c@{QcCP zjHjitkcp-0R3%b(4URWIj;Xdw-li}AkIwBzq=~6d&gqsM^!^0BJg!q0N6BML;b^ryZopnSDxc_-Cz#*~N;_fIiqd7iHBg{B zh@Ps8?@mkkPnXaFe?3>{Wq{+m;kbHTY@>X$7oFaSsMs+>x4phbK{kcY-wy_Gz`&(DMglAkx{PrwhPJD)0s*nwexh+ zOL*d#J*CLuA=T-nj`Z#`S&ejNds=$ShZ%{AnOx7&xoD1!&cCI}??bYy9qHmGoXd)-@5Fbfe)g;q$w;SD09|=so-l5OlWxhA2JD3&&rkM!k$&_{+I>#4 z6^<)~Fa8Mi?3aZQ@(CTfH;Xo8N)?K)b@AEkxkRkEy@d{4nVxH=r5c1vKrEl@CP?6$XS9Lc+Pnq2L=}=luCHD; zRG?X5D|!&eEy_Ep$m&g%M5m_^j&!{uFOQ!#`9XmT$?rvSOzzyvbY9W7am}j>aeXa) zB9HhYt6Gs!M5lFUdgf&w@8beIOZsH6^UiarWklLZ=bApPOL&!Y>yz98#h$2hQuE(w z*WXSrrAw0TO4}XMqdB?%7k&hR`=~PhIgo=nB)T|scQY^pG898GwM80&F6wnQ zP=hp3LjZ|`s@sDh77Ttoy0piGD%UzSKtr+@!!ay_Gc$KC$VQvPu$u!3x5GS~y{D2g zKS;Yg;IUqF13q^HIQ)7zNIrH0(mdEb>B<8~TLVHhaw_P!D3AgJO9MI3gZbVAJA6Yo zaDz5j!*zFqwvz*Ocf&V`139q6k&|*gXw~MA1K*Pa!oNeH%b7}pZsyYiJA?y(Gs7_O z!YiEWD3rp|C<8dS!_P|bTcIUojLq=>EF=NS~VM{0PY{`-d zk#j|>v+q24^XfTH`wuyFsi^i#iz3M{yz5BucIz0hDQ3YqV)brN;$Q(vge-G9Ae2eez1e@sHE=sE1q=30p}ZU z#!<(!tSF?8o_d;_r>J{aWKqKPDlBd-uJoCRp{DZD?mvI_u?HT?$njXtK{bq>?O8w6nT%kI93iw9-o}QL^$nq_Pu@Jrc#sipi$-QHwm2PWsZ! zGXF^lw5`a@Q%~&>oXsBR>e0+DbegV$b-+%))GfQCoHCWa!XH8h)`xczCOKqPf5{cfaCW;l;$_mfo>oipZ7LZ4Q5(T<%_u)A3tT`c^99 ktU1IvNvk&5D6v72jUnGDYMPxzdUHvR*Hpt zhhwjX;+=wS7Dpig9&gPnT`HU63h(6kD5bQD&wVDi%OIfB;ZCAZgwPG$qg%w{MP>-I zDiyPZGi!82>$-(&G54#bDrW1{%QdCvhTA!&b1>8@HZU|z7G{}}ljpP0&`M5_!5RP; CszJU0 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image7 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image7 new file mode 100644 index 0000000000000000000000000000000000000000..ba0d26ec18af4fb51381a116c29fcba4ba4e7204 GIT binary patch literal 149 zcmZ?wbh9u|6lD-)_{0DL3JMAq7M7Kj)xEvl`}XaQ}^zpAOs(RwO^8P#~hE2l$) zEUUPEqYGO*CWAYbr3dPH!(z%rUCUnk^*AU=09@Swd?7 literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image9 b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/image9 new file mode 100644 index 0000000000000000000000000000000000000000..f0a352f9d0d29417442469d7f2d5c395233f29f2 GIT binary patch literal 1504 zcma)#{Xf$Q0LQ;uvdu$A%S99$wrtc{iq(sy!o0Ybr)H(3Xk*AQPd#WBw&_j}Os0;E z&3f1Cgjio4g2|KQ%gecrG4>-F&?`FePsECsMYn;uw2uh#>3 zJf2EjU0nbm001fg;8#5!uV0k{fxc@Efj~f|Qdh&Z{(pm8E7!h&_4;VLqS*L~xVy5% znP&`~nwd0|CHr!|(p$k98;63oh=u0borL@jO3ZYbZ&=VIqsD;HqOQekDd@CjF_#H! zNl)bUm4BfgAF|S)_A!VP$#5zuI|XEx%gWC7&%DeG%}PwA!!c({OBg4Jd~6WEki{+r znWn)-alpCSctJ>5S_Jpzt%@B*bP=-fw=%~@0ZIlGIJTUDLLi2QUC`Wi4*eh_sSe$M zQYPN}eMcj`=jl}^MS1Hnt&^-1vfeiLtlX?cH;o*v7}<2Z2QE@t&f9piHc;}C4@aW!- zViw2%|2!Xer0B3b7w&f*P@yYb%gzRRohPN(ID)>Or8@=#n2_+$9{0uexjqLmj(p(> zX-d66(d-5JFxMjYwKUS$!{7&^E3D;Ef@Sq-ja~GnA~A)3H{oqy$wA(sMr{f@ssd($ zaK#9cyIBsf%6GJqLoP@91HHZ(E~gAN#W4EZ7*A+mLm1SiS(6n%tw7(G;AU4CMoeJK zQE<4@{jkLlPU;gZpJW41f2~sMDK|OYA|rCNf6&AfjY&+l87(CvsYC;(acTUZqiRmp8=)aAZ=b@IaBm zPw}&5fvUPvH!K-BzYsT}-oq&17MeddT`IIYb8Si)v-H9d36v7f4r7aE+iLg0qMOkf zuoCA_m5bjW6%_M6HbF05+0~+q%y{Tg!P!M>i?`lu9zc{>Pg9gvJjC=*@S*orh#>M# z-ni=@!q8JR5O1SK4=pBHX@7+?ol$3Q7ZS$U<36A6-HlZ_UMGpP2xROla1*~Qs**w++p>g&x}9;;L4*f@6=OygfWi+T&$EChtZ+eH3zsyx^; zc}5meL^(pwyJJE8tS~OOfe@v_DK-mxr@mA9w)2i^UBnE%1e^J?zc^}XBJ35#cq#p> zi1wgQtq(@EXxtJTEubOorL=Lry|V0eeYF1r7lIqgM^!pCq$r(#FKrglW^|jEgTKsq zd6mY^Ki((xzuSwGV+z!LG8BJfopy3Xb1NacT3fMF>|*OA_t-pRvJ%xA(e$s}q~U(X zoUkcLnXMamXEjYY(Dm%2oaZ|^3c-KOHKTIn$7vmS2kpx`dd7;adr7xf#XklhTdU|- z56Zgh%kPn&d_pQi6l_u91-6M2Y|i*0rnxR A_5c6? literal 0 HcmV?d00001 diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/index.html b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/index.html new file mode 100644 index 0000000..c7bfde3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/page4/index.html @@ -0,0 +1,768 @@ + + + +[fm] welcome to freshmeat.net + + + +
      +
      +
      +
      + + + + + +
      freshmeat.net +
      +find:
      +linux.com partner
      + + + + +
      news |
      +appindex |
      +editorials |
      lounge |
      +contribute |
      +feedback |
      about |
      +awards |
      +FAQ |
      + +
      + +
      +
      + + + +sort by: [ date | name | urgency ]
       
      + +
      +We should get this out of the door now
      +scoop - January 29th 2000, 23:59 EST +

      Everyone else is talking about it, so we should announce it ourselves +before you start to think it's a government hoax. Server 51 is our new hosting service for Open Source projects, based on Super Cool Space Alien Technology(TM). We hadn't planned to announce it quite so soon, and it's still in the alpha stage as we work day and night at integrating SCSAT with our terrestrial systems, but feel free to take a look around and see what's going on. When we're out of the testing stage and ready to make room for your project, we'll send word via your implants. Be listening. + + + +

      [ comments (8) ] +

      Category: freshmeat + + homepage   +
      +
      + + +
      + +
      +Is Linux for Crazies?
      +jeff covey - January 29th 2000, 23:59 EST +

      Ray Woodcock writes: "In terms relevant to Linux, this freshmeat +editorial glances at the tendency of mainstream viewpoints to dismiss +other viewpoints as 'fringe,' the propensity of dissident movements to +splinter into factions before they can effectively counter their +primary adversaries, and the difficulty of creating stability without +squelching curiosity." +

      [ comments (2), 2065 words in body ] +

      Category: Editorial + +   +
      +
      + + +
      + +
      +RabbIT 2.0.2
      +Ernimril - January 29th 2000, 18:29 EST +

      RabbIt is the mutating, caching webproxy which is used to speed up surfing over slow links like modems. It does this by removing advertising and background images and scaling down images to low quality JPEGs. RabbIT is written in Java and should be able to run on any platform. It does depend upon an image converter if imagescaleing is on. The recommended image converter is "convert" from the ImageMagick package.

      +

      Changes: Fixes have been made for a few bugs concerning keep alive and the HTTP response header, a bug with NT and cache directories, a bug concerning requests without a response body, a bug in GZIPHandler that caused it to not gzip already compressed (gzip or compress) streams, a bug in HTTPHeader regarding response phrases that are multiline, and a few bugs in ImageHandler and NCache. GZIPHandler has been built as an intermediate(*) to FilterHandler (this means that it is possible to gzip text/plain, etc., without filtering those streams) uuencoding has been added to the Coder, RabbIT now uses HTTP/1.1, HTMLParser now compiles cleanly with Jikes, and GeneralHeader has been created to allow for HTTPFooter (which is useful when sending chunked data). +

      Urgency: low +

      [ comments (0) ] +

      License: freely distributable
      + Category: Daemons/Proxy
      +download homepage appindex record   +
      +
      + + +
      + +
      +nmpg 1.1.3
      +Joel Lindau - January 29th 2000, 18:18 EST +

      nmpg is a small command-driven frontend and network-jukebox for mpg123.

      +

      Changes: Bugfixes, better memory managment, a new .nmpgrc parser, and new options. +

      Urgency: low +

      [ comments (0) ] +

      License: OpenSource
      + Category: Console/Sound
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +mod_dtcl 0.7.3
      +David Welton - January 29th 2000, 18:11 EST +

      Mod_dtcl is a free/open source implementation of server-parsed Tcl under Apache. It allows you to tightly integrate HTML with Tcl, a widely-used scripting language with many years of development invested in it. There are also many external Tcl modules that you can load into mod_dtcl, to create images, access databases, etc.

      +

      Changes: A major overhaul of header handling and internal buffering, and the addition of the ability to handle binary data. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Web/Development
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +CoreLinux++ 0.4.6
      +Frank V. Castellucci - January 29th 2000, 18:07 EST +

      CoreLinux++ is an initiative to normalize methods and conventions for OOA/OOD/C++ development for Linux, materialized in a set of Open Source C++ class libraries (libcorelinux++ and libcoreframework++) to support common patterns and exploit the C++ standards.

      +

      Changes: This release adds AbstractFactory and AssociativeIterator analysis, design, implementations, test code, a CVS daily tarball, a Patch Submission facility and updated FAQ, Web Pages, and defect reporting guidelines. +

      Urgency: medium +

      [ comments (0) ] +

      License: LGPL
      + Category: Development/Libraries
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +scribe 0.2
      +ChromeBob - January 29th 2000, 12:12 EST +

      scribe writes functions prototypes for your C code, so you don't have to. It also compares unique functions between source code files and will 'extern' when appropriate. C++ methods support is also planned.

      +

      Changes: A fix for an fflush() bug and better documentation. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Development/Tools
      +download homepage appindex record   +
      +
      + + +
      + +
      +E theme updater 0.1
      +Hallvar Helleseth - January 29th 2000, 12:04 EST +

      E theme Updater is a bash script to automatically update all of your Enlightenment themes from e.themes.org.

      +

      Changes: Initial release. + +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Misc
      +download homepage appindex record   +
      +
      + + +
      + +
      +Powertweak-Linux 0.1.7
      +Dave Jones - January 29th 2000, 12:03 EST +

      Powertweak-Linux is a port of the Microsoft Windows tool of the same name rewritten from the ground up. Its main function is to tune your system to its optimal performance settings. Currently, it tunes PCI chipsets and can set /proc/sys entries.

      +

      Changes: A major GUI overhaul, the ability to generate configuration files, extended PCI information tabs, extra information support for the Matrox G200, and numerous other bugfixes & improvements. +

      Urgency: low +

      [ comments (2) ] +

      License: GPL
      + Category: Console/System
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +Pexeso Beta
      +Pavol Krigler - January 29th 2000, 11:55 EST +

      pexeso is a simple graphic card game for one or two players.

      +

      Changes: Initial public release. + +

      [ comments (0) ] +

      License: Freeware
      + Category: Console/Games
      +download homepage appindex record   +
      +
      + + +
      + +
      +XZX 2.9.2
      +E. Kunze - January 29th 2000, 11:54 EST +

      XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.

      +

      Changes: Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES. +

      Urgency: low +

      [ comments (0) ] +

      License: Shareware
      + Category: X11/Emulators
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +DistroLib 0.4
      +PhiR - January 29th 2000, 11:54 EST +

      DistroLib is an abstraction library designed to make the development of distributed application easier. Its main target is currently compute-bound tasks based on a one server, many clients model (much like distributed.net), but it is quite generic and could be used for any client/server app. It is lightweight, easy-to-use, and relies heavily on threads.

      +

      Changes: Important bug fixes and command history support. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Development/Libraries
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +ToutDoux 1.1.7
      +yeupou - January 29th 2000, 11:54 EST +

      ToutDoux is a project manager which lets you design a plan of action using a tree structure, with translations in French and English.

      +

      Changes: A new menu and XML standard for save files. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: GNOME/Tools
      +download homepage appindex record   +
      +
      + + +
      + +
      +goMP 1.0.3
      +Gautier - January 29th 2000, 11:52 EST +

      goMP is a set of CGI scripts that allows you to remotely control, via a Web browser, a computer acting as an MP3 jukebox. This program is very useful for someone who's got a dedicated computer with a lot of MP3 files but that doesn't have any output and input devices except network and sound card. It's main advantages are built-in cataloging, fast access to music, and no special software needed on the client side.

      +

      Changes: Bugfixes, a password-protected config page, basic search function, easier installation thanks to an install script, and relocation of HTML docs and CGIs to a subdirectory. +

      Urgency: medium +

      [ comments (0) ] +

      License: Artistic
      + Category: Web/Tools
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +APSEND 1.40
      +M.K. - January 29th 2000, 11:50 EST +

      APSEND is a TCP/IP packet sender to test firewalls and other network applications. It also includes a syn flood option, the land DoS attack, and a DoS attack against tcpdump running on a UNIX-based system. Future updates will include support for a scripting language to construct TCP packets and a few more options and protocols like UDP and ICMP. A port of APSEND from Perl to C is planned as well.

      +

      Changes: The stream attack, bugfixes, and rewrites for parts of the code. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Networking
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +ecasound 1.6.12r10
      +Kai Vehmanen - January 29th 2000, 11:48 EST +

      Ecasound is a software package designed for multitrack audio processing. It can be used for simple tasks like audio playback, recording and format conversions, as well as for multitrack effect processing, mixing, recording and signal recycling. Ecasound supports a wide range of audio inputs, outputs and effect algorithms. Ecasound has a chain-based design that allows effects to be easily combined both in series and in parallel. Oscillators and MIDI-CCs can be used for controlling effect parameters. Includes a versatile console mode interface, a Qt-based X-interface and various command-line utils suitable for batch processing.

      +

      Changes: Support for 24- and 32-bit audio formats and for ALSA 0.5, multichannel noisegate, a new 2nd order lowpass filter, some ia-mode commands, and various bugfixes and low-level improvements. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Sound
      +download homepage changelog appindex record   +
      +
      + + +
      + +
      +SCEZ 20000129
      +endergone Zwiebeltuete - January 29th 2000, 11:46 EST +

      SCEZ is a library that should make the handling of smart cards (not memory cards) and card readers as simple as possible and be at the same time small and easily portable. Currently supported are Dumb Mouse, CT-API and Towitoko readers and Schlumberger Cryptoflex, Gemplus GPK4000, GSM SIM and Telesec SigG cards. A PKCS#15 implementation is in the design phase. There are ports to PalmOS and MS-Windows available.

      +

      Changes: More card and reader drivers, and an application to read out GSM SIM card (phone book and SMS) and write it to the card. +

      Urgency: low +

      [ comments (0) ] +

      License: BSD type
      + Category: Development/Libraries
      +download homepage appindex record   +
      +
      + + +
      + +
      +Comicq 0.2.0
      +Terminal6 - January 29th 2000, 11:45 EST +

      COMICQ is a command line ICQ messaging tool that allows a user to connect to ICQ using your UIN and password, then sends a message to the destination UIN.

      +

      Changes: Several bugfixes, icq99a compliance, and a new option --ip that allows you to get any user's IP by their UIN. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Communication
      +download homepage appindex record   +
      +
      + + +
      + +
      +senv 0.2
      +Zbyszek Sobiecki - January 29th 2000, 11:44 EST +

      Senv allows you to run programs with a specified environment. It can set uid, gid, root directory, working directory, limits, and environment variables. It is useful in init scripts and as a shell for users for setting resource limits and environment variables. You can create sets of configurations and specify the one to use from command line.

      +

      Changes: Login shell limits and environment setting for users, permanent resource limits for specified groups of users and environment variables, and other minor bugfixes. +

      Urgency: low +

      [ comments (0) ] +

      License: GPL
      + Category: Console/Administration
      +download changelog appindex record   +
      +
      + + +
      + +
      +XZX 2.9.2
      +E. Kunze - January 29th 2000, 10:55 EST +

      XZX is a portable emulator of ZX Spectrum 48K/128K/+3 (8-bit home computers made by Sir Clive Sinclair) and Pentagon/Scorpion (Spectrum clones made in Russia) for machines running UNIX and the X Window system. XZX is completely written in C and emulates Spectrum 48K, 128K, +2 and +3, Pentagon and Scorpion, Interface I with up to 8 microdrives, Multiface 128 and Multiface 3, BetaDisk 128 interface by Technology Research Ltd with 4 disk drives, +D interface by Miles Gordon Technology with 2 disk drives, Kempston mouse, Kempston joystick and built-in machine code monitor.

      +

      Changes: Lots of feature improvement and bug fixes. Most parts of the audio support has been rewritten for different UNICES. +

      Urgency: low +

      [ comments (0) ] +

      License: Shareware
      + Category: X11/Emulators
      +download homepage changelog appindex record   +
      +
      + + +

      [ full page for today | yesterday's edition ]
      + +
      + +
      navigator
      +- full page for today
      +- yesterday's edition
      +- new: fm news via NNTP

      +
      + +
      eye catcher
      +Free Shirts
      We give away a free freshmeat t-shirt every week for the best comment added to an application announcement or story posted on freshmeat. +

      #freshmeat
      If you want to chat about what's new on freshmeat and hang out with other fm lounge lizards and the fm staff, head over to #freshmeat on irc.freshmeat.net, part of The Open Projects Network. + 

      +
      + +
      site notes
      +- We should get this out of the door now (Jan 29th)
      +- freshmeat Y2K report (Jan 01st)
      +- Assorted freshmeat notes (Aug 16th)

      +
      + +
      recent editorials
      +- Is Linux for Crazies? (Jan 29th)
      +- A New Business Plan for Free Software (Jan 22nd)
      +- Is Linux Going to Reunite the UNIX Market? (Jan 15th)

      +
      + +
      andover.net
      +
      Mirror Logo

      +- Animation Factory
      +- DaveCentral
      +- FreeCode
      +- Internet Traffic Report
      +- IT Manager's Journal
      +- MediaBuilder
      +- Slashdot
      +- Slaughterhouse
      +- TechMailings
      +- TechSightings
      +

      E-Commerce

      +- ThinkGeek (Stuff for smart masses)

      +
      + +
      supported sites
      +- Userfriendly.org
      +- SecurityFocus
      +- copyleft
      +- Filewatcher
      +- Linux.com
      +- LinuxTelephony
      +- LinuxToday
      +- Openprojects
      +- 32bitsonline
      +- The GNU Project

      +
      + +
      saturday
      +- We should get this out of the door now
      +- Is Linux for Crazies?
      +- RabbIT 2.0.2
      +- nmpg 1.1.3
      +- mod_dtcl 0.7.3
      +- CoreLinux++ 0.4.6
      +- scribe 0.2
      +- E theme updater 0.1
      +- Powertweak-Linux 0.1.7
      +- Pexeso Beta
      +- XZX 2.9.2
      +- DistroLib 0.4
      +- ToutDoux 1.1.7
      +- goMP 1.0.3
      +- APSEND 1.40
      +- ecasound 1.6.12r10
      +- SCEZ 20000129
      +- Comicq 0.2.0
      +- senv 0.2
      +- XZX 2.9.2
      +- log4j 0.7.5
      +- SQN Linux 1.6
      +- Limo 0.3.2
      +- Fusion GS 1.3
      +- MMR 1.5.4
      +- KUPS 0.3.4
      +- 3DSE patch for XMMS 4
      +- Linux 2.3.41
      +- Free Code for Linux S/390
      +- CircleMUD 3.0 beta patchlevel 17
      +- NiL Isn't Liero 000128
      +- OpenSSH Unix Port 1.2.2
      +- KBoxes! 1.3
      +- phpLanParty 0.23
      +- DGen/SDL 1.20
      +- EdcomLib 1.0 alpha 5
      +- Etherboot 4.4.2
      +- BLADE 0.18.0
      +- Sapphire 0.13.7
      +- ippl 1.99.3
      +- Saint 1.5patch1
      +- Zircon 1.18.232
      +- nmap 2.3BETA14
      +- xterm patch #124
      +- MyThreads-Links v0.5.2
      +- sudo 1.6.2p1
      +- MIT Photonic-Bands 0.10
      +- Launcher 0.86
      +- nano 0.8.1
      +- Gtk-- 1.1.8
      +- tkchooser 0.65
      +- XShipWars 1.33a
      +- Lamerpad 0.1

      +
      + +
      friday
      +- fsv 0.9
      +- popsneaker 0.1.1
      +- eyep-updater.sh 1.0
      +- W3Mail 0.5.0
      +- The Urgent Decision 0.9.9
      +- LTSP 1.02
      +- Production BASIC 0.2.12
      +- Postfix 19991231-pl03
      +- Mp3 Commander 0.7
      +- iManager 1.0.1b
      +- Eterm 0.9
      +- dqd_dirindex 1.0
      +- Tidings 1.0.4
      +- localscan 2.1
      +- WMKeyboard 0.3
      +- fcmp 1.0.2
      +- Akkord 0.3.1
      +- HiM 0.1.1
      +- cdrecord 1.8
      +- eMixer 0.05.5
      +- FreeVSD 1.4.0
      +- Common C++ Libraries 0.0
      +- Moonshine 1.0beta2
      +- swim 0.3.5
      +- Xmame/xmess 0.36b15.1
      +- pcmcia-cs 3.1.9
      +- gPS 0.5.2
      +- Snort 1.5.1
      +- Pygmy Linux 0.7 beta
      +- Intro to Bash Programming HOWTO 0.3
      +- GNU Pth 1.3b2
      +- Laonux 0.1
      +- x-wvdial 0.12
      +- Intro to Bash Programming HOWTO 0.3
      +- Catalog 1.02
      +- harvest 1.5.20-kj-0.9
      +- wmseti 0.3.0a
      +- RIG 1.02
      +- FreeAddr 0.2
      +- GtkAda 1.2.5
      +- dot.conf 0.6.0
      +- dep.pl 1.28.0
      +- Prae's Scripts 1.1
      +- Project Clock 0.1
      +- Xtheater 0.2.1
      +- i-no Chart 0.1
      +- spliff 0.8.1
      +- Regexx 0.95
      +- RBook 0.5.0
      +- RIG 1.01
      +- wchat 1.2.0
      +- PCCS MySQLDatabase Admin Tool 1.2.2

      +
      + +
      thursday
      +- CADUBI 1.1b1
      +- Angus' Chess Clock 0.8.1
      +- MP3 Report Generator 1.0.0
      +- 4DOM 0.9.2
      +- 4XSLT 0.8.2
      +- OpenNaken 1.10
      +- iManager 1.0b
      +- QuakeForge 0.1.0
      +- pylice 0.7.0
      +- Solfege 0.6.0
      +- xinetd 2.1.8.7p1
      +- jac 0.13
      +- Xmms 1.0.0
      +- KSrnd 0.97
      +- getpg / UW-IMAP 0.54
      +- getpg 0.53
      +- setserial 2.17
      +- Pan 0.7.3
      +- jwhois 2.4.1
      +- Kmp3 1.0
      +- xPine 0.0.12
      +- Avenger's News System 2.1 Alpha
      +- RIG 1.0
      +- scroller 1.0
      +- Perl EyeP Client 0.1
      +- sfront 0.54
      +- XFrisk 1.2
      +- Moffy 0.0.1
      +- Solid POP3 0.14
      +- php3guest 1.5
      +- crUD 01.27.2000
      +- crUD 01.27.2000
      +- Free Pascal Compiler 0.99.14
      +- gtk-font-hack 0.2-gtk-1.2.6
      +- Linux 2.2.15pre5
      +- krunseti 0.2.1
      +- CompuPic 5.0.1036
      +- gfontview 0.3.3
      +- authlocal 1.0.2
      +- bigwig 1.1
      +- CAFire 0.0.11
      +- ANVLOGIN 2.0
      +- sawmill.el 1.9
      +- Perlsh 20000127
      +- sitescooper 2.1.2
      +- MHDns 1.4
      +- JChemPaint 0.5
      +- Filesystems HOWTO 0.7.3
      +- KSnes9x 1.2
      +- Mozilla M13
      +- edna 0.3
      +- GMasqdialer 0.99.8
      +- spliff 0.8
      +- MultiSeti 0.3
      +- rude 0.50
      +- cgi-util++ 0.0
      +- Cricket 0.72
      +- nuni 0.04
      +- Ksetiwatch 0.3.0
      +- SiteMgrYAP 0.1.2
      +- phpLanParty 0.21
      +- Glitter Newsreader 0.1
      +- Fastresolve 2.4
      +- ColdSync 1.1.2
      +- DDD 3.2
      +- X Northern Captain 4.2.1
      +- abcde 1.0.2
      +- Gnapster 1.3.2
      +- xmix 1.0 Alpha
      +- gtktetcolor 0.3
      +- muttzilla 0.40
      +- muttzilla 0.40
      +- asp2php 0.73.6
      +- mod_ticket 1.0
      +- MegaHAL for Eggdrop .01
      +- Jetty 2.3.5
      +- xlpotdb 1.0
      +- Koala Complete MUD Server 0.1.1a
      +- mcountd 0.4
      +- cdbackup 0.5.0
      +- The Java SSH/Telnet Application/Applet 2.0 RC1

      +
      + +
      slashdot
      +- Petition Apple for Linux QuickTime
      +- GNUstep 0.6.5 freeze
      +- YETI@Home
      +- Documents Unsealed in Microsoft/Caldera Case
      +- Who Bought Linux.Net?
      +- E-Mails from (Over?) The Edge
      +- Linux Kernel 2.3.41
      +- Congress Still Figuring Out E-Mail
      +- Sci Fi Literature 101?
      +- Could Distributed.Net Help the Mars Polar Lander?

      +
      + +
      securityfocus
      +- Win2000 security hole a 'major threat'
      +- Visa acknowledges cracker break-ins
      +- What's Wrong With Microsoft Security?
      +- Microsoft posts first Win2K security patch
      +- Libnids 1.12
      +- New hack attack is greater threat than imagined
      +- Student charged with hacking
      +- Building and Managing Virtual Private Networks (book)
      +- Threats, Vulnerabilities and Real-Worl Responses: The Foundations of the TruSecure Process
      +- The Hundredth Window : Protecting Your Privacy and Security in the Age of the Internet (boo

      +
      + +
      bebits
      +- Pe 3.0a3
      +- Rarscript 1.5
      +- CD Manager 0.66a beta
      +- TraX 1.1
      +- BeMath 1.2.2
      +- simple blackjack 1
      +- HtmlTree 0.5.3
      +- Yacp 0.1
      +- TicTacToe 1.5
      +- Pe 3.0a2

      +
      + +
      linuxtoday
      +- Linux Journal: KDE--The Next Generation
      +- Kernel Cousin gimp-devel #11 Is Out
      +- Infoworld: Corel Linux OS ideal for the desktop
      +- Technology Evaluation: IBM Jumps on the Linux Bandwagon with Both Feet, Sort Of
      +- Tobias Hövekamp: European Union acknowledges
      +- &
      +- #34;Open Source Software
      +- &
      +- #34;

      +
      + +
      linuxtelephony
      +- Traverse Technologies releases NETspider-U in US
      +- Quicknet releases new GPL'd Linux Drivers!
      +- Natural Microsystems Delivers Carrier-Class Linux
      +- Quicknet is hiring programmers of all kinds!
      +- Babylon MLPPP Software Released under GPL
      +- Linux Telephony Server Project?
      +- Vovida Networks to Hire Telephony Software Engineers
      +- SPIRO-Linux Introduces Web-Enabled Phone Administration
      +- LinuxTelephony sponsors area at LinuxFest 2000
      +- GSM-Mobile Switching Center (MSC) with Linux-PC

      +
      + +
      32bitsonline
      +- Game: Homeworld
      +- DVD Lawsuit Spreads Its Own 'Trade Secrets'
      +- Register.com Adds 'One-step' Domain Registration
      +- WebEvent: Keeping you organized
      +- Y2K Officers Defend $100 Bil Investment
      +- DON'T BE FOOLED
      +- Microsoft Scorns Think-Tank's Breakup Idea
      +- Yahoo Accused Of Stalking Internet Users
      +- eToys.com Settles Spat With Swiss Artist Group
      +- [more articles/news]

      +

      +

      + +
      +
      + + +
      copyright © 1997-2000 Andover.Net - +icons courtesy of tigert@gimp.org - +code revision 20000101 - +our privacy policy
      + + + + diff --git a/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/ss.rb b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/ss.rb new file mode 100644 index 0000000..1c13d7a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ext/tk/sample/tkextlib/tkHTML/ss.rb @@ -0,0 +1,436 @@ +#!/usr/bin/env ruby +# +# This script implements the "ss" application. "ss" implements +# a presentation slide-show based on HTML slides. +# +require 'tk' +require 'tkextlib/tkHTML' + +file = ARGV[0] + +class TkHTML_File_Viewer + include TkComm + +# These are images to use with the actual image specified in a +# "" markup can't be found. +# +@@biggray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhPAA+APAAALi4uAAAACwAAAAAPAA+AAACQISPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNFgsAO/// +EOD + +@@smgray = TkPhotoImage.new(:data=><<'EOD') + R0lGODdhOAAYAPAAALi4uAAAACwAAAAAOAAYAAACI4SPqcvtD6OctNqLs968+w+G4kiW5omm + 6sq27gvH8kzX9m0VADv/ +EOD + + def initialize(file = nil) + @root = TkRoot.new(:title=>'HTML File Viewer', :iconname=>'HV') + @fswin = nil + + @html = nil + @html_fs = nil + + @hotkey = {} + + @applet_arg = TkVarAccess.new_hash('AppletArg') + + @images = {} + @old_imgs = {} + @big_imgs = {} + + @last_dir = Dir.pwd + + @last_file = '' + + @key_block = false + + Tk::HTML_Widget::ClippingWindow.bind('1', + proc{|w, ksym| key_press(w, ksym)}, + '%W Down') + Tk::HTML_Widget::ClippingWindow.bind('3', + proc{|w, ksym| key_press(w, ksym)}, + '%W Up') + Tk::HTML_Widget::ClippingWindow.bind('2', + proc{|w, ksym| key_press(w, ksym)}, + '%W Down') + + Tk::HTML_Widget::ClippingWindow.bind('KeyPress', + proc{|w, ksym| key_press(w, ksym)}, + '%W %K') + + ############################################ + # + # Build the half-size view of the page + # + menu_spec = [ + [['File', 0], + ['Open', proc{sel_load()}, 0], + ['Full Screen', proc{fullscreen()}, 0], + ['Refresh', proc{refresh()}, 0], + '---', + ['Exit', proc{exit}, 1]] + ] + + mbar = @root.add_menubar(menu_spec) + + @html = Tk::HTML_Widget.new(:width=>512, :height=>384, + :padx=>5, :pady=>9, + :formcommand=>proc{|*args| form_cmd(*args)}, + :imagecommand=>proc{|*args| + image_cmd(1, *args) + }, + :scriptcommand=>proc{|*args| + script_cmd(*args) + }, + :appletcommand=>proc{|*args| + applet_cmd(*args) + }, + :hyperlinkcommand=>proc{|*args| + hyper_cmd(*args) + }, + :fontcommand=>proc{|*args| + pick_font(*args) + }, + :appletcommand=>proc{|*args| + run_applet('small', *args) + }, + :bg=>'white', :tablerelief=>:raised) + + @html.token_handler('meta', proc{|*args| meta(@html, *args)}) + + vscr = @html.yscrollbar(TkScrollbar.new) + hscr = @html.xscrollbar(TkScrollbar.new) + + Tk.grid(@html, vscr, :sticky=>:news) + Tk.grid(hscr, :sticky=>:ew) + @root.grid_columnconfigure(0, :weight=>1) + @root.grid_columnconfigure(1, :weight=>0) + @root.grid_rowconfigure(0, :weight=>1) + @root.grid_rowconfigure(1, :weight=>0) + + ############################################ + + @html.clipwin.focus + + # If an arguent was specified, read it into the HTML widget. + # + Tk.update + if file && file != "" + load_file(file) + end + end + + # + # A font chooser routine. + # + # html[:fontcommand] = pick_font + def pick_font(size, attrs) + # puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (12 * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') + end + + # This routine is called to pick fonts for the fullscreen view. + # + def pick_font_fs(size, attrs) + baseFontSize = 24 + + # puts "FontCmd: #{size} #{attrs}" + [ ((attrs =~ /fixed/)? 'courier': 'charter'), + (baseFontSize * (1.2**(size.to_f - 4.0))).to_i, + ((attrs =~ /italic/)? 'italic': 'roman'), + ((attrs =~ /bold/)? 'bold': 'normal') ].join(' ') + end + + # + # + def hyper_cmd(*args) + puts "HyperlinkCommand: #{args.inspect}" + end + + # This routine is called to run an applet + # + def run_applet(size, w, arglist) + applet_arg.value = Hash[*simplelist(arglist)] + + return unless @applet_arg.key?('src') + + src = @html.remove(@applet_arg['src']) + + @applet_arg['window'] = w + @applet_arg['fontsize'] = size + + begin + Tk.load_tclscript(src) + rescue => e + puts "Applet error: #{e.message}" + end + end + + # + # + def form_cmd(n, cmd, *args) + # p [n, cmd, *args] + end + + # + # + def move_big_image(b) + return unless @big_imgs.key?(b) + b.copy(@big_imgs[b]) + @big_imgs[b].delete + @big_imgs.delete(b) + end + + def image_cmd(hs, *args) + fn = args[0] + + if @old_imgs.key?(fn) + return (@images[fn] = @old_imgs.delete(fn)) + end + + begin + img = TkPhotoImage.new(:file=>fn) + rescue + return ((hs)? @@smallgray: @@biggray) + end + + if hs + img2 = TkPhotoImage.new + img2.copy(img, :subsample=>[2,2]) + img.delete + img = img2 + end + + if img.width * img.height > 20000 + b = TkPhotoImage.new(:width=>img.width, :height=>img.height) + @big_imgs[b] = img + img = b + Tk.after_idle(proc{ move_big_image(b) }) + end + + @images[fn] = img + + img + end + + # + # This routine is called for every + + + +EOF + +##################################################################### +### F O O T E R T E M P L A T E +##################################################################### + + FOOTER = <<-EOF + + + + + EOF + + +##################################################################### +### F I L E P A G E H E A D E R T E M P L A T E +##################################################################### + + FILE_PAGE = <<-EOF +
      +

      <%= values["short_name"] %>

      + + + + + + + + + +
      Path:<%= values["full_path"] %> +<% if values["cvsurl"] then %> +  (">CVS) +<% end %> +
      Last Update:<%= values["dtm_modified"] %>
      +
      + EOF + +##################################################################### +### C L A S S P A G E H E A D E R T E M P L A T E +##################################################################### + + CLASS_PAGE = <<-EOF +
      + + + + + + + + + + +<% if values["parent"] then %> + + + + +<% end %> +
      <%= values["classmod"] %><%= values["full_name"] %>
      In: +<% values["infiles"].each do |infiles| %> +<% if infiles["full_path_url"] then %> + "> +<% end %> + <%= infiles["full_path"] %> +<% if infiles["full_path_url"] then %> + +<% end %> +<% if infiles["cvsurl"] then %> +  (">CVS) +<% end %> +
      +<% end %><%# values["infiles"] %> +
      Parent: +<% if values["par_url"] then %> + "> +<% end %> + <%= values["parent"] %> +<% if values["par_url"] then %> + +<% end %> +
      +
      + EOF + +##################################################################### +### M E T H O D L I S T T E M P L A T E +##################################################################### + + METHOD_LIST = <<-EOF +
      +<% if values["diagram"] then %> +
      + <%= values["diagram"] %> +
      +<% end + + if values["description"] then %> +
      + <%= values["description"] %> +
      +<% end + + if values["requires"] then %> +
      +

      Required files

      + +
      +<% values["requires"].each do |requires| %> + <%= href requires["aref"], requires["name"] %>   +<% end %><%# values["requires"] %> +
      +
      +<% end + + if values["toc"] then %> +
      +

      Contents

      + +<% end %> +
      + +<% if values["methods"] then %> +
      +

      Methods

      + +
      +<% values["methods"].each do |methods| %> + <%= href methods["aref"], methods["name"] %>   +<% end %><%# values["methods"] %> +
      +
      +<% end %> +
      + + +<% if values["includes"] then %> +
      +

      Included Modules

      + +
      +<% values["includes"].each do |includes| %> + <%= href includes["aref"], includes["name"] %> +<% end %><%# values["includes"] %> +
      +
      +<% end + + values["sections"].each do |sections| %> +
      +<% if sections["sectitle"] then %> +

      "><%= sections["sectitle"] %>

      +<% if sections["seccomment"] then %> +
      + <%= sections["seccomment"] %> +
      +<% end + end + + if sections["classlist"] then %> +
      +

      Classes and Modules

      + + <%= sections["classlist"] %> +
      +<% end + + if sections["constants"] then %> +
      +

      Constants

      + +
      + +<% sections["constants"].each do |constants| %> + + + + +<% if constants["desc"] then %> + + +<% end %> + +<% end %><%# sections["constants"] %> +
      <%= constants["name"] %>=<%= constants["value"] %> <%= constants["desc"] %>
      +
      +
      +<% end + + if sections["aliases"] then %> +
      +

      External Aliases

      + +
      + +<% sections["aliases"].each do |aliases| %> + + + + + +<% if aliases["desc"] then %> + + + + +<% end + end %><%# sections["aliases"] %> +
      <%= aliases["old_name"] %>-><%= aliases["new_name"] %>
       <%= aliases["desc"] %>
      +
      +
      +<% end %> + +<% if sections["attributes"] then %> +
      +

      Attributes

      + +
      + +<% sections["attributes"].each do |attribute| %> + + +<% if attribute["rw"] then %> + +<% end + unless attribute["rw"] then %> + +<% end %> + + +<% end %><%# sections["attributes"] %> +
      <%= attribute["name"] %> [<%= attribute["rw"] %>]   <%= attribute["a_desc"] %>
      +
      +
      +<% end %> + + +<% if sections["method_list"] then %> +
      +<% sections["method_list"].each do |method_list| + if method_list["methods"] then %> +

      <%= method_list["type"] %> <%= method_list["category"] %> methods

      + +<% method_list["methods"].each do |methods| %> +
      " class="method-detail"> + "> + + + +
      +<% if methods["m_desc"] then %> + <%= methods["m_desc"] %> +<% end + if methods["sourcecode"] then %> +

      -source');return false;">[Source]

      +
      -source"> +
      +<%= methods["sourcecode"] %>
      +
      +
      +<% end %> +
      +
      + +<% end %><%# method_list["methods"] %><% + end + end %><%# sections["method_list"] %> + +
      +<% end %> +<% end %><%# values["sections"] %> + EOF + +##################################################################### +### B O D Y T E M P L A T E +##################################################################### + + BODY = HEADER + %{ + +<%= template_include %> + +
      + +} + METHOD_LIST + %{ + +
      + +} + FOOTER + +##################################################################### +### S O U R C E C O D E T E M P L A T E +##################################################################### + + SRC_PAGE = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF + + <%= values["title"] %> + " /> + " type="text/css" media="screen" /> + + +
      <%= values["code"] %>
      + + + EOF + + +##################################################################### +### I N D E X F I L E T E M P L A T E S +##################################################################### + + FR_INDEX_BODY = %{<%= template_include %>} + + FILE_INDEX = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF + + + <%= values["title"] %> + " /> + " type="text/css" /> + + + +
      +

      <%= values["list_title"] %>

      +
      +<% values["entries"].each do |entries| %> + "><%= entries["name"] %>
      +<% end %><%# values["entries"] %> +
      +
      + + + EOF + + CLASS_INDEX = FILE_INDEX + METHOD_INDEX = FILE_INDEX + + INDEX = XHTML_FRAME_PREAMBLE + HTML_ELEMENT + <<-EOF + + + <%= values["title"] %> + " /> + + + + + + + + " name="docwin" /> + + + EOF + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmer.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmer.rb new file mode 100644 index 0000000..4c5a9ee --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmer.rb @@ -0,0 +1,151 @@ +require 'rdoc/generator/html' +require 'rdoc/generator/html/kilmerfactory' + +module RDoc::Generator::HTML::KILMER + + FONTS = "Verdana, Arial, Helvetica, sans-serif" + + CENTRAL_STYLE = <<-EOF +body,td,p { font-family: <%= values["fonts"] %>; + color: #000040; +} + +.attr-rw { font-size: xx-small; color: #444488 } + +.title-row { background-color: #CCCCFF; + color: #000010; +} + +.big-title-font { + color: black; + font-weight: bold; + font-family: <%= values["fonts"] %>; + font-size: large; + height: 60px; + padding: 10px 3px 10px 3px; +} + +.small-title-font { color: black; + font-family: <%= values["fonts"] %>; + font-size:10; } + +.aqua { color: black } + +#diagram img { + border: 0; +} + +.method-name, .attr-name { + font-family: font-family: <%= values["fonts"] %>; + font-weight: bold; + font-size: small; + margin-left: 20px; + color: #000033; +} + +.tablesubtitle, .tablesubsubtitle { + width: 100%; + margin-top: 1ex; + margin-bottom: .5ex; + padding: 5px 0px 5px 3px; + font-size: large; + color: black; + background-color: #CCCCFF; + border: thin; +} + +.name-list { + margin-left: 5px; + margin-bottom: 2ex; + line-height: 105%; +} + +.description { + margin-left: 5px; + margin-bottom: 2ex; + line-height: 105%; + font-size: small; +} + +.methodtitle { + font-size: small; + font-weight: bold; + text-decoration: none; + color: #000033; + background: #ccc; +} + +.srclink { + font-size: small; + font-weight: bold; + text-decoration: none; + color: #0000DD; + background-color: white; +} + +.srcbut { float: right } + +.ruby-comment { color: green; font-style: italic } +.ruby-constant { color: #4433aa; font-weight: bold; } +.ruby-identifier { color: #222222; } +.ruby-ivar { color: #2233dd; } +.ruby-keyword { color: #3333FF; font-weight: bold } +.ruby-node { color: #777777; } +.ruby-operator { color: #111111; } +.ruby-regexp { color: #662222; } +.ruby-value { color: #662222; font-style: italic } + EOF + + INDEX_STYLE = <<-EOF +body { + background-color: #ddddff; + font-family: #{FONTS}; + font-size: 11px; + font-style: normal; + line-height: 14px; + color: #000040; +} + +div.banner { + background: #0000aa; + color: white; + padding: 1; + margin: 0; + font-size: 90%; + font-weight: bold; + line-height: 1.1; + text-align: center; + width: 100%; +} +EOF + + FACTORY = RDoc::Generator::HTML:: + KilmerFactory.new(:central_css => CENTRAL_STYLE, + :index_css => INDEX_STYLE) + + STYLE = FACTORY.get_STYLE() + + METHOD_LIST = FACTORY.get_METHOD_LIST() + + BODY = FACTORY.get_BODY() + + FILE_PAGE = FACTORY.get_FILE_PAGE() + + CLASS_PAGE = FACTORY.get_CLASS_PAGE() + + SRC_PAGE = FACTORY.get_SRC_PAGE() + + FR_INDEX_BODY = FACTORY.get_FR_INDEX_BODY() + + FILE_INDEX = FACTORY.get_FILE_INDEX() + + CLASS_INDEX = FACTORY.get_CLASS_INDEX() + + METHOD_INDEX = FACTORY.get_METHOD_INDEX() + + INDEX = FACTORY.get_INDEX() + + def self.write_extra_pages(values) + FACTORY.write_extra_pages(values) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmerfactory.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmerfactory.rb new file mode 100644 index 0000000..ef6f3f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/kilmerfactory.rb @@ -0,0 +1,427 @@ +require 'rdoc/generator/html' +require 'rdoc/generator/html/common' + +# +# This class generates Kilmer-style templates. Right now, +# rdoc is shipped with two such templates: +# * kilmer +# * hefss +# +# Kilmer-style templates use frames. The left side of the page has +# three frames stacked on top of each other: one lists +# files, one lists classes, and one lists methods. If source code +# is not inlined, an additional frame runs across the bottom of +# the page and will be used to display method source code. +# The central (and largest frame) display class and file +# pages. +# +# The constructor of this class accepts a Hash containing stylistic +# attributes. Then, a get_BLAH instance method of this class returns a +# value for the template's BLAH constant. get_BODY, for instance, returns +# the value of the template's BODY constant. +# +class RDoc::Generator::HTML::KilmerFactory + + include RDoc::Generator::HTML::Common + + # + # The contents of the stylesheet that should be used for the + # central frame (for the class and file pages). + # + # This must be specified in the Hash passed to the constructor. + # + attr_reader :central_css + + # + # The contents of the stylesheet that should be used for the + # index pages. + # + # This must be specified in the Hash passed to the constructor. + # + attr_reader :index_css + + # + # The heading that should be displayed before listing methods. + # + # If not supplied, this defaults to "Methods". + # + attr_reader :method_list_heading + + # + # The heading that should be displayed before listing classes and + # modules. + # + # If not supplied, this defaults to "Classes and Modules". + # + attr_reader :class_and_module_list_heading + + # + # The heading that should be displayed before listing attributes. + # + # If not supplied, this defaults to "Attributes". + # + attr_reader :attribute_list_heading + + # + # ====Description: + # This method constructs a KilmerFactory instance, which + # can be used to build Kilmer-style template classes. + # The +style_attributes+ argument is a Hash that contains the + # values of the classes attributes (Symbols mapped to Strings). + # + # ====Parameters: + # [style_attributes] + # A Hash describing the appearance of the Kilmer-style. + # + def initialize(style_attributes) + @central_css = style_attributes[:central_css] + if(!@central_css) + raise ArgumentError, "did not specify a value for :central_css" + end + + @index_css = style_attributes[:index_css] + if(!@index_css) + raise ArgumentError, "did not specify a value for :index_css" + end + + @method_list_heading = style_attributes[:method_list_heading] + if(!@method_list_heading) + @method_list_heading = "Methods" + end + + @class_and_module_list_heading = style_attributes[:class_and_module_list_heading] + if(!@class_and_module_list_heading) + @class_and_module_list_heading = "Classes and Modules" + end + + @attribute_list_heading = style_attributes[:attribute_list_heading] + if(!@attribute_list_heading) + @attribute_list_heading = "Attributes" + end + end + + def get_STYLE + return @central_css + end + + def get_METHOD_LIST + return %{ +<% if values["diagram"] then %> +
      +
      +<%= values["diagram"] %> +
      +
      +<% end %> + +<% if values["description"] then %> +
      <%= values["description"] %>
      +<% end %> + +<% if values["requires"] then %> + + +
      Required files

      +
      +<% values["requires"].each do |requires| %> +<%= href requires["aref"], requires["name"] %> +<% end %><%# values["requires"] %> +
      +<% end %> + +<% if values["methods"] then %> + + +
      #{@method_list_heading}

      +
      +<% values["methods"].each do |methods| %> +<%= href methods["aref"], methods["name"] %>, +<% end %><%# values["methods"] %> +
      +<% end %> + +<% if values["includes"] then %> +
      Included modules

      +
      +<% values["includes"].each do |includes| %> + <%= href includes["aref"], includes["name"] %> +<% end %><%# values["includes"] %> +
      +<% end %> + +<% values["sections"].each do |sections| %> +
      +<% if sections["sectitle"] then %> +

      "><%= sections["sectitle"] %>

      +<% if sections["seccomment"] then %> +
      + <%= sections["seccomment"] %> +
      +<% end %> +<% end %> +<% if sections["attributes"] then %> + + +
      #{@attribute_list_heading}

      + +<% sections["attributes"].each do |attributes| %> + +<% if attributes["rw"] then %> + +<% end %> +<% unless attributes["rw"] then %> + +<% end %> + + + +<% end %><%# sections["attributes"] %> +
       [<%= attributes["rw"] %>] <%= attributes["name"] %><%= attributes["a_desc"] %>
      +<% end %> + +<% if sections["classlist"] then %> + + +
      #{@class_and_module_list_heading}

      +<%= sections["classlist"] %>
      +<% end %> + +<% if sections["method_list"] then %> +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> + + +
      <%= method_list["type"] %> <%= method_list["category"] %> methods
      +<% method_list["methods"].each do |methods| %> + + +
      +"> +<% if methods["callseq"] then %> +<%= methods["callseq"] %> +<% end %> +<% unless methods["callseq"] then %> + <%= methods["name"] %><%= methods["params"] %> +<% end %> + +<% if methods["codeurl"] then %> +" target="source" class="srclink">src +<% end %> +
      +<% if methods["m_desc"] then %> +
      +<%= methods["m_desc"] %> +
      +<% end %> +<% if methods["aka"] then %> +
      +This method is also aliased as +<% methods["aka"].each do |aka| %> +"><%= methods["name"] %> +<% end %><%# methods["aka"] %> +
      +<% end %> +<% if methods["sourcecode"] then %> +
      +<%= methods["sourcecode"] %>
      +
      +<% end %> +<% end %><%# method_list["methods"] %> +<% end %> +<% end %><%# sections["method_list"] %> +<% end %> + +<% end %><%# values["sections"] %> +
      +} + end + + def get_BODY + return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{ + + <%= values["title"] %> + " /> + " type="text/css" media="screen" /> + + + +
      +<%= template_include %> + +#{get_METHOD_LIST()} +
      + + +} + end + +def get_FILE_PAGE + return %{ + + + + +
      + +
      File
      <%= values["short_name"] %>
      + + + + + + + + +
      Path:<%= values["full_path"] %> +<% if values["cvsurl"] then %> +  (">CVS) +<% end %> +
      Modified:<%= values["dtm_modified"] %>
      +

      +} +end + +def get_CLASS_PAGE + return %{ + + + + + +
      + <%= values["classmod"] %>
      <%= values["full_name"] %> +
      + + + + + +<% if values["parent"] then %> + + + + +<% end %> +
      In: +<% values["infiles"].each do |infiles| %> +<%= href infiles["full_path_url"], infiles["full_path"] %> +<% if infiles["cvsurl"] then %> + (">CVS) +<% end %> +<% end %><%# values["infiles"] %> +
      Parent: +<% if values["par_url"] then %> + " class="cyan"> +<% end %> +<%= values["parent"] %> +<% if values["par_url"] then %> + +<% end %> +
      +

      +} +end + +def get_SRC_PAGE + return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{ +<%= values["title"] %> +" /> +" type="text/css" media="screen" /> + + +
      <%= values["code"] %>
      + + +} +end + +def get_FR_INDEX_BODY + return %{<%= template_include %>} +end + +def get_FILE_INDEX + return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{ + +<%= values["title"] %> +" /> + + + + +
      + +<% values["entries"].each do |entries| %> +"><%= entries["name"] %>
      +<% end %><%# values["entries"] %> +
      + +} +end + +def get_CLASS_INDEX + return get_FILE_INDEX +end + +def get_METHOD_INDEX + return get_FILE_INDEX +end + +def get_INDEX + return XHTML_FRAME_PREAMBLE + HTML_ELEMENT + %{ + + <%= values["title"] %> + " /> + + + + + + + + +<% if values["inline_source"] then %> + " name="docwin" /> +<% end %> +<% unless values["inline_source"] then %> + + " name="docwin" /> + + +<% end %> + + + +} +end + +def get_BLANK + # This will be displayed in the source code frame before + # any source code has been selected. + return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{ + + Source Code Frame <%= values["title_suffix"] %> + " /> + " type="text/css" media="screen" /> + + + + +} +end + +def write_extra_pages(values) + template = RDoc::TemplatePage.new(get_BLANK()) + File.open("blank.html", "w") { |f| template.write_html_on(f, values) } +end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/one_page_html.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/one_page_html.rb new file mode 100644 index 0000000..51ae323 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/html/one_page_html.rb @@ -0,0 +1,122 @@ +require 'rdoc/generator/html' +require 'rdoc/generator/html/common' + +module RDoc::Generator::HTML::ONE_PAGE_HTML + + include RDoc::Generator::HTML::Common + + CONTENTS_XML = <<-EOF +<% if defined? classes and classes["description"] then %> +<%= classes["description"] %> +<% end %> + +<% if defined? files and files["requires"] then %> +

      Requires:

      +
        +<% files["requires"].each do |requires| %> +<% if requires["aref"] then %> +
      • "><%= requires["name"] %>
      • +<% end %> +<% unless requires["aref"] then %> +
      • <%= requires["name"] %>
      • +<% end %> +<% end %><%# files["requires"] %> +
      +<% end %> + +<% if defined? classes and classes["includes"] then %> +

      Includes

      +
        +<% classes["includes"].each do |includes| %> +<% if includes["aref"] then %> +
      • "><%= includes["name"] %>
      • +<% end %> +<% unless includes["aref"] then %> +
      • <%= includes["name"] %>
      • +<% end %> +<% end %><%# classes["includes"] %> +
      +<% end %> + +<% if defined? classes and classes["sections"] then %> +<% classes["sections"].each do |sections| %> +<% if sections["attributes"] then %> +

      Attributes

      + +<% sections["attributes"].each do |attributes| %> + +<% end %><%# sections["attributes"] %> +
      <%= attributes["name"] %><%= attributes["rw"] %><%= attributes["a_desc"] %>
      +<% end %> + +<% if sections["method_list"] then %> +

      Methods

      +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> +<% method_list["methods"].each do |methods| %> +

      <%= methods["type"] %> <%= methods["category"] %> method: +<% if methods["callseq"] then %> +"><%= methods["callseq"] %> +<% end %> +<% unless methods["callseq"] then %> +"><%= methods["name"] %><%= methods["params"] %>

      +<% end %> + +<% if methods["m_desc"] then %> +<%= methods["m_desc"] %> +<% end %> + +<% if methods["sourcecode"] then %> +
      +<%= methods["sourcecode"] %>
      +
      +<% end %> +<% end %><%# method_list["methods"] %> +<% end %> +<% end %><%# sections["method_list"] %> +<% end %> +<% end %><%# classes["sections"] %> +<% end %> + EOF + + ONE_PAGE = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{ + + <%= values["title"] %> + " /> + + +<% values["files"].each do |files| %> +

      File: "><%= files["short_name"] %>

      + + + +
      Path:<%= files["full_path"] %>
      Modified:<%= files["dtm_modified"] %>
      +} + CONTENTS_XML + %{ +<% end %><%# values["files"] %> + +<% if values["classes"] then %> +

      Classes

      +<% values["classes"].each do |classes| %> +<% if classes["parent"] then %> +

      <%= classes["classmod"] %> "><%= classes["full_name"] %> < <%= href classes["par_url"], classes["parent"] %>

      +<% end %> +<% unless classes["parent"] then %> +

      <%= classes["classmod"] %> <%= classes["full_name"] %>

      +<% end %> + +<% if classes["infiles"] then %> +(in files +<% classes["infiles"].each do |infiles| %> +<%= href infiles["full_path_url"], infiles["full_path"] %> +<% end %><%# classes["infiles"] %> +) +<% end %> +} + CONTENTS_XML + %{ +<% end %><%# values["classes"] %> +<% end %> + + +} + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/ri.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/ri.rb new file mode 100644 index 0000000..6b7a593 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/ri.rb @@ -0,0 +1,226 @@ +require 'rdoc/generator' +require 'rdoc/markup/to_flow' + +require 'rdoc/ri/cache' +require 'rdoc/ri/reader' +require 'rdoc/ri/writer' +require 'rdoc/ri/descriptions' + +class RDoc::Generator::RI + + ## + # Generator may need to return specific subclasses depending on the + # options they are passed. Because of this we create them using a factory + + def self.for(options) + new(options) + end + + ## + # Set up a new ri generator + + def initialize(options) #:not-new: + @options = options + @ri_writer = RDoc::RI::Writer.new "." + @markup = RDoc::Markup.new + @to_flow = RDoc::Markup::ToFlow.new + + @generated = {} + end + + ## + # Build the initial indices and output objects based on an array of + # TopLevel objects containing the extracted information. + + def generate(toplevels) + RDoc::TopLevel.all_classes_and_modules.each do |cls| + process_class cls + end + end + + def process_class(from_class) + generate_class_info(from_class) + + # now recurse into this class' constituent classes + from_class.each_classmodule do |mod| + process_class(mod) + end + end + + def generate_class_info(cls) + case cls + when RDoc::NormalModule then + cls_desc = RDoc::RI::ModuleDescription.new + else + cls_desc = RDoc::RI::ClassDescription.new + cls_desc.superclass = cls.superclass + end + + cls_desc.name = cls.name + cls_desc.full_name = cls.full_name + cls_desc.comment = markup(cls.comment) + + cls_desc.attributes = cls.attributes.sort.map do |a| + RDoc::RI::Attribute.new(a.name, a.rw, markup(a.comment)) + end + + cls_desc.constants = cls.constants.map do |c| + RDoc::RI::Constant.new(c.name, c.value, markup(c.comment)) + end + + cls_desc.includes = cls.includes.map do |i| + RDoc::RI::IncludedModule.new(i.name) + end + + class_methods, instance_methods = method_list(cls) + + cls_desc.class_methods = class_methods.map do |m| + RDoc::RI::MethodSummary.new(m.name) + end + + cls_desc.instance_methods = instance_methods.map do |m| + RDoc::RI::MethodSummary.new(m.name) + end + + update_or_replace(cls_desc) + + class_methods.each do |m| + generate_method_info(cls_desc, m) + end + + instance_methods.each do |m| + generate_method_info(cls_desc, m) + end + end + + def generate_method_info(cls_desc, method) + meth_desc = RDoc::RI::MethodDescription.new + meth_desc.name = method.name + meth_desc.full_name = cls_desc.full_name + if method.singleton + meth_desc.full_name += "::" + else + meth_desc.full_name += "#" + end + meth_desc.full_name << method.name + + meth_desc.comment = markup(method.comment) + meth_desc.params = params_of(method) + meth_desc.visibility = method.visibility.to_s + meth_desc.is_singleton = method.singleton + meth_desc.block_params = method.block_params + + meth_desc.aliases = method.aliases.map do |a| + RDoc::RI::AliasName.new(a.name) + end + + @ri_writer.add_method(cls_desc, meth_desc) + end + + private + + ## + # Returns a list of class and instance methods that we'll be documenting + + def method_list(cls) + list = cls.method_list + unless @options.show_all + list = list.find_all do |m| + m.visibility == :public || m.visibility == :protected || m.force_documentation + end + end + + c = [] + i = [] + list.sort.each do |m| + if m.singleton + c << m + else + i << m + end + end + return c,i + end + + def params_of(method) + if method.call_seq + method.call_seq + else + params = method.params || "" + + p = params.gsub(/\s*\#.*/, '') + p = p.tr("\n", " ").squeeze(" ") + p = "(" + p + ")" unless p[0] == ?( + + if (block = method.block_params) + block.gsub!(/\s*\#.*/, '') + block = block.tr("\n", " ").squeeze(" ") + if block[0] == ?( + block.sub!(/^\(/, '').sub!(/\)/, '') + end + p << " {|#{block.strip}| ...}" + end + p + end + end + + def markup(comment) + return nil if !comment || comment.empty? + + # Convert leading comment markers to spaces, but only + # if all non-blank lines have them + + if comment =~ /^(?>\s*)[^\#]/ + content = comment + else + content = comment.gsub(/^\s*(#+)/) { $1.tr('#',' ') } + end + @markup.convert(content, @to_flow) + end + + ## + # By default we replace existing classes with the same name. If the + # --merge option was given, we instead merge this definition into an + # existing class. We add our methods, aliases, etc to that class, but do + # not change the class's description. + + def update_or_replace(cls_desc) + old_cls = nil + + if @options.merge + rdr = RDoc::RI::Reader.new RDoc::RI::Cache.new(@options.op_dir) + + namespace = rdr.top_level_namespace + namespace = rdr.lookup_namespace_in(cls_desc.name, namespace) + if namespace.empty? + $stderr.puts "You asked me to merge this source into existing " + $stderr.puts "documentation. This file references a class or " + $stderr.puts "module called #{cls_desc.name} which I don't" + $stderr.puts "have existing documentation for." + $stderr.puts + $stderr.puts "Perhaps you need to generate its documentation first" + exit 1 + else + old_cls = namespace[0] + end + end + + prev_cls = @generated[cls_desc.full_name] + + if old_cls and not prev_cls then + old_desc = rdr.get_class old_cls + cls_desc.merge_in old_desc + end + + if prev_cls then + cls_desc.merge_in prev_cls + end + + @generated[cls_desc.full_name] = cls_desc + + @ri_writer.remove_class cls_desc + @ri_writer.add_class cls_desc + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo.rb new file mode 100644 index 0000000..70db875 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo.rb @@ -0,0 +1,81 @@ +require 'rdoc/rdoc' +require 'rdoc/generator' +require 'rdoc/markup/to_texinfo' + +module RDoc + module Generator + # This generates Texinfo files for viewing with GNU Info or Emacs + # from RDoc extracted from Ruby source files. + class TEXINFO + # What should the .info file be named by default? + DEFAULT_INFO_FILENAME = 'rdoc.info' + + include Generator::MarkUp + + # Accept some options + def initialize(options) + @options = options + @options.inline_source = true + @options.op_name ||= 'rdoc.texinfo' + @options.formatter = ::RDoc::Markup::ToTexInfo.new + end + + # Generate the +texinfo+ files + def generate(toplevels) + @toplevels = toplevels + @files, @classes = ::RDoc::Generator::Context.build_indices(@toplevels, + @options) + + (@files + @classes).each { |x| x.value_hash } + + open(@options.op_name, 'w') do |f| + f.puts TexinfoTemplate.new('files' => @files, + 'classes' => @classes, + 'filename' => @options.op_name.gsub(/texinfo/, 'info'), + 'title' => @options.title).render + end + # TODO: create info files and install? + end + + class << self + # Factory? We don't need no stinkin' factory! + alias_method :for, :new + end + end + + # Basically just a wrapper around ERB. + # Should probably use RDoc::TemplatePage instead + class TexinfoTemplate + BASE_DIR = ::File.expand_path(::File.dirname(__FILE__)) # have to calculate this when the file's loaded. + + def initialize(values, file = 'texinfo.erb') + @v, @file = [values, file] + end + + def template + ::File.read(::File.join(BASE_DIR, 'texinfo', @file)) + end + + # Go! + def render + ERB.new(template).result binding + end + + def href(location, text) + text # TODO: how does texinfo do hyperlinks? + end + + def target(name, text) + text # TODO: how do hyperlink targets work? + end + + # TODO: this is probably implemented elsewhere? + def method_prefix(section) + { 'Class' => '.', + 'Module' => '::', + 'Instance' => '#', + }[section['category']] + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/class.texinfo.erb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/class.texinfo.erb new file mode 100644 index 0000000..74ecc59 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/class.texinfo.erb @@ -0,0 +1,44 @@ +@node <%= @v['class']['full_name'].gsub(/::/, '-') %> +@chapter <%= @v['class']["classmod"] %> <%= @v['class']['full_name'] %> + +<% if @v['class']["parent"] and @v['class']['par_url'] %> +Inherits <%= href @v['class']["par_url"], @v['class']["parent"] %><% end %> + +<%= @v['class']["description"] %> + +<% if @v['class']["includes"] %> +Includes +<% @v['class']["includes"].each do |include| %> +* <%= href include["aref"], include["name"] %> +<% end # @v['class']["includes"] %> +<% end %> + +<% if @v['class']["sections"] %> +<% @v['class']["sections"].each do |section| %> +<% if section["attributes"] %> +Attributes +<% section["attributes"].each do |attributes| %> +* <%= attributes["name"] %> <%= attributes["rw"] %> <%= attributes["a_desc"] %> +<% end # section["attributes"] %> +<% end %> +<% end %> + +<% @v['class']["sections"].each do |section| %> +<% if section["method_list"] %> +Methods +@menu +<% section["method_list"].each_with_index do |method_list, i| %> +<%= i %> +<% (method_list["methods"] || []).each do |method| %> +* <%= @v['class']['full_name'].gsub(/::/, '-') %><%= method_prefix method_list %><%= method['name'] %>::<% end %> +<% end %> +@end menu + +<% section["method_list"].each do |method_list| %> +<% (method_list["methods"] || []).uniq.each do |method| %> +<%= TexinfoTemplate.new(@v.merge({'method' => method, 'list' => method_list}), + 'method.texinfo.erb').render %><% end %> +<% end %> +<% end # if section["method_list"] %> +<% end # @v['class']["sections"] %> +<% end %> diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/file.texinfo.erb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/file.texinfo.erb new file mode 100644 index 0000000..b619b94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/file.texinfo.erb @@ -0,0 +1,6 @@ +<% if false %> +

      File: <%= @v['file']["short_name"] %>

      +Path: <%= @v['file']["full_path"] %> + +<%= TexinfoTemplate.new(@v, 'content.texinfo.erb').render %> +<% end %> diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/method.texinfo.erb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/method.texinfo.erb new file mode 100644 index 0000000..f5c2b73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/method.texinfo.erb @@ -0,0 +1,6 @@ +@node <%= @v['class']['full_name'].gsub(/::/, '-') %><%= method_prefix @v['list'] %><%= @v['method']['name'] %> +@section <%= @v['class']["classmod"] %> <%= @v['class']['full_name'] %><%= method_prefix @v['list'] %><%= @v['method']['name'] %> +<%= @v['method']["type"] %> <%= @v['method']["category"] %> method: +<%= target @v['method']["aref"], @v['method']['callseq'] || + @v['method']["name"] + @v['method']["params"] %> +<%= @v['method']["m_desc"] %> diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/texinfo.erb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/texinfo.erb new file mode 100644 index 0000000..235f63d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/texinfo/texinfo.erb @@ -0,0 +1,28 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename <%= @v['filename'] %> +@settitle <%= @v['title'] %> +@c %**end of header + +@contents @c TODO: whitespace is a mess... =\ + +@ifnottex +@node Top + +@top <%= @v['title'] %> +@end ifnottex + +<% if @f = @v['files'].detect { |f| f.name =~ /Readme/i } %> +<%= @f.values['description'] %><% end %> + +@menu +<% @v['classes'].each do |klass| %> +* <%= klass.name.gsub(/::/, '-') %>::<% end %> +@c TODO: add files +@end menu + +<% (@v['classes'] || []).each_with_index do |klass, i| %> +<%= TexinfoTemplate.new(@v.merge('class' => klass.values), + 'class.texinfo.erb').render %><% end %> + +@bye diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml.rb new file mode 100644 index 0000000..0d4c5a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml.rb @@ -0,0 +1,117 @@ +require 'rdoc/generator/html' + +## +# Generate XML output as one big file + +class RDoc::Generator::XML < RDoc::Generator::HTML + + ## + # Standard generator factory + + def self.for(options) + new(options) + end + + def initialize(*args) + super + end + + ## + # Build the initial indices and output objects + # based on an array of TopLevel objects containing + # the extracted information. + + def generate(info) + @info = info + @files = [] + @classes = [] + @hyperlinks = {} + + build_indices + generate_xml + end + + ## + # Generate: + # + # * a list of File objects for each TopLevel object. + # * a list of Class objects for each first level + # class or module in the TopLevel objects + # * a complete list of all hyperlinkable terms (file, + # class, module, and method names) + + def build_indices + @info.each do |toplevel| + @files << RDoc::Generator::File.new(toplevel, @options, RDoc::Generator::FILE_DIR) + end + + RDoc::TopLevel.all_classes_and_modules.each do |cls| + build_class_list(cls, @files[0], RDoc::Generator::CLASS_DIR) + end + end + + def build_class_list(from, html_file, class_dir) + @classes << RDoc::Generator::Class.new(from, html_file, class_dir, @options) + from.each_classmodule do |mod| + build_class_list(mod, html_file, class_dir) + end + end + + ## + # Generate all the HTML. For the one-file case, we generate + # all the information in to one big hash + + def generate_xml + values = { + 'charset' => @options.charset, + 'files' => gen_into(@files), + 'classes' => gen_into(@classes) + } + + template = RDoc::TemplatePage.new @template::ONE_PAGE + + if @options.op_name + opfile = File.open(@options.op_name, "w") + else + opfile = $stdout + end + template.write_html_on(opfile, values) + end + + def gen_into(list) + res = [] + list.each do |item| + res << item.value_hash + end + res + end + + def gen_file_index + gen_an_index(@files, 'Files') + end + + def gen_class_index + gen_an_index(@classes, 'Classes') + end + + def gen_method_index + gen_an_index(RDoc::Generator::HtmlMethod.all_methods, 'Methods') + end + + def gen_an_index(collection, title) + res = [] + collection.sort.each do |f| + if f.document_self + res << { "href" => f.path, "name" => f.index_name } + end + end + + return { + "entries" => res, + 'list_title' => title, + 'index_url' => main_url, + } + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/rdf.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/rdf.rb new file mode 100644 index 0000000..7b15c69 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/rdf.rb @@ -0,0 +1,113 @@ +require 'rdoc/generator/xml' + +module RDoc::Generator::XML::RDF + + CONTENTS_RDF = <<-EOF +<% if defined? classes and classes["description"] then %> + +<%= classes["description"] %> + +<% end %> + +<% if defined? files and files["requires"] then %> +<% files["requires"].each do |requires| %> + " /> +<% end # files["requires"] %> +<% end %> + +<% if defined? classes and classes["includes"] then %> + +<% classes["includes"].each do |includes| %> + " /> +<% end # includes["includes"] %> + +<% end %> + +<% if defined? classes and classes["sections"] then %> +<% classes["sections"].each do |sections| %> +<% if sections["attributes"] then %> +<% sections["attributes"].each do |attributes| %> + + "> +<% if attributes["rw"] then %> + <%= attributes["rw"] %> +<% end %> + <%= attributes["a_desc"] %> + + +<% end # sections["attributes"] %> +<% end %> + +<% if sections["method_list"] then %> +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> +<% method_list["methods"].each do |methods| %> + + " rd:visibility="<%= methods["type"] %>" + rd:category="<%= methods["category"] %>" rd:id="<%= methods["aref"] %>"> + <%= methods["params"] %> +<% if methods["m_desc"] then %> + +<%= methods["m_desc"] %> + +<% end %> +<% if methods["sourcecode"] then %> + +<%= methods["sourcecode"] %> + +<% end %> + + +<% end # method_list["methods"] %> +<% end %> +<% end # sections["method_list"] %> +<% end %> + +<% end # classes["sections"] %> +<% end %> + EOF + +######################################################################## + + ONE_PAGE = %{ + + + +<% values["files"].each do |files| %> + " rd:id="<%= files["href"] %>"> + <%= files["full_path"] %> + <%= files["dtm_modified"] %> +} + CONTENTS_RDF + %{ + +<% end # values["files"] %> +<% values["classes"].each do |classes| %> + <<%= values["classmod"] %> rd:name="<%= classes["full_name"] %>" rd:id="<%= classes["full_name"] %>"> + +<% if classes["infiles"] then %> + +<% classes["infiles"].each do |infiles| %> + + " +<% if infiles["full_path_url"] then %> + rdf:about="<%= infiles["full_path_url"] %>" +<% end %> + /> + +<% end # classes["infiles"] %> + +<% end %> +<% if classes["parent"] then %> + <%= href classes["par_url"], classes["parent"] %> +<% end %> + +} + CONTENTS_RDF + %{ + > +<% end # values["classes"] %> + + +} + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/xml.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/xml.rb new file mode 100644 index 0000000..4b54e73 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/generator/xml/xml.rb @@ -0,0 +1,123 @@ +require 'rdoc/generator/xml' + +module RDoc::Generator::XML::XML + + CONTENTS_XML = <<-EOF +<% if defined? classes and classes["description"] then %> + +<%= classes["description"] %> + +<% end %> + +<% if defined? files and files["requires"] then %> + +<% files["requires"].each do |requires| %> + " +<% if requires["aref"] then %> + href="<%= requires["aref"] %>" +<% end %> + /> +<% end %><%# files["requires"] %> + +<% end %> +<% if defined? classes and classes["sections"] then %> +<% classes["sections"].each do |sections| %> +<% if sections["constants"] then %> + +<% sections["constants"].each do |constant| %> + "> +<% if constant["value"] then %> + <%= constant["value"] %> +<% end %> + <%= constant["a_desc"] %> + +<% end %><%# sections["constants"] %> + +<% end %> +<% if sections["attributes"] then %> + +<% sections["attributes"].each do |attributes| %> + "> +<% if attributes["rw"] then %> + <%= attributes["rw"] %> +<% end %> + <%= attributes["a_desc"] %> + +<% end %><%# sections["attributes"] %> + +<% end %> +<% if sections["method_list"] then %> + +<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> +<% method_list["methods"].each do |methods| %> + " type="<%= methods["type"] %>" category="<%= methods["category"] %>" id="<%= methods["aref"] %>"> + <%= methods["params"] %> +<% if methods["m_desc"] then %> + +<%= methods["m_desc"] %> + +<% end %> +<% if methods["sourcecode"] then %> + +<%= methods["sourcecode"] %> + +<% end %> + +<% end %><%# method_list["methods"] %> +<% end %> +<% end %><%# sections["method_list"] %> + +<% end %> +<% end %><%# classes["sections"] %> +<% end %> +<% if defined? classes and classes["includes"] then %> + +<% classes["includes"].each do |includes| %> + " +<% if includes["aref"] then %> + href="<%= includes["aref"] %>" +<% end %> + /> +<% end %><%# classes["includes"] %> + +<% end %> + + EOF + + ONE_PAGE = %{ + + +<% values["files"].each do |files| %> + " id="<%= files["href"] %>"> + + <%= files["full_path"] %> + <%= files["dtm_modified"] %> + +} + CONTENTS_XML + %{ + +<% end %><%# values["files"] %> + + +<% values["classes"].each do |classes| %> + <<%= classes["classmod"] %> name="<%= classes["full_name"] %>" id="<%= classes["full_name"] %>"> + +<% if classes["infiles"] then %> + +<% classes["infiles"].each do |infiles| %> + <%= href infiles["full_path_url"], infiles["full_path"] %> +<% end %><%# classes["infiles"] %> + +<% end %> +<% if classes["parent"] then %> + <%= href classes["par_url"], classes["parent"] %> +<% end %> + +} + CONTENTS_XML + %{ + > +<% end %><%# values["classes"] %> + + +} + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/known_classes.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/known_classes.rb new file mode 100644 index 0000000..dbb1802 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/known_classes.rb @@ -0,0 +1,68 @@ +module RDoc + + ## + # Ruby's built-in classes, modules and exceptions + + KNOWN_CLASSES = { + "rb_cArray" => "Array", + "rb_cBignum" => "Bignum", + "rb_cClass" => "Class", + "rb_cData" => "Data", + "rb_cDir" => "Dir", + "rb_cFalseClass" => "FalseClass", + "rb_cFile" => "File", + "rb_cFixnum" => "Fixnum", + "rb_cFloat" => "Float", + "rb_cHash" => "Hash", + "rb_cIO" => "IO", + "rb_cInteger" => "Integer", + "rb_cModule" => "Module", + "rb_cNilClass" => "NilClass", + "rb_cNumeric" => "Numeric", + "rb_cObject" => "Object", + "rb_cProc" => "Proc", + "rb_cRange" => "Range", + "rb_cRegexp" => "Regexp", + "rb_cRubyVM" => "RubyVM", + "rb_cString" => "String", + "rb_cStruct" => "Struct", + "rb_cSymbol" => "Symbol", + "rb_cThread" => "Thread", + "rb_cTime" => "Time", + "rb_cTrueClass" => "TrueClass", + + "rb_eArgError" => "ArgError", + "rb_eEOFError" => "EOFError", + "rb_eException" => "Exception", + "rb_eFatal" => "Fatal", + "rb_eFloatDomainError" => "FloatDomainError", + "rb_eIOError" => "IOError", + "rb_eIndexError" => "IndexError", + "rb_eInterrupt" => "Interrupt", + "rb_eLoadError" => "LoadError", + "rb_eNameError" => "NameError", + "rb_eNoMemError" => "NoMemError", + "rb_eNotImpError" => "NotImpError", + "rb_eRangeError" => "RangeError", + "rb_eRuntimeError" => "RuntimeError", + "rb_eScriptError" => "ScriptError", + "rb_eSecurityError" => "SecurityError", + "rb_eSignal" => "Signal", + "rb_eStandardError" => "StandardError", + "rb_eSyntaxError" => "SyntaxError", + "rb_eSystemCallError" => "SystemCallError", + "rb_eSystemExit" => "SystemExit", + "rb_eTypeError" => "TypeError", + "rb_eZeroDivError" => "ZeroDivError", + + "rb_mComparable" => "Comparable", + "rb_mEnumerable" => "Enumerable", + "rb_mErrno" => "Errno", + "rb_mFileTest" => "FileTest", + "rb_mGC" => "GC", + "rb_mKernel" => "Kernel", + "rb_mMath" => "Math", + "rb_mProcess" => "Process" + } + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup.rb new file mode 100644 index 0000000..9d22b38 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup.rb @@ -0,0 +1,378 @@ +require 'rdoc' + +## +# RDoc::Markup parses plain text documents and attempts to decompose them into +# their constituent parts. Some of these parts are high-level: paragraphs, +# chunks of verbatim text, list entries and the like. Other parts happen at +# the character level: a piece of bold text, a word in code font. This markup +# is similar in spirit to that used on WikiWiki webs, where folks create web +# pages using a simple set of formatting rules. +# +# RDoc::Markup itself does no output formatting: this is left to a different +# set of classes. +# +# RDoc::Markup is extendable at runtime: you can add \new markup elements to +# be recognised in the documents that RDoc::Markup parses. +# +# RDoc::Markup is intended to be the basis for a family of tools which share +# the common requirement that simple, plain-text should be rendered in a +# variety of different output formats and media. It is envisaged that +# RDoc::Markup could be the basis for formatting RDoc style comment blocks, +# Wiki entries, and online FAQs. +# +# == Synopsis +# +# This code converts +input_string+ to HTML. The conversion takes place in +# the +convert+ method, so you can use the same RDoc::Markup converter to +# convert multiple input strings. +# +# require 'rdoc/markup/to_html' +# +# h = RDoc::Markup::ToHtml.new +# +# puts h.convert(input_string) +# +# You can extend the RDoc::Markup parser to recognise new markup +# sequences, and to add special processing for text that matches a +# regular expression. Here we make WikiWords significant to the parser, +# and also make the sequences {word} and \text... signify +# strike-through text. When then subclass the HTML output class to deal +# with these: +# +# require 'rdoc/markup' +# require 'rdoc/markup/to_html' +# +# class WikiHtml < RDoc::Markup::ToHtml +# def handle_special_WIKIWORD(special) +# "" + special.text + "" +# end +# end +# +# m = RDoc::Markup.new +# m.add_word_pair("{", "}", :STRIKE) +# m.add_html("no", :STRIKE) +# +# m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) +# +# wh = WikiHtml.new +# wh.add_tag(:STRIKE, "", "") +# +# puts "#{wh.convert ARGF.read}" +# +#-- +# Author:: Dave Thomas, dave@pragmaticprogrammer.com +# License:: Ruby license + +class RDoc::Markup + + SPACE = ?\s + + # List entries look like: + # * text + # 1. text + # [label] text + # label:: text + # + # Flag it as a list entry, and work out the indent for subsequent lines + + SIMPLE_LIST_RE = /^( + ( \* (?# bullet) + |- (?# bullet) + |\d+\. (?# numbered ) + |[A-Za-z]\. (?# alphabetically numbered ) + ) + \s+ + )\S/x + + LABEL_LIST_RE = /^( + ( \[.*?\] (?# labeled ) + |\S.*:: (?# note ) + )(?:\s+|$) + )/x + + ## + # Take a block of text and use various heuristics to determine it's + # structure (paragraphs, lists, and so on). Invoke an event handler as we + # identify significant chunks. + + def initialize + @am = RDoc::Markup::AttributeManager.new + @output = nil + end + + ## + # Add to the sequences used to add formatting to an individual word (such + # as *bold*). Matching entries will generate attributes that the output + # formatters can recognize by their +name+. + + def add_word_pair(start, stop, name) + @am.add_word_pair(start, stop, name) + end + + ## + # Add to the sequences recognized as general markup. + + def add_html(tag, name) + @am.add_html(tag, name) + end + + ## + # Add to other inline sequences. For example, we could add WikiWords using + # something like: + # + # parser.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) + # + # Each wiki word will be presented to the output formatter via the + # accept_special method. + + def add_special(pattern, name) + @am.add_special(pattern, name) + end + + ## + # We take a string, split it into lines, work out the type of each line, + # and from there deduce groups of lines (for example all lines in a + # paragraph). We then invoke the output formatter using a Visitor to + # display the result. + + def convert(str, op) + lines = str.split(/\r?\n/).map { |line| Line.new line } + @lines = Lines.new lines + + return "" if @lines.empty? + @lines.normalize + assign_types_to_lines + group = group_lines + # call the output formatter to handle the result + #group.each { |line| p line } + group.accept @am, op + end + + private + + ## + # Look through the text at line indentation. We flag each line as being + # Blank, a paragraph, a list element, or verbatim text. + + def assign_types_to_lines(margin = 0, level = 0) + while line = @lines.next + if line.blank? then + line.stamp :BLANK, level + next + end + + # if a line contains non-blanks before the margin, then it must belong + # to an outer level + + text = line.text + + for i in 0...margin + if text[i] != SPACE + @lines.unget + return + end + end + + active_line = text[margin..-1] + + # Rules (horizontal lines) look like + # + # --- (three or more hyphens) + # + # The more hyphens, the thicker the rule + # + + if /^(---+)\s*$/ =~ active_line + line.stamp :RULE, level, $1.length-2 + next + end + + # Then look for list entries. First the ones that have to have + # text following them (* xxx, - xxx, and dd. xxx) + + if SIMPLE_LIST_RE =~ active_line + offset = margin + $1.length + prefix = $2 + prefix_length = prefix.length + + flag = case prefix + when "*","-" then :BULLET + when /^\d/ then :NUMBER + when /^[A-Z]/ then :UPPERALPHA + when /^[a-z]/ then :LOWERALPHA + else raise "Invalid List Type: #{self.inspect}" + end + + line.stamp :LIST, level+1, prefix, flag + text[margin, prefix_length] = " " * prefix_length + assign_types_to_lines(offset, level + 1) + next + end + + if LABEL_LIST_RE =~ active_line + offset = margin + $1.length + prefix = $2 + prefix_length = prefix.length + + next if handled_labeled_list(line, level, margin, offset, prefix) + end + + # Headings look like + # = Main heading + # == Second level + # === Third + # + # Headings reset the level to 0 + + if active_line[0] == ?= and active_line =~ /^(=+)\s*(.*)/ + prefix_length = $1.length + prefix_length = 6 if prefix_length > 6 + line.stamp :HEADING, 0, prefix_length + line.strip_leading(margin + prefix_length) + next + end + + # If the character's a space, then we have verbatim text, + # otherwise + + if active_line[0] == SPACE + line.strip_leading(margin) if margin > 0 + line.stamp :VERBATIM, level + else + line.stamp :PARAGRAPH, level + end + end + end + + ## + # Handle labeled list entries, We have a special case to deal with. + # Because the labels can be long, they force the remaining block of text + # over the to right: + # + # this is a long label that I wrote:: and here is the + # block of text with + # a silly margin + # + # So we allow the special case. If the label is followed by nothing, and + # if the following line is indented, then we take the indent of that line + # as the new margin. + # + # this is a long label that I wrote:: + # here is a more reasonably indented block which + # will be attached to the label. + # + + def handled_labeled_list(line, level, margin, offset, prefix) + prefix_length = prefix.length + text = line.text + flag = nil + + case prefix + when /^\[/ then + flag = :LABELED + prefix = prefix[1, prefix.length-2] + when /:$/ then + flag = :NOTE + prefix.chop! + else + raise "Invalid List Type: #{self.inspect}" + end + + # body is on the next line + if text.length <= offset then + original_line = line + line = @lines.next + return false unless line + text = line.text + + for i in 0..margin + if text[i] != SPACE + @lines.unget + return false + end + end + + i = margin + i += 1 while text[i] == SPACE + + if i >= text.length then + @lines.unget + return false + else + offset = i + prefix_length = 0 + + if text[offset..-1] =~ SIMPLE_LIST_RE then + @lines.unget + line = original_line + line.text = '' + else + @lines.delete original_line + end + end + end + + line.stamp :LIST, level+1, prefix, flag + text[margin, prefix_length] = " " * prefix_length + assign_types_to_lines(offset, level + 1) + return true + end + + ## + # Return a block consisting of fragments which are paragraphs, list + # entries or verbatim text. We merge consecutive lines of the same type + # and level together. We are also slightly tricky with lists: the lines + # following a list introduction look like paragraph lines at the next + # level, and we remap them into list entries instead. + + def group_lines + @lines.rewind + + in_list = false + wanted_type = wanted_level = nil + + block = LineCollection.new + group = nil + + while line = @lines.next + if line.level == wanted_level and line.type == wanted_type + group.add_text(line.text) + else + group = block.fragment_for(line) + block.add(group) + + if line.type == :LIST + wanted_type = :PARAGRAPH + else + wanted_type = line.type + end + + wanted_level = line.type == :HEADING ? line.param : line.level + end + end + + block.normalize + block + end + + ## + # For debugging, we allow access to our line contents as text. + + def content + @lines.as_text + end + public :content + + ## + # For debugging, return the list of line types. + + def get_line_types + @lines.line_types + end + public :get_line_types + +end + +require 'rdoc/markup/fragments' +require 'rdoc/markup/inline' +require 'rdoc/markup/lines' diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/attribute_manager.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/attribute_manager.rb new file mode 100644 index 0000000..d13b793 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/attribute_manager.rb @@ -0,0 +1,265 @@ +require 'rdoc/markup/inline' + +class RDoc::Markup::AttributeManager + + NULL = "\000".freeze + + ## + # We work by substituting non-printing characters in to the text. For now + # I'm assuming that I can substitute a character in the range 0..8 for a 7 + # bit character without damaging the encoded string, but this might be + # optimistic + + A_PROTECT = 004 + PROTECT_ATTR = A_PROTECT.chr + + ## + # This maps delimiters that occur around words (such as *bold* or +tt+) + # where the start and end delimiters and the same. This lets us optimize + # the regexp + + MATCHING_WORD_PAIRS = {} + + ## + # And this is used when the delimiters aren't the same. In this case the + # hash maps a pattern to the attribute character + + WORD_PAIR_MAP = {} + + ## + # This maps HTML tags to the corresponding attribute char + + HTML_TAGS = {} + + ## + # And this maps _special_ sequences to a name. A special sequence is + # something like a WikiWord + + SPECIAL = {} + + ## + # Return an attribute object with the given turn_on and turn_off bits set + + def attribute(turn_on, turn_off) + RDoc::Markup::AttrChanger.new turn_on, turn_off + end + + def change_attribute(current, new) + diff = current ^ new + attribute(new & diff, current & diff) + end + + def changed_attribute_by_name(current_set, new_set) + current = new = 0 + current_set.each do |name| + current |= RDoc::Markup::Attribute.bitmap_for(name) + end + + new_set.each do |name| + new |= RDoc::Markup::Attribute.bitmap_for(name) + end + + change_attribute(current, new) + end + + def copy_string(start_pos, end_pos) + res = @str[start_pos...end_pos] + res.gsub!(/\000/, '') + res + end + + ## + # Map attributes like textto the sequence + # \001\002\001\003, where is a per-attribute specific + # character + + def convert_attrs(str, attrs) + # first do matching ones + tags = MATCHING_WORD_PAIRS.keys.join("") + + re = /(^|\W)([#{tags}])([#:\\]?[\w.\/-]+?\S?)\2(\W|$)/ + + 1 while str.gsub!(re) do + attr = MATCHING_WORD_PAIRS[$2] + attrs.set_attrs($`.length + $1.length + $2.length, $3.length, attr) + $1 + NULL * $2.length + $3 + NULL * $2.length + $4 + end + + # then non-matching + unless WORD_PAIR_MAP.empty? then + WORD_PAIR_MAP.each do |regexp, attr| + str.gsub!(regexp) { + attrs.set_attrs($`.length + $1.length, $2.length, attr) + NULL * $1.length + $2 + NULL * $3.length + } + end + end + end + + def convert_html(str, attrs) + tags = HTML_TAGS.keys.join '|' + + 1 while str.gsub!(/<(#{tags})>(.*?)<\/\1>/i) { + attr = HTML_TAGS[$1.downcase] + html_length = $1.length + 2 + seq = NULL * html_length + attrs.set_attrs($`.length + html_length, $2.length, attr) + seq + $2 + seq + NULL + } + end + + def convert_specials(str, attrs) + unless SPECIAL.empty? + SPECIAL.each do |regexp, attr| + str.scan(regexp) do + attrs.set_attrs($`.length, $&.length, + attr | RDoc::Markup::Attribute::SPECIAL) + end + end + end + end + + ## + # A \ in front of a character that would normally be processed turns off + # processing. We do this by turning \< into <#{PROTECT} + + PROTECTABLE = %w[<\\] + + def mask_protected_sequences + protect_pattern = Regexp.new("\\\\([#{Regexp.escape(PROTECTABLE.join(''))}])") + @str.gsub!(protect_pattern, "\\1#{PROTECT_ATTR}") + end + + def unmask_protected_sequences + @str.gsub!(/(.)#{PROTECT_ATTR}/, "\\1\000") + end + + def initialize + add_word_pair("*", "*", :BOLD) + add_word_pair("_", "_", :EM) + add_word_pair("+", "+", :TT) + + add_html("em", :EM) + add_html("i", :EM) + add_html("b", :BOLD) + add_html("tt", :TT) + add_html("code", :TT) + end + + def add_word_pair(start, stop, name) + raise ArgumentError, "Word flags may not start with '<'" if + start[0,1] == '<' + + bitmap = RDoc::Markup::Attribute.bitmap_for name + + if start == stop then + MATCHING_WORD_PAIRS[start] = bitmap + else + pattern = /(#{Regexp.escape start})(\S+)(#{Regexp.escape stop})/ + WORD_PAIR_MAP[pattern] = bitmap + end + + PROTECTABLE << start[0,1] + PROTECTABLE.uniq! + end + + def add_html(tag, name) + HTML_TAGS[tag.downcase] = RDoc::Markup::Attribute.bitmap_for name + end + + def add_special(pattern, name) + SPECIAL[pattern] = RDoc::Markup::Attribute.bitmap_for name + end + + def flow(str) + @str = str + + mask_protected_sequences + + @attrs = RDoc::Markup::AttrSpan.new @str.length + + convert_attrs(@str, @attrs) + convert_html(@str, @attrs) + convert_specials(str, @attrs) + + unmask_protected_sequences + + return split_into_flow + end + + def display_attributes + puts + puts @str.tr(NULL, "!") + bit = 1 + 16.times do |bno| + line = "" + @str.length.times do |i| + if (@attrs[i] & bit) == 0 + line << " " + else + if bno.zero? + line << "S" + else + line << ("%d" % (bno+1)) + end + end + end + puts(line) unless line =~ /^ *$/ + bit <<= 1 + end + end + + def split_into_flow + res = [] + current_attr = 0 + str = "" + + str_len = @str.length + + # skip leading invisible text + i = 0 + i += 1 while i < str_len and @str[i].chr == "\0" + start_pos = i + + # then scan the string, chunking it on attribute changes + while i < str_len + new_attr = @attrs[i] + if new_attr != current_attr + if i > start_pos + res << copy_string(start_pos, i) + start_pos = i + end + + res << change_attribute(current_attr, new_attr) + current_attr = new_attr + + if (current_attr & RDoc::Markup::Attribute::SPECIAL) != 0 then + i += 1 while + i < str_len and (@attrs[i] & RDoc::Markup::Attribute::SPECIAL) != 0 + + res << RDoc::Markup::Special.new(current_attr, + copy_string(start_pos, i)) + start_pos = i + next + end + end + + # move on, skipping any invisible characters + begin + i += 1 + end while i < str_len and @str[i].chr == "\0" + end + + # tidy up trailing text + if start_pos < str_len + res << copy_string(start_pos, str_len) + end + + # and reset to all attributes off + res << change_attribute(current_attr, 0) if current_attr != 0 + + return res + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/formatter.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/formatter.rb new file mode 100644 index 0000000..14cbae5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/formatter.rb @@ -0,0 +1,14 @@ +require 'rdoc/markup' + +class RDoc::Markup::Formatter + + def initialize + @markup = RDoc::Markup.new + end + + def convert(content) + @markup.convert content, self + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/fragments.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/fragments.rb new file mode 100644 index 0000000..b7f9b60 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/fragments.rb @@ -0,0 +1,337 @@ +require 'rdoc/markup' +require 'rdoc/markup/lines' + +class RDoc::Markup + + ## + # A Fragment is a chunk of text, subclassed as a paragraph, a list + # entry, or verbatim text. + + class Fragment + attr_reader :level, :param, :txt + attr_accessor :type + + ## + # This is a simple factory system that lets us associate fragement + # types (a string) with a subclass of fragment + + TYPE_MAP = {} + + def self.type_name(name) + TYPE_MAP[name] = self + end + + def self.for(line) + klass = TYPE_MAP[line.type] || + raise("Unknown line type: '#{line.type.inspect}:' '#{line.text}'") + return klass.new(line.level, line.param, line.flag, line.text) + end + + def initialize(level, param, type, txt) + @level = level + @param = param + @type = type + @txt = "" + add_text(txt) if txt + end + + def add_text(txt) + @txt << " " if @txt.length > 0 + @txt << txt.tr_s("\n ", " ").strip + end + + def to_s + "L#@level: #{self.class.name.split('::')[-1]}\n#@txt" + end + + end + + ## + # A paragraph is a fragment which gets wrapped to fit. We remove all + # newlines when we're created, and have them put back on output. + + class Paragraph < Fragment + type_name :PARAGRAPH + end + + class BlankLine < Paragraph + type_name :BLANK + end + + class Heading < Paragraph + type_name :HEADING + + def head_level + @param.to_i + end + end + + ## + # A List is a fragment with some kind of label + + class ListBase < Paragraph + LIST_TYPES = [ + :BULLET, + :NUMBER, + :UPPERALPHA, + :LOWERALPHA, + :LABELED, + :NOTE, + ] + end + + class ListItem < ListBase + type_name :LIST + + def to_s + text = if [:NOTE, :LABELED].include? type then + "#{@param}: #{@txt}" + else + @txt + end + + "L#@level: #{type} #{self.class.name.split('::')[-1]}\n#{text}" + end + + end + + class ListStart < ListBase + def initialize(level, param, type) + super(level, param, type, nil) + end + end + + class ListEnd < ListBase + def initialize(level, type) + super(level, "", type, nil) + end + end + + ## + # Verbatim code contains lines that don't get wrapped. + + class Verbatim < Fragment + type_name :VERBATIM + + def add_text(txt) + @txt << txt.chomp << "\n" + end + + end + + ## + # A horizontal rule + + class Rule < Fragment + type_name :RULE + end + + ## + # Collect groups of lines together. Each group will end up containing a flow + # of text. + + class LineCollection + + def initialize + @fragments = [] + end + + def add(fragment) + @fragments << fragment + end + + def each(&b) + @fragments.each(&b) + end + + def to_a # :nodoc: + @fragments.map {|fragment| fragment.to_s} + end + + ## + # Factory for different fragment types + + def fragment_for(*args) + Fragment.for(*args) + end + + ## + # Tidy up at the end + + def normalize + change_verbatim_blank_lines + add_list_start_and_ends + add_list_breaks + tidy_blank_lines + end + + def to_s + @fragments.join("\n----\n") + end + + def accept(am, visitor) + visitor.start_accepting + + @fragments.each do |fragment| + case fragment + when Verbatim + visitor.accept_verbatim(am, fragment) + when Rule + visitor.accept_rule(am, fragment) + when ListStart + visitor.accept_list_start(am, fragment) + when ListEnd + visitor.accept_list_end(am, fragment) + when ListItem + visitor.accept_list_item(am, fragment) + when BlankLine + visitor.accept_blank_line(am, fragment) + when Heading + visitor.accept_heading(am, fragment) + when Paragraph + visitor.accept_paragraph(am, fragment) + end + end + + visitor.end_accepting + end + + private + + # If you have: + # + # normal paragraph text. + # + # this is code + # + # and more code + # + # You'll end up with the fragments Paragraph, BlankLine, Verbatim, + # BlankLine, Verbatim, BlankLine, etc. + # + # The BlankLine in the middle of the verbatim chunk needs to be changed to + # a real verbatim newline, and the two verbatim blocks merged + + def change_verbatim_blank_lines + frag_block = nil + blank_count = 0 + @fragments.each_with_index do |frag, i| + if frag_block.nil? + frag_block = frag if Verbatim === frag + else + case frag + when Verbatim + blank_count.times { frag_block.add_text("\n") } + blank_count = 0 + frag_block.add_text(frag.txt) + @fragments[i] = nil # remove out current fragment + when BlankLine + if frag_block + blank_count += 1 + @fragments[i] = nil + end + else + frag_block = nil + blank_count = 0 + end + end + end + @fragments.compact! + end + + ## + # List nesting is implicit given the level of indentation. Make it + # explicit, just to make life a tad easier for the output processors + + def add_list_start_and_ends + level = 0 + res = [] + type_stack = [] + + @fragments.each do |fragment| + # $stderr.puts "#{level} : #{fragment.class.name} : #{fragment.level}" + new_level = fragment.level + while (level < new_level) + level += 1 + type = fragment.type + res << ListStart.new(level, fragment.param, type) if type + type_stack.push type + # $stderr.puts "Start: #{level}" + end + + while level > new_level + type = type_stack.pop + res << ListEnd.new(level, type) if type + level -= 1 + # $stderr.puts "End: #{level}, #{type}" + end + + res << fragment + level = fragment.level + end + level.downto(1) do |i| + type = type_stack.pop + res << ListEnd.new(i, type) if type + end + + @fragments = res + end + + ## + # Inserts start/ends between list entries at the same level that have + # different element types + + def add_list_breaks + res = @fragments + + @fragments = [] + list_stack = [] + + res.each do |fragment| + case fragment + when ListStart + list_stack.push fragment + when ListEnd + start = list_stack.pop + fragment.type = start.type + when ListItem + l = list_stack.last + if fragment.type != l.type + @fragments << ListEnd.new(l.level, l.type) + start = ListStart.new(l.level, fragment.param, fragment.type) + @fragments << start + list_stack.pop + list_stack.push start + end + else + ; + end + @fragments << fragment + end + end + + ## + # Tidy up the blank lines: + # * change Blank/ListEnd into ListEnd/Blank + # * remove blank lines at the front + + def tidy_blank_lines + (@fragments.size - 1).times do |i| + if BlankLine === @fragments[i] and ListEnd === @fragments[i+1] then + @fragments[i], @fragments[i+1] = @fragments[i+1], @fragments[i] + end + end + + # remove leading blanks + @fragments.each_with_index do |f, i| + break unless f.kind_of? BlankLine + @fragments[i] = nil + end + + @fragments.compact! + end + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/inline.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/inline.rb new file mode 100644 index 0000000..46c9b58 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/inline.rb @@ -0,0 +1,101 @@ +require 'rdoc/markup' + +class RDoc::Markup + + ## + # We manage a set of attributes. Each attribute has a symbol name and a bit + # value. + + class Attribute + SPECIAL = 1 + + @@name_to_bitmap = { :_SPECIAL_ => SPECIAL } + @@next_bitmap = 2 + + def self.bitmap_for(name) + bitmap = @@name_to_bitmap[name] + unless bitmap then + bitmap = @@next_bitmap + @@next_bitmap <<= 1 + @@name_to_bitmap[name] = bitmap + end + bitmap + end + + def self.as_string(bitmap) + return "none" if bitmap.zero? + res = [] + @@name_to_bitmap.each do |name, bit| + res << name if (bitmap & bit) != 0 + end + res.join(",") + end + + def self.each_name_of(bitmap) + @@name_to_bitmap.each do |name, bit| + next if bit == SPECIAL + yield name.to_s if (bitmap & bit) != 0 + end + end + end + + AttrChanger = Struct.new(:turn_on, :turn_off) + + ## + # An AttrChanger records a change in attributes. It contains a bitmap of the + # attributes to turn on, and a bitmap of those to turn off. + + class AttrChanger + def to_s + "Attr: +#{Attribute.as_string(turn_on)}/-#{Attribute.as_string(turn_on)}" + end + end + + ## + # An array of attributes which parallels the characters in a string. + + class AttrSpan + def initialize(length) + @attrs = Array.new(length, 0) + end + + def set_attrs(start, length, bits) + for i in start ... (start+length) + @attrs[i] |= bits + end + end + + def [](n) + @attrs[n] + end + end + + ## + # Hold details of a special sequence + + class Special + attr_reader :type + attr_accessor :text + + def initialize(type, text) + @type, @text = type, text + end + + def ==(o) + self.text == o.text && self.type == o.type + end + + def inspect + "#" % [ + object_id, @type, RDoc::Markup::Attribute.as_string(type), text.dump] + end + + def to_s + "Special: type=#{type}, name=#{RDoc::Markup::Attribute.as_string type}, text=#{text.dump}" + end + + end + +end + +require 'rdoc/markup/attribute_manager' diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/lines.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/lines.rb new file mode 100644 index 0000000..0694921 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/lines.rb @@ -0,0 +1,152 @@ +class RDoc::Markup + + ## + # We store the lines we're working on as objects of class Line. These + # contain the text of the line, along with a flag indicating the line type, + # and an indentation level. + + class Line + INFINITY = 9999 + + LINE_TYPES = [ + :BLANK, + :HEADING, + :LIST, + :PARAGRAPH, + :RULE, + :VERBATIM, + ] + + # line type + attr_accessor :type + + # The indentation nesting level + attr_accessor :level + + # The contents + attr_accessor :text + + # A prefix or parameter. For LIST lines, this is + # the text that introduced the list item (the label) + attr_accessor :param + + # A flag. For list lines, this is the type of the list + attr_accessor :flag + + # the number of leading spaces + attr_accessor :leading_spaces + + # true if this line has been deleted from the list of lines + attr_accessor :deleted + + def initialize(text) + @text = text.dup + @deleted = false + + # expand tabs + 1 while @text.gsub!(/\t+/) { ' ' * (8*$&.length - $`.length % 8)} && $~ #` + + # Strip trailing whitespace + @text.sub!(/\s+$/, '') + + # and look for leading whitespace + if @text.length > 0 + @text =~ /^(\s*)/ + @leading_spaces = $1.length + else + @leading_spaces = INFINITY + end + end + + # Return true if this line is blank + def blank? + @text.empty? + end + + # stamp a line with a type, a level, a prefix, and a flag + def stamp(type, level, param="", flag=nil) + @type, @level, @param, @flag = type, level, param, flag + end + + ## + # Strip off the leading margin + + def strip_leading(size) + if @text.size > size + @text[0,size] = "" + else + @text = "" + end + end + + def to_s + "#@type#@level: #@text" + end + end + + ## + # A container for all the lines. + + class Lines + + include Enumerable + + attr_reader :lines # :nodoc: + + def initialize(lines) + @lines = lines + rewind + end + + def empty? + @lines.size.zero? + end + + def each + @lines.each do |line| + yield line unless line.deleted + end + end + +# def [](index) +# @lines[index] +# end + + def rewind + @nextline = 0 + end + + def next + begin + res = @lines[@nextline] + @nextline += 1 if @nextline < @lines.size + end while res and res.deleted and @nextline < @lines.size + res + end + + def unget + @nextline -= 1 + end + + def delete(a_line) + a_line.deleted = true + end + + def normalize + margin = @lines.collect{|l| l.leading_spaces}.min + margin = 0 if margin == :INFINITY + @lines.each {|line| line.strip_leading(margin) } if margin > 0 + end + + def as_text + @lines.map {|l| l.text}.join("\n") + end + + def line_types + @lines.map {|l| l.type } + end + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/preprocess.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/preprocess.rb new file mode 100644 index 0000000..00dd4be --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/preprocess.rb @@ -0,0 +1,75 @@ +require 'rdoc/markup' + +## +# Handle common directives that can occur in a block of text: +# +# : include : filename + +class RDoc::Markup::PreProcess + + def initialize(input_file_name, include_path) + @input_file_name = input_file_name + @include_path = include_path + end + + ## + # Look for common options in a chunk of text. Options that we don't handle + # are yielded to the caller. + + def handle(text) + text.gsub!(/^([ \t]*#?[ \t]*):(\w+):([ \t]*)(.+)?\n/) do + next $& if $3.empty? and $4 and $4[0, 1] == ':' + + prefix = $1 + directive = $2.downcase + param = $4 + + case directive + when 'include' then + filename = param.split[0] + include_file filename, prefix + + else + result = yield directive, param + result = "#{prefix}:#{directive}: #{param}\n" unless result + result + end + end + end + + private + + ## + # Include a file, indenting it correctly. + + def include_file(name, indent) + if full_name = find_include_file(name) then + content = File.open(full_name) {|f| f.read} + # strip leading '#'s, but only if all lines start with them + if content =~ /^[^#]/ + content.gsub(/^/, indent) + else + content.gsub(/^#?/, indent) + end + else + $stderr.puts "Couldn't find file to include: '#{name}'" + '' + end + end + + ## + # Look for the given file in the directory containing the current file, + # and then in each of the directories specified in the RDOC_INCLUDE path + + def find_include_file(name) + to_search = [ File.dirname(@input_file_name) ].concat @include_path + to_search.each do |dir| + full_name = File.join(dir, name) + stat = File.stat(full_name) rescue next + return full_name if stat.readable? + end + nil + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_flow.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_flow.rb new file mode 100644 index 0000000..3d87b3e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_flow.rb @@ -0,0 +1,185 @@ +require 'rdoc/markup/formatter' +require 'rdoc/markup/fragments' +require 'rdoc/markup/inline' +require 'cgi' + +class RDoc::Markup + + module Flow + P = Struct.new(:body) + VERB = Struct.new(:body) + RULE = Struct.new(:width) + class LIST + attr_reader :type, :contents + def initialize(type) + @type = type + @contents = [] + end + def <<(stuff) + @contents << stuff + end + end + LI = Struct.new(:label, :body) + H = Struct.new(:level, :text) + end + + class ToFlow < RDoc::Markup::Formatter + LIST_TYPE_TO_HTML = { + :BULLET => [ "
        ", "
      " ], + :NUMBER => [ "
        ", "
      " ], + :UPPERALPHA => [ "
        ", "
      " ], + :LOWERALPHA => [ "
        ", "
      " ], + :LABELED => [ "
      ", "
      " ], + :NOTE => [ "", "
      " ], + } + + InlineTag = Struct.new(:bit, :on, :off) + + def initialize + super + + init_tags + end + + ## + # Set up the standard mapping of attributes to HTML tags + + def init_tags + @attr_tags = [ + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:BOLD), "", ""), + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:TT), "", ""), + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:EM), "", ""), + ] + end + + ## + # Add a new set of HTML tags for an attribute. We allow separate start and + # end tags for flexibility + + def add_tag(name, start, stop) + @attr_tags << InlineTag.new(RDoc::Markup::Attribute.bitmap_for(name), start, stop) + end + + ## + # Given an HTML tag, decorate it with class information and the like if + # required. This is a no-op in the base class, but is overridden in HTML + # output classes that implement style sheets + + def annotate(tag) + tag + end + + ## + # Here's the client side of the visitor pattern + + def start_accepting + @res = [] + @list_stack = [] + end + + def end_accepting + @res + end + + def accept_paragraph(am, fragment) + @res << Flow::P.new((convert_flow(am.flow(fragment.txt)))) + end + + def accept_verbatim(am, fragment) + @res << Flow::VERB.new((convert_flow(am.flow(fragment.txt)))) + end + + def accept_rule(am, fragment) + size = fragment.param + size = 10 if size > 10 + @res << Flow::RULE.new(size) + end + + def accept_list_start(am, fragment) + @list_stack.push(@res) + list = Flow::LIST.new(fragment.type) + @res << list + @res = list + end + + def accept_list_end(am, fragment) + @res = @list_stack.pop + end + + def accept_list_item(am, fragment) + @res << Flow::LI.new(fragment.param, convert_flow(am.flow(fragment.txt))) + end + + def accept_blank_line(am, fragment) + # @res << annotate("

      ") << "\n" + end + + def accept_heading(am, fragment) + @res << Flow::H.new(fragment.head_level, convert_flow(am.flow(fragment.txt))) + end + + private + + def on_tags(res, item) + attr_mask = item.turn_on + return if attr_mask.zero? + + @attr_tags.each do |tag| + if attr_mask & tag.bit != 0 + res << annotate(tag.on) + end + end + end + + def off_tags(res, item) + attr_mask = item.turn_off + return if attr_mask.zero? + + @attr_tags.reverse_each do |tag| + if attr_mask & tag.bit != 0 + res << annotate(tag.off) + end + end + end + + def convert_flow(flow) + res = "" + flow.each do |item| + case item + when String + res << convert_string(item) + when AttrChanger + off_tags(res, item) + on_tags(res, item) + when Special + res << convert_special(item) + else + raise "Unknown flow element: #{item.inspect}" + end + end + res + end + + def convert_string(item) + CGI.escapeHTML(item) + end + + def convert_special(special) + handled = false + Attribute.each_name_of(special.type) do |name| + method_name = "handle_special_#{name}" + if self.respond_to? method_name + special.text = send(method_name, special) + handled = true + end + end + + raise "Unhandled special: #{special}" unless handled + + special.text + end + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html.rb new file mode 100644 index 0000000..dce7a69 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_html.rb @@ -0,0 +1,403 @@ +require 'rdoc/markup/formatter' +require 'rdoc/markup/fragments' +require 'rdoc/markup/inline' + +require 'cgi' + +class RDoc::Markup::ToHtml < RDoc::Markup::Formatter + + LIST_TYPE_TO_HTML = { + :BULLET => %w[

      ], + :NUMBER => %w[
      ], + :UPPERALPHA => %w[
      ], + :LOWERALPHA => %w[
      ], + :LABELED => %w[
      ], + :NOTE => %w[
      ], + } + + InlineTag = Struct.new(:bit, :on, :off) + + def initialize + super + + # @in_tt - tt nested levels count + # @tt_bit - cache + @in_tt = 0 + @tt_bit = RDoc::Markup::Attribute.bitmap_for :TT + + # external hyperlinks + @markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) + + # and links of the form [] + @markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK) + + init_tags + end + + ## + # Converts a target url to one that is relative to a given path + + def self.gen_relative_url(path, target) + from = File.dirname path + to, to_file = File.split target + + from = from.split "/" + to = to.split "/" + + while from.size > 0 and to.size > 0 and from[0] == to[0] do + from.shift + to.shift + end + + from.fill ".." + from.concat to + from << to_file + File.join(*from) + end + + ## + # Generate a hyperlink for url, labeled with text. Handle the + # special cases for img: and link: described under handle_special_HYPERLINK + + def gen_url(url, text) + if url =~ /([A-Za-z]+):(.*)/ then + type = $1 + path = $2 + else + type = "http" + path = url + url = "http://#{url}" + end + + if type == "link" then + url = if path[0, 1] == '#' then # is this meaningful? + path + else + self.class.gen_relative_url @from_path, path + end + end + + if (type == "http" or type == "link") and + url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then + "" + else + "#{text.sub(%r{^#{type}:/*}, '')}" + end + end + + ## + # And we're invoked with a potential external hyperlink mailto: + # just gets inserted. http: links are checked to see if they + # reference an image. If so, that image gets inserted using an + # tag. Otherwise a conventional is used. We also + # support a special type of hyperlink, link:, which is a reference + # to a local file whose path is relative to the --op directory. + + def handle_special_HYPERLINK(special) + url = special.text + gen_url url, url + end + + ## + # Here's a hypedlink where the label is different to the URL + # #{name}" + else + name + end + + @seen[name] = out + + out + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_latex.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_latex.rb new file mode 100644 index 0000000..bbf958f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_latex.rb @@ -0,0 +1,328 @@ +require 'rdoc/markup/formatter' +require 'rdoc/markup/fragments' +require 'rdoc/markup/inline' + +require 'cgi' + +## +# Convert SimpleMarkup to basic LaTeX report format. + +class RDoc::Markup::ToLaTeX < RDoc::Markup::Formatter + + BS = "\020" # \ + OB = "\021" # { + CB = "\022" # } + DL = "\023" # Dollar + + BACKSLASH = "#{BS}symbol#{OB}92#{CB}" + HAT = "#{BS}symbol#{OB}94#{CB}" + BACKQUOTE = "#{BS}symbol#{OB}0#{CB}" + TILDE = "#{DL}#{BS}sim#{DL}" + LESSTHAN = "#{DL}<#{DL}" + GREATERTHAN = "#{DL}>#{DL}" + + def self.l(str) + str.tr('\\', BS).tr('{', OB).tr('}', CB).tr('$', DL) + end + + def l(arg) + RDoc::Markup::ToLaTeX.l(arg) + end + + LIST_TYPE_TO_LATEX = { + :BULLET => [ l("\\begin{itemize}"), l("\\end{itemize}") ], + :NUMBER => [ l("\\begin{enumerate}"), l("\\end{enumerate}"), "\\arabic" ], + :UPPERALPHA => [ l("\\begin{enumerate}"), l("\\end{enumerate}"), "\\Alph" ], + :LOWERALPHA => [ l("\\begin{enumerate}"), l("\\end{enumerate}"), "\\alph" ], + :LABELED => [ l("\\begin{description}"), l("\\end{description}") ], + :NOTE => [ + l("\\begin{tabularx}{\\linewidth}{@{} l X @{}}"), + l("\\end{tabularx}") ], + } + + InlineTag = Struct.new(:bit, :on, :off) + + def initialize + init_tags + @list_depth = 0 + @prev_list_types = [] + end + + ## + # Set up the standard mapping of attributes to LaTeX + + def init_tags + @attr_tags = [ + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:BOLD), l("\\textbf{"), l("}")), + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:TT), l("\\texttt{"), l("}")), + InlineTag.new(RDoc::Markup::Attribute.bitmap_for(:EM), l("\\emph{"), l("}")), + ] + end + + ## + # Escape a LaTeX string + + def escape(str) + $stderr.print "FE: ", str if $DEBUG_RDOC + s = str. + sub(/\s+$/, ''). + gsub(/([_\${}&%#])/, "#{BS}\\1"). + gsub(/\\/, BACKSLASH). + gsub(/\^/, HAT). + gsub(/~/, TILDE). + gsub(//, GREATERTHAN). + gsub(/,,/, ",{},"). + gsub(/\`/, BACKQUOTE) + $stderr.print "-> ", s, "\n" if $DEBUG_RDOC + s + end + + ## + # Add a new set of LaTeX tags for an attribute. We allow + # separate start and end tags for flexibility + + def add_tag(name, start, stop) + @attr_tags << InlineTag.new(RDoc::Markup::Attribute.bitmap_for(name), start, stop) + end + + ## + # Here's the client side of the visitor pattern + + def start_accepting + @res = "" + @in_list_entry = [] + end + + def end_accepting + @res.tr(BS, '\\').tr(OB, '{').tr(CB, '}').tr(DL, '$') + end + + def accept_paragraph(am, fragment) + @res << wrap(convert_flow(am.flow(fragment.txt))) + @res << "\n" + end + + def accept_verbatim(am, fragment) + @res << "\n\\begin{code}\n" + @res << fragment.txt.sub(/[\n\s]+\Z/, '') + @res << "\n\\end{code}\n\n" + end + + def accept_rule(am, fragment) + size = fragment.param + size = 10 if size > 10 + @res << "\n\n\\rule{\\linewidth}{#{size}pt}\n\n" + end + + def accept_list_start(am, fragment) + @res << list_name(fragment.type, true) << "\n" + @in_list_entry.push false + end + + def accept_list_end(am, fragment) + if tag = @in_list_entry.pop + @res << tag << "\n" + end + @res << list_name(fragment.type, false) << "\n" + end + + def accept_list_item(am, fragment) + if tag = @in_list_entry.last + @res << tag << "\n" + end + @res << list_item_start(am, fragment) + @res << wrap(convert_flow(am.flow(fragment.txt))) << "\n" + @in_list_entry[-1] = list_end_for(fragment.type) + end + + def accept_blank_line(am, fragment) + # @res << "\n" + end + + def accept_heading(am, fragment) + @res << convert_heading(fragment.head_level, am.flow(fragment.txt)) + end + + ## + # This is a higher speed (if messier) version of wrap + + def wrap(txt, line_len = 76) + res = "" + sp = 0 + ep = txt.length + while sp < ep + # scan back for a space + p = sp + line_len - 1 + if p >= ep + p = ep + else + while p > sp and txt[p] != ?\s + p -= 1 + end + if p <= sp + p = sp + line_len + while p < ep and txt[p] != ?\s + p += 1 + end + end + end + res << txt[sp...p] << "\n" + sp = p + sp += 1 while sp < ep and txt[sp] == ?\s + end + res + end + + private + + def on_tags(res, item) + attr_mask = item.turn_on + return if attr_mask.zero? + + @attr_tags.each do |tag| + if attr_mask & tag.bit != 0 + res << tag.on + end + end + end + + def off_tags(res, item) + attr_mask = item.turn_off + return if attr_mask.zero? + + @attr_tags.reverse_each do |tag| + if attr_mask & tag.bit != 0 + res << tag.off + end + end + end + + def convert_flow(flow) + res = "" + flow.each do |item| + case item + when String + $stderr.puts "Converting '#{item}'" if $DEBUG_RDOC + res << convert_string(item) + when AttrChanger + off_tags(res, item) + on_tags(res, item) + when Special + res << convert_special(item) + else + raise "Unknown flow element: #{item.inspect}" + end + end + res + end + + ## + # some of these patterns are taken from SmartyPants... + + def convert_string(item) + escape(item). + + # convert ... to elipsis (and make sure .... becomes .) + gsub(/\.\.\.\./, '.\ldots{}').gsub(/\.\.\./, '\ldots{}'). + + # convert single closing quote + gsub(%r{([^ \t\r\n\[\{\(])\'}, '\1\''). + gsub(%r{\'(?=\W|s\b)}, "'" ). + + # convert single opening quote + gsub(/'/, '`'). + + # convert double closing quote + gsub(%r{([^ \t\r\n\[\{\(])\"(?=\W)}, "\\1''"). + + # convert double opening quote + gsub(/"/, "``"). + + # convert copyright + gsub(/\(c\)/, '\copyright{}') + + end + + def convert_special(special) + handled = false + Attribute.each_name_of(special.type) do |name| + method_name = "handle_special_#{name}" + if self.respond_to? method_name + special.text = send(method_name, special) + handled = true + end + end + raise "Unhandled special: #{special}" unless handled + special.text + end + + def convert_heading(level, flow) + res = + case level + when 1 then "\\chapter{" + when 2 then "\\section{" + when 3 then "\\subsection{" + when 4 then "\\subsubsection{" + else "\\paragraph{" + end + + convert_flow(flow) + + "}\n" + end + + def list_name(list_type, is_open_tag) + tags = LIST_TYPE_TO_LATEX[list_type] || raise("Invalid list type: #{list_type.inspect}") + if tags[2] # enumerate + if is_open_tag + @list_depth += 1 + if @prev_list_types[@list_depth] != tags[2] + case @list_depth + when 1 + roman = "i" + when 2 + roman = "ii" + when 3 + roman = "iii" + when 4 + roman = "iv" + else + raise("Too deep list: level #{@list_depth}") + end + @prev_list_types[@list_depth] = tags[2] + return l("\\renewcommand{\\labelenum#{roman}}{#{tags[2]}{enum#{roman}}}") + "\n" + tags[0] + end + else + @list_depth -= 1 + end + end + tags[ is_open_tag ? 0 : 1] + end + + def list_item_start(am, fragment) + case fragment.type + when :BULLET, :NUMBER, :UPPERALPHA, :LOWERALPHA then + "\\item " + + when :LABELED then + "\\item[" + convert_flow(am.flow(fragment.param)) + "] " + + when :NOTE then + convert_flow(am.flow(fragment.param)) + " & " + else + raise "Invalid list type" + end + end + + def list_end_for(fragment_type) + case fragment_type + when :BULLET, :NUMBER, :UPPERALPHA, :LOWERALPHA, :LABELED then + "" + when :NOTE + "\\\\\n" + else + raise "Invalid list type" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_test.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_test.rb new file mode 100644 index 0000000..ce6aff6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_test.rb @@ -0,0 +1,50 @@ +require 'rdoc/markup' +require 'rdoc/markup/formatter' + +## +# This Markup outputter is used for testing purposes. + +class RDoc::Markup::ToTest < RDoc::Markup::Formatter + + def start_accepting + @res = [] + end + + def end_accepting + @res + end + + def accept_paragraph(am, fragment) + @res << fragment.to_s + end + + def accept_verbatim(am, fragment) + @res << fragment.to_s + end + + def accept_list_start(am, fragment) + @res << fragment.to_s + end + + def accept_list_end(am, fragment) + @res << fragment.to_s + end + + def accept_list_item(am, fragment) + @res << fragment.to_s + end + + def accept_blank_line(am, fragment) + @res << fragment.to_s + end + + def accept_heading(am, fragment) + @res << fragment.to_s + end + + def accept_rule(am, fragment) + @res << fragment.to_s + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_texinfo.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_texinfo.rb new file mode 100644 index 0000000..65a1608 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/markup/to_texinfo.rb @@ -0,0 +1,69 @@ +require 'rdoc/markup/formatter' +require 'rdoc/markup/fragments' +require 'rdoc/markup/inline' + +require 'rdoc/markup' +require 'rdoc/markup/formatter' + +## +# Convert SimpleMarkup to basic TexInfo format +# +# TODO: WTF is AttributeManager for? +# +class RDoc::Markup::ToTexInfo < RDoc::Markup::Formatter + + def start_accepting + @text = [] + end + + def end_accepting + @text.join("\n") + end + + def accept_paragraph(attributes, text) + @text << format(text) + end + + def accept_verbatim(attributes, text) + @text << "@verb{|#{format(text)}|}" + end + + def accept_heading(attributes, text) + heading = ['@majorheading', '@chapheading'][text.head_level - 1] || '@heading' + @text << "#{heading} #{format(text)}" + end + + def accept_list_start(attributes, text) + @text << '@itemize @bullet' + end + + def accept_list_end(attributes, text) + @text << '@end itemize' + end + + def accept_list_item(attributes, text) + @text << "@item\n#{format(text)}" + end + + def accept_blank_line(attributes, text) + @text << "\n" + end + + def accept_rule(attributes, text) + @text << '-----' + end + + def format(text) + text.txt. + gsub(/@/, "@@"). + gsub(/\{/, "@{"). + gsub(/\}/, "@}"). + # gsub(/,/, "@,"). # technically only required in cross-refs + gsub(/\+([\w]+)\+/, "@code{\\1}"). + gsub(/\([^<]+)\<\/tt\>/, "@code{\\1}"). + gsub(/\*([\w]+)\*/, "@strong{\\1}"). + gsub(/\([^<]+)\<\/b\>/, "@strong{\\1}"). + gsub(/_([\w]+)_/, "@emph{\\1}"). + gsub(/\([^<]+)\<\/em\>/, "@emph{\\1}") + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/options.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/options.rb new file mode 100644 index 0000000..1d92bd4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/options.rb @@ -0,0 +1,638 @@ +# We handle the parsing of options, and subsequently as a singleton +# object to be queried for option values + +require "rdoc/ri/paths" +require 'optparse' + +class RDoc::Options + + ## + # Should the output be placed into a single file + + attr_reader :all_one_file + + ## + # Character-set + + attr_reader :charset + + ## + # URL of stylesheet + + attr_reader :css + + ## + # Should diagrams be drawn + + attr_reader :diagram + + ## + # Files matching this pattern will be excluded + + attr_accessor :exclude + + ## + # Additional attr_... style method flags + + attr_reader :extra_accessor_flags + + ## + # Pattern for additional attr_... style methods + + attr_accessor :extra_accessors + + ## + # Should we draw fileboxes in diagrams + + attr_reader :fileboxes + + ## + # The list of files to be processed + + attr_accessor :files + + ## + # Scan newer sources than the flag file if true. + + attr_reader :force_update + + ## + # Description of the output generator (set with the -fmt option) + + attr_accessor :generator + + ## + # Formatter to mark up text with + + attr_accessor :formatter + + ## + # image format for diagrams + + attr_reader :image_format + + ## + # Include line numbers in the source listings + + attr_reader :include_line_numbers + + ## + # Should source code be included inline, or displayed in a popup + + attr_accessor :inline_source + + ## + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + + attr_accessor :main_page + + ## + # Merge into classes of the same name when generating ri + + attr_reader :merge + + ## + # The name of the output directory + + attr_accessor :op_dir + + ## + # The name to use for the output + + attr_accessor :op_name + + ## + # Are we promiscuous about showing module contents across multiple files + + attr_reader :promiscuous + + ## + # Array of directories to search for files to satisfy an :include: + + attr_reader :rdoc_include + + ## + # Include private and protected methods in the output + + attr_accessor :show_all + + ## + # Include the '#' at the front of hyperlinked instance method names + + attr_reader :show_hash + + ## + # The number of columns in a tab + + attr_reader :tab_width + + ## + # template to be used when generating output + + attr_reader :template + + ## + # Template class for file generation + #-- + # HACK around dependencies in lib/rdoc/generator/html.rb + + attr_accessor :template_class # :nodoc: + + ## + # Documentation title + + attr_reader :title + + ## + # Verbosity, zero means quiet + + attr_accessor :verbosity + + ## + # URL of web cvs frontend + + attr_reader :webcvs + + def initialize(generators = {}) # :nodoc: + @op_dir = "doc" + @op_name = nil + @show_all = false + @main_page = nil + @merge = false + @exclude = [] + @generators = generators + @generator_name = 'html' + @generator = @generators[@generator_name] + @rdoc_include = [] + @title = nil + @template = nil + @template_class = nil + @diagram = false + @fileboxes = false + @show_hash = false + @image_format = 'png' + @inline_source = false + @all_one_file = false + @tab_width = 8 + @include_line_numbers = false + @extra_accessor_flags = {} + @promiscuous = false + @force_update = false + @verbosity = 1 + + @css = nil + @webcvs = nil + + @charset = 'utf-8' + end + + ## + # Parse command line options. + + def parse(argv) + accessors = [] + + opts = OptionParser.new do |opt| + opt.program_name = File.basename $0 + opt.version = RDoc::VERSION + opt.release = nil + opt.summary_indent = ' ' * 4 + opt.banner = <<-EOF +Usage: #{opt.program_name} [options] [names...] + + Files are parsed, and the information they contain collected, before any + output is produced. This allows cross references between all files to be + resolved. If a name is a directory, it is traversed. If no names are + specified, all Ruby files in the current directory (and subdirectories) are + processed. + + How RDoc generates output depends on the output formatter being used, and on + the options you give. + + - HTML output is normally produced into a number of separate files + (one per class, module, and file, along with various indices). + These files will appear in the directory given by the --op + option (doc/ by default). + + - XML output by default is written to standard output. If a + --opname option is given, the output will instead be written + to a file with that name in the output directory. + + - .chm files (Windows help files) are written in the --op directory. + If an --opname parameter is present, that name is used, otherwise + the file will be called rdoc.chm. + EOF + + opt.separator nil + opt.separator "Options:" + opt.separator nil + + opt.on("--accessor=ACCESSORS", "-A", Array, + "A comma separated list of additional class", + "methods that should be treated like", + "'attr_reader' and friends.", + " ", + "Option may be repeated.", + " ", + "Each accessorname may have '=text'", + "appended, in which case that text appears", + "where the r/w/rw appears for normal.", + "accessors") do |value| + value.each do |accessor| + if accessor =~ /^(\w+)(=(.*))?$/ + accessors << $1 + @extra_accessor_flags[$1] = $3 + end + end + end + + opt.separator nil + + opt.on("--all", "-a", + "Include all methods (not just public) in", + "the output.") do |value| + @show_all = value + end + + opt.separator nil + + opt.on("--charset=CHARSET", "-c", + "Specifies the output HTML character-set.") do |value| + @charset = value + end + + opt.separator nil + + opt.on("--debug", "-D", + "Displays lots on internal stuff.") do |value| + $DEBUG_RDOC = value + end + + opt.separator nil + + opt.on("--diagram", "-d", + "Generate diagrams showing modules and", + "classes. You need dot V1.8.6 or later to", + "use the --diagram option correctly. Dot is", + "available from http://graphviz.org") do |value| + check_diagram + @diagram = true + end + + opt.separator nil + + opt.on("--exclude=PATTERN", "-x", Regexp, + "Do not process files or directories", + "matching PATTERN.") do |value| + @exclude << value + end + + opt.separator nil + + opt.on("--extension=NEW=OLD", "-E", + "Treat files ending with .new as if they", + "ended with .old. Using '-E cgi=rb' will", + "cause xxx.cgi to be parsed as a Ruby file.") do |value| + new, old = value.split(/=/, 2) + + unless new and old then + raise OptionParser::InvalidArgument, "Invalid parameter to '-E'" + end + + unless RDoc::ParserFactory.alias_extension old, new then + raise OptionParser::InvalidArgument, "Unknown extension .#{old} to -E" + end + end + + opt.separator nil + + opt.on("--fileboxes", "-F", + "Classes are put in boxes which represents", + "files, where these classes reside. Classes", + "shared between more than one file are", + "shown with list of files that are sharing", + "them. Silently discarded if --diagram is", + "not given.") do |value| + @fileboxes = value + end + + opt.separator nil + + opt.on("--force-update", "-U", + "Forces rdoc to scan all sources even if", + "newer than the flag file.") do |value| + @force_update = value + end + + opt.separator nil + + opt.on("--fmt=FORMAT", "--format=FORMAT", "-f", @generators.keys, + "Set the output formatter.") do |value| + @generator_name = value.downcase + setup_generator + end + + opt.separator nil + + image_formats = %w[gif png jpg jpeg] + opt.on("--image-format=FORMAT", "-I", image_formats, + "Sets output image format for diagrams. Can", + "be #{image_formats.join ', '}. If this option", + "is omitted, png is used. Requires", + "diagrams.") do |value| + @image_format = value + end + + opt.separator nil + + opt.on("--include=DIRECTORIES", "-i", Array, + "set (or add to) the list of directories to", + "be searched when satisfying :include:", + "requests. Can be used more than once.") do |value| + @rdoc_include.concat value.map { |dir| dir.strip } + end + + opt.separator nil + + opt.on("--inline-source", "-S", + "Show method source code inline, rather than", + "via a popup link.") do |value| + @inline_source = value + end + + opt.separator nil + + opt.on("--line-numbers", "-N", + "Include line numbers in the source code.") do |value| + @include_line_numbers = value + end + + opt.separator nil + + opt.on("--main=NAME", "-m", + "NAME will be the initial page displayed.") do |value| + @main_page = value + end + + opt.separator nil + + opt.on("--merge", "-M", + "When creating ri output, merge previously", + "processed classes into previously", + "documented classes of the same name.") do |value| + @merge = value + end + + opt.separator nil + + opt.on("--one-file", "-1", + "Put all the output into a single file.") do |value| + @all_one_file = value + @inline_source = value if value + @template = 'one_page_html' + end + + opt.separator nil + + opt.on("--op=DIR", "-o", + "Set the output directory.") do |value| + @op_dir = value + end + + opt.separator nil + + opt.on("--opname=NAME", "-n", + "Set the NAME of the output. Has no effect", + "for HTML.") do |value| + @op_name = value + end + + opt.separator nil + + opt.on("--promiscuous", "-p", + "When documenting a file that contains a", + "module or class also defined in other", + "files, show all stuff for that module or", + "class in each files page. By default, only", + "show stuff defined in that particular file.") do |value| + @promiscuous = value + end + + opt.separator nil + + opt.on("--quiet", "-q", + "Don't show progress as we parse.") do |value| + @verbosity = 0 + end + + opt.on("--verbose", "-v", + "Display extra progress as we parse.") do |value| + @verbosity = 2 + end + + + opt.separator nil + + opt.on("--ri", "-r", + "Generate output for use by `ri`. The files", + "are stored in the '.rdoc' directory under", + "your home directory unless overridden by a", + "subsequent --op parameter, so no special", + "privileges are needed.") do |value| + @generator_name = "ri" + @op_dir = RDoc::RI::Paths::HOMEDIR + setup_generator + end + + opt.separator nil + + opt.on("--ri-site", "-R", + "Generate output for use by `ri`. The files", + "are stored in a site-wide directory,", + "making them accessible to others, so", + "special privileges are needed.") do |value| + @generator_name = "ri" + @op_dir = RDoc::RI::Paths::SITEDIR + setup_generator + end + + opt.separator nil + + opt.on("--ri-system", "-Y", + "Generate output for use by `ri`. The files", + "are stored in a site-wide directory,", + "making them accessible to others, so", + "special privileges are needed. This", + "option is intended to be used during Ruby", + "installation.") do |value| + @generator_name = "ri" + @op_dir = RDoc::RI::Paths::SYSDIR + setup_generator + end + + opt.separator nil + + opt.on("--show-hash", "-H", + "A name of the form #name in a comment is a", + "possible hyperlink to an instance method", + "name. When displayed, the '#' is removed", + "unless this option is specified.") do |value| + @show_hash = value + end + + opt.separator nil + + opt.on("--style=URL", "-s", + "Specifies the URL of a separate stylesheet.") do |value| + @css = value + end + + opt.separator nil + + opt.on("--tab-width=WIDTH", "-w", OptionParser::DecimalInteger, + "Set the width of tab characters.") do |value| + @tab_width = value + end + + opt.separator nil + + opt.on("--template=NAME", "-T", + "Set the template used when generating", + "output.") do |value| + @template = value + end + + opt.separator nil + + opt.on("--title=TITLE", "-t", + "Set TITLE as the title for HTML output.") do |value| + @title = value + end + + opt.separator nil + + opt.on("--webcvs=URL", "-W", + "Specify a URL for linking to a web frontend", + "to CVS. If the URL contains a '\%s', the", + "name of the current file will be", + "substituted; if the URL doesn't contain a", + "'\%s', the filename will be appended to it.") do |value| + @webcvs = value + end + end + + argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT'] + + opts.parse! argv + + @files = argv.dup + + @rdoc_include << "." if @rdoc_include.empty? + + if @exclude.empty? then + @exclude = nil + else + @exclude = Regexp.new(@exclude.join("|")) + end + + check_files + + # If no template was specified, use the default template for the output + # formatter + + @template ||= @generator_name + + # Generate a regexp from the accessors + unless accessors.empty? then + re = '^(' + accessors.map { |a| Regexp.quote a }.join('|') + ')$' + @extra_accessors = Regexp.new re + end + + rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e + puts opts + puts + puts e + exit 1 + end + + ## + # Set the title, but only if not already set. This means that a title set + # from the command line trumps one set in a source file + + def title=(string) + @title ||= string + end + + ## + # Don't display progress as we process the files + + def quiet + @verbosity.zero? + end + + def quiet=(bool) + @verbosity = bool ? 0 : 1 + end + + private + + ## + # Set up an output generator for the format in @generator_name + + def setup_generator + @generator = @generators[@generator_name] + + unless @generator then + raise OptionParser::InvalidArgument, "Invalid output formatter" + end + + if @generator_name == "xml" then + @all_one_file = true + @inline_source = true + end + end + + # Check that the right version of 'dot' is available. Unfortunately this + # doesn't work correctly under Windows NT, so we'll bypass the test under + # Windows. + + def check_diagram + return if RUBY_PLATFORM =~ /mswin|cygwin|mingw|bccwin/ + + ok = false + ver = nil + + IO.popen "dot -V 2>&1" do |io| + ver = io.read + if ver =~ /dot.+version(?:\s+gviz)?\s+(\d+)\.(\d+)/ then + ok = ($1.to_i > 1) || ($1.to_i == 1 && $2.to_i >= 8) + end + end + + unless ok then + if ver =~ /^dot.+version/ then + $stderr.puts "Warning: You may need dot V1.8.6 or later to use\n", + "the --diagram option correctly. You have:\n\n ", + ver, + "\nDiagrams might have strange background colors.\n\n" + else + $stderr.puts "You need the 'dot' program to produce diagrams.", + "(see http://www.research.att.com/sw/tools/graphviz/)\n\n" + exit + end + end + end + + ## + # Check that the files on the command line exist + + def check_files + @files.each do |f| + stat = File.stat f + raise RDoc::Error, "file '#{f}' not readable" unless stat.readable? + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser.rb new file mode 100644 index 0000000..6b1233c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser.rb @@ -0,0 +1,142 @@ +require 'rdoc' +require 'rdoc/code_objects' +require 'rdoc/markup/preprocess' +require 'rdoc/stats' + +## +# A parser is simple a class that implements +# +# #initialize(file_name, body, options) +# +# and +# +# #scan +# +# The initialize method takes a file name to be used, the body of the file, +# and an RDoc::Options object. The scan method is then called to return an +# appropriately parsed TopLevel code object. +# +# The ParseFactory is used to redirect to the correct parser given a +# filename extension. This magic works because individual parsers have to +# register themselves with us as they are loaded in. The do this using the +# following incantation +# +# require "rdoc/parser" +# +# class RDoc::Parser::Xyz < RDoc::Parser +# parse_files_matching /\.xyz$/ # <<<< +# +# def initialize(file_name, body, options) +# ... +# end +# +# def scan +# ... +# end +# end +# +# Just to make life interesting, if we suspect a plain text file, we also +# look for a shebang line just in case it's a potential shell script + +class RDoc::Parser + + @parsers = [] + + class << self + attr_reader :parsers + end + + ## + # Alias an extension to another extension. After this call, files ending + # "new_ext" will be parsed using the same parser as "old_ext" + + def self.alias_extension(old_ext, new_ext) + old_ext = old_ext.sub(/^\.(.*)/, '\1') + new_ext = new_ext.sub(/^\.(.*)/, '\1') + + parser = can_parse "xxx.#{old_ext}" + return false unless parser + + RDoc::Parser.parsers.unshift [/\.#{new_ext}$/, parser] + + true + end + + ## + # Shamelessly stolen from the ptools gem (since RDoc cannot depend on + # the gem). + + def self.binary?(file) + s = (File.read(file, File.stat(file).blksize, 0, :mode => "rb") || "").split(//) + + if s.size > 0 then + ((s.size - s.grep(" ".."~").size) / s.size.to_f) > 0.30 + else + false + end + end + private_class_method :binary? + + ## + # Return a parser that can handle a particular extension + + def self.can_parse(file_name) + parser = RDoc::Parser.parsers.find { |regexp,| regexp =~ file_name }.last + + # + # The default parser should *NOT* parse binary files. + # + if parser == RDoc::Parser::Simple then + if binary? file_name then + return nil + end + end + + return parser + end + + ## + # Find the correct parser for a particular file name. Return a SimpleParser + # for ones that we don't know + + def self.for(top_level, file_name, body, options, stats) + # If no extension, look for shebang + if file_name !~ /\.\w+$/ && body =~ %r{\A#!(.+)} then + shebang = $1 + case shebang + when %r{env\s+ruby}, %r{/ruby} + file_name = "dummy.rb" + end + end + + parser = can_parse file_name + + # + # This method must return a parser. + # + if !parser then + parser = RDoc::Parser::Simple + end + + parser.new top_level, file_name, body, options, stats + end + + ## + # Record which file types this parser can understand. + + def self.parse_files_matching(regexp) + RDoc::Parser.parsers.unshift [regexp, self] + end + + def initialize(top_level, file_name, content, options, stats) + @top_level = top_level + @file_name = file_name + @content = content + @options = options + @stats = stats + end + +end + +require 'rdoc/parser/simple' + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser/c.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/c.rb new file mode 100644 index 0000000..933838d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/c.rb @@ -0,0 +1,661 @@ +require 'rdoc/parser' +require 'rdoc/parser/ruby' +require 'rdoc/known_classes' + +## +# We attempt to parse C extension files. Basically we look for +# the standard patterns that you find in extensions: rb_define_class, +# rb_define_method and so on. We also try to find the corresponding +# C source for the methods and extract comments, but if we fail +# we don't worry too much. +# +# The comments associated with a Ruby method are extracted from the C +# comment block associated with the routine that _implements_ that +# method, that is to say the method whose name is given in the +# rb_define_method call. For example, you might write: +# +# /* +# * Returns a new array that is a one-dimensional flattening of this +# * array (recursively). That is, for every element that is an array, +# * extract its elements into the new array. +# * +# * s = [ 1, 2, 3 ] #=> [1, 2, 3] +# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] +# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] +# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +# */ +# static VALUE +# rb_ary_flatten(ary) +# VALUE ary; +# { +# ary = rb_obj_dup(ary); +# rb_ary_flatten_bang(ary); +# return ary; +# } +# +# ... +# +# void +# Init_Array() +# { +# ... +# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); +# +# Here RDoc will determine from the rb_define_method line that there's a +# method called "flatten" in class Array, and will look for the implementation +# in the method rb_ary_flatten. It will then use the comment from that +# method in the HTML output. This method must be in the same source file +# as the rb_define_method. +# +# C classes can be diagrammed (see /tc/dl/ruby/ruby/error.c), and RDoc +# integrates C and Ruby source into one tree +# +# The comment blocks may include special directives: +# +# [Document-class: name] +# This comment block is documentation for the given class. Use this +# when the Init_xxx method is not named after the class. +# +# [Document-method: name] +# This comment documents the named method. Use when RDoc cannot +# automatically find the method from it's declaration +# +# [call-seq: text up to an empty line] +# Because C source doesn't give descripive names to Ruby-level parameters, +# you need to document the calling sequence explicitly +# +# In addition, RDoc assumes by default that the C method implementing a +# Ruby function is in the same source file as the rb_define_method call. +# If this isn't the case, add the comment: +# +# rb_define_method(....); // in: filename +# +# As an example, we might have an extension that defines multiple classes +# in its Init_xxx method. We could document them using +# +# /* +# * Document-class: MyClass +# * +# * Encapsulate the writing and reading of the configuration +# * file. ... +# */ +# +# /* +# * Document-method: read_value +# * +# * call-seq: +# * cfg.read_value(key) -> value +# * cfg.read_value(key} { |key| } -> value +# * +# * Return the value corresponding to +key+ from the configuration. +# * In the second form, if the key isn't found, invoke the +# * block and return its value. +# */ + +class RDoc::Parser::C < RDoc::Parser + + parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/) + + @@enclosure_classes = {} + @@known_bodies = {} + + ## + # Prepare to parse a C file + + def initialize(top_level, file_name, content, options, stats) + super + + @known_classes = RDoc::KNOWN_CLASSES.dup + @content = handle_tab_width handle_ifdefs_in(@content) + @classes = Hash.new + @file_dir = File.dirname(@file_name) + end + + def do_aliases + @content.scan(%r{rb_define_alias\s*\(\s*(\w+),\s*"([^"]+)",\s*"([^"]+)"\s*\)}m) do + |var_name, new_name, old_name| + class_name = @known_classes[var_name] || var_name + class_obj = find_class(var_name, class_name) + + as = class_obj.add_alias RDoc::Alias.new("", old_name, new_name, "") + + @stats.add_alias as + end + end + + def do_classes + @content.scan(/(\w+)\s* = \s*rb_define_module\s*\(\s*"(\w+)"\s*\)/mx) do + |var_name, class_name| + handle_class_module(var_name, "module", class_name, nil, nil) + end + + # The '.' lets us handle SWIG-generated files + @content.scan(/([\w\.]+)\s* = \s*rb_define_class\s* + \( + \s*"(\w+)", + \s*(\w+)\s* + \)/mx) do |var_name, class_name, parent| + handle_class_module(var_name, "class", class_name, parent, nil) + end + + @content.scan(/(\w+)\s*=\s*boot_defclass\s*\(\s*"(\w+?)",\s*(\w+?)\s*\)/) do + |var_name, class_name, parent| + parent = nil if parent == "0" + handle_class_module(var_name, "class", class_name, parent, nil) + end + + @content.scan(/(\w+)\s* = \s*rb_define_module_under\s* + \( + \s*(\w+), + \s*"(\w+)" + \s*\)/mx) do |var_name, in_module, class_name| + handle_class_module(var_name, "module", class_name, nil, in_module) + end + + @content.scan(/([\w\.]+)\s* = \s*rb_define_class_under\s* + \( + \s*(\w+), + \s*"(\w+)", + \s*([\w\*\s\(\)\.\->]+)\s* # for SWIG + \s*\)/mx) do |var_name, in_module, class_name, parent| + handle_class_module(var_name, "class", class_name, parent, in_module) + end + end + + def do_constants + @content.scan(%r{\Wrb_define_ + ( + variable | + readonly_variable | + const | + global_const | + ) + \s*\( + (?:\s*(\w+),)? + \s*"(\w+)", + \s*(.*?)\s*\)\s*; + }xm) do |type, var_name, const_name, definition| + var_name = "rb_cObject" if !var_name or var_name == "rb_mKernel" + handle_constants(type, var_name, const_name, definition) + end + end + + ## + # Look for includes of the form: + # + # rb_include_module(rb_cArray, rb_mEnumerable); + + def do_includes + @content.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c,m| + if cls = @classes[c] + m = @known_classes[m] || m + cls.add_include RDoc::Include.new(m, "") + end + end + end + + def do_methods + @content.scan(%r{rb_define_ + ( + singleton_method | + method | + module_function | + private_method + ) + \s*\(\s*([\w\.]+), + \s*"([^"]+)", + \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?, + \s*(-?\w+)\s*\) + (?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))? + }xm) do + |type, var_name, meth_name, meth_body, param_count, source_file| + + # Ignore top-object and weird struct.c dynamic stuff + next if var_name == "ruby_top_self" + next if var_name == "nstr" + next if var_name == "envtbl" + next if var_name == "argf" # it'd be nice to handle this one + + var_name = "rb_cObject" if var_name == "rb_mKernel" + handle_method(type, var_name, meth_name, + meth_body, param_count, source_file) + end + + @content.scan(%r{rb_define_attr\( + \s*([\w\.]+), + \s*"([^"]+)", + \s*(\d+), + \s*(\d+)\s*\); + }xm) do |var_name, attr_name, attr_reader, attr_writer| + #var_name = "rb_cObject" if var_name == "rb_mKernel" + handle_attr(var_name, attr_name, + attr_reader.to_i != 0, + attr_writer.to_i != 0) + end + + @content.scan(%r{rb_define_global_function\s*\( + \s*"([^"]+)", + \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?, + \s*(-?\w+)\s*\) + (?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))? + }xm) do |meth_name, meth_body, param_count, source_file| + handle_method("method", "rb_mKernel", meth_name, + meth_body, param_count, source_file) + end + + @content.scan(/define_filetest_function\s*\( + \s*"([^"]+)", + \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?, + \s*(-?\w+)\s*\)/xm) do + |meth_name, meth_body, param_count| + + handle_method("method", "rb_mFileTest", meth_name, meth_body, param_count) + handle_method("singleton_method", "rb_cFile", meth_name, meth_body, param_count) + end + end + + def find_attr_comment(attr_name) + if @content =~ %r{((?>/\*.*?\*/\s+)) + rb_define_attr\((?:\s*(\w+),)?\s*"#{attr_name}"\s*,.*?\)\s*;}xmi + $1 + elsif @content =~ %r{Document-attr:\s#{attr_name}\s*?\n((?>.*?\*/))}m + $1 + else + '' + end + end + + ## + # Find the C code corresponding to a Ruby method + + def find_body(class_name, meth_name, meth_obj, body, quiet = false) + case body + when %r"((?>/\*.*?\*/\s*))(?:(?:static|SWIGINTERN)\s+)?(?:intern\s+)?VALUE\s+#{meth_name} + \s*(\([^)]*\))([^;]|$)"xm + comment, params = $1, $2 + body_text = $& + + remove_private_comments(comment) if comment + + # see if we can find the whole body + + re = Regexp.escape(body_text) + '[^(]*^\{.*?^\}' + body_text = $& if /#{re}/m =~ body + + # The comment block may have been overridden with a 'Document-method' + # block. This happens in the interpreter when multiple methods are + # vectored through to the same C method but those methods are logically + # distinct (for example Kernel.hash and Kernel.object_id share the same + # implementation + + override_comment = find_override_comment(class_name, meth_obj.name) + comment = override_comment if override_comment + + find_modifiers(comment, meth_obj) if comment + +# meth_obj.params = params + meth_obj.start_collecting_tokens + meth_obj.add_token(RDoc::RubyToken::Token.new(1,1).set_text(body_text)) + meth_obj.comment = mangle_comment(comment) + when %r{((?>/\*.*?\*/\s*))^\s*\#\s*define\s+#{meth_name}\s+(\w+)}m + comment = $1 + find_body(class_name, $2, meth_obj, body, true) + find_modifiers(comment, meth_obj) + meth_obj.comment = mangle_comment(comment) + meth_obj.comment + when %r{^\s*\#\s*define\s+#{meth_name}\s+(\w+)}m + unless find_body(class_name, $1, meth_obj, body, true) + warn "No definition for #{meth_name}" unless @options.quiet + return false + end + else + + # No body, but might still have an override comment + comment = find_override_comment(class_name, meth_obj.name) + + if comment + find_modifiers(comment, meth_obj) + meth_obj.comment = mangle_comment(comment) + else + warn "No definition for #{meth_name}" unless @options.quiet + return false + end + end + true + end + + def find_class(raw_name, name) + unless @classes[raw_name] + if raw_name =~ /^rb_m/ + container = @top_level.add_module RDoc::NormalModule, name + else + container = @top_level.add_class RDoc::NormalClass, name, nil + end + + container.record_location @top_level + @classes[raw_name] = container + end + @classes[raw_name] + end + + ## + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + + def find_class_comment(class_name, class_meth) + comment = nil + if @content =~ %r{((?>/\*.*?\*/\s+)) + (static\s+)?void\s+Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)\)}xmi then + comment = $1 + elsif @content =~ %r{Document-(?:class|module):\s#{class_name}\s*?(?:<\s+[:,\w]+)?\n((?>.*?\*/))}m + comment = $1 + else + if @content =~ /rb_define_(class|module)/m then + class_name = class_name.split("::").last + comments = [] + @content.split(/(\/\*.*?\*\/)\s*?\n/m).each_with_index do |chunk, index| + comments[index] = chunk + if chunk =~ /rb_define_(class|module).*?"(#{class_name})"/m then + comment = comments[index-1] + break + end + end + end + end + class_meth.comment = mangle_comment(comment) if comment + end + + ## + # Finds a comment matching +type+ and +const_name+ either above the + # comment or in the matching Document- section. + + def find_const_comment(type, const_name) + if @content =~ %r{((?>^\s*/\*.*?\*/\s+)) + rb_define_#{type}\((?:\s*(\w+),)?\s*"#{const_name}"\s*,.*?\)\s*;}xmi + $1 + elsif @content =~ %r{Document-(?:const|global|variable):\s#{const_name}\s*?\n((?>.*?\*/))}m + $1 + else + '' + end + end + + ## + # If the comment block contains a section that looks like: + # + # call-seq: + # Array.new + # Array.new(10) + # + # use it for the parameters. + + def find_modifiers(comment, meth_obj) + if comment.sub!(/:nodoc:\s*^\s*\*?\s*$/m, '') or + comment.sub!(/\A\/\*\s*:nodoc:\s*\*\/\Z/, '') + meth_obj.document_self = false + end + if comment.sub!(/call-seq:(.*?)^\s*\*?\s*$/m, '') or + comment.sub!(/\A\/\*\s*call-seq:(.*?)\*\/\Z/, '') + seq = $1 + seq.gsub!(/^\s*\*\s*/, '') + meth_obj.call_seq = seq + end + end + + def find_override_comment(class_name, meth_name) + name = Regexp.escape(meth_name) + if @content =~ %r{Document-method:\s+#{class_name}(?:\.|::|#)#{name}\s*?\n((?>.*?\*/))}m then + $1 + elsif @content =~ %r{Document-method:\s#{name}\s*?\n((?>.*?\*/))}m then + $1 + end + end + + def handle_attr(var_name, attr_name, reader, writer) + rw = '' + if reader + #@stats.num_methods += 1 + rw << 'R' + end + if writer + #@stats.num_methods += 1 + rw << 'W' + end + + class_name = @known_classes[var_name] + + return unless class_name + + class_obj = find_class(var_name, class_name) + + if class_obj + comment = find_attr_comment(attr_name) + unless comment.empty? + comment = mangle_comment(comment) + end + att = RDoc::Attr.new '', attr_name, rw, comment + class_obj.add_attribute(att) + end + end + + def handle_class_module(var_name, class_mod, class_name, parent, in_module) + parent_name = @known_classes[parent] || parent + + if in_module + enclosure = @classes[in_module] || @@enclosure_classes[in_module] + unless enclosure + if enclosure = @known_classes[in_module] + handle_class_module(in_module, (/^rb_m/ =~ in_module ? "module" : "class"), + enclosure, nil, nil) + enclosure = @classes[in_module] + end + end + unless enclosure + warn("Enclosing class/module '#{in_module}' for " + + "#{class_mod} #{class_name} not known") + return + end + else + enclosure = @top_level + end + + if class_mod == "class" then + full_name = enclosure.full_name.to_s + "::#{class_name}" + if @content =~ %r{Document-class:\s+#{full_name}\s*<\s+([:,\w]+)} then + parent_name = $1 + end + cm = enclosure.add_class RDoc::NormalClass, class_name, parent_name + @stats.add_class cm + else + cm = enclosure.add_module RDoc::NormalModule, class_name + @stats.add_module cm + end + + cm.record_location(enclosure.toplevel) + + find_class_comment(cm.full_name, cm) + @classes[var_name] = cm + @@enclosure_classes[var_name] = cm + @known_classes[var_name] = cm.full_name + end + + ## + # Adds constant comments. By providing some_value: at the start ofthe + # comment you can override the C value of the comment to give a friendly + # definition. + # + # /* 300: The perfect score in bowling */ + # rb_define_const(cFoo, "PERFECT", INT2FIX(300); + # + # Will override +INT2FIX(300)+ with the value +300+ in the output RDoc. + # Values may include quotes and escaped colons (\:). + + def handle_constants(type, var_name, const_name, definition) + #@stats.num_constants += 1 + class_name = @known_classes[var_name] + + return unless class_name + + class_obj = find_class(var_name, class_name) + + unless class_obj + warn("Enclosing class/module '#{const_name}' for not known") + return + end + + comment = find_const_comment(type, const_name) + + # In the case of rb_define_const, the definition and comment are in + # "/* definition: comment */" form. The literal ':' and '\' characters + # can be escaped with a backslash. + if type.downcase == 'const' then + elements = mangle_comment(comment).split(':') + if elements.nil? or elements.empty? then + con = RDoc::Constant.new(const_name, definition, + mangle_comment(comment)) + else + new_definition = elements[0..-2].join(':') + if new_definition.empty? then # Default to literal C definition + new_definition = definition + else + new_definition.gsub!("\:", ":") + new_definition.gsub!("\\", '\\') + end + new_definition.sub!(/\A(\s+)/, '') + new_comment = $1.nil? ? elements.last : "#{$1}#{elements.last.lstrip}" + con = RDoc::Constant.new(const_name, new_definition, + mangle_comment(new_comment)) + end + else + con = RDoc::Constant.new const_name, definition, mangle_comment(comment) + end + + class_obj.add_constant(con) + end + + ## + # Removes #ifdefs that would otherwise confuse us + + def handle_ifdefs_in(body) + body.gsub(/^#ifdef HAVE_PROTOTYPES.*?#else.*?\n(.*?)#endif.*?\n/m, '\1') + end + + def handle_method(type, var_name, meth_name, meth_body, param_count, + source_file = nil) + class_name = @known_classes[var_name] + + return unless class_name + + class_obj = find_class var_name, class_name + + if class_obj then + if meth_name == "initialize" then + meth_name = "new" + type = "singleton_method" + end + + meth_obj = RDoc::AnyMethod.new '', meth_name + meth_obj.singleton = %w[singleton_method module_function].include? type + + p_count = (Integer(param_count) rescue -1) + + if p_count < 0 + meth_obj.params = "(...)" + elsif p_count == 0 + meth_obj.params = "()" + else + meth_obj.params = "(" + (1..p_count).map{|i| "p#{i}"}.join(", ") + ")" + end + + if source_file then + file_name = File.join(@file_dir, source_file) + body = (@@known_bodies[source_file] ||= File.read(file_name)) + else + body = @content + end + + if find_body(class_name, meth_body, meth_obj, body) and meth_obj.document_self then + class_obj.add_method meth_obj + @stats.add_method meth_obj + end + end + end + + def handle_tab_width(body) + if /\t/ =~ body + tab_width = @options.tab_width + body.split(/\n/).map do |line| + 1 while line.gsub!(/\t+/) { ' ' * (tab_width*$&.length - $`.length % tab_width)} && $~ #` + line + end .join("\n") + else + body + end + end + + ## + # Remove the /*'s and leading asterisks from C comments + + def mangle_comment(comment) + comment.sub!(%r{/\*+}) { " " * $&.length } + comment.sub!(%r{\*+/}) { " " * $&.length } + comment.gsub!(/^[ \t]*\*/m) { " " * $&.length } + comment + end + + ## + # Removes lines that are commented out that might otherwise get picked up + # when scanning for classes and methods + + def remove_commented_out_lines + @content.gsub!(%r{//.*rb_define_}, '//') + end + + def remove_private_comments(comment) + comment.gsub!(/\/?\*--\n(.*?)\/?\*\+\+/m, '') + comment.sub!(/\/?\*--\n.*/m, '') + end + + ## + # Extract the classes/modules and methods from a C file and return the + # corresponding top-level object + + def scan + remove_commented_out_lines + do_classes + do_constants + do_methods + do_includes + do_aliases + @top_level + end + + def warn(msg) + $stderr.puts + $stderr.puts msg + $stderr.flush + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser/f95.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/f95.rb new file mode 100644 index 0000000..fd372b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/f95.rb @@ -0,0 +1,1835 @@ +require 'rdoc/parser' + +## +# = Fortran95 RDoc Parser +# +# == Overview +# +# This parser parses Fortran95 files with suffixes "f90", "F90", "f95" and +# "F95". Fortran95 files are expected to be conformed to Fortran95 standards. +# +# == Rules +# +# Fundamental rules are same as that of the Ruby parser. But comment markers +# are '!' not '#'. +# +# === Correspondence between RDoc documentation and Fortran95 programs +# +# F95 parses main programs, modules, subroutines, functions, derived-types, +# public variables, public constants, defined operators and defined +# assignments. These components are described in items of RDoc documentation, +# as follows. +# +# Files :: Files (same as Ruby) +# Classes:: Modules +# Methods:: Subroutines, functions, variables, constants, derived-types, +# defined operators, defined assignments +# Required files:: Files in which imported modules, external subroutines and +# external functions are defined. +# Included Modules:: List of imported modules +# Attributes:: List of derived-types, List of imported modules all of whose +# components are published again +# +# Components listed in 'Methods' (subroutines, functions, ...) defined in +# modules are described in the item of 'Classes'. On the other hand, +# components defined in main programs or as external procedures are described +# in the item of 'Files'. +# +# === Components parsed by default +# +# By default, documentation on public components (subroutines, functions, +# variables, constants, derived-types, defined operators, defined assignments) +# are generated. +# +# With "--all" option, documentation on all components are generated (almost +# same as the Ruby parser). +# +# === Information parsed automatically +# +# The following information is automatically parsed. +# +# * Types of arguments +# * Types of variables and constants +# * Types of variables in the derived types, and initial values +# * NAMELISTs and types of variables in them, and initial values +# +# Aliases by interface statement are described in the item of 'Methods'. +# +# Components which are imported from other modules and published again are +# described in the item of 'Methods'. +# +# === Format of comment blocks +# +# Comment blocks should be written as follows. +# +# Comment blocks are considered to be ended when the line without '!' appears. +# +# The indentation is not necessary. +# +# ! (Top of file) +# ! +# ! Comment blocks for the files. +# ! +# !-- +# ! The comment described in the part enclosed by +# ! "!--" and "!++" is ignored. +# !++ +# ! +# module hogehoge +# ! +# ! Comment blocks for the modules (or the programs). +# ! +# +# private +# +# logical :: a ! a private variable +# real, public :: b ! a public variable +# integer, parameter :: c = 0 ! a public constant +# +# public :: c +# public :: MULTI_ARRAY +# public :: hoge, foo +# +# type MULTI_ARRAY +# ! +# ! Comment blocks for the derived-types. +# ! +# real, pointer :: var(:) =>null() ! Comments block for the variables. +# integer :: num = 0 +# end type MULTI_ARRAY +# +# contains +# +# subroutine hoge( in, & ! Comment blocks between continuation lines are ignored. +# & out ) +# ! +# ! Comment blocks for the subroutines or functions +# ! +# character(*),intent(in):: in ! Comment blocks for the arguments. +# character(*),intent(out),allocatable,target :: in +# ! Comment blocks can be +# ! written under Fortran statements. +# +# character(32) :: file ! This comment parsed as a variable in below NAMELIST. +# integer :: id +# +# namelist /varinfo_nml/ file, id +# ! +# ! Comment blocks for the NAMELISTs. +# ! Information about variables are described above. +# ! +# +# .... +# +# end subroutine hoge +# +# integer function foo( in ) +# ! +# ! This part is considered as comment block. +# +# ! Comment blocks under blank lines are ignored. +# ! +# integer, intent(in):: inA ! This part is considered as comment block. +# +# ! This part is ignored. +# +# end function foo +# +# subroutine hide( in, & +# & out ) !:nodoc: +# ! +# ! If "!:nodoc:" is described at end-of-line in subroutine +# ! statement as above, the subroutine is ignored. +# ! This assignment can be used to modules, subroutines, +# ! functions, variables, constants, derived-types, +# ! defined operators, defined assignments, +# ! list of imported modules ("use" statement). +# ! +# +# .... +# +# end subroutine hide +# +# end module hogehoge + +class RDoc::Parser::F95 < RDoc::Parser + + parse_files_matching(/\.((f|F)9(0|5)|F)$/) + + class Token + + NO_TEXT = "??".freeze + + def initialize(line_no, char_no) + @line_no = line_no + @char_no = char_no + @text = NO_TEXT + end + # Because we're used in contexts that expect to return a token, + # we set the text string and then return ourselves + def set_text(text) + @text = text + self + end + + attr_reader :line_no, :char_no, :text + + end + + @@external_aliases = [] + @@public_methods = [] + + ## + # "false":: Comments are below source code + # "true" :: Comments are upper source code + + COMMENTS_ARE_UPPER = false + + ## + # Internal alias message + + INTERNAL_ALIAS_MES = "Alias for" + + ## + # External alias message + + EXTERNAL_ALIAS_MES = "The entity is" + + ## + # Define code constructs + + def scan + # remove private comment + remaining_code = remove_private_comments(@content) + + # continuation lines are united to one line + remaining_code = united_to_one_line(remaining_code) + + # semicolons are replaced to line feed + remaining_code = semicolon_to_linefeed(remaining_code) + + # collect comment for file entity + whole_comment, remaining_code = collect_first_comment(remaining_code) + @top_level.comment = whole_comment + + # String "remaining_code" is converted to Array "remaining_lines" + remaining_lines = remaining_code.split("\n") + + # "module" or "program" parts are parsed (new) + # + level_depth = 0 + block_searching_flag = nil + block_searching_lines = [] + pre_comment = [] + module_program_trailing = "" + module_program_name = "" + other_block_level_depth = 0 + other_block_searching_flag = nil + remaining_lines.collect!{|line| + if !block_searching_flag && !other_block_searching_flag + if line =~ /^\s*?module\s+(\w+)\s*?(!.*?)?$/i + block_searching_flag = :module + block_searching_lines << line + module_program_name = $1 + module_program_trailing = find_comments($2) + next false + elsif line =~ /^\s*?program\s+(\w+)\s*?(!.*?)?$/i || + line =~ /^\s*?\w/ && !block_start?(line) + block_searching_flag = :program + block_searching_lines << line + module_program_name = $1 || "" + module_program_trailing = find_comments($2) + next false + + elsif block_start?(line) + other_block_searching_flag = true + next line + + elsif line =~ /^\s*?!\s?(.*)/ + pre_comment << line + next line + else + pre_comment = [] + next line + end + elsif other_block_searching_flag + other_block_level_depth += 1 if block_start?(line) + other_block_level_depth -= 1 if block_end?(line) + if other_block_level_depth < 0 + other_block_level_depth = 0 + other_block_searching_flag = nil + end + next line + end + + block_searching_lines << line + level_depth += 1 if block_start?(line) + level_depth -= 1 if block_end?(line) + if level_depth >= 0 + next false + end + + # "module_program_code" is formatted. + # ":nodoc:" flag is checked. + # + module_program_code = block_searching_lines.join("\n") + module_program_code = remove_empty_head_lines(module_program_code) + if module_program_trailing =~ /^:nodoc:/ + # next loop to search next block + level_depth = 0 + block_searching_flag = false + block_searching_lines = [] + pre_comment = [] + next false + end + + # NormalClass is created, and added to @top_level + # + if block_searching_flag == :module + module_name = module_program_name + module_code = module_program_code + module_trailing = module_program_trailing + + f9x_module = @top_level.add_module NormalClass, module_name + f9x_module.record_location @top_level + + @stats.add_module f9x_module + + f9x_comment = COMMENTS_ARE_UPPER ? + find_comments(pre_comment.join("\n")) + "\n" + module_trailing : + module_trailing + "\n" + find_comments(module_code.sub(/^.*$\n/i, '')) + f9x_module.comment = f9x_comment + parse_program_or_module(f9x_module, module_code) + + TopLevel.all_files.each do |name, toplevel| + if toplevel.include_includes?(module_name, @options.ignore_case) + if !toplevel.include_requires?(@file_name, @options.ignore_case) + toplevel.add_require(Require.new(@file_name, "")) + end + end + toplevel.each_classmodule{|m| + if m.include_includes?(module_name, @options.ignore_case) + if !m.include_requires?(@file_name, @options.ignore_case) + m.add_require(Require.new(@file_name, "")) + end + end + } + end + elsif block_searching_flag == :program + program_name = module_program_name + program_code = module_program_code + program_trailing = module_program_trailing + # progress "p" # HACK what stats thingy does this correspond to? + program_comment = COMMENTS_ARE_UPPER ? + find_comments(pre_comment.join("\n")) + "\n" + program_trailing : + program_trailing + "\n" + find_comments(program_code.sub(/^.*$\n/i, '')) + program_comment = "\n\n= Program #{program_name}\n\n" \ + + program_comment + @top_level.comment << program_comment + parse_program_or_module(@top_level, program_code, :private) + end + + # next loop to search next block + level_depth = 0 + block_searching_flag = false + block_searching_lines = [] + pre_comment = [] + next false + } + + remaining_lines.delete_if{ |line| + line == false + } + + # External subprograms and functions are parsed + # + parse_program_or_module(@top_level, remaining_lines.join("\n"), + :public, true) + + @top_level + end # End of scan + + private + + def parse_program_or_module(container, code, + visibility=:public, external=nil) + return unless container + return unless code + remaining_lines = code.split("\n") + remaining_code = "#{code}" + + # + # Parse variables before "contains" in module + # + level_depth = 0 + before_contains_lines = [] + before_contains_code = nil + before_contains_flag = nil + remaining_lines.each{ |line| + if !before_contains_flag + if line =~ /^\s*?module\s+\w+\s*?(!.*?)?$/i + before_contains_flag = true + end + else + break if line =~ /^\s*?contains\s*?(!.*?)?$/i + level_depth += 1 if block_start?(line) + level_depth -= 1 if block_end?(line) + break if level_depth < 0 + before_contains_lines << line + end + } + before_contains_code = before_contains_lines.join("\n") + if before_contains_code + before_contains_code.gsub!(/^\s*?interface\s+.*?\s+end\s+interface.*?$/im, "") + before_contains_code.gsub!(/^\s*?type[\s\,]+.*?\s+end\s+type.*?$/im, "") + end + + # + # Parse global "use" + # + use_check_code = "#{before_contains_code}" + cascaded_modules_list = [] + while use_check_code =~ /^\s*?use\s+(\w+)(.*?)(!.*?)?$/i + use_check_code = $~.pre_match + use_check_code << $~.post_match + used_mod_name = $1.strip.chomp + used_list = $2 || "" + used_trailing = $3 || "" + next if used_trailing =~ /!:nodoc:/ + if !container.include_includes?(used_mod_name, @options.ignore_case) + # progress "." # HACK what stats thingy does this correspond to? + container.add_include Include.new(used_mod_name, "") + end + if ! (used_list =~ /\,\s*?only\s*?:/i ) + cascaded_modules_list << "\#" + used_mod_name + end + end + + # + # Parse public and private, and store information. + # This information is used when "add_method" and + # "set_visibility_for" are called. + # + visibility_default, visibility_info = + parse_visibility(remaining_lines.join("\n"), visibility, container) + @@public_methods.concat visibility_info + if visibility_default == :public + if !cascaded_modules_list.empty? + cascaded_modules = + Attr.new("Cascaded Modules", + "Imported modules all of whose components are published again", + "", + cascaded_modules_list.join(", ")) + container.add_attribute(cascaded_modules) + end + end + + # + # Check rename elements + # + use_check_code = "#{before_contains_code}" + while use_check_code =~ /^\s*?use\s+(\w+)\s*?\,(.+)$/i + use_check_code = $~.pre_match + use_check_code << $~.post_match + used_mod_name = $1.strip.chomp + used_elements = $2.sub(/\s*?only\s*?:\s*?/i, '') + used_elements.split(",").each{ |used| + if /\s*?(\w+)\s*?=>\s*?(\w+)\s*?/ =~ used + local = $1 + org = $2 + @@public_methods.collect!{ |pub_meth| + if local == pub_meth["name"] || + local.upcase == pub_meth["name"].upcase && + @options.ignore_case + pub_meth["name"] = org + pub_meth["local_name"] = local + end + pub_meth + } + end + } + end + + # + # Parse private "use" + # + use_check_code = remaining_lines.join("\n") + while use_check_code =~ /^\s*?use\s+(\w+)(.*?)(!.*?)?$/i + use_check_code = $~.pre_match + use_check_code << $~.post_match + used_mod_name = $1.strip.chomp + used_trailing = $3 || "" + next if used_trailing =~ /!:nodoc:/ + if !container.include_includes?(used_mod_name, @options.ignore_case) + # progress "." # HACK what stats thingy does this correspond to? + container.add_include Include.new(used_mod_name, "") + end + end + + container.each_includes{ |inc| + TopLevel.all_files.each do |name, toplevel| + indicated_mod = toplevel.find_symbol(inc.name, + nil, @options.ignore_case) + if indicated_mod + indicated_name = indicated_mod.parent.file_relative_name + if !container.include_requires?(indicated_name, @options.ignore_case) + container.add_require(Require.new(indicated_name, "")) + end + break + end + end + } + + # + # Parse derived-types definitions + # + derived_types_comment = "" + remaining_code = remaining_lines.join("\n") + while remaining_code =~ /^\s*? + type[\s\,]+(public|private)?\s*?(::)?\s*? + (\w+)\s*?(!.*?)?$ + (.*?) + ^\s*?end\s+type.*?$ + /imx + remaining_code = $~.pre_match + remaining_code << $~.post_match + typename = $3.chomp.strip + type_elements = $5 || "" + type_code = remove_empty_head_lines($&) + type_trailing = find_comments($4) + next if type_trailing =~ /^:nodoc:/ + type_visibility = $1 + type_comment = COMMENTS_ARE_UPPER ? + find_comments($~.pre_match) + "\n" + type_trailing : + type_trailing + "\n" + find_comments(type_code.sub(/^.*$\n/i, '')) + type_element_visibility_public = true + type_code.split("\n").each{ |line| + if /^\s*?private\s*?$/ =~ line + type_element_visibility_public = nil + break + end + } if type_code + + args_comment = "" + type_args_info = nil + + if @options.show_all + args_comment = find_arguments(nil, type_code, true) + else + type_public_args_list = [] + type_args_info = definition_info(type_code) + type_args_info.each{ |arg| + arg_is_public = type_element_visibility_public + arg_is_public = true if arg.include_attr?("public") + arg_is_public = nil if arg.include_attr?("private") + type_public_args_list << arg.varname if arg_is_public + } + args_comment = find_arguments(type_public_args_list, type_code) + end + + type = AnyMethod.new("type #{typename}", typename) + type.singleton = false + type.params = "" + type.comment = " Derived Type :: \n" + type.comment << args_comment if args_comment + type.comment << type_comment if type_comment + + @stats.add_method type + + container.add_method type + + set_visibility(container, typename, visibility_default, @@public_methods) + + if type_visibility + type_visibility.gsub!(/\s/,'') + type_visibility.gsub!(/\,/,'') + type_visibility.gsub!(/:/,'') + type_visibility.downcase! + if type_visibility == "public" + container.set_visibility_for([typename], :public) + elsif type_visibility == "private" + container.set_visibility_for([typename], :private) + end + end + + check_public_methods(type, container.name) + + if @options.show_all + derived_types_comment << ", " unless derived_types_comment.empty? + derived_types_comment << typename + else + if type.visibility == :public + derived_types_comment << ", " unless derived_types_comment.empty? + derived_types_comment << typename + end + end + + end + + if !derived_types_comment.empty? + derived_types_table = + Attr.new("Derived Types", "Derived_Types", "", + derived_types_comment) + container.add_attribute(derived_types_table) + end + + # + # move interface scope + # + interface_code = "" + while remaining_code =~ /^\s*? + interface( + \s+\w+ | + \s+operator\s*?\(.*?\) | + \s+assignment\s*?\(\s*?=\s*?\) + )?\s*?$ + (.*?) + ^\s*?end\s+interface.*?$ + /imx + interface_code << remove_empty_head_lines($&) + "\n" + remaining_code = $~.pre_match + remaining_code << $~.post_match + end + + # + # Parse global constants or variables in modules + # + const_var_defs = definition_info(before_contains_code) + const_var_defs.each{|defitem| + next if defitem.nodoc + const_or_var_type = "Variable" + const_or_var_progress = "v" + if defitem.include_attr?("parameter") + const_or_var_type = "Constant" + const_or_var_progress = "c" + end + const_or_var = AnyMethod.new(const_or_var_type, defitem.varname) + const_or_var.singleton = false + const_or_var.params = "" + self_comment = find_arguments([defitem.varname], before_contains_code) + const_or_var.comment = "" + const_or_var_type + " :: \n" + const_or_var.comment << self_comment if self_comment + + @stats.add_method const_or_var_progress + + container.add_method const_or_var + + set_visibility(container, defitem.varname, visibility_default, @@public_methods) + + if defitem.include_attr?("public") + container.set_visibility_for([defitem.varname], :public) + elsif defitem.include_attr?("private") + container.set_visibility_for([defitem.varname], :private) + end + + check_public_methods(const_or_var, container.name) + + } if const_var_defs + + remaining_lines = remaining_code.split("\n") + + # "subroutine" or "function" parts are parsed (new) + # + level_depth = 0 + block_searching_flag = nil + block_searching_lines = [] + pre_comment = [] + procedure_trailing = "" + procedure_name = "" + procedure_params = "" + procedure_prefix = "" + procedure_result_arg = "" + procedure_type = "" + contains_lines = [] + contains_flag = nil + remaining_lines.collect!{|line| + if !block_searching_flag + # subroutine + if line =~ /^\s*? + (recursive|pure|elemental)?\s*? + subroutine\s+(\w+)\s*?(\(.*?\))?\s*?(!.*?)?$ + /ix + block_searching_flag = :subroutine + block_searching_lines << line + + procedure_name = $2.chomp.strip + procedure_params = $3 || "" + procedure_prefix = $1 || "" + procedure_trailing = $4 || "!" + next false + + # function + elsif line =~ /^\s*? + (recursive|pure|elemental)?\s*? + ( + character\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | type\s*?\([\w\s]+?\)\s+ + | integer\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | real\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | double\s+precision\s+ + | logical\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | complex\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + )? + function\s+(\w+)\s*? + (\(.*?\))?(\s+result\((.*?)\))?\s*?(!.*?)?$ + /ix + block_searching_flag = :function + block_searching_lines << line + + procedure_prefix = $1 || "" + procedure_type = $2 ? $2.chomp.strip : nil + procedure_name = $8.chomp.strip + procedure_params = $9 || "" + procedure_result_arg = $11 ? $11.chomp.strip : procedure_name + procedure_trailing = $12 || "!" + next false + elsif line =~ /^\s*?!\s?(.*)/ + pre_comment << line + next line + else + pre_comment = [] + next line + end + end + contains_flag = true if line =~ /^\s*?contains\s*?(!.*?)?$/ + block_searching_lines << line + contains_lines << line if contains_flag + + level_depth += 1 if block_start?(line) + level_depth -= 1 if block_end?(line) + if level_depth >= 0 + next false + end + + # "procedure_code" is formatted. + # ":nodoc:" flag is checked. + # + procedure_code = block_searching_lines.join("\n") + procedure_code = remove_empty_head_lines(procedure_code) + if procedure_trailing =~ /^!:nodoc:/ + # next loop to search next block + level_depth = 0 + block_searching_flag = nil + block_searching_lines = [] + pre_comment = [] + procedure_trailing = "" + procedure_name = "" + procedure_params = "" + procedure_prefix = "" + procedure_result_arg = "" + procedure_type = "" + contains_lines = [] + contains_flag = nil + next false + end + + # AnyMethod is created, and added to container + # + subroutine_function = nil + if block_searching_flag == :subroutine + subroutine_prefix = procedure_prefix + subroutine_name = procedure_name + subroutine_params = procedure_params + subroutine_trailing = procedure_trailing + subroutine_code = procedure_code + + subroutine_comment = COMMENTS_ARE_UPPER ? + pre_comment.join("\n") + "\n" + subroutine_trailing : + subroutine_trailing + "\n" + subroutine_code.sub(/^.*$\n/i, '') + subroutine = AnyMethod.new("subroutine", subroutine_name) + parse_subprogram(subroutine, subroutine_params, + subroutine_comment, subroutine_code, + before_contains_code, nil, subroutine_prefix) + + @stats.add_method subroutine + + container.add_method subroutine + subroutine_function = subroutine + + elsif block_searching_flag == :function + function_prefix = procedure_prefix + function_type = procedure_type + function_name = procedure_name + function_params_org = procedure_params + function_result_arg = procedure_result_arg + function_trailing = procedure_trailing + function_code_org = procedure_code + + function_comment = COMMENTS_ARE_UPPER ? + pre_comment.join("\n") + "\n" + function_trailing : + function_trailing + "\n " + function_code_org.sub(/^.*$\n/i, '') + + function_code = "#{function_code_org}" + if function_type + function_code << "\n" + function_type + " :: " + function_result_arg + end + + function_params = + function_params_org.sub(/^\(/, "\(#{function_result_arg}, ") + + function = AnyMethod.new("function", function_name) + parse_subprogram(function, function_params, + function_comment, function_code, + before_contains_code, true, function_prefix) + + # Specific modification due to function + function.params.sub!(/\(\s*?#{function_result_arg}\s*?,\s*?/, "\( ") + function.params << " result(" + function_result_arg + ")" + function.start_collecting_tokens + function.add_token Token.new(1,1).set_text(function_code_org) + + @stats.add_method function + + container.add_method function + subroutine_function = function + + end + + # The visibility of procedure is specified + # + set_visibility(container, procedure_name, + visibility_default, @@public_methods) + + # The alias for this procedure from external modules + # + check_external_aliases(procedure_name, + subroutine_function.params, + subroutine_function.comment, subroutine_function) if external + check_public_methods(subroutine_function, container.name) + + + # contains_lines are parsed as private procedures + if contains_flag + parse_program_or_module(container, + contains_lines.join("\n"), :private) + end + + # next loop to search next block + level_depth = 0 + block_searching_flag = nil + block_searching_lines = [] + pre_comment = [] + procedure_trailing = "" + procedure_name = "" + procedure_params = "" + procedure_prefix = "" + procedure_result_arg = "" + contains_lines = [] + contains_flag = nil + next false + } # End of remaining_lines.collect!{|line| + + # Array remains_lines is converted to String remains_code again + # + remaining_code = remaining_lines.join("\n") + + # + # Parse interface + # + interface_scope = false + generic_name = "" + interface_code.split("\n").each{ |line| + if /^\s*? + interface( + \s+\w+| + \s+operator\s*?\(.*?\)| + \s+assignment\s*?\(\s*?=\s*?\) + )? + \s*?(!.*?)?$ + /ix =~ line + generic_name = $1 ? $1.strip.chomp : nil + interface_trailing = $2 || "!" + interface_scope = true + interface_scope = false if interface_trailing =~ /!:nodoc:/ +# if generic_name =~ /operator\s*?\((.*?)\)/i +# operator_name = $1 +# if operator_name && !operator_name.empty? +# generic_name = "#{operator_name}" +# end +# end +# if generic_name =~ /assignment\s*?\((.*?)\)/i +# assignment_name = $1 +# if assignment_name && !assignment_name.empty? +# generic_name = "#{assignment_name}" +# end +# end + end + if /^\s*?end\s+interface/i =~ line + interface_scope = false + generic_name = nil + end + # internal alias + if interface_scope && /^\s*?module\s+procedure\s+(.*?)(!.*?)?$/i =~ line + procedures = $1.strip.chomp + procedures_trailing = $2 || "!" + next if procedures_trailing =~ /!:nodoc:/ + procedures.split(",").each{ |proc| + proc.strip! + proc.chomp! + next if generic_name == proc || !generic_name + old_meth = container.find_symbol(proc, nil, @options.ignore_case) + next if !old_meth + nolink = old_meth.visibility == :private ? true : nil + nolink = nil if @options.show_all + new_meth = + initialize_external_method(generic_name, proc, + old_meth.params, nil, + old_meth.comment, + old_meth.clone.token_stream[0].text, + true, nolink) + new_meth.singleton = old_meth.singleton + + @stats.add_method new_meth + + container.add_method new_meth + + set_visibility(container, generic_name, visibility_default, @@public_methods) + + check_public_methods(new_meth, container.name) + + } + end + + # external aliases + if interface_scope + # subroutine + proc = nil + params = nil + procedures_trailing = nil + if line =~ /^\s*? + (recursive|pure|elemental)?\s*? + subroutine\s+(\w+)\s*?(\(.*?\))?\s*?(!.*?)?$ + /ix + proc = $2.chomp.strip + generic_name = proc unless generic_name + params = $3 || "" + procedures_trailing = $4 || "!" + + # function + elsif line =~ /^\s*? + (recursive|pure|elemental)?\s*? + ( + character\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | type\s*?\([\w\s]+?\)\s+ + | integer\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | real\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | double\s+precision\s+ + | logical\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | complex\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + )? + function\s+(\w+)\s*? + (\(.*?\))?(\s+result\((.*?)\))?\s*?(!.*?)?$ + /ix + proc = $8.chomp.strip + generic_name = proc unless generic_name + params = $9 || "" + procedures_trailing = $12 || "!" + else + next + end + next if procedures_trailing =~ /!:nodoc:/ + indicated_method = nil + indicated_file = nil + TopLevel.all_files.each do |name, toplevel| + indicated_method = toplevel.find_local_symbol(proc, @options.ignore_case) + indicated_file = name + break if indicated_method + end + + if indicated_method + external_method = + initialize_external_method(generic_name, proc, + indicated_method.params, + indicated_file, + indicated_method.comment) + + @stats.add_method external_method + + container.add_method external_method + set_visibility(container, generic_name, visibility_default, @@public_methods) + if !container.include_requires?(indicated_file, @options.ignore_case) + container.add_require(Require.new(indicated_file, "")) + end + check_public_methods(external_method, container.name) + + else + @@external_aliases << { + "new_name" => generic_name, + "old_name" => proc, + "file_or_module" => container, + "visibility" => find_visibility(container, generic_name, @@public_methods) || visibility_default + } + end + end + + } if interface_code # End of interface_code.split("\n").each ... + + # + # Already imported methods are removed from @@public_methods. + # Remainders are assumed to be imported from other modules. + # + @@public_methods.delete_if{ |method| method["entity_is_discovered"]} + + @@public_methods.each{ |pub_meth| + next unless pub_meth["file_or_module"].name == container.name + pub_meth["used_modules"].each{ |used_mod| + TopLevel.all_classes_and_modules.each{ |modules| + if modules.name == used_mod || + modules.name.upcase == used_mod.upcase && + @options.ignore_case + modules.method_list.each{ |meth| + if meth.name == pub_meth["name"] || + meth.name.upcase == pub_meth["name"].upcase && + @options.ignore_case + new_meth = initialize_public_method(meth, + modules.name) + if pub_meth["local_name"] + new_meth.name = pub_meth["local_name"] + end + + @stats.add_method new_meth + + container.add_method new_meth + end + } + end + } + } + } + + container + end # End of parse_program_or_module + + ## + # Parse arguments, comment, code of subroutine and function. Return + # AnyMethod object. + + def parse_subprogram(subprogram, params, comment, code, + before_contains=nil, function=nil, prefix=nil) + subprogram.singleton = false + prefix = "" if !prefix + arguments = params.sub(/\(/, "").sub(/\)/, "").split(",") if params + args_comment, params_opt = + find_arguments(arguments, code.sub(/^s*?contains\s*?(!.*?)?$.*/im, ""), + nil, nil, true) + params_opt = "( " + params_opt + " ) " if params_opt + subprogram.params = params_opt || "" + namelist_comment = find_namelists(code, before_contains) + + block_comment = find_comments comment + if function + subprogram.comment = " Function :: #{prefix}\n" + else + subprogram.comment = " Subroutine :: #{prefix}\n" + end + subprogram.comment << args_comment if args_comment + subprogram.comment << block_comment if block_comment + subprogram.comment << namelist_comment if namelist_comment + + # For output source code + subprogram.start_collecting_tokens + subprogram.add_token Token.new(1,1).set_text(code) + + subprogram + end + + ## + # Collect comment for file entity + + def collect_first_comment(body) + comment = "" + not_comment = "" + comment_start = false + comment_end = false + body.split("\n").each{ |line| + if comment_end + not_comment << line + not_comment << "\n" + elsif /^\s*?!\s?(.*)$/i =~ line + comment_start = true + comment << $1 + comment << "\n" + elsif /^\s*?$/i =~ line + comment_end = true if comment_start && COMMENTS_ARE_UPPER + else + comment_end = true + not_comment << line + not_comment << "\n" + end + } + return comment, not_comment + end + + + ## + # Return comments of definitions of arguments + # + # If "all" argument is true, information of all arguments are returned. + # + # If "modified_params" is true, list of arguments are decorated, for + # example, optional arguments are parenthetic as "[arg]". + + def find_arguments(args, text, all=nil, indent=nil, modified_params=nil) + return unless args || all + indent = "" unless indent + args = ["all"] if all + params = "" if modified_params + comma = "" + return unless text + args_rdocforms = "\n" + remaining_lines = "#{text}" + definitions = definition_info(remaining_lines) + args.each{ |arg| + arg.strip! + arg.chomp! + definitions.each { |defitem| + if arg == defitem.varname.strip.chomp || all + args_rdocforms << <<-"EOF" + +#{indent}#{defitem.varname.chomp.strip}#{defitem.arraysuffix} #{defitem.inivalue} :: +#{indent} #{defitem.types.chomp.strip} +EOF + if !defitem.comment.chomp.strip.empty? + comment = "" + defitem.comment.split("\n").each{ |line| + comment << " " + line + "\n" + } + args_rdocforms << <<-"EOF" + +#{indent} :: +#{indent} +#{indent} #{comment.chomp.strip} +EOF + end + + if modified_params + if defitem.include_attr?("optional") + params << "#{comma}[#{arg}]" + else + params << "#{comma}#{arg}" + end + comma = ", " + end + end + } + } + if modified_params + return args_rdocforms, params + else + return args_rdocforms + end + end + + ## + # Return comments of definitions of namelists + + def find_namelists(text, before_contains=nil) + return nil if !text + result = "" + lines = "#{text}" + before_contains = "" if !before_contains + while lines =~ /^\s*?namelist\s+\/\s*?(\w+)\s*?\/([\s\w\,]+)$/i + lines = $~.post_match + nml_comment = COMMENTS_ARE_UPPER ? + find_comments($~.pre_match) : find_comments($~.post_match) + nml_name = $1 + nml_args = $2.split(",") + result << "\n\n=== NAMELIST " + nml_name + "\n\n" + result << nml_comment + "\n" if nml_comment + if lines.split("\n")[0] =~ /^\//i + lines = "namelist " + lines + end + result << find_arguments(nml_args, "#{text}" + "\n" + before_contains) + end + return result + end + + ## + # Comments just after module or subprogram, or arguments are returned. If + # "COMMENTS_ARE_UPPER" is true, comments just before modules or subprograms + # are returnd + + def find_comments text + return "" unless text + lines = text.split("\n") + lines.reverse! if COMMENTS_ARE_UPPER + comment_block = Array.new + lines.each do |line| + break if line =~ /^\s*?\w/ || line =~ /^\s*?$/ + if COMMENTS_ARE_UPPER + comment_block.unshift line.sub(/^\s*?!\s?/,"") + else + comment_block.push line.sub(/^\s*?!\s?/,"") + end + end + nice_lines = comment_block.join("\n").split "\n\s*?\n" + nice_lines[0] ||= "" + nice_lines.shift + end + + ## + # Create method for internal alias + + def initialize_public_method(method, parent) + return if !method || !parent + + new_meth = AnyMethod.new("External Alias for module", method.name) + new_meth.singleton = method.singleton + new_meth.params = method.params.clone + new_meth.comment = remove_trailing_alias(method.comment.clone) + new_meth.comment << "\n\n#{EXTERNAL_ALIAS_MES} #{parent.strip.chomp}\##{method.name}" + + return new_meth + end + + ## + # Create method for external alias + # + # If argument "internal" is true, file is ignored. + + def initialize_external_method(new, old, params, file, comment, token=nil, + internal=nil, nolink=nil) + return nil unless new || old + + if internal + external_alias_header = "#{INTERNAL_ALIAS_MES} " + external_alias_text = external_alias_header + old + elsif file + external_alias_header = "#{EXTERNAL_ALIAS_MES} " + external_alias_text = external_alias_header + file + "#" + old + else + return nil + end + external_meth = AnyMethod.new(external_alias_text, new) + external_meth.singleton = false + external_meth.params = params + external_comment = remove_trailing_alias(comment) + "\n\n" if comment + external_meth.comment = external_comment || "" + if nolink && token + external_meth.start_collecting_tokens + external_meth.add_token Token.new(1,1).set_text(token) + else + external_meth.comment << external_alias_text + end + + return external_meth + end + + ## + # Parse visibility + + def parse_visibility(code, default, container) + result = [] + visibility_default = default || :public + + used_modules = [] + container.includes.each{|i| used_modules << i.name} if container + + remaining_code = code.gsub(/^\s*?type[\s\,]+.*?\s+end\s+type.*?$/im, "") + remaining_code.split("\n").each{ |line| + if /^\s*?private\s*?$/ =~ line + visibility_default = :private + break + end + } if remaining_code + + remaining_code.split("\n").each{ |line| + if /^\s*?private\s*?(::)?\s+(.*)\s*?(!.*?)?/i =~ line + methods = $2.sub(/!.*$/, '') + methods.split(",").each{ |meth| + meth.sub!(/!.*$/, '') + meth.gsub!(/:/, '') + result << { + "name" => meth.chomp.strip, + "visibility" => :private, + "used_modules" => used_modules.clone, + "file_or_module" => container, + "entity_is_discovered" => nil, + "local_name" => nil + } + } + elsif /^\s*?public\s*?(::)?\s+(.*)\s*?(!.*?)?/i =~ line + methods = $2.sub(/!.*$/, '') + methods.split(",").each{ |meth| + meth.sub!(/!.*$/, '') + meth.gsub!(/:/, '') + result << { + "name" => meth.chomp.strip, + "visibility" => :public, + "used_modules" => used_modules.clone, + "file_or_module" => container, + "entity_is_discovered" => nil, + "local_name" => nil + } + } + end + } if remaining_code + + if container + result.each{ |vis_info| + vis_info["parent"] = container.name + } + end + + return visibility_default, result + end + + ## + # Set visibility + # + # "subname" element of "visibility_info" is deleted. + + def set_visibility(container, subname, visibility_default, visibility_info) + return unless container || subname || visibility_default || visibility_info + not_found = true + visibility_info.collect!{ |info| + if info["name"] == subname || + @options.ignore_case && info["name"].upcase == subname.upcase + if info["file_or_module"].name == container.name + container.set_visibility_for([subname], info["visibility"]) + info["entity_is_discovered"] = true + not_found = false + end + end + info + } + if not_found + return container.set_visibility_for([subname], visibility_default) + else + return container + end + end + + ## + # Find visibility + + def find_visibility(container, subname, visibility_info) + return nil if !subname || !visibility_info + visibility_info.each{ |info| + if info["name"] == subname || + @options.ignore_case && info["name"].upcase == subname.upcase + if info["parent"] == container.name + return info["visibility"] + end + end + } + return nil + end + + ## + # Check external aliases + + def check_external_aliases(subname, params, comment, test=nil) + @@external_aliases.each{ |alias_item| + if subname == alias_item["old_name"] || + subname.upcase == alias_item["old_name"].upcase && + @options.ignore_case + + new_meth = initialize_external_method(alias_item["new_name"], + subname, params, @file_name, + comment) + new_meth.visibility = alias_item["visibility"] + + @stats.add_method new_meth + + alias_item["file_or_module"].add_method(new_meth) + + if !alias_item["file_or_module"].include_requires?(@file_name, @options.ignore_case) + alias_item["file_or_module"].add_require(Require.new(@file_name, "")) + end + end + } + end + + ## + # Check public_methods + + def check_public_methods(method, parent) + return if !method || !parent + @@public_methods.each{ |alias_item| + parent_is_used_module = nil + alias_item["used_modules"].each{ |used_module| + if used_module == parent || + used_module.upcase == parent.upcase && + @options.ignore_case + parent_is_used_module = true + end + } + next if !parent_is_used_module + + if method.name == alias_item["name"] || + method.name.upcase == alias_item["name"].upcase && + @options.ignore_case + + new_meth = initialize_public_method(method, parent) + if alias_item["local_name"] + new_meth.name = alias_item["local_name"] + end + + @stats.add_method new_meth + + alias_item["file_or_module"].add_method new_meth + end + } + end + + ## + # Continuous lines are united. + # + # Comments in continuous lines are removed. + + def united_to_one_line(f90src) + return "" unless f90src + lines = f90src.split("\n") + previous_continuing = false + now_continuing = false + body = "" + lines.each{ |line| + words = line.split("") + next if words.empty? && previous_continuing + commentout = false + brank_flag = true ; brank_char = "" + squote = false ; dquote = false + ignore = false + words.collect! { |char| + if previous_continuing && brank_flag + now_continuing = true + ignore = true + case char + when "!" ; break + when " " ; brank_char << char ; next "" + when "&" + brank_flag = false + now_continuing = false + next "" + else + brank_flag = false + now_continuing = false + ignore = false + next brank_char + char + end + end + ignore = false + + if now_continuing + next "" + elsif !(squote) && !(dquote) && !(commentout) + case char + when "!" ; commentout = true ; next char + when "\""; dquote = true ; next char + when "\'"; squote = true ; next char + when "&" ; now_continuing = true ; next "" + else next char + end + elsif commentout + next char + elsif squote + case char + when "\'"; squote = false ; next char + else next char + end + elsif dquote + case char + when "\""; dquote = false ; next char + else next char + end + end + } + if !ignore && !previous_continuing || !brank_flag + if previous_continuing + body << words.join("") + else + body << "\n" + words.join("") + end + end + previous_continuing = now_continuing ? true : nil + now_continuing = nil + } + return body + end + + + ## + # Continuous line checker + + def continuous_line?(line) + continuous = false + if /&\s*?(!.*)?$/ =~ line + continuous = true + if comment_out?($~.pre_match) + continuous = false + end + end + return continuous + end + + ## + # Comment out checker + + def comment_out?(line) + return nil unless line + commentout = false + squote = false ; dquote = false + line.split("").each { |char| + if !(squote) && !(dquote) + case char + when "!" ; commentout = true ; break + when "\""; dquote = true + when "\'"; squote = true + else next + end + elsif squote + case char + when "\'"; squote = false + else next + end + elsif dquote + case char + when "\""; dquote = false + else next + end + end + } + return commentout + end + + ## + # Semicolons are replaced to line feed. + + def semicolon_to_linefeed(text) + return "" unless text + lines = text.split("\n") + lines.collect!{ |line| + words = line.split("") + commentout = false + squote = false ; dquote = false + words.collect! { |char| + if !(squote) && !(dquote) && !(commentout) + case char + when "!" ; commentout = true ; next char + when "\""; dquote = true ; next char + when "\'"; squote = true ; next char + when ";" ; "\n" + else next char + end + elsif commentout + next char + elsif squote + case char + when "\'"; squote = false ; next char + else next char + end + elsif dquote + case char + when "\""; dquote = false ; next char + else next char + end + end + } + words.join("") + } + return lines.join("\n") + end + + ## + # Which "line" is start of block (module, program, block data, subroutine, + # function) statement ? + + def block_start?(line) + return nil if !line + + if line =~ /^\s*?module\s+(\w+)\s*?(!.*?)?$/i || + line =~ /^\s*?program\s+(\w+)\s*?(!.*?)?$/i || + line =~ /^\s*?block\s+data(\s+\w+)?\s*?(!.*?)?$/i || + line =~ \ + /^\s*? + (recursive|pure|elemental)?\s*? + subroutine\s+(\w+)\s*?(\(.*?\))?\s*?(!.*?)?$ + /ix || + line =~ \ + /^\s*? + (recursive|pure|elemental)?\s*? + ( + character\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | type\s*?\([\w\s]+?\)\s+ + | integer\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | real\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | double\s+precision\s+ + | logical\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + | complex\s*?(\([\w\s\=\(\)\*]+?\))?\s+ + )? + function\s+(\w+)\s*? + (\(.*?\))?(\s+result\((.*?)\))?\s*?(!.*?)?$ + /ix + return true + end + + return nil + end + + ## + # Which "line" is end of block (module, program, block data, subroutine, + # function) statement ? + + def block_end?(line) + return nil if !line + + if line =~ /^\s*?end\s*?(!.*?)?$/i || + line =~ /^\s*?end\s+module(\s+\w+)?\s*?(!.*?)?$/i || + line =~ /^\s*?end\s+program(\s+\w+)?\s*?(!.*?)?$/i || + line =~ /^\s*?end\s+block\s+data(\s+\w+)?\s*?(!.*?)?$/i || + line =~ /^\s*?end\s+subroutine(\s+\w+)?\s*?(!.*?)?$/i || + line =~ /^\s*?end\s+function(\s+\w+)?\s*?(!.*?)?$/i + return true + end + + return nil + end + + ## + # Remove "Alias for" in end of comments + + def remove_trailing_alias(text) + return "" if !text + lines = text.split("\n").reverse + comment_block = Array.new + checked = false + lines.each do |line| + if !checked + if /^\s?#{INTERNAL_ALIAS_MES}/ =~ line || + /^\s?#{EXTERNAL_ALIAS_MES}/ =~ line + checked = true + next + end + end + comment_block.unshift line + end + nice_lines = comment_block.join("\n") + nice_lines ||= "" + return nice_lines + end + + ## + # Empty lines in header are removed + + def remove_empty_head_lines(text) + return "" unless text + lines = text.split("\n") + header = true + lines.delete_if{ |line| + header = false if /\S/ =~ line + header && /^\s*?$/ =~ line + } + lines.join("\n") + end + + ## + # header marker "=", "==", ... are removed + + def remove_header_marker(text) + return text.gsub(/^\s?(=+)/, '\1') + end + + def remove_private_comments(body) + body.gsub!(/^\s*!--\s*?$.*?^\s*!\+\+\s*?$/m, '') + return body + end + + ## + # Information of arguments of subroutines and functions in Fortran95 + + class Fortran95Definition + + # Name of variable + # + attr_reader :varname + + # Types of variable + # + attr_reader :types + + # Initial Value + # + attr_reader :inivalue + + # Suffix of array + # + attr_reader :arraysuffix + + # Comments + # + attr_accessor :comment + + # Flag of non documentation + # + attr_accessor :nodoc + + def initialize(varname, types, inivalue, arraysuffix, comment, + nodoc=false) + @varname = varname + @types = types + @inivalue = inivalue + @arraysuffix = arraysuffix + @comment = comment + @nodoc = nodoc + end + + def to_s + return <<-EOF + +EOF + end + + # + # If attr is included, true is returned + # + def include_attr?(attr) + return if !attr + @types.split(",").each{ |type| + return true if type.strip.chomp.upcase == attr.strip.chomp.upcase + } + return nil + end + + end # End of Fortran95Definition + + ## + # Parse string argument "text", and Return Array of Fortran95Definition + # object + + def definition_info(text) + return nil unless text + lines = "#{text}" + defs = Array.new + comment = "" + trailing_comment = "" + under_comment_valid = false + lines.split("\n").each{ |line| + if /^\s*?!\s?(.*)/ =~ line + if COMMENTS_ARE_UPPER + comment << remove_header_marker($1) + comment << "\n" + elsif defs[-1] && under_comment_valid + defs[-1].comment << "\n" + defs[-1].comment << remove_header_marker($1) + end + next + elsif /^\s*?$/ =~ line + comment = "" + under_comment_valid = false + next + end + type = "" + characters = "" + if line =~ /^\s*? + ( + character\s*?(\([\w\s\=\(\)\*]+?\))?[\s\,]* + | type\s*?\([\w\s]+?\)[\s\,]* + | integer\s*?(\([\w\s\=\(\)\*]+?\))?[\s\,]* + | real\s*?(\([\w\s\=\(\)\*]+?\))?[\s\,]* + | double\s+precision[\s\,]* + | logical\s*?(\([\w\s\=\(\)\*]+?\))?[\s\,]* + | complex\s*?(\([\w\s\=\(\)\*]+?\))?[\s\,]* + ) + (.*?::)? + (.+)$ + /ix + characters = $8 + type = $1 + type << $7.gsub(/::/, '').gsub(/^\s*?\,/, '') if $7 + else + under_comment_valid = false + next + end + squote = false ; dquote = false ; bracket = 0 + iniflag = false; commentflag = false + varname = "" ; arraysuffix = "" ; inivalue = "" + start_pos = defs.size + characters.split("").each { |char| + if !(squote) && !(dquote) && bracket <= 0 && !(iniflag) && !(commentflag) + case char + when "!" ; commentflag = true + when "(" ; bracket += 1 ; arraysuffix = char + when "\""; dquote = true + when "\'"; squote = true + when "=" ; iniflag = true ; inivalue << char + when "," + defs << Fortran95Definition.new(varname, type, inivalue, arraysuffix, comment) + varname = "" ; arraysuffix = "" ; inivalue = "" + under_comment_valid = true + when " " ; next + else ; varname << char + end + elsif commentflag + comment << remove_header_marker(char) + trailing_comment << remove_header_marker(char) + elsif iniflag + if dquote + case char + when "\"" ; dquote = false ; inivalue << char + else ; inivalue << char + end + elsif squote + case char + when "\'" ; squote = false ; inivalue << char + else ; inivalue << char + end + elsif bracket > 0 + case char + when "(" ; bracket += 1 ; inivalue << char + when ")" ; bracket -= 1 ; inivalue << char + else ; inivalue << char + end + else + case char + when "," + defs << Fortran95Definition.new(varname, type, inivalue, arraysuffix, comment) + varname = "" ; arraysuffix = "" ; inivalue = "" + iniflag = false + under_comment_valid = true + when "(" ; bracket += 1 ; inivalue << char + when "\""; dquote = true ; inivalue << char + when "\'"; squote = true ; inivalue << char + when "!" ; commentflag = true + else ; inivalue << char + end + end + elsif !(squote) && !(dquote) && bracket > 0 + case char + when "(" ; bracket += 1 ; arraysuffix << char + when ")" ; bracket -= 1 ; arraysuffix << char + else ; arraysuffix << char + end + elsif squote + case char + when "\'"; squote = false ; inivalue << char + else ; inivalue << char + end + elsif dquote + case char + when "\""; dquote = false ; inivalue << char + else ; inivalue << char + end + end + } + defs << Fortran95Definition.new(varname, type, inivalue, arraysuffix, comment) + if trailing_comment =~ /^:nodoc:/ + defs[start_pos..-1].collect!{ |defitem| + defitem.nodoc = true + } + end + varname = "" ; arraysuffix = "" ; inivalue = "" + comment = "" + under_comment_valid = true + trailing_comment = "" + } + return defs + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser/perl.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/perl.rb new file mode 100644 index 0000000..43d1e9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/perl.rb @@ -0,0 +1,165 @@ +require 'rdoc/parser' + +## +# +# This is an attamept to write a basic parser for Perl's +# POD (Plain old Documentation) format. Ruby code must +# co-exist with Perl, and some tasks are easier in Perl +# than Ruby because of existing libraries. +# +# One difficult is that Perl POD has no means of identifying +# the classes (packages) and methods (subs) with which it +# is associated, it is more like literate programming in so +# far as it just happens to be in the same place as the code, +# but need not be. +# +# We would like to support all the markup the POD provides +# so that it will convert happily to HTML. At the moment +# I don't think I can do that: time constraints. +# + +class RDoc::Parser::PerlPOD < RDoc::Parser + + parse_files_matching(/.p[lm]$/) + + ## + # Prepare to parse a perl file + + def initialize(top_level, file_name, content, options, stats) + super + + preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include + + preprocess.handle @content do |directive, param| + warn "Unrecognized directive '#{directive}' in #{@file_name}" + end + end + + ## + # Extract the Pod(-like) comments from the code. + # At its most basic there will ne no need to distinguish + # between the different types of header, etc. + # + # This uses a simple finite state machine, in a very + # procedural pattern. I could "replace case with polymorphism" + # but I think it would obscure the intent, scatter the + # code all over tha place. This machine is necessary + # because POD requires that directives be preceded by + # blank lines, so reading line by line is necessary, + # and preserving state about what is seen is necesary. + + def scan + + @top_level.comment ||= "" + state=:code_blank + line_number = 0 + line = nil + + # This started out as a really long nested case statement, + # which also led to repetitive code. I'd like to avoid that + # so I'm using a "table" instead. + + # Firstly we need some procs to do the transition and processing + # work. Because these are procs they are closures, and they can + # use variables in the local scope. + # + # First, the "nothing to see here" stuff. + code_noop = lambda do + if line =~ /^\s+$/ + state = :code_blank + end + end + + pod_noop = lambda do + if line =~ /^\s+$/ + state = :pod_blank + end + @top_level.comment += filter(line) + end + + begin_noop = lambda do + if line =~ /^\s+$/ + state = :begin_blank + end + @top_level.comment += filter(line) + end + + # Now for the blocks that process code and comments... + + transit_to_pod = lambda do + case line + when /^=(?:pod|head\d+)/ + state = :pod_no_blank + @top_level.comment += filter(line) + when /^=over/ + state = :over_no_blank + @top_level.comment += filter(line) + when /^=(?:begin|for)/ + state = :begin_no_blank + end + end + + process_pod = lambda do + case line + when /^\s*$/ + state = :pod_blank + @top_level.comment += filter(line) + when /^=cut/ + state = :code_no_blank + when /^=end/ + $stderr.puts "'=end' unexpected at #{line_number} in #{@file_name}" + else + @top_level.comment += filter(line) + end + end + + + process_begin = lambda do + case line + when /^\s*$/ + state = :begin_blank + @top_level.comment += filter(line) + when /^=end/ + state = :code_no_blank + when /^=cut/ + $stderr.puts "'=cut' unexpected at #{line_number} in #{@file_name}" + else + @top_level.comment += filter(line) + end + + end + + + transitions = { :code_no_blank => code_noop, + :code_blank => transit_to_pod, + :pod_no_blank => pod_noop, + :pod_blank => process_pod, + :begin_no_blank => begin_noop, + :begin_blank => process_begin} + @content.each_line do |l| + line = l + line_number += 1 + transitions[state].call + end # each line + + @top_level + end + + # Filter the perl markup that does the same as the rdoc + # filtering. Only basic for now. Will probably need a + # proper parser to cope with C<<...>> etc + def filter(comment) + return '' if comment =~ /^=pod\s*$/ + comment.gsub!(/^=pod/, '==') + comment.gsub!(/^=head(\d+)/) do + "=" * $1.to_i + end + comment.gsub!(/=item/, ''); + comment.gsub!(/C<(.*?)>/, '\1'); + comment.gsub!(/I<(.*?)>/, '\1'); + comment.gsub!(/B<(.*?)>/, '\1'); + comment + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser/ruby.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/ruby.rb new file mode 100644 index 0000000..865cb79 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/ruby.rb @@ -0,0 +1,2829 @@ +## +# This file contains stuff stolen outright from: +# +# rtags.rb - +# ruby-lex.rb - ruby lexcal analyzer +# ruby-token.rb - ruby tokens +# by Keiju ISHITSUKA (Nippon Rational Inc.) +# + +require 'e2mmap' +require 'irb/slex' + +require 'rdoc/code_objects' +require 'rdoc/tokenstream' +require 'rdoc/markup/preprocess' +require 'rdoc/parser' + +$TOKEN_DEBUG ||= nil +#$TOKEN_DEBUG = $DEBUG_RDOC + +## +# Definitions of all tokens involved in the lexical analysis + +module RDoc::RubyToken + + EXPR_BEG = :EXPR_BEG + EXPR_MID = :EXPR_MID + EXPR_END = :EXPR_END + EXPR_ARG = :EXPR_ARG + EXPR_FNAME = :EXPR_FNAME + EXPR_DOT = :EXPR_DOT + EXPR_CLASS = :EXPR_CLASS + + class Token + NO_TEXT = "??".freeze + + attr_accessor :text + attr_reader :line_no + attr_reader :char_no + + def initialize(line_no, char_no) + @line_no = line_no + @char_no = char_no + @text = NO_TEXT + end + + def ==(other) + self.class == other.class and + other.line_no == @line_no and + other.char_no == @char_no and + other.text == @text + end + + ## + # Because we're used in contexts that expect to return a token, we set the + # text string and then return ourselves + + def set_text(text) + @text = text + self + end + + end + + class TkNode < Token + attr :node + end + + class TkId < Token + def initialize(line_no, char_no, name) + super(line_no, char_no) + @name = name + end + attr :name + end + + class TkKW < TkId + end + + class TkVal < Token + def initialize(line_no, char_no, value = nil) + super(line_no, char_no) + set_text(value) + end + end + + class TkOp < Token + def name + self.class.op_name + end + end + + class TkOPASGN < TkOp + def initialize(line_no, char_no, op) + super(line_no, char_no) + op = TkReading2Token[op] unless Symbol === op + @op = op + end + attr :op + end + + class TkUnknownChar < Token + def initialize(line_no, char_no, id) + super(line_no, char_no) + @name = char_no.chr + end + attr :name + end + + class TkError < Token + end + + def set_token_position(line, char) + @prev_line_no = line + @prev_char_no = char + end + + def Token(token, value = nil) + tk = nil + case token + when String, Symbol + source = String === token ? TkReading2Token : TkSymbol2Token + raise TkReading2TokenNoKey, token if (tk = source[token]).nil? + tk = Token(tk[0], value) + else + tk = if (token.ancestors & [TkId, TkVal, TkOPASGN, TkUnknownChar]).empty? + token.new(@prev_line_no, @prev_char_no) + else + token.new(@prev_line_no, @prev_char_no, value) + end + end + tk + end + + TokenDefinitions = [ + [:TkCLASS, TkKW, "class", EXPR_CLASS], + [:TkMODULE, TkKW, "module", EXPR_CLASS], + [:TkDEF, TkKW, "def", EXPR_FNAME], + [:TkUNDEF, TkKW, "undef", EXPR_FNAME], + [:TkBEGIN, TkKW, "begin", EXPR_BEG], + [:TkRESCUE, TkKW, "rescue", EXPR_MID], + [:TkENSURE, TkKW, "ensure", EXPR_BEG], + [:TkEND, TkKW, "end", EXPR_END], + [:TkIF, TkKW, "if", EXPR_BEG, :TkIF_MOD], + [:TkUNLESS, TkKW, "unless", EXPR_BEG, :TkUNLESS_MOD], + [:TkTHEN, TkKW, "then", EXPR_BEG], + [:TkELSIF, TkKW, "elsif", EXPR_BEG], + [:TkELSE, TkKW, "else", EXPR_BEG], + [:TkCASE, TkKW, "case", EXPR_BEG], + [:TkWHEN, TkKW, "when", EXPR_BEG], + [:TkWHILE, TkKW, "while", EXPR_BEG, :TkWHILE_MOD], + [:TkUNTIL, TkKW, "until", EXPR_BEG, :TkUNTIL_MOD], + [:TkFOR, TkKW, "for", EXPR_BEG], + [:TkBREAK, TkKW, "break", EXPR_END], + [:TkNEXT, TkKW, "next", EXPR_END], + [:TkREDO, TkKW, "redo", EXPR_END], + [:TkRETRY, TkKW, "retry", EXPR_END], + [:TkIN, TkKW, "in", EXPR_BEG], + [:TkDO, TkKW, "do", EXPR_BEG], + [:TkRETURN, TkKW, "return", EXPR_MID], + [:TkYIELD, TkKW, "yield", EXPR_END], + [:TkSUPER, TkKW, "super", EXPR_END], + [:TkSELF, TkKW, "self", EXPR_END], + [:TkNIL, TkKW, "nil", EXPR_END], + [:TkTRUE, TkKW, "true", EXPR_END], + [:TkFALSE, TkKW, "false", EXPR_END], + [:TkAND, TkKW, "and", EXPR_BEG], + [:TkOR, TkKW, "or", EXPR_BEG], + [:TkNOT, TkKW, "not", EXPR_BEG], + [:TkIF_MOD, TkKW], + [:TkUNLESS_MOD, TkKW], + [:TkWHILE_MOD, TkKW], + [:TkUNTIL_MOD, TkKW], + [:TkALIAS, TkKW, "alias", EXPR_FNAME], + [:TkDEFINED, TkKW, "defined?", EXPR_END], + [:TklBEGIN, TkKW, "BEGIN", EXPR_END], + [:TklEND, TkKW, "END", EXPR_END], + [:Tk__LINE__, TkKW, "__LINE__", EXPR_END], + [:Tk__FILE__, TkKW, "__FILE__", EXPR_END], + + [:TkIDENTIFIER, TkId], + [:TkFID, TkId], + [:TkGVAR, TkId], + [:TkIVAR, TkId], + [:TkCONSTANT, TkId], + + [:TkINTEGER, TkVal], + [:TkFLOAT, TkVal], + [:TkSTRING, TkVal], + [:TkXSTRING, TkVal], + [:TkREGEXP, TkVal], + [:TkCOMMENT, TkVal], + + [:TkDSTRING, TkNode], + [:TkDXSTRING, TkNode], + [:TkDREGEXP, TkNode], + [:TkNTH_REF, TkId], + [:TkBACK_REF, TkId], + + [:TkUPLUS, TkOp, "+@"], + [:TkUMINUS, TkOp, "-@"], + [:TkPOW, TkOp, "**"], + [:TkCMP, TkOp, "<=>"], + [:TkEQ, TkOp, "=="], + [:TkEQQ, TkOp, "==="], + [:TkNEQ, TkOp, "!="], + [:TkGEQ, TkOp, ">="], + [:TkLEQ, TkOp, "<="], + [:TkANDOP, TkOp, "&&"], + [:TkOROP, TkOp, "||"], + [:TkMATCH, TkOp, "=~"], + [:TkNMATCH, TkOp, "!~"], + [:TkDOT2, TkOp, ".."], + [:TkDOT3, TkOp, "..."], + [:TkAREF, TkOp, "[]"], + [:TkASET, TkOp, "[]="], + [:TkLSHFT, TkOp, "<<"], + [:TkRSHFT, TkOp, ">>"], + [:TkCOLON2, TkOp], + [:TkCOLON3, TkOp], +# [:OPASGN, TkOp], # +=, -= etc. # + [:TkASSOC, TkOp, "=>"], + [:TkQUESTION, TkOp, "?"], #? + [:TkCOLON, TkOp, ":"], #: + + [:TkfLPAREN], # func( # + [:TkfLBRACK], # func[ # + [:TkfLBRACE], # func{ # + [:TkSTAR], # *arg + [:TkAMPER], # &arg # + [:TkSYMBOL, TkId], # :SYMBOL + [:TkSYMBEG, TkId], + [:TkGT, TkOp, ">"], + [:TkLT, TkOp, "<"], + [:TkPLUS, TkOp, "+"], + [:TkMINUS, TkOp, "-"], + [:TkMULT, TkOp, "*"], + [:TkDIV, TkOp, "/"], + [:TkMOD, TkOp, "%"], + [:TkBITOR, TkOp, "|"], + [:TkBITXOR, TkOp, "^"], + [:TkBITAND, TkOp, "&"], + [:TkBITNOT, TkOp, "~"], + [:TkNOTOP, TkOp, "!"], + + [:TkBACKQUOTE, TkOp, "`"], + + [:TkASSIGN, Token, "="], + [:TkDOT, Token, "."], + [:TkLPAREN, Token, "("], #(exp) + [:TkLBRACK, Token, "["], #[arry] + [:TkLBRACE, Token, "{"], #{hash} + [:TkRPAREN, Token, ")"], + [:TkRBRACK, Token, "]"], + [:TkRBRACE, Token, "}"], + [:TkCOMMA, Token, ","], + [:TkSEMICOLON, Token, ";"], + + [:TkRD_COMMENT], + [:TkSPACE], + [:TkNL], + [:TkEND_OF_SCRIPT], + + [:TkBACKSLASH, TkUnknownChar, "\\"], + [:TkAT, TkUnknownChar, "@"], + [:TkDOLLAR, TkUnknownChar, "\$"], #" + ] + + # {reading => token_class} + # {reading => [token_class, *opt]} + TkReading2Token = {} + TkSymbol2Token = {} + + def self.def_token(token_n, super_token = Token, reading = nil, *opts) + token_n = token_n.id2name unless String === token_n + + fail AlreadyDefinedToken, token_n if const_defined?(token_n) + + token_c = Class.new super_token + const_set token_n, token_c +# token_c.inspect + + if reading + if TkReading2Token[reading] + fail TkReading2TokenDuplicateError, token_n, reading + end + if opts.empty? + TkReading2Token[reading] = [token_c] + else + TkReading2Token[reading] = [token_c].concat(opts) + end + end + TkSymbol2Token[token_n.intern] = token_c + + if token_c <= TkOp + token_c.class_eval %{ + def self.op_name; "#{reading}"; end + } + end + end + + for defs in TokenDefinitions + def_token(*defs) + end + + NEWLINE_TOKEN = TkNL.new(0,0) + NEWLINE_TOKEN.set_text("\n") + +end + +## +# Lexical analyzer for Ruby source + +class RDoc::RubyLex + + ## + # Read an input stream character by character. We allow for unlimited + # ungetting of characters just read. + # + # We simplify the implementation greatly by reading the entire input + # into a buffer initially, and then simply traversing it using + # pointers. + # + # We also have to allow for the here document diversion. This + # little gem comes about when the lexer encounters a here + # document. At this point we effectively need to split the input + # stream into two parts: one to read the body of the here document, + # the other to read the rest of the input line where the here + # document was initially encountered. For example, we might have + # + # do_something(<<-A, <<-B) + # stuff + # for + # A + # stuff + # for + # B + # + # When the lexer encounters the <= @size + ch = @content[@offset, 1] + + @offset += 1 + @hwm = @offset if @hwm < @offset + + if @newline_pending + @line_num += 1 + @last_newline = @offset - 1 + @newline_pending = false + end + + if ch == "\n" + @newline_pending = true + end + ch + end + + def getc_already_read + getc + end + + def ungetc(ch) + raise "unget past beginning of file" if @offset <= 0 + @offset -= 1 + if @content[@offset] == ?\n + @newline_pending = false + end + end + + def get_read + res = @content[@read_back_offset...@offset] + @read_back_offset = @offset + res + end + + def peek(at) + pos = @offset + at + if pos >= @size + nil + else + @content[pos, 1] + end + end + + def peek_equal(str) + @content[@offset, str.length] == str + end + + def divert_read_from(reserve) + @content[@offset, 0] = reserve + @size = @content.size + end + end + + # end of nested class BufferedReader + + extend Exception2MessageMapper + def_exception(:AlreadyDefinedToken, "Already defined token(%s)") + def_exception(:TkReading2TokenNoKey, "key nothing(key='%s')") + def_exception(:TkSymbol2TokenNoKey, "key nothing(key='%s')") + def_exception(:TkReading2TokenDuplicateError, + "key duplicate(token_n='%s', key='%s')") + def_exception(:SyntaxError, "%s") + + include RDoc::RubyToken + include IRB + + attr_reader :continue + attr_reader :lex_state + + def self.debug? + false + end + + def initialize(content, options) + lex_init + + @options = options + + @reader = BufferedReader.new content, @options + + @exp_line_no = @line_no = 1 + @base_char_no = 0 + @indent = 0 + + @ltype = nil + @quoted = nil + @lex_state = EXPR_BEG + @space_seen = false + + @continue = false + @line = "" + + @skip_space = false + @read_auto_clean_up = false + @exception_on_syntax_error = true + end + + attr_accessor :skip_space + attr_accessor :read_auto_clean_up + attr_accessor :exception_on_syntax_error + attr_reader :indent + + # io functions + def line_no + @reader.line_num + end + + def char_no + @reader.column + end + + def get_read + @reader.get_read + end + + def getc + @reader.getc + end + + def getc_of_rests + @reader.getc_already_read + end + + def gets + c = getc or return + l = "" + begin + l.concat c unless c == "\r" + break if c == "\n" + end while c = getc + l + end + + + def ungetc(c = nil) + @reader.ungetc(c) + end + + def peek_equal?(str) + @reader.peek_equal(str) + end + + def peek(i = 0) + @reader.peek(i) + end + + def lex + until (TkNL === (tk = token) or TkEND_OF_SCRIPT === tk) and + not @continue or tk.nil? + end + + line = get_read + + if line == "" and TkEND_OF_SCRIPT === tk or tk.nil? then + nil + else + line + end + end + + def token + set_token_position(line_no, char_no) + begin + begin + tk = @OP.match(self) + @space_seen = TkSPACE === tk + rescue SyntaxError => e + raise RDoc::Error, "syntax error: #{e.message}" if + @exception_on_syntax_error + + tk = TkError.new(line_no, char_no) + end + end while @skip_space and TkSPACE === tk + if @read_auto_clean_up + get_read + end +# throw :eof unless tk + tk + end + + ENINDENT_CLAUSE = [ + "case", "class", "def", "do", "for", "if", + "module", "unless", "until", "while", "begin" #, "when" + ] + DEINDENT_CLAUSE = ["end" #, "when" + ] + + PERCENT_LTYPE = { + "q" => "\'", + "Q" => "\"", + "x" => "\`", + "r" => "/", + "w" => "]" + } + + PERCENT_PAREN = { + "{" => "}", + "[" => "]", + "<" => ">", + "(" => ")" + } + + Ltype2Token = { + "\'" => TkSTRING, + "\"" => TkSTRING, + "\`" => TkXSTRING, + "/" => TkREGEXP, + "]" => TkDSTRING + } + Ltype2Token.default = TkSTRING + + DLtype2Token = { + "\"" => TkDSTRING, + "\`" => TkDXSTRING, + "/" => TkDREGEXP, + } + + def lex_init() + @OP = IRB::SLex.new + @OP.def_rules("\0", "\004", "\032") do |chars, io| + Token(TkEND_OF_SCRIPT).set_text(chars) + end + + @OP.def_rules(" ", "\t", "\f", "\r", "\13") do |chars, io| + @space_seen = TRUE + while (ch = getc) =~ /[ \t\f\r\13]/ + chars << ch + end + ungetc + Token(TkSPACE).set_text(chars) + end + + @OP.def_rule("#") do + |op, io| + identify_comment + end + + @OP.def_rule("=begin", proc{@prev_char_no == 0 && peek(0) =~ /\s/}) do + |op, io| + str = op + @ltype = "=" + + + begin + line = "" + begin + ch = getc + line << ch + end until ch == "\n" + str << line + end until line =~ /^=end/ + + ungetc + + @ltype = nil + + if str =~ /\A=begin\s+rdoc/i + str.sub!(/\A=begin.*\n/, '') + str.sub!(/^=end.*/m, '') + Token(TkCOMMENT).set_text(str) + else + Token(TkRD_COMMENT)#.set_text(str) + end + end + + @OP.def_rule("\n") do + print "\\n\n" if RDoc::RubyLex.debug? + case @lex_state + when EXPR_BEG, EXPR_FNAME, EXPR_DOT + @continue = TRUE + else + @continue = FALSE + @lex_state = EXPR_BEG + end + Token(TkNL).set_text("\n") + end + + @OP.def_rules("*", "**", + "!", "!=", "!~", + "=", "==", "===", + "=~", "<=>", + "<", "<=", + ">", ">=", ">>") do + |op, io| + @lex_state = EXPR_BEG + Token(op).set_text(op) + end + + @OP.def_rules("<<") do + |op, io| + tk = nil + if @lex_state != EXPR_END && @lex_state != EXPR_CLASS && + (@lex_state != EXPR_ARG || @space_seen) + c = peek(0) + if /[-\w_\"\'\`]/ =~ c + tk = identify_here_document + end + end + if !tk + @lex_state = EXPR_BEG + tk = Token(op).set_text(op) + end + tk + end + + @OP.def_rules("'", '"') do + |op, io| + identify_string(op) + end + + @OP.def_rules("`") do + |op, io| + if @lex_state == EXPR_FNAME + Token(op).set_text(op) + else + identify_string(op) + end + end + + @OP.def_rules('?') do + |op, io| + if @lex_state == EXPR_END + @lex_state = EXPR_BEG + Token(TkQUESTION).set_text(op) + else + ch = getc + if @lex_state == EXPR_ARG && ch !~ /\s/ + ungetc + @lex_state = EXPR_BEG + Token(TkQUESTION).set_text(op) + else + str = op + str << ch + if (ch == '\\') #' + str << read_escape + end + @lex_state = EXPR_END + Token(TkINTEGER).set_text(str) + end + end + end + + @OP.def_rules("&", "&&", "|", "||") do + |op, io| + @lex_state = EXPR_BEG + Token(op).set_text(op) + end + + @OP.def_rules("+=", "-=", "*=", "**=", + "&=", "|=", "^=", "<<=", ">>=", "||=", "&&=") do + |op, io| + @lex_state = EXPR_BEG + op =~ /^(.*)=$/ + Token(TkOPASGN, $1).set_text(op) + end + + @OP.def_rule("+@", proc{@lex_state == EXPR_FNAME}) do |op, io| + Token(TkUPLUS).set_text(op) + end + + @OP.def_rule("-@", proc{@lex_state == EXPR_FNAME}) do |op, io| + Token(TkUMINUS).set_text(op) + end + + @OP.def_rules("+", "-") do + |op, io| + catch(:RET) do + if @lex_state == EXPR_ARG + if @space_seen and peek(0) =~ /[0-9]/ + throw :RET, identify_number(op) + else + @lex_state = EXPR_BEG + end + elsif @lex_state != EXPR_END and peek(0) =~ /[0-9]/ + throw :RET, identify_number(op) + else + @lex_state = EXPR_BEG + end + Token(op).set_text(op) + end + end + + @OP.def_rule(".") do + @lex_state = EXPR_BEG + if peek(0) =~ /[0-9]/ + ungetc + identify_number("") + else + # for obj.if + @lex_state = EXPR_DOT + Token(TkDOT).set_text(".") + end + end + + @OP.def_rules("..", "...") do + |op, io| + @lex_state = EXPR_BEG + Token(op).set_text(op) + end + + lex_int2 + end + + def lex_int2 + @OP.def_rules("]", "}", ")") do + |op, io| + @lex_state = EXPR_END + @indent -= 1 + Token(op).set_text(op) + end + + @OP.def_rule(":") do + if @lex_state == EXPR_END || peek(0) =~ /\s/ + @lex_state = EXPR_BEG + tk = Token(TkCOLON) + else + @lex_state = EXPR_FNAME + tk = Token(TkSYMBEG) + end + tk.set_text(":") + end + + @OP.def_rule("::") do + if @lex_state == EXPR_BEG or @lex_state == EXPR_ARG && @space_seen + @lex_state = EXPR_BEG + tk = Token(TkCOLON3) + else + @lex_state = EXPR_DOT + tk = Token(TkCOLON2) + end + tk.set_text("::") + end + + @OP.def_rule("/") do + |op, io| + if @lex_state == EXPR_BEG || @lex_state == EXPR_MID + identify_string(op) + elsif peek(0) == '=' + getc + @lex_state = EXPR_BEG + Token(TkOPASGN, :/).set_text("/=") #") + elsif @lex_state == EXPR_ARG and @space_seen and peek(0) !~ /\s/ + identify_string(op) + else + @lex_state = EXPR_BEG + Token("/").set_text(op) + end + end + + @OP.def_rules("^") do + @lex_state = EXPR_BEG + Token("^").set_text("^") + end + + @OP.def_rules(",", ";") do + |op, io| + @lex_state = EXPR_BEG + Token(op).set_text(op) + end + + @OP.def_rule("~") do + @lex_state = EXPR_BEG + Token("~").set_text("~") + end + + @OP.def_rule("~@", proc{@lex_state = EXPR_FNAME}) do + @lex_state = EXPR_BEG + Token("~").set_text("~@") + end + + @OP.def_rule("(") do + @indent += 1 + if @lex_state == EXPR_BEG || @lex_state == EXPR_MID + @lex_state = EXPR_BEG + tk = Token(TkfLPAREN) + else + @lex_state = EXPR_BEG + tk = Token(TkLPAREN) + end + tk.set_text("(") + end + + @OP.def_rule("[]", proc{@lex_state == EXPR_FNAME}) do + Token("[]").set_text("[]") + end + + @OP.def_rule("[]=", proc{@lex_state == EXPR_FNAME}) do + Token("[]=").set_text("[]=") + end + + @OP.def_rule("[") do + @indent += 1 + if @lex_state == EXPR_FNAME + t = Token(TkfLBRACK) + else + if @lex_state == EXPR_BEG || @lex_state == EXPR_MID + t = Token(TkLBRACK) + elsif @lex_state == EXPR_ARG && @space_seen + t = Token(TkLBRACK) + else + t = Token(TkfLBRACK) + end + @lex_state = EXPR_BEG + end + t.set_text("[") + end + + @OP.def_rule("{") do + @indent += 1 + if @lex_state != EXPR_END && @lex_state != EXPR_ARG + t = Token(TkLBRACE) + else + t = Token(TkfLBRACE) + end + @lex_state = EXPR_BEG + t.set_text("{") + end + + @OP.def_rule('\\') do #' + if getc == "\n" + @space_seen = true + @continue = true + Token(TkSPACE).set_text("\\\n") + else + ungetc + Token("\\").set_text("\\") #" + end + end + + @OP.def_rule('%') do + |op, io| + if @lex_state == EXPR_BEG || @lex_state == EXPR_MID + identify_quotation('%') + elsif peek(0) == '=' + getc + Token(TkOPASGN, "%").set_text("%=") + elsif @lex_state == EXPR_ARG and @space_seen and peek(0) !~ /\s/ + identify_quotation('%') + else + @lex_state = EXPR_BEG + Token("%").set_text("%") + end + end + + @OP.def_rule('$') do #' + identify_gvar + end + + @OP.def_rule('@') do + if peek(0) =~ /[@\w_]/ + ungetc + identify_identifier + else + Token("@").set_text("@") + end + end + + @OP.def_rule("__END__", proc{@prev_char_no == 0 && peek(0) =~ /[\r\n]/}) do + throw :eof + end + + @OP.def_rule("") do + |op, io| + printf "MATCH: start %s: %s\n", op, io.inspect if RDoc::RubyLex.debug? + if peek(0) =~ /[0-9]/ + t = identify_number("") + elsif peek(0) =~ /[\w_]/ + t = identify_identifier + end + printf "MATCH: end %s: %s\n", op, io.inspect if RDoc::RubyLex.debug? + t + end + end + + def identify_gvar + @lex_state = EXPR_END + str = "$" + + tk = case ch = getc + when /[~_*$?!@\/\\;,=:<>".]/ #" + str << ch + Token(TkGVAR, str) + + when "-" + str << "-" << getc + Token(TkGVAR, str) + + when "&", "`", "'", "+" + str << ch + Token(TkBACK_REF, str) + + when /[1-9]/ + str << ch + while (ch = getc) =~ /[0-9]/ + str << ch + end + ungetc + Token(TkNTH_REF) + when /\w/ + ungetc + ungetc + return identify_identifier + else + ungetc + Token("$") + end + tk.set_text(str) + end + + def identify_identifier + token = "" + token.concat getc if peek(0) =~ /[$@]/ + token.concat getc if peek(0) == "@" + + while (ch = getc) =~ /\w|_/ + print ":", ch, ":" if RDoc::RubyLex.debug? + token.concat ch + end + ungetc + + if ch == "!" or ch == "?" + token.concat getc + end + # fix token + + # $stderr.puts "identifier - #{token}, state = #@lex_state" + + case token + when /^\$/ + return Token(TkGVAR, token).set_text(token) + when /^\@/ + @lex_state = EXPR_END + return Token(TkIVAR, token).set_text(token) + end + + if @lex_state != EXPR_DOT + print token, "\n" if RDoc::RubyLex.debug? + + token_c, *trans = TkReading2Token[token] + if token_c + # reserved word? + + if (@lex_state != EXPR_BEG && + @lex_state != EXPR_FNAME && + trans[1]) + # modifiers + token_c = TkSymbol2Token[trans[1]] + @lex_state = trans[0] + else + if @lex_state != EXPR_FNAME + if ENINDENT_CLAUSE.include?(token) + @indent += 1 + elsif DEINDENT_CLAUSE.include?(token) + @indent -= 1 + end + @lex_state = trans[0] + else + @lex_state = EXPR_END + end + end + return Token(token_c, token).set_text(token) + end + end + + if @lex_state == EXPR_FNAME + @lex_state = EXPR_END + if peek(0) == '=' + token.concat getc + end + elsif @lex_state == EXPR_BEG || @lex_state == EXPR_DOT + @lex_state = EXPR_ARG + else + @lex_state = EXPR_END + end + + if token[0, 1] =~ /[A-Z]/ + return Token(TkCONSTANT, token).set_text(token) + elsif token[token.size - 1, 1] =~ /[!?]/ + return Token(TkFID, token).set_text(token) + else + return Token(TkIDENTIFIER, token).set_text(token) + end + end + + def identify_here_document + ch = getc + if ch == "-" + ch = getc + indent = true + end + if /['"`]/ =~ ch # ' + lt = ch + quoted = "" + while (c = getc) && c != lt + quoted.concat c + end + else + lt = '"' + quoted = ch.dup + while (c = getc) && c =~ /\w/ + quoted.concat c + end + ungetc + end + + ltback, @ltype = @ltype, lt + reserve = "" + + while ch = getc + reserve << ch + if ch == "\\" #" + ch = getc + reserve << ch + elsif ch == "\n" + break + end + end + + str = "" + while (l = gets) + l.chomp! + l.strip! if indent + break if l == quoted + str << l.chomp << "\n" + end + + @reader.divert_read_from(reserve) + + @ltype = ltback + @lex_state = EXPR_END + Token(Ltype2Token[lt], str).set_text(str.dump) + end + + def identify_quotation(initial_char) + ch = getc + if lt = PERCENT_LTYPE[ch] + initial_char += ch + ch = getc + elsif ch =~ /\W/ + lt = "\"" + else + fail SyntaxError, "unknown type of %string ('#{ch}')" + end +# if ch !~ /\W/ +# ungetc +# next +# end + #@ltype = lt + @quoted = ch unless @quoted = PERCENT_PAREN[ch] + identify_string(lt, @quoted, ch, initial_char) + end + + def identify_number(start) + str = start.dup + + if start == "+" or start == "-" or start == "" + start = getc + str << start + end + + @lex_state = EXPR_END + + if start == "0" + if peek(0) == "x" + ch = getc + str << ch + match = /[0-9a-f_]/ + else + match = /[0-7_]/ + end + while ch = getc + if ch !~ match + ungetc + break + else + str << ch + end + end + return Token(TkINTEGER).set_text(str) + end + + type = TkINTEGER + allow_point = TRUE + allow_e = TRUE + while ch = getc + case ch + when /[0-9_]/ + str << ch + + when allow_point && "." + type = TkFLOAT + if peek(0) !~ /[0-9]/ + ungetc + break + end + str << ch + allow_point = false + + when allow_e && "e", allow_e && "E" + str << ch + type = TkFLOAT + if peek(0) =~ /[+-]/ + str << getc + end + allow_e = false + allow_point = false + else + ungetc + break + end + end + Token(type).set_text(str) + end + + def identify_string(ltype, quoted = ltype, opener=nil, initial_char = nil) + @ltype = ltype + @quoted = quoted + subtype = nil + + str = "" + str << initial_char if initial_char + str << (opener||quoted) + + nest = 0 + begin + while ch = getc + str << ch + if @quoted == ch + if nest == 0 + break + else + nest -= 1 + end + elsif opener == ch + nest += 1 + elsif @ltype != "'" && @ltype != "]" and ch == "#" + ch = getc + if ch == "{" + subtype = true + str << ch << skip_inner_expression + else + ungetc(ch) + end + elsif ch == '\\' #' + str << read_escape + end + end + if @ltype == "/" + if peek(0) =~ /i|o|n|e|s/ + str << getc + end + end + if subtype + Token(DLtype2Token[ltype], str) + else + Token(Ltype2Token[ltype], str) + end.set_text(str) + ensure + @ltype = nil + @quoted = nil + @lex_state = EXPR_END + end + end + + def skip_inner_expression + res = "" + nest = 0 + while (ch = getc) + res << ch + if ch == '}' + break if nest.zero? + nest -= 1 + elsif ch == '{' + nest += 1 + end + end + res + end + + def identify_comment + @ltype = "#" + comment = "#" + while ch = getc + if ch == "\\" + ch = getc + if ch == "\n" + ch = " " + else + comment << "\\" + end + else + if ch == "\n" + @ltype = nil + ungetc + break + end + end + comment << ch + end + return Token(TkCOMMENT).set_text(comment) + end + + def read_escape + res = "" + case ch = getc + when /[0-7]/ + ungetc ch + 3.times do + case ch = getc + when /[0-7]/ + when nil + break + else + ungetc + break + end + res << ch + end + + when "x" + res << ch + 2.times do + case ch = getc + when /[0-9a-fA-F]/ + when nil + break + else + ungetc + break + end + res << ch + end + + when "M" + res << ch + if (ch = getc) != '-' + ungetc + else + res << ch + if (ch = getc) == "\\" #" + res << ch + res << read_escape + else + res << ch + end + end + + when "C", "c" #, "^" + res << ch + if ch == "C" and (ch = getc) != "-" + ungetc + else + res << ch + if (ch = getc) == "\\" #" + res << ch + res << read_escape + else + res << ch + end + end + else + res << ch + end + res + end +end + +## +# Extracts code elements from a source file returning a TopLevel object +# containing the constituent file elements. +# +# This file is based on rtags +# +# RubyParser understands how to document: +# * classes +# * modules +# * methods +# * constants +# * aliases +# * private, public, protected +# * private_class_function, public_class_function +# * module_function +# * attr, attr_reader, attr_writer, attr_accessor +# * extra accessors given on the command line +# * metaprogrammed methods +# * require +# * include +# +# == Method Arguments +# +#-- +# NOTE: I don't think this works, needs tests, remove the paragraph following +# this block when known to work +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :args: directive: +# +# ## +# # This method tries over and over until it is tired +# +# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try +# puts thing_to_try +# go_go_go thing_to_try, tries - 1 +# end +# +# If you have a more-complex set of overrides you can use the :call-seq: +# directive: +#++ +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :call-seq: +# directive: +# +# ## +# # This method can be called with a range or an offset and length +# # +# # :call-seq: +# # my_method(Range) +# # my_method(offset, length) +# +# def my_method(*args) +# end +# +# The parser extracts +yield+ expressions from method bodies to gather the +# yielded argument names. If your method manually calls a block instead of +# yielding or you want to override the discovered argument names use +# the :yields: directive: +# +# ## +# # My method is awesome +# +# def my_method(&block) # :yields: happy, times +# block.call 1, 2 +# end +# +# == Metaprogrammed Methods +# +# To pick up a metaprogrammed method, the parser looks for a comment starting +# with '##' before an identifier: +# +# ## +# # This is a meta-programmed method! +# +# add_my_method :meta_method, :arg1, :arg2 +# +# The parser looks at the token after the identifier to determine the name, in +# this example, :meta_method. If a name cannot be found, a warning is printed +# and 'unknown is used. +# +# You can force the name of a method using the :method: directive: +# +# ## +# # :method: woo_hoo! +# +# By default, meta-methods are instance methods. To indicate that a method is +# a singleton method instead use the :singleton-method: directive: +# +# ## +# # :singleton-method: +# +# You can also use the :singleton-method: directive with a name: +# +# ## +# # :singleton-method: woo_hoo! +# +# == Hidden methods +# +# You can provide documentation for methods that don't appear using +# the :method: and :singleton-method: directives: +# +# ## +# # :method: ghost_method +# # There is a method here, but you can't see it! +# +# ## +# # this is a comment for a regular method +# +# def regular_method() end +# +# Note that by default, the :method: directive will be ignored if there is a +# standard rdocable item following it. + +class RDoc::Parser::Ruby < RDoc::Parser + + parse_files_matching(/\.rbw?$/) + + include RDoc::RubyToken + include RDoc::TokenStream + + NORMAL = "::" + SINGLE = "<<" + + def initialize(top_level, file_name, content, options, stats) + super + + @size = 0 + @token_listeners = nil + @scanner = RDoc::RubyLex.new content, @options + @scanner.exception_on_syntax_error = false + + reset + end + + def add_token_listener(obj) + @token_listeners ||= [] + @token_listeners << obj + end + + ## + # Look for the first comment in a file that isn't a shebang line. + + def collect_first_comment + skip_tkspace + res = '' + first_line = true + + tk = get_tk + + while TkCOMMENT === tk + if first_line and tk.text =~ /\A#!/ then + skip_tkspace + tk = get_tk + elsif first_line and tk.text =~ /\A#\s*-\*-/ then + first_line = false + skip_tkspace + tk = get_tk + else + first_line = false + res << tk.text << "\n" + tk = get_tk + + if TkNL === tk then + skip_tkspace false + tk = get_tk + end + end + end + + unget_tk tk + + res + end + + def error(msg) + msg = make_message msg + $stderr.puts msg + exit(1) + end + + ## + # Look for a 'call-seq' in the comment, and override the normal parameter + # stuff + + def extract_call_seq(comment, meth) + if comment.sub!(/:?call-seq:(.*?)^\s*\#?\s*$/m, '') then + seq = $1 + seq.gsub!(/^\s*\#\s*/, '') + meth.call_seq = seq + end + + meth + end + + def get_bool + skip_tkspace + tk = get_tk + case tk + when TkTRUE + true + when TkFALSE, TkNIL + false + else + unget_tk tk + true + end + end + + ## + # Look for the name of a class of module (optionally with a leading :: or + # with :: separated named) and return the ultimate name and container + + def get_class_or_module(container) + skip_tkspace + name_t = get_tk + + # class ::A -> A is in the top level + if TkCOLON2 === name_t then + name_t = get_tk + container = @top_level + end + + skip_tkspace(false) + + while TkCOLON2 === peek_tk do + prev_container = container + container = container.find_module_named(name_t.name) + if !container +# warn("Couldn't find module #{name_t.name}") + container = prev_container.add_module RDoc::NormalModule, name_t.name + end + get_tk + name_t = get_tk + end + skip_tkspace(false) + return [container, name_t] + end + + ## + # Return a superclass, which can be either a constant of an expression + + def get_class_specification + tk = get_tk + return "self" if TkSELF === tk + + res = "" + while TkCOLON2 === tk or TkCOLON3 === tk or TkCONSTANT === tk do + res += tk.text + tk = get_tk + end + + unget_tk(tk) + skip_tkspace(false) + + get_tkread # empty out read buffer + + tk = get_tk + + case tk + when TkNL, TkCOMMENT, TkSEMICOLON then + unget_tk(tk) + return res + end + + res += parse_call_parameters(tk) + res + end + + ## + # Parse a constant, which might be qualified by one or more class or module + # names + + def get_constant + res = "" + skip_tkspace(false) + tk = get_tk + + while TkCOLON2 === tk or TkCOLON3 === tk or TkCONSTANT === tk do + res += tk.text + tk = get_tk + end + +# if res.empty? +# warn("Unexpected token #{tk} in constant") +# end + unget_tk(tk) + res + end + + ## + # Get a constant that may be surrounded by parens + + def get_constant_with_optional_parens + skip_tkspace(false) + nest = 0 + while TkLPAREN === (tk = peek_tk) or TkfLPAREN === tk do + get_tk + skip_tkspace(true) + nest += 1 + end + + name = get_constant + + while nest > 0 + skip_tkspace(true) + tk = get_tk + nest -= 1 if TkRPAREN === tk + end + name + end + + def get_symbol_or_name + tk = get_tk + case tk + when TkSYMBOL + tk.text.sub(/^:/, '') + when TkId, TkOp + tk.name + when TkSTRING + tk.text + else + raise "Name or symbol expected (got #{tk})" + end + end + + def get_tk + tk = nil + if @tokens.empty? + tk = @scanner.token + @read.push @scanner.get_read + puts "get_tk1 => #{tk.inspect}" if $TOKEN_DEBUG + else + @read.push @unget_read.shift + tk = @tokens.shift + puts "get_tk2 => #{tk.inspect}" if $TOKEN_DEBUG + end + + if TkSYMBEG === tk then + set_token_position(tk.line_no, tk.char_no) + tk1 = get_tk + if TkId === tk1 or TkOp === tk1 or TkSTRING === tk1 then + if tk1.respond_to?(:name) + tk = Token(TkSYMBOL).set_text(":" + tk1.name) + else + tk = Token(TkSYMBOL).set_text(":" + tk1.text) + end + # remove the identifier we just read (we're about to + # replace it with a symbol) + @token_listeners.each do |obj| + obj.pop_token + end if @token_listeners + else + warn("':' not followed by identifier or operator") + tk = tk1 + end + end + + # inform any listeners of our shiny new token + @token_listeners.each do |obj| + obj.add_token(tk) + end if @token_listeners + + tk + end + + def get_tkread + read = @read.join("") + @read = [] + read + end + + ## + # Look for directives in a normal comment block: + # + # #-- - don't display comment from this point forward + # + # This routine modifies it's parameter + + def look_for_directives_in(context, comment) + preprocess = RDoc::Markup::PreProcess.new(@file_name, + @options.rdoc_include) + + preprocess.handle(comment) do |directive, param| + case directive + when 'enddoc' then + throw :enddoc + when 'main' then + @options.main_page = param + '' + when 'method', 'singleton-method' then + false # ignore + when 'section' then + context.set_current_section(param, comment) + comment.replace '' + break + when 'startdoc' then + context.start_doc + context.force_documentation = true + '' + when 'stopdoc' then + context.stop_doc + '' + when 'title' then + @options.title = param + '' + else + warn "Unrecognized directive '#{directive}'" + false + end + end + + remove_private_comments(comment) + end + + def make_message(msg) + prefix = "\n" + @file_name + ":" + if @scanner + prefix << "#{@scanner.line_no}:#{@scanner.char_no}: " + end + return prefix + msg + end + + def parse_attr(context, single, tk, comment) + args = parse_symbol_arg(1) + if args.size > 0 + name = args[0] + rw = "R" + skip_tkspace(false) + tk = get_tk + if TkCOMMA === tk then + rw = "RW" if get_bool + else + unget_tk tk + end + att = RDoc::Attr.new get_tkread, name, rw, comment + read_documentation_modifiers att, RDoc::ATTR_MODIFIERS + if att.document_self + context.add_attribute(att) + end + else + warn("'attr' ignored - looks like a variable") + end + end + + def parse_attr_accessor(context, single, tk, comment) + args = parse_symbol_arg + read = get_tkread + rw = "?" + + # If nodoc is given, don't document any of them + + tmp = RDoc::CodeObject.new + read_documentation_modifiers tmp, RDoc::ATTR_MODIFIERS + return unless tmp.document_self + + case tk.name + when "attr_reader" then rw = "R" + when "attr_writer" then rw = "W" + when "attr_accessor" then rw = "RW" + else + rw = @options.extra_accessor_flags[tk.name] + rw = '?' if rw.nil? + end + + for name in args + att = RDoc::Attr.new get_tkread, name, rw, comment + context.add_attribute att + end + end + + def parse_alias(context, single, tk, comment) + skip_tkspace + if TkLPAREN === peek_tk then + get_tk + skip_tkspace + end + new_name = get_symbol_or_name + @scanner.instance_eval{@lex_state = EXPR_FNAME} + skip_tkspace + if TkCOMMA === peek_tk then + get_tk + skip_tkspace + end + old_name = get_symbol_or_name + + al = RDoc::Alias.new get_tkread, old_name, new_name, comment + read_documentation_modifiers al, RDoc::ATTR_MODIFIERS + if al.document_self + context.add_alias(al) + end + end + + def parse_call_parameters(tk) + end_token = case tk + when TkLPAREN, TkfLPAREN + TkRPAREN + when TkRPAREN + return "" + else + TkNL + end + nest = 0 + + loop do + case tk + when TkSEMICOLON + break + when TkLPAREN, TkfLPAREN + nest += 1 + when end_token + if end_token == TkRPAREN + nest -= 1 + break if @scanner.lex_state == EXPR_END and nest <= 0 + else + break unless @scanner.continue + end + when TkCOMMENT + unget_tk(tk) + break + end + tk = get_tk + end + res = get_tkread.tr("\n", " ").strip + res = "" if res == ";" + res + end + + def parse_class(container, single, tk, comment) + container, name_t = get_class_or_module(container) + + case name_t + when TkCONSTANT + name = name_t.name + superclass = "Object" + + if TkLT === peek_tk then + get_tk + skip_tkspace(true) + superclass = get_class_specification + superclass = "" if superclass.empty? + end + + cls_type = single == SINGLE ? RDoc::SingleClass : RDoc::NormalClass + cls = container.add_class cls_type, name, superclass + + @stats.add_class cls + + read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS + cls.record_location @top_level + + parse_statements cls + cls.comment = comment + + when TkLSHFT + case name = get_class_specification + when "self", container.name + parse_statements(container, SINGLE) + else + other = RDoc::TopLevel.find_class_named(name) + unless other + # other = @top_level.add_class(NormalClass, name, nil) + # other.record_location(@top_level) + # other.comment = comment + other = RDoc::NormalClass.new "Dummy", nil + end + + @stats.add_class other + + read_documentation_modifiers other, RDoc::CLASS_MODIFIERS + parse_statements(other, SINGLE) + end + + else + warn("Expected class name or '<<'. Got #{name_t.class}: #{name_t.text.inspect}") + end + end + + def parse_constant(container, single, tk, comment) + name = tk.name + skip_tkspace(false) + eq_tk = get_tk + + unless TkASSIGN === eq_tk then + unget_tk(eq_tk) + return + end + + + nest = 0 + get_tkread + + tk = get_tk + if TkGT === tk then + unget_tk(tk) + unget_tk(eq_tk) + return + end + + loop do + case tk + when TkSEMICOLON + break + when TkLPAREN, TkfLPAREN, TkLBRACE, TkLBRACK, TkDO + nest += 1 + when TkRPAREN, TkRBRACE, TkRBRACK, TkEND + nest -= 1 + when TkCOMMENT + if nest <= 0 && @scanner.lex_state == EXPR_END + unget_tk(tk) + break + end + when TkNL + if (nest <= 0) && ((@scanner.lex_state == EXPR_END) || (!@scanner.continue)) + unget_tk(tk) + break + end + end + tk = get_tk + end + + res = get_tkread.tr("\n", " ").strip + res = "" if res == ";" + + con = RDoc::Constant.new name, res, comment + read_documentation_modifiers con, RDoc::CONSTANT_MODIFIERS + + if con.document_self + container.add_constant(con) + end + end + + def parse_comment(container, tk, comment) + line_no = tk.line_no + column = tk.char_no + + singleton = !!comment.sub!(/(^# +:?)(singleton-)(method:)/, '\1\3') + + if comment.sub!(/^# +:?method: *(\S*).*?\n/i, '') then + name = $1 unless $1.empty? + else + return nil + end + + meth = RDoc::GhostMethod.new get_tkread, name + meth.singleton = singleton + + @stats.add_method meth + + meth.start_collecting_tokens + indent = TkSPACE.new 1, 1 + indent.set_text " " * column + + position_comment = TkCOMMENT.new(line_no, 1, "# File #{@top_level.file_absolute_name}, line #{line_no}") + meth.add_tokens [position_comment, NEWLINE_TOKEN, indent] + + meth.params = '' + + extract_call_seq comment, meth + + container.add_method meth if meth.document_self + + meth.comment = comment + end + + def parse_include(context, comment) + loop do + skip_tkspace_comment + + name = get_constant_with_optional_parens + context.add_include RDoc::Include.new(name, comment) unless name.empty? + + return unless TkCOMMA === peek_tk + get_tk + end + end + + ## + # Parses a meta-programmed method + + def parse_meta_method(container, single, tk, comment) + line_no = tk.line_no + column = tk.char_no + + start_collecting_tokens + add_token tk + add_token_listener self + + skip_tkspace false + + singleton = !!comment.sub!(/(^# +:?)(singleton-)(method:)/, '\1\3') + + if comment.sub!(/^# +:?method: *(\S*).*?\n/i, '') then + name = $1 unless $1.empty? + end + + if name.nil? then + name_t = get_tk + case name_t + when TkSYMBOL then + name = name_t.text[1..-1] + when TkSTRING then + name = name_t.text[1..-2] + else + warn "#{container.top_level.file_relative_name}:#{name_t.line_no} unknown name token #{name_t.inspect} for meta-method" + name = 'unknown' + end + end + + meth = RDoc::MetaMethod.new get_tkread, name + meth.singleton = singleton + + @stats.add_method meth + + remove_token_listener self + + meth.start_collecting_tokens + indent = TkSPACE.new 1, 1 + indent.set_text " " * column + + position_comment = TkCOMMENT.new(line_no, 1, "# File #{@top_level.file_absolute_name}, line #{line_no}") + meth.add_tokens [position_comment, NEWLINE_TOKEN, indent] + meth.add_tokens @token_stream + + add_token_listener meth + + meth.params = '' + + extract_call_seq comment, meth + + container.add_method meth if meth.document_self + + last_tk = tk + + while tk = get_tk do + case tk + when TkSEMICOLON then + break + when TkNL then + break unless last_tk and TkCOMMA === last_tk + when TkSPACE then + # expression continues + else + last_tk = tk + end + end + + remove_token_listener meth + + meth.comment = comment + end + + ## + # Parses a method + + def parse_method(container, single, tk, comment) + line_no = tk.line_no + column = tk.char_no + + start_collecting_tokens + add_token(tk) + add_token_listener(self) + + @scanner.instance_eval do @lex_state = EXPR_FNAME end + + skip_tkspace(false) + name_t = get_tk + back_tk = skip_tkspace + meth = nil + added_container = false + + dot = get_tk + if TkDOT === dot or TkCOLON2 === dot then + @scanner.instance_eval do @lex_state = EXPR_FNAME end + skip_tkspace + name_t2 = get_tk + + case name_t + when TkSELF then + name = name_t2.name + when TkCONSTANT then + name = name_t2.name + prev_container = container + container = container.find_module_named(name_t.name) + unless container then + added_container = true + obj = name_t.name.split("::").inject(Object) do |state, item| + state.const_get(item) + end rescue nil + + type = obj.class == Class ? RDoc::NormalClass : RDoc::NormalModule + + unless [Class, Module].include?(obj.class) then + warn("Couldn't find #{name_t.name}. Assuming it's a module") + end + + if type == RDoc::NormalClass then + container = prev_container.add_class(type, name_t.name, obj.superclass.name) + else + container = prev_container.add_module(type, name_t.name) + end + + container.record_location @top_level + end + else + # warn("Unexpected token '#{name_t2.inspect}'") + # break + skip_method(container) + return + end + + meth = RDoc::AnyMethod.new(get_tkread, name) + meth.singleton = true + else + unget_tk dot + back_tk.reverse_each do |token| + unget_tk token + end + name = name_t.name + + meth = RDoc::AnyMethod.new get_tkread, name + meth.singleton = (single == SINGLE) + end + + @stats.add_method meth + + remove_token_listener self + + meth.start_collecting_tokens + indent = TkSPACE.new 1, 1 + indent.set_text " " * column + + token = TkCOMMENT.new(line_no, 1, "# File #{@top_level.file_absolute_name}, line #{line_no}") + meth.add_tokens [token, NEWLINE_TOKEN, indent] + meth.add_tokens @token_stream + + add_token_listener meth + + @scanner.instance_eval do @continue = false end + parse_method_parameters meth + + if meth.document_self then + container.add_method meth + elsif added_container then + container.document_self = false + end + + # Having now read the method parameters and documentation modifiers, we + # now know whether we have to rename #initialize to ::new + + if name == "initialize" && !meth.singleton then + if meth.dont_rename_initialize then + meth.visibility = :protected + else + meth.singleton = true + meth.name = "new" + meth.visibility = :public + end + end + + parse_statements(container, single, meth) + + remove_token_listener(meth) + + extract_call_seq comment, meth + + meth.comment = comment + end + + def parse_method_or_yield_parameters(method = nil, + modifiers = RDoc::METHOD_MODIFIERS) + skip_tkspace(false) + tk = get_tk + + # Little hack going on here. In the statement + # f = 2*(1+yield) + # We see the RPAREN as the next token, so we need + # to exit early. This still won't catch all cases + # (such as "a = yield + 1" + end_token = case tk + when TkLPAREN, TkfLPAREN + TkRPAREN + when TkRPAREN + return "" + else + TkNL + end + nest = 0 + + loop do + case tk + when TkSEMICOLON + break + when TkLBRACE + nest += 1 + when TkRBRACE + # we might have a.each {|i| yield i } + unget_tk(tk) if nest.zero? + nest -= 1 + break if nest <= 0 + when TkLPAREN, TkfLPAREN + nest += 1 + when end_token + if end_token == TkRPAREN + nest -= 1 + break if @scanner.lex_state == EXPR_END and nest <= 0 + else + break unless @scanner.continue + end + when method && method.block_params.nil? && TkCOMMENT + unget_tk(tk) + read_documentation_modifiers(method, modifiers) + end + tk = get_tk + end + res = get_tkread.tr("\n", " ").strip + res = "" if res == ";" + res + end + + ## + # Capture the method's parameters. Along the way, look for a comment + # containing: + # + # # yields: .... + # + # and add this as the block_params for the method + + def parse_method_parameters(method) + res = parse_method_or_yield_parameters(method) + res = "(" + res + ")" unless res[0] == ?( + method.params = res unless method.params + if method.block_params.nil? + skip_tkspace(false) + read_documentation_modifiers method, RDoc::METHOD_MODIFIERS + end + end + + def parse_module(container, single, tk, comment) + container, name_t = get_class_or_module(container) + + name = name_t.name + + mod = container.add_module RDoc::NormalModule, name + mod.record_location @top_level + + @stats.add_module mod + + read_documentation_modifiers mod, RDoc::CLASS_MODIFIERS + parse_statements(mod) + mod.comment = comment + end + + def parse_require(context, comment) + skip_tkspace_comment + tk = get_tk + if TkLPAREN === tk then + skip_tkspace_comment + tk = get_tk + end + + name = nil + case tk + when TkSTRING + name = tk.text + # when TkCONSTANT, TkIDENTIFIER, TkIVAR, TkGVAR + # name = tk.name + when TkDSTRING + warn "Skipping require of dynamic string: #{tk.text}" + # else + # warn "'require' used as variable" + end + if name + context.add_require RDoc::Require.new(name, comment) + else + unget_tk(tk) + end + end + + def parse_statements(container, single = NORMAL, current_method = nil, + comment = '') + nest = 1 + save_visibility = container.visibility + + non_comment_seen = true + + while tk = get_tk do + keep_comment = false + + non_comment_seen = true unless TkCOMMENT === tk + + case tk + when TkNL then + skip_tkspace true # Skip blanks and newlines + tk = get_tk + + if TkCOMMENT === tk then + if non_comment_seen then + # Look for RDoc in a comment about to be thrown away + parse_comment container, tk, comment unless comment.empty? + + comment = '' + non_comment_seen = false + end + + while TkCOMMENT === tk do + comment << tk.text << "\n" + tk = get_tk # this is the newline + skip_tkspace(false) # leading spaces + tk = get_tk + end + + unless comment.empty? then + look_for_directives_in container, comment + + if container.done_documenting then + container.ongoing_visibility = save_visibility + end + end + + keep_comment = true + else + non_comment_seen = true + end + + unget_tk tk + keep_comment = true + + when TkCLASS then + if container.document_children then + parse_class container, single, tk, comment + else + nest += 1 + end + + when TkMODULE then + if container.document_children then + parse_module container, single, tk, comment + else + nest += 1 + end + + when TkDEF then + if container.document_self then + parse_method container, single, tk, comment + else + nest += 1 + end + + when TkCONSTANT then + if container.document_self then + parse_constant container, single, tk, comment + end + + when TkALIAS then + if container.document_self then + parse_alias container, single, tk, comment + end + + when TkYIELD then + if current_method.nil? then + warn "Warning: yield outside of method" if container.document_self + else + parse_yield container, single, tk, current_method + end + + # Until and While can have a 'do', which shouldn't increase the nesting. + # We can't solve the general case, but we can handle most occurrences by + # ignoring a do at the end of a line. + + when TkUNTIL, TkWHILE then + nest += 1 + skip_optional_do_after_expression + + # 'for' is trickier + when TkFOR then + nest += 1 + skip_for_variable + skip_optional_do_after_expression + + when TkCASE, TkDO, TkIF, TkUNLESS, TkBEGIN then + nest += 1 + + when TkIDENTIFIER then + if nest == 1 and current_method.nil? then + case tk.name + when 'private', 'protected', 'public', 'private_class_method', + 'public_class_method', 'module_function' then + parse_visibility container, single, tk + keep_comment = true + when 'attr' then + parse_attr container, single, tk, comment + when /^attr_(reader|writer|accessor)$/, @options.extra_accessors then + parse_attr_accessor container, single, tk, comment + when 'alias_method' then + if container.document_self then + parse_alias container, single, tk, comment + end + else + if container.document_self and comment =~ /\A#\#$/ then + parse_meta_method container, single, tk, comment + end + end + end + + case tk.name + when "require" then + parse_require container, comment + when "include" then + parse_include container, comment + end + + when TkEND then + nest -= 1 + if nest == 0 then + read_documentation_modifiers container, RDoc::CLASS_MODIFIERS + container.ongoing_visibility = save_visibility + return + end + + end + + comment = '' unless keep_comment + + begin + get_tkread + skip_tkspace(false) + end while peek_tk == TkNL + end + end + + def parse_symbol_arg(no = nil) + args = [] + skip_tkspace_comment + case tk = get_tk + when TkLPAREN + loop do + skip_tkspace_comment + if tk1 = parse_symbol_in_arg + args.push tk1 + break if no and args.size >= no + end + + skip_tkspace_comment + case tk2 = get_tk + when TkRPAREN + break + when TkCOMMA + else + warn("unexpected token: '#{tk2.inspect}'") if $DEBUG_RDOC + break + end + end + else + unget_tk tk + if tk = parse_symbol_in_arg + args.push tk + return args if no and args.size >= no + end + + loop do + skip_tkspace(false) + + tk1 = get_tk + unless TkCOMMA === tk1 then + unget_tk tk1 + break + end + + skip_tkspace_comment + if tk = parse_symbol_in_arg + args.push tk + break if no and args.size >= no + end + end + end + args + end + + def parse_symbol_in_arg + case tk = get_tk + when TkSYMBOL + tk.text.sub(/^:/, '') + when TkSTRING + eval @read[-1] + else + warn("Expected symbol or string, got #{tk.inspect}") if $DEBUG_RDOC + nil + end + end + + def parse_toplevel_statements(container) + comment = collect_first_comment + look_for_directives_in(container, comment) + container.comment = comment unless comment.empty? + parse_statements container, NORMAL, nil, comment + end + + def parse_visibility(container, single, tk) + singleton = (single == SINGLE) + + vis_type = tk.name + + vis = case vis_type + when 'private' then :private + when 'protected' then :protected + when 'public' then :public + when 'private_class_method' then + singleton = true + :private + when 'public_class_method' then + singleton = true + :public + when 'module_function' then + singleton = true + :public + else + raise "Invalid visibility: #{tk.name}" + end + + skip_tkspace_comment false + + case peek_tk + # Ryan Davis suggested the extension to ignore modifiers, because he + # often writes + # + # protected unless $TESTING + # + when TkNL, TkUNLESS_MOD, TkIF_MOD, TkSEMICOLON then + container.ongoing_visibility = vis + else + if vis_type == 'module_function' then + args = parse_symbol_arg + container.set_visibility_for args, :private, false + + module_functions = [] + + container.methods_matching args do |m| + s_m = m.dup + s_m.singleton = true if RDoc::AnyMethod === s_m + s_m.visibility = :public + module_functions << s_m + end + + module_functions.each do |s_m| + case s_m + when RDoc::AnyMethod then + container.add_method s_m + when RDoc::Attr then + container.add_attribute s_m + end + end + else + args = parse_symbol_arg + container.set_visibility_for args, vis, singleton + end + end + end + + def parse_yield_parameters + parse_method_or_yield_parameters + end + + def parse_yield(context, single, tk, method) + if method.block_params.nil? + get_tkread + @scanner.instance_eval{@continue = false} + method.block_params = parse_yield_parameters + end + end + + def peek_read + @read.join('') + end + + ## + # Peek at the next token, but don't remove it from the stream + + def peek_tk + unget_tk(tk = get_tk) + tk + end + + ## + # Directives are modifier comments that can appear after class, module, or + # method names. For example: + # + # def fred # :yields: a, b + # + # or: + # + # class MyClass # :nodoc: + # + # We return the directive name and any parameters as a two element array + + def read_directive(allowed) + tk = get_tk + result = nil + if TkCOMMENT === tk + if tk.text =~ /\s*:?(\w+):\s*(.*)/ + directive = $1.downcase + if allowed.include?(directive) + result = [directive, $2] + end + end + else + unget_tk(tk) + end + result + end + + def read_documentation_modifiers(context, allow) + dir = read_directive(allow) + + case dir[0] + when "notnew", "not_new", "not-new" then + context.dont_rename_initialize = true + + when "nodoc" then + context.document_self = false + if dir[1].downcase == "all" + context.document_children = false + end + + when "doc" then + context.document_self = true + context.force_documentation = true + + when "yield", "yields" then + unless context.params.nil? + context.params.sub!(/(,|)\s*&\w+/,'') # remove parameter &proc + end + + context.block_params = dir[1] + + when "arg", "args" then + context.params = dir[1] + end if dir + end + + def remove_private_comments(comment) + comment.gsub!(/^#--\n.*?^#\+\+/m, '') + comment.sub!(/^#--\n.*/m, '') + end + + def remove_token_listener(obj) + @token_listeners.delete(obj) + end + + def reset + @tokens = [] + @unget_read = [] + @read = [] + end + + def scan + reset + + catch(:eof) do + catch(:enddoc) do + begin + parse_toplevel_statements(@top_level) + rescue Exception => e + $stderr.puts <<-EOF + + +RDoc failure in #{@file_name} at or around line #{@scanner.line_no} column +#{@scanner.char_no} + +Before reporting this, could you check that the file you're documenting +compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if +fed invalid programs. + +The internal error was: + + EOF + + e.set_backtrace(e.backtrace[0,4]) + raise + end + end + end + + @top_level + end + + ## + # while, until, and for have an optional do + + def skip_optional_do_after_expression + skip_tkspace(false) + tk = get_tk + case tk + when TkLPAREN, TkfLPAREN + end_token = TkRPAREN + else + end_token = TkNL + end + + nest = 0 + @scanner.instance_eval{@continue = false} + + loop do + case tk + when TkSEMICOLON + break + when TkLPAREN, TkfLPAREN + nest += 1 + when TkDO + break if nest.zero? + when end_token + if end_token == TkRPAREN + nest -= 1 + break if @scanner.lex_state == EXPR_END and nest.zero? + else + break unless @scanner.continue + end + end + tk = get_tk + end + skip_tkspace(false) + + get_tk if TkDO === peek_tk + end + + ## + # skip the var [in] part of a 'for' statement + + def skip_for_variable + skip_tkspace(false) + tk = get_tk + skip_tkspace(false) + tk = get_tk + unget_tk(tk) unless TkIN === tk + end + + def skip_method(container) + meth = RDoc::AnyMethod.new "", "anon" + parse_method_parameters(meth) + parse_statements(container, false, meth) + end + + ## + # Skip spaces + + def skip_tkspace(skip_nl = true) + tokens = [] + + while TkSPACE === (tk = get_tk) or (skip_nl and TkNL === tk) do + tokens.push tk + end + + unget_tk(tk) + tokens + end + + ## + # Skip spaces until a comment is found + + def skip_tkspace_comment(skip_nl = true) + loop do + skip_tkspace(skip_nl) + return unless TkCOMMENT === peek_tk + get_tk + end + end + + def unget_tk(tk) + @tokens.unshift tk + @unget_read.unshift @read.pop + + # Remove this token from any listeners + @token_listeners.each do |obj| + obj.pop_token + end if @token_listeners + end + + def warn(msg) + return if @options.quiet + msg = make_message msg + $stderr.puts msg + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/parser/simple.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/simple.rb new file mode 100644 index 0000000..cdfe686 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/parser/simple.rb @@ -0,0 +1,38 @@ +require 'rdoc/parser' + +## +# Parse a non-source file. We basically take the whole thing as one big +# comment. If the first character in the file is '#', we strip leading pound +# signs. + +class RDoc::Parser::Simple < RDoc::Parser + + parse_files_matching(//) + + ## + # Prepare to parse a plain file + + def initialize(top_level, file_name, content, options, stats) + super + + preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include + + preprocess.handle @content do |directive, param| + warn "Unrecognized directive '#{directive}' in #{@file_name}" + end + end + + ## + # Extract the file contents and attach them to the toplevel as a comment + + def scan + @top_level.comment = remove_private_comments(@content) + @top_level + end + + def remove_private_comments(comment) + comment.gsub(/^--\n.*?^\+\+/m, '').sub(/^--\n.*/m, '') + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/rdoc.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/rdoc.rb new file mode 100644 index 0000000..ce1cb1a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/rdoc.rb @@ -0,0 +1,293 @@ +require 'rdoc' + +require 'rdoc/parser' + +# Simple must come first +require 'rdoc/parser/simple' +require 'rdoc/parser/ruby' +require 'rdoc/parser/c' +require 'rdoc/parser/f95' +require 'rdoc/parser/perl' + +require 'rdoc/stats' +require 'rdoc/options' + +require 'rdoc/diagram' + +require 'find' +require 'fileutils' +require 'time' + +module RDoc + + ## + # Encapsulate the production of rdoc documentation. Basically you can use + # this as you would invoke rdoc from the command line: + # + # rdoc = RDoc::RDoc.new + # rdoc.document(args) + # + # Where +args+ is an array of strings, each corresponding to an argument + # you'd give rdoc on the command line. See rdoc/rdoc.rb for details. + + class RDoc + + Generator = Struct.new(:file_name, :class_name, :key) + + ## + # Accessor for statistics. Available after each call to parse_files + + attr_reader :stats + + ## + # This is the list of output generator that we support + + GENERATORS = {} + + $LOAD_PATH.collect do |d| + File.expand_path d + end.find_all do |d| + File.directory? "#{d}/rdoc/generator" + end.each do |dir| + Dir.entries("#{dir}/rdoc/generator").each do |gen| + next unless /(\w+)\.rb$/ =~ gen + type = $1 + unless GENERATORS.has_key? type + GENERATORS[type] = Generator.new("rdoc/generator/#{gen}", + "#{type.upcase}".intern, + type) + end + end + end + + def initialize + @stats = nil + end + + ## + # Report an error message and exit + + def error(msg) + raise ::RDoc::Error, msg + end + + ## + # Create an output dir if it doesn't exist. If it does exist, but doesn't + # contain the flag file created.rid then we refuse to use it, as + # we may clobber some manually generated documentation + + def setup_output_dir(op_dir, force) + flag_file = output_flag_file(op_dir) + if File.exist?(op_dir) + unless File.directory?(op_dir) + error "'#{op_dir}' exists, and is not a directory" + end + begin + created = File.read(flag_file) + rescue SystemCallError + error "\nDirectory #{op_dir} already exists, but it looks like it\n" + + "isn't an RDoc directory. Because RDoc doesn't want to risk\n" + + "destroying any of your existing files, you'll need to\n" + + "specify a different output directory name (using the\n" + + "--op option).\n\n" + else + last = (Time.parse(created) unless force rescue nil) + end + else + FileUtils.mkdir_p(op_dir) + end + last + end + + ## + # Update the flag file in an output directory. + + def update_output_dir(op_dir, time) + File.open(output_flag_file(op_dir), "w") {|f| f.puts time.rfc2822 } + end + + ## + # Return the path name of the flag file in an output directory. + + def output_flag_file(op_dir) + File.join(op_dir, "created.rid") + end + + ## + # The .document file contains a list of file and directory name patterns, + # representing candidates for documentation. It may also contain comments + # (starting with '#') + + def parse_dot_doc_file(in_dir, filename, options) + # read and strip comments + patterns = File.read(filename).gsub(/#.*/, '') + + result = [] + + patterns.split.each do |patt| + candidates = Dir.glob(File.join(in_dir, patt)) + result.concat(normalized_file_list(options, candidates)) + end + result + end + + ## + # Given a list of files and directories, create a list of all the Ruby + # files they contain. + # + # If +force_doc+ is true we always add the given files, if false, only + # add files that we guarantee we can parse. It is true when looking at + # files given on the command line, false when recursing through + # subdirectories. + # + # The effect of this is that if you want a file with a non-standard + # extension parsed, you must name it explicitly. + + def normalized_file_list(options, relative_files, force_doc = false, + exclude_pattern = nil) + file_list = [] + + relative_files.each do |rel_file_name| + next if exclude_pattern && exclude_pattern =~ rel_file_name + stat = File.stat(rel_file_name) + case type = stat.ftype + when "file" + next if @last_created and stat.mtime < @last_created + + if force_doc or ::RDoc::Parser.can_parse(rel_file_name) then + file_list << rel_file_name.sub(/^\.\//, '') + end + when "directory" + next if rel_file_name == "CVS" || rel_file_name == ".svn" + dot_doc = File.join(rel_file_name, DOT_DOC_FILENAME) + if File.file?(dot_doc) + file_list.concat(parse_dot_doc_file(rel_file_name, dot_doc, options)) + else + file_list.concat(list_files_in_directory(rel_file_name, options)) + end + else + raise RDoc::Error, "I can't deal with a #{type} #{rel_file_name}" + end + end + + file_list + end + + ## + # Return a list of the files to be processed in a directory. We know that + # this directory doesn't have a .document file, so we're looking for real + # files. However we may well contain subdirectories which must be tested + # for .document files. + + def list_files_in_directory(dir, options) + files = Dir.glob File.join(dir, "*") + + normalized_file_list options, files, false, options.exclude + end + + ## + # Parse each file on the command line, recursively entering directories. + + def parse_files(options) + @stats = Stats.new options.verbosity + + files = options.files + files = ["."] if files.empty? + + file_list = normalized_file_list(options, files, true, options.exclude) + + return [] if file_list.empty? + + file_info = [] + + file_list.each do |filename| + @stats.add_file filename + + content = if RUBY_VERSION >= '1.9' then + File.open(filename, "r:ascii-8bit") { |f| f.read } + else + File.read filename + end + + if defined? Encoding then + if /coding:\s*(\S+)/ =~ content[/\A(?:.*\n){0,2}/] + if enc = ::Encoding.find($1) + content.force_encoding(enc) + end + end + end + + top_level = ::RDoc::TopLevel.new filename + + parser = ::RDoc::Parser.for top_level, filename, content, options, + @stats + + file_info << parser.scan + end + + file_info + end + + ## + # Format up one or more files according to the given arguments. + # + # For simplicity, _argv_ is an array of strings, equivalent to the strings + # that would be passed on the command line. (This isn't a coincidence, as + # we _do_ pass in ARGV when running interactively). For a list of options, + # see rdoc/rdoc.rb. By default, output will be stored in a directory + # called +doc+ below the current directory, so make sure you're somewhere + # writable before invoking. + # + # Throws: RDoc::Error on error + + def document(argv) + TopLevel::reset + + @options = Options.new GENERATORS + @options.parse argv + + @last_created = nil + + unless @options.all_one_file then + @last_created = setup_output_dir @options.op_dir, @options.force_update + end + + start_time = Time.now + + file_info = parse_files @options + + @options.title = "RDoc Documentation" + + if file_info.empty? + $stderr.puts "\nNo newer files." unless @options.quiet + else + @gen = @options.generator + + $stderr.puts "\nGenerating #{@gen.key.upcase}..." unless @options.quiet + + require @gen.file_name + + gen_class = ::RDoc::Generator.const_get @gen.class_name + @gen = gen_class.for @options + + pwd = Dir.pwd + + Dir.chdir @options.op_dir unless @options.all_one_file + + begin + Diagram.new(file_info, @options).draw if @options.diagram + @gen.generate(file_info) + update_output_dir(".", start_time) + ensure + Dir.chdir(pwd) + end + end + + unless @options.quiet + puts + @stats.print + end + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri.rb new file mode 100644 index 0000000..a3a858e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri.rb @@ -0,0 +1,8 @@ +require 'rdoc' + +module RDoc::RI + + class Error < RDoc::Error; end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/cache.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/cache.rb new file mode 100644 index 0000000..06177a0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/cache.rb @@ -0,0 +1,187 @@ +require 'rdoc/ri' + +class RDoc::RI::ClassEntry + + attr_reader :name + attr_reader :path_names + + def initialize(path_name, name, in_class) + @path_names = [ path_name ] + @name = name + @in_class = in_class + @class_methods = [] + @instance_methods = [] + @inferior_classes = [] + end + + # We found this class in more than one place, so add + # in the name from there. + def add_path(path) + @path_names << path + end + + # read in our methods and any classes + # and modules in our namespace. Methods are + # stored in files called name-c|i.yaml, + # where the 'name' portion is the external + # form of the method name and the c|i is a class|instance + # flag + + def load_from(dir) + Dir.foreach(dir) do |name| + next if name =~ /^\./ + + # convert from external to internal form, and + # extract the instance/class flag + + if name =~ /^(.*?)-(c|i).yaml$/ + external_name = $1 + is_class_method = $2 == "c" + internal_name = RDoc::RI::Writer.external_to_internal(external_name) + list = is_class_method ? @class_methods : @instance_methods + path = File.join(dir, name) + list << RDoc::RI::MethodEntry.new(path, internal_name, is_class_method, self) + else + full_name = File.join(dir, name) + if File.directory?(full_name) + inf_class = @inferior_classes.find {|c| c.name == name } + if inf_class + inf_class.add_path(full_name) + else + inf_class = RDoc::RI::ClassEntry.new(full_name, name, self) + @inferior_classes << inf_class + end + inf_class.load_from(full_name) + end + end + end + end + + # Return a list of any classes or modules that we contain + # that match a given string + + def contained_modules_matching(name) + @inferior_classes.find_all {|c| c.name[name]} + end + + def classes_and_modules + @inferior_classes + end + + # Return an exact match to a particular name + def contained_class_named(name) + @inferior_classes.find {|c| c.name == name} + end + + # return the list of local methods matching name + # We're split into two because we need distinct behavior + # when called from the _toplevel_ + def methods_matching(name, is_class_method) + local_methods_matching(name, is_class_method) + end + + # Find methods matching 'name' in ourselves and in + # any classes we contain + def recursively_find_methods_matching(name, is_class_method) + res = local_methods_matching(name, is_class_method) + @inferior_classes.each do |c| + res.concat(c.recursively_find_methods_matching(name, is_class_method)) + end + res + end + + + # Return our full name + def full_name + res = @in_class.full_name + res << "::" unless res.empty? + res << @name + end + + # Return a list of all out method names + def all_method_names + res = @class_methods.map {|m| m.full_name } + @instance_methods.each {|m| res << m.full_name} + res + end + + private + + # Return a list of all our methods matching a given string. + # Is +is_class_methods+ if 'nil', we don't care if the method + # is a class method or not, otherwise we only return + # those methods that match + def local_methods_matching(name, is_class_method) + + list = case is_class_method + when nil then @class_methods + @instance_methods + when true then @class_methods + when false then @instance_methods + else fail "Unknown is_class_method: #{is_class_method.inspect}" + end + + list.find_all {|m| m.name; m.name[name]} + end +end + +## +# A TopLevelEntry is like a class entry, but when asked to search for methods +# searches all classes, not just itself + +class RDoc::RI::TopLevelEntry < RDoc::RI::ClassEntry + def methods_matching(name, is_class_method) + res = recursively_find_methods_matching(name, is_class_method) + end + + def full_name + "" + end + + def module_named(name) + + end + +end + +class RDoc::RI::MethodEntry + attr_reader :name + attr_reader :path_name + + def initialize(path_name, name, is_class_method, in_class) + @path_name = path_name + @name = name + @is_class_method = is_class_method + @in_class = in_class + end + + def full_name + res = @in_class.full_name + unless res.empty? + if @is_class_method + res << "::" + else + res << "#" + end + end + res << @name + end +end + +## +# We represent everything known about all 'ri' files accessible to this program + +class RDoc::RI::Cache + + attr_reader :toplevel + + def initialize(dirs) + # At the top level we have a dummy module holding the + # overall namespace + @toplevel = RDoc::RI::TopLevelEntry.new('', '::', nil) + + dirs.each do |dir| + @toplevel.load_from(dir) + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/descriptions.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/descriptions.rb new file mode 100644 index 0000000..467b7de --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/descriptions.rb @@ -0,0 +1,156 @@ +require 'yaml' +require 'rdoc/markup/fragments' +require 'rdoc/ri' + +## +# Descriptions are created by RDoc (in ri_generator) and written out in +# serialized form into the documentation tree. ri then reads these to generate +# the documentation + +class RDoc::RI::NamedThing + attr_reader :name + def initialize(name) + @name = name + end + + def <=>(other) + @name <=> other.name + end + + def hash + @name.hash + end + + def eql?(other) + @name.eql?(other) + end +end + +class RDoc::RI::AliasName < RDoc::RI::NamedThing; end + +class RDoc::RI::Attribute < RDoc::RI::NamedThing + attr_reader :rw, :comment + + def initialize(name, rw, comment) + super(name) + @rw = rw + @comment = comment + end +end + +class RDoc::RI::Constant < RDoc::RI::NamedThing + attr_reader :value, :comment + + def initialize(name, value, comment) + super(name) + @value = value + @comment = comment + end +end + +class RDoc::RI::IncludedModule < RDoc::RI::NamedThing; end + +class RDoc::RI::MethodSummary < RDoc::RI::NamedThing + def initialize(name="") + super + end +end + +class RDoc::RI::Description + attr_accessor :name + attr_accessor :full_name + attr_accessor :comment + + def serialize + self.to_yaml + end + + def self.deserialize(from) + YAML.load(from) + end + + def <=>(other) + @name <=> other.name + end +end + +class RDoc::RI::ModuleDescription < RDoc::RI::Description + + attr_accessor :class_methods + attr_accessor :class_method_extensions + attr_accessor :instance_methods + attr_accessor :instance_method_extensions + attr_accessor :attributes + attr_accessor :constants + attr_accessor :includes + + # merge in another class description into this one + def merge_in(old) + merge(@class_methods, old.class_methods) + merge(@instance_methods, old.instance_methods) + merge(@attributes, old.attributes) + merge(@constants, old.constants) + merge(@includes, old.includes) + if @comment.nil? || @comment.empty? + @comment = old.comment + else + unless old.comment.nil? or old.comment.empty? then + if @comment.nil? or @comment.empty? then + @comment = old.comment + else + @comment << RDoc::Markup::Flow::RULE.new + @comment.concat old.comment + end + end + end + end + + def display_name + "Module" + end + + # the 'ClassDescription' subclass overrides this + # to format up the name of a parent + def superclass_string + nil + end + + private + + def merge(into, from) + names = {} + into.each {|i| names[i.name] = i } + from.each {|i| names[i.name] = i } + into.replace(names.keys.sort.map {|n| names[n]}) + end +end + +class RDoc::RI::ClassDescription < RDoc::RI::ModuleDescription + attr_accessor :superclass + + def display_name + "Class" + end + + def superclass_string + if @superclass && @superclass != "Object" + @superclass + else + nil + end + end +end + +class RDoc::RI::MethodDescription < RDoc::RI::Description + + attr_accessor :is_class_method + attr_accessor :visibility + attr_accessor :block_params + attr_accessor :is_singleton + attr_accessor :aliases + attr_accessor :is_alias_for + attr_accessor :params + attr_accessor :source_path + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/display.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/display.rb new file mode 100644 index 0000000..7b0158c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/display.rb @@ -0,0 +1,392 @@ +require 'rdoc/ri' + +# readline support might not be present, so be careful +# when requiring it. +begin + require('readline') + require('abbrev') + CAN_USE_READLINE = true # HACK use an RDoc namespace constant +rescue LoadError + CAN_USE_READLINE = false +end + +## +# This is a kind of 'flag' module. If you want to write your own 'ri' display +# module (perhaps because you're writing an IDE), you write a class which +# implements the various 'display' methods in RDoc::RI::DefaultDisplay, and +# include the RDoc::RI::Display module in that class. +# +# To access your class from the command line, you can do +# +# ruby -r ../ri .... + +module RDoc::RI::Display + + @@display_class = nil + + def self.append_features(display_class) + @@display_class = display_class + end + + def self.new(*args) + @@display_class.new(*args) + end + +end + +## +# A paging display module. Uses the RDoc::RI::Formatter class to do the actual +# presentation. + +class RDoc::RI::DefaultDisplay + + include RDoc::RI::Display + + def initialize(formatter, width, use_stdout, output = $stdout) + @use_stdout = use_stdout + @formatter = formatter.new output, width, " " + end + + ## + # Display information about +klass+. Fetches additional information from + # +ri_reader+ as necessary. + + def display_class_info(klass) + page do + superclass = klass.superclass + + if superclass + superclass = " < " + superclass + else + superclass = "" + end + + @formatter.draw_line(klass.display_name + ": " + + klass.full_name + superclass) + + display_flow(klass.comment) + @formatter.draw_line + + unless klass.includes.empty? + @formatter.blankline + @formatter.display_heading("Includes:", 2, "") + incs = [] + + klass.includes.each do |inc| + incs << inc.name + end + + @formatter.wrap(incs.sort.join(', ')) + end + + unless klass.constants.empty? + @formatter.blankline + @formatter.display_heading("Constants:", 2, "") + + constants = klass.constants.sort_by { |constant| constant.name } + + constants.each do |constant| + @formatter.wrap "#{constant.name} = #{constant.value}" + if constant.comment then + @formatter.indent do + @formatter.display_flow constant.comment + end + else + @formatter.break_to_newline + end + end + end + + unless klass.attributes.empty? then + @formatter.blankline + @formatter.display_heading 'Attributes:', 2, '' + + attributes = klass.attributes.sort_by { |attribute| attribute.name } + + attributes.each do |attribute| + if attribute.comment then + @formatter.wrap "#{attribute.name} (#{attribute.rw}):" + @formatter.indent do + @formatter.display_flow attribute.comment + end + else + @formatter.wrap "#{attribute.name} (#{attribute.rw})" + @formatter.break_to_newline + end + end + end + + return display_class_method_list(klass) + end + end + + ## + # Given a Hash mapping a class' methods to method types (returned by + # display_class_method_list), this method allows the user to + # choose one of the methods. + + def get_class_method_choice(method_map) + if CAN_USE_READLINE + # prepare abbreviations for tab completion + abbreviations = method_map.keys.abbrev + Readline.completion_proc = proc do |string| + abbreviations.values.uniq.grep(/^#{string}/) + end + end + + @formatter.raw_print_line "\nEnter the method name you want.\n" + @formatter.raw_print_line "Class methods can be preceeded by '::' and instance methods by '#'.\n" + + if CAN_USE_READLINE + @formatter.raw_print_line "You can use tab to autocomplete.\n" + @formatter.raw_print_line "Enter a blank line to exit.\n" + + choice_string = Readline.readline(">> ").strip + else + @formatter.raw_print_line "Enter a blank line to exit.\n" + @formatter.raw_print_line ">> " + choice_string = $stdin.gets.strip + end + + if choice_string == '' + return nil + else + class_or_instance = method_map[choice_string] + + if class_or_instance + # If the user's choice is not preceeded by a '::' or a '#', figure + # out whether they want a class or an instance method and decorate + # the choice appropriately. + if(choice_string =~ /^[a-zA-Z]/) + if(class_or_instance == :class) + choice_string = "::#{choice_string}" + else + choice_string = "##{choice_string}" + end + end + + return choice_string + else + @formatter.raw_print_line "No method matched '#{choice_string}'.\n" + return nil + end + end + end + + + ## + # Display methods on +klass+ + # Returns a hash mapping method name to method contents (HACK?) + + def display_class_method_list(klass) + method_map = {} + + class_data = [ + :class_methods, + :class_method_extensions, + :instance_methods, + :instance_method_extensions, + ] + + class_data.each do |data_type| + data = klass.send data_type + + unless data.nil? or data.empty? then + @formatter.blankline + + heading = data_type.to_s.split('_').join(' ').capitalize << ':' + @formatter.display_heading heading, 2, '' + + method_names = [] + data.each do |item| + method_names << item.name + + if(data_type == :class_methods || + data_type == :class_method_extensions) then + method_map["::#{item.name}"] = :class + method_map[item.name] = :class + else + # + # Since we iterate over instance methods after class methods, + # an instance method always will overwrite the unqualified + # class method entry for a class method of the same name. + # + method_map["##{item.name}"] = :instance + method_map[item.name] = :instance + end + end + method_names.sort! + + @formatter.wrap method_names.join(', ') + end + end + + method_map + end + private :display_class_method_list + + ## + # Display an Array of RDoc::Markup::Flow objects, +flow+. + + def display_flow(flow) + if flow and not flow.empty? then + @formatter.display_flow flow + else + @formatter.wrap '[no description]' + end + end + + ## + # Display information about +method+. + + def display_method_info(method) + page do + @formatter.draw_line(method.full_name) + display_params(method) + + @formatter.draw_line + display_flow(method.comment) + + if method.aliases and not method.aliases.empty? then + @formatter.blankline + aka = "(also known as #{method.aliases.map { |a| a.name }.join(', ')})" + @formatter.wrap aka + end + end + end + + ## + # Display the list of +methods+. + + def display_method_list(methods) + page do + @formatter.wrap "More than one method matched your request. You can refine your search by asking for information on one of:" + @formatter.blankline + + methods.each do |method| + @formatter.raw_print_line "#{method.full_name} [#{method.source_path}]\n" + end + end + end + + ## + # Display a list of +methods+ and allow the user to select one of them. + + def display_method_list_choice(methods) + page do + @formatter.wrap "More than one method matched your request. Please choose one of the possible matches." + @formatter.blankline + + methods.each_with_index do |method, index| + @formatter.raw_print_line "%3d %s [%s]\n" % [index + 1, method.full_name, method.source_path] + end + + @formatter.raw_print_line ">> " + + choice = $stdin.gets.strip! + + if(choice == '') + return + end + + choice = choice.to_i + + if ((choice == 0) || (choice > methods.size)) then + @formatter.raw_print_line "Invalid choice!\n" + else + method = methods[choice - 1] + display_method_info(method) + end + end + end + + ## + # Display the params for +method+. + + def display_params(method) + params = method.params + + if params[0,1] == "(" then + if method.is_singleton + params = method.full_name + params + else + params = method.name + params + end + end + + params.split(/\n/).each do |param| + @formatter.wrap param + @formatter.break_to_newline + end + + @formatter.blankline + @formatter.wrap("From #{method.source_path}") + end + + ## + # List the classes in +classes+. + + def list_known_classes(classes) + if classes.empty? + warn_no_database + else + page do + @formatter.draw_line "Known classes and modules" + @formatter.blankline + + @formatter.wrap classes.sort.join(', ') + end + end + end + + ## + # Paginates output through a pager program. + + def page + if pager = setup_pager then + begin + orig_output = @formatter.output + @formatter.output = pager + yield + ensure + @formatter.output = orig_output + pager.close + end + else + yield + end + rescue Errno::EPIPE + end + + ## + # Sets up a pager program to pass output through. + + def setup_pager + unless @use_stdout then + for pager in [ ENV['PAGER'], "less", "more", 'pager' ].compact.uniq + return IO.popen(pager, "w") rescue nil + end + @use_stdout = true + nil + end + end + + ## + # Displays a message that describes how to build RI data. + + def warn_no_database + output = @formatter.output + + output.puts "No ri data found" + output.puts + output.puts "If you've installed Ruby yourself, you need to generate documentation using:" + output.puts + output.puts " make install-doc" + output.puts + output.puts "from the same place you ran `make` to build ruby." + output.puts + output.puts "If you installed Ruby from a packaging system, then you may need to" + output.puts "install an additional package, or ask the packager to enable ri generation." + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/driver.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/driver.rb new file mode 100644 index 0000000..0c91232 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/driver.rb @@ -0,0 +1,669 @@ +require 'optparse' +require 'yaml' + +require 'rdoc/ri' +require 'rdoc/ri/paths' +require 'rdoc/ri/formatter' +require 'rdoc/ri/display' +require 'fileutils' +require 'rdoc/markup' +require 'rdoc/markup/to_flow' + +class RDoc::RI::Driver + + # + # This class offers both Hash and OpenStruct functionality. + # We convert from the Core Hash to this before calling any of + # the display methods, in order to give the display methods + # a cleaner API for accessing the data. + # + class OpenStructHash < Hash + # + # This method converts from a Hash to an OpenStructHash. + # + def self.convert(object) + case object + when Hash then + new_hash = new # Convert Hash -> OpenStructHash + + object.each do |key, value| + new_hash[key] = convert(value) + end + + new_hash + when Array then + object.map do |element| + convert(element) + end + else + object + end + end + + def merge_enums(other) + other.each do |k, v| + if self[k] then + case v + when Array then + # HACK dunno + if String === self[k] and self[k].empty? then + self[k] = v + else + self[k] += v + end + when Hash then + self[k].update v + else + # do nothing + end + else + self[k] = v + end + end + end + + def method_missing method, *args + self[method.to_s] + end + end + + class Error < RDoc::RI::Error; end + + class NotFoundError < Error + def message + "Nothing known about #{super}" + end + end + + attr_accessor :homepath # :nodoc: + + def self.default_options + options = {} + options[:use_stdout] = !$stdout.tty? + options[:width] = 72 + options[:formatter] = RDoc::RI::Formatter.for 'plain' + options[:interactive] = false + options[:use_cache] = true + + # By default all standard paths are used. + options[:use_system] = true + options[:use_site] = true + options[:use_home] = true + options[:use_gems] = true + options[:extra_doc_dirs] = [] + + return options + end + + def self.process_args(argv) + options = default_options + + opts = OptionParser.new do |opt| + opt.program_name = File.basename $0 + opt.version = RDoc::VERSION + opt.release = nil + opt.summary_indent = ' ' * 4 + + directories = [ + RDoc::RI::Paths::SYSDIR, + RDoc::RI::Paths::SITEDIR, + RDoc::RI::Paths::HOMEDIR + ] + + if RDoc::RI::Paths::GEMDIRS then + Gem.path.each do |dir| + directories << "#{dir}/doc/*/ri" + end + end + + opt.banner = <<-EOT +Usage: #{opt.program_name} [options] [names...] + +Where name can be: + + Class | Class::method | Class#method | Class.method | method + +All class names may be abbreviated to their minimum unambiguous form. If a name +is ambiguous, all valid options will be listed. + +The form '.' method matches either class or instance methods, while #method +matches only instance and ::method matches only class methods. + +For example: + + #{opt.program_name} Fil + #{opt.program_name} File + #{opt.program_name} File.new + #{opt.program_name} zip + +Note that shell quoting may be required for method names containing +punctuation: + + #{opt.program_name} 'Array.[]' + #{opt.program_name} compact\\! + +By default ri searches for documentation in the following directories: + + #{directories.join "\n "} + +Specifying the --system, --site, --home, --gems or --doc-dir options will +limit ri to searching only the specified directories. + +Options may also be set in the 'RI' environment variable. + EOT + + opt.separator nil + opt.separator "Options:" + opt.separator nil + + opt.on("--fmt=FORMAT", "--format=FORMAT", "-f", + RDoc::RI::Formatter::FORMATTERS.keys, + "Format to use when displaying output:", + " #{RDoc::RI::Formatter.list}", + "Use 'bs' (backspace) with most pager", + "programs. To use ANSI, either disable the", + "pager or tell the pager to allow control", + "characters.") do |value| + options[:formatter] = RDoc::RI::Formatter.for value + end + + opt.separator nil + + opt.on("--doc-dir=DIRNAME", "-d", Array, + "List of directories from which to source", + "documentation in addition to the standard", + "directories. May be repeated.") do |value| + value.each do |dir| + unless File.directory? dir then + raise OptionParser::InvalidArgument, "#{dir} is not a directory" + end + + options[:extra_doc_dirs] << File.expand_path(dir) + end + end + + opt.separator nil + + opt.on("--[no-]use-cache", + "Whether or not to use ri's cache.", + "True by default.") do |value| + options[:use_cache] = value + end + + opt.separator nil + + opt.on("--no-standard-docs", + "Do not include documentation from", + "the Ruby standard library, site_lib,", + "installed gems, or ~/.rdoc.", + "Equivalent to specifying", + "the options --no-system, --no-site, --no-gems,", + "and --no-home") do + options[:use_system] = false + options[:use_site] = false + options[:use_gems] = false + options[:use_home] = false + end + + opt.separator nil + + opt.on("--[no-]system", + "Include documentation from Ruby's standard", + "library. Defaults to true.") do |value| + options[:use_system] = value + end + + opt.separator nil + + opt.on("--[no-]site", + "Include documentation from libraries", + "installed in site_lib.", + "Defaults to true.") do |value| + options[:use_site] = value + end + + opt.separator nil + + opt.on("--[no-]gems", + "Include documentation from RubyGems.", + "Defaults to true.") do |value| + options[:use_gems] = value + end + + opt.separator nil + + opt.on("--[no-]home", + "Include documentation stored in ~/.rdoc.", + "Defaults to true.") do |value| + options[:use_home] = value + end + + opt.separator nil + + opt.on("--list-doc-dirs", + "List the directories from which ri will", + "source documentation on stdout and exit.") do + options[:list_doc_dirs] = true + end + + opt.separator nil + + opt.on("--no-pager", "-T", + "Send output directly to stdout,", + "rather than to a pager.") do + options[:use_stdout] = true + end + + opt.on("--interactive", "-i", + "This makes ri go into interactive mode.", + "When ri is in interactive mode it will", + "allow the user to disambiguate lists of", + "methods in case multiple methods match", + "against a method search string. It also", + "will allow the user to enter in a method", + "name (with auto-completion, if readline", + "is supported) when viewing a class.") do + options[:interactive] = true + end + + opt.separator nil + + opt.on("--width=WIDTH", "-w", OptionParser::DecimalInteger, + "Set the width of the output.") do |value| + options[:width] = value + end + end + + argv = ENV['RI'].to_s.split.concat argv + + opts.parse! argv + + options[:names] = argv + + options[:formatter] ||= RDoc::RI::Formatter.for('plain') + options[:use_stdout] ||= !$stdout.tty? + options[:use_stdout] ||= options[:interactive] + options[:width] ||= 72 + + options + + rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e + puts opts + puts + puts e + exit 1 + end + + def self.run(argv = ARGV) + options = process_args argv + ri = new options + ri.run + end + + def initialize(initial_options={}) + options = self.class.default_options.update(initial_options) + + @names = options[:names] + @class_cache_name = 'classes' + + @doc_dirs = RDoc::RI::Paths.path(options[:use_system], + options[:use_site], + options[:use_home], + options[:use_gems], + options[:extra_doc_dirs]) + + @homepath = RDoc::RI::Paths.raw_path(false, false, true, false).first + @homepath = @homepath.sub(/\.rdoc/, '.ri') + @sys_dir = RDoc::RI::Paths.raw_path(true, false, false, false).first + @list_doc_dirs = options[:list_doc_dirs] + + FileUtils.mkdir_p cache_file_path unless File.directory? cache_file_path + @cache_doc_dirs_path = File.join cache_file_path, ".doc_dirs" + + @use_cache = options[:use_cache] + @class_cache = nil + + @interactive = options[:interactive] + @display = RDoc::RI::DefaultDisplay.new(options[:formatter], + options[:width], + options[:use_stdout]) + end + + def class_cache + return @class_cache if @class_cache + + # Get the documentation directories used to make the cache in order to see + # whether the cache is valid for the current ri instantiation. + if(File.readable?(@cache_doc_dirs_path)) + cache_doc_dirs = IO.read(@cache_doc_dirs_path).split("\n") + else + cache_doc_dirs = [] + end + + newest = map_dirs('created.rid') do |f| + File.mtime f if test ?f, f + end.max + + # An up to date cache file must have been created more recently than + # the last modification of any of the documentation directories. It also + # must have been created with the same documentation directories + # as those from which ri currently is sourcing documentation. + up_to_date = (File.exist?(class_cache_file_path) and + newest and newest < File.mtime(class_cache_file_path) and + (cache_doc_dirs == @doc_dirs)) + + if up_to_date and @use_cache then + open class_cache_file_path, 'rb' do |fp| + begin + @class_cache = Marshal.load fp.read + rescue + # + # This shouldn't be necessary, since the up_to_date logic above + # should force the cache to be recreated when a new version of + # rdoc is installed. This seems like a worthwhile enhancement + # to ri's robustness, however. + # + $stderr.puts "Error reading the class cache; recreating the class cache!" + @class_cache = create_class_cache + end + end + else + @class_cache = create_class_cache + end + + @class_cache + end + + def create_class_cache + class_cache = OpenStructHash.new + + if(@use_cache) + # Dump the documentation directories to a file in the cache, so that + # we only will use the cache for future instantiations with identical + # documentation directories. + File.open @cache_doc_dirs_path, "wb" do |fp| + fp << @doc_dirs.join("\n") + end + end + + classes = map_dirs('**/cdesc*.yaml') { |f| Dir[f] } + warn "Updating class cache with #{classes.size} classes..." + populate_class_cache class_cache, classes + + write_cache class_cache, class_cache_file_path + + class_cache + end + + def populate_class_cache(class_cache, classes, extension = false) + classes.each do |cdesc| + desc = read_yaml cdesc + klassname = desc["full_name"] + + unless class_cache.has_key? klassname then + desc["display_name"] = "Class" + desc["sources"] = [cdesc] + desc["instance_method_extensions"] = [] + desc["class_method_extensions"] = [] + class_cache[klassname] = desc + else + klass = class_cache[klassname] + + if extension then + desc["instance_method_extensions"] = desc.delete "instance_methods" + desc["class_method_extensions"] = desc.delete "class_methods" + end + + klass.merge_enums desc + klass["sources"] << cdesc + end + end + end + + def class_cache_file_path + File.join cache_file_path, @class_cache_name + end + + def cache_file_for(klassname) + File.join cache_file_path, klassname.gsub(/:+/, "-") + end + + def cache_file_path + File.join @homepath, 'cache' + end + + def display_class(name) + klass = class_cache[name] + @display.display_class_info klass + end + + def display_method(method) + @display.display_method_info method + end + + def get_info_for(arg) + @names = [arg] + run + end + + def load_cache_for(klassname) + path = cache_file_for klassname + + cache = nil + + if File.exist? path and + File.mtime(path) >= File.mtime(class_cache_file_path) and + @use_cache then + open path, 'rb' do |fp| + begin + cache = Marshal.load fp.read + rescue + # + # The cache somehow is bad. Recreate the cache. + # + $stderr.puts "Error reading the cache for #{klassname}; recreating the cache!" + cache = create_cache_for klassname, path + end + end + else + cache = create_cache_for klassname, path + end + + cache + end + + def create_cache_for(klassname, path) + klass = class_cache[klassname] + return nil unless klass + + method_files = klass["sources"] + cache = OpenStructHash.new + + method_files.each do |f| + system_file = f.index(@sys_dir) == 0 + Dir[File.join(File.dirname(f), "*")].each do |yaml| + next unless yaml =~ /yaml$/ + next if yaml =~ /cdesc-[^\/]+yaml$/ + + method = read_yaml yaml + + if system_file then + method["source_path"] = "Ruby #{RDoc::RI::Paths::VERSION}" + else + if(f =~ %r%gems/[\d.]+/doc/([^/]+)%) then + ext_path = "gem #{$1}" + else + ext_path = f + end + + method["source_path"] = ext_path + end + + name = method["full_name"] + cache[name] = method + end + end + + write_cache cache, path + end + + ## + # Finds the next ancestor of +orig_klass+ after +klass+. + + def lookup_ancestor(klass, orig_klass) + # This is a bit hacky, but ri will go into an infinite + # loop otherwise, since Object has an Object ancestor + # for some reason. Depending on the documentation state, I've seen + # Kernel as an ancestor of Object and not as an ancestor of Object. + if ((orig_klass == "Object") && + ((klass == "Kernel") || (klass == "Object"))) + return nil + end + + cache = class_cache[orig_klass] + + return nil unless cache + + ancestors = [orig_klass] + ancestors.push(*cache.includes.map { |inc| inc['name'] }) + ancestors << cache.superclass + + ancestor_index = ancestors.index(klass) + + if ancestor_index + ancestor = ancestors[ancestors.index(klass) + 1] + return ancestor if ancestor + end + + lookup_ancestor klass, cache.superclass + end + + ## + # Finds the method + + def lookup_method(name, klass) + cache = load_cache_for klass + return nil unless cache + + method = cache[name.gsub('.', '#')] + method = cache[name.gsub('.', '::')] unless method + method + end + + def map_dirs(file_name) + @doc_dirs.map { |dir| yield File.join(dir, file_name) }.flatten.compact + end + + ## + # Extract the class and method name parts from +name+ like Foo::Bar#baz + + def parse_name(name) + parts = name.split(/(::|\#|\.)/) + + if parts[-2] != '::' or parts.last !~ /^[A-Z]/ then + meth = parts.pop + parts.pop + end + + klass = parts.join + + [klass, meth] + end + + def read_yaml(path) + data = File.read path + + # Necessary to be backward-compatible with documentation generated + # by earliar RDoc versions. + data = data.gsub(/ \!ruby\/(object|struct):(RDoc::RI|RI).*/, '') + data = data.gsub(/ \!ruby\/(object|struct):SM::(\S+)/, + ' !ruby/\1:RDoc::Markup::\2') + OpenStructHash.convert(YAML.load(data)) + end + + def run + if(@list_doc_dirs) + puts @doc_dirs.join("\n") + elsif @names.empty? then + @display.list_known_classes class_cache.keys.sort + else + @names.each do |name| + if class_cache.key? name then + method_map = display_class name + if(@interactive) + method_name = @display.get_class_method_choice(method_map) + + if(method_name != nil) + method = lookup_method "#{name}#{method_name}", name + display_method method + end + end + elsif name =~ /::|\#|\./ then + klass, = parse_name name + + orig_klass = klass + orig_name = name + + loop do + method = lookup_method name, klass + + break method if method + + ancestor = lookup_ancestor klass, orig_klass + + break unless ancestor + + name = name.sub klass, ancestor + klass = ancestor + end + + raise NotFoundError, orig_name unless method + + display_method method + else + methods = select_methods(/#{name}/) + + if methods.size == 0 + raise NotFoundError, name + elsif methods.size == 1 + display_method methods[0] + else + if(@interactive) + @display.display_method_list_choice methods + else + @display.display_method_list methods + end + end + end + end + end + rescue NotFoundError => e + abort e.message + end + + def select_methods(pattern) + methods = [] + class_cache.keys.sort.each do |klass| + class_cache[klass]["instance_methods"].map{|h|h["name"]}.grep(pattern) do |name| + method = load_cache_for(klass)[klass+'#'+name] + methods << method if method + end + class_cache[klass]["class_methods"].map{|h|h["name"]}.grep(pattern) do |name| + method = load_cache_for(klass)[klass+'::'+name] + methods << method if method + end + end + methods + end + + def write_cache(cache, path) + if(@use_cache) + File.open path, "wb" do |cache_file| + Marshal.dump cache, cache_file + end + end + + cache + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/formatter.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/formatter.rb new file mode 100644 index 0000000..933882a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/formatter.rb @@ -0,0 +1,616 @@ +require 'rdoc/ri' +require 'rdoc/markup' + +class RDoc::RI::Formatter + + attr_writer :indent + attr_accessor :output + + FORMATTERS = { } + + def self.for(name) + FORMATTERS[name.downcase] + end + + def self.list + FORMATTERS.keys.sort.join ", " + end + + def initialize(output, width, indent) + @output = output + @width = width + @indent = indent + @original_indent = indent.dup + end + + def draw_line(label=nil) + len = @width + len -= (label.size + 1) if label + + if len > 0 then + @output.print '-' * len + if label + @output.print ' ' + bold_print label + end + + @output.puts + else + @output.print '-' * @width + @output.puts + + @output.puts label + end + end + + def indent + return @indent unless block_given? + + begin + indent = @indent.dup + @indent += @original_indent + yield + ensure + @indent = indent + end + end + + def wrap(txt, prefix=@indent, linelen=@width) + return unless txt && !txt.empty? + + work = conv_markup(txt) + textLen = linelen - prefix.length + patt = Regexp.new("^(.{0,#{textLen}})[ \n]") + next_prefix = prefix.tr("^ ", " ") + + res = [] + + while work.length > textLen + if work =~ patt + res << $1 + work.slice!(0, $&.length) + else + res << work.slice!(0, textLen) + end + end + res << work if work.length.nonzero? + @output.puts(prefix + res.join("\n" + next_prefix)) + end + + def blankline + @output.puts + end + + ## + # Called when we want to ensure a new 'wrap' starts on a newline. Only + # needed for HtmlFormatter, because the rest do their own line breaking. + + def break_to_newline + end + + def bold_print(txt) + @output.print txt + end + + def raw_print_line(txt) + @output.print txt + end + + ## + # Convert HTML entities back to ASCII + + def conv_html(txt) + txt = txt.gsub(/>/, '>') + txt.gsub!(/</, '<') + txt.gsub!(/"/, '"') + txt.gsub!(/&/, '&') + txt + end + + ## + # Convert markup into display form + + def conv_markup(txt) + txt = txt.gsub(%r{(.*?)}, '+\1+') + txt.gsub!(%r{(.*?)}, '+\1+') + txt.gsub!(%r{(.*?)}, '*\1*') + txt.gsub!(%r{(.*?)}, '_\1_') + txt + end + + def display_list(list) + case list.type + when :BULLET + prefixer = proc { |ignored| @indent + "* " } + + when :NUMBER, :UPPERALPHA, :LOWERALPHA then + start = case list.type + when :NUMBER then 1 + when :UPPERALPHA then 'A' + when :LOWERALPHA then 'a' + end + + prefixer = proc do |ignored| + res = @indent + "#{start}.".ljust(4) + start = start.succ + res + end + + when :LABELED, :NOTE then + longest = 0 + + list.contents.each do |item| + if RDoc::Markup::Flow::LI === item and item.label.length > longest then + longest = item.label.length + end + end + + longest += 1 + + prefixer = proc { |li| @indent + li.label.ljust(longest) } + + else + raise ArgumentError, "unknown list type #{list.type}" + end + + list.contents.each do |item| + if RDoc::Markup::Flow::LI === item then + prefix = prefixer.call item + display_flow_item item, prefix + else + display_flow_item item + end + end + end + + def display_flow_item(item, prefix = @indent) + case item + when RDoc::Markup::Flow::P, RDoc::Markup::Flow::LI + wrap(conv_html(item.body), prefix) + blankline + + when RDoc::Markup::Flow::LIST + display_list(item) + + when RDoc::Markup::Flow::VERB + display_verbatim_flow_item(item, @indent) + + when RDoc::Markup::Flow::H + display_heading(conv_html(item.text), item.level, @indent) + + when RDoc::Markup::Flow::RULE + draw_line + + else + raise RDoc::Error, "Unknown flow element: #{item.class}" + end + end + + def display_verbatim_flow_item(item, prefix=@indent) + item.body.split(/\n/).each do |line| + @output.print @indent, conv_html(line), "\n" + end + blankline + end + + def display_heading(text, level, indent) + text = strip_attributes text + + case level + when 1 then + ul = "=" * text.length + @output.puts + @output.puts text.upcase + @output.puts ul + + when 2 then + ul = "-" * text.length + @output.puts + @output.puts text + @output.puts ul + else + @output.print indent, text, "\n" + end + + @output.puts + end + + def display_flow(flow) + flow.each do |f| + display_flow_item(f) + end + end + + def strip_attributes(text) + text.gsub(/(<\/?(?:b|code|em|i|tt)>)/, '') + end + +end + +## +# Handle text with attributes. We're a base class: there are different +# presentation classes (one, for example, uses overstrikes to handle bold and +# underlining, while another using ANSI escape sequences. + +class RDoc::RI::AttributeFormatter < RDoc::RI::Formatter + + BOLD = 1 + ITALIC = 2 + CODE = 4 + + ATTR_MAP = { + "b" => BOLD, + "code" => CODE, + "em" => ITALIC, + "i" => ITALIC, + "tt" => CODE + } + + AttrChar = Struct.new :char, :attr + + class AttributeString + attr_reader :txt + + def initialize + @txt = [] + @optr = 0 + end + + def <<(char) + @txt << char + end + + def empty? + @optr >= @txt.length + end + + # accept non space, then all following spaces + def next_word + start = @optr + len = @txt.length + + while @optr < len && @txt[@optr].char != " " + @optr += 1 + end + + while @optr < len && @txt[@optr].char == " " + @optr += 1 + end + + @txt[start...@optr] + end + end + + ## + # Overrides base class. Looks for ... etc sequences and generates + # an array of AttrChars. This array is then used as the basis for the + # split. + + def wrap(txt, prefix=@indent, linelen=@width) + return unless txt && !txt.empty? + + txt = add_attributes_to(txt) + next_prefix = prefix.tr("^ ", " ") + linelen -= prefix.size + + line = [] + + until txt.empty? + word = txt.next_word + if word.size + line.size > linelen + write_attribute_text(prefix, line) + prefix = next_prefix + line = [] + end + line.concat(word) + end + + write_attribute_text(prefix, line) if line.length > 0 + end + + protected + + def write_attribute_text(prefix, line) + @output.print prefix + line.each do |achar| + @output.print achar.char + end + @output.puts + end + + def bold_print(txt) + @output.print txt + end + + private + + def add_attributes_to(txt) + tokens = txt.split(%r{()}) + text = AttributeString.new + attributes = 0 + tokens.each do |tok| + case tok + when %r{^$} then attributes &= ~(ATTR_MAP[$1]||0) + when %r{^<(\w+)>$} then attributes |= (ATTR_MAP[$1]||0) + else + tok.split(//).each {|ch| text << AttrChar.new(ch, attributes)} + end + end + text + end + +end + +## +# This formatter generates overstrike-style formatting, which works with +# pagers such as man and less. + +class RDoc::RI::OverstrikeFormatter < RDoc::RI::AttributeFormatter + + BS = "\C-h" + + def write_attribute_text(prefix, line) + @output.print prefix + + line.each do |achar| + attr = achar.attr + @output.print "_", BS if (attr & (ITALIC + CODE)) != 0 + @output.print achar.char, BS if (attr & BOLD) != 0 + @output.print achar.char + end + + @output.puts + end + + ## + # Draw a string in bold + + def bold_print(text) + text.split(//).each do |ch| + @output.print ch, BS, ch + end + end + +end + +## +# This formatter uses ANSI escape sequences to colorize stuff works with +# pagers such as man and less. + +class RDoc::RI::AnsiFormatter < RDoc::RI::AttributeFormatter + + def initialize(*args) + super + @output.print "\033[0m" + end + + def write_attribute_text(prefix, line) + @output.print prefix + curr_attr = 0 + line.each do |achar| + attr = achar.attr + if achar.attr != curr_attr + update_attributes(achar.attr) + curr_attr = achar.attr + end + @output.print achar.char + end + update_attributes(0) unless curr_attr.zero? + @output.puts + end + + def bold_print(txt) + @output.print "\033[1m#{txt}\033[m" + end + + HEADINGS = { + 1 => ["\033[1;32m", "\033[m"], + 2 => ["\033[4;32m", "\033[m"], + 3 => ["\033[32m", "\033[m"], + } + + def display_heading(text, level, indent) + level = 3 if level > 3 + heading = HEADINGS[level] + @output.print indent + @output.print heading[0] + @output.print strip_attributes(text) + @output.puts heading[1] + end + + private + + ATTR_MAP = { + BOLD => "1", + ITALIC => "33", + CODE => "36" + } + + def update_attributes(attr) + str = "\033[" + for quality in [ BOLD, ITALIC, CODE] + unless (attr & quality).zero? + str << ATTR_MAP[quality] + end + end + @output.print str, "m" + end + +end + +## +# This formatter uses HTML. + +class RDoc::RI::HtmlFormatter < RDoc::RI::AttributeFormatter + + def write_attribute_text(prefix, line) + curr_attr = 0 + line.each do |achar| + attr = achar.attr + if achar.attr != curr_attr + update_attributes(curr_attr, achar.attr) + curr_attr = achar.attr + end + @output.print(escape(achar.char)) + end + update_attributes(curr_attr, 0) unless curr_attr.zero? + end + + def draw_line(label=nil) + if label != nil + bold_print(label) + end + @output.puts("
      ") + end + + def bold_print(txt) + tag("b") { txt } + end + + def blankline() + @output.puts("

      ") + end + + def break_to_newline + @output.puts("
      ") + end + + def display_heading(text, level, indent) + level = 4 if level > 4 + tag("h#{level}") { text } + @output.puts + end + + def display_list(list) + case list.type + when :BULLET then + list_type = "ul" + prefixer = proc { |ignored| "

    • " } + + when :NUMBER, :UPPERALPHA, :LOWERALPHA then + list_type = "ol" + prefixer = proc { |ignored| "
    • " } + + when :LABELED then + list_type = "dl" + prefixer = proc do |li| + "
      " + escape(li.label) + "
      " + end + + when :NOTE then + list_type = "table" + prefixer = proc do |li| + %{#{li.label.gsub(/ /, ' ')}} + end + else + fail "unknown list type" + end + + @output.print "<#{list_type}>" + list.contents.each do |item| + if item.kind_of? RDoc::Markup::Flow::LI + prefix = prefixer.call(item) + @output.print prefix + display_flow_item(item, prefix) + else + display_flow_item(item) + end + end + @output.print "" + end + + def display_verbatim_flow_item(item, prefix=@indent) + @output.print("
      ")
      +    item.body.split(/\n/).each do |line|
      +      @output.puts conv_html(line)
      +    end
      +    @output.puts("
      ") + end + + private + + ATTR_MAP = { + BOLD => "b>", + ITALIC => "i>", + CODE => "tt>" + } + + def update_attributes(current, wanted) + str = "" + # first turn off unwanted ones + off = current & ~wanted + for quality in [ BOLD, ITALIC, CODE] + if (off & quality) > 0 + str << "") + @output.print(yield) + @output.print("") + end + + def escape(str) + str = str.gsub(/&/n, '&') + str.gsub!(/\"/n, '"') + str.gsub!(/>/n, '>') + str.gsub!(//system/... +# site:: $datadir/ri//site/... +# user:: ~/.rdoc + +module RDoc::RI::Paths + + #:stopdoc: + require 'rbconfig' + + DOC_DIR = "doc/rdoc" + + VERSION = RbConfig::CONFIG['ruby_version'] + + base = File.join(RbConfig::CONFIG['datadir'], "ri", VERSION) + SYSDIR = File.join(base, "system") + SITEDIR = File.join(base, "site") + homedir = ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] + + if homedir then + HOMEDIR = File.join(homedir, ".rdoc") + else + HOMEDIR = nil + end + + begin + require 'rubygems' unless defined?(Gem) and defined?(Gem::Enable) and + Gem::Enable + + # HACK dup'd from Gem.latest_partials and friends + all_paths = [] + + all_paths = Gem.path.map do |dir| + Dir[File.join(dir, 'doc', '*', 'ri')] + end.flatten + + ri_paths = {} + + all_paths.each do |dir| + base = File.basename File.dirname(dir) + if base =~ /(.*)-((\d+\.)*\d+)/ then + name, version = $1, $2 + ver = Gem::Version.new version + if ri_paths[name].nil? or ver > ri_paths[name][0] then + ri_paths[name] = [ver, dir] + end + end + end + + GEMDIRS = ri_paths.map { |k,v| v.last }.sort + rescue LoadError + GEMDIRS = [] + end + + # Returns the selected documentation directories as an Array, or PATH if no + # overriding directories were given. + + def self.path(use_system, use_site, use_home, use_gems, *extra_dirs) + path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs) + return path.select { |directory| File.directory? directory } + end + + # Returns the selected documentation directories including nonexistent + # directories. Used to print out what paths were searched if no ri was + # found. + + def self.raw_path(use_system, use_site, use_home, use_gems, *extra_dirs) + path = [] + path << extra_dirs unless extra_dirs.empty? + path << SYSDIR if use_system + path << SITEDIR if use_site + path << HOMEDIR if use_home + path << GEMDIRS if use_gems + + return path.flatten.compact + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/reader.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/reader.rb new file mode 100644 index 0000000..de3c8d9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/reader.rb @@ -0,0 +1,106 @@ +require 'rdoc/ri' +require 'rdoc/ri/descriptions' +require 'rdoc/ri/writer' +require 'rdoc/markup/to_flow' + +class RDoc::RI::Reader + + def initialize(ri_cache) + @cache = ri_cache + end + + def top_level_namespace + [ @cache.toplevel ] + end + + def lookup_namespace_in(target, namespaces) + result = [] + for n in namespaces + result.concat(n.contained_modules_matching(target)) + end + result + end + + def find_class_by_name(full_name) + names = full_name.split(/::/) + ns = @cache.toplevel + for name in names + ns = ns.contained_class_named(name) + return nil if ns.nil? + end + get_class(ns) + end + + def find_methods(name, is_class_method, namespaces) + result = [] + namespaces.each do |ns| + result.concat ns.methods_matching(name, is_class_method) + end + result + end + + ## + # Return the MethodDescription for a given MethodEntry by deserializing the + # YAML + + def get_method(method_entry) + path = method_entry.path_name + File.open(path) { |f| RDoc::RI::Description.deserialize(f) } + end + + ## + # Return a class description + + def get_class(class_entry) + result = nil + for path in class_entry.path_names + path = RDoc::RI::Writer.class_desc_path(path, class_entry) + desc = File.open(path) {|f| RDoc::RI::Description.deserialize(f) } + if result + result.merge_in(desc) + else + result = desc + end + end + result + end + + ## + # Return the names of all classes and modules + + def full_class_names + res = [] + find_classes_in(res, @cache.toplevel) + end + + ## + # Return a list of all classes, modules, and methods + + def all_names + res = [] + find_names_in(res, @cache.toplevel) + end + + private + + def find_classes_in(res, klass) + classes = klass.classes_and_modules + for c in classes + res << c.full_name + find_classes_in(res, c) + end + res + end + + def find_names_in(res, klass) + classes = klass.classes_and_modules + for c in classes + res << c.full_name + res.concat c.all_method_names + find_names_in(res, c) + end + res + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/util.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/util.rb new file mode 100644 index 0000000..4e91eb9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/util.rb @@ -0,0 +1,79 @@ +require 'rdoc/ri' + +## +# Break argument into its constituent class or module names, an +# optional method type, and a method name + +class RDoc::RI::NameDescriptor + + attr_reader :class_names + attr_reader :method_name + + ## + # true and false have the obvious meaning. nil means we don't care + + attr_reader :is_class_method + + ## + # +arg+ may be + # + # 1. A class or module name (optionally qualified with other class or module + # names (Kernel, File::Stat etc) + # 2. A method name + # 3. A method name qualified by a optionally fully qualified class or module + # name + # + # We're fairly casual about delimiters: folks can say Kernel::puts, + # Kernel.puts, or Kernel\#puts for example. There's one exception: if you + # say IO::read, we look for a class method, but if you say IO.read, we look + # for an instance method + + def initialize(arg) + @class_names = [] + separator = nil + + tokens = arg.split(/(\.|::|#)/) + + # Skip leading '::', '#' or '.', but remember it might + # be a method name qualifier + separator = tokens.shift if tokens[0] =~ /^(\.|::|#)/ + + # Skip leading '::', but remember we potentially have an inst + + # leading stuff must be class names + + while tokens[0] =~ /^[A-Z]/ + @class_names << tokens.shift + unless tokens.empty? + separator = tokens.shift + break unless separator == "::" + end + end + + # Now must have a single token, the method name, or an empty array + unless tokens.empty? + @method_name = tokens.shift + # We may now have a trailing !, ?, or = to roll into + # the method name + if !tokens.empty? && tokens[0] =~ /^[!?=]$/ + @method_name << tokens.shift + end + + if @method_name =~ /::|\.|#/ or !tokens.empty? + raise RDoc::RI::Error.new("Bad argument: #{arg}") + end + if separator && separator != '.' + @is_class_method = separator == "::" + end + end + end + + # Return the full class name (with '::' between the components) or "" if + # there's no class name + + def full_class_name + @class_names.join("::") + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/ri/writer.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/writer.rb new file mode 100644 index 0000000..92aaa1c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/ri/writer.rb @@ -0,0 +1,68 @@ +require 'fileutils' +require 'rdoc/ri' + +class RDoc::RI::Writer + + def self.class_desc_path(dir, class_desc) + File.join(dir, "cdesc-" + class_desc.name + ".yaml") + end + + ## + # Convert a name from internal form (containing punctuation) to an external + # form (where punctuation is replaced by %xx) + + def self.internal_to_external(name) + if ''.respond_to? :ord then + name.gsub(/\W/) { "%%%02x" % $&[0].ord } + else + name.gsub(/\W/) { "%%%02x" % $&[0] } + end + end + + ## + # And the reverse operation + + def self.external_to_internal(name) + name.gsub(/%([0-9a-f]{2,2})/) { $1.to_i(16).chr } + end + + def initialize(base_dir) + @base_dir = base_dir + end + + def remove_class(class_desc) + FileUtils.rm_rf(path_to_dir(class_desc.full_name)) + end + + def add_class(class_desc) + dir = path_to_dir(class_desc.full_name) + FileUtils.mkdir_p(dir) + class_file_name = self.class.class_desc_path(dir, class_desc) + File.open(class_file_name, "w") do |f| + f.write(class_desc.serialize) + end + end + + def add_method(class_desc, method_desc) + dir = path_to_dir(class_desc.full_name) + file_name = self.class.internal_to_external(method_desc.name) + meth_file_name = File.join(dir, file_name) + if method_desc.is_singleton + meth_file_name += "-c.yaml" + else + meth_file_name += "-i.yaml" + end + + File.open(meth_file_name, "w") do |f| + f.write(method_desc.serialize) + end + end + + private + + def path_to_dir(class_name) + File.join(@base_dir, *class_name.split('::')) + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/stats.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/stats.rb new file mode 100644 index 0000000..e18e3c2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/stats.rb @@ -0,0 +1,115 @@ +require 'rdoc' + +## +# Simple stats collector + +class RDoc::Stats + + attr_reader :num_classes + attr_reader :num_files + attr_reader :num_methods + attr_reader :num_modules + + def initialize(verbosity = 1) + @num_classes = 0 + @num_files = 0 + @num_methods = 0 + @num_modules = 0 + + @start = Time.now + + @display = case verbosity + when 0 then Quiet.new + when 1 then Normal.new + else Verbose.new + end + end + + def add_alias(as) + @display.print_alias as + @num_methods += 1 + end + + def add_class(klass) + @display.print_class klass + @num_classes += 1 + end + + def add_file(file) + @display.print_file file + @num_files += 1 + end + + def add_method(method) + @display.print_method method + @num_methods += 1 + end + + def add_module(mod) + @display.print_module mod + @num_modules += 1 + end + + def print + puts "Files: #@num_files" + puts "Classes: #@num_classes" + puts "Modules: #@num_modules" + puts "Methods: #@num_methods" + puts "Elapsed: " + sprintf("%0.1fs", Time.now - @start) + end + + class Quiet + def print_alias(*) end + def print_class(*) end + def print_file(*) end + def print_method(*) end + def print_module(*) end + end + + class Normal + def print_alias(as) + print 'a' + end + + def print_class(klass) + print 'C' + end + + def print_file(file) + print "\n#{file}: " + end + + def print_method(method) + print 'm' + end + + def print_module(mod) + print 'M' + end + end + + class Verbose + def print_alias(as) + puts "\t\talias #{as.new_name} #{as.old_name}" + end + + def print_class(klass) + puts "\tclass #{klass.full_name}" + end + + def print_file(file) + puts file + end + + def print_method(method) + puts "\t\t#{method.singleton ? '::' : '#'}#{method.name}" + end + + def print_module(mod) + puts "\tmodule #{mod.full_name}" + end + end + +end + + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/template.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/template.rb new file mode 100644 index 0000000..53d0e3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/template.rb @@ -0,0 +1,64 @@ +require 'erb' + +module RDoc; end + +## +# An ERb wrapper that allows nesting of one ERb template inside another. +# +# This TemplatePage operates similarly to RDoc 1.x's TemplatePage, but uses +# ERb instead of a custom template language. +# +# Converting from a RDoc 1.x template to an RDoc 2.x template is fairly easy. +# +# * %blah% becomes <%= values["blah"] %> +# * !INCLUDE! becomes <%= template_include %> +# * HREF:aref:name becomes <%= href values["aref"], values["name"] %> +# * IF:blah becomes <% if values["blah"] then %> +# * IFNOT:blah becomes <% unless values["blah"] then %> +# * ENDIF:blah becomes <% end %> +# * START:blah becomes <% values["blah"].each do |blah| %> +# * END:blah becomes <% end %> +# +# To make nested loops easier to convert, start by converting START statements +# to: +# +# <% values["blah"].each do |blah| $stderr.puts blah.keys %> +# +# So you can see what is being used inside which loop. + +class RDoc::TemplatePage + + ## + # Create a new TemplatePage that will use +templates+. + + def initialize(*templates) + @templates = templates + end + + ## + # Returns "#{name}" + + def href(ref, name) + if ref then + "#{name}" + else + name + end + end + + ## + # Process the template using +values+, writing the result to +io+. + + def write_html_on(io, values) + b = binding + template_include = "" + + @templates.reverse_each do |template| + template_include = ERB.new(template).result b + end + + io.write template_include + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rdoc/tokenstream.rb b/lib/ruby-1.9.1-rc1/lib/rdoc/tokenstream.rb new file mode 100644 index 0000000..0a1eb91 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rdoc/tokenstream.rb @@ -0,0 +1,33 @@ +module RDoc; end + +## +# A TokenStream is a list of tokens, gathered during the parse of some entity +# (say a method). Entities populate these streams by being registered with the +# lexer. Any class can collect tokens by including TokenStream. From the +# outside, you use such an object by calling the start_collecting_tokens +# method, followed by calls to add_token and pop_token. + +module RDoc::TokenStream + + def token_stream + @token_stream + end + + def start_collecting_tokens + @token_stream = [] + end + + def add_token(tk) + @token_stream << tk + end + + def add_tokens(tks) + tks.each {|tk| add_token(tk)} + end + + def pop_token + @token_stream.pop + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/resolv-replace.rb b/lib/ruby-1.9.1-rc1/lib/resolv-replace.rb new file mode 100644 index 0000000..63d58ce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/resolv-replace.rb @@ -0,0 +1,63 @@ +require 'socket' +require 'resolv' + +class << IPSocket + alias original_resolv_getaddress getaddress + def getaddress(host) + begin + return Resolv.getaddress(host).to_s + rescue Resolv::ResolvError + raise SocketError, "Hostname not known: #{host}" + end + end +end + +class TCPSocket + alias original_resolv_initialize initialize + def initialize(host, serv, *rest) + rest[0] = IPSocket.getaddress(rest[0]) unless rest.empty? + original_resolv_initialize(IPSocket.getaddress(host), serv, *rest) + end +end + +class UDPSocket + alias original_resolv_bind bind + def bind(host, port) + host = IPSocket.getaddress(host) if host != "" + original_resolv_bind(host, port) + end + + alias original_resolv_connect connect + def connect(host, port) + original_resolv_connect(IPSocket.getaddress(host), port) + end + + alias original_resolv_send send + def send(mesg, flags, *rest) + if rest.length == 2 + host, port = rest + begin + addrs = Resolv.getaddresses(host) + rescue Resolv::ResolvError + raise SocketError, "Hostname not known: #{host}" + end + err = nil + addrs[0...-1].each {|addr| + begin + return original_resolv_send(mesg, flags, addr, port) + rescue SystemCallError + end + } + original_resolv_send(mesg, flags, addrs[-1], port) + else + original_resolv_send(mesg, flags, *rest) + end + end +end + +class SOCKSSocket + alias original_resolv_initialize initialize + def initialize(host, serv) + original_resolv_initialize(IPSocket.getaddress(host), port) + end +end if defined? SOCKSSocket diff --git a/lib/ruby-1.9.1-rc1/lib/resolv.rb b/lib/ruby-1.9.1-rc1/lib/resolv.rb new file mode 100644 index 0000000..fc3c782 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/resolv.rb @@ -0,0 +1,2262 @@ +require 'socket' +require 'fcntl' +require 'timeout' +require 'thread' + +begin + require 'securerandom' +rescue LoadError +end + +# Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can +# handle multiple DNS requests concurrently without blocking. The ruby +# interpreter. +# +# See also resolv-replace.rb to replace the libc resolver with # Resolv. +# +# Resolv can look up various DNS resources using the DNS module directly. +# +# Examples: +# +# p Resolv.getaddress "www.ruby-lang.org" +# p Resolv.getname "210.251.121.214" +# +# Resolv::DNS.open do |dns| +# ress = dns.getresources "www.ruby-lang.org", Resolv::DNS::Resource::IN::A +# p ress.map { |r| r.address } +# ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::IN::MX +# p ress.map { |r| [r.exchange.to_s, r.preference] } +# end +# +# +# == Bugs +# +# * NIS is not supported. +# * /etc/nsswitch.conf is not supported. + +class Resolv + + ## + # Looks up the first IP address for +name+. + + def self.getaddress(name) + DefaultResolver.getaddress(name) + end + + ## + # Looks up all IP address for +name+. + + def self.getaddresses(name) + DefaultResolver.getaddresses(name) + end + + ## + # Iterates over all IP addresses for +name+. + + def self.each_address(name, &block) + DefaultResolver.each_address(name, &block) + end + + ## + # Looks up the hostname of +address+. + + def self.getname(address) + DefaultResolver.getname(address) + end + + ## + # Looks up all hostnames for +address+. + + def self.getnames(address) + DefaultResolver.getnames(address) + end + + ## + # Iterates over all hostnames for +address+. + + def self.each_name(address, &proc) + DefaultResolver.each_name(address, &proc) + end + + ## + # Creates a new Resolv using +resolvers+. + + def initialize(resolvers=[Hosts.new, DNS.new]) + @resolvers = resolvers + end + + ## + # Looks up the first IP address for +name+. + + def getaddress(name) + each_address(name) {|address| return address} + raise ResolvError.new("no address for #{name}") + end + + ## + # Looks up all IP address for +name+. + + def getaddresses(name) + ret = [] + each_address(name) {|address| ret << address} + return ret + end + + ## + # Iterates over all IP addresses for +name+. + + def each_address(name) + if AddressRegex =~ name + yield name + return + end + yielded = false + @resolvers.each {|r| + r.each_address(name) {|address| + yield address.to_s + yielded = true + } + return if yielded + } + end + + ## + # Looks up the hostname of +address+. + + def getname(address) + each_name(address) {|name| return name} + raise ResolvError.new("no name for #{address}") + end + + ## + # Looks up all hostnames for +address+. + + def getnames(address) + ret = [] + each_name(address) {|name| ret << name} + return ret + end + + ## + # Iterates over all hostnames for +address+. + + def each_name(address) + yielded = false + @resolvers.each {|r| + r.each_name(address) {|name| + yield name.to_s + yielded = true + } + return if yielded + } + end + + ## + # Indicates a failure to resolve a name or address. + + class ResolvError < StandardError; end + + ## + # Indicates a timeout resolving a name or address. + + class ResolvTimeout < TimeoutError; end + + ## + # DNS::Hosts is a hostname resolver that uses the system hosts file. + + class Hosts + if /mswin32|mingw|bccwin/ =~ RUBY_PLATFORM + require 'win32/resolv' + DefaultFileName = Win32::Resolv.get_hosts_path + else + DefaultFileName = '/etc/hosts' + end + + ## + # Creates a new DNS::Hosts, using +filename+ for its data source. + + def initialize(filename = DefaultFileName) + @filename = filename + @mutex = Mutex.new + @initialized = nil + end + + def lazy_initialize # :nodoc: + @mutex.synchronize { + unless @initialized + @name2addr = {} + @addr2name = {} + open(@filename) {|f| + f.each {|line| + line.sub!(/#.*/, '') + addr, hostname, *aliases = line.split(/\s+/) + next unless addr + addr.untaint + hostname.untaint + @addr2name[addr] = [] unless @addr2name.include? addr + @addr2name[addr] << hostname + @addr2name[addr] += aliases + @name2addr[hostname] = [] unless @name2addr.include? hostname + @name2addr[hostname] << addr + aliases.each {|n| + n.untaint + @name2addr[n] = [] unless @name2addr.include? n + @name2addr[n] << addr + } + } + } + @name2addr.each {|name, arr| arr.reverse!} + @initialized = true + end + } + self + end + + ## + # Gets the IP address of +name+ from the hosts file. + + def getaddress(name) + each_address(name) {|address| return address} + raise ResolvError.new("#{@filename} has no name: #{name}") + end + + ## + # Gets all IP addresses for +name+ from the hosts file. + + def getaddresses(name) + ret = [] + each_address(name) {|address| ret << address} + return ret + end + + ## + # Iterates over all IP addresses for +name+ retrieved from the hosts file. + + def each_address(name, &proc) + lazy_initialize + if @name2addr.include?(name) + @name2addr[name].each(&proc) + end + end + + ## + # Gets the hostname of +address+ from the hosts file. + + def getname(address) + each_name(address) {|name| return name} + raise ResolvError.new("#{@filename} has no address: #{address}") + end + + ## + # Gets all hostnames for +address+ from the hosts file. + + def getnames(address) + ret = [] + each_name(address) {|name| ret << name} + return ret + end + + ## + # Iterates over all hostnames for +address+ retrieved from the hosts file. + + def each_name(address, &proc) + lazy_initialize + if @addr2name.include?(address) + @addr2name[address].each(&proc) + end + end + end + + ## + # Resolv::DNS is a DNS stub resolver. + # + # Information taken from the following places: + # + # * STD0013 + # * RFC 1035 + # * ftp://ftp.isi.edu/in-notes/iana/assignments/dns-parameters + # * etc. + + class DNS + + ## + # Default DNS Port + + Port = 53 + + ## + # Default DNS UDP packet size + + UDPSize = 512 + + ## + # Creates a new DNS resolver. See Resolv::DNS.new for argument details. + # + # Yields the created DNS resolver to the block, if given, otherwise + # returns it. + + def self.open(*args) + dns = new(*args) + return dns unless block_given? + begin + yield dns + ensure + dns.close + end + end + + ## + # Creates a new DNS resolver. + # + # +config_info+ can be: + # + # nil:: Uses /etc/resolv.conf. + # String:: Path to a file using /etc/resolv.conf's format. + # Hash:: Must contain :nameserver, :search and :ndots keys. + # + # Example: + # + # Resolv::DNS.new(:nameserver => ['210.251.121.21'], + # :search => ['ruby-lang.org'], + # :ndots => 1) + + def initialize(config_info=nil) + @mutex = Mutex.new + @config = Config.new(config_info) + @initialized = nil + end + + def lazy_initialize # :nodoc: + @mutex.synchronize { + unless @initialized + @config.lazy_initialize + @initialized = true + end + } + self + end + + ## + # Closes the DNS resolver. + + def close + @mutex.synchronize { + if @initialized + @initialized = false + end + } + end + + ## + # Gets the IP address of +name+ from the DNS resolver. + # + # +name+ can be a Resolv::DNS::Name or a String. Retrieved address will + # be a Resolv::IPv4 or Resolv::IPv6 + + def getaddress(name) + each_address(name) {|address| return address} + raise ResolvError.new("DNS result has no information for #{name}") + end + + ## + # Gets all IP addresses for +name+ from the DNS resolver. + # + # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will + # be a Resolv::IPv4 or Resolv::IPv6 + + def getaddresses(name) + ret = [] + each_address(name) {|address| ret << address} + return ret + end + + ## + # Iterates over all IP addresses for +name+ retrieved from the DNS + # resolver. + # + # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will + # be a Resolv::IPv4 or Resolv::IPv6 + + def each_address(name) + each_resource(name, Resource::IN::A) {|resource| yield resource.address} + each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address} + end + + ## + # Gets the hostname for +address+ from the DNS resolver. + # + # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved + # name will be a Resolv::DNS::Name. + + def getname(address) + each_name(address) {|name| return name} + raise ResolvError.new("DNS result has no information for #{address}") + end + + ## + # Gets all hostnames for +address+ from the DNS resolver. + # + # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved + # names will be Resolv::DNS::Name instances. + + def getnames(address) + ret = [] + each_name(address) {|name| ret << name} + return ret + end + + ## + # Iterates over all hostnames for +address+ retrieved from the DNS + # resolver. + # + # +address+ must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved + # names will be Resolv::DNS::Name instances. + + def each_name(address) + case address + when Name + ptr = address + when IPv4::Regex + ptr = IPv4.create(address).to_name + when IPv6::Regex + ptr = IPv6.create(address).to_name + else + raise ResolvError.new("cannot interpret as address: #{address}") + end + each_resource(ptr, Resource::IN::PTR) {|resource| yield resource.name} + end + + ## + # Look up the +typeclass+ DNS resource of +name+. + # + # +name+ must be a Resolv::DNS::Name or a String. + # + # +typeclass+ should be one of the following: + # + # * Resolv::DNS::Resource::IN::A + # * Resolv::DNS::Resource::IN::AAAA + # * Resolv::DNS::Resource::IN::ANY + # * Resolv::DNS::Resource::IN::CNAME + # * Resolv::DNS::Resource::IN::HINFO + # * Resolv::DNS::Resource::IN::MINFO + # * Resolv::DNS::Resource::IN::MX + # * Resolv::DNS::Resource::IN::NS + # * Resolv::DNS::Resource::IN::PTR + # * Resolv::DNS::Resource::IN::SOA + # * Resolv::DNS::Resource::IN::TXT + # * Resolv::DNS::Resource::IN::WKS + # + # Returned resource is represented as a Resolv::DNS::Resource instance, + # i.e. Resolv::DNS::Resource::IN::A. + + def getresource(name, typeclass) + each_resource(name, typeclass) {|resource| return resource} + raise ResolvError.new("DNS result has no information for #{name}") + end + + ## + # Looks up all +typeclass+ DNS resources for +name+. See #getresource for + # argument details. + + def getresources(name, typeclass) + ret = [] + each_resource(name, typeclass) {|resource| ret << resource} + return ret + end + + ## + # Iterates over all +typeclass+ DNS resources for +name+. See + # #getresource for argument details. + + def each_resource(name, typeclass, &proc) + lazy_initialize + requester = make_requester + senders = {} + begin + @config.resolv(name) {|candidate, tout, nameserver| + msg = Message.new + msg.rd = 1 + msg.add_question(candidate, typeclass) + unless sender = senders[[candidate, nameserver]] + sender = senders[[candidate, nameserver]] = + requester.sender(msg, candidate, nameserver) + end + reply, reply_name = requester.request(sender, tout) + case reply.rcode + when RCode::NoError + extract_resources(reply, reply_name, typeclass, &proc) + return + when RCode::NXDomain + raise Config::NXDomain.new(reply_name.to_s) + else + raise Config::OtherResolvError.new(reply_name.to_s) + end + } + ensure + requester.close + end + end + + def make_requester # :nodoc: + if nameserver = @config.single? + Requester::ConnectedUDP.new(nameserver) + else + Requester::UnconnectedUDP.new + end + end + + def extract_resources(msg, name, typeclass) # :nodoc: + if typeclass < Resource::ANY + n0 = Name.create(name) + msg.each_answer {|n, ttl, data| + yield data if n0 == n + } + end + yielded = false + n0 = Name.create(name) + msg.each_answer {|n, ttl, data| + if n0 == n + case data + when typeclass + yield data + yielded = true + when Resource::CNAME + n0 = data.name + end + end + } + return if yielded + msg.each_answer {|n, ttl, data| + if n0 == n + case data + when typeclass + yield data + end + end + } + end + + if defined? SecureRandom + def self.random(arg) # :nodoc: + begin + SecureRandom.random_number(arg) + rescue NotImplementedError + rand(arg) + end + end + else + def self.random(arg) # :nodoc: + rand(arg) + end + end + + + def self.rangerand(range) # :nodoc: + base = range.begin + len = range.end - range.begin + if !range.exclude_end? + len += 1 + end + base + random(len) + end + + RequestID = {} + RequestIDMutex = Mutex.new + + def self.allocate_request_id(host, port) # :nodoc: + id = nil + RequestIDMutex.synchronize { + h = (RequestID[[host, port]] ||= {}) + begin + id = rangerand(0x0000..0xffff) + end while h[id] + h[id] = true + } + id + end + + def self.free_request_id(host, port, id) # :nodoc: + RequestIDMutex.synchronize { + key = [host, port] + if h = RequestID[key] + h.delete id + if h.empty? + RequestID.delete key + end + end + } + end + + def self.bind_random_port(udpsock) # :nodoc: + begin + port = rangerand(1024..65535) + udpsock.bind("", port) + rescue Errno::EADDRINUSE + retry + end + end + + class Requester # :nodoc: + def initialize + @senders = {} + @sock = nil + end + + def request(sender, tout) + timelimit = Time.now + tout + sender.send + while (now = Time.now) < timelimit + timeout = timelimit - now + if !IO.select([@sock], nil, nil, timeout) + raise ResolvTimeout + end + reply, from = recv_reply + begin + msg = Message.decode(reply) + rescue DecodeError + next # broken DNS message ignored + end + if s = @senders[[from,msg.id]] + break + else + # unexpected DNS message ignored + end + end + return msg, s.data + end + + def close + sock = @sock + @sock = nil + sock.close if sock + end + + class Sender # :nodoc: + def initialize(msg, data, sock) + @msg = msg + @data = data + @sock = sock + end + end + + class UnconnectedUDP < Requester # :nodoc: + def initialize + super() + @sock = UDPSocket.new + @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + DNS.bind_random_port(@sock) + end + + def recv_reply + reply, from = @sock.recvfrom(UDPSize) + return reply, [from[3],from[1]] + end + + def sender(msg, data, host, port=Port) + service = [host, port] + id = DNS.allocate_request_id(host, port) + request = msg.encode + request[0,2] = [id].pack('n') + return @senders[[service, id]] = + Sender.new(request, data, @sock, host, port) + end + + def close + super + @senders.each_key {|service, id| + DNS.free_request_id(service[0], service[1], id) + } + end + + class Sender < Requester::Sender # :nodoc: + def initialize(msg, data, sock, host, port) + super(msg, data, sock) + @host = host + @port = port + end + attr_reader :data + + def send + @sock.send(@msg, 0, @host, @port) + end + end + end + + class ConnectedUDP < Requester # :nodoc: + def initialize(host, port=Port) + super() + @host = host + @port = port + @sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET) + DNS.bind_random_port(@sock) + @sock.connect(host, port) + @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + end + + def recv_reply + reply = @sock.recv(UDPSize) + return reply, nil + end + + def sender(msg, data, host=@host, port=@port) + unless host == @host && port == @port + raise RequestError.new("host/port don't match: #{host}:#{port}") + end + id = DNS.allocate_request_id(@host, @port) + request = msg.encode + request[0,2] = [id].pack('n') + return @senders[[nil,id]] = Sender.new(request, data, @sock) + end + + def close + super + @senders.each_key {|from, id| + DNS.free_request_id(@host, @port, id) + } + end + + class Sender < Requester::Sender # :nodoc: + def send + @sock.send(@msg, 0) + end + attr_reader :data + end + end + + class TCP < Requester # :nodoc: + def initialize(host, port=Port) + super() + @host = host + @port = port + @sock = TCPSocket.new(@host, @port) + @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD + @senders = {} + end + + def recv_reply + len = @sock.read(2).unpack('n')[0] + reply = @sock.read(len) + return reply, nil + end + + def sender(msg, data, host=@host, port=@port) + unless host == @host && port == @port + raise RequestError.new("host/port don't match: #{host}:#{port}") + end + id = DNS.allocate_request_id(@host, @port) + request = msg.encode + request[0,2] = [request.length, id].pack('nn') + return @senders[[nil,id]] = Sender.new(request, data, @sock) + end + + class Sender < Requester::Sender # :nodoc: + def send + @sock.print(@msg) + @sock.flush + end + attr_reader :data + end + + def close + super + @senders.each_key {|from,id| + DNS.free_request_id(@host, @port, id) + } + end + end + + ## + # Indicates a problem with the DNS request. + + class RequestError < StandardError + end + end + + class Config # :nodoc: + def initialize(config_info=nil) + @mutex = Mutex.new + @config_info = config_info + @initialized = nil + end + + def Config.parse_resolv_conf(filename) + nameserver = [] + search = nil + ndots = 1 + open(filename) {|f| + f.each {|line| + line.sub!(/[#;].*/, '') + keyword, *args = line.split(/\s+/) + args.each { |arg| + arg.untaint + } + next unless keyword + case keyword + when 'nameserver' + nameserver += args + when 'domain' + next if args.empty? + search = [args[0]] + when 'search' + next if args.empty? + search = args + when 'options' + args.each {|arg| + case arg + when /\Andots:(\d+)\z/ + ndots = $1.to_i + end + } + end + } + } + return { :nameserver => nameserver, :search => search, :ndots => ndots } + end + + def Config.default_config_hash(filename="/etc/resolv.conf") + if File.exist? filename + config_hash = Config.parse_resolv_conf(filename) + else + if /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM + require 'win32/resolv' + search, nameserver = Win32::Resolv.get_resolv_info + config_hash = {} + config_hash[:nameserver] = nameserver if nameserver + config_hash[:search] = [search].flatten if search + end + end + config_hash + end + + def lazy_initialize + @mutex.synchronize { + unless @initialized + @nameserver = [] + @search = nil + @ndots = 1 + case @config_info + when nil + config_hash = Config.default_config_hash + when String + config_hash = Config.parse_resolv_conf(@config_info) + when Hash + config_hash = @config_info.dup + if String === config_hash[:nameserver] + config_hash[:nameserver] = [config_hash[:nameserver]] + end + if String === config_hash[:search] + config_hash[:search] = [config_hash[:search]] + end + else + raise ArgumentError.new("invalid resolv configuration: #{@config_info.inspect}") + end + @nameserver = config_hash[:nameserver] if config_hash.include? :nameserver + @search = config_hash[:search] if config_hash.include? :search + @ndots = config_hash[:ndots] if config_hash.include? :ndots + + @nameserver = ['0.0.0.0'] if @nameserver.empty? + if @search + @search = @search.map {|arg| Label.split(arg) } + else + hostname = Socket.gethostname + if /\./ =~ hostname + @search = [Label.split($')] + else + @search = [[]] + end + end + + if !@nameserver.kind_of?(Array) || + !@nameserver.all? {|ns| String === ns } + raise ArgumentError.new("invalid nameserver config: #{@nameserver.inspect}") + end + + if !@search.kind_of?(Array) || + !@search.all? {|ls| ls.all? {|l| Label::Str === l } } + raise ArgumentError.new("invalid search config: #{@search.inspect}") + end + + if !@ndots.kind_of?(Integer) + raise ArgumentError.new("invalid ndots config: #{@ndots.inspect}") + end + + @initialized = true + end + } + self + end + + def single? + lazy_initialize + if @nameserver.length == 1 + return @nameserver[0] + else + return nil + end + end + + def generate_candidates(name) + candidates = nil + name = Name.create(name) + if name.absolute? + candidates = [name] + else + if @ndots <= name.length - 1 + candidates = [Name.new(name.to_a)] + else + candidates = [] + end + candidates.concat(@search.map {|domain| Name.new(name.to_a + domain)}) + end + return candidates + end + + InitialTimeout = 5 + + def generate_timeouts + ts = [InitialTimeout] + ts << ts[-1] * 2 / @nameserver.length + ts << ts[-1] * 2 + ts << ts[-1] * 2 + return ts + end + + def resolv(name) + candidates = generate_candidates(name) + timeouts = generate_timeouts + begin + candidates.each {|candidate| + begin + timeouts.each {|tout| + @nameserver.each {|nameserver| + begin + yield candidate, tout, nameserver + rescue ResolvTimeout + end + } + } + raise ResolvError.new("DNS resolv timeout: #{name}") + rescue NXDomain + end + } + rescue ResolvError + end + end + + ## + # Indicates no such domain was found. + + class NXDomain < ResolvError + end + + ## + # Indicates some other unhandled resolver error was encountered. + + class OtherResolvError < ResolvError + end + end + + module OpCode # :nodoc: + Query = 0 + IQuery = 1 + Status = 2 + Notify = 4 + Update = 5 + end + + module RCode # :nodoc: + NoError = 0 + FormErr = 1 + ServFail = 2 + NXDomain = 3 + NotImp = 4 + Refused = 5 + YXDomain = 6 + YXRRSet = 7 + NXRRSet = 8 + NotAuth = 9 + NotZone = 10 + BADVERS = 16 + BADSIG = 16 + BADKEY = 17 + BADTIME = 18 + BADMODE = 19 + BADNAME = 20 + BADALG = 21 + end + + ## + # Indicates that the DNS response was unable to be decoded. + + class DecodeError < StandardError + end + + ## + # Indicates that the DNS request was unable to be encoded. + + class EncodeError < StandardError + end + + module Label # :nodoc: + def self.split(arg) + labels = [] + arg.scan(/[^\.]+/) {labels << Str.new($&)} + return labels + end + + class Str # :nodoc: + def initialize(string) + @string = string + @downcase = string.downcase + end + attr_reader :string, :downcase + + def to_s + return @string + end + + def inspect + return "#<#{self.class} #{self.to_s}>" + end + + def ==(other) + return @downcase == other.downcase + end + + def eql?(other) + return self == other + end + + def hash + return @downcase.hash + end + end + end + + ## + # A representation of a DNS name. + + class Name + + ## + # Creates a new DNS name from +arg+. +arg+ can be: + # + # Name:: returns +arg+. + # String:: Creates a new Name. + + def self.create(arg) + case arg + when Name + return arg + when String + return Name.new(Label.split(arg), /\.\z/ =~ arg ? true : false) + else + raise ArgumentError.new("cannot interpret as DNS name: #{arg.inspect}") + end + end + + def initialize(labels, absolute=true) # :nodoc: + @labels = labels + @absolute = absolute + end + + def inspect # :nodoc: + "#<#{self.class}: #{self.to_s}#{@absolute ? '.' : ''}>" + end + + ## + # True if this name is absolute. + + def absolute? + return @absolute + end + + def ==(other) # :nodoc: + return false unless Name === other + return @labels.join == other.to_a.join && @absolute == other.absolute? + end + + alias eql? == # :nodoc: + + ## + # Returns true if +other+ is a subdomain. + # + # Example: + # + # domain = Resolv::DNS::Name.create("y.z") + # p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true + # p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true + # p Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false + # p Resolv::DNS::Name.create("z").subdomain_of?(domain) #=> false + # p Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false + # p Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false + # + + def subdomain_of?(other) + raise ArgumentError, "not a domain name: #{other.inspect}" unless Name === other + return false if @absolute != other.absolute? + other_len = other.length + return false if @labels.length <= other_len + return @labels[-other_len, other_len] == other.to_a + end + + def hash # :nodoc: + return @labels.hash ^ @absolute.hash + end + + def to_a # :nodoc: + return @labels + end + + def length # :nodoc: + return @labels.length + end + + def [](i) # :nodoc: + return @labels[i] + end + + ## + # returns the domain name as a string. + # + # The domain name doesn't have a trailing dot even if the name object is + # absolute. + # + # Example: + # + # p Resolv::DNS::Name.create("x.y.z.").to_s #=> "x.y.z" + # p Resolv::DNS::Name.create("x.y.z").to_s #=> "x.y.z" + + def to_s + return @labels.join('.') + end + end + + class Message # :nodoc: + @@identifier = -1 + + def initialize(id = (@@identifier += 1) & 0xffff) + @id = id + @qr = 0 + @opcode = 0 + @aa = 0 + @tc = 0 + @rd = 0 # recursion desired + @ra = 0 # recursion available + @rcode = 0 + @question = [] + @answer = [] + @authority = [] + @additional = [] + end + + attr_accessor :id, :qr, :opcode, :aa, :tc, :rd, :ra, :rcode + attr_reader :question, :answer, :authority, :additional + + def ==(other) + return @id == other.id && + @qr == other.qr && + @opcode == other.opcode && + @aa == other.aa && + @tc == other.tc && + @rd == other.rd && + @ra == other.ra && + @rcode == other.rcode && + @question == other.question && + @answer == other.answer && + @authority == other.authority && + @additional == other.additional + end + + def add_question(name, typeclass) + @question << [Name.create(name), typeclass] + end + + def each_question + @question.each {|name, typeclass| + yield name, typeclass + } + end + + def add_answer(name, ttl, data) + @answer << [Name.create(name), ttl, data] + end + + def each_answer + @answer.each {|name, ttl, data| + yield name, ttl, data + } + end + + def add_authority(name, ttl, data) + @authority << [Name.create(name), ttl, data] + end + + def each_authority + @authority.each {|name, ttl, data| + yield name, ttl, data + } + end + + def add_additional(name, ttl, data) + @additional << [Name.create(name), ttl, data] + end + + def each_additional + @additional.each {|name, ttl, data| + yield name, ttl, data + } + end + + def each_resource + each_answer {|name, ttl, data| yield name, ttl, data} + each_authority {|name, ttl, data| yield name, ttl, data} + each_additional {|name, ttl, data| yield name, ttl, data} + end + + def encode + return MessageEncoder.new {|msg| + msg.put_pack('nnnnnn', + @id, + (@qr & 1) << 15 | + (@opcode & 15) << 11 | + (@aa & 1) << 10 | + (@tc & 1) << 9 | + (@rd & 1) << 8 | + (@ra & 1) << 7 | + (@rcode & 15), + @question.length, + @answer.length, + @authority.length, + @additional.length) + @question.each {|q| + name, typeclass = q + msg.put_name(name) + msg.put_pack('nn', typeclass::TypeValue, typeclass::ClassValue) + } + [@answer, @authority, @additional].each {|rr| + rr.each {|r| + name, ttl, data = r + msg.put_name(name) + msg.put_pack('nnN', data.class::TypeValue, data.class::ClassValue, ttl) + msg.put_length16 {data.encode_rdata(msg)} + } + } + }.to_s + end + + class MessageEncoder # :nodoc: + def initialize + @data = '' + @names = {} + yield self + end + + def to_s + return @data + end + + def put_bytes(d) + @data << d + end + + def put_pack(template, *d) + @data << d.pack(template) + end + + def put_length16 + length_index = @data.length + @data << "\0\0" + data_start = @data.length + yield + data_end = @data.length + @data[length_index, 2] = [data_end - data_start].pack("n") + end + + def put_string(d) + self.put_pack("C", d.length) + @data << d + end + + def put_string_list(ds) + ds.each {|d| + self.put_string(d) + } + end + + def put_name(d) + put_labels(d.to_a) + end + + def put_labels(d) + d.each_index {|i| + domain = d[i..-1] + if idx = @names[domain] + self.put_pack("n", 0xc000 | idx) + return + else + @names[domain] = @data.length + self.put_label(d[i]) + end + } + @data << "\0" + end + + def put_label(d) + self.put_string(d.to_s) + end + end + + def Message.decode(m) + o = Message.new(0) + MessageDecoder.new(m) {|msg| + id, flag, qdcount, ancount, nscount, arcount = + msg.get_unpack('nnnnnn') + o.id = id + o.qr = (flag >> 15) & 1 + o.opcode = (flag >> 11) & 15 + o.aa = (flag >> 10) & 1 + o.tc = (flag >> 9) & 1 + o.rd = (flag >> 8) & 1 + o.ra = (flag >> 7) & 1 + o.rcode = flag & 15 + (1..qdcount).each { + name, typeclass = msg.get_question + o.add_question(name, typeclass) + } + (1..ancount).each { + name, ttl, data = msg.get_rr + o.add_answer(name, ttl, data) + } + (1..nscount).each { + name, ttl, data = msg.get_rr + o.add_authority(name, ttl, data) + } + (1..arcount).each { + name, ttl, data = msg.get_rr + o.add_additional(name, ttl, data) + } + } + return o + end + + class MessageDecoder # :nodoc: + def initialize(data) + @data = data + @index = 0 + @limit = data.length + yield self + end + + def get_length16 + len, = self.get_unpack('n') + save_limit = @limit + @limit = @index + len + d = yield(len) + if @index < @limit + raise DecodeError.new("junk exists") + elsif @limit < @index + raise DecodeError.new("limit exceeded") + end + @limit = save_limit + return d + end + + def get_bytes(len = @limit - @index) + d = @data[@index, len] + @index += len + return d + end + + def get_unpack(template) + len = 0 + template.each_byte {|byte| + byte = "%c" % byte + case byte + when ?c, ?C + len += 1 + when ?n + len += 2 + when ?N + len += 4 + else + raise StandardError.new("unsupported template: '#{byte.chr}' in '#{template}'") + end + } + raise DecodeError.new("limit exceeded") if @limit < @index + len + arr = @data.unpack("@#{@index}#{template}") + @index += len + return arr + end + + def get_string + len = @data[@index].ord + raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len + d = @data[@index + 1, len] + @index += 1 + len + return d + end + + def get_string_list + strings = [] + while @index < @limit + strings << self.get_string + end + strings + end + + def get_name + return Name.new(self.get_labels) + end + + def get_labels(limit=nil) + limit = @index if !limit || @index < limit + d = [] + while true + case @data[@index].ord + when 0 + @index += 1 + return d + when 192..255 + idx = self.get_unpack('n')[0] & 0x3fff + if limit <= idx + raise DecodeError.new("non-backward name pointer") + end + save_index = @index + @index = idx + d += self.get_labels(limit) + @index = save_index + return d + else + d << self.get_label + end + end + return d + end + + def get_label + return Label::Str.new(self.get_string) + end + + def get_question + name = self.get_name + type, klass = self.get_unpack("nn") + return name, Resource.get_class(type, klass) + end + + def get_rr + name = self.get_name + type, klass, ttl = self.get_unpack('nnN') + typeclass = Resource.get_class(type, klass) + res = self.get_length16 { typeclass.decode_rdata self } + res.instance_variable_set :@ttl, ttl + return name, ttl, res + end + end + end + + ## + # A DNS query abstract class. + + class Query + def encode_rdata(msg) # :nodoc: + raise EncodeError.new("#{self.class} is query.") + end + + def self.decode_rdata(msg) # :nodoc: + raise DecodeError.new("#{self.class} is query.") + end + end + + ## + # A DNS resource abstract class. + + class Resource < Query + + ## + # Remaining Time To Live for this Resource. + + attr_reader :ttl + + ClassHash = {} # :nodoc: + + def encode_rdata(msg) # :nodoc: + raise NotImplementedError.new + end + + def self.decode_rdata(msg) # :nodoc: + raise NotImplementedError.new + end + + def ==(other) # :nodoc: + return false unless self.class == other.class + s_ivars = self.instance_variables + s_ivars.sort! + s_ivars.delete "@ttl" + o_ivars = other.instance_variables + o_ivars.sort! + o_ivars.delete "@ttl" + return s_ivars == o_ivars && + s_ivars.collect {|name| self.instance_variable_get name} == + o_ivars.collect {|name| other.instance_variable_get name} + end + + def eql?(other) # :nodoc: + return self == other + end + + def hash # :nodoc: + h = 0 + vars = self.instance_variables + vars.delete "@ttl" + vars.each {|name| + h ^= self.instance_variable_get(name).hash + } + return h + end + + def self.get_class(type_value, class_value) # :nodoc: + return ClassHash[[type_value, class_value]] || + Generic.create(type_value, class_value) + end + + ## + # A generic resource abstract class. + + class Generic < Resource + + ## + # Creates a new generic resource. + + def initialize(data) + @data = data + end + + ## + # Data for this generic resource. + + attr_reader :data + + def encode_rdata(msg) # :nodoc: + msg.put_bytes(data) + end + + def self.decode_rdata(msg) # :nodoc: + return self.new(msg.get_bytes) + end + + def self.create(type_value, class_value) # :nodoc: + c = Class.new(Generic) + c.const_set(:TypeValue, type_value) + c.const_set(:ClassValue, class_value) + Generic.const_set("Type#{type_value}_Class#{class_value}", c) + ClassHash[[type_value, class_value]] = c + return c + end + end + + ## + # Domain Name resource abstract class. + + class DomainName < Resource + + ## + # Creates a new DomainName from +name+. + + def initialize(name) + @name = name + end + + ## + # The name of this DomainName. + + attr_reader :name + + def encode_rdata(msg) # :nodoc: + msg.put_name(@name) + end + + def self.decode_rdata(msg) # :nodoc: + return self.new(msg.get_name) + end + end + + # Standard (class generic) RRs + + ClassValue = nil # :nodoc: + + ## + # An authoritative name server. + + class NS < DomainName + TypeValue = 2 # :nodoc: + end + + ## + # The canonical name for an alias. + + class CNAME < DomainName + TypeValue = 5 # :nodoc: + end + + ## + # Start Of Authority resource. + + class SOA < Resource + + TypeValue = 6 # :nodoc: + + ## + # Creates a new SOA record. See the attr documentation for the + # details of each argument. + + def initialize(mname, rname, serial, refresh, retry_, expire, minimum) + @mname = mname + @rname = rname + @serial = serial + @refresh = refresh + @retry = retry_ + @expire = expire + @minimum = minimum + end + + ## + # Name of the host where the master zone file for this zone resides. + + attr_reader :mname + + ## + # The person responsible for this domain name. + + attr_reader :rname + + ## + # The version number of the zone file. + + attr_reader :serial + + ## + # How often, in seconds, a secondary name server is to check for + # updates from the primary name server. + + attr_reader :refresh + + ## + # How often, in seconds, a secondary name server is to retry after a + # failure to check for a refresh. + + attr_reader :retry + + ## + # Time in seconds that a secondary name server is to use the data + # before refreshing from the primary name server. + + attr_reader :expire + + ## + # The minimum number of seconds to be used for TTL values in RRs. + + attr_reader :minimum + + def encode_rdata(msg) # :nodoc: + msg.put_name(@mname) + msg.put_name(@rname) + msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum) + end + + def self.decode_rdata(msg) # :nodoc: + mname = msg.get_name + rname = msg.get_name + serial, refresh, retry_, expire, minimum = msg.get_unpack('NNNNN') + return self.new( + mname, rname, serial, refresh, retry_, expire, minimum) + end + end + + ## + # A Pointer to another DNS name. + + class PTR < DomainName + TypeValue = 12 # :nodoc: + end + + ## + # Host Information resource. + + class HINFO < Resource + + TypeValue = 13 # :nodoc: + + ## + # Creates a new HINFO running +os+ on +cpu+. + + def initialize(cpu, os) + @cpu = cpu + @os = os + end + + ## + # CPU architecture for this resource. + + attr_reader :cpu + + ## + # Operating system for this resource. + + attr_reader :os + + def encode_rdata(msg) # :nodoc: + msg.put_string(@cpu) + msg.put_string(@os) + end + + def self.decode_rdata(msg) # :nodoc: + cpu = msg.get_string + os = msg.get_string + return self.new(cpu, os) + end + end + + ## + # Mailing list or mailbox information. + + class MINFO < Resource + + TypeValue = 14 # :nodoc: + + def initialize(rmailbx, emailbx) + @rmailbx = rmailbx + @emailbx = emailbx + end + + ## + # Domain name responsible for this mail list or mailbox. + + attr_reader :rmailbx + + ## + # Mailbox to use for error messages related to the mail list or mailbox. + + attr_reader :emailbx + + def encode_rdata(msg) # :nodoc: + msg.put_name(@rmailbx) + msg.put_name(@emailbx) + end + + def self.decode_rdata(msg) # :nodoc: + rmailbx = msg.get_string + emailbx = msg.get_string + return self.new(rmailbx, emailbx) + end + end + + ## + # Mail Exchanger resource. + + class MX < Resource + + TypeValue= 15 # :nodoc: + + ## + # Creates a new MX record with +preference+, accepting mail at + # +exchange+. + + def initialize(preference, exchange) + @preference = preference + @exchange = exchange + end + + ## + # The preference for this MX. + + attr_reader :preference + + ## + # The host of this MX. + + attr_reader :exchange + + def encode_rdata(msg) # :nodoc: + msg.put_pack('n', @preference) + msg.put_name(@exchange) + end + + def self.decode_rdata(msg) # :nodoc: + preference, = msg.get_unpack('n') + exchange = msg.get_name + return self.new(preference, exchange) + end + end + + ## + # Unstructured text resource. + + class TXT < Resource + + TypeValue = 16 # :nodoc: + + def initialize(first_string, *rest_strings) + @strings = [first_string, *rest_strings] + end + + ## + # Returns an Array of Strings for this TXT record. + + attr_reader :strings + + ## + # Returns the first string from +strings+. + + def data + @strings[0] + end + + def encode_rdata(msg) # :nodoc: + msg.put_string_list(@strings) + end + + def self.decode_rdata(msg) # :nodoc: + strings = msg.get_string_list + return self.new(*strings) + end + end + + ## + # A Query type requesting any RR. + + class ANY < Query + TypeValue = 255 # :nodoc: + end + + ClassInsensitiveTypes = [ # :nodoc: + NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, ANY + ] + + ## + # module IN contains ARPA Internet specific RRs. + + module IN + + ClassValue = 1 # :nodoc: + + ClassInsensitiveTypes.each {|s| + c = Class.new(s) + c.const_set(:TypeValue, s::TypeValue) + c.const_set(:ClassValue, ClassValue) + ClassHash[[s::TypeValue, ClassValue]] = c + self.const_set(s.name.sub(/.*::/, ''), c) + } + + ## + # IPv4 Address resource + + class A < Resource + TypeValue = 1 + ClassValue = IN::ClassValue + ClassHash[[TypeValue, ClassValue]] = self # :nodoc: + + ## + # Creates a new A for +address+. + + def initialize(address) + @address = IPv4.create(address) + end + + ## + # The Resolv::IPv4 address for this A. + + attr_reader :address + + def encode_rdata(msg) # :nodoc: + msg.put_bytes(@address.address) + end + + def self.decode_rdata(msg) # :nodoc: + return self.new(IPv4.new(msg.get_bytes(4))) + end + end + + ## + # Well Known Service resource. + + class WKS < Resource + TypeValue = 11 + ClassValue = IN::ClassValue + ClassHash[[TypeValue, ClassValue]] = self # :nodoc: + + def initialize(address, protocol, bitmap) + @address = IPv4.create(address) + @protocol = protocol + @bitmap = bitmap + end + + ## + # The host these services run on. + + attr_reader :address + + ## + # IP protocol number for these services. + + attr_reader :protocol + + ## + # A bit map of enabled services on this host. + # + # If protocol is 6 (TCP) then the 26th bit corresponds to the SMTP + # service (port 25). If this bit is set, then an SMTP server should + # be listening on TCP port 25; if zero, SMTP service is not + # supported. + + attr_reader :bitmap + + def encode_rdata(msg) # :nodoc: + msg.put_bytes(@address.address) + msg.put_pack("n", @protocol) + msg.put_bytes(@bitmap) + end + + def self.decode_rdata(msg) # :nodoc: + address = IPv4.new(msg.get_bytes(4)) + protocol, = msg.get_unpack("n") + bitmap = msg.get_bytes + return self.new(address, protocol, bitmap) + end + end + + ## + # An IPv6 address record. + + class AAAA < Resource + TypeValue = 28 + ClassValue = IN::ClassValue + ClassHash[[TypeValue, ClassValue]] = self # :nodoc: + + ## + # Creates a new AAAA for +address+. + + def initialize(address) + @address = IPv6.create(address) + end + + ## + # The Resolv::IPv6 address for this AAAA. + + attr_reader :address + + def encode_rdata(msg) # :nodoc: + msg.put_bytes(@address.address) + end + + def self.decode_rdata(msg) # :nodoc: + return self.new(IPv6.new(msg.get_bytes(16))) + end + end + + ## + # SRV resource record defined in RFC 2782 + # + # These records identify the hostname and port that a service is + # available at. + + class SRV < Resource + TypeValue = 33 + ClassValue = IN::ClassValue + ClassHash[[TypeValue, ClassValue]] = self # :nodoc: + + # Create a SRV resource record. + # + # See the documentation for #priority, #weight, #port and #target + # for +priority+, +weight+, +port and +target+ respectively. + + def initialize(priority, weight, port, target) + @priority = priority.to_int + @weight = weight.to_int + @port = port.to_int + @target = Name.create(target) + end + + # The priority of this target host. + # + # A client MUST attempt to contact the target host with the + # lowest-numbered priority it can reach; target hosts with the same + # priority SHOULD be tried in an order defined by the weight field. + # The range is 0-65535. Note that it is not widely implemented and + # should be set to zero. + + attr_reader :priority + + # A server selection mechanism. + # + # The weight field specifies a relative weight for entries with the + # same priority. Larger weights SHOULD be given a proportionately + # higher probability of being selected. The range of this number is + # 0-65535. Domain administrators SHOULD use Weight 0 when there + # isn't any server selection to do, to make the RR easier to read + # for humans (less noisy). Note that it is not widely implemented + # and should be set to zero. + + attr_reader :weight + + # The port on this target host of this service. + # + # The range is 0-65535. + + attr_reader :port + + # The domain name of the target host. + # + # A target of "." means that the service is decidedly not available + # at this domain. + + attr_reader :target + + def encode_rdata(msg) # :nodoc: + msg.put_pack("n", @priority) + msg.put_pack("n", @weight) + msg.put_pack("n", @port) + msg.put_name(@target) + end + + def self.decode_rdata(msg) # :nodoc: + priority, = msg.get_unpack("n") + weight, = msg.get_unpack("n") + port, = msg.get_unpack("n") + target = msg.get_name + return self.new(priority, weight, port, target) + end + end + end + end + end + + ## + # A Resolv::DNS IPv4 address. + + class IPv4 + + ## + # Regular expression IPv4 addresses must match. + + Regex = /\A(\d+)\.(\d+)\.(\d+)\.(\d+)\z/ + + def self.create(arg) + case arg + when IPv4 + return arg + when Regex + if (0..255) === (a = $1.to_i) && + (0..255) === (b = $2.to_i) && + (0..255) === (c = $3.to_i) && + (0..255) === (d = $4.to_i) + return self.new([a, b, c, d].pack("CCCC")) + else + raise ArgumentError.new("IPv4 address with invalid value: " + arg) + end + else + raise ArgumentError.new("cannot interpret as IPv4 address: #{arg.inspect}") + end + end + + def initialize(address) # :nodoc: + unless address.kind_of?(String) && address.length == 4 + raise ArgumentError.new('IPv4 address must be 4 bytes') + end + @address = address + end + + ## + # A String representation of this IPv4 address. + + ## + # The raw IPv4 address as a String. + + attr_reader :address + + def to_s # :nodoc: + return sprintf("%d.%d.%d.%d", *@address.unpack("CCCC")) + end + + def inspect # :nodoc: + return "#<#{self.class} #{self.to_s}>" + end + + ## + # Turns this IPv4 address into a Resolv::DNS::Name. + + def to_name + return DNS::Name.create( + '%d.%d.%d.%d.in-addr.arpa.' % @address.unpack('CCCC').reverse) + end + + def ==(other) # :nodoc: + return @address == other.address + end + + def eql?(other) # :nodoc: + return self == other + end + + def hash # :nodoc: + return @address.hash + end + end + + ## + # A Resolv::DNS IPv6 address. + + class IPv6 + + ## + # IPv6 address format a:b:c:d:e:f:g:h + Regex_8Hex = /\A + (?:[0-9A-Fa-f]{1,4}:){7} + [0-9A-Fa-f]{1,4} + \z/x + + ## + # Compressed IPv6 address format a::b + + Regex_CompressedHex = /\A + ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: + ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) + \z/x + + ## + # IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z + + Regex_6Hex4Dec = /\A + ((?:[0-9A-Fa-f]{1,4}:){6,6}) + (\d+)\.(\d+)\.(\d+)\.(\d+) + \z/x + + ## + # Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z + + Regex_CompressedHex4Dec = /\A + ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: + ((?:[0-9A-Fa-f]{1,4}:)*) + (\d+)\.(\d+)\.(\d+)\.(\d+) + \z/x + + ## + # A composite IPv6 address Regexp. + + Regex = / + (?:#{Regex_8Hex}) | + (?:#{Regex_CompressedHex}) | + (?:#{Regex_6Hex4Dec}) | + (?:#{Regex_CompressedHex4Dec})/x + + ## + # Creates a new IPv6 address from +arg+ which may be: + # + # IPv6:: returns +arg+. + # String:: +arg+ must match one of the IPv6::Regex* constants + + def self.create(arg) + case arg + when IPv6 + return arg + when String + address = '' + if Regex_8Hex =~ arg + arg.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')} + elsif Regex_CompressedHex =~ arg + prefix = $1 + suffix = $2 + a1 = '' + a2 = '' + prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')} + suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')} + omitlen = 16 - a1.length - a2.length + address << a1 << "\0" * omitlen << a2 + elsif Regex_6Hex4Dec =~ arg + prefix, a, b, c, d = $1, $2.to_i, $3.to_i, $4.to_i, $5.to_i + if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d + prefix.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')} + address << [a, b, c, d].pack('CCCC') + else + raise ArgumentError.new("not numeric IPv6 address: " + arg) + end + elsif Regex_CompressedHex4Dec =~ arg + prefix, suffix, a, b, c, d = $1, $2, $3.to_i, $4.to_i, $5.to_i, $6.to_i + if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d + a1 = '' + a2 = '' + prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')} + suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')} + omitlen = 12 - a1.length - a2.length + address << a1 << "\0" * omitlen << a2 << [a, b, c, d].pack('CCCC') + else + raise ArgumentError.new("not numeric IPv6 address: " + arg) + end + else + raise ArgumentError.new("not numeric IPv6 address: " + arg) + end + return IPv6.new(address) + else + raise ArgumentError.new("cannot interpret as IPv6 address: #{arg.inspect}") + end + end + + def initialize(address) # :nodoc: + unless address.kind_of?(String) && address.length == 16 + raise ArgumentError.new('IPv6 address must be 16 bytes') + end + @address = address + end + + ## + # The raw IPv6 address as a String. + + attr_reader :address + + def to_s # :nodoc: + address = sprintf("%X:%X:%X:%X:%X:%X:%X:%X", *@address.unpack("nnnnnnnn")) + unless address.sub!(/(^|:)0(:0)+(:|$)/, '::') + address.sub!(/(^|:)0(:|$)/, '::') + end + return address + end + + def inspect # :nodoc: + return "#<#{self.class} #{self.to_s}>" + end + + ## + # Turns this IPv6 address into a Resolv::DNS::Name. + #-- + # ip6.arpa should be searched too. [RFC3152] + + def to_name + return DNS::Name.new( + @address.unpack("H32")[0].split(//).reverse + ['ip6', 'arpa']) + end + + def ==(other) # :nodoc: + return @address == other.address + end + + def eql?(other) # :nodoc: + return self == other + end + + def hash # :nodoc: + return @address.hash + end + end + + ## + # Default resolver to use for Resolv class methods. + + DefaultResolver = self.new + + ## + # Address Regexp to use for matching IP addresses. + + AddressRegex = /(?:#{IPv4::Regex})|(?:#{IPv6::Regex})/ + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/attlistdecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/attlistdecl.rb new file mode 100644 index 0000000..ea5a98b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/attlistdecl.rb @@ -0,0 +1,62 @@ +#vim:ts=2 sw=2 noexpandtab: +require 'rexml/child' +require 'rexml/source' + +module REXML + # This class needs: + # * Documentation + # * Work! Not all types of attlists are intelligently parsed, so we just + # spew back out what we get in. This works, but it would be better if + # we formatted the output ourselves. + # + # AttlistDecls provide *just* enough support to allow namespace + # declarations. If you need some sort of generalized support, or have an + # interesting idea about how to map the hideous, terrible design of DTD + # AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate + # for anything to make DTDs more palateable. + class AttlistDecl < Child + include Enumerable + + # What is this? Got me. + attr_reader :element_name + + # Create an AttlistDecl, pulling the information from a Source. Notice + # that this isn't very convenient; to create an AttlistDecl, you basically + # have to format it yourself, and then have the initializer parse it. + # Sorry, but for the forseeable future, DTD support in REXML is pretty + # weak on convenience. Have I mentioned how much I hate DTDs? + def initialize(source) + super() + if (source.kind_of? Array) + @element_name, @pairs, @contents = *source + end + end + + # Access the attlist attribute/value pairs. + # value = attlist_decl[ attribute_name ] + def [](key) + @pairs[key] + end + + # Whether an attlist declaration includes the given attribute definition + # if attlist_decl.include? "xmlns:foobar" + def include?(key) + @pairs.keys.include? key + end + + # Iterate over the key/value pairs: + # attlist_decl.each { |attribute_name, attribute_value| ... } + def each(&block) + @pairs.each(&block) + end + + # Write out exactly what we got in. + def write out, indent=-1 + out << @contents + end + + def node_type + :attlistdecl + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/attribute.rb b/lib/ruby-1.9.1-rc1/lib/rexml/attribute.rb new file mode 100644 index 0000000..febcc28 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/attribute.rb @@ -0,0 +1,188 @@ +require "rexml/namespace" +require 'rexml/text' + +module REXML + # Defines an Element Attribute; IE, a attribute=value pair, as in: + # . Attributes can be in their own + # namespaces. General users of REXML will not interact with the + # Attribute class much. + class Attribute + include Node + include Namespace + + # The element to which this attribute belongs + attr_reader :element + # The normalized value of this attribute. That is, the attribute with + # entities intact. + attr_writer :normalized + PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um + + NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um + + # Constructor. + # FIXME: The parser doesn't catch illegal characters in attributes + # + # first:: + # Either: an Attribute, which this new attribute will become a + # clone of; or a String, which is the name of this attribute + # second:: + # If +first+ is an Attribute, then this may be an Element, or nil. + # If nil, then the Element parent of this attribute is the parent + # of the +first+ Attribute. If the first argument is a String, + # then this must also be a String, and is the content of the attribute. + # If this is the content, it must be fully normalized (contain no + # illegal characters). + # parent:: + # Ignored unless +first+ is a String; otherwise, may be the Element + # parent of this attribute, or nil. + # + # + # Attribute.new( attribute_to_clone ) + # Attribute.new( attribute_to_clone, parent_element ) + # Attribute.new( "attr", "attr_value" ) + # Attribute.new( "attr", "attr_value", parent_element ) + def initialize( first, second=nil, parent=nil ) + @normalized = @unnormalized = @element = nil + if first.kind_of? Attribute + self.name = first.expanded_name + @unnormalized = first.value + if second.kind_of? Element + @element = second + else + @element = first.element + end + elsif first.kind_of? String + @element = parent + self.name = first + @normalized = second.to_s + else + raise "illegal argument #{first.class.name} to Attribute constructor" + end + end + + # Returns the namespace of the attribute. + # + # e = Element.new( "elns:myelement" ) + # e.add_attribute( "nsa:a", "aval" ) + # e.add_attribute( "b", "bval" ) + # e.attributes.get_attribute( "a" ).prefix # -> "nsa" + # e.attributes.get_attribute( "b" ).prefix # -> "elns" + # a = Attribute.new( "x", "y" ) + # a.prefix # -> "" + def prefix + pf = super + if pf == "" + pf = @element.prefix if @element + end + pf + end + + # Returns the namespace URL, if defined, or nil otherwise + # + # e = Element.new("el") + # e.add_attributes({"xmlns:ns", "http://url"}) + # e.namespace( "ns" ) # -> "http://url" + def namespace arg=nil + arg = prefix if arg.nil? + @element.namespace arg + end + + # Returns true if other is an Attribute and has the same name and value, + # false otherwise. + def ==( other ) + other.kind_of?(Attribute) and other.name==name and other.value==value + end + + # Creates (and returns) a hash from both the name and value + def hash + name.hash + value.hash + end + + # Returns this attribute out as XML source, expanding the name + # + # a = Attribute.new( "x", "y" ) + # a.to_string # -> "x='y'" + # b = Attribute.new( "ns:x", "y" ) + # b.to_string # -> "ns:x='y'" + def to_string + if @element and @element.context and @element.context[:attribute_quote] == :quote + %Q^#@expanded_name="#{to_s().gsub(/"/, '"e;')}"^ + else + "#@expanded_name='#{to_s().gsub(/'/, ''')}'" + end + end + + def doctype + if @element + doc = @element.document + doctype = doc.doctype if doc + end + end + + # Returns the attribute value, with entities replaced + def to_s + return @normalized if @normalized + + @normalized = Text::normalize( @unnormalized, doctype ) + @unnormalized = nil + @normalized + end + + # Returns the UNNORMALIZED value of this attribute. That is, entities + # have been expanded to their values + def value + return @unnormalized if @unnormalized + @unnormalized = Text::unnormalize( @normalized, doctype ) + @normalized = nil + @unnormalized + end + + # Returns a copy of this attribute + def clone + Attribute.new self + end + + # Sets the element of which this object is an attribute. Normally, this + # is not directly called. + # + # Returns this attribute + def element=( element ) + @element = element + + if @normalized + Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype ) + end + + self + end + + # Removes this Attribute from the tree, and returns true if successfull + # + # This method is usually not called directly. + def remove + @element.attributes.delete self.name unless @element.nil? + end + + # Writes this attribute (EG, puts 'key="value"' to the output) + def write( output, indent=-1 ) + output << to_string + end + + def node_type + :attribute + end + + def inspect + rv = "" + write( rv ) + rv + end + + def xpath + path = @element.xpath + path += "/@#{self.expanded_name}" + return path + end + end +end +#vim:ts=2 sw=2 noexpandtab: diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/cdata.rb b/lib/ruby-1.9.1-rc1/lib/rexml/cdata.rb new file mode 100644 index 0000000..123a7c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/cdata.rb @@ -0,0 +1,67 @@ +require "rexml/text" + +module REXML + class CData < Text + START = '' + ILLEGAL = /(\]\]>)/ + + # Constructor. CData is data between + # + # _Examples_ + # CData.new( source ) + # CData.new( "Here is some CDATA" ) + # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) + def initialize( first, whitespace=true, parent=nil ) + super( first, whitespace, parent, false, true, ILLEGAL ) + end + + # Make a copy of this object + # + # _Examples_ + # c = CData.new( "Some text" ) + # d = c.clone + # d.to_s # -> "Some text" + def clone + CData.new self + end + + # Returns the content of this CData object + # + # _Examples_ + # c = CData.new( "Some text" ) + # c.to_s # -> "Some text" + def to_s + @string + end + + def value + @string + end + + # == DEPRECATED + # See the rexml/formatters package + # + # Generates XML output of this object + # + # output:: + # Where to write the string. Defaults to $stdout + # indent:: + # The amount to indent this node by + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # _Examples_ + # c = CData.new( " Some text " ) + # c.write( $stdout ) #-> + def write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) + Kernel.warn( "#{self.class.name}.write is deprecated" ) + indent( output, indent ) + output << START + output << @string + output << STOP + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/child.rb b/lib/ruby-1.9.1-rc1/lib/rexml/child.rb new file mode 100644 index 0000000..033057d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/child.rb @@ -0,0 +1,96 @@ +require "rexml/node" + +module REXML + ## + # A Child object is something contained by a parent, and this class + # contains methods to support that. Most user code will not use this + # class directly. + class Child + include Node + attr_reader :parent # The Parent of this object + + # Constructor. Any inheritors of this class should call super to make + # sure this method is called. + # parent:: + # if supplied, the parent of this child will be set to the + # supplied value, and self will be added to the parent + def initialize( parent = nil ) + @parent = nil + # Declare @parent, but don't define it. The next line sets the + # parent. + parent.add( self ) if parent + end + + # Replaces this object with another object. Basically, calls + # Parent.replace_child + # + # Returns:: self + def replace_with( child ) + @parent.replace_child( self, child ) + self + end + + # Removes this child from the parent. + # + # Returns:: self + def remove + unless @parent.nil? + @parent.delete self + end + self + end + + # Sets the parent of this child to the supplied argument. + # + # other:: + # Must be a Parent object. If this object is the same object as the + # existing parent of this child, no action is taken. Otherwise, this + # child is removed from the current parent (if one exists), and is added + # to the new parent. + # Returns:: The parent added + def parent=( other ) + return @parent if @parent == other + @parent.delete self if defined? @parent and @parent + @parent = other + end + + alias :next_sibling :next_sibling_node + alias :previous_sibling :previous_sibling_node + + # Sets the next sibling of this child. This can be used to insert a child + # after some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.next_sibling = c + # # => + def next_sibling=( other ) + parent.insert_after self, other + end + + # Sets the previous sibling of this child. This can be used to insert a + # child before some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.previous_sibling = c + # # => + def previous_sibling=(other) + parent.insert_before self, other + end + + # Returns:: the document this child belongs to, or nil if this child + # belongs to no document + def document + return parent.document unless parent.nil? + nil + end + + # This doesn't yet handle encodings + def bytes + encoding = document.encoding + + to_s + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/comment.rb b/lib/ruby-1.9.1-rc1/lib/rexml/comment.rb new file mode 100644 index 0000000..d5be89b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/comment.rb @@ -0,0 +1,80 @@ +require "rexml/child" + +module REXML + ## + # Represents an XML comment; that is, text between \ + class Comment < Child + include Comparable + START = "" + + # The content text + + attr_accessor :string + + ## + # Constructor. The first argument can be one of three types: + # @param first If String, the contents of this comment are set to the + # argument. If Comment, the argument is duplicated. If + # Source, the argument is scanned for a comment. + # @param second If the first argument is a Source, this argument + # should be nil, not supplied, or a Parent to be set as the parent + # of this object + def initialize( first, second = nil ) + #puts "IN COMMENT CONSTRUCTOR; SECOND IS #{second.type}" + super(second) + if first.kind_of? String + @string = first + elsif first.kind_of? Comment + @string = first.string + end + end + + def clone + Comment.new self + end + + # == DEPRECATED + # See REXML::Formatters + # + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored by this class. The contents of comments are never modified. + # ie_hack:: + # Needed for conformity to the child API, but not used by this class. + def write( output, indent=-1, transitive=false, ie_hack=false ) + Kernel.warn("Comment.write is deprecated. See REXML::Formatters") + indent( output, indent ) + output << START + output << @string + output << STOP + end + + alias :to_s :string + + ## + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + def <=>(other) + other.to_s <=> @string + end + + ## + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + def ==( other ) + other.kind_of? Comment and + (other <=> self) == 0 + end + + def node_type + :comment + end + end +end +#vim:ts=2 sw=2 noexpandtab: diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/doctype.rb b/lib/ruby-1.9.1-rc1/lib/rexml/doctype.rb new file mode 100644 index 0000000..35beabc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/doctype.rb @@ -0,0 +1,270 @@ +require "rexml/parent" +require "rexml/parseexception" +require "rexml/namespace" +require 'rexml/entity' +require 'rexml/attlistdecl' +require 'rexml/xmltokens' + +module REXML + # Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as + # being used to declare entities used in the document. + class DocType < Parent + include XMLTokens + START = "" + SYSTEM = "SYSTEM" + PUBLIC = "PUBLIC" + DEFAULT_ENTITIES = { + 'gt'=>EntityConst::GT, + 'lt'=>EntityConst::LT, + 'quot'=>EntityConst::QUOT, + "apos"=>EntityConst::APOS + } + + # name is the name of the doctype + # external_id is the referenced DTD, if given + attr_reader :name, :external_id, :entities, :namespaces + + # Constructor + # + # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) + # # + # dt = DocType.new( doctype_to_clone ) + # # Incomplete. Shallow clone of doctype + # + # +Note+ that the constructor: + # + # Doctype.new( Source.new( "" ) ) + # + # is _deprecated_. Do not use it. It will probably disappear. + def initialize( first, parent=nil ) + @entities = DEFAULT_ENTITIES + @long_name = @uri = nil + if first.kind_of? String + super() + @name = first + @external_id = parent + elsif first.kind_of? DocType + super( parent ) + @name = first.name + @external_id = first.external_id + elsif first.kind_of? Array + super( parent ) + @name = first[0] + @external_id = first[1] + @long_name = first[2] + @uri = first[3] + elsif first.kind_of? Source + super( parent ) + parser = Parsers::BaseParser.new( first ) + event = parser.pull + if event[0] == :start_doctype + @name, @external_id, @long_name, @uri, = event[1..-1] + end + else + super() + end + end + + def node_type + :doctype + end + + def attributes_of element + rv = [] + each do |child| + child.each do |key,val| + rv << Attribute.new(key,val) + end if child.kind_of? AttlistDecl and child.element_name == element + end + rv + end + + def attribute_of element, attribute + att_decl = find do |child| + child.kind_of? AttlistDecl and + child.element_name == element and + child.include? attribute + end + return nil unless att_decl + att_decl[attribute] + end + + def clone + DocType.new self + end + + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indentation will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored + # ie_hack:: + # Ignored + def write( output, indent=0, transitive=false, ie_hack=false ) + f = REXML::Formatters::Default.new + indent( output, indent ) + output << START + output << ' ' + output << @name + output << " #@external_id" if @external_id + output << " #{@long_name.inspect}" if @long_name + output << " #{@uri.inspect}" if @uri + unless @children.empty? + next_indent = indent + 1 + output << ' [' + @children.each { |child| + output << "\n" + f.write( child, output ) + } + output << "\n]" + end + output << STOP + end + + def context + @parent.context + end + + def entity( name ) + @entities[name].unnormalized if @entities[name] + end + + def add child + super(child) + @entities = DEFAULT_ENTITIES.clone if @entities == DEFAULT_ENTITIES + @entities[ child.name ] = child if child.kind_of? Entity + end + + # This method retrieves the public identifier identifying the document's + # DTD. + # + # Method contributed by Henrik Martensson + def public + case @external_id + when "SYSTEM" + nil + when "PUBLIC" + strip_quotes(@long_name) + end + end + + # This method retrieves the system identifier identifying the document's DTD + # + # Method contributed by Henrik Martensson + def system + case @external_id + when "SYSTEM" + strip_quotes(@long_name) + when "PUBLIC" + @uri.kind_of?(String) ? strip_quotes(@uri) : nil + end + end + + # This method returns a list of notations that have been declared in the + # _internal_ DTD subset. Notations in the external DTD subset are not + # listed. + # + # Method contributed by Henrik Martensson + def notations + children().select {|node| node.kind_of?(REXML::NotationDecl)} + end + + # Retrieves a named notation. Only notations declared in the internal + # DTD subset can be retrieved. + # + # Method contributed by Henrik Martensson + def notation(name) + notations.find { |notation_decl| + notation_decl.name == name + } + end + + private + + # Method contributed by Henrik Martensson + def strip_quotes(quoted_string) + quoted_string =~ /^[\'\"].*[\'\"]$/ ? + quoted_string[1, quoted_string.length-2] : + quoted_string + end + end + + # We don't really handle any of these since we're not a validating + # parser, so we can be pretty dumb about them. All we need to be able + # to do is spew them back out on a write() + + # This is an abstract class. You never use this directly; it serves as a + # parent class for the specific declarations. + class Declaration < Child + def initialize src + super() + @string = src + end + + def to_s + @string+'>' + end + + # == DEPRECATED + # See REXML::Formatters + # + def write( output, indent ) + output << to_s + end + end + + public + class ElementDecl < Declaration + def initialize( src ) + super + end + end + + class ExternalEntity < Child + def initialize( src ) + super() + @entity = src + end + def to_s + @entity + end + def write( output, indent ) + output << @entity + end + end + + class NotationDecl < Child + attr_accessor :public, :system + def initialize name, middle, pub, sys + super(nil) + @name = name + @middle = middle + @public = pub + @system = sys + end + + def to_s + "" + end + + def write( output, indent=-1 ) + output << to_s + end + + # This method retrieves the name of the notation. + # + # Method contributed by Henrik Martensson + def name + @name + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/document.rb b/lib/ruby-1.9.1-rc1/lib/rexml/document.rb new file mode 100644 index 0000000..48f1a0e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/document.rb @@ -0,0 +1,231 @@ +require "rexml/element" +require "rexml/xmldecl" +require "rexml/source" +require "rexml/comment" +require "rexml/doctype" +require "rexml/instruction" +require "rexml/rexml" +require "rexml/parseexception" +require "rexml/output" +require "rexml/parsers/baseparser" +require "rexml/parsers/streamparser" +require "rexml/parsers/treeparser" + +module REXML + # Represents a full XML document, including PIs, a doctype, etc. A + # Document has a single child that can be accessed by root(). + # Note that if you want to have an XML declaration written for a document + # you create, you must add one; REXML documents do not write a default + # declaration for you. See |DECLARATION| and |write|. + class Document < Element + # A convenient default XML declaration. If you want an XML declaration, + # the easiest way to add one is mydoc << Document::DECLARATION + # +DEPRECATED+ + # Use: mydoc << XMLDecl.default + DECLARATION = XMLDecl.default + + # Constructor + # @param source if supplied, must be a Document, String, or IO. + # Documents have their context and Element attributes cloned. + # Strings are expected to be valid XML documents. IOs are expected + # to be sources of valid XML documents. + # @param context if supplied, contains the context of the document; + # this should be a Hash. + def initialize( source = nil, context = {} ) + @entity_expansion_count = 0 + super() + @context = context + return if source.nil? + if source.kind_of? Document + @context = source.context + super source + else + build( source ) + end + end + + def node_type + :document + end + + # Should be obvious + def clone + Document.new self + end + + # According to the XML spec, a root node has no expanded name + def expanded_name + '' + #d = doc_type + #d ? d.name : "UNDEFINED" + end + + alias :name :expanded_name + + # We override this, because XMLDecls and DocTypes must go at the start + # of the document + def add( child ) + if child.kind_of? XMLDecl + @children.unshift child + child.parent = self + elsif child.kind_of? DocType + # Find first Element or DocType node and insert the decl right + # before it. If there is no such node, just insert the child at the + # end. If there is a child and it is an DocType, then replace it. + insert_before_index = 0 + @children.find { |x| + insert_before_index += 1 + x.kind_of?(Element) || x.kind_of?(DocType) + } + if @children[ insert_before_index ] # Not null = not end of list + if @children[ insert_before_index ].kind_of DocType + @children[ insert_before_index ] = child + else + @children[ index_before_index-1, 0 ] = child + end + else # Insert at end of list + @children[insert_before_index] = child + end + child.parent = self + else + rv = super + raise "attempted adding second root element to document" if @elements.size > 1 + rv + end + end + alias :<< :add + + def add_element(arg=nil, arg2=nil) + rv = super + raise "attempted adding second root element to document" if @elements.size > 1 + rv + end + + # @return the root Element of the document, or nil if this document + # has no children. + def root + elements[1] + #self + #@children.find { |item| item.kind_of? Element } + end + + # @return the DocType child of the document, if one exists, + # and nil otherwise. + def doctype + @children.find { |item| item.kind_of? DocType } + end + + # @return the XMLDecl of this document; if no XMLDecl has been + # set, the default declaration is returned. + def xml_decl + rv = @children[0] + return rv if rv.kind_of? XMLDecl + rv = @children.unshift(XMLDecl.default)[0] + end + + # @return the XMLDecl version of this document as a String. + # If no XMLDecl has been set, returns the default version. + def version + xml_decl().version + end + + # @return the XMLDecl encoding of this document as a String. + # If no XMLDecl has been set, returns the default encoding. + def encoding + xml_decl().encoding + end + + # @return the XMLDecl standalone value of this document as a String. + # If no XMLDecl has been set, returns the default setting. + def stand_alone? + xml_decl().stand_alone? + end + + # Write the XML tree out, optionally with indent. This writes out the + # entire XML document, including XML declarations, doctype declarations, + # and processing instructions (if any are given). + # + # A controversial point is whether Document should always write the XML + # declaration () whether or not one is given by the + # user (or source document). REXML does not write one if one was not + # specified, because it adds unnecessary bandwidth to applications such + # as XML-RPC. + # + # See also the classes in the rexml/formatters package for the proper way + # to change the default formatting of XML output + # + # _Examples_ + # Document.new("").serialize + # + # output_string = "" + # tr = Transitive.new( output_string ) + # Document.new("").serialize( tr ) + # + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be twice this number of spaces, and children will be + # indented an additional amount. For a value of 3, every item will be + # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the absolute *value* of the document -- that is, it leaves the value + # and number of Text nodes in the document unchanged. + # ie_hack:: + # Internet Explorer is the worst piece of crap to have ever been + # written, with the possible exception of Windows itself. Since IE is + # unable to parse proper XML, we have to provide a hack to generate XML + # that IE's limited abilities can handle. This hack inserts a space + # before the /> on empty tags. Defaults to false + def write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) + if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output) + output = Output.new( output, xml_decl.encoding ) + end + formatter = if indent > -1 + if transitive + require "rexml/formatters/transitive" + REXML::Formatters::Transitive.new( indent, ie_hack ) + else + REXML::Formatters::Pretty.new( indent, ie_hack ) + end + else + REXML::Formatters::Default.new( ie_hack ) + end + formatter.write( self, output ) + end + + + def Document::parse_stream( source, listener ) + Parsers::StreamParser.new( source, listener ).parse + end + + @@entity_expansion_limit = 10_000 + + # Set the entity expansion limit. By default the limit is set to 10000. + def Document::entity_expansion_limit=( val ) + @@entity_expansion_limit = val + end + + # Get the entity expansion limit. By default the limit is set to 10000. + def Document::entity_expansion_limit + return @@entity_expansion_limit + end + + attr_reader :entity_expansion_count + + def record_entity_expansion + @entity_expansion_count += 1 + if @entity_expansion_count > @@entity_expansion_limit + raise "number of entity expansions exceeded, processing aborted." + end + end + + private + def build( source ) + Parsers::TreeParser.new( source, self ).parse + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/dtd/attlistdecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/attlistdecl.rb new file mode 100644 index 0000000..25955ee --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/attlistdecl.rb @@ -0,0 +1,10 @@ +require "rexml/child" +module REXML + module DTD + class AttlistDecl < Child + START = ")/um + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/dtd/dtd.rb b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/dtd.rb new file mode 100644 index 0000000..966e39e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/dtd.rb @@ -0,0 +1,51 @@ +require "rexml/dtd/elementdecl" +require "rexml/dtd/entitydecl" +require "rexml/comment" +require "rexml/dtd/notationdecl" +require "rexml/dtd/attlistdecl" +require "rexml/parent" + +module REXML + module DTD + class Parser + def Parser.parse( input ) + case input + when String + parse_helper input + when File + parse_helper input.read + end + end + + # Takes a String and parses it out + def Parser.parse_helper( input ) + contents = Parent.new + while input.size > 0 + case input + when ElementDecl.PATTERN_RE + match = $& + source = $' + contents << ElementDecl.new( match ) + when AttlistDecl.PATTERN_RE + matchdata = $~ + source = $' + contents << AttlistDecl.new( matchdata ) + when EntityDecl.PATTERN_RE + matchdata = $~ + source = $' + contents << EntityDecl.new( matchdata ) + when Comment.PATTERN_RE + matchdata = $~ + source = $' + contents << Comment.new( matchdata ) + when NotationDecl.PATTERN_RE + matchdata = $~ + source = $' + contents << NotationDecl.new( matchdata ) + end + end + contents + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/dtd/elementdecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/elementdecl.rb new file mode 100644 index 0000000..a0bf641 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/elementdecl.rb @@ -0,0 +1,17 @@ +require "rexml/child" +module REXML + module DTD + class ElementDecl < Child + START = "/um + PATTERN_RE = /^\s*#{START}\s+((?:[:\w_][-\.\w_]*:)?[-!\*\.\w_]*)(.*?)>/ + #\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true) + + def initialize match + @name = match[1] + @rest = match[2] + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/dtd/entitydecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/entitydecl.rb new file mode 100644 index 0000000..0adda6f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/entitydecl.rb @@ -0,0 +1,56 @@ +require "rexml/child" +module REXML + module DTD + class EntityDecl < Child + START = "/um + SYSTEM = /^\s*#{START}\s+(?:%\s+)?(\w+)\s+SYSTEM\s+((["']).*?\3)(?:\s+NDATA\s+\w+)?\s*>/um + PLAIN = /^\s*#{START}\s+(\w+)\s+((["']).*?\3)\s*>/um + PERCENT = /^\s*#{START}\s+%\s+(\w+)\s+((["']).*?\3)\s*>/um + # + # + def initialize src + super() + md = nil + if src.match( PUBLIC ) + md = src.match( PUBLIC, true ) + @middle = "PUBLIC" + @content = "#{md[2]} #{md[4]}" + elsif src.match( SYSTEM ) + md = src.match( SYSTEM, true ) + @middle = "SYSTEM" + @content = md[2] + elsif src.match( PLAIN ) + md = src.match( PLAIN, true ) + @middle = "" + @content = md[2] + elsif src.match( PERCENT ) + md = src.match( PERCENT, true ) + @middle = "" + @content = md[2] + end + raise ParseException.new("failed Entity match", src) if md.nil? + @name = md[1] + end + + def to_s + rv = " 0 + rv << @content + rv + end + + def write( output, indent ) + indent( output, indent ) + output << to_s + end + + def EntityDecl.parse_source source, listener + md = source.match( PATTERN_RE, true ) + thing = md[0].squeeze(" \t\n\r") + listener.send inspect.downcase, thing + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/dtd/notationdecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/notationdecl.rb new file mode 100644 index 0000000..eae71f2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/dtd/notationdecl.rb @@ -0,0 +1,39 @@ +require "rexml/child" +module REXML + module DTD + class NotationDecl < Child + START = "/um + SYSTEM = /^\s*#{START}\s+(\w[\w-]*)\s+(SYSTEM)\s+((["']).*?\4)\s*>/um + def initialize src + super() + if src.match( PUBLIC ) + md = src.match( PUBLIC, true ) + elsif src.match( SYSTEM ) + md = src.match( SYSTEM, true ) + else + raise ParseException.new( "error parsing notation: no matching pattern", src ) + end + @name = md[1] + @middle = md[2] + @rest = md[3] + end + + def to_s + "" + end + + def write( output, indent ) + indent( output, indent ) + output << to_s + end + + def NotationDecl.parse_source source, listener + md = source.match( PATTERN_RE, true ) + thing = md[0].squeeze(" \t\n\r") + listener.send inspect.downcase, thing + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/element.rb b/lib/ruby-1.9.1-rc1/lib/rexml/element.rb new file mode 100644 index 0000000..92308a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/element.rb @@ -0,0 +1,1246 @@ +require "rexml/parent" +require "rexml/namespace" +require "rexml/attribute" +require "rexml/cdata" +require "rexml/xpath" +require "rexml/parseexception" + +module REXML + # An implementation note about namespaces: + # As we parse, when we find namespaces we put them in a hash and assign + # them a unique ID. We then convert the namespace prefix for the node + # to the unique ID. This makes namespace lookup much faster for the + # cost of extra memory use. We save the namespace prefix for the + # context node and convert it back when we write it. + @@namespaces = {} + + # Represents a tagged XML element. Elements are characterized by + # having children, attributes, and names, and can themselves be + # children. + class Element < Parent + include Namespace + + UNDEFINED = "UNDEFINED"; # The default name + + # Mechanisms for accessing attributes and child elements of this + # element. + attr_reader :attributes, :elements + # The context holds information about the processing environment, such as + # whitespace handling. + attr_accessor :context + + # Constructor + # arg:: + # if not supplied, will be set to the default value. + # If a String, the name of this object will be set to the argument. + # If an Element, the object will be shallowly cloned; name, + # attributes, and namespaces will be copied. Children will +not+ be + # copied. + # parent:: + # if supplied, must be a Parent, and will be used as + # the parent of this object. + # context:: + # If supplied, must be a hash containing context items. Context items + # include: + # * :respect_whitespace the value of this is :+all+ or an array of + # strings being the names of the elements to respect + # whitespace for. Defaults to :+all+. + # * :compress_whitespace the value can be :+all+ or an array of + # strings being the names of the elements to ignore whitespace on. + # Overrides :+respect_whitespace+. + # * :ignore_whitespace_nodes the value can be :+all+ or an array + # of strings being the names of the elements in which to ignore + # whitespace-only nodes. If this is set, Text nodes which contain only + # whitespace will not be added to the document tree. + # * :raw can be :+all+, or an array of strings being the names of + # the elements to process in raw mode. In raw mode, special + # characters in text is not converted to or from entities. + def initialize( arg = UNDEFINED, parent=nil, context=nil ) + super(parent) + + @elements = Elements.new(self) + @attributes = Attributes.new(self) + @context = context + + if arg.kind_of? String + self.name = arg + elsif arg.kind_of? Element + self.name = arg.expanded_name + arg.attributes.each_attribute{ |attribute| + @attributes << Attribute.new( attribute ) + } + @context = arg.context + end + end + + def inspect + rv = "<#@expanded_name" + + @attributes.each_attribute do |attr| + rv << " " + attr.write( rv, 0 ) + end + + if children.size > 0 + rv << "> ... " + else + rv << "/>" + end + end + + + # Creates a shallow copy of self. + # d = Document.new "" + # new_a = d.root.clone + # puts new_a # => "" + def clone + self.class.new self + end + + # Evaluates to the root node of the document that this element + # belongs to. If this element doesn't belong to a document, but does + # belong to another Element, the parent's root will be returned, until the + # earliest ancestor is found. + # + # Note that this is not the same as the document element. + # In the following example, is the document element, and the root + # node is the parent node of the document element. You may ask yourself + # why the root node is useful: consider the doctype and XML declaration, + # and any processing instructions before the document element... they + # are children of the root node, or siblings of the document element. + # The only time this isn't true is when an Element is created that is + # not part of any Document. In this case, the ancestor that has no + # parent acts as the root node. + # d = Document.new '' + # a = d[1] ; c = a[1][1] + # d.root_node == d # TRUE + # a.root_node # namely, d + # c.root_node # again, d + def root_node + parent.nil? ? self : parent.root_node + end + + def root + return elements[1] if self.kind_of? Document + return self if parent.kind_of? Document or parent.nil? + return parent.root + end + + # Evaluates to the document to which this element belongs, or nil if this + # element doesn't belong to a document. + def document + rt = root + rt.parent if rt + end + + # Evaluates to +true+ if whitespace is respected for this element. This + # is the case if: + # 1. Neither :+respect_whitespace+ nor :+compress_whitespace+ has any value + # 2. The context has :+respect_whitespace+ set to :+all+ or + # an array containing the name of this element, and + # :+compress_whitespace+ isn't set to :+all+ or an array containing the + # name of this element. + # The evaluation is tested against +expanded_name+, and so is namespace + # sensitive. + def whitespace + @whitespace = nil + if @context + if @context[:respect_whitespace] + @whitespace = (@context[:respect_whitespace] == :all or + @context[:respect_whitespace].include? expanded_name) + end + @whitespace = false if (@context[:compress_whitespace] and + (@context[:compress_whitespace] == :all or + @context[:compress_whitespace].include? expanded_name) + ) + end + @whitespace = true unless @whitespace == false + @whitespace + end + + def ignore_whitespace_nodes + @ignore_whitespace_nodes = false + if @context + if @context[:ignore_whitespace_nodes] + @ignore_whitespace_nodes = + (@context[:ignore_whitespace_nodes] == :all or + @context[:ignore_whitespace_nodes].include? expanded_name) + end + end + end + + # Evaluates to +true+ if raw mode is set for this element. This + # is the case if the context has :+raw+ set to :+all+ or + # an array containing the name of this element. + # + # The evaluation is tested against +expanded_name+, and so is namespace + # sensitive. + def raw + @raw = (@context and @context[:raw] and + (@context[:raw] == :all or + @context[:raw].include? expanded_name)) + @raw + end + + #once :whitespace, :raw, :ignore_whitespace_nodes + + ################################################# + # Namespaces # + ################################################# + + # Evaluates to an +Array+ containing the prefixes (names) of all defined + # namespaces at this context node. + # doc = Document.new("") + # doc.elements['//b'].prefixes # -> ['x', 'y'] + def prefixes + prefixes = [] + prefixes = parent.prefixes if parent + prefixes |= attributes.prefixes + return prefixes + end + + def namespaces + namespaces = {} + namespaces = parent.namespaces if parent + namespaces = namespaces.merge( attributes.namespaces ) + return namespaces + end + + # Evalutas to the URI for a prefix, or the empty string if no such + # namespace is declared for this element. Evaluates recursively for + # ancestors. Returns the default namespace, if there is one. + # prefix:: + # the prefix to search for. If not supplied, returns the default + # namespace if one exists + # Returns:: + # the namespace URI as a String, or nil if no such namespace + # exists. If the namespace is undefined, returns an empty string + # doc = Document.new("") + # b = doc.elements['//b'] + # b.namespace # -> '1' + # b.namespace("y") # -> '2' + def namespace(prefix=nil) + if prefix.nil? + prefix = prefix() + end + if prefix == '' + prefix = "xmlns" + else + prefix = "xmlns:#{prefix}" unless prefix[0,5] == 'xmlns' + end + ns = attributes[ prefix ] + ns = parent.namespace(prefix) if ns.nil? and parent + ns = '' if ns.nil? and prefix == 'xmlns' + return ns + end + + # Adds a namespace to this element. + # prefix:: + # the prefix string, or the namespace URI if +uri+ is not + # supplied + # uri:: + # the namespace URI. May be nil, in which +prefix+ is used as + # the URI + # Evaluates to: this Element + # a = Element.new("a") + # a.add_namespace("xmlns:foo", "bar" ) + # a.add_namespace("foo", "bar") # shorthand for previous line + # a.add_namespace("twiddle") + # puts a #-> + def add_namespace( prefix, uri=nil ) + unless uri + @attributes["xmlns"] = prefix + else + prefix = "xmlns:#{prefix}" unless prefix =~ /^xmlns:/ + @attributes[ prefix ] = uri + end + self + end + + # Removes a namespace from this node. This only works if the namespace is + # actually declared in this node. If no argument is passed, deletes the + # default namespace. + # + # Evaluates to: this element + # doc = Document.new "" + # doc.root.delete_namespace + # puts doc # -> + # doc.root.delete_namespace 'foo' + # puts doc # -> + def delete_namespace namespace="xmlns" + namespace = "xmlns:#{namespace}" unless namespace == 'xmlns' + attribute = attributes.get_attribute(namespace) + attribute.remove unless attribute.nil? + self + end + + ################################################# + # Elements # + ################################################# + + # Adds a child to this element, optionally setting attributes in + # the element. + # element:: + # optional. If Element, the element is added. + # Otherwise, a new Element is constructed with the argument (see + # Element.initialize). + # attrs:: + # If supplied, must be a Hash containing String name,value + # pairs, which will be used to set the attributes of the new Element. + # Returns:: the Element that was added + # el = doc.add_element 'my-tag' + # el = doc.add_element 'my-tag', {'attr1'=>'val1', 'attr2'=>'val2'} + # el = Element.new 'my-tag' + # doc.add_element el + def add_element element, attrs=nil + raise "First argument must be either an element name, or an Element object" if element.nil? + el = @elements.add(element) + attrs.each do |key, value| + el.attributes[key]=value + end if attrs.kind_of? Hash + el + end + + # Deletes a child element. + # element:: + # Must be an +Element+, +String+, or +Integer+. If Element, + # the element is removed. If String, the element is found (via XPath) + # and removed. This means that any parent can remove any + # descendant. If Integer, the Element indexed by that number will be + # removed. + # Returns:: the element that was removed. + # doc.delete_element "/a/b/c[@id='4']" + # doc.delete_element doc.elements["//k"] + # doc.delete_element 1 + def delete_element element + @elements.delete element + end + + # Evaluates to +true+ if this element has at least one child Element + # doc = Document.new "Text" + # doc.root.has_elements # -> true + # doc.elements["/a/b"].has_elements # -> false + # doc.elements["/a/c"].has_elements # -> false + def has_elements? + !@elements.empty? + end + + # Iterates through the child elements, yielding for each Element that + # has a particular attribute set. + # key:: + # the name of the attribute to search for + # value:: + # the value of the attribute + # max:: + # (optional) causes this method to return after yielding + # for this number of matching children + # name:: + # (optional) if supplied, this is an XPath that filters + # the children to check. + # + # doc = Document.new "" + # # Yields b, c, d + # doc.root.each_element_with_attribute( 'id' ) {|e| p e} + # # Yields b, d + # doc.root.each_element_with_attribute( 'id', '1' ) {|e| p e} + # # Yields b + # doc.root.each_element_with_attribute( 'id', '1', 1 ) {|e| p e} + # # Yields d + # doc.root.each_element_with_attribute( 'id', '1', 0, 'd' ) {|e| p e} + def each_element_with_attribute( key, value=nil, max=0, name=nil, &block ) # :yields: Element + each_with_something( proc {|child| + if value.nil? + child.attributes[key] != nil + else + child.attributes[key]==value + end + }, max, name, &block ) + end + + # Iterates through the children, yielding for each Element that + # has a particular text set. + # text:: + # the text to search for. If nil, or not supplied, will iterate + # over all +Element+ children that contain at least one +Text+ node. + # max:: + # (optional) causes this method to return after yielding + # for this number of matching children + # name:: + # (optional) if supplied, this is an XPath that filters + # the children to check. + # + # doc = Document.new 'bbd' + # # Yields b, c, d + # doc.each_element_with_text {|e|p e} + # # Yields b, c + # doc.each_element_with_text('b'){|e|p e} + # # Yields b + # doc.each_element_with_text('b', 1){|e|p e} + # # Yields d + # doc.each_element_with_text(nil, 0, 'd'){|e|p e} + def each_element_with_text( text=nil, max=0, name=nil, &block ) # :yields: Element + each_with_something( proc {|child| + if text.nil? + child.has_text? + else + child.text == text + end + }, max, name, &block ) + end + + # Synonym for Element.elements.each + def each_element( xpath=nil, &block ) # :yields: Element + @elements.each( xpath, &block ) + end + + # Synonym for Element.to_a + # This is a little slower than calling elements.each directly. + # xpath:: any XPath by which to search for elements in the tree + # Returns:: an array of Elements that match the supplied path + def get_elements( xpath ) + @elements.to_a( xpath ) + end + + # Returns the next sibling that is an element, or nil if there is + # no Element sibling after this one + # doc = Document.new 'text' + # doc.root.elements['b'].next_element #-> + # doc.root.elements['c'].next_element #-> nil + def next_element + element = next_sibling + element = element.next_sibling until element.nil? or element.kind_of? Element + return element + end + + # Returns the previous sibling that is an element, or nil if there is + # no Element sibling prior to this one + # doc = Document.new 'text' + # doc.root.elements['c'].previous_element #-> + # doc.root.elements['b'].previous_element #-> nil + def previous_element + element = previous_sibling + element = element.previous_sibling until element.nil? or element.kind_of? Element + return element + end + + + ################################################# + # Text # + ################################################# + + # Evaluates to +true+ if this element has at least one Text child + def has_text? + not text().nil? + end + + # A convenience method which returns the String value of the _first_ + # child text element, if one exists, and +nil+ otherwise. + # + # Note that an element may have multiple Text elements, perhaps + # separated by other children. Be aware that this method only returns + # the first Text node. + # + # This method returns the +value+ of the first text child node, which + # ignores the +raw+ setting, so always returns normalized text. See + # the Text::value documentation. + # + # doc = Document.new "

      some text this is bold! more text

      " + # # The element 'p' has two text elements, "some text " and " more text". + # doc.root.text #-> "some text " + def text( path = nil ) + rv = get_text(path) + return rv.value unless rv.nil? + nil + end + + # Returns the first child Text node, if any, or +nil+ otherwise. + # This method returns the actual +Text+ node, rather than the String content. + # doc = Document.new "

      some text this is bold! more text

      " + # # The element 'p' has two text elements, "some text " and " more text". + # doc.root.get_text.value #-> "some text " + def get_text path = nil + rv = nil + if path + element = @elements[ path ] + rv = element.get_text unless element.nil? + else + rv = @children.find { |node| node.kind_of? Text } + end + return rv + end + + # Sets the first Text child of this object. See text() for a + # discussion about Text children. + # + # If a Text child already exists, the child is replaced by this + # content. This means that Text content can be deleted by calling + # this method with a nil argument. In this case, the next Text + # child becomes the first Text child. In no case is the order of + # any siblings disturbed. + # text:: + # If a String, a new Text child is created and added to + # this Element as the first Text child. If Text, the text is set + # as the first Child element. If nil, then any existing first Text + # child is removed. + # Returns:: this Element. + # doc = Document.new '' + # doc.root.text = 'Sean' #-> 'Sean' + # doc.root.text = 'Elliott' #-> 'Elliott' + # doc.root.add_element 'c' #-> 'Elliott' + # doc.root.text = 'Russell' #-> 'Russell' + # doc.root.text = nil #-> '' + def text=( text ) + if text.kind_of? String + text = Text.new( text, whitespace(), nil, raw() ) + elsif text and !text.kind_of? Text + text = Text.new( text.to_s, whitespace(), nil, raw() ) + end + old_text = get_text + if text.nil? + old_text.remove unless old_text.nil? + else + if old_text.nil? + self << text + else + old_text.replace_with( text ) + end + end + return self + end + + # A helper method to add a Text child. Actual Text instances can + # be added with regular Parent methods, such as add() and <<() + # text:: + # if a String, a new Text instance is created and added + # to the parent. If Text, the object is added directly. + # Returns:: this Element + # e = Element.new('a') #-> + # e.add_text 'foo' #-> foo + # e.add_text Text.new(' bar') #-> foo bar + # Note that at the end of this example, the branch has 3 nodes; the 'e' + # element and 2 Text node children. + def add_text( text ) + if text.kind_of? String + if @children[-1].kind_of? Text + @children[-1] << text + return + end + text = Text.new( text, whitespace(), nil, raw() ) + end + self << text unless text.nil? + return self + end + + def node_type + :element + end + + def xpath + path_elements = [] + cur = self + path_elements << __to_xpath_helper( self ) + while cur.parent + cur = cur.parent + path_elements << __to_xpath_helper( cur ) + end + return path_elements.reverse.join( "/" ) + end + + ################################################# + # Attributes # + ################################################# + + def attribute( name, namespace=nil ) + prefix = nil + if namespaces.respond_to? :key + prefix = namespaces.key(namespace) if namespace + else + prefix = namespaces.index(namespace) if namespace + end + prefix = nil if prefix == 'xmlns' + + ret_val = + attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" ) + + return ret_val unless ret_val.nil? + return nil if prefix.nil? + + # now check that prefix'es namespace is not the same as the + # default namespace + return nil unless ( namespaces[ prefix ] == namespaces[ 'xmlns' ] ) + + attributes.get_attribute( name ) + + end + + # Evaluates to +true+ if this element has any attributes set, false + # otherwise. + def has_attributes? + return !@attributes.empty? + end + + # Adds an attribute to this element, overwriting any existing attribute + # by the same name. + # key:: + # can be either an Attribute or a String. If an Attribute, + # the attribute is added to the list of Element attributes. If String, + # the argument is used as the name of the new attribute, and the value + # parameter must be supplied. + # value:: + # Required if +key+ is a String, and ignored if the first argument is + # an Attribute. This is a String, and is used as the value + # of the new Attribute. This should be the unnormalized value of the + # attribute (without entities). + # Returns:: the Attribute added + # e = Element.new 'e' + # e.add_attribute( 'a', 'b' ) #-> + # e.add_attribute( 'x:a', 'c' ) #-> + # e.add_attribute Attribute.new('b', 'd') #-> + def add_attribute( key, value=nil ) + if key.kind_of? Attribute + @attributes << key + else + @attributes[key] = value + end + end + + # Add multiple attributes to this element. + # hash:: is either a hash, or array of arrays + # el.add_attributes( {"name1"=>"value1", "name2"=>"value2"} ) + # el.add_attributes( [ ["name1","value1"], ["name2"=>"value2"] ] ) + def add_attributes hash + if hash.kind_of? Hash + hash.each_pair {|key, value| @attributes[key] = value } + elsif hash.kind_of? Array + hash.each { |value| @attributes[ value[0] ] = value[1] } + end + end + + # Removes an attribute + # key:: + # either an Attribute or a String. In either case, the + # attribute is found by matching the attribute name to the argument, + # and then removed. If no attribute is found, no action is taken. + # Returns:: + # the attribute removed, or nil if this Element did not contain + # a matching attribute + # e = Element.new('E') + # e.add_attribute( 'name', 'Sean' ) #-> + # r = e.add_attribute( 'sur:name', 'Russell' ) #-> + # e.delete_attribute( 'name' ) #-> + # e.delete_attribute( r ) #-> + def delete_attribute(key) + attr = @attributes.get_attribute(key) + attr.remove unless attr.nil? + end + + ################################################# + # Other Utilities # + ################################################# + + # Get an array of all CData children. + # IMMUTABLE + def cdatas + find_all { |child| child.kind_of? CData }.freeze + end + + # Get an array of all Comment children. + # IMMUTABLE + def comments + find_all { |child| child.kind_of? Comment }.freeze + end + + # Get an array of all Instruction children. + # IMMUTABLE + def instructions + find_all { |child| child.kind_of? Instruction }.freeze + end + + # Get an array of all Text children. + # IMMUTABLE + def texts + find_all { |child| child.kind_of? Text }.freeze + end + + # == DEPRECATED + # See REXML::Formatters + # + # Writes out this element, and recursively, all children. + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the parse tree of the document + # ie_hack:: + # Internet Explorer is the worst piece of crap to have ever been + # written, with the possible exception of Windows itself. Since IE is + # unable to parse proper XML, we have to provide a hack to generate XML + # that IE's limited abilities can handle. This hack inserts a space + # before the /> on empty tags. Defaults to false + # + # out = '' + # doc.write( out ) #-> doc is written to the string 'out' + # doc.write( $stdout ) #-> doc written to the console + def write(output=$stdout, indent=-1, transitive=false, ie_hack=false) + Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters") + formatter = if indent > -1 + if transitive + require "rexml/formatters/transitive" + REXML::Formatters::Transitive.new( indent, ie_hack ) + else + REXML::Formatters::Pretty.new( indent, ie_hack ) + end + else + REXML::Formatters::Default.new( ie_hack ) + end + formatter.write( self, output ) + end + + + private + def __to_xpath_helper node + rv = node.expanded_name.clone + if node.parent + results = node.parent.find_all {|n| + n.kind_of?(REXML::Element) and n.expanded_name == node.expanded_name + } + if results.length > 1 + idx = results.index( node ) + rv << "[#{idx+1}]" + end + end + rv + end + + # A private helper method + def each_with_something( test, max=0, name=nil ) + num = 0 + @elements.each( name ){ |child| + yield child if test.call(child) and num += 1 + return if max>0 and num == max + } + end + end + + ######################################################################## + # ELEMENTS # + ######################################################################## + + # A class which provides filtering of children for Elements, and + # XPath search support. You are expected to only encounter this class as + # the element.elements object. Therefore, you are + # _not_ expected to instantiate this yourself. + class Elements + include Enumerable + # Constructor + # parent:: the parent Element + def initialize parent + @element = parent + end + + # Fetches a child element. Filters only Element children, regardless of + # the XPath match. + # index:: + # the search parameter. This is either an Integer, which + # will be used to find the index'th child Element, or an XPath, + # which will be used to search for the Element. Because + # of the nature of XPath searches, any element in the connected XML + # document can be fetched through any other element. The + # Integer index is 1-based, not 0-based. This means that the first + # child element is at index 1, not 0, and the +n+th element is at index + # +n+, not n-1. This is because XPath indexes element children + # starting from 1, not 0, and the indexes should be the same. + # name:: + # optional, and only used in the first argument is an + # Integer. In that case, the index'th child Element that has the + # supplied name will be returned. Note again that the indexes start at 1. + # Returns:: the first matching Element, or nil if no child matched + # doc = Document.new '' + # doc.root.elements[1] #-> + # doc.root.elements['c'] #-> + # doc.root.elements[2,'c'] #-> + def []( index, name=nil) + if index.kind_of? Integer + raise "index (#{index}) must be >= 1" if index < 1 + name = literalize(name) if name + num = 0 + @element.find { |child| + child.kind_of? Element and + (name.nil? ? true : child.has_name?( name )) and + (num += 1) == index + } + else + return XPath::first( @element, index ) + #{ |element| + # return element if element.kind_of? Element + #} + #return nil + end + end + + # Sets an element, replacing any previous matching element. If no + # existing element is found ,the element is added. + # index:: Used to find a matching element to replace. See [](). + # element:: + # The element to replace the existing element with + # the previous element + # Returns:: nil if no previous element was found. + # + # doc = Document.new '' + # doc.root.elements[10] = Element.new('b') #-> + # doc.root.elements[1] #-> + # doc.root.elements[1] = Element.new('c') #-> + # doc.root.elements['c'] = Element.new('d') #-> + def []=( index, element ) + previous = self[index] + if previous.nil? + @element.add element + else + previous.replace_with element + end + return previous + end + + # Returns +true+ if there are no +Element+ children, +false+ otherwise + def empty? + @element.find{ |child| child.kind_of? Element}.nil? + end + + # Returns the index of the supplied child (starting at 1), or -1 if + # the element is not a child + # element:: an +Element+ child + def index element + rv = 0 + found = @element.find do |child| + child.kind_of? Element and + (rv += 1) and + child == element + end + return rv if found == element + return -1 + end + + # Deletes a child Element + # element:: + # Either an Element, which is removed directly; an + # xpath, where the first matching child is removed; or an Integer, + # where the n'th Element is removed. + # Returns:: the removed child + # doc = Document.new '' + # b = doc.root.elements[1] + # doc.root.elements.delete b #-> + # doc.elements.delete("a/c[@id='1']") #-> + # doc.root.elements.delete 1 #-> + def delete element + if element.kind_of? Element + @element.delete element + else + el = self[element] + el.remove if el + end + end + + # Removes multiple elements. Filters for Element children, regardless of + # XPath matching. + # xpath:: all elements matching this String path are removed. + # Returns:: an Array of Elements that have been removed + # doc = Document.new '' + # deleted = doc.elements.delete_all 'a/c' #-> [, , , ] + def delete_all( xpath ) + rv = [] + XPath::each( @element, xpath) {|element| + rv << element if element.kind_of? Element + } + rv.each do |element| + @element.delete element + element.remove + end + return rv + end + + # Adds an element + # element:: + # if supplied, is either an Element, String, or + # Source (see Element.initialize). If not supplied or nil, a + # new, default Element will be constructed + # Returns:: the added Element + # a = Element.new('a') + # a.elements.add(Element.new('b')) #-> + # a.elements.add('c') #-> + def add element=nil + rv = nil + if element.nil? + Element.new("", self, @element.context) + elsif not element.kind_of?(Element) + Element.new(element, self, @element.context) + else + @element << element + element.context = @element.context + element + end + end + + alias :<< :add + + # Iterates through all of the child Elements, optionally filtering + # them by a given XPath + # xpath:: + # optional. If supplied, this is a String XPath, and is used to + # filter the children, so that only matching children are yielded. Note + # that XPaths are automatically filtered for Elements, so that + # non-Element children will not be yielded + # doc = Document.new 'sean' + # doc.root.each {|e|p e} #-> Yields b, c, d, b, c, d elements + # doc.root.each('b') {|e|p e} #-> Yields b, b elements + # doc.root.each('child::node()') {|e|p e} + # #-> Yields , , , , , + # XPath.each(doc.root, 'child::node()', &block) + # #-> Yields , , , sean, , , + def each( xpath=nil, &block) + XPath::each( @element, xpath ) {|e| yield e if e.kind_of? Element } + end + + def collect( xpath=nil, &block ) + collection = [] + XPath::each( @element, xpath ) {|e| + collection << yield(e) if e.kind_of?(Element) + } + collection + end + + def inject( xpath=nil, initial=nil, &block ) + first = true + XPath::each( @element, xpath ) {|e| + if (e.kind_of? Element) + if (first and initial == nil) + initial = e + first = false + else + initial = yield( initial, e ) if e.kind_of? Element + end + end + } + initial + end + + # Returns the number of +Element+ children of the parent object. + # doc = Document.new 'seanelliottrussell' + # doc.root.size #-> 6, 3 element and 3 text nodes + # doc.root.elements.size #-> 3 + def size + count = 0 + @element.each {|child| count+=1 if child.kind_of? Element } + count + end + + # Returns an Array of Element children. An XPath may be supplied to + # filter the children. Only Element children are returned, even if the + # supplied XPath matches non-Element children. + # doc = Document.new 'seanelliott' + # doc.root.elements.to_a #-> [ , ] + # doc.root.elements.to_a("child::node()") #-> [ , ] + # XPath.match(doc.root, "child::node()") #-> [ sean, , elliott, ] + def to_a( xpath=nil ) + rv = XPath.match( @element, xpath ) + return rv.find_all{|e| e.kind_of? Element} if xpath + rv + end + + private + # Private helper class. Removes quotes from quoted strings + def literalize name + name = name[1..-2] if name[0] == ?' or name[0] == ?" #' + name + end + end + + ######################################################################## + # ATTRIBUTES # + ######################################################################## + + # A class that defines the set of Attributes of an Element and provides + # operations for accessing elements in that set. + class Attributes < Hash + # Constructor + # element:: the Element of which this is an Attribute + def initialize element + @element = element + end + + # Fetches an attribute value. If you want to get the Attribute itself, + # use get_attribute() + # name:: an XPath attribute name. Namespaces are relevant here. + # Returns:: + # the String value of the matching attribute, or +nil+ if no + # matching attribute was found. This is the unnormalized value + # (with entities expanded). + # + # doc = Document.new "" + # doc.root.attributes['att'] #-> '<' + # doc.root.attributes['bar:att'] #-> '2' + def [](name) + attr = get_attribute(name) + return attr.value unless attr.nil? + return nil + end + + def to_a + values.flatten + end + + # Returns the number of attributes the owning Element contains. + # doc = Document "" + # doc.root.attributes.length #-> 3 + def length + c = 0 + each_attribute { c+=1 } + c + end + alias :size :length + + # Iterates over the attributes of an Element. Yields actual Attribute + # nodes, not String values. + # + # doc = Document.new '' + # doc.root.attributes.each_attribute {|attr| + # p attr.expanded_name+" => "+attr.value + # } + def each_attribute # :yields: attribute + each_value do |val| + if val.kind_of? Attribute + yield val + else + val.each_value { |atr| yield atr } + end + end + end + + # Iterates over each attribute of an Element, yielding the expanded name + # and value as a pair of Strings. + # + # doc = Document.new '' + # doc.root.attributes.each {|name, value| p name+" => "+value } + def each + each_attribute do |attr| + yield [attr.expanded_name, attr.value] + end + end + + # Fetches an attribute + # name:: + # the name by which to search for the attribute. Can be a + # prefix:name namespace name. + # Returns:: The first matching attribute, or nil if there was none. This + # value is an Attribute node, not the String value of the attribute. + # doc = Document.new '' + # doc.root.attributes.get_attribute("foo").value #-> "2" + # doc.root.attributes.get_attribute("x:foo").value #-> "1" + def get_attribute( name ) + attr = fetch( name, nil ) + if attr.nil? + return nil if name.nil? + # Look for prefix + name =~ Namespace::NAMESPLIT + prefix, n = $1, $2 + if prefix + attr = fetch( n, nil ) + # check prefix + if attr == nil + elsif attr.kind_of? Attribute + return attr if prefix == attr.prefix + else + attr = attr[ prefix ] + return attr + end + end + element_document = @element.document + if element_document and element_document.doctype + expn = @element.expanded_name + expn = element_document.doctype.name if expn.size == 0 + attr_val = element_document.doctype.attribute_of(expn, name) + return Attribute.new( name, attr_val ) if attr_val + end + return nil + end + if attr.kind_of? Hash + attr = attr[ @element.prefix ] + end + return attr + end + + # Sets an attribute, overwriting any existing attribute value by the + # same name. Namespace is significant. + # name:: the name of the attribute + # value:: + # (optional) If supplied, the value of the attribute. If + # nil, any existing matching attribute is deleted. + # Returns:: + # Owning element + # doc = Document.new "" + # doc.root.attributes['y:foo'] = '2' + # doc.root.attributes['foo'] = '4' + # doc.root.attributes['x:foo'] = nil + def []=( name, value ) + if value.nil? # Delete the named attribute + attr = get_attribute(name) + delete attr + return + end + element_document = @element.document + unless value.kind_of? Attribute + if @element.document and @element.document.doctype + value = Text::normalize( value, @element.document.doctype ) + else + value = Text::normalize( value, nil ) + end + value = Attribute.new(name, value) + end + value.element = @element + old_attr = fetch(value.name, nil) + if old_attr.nil? + store(value.name, value) + elsif old_attr.kind_of? Hash + old_attr[value.prefix] = value + elsif old_attr.prefix != value.prefix + # Check for conflicting namespaces + raise ParseException.new( + "Namespace conflict in adding attribute \"#{value.name}\": "+ + "Prefix \"#{old_attr.prefix}\" = "+ + "\"#{@element.namespace(old_attr.prefix)}\" and prefix "+ + "\"#{value.prefix}\" = \"#{@element.namespace(value.prefix)}\"") if + value.prefix != "xmlns" and old_attr.prefix != "xmlns" and + @element.namespace( old_attr.prefix ) == + @element.namespace( value.prefix ) + store value.name, { old_attr.prefix => old_attr, + value.prefix => value } + else + store value.name, value + end + return @element + end + + # Returns an array of Strings containing all of the prefixes declared + # by this set of # attributes. The array does not include the default + # namespace declaration, if one exists. + # doc = Document.new("") + # prefixes = doc.root.attributes.prefixes #-> ['x', 'y'] + def prefixes + ns = [] + each_attribute do |attribute| + ns << attribute.name if attribute.prefix == 'xmlns' + end + if @element.document and @element.document.doctype + expn = @element.expanded_name + expn = @element.document.doctype.name if expn.size == 0 + @element.document.doctype.attributes_of(expn).each { + |attribute| + ns << attribute.name if attribute.prefix == 'xmlns' + } + end + ns + end + + def namespaces + namespaces = {} + each_attribute do |attribute| + namespaces[attribute.name] = attribute.value if attribute.prefix == 'xmlns' or attribute.name == 'xmlns' + end + if @element.document and @element.document.doctype + expn = @element.expanded_name + expn = @element.document.doctype.name if expn.size == 0 + @element.document.doctype.attributes_of(expn).each { + |attribute| + namespaces[attribute.name] = attribute.value if attribute.prefix == 'xmlns' or attribute.name == 'xmlns' + } + end + namespaces + end + + # Removes an attribute + # attribute:: + # either a String, which is the name of the attribute to remove -- + # namespaces are significant here -- or the attribute to remove. + # Returns:: the owning element + # doc = Document.new "" + # doc.root.attributes.delete 'foo' #-> " + # doc.root.attributes.delete 'x:foo' #-> " + # attr = doc.root.attributes.get_attribute('y:foo') + # doc.root.attributes.delete attr #-> " + def delete( attribute ) + name = nil + prefix = nil + if attribute.kind_of? Attribute + name = attribute.name + prefix = attribute.prefix + else + attribute =~ Namespace::NAMESPLIT + prefix, name = $1, $2 + prefix = '' unless prefix + end + old = fetch(name, nil) + attr = nil + if old.kind_of? Hash # the supplied attribute is one of many + attr = old.delete(prefix) + if old.size == 1 + repl = nil + old.each_value{|v| repl = v} + store name, repl + end + elsif old.nil? + return @element + else # the supplied attribute is a top-level one + attr = old + res = super(name) + end + @element + end + + # Adds an attribute, overriding any existing attribute by the + # same name. Namespaces are significant. + # attribute:: An Attribute + def add( attribute ) + self[attribute.name] = attribute + end + + alias :<< :add + + # Deletes all attributes matching a name. Namespaces are significant. + # name:: + # A String; all attributes that match this path will be removed + # Returns:: an Array of the Attributes that were removed + def delete_all( name ) + rv = [] + each_attribute { |attribute| + rv << attribute if attribute.expanded_name == name + } + rv.each{ |attr| attr.remove } + return rv + end + + # The +get_attribute_ns+ method retrieves a method by its namespace + # and name. Thus it is possible to reliably identify an attribute + # even if an XML processor has changed the prefix. + # + # Method contributed by Henrik Martensson + def get_attribute_ns(namespace, name) + result = nil + each_attribute() { |attribute| + if name == attribute.name && + namespace == attribute.namespace() && + ( !namespace.empty? || !attribute.fully_expanded_name.index(':') ) + # foo will match xmlns:foo, but only if foo isn't also an attribute + result = attribute if !result or !namespace.empty? or + !attribute.fully_expanded_name.index(':') + end + } + result + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encoding.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encoding.rb new file mode 100644 index 0000000..608c69c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encoding.rb @@ -0,0 +1,71 @@ +# -*- mode: ruby; ruby-indent-level: 2; indent-tabs-mode: t; tab-width: 2 -*- vim: sw=2 ts=2 +module REXML + module Encoding + @encoding_methods = {} + def self.register(enc, &block) + @encoding_methods[enc] = block + end + def self.apply(obj, enc) + @encoding_methods[enc][obj] + end + def self.encoding_method(enc) + @encoding_methods[enc] + end + + # Native, default format is UTF-8, so it is declared here rather than in + # an encodings/ definition. + UTF_8 = 'UTF-8' + UTF_16 = 'UTF-16' + UNILE = 'UNILE' + + # ID ---> Encoding name + attr_reader :encoding + def encoding=( enc ) + old_verbosity = $VERBOSE + begin + $VERBOSE = false + enc = enc.nil? ? nil : enc.upcase + return false if defined? @encoding and enc == @encoding + if enc and enc != UTF_8 + @encoding = enc + raise ArgumentError, "Bad encoding name #@encoding" unless @encoding =~ /^[\w-]+$/ + @encoding.untaint + begin + require 'rexml/encodings/ICONV.rb' + Encoding.apply(self, "ICONV") + rescue LoadError, Exception + begin + enc_file = File.join( "rexml", "encodings", "#@encoding.rb" ) + require enc_file + Encoding.apply(self, @encoding) + rescue LoadError => err + puts err.message + raise ArgumentError, "No decoder found for encoding #@encoding. Please install iconv." + end + end + else + @encoding = UTF_8 + require 'rexml/encodings/UTF-8.rb' + Encoding.apply(self, @encoding) + end + ensure + $VERBOSE = old_verbosity + end + true + end + + def check_encoding str + # We have to recognize UTF-16, LSB UTF-16, and UTF-8 + if str[0,2] == "\xfe\xff" + str[0,2] = "" + return UTF_16 + elsif str[0,2] == "\xff\xfe" + str[0,2] = "" + return UNILE + end + str =~ /^\s*<\?xml\s+version\s*=\s*(['"]).*?\1\s+encoding\s*=\s*(["'])(.*?)\2/m + return $3.upcase if $3 + return UTF_8 + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/CP-1252.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/CP-1252.rb new file mode 100644 index 0000000..2ef6a1a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/CP-1252.rb @@ -0,0 +1,103 @@ +# +# This class was contributed by Mikko Tiihonen mikko DOT tiihonen AT hut DOT fi +# +module REXML + module Encoding + register( "CP-1252" ) do |o| + class << o + alias encode encode_cp1252 + alias decode decode_cp1252 + end + end + + # Convert from UTF-8 + def encode_cp1252(content) + array_utf8 = content.unpack('U*') + array_enc = [] + array_utf8.each do |num| + case num + # shortcut first bunch basic characters + when 0..0xFF; array_enc << num + # characters added compared to iso-8859-1 + when 0x20AC; array_enc << 0x80 # 0xe2 0x82 0xac + when 0x201A; array_enc << 0x82 # 0xe2 0x82 0x9a + when 0x0192; array_enc << 0x83 # 0xc6 0x92 + when 0x201E; array_enc << 0x84 # 0xe2 0x82 0x9e + when 0x2026; array_enc << 0x85 # 0xe2 0x80 0xa6 + when 0x2020; array_enc << 0x86 # 0xe2 0x80 0xa0 + when 0x2021; array_enc << 0x87 # 0xe2 0x80 0xa1 + when 0x02C6; array_enc << 0x88 # 0xcb 0x86 + when 0x2030; array_enc << 0x89 # 0xe2 0x80 0xb0 + when 0x0160; array_enc << 0x8A # 0xc5 0xa0 + when 0x2039; array_enc << 0x8B # 0xe2 0x80 0xb9 + when 0x0152; array_enc << 0x8C # 0xc5 0x92 + when 0x017D; array_enc << 0x8E # 0xc5 0xbd + when 0x2018; array_enc << 0x91 # 0xe2 0x80 0x98 + when 0x2019; array_enc << 0x92 # 0xe2 0x80 0x99 + when 0x201C; array_enc << 0x93 # 0xe2 0x80 0x9c + when 0x201D; array_enc << 0x94 # 0xe2 0x80 0x9d + when 0x2022; array_enc << 0x95 # 0xe2 0x80 0xa2 + when 0x2013; array_enc << 0x96 # 0xe2 0x80 0x93 + when 0x2014; array_enc << 0x97 # 0xe2 0x80 0x94 + when 0x02DC; array_enc << 0x98 # 0xcb 0x9c + when 0x2122; array_enc << 0x99 # 0xe2 0x84 0xa2 + when 0x0161; array_enc << 0x9A # 0xc5 0xa1 + when 0x203A; array_enc << 0x9B # 0xe2 0x80 0xba + when 0x0152; array_enc << 0x9C # 0xc5 0x93 + when 0x017E; array_enc << 0x9E # 0xc5 0xbe + when 0x0178; array_enc << 0x9F # 0xc5 0xb8 + else + # all remaining basic characters can be used directly + if num <= 0xFF + array_enc << num + else + # Numeric entity (&#nnnn;); shard by Stefan Scholl + array_enc.concat "&\##{num};".unpack('C*') + end + end + end + array_enc.pack('C*') + end + + # Convert to UTF-8 + def decode_cp1252(str) + array_latin9 = str.unpack('C*') + array_enc = [] + array_latin9.each do |num| + case num + # characters that added compared to iso-8859-1 + when 0x80; array_enc << 0x20AC # 0xe2 0x82 0xac + when 0x82; array_enc << 0x201A # 0xe2 0x82 0x9a + when 0x83; array_enc << 0x0192 # 0xc6 0x92 + when 0x84; array_enc << 0x201E # 0xe2 0x82 0x9e + when 0x85; array_enc << 0x2026 # 0xe2 0x80 0xa6 + when 0x86; array_enc << 0x2020 # 0xe2 0x80 0xa0 + when 0x87; array_enc << 0x2021 # 0xe2 0x80 0xa1 + when 0x88; array_enc << 0x02C6 # 0xcb 0x86 + when 0x89; array_enc << 0x2030 # 0xe2 0x80 0xb0 + when 0x8A; array_enc << 0x0160 # 0xc5 0xa0 + when 0x8B; array_enc << 0x2039 # 0xe2 0x80 0xb9 + when 0x8C; array_enc << 0x0152 # 0xc5 0x92 + when 0x8E; array_enc << 0x017D # 0xc5 0xbd + when 0x91; array_enc << 0x2018 # 0xe2 0x80 0x98 + when 0x92; array_enc << 0x2019 # 0xe2 0x80 0x99 + when 0x93; array_enc << 0x201C # 0xe2 0x80 0x9c + when 0x94; array_enc << 0x201D # 0xe2 0x80 0x9d + when 0x95; array_enc << 0x2022 # 0xe2 0x80 0xa2 + when 0x96; array_enc << 0x2013 # 0xe2 0x80 0x93 + when 0x97; array_enc << 0x2014 # 0xe2 0x80 0x94 + when 0x98; array_enc << 0x02DC # 0xcb 0x9c + when 0x99; array_enc << 0x2122 # 0xe2 0x84 0xa2 + when 0x9A; array_enc << 0x0161 # 0xc5 0xa1 + when 0x9B; array_enc << 0x203A # 0xe2 0x80 0xba + when 0x9C; array_enc << 0x0152 # 0xc5 0x93 + when 0x9E; array_enc << 0x017E # 0xc5 0xbe + when 0x9F; array_enc << 0x0178 # 0xc5 0xb8 + else + array_enc << num + end + end + array_enc.pack('U*') + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/EUC-JP.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/EUC-JP.rb new file mode 100644 index 0000000..db37b6b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/EUC-JP.rb @@ -0,0 +1,35 @@ +module REXML + module Encoding + begin + require 'uconv' + + def decode_eucjp(str) + Uconv::euctou8(str) + end + + def encode_eucjp content + Uconv::u8toeuc(content) + end + rescue LoadError + require 'nkf' + + EUCTOU8 = '-Ewm0' + U8TOEUC = '-Wem0' + + def decode_eucjp(str) + NKF.nkf(EUCTOU8, str) + end + + def encode_eucjp content + NKF.nkf(U8TOEUC, content) + end + end + + register("EUC-JP") do |obj| + class << obj + alias decode decode_eucjp + alias encode encode_eucjp + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ICONV.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ICONV.rb new file mode 100644 index 0000000..172fba7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ICONV.rb @@ -0,0 +1,22 @@ +require "iconv" +raise LoadError unless defined? Iconv + +module REXML + module Encoding + def decode_iconv(str) + Iconv.conv(UTF_8, @encoding, str) + end + + def encode_iconv(content) + Iconv.conv(@encoding, UTF_8, content) + end + + register("ICONV") do |obj| + Iconv.conv(UTF_8, obj.encoding, nil) + class << obj + alias decode decode_iconv + alias encode encode_iconv + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-1.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-1.rb new file mode 100644 index 0000000..2873d13 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-1.rb @@ -0,0 +1,7 @@ +require 'rexml/encodings/US-ASCII' + +module REXML + module Encoding + register("ISO-8859-1", &encoding_method("US-ASCII")) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-15.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-15.rb new file mode 100644 index 0000000..9532672 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/ISO-8859-15.rb @@ -0,0 +1,72 @@ +# +# This class was contributed by Mikko Tiihonen mikko DOT tiihonen AT hut DOT fi +# +module REXML + module Encoding + register("ISO-8859-15") do |o| + alias encode to_iso_8859_15 + alias decode from_iso_8859_15 + end + + # Convert from UTF-8 + def to_iso_8859_15(content) + array_utf8 = content.unpack('U*') + array_enc = [] + array_utf8.each do |num| + case num + # shortcut first bunch basic characters + when 0..0xA3; array_enc << num + # characters removed compared to iso-8859-1 + when 0xA4; array_enc << '¤' + when 0xA6; array_enc << '¦' + when 0xA8; array_enc << '¨' + when 0xB4; array_enc << '´' + when 0xB8; array_enc << '¸' + when 0xBC; array_enc << '¼' + when 0xBD; array_enc << '½' + when 0xBE; array_enc << '¾' + # characters added compared to iso-8859-1 + when 0x20AC; array_enc << 0xA4 # 0xe2 0x82 0xac + when 0x0160; array_enc << 0xA6 # 0xc5 0xa0 + when 0x0161; array_enc << 0xA8 # 0xc5 0xa1 + when 0x017D; array_enc << 0xB4 # 0xc5 0xbd + when 0x017E; array_enc << 0xB8 # 0xc5 0xbe + when 0x0152; array_enc << 0xBC # 0xc5 0x92 + when 0x0153; array_enc << 0xBD # 0xc5 0x93 + when 0x0178; array_enc << 0xBE # 0xc5 0xb8 + else + # all remaining basic characters can be used directly + if num <= 0xFF + array_enc << num + else + # Numeric entity (&#nnnn;); shard by Stefan Scholl + array_enc.concat "&\##{num};".unpack('C*') + end + end + end + array_enc.pack('C*') + end + + # Convert to UTF-8 + def from_iso_8859_15(str) + array_latin9 = str.unpack('C*') + array_enc = [] + array_latin9.each do |num| + case num + # characters that differ compared to iso-8859-1 + when 0xA4; array_enc << 0x20AC + when 0xA6; array_enc << 0x0160 + when 0xA8; array_enc << 0x0161 + when 0xB4; array_enc << 0x017D + when 0xB8; array_enc << 0x017E + when 0xBC; array_enc << 0x0152 + when 0xBD; array_enc << 0x0153 + when 0xBE; array_enc << 0x0178 + else + array_enc << num + end + end + array_enc.pack('U*') + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT-JIS.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT-JIS.rb new file mode 100644 index 0000000..9e0f4af --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT-JIS.rb @@ -0,0 +1,37 @@ +module REXML + module Encoding + begin + require 'uconv' + + def decode_sjis content + Uconv::sjistou8(content) + end + + def encode_sjis(str) + Uconv::u8tosjis(str) + end + rescue LoadError + require 'nkf' + + SJISTOU8 = '-Swm0x' + U8TOSJIS = '-Wsm0x' + + def decode_sjis(str) + NKF.nkf(SJISTOU8, str) + end + + def encode_sjis content + NKF.nkf(U8TOSJIS, content) + end + end + + b = proc do |obj| + class << obj + alias decode decode_sjis + alias encode encode_sjis + end + end + register("SHIFT-JIS", &b) + register("SHIFT_JIS", &b) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT_JIS.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT_JIS.rb new file mode 100644 index 0000000..e355704 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/SHIFT_JIS.rb @@ -0,0 +1 @@ +require 'rexml/encodings/SHIFT-JIS' diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UNILE.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UNILE.rb new file mode 100644 index 0000000..d054140 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UNILE.rb @@ -0,0 +1,34 @@ +module REXML + module Encoding + def encode_unile content + array_utf8 = content.unpack("U*") + array_enc = [] + array_utf8.each do |num| + if ((num>>16) > 0) + array_enc << ?? + array_enc << 0 + else + array_enc << (num & 0xFF) + array_enc << (num >> 8) + end + end + array_enc.pack('C*') + end + + def decode_unile(str) + array_enc=str.unpack('C*') + array_utf8 = [] + 0.step(array_enc.size-1, 2){|i| + array_utf8 << (array_enc.at(i) + array_enc.at(i+1)*0x100) + } + array_utf8.pack('U*') + end + + register(UNILE) do |obj| + class << obj + alias decode decode_unile + alias encode encode_unile + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/US-ASCII.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/US-ASCII.rb new file mode 100644 index 0000000..fb4c217 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/US-ASCII.rb @@ -0,0 +1,30 @@ +module REXML + module Encoding + # Convert from UTF-8 + def encode_ascii content + array_utf8 = content.unpack('U*') + array_enc = [] + array_utf8.each do |num| + if num <= 0x7F + array_enc << num + else + # Numeric entity (&#nnnn;); shard by Stefan Scholl + array_enc.concat "&\##{num};".unpack('C*') + end + end + array_enc.pack('C*') + end + + # Convert to UTF-8 + def decode_ascii(str) + str.unpack('C*').pack('U*') + end + + register("US-ASCII") do |obj| + class << obj + alias decode decode_ascii + alias encode encode_ascii + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-16.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-16.rb new file mode 100644 index 0000000..007c493 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-16.rb @@ -0,0 +1,35 @@ +module REXML + module Encoding + def encode_utf16 content + array_utf8 = content.unpack("U*") + array_enc = [] + array_utf8.each do |num| + if ((num>>16) > 0) + array_enc << 0 + array_enc << ?? + else + array_enc << (num >> 8) + array_enc << (num & 0xFF) + end + end + array_enc.pack('C*') + end + + def decode_utf16(str) + str = str[2..-1] if /^\376\377/n =~ str + array_enc=str.unpack('C*') + array_utf8 = [] + 0.step(array_enc.size-1, 2){|i| + array_utf8 << (array_enc.at(i+1) + array_enc.at(i)*0x100) + } + array_utf8.pack('U*') + end + + register(UTF_16) do |obj| + class << obj + alias decode decode_utf16 + alias encode encode_utf16 + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-8.rb b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-8.rb new file mode 100644 index 0000000..bb08f44 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/encodings/UTF-8.rb @@ -0,0 +1,18 @@ +module REXML + module Encoding + def encode_utf8 content + content + end + + def decode_utf8(str) + str + end + + register(UTF_8) do |obj| + class << obj + alias decode decode_utf8 + alias encode encode_utf8 + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/entity.rb b/lib/ruby-1.9.1-rc1/lib/rexml/entity.rb new file mode 100644 index 0000000..d2f27ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/entity.rb @@ -0,0 +1,166 @@ +require 'rexml/child' +require 'rexml/source' +require 'rexml/xmltokens' + +module REXML + # God, I hate DTDs. I really do. Why this idiot standard still + # plagues us is beyond me. + class Entity < Child + include XMLTokens + PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#" + SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))} + PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')} + EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))" + NDATADECL = "\\s+NDATA\\s+#{NAME}" + PEREFERENCE = "%#{NAME};" + ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))} + PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})" + ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))" + PEDECL = "" + GEDECL = "" + ENTITYDECL = /\s*(?:#{GEDECL})|(?:#{PEDECL})/um + + attr_reader :name, :external, :ref, :ndata, :pubid + + # Create a new entity. Simple entities can be constructed by passing a + # name, value to the constructor; this creates a generic, plain entity + # reference. For anything more complicated, you have to pass a Source to + # the constructor with the entity definiton, or use the accessor methods. + # +WARNING+: There is no validation of entity state except when the entity + # is read from a stream. If you start poking around with the accessors, + # you can easily create a non-conformant Entity. The best thing to do is + # dump the stupid DTDs and use XMLSchema instead. + # + # e = Entity.new( 'amp', '&' ) + def initialize stream, value=nil, parent=nil, reference=false + super(parent) + @ndata = @pubid = @value = @external = nil + if stream.kind_of? Array + @name = stream[1] + if stream[-1] == '%' + @reference = true + stream.pop + else + @reference = false + end + if stream[2] =~ /SYSTEM|PUBLIC/ + @external = stream[2] + if @external == 'SYSTEM' + @ref = stream[3] + @ndata = stream[4] if stream.size == 5 + else + @pubid = stream[3] + @ref = stream[4] + end + else + @value = stream[2] + end + else + @reference = reference + @external = nil + @name = stream + @value = value + end + end + + # Evaluates whether the given string matchs an entity definition, + # returning true if so, and false otherwise. + def Entity::matches? string + (ENTITYDECL =~ string) == 0 + end + + # Evaluates to the unnormalized value of this entity; that is, replacing + # all entities -- both %ent; and &ent; entities. This differs from + # +value()+ in that +value+ only replaces %ent; entities. + def unnormalized + document.record_entity_expansion unless document.nil? + v = value() + return nil if v.nil? + @unnormalized = Text::unnormalize(v, parent) + @unnormalized + end + + #once :unnormalized + + # Returns the value of this entity unprocessed -- raw. This is the + # normalized value; that is, with all %ent; and &ent; entities intact + def normalized + @value + end + + # Write out a fully formed, correct entity definition (assuming the Entity + # object itself is valid.) + # + # out:: + # An object implementing << to which the entity will be + # output + # indent:: + # *DEPRECATED* and ignored + def write out, indent=-1 + out << '' + end + + # Returns this entity as a string. See write(). + def to_s + rv = '' + write rv + rv + end + + PEREFERENCE_RE = /#{PEREFERENCE}/um + # Returns the value of this entity. At the moment, only internal entities + # are processed. If the value contains internal references (IE, + # %blah;), those are replaced with their values. IE, if the doctype + # contains: + # + # + # then: + # doctype.entity('yada').value #-> "nanoo bar nanoo" + def value + if @value + matches = @value.scan(PEREFERENCE_RE) + rv = @value.clone + if @parent + matches.each do |entity_reference| + entity_value = @parent.entity( entity_reference[0] ) + rv.gsub!( /%#{entity_reference.join};/um, entity_value ) + end + end + return rv + end + nil + end + end + + # This is a set of entity constants -- the ones defined in the XML + # specification. These are +gt+, +lt+, +amp+, +quot+ and +apos+. + module EntityConst + # +>+ + GT = Entity.new( 'gt', '>' ) + # +<+ + LT = Entity.new( 'lt', '<' ) + # +&+ + AMP = Entity.new( 'amp', '&' ) + # +"+ + QUOT = Entity.new( 'quot', '"' ) + # +'+ + APOS = Entity.new( 'apos', "'" ) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/formatters/default.rb b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/default.rb new file mode 100644 index 0000000..b4d63bc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/default.rb @@ -0,0 +1,109 @@ +module REXML + module Formatters + class Default + # Prints out the XML document with no formatting -- except if id_hack is + # set. + # + # ie_hack:: + # If set to true, then inserts whitespace before the close of an empty + # tag, so that IE's bad XML parser doesn't choke. + def initialize( ie_hack=false ) + @ie_hack = ie_hack + end + + # Writes the node to some output. + # + # node:: + # The node to write + # output:: + # A class implementing <<. Pass in an Output object to + # change the output encoding. + def write( node, output ) + case node + + when Document + if node.xml_decl.encoding != "UTF-8" && !output.kind_of?(Output) + output = Output.new( output, node.xml_decl.encoding ) + end + write_document( node, output ) + + when Element + write_element( node, output ) + + when Declaration, ElementDecl, NotationDecl, ExternalEntity, Entity, + Attribute, AttlistDecl + node.write( output,-1 ) + + when Instruction + write_instruction( node, output ) + + when DocType, XMLDecl + node.write( output ) + + when Comment + write_comment( node, output ) + + when CData + write_cdata( node, output ) + + when Text + write_text( node, output ) + + else + raise Exception.new("XML FORMATTING ERROR") + + end + end + + protected + def write_document( node, output ) + node.children.each { |child| write( child, output ) } + end + + def write_element( node, output ) + output << "<#{node.expanded_name}" + + node.attributes.to_a.sort_by {|attr| attr.name}.each do |attr| + output << " " + attr.write( output ) + end unless node.attributes.empty? + + if node.children.empty? + output << " " if @ie_hack + output << "/" + else + output << ">" + node.children.each { |child| + write( child, output ) + } + output << "" + end + + def write_text( node, output ) + output << node.to_s() + end + + def write_comment( node, output ) + output << Comment::START + output << node.to_s + output << Comment::STOP + end + + def write_cdata( node, output ) + output << CData::START + output << node.to_s + output << CData::STOP + end + + def write_instruction( node, output ) + output << Instruction::START.sub(/\\/u, '') + output << node.target + output << ' ' + output << node.content + output << Instruction::STOP.sub(/\\/u, '') + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/formatters/pretty.rb b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/pretty.rb new file mode 100644 index 0000000..84c442e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/pretty.rb @@ -0,0 +1,139 @@ +require 'rexml/formatters/default' + +module REXML + module Formatters + # Pretty-prints an XML document. This destroys whitespace in text nodes + # and will insert carriage returns and indentations. + # + # TODO: Add an option to print attributes on new lines + class Pretty < Default + + # If compact is set to true, then the formatter will attempt to use as + # little space as possible + attr_accessor :compact + # The width of a page. Used for formatting text + attr_accessor :width + + # Create a new pretty printer. + # + # output:: + # An object implementing '<<(String)', to which the output will be written. + # indentation:: + # An integer greater than 0. The indentation of each level will be + # this number of spaces. If this is < 1, the behavior of this object + # is undefined. Defaults to 2. + # ie_hack:: + # If true, the printer will insert whitespace before closing empty + # tags, thereby allowing Internet Explorer's feeble XML parser to + # function. Defaults to false. + def initialize( indentation=2, ie_hack=false ) + @indentation = indentation + @level = 0 + @ie_hack = ie_hack + @width = 80 + @compact = false + end + + protected + def write_element(node, output) + output << ' '*@level + output << "<#{node.expanded_name}" + + node.attributes.each_attribute do |attr| + output << " " + attr.write( output ) + end unless node.attributes.empty? + + if node.children.empty? + if @ie_hack + output << " " + end + output << "/" + else + output << ">" + # If compact and all children are text, and if the formatted output + # is less than the specified width, then try to print everything on + # one line + skip = false + if compact + if node.children.inject(true) {|s,c| s & c.kind_of?(Text)} + string = "" + old_level = @level + @level = 0 + node.children.each { |child| write( child, string ) } + @level = old_level + if string.length < @width + output << string + skip = true + end + end + end + unless skip + output << "\n" + @level += @indentation + node.children.each { |child| + next if child.kind_of?(Text) and child.to_s.strip.length == 0 + write( child, output ) + output << "\n" + } + @level -= @indentation + output << ' '*@level + end + output << "" + end + + def write_text( node, output ) + s = node.to_s() + s.gsub!(/\s/,' ') + s.squeeze!(" ") + s = wrap(s, 80-@level) + s = indent_text(s, @level, " ", true) + output << (' '*@level + s) + end + + def write_comment( node, output) + output << ' ' * @level + super + end + + def write_cdata( node, output) + output << ' ' * @level + super + end + + def write_document( node, output ) + # Ok, this is a bit odd. All XML documents have an XML declaration, + # but it may not write itself if the user didn't specifically add it, + # either through the API or in the input document. If it doesn't write + # itself, then we don't need a carriage return... which makes this + # logic more complex. + node.children.each { |child| + next if child == node.children[-1] and child.instance_of?(Text) + unless child == node.children[0] or child.instance_of?(Text) or + (child == node.children[1] and !node.children[0].writethis) + output << "\n" + end + write( child, output ) + } + end + + private + def indent_text(string, level=1, style="\t", indentfirstline=true) + return string if level < 0 + string.gsub(/\n/, "\n#{style*level}") + end + + def wrap(string, width) + # Recursively wrap string at width. + return string if string.length <= width + place = string.rindex(' ', width) # Position in string with last ' ' before cutoff + return string if place.nil? + return string[0,place] + "\n" + wrap(string[place+1..-1], width) + end + + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/formatters/transitive.rb b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/transitive.rb new file mode 100644 index 0000000..6083f03 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/formatters/transitive.rb @@ -0,0 +1,58 @@ +require 'rexml/formatters/pretty' + +module REXML + module Formatters + # The Transitive formatter writes an XML document that parses to an + # identical document as the source document. This means that no extra + # whitespace nodes are inserted, and whitespace within text nodes is + # preserved. Within these constraints, the document is pretty-printed, + # with whitespace inserted into the metadata to introduce formatting. + # + # Note that this is only useful if the original XML is not already + # formatted. Since this formatter does not alter whitespace nodes, the + # results of formatting already formatted XML will be odd. + class Transitive < Default + def initialize( indentation=2, ie_hack=false ) + @indentation = indentation + @level = 0 + @ie_hack = ie_hack + end + + protected + def write_element( node, output ) + output << "<#{node.expanded_name}" + + node.attributes.each_attribute do |attr| + output << " " + attr.write( output ) + end unless node.attributes.empty? + + output << "\n" + output << ' '*@level + if node.children.empty? + output << " " if @ie_hack + output << "/" + else + output << ">" + # If compact and all children are text, and if the formatted output + # is less than the specified width, then try to print everything on + # one line + skip = false + @level += @indentation + node.children.each { |child| + write( child, output ) + } + @level -= @indentation + output << "" + end + + def write_text( node, output ) + output << node.to_s() + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/functions.rb b/lib/ruby-1.9.1-rc1/lib/rexml/functions.rb new file mode 100644 index 0000000..fc9c470 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/functions.rb @@ -0,0 +1,388 @@ +module REXML + # If you add a method, keep in mind two things: + # (1) the first argument will always be a list of nodes from which to + # filter. In the case of context methods (such as position), the function + # should return an array with a value for each child in the array. + # (2) all method calls from XML will have "-" replaced with "_". + # Therefore, in XML, "local-name()" is identical (and actually becomes) + # "local_name()" + module Functions + @@context = nil + @@namespace_context = {} + @@variables = {} + + def Functions::namespace_context=(x) ; @@namespace_context=x ; end + def Functions::variables=(x) ; @@variables=x ; end + def Functions::namespace_context ; @@namespace_context ; end + def Functions::variables ; @@variables ; end + + def Functions::context=(value); @@context = value; end + + def Functions::text( ) + if @@context[:node].node_type == :element + return @@context[:node].find_all{|n| n.node_type == :text}.collect{|n| n.value} + elsif @@context[:node].node_type == :text + return @@context[:node].value + else + return false + end + end + + def Functions::last( ) + @@context[:size] + end + + def Functions::position( ) + @@context[:index] + end + + def Functions::count( node_set ) + node_set.size + end + + # Since REXML is non-validating, this method is not implemented as it + # requires a DTD + def Functions::id( object ) + end + + # UNTESTED + def Functions::local_name( node_set=nil ) + get_namespace( node_set ) do |node| + return node.local_name + end + end + + def Functions::namespace_uri( node_set=nil ) + get_namespace( node_set ) {|node| node.namespace} + end + + def Functions::name( node_set=nil ) + get_namespace( node_set ) do |node| + node.expanded_name + end + end + + # Helper method. + def Functions::get_namespace( node_set = nil ) + if node_set == nil + yield @@context[:node] if defined? @@context[:node].namespace + else + if node_set.respond_to? :each + node_set.each { |node| yield node if defined? node.namespace } + elsif node_set.respond_to? :namespace + yield node_set + end + end + end + + # A node-set is converted to a string by returning the string-value of the + # node in the node-set that is first in document order. If the node-set is + # empty, an empty string is returned. + # + # A number is converted to a string as follows + # + # NaN is converted to the string NaN + # + # positive zero is converted to the string 0 + # + # negative zero is converted to the string 0 + # + # positive infinity is converted to the string Infinity + # + # negative infinity is converted to the string -Infinity + # + # if the number is an integer, the number is represented in decimal form + # as a Number with no decimal point and no leading zeros, preceded by a + # minus sign (-) if the number is negative + # + # otherwise, the number is represented in decimal form as a Number + # including a decimal point with at least one digit before the decimal + # point and at least one digit after the decimal point, preceded by a + # minus sign (-) if the number is negative; there must be no leading zeros + # before the decimal point apart possibly from the one required digit + # immediately before the decimal point; beyond the one required digit + # after the decimal point there must be as many, but only as many, more + # digits as are needed to uniquely distinguish the number from all other + # IEEE 754 numeric values. + # + # The boolean false value is converted to the string false. The boolean + # true value is converted to the string true. + # + # An object of a type other than the four basic types is converted to a + # string in a way that is dependent on that type. + def Functions::string( object=nil ) + #object = @context unless object + if object.instance_of? Array + string( object[0] ) + elsif defined? object.node_type + if object.node_type == :attribute + object.value + elsif object.node_type == :element || object.node_type == :document + string_value(object) + else + object.to_s + end + elsif object.nil? + return "" + else + object.to_s + end + end + + def Functions::string_value( o ) + rv = "" + o.children.each { |e| + if e.node_type == :text + rv << e.to_s + elsif e.node_type == :element + rv << string_value( e ) + end + } + rv + end + + # UNTESTED + def Functions::concat( *objects ) + objects.join + end + + # Fixed by Mike Stok + def Functions::starts_with( string, test ) + string(string).index(string(test)) == 0 + end + + # Fixed by Mike Stok + def Functions::contains( string, test ) + string(string).include?(string(test)) + end + + # Kouhei fixed this + def Functions::substring_before( string, test ) + ruby_string = string(string) + ruby_index = ruby_string.index(string(test)) + if ruby_index.nil? + "" + else + ruby_string[ 0...ruby_index ] + end + end + + # Kouhei fixed this too + def Functions::substring_after( string, test ) + ruby_string = string(string) + test_string = string(test) + return $1 if ruby_string =~ /#{test}(.*)/ + "" + end + + # Take equal portions of Mike Stok and Sean Russell; mix + # vigorously, and pour into a tall, chilled glass. Serves 10,000. + def Functions::substring( string, start, length=nil ) + ruby_string = string(string) + ruby_length = if length.nil? + ruby_string.length.to_f + else + number(length) + end + ruby_start = number(start) + + # Handle the special cases + return '' if ( + ruby_length.nan? or + ruby_start.nan? or + ruby_start.infinite? + ) + + infinite_length = ruby_length.infinite? == 1 + ruby_length = ruby_string.length if infinite_length + + # Now, get the bounds. The XPath bounds are 1..length; the ruby bounds + # are 0..length. Therefore, we have to offset the bounds by one. + ruby_start = ruby_start.round - 1 + ruby_length = ruby_length.round + + if ruby_start < 0 + ruby_length += ruby_start unless infinite_length + ruby_start = 0 + end + return '' if ruby_length <= 0 + ruby_string[ruby_start,ruby_length] + end + + # UNTESTED + def Functions::string_length( string ) + string(string).length + end + + # UNTESTED + def Functions::normalize_space( string=nil ) + string = string(@@context[:node]) if string.nil? + if string.kind_of? Array + string.collect{|x| string.to_s.strip.gsub(/\s+/um, ' ') if string} + else + string.to_s.strip.gsub(/\s+/um, ' ') + end + end + + # This is entirely Mike Stok's beast + def Functions::translate( string, tr1, tr2 ) + from = string(tr1) + to = string(tr2) + + # the map is our translation table. + # + # if a character occurs more than once in the + # from string then we ignore the second & + # subsequent mappings + # + # if a character maps to nil then we delete it + # in the output. This happens if the from + # string is longer than the to string + # + # there's nothing about - or ^ being special in + # http://www.w3.org/TR/xpath#function-translate + # so we don't build ranges or negated classes + + map = Hash.new + 0.upto(from.length - 1) { |pos| + from_char = from[pos] + unless map.has_key? from_char + map[from_char] = + if pos < to.length + to[pos] + else + nil + end + end + } + + if ''.respond_to? :chars + string(string).chars.collect { |c| + if map.has_key? c then map[c] else c end + }.compact.join + else + string(string).unpack('U*').collect { |c| + if map.has_key? c then map[c] else c end + }.compact.pack('U*') + end + end + + # UNTESTED + def Functions::boolean( object=nil ) + if object.kind_of? String + if object =~ /\d+/u + return object.to_f != 0 + else + return object.size > 0 + end + elsif object.kind_of? Array + object = object.find{|x| x and true} + end + return object ? true : false + end + + # UNTESTED + def Functions::not( object ) + not boolean( object ) + end + + # UNTESTED + def Functions::true( ) + true + end + + # UNTESTED + def Functions::false( ) + false + end + + # UNTESTED + def Functions::lang( language ) + lang = false + node = @@context[:node] + attr = nil + until node.nil? + if node.node_type == :element + attr = node.attributes["xml:lang"] + unless attr.nil? + lang = compare_language(string(language), attr) + break + else + end + end + node = node.parent + end + lang + end + + def Functions::compare_language lang1, lang2 + lang2.downcase.index(lang1.downcase) == 0 + end + + # a string that consists of optional whitespace followed by an optional + # minus sign followed by a Number followed by whitespace is converted to + # the IEEE 754 number that is nearest (according to the IEEE 754 + # round-to-nearest rule) to the mathematical value represented by the + # string; any other string is converted to NaN + # + # boolean true is converted to 1; boolean false is converted to 0 + # + # a node-set is first converted to a string as if by a call to the string + # function and then converted in the same way as a string argument + # + # an object of a type other than the four basic types is converted to a + # number in a way that is dependent on that type + def Functions::number( object=nil ) + object = @@context[:node] unless object + case object + when true + Float(1) + when false + Float(0) + when Array + number(string( object )) + when Numeric + object.to_f + else + str = string( object ) + # If XPath ever gets scientific notation... + #if str =~ /^\s*-?(\d*\.?\d+|\d+\.)([Ee]\d*)?\s*$/ + if str =~ /^\s*-?(\d*\.?\d+|\d+\.)\s*$/ + str.to_f + else + (0.0 / 0.0) + end + end + end + + def Functions::sum( nodes ) + nodes = [nodes] unless nodes.kind_of? Array + nodes.inject(0) { |r,n| r += number(string(n)) } + end + + def Functions::floor( number ) + number(number).floor + end + + def Functions::ceiling( number ) + number(number).ceil + end + + def Functions::round( number ) + begin + number(number).round + rescue FloatDomainError + number(number) + end + end + + def Functions::processing_instruction( node ) + node.node_type == :processing_instruction + end + + def Functions::method_missing( id ) + puts "METHOD MISSING #{id.id2name}" + XPath.match( @@context[:node], id.id2name ) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/instruction.rb b/lib/ruby-1.9.1-rc1/lib/rexml/instruction.rb new file mode 100644 index 0000000..50bf95d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/instruction.rb @@ -0,0 +1,70 @@ +require "rexml/child" +require "rexml/source" + +module REXML + # Represents an XML Instruction; IE, + # TODO: Add parent arg (3rd arg) to constructor + class Instruction < Child + START = '<\?' + STOP = '\?>' + + # target is the "name" of the Instruction; IE, the "tag" in + # content is everything else. + attr_accessor :target, :content + + # Constructs a new Instruction + # @param target can be one of a number of things. If String, then + # the target of this instruction is set to this. If an Instruction, + # then the Instruction is shallowly cloned (target and content are + # copied). If a Source, then the source is scanned and parsed for + # an Instruction declaration. + # @param content Must be either a String, or a Parent. Can only + # be a Parent if the target argument is a Source. Otherwise, this + # String is set as the content of this instruction. + def initialize(target, content=nil) + if target.kind_of? String + super() + @target = target + @content = content + elsif target.kind_of? Instruction + super(content) + @target = target.target + @content = target.content + end + @content.strip! if @content + end + + def clone + Instruction.new self + end + + # == DEPRECATED + # See the rexml/formatters package + # + def write writer, indent=-1, transitive=false, ie_hack=false + Kernel.warn( "#{self.class.name}.write is deprecated" ) + indent(writer, indent) + writer << START.sub(/\\/u, '') + writer << @target + writer << ' ' + writer << @content + writer << STOP.sub(/\\/u, '') + end + + # @return true if other is an Instruction, and the content and target + # of the other matches the target and content of this object. + def ==( other ) + other.kind_of? Instruction and + other.target == @target and + other.content == @content + end + + def node_type + :processing_instruction + end + + def inspect + "" + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/light/node.rb b/lib/ruby-1.9.1-rc1/lib/rexml/light/node.rb new file mode 100644 index 0000000..9c90148 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/light/node.rb @@ -0,0 +1,196 @@ +require 'rexml/xmltokens' +require 'rexml/light/node' + +# [ :element, parent, name, attributes, children* ] + # a = Node.new + # a << "B" # => B + # a.b # => B + # a.b[1] # => B + # a.b[1]["x"] = "y" # => B + # a.b[0].c # => B + # a.b.c << "D" # => BD +module REXML + module Light + # Represents a tagged XML element. Elements are characterized by + # having children, attributes, and names, and can themselves be + # children. + class Node + NAMESPLIT = /^(?:(#{XMLTokens::NCNAME_STR}):)?(#{XMLTokens::NCNAME_STR})/u + PARENTS = [ :element, :document, :doctype ] + # Create a new element. + def initialize node=nil + @node = node + if node.kind_of? String + node = [ :text, node ] + elsif node.nil? + node = [ :document, nil, nil ] + elsif node[0] == :start_element + node[0] = :element + elsif node[0] == :start_doctype + node[0] = :doctype + elsif node[0] == :start_document + node[0] = :document + end + end + + def size + if PARENTS.include? @node[0] + @node[-1].size + else + 0 + end + end + + def each( &block ) + size.times { |x| yield( at(x+4) ) } + end + + def name + at(2) + end + + def name=( name_str, ns=nil ) + pfx = '' + pfx = "#{prefix(ns)}:" if ns + _old_put(2, "#{pfx}#{name_str}") + end + + def parent=( node ) + _old_put(1,node) + end + + def local_name + namesplit + @name + end + + def local_name=( name_str ) + _old_put( 1, "#@prefix:#{name_str}" ) + end + + def prefix( namespace=nil ) + prefix_of( self, namespace ) + end + + def namespace( prefix=prefix() ) + namespace_of( self, prefix ) + end + + def namespace=( namespace ) + @prefix = prefix( namespace ) + pfx = '' + pfx = "#@prefix:" if @prefix.size > 0 + _old_put(1, "#{pfx}#@name") + end + + def []( reference, ns=nil ) + if reference.kind_of? String + pfx = '' + pfx = "#{prefix(ns)}:" if ns + at(3)["#{pfx}#{reference}"] + elsif reference.kind_of? Range + _old_get( Range.new(4+reference.begin, reference.end, reference.exclude_end?) ) + else + _old_get( 4+reference ) + end + end + + def =~( path ) + XPath.match( self, path ) + end + + # Doesn't handle namespaces yet + def []=( reference, ns, value=nil ) + if reference.kind_of? String + value = ns unless value + at( 3 )[reference] = value + elsif reference.kind_of? Range + _old_put( Range.new(3+reference.begin, reference.end, reference.exclude_end?), ns ) + else + if value + _old_put( 4+reference, ns, value ) + else + _old_put( 4+reference, ns ) + end + end + end + + # Append a child to this element, optionally under a provided namespace. + # The namespace argument is ignored if the element argument is an Element + # object. Otherwise, the element argument is a string, the namespace (if + # provided) is the namespace the element is created in. + def << element + if node_type() == :text + at(-1) << element + else + newnode = Node.new( element ) + newnode.parent = self + self.push( newnode ) + end + at(-1) + end + + def node_type + _old_get(0) + end + + def text=( foo ) + replace = at(4).kind_of?(String)? 1 : 0 + self._old_put(4,replace, normalizefoo) + end + + def root + context = self + context = context.at(1) while context.at(1) + end + + def has_name?( name, namespace = '' ) + at(3) == name and namespace() == namespace + end + + def children + self + end + + def parent + at(1) + end + + def to_s + + end + + private + + def namesplit + return if @name.defined? + at(2) =~ NAMESPLIT + @prefix = '' || $1 + @name = $2 + end + + def namespace_of( node, prefix=nil ) + if not prefix + name = at(2) + name =~ NAMESPLIT + prefix = $1 + end + to_find = 'xmlns' + to_find = "xmlns:#{prefix}" if not prefix.nil? + ns = at(3)[ to_find ] + ns ? ns : namespace_of( @node[0], prefix ) + end + + def prefix_of( node, namespace=nil ) + if not namespace + name = node.name + name =~ NAMESPLIT + $1 + else + ns = at(3).find { |k,v| v == namespace } + ns ? ns : prefix_of( node.parent, namespace ) + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/namespace.rb b/lib/ruby-1.9.1-rc1/lib/rexml/namespace.rb new file mode 100644 index 0000000..8d43fc8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/namespace.rb @@ -0,0 +1,47 @@ +require 'rexml/xmltokens' + +module REXML + # Adds named attributes to an object. + module Namespace + # The name of the object, valid if set + attr_reader :name, :expanded_name + # The expanded name of the object, valid if name is set + attr_accessor :prefix + include XMLTokens + NAMESPLIT = /^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u + + # Sets the name and the expanded name + def name=( name ) + @expanded_name = name + name =~ NAMESPLIT + if $1 + @prefix = $1 + else + @prefix = "" + @namespace = "" + end + @name = $2 + end + + # Compares names optionally WITH namespaces + def has_name?( other, ns=nil ) + if ns + return (namespace() == ns and name() == other) + elsif other.include? ":" + return fully_expanded_name == other + else + return name == other + end + end + + alias :local_name :name + + # Fully expand the name, even if the prefix wasn't specified in the + # source file. + def fully_expanded_name + ns = prefix + return "#{ns}:#@name" if ns.size > 0 + return @name + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/node.rb b/lib/ruby-1.9.1-rc1/lib/rexml/node.rb new file mode 100644 index 0000000..eb39141 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/node.rb @@ -0,0 +1,75 @@ +require "rexml/parseexception" +require "rexml/formatters/pretty" +require "rexml/formatters/default" + +module REXML + # Represents a node in the tree. Nodes are never encountered except as + # superclasses of other objects. Nodes have siblings. + module Node + # @return the next sibling (nil if unset) + def next_sibling_node + return nil if @parent.nil? + @parent[ @parent.index(self) + 1 ] + end + + # @return the previous sibling (nil if unset) + def previous_sibling_node + return nil if @parent.nil? + ind = @parent.index(self) + return nil if ind == 0 + @parent[ ind - 1 ] + end + + # indent:: + # *DEPRECATED* This parameter is now ignored. See the formatters in the + # REXML::Formatters package for changing the output style. + def to_s indent=nil + unless indent.nil? + Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated" ) + f = REXML::Formatters::Pretty.new( indent ) + f.write( self, rv = "" ) + else + f = REXML::Formatters::Default.new + f.write( self, rv = "" ) + end + return rv + end + + def indent to, ind + if @parent and @parent.context and not @parent.context[:indentstyle].nil? then + indentstyle = @parent.context[:indentstyle] + else + indentstyle = ' ' + end + to << indentstyle*ind unless ind<1 + end + + def parent? + false; + end + + + # Visit all subnodes of +self+ recursively + def each_recursive(&block) # :yields: node + self.elements.each {|node| + block.call(node) + node.each_recursive(&block) + } + end + + # Find (and return) first subnode (recursively) for which the block + # evaluates to true. Returns +nil+ if none was found. + def find_first_recursive(&block) # :yields: node + each_recursive {|node| + return node if block.call(node) + } + return nil + end + + # Returns the position that +self+ holds in its parent's array, indexed + # from 1. + def index_in_parent + parent.index(self)+1 + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/output.rb b/lib/ruby-1.9.1-rc1/lib/rexml/output.rb new file mode 100644 index 0000000..997f2b1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/output.rb @@ -0,0 +1,24 @@ +require 'rexml/encoding' + +module REXML + class Output + include Encoding + + attr_reader :encoding + + def initialize real_IO, encd="iso-8859-1" + @output = real_IO + self.encoding = encd + + @to_utf = encd == UTF_8 ? false : true + end + + def <<( content ) + @output << (@to_utf ? self.encode(content) : content) + end + + def to_s + "Output[#{encoding}]" + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parent.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parent.rb new file mode 100644 index 0000000..a20aaae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parent.rb @@ -0,0 +1,166 @@ +require "rexml/child" + +module REXML + # A parent has children, and has methods for accessing them. The Parent + # class is never encountered except as the superclass for some other + # object. + class Parent < Child + include Enumerable + + # Constructor + # @param parent if supplied, will be set as the parent of this object + def initialize parent=nil + super(parent) + @children = [] + end + + def add( object ) + #puts "PARENT GOTS #{size} CHILDREN" + object.parent = self + @children << object + #puts "PARENT NOW GOTS #{size} CHILDREN" + object + end + + alias :push :add + alias :<< :push + + def unshift( object ) + object.parent = self + @children.unshift object + end + + def delete( object ) + found = false + @children.delete_if {|c| c.equal?(object) and found = true } + object.parent = nil if found + end + + def each(&block) + @children.each(&block) + end + + def delete_if( &block ) + @children.delete_if(&block) + end + + def delete_at( index ) + @children.delete_at index + end + + def each_index( &block ) + @children.each_index(&block) + end + + # Fetches a child at a given index + # @param index the Integer index of the child to fetch + def []( index ) + @children[index] + end + + alias :each_child :each + + + + # Set an index entry. See Array.[]= + # @param index the index of the element to set + # @param opt either the object to set, or an Integer length + # @param child if opt is an Integer, this is the child to set + # @return the parent (self) + def []=( *args ) + args[-1].parent = self + @children[*args[0..-2]] = args[-1] + end + + # Inserts an child before another child + # @param child1 this is either an xpath or an Element. If an Element, + # child2 will be inserted before child1 in the child list of the parent. + # If an xpath, child2 will be inserted before the first child to match + # the xpath. + # @param child2 the child to insert + # @return the parent (self) + def insert_before( child1, child2 ) + if child1.kind_of? String + child1 = XPath.first( self, child1 ) + child1.parent.insert_before child1, child2 + else + ind = index(child1) + child2.parent.delete(child2) if child2.parent + @children[ind,0] = child2 + child2.parent = self + end + self + end + + # Inserts an child after another child + # @param child1 this is either an xpath or an Element. If an Element, + # child2 will be inserted after child1 in the child list of the parent. + # If an xpath, child2 will be inserted after the first child to match + # the xpath. + # @param child2 the child to insert + # @return the parent (self) + def insert_after( child1, child2 ) + if child1.kind_of? String + child1 = XPath.first( self, child1 ) + child1.parent.insert_after child1, child2 + else + ind = index(child1)+1 + child2.parent.delete(child2) if child2.parent + @children[ind,0] = child2 + child2.parent = self + end + self + end + + def to_a + @children.dup + end + + # Fetches the index of a given child + # @param child the child to get the index of + # @return the index of the child, or nil if the object is not a child + # of this parent. + def index( child ) + count = -1 + @children.find { |i| count += 1 ; i.hash == child.hash } + count + end + + # @return the number of children of this parent + def size + @children.size + end + + alias :length :size + + # Replaces one child with another, making sure the nodelist is correct + # @param to_replace the child to replace (must be a Child) + # @param replacement the child to insert into the nodelist (must be a + # Child) + def replace_child( to_replace, replacement ) + @children.map! {|c| c.equal?( to_replace ) ? replacement : c } + to_replace.parent = nil + replacement.parent = self + end + + # Deeply clones this object. This creates a complete duplicate of this + # Parent, including all descendants. + def deep_clone + cl = clone() + each do |child| + if child.kind_of? Parent + cl << child.deep_clone + else + cl << child.clone + end + end + cl + end + + alias :children :to_a + + def parent? + true + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parseexception.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parseexception.rb new file mode 100644 index 0000000..feb7a7e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parseexception.rb @@ -0,0 +1,51 @@ +module REXML + class ParseException < RuntimeError + attr_accessor :source, :parser, :continued_exception + + def initialize( message, source=nil, parser=nil, exception=nil ) + super(message) + @source = source + @parser = parser + @continued_exception = exception + end + + def to_s + # Quote the original exception, if there was one + if @continued_exception + err = @continued_exception.inspect + err << "\n" + err << @continued_exception.backtrace.join("\n") + err << "\n...\n" + else + err = "" + end + + # Get the stack trace and error message + err << super + + # Add contextual information + if @source + err << "\nLine: #{line}\n" + err << "Position: #{position}\n" + err << "Last 80 unconsumed characters:\n" + err << @source.buffer[0..80].gsub(/\n/, ' ') + end + + err + end + + def position + @source.current_line[0] if @source and defined? @source.current_line and + @source.current_line + end + + def line + @source.current_line[2] if @source and defined? @source.current_line and + @source.current_line + end + + def context + @source.current_line + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/baseparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/baseparser.rb new file mode 100644 index 0000000..162d029 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/baseparser.rb @@ -0,0 +1,530 @@ +require 'rexml/parseexception' +require 'rexml/undefinednamespaceexception' +require 'rexml/source' +require 'set' + +module REXML + module Parsers + # = Using the Pull Parser + # This API is experimental, and subject to change. + # parser = PullParser.new( "texttxet" ) + # while parser.has_next? + # res = parser.next + # puts res[1]['att'] if res.start_tag? and res[0] == 'b' + # end + # See the PullEvent class for information on the content of the results. + # The data is identical to the arguments passed for the various events to + # the StreamListener API. + # + # Notice that: + # parser = PullParser.new( "BAD DOCUMENT" ) + # while parser.has_next? + # res = parser.next + # raise res[1] if res.error? + # end + # + # Nat Price gave me some good ideas for the API. + class BaseParser + if String.method_defined? :encode + # Oniguruma / POSIX [understands unicode] + LETTER = '[[:alpha:]]' + DIGIT = '[[:digit:]]' + else + # Ruby < 1.9 [doesn't understand unicode] + LETTER = 'a-zA-Z' + DIGIT = '\d' + end + + COMBININGCHAR = '' # TODO + EXTENDER = '' # TODO + + NCNAME_STR= "[#{LETTER}_:][-#{LETTER}#{DIGIT}._:#{COMBININGCHAR}#{EXTENDER}]*" + NAME_STR= "(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})" + UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" + + NAMECHAR = '[\-\w\d\.:]' + NAME = "([\\w:]#{NAMECHAR}*)" + NMTOKEN = "(?:#{NAMECHAR})+" + NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*" + REFERENCE = "&(?:#{NAME};|#\\d+;|#x[0-9a-fA-F]+;)" + REFERENCE_RE = /#{REFERENCE}/ + + DOCTYPE_START = /\A\s*)/um + ATTRIBUTE_PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\4/um + COMMENT_START = /\A/um + CDATA_START = /\A/um + CDATA_PATTERN = //um + XMLDECL_START = /\A<\?xml\s/u; + XMLDECL_PATTERN = /<\?xml\s+(.*?)\?>/um + INSTRUCTION_START = /\A<\?/u + INSTRUCTION_PATTERN = /<\?(.*?)(\s+.*?)?\?>/um + TAG_MATCH = /^<((?>#{NAME_STR}))\s*((?>\s+#{UNAME_STR}\s*=\s*(["']).*?\5)*)\s*(\/)?>/um + CLOSE_MATCH = /^\s*<\/(#{NAME_STR})\s*>/um + + VERSION = /\bversion\s*=\s*["'](.*?)['"]/um + ENCODING = /\bencoding\s*=\s*["'](.*?)['"]/um + STANDALONE = /\bstandalone\s*=\s["'](.*?)['"]/um + + ENTITY_START = /^\s*/um + SYSTEMENTITY = /^\s*(%.*?;)\s*$/um + ENUMERATION = "\\(\\s*#{NMTOKEN}(?:\\s*\\|\\s*#{NMTOKEN})*\\s*\\)" + NOTATIONTYPE = "NOTATION\\s+\\(\\s*#{NAME}(?:\\s*\\|\\s*#{NAME})*\\s*\\)" + ENUMERATEDTYPE = "(?:(?:#{NOTATIONTYPE})|(?:#{ENUMERATION}))" + ATTTYPE = "(CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS|#{ENUMERATEDTYPE})" + ATTVALUE = "(?:\"((?:[^<&\"]|#{REFERENCE})*)\")|(?:'((?:[^<&']|#{REFERENCE})*)')" + DEFAULTDECL = "(#REQUIRED|#IMPLIED|(?:(#FIXED\\s+)?#{ATTVALUE}))" + ATTDEF = "\\s+#{NAME}\\s+#{ATTTYPE}\\s+#{DEFAULTDECL}" + ATTDEF_RE = /#{ATTDEF}/ + ATTLISTDECL_START = /^\s*/um + NOTATIONDECL_START = /^\s*/um + SYSTEM = /^\s*/um + + TEXT_PATTERN = /\A([^<]*)/um + + # Entity constants + PUBIDCHAR = "\x20\x0D\x0Aa-zA-Z0-9\\-()+,./:=?;!*@$_%#" + SYSTEMLITERAL = %Q{((?:"[^"]*")|(?:'[^']*'))} + PUBIDLITERAL = %Q{("[#{PUBIDCHAR}']*"|'[#{PUBIDCHAR}]*')} + EXTERNALID = "(?:(?:(SYSTEM)\\s+#{SYSTEMLITERAL})|(?:(PUBLIC)\\s+#{PUBIDLITERAL}\\s+#{SYSTEMLITERAL}))" + NDATADECL = "\\s+NDATA\\s+#{NAME}" + PEREFERENCE = "%#{NAME};" + ENTITYVALUE = %Q{((?:"(?:[^%&"]|#{PEREFERENCE}|#{REFERENCE})*")|(?:'([^%&']|#{PEREFERENCE}|#{REFERENCE})*'))} + PEDEF = "(?:#{ENTITYVALUE}|#{EXTERNALID})" + ENTITYDEF = "(?:#{ENTITYVALUE}|(?:#{EXTERNALID}(#{NDATADECL})?))" + PEDECL = "" + GEDECL = "" + ENTITYDECL = /\s*(?:#{GEDECL})|(?:#{PEDECL})/um + + EREFERENCE = /&(?!#{NAME};)/ + + DEFAULT_ENTITIES = { + 'gt' => [/>/, '>', '>', />/], + 'lt' => [/</, '<', '<', / [/"/, '"', '"', /"/], + "apos" => [/'/, "'", "'", /'/] + } + + + ###################################################################### + # These are patterns to identify common markup errors, to make the + # error messages more informative. + ###################################################################### + MISSING_ATTRIBUTE_QUOTES = /^<#{NAME_STR}\s+#{NAME_STR}\s*=\s*[^"']/um + + def initialize( source ) + self.stream = source + end + + def add_listener( listener ) + if !defined?(@listeners) or !@listeners + @listeners = [] + instance_eval <<-EOL + alias :_old_pull :pull + def pull + event = _old_pull + @listeners.each do |listener| + listener.receive event + end + event + end + EOL + end + @listeners << listener + end + + attr_reader :source + + def stream=( source ) + @source = SourceFactory.create_from( source ) + @closed = nil + @document_status = nil + @tags = [] + @stack = [] + @entities = [] + @nsstack = [] + end + + def position + if @source.respond_to? :position + @source.position + else + # FIXME + 0 + end + end + + # Returns true if there are no more events + def empty? + return (@source.empty? and @stack.empty?) + end + + # Returns true if there are more events. Synonymous with !empty? + def has_next? + return !(@source.empty? and @stack.empty?) + end + + # Push an event back on the head of the stream. This method + # has (theoretically) infinite depth. + def unshift token + @stack.unshift(token) + end + + # Peek at the +depth+ event in the stack. The first element on the stack + # is at depth 0. If +depth+ is -1, will parse to the end of the input + # stream and return the last event, which is always :end_document. + # Be aware that this causes the stream to be parsed up to the +depth+ + # event, so you can effectively pre-parse the entire document (pull the + # entire thing into memory) using this method. + def peek depth=0 + raise %Q[Illegal argument "#{depth}"] if depth < -1 + temp = [] + if depth == -1 + temp.push(pull()) until empty? + else + while @stack.size+temp.size < depth+1 + temp.push(pull()) + end + end + @stack += temp if temp.size > 0 + @stack[depth] + end + + # Returns the next event. This is a +PullEvent+ object. + def pull + if @closed + x, @closed = @closed, nil + return [ :end_element, x ] + end + return [ :end_document ] if empty? + return @stack.shift if @stack.size > 0 + #STDERR.puts @source.encoding + @source.read if @source.buffer.size<2 + #STDERR.puts "BUFFER = #{@source.buffer.inspect}" + if @document_status == nil + #@source.consume( /^\s*/um ) + word = @source.match( /^((?:\s+)|(?:<[^>]*>))/um ) + word = word[1] unless word.nil? + #STDERR.puts "WORD = #{word.inspect}" + case word + when COMMENT_START + return [ :comment, @source.match( COMMENT_PATTERN, true )[1] ] + when XMLDECL_START + #STDERR.puts "XMLDECL" + results = @source.match( XMLDECL_PATTERN, true )[1] + version = VERSION.match( results ) + version = version[1] unless version.nil? + encoding = ENCODING.match(results) + encoding = encoding[1] unless encoding.nil? + @source.encoding = encoding + standalone = STANDALONE.match(results) + standalone = standalone[1] unless standalone.nil? + return [ :xmldecl, version, encoding, standalone ] + when INSTRUCTION_START + return [ :processing_instruction, *@source.match(INSTRUCTION_PATTERN, true)[1,2] ] + when DOCTYPE_START + md = @source.match( DOCTYPE_PATTERN, true ) + @nsstack.unshift(curr_ns=Set.new) + identity = md[1] + close = md[2] + identity =~ IDENTITY + name = $1 + raise REXML::ParseException.new("DOCTYPE is missing a name") if name.nil? + pub_sys = $2.nil? ? nil : $2.strip + long_name = $4.nil? ? nil : $4.strip + uri = $6.nil? ? nil : $6.strip + args = [ :start_doctype, name, pub_sys, long_name, uri ] + if close == ">" + @document_status = :after_doctype + @source.read if @source.buffer.size<2 + md = @source.match(/^\s*/um, true) + @stack << [ :end_doctype ] + else + @document_status = :in_doctype + end + return args + when /^\s+/ + else + @document_status = :after_doctype + @source.read if @source.buffer.size<2 + md = @source.match(/\s*/um, true) + if @source.encoding == "UTF-8" + if @source.buffer.respond_to? :force_encoding + @source.buffer.force_encoding(Encoding::UTF_8) + end + end + end + end + if @document_status == :in_doctype + md = @source.match(/\s*(.*?>)/um) + case md[1] + when SYSTEMENTITY + match = @source.match( SYSTEMENTITY, true )[1] + return [ :externalentity, match ] + + when ELEMENTDECL_START + return [ :elementdecl, @source.match( ELEMENTDECL_PATTERN, true )[1] ] + + when ENTITY_START + match = @source.match( ENTITYDECL, true ).to_a.compact + match[0] = :entitydecl + ref = false + if match[1] == '%' + ref = true + match.delete_at 1 + end + # Now we have to sort out what kind of entity reference this is + if match[2] == 'SYSTEM' + # External reference + match[3] = match[3][1..-2] # PUBID + match.delete_at(4) if match.size > 4 # Chop out NDATA decl + # match is [ :entity, name, SYSTEM, pubid(, ndata)? ] + elsif match[2] == 'PUBLIC' + # External reference + match[3] = match[3][1..-2] # PUBID + match[4] = match[4][1..-2] # HREF + # match is [ :entity, name, PUBLIC, pubid, href ] + else + match[2] = match[2][1..-2] + match.pop if match.size == 4 + # match is [ :entity, name, value ] + end + match << '%' if ref + return match + when ATTLISTDECL_START + md = @source.match( ATTLISTDECL_PATTERN, true ) + raise REXML::ParseException.new( "Bad ATTLIST declaration!", @source ) if md.nil? + element = md[1] + contents = md[0] + + pairs = {} + values = md[0].scan( ATTDEF_RE ) + values.each do |attdef| + unless attdef[3] == "#IMPLIED" + attdef.compact! + val = attdef[3] + val = attdef[4] if val == "#FIXED " + pairs[attdef[0]] = val + if attdef[0] =~ /^xmlns:(.*)/ + @nsstack[0] << $1 + end + end + end + return [ :attlistdecl, element, pairs, contents ] + when NOTATIONDECL_START + md = nil + if @source.match( PUBLIC ) + md = @source.match( PUBLIC, true ) + vals = [md[1],md[2],md[4],md[6]] + elsif @source.match( SYSTEM ) + md = @source.match( SYSTEM, true ) + vals = [md[1],md[2],nil,md[4]] + else + raise REXML::ParseException.new( "error parsing notation: no matching pattern", @source ) + end + return [ :notationdecl, *vals ] + when CDATA_END + @document_status = :after_doctype + @source.match( CDATA_END, true ) + return [ :end_doctype ] + end + end + begin + if @source.buffer[0] == ?< + if @source.buffer[1] == ?/ + @nsstack.shift + last_tag = @tags.pop + #md = @source.match_to_consume( '>', CLOSE_MATCH) + md = @source.match( CLOSE_MATCH, true ) + raise REXML::ParseException.new( "Missing end tag for "+ + "'#{last_tag}' (got \"#{md[1]}\")", + @source) unless last_tag == md[1] + return [ :end_element, last_tag ] + elsif @source.buffer[1] == ?! + md = @source.match(/\A(\s*[^>]*>)/um) + #STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}" + raise REXML::ParseException.new("Malformed node", @source) unless md + if md[0][2] == ?- + md = @source.match( COMMENT_PATTERN, true ) + + case md[1] + when /--/, /-$/ + raise REXML::ParseException.new("Malformed comment", @source) + end + + return [ :comment, md[1] ] if md + else + md = @source.match( CDATA_PATTERN, true ) + return [ :cdata, md[1] ] if md + end + raise REXML::ParseException.new( "Declarations can only occur "+ + "in the doctype declaration.", @source) + elsif @source.buffer[1] == ?? + md = @source.match( INSTRUCTION_PATTERN, true ) + return [ :processing_instruction, md[1], md[2] ] if md + raise REXML::ParseException.new( "Bad instruction declaration", + @source) + else + # Get the next tag + md = @source.match(TAG_MATCH, true) + unless md + # Check for missing attribute quotes + raise REXML::ParseException.new("missing attribute quote", @source) if @source.match(MISSING_ATTRIBUTE_QUOTES ) + raise REXML::ParseException.new("malformed XML: missing tag start", @source) + end + attributes = {} + prefixes = Set.new + prefixes << md[2] if md[2] + @nsstack.unshift(curr_ns=Set.new) + if md[4].size > 0 + attrs = md[4].scan( ATTRIBUTE_PATTERN ) + raise REXML::ParseException.new( "error parsing attributes: [#{attrs.join ', '}], excess = \"#$'\"", @source) if $' and $'.strip.size > 0 + attrs.each { |a,b,c,d,e| + if b == "xmlns" + if c == "xml" + if d != "http://www.w3.org/XML/1998/namespace" + msg = "The 'xml' prefix must not be bound to any other namespace "+ + "(http://www.w3.org/TR/REC-xml-names/#ns-decl)" + raise REXML::ParseException.new( msg, @source, self ) + end + elsif c == "xmlns" + msg = "The 'xmlns' prefix must not be declared "+ + "(http://www.w3.org/TR/REC-xml-names/#ns-decl)" + raise REXML::ParseException.new( msg, @source, self) + end + curr_ns << c + elsif b + prefixes << b unless b == "xml" + end + + if attributes.has_key? a + msg = "Duplicate attribute #{a.inspect}" + raise REXML::ParseException.new( msg, @source, self) + end + + attributes[a] = e + } + end + + # Verify that all of the prefixes have been defined + for prefix in prefixes + unless @nsstack.find{|k| k.member?(prefix)} + raise UndefinedNamespaceException.new(prefix,@source,self) + end + end + + if md[6] + @closed = md[1] + @nsstack.shift + else + @tags.push( md[1] ) + end + return [ :start_element, md[1], attributes ] + end + else + md = @source.match( TEXT_PATTERN, true ) + if md[0].length == 0 + @source.match( /(\s+)/, true ) + end + #STDERR.puts "GOT #{md[1].inspect}" unless md[0].length == 0 + #return [ :text, "" ] if md[0].length == 0 + # unnormalized = Text::unnormalize( md[1], self ) + # return PullEvent.new( :text, md[1], unnormalized ) + return [ :text, md[1] ] + end + rescue REXML::UndefinedNamespaceException + raise + rescue REXML::ParseException + raise + rescue Exception, NameError => error + raise REXML::ParseException.new( "Exception parsing", + @source, self, (error ? error : $!) ) + end + return [ :dummy ] + end + + def entity( reference, entities ) + value = nil + value = entities[ reference ] if entities + if not value + value = DEFAULT_ENTITIES[ reference ] + value = value[2] if value + end + unnormalize( value, entities ) if value + end + + # Escapes all possible entities + def normalize( input, entities=nil, entity_filter=nil ) + copy = input.clone + # Doing it like this rather than in a loop improves the speed + copy.gsub!( EREFERENCE, '&' ) + entities.each do |key, value| + copy.gsub!( value, "&#{key};" ) unless entity_filter and + entity_filter.include?(entity) + end if entities + copy.gsub!( EREFERENCE, '&' ) + DEFAULT_ENTITIES.each do |key, value| + copy.gsub!( value[3], value[1] ) + end + copy + end + + # Unescapes all possible entities + def unnormalize( string, entities=nil, filter=nil ) + rv = string.clone + rv.gsub!( /\r\n?/, "\n" ) + matches = rv.scan( REFERENCE_RE ) + return rv if matches.size == 0 + rv.gsub!( /�*((?:\d+)|(?:x[a-fA-F0-9]+));/ ) { + m=$1 + m = "0#{m}" if m[0] == ?x + [Integer(m)].pack('U*') + } + matches.collect!{|x|x[0]}.compact! + if matches.size > 0 + matches.each do |entity_reference| + unless filter and filter.include?(entity_reference) + entity_value = entity( entity_reference, entities ) + if entity_value + re = /&#{entity_reference};/ + rv.gsub!( re, entity_value ) + else + er = DEFAULT_ENTITIES[entity_reference] + rv.gsub!( er[0], er[2] ) if er + end + end + end + rv.gsub!( /&/, '&' ) + end + rv + end + end + end +end + +=begin + case event[0] + when :start_element + when :text + when :end_element + when :processing_instruction + when :cdata + when :comment + when :xmldecl + when :start_doctype + when :end_doctype + when :externalentity + when :elementdecl + when :entity + when :attlistdecl + when :notationdecl + when :end_doctype + end +=end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/lightparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/lightparser.rb new file mode 100644 index 0000000..ca9692c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/lightparser.rb @@ -0,0 +1,58 @@ +require 'rexml/parsers/streamparser' +require 'rexml/parsers/baseparser' +require 'rexml/light/node' + +module REXML + module Parsers + class LightParser + def initialize stream + @stream = stream + @parser = REXML::Parsers::BaseParser.new( stream ) + end + + def add_listener( listener ) + @parser.add_listener( listener ) + end + + def rewind + @stream.rewind + @parser.stream = @stream + end + + def parse + root = context = [ :document ] + while true + event = @parser.pull + case event[0] + when :end_document + break + when :start_element, :start_doctype + new_node = event + context << new_node + new_node[1,0] = [context] + context = new_node + when :end_element, :end_doctype + context = context[1] + else + new_node = event + context << new_node + new_node[1,0] = [context] + end + end + root + end + end + + # An element is an array. The array contains: + # 0 The parent element + # 1 The tag name + # 2 A hash of attributes + # 3..-1 The child elements + # An element is an array of size > 3 + # Text is a String + # PIs are [ :processing_instruction, target, data ] + # Comments are [ :comment, data ] + # DocTypes are DocType structs + # The root is an array with XMLDecls, Text, DocType, Array, Text + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/pullparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/pullparser.rb new file mode 100644 index 0000000..36dc716 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/pullparser.rb @@ -0,0 +1,196 @@ +require 'forwardable' + +require 'rexml/parseexception' +require 'rexml/parsers/baseparser' +require 'rexml/xmltokens' + +module REXML + module Parsers + # = Using the Pull Parser + # This API is experimental, and subject to change. + # parser = PullParser.new( "texttxet" ) + # while parser.has_next? + # res = parser.next + # puts res[1]['att'] if res.start_tag? and res[0] == 'b' + # end + # See the PullEvent class for information on the content of the results. + # The data is identical to the arguments passed for the various events to + # the StreamListener API. + # + # Notice that: + # parser = PullParser.new( "BAD DOCUMENT" ) + # while parser.has_next? + # res = parser.next + # raise res[1] if res.error? + # end + # + # Nat Price gave me some good ideas for the API. + class PullParser + include XMLTokens + extend Forwardable + + def_delegators( :@parser, :has_next? ) + def_delegators( :@parser, :entity ) + def_delegators( :@parser, :empty? ) + def_delegators( :@parser, :source ) + + def initialize stream + @entities = {} + @listeners = nil + @parser = BaseParser.new( stream ) + @my_stack = [] + end + + def add_listener( listener ) + @listeners = [] unless @listeners + @listeners << listener + end + + def each + while has_next? + yield self.pull + end + end + + def peek depth=0 + if @my_stack.length <= depth + (depth - @my_stack.length + 1).times { + e = PullEvent.new(@parser.pull) + @my_stack.push(e) + } + end + @my_stack[depth] + end + + def pull + return @my_stack.shift if @my_stack.length > 0 + + event = @parser.pull + case event[0] + when :entitydecl + @entities[ event[1] ] = + event[2] unless event[2] =~ /PUBLIC|SYSTEM/ + when :text + unnormalized = @parser.unnormalize( event[1], @entities ) + event << unnormalized + end + PullEvent.new( event ) + end + + def unshift token + @my_stack.unshift token + end + end + + # A parsing event. The contents of the event are accessed as an +Array?, + # and the type is given either by the ...? methods, or by accessing the + # +type+ accessor. The contents of this object vary from event to event, + # but are identical to the arguments passed to +StreamListener+s for each + # event. + class PullEvent + # The type of this event. Will be one of :tag_start, :tag_end, :text, + # :processing_instruction, :comment, :doctype, :attlistdecl, :entitydecl, + # :notationdecl, :entity, :cdata, :xmldecl, or :error. + def initialize(arg) + @contents = arg + end + + def []( start, endd=nil) + if start.kind_of? Range + @contents.slice( start.begin+1 .. start.end ) + elsif start.kind_of? Numeric + if endd.nil? + @contents.slice( start+1 ) + else + @contents.slice( start+1, endd ) + end + else + raise "Illegal argument #{start.inspect} (#{start.class})" + end + end + + def event_type + @contents[0] + end + + # Content: [ String tag_name, Hash attributes ] + def start_element? + @contents[0] == :start_element + end + + # Content: [ String tag_name ] + def end_element? + @contents[0] == :end_element + end + + # Content: [ String raw_text, String unnormalized_text ] + def text? + @contents[0] == :text + end + + # Content: [ String text ] + def instruction? + @contents[0] == :processing_instruction + end + + # Content: [ String text ] + def comment? + @contents[0] == :comment + end + + # Content: [ String name, String pub_sys, String long_name, String uri ] + def doctype? + @contents[0] == :start_doctype + end + + # Content: [ String text ] + def attlistdecl? + @contents[0] == :attlistdecl + end + + # Content: [ String text ] + def elementdecl? + @contents[0] == :elementdecl + end + + # Due to the wonders of DTDs, an entity declaration can be just about + # anything. There's no way to normalize it; you'll have to interpret the + # content yourself. However, the following is true: + # + # * If the entity declaration is an internal entity: + # [ String name, String value ] + # Content: [ String text ] + def entitydecl? + @contents[0] == :entitydecl + end + + # Content: [ String text ] + def notationdecl? + @contents[0] == :notationdecl + end + + # Content: [ String text ] + def entity? + @contents[0] == :entity + end + + # Content: [ String text ] + def cdata? + @contents[0] == :cdata + end + + # Content: [ String version, String encoding, String standalone ] + def xmldecl? + @contents[0] == :xmldecl + end + + def error? + @contents[0] == :error + end + + def inspect + @contents[0].to_s + ": " + @contents[1..-1].inspect + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/sax2parser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/sax2parser.rb new file mode 100644 index 0000000..7213140 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/sax2parser.rb @@ -0,0 +1,247 @@ +require 'rexml/parsers/baseparser' +require 'rexml/parseexception' +require 'rexml/namespace' +require 'rexml/text' + +module REXML + module Parsers + # SAX2Parser + class SAX2Parser + def initialize source + @parser = BaseParser.new(source) + @listeners = [] + @procs = [] + @namespace_stack = [] + @has_listeners = false + @tag_stack = [] + @entities = {} + end + + def source + @parser.source + end + + def add_listener( listener ) + @parser.add_listener( listener ) + end + + # Listen arguments: + # + # Symbol, Array, Block + # Listen to Symbol events on Array elements + # Symbol, Block + # Listen to Symbol events + # Array, Listener + # Listen to all events on Array elements + # Array, Block + # Listen to :start_element events on Array elements + # Listener + # Listen to All events + # + # Symbol can be one of: :start_element, :end_element, + # :start_prefix_mapping, :end_prefix_mapping, :characters, + # :processing_instruction, :doctype, :attlistdecl, :elementdecl, + # :entitydecl, :notationdecl, :cdata, :xmldecl, :comment + # + # There is an additional symbol that can be listened for: :progress. + # This will be called for every event generated, passing in the current + # stream position. + # + # Array contains regular expressions or strings which will be matched + # against fully qualified element names. + # + # Listener must implement the methods in SAX2Listener + # + # Block will be passed the same arguments as a SAX2Listener method would + # be, where the method name is the same as the matched Symbol. + # See the SAX2Listener for more information. + def listen( *args, &blok ) + if args[0].kind_of? Symbol + if args.size == 2 + args[1].each { |match| @procs << [args[0], match, blok] } + else + add( [args[0], nil, blok] ) + end + elsif args[0].kind_of? Array + if args.size == 2 + args[0].each { |match| add( [nil, match, args[1]] ) } + else + args[0].each { |match| add( [ :start_element, match, blok ] ) } + end + else + add([nil, nil, args[0]]) + end + end + + def deafen( listener=nil, &blok ) + if listener + @listeners.delete_if {|item| item[-1] == listener } + @has_listeners = false if @listeners.size == 0 + else + @procs.delete_if {|item| item[-1] == blok } + end + end + + def parse + @procs.each { |sym,match,block| block.call if sym == :start_document } + @listeners.each { |sym,match,block| + block.start_document if sym == :start_document or sym.nil? + } + root = context = [] + while true + event = @parser.pull + case event[0] + when :end_document + handle( :end_document ) + break + when :start_doctype + handle( :doctype, *event[1..-1]) + when :end_doctype + context = context[1] + when :start_element + @tag_stack.push(event[1]) + # find the observers for namespaces + procs = get_procs( :start_prefix_mapping, event[1] ) + listeners = get_listeners( :start_prefix_mapping, event[1] ) + if procs or listeners + # break out the namespace declarations + # The attributes live in event[2] + event[2].each {|n, v| event[2][n] = @parser.normalize(v)} + nsdecl = event[2].find_all { |n, value| n =~ /^xmlns(:|$)/ } + nsdecl.collect! { |n, value| [ n[6..-1], value ] } + @namespace_stack.push({}) + nsdecl.each do |n,v| + @namespace_stack[-1][n] = v + # notify observers of namespaces + procs.each { |ob| ob.call( n, v ) } if procs + listeners.each { |ob| ob.start_prefix_mapping(n, v) } if listeners + end + end + event[1] =~ Namespace::NAMESPLIT + prefix = $1 + local = $2 + uri = get_namespace(prefix) + # find the observers for start_element + procs = get_procs( :start_element, event[1] ) + listeners = get_listeners( :start_element, event[1] ) + # notify observers + procs.each { |ob| ob.call( uri, local, event[1], event[2] ) } if procs + listeners.each { |ob| + ob.start_element( uri, local, event[1], event[2] ) + } if listeners + when :end_element + @tag_stack.pop + event[1] =~ Namespace::NAMESPLIT + prefix = $1 + local = $2 + uri = get_namespace(prefix) + # find the observers for start_element + procs = get_procs( :end_element, event[1] ) + listeners = get_listeners( :end_element, event[1] ) + # notify observers + procs.each { |ob| ob.call( uri, local, event[1] ) } if procs + listeners.each { |ob| + ob.end_element( uri, local, event[1] ) + } if listeners + + namespace_mapping = @namespace_stack.pop + # find the observers for namespaces + procs = get_procs( :end_prefix_mapping, event[1] ) + listeners = get_listeners( :end_prefix_mapping, event[1] ) + if procs or listeners + namespace_mapping.each do |ns_prefix, ns_uri| + # notify observers of namespaces + procs.each { |ob| ob.call( ns_prefix ) } if procs + listeners.each { |ob| ob.end_prefix_mapping(ns_prefix) } if listeners + end + end + when :text + #normalized = @parser.normalize( event[1] ) + #handle( :characters, normalized ) + copy = event[1].clone + + esub = proc { |match| + if @entities.has_key?($1) + @entities[$1].gsub(Text::REFERENCE, &esub) + else + match + end + } + + copy.gsub!( Text::REFERENCE, &esub ) + copy.gsub!( Text::NUMERICENTITY ) {|m| + m=$1 + m = "0#{m}" if m[0] == ?x + [Integer(m)].pack('U*') + } + handle( :characters, copy ) + when :entitydecl + @entities[ event[1] ] = event[2] if event.size == 3 + handle( *event ) + when :processing_instruction, :comment, :attlistdecl, + :elementdecl, :cdata, :notationdecl, :xmldecl + handle( *event ) + end + handle( :progress, @parser.position ) + end + end + + private + def handle( symbol, *arguments ) + tag = @tag_stack[-1] + procs = get_procs( symbol, tag ) + listeners = get_listeners( symbol, tag ) + # notify observers + procs.each { |ob| ob.call( *arguments ) } if procs + listeners.each { |l| + l.send( symbol.to_s, *arguments ) + } if listeners + end + + # The following methods are duplicates, but it is faster than using + # a helper + def get_procs( symbol, name ) + return nil if @procs.size == 0 + @procs.find_all do |sym, match, block| + #puts sym.inspect+"=="+symbol.inspect+ "\t"+match.inspect+"=="+name.inspect+ "\t"+( (sym.nil? or symbol == sym) and ((name.nil? and match.nil?) or match.nil? or ( (name == match) or (match.kind_of? Regexp and name =~ match)))).to_s + ( + (sym.nil? or symbol == sym) and + ((name.nil? and match.nil?) or match.nil? or ( + (name == match) or + (match.kind_of? Regexp and name =~ match) + ) + ) + ) + end.collect{|x| x[-1]} + end + def get_listeners( symbol, name ) + return nil if @listeners.size == 0 + @listeners.find_all do |sym, match, block| + ( + (sym.nil? or symbol == sym) and + ((name.nil? and match.nil?) or match.nil? or ( + (name == match) or + (match.kind_of? Regexp and name =~ match) + ) + ) + ) + end.collect{|x| x[-1]} + end + + def add( pair ) + if pair[-1].respond_to? :call + @procs << pair unless @procs.include? pair + else + @listeners << pair unless @listeners.include? pair + @has_listeners = true + end + end + + def get_namespace( prefix ) + uris = (@namespace_stack.find_all { |ns| not ns[prefix].nil? }) || + (@namespace_stack.find { |ns| not ns[nil].nil? }) + uris[-1][prefix] unless uris.nil? or 0 == uris.size + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/streamparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/streamparser.rb new file mode 100644 index 0000000..256d0f6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/streamparser.rb @@ -0,0 +1,46 @@ +module REXML + module Parsers + class StreamParser + def initialize source, listener + @listener = listener + @parser = BaseParser.new( source ) + end + + def add_listener( listener ) + @parser.add_listener( listener ) + end + + def parse + # entity string + while true + event = @parser.pull + case event[0] + when :end_document + return + when :start_element + attrs = event[2].each do |n, v| + event[2][n] = @parser.unnormalize( v ) + end + @listener.tag_start( event[1], attrs ) + when :end_element + @listener.tag_end( event[1] ) + when :text + normalized = @parser.unnormalize( event[1] ) + @listener.text( normalized ) + when :processing_instruction + @listener.instruction( *event[1,2] ) + when :start_doctype + @listener.doctype( *event[1..-1] ) + when :end_doctype + # FIXME: remove this condition for milestone:3.2 + @listener.doctype_end if @listener.respond_to? :doctype_end + when :comment, :attlistdecl, :cdata, :xmldecl, :elementdecl + @listener.send( event[0].to_s, *event[1..-1] ) + when :entitydecl, :notationdecl + @listener.send( event[0].to_s, event[1..-1] ) + end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/treeparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/treeparser.rb new file mode 100644 index 0000000..30327d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/treeparser.rb @@ -0,0 +1,100 @@ +require 'rexml/validation/validationexception' +require 'rexml/undefinednamespaceexception' + +module REXML + module Parsers + class TreeParser + def initialize( source, build_context = Document.new ) + @build_context = build_context + @parser = Parsers::BaseParser.new( source ) + end + + def add_listener( listener ) + @parser.add_listener( listener ) + end + + def parse + tag_stack = [] + in_doctype = false + entities = nil + begin + while true + event = @parser.pull + #STDERR.puts "TREEPARSER GOT #{event.inspect}" + case event[0] + when :end_document + unless tag_stack.empty? + #raise ParseException.new("No close tag for #{tag_stack.inspect}") + raise ParseException.new("No close tag for #{@build_context.xpath}") + end + return + when :start_element + tag_stack.push(event[1]) + el = @build_context = @build_context.add_element( event[1] ) + event[2].each do |key, value| + el.attributes[key]=Attribute.new(key,value,self) + end + when :end_element + tag_stack.pop + @build_context = @build_context.parent + when :text + if not in_doctype + if @build_context[-1].instance_of? Text + @build_context[-1] << event[1] + else + @build_context.add( + Text.new(event[1], @build_context.whitespace, nil, true) + ) unless ( + @build_context.ignore_whitespace_nodes and + event[1].strip.size==0 + ) + end + end + when :comment + c = Comment.new( event[1] ) + @build_context.add( c ) + when :cdata + c = CData.new( event[1] ) + @build_context.add( c ) + when :processing_instruction + @build_context.add( Instruction.new( event[1], event[2] ) ) + when :end_doctype + in_doctype = false + entities.each { |k,v| entities[k] = @build_context.entities[k].value } + @build_context = @build_context.parent + when :start_doctype + doctype = DocType.new( event[1..-1], @build_context ) + @build_context = doctype + entities = {} + in_doctype = true + when :attlistdecl + n = AttlistDecl.new( event[1..-1] ) + @build_context.add( n ) + when :externalentity + n = ExternalEntity.new( event[1] ) + @build_context.add( n ) + when :elementdecl + n = ElementDecl.new( event[1] ) + @build_context.add(n) + when :entitydecl + entities[ event[1] ] = event[2] unless event[2] =~ /PUBLIC|SYSTEM/ + @build_context.add(Entity.new(event)) + when :notationdecl + n = NotationDecl.new( *event[1..-1] ) + @build_context.add( n ) + when :xmldecl + x = XMLDecl.new( event[1], event[2], event[3] ) + @build_context.add( x ) + end + end + rescue REXML::Validation::ValidationException + raise + rescue REXML::UndefinedNamespaceException + raise + rescue + raise ParseException.new( $!.message, @parser.source, @parser, $! ) + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/ultralightparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/ultralightparser.rb new file mode 100644 index 0000000..96c55d8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/ultralightparser.rb @@ -0,0 +1,56 @@ +require 'rexml/parsers/streamparser' +require 'rexml/parsers/baseparser' + +module REXML + module Parsers + class UltraLightParser + def initialize stream + @stream = stream + @parser = REXML::Parsers::BaseParser.new( stream ) + end + + def add_listener( listener ) + @parser.add_listener( listener ) + end + + def rewind + @stream.rewind + @parser.stream = @stream + end + + def parse + root = context = [] + while true + event = @parser.pull + case event[0] + when :end_document + break + when :end_doctype + context = context[1] + when :start_element, :doctype + context << event + event[1,0] = [context] + context = event + when :end_element + context = context[1] + else + context << event + end + end + root + end + end + + # An element is an array. The array contains: + # 0 The parent element + # 1 The tag name + # 2 A hash of attributes + # 3..-1 The child elements + # An element is an array of size > 3 + # Text is a String + # PIs are [ :processing_instruction, target, data ] + # Comments are [ :comment, data ] + # DocTypes are DocType structs + # The root is an array with XMLDecls, Text, DocType, Array, Text + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/parsers/xpathparser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/xpathparser.rb new file mode 100644 index 0000000..49450b4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/parsers/xpathparser.rb @@ -0,0 +1,698 @@ +require 'rexml/namespace' +require 'rexml/xmltokens' + +module REXML + module Parsers + # You don't want to use this class. Really. Use XPath, which is a wrapper + # for this class. Believe me. You don't want to poke around in here. + # There is strange, dark magic at work in this code. Beware. Go back! Go + # back while you still can! + class XPathParser + include XMLTokens + LITERAL = /^'([^']*)'|^"([^"]*)"/u + + def namespaces=( namespaces ) + Functions::namespace_context = namespaces + @namespaces = namespaces + end + + def parse path + path.gsub!(/([\(\[])\s+/, '\1') # Strip ignorable spaces + path.gsub!( /\s+([\]\)])/, '\1' ) + parsed = [] + path = OrExpr(path, parsed) + parsed + end + + def predicate path + parsed = [] + Predicate( "[#{path}]", parsed ) + parsed + end + + def abbreviate( path ) + path = path.kind_of?(String) ? parse( path ) : path + string = "" + document = false + while path.size > 0 + op = path.shift + case op + when :node + when :attribute + string << "/" if string.size > 0 + string << "@" + when :child + string << "/" if string.size > 0 + when :descendant_or_self + string << "/" + when :self + string << "." + when :parent + string << ".." + when :any + string << "*" + when :text + string << "text()" + when :following, :following_sibling, + :ancestor, :ancestor_or_self, :descendant, + :namespace, :preceding, :preceding_sibling + string << "/" unless string.size == 0 + string << op.to_s.tr("_", "-") + string << "::" + when :qname + prefix = path.shift + name = path.shift + string << prefix+":" if prefix.size > 0 + string << name + when :predicate + string << '[' + string << predicate_to_string( path.shift ) {|x| abbreviate( x ) } + string << ']' + when :document + document = true + when :function + string << path.shift + string << "( " + string << predicate_to_string( path.shift[0] ) {|x| abbreviate( x )} + string << " )" + when :literal + string << %Q{ "#{path.shift}" } + else + string << "/" unless string.size == 0 + string << "UNKNOWN(" + string << op.inspect + string << ")" + end + end + string = "/"+string if document + return string + end + + def expand( path ) + path = path.kind_of?(String) ? parse( path ) : path + string = "" + document = false + while path.size > 0 + op = path.shift + case op + when :node + string << "node()" + when :attribute, :child, :following, :following_sibling, + :ancestor, :ancestor_or_self, :descendant, :descendant_or_self, + :namespace, :preceding, :preceding_sibling, :self, :parent + string << "/" unless string.size == 0 + string << op.to_s.tr("_", "-") + string << "::" + when :any + string << "*" + when :qname + prefix = path.shift + name = path.shift + string << prefix+":" if prefix.size > 0 + string << name + when :predicate + string << '[' + string << predicate_to_string( path.shift ) { |x| expand(x) } + string << ']' + when :document + document = true + else + string << "/" unless string.size == 0 + string << "UNKNOWN(" + string << op.inspect + string << ")" + end + end + string = "/"+string if document + return string + end + + def predicate_to_string( path, &block ) + string = "" + case path[0] + when :and, :or, :mult, :plus, :minus, :neq, :eq, :lt, :gt, :lteq, :gteq, :div, :mod, :union + op = path.shift + case op + when :eq + op = "=" + when :lt + op = "<" + when :gt + op = ">" + when :lteq + op = "<=" + when :gteq + op = ">=" + when :neq + op = "!=" + when :union + op = "|" + end + left = predicate_to_string( path.shift, &block ) + right = predicate_to_string( path.shift, &block ) + string << " " + string << left + string << " " + string << op.to_s + string << " " + string << right + string << " " + when :function + path.shift + name = path.shift + string << name + string << "( " + string << predicate_to_string( path.shift, &block ) + string << " )" + when :literal + path.shift + string << " " + string << path.shift.inspect + string << " " + else + string << " " + string << yield( path ) + string << " " + end + return string.squeeze(" ") + end + + private + #LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath + def LocationPath path, parsed + #puts "LocationPath '#{path}'" + path = path.strip + if path[0] == ?/ + parsed << :document + if path[1] == ?/ + parsed << :descendant_or_self + parsed << :node + path = path[2..-1] + else + path = path[1..-1] + end + end + #puts parsed.inspect + return RelativeLocationPath( path, parsed ) if path.size > 0 + end + + #RelativeLocationPath + # | Step + # | (AXIS_NAME '::' | '@' | '') AxisSpecifier + # NodeTest + # Predicate + # | '.' | '..' AbbreviatedStep + # | RelativeLocationPath '/' Step + # | RelativeLocationPath '//' Step + AXIS = /^(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::/ + def RelativeLocationPath path, parsed + #puts "RelativeLocationPath #{path}" + while path.size > 0 + # (axis or @ or ) nodetest predicate > + # OR > / Step + # (. or ..) > + if path[0] == ?. + if path[1] == ?. + parsed << :parent + parsed << :node + path = path[2..-1] + else + parsed << :self + parsed << :node + path = path[1..-1] + end + else + if path[0] == ?@ + #puts "ATTRIBUTE" + parsed << :attribute + path = path[1..-1] + # Goto Nodetest + elsif path =~ AXIS + parsed << $1.tr('-','_').intern + path = $' + # Goto Nodetest + else + parsed << :child + end + + #puts "NODETESTING '#{path}'" + n = [] + path = NodeTest( path, n) + #puts "NODETEST RETURNED '#{path}'" + + if path[0] == ?[ + path = Predicate( path, n ) + end + + parsed.concat(n) + end + + if path.size > 0 + if path[0] == ?/ + if path[1] == ?/ + parsed << :descendant_or_self + parsed << :node + path = path[2..-1] + else + path = path[1..-1] + end + else + return path + end + end + end + return path + end + + # Returns a 1-1 map of the nodeset + # The contents of the resulting array are either: + # true/false, if a positive match + # String, if a name match + #NodeTest + # | ('*' | NCNAME ':' '*' | QNAME) NameTest + # | NODE_TYPE '(' ')' NodeType + # | PI '(' LITERAL ')' PI + # | '[' expr ']' Predicate + NCNAMETEST= /^(#{NCNAME_STR}):\*/u + QNAME = Namespace::NAMESPLIT + NODE_TYPE = /^(comment|text|node)\(\s*\)/m + PI = /^processing-instruction\(/ + def NodeTest path, parsed + #puts "NodeTest with #{path}" + res = nil + case path + when /^\*/ + path = $' + parsed << :any + when NODE_TYPE + type = $1 + path = $' + parsed << type.tr('-', '_').intern + when PI + path = $' + literal = nil + if path !~ /^\s*\)/ + path =~ LITERAL + literal = $1 + path = $' + raise ParseException.new("Missing ')' after processing instruction") if path[0] != ?) + path = path[1..-1] + end + parsed << :processing_instruction + parsed << (literal || '') + when NCNAMETEST + #puts "NCNAMETEST" + prefix = $1 + path = $' + parsed << :namespace + parsed << prefix + when QNAME + #puts "QNAME" + prefix = $1 + name = $2 + path = $' + prefix = "" unless prefix + parsed << :qname + parsed << prefix + parsed << name + end + return path + end + + # Filters the supplied nodeset on the predicate(s) + def Predicate path, parsed + #puts "PREDICATE with #{path}" + return nil unless path[0] == ?[ + predicates = [] + while path[0] == ?[ + path, expr = get_group(path) + predicates << expr[1..-2] if expr + end + #puts "PREDICATES = #{predicates.inspect}" + predicates.each{ |pred| + #puts "ORING #{pred}" + preds = [] + parsed << :predicate + parsed << preds + OrExpr(pred, preds) + } + #puts "PREDICATES = #{predicates.inspect}" + path + end + + # The following return arrays of true/false, a 1-1 mapping of the + # supplied nodeset, except for axe(), which returns a filtered + # nodeset + + #| OrExpr S 'or' S AndExpr + #| AndExpr + def OrExpr path, parsed + #puts "OR >>> #{path}" + n = [] + rest = AndExpr( path, n ) + #puts "OR <<< #{rest}" + if rest != path + while rest =~ /^\s*( or )/ + n = [ :or, n, [] ] + rest = AndExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| AndExpr S 'and' S EqualityExpr + #| EqualityExpr + def AndExpr path, parsed + #puts "AND >>> #{path}" + n = [] + rest = EqualityExpr( path, n ) + #puts "AND <<< #{rest}" + if rest != path + while rest =~ /^\s*( and )/ + n = [ :and, n, [] ] + #puts "AND >>> #{rest}" + rest = EqualityExpr( $', n[-1] ) + #puts "AND <<< #{rest}" + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| EqualityExpr ('=' | '!=') RelationalExpr + #| RelationalExpr + def EqualityExpr path, parsed + #puts "EQUALITY >>> #{path}" + n = [] + rest = RelationalExpr( path, n ) + #puts "EQUALITY <<< #{rest}" + if rest != path + while rest =~ /^\s*(!?=)\s*/ + if $1[0] == ?! + n = [ :neq, n, [] ] + else + n = [ :eq, n, [] ] + end + rest = RelationalExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr + #| AdditiveExpr + def RelationalExpr path, parsed + #puts "RELATION >>> #{path}" + n = [] + rest = AdditiveExpr( path, n ) + #puts "RELATION <<< #{rest}" + if rest != path + while rest =~ /^\s*([<>]=?)\s*/ + if $1[0] == ?< + sym = "lt" + else + sym = "gt" + end + sym << "eq" if $1[-1] == ?= + n = [ sym.intern, n, [] ] + rest = AdditiveExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| AdditiveExpr ('+' | S '-') MultiplicativeExpr + #| MultiplicativeExpr + def AdditiveExpr path, parsed + #puts "ADDITIVE >>> #{path}" + n = [] + rest = MultiplicativeExpr( path, n ) + #puts "ADDITIVE <<< #{rest}" + if rest != path + while rest =~ /^\s*(\+| -)\s*/ + if $1[0] == ?+ + n = [ :plus, n, [] ] + else + n = [ :minus, n, [] ] + end + rest = MultiplicativeExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr + #| UnaryExpr + def MultiplicativeExpr path, parsed + #puts "MULT >>> #{path}" + n = [] + rest = UnaryExpr( path, n ) + #puts "MULT <<< #{rest}" + if rest != path + while rest =~ /^\s*(\*| div | mod )\s*/ + if $1[0] == ?* + n = [ :mult, n, [] ] + elsif $1.include?( "div" ) + n = [ :div, n, [] ] + else + n = [ :mod, n, [] ] + end + rest = UnaryExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace(n) + elsif n.size > 0 + parsed << n + end + rest + end + + #| '-' UnaryExpr + #| UnionExpr + def UnaryExpr path, parsed + path =~ /^(\-*)/ + path = $' + if $1 and (($1.size % 2) != 0) + mult = -1 + else + mult = 1 + end + parsed << :neg if mult < 0 + + #puts "UNARY >>> #{path}" + n = [] + path = UnionExpr( path, n ) + #puts "UNARY <<< #{path}" + parsed.concat( n ) + path + end + + #| UnionExpr '|' PathExpr + #| PathExpr + def UnionExpr path, parsed + #puts "UNION >>> #{path}" + n = [] + rest = PathExpr( path, n ) + #puts "UNION <<< #{rest}" + if rest != path + while rest =~ /^\s*(\|)\s*/ + n = [ :union, n, [] ] + rest = PathExpr( $', n[-1] ) + end + end + if parsed.size == 0 and n.size != 0 + parsed.replace( n ) + elsif n.size > 0 + parsed << n + end + rest + end + + #| LocationPath + #| FilterExpr ('/' | '//') RelativeLocationPath + def PathExpr path, parsed + path =~ /^\s*/ + path = $' + #puts "PATH >>> #{path}" + n = [] + rest = FilterExpr( path, n ) + #puts "PATH <<< '#{rest}'" + if rest != path + if rest and rest[0] == ?/ + return RelativeLocationPath(rest, n) + end + end + #puts "BEFORE WITH '#{rest}'" + rest = LocationPath(rest, n) if rest =~ /\A[\/\.\@\[\w_*]/ + parsed.concat(n) + return rest + end + + #| FilterExpr Predicate + #| PrimaryExpr + def FilterExpr path, parsed + #puts "FILTER >>> #{path}" + n = [] + path = PrimaryExpr( path, n ) + #puts "FILTER <<< #{path}" + path = Predicate(path, n) if path and path[0] == ?[ + #puts "FILTER <<< #{path}" + parsed.concat(n) + path + end + + #| VARIABLE_REFERENCE + #| '(' expr ')' + #| LITERAL + #| NUMBER + #| FunctionCall + VARIABLE_REFERENCE = /^\$(#{NAME_STR})/u + NUMBER = /^(\d*\.?\d+)/ + NT = /^comment|text|processing-instruction|node$/ + def PrimaryExpr path, parsed + arry = [] + case path + when VARIABLE_REFERENCE + varname = $1 + path = $' + parsed << :variable + parsed << varname + #arry << @variables[ varname ] + when /^(\w[-\w]*)(?:\()/ + #puts "PrimaryExpr :: Function >>> #$1 -- '#$''" + fname = $1 + tmp = $' + #puts "#{fname} =~ #{NT.inspect}" + return path if fname =~ NT + path = tmp + parsed << :function + parsed << fname + path = FunctionCall(path, parsed) + when NUMBER + #puts "LITERAL or NUMBER: #$1" + varname = $1.nil? ? $2 : $1 + path = $' + parsed << :literal + parsed << (varname.include?('.') ? varname.to_f : varname.to_i) + when LITERAL + #puts "LITERAL or NUMBER: #$1" + varname = $1.nil? ? $2 : $1 + path = $' + parsed << :literal + parsed << varname + when /^\(/ #/ + path, contents = get_group(path) + contents = contents[1..-2] + n = [] + OrExpr( contents, n ) + parsed.concat(n) + end + path + end + + #| FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' + def FunctionCall rest, parsed + path, arguments = parse_args(rest) + argset = [] + for argument in arguments + args = [] + OrExpr( argument, args ) + argset << args + end + parsed << argset + path + end + + # get_group( '[foo]bar' ) -> ['bar', '[foo]'] + def get_group string + ind = 0 + depth = 0 + st = string[0,1] + en = (st == "(" ? ")" : "]") + begin + case string[ind,1] + when st + depth += 1 + when en + depth -= 1 + end + ind += 1 + end while depth > 0 and ind < string.length + return nil unless depth==0 + [string[ind..-1], string[0..ind-1]] + end + + def parse_args( string ) + arguments = [] + ind = 0 + inquot = false + inapos = false + depth = 1 + begin + case string[ind] + when ?" + inquot = !inquot unless inapos + when ?' + inapos = !inapos unless inquot + else + unless inquot or inapos + case string[ind] + when ?( + depth += 1 + if depth == 1 + string = string[1..-1] + ind -= 1 + end + when ?) + depth -= 1 + if depth == 0 + s = string[0,ind].strip + arguments << s unless s == "" + string = string[ind+1..-1] + end + when ?, + if depth == 1 + s = string[0,ind].strip + arguments << s unless s == "" + string = string[ind+1..-1] + ind = -1 + end + end + end + end + ind += 1 + end while depth > 0 and ind < string.length + return nil unless depth==0 + [string,arguments] + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/quickpath.rb b/lib/ruby-1.9.1-rc1/lib/rexml/quickpath.rb new file mode 100644 index 0000000..fd2ebdd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/quickpath.rb @@ -0,0 +1,263 @@ +require 'rexml/functions' +require 'rexml/xmltokens' + +module REXML + class QuickPath + include Functions + include XMLTokens + + EMPTY_HASH = {} + + def QuickPath::first element, path, namespaces=EMPTY_HASH + match(element, path, namespaces)[0] + end + + def QuickPath::each element, path, namespaces=EMPTY_HASH, &block + path = "*" unless path + match(element, path, namespaces).each( &block ) + end + + def QuickPath::match element, path, namespaces=EMPTY_HASH + raise "nil is not a valid xpath" unless path + results = nil + Functions::namespace_context = namespaces + case path + when /^\/([^\/]|$)/u + # match on root + path = path[1..-1] + return [element.root.parent] if path == '' + results = filter([element.root], path) + when /^[-\w]*::/u + results = filter([element], path) + when /^\*/u + results = filter(element.to_a, path) + when /^[\[!\w:]/u + # match on child + matches = [] + children = element.to_a + results = filter(children, path) + else + results = filter([element], path) + end + return results + end + + # Given an array of nodes it filters the array based on the path. The + # result is that when this method returns, the array will contain elements + # which match the path + def QuickPath::filter elements, path + return elements if path.nil? or path == '' or elements.size == 0 + case path + when /^\/\//u # Descendant + return axe( elements, "descendant-or-self", $' ) + when /^\/?\b(\w[-\w]*)\b::/u # Axe + axe_name = $1 + rest = $' + return axe( elements, $1, $' ) + when /^\/(?=\b([:!\w][-\.\w]*:)?[-!\*\.\w]*\b([^:(]|$)|\*)/u # Child + rest = $' + results = [] + elements.each do |element| + results |= filter( element.to_a, rest ) + end + return results + when /^\/?(\w[-\w]*)\(/u # / Function + return function( elements, $1, $' ) + when Namespace::NAMESPLIT # Element name + name = $2 + ns = $1 + rest = $' + elements.delete_if do |element| + !(element.kind_of? Element and + (element.expanded_name == name or + (element.name == name and + element.namespace == Functions.namespace_context[ns]))) + end + return filter( elements, rest ) + when /^\/\[/u + matches = [] + elements.each do |element| + matches |= predicate( element.to_a, path[1..-1] ) if element.kind_of? Element + end + return matches + when /^\[/u # Predicate + return predicate( elements, path ) + when /^\/?\.\.\./u # Ancestor + return axe( elements, "ancestor", $' ) + when /^\/?\.\./u # Parent + return filter( elements.collect{|e|e.parent}, $' ) + when /^\/?\./u # Self + return filter( elements, $' ) + when /^\*/u # Any + results = [] + elements.each do |element| + results |= filter( [element], $' ) if element.kind_of? Element + #if element.kind_of? Element + # children = element.to_a + # children.delete_if { |child| !child.kind_of?(Element) } + # results |= filter( children, $' ) + #end + end + return results + end + return [] + end + + def QuickPath::axe( elements, axe_name, rest ) + matches = [] + matches = filter( elements.dup, rest ) if axe_name =~ /-or-self$/u + case axe_name + when /^descendant/u + elements.each do |element| + matches |= filter( element.to_a, "descendant-or-self::#{rest}" ) if element.kind_of? Element + end + when /^ancestor/u + elements.each do |element| + while element.parent + matches << element.parent + element = element.parent + end + end + matches = filter( matches, rest ) + when "self" + matches = filter( elements, rest ) + when "child" + elements.each do |element| + matches |= filter( element.to_a, rest ) if element.kind_of? Element + end + when "attribute" + elements.each do |element| + matches << element.attributes[ rest ] if element.kind_of? Element + end + when "parent" + matches = filter(elements.collect{|element| element.parent}.uniq, rest) + when "following-sibling" + matches = filter(elements.collect{|element| element.next_sibling}.uniq, + rest) + when "previous-sibling" + matches = filter(elements.collect{|element| + element.previous_sibling}.uniq, rest ) + end + return matches.uniq + end + + # A predicate filters a node-set with respect to an axis to produce a + # new node-set. For each node in the node-set to be filtered, the + # PredicateExpr is evaluated with that node as the context node, with + # the number of nodes in the node-set as the context size, and with the + # proximity position of the node in the node-set with respect to the + # axis as the context position; if PredicateExpr evaluates to true for + # that node, the node is included in the new node-set; otherwise, it is + # not included. + # + # A PredicateExpr is evaluated by evaluating the Expr and converting + # the result to a boolean. If the result is a number, the result will + # be converted to true if the number is equal to the context position + # and will be converted to false otherwise; if the result is not a + # number, then the result will be converted as if by a call to the + # boolean function. Thus a location path para[3] is equivalent to + # para[position()=3]. + def QuickPath::predicate( elements, path ) + ind = 1 + bcount = 1 + while bcount > 0 + bcount += 1 if path[ind] == ?[ + bcount -= 1 if path[ind] == ?] + ind += 1 + end + ind -= 1 + predicate = path[1..ind-1] + rest = path[ind+1..-1] + + # have to change 'a [=<>] b [=<>] c' into 'a [=<>] b and b [=<>] c' + predicate.gsub!( /([^\s(and)(or)<>=]+)\s*([<>=])\s*([^\s(and)(or)<>=]+)\s*([<>=])\s*([^\s(and)(or)<>=]+)/u, + '\1 \2 \3 and \3 \4 \5' ) + # Let's do some Ruby trickery to avoid some work: + predicate.gsub!( /&/u, "&&" ) + predicate.gsub!( /=/u, "==" ) + predicate.gsub!( /@(\w[-\w.]*)/u, 'attribute("\1")' ) + predicate.gsub!( /\bmod\b/u, "%" ) + predicate.gsub!( /\b(\w[-\w.]*\()/u ) { + fname = $1 + fname.gsub( /-/u, "_" ) + } + + Functions.pair = [ 0, elements.size ] + results = [] + elements.each do |element| + Functions.pair[0] += 1 + Functions.node = element + res = eval( predicate ) + case res + when true + results << element + when Fixnum + results << element if Functions.pair[0] == res + when String + results << element + end + end + return filter( results, rest ) + end + + def QuickPath::attribute( name ) + return Functions.node.attributes[name] if Functions.node.kind_of? Element + end + + def QuickPath::name() + return Functions.node.name if Functions.node.kind_of? Element + end + + def QuickPath::method_missing( id, *args ) + begin + Functions.send( id.id2name, *args ) + rescue Exception + raise "METHOD: #{id.id2name}(#{args.join ', '})\n#{$!.message}" + end + end + + def QuickPath::function( elements, fname, rest ) + args = parse_args( elements, rest ) + Functions.pair = [0, elements.size] + results = [] + elements.each do |element| + Functions.pair[0] += 1 + Functions.node = element + res = Functions.send( fname, *args ) + case res + when true + results << element + when Fixnum + results << element if Functions.pair[0] == res + end + end + return results + end + + def QuickPath::parse_args( element, string ) + # /.*?(?:\)|,)/ + arguments = [] + buffer = "" + while string and string != "" + c = string[0] + string.sub!(/^./u, "") + case c + when ?, + # if depth = 1, then we start a new argument + arguments << evaluate( buffer ) + #arguments << evaluate( string[0..count] ) + when ?( + # start a new method call + function( element, buffer, string ) + buffer = "" + when ?) + # close the method call and return arguments + return arguments + else + buffer << c + end + end + "" + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/rexml.rb b/lib/ruby-1.9.1-rc1/lib/rexml/rexml.rb new file mode 100644 index 0000000..3eff88f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/rexml.rb @@ -0,0 +1,31 @@ +# -*- encoding: utf-8 -*- +# REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby. +# +# REXML is a _pure_ Ruby, XML 1.0 conforming, +# non-validating[http://www.w3.org/TR/2004/REC-xml-20040204/#sec-conformance] +# toolkit with an intuitive API. REXML passes 100% of the non-validating Oasis +# tests[http://www.oasis-open.org/committees/xml-conformance/xml-test-suite.shtml], +# and provides tree, stream, SAX2, pull, and lightweight APIs. REXML also +# includes a full XPath[http://www.w3c.org/tr/xpath] 1.0 implementation. Since +# Ruby 1.8, REXML is included in the standard Ruby distribution. +# +# Main page:: http://www.germane-software.com/software/rexml +# Author:: Sean Russell +# Date:: 2008/019 +# Version:: 3.1.7.3 +# +# This API documentation can be downloaded from the REXML home page, or can +# be accessed online[http://www.germane-software.com/software/rexml_doc] +# +# A tutorial is available in the REXML distribution in docs/tutorial.html, +# or can be accessed +# online[http://www.germane-software.com/software/rexml/docs/tutorial.html] +module REXML + COPYRIGHT = "Copyright © 2001-2008 Sean Russell " + DATE = "2008/019" + VERSION = "3.1.7.3" + REVISION = "$Revision: 15141 $".gsub(/\$Revision:|\$/,'').strip + + Copyright = COPYRIGHT + Version = VERSION +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/sax2listener.rb b/lib/ruby-1.9.1-rc1/lib/rexml/sax2listener.rb new file mode 100644 index 0000000..9545b08 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/sax2listener.rb @@ -0,0 +1,97 @@ +module REXML + # A template for stream parser listeners. + # Note that the declarations (attlistdecl, elementdecl, etc) are trivially + # processed; REXML doesn't yet handle doctype entity declarations, so you + # have to parse them out yourself. + # === Missing methods from SAX2 + # ignorable_whitespace + # === Methods extending SAX2 + # +WARNING+ + # These methods are certainly going to change, until DTDs are fully + # supported. Be aware of this. + # start_document + # end_document + # doctype + # elementdecl + # attlistdecl + # entitydecl + # notationdecl + # cdata + # xmldecl + # comment + module SAX2Listener + def start_document + end + def end_document + end + def start_prefix_mapping prefix, uri + end + def end_prefix_mapping prefix + end + def start_element uri, localname, qname, attributes + end + def end_element uri, localname, qname + end + def characters text + end + def processing_instruction target, data + end + # Handles a doctype declaration. Any attributes of the doctype which are + # not supplied will be nil. # EG, + # @p name the name of the doctype; EG, "me" + # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC" + # @p long_name the supplied long name, or nil. EG, "foo" + # @p uri the uri of the doctype, or nil. EG, "bar" + def doctype name, pub_sys, long_name, uri + end + # If a doctype includes an ATTLIST declaration, it will cause this + # method to be called. The content is the declaration itself, unparsed. + # EG, will come to this method as "el + # attr CDATA #REQUIRED". This is the same for all of the .*decl + # methods. + def attlistdecl(element, pairs, contents) + end + # + def elementdecl content + end + # + # The argument passed to this method is an array of the entity + # declaration. It can be in a number of formats, but in general it + # returns (example, result): + # + # ["%", "YN", "'\"Yes\"'", "\""] + # + # ["%", "YN", "'Yes'", "s"] + # + # ["WhatHeSaid", "\"He said %YN;\"", "YN"] + # + # ["open-hatch", "SYSTEM", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] + # + # ["open-hatch", "PUBLIC", "\"-//Textuality//TEXT Standard open-hatch boilerplate//EN\"", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] + # + # ["hatch-pic", "SYSTEM", "\"../grafix/OpenHatch.gif\"", "\n\t\t\t\t\t\t\tNDATA gif", "gif"] + def entitydecl name, decl + end + # + def notationdecl content + end + # Called when is encountered in a document. + # @p content "..." + def cdata content + end + # Called when an XML PI is encountered in the document. + # EG: + # @p version the version attribute value. EG, "1.0" + # @p encoding the encoding attribute value, or nil. EG, "utf" + # @p standalone the standalone attribute value, or nil. EG, nil + # @p spaced the declaration is followed by a line break + def xmldecl version, encoding, standalone + end + # Called when a comment is encountered. + # @p comment The content of the comment + def comment comment + end + def progress position + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/source.rb b/lib/ruby-1.9.1-rc1/lib/rexml/source.rb new file mode 100644 index 0000000..d433513 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/source.rb @@ -0,0 +1,258 @@ +require 'rexml/encoding' + +module REXML + # Generates Source-s. USE THIS CLASS. + class SourceFactory + # Generates a Source object + # @param arg Either a String, or an IO + # @return a Source, or nil if a bad argument was given + def SourceFactory::create_from(arg) + if arg.respond_to? :read and + arg.respond_to? :readline and + arg.respond_to? :nil? and + arg.respond_to? :eof? + IOSource.new(arg) + elsif arg.respond_to? :to_str + require 'stringio' + IOSource.new(StringIO.new(arg)) + elsif arg.kind_of? Source + arg + else + raise "#{arg.class} is not a valid input stream. It must walk \n"+ + "like either a String, an IO, or a Source." + end + end + end + + # A Source can be searched for patterns, and wraps buffers and other + # objects and provides consumption of text + class Source + include Encoding + # The current buffer (what we're going to read next) + attr_reader :buffer + # The line number of the last consumed text + attr_reader :line + attr_reader :encoding + + # Constructor + # @param arg must be a String, and should be a valid XML document + # @param encoding if non-null, sets the encoding of the source to this + # value, overriding all encoding detection + def initialize(arg, encoding=nil) + @orig = @buffer = arg + if encoding + self.encoding = encoding + else + self.encoding = check_encoding( @buffer ) + end + @line = 0 + end + + + # Inherited from Encoding + # Overridden to support optimized en/decoding + def encoding=(enc) + return unless super + @line_break = encode( '>' ) + if enc != UTF_8 + @buffer = decode(@buffer) + @to_utf = true + else + @to_utf = false + if @buffer.respond_to? :force_encoding + @buffer.force_encoding Encoding::UTF_8 + end + end + end + + # Scans the source for a given pattern. Note, that this is not your + # usual scan() method. For one thing, the pattern argument has some + # requirements; for another, the source can be consumed. You can easily + # confuse this method. Originally, the patterns were easier + # to construct and this method more robust, because this method + # generated search regexes on the fly; however, this was + # computationally expensive and slowed down the entire REXML package + # considerably, since this is by far the most commonly called method. + # @param pattern must be a Regexp, and must be in the form of + # /^\s*(#{your pattern, with no groups})(.*)/. The first group + # will be returned; the second group is used if the consume flag is + # set. + # @param consume if true, the pattern returned will be consumed, leaving + # everything after it in the Source. + # @return the pattern, if found, or nil if the Source is empty or the + # pattern is not found. + def scan(pattern, cons=false) + return nil if @buffer.nil? + rv = @buffer.scan(pattern) + @buffer = $' if cons and rv.size>0 + rv + end + + def read + end + + def consume( pattern ) + @buffer = $' if pattern.match( @buffer ) + end + + def match_to( char, pattern ) + return pattern.match(@buffer) + end + + def match_to_consume( char, pattern ) + md = pattern.match(@buffer) + @buffer = $' + return md + end + + def match(pattern, cons=false) + md = pattern.match(@buffer) + @buffer = $' if cons and md + return md + end + + # @return true if the Source is exhausted + def empty? + @buffer == "" + end + + def position + @orig.index( @buffer ) + end + + # @return the current line in the source + def current_line + lines = @orig.split + res = lines.grep @buffer[0..30] + res = res[-1] if res.kind_of? Array + lines.index( res ) if res + end + end + + # A Source that wraps an IO. See the Source class for method + # documentation + class IOSource < Source + #attr_reader :block_size + + # block_size has been deprecated + def initialize(arg, block_size=500, encoding=nil) + @er_source = @source = arg + @to_utf = false + + # Determining the encoding is a deceptively difficult issue to resolve. + # First, we check the first two bytes for UTF-16. Then we + # assume that the encoding is at least ASCII enough for the '>', and + # we read until we get one of those. This gives us the XML declaration, + # if there is one. If there isn't one, the file MUST be UTF-8, as per + # the XML spec. If there is one, we can determine the encoding from + # it. + @buffer = "" + str = @source.read( 2 ) || '' + if encoding + self.encoding = encoding + elsif str[0,2] == "\xfe\xff" + @line_break = "\000>" + elsif str[0,2] == "\xff\xfe" + @line_break = ">\000" + elsif str[0,2] == "\xef\xbb" + str += @source.read(1) + str = '' if (str[2,1] == "\xBF") + @line_break = ">" + else + @line_break = ">" + end + super( @source.eof? ? str : str+@source.readline( @line_break ) ) + end + + def scan(pattern, cons=false) + rv = super + # You'll notice that this next section is very similar to the same + # section in match(), but just a liiittle different. This is + # because it is a touch faster to do it this way with scan() + # than the way match() does it; enough faster to warrent duplicating + # some code + if rv.size == 0 + until @buffer =~ pattern or @source.nil? + begin + # READLINE OPT + #str = @source.read(@block_size) + str = @source.readline(@line_break) + str = decode(str) if @to_utf and str + @buffer << str + rescue Iconv::IllegalSequence + raise + rescue + @source = nil + end + end + rv = super + end + rv.taint + rv + end + + def read + begin + str = @source.readline(@line_break) + str = decode(str) if @to_utf and str + @buffer << str + if not @to_utf and @buffer.respond_to? :force_encoding + @buffer.force_encoding Encoding::UTF_8 + end + rescue Exception, NameError + @source = nil + end + end + + def consume( pattern ) + match( pattern, true ) + end + + def match( pattern, cons=false ) + rv = pattern.match(@buffer) + @buffer = $' if cons and rv + while !rv and @source + begin + str = @source.readline(@line_break) + str = decode(str) if @to_utf and str + @buffer << str + rv = pattern.match(@buffer) + @buffer = $' if cons and rv + rescue + @source = nil + end + end + rv.taint + rv + end + + def empty? + super and ( @source.nil? || @source.eof? ) + end + + def position + @er_source.pos rescue 0 + end + + # @return the current line in the source + def current_line + begin + pos = @er_source.pos # The byte position in the source + lineno = @er_source.lineno # The XML < position in the source + @er_source.rewind + line = 0 # The \r\n position in the source + begin + while @er_source.pos < pos + @er_source.readline + line += 1 + end + rescue + end + rescue IOError + pos = -1 + line = -1 + end + [pos, lineno, line] + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/streamlistener.rb b/lib/ruby-1.9.1-rc1/lib/rexml/streamlistener.rb new file mode 100644 index 0000000..3a4ef9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/streamlistener.rb @@ -0,0 +1,92 @@ +module REXML + # A template for stream parser listeners. + # Note that the declarations (attlistdecl, elementdecl, etc) are trivially + # processed; REXML doesn't yet handle doctype entity declarations, so you + # have to parse them out yourself. + module StreamListener + # Called when a tag is encountered. + # @p name the tag name + # @p attrs an array of arrays of attribute/value pairs, suitable for + # use with assoc or rassoc. IE, + # will result in + # tag_start( "tag", # [["attr1","value1"],["attr2","value2"]]) + def tag_start name, attrs + end + # Called when the end tag is reached. In the case of , tag_end + # will be called immidiately after tag_start + # @p the name of the tag + def tag_end name + end + # Called when text is encountered in the document + # @p text the text content. + def text text + end + # Called when an instruction is encountered. EG: + # @p name the instruction name; in the example, "xsl" + # @p instruction the rest of the instruction. In the example, + # "sheet='foo'" + def instruction name, instruction + end + # Called when a comment is encountered. + # @p comment The content of the comment + def comment comment + end + # Handles a doctype declaration. Any attributes of the doctype which are + # not supplied will be nil. # EG, + # @p name the name of the doctype; EG, "me" + # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC" + # @p long_name the supplied long name, or nil. EG, "foo" + # @p uri the uri of the doctype, or nil. EG, "bar" + def doctype name, pub_sys, long_name, uri + end + # Called when the doctype is done + def doctype_end + end + # If a doctype includes an ATTLIST declaration, it will cause this + # method to be called. The content is the declaration itself, unparsed. + # EG, will come to this method as "el + # attr CDATA #REQUIRED". This is the same for all of the .*decl + # methods. + def attlistdecl element_name, attributes, raw_content + end + # + def elementdecl content + end + # + # The argument passed to this method is an array of the entity + # declaration. It can be in a number of formats, but in general it + # returns (example, result): + # + # ["%", "YN", "'\"Yes\"'", "\""] + # + # ["%", "YN", "'Yes'", "s"] + # + # ["WhatHeSaid", "\"He said %YN;\"", "YN"] + # + # ["open-hatch", "SYSTEM", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] + # + # ["open-hatch", "PUBLIC", "\"-//Textuality//TEXT Standard open-hatch boilerplate//EN\"", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] + # + # ["hatch-pic", "SYSTEM", "\"../grafix/OpenHatch.gif\"", "\n\t\t\t\t\t\t\tNDATA gif", "gif"] + def entitydecl content + end + # + def notationdecl content + end + # Called when %foo; is encountered in a doctype declaration. + # @p content "foo" + def entity content + end + # Called when is encountered in a document. + # @p content "..." + def cdata content + end + # Called when an XML PI is encountered in the document. + # EG: + # @p version the version attribute value. EG, "1.0" + # @p encoding the encoding attribute value, or nil. EG, "utf" + # @p standalone the standalone attribute value, or nil. EG, nil + def xmldecl version, encoding, standalone + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/syncenumerator.rb b/lib/ruby-1.9.1-rc1/lib/rexml/syncenumerator.rb new file mode 100644 index 0000000..11609bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/syncenumerator.rb @@ -0,0 +1,32 @@ +module REXML + class SyncEnumerator + include Enumerable + + # Creates a new SyncEnumerator which enumerates rows of given + # Enumerable objects. + def initialize(*enums) + @gens = enums + @length = @gens.collect {|x| x.size }.max + end + + # Returns the number of enumerated Enumerable objects, i.e. the size + # of each row. + def size + @gens.size + end + + # Returns the number of enumerated Enumerable objects, i.e. the size + # of each row. + def length + @gens.length + end + + # Enumerates rows of the Enumerable objects. + def each + @length.times {|i| + yield @gens.collect {|x| x[i]} + } + self + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/text.rb b/lib/ruby-1.9.1-rc1/lib/rexml/text.rb new file mode 100644 index 0000000..fac5ac3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/text.rb @@ -0,0 +1,404 @@ +require 'rexml/entity' +require 'rexml/doctype' +require 'rexml/child' +require 'rexml/doctype' +require 'rexml/parseexception' + +module REXML + # Represents text nodes in an XML document + class Text < Child + include Comparable + # The order in which the substitutions occur + SPECIALS = [ /&(?!#?[\w-]+;)/u, //u, /"/u, /'/u, /\r/u ] + SUBSTITUTES = ['&', '<', '>', '"', ''', ' '] + # Characters which are substituted in written strings + SLAICEPS = [ '<', '>', '"', "'", '&' ] + SETUTITSBUS = [ /</u, />/u, /"/u, /'/u, /&/u ] + + # If +raw+ is true, then REXML leaves the value alone + attr_accessor :raw + + NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um + NUMERICENTITY = /�*((?:\d+)|(?:x[a-fA-F0-9]+));/ + VALID_CHAR = [ + 0x9, 0xA, 0xD, + (0x20..0xD7FF), + (0xE000..0xFFFD), + (0x10000..0x10FFFF) + ] + + if String.method_defined? :encode + VALID_XML_CHARS = Regexp.new('^['+ + VALID_CHAR.map { |item| + case item + when Fixnum + [item].pack('U').force_encoding('utf-8') + when Range + [item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8') + end + }.join + + ']*$') + else + VALID_XML_CHARS = /^( + [\x09\x0A\x0D\x20-\x7E] # ASCII + | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte + | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs + | [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte + | \xEF[\x80-\xBE]{2} # + | \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff + | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates + | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 + | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 + | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 + )*$/nx; + end + + # Constructor + # +arg+ if a String, the content is set to the String. If a Text, + # the object is shallowly cloned. + # + # +respect_whitespace+ (boolean, false) if true, whitespace is + # respected + # + # +parent+ (nil) if this is a Parent object, the parent + # will be set to this. + # + # +raw+ (nil) This argument can be given three values. + # If true, then the value of used to construct this object is expected to + # contain no unescaped XML markup, and REXML will not change the text. If + # this value is false, the string may contain any characters, and REXML will + # escape any and all defined entities whose values are contained in the + # text. If this value is nil (the default), then the raw value of the + # parent will be used as the raw value for this node. If there is no raw + # value for the parent, and no value is supplied, the default is false. + # Use this field if you have entities defined for some text, and you don't + # want REXML to escape that text in output. + # Text.new( "<&", false, nil, false ) #-> "<&" + # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" + # Text.new( "<&", false, nil, true ) #-> Parse exception + # Text.new( "<&", false, nil, true ) #-> "<&" + # # Assume that the entity "s" is defined to be "sean" + # # and that the entity "r" is defined to be "russell" + # Text.new( "sean russell" ) #-> "&s; &r;" + # Text.new( "sean russell", false, nil, true ) #-> "sean russell" + # + # +entity_filter+ (nil) This can be an array of entities to match in the + # supplied text. This argument is only useful if +raw+ is set to false. + # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" + # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" + # In the last example, the +entity_filter+ argument is ignored. + # + # +pattern+ INTERNAL USE ONLY + def initialize(arg, respect_whitespace=false, parent=nil, raw=nil, + entity_filter=nil, illegal=NEEDS_A_SECOND_CHECK ) + + @raw = false + + if parent + super( parent ) + @raw = parent.raw + else + @parent = nil + end + + @raw = raw unless raw.nil? + @entity_filter = entity_filter + @normalized = @unnormalized = nil + + if arg.kind_of? String + @string = arg.clone + @string.squeeze!(" \n\t") unless respect_whitespace + elsif arg.kind_of? Text + @string = arg.to_s + @raw = arg.raw + elsif + raise "Illegal argument of type #{arg.type} for Text constructor (#{arg})" + end + + @string.gsub!( /\r\n?/, "\n" ) + + Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent + end + + def parent= parent + super(parent) + Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent + end + + # check for illegal characters + def Text.check string, pattern, doctype + + # illegal anywhere + if string !~ VALID_XML_CHARS + if String.method_defined? :encode + string.chars.each do |c| + case c.ord + when *VALID_CHAR + else + raise "Illegal character #{c.inspect} in raw string \"#{string}\"" + end + end + else + string.scan(/[\x00-\x7F]|[\x80-\xBF][\xC0-\xF0]*|[\xC0-\xF0]/n) do |c| + case c.unpack('U') + when *VALID_CHAR + else + raise "Illegal character #{c.inspect} in raw string \"#{string}\"" + end + end + end + end + + # context sensitive + string.scan(pattern) do + if $1[-1] != ?; + raise "Illegal character '#{$1}' in raw string \"#{string}\"" + elsif $1[0] == ?& + if $5 and $5[0] == ?# + case ($5[1] == ?x ? $5[2..-1].to_i(16) : $5[1..-1].to_i) + when *VALID_CHAR + else + raise "Illegal character '#{$1}' in raw string \"#{string}\"" + end + elsif $3 and !SUBSTITUTES.include?($1) + if !doctype or !doctype.entities.has_key?($3) + raise "Undeclared entity '#{$1}' in raw string \"#{string}\"" + end + end + end + end + end + + def node_type + :text + end + + def empty? + @string.size==0 + end + + + def clone + return Text.new(self) + end + + + # Appends text to this text node. The text is appended in the +raw+ mode + # of this text node. + def <<( to_append ) + @string << to_append.gsub( /\r\n?/, "\n" ) + end + + + # +other+ a String or a Text + # +returns+ the result of (to_s <=> arg.to_s) + def <=>( other ) + to_s() <=> other.to_s + end + + def doctype + if @parent + doc = @parent.document + doc.doctype if doc + end + end + + REFERENCE = /#{Entity::REFERENCE}/ + # Returns the string value of this text node. This string is always + # escaped, meaning that it is a valid XML text node string, and all + # entities that can be escaped, have been inserted. This method respects + # the entity filter set in the constructor. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.to_s #-> "< & &s; russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.to_s #-> "< & &s; russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.to_s #-> "sean russell" + def to_s + return @string if @raw + return @normalized if @normalized + + @normalized = Text::normalize( @string, doctype, @entity_filter ) + end + + def inspect + @string.inspect + end + + # Returns the string value of this text. This is the text without + # entities, as it might be used programmatically, or printed to the + # console. This ignores the 'raw' attribute setting, and any + # entity_filter. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.value #-> "< & sean russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.value #-> "< & sean russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.value #-> "sean russell" + def value + return @unnormalized if @unnormalized + @unnormalized = Text::unnormalize( @string, doctype ) + end + + # Sets the contents of this text node. This expects the text to be + # unnormalized. It returns self. + # + # e = Element.new( "a" ) + # e.add_text( "foo" ) # foo + # e[0].value = "bar" # bar + # e[0].value = "" # <a> + def value=( val ) + @string = val.gsub( /\r\n?/, "\n" ) + @unnormalized = nil + @normalized = nil + @raw = false + end + + def wrap(string, width, addnewline=false) + # Recursively wrap string at width. + return string if string.length <= width + place = string.rindex(' ', width) # Position in string with last ' ' before cutoff + if addnewline then + return "\n" + string[0,place] + "\n" + wrap(string[place+1..-1], width) + else + return string[0,place] + "\n" + wrap(string[place+1..-1], width) + end + end + + def indent_text(string, level=1, style="\t", indentfirstline=true) + return string if level < 0 + new_string = '' + string.each { |line| + indent_string = style * level + new_line = (indent_string + line).sub(/[\s]+$/,'') + new_string << new_line + } + new_string.strip! unless indentfirstline + return new_string + end + + # == DEPRECATED + # See REXML::Formatters + # + def write( writer, indent=-1, transitive=false, ie_hack=false ) + Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters") + formatter = if indent > -1 + REXML::Formatters::Pretty.new( indent ) + else + REXML::Formatters::Default.new + end + formatter.write( self, writer ) + end + + # FIXME + # This probably won't work properly + def xpath + path = @parent.xpath + path += "/text()" + return path + end + + # Writes out text, substituting special characters beforehand. + # +out+ A String, IO, or any other object supporting <<( String ) + # +input+ the text to substitute and the write out + # + # z=utf8.unpack("U*") + # ascOut="" + # z.each{|r| + # if r < 0x100 + # ascOut.concat(r.chr) + # else + # ascOut.concat(sprintf("&#x%x;", r)) + # end + # } + # puts ascOut + def write_with_substitution out, input + copy = input.clone + # Doing it like this rather than in a loop improves the speed + copy.gsub!( SPECIALS[0], SUBSTITUTES[0] ) + copy.gsub!( SPECIALS[1], SUBSTITUTES[1] ) + copy.gsub!( SPECIALS[2], SUBSTITUTES[2] ) + copy.gsub!( SPECIALS[3], SUBSTITUTES[3] ) + copy.gsub!( SPECIALS[4], SUBSTITUTES[4] ) + copy.gsub!( SPECIALS[5], SUBSTITUTES[5] ) + out << copy + end + + # Reads text, substituting entities + def Text::read_with_substitution( input, illegal=nil ) + copy = input.clone + + if copy =~ illegal + raise ParseException.new( "malformed text: Illegal character #$& in \"#{copy}\"" ) + end if illegal + + copy.gsub!( /\r\n?/, "\n" ) + if copy.include? ?& + copy.gsub!( SETUTITSBUS[0], SLAICEPS[0] ) + copy.gsub!( SETUTITSBUS[1], SLAICEPS[1] ) + copy.gsub!( SETUTITSBUS[2], SLAICEPS[2] ) + copy.gsub!( SETUTITSBUS[3], SLAICEPS[3] ) + copy.gsub!( SETUTITSBUS[4], SLAICEPS[4] ) + copy.gsub!( /�*((?:\d+)|(?:x[a-f0-9]+));/ ) { + m=$1 + #m='0' if m=='' + m = "0#{m}" if m[0] == ?x + [Integer(m)].pack('U*') + } + end + copy + end + + EREFERENCE = /&(?!#{Entity::NAME};)/ + # Escapes all possible entities + def Text::normalize( input, doctype=nil, entity_filter=nil ) + copy = input.to_s + # Doing it like this rather than in a loop improves the speed + #copy = copy.gsub( EREFERENCE, '&' ) + copy = copy.gsub( "&", "&" ) + if doctype + # Replace all ampersands that aren't part of an entity + doctype.entities.each_value do |entity| + copy = copy.gsub( entity.value, + "&#{entity.name};" ) if entity.value and + not( entity_filter and entity_filter.include?(entity) ) + end + else + # Replace all ampersands that aren't part of an entity + DocType::DEFAULT_ENTITIES.each_value do |entity| + copy = copy.gsub(entity.value, "&#{entity.name};" ) + end + end + copy + end + + # Unescapes all possible entities + def Text::unnormalize( string, doctype=nil, filter=nil, illegal=nil ) + string.gsub( /\r\n?/, "\n" ).gsub( REFERENCE ) { + ref = $& + if ref[1] == ?# + if ref[2] == ?x + [ref[3...-1].to_i(16)].pack('U*') + else + [ref[2...-1].to_i].pack('U*') + end + elsif ref == '&' + '&' + elsif filter and filter.include?( ref[1...-1] ) + ref + elsif doctype + doctype.entity( ref[1...-1] ) or ref + else + entity_value = DocType::DEFAULT_ENTITIES[ ref[1...-1] ] + entity_value ? entity_value.value : ref + end + } + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/undefinednamespaceexception.rb b/lib/ruby-1.9.1-rc1/lib/rexml/undefinednamespaceexception.rb new file mode 100644 index 0000000..8ebfdfd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/undefinednamespaceexception.rb @@ -0,0 +1,8 @@ +require 'rexml/parseexception' +module REXML + class UndefinedNamespaceException < ParseException + def initialize( prefix, source, parser ) + super( "Undefined prefix #{prefix} found" ) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/validation/relaxng.rb b/lib/ruby-1.9.1-rc1/lib/rexml/validation/relaxng.rb new file mode 100644 index 0000000..2b86371 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/validation/relaxng.rb @@ -0,0 +1,559 @@ +require "rexml/validation/validation" +require "rexml/parsers/baseparser" + +module REXML + module Validation + # Implemented: + # * empty + # * element + # * attribute + # * text + # * optional + # * choice + # * oneOrMore + # * zeroOrMore + # * group + # * value + # * interleave + # * mixed + # * ref + # * grammar + # * start + # * define + # + # Not implemented: + # * data + # * param + # * include + # * externalRef + # * notAllowed + # * anyName + # * nsName + # * except + # * name + class RelaxNG + include Validator + + INFINITY = 1.0 / 0.0 + EMPTY = Event.new( nil ) + TEXT = [:start_element, "text"] + attr_accessor :current + attr_accessor :count + attr_reader :references + + # FIXME: Namespaces + def initialize source + parser = REXML::Parsers::BaseParser.new( source ) + + @count = 0 + @references = {} + @root = @current = Sequence.new(self) + @root.previous = true + states = [ @current ] + begin + event = parser.pull + case event[0] + when :start_element + case event[1] + when "empty" + when "element", "attribute", "text", "value" + states[-1] << event + when "optional" + states << Optional.new( self ) + states[-2] << states[-1] + when "choice" + states << Choice.new( self ) + states[-2] << states[-1] + when "oneOrMore" + states << OneOrMore.new( self ) + states[-2] << states[-1] + when "zeroOrMore" + states << ZeroOrMore.new( self ) + states[-2] << states[-1] + when "group" + states << Sequence.new( self ) + states[-2] << states[-1] + when "interleave" + states << Interleave.new( self ) + states[-2] << states[-1] + when "mixed" + states << Interleave.new( self ) + states[-2] << states[-1] + states[-1] << TEXT + when "define" + states << [ event[2]["name"] ] + when "ref" + states[-1] << Ref.new( event[2]["name"] ) + when "anyName" + states << AnyName.new( self ) + states[-2] << states[-1] + when "nsName" + when "except" + when "name" + when "data" + when "param" + when "include" + when "grammar" + when "start" + when "externalRef" + when "notAllowed" + end + when :end_element + case event[1] + when "element", "attribute" + states[-1] << event + when "zeroOrMore", "oneOrMore", "choice", "optional", + "interleave", "group", "mixed" + states.pop + when "define" + ref = states.pop + @references[ ref.shift ] = ref + #when "empty" + end + when :end_document + states[-1] << event + when :text + states[-1] << event + end + end while event[0] != :end_document + end + + def receive event + validate( event ) + end + end + + class State + def initialize( context ) + @previous = [] + @events = [] + @current = 0 + @count = context.count += 1 + @references = context.references + @value = false + end + + def reset + return if @current == 0 + @current = 0 + @events.each {|s| s.reset if s.kind_of? State } + end + + def previous=( previous ) + @previous << previous + end + + def next( event ) + #print "In next with #{event.inspect}. " + #puts "Next (#@current) is #{@events[@current]}" + #p @previous + return @previous.pop.next( event ) if @events[@current].nil? + expand_ref_in( @events, @current ) if @events[@current].class == Ref + if ( @events[@current].kind_of? State ) + @current += 1 + @events[@current-1].previous = self + return @events[@current-1].next( event ) + end + #puts "Current isn't a state" + if ( @events[@current].matches?(event) ) + @current += 1 + if @events[@current].nil? + #puts "#{inspect[0,5]} 1RETURNING #{@previous.inspect[0,5]}" + return @previous.pop + elsif @events[@current].kind_of? State + @current += 1 + #puts "#{inspect[0,5]} 2RETURNING (#{@current-1}) #{@events[@current-1].inspect[0,5]}; on return, next is #{@events[@current]}" + @events[@current-1].previous = self + return @events[@current-1] + else + #puts "#{inspect[0,5]} RETURNING self w/ next(#@current) = #{@events[@current]}" + return self + end + else + return nil + end + end + + def to_s + # Abbreviated: + self.class.name =~ /(?:::)(\w)\w+$/ + # Full: + #self.class.name =~ /(?:::)(\w+)$/ + "#$1.#@count" + end + + def inspect + "< #{to_s} #{@events.collect{|e| + pre = e == @events[@current] ? '#' : '' + pre + e.inspect unless self == e + }.join(', ')} >" + end + + def expected + return [@events[@current]] + end + + def <<( event ) + add_event_to_arry( @events, event ) + end + + + protected + def expand_ref_in( arry, ind ) + new_events = [] + @references[ arry[ind].to_s ].each{ |evt| + add_event_to_arry(new_events,evt) + } + arry[ind,1] = new_events + end + + def add_event_to_arry( arry, evt ) + evt = generate_event( evt ) + if evt.kind_of? String + arry[-1].event_arg = evt if arry[-1].kind_of? Event and @value + @value = false + else + arry << evt + end + end + + def generate_event( event ) + return event if event.kind_of? State or event.class == Ref + evt = nil + arg = nil + case event[0] + when :start_element + case event[1] + when "element" + evt = :start_element + arg = event[2]["name"] + when "attribute" + evt = :start_attribute + arg = event[2]["name"] + when "text" + evt = :text + when "value" + evt = :text + @value = true + end + when :text + return event[1] + when :end_document + return Event.new( event[0] ) + else # then :end_element + case event[1] + when "element" + evt = :end_element + when "attribute" + evt = :end_attribute + end + end + return Event.new( evt, arg ) + end + end + + + class Sequence < State + def matches?(event) + @events[@current].matches?( event ) + end + end + + + class Optional < State + def next( event ) + if @current == 0 + rv = super + return rv if rv + @prior = @previous.pop + return @prior.next( event ) + end + super + end + + def matches?(event) + @events[@current].matches?(event) || + (@current == 0 and @previous[-1].matches?(event)) + end + + def expected + return [ @prior.expected, @events[0] ].flatten if @current == 0 + return [@events[@current]] + end + end + + + class ZeroOrMore < Optional + def next( event ) + expand_ref_in( @events, @current ) if @events[@current].class == Ref + if ( @events[@current].matches?(event) ) + @current += 1 + if @events[@current].nil? + @current = 0 + return self + elsif @events[@current].kind_of? State + @current += 1 + @events[@current-1].previous = self + return @events[@current-1] + else + return self + end + else + @prior = @previous.pop + return @prior.next( event ) if @current == 0 + return nil + end + end + + def expected + return [ @prior.expected, @events[0] ].flatten if @current == 0 + return [@events[@current]] + end + end + + + class OneOrMore < State + def initialize context + super + @ord = 0 + end + + def reset + super + @ord = 0 + end + + def next( event ) + expand_ref_in( @events, @current ) if @events[@current].class == Ref + if ( @events[@current].matches?(event) ) + @current += 1 + @ord += 1 + if @events[@current].nil? + @current = 0 + return self + elsif @events[@current].kind_of? State + @current += 1 + @events[@current-1].previous = self + return @events[@current-1] + else + return self + end + else + return @previous.pop.next( event ) if @current == 0 and @ord > 0 + return nil + end + end + + def matches?( event ) + @events[@current].matches?(event) || + (@current == 0 and @ord > 0 and @previous[-1].matches?(event)) + end + + def expected + if @current == 0 and @ord > 0 + return [@previous[-1].expected, @events[0]].flatten + else + return [@events[@current]] + end + end + end + + + class Choice < State + def initialize context + super + @choices = [] + end + + def reset + super + @events = [] + @choices.each { |c| c.each { |s| s.reset if s.kind_of? State } } + end + + def <<( event ) + add_event_to_arry( @choices, event ) + end + + def next( event ) + # Make the choice if we haven't + if @events.size == 0 + c = 0 ; max = @choices.size + while c < max + if @choices[c][0].class == Ref + expand_ref_in( @choices[c], 0 ) + @choices += @choices[c] + @choices.delete( @choices[c] ) + max -= 1 + else + c += 1 + end + end + @events = @choices.find { |evt| evt[0].matches? event } + # Remove the references + # Find the events + end + #puts "In next with #{event.inspect}." + #puts "events is #{@events.inspect}" + unless @events + @events = [] + return nil + end + #puts "current = #@current" + super + end + + def matches?( event ) + return @events[@current].matches?( event ) if @events.size > 0 + !@choices.find{|evt| evt[0].matches?(event)}.nil? + end + + def expected + #puts "IN CHOICE EXPECTED" + #puts "EVENTS = #{@events.inspect}" + return [@events[@current]] if @events.size > 0 + return @choices.collect do |x| + if x[0].kind_of? State + x[0].expected + else + x[0] + end + end.flatten + end + + def inspect + "< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' or ')} >" + end + + protected + def add_event_to_arry( arry, evt ) + if evt.kind_of? State or evt.class == Ref + arry << [evt] + elsif evt[0] == :text + if arry[-1] and + arry[-1][-1].kind_of?( Event ) and + arry[-1][-1].event_type == :text and @value + + arry[-1][-1].event_arg = evt[1] + @value = false + end + else + arry << [] if evt[0] == :start_element + arry[-1] << generate_event( evt ) + end + end + end + + + class Interleave < Choice + def initialize context + super + @choice = 0 + end + + def reset + @choice = 0 + end + + def next_current( event ) + # Expand references + c = 0 ; max = @choices.size + while c < max + if @choices[c][0].class == Ref + expand_ref_in( @choices[c], 0 ) + @choices += @choices[c] + @choices.delete( @choices[c] ) + max -= 1 + else + c += 1 + end + end + @events = @choices[@choice..-1].find { |evt| evt[0].matches? event } + @current = 0 + if @events + # reorder the choices + old = @choices[@choice] + idx = @choices.index( @events ) + @choices[@choice] = @events + @choices[idx] = old + @choice += 1 + end + + #puts "In next with #{event.inspect}." + #puts "events is #{@events.inspect}" + @events = [] unless @events + end + + + def next( event ) + # Find the next series + next_current(event) unless @events[@current] + return nil unless @events[@current] + + expand_ref_in( @events, @current ) if @events[@current].class == Ref + #puts "In next with #{event.inspect}." + #puts "Next (#@current) is #{@events[@current]}" + if ( @events[@current].kind_of? State ) + @current += 1 + @events[@current-1].previous = self + return @events[@current-1].next( event ) + end + #puts "Current isn't a state" + return @previous.pop.next( event ) if @events[@current].nil? + if ( @events[@current].matches?(event) ) + @current += 1 + if @events[@current].nil? + #puts "#{inspect[0,5]} 1RETURNING self" unless @choices[@choice].nil? + return self unless @choices[@choice].nil? + #puts "#{inspect[0,5]} 1RETURNING #{@previous[-1].inspect[0,5]}" + return @previous.pop + elsif @events[@current].kind_of? State + @current += 1 + #puts "#{inspect[0,5]} 2RETURNING (#{@current-1}) #{@events[@current-1].inspect[0,5]}; on return, next is #{@events[@current]}" + @events[@current-1].previous = self + return @events[@current-1] + else + #puts "#{inspect[0,5]} RETURNING self w/ next(#@current) = #{@events[@current]}" + return self + end + else + return nil + end + end + + def matches?( event ) + return @events[@current].matches?( event ) if @events[@current] + !@choices[@choice..-1].find{|evt| evt[0].matches?(event)}.nil? + end + + def expected + #puts "IN CHOICE EXPECTED" + #puts "EVENTS = #{@events.inspect}" + return [@events[@current]] if @events[@current] + return @choices[@choice..-1].collect do |x| + if x[0].kind_of? State + x[0].expected + else + x[0] + end + end.flatten + end + + def inspect + "< #{to_s} #{@choices.collect{|e| e.collect{|f|f.to_s}.join(', ')}.join(' and ')} >" + end + end + + class Ref + def initialize value + @value = value + end + def to_s + @value + end + def inspect + "{#{to_s}}" + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/validation/validation.rb b/lib/ruby-1.9.1-rc1/lib/rexml/validation/validation.rb new file mode 100644 index 0000000..93f5bfb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/validation/validation.rb @@ -0,0 +1,155 @@ +require 'rexml/validation/validationexception' + +module REXML + module Validation + module Validator + NILEVENT = [ nil ] + def reset + @current = @root + @root.reset + @root.previous = true + @attr_stack = [] + self + end + def dump + puts @root.inspect + end + def validate( event ) + #puts "Current: #@current" + #puts "Event: #{event.inspect}" + @attr_stack = [] unless defined? @attr_stack + match = @current.next(event) + raise ValidationException.new( "Validation error. Expected: "+ + @current.expected.join( " or " )+" from #{@current.inspect} "+ + " but got #{Event.new( event[0], event[1] ).inspect}" ) unless match + @current = match + + # Check for attributes + case event[0] + when :start_element + #puts "Checking attributes" + @attr_stack << event[2] + begin + sattr = [:start_attribute, nil] + eattr = [:end_attribute] + text = [:text, nil] + k,v = event[2].find { |key,value| + sattr[1] = key + #puts "Looking for #{sattr.inspect}" + m = @current.next( sattr ) + #puts "Got #{m.inspect}" + if m + # If the state has text children... + #puts "Looking for #{eattr.inspect}" + #puts "Expect #{m.expected}" + if m.matches?( eattr ) + #puts "Got end" + @current = m + else + #puts "Didn't get end" + text[1] = value + #puts "Looking for #{text.inspect}" + m = m.next( text ) + #puts "Got #{m.inspect}" + text[1] = nil + return false unless m + @current = m if m + end + m = @current.next( eattr ) + if m + @current = m + true + else + false + end + else + false + end + } + event[2].delete(k) if k + end while k + when :end_element + attrs = @attr_stack.pop + raise ValidationException.new( "Validation error. Illegal "+ + " attributes: #{attrs.inspect}") if attrs.length > 0 + end + end + end + + class Event + def initialize(event_type, event_arg=nil ) + @event_type = event_type + @event_arg = event_arg + end + + attr_reader :event_type + attr_accessor :event_arg + + def done? + @done + end + + def single? + return (@event_type != :start_element and @event_type != :start_attribute) + end + + def matches?( event ) + #puts "#@event_type =? #{event[0]} && #@event_arg =? #{event[1]} " + return false unless event[0] == @event_type + case event[0] + when nil + return true + when :start_element + return true if event[1] == @event_arg + when :end_element + return true + when :start_attribute + return true if event[1] == @event_arg + when :end_attribute + return true + when :end_document + return true + when :text + return (@event_arg.nil? or @event_arg == event[1]) +=begin + when :processing_instruction + false + when :xmldecl + false + when :start_doctype + false + when :end_doctype + false + when :externalentity + false + when :elementdecl + false + when :entity + false + when :attlistdecl + false + when :notationdecl + false + when :end_doctype + false +=end + else + false + end + end + + def ==( other ) + return false unless other.kind_of? Event + @event_type == other.event_type and @event_arg == other.event_arg + end + + def to_s + inspect + end + + def inspect + "#{@event_type.inspect}( #@event_arg )" + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/validation/validationexception.rb b/lib/ruby-1.9.1-rc1/lib/rexml/validation/validationexception.rb new file mode 100644 index 0000000..4723d9e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/validation/validationexception.rb @@ -0,0 +1,9 @@ +module REXML + module Validation + class ValidationException < RuntimeError + def initialize msg + super + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/xmldecl.rb b/lib/ruby-1.9.1-rc1/lib/rexml/xmldecl.rb new file mode 100644 index 0000000..361e4b7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/xmldecl.rb @@ -0,0 +1,119 @@ +require 'rexml/encoding' +require 'rexml/source' + +module REXML + # NEEDS DOCUMENTATION + class XMLDecl < Child + include Encoding + + DEFAULT_VERSION = "1.0"; + DEFAULT_ENCODING = "UTF-8"; + DEFAULT_STANDALONE = "no"; + START = '<\?xml'; + STOP = '\?>'; + + attr_accessor :version, :standalone + attr_reader :writeencoding, :writethis + + def initialize(version=DEFAULT_VERSION, encoding=nil, standalone=nil) + @writethis = true + @writeencoding = !encoding.nil? + if version.kind_of? XMLDecl + super() + @version = version.version + self.encoding = version.encoding + @writeencoding = version.writeencoding + @standalone = version.standalone + else + super() + @version = version + self.encoding = encoding + @standalone = standalone + end + @version = DEFAULT_VERSION if @version.nil? + end + + def clone + XMLDecl.new(self) + end + + # indent:: + # Ignored. There must be no whitespace before an XML declaration + # transitive:: + # Ignored + # ie_hack:: + # Ignored + def write(writer, indent=-1, transitive=false, ie_hack=false) + return nil unless @writethis or writer.kind_of? Output + writer << START.sub(/\\/u, '') + if writer.kind_of? Output + writer << " #{content writer.encoding}" + else + writer << " #{content encoding}" + end + writer << STOP.sub(/\\/u, '') + end + + def ==( other ) + other.kind_of?(XMLDecl) and + other.version == @version and + other.encoding == self.encoding and + other.standalone == @standalone + end + + def xmldecl version, encoding, standalone + @version = version + self.encoding = encoding + @standalone = standalone + end + + def node_type + :xmldecl + end + + alias :stand_alone? :standalone + alias :old_enc= :encoding= + + def encoding=( enc ) + if enc.nil? + self.old_enc = "UTF-8" + @writeencoding = false + else + self.old_enc = enc + @writeencoding = true + end + self.dowrite + end + + # Only use this if you do not want the XML declaration to be written; + # this object is ignored by the XML writer. Otherwise, instantiate your + # own XMLDecl and add it to the document. + # + # Note that XML 1.1 documents *must* include an XML declaration + def XMLDecl.default + rv = XMLDecl.new( "1.0" ) + rv.nowrite + rv + end + + def nowrite + @writethis = false + end + + def dowrite + @writethis = true + end + + def inspect + START.sub(/\\/u, '') + " ... " + STOP.sub(/\\/u, '') + end + + private + def content(enc) + rv = "version='#@version'" + rv << " encoding='#{enc}'" if @writeencoding || enc !~ /utf-8/i + rv << " standalone='#@standalone'" if @standalone + rv + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/xmltokens.rb b/lib/ruby-1.9.1-rc1/lib/rexml/xmltokens.rb new file mode 100644 index 0000000..83efeb0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/xmltokens.rb @@ -0,0 +1,18 @@ +module REXML + # Defines a number of tokens used for parsing XML. Not for general + # consumption. + module XMLTokens + NCNAME_STR= '[\w:][\-\w\d.]*' + NAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" + + NAMECHAR = '[\-\w\d\.:]' + NAME = "([\\w:]#{NAMECHAR}*)" + NMTOKEN = "(?:#{NAMECHAR})+" + NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*" + REFERENCE = "(?:&#{NAME};|&#\\d+;|&#x[0-9a-fA-F]+;)" + + #REFERENCE = "(?:#{ENTITYREF}|#{CHARREF})" + #ENTITYREF = "&#{NAME};" + #CHARREF = "&#\\d+;|&#x[0-9a-fA-F]+;" + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/xpath.rb b/lib/ruby-1.9.1-rc1/lib/rexml/xpath.rb new file mode 100644 index 0000000..b22969e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/xpath.rb @@ -0,0 +1,77 @@ +require 'rexml/functions' +require 'rexml/xpath_parser' + +module REXML + # Wrapper class. Use this class to access the XPath functions. + class XPath + include Functions + EMPTY_HASH = {} + + # Finds and returns the first node that matches the supplied xpath. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, returns the first + # node matching '*'. + # namespaces:: + # If supplied, a Hash which defines a namespace mapping. + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.first( node ) + # XPath.first( doc, "//b"} ) + # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) + # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) + def XPath::first element, path=nil, namespaces=nil, variables={} + raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash) + raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash) + parser = XPathParser.new + parser.namespaces = namespaces + parser.variables = variables + path = "*" unless path + element = [element] unless element.kind_of? Array + parser.parse(path, element).flatten[0] + end + + # Iterates over nodes that match the given path, calling the supplied + # block with the match. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, defaults to '*' + # namespaces:: + # If supplied, a Hash which defines a namespace mapping + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.each( node ) { |el| ... } + # XPath.each( node, '/*[@attr='v']' ) { |el| ... } + # XPath.each( node, 'ancestor::x' ) { |el| ... } + # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \ + # {|el| ... } + def XPath::each element, path=nil, namespaces=nil, variables={}, &block + raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash) + raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash) + parser = XPathParser.new + parser.namespaces = namespaces + parser.variables = variables + path = "*" unless path + element = [element] unless element.kind_of? Array + parser.parse(path, element).each( &block ) + end + + # Returns an array of nodes matching a given XPath. + def XPath::match element, path=nil, namespaces=nil, variables={} + parser = XPathParser.new + parser.namespaces = namespaces + parser.variables = variables + path = "*" unless path + element = [element] unless element.kind_of? Array + parser.parse(path,element) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rexml/xpath_parser.rb b/lib/ruby-1.9.1-rc1/lib/rexml/xpath_parser.rb new file mode 100644 index 0000000..ead5ada --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rexml/xpath_parser.rb @@ -0,0 +1,792 @@ +require 'rexml/namespace' +require 'rexml/xmltokens' +require 'rexml/attribute' +require 'rexml/syncenumerator' +require 'rexml/parsers/xpathparser' + +class Object + def dclone + clone + end +end +class Symbol + def dclone ; self ; end +end +class Fixnum + def dclone ; self ; end +end +class Float + def dclone ; self ; end +end +class Array + def dclone + klone = self.clone + klone.clear + self.each{|v| klone << v.dclone} + klone + end +end + +module REXML + # You don't want to use this class. Really. Use XPath, which is a wrapper + # for this class. Believe me. You don't want to poke around in here. + # There is strange, dark magic at work in this code. Beware. Go back! Go + # back while you still can! + class XPathParser + include XMLTokens + LITERAL = /^'([^']*)'|^"([^"]*)"/u + + def initialize( ) + @parser = REXML::Parsers::XPathParser.new + @namespaces = nil + @variables = {} + end + + def namespaces=( namespaces={} ) + Functions::namespace_context = namespaces + @namespaces = namespaces + end + + def variables=( vars={} ) + Functions::variables = vars + @variables = vars + end + + def parse path, nodeset + #puts "#"*40 + path_stack = @parser.parse( path ) + #puts "PARSE: #{path} => #{path_stack.inspect}" + #puts "PARSE: nodeset = #{nodeset.inspect}" + match( path_stack, nodeset ) + end + + def get_first path, nodeset + #puts "#"*40 + path_stack = @parser.parse( path ) + #puts "PARSE: #{path} => #{path_stack.inspect}" + #puts "PARSE: nodeset = #{nodeset.inspect}" + first( path_stack, nodeset ) + end + + def predicate path, nodeset + path_stack = @parser.parse( path ) + expr( path_stack, nodeset ) + end + + def []=( variable_name, value ) + @variables[ variable_name ] = value + end + + + # Performs a depth-first (document order) XPath search, and returns the + # first match. This is the fastest, lightest way to return a single result. + # + # FIXME: This method is incomplete! + def first( path_stack, node ) + #puts "#{depth}) Entering match( #{path.inspect}, #{tree.inspect} )" + return nil if path.size == 0 + + case path[0] + when :document + # do nothing + return first( path[1..-1], node ) + when :child + for c in node.children + #puts "#{depth}) CHILD checking #{name(c)}" + r = first( path[1..-1], c ) + #puts "#{depth}) RETURNING #{r.inspect}" if r + return r if r + end + when :qname + name = path[2] + #puts "#{depth}) QNAME #{name(tree)} == #{name} (path => #{path.size})" + if node.name == name + #puts "#{depth}) RETURNING #{tree.inspect}" if path.size == 3 + return node if path.size == 3 + return first( path[3..-1], node ) + else + return nil + end + when :descendant_or_self + r = first( path[1..-1], node ) + return r if r + for c in node.children + r = first( path, c ) + return r if r + end + when :node + return first( path[1..-1], node ) + when :any + return first( path[1..-1], node ) + end + return nil + end + + + def match( path_stack, nodeset ) + #puts "MATCH: path_stack = #{path_stack.inspect}" + #puts "MATCH: nodeset = #{nodeset.inspect}" + r = expr( path_stack, nodeset ) + #puts "MAIN EXPR => #{r.inspect}" + r + end + + private + + + # Returns a String namespace for a node, given a prefix + # The rules are: + # + # 1. Use the supplied namespace mapping first. + # 2. If no mapping was supplied, use the context node to look up the namespace + def get_namespace( node, prefix ) + if @namespaces + return @namespaces[prefix] || '' + else + return node.namespace( prefix ) if node.node_type == :element + return '' + end + end + + + # Expr takes a stack of path elements and a set of nodes (either a Parent + # or an Array and returns an Array of matching nodes + ALL = [ :attribute, :element, :text, :processing_instruction, :comment ] + ELEMENTS = [ :element ] + def expr( path_stack, nodeset, context=nil ) + #puts "#"*15 + #puts "In expr with #{path_stack.inspect}" + #puts "Returning" if path_stack.length == 0 || nodeset.length == 0 + node_types = ELEMENTS + return nodeset if path_stack.length == 0 || nodeset.length == 0 + while path_stack.length > 0 + #puts "#"*5 + #puts "Path stack = #{path_stack.inspect}" + #puts "Nodeset is #{nodeset.inspect}" + if nodeset.length == 0 + path_stack.clear + return [] + end + case (op = path_stack.shift) + when :document + nodeset = [ nodeset[0].root_node ] + #puts ":document, nodeset = #{nodeset.inspect}" + + when :qname + #puts "IN QNAME" + prefix = path_stack.shift + name = path_stack.shift + nodeset.delete_if do |node| + # FIXME: This DOUBLES the time XPath searches take + ns = get_namespace( node, prefix ) + #puts "NS = #{ns.inspect}" + #puts "node.node_type == :element => #{node.node_type == :element}" + if node.node_type == :element + #puts "node.name == #{name} => #{node.name == name}" + if node.name == name + #puts "node.namespace == #{ns.inspect} => #{node.namespace == ns}" + end + end + !(node.node_type == :element and + node.name == name and + node.namespace == ns ) + end + node_types = ELEMENTS + + when :any + #puts "ANY 1: nodeset = #{nodeset.inspect}" + #puts "ANY 1: node_types = #{node_types.inspect}" + nodeset.delete_if { |node| !node_types.include?(node.node_type) } + #puts "ANY 2: nodeset = #{nodeset.inspect}" + + when :self + # This space left intentionally blank + + when :processing_instruction + target = path_stack.shift + nodeset.delete_if do |node| + (node.node_type != :processing_instruction) or + ( target!='' and ( node.target != target ) ) + end + + when :text + nodeset.delete_if { |node| node.node_type != :text } + + when :comment + nodeset.delete_if { |node| node.node_type != :comment } + + when :node + # This space left intentionally blank + node_types = ALL + + when :child + new_nodeset = [] + nt = nil + nodeset.each do |node| + nt = node.node_type + new_nodeset += node.children if nt == :element or nt == :document + end + nodeset = new_nodeset + node_types = ELEMENTS + + when :literal + return path_stack.shift + + when :attribute + new_nodeset = [] + case path_stack.shift + when :qname + prefix = path_stack.shift + name = path_stack.shift + for element in nodeset + if element.node_type == :element + #puts "Element name = #{element.name}" + #puts "get_namespace( #{element.inspect}, #{prefix} ) = #{get_namespace(element, prefix)}" + attrib = element.attribute( name, get_namespace(element, prefix) ) + #puts "attrib = #{attrib.inspect}" + new_nodeset << attrib if attrib + end + end + when :any + #puts "ANY" + for element in nodeset + if element.node_type == :element + new_nodeset += element.attributes.to_a + end + end + end + nodeset = new_nodeset + + when :parent + #puts "PARENT 1: nodeset = #{nodeset}" + nodeset = nodeset.collect{|n| n.parent}.compact + #nodeset = expr(path_stack.dclone, nodeset.collect{|n| n.parent}.compact) + #puts "PARENT 2: nodeset = #{nodeset.inspect}" + node_types = ELEMENTS + + when :ancestor + new_nodeset = [] + nodeset.each do |node| + while node.parent + node = node.parent + new_nodeset << node unless new_nodeset.include? node + end + end + nodeset = new_nodeset + node_types = ELEMENTS + + when :ancestor_or_self + new_nodeset = [] + nodeset.each do |node| + if node.node_type == :element + new_nodeset << node + while ( node.parent ) + node = node.parent + new_nodeset << node unless new_nodeset.include? node + end + end + end + nodeset = new_nodeset + node_types = ELEMENTS + + when :predicate + new_nodeset = [] + subcontext = { :size => nodeset.size } + pred = path_stack.shift + nodeset.each_with_index { |node, index| + subcontext[ :node ] = node + #puts "PREDICATE SETTING CONTEXT INDEX TO #{index+1}" + subcontext[ :index ] = index+1 + pc = pred.dclone + #puts "#{node.hash}) Recursing with #{pred.inspect} and [#{node.inspect}]" + result = expr( pc, [node], subcontext ) + result = result[0] if result.kind_of? Array and result.length == 1 + #puts "#{node.hash}) Result = #{result.inspect} (#{result.class.name})" + if result.kind_of? Numeric + #puts "Adding node #{node.inspect}" if result == (index+1) + new_nodeset << node if result == (index+1) + elsif result.instance_of? Array + if result.size > 0 and result.inject(false) {|k,s| s or k} + #puts "Adding node #{node.inspect}" if result.size > 0 + new_nodeset << node if result.size > 0 + end + else + #puts "Adding node #{node.inspect}" if result + new_nodeset << node if result + end + } + #puts "New nodeset = #{new_nodeset.inspect}" + #puts "Path_stack = #{path_stack.inspect}" + nodeset = new_nodeset +=begin + predicate = path_stack.shift + ns = nodeset.clone + result = expr( predicate, ns ) + #puts "Result = #{result.inspect} (#{result.class.name})" + #puts "nodeset = #{nodeset.inspect}" + if result.kind_of? Array + nodeset = result.zip(ns).collect{|m,n| n if m}.compact + else + nodeset = result ? nodeset : [] + end + #puts "Outgoing NS = #{nodeset.inspect}" +=end + + when :descendant_or_self + rv = descendant_or_self( path_stack, nodeset ) + path_stack.clear + nodeset = rv + node_types = ELEMENTS + + when :descendant + results = [] + nt = nil + nodeset.each do |node| + nt = node.node_type + results += expr( path_stack.dclone.unshift( :descendant_or_self ), + node.children ) if nt == :element or nt == :document + end + nodeset = results + node_types = ELEMENTS + + when :following_sibling + #puts "FOLLOWING_SIBLING 1: nodeset = #{nodeset}" + results = [] + nodeset.each do |node| + next if node.parent.nil? + all_siblings = node.parent.children + current_index = all_siblings.index( node ) + following_siblings = all_siblings[ current_index+1 .. -1 ] + results += expr( path_stack.dclone, following_siblings ) + end + #puts "FOLLOWING_SIBLING 2: nodeset = #{nodeset}" + nodeset = results + + when :preceding_sibling + results = [] + nodeset.each do |node| + next if node.parent.nil? + all_siblings = node.parent.children + current_index = all_siblings.index( node ) + preceding_siblings = all_siblings[ 0, current_index ].reverse + results += preceding_siblings + end + nodeset = results + node_types = ELEMENTS + + when :preceding + new_nodeset = [] + nodeset.each do |node| + new_nodeset += preceding( node ) + end + #puts "NEW NODESET => #{new_nodeset.inspect}" + nodeset = new_nodeset + node_types = ELEMENTS + + when :following + new_nodeset = [] + nodeset.each do |node| + new_nodeset += following( node ) + end + nodeset = new_nodeset + node_types = ELEMENTS + + when :namespace + #puts "In :namespace" + new_nodeset = [] + prefix = path_stack.shift + nodeset.each do |node| + if (node.node_type == :element or node.node_type == :attribute) + if @namespaces + namespaces = @namespaces + elsif (node.node_type == :element) + namespaces = node.namespaces + else + namespaces = node.element.namesapces + end + #puts "Namespaces = #{namespaces.inspect}" + #puts "Prefix = #{prefix.inspect}" + #puts "Node.namespace = #{node.namespace}" + if (node.namespace == namespaces[prefix]) + new_nodeset << node + end + end + end + nodeset = new_nodeset + + when :variable + var_name = path_stack.shift + return @variables[ var_name ] + + # :and, :or, :eq, :neq, :lt, :lteq, :gt, :gteq + # TODO: Special case for :or and :and -- not evaluate the right + # operand if the left alone determines result (i.e. is true for + # :or and false for :and). + when :eq, :neq, :lt, :lteq, :gt, :gteq, :or + left = expr( path_stack.shift, nodeset.dup, context ) + #puts "LEFT => #{left.inspect} (#{left.class.name})" + right = expr( path_stack.shift, nodeset.dup, context ) + #puts "RIGHT => #{right.inspect} (#{right.class.name})" + res = equality_relational_compare( left, op, right ) + #puts "RES => #{res.inspect}" + return res + + when :and + left = expr( path_stack.shift, nodeset.dup, context ) + #puts "LEFT => #{left.inspect} (#{left.class.name})" + if left == false || left.nil? || !left.inject(false) {|a,b| a | b} + return [] + end + right = expr( path_stack.shift, nodeset.dup, context ) + #puts "RIGHT => #{right.inspect} (#{right.class.name})" + res = equality_relational_compare( left, op, right ) + #puts "RES => #{res.inspect}" + return res + + when :div + left = Functions::number(expr(path_stack.shift, nodeset, context)).to_f + right = Functions::number(expr(path_stack.shift, nodeset, context)).to_f + return (left / right) + + when :mod + left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + return (left % right) + + when :mult + left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + return (left * right) + + when :plus + left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + return (left + right) + + when :minus + left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f + return (left - right) + + when :union + left = expr( path_stack.shift, nodeset, context ) + right = expr( path_stack.shift, nodeset, context ) + return (left | right) + + when :neg + res = expr( path_stack, nodeset, context ) + return -(res.to_f) + + when :not + when :function + func_name = path_stack.shift.tr('-','_') + arguments = path_stack.shift + #puts "FUNCTION 0: #{func_name}(#{arguments.collect{|a|a.inspect}.join(', ')})" + subcontext = context ? nil : { :size => nodeset.size } + + res = [] + cont = context + nodeset.each_with_index { |n, i| + if subcontext + subcontext[:node] = n + subcontext[:index] = i + cont = subcontext + end + arg_clone = arguments.dclone + args = arg_clone.collect { |arg| + #puts "FUNCTION 1: Calling expr( #{arg.inspect}, [#{n.inspect}] )" + expr( arg, [n], cont ) + } + #puts "FUNCTION 2: #{func_name}(#{args.collect{|a|a.inspect}.join(', ')})" + Functions.context = cont + res << Functions.send( func_name, *args ) + #puts "FUNCTION 3: #{res[-1].inspect}" + } + return res + + end + end # while + #puts "EXPR returning #{nodeset.inspect}" + return nodeset + end + + + ########################################################## + # FIXME + # The next two methods are BAD MOJO! + # This is my achilles heel. If anybody thinks of a better + # way of doing this, be my guest. This really sucks, but + # it is a wonder it works at all. + # ######################################################## + + def descendant_or_self( path_stack, nodeset ) + rs = [] + #puts "#"*80 + #puts "PATH_STACK = #{path_stack.inspect}" + #puts "NODESET = #{nodeset.collect{|n|n.inspect}.inspect}" + d_o_s( path_stack, nodeset, rs ) + #puts "RS = #{rs.collect{|n|n.inspect}.inspect}" + document_order(rs.flatten.compact) + #rs.flatten.compact + end + + def d_o_s( p, ns, r ) + #puts "IN DOS with #{ns.inspect}; ALREADY HAVE #{r.inspect}" + nt = nil + ns.each_index do |i| + n = ns[i] + #puts "P => #{p.inspect}" + x = expr( p.dclone, [ n ] ) + nt = n.node_type + d_o_s( p, n.children, x ) if nt == :element or nt == :document and n.children.size > 0 + r.concat(x) if x.size > 0 + end + end + + + # Reorders an array of nodes so that they are in document order + # It tries to do this efficiently. + # + # FIXME: I need to get rid of this, but the issue is that most of the XPath + # interpreter functions as a filter, which means that we lose context going + # in and out of function calls. If I knew what the index of the nodes was, + # I wouldn't have to do this. Maybe add a document IDX for each node? + # Problems with mutable documents. Or, rewrite everything. + def document_order( array_of_nodes ) + new_arry = [] + array_of_nodes.each { |node| + node_idx = [] + np = node.node_type == :attribute ? node.element : node + while np.parent and np.parent.node_type == :element + node_idx << np.parent.index( np ) + np = np.parent + end + new_arry << [ node_idx.reverse, node ] + } + #puts "new_arry = #{new_arry.inspect}" + new_arry.sort{ |s1, s2| s1[0] <=> s2[0] }.collect{ |s| s[1] } + end + + + def recurse( nodeset, &block ) + for node in nodeset + yield node + recurse( node, &block ) if node.node_type == :element + end + end + + + + # Builds a nodeset of all of the preceding nodes of the supplied node, + # in reverse document order + # preceding:: includes every element in the document that precedes this node, + # except for ancestors + def preceding( node ) + #puts "IN PRECEDING" + ancestors = [] + p = node.parent + while p + ancestors << p + p = p.parent + end + + acc = [] + p = preceding_node_of( node ) + #puts "P = #{p.inspect}" + while p + if ancestors.include? p + ancestors.delete(p) + else + acc << p + end + p = preceding_node_of( p ) + #puts "P = #{p.inspect}" + end + acc + end + + def preceding_node_of( node ) + #puts "NODE: #{node.inspect}" + #puts "PREVIOUS NODE: #{node.previous_sibling_node.inspect}" + #puts "PARENT NODE: #{node.parent}" + psn = node.previous_sibling_node + if psn.nil? + if node.parent.nil? or node.parent.class == Document + return nil + end + return node.parent + #psn = preceding_node_of( node.parent ) + end + while psn and psn.kind_of? Element and psn.children.size > 0 + psn = psn.children[-1] + end + psn + end + + def following( node ) + #puts "IN PRECEDING" + acc = [] + p = next_sibling_node( node ) + #puts "P = #{p.inspect}" + while p + acc << p + p = following_node_of( p ) + #puts "P = #{p.inspect}" + end + acc + end + + def following_node_of( node ) + #puts "NODE: #{node.inspect}" + #puts "PREVIOUS NODE: #{node.previous_sibling_node.inspect}" + #puts "PARENT NODE: #{node.parent}" + if node.kind_of? Element and node.children.size > 0 + return node.children[0] + end + return next_sibling_node(node) + end + + def next_sibling_node(node) + psn = node.next_sibling_node + while psn.nil? + if node.parent.nil? or node.parent.class == Document + return nil + end + node = node.parent + psn = node.next_sibling_node + #puts "psn = #{psn.inspect}" + end + return psn + end + + def norm b + case b + when true, false + return b + when 'true', 'false' + return Functions::boolean( b ) + when /^\d+(\.\d+)?$/ + return Functions::number( b ) + else + return Functions::string( b ) + end + end + + def equality_relational_compare( set1, op, set2 ) + #puts "EQ_REL_COMP(#{set1.inspect} #{op.inspect} #{set2.inspect})" + if set1.kind_of? Array and set2.kind_of? Array + #puts "#{set1.size} & #{set2.size}" + if set1.size == 1 and set2.size == 1 + set1 = set1[0] + set2 = set2[0] + elsif set1.size == 0 or set2.size == 0 + nd = set1.size==0 ? set2 : set1 + rv = nd.collect { |il| compare( il, op, nil ) } + #puts "RV = #{rv.inspect}" + return rv + else + res = [] + enum = SyncEnumerator.new( set1, set2 ).each { |i1, i2| + #puts "i1 = #{i1.inspect} (#{i1.class.name})" + #puts "i2 = #{i2.inspect} (#{i2.class.name})" + i1 = norm( i1 ) + i2 = norm( i2 ) + res << compare( i1, op, i2 ) + } + return res + end + end + #puts "EQ_REL_COMP: #{set1.inspect} (#{set1.class.name}), #{op}, #{set2.inspect} (#{set2.class.name})" + #puts "COMPARING VALUES" + # If one is nodeset and other is number, compare number to each item + # in nodeset s.t. number op number(string(item)) + # If one is nodeset and other is string, compare string to each item + # in nodeset s.t. string op string(item) + # If one is nodeset and other is boolean, compare boolean to each item + # in nodeset s.t. boolean op boolean(item) + if set1.kind_of? Array or set2.kind_of? Array + #puts "ISA ARRAY" + if set1.kind_of? Array + a = set1 + b = set2 + else + a = set2 + b = set1 + end + + case b + when true, false + return a.collect {|v| compare( Functions::boolean(v), op, b ) } + when Numeric + return a.collect {|v| compare( Functions::number(v), op, b )} + when /^\d+(\.\d+)?$/ + b = Functions::number( b ) + #puts "B = #{b.inspect}" + return a.collect {|v| compare( Functions::number(v), op, b )} + else + #puts "Functions::string( #{b}(#{b.class.name}) ) = #{Functions::string(b)}" + b = Functions::string( b ) + return a.collect { |v| compare( Functions::string(v), op, b ) } + end + else + # If neither is nodeset, + # If op is = or != + # If either boolean, convert to boolean + # If either number, convert to number + # Else, convert to string + # Else + # Convert both to numbers and compare + s1 = set1.to_s + s2 = set2.to_s + #puts "EQ_REL_COMP: #{set1}=>#{s1}, #{set2}=>#{s2}" + if s1 == 'true' or s1 == 'false' or s2 == 'true' or s2 == 'false' + #puts "Functions::boolean(#{set1})=>#{Functions::boolean(set1)}" + #puts "Functions::boolean(#{set2})=>#{Functions::boolean(set2)}" + set1 = Functions::boolean( set1 ) + set2 = Functions::boolean( set2 ) + else + if op == :eq or op == :neq + if s1 =~ /^\d+(\.\d+)?$/ or s2 =~ /^\d+(\.\d+)?$/ + set1 = Functions::number( s1 ) + set2 = Functions::number( s2 ) + else + set1 = Functions::string( set1 ) + set2 = Functions::string( set2 ) + end + else + set1 = Functions::number( set1 ) + set2 = Functions::number( set2 ) + end + end + #puts "EQ_REL_COMP: #{set1} #{op} #{set2}" + #puts ">>> #{compare( set1, op, set2 )}" + return compare( set1, op, set2 ) + end + return false + end + + def compare a, op, b + #puts "COMPARE #{a.inspect}(#{a.class.name}) #{op} #{b.inspect}(#{b.class.name})" + case op + when :eq + a == b + when :neq + a != b + when :lt + a < b + when :lteq + a <= b + when :gt + a > b + when :gteq + a >= b + when :and + a and b + when :or + a or b + else + false + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rinda/.document b/lib/ruby-1.9.1-rc1/lib/rinda/.document new file mode 100644 index 0000000..598977a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rinda/.document @@ -0,0 +1,3 @@ +rinda.rb +ring.rb +tuplespace.rb diff --git a/lib/ruby-1.9.1-rc1/lib/rinda/rinda.rb b/lib/ruby-1.9.1-rc1/lib/rinda/rinda.rb new file mode 100644 index 0000000..6c59e68 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rinda/rinda.rb @@ -0,0 +1,283 @@ +require 'drb/drb' +require 'thread' + +## +# A module to implement the Linda distributed computing paradigm in Ruby. +# +# Rinda is part of DRb (dRuby). +# +# == Example(s) +# +# See the sample/drb/ directory in the Ruby distribution, from 1.8.2 onwards. +# +#-- +# TODO +# == Introduction to Linda/rinda? +# +# == Why is this library separate from DRb? + +module Rinda + + ## + # Rinda error base class + + class RindaError < RuntimeError; end + + ## + # Raised when a hash-based tuple has an invalid key. + + class InvalidHashTupleKey < RindaError; end + + ## + # Raised when trying to use a canceled tuple. + + class RequestCanceledError < ThreadError; end + + ## + # Raised when trying to use an expired tuple. + + class RequestExpiredError < ThreadError; end + + ## + # A tuple is the elementary object in Rinda programming. + # Tuples may be matched against templates if the tuple and + # the template are the same size. + + class Tuple + + ## + # Creates a new Tuple from +ary_or_hash+ which must be an Array or Hash. + + def initialize(ary_or_hash) + if hash?(ary_or_hash) + init_with_hash(ary_or_hash) + else + init_with_ary(ary_or_hash) + end + end + + ## + # The number of elements in the tuple. + + def size + @tuple.size + end + + ## + # Accessor method for elements of the tuple. + + def [](k) + @tuple[k] + end + + ## + # Fetches item +k+ from the tuple. + + def fetch(k) + @tuple.fetch(k) + end + + ## + # Iterate through the tuple, yielding the index or key, and the + # value, thus ensuring arrays are iterated similarly to hashes. + + def each # FIXME + if Hash === @tuple + @tuple.each { |k, v| yield(k, v) } + else + @tuple.each_with_index { |v, k| yield(k, v) } + end + end + + ## + # Return the tuple itself + def value + @tuple + end + + private + + def hash?(ary_or_hash) + ary_or_hash.respond_to?(:keys) + end + + ## + # Munges +ary+ into a valid Tuple. + + def init_with_ary(ary) + @tuple = Array.new(ary.size) + @tuple.size.times do |i| + @tuple[i] = ary[i] + end + end + + ## + # Ensures +hash+ is a valid Tuple. + + def init_with_hash(hash) + @tuple = Hash.new + hash.each do |k, v| + raise InvalidHashTupleKey unless String === k + @tuple[k] = v + end + end + + end + + ## + # Templates are used to match tuples in Rinda. + + class Template < Tuple + + ## + # Matches this template against +tuple+. The +tuple+ must be the same + # size as the template. An element with a +nil+ value in a template acts + # as a wildcard, matching any value in the corresponding position in the + # tuple. Elements of the template match the +tuple+ if the are #== or + # #===. + # + # Template.new([:foo, 5]).match Tuple.new([:foo, 5]) # => true + # Template.new([:foo, nil]).match Tuple.new([:foo, 5]) # => true + # Template.new([String]).match Tuple.new(['hello']) # => true + # + # Template.new([:foo]).match Tuple.new([:foo, 5]) # => false + # Template.new([:foo, 6]).match Tuple.new([:foo, 5]) # => false + # Template.new([:foo, nil]).match Tuple.new([:foo]) # => false + # Template.new([:foo, 6]).match Tuple.new([:foo]) # => false + + def match(tuple) + return false unless tuple.respond_to?(:size) + return false unless tuple.respond_to?(:fetch) + return false unless self.size == tuple.size + each do |k, v| + begin + it = tuple.fetch(k) + rescue + return false + end + next if v.nil? + next if v == it + next if v === it + return false + end + return true + end + + ## + # Alias for #match. + + def ===(tuple) + match(tuple) + end + + end + + ## + # Documentation? + + class DRbObjectTemplate + + ## + # Creates a new DRbObjectTemplate that will match against +uri+ and +ref+. + + def initialize(uri=nil, ref=nil) + @drb_uri = uri + @drb_ref = ref + end + + ## + # This DRbObjectTemplate matches +ro+ if the remote object's drburi and + # drbref are the same. +nil+ is used as a wildcard. + + def ===(ro) + return true if super(ro) + unless @drb_uri.nil? + return false unless (@drb_uri === ro.__drburi rescue false) + end + unless @drb_ref.nil? + return false unless (@drb_ref === ro.__drbref rescue false) + end + true + end + + end + + ## + # TupleSpaceProxy allows a remote Tuplespace to appear as local. + + class TupleSpaceProxy + + ## + # Creates a new TupleSpaceProxy to wrap +ts+. + + def initialize(ts) + @ts = ts + end + + ## + # Adds +tuple+ to the proxied TupleSpace. See TupleSpace#write. + + def write(tuple, sec=nil) + @ts.write(tuple, sec) + end + + ## + # Takes +tuple+ from the proxied TupleSpace. See TupleSpace#take. + + def take(tuple, sec=nil, &block) + port = [] + @ts.move(DRbObject.new(port), tuple, sec, &block) + port[0] + end + + ## + # Reads +tuple+ from the proxied TupleSpace. See TupleSpace#read. + + def read(tuple, sec=nil, &block) + @ts.read(tuple, sec, &block) + end + + ## + # Reads all tuples matching +tuple+ from the proxied TupleSpace. See + # TupleSpace#read_all. + + def read_all(tuple) + @ts.read_all(tuple) + end + + ## + # Registers for notifications of event +ev+ on the proxied TupleSpace. + # See TupleSpace#notify + + def notify(ev, tuple, sec=nil) + @ts.notify(ev, tuple, sec) + end + + end + + ## + # An SimpleRenewer allows a TupleSpace to check if a TupleEntry is still + # alive. + + class SimpleRenewer + + include DRbUndumped + + ## + # Creates a new SimpleRenewer that keeps an object alive for another +sec+ + # seconds. + + def initialize(sec=180) + @sec = sec + end + + ## + # Called by the TupleSpace to check if the object is still alive. + + def renew + @sec + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rinda/ring.rb b/lib/ruby-1.9.1-rc1/lib/rinda/ring.rb new file mode 100644 index 0000000..4dc7c7d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rinda/ring.rb @@ -0,0 +1,271 @@ +# +# Note: Rinda::Ring API is unstable. +# +require 'drb/drb' +require 'rinda/rinda' +require 'thread' + +module Rinda + + ## + # The default port Ring discovery will use. + + Ring_PORT = 7647 + + ## + # A RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. + # Service location uses the following steps: + # + # 1. A RingServer begins listening on the broadcast UDP address. + # 2. A RingFinger sends a UDP packet containing the DRb URI where it will + # listen for a reply. + # 3. The RingServer receives the UDP packet and connects back to the + # provided DRb URI with the DRb service. + + class RingServer + + include DRbUndumped + + ## + # Advertises +ts+ on the UDP broadcast address at +port+. + + def initialize(ts, port=Ring_PORT) + @ts = ts + @soc = UDPSocket.open + @soc.bind('', port) + @w_service = write_service + @r_service = reply_service + end + + ## + # Creates a thread that picks up UDP packets and passes them to do_write + # for decoding. + + def write_service + Thread.new do + loop do + msg = @soc.recv(1024) + do_write(msg) + end + end + end + + ## + # Extracts the response URI from +msg+ and adds it to TupleSpace where it + # will be picked up by +reply_service+ for notification. + + def do_write(msg) + Thread.new do + begin + tuple, sec = Marshal.load(msg) + @ts.write(tuple, sec) + rescue + end + end + end + + ## + # Creates a thread that notifies waiting clients from the TupleSpace. + + def reply_service + Thread.new do + loop do + do_reply + end + end + end + + ## + # Pulls lookup tuples out of the TupleSpace and sends their DRb object the + # address of the local TupleSpace. + + def do_reply + tuple = @ts.take([:lookup_ring, DRbObject]) + Thread.new { tuple[1].call(@ts) rescue nil} + rescue + end + + end + + ## + # RingFinger is used by RingServer clients to discover the RingServer's + # TupleSpace. Typically, all a client needs to do is call + # RingFinger.primary to retrieve the remote TupleSpace, which it can then + # begin using. + + class RingFinger + + @@broadcast_list = ['', 'localhost'] + + @@finger = nil + + ## + # Creates a singleton RingFinger and looks for a RingServer. Returns the + # created RingFinger. + + def self.finger + unless @@finger + @@finger = self.new + @@finger.lookup_ring_any + end + @@finger + end + + ## + # Returns the first advertised TupleSpace. + + def self.primary + finger.primary + end + + ## + # Contains all discovered TupleSpaces except for the primary. + + def self.to_a + finger.to_a + end + + ## + # The list of addresses where RingFinger will send query packets. + + attr_accessor :broadcast_list + + ## + # The port that RingFinger will send query packets to. + + attr_accessor :port + + ## + # Contain the first advertised TupleSpace after lookup_ring_any is called. + + attr_accessor :primary + + ## + # Creates a new RingFinger that will look for RingServers at +port+ on + # the addresses in +broadcast_list+. + + def initialize(broadcast_list=@@broadcast_list, port=Ring_PORT) + @broadcast_list = broadcast_list || ['localhost'] + @port = port + @primary = nil + @rings = [] + end + + ## + # Contains all discovered TupleSpaces except for the primary. + + def to_a + @rings + end + + ## + # Iterates over all discovered TupleSpaces starting with the primary. + + def each + lookup_ring_any unless @primary + return unless @primary + yield(@primary) + @rings.each { |x| yield(x) } + end + + ## + # Looks up RingServers waiting +timeout+ seconds. RingServers will be + # given +block+ as a callback, which will be called with the remote + # TupleSpace. + + def lookup_ring(timeout=5, &block) + return lookup_ring_any(timeout) unless block_given? + + msg = Marshal.dump([[:lookup_ring, DRbObject.new(block)], timeout]) + @broadcast_list.each do |it| + soc = UDPSocket.open + begin + soc.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true) + soc.send(msg, 0, it, @port) + rescue + nil + ensure + soc.close + end + end + sleep(timeout) + end + + ## + # Returns the first found remote TupleSpace. Any further recovered + # TupleSpaces can be found by calling +to_a+. + + def lookup_ring_any(timeout=5) + queue = Queue.new + + th = Thread.new do + self.lookup_ring(timeout) do |ts| + queue.push(ts) + end + queue.push(nil) + while it = queue.pop + @rings.push(it) + end + end + + @primary = queue.pop + raise('RingNotFound') if @primary.nil? + @primary + end + + end + + ## + # RingProvider uses a RingServer advertised TupleSpace as a name service. + # TupleSpace clients can register themselves with the remote TupleSpace and + # look up other provided services via the remote TupleSpace. + # + # Services are registered with a tuple of the format [:name, klass, + # DRbObject, description]. + + class RingProvider + + ## + # Creates a RingProvider that will provide a +klass+ service running on + # +front+, with a +description+. +renewer+ is optional. + + def initialize(klass, front, desc, renewer = nil) + @tuple = [:name, klass, front, desc] + @renewer = renewer || Rinda::SimpleRenewer.new + end + + ## + # Advertises this service on the primary remote TupleSpace. + + def provide + ts = Rinda::RingFinger.primary + ts.write(@tuple, @renewer) + end + + end + +end + +if __FILE__ == $0 + DRb.start_service + case ARGV.shift + when 's' + require 'rinda/tuplespace' + ts = Rinda::TupleSpace.new + place = Rinda::RingServer.new(ts) + $stdin.gets + when 'w' + finger = Rinda::RingFinger.new(nil) + finger.lookup_ring do |ts2| + p ts2 + ts2.write([:hello, :world]) + end + when 'r' + finger = Rinda::RingFinger.new(nil) + finger.lookup_ring do |ts2| + p ts2 + p ts2.take([nil, nil]) + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rinda/tuplespace.rb b/lib/ruby-1.9.1-rc1/lib/rinda/tuplespace.rb new file mode 100644 index 0000000..6ca30a7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rinda/tuplespace.rb @@ -0,0 +1,642 @@ +require 'monitor' +require 'thread' +require 'drb/drb' +require 'rinda/rinda' +require 'enumerator' +require 'forwardable' + +module Rinda + + ## + # A TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace) + # together with expiry and cancellation data. + + class TupleEntry + + include DRbUndumped + + attr_accessor :expires + + ## + # Creates a TupleEntry based on +ary+ with an optional renewer or expiry + # time +sec+. + # + # A renewer must implement the +renew+ method which returns a Numeric, + # nil, or true to indicate when the tuple has expired. + + def initialize(ary, sec=nil) + @cancel = false + @expires = nil + @tuple = make_tuple(ary) + @renewer = nil + renew(sec) + end + + ## + # Marks this TupleEntry as canceled. + + def cancel + @cancel = true + end + + ## + # A TupleEntry is dead when it is canceled or expired. + + def alive? + !canceled? && !expired? + end + + ## + # Return the object which makes up the tuple itself: the Array + # or Hash. + + def value; @tuple.value; end + + ## + # Returns the canceled status. + + def canceled?; @cancel; end + + ## + # Has this tuple expired? (true/false). + # + # A tuple has expired when its expiry timer based on the +sec+ argument to + # #initialize runs out. + + def expired? + return true unless @expires + return false if @expires > Time.now + return true if @renewer.nil? + renew(@renewer) + return true unless @expires + return @expires < Time.now + end + + ## + # Reset the expiry time according to +sec_or_renewer+. + # + # +nil+:: it is set to expire in the far future. + # +false+:: it has expired. + # Numeric:: it will expire in that many seconds. + # + # Otherwise the argument refers to some kind of renewer object + # which will reset its expiry time. + + def renew(sec_or_renewer) + sec, @renewer = get_renewer(sec_or_renewer) + @expires = make_expires(sec) + end + + ## + # Returns an expiry Time based on +sec+ which can be one of: + # Numeric:: +sec+ seconds into the future + # +true+:: the expiry time is the start of 1970 (i.e. expired) + # +nil+:: it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when + # UNIX clocks will die) + + def make_expires(sec=nil) + case sec + when Numeric + Time.now + sec + when true + Time.at(1) + when nil + Time.at(2**31-1) + end + end + + ## + # Retrieves +key+ from the tuple. + + def [](key) + @tuple[key] + end + + ## + # Fetches +key+ from the tuple. + + def fetch(key) + @tuple.fetch(key) + end + + ## + # The size of the tuple. + + def size + @tuple.size + end + + ## + # Creates a Rinda::Tuple for +ary+. + + def make_tuple(ary) + Rinda::Tuple.new(ary) + end + + private + + ## + # Returns a valid argument to make_expires and the renewer or nil. + # + # Given +true+, +nil+, or Numeric, returns that value and +nil+ (no actual + # renewer). Otherwise it returns an expiry value from calling +it.renew+ + # and the renewer. + + def get_renewer(it) + case it + when Numeric, true, nil + return it, nil + else + begin + return it.renew, it + rescue Exception + return it, nil + end + end + end + + end + + ## + # A TemplateEntry is a Template together with expiry and cancellation data. + + class TemplateEntry < TupleEntry + ## + # Matches this TemplateEntry against +tuple+. See Template#match for + # details on how a Template matches a Tuple. + + def match(tuple) + @tuple.match(tuple) + end + + alias === match + + def make_tuple(ary) # :nodoc: + Rinda::Template.new(ary) + end + + end + + ## + # Documentation? + + class WaitTemplateEntry < TemplateEntry + + attr_reader :found + + def initialize(place, ary, expires=nil) + super(ary, expires) + @place = place + @cond = place.new_cond + @found = nil + end + + def cancel + super + signal + end + + def wait + @cond.wait + end + + def read(tuple) + @found = tuple + signal + end + + def signal + @place.synchronize do + @cond.signal + end + end + + end + + ## + # A NotifyTemplateEntry is returned by TupleSpace#notify and is notified of + # TupleSpace changes. You may receive either your subscribed event or the + # 'close' event when iterating over notifications. + # + # See TupleSpace#notify_event for valid notification types. + # + # == Example + # + # ts = Rinda::TupleSpace.new + # observer = ts.notify 'write', [nil] + # + # Thread.start do + # observer.each { |t| p t } + # end + # + # 3.times { |i| ts.write [i] } + # + # Outputs: + # + # ['write', [0]] + # ['write', [1]] + # ['write', [2]] + + class NotifyTemplateEntry < TemplateEntry + + ## + # Creates a new NotifyTemplateEntry that watches +place+ for +event+s that + # match +tuple+. + + def initialize(place, event, tuple, expires=nil) + ary = [event, Rinda::Template.new(tuple)] + super(ary, expires) + @queue = Queue.new + @done = false + end + + ## + # Called by TupleSpace to notify this NotifyTemplateEntry of a new event. + + def notify(ev) + @queue.push(ev) + end + + ## + # Retrieves a notification. Raises RequestExpiredError when this + # NotifyTemplateEntry expires. + + def pop + raise RequestExpiredError if @done + it = @queue.pop + @done = true if it[0] == 'close' + return it + end + + ## + # Yields event/tuple pairs until this NotifyTemplateEntry expires. + + def each # :yields: event, tuple + while !@done + it = pop + yield(it) + end + rescue + ensure + cancel + end + + end + + ## + # TupleBag is an unordered collection of tuples. It is the basis + # of Tuplespace. + + class TupleBag + class TupleBin + extend Forwardable + def_delegators '@bin', :find_all, :delete_if, :each, :empty? + + def initialize + @bin = [] + end + + def add(tuple) + @bin.push(tuple) + end + + def delete(tuple) + idx = @bin.rindex(tuple) + @bin.delete_at(idx) if idx + end + + def find(&blk) + @bin.reverse_each do |x| + return x if yield(x) + end + nil + end + end + + def initialize # :nodoc: + @hash = {} + @enum = enum_for(:each_entry) + end + + ## + # +true+ if the TupleBag to see if it has any expired entries. + + def has_expires? + @enum.find do |tuple| + tuple.expires + end + end + + ## + # Add +tuple+ to the TupleBag. + + def push(tuple) + key = bin_key(tuple) + @hash[key] ||= TupleBin.new + @hash[key].add(tuple) + end + + ## + # Removes +tuple+ from the TupleBag. + + def delete(tuple) + key = bin_key(tuple) + bin = @hash[key] + return nil unless bin + bin.delete(tuple) + @hash.delete(key) if bin.empty? + tuple + end + + ## + # Finds all live tuples that match +template+. + def find_all(template) + bin_for_find(template).find_all do |tuple| + tuple.alive? && template.match(tuple) + end + end + + ## + # Finds a live tuple that matches +template+. + + def find(template) + bin_for_find(template).find do |tuple| + tuple.alive? && template.match(tuple) + end + end + + ## + # Finds all tuples in the TupleBag which when treated as templates, match + # +tuple+ and are alive. + + def find_all_template(tuple) + @enum.find_all do |template| + template.alive? && template.match(tuple) + end + end + + ## + # Delete tuples which dead tuples from the TupleBag, returning the deleted + # tuples. + + def delete_unless_alive + deleted = [] + @hash.each do |key, bin| + bin.delete_if do |tuple| + if tuple.alive? + false + else + deleted.push(tuple) + true + end + end + end + deleted + end + + private + def each_entry(&blk) + @hash.each do |k, v| + v.each(&blk) + end + end + + def bin_key(tuple) + head = tuple[0] + if head.class == Symbol + return head + else + false + end + end + + def bin_for_find(template) + key = bin_key(template) + key ? @hash.fetch(key, []) : @enum + end + end + + ## + # The Tuplespace manages access to the tuples it contains, + # ensuring mutual exclusion requirements are met. + # + # The +sec+ option for the write, take, move, read and notify methods may + # either be a number of seconds or a Renewer object. + + class TupleSpace + + include DRbUndumped + include MonitorMixin + + ## + # Creates a new TupleSpace. +period+ is used to control how often to look + # for dead tuples after modifications to the TupleSpace. + # + # If no dead tuples are found +period+ seconds after the last + # modification, the TupleSpace will stop looking for dead tuples. + + def initialize(period=60) + super() + @bag = TupleBag.new + @read_waiter = TupleBag.new + @take_waiter = TupleBag.new + @notify_waiter = TupleBag.new + @period = period + @keeper = nil + end + + ## + # Adds +tuple+ + + def write(tuple, sec=nil) + entry = create_entry(tuple, sec) + synchronize do + if entry.expired? + @read_waiter.find_all_template(entry).each do |template| + template.read(tuple) + end + notify_event('write', entry.value) + notify_event('delete', entry.value) + else + @bag.push(entry) + start_keeper if entry.expires + @read_waiter.find_all_template(entry).each do |template| + template.read(tuple) + end + @take_waiter.find_all_template(entry).each do |template| + template.signal + end + notify_event('write', entry.value) + end + end + entry + end + + ## + # Removes +tuple+ + + def take(tuple, sec=nil, &block) + move(nil, tuple, sec, &block) + end + + ## + # Moves +tuple+ to +port+. + + def move(port, tuple, sec=nil) + template = WaitTemplateEntry.new(self, tuple, sec) + yield(template) if block_given? + synchronize do + entry = @bag.find(template) + if entry + port.push(entry.value) if port + @bag.delete(entry) + notify_event('take', entry.value) + return entry.value + end + raise RequestExpiredError if template.expired? + + begin + @take_waiter.push(template) + start_keeper if template.expires + while true + raise RequestCanceledError if template.canceled? + raise RequestExpiredError if template.expired? + entry = @bag.find(template) + if entry + port.push(entry.value) if port + @bag.delete(entry) + notify_event('take', entry.value) + return entry.value + end + template.wait + end + ensure + @take_waiter.delete(template) + end + end + end + + ## + # Reads +tuple+, but does not remove it. + + def read(tuple, sec=nil) + template = WaitTemplateEntry.new(self, tuple, sec) + yield(template) if block_given? + synchronize do + entry = @bag.find(template) + return entry.value if entry + raise RequestExpiredError if template.expired? + + begin + @read_waiter.push(template) + start_keeper if template.expires + template.wait + raise RequestCanceledError if template.canceled? + raise RequestExpiredError if template.expired? + return template.found + ensure + @read_waiter.delete(template) + end + end + end + + ## + # Returns all tuples matching +tuple+. Does not remove the found tuples. + + def read_all(tuple) + template = WaitTemplateEntry.new(self, tuple, nil) + synchronize do + entry = @bag.find_all(template) + entry.collect do |e| + e.value + end + end + end + + ## + # Registers for notifications of +event+. Returns a NotifyTemplateEntry. + # See NotifyTemplateEntry for examples of how to listen for notifications. + # + # +event+ can be: + # 'write':: A tuple was added + # 'take':: A tuple was taken or moved + # 'delete':: A tuple was lost after being overwritten or expiring + # + # The TupleSpace will also notify you of the 'close' event when the + # NotifyTemplateEntry has expired. + + def notify(event, tuple, sec=nil) + template = NotifyTemplateEntry.new(self, event, tuple, sec) + synchronize do + @notify_waiter.push(template) + end + template + end + + private + + def create_entry(tuple, sec) + TupleEntry.new(tuple, sec) + end + + ## + # Removes dead tuples. + + def keep_clean + synchronize do + @read_waiter.delete_unless_alive.each do |e| + e.signal + end + @take_waiter.delete_unless_alive.each do |e| + e.signal + end + @notify_waiter.delete_unless_alive.each do |e| + e.notify(['close']) + end + @bag.delete_unless_alive.each do |e| + notify_event('delete', e.value) + end + end + end + + ## + # Notifies all registered listeners for +event+ of a status change of + # +tuple+. + + def notify_event(event, tuple) + ev = [event, tuple] + @notify_waiter.find_all_template(ev).each do |template| + template.notify(ev) + end + end + + ## + # Creates a thread that scans the tuplespace for expired tuples. + + def start_keeper + return if @keeper && @keeper.alive? + @keeper = Thread.new do + while true + sleep(@period) + synchronize do + break unless need_keeper? + keep_clean + end + end + end + end + + ## + # Checks the tuplespace to see if it needs cleaning. + + def need_keeper? + return true if @bag.has_expires? + return true if @read_waiter.has_expires? + return true if @take_waiter.has_expires? + return true if @notify_waiter.has_expires? + end + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rss.rb b/lib/ruby-1.9.1-rc1/lib/rss.rb new file mode 100644 index 0000000..a1d0f76 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss.rb @@ -0,0 +1,19 @@ +# Copyright (c) 2003-2007 Kouhei Sutou. You can redistribute it and/or +# modify it under the same terms as Ruby. +# +# Author:: Kouhei Sutou +# Tutorial:: http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en + +require 'rss/1.0' +require 'rss/2.0' +require 'rss/atom' +require 'rss/content' +require 'rss/dublincore' +require 'rss/image' +require 'rss/itunes' +require 'rss/slash' +require 'rss/syndication' +require 'rss/taxonomy' +require 'rss/trackback' + +require "rss/maker" diff --git a/lib/ruby-1.9.1-rc1/lib/rss/0.9.rb b/lib/ruby-1.9.1-rc1/lib/rss/0.9.rb new file mode 100644 index 0000000..7b24e75 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/0.9.rb @@ -0,0 +1,428 @@ +require "rss/parser" + +module RSS + + module RSS09 + NSPOOL = {} + ELEMENTS = [] + + def self.append_features(klass) + super + + klass.install_must_call_validator('', "") + end + end + + class Rss < Element + + include RSS09 + include RootElementMixin + + %w(channel).each do |name| + install_have_child_element(name, "", nil) + end + + attr_writer :feed_version + alias_method(:rss_version, :feed_version) + alias_method(:rss_version=, :feed_version=) + + def initialize(feed_version, version=nil, encoding=nil, standalone=nil) + super + @feed_type = "rss" + end + + def items + if @channel + @channel.items + else + [] + end + end + + def image + if @channel + @channel.image + else + nil + end + end + + def textinput + if @channel + @channel.textInput + else + nil + end + end + + def setup_maker_elements(maker) + super + items.each do |item| + item.setup_maker(maker.items) + end + image.setup_maker(maker) if image + textinput.setup_maker(maker) if textinput + end + + private + def _attrs + [ + ["version", true, "feed_version"], + ] + end + + class Channel < Element + + include RSS09 + + [ + ["title", nil, :text], + ["link", nil, :text], + ["description", nil, :text], + ["language", nil, :text], + ["copyright", "?", :text], + ["managingEditor", "?", :text], + ["webMaster", "?", :text], + ["rating", "?", :text], + ["pubDate", "?", :date, :rfc822], + ["lastBuildDate", "?", :date, :rfc822], + ["docs", "?", :text], + ["cloud", "?", :have_attribute], + ["skipDays", "?", :have_child], + ["skipHours", "?", :have_child], + ["image", nil, :have_child], + ["item", "*", :have_children], + ["textInput", "?", :have_child], + ].each do |name, occurs, type, *args| + __send__("install_#{type}_element", name, "", occurs, name, *args) + end + alias date pubDate + alias date= pubDate= + + private + def maker_target(maker) + maker.channel + end + + def setup_maker_elements(channel) + super + [ + [skipDays, "day"], + [skipHours, "hour"], + ].each do |skip, key| + if skip + skip.__send__("#{key}s").each do |val| + target_skips = channel.__send__("skip#{key.capitalize}s") + new_target = target_skips.__send__("new_#{key}") + new_target.content = val.content + end + end + end + end + + def not_need_to_call_setup_maker_variables + %w(image textInput) + end + + class SkipDays < Element + include RSS09 + + [ + ["day", "*"] + ].each do |name, occurs| + install_have_children_element(name, "", occurs) + end + + class Day < Element + include RSS09 + + content_setup + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.content = args[0] + end + end + + end + + end + + class SkipHours < Element + include RSS09 + + [ + ["hour", "*"] + ].each do |name, occurs| + install_have_children_element(name, "", occurs) + end + + class Hour < Element + include RSS09 + + content_setup(:integer) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.content = args[0] + end + end + end + + end + + class Image < Element + + include RSS09 + + %w(url title link).each do |name| + install_text_element(name, "", nil) + end + [ + ["width", :integer], + ["height", :integer], + ["description"], + ].each do |name, type| + install_text_element(name, "", "?", name, type) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.url = args[0] + self.title = args[1] + self.link = args[2] + self.width = args[3] + self.height = args[4] + self.description = args[5] + end + end + + private + def maker_target(maker) + maker.image + end + end + + class Cloud < Element + + include RSS09 + + [ + ["domain", "", true], + ["port", "", true, :integer], + ["path", "", true], + ["registerProcedure", "", true], + ["protocol", "", true], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.domain = args[0] + self.port = args[1] + self.path = args[2] + self.registerProcedure = args[3] + self.protocol = args[4] + end + end + end + + class Item < Element + + include RSS09 + + [ + ["title", '?', :text], + ["link", '?', :text], + ["description", '?', :text], + ["category", '*', :have_children, "categories"], + ["source", '?', :have_child], + ["enclosure", '?', :have_child], + ].each do |tag, occurs, type, *args| + __send__("install_#{type}_element", tag, "", occurs, tag, *args) + end + + private + def maker_target(items) + if items.respond_to?("items") + # For backward compatibility + items = items.items + end + items.new_item + end + + def setup_maker_element(item) + super + @enclosure.setup_maker(item) if @enclosure + @source.setup_maker(item) if @source + end + + class Source < Element + + include RSS09 + + [ + ["url", "", true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required) + end + + content_setup + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.url = args[0] + self.content = args[1] + end + end + + private + def maker_target(item) + item.source + end + + def setup_maker_attributes(source) + source.url = url + source.content = content + end + end + + class Enclosure < Element + + include RSS09 + + [ + ["url", "", true], + ["length", "", true, :integer], + ["type", "", true], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.url = args[0] + self.length = args[1] + self.type = args[2] + end + end + + private + def maker_target(item) + item.enclosure + end + + def setup_maker_attributes(enclosure) + enclosure.url = url + enclosure.length = length + enclosure.type = type + end + end + + class Category < Element + + include RSS09 + + [ + ["domain", "", false] + ].each do |name, uri, required| + install_get_attribute(name, uri, required) + end + + content_setup + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.domain = args[0] + self.content = args[1] + end + end + + private + def maker_target(item) + item.new_category + end + + def setup_maker_attributes(category) + category.domain = domain + category.content = content + end + + end + + end + + class TextInput < Element + + include RSS09 + + %w(title description name link).each do |name| + install_text_element(name, "", nil) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.title = args[0] + self.description = args[1] + self.name = args[2] + self.link = args[3] + end + end + + private + def maker_target(maker) + maker.textinput + end + end + + end + + end + + RSS09::ELEMENTS.each do |name| + BaseListener.install_get_text_element("", name, name) + end + + module ListenerMixin + private + def initial_start_rss(tag_name, prefix, attrs, ns) + check_ns(tag_name, prefix, ns, "") + + @rss = Rss.new(attrs['version'], @version, @encoding, @standalone) + @rss.do_validate = @do_validate + @rss.xml_stylesheets = @xml_stylesheets + @last_element = @rss + pr = Proc.new do |text, tags| + @rss.validate_for_stream(tags, @ignore_unknown_element) if @do_validate + end + @proc_stack.push(pr) + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/1.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/1.0.rb new file mode 100644 index 0000000..f04e61c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/1.0.rb @@ -0,0 +1,452 @@ +require "rss/parser" + +module RSS + + module RSS10 + NSPOOL = {} + ELEMENTS = [] + + def self.append_features(klass) + super + + klass.install_must_call_validator('', ::RSS::URI) + end + + end + + class RDF < Element + + include RSS10 + include RootElementMixin + + class << self + + def required_uri + URI + end + + end + + @tag_name = 'RDF' + + PREFIX = 'rdf' + URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" + + install_ns('', ::RSS::URI) + install_ns(PREFIX, URI) + + [ + ["channel", nil], + ["image", "?"], + ["item", "+", :children], + ["textinput", "?"], + ].each do |tag, occurs, type| + type ||= :child + __send__("install_have_#{type}_element", tag, ::RSS::URI, occurs) + end + + alias_method(:rss_version, :feed_version) + def initialize(version=nil, encoding=nil, standalone=nil) + super('1.0', version, encoding, standalone) + @feed_type = "rss" + end + + def full_name + tag_name_with_prefix(PREFIX) + end + + class Li < Element + + include RSS10 + + class << self + def required_uri + URI + end + end + + [ + ["resource", [URI, ""], true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.resource = args[0] + end + end + + def full_name + tag_name_with_prefix(PREFIX) + end + end + + class Seq < Element + + include RSS10 + + Li = ::RSS::RDF::Li + + class << self + def required_uri + URI + end + end + + @tag_name = 'Seq' + + install_have_children_element("li", URI, "*") + install_must_call_validator('rdf', ::RSS::RDF::URI) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + @li = args[0] if args[0] + end + end + + def full_name + tag_name_with_prefix(PREFIX) + end + + def setup_maker(target) + lis.each do |li| + target << li.resource + end + end + end + + class Bag < Element + + include RSS10 + + Li = ::RSS::RDF::Li + + class << self + def required_uri + URI + end + end + + @tag_name = 'Bag' + + install_have_children_element("li", URI, "*") + install_must_call_validator('rdf', URI) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + @li = args[0] if args[0] + end + end + + def full_name + tag_name_with_prefix(PREFIX) + end + + def setup_maker(target) + lis.each do |li| + target << li.resource + end + end + end + + class Channel < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + [ + ["about", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + [ + ['title', nil, :text], + ['link', nil, :text], + ['description', nil, :text], + ['image', '?', :have_child], + ['items', nil, :have_child], + ['textinput', '?', :have_child], + ].each do |tag, occurs, type| + __send__("install_#{type}_element", tag, ::RSS::URI, occurs) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + end + end + + private + def maker_target(maker) + maker.channel + end + + def setup_maker_attributes(channel) + channel.about = about + end + + class Image < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + [ + ["resource", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.resource = args[0] + end + end + end + + class Textinput < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + [ + ["resource", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.resource = args[0] + end + end + end + + class Items < Element + + include RSS10 + + Seq = ::RSS::RDF::Seq + + class << self + + def required_uri + ::RSS::URI + end + + end + + install_have_child_element("Seq", URI, nil) + install_must_call_validator('rdf', URI) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.Seq = args[0] + end + self.Seq ||= Seq.new + end + + def resources + if @Seq + @Seq.lis.collect do |li| + li.resource + end + else + [] + end + end + end + end + + class Image < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + [ + ["about", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + %w(title url link).each do |name| + install_text_element(name, ::RSS::URI, nil) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + end + end + + private + def maker_target(maker) + maker.image + end + end + + class Item < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + + [ + ["about", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + [ + ["title", nil], + ["link", nil], + ["description", "?"], + ].each do |tag, occurs| + install_text_element(tag, ::RSS::URI, occurs) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + end + end + + private + def maker_target(items) + if items.respond_to?("items") + # For backward compatibility + items = items.items + end + items.new_item + end + end + + class Textinput < Element + + include RSS10 + + class << self + + def required_uri + ::RSS::URI + end + + end + + [ + ["about", URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{PREFIX}:#{name}") + end + + %w(title description name link).each do |name| + install_text_element(name, ::RSS::URI, nil) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + end + end + + private + def maker_target(maker) + maker.textinput + end + end + + end + + RSS10::ELEMENTS.each do |name| + BaseListener.install_get_text_element(URI, name, name) + end + + module ListenerMixin + private + def initial_start_RDF(tag_name, prefix, attrs, ns) + check_ns(tag_name, prefix, ns, RDF::URI) + + @rss = RDF.new(@version, @encoding, @standalone) + @rss.do_validate = @do_validate + @rss.xml_stylesheets = @xml_stylesheets + @last_element = @rss + pr = Proc.new do |text, tags| + @rss.validate_for_stream(tags, @ignore_unknown_element) if @do_validate + end + @proc_stack.push(pr) + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/2.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/2.0.rb new file mode 100644 index 0000000..3798da4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/2.0.rb @@ -0,0 +1,111 @@ +require "rss/0.9" + +module RSS + + class Rss + + class Channel + + [ + ["generator"], + ["ttl", :integer], + ].each do |name, type| + install_text_element(name, "", "?", name, type) + end + + [ + %w(category categories), + ].each do |name, plural_name| + install_have_children_element(name, "", "*", name, plural_name) + end + + [ + ["image", "?"], + ["language", "?"], + ].each do |name, occurs| + install_model(name, "", occurs) + end + + Category = Item::Category + + class Item + + [ + ["comments", "?"], + ["author", "?"], + ].each do |name, occurs| + install_text_element(name, "", occurs) + end + + [ + ["pubDate", '?'], + ].each do |name, occurs| + install_date_element(name, "", occurs, name, 'rfc822') + end + alias date pubDate + alias date= pubDate= + + [ + ["guid", '?'], + ].each do |name, occurs| + install_have_child_element(name, "", occurs) + end + + private + alias _setup_maker_element setup_maker_element + def setup_maker_element(item) + _setup_maker_element(item) + @guid.setup_maker(item) if @guid + end + + class Guid < Element + + include RSS09 + + [ + ["isPermaLink", "", false, :boolean] + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + content_setup + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.isPermaLink = args[0] + self.content = args[1] + end + end + + alias_method :_PermaLink?, :PermaLink? + private :_PermaLink? + def PermaLink? + perma = _PermaLink? + perma or perma.nil? + end + + private + def maker_target(item) + item.guid + end + + def setup_maker_attributes(guid) + guid.isPermaLink = isPermaLink + guid.content = content + end + end + + end + + end + + end + + RSS09::ELEMENTS.each do |name| + BaseListener.install_get_text_element("", name, name) + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/atom.rb b/lib/ruby-1.9.1-rc1/lib/rss/atom.rb new file mode 100644 index 0000000..10282a8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/atom.rb @@ -0,0 +1,748 @@ +require 'rss/parser' + +module RSS + module Atom + URI = "http://www.w3.org/2005/Atom" + XHTML_URI = "http://www.w3.org/1999/xhtml" + + module CommonModel + NSPOOL = {} + ELEMENTS = [] + + def self.append_features(klass) + super + klass.install_must_call_validator("atom", URI) + [ + ["lang", :xml], + ["base", :xml], + ].each do |name, uri, required| + klass.install_get_attribute(name, uri, required, [nil, :inherit]) + end + klass.class_eval do + class << self + def required_uri + URI + end + + def need_parent? + true + end + end + end + end + end + + module ContentModel + module ClassMethods + def content_type + @content_type ||= nil + end + end + + class << self + def append_features(klass) + super + klass.extend(ClassMethods) + klass.content_setup(klass.content_type, klass.tag_name) + end + end + + def maker_target(target) + target + end + + private + def setup_maker_element_writer + "#{self.class.name.split(/::/).last.downcase}=" + end + + def setup_maker_element(target) + target.__send__(setup_maker_element_writer, content) + super + end + end + + module URIContentModel + class << self + def append_features(klass) + super + klass.class_eval do + @content_type = [nil, :uri] + include(ContentModel) + end + end + end + end + + module TextConstruct + def self.append_features(klass) + super + klass.class_eval do + [ + ["type", ""], + ].each do |name, uri, required| + install_get_attribute(name, uri, required, :text_type) + end + + content_setup + add_need_initialize_variable("xhtml") + + class << self + def xml_getter + "xhtml" + end + + def xml_setter + "xhtml=" + end + end + end + end + + attr_writer :xhtml + def xhtml + return @xhtml if @xhtml.nil? + if @xhtml.is_a?(XML::Element) and + [@xhtml.name, @xhtml.uri] == ["div", XHTML_URI] + return @xhtml + end + + children = @xhtml + children = [children] unless children.is_a?(Array) + XML::Element.new("div", nil, XHTML_URI, + {"xmlns" => XHTML_URI}, children) + end + + def have_xml_content? + @type == "xhtml" + end + + def atom_validate(ignore_unknown_element, tags, uri) + if have_xml_content? + if @xhtml.nil? + raise MissingTagError.new("div", tag_name) + end + unless [@xhtml.name, @xhtml.uri] == ["div", XHTML_URI] + raise NotExpectedTagError.new(@xhtml.name, @xhtml.uri, tag_name) + end + end + end + + private + def maker_target(target) + target.__send__(self.class.name.split(/::/).last.downcase) {|x| x} + end + + def setup_maker_attributes(target) + target.type = type + target.content = content + target.xml_content = @xhtml + end + end + + module PersonConstruct + def self.append_features(klass) + super + klass.class_eval do + [ + ["name", nil], + ["uri", "?"], + ["email", "?"], + ].each do |tag, occurs| + install_have_attribute_element(tag, URI, occurs, nil, :content) + end + end + end + + def maker_target(target) + target.__send__("new_#{self.class.name.split(/::/).last.downcase}") + end + + class Name < RSS::Element + include CommonModel + include ContentModel + end + + class Uri < RSS::Element + include CommonModel + include URIContentModel + end + + class Email < RSS::Element + include CommonModel + include ContentModel + end + end + + module DateConstruct + def self.append_features(klass) + super + klass.class_eval do + @content_type = :w3cdtf + include(ContentModel) + end + end + + def atom_validate(ignore_unknown_element, tags, uri) + raise NotAvailableValueError.new(tag_name, "") if content.nil? + end + end + + module DuplicateLinkChecker + def validate_duplicate_links(links) + link_infos = {} + links.each do |link| + rel = link.rel || "alternate" + next unless rel == "alternate" + key = [link.hreflang, link.type] + if link_infos.has_key?(key) + raise TooMuchTagError.new("link", tag_name) + end + link_infos[key] = true + end + end + end + + class Feed < RSS::Element + include RootElementMixin + include CommonModel + include DuplicateLinkChecker + + install_ns('', URI) + + [ + ["author", "*", :children], + ["category", "*", :children, "categories"], + ["contributor", "*", :children], + ["generator", "?"], + ["icon", "?", nil, :content], + ["id", nil, nil, :content], + ["link", "*", :children], + ["logo", "?"], + ["rights", "?"], + ["subtitle", "?", nil, :content], + ["title", nil, nil, :content], + ["updated", nil, nil, :content], + ["entry", "*", :children, "entries"], + ].each do |tag, occurs, type, *args| + type ||= :child + __send__("install_have_#{type}_element", + tag, URI, occurs, tag, *args) + end + + def initialize(version=nil, encoding=nil, standalone=nil) + super("1.0", version, encoding, standalone) + @feed_type = "atom" + @feed_subtype = "feed" + end + + alias_method :items, :entries + + def have_author? + authors.any? {|author| !author.to_s.empty?} or + entries.any? {|entry| entry.have_author?(false)} + end + + private + def atom_validate(ignore_unknown_element, tags, uri) + unless have_author? + raise MissingTagError.new("author", tag_name) + end + validate_duplicate_links(links) + end + + def have_required_elements? + super and have_author? + end + + def maker_target(maker) + maker.channel + end + + def setup_maker_element(channel) + prev_dc_dates = channel.dc_dates.to_a.dup + super + channel.about = id.content if id + channel.dc_dates.replace(prev_dc_dates) + end + + def setup_maker_elements(channel) + super + items = channel.maker.items + entries.each do |entry| + entry.setup_maker(items) + end + end + + class Author < RSS::Element + include CommonModel + include PersonConstruct + end + + class Category < RSS::Element + include CommonModel + + [ + ["term", "", true], + ["scheme", "", false, [nil, :uri]], + ["label", ""], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + private + def maker_target(target) + target.new_category + end + end + + class Contributor < RSS::Element + include CommonModel + include PersonConstruct + end + + class Generator < RSS::Element + include CommonModel + include ContentModel + + [ + ["uri", "", false, [nil, :uri]], + ["version", ""], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + private + def setup_maker_attributes(target) + target.generator do |generator| + generator.uri = uri if uri + generator.version = version if version + end + end + end + + class Icon < RSS::Element + include CommonModel + include URIContentModel + end + + class Id < RSS::Element + include CommonModel + include URIContentModel + end + + class Link < RSS::Element + include CommonModel + + [ + ["href", "", true, [nil, :uri]], + ["rel", ""], + ["type", ""], + ["hreflang", ""], + ["title", ""], + ["length", ""], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + private + def maker_target(target) + target.new_link + end + end + + class Logo < RSS::Element + include CommonModel + include URIContentModel + + def maker_target(target) + target.maker.image + end + + private + def setup_maker_element_writer + "url=" + end + end + + class Rights < RSS::Element + include CommonModel + include TextConstruct + end + + class Subtitle < RSS::Element + include CommonModel + include TextConstruct + end + + class Title < RSS::Element + include CommonModel + include TextConstruct + end + + class Updated < RSS::Element + include CommonModel + include DateConstruct + end + + class Entry < RSS::Element + include CommonModel + include DuplicateLinkChecker + + [ + ["author", "*", :children], + ["category", "*", :children, "categories"], + ["content", "?", :child], + ["contributor", "*", :children], + ["id", nil, nil, :content], + ["link", "*", :children], + ["published", "?", :child, :content], + ["rights", "?", :child], + ["source", "?"], + ["summary", "?", :child], + ["title", nil], + ["updated", nil, :child, :content], + ].each do |tag, occurs, type, *args| + type ||= :attribute + __send__("install_have_#{type}_element", + tag, URI, occurs, tag, *args) + end + + def have_author?(check_parent=true) + authors.any? {|author| !author.to_s.empty?} or + (check_parent and @parent and @parent.have_author?) or + (source and source.have_author?) + end + + private + def atom_validate(ignore_unknown_element, tags, uri) + unless have_author? + raise MissingTagError.new("author", tag_name) + end + validate_duplicate_links(links) + end + + def have_required_elements? + super and have_author? + end + + def maker_target(items) + if items.respond_to?("items") + # For backward compatibility + items = items.items + end + items.new_item + end + + Author = Feed::Author + Category = Feed::Category + + class Content < RSS::Element + include CommonModel + + class << self + def xml_setter + "xml=" + end + + def xml_getter + "xml" + end + end + + [ + ["type", ""], + ["src", "", false, [nil, :uri]], + ].each do |name, uri, required, type| + install_get_attribute(name, uri, required, type) + end + + content_setup + add_need_initialize_variable("xml") + + attr_writer :xml + def have_xml_content? + inline_xhtml? or inline_other_xml? + end + + def xml + return @xml unless inline_xhtml? + return @xml if @xml.nil? + if @xml.is_a?(XML::Element) and + [@xml.name, @xml.uri] == ["div", XHTML_URI] + return @xml + end + + children = @xml + children = [children] unless children.is_a?(Array) + XML::Element.new("div", nil, XHTML_URI, + {"xmlns" => XHTML_URI}, children) + end + + def xhtml + if inline_xhtml? + xml + else + nil + end + end + + def atom_validate(ignore_unknown_element, tags, uri) + if out_of_line? + raise MissingAttributeError.new(tag_name, "type") if @type.nil? + unless (content.nil? or content.empty?) + raise NotAvailableValueError.new(tag_name, content) + end + elsif inline_xhtml? + if @xml.nil? + raise MissingTagError.new("div", tag_name) + end + unless @xml.name == "div" and @xml.uri == XHTML_URI + raise NotExpectedTagError.new(@xml.name, @xml.uri, tag_name) + end + end + end + + def inline_text? + !out_of_line? and [nil, "text", "html"].include?(@type) + end + + def inline_html? + return false if out_of_line? + @type == "html" or mime_split == ["text", "html"] + end + + def inline_xhtml? + !out_of_line? and @type == "xhtml" + end + + def inline_other? + return false if out_of_line? + media_type, subtype = mime_split + return false if media_type.nil? or subtype.nil? + true + end + + def inline_other_text? + return false unless inline_other? + return false if inline_other_xml? + + media_type, subtype = mime_split + return true if "text" == media_type.downcase + false + end + + def inline_other_xml? + return false unless inline_other? + + media_type, subtype = mime_split + normalized_mime_type = "#{media_type}/#{subtype}".downcase + if /(?:\+xml|^xml)$/ =~ subtype or + %w(text/xml-external-parsed-entity + application/xml-external-parsed-entity + application/xml-dtd).find {|x| x == normalized_mime_type} + return true + end + false + end + + def inline_other_base64? + inline_other? and !inline_other_text? and !inline_other_xml? + end + + def out_of_line? + not @src.nil? + end + + def mime_split + media_type = subtype = nil + if /\A\s*([a-z]+)\/([a-z\+]+)\s*(?:;.*)?\z/i =~ @type.to_s + media_type = $1.downcase + subtype = $2.downcase + end + [media_type, subtype] + end + + def need_base64_encode? + inline_other_base64? + end + + private + def empty_content? + out_of_line? or super + end + end + + Contributor = Feed::Contributor + Id = Feed::Id + Link = Feed::Link + + class Published < RSS::Element + include CommonModel + include DateConstruct + end + + Rights = Feed::Rights + + class Source < RSS::Element + include CommonModel + + [ + ["author", "*", :children], + ["category", "*", :children, "categories"], + ["contributor", "*", :children], + ["generator", "?"], + ["icon", "?"], + ["id", "?", nil, :content], + ["link", "*", :children], + ["logo", "?"], + ["rights", "?"], + ["subtitle", "?"], + ["title", "?"], + ["updated", "?", nil, :content], + ].each do |tag, occurs, type, *args| + type ||= :attribute + __send__("install_have_#{type}_element", + tag, URI, occurs, tag, *args) + end + + def have_author? + !author.to_s.empty? + end + + Author = Feed::Author + Category = Feed::Category + Contributor = Feed::Contributor + Generator = Feed::Generator + Icon = Feed::Icon + Id = Feed::Id + Link = Feed::Link + Logo = Feed::Logo + Rights = Feed::Rights + Subtitle = Feed::Subtitle + Title = Feed::Title + Updated = Feed::Updated + end + + class Summary < RSS::Element + include CommonModel + include TextConstruct + end + + Title = Feed::Title + Updated = Feed::Updated + end + end + + class Entry < RSS::Element + include RootElementMixin + include CommonModel + include DuplicateLinkChecker + + [ + ["author", "*", :children], + ["category", "*", :children, "categories"], + ["content", "?"], + ["contributor", "*", :children], + ["id", nil, nil, :content], + ["link", "*", :children], + ["published", "?", :child, :content], + ["rights", "?"], + ["source", "?"], + ["summary", "?"], + ["title", nil], + ["updated", nil, nil, :content], + ].each do |tag, occurs, type, *args| + type ||= :attribute + __send__("install_have_#{type}_element", + tag, URI, occurs, tag, *args) + end + + def initialize(version=nil, encoding=nil, standalone=nil) + super("1.0", version, encoding, standalone) + @feed_type = "atom" + @feed_subtype = "entry" + end + + def items + [self] + end + + def setup_maker(maker) + maker = maker.maker if maker.respond_to?("maker") + super(maker) + end + + def have_author? + authors.any? {|author| !author.to_s.empty?} or + (source and source.have_author?) + end + + private + def atom_validate(ignore_unknown_element, tags, uri) + unless have_author? + raise MissingTagError.new("author", tag_name) + end + validate_duplicate_links(links) + end + + def have_required_elements? + super and have_author? + end + + def maker_target(maker) + maker.items.new_item + end + + Author = Feed::Entry::Author + Category = Feed::Entry::Category + Content = Feed::Entry::Content + Contributor = Feed::Entry::Contributor + Id = Feed::Entry::Id + Link = Feed::Entry::Link + Published = Feed::Entry::Published + Rights = Feed::Entry::Rights + Source = Feed::Entry::Source + Summary = Feed::Entry::Summary + Title = Feed::Entry::Title + Updated = Feed::Entry::Updated + end + end + + Atom::CommonModel::ELEMENTS.each do |name| + BaseListener.install_get_text_element(Atom::URI, name, "#{name}=") + end + + module ListenerMixin + private + def initial_start_feed(tag_name, prefix, attrs, ns) + check_ns(tag_name, prefix, ns, Atom::URI) + + @rss = Atom::Feed.new(@version, @encoding, @standalone) + @rss.do_validate = @do_validate + @rss.xml_stylesheets = @xml_stylesheets + @rss.lang = attrs["xml:lang"] + @rss.base = attrs["xml:base"] + @last_element = @rss + pr = Proc.new do |text, tags| + @rss.validate_for_stream(tags) if @do_validate + end + @proc_stack.push(pr) + end + + def initial_start_entry(tag_name, prefix, attrs, ns) + check_ns(tag_name, prefix, ns, Atom::URI) + + @rss = Atom::Entry.new(@version, @encoding, @standalone) + @rss.do_validate = @do_validate + @rss.xml_stylesheets = @xml_stylesheets + @rss.lang = attrs["xml:lang"] + @rss.base = attrs["xml:base"] + @last_element = @rss + pr = Proc.new do |text, tags| + @rss.validate_for_stream(tags) if @do_validate + end + @proc_stack.push(pr) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/content.rb b/lib/ruby-1.9.1-rc1/lib/rss/content.rb new file mode 100644 index 0000000..b12ee91 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/content.rb @@ -0,0 +1,31 @@ +require "rss/rss" + +module RSS + CONTENT_PREFIX = 'content' + CONTENT_URI = "http://purl.org/rss/1.0/modules/content/" + + module ContentModel + extend BaseModel + + ELEMENTS = ["#{CONTENT_PREFIX}_encoded"] + + def self.append_features(klass) + super + + klass.install_must_call_validator(CONTENT_PREFIX, CONTENT_URI) + ELEMENTS.each do |full_name| + name = full_name[(CONTENT_PREFIX.size + 1)..-1] + klass.install_text_element(name, CONTENT_URI, "?", full_name) + end + end + end + + prefix_size = CONTENT_PREFIX.size + 1 + ContentModel::ELEMENTS.each do |full_name| + name = full_name[prefix_size..-1] + BaseListener.install_get_text_element(CONTENT_URI, name, full_name) + end +end + +require 'rss/content/1.0' +require 'rss/content/2.0' diff --git a/lib/ruby-1.9.1-rc1/lib/rss/content/1.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/content/1.0.rb new file mode 100644 index 0000000..e7c0c19 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/content/1.0.rb @@ -0,0 +1,10 @@ +require 'rss/1.0' +require 'rss/content' + +module RSS + RDF.install_ns(CONTENT_PREFIX, CONTENT_URI) + + class RDF + class Item; include ContentModel; end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/content/2.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/content/2.0.rb new file mode 100644 index 0000000..8671b5b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/content/2.0.rb @@ -0,0 +1,12 @@ +require "rss/2.0" +require "rss/content" + +module RSS + Rss.install_ns(CONTENT_PREFIX, CONTENT_URI) + + class Rss + class Channel + class Item; include ContentModel; end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/converter.rb b/lib/ruby-1.9.1-rc1/lib/rss/converter.rb new file mode 100644 index 0000000..745d6de --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/converter.rb @@ -0,0 +1,170 @@ +require "rss/utils" + +module RSS + + class Converter + + include Utils + + def initialize(to_enc, from_enc=nil) + if "".respond_to?(:encode) + @to_encoding = to_enc + return + end + normalized_to_enc = to_enc.downcase.gsub(/-/, '_') + from_enc ||= 'utf-8' + normalized_from_enc = from_enc.downcase.gsub(/-/, '_') + if normalized_to_enc == normalized_from_enc + def_same_enc() + else + def_diff_enc = "def_to_#{normalized_to_enc}_from_#{normalized_from_enc}" + if respond_to?(def_diff_enc) + __send__(def_diff_enc) + else + def_else_enc(to_enc, from_enc) + end + end + end + + def convert(value) + if value.is_a?(String) and value.respond_to?(:encode) + value.encode(@to_encoding) + else + value + end + end + + def def_convert(depth=0) + instance_eval(<<-EOC, *get_file_and_line_from_caller(depth)) + def convert(value) + if value.kind_of?(String) + #{yield('value')} + else + value + end + end + EOC + end + + def def_iconv_convert(to_enc, from_enc, depth=0) + begin + require "iconv" + @iconv = Iconv.new(to_enc, from_enc) + def_convert(depth+1) do |value| + <<-EOC + begin + @iconv.iconv(#{value}) + rescue Iconv::Failure + raise ConversionError.new(#{value}, "#{to_enc}", "#{from_enc}") + end + EOC + end + rescue LoadError, ArgumentError, SystemCallError + raise UnknownConversionMethodError.new(to_enc, from_enc) + end + end + + def def_else_enc(to_enc, from_enc) + def_iconv_convert(to_enc, from_enc, 0) + end + + def def_same_enc() + def_convert do |value| + value + end + end + + def def_uconv_convert_if_can(meth, to_enc, from_enc, nkf_arg) + begin + require "uconv" + def_convert(1) do |value| + <<-EOC + begin + Uconv.#{meth}(#{value}) + rescue Uconv::Error + raise ConversionError.new(#{value}, "#{to_enc}", "#{from_enc}") + end + EOC + end + rescue LoadError + require 'nkf' + if NKF.const_defined?(:UTF8) + def_convert(1) do |value| + "NKF.nkf(#{nkf_arg.dump}, #{value})" + end + else + def_iconv_convert(to_enc, from_enc, 1) + end + end + end + + def def_to_euc_jp_from_utf_8 + def_uconv_convert_if_can('u8toeuc', 'EUC-JP', 'UTF-8', '-We') + end + + def def_to_utf_8_from_euc_jp + def_uconv_convert_if_can('euctou8', 'UTF-8', 'EUC-JP', '-Ew') + end + + def def_to_shift_jis_from_utf_8 + def_uconv_convert_if_can('u8tosjis', 'Shift_JIS', 'UTF-8', '-Ws') + end + + def def_to_utf_8_from_shift_jis + def_uconv_convert_if_can('sjistou8', 'UTF-8', 'Shift_JIS', '-Sw') + end + + def def_to_euc_jp_from_shift_jis + require "nkf" + def_convert do |value| + "NKF.nkf('-Se', #{value})" + end + end + + def def_to_shift_jis_from_euc_jp + require "nkf" + def_convert do |value| + "NKF.nkf('-Es', #{value})" + end + end + + def def_to_euc_jp_from_iso_2022_jp + require "nkf" + def_convert do |value| + "NKF.nkf('-Je', #{value})" + end + end + + def def_to_iso_2022_jp_from_euc_jp + require "nkf" + def_convert do |value| + "NKF.nkf('-Ej', #{value})" + end + end + + def def_to_utf_8_from_iso_8859_1 + def_convert do |value| + "#{value}.unpack('C*').pack('U*')" + end + end + + def def_to_iso_8859_1_from_utf_8 + def_convert do |value| + <<-EOC + array_utf8 = #{value}.unpack('U*') + array_enc = [] + array_utf8.each do |num| + if num <= 0xFF + array_enc << num + else + array_enc.concat "&\#\#{num};".unpack('C*') + end + end + array_enc.pack('C*') + EOC + end + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/dublincore.rb b/lib/ruby-1.9.1-rc1/lib/rss/dublincore.rb new file mode 100644 index 0000000..7ba239f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/dublincore.rb @@ -0,0 +1,161 @@ +require "rss/rss" + +module RSS + DC_PREFIX = 'dc' + DC_URI = "http://purl.org/dc/elements/1.1/" + + module BaseDublinCoreModel + def append_features(klass) + super + + return if klass.instance_of?(Module) + DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name| + plural = plural_name || "#{name}s" + full_name = "#{DC_PREFIX}_#{name}" + full_plural_name = "#{DC_PREFIX}_#{plural}" + klass_name = "DublinCore#{Utils.to_class_name(name)}" + klass.install_must_call_validator(DC_PREFIX, DC_URI) + klass.install_have_children_element(name, DC_URI, "*", + full_name, full_plural_name) + klass.module_eval(<<-EOC, *get_file_and_line_from_caller(0)) + remove_method :#{full_name} + remove_method :#{full_name}= + remove_method :set_#{full_name} + + def #{full_name} + @#{full_name}.first and @#{full_name}.first.value + end + + def #{full_name}=(new_value) + @#{full_name}[0] = Utils.new_with_value_if_need(#{klass_name}, new_value) + end + alias set_#{full_name} #{full_name}= + EOC + end + klass.module_eval(<<-EOC, *get_file_and_line_from_caller(0)) + if method_defined?(:date) + alias date_without_#{DC_PREFIX}_date= date= + + def date=(value) + self.date_without_#{DC_PREFIX}_date = value + self.#{DC_PREFIX}_date = value + end + else + alias date #{DC_PREFIX}_date + alias date= #{DC_PREFIX}_date= + end + + # For backward compatibility + alias #{DC_PREFIX}_rightses #{DC_PREFIX}_rights_list + EOC + end + end + + module DublinCoreModel + + extend BaseModel + extend BaseDublinCoreModel + + TEXT_ELEMENTS = { + "title" => nil, + "description" => nil, + "creator" => nil, + "subject" => nil, + "publisher" => nil, + "contributor" => nil, + "type" => nil, + "format" => nil, + "identifier" => nil, + "source" => nil, + "language" => nil, + "relation" => nil, + "coverage" => nil, + "rights" => "rights_list" + } + + DATE_ELEMENTS = { + "date" => "w3cdtf", + } + + ELEMENT_NAME_INFOS = DublinCoreModel::TEXT_ELEMENTS.to_a + DublinCoreModel::DATE_ELEMENTS.each do |name, | + ELEMENT_NAME_INFOS << [name, nil] + end + + ELEMENTS = TEXT_ELEMENTS.keys + DATE_ELEMENTS.keys + + ELEMENTS.each do |name, plural_name| + module_eval(<<-EOC, *get_file_and_line_from_caller(0)) + class DublinCore#{Utils.to_class_name(name)} < Element + include RSS10 + + content_setup + + class << self + def required_prefix + DC_PREFIX + end + + def required_uri + DC_URI + end + end + + @tag_name = #{name.dump} + + alias_method(:value, :content) + alias_method(:value=, :content=) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.content = args[0] + end + end + + def full_name + tag_name_with_prefix(DC_PREFIX) + end + + def maker_target(target) + target.new_#{name} + end + + def setup_maker_attributes(#{name}) + #{name}.content = content + end + end + EOC + end + + DATE_ELEMENTS.each do |name, type| + tag_name = "#{DC_PREFIX}:#{name}" + module_eval(<<-EOC, *get_file_and_line_from_caller(0)) + class DublinCore#{Utils.to_class_name(name)} < Element + remove_method(:content=) + remove_method(:value=) + + date_writer("content", #{type.dump}, #{tag_name.dump}) + + alias_method(:value=, :content=) + end + EOC + end + end + + # For backward compatibility + DublincoreModel = DublinCoreModel + + DublinCoreModel::ELEMENTS.each do |name| + class_name = Utils.to_class_name(name) + BaseListener.install_class_name(DC_URI, name, "DublinCore#{class_name}") + end + + DublinCoreModel::ELEMENTS.collect! {|name| "#{DC_PREFIX}_#{name}"} +end + +require 'rss/dublincore/1.0' +require 'rss/dublincore/2.0' +require 'rss/dublincore/atom' diff --git a/lib/ruby-1.9.1-rc1/lib/rss/dublincore/1.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/1.0.rb new file mode 100644 index 0000000..e193c6d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/1.0.rb @@ -0,0 +1,13 @@ +require "rss/1.0" +require "rss/dublincore" + +module RSS + RDF.install_ns(DC_PREFIX, DC_URI) + + class RDF + class Channel; include DublinCoreModel; end + class Image; include DublinCoreModel; end + class Item; include DublinCoreModel; end + class Textinput; include DublinCoreModel; end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/dublincore/2.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/2.0.rb new file mode 100644 index 0000000..82ed188 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/2.0.rb @@ -0,0 +1,13 @@ +require "rss/2.0" +require "rss/dublincore" + +module RSS + Rss.install_ns(DC_PREFIX, DC_URI) + + class Rss + class Channel + include DublinCoreModel + class Item; include DublinCoreModel; end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/dublincore/atom.rb b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/atom.rb new file mode 100644 index 0000000..e78df48 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/dublincore/atom.rb @@ -0,0 +1,17 @@ +require "rss/atom" +require "rss/dublincore" + +module RSS + module Atom + Feed.install_ns(DC_PREFIX, DC_URI) + + class Feed + include DublinCoreModel + class Entry; include DublinCoreModel; end + end + + class Entry + include DublinCoreModel + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/image.rb b/lib/ruby-1.9.1-rc1/lib/rss/image.rb new file mode 100644 index 0000000..c4714ae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/image.rb @@ -0,0 +1,193 @@ +require 'rss/1.0' +require 'rss/dublincore' + +module RSS + + IMAGE_PREFIX = 'image' + IMAGE_URI = 'http://purl.org/rss/1.0/modules/image/' + + RDF.install_ns(IMAGE_PREFIX, IMAGE_URI) + + IMAGE_ELEMENTS = [] + + %w(item favicon).each do |name| + class_name = Utils.to_class_name(name) + BaseListener.install_class_name(IMAGE_URI, name, "Image#{class_name}") + IMAGE_ELEMENTS << "#{IMAGE_PREFIX}_#{name}" + end + + module ImageModelUtils + def validate_one_tag_name(ignore_unknown_element, name, tags) + if !ignore_unknown_element + invalid = tags.find {|tag| tag != name} + raise UnknownTagError.new(invalid, IMAGE_URI) if invalid + end + raise TooMuchTagError.new(name, tag_name) if tags.size > 1 + end + end + + module ImageItemModel + include ImageModelUtils + extend BaseModel + + def self.append_features(klass) + super + + klass.install_have_child_element("item", IMAGE_URI, "?", + "#{IMAGE_PREFIX}_item") + klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI) + end + + class ImageItem < Element + include RSS10 + include DublinCoreModel + + @tag_name = "item" + + class << self + def required_prefix + IMAGE_PREFIX + end + + def required_uri + IMAGE_URI + end + end + + install_must_call_validator(IMAGE_PREFIX, IMAGE_URI) + + [ + ["about", ::RSS::RDF::URI, true], + ["resource", ::RSS::RDF::URI, false], + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{::RSS::RDF::PREFIX}:#{name}") + end + + %w(width height).each do |tag| + full_name = "#{IMAGE_PREFIX}_#{tag}" + disp_name = "#{IMAGE_PREFIX}:#{tag}" + install_text_element(tag, IMAGE_URI, "?", + full_name, :integer, disp_name) + BaseListener.install_get_text_element(IMAGE_URI, tag, full_name) + end + + alias width= image_width= + alias width image_width + alias height= image_height= + alias height image_height + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + self.resource = args[1] + end + end + + def full_name + tag_name_with_prefix(IMAGE_PREFIX) + end + + private + def maker_target(target) + target.image_item + end + + def setup_maker_attributes(item) + item.about = self.about + item.resource = self.resource + end + end + end + + module ImageFaviconModel + include ImageModelUtils + extend BaseModel + + def self.append_features(klass) + super + + unless klass.class == Module + klass.install_have_child_element("favicon", IMAGE_URI, "?", + "#{IMAGE_PREFIX}_favicon") + klass.install_must_call_validator(IMAGE_PREFIX, IMAGE_URI) + end + end + + class ImageFavicon < Element + include RSS10 + include DublinCoreModel + + @tag_name = "favicon" + + class << self + def required_prefix + IMAGE_PREFIX + end + + def required_uri + IMAGE_URI + end + end + + [ + ["about", ::RSS::RDF::URI, true, ::RSS::RDF::PREFIX], + ["size", IMAGE_URI, true, IMAGE_PREFIX], + ].each do |name, uri, required, prefix| + install_get_attribute(name, uri, required, nil, nil, + "#{prefix}:#{name}") + end + + AVAILABLE_SIZES = %w(small medium large) + alias_method :set_size, :size= + private :set_size + def size=(new_value) + if @do_validate and !new_value.nil? + new_value = new_value.strip + unless AVAILABLE_SIZES.include?(new_value) + attr_name = "#{IMAGE_PREFIX}:size" + raise NotAvailableValueError.new(full_name, new_value, attr_name) + end + end + set_size(new_value) + end + + alias image_size= size= + alias image_size size + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + self.size = args[1] + end + end + + def full_name + tag_name_with_prefix(IMAGE_PREFIX) + end + + private + def maker_target(target) + target.image_favicon + end + + def setup_maker_attributes(favicon) + favicon.about = self.about + favicon.size = self.size + end + end + + end + + class RDF + class Channel; include ImageFaviconModel; end + class Item; include ImageItemModel; end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/itunes.rb b/lib/ruby-1.9.1-rc1/lib/rss/itunes.rb new file mode 100644 index 0000000..f95ca7a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/itunes.rb @@ -0,0 +1,410 @@ +require 'rss/2.0' + +module RSS + ITUNES_PREFIX = 'itunes' + ITUNES_URI = 'http://www.itunes.com/dtds/podcast-1.0.dtd' + + Rss.install_ns(ITUNES_PREFIX, ITUNES_URI) + + module ITunesModelUtils + include Utils + + def def_class_accessor(klass, name, type, *args) + normalized_name = name.gsub(/-/, "_") + full_name = "#{ITUNES_PREFIX}_#{normalized_name}" + klass_name = "ITunes#{Utils.to_class_name(normalized_name)}" + + case type + when :element, :attribute + klass::ELEMENTS << full_name + def_element_class_accessor(klass, name, full_name, klass_name, *args) + when :elements + klass::ELEMENTS << full_name + def_elements_class_accessor(klass, name, full_name, klass_name, *args) + else + klass.install_must_call_validator(ITUNES_PREFIX, ITUNES_URI) + klass.install_text_element(normalized_name, ITUNES_URI, "?", + full_name, type, name) + end + end + + def def_element_class_accessor(klass, name, full_name, klass_name, + recommended_attribute_name=nil) + klass.install_have_child_element(name, ITUNES_PREFIX, "?", full_name) + end + + def def_elements_class_accessor(klass, name, full_name, klass_name, + plural_name, recommended_attribute_name=nil) + full_plural_name = "#{ITUNES_PREFIX}_#{plural_name}" + klass.install_have_children_element(name, ITUNES_PREFIX, "*", + full_name, full_plural_name) + end + end + + module ITunesBaseModel + extend ITunesModelUtils + + ELEMENTS = [] + + ELEMENT_INFOS = [["author"], + ["block", :yes_other], + ["explicit", :yes_clean_other], + ["keywords", :csv], + ["subtitle"], + ["summary"]] + end + + module ITunesChannelModel + extend BaseModel + extend ITunesModelUtils + include ITunesBaseModel + + ELEMENTS = [] + + class << self + def append_features(klass) + super + + return if klass.instance_of?(Module) + ELEMENT_INFOS.each do |name, type, *additional_infos| + def_class_accessor(klass, name, type, *additional_infos) + end + end + end + + ELEMENT_INFOS = [ + ["category", :elements, "categories", "text"], + ["image", :attribute, "href"], + ["owner", :element], + ["new-feed-url"], + ] + ITunesBaseModel::ELEMENT_INFOS + + class ITunesCategory < Element + include RSS09 + + @tag_name = "category" + + class << self + def required_prefix + ITUNES_PREFIX + end + + def required_uri + ITUNES_URI + end + end + + [ + ["text", "", true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required) + end + + ITunesCategory = self + install_have_children_element("category", ITUNES_URI, "*", + "#{ITUNES_PREFIX}_category", + "#{ITUNES_PREFIX}_categories") + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.text = args[0] + end + end + + def full_name + tag_name_with_prefix(ITUNES_PREFIX) + end + + private + def maker_target(categories) + if text or !itunes_categories.empty? + categories.new_category + else + nil + end + end + + def setup_maker_attributes(category) + category.text = text if text + end + + def setup_maker_elements(category) + super(category) + itunes_categories.each do |sub_category| + sub_category.setup_maker(category) + end + end + end + + class ITunesImage < Element + include RSS09 + + @tag_name = "image" + + class << self + def required_prefix + ITUNES_PREFIX + end + + def required_uri + ITUNES_URI + end + end + + [ + ["href", "", true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required) + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.href = args[0] + end + end + + def full_name + tag_name_with_prefix(ITUNES_PREFIX) + end + + private + def maker_target(target) + if href + target.itunes_image {|image| image} + else + nil + end + end + + def setup_maker_attributes(image) + image.href = href + end + end + + class ITunesOwner < Element + include RSS09 + + @tag_name = "owner" + + class << self + def required_prefix + ITUNES_PREFIX + end + + def required_uri + ITUNES_URI + end + end + + install_must_call_validator(ITUNES_PREFIX, ITUNES_URI) + [ + ["name"], + ["email"], + ].each do |name,| + ITunesBaseModel::ELEMENT_INFOS << name + install_text_element(name, ITUNES_URI, nil, "#{ITUNES_PREFIX}_#{name}") + end + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.itunes_name = args[0] + self.itunes_email = args[1] + end + end + + def full_name + tag_name_with_prefix(ITUNES_PREFIX) + end + + private + def maker_target(target) + target.itunes_owner + end + + def setup_maker_element(owner) + super(owner) + owner.itunes_name = itunes_name + owner.itunes_email = itunes_email + end + end + end + + module ITunesItemModel + extend BaseModel + extend ITunesModelUtils + include ITunesBaseModel + + class << self + def append_features(klass) + super + + return if klass.instance_of?(Module) + ELEMENT_INFOS.each do |name, type| + def_class_accessor(klass, name, type) + end + end + end + + ELEMENT_INFOS = ITunesBaseModel::ELEMENT_INFOS + + [["duration", :element, "content"]] + + class ITunesDuration < Element + include RSS09 + + @tag_name = "duration" + + class << self + def required_prefix + ITUNES_PREFIX + end + + def required_uri + ITUNES_URI + end + + def parse(duration, do_validate=true) + if do_validate and /\A(?: + \d?\d:[0-5]\d:[0-5]\d| + [0-5]?\d:[0-5]\d + )\z/x !~ duration + raise ArgumentError, + "must be one of HH:MM:SS, H:MM:SS, MM::SS, M:SS: " + + duration.inspect + end + + components = duration.split(':') + components[3..-1] = nil if components.size > 3 + + components.unshift("00") until components.size == 3 + + components.collect do |component| + component.to_i + end + end + + def construct(hour, minute, second) + components = [minute, second] + if components.include?(nil) + nil + else + components.unshift(hour) if hour and hour > 0 + components.collect do |component| + "%02d" % component + end.join(":") + end + end + end + + content_setup + alias_method(:value, :content) + remove_method(:content=) + + attr_reader :hour, :minute, :second + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + args = args[0] if args.size == 1 and args[0].is_a?(Array) + if args.size == 1 + self.content = args[0] + elsif args.size > 3 + raise ArgumentError, + "must be (do_validate, params), (content), " + + "(minute, second), ([minute, second]), " + + "(hour, minute, second) or ([hour, minute, second]): " + + args.inspect + else + @second, @minute, @hour = args.reverse + update_content + end + end + end + + def content=(value) + if value.nil? + @content = nil + elsif value.is_a?(self.class) + self.content = value.content + else + begin + @hour, @minute, @second = self.class.parse(value, @do_validate) + rescue ArgumentError + raise NotAvailableValueError.new(tag_name, value) + end + @content = value + end + end + alias_method(:value=, :content=) + + def hour=(hour) + @hour = @do_validate ? Integer(hour) : hour.to_i + update_content + hour + end + + def minute=(minute) + @minute = @do_validate ? Integer(minute) : minute.to_i + update_content + minute + end + + def second=(second) + @second = @do_validate ? Integer(second) : second.to_i + update_content + second + end + + def full_name + tag_name_with_prefix(ITUNES_PREFIX) + end + + private + def update_content + @content = self.class.construct(hour, minute, second) + end + + def maker_target(target) + if @content + target.itunes_duration {|duration| duration} + else + nil + end + end + + def setup_maker_element(duration) + super(duration) + duration.content = @content + end + end + end + + class Rss + class Channel + include ITunesChannelModel + class Item; include ITunesItemModel; end + end + end + + element_infos = + ITunesChannelModel::ELEMENT_INFOS + ITunesItemModel::ELEMENT_INFOS + element_infos.each do |name, type| + case type + when :element, :elements, :attribute + class_name = Utils.to_class_name(name) + BaseListener.install_class_name(ITUNES_URI, name, "ITunes#{class_name}") + else + accessor_base = "#{ITUNES_PREFIX}_#{name.gsub(/-/, '_')}" + BaseListener.install_get_text_element(ITUNES_URI, name, accessor_base) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker.rb new file mode 100644 index 0000000..bcba1aa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker.rb @@ -0,0 +1,44 @@ +require "rss/rss" + +module RSS + module Maker + MAKERS = {} + + class << self + def make(version, &block) + m = maker(version) + raise UnsupportedMakerVersionError.new(version) if m.nil? + m[:maker].make(m[:version], &block) + end + + def maker(version) + MAKERS[version] + end + + def add_maker(version, normalized_version, maker) + MAKERS[version] = {:maker => maker, :version => normalized_version} + end + + def versions + MAKERS.keys.uniq.sort + end + + def makers + MAKERS.values.collect {|info| info[:maker]}.uniq + end + end + end +end + +require "rss/maker/1.0" +require "rss/maker/2.0" +require "rss/maker/feed" +require "rss/maker/entry" +require "rss/maker/content" +require "rss/maker/dublincore" +require "rss/maker/slash" +require "rss/maker/syndication" +require "rss/maker/taxonomy" +require "rss/maker/trackback" +require "rss/maker/image" +require "rss/maker/itunes" diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/0.9.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/0.9.rb new file mode 100644 index 0000000..72b14dc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/0.9.rb @@ -0,0 +1,467 @@ +require "rss/0.9" + +require "rss/maker/base" + +module RSS + module Maker + + class RSS09 < RSSBase + + def initialize(feed_version="0.92") + super + @feed_type = "rss" + end + + private + def make_feed + Rss.new(@feed_version, @version, @encoding, @standalone) + end + + def setup_elements(rss) + setup_channel(rss) + end + + class Channel < ChannelBase + def to_feed(rss) + channel = Rss::Channel.new + set = setup_values(channel) + _not_set_required_variables = not_set_required_variables + if _not_set_required_variables.empty? + rss.channel = channel + set_parent(channel, rss) + setup_items(rss) + setup_image(rss) + setup_textinput(rss) + setup_other_elements(rss, channel) + rss + else + raise NotSetError.new("maker.channel", _not_set_required_variables) + end + end + + private + def setup_items(rss) + @maker.items.to_feed(rss) + end + + def setup_image(rss) + @maker.image.to_feed(rss) + end + + def setup_textinput(rss) + @maker.textinput.to_feed(rss) + end + + def variables + super + ["pubDate"] + end + + def required_variable_names + %w(link language) + end + + def not_set_required_variables + vars = super + vars << "description" unless description {|d| d.have_required_values?} + vars << "title" unless title {|t| t.have_required_values?} + vars + end + + class SkipDays < SkipDaysBase + def to_feed(rss, channel) + unless @days.empty? + skipDays = Rss::Channel::SkipDays.new + channel.skipDays = skipDays + set_parent(skipDays, channel) + @days.each do |day| + day.to_feed(rss, skipDays.days) + end + end + end + + class Day < DayBase + def to_feed(rss, days) + day = Rss::Channel::SkipDays::Day.new + set = setup_values(day) + if set + days << day + set_parent(day, days) + setup_other_elements(rss, day) + end + end + + private + def required_variable_names + %w(content) + end + end + end + + class SkipHours < SkipHoursBase + def to_feed(rss, channel) + unless @hours.empty? + skipHours = Rss::Channel::SkipHours.new + channel.skipHours = skipHours + set_parent(skipHours, channel) + @hours.each do |hour| + hour.to_feed(rss, skipHours.hours) + end + end + end + + class Hour < HourBase + def to_feed(rss, hours) + hour = Rss::Channel::SkipHours::Hour.new + set = setup_values(hour) + if set + hours << hour + set_parent(hour, hours) + setup_other_elements(rss, hour) + end + end + + private + def required_variable_names + %w(content) + end + end + end + + class Cloud < CloudBase + def to_feed(*args) + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Links < LinksBase + def to_feed(rss, channel) + return if @links.empty? + @links.first.to_feed(rss, channel) + end + + class Link < LinkBase + def to_feed(rss, channel) + if have_required_values? + channel.link = href + else + raise NotSetError.new("maker.channel.link", + not_set_required_variables) + end + end + + private + def required_variable_names + %w(href) + end + end + end + + class Authors < AuthorsBase + def to_feed(rss, channel) + end + + class Author < AuthorBase + def to_feed(rss, channel) + end + end + end + + class Contributors < ContributorsBase + def to_feed(rss, channel) + end + + class Contributor < ContributorBase + end + end + + class Generator < GeneratorBase + def to_feed(rss, channel) + end + end + + class Copyright < CopyrightBase + def to_feed(rss, channel) + channel.copyright = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + + class Description < DescriptionBase + def to_feed(rss, channel) + channel.description = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + + class Title < TitleBase + def to_feed(rss, channel) + channel.title = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + end + + class Image < ImageBase + def to_feed(rss) + image = Rss::Channel::Image.new + set = setup_values(image) + if set + image.link = link + rss.channel.image = image + set_parent(image, rss.channel) + setup_other_elements(rss, image) + elsif required_element? + raise NotSetError.new("maker.image", not_set_required_variables) + end + end + + private + def required_variable_names + %w(url title link) + end + + def required_element? + true + end + end + + class Items < ItemsBase + def to_feed(rss) + if rss.channel + normalize.each do |item| + item.to_feed(rss) + end + setup_other_elements(rss, rss.items) + end + end + + class Item < ItemBase + def to_feed(rss) + item = Rss::Channel::Item.new + set = setup_values(item) + _not_set_required_variables = not_set_required_variables + if _not_set_required_variables.empty? + rss.items << item + set_parent(item, rss.channel) + setup_other_elements(rss, item) + elsif variable_is_set? + raise NotSetError.new("maker.items", _not_set_required_variables) + end + end + + private + def required_variable_names + [] + end + + def not_set_required_variables + vars = super + if @maker.feed_version == "0.91" + vars << "title" unless title {|t| t.have_required_values?} + vars << "link" unless link {|l| l.have_required_values?} + end + vars + end + + class Guid < GuidBase + def to_feed(*args) + end + end + + class Enclosure < EnclosureBase + def to_feed(*args) + end + end + + class Source < SourceBase + def to_feed(*args) + end + + class Authors < AuthorsBase + def to_feed(*args) + end + + class Author < AuthorBase + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Contributors < ContributorsBase + def to_feed(*args) + end + + class Contributor < ContributorBase + end + end + + class Generator < GeneratorBase + def to_feed(*args) + end + end + + class Icon < IconBase + def to_feed(*args) + end + end + + class Links < LinksBase + def to_feed(*args) + end + + class Link < LinkBase + end + end + + class Logo < LogoBase + def to_feed(*args) + end + end + + class Rights < RightsBase + def to_feed(*args) + end + end + + class Subtitle < SubtitleBase + def to_feed(*args) + end + end + + class Title < TitleBase + def to_feed(*args) + end + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Authors < AuthorsBase + def to_feed(*args) + end + + class Author < AuthorBase + end + end + + class Links < LinksBase + def to_feed(rss, item) + return if @links.empty? + @links.first.to_feed(rss, item) + end + + class Link < LinkBase + def to_feed(rss, item) + if have_required_values? + item.link = href + else + raise NotSetError.new("maker.link", + not_set_required_variables) + end + end + + private + def required_variable_names + %w(href) + end + end + end + + class Contributors < ContributorsBase + def to_feed(rss, item) + end + + class Contributor < ContributorBase + end + end + + class Rights < RightsBase + def to_feed(rss, item) + end + end + + class Description < DescriptionBase + def to_feed(rss, item) + item.description = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + + class Content < ContentBase + def to_feed(rss, item) + end + end + + class Title < TitleBase + def to_feed(rss, item) + item.title = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + end + end + + class Textinput < TextinputBase + def to_feed(rss) + textInput = Rss::Channel::TextInput.new + set = setup_values(textInput) + if set + rss.channel.textInput = textInput + set_parent(textInput, rss.channel) + setup_other_elements(rss, textInput) + end + end + + private + def required_variable_names + %w(title description name link) + end + end + end + + add_maker("0.9", "0.92", RSS09) + add_maker("0.91", "0.91", RSS09) + add_maker("0.92", "0.92", RSS09) + add_maker("rss0.91", "0.91", RSS09) + add_maker("rss0.92", "0.92", RSS09) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/1.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/1.0.rb new file mode 100644 index 0000000..a1e2594 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/1.0.rb @@ -0,0 +1,434 @@ +require "rss/1.0" + +require "rss/maker/base" + +module RSS + module Maker + + class RSS10 < RSSBase + + def initialize(feed_version="1.0") + super + @feed_type = "rss" + end + + private + def make_feed + RDF.new(@version, @encoding, @standalone) + end + + def setup_elements(rss) + setup_channel(rss) + setup_image(rss) + setup_items(rss) + setup_textinput(rss) + end + + class Channel < ChannelBase + + def to_feed(rss) + set_default_values do + _not_set_required_variables = not_set_required_variables + if _not_set_required_variables.empty? + channel = RDF::Channel.new(@about) + set = setup_values(channel) + channel.dc_dates.clear + rss.channel = channel + set_parent(channel, rss) + setup_items(rss) + setup_image(rss) + setup_textinput(rss) + setup_other_elements(rss, channel) + else + raise NotSetError.new("maker.channel", _not_set_required_variables) + end + end + end + + private + def setup_items(rss) + items = RDF::Channel::Items.new + seq = items.Seq + set_parent(items, seq) + target_items = @maker.items.normalize + raise NotSetError.new("maker", ["items"]) if target_items.empty? + target_items.each do |item| + li = RDF::Channel::Items::Seq::Li.new(item.link) + seq.lis << li + set_parent(li, seq) + end + rss.channel.items = items + set_parent(rss.channel, items) + end + + def setup_image(rss) + if @maker.image.have_required_values? + image = RDF::Channel::Image.new(@maker.image.url) + rss.channel.image = image + set_parent(image, rss.channel) + end + end + + def setup_textinput(rss) + if @maker.textinput.have_required_values? + textinput = RDF::Channel::Textinput.new(@maker.textinput.link) + rss.channel.textinput = textinput + set_parent(textinput, rss.channel) + end + end + + def required_variable_names + %w(about link) + end + + def not_set_required_variables + vars = super + vars << "description" unless description {|d| d.have_required_values?} + vars << "title" unless title {|t| t.have_required_values?} + vars + end + + class SkipDays < SkipDaysBase + def to_feed(*args) + end + + class Day < DayBase + end + end + + class SkipHours < SkipHoursBase + def to_feed(*args) + end + + class Hour < HourBase + end + end + + class Cloud < CloudBase + def to_feed(*args) + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Links < LinksBase + def to_feed(rss, channel) + return if @links.empty? + @links.first.to_feed(rss, channel) + end + + class Link < LinkBase + def to_feed(rss, channel) + if have_required_values? + channel.link = href + else + raise NotSetError.new("maker.channel.link", + not_set_required_variables) + end + end + + private + def required_variable_names + %w(href) + end + end + end + + class Authors < AuthorsBase + def to_feed(rss, channel) + end + + class Author < AuthorBase + def to_feed(rss, channel) + end + end + end + + class Contributors < ContributorsBase + def to_feed(rss, channel) + end + + class Contributor < ContributorBase + end + end + + class Generator < GeneratorBase + def to_feed(rss, channel) + end + end + + class Copyright < CopyrightBase + def to_feed(rss, channel) + end + end + + class Description < DescriptionBase + def to_feed(rss, channel) + channel.description = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + + class Title < TitleBase + def to_feed(rss, channel) + channel.title = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + end + + class Image < ImageBase + def to_feed(rss) + if @url + image = RDF::Image.new(@url) + set = setup_values(image) + if set + rss.image = image + set_parent(image, rss) + setup_other_elements(rss, image) + end + end + end + + def have_required_values? + super and @maker.channel.have_required_values? + end + + private + def variables + super + ["link"] + end + + def required_variable_names + %w(url title link) + end + end + + class Items < ItemsBase + def to_feed(rss) + if rss.channel + normalize.each do |item| + item.to_feed(rss) + end + setup_other_elements(rss, rss.items) + end + end + + class Item < ItemBase + def to_feed(rss) + set_default_values do + item = RDF::Item.new(link) + set = setup_values(item) + if set + item.dc_dates.clear + rss.items << item + set_parent(item, rss) + setup_other_elements(rss, item) + elsif !have_required_values? + raise NotSetError.new("maker.item", not_set_required_variables) + end + end + end + + private + def required_variable_names + %w(link) + end + + def variables + super + %w(link) + end + + def not_set_required_variables + set_default_values do + vars = super + vars << "title" unless title {|t| t.have_required_values?} + vars + end + end + + class Guid < GuidBase + def to_feed(*args) + end + end + + class Enclosure < EnclosureBase + def to_feed(*args) + end + end + + class Source < SourceBase + def to_feed(*args) + end + + class Authors < AuthorsBase + def to_feed(*args) + end + + class Author < AuthorBase + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Contributors < ContributorsBase + def to_feed(*args) + end + + class Contributor < ContributorBase + end + end + + class Generator < GeneratorBase + def to_feed(*args) + end + end + + class Icon < IconBase + def to_feed(*args) + end + end + + class Links < LinksBase + def to_feed(*args) + end + + class Link < LinkBase + end + end + + class Logo < LogoBase + def to_feed(*args) + end + end + + class Rights < RightsBase + def to_feed(*args) + end + end + + class Subtitle < SubtitleBase + def to_feed(*args) + end + end + + class Title < TitleBase + def to_feed(*args) + end + end + end + + class Categories < CategoriesBase + def to_feed(*args) + end + + class Category < CategoryBase + end + end + + class Authors < AuthorsBase + def to_feed(*args) + end + + class Author < AuthorBase + end + end + + class Links < LinksBase + def to_feed(*args) + end + + class Link < LinkBase + end + end + + class Contributors < ContributorsBase + def to_feed(rss, item) + end + + class Contributor < ContributorBase + end + end + + class Rights < RightsBase + def to_feed(rss, item) + end + end + + class Description < DescriptionBase + def to_feed(rss, item) + item.description = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + + class Content < ContentBase + def to_feed(rss, item) + end + end + + class Title < TitleBase + def to_feed(rss, item) + item.title = content if have_required_values? + end + + private + def required_variable_names + %w(content) + end + end + end + end + + class Textinput < TextinputBase + def to_feed(rss) + if @link + textinput = RDF::Textinput.new(@link) + set = setup_values(textinput) + if set + rss.textinput = textinput + set_parent(textinput, rss) + setup_other_elements(rss, textinput) + end + end + end + + def have_required_values? + super and @maker.channel.have_required_values? + end + + private + def required_variable_names + %w(title description name link) + end + end + end + + add_maker("1.0", "1.0", RSS10) + add_maker("rss1.0", "1.0", RSS10) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/2.0.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/2.0.rb new file mode 100644 index 0000000..67d6812 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/2.0.rb @@ -0,0 +1,223 @@ +require "rss/2.0" + +require "rss/maker/0.9" + +module RSS + module Maker + + class RSS20 < RSS09 + + def initialize(feed_version="2.0") + super + end + + class Channel < RSS09::Channel + + private + def required_variable_names + %w(link) + end + + class SkipDays < RSS09::Channel::SkipDays + class Day < RSS09::Channel::SkipDays::Day + end + end + + class SkipHours < RSS09::Channel::SkipHours + class Hour < RSS09::Channel::SkipHours::Hour + end + end + + class Cloud < RSS09::Channel::Cloud + def to_feed(rss, channel) + cloud = Rss::Channel::Cloud.new + set = setup_values(cloud) + if set + channel.cloud = cloud + set_parent(cloud, channel) + setup_other_elements(rss, cloud) + end + end + + private + def required_variable_names + %w(domain port path registerProcedure protocol) + end + end + + class Categories < RSS09::Channel::Categories + def to_feed(rss, channel) + @categories.each do |category| + category.to_feed(rss, channel) + end + end + + class Category < RSS09::Channel::Categories::Category + def to_feed(rss, channel) + category = Rss::Channel::Category.new + set = setup_values(category) + if set + channel.categories << category + set_parent(category, channel) + setup_other_elements(rss, category) + end + end + + private + def required_variable_names + %w(content) + end + end + end + + class Generator < GeneratorBase + def to_feed(rss, channel) + channel.generator = content + end + + private + def required_variable_names + %w(content) + end + end + end + + class Image < RSS09::Image + private + def required_element? + false + end + end + + class Items < RSS09::Items + class Item < RSS09::Items::Item + private + def required_variable_names + [] + end + + def not_set_required_variables + vars = super + if !title {|t| t.have_required_values?} and + !description {|d| d.have_required_values?} + vars << "title or description" + end + vars + end + + def variables + super + ["pubDate"] + end + + class Guid < RSS09::Items::Item::Guid + def to_feed(rss, item) + guid = Rss::Channel::Item::Guid.new + set = setup_values(guid) + if set + item.guid = guid + set_parent(guid, item) + setup_other_elements(rss, guid) + end + end + + private + def required_variable_names + %w(content) + end + end + + class Enclosure < RSS09::Items::Item::Enclosure + def to_feed(rss, item) + enclosure = Rss::Channel::Item::Enclosure.new + set = setup_values(enclosure) + if set + item.enclosure = enclosure + set_parent(enclosure, item) + setup_other_elements(rss, enclosure) + end + end + + private + def required_variable_names + %w(url length type) + end + end + + class Source < RSS09::Items::Item::Source + def to_feed(rss, item) + source = Rss::Channel::Item::Source.new + set = setup_values(source) + if set + item.source = source + set_parent(source, item) + setup_other_elements(rss, source) + end + end + + private + def required_variable_names + %w(url content) + end + + class Links < RSS09::Items::Item::Source::Links + def to_feed(rss, source) + return if @links.empty? + @links.first.to_feed(rss, source) + end + + class Link < RSS09::Items::Item::Source::Links::Link + def to_feed(rss, source) + source.url = href + end + end + end + end + + class Categories < RSS09::Items::Item::Categories + def to_feed(rss, item) + @categories.each do |category| + category.to_feed(rss, item) + end + end + + class Category < RSS09::Items::Item::Categories::Category + def to_feed(rss, item) + category = Rss::Channel::Item::Category.new + set = setup_values(category) + if set + item.categories << category + set_parent(category, item) + setup_other_elements(rss) + end + end + + private + def required_variable_names + %w(content) + end + end + end + + class Authors < RSS09::Items::Item::Authors + def to_feed(rss, item) + return if @authors.empty? + @authors.first.to_feed(rss, item) + end + + class Author < RSS09::Items::Item::Authors::Author + def to_feed(rss, item) + item.author = name + end + end + end + end + end + + class Textinput < RSS09::Textinput + end + end + + add_maker("2.0", "2.0", RSS20) + add_maker("rss2.0", "2.0", RSS20) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/atom.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/atom.rb new file mode 100644 index 0000000..fd3198c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/atom.rb @@ -0,0 +1,172 @@ +require "rss/atom" + +require "rss/maker/base" + +module RSS + module Maker + module AtomPersons + module_function + def def_atom_persons(klass, name, maker_name, plural=nil) + plural ||= "#{name}s" + klass_name = Utils.to_class_name(name) + plural_klass_name = Utils.to_class_name(plural) + + klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1) + class #{plural_klass_name} < #{plural_klass_name}Base + class #{klass_name} < #{klass_name}Base + def to_feed(feed, current) + #{name} = feed.class::#{klass_name}.new + set = setup_values(#{name}) + unless set + raise NotSetError.new(#{maker_name.dump}, + not_set_required_variables) + end + current.#{plural} << #{name} + set_parent(#{name}, current) + setup_other_elements(#{name}) + end + + private + def required_variable_names + %w(name) + end + end + end +EOC + end + end + + module AtomTextConstruct + class << self + def def_atom_text_construct(klass, name, maker_name, klass_name=nil, + atom_klass_name=nil) + klass_name ||= Utils.to_class_name(name) + atom_klass_name ||= Utils.to_class_name(name) + + klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1) + class #{klass_name} < #{klass_name}Base + include #{self.name} + def to_feed(feed, current) + #{name} = current.class::#{atom_klass_name}.new + if setup_values(#{name}) + current.#{name} = #{name} + set_parent(#{name}, current) + setup_other_elements(feed) + elsif variable_is_set? + raise NotSetError.new(#{maker_name.dump}, + not_set_required_variables) + end + end + end + EOC + end + end + + private + def required_variable_names + if type == "xhtml" + %w(xml_content) + else + %w(content) + end + end + + def variables + if type == "xhtml" + super + %w(xhtml) + else + super + end + end + end + + module AtomCategory + def to_feed(feed, current) + category = feed.class::Category.new + set = setup_values(category) + if set + current.categories << category + set_parent(category, current) + setup_other_elements(feed) + else + raise NotSetError.new(self.class.not_set_name, + not_set_required_variables) + end + end + + private + def required_variable_names + %w(term) + end + + def variables + super + ["term", "scheme"] + end + end + + module AtomLink + def to_feed(feed, current) + link = feed.class::Link.new + set = setup_values(link) + if set + current.links << link + set_parent(link, current) + setup_other_elements(feed) + else + raise NotSetError.new(self.class.not_set_name, + not_set_required_variables) + end + end + + private + def required_variable_names + %w(href) + end + end + + module AtomGenerator + def to_feed(feed, current) + generator = current.class::Generator.new + if setup_values(generator) + current.generator = generator + set_parent(generator, current) + setup_other_elements(feed) + elsif variable_is_set? + raise NotSetError.new(self.class.not_set_name, + not_set_required_variables) + end + end + + private + def required_variable_names + %w(content) + end + end + + module AtomLogo + def to_feed(feed, current) + logo = current.class::Logo.new + class << logo + alias_method(:uri=, :content=) + end + set = setup_values(logo) + class << logo + remove_method(:uri=) + end + if set + current.logo = logo + set_parent(logo, current) + setup_other_elements(feed) + elsif variable_is_set? + raise NotSetError.new(self.class.not_set_name, + not_set_required_variables) + end + end + + private + def required_variable_names + %w(uri) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/base.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/base.rb new file mode 100644 index 0000000..2262a76 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/base.rb @@ -0,0 +1,880 @@ +require 'forwardable' + +require 'rss/rss' + +module RSS + module Maker + class Base + extend Utils::InheritedReader + + OTHER_ELEMENTS = [] + NEED_INITIALIZE_VARIABLES = [] + + class << self + def other_elements + inherited_array_reader("OTHER_ELEMENTS") + end + def need_initialize_variables + inherited_array_reader("NEED_INITIALIZE_VARIABLES") + end + + def inherited_base + ::RSS::Maker::Base + end + + def inherited(subclass) + subclass.const_set("OTHER_ELEMENTS", []) + subclass.const_set("NEED_INITIALIZE_VARIABLES", []) + end + + def add_other_element(variable_name) + self::OTHER_ELEMENTS << variable_name + end + + def add_need_initialize_variable(variable_name, init_value=nil, + &init_block) + init_value ||= init_block + self::NEED_INITIALIZE_VARIABLES << [variable_name, init_value] + end + + def def_array_element(name, plural=nil, klass_name=nil) + include Enumerable + extend Forwardable + + plural ||= "#{name}s" + klass_name ||= Utils.to_class_name(name) + def_delegators("@#{plural}", :<<, :[], :[]=, :first, :last) + def_delegators("@#{plural}", :push, :pop, :shift, :unshift) + def_delegators("@#{plural}", :each, :size, :empty?, :clear) + + add_need_initialize_variable(plural) {[]} + + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def new_#{name} + #{name} = self.class::#{klass_name}.new(@maker) + @#{plural} << #{name} + if block_given? + yield #{name} + else + #{name} + end + end + alias new_child new_#{name} + + def to_feed(*args) + @#{plural}.each do |#{name}| + #{name}.to_feed(*args) + end + end + + def replace(elements) + @#{plural}.replace(elements.to_a) + end + EOC + end + + def def_classed_element_without_accessor(name, class_name=nil) + class_name ||= Utils.to_class_name(name) + add_other_element(name) + add_need_initialize_variable(name) do |object| + object.send("make_#{name}") + end + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + private + def setup_#{name}(feed, current) + @#{name}.to_feed(feed, current) + end + + def make_#{name} + self.class::#{class_name}.new(@maker) + end + EOC + end + + def def_classed_element(name, class_name=nil, attribute_name=nil) + def_classed_element_without_accessor(name, class_name) + if attribute_name + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name} + if block_given? + yield(@#{name}) + else + @#{name}.#{attribute_name} + end + end + + def #{name}=(new_value) + @#{name}.#{attribute_name} = new_value + end + EOC + else + attr_reader name + end + end + + def def_classed_elements(name, attribute, plural_class_name=nil, + plural_name=nil, new_name=nil) + plural_name ||= "#{name}s" + new_name ||= name + def_classed_element(plural_name, plural_class_name) + local_variable_name = "_#{name}" + new_value_variable_name = "new_value" + additional_setup_code = nil + if block_given? + additional_setup_code = yield(local_variable_name, + new_value_variable_name) + end + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name} + #{local_variable_name} = #{plural_name}.first + #{local_variable_name} ? #{local_variable_name}.#{attribute} : nil + end + + def #{name}=(#{new_value_variable_name}) + #{local_variable_name} = + #{plural_name}.first || #{plural_name}.new_#{new_name} + #{additional_setup_code} + #{local_variable_name}.#{attribute} = #{new_value_variable_name} + end + EOC + end + + def def_other_element(name) + attr_accessor name + def_other_element_without_accessor(name) + end + + def def_other_element_without_accessor(name) + add_need_initialize_variable(name) + add_other_element(name) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def setup_#{name}(feed, current) + if !@#{name}.nil? and current.respond_to?(:#{name}=) + current.#{name} = @#{name} + end + end + EOC + end + + def def_csv_element(name, type=nil) + def_other_element_without_accessor(name) + attr_reader(name) + converter = "" + if type == :integer + converter = "{|v| Integer(v)}" + end + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name}=(value) + @#{name} = Utils::CSV.parse(value)#{converter} + end + EOC + end + end + + attr_reader :maker + def initialize(maker) + @maker = maker + @default_values_are_set = false + initialize_variables + end + + def have_required_values? + not_set_required_variables.empty? + end + + def variable_is_set? + variables.any? {|var| not __send__(var).nil?} + end + + private + def initialize_variables + self.class.need_initialize_variables.each do |variable_name, init_value| + if init_value.nil? + value = nil + else + if init_value.respond_to?(:call) + value = init_value.call(self) + elsif init_value.is_a?(String) + # just for backward compatibility + value = instance_eval(init_value, __FILE__, __LINE__) + else + value = init_value + end + end + instance_variable_set("@#{variable_name}", value) + end + end + + def setup_other_elements(feed, current=nil) + current ||= current_element(feed) + self.class.other_elements.each do |element| + __send__("setup_#{element}", feed, current) + end + end + + def current_element(feed) + feed + end + + def set_default_values(&block) + return yield if @default_values_are_set + + begin + @default_values_are_set = true + _set_default_values(&block) + ensure + @default_values_are_set = false + end + end + + def _set_default_values(&block) + yield + end + + def setup_values(target) + set = false + if have_required_values? + variables.each do |var| + setter = "#{var}=" + if target.respond_to?(setter) + value = __send__(var) + if value + target.__send__(setter, value) + set = true + end + end + end + end + set + end + + def set_parent(target, parent) + target.parent = parent if target.class.need_parent? + end + + def variables + self.class.need_initialize_variables.find_all do |name, init| + # init == "nil" is just for backward compatibility + init.nil? or init == "nil" + end.collect do |name, init| + name + end + end + + def not_set_required_variables + required_variable_names.find_all do |var| + __send__(var).nil? + end + end + + def required_variables_are_set? + required_variable_names.each do |var| + return false if __send__(var).nil? + end + true + end + end + + module AtomPersonConstructBase + def self.append_features(klass) + super + + klass.class_eval(<<-EOC, __FILE__, __LINE__ + 1) + %w(name uri email).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + EOC + end + end + + module AtomTextConstructBase + module EnsureXMLContent + class << self + def included(base) + super + base.class_eval do + %w(type content xml_content).each do |element| + attr_reader element + attr_writer element if element != "xml_content" + add_need_initialize_variable(element) + end + + alias_method(:xhtml, :xml_content) + end + end + end + + def ensure_xml_content(content) + xhtml_uri = ::RSS::Atom::XHTML_URI + unless content.is_a?(RSS::XML::Element) and + ["div", xhtml_uri] == [content.name, content.uri] + children = content + children = [children] unless content.is_a?(Array) + children = set_xhtml_uri_as_default_uri(children) + content = RSS::XML::Element.new("div", nil, xhtml_uri, + {"xmlns" => xhtml_uri}, + children) + end + content + end + + def xml_content=(content) + @xml_content = ensure_xml_content(content) + end + + def xhtml=(content) + self.xml_content = content + end + + private + def set_xhtml_uri_as_default_uri(children) + children.collect do |child| + if child.is_a?(RSS::XML::Element) and + child.prefix.nil? and child.uri.nil? + RSS::XML::Element.new(child.name, nil, ::RSS::Atom::XHTML_URI, + child.attributes.dup, + set_xhtml_uri_as_default_uri(child.children)) + else + child + end + end + end + end + + def self.append_features(klass) + super + + klass.class_eval do + include EnsureXMLContent + end + end + end + + module SetupDefaultDate + private + def _set_default_values(&block) + keep = { + :date => date, + :dc_dates => dc_dates.to_a.dup, + } + _date = date + if _date and !dc_dates.any? {|dc_date| dc_date.value == _date} + dc_date = self.class::DublinCoreDates::DublinCoreDate.new(self) + dc_date.value = _date.dup + dc_dates.unshift(dc_date) + end + self.date ||= self.dc_date + super(&block) + ensure + date = keep[:date] + dc_dates.replace(keep[:dc_dates]) + end + end + + class RSSBase < Base + class << self + def make(version, &block) + new(version).make(&block) + end + end + + %w(xml_stylesheets channel image items textinput).each do |element| + attr_reader element + add_need_initialize_variable(element) do |object| + object.send("make_#{element}") + end + module_eval(<<-EOC, __FILE__, __LINE__) + private + def setup_#{element}(feed) + @#{element}.to_feed(feed) + end + + def make_#{element} + self.class::#{Utils.to_class_name(element)}.new(self) + end + EOC + end + + attr_reader :feed_version + alias_method(:rss_version, :feed_version) + attr_accessor :version, :encoding, :standalone + + def initialize(feed_version) + super(self) + @feed_type = nil + @feed_subtype = nil + @feed_version = feed_version + @version = "1.0" + @encoding = "UTF-8" + @standalone = nil + end + + def make + yield(self) + to_feed + end + + def to_feed + feed = make_feed + setup_xml_stylesheets(feed) + setup_elements(feed) + setup_other_elements(feed) + feed.validate + feed + end + + private + remove_method :make_xml_stylesheets + def make_xml_stylesheets + XMLStyleSheets.new(self) + end + end + + class XMLStyleSheets < Base + def_array_element("xml_stylesheet", nil, "XMLStyleSheet") + + class XMLStyleSheet < Base + + ::RSS::XMLStyleSheet::ATTRIBUTES.each do |attribute| + attr_accessor attribute + add_need_initialize_variable(attribute) + end + + def to_feed(feed) + xss = ::RSS::XMLStyleSheet.new + guess_type_if_need(xss) + set = setup_values(xss) + if set + feed.xml_stylesheets << xss + end + end + + private + def guess_type_if_need(xss) + if @type.nil? + xss.href = @href + @type = xss.type + end + end + + def required_variable_names + %w(href type) + end + end + end + + class ChannelBase < Base + include SetupDefaultDate + + %w(cloud categories skipDays skipHours).each do |name| + def_classed_element(name) + end + + %w(generator copyright description title).each do |name| + def_classed_element(name, nil, "content") + end + + [ + ["link", "href", Proc.new {|target,| "#{target}.href = 'self'"}], + ["author", "name"], + ["contributor", "name"], + ].each do |name, attribute, additional_setup_maker| + def_classed_elements(name, attribute, &additional_setup_maker) + end + + %w(id about language + managingEditor webMaster rating docs date + lastBuildDate ttl).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + + def pubDate + date + end + + def pubDate=(date) + self.date = date + end + + def updated + date + end + + def updated=(date) + self.date = date + end + + alias_method(:rights, :copyright) + alias_method(:rights=, :copyright=) + + alias_method(:subtitle, :description) + alias_method(:subtitle=, :description=) + + def icon + image_favicon.about + end + + def icon=(url) + image_favicon.about = url + end + + def logo + maker.image.url + end + + def logo=(url) + maker.image.url = url + end + + class SkipDaysBase < Base + def_array_element("day") + + class DayBase < Base + %w(content).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + end + + class SkipHoursBase < Base + def_array_element("hour") + + class HourBase < Base + %w(content).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + end + + class CloudBase < Base + %w(domain port path registerProcedure protocol).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + class CategoriesBase < Base + def_array_element("category", "categories") + + class CategoryBase < Base + %w(domain content label).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + + alias_method(:term, :domain) + alias_method(:term=, :domain=) + alias_method(:scheme, :content) + alias_method(:scheme=, :content=) + end + end + + class LinksBase < Base + def_array_element("link") + + class LinkBase < Base + %w(href rel type hreflang title length).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + end + + class AuthorsBase < Base + def_array_element("author") + + class AuthorBase < Base + include AtomPersonConstructBase + end + end + + class ContributorsBase < Base + def_array_element("contributor") + + class ContributorBase < Base + include AtomPersonConstructBase + end + end + + class GeneratorBase < Base + %w(uri version content).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + class CopyrightBase < Base + include AtomTextConstructBase + end + + class DescriptionBase < Base + include AtomTextConstructBase + end + + class TitleBase < Base + include AtomTextConstructBase + end + end + + class ImageBase < Base + %w(title url width height description).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + + def link + @maker.channel.link + end + end + + class ItemsBase < Base + def_array_element("item") + + attr_accessor :do_sort, :max_size + + def initialize(maker) + super + @do_sort = false + @max_size = -1 + end + + def normalize + if @max_size >= 0 + sort_if_need[0...@max_size] + else + sort_if_need[0..@max_size] + end + end + + private + def sort_if_need + if @do_sort.respond_to?(:call) + @items.sort do |x, y| + @do_sort.call(x, y) + end + elsif @do_sort + @items.sort do |x, y| + y <=> x + end + else + @items + end + end + + class ItemBase < Base + include SetupDefaultDate + + %w(guid enclosure source categories content).each do |name| + def_classed_element(name) + end + + %w(rights description title).each do |name| + def_classed_element(name, nil, "content") + end + + [ + ["author", "name"], + ["link", "href", Proc.new {|target,| "#{target}.href = 'alternate'"}], + ["contributor", "name"], + ].each do |name, attribute| + def_classed_elements(name, attribute) + end + + %w(date comments id published).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + + def pubDate + date + end + + def pubDate=(date) + self.date = date + end + + def updated + date + end + + def updated=(date) + self.date = date + end + + alias_method(:summary, :description) + alias_method(:summary=, :description=) + + def <=>(other) + _date = date || dc_date + _other_date = other.date || other.dc_date + if _date and _other_date + _date <=> _other_date + elsif _date + 1 + elsif _other_date + -1 + else + 0 + end + end + + class GuidBase < Base + %w(isPermaLink content).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + class EnclosureBase < Base + %w(url length type).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + class SourceBase < Base + %w(authors categories contributors generator icon + logo rights subtitle title).each do |name| + def_classed_element(name) + end + + [ + ["link", "href"], + ].each do |name, attribute| + def_classed_elements(name, attribute) + end + + %w(id content date).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + + alias_method(:url, :link) + alias_method(:url=, :link=) + + def updated + date + end + + def updated=(date) + self.date = date + end + + private + AuthorsBase = ChannelBase::AuthorsBase + CategoriesBase = ChannelBase::CategoriesBase + ContributorsBase = ChannelBase::ContributorsBase + GeneratorBase = ChannelBase::GeneratorBase + + class IconBase < Base + %w(url).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + LinksBase = ChannelBase::LinksBase + + class LogoBase < Base + %w(uri).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + + class RightsBase < Base + include AtomTextConstructBase + end + + class SubtitleBase < Base + include AtomTextConstructBase + end + + class TitleBase < Base + include AtomTextConstructBase + end + end + + CategoriesBase = ChannelBase::CategoriesBase + AuthorsBase = ChannelBase::AuthorsBase + LinksBase = ChannelBase::LinksBase + ContributorsBase = ChannelBase::ContributorsBase + + class RightsBase < Base + include AtomTextConstructBase + end + + class DescriptionBase < Base + include AtomTextConstructBase + end + + class ContentBase < Base + include AtomTextConstructBase::EnsureXMLContent + + %w(src).each do |element| + attr_accessor(element) + add_need_initialize_variable(element) + end + + def xml_content=(content) + content = ensure_xml_content(content) if inline_xhtml? + @xml_content = content + end + + alias_method(:xml, :xml_content) + alias_method(:xml=, :xml_content=) + + def inline_text? + [nil, "text", "html"].include?(@type) + end + + def inline_html? + @type == "html" + end + + def inline_xhtml? + @type == "xhtml" + end + + def inline_other? + !out_of_line? and ![nil, "text", "html", "xhtml"].include?(@type) + end + + def inline_other_text? + return false if @type.nil? or out_of_line? + /\Atext\//i.match(@type) ? true : false + end + + def inline_other_xml? + return false if @type.nil? or out_of_line? + /[\+\/]xml\z/i.match(@type) ? true : false + end + + def inline_other_base64? + return false if @type.nil? or out_of_line? + @type.include?("/") and !inline_other_text? and !inline_other_xml? + end + + def out_of_line? + not @src.nil? and @content.nil? + end + end + + class TitleBase < Base + include AtomTextConstructBase + end + end + end + + class TextinputBase < Base + %w(title description name link).each do |element| + attr_accessor element + add_need_initialize_variable(element) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/content.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/content.rb new file mode 100644 index 0000000..46c4911 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/content.rb @@ -0,0 +1,21 @@ +require 'rss/content' +require 'rss/maker/1.0' +require 'rss/maker/2.0' + +module RSS + module Maker + module ContentModel + def self.append_features(klass) + super + + ::RSS::ContentModel::ELEMENTS.each do |name| + klass.def_other_element(name) + end + end + end + + class ItemsBase + class ItemBase; include ContentModel; end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/dublincore.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/dublincore.rb new file mode 100644 index 0000000..ff4813f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/dublincore.rb @@ -0,0 +1,124 @@ +require 'rss/dublincore' +require 'rss/maker/1.0' + +module RSS + module Maker + module DublinCoreModel + def self.append_features(klass) + super + + ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name| + plural_name ||= "#{name}s" + full_name = "#{RSS::DC_PREFIX}_#{name}" + full_plural_name = "#{RSS::DC_PREFIX}_#{plural_name}" + klass_name = Utils.to_class_name(name) + plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}" + full_plural_klass_name = "self.class::#{plural_klass_name}" + full_klass_name = "#{full_plural_klass_name}::#{klass_name}" + klass.def_classed_elements(full_name, "value", plural_klass_name, + full_plural_name, name) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def new_#{full_name}(value=nil) + _#{full_name} = #{full_plural_name}.new_#{name} + _#{full_name}.value = value + if block_given? + yield _#{full_name} + else + _#{full_name} + end + end + EOC + end + + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + # For backward compatibility + alias #{DC_PREFIX}_rightses #{DC_PREFIX}_rights_list + EOC + end + + ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name| + plural_name ||= "#{name}s" + full_name ||= "#{DC_PREFIX}_#{name}" + full_plural_name ||= "#{DC_PREFIX}_#{plural_name}" + klass_name = Utils.to_class_name(name) + full_klass_name = "DublinCore#{klass_name}" + plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}" + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class #{plural_klass_name}Base < Base + def_array_element(#{name.dump}, #{full_plural_name.dump}, + #{full_klass_name.dump}) + + class #{full_klass_name}Base < Base + attr_accessor :value + add_need_initialize_variable("value") + alias_method(:content, :value) + alias_method(:content=, :value=) + + def have_required_values? + @value + end + + def to_feed(feed, current) + if value and current.respond_to?(:#{full_name}) + new_item = current.class::#{full_klass_name}.new(value) + current.#{full_plural_name} << new_item + end + end + end + #{klass_name}Base = #{full_klass_name}Base + end + EOC + end + + def self.install_dublin_core(klass) + ::RSS::DublinCoreModel::ELEMENT_NAME_INFOS.each do |name, plural_name| + plural_name ||= "#{name}s" + klass_name = Utils.to_class_name(name) + full_klass_name = "DublinCore#{klass_name}" + plural_klass_name = "DublinCore#{Utils.to_class_name(plural_name)}" + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class #{plural_klass_name} < #{plural_klass_name}Base + class #{full_klass_name} < #{full_klass_name}Base + end + #{klass_name} = #{full_klass_name} + end +EOC + end + end + end + + class ChannelBase + include DublinCoreModel + end + + class ImageBase; include DublinCoreModel; end + class ItemsBase + class ItemBase + include DublinCoreModel + end + end + class TextinputBase; include DublinCoreModel; end + + makers.each do |maker| + maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class Channel + DublinCoreModel.install_dublin_core(self) + end + + class Image + DublinCoreModel.install_dublin_core(self) + end + + class Items + class Item + DublinCoreModel.install_dublin_core(self) + end + end + + class Textinput + DublinCoreModel.install_dublin_core(self) + end + EOC + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/entry.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/entry.rb new file mode 100644 index 0000000..edaa31e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/entry.rb @@ -0,0 +1,163 @@ +require "rss/maker/atom" +require "rss/maker/feed" + +module RSS + module Maker + module Atom + class Entry < RSSBase + def initialize(feed_version="1.0") + super + @feed_type = "atom" + @feed_subtype = "entry" + end + + private + def make_feed + ::RSS::Atom::Entry.new(@version, @encoding, @standalone) + end + + def setup_elements(entry) + setup_items(entry) + end + + class Channel < ChannelBase + class SkipDays < SkipDaysBase + class Day < DayBase + end + end + + class SkipHours < SkipHoursBase + class Hour < HourBase + end + end + + class Cloud < CloudBase + end + + Categories = Feed::Channel::Categories + Links = Feed::Channel::Links + Authors = Feed::Channel::Authors + Contributors = Feed::Channel::Contributors + + class Generator < GeneratorBase + include AtomGenerator + + def self.not_set_name + "maker.channel.generator" + end + end + + Copyright = Feed::Channel::Copyright + + class Description < DescriptionBase + end + + Title = Feed::Channel::Title + end + + class Image < ImageBase + end + + class Items < ItemsBase + def to_feed(entry) + (normalize.first || Item.new(@maker)).to_feed(entry) + end + + class Item < ItemBase + def to_feed(entry) + set_default_values do + setup_values(entry) + entry.dc_dates.clear + setup_other_elements(entry) + unless have_required_values? + raise NotSetError.new("maker.item", not_set_required_variables) + end + end + end + + private + def required_variable_names + %w(id updated) + end + + def variables + super + ["updated"] + end + + def variable_is_set? + super or !authors.empty? + end + + def not_set_required_variables + set_default_values do + vars = super + if authors.all? {|author| !author.have_required_values?} + vars << "author" + end + vars << "title" unless title {|t| t.have_required_values?} + vars + end + end + + def _set_default_values(&block) + keep = { + :authors => authors.to_a.dup, + :contributors => contributors.to_a.dup, + :categories => categories.to_a.dup, + :id => id, + :links => links.to_a.dup, + :rights => @rights, + :title => @title, + :updated => updated, + } + authors.replace(@maker.channel.authors) if keep[:authors].empty? + if keep[:contributors].empty? + contributors.replace(@maker.channel.contributors) + end + if keep[:categories].empty? + categories.replace(@maker.channel.categories) + end + self.id ||= link || @maker.channel.id + links.replace(@maker.channel.links) if keep[:links].empty? + unless keep[:rights].variable_is_set? + @maker.channel.rights {|r| @rights = r} + end + unless keep[:title].variable_is_set? + @maker.channel.title {|t| @title = t} + end + self.updated ||= @maker.channel.updated + super(&block) + ensure + authors.replace(keep[:authors]) + contributors.replace(keep[:contributors]) + categories.replace(keep[:categories]) + links.replace(keep[:links]) + self.id = keep[:id] + @rights = keep[:rights] + @title = keep[:title] + self.updated = keep[:prev_updated] + end + + Guid = Feed::Items::Item::Guid + Enclosure = Feed::Items::Item::Enclosure + Source = Feed::Items::Item::Source + Categories = Feed::Items::Item::Categories + Authors = Feed::Items::Item::Authors + Contributors = Feed::Items::Item::Contributors + Links = Feed::Items::Item::Links + Rights = Feed::Items::Item::Rights + Description = Feed::Items::Item::Description + Title = Feed::Items::Item::Title + Content = Feed::Items::Item::Content + end + end + + class Textinput < TextinputBase + end + end + end + + add_maker("atom:entry", "1.0", Atom::Entry) + add_maker("atom1.0:entry", "1.0", Atom::Entry) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/feed.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/feed.rb new file mode 100644 index 0000000..3a30ad4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/feed.rb @@ -0,0 +1,429 @@ +require "rss/maker/atom" + +module RSS + module Maker + module Atom + class Feed < RSSBase + def initialize(feed_version="1.0") + super + @feed_type = "atom" + @feed_subtype = "feed" + end + + private + def make_feed + ::RSS::Atom::Feed.new(@version, @encoding, @standalone) + end + + def setup_elements(feed) + setup_channel(feed) + setup_image(feed) + setup_items(feed) + end + + class Channel < ChannelBase + def to_feed(feed) + set_default_values do + setup_values(feed) + feed.dc_dates.clear + setup_other_elements(feed) + if image_favicon.about + icon = feed.class::Icon.new + icon.content = image_favicon.about + feed.icon = icon + end + unless have_required_values? + raise NotSetError.new("maker.channel", + not_set_required_variables) + end + end + end + + def have_required_values? + super and + (!authors.empty? or + @maker.items.any? {|item| !item.authors.empty?}) + end + + private + def required_variable_names + %w(id updated) + end + + def variables + super + %w(id updated) + end + + def variable_is_set? + super or !authors.empty? + end + + def not_set_required_variables + vars = super + if authors.empty? and + @maker.items.all? {|item| item.author.to_s.empty?} + vars << "author" + end + vars << "title" unless title {|t| t.have_required_values?} + vars + end + + def _set_default_values(&block) + keep = { + :id => id, + :updated => updated, + } + self.id ||= about + self.updated ||= dc_date + super(&block) + ensure + self.id = keep[:id] + self.updated = keep[:updated] + end + + class SkipDays < SkipDaysBase + def to_feed(*args) + end + + class Day < DayBase + end + end + + class SkipHours < SkipHoursBase + def to_feed(*args) + end + + class Hour < HourBase + end + end + + class Cloud < CloudBase + def to_feed(*args) + end + end + + class Categories < CategoriesBase + class Category < CategoryBase + include AtomCategory + + def self.not_set_name + "maker.channel.category" + end + end + end + + class Links < LinksBase + class Link < LinkBase + include AtomLink + + def self.not_set_name + "maker.channel.link" + end + end + end + + AtomPersons.def_atom_persons(self, "author", "maker.channel.author") + AtomPersons.def_atom_persons(self, "contributor", + "maker.channel.contributor") + + class Generator < GeneratorBase + include AtomGenerator + + def self.not_set_name + "maker.channel.generator" + end + end + + AtomTextConstruct.def_atom_text_construct(self, "rights", + "maker.channel.copyright", + "Copyright") + AtomTextConstruct.def_atom_text_construct(self, "subtitle", + "maker.channel.description", + "Description") + AtomTextConstruct.def_atom_text_construct(self, "title", + "maker.channel.title") + end + + class Image < ImageBase + def to_feed(feed) + logo = feed.class::Logo.new + class << logo + alias_method(:url=, :content=) + end + set = setup_values(logo) + class << logo + remove_method(:url=) + end + if set + feed.logo = logo + set_parent(logo, feed) + setup_other_elements(feed, logo) + elsif variable_is_set? + raise NotSetError.new("maker.image", not_set_required_variables) + end + end + + private + def required_variable_names + %w(url) + end + end + + class Items < ItemsBase + def to_feed(feed) + normalize.each do |item| + item.to_feed(feed) + end + setup_other_elements(feed, feed.entries) + end + + class Item < ItemBase + def to_feed(feed) + set_default_values do + entry = feed.class::Entry.new + set = setup_values(entry) + setup_other_elements(feed, entry) + if set + feed.entries << entry + set_parent(entry, feed) + elsif variable_is_set? + raise NotSetError.new("maker.item", not_set_required_variables) + end + end + end + + def have_required_values? + set_default_values do + super and title {|t| t.have_required_values?} + end + end + + private + def required_variable_names + %w(id updated) + end + + def variables + super + ["updated"] + end + + def not_set_required_variables + vars = super + vars << "title" unless title {|t| t.have_required_values?} + vars + end + + def _set_default_values(&block) + keep = { + :id => id, + :updated => updated, + } + self.id ||= link + self.updated ||= dc_date + super(&block) + ensure + self.id = keep[:id] + self.updated = keep[:updated] + end + + class Guid < GuidBase + def to_feed(feed, current) + end + end + + class Enclosure < EnclosureBase + def to_feed(feed, current) + end + end + + class Source < SourceBase + def to_feed(feed, current) + source = current.class::Source.new + setup_values(source) + current.source = source + set_parent(source, current) + setup_other_elements(feed, source) + current.source = nil if source.to_s == "" + end + + private + def required_variable_names + [] + end + + def variables + super + ["updated"] + end + + AtomPersons.def_atom_persons(self, "author", + "maker.item.source.author") + AtomPersons.def_atom_persons(self, "contributor", + "maker.item.source.contributor") + + class Categories < CategoriesBase + class Category < CategoryBase + include AtomCategory + + def self.not_set_name + "maker.item.source.category" + end + end + end + + class Generator < GeneratorBase + include AtomGenerator + + def self.not_set_name + "maker.item.source.generator" + end + end + + class Icon < IconBase + def to_feed(feed, current) + icon = current.class::Icon.new + class << icon + alias_method(:url=, :content=) + end + set = setup_values(icon) + class << icon + remove_method(:url=) + end + if set + current.icon = icon + set_parent(icon, current) + setup_other_elements(feed, icon) + elsif variable_is_set? + raise NotSetError.new("maker.item.source.icon", + not_set_required_variables) + end + end + + private + def required_variable_names + %w(url) + end + end + + class Links < LinksBase + class Link < LinkBase + include AtomLink + + def self.not_set_name + "maker.item.source.link" + end + end + end + + class Logo < LogoBase + include AtomLogo + + def self.not_set_name + "maker.item.source.logo" + end + end + + maker_name_base = "maker.item.source." + maker_name = "#{maker_name_base}rights" + AtomTextConstruct.def_atom_text_construct(self, "rights", + maker_name) + maker_name = "#{maker_name_base}subtitle" + AtomTextConstruct.def_atom_text_construct(self, "subtitle", + maker_name) + maker_name = "#{maker_name_base}title" + AtomTextConstruct.def_atom_text_construct(self, "title", + maker_name) + end + + class Categories < CategoriesBase + class Category < CategoryBase + include AtomCategory + + def self.not_set_name + "maker.item.category" + end + end + end + + AtomPersons.def_atom_persons(self, "author", "maker.item.author") + AtomPersons.def_atom_persons(self, "contributor", + "maker.item.contributor") + + class Links < LinksBase + class Link < LinkBase + include AtomLink + + def self.not_set_name + "maker.item.link" + end + end + end + + AtomTextConstruct.def_atom_text_construct(self, "rights", + "maker.item.rights") + AtomTextConstruct.def_atom_text_construct(self, "summary", + "maker.item.description", + "Description") + AtomTextConstruct.def_atom_text_construct(self, "title", + "maker.item.title") + + class Content < ContentBase + def to_feed(feed, current) + content = current.class::Content.new + if setup_values(content) + content.src = nil if content.src and content.content + current.content = content + set_parent(content, current) + setup_other_elements(feed, content) + elsif variable_is_set? + raise NotSetError.new("maker.item.content", + not_set_required_variables) + end + end + + alias_method(:xml, :xml_content) + + private + def required_variable_names + if out_of_line? + %w(type) + elsif xml_type? + %w(xml_content) + else + %w(content) + end + end + + def variables + if out_of_line? + super + elsif xml_type? + super + %w(xml) + else + super + end + end + + def xml_type? + _type = type + return false if _type.nil? + _type == "xhtml" or + /(?:\+xml|\/xml)$/i =~ _type or + %w(text/xml-external-parsed-entity + application/xml-external-parsed-entity + application/xml-dtd).include?(_type.downcase) + end + end + end + end + + class Textinput < TextinputBase + end + end + end + + add_maker("atom", "1.0", Atom::Feed) + add_maker("atom:feed", "1.0", Atom::Feed) + add_maker("atom1.0", "1.0", Atom::Feed) + add_maker("atom1.0:feed", "1.0", Atom::Feed) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/image.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/image.rb new file mode 100644 index 0000000..b95cf4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/image.rb @@ -0,0 +1,111 @@ +require 'rss/image' +require 'rss/maker/1.0' +require 'rss/maker/dublincore' + +module RSS + module Maker + module ImageItemModel + def self.append_features(klass) + super + + name = "#{RSS::IMAGE_PREFIX}_item" + klass.def_classed_element(name) + end + + def self.install_image_item(klass) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class ImageItem < ImageItemBase + DublinCoreModel.install_dublin_core(self) + end +EOC + end + + class ImageItemBase < Base + include Maker::DublinCoreModel + + attr_accessor :about, :resource, :image_width, :image_height + add_need_initialize_variable("about") + add_need_initialize_variable("resource") + add_need_initialize_variable("image_width") + add_need_initialize_variable("image_height") + alias width= image_width= + alias width image_width + alias height= image_height= + alias height image_height + + def have_required_values? + @about + end + + def to_feed(feed, current) + if current.respond_to?(:image_item=) and have_required_values? + item = current.class::ImageItem.new + setup_values(item) + setup_other_elements(item) + current.image_item = item + end + end + end + end + + module ImageFaviconModel + def self.append_features(klass) + super + + name = "#{RSS::IMAGE_PREFIX}_favicon" + klass.def_classed_element(name) + end + + def self.install_image_favicon(klass) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class ImageFavicon < ImageFaviconBase + DublinCoreModel.install_dublin_core(self) + end + EOC + end + + class ImageFaviconBase < Base + include Maker::DublinCoreModel + + attr_accessor :about, :image_size + add_need_initialize_variable("about") + add_need_initialize_variable("image_size") + alias size image_size + alias size= image_size= + + def have_required_values? + @about and @image_size + end + + def to_feed(feed, current) + if current.respond_to?(:image_favicon=) and have_required_values? + favicon = current.class::ImageFavicon.new + setup_values(favicon) + setup_other_elements(favicon) + current.image_favicon = favicon + end + end + end + end + + class ChannelBase; include Maker::ImageFaviconModel; end + + class ItemsBase + class ItemBase; include Maker::ImageItemModel; end + end + + makers.each do |maker| + maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class Channel + ImageFaviconModel.install_image_favicon(self) + end + + class Items + class Item + ImageItemModel.install_image_item(self) + end + end + EOC + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/itunes.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/itunes.rb new file mode 100644 index 0000000..8b7420d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/itunes.rb @@ -0,0 +1,242 @@ +require 'rss/itunes' +require 'rss/maker/2.0' + +module RSS + module Maker + module ITunesBaseModel + def def_class_accessor(klass, name, type, *args) + name = name.gsub(/-/, "_").gsub(/^itunes_/, '') + full_name = "#{RSS::ITUNES_PREFIX}_#{name}" + case type + when nil + klass.def_other_element(full_name) + when :yes_other + def_yes_other_accessor(klass, full_name) + when :yes_clean_other + def_yes_clean_other_accessor(klass, full_name) + when :csv + def_csv_accessor(klass, full_name) + when :element, :attribute + recommended_attribute_name, = *args + klass_name = "ITunes#{Utils.to_class_name(name)}" + klass.def_classed_element(full_name, klass_name, + recommended_attribute_name) + when :elements + plural_name, recommended_attribute_name = args + plural_name ||= "#{name}s" + full_plural_name = "#{RSS::ITUNES_PREFIX}_#{plural_name}" + klass_name = "ITunes#{Utils.to_class_name(name)}" + plural_klass_name = "ITunes#{Utils.to_class_name(plural_name)}" + def_elements_class_accessor(klass, name, full_name, full_plural_name, + klass_name, plural_klass_name, + recommended_attribute_name) + end + end + + def def_yes_other_accessor(klass, full_name) + klass.def_other_element(full_name) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{full_name}? + Utils::YesOther.parse(@#{full_name}) + end + EOC + end + + def def_yes_clean_other_accessor(klass, full_name) + klass.def_other_element(full_name) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{full_name}? + Utils::YesCleanOther.parse(#{full_name}) + end + EOC + end + + def def_csv_accessor(klass, full_name) + klass.def_csv_element(full_name) + end + + def def_elements_class_accessor(klass, name, full_name, full_plural_name, + klass_name, plural_klass_name, + recommended_attribute_name=nil) + if recommended_attribute_name + klass.def_classed_elements(full_name, recommended_attribute_name, + plural_klass_name, full_plural_name) + else + klass.def_classed_element(full_plural_name, plural_klass_name) + end + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def new_#{full_name}(text=nil) + #{full_name} = @#{full_plural_name}.new_#{name} + #{full_name}.text = text + if block_given? + yield #{full_name} + else + #{full_name} + end + end + EOC + end + end + + module ITunesChannelModel + extend ITunesBaseModel + + class << self + def append_features(klass) + super + + ::RSS::ITunesChannelModel::ELEMENT_INFOS.each do |name, type, *args| + def_class_accessor(klass, name, type, *args) + end + end + end + + class ITunesCategoriesBase < Base + def_array_element("category", "itunes_categories", + "ITunesCategory") + class ITunesCategoryBase < Base + attr_accessor :text + add_need_initialize_variable("text") + def_array_element("category", "itunes_categories", + "ITunesCategory") + + def have_required_values? + text + end + + alias_method :to_feed_for_categories, :to_feed + def to_feed(feed, current) + if text and current.respond_to?(:itunes_category) + new_item = current.class::ITunesCategory.new(text) + to_feed_for_categories(feed, new_item) + current.itunes_categories << new_item + end + end + end + end + + class ITunesImageBase < Base + add_need_initialize_variable("href") + attr_accessor("href") + + def to_feed(feed, current) + if @href and current.respond_to?(:itunes_image) + current.itunes_image ||= current.class::ITunesImage.new + current.itunes_image.href = @href + end + end + end + + class ITunesOwnerBase < Base + %w(itunes_name itunes_email).each do |name| + add_need_initialize_variable(name) + attr_accessor(name) + end + + def to_feed(feed, current) + if current.respond_to?(:itunes_owner=) + _not_set_required_variables = not_set_required_variables + if (required_variable_names - _not_set_required_variables).empty? + return + end + + unless have_required_values? + raise NotSetError.new("maker.channel.itunes_owner", + _not_set_required_variables) + end + current.itunes_owner ||= current.class::ITunesOwner.new + current.itunes_owner.itunes_name = @itunes_name + current.itunes_owner.itunes_email = @itunes_email + end + end + + private + def required_variable_names + %w(itunes_name itunes_email) + end + end + end + + module ITunesItemModel + extend ITunesBaseModel + + class << self + def append_features(klass) + super + + ::RSS::ITunesItemModel::ELEMENT_INFOS.each do |name, type, *args| + def_class_accessor(klass, name, type, *args) + end + end + end + + class ITunesDurationBase < Base + attr_reader :content + add_need_initialize_variable("content") + + %w(hour minute second).each do |name| + attr_reader(name) + add_need_initialize_variable(name, 0) + end + + def content=(content) + if content.nil? + @hour, @minute, @second, @content = nil + else + @hour, @minute, @second = + ::RSS::ITunesItemModel::ITunesDuration.parse(content) + @content = content + end + end + + def hour=(hour) + @hour = Integer(hour) + update_content + end + + def minute=(minute) + @minute = Integer(minute) + update_content + end + + def second=(second) + @second = Integer(second) + update_content + end + + def to_feed(feed, current) + if @content and current.respond_to?(:itunes_duration=) + current.itunes_duration ||= current.class::ITunesDuration.new + current.itunes_duration.content = @content + end + end + + private + def update_content + components = [@hour, @minute, @second] + @content = + ::RSS::ITunesItemModel::ITunesDuration.construct(*components) + end + end + end + + class ChannelBase + include Maker::ITunesChannelModel + class ITunesCategories < ITunesCategoriesBase + class ITunesCategory < ITunesCategoryBase + ITunesCategory = self + end + end + + class ITunesImage < ITunesImageBase; end + class ITunesOwner < ITunesOwnerBase; end + end + + class ItemsBase + class ItemBase + include Maker::ITunesItemModel + class ITunesDuration < ITunesDurationBase; end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/slash.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/slash.rb new file mode 100644 index 0000000..27adef3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/slash.rb @@ -0,0 +1,33 @@ +require 'rss/slash' +require 'rss/maker/1.0' + +module RSS + module Maker + module SlashModel + def self.append_features(klass) + super + + ::RSS::SlashModel::ELEMENT_INFOS.each do |name, type| + full_name = "#{RSS::SLASH_PREFIX}_#{name}" + case type + when :csv_integer + klass.def_csv_element(full_name, :integer) + else + klass.def_other_element(full_name) + end + end + + klass.module_eval do + alias_method(:slash_hit_parades, :slash_hit_parade) + alias_method(:slash_hit_parades=, :slash_hit_parade=) + end + end + end + + class ItemsBase + class ItemBase + include SlashModel + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/syndication.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/syndication.rb new file mode 100644 index 0000000..b812304 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/syndication.rb @@ -0,0 +1,18 @@ +require 'rss/syndication' +require 'rss/maker/1.0' + +module RSS + module Maker + module SyndicationModel + def self.append_features(klass) + super + + ::RSS::SyndicationModel::ELEMENTS.each do |name| + klass.def_other_element(name) + end + end + end + + class ChannelBase; include SyndicationModel; end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/taxonomy.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/taxonomy.rb new file mode 100644 index 0000000..2116038 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/taxonomy.rb @@ -0,0 +1,118 @@ +require 'rss/taxonomy' +require 'rss/maker/1.0' +require 'rss/maker/dublincore' + +module RSS + module Maker + module TaxonomyTopicsModel + def self.append_features(klass) + super + + klass.def_classed_element("#{RSS::TAXO_PREFIX}_topics", + "TaxonomyTopics") + end + + def self.install_taxo_topics(klass) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class TaxonomyTopics < TaxonomyTopicsBase + def to_feed(feed, current) + if current.respond_to?(:taxo_topics) + topics = current.class::TaxonomyTopics.new + bag = topics.Bag + @resources.each do |resource| + bag.lis << RDF::Bag::Li.new(resource) + end + current.taxo_topics = topics + end + end + end +EOC + end + + class TaxonomyTopicsBase < Base + attr_reader :resources + def_array_element("resource") + remove_method :new_resource + end + end + + module TaxonomyTopicModel + def self.append_features(klass) + super + + class_name = "TaxonomyTopics" + klass.def_classed_elements("#{TAXO_PREFIX}_topic", "value", class_name) + end + + def self.install_taxo_topic(klass) + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class TaxonomyTopics < TaxonomyTopicsBase + class TaxonomyTopic < TaxonomyTopicBase + DublinCoreModel.install_dublin_core(self) + TaxonomyTopicsModel.install_taxo_topics(self) + + def to_feed(feed, current) + if current.respond_to?(:taxo_topics) + topic = current.class::TaxonomyTopic.new(value) + topic.taxo_link = value + taxo_topics.to_feed(feed, topic) if taxo_topics + current.taxo_topics << topic + setup_other_elements(feed, topic) + end + end + end + end +EOC + end + + class TaxonomyTopicsBase < Base + def_array_element("topic", nil, "TaxonomyTopic") + alias_method(:new_taxo_topic, :new_topic) # For backward compatibility + + class TaxonomyTopicBase < Base + include DublinCoreModel + include TaxonomyTopicsModel + + attr_accessor :value + add_need_initialize_variable("value") + alias_method(:taxo_link, :value) + alias_method(:taxo_link=, :value=) + + def have_required_values? + @value + end + end + end + end + + class RSSBase + include TaxonomyTopicModel + end + + class ChannelBase + include TaxonomyTopicsModel + end + + class ItemsBase + class ItemBase + include TaxonomyTopicsModel + end + end + + makers.each do |maker| + maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + TaxonomyTopicModel.install_taxo_topic(self) + + class Channel + TaxonomyTopicsModel.install_taxo_topics(self) + end + + class Items + class Item + TaxonomyTopicsModel.install_taxo_topics(self) + end + end + EOC + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/maker/trackback.rb b/lib/ruby-1.9.1-rc1/lib/rss/maker/trackback.rb new file mode 100644 index 0000000..278fe53 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/maker/trackback.rb @@ -0,0 +1,61 @@ +require 'rss/trackback' +require 'rss/maker/1.0' +require 'rss/maker/2.0' + +module RSS + module Maker + module TrackBackModel + def self.append_features(klass) + super + + klass.def_other_element("#{RSS::TRACKBACK_PREFIX}_ping") + klass.def_classed_elements("#{RSS::TRACKBACK_PREFIX}_about", "value", + "TrackBackAbouts") + end + + class TrackBackAboutsBase < Base + def_array_element("about", nil, "TrackBackAbout") + + class TrackBackAboutBase < Base + attr_accessor :value + add_need_initialize_variable("value") + + alias_method(:resource, :value) + alias_method(:resource=, :value=) + alias_method(:content, :value) + alias_method(:content=, :value=) + + def have_required_values? + @value + end + + def to_feed(feed, current) + if current.respond_to?(:trackback_abouts) and have_required_values? + about = current.class::TrackBackAbout.new + setup_values(about) + setup_other_elements(about) + current.trackback_abouts << about + end + end + end + end + end + + class ItemsBase + class ItemBase; include TrackBackModel; end + end + + makers.each do |maker| + maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + class Items + class Item + class TrackBackAbouts < TrackBackAboutsBase + class TrackBackAbout < TrackBackAboutBase + end + end + end + end + EOC + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/parser.rb b/lib/ruby-1.9.1-rc1/lib/rss/parser.rb new file mode 100644 index 0000000..9b28f0f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/parser.rb @@ -0,0 +1,551 @@ +require "forwardable" +require "open-uri" + +require "rss/rss" +require "rss/xml" + +module RSS + + class NotWellFormedError < Error + attr_reader :line, :element + + # Create a new NotWellFormedError for an error at +line+ + # in +element+. If a block is given the return value of + # the block ends up in the error message. + def initialize(line=nil, element=nil) + message = "This is not well formed XML" + if element or line + message << "\nerror occurred" + message << " in #{element}" if element + message << " at about #{line} line" if line + end + message << "\n#{yield}" if block_given? + super(message) + end + end + + class XMLParserNotFound < Error + def initialize + super("available XML parser was not found in " << + "#{AVAILABLE_PARSER_LIBRARIES.inspect}.") + end + end + + class NotValidXMLParser < Error + def initialize(parser) + super("#{parser} is not an available XML parser. " << + "Available XML parser" << + (AVAILABLE_PARSERS.size > 1 ? "s are " : " is ") << + "#{AVAILABLE_PARSERS.inspect}.") + end + end + + class NSError < InvalidRSSError + attr_reader :tag, :prefix, :uri + def initialize(tag, prefix, require_uri) + @tag, @prefix, @uri = tag, prefix, require_uri + super("prefix <#{prefix}> doesn't associate uri " << + "<#{require_uri}> in tag <#{tag}>") + end + end + + class Parser + + extend Forwardable + + class << self + + @@default_parser = nil + + def default_parser + @@default_parser || AVAILABLE_PARSERS.first + end + + # Set @@default_parser to new_value if it is one of the + # available parsers. Else raise NotValidXMLParser error. + def default_parser=(new_value) + if AVAILABLE_PARSERS.include?(new_value) + @@default_parser = new_value + else + raise NotValidXMLParser.new(new_value) + end + end + + def parse(rss, do_validate=true, ignore_unknown_element=true, + parser_class=default_parser) + parser = new(rss, parser_class) + parser.do_validate = do_validate + parser.ignore_unknown_element = ignore_unknown_element + parser.parse + end + end + + def_delegators(:@parser, :parse, :rss, + :ignore_unknown_element, + :ignore_unknown_element=, :do_validate, + :do_validate=) + + def initialize(rss, parser_class=self.class.default_parser) + @parser = parser_class.new(normalize_rss(rss)) + end + + private + + # Try to get the XML associated with +rss+. + # Return +rss+ if it already looks like XML, or treat it as a URI, + # or a file to get the XML, + def normalize_rss(rss) + return rss if maybe_xml?(rss) + + uri = to_uri(rss) + + if uri.respond_to?(:read) + uri.read + elsif !rss.tainted? and File.readable?(rss) + File.open(rss) {|f| f.read} + else + rss + end + end + + # maybe_xml? tests if source is a string that looks like XML. + def maybe_xml?(source) + source.is_a?(String) and / :xml}] + @tag_stack = [[]] + @text_stack = [''] + @proc_stack = [] + @last_element = nil + @version = @encoding = @standalone = nil + @xml_stylesheets = [] + @xml_child_mode = false + @xml_element = nil + @last_xml_element = nil + end + + # set instance vars for version, encoding, standalone + def xmldecl(version, encoding, standalone) + @version, @encoding, @standalone = version, encoding, standalone + end + + def instruction(name, content) + if name == "xml-stylesheet" + params = parse_pi_content(content) + if params.has_key?("href") + @xml_stylesheets << XMLStyleSheet.new(params) + end + end + end + + def tag_start(name, attributes) + @text_stack.push('') + + ns = @ns_stack.last.dup + attrs = {} + attributes.each do |n, v| + if /\Axmlns(?:\z|:)/ =~ n + ns[$POSTMATCH] = v + else + attrs[n] = v + end + end + @ns_stack.push(ns) + + prefix, local = split_name(name) + @tag_stack.last.push([_ns(ns, prefix), local]) + @tag_stack.push([]) + if @xml_child_mode + previous = @last_xml_element + element_attrs = attributes.dup + unless previous + ns.each do |ns_prefix, value| + next if ns_prefix == "xml" + key = ns_prefix.empty? ? "xmlns" : "xmlns:#{ns_prefix}" + element_attrs[key] ||= value + end + end + next_element = XML::Element.new(local, + prefix.empty? ? nil : prefix, + _ns(ns, prefix), + element_attrs) + previous << next_element if previous + @last_xml_element = next_element + pr = Proc.new do |text, tags| + if previous + @last_xml_element = previous + else + @xml_element = @last_xml_element + @last_xml_element = nil + end + end + @proc_stack.push(pr) + else + if @rss.nil? and respond_to?("initial_start_#{local}", true) + __send__("initial_start_#{local}", local, prefix, attrs, ns.dup) + elsif respond_to?("start_#{local}", true) + __send__("start_#{local}", local, prefix, attrs, ns.dup) + else + start_else_element(local, prefix, attrs, ns.dup) + end + end + end + + def tag_end(name) + if DEBUG + p "end tag #{name}" + p @tag_stack + end + text = @text_stack.pop + tags = @tag_stack.pop + pr = @proc_stack.pop + pr.call(text, tags) unless pr.nil? + @ns_stack.pop + end + + def text(data) + if @xml_child_mode + @last_xml_element << data if @last_xml_element + else + @text_stack.last << data + end + end + + private + def _ns(ns, prefix) + ns.fetch(prefix, "") + end + + CONTENT_PATTERN = /\s*([^=]+)=(["'])([^\2]+?)\2/ + # Extract the first name="value" pair from content. + # Works with single quotes according to the constant + # CONTENT_PATTERN. Return a Hash. + def parse_pi_content(content) + params = {} + content.scan(CONTENT_PATTERN) do |name, quote, value| + params[name] = value + end + params + end + + def start_else_element(local, prefix, attrs, ns) + class_name = self.class.class_name(_ns(ns, prefix), local) + current_class = @last_element.class + if known_class?(current_class, class_name) + next_class = current_class.const_get(class_name) + start_have_something_element(local, prefix, attrs, ns, next_class) + else + if !@do_validate or @ignore_unknown_element + @proc_stack.push(nil) + else + parent = "ROOT ELEMENT???" + if current_class.tag_name + parent = current_class.tag_name + end + raise NotExpectedTagError.new(local, _ns(ns, prefix), parent) + end + end + end + + if Module.method(:const_defined?).arity == -1 + def known_class?(target_class, class_name) + class_name and + (target_class.const_defined?(class_name, false) or + target_class.constants.include?(class_name.to_sym)) + end + else + def known_class?(target_class, class_name) + class_name and + (target_class.const_defined?(class_name) or + target_class.constants.include?(class_name)) + end + end + + NAMESPLIT = /^(?:([\w:][-\w\d.]*):)?([\w:][-\w\d.]*)/ + def split_name(name) + name =~ NAMESPLIT + [$1 || '', $2] + end + + def check_ns(tag_name, prefix, ns, require_uri) + unless _ns(ns, prefix) == require_uri + if @do_validate + raise NSError.new(tag_name, prefix, require_uri) + else + # Force bind required URI with prefix + @ns_stack.last[prefix] = require_uri + end + end + end + + def start_get_text_element(tag_name, prefix, ns, required_uri) + pr = Proc.new do |text, tags| + setter = self.class.setter(required_uri, tag_name) + if @last_element.respond_to?(setter) + if @do_validate + getter = self.class.getter(required_uri, tag_name) + if @last_element.__send__(getter) + raise TooMuchTagError.new(tag_name, @last_element.tag_name) + end + end + @last_element.__send__(setter, text.to_s) + else + if @do_validate and !@ignore_unknown_element + raise NotExpectedTagError.new(tag_name, _ns(ns, prefix), + @last_element.tag_name) + end + end + end + @proc_stack.push(pr) + end + + def start_have_something_element(tag_name, prefix, attrs, ns, klass) + check_ns(tag_name, prefix, ns, klass.required_uri) + attributes = collect_attributes(tag_name, prefix, attrs, ns, klass) + @proc_stack.push(setup_next_element(tag_name, klass, attributes)) + end + + def collect_attributes(tag_name, prefix, attrs, ns, klass) + attributes = {} + klass.get_attributes.each do |a_name, a_uri, required, element_name| + if a_uri.is_a?(String) or !a_uri.respond_to?(:include?) + a_uri = [a_uri] + end + unless a_uri == [""] + for prefix, uri in ns + if a_uri.include?(uri) + val = attrs["#{prefix}:#{a_name}"] + break if val + end + end + end + if val.nil? and a_uri.include?("") + val = attrs[a_name] + end + + if @do_validate and required and val.nil? + unless a_uri.include?("") + for prefix, uri in ns + if a_uri.include?(uri) + a_name = "#{prefix}:#{a_name}" + end + end + end + raise MissingAttributeError.new(tag_name, a_name) + end + + attributes[a_name] = val + end + attributes + end + + def setup_next_element(tag_name, klass, attributes) + previous = @last_element + next_element = klass.new(@do_validate, attributes) + previous.set_next_element(tag_name, next_element) + @last_element = next_element + @last_element.parent = previous if klass.need_parent? + @xml_child_mode = @last_element.have_xml_content? + + Proc.new do |text, tags| + p(@last_element.class) if DEBUG + if @xml_child_mode + @last_element.content = @xml_element.to_s + xml_setter = @last_element.class.xml_setter + @last_element.__send__(xml_setter, @xml_element) + @xml_element = nil + @xml_child_mode = false + else + if klass.have_content? + if @last_element.need_base64_encode? + text = text.lstrip.unpack("m").first + end + @last_element.content = text + end + end + if @do_validate + @last_element.validate_for_stream(tags, @ignore_unknown_element) + end + @last_element = previous + end + end + end + + unless const_defined? :AVAILABLE_PARSER_LIBRARIES + AVAILABLE_PARSER_LIBRARIES = [ + ["rss/xmlparser", :XMLParserParser], + ["rss/xmlscanner", :XMLScanParser], + ["rss/rexmlparser", :REXMLParser], + ] + end + + AVAILABLE_PARSERS = [] + + AVAILABLE_PARSER_LIBRARIES.each do |lib, parser| + begin + require lib + AVAILABLE_PARSERS.push(const_get(parser)) + rescue LoadError + end + end + + if AVAILABLE_PARSERS.empty? + raise XMLParserNotFound + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/rexmlparser.rb b/lib/ruby-1.9.1-rc1/lib/rss/rexmlparser.rb new file mode 100644 index 0000000..4dabf59 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/rexmlparser.rb @@ -0,0 +1,54 @@ +require "rexml/document" +require "rexml/streamlistener" + +/\A(\d+)\.(\d+)(?:\.\d+)+\z/ =~ REXML::Version +if ([$1.to_i, $2.to_i] <=> [2, 5]) < 0 + raise LoadError, "needs REXML 2.5 or later (#{REXML::Version})" +end + +module RSS + + class REXMLParser < BaseParser + + class << self + def listener + REXMLListener + end + end + + private + def _parse + begin + REXML::Document.parse_stream(@rss, @listener) + rescue RuntimeError => e + raise NotWellFormedError.new{e.message} + rescue REXML::ParseException => e + context = e.context + line = context[0] if context + raise NotWellFormedError.new(line){e.message} + end + end + + end + + class REXMLListener < BaseListener + + include REXML::StreamListener + include ListenerMixin + + class << self + def raise_for_undefined_entity? + false + end + end + + def xmldecl(version, encoding, standalone) + super(version, encoding, standalone == "yes") + # Encoding is converted to UTF-8 when REXML parse XML. + @encoding = 'UTF-8' + end + + alias_method(:cdata, :text) + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/rss.rb b/lib/ruby-1.9.1-rc1/lib/rss/rss.rb new file mode 100644 index 0000000..4b943ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/rss.rb @@ -0,0 +1,1313 @@ +require "time" + +class Time + class << self + unless respond_to?(:w3cdtf) + def w3cdtf(date) + if /\A\s* + (-?\d+)-(\d\d)-(\d\d) + (?:T + (\d\d):(\d\d)(?::(\d\d))? + (\.\d+)? + (Z|[+-]\d\d:\d\d)?)? + \s*\z/ix =~ date and (($5 and $8) or (!$5 and !$8)) + datetime = [$1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i] + usec = 0 + usec = $7.to_f * 1000000 if $7 + zone = $8 + if zone + off = zone_offset(zone, datetime[0]) + datetime = apply_offset(*(datetime + [off])) + datetime << usec + time = Time.utc(*datetime) + time.localtime unless zone_utc?(zone) + time + else + datetime << usec + Time.local(*datetime) + end + else + raise ArgumentError.new("invalid date: #{date.inspect}") + end + end + end + end + + unless method_defined?(:w3cdtf) + def w3cdtf + if usec.zero? + fraction_digits = 0 + else + fraction_digits = Math.log10(usec.to_s.sub(/0*$/, '').to_i).floor + 1 + end + xmlschema(fraction_digits) + end + end +end + + +require "English" +require "rss/utils" +require "rss/converter" +require "rss/xml-stylesheet" + +module RSS + + VERSION = "0.2.5" + + URI = "http://purl.org/rss/1.0/" + + DEBUG = false + + class Error < StandardError; end + + class OverlappedPrefixError < Error + attr_reader :prefix + def initialize(prefix) + @prefix = prefix + end + end + + class InvalidRSSError < Error; end + + class MissingTagError < InvalidRSSError + attr_reader :tag, :parent + def initialize(tag, parent) + @tag, @parent = tag, parent + super("tag <#{tag}> is missing in tag <#{parent}>") + end + end + + class TooMuchTagError < InvalidRSSError + attr_reader :tag, :parent + def initialize(tag, parent) + @tag, @parent = tag, parent + super("tag <#{tag}> is too much in tag <#{parent}>") + end + end + + class MissingAttributeError < InvalidRSSError + attr_reader :tag, :attribute + def initialize(tag, attribute) + @tag, @attribute = tag, attribute + super("attribute <#{attribute}> is missing in tag <#{tag}>") + end + end + + class UnknownTagError < InvalidRSSError + attr_reader :tag, :uri + def initialize(tag, uri) + @tag, @uri = tag, uri + super("tag <#{tag}> is unknown in namespace specified by uri <#{uri}>") + end + end + + class NotExpectedTagError < InvalidRSSError + attr_reader :tag, :uri, :parent + def initialize(tag, uri, parent) + @tag, @uri, @parent = tag, uri, parent + super("tag <{#{uri}}#{tag}> is not expected in tag <#{parent}>") + end + end + # For backward compatibility :X + NotExceptedTagError = NotExpectedTagError + + class NotAvailableValueError < InvalidRSSError + attr_reader :tag, :value, :attribute + def initialize(tag, value, attribute=nil) + @tag, @value, @attribute = tag, value, attribute + message = "value <#{value}> of " + message << "attribute <#{attribute}> of " if attribute + message << "tag <#{tag}> is not available." + super(message) + end + end + + class UnknownConversionMethodError < Error + attr_reader :to, :from + def initialize(to, from) + @to = to + @from = from + super("can't convert to #{to} from #{from}.") + end + end + # for backward compatibility + UnknownConvertMethod = UnknownConversionMethodError + + class ConversionError < Error + attr_reader :string, :to, :from + def initialize(string, to, from) + @string = string + @to = to + @from = from + super("can't convert #{@string} to #{to} from #{from}.") + end + end + + class NotSetError < Error + attr_reader :name, :variables + def initialize(name, variables) + @name = name + @variables = variables + super("required variables of #{@name} are not set: #{@variables.join(', ')}") + end + end + + class UnsupportedMakerVersionError < Error + attr_reader :version + def initialize(version) + @version = version + super("Maker doesn't support version: #{@version}") + end + end + + module BaseModel + include Utils + + def install_have_child_element(tag_name, uri, occurs, name=nil, type=nil) + name ||= tag_name + add_need_initialize_variable(name) + install_model(tag_name, uri, occurs, name) + + writer_type, reader_type = type + def_corresponded_attr_writer name, writer_type + def_corresponded_attr_reader name, reader_type + install_element(name) do |n, elem_name| + <<-EOC + if @#{n} + "\#{@#{n}.to_s(need_convert, indent)}" + else + '' + end +EOC + end + end + alias_method(:install_have_attribute_element, :install_have_child_element) + + def install_have_children_element(tag_name, uri, occurs, name=nil, plural_name=nil) + name ||= tag_name + plural_name ||= "#{name}s" + add_have_children_element(name, plural_name) + add_plural_form(name, plural_name) + install_model(tag_name, uri, occurs, plural_name, true) + + def_children_accessor(name, plural_name) + install_element(name, "s") do |n, elem_name| + <<-EOC + rv = [] + @#{n}.each do |x| + value = "\#{x.to_s(need_convert, indent)}" + rv << value if /\\A\\s*\\z/ !~ value + end + rv.join("\n") +EOC + end + end + + def install_text_element(tag_name, uri, occurs, name=nil, type=nil, + disp_name=nil) + name ||= tag_name + disp_name ||= name + self::ELEMENTS << name unless self::ELEMENTS.include?(name) + add_need_initialize_variable(name) + install_model(tag_name, uri, occurs, name) + + def_corresponded_attr_writer(name, type, disp_name) + def_corresponded_attr_reader(name, type || :convert) + install_element(name) do |n, elem_name| + <<-EOC + if respond_to?(:#{n}_content) + content = #{n}_content + else + content = @#{n} + end + if content + rv = "\#{indent}<#{elem_name}>" + value = html_escape(content) + if need_convert + rv << convert(value) + else + rv << value + end + rv << "" + rv + else + '' + end +EOC + end + end + + def install_date_element(tag_name, uri, occurs, name=nil, type=nil, disp_name=nil) + name ||= tag_name + type ||= :w3cdtf + disp_name ||= name + self::ELEMENTS << name + add_need_initialize_variable(name) + install_model(tag_name, uri, occurs, name) + + # accessor + convert_attr_reader name + date_writer(name, type, disp_name) + + install_element(name) do |n, elem_name| + <<-EOC + if @#{n} + rv = "\#{indent}<#{elem_name}>" + value = html_escape(@#{n}.#{type}) + if need_convert + rv << convert(value) + else + rv << value + end + rv << "" + rv + else + '' + end +EOC + end + + end + + private + def install_element(name, postfix="") + elem_name = name.sub('_', ':') + method_name = "#{name}_element#{postfix}" + add_to_element_method(method_name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{method_name}(need_convert=true, indent='') + #{yield(name, elem_name)} + end + private :#{method_name} +EOC + end + + def inherit_convert_attr_reader(*attrs) + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{attr}_without_inherit + convert(@#{attr}) + end + + def #{attr} + if @#{attr} + #{attr}_without_inherit + elsif @parent + @parent.#{attr} + else + nil + end + end +EOC + end + end + + def uri_convert_attr_reader(*attrs) + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{attr}_without_base + convert(@#{attr}) + end + + def #{attr} + value = #{attr}_without_base + return nil if value.nil? + if /\\A[a-z][a-z0-9+.\\-]*:/i =~ value + value + else + "\#{base}\#{value}" + end + end +EOC + end + end + + def convert_attr_reader(*attrs) + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{attr} + convert(@#{attr}) + end +EOC + end + end + + def yes_clean_other_attr_reader(*attrs) + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + attr_reader(:#{attr}) + def #{attr}? + YesCleanOther.parse(@#{attr}) + end + EOC + end + end + + def yes_other_attr_reader(*attrs) + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + attr_reader(:#{attr}) + def #{attr}? + Utils::YesOther.parse(@#{attr}) + end + EOC + end + end + + def csv_attr_reader(*attrs) + separator = nil + if attrs.last.is_a?(Hash) + options = attrs.pop + separator = options[:separator] + end + separator ||= ", " + attrs.each do |attr| + attr = attr.id2name if attr.kind_of?(Integer) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + attr_reader(:#{attr}) + def #{attr}_content + if @#{attr}.nil? + @#{attr} + else + @#{attr}.join(#{separator.dump}) + end + end + EOC + end + end + + def date_writer(name, type, disp_name=name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if new_value.nil? + @#{name} = new_value + elsif new_value.kind_of?(Time) + @#{name} = new_value.dup + else + if @do_validate + begin + @#{name} = Time.__send__('#{type}', new_value) + rescue ArgumentError + raise NotAvailableValueError.new('#{disp_name}', new_value) + end + else + @#{name} = nil + if /\\A\\s*\\z/ !~ new_value.to_s + begin + unless Date._parse(new_value, false).empty? + @#{name} = Time.parse(new_value) + end + rescue ArgumentError + end + end + end + end + + # Is it need? + if @#{name} + class << @#{name} + undef_method(:to_s) + alias_method(:to_s, :#{type}) + end + end + + end +EOC + end + + def integer_writer(name, disp_name=name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if new_value.nil? + @#{name} = new_value + else + if @do_validate + begin + @#{name} = Integer(new_value) + rescue ArgumentError + raise NotAvailableValueError.new('#{disp_name}', new_value) + end + else + @#{name} = new_value.to_i + end + end + end +EOC + end + + def positive_integer_writer(name, disp_name=name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if new_value.nil? + @#{name} = new_value + else + if @do_validate + begin + tmp = Integer(new_value) + raise ArgumentError if tmp <= 0 + @#{name} = tmp + rescue ArgumentError + raise NotAvailableValueError.new('#{disp_name}', new_value) + end + else + @#{name} = new_value.to_i + end + end + end +EOC + end + + def boolean_writer(name, disp_name=name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if new_value.nil? + @#{name} = new_value + else + if @do_validate and + ![true, false, "true", "false"].include?(new_value) + raise NotAvailableValueError.new('#{disp_name}', new_value) + end + if [true, false].include?(new_value) + @#{name} = new_value + else + @#{name} = new_value == "true" + end + end + end +EOC + end + + def text_type_writer(name, disp_name=name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if @do_validate and + !["text", "html", "xhtml", nil].include?(new_value) + raise NotAvailableValueError.new('#{disp_name}', new_value) + end + @#{name} = new_value + end +EOC + end + + def content_writer(name, disp_name=name) + klass_name = "self.class::#{Utils.to_class_name(name)}" + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{name}=(new_value) + if new_value.is_a?(#{klass_name}) + @#{name} = new_value + else + @#{name} = #{klass_name}.new + @#{name}.content = new_value + end + end +EOC + end + + def yes_clean_other_writer(name, disp_name=name) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name}=(value) + value = (value ? "yes" : "no") if [true, false].include?(value) + @#{name} = value + end + EOC + end + + def yes_other_writer(name, disp_name=name) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name}=(new_value) + if [true, false].include?(new_value) + new_value = new_value ? "yes" : "no" + end + @#{name} = new_value + end + EOC + end + + def csv_writer(name, disp_name=name) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name}=(new_value) + @#{name} = Utils::CSV.parse(new_value) + end + EOC + end + + def csv_integer_writer(name, disp_name=name) + module_eval(<<-EOC, __FILE__, __LINE__ + 1) + def #{name}=(new_value) + @#{name} = Utils::CSV.parse(new_value) {|v| Integer(v)} + end + EOC + end + + def def_children_accessor(accessor_name, plural_name) + module_eval(<<-EOC, *get_file_and_line_from_caller(2)) + def #{plural_name} + @#{accessor_name} + end + + def #{accessor_name}(*args) + if args.empty? + @#{accessor_name}.first + else + @#{accessor_name}[*args] + end + end + + def #{accessor_name}=(*args) + receiver = self.class.name + warn("Warning:\#{caller.first.sub(/:in `.*'\z/, '')}: " \ + "Don't use `\#{receiver}\##{accessor_name} = XXX'/" \ + "`\#{receiver}\#set_#{accessor_name}(XXX)'. " \ + "Those APIs are not sense of Ruby. " \ + "Use `\#{receiver}\##{plural_name} << XXX' instead of them.") + if args.size == 1 + @#{accessor_name}.push(args[0]) + else + @#{accessor_name}.__send__("[]=", *args) + end + end + alias_method(:set_#{accessor_name}, :#{accessor_name}=) +EOC + end + end + + module SetupMaker + def setup_maker(maker) + target = maker_target(maker) + unless target.nil? + setup_maker_attributes(target) + setup_maker_element(target) + setup_maker_elements(target) + end + end + + private + def maker_target(maker) + nil + end + + def setup_maker_attributes(target) + end + + def setup_maker_element(target) + self.class.need_initialize_variables.each do |var| + value = __send__(var) + next if value.nil? + if value.respond_to?("setup_maker") and + !not_need_to_call_setup_maker_variables.include?(var) + value.setup_maker(target) + else + setter = "#{var}=" + if target.respond_to?(setter) + target.__send__(setter, value) + end + end + end + end + + def not_need_to_call_setup_maker_variables + [] + end + + def setup_maker_elements(parent) + self.class.have_children_elements.each do |name, plural_name| + if parent.respond_to?(plural_name) + target = parent.__send__(plural_name) + __send__(plural_name).each do |elem| + elem.setup_maker(target) + end + end + end + end + end + + class Element + extend BaseModel + include Utils + extend Utils::InheritedReader + include SetupMaker + + INDENT = " " + + MUST_CALL_VALIDATORS = {} + MODELS = [] + GET_ATTRIBUTES = [] + HAVE_CHILDREN_ELEMENTS = [] + TO_ELEMENT_METHODS = [] + NEED_INITIALIZE_VARIABLES = [] + PLURAL_FORMS = {} + + class << self + def must_call_validators + inherited_hash_reader("MUST_CALL_VALIDATORS") + end + def models + inherited_array_reader("MODELS") + end + def get_attributes + inherited_array_reader("GET_ATTRIBUTES") + end + def have_children_elements + inherited_array_reader("HAVE_CHILDREN_ELEMENTS") + end + def to_element_methods + inherited_array_reader("TO_ELEMENT_METHODS") + end + def need_initialize_variables + inherited_array_reader("NEED_INITIALIZE_VARIABLES") + end + def plural_forms + inherited_hash_reader("PLURAL_FORMS") + end + + def inherited_base + ::RSS::Element + end + + def inherited(klass) + klass.const_set("MUST_CALL_VALIDATORS", {}) + klass.const_set("MODELS", []) + klass.const_set("GET_ATTRIBUTES", []) + klass.const_set("HAVE_CHILDREN_ELEMENTS", []) + klass.const_set("TO_ELEMENT_METHODS", []) + klass.const_set("NEED_INITIALIZE_VARIABLES", []) + klass.const_set("PLURAL_FORMS", {}) + + tag_name = klass.name.split(/::/).last + tag_name[0, 1] = tag_name[0, 1].downcase + klass.instance_variable_set("@tag_name", tag_name) + klass.instance_variable_set("@have_content", false) + end + + def install_must_call_validator(prefix, uri) + self::MUST_CALL_VALIDATORS[uri] = prefix + end + + def install_model(tag, uri, occurs=nil, getter=nil, plural=false) + getter ||= tag + if m = self::MODELS.find {|t, u, o, g, p| t == tag and u == uri} + m[2] = occurs + else + self::MODELS << [tag, uri, occurs, getter, plural] + end + end + + def install_get_attribute(name, uri, required=true, + type=nil, disp_name=nil, + element_name=nil) + disp_name ||= name + element_name ||= name + writer_type, reader_type = type + def_corresponded_attr_writer name, writer_type, disp_name + def_corresponded_attr_reader name, reader_type + if type == :boolean and /^is/ =~ name + alias_method "#{$POSTMATCH}?", name + end + self::GET_ATTRIBUTES << [name, uri, required, element_name] + add_need_initialize_variable(disp_name) + end + + def def_corresponded_attr_writer(name, type=nil, disp_name=nil) + disp_name ||= name + case type + when :integer + integer_writer name, disp_name + when :positive_integer + positive_integer_writer name, disp_name + when :boolean + boolean_writer name, disp_name + when :w3cdtf, :rfc822, :rfc2822 + date_writer name, type, disp_name + when :text_type + text_type_writer name, disp_name + when :content + content_writer name, disp_name + when :yes_clean_other + yes_clean_other_writer name, disp_name + when :yes_other + yes_other_writer name, disp_name + when :csv + csv_writer name + when :csv_integer + csv_integer_writer name + else + attr_writer name + end + end + + def def_corresponded_attr_reader(name, type=nil) + case type + when :inherit + inherit_convert_attr_reader name + when :uri + uri_convert_attr_reader name + when :yes_clean_other + yes_clean_other_attr_reader name + when :yes_other + yes_other_attr_reader name + when :csv + csv_attr_reader name + when :csv_integer + csv_attr_reader name, :separator => "," + else + convert_attr_reader name + end + end + + def content_setup(type=nil, disp_name=nil) + writer_type, reader_type = type + def_corresponded_attr_writer :content, writer_type, disp_name + def_corresponded_attr_reader :content, reader_type + @have_content = true + end + + def have_content? + @have_content + end + + def add_have_children_element(variable_name, plural_name) + self::HAVE_CHILDREN_ELEMENTS << [variable_name, plural_name] + end + + def add_to_element_method(method_name) + self::TO_ELEMENT_METHODS << method_name + end + + def add_need_initialize_variable(variable_name) + self::NEED_INITIALIZE_VARIABLES << variable_name + end + + def add_plural_form(singular, plural) + self::PLURAL_FORMS[singular] = plural + end + + def required_prefix + nil + end + + def required_uri + "" + end + + def need_parent? + false + end + + def install_ns(prefix, uri) + if self::NSPOOL.has_key?(prefix) + raise OverlappedPrefixError.new(prefix) + end + self::NSPOOL[prefix] = uri + end + + def tag_name + @tag_name + end + end + + attr_accessor :parent, :do_validate + + def initialize(do_validate=true, attrs=nil) + @parent = nil + @converter = nil + if attrs.nil? and (do_validate.is_a?(Hash) or do_validate.is_a?(Array)) + do_validate, attrs = true, do_validate + end + @do_validate = do_validate + initialize_variables(attrs || {}) + end + + def tag_name + self.class.tag_name + end + + def full_name + tag_name + end + + def converter=(converter) + @converter = converter + targets = children.dup + self.class.have_children_elements.each do |variable_name, plural_name| + targets.concat(__send__(plural_name)) + end + targets.each do |target| + target.converter = converter unless target.nil? + end + end + + def convert(value) + if @converter + @converter.convert(value) + else + value + end + end + + def valid?(ignore_unknown_element=true) + validate(ignore_unknown_element) + true + rescue RSS::Error + false + end + + def validate(ignore_unknown_element=true) + do_validate = @do_validate + @do_validate = true + validate_attribute + __validate(ignore_unknown_element) + ensure + @do_validate = do_validate + end + + def validate_for_stream(tags, ignore_unknown_element=true) + validate_attribute + __validate(ignore_unknown_element, tags, false) + end + + def to_s(need_convert=true, indent='') + if self.class.have_content? + return "" if !empty_content? and !content_is_set? + rv = tag(indent) do |next_indent| + if empty_content? + "" + else + xmled_content + end + end + else + rv = tag(indent) do |next_indent| + self.class.to_element_methods.collect do |method_name| + __send__(method_name, false, next_indent) + end + end + end + rv = convert(rv) if need_convert + rv + end + + def have_xml_content? + false + end + + def need_base64_encode? + false + end + + def set_next_element(tag_name, next_element) + klass = next_element.class + prefix = "" + prefix << "#{klass.required_prefix}_" if klass.required_prefix + key = "#{prefix}#{tag_name.gsub(/-/, '_')}" + if self.class.plural_forms.has_key?(key) + ary = __send__("#{self.class.plural_forms[key]}") + ary << next_element + else + __send__("#{key}=", next_element) + end + end + + protected + def have_required_elements? + self.class::MODELS.all? do |tag, uri, occurs, getter| + if occurs.nil? or occurs == "+" + child = __send__(getter) + if child.is_a?(Array) + children = child + children.any? {|c| c.have_required_elements?} + else + !child.to_s.empty? + end + else + true + end + end + end + + private + def initialize_variables(attrs) + normalized_attrs = {} + attrs.each do |key, value| + normalized_attrs[key.to_s] = value + end + self.class.need_initialize_variables.each do |variable_name| + value = normalized_attrs[variable_name.to_s] + if value + __send__("#{variable_name}=", value) + else + instance_variable_set("@#{variable_name}", nil) + end + end + initialize_have_children_elements + @content = normalized_attrs["content"] if self.class.have_content? + end + + def initialize_have_children_elements + self.class.have_children_elements.each do |variable_name, plural_name| + instance_variable_set("@#{variable_name}", []) + end + end + + def tag(indent, additional_attrs={}, &block) + next_indent = indent + INDENT + + attrs = collect_attrs + return "" if attrs.nil? + + return "" unless have_required_elements? + + attrs.update(additional_attrs) + start_tag = make_start_tag(indent, next_indent, attrs.dup) + + if block + content = block.call(next_indent) + else + content = [] + end + + if content.is_a?(String) + content = [content] + start_tag << ">" + end_tag = "" + else + content = content.reject{|x| x.empty?} + if content.empty? + return "" if attrs.empty? + end_tag = "/>" + else + start_tag << ">\n" + end_tag = "\n#{indent}" + end + end + + start_tag + content.join("\n") + end_tag + end + + def make_start_tag(indent, next_indent, attrs) + start_tag = ["#{indent}<#{full_name}"] + unless attrs.empty? + start_tag << attrs.collect do |key, value| + %Q[#{h key}="#{h value}"] + end.join("\n#{next_indent}") + end + start_tag.join(" ") + end + + def collect_attrs + attrs = {} + _attrs.each do |name, required, alias_name| + value = __send__(alias_name || name) + return nil if required and value.nil? + next if value.nil? + return nil if attrs.has_key?(name) + attrs[name] = value + end + attrs + end + + def tag_name_with_prefix(prefix) + "#{prefix}:#{tag_name}" + end + + # For backward compatibility + def calc_indent + '' + end + + def children + rv = [] + self.class.models.each do |name, uri, occurs, getter| + value = __send__(getter) + next if value.nil? + value = [value] unless value.is_a?(Array) + value.each do |v| + rv << v if v.is_a?(Element) + end + end + rv + end + + def _tags + rv = [] + self.class.models.each do |name, uri, occurs, getter, plural| + value = __send__(getter) + next if value.nil? + if plural and value.is_a?(Array) + rv.concat([[uri, name]] * value.size) + else + rv << [uri, name] + end + end + rv + end + + def _attrs + self.class.get_attributes.collect do |name, uri, required, element_name| + [element_name, required, name] + end + end + + def __validate(ignore_unknown_element, tags=_tags, recursive=true) + if recursive + children.compact.each do |child| + child.validate + end + end + must_call_validators = self.class.must_call_validators + tags = tag_filter(tags.dup) + p tags if DEBUG + must_call_validators.each do |uri, prefix| + _validate(ignore_unknown_element, tags[uri], uri) + meth = "#{prefix}_validate" + if !prefix.empty? and respond_to?(meth, true) + __send__(meth, ignore_unknown_element, tags[uri], uri) + end + end + end + + def validate_attribute + _attrs.each do |a_name, required, alias_name| + value = instance_variable_get("@#{alias_name || a_name}") + if required and value.nil? + raise MissingAttributeError.new(tag_name, a_name) + end + __send__("#{alias_name || a_name}=", value) + end + end + + def _validate(ignore_unknown_element, tags, uri, models=self.class.models) + count = 1 + do_redo = false + not_shift = false + tag = nil + models = models.find_all {|model| model[1] == uri} + element_names = models.collect {|model| model[0]} + if tags + tags_size = tags.size + tags = tags.sort_by {|x| element_names.index(x) || tags_size} + end + + _tags = tags.dup if tags + models.each_with_index do |model, i| + name, model_uri, occurs, getter = model + + if DEBUG + p "before" + p tags + p model + end + + if not_shift + not_shift = false + elsif tags + tag = tags.shift + end + + if DEBUG + p "mid" + p count + end + + case occurs + when '?' + if count > 2 + raise TooMuchTagError.new(name, tag_name) + else + if name == tag + do_redo = true + else + not_shift = true + end + end + when '*' + if name == tag + do_redo = true + else + not_shift = true + end + when '+' + if name == tag + do_redo = true + else + if count > 1 + not_shift = true + else + raise MissingTagError.new(name, tag_name) + end + end + else + if name == tag + if models[i+1] and models[i+1][0] != name and + tags and tags.first == name + raise TooMuchTagError.new(name, tag_name) + end + else + raise MissingTagError.new(name, tag_name) + end + end + + if DEBUG + p "after" + p not_shift + p do_redo + p tag + end + + if do_redo + do_redo = false + count += 1 + redo + else + count = 1 + end + + end + + if !ignore_unknown_element and !tags.nil? and !tags.empty? + raise NotExpectedTagError.new(tags.first, uri, tag_name) + end + + end + + def tag_filter(tags) + rv = {} + tags.each do |tag| + rv[tag[0]] = [] unless rv.has_key?(tag[0]) + rv[tag[0]].push(tag[1]) + end + rv + end + + def empty_content? + false + end + + def content_is_set? + if have_xml_content? + __send__(self.class.xml_getter) + else + content + end + end + + def xmled_content + if have_xml_content? + __send__(self.class.xml_getter).to_s + else + _content = content + _content = [_content].pack("m").delete("\n") if need_base64_encode? + h(_content) + end + end + end + + module RootElementMixin + + include XMLStyleSheetMixin + + attr_reader :output_encoding + attr_reader :feed_type, :feed_subtype, :feed_version + attr_accessor :version, :encoding, :standalone + def initialize(feed_version, version=nil, encoding=nil, standalone=nil) + super() + @feed_type = nil + @feed_subtype = nil + @feed_version = feed_version + @version = version || '1.0' + @encoding = encoding + @standalone = standalone + @output_encoding = nil + end + + def feed_info + [@feed_type, @feed_version, @feed_subtype] + end + + def output_encoding=(enc) + @output_encoding = enc + self.converter = Converter.new(@output_encoding, @encoding) + end + + def setup_maker(maker) + maker.version = version + maker.encoding = encoding + maker.standalone = standalone + + xml_stylesheets.each do |xss| + xss.setup_maker(maker) + end + + super + end + + def to_feed(type, &block) + Maker.make(type) do |maker| + setup_maker(maker) + block.call(maker) if block + end + end + + def to_rss(type, &block) + to_feed("rss#{type}", &block) + end + + def to_atom(type, &block) + to_feed("atom:#{type}", &block) + end + + def to_xml(type=nil, &block) + if type.nil? or same_feed_type?(type) + to_s + else + to_feed(type, &block).to_s + end + end + + private + def same_feed_type?(type) + if /^(atom|rss)?(\d+\.\d+)?(?::(.+))?$/i =~ type + feed_type = ($1 || @feed_type).downcase + feed_version = $2 || @feed_version + feed_subtype = $3 || @feed_subtype + [feed_type, feed_version, feed_subtype] == feed_info + else + false + end + end + + def tag(indent, attrs={}, &block) + rv = super(indent, ns_declarations.merge(attrs), &block) + return rv if rv.empty? + "#{xmldecl}#{xml_stylesheet_pi}#{rv}" + end + + def xmldecl + rv = %Q[\n" + rv + end + + def ns_declarations + decls = {} + self.class::NSPOOL.collect do |prefix, uri| + prefix = ":#{prefix}" unless prefix.empty? + decls["xmlns#{prefix}"] = uri + end + decls + end + + def maker_target(target) + target + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/slash.rb b/lib/ruby-1.9.1-rc1/lib/rss/slash.rb new file mode 100644 index 0000000..f102413 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/slash.rb @@ -0,0 +1,49 @@ +require 'rss/1.0' + +module RSS + SLASH_PREFIX = 'slash' + SLASH_URI = "http://purl.org/rss/1.0/modules/slash/" + + RDF.install_ns(SLASH_PREFIX, SLASH_URI) + + module SlashModel + extend BaseModel + + ELEMENT_INFOS = \ + [ + ["section"], + ["department"], + ["comments", :positive_integer], + ["hit_parade", :csv_integer], + ] + + class << self + def append_features(klass) + super + + return if klass.instance_of?(Module) + klass.install_must_call_validator(SLASH_PREFIX, SLASH_URI) + ELEMENT_INFOS.each do |name, type, *additional_infos| + full_name = "#{SLASH_PREFIX}_#{name}" + klass.install_text_element(full_name, SLASH_URI, "?", + full_name, type, name) + end + + klass.module_eval do + alias_method(:slash_hit_parades, :slash_hit_parade) + undef_method(:slash_hit_parade) + alias_method(:slash_hit_parade, :slash_hit_parade_content) + end + end + end + end + + class RDF + class Item; include SlashModel; end + end + + SlashModel::ELEMENT_INFOS.each do |name, type| + accessor_base = "#{SLASH_PREFIX}_#{name}" + BaseListener.install_get_text_element(SLASH_URI, name, accessor_base) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/syndication.rb b/lib/ruby-1.9.1-rc1/lib/rss/syndication.rb new file mode 100644 index 0000000..3eb1542 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/syndication.rb @@ -0,0 +1,67 @@ +require "rss/1.0" + +module RSS + + SY_PREFIX = 'sy' + SY_URI = "http://purl.org/rss/1.0/modules/syndication/" + + RDF.install_ns(SY_PREFIX, SY_URI) + + module SyndicationModel + + extend BaseModel + + ELEMENTS = [] + + def self.append_features(klass) + super + + klass.install_must_call_validator(SY_PREFIX, SY_URI) + klass.module_eval do + [ + ["updatePeriod"], + ["updateFrequency", :positive_integer] + ].each do |name, type| + install_text_element(name, SY_URI, "?", + "#{SY_PREFIX}_#{name}", type, + "#{SY_PREFIX}:#{name}") + end + + %w(updateBase).each do |name| + install_date_element(name, SY_URI, "?", + "#{SY_PREFIX}_#{name}", 'w3cdtf', + "#{SY_PREFIX}:#{name}") + end + end + + klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) + alias_method(:_sy_updatePeriod=, :sy_updatePeriod=) + def sy_updatePeriod=(new_value) + new_value = new_value.strip + validate_sy_updatePeriod(new_value) if @do_validate + self._sy_updatePeriod = new_value + end + EOC + end + + private + SY_UPDATEPERIOD_AVAILABLE_VALUES = %w(hourly daily weekly monthly yearly) + def validate_sy_updatePeriod(value) + unless SY_UPDATEPERIOD_AVAILABLE_VALUES.include?(value) + raise NotAvailableValueError.new("updatePeriod", value) + end + end + end + + class RDF + class Channel; include SyndicationModel; end + end + + prefix_size = SY_PREFIX.size + 1 + SyndicationModel::ELEMENTS.uniq! + SyndicationModel::ELEMENTS.each do |full_name| + name = full_name[prefix_size..-1] + BaseListener.install_get_text_element(SY_URI, name, full_name) + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/taxonomy.rb b/lib/ruby-1.9.1-rc1/lib/rss/taxonomy.rb new file mode 100644 index 0000000..276f63b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/taxonomy.rb @@ -0,0 +1,145 @@ +require "rss/1.0" +require "rss/dublincore" + +module RSS + + TAXO_PREFIX = "taxo" + TAXO_URI = "http://purl.org/rss/1.0/modules/taxonomy/" + + RDF.install_ns(TAXO_PREFIX, TAXO_URI) + + TAXO_ELEMENTS = [] + + %w(link).each do |name| + full_name = "#{TAXO_PREFIX}_#{name}" + BaseListener.install_get_text_element(TAXO_URI, name, full_name) + TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}" + end + + %w(topic topics).each do |name| + class_name = Utils.to_class_name(name) + BaseListener.install_class_name(TAXO_URI, name, "Taxonomy#{class_name}") + TAXO_ELEMENTS << "#{TAXO_PREFIX}_#{name}" + end + + module TaxonomyTopicsModel + extend BaseModel + + def self.append_features(klass) + super + + klass.install_must_call_validator(TAXO_PREFIX, TAXO_URI) + %w(topics).each do |name| + klass.install_have_child_element(name, TAXO_URI, "?", + "#{TAXO_PREFIX}_#{name}") + end + end + + class TaxonomyTopics < Element + include RSS10 + + Bag = ::RSS::RDF::Bag + + class << self + def required_prefix + TAXO_PREFIX + end + + def required_uri + TAXO_URI + end + end + + @tag_name = "topics" + + install_have_child_element("Bag", RDF::URI, nil) + install_must_call_validator('rdf', RDF::URI) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.Bag = args[0] + end + self.Bag ||= Bag.new + end + + def full_name + tag_name_with_prefix(TAXO_PREFIX) + end + + def maker_target(target) + target.taxo_topics + end + + def resources + if @Bag + @Bag.lis.collect do |li| + li.resource + end + else + [] + end + end + end + end + + module TaxonomyTopicModel + extend BaseModel + + def self.append_features(klass) + super + var_name = "#{TAXO_PREFIX}_topic" + klass.install_have_children_element("topic", TAXO_URI, "*", var_name) + end + + class TaxonomyTopic < Element + include RSS10 + + include DublinCoreModel + include TaxonomyTopicsModel + + class << self + def required_prefix + TAXO_PREFIX + end + + def required_uri + TAXO_URI + end + end + + @tag_name = "topic" + + install_get_attribute("about", ::RSS::RDF::URI, true, nil, nil, + "#{RDF::PREFIX}:about") + install_text_element("link", TAXO_URI, "?", "#{TAXO_PREFIX}_link") + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.about = args[0] + end + end + + def full_name + tag_name_with_prefix(TAXO_PREFIX) + end + + def maker_target(target) + target.new_taxo_topic + end + end + end + + class RDF + include TaxonomyTopicModel + class Channel + include TaxonomyTopicsModel + end + class Item; include TaxonomyTopicsModel; end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/trackback.rb b/lib/ruby-1.9.1-rc1/lib/rss/trackback.rb new file mode 100644 index 0000000..ee2491f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/trackback.rb @@ -0,0 +1,288 @@ +require 'rss/1.0' +require 'rss/2.0' + +module RSS + + TRACKBACK_PREFIX = 'trackback' + TRACKBACK_URI = 'http://madskills.com/public/xml/rss/module/trackback/' + + RDF.install_ns(TRACKBACK_PREFIX, TRACKBACK_URI) + Rss.install_ns(TRACKBACK_PREFIX, TRACKBACK_URI) + + module TrackBackUtils + private + def trackback_validate(ignore_unknown_element, tags, uri) + return if tags.nil? + if tags.find {|tag| tag == "about"} and + !tags.find {|tag| tag == "ping"} + raise MissingTagError.new("#{TRACKBACK_PREFIX}:ping", tag_name) + end + end + end + + module BaseTrackBackModel + + ELEMENTS = %w(ping about) + + def append_features(klass) + super + + unless klass.class == Module + klass.module_eval {include TrackBackUtils} + + klass.install_must_call_validator(TRACKBACK_PREFIX, TRACKBACK_URI) + %w(ping).each do |name| + var_name = "#{TRACKBACK_PREFIX}_#{name}" + klass_name = "TrackBack#{Utils.to_class_name(name)}" + klass.install_have_child_element(name, TRACKBACK_URI, "?", var_name) + klass.module_eval(<<-EOC, __FILE__, __LINE__) + remove_method :#{var_name} + def #{var_name} + @#{var_name} and @#{var_name}.value + end + + remove_method :#{var_name}= + def #{var_name}=(value) + @#{var_name} = Utils.new_with_value_if_need(#{klass_name}, value) + end + EOC + end + + [%w(about s)].each do |name, postfix| + var_name = "#{TRACKBACK_PREFIX}_#{name}" + klass_name = "TrackBack#{Utils.to_class_name(name)}" + klass.install_have_children_element(name, TRACKBACK_URI, "*", + var_name) + klass.module_eval(<<-EOC, __FILE__, __LINE__) + remove_method :#{var_name} + def #{var_name}(*args) + if args.empty? + @#{var_name}.first and @#{var_name}.first.value + else + ret = @#{var_name}.__send__("[]", *args) + if ret.is_a?(Array) + ret.collect {|x| x.value} + else + ret.value + end + end + end + + remove_method :#{var_name}= + remove_method :set_#{var_name} + def #{var_name}=(*args) + if args.size == 1 + item = Utils.new_with_value_if_need(#{klass_name}, args[0]) + @#{var_name}.push(item) + else + new_val = args.last + if new_val.is_a?(Array) + new_val = new_value.collect do |val| + Utils.new_with_value_if_need(#{klass_name}, val) + end + else + new_val = Utils.new_with_value_if_need(#{klass_name}, new_val) + end + @#{var_name}.__send__("[]=", *(args[0..-2] + [new_val])) + end + end + alias set_#{var_name} #{var_name}= + EOC + end + end + end + end + + module TrackBackModel10 + extend BaseModel + extend BaseTrackBackModel + + class TrackBackPing < Element + include RSS10 + + class << self + + def required_prefix + TRACKBACK_PREFIX + end + + def required_uri + TRACKBACK_URI + end + + end + + @tag_name = "ping" + + [ + ["resource", ::RSS::RDF::URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{::RSS::RDF::PREFIX}:#{name}") + end + + alias_method(:value, :resource) + alias_method(:value=, :resource=) + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.resource = args[0] + end + end + + def full_name + tag_name_with_prefix(TRACKBACK_PREFIX) + end + end + + class TrackBackAbout < Element + include RSS10 + + class << self + + def required_prefix + TRACKBACK_PREFIX + end + + def required_uri + TRACKBACK_URI + end + + end + + @tag_name = "about" + + [ + ["resource", ::RSS::RDF::URI, true] + ].each do |name, uri, required| + install_get_attribute(name, uri, required, nil, nil, + "#{::RSS::RDF::PREFIX}:#{name}") + end + + alias_method(:value, :resource) + alias_method(:value=, :resource=) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.resource = args[0] + end + end + + def full_name + tag_name_with_prefix(TRACKBACK_PREFIX) + end + + private + def maker_target(abouts) + abouts.new_about + end + + def setup_maker_attributes(about) + about.resource = self.resource + end + + end + end + + module TrackBackModel20 + extend BaseModel + extend BaseTrackBackModel + + class TrackBackPing < Element + include RSS09 + + @tag_name = "ping" + + content_setup + + class << self + + def required_prefix + TRACKBACK_PREFIX + end + + def required_uri + TRACKBACK_URI + end + + end + + alias_method(:value, :content) + alias_method(:value=, :content=) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.content = args[0] + end + end + + def full_name + tag_name_with_prefix(TRACKBACK_PREFIX) + end + + end + + class TrackBackAbout < Element + include RSS09 + + @tag_name = "about" + + content_setup + + class << self + + def required_prefix + TRACKBACK_PREFIX + end + + def required_uri + TRACKBACK_URI + end + + end + + alias_method(:value, :content) + alias_method(:value=, :content=) + + def initialize(*args) + if Utils.element_initialize_arguments?(args) + super + else + super() + self.content = args[0] + end + end + + def full_name + tag_name_with_prefix(TRACKBACK_PREFIX) + end + + end + end + + class RDF + class Item; include TrackBackModel10; end + end + + class Rss + class Channel + class Item; include TrackBackModel20; end + end + end + + BaseTrackBackModel::ELEMENTS.each do |name| + class_name = Utils.to_class_name(name) + BaseListener.install_class_name(TRACKBACK_URI, name, + "TrackBack#{class_name}") + end + + BaseTrackBackModel::ELEMENTS.collect! {|name| "#{TRACKBACK_PREFIX}_#{name}"} +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/utils.rb b/lib/ruby-1.9.1-rc1/lib/rss/utils.rb new file mode 100644 index 0000000..0e4001e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/utils.rb @@ -0,0 +1,111 @@ +module RSS + module Utils + module_function + + # Convert a name_with_underscores to CamelCase. + def to_class_name(name) + name.split(/[_\-]/).collect do |part| + "#{part[0, 1].upcase}#{part[1..-1]}" + end.join("") + end + + def get_file_and_line_from_caller(i=0) + file, line, = caller[i].split(':') + line = line.to_i + line += 1 if i.zero? + [file, line] + end + + # escape '&', '"', '<' and '>' for use in HTML. + def html_escape(s) + s.to_s.gsub(/&/, "&").gsub(/\"/, """).gsub(/>/, ">").gsub(/ "text/xsl", + "css" => "text/css", + } + + attr_accessor(*ATTRIBUTES) + attr_accessor(:do_validate) + def initialize(*attrs) + if attrs.size == 1 and + (attrs.first.is_a?(Hash) or attrs.first.is_a?(Array)) + attrs = attrs.first + end + @do_validate = true + ATTRIBUTES.each do |attr| + __send__("#{attr}=", nil) + end + vars = ATTRIBUTES.dup + vars.unshift(:do_validate) + attrs.each do |name, value| + if vars.include?(name.to_s) + __send__("#{name}=", value) + end + end + end + + def to_s + rv = "" + if @href + rv << %Q[] + end + rv + end + + remove_method(:href=) + def href=(value) + @href = value + if @href and @type.nil? + @type = guess_type(@href) + end + @href + end + + remove_method(:alternate=) + def alternate=(value) + if value.nil? or /\A(?:yes|no)\z/ =~ value + @alternate = value + else + if @do_validate + args = ["?xml-stylesheet?", %Q[alternate="#{value}"]] + raise NotAvailableValueError.new(*args) + end + end + @alternate + end + + def setup_maker(maker) + xss = maker.xml_stylesheets.new_xml_stylesheet + ATTRIBUTES.each do |attr| + xss.__send__("#{attr}=", __send__(attr)) + end + end + + private + def guess_type(filename) + /\.([^.]+)$/ =~ filename + GUESS_TABLE[$1] + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/xml.rb b/lib/ruby-1.9.1-rc1/lib/rss/xml.rb new file mode 100644 index 0000000..1ae878b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/xml.rb @@ -0,0 +1,71 @@ +require "rss/utils" + +module RSS + module XML + class Element + include Enumerable + + attr_reader :name, :prefix, :uri, :attributes, :children + def initialize(name, prefix=nil, uri=nil, attributes={}, children=[]) + @name = name + @prefix = prefix + @uri = uri + @attributes = attributes + if children.is_a?(String) or !children.respond_to?(:each) + @children = [children] + else + @children = children + end + end + + def [](name) + @attributes[name] + end + + def []=(name, value) + @attributes[name] = value + end + + def <<(child) + @children << child + end + + def each(&block) + @children.each(&block) + end + + def ==(other) + other.kind_of?(self.class) and + @name == other.name and + @uri == other.uri and + @attributes == other.attributes and + @children == other.children + end + + def to_s + rv = "<#{full_name}" + attributes.each do |key, value| + rv << " #{Utils.html_escape(key)}=\"#{Utils.html_escape(value)}\"" + end + if children.empty? + rv << "/>" + else + rv << ">" + children.each do |child| + rv << child.to_s + end + rv << "" + end + rv + end + + def full_name + if @prefix + "#{@prefix}:#{@name}" + else + @name + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/xmlparser.rb b/lib/ruby-1.9.1-rc1/lib/rss/xmlparser.rb new file mode 100644 index 0000000..3dfe7d4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/xmlparser.rb @@ -0,0 +1,93 @@ +begin + require "xml/parser" +rescue LoadError + require "xmlparser" +end + +begin + require "xml/encoding-ja" +rescue LoadError + require "xmlencoding-ja" + if defined?(Kconv) + module XMLEncoding_ja + class SJISHandler + include Kconv + end + end + end +end + +module XML + class Parser + unless defined?(Error) + Error = ::XMLParserError + end + end +end + +module RSS + + class REXMLLikeXMLParser < ::XML::Parser + + include ::XML::Encoding_ja + + def listener=(listener) + @listener = listener + end + + def startElement(name, attrs) + @listener.tag_start(name, attrs) + end + + def endElement(name) + @listener.tag_end(name) + end + + def character(data) + @listener.text(data) + end + + def xmlDecl(version, encoding, standalone) + @listener.xmldecl(version, encoding, standalone == 1) + end + + def processingInstruction(target, content) + @listener.instruction(target, content) + end + + end + + class XMLParserParser < BaseParser + + class << self + def listener + XMLParserListener + end + end + + private + def _parse + begin + parser = REXMLLikeXMLParser.new + parser.listener = @listener + parser.parse(@rss) + rescue ::XML::Parser::Error => e + raise NotWellFormedError.new(parser.line){e.message} + end + end + + end + + class XMLParserListener < BaseListener + + include ListenerMixin + + def xmldecl(version, encoding, standalone) + super + # Encoding is converted to UTF-8 when XMLParser parses XML. + @encoding = 'UTF-8' + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rss/xmlscanner.rb b/lib/ruby-1.9.1-rc1/lib/rss/xmlscanner.rb new file mode 100644 index 0000000..61b9fa6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rss/xmlscanner.rb @@ -0,0 +1,121 @@ +require 'xmlscan/scanner' +require 'stringio' + +module RSS + + class XMLScanParser < BaseParser + + class << self + def listener + XMLScanListener + end + end + + private + def _parse + begin + if @rss.is_a?(String) + input = StringIO.new(@rss) + else + input = @rss + end + scanner = XMLScan::XMLScanner.new(@listener) + scanner.parse(input) + rescue XMLScan::Error => e + lineno = e.lineno || scanner.lineno || input.lineno + raise NotWellFormedError.new(lineno){e.message} + end + end + + end + + class XMLScanListener < BaseListener + + include XMLScan::Visitor + include ListenerMixin + + ENTITIES = { + 'lt' => '<', + 'gt' => '>', + 'amp' => '&', + 'quot' => '"', + 'apos' => '\'' + } + + def on_xmldecl_version(str) + @version = str + end + + def on_xmldecl_encoding(str) + @encoding = str + end + + def on_xmldecl_standalone(str) + @standalone = str + end + + def on_xmldecl_end + xmldecl(@version, @encoding, @standalone == "yes") + end + + alias_method(:on_pi, :instruction) + alias_method(:on_chardata, :text) + alias_method(:on_cdata, :text) + + def on_etag(name) + tag_end(name) + end + + def on_entityref(ref) + text(entity(ref)) + end + + def on_charref(code) + text([code].pack('U')) + end + + alias_method(:on_charref_hex, :on_charref) + + def on_stag(name) + @attrs = {} + end + + def on_attribute(name) + @attrs[name] = @current_attr = '' + end + + def on_attr_value(str) + @current_attr << str + end + + def on_attr_entityref(ref) + @current_attr << entity(ref) + end + + def on_attr_charref(code) + @current_attr << [code].pack('U') + end + + alias_method(:on_attr_charref_hex, :on_attr_charref) + + def on_stag_end(name) + tag_start(name, @attrs) + end + + def on_stag_end_empty(name) + tag_start(name, @attrs) + tag_end(name) + end + + private + def entity(ref) + ent = ENTITIES[ref] + if ent + ent + else + wellformed_error("undefined entity: #{ref}") + end + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems.rb b/lib/ruby-1.9.1-rc1/lib/rubygems.rb new file mode 100644 index 0000000..9913b59 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems.rb @@ -0,0 +1,889 @@ +# -*- ruby -*- +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/rubygems_version' +require 'rubygems/defaults' +require 'thread' + +module Gem + class LoadError < ::LoadError + attr_accessor :name, :version_requirement + end +end + +module Kernel + + ## + # Use Kernel#gem to activate a specific version of +gem_name+. + # + # +version_requirements+ is a list of version requirements that the + # specified gem must match, most commonly "= example.version.number". See + # Gem::Requirement for how to specify a version requirement. + # + # If you will be activating the latest version of a gem, there is no need to + # call Kernel#gem, Kernel#require will do the right thing for you. + # + # Kernel#gem returns true if the gem was activated, otherwise false. If the + # gem could not be found, didn't match the version requirements, or a + # different version was already activated, an exception will be raised. + # + # Kernel#gem should be called *before* any require statements (otherwise + # RubyGems may load a conflicting library version). + # + # In older RubyGems versions, the environment variable GEM_SKIP could be + # used to skip activation of specified gems, for example to test out changes + # that haven't been installed yet. Now RubyGems defers to -I and the + # RUBYLIB environment variable to skip activation of a gem. + # + # Example: + # + # GEM_SKIP=libA:libB ruby -I../libA -I../libB ./mycode.rb + + def gem(gem_name, *version_requirements) # :doc: + skip_list = (ENV['GEM_SKIP'] || "").split(/:/) + raise Gem::LoadError, "skipping #{gem_name}" if skip_list.include? gem_name + Gem.activate(gem_name, *version_requirements) + end + + private :gem + +end + +## +# Main module to hold all RubyGem classes/modules. + +module Gem + + ConfigMap = {} unless defined?(ConfigMap) + require 'rbconfig' + RbConfig = Config unless defined? ::RbConfig + + ConfigMap.merge!( + :BASERUBY => RbConfig::CONFIG["BASERUBY"], + :EXEEXT => RbConfig::CONFIG["EXEEXT"], + :RUBY_INSTALL_NAME => RbConfig::CONFIG["RUBY_INSTALL_NAME"], + :RUBY_SO_NAME => RbConfig::CONFIG["RUBY_SO_NAME"], + :arch => RbConfig::CONFIG["arch"], + :bindir => RbConfig::CONFIG["bindir"], + :datadir => RbConfig::CONFIG["datadir"], + :libdir => RbConfig::CONFIG["libdir"], + :ruby_install_name => RbConfig::CONFIG["ruby_install_name"], + :ruby_version => RbConfig::CONFIG["ruby_version"], + :sitedir => RbConfig::CONFIG["sitedir"], + :sitelibdir => RbConfig::CONFIG["sitelibdir"], + :vendordir => RbConfig::CONFIG["vendordir"] , + :vendorlibdir => RbConfig::CONFIG["vendorlibdir"] + ) + + DIRECTORIES = %w[cache doc gems specifications] unless defined?(DIRECTORIES) + + MUTEX = Mutex.new + + RubyGemsPackageVersion = RubyGemsVersion + + ## + # An Array of Regexps that match windows ruby platforms. + + WIN_PATTERNS = [ + /bccwin/i, + /cygwin/i, + /djgpp/i, + /mingw/i, + /mswin/i, + /wince/i, + ] + + @@source_index = nil + @@win_platform = nil + + @configuration = nil + @loaded_specs = {} + @platforms = [] + @ruby = nil + @sources = [] + + @post_install_hooks ||= [] + @post_uninstall_hooks ||= [] + @pre_uninstall_hooks ||= [] + @pre_install_hooks ||= [] + + ## + # Activates an installed gem matching +gem+. The gem must satisfy + # +version_requirements+. + # + # Returns true if the gem is activated, false if it is already + # loaded, or an exception otherwise. + # + # Gem#activate adds the library paths in +gem+ to $LOAD_PATH. Before a Gem + # is activated its required Gems are activated. If the version information + # is omitted, the highest version Gem of the supplied name is loaded. If a + # Gem is not found that meets the version requirements or a required Gem is + # not found, a Gem::LoadError is raised. + # + # More information on version requirements can be found in the + # Gem::Requirement and Gem::Version documentation. + + def self.activate(gem, *version_requirements) + if version_requirements.empty? then + version_requirements = Gem::Requirement.default + end + + unless gem.respond_to?(:name) and + gem.respond_to?(:version_requirements) then + gem = Gem::Dependency.new(gem, version_requirements) + end + + matches = Gem.source_index.find_name(gem.name, gem.version_requirements) + report_activate_error(gem) if matches.empty? + + if @loaded_specs[gem.name] then + # This gem is already loaded. If the currently loaded gem is not in the + # list of candidate gems, then we have a version conflict. + existing_spec = @loaded_specs[gem.name] + + unless matches.any? { |spec| spec.version == existing_spec.version } then + raise Gem::Exception, + "can't activate #{gem}, already activated #{existing_spec.full_name}" + end + + return false + end + + # new load + spec = matches.last + return false if spec.loaded? + + spec.loaded = true + @loaded_specs[spec.name] = spec + + # Load dependent gems first + spec.runtime_dependencies.each do |dep_gem| + activate dep_gem + end + + # bin directory must come before library directories + spec.require_paths.unshift spec.bindir if spec.bindir + + require_paths = spec.require_paths.map do |path| + File.join spec.full_gem_path, path + end + + sitelibdir = ConfigMap[:sitelibdir] + + # gem directories must come after -I and ENV['RUBYLIB'] + insert_index = load_path_insert_index + + if insert_index then + # gem directories must come after -I and ENV['RUBYLIB'] + $LOAD_PATH.insert(insert_index, *require_paths) + else + # we are probably testing in core, -I and RUBYLIB don't apply + $LOAD_PATH.unshift(*require_paths) + end + + return true + end + + ## + # An Array of all possible load paths for all versions of all gems in the + # Gem installation. + + def self.all_load_paths + result = [] + + Gem.path.each do |gemdir| + each_load_path all_partials(gemdir) do |load_path| + result << load_path + end + end + + result + end + + ## + # Return all the partial paths in +gemdir+. + + def self.all_partials(gemdir) + Dir[File.join(gemdir, 'gems/*')] + end + + private_class_method :all_partials + + ## + # See if a given gem is available. + + def self.available?(gem, *requirements) + requirements = Gem::Requirement.default if requirements.empty? + + unless gem.respond_to?(:name) and + gem.respond_to?(:version_requirements) then + gem = Gem::Dependency.new gem, requirements + end + + !Gem.source_index.search(gem).empty? + end + + ## + # The mode needed to read a file as straight binary. + + def self.binary_mode + @binary_mode ||= RUBY_VERSION > '1.9' ? 'rb:ascii-8bit' : 'rb' + end + + ## + # The path where gem executables are to be installed. + + def self.bindir(install_dir=Gem.dir) + return File.join(install_dir, 'bin') unless + install_dir.to_s == Gem.default_dir + Gem.default_bindir + end + + ## + # Reset the +dir+ and +path+ values. The next time +dir+ or +path+ + # is requested, the values will be calculated from scratch. This is + # mainly used by the unit tests to provide test isolation. + + def self.clear_paths + @gem_home = nil + @gem_path = nil + @user_home = nil + + @@source_index = nil + + MUTEX.synchronize do + @searcher = nil + end + end + + ## + # The path to standard location of the user's .gemrc file. + + def self.config_file + File.join Gem.user_home, '.gemrc' + end + + ## + # The standard configuration object for gems. + + def self.configuration + @configuration ||= Gem::ConfigFile.new [] + end + + ## + # Use the given configuration object (which implements the ConfigFile + # protocol) as the standard configuration object. + + def self.configuration=(config) + @configuration = config + end + + ## + # The path the the data directory specified by the gem name. If the + # package is not available as a gem, return nil. + + def self.datadir(gem_name) + spec = @loaded_specs[gem_name] + return nil if spec.nil? + File.join(spec.full_gem_path, 'data', gem_name) + end + + ## + # A Zlib::Deflate.deflate wrapper + + def self.deflate(data) + require 'zlib' + Zlib::Deflate.deflate data + end + + ## + # The path where gems are to be installed. + + def self.dir + @gem_home ||= nil + set_home(ENV['GEM_HOME'] || Gem.configuration.home || default_dir) unless @gem_home + @gem_home + end + + ## + # Expand each partial gem path with each of the required paths specified + # in the Gem spec. Each expanded path is yielded. + + def self.each_load_path(partials) + partials.each do |gp| + base = File.basename(gp) + specfn = File.join(dir, "specifications", base + ".gemspec") + if File.exist?(specfn) + spec = eval(File.read(specfn)) + spec.require_paths.each do |rp| + yield(File.join(gp, rp)) + end + else + filename = File.join(gp, 'lib') + yield(filename) if File.exist?(filename) + end + end + end + + private_class_method :each_load_path + + ## + # Quietly ensure the named Gem directory contains all the proper + # subdirectories. If we can't create a directory due to a permission + # problem, then we will silently continue. + + def self.ensure_gem_subdirectories(gemdir) + require 'fileutils' + + Gem::DIRECTORIES.each do |filename| + fn = File.join gemdir, filename + FileUtils.mkdir_p fn rescue nil unless File.exist? fn + end + end + + ## + # Returns a list of paths matching +file+ that can be used by a gem to pick + # up features from other gems. For example: + # + # Gem.find_files('rdoc/discover').each do |path| load path end + # + # find_files does not search $LOAD_PATH for files, only gems. + + def self.find_files(path) + specs = searcher.find_all path + + specs.map do |spec| + searcher.matching_files spec, path + end.flatten + end + + ## + # Finds the user's home directory. + #-- + # Some comments from the ruby-talk list regarding finding the home + # directory: + # + # I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems + # to be depending on HOME in those code samples. I propose that + # it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at + # least on Win32). + + def self.find_home + ['HOME', 'USERPROFILE'].each do |homekey| + return ENV[homekey] if ENV[homekey] + end + + if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then + return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" + end + + begin + File.expand_path("~") + rescue + if File::ALT_SEPARATOR then + "C:/" + else + "/" + end + end + end + + private_class_method :find_home + + ## + # Zlib::GzipReader wrapper that unzips +data+. + + def self.gunzip(data) + require 'stringio' + require 'zlib' + data = StringIO.new data + + Zlib::GzipReader.new(data).read + end + + ## + # Zlib::GzipWriter wrapper that zips +data+. + + def self.gzip(data) + require 'stringio' + require 'zlib' + zipped = StringIO.new + + Zlib::GzipWriter.wrap zipped do |io| io.write data end + + zipped.string + end + + ## + # A Zlib::Inflate#inflate wrapper + + def self.inflate(data) + require 'zlib' + Zlib::Inflate.inflate data + end + + ## + # Return a list of all possible load paths for the latest version for all + # gems in the Gem installation. + + def self.latest_load_paths + result = [] + + Gem.path.each do |gemdir| + each_load_path(latest_partials(gemdir)) do |load_path| + result << load_path + end + end + + result + end + + ## + # Return only the latest partial paths in the given +gemdir+. + + def self.latest_partials(gemdir) + latest = {} + all_partials(gemdir).each do |gp| + base = File.basename(gp) + if base =~ /(.*)-((\d+\.)*\d+)/ then + name, version = $1, $2 + ver = Gem::Version.new(version) + if latest[name].nil? || ver > latest[name][0] + latest[name] = [ver, gp] + end + end + end + latest.collect { |k,v| v[1] } + end + + private_class_method :latest_partials + + ## + # The index to insert activated gem paths into the $LOAD_PATH. + # + # Defaults to the site lib directory unless gem_prelude.rb has loaded paths, + # then it inserts the activated gem's paths before the gem_prelude.rb paths + # so you can override the gem_prelude.rb default $LOAD_PATH paths. + + def self.load_path_insert_index + index = $LOAD_PATH.index ConfigMap[:sitelibdir] + + $LOAD_PATH.each_with_index do |path, i| + if path.instance_variables.include?(:@gem_prelude_index) or + path.instance_variables.include?('@gem_prelude_index') then + index = i + break + end + end + + index + end + + ## + # The file name and line number of the caller of the caller of this method. + + def self.location_of_caller + caller[1] =~ /(.*?):(\d+)$/i + file = $1 + lineno = $2.to_i + + [file, lineno] + end + + ## + # manage_gems is useless and deprecated. Don't call it anymore. + + def self.manage_gems # :nodoc: + file, lineno = location_of_caller + + warn "#{file}:#{lineno}:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009." + end + + ## + # The version of the Marshal format for your Ruby. + + def self.marshal_version + "#{Marshal::MAJOR_VERSION}.#{Marshal::MINOR_VERSION}" + end + + ## + # Array of paths to search for Gems. + + def self.path + @gem_path ||= nil + + unless @gem_path then + paths = [ENV['GEM_PATH'] || Gem.configuration.path || default_path] + + if defined?(APPLE_GEM_HOME) and not ENV['GEM_PATH'] then + paths << APPLE_GEM_HOME + end + + set_paths paths.compact.join(File::PATH_SEPARATOR) + end + + @gem_path + end + + ## + # Set array of platforms this RubyGems supports (primarily for testing). + + def self.platforms=(platforms) + @platforms = platforms + end + + ## + # Array of platforms this RubyGems supports. + + def self.platforms + @platforms ||= [] + if @platforms.empty? + @platforms = [Gem::Platform::RUBY, Gem::Platform.local] + end + @platforms + end + + ## + # Adds a post-install hook that will be passed an Gem::Installer instance + # when Gem::Installer#install is called + + def self.post_install(&hook) + @post_install_hooks << hook + end + + ## + # Adds a post-uninstall hook that will be passed a Gem::Uninstaller instance + # and the spec that was uninstalled when Gem::Uninstaller#uninstall is + # called + + def self.post_uninstall(&hook) + @post_uninstall_hooks << hook + end + + ## + # Adds a pre-install hook that will be passed an Gem::Installer instance + # when Gem::Installer#install is called + + def self.pre_install(&hook) + @pre_install_hooks << hook + end + + ## + # Adds a pre-uninstall hook that will be passed an Gem::Uninstaller instance + # and the spec that will be uninstalled when Gem::Uninstaller#uninstall is + # called + + def self.pre_uninstall(&hook) + @pre_uninstall_hooks << hook + end + + ## + # The directory prefix this RubyGems was installed at. + + def self.prefix + prefix = File.dirname File.expand_path(__FILE__) + + if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or + File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or + 'lib' != File.basename(prefix) then + nil + else + File.dirname prefix + end + end + + ## + # Refresh source_index from disk and clear searcher. + + def self.refresh + source_index.refresh! + + MUTEX.synchronize do + @searcher = nil + end + end + + ## + # Safely read a file in binary mode on all platforms. + + def self.read_binary(path) + File.open path, binary_mode do |f| f.read end + end + + ## + # Report a load error during activation. The message of load error + # depends on whether it was a version mismatch or if there are not gems of + # any version by the requested name. + + def self.report_activate_error(gem) + matches = Gem.source_index.find_name(gem.name) + + if matches.empty? then + error = Gem::LoadError.new( + "Could not find RubyGem #{gem.name} (#{gem.version_requirements})\n") + else + error = Gem::LoadError.new( + "RubyGem version error: " + + "#{gem.name}(#{matches.first.version} not #{gem.version_requirements})\n") + end + + error.name = gem.name + error.version_requirement = gem.version_requirements + raise error + end + + private_class_method :report_activate_error + + def self.required_location(gemname, libfile, *version_constraints) + version_constraints = Gem::Requirement.default if version_constraints.empty? + matches = Gem.source_index.find_name(gemname, version_constraints) + return nil if matches.empty? + spec = matches.last + spec.require_paths.each do |path| + result = File.join(spec.full_gem_path, path, libfile) + return result if File.exist?(result) + end + nil + end + + ## + # The path to the running Ruby interpreter. + + def self.ruby + if @ruby.nil? then + @ruby = File.join(ConfigMap[:bindir], + ConfigMap[:ruby_install_name]) + @ruby << ConfigMap[:EXEEXT] + + # escape string in case path to ruby executable contain spaces. + @ruby.sub!(/.*\s.*/m, '"\&"') + end + + @ruby + end + + ## + # A Gem::Version for the currently running ruby. + + def self.ruby_version + return @ruby_version if defined? @ruby_version + version = RUBY_VERSION.dup + version << ".#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL + @ruby_version = Gem::Version.new version + end + + ## + # The GemPathSearcher object used to search for matching installed gems. + + def self.searcher + MUTEX.synchronize do + @searcher ||= Gem::GemPathSearcher.new + end + end + + ## + # Set the Gem home directory (as reported by Gem.dir). + + def self.set_home(home) + home = home.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR + @gem_home = home + ensure_gem_subdirectories(@gem_home) + end + + private_class_method :set_home + + ## + # Set the Gem search path (as reported by Gem.path). + + def self.set_paths(gpaths) + if gpaths + @gem_path = gpaths.split(File::PATH_SEPARATOR) + + if File::ALT_SEPARATOR then + @gem_path.map! do |path| + path.gsub File::ALT_SEPARATOR, File::SEPARATOR + end + end + + @gem_path << Gem.dir + else + # TODO: should this be Gem.default_path instead? + @gem_path = [Gem.dir] + end + + @gem_path.uniq! + @gem_path.each do |path| + if 0 == File.expand_path(path).index(Gem.user_home) + next unless File.directory? Gem.user_home + unless win_platform? then + # only create by matching user + next if Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid + end + end + ensure_gem_subdirectories path + end + end + + private_class_method :set_paths + + ## + # Returns the Gem::SourceIndex of specifications that are in the Gem.path + + def self.source_index + @@source_index ||= SourceIndex.from_installed_gems + end + + ## + # Returns an Array of sources to fetch remote gems from. If the sources + # list is empty, attempts to load the "sources" gem, then uses + # default_sources if it is not installed. + + def self.sources + if @sources.empty? then + begin + gem 'sources', '> 0.0.1' + require 'sources' + rescue LoadError + @sources = default_sources + end + end + + @sources + end + + ## + # Need to be able to set the sources without calling + # Gem.sources.replace since that would cause an infinite loop. + + def self.sources=(new_sources) + @sources = new_sources + end + + ## + # Glob pattern for require-able path suffixes. + + def self.suffix_pattern + @suffix_pattern ||= "{#{suffixes.join(',')}}" + end + + ## + # Suffixes for require-able paths. + + def self.suffixes + ['', '.rb', '.rbw', '.so', '.bundle', '.dll', '.sl', '.jar'] + end + + ## + # Use the +home+ and +paths+ values for Gem.dir and Gem.path. Used mainly + # by the unit tests to provide environment isolation. + + def self.use_paths(home, paths=[]) + clear_paths + set_home(home) if home + set_paths(paths.join(File::PATH_SEPARATOR)) if paths + end + + ## + # The home directory for the user. + + def self.user_home + @user_home ||= find_home + end + + ## + # Is this a windows platform? + + def self.win_platform? + if @@win_platform.nil? then + @@win_platform = !!WIN_PATTERNS.find { |r| RUBY_PLATFORM =~ r } + end + + @@win_platform + end + + class << self + + attr_reader :loaded_specs + + ## + # The list of hooks to be run before Gem::Install#install does any work + + attr_reader :post_install_hooks + + ## + # The list of hooks to be run before Gem::Uninstall#uninstall does any + # work + + attr_reader :post_uninstall_hooks + + ## + # The list of hooks to be run after Gem::Install#install is finished + + attr_reader :pre_install_hooks + + ## + # The list of hooks to be run after Gem::Uninstall#uninstall is finished + + attr_reader :pre_uninstall_hooks + + # :stopdoc: + + alias cache source_index # an alias for the old name + + # :startdoc: + + end + + MARSHAL_SPEC_DIR = "quick/Marshal.#{Gem.marshal_version}/" + + YAML_SPEC_DIR = 'quick/' + +end + +module Config + # :stopdoc: + class << self + # Return the path to the data directory associated with the named + # package. If the package is loaded as a gem, return the gem + # specific data directory. Otherwise return a path to the share + # area as define by "#{ConfigMap[:datadir]}/#{package_name}". + def datadir(package_name) + Gem.datadir(package_name) || + File.join(Gem::ConfigMap[:datadir], package_name) + end + end + # :startdoc: +end + +require 'rubygems/exceptions' +require 'rubygems/version' +require 'rubygems/requirement' +require 'rubygems/dependency' +require 'rubygems/gem_path_searcher' # Needed for Kernel#gem +require 'rubygems/source_index' # Needed for Kernel#gem +require 'rubygems/platform' +require 'rubygems/builder' # HACK: Needed for rake's package task. + +begin + require 'rubygems/defaults/operating_system' +rescue LoadError +end + +if defined?(RUBY_ENGINE) then + begin + require "rubygems/defaults/#{RUBY_ENGINE}" + rescue LoadError + end +end + +require 'rubygems/config_file' + +if RUBY_VERSION < '1.9' then + require 'rubygems/custom_require' +end + +Gem.clear_paths diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/builder.rb new file mode 100644 index 0000000..6fd8528 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/builder.rb @@ -0,0 +1,88 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +module Gem + + ## + # The Builder class processes RubyGem specification files + # to produce a .gem file. + # + class Builder + + include UserInteraction + ## + # Constructs a builder instance for the provided specification + # + # spec:: [Gem::Specification] The specification instance + # + def initialize(spec) + require "yaml" + require "rubygems/package" + require "rubygems/security" + + @spec = spec + end + + ## + # Builds the gem from the specification. Returns the name of the file + # written. + # + def build + @spec.mark_version + @spec.validate + @signer = sign + write_package + say success + @spec.file_name + end + + def success + <<-EOM + Successfully built RubyGem + Name: #{@spec.name} + Version: #{@spec.version} + File: #{@spec.full_name+'.gem'} +EOM + end + + private + + def sign + # if the signing key was specified, then load the file, and swap + # to the public key (TODO: we should probably just omit the + # signing key in favor of the signing certificate, but that's for + # the future, also the signature algorithm should be configurable) + signer = nil + if @spec.respond_to?(:signing_key) && @spec.signing_key + signer = Gem::Security::Signer.new(@spec.signing_key, @spec.cert_chain) + @spec.signing_key = nil + @spec.cert_chain = signer.cert_chain.map { |cert| cert.to_s } + end + signer + end + + def write_package + open @spec.file_name, 'wb' do |gem_io| + Gem::Package.open gem_io, 'w', @signer do |pkg| + pkg.metadata = @spec.to_yaml + + @spec.files.each do |file| + next if File.directory? file + + stat = File.stat file + mode = stat.mode & 0777 + size = stat.size + + pkg.add_file_simple file, mode, size do |tar_io| + tar_io.write open(file, "rb") { |f| f.read } + end + end + end + end + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/command.rb new file mode 100644 index 0000000..860764e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/command.rb @@ -0,0 +1,406 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'optparse' + +require 'rubygems/user_interaction' + +module Gem + + # Base class for all Gem commands. When creating a new gem command, define + # #arguments, #defaults_str, #description and #usage (as appropriate). + class Command + + include UserInteraction + + # The name of the command. + attr_reader :command + + # The options for the command. + attr_reader :options + + # The default options for the command. + attr_accessor :defaults + + # The name of the command for command-line invocation. + attr_accessor :program_name + + # A short description of the command. + attr_accessor :summary + + # Initializes a generic gem command named +command+. +summary+ is a short + # description displayed in `gem help commands`. +defaults+ are the + # default options. Defaults should be mirrored in #defaults_str, unless + # there are none. + # + # Use add_option to add command-line switches. + def initialize(command, summary=nil, defaults={}) + @command = command + @summary = summary + @program_name = "gem #{command}" + @defaults = defaults + @options = defaults.dup + @option_groups = Hash.new { |h,k| h[k] = [] } + @parser = nil + @when_invoked = nil + end + + # True if +long+ begins with the characters from +short+. + def begins?(long, short) + return false if short.nil? + long[0, short.length] == short + end + + # Override to provide command handling. + def execute + fail "Generic command has no actions" + end + + # Get all gem names from the command line. + def get_all_gem_names + args = options[:args] + + if args.nil? or args.empty? then + raise Gem::CommandLineError, + "Please specify at least one gem name (e.g. gem build GEMNAME)" + end + + gem_names = args.select { |arg| arg !~ /^-/ } + end + + # Get the single gem name from the command line. Fail if there is no gem + # name or if there is more than one gem name given. + def get_one_gem_name + args = options[:args] + + if args.nil? or args.empty? then + raise Gem::CommandLineError, + "Please specify a gem name on the command line (e.g. gem build GEMNAME)" + end + + if args.size > 1 then + raise Gem::CommandLineError, + "Too many gem names (#{args.join(', ')}); please specify only one" + end + + args.first + end + + # Get a single optional argument from the command line. If more than one + # argument is given, return only the first. Return nil if none are given. + def get_one_optional_argument + args = options[:args] || [] + args.first + end + + # Override to provide details of the arguments a command takes. + # It should return a left-justified string, one argument per line. + def arguments + "" + end + + # Override to display the default values of the command + # options. (similar to +arguments+, but displays the default + # values). + def defaults_str + "" + end + + # Override to display a longer description of what this command does. + def description + nil + end + + # Override to display the usage for an individual gem command. + def usage + program_name + end + + # Display the help message for the command. + def show_help + parser.program_name = usage + say parser + end + + # Invoke the command with the given list of arguments. + def invoke(*args) + handle_options(args) + if options[:help] + show_help + elsif @when_invoked + @when_invoked.call(options) + else + execute + end + end + + # Call the given block when invoked. + # + # Normal command invocations just executes the +execute+ method of + # the command. Specifying an invocation block allows the test + # methods to override the normal action of a command to determine + # that it has been invoked correctly. + def when_invoked(&block) + @when_invoked = block + end + + # Add a command-line option and handler to the command. + # + # See OptionParser#make_switch for an explanation of +opts+. + # + # +handler+ will be called with two values, the value of the argument and + # the options hash. + def add_option(*opts, &handler) # :yields: value, options + group_name = Symbol === opts.first ? opts.shift : :options + + @option_groups[group_name] << [opts, handler] + end + + # Remove previously defined command-line argument +name+. + def remove_option(name) + @option_groups.each do |_, option_list| + option_list.reject! { |args, _| args.any? { |x| x =~ /^#{name}/ } } + end + end + + # Merge a set of command options with the set of default options + # (without modifying the default option hash). + def merge_options(new_options) + @options = @defaults.clone + new_options.each do |k,v| @options[k] = v end + end + + # True if the command handles the given argument list. + def handles?(args) + begin + parser.parse!(args.dup) + return true + rescue + return false + end + end + + # Handle the given list of arguments by parsing them and recording + # the results. + def handle_options(args) + args = add_extra_args(args) + @options = @defaults.clone + parser.parse!(args) + @options[:args] = args + end + + def add_extra_args(args) + result = [] + s_extra = Command.specific_extra_args(@command) + extra = Command.extra_args + s_extra + while ! extra.empty? + ex = [] + ex << extra.shift + ex << extra.shift if extra.first.to_s =~ /^[^-]/ + result << ex if handles?(ex) + end + result.flatten! + result.concat(args) + result + end + + private + + # Create on demand parser. + def parser + create_option_parser if @parser.nil? + @parser + end + + def create_option_parser + @parser = OptionParser.new + + @parser.separator("") + regular_options = @option_groups.delete :options + + configure_options "", regular_options + + @option_groups.sort_by { |n,_| n.to_s }.each do |group_name, option_list| + configure_options group_name, option_list + end + + configure_options "Common", Command.common_options + + @parser.separator("") + unless arguments.empty? + @parser.separator(" Arguments:") + arguments.split(/\n/).each do |arg_desc| + @parser.separator(" #{arg_desc}") + end + @parser.separator("") + end + + @parser.separator(" Summary:") + wrap(@summary, 80 - 4).split("\n").each do |line| + @parser.separator(" #{line.strip}") + end + + if description then + formatted = description.split("\n\n").map do |chunk| + wrap(chunk, 80 - 4) + end.join("\n") + + @parser.separator "" + @parser.separator " Description:" + formatted.split("\n").each do |line| + @parser.separator " #{line.rstrip}" + end + end + + unless defaults_str.empty? + @parser.separator("") + @parser.separator(" Defaults:") + defaults_str.split(/\n/).each do |line| + @parser.separator(" #{line}") + end + end + end + + def configure_options(header, option_list) + return if option_list.nil? or option_list.empty? + + header = header.to_s.empty? ? '' : "#{header} " + @parser.separator " #{header}Options:" + + option_list.each do |args, handler| + dashes = args.select { |arg| arg =~ /^-/ } + @parser.on(*args) do |value| + handler.call(value, @options) + end + end + + @parser.separator '' + end + + # Wraps +text+ to +width+ + def wrap(text, width) + text.gsub(/(.{1,#{width}})( +|$\n?)|(.{1,#{width}})/, "\\1\\3\n") + end + + ################################################################## + # Class methods for Command. + class << self + def common_options + @common_options ||= [] + end + + def add_common_option(*args, &handler) + Gem::Command.common_options << [args, handler] + end + + def extra_args + @extra_args ||= [] + end + + def extra_args=(value) + case value + when Array + @extra_args = value + when String + @extra_args = value.split + end + end + + # Return an array of extra arguments for the command. The extra + # arguments come from the gem configuration file read at program + # startup. + def specific_extra_args(cmd) + specific_extra_args_hash[cmd] + end + + # Add a list of extra arguments for the given command. +args+ + # may be an array or a string to be split on white space. + def add_specific_extra_args(cmd,args) + args = args.split(/\s+/) if args.kind_of? String + specific_extra_args_hash[cmd] = args + end + + # Accessor for the specific extra args hash (self initializing). + def specific_extra_args_hash + @specific_extra_args_hash ||= Hash.new do |h,k| + h[k] = Array.new + end + end + end + + # ---------------------------------------------------------------- + # Add the options common to all commands. + + add_common_option('-h', '--help', + 'Get help on this command') do + |value, options| + options[:help] = true + end + + add_common_option('-V', '--[no-]verbose', + 'Set the verbose level of output') do |value, options| + # Set us to "really verbose" so the progress meter works + if Gem.configuration.verbose and value then + Gem.configuration.verbose = 1 + else + Gem.configuration.verbose = value + end + end + + add_common_option('-q', '--quiet', 'Silence commands') do |value, options| + Gem.configuration.verbose = false + end + + # Backtrace and config-file are added so they show up in the help + # commands. Both options are actually handled before the other + # options get parsed. + + add_common_option('--config-file FILE', + "Use this config file instead of default") do + end + + add_common_option('--backtrace', + 'Show stack backtrace on errors') do + end + + add_common_option('--debug', + 'Turn on Ruby debugging') do + end + + # :stopdoc: + HELP = %{ + RubyGems is a sophisticated package manager for Ruby. This is a + basic help message containing pointers to more information. + + Usage: + gem -h/--help + gem -v/--version + gem command [arguments...] [options...] + + Examples: + gem install rake + gem list --local + gem build package.gemspec + gem help install + + Further help: + gem help commands list all 'gem' commands + gem help examples show some examples of usage + gem help platforms show information about platforms + gem help show help on COMMAND + (e.g. 'gem help install') + Further information: + http://rubygems.rubyforge.org + }.gsub(/^ /, "") + + # :startdoc: + + end # class + + # This is where Commands will be placed in the namespace + module Commands; end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/command_manager.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/command_manager.rb new file mode 100644 index 0000000..dd9a1ae --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/command_manager.rb @@ -0,0 +1,146 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'timeout' +require 'rubygems/command' +require 'rubygems/user_interaction' + +module Gem + + #################################################################### + # The command manager registers and installs all the individual + # sub-commands supported by the gem command. + class CommandManager + include UserInteraction + + # Return the authoritative instance of the command manager. + def self.instance + @command_manager ||= CommandManager.new + end + + # Register all the subcommands supported by the gem command. + def initialize + @commands = {} + register_command :build + register_command :cert + register_command :check + register_command :cleanup + register_command :contents + register_command :dependency + register_command :environment + register_command :fetch + register_command :generate_index + register_command :help + register_command :install + register_command :list + register_command :lock + register_command :mirror + register_command :outdated + register_command :pristine + register_command :query + register_command :rdoc + register_command :search + register_command :server + register_command :sources + register_command :specification + register_command :stale + register_command :uninstall + register_command :unpack + register_command :update + register_command :which + end + + # Register the command object. + def register_command(command_obj) + @commands[command_obj] = false + end + + # Return the registered command from the command name. + def [](command_name) + command_name = command_name.intern + return nil if @commands[command_name].nil? + @commands[command_name] ||= load_and_instantiate(command_name) + end + + # Return a list of all command names (as strings). + def command_names + @commands.keys.collect {|key| key.to_s}.sort + end + + # Run the config specified by +args+. + def run(args) + process_args(args) + rescue StandardError, Timeout::Error => ex + alert_error "While executing gem ... (#{ex.class})\n #{ex.to_s}" + ui.errs.puts "\t#{ex.backtrace.join "\n\t"}" if + Gem.configuration.backtrace + terminate_interaction(1) + rescue Interrupt + alert_error "Interrupted" + terminate_interaction(1) + end + + def process_args(args) + args = args.to_str.split(/\s+/) if args.respond_to?(:to_str) + if args.size == 0 + say Gem::Command::HELP + terminate_interaction(1) + end + case args[0] + when '-h', '--help' + say Gem::Command::HELP + terminate_interaction(0) + when '-v', '--version' + say Gem::RubyGemsVersion + terminate_interaction(0) + when /^-/ + alert_error "Invalid option: #{args[0]}. See 'gem --help'." + terminate_interaction(1) + else + cmd_name = args.shift.downcase + cmd = find_command(cmd_name) + cmd.invoke(*args) + end + end + + def find_command(cmd_name) + possibilities = find_command_possibilities(cmd_name) + if possibilities.size > 1 + raise "Ambiguous command #{cmd_name} matches [#{possibilities.join(', ')}]" + end + if possibilities.size < 1 + raise "Unknown command #{cmd_name}" + end + + self[possibilities.first] + end + + def find_command_possibilities(cmd_name) + len = cmd_name.length + self.command_names.select { |n| cmd_name == n[0,len] } + end + + private + + def load_and_instantiate(command_name) + command_name = command_name.to_s + retried = false + + begin + const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } + Gem::Commands.const_get("#{const_name}Command").new + rescue NameError + if retried then + raise + else + retried = true + require "rubygems/commands/#{command_name}_command" + retry + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/build_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/build_command.rb new file mode 100644 index 0000000..e1f0122 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/build_command.rb @@ -0,0 +1,53 @@ +require 'rubygems/command' +require 'rubygems/builder' + +class Gem::Commands::BuildCommand < Gem::Command + + def initialize + super('build', 'Build a gem from a gemspec') + end + + def arguments # :nodoc: + "GEMSPEC_FILE gemspec file name to build a gem for" + end + + def usage # :nodoc: + "#{program_name} GEMSPEC_FILE" + end + + def execute + gemspec = get_one_gem_name + if File.exist?(gemspec) + specs = load_gemspecs(gemspec) + specs.each do |spec| + Gem::Builder.new(spec).build + end + else + alert_error "Gemspec file not found: #{gemspec}" + end + end + + def load_gemspecs(filename) + if yaml?(filename) + result = [] + open(filename) do |f| + begin + while not f.eof? and spec = Gem::Specification.from_yaml(f) + result << spec + end + rescue Gem::EndOfYAMLException => e + # OK + end + end + else + result = [Gem::Specification.load(filename)] + end + result + end + + def yaml?(filename) + line = open(filename) { |f| line = f.gets } + result = line =~ %r{!ruby/object:Gem::Specification} + result + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cert_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cert_command.rb new file mode 100644 index 0000000..f5b6988 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cert_command.rb @@ -0,0 +1,86 @@ +require 'rubygems/command' +require 'rubygems/security' + +class Gem::Commands::CertCommand < Gem::Command + + def initialize + super 'cert', 'Manage RubyGems certificates and signing settings' + + add_option('-a', '--add CERT', + 'Add a trusted certificate.') do |value, options| + cert = OpenSSL::X509::Certificate.new(File.read(value)) + Gem::Security.add_trusted_cert(cert) + say "Added '#{cert.subject.to_s}'" + end + + add_option('-l', '--list', + 'List trusted certificates.') do |value, options| + glob_str = File::join(Gem::Security::OPT[:trust_dir], '*.pem') + Dir::glob(glob_str) do |path| + begin + cert = OpenSSL::X509::Certificate.new(File.read(path)) + # this could probably be formatted more gracefully + say cert.subject.to_s + rescue OpenSSL::X509::CertificateError + next + end + end + end + + add_option('-r', '--remove STRING', + 'Remove trusted certificates containing', + 'STRING.') do |value, options| + trust_dir = Gem::Security::OPT[:trust_dir] + glob_str = File::join(trust_dir, '*.pem') + + Dir::glob(glob_str) do |path| + begin + cert = OpenSSL::X509::Certificate.new(File.read(path)) + if cert.subject.to_s.downcase.index(value) + say "Removed '#{cert.subject.to_s}'" + File.unlink(path) + end + rescue OpenSSL::X509::CertificateError + next + end + end + end + + add_option('-b', '--build EMAIL_ADDR', + 'Build private key and self-signed', + 'certificate for EMAIL_ADDR.') do |value, options| + vals = Gem::Security.build_self_signed_cert(value) + File.chmod 0600, vals[:key_path] + say "Public Cert: #{vals[:cert_path]}" + say "Private Key: #{vals[:key_path]}" + say "Don't forget to move the key file to somewhere private..." + end + + add_option('-C', '--certificate CERT', + 'Certificate for --sign command.') do |value, options| + cert = OpenSSL::X509::Certificate.new(File.read(value)) + Gem::Security::OPT[:issuer_cert] = cert + end + + add_option('-K', '--private-key KEY', + 'Private key for --sign command.') do |value, options| + key = OpenSSL::PKey::RSA.new(File.read(value)) + Gem::Security::OPT[:issuer_key] = key + end + + add_option('-s', '--sign NEWCERT', + 'Sign a certificate with my key and', + 'certificate.') do |value, options| + cert = OpenSSL::X509::Certificate.new(File.read(value)) + my_cert = Gem::Security::OPT[:issuer_cert] + my_key = Gem::Security::OPT[:issuer_key] + cert = Gem::Security.sign_cert(cert, my_key, my_cert) + File.open(value, 'wb') { |file| file.write(cert.to_pem) } + end + end + + def execute + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/check_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/check_command.rb new file mode 100644 index 0000000..17c2c8f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/check_command.rb @@ -0,0 +1,75 @@ +require 'rubygems/command' +require 'rubygems/version_option' +require 'rubygems/validator' + +class Gem::Commands::CheckCommand < Gem::Command + + include Gem::VersionOption + + def initialize + super 'check', 'Check installed gems', + :verify => false, :alien => false + + add_option( '--verify FILE', + 'Verify gem file against its internal', + 'checksum') do |value, options| + options[:verify] = value + end + + add_option('-a', '--alien', "Report 'unmanaged' or rogue files in the", + "gem repository") do |value, options| + options[:alien] = true + end + + add_option('-t', '--test', "Run unit tests for gem") do |value, options| + options[:test] = true + end + + add_version_option 'run tests for' + end + + def execute + if options[:test] + version = options[:version] || Gem::Requirement.default + dep = Gem::Dependency.new get_one_gem_name, version + gem_spec = Gem::SourceIndex.from_installed_gems.search(dep).first + Gem::Validator.new.unit_test(gem_spec) + end + + if options[:alien] + say "Performing the 'alien' operation" + Gem::Validator.new.alien.each do |key, val| + if(val.size > 0) + say "#{key} has #{val.size} problems" + val.each do |error_entry| + say "\t#{error_entry.path}:" + say "\t#{error_entry.problem}" + say + end + else + say "#{key} is error-free" + end + say + end + end + + if options[:verify] + gem_name = options[:verify] + unless gem_name + alert_error "Must specify a .gem file with --verify NAME" + return + end + unless File.exist?(gem_name) + alert_error "Unknown file: #{gem_name}." + return + end + say "Verifying gem: '#{gem_name}'" + begin + Gem::Validator.new.verify_gem_file(gem_name) + rescue Exception => e + alert_error "#{gem_name} is invalid." + end + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cleanup_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cleanup_command.rb new file mode 100644 index 0000000..40dcb9d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/cleanup_command.rb @@ -0,0 +1,91 @@ +require 'rubygems/command' +require 'rubygems/source_index' +require 'rubygems/dependency_list' + +class Gem::Commands::CleanupCommand < Gem::Command + + def initialize + super 'cleanup', + 'Clean up old versions of installed gems in the local repository', + :force => false, :test => false, :install_dir => Gem.dir + + add_option('-d', '--dryrun', "") do |value, options| + options[:dryrun] = true + end + end + + def arguments # :nodoc: + "GEMNAME name of gem to cleanup" + end + + def defaults_str # :nodoc: + "--no-dryrun" + end + + def usage # :nodoc: + "#{program_name} [GEMNAME ...]" + end + + def execute + say "Cleaning up installed gems..." + primary_gems = {} + + Gem.source_index.each do |name, spec| + if primary_gems[spec.name].nil? or + primary_gems[spec.name].version < spec.version then + primary_gems[spec.name] = spec + end + end + + gems_to_cleanup = [] + + unless options[:args].empty? then + options[:args].each do |gem_name| + specs = Gem.cache.search(/^#{gem_name}$/i) + specs.each do |spec| + gems_to_cleanup << spec + end + end + else + Gem.source_index.each do |name, spec| + gems_to_cleanup << spec + end + end + + gems_to_cleanup = gems_to_cleanup.select { |spec| + primary_gems[spec.name].version != spec.version + } + + uninstall_command = Gem::CommandManager.instance['uninstall'] + deplist = Gem::DependencyList.new + gems_to_cleanup.uniq.each do |spec| deplist.add spec end + + deps = deplist.strongly_connected_components.flatten.reverse + + deps.each do |spec| + if options[:dryrun] then + say "Dry Run Mode: Would uninstall #{spec.full_name}" + else + say "Attempting to uninstall #{spec.full_name}" + + options[:args] = [spec.name] + options[:version] = "= #{spec.version}" + options[:executables] = false + + uninstaller = Gem::Uninstaller.new spec.name, options + + begin + uninstaller.uninstall + rescue Gem::DependencyRemovalException, + Gem::GemNotInHomeException => e + say "Unable to uninstall #{spec.full_name}:" + say "\t#{e.class}: #{e.message}" + end + end + end + + say "Clean Up Complete" + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/contents_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/contents_command.rb new file mode 100644 index 0000000..bc75fb5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/contents_command.rb @@ -0,0 +1,74 @@ +require 'rubygems/command' +require 'rubygems/version_option' + +class Gem::Commands::ContentsCommand < Gem::Command + + include Gem::VersionOption + + def initialize + super 'contents', 'Display the contents of the installed gems', + :specdirs => [], :lib_only => false + + add_version_option + + add_option('-s', '--spec-dir a,b,c', Array, + "Search for gems under specific paths") do |spec_dirs, options| + options[:specdirs] = spec_dirs + end + + add_option('-l', '--[no-]lib-only', + "Only return files in the Gem's lib_dirs") do |lib_only, options| + options[:lib_only] = lib_only + end + end + + def arguments # :nodoc: + "GEMNAME name of gem to list contents for" + end + + def defaults_str # :nodoc: + "--no-lib-only" + end + + def usage # :nodoc: + "#{program_name} GEMNAME" + end + + def execute + version = options[:version] || Gem::Requirement.default + gem = get_one_gem_name + + s = options[:specdirs].map do |i| + [i, File.join(i, "specifications")] + end.flatten + + path_kind = if s.empty? then + s = Gem::SourceIndex.installed_spec_directories + "default gem paths" + else + "specified path" + end + + si = Gem::SourceIndex.from_gems_in(*s) + + gem_spec = si.find_name(gem, version).last + + unless gem_spec then + say "Unable to find gem '#{gem}' in #{path_kind}" + + if Gem.configuration.verbose then + say "\nDirectories searched:" + s.each { |dir| say dir } + end + + terminate_interaction + end + + files = options[:lib_only] ? gem_spec.lib_files : gem_spec.files + files.each do |f| + say File.join(gem_spec.full_gem_path, f) + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/dependency_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/dependency_command.rb new file mode 100644 index 0000000..44b269b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/dependency_command.rb @@ -0,0 +1,188 @@ +require 'rubygems/command' +require 'rubygems/local_remote_options' +require 'rubygems/version_option' +require 'rubygems/source_info_cache' + +class Gem::Commands::DependencyCommand < Gem::Command + + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize + super 'dependency', + 'Show the dependencies of an installed gem', + :version => Gem::Requirement.default, :domain => :local + + add_version_option + add_platform_option + + add_option('-R', '--[no-]reverse-dependencies', + 'Include reverse dependencies in the output') do + |value, options| + options[:reverse_dependencies] = value + end + + add_option('-p', '--pipe', + "Pipe Format (name --version ver)") do |value, options| + options[:pipe_format] = value + end + + add_local_remote_options + end + + def arguments # :nodoc: + "GEMNAME name of gem to show dependencies for" + end + + def defaults_str # :nodoc: + "--local --version '#{Gem::Requirement.default}' --no-reverse-dependencies" + end + + def usage # :nodoc: + "#{program_name} GEMNAME" + end + + def execute + options[:args] << '' if options[:args].empty? + specs = {} + + source_indexes = Hash.new do |h, source_uri| + h[source_uri] = Gem::SourceIndex.new + end + + pattern = if options[:args].length == 1 and + options[:args].first =~ /\A\/(.*)\/(i)?\z/m then + flags = $2 ? Regexp::IGNORECASE : nil + Regexp.new $1, flags + else + /\A#{Regexp.union(*options[:args])}/ + end + + dependency = Gem::Dependency.new pattern, options[:version] + + if options[:reverse_dependencies] and remote? and not local? then + alert_error 'Only reverse dependencies for local gems are supported.' + terminate_interaction 1 + end + + if local? then + Gem.source_index.search(dependency).each do |spec| + source_indexes[:local].add_spec spec + end + end + + if remote? and not options[:reverse_dependencies] then + fetcher = Gem::SpecFetcher.fetcher + + begin + fetcher.find_matching(dependency).each do |spec_tuple, source_uri| + spec = fetcher.fetch_spec spec_tuple, URI.parse(source_uri) + + source_indexes[source_uri].add_spec spec + end + rescue Gem::RemoteFetcher::FetchError => e + raise unless fetcher.warn_legacy e do + require 'rubygems/source_info_cache' + + specs = Gem::SourceInfoCache.search_with_source dependency, false + + specs.each do |spec, source_uri| + source_indexes[source_uri].add_spec spec + end + end + end + end + + if source_indexes.empty? then + patterns = options[:args].join ',' + say "No gems found matching #{patterns} (#{options[:version]})" if + Gem.configuration.verbose + + terminate_interaction 1 + end + + specs = {} + + source_indexes.values.each do |source_index| + source_index.gems.each do |name, spec| + specs[spec.full_name] = [source_index, spec] + end + end + + reverse = Hash.new { |h, k| h[k] = [] } + + if options[:reverse_dependencies] then + specs.values.each do |_, spec| + reverse[spec.full_name] = find_reverse_dependencies spec + end + end + + if options[:pipe_format] then + specs.values.sort_by { |_, spec| spec }.each do |_, spec| + unless spec.dependencies.empty? + spec.dependencies.each do |dep| + say "#{dep.name} --version '#{dep.version_requirements}'" + end + end + end + else + response = '' + + specs.values.sort_by { |_, spec| spec }.each do |_, spec| + response << print_dependencies(spec) + unless reverse[spec.full_name].empty? then + response << " Used by\n" + reverse[spec.full_name].each do |sp, dep| + response << " #{sp} (#{dep})\n" + end + end + response << "\n" + end + + say response + end + end + + def print_dependencies(spec, level = 0) + response = '' + response << ' ' * level + "Gem #{spec.full_name}\n" + unless spec.dependencies.empty? then + spec.dependencies.each do |dep| + response << ' ' * level + " #{dep}\n" + end + end + response + end + + # Retuns list of [specification, dep] that are satisfied by spec. + def find_reverse_dependencies(spec) + result = [] + + Gem.source_index.each do |name, sp| + sp.dependencies.each do |dep| + dep = Gem::Dependency.new(*dep) unless Gem::Dependency === dep + + if spec.name == dep.name and + dep.version_requirements.satisfied_by?(spec.version) then + result << [sp.full_name, dep] + end + end + end + + result + end + + def find_gems(name, source_index) + specs = {} + + spec_list = source_index.search name, options[:version] + + spec_list.each do |spec| + specs[spec.full_name] = [source_index, spec] + end + + specs + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/environment_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/environment_command.rb new file mode 100644 index 0000000..e672da5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/environment_command.rb @@ -0,0 +1,128 @@ +require 'rubygems/command' + +class Gem::Commands::EnvironmentCommand < Gem::Command + + def initialize + super 'environment', 'Display information about the RubyGems environment' + end + + def arguments # :nodoc: + args = <<-EOF + packageversion display the package version + gemdir display the path where gems are installed + gempath display path used to search for gems + version display the gem format version + remotesources display the remote gem servers + display everything + EOF + return args.gsub(/^\s+/, '') + end + + def description # :nodoc: + <<-EOF +The RubyGems environment can be controlled through command line arguments, +gemrc files, environment variables and built-in defaults. + +Command line argument defaults and some RubyGems defaults can be set in +~/.gemrc file for individual users and a /etc/gemrc for all users. A gemrc +is a YAML file with the following YAML keys: + + :sources: A YAML array of remote gem repositories to install gems from + :verbose: Verbosity of the gem command. false, true, and :really are the + levels + :update_sources: Enable/disable automatic updating of repository metadata + :backtrace: Print backtrace when RubyGems encounters an error + :bulk_threshold: Switch to a bulk update when this many sources are out of + date (legacy setting) + :gempath: The paths in which to look for gems + gem_command: A string containing arguments for the specified gem command + +Example: + + :verbose: false + install: --no-wrappers + update: --no-wrappers + +RubyGems' default local repository can be overriden with the GEM_PATH and +GEM_HOME environment variables. GEM_HOME sets the default repository to +install into. GEM_PATH allows multiple local repositories to be searched for +gems. + +If you are behind a proxy server, RubyGems uses the HTTP_PROXY, +HTTP_PROXY_USER and HTTP_PROXY_PASS environment variables to discover the +proxy server. + +If you are packaging RubyGems all of RubyGems' defaults are in +lib/rubygems/defaults.rb. You may override these in +lib/rubygems/defaults/operating_system.rb + EOF + end + + def usage # :nodoc: + "#{program_name} [arg]" + end + + def execute + out = '' + arg = options[:args][0] + case arg + when /^packageversion/ then + out << Gem::RubyGemsPackageVersion + when /^version/ then + out << Gem::RubyGemsVersion + when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then + out << Gem.dir + when /^gempath/, /^path/, /^GEM_PATH/ then + out << Gem.path.join(File::PATH_SEPARATOR) + when /^remotesources/ then + out << Gem.sources.join("\n") + when nil then + out = "RubyGems Environment:\n" + + out << " - RUBYGEMS VERSION: #{Gem::RubyGemsVersion}\n" + + out << " - RUBY VERSION: #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}" + out << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL + out << ") [#{RUBY_PLATFORM}]\n" + + out << " - INSTALLATION DIRECTORY: #{Gem.dir}\n" + + out << " - RUBYGEMS PREFIX: #{Gem.prefix}\n" unless Gem.prefix.nil? + + out << " - RUBY EXECUTABLE: #{Gem.ruby}\n" + + out << " - EXECUTABLE DIRECTORY: #{Gem.bindir}\n" + + out << " - RUBYGEMS PLATFORMS:\n" + Gem.platforms.each do |platform| + out << " - #{platform}\n" + end + + out << " - GEM PATHS:\n" + out << " - #{Gem.dir}\n" + + path = Gem.path.dup + path.delete Gem.dir + path.each do |p| + out << " - #{p}\n" + end + + out << " - GEM CONFIGURATION:\n" + Gem.configuration.each do |name, value| + out << " - #{name.inspect} => #{value.inspect}\n" + end + + out << " - REMOTE SOURCES:\n" + Gem.sources.each do |s| + out << " - #{s}\n" + end + + else + fail Gem::CommandLineError, "Unknown enviroment option [#{arg}]" + end + say out + true + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/fetch_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/fetch_command.rb new file mode 100644 index 0000000..76c9924 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/fetch_command.rb @@ -0,0 +1,62 @@ +require 'rubygems/command' +require 'rubygems/local_remote_options' +require 'rubygems/version_option' +require 'rubygems/source_info_cache' + +class Gem::Commands::FetchCommand < Gem::Command + + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize + super 'fetch', 'Download a gem and place it in the current directory' + + add_bulk_threshold_option + add_proxy_option + add_source_option + + add_version_option + add_platform_option + end + + def arguments # :nodoc: + 'GEMNAME name of gem to download' + end + + def defaults_str # :nodoc: + "--version '#{Gem::Requirement.default}'" + end + + def usage # :nodoc: + "#{program_name} GEMNAME [GEMNAME ...]" + end + + def execute + version = options[:version] || Gem::Requirement.default + all = Gem::Requirement.default + + gem_names = get_all_gem_names + + gem_names.each do |gem_name| + dep = Gem::Dependency.new gem_name, version + + specs_and_sources = Gem::SpecFetcher.fetcher.fetch dep, all + + specs_and_sources.sort_by { |spec,| spec.version } + + spec, source_uri = specs_and_sources.last + + if spec.nil? then + alert_error "Could not find #{gem_name} in any repository" + next + end + + path = Gem::RemoteFetcher.fetcher.download spec, source_uri + FileUtils.mv path, "#{spec.full_name}.gem" + + say "Downloaded #{spec.full_name}" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/generate_index_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/generate_index_command.rb new file mode 100644 index 0000000..1bd8756 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/generate_index_command.rb @@ -0,0 +1,57 @@ +require 'rubygems/command' +require 'rubygems/indexer' + +class Gem::Commands::GenerateIndexCommand < Gem::Command + + def initialize + super 'generate_index', + 'Generates the index files for a gem server directory', + :directory => '.' + + add_option '-d', '--directory=DIRNAME', + 'repository base dir containing gems subdir' do |dir, options| + options[:directory] = File.expand_path dir + end + end + + def defaults_str # :nodoc: + "--directory ." + end + + def description # :nodoc: + <<-EOF +The generate_index command creates a set of indexes for serving gems +statically. The command expects a 'gems' directory under the path given to +the --directory option. When done, it will generate a set of files like this: + + gems/ # .gem files you want to index + quick/index + quick/index.rz # quick index manifest + quick/.gemspec.rz # legacy YAML quick index file + quick/Marshal./.gemspec.rz # Marshal quick index file + Marshal. + Marshal..Z # Marshal full index + yaml + yaml.Z # legacy YAML full index + +The .Z and .rz extension files are compressed with the inflate algorithm. The +Marshal version number comes from ruby's Marshal::MAJOR_VERSION and +Marshal::MINOR_VERSION constants. It is used to ensure compatibility. The +yaml indexes exist for legacy RubyGems clients and fallback in case of Marshal +version changes. + EOF + end + + def execute + if not File.exist?(options[:directory]) or + not File.directory?(options[:directory]) then + alert_error "unknown directory name #{directory}." + terminate_interaction 1 + else + indexer = Gem::Indexer.new options[:directory] + indexer.generate_index + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/help_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/help_command.rb new file mode 100644 index 0000000..0c4a4ec --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/help_command.rb @@ -0,0 +1,172 @@ +require 'rubygems/command' + +class Gem::Commands::HelpCommand < Gem::Command + + # :stopdoc: + EXAMPLES = <<-EOF +Some examples of 'gem' usage. + +* Install 'rake', either from local directory or remote server: + + gem install rake + +* Install 'rake', only from remote server: + + gem install rake --remote + +* Install 'rake' from remote server, and run unit tests, + and generate RDocs: + + gem install --remote rake --test --rdoc --ri + +* Install 'rake', but only version 0.3.1, even if dependencies + are not met, and into a user-specific directory: + + gem install rake --version 0.3.1 --force --user-install + +* List local gems whose name begins with 'D': + + gem list D + +* List local and remote gems whose name contains 'log': + + gem search log --both + +* List only remote gems whose name contains 'log': + + gem search log --remote + +* Uninstall 'rake': + + gem uninstall rake + +* Create a gem: + + See http://rubygems.rubyforge.org/wiki/wiki.pl?CreateAGemInTenMinutes + +* See information about RubyGems: + + gem environment + +* Update all gems on your system: + + gem update + EOF + + PLATFORMS = <<-'EOF' +RubyGems platforms are composed of three parts, a CPU, an OS, and a +version. These values are taken from values in rbconfig.rb. You can view +your current platform by running `gem environment`. + +RubyGems matches platforms as follows: + + * The CPU must match exactly, unless one of the platforms has + "universal" as the CPU. + * The OS must match exactly. + * The versions must match exactly unless one of the versions is nil. + +For commands that install, uninstall and list gems, you can override what +RubyGems thinks your platform is with the --platform option. The platform +you pass must match "#{cpu}-#{os}" or "#{cpu}-#{os}-#{version}". On mswin +platforms, the version is the compiler version, not the OS version. (Ruby +compiled with VC6 uses "60" as the compiler version, VC8 uses "80".) + +Example platforms: + + x86-freebsd # Any FreeBSD version on an x86 CPU + universal-darwin-8 # Darwin 8 only gems that run on any CPU + x86-mswin32-80 # Windows gems compiled with VC8 + +When building platform gems, set the platform in the gem specification to +Gem::Platform::CURRENT. This will correctly mark the gem with your ruby's +platform. + EOF + # :startdoc: + + def initialize + super 'help', "Provide help on the 'gem' command" + end + + def arguments # :nodoc: + args = <<-EOF + commands List all 'gem' commands + examples Show examples of 'gem' usage + Show specific help for + EOF + return args.gsub(/^\s+/, '') + end + + def usage # :nodoc: + "#{program_name} ARGUMENT" + end + + def execute + command_manager = Gem::CommandManager.instance + arg = options[:args][0] + + if begins? "commands", arg then + out = [] + out << "GEM commands are:" + out << nil + + margin_width = 4 + + desc_width = command_manager.command_names.map { |n| n.size }.max + 4 + + summary_width = 80 - margin_width - desc_width + wrap_indent = ' ' * (margin_width + desc_width) + format = "#{' ' * margin_width}%-#{desc_width}s%s" + + command_manager.command_names.each do |cmd_name| + summary = command_manager[cmd_name].summary + summary = wrap(summary, summary_width).split "\n" + out << sprintf(format, cmd_name, summary.shift) + until summary.empty? do + out << "#{wrap_indent}#{summary.shift}" + end + end + + out << nil + out << "For help on a particular command, use 'gem help COMMAND'." + out << nil + out << "Commands may be abbreviated, so long as they are unambiguous." + out << "e.g. 'gem i rake' is short for 'gem install rake'." + + say out.join("\n") + + elsif begins? "options", arg then + say Gem::Command::HELP + + elsif begins? "examples", arg then + say EXAMPLES + + elsif begins? "platforms", arg then + say PLATFORMS + + elsif options[:help] then + command = command_manager[options[:help]] + if command + # help with provided command + command.invoke("--help") + else + alert_error "Unknown command #{options[:help]}. Try 'gem help commands'" + end + + elsif arg then + possibilities = command_manager.find_command_possibilities(arg.downcase) + if possibilities.size == 1 + command = command_manager[possibilities.first] + command.invoke("--help") + elsif possibilities.size > 1 + alert_warning "Ambiguous command #{arg} (#{possibilities.join(', ')})" + else + alert_warning "Unknown command #{arg}. Try gem help commands" + end + + else + say Gem::Command::HELP + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/install_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/install_command.rb new file mode 100644 index 0000000..1a6eb68 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/install_command.rb @@ -0,0 +1,148 @@ +require 'rubygems/command' +require 'rubygems/doc_manager' +require 'rubygems/install_update_options' +require 'rubygems/dependency_installer' +require 'rubygems/local_remote_options' +require 'rubygems/validator' +require 'rubygems/version_option' + +class Gem::Commands::InstallCommand < Gem::Command + + include Gem::VersionOption + include Gem::LocalRemoteOptions + include Gem::InstallUpdateOptions + + def initialize + defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({ + :generate_rdoc => true, + :generate_ri => true, + :format_executable => false, + :test => false, + :version => Gem::Requirement.default, + }) + + super 'install', 'Install a gem into the local repository', defaults + + add_install_update_options + add_local_remote_options + add_platform_option + add_version_option + end + + def arguments # :nodoc: + "GEMNAME name of gem to install" + end + + def defaults_str # :nodoc: + "--both --version '#{Gem::Requirement.default}' --rdoc --ri --no-force\n" \ + "--no-test --install-dir #{Gem.dir}" + end + + def description # :nodoc: + <<-EOF +The install command installs local or remote gem into a gem repository. + +For gems with executables ruby installs a wrapper file into the executable +directory by deault. This can be overridden with the --no-wrappers option. +The wrapper allows you to choose among alternate gem versions using _version_. + +For example `rake _0.7.3_ --version` will run rake version 0.7.3 if a newer +version is also installed. + EOF + end + + def usage # :nodoc: + "#{program_name} GEMNAME [GEMNAME ...] [options] -- --build-flags" + end + + def execute + if options[:include_dependencies] then + alert "`gem install -y` is now default and will be removed" + alert "use --ignore-dependencies to install only the gems you list" + end + + installed_gems = [] + + ENV.delete 'GEM_PATH' if options[:install_dir].nil? and RUBY_VERSION > '1.9' + + install_options = { + :env_shebang => options[:env_shebang], + :domain => options[:domain], + :force => options[:force], + :format_executable => options[:format_executable], + :ignore_dependencies => options[:ignore_dependencies], + :install_dir => options[:install_dir], + :security_policy => options[:security_policy], + :wrappers => options[:wrappers], + :bin_dir => options[:bin_dir], + :development => options[:development], + } + + exit_code = 0 + + get_all_gem_names.each do |gem_name| + begin + inst = Gem::DependencyInstaller.new install_options + inst.install gem_name, options[:version] + + inst.installed_gems.each do |spec| + say "Successfully installed #{spec.full_name}" + end + + installed_gems.push(*inst.installed_gems) + rescue Gem::InstallError => e + alert_error "Error installing #{gem_name}:\n\t#{e.message}" + exit_code |= 1 + rescue Gem::GemNotFoundException => e + alert_error e.message + exit_code |= 2 +# rescue => e +# # TODO: Fix this handle to allow the error to propagate to +# # the top level handler. Examine the other errors as +# # well. This implementation here looks suspicious to me -- +# # JimWeirich (4/Jan/05) +# alert_error "Error installing gem #{gem_name}: #{e.message}" +# return + end + end + + unless installed_gems.empty? then + gems = installed_gems.length == 1 ? 'gem' : 'gems' + say "#{installed_gems.length} #{gems} installed" + end + + # NOTE: *All* of the RI documents must be generated first. + # For some reason, RI docs cannot be generated after any RDoc + # documents are generated. + + if options[:generate_ri] then + installed_gems.each do |gem| + Gem::DocManager.new(gem, options[:rdoc_args]).generate_ri + end + + Gem::DocManager.update_ri_cache + end + + if options[:generate_rdoc] then + installed_gems.each do |gem| + Gem::DocManager.new(gem, options[:rdoc_args]).generate_rdoc + end + end + + if options[:test] then + installed_gems.each do |spec| + gem_spec = Gem::SourceIndex.from_installed_gems.search(spec.name, spec.version.version).first + result = Gem::Validator.new.unit_test(gem_spec) + if result and not result.passed? + unless ask_yes_no("...keep Gem?", true) then + Gem::Uninstaller.new(spec.name, :version => spec.version.version).uninstall + end + end + end + end + + raise Gem::SystemExitException, exit_code + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/list_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/list_command.rb new file mode 100644 index 0000000..f3e5da9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/list_command.rb @@ -0,0 +1,35 @@ +require 'rubygems/command' +require 'rubygems/commands/query_command' + +## +# An alternate to Gem::Commands::QueryCommand that searches for gems starting +# with the the supplied argument. + +class Gem::Commands::ListCommand < Gem::Commands::QueryCommand + + def initialize + super 'list', 'Display gems whose name starts with STRING' + + remove_option('--name-matches') + end + + def arguments # :nodoc: + "STRING start of gem name to look for" + end + + def defaults_str # :nodoc: + "--local --no-details" + end + + def usage # :nodoc: + "#{program_name} [STRING]" + end + + def execute + string = get_one_optional_argument || '' + options[:name] = /^#{string}/i + super + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/lock_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/lock_command.rb new file mode 100644 index 0000000..5a43978 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/lock_command.rb @@ -0,0 +1,110 @@ +require 'rubygems/command' + +class Gem::Commands::LockCommand < Gem::Command + + def initialize + super 'lock', 'Generate a lockdown list of gems', + :strict => false + + add_option '-s', '--[no-]strict', + 'fail if unable to satisfy a dependency' do |strict, options| + options[:strict] = strict + end + end + + def arguments # :nodoc: + "GEMNAME name of gem to lock\nVERSION version of gem to lock" + end + + def defaults_str # :nodoc: + "--no-strict" + end + + def description # :nodoc: + <<-EOF +The lock command will generate a list of +gem+ statements that will lock down +the versions for the gem given in the command line. It will specify exact +versions in the requirements list to ensure that the gems loaded will always +be consistent. A full recursive search of all effected gems will be +generated. + +Example: + + gemlock rails-1.0.0 > lockdown.rb + +will produce in lockdown.rb: + + require "rubygems" + gem 'rails', '= 1.0.0' + gem 'rake', '= 0.7.0.1' + gem 'activesupport', '= 1.2.5' + gem 'activerecord', '= 1.13.2' + gem 'actionpack', '= 1.11.2' + gem 'actionmailer', '= 1.1.5' + gem 'actionwebservice', '= 1.0.0' + +Just load lockdown.rb from your application to ensure that the current +versions are loaded. Make sure that lockdown.rb is loaded *before* any +other require statements. + +Notice that rails 1.0.0 only requires that rake 0.6.2 or better be used. +Rake-0.7.0.1 is the most recent version installed that satisfies that, so we +lock it down to the exact version. + EOF + end + + def usage # :nodoc: + "#{program_name} GEMNAME-VERSION [GEMNAME-VERSION ...]" + end + + def complain(message) + if options[:strict] then + raise Gem::Exception, message + else + say "# #{message}" + end + end + + def execute + say "require 'rubygems'" + + locked = {} + + pending = options[:args] + + until pending.empty? do + full_name = pending.shift + + spec = Gem::SourceIndex.load_specification spec_path(full_name) + + if spec.nil? then + complain "Could not find gem #{full_name}, try using the full name" + next + end + + say "gem '#{spec.name}', '= #{spec.version}'" unless locked[spec.name] + locked[spec.name] = true + + spec.runtime_dependencies.each do |dep| + next if locked[dep.name] + candidates = Gem.source_index.search dep + + if candidates.empty? then + complain "Unable to satisfy '#{dep}' from currently installed gems" + else + pending << candidates.last.full_name + end + end + end + end + + def spec_path(gem_full_name) + gemspecs = Gem.path.map do |path| + File.join path, "specifications", "#{gem_full_name}.gemspec" + end + + gemspecs.find { |gemspec| File.exist? gemspec } + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/mirror_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/mirror_command.rb new file mode 100644 index 0000000..959b8ea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/mirror_command.rb @@ -0,0 +1,111 @@ +require 'yaml' +require 'zlib' + +require 'rubygems/command' +require 'open-uri' + +class Gem::Commands::MirrorCommand < Gem::Command + + def initialize + super 'mirror', 'Mirror a gem repository' + end + + def description # :nodoc: + <<-EOF +The mirror command uses the ~/.gemmirrorrc config file to mirror remote gem +repositories to a local path. The config file is a YAML document that looks +like this: + + --- + - from: http://gems.example.com # source repository URI + to: /path/to/mirror # destination directory + +Multiple sources and destinations may be specified. + EOF + end + + def execute + config_file = File.join Gem.user_home, '.gemmirrorrc' + + raise "Config file #{config_file} not found" unless File.exist? config_file + + mirrors = YAML.load_file config_file + + raise "Invalid config file #{config_file}" unless mirrors.respond_to? :each + + mirrors.each do |mir| + raise "mirror missing 'from' field" unless mir.has_key? 'from' + raise "mirror missing 'to' field" unless mir.has_key? 'to' + + get_from = mir['from'] + save_to = File.expand_path mir['to'] + + raise "Directory not found: #{save_to}" unless File.exist? save_to + raise "Not a directory: #{save_to}" unless File.directory? save_to + + gems_dir = File.join save_to, "gems" + + if File.exist? gems_dir then + raise "Not a directory: #{gems_dir}" unless File.directory? gems_dir + else + Dir.mkdir gems_dir + end + + sourceindex_data = '' + + say "fetching: #{get_from}/Marshal.#{Gem.marshal_version}.Z" + + get_from = URI.parse get_from + + if get_from.scheme.nil? then + get_from = get_from.to_s + elsif get_from.scheme == 'file' then + # check if specified URI contains a drive letter (file:/D:/Temp) + get_from = get_from.to_s + get_from = if get_from =~ /^file:.*[a-z]:/i then + get_from[6..-1] + else + get_from[5..-1] + end + end + + open File.join(get_from.to_s, "Marshal.#{Gem.marshal_version}.Z"), "rb" do |y| + sourceindex_data = Zlib::Inflate.inflate y.read + open File.join(save_to, "Marshal.#{Gem.marshal_version}"), "wb" do |out| + out.write sourceindex_data + end + end + + sourceindex = Marshal.load(sourceindex_data) + + progress = ui.progress_reporter sourceindex.size, + "Fetching #{sourceindex.size} gems" + sourceindex.each do |fullname, gem| + gem_file = "#{fullname}.gem" + gem_dest = File.join gems_dir, gem_file + + unless File.exist? gem_dest then + begin + open "#{get_from}/gems/#{gem_file}", "rb" do |g| + contents = g.read + open gem_dest, "wb" do |out| + out.write contents + end + end + rescue + old_gf = gem_file + gem_file = gem_file.downcase + retry if old_gf != gem_file + alert_error $! + end + end + + progress.updated gem_file + end + + progress.done + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/outdated_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/outdated_command.rb new file mode 100644 index 0000000..9e054f9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/outdated_command.rb @@ -0,0 +1,33 @@ +require 'rubygems/command' +require 'rubygems/local_remote_options' +require 'rubygems/spec_fetcher' +require 'rubygems/version_option' + +class Gem::Commands::OutdatedCommand < Gem::Command + + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize + super 'outdated', 'Display all gems that need updates' + + add_local_remote_options + add_platform_option + end + + def execute + locals = Gem::SourceIndex.from_installed_gems + + locals.outdated.sort.each do |name| + local = locals.find_name(name).last + + dep = Gem::Dependency.new local.name, ">= #{local.version}" + remotes = Gem::SpecFetcher.fetcher.fetch dep + remote = remotes.last.first + + say "#{local.name} (#{local.version} < #{remote.version})" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/pristine_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/pristine_command.rb new file mode 100644 index 0000000..d47fe54 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/pristine_command.rb @@ -0,0 +1,93 @@ +require 'fileutils' +require 'rubygems/command' +require 'rubygems/format' +require 'rubygems/installer' +require 'rubygems/version_option' + +class Gem::Commands::PristineCommand < Gem::Command + + include Gem::VersionOption + + def initialize + super 'pristine', + 'Restores installed gems to pristine condition from files located in the gem cache', + :version => Gem::Requirement.default + + add_option('--all', + 'Restore all installed gems to pristine', + 'condition') do |value, options| + options[:all] = value + end + + add_version_option('restore to', 'pristine condition') + end + + def arguments # :nodoc: + "GEMNAME gem to restore to pristine condition (unless --all)" + end + + def defaults_str # :nodoc: + "--all" + end + + def description # :nodoc: + <<-EOF +The pristine command compares the installed gems with the contents of the +cached gem and restores any files that don't match the cached gem's copy. + +If you have made modifications to your installed gems, the pristine command +will revert them. After all the gem's files have been checked all bin stubs +for the gem are regenerated. + +If the cached gem cannot be found, you will need to use `gem install` to +revert the gem. + EOF + end + + def usage # :nodoc: + "#{program_name} [args]" + end + + def execute + gem_name = nil + + specs = if options[:all] then + Gem::SourceIndex.from_installed_gems.map do |name, spec| + spec + end + else + gem_name = get_one_gem_name + Gem::SourceIndex.from_installed_gems.find_name(gem_name, + options[:version]) + end + + if specs.empty? then + raise Gem::Exception, + "Failed to find gem #{gem_name} #{options[:version]}" + end + + install_dir = Gem.dir # TODO use installer option + + raise Gem::FilePermissionError.new(install_dir) unless + File.writable?(install_dir) + + say "Restoring gem(s) to pristine condition..." + + specs.each do |spec| + gem = Dir[File.join(Gem.dir, 'cache', "#{spec.full_name}.gem")].first + + if gem.nil? then + alert_error "Cached gem for #{spec.full_name} not found, use `gem install` to restore" + next + end + + # TODO use installer options + installer = Gem::Installer.new gem, :wrappers => true, :force => true + installer.install + + say "Restored #{spec.full_name}" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/query_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/query_command.rb new file mode 100644 index 0000000..29fe8ac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/query_command.rb @@ -0,0 +1,233 @@ +require 'rubygems/command' +require 'rubygems/local_remote_options' +require 'rubygems/spec_fetcher' +require 'rubygems/version_option' + +class Gem::Commands::QueryCommand < Gem::Command + + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize(name = 'query', + summary = 'Query gem information in local or remote repositories') + super name, summary, + :name => //, :domain => :local, :details => false, :versions => true, + :installed => false, :version => Gem::Requirement.default + + add_option('-i', '--[no-]installed', + 'Check for installed gem') do |value, options| + options[:installed] = value + end + + add_version_option + + add_option('-n', '--name-matches REGEXP', + 'Name of gem(s) to query on matches the', + 'provided REGEXP') do |value, options| + options[:name] = /#{value}/i + end + + add_option('-d', '--[no-]details', + 'Display detailed information of gem(s)') do |value, options| + options[:details] = value + end + + add_option( '--[no-]versions', + 'Display only gem names') do |value, options| + options[:versions] = value + options[:details] = false unless value + end + + add_option('-a', '--all', + 'Display all gem versions') do |value, options| + options[:all] = value + end + + add_local_remote_options + end + + def defaults_str # :nodoc: + "--local --name-matches // --no-details --versions --no-installed" + end + + def execute + exit_code = 0 + + name = options[:name] + + if options[:installed] then + if name.source.empty? then + alert_error "You must specify a gem name" + exit_code |= 4 + elsif installed? name, options[:version] then + say "true" + else + say "false" + exit_code |= 1 + end + + raise Gem::SystemExitException, exit_code + end + + dep = Gem::Dependency.new name, Gem::Requirement.default + + if local? then + if ui.outs.tty? or both? then + say + say "*** LOCAL GEMS ***" + say + end + + specs = Gem.source_index.search dep + + spec_tuples = specs.map do |spec| + [[spec.name, spec.version, spec.original_platform, spec], :local] + end + + output_query_results spec_tuples + end + + if remote? then + if ui.outs.tty? or both? then + say + say "*** REMOTE GEMS ***" + say + end + + all = options[:all] + + begin + fetcher = Gem::SpecFetcher.fetcher + spec_tuples = fetcher.find_matching dep, all, false + rescue Gem::RemoteFetcher::FetchError => e + raise unless fetcher.warn_legacy e do + require 'rubygems/source_info_cache' + + dep.name = '' if dep.name == // + + specs = Gem::SourceInfoCache.search_with_source dep, false, all + + spec_tuples = specs.map do |spec, source_uri| + [[spec.name, spec.version, spec.original_platform, spec], + source_uri] + end + end + end + + output_query_results spec_tuples + end + end + + private + + ## + # Check if gem +name+ version +version+ is installed. + + def installed?(name, version = Gem::Requirement.default) + dep = Gem::Dependency.new name, version + !Gem.source_index.search(dep).empty? + end + + def output_query_results(spec_tuples) + output = [] + versions = Hash.new { |h,name| h[name] = [] } + + spec_tuples.each do |spec_tuple, source_uri| + versions[spec_tuple.first] << [spec_tuple, source_uri] + end + + versions = versions.sort_by do |(name,_),_| + name.downcase + end + + versions.each do |gem_name, matching_tuples| + matching_tuples = matching_tuples.sort_by do |(name, version,_),_| + version + end.reverse + + seen = {} + + matching_tuples.delete_if do |(name, version,_),_| + if seen[version] then + true + else + seen[version] = true + false + end + end + + entry = gem_name.dup + + if options[:versions] then + versions = matching_tuples.map { |(name, version,_),_| version }.uniq + entry << " (#{versions.join ', '})" + end + + if options[:details] then + detail_tuple = matching_tuples.first + + spec = if detail_tuple.first.length == 4 then + detail_tuple.first.last + else + uri = URI.parse detail_tuple.last + Gem::SpecFetcher.fetcher.fetch_spec detail_tuple.first, uri + end + + entry << "\n" + authors = "Author#{spec.authors.length > 1 ? 's' : ''}: " + authors << spec.authors.join(', ') + entry << format_text(authors, 68, 4) + + if spec.rubyforge_project and not spec.rubyforge_project.empty? then + rubyforge = "Rubyforge: http://rubyforge.org/projects/#{spec.rubyforge_project}" + entry << "\n" << format_text(rubyforge, 68, 4) + end + + if spec.homepage and not spec.homepage.empty? then + entry << "\n" << format_text("Homepage: #{spec.homepage}", 68, 4) + end + + if spec.loaded_from then + if matching_tuples.length == 1 then + loaded_from = File.dirname File.dirname(spec.loaded_from) + entry << "\n" << " Installed at: #{loaded_from}" + else + label = 'Installed at' + matching_tuples.each do |(_,version,_,s),| + loaded_from = File.dirname File.dirname(s.loaded_from) + entry << "\n" << " #{label} (#{version}): #{loaded_from}" + label = ' ' * label.length + end + end + end + + entry << "\n\n" << format_text(spec.summary, 68, 4) + end + output << entry + end + + say output.join(options[:details] ? "\n\n" : "\n") + end + + ## + # Used for wrapping and indenting text + + def format_text(text, wrap, indent=0) + result = [] + work = text.dup + + while work.length > wrap + if work =~ /^(.{0,#{wrap}})[ \n]/o then + result << $1 + work.slice!(0, $&.length) + else + result << work.slice!(0, wrap) + end + end + + result << work if work.length.nonzero? + result.join("\n").gsub(/^/, " " * indent) + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/rdoc_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/rdoc_command.rb new file mode 100644 index 0000000..82180d4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/rdoc_command.rb @@ -0,0 +1,82 @@ +require 'rubygems/command' +require 'rubygems/version_option' +require 'rubygems/doc_manager' + +module Gem + module Commands + class RdocCommand < Command + include VersionOption + + def initialize + super('rdoc', + 'Generates RDoc for pre-installed gems', + { + :version => Gem::Requirement.default, + :include_rdoc => true, + :include_ri => true, + }) + add_option('--all', + 'Generate RDoc/RI documentation for all', + 'installed gems') do |value, options| + options[:all] = value + end + add_option('--[no-]rdoc', + 'Include RDoc generated documents') do + |value, options| + options[:include_rdoc] = value + end + add_option('--[no-]ri', + 'Include RI generated documents' + ) do |value, options| + options[:include_ri] = value + end + add_version_option + end + + def arguments # :nodoc: + "GEMNAME gem to generate documentation for (unless --all)" + end + + def defaults_str # :nodoc: + "--version '#{Gem::Requirement.default}' --rdoc --ri" + end + + def usage # :nodoc: + "#{program_name} [args]" + end + + def execute + if options[:all] + specs = Gem::SourceIndex.from_installed_gems.collect { |name, spec| + spec + } + else + gem_name = get_one_gem_name + specs = Gem::SourceIndex.from_installed_gems.search( + gem_name, options[:version]) + end + + if specs.empty? + fail "Failed to find gem #{gem_name} to generate RDoc for #{options[:version]}" + end + + if options[:include_ri] + specs.each do |spec| + Gem::DocManager.new(spec).generate_ri + end + + Gem::DocManager.update_ri_cache + end + + if options[:include_rdoc] + specs.each do |spec| + Gem::DocManager.new(spec).generate_rdoc + end + end + + true + end + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/search_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/search_command.rb new file mode 100644 index 0000000..96da19c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/search_command.rb @@ -0,0 +1,37 @@ +require 'rubygems/command' +require 'rubygems/commands/query_command' + +module Gem + module Commands + + class SearchCommand < QueryCommand + + def initialize + super( + 'search', + 'Display all gems whose name contains STRING' + ) + remove_option('--name-matches') + end + + def arguments # :nodoc: + "STRING fragment of gem name to search for" + end + + def defaults_str # :nodoc: + "--local --no-details" + end + + def usage # :nodoc: + "#{program_name} [STRING]" + end + + def execute + string = get_one_optional_argument + options[:name] = /#{string}/i + super + end + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/server_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/server_command.rb new file mode 100644 index 0000000..992ae1c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/server_command.rb @@ -0,0 +1,48 @@ +require 'rubygems/command' +require 'rubygems/server' + +class Gem::Commands::ServerCommand < Gem::Command + + def initialize + super 'server', 'Documentation and gem repository HTTP server', + :port => 8808, :gemdir => Gem.dir, :daemon => false + + add_option '-p', '--port=PORT', Integer, + 'port to listen on' do |port, options| + options[:port] = port + end + + add_option '-d', '--dir=GEMDIR', + 'directory from which to serve gems' do |gemdir, options| + options[:gemdir] = File.expand_path gemdir + end + + add_option '--[no-]daemon', 'run as a daemon' do |daemon, options| + options[:daemon] = daemon + end + end + + def defaults_str # :nodoc: + "--port 8808 --dir #{Gem.dir} --no-daemon" + end + + def description # :nodoc: + <<-EOF +The server command starts up a web server that hosts the RDoc for your +installed gems and can operate as a server for installation of gems on other +machines. + +The cache files for installed gems must exist to use the server as a source +for gem installation. + +To install gems from a running server, use `gem install GEMNAME --source +http://gem_server_host:8808` + EOF + end + + def execute + Gem::Server.run options + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/sources_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/sources_command.rb new file mode 100644 index 0000000..9aabb77 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/sources_command.rb @@ -0,0 +1,152 @@ +require 'fileutils' +require 'rubygems/command' +require 'rubygems/remote_fetcher' +require 'rubygems/source_info_cache' +require 'rubygems/spec_fetcher' + +class Gem::Commands::SourcesCommand < Gem::Command + + def initialize + super 'sources', + 'Manage the sources and cache file RubyGems uses to search for gems' + + add_option '-a', '--add SOURCE_URI', 'Add source' do |value, options| + options[:add] = value + end + + add_option '-l', '--list', 'List sources' do |value, options| + options[:list] = value + end + + add_option '-r', '--remove SOURCE_URI', 'Remove source' do |value, options| + options[:remove] = value + end + + add_option '-c', '--clear-all', + 'Remove all sources (clear the cache)' do |value, options| + options[:clear_all] = value + end + + add_option '-u', '--update', 'Update source cache' do |value, options| + options[:update] = value + end + end + + def defaults_str + '--list' + end + + def execute + options[:list] = !(options[:add] || + options[:clear_all] || + options[:remove] || + options[:update]) + + if options[:clear_all] then + path = Gem::SpecFetcher.fetcher.dir + FileUtils.rm_rf path + + if not File.exist?(path) then + say "*** Removed specs cache ***" + elsif not File.writable?(path) then + say "*** Unable to remove source cache (write protected) ***" + else + say "*** Unable to remove source cache ***" + end + + sic = Gem::SourceInfoCache + remove_cache_file 'user', sic.user_cache_file + remove_cache_file 'latest user', sic.latest_user_cache_file + remove_cache_file 'system', sic.system_cache_file + remove_cache_file 'latest system', sic.latest_system_cache_file + end + + if options[:add] then + source_uri = options[:add] + uri = URI.parse source_uri + + begin + Gem::SpecFetcher.fetcher.load_specs uri, 'specs' + Gem.sources << source_uri + Gem.configuration.write + + say "#{source_uri} added to sources" + rescue URI::Error, ArgumentError + say "#{source_uri} is not a URI" + rescue Gem::RemoteFetcher::FetchError => e + yaml_uri = uri + 'yaml' + gem_repo = Gem::RemoteFetcher.fetcher.fetch_size yaml_uri rescue false + + if e.uri =~ /specs\.#{Regexp.escape Gem.marshal_version}\.gz$/ and + gem_repo then + + alert_warning <<-EOF +RubyGems 1.2+ index not found for: +\t#{source_uri} + +Will cause RubyGems to revert to legacy indexes, degrading performance. + EOF + + say "#{source_uri} added to sources" + else + say "Error fetching #{source_uri}:\n\t#{e.message}" + end + end + end + + if options[:remove] then + source_uri = options[:remove] + + unless Gem.sources.include? source_uri then + say "source #{source_uri} not present in cache" + else + Gem.sources.delete source_uri + Gem.configuration.write + + say "#{source_uri} removed from sources" + end + end + + if options[:update] then + fetcher = Gem::SpecFetcher.fetcher + + if fetcher.legacy_repos.empty? then + Gem.sources.each do |update_uri| + update_uri = URI.parse update_uri + fetcher.load_specs update_uri, 'specs' + fetcher.load_specs update_uri, 'latest_specs' + end + else + Gem::SourceInfoCache.cache true + Gem::SourceInfoCache.cache.flush + end + + say "source cache successfully updated" + end + + if options[:list] then + say "*** CURRENT SOURCES ***" + say + + Gem.sources.each do |source| + say source + end + end + end + + private + + def remove_cache_file(desc, path) + FileUtils.rm_rf path + + if not File.exist?(path) then + say "*** Removed #{desc} source cache ***" + elsif not File.writable?(path) then + say "*** Unable to remove #{desc} source cache (write protected) ***" + else + say "*** Unable to remove #{desc} source cache ***" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/specification_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/specification_command.rb new file mode 100644 index 0000000..5aaf6d1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/specification_command.rb @@ -0,0 +1,77 @@ +require 'yaml' +require 'rubygems/command' +require 'rubygems/local_remote_options' +require 'rubygems/version_option' +require 'rubygems/source_info_cache' +require 'rubygems/format' + +class Gem::Commands::SpecificationCommand < Gem::Command + + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize + super 'specification', 'Display gem specification (in yaml)', + :domain => :local, :version => Gem::Requirement.default + + add_version_option('examine') + add_platform_option + + add_option('--all', 'Output specifications for all versions of', + 'the gem') do |value, options| + options[:all] = true + end + + add_local_remote_options + end + + def arguments # :nodoc: + "GEMFILE name of gem to show the gemspec for" + end + + def defaults_str # :nodoc: + "--local --version '#{Gem::Requirement.default}'" + end + + def usage # :nodoc: + "#{program_name} [GEMFILE]" + end + + def execute + specs = [] + gem = get_one_gem_name + dep = Gem::Dependency.new gem, options[:version] + + if local? then + if File.exist? gem then + specs << Gem::Format.from_file_by_path(gem).spec rescue nil + end + + if specs.empty? then + specs.push(*Gem.source_index.search(dep)) + end + end + + if remote? then + found = Gem::SpecFetcher.fetcher.fetch dep + + specs.push(*found.map { |spec,| spec }) + end + + if specs.empty? then + alert_error "Unknown gem '#{gem}'" + terminate_interaction 1 + end + + output = lambda { |s| say s.to_yaml; say "\n" } + + if options[:all] then + specs.each(&output) + else + spec = specs.sort_by { |s| s.version }.last + output[spec] + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/stale_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/stale_command.rb new file mode 100644 index 0000000..78cbdcc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/stale_command.rb @@ -0,0 +1,27 @@ +require 'rubygems/command' + +class Gem::Commands::StaleCommand < Gem::Command + def initialize + super('stale', 'List gems along with access times') + end + + def usage # :nodoc: + "#{program_name}" + end + + def execute + gem_to_atime = {} + Gem.source_index.each do |name, spec| + Dir["#{spec.full_gem_path}/**/*.*"].each do |file| + next if File.directory?(file) + stat = File.stat(file) + gem_to_atime[name] ||= stat.atime + gem_to_atime[name] = stat.atime if gem_to_atime[name] < stat.atime + end + end + + gem_to_atime.sort_by { |_, atime| atime }.each do |name, atime| + say "#{name} at #{atime.strftime '%c'}" + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/uninstall_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/uninstall_command.rb new file mode 100644 index 0000000..3d6e238 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/uninstall_command.rb @@ -0,0 +1,73 @@ +require 'rubygems/command' +require 'rubygems/version_option' +require 'rubygems/uninstaller' + +module Gem + module Commands + class UninstallCommand < Command + + include VersionOption + + def initialize + super 'uninstall', 'Uninstall gems from the local repository', + :version => Gem::Requirement.default + + add_option('-a', '--[no-]all', + 'Uninstall all matching versions' + ) do |value, options| + options[:all] = value + end + + add_option('-I', '--[no-]ignore-dependencies', + 'Ignore dependency requirements while', + 'uninstalling') do |value, options| + options[:ignore] = value + end + + add_option('-x', '--[no-]executables', + 'Uninstall applicable executables without', + 'confirmation') do |value, options| + options[:executables] = value + end + + add_option('-i', '--install-dir DIR', + 'Directory to uninstall gem from') do |value, options| + options[:install_dir] = File.expand_path(value) + end + + add_option('-n', '--bindir DIR', + 'Directory to remove binaries from') do |value, options| + options[:bin_dir] = File.expand_path(value) + end + + add_version_option + add_platform_option + end + + def arguments # :nodoc: + "GEMNAME name of gem to uninstall" + end + + def defaults_str # :nodoc: + "--version '#{Gem::Requirement.default}' --no-force " \ + "--install-dir #{Gem.dir}" + end + + def usage # :nodoc: + "#{program_name} GEMNAME [GEMNAME ...]" + end + + def execute + get_all_gem_names.each do |gem_name| + begin + Gem::Uninstaller.new(gem_name, options).uninstall + rescue Gem::GemNotInHomeException => e + spec = e.spec + alert("In order to remove #{spec.name}, please execute:\n" \ + "\tgem uninstall #{spec.name} --install-dir=#{spec.installation_path}") + end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/unpack_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/unpack_command.rb new file mode 100644 index 0000000..ab2494b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/unpack_command.rb @@ -0,0 +1,95 @@ +require 'fileutils' +require 'rubygems/command' +require 'rubygems/installer' +require 'rubygems/version_option' + +class Gem::Commands::UnpackCommand < Gem::Command + + include Gem::VersionOption + + def initialize + super 'unpack', 'Unpack an installed gem to the current directory', + :version => Gem::Requirement.default, + :target => Dir.pwd + + add_option('--target', 'target directory for unpacking') do |value, options| + options[:target] = value + end + + add_version_option + end + + def arguments # :nodoc: + "GEMNAME name of gem to unpack" + end + + def defaults_str # :nodoc: + "--version '#{Gem::Requirement.default}'" + end + + def usage # :nodoc: + "#{program_name} GEMNAME" + end + + #-- + # TODO: allow, e.g., 'gem unpack rake-0.3.1'. Find a general solution for + # this, so that it works for uninstall as well. (And check other commands + # at the same time.) + def execute + gemname = get_one_gem_name + path = get_path(gemname, options[:version]) + + if path then + basename = File.basename(path).sub(/\.gem$/, '') + target_dir = File.expand_path File.join(options[:target], basename) + FileUtils.mkdir_p target_dir + Gem::Installer.new(path, :unpack => true).unpack target_dir + say "Unpacked gem: '#{target_dir}'" + else + alert_error "Gem '#{gemname}' not installed." + end + end + + # Return the full path to the cached gem file matching the given + # name and version requirement. Returns 'nil' if no match. + # + # Example: + # + # get_path('rake', '> 0.4') # -> '/usr/lib/ruby/gems/1.8/cache/rake-0.4.2.gem' + # get_path('rake', '< 0.1') # -> nil + # get_path('rak') # -> nil (exact name required) + #-- + # TODO: This should be refactored so that it's a general service. I don't + # think any of our existing classes are the right place though. Just maybe + # 'Cache'? + # + # TODO: It just uses Gem.dir for now. What's an easy way to get the list of + # source directories? + def get_path(gemname, version_req) + return gemname if gemname =~ /\.gem$/i + + specs = Gem::source_index.find_name gemname, version_req + + selected = specs.sort_by { |s| s.version }.last + + return nil if selected.nil? + + # We expect to find (basename).gem in the 'cache' directory. + # Furthermore, the name match must be exact (ignoring case). + if gemname =~ /^#{selected.name}$/i + filename = selected.full_name + '.gem' + path = nil + + Gem.path.find do |gem_dir| + path = File.join gem_dir, 'cache', filename + File.exist? path + end + + path + else + nil + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/update_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/update_command.rb new file mode 100644 index 0000000..28d3a5d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/update_command.rb @@ -0,0 +1,181 @@ +require 'rubygems/command' +require 'rubygems/command_manager' +require 'rubygems/install_update_options' +require 'rubygems/local_remote_options' +require 'rubygems/spec_fetcher' +require 'rubygems/version_option' +require 'rubygems/commands/install_command' + +class Gem::Commands::UpdateCommand < Gem::Command + + include Gem::InstallUpdateOptions + include Gem::LocalRemoteOptions + include Gem::VersionOption + + def initialize + super 'update', + 'Update the named gems (or all installed gems) in the local repository', + :generate_rdoc => true, + :generate_ri => true, + :force => false, + :test => false + + add_install_update_options + + add_option('--system', + 'Update the RubyGems system software') do |value, options| + options[:system] = value + end + + add_local_remote_options + + add_platform_option + end + + def arguments # :nodoc: + "GEMNAME name of gem to update" + end + + def defaults_str # :nodoc: + "--rdoc --ri --no-force --no-test --install-dir #{Gem.dir}" + end + + def usage # :nodoc: + "#{program_name} GEMNAME [GEMNAME ...]" + end + + def execute + hig = {} + + if options[:system] then + say "Updating RubyGems" + + unless options[:args].empty? then + fail "No gem names are allowed with the --system option" + end + + rubygems_update = Gem::Specification.new + rubygems_update.name = 'rubygems-update' + rubygems_update.version = Gem::Version.new Gem::RubyGemsVersion + hig['rubygems-update'] = rubygems_update + + options[:user_install] = false + else + say "Updating installed gems" + + hig = {} # highest installed gems + + Gem.source_index.each do |name, spec| + if hig[spec.name].nil? or hig[spec.name].version < spec.version then + hig[spec.name] = spec + end + end + end + + gems_to_update = which_to_update hig, options[:args] + + updated = [] + + installer = Gem::DependencyInstaller.new options + + gems_to_update.uniq.sort.each do |name| + next if updated.any? { |spec| spec.name == name } + + say "Updating #{name}" + installer.install name + + installer.installed_gems.each do |spec| + updated << spec + say "Successfully installed #{spec.full_name}" + end + end + + if gems_to_update.include? "rubygems-update" then + Gem.source_index.refresh! + + update_gems = Gem.source_index.search 'rubygems-update' + + latest_update_gem = update_gems.sort_by { |s| s.version }.last + + say "Updating RubyGems to #{latest_update_gem.version}" + installed = do_rubygems_update latest_update_gem.version + + say "RubyGems system software updated" if installed + else + if updated.empty? then + say "Nothing to update" + else + say "Gems updated: #{updated.map { |spec| spec.name }.join ', '}" + end + end + end + + ## + # Update the RubyGems software to +version+. + + def do_rubygems_update(version) + args = [] + args.push '--prefix', Gem.prefix unless Gem.prefix.nil? + args << '--no-rdoc' unless options[:generate_rdoc] + args << '--no-ri' unless options[:generate_ri] + args << '--no-format-executable' if options[:no_format_executable] + + update_dir = File.join Gem.dir, 'gems', "rubygems-update-#{version}" + + Dir.chdir update_dir do + say "Installing RubyGems #{version}" + setup_cmd = "#{Gem.ruby} setup.rb #{args.join ' '}" + + # Make sure old rubygems isn't loaded + old = ENV["RUBYOPT"] + ENV.delete("RUBYOPT") + system setup_cmd + ENV["RUBYOPT"] = old if old + end + end + + def which_to_update(highest_installed_gems, gem_names) + result = [] + + highest_installed_gems.each do |l_name, l_spec| + next if not gem_names.empty? and + gem_names.all? { |name| /#{name}/ !~ l_spec.name } + + dependency = Gem::Dependency.new l_spec.name, "> #{l_spec.version}" + + begin + fetcher = Gem::SpecFetcher.fetcher + spec_tuples = fetcher.find_matching dependency + rescue Gem::RemoteFetcher::FetchError => e + raise unless fetcher.warn_legacy e do + require 'rubygems/source_info_cache' + + dependency.name = '' if dependency.name == // + + specs = Gem::SourceInfoCache.search_with_source dependency + + spec_tuples = specs.map do |spec, source_uri| + [[spec.name, spec.version, spec.original_platform], source_uri] + end + end + end + + matching_gems = spec_tuples.select do |(name, version, platform),| + name == l_name and Gem::Platform.match platform + end + + highest_remote_gem = matching_gems.sort_by do |(name, version),| + version + end.last + + if highest_remote_gem and + l_spec.version < highest_remote_gem.first[1] then + result << l_name + end + end + + result + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/commands/which_command.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/which_command.rb new file mode 100644 index 0000000..2267e44 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/commands/which_command.rb @@ -0,0 +1,87 @@ +require 'rubygems/command' +require 'rubygems/gem_path_searcher' + +class Gem::Commands::WhichCommand < Gem::Command + + EXT = %w[.rb .rbw .so .dll .bundle] # HACK + + def initialize + super 'which', 'Find the location of a library file you can require', + :search_gems_first => false, :show_all => false + + add_option '-a', '--[no-]all', 'show all matching files' do |show_all, options| + options[:show_all] = show_all + end + + add_option '-g', '--[no-]gems-first', + 'search gems before non-gems' do |gems_first, options| + options[:search_gems_first] = gems_first + end + end + + def arguments # :nodoc: + "FILE name of file to find" + end + + def defaults_str # :nodoc: + "--no-gems-first --no-all" + end + + def usage # :nodoc: + "#{program_name} FILE [FILE ...]" + end + + def execute + searcher = Gem::GemPathSearcher.new + + options[:args].each do |arg| + dirs = $LOAD_PATH + spec = searcher.find arg + + if spec then + if options[:search_gems_first] then + dirs = gem_paths(spec) + $LOAD_PATH + else + dirs = $LOAD_PATH + gem_paths(spec) + end + + say "(checking gem #{spec.full_name} for #{arg})" if + Gem.configuration.verbose + end + + paths = find_paths arg, dirs + + if paths.empty? then + say "Can't find ruby library file or shared library #{arg}" + else + say paths + end + end + end + + def find_paths(package_name, dirs) + result = [] + + dirs.each do |dir| + EXT.each do |ext| + full_path = File.join dir, "#{package_name}#{ext}" + if File.exist? full_path then + result << full_path + return result unless options[:show_all] + end + end + end + + result + end + + def gem_paths(spec) + spec.require_paths.collect { |d| File.join spec.full_gem_path, d } + end + + def usage # :nodoc: + "#{program_name} FILE [...]" + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/config_file.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/config_file.rb new file mode 100644 index 0000000..276a5c1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/config_file.rb @@ -0,0 +1,266 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'yaml' +require 'rubygems' + +# Store the gem command options specified in the configuration file. The +# config file object acts much like a hash. + +class Gem::ConfigFile + + DEFAULT_BACKTRACE = false + DEFAULT_BENCHMARK = false + DEFAULT_BULK_THRESHOLD = 1000 + DEFAULT_VERBOSITY = true + DEFAULT_UPDATE_SOURCES = true + + ## + # For Ruby packagers to set configuration defaults. Set in + # rubygems/defaults/operating_system.rb + + OPERATING_SYSTEM_DEFAULTS = {} + + ## + # For Ruby implementers to set configuration defaults. Set in + # rubygems/defaults/#{RUBY_ENGINE}.rb + + PLATFORM_DEFAULTS = {} + + system_config_path = + begin + require 'Win32API' + + CSIDL_COMMON_APPDATA = 0x0023 + path = 0.chr * 260 + SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', 'L' + SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path + + path.strip + rescue LoadError + '/etc' + end + + SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc' + + # List of arguments supplied to the config file object. + attr_reader :args + + # Where to look for gems + attr_accessor :path + + attr_accessor :home + + # True if we print backtraces on errors. + attr_writer :backtrace + + # True if we are benchmarking this run. + attr_accessor :benchmark + + # Bulk threshold value. If the number of missing gems are above + # this threshold value, then a bulk download technique is used. + attr_accessor :bulk_threshold + + # Verbose level of output: + # * false -- No output + # * true -- Normal output + # * :loud -- Extra output + attr_accessor :verbose + + # True if we want to update the SourceInfoCache every time, false otherwise + attr_accessor :update_sources + + # Create the config file object. +args+ is the list of arguments + # from the command line. + # + # The following command line options are handled early here rather + # than later at the time most command options are processed. + # + # * --config-file and --config-file==NAME -- Obviously these need + # to be handled by the ConfigFile object to ensure we get the + # right config file. + # + # * --backtrace -- Backtrace needs to be turned on early so that + # errors before normal option parsing can be properly handled. + # + # * --debug -- Enable Ruby level debug messages. Handled early + # for the same reason as --backtrace. + # + def initialize(arg_list) + @config_file_name = nil + need_config_file_name = false + + arg_list = arg_list.map do |arg| + if need_config_file_name then + @config_file_name = arg + need_config_file_name = false + nil + elsif arg =~ /^--config-file=(.*)/ then + @config_file_name = $1 + nil + elsif arg =~ /^--config-file$/ then + need_config_file_name = true + nil + else + arg + end + end.compact + + @backtrace = DEFAULT_BACKTRACE + @benchmark = DEFAULT_BENCHMARK + @bulk_threshold = DEFAULT_BULK_THRESHOLD + @verbose = DEFAULT_VERBOSITY + @update_sources = DEFAULT_UPDATE_SOURCES + + operating_system_config = Marshal.load Marshal.dump(OPERATING_SYSTEM_DEFAULTS) + platform_config = Marshal.load Marshal.dump(PLATFORM_DEFAULTS) + system_config = load_file SYSTEM_WIDE_CONFIG_FILE + user_config = load_file config_file_name.dup.untaint + + @hash = operating_system_config.merge platform_config + @hash = @hash.merge system_config + @hash = @hash.merge user_config + + # HACK these override command-line args, which is bad + @backtrace = @hash[:backtrace] if @hash.key? :backtrace + @benchmark = @hash[:benchmark] if @hash.key? :benchmark + @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold + Gem.sources = @hash[:sources] if @hash.key? :sources + @verbose = @hash[:verbose] if @hash.key? :verbose + @update_sources = @hash[:update_sources] if @hash.key? :update_sources + @path = @hash[:gempath] if @hash.key? :gempath + @home = @hash[:gemhome] if @hash.key? :gemhome + + handle_arguments arg_list + end + + def load_file(filename) + begin + YAML.load(File.read(filename)) if filename and File.exist?(filename) + rescue ArgumentError + warn "Failed to load #{config_file_name}" + rescue Errno::EACCES + warn "Failed to load #{config_file_name} due to permissions problem." + end or {} + end + + # True if the backtrace option has been specified, or debug is on. + def backtrace + @backtrace or $DEBUG + end + + # The name of the configuration file. + def config_file_name + @config_file_name || Gem.config_file + end + + # Delegates to @hash + def each(&block) + hash = @hash.dup + hash.delete :update_sources + hash.delete :verbose + hash.delete :benchmark + hash.delete :backtrace + hash.delete :bulk_threshold + + yield :update_sources, @update_sources + yield :verbose, @verbose + yield :benchmark, @benchmark + yield :backtrace, @backtrace + yield :bulk_threshold, @bulk_threshold + + yield 'config_file_name', @config_file_name if @config_file_name + + hash.each(&block) + end + + # Handle the command arguments. + def handle_arguments(arg_list) + @args = [] + + arg_list.each do |arg| + case arg + when /^--(backtrace|traceback)$/ then + @backtrace = true + when /^--bench(mark)?$/ then + @benchmark = true + when /^--debug$/ then + $DEBUG = true + else + @args << arg + end + end + end + + # Really verbose mode gives you extra output. + def really_verbose + case verbose + when true, false, nil then false + else true + end + end + + # to_yaml only overwrites things you can't override on the command line. + def to_yaml # :nodoc: + yaml_hash = {} + yaml_hash[:backtrace] = @hash.key?(:backtrace) ? @hash[:backtrace] : + DEFAULT_BACKTRACE + yaml_hash[:benchmark] = @hash.key?(:benchmark) ? @hash[:benchmark] : + DEFAULT_BENCHMARK + yaml_hash[:bulk_threshold] = @hash.key?(:bulk_threshold) ? + @hash[:bulk_threshold] : DEFAULT_BULK_THRESHOLD + yaml_hash[:sources] = Gem.sources + yaml_hash[:update_sources] = @hash.key?(:update_sources) ? + @hash[:update_sources] : DEFAULT_UPDATE_SOURCES + yaml_hash[:verbose] = @hash.key?(:verbose) ? @hash[:verbose] : + DEFAULT_VERBOSITY + + keys = yaml_hash.keys.map { |key| key.to_s } + keys << 'debug' + re = Regexp.union(*keys) + + @hash.each do |key, value| + key = key.to_s + next if key =~ re + yaml_hash[key.to_s] = value + end + + yaml_hash.to_yaml + end + + # Writes out this config file, replacing its source. + def write + File.open config_file_name, 'w' do |fp| + fp.write self.to_yaml + end + end + + # Return the configuration information for +key+. + def [](key) + @hash[key.to_s] + end + + # Set configuration option +key+ to +value+. + def []=(key, value) + @hash[key.to_s] = value + end + + def ==(other) # :nodoc: + self.class === other and + @backtrace == other.backtrace and + @benchmark == other.benchmark and + @bulk_threshold == other.bulk_threshold and + @verbose == other.verbose and + @update_sources == other.update_sources and + @hash == other.hash + end + + protected + + attr_reader :hash + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/custom_require.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/custom_require.rb new file mode 100755 index 0000000..78c7872 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/custom_require.rb @@ -0,0 +1,46 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +module Kernel + + ## + # The Kernel#require from before RubyGems was loaded. + + alias gem_original_require require + + ## + # When RubyGems is required, Kernel#require is replaced with our own which + # is capable of loading gems on demand. + # + # When you call require 'x', this is what happens: + # * If the file can be loaded from the existing Ruby loadpath, it + # is. + # * Otherwise, installed gems are searched for a file that matches. + # If it's found in gem 'y', that gem is activated (added to the + # loadpath). + # + # The normal require functionality of returning false if + # that file has already been loaded is preserved. + + def require(path) # :doc: + gem_original_require path + rescue LoadError => load_error + if load_error.message =~ /#{Regexp.escape path}\z/ and + spec = Gem.searcher.find(path) then + Gem.activate(spec.name, "= #{spec.version}") + gem_original_require path + else + raise load_error + end + end + + private :require + private :gem_original_require + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/defaults.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/defaults.rb new file mode 100644 index 0000000..7884fad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/defaults.rb @@ -0,0 +1,92 @@ +module Gem + + @post_install_hooks ||= [] + @post_uninstall_hooks ||= [] + @pre_uninstall_hooks ||= [] + @pre_install_hooks ||= [] + + ## + # An Array of the default sources that come with RubyGems + + def self.default_sources + %w[http://gems.rubyforge.org/] + end + + ## + # Default home directory path to be used if an alternate value is not + # specified in the environment + + def self.default_dir + if defined? RUBY_FRAMEWORK_VERSION then + File.join File.dirname(ConfigMap[:sitedir]), 'Gems', + ConfigMap[:ruby_version] + elsif RUBY_VERSION > '1.9' then + File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', + ConfigMap[:ruby_version]) + else + File.join(ConfigMap[:libdir], ruby_engine, 'gems', + ConfigMap[:ruby_version]) + end + end + + ## + # Path for gems in the user's home directory + + def self.user_dir + File.join(Gem.user_home, '.gem', ruby_engine, + ConfigMap[:ruby_version]) + end + + ## + # Default gem load path + + def self.default_path + [user_dir, default_dir] + end + + ## + # Deduce Ruby's --program-prefix and --program-suffix from its install name + + def self.default_exec_format + baseruby = ConfigMap[:BASERUBY] || 'ruby' + ConfigMap[:RUBY_INSTALL_NAME].sub(baseruby, '%s') rescue '%s' + end + + ## + # The default directory for binaries + + def self.default_bindir + if defined? RUBY_FRAMEWORK_VERSION then # mac framework support + '/usr/bin' + else # generic install + ConfigMap[:bindir] + end + end + + ## + # The default system-wide source info cache directory + + def self.default_system_source_cache_dir + File.join Gem.dir, 'source_cache' + end + + ## + # The default user-specific source info cache directory + + def self.default_user_source_cache_dir + File.join Gem.user_home, '.gem', 'source_cache' + end + + ## + # A wrapper around RUBY_ENGINE const that may not be defined + + def self.ruby_engine + if defined? RUBY_ENGINE then + RUBY_ENGINE + else + 'ruby' + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/dependency.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency.rb new file mode 100644 index 0000000..7b9904d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency.rb @@ -0,0 +1,119 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +## +# The Dependency class holds a Gem name and a Gem::Requirement + +class Gem::Dependency + + ## + # Valid dependency types. + #-- + # When this list is updated, be sure to change + # Gem::Specification::CURRENT_SPECIFICATION_VERSION as well. + + TYPES = [ + :development, + :runtime, + ] + + ## + # Dependency name or regular expression. + + attr_accessor :name + + ## + # Dependency type. + + attr_reader :type + + ## + # Dependent versions. + + attr_writer :version_requirements + + ## + # Orders dependencies by name only. + + def <=>(other) + [@name] <=> [other.name] + end + + ## + # Constructs a dependency with +name+ and +requirements+. + + def initialize(name, version_requirements, type=:runtime) + @name = name + + unless TYPES.include? type + raise ArgumentError, "Valid types are #{TYPES.inspect}, not #{@type.inspect}" + end + + @type = type + + @version_requirements = Gem::Requirement.create version_requirements + @version_requirement = nil # Avoid warnings. + end + + def version_requirements + normalize if defined? @version_requirement and @version_requirement + @version_requirements + end + + def requirement_list + version_requirements.as_list + end + + alias requirements_list requirement_list + + def normalize + ver = @version_requirement.instance_eval { @version } + @version_requirements = Gem::Requirement.new([ver]) + @version_requirement = nil + end + + def to_s # :nodoc: + "#{name} (#{version_requirements}, #{@type || :runtime})" + end + + def ==(other) # :nodoc: + self.class === other && + self.name == other.name && + self.type == other.type && + self.version_requirements == other.version_requirements + end + + ## + # Uses this dependency as a pattern to compare to the dependency +other+. + # This dependency will match if the name matches the other's name, and other + # has only an equal version requirement that satisfies this dependency. + + def =~(other) + return false unless self.class === other + + pattern = @name + pattern = /\A#{@name}\Z/ unless Regexp === pattern + + return false unless pattern =~ other.name + + reqs = other.version_requirements.requirements + + return false unless reqs.length == 1 + return false unless reqs.first.first == '=' + + version = reqs.first.last + + version_requirements.satisfied_by? version + end + + def hash # :nodoc: + name.hash + type.hash + version_requirements.hash + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_installer.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_installer.rb new file mode 100644 index 0000000..9ae2659 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_installer.rb @@ -0,0 +1,258 @@ +require 'rubygems' +require 'rubygems/dependency_list' +require 'rubygems/installer' +require 'rubygems/spec_fetcher' +require 'rubygems/user_interaction' + +## +# Installs a gem along with all its dependencies from local and remote gems. + +class Gem::DependencyInstaller + + include Gem::UserInteraction + + attr_reader :gems_to_install + attr_reader :installed_gems + + DEFAULT_OPTIONS = { + :env_shebang => false, + :domain => :both, # HACK dup + :force => false, + :format_executable => false, # HACK dup + :ignore_dependencies => false, + :security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low? + :wrappers => true + } + + ## + # Creates a new installer instance. + # + # Options are: + # :cache_dir:: Alternate repository path to store .gem files in. + # :domain:: :local, :remote, or :both. :local only searches gems in the + # current directory. :remote searches only gems in Gem::sources. + # :both searches both. + # :env_shebang:: See Gem::Installer::new. + # :force:: See Gem::Installer#install. + # :format_executable:: See Gem::Installer#initialize. + # :ignore_dependencies:: Don't install any dependencies. + # :install_dir:: See Gem::Installer#install. + # :security_policy:: See Gem::Installer::new and Gem::Security. + # :user_install:: See Gem::Installer.new + # :wrappers:: See Gem::Installer::new + + def initialize(options = {}) + if options[:install_dir] then + spec_dir = options[:install_dir], 'specifications' + @source_index = Gem::SourceIndex.from_gems_in spec_dir + else + @source_index = Gem.source_index + end + + options = DEFAULT_OPTIONS.merge options + + @bin_dir = options[:bin_dir] + @development = options[:development] + @domain = options[:domain] + @env_shebang = options[:env_shebang] + @force = options[:force] + @format_executable = options[:format_executable] + @ignore_dependencies = options[:ignore_dependencies] + @security_policy = options[:security_policy] + @user_install = options[:user_install] + @wrappers = options[:wrappers] + + @installed_gems = [] + + @install_dir = options[:install_dir] || Gem.dir + @cache_dir = options[:cache_dir] || @install_dir + end + + ## + # Returns a list of pairs of gemspecs and source_uris that match + # Gem::Dependency +dep+ from both local (Dir.pwd) and remote (Gem.sources) + # sources. Gems are sorted with newer gems prefered over older gems, and + # local gems preferred over remote gems. + + def find_gems_with_sources(dep) + gems_and_sources = [] + + if @domain == :both or @domain == :local then + Dir[File.join(Dir.pwd, "#{dep.name}-[0-9]*.gem")].each do |gem_file| + spec = Gem::Format.from_file_by_path(gem_file).spec + gems_and_sources << [spec, gem_file] if spec.name == dep.name + end + end + + if @domain == :both or @domain == :remote then + begin + requirements = dep.version_requirements.requirements.map do |req, ver| + req + end + + all = requirements.length > 1 || + (requirements.first != ">=" and requirements.first != ">") + + found = Gem::SpecFetcher.fetcher.fetch dep, all + gems_and_sources.push(*found) + + rescue Gem::RemoteFetcher::FetchError => e + if Gem.configuration.really_verbose then + say "Error fetching remote data:\t\t#{e.message}" + say "Falling back to local-only install" + end + @domain = :local + end + end + + gems_and_sources.sort_by do |gem, source| + [gem, source =~ /^http:\/\// ? 0 : 1] # local gems win + end + end + + ## + # Gathers all dependencies necessary for the installation from local and + # remote sources unless the ignore_dependencies was given. + + def gather_dependencies + specs = @specs_and_sources.map { |spec,_| spec } + + dependency_list = Gem::DependencyList.new + dependency_list.add(*specs) + + unless @ignore_dependencies then + to_do = specs.dup + seen = {} + + until to_do.empty? do + spec = to_do.shift + next if spec.nil? or seen[spec.name] + seen[spec.name] = true + + deps = spec.runtime_dependencies + deps |= spec.development_dependencies if @development + + deps.each do |dep| + results = find_gems_with_sources(dep).reverse + + results.reject! do |dep_spec,| + to_do.push dep_spec + + @source_index.any? do |_, installed_spec| + dep.name == installed_spec.name and + dep.version_requirements.satisfied_by? installed_spec.version + end + end + + results.each do |dep_spec, source_uri| + next if seen[dep_spec.name] + @specs_and_sources << [dep_spec, source_uri] + dependency_list.add dep_spec + end + end + end + end + + @gems_to_install = dependency_list.dependency_order.reverse + end + + ## + # Finds a spec and the source_uri it came from for gem +gem_name+ and + # +version+. Returns an Array of specs and sources required for + # installation of the gem. + + def find_spec_by_name_and_version gem_name, version = Gem::Requirement.default + spec_and_source = nil + + glob = if File::ALT_SEPARATOR then + gem_name.gsub File::ALT_SEPARATOR, File::SEPARATOR + else + gem_name + end + + local_gems = Dir["#{glob}*"].sort.reverse + + unless local_gems.empty? then + local_gems.each do |gem_file| + next unless gem_file =~ /gem$/ + begin + spec = Gem::Format.from_file_by_path(gem_file).spec + spec_and_source = [spec, gem_file] + break + rescue SystemCallError, Gem::Package::FormatError + end + end + end + + if spec_and_source.nil? then + dep = Gem::Dependency.new gem_name, version + spec_and_sources = find_gems_with_sources(dep).reverse + + spec_and_source = spec_and_sources.find { |spec, source| + Gem::Platform.match spec.platform + } + end + + if spec_and_source.nil? then + raise Gem::GemNotFoundException, + "could not find gem #{gem_name} locally or in a repository" + end + + @specs_and_sources = [spec_and_source] + end + + ## + # Installs the gem and all its dependencies. Returns an Array of installed + # gems specifications. + + def install dep_or_name, version = Gem::Requirement.default + if String === dep_or_name then + find_spec_by_name_and_version dep_or_name, version + else + @specs_and_sources = [find_gems_with_sources(dep_or_name).last] + end + + @installed_gems = [] + + gather_dependencies + + @gems_to_install.each do |spec| + last = spec == @gems_to_install.last + # HACK is this test for full_name acceptable? + next if @source_index.any? { |n,_| n == spec.full_name } and not last + + # TODO: make this sorta_verbose so other users can benefit from it + say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose + + _, source_uri = @specs_and_sources.assoc spec + begin + local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri, + @cache_dir + rescue Gem::RemoteFetcher::FetchError + next if @force + raise + end + + inst = Gem::Installer.new local_gem_path, + :bin_dir => @bin_dir, + :development => @development, + :env_shebang => @env_shebang, + :force => @force, + :format_executable => @format_executable, + :ignore_dependencies => @ignore_dependencies, + :install_dir => @install_dir, + :security_policy => @security_policy, + :source_index => @source_index, + :user_install => @user_install, + :wrappers => @wrappers + + spec = inst.install + + @installed_gems << spec + end + + @installed_gems + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_list.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_list.rb new file mode 100644 index 0000000..a129743 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/dependency_list.rb @@ -0,0 +1,165 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'tsort' + +class Gem::DependencyList + + include TSort + + def self.from_source_index(src_index) + deps = new + + src_index.each do |full_name, spec| + deps.add spec + end + + deps + end + + def initialize + @specs = [] + end + + # Adds +gemspecs+ to the dependency list. + def add(*gemspecs) + @specs.push(*gemspecs) + end + + # Return a list of the specifications in the dependency list, + # sorted in order so that no spec in the list depends on a gem + # earlier in the list. + # + # This is useful when removing gems from a set of installed gems. + # By removing them in the returned order, you don't get into as + # many dependency issues. + # + # If there are circular dependencies (yuck!), then gems will be + # returned in order until only the circular dependents and anything + # they reference are left. Then arbitrary gemspecs will be returned + # until the circular dependency is broken, after which gems will be + # returned in dependency order again. + def dependency_order + sorted = strongly_connected_components.flatten + + result = [] + seen = {} + + sorted.each do |spec| + if index = seen[spec.name] then + if result[index].version < spec.version then + result[index] = spec + end + else + seen[spec.name] = result.length + result << spec + end + end + + result.reverse + end + + def find_name(full_name) + @specs.find { |spec| spec.full_name == full_name } + end + + # Are all the dependencies in the list satisfied? + def ok? + @specs.all? do |spec| + spec.runtime_dependencies.all? do |dep| + @specs.find { |s| s.satisfies_requirement? dep } + end + end + end + + # Is is ok to remove a gem from the dependency list? + # + # If removing the gemspec creates breaks a currently ok dependency, + # then it is NOT ok to remove the gem. + def ok_to_remove?(full_name) + gem_to_remove = find_name full_name + + siblings = @specs.find_all { |s| + s.name == gem_to_remove.name && + s.full_name != gem_to_remove.full_name + } + + deps = [] + + @specs.each do |spec| + spec.dependencies.each do |dep| + deps << dep if gem_to_remove.satisfies_requirement?(dep) + end + end + + deps.all? { |dep| + siblings.any? { |s| + s.satisfies_requirement? dep + } + } + end + + def remove_by_name(full_name) + @specs.delete_if { |spec| spec.full_name == full_name } + end + + # Return a hash of predecessors. result[spec] is an + # Array of gemspecs that have a dependency satisfied by the named + # spec. + def spec_predecessors + result = Hash.new { |h,k| h[k] = [] } + + specs = @specs.sort.reverse + + specs.each do |spec| + specs.each do |other| + next if spec == other + + other.dependencies.each do |dep| + if spec.satisfies_requirement? dep then + result[spec] << other + end + end + end + end + + result + end + + def tsort_each_node(&block) + @specs.each(&block) + end + + def tsort_each_child(node, &block) + specs = @specs.sort.reverse + + node.dependencies.each do |dep| + specs.each do |spec| + if spec.satisfies_requirement? dep then + begin + yield spec + rescue TSort::Cyclic + end + break + end + end + end + end + + private + + # Count the number of gemspecs in the list +specs+ that are not in + # +ignored+. + def active_count(specs, ignored) + result = 0 + specs.each do |spec| + result += 1 unless ignored[spec.full_name] + end + result + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/digest/digest_adapter.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/digest_adapter.rb new file mode 100755 index 0000000..d5a00b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/digest_adapter.rb @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +module Gem + + # There is an incompatibility between the way Ruby 1.8.5 and 1.8.6 + # handles digests. This DigestAdapter will take a pre-1.8.6 digest + # and adapt it to the 1.8.6 API. + # + # Note that only the digest and hexdigest methods are adapted, + # since these are the only functions used by Gems. + # + class DigestAdapter + + # Initialize a digest adapter. + def initialize(digest_class) + @digest_class = digest_class + end + + # Return a new digester. Since we are only implementing the stateless + # methods, we will return ourself as the instance. + def new + self + end + + # Return the digest of +string+ as a hex string. + def hexdigest(string) + @digest_class.new(string).hexdigest + end + + # Return the digest of +string+ as a binary string. + def digest(string) + @digest_class.new(string).digest + end + end +end \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/digest/md5.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/md5.rb new file mode 100755 index 0000000..f924579 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/md5.rb @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'digest/md5' + +# :stopdoc: +module Gem + if RUBY_VERSION >= '1.8.6' + MD5 = Digest::MD5 + else + require 'rubygems/digest/digest_adapter' + MD5 = DigestAdapter.new(Digest::MD5) + def MD5.md5(string) + self.hexdigest(string) + end + end +end +# :startdoc: + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha1.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha1.rb new file mode 100755 index 0000000..2a6245d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha1.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'digest/sha1' + +module Gem + if RUBY_VERSION >= '1.8.6' + SHA1 = Digest::SHA1 + else + require 'rubygems/digest/digest_adapter' + SHA1 = DigestAdapter.new(Digest::SHA1) + end +end \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha2.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha2.rb new file mode 100755 index 0000000..7bef16a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/digest/sha2.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'digest/sha2' + +module Gem + if RUBY_VERSION >= '1.8.6' + SHA256 = Digest::SHA256 + else + require 'rubygems/digest/digest_adapter' + SHA256 = DigestAdapter.new(Digest::SHA256) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/doc_manager.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/doc_manager.rb new file mode 100644 index 0000000..00ef4c5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/doc_manager.rb @@ -0,0 +1,214 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'fileutils' +require 'rubygems' + +## +# The documentation manager generates RDoc and RI for RubyGems. + +class Gem::DocManager + + include Gem::UserInteraction + + @configured_args = [] + + def self.configured_args + @configured_args ||= [] + end + + def self.configured_args=(args) + case args + when Array + @configured_args = args + when String + @configured_args = args.split + end + end + + ## + # Load RDoc from a gem if it is available, otherwise from Ruby's stdlib + + def self.load_rdoc + begin + gem 'rdoc' + rescue Gem::LoadError + # use built-in RDoc + end + + begin + require 'rdoc/rdoc' + rescue LoadError => e + raise Gem::DocumentError, + "ERROR: RDoc documentation generator not installed!" + end + end + + ## + # Updates the RI cache for RDoc 2 if it is installed + + def self.update_ri_cache + load_rdoc rescue return + + return unless defined? RDoc::VERSION # RDoc 1 does not have VERSION + + require 'rdoc/ri/driver' + + options = { + :use_cache => true, + :use_system => true, + :use_site => true, + :use_home => true, + :use_gems => true, + :formatter => RDoc::RI::Formatter, + } + + driver = RDoc::RI::Driver.new(options).class_cache + end + + ## + # Create a document manager for +spec+. +rdoc_args+ contains arguments for + # RDoc (template etc.) as a String. + + def initialize(spec, rdoc_args="") + @spec = spec + @doc_dir = File.join(spec.installation_path, "doc", spec.full_name) + @rdoc_args = rdoc_args.nil? ? [] : rdoc_args.split + end + + ## + # Is the RDoc documentation installed? + + def rdoc_installed? + File.exist?(File.join(@doc_dir, "rdoc")) + end + + ## + # Generate the RI documents for this gem spec. + # + # Note that if both RI and RDoc documents are generated from the same + # process, the RI docs should be done first (a likely bug in RDoc will cause + # RI docs generation to fail if run after RDoc). + + def generate_ri + if @spec.has_rdoc then + setup_rdoc + install_ri # RDoc bug, ri goes first + end + + FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir) + end + + ## + # Generate the RDoc documents for this gem spec. + # + # Note that if both RI and RDoc documents are generated from the same + # process, the RI docs should be done first (a likely bug in RDoc will cause + # RI docs generation to fail if run after RDoc). + + def generate_rdoc + if @spec.has_rdoc then + setup_rdoc + install_rdoc + end + + FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir) + end + + ## + # Generate and install RDoc into the documentation directory + + def install_rdoc + rdoc_dir = File.join @doc_dir, 'rdoc' + + FileUtils.rm_rf rdoc_dir + + say "Installing RDoc documentation for #{@spec.full_name}..." + run_rdoc '--op', rdoc_dir + end + + ## + # Generate and install RI into the documentation directory + + def install_ri + ri_dir = File.join @doc_dir, 'ri' + + FileUtils.rm_rf ri_dir + + say "Installing ri documentation for #{@spec.full_name}..." + run_rdoc '--ri', '--op', ri_dir + end + + ## + # Run RDoc with +args+, which is an ARGV style argument list + + def run_rdoc(*args) + args << @spec.rdoc_options + args << self.class.configured_args + args << '--quiet' + args << @spec.require_paths.clone + args << @spec.extra_rdoc_files + args = args.flatten.map do |arg| arg.to_s end + + r = RDoc::RDoc.new + + old_pwd = Dir.pwd + Dir.chdir(@spec.full_gem_path) + begin + r.document args + rescue Errno::EACCES => e + dirname = File.dirname e.message.split("-")[1].strip + raise Gem::FilePermissionError.new(dirname) + rescue RuntimeError => ex + alert_error "While generating documentation for #{@spec.full_name}" + ui.errs.puts "... MESSAGE: #{ex}" + ui.errs.puts "... RDOC args: #{args.join(' ')}" + ui.errs.puts "\t#{ex.backtrace.join "\n\t"}" if + Gem.configuration.backtrace + ui.errs.puts "(continuing with the rest of the installation)" + ensure + Dir.chdir(old_pwd) + end + end + + def setup_rdoc + if File.exist?(@doc_dir) && !File.writable?(@doc_dir) then + raise Gem::FilePermissionError.new(@doc_dir) + end + + FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir) + + self.class.load_rdoc + end + + ## + # Remove RDoc and RI documentation + + def uninstall_doc + raise Gem::FilePermissionError.new(@spec.installation_path) unless + File.writable? @spec.installation_path + + original_name = [ + @spec.name, @spec.version, @spec.original_platform].join '-' + + doc_dir = File.join @spec.installation_path, 'doc', @spec.full_name + unless File.directory? doc_dir then + doc_dir = File.join @spec.installation_path, 'doc', original_name + end + + FileUtils.rm_rf doc_dir + + ri_dir = File.join @spec.installation_path, 'ri', @spec.full_name + + unless File.directory? ri_dir then + ri_dir = File.join @spec.installation_path, 'ri', original_name + end + + FileUtils.rm_rf ri_dir + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/exceptions.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/exceptions.rb new file mode 100644 index 0000000..c37507c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/exceptions.rb @@ -0,0 +1,84 @@ +require 'rubygems' + +## +# Base exception class for RubyGems. All exception raised by RubyGems are a +# subclass of this one. +class Gem::Exception < RuntimeError; end + +class Gem::CommandLineError < Gem::Exception; end + +class Gem::DependencyError < Gem::Exception; end + +class Gem::DependencyRemovalException < Gem::Exception; end + +## +# Raised when attempting to uninstall a gem that isn't in GEM_HOME. + +class Gem::GemNotInHomeException < Gem::Exception + attr_accessor :spec +end + +class Gem::DocumentError < Gem::Exception; end + +## +# Potentially raised when a specification is validated. +class Gem::EndOfYAMLException < Gem::Exception; end + +## +# Signals that a file permission error is preventing the user from +# installing in the requested directories. +class Gem::FilePermissionError < Gem::Exception + def initialize(path) + super("You don't have write permissions into the #{path} directory.") + end +end + +## +# Used to raise parsing and loading errors +class Gem::FormatException < Gem::Exception + attr_accessor :file_path +end + +class Gem::GemNotFoundException < Gem::Exception; end + +class Gem::InstallError < Gem::Exception; end + +## +# Potentially raised when a specification is validated. +class Gem::InvalidSpecificationException < Gem::Exception; end + +class Gem::OperationNotSupportedError < Gem::Exception; end + +## +# Signals that a remote operation cannot be conducted, probably due to not +# being connected (or just not finding host). +#-- +# TODO: create a method that tests connection to the preferred gems server. +# All code dealing with remote operations will want this. Failure in that +# method should raise this error. +class Gem::RemoteError < Gem::Exception; end + +class Gem::RemoteInstallationCancelled < Gem::Exception; end + +class Gem::RemoteInstallationSkipped < Gem::Exception; end + +## +# Represents an error communicating via HTTP. +class Gem::RemoteSourceException < Gem::Exception; end + +class Gem::VerificationError < Gem::Exception; end + +## +# Raised to indicate that a system exit should occur with the specified +# exit_code + +class Gem::SystemExitException < SystemExit + attr_accessor :exit_code + + def initialize(exit_code) + @exit_code = exit_code + + super "Exiting RubyGems with exit_code #{exit_code}" + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/ext.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/ext.rb new file mode 100644 index 0000000..97ee762 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/ext.rb @@ -0,0 +1,18 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +## +# Classes for building C extensions live here. + +module Gem::Ext; end + +require 'rubygems/ext/builder' +require 'rubygems/ext/configure_builder' +require 'rubygems/ext/ext_conf_builder' +require 'rubygems/ext/rake_builder' + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/ext/builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/builder.rb new file mode 100644 index 0000000..36e9ec1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/builder.rb @@ -0,0 +1,56 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/ext' + +class Gem::Ext::Builder + + def self.class_name + name =~ /Ext::(.*)Builder/ + $1.downcase + end + + def self.make(dest_path, results) + unless File.exist? 'Makefile' then + raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}" + end + + mf = File.read('Makefile') + mf = mf.gsub(/^RUBYARCHDIR\s*=\s*\$[^$]*/, "RUBYARCHDIR = #{dest_path}") + mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}") + + File.open('Makefile', 'wb') {|f| f.print mf} + + make_program = ENV['make'] + unless make_program then + make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make' + end + + ['', ' install'].each do |target| + cmd = "#{make_program}#{target}" + results << cmd + results << `#{cmd} #{redirector}` + + raise Gem::InstallError, "make#{target} failed:\n\n#{results}" unless + $?.success? + end + end + + def self.redirector + '2>&1' + end + + def self.run(command, results) + results << command + results << `#{command} #{redirector}` + + unless $?.success? then + raise Gem::InstallError, "#{class_name} failed:\n\n#{results.join "\n"}" + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/ext/configure_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/configure_builder.rb new file mode 100644 index 0000000..1cde691 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/configure_builder.rb @@ -0,0 +1,24 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/ext/builder' + +class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder + + def self.build(extension, directory, dest_path, results) + unless File.exist?('Makefile') then + cmd = "sh ./configure --prefix=#{dest_path}" + + run cmd, results + end + + make dest_path, results + + results + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/ext/ext_conf_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/ext_conf_builder.rb new file mode 100644 index 0000000..cbe0e80 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/ext_conf_builder.rb @@ -0,0 +1,23 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/ext/builder' + +class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder + + def self.build(extension, directory, dest_path, results) + cmd = "#{Gem.ruby} #{File.basename extension}" + cmd << " #{ARGV.join ' '}" unless ARGV.empty? + + run cmd, results + + make dest_path, results + + results + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/ext/rake_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/rake_builder.rb new file mode 100644 index 0000000..0c64e61 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/ext/rake_builder.rb @@ -0,0 +1,27 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/ext/builder' + +class Gem::Ext::RakeBuilder < Gem::Ext::Builder + + def self.build(extension, directory, dest_path, results) + if File.basename(extension) =~ /mkrf_conf/i then + cmd = "#{Gem.ruby} #{File.basename extension}" + cmd << " #{ARGV.join " "}" unless ARGV.empty? + run cmd, results + end + + cmd = ENV['rake'] || 'rake' + cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen + + run cmd, results + + results + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/format.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/format.rb new file mode 100644 index 0000000..7dc127d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/format.rb @@ -0,0 +1,87 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'fileutils' + +require 'rubygems/package' + +module Gem + + ## + # The format class knows the guts of the RubyGem .gem file format + # and provides the capability to read gem files + # + class Format + attr_accessor :spec, :file_entries, :gem_path + extend Gem::UserInteraction + + ## + # Constructs an instance of a Format object, representing the gem's + # data structure. + # + # gem:: [String] The file name of the gem + # + def initialize(gem_path) + @gem_path = gem_path + end + + ## + # Reads the named gem file and returns a Format object, representing + # the data from the gem file + # + # file_path:: [String] Path to the gem file + # + def self.from_file_by_path(file_path, security_policy = nil) + format = nil + + unless File.exist?(file_path) + raise Gem::Exception, "Cannot load gem at [#{file_path}] in #{Dir.pwd}" + end + + # check for old version gem + if File.read(file_path, 20).include?("MD5SUM =") + require 'rubygems/old_format' + + format = OldFormat.from_file_by_path(file_path) + else + open file_path, Gem.binary_mode do |io| + format = from_io io, file_path, security_policy + end + end + + return format + end + + ## + # Reads a gem from an io stream and returns a Format object, representing + # the data from the gem file + # + # io:: [IO] Stream from which to read the gem + # + def self.from_io(io, gem_path="(io)", security_policy = nil) + format = new gem_path + + Package.open io, 'r', security_policy do |pkg| + format.spec = pkg.metadata + format.file_entries = [] + + pkg.each do |entry| + size = entry.header.size + mode = entry.header.mode + + format.file_entries << [{ + "size" => size, "mode" => mode, "path" => entry.full_name, + }, + entry.read + ] + end + end + + format + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/gem_openssl.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_openssl.rb new file mode 100644 index 0000000..1456f2d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_openssl.rb @@ -0,0 +1,83 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +# Some system might not have OpenSSL installed, therefore the core +# library file openssl might not be available. We localize testing +# for the presence of OpenSSL in this file. + +module Gem + class << self + # Is SSL (used by the signing commands) available on this + # platform? + def ssl_available? + require 'rubygems/gem_openssl' + @ssl_available + end + + # Set the value of the ssl_available flag. + attr_writer :ssl_available + + # Ensure that SSL is available. Throw an exception if it is not. + def ensure_ssl_available + unless ssl_available? + fail Gem::Exception, "SSL is not installed on this system" + end + end + end +end + +begin + require 'openssl' + + # Reference a constant defined in the .rb portion of ssl (just to + # make sure that part is loaded too). + + dummy = OpenSSL::Digest::SHA1 + + Gem.ssl_available = true + + class OpenSSL::X509::Certificate # :nodoc: + # Check the validity of this certificate. + def check_validity(issuer_cert = nil, time = Time.now) + ret = if @not_before && @not_before > time + [false, :expired, "not valid before '#@not_before'"] + elsif @not_after && @not_after < time + [false, :expired, "not valid after '#@not_after'"] + elsif issuer_cert && !verify(issuer_cert.public_key) + [false, :issuer, "#{issuer_cert.subject} is not issuer"] + else + [true, :ok, 'Valid certificate'] + end + + # return hash + { :is_valid => ret[0], :error => ret[1], :desc => ret[2] } + end + end + +rescue LoadError, StandardError + Gem.ssl_available = false +end + +module Gem::SSL + + # We make our own versions of the constants here. This allows us + # to reference the constants, even though some systems might not + # have SSL installed in the Ruby core package. + # + # These constants are only used during load time. At runtime, any + # method that makes a direct reference to SSL software must be + # protected with a Gem.ensure_ssl_available call. + # + if Gem.ssl_available? then + PKEY_RSA = OpenSSL::PKey::RSA + DIGEST_SHA1 = OpenSSL::Digest::SHA1 + else + PKEY_RSA = :rsa + DIGEST_SHA1 = :sha1 + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/gem_path_searcher.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_path_searcher.rb new file mode 100644 index 0000000..e2b8543 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_path_searcher.rb @@ -0,0 +1,100 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +## +# GemPathSearcher has the capability to find loadable files inside +# gems. It generates data up front to speed up searches later. + +class Gem::GemPathSearcher + + ## + # Initialise the data we need to make searches later. + + def initialize + # We want a record of all the installed gemspecs, in the order + # we wish to examine them. + @gemspecs = init_gemspecs + # Map gem spec to glob of full require_path directories. + # Preparing this information may speed up searches later. + @lib_dirs = {} + @gemspecs.each do |spec| + @lib_dirs[spec.object_id] = lib_dirs_for(spec) + end + end + + ## + # Look in all the installed gems until a matching _path_ is found. + # Return the _gemspec_ of the gem where it was found. If no match + # is found, return nil. + # + # The gems are searched in alphabetical order, and in reverse + # version order. + # + # For example: + # + # find('log4r') # -> (log4r-1.1 spec) + # find('log4r.rb') # -> (log4r-1.1 spec) + # find('rake/rdoctask') # -> (rake-0.4.12 spec) + # find('foobarbaz') # -> nil + # + # Matching paths can have various suffixes ('.rb', '.so', and + # others), which may or may not already be attached to _file_. + # This method doesn't care about the full filename that matches; + # only that there is a match. + + def find(path) + @gemspecs.find do |spec| matching_file? spec, path end + end + + ## + # Works like #find, but finds all gemspecs matching +path+. + + def find_all(path) + @gemspecs.select do |spec| + matching_file? spec, path + end + end + + ## + # Attempts to find a matching path using the require_paths of the given + # +spec+. + + def matching_file?(spec, path) + !matching_files(spec, path).empty? + end + + ## + # Returns files matching +path+ in +spec+. + #-- + # Some of the intermediate results are cached in @lib_dirs for speed. + + def matching_files(spec, path) + glob = File.join @lib_dirs[spec.object_id], "#{path}#{Gem.suffix_pattern}" + Dir[glob].select { |f| File.file? f.untaint } + end + + ## + # Return a list of all installed gemspecs, sorted by alphabetical order and + # in reverse version order. + + def init_gemspecs + Gem.source_index.map { |_, spec| spec }.sort { |a,b| + (a.name <=> b.name).nonzero? || (b.version <=> a.version) + } + end + + ## + # Returns library directories glob for a gemspec. For example, + # '/usr/local/lib/ruby/gems/1.8/gems/foobar-1.0/{lib,ext}' + + def lib_dirs_for(spec) + "#{spec.full_gem_path}/{#{spec.require_paths.join(',')}}" + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/gem_runner.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_runner.rb new file mode 100644 index 0000000..5f91398 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/gem_runner.rb @@ -0,0 +1,58 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/command_manager' +require 'rubygems/config_file' +require 'rubygems/doc_manager' + +module Gem + + #################################################################### + # Run an instance of the gem program. + # + class GemRunner + + def initialize(options={}) + @command_manager_class = options[:command_manager] || Gem::CommandManager + @config_file_class = options[:config_file] || Gem::ConfigFile + @doc_manager_class = options[:doc_manager] || Gem::DocManager + end + + # Run the gem command with the following arguments. + def run(args) + start_time = Time.now + do_configuration(args) + cmd = @command_manager_class.instance + cmd.command_names.each do |command_name| + config_args = Gem.configuration[command_name] + config_args = case config_args + when String + config_args.split ' ' + else + Array(config_args) + end + Command.add_specific_extra_args command_name, config_args + end + cmd.run(Gem.configuration.args) + end_time = Time.now + if Gem.configuration.benchmark + printf "\nExecution time: %0.2f seconds.\n", end_time-start_time + puts "Press Enter to finish" + STDIN.gets + end + end + + private + + def do_configuration(args) + Gem.configuration = @config_file_class.new(args) + Gem.use_paths(Gem.configuration[:gemhome], Gem.configuration[:gempath]) + Gem::Command.extra_args = Gem.configuration[:gem] + @doc_manager_class.configured_args = Gem.configuration[:rdoc] + end + + end # class +end # module diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer.rb new file mode 100644 index 0000000..e2dd57d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer.rb @@ -0,0 +1,370 @@ +require 'fileutils' +require 'tmpdir' +require 'zlib' + +require 'rubygems' +require 'rubygems/format' + +begin + require 'builder/xchar' +rescue LoadError +end + +## +# Top level class for building the gem repository index. + +class Gem::Indexer + + include Gem::UserInteraction + + ## + # Index install location + + attr_reader :dest_directory + + ## + # Index build directory + + attr_reader :directory + + ## + # Create an indexer that will index the gems in +directory+. + + def initialize(directory) + unless ''.respond_to? :to_xs then + fail "Gem::Indexer requires that the XML Builder library be installed:" \ + "\n\tgem install builder" + end + + @dest_directory = directory + @directory = File.join Dir.tmpdir, "gem_generate_index_#{$$}" + + marshal_name = "Marshal.#{Gem.marshal_version}" + + @master_index = File.join @directory, 'yaml' + @marshal_index = File.join @directory, marshal_name + + @quick_dir = File.join @directory, 'quick' + + @quick_marshal_dir = File.join @quick_dir, marshal_name + + @quick_index = File.join @quick_dir, 'index' + @latest_index = File.join @quick_dir, 'latest_index' + + @specs_index = File.join @directory, "specs.#{Gem.marshal_version}" + @latest_specs_index = File.join @directory, + "latest_specs.#{Gem.marshal_version}" + + files = [ + @specs_index, + "#{@specs_index}.gz", + @latest_specs_index, + "#{@latest_specs_index}.gz", + @quick_dir, + @master_index, + "#{@master_index}.Z", + @marshal_index, + "#{@marshal_index}.Z", + ] + + @files = files.map do |path| + path.sub @directory, '' + end + end + + ## + # Abbreviate the spec for downloading. Abbreviated specs are only used for + # searching, downloading and related activities and do not need deployment + # specific information (e.g. list of files). So we abbreviate the spec, + # making it much smaller for quicker downloads. + + def abbreviate(spec) + spec.files = [] + spec.test_files = [] + spec.rdoc_options = [] + spec.extra_rdoc_files = [] + spec.cert_chain = [] + spec + end + + ## + # Build various indicies + + def build_indicies(index) + progress = ui.progress_reporter index.size, + "Generating quick index gemspecs for #{index.size} gems", + "Complete" + + index.each do |original_name, spec| + spec_file_name = "#{original_name}.gemspec.rz" + yaml_name = File.join @quick_dir, spec_file_name + marshal_name = File.join @quick_marshal_dir, spec_file_name + + yaml_zipped = Gem.deflate spec.to_yaml + open yaml_name, 'wb' do |io| io.write yaml_zipped end + + marshal_zipped = Gem.deflate Marshal.dump(spec) + open marshal_name, 'wb' do |io| io.write marshal_zipped end + + progress.updated original_name + end + + progress.done + + say "Generating specs index" + + open @specs_index, 'wb' do |io| + specs = index.sort.map do |_, spec| + platform = spec.original_platform + platform = Gem::Platform::RUBY if platform.nil? or platform.empty? + [spec.name, spec.version, platform] + end + + specs = compact_specs specs + + Marshal.dump specs, io + end + + say "Generating latest specs index" + + open @latest_specs_index, 'wb' do |io| + specs = index.latest_specs.sort.map do |spec| + platform = spec.original_platform + platform = Gem::Platform::RUBY if platform.nil? or platform.empty? + [spec.name, spec.version, platform] + end + + specs = compact_specs specs + + Marshal.dump specs, io + end + + say "Generating quick index" + + quick_index = File.join @quick_dir, 'index' + open quick_index, 'wb' do |io| + io.puts index.sort.map { |_, spec| spec.original_name } + end + + say "Generating latest index" + + latest_index = File.join @quick_dir, 'latest_index' + open latest_index, 'wb' do |io| + io.puts index.latest_specs.sort.map { |spec| spec.original_name } + end + + say "Generating Marshal master index" + + open @marshal_index, 'wb' do |io| + io.write index.dump + end + + progress = ui.progress_reporter index.size, + "Generating YAML master index for #{index.size} gems (this may take a while)", + "Complete" + + open @master_index, 'wb' do |io| + io.puts "--- !ruby/object:#{index.class}" + io.puts "gems:" + + gems = index.sort_by { |name, gemspec| gemspec.sort_obj } + gems.each do |original_name, gemspec| + yaml = gemspec.to_yaml.gsub(/^/, ' ') + yaml = yaml.sub(/\A ---/, '') # there's a needed extra ' ' here + io.print " #{original_name}:" + io.puts yaml + + progress.updated original_name + end + end + + progress.done + + say "Compressing indicies" + # use gzip for future files. + + compress quick_index, 'rz' + paranoid quick_index, 'rz' + + compress latest_index, 'rz' + paranoid latest_index, 'rz' + + compress @marshal_index, 'Z' + paranoid @marshal_index, 'Z' + + compress @master_index, 'Z' + paranoid @master_index, 'Z' + + gzip @specs_index + gzip @latest_specs_index + end + + ## + # Collect specifications from .gem files from the gem directory. + + def collect_specs + index = Gem::SourceIndex.new + + progress = ui.progress_reporter gem_file_list.size, + "Loading #{gem_file_list.size} gems from #{@dest_directory}", + "Loaded all gems" + + gem_file_list.each do |gemfile| + if File.size(gemfile.to_s) == 0 then + alert_warning "Skipping zero-length gem: #{gemfile}" + next + end + + begin + spec = Gem::Format.from_file_by_path(gemfile).spec + + unless gemfile =~ /\/#{Regexp.escape spec.original_name}.*\.gem\z/i then + alert_warning "Skipping misnamed gem: #{gemfile} => #{spec.full_name} (#{spec.original_name})" + next + end + + abbreviate spec + sanitize spec + + index.gems[spec.original_name] = spec + + progress.updated spec.original_name + + rescue SignalException => e + alert_error "Received signal, exiting" + raise + rescue Exception => e + alert_error "Unable to process #{gemfile}\n#{e.message} (#{e.class})\n\t#{e.backtrace.join "\n\t"}" + end + end + + progress.done + + index + end + + ## + # Compacts Marshal output for the specs index data source by using identical + # objects as much as possible. + + def compact_specs(specs) + names = {} + versions = {} + platforms = {} + + specs.map do |(name, version, platform)| + names[name] = name unless names.include? name + versions[version] = version unless versions.include? version + platforms[platform] = platform unless platforms.include? platform + + [names[name], versions[version], platforms[platform]] + end + end + + ## + # Compress +filename+ with +extension+. + + def compress(filename, extension) + data = Gem.read_binary filename + + zipped = Gem.deflate data + + open "#{filename}.#{extension}", 'wb' do |io| + io.write zipped + end + end + + ## + # List of gem file names to index. + + def gem_file_list + Dir.glob(File.join(@dest_directory, "gems", "*.gem")) + end + + ## + # Builds and installs indexicies. + + def generate_index + make_temp_directories + index = collect_specs + build_indicies index + install_indicies + rescue SignalException + ensure + FileUtils.rm_rf @directory + end + + ## + # Zlib::GzipWriter wrapper that gzips +filename+ on disk. + + def gzip(filename) + Zlib::GzipWriter.open "#{filename}.gz" do |io| + io.write Gem.read_binary(filename) + end + end + + ## + # Install generated indicies into the destination directory. + + def install_indicies + verbose = Gem.configuration.really_verbose + + say "Moving index into production dir #{@dest_directory}" if verbose + + @files.each do |file| + src_name = File.join @directory, file + dst_name = File.join @dest_directory, file + + FileUtils.rm_rf dst_name, :verbose => verbose + FileUtils.mv src_name, @dest_directory, :verbose => verbose, + :force => true + end + end + + ## + # Make directories for index generation + + def make_temp_directories + FileUtils.rm_rf @directory + FileUtils.mkdir_p @directory, :mode => 0700 + FileUtils.mkdir_p @quick_marshal_dir + end + + ## + # Ensure +path+ and path with +extension+ are identical. + + def paranoid(path, extension) + data = Gem.read_binary path + compressed_data = Gem.read_binary "#{path}.#{extension}" + + unless data == Gem.inflate(compressed_data) then + raise "Compressed file #{compressed_path} does not match uncompressed file #{path}" + end + end + + ## + # Sanitize the descriptive fields in the spec. Sometimes non-ASCII + # characters will garble the site index. Non-ASCII characters will + # be replaced by their XML entity equivalent. + + def sanitize(spec) + spec.summary = sanitize_string(spec.summary) + spec.description = sanitize_string(spec.description) + spec.post_install_message = sanitize_string(spec.post_install_message) + spec.authors = spec.authors.collect { |a| sanitize_string(a) } + + spec + end + + ## + # Sanitize a single string. + + def sanitize_string(string) + # HACK the #to_s is in here because RSpec has an Array of Arrays of + # Strings for authors. Need a way to disallow bad values on gempsec + # generation. (Probably won't happen.) + string ? string.to_s.to_xs : string + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/abstract_index_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/abstract_index_builder.rb new file mode 100644 index 0000000..5815dcd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/abstract_index_builder.rb @@ -0,0 +1,88 @@ +require 'zlib' + +require 'rubygems/indexer' + +# Abstract base class for building gem indicies. Uses the template pattern +# with subclass specialization in the +begin_index+, +end_index+ and +cleanup+ +# methods. +class Gem::Indexer::AbstractIndexBuilder + + # Directory to put index files in + attr_reader :directory + + # File name of the generated index + attr_reader :filename + + # List of written files/directories to move into production + attr_reader :files + + def initialize(filename, directory) + @filename = filename + @directory = directory + @files = [] + end + + ## + # Build a Gem index. Yields to block to handle the details of the + # actual building. Calls +begin_index+, +end_index+ and +cleanup+ at + # appropriate times to customize basic operations. + + def build + FileUtils.mkdir_p @directory unless File.exist? @directory + raise "not a directory: #{@directory}" unless File.directory? @directory + + file_path = File.join @directory, @filename + + @files << @filename + + File.open file_path, "wb" do |file| + @file = file + start_index + yield + end_index + end + + cleanup + ensure + @file = nil + end + + ## + # Compress the given file. + + def compress(filename, ext="rz") + data = open filename, 'rb' do |fp| fp.read end + + zipped = zip data + + File.open "#{filename}.#{ext}", "wb" do |file| + file.write zipped + end + end + + # Called immediately before the yield in build. The index file is open and + # available as @file. + def start_index + end + + # Called immediately after the yield in build. The index file is still open + # and available as @file. + def end_index + end + + # Called from within builder after the index file has been closed. + def cleanup + end + + # Return an uncompressed version of a compressed string. + def unzip(string) + Zlib::Inflate.inflate(string) + end + + # Return a compressed version of the given string. + def zip(string) + Zlib::Deflate.deflate(string) + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/latest_index_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/latest_index_builder.rb new file mode 100644 index 0000000..a579858 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/latest_index_builder.rb @@ -0,0 +1,35 @@ +require 'rubygems/indexer' + +## +# Construct the latest Gem index file. + +class Gem::Indexer::LatestIndexBuilder < Gem::Indexer::AbstractIndexBuilder + + def start_index + super + + @index = Gem::SourceIndex.new + end + + def end_index + super + + latest = @index.latest_specs.sort.map { |spec| spec.original_name } + + @file.write latest.join("\n") + end + + def cleanup + super + + compress @file.path + + @files.delete 'latest_index' # HACK installed via QuickIndexBuilder :/ + end + + def add(spec) + @index.add_spec(spec) + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/marshal_index_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/marshal_index_builder.rb new file mode 100644 index 0000000..e1a4d9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/marshal_index_builder.rb @@ -0,0 +1,17 @@ +require 'rubygems/indexer' + +# Construct the master Gem index file. +class Gem::Indexer::MarshalIndexBuilder < Gem::Indexer::MasterIndexBuilder + def end_index + gems = {} + index = Gem::SourceIndex.new + + @index.each do |name, gemspec| + gems[gemspec.original_name] = gemspec + end + + index.instance_variable_get(:@gems).replace gems + + @file.write index.dump + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/master_index_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/master_index_builder.rb new file mode 100644 index 0000000..669ea5a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/master_index_builder.rb @@ -0,0 +1,54 @@ +require 'rubygems/indexer' + +## +# Construct the master Gem index file. + +class Gem::Indexer::MasterIndexBuilder < Gem::Indexer::AbstractIndexBuilder + + def start_index + super + @index = Gem::SourceIndex.new + end + + def end_index + super + + @file.puts "--- !ruby/object:#{@index.class}" + @file.puts "gems:" + + gems = @index.sort_by { |name, gemspec| gemspec.sort_obj } + gems.each do |name, gemspec| + yaml = gemspec.to_yaml.gsub(/^/, ' ') + yaml = yaml.sub(/\A ---/, '') # there's a needed extra ' ' here + @file.print " #{gemspec.original_name}:" + @file.puts yaml + end + end + + def cleanup + super + + index_file_name = File.join @directory, @filename + + compress index_file_name, "Z" + paranoid index_file_name, "#{index_file_name}.Z" + + @files << "#{@filename}.Z" + end + + def add(spec) + @index.add_spec(spec) + end + + private + + def paranoid(path, compressed_path) + data = Gem.read_binary path + compressed_data = Gem.read_binary compressed_path + + if data != unzip(compressed_data) then + raise "Compressed file #{compressed_path} does not match uncompressed file #{path}" + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/quick_index_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/quick_index_builder.rb new file mode 100644 index 0000000..dc36179 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/indexer/quick_index_builder.rb @@ -0,0 +1,50 @@ +require 'rubygems/indexer' + +## +# Construct a quick index file and all of the individual specs to support +# incremental loading. + +class Gem::Indexer::QuickIndexBuilder < Gem::Indexer::AbstractIndexBuilder + + def initialize(filename, directory) + directory = File.join directory, 'quick' + + super filename, directory + end + + def cleanup + super + + quick_index_file = File.join @directory, @filename + compress quick_index_file + + # the complete quick index is in a directory, so move it as a whole + @files.delete 'index' + @files << 'quick' + end + + def add(spec) + @file.puts spec.original_name + add_yaml(spec) + add_marshal(spec) + end + + def add_yaml(spec) + fn = File.join @directory, "#{spec.original_name}.gemspec.rz" + zipped = zip spec.to_yaml + File.open fn, "wb" do |gsfile| gsfile.write zipped end + end + + def add_marshal(spec) + # HACK why does this not work in #initialize? + FileUtils.mkdir_p File.join(@directory, "Marshal.#{Gem.marshal_version}") + + fn = File.join @directory, "Marshal.#{Gem.marshal_version}", + "#{spec.original_name}.gemspec.rz" + + zipped = zip Marshal.dump(spec) + File.open fn, "wb" do |gsfile| gsfile.write zipped end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/install_update_options.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/install_update_options.rb new file mode 100644 index 0000000..dd35acb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/install_update_options.rb @@ -0,0 +1,113 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' +require 'rubygems/security' + +## +# Mixin methods for install and update options for Gem::Commands +module Gem::InstallUpdateOptions + + # Add the install/update options to the option parser. + def add_install_update_options + OptionParser.accept Gem::Security::Policy do |value| + value = Gem::Security::Policies[value] + raise OptionParser::InvalidArgument, value if value.nil? + value + end + + add_option(:"Install/Update", '-i', '--install-dir DIR', + 'Gem repository directory to get installed', + 'gems') do |value, options| + options[:install_dir] = File.expand_path(value) + end + + add_option(:"Install/Update", '-n', '--bindir DIR', + 'Directory where binary files are', + 'located') do |value, options| + options[:bin_dir] = File.expand_path(value) + end + + add_option(:"Install/Update", '-d', '--[no-]rdoc', + 'Generate RDoc documentation for the gem on', + 'install') do |value, options| + options[:generate_rdoc] = value + end + + add_option(:"Install/Update", '--[no-]ri', + 'Generate RI documentation for the gem on', + 'install') do |value, options| + options[:generate_ri] = value + end + + add_option(:"Install/Update", '-E', '--[no-]env-shebang', + "Rewrite the shebang line on installed", + "scripts to use /usr/bin/env") do |value, options| + options[:env_shebang] = value + end + + add_option(:"Install/Update", '-f', '--[no-]force', + 'Force gem to install, bypassing dependency', + 'checks') do |value, options| + options[:force] = value + end + + add_option(:"Install/Update", '-t', '--[no-]test', + 'Run unit tests prior to installation') do |value, options| + options[:test] = value + end + + add_option(:"Install/Update", '-w', '--[no-]wrappers', + 'Use bin wrappers for executables', + 'Not available on dosish platforms') do |value, options| + options[:wrappers] = value + end + + add_option(:"Install/Update", '-P', '--trust-policy POLICY', + Gem::Security::Policy, + 'Specify gem trust policy') do |value, options| + options[:security_policy] = value + end + + add_option(:"Install/Update", '--ignore-dependencies', + 'Do not install any required dependent gems') do |value, options| + options[:ignore_dependencies] = value + end + + add_option(:"Install/Update", '-y', '--include-dependencies', + 'Unconditionally install the required', + 'dependent gems') do |value, options| + options[:include_dependencies] = value + end + + add_option(:"Install/Update", '--[no-]format-executable', + 'Make installed executable names match ruby.', + 'If ruby is ruby18, foo_exec will be', + 'foo_exec18') do |value, options| + options[:format_executable] = value + end + + add_option(:"Install/Update", '--[no-]user-install', + 'Install in user\'s home directory instead', + 'of GEM_HOME. Defaults to using home directory', + 'only if GEM_HOME is not writable.') do |value, options| + options[:user_install] = value + end + + add_option(:"Install/Update", "--development", + "Install any additional development", + "dependencies") do |value, options| + options[:development] = true + end + end + + # Default options for the gem install command. + def install_update_defaults_str + '--rdoc --no-force --no-test --wrappers' + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/installer.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/installer.rb new file mode 100644 index 0000000..259c3ed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/installer.rb @@ -0,0 +1,575 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'fileutils' +require 'pathname' +require 'rbconfig' + +require 'rubygems/format' +require 'rubygems/ext' +require 'rubygems/require_paths_builder' + +## +# The installer class processes RubyGem .gem files and installs the +# files contained in the .gem into the Gem.path. +# +# Gem::Installer does the work of putting files in all the right places on the +# filesystem including unpacking the gem into its gem dir, installing the +# gemspec in the specifications dir, storing the cached gem in the cache dir, +# and installing either wrappers or symlinks for executables. + +class Gem::Installer + + ## + # Raised when there is an error while building extensions. + # + class ExtensionBuildError < Gem::InstallError; end + + include Gem::UserInteraction + + include Gem::RequirePathsBuilder + + ## + # The directory a gem's executables will be installed into + + attr_reader :bin_dir + + ## + # The gem repository the gem will be installed into + + attr_reader :gem_home + + ## + # The Gem::Specification for the gem being installed + + attr_reader :spec + + @home_install_warning = false + @path_warning = false + + class << self + + ## + # True if we've warned about ~/.gems install + + attr_accessor :home_install_warning + + ## + # True if we've warned about PATH not including Gem.bindir + + attr_accessor :path_warning + + attr_writer :exec_format + + # Defaults to use Ruby's program prefix and suffix. + def exec_format + @exec_format ||= Gem.default_exec_format + end + + end + + ## + # Constructs an Installer instance that will install the gem located at + # +gem+. +options+ is a Hash with the following keys: + # + # :env_shebang:: Use /usr/bin/env in bin wrappers. + # :force:: Overrides all version checks and security policy checks, except + # for a signed-gems-only policy. + # :ignore_dependencies:: Don't raise if a dependency is missing. + # :install_dir:: The directory to install the gem into. + # :format_executable:: Format the executable the same as the ruby executable. + # If your ruby is ruby18, foo_exec will be installed as + # foo_exec18. + # :security_policy:: Use the specified security policy. See Gem::Security + # :wrappers:: Install wrappers if true, symlinks if false. + + def initialize(gem, options={}) + @gem = gem + + options = { + :bin_dir => nil, + :env_shebang => false, + :exec_format => false, + :force => false, + :install_dir => Gem.dir, + :source_index => Gem.source_index, + }.merge options + + @env_shebang = options[:env_shebang] + @force = options[:force] + gem_home = options[:install_dir] + @gem_home = Pathname.new(gem_home).expand_path + @ignore_dependencies = options[:ignore_dependencies] + @format_executable = options[:format_executable] + @security_policy = options[:security_policy] + @wrappers = options[:wrappers] + @bin_dir = options[:bin_dir] + @development = options[:development] + @source_index = options[:source_index] + + begin + @format = Gem::Format.from_file_by_path @gem, @security_policy + rescue Gem::Package::FormatError + raise Gem::InstallError, "invalid gem format for #{@gem}" + end + + begin + FileUtils.mkdir_p @gem_home + rescue Errno::EACCESS, Errno::ENOTDIR + # We'll divert to ~/.gems below + end + + if not File.writable? @gem_home or + # TODO: Shouldn't have to test for existence of bindir; tests need it. + (@gem_home.to_s == Gem.dir and File.exist? Gem.bindir and + not File.writable? Gem.bindir) then + if options[:user_install] == false then # You don't want to use ~ + raise Gem::FilePermissionError, @gem_home + elsif options[:user_install].nil? then + unless self.class.home_install_warning then + alert_warning "Installing to ~/.gem since #{@gem_home} and\n\t #{Gem.bindir} aren't both writable." + self.class.home_install_warning = true + end + end + options[:user_install] = true + end + + if options[:user_install] and not options[:unpack] then + @gem_home = Gem.user_dir + + user_bin_dir = File.join(@gem_home, 'bin') + unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then + unless self.class.path_warning then + alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run." + self.class.path_warning = true + end + end + + FileUtils.mkdir_p @gem_home unless File.directory? @gem_home + # If it's still not writable, you've got issues. + raise Gem::FilePermissionError, @gem_home unless File.writable? @gem_home + end + + @spec = @format.spec + + @gem_dir = File.join(@gem_home, "gems", @spec.full_name).untaint + end + + ## + # Installs the gem and returns a loaded Gem::Specification for the installed + # gem. + # + # The gem will be installed with the following structure: + # + # @gem_home/ + # cache/.gem #=> a cached copy of the installed gem + # gems//... #=> extracted files + # specifications/.gemspec #=> the Gem::Specification + + def install + # If we're forcing the install then disable security unless the security + # policy says that we only install singed gems. + @security_policy = nil if @force and @security_policy and + not @security_policy.only_signed + + unless @force then + if rrv = @spec.required_ruby_version then + unless rrv.satisfied_by? Gem.ruby_version then + raise Gem::InstallError, "#{@spec.name} requires Ruby version #{rrv}" + end + end + + if rrgv = @spec.required_rubygems_version then + unless rrgv.satisfied_by? Gem::Version.new(Gem::RubyGemsVersion) then + raise Gem::InstallError, + "#{@spec.name} requires RubyGems version #{rrgv}" + end + end + + unless @ignore_dependencies then + deps = @spec.runtime_dependencies + deps |= @spec.development_dependencies if @development + + deps.each do |dep_gem| + ensure_dependency @spec, dep_gem + end + end + end + + Gem.pre_install_hooks.each do |hook| + hook.call self + end + + FileUtils.mkdir_p @gem_home unless File.directory? @gem_home + + Gem.ensure_gem_subdirectories @gem_home + + FileUtils.mkdir_p @gem_dir + + extract_files + generate_bin + build_extensions + write_spec + + write_require_paths_file_if_needed + + # HACK remove? Isn't this done in multiple places? + cached_gem = File.join @gem_home, "cache", @gem.split(/\//).pop + unless File.exist? cached_gem then + FileUtils.cp @gem, File.join(@gem_home, "cache") + end + + say @spec.post_install_message unless @spec.post_install_message.nil? + + @spec.loaded_from = File.join(@gem_home, 'specifications', + "#{@spec.full_name}.gemspec") + + @source_index.add_spec @spec + + Gem.post_install_hooks.each do |hook| + hook.call self + end + + return @spec + rescue Zlib::GzipFile::Error + raise Gem::InstallError, "gzip error installing #{@gem}" + end + + ## + # Ensure that the dependency is satisfied by the current installation of + # gem. If it is not an exception is raised. + # + # spec :: Gem::Specification + # dependency :: Gem::Dependency + + def ensure_dependency(spec, dependency) + unless installation_satisfies_dependency? dependency then + raise Gem::InstallError, "#{spec.name} requires #{dependency}" + end + + true + end + + ## + # True if the gems in the source_index satisfy +dependency+. + + def installation_satisfies_dependency?(dependency) + @source_index.find_name(dependency.name, dependency.version_requirements).size > 0 + end + + ## + # Unpacks the gem into the given directory. + + def unpack(directory) + @gem_dir = directory + @format = Gem::Format.from_file_by_path @gem, @security_policy + extract_files + end + + ## + # Writes the .gemspec specification (in Ruby) to the gem home's + # specifications directory. + + def write_spec + rubycode = @spec.to_ruby + + file_name = File.join @gem_home, 'specifications', + "#{@spec.full_name}.gemspec" + + file_name.untaint + + File.open(file_name, "w") do |file| + file.puts rubycode + end + end + + ## + # Creates windows .bat files for easy running of commands + + def generate_windows_script(bindir, filename) + if Gem.win_platform? then + script_name = filename + ".bat" + script_path = File.join bindir, File.basename(script_name) + File.open script_path, 'w' do |file| + file.puts windows_stub_script(bindir, filename) + end + + say script_path if Gem.configuration.really_verbose + end + end + + def generate_bin + return if @spec.executables.nil? or @spec.executables.empty? + + # If the user has asked for the gem to be installed in a directory that is + # the system gem directory, then use the system bin directory, else create + # (or use) a new bin dir under the gem_home. + bindir = @bin_dir ? @bin_dir : Gem.bindir(@gem_home) + + Dir.mkdir bindir unless File.exist? bindir + raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir + + @spec.executables.each do |filename| + filename.untaint + bin_path = File.expand_path File.join(@gem_dir, @spec.bindir, filename) + mode = File.stat(bin_path).mode | 0111 + File.chmod mode, bin_path + + if @wrappers then + generate_bin_script filename, bindir + else + generate_bin_symlink filename, bindir + end + end + end + + ## + # Creates the scripts to run the applications in the gem. + #-- + # The Windows script is generated in addition to the regular one due to a + # bug or misfeature in the Windows shell's pipe. See + # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/193379 + + def generate_bin_script(filename, bindir) + bin_script_path = File.join bindir, formatted_program_filename(filename) + + exec_path = File.join @gem_dir, @spec.bindir, filename + + # HACK some gems don't have #! in their executables, restore 2008/06 + #if File.read(exec_path, 2) == '#!' then + FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers + + File.open bin_script_path, 'w', 0755 do |file| + file.print app_script_text(filename) + end + + say bin_script_path if Gem.configuration.really_verbose + + generate_windows_script bindir, filename + #else + # FileUtils.rm_f bin_script_path + # FileUtils.cp exec_path, bin_script_path, + # :verbose => Gem.configuration.really_verbose + #end + end + + ## + # Creates the symlinks to run the applications in the gem. Moves + # the symlink if the gem being installed has a newer version. + + def generate_bin_symlink(filename, bindir) + if Gem.win_platform? then + alert_warning "Unable to use symlinks on Windows, installing wrapper" + generate_bin_script filename, bindir + return + end + + src = File.join @gem_dir, 'bin', filename + dst = File.join bindir, formatted_program_filename(filename) + + if File.exist? dst then + if File.symlink? dst then + link = File.readlink(dst).split File::SEPARATOR + cur_version = Gem::Version.create(link[-3].sub(/^.*-/, '')) + return if @spec.version < cur_version + end + File.unlink dst + end + + FileUtils.symlink src, dst, :verbose => Gem.configuration.really_verbose + end + + ## + # Generates a #! line for +bin_file_name+'s wrapper copying arguments if + # necessary. + + def shebang(bin_file_name) + if @env_shebang then + "#!/usr/bin/env " + Gem::ConfigMap[:ruby_install_name] + else + path = File.join @gem_dir, @spec.bindir, bin_file_name + + File.open(path, "rb") do |file| + first_line = file.gets + if first_line =~ /^#!/ then + # Preserve extra words on shebang line, like "-w". Thanks RPA. + shebang = first_line.sub(/\A\#!.*?ruby\S*/, "#!#{Gem.ruby}") + else + # Create a plain shebang line. + shebang = "#!#{Gem.ruby}" + end + + shebang.strip # Avoid nasty ^M issues. + end + end + end + + ## + # Return the text for an application file. + + def app_script_text(bin_file_name) + <<-TEXT +#{shebang bin_file_name} +# +# This file was generated by RubyGems. +# +# The application '#{@spec.name}' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'rubygems' + +version = "#{Gem::Requirement.default}" + +if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then + version = $1 + ARGV.shift +end + +gem '#{@spec.name}', version +load '#{bin_file_name}' +TEXT + end + + ## + # return the stub script text used to launch the true ruby script + + def windows_stub_script(bindir, bin_file_name) + <<-TEXT +@ECHO OFF +IF NOT "%~f0" == "~f0" GOTO :WinNT +@"#{File.basename(Gem.ruby)}" "#{File.join(bindir, bin_file_name)}" %1 %2 %3 %4 %5 %6 %7 %8 %9 +GOTO :EOF +:WinNT +@"#{File.basename(Gem.ruby)}" "%~dpn0" %* +TEXT + end + + ## + # Builds extensions. Valid types of extensions are extconf.rb files, + # configure scripts and rakefiles or mkrf_conf files. + + def build_extensions + return if @spec.extensions.empty? + say "Building native extensions. This could take a while..." + start_dir = Dir.pwd + dest_path = File.join @gem_dir, @spec.require_paths.first + ran_rake = false # only run rake once + + @spec.extensions.each do |extension| + break if ran_rake + results = [] + + builder = case extension + when /extconf/ then + Gem::Ext::ExtConfBuilder + when /configure/ then + Gem::Ext::ConfigureBuilder + when /rakefile/i, /mkrf_conf/i then + ran_rake = true + Gem::Ext::RakeBuilder + else + results = ["No builder for extension '#{extension}'"] + nil + end + + begin + Dir.chdir File.join(@gem_dir, File.dirname(extension)) + results = builder.build(extension, @gem_dir, dest_path, results) + + say results.join("\n") if Gem.configuration.really_verbose + + rescue => ex + results = results.join "\n" + + File.open('gem_make.out', 'wb') { |f| f.puts results } + + message = <<-EOF +ERROR: Failed to build gem native extension. + +#{results} + +Gem files will remain installed in #{@gem_dir} for inspection. +Results logged to #{File.join(Dir.pwd, 'gem_make.out')} + EOF + + raise ExtensionBuildError, message + ensure + Dir.chdir start_dir + end + end + end + + ## + # Reads the file index and extracts each file into the gem directory. + # + # Ensures that files can't be installed outside the gem directory. + + def extract_files + expand_and_validate_gem_dir + + raise ArgumentError, "format required to extract from" if @format.nil? + + @format.file_entries.each do |entry, file_data| + path = entry['path'].untaint + + if path =~ /\A\// then # for extra sanity + raise Gem::InstallError, + "attempt to install file into #{entry['path'].inspect}" + end + + path = File.expand_path File.join(@gem_dir, path) + + if path !~ /\A#{Regexp.escape @gem_dir}/ then + msg = "attempt to install file into %p under %p" % + [entry['path'], @gem_dir] + raise Gem::InstallError, msg + end + + FileUtils.mkdir_p File.dirname(path) + + File.open(path, "wb") do |out| + out.write file_data + end + + FileUtils.chmod entry['mode'], path + + say path if Gem.configuration.really_verbose + end + end + + ## + # Prefix and suffix the program filename the same as ruby. + + def formatted_program_filename(filename) + if @format_executable then + self.class.exec_format % File.basename(filename) + else + filename + end + end + + private + + ## + # HACK Pathname is broken on windows. + + def absolute_path? pathname + pathname.absolute? or (Gem.win_platform? and pathname.to_s =~ /\A[a-z]:/i) + end + + def expand_and_validate_gem_dir + @gem_dir = Pathname.new(@gem_dir).expand_path + + unless absolute_path?(@gem_dir) then # HACK is this possible after #expand_path? + raise ArgumentError, "install directory %p not absolute" % @gem_dir + end + + @gem_dir = @gem_dir.to_s + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/local_remote_options.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/local_remote_options.rb new file mode 100644 index 0000000..730cb69 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/local_remote_options.rb @@ -0,0 +1,134 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'uri' +require 'rubygems' + +## +# Mixin methods for local and remote Gem::Command options. + +module Gem::LocalRemoteOptions + + ## + # Allows OptionParser to handle HTTP URIs. + + def accept_uri_http + OptionParser.accept URI::HTTP do |value| + begin + uri = URI.parse value + rescue URI::InvalidURIError + raise OptionParser::InvalidArgument, value + end + + raise OptionParser::InvalidArgument, value unless uri.scheme == 'http' + + value + end + end + + ## + # Add local/remote options to the command line parser. + + def add_local_remote_options + add_option(:"Local/Remote", '-l', '--local', + 'Restrict operations to the LOCAL domain') do |value, options| + options[:domain] = :local + end + + add_option(:"Local/Remote", '-r', '--remote', + 'Restrict operations to the REMOTE domain') do |value, options| + options[:domain] = :remote + end + + add_option(:"Local/Remote", '-b', '--both', + 'Allow LOCAL and REMOTE operations') do |value, options| + options[:domain] = :both + end + + add_bulk_threshold_option + add_source_option + add_proxy_option + add_update_sources_option + end + + ## + # Add the --bulk-threshold option + + def add_bulk_threshold_option + add_option(:"Local/Remote", '-B', '--bulk-threshold COUNT', + "Threshold for switching to bulk", + "synchronization (default #{Gem.configuration.bulk_threshold})") do + |value, options| + Gem.configuration.bulk_threshold = value.to_i + end + end + + ## + # Add the --http-proxy option + + def add_proxy_option + accept_uri_http + + add_option(:"Local/Remote", '-p', '--[no-]http-proxy [URL]', URI::HTTP, + 'Use HTTP proxy for remote operations') do |value, options| + options[:http_proxy] = (value == false) ? :no_proxy : value + Gem.configuration[:http_proxy] = options[:http_proxy] + end + end + + ## + # Add the --source option + + def add_source_option + accept_uri_http + + add_option(:"Local/Remote", '--source URL', URI::HTTP, + 'Use URL as the remote source for gems') do |source, options| + source << '/' if source !~ /\/\z/ + + if options[:added_source] then + Gem.sources << source + else + options[:added_source] = true + Gem.sources.replace [source] + end + end + end + + ## + # Add the --update-source option + + def add_update_sources_option + + add_option(:"Local/Remote", '-u', '--[no-]update-sources', + 'Update local source cache') do |value, options| + Gem.configuration.update_sources = value + end + end + + ## + # Is fetching of local and remote information enabled? + + def both? + options[:domain] == :both + end + + ## + # Is local fetching enabled? + + def local? + options[:domain] == :local || options[:domain] == :both + end + + ## + # Is remote fetching enabled? + + def remote? + options[:domain] == :remote || options[:domain] == :both + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/old_format.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/old_format.rb new file mode 100644 index 0000000..ef5d621 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/old_format.rb @@ -0,0 +1,148 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'fileutils' +require 'yaml' +require 'zlib' + +module Gem + + ## + # The format class knows the guts of the RubyGem .gem file format + # and provides the capability to read gem files + # + class OldFormat + attr_accessor :spec, :file_entries, :gem_path + + ## + # Constructs an instance of a Format object, representing the gem's + # data structure. + # + # gem:: [String] The file name of the gem + # + def initialize(gem_path) + @gem_path = gem_path + end + + ## + # Reads the named gem file and returns a Format object, representing + # the data from the gem file + # + # file_path:: [String] Path to the gem file + # + def self.from_file_by_path(file_path) + unless File.exist?(file_path) + raise Gem::Exception, "Cannot load gem file [#{file_path}]" + end + File.open(file_path, 'rb') do |file| + from_io(file, file_path) + end + end + + ## + # Reads a gem from an io stream and returns a Format object, representing + # the data from the gem file + # + # io:: [IO] Stream from which to read the gem + # + def self.from_io(io, gem_path="(io)") + format = self.new(gem_path) + skip_ruby(io) + format.spec = read_spec(io) + format.file_entries = [] + read_files_from_gem(io) do |entry, file_data| + format.file_entries << [entry, file_data] + end + format + end + + private + ## + # Skips the Ruby self-install header. After calling this method, the + # IO index will be set after the Ruby code. + # + # file:: [IO] The IO to process (skip the Ruby code) + # + def self.skip_ruby(file) + end_seen = false + loop { + line = file.gets + if(line == nil || line.chomp == "__END__") then + end_seen = true + break + end + } + if(end_seen == false) then + raise Gem::Exception.new("Failed to find end of ruby script while reading gem") + end + end + + ## + # Reads the specification YAML from the supplied IO and constructs + # a Gem::Specification from it. After calling this method, the + # IO index will be set after the specification header. + # + # file:: [IO] The IO to process + # + def self.read_spec(file) + yaml = '' + begin + read_until_dashes(file) do |line| + yaml << line + end + Specification.from_yaml(yaml) + rescue YAML::Error => e + raise Gem::Exception.new("Failed to parse gem specification out of gem file") + rescue ArgumentError => e + raise Gem::Exception.new("Failed to parse gem specification out of gem file") + end + end + + ## + # Reads lines from the supplied IO until a end-of-yaml (---) is + # reached + # + # file:: [IO] The IO to process + # block:: [String] The read line + # + def self.read_until_dashes(file) + while((line = file.gets) && line.chomp.strip != "---") do + yield line + end + end + + + ## + # Reads the embedded file data from a gem file, yielding an entry + # containing metadata about the file and the file contents themselves + # for each file that's archived in the gem. + # NOTE: Many of these methods should be extracted into some kind of + # Gem file read/writer + # + # gem_file:: [IO] The IO to process + # + def self.read_files_from_gem(gem_file) + errstr = "Error reading files from gem" + header_yaml = '' + begin + self.read_until_dashes(gem_file) do |line| + header_yaml << line + end + header = YAML.load(header_yaml) + raise Gem::Exception.new(errstr) unless header + header.each do |entry| + file_data = '' + self.read_until_dashes(gem_file) do |line| + file_data << line + end + yield [entry, Zlib::Inflate.inflate(file_data.strip.unpack("m")[0])] + end + rescue Exception,Zlib::DataError => e + raise Gem::Exception.new(errstr) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package.rb new file mode 100644 index 0000000..9cb393b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package.rb @@ -0,0 +1,95 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'fileutils' +require 'find' +require 'stringio' +require 'yaml' +require 'zlib' + +require 'rubygems/digest/md5' +require 'rubygems/security' +require 'rubygems/specification' + +# Wrapper for FileUtils meant to provide logging and additional operations if +# needed. +class Gem::FileOperations + + def initialize(logger = nil) + @logger = logger + end + + def method_missing(meth, *args, &block) + case + when FileUtils.respond_to?(meth) + @logger.log "#{meth}: #{args}" if @logger + FileUtils.send meth, *args, &block + when Gem::FileOperations.respond_to?(meth) + @logger.log "#{meth}: #{args}" if @logger + Gem::FileOperations.send meth, *args, &block + else + super + end + end + +end + +module Gem::Package + + class Error < StandardError; end + class NonSeekableIO < Error; end + class ClosedIO < Error; end + class BadCheckSum < Error; end + class TooLongFileName < Error; end + class FormatError < Error; end + + def self.open(io, mode = "r", signer = nil, &block) + tar_type = case mode + when 'r' then TarInput + when 'w' then TarOutput + else + raise "Unknown Package open mode" + end + + tar_type.open(io, signer, &block) + end + + def self.pack(src, destname, signer = nil) + TarOutput.open(destname, signer) do |outp| + dir_class.chdir(src) do + outp.metadata = (file_class.read("RPA/metadata") rescue nil) + find_class.find('.') do |entry| + case + when file_class.file?(entry) + entry.sub!(%r{\./}, "") + next if entry =~ /\ARPA\// + stat = File.stat(entry) + outp.add_file_simple(entry, stat.mode, stat.size) do |os| + file_class.open(entry, "rb") do |f| + os.write(f.read(4096)) until f.eof? + end + end + when file_class.dir?(entry) + entry.sub!(%r{\./}, "") + next if entry == "RPA" + outp.mkdir(entry, file_class.stat(entry).mode) + else + raise "Don't know how to pack this yet!" + end + end + end + end + end + +end + +require 'rubygems/package/f_sync_dir' +require 'rubygems/package/tar_header' +require 'rubygems/package/tar_input' +require 'rubygems/package/tar_output' +require 'rubygems/package/tar_reader' +require 'rubygems/package/tar_reader/entry' +require 'rubygems/package/tar_writer' + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/f_sync_dir.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/f_sync_dir.rb new file mode 100644 index 0000000..3e2e4a5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/f_sync_dir.rb @@ -0,0 +1,24 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +module Gem::Package::FSyncDir + + private + + ## + # make sure this hits the disc + + def fsync_dir(dirname) + dir = open dirname, 'r' + dir.fsync + rescue # ignore IOError if it's an unpatched (old) Ruby + ensure + dir.close if dir rescue nil + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_header.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_header.rb new file mode 100644 index 0000000..c194cc0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_header.rb @@ -0,0 +1,245 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +## +#-- +# struct tarfile_entry_posix { +# char name[100]; # ASCII + (Z unless filled) +# char mode[8]; # 0 padded, octal, null +# char uid[8]; # ditto +# char gid[8]; # ditto +# char size[12]; # 0 padded, octal, null +# char mtime[12]; # 0 padded, octal, null +# char checksum[8]; # 0 padded, octal, null, space +# char typeflag[1]; # file: "0" dir: "5" +# char linkname[100]; # ASCII + (Z unless filled) +# char magic[6]; # "ustar\0" +# char version[2]; # "00" +# char uname[32]; # ASCIIZ +# char gname[32]; # ASCIIZ +# char devmajor[8]; # 0 padded, octal, null +# char devminor[8]; # o padded, octal, null +# char prefix[155]; # ASCII + (Z unless filled) +# }; +#++ + +class Gem::Package::TarHeader + + FIELDS = [ + :checksum, + :devmajor, + :devminor, + :gid, + :gname, + :linkname, + :magic, + :mode, + :mtime, + :name, + :prefix, + :size, + :typeflag, + :uid, + :uname, + :version, + ] + + PACK_FORMAT = 'a100' + # name + 'a8' + # mode + 'a8' + # uid + 'a8' + # gid + 'a12' + # size + 'a12' + # mtime + 'a7a' + # chksum + 'a' + # typeflag + 'a100' + # linkname + 'a6' + # magic + 'a2' + # version + 'a32' + # uname + 'a32' + # gname + 'a8' + # devmajor + 'a8' + # devminor + 'a155' # prefix + + UNPACK_FORMAT = 'A100' + # name + 'A8' + # mode + 'A8' + # uid + 'A8' + # gid + 'A12' + # size + 'A12' + # mtime + 'A8' + # checksum + 'A' + # typeflag + 'A100' + # linkname + 'A6' + # magic + 'A2' + # version + 'A32' + # uname + 'A32' + # gname + 'A8' + # devmajor + 'A8' + # devminor + 'A155' # prefix + + attr_reader(*FIELDS) + + def self.from(stream) + header = stream.read 512 + empty = (header == "\0" * 512) + + fields = header.unpack UNPACK_FORMAT + + name = fields.shift + mode = fields.shift.oct + uid = fields.shift.oct + gid = fields.shift.oct + size = fields.shift.oct + mtime = fields.shift.oct + checksum = fields.shift.oct + typeflag = fields.shift + linkname = fields.shift + magic = fields.shift + version = fields.shift.oct + uname = fields.shift + gname = fields.shift + devmajor = fields.shift.oct + devminor = fields.shift.oct + prefix = fields.shift + + new :name => name, + :mode => mode, + :uid => uid, + :gid => gid, + :size => size, + :mtime => mtime, + :checksum => checksum, + :typeflag => typeflag, + :linkname => linkname, + :magic => magic, + :version => version, + :uname => uname, + :gname => gname, + :devmajor => devmajor, + :devminor => devminor, + :prefix => prefix, + + :empty => empty + + # HACK unfactor for Rubinius + #new :name => fields.shift, + # :mode => fields.shift.oct, + # :uid => fields.shift.oct, + # :gid => fields.shift.oct, + # :size => fields.shift.oct, + # :mtime => fields.shift.oct, + # :checksum => fields.shift.oct, + # :typeflag => fields.shift, + # :linkname => fields.shift, + # :magic => fields.shift, + # :version => fields.shift.oct, + # :uname => fields.shift, + # :gname => fields.shift, + # :devmajor => fields.shift.oct, + # :devminor => fields.shift.oct, + # :prefix => fields.shift, + + # :empty => empty + end + + def initialize(vals) + unless vals[:name] && vals[:size] && vals[:prefix] && vals[:mode] then + raise ArgumentError, ":name, :size, :prefix and :mode required" + end + + vals[:uid] ||= 0 + vals[:gid] ||= 0 + vals[:mtime] ||= 0 + vals[:checksum] ||= "" + vals[:typeflag] ||= "0" + vals[:magic] ||= "ustar" + vals[:version] ||= "00" + vals[:uname] ||= "wheel" + vals[:gname] ||= "wheel" + vals[:devmajor] ||= 0 + vals[:devminor] ||= 0 + + FIELDS.each do |name| + instance_variable_set "@#{name}", vals[name] + end + + @empty = vals[:empty] + end + + def empty? + @empty + end + + def ==(other) + self.class === other and + @checksum == other.checksum and + @devmajor == other.devmajor and + @devminor == other.devminor and + @gid == other.gid and + @gname == other.gname and + @linkname == other.linkname and + @magic == other.magic and + @mode == other.mode and + @mtime == other.mtime and + @name == other.name and + @prefix == other.prefix and + @size == other.size and + @typeflag == other.typeflag and + @uid == other.uid and + @uname == other.uname and + @version == other.version + end + + def to_s + update_checksum + header + end + + def update_checksum + header = header " " * 8 + @checksum = oct calculate_checksum(header), 6 + end + + private + + def calculate_checksum(header) + header.unpack("C*").inject { |a, b| a + b } + end + + def header(checksum = @checksum) + header = [ + name, + oct(mode, 7), + oct(uid, 7), + oct(gid, 7), + oct(size, 11), + oct(mtime, 11), + checksum, + " ", + typeflag, + linkname, + magic, + oct(version, 2), + uname, + gname, + oct(devmajor, 7), + oct(devminor, 7), + prefix + ] + + header = header.pack PACK_FORMAT + + header << ("\0" * ((512 - header.size) % 512)) + end + + def oct(num, len) + "%0#{len}o" % num + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_input.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_input.rb new file mode 100644 index 0000000..2ed3d6b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_input.rb @@ -0,0 +1,219 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +class Gem::Package::TarInput + + include Gem::Package::FSyncDir + include Enumerable + + attr_reader :metadata + + private_class_method :new + + def self.open(io, security_policy = nil, &block) + is = new io, security_policy + + yield is + ensure + is.close if is + end + + def initialize(io, security_policy = nil) + @io = io + @tarreader = Gem::Package::TarReader.new @io + has_meta = false + + data_sig, meta_sig, data_dgst, meta_dgst = nil, nil, nil, nil + dgst_algo = security_policy ? Gem::Security::OPT[:dgst_algo] : nil + + @tarreader.each do |entry| + case entry.full_name + when "metadata" + @metadata = load_gemspec entry.read + has_meta = true + when "metadata.gz" + begin + # if we have a security_policy, then pre-read the metadata file + # and calculate it's digest + sio = nil + if security_policy + Gem.ensure_ssl_available + sio = StringIO.new(entry.read) + meta_dgst = dgst_algo.digest(sio.string) + sio.rewind + end + + gzis = Zlib::GzipReader.new(sio || entry) + # YAML wants an instance of IO + @metadata = load_gemspec(gzis) + has_meta = true + ensure + gzis.close unless gzis.nil? + end + when 'metadata.gz.sig' + meta_sig = entry.read + when 'data.tar.gz.sig' + data_sig = entry.read + when 'data.tar.gz' + if security_policy + Gem.ensure_ssl_available + data_dgst = dgst_algo.digest(entry.read) + end + end + end + + if security_policy then + Gem.ensure_ssl_available + + # map trust policy from string to actual class (or a serialized YAML + # file, if that exists) + if String === security_policy then + if Gem::Security::Policy.key? security_policy then + # load one of the pre-defined security policies + security_policy = Gem::Security::Policy[security_policy] + elsif File.exist? security_policy then + # FIXME: this doesn't work yet + security_policy = YAML.load File.read(security_policy) + else + raise Gem::Exception, "Unknown trust policy '#{security_policy}'" + end + end + + if data_sig && data_dgst && meta_sig && meta_dgst then + # the user has a trust policy, and we have a signed gem + # file, so use the trust policy to verify the gem signature + + begin + security_policy.verify_gem(data_sig, data_dgst, @metadata.cert_chain) + rescue Exception => e + raise "Couldn't verify data signature: #{e}" + end + + begin + security_policy.verify_gem(meta_sig, meta_dgst, @metadata.cert_chain) + rescue Exception => e + raise "Couldn't verify metadata signature: #{e}" + end + elsif security_policy.only_signed + raise Gem::Exception, "Unsigned gem" + else + # FIXME: should display warning here (trust policy, but + # either unsigned or badly signed gem file) + end + end + + @tarreader.rewind + @fileops = Gem::FileOperations.new + + raise Gem::Package::FormatError, "No metadata found!" unless has_meta + end + + def close + @io.close + @tarreader.close + end + + def each(&block) + @tarreader.each do |entry| + next unless entry.full_name == "data.tar.gz" + is = zipped_stream entry + + begin + Gem::Package::TarReader.new is do |inner| + inner.each(&block) + end + ensure + is.close if is + end + end + + @tarreader.rewind + end + + def extract_entry(destdir, entry, expected_md5sum = nil) + if entry.directory? then + dest = File.join(destdir, entry.full_name) + + if File.dir? dest then + @fileops.chmod entry.header.mode, dest, :verbose=>false + else + @fileops.mkdir_p dest, :mode => entry.header.mode, :verbose => false + end + + fsync_dir dest + fsync_dir File.join(dest, "..") + + return + end + + # it's a file + md5 = Digest::MD5.new if expected_md5sum + destdir = File.join destdir, File.dirname(entry.full_name) + @fileops.mkdir_p destdir, :mode => 0755, :verbose => false + destfile = File.join destdir, File.basename(entry.full_name) + @fileops.chmod 0600, destfile, :verbose => false rescue nil # Errno::ENOENT + + open destfile, "wb", entry.header.mode do |os| + loop do + data = entry.read 4096 + break unless data + # HACK shouldn't we check the MD5 before writing to disk? + md5 << data if expected_md5sum + os.write(data) + end + + os.fsync + end + + @fileops.chmod entry.header.mode, destfile, :verbose => false + fsync_dir File.dirname(destfile) + fsync_dir File.join(File.dirname(destfile), "..") + + if expected_md5sum && expected_md5sum != md5.hexdigest then + raise Gem::Package::BadCheckSum + end + end + + # Attempt to YAML-load a gemspec from the given _io_ parameter. Return + # nil if it fails. + def load_gemspec(io) + Gem::Specification.from_yaml io + rescue Gem::Exception + nil + end + + ## + # Return an IO stream for the zipped entry. + # + # NOTE: Originally this method used two approaches, Return a GZipReader + # directly, or read the GZipReader into a string and return a StringIO on + # the string. The string IO approach was used for versions of ZLib before + # 1.2.1 to avoid buffer errors on windows machines. Then we found that + # errors happened with 1.2.1 as well, so we changed the condition. Then + # we discovered errors occurred with versions as late as 1.2.3. At this + # point (after some benchmarking to show we weren't seriously crippling + # the unpacking speed) we threw our hands in the air and declared that + # this method would use the String IO approach on all platforms at all + # times. And that's the way it is. + + def zipped_stream(entry) + if defined? Rubinius then + zis = Zlib::GzipReader.new entry + dis = zis.read + is = StringIO.new(dis) + else + # This is Jamis Buck's Zlib workaround for some unknown issue + entry.read(10) # skip the gzip header + zis = Zlib::Inflate.new(-Zlib::MAX_WBITS) + is = StringIO.new(zis.inflate(entry.read)) + end + ensure + zis.finish if zis + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_output.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_output.rb new file mode 100644 index 0000000..b22f7dd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_output.rb @@ -0,0 +1,143 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +## +# TarOutput is a wrapper to TarWriter that builds gem-format tar file. +# +# Gem-format tar files contain the following files: +# [data.tar.gz] A gzipped tar file containing the files that compose the gem +# which will be extracted into the gem/ dir on installation. +# [metadata.gz] A YAML format Gem::Specification. +# [data.tar.gz.sig] A signature for the gem's data.tar.gz. +# [metadata.gz.sig] A signature for the gem's metadata.gz. +# +# See TarOutput::open for usage details. + +class Gem::Package::TarOutput + + ## + # Creates a new TarOutput which will yield a TarWriter object for the + # data.tar.gz portion of a gem-format tar file. + # + # See #initialize for details on +io+ and +signer+. + # + # See #add_gem_contents for details on adding metadata to the tar file. + + def self.open(io, signer = nil, &block) # :yield: data_tar_writer + tar_outputter = new io, signer + tar_outputter.add_gem_contents(&block) + tar_outputter.add_metadata + tar_outputter.add_signatures + + ensure + tar_outputter.close + end + + ## + # Creates a new TarOutput that will write a gem-format tar file to +io+. If + # +signer+ is given, the data.tar.gz and metadata.gz will be signed and + # the signatures will be added to the tar file. + + def initialize(io, signer) + @io = io + @signer = signer + + @tar_writer = Gem::Package::TarWriter.new @io + + @metadata = nil + + @data_signature = nil + @meta_signature = nil + end + + ## + # Yields a TarWriter for the data.tar.gz inside a gem-format tar file. + # The yielded TarWriter has been extended with a #metadata= method for + # attaching a YAML format Gem::Specification which will be written by + # add_metadata. + + def add_gem_contents + @tar_writer.add_file "data.tar.gz", 0644 do |inner| + sio = @signer ? StringIO.new : nil + Zlib::GzipWriter.wrap(sio || inner) do |os| + + Gem::Package::TarWriter.new os do |data_tar_writer| + def data_tar_writer.metadata() @metadata end + def data_tar_writer.metadata=(metadata) @metadata = metadata end + + yield data_tar_writer + + @metadata = data_tar_writer.metadata + end + end + + # if we have a signing key, then sign the data + # digest and return the signature + if @signer then + digest = Gem::Security::OPT[:dgst_algo].digest sio.string + @data_signature = @signer.sign digest + inner.write sio.string + end + end + + self + end + + ## + # Adds metadata.gz to the gem-format tar file which was saved from a + # previous #add_gem_contents call. + + def add_metadata + return if @metadata.nil? + + @tar_writer.add_file "metadata.gz", 0644 do |io| + begin + sio = @signer ? StringIO.new : nil + gzos = Zlib::GzipWriter.new(sio || io) + gzos.write @metadata + ensure + gzos.flush + gzos.finish + + # if we have a signing key, then sign the metadata digest and return + # the signature + if @signer then + digest = Gem::Security::OPT[:dgst_algo].digest sio.string + @meta_signature = @signer.sign digest + io.write sio.string + end + end + end + end + + ## + # Adds data.tar.gz.sig and metadata.gz.sig to the gem-format tar files if + # a Gem::Security::Signer was sent to initialize. + + def add_signatures + if @data_signature then + @tar_writer.add_file 'data.tar.gz.sig', 0644 do |io| + io.write @data_signature + end + end + + if @meta_signature then + @tar_writer.add_file 'metadata.gz.sig', 0644 do |io| + io.write @meta_signature + end + end + end + + ## + # Closes the TarOutput. + + def close + @tar_writer.close + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader.rb new file mode 100644 index 0000000..4aa9c26 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader.rb @@ -0,0 +1,86 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +class Gem::Package::TarReader + + include Gem::Package + + class UnexpectedEOF < StandardError; end + + def self.new(io) + reader = super + + return reader unless block_given? + + begin + yield reader + ensure + reader.close + end + + nil + end + + def initialize(io) + @io = io + @init_pos = io.pos + end + + def close + end + + def each + loop do + return if @io.eof? + + header = Gem::Package::TarHeader.from @io + return if header.empty? + + entry = Gem::Package::TarReader::Entry.new header, @io + size = entry.header.size + + yield entry + + skip = (512 - (size % 512)) % 512 + pending = size - entry.bytes_read + + begin + # avoid reading... + @io.seek pending, IO::SEEK_CUR + pending = 0 + rescue Errno::EINVAL, NameError + while pending > 0 do + bytes_read = @io.read([pending, 4096].min).size + raise UnexpectedEOF if @io.eof? + pending -= bytes_read + end + end + + @io.read skip # discard trailing zeros + + # make sure nobody can use #read, #getc or #rewind anymore + entry.close + end + end + + alias each_entry each + + ## + # NOTE: Do not call #rewind during #each + + def rewind + if @init_pos == 0 then + raise Gem::Package::NonSeekableIO unless @io.respond_to? :rewind + @io.rewind + else + raise Gem::Package::NonSeekableIO unless @io.respond_to? :pos= + @io.pos = @init_pos + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader/entry.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader/entry.rb new file mode 100644 index 0000000..dcc6615 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_reader/entry.rb @@ -0,0 +1,99 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +class Gem::Package::TarReader::Entry + + attr_reader :header + + def initialize(header, io) + @closed = false + @header = header + @io = io + @orig_pos = @io.pos + @read = 0 + end + + def check_closed # :nodoc: + raise IOError, "closed #{self.class}" if closed? + end + + def bytes_read + @read + end + + def close + @closed = true + end + + def closed? + @closed + end + + def eof? + check_closed + + @read >= @header.size + end + + def full_name + if @header.prefix != "" then + File.join @header.prefix, @header.name + else + @header.name + end + end + + def getc + check_closed + + return nil if @read >= @header.size + + ret = @io.getc + @read += 1 if ret + + ret + end + + def directory? + @header.typeflag == "5" + end + + def file? + @header.typeflag == "0" + end + + def pos + check_closed + + bytes_read + end + + def read(len = nil) + check_closed + + return nil if @read >= @header.size + + len ||= @header.size - @read + max_read = [len, @header.size - @read].min + + ret = @io.read max_read + @read += ret.size + + ret + end + + def rewind + check_closed + + raise Gem::Package::NonSeekableIO unless @io.respond_to? :pos= + + @io.pos = @orig_pos + @read = 0 + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_writer.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_writer.rb new file mode 100644 index 0000000..6e11440 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/package/tar_writer.rb @@ -0,0 +1,180 @@ +#++ +# Copyright (C) 2004 Mauricio Julio Fernández Pradier +# See LICENSE.txt for additional licensing information. +#-- + +require 'rubygems/package' + +class Gem::Package::TarWriter + + class FileOverflow < StandardError; end + + class BoundedStream + + attr_reader :limit, :written + + def initialize(io, limit) + @io = io + @limit = limit + @written = 0 + end + + def write(data) + if data.size + @written > @limit + raise FileOverflow, "You tried to feed more data than fits in the file." + end + @io.write data + @written += data.size + data.size + end + + end + + class RestrictedStream + + def initialize(io) + @io = io + end + + def write(data) + @io.write data + end + + end + + def self.new(io) + writer = super + + return writer unless block_given? + + begin + yield writer + ensure + writer.close + end + + nil + end + + def initialize(io) + @io = io + @closed = false + end + + def add_file(name, mode) + check_closed + + raise Gem::Package::NonSeekableIO unless @io.respond_to? :pos= + + name, prefix = split_name name + + init_pos = @io.pos + @io.write "\0" * 512 # placeholder for the header + + yield RestrictedStream.new(@io) if block_given? + + size = @io.pos - init_pos - 512 + + remainder = (512 - (size % 512)) % 512 + @io.write "\0" * remainder + + final_pos = @io.pos + @io.pos = init_pos + + header = Gem::Package::TarHeader.new :name => name, :mode => mode, + :size => size, :prefix => prefix + + @io.write header + @io.pos = final_pos + + self + end + + def add_file_simple(name, mode, size) + check_closed + + name, prefix = split_name name + + header = Gem::Package::TarHeader.new(:name => name, :mode => mode, + :size => size, :prefix => prefix).to_s + + @io.write header + os = BoundedStream.new @io, size + + yield os if block_given? + + min_padding = size - os.written + @io.write("\0" * min_padding) + + remainder = (512 - (size % 512)) % 512 + @io.write("\0" * remainder) + + self + end + + def check_closed + raise IOError, "closed #{self.class}" if closed? + end + + def close + check_closed + + @io.write "\0" * 1024 + flush + + @closed = true + end + + def closed? + @closed + end + + def flush + check_closed + + @io.flush if @io.respond_to? :flush + end + + def mkdir(name, mode) + check_closed + + name, prefix = split_name(name) + + header = Gem::Package::TarHeader.new :name => name, :mode => mode, + :typeflag => "5", :size => 0, + :prefix => prefix + + @io.write header + + self + end + + def split_name(name) # :nodoc: + raise Gem::Package::TooLongFileName if name.size > 256 + + if name.size <= 100 then + prefix = "" + else + parts = name.split(/\//) + newname = parts.pop + nxt = "" + + loop do + nxt = parts.pop + break if newname.size + 1 + nxt.size > 100 + newname = nxt + "/" + newname + end + + prefix = (parts + [nxt]).join "/" + name = newname + + if name.size > 100 or prefix.size > 155 then + raise Gem::Package::TooLongFileName + end + end + + return name, prefix + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/platform.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/platform.rb new file mode 100644 index 0000000..3e5b5cd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/platform.rb @@ -0,0 +1,178 @@ +require 'rubygems' + +## +# Available list of platforms for targeting Gem installations. + +class Gem::Platform + + @local = nil + + attr_accessor :cpu + + attr_accessor :os + + attr_accessor :version + + def self.local + arch = Gem::ConfigMap[:arch] + arch = "#{arch}_60" if arch =~ /mswin32$/ + @local ||= new(arch) + end + + def self.match(platform) + Gem.platforms.any? do |local_platform| + platform.nil? or local_platform == platform or + (local_platform != Gem::Platform::RUBY and local_platform =~ platform) + end + end + + def self.new(arch) # :nodoc: + case arch + when Gem::Platform::CURRENT then + Gem::Platform.local + when Gem::Platform::RUBY, nil, '' then + Gem::Platform::RUBY + else + super + end + end + + def initialize(arch) + case arch + when Array then + @cpu, @os, @version = arch + when String then + arch = arch.split '-' + + if arch.length > 2 and arch.last !~ /\d/ then # reassemble x86-linux-gnu + extra = arch.pop + arch.last << "-#{extra}" + end + + cpu = arch.shift + + @cpu = case cpu + when /i\d86/ then 'x86' + else cpu + end + + if arch.length == 2 and arch.last =~ /^\d+(\.\d+)?$/ then # for command-line + @os, @version = arch + return + end + + os, = arch + @cpu, os = nil, cpu if os.nil? # legacy jruby + + @os, @version = case os + when /aix(\d+)/ then [ 'aix', $1 ] + when /cygwin/ then [ 'cygwin', nil ] + when /darwin(\d+)?/ then [ 'darwin', $1 ] + when /freebsd(\d+)/ then [ 'freebsd', $1 ] + when /hpux(\d+)/ then [ 'hpux', $1 ] + when /^java$/, /^jruby$/ then [ 'java', nil ] + when /^java([\d.]*)/ then [ 'java', $1 ] + when /linux/ then [ 'linux', $1 ] + when /mingw32/ then [ 'mingw32', nil ] + when /(mswin\d+)(\_(\d+))?/ then + os, version = $1, $3 + @cpu = 'x86' if @cpu.nil? and os =~ /32$/ + [os, version] + when /netbsdelf/ then [ 'netbsdelf', nil ] + when /openbsd(\d+\.\d+)/ then [ 'openbsd', $1 ] + when /solaris(\d+\.\d+)/ then [ 'solaris', $1 ] + # test + when /^(\w+_platform)(\d+)/ then [ $1, $2 ] + else [ 'unknown', nil ] + end + when Gem::Platform then + @cpu = arch.cpu + @os = arch.os + @version = arch.version + else + raise ArgumentError, "invalid argument #{arch.inspect}" + end + end + + def inspect + "#<%s:0x%x @cpu=%p, @os=%p, @version=%p>" % [self.class, object_id, *to_a] + end + + def to_a + [@cpu, @os, @version] + end + + def to_s + to_a.compact.join '-' + end + + ## + # Is +other+ equal to this platform? Two platforms are equal if they have + # the same CPU, OS and version. + + def ==(other) + self.class === other and + @cpu == other.cpu and @os == other.os and @version == other.version + end + + ## + # Does +other+ match this platform? Two platforms match if they have the + # same CPU, or either has a CPU of 'universal', they have the same OS, and + # they have the same version, or either has no version. + + def ===(other) + return nil unless Gem::Platform === other + + # cpu + (@cpu == 'universal' or other.cpu == 'universal' or @cpu == other.cpu) and + + # os + @os == other.os and + + # version + (@version.nil? or other.version.nil? or @version == other.version) + end + + ## + # Does +other+ match this platform? If +other+ is a String it will be + # converted to a Gem::Platform first. See #=== for matching rules. + + def =~(other) + case other + when Gem::Platform then # nop + when String then + # This data is from http://gems.rubyforge.org/gems/yaml on 19 Aug 2007 + other = case other + when /^i686-darwin(\d)/ then ['x86', 'darwin', $1] + when /^i\d86-linux/ then ['x86', 'linux', nil] + when 'java', 'jruby' then [nil, 'java', nil] + when /mswin32(\_(\d+))?/ then ['x86', 'mswin32', $2] + when 'powerpc-darwin' then ['powerpc', 'darwin', nil] + when /powerpc-darwin(\d)/ then ['powerpc', 'darwin', $1] + when /sparc-solaris2.8/ then ['sparc', 'solaris', '2.8'] + when /universal-darwin(\d)/ then ['universal', 'darwin', $1] + else other + end + + other = Gem::Platform.new other + else + return nil + end + + self === other + end + + ## + # A pure-ruby gem that may use Gem::Specification#extensions to build + # binary files. + + RUBY = 'ruby' + + ## + # A platform-specific gem that is built for the packaging ruby's platform. + # This will be replaced with Gem::Platform::local. + + CURRENT = 'current' + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/remote_fetcher.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/remote_fetcher.rb new file mode 100644 index 0000000..1570740 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/remote_fetcher.rb @@ -0,0 +1,344 @@ +require 'net/http' +require 'stringio' +require 'time' +require 'uri' + +require 'rubygems' + +## +# RemoteFetcher handles the details of fetching gems and gem information from +# a remote source. + +class Gem::RemoteFetcher + + include Gem::UserInteraction + + ## + # A FetchError exception wraps up the various possible IO and HTTP failures + # that could happen while downloading from the internet. + + class FetchError < Gem::Exception + + ## + # The URI which was being accessed when the exception happened. + + attr_accessor :uri + + def initialize(message, uri) + super message + @uri = uri + end + + def to_s # :nodoc: + "#{super} (#{uri})" + end + + end + + @fetcher = nil + + ## + # Cached RemoteFetcher instance. + + def self.fetcher + @fetcher ||= self.new Gem.configuration[:http_proxy] + end + + ## + # Initialize a remote fetcher using the source URI and possible proxy + # information. + # + # +proxy+ + # * [String]: explicit specification of proxy; overrides any environment + # variable setting + # * nil: respect environment variables (HTTP_PROXY, HTTP_PROXY_USER, + # HTTP_PROXY_PASS) + # * :no_proxy: ignore environment variables and _don't_ use a proxy + + def initialize(proxy) + Socket.do_not_reverse_lookup = true + + @connections = {} + @requests = Hash.new 0 + @proxy_uri = + case proxy + when :no_proxy then nil + when nil then get_proxy_from_env + when URI::HTTP then proxy + else URI.parse(proxy) + end + end + + ## + # Moves the gem +spec+ from +source_uri+ to the cache dir unless it is + # already there. If the source_uri is local the gem cache dir copy is + # always replaced. + + def download(spec, source_uri, install_dir = Gem.dir) + if File.writable?(install_dir) + cache_dir = File.join install_dir, 'cache' + else + cache_dir = File.join(Gem.user_dir, 'cache') + end + + gem_file_name = "#{spec.full_name}.gem" + local_gem_path = File.join cache_dir, gem_file_name + + FileUtils.mkdir_p cache_dir rescue nil unless File.exist? cache_dir + + source_uri = URI.parse source_uri unless URI::Generic === source_uri + scheme = source_uri.scheme + + # URI.parse gets confused by MS Windows paths with forward slashes. + scheme = nil if scheme =~ /^[a-z]$/i + + case scheme + when 'http', 'https' then + unless File.exist? local_gem_path then + begin + say "Downloading gem #{gem_file_name}" if + Gem.configuration.really_verbose + + remote_gem_path = source_uri + "gems/#{gem_file_name}" + + gem = Gem::RemoteFetcher.fetcher.fetch_path remote_gem_path + rescue Gem::RemoteFetcher::FetchError + raise if spec.original_platform == spec.platform + + alternate_name = "#{spec.original_name}.gem" + + say "Failed, downloading gem #{alternate_name}" if + Gem.configuration.really_verbose + + remote_gem_path = source_uri + "gems/#{alternate_name}" + + gem = Gem::RemoteFetcher.fetcher.fetch_path remote_gem_path + end + + File.open local_gem_path, 'wb' do |fp| + fp.write gem + end + end + when nil, 'file' then # TODO test for local overriding cache + begin + FileUtils.cp source_uri.to_s, local_gem_path + rescue Errno::EACCES + local_gem_path = source_uri.to_s + end + + say "Using local gem #{local_gem_path}" if + Gem.configuration.really_verbose + else + raise Gem::InstallError, "unsupported URI scheme #{source_uri.scheme}" + end + + local_gem_path + end + + ## + # Downloads +uri+ and returns it as a String. + + def fetch_path(uri, mtime = nil, head = false) + data = open_uri_or_path uri, mtime, head + data = Gem.gunzip data if data and not head and uri.to_s =~ /gz$/ + data + rescue FetchError + raise + rescue Timeout::Error + raise FetchError.new('timed out', uri) + rescue IOError, SocketError, SystemCallError => e + raise FetchError.new("#{e.class}: #{e}", uri) + end + + ## + # Returns the size of +uri+ in bytes. + + def fetch_size(uri) # TODO: phase this out + response = fetch_path(uri, nil, true) + + response['content-length'].to_i + end + + def escape(str) + return unless str + URI.escape(str) + end + + def unescape(str) + return unless str + URI.unescape(str) + end + + ## + # Returns an HTTP proxy URI if one is set in the environment variables. + + def get_proxy_from_env + env_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY'] + + return nil if env_proxy.nil? or env_proxy.empty? + + uri = URI.parse env_proxy + + if uri and uri.user.nil? and uri.password.nil? then + # Probably we have http_proxy_* variables? + uri.user = escape(ENV['http_proxy_user'] || ENV['HTTP_PROXY_USER']) + uri.password = escape(ENV['http_proxy_pass'] || ENV['HTTP_PROXY_PASS']) + end + + uri + end + + ## + # Normalize the URI by adding "http://" if it is missing. + + def normalize_uri(uri) + (uri =~ /^(https?|ftp|file):/) ? uri : "http://#{uri}" + end + + ## + # Creates or an HTTP connection based on +uri+, or retrieves an existing + # connection, using a proxy if needed. + + def connection_for(uri) + net_http_args = [uri.host, uri.port] + + if @proxy_uri then + net_http_args += [ + @proxy_uri.host, + @proxy_uri.port, + @proxy_uri.user, + @proxy_uri.password + ] + end + + connection_id = net_http_args.join ':' + @connections[connection_id] ||= Net::HTTP.new(*net_http_args) + connection = @connections[connection_id] + + if uri.scheme == 'https' and not connection.started? then + require 'net/https' + connection.use_ssl = true + connection.verify_mode = OpenSSL::SSL::VERIFY_NONE + end + + connection.start unless connection.started? + + connection + end + + ## + # Read the data from the (source based) URI, but if it is a file:// URI, + # read from the filesystem instead. + + def open_uri_or_path(uri, last_modified = nil, head = false, depth = 0) + raise "block is dead" if block_given? + + return open(get_file_uri_path(uri)) if file_uri? uri + + uri = URI.parse uri unless URI::Generic === uri + raise ArgumentError, 'uri is not an HTTP URI' unless URI::HTTP === uri + + fetch_type = head ? Net::HTTP::Head : Net::HTTP::Get + response = request uri, fetch_type, last_modified + + case response + when Net::HTTPOK, Net::HTTPNotModified then + head ? response : response.body + when Net::HTTPMovedPermanently, Net::HTTPFound, Net::HTTPSeeOther, + Net::HTTPTemporaryRedirect then + raise FetchError.new('too many redirects', uri) if depth > 10 + + open_uri_or_path(response['Location'], last_modified, head, depth + 1) + else + raise FetchError.new("bad response #{response.message} #{response.code}", uri) + end + end + + ## + # Performs a Net::HTTP request of type +request_class+ on +uri+ returning + # a Net::HTTP response object. request maintains a table of persistent + # connections to reduce connect overhead. + + def request(uri, request_class, last_modified = nil) + request = request_class.new uri.request_uri + + unless uri.nil? || uri.user.nil? || uri.user.empty? then + request.basic_auth uri.user, uri.password + end + + ua = "RubyGems/#{Gem::RubyGemsVersion} #{Gem::Platform.local}" + ua << " Ruby/#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}" + ua << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL + ua << ")" + + request.add_field 'User-Agent', ua + request.add_field 'Connection', 'keep-alive' + request.add_field 'Keep-Alive', '30' + + if last_modified then + last_modified = last_modified.utc + request.add_field 'If-Modified-Since', last_modified.rfc2822 + end + + connection = connection_for uri + + retried = false + bad_response = false + + begin + @requests[connection.object_id] += 1 + response = connection.request request + say "#{request.method} #{response.code} #{response.message}: #{uri}" if + Gem.configuration.really_verbose + rescue Net::HTTPBadResponse + reset connection + + raise FetchError.new('too many bad responses', uri) if bad_response + + bad_response = true + retry + # HACK work around EOFError bug in Net::HTTP + # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible + # to install gems. + rescue EOFError, Errno::ECONNABORTED, Errno::ECONNRESET + requests = @requests[connection.object_id] + say "connection reset after #{requests} requests, retrying" if + Gem.configuration.really_verbose + + raise FetchError.new('too many connection resets', uri) if retried + + reset connection + + retried = true + retry + end + + response + end + + ## + # Resets HTTP connection +connection+. + + def reset(connection) + @requests.delete connection.object_id + + connection.finish + connection.start + end + + ## + # Checks if the provided string is a file:// URI. + + def file_uri?(uri) + uri =~ %r{\Afile://} + end + + ## + # Given a file:// URI, returns its local path. + + def get_file_uri_path(uri) + uri.sub(%r{\Afile://}, '') + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/require_paths_builder.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/require_paths_builder.rb new file mode 100644 index 0000000..fe4f593 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/require_paths_builder.rb @@ -0,0 +1,15 @@ +module Gem + module RequirePathsBuilder + def write_require_paths_file_if_needed(spec = @spec, gem_home = @gem_home) + return if spec.require_paths == ["lib"] && (spec.bindir.nil? || spec.bindir == "bin") + file_name = File.join(gem_home, 'gems', "#{@spec.full_name}", ".require_paths") + file_name.untaint + File.open(file_name, "w") do |file| + spec.require_paths.each do |path| + file.puts path + end + file.puts spec.bindir if spec.bindir + end + end + end +end \ No newline at end of file diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/requirement.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/requirement.rb new file mode 100644 index 0000000..c9128b5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/requirement.rb @@ -0,0 +1,163 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems/version' + +## +# Requirement version includes a prefaced comparator in addition +# to a version number. +# +# A Requirement object can actually contain multiple, er, +# requirements, as in (> 1.2, < 2.0). + +class Gem::Requirement + + include Comparable + + attr_reader :requirements + + OPS = { + "=" => lambda { |v, r| v == r }, + "!=" => lambda { |v, r| v != r }, + ">" => lambda { |v, r| v > r }, + "<" => lambda { |v, r| v < r }, + ">=" => lambda { |v, r| v >= r }, + "<=" => lambda { |v, r| v <= r }, + "~>" => lambda { |v, r| v >= r && v < r.bump } + } + + OP_RE = /#{OPS.keys.map{ |k| Regexp.quote k }.join '|'}/o + + ## + # Factory method to create a Gem::Requirement object. Input may be a + # Version, a String, or nil. Intended to simplify client code. + # + # If the input is "weird", the default version requirement is returned. + + def self.create(input) + case input + when Gem::Requirement then + input + when Gem::Version, Array then + new input + else + if input.respond_to? :to_str then + self.new [input.to_str] + else + self.default + end + end + end + + ## + # A default "version requirement" can surely _only_ be '>= 0'. + #-- + # This comment once said: + # + # "A default "version requirement" can surely _only_ be '> 0'." + + def self.default + self.new ['>= 0'] + end + + ## + # Constructs a Requirement from +requirements+ which can be a String, a + # Gem::Version, or an Array of those. See parse for details on the + # formatting of requirement strings. + + def initialize(requirements) + @requirements = case requirements + when Array then + requirements.map do |requirement| + parse(requirement) + end + else + [parse(requirements)] + end + @version = nil # Avoid warnings. + end + + ## + # Marshal raw requirements, rather than the full object + + def marshal_dump # :nodoc: + [@requirements] + end + + ## + # Load custom marshal format + + def marshal_load(array) # :nodoc: + @requirements = array[0] + @version = nil + end + + def to_s # :nodoc: + as_list.join(", ") + end + + def as_list + normalize + @requirements.collect { |req| + "#{req[0]} #{req[1]}" + } + end + + def normalize + return if not defined? @version or @version.nil? + @requirements = [parse(@version)] + @nums = nil + @version = nil + @op = nil + end + + ## + # True if this requirement satisfied by the Gem::Version +version+. + + def satisfied_by?(version) + normalize + @requirements.all? { |op, rv| satisfy?(op, version, rv) } + end + + ## + # Is "+version+ +op+ +required_version+" satisfied? + + def satisfy?(op, version, required_version) + OPS[op].call(version, required_version) + end + + ## + # Parse the version requirement obj returning the operator and version. + # + # The requirement can be a String or a Gem::Version. A String can be an + # operator (<, <=, =, =>, >, !=, ~>), a version number, or both, operator + # first. + + def parse(obj) + case obj + when /^\s*(#{OP_RE})\s*([0-9.]+)\s*$/o then + [$1, Gem::Version.new($2)] + when /^\s*([0-9.]+)\s*$/ then + ['=', Gem::Version.new($1)] + when /^\s*(#{OP_RE})\s*$/o then + [$1, Gem::Version.new('0')] + when Gem::Version then + ['=', obj] + else + fail ArgumentError, "Illformed requirement [#{obj.inspect}]" + end + end + + def <=>(other) # :nodoc: + to_s <=> other.to_s + end + + def hash # :nodoc: + to_s.hash + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/rubygems_version.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/rubygems_version.rb new file mode 100644 index 0000000..d7b5622 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/rubygems_version.rb @@ -0,0 +1,6 @@ +# DO NOT EDIT +# This file is auto-generated by build scripts. +# See: rake update_version +module Gem + RubyGemsVersion = '1.3.1' +end diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/security.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/security.rb new file mode 100644 index 0000000..abf3cf4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/security.rb @@ -0,0 +1,786 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' +require 'rubygems/gem_openssl' + +# = Signed Gems README +# +# == Table of Contents +# * Overview +# * Walkthrough +# * Command-Line Options +# * OpenSSL Reference +# * Bugs/TODO +# * About the Author +# +# == Overview +# +# Gem::Security implements cryptographic signatures in RubyGems. The section +# below is a step-by-step guide to using signed gems and generating your own. +# +# == Walkthrough +# +# In order to start signing your gems, you'll need to build a private key and +# a self-signed certificate. Here's how: +# +# # build a private key and certificate for gemmaster@example.com +# $ gem cert --build gemmaster@example.com +# +# This could take anywhere from 5 seconds to 10 minutes, depending on the +# speed of your computer (public key algorithms aren't exactly the speediest +# crypto algorithms in the world). When it's finished, you'll see the files +# "gem-private_key.pem" and "gem-public_cert.pem" in the current directory. +# +# First things first: take the "gem-private_key.pem" file and move it +# somewhere private, preferably a directory only you have access to, a floppy +# (yuck!), a CD-ROM, or something comparably secure. Keep your private key +# hidden; if it's compromised, someone can sign packages as you (note: PKI has +# ways of mitigating the risk of stolen keys; more on that later). +# +# Now, let's sign an existing gem. I'll be using my Imlib2-Ruby bindings, but +# you can use whatever gem you'd like. Open up your existing gemspec file and +# add the following lines: +# +# # signing key and certificate chain +# s.signing_key = '/mnt/floppy/gem-private_key.pem' +# s.cert_chain = ['gem-public_cert.pem'] +# +# (Be sure to replace "/mnt/floppy" with the ultra-secret path to your private +# key). +# +# After that, go ahead and build your gem as usual. Congratulations, you've +# just built your first signed gem! If you peek inside your gem file, you'll +# see a couple of new files have been added: +# +# $ tar tf tar tf Imlib2-Ruby-0.5.0.gem +# data.tar.gz +# data.tar.gz.sig +# metadata.gz +# metadata.gz.sig +# +# Now let's verify the signature. Go ahead and install the gem, but add the +# following options: "-P HighSecurity", like this: +# +# # install the gem with using the security policy "HighSecurity" +# $ sudo gem install Imlib2-Ruby-0.5.0.gem -P HighSecurity +# +# The -P option sets your security policy -- we'll talk about that in just a +# minute. Eh, what's this? +# +# Attempting local installation of 'Imlib2-Ruby-0.5.0.gem' +# ERROR: Error installing gem Imlib2-Ruby-0.5.0.gem[.gem]: Couldn't +# verify data signature: Untrusted Signing Chain Root: cert = +# '/CN=gemmaster/DC=example/DC=com', error = 'path +# "/root/.rubygems/trust/cert-15dbb43a6edf6a70a85d4e784e2e45312cff7030.pem" +# does not exist' +# +# The culprit here is the security policy. RubyGems has several different +# security policies. Let's take a short break and go over the security +# policies. Here's a list of the available security policies, and a brief +# description of each one: +# +# * NoSecurity - Well, no security at all. Signed packages are treated like +# unsigned packages. +# * LowSecurity - Pretty much no security. If a package is signed then +# RubyGems will make sure the signature matches the signing +# certificate, and that the signing certificate hasn't expired, but +# that's it. A malicious user could easily circumvent this kind of +# security. +# * MediumSecurity - Better than LowSecurity and NoSecurity, but still +# fallible. Package contents are verified against the signing +# certificate, and the signing certificate is checked for validity, +# and checked against the rest of the certificate chain (if you don't +# know what a certificate chain is, stay tuned, we'll get to that). +# The biggest improvement over LowSecurity is that MediumSecurity +# won't install packages that are signed by untrusted sources. +# Unfortunately, MediumSecurity still isn't totally secure -- a +# malicious user can still unpack the gem, strip the signatures, and +# distribute the gem unsigned. +# * HighSecurity - Here's the bugger that got us into this mess. +# The HighSecurity policy is identical to the MediumSecurity policy, +# except that it does not allow unsigned gems. A malicious user +# doesn't have a whole lot of options here; he can't modify the +# package contents without invalidating the signature, and he can't +# modify or remove signature or the signing certificate chain, or +# RubyGems will simply refuse to install the package. Oh well, maybe +# he'll have better luck causing problems for CPAN users instead :). +# +# So, the reason RubyGems refused to install our shiny new signed gem was +# because it was from an untrusted source. Well, my code is infallible +# (hah!), so I'm going to add myself as a trusted source. +# +# Here's how: +# +# # add trusted certificate +# gem cert --add gem-public_cert.pem +# +# I've added my public certificate as a trusted source. Now I can install +# packages signed my private key without any hassle. Let's try the install +# command above again: +# +# # install the gem with using the HighSecurity policy (and this time +# # without any shenanigans) +# $ sudo gem install Imlib2-Ruby-0.5.0.gem -P HighSecurity +# +# This time RubyGems should accept your signed package and begin installing. +# While you're waiting for RubyGems to work it's magic, have a look at some of +# the other security commands: +# +# Usage: gem cert [options] +# +# Options: +# -a, --add CERT Add a trusted certificate. +# -l, --list List trusted certificates. +# -r, --remove STRING Remove trusted certificates containing STRING. +# -b, --build EMAIL_ADDR Build private key and self-signed certificate +# for EMAIL_ADDR. +# -C, --certificate CERT Certificate for --sign command. +# -K, --private-key KEY Private key for --sign command. +# -s, --sign NEWCERT Sign a certificate with my key and certificate. +# +# (By the way, you can pull up this list any time you'd like by typing "gem +# cert --help") +# +# Hmm. We've already covered the "--build" option, and the "--add", "--list", +# and "--remove" commands seem fairly straightforward; they allow you to add, +# list, and remove the certificates in your trusted certificate list. But +# what's with this "--sign" option? +# +# To answer that question, let's take a look at "certificate chains", a +# concept I mentioned earlier. There are a couple of problems with +# self-signed certificates: first of all, self-signed certificates don't offer +# a whole lot of security. Sure, the certificate says Yukihiro Matsumoto, but +# how do I know it was actually generated and signed by matz himself unless he +# gave me the certificate in person? +# +# The second problem is scalability. Sure, if there are 50 gem authors, then +# I have 50 trusted certificates, no problem. What if there are 500 gem +# authors? 1000? Having to constantly add new trusted certificates is a +# pain, and it actually makes the trust system less secure by encouraging +# RubyGems users to blindly trust new certificates. +# +# Here's where certificate chains come in. A certificate chain establishes an +# arbitrarily long chain of trust between an issuing certificate and a child +# certificate. So instead of trusting certificates on a per-developer basis, +# we use the PKI concept of certificate chains to build a logical hierarchy of +# trust. Here's a hypothetical example of a trust hierarchy based (roughly) +# on geography: +# +# +# -------------------------- +# | rubygems@rubyforge.org | +# -------------------------- +# | +# ----------------------------------- +# | | +# ---------------------------- ----------------------------- +# | seattle.rb@zenspider.com | | dcrubyists@richkilmer.com | +# ---------------------------- ----------------------------- +# | | | | +# --------------- ---------------- ----------- -------------- +# | alf@seattle | | bob@portland | | pabs@dc | | tomcope@dc | +# --------------- ---------------- ----------- -------------- +# +# +# Now, rather than having 4 trusted certificates (one for alf@seattle, +# bob@portland, pabs@dc, and tomecope@dc), a user could actually get by with 1 +# certificate: the "rubygems@rubyforge.org" certificate. Here's how it works: +# +# I install "Alf2000-Ruby-0.1.0.gem", a package signed by "alf@seattle". I've +# never heard of "alf@seattle", but his certificate has a valid signature from +# the "seattle.rb@zenspider.com" certificate, which in turn has a valid +# signature from the "rubygems@rubyforge.org" certificate. Voila! At this +# point, it's much more reasonable for me to trust a package signed by +# "alf@seattle", because I can establish a chain to "rubygems@rubyforge.org", +# which I do trust. +# +# And the "--sign" option allows all this to happen. A developer creates +# their build certificate with the "--build" option, then has their +# certificate signed by taking it with them to their next regional Ruby meetup +# (in our hypothetical example), and it's signed there by the person holding +# the regional RubyGems signing certificate, which is signed at the next +# RubyConf by the holder of the top-level RubyGems certificate. At each point +# the issuer runs the same command: +# +# # sign a certificate with the specified key and certificate +# # (note that this modifies client_cert.pem!) +# $ gem cert -K /mnt/floppy/issuer-priv_key.pem -C issuer-pub_cert.pem +# --sign client_cert.pem +# +# Then the holder of issued certificate (in this case, our buddy +# "alf@seattle"), can start using this signed certificate to sign RubyGems. +# By the way, in order to let everyone else know about his new fancy signed +# certificate, "alf@seattle" would change his gemspec file to look like this: +# +# # signing key (still kept in an undisclosed location!) +# s.signing_key = '/mnt/floppy/alf-private_key.pem' +# +# # certificate chain (includes the issuer certificate now too) +# s.cert_chain = ['/home/alf/doc/seattlerb-public_cert.pem', +# '/home/alf/doc/alf_at_seattle-public_cert.pem'] +# +# Obviously, this RubyGems trust infrastructure doesn't exist yet. Also, in +# the "real world" issuers actually generate the child certificate from a +# certificate request, rather than sign an existing certificate. And our +# hypothetical infrastructure is missing a certificate revocation system. +# These are that can be fixed in the future... +# +# I'm sure your new signed gem has finished installing by now (unless you're +# installing rails and all it's dependencies, that is ;D). At this point you +# should know how to do all of these new and interesting things: +# +# * build a gem signing key and certificate +# * modify your existing gems to support signing +# * adjust your security policy +# * modify your trusted certificate list +# * sign a certificate +# +# If you've got any questions, feel free to contact me at the email address +# below. The next couple of sections +# +# +# == Command-Line Options +# +# Here's a brief summary of the certificate-related command line options: +# +# gem install +# -P, --trust-policy POLICY Specify gem trust policy. +# +# gem cert +# -a, --add CERT Add a trusted certificate. +# -l, --list List trusted certificates. +# -r, --remove STRING Remove trusted certificates containing +# STRING. +# -b, --build EMAIL_ADDR Build private key and self-signed +# certificate for EMAIL_ADDR. +# -C, --certificate CERT Certificate for --sign command. +# -K, --private-key KEY Private key for --sign command. +# -s, --sign NEWCERT Sign a certificate with my key and +# certificate. +# +# A more detailed description of each options is available in the walkthrough +# above. +# +# +# == OpenSSL Reference +# +# The .pem files generated by --build and --sign are just basic OpenSSL PEM +# files. Here's a couple of useful commands for manipulating them: +# +# # convert a PEM format X509 certificate into DER format: +# # (note: Windows .cer files are X509 certificates in DER format) +# $ openssl x509 -in input.pem -outform der -out output.der +# +# # print out the certificate in a human-readable format: +# $ openssl x509 -in input.pem -noout -text +# +# And you can do the same thing with the private key file as well: +# +# # convert a PEM format RSA key into DER format: +# $ openssl rsa -in input_key.pem -outform der -out output_key.der +# +# # print out the key in a human readable format: +# $ openssl rsa -in input_key.pem -noout -text +# +# == Bugs/TODO +# +# * There's no way to define a system-wide trust list. +# * custom security policies (from a YAML file, etc) +# * Simple method to generate a signed certificate request +# * Support for OCSP, SCVP, CRLs, or some other form of cert +# status check (list is in order of preference) +# * Support for encrypted private keys +# * Some sort of semi-formal trust hierarchy (see long-winded explanation +# above) +# * Path discovery (for gem certificate chains that don't have a self-signed +# root) -- by the way, since we don't have this, THE ROOT OF THE CERTIFICATE +# CHAIN MUST BE SELF SIGNED if Policy#verify_root is true (and it is for the +# MediumSecurity and HighSecurity policies) +# * Better explanation of X509 naming (ie, we don't have to use email +# addresses) +# * Possible alternate signing mechanisms (eg, via PGP). this could be done +# pretty easily by adding a :signing_type attribute to the gemspec, then add +# the necessary support in other places +# * Honor AIA field (see note about OCSP above) +# * Maybe honor restriction extensions? +# * Might be better to store the certificate chain as a PKCS#7 or PKCS#12 +# file, instead of an array embedded in the metadata. ideas? +# * Possibly embed signature and key algorithms into metadata (right now +# they're assumed to be the same as what's set in Gem::Security::OPT) +# +# == About the Author +# +# Paul Duncan +# http://pablotron.org/ + +module Gem::Security + + class Exception < Gem::Exception; end + + # + # default options for most of the methods below + # + OPT = { + # private key options + :key_algo => Gem::SSL::PKEY_RSA, + :key_size => 2048, + + # public cert options + :cert_age => 365 * 24 * 3600, # 1 year + :dgst_algo => Gem::SSL::DIGEST_SHA1, + + # x509 certificate extensions + :cert_exts => { + 'basicConstraints' => 'CA:FALSE', + 'subjectKeyIdentifier' => 'hash', + 'keyUsage' => 'keyEncipherment,dataEncipherment,digitalSignature', + }, + + # save the key and cert to a file in build_self_signed_cert()? + :save_key => true, + :save_cert => true, + + # if you define either of these, then they'll be used instead of + # the output_fmt macro below + :save_key_path => nil, + :save_cert_path => nil, + + # output name format for self-signed certs + :output_fmt => 'gem-%s.pem', + :munge_re => Regexp.new(/[^a-z0-9_.-]+/), + + # output directory for trusted certificate checksums + :trust_dir => File::join(Gem.user_home, '.gem', 'trust'), + + # default permissions for trust directory and certs + :perms => { + :trust_dir => 0700, + :trusted_cert => 0600, + :signing_cert => 0600, + :signing_key => 0600, + }, + } + + # + # A Gem::Security::Policy object encapsulates the settings for verifying + # signed gem files. This is the base class. You can either declare an + # instance of this or use one of the preset security policies below. + # + class Policy + attr_accessor :verify_data, :verify_signer, :verify_chain, + :verify_root, :only_trusted, :only_signed + + # + # Create a new Gem::Security::Policy object with the given mode and + # options. + # + def initialize(policy = {}, opt = {}) + # set options + @opt = Gem::Security::OPT.merge(opt) + + # build policy + policy.each_pair do |key, val| + case key + when :verify_data then @verify_data = val + when :verify_signer then @verify_signer = val + when :verify_chain then @verify_chain = val + when :verify_root then @verify_root = val + when :only_trusted then @only_trusted = val + when :only_signed then @only_signed = val + end + end + end + + # + # Get the path to the file for this cert. + # + def self.trusted_cert_path(cert, opt = {}) + opt = Gem::Security::OPT.merge(opt) + + # get digest algorithm, calculate checksum of root.subject + algo = opt[:dgst_algo] + dgst = algo.hexdigest(cert.subject.to_s) + + # build path to trusted cert file + name = "cert-#{dgst}.pem" + + # join and return path components + File::join(opt[:trust_dir], name) + end + + # + # Verify that the gem data with the given signature and signing chain + # matched this security policy at the specified time. + # + def verify_gem(signature, data, chain, time = Time.now) + Gem.ensure_ssl_available + cert_class = OpenSSL::X509::Certificate + exc = Gem::Security::Exception + chain ||= [] + + chain = chain.map{ |str| cert_class.new(str) } + signer, ch_len = chain[-1], chain.size + + # make sure signature is valid + if @verify_data + # get digest algorithm (TODO: this should be configurable) + dgst = @opt[:dgst_algo] + + # verify the data signature (this is the most important part, so don't + # screw it up :D) + v = signer.public_key.verify(dgst.new, signature, data) + raise exc, "Invalid Gem Signature" unless v + + # make sure the signer is valid + if @verify_signer + # make sure the signing cert is valid right now + v = signer.check_validity(nil, time) + raise exc, "Invalid Signature: #{v[:desc]}" unless v[:is_valid] + end + end + + # make sure the certificate chain is valid + if @verify_chain + # iterate down over the chain and verify each certificate against it's + # issuer + (ch_len - 1).downto(1) do |i| + issuer, cert = chain[i - 1, 2] + v = cert.check_validity(issuer, time) + raise exc, "%s: cert = '%s', error = '%s'" % [ + 'Invalid Signing Chain', cert.subject, v[:desc] + ] unless v[:is_valid] + end + + # verify root of chain + if @verify_root + # make sure root is self-signed + root = chain[0] + raise exc, "%s: %s (subject = '%s', issuer = '%s')" % [ + 'Invalid Signing Chain Root', + 'Subject does not match Issuer for Gem Signing Chain', + root.subject.to_s, + root.issuer.to_s, + ] unless root.issuer.to_s == root.subject.to_s + + # make sure root is valid + v = root.check_validity(root, time) + raise exc, "%s: cert = '%s', error = '%s'" % [ + 'Invalid Signing Chain Root', root.subject, v[:desc] + ] unless v[:is_valid] + + # verify that the chain root is trusted + if @only_trusted + # get digest algorithm, calculate checksum of root.subject + algo = @opt[:dgst_algo] + path = Gem::Security::Policy.trusted_cert_path(root, @opt) + + # check to make sure trusted path exists + raise exc, "%s: cert = '%s', error = '%s'" % [ + 'Untrusted Signing Chain Root', + root.subject.to_s, + "path \"#{path}\" does not exist", + ] unless File.exist?(path) + + # load calculate digest from saved cert file + save_cert = OpenSSL::X509::Certificate.new(File.read(path)) + save_dgst = algo.digest(save_cert.public_key.to_s) + + # create digest of public key + pkey_str = root.public_key.to_s + cert_dgst = algo.digest(pkey_str) + + # now compare the two digests, raise exception + # if they don't match + raise exc, "%s: %s (saved = '%s', root = '%s')" % [ + 'Invalid Signing Chain Root', + "Saved checksum doesn't match root checksum", + save_dgst, cert_dgst, + ] unless save_dgst == cert_dgst + end + end + + # return the signing chain + chain.map { |cert| cert.subject } + end + end + end + + # + # No security policy: all package signature checks are disabled. + # + NoSecurity = Policy.new( + :verify_data => false, + :verify_signer => false, + :verify_chain => false, + :verify_root => false, + :only_trusted => false, + :only_signed => false + ) + + # + # AlmostNo security policy: only verify that the signing certificate is the + # one that actually signed the data. Make no attempt to verify the signing + # certificate chain. + # + # This policy is basically useless. better than nothing, but can still be + # easily spoofed, and is not recommended. + # + AlmostNoSecurity = Policy.new( + :verify_data => true, + :verify_signer => false, + :verify_chain => false, + :verify_root => false, + :only_trusted => false, + :only_signed => false + ) + + # + # Low security policy: only verify that the signing certificate is actually + # the gem signer, and that the signing certificate is valid. + # + # This policy is better than nothing, but can still be easily spoofed, and + # is not recommended. + # + LowSecurity = Policy.new( + :verify_data => true, + :verify_signer => true, + :verify_chain => false, + :verify_root => false, + :only_trusted => false, + :only_signed => false + ) + + # + # Medium security policy: verify the signing certificate, verify the signing + # certificate chain all the way to the root certificate, and only trust root + # certificates that we have explicitly allowed trust for. + # + # This security policy is reasonable, but it allows unsigned packages, so a + # malicious person could simply delete the package signature and pass the + # gem off as unsigned. + # + MediumSecurity = Policy.new( + :verify_data => true, + :verify_signer => true, + :verify_chain => true, + :verify_root => true, + :only_trusted => true, + :only_signed => false + ) + + # + # High security policy: only allow signed gems to be installed, verify the + # signing certificate, verify the signing certificate chain all the way to + # the root certificate, and only trust root certificates that we have + # explicitly allowed trust for. + # + # This security policy is significantly more difficult to bypass, and offers + # a reasonable guarantee that the contents of the gem have not been altered. + # + HighSecurity = Policy.new( + :verify_data => true, + :verify_signer => true, + :verify_chain => true, + :verify_root => true, + :only_trusted => true, + :only_signed => true + ) + + # + # Hash of configured security policies + # + Policies = { + 'NoSecurity' => NoSecurity, + 'AlmostNoSecurity' => AlmostNoSecurity, + 'LowSecurity' => LowSecurity, + 'MediumSecurity' => MediumSecurity, + 'HighSecurity' => HighSecurity, + } + + # + # Sign the cert cert with @signing_key and @signing_cert, using the digest + # algorithm opt[:dgst_algo]. Returns the newly signed certificate. + # + def self.sign_cert(cert, signing_key, signing_cert, opt = {}) + opt = OPT.merge(opt) + + # set up issuer information + cert.issuer = signing_cert.subject + cert.sign(signing_key, opt[:dgst_algo].new) + + cert + end + + # + # Make sure the trust directory exists. If it does exist, make sure it's + # actually a directory. If not, then create it with the appropriate + # permissions. + # + def self.verify_trust_dir(path, perms) + # if the directory exists, then make sure it is in fact a directory. if + # it doesn't exist, then create it with the appropriate permissions + if File.exist?(path) + # verify that the trust directory is actually a directory + unless File.directory?(path) + err = "trust directory #{path} isn't a directory" + raise Gem::Security::Exception, err + end + else + # trust directory doesn't exist, so create it with permissions + FileUtils.mkdir_p(path) + FileUtils.chmod(perms, path) + end + end + + # + # Build a certificate from the given DN and private key. + # + def self.build_cert(name, key, opt = {}) + Gem.ensure_ssl_available + opt = OPT.merge(opt) + + # create new cert + ret = OpenSSL::X509::Certificate.new + + # populate cert attributes + ret.version = 2 + ret.serial = 0 + ret.public_key = key.public_key + ret.not_before = Time.now + ret.not_after = Time.now + opt[:cert_age] + ret.subject = name + + # add certificate extensions + ef = OpenSSL::X509::ExtensionFactory.new(nil, ret) + ret.extensions = opt[:cert_exts].map { |k, v| ef.create_extension(k, v) } + + # sign cert + i_key, i_cert = opt[:issuer_key] || key, opt[:issuer_cert] || ret + ret = sign_cert(ret, i_key, i_cert, opt) + + # return cert + ret + end + + # + # Build a self-signed certificate for the given email address. + # + def self.build_self_signed_cert(email_addr, opt = {}) + Gem.ensure_ssl_available + opt = OPT.merge(opt) + path = { :key => nil, :cert => nil } + + # split email address up + cn, dcs = email_addr.split('@') + dcs = dcs.split('.') + + # munge email CN and DCs + cn = cn.gsub(opt[:munge_re], '_') + dcs = dcs.map { |dc| dc.gsub(opt[:munge_re], '_') } + + # create DN + name = "CN=#{cn}/" << dcs.map { |dc| "DC=#{dc}" }.join('/') + name = OpenSSL::X509::Name::parse(name) + + # build private key + key = opt[:key_algo].new(opt[:key_size]) + + # method name pretty much says it all :) + verify_trust_dir(opt[:trust_dir], opt[:perms][:trust_dir]) + + # if we're saving the key, then write it out + if opt[:save_key] + path[:key] = opt[:save_key_path] || (opt[:output_fmt] % 'private_key') + File.open(path[:key], 'wb') do |file| + file.chmod(opt[:perms][:signing_key]) + file.write(key.to_pem) + end + end + + # build self-signed public cert from key + cert = build_cert(name, key, opt) + + # if we're saving the cert, then write it out + if opt[:save_cert] + path[:cert] = opt[:save_cert_path] || (opt[:output_fmt] % 'public_cert') + File.open(path[:cert], 'wb') do |file| + file.chmod(opt[:perms][:signing_cert]) + file.write(cert.to_pem) + end + end + + # return key, cert, and paths (if applicable) + { :key => key, :cert => cert, + :key_path => path[:key], :cert_path => path[:cert] } + end + + # + # Add certificate to trusted cert list. + # + # Note: At the moment these are stored in OPT[:trust_dir], although that + # directory may change in the future. + # + def self.add_trusted_cert(cert, opt = {}) + opt = OPT.merge(opt) + + # get destination path + path = Gem::Security::Policy.trusted_cert_path(cert, opt) + + # verify trust directory (can't write to nowhere, you know) + verify_trust_dir(opt[:trust_dir], opt[:perms][:trust_dir]) + + # write cert to output file + File.open(path, 'wb') do |file| + file.chmod(opt[:perms][:trusted_cert]) + file.write(cert.to_pem) + end + + # return nil + nil + end + + # + # Basic OpenSSL-based package signing class. + # + class Signer + attr_accessor :key, :cert_chain + + def initialize(key, cert_chain) + Gem.ensure_ssl_available + @algo = Gem::Security::OPT[:dgst_algo] + @key, @cert_chain = key, cert_chain + + # check key, if it's a file, and if it's key, leave it alone + if @key && !@key.kind_of?(OpenSSL::PKey::PKey) + @key = OpenSSL::PKey::RSA.new(File.read(@key)) + end + + # check cert chain, if it's a file, load it, if it's cert data, convert + # it into a cert object, and if it's a cert object, leave it alone + if @cert_chain + @cert_chain = @cert_chain.map do |cert| + # check cert, if it's a file, load it, if it's cert data, convert it + # into a cert object, and if it's a cert object, leave it alone + if cert && !cert.kind_of?(OpenSSL::X509::Certificate) + cert = File.read(cert) if File::exist?(cert) + cert = OpenSSL::X509::Certificate.new(cert) + end + cert + end + end + end + + # + # Sign data with given digest algorithm + # + def sign(data) + @key.sign(@algo.new, data) + end + + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/server.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/server.rb new file mode 100644 index 0000000..2c617ff --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/server.rb @@ -0,0 +1,629 @@ +require 'webrick' +require 'yaml' +require 'zlib' +require 'erb' + +require 'rubygems' +require 'rubygems/doc_manager' + +## +# Gem::Server and allows users to serve gems for consumption by +# `gem --remote-install`. +# +# gem_server starts an HTTP server on the given port and serves the following: +# * "/" - Browsing of gem spec files for installed gems +# * "/specs.#{Gem.marshal_version}.gz" - specs name/version/platform index +# * "/latest_specs.#{Gem.marshal_version}.gz" - latest specs +# name/version/platform index +# * "/quick/" - Individual gemspecs +# * "/gems" - Direct access to download the installable gems +# * legacy indexes: +# * "/Marshal.#{Gem.marshal_version}" - Full SourceIndex dump of metadata +# for installed gems +# * "/yaml" - YAML dump of metadata for installed gems - deprecated +# +# == Usage +# +# gem_server = Gem::Server.new Gem.dir, 8089, false +# gem_server.run +# +#-- +# TODO Refactor into a real WEBrick servlet to remove code duplication. + +class Gem::Server + + include Gem::UserInteraction + + DOC_TEMPLATE = <<-'WEBPAGE' + + + + + + RubyGems Documentation Index + + + +
      +

      RubyGems Documentation Index

      +
      + + +
      +
      +
      +

      Summary

      +

      There are <%=values["gem_count"]%> gems installed:

      +

      + <%= values["specs"].map { |v| "#{v["name"]}" }.join ', ' %>. +

      Gems

      + +
      + <% values["specs"].each do |spec| %> +
      + <% if spec["first_name_entry"] then %> + "> + <% end %> + + <%=spec["name"]%> <%=spec["version"]%> + + <% if spec["rdoc_installed"] then %> + ">[rdoc] + <% else %> + [rdoc] + <% end %> + + <% if spec["homepage"] then %> + " title="<%=spec["homepage"]%>">[www] + <% else %> + [www] + <% end %> + + <% if spec["has_deps"] then %> + - depends on + <%= spec["dependencies"].map { |v| "#{v["name"]}" }.join ', ' %>. + <% end %> +
      +
      + <%=spec["summary"]%> + <% if spec["executables"] then %> +
      + + <% if spec["only_one_executable"] then %> + Executable is + <% else %> + Executables are + <%end%> + + <%= spec["executables"].map { |v| "#{v["executable"]}"}.join ', ' %>. + + <%end%> +
      +
      +
      + <% end %> +
      + +
      +
      +
      + + + + WEBPAGE + + # CSS is copy & paste from rdoc-style.css, RDoc V1.0.1 - 20041108 + RDOC_CSS = <<-RDOCCSS +body { + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size: 90%; + margin: 0; + margin-left: 40px; + padding: 0; + background: white; +} + +h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; } +h1 { font-size: 150%; } +h2,h3,h4 { margin-top: 1em; } + +a { background: #eef; color: #039; text-decoration: none; } +a:hover { background: #039; color: #eef; } + +/* Override the base stylesheets Anchor inside a table cell */ +td > a { + background: transparent; + color: #039; + text-decoration: none; +} + +/* and inside a section title */ +.section-title > a { + background: transparent; + color: #eee; + text-decoration: none; +} + +/* === Structural elements =================================== */ + +div#index { + margin: 0; + margin-left: -40px; + padding: 0; + font-size: 90%; +} + + +div#index a { + margin-left: 0.7em; +} + +div#index .section-bar { + margin-left: 0px; + padding-left: 0.7em; + background: #ccc; + font-size: small; +} + + +div#classHeader, div#fileHeader { + width: auto; + color: white; + padding: 0.5em 1.5em 0.5em 1.5em; + margin: 0; + margin-left: -40px; + border-bottom: 3px solid #006; +} + +div#classHeader a, div#fileHeader a { + background: inherit; + color: white; +} + +div#classHeader td, div#fileHeader td { + background: inherit; + color: white; +} + + +div#fileHeader { + background: #057; +} + +div#classHeader { + background: #048; +} + + +.class-name-in-header { + font-size: 180%; + font-weight: bold; +} + + +div#bodyContent { + padding: 0 1.5em 0 1.5em; +} + +div#description { + padding: 0.5em 1.5em; + background: #efefef; + border: 1px dotted #999; +} + +div#description h1,h2,h3,h4,h5,h6 { + color: #125;; + background: transparent; +} + +div#validator-badges { + text-align: center; +} +div#validator-badges img { border: 0; } + +div#copyright { + color: #333; + background: #efefef; + font: 0.75em sans-serif; + margin-top: 5em; + margin-bottom: 0; + padding: 0.5em 2em; +} + + +/* === Classes =================================== */ + +table.header-table { + color: white; + font-size: small; +} + +.type-note { + font-size: small; + color: #DEDEDE; +} + +.xxsection-bar { + background: #eee; + color: #333; + padding: 3px; +} + +.section-bar { + color: #333; + border-bottom: 1px solid #999; + margin-left: -20px; +} + + +.section-title { + background: #79a; + color: #eee; + padding: 3px; + margin-top: 2em; + margin-left: -30px; + border: 1px solid #999; +} + +.top-aligned-row { vertical-align: top } +.bottom-aligned-row { vertical-align: bottom } + +/* --- Context section classes ----------------------- */ + +.context-row { } +.context-item-name { font-family: monospace; font-weight: bold; color: black; } +.context-item-value { font-size: small; color: #448; } +.context-item-desc { color: #333; padding-left: 2em; } + +/* --- Method classes -------------------------- */ +.method-detail { + background: #efefef; + padding: 0; + margin-top: 0.5em; + margin-bottom: 1em; + border: 1px dotted #ccc; +} +.method-heading { + color: black; + background: #ccc; + border-bottom: 1px solid #666; + padding: 0.2em 0.5em 0 0.5em; +} +.method-signature { color: black; background: inherit; } +.method-name { font-weight: bold; } +.method-args { font-style: italic; } +.method-description { padding: 0 0.5em 0 0.5em; } + +/* --- Source code sections -------------------- */ + +a.source-toggle { font-size: 90%; } +div.method-source-code { + background: #262626; + color: #ffdead; + margin: 1em; + padding: 0.5em; + border: 1px dashed #999; + overflow: hidden; +} + +div.method-source-code pre { color: #ffdead; overflow: hidden; } + +/* --- Ruby keyword styles --------------------- */ + +.standalone-code { background: #221111; color: #ffdead; overflow: hidden; } + +.ruby-constant { color: #7fffd4; background: transparent; } +.ruby-keyword { color: #00ffff; background: transparent; } +.ruby-ivar { color: #eedd82; background: transparent; } +.ruby-operator { color: #00ffee; background: transparent; } +.ruby-identifier { color: #ffdead; background: transparent; } +.ruby-node { color: #ffa07a; background: transparent; } +.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } +.ruby-regexp { color: #ffa07a; background: transparent; } +.ruby-value { color: #7fffd4; background: transparent; } + RDOCCSS + + def self.run(options) + new(options[:gemdir], options[:port], options[:daemon]).run + end + + def initialize(gem_dir, port, daemon) + Socket.do_not_reverse_lookup = true + + @gem_dir = gem_dir + @port = port + @daemon = daemon + logger = WEBrick::Log.new nil, WEBrick::BasicLog::FATAL + @server = WEBrick::HTTPServer.new :DoNotListen => true, :Logger => logger + + @spec_dir = File.join @gem_dir, 'specifications' + + unless File.directory? @spec_dir then + raise ArgumentError, "#{@gem_dir} does not appear to be a gem repository" + end + + @source_index = Gem::SourceIndex.from_gems_in @spec_dir + end + + def Marshal(req, res) + @source_index.refresh! + + res['date'] = File.stat(@spec_dir).mtime + + index = Marshal.dump @source_index + + if req.request_method == 'HEAD' then + res['content-length'] = index.length + return + end + + if req.path =~ /Z$/ then + res['content-type'] = 'application/x-deflate' + index = Gem.deflate index + else + res['content-type'] = 'application/octet-stream' + end + + res.body << index + end + + def latest_specs(req, res) + @source_index.refresh! + + res['content-type'] = 'application/x-gzip' + + res['date'] = File.stat(@spec_dir).mtime + + specs = @source_index.latest_specs.sort.map do |spec| + platform = spec.original_platform + platform = Gem::Platform::RUBY if platform.nil? + [spec.name, spec.version, platform] + end + + specs = Marshal.dump specs + + if req.path =~ /\.gz$/ then + specs = Gem.gzip specs + res['content-type'] = 'application/x-gzip' + else + res['content-type'] = 'application/octet-stream' + end + + if req.request_method == 'HEAD' then + res['content-length'] = specs.length + else + res.body << specs + end + end + + def quick(req, res) + @source_index.refresh! + + res['content-type'] = 'text/plain' + res['date'] = File.stat(@spec_dir).mtime + + case req.request_uri.path + when '/quick/index' then + res.body << @source_index.map { |name,| name }.sort.join("\n") + when '/quick/index.rz' then + index = @source_index.map { |name,| name }.sort.join("\n") + res['content-type'] = 'application/x-deflate' + res.body << Gem.deflate(index) + when '/quick/latest_index' then + index = @source_index.latest_specs.map { |spec| spec.full_name } + res.body << index.sort.join("\n") + when '/quick/latest_index.rz' then + index = @source_index.latest_specs.map { |spec| spec.full_name } + res['content-type'] = 'application/x-deflate' + res.body << Gem.deflate(index.sort.join("\n")) + when %r|^/quick/(Marshal.#{Regexp.escape Gem.marshal_version}/)?(.*?)-([0-9.]+)(-.*?)?\.gemspec\.rz$| then + dep = Gem::Dependency.new $2, $3 + specs = @source_index.search dep + marshal_format = $1 + + selector = [$2, $3, $4].map { |s| s.inspect }.join ' ' + + platform = if $4 then + Gem::Platform.new $4.sub(/^-/, '') + else + Gem::Platform::RUBY + end + + specs = specs.select { |s| s.platform == platform } + + if specs.empty? then + res.status = 404 + res.body = "No gems found matching #{selector}" + elsif specs.length > 1 then + res.status = 500 + res.body = "Multiple gems found matching #{selector}" + elsif marshal_format then + res['content-type'] = 'application/x-deflate' + res.body << Gem.deflate(Marshal.dump(specs.first)) + else # deprecated YAML format + res['content-type'] = 'application/x-deflate' + res.body << Gem.deflate(specs.first.to_yaml) + end + else + raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found." + end + end + + def root(req, res) + @source_index.refresh! + res['date'] = File.stat(@spec_dir).mtime + + raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found." unless + req.path == '/' + + specs = [] + total_file_count = 0 + + @source_index.each do |path, spec| + total_file_count += spec.files.size + deps = spec.dependencies.map do |dep| + { "name" => dep.name, + "type" => dep.type, + "version" => dep.version_requirements.to_s, } + end + + deps = deps.sort_by { |dep| [dep["name"].downcase, dep["version"]] } + deps.last["is_last"] = true unless deps.empty? + + # executables + executables = spec.executables.sort.collect { |exec| {"executable" => exec} } + executables = nil if executables.empty? + executables.last["is_last"] = true if executables + + specs << { + "authors" => spec.authors.sort.join(", "), + "date" => spec.date.to_s, + "dependencies" => deps, + "doc_path" => "/doc_root/#{spec.full_name}/rdoc/index.html", + "executables" => executables, + "only_one_executable" => (executables && executables.size == 1), + "full_name" => spec.full_name, + "has_deps" => !deps.empty?, + "homepage" => spec.homepage, + "name" => spec.name, + "rdoc_installed" => Gem::DocManager.new(spec).rdoc_installed?, + "summary" => spec.summary, + "version" => spec.version.to_s, + } + end + + specs << { + "authors" => "Chad Fowler, Rich Kilmer, Jim Weirich, Eric Hodel and others", + "dependencies" => [], + "doc_path" => "/doc_root/rubygems-#{Gem::RubyGemsVersion}/rdoc/index.html", + "executables" => [{"executable" => 'gem', "is_last" => true}], + "only_one_executable" => true, + "full_name" => "rubygems-#{Gem::RubyGemsVersion}", + "has_deps" => false, + "homepage" => "http://rubygems.org/", + "name" => 'rubygems', + "rdoc_installed" => true, + "summary" => "RubyGems itself", + "version" => Gem::RubyGemsVersion, + } + + specs = specs.sort_by { |spec| [spec["name"].downcase, spec["version"]] } + specs.last["is_last"] = true + + # tag all specs with first_name_entry + last_spec = nil + specs.each do |spec| + is_first = last_spec.nil? || (last_spec["name"].downcase != spec["name"].downcase) + spec["first_name_entry"] = is_first + last_spec = spec + end + + # create page from template + template = ERB.new(DOC_TEMPLATE) + res['content-type'] = 'text/html' + + values = { "gem_count" => specs.size.to_s, "specs" => specs, + "total_file_count" => total_file_count.to_s } + + result = template.result binding + res.body = result + end + + def run + @server.listen nil, @port + + say "Starting gem server on http://localhost:#{@port}/" + + WEBrick::Daemon.start if @daemon + + @server.mount_proc "/yaml", method(:yaml) + @server.mount_proc "/yaml.Z", method(:yaml) + + @server.mount_proc "/Marshal.#{Gem.marshal_version}", method(:Marshal) + @server.mount_proc "/Marshal.#{Gem.marshal_version}.Z", method(:Marshal) + + @server.mount_proc "/specs.#{Gem.marshal_version}", method(:specs) + @server.mount_proc "/specs.#{Gem.marshal_version}.gz", method(:specs) + + @server.mount_proc "/latest_specs.#{Gem.marshal_version}", + method(:latest_specs) + @server.mount_proc "/latest_specs.#{Gem.marshal_version}.gz", + method(:latest_specs) + + @server.mount_proc "/quick/", method(:quick) + + @server.mount_proc("/gem-server-rdoc-style.css") do |req, res| + res['content-type'] = 'text/css' + res['date'] = File.stat(@spec_dir).mtime + res.body << RDOC_CSS + end + + @server.mount_proc "/", method(:root) + + paths = { "/gems" => "/cache/", "/doc_root" => "/doc/" } + paths.each do |mount_point, mount_dir| + @server.mount(mount_point, WEBrick::HTTPServlet::FileHandler, + File.join(@gem_dir, mount_dir), true) + end + + trap("INT") { @server.shutdown; exit! } + trap("TERM") { @server.shutdown; exit! } + + @server.start + end + + def specs(req, res) + @source_index.refresh! + + res['date'] = File.stat(@spec_dir).mtime + + specs = @source_index.sort.map do |_, spec| + platform = spec.original_platform + platform = Gem::Platform::RUBY if platform.nil? + [spec.name, spec.version, platform] + end + + specs = Marshal.dump specs + + if req.path =~ /\.gz$/ then + specs = Gem.gzip specs + res['content-type'] = 'application/x-gzip' + else + res['content-type'] = 'application/octet-stream' + end + + if req.request_method == 'HEAD' then + res['content-length'] = specs.length + else + res.body << specs + end + end + + def yaml(req, res) + @source_index.refresh! + + res['date'] = File.stat(@spec_dir).mtime + + index = @source_index.to_yaml + + if req.path =~ /Z$/ then + res['content-type'] = 'application/x-deflate' + index = Gem.deflate index + else + res['content-type'] = 'text/plain' + end + + if req.request_method == 'HEAD' then + res['content-length'] = index.length + return + end + + res.body << index + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/source_index.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/source_index.rb new file mode 100644 index 0000000..8a8db2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/source_index.rb @@ -0,0 +1,559 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' +require 'rubygems/user_interaction' +require 'rubygems/specification' +module Gem + autoload(:SpecFetcher, 'rubygems/spec_fetcher') +end + +## +# The SourceIndex object indexes all the gems available from a +# particular source (e.g. a list of gem directories, or a remote +# source). A SourceIndex maps a gem full name to a gem +# specification. +# +# NOTE:: The class used to be named Cache, but that became +# confusing when cached source fetchers where introduced. The +# constant Gem::Cache is an alias for this class to allow old +# YAMLized source index objects to load properly. + +class Gem::SourceIndex + + include Enumerable + + include Gem::UserInteraction + + attr_reader :gems # :nodoc: + + ## + # Directories to use to refresh this SourceIndex when calling refresh! + + attr_accessor :spec_dirs + + class << self + include Gem::UserInteraction + + ## + # Factory method to construct a source index instance for a given + # path. + # + # deprecated:: + # If supplied, from_installed_gems will act just like + # +from_gems_in+. This argument is deprecated and is provided + # just for backwards compatibility, and should not generally + # be used. + # + # return:: + # SourceIndex instance + + def from_installed_gems(*deprecated) + if deprecated.empty? + from_gems_in(*installed_spec_directories) + else + from_gems_in(*deprecated) # HACK warn + end + end + + ## + # Returns a list of directories from Gem.path that contain specifications. + + def installed_spec_directories + Gem.path.collect { |dir| File.join(dir, "specifications") } + end + + ## + # Creates a new SourceIndex from the ruby format gem specifications in + # +spec_dirs+. + + def from_gems_in(*spec_dirs) + source_index = new + source_index.spec_dirs = spec_dirs + source_index.refresh! + end + + ## + # Loads a ruby-format specification from +file_name+ and returns the + # loaded spec. + + def load_specification(file_name) + begin + spec_code = if RUBY_VERSION < '1.9' then + File.read file_name + else + File.read file_name, :encoding => 'UTF-8' + end.untaint + + gemspec = eval spec_code, binding, file_name + + if gemspec.is_a?(Gem::Specification) + gemspec.loaded_from = file_name + return gemspec + end + alert_warning "File '#{file_name}' does not evaluate to a gem specification" + rescue SignalException, SystemExit + raise + rescue SyntaxError => e + alert_warning e + alert_warning spec_code + rescue Exception => e + alert_warning "#{e.inspect}\n#{spec_code}" + alert_warning "Invalid .gemspec format in '#{file_name}'" + end + return nil + end + + end + + ## + # Constructs a source index instance from the provided + # specifications + # + # specifications:: + # [Hash] hash of [Gem name, Gem::Specification] pairs + + def initialize(specifications={}) + @gems = specifications + @spec_dirs = nil + end + + ## + # Reconstruct the source index from the specifications in +spec_dirs+. + + def load_gems_in(*spec_dirs) + @gems.clear + + spec_dirs.reverse_each do |spec_dir| + spec_files = Dir.glob File.join(spec_dir, '*.gemspec') + + spec_files.each do |spec_file| + gemspec = self.class.load_specification spec_file.untaint + add_spec gemspec if gemspec + end + end + + self + end + + ## + # Returns an Array specifications for the latest versions of each gem in + # this index. + + def latest_specs + result = Hash.new { |h,k| h[k] = [] } + latest = {} + + sort.each do |_, spec| + name = spec.name + curr_ver = spec.version + prev_ver = latest.key?(name) ? latest[name].version : nil + + next unless prev_ver.nil? or curr_ver >= prev_ver or + latest[name].platform != Gem::Platform::RUBY + + if prev_ver.nil? or + (curr_ver > prev_ver and spec.platform == Gem::Platform::RUBY) then + result[name].clear + latest[name] = spec + end + + if spec.platform != Gem::Platform::RUBY then + result[name].delete_if do |result_spec| + result_spec.platform == spec.platform + end + end + + result[name] << spec + end + + result.values.flatten + end + + ## + # Add a gem specification to the source index. + + def add_spec(gem_spec) + @gems[gem_spec.full_name] = gem_spec + end + + ## + # Add gem specifications to the source index. + + def add_specs(*gem_specs) + gem_specs.each do |spec| + add_spec spec + end + end + + ## + # Remove a gem specification named +full_name+. + + def remove_spec(full_name) + @gems.delete(full_name) + end + + ## + # Iterate over the specifications in the source index. + + def each(&block) # :yields: gem.full_name, gem + @gems.each(&block) + end + + ## + # The gem specification given a full gem spec name. + + def specification(full_name) + @gems[full_name] + end + + ## + # The signature for the source index. Changes in the signature indicate a + # change in the index. + + def index_signature + require 'rubygems/digest/sha2' + + Gem::SHA256.new.hexdigest(@gems.keys.sort.join(',')).to_s + end + + ## + # The signature for the given gem specification. + + def gem_signature(gem_full_name) + require 'rubygems/digest/sha2' + + Gem::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s + end + + def size + @gems.size + end + alias length size + + ## + # Find a gem by an exact match on the short name. + + def find_name(gem_name, version_requirement = Gem::Requirement.default) + dep = Gem::Dependency.new(/^#{gem_name}$/, version_requirement) + search dep + end + + ## + # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ + # is true, only gems matching Gem::Platform.local will be returned. An + # Array of matching Gem::Specification objects is returned. + # + # For backwards compatibility, a String or Regexp pattern may be passed as + # +gem_pattern+, and a Gem::Requirement for +platform_only+. This + # behavior is deprecated and will be removed. + + def search(gem_pattern, platform_only = false) + version_requirement = nil + only_platform = false + + # TODO - Remove support and warning for legacy arguments after 2008/11 + unless Gem::Dependency === gem_pattern + warn "#{Gem.location_of_caller.join ':'}:Warning: Gem::SourceIndex#search support for #{gem_pattern.class} patterns is deprecated" + end + + case gem_pattern + when Regexp then + version_requirement = platform_only || Gem::Requirement.default + when Gem::Dependency then + only_platform = platform_only + version_requirement = gem_pattern.version_requirements + gem_pattern = if Regexp === gem_pattern.name then + gem_pattern.name + elsif gem_pattern.name.empty? then + // + else + /^#{Regexp.escape gem_pattern.name}$/ + end + else + version_requirement = platform_only || Gem::Requirement.default + gem_pattern = /#{gem_pattern}/i + end + + unless Gem::Requirement === version_requirement then + version_requirement = Gem::Requirement.create version_requirement + end + + specs = @gems.values.select do |spec| + spec.name =~ gem_pattern and + version_requirement.satisfied_by? spec.version + end + + if only_platform then + specs = specs.select do |spec| + Gem::Platform.match spec.platform + end + end + + specs.sort_by { |s| s.sort_obj } + end + + ## + # Replaces the gems in the source index from specifications in the + # directories this source index was created from. Raises an exception if + # this source index wasn't created from a directory (via from_gems_in or + # from_installed_gems, or having spec_dirs set). + + def refresh! + raise 'source index not created from disk' if @spec_dirs.nil? + load_gems_in(*@spec_dirs) + end + + ## + # Returns an Array of Gem::Specifications that are not up to date. + + def outdated + outdateds = [] + + latest_specs.each do |local| + dependency = Gem::Dependency.new local.name, ">= #{local.version}" + + begin + fetcher = Gem::SpecFetcher.fetcher + remotes = fetcher.find_matching dependency + remotes = remotes.map { |(name, version,_),_| version } + rescue Gem::RemoteFetcher::FetchError => e + raise unless fetcher.warn_legacy e do + require 'rubygems/source_info_cache' + + specs = Gem::SourceInfoCache.search_with_source dependency, true + + remotes = specs.map { |spec,| spec.version } + end + end + + latest = remotes.sort.last + + outdateds << local.name if latest and local.version < latest + end + + outdateds + end + + ## + # Updates this SourceIndex from +source_uri+. If +all+ is false, only the + # latest gems are fetched. + + def update(source_uri, all) + source_uri = URI.parse source_uri unless URI::Generic === source_uri + source_uri.path += '/' unless source_uri.path =~ /\/$/ + + use_incremental = false + + begin + gem_names = fetch_quick_index source_uri, all + remove_extra gem_names + missing_gems = find_missing gem_names + + return false if missing_gems.size.zero? + + say "Missing metadata for #{missing_gems.size} gems" if + missing_gems.size > 0 and Gem.configuration.really_verbose + + use_incremental = missing_gems.size <= Gem.configuration.bulk_threshold + rescue Gem::OperationNotSupportedError => ex + alert_error "Falling back to bulk fetch: #{ex.message}" if + Gem.configuration.really_verbose + use_incremental = false + end + + if use_incremental then + update_with_missing(source_uri, missing_gems) + else + new_index = fetch_bulk_index(source_uri) + @gems.replace(new_index.gems) + end + + true + end + + def ==(other) # :nodoc: + self.class === other and @gems == other.gems + end + + def dump + Marshal.dump(self) + end + + private + + def fetcher + require 'rubygems/remote_fetcher' + + Gem::RemoteFetcher.fetcher + end + + def fetch_index_from(source_uri) + @fetch_error = nil + + indexes = %W[ + Marshal.#{Gem.marshal_version}.Z + Marshal.#{Gem.marshal_version} + yaml.Z + yaml + ] + + indexes.each do |name| + spec_data = nil + index = source_uri + name + begin + spec_data = fetcher.fetch_path index + spec_data = unzip(spec_data) if name =~ /\.Z$/ + + if name =~ /Marshal/ then + return Marshal.load(spec_data) + else + return YAML.load(spec_data) + end + rescue => e + if Gem.configuration.really_verbose then + alert_error "Unable to fetch #{name}: #{e.message}" + end + + @fetch_error = e + end + end + + nil + end + + def fetch_bulk_index(source_uri) + say "Bulk updating Gem source index for: #{source_uri}" if + Gem.configuration.verbose + + index = fetch_index_from(source_uri) + if index.nil? then + raise Gem::RemoteSourceException, + "Error fetching remote gem cache: #{@fetch_error}" + end + @fetch_error = nil + index + end + + ## + # Get the quick index needed for incremental updates. + + def fetch_quick_index(source_uri, all) + index = all ? 'index' : 'latest_index' + + zipped_index = fetcher.fetch_path source_uri + "quick/#{index}.rz" + + unzip(zipped_index).split("\n") + rescue ::Exception => e + unless all then + say "Latest index not found, using quick index" if + Gem.configuration.really_verbose + + fetch_quick_index source_uri, true + else + raise Gem::OperationNotSupportedError, + "No quick index found: #{e.message}" + end + end + + ## + # Make a list of full names for all the missing gemspecs. + + def find_missing(spec_names) + unless defined? @originals then + @originals = {} + each do |full_name, spec| + @originals[spec.original_name] = spec + end + end + + spec_names.find_all { |full_name| + @originals[full_name].nil? + } + end + + def remove_extra(spec_names) + dictionary = spec_names.inject({}) { |h, k| h[k] = true; h } + each do |name, spec| + remove_spec name unless dictionary.include? spec.original_name + end + end + + ## + # Unzip the given string. + + def unzip(string) + require 'zlib' + Gem.inflate string + end + + ## + # Tries to fetch Marshal representation first, then YAML + + def fetch_single_spec(source_uri, spec_name) + @fetch_error = nil + + begin + marshal_uri = source_uri + "quick/Marshal.#{Gem.marshal_version}/#{spec_name}.gemspec.rz" + zipped = fetcher.fetch_path marshal_uri + return Marshal.load(unzip(zipped)) + rescue => ex + @fetch_error = ex + + if Gem.configuration.really_verbose then + say "unable to fetch marshal gemspec #{marshal_uri}: #{ex.class} - #{ex}" + end + end + + begin + yaml_uri = source_uri + "quick/#{spec_name}.gemspec.rz" + zipped = fetcher.fetch_path yaml_uri + return YAML.load(unzip(zipped)) + rescue => ex + @fetch_error = ex + if Gem.configuration.really_verbose then + say "unable to fetch YAML gemspec #{yaml_uri}: #{ex.class} - #{ex}" + end + end + + nil + end + + ## + # Update the cached source index with the missing names. + + def update_with_missing(source_uri, missing_names) + progress = ui.progress_reporter(missing_names.size, + "Updating metadata for #{missing_names.size} gems from #{source_uri}") + missing_names.each do |spec_name| + gemspec = fetch_single_spec(source_uri, spec_name) + if gemspec.nil? then + ui.say "Failed to download spec #{spec_name} from #{source_uri}:\n" \ + "\t#{@fetch_error.message}" + else + add_spec gemspec + progress.updated spec_name + end + @fetch_error = nil + end + progress.done + progress.count + end + +end + +module Gem + + # :stopdoc: + + # Cache is an alias for SourceIndex to allow older YAMLized source index + # objects to load properly. + Cache = SourceIndex + + # :startdoc: + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache.rb new file mode 100644 index 0000000..fdb30ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache.rb @@ -0,0 +1,393 @@ +require 'fileutils' + +require 'rubygems' +require 'rubygems/source_info_cache_entry' +require 'rubygems/user_interaction' + +## +# SourceInfoCache stores a copy of the gem index for each gem source. +# +# There are two possible cache locations, the system cache and the user cache: +# * The system cache is preferred if it is writable or can be created. +# * The user cache is used otherwise +# +# Once a cache is selected, it will be used for all operations. +# SourceInfoCache will not switch between cache files dynamically. +# +# Cache data is a Hash mapping a source URI to a SourceInfoCacheEntry. +# +#-- +# To keep things straight, this is how the cache objects all fit together: +# +# Gem::SourceInfoCache +# @cache_data = { +# source_uri => Gem::SourceInfoCacheEntry +# @size = source index size +# @source_index = Gem::SourceIndex +# ... +# } + +class Gem::SourceInfoCache + + include Gem::UserInteraction + + ## + # The singleton Gem::SourceInfoCache. If +all+ is true, a full refresh will + # be performed if the singleton instance is being initialized. + + def self.cache(all = false) + return @cache if @cache + @cache = new + @cache.refresh all if Gem.configuration.update_sources + @cache + end + + def self.cache_data + cache.cache_data + end + + ## + # The name of the system cache file. + + def self.latest_system_cache_file + File.join File.dirname(system_cache_file), + "latest_#{File.basename system_cache_file}" + end + + ## + # The name of the latest user cache file. + + def self.latest_user_cache_file + File.join File.dirname(user_cache_file), + "latest_#{File.basename user_cache_file}" + end + + ## + # Reset all singletons, discarding any changes. + + def self.reset + @cache = nil + @system_cache_file = nil + @user_cache_file = nil + end + + ## + # Search all source indexes. See Gem::SourceInfoCache#search. + + def self.search(*args) + cache.search(*args) + end + + ## + # Search all source indexes returning the source_uri. See + # Gem::SourceInfoCache#search_with_source. + + def self.search_with_source(*args) + cache.search_with_source(*args) + end + + ## + # The name of the system cache file. (class method) + + def self.system_cache_file + @system_cache_file ||= Gem.default_system_source_cache_dir + end + + ## + # The name of the user cache file. + + def self.user_cache_file + @user_cache_file ||= + ENV['GEMCACHE'] || Gem.default_user_source_cache_dir + end + + def initialize # :nodoc: + @cache_data = nil + @cache_file = nil + @dirty = false + @only_latest = true + end + + ## + # The most recent cache data. + + def cache_data + return @cache_data if @cache_data + cache_file # HACK writable check + + @only_latest = true + + @cache_data = read_cache_data latest_cache_file + + @cache_data + end + + ## + # The name of the cache file. + + def cache_file + return @cache_file if @cache_file + @cache_file = (try_file(system_cache_file) or + try_file(user_cache_file) or + raise "unable to locate a writable cache file") + end + + ## + # Write the cache to a local file (if it is dirty). + + def flush + write_cache if @dirty + @dirty = false + end + + def latest_cache_data + latest_cache_data = {} + + cache_data.each do |repo, sice| + latest = sice.source_index.latest_specs + + new_si = Gem::SourceIndex.new + new_si.add_specs(*latest) + + latest_sice = Gem::SourceInfoCacheEntry.new new_si, sice.size + latest_cache_data[repo] = latest_sice + end + + latest_cache_data + end + + ## + # The name of the latest cache file. + + def latest_cache_file + File.join File.dirname(cache_file), "latest_#{File.basename cache_file}" + end + + ## + # The name of the latest system cache file. + + def latest_system_cache_file + self.class.latest_system_cache_file + end + + ## + # The name of the latest user cache file. + + def latest_user_cache_file + self.class.latest_user_cache_file + end + + ## + # Merges the complete cache file into this Gem::SourceInfoCache. + + def read_all_cache_data + if @only_latest then + @only_latest = false + all_data = read_cache_data cache_file + + cache_data.update all_data do |source_uri, latest_sice, all_sice| + all_sice.source_index.gems.update latest_sice.source_index.gems + + Gem::SourceInfoCacheEntry.new all_sice.source_index, latest_sice.size + end + + begin + refresh true + rescue Gem::RemoteFetcher::FetchError + end + end + end + + ## + # Reads cached data from +file+. + + def read_cache_data(file) + # Marshal loads 30-40% faster from a String, and 2MB on 20061116 is small + data = open file, 'rb' do |fp| fp.read end + cache_data = Marshal.load data + + cache_data.each do |url, sice| + next unless sice.is_a?(Hash) + update + + cache = sice['cache'] + size = sice['size'] + + if cache.is_a?(Gem::SourceIndex) and size.is_a?(Numeric) then + new_sice = Gem::SourceInfoCacheEntry.new cache, size + cache_data[url] = new_sice + else # irreperable, force refetch. + reset_cache_for url, cache_data + end + end + + cache_data + rescue Errno::ENOENT + {} + rescue => e + if Gem.configuration.really_verbose then + say "Exception during cache_data handling: #{e.class} - #{e}" + say "Cache file was: #{file}" + say "\t#{e.backtrace.join "\n\t"}" + end + + {} + end + + ## + # Refreshes each source in the cache from its repository. If +all+ is + # false, only latest gems are updated. + + def refresh(all) + Gem.sources.each do |source_uri| + cache_entry = cache_data[source_uri] + if cache_entry.nil? then + cache_entry = Gem::SourceInfoCacheEntry.new nil, 0 + cache_data[source_uri] = cache_entry + end + + update if cache_entry.refresh source_uri, all + end + + flush + end + + def reset_cache_for(url, cache_data) + say "Reseting cache for #{url}" if Gem.configuration.really_verbose + + sice = Gem::SourceInfoCacheEntry.new Gem::SourceIndex.new, 0 + sice.refresh url, false # HACK may be unnecessary, see ::cache and #refresh + + cache_data[url] = sice + cache_data + end + + def reset_cache_data + @cache_data = nil + @only_latest = true + end + + ## + # Force cache file to be reset, useful for integration testing of rubygems + + def reset_cache_file + @cache_file = nil + end + + ## + # Searches all source indexes. See Gem::SourceIndex#search for details on + # +pattern+ and +platform_only+. If +all+ is set to true, the full index + # will be loaded before searching. + + def search(pattern, platform_only = false, all = false) + read_all_cache_data if all + + cache_data.map do |source_uri, sic_entry| + next unless Gem.sources.include? source_uri + # TODO - Remove this gunk after 2008/11 + unless pattern.kind_of?(Gem::Dependency) + pattern = Gem::Dependency.new(pattern, Gem::Requirement.default) + end + sic_entry.source_index.search pattern, platform_only + end.flatten.compact + end + + # Searches all source indexes for +pattern+. If +only_platform+ is true, + # only gems matching Gem.platforms will be selected. Returns an Array of + # pairs containing the Gem::Specification found and the source_uri it was + # found at. + def search_with_source(pattern, only_platform = false, all = false) + read_all_cache_data if all + + results = [] + + cache_data.map do |source_uri, sic_entry| + next unless Gem.sources.include? source_uri + + # TODO - Remove this gunk after 2008/11 + unless pattern.kind_of?(Gem::Dependency) + pattern = Gem::Dependency.new(pattern, Gem::Requirement.default) + end + + sic_entry.source_index.search(pattern, only_platform).each do |spec| + results << [spec, source_uri] + end + end + + results + end + + ## + # Set the source info cache data directly. This is mainly used for unit + # testing when we don't want to read a file system to grab the cached source + # index information. The +hash+ should map a source URL into a + # SourceInfoCacheEntry. + + def set_cache_data(hash) + @cache_data = hash + update + end + + ## + # The name of the system cache file. + + def system_cache_file + self.class.system_cache_file + end + + ## + # Determine if +path+ is a candidate for a cache file. Returns +path+ if + # it is, nil if not. + + def try_file(path) + return path if File.writable? path + return nil if File.exist? path + + dir = File.dirname path + + unless File.exist? dir then + begin + FileUtils.mkdir_p dir + rescue RuntimeError, SystemCallError + return nil + end + end + + return path if File.writable? dir + + nil + end + + ## + # Mark the cache as updated (i.e. dirty). + + def update + @dirty = true + end + + ## + # The name of the user cache file. + + def user_cache_file + self.class.user_cache_file + end + + ## + # Write data to the proper cache files. + + def write_cache + if not File.exist?(cache_file) or not @only_latest then + open cache_file, 'wb' do |io| + io.write Marshal.dump(cache_data) + end + end + + open latest_cache_file, 'wb' do |io| + io.write Marshal.dump(latest_cache_data) + end + end + + reset + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache_entry.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache_entry.rb new file mode 100644 index 0000000..c3f75e5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/source_info_cache_entry.rb @@ -0,0 +1,56 @@ +require 'rubygems' +require 'rubygems/source_index' +require 'rubygems/remote_fetcher' + +## +# Entries held by a SourceInfoCache. + +class Gem::SourceInfoCacheEntry + + ## + # The source index for this cache entry. + + attr_reader :source_index + + ## + # The size of the of the source entry. Used to determine if the + # source index has changed. + + attr_reader :size + + ## + # Create a cache entry. + + def initialize(si, size) + @source_index = si || Gem::SourceIndex.new({}) + @size = size + @all = false + end + + def refresh(source_uri, all) + begin + marshal_uri = URI.join source_uri.to_s, "Marshal.#{Gem.marshal_version}" + remote_size = Gem::RemoteFetcher.fetcher.fetch_size marshal_uri + rescue Gem::RemoteSourceException + yaml_uri = URI.join source_uri.to_s, 'yaml' + remote_size = Gem::RemoteFetcher.fetcher.fetch_size yaml_uri + end + + # TODO Use index_signature instead of size? + return false if @size == remote_size and @all + + updated = @source_index.update source_uri, all + @size = remote_size + @all = all + + updated + end + + def ==(other) # :nodoc: + self.class === other and + @size == other.size and + @source_index == other.source_index + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/spec_fetcher.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/spec_fetcher.rb new file mode 100644 index 0000000..a1fc82e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/spec_fetcher.rb @@ -0,0 +1,249 @@ +require 'zlib' + +require 'rubygems' +require 'rubygems/remote_fetcher' +require 'rubygems/user_interaction' + +## +# SpecFetcher handles metadata updates from remote gem repositories. + +class Gem::SpecFetcher + + include Gem::UserInteraction + + ## + # The SpecFetcher cache dir. + + attr_reader :dir # :nodoc: + + ## + # Cache of latest specs + + attr_reader :latest_specs # :nodoc: + + ## + # Cache of all spces + + attr_reader :specs # :nodoc: + + @fetcher = nil + + def self.fetcher + @fetcher ||= new + end + + def self.fetcher=(fetcher) # :nodoc: + @fetcher = fetcher + end + + def initialize + @dir = File.join Gem.user_home, '.gem', 'specs' + @update_cache = File.stat(Gem.user_home).uid == Process.uid + + @specs = {} + @latest_specs = {} + + @fetcher = Gem::RemoteFetcher.fetcher + end + + ## + # Retuns the local directory to write +uri+ to. + + def cache_dir(uri) + File.join @dir, "#{uri.host}%#{uri.port}", File.dirname(uri.path) + end + + ## + # Fetch specs matching +dependency+. If +all+ is true, all matching + # versions are returned. If +matching_platform+ is false, all platforms are + # returned. + + def fetch(dependency, all = false, matching_platform = true) + specs_and_sources = find_matching dependency, all, matching_platform + + specs_and_sources.map do |spec_tuple, source_uri| + [fetch_spec(spec_tuple, URI.parse(source_uri)), source_uri] + end + + rescue Gem::RemoteFetcher::FetchError => e + raise unless warn_legacy e do + require 'rubygems/source_info_cache' + + return Gem::SourceInfoCache.search_with_source(dependency, + matching_platform, all) + end + end + + def fetch_spec(spec, source_uri) + spec = spec - [nil, 'ruby', ''] + spec_file_name = "#{spec.join '-'}.gemspec" + + uri = source_uri + "#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}" + + cache_dir = cache_dir uri + + local_spec = File.join cache_dir, spec_file_name + + if File.exist? local_spec then + spec = Gem.read_binary local_spec + else + uri.path << '.rz' + + spec = @fetcher.fetch_path uri + spec = Gem.inflate spec + + if @update_cache then + FileUtils.mkdir_p cache_dir + + open local_spec, 'wb' do |io| + io.write spec + end + end + end + + # TODO: Investigate setting Gem::Specification#loaded_from to a URI + Marshal.load spec + end + + ## + # Find spec names that match +dependency+. If +all+ is true, all matching + # versions are returned. If +matching_platform+ is false, gems for all + # platforms are returned. + + def find_matching(dependency, all = false, matching_platform = true) + found = {} + + list(all).each do |source_uri, specs| + found[source_uri] = specs.select do |spec_name, version, spec_platform| + dependency =~ Gem::Dependency.new(spec_name, version) and + (not matching_platform or Gem::Platform.match(spec_platform)) + end + end + + specs_and_sources = [] + + found.each do |source_uri, specs| + uri_str = source_uri.to_s + specs_and_sources.push(*specs.map { |spec| [spec, uri_str] }) + end + + specs_and_sources + end + + ## + # Returns Array of gem repositories that were generated with RubyGems less + # than 1.2. + + def legacy_repos + Gem.sources.reject do |source_uri| + source_uri = URI.parse source_uri + spec_path = source_uri + "specs.#{Gem.marshal_version}.gz" + + begin + @fetcher.fetch_size spec_path + rescue Gem::RemoteFetcher::FetchError + begin + @fetcher.fetch_size(source_uri + 'yaml') # re-raise if non-repo + rescue Gem::RemoteFetcher::FetchError + alert_error "#{source_uri} does not appear to be a repository" + raise + end + false + end + end + end + + ## + # Returns a list of gems available for each source in Gem::sources. If + # +all+ is true, all versions are returned instead of only latest versions. + + def list(all = false) + list = {} + + file = all ? 'specs' : 'latest_specs' + + Gem.sources.each do |source_uri| + source_uri = URI.parse source_uri + + if all and @specs.include? source_uri then + list[source_uri] = @specs[source_uri] + elsif not all and @latest_specs.include? source_uri then + list[source_uri] = @latest_specs[source_uri] + else + specs = load_specs source_uri, file + + cache = all ? @specs : @latest_specs + + cache[source_uri] = specs + list[source_uri] = specs + end + end + + list + end + + ## + # Loads specs in +file+, fetching from +source_uri+ if the on-disk cache is + # out of date. + + def load_specs(source_uri, file) + file_name = "#{file}.#{Gem.marshal_version}" + spec_path = source_uri + "#{file_name}.gz" + cache_dir = cache_dir spec_path + local_file = File.join(cache_dir, file_name) + loaded = false + + if File.exist? local_file then + spec_dump = @fetcher.fetch_path spec_path, File.mtime(local_file) + + if spec_dump.nil? then + spec_dump = Gem.read_binary local_file + else + loaded = true + end + else + spec_dump = @fetcher.fetch_path spec_path + loaded = true + end + + specs = Marshal.load spec_dump + + if loaded and @update_cache then + begin + FileUtils.mkdir_p cache_dir + + open local_file, 'wb' do |io| + Marshal.dump specs, io + end + rescue + end + end + + specs + end + + ## + # Warn about legacy repositories if +exception+ indicates only legacy + # repositories are available, and yield to the block. Returns false if the + # exception indicates some other FetchError. + + def warn_legacy(exception) + uri = exception.uri.to_s + if uri =~ /specs\.#{Regexp.escape Gem.marshal_version}\.gz$/ then + alert_warning <<-EOF +RubyGems 1.2+ index not found for: +\t#{legacy_repos.join "\n\t"} + +RubyGems will revert to legacy indexes degrading performance. + EOF + + yield + + return true + end + + false + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/specification.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/specification.rb new file mode 100644 index 0000000..2e6cdc1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/specification.rb @@ -0,0 +1,1262 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' +require 'rubygems/version' +require 'rubygems/requirement' +require 'rubygems/platform' + +# :stopdoc: +# Time::today has been deprecated in 0.9.5 and will be removed. +if RUBY_VERSION < '1.9' then + def Time.today + t = Time.now + t - ((t.to_f + t.gmt_offset) % 86400) + end unless defined? Time.today +end + +class Date; end # for ruby_code if date.rb wasn't required + +# :startdoc: + +module Gem + + ## + # == Gem::Specification + # + # The Specification class contains the metadata for a Gem. Typically + # defined in a .gemspec file or a Rakefile, and looks like this: + # + # spec = Gem::Specification.new do |s| + # s.name = 'rfoo' + # s.version = '1.0' + # s.summary = 'Example gem specification' + # ... + # end + # + # There are many gemspec attributes, and the best place to learn + # about them in the "Gemspec Reference" linked from the RubyGems wiki. + + class Specification + + ## + # Allows deinstallation of gems with legacy platforms. + + attr_accessor :original_platform # :nodoc: + + ## + # The the version number of a specification that does not specify one + # (i.e. RubyGems 0.7 or earlier). + + NONEXISTENT_SPECIFICATION_VERSION = -1 + + ## + # The specification version applied to any new Specification instances + # created. This should be bumped whenever something in the spec format + # changes. + #-- + # When updating this number, be sure to also update #to_ruby. + # + # NOTE RubyGems < 1.2 cannot load specification versions > 2. + + CURRENT_SPECIFICATION_VERSION = 2 + + ## + # An informal list of changes to the specification. The highest-valued + # key should be equal to the CURRENT_SPECIFICATION_VERSION. + + SPECIFICATION_VERSION_HISTORY = { + -1 => ['(RubyGems versions up to and including 0.7 did not have versioned specifications)'], + 1 => [ + 'Deprecated "test_suite_file" in favor of the new, but equivalent, "test_files"', + '"test_file=x" is a shortcut for "test_files=[x]"' + ], + 2 => [ + 'Added "required_rubygems_version"', + 'Now forward-compatible with future versions', + ], + } + + # :stopdoc: + MARSHAL_FIELDS = { -1 => 16, 1 => 16, 2 => 16 } + + now = Time.at(Time.now.to_i) + TODAY = now - ((now.to_i + now.gmt_offset) % 86400) + # :startdoc: + + ## + # List of Specification instances. + + @@list = [] + + ## + # Optional block used to gather newly defined instances. + + @@gather = nil + + ## + # List of attribute names: [:name, :version, ...] + @@required_attributes = [] + + ## + # List of _all_ attributes and default values: + # + # [[:name, nil], + # [:bindir, 'bin'], + # ...] + + @@attributes = [] + + @@nil_attributes = [] + @@non_nil_attributes = [:@original_platform] + + ## + # List of array attributes + + @@array_attributes = [] + + ## + # Map of attribute names to default values. + + @@default_value = {} + + ## + # Names of all specification attributes + + def self.attribute_names + @@attributes.map { |name, default| name } + end + + ## + # Default values for specification attributes + + def self.attribute_defaults + @@attributes.dup + end + + ## + # The default value for specification attribute +name+ + + def self.default_value(name) + @@default_value[name] + end + + ## + # Required specification attributes + + def self.required_attributes + @@required_attributes.dup + end + + ## + # Is +name+ a required attribute? + + def self.required_attribute?(name) + @@required_attributes.include? name.to_sym + end + + ## + # Specification attributes that are arrays (appendable and so-forth) + + def self.array_attributes + @@array_attributes.dup + end + + ## + # A list of Specification instances that have been defined in this Ruby + # instance. + + def self.list + @@list + end + + ## + # Specifies the +name+ and +default+ for a specification attribute, and + # creates a reader and writer method like Module#attr_accessor. + # + # The reader method returns the default if the value hasn't been set. + + def self.attribute(name, default=nil) + ivar_name = "@#{name}".intern + if default.nil? then + @@nil_attributes << ivar_name + else + @@non_nil_attributes << [ivar_name, default] + end + + @@attributes << [name, default] + @@default_value[name] = default + attr_accessor(name) + end + + ## + # Same as :attribute, but ensures that values assigned to the attribute + # are array values by applying :to_a to the value. + + def self.array_attribute(name) + @@non_nil_attributes << ["@#{name}".intern, []] + + @@array_attributes << name + @@attributes << [name, []] + @@default_value[name] = [] + code = %{ + def #{name} + @#{name} ||= [] + end + def #{name}=(value) + @#{name} = Array(value) + end + } + + module_eval code, __FILE__, __LINE__ - 9 + end + + ## + # Same as attribute above, but also records this attribute as mandatory. + + def self.required_attribute(*args) + @@required_attributes << args.first + attribute(*args) + end + + ## + # Sometimes we don't want the world to use a setter method for a + # particular attribute. + # + # +read_only+ makes it private so we can still use it internally. + + def self.read_only(*names) + names.each do |name| + private "#{name}=" + end + end + + # Shortcut for creating several attributes at once (each with a default + # value of +nil+). + + def self.attributes(*args) + args.each do |arg| + attribute(arg, nil) + end + end + + ## + # Some attributes require special behaviour when they are accessed. This + # allows for that. + + def self.overwrite_accessor(name, &block) + remove_method name + define_method(name, &block) + end + + ## + # Defines a _singular_ version of an existing _plural_ attribute (i.e. one + # whose value is expected to be an array). This means just creating a + # helper method that takes a single value and appends it to the array. + # These are created for convenience, so that in a spec, one can write + # + # s.require_path = 'mylib' + # + # instead of: + # + # s.require_paths = ['mylib'] + # + # That above convenience is available courtesy of: + # + # attribute_alias_singular :require_path, :require_paths + + def self.attribute_alias_singular(singular, plural) + define_method("#{singular}=") { |val| + send("#{plural}=", [val]) + } + define_method("#{singular}") { + val = send("#{plural}") + val.nil? ? nil : val.first + } + end + + ## + # Dump only crucial instance variables. + #-- + # MAINTAIN ORDER! + + def _dump(limit) + Marshal.dump [ + @rubygems_version, + @specification_version, + @name, + @version, + (Time === @date ? @date : (require 'time'; Time.parse(@date.to_s))), + @summary, + @required_ruby_version, + @required_rubygems_version, + @original_platform, + @dependencies, + @rubyforge_project, + @email, + @authors, + @description, + @homepage, + @has_rdoc, + @new_platform, + ] + end + + ## + # Load custom marshal format, re-initializing defaults as needed + + def self._load(str) + array = Marshal.load str + + spec = Gem::Specification.new + spec.instance_variable_set :@specification_version, array[1] + + current_version = CURRENT_SPECIFICATION_VERSION + + field_count = if spec.specification_version > current_version then + spec.instance_variable_set :@specification_version, + current_version + MARSHAL_FIELDS[current_version] + else + MARSHAL_FIELDS[spec.specification_version] + end + + if array.size < field_count then + raise TypeError, "invalid Gem::Specification format #{array.inspect}" + end + + spec.instance_variable_set :@rubygems_version, array[0] + # spec version + spec.instance_variable_set :@name, array[2] + spec.instance_variable_set :@version, array[3] + spec.instance_variable_set :@date, array[4] + spec.instance_variable_set :@summary, array[5] + spec.instance_variable_set :@required_ruby_version, array[6] + spec.instance_variable_set :@required_rubygems_version, array[7] + spec.instance_variable_set :@original_platform, array[8] + spec.instance_variable_set :@dependencies, array[9] + spec.instance_variable_set :@rubyforge_project, array[10] + spec.instance_variable_set :@email, array[11] + spec.instance_variable_set :@authors, array[12] + spec.instance_variable_set :@description, array[13] + spec.instance_variable_set :@homepage, array[14] + spec.instance_variable_set :@has_rdoc, array[15] + spec.instance_variable_set :@new_platform, array[16] + spec.instance_variable_set :@platform, array[16].to_s + spec.instance_variable_set :@loaded, false + + spec + end + + ## + # List of depedencies that will automatically be activated at runtime. + + def runtime_dependencies + dependencies.select { |d| d.type == :runtime || d.type == nil } + end + + ## + # List of dependencies that are used for development + + def development_dependencies + dependencies.select { |d| d.type == :development } + end + + def test_suite_file # :nodoc: + warn 'test_suite_file deprecated, use test_files' + test_files.first + end + + def test_suite_file=(val) # :nodoc: + warn 'test_suite_file= deprecated, use test_files=' + @test_files = [] unless defined? @test_files + @test_files << val + end + + ## + # true when this gemspec has been loaded from a specifications directory. + # This attribute is not persisted. + + attr_accessor :loaded + + ## + # Path this gemspec was loaded from. This attribute is not persisted. + + attr_accessor :loaded_from + + ## + # Returns an array with bindir attached to each executable in the + # executables list + + def add_bindir(executables) + return nil if executables.nil? + + if @bindir then + Array(executables).map { |e| File.join(@bindir, e) } + else + executables + end + rescue + return nil + end + + ## + # Files in the Gem under one of the require_paths + + def lib_files + @files.select do |file| + require_paths.any? do |path| + file.index(path) == 0 + end + end + end + + ## + # True if this gem was loaded from disk + + alias :loaded? :loaded + + ## + # True if this gem has files in test_files + + def has_unit_tests? + not test_files.empty? + end + + alias has_test_suite? has_unit_tests? # :nodoc: deprecated + + ## + # Specification constructor. Assigns the default values to the + # attributes, adds this spec to the list of loaded specs (see + # Specification.list), and yields itself for further initialization. + + def initialize + @new_platform = nil + assign_defaults + @loaded = false + @loaded_from = nil + @@list << self + + yield self if block_given? + + @@gather.call(self) if @@gather + end + + ## + # Each attribute has a default value (possibly nil). Here, we initialize + # all attributes to their default value. This is done through the + # accessor methods, so special behaviours will be honored. Furthermore, + # we take a _copy_ of the default so each specification instance has its + # own empty arrays, etc. + + def assign_defaults + @@nil_attributes.each do |name| + instance_variable_set name, nil + end + + @@non_nil_attributes.each do |name, default| + value = case default + when Time, Numeric, Symbol, true, false, nil then default + else default.dup + end + + instance_variable_set name, value + end + + # HACK + instance_variable_set :@new_platform, Gem::Platform::RUBY + end + + ## + # Special loader for YAML files. When a Specification object is loaded + # from a YAML file, it bypasses the normal Ruby object initialization + # routine (#initialize). This method makes up for that and deals with + # gems of different ages. + # + # 'input' can be anything that YAML.load() accepts: String or IO. + + def self.from_yaml(input) + input = normalize_yaml_input input + spec = YAML.load input + + if spec && spec.class == FalseClass then + raise Gem::EndOfYAMLException + end + + unless Gem::Specification === spec then + raise Gem::Exception, "YAML data doesn't evaluate to gem specification" + end + + unless (spec.instance_variables.include? '@specification_version' or + spec.instance_variables.include? :@specification_version) and + spec.instance_variable_get :@specification_version + spec.instance_variable_set :@specification_version, + NONEXISTENT_SPECIFICATION_VERSION + end + + spec + end + + ## + # Loads ruby format gemspec from +filename+ + + def self.load(filename) + gemspec = nil + fail "NESTED Specification.load calls not allowed!" if @@gather + @@gather = proc { |gs| gemspec = gs } + data = File.read(filename) + eval(data) + gemspec + ensure + @@gather = nil + end + + ## + # Make sure the YAML specification is properly formatted with dashes + + def self.normalize_yaml_input(input) + result = input.respond_to?(:read) ? input.read : input + result = "--- " + result unless result =~ /^--- / + result + end + + ## + # Sets the rubygems_version to the current RubyGems version + + def mark_version + @rubygems_version = RubyGemsVersion + end + + ## + # Ignore unknown attributes while loading + + def method_missing(sym, *a, &b) # :nodoc: + if @specification_version > CURRENT_SPECIFICATION_VERSION and + sym.to_s =~ /=$/ then + warn "ignoring #{sym} loading #{full_name}" if $DEBUG + else + super + end + end + + ## + # Adds a development dependency named +gem+ with +requirements+ to this + # Gem. For example: + # + # spec.add_development_dependency 'jabber4r', '> 0.1', '<= 0.5' + # + # Development dependencies aren't installed by default and aren't + # activated when a gem is required. + + def add_development_dependency(gem, *requirements) + add_dependency_with_type(gem, :development, *requirements) + end + + ## + # Adds a runtime dependency named +gem+ with +requirements+ to this Gem. + # For example: + # + # spec.add_runtime_dependency 'jabber4r', '> 0.1', '<= 0.5' + + def add_runtime_dependency(gem, *requirements) + add_dependency_with_type(gem, :runtime, *requirements) + end + + ## + # Adds a runtime dependency + + alias add_dependency add_runtime_dependency + + ## + # Returns the full name (name-version) of this Gem. Platform information + # is included (name-version-platform) if it is specified and not the + # default Ruby platform. + + def full_name + if platform == Gem::Platform::RUBY or platform.nil? then + "#{@name}-#{@version}" + else + "#{@name}-#{@version}-#{platform}" + end + end + + ## + # Returns the full name (name-version) of this gemspec using the original + # platform. For use with legacy gems. + + def original_name # :nodoc: + if platform == Gem::Platform::RUBY or platform.nil? then + "#{@name}-#{@version}" + else + "#{@name}-#{@version}-#{@original_platform}" + end + end + + ## + # The full path to the gem (install path + full name). + + def full_gem_path + path = File.join installation_path, 'gems', full_name + return path if File.directory? path + File.join installation_path, 'gems', original_name + end + + ## + # The default (generated) file name of the gem. + + def file_name + full_name + ".gem" + end + + ## + # The directory that this gem was installed into. + + def installation_path + path = File.dirname(@loaded_from).split(File::SEPARATOR)[0..-2] + path = path.join File::SEPARATOR + File.expand_path path + end + + ## + # Checks if this specification meets the requirement of +dependency+. + + def satisfies_requirement?(dependency) + return @name == dependency.name && + dependency.version_requirements.satisfied_by?(@version) + end + + ## + # Returns an object you can use to sort specifications in #sort_by. + + def sort_obj + [@name, @version.to_ints, @new_platform == Gem::Platform::RUBY ? -1 : 1] + end + + def <=>(other) # :nodoc: + sort_obj <=> other.sort_obj + end + + ## + # Tests specs for equality (across all attributes). + + def ==(other) # :nodoc: + self.class === other && same_attributes?(other) + end + + alias eql? == # :nodoc: + + ## + # True if this gem has the same attributes as +other+. + + def same_attributes?(other) + @@attributes.each do |name, default| + return false unless self.send(name) == other.send(name) + end + true + end + + private :same_attributes? + + def hash # :nodoc: + @@attributes.inject(0) { |hash_code, (name, default_value)| + n = self.send(name).hash + hash_code + n + } + end + + def to_yaml(opts = {}) # :nodoc: + mark_version + + attributes = @@attributes.map { |name,| name.to_s }.sort + attributes = attributes - %w[name version platform] + + yaml = YAML.quick_emit object_id, opts do |out| + out.map taguri, to_yaml_style do |map| + map.add 'name', @name + map.add 'version', @version + platform = case @original_platform + when nil, '' then + 'ruby' + when String then + @original_platform + else + @original_platform.to_s + end + map.add 'platform', platform + + attributes.each do |name| + map.add name, instance_variable_get("@#{name}") + end + end + end + end + + def yaml_initialize(tag, vals) # :nodoc: + vals.each do |ivar, val| + instance_variable_set "@#{ivar}", val + end + + @original_platform = @platform # for backwards compatibility + self.platform = Gem::Platform.new @platform + end + + ## + # Returns a Ruby code representation of this specification, such that it + # can be eval'ed and reconstruct the same specification later. Attributes + # that still have their default values are omitted. + + def to_ruby + mark_version + result = [] + result << "# -*- encoding: utf-8 -*-" + result << nil + result << "Gem::Specification.new do |s|" + + result << " s.name = #{ruby_code name}" + result << " s.version = #{ruby_code version}" + unless platform.nil? or platform == Gem::Platform::RUBY then + result << " s.platform = #{ruby_code original_platform}" + end + result << "" + result << " s.required_rubygems_version = #{ruby_code required_rubygems_version} if s.respond_to? :required_rubygems_version=" + + handled = [ + :dependencies, + :name, + :platform, + :required_rubygems_version, + :specification_version, + :version, + ] + + attributes = @@attributes.sort_by { |attr_name,| attr_name.to_s } + + attributes.each do |attr_name, default| + next if handled.include? attr_name + current_value = self.send(attr_name) + if current_value != default or + self.class.required_attribute? attr_name then + result << " s.#{attr_name} = #{ruby_code current_value}" + end + end + + result << nil + result << " if s.respond_to? :specification_version then" + result << " current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION" + result << " s.specification_version = #{specification_version}" + result << nil + + result << " if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then" + + unless dependencies.empty? then + dependencies.each do |dep| + version_reqs_param = dep.requirements_list.inspect + dep.instance_variable_set :@type, :runtime if dep.type.nil? # HACK + result << " s.add_#{dep.type}_dependency(%q<#{dep.name}>, #{version_reqs_param})" + end + end + + result << " else" + + unless dependencies.empty? then + dependencies.each do |dep| + version_reqs_param = dep.requirements_list.inspect + result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})" + end + end + + result << ' end' + + result << " else" + dependencies.each do |dep| + version_reqs_param = dep.requirements_list.inspect + result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})" + end + result << " end" + + result << "end" + result << nil + + result.join "\n" + end + + ## + # Checks that the specification contains all required fields, and does a + # very basic sanity check. + # + # Raises InvalidSpecificationException if the spec does not pass the + # checks.. + + def validate + extend Gem::UserInteraction + normalize + + if rubygems_version != RubyGemsVersion then + raise Gem::InvalidSpecificationException, + "expected RubyGems version #{RubyGemsVersion}, was #{rubygems_version}" + end + + @@required_attributes.each do |symbol| + unless self.send symbol then + raise Gem::InvalidSpecificationException, + "missing value for attribute #{symbol}" + end + end + + if require_paths.empty? then + raise Gem::InvalidSpecificationException, + "specification must have at least one require_path" + end + + case platform + when Gem::Platform, Platform::RUBY then # ok + else + raise Gem::InvalidSpecificationException, + "invalid platform #{platform.inspect}, see Gem::Platform" + end + + unless Array === authors and + authors.all? { |author| String === author } then + raise Gem::InvalidSpecificationException, + 'authors must be Array of Strings' + end + + # Warnings + + %w[author email homepage rubyforge_project summary].each do |attribute| + value = self.send attribute + alert_warning "no #{attribute} specified" if value.nil? or value.empty? + end + + alert_warning "RDoc will not be generated (has_rdoc == false)" unless + has_rdoc + + alert_warning "deprecated autorequire specified" if autorequire + + executables.each do |executable| + executable_path = File.join bindir, executable + shebang = File.read(executable_path, 2) == '#!' + + alert_warning "#{executable_path} is missing #! line" unless shebang + end + + true + end + + ## + # Normalize the list of files so that: + # * All file lists have redundancies removed. + # * Files referenced in the extra_rdoc_files are included in the package + # file list. + # + # Also, the summary and description are converted to a normal format. + + def normalize + if defined?(@extra_rdoc_files) and @extra_rdoc_files then + @extra_rdoc_files.uniq! + @files ||= [] + @files.concat(@extra_rdoc_files) + end + @files.uniq! if @files + end + + ## + # Return a list of all gems that have a dependency on this gemspec. The + # list is structured with entries that conform to: + # + # [depending_gem, dependency, [list_of_gems_that_satisfy_dependency]] + + def dependent_gems + out = [] + Gem.source_index.each do |name,gem| + gem.dependencies.each do |dep| + if self.satisfies_requirement?(dep) then + sats = [] + find_all_satisfiers(dep) do |sat| + sats << sat + end + out << [gem, dep, sats] + end + end + end + out + end + + def to_s + "#" + end + + def add_dependency_with_type(dependency, type, *requirements) + requirements = if requirements.empty? then + Gem::Requirement.default + else + requirements.flatten + end + + unless dependency.respond_to?(:name) && + dependency.respond_to?(:version_requirements) + + dependency = Dependency.new(dependency, requirements, type) + end + + dependencies << dependency + end + + private :add_dependency_with_type + + def find_all_satisfiers(dep) + Gem.source_index.each do |name,gem| + if(gem.satisfies_requirement?(dep)) then + yield gem + end + end + end + + private :find_all_satisfiers + + ## + # Return a string containing a Ruby code representation of the given + # object. + + def ruby_code(obj) + case obj + when String then '%q{' + obj + '}' + when Array then obj.inspect + when Gem::Version then obj.to_s.inspect + when Date then '%q{' + obj.strftime('%Y-%m-%d') + '}' + when Time then '%q{' + obj.strftime('%Y-%m-%d') + '}' + when Numeric then obj.inspect + when true, false, nil then obj.inspect + when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})" + when Gem::Requirement then "Gem::Requirement.new(#{obj.to_s.inspect})" + else raise Exception, "ruby_code case not handled: #{obj.class}" + end + end + + private :ruby_code + + # :section: Required gemspec attributes + + ## + # The version of RubyGems used to create this gem + + required_attribute :rubygems_version, Gem::RubyGemsVersion + + ## + # The Gem::Specification version of this gemspec + + required_attribute :specification_version, CURRENT_SPECIFICATION_VERSION + + ## + # This gem's name + + required_attribute :name + + ## + # This gem's version + + required_attribute :version + + ## + # The date this gem was created + + required_attribute :date, TODAY + + ## + # A short summary of this gem's description. Displayed in `gem list -d`. + + required_attribute :summary + + ## + # Paths in the gem to add to $LOAD_PATH when this gem is activated + + required_attribute :require_paths, ['lib'] + + # :section: Optional gemspec attributes + + ## + # A contact email for this gem + + attribute :email + + ## + # The URL of this gem's home page + + attribute :homepage + + ## + # The rubyforge project this gem lives under. i.e. RubyGems' + # rubyforge_project is "rubygems". + + attribute :rubyforge_project + + ## + # A long description of this gem + + attribute :description + + ## + # Autorequire was used by old RubyGems to automatically require a file. + # It no longer is supported. + + attribute :autorequire + + ## + # The default executable for this gem. + + attribute :default_executable + + ## + # The path in the gem for executable scripts + + attribute :bindir, 'bin' + + ## + # True if this gem is RDoc-compliant + + attribute :has_rdoc, false + + ## + # True if this gem supports RDoc + + alias :has_rdoc? :has_rdoc + + ## + # The ruby of version required by this gem + + attribute :required_ruby_version, Gem::Requirement.default + + ## + # The RubyGems version required by this gem + + attribute :required_rubygems_version, Gem::Requirement.default + + ## + # The platform this gem runs on. See Gem::Platform for details. + + attribute :platform, Gem::Platform::RUBY + + ## + # The key used to sign this gem. See Gem::Security for details. + + attribute :signing_key, nil + + ## + # The certificate chain used to sign this gem. See Gem::Security for + # details. + + attribute :cert_chain, [] + + ## + # A message that gets displayed after the gem is installed + + attribute :post_install_message, nil + + ## + # The list of authors who wrote this gem + + array_attribute :authors + + ## + # Files included in this gem + + array_attribute :files + + ## + # Test files included in this gem + + array_attribute :test_files + + ## + # An ARGV-style array of options to RDoc + + array_attribute :rdoc_options + + ## + # Extra files to add to RDoc + + array_attribute :extra_rdoc_files + + ## + # Executables included in the gem + + array_attribute :executables + + ## + # Extensions to build when installing the gem. See + # Gem::Installer#build_extensions for valid values. + + array_attribute :extensions + + ## + # An array or things required by this gem. Not used by anything + # presently. + + array_attribute :requirements + + ## + # A list of Gem::Dependency objects this gem depends on. Only appendable. + + array_attribute :dependencies + + read_only :dependencies + + # :section: Aliased gemspec attributes + + ## + # Singular accessor for executables + + attribute_alias_singular :executable, :executables + + ## + # Singular accessor for authors + + attribute_alias_singular :author, :authors + + ## + # Singular accessor for require_paths + + attribute_alias_singular :require_path, :require_paths + + ## + # Singular accessor for test_files + + attribute_alias_singular :test_file, :test_files + + overwrite_accessor :version= do |version| + @version = Version.create(version) + end + + overwrite_accessor :platform do + @new_platform + end + + overwrite_accessor :platform= do |platform| + if @original_platform.nil? or + @original_platform == Gem::Platform::RUBY then + @original_platform = platform + end + + case platform + when Gem::Platform::CURRENT then + @new_platform = Gem::Platform.local + @original_platform = @new_platform.to_s + + when Gem::Platform then + @new_platform = platform + + # legacy constants + when nil, Gem::Platform::RUBY then + @new_platform = Gem::Platform::RUBY + when 'mswin32' then # was Gem::Platform::WIN32 + @new_platform = Gem::Platform.new 'x86-mswin32' + when 'i586-linux' then # was Gem::Platform::LINUX_586 + @new_platform = Gem::Platform.new 'x86-linux' + when 'powerpc-darwin' then # was Gem::Platform::DARWIN + @new_platform = Gem::Platform.new 'ppc-darwin' + else + @new_platform = Gem::Platform.new platform + end + + @platform = @new_platform.to_s + + @new_platform + end + + overwrite_accessor :required_ruby_version= do |value| + @required_ruby_version = Gem::Requirement.create(value) + end + + overwrite_accessor :required_rubygems_version= do |value| + @required_rubygems_version = Gem::Requirement.create(value) + end + + overwrite_accessor :date= do |date| + # We want to end up with a Time object with one-day resolution. + # This is the cleanest, most-readable, faster-than-using-Date + # way to do it. + case date + when String then + @date = if /\A(\d{4})-(\d{2})-(\d{2})\Z/ =~ date then + Time.local($1.to_i, $2.to_i, $3.to_i) + else + require 'time' + Time.parse date + end + when Time then + @date = Time.local(date.year, date.month, date.day) + when Date then + @date = Time.local(date.year, date.month, date.day) + else + @date = TODAY + end + end + + overwrite_accessor :date do + self.date = nil if @date.nil? # HACK Sets the default value for date + @date + end + + overwrite_accessor :summary= do |str| + @summary = if str then + str.strip. + gsub(/(\w-)\n[ \t]*(\w)/, '\1\2'). + gsub(/\n[ \t]*/, " ") + end + end + + overwrite_accessor :description= do |str| + @description = if str then + str.strip. + gsub(/(\w-)\n[ \t]*(\w)/, '\1\2'). + gsub(/\n[ \t]*/, " ") + end + end + + overwrite_accessor :default_executable do + begin + if defined?(@default_executable) and @default_executable + result = @default_executable + elsif @executables and @executables.size == 1 + result = Array(@executables).first + else + result = nil + end + result + rescue + nil + end + end + + overwrite_accessor :test_files do + # Handle the possibility that we have @test_suite_file but not + # @test_files. This will happen when an old gem is loaded via + # YAML. + if defined? @test_suite_file then + @test_files = [@test_suite_file].flatten + @test_suite_file = nil + end + if defined?(@test_files) and @test_files then + @test_files + else + @test_files = [] + end + end + + overwrite_accessor :files do + result = [] + result.push(*@files) if defined?(@files) + result.push(*@test_files) if defined?(@test_files) + result.push(*(add_bindir(@executables))) + result.push(*@extra_rdoc_files) if defined?(@extra_rdoc_files) + result.push(*@extensions) if defined?(@extensions) + result.uniq.compact + end + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/test_utilities.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/test_utilities.rb new file mode 100644 index 0000000..8b23d32 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/test_utilities.rb @@ -0,0 +1,131 @@ +require 'tempfile' +require 'rubygems' +require 'rubygems/remote_fetcher' + +## +# A fake Gem::RemoteFetcher for use in tests or to avoid real live HTTP +# requests when testing code that uses RubyGems. +# +# Example: +# +# @fetcher = Gem::FakeFetcher.new +# @fetcher.data['http://gems.example.com/yaml'] = source_index.to_yaml +# Gem::RemoteFetcher.fetcher = @fetcher +# +# # invoke RubyGems code +# +# paths = @fetcher.paths +# assert_equal 'http://gems.example.com/yaml', paths.shift +# assert paths.empty?, paths.join(', ') +# +# See RubyGems' tests for more examples of FakeFetcher. + +class Gem::FakeFetcher + + attr_reader :data + attr_accessor :paths + + def initialize + @data = {} + @paths = [] + end + + def fetch_path path, mtime = nil + path = path.to_s + @paths << path + raise ArgumentError, 'need full URI' unless path =~ %r'^http://' + + unless @data.key? path then + raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path) + end + + data = @data[path] + + if data.respond_to?(:call) then + data.call + else + if path.to_s =~ /gz$/ and not data.nil? and not data.empty? then + data = Gem.gunzip data + end + + data + end + end + + def fetch_size(path) + path = path.to_s + @paths << path + + raise ArgumentError, 'need full URI' unless path =~ %r'^http://' + + unless @data.key? path then + raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path) + end + + data = @data[path] + + data.respond_to?(:call) ? data.call : data.length + end + + def download spec, source_uri, install_dir = Gem.dir + name = "#{spec.full_name}.gem" + path = File.join(install_dir, 'cache', name) + + Gem.ensure_gem_subdirectories install_dir + + if source_uri =~ /^http/ then + File.open(path, "wb") do |f| + f.write fetch_path(File.join(source_uri, "gems", name)) + end + else + FileUtils.cp source_uri, path + end + + path + end + +end + +# :stopdoc: +class Gem::RemoteFetcher + + def self.fetcher=(fetcher) + @fetcher = fetcher + end + +end +# :startdoc: + +## +# A StringIO duck-typed class that uses Tempfile instead of String as the +# backing store. +#-- +# This class was added to flush out problems in Rubinius' IO implementation. + +class TempIO + + @@count = 0 + + def initialize(string = '') + @tempfile = Tempfile.new "TempIO-#{@@count += 1}" + @tempfile.binmode + @tempfile.write string + @tempfile.rewind + end + + def method_missing(meth, *args, &block) + @tempfile.send(meth, *args, &block) + end + + def respond_to?(meth) + @tempfile.respond_to? meth + end + + def string + @tempfile.flush + + Gem.read_binary @tempfile.path + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/timer.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/timer.rb new file mode 100644 index 0000000..06250f2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/timer.rb @@ -0,0 +1,25 @@ +# +# This file defines a $log variable for logging, and a time() method for recording timing +# information. +# +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + + +$log = Object.new +def $log.debug(str) + STDERR.puts str +end + +def time(msg, width=25) + t = Time.now + return_value = yield + elapsed = Time.now.to_f - t.to_f + elapsed = sprintf("%3.3f", elapsed) + $log.debug "#{msg.ljust(width)}: #{elapsed}s" + return_value +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/uninstaller.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/uninstaller.rb new file mode 100644 index 0000000..5f19da5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/uninstaller.rb @@ -0,0 +1,242 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'fileutils' +require 'rubygems' +require 'rubygems/dependency_list' +require 'rubygems/doc_manager' +require 'rubygems/user_interaction' + +## +# An Uninstaller. + +class Gem::Uninstaller + + include Gem::UserInteraction + + ## + # The directory a gem's executables will be installed into + + attr_reader :bin_dir + + ## + # The gem repository the gem will be installed into + + attr_reader :gem_home + + ## + # The Gem::Specification for the gem being uninstalled, only set during + # #uninstall_gem + + attr_reader :spec + + ## + # Constructs an uninstaller that will uninstall +gem+ + + def initialize(gem, options = {}) + @gem = gem + @version = options[:version] || Gem::Requirement.default + gem_home = options[:install_dir] || Gem.dir + @gem_home = File.expand_path gem_home + @force_executables = options[:executables] + @force_all = options[:all] + @force_ignore = options[:ignore] + @bin_dir = options[:bin_dir] + + spec_dir = File.join @gem_home, 'specifications' + @source_index = Gem::SourceIndex.from_gems_in spec_dir + end + + ## + # Performs the uninstall of the gem. This removes the spec, the Gem + # directory, and the cached .gem file. + + def uninstall + list = @source_index.find_name @gem, @version + + if list.empty? then + raise Gem::InstallError, "Unknown gem #{@gem} #{@version}" + + elsif list.size > 1 and @force_all then + remove_all list.dup + + elsif list.size > 1 then + gem_names = list.collect {|gem| gem.full_name} + ["All versions"] + + say + gem_name, index = choose_from_list "Select gem to uninstall:", gem_names + + if index == list.size then + remove_all list.dup + elsif index >= 0 && index < list.size then + uninstall_gem list[index], list.dup + else + say "Error: must enter a number [1-#{list.size+1}]" + end + else + uninstall_gem list.first, list.dup + end + end + + ## + # Uninstalls gem +spec+ + + def uninstall_gem(spec, specs) + @spec = spec + + Gem.pre_uninstall_hooks.each do |hook| + hook.call self + end + + specs.each { |s| remove_executables s } + remove spec, specs + + Gem.post_uninstall_hooks.each do |hook| + hook.call self + end + + @spec = nil + end + + ## + # Removes installed executables and batch files (windows only) for + # +gemspec+. + + def remove_executables(gemspec) + return if gemspec.nil? + + if gemspec.executables.size > 0 then + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home) + + list = @source_index.find_name(gemspec.name).delete_if { |spec| + spec.version == gemspec.version + } + + executables = gemspec.executables.clone + + list.each do |spec| + spec.executables.each do |exe_name| + executables.delete(exe_name) + end + end + + return if executables.size == 0 + + answer = if @force_executables.nil? then + ask_yes_no("Remove executables:\n" \ + "\t#{gemspec.executables.join(", ")}\n\nin addition to the gem?", + true) # " # appease ruby-mode - don't ask + else + @force_executables + end + + unless answer then + say "Executables and scripts will remain installed." + else + raise Gem::FilePermissionError, bindir unless File.writable? bindir + + gemspec.executables.each do |exe_name| + say "Removing #{exe_name}" + FileUtils.rm_f File.join(bindir, exe_name) + FileUtils.rm_f File.join(bindir, "#{exe_name}.bat") + end + end + end + end + + ## + # Removes all gems in +list+. + # + # NOTE: removes uninstalled gems from +list+. + + def remove_all(list) + list.dup.each { |spec| uninstall_gem spec, list } + end + + ## + # spec:: the spec of the gem to be uninstalled + # list:: the list of all such gems + # + # Warning: this method modifies the +list+ parameter. Once it has + # uninstalled a gem, it is removed from that list. + + def remove(spec, list) + unless dependencies_ok? spec then + raise Gem::DependencyRemovalException, + "Uninstallation aborted due to dependent gem(s)" + end + + unless path_ok? spec then + e = Gem::GemNotInHomeException.new \ + "Gem is not installed in directory #{@gem_home}" + e.spec = spec + + raise e + end + + raise Gem::FilePermissionError, spec.installation_path unless + File.writable?(spec.installation_path) + + FileUtils.rm_rf spec.full_gem_path + + original_platform_name = [ + spec.name, spec.version, spec.original_platform].join '-' + + spec_dir = File.join spec.installation_path, 'specifications' + gemspec = File.join spec_dir, "#{spec.full_name}.gemspec" + + unless File.exist? gemspec then + gemspec = File.join spec_dir, "#{original_platform_name}.gemspec" + end + + FileUtils.rm_rf gemspec + + cache_dir = File.join spec.installation_path, 'cache' + gem = File.join cache_dir, "#{spec.full_name}.gem" + + unless File.exist? gem then + gem = File.join cache_dir, "#{original_platform_name}.gem" + end + + FileUtils.rm_rf gem + + Gem::DocManager.new(spec).uninstall_doc + + say "Successfully uninstalled #{spec.full_name}" + + list.delete spec + end + + def path_ok?(spec) + full_path = File.join @gem_home, 'gems', spec.full_name + original_path = File.join @gem_home, 'gems', spec.original_name + + full_path == spec.full_gem_path || original_path == spec.full_gem_path + end + + def dependencies_ok?(spec) + return true if @force_ignore + + deplist = Gem::DependencyList.from_source_index @source_index + deplist.ok_to_remove?(spec.full_name) || ask_if_ok(spec) + end + + def ask_if_ok(spec) + msg = [''] + msg << 'You have requested to uninstall the gem:' + msg << "\t#{spec.full_name}" + spec.dependent_gems.each do |gem,dep,satlist| + msg << + ("#{gem.name}-#{gem.version} depends on " + + "[#{dep.name} (#{dep.version_requirements})]") + end + msg << 'If you remove this gems, one or more dependencies will not be met.' + msg << 'Continue with Uninstall?' + return ask_yes_no(msg.join("\n"), true) + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/user_interaction.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/user_interaction.rb new file mode 100644 index 0000000..30a728c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/user_interaction.rb @@ -0,0 +1,360 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +module Gem + + ## + # Module that defines the default UserInteraction. Any class including this + # module will have access to the +ui+ method that returns the default UI. + + module DefaultUserInteraction + + ## + # The default UI is a class variable of the singleton class for this + # module. + + @ui = nil + + ## + # Return the default UI. + + def self.ui + @ui ||= Gem::ConsoleUI.new + end + + ## + # Set the default UI. If the default UI is never explicitly set, a simple + # console based UserInteraction will be used automatically. + + def self.ui=(new_ui) + @ui = new_ui + end + + ## + # Use +new_ui+ for the duration of +block+. + + def self.use_ui(new_ui) + old_ui = @ui + @ui = new_ui + yield + ensure + @ui = old_ui + end + + ## + # See DefaultUserInteraction::ui + + def ui + DefaultUserInteraction.ui + end + + ## + # See DefaultUserInteraction::ui= + + def ui=(new_ui) + DefaultUserInteraction.ui = new_ui + end + + ## + # See DefaultUserInteraction::use_ui + + def use_ui(new_ui, &block) + DefaultUserInteraction.use_ui(new_ui, &block) + end + + end + + ## + # Make the default UI accessable without the "ui." prefix. Classes + # including this module may use the interaction methods on the default UI + # directly. Classes may also reference the ui and ui= methods. + # + # Example: + # + # class X + # include Gem::UserInteraction + # + # def get_answer + # n = ask("What is the meaning of life?") + # end + # end + + module UserInteraction + + include DefaultUserInteraction + + [:alert, + :alert_error, + :alert_warning, + :ask, + :ask_yes_no, + :choose_from_list, + :say, + :terminate_interaction ].each do |methname| + class_eval %{ + def #{methname}(*args) + ui.#{methname}(*args) + end + }, __FILE__, __LINE__ + end + end + + ## + # StreamUI implements a simple stream based user interface. + + class StreamUI + + attr_reader :ins, :outs, :errs + + def initialize(in_stream, out_stream, err_stream=STDERR) + @ins = in_stream + @outs = out_stream + @errs = err_stream + end + + ## + # Choose from a list of options. +question+ is a prompt displayed above + # the list. +list+ is a list of option strings. Returns the pair + # [option_name, option_index]. + + def choose_from_list(question, list) + @outs.puts question + + list.each_with_index do |item, index| + @outs.puts " #{index+1}. #{item}" + end + + @outs.print "> " + @outs.flush + + result = @ins.gets + + return nil, nil unless result + + result = result.strip.to_i - 1 + return list[result], result + end + + ## + # Ask a question. Returns a true for yes, false for no. If not connected + # to a tty, raises an exception if default is nil, otherwise returns + # default. + + def ask_yes_no(question, default=nil) + unless @ins.tty? then + if default.nil? then + raise Gem::OperationNotSupportedError, + "Not connected to a tty and no default specified" + else + return default + end + end + + qstr = case default + when nil + 'yn' + when true + 'Yn' + else + 'yN' + end + + result = nil + + while result.nil? + result = ask("#{question} [#{qstr}]") + result = case result + when /^[Yy].*/ + true + when /^[Nn].*/ + false + when /^$/ + default + else + nil + end + end + + return result + end + + ## + # Ask a question. Returns an answer if connected to a tty, nil otherwise. + + def ask(question) + return nil if not @ins.tty? + + @outs.print(question + " ") + @outs.flush + + result = @ins.gets + result.chomp! if result + result + end + + ## + # Display a statement. + + def say(statement="") + @outs.puts statement + end + + ## + # Display an informational alert. Will ask +question+ if it is not nil. + + def alert(statement, question=nil) + @outs.puts "INFO: #{statement}" + ask(question) if question + end + + ## + # Display a warning in a location expected to get error messages. Will + # ask +question+ if it is not nil. + + def alert_warning(statement, question=nil) + @errs.puts "WARNING: #{statement}" + ask(question) if question + end + + ## + # Display an error message in a location expected to get error messages. + # Will ask +question+ if it is not nil. + + def alert_error(statement, question=nil) + @errs.puts "ERROR: #{statement}" + ask(question) if question + end + + ## + # Terminate the application with exit code +status+, running any exit + # handlers that might have been defined. + + def terminate_interaction(status = 0) + raise Gem::SystemExitException, status + end + + ## + # Return a progress reporter object chosen from the current verbosity. + + def progress_reporter(*args) + case Gem.configuration.verbose + when nil, false + SilentProgressReporter.new(@outs, *args) + when true + SimpleProgressReporter.new(@outs, *args) + else + VerboseProgressReporter.new(@outs, *args) + end + end + + ## + # An absolutely silent progress reporter. + + class SilentProgressReporter + attr_reader :count + + def initialize(out_stream, size, initial_message, terminal_message = nil) + end + + def updated(message) + end + + def done + end + end + + ## + # A basic dotted progress reporter. + + class SimpleProgressReporter + include DefaultUserInteraction + + attr_reader :count + + def initialize(out_stream, size, initial_message, + terminal_message = "complete") + @out = out_stream + @total = size + @count = 0 + @terminal_message = terminal_message + + @out.puts initial_message + end + + ## + # Prints out a dot and ignores +message+. + + def updated(message) + @count += 1 + @out.print "." + @out.flush + end + + ## + # Prints out the terminal message. + + def done + @out.puts "\n#{@terminal_message}" + end + + end + + ## + # A progress reporter that prints out messages about the current progress. + + class VerboseProgressReporter + include DefaultUserInteraction + + attr_reader :count + + def initialize(out_stream, size, initial_message, + terminal_message = 'complete') + @out = out_stream + @total = size + @count = 0 + @terminal_message = terminal_message + + @out.puts initial_message + end + + ## + # Prints out the position relative to the total and the +message+. + + def updated(message) + @count += 1 + @out.puts "#{@count}/#{@total}: #{message}" + end + + ## + # Prints out the terminal message. + + def done + @out.puts @terminal_message + end + end + end + + ## + # Subclass of StreamUI that instantiates the user interaction using STDIN, + # STDOUT, and STDERR. + + class ConsoleUI < StreamUI + def initialize + super(STDIN, STDOUT, STDERR) + end + end + + ## + # SilentUI is a UI choice that is absolutely silent. + + class SilentUI + def method_missing(sym, *args, &block) + self + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/validator.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/validator.rb new file mode 100644 index 0000000..4dd12ad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/validator.rb @@ -0,0 +1,209 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'find' + +require 'rubygems/digest/md5' +require 'rubygems/format' +require 'rubygems/installer' + +## +# Validator performs various gem file and gem database validation + +class Gem::Validator + + include Gem::UserInteraction + + ## + # Given a gem file's contents, validates against its own MD5 checksum + # gem_data:: [String] Contents of the gem file + + def verify_gem(gem_data) + raise Gem::VerificationError, 'empty gem file' if gem_data.size == 0 + + unless gem_data =~ /MD5SUM/ then + return # Don't worry about it...this sucks. Need to fix MD5 stuff for + # new format + # FIXME + end + + sum_data = gem_data.gsub(/MD5SUM = "([a-z0-9]+)"/, + "MD5SUM = \"#{"F" * 32}\"") + + unless Gem::MD5.hexdigest(sum_data) == $1.to_s then + raise Gem::VerificationError, 'invalid checksum for gem file' + end + end + + ## + # Given the path to a gem file, validates against its own MD5 checksum + # + # gem_path:: [String] Path to gem file + + def verify_gem_file(gem_path) + open gem_path, Gem.binary_mode do |file| + gem_data = file.read + verify_gem gem_data + end + rescue Errno::ENOENT + raise Gem::VerificationError, "missing gem file #{gem_path}" + end + + private + + def find_files_for_gem(gem_directory) + installed_files = [] + Find.find(gem_directory) {|file_name| + fn = file_name.slice((gem_directory.size)..(file_name.size-1)).sub(/^\//, "") + if(!(fn =~ /CVS/ || File.directory?(fn) || fn == "")) then + installed_files << fn + end + + } + installed_files + end + + public + + ErrorData = Struct.new :path, :problem + + ## + # Checks the gem directory for the following potential + # inconsistencies/problems: + # + # * Checksum gem itself + # * For each file in each gem, check consistency of installed versions + # * Check for files that aren't part of the gem but are in the gems directory + # * 1 cache - 1 spec - 1 directory. + # + # returns a hash of ErrorData objects, keyed on the problem gem's name. + + def alien + errors = {} + + Gem::SourceIndex.from_installed_gems.each do |gem_name, gem_spec| + errors[gem_name] ||= [] + + gem_path = File.join(Gem.dir, "cache", gem_spec.full_name) + ".gem" + spec_path = File.join(Gem.dir, "specifications", gem_spec.full_name) + ".gemspec" + gem_directory = File.join(Gem.dir, "gems", gem_spec.full_name) + + installed_files = find_files_for_gem(gem_directory) + + unless File.exist? spec_path then + errors[gem_name] << ErrorData.new(spec_path, "Spec file doesn't exist for installed gem") + end + + begin + verify_gem_file(gem_path) + + open gem_path, Gem.binary_mode do |file| + format = Gem::Format.from_file_by_path(gem_path) + format.file_entries.each do |entry, data| + # Found this file. Delete it from list + installed_files.delete remove_leading_dot_dir(entry['path']) + + next unless data # HACK `gem check -a mkrf` + + open File.join(gem_directory, entry['path']), Gem.binary_mode do |f| + unless Gem::MD5.hexdigest(f.read).to_s == + Gem::MD5.hexdigest(data).to_s then + errors[gem_name] << ErrorData.new(entry['path'], "installed file doesn't match original from gem") + end + end + end + end + rescue Gem::VerificationError => e + errors[gem_name] << ErrorData.new(gem_path, e.message) + end + + # Clean out directories that weren't explicitly included in the gemspec + # FIXME: This still allows arbitrary incorrect directories. + installed_files.delete_if {|potential_directory| + File.directory?(File.join(gem_directory, potential_directory)) + } + if(installed_files.size > 0) then + errors[gem_name] << ErrorData.new(gem_path, "Unmanaged files in gem: #{installed_files.inspect}") + end + end + + errors + end + + if RUBY_VERSION < '1.9' then + class TestRunner + def initialize(suite, ui) + @suite = suite + @ui = ui + end + + def self.run(suite, ui) + require 'test/unit/ui/testrunnermediator' + return new(suite, ui).start + end + + def start + @mediator = Test::Unit::UI::TestRunnerMediator.new(@suite) + @mediator.add_listener(Test::Unit::TestResult::FAULT, &method(:add_fault)) + return @mediator.run_suite + end + + def add_fault(fault) + if Gem.configuration.verbose then + @ui.say fault.long_display + end + end + end + + autoload :TestRunner, 'test/unit/ui/testrunnerutilities' + end + + ## + # Runs unit tests for a given gem specification + + def unit_test(gem_spec) + start_dir = Dir.pwd + Dir.chdir(gem_spec.full_gem_path) + $: << File.join(Gem.dir, "gems", gem_spec.full_name) + # XXX: why do we need this gem_spec when we've already got 'spec'? + test_files = gem_spec.test_files + + if test_files.empty? then + say "There are no unit tests to run for #{gem_spec.full_name}" + return nil + end + + gem gem_spec.name, "= #{gem_spec.version.version}" + + test_files.each do |f| require f end + + if RUBY_VERSION < '1.9' then + suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}") + + ObjectSpace.each_object(Class) do |klass| + suite << klass.suite if (klass < Test::Unit::TestCase) + end + + result = TestRunner.run suite, ui + + alert_error result.to_s unless result.passed? + else + result = MiniTest::Unit.new + result.run + end + + result + ensure + Dir.chdir(start_dir) + end + + private + def remove_leading_dot_dir(path) + path.sub(/^\.\//, "") + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/version.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/version.rb new file mode 100644 index 0000000..ff4a7bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/version.rb @@ -0,0 +1,167 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +## +# The Version class processes string versions into comparable values + +class Gem::Version + + include Comparable + + attr_reader :ints + + attr_reader :version + + ## + # Returns true if +version+ is a valid version string. + + def self.correct?(version) + case version + when Integer, /\A\s*(\d+(\.\d+)*)*\s*\z/ then true + else false + end + end + + ## + # Factory method to create a Version object. Input may be a Version or a + # String. Intended to simplify client code. + # + # ver1 = Version.create('1.3.17') # -> (Version object) + # ver2 = Version.create(ver1) # -> (ver1) + # ver3 = Version.create(nil) # -> nil + + def self.create(input) + if input.respond_to? :version then + input + elsif input.nil? then + nil + else + new input + end + end + + ## + # Constructs a Version from the +version+ string. A version string is a + # series of digits separated by dots. + + def initialize(version) + raise ArgumentError, "Malformed version number string #{version}" unless + self.class.correct?(version) + + self.version = version + end + + def inspect # :nodoc: + "#<#{self.class} #{@version.inspect}>" + end + + # Dump only the raw version string, not the complete object + def marshal_dump + [@version] + end + + # Load custom marshal format + def marshal_load(array) + self.version = array[0] + end + + ## + # Strip ignored trailing zeros. + + def normalize + @ints = build_array_from_version_string + + return if @ints.length == 1 + + @ints.pop while @ints.last == 0 + + @ints = [0] if @ints.empty? + end + + ## + # Returns the text representation of the version + # + # return:: [String] version as string + # + def to_s + @version + end + + ## + # Returns an integer array representation of this Version. + + def to_ints + normalize unless @ints + @ints + end + + def to_yaml_properties + ['@version'] + end + + def version=(version) + @version = version.to_s.strip + normalize + end + + def yaml_initialize(tag, values) + self.version = values['version'] + end + + ## + # Compares this version with +other+ returning -1, 0, or 1 if the other + # version is larger, the same, or smaller than this one. + + def <=>(other) + return nil unless self.class === other + return 1 unless other + @ints <=> other.ints + end + + ## + # A Version is only eql? to another version if it has the same version + # string. "1.0" is not the same version as "1". + + def eql?(other) + self.class === other and @version == other.version + end + + def hash # :nodoc: + @version.hash + end + + # Return a new version object where the next to the last revision + # number is one greater. (e.g. 5.3.1 => 5.4) + def bump + ints = build_array_from_version_string + ints.pop if ints.size > 1 + ints[-1] += 1 + self.class.new(ints.join(".")) + end + + def build_array_from_version_string + @version.to_s.scan(/\d+/).map { |s| s.to_i } + end + private :build_array_from_version_string + + #:stopdoc: + + require 'rubygems/requirement' + + # Gem::Requirement's original definition is nested in Version. + # Although an inappropriate place, current gems specs reference the nested + # class name explicitly. To remain compatible with old software loading + # gemspecs, we leave a copy of original definition in Version, but define an + # alias Gem::Requirement for use everywhere else. + + Requirement = ::Gem::Requirement + + # :startdoc: + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/rubygems/version_option.rb b/lib/ruby-1.9.1-rc1/lib/rubygems/version_option.rb new file mode 100644 index 0000000..1374018 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/rubygems/version_option.rb @@ -0,0 +1,48 @@ +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + +require 'rubygems' + +# Mixin methods for --version and --platform Gem::Command options. +module Gem::VersionOption + + # Add the --platform option to the option parser. + def add_platform_option(task = command, *wrap) + OptionParser.accept Gem::Platform do |value| + if value == Gem::Platform::RUBY then + value + else + Gem::Platform.new value + end + end + + add_option('--platform PLATFORM', Gem::Platform, + "Specify the platform of gem to #{task}", *wrap) do + |value, options| + unless options[:added_platform] then + Gem.platforms = [Gem::Platform::RUBY] + options[:added_platform] = true + end + + Gem.platforms << value unless Gem.platforms.include? value + end + end + + # Add the --version option to the option parser. + def add_version_option(task = command, *wrap) + OptionParser.accept Gem::Requirement do |value| + Gem::Requirement.new value + end + + add_option('-v', '--version VERSION', Gem::Requirement, + "Specify version of gem to #{task}", *wrap) do + |value, options| + options[:version] = value + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/scanf.rb b/lib/ruby-1.9.1-rc1/lib/scanf.rb new file mode 100644 index 0000000..549f540 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/scanf.rb @@ -0,0 +1,703 @@ +# scanf for Ruby +# +# $Release Version: 1.1.2 $ +# $Revision: 19094 $ +# $Id: scanf.rb 19094 2008-09-03 12:54:13Z dblack $ +# $Author: dblack $ +# +# A product of the Austin Ruby Codefest (Austin, Texas, August 2002) + +=begin + +=scanf for Ruby + +==Description + +scanf for Ruby is an implementation of the C function scanf(3), +modified as necessary for Ruby compatibility. + +The methods provided are String#scanf, IO#scanf, and +Kernel#scanf. Kernel#scanf is a wrapper around STDIN.scanf. IO#scanf +can be used on any IO stream, including file handles and sockets. +scanf can be called either with or without a block. + +scanf for Ruby scans an input string or stream according to a +format, as described below ("Conversions"), and returns an +array of matches between the format and the input. The format is +defined in a string, and is similar (though not identical) to the +formats used in Kernel#printf and Kernel#sprintf. + +The format may contain conversion specifiers, which tell scanf +what form (type) each particular matched substring should be converted +to (e.g., decimal integer, floating point number, literal string, +etc.) The matches and conversions take place from left to right, and +the conversions themselves are returned as an array. + +The format string may also contain characters other than those in the +conversion specifiers. White space (blanks, tabs, or newlines) in the +format string matches any amount of white space, including none, in +the input. Everything else matches only itself. + +Scanning stops, and scanf returns, when any input character fails to +match the specifications in the format string, or when input is +exhausted, or when everything in the format string has been +matched. All matches found up to the stopping point are returned in +the return array (or yielded to the block, if a block was given). + + +==Basic usage + + require 'scanf.rb' + + # String#scanf and IO#scanf take a single argument (a format string) + array = aString.scanf("%d%s") + array = anIO.scanf("%d%s") + + # Kernel#scanf reads from STDIN + array = scanf("%d%s") + +==Block usage + +When called with a block, scanf keeps scanning the input, cycling back +to the beginning of the format string, and yields a new array of +conversions to the block every time the format string is matched +(including partial matches, but not including complete failures). The +actual return value of scanf when called with a block is an array +containing the results of all the executions of the block. + + str = "123 abc 456 def 789 ghi" + str.scanf("%d%s") { |num,str| [ num * 2, str.upcase ] } + # => [[246, "ABC"], [912, "DEF"], [1578, "GHI"]] + +==Conversions + +The single argument to scanf is a format string, which generally +includes one or more conversion specifiers. Conversion specifiers +begin with the percent character ('%') and include information about +what scanf should next scan for (string, decimal number, single +character, etc.). + +There may be an optional maximum field width, expressed as a decimal +integer, between the % and the conversion. If no width is given, a +default of `infinity' is used (with the exception of the %c specifier; +see below). Otherwise, given a field width of n for a given +conversion, at most n characters are scanned in processing +that conversion. Before conversion begins, most conversions skip +white space in the input string; this white space is not counted +against the field width. + +The following conversions are available. (See the files EXAMPLES +and tests/scanftests.rb for examples.) + +[%] + Matches a literal `%'. That is, `%%' in the format string matches a + single input `%' character. No conversion is done, and the resulting + '%' is not included in the return array. + +[d] + Matches an optionally signed decimal integer. + +[u] + Same as d. + +[i] + Matches an optionally signed integer. The integer is read in base + 16 if it begins with `0x' or `0X', in base 8 if it begins with `0', + and in base 10 other- wise. Only characters that correspond to the + base are recognized. + +[o] + Matches an optionally signed octal integer. + +[x,X] + Matches an optionally signed hexadecimal integer, + +[f,g,e,E] + Matches an optionally signed floating-point number. + +[s] + Matches a sequence of non-white-space character. The input string stops at + white space or at the maximum field width, whichever occurs first. + +[c] + Matches a single character, or a sequence of n characters if a + field width of n is specified. The usual skip of leading white + space is suppressed. To skip white space first, use an explicit space in + the format. + +[[] + Matches a nonempty sequence of characters from the specified set + of accepted characters. The usual skip of leading white space is + suppressed. This bracketed sub-expression is interpreted exactly like a + character class in a Ruby regular expression. (In fact, it is placed as-is + in a regular expression.) The matching against the input string ends with + the appearance of a character not in (or, with a circumflex, in) the set, + or when the field width runs out, whichever comes first. + +===Assignment suppression + +To require that a particular match occur, but without including the result +in the return array, place the assignment suppression flag, which is +the star character ('*'), immediately after the leading '%' of a format +specifier (just before the field width, if any). + +==Examples + +See the files EXAMPLES and tests/scanftests.rb. + +==scanf for Ruby compared with scanf in C + +scanf for Ruby is based on the C function scanf(3), but with modifications, +dictated mainly by the underlying differences between the languages. + +===Unimplemented flags and specifiers + +* The only flag implemented in scanf for Ruby is '*' (ignore + upcoming conversion). Many of the flags available in C versions of scanf(4) + have to do with the type of upcoming pointer arguments, and are literally + meaningless in Ruby. + +* The n specifier (store number of characters consumed so far in + next pointer) is not implemented. + +* The p specifier (match a pointer value) is not implemented. + +===Altered specifiers + +[o,u,x,X] + In scanf for Ruby, all of these specifiers scan for an optionally signed + integer, rather than for an unsigned integer like their C counterparts. + +===Return values + +scanf for Ruby returns an array of successful conversions, whereas +scanf(3) returns the number of conversions successfully +completed. (See below for more details on scanf for Ruby's return +values.) + +==Return values + +Without a block, scanf returns an array containing all the conversions +it has found. If none are found, scanf will return an empty array. An +unsuccesful match is never ignored, but rather always signals the end +of the scanning operation. If the first unsuccessful match takes place +after one or more successful matches have already taken place, the +returned array will contain the results of those successful matches. + +With a block scanf returns a 'map'-like array of transformations from +the block -- that is, an array reflecting what the block did with each +yielded result from the iterative scanf operation. (See "Block +usage", above.) + +==Test suite + +scanf for Ruby includes a suite of unit tests (requiring the +TestUnit package), which can be run with the command ruby +tests/scanftests.rb or the command make test. + +==Current limitations and bugs + +When using IO#scanf under Windows, make sure you open your files in +binary mode: + + File.open("filename", "rb") + +so that scanf can keep track of characters correctly. + +Support for character classes is reasonably complete (since it +essentially piggy-backs on Ruby's regular expression handling of +character classes), but users are advised that character class testing +has not been exhaustive, and that they should exercise some caution +in using any of the more complex and/or arcane character class +idioms. + + +==Technical notes + +===Rationale behind scanf for Ruby + +The impetus for a scanf implementation in Ruby comes chiefly from the fact +that existing pattern matching operations, such as Regexp#match and +String#scan, return all results as strings, which have to be converted to +integers or floats explicitly in cases where what's ultimately wanted are +integer or float values. + +===Design of scanf for Ruby + +scanf for Ruby is essentially a -to- converter. + +When scanf is called, a FormatString object is generated from the +format string ("%d%s...") argument. The FormatString object breaks the +format string down into atoms ("%d", "%5f", "blah", etc.), and from +each atom it creates a FormatSpecifier object, which it +saves. + +Each FormatSpecifier has a regular expression fragment and a "handler" +associated with it. For example, the regular expression fragment +associated with the format "%d" is "([-+]?\d+)", and the handler +associated with it is a wrapper around String#to_i. scanf itself calls +FormatString#match, passing in the input string. FormatString#match +iterates through its FormatSpecifiers; for each one, it matches the +corresponding regular expression fragment against the string. If +there's a match, it sends the matched string to the handler associated +with the FormatSpecifier. + +Thus, to follow up the "%d" example: if "123" occurs in the input +string when a FormatSpecifier consisting of "%d" is reached, the "123" +will be matched against "([-+]?\d+)", and the matched string will be +rendered into an integer by a call to to_i. + +The rendered match is then saved to an accumulator array, and the +input string is reduced to the post-match substring. Thus the string +is "eaten" from the left as the FormatSpecifiers are applied in +sequence. (This is done to a duplicate string; the original string is +not altered.) + +As soon as a regular expression fragment fails to match the string, or +when the FormatString object runs out of FormatSpecifiers, scanning +stops and results accumulated so far are returned in an array. + +==License and copyright + +Copyright:: (c) 2002-2003 David Alan Black +License:: Distributed on the same licensing terms as Ruby itself + +==Warranty disclaimer + +This software is provided "as is" and without any express or implied +warranties, including, without limitation, the implied warranties of +merchantibility and fitness for a particular purpose. + +==Credits and acknowledgements + +scanf for Ruby was developed as the major activity of the Austin +Ruby Codefest (Austin, Texas, August 2002). + +Principal author:: David Alan Black (mailto:dblack@superlink.net) +Co-author:: Hal Fulton (mailto:hal9000@hypermetrics.com) +Project contributors:: Nolan Darilek, Jason Johnston + +Thanks to Hal Fulton for hosting the Codefest. + +Thanks to Matz for suggestions about the class design. + +Thanks to Gavin Sinclair for some feedback on the documentation. + +The text for parts of this document, especially the Description and +Conversions sections, above, were adapted from the Linux Programmer's +Manual manpage for scanf(3), dated 1995-11-01. + +==Bugs and bug reports + +scanf for Ruby is based on something of an amalgam of C scanf +implementations and documentation, rather than on a single canonical +description. Suggestions for features and behaviors which appear in +other scanfs, and would be meaningful in Ruby, are welcome, as are +reports of suspicious behaviors and/or bugs. (Please see "Credits and +acknowledgements", above, for email addresses.) + +=end + +module Scanf + + class FormatSpecifier + + attr_reader :re_string, :matched_string, :conversion, :matched + + private + + def skip; /^\s*%\*/.match(@spec_string); end + + def extract_float(s); s.to_f if s &&! skip; end + def extract_decimal(s); s.to_i if s &&! skip; end + def extract_hex(s); s.hex if s &&! skip; end + def extract_octal(s); s.oct if s &&! skip; end + def extract_integer(s); Integer(s) if s &&! skip; end + def extract_plain(s); s unless skip; end + + def nil_proc(s); nil; end + + public + + def to_s + @spec_string + end + + def count_space? + /(?:\A|\S)%\*?\d*c|%\d*\[/.match(@spec_string) + end + + def initialize(str) + @spec_string = str + h = '[A-Fa-f0-9]' + + @re_string, @handler = + case @spec_string + + # %[[:...:]] + when /%\*?(\[\[:[a-z]+:\]\])/ + [ "(#{$1}+)", :extract_plain ] + + # %5[[:...:]] + when /%\*?(\d+)(\[\[:[a-z]+:\]\])/ + [ "(#{$2}{1,#{$1}})", :extract_plain ] + + # %[...] + when /%\*?\[([^\]]*)\]/ + yes = $1 + if /^\^/.match(yes) then no = yes[1..-1] else no = '^' + yes end + [ "([#{yes}]+)(?=[#{no}]|\\z)", :extract_plain ] + + # %5[...] + when /%\*?(\d+)\[([^\]]*)\]/ + yes = $2 + w = $1 + [ "([#{yes}]{1,#{w}})", :extract_plain ] + + # %i + when /%\*?i/ + [ "([-+]?(?:(?:0[0-7]+)|(?:0[Xx]#{h}+)|(?:[1-9]\\d*)))", :extract_integer ] + + # %5i + when /%\*?(\d+)i/ + n = $1.to_i + s = "(" + if n > 1 then s += "[1-9]\\d{1,#{n-1}}|" end + if n > 1 then s += "0[0-7]{1,#{n-1}}|" end + if n > 2 then s += "[-+]0[0-7]{1,#{n-2}}|" end + if n > 2 then s += "[-+][1-9]\\d{1,#{n-2}}|" end + if n > 2 then s += "0[Xx]#{h}{1,#{n-2}}|" end + if n > 3 then s += "[-+]0[Xx]#{h}{1,#{n-3}}|" end + s += "\\d" + s += ")" + [ s, :extract_integer ] + + # %d, %u + when /%\*?[du]/ + [ '([-+]?\d+)', :extract_decimal ] + + # %5d, %5u + when /%\*?(\d+)[du]/ + n = $1.to_i + s = "(" + if n > 1 then s += "[-+]\\d{1,#{n-1}}|" end + s += "\\d{1,#{$1}})" + [ s, :extract_decimal ] + + # %x + when /%\*?[Xx]/ + [ "([-+]?(?:0[Xx])?#{h}+)", :extract_hex ] + + # %5x + when /%\*?(\d+)[Xx]/ + n = $1.to_i + s = "(" + if n > 3 then s += "[-+]0[Xx]#{h}{1,#{n-3}}|" end + if n > 2 then s += "0[Xx]#{h}{1,#{n-2}}|" end + if n > 1 then s += "[-+]#{h}{1,#{n-1}}|" end + s += "#{h}{1,#{n}}" + s += ")" + [ s, :extract_hex ] + + # %o + when /%\*?o/ + [ '([-+]?[0-7]+)', :extract_octal ] + + # %5o + when /%\*?(\d+)o/ + [ "([-+][0-7]{1,#{$1.to_i-1}}|[0-7]{1,#{$1}})", :extract_octal ] + + # %f + when /%\*?f/ + [ '([-+]?((\d+(?>(?=[^\d.]|$)))|(\d*(\.(\d*([eE][-+]?\d+)?)))))', :extract_float ] + + # %5f + when /%\*?(\d+)f/ + [ "(\\S{1,#{$1}})", :extract_float ] + + # %5s + when /%\*?(\d+)s/ + [ "(\\S{1,#{$1}})", :extract_plain ] + + # %s + when /%\*?s/ + [ '(\S+)', :extract_plain ] + + # %c + when /\s%\*?c/ + [ "\\s*(.)", :extract_plain ] + + # %c + when /%\*?c/ + [ "(.)", :extract_plain ] + + # %5c (whitespace issues are handled by the count_*_space? methods) + when /%\*?(\d+)c/ + [ "(.{1,#{$1}})", :extract_plain ] + + # %% + when /%%/ + [ '(\s*%)', :nil_proc ] + + # literal characters + else + [ "(#{Regexp.escape(@spec_string)})", :nil_proc ] + end + + @re_string = '\A' + @re_string + end + + def to_re + Regexp.new(@re_string,Regexp::MULTILINE) + end + + def match(str) + @matched = false + s = str.dup + s.sub!(/\A\s+/,'') unless count_space? + res = to_re.match(s) + if res + @conversion = send(@handler, res[1]) + @matched_string = @conversion.to_s + @matched = true + end + res + end + + def letter + @spec_string[/%\*?\d*([a-z\[])/, 1] + end + + def width + w = @spec_string[/%\*?(\d+)/, 1] + w && w.to_i + end + + def mid_match? + return false unless @matched + cc_no_width = letter == '[' &&! width + c_or_cc_width = (letter == 'c' || letter == '[') && width + width_left = c_or_cc_width && (matched_string.size < width) + + return width_left || cc_no_width + end + + end + + class FormatString + + attr_reader :string_left, :last_spec_tried, + :last_match_tried, :matched_count, :space + + SPECIFIERS = 'diuXxofeEgsc' + REGEX = / + # possible space, followed by... + (?:\s* + # percent sign, followed by... + % + # another percent sign, or... + (?:%| + # optional assignment suppression flag + \*? + # optional maximum field width + \d* + # named character class, ... + (?:\[\[:\w+:\]\]| + # traditional character class, or... + \[[^\]]*\]| + # specifier letter. + [#{SPECIFIERS}])))| + # or miscellaneous characters + [^%\s]+/ix + + def initialize(str) + @specs = [] + @i = 1 + s = str.to_s + return unless /\S/.match(s) + @space = true if /\s\z/.match(s) + @specs.replace s.scan(REGEX).map {|spec| FormatSpecifier.new(spec) } + end + + def to_s + @specs.join('') + end + + def prune(n=matched_count) + n.times { @specs.shift } + end + + def spec_count + @specs.size + end + + def last_spec + @i == spec_count - 1 + end + + def match(str) + accum = [] + @string_left = str + @matched_count = 0 + + @specs.each_with_index do |spec,i| + @i=i + @last_spec_tried = spec + @last_match_tried = spec.match(@string_left) + break unless @last_match_tried + @matched_count += 1 + + accum << spec.conversion + + @string_left = @last_match_tried.post_match + break if @string_left.empty? + end + return accum.compact + end + end +end + +class IO + +# The trick here is doing a match where you grab one *line* +# of input at a time. The linebreak may or may not occur +# at the boundary where the string matches a format specifier. +# And if it does, some rule about whitespace may or may not +# be in effect... +# +# That's why this is much more elaborate than the string +# version. +# +# For each line: +# Match succeeds (non-emptily) +# and the last attempted spec/string sub-match succeeded: +# +# could the last spec keep matching? +# yes: save interim results and continue (next line) +# +# The last attempted spec/string did not match: +# +# are we on the next-to-last spec in the string? +# yes: +# is fmt_string.string_left all spaces? +# yes: does current spec care about input space? +# yes: fatal failure +# no: save interim results and continue +# no: continue [this state could be analyzed further] +# +# + + def scanf(str,&b) + return block_scanf(str,&b) if b + return [] unless str.size > 0 + + start_position = pos rescue 0 + matched_so_far = 0 + source_buffer = "" + result_buffer = [] + final_result = [] + + fstr = Scanf::FormatString.new(str) + + loop do + if eof || (tty? &&! fstr.match(source_buffer)) + final_result.concat(result_buffer) + break + end + + source_buffer << gets + + current_match = fstr.match(source_buffer) + + spec = fstr.last_spec_tried + + if spec.matched + if spec.mid_match? + result_buffer.replace(current_match) + next + end + + elsif (fstr.matched_count == fstr.spec_count - 1) + if /\A\s*\z/.match(fstr.string_left) + break if spec.count_space? + result_buffer.replace(current_match) + next + end + end + + final_result.concat(current_match) + + matched_so_far += source_buffer.size + source_buffer.replace(fstr.string_left) + matched_so_far -= source_buffer.size + break if fstr.last_spec + fstr.prune + end + seek(start_position + matched_so_far, IO::SEEK_SET) rescue Errno::ESPIPE + soak_up_spaces if fstr.last_spec && fstr.space + + return final_result + end + + private + + def soak_up_spaces + c = getc + ungetc(c) if c + until eof ||! c || /\S/.match(c.chr) + c = getc + end + ungetc(c) if (c && /\S/.match(c.chr)) + end + + def block_scanf(str) + final = [] +# Sub-ideal, since another FS gets created in scanf. +# But used here to determine the number of specifiers. + fstr = Scanf::FormatString.new(str) + last_spec = fstr.last_spec + begin + current = scanf(str) + break if current.empty? + final.push(yield(current)) + end until eof || fstr.last_spec_tried == last_spec + return final + end +end + +class String + + def scanf(fstr,&b) + if b + block_scanf(fstr,&b) + else + fs = + if fstr.is_a? Scanf::FormatString + fstr + else + Scanf::FormatString.new(fstr) + end + fs.match(self) + end + end + + def block_scanf(fstr,&b) + fs = Scanf::FormatString.new(fstr) + str = self.dup + final = [] + begin + current = str.scanf(fs) + final.push(yield(current)) unless current.empty? + str = fs.string_left + end until current.empty? || str.empty? + return final + end +end + +module Kernel + private + def scanf(fs,&b) + STDIN.scanf(fs,&b) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/securerandom.rb b/lib/ruby-1.9.1-rc1/lib/securerandom.rb new file mode 100644 index 0000000..0de118c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/securerandom.rb @@ -0,0 +1,182 @@ +# = Secure random number generator interface. +# +# This library is an interface for secure random number generator which is +# suitable for generating session key in HTTP cookies, etc. +# +# It supports following secure random number generators. +# +# * openssl +# * /dev/urandom +# * Win32 +# +# == Example +# +# # random hexadecimal string. +# p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" +# p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" +# p SecureRandom.hex(11) #=> "6aca1b5c58e4863e6b81b8" +# p SecureRandom.hex(12) #=> "94b2fff3e7fd9b9c391a2306" +# p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23" +# ... +# +# # random base64 string. +# p SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" +# p SecureRandom.base64(10) #=> "9b0nsevdwNuM/w==" +# p SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" +# p SecureRandom.base64(11) #=> "l7XEiFja+8EKEtY=" +# p SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8" +# p SecureRandom.base64(13) #=> "vKLJ0tXBHqQOuIcSIg==" +# ... +# +# # random binary string. +# p SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" +# p SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" +# ... + +begin + require 'openssl' +rescue LoadError +end + +module SecureRandom + # SecureRandom.random_bytes generates a random binary string. + # + # The argument n specifies the length of the result string. + # + # If n is not specified, 16 is assumed. + # It may be larger in future. + # + # If secure random number generator is not available, + # NotImplementedError is raised. + def self.random_bytes(n=nil) + n ||= 16 + + if defined? OpenSSL::Random + return OpenSSL::Random.random_bytes(n) + end + + if !defined?(@has_urandom) || @has_urandom + flags = File::RDONLY + flags |= File::NONBLOCK if defined? File::NONBLOCK + flags |= File::NOCTTY if defined? File::NOCTTY + flags |= File::NOFOLLOW if defined? File::NOFOLLOW + begin + File.open("/dev/urandom", flags) {|f| + unless f.stat.chardev? + raise Errno::ENOENT + end + @has_urandom = true + ret = f.readpartial(n) + if ret.length != n + raise NotImplementedError, "Unexpected partial read from random device" + end + return ret + } + rescue Errno::ENOENT + @has_urandom = false + end + end + + if !defined?(@has_win32) + begin + require 'Win32API' + + crypt_acquire_context = Win32API.new("advapi32", "CryptAcquireContext", 'PPPII', 'L') + @crypt_gen_random = Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L') + + hProvStr = " " * 4 + prov_rsa_full = 1 + crypt_verifycontext = 0xF0000000 + + if crypt_acquire_context.call(hProvStr, nil, nil, prov_rsa_full, crypt_verifycontext) == 0 + raise SystemCallError, "CryptAcquireContext failed: #{lastWin32ErrorMessage}" + end + @hProv, = hProvStr.unpack('L') + + @has_win32 = true + rescue LoadError + @has_win32 = false + end + end + if @has_win32 + bytes = " " * n + if @crypt_gen_random.call(@hProv, bytes.size, bytes) == 0 + raise SystemCallError, "CryptGenRandom failed: #{lastWin32ErrorMessage}" + end + return bytes + end + + raise NotImplementedError, "No random device" + end + + # SecureRandom.hex generates a random hex string. + # + # The argument n specifies the length of the random length. + # The length of the result string is twice of n. + # + # If n is not specified, 16 is assumed. + # It may be larger in future. + # + # If secure random number generator is not available, + # NotImplementedError is raised. + def self.hex(n=nil) + random_bytes(n).unpack("H*")[0] + end + + # SecureRandom.base64 generates a random base64 string. + # + # The argument n specifies the length of the random length. + # The length of the result string is about 4/3 of n. + # + # If n is not specified, 16 is assumed. + # It may be larger in future. + # + # If secure random number generator is not available, + # NotImplementedError is raised. + def self.base64(n=nil) + [random_bytes(n)].pack("m*").delete("\n") + end + + # SecureRandom.random_number generates a random number. + # + # If an positive integer is given as n, + # SecureRandom.random_number returns an integer: + # 0 <= SecureRandom.random_number(n) < n. + # + # If 0 is given or an argument is not given, + # SecureRandom.random_number returns an float: + # 0.0 <= SecureRandom.random_number() < 1.0. + def self.random_number(n=0) + if 0 < n + hex = n.to_s(16) + hex = '0' + hex if (hex.length & 1) == 1 + bin = [hex].pack("H*") + mask = bin[0].ord + mask |= mask >> 1 + mask |= mask >> 2 + mask |= mask >> 4 + begin + rnd = SecureRandom.random_bytes(bin.length) + rnd[0] = (rnd[0].ord & mask).chr + end until rnd < bin + rnd.unpack("H*")[0].hex + else + # assumption: Float::MANT_DIG <= 64 + i64 = SecureRandom.random_bytes(8).unpack("Q")[0] + Math.ldexp(i64 >> (64-Float::MANT_DIG), -Float::MANT_DIG) + end + end + + # Following code is based on David Garamond's GUID library for Ruby. + def self.lastWin32ErrorMessage # :nodoc: + get_last_error = Win32API.new("kernel32", "GetLastError", '', 'L') + format_message = Win32API.new("kernel32", "FormatMessageA", 'LPLLPLPPPPPPPP', 'L') + format_message_ignore_inserts = 0x00000200 + format_message_from_system = 0x00001000 + + code = get_last_error.call + msg = "\0" * 1024 + len = format_message.call(format_message_ignore_inserts + format_message_from_system, 0, code, 0, msg, 1024, nil, nil, nil, nil, nil, nil, nil, nil) + msg[0, len].tr("\r", '').chomp + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/set.rb b/lib/ruby-1.9.1-rc1/lib/set.rb new file mode 100644 index 0000000..635652b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/set.rb @@ -0,0 +1,1274 @@ +#!/usr/bin/env ruby +#-- +# set.rb - defines the Set class +#++ +# Copyright (c) 2002-2008 Akinori MUSHA +# +# Documentation by Akinori MUSHA and Gavin Sinclair. +# +# All rights reserved. You can redistribute and/or modify it under the same +# terms as Ruby. +# +# $Id: set.rb 18571 2008-08-13 08:03:30Z knu $ +# +# == Overview +# +# This library provides the Set class, which deals with a collection +# of unordered values with no duplicates. It is a hybrid of Array's +# intuitive inter-operation facilities and Hash's fast lookup. If you +# need to keep values ordered, use the SortedSet class. +# +# The method +to_set+ is added to Enumerable for convenience. +# +# See the Set class for an example of usage. + + +# +# Set implements a collection of unordered values with no duplicates. +# This is a hybrid of Array's intuitive inter-operation facilities and +# Hash's fast lookup. +# +# The equality of each couple of elements is determined according to +# Object#eql? and Object#hash, since Set uses Hash as storage. +# +# Set is easy to use with Enumerable objects (implementing +each+). +# Most of the initializer methods and binary operators accept generic +# Enumerable objects besides sets and arrays. An Enumerable object +# can be converted to Set using the +to_set+ method. +# +# == Example +# +# require 'set' +# s1 = Set.new [1, 2] # -> # +# s2 = [1, 2].to_set # -> # +# s1 == s2 # -> true +# s1.add("foo") # -> # +# s1.merge([2, 6]) # -> # +# s1.subset? s2 # -> false +# s2.subset? s1 # -> true +# +# == Contact +# +# - Akinori MUSHA (current maintainer) +# +class Set + include Enumerable + + # Creates a new set containing the given objects. + def self.[](*ary) + new(ary) + end + + # Creates a new set containing the elements of the given enumerable + # object. + # + # If a block is given, the elements of enum are preprocessed by the + # given block. + def initialize(enum = nil, &block) # :yields: o + @hash ||= Hash.new + + enum.nil? and return + + if block + enum.each { |o| add(block[o]) } + else + merge(enum) + end + end + + # Copy internal hash. + def initialize_copy(orig) + @hash = orig.instance_eval{@hash}.dup + end + + def freeze # :nodoc: + super + @hash.freeze + self + end + + def taint # :nodoc: + super + @hash.taint + self + end + + def untaint # :nodoc: + super + @hash.untaint + self + end + + # Returns the number of elements. + def size + @hash.size + end + alias length size + + # Returns true if the set contains no elements. + def empty? + @hash.empty? + end + + # Removes all elements and returns self. + def clear + @hash.clear + self + end + + # Replaces the contents of the set with the contents of the given + # enumerable object and returns self. + def replace(enum) + if enum.class == self.class + @hash.replace(enum.instance_eval { @hash }) + else + clear + enum.each { |o| add(o) } + end + + self + end + + # Converts the set to an array. The order of elements is uncertain. + def to_a + @hash.keys + end + + def flatten_merge(set, seen = Set.new) + set.each { |e| + if e.is_a?(Set) + if seen.include?(e_id = e.object_id) + raise ArgumentError, "tried to flatten recursive Set" + end + + seen.add(e_id) + flatten_merge(e, seen) + seen.delete(e_id) + else + add(e) + end + } + + self + end + protected :flatten_merge + + # Returns a new set that is a copy of the set, flattening each + # containing set recursively. + def flatten + self.class.new.flatten_merge(self) + end + + # Equivalent to Set#flatten, but replaces the receiver with the + # result in place. Returns nil if no modifications were made. + def flatten! + if detect { |e| e.is_a?(Set) } + replace(flatten()) + else + nil + end + end + + # Returns true if the set contains the given object. + def include?(o) + @hash.include?(o) + end + alias member? include? + + # Returns true if the set is a superset of the given set. + def superset?(set) + set.is_a?(Set) or raise ArgumentError, "value must be a set" + return false if size < set.size + set.all? { |o| include?(o) } + end + + # Returns true if the set is a proper superset of the given set. + def proper_superset?(set) + set.is_a?(Set) or raise ArgumentError, "value must be a set" + return false if size <= set.size + set.all? { |o| include?(o) } + end + + # Returns true if the set is a subset of the given set. + def subset?(set) + set.is_a?(Set) or raise ArgumentError, "value must be a set" + return false if set.size < size + all? { |o| set.include?(o) } + end + + # Returns true if the set is a proper subset of the given set. + def proper_subset?(set) + set.is_a?(Set) or raise ArgumentError, "value must be a set" + return false if set.size <= size + all? { |o| set.include?(o) } + end + + # Calls the given block once for each element in the set, passing + # the element as parameter. Returns an enumerator if no block is + # given. + def each + block_given? or return enum_for(__method__) + @hash.each_key { |o| yield(o) } + self + end + + # Adds the given object to the set and returns self. Use +merge+ to + # add many elements at once. + def add(o) + @hash[o] = true + self + end + alias << add + + # Adds the given object to the set and returns self. If the + # object is already in the set, returns nil. + def add?(o) + if include?(o) + nil + else + add(o) + end + end + + # Deletes the given object from the set and returns self. Use +subtract+ to + # delete many items at once. + def delete(o) + @hash.delete(o) + self + end + + # Deletes the given object from the set and returns self. If the + # object is not in the set, returns nil. + def delete?(o) + if include?(o) + delete(o) + else + nil + end + end + + # Deletes every element of the set for which block evaluates to + # true, and returns self. + def delete_if + block_given? or return enum_for(__method__) + to_a.each { |o| @hash.delete(o) if yield(o) } + self + end + + # Replaces the elements with ones returned by collect(). + def collect! + block_given? or return enum_for(__method__) + set = self.class.new + each { |o| set << yield(o) } + replace(set) + end + alias map! collect! + + # Equivalent to Set#delete_if, but returns nil if no changes were + # made. + def reject! + block_given? or return enum_for(__method__) + n = size + delete_if { |o| yield(o) } + size == n ? nil : self + end + + # Merges the elements of the given enumerable object to the set and + # returns self. + def merge(enum) + if enum.is_a?(Set) + @hash.update(enum.instance_eval { @hash }) + else + enum.each { |o| add(o) } + end + + self + end + + # Deletes every element that appears in the given enumerable object + # and returns self. + def subtract(enum) + enum.each { |o| delete(o) } + self + end + + # Returns a new set built by merging the set and the elements of the + # given enumerable object. + def |(enum) + dup.merge(enum) + end + alias + | ## + alias union | ## + + # Returns a new set built by duplicating the set, removing every + # element that appears in the given enumerable object. + def -(enum) + dup.subtract(enum) + end + alias difference - ## + + # Returns a new set containing elements common to the set and the + # given enumerable object. + def &(enum) + n = self.class.new + enum.each { |o| n.add(o) if include?(o) } + n + end + alias intersection & ## + + # Returns a new set containing elements exclusive between the set + # and the given enumerable object. (set ^ enum) is equivalent to + # ((set | enum) - (set & enum)). + def ^(enum) + n = Set.new(enum) + each { |o| if n.include?(o) then n.delete(o) else n.add(o) end } + n + end + + # Returns true if two sets are equal. The equality of each couple + # of elements is defined according to Object#eql?. + def ==(set) + equal?(set) and return true + + set.is_a?(Set) && size == set.size or return false + + hash = @hash.dup + set.all? { |o| hash.include?(o) } + end + + def hash # :nodoc: + @hash.hash + end + + def eql?(o) # :nodoc: + return false unless o.is_a?(Set) + @hash.eql?(o.instance_eval{@hash}) + end + + # Classifies the set by the return value of the given block and + # returns a hash of {value => set of elements} pairs. The block is + # called once for each element of the set, passing the element as + # parameter. + # + # e.g.: + # + # require 'set' + # files = Set.new(Dir.glob("*.rb")) + # hash = files.classify { |f| File.mtime(f).year } + # p hash # => {2000=>#, + # # 2001=>#, + # # 2002=>#} + def classify # :yields: o + block_given? or return enum_for(__method__) + + h = {} + + each { |i| + x = yield(i) + (h[x] ||= self.class.new).add(i) + } + + h + end + + # Divides the set into a set of subsets according to the commonality + # defined by the given block. + # + # If the arity of the block is 2, elements o1 and o2 are in common + # if block.call(o1, o2) is true. Otherwise, elements o1 and o2 are + # in common if block.call(o1) == block.call(o2). + # + # e.g.: + # + # require 'set' + # numbers = Set[1, 3, 4, 6, 9, 10, 11] + # set = numbers.divide { |i,j| (i - j).abs == 1 } + # p set # => #, + # # #, + # # #, + # # #}> + def divide(&func) + func or return enum_for(__method__) + + if func.arity == 2 + require 'tsort' + + class << dig = {} # :nodoc: + include TSort + + alias tsort_each_node each_key + def tsort_each_child(node, &block) + fetch(node).each(&block) + end + end + + each { |u| + dig[u] = a = [] + each{ |v| func.call(u, v) and a << v } + } + + set = Set.new() + dig.each_strongly_connected_component { |css| + set.add(self.class.new(css)) + } + set + else + Set.new(classify(&func).values) + end + end + + InspectKey = :__inspect_key__ # :nodoc: + + # Returns a string containing a human-readable representation of the + # set. ("#") + def inspect + ids = (Thread.current[InspectKey] ||= []) + + if ids.include?(object_id) + return sprintf('#<%s: {...}>', self.class.name) + end + + begin + ids << object_id + return sprintf('#<%s: {%s}>', self.class, to_a.inspect[1..-2]) + ensure + ids.pop + end + end + + def pretty_print(pp) # :nodoc: + pp.text sprintf('#<%s: {', self.class.name) + pp.nest(1) { + pp.seplist(self) { |o| + pp.pp o + } + } + pp.text "}>" + end + + def pretty_print_cycle(pp) # :nodoc: + pp.text sprintf('#<%s: {%s}>', self.class.name, empty? ? '' : '...') + end +end + +# SortedSet implements a set which elements are sorted in order. See Set. +class SortedSet < Set + @@setup = false + + class << self + def [](*ary) # :nodoc: + new(ary) + end + + def setup # :nodoc: + @@setup and return + + module_eval { + # a hack to shut up warning + alias old_init initialize + remove_method :old_init + } + begin + require 'rbtree' + + module_eval %{ + def initialize(*args, &block) + @hash = RBTree.new + super + end + } + rescue LoadError + module_eval %{ + def initialize(*args, &block) + @keys = nil + super + end + + def clear + @keys = nil + super + end + + def replace(enum) + @keys = nil + super + end + + def add(o) + @keys = nil + @hash[o] = true + self + end + alias << add + + def delete(o) + @keys = nil + @hash.delete(o) + self + end + + def delete_if + block_given? or return enum_for(__method__) + n = @hash.size + super + @keys = nil if @hash.size != n + self + end + + def merge(enum) + @keys = nil + super + end + + def each + block_given? or return enum_for(__method__) + to_a.each { |o| yield(o) } + self + end + + def to_a + (@keys = @hash.keys).sort! unless @keys + @keys + end + } + end + + @@setup = true + end + end + + def initialize(*args, &block) # :nodoc: + SortedSet.setup + initialize(*args, &block) + end +end + +module Enumerable + # Makes a set from the enumerable object with given arguments. + # Needs to +require "set"+ to use this method. + def to_set(klass = Set, *args, &block) + klass.new(self, *args, &block) + end +end + +# =begin +# == RestricedSet class +# RestricedSet implements a set with restrictions defined by a given +# block. +# +# === Super class +# Set +# +# === Class Methods +# --- RestricedSet::new(enum = nil) { |o| ... } +# --- RestricedSet::new(enum = nil) { |rset, o| ... } +# Creates a new restricted set containing the elements of the given +# enumerable object. Restrictions are defined by the given block. +# +# If the block's arity is 2, it is called with the RestrictedSet +# itself and an object to see if the object is allowed to be put in +# the set. +# +# Otherwise, the block is called with an object to see if the object +# is allowed to be put in the set. +# +# === Instance Methods +# --- restriction_proc +# Returns the restriction procedure of the set. +# +# =end +# +# class RestricedSet < Set +# def initialize(*args, &block) +# @proc = block or raise ArgumentError, "missing a block" +# +# if @proc.arity == 2 +# instance_eval %{ +# def add(o) +# @hash[o] = true if @proc.call(self, o) +# self +# end +# alias << add +# +# def add?(o) +# if include?(o) || !@proc.call(self, o) +# nil +# else +# @hash[o] = true +# self +# end +# end +# +# def replace(enum) +# clear +# enum.each { |o| add(o) } +# +# self +# end +# +# def merge(enum) +# enum.each { |o| add(o) } +# +# self +# end +# } +# else +# instance_eval %{ +# def add(o) +# if @proc.call(o) +# @hash[o] = true +# end +# self +# end +# alias << add +# +# def add?(o) +# if include?(o) || !@proc.call(o) +# nil +# else +# @hash[o] = true +# self +# end +# end +# } +# end +# +# super(*args) +# end +# +# def restriction_proc +# @proc +# end +# end + +if $0 == __FILE__ + eval DATA.read, nil, $0, __LINE__+4 +end + +__END__ + +require 'test/unit' + +class TC_Set < Test::Unit::TestCase + def test_aref + assert_nothing_raised { + Set[] + Set[nil] + Set[1,2,3] + } + + assert_equal(0, Set[].size) + assert_equal(1, Set[nil].size) + assert_equal(1, Set[[]].size) + assert_equal(1, Set[[nil]].size) + + set = Set[2,4,6,4] + assert_equal(Set.new([2,4,6]), set) + end + + def test_s_new + assert_nothing_raised { + Set.new() + Set.new(nil) + Set.new([]) + Set.new([1,2]) + Set.new('a'..'c') + } + assert_raises(NoMethodError) { + Set.new(false) + } + assert_raises(NoMethodError) { + Set.new(1) + } + assert_raises(ArgumentError) { + Set.new(1,2) + } + + assert_equal(0, Set.new().size) + assert_equal(0, Set.new(nil).size) + assert_equal(0, Set.new([]).size) + assert_equal(1, Set.new([nil]).size) + + ary = [2,4,6,4] + set = Set.new(ary) + ary.clear + assert_equal(false, set.empty?) + assert_equal(3, set.size) + + ary = [1,2,3] + + s = Set.new(ary) { |o| o * 2 } + assert_equal([2,4,6], s.sort) + end + + def test_clone + set1 = Set.new + set2 = set1.clone + set1 << 'abc' + assert_equal(Set.new, set2) + end + + def test_dup + set1 = Set[1,2] + set2 = set1.dup + + assert_not_same(set1, set2) + + assert_equal(set1, set2) + + set1.add(3) + + assert_not_equal(set1, set2) + end + + def test_size + assert_equal(0, Set[].size) + assert_equal(2, Set[1,2].size) + assert_equal(2, Set[1,2,1].size) + end + + def test_empty? + assert_equal(true, Set[].empty?) + assert_equal(false, Set[1, 2].empty?) + end + + def test_clear + set = Set[1,2] + ret = set.clear + + assert_same(set, ret) + assert_equal(true, set.empty?) + end + + def test_replace + set = Set[1,2] + ret = set.replace('a'..'c') + + assert_same(set, ret) + assert_equal(Set['a','b','c'], set) + end + + def test_to_a + set = Set[1,2,3,2] + ary = set.to_a + + assert_equal([1,2,3], ary.sort) + end + + def test_flatten + # test1 + set1 = Set[ + 1, + Set[ + 5, + Set[7, + Set[0] + ], + Set[6,2], + 1 + ], + 3, + Set[3,4] + ] + + set2 = set1.flatten + set3 = Set.new(0..7) + + assert_not_same(set2, set1) + assert_equal(set3, set2) + + # test2; destructive + orig_set1 = set1 + set1.flatten! + + assert_same(orig_set1, set1) + assert_equal(set3, set1) + + # test3; multiple occurrences of a set in an set + set1 = Set[1, 2] + set2 = Set[set1, Set[set1, 4], 3] + + assert_nothing_raised { + set2.flatten! + } + + assert_equal(Set.new(1..4), set2) + + # test4; recursion + set2 = Set[] + set1 = Set[1, set2] + set2.add(set1) + + assert_raises(ArgumentError) { + set1.flatten! + } + + # test5; miscellaneous + empty = Set[] + set = Set[Set[empty, "a"],Set[empty, "b"]] + + assert_nothing_raised { + set.flatten + } + + set1 = empty.merge(Set["no_more", set]) + + assert_nil(Set.new(0..31).flatten!) + + x = Set[Set[],Set[1,2]].flatten! + y = Set[1,2] + + assert_equal(x, y) + end + + def test_include? + set = Set[1,2,3] + + assert_equal(true, set.include?(1)) + assert_equal(true, set.include?(2)) + assert_equal(true, set.include?(3)) + assert_equal(false, set.include?(0)) + assert_equal(false, set.include?(nil)) + + set = Set["1",nil,"2",nil,"0","1",false] + assert_equal(true, set.include?(nil)) + assert_equal(true, set.include?(false)) + assert_equal(true, set.include?("1")) + assert_equal(false, set.include?(0)) + assert_equal(false, set.include?(true)) + end + + def test_superset? + set = Set[1,2,3] + + assert_raises(ArgumentError) { + set.superset?() + } + + assert_raises(ArgumentError) { + set.superset?(2) + } + + assert_raises(ArgumentError) { + set.superset?([2]) + } + + assert_equal(true, set.superset?(Set[])) + assert_equal(true, set.superset?(Set[1,2])) + assert_equal(true, set.superset?(Set[1,2,3])) + assert_equal(false, set.superset?(Set[1,2,3,4])) + assert_equal(false, set.superset?(Set[1,4])) + + assert_equal(true, Set[].superset?(Set[])) + end + + def test_proper_superset? + set = Set[1,2,3] + + assert_raises(ArgumentError) { + set.proper_superset?() + } + + assert_raises(ArgumentError) { + set.proper_superset?(2) + } + + assert_raises(ArgumentError) { + set.proper_superset?([2]) + } + + assert_equal(true, set.proper_superset?(Set[])) + assert_equal(true, set.proper_superset?(Set[1,2])) + assert_equal(false, set.proper_superset?(Set[1,2,3])) + assert_equal(false, set.proper_superset?(Set[1,2,3,4])) + assert_equal(false, set.proper_superset?(Set[1,4])) + + assert_equal(false, Set[].proper_superset?(Set[])) + end + + def test_subset? + set = Set[1,2,3] + + assert_raises(ArgumentError) { + set.subset?() + } + + assert_raises(ArgumentError) { + set.subset?(2) + } + + assert_raises(ArgumentError) { + set.subset?([2]) + } + + assert_equal(true, set.subset?(Set[1,2,3,4])) + assert_equal(true, set.subset?(Set[1,2,3])) + assert_equal(false, set.subset?(Set[1,2])) + assert_equal(false, set.subset?(Set[])) + + assert_equal(true, Set[].subset?(Set[1])) + assert_equal(true, Set[].subset?(Set[])) + end + + def test_proper_subset? + set = Set[1,2,3] + + assert_raises(ArgumentError) { + set.proper_subset?() + } + + assert_raises(ArgumentError) { + set.proper_subset?(2) + } + + assert_raises(ArgumentError) { + set.proper_subset?([2]) + } + + assert_equal(true, set.proper_subset?(Set[1,2,3,4])) + assert_equal(false, set.proper_subset?(Set[1,2,3])) + assert_equal(false, set.proper_subset?(Set[1,2])) + assert_equal(false, set.proper_subset?(Set[])) + + assert_equal(false, Set[].proper_subset?(Set[])) + end + + def test_each + ary = [1,3,5,7,10,20] + set = Set.new(ary) + + ret = set.each { |o| } + assert_same(set, ret) + + e = set.each + assert_instance_of(Enumerator, e) + + assert_nothing_raised { + set.each { |o| + ary.delete(o) or raise "unexpected element: #{o}" + } + + ary.empty? or raise "forgotten elements: #{ary.join(', ')}" + } + end + + def test_add + set = Set[1,2,3] + + ret = set.add(2) + assert_same(set, ret) + assert_equal(Set[1,2,3], set) + + ret = set.add?(2) + assert_nil(ret) + assert_equal(Set[1,2,3], set) + + ret = set.add(4) + assert_same(set, ret) + assert_equal(Set[1,2,3,4], set) + + ret = set.add?(5) + assert_same(set, ret) + assert_equal(Set[1,2,3,4,5], set) + end + + def test_delete + set = Set[1,2,3] + + ret = set.delete(4) + assert_same(set, ret) + assert_equal(Set[1,2,3], set) + + ret = set.delete?(4) + assert_nil(ret) + assert_equal(Set[1,2,3], set) + + ret = set.delete(2) + assert_equal(set, ret) + assert_equal(Set[1,3], set) + + ret = set.delete?(1) + assert_equal(set, ret) + assert_equal(Set[3], set) + end + + def test_delete_if + set = Set.new(1..10) + ret = set.delete_if { |i| i > 10 } + assert_same(set, ret) + assert_equal(Set.new(1..10), set) + + set = Set.new(1..10) + ret = set.delete_if { |i| i % 3 == 0 } + assert_same(set, ret) + assert_equal(Set[1,2,4,5,7,8,10], set) + end + + def test_collect! + set = Set[1,2,3,'a','b','c',-1..1,2..4] + + ret = set.collect! { |i| + case i + when Numeric + i * 2 + when String + i.upcase + else + nil + end + } + + assert_same(set, ret) + assert_equal(Set[2,4,6,'A','B','C',nil], set) + end + + def test_reject! + set = Set.new(1..10) + + ret = set.reject! { |i| i > 10 } + assert_nil(ret) + assert_equal(Set.new(1..10), set) + + ret = set.reject! { |i| i % 3 == 0 } + assert_same(set, ret) + assert_equal(Set[1,2,4,5,7,8,10], set) + end + + def test_merge + set = Set[1,2,3] + + ret = set.merge([2,4,6]) + assert_same(set, ret) + assert_equal(Set[1,2,3,4,6], set) + end + + def test_subtract + set = Set[1,2,3] + + ret = set.subtract([2,4,6]) + assert_same(set, ret) + assert_equal(Set[1,3], set) + end + + def test_plus + set = Set[1,2,3] + + ret = set + [2,4,6] + assert_not_same(set, ret) + assert_equal(Set[1,2,3,4,6], ret) + end + + def test_minus + set = Set[1,2,3] + + ret = set - [2,4,6] + assert_not_same(set, ret) + assert_equal(Set[1,3], ret) + end + + def test_and + set = Set[1,2,3,4] + + ret = set & [2,4,6] + assert_not_same(set, ret) + assert_equal(Set[2,4], ret) + end + + def test_xor + set = Set[1,2,3,4] + ret = set ^ [2,4,5,5] + assert_not_same(set, ret) + assert_equal(Set[1,3,5], ret) + end + + def test_eq + set1 = Set[2,3,1] + set2 = Set[1,2,3] + + assert_equal(set1, set1) + assert_equal(set1, set2) + assert_not_equal(Set[1], [1]) + + set1 = Class.new(Set)["a", "b"] + set2 = Set["a", "b", set1] + set1 = set1.add(set1.clone) + +# assert_equal(set1, set2) +# assert_equal(set2, set1) + assert_equal(set2, set2.clone) + assert_equal(set1.clone, set1) + + assert_not_equal(Set[Exception.new,nil], Set[Exception.new,Exception.new], "[ruby-dev:26127]") + end + + # def test_hash + # end + + # def test_eql? + # end + + def test_classify + set = Set.new(1..10) + ret = set.classify { |i| i % 3 } + + assert_equal(3, ret.size) + assert_instance_of(Hash, ret) + ret.each_value { |value| assert_instance_of(Set, value) } + assert_equal(Set[3,6,9], ret[0]) + assert_equal(Set[1,4,7,10], ret[1]) + assert_equal(Set[2,5,8], ret[2]) + end + + def test_divide + set = Set.new(1..10) + ret = set.divide { |i| i % 3 } + + assert_equal(3, ret.size) + n = 0 + ret.each { |s| n += s.size } + assert_equal(set.size, n) + assert_equal(set, ret.flatten) + + set = Set[7,10,5,11,1,3,4,9,0] + ret = set.divide { |a,b| (a - b).abs == 1 } + + assert_equal(4, ret.size) + n = 0 + ret.each { |s| n += s.size } + assert_equal(set.size, n) + assert_equal(set, ret.flatten) + ret.each { |s| + if s.include?(0) + assert_equal(Set[0,1], s) + elsif s.include?(3) + assert_equal(Set[3,4,5], s) + elsif s.include?(7) + assert_equal(Set[7], s) + elsif s.include?(9) + assert_equal(Set[9,10,11], s) + else + raise "unexpected group: #{s.inspect}" + end + } + end + + def test_inspect + set1 = Set[1] + + assert_equal('#', set1.inspect) + + set2 = Set[Set[0], 1, 2, set1] + assert_equal(false, set2.inspect.include?('#')) + + set1.add(set2) + assert_equal(true, set1.inspect.include?('#')) + end + + # def test_pretty_print + # end + + # def test_pretty_print_cycle + # end +end + +class TC_SortedSet < Test::Unit::TestCase + def test_sortedset + s = SortedSet[4,5,3,1,2] + + assert_equal([1,2,3,4,5], s.to_a) + + prev = nil + s.each { |o| assert(prev < o) if prev; prev = o } + assert_not_nil(prev) + + s.map! { |o| -2 * o } + + assert_equal([-10,-8,-6,-4,-2], s.to_a) + + prev = nil + ret = s.each { |o| assert(prev < o) if prev; prev = o } + assert_not_nil(prev) + assert_same(s, ret) + + s = SortedSet.new([2,1,3]) { |o| o * -2 } + assert_equal([-6,-4,-2], s.to_a) + + s = SortedSet.new(['one', 'two', 'three', 'four']) + a = [] + ret = s.delete_if { |o| a << o; o.start_with?('t') } + assert_same(s, ret) + assert_equal(['four', 'one'], s.to_a) + assert_equal(['four', 'one', 'three', 'two'], a) + + s = SortedSet.new(['one', 'two', 'three', 'four']) + a = [] + ret = s.reject! { |o| a << o; o.start_with?('t') } + assert_same(s, ret) + assert_equal(['four', 'one'], s.to_a) + assert_equal(['four', 'one', 'three', 'two'], a) + + s = SortedSet.new(['one', 'two', 'three', 'four']) + a = [] + ret = s.reject! { |o| a << o; false } + assert_same(nil, ret) + assert_equal(['four', 'one', 'three', 'two'], s.to_a) + assert_equal(['four', 'one', 'three', 'two'], a) + end +end + +class TC_Enumerable < Test::Unit::TestCase + def test_to_set + ary = [2,5,4,3,2,1,3] + + set = ary.to_set + assert_instance_of(Set, set) + assert_equal([1,2,3,4,5], set.sort) + + set = ary.to_set { |o| o * -2 } + assert_instance_of(Set, set) + assert_equal([-10,-8,-6,-4,-2], set.sort) + + set = ary.to_set(SortedSet) + assert_instance_of(SortedSet, set) + assert_equal([1,2,3,4,5], set.to_a) + + set = ary.to_set(SortedSet) { |o| o * -2 } + assert_instance_of(SortedSet, set) + assert_equal([-10,-8,-6,-4,-2], set.sort) + end +end + +# class TC_RestricedSet < Test::Unit::TestCase +# def test_s_new +# assert_raises(ArgumentError) { RestricedSet.new } +# +# s = RestricedSet.new([-1,2,3]) { |o| o > 0 } +# assert_equal([2,3], s.sort) +# end +# +# def test_restriction_proc +# s = RestricedSet.new([-1,2,3]) { |o| o > 0 } +# +# f = s.restriction_proc +# assert_instance_of(Proc, f) +# assert(f[1]) +# assert(!f[0]) +# end +# +# def test_replace +# s = RestricedSet.new(-3..3) { |o| o > 0 } +# assert_equal([1,2,3], s.sort) +# +# s.replace([-2,0,3,4,5]) +# assert_equal([3,4,5], s.sort) +# end +# +# def test_merge +# s = RestricedSet.new { |o| o > 0 } +# s.merge(-5..5) +# assert_equal([1,2,3,4,5], s.sort) +# +# s.merge([10,-10,-8,8]) +# assert_equal([1,2,3,4,5,8,10], s.sort) +# end +# end diff --git a/lib/ruby-1.9.1-rc1/lib/shell.rb b/lib/ruby-1.9.1-rc1/lib/shell.rb new file mode 100644 index 0000000..6a64cb2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/shell.rb @@ -0,0 +1,300 @@ +# +# shell.rb - +# $Release Version: 0.7 $ +# $Revision: 1.9 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# + +require "e2mmap" + +require "thread" unless defined?(Mutex) + +require "forwardable" + +require "shell/error" +require "shell/command-processor" +require "shell/process-controller" + +class Shell + @RCS_ID='-$Id: shell.rb,v 1.9 2002/03/04 12:01:10 keiju Exp keiju $-' + + include Error + extend Exception2MessageMapper + +# @cascade = true + # debug: true -> normal debug + # debug: 1 -> eval definition debug + # debug: 2 -> detail inspect debug + @debug = false + @verbose = true + + @debug_display_process_id = false + @debug_display_thread_id = true + @debug_output_mutex = Mutex.new + + class << Shell + extend Forwardable + + attr_accessor :cascade, :debug, :verbose + +# alias cascade? cascade + alias debug? debug + alias verbose? verbose + @verbose = true + + def debug=(val) + @debug = val + @verbose = val if val + end + + def cd(path) + new(path) + end + + def default_system_path + if @default_system_path + @default_system_path + else + ENV["PATH"].split(":") + end + end + + def default_system_path=(path) + @default_system_path = path + end + + def default_record_separator + if @default_record_separator + @default_record_separator + else + $/ + end + end + + def default_record_separator=(rs) + @default_record_separator = rs + end + + # os resource mutex + mutex_methods = ["unlock", "lock", "locked?", "synchronize", "try_lock", "exclusive_unlock"] + for m in mutex_methods + def_delegator("@debug_output_mutex", m, "debug_output_"+m.to_s) + end + + end + + def initialize(pwd = Dir.pwd, umask = nil) + @cwd = File.expand_path(pwd) + @dir_stack = [] + @umask = umask + + @system_path = Shell.default_system_path + @record_separator = Shell.default_record_separator + + @command_processor = CommandProcessor.new(self) + @process_controller = ProcessController.new(self) + + @verbose = Shell.verbose + @debug = Shell.debug + end + + attr_reader :system_path + + def system_path=(path) + @system_path = path + rehash + end + + attr_accessor :umask, :record_separator + attr_accessor :verbose, :debug + + def debug=(val) + @debug = val + @verbose = val if val + end + + alias verbose? verbose + alias debug? debug + + attr_reader :command_processor + attr_reader :process_controller + + def expand_path(path) + File.expand_path(path, @cwd) + end + + # Most Shell commands are defined via CommandProcessor + + # + # Dir related methods + # + # Shell#cwd/dir/getwd/pwd + # Shell#chdir/cd + # Shell#pushdir/pushd + # Shell#popdir/popd + # Shell#mkdir + # Shell#rmdir + + attr_reader :cwd + alias dir cwd + alias getwd cwd + alias pwd cwd + + attr_reader :dir_stack + alias dirs dir_stack + + # If called as iterator, it restores the current directory when the + # block ends. + def chdir(path = nil, verbose = @verbose) + check_point + + if iterator? + notify("chdir(with block) #{path}") if verbose + cwd_old = @cwd + begin + chdir(path, nil) + yield + ensure + chdir(cwd_old, nil) + end + else + notify("chdir #{path}") if verbose + path = "~" unless path + @cwd = expand_path(path) + notify "current dir: #{@cwd}" + rehash + Void.new(self) + end + end + alias cd chdir + + def pushdir(path = nil, verbose = @verbose) + check_point + + if iterator? + notify("pushdir(with block) #{path}") if verbose + pushdir(path, nil) + begin + yield + ensure + popdir + end + elsif path + notify("pushdir #{path}") if verbose + @dir_stack.push @cwd + chdir(path, nil) + notify "dir stack: [#{@dir_stack.join ', '}]" + self + else + notify("pushdir") if verbose + if pop = @dir_stack.pop + @dir_stack.push @cwd + chdir pop + notify "dir stack: [#{@dir_stack.join ', '}]" + self + else + Shell.Fail DirStackEmpty + end + end + Void.new(self) + end + alias pushd pushdir + + def popdir + check_point + + notify("popdir") + if pop = @dir_stack.pop + chdir pop + notify "dir stack: [#{@dir_stack.join ', '}]" + self + else + Shell.Fail DirStackEmpty + end + Void.new(self) + end + alias popd popdir + + # + # process management + # + def jobs + @process_controller.jobs + end + + def kill(sig, command) + @process_controller.kill_job(sig, command) + end + + # + # command definitions + # + def Shell.def_system_command(command, path = command) + CommandProcessor.def_system_command(command, path) + end + + def Shell.undef_system_command(command) + CommandProcessor.undef_system_command(command) + end + + def Shell.alias_command(ali, command, *opts, &block) + CommandProcessor.alias_command(ali, command, *opts, &block) + end + + def Shell.unalias_command(ali) + CommandProcessor.unalias_command(ali) + end + + def Shell.install_system_commands(pre = "sys_") + CommandProcessor.install_system_commands(pre) + end + + # + def inspect + if debug.kind_of?(Integer) && debug > 2 + super + else + to_s + end + end + + def self.notify(*opts, &block) + Shell::debug_output_synchronize do + if opts[-1].kind_of?(String) + yorn = verbose? + else + yorn = opts.pop + end + return unless yorn + + if @debug_display_thread_id + if @debug_display_process_id + prefix = "shell(##{Process.pid}:#{Thread.current.to_s.sub("Thread", "Th")}): " + else + prefix = "shell(#{Thread.current.to_s.sub("Thread", "Th")}): " + end + else + prefix = "shell: " + end + _head = true + STDERR.print opts.collect{|mes| + mes = mes.dup + yield mes if iterator? + if _head + _head = false +# "shell" " + mes + prefix + mes + else + " "* prefix.size + mes + end + }.join("\n")+"\n" + end + end + + CommandProcessor.initialize + CommandProcessor.run_config +end diff --git a/lib/ruby-1.9.1-rc1/lib/shell/builtin-command.rb b/lib/ruby-1.9.1-rc1/lib/shell/builtin-command.rb new file mode 100644 index 0000000..270c65c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/shell/builtin-command.rb @@ -0,0 +1,160 @@ +# +# shell/builtin-command.rb - +# $Release Version: 0.7 $ +# $Revision: 14912 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# + +require "shell/filter" + +class Shell + class BuiltInCommand + # + def expand_path(path) + @shell.expand_path(path) + end + + # + # File related commands + # Shell#foreach + # Shell#open + # Shell#unlink + # Shell#test + # + # - + # + # CommandProcessor#foreach(path, rs) + # path: String + # rs: String - record separator + # iterator + # Same as: + # File#foreach (when path is file) + # Dir#foreach (when path is directory) + # path is relative to pwd + # + def foreach(path = nil, *rs) + path = "." unless path + path = expand_path(path) + + if File.directory?(path) + Dir.foreach(path){|fn| yield fn} + else + IO.foreach(path, *rs){|l| yield l} + end + end + + # + # CommandProcessor#open(path, mode) + # path: String + # mode: String + # return: File or Dir + # Same as: + # File#open (when path is file) + # Dir#open (when path is directory) + # mode has an effect only when path is a file + # + def open(path, mode = nil, perm = 0666, &b) + path = expand_path(path) + if File.directory?(path) + Dir.open(path, &b) + else + if @shell.umask + f = File.open(path, mode, perm) + File.chmod(perm & ~@shell.umask, path) + if block_given? + f.each(&b) + end + f + else + f = File.open(path, mode, perm, &b) + end + end + end + # public :open + + # + # CommandProcessor#unlink(path) + # same as: + # Dir#unlink (when path is directory) + # File#unlink (when path is file) + # + def unlink(path) + @shell.check_point + + path = expand_path(path) + if File.directory?(path) + Dir.unlink(path) + else + IO.unlink(path) + end + Void.new(@shell) + end + + # + # CommandProcessor#test(command, file1, file2) + # CommandProcessor#[command, file1, file2] + # command: char or String or Symbol + # file1: String + # file2: String(optional) + # return: Boolean + # same as: + # test() (when command is char or length 1 string or symbol) + # FileTest.command (others) + # example: + # sh[?e, "foo"] + # sh[:e, "foo"] + # sh["e", "foo"] + # sh[:exists?, "foo"] + # sh["exists?", "foo"] + # + alias top_level_test test + def test(command, file1, file2=nil) + file1 = expand_path(file1) + file2 = expand_path(file2) if file2 + command = command.id2name if command.kind_of?(Symbol) + + case command + when Integer + if file2 + top_level_test(command, file1, file2) + else + top_level_test(command, file1) + end + when String + if command.size == 1 + if file2 + top_level_test(command, file1, file2) + else + top_level_test(command, file1) + end + else + if file2 + FileTest.send(command, file1, file2) + else + FileTest.send(command, file1) + end + end + end + end + alias [] test + + # + # Dir related methods + # + # Shell#mkdir + # Shell#rmdir + # + #-- + # + # CommandProcessor#mkdir(*path) + # path: String + # same as Dir.mkdir() + # + def mkdir(*path) + @shell.check_point + notify("mkdir #{path.join(' ')}") + + perm = nil + if path.last.kind_of?(Integer) + perm = path.pop + end + for dir in path + d = expand_path(dir) + if perm + Dir.mkdir(d, perm) + else + Dir.mkdir(d) + end + File.chmod(d, 0666 & ~@shell.umask) if @shell.umask + end + Void.new(@shell) + end + + # + # CommandProcessor#rmdir(*path) + # path: String + # same as Dir.rmdir() + # + def rmdir(*path) + @shell.check_point + notify("rmdir #{path.join(' ')}") + + for dir in path + Dir.rmdir(expand_path(dir)) + end + Void.new(@shell) + end + + # + # CommandProcessor#system(command, *opts) + # command: String + # opts: String + # return: SystemCommand + # Same as system() function + # example: + # print sh.system("ls", "-l") + # sh.system("ls", "-l") | sh.head > STDOUT + # + def system(command, *opts) + if opts.empty? + if command =~ /\*|\?|\{|\}|\[|\]|<|>|\(|\)|~|&|\||\\|\$|;|'|`|"|\n/ + return SystemCommand.new(@shell, find_system_command("sh"), "-c", command) + else + command, *opts = command.split(/\s+/) + end + end + SystemCommand.new(@shell, find_system_command(command), *opts) + end + + # + # ProcessCommand#rehash + # clear command hash table. + # + def rehash + @system_commands = {} + end + + # + # ProcessCommand#transact + # + def check_point + @shell.process_controller.wait_all_jobs_execution + end + alias finish_all_jobs check_point + + def transact(&block) + begin + @shell.instance_eval(&block) + ensure + check_point + end + end + + # + # internal commands + # + def out(dev = STDOUT, &block) + dev.print transact(&block) + end + + def echo(*strings) + Echo.new(@shell, *strings) + end + + def cat(*filenames) + Cat.new(@shell, *filenames) + end + + # def sort(*filenames) + # Sort.new(self, *filenames) + # end + + def glob(pattern) + Glob.new(@shell, pattern) + end + + def append(to, filter) + case to + when String + AppendFile.new(@shell, to, filter) + when IO + AppendIO.new(@shell, to, filter) + else + Shell.Fail Error::CantApplyMethod, "append", to.class + end + end + + def tee(file) + Tee.new(@shell, file) + end + + def concat(*jobs) + Concat.new(@shell, *jobs) + end + + # %pwd, %cwd -> @pwd + def notify(*opts, &block) + Shell.notify(*opts) {|mes| + yield mes if iterator? + + mes.gsub!("%pwd", "#{@cwd}") + mes.gsub!("%cwd", "#{@cwd}") + } + end + + # + # private functions + # + def find_system_command(command) + return command if /^\// =~ command + case path = @system_commands[command] + when String + if exists?(path) + return path + else + Shell.Fail Error::CommandNotFound, command + end + when false + Shell.Fail Error::CommandNotFound, command + end + + for p in @shell.system_path + path = join(p, command) + if FileTest.exist?(path) + @system_commands[command] = path + return path + end + end + @system_commands[command] = false + Shell.Fail Error::CommandNotFound, command + end + + # + # CommandProcessor.def_system_command(command, path) + # command: String + # path: String + # define 'command()' method as method. + # + def self.def_system_command(command, path = command) + begin + eval((d = %Q[def #{command}(*opts) + SystemCommand.new(@shell, '#{path}', *opts) + end]), nil, __FILE__, __LINE__ - 1) + rescue SyntaxError + Shell.notify "warn: Can't define #{command} path: #{path}." + end + Shell.notify "Define #{command} path: #{path}.", Shell.debug? + Shell.notify("Definition of #{command}: ", d, + Shell.debug.kind_of?(Integer) && Shell.debug > 1) + end + + def self.undef_system_command(command) + command = command.id2name if command.kind_of?(Symbol) + remove_method(command) + Shell.module_eval{remove_method(command)} + Filter.module_eval{remove_method(command)} + self + end + + # define command alias + # ex) + # def_alias_command("ls_c", "ls", "-C", "-F") + # def_alias_command("ls_c", "ls"){|*opts| ["-C", "-F", *opts]} + # + @alias_map = {} + def self.alias_map + @alias_map + end + def self.alias_command(ali, command, *opts, &block) + ali = ali.id2name if ali.kind_of?(Symbol) + command = command.id2name if command.kind_of?(Symbol) + begin + if iterator? + @alias_map[ali.intern] = proc + + eval((d = %Q[def #{ali}(*opts) + @shell.__send__(:#{command}, + *(CommandProcessor.alias_map[:#{ali}].call *opts)) + end]), nil, __FILE__, __LINE__ - 1) + + else + args = opts.collect{|opt| '"' + opt + '"'}.join(",") + eval((d = %Q[def #{ali}(*opts) + @shell.__send__(:#{command}, #{args}, *opts) + end]), nil, __FILE__, __LINE__ - 1) + end + rescue SyntaxError + Shell.notify "warn: Can't alias #{ali} command: #{command}." + Shell.notify("Definition of #{ali}: ", d) + raise + end + Shell.notify "Define #{ali} command: #{command}.", Shell.debug? + Shell.notify("Definition of #{ali}: ", d, + Shell.debug.kind_of?(Integer) && Shell.debug > 1) + self + end + + def self.unalias_command(ali) + ali = ali.id2name if ali.kind_of?(Symbol) + @alias_map.delete ali.intern + undef_system_command(ali) + end + + # + # CommandProcessor.def_builtin_commands(delegation_class, command_specs) + # delegation_class: Class or Module + # command_specs: [[command_name, [argument,...]],...] + # command_name: String + # arguments: String + # FILENAME?? -> expand_path(filename??) + # *FILENAME?? -> filename??.collect{|f|expand_path(f)}.join(", ") + # define command_name(argument,...) as + # delegation_class.command_name(argument,...) + # + def self.def_builtin_commands(delegation_class, command_specs) + for meth, args in command_specs + arg_str = args.collect{|arg| arg.downcase}.join(", ") + call_arg_str = args.collect{ + |arg| + case arg + when /^(FILENAME.*)$/ + format("expand_path(%s)", $1.downcase) + when /^(\*FILENAME.*)$/ + # \*FILENAME* -> filenames.collect{|fn| expand_path(fn)}.join(", ") + $1.downcase + '.collect{|fn| expand_path(fn)}' + else + arg + end + }.join(", ") + d = %Q[def #{meth}(#{arg_str}) + #{delegation_class}.#{meth}(#{call_arg_str}) + end] + Shell.notify "Define #{meth}(#{arg_str})", Shell.debug? + Shell.notify("Definition of #{meth}: ", d, + Shell.debug.kind_of?(Integer) && Shell.debug > 1) + eval d + end + end + + # + # CommandProcessor.install_system_commands(pre) + # pre: String - command name prefix + # defines every command which belongs in default_system_path via + # CommandProcessor.command(). It doesn't define already defined + # methods twice. By default, "pre_" is prefixes to each method + # name. Characters that may not be used in a method name are + # all converted to '_'. Definition errors are just ignored. + # + def self.install_system_commands(pre = "sys_") + defined_meth = {} + for m in Shell.methods + defined_meth[m] = true + end + sh = Shell.new + for path in Shell.default_system_path + next unless sh.directory? path + sh.cd path + sh.foreach do + |cn| + if !defined_meth[pre + cn] && sh.file?(cn) && sh.executable?(cn) + command = (pre + cn).gsub(/\W/, "_").sub(/^([0-9])/, '_\1') + begin + def_system_command(command, sh.expand_path(cn)) + rescue + Shell.notify "warn: Can't define #{command} path: #{cn}" + end + defined_meth[command] = command + end + end + end + end + + #---------------------------------------------------------------------- + # + # class initializing methods - + # + #---------------------------------------------------------------------- + def self.add_delegate_command_to_shell(id) + id = id.intern if id.kind_of?(String) + name = id.id2name + if Shell.method_defined?(id) + Shell.notify "warn: override definnition of Shell##{name}." + Shell.notify "warn: alias Shell##{name} to Shell##{name}_org.\n" + Shell.module_eval "alias #{name}_org #{name}" + end + Shell.notify "method added: Shell##{name}.", Shell.debug? + Shell.module_eval(%Q[def #{name}(*args, &block) + begin + @command_processor.__send__(:#{name}, *args, &block) + rescue Exception + $@.delete_if{|s| /:in `__getobj__'$/ =~ s} #` + $@.delete_if{|s| /^\\(eval\\):/ =~ s} + raise + end + end], __FILE__, __LINE__) + + if Shell::Filter.method_defined?(id) + Shell.notify "warn: override definnition of Shell::Filter##{name}." + Shell.notify "warn: alias Shell##{name} to Shell::Filter##{name}_org." + Filter.module_eval "alias #{name}_org #{name}" + end + Shell.notify "method added: Shell::Filter##{name}.", Shell.debug? + Filter.module_eval(%Q[def #{name}(*args, &block) + begin + self | @shell.__send__(:#{name}, *args, &block) + rescue Exception + $@.delete_if{|s| /:in `__getobj__'$/ =~ s} #` + $@.delete_if{|s| /^\\(eval\\):/ =~ s} + raise + end + end], __FILE__, __LINE__) + end + + # + # define default builtin commands + # + def self.install_builtin_commands + # method related File. + # (exclude open/foreach/unlink) + normal_delegation_file_methods = [ + ["atime", ["FILENAME"]], + ["basename", ["fn", "*opts"]], + ["chmod", ["mode", "*FILENAMES"]], + ["chown", ["owner", "group", "*FILENAME"]], + ["ctime", ["FILENAMES"]], + ["delete", ["*FILENAMES"]], + ["dirname", ["FILENAME"]], + ["ftype", ["FILENAME"]], + ["join", ["*items"]], + ["link", ["FILENAME_O", "FILENAME_N"]], + ["lstat", ["FILENAME"]], + ["mtime", ["FILENAME"]], + ["readlink", ["FILENAME"]], + ["rename", ["FILENAME_FROM", "FILENAME_TO"]], + # ["size", ["FILENAME"]], + ["split", ["pathname"]], + ["stat", ["FILENAME"]], + ["symlink", ["FILENAME_O", "FILENAME_N"]], + ["truncate", ["FILENAME", "length"]], + ["utime", ["atime", "mtime", "*FILENAMES"]]] + + def_builtin_commands(File, normal_delegation_file_methods) + alias_method :rm, :delete + + # method related FileTest + def_builtin_commands(FileTest, + FileTest.singleton_methods(false).collect{|m| [m, ["FILENAME"]]}) + + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/shell/error.rb b/lib/ruby-1.9.1-rc1/lib/shell/error.rb new file mode 100644 index 0000000..a4a6c1a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/shell/error.rb @@ -0,0 +1,25 @@ +# +# shell/error.rb - +# $Release Version: 0.7 $ +# $Revision: 14912 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# + +require "e2mmap" + +class Shell + module Error + extend Exception2MessageMapper + def_e2message TypeError, "wrong argument type %s (expected %s)" + + def_exception :DirStackEmpty, "Directory stack empty." + def_exception :CantDefine, "Can't define method(%s, %s)." + def_exception :CantApplyMethod, "This method(%s) does not apply to this type(%s)." + def_exception :CommandNotFound, "Command not found(%s)." + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/shell/filter.rb b/lib/ruby-1.9.1-rc1/lib/shell/filter.rb new file mode 100644 index 0000000..63f5777 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/shell/filter.rb @@ -0,0 +1,109 @@ +# +# shell/filter.rb - +# $Release Version: 0.7 $ +# $Revision: 14912 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# + +class Shell + # + # Filter + # A method to require + # each() + # + class Filter + include Enumerable + + def initialize(sh) + @shell = sh # parent shell + @input = nil # input filter + end + + attr_reader :input + + def input=(filter) + @input = filter + end + + def each(rs = nil) + rs = @shell.record_separator unless rs + if @input + @input.each(rs){|l| yield l} + end + end + + def < (src) + case src + when String + cat = Cat.new(@shell, src) + cat | self + when IO + self.input = src + self + else + Shell.Fail Error::CantApplyMethod, "<", to.class + end + end + + def > (to) + case to + when String + dst = @shell.open(to, "w") + begin + each(){|l| dst << l} + ensure + dst.close + end + when IO + each(){|l| to << l} + else + Shell.Fail Error::CantApplyMethod, ">", to.class + end + self + end + + def >> (to) + begin + Shell.cd(@shell.pwd).append(to, self) + rescue CantApplyMethod + Shell.Fail Error::CantApplyMethod, ">>", to.class + end + end + + def | (filter) + filter.input = self + if active? + @shell.process_controller.start_job filter + end + filter + end + + def + (filter) + Join.new(@shell, self, filter) + end + + def to_a + ary = [] + each(){|l| ary.push l} + ary + end + + def to_s + str = "" + each(){|l| str.concat l} + str + end + + def inspect + if @shell.debug.kind_of?(Integer) && @shell.debug > 2 + super + else + to_s + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/shell/process-controller.rb b/lib/ruby-1.9.1-rc1/lib/shell/process-controller.rb new file mode 100644 index 0000000..1ae60cc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/shell/process-controller.rb @@ -0,0 +1,319 @@ +# +# shell/process-controller.rb - +# $Release Version: 0.7 $ +# $Revision: 20880 $ +# by Keiju ISHITSUKA(keiju@ruby-lang.org) +# +# -- +# +# +# +require "forwardable" + +require "thread" +require "sync" + +class Shell + class ProcessController + + @ProcessControllers = {} + @ProcessControllersMonitor = Mutex.new + @ProcessControllersCV = ConditionVariable.new + + @BlockOutputMonitor = Mutex.new + @BlockOutputCV = ConditionVariable.new + + class< +# +# Contact: +# - Akinori MUSHA (current maintainer) +# +module Shellwords + # + # Splits a string into an array of tokens in the same way the UNIX + # Bourne shell does. + # + # argv = Shellwords.split('here are "two words"') + # argv #=> ["here", "are", "two words"] + # + # +String#shellsplit+ is a shorthand for this function. + # + # argv = 'here are "two words"'.shellsplit + # argv #=> ["here", "are", "two words"] + # + def shellsplit(line) + words = [] + field = '' + line.scan(/\G\s*(?>([^\s\\\'\"]+)|'([^\']*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|\z)?/m) do + |word, sq, dq, esc, garbage, sep| + raise ArgumentError, "Unmatched double quote: #{line.inspect}" if garbage + field << (word || sq || (dq || esc).gsub(/\\(?=.)/, '')) + if sep + words << field + field = '' + end + end + words + end + + alias shellwords shellsplit + + module_function :shellsplit, :shellwords + + class << self + alias split shellsplit + end + + # + # Escapes a string so that it can be safely used in a Bourne shell + # command line. + # + # Note that a resulted string should be used unquoted and is not + # intended for use in double quotes nor in single quotes. + # + # open("| grep #{Shellwords.escape(pattern)} file") { |pipe| + # # ... + # } + # + # +String#shellescape+ is a shorthand for this function. + # + # open("| grep #{pattern.shellescape} file") { |pipe| + # # ... + # } + # + def shellescape(str) + # An empty argument will be skipped, so return empty quotes. + return "''" if str.empty? + + str = str.dup + + # Process as a single byte sequence because not all shell + # implementations are multibyte aware. + str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/n, "\\\\\\1") + + # A LF cannot be escaped with a backslash because a backslash + LF + # combo is regarded as line continuation and simply ignored. + str.gsub!(/\n/, "'\n'") + + return str + end + + module_function :shellescape + + class << self + alias escape shellescape + end + + # + # Builds a command line string from an argument list +array+ joining + # all elements escaped for Bourne shell and separated by a space. + # + # open('|' + Shellwords.join(['grep', pattern, *files])) { |pipe| + # # ... + # } + # + # +Array#shelljoin+ is a shorthand for this function. + # + # open('|' + ['grep', pattern, *files].shelljoin) { |pipe| + # # ... + # } + # + def shelljoin(array) + array.map { |arg| shellescape(arg) }.join(' ') + end + + module_function :shelljoin + + class << self + alias join shelljoin + end +end + +class String + # + # call-seq: + # str.shellsplit => array + # + # Splits +str+ into an array of tokens in the same way the UNIX + # Bourne shell does. See +Shellwords::shellsplit+ for details. + # + def shellsplit + Shellwords.split(self) + end + + # + # call-seq: + # str.shellescape => string + # + # Escapes +str+ so that it can be safely used in a Bourne shell + # command line. See +Shellwords::shellescape+ for details. + # + def shellescape + Shellwords.escape(self) + end +end + +class Array + # + # call-seq: + # array.shelljoin => string + # + # Builds a command line string from an argument list +array+ joining + # all elements escaped for Bourne shell and separated by a space. + # See +Shellwords::shelljoin+ for details. + # + def shelljoin + Shellwords.join(self) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/singleton.rb b/lib/ruby-1.9.1-rc1/lib/singleton.rb new file mode 100644 index 0000000..c6a2527 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/singleton.rb @@ -0,0 +1,313 @@ +# The Singleton module implements the Singleton pattern. +# +# Usage: +# class Klass +# include Singleton +# # ... +# end +# +# * this ensures that only one instance of Klass lets call it +# ``the instance'' can be created. +# +# a,b = Klass.instance, Klass.instance +# a == b # => true +# a.new # NoMethodError - new is private ... +# +# * ``The instance'' is created at instantiation time, in other +# words the first call of Klass.instance(), thus +# +# class OtherKlass +# include Singleton +# # ... +# end +# ObjectSpace.each_object(OtherKlass){} # => 0. +# +# * This behavior is preserved under inheritance and cloning. +# +# +# +# This is achieved by marking +# * Klass.new and Klass.allocate - as private +# +# Providing (or modifying) the class methods +# * Klass.inherited(sub_klass) and Klass.clone() - +# to ensure that the Singleton pattern is properly +# inherited and cloned. +# +# * Klass.instance() - returning ``the instance''. After a +# successful self modifying (normally the first) call the +# method body is a simple: +# +# def Klass.instance() +# return @singleton__instance__ +# end +# +# * Klass._load(str) - calling Klass.instance() +# +# * Klass._instantiate?() - returning ``the instance'' or +# nil. This hook method puts a second (or nth) thread calling +# Klass.instance() on a waiting loop. The return value +# signifies the successful completion or premature termination +# of the first, or more generally, current "instantiation thread". +# +# +# The instance method of Singleton are +# * clone and dup - raising TypeErrors to prevent cloning or duping +# +# * _dump(depth) - returning the empty string. Marshalling strips +# by default all state information, e.g. instance variables and +# taint state, from ``the instance''. Providing custom _load(str) +# and _dump(depth) hooks allows the (partially) resurrections of +# a previous state of ``the instance''. + +require 'thread' + +module Singleton + # disable build-in copying methods + def clone + raise TypeError, "can't clone instance of singleton #{self.class}" + end + def dup + raise TypeError, "can't dup instance of singleton #{self.class}" + end + + # default marshalling strategy + def _dump(depth = -1) + '' + end + + module SingletonClassMethods + # properly clone the Singleton pattern - did you know + # that duping doesn't copy class methods? + def clone + Singleton.__init__(super) + end + + def _load(str) + instance + end + + private + + # ensure that the Singleton pattern is properly inherited + def inherited(sub_klass) + super + Singleton.__init__(sub_klass) + end + end + + class << Singleton + def __init__(klass) + klass.instance_eval { + @singleton__instance__ = nil + @singleton__mutex__ = Mutex.new + } + def klass.instance + return @singleton__instance__ if @singleton__instance__ + @singleton__mutex__.synchronize { + return @singleton__instance__ if @singleton__instance__ + @singleton__instance__ = new() + } + @singleton__instance__ + end + klass + end + + private + + # extending an object with Singleton is a bad idea + undef_method :extend_object + + def append_features(mod) + # help out people counting on transitive mixins + unless mod.instance_of?(Class) + raise TypeError, "Inclusion of the OO-Singleton module in module #{mod}" + end + super + end + + def included(klass) + super + klass.private_class_method :new, :allocate + klass.extend SingletonClassMethods + Singleton.__init__(klass) + end + end + +end + + +if __FILE__ == $0 + +def num_of_instances(klass) + "#{ObjectSpace.each_object(klass){}} #{klass} instance(s)" +end + +# The basic and most important example. + +class SomeSingletonClass + include Singleton +end +puts "There are #{num_of_instances(SomeSingletonClass)}" + +a = SomeSingletonClass.instance +b = SomeSingletonClass.instance # a and b are same object +puts "basic test is #{a == b}" + +begin + SomeSingletonClass.new +rescue NoMethodError => mes + puts mes +end + + + +puts "\nThreaded example with exception and customized #_instantiate?() hook"; p +Thread.abort_on_exception = false + +class Ups < SomeSingletonClass + def initialize + self.class.__sleep + puts "initialize called by thread ##{Thread.current[:i]}" + end +end + +class << Ups + def _instantiate? + @enter.push Thread.current[:i] + while false.equal?(@singleton__instance__) + @singleton__mutex__.unlock + sleep 0.08 + @singleton__mutex__.lock + end + @leave.push Thread.current[:i] + @singleton__instance__ + end + + def __sleep + sleep(rand(0.08)) + end + + def new + begin + __sleep + raise "boom - thread ##{Thread.current[:i]} failed to create instance" + ensure + # simple flip-flop + class << self + remove_method :new + end + end + end + + def instantiate_all + @enter = [] + @leave = [] + 1.upto(9) {|i| + Thread.new { + begin + Thread.current[:i] = i + __sleep + instance + rescue RuntimeError => mes + puts mes + end + } + } + puts "Before there were #{num_of_instances(self)}" + sleep 3 + puts "Now there is #{num_of_instances(self)}" + puts "#{@enter.join '; '} was the order of threads entering the waiting loop" + puts "#{@leave.join '; '} was the order of threads leaving the waiting loop" + end +end + + +Ups.instantiate_all +# results in message like +# Before there were 0 Ups instance(s) +# boom - thread #6 failed to create instance +# initialize called by thread #3 +# Now there is 1 Ups instance(s) +# 3; 2; 1; 8; 4; 7; 5 was the order of threads entering the waiting loop +# 3; 2; 1; 7; 4; 8; 5 was the order of threads leaving the waiting loop + + +puts "\nLets see if class level cloning really works" +Yup = Ups.clone +def Yup.new + begin + __sleep + raise "boom - thread ##{Thread.current[:i]} failed to create instance" + ensure + # simple flip-flop + class << self + remove_method :new + end + end +end +Yup.instantiate_all + + +puts "\n\n","Customized marshalling" +class A + include Singleton + attr_accessor :persist, :die + def _dump(depth) + # this strips the @die information from the instance + Marshal.dump(@persist,depth) + end +end + +def A._load(str) + instance.persist = Marshal.load(str) + instance +end + +a = A.instance +a.persist = ["persist"] +a.die = "die" +a.taint + +stored_state = Marshal.dump(a) +# change state +a.persist = nil +a.die = nil +b = Marshal.load(stored_state) +p a == b # => true +p a.persist # => ["persist"] +p a.die # => nil + + +puts "\n\nSingleton with overridden default #inherited() hook" +class Up +end +def Up.inherited(sub_klass) + puts "#{sub_klass} subclasses #{self}" +end + + +class Middle < Up + include Singleton +end + +class Down < Middle; end + +puts "and basic \"Down test\" is #{Down.instance == Down.instance}\n +Various exceptions" + +begin + module AModule + include Singleton + end +rescue TypeError => mes + puts mes #=> Inclusion of the OO-Singleton module in module AModule +end + +begin + 'aString'.extend Singleton +rescue NoMethodError => mes + puts mes #=> undefined method `extend_object' for Singleton:Module +end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/sync.rb b/lib/ruby-1.9.1-rc1/lib/sync.rb new file mode 100644 index 0000000..3853ba2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/sync.rb @@ -0,0 +1,307 @@ +# +# sync.rb - 2 phase lock with counter +# $Release Version: 1.0$ +# $Revision: 19280 $ +# by Keiju ISHITSUKA(keiju@ishitsuka.com) +# +# -- +# Sync_m, Synchronizer_m +# Usage: +# obj.extend(Sync_m) +# or +# class Foo +# include Sync_m +# : +# end +# +# Sync_m#sync_mode +# Sync_m#sync_locked?, locked? +# Sync_m#sync_shared?, shared? +# Sync_m#sync_exclusive?, sync_exclusive? +# Sync_m#sync_try_lock, try_lock +# Sync_m#sync_lock, lock +# Sync_m#sync_unlock, unlock +# +# Sync, Synchronizer: +# Usage: +# sync = Sync.new +# +# Sync#mode +# Sync#locked? +# Sync#shared? +# Sync#exclusive? +# Sync#try_lock(mode) -- mode = :EX, :SH, :UN +# Sync#lock(mode) -- mode = :EX, :SH, :UN +# Sync#unlock +# Sync#synchronize(mode) {...} +# +# + +unless defined? Thread + raise "Thread not available for this ruby interpreter" +end + +module Sync_m + RCS_ID='-$Header$-' + + # lock mode + UN = :UN + SH = :SH + EX = :EX + + # exceptions + class Err < StandardError + def Err.Fail(*opt) + fail self, sprintf(self::Message, *opt) + end + + class UnknownLocker < Err + Message = "Thread(%s) not locked." + def UnknownLocker.Fail(th) + super(th.inspect) + end + end + + class LockModeFailer < Err + Message = "Unknown lock mode(%s)" + def LockModeFailer.Fail(mode) + if mode.id2name + mode = id2name + end + super(mode) + end + end + end + + def Sync_m.define_aliases(cl) + cl.module_eval %q{ + alias locked? sync_locked? + alias shared? sync_shared? + alias exclusive? sync_exclusive? + alias lock sync_lock + alias unlock sync_unlock + alias try_lock sync_try_lock + alias synchronize sync_synchronize + } + end + + def Sync_m.append_features(cl) + super + # do nothing for Modules + # make aliases for Classes. + define_aliases(cl) unless cl.instance_of?(Module) + self + end + + def Sync_m.extend_object(obj) + super + obj.sync_extend + end + + def sync_extend + unless (defined? locked? and + defined? shared? and + defined? exclusive? and + defined? lock and + defined? unlock and + defined? try_lock and + defined? synchronize) + Sync_m.define_aliases(class< 0 + th, count = sync_upgrade_waiting.shift + sync_sh_locker[th] = count + th.wakeup + wakeup_threads.push th + else + wait = sync_waiting + self.sync_waiting = [] + for th in wait + th.wakeup + wakeup_threads.push th + end + end + end + end + for th in wakeup_threads + th.run + end + self + end + + def sync_synchronize(mode = EX) + sync_lock(mode) + begin + yield + ensure + sync_unlock + end + end + + attr_accessor :sync_mode + + attr_accessor :sync_waiting + attr_accessor :sync_upgrade_waiting + attr_accessor :sync_sh_locker + attr_accessor :sync_ex_locker + attr_accessor :sync_ex_count + + def sync_inspect + sync_iv = instance_variables.select{|iv| /^@sync_/ =~ iv.id2name}.collect{|iv| iv.id2name + '=' + instance_eval(iv.id2name).inspect}.join(",") + print "<#{self.class}.extend Sync_m: #{inspect}, " + end + + private + + def sync_initialize + @sync_mode = UN + @sync_waiting = [] + @sync_upgrade_waiting = [] + @sync_sh_locker = Hash.new + @sync_ex_locker = nil + @sync_ex_count = 0 + + @sync_mutex = Mutex.new + end + + def initialize(*args) + super + sync_initialize + end + + def sync_try_lock_sub(m) + case m + when SH + case sync_mode + when UN + self.sync_mode = m + sync_sh_locker[Thread.current] = 1 + ret = true + when SH + count = 0 unless count = sync_sh_locker[Thread.current] + sync_sh_locker[Thread.current] = count + 1 + ret = true + when EX + # in EX mode, lock will upgrade to EX lock + if sync_ex_locker == Thread.current + self.sync_ex_count = sync_ex_count + 1 + ret = true + else + ret = false + end + end + when EX + if sync_mode == UN or + sync_mode == SH && sync_sh_locker.size == 1 && sync_sh_locker.include?(Thread.current) + self.sync_mode = m + self.sync_ex_locker = Thread.current + self.sync_ex_count = 1 + ret = true + elsif sync_mode == EX && sync_ex_locker == Thread.current + self.sync_ex_count = sync_ex_count + 1 + ret = true + else + ret = false + end + else + Err::LockModeFailer.Fail mode + end + return ret + end +end +Synchronizer_m = Sync_m + +class Sync + include Sync_m +end +Synchronizer = Sync diff --git a/lib/ruby-1.9.1-rc1/lib/tempfile.rb b/lib/ruby-1.9.1-rc1/lib/tempfile.rb new file mode 100644 index 0000000..e356a07 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/tempfile.rb @@ -0,0 +1,215 @@ +# +# tempfile - manipulates temporary files +# +# $Id: tempfile.rb 19833 2008-10-18 10:32:26Z matz $ +# + +require 'delegate' +require 'tmpdir' +require 'thread' + +# A class for managing temporary files. This library is written to be +# thread safe. +class Tempfile < DelegateClass(File) + MAX_TRY = 10 + @@cleanlist = [] + @@lock = Mutex.new + + # Creates a temporary file of mode 0600 in the temporary directory, + # opens it with mode "w+", and returns a Tempfile object which + # represents the created temporary file. A Tempfile object can be + # treated just like a normal File object. + # + # The basename parameter is used to determine the name of a + # temporary file. If an Array is given, the first element is used + # as prefix string and the second as suffix string, respectively. + # Otherwise it is treated as prefix string. + # + # If tmpdir is omitted, the temporary directory is determined by + # Dir::tmpdir provided by 'tmpdir.rb'. + # When $SAFE > 0 and the given tmpdir is tainted, it uses + # /tmp. (Note that ENV values are tainted by default) + def initialize(basename, *rest) + # I wish keyword argument settled soon. + if opts = Hash.try_convert(rest[-1]) + rest.pop + end + tmpdir = rest[0] || Dir::tmpdir + if $SAFE > 0 and tmpdir.tainted? + tmpdir = '/tmp' + end + + lock = tmpname = nil + n = failure = 0 + @@lock.synchronize { + begin + begin + tmpname = File.join(tmpdir, make_tmpname(basename, n)) + lock = tmpname + '.lock' + n += 1 + end while @@cleanlist.include?(tmpname) or + File.exist?(lock) or File.exist?(tmpname) + Dir.mkdir(lock) + rescue + failure += 1 + retry if failure < MAX_TRY + raise "cannot generate tempfile `%s'" % tmpname + end + } + + @data = [tmpname] + @clean_proc = Tempfile.callback(@data) + ObjectSpace.define_finalizer(self, @clean_proc) + + if opts.nil? + opts = [] + else + opts = [opts] + end + @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL, 0600, *opts) + @tmpname = tmpname + @@cleanlist << @tmpname + @data[1] = @tmpfile + @data[2] = @@cleanlist + + super(@tmpfile) + + # Now we have all the File/IO methods defined, you must not + # carelessly put bare puts(), etc. after this. + + Dir.rmdir(lock) + end + + def make_tmpname(basename, n) + case basename + when Array + prefix, suffix = *basename + else + prefix, suffix = basename, '' + end + + t = Time.now.strftime("%Y%m%d") + path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}-#{n}#{suffix}" + end + private :make_tmpname + + # Opens or reopens the file with mode "r+". + def open + @tmpfile.close if @tmpfile + @tmpfile = File.open(@tmpname, 'r+') + @data[1] = @tmpfile + __setobj__(@tmpfile) + end + + def _close # :nodoc: + @tmpfile.close if @tmpfile + @tmpfile = nil + @data[1] = nil if @data + end + protected :_close + + #Closes the file. If the optional flag is true, unlinks the file + # after closing. + # + # If you don't explicitly unlink the temporary file, the removal + # will be delayed until the object is finalized. + def close(unlink_now=false) + if unlink_now + close! + else + _close + end + end + + # Closes and unlinks the file. + def close! + _close + @clean_proc.call + ObjectSpace.undefine_finalizer(self) + @data = @tmpname = nil + end + + # Unlinks the file. On UNIX-like systems, it is often a good idea + # to unlink a temporary file immediately after creating and opening + # it, because it leaves other programs zero chance to access the + # file. + def unlink + # keep this order for thread safeness + begin + File.unlink(@tmpname) if File.exist?(@tmpname) + @@cleanlist.delete(@tmpname) + @data = @tmpname = nil + ObjectSpace.undefine_finalizer(self) + rescue Errno::EACCES + # may not be able to unlink on Windows; just ignore + end + end + alias delete unlink + + # Returns the full path name of the temporary file. + def path + @tmpname + end + + # Returns the size of the temporary file. As a side effect, the IO + # buffer is flushed before determining the size. + def size + if @tmpfile + @tmpfile.flush + @tmpfile.stat.size + else + 0 + end + end + alias length size + + class << self + def callback(data) # :nodoc: + pid = $$ + Proc.new { + if pid == $$ + path, tmpfile, cleanlist = *data + + print "removing ", path, "..." if $DEBUG + + tmpfile.close if tmpfile + + # keep this order for thread safeness + File.unlink(path) if File.exist?(path) + cleanlist.delete(path) if cleanlist + + print "done\n" if $DEBUG + end + } + end + + # If no block is given, this is a synonym for new(). + # + # If a block is given, it will be passed tempfile as an argument, + # and the tempfile will automatically be closed when the block + # terminates. In this case, open() returns nil. + def open(*args) + tempfile = new(*args) + + if block_given? + begin + yield(tempfile) + ensure + tempfile.close + end + else + tempfile + end + end + end +end + +if __FILE__ == $0 +# $DEBUG = true + f = Tempfile.new("foo") + f.print("foo\n") + f.close + f.open + p f.gets # => "foo\n" + f.close! +end diff --git a/lib/ruby-1.9.1-rc1/lib/test/unit.rb b/lib/ruby-1.9.1-rc1/lib/test/unit.rb new file mode 100644 index 0000000..ec248c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/test/unit.rb @@ -0,0 +1,66 @@ +# test/unit compatibility layer using minitest. + +require 'minitest/unit' +require 'test/unit/assertions' +require 'test/unit/testcase' + +module Test + module Unit + TEST_UNIT_IMPLEMENTATION = 'test/unit compatibility layer using minitest' + + def self.setup_argv(original_argv=ARGV) + minitest_argv = [] + files = [] + reject = [] + original_argv = original_argv.dup + while arg = original_argv.shift + case arg + when '-v' + minitest_argv << '-v' + when '-n', '--name' + minitest_argv << arg + minitest_argv << original_argv.shift + when '-x' + reject << original_argv.shift + else + files << arg + end + end + + if block_given? + files = yield files + end + + files.map! {|f| + f = f.gsub(Regexp.compile(Regexp.quote(File::ALT_SEPARATOR)), File::SEPARATOR) if File::ALT_SEPARATOR + if File.directory? f + Dir["#{f}/**/test_*.rb"] + elsif File.file? f + f + else + raise ArgumentError, "file not found: #{f}" + end + } + files.flatten! + + reject_pat = Regexp.union(reject.map {|r| /#{r}/ }) + files.reject! {|f| reject_pat =~ f } + + files.each {|f| + d = File.dirname(File.expand_path(f)) + unless $:.include? d + $: << d + end + begin + require f + rescue LoadError + puts "#{f}: #{$!}" + end + } + + ARGV.replace minitest_argv + end + end +end + +MiniTest::Unit.autorun diff --git a/lib/ruby-1.9.1-rc1/lib/test/unit/assertions.rb b/lib/ruby-1.9.1-rc1/lib/test/unit/assertions.rb new file mode 100644 index 0000000..0a31915 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/test/unit/assertions.rb @@ -0,0 +1,115 @@ +require 'minitest/unit' +require 'pp' + +module Test + module Unit + module Assertions + include MiniTest::Assertions + + def mu_pp(obj) + obj.pretty_inspect.chomp + end + + def assert_raise(*args, &b) + assert_raises(*args, &b) + end + + def assert_nothing_raised(*args) + self._assertions += 1 + if Module === args.last + msg = nil + else + msg = args.pop + end + begin + yield + rescue Exception => e + if ((args.empty? && !e.instance_of?(MiniTest::Assertion)) || + args.any? {|a| a.instance_of?(Module) ? e.is_a?(a) : e.class == a }) + msg = message(msg) { "Exception raised:\n<#{mu_pp(e)}>" } + raise MiniTest::Assertion, msg.call, e.backtrace + else + raise + end + end + nil + end + + def assert_nothing_thrown(msg=nil) + begin + yield + rescue ArgumentError => error + raise error if /\Auncaught throw (.+)\z/m !~ error.message + msg = message(msg) { "<#{$1}> was thrown when nothing was expected" } + flunk(msg) + end + assert(true, "Expected nothing to be thrown") + end + + def assert_equal(exp, act, msg = nil) + msg = message(msg) { + exp_str = mu_pp(exp) + act_str = mu_pp(act) + exp_comment = '' + act_comment = '' + if exp_str == act_str + if (exp.is_a?(String) && act.is_a?(String)) || + (exp.is_a?(Regexp) && act.is_a?(Regexp)) + exp_comment = " (#{exp.encoding})" + act_comment = " (#{act.encoding})" + elsif exp.is_a?(Float) && act.is_a?(Float) + exp_str = "%\#.#{Float::DIG+2}g" % exp + act_str = "%\#.#{Float::DIG+2}g" % act + elsif exp.is_a?(Time) && act.is_a?(Time) + exp_comment = " (nsec=#{exp.nsec})" + act_comment = " (nsec=#{act.nsec})" + end + elsif !Encoding.compatible?(exp_str, act_str) + if exp.is_a?(String) && act.is_a?(String) + exp_str = exp.dump + act_str = act.dump + exp_comment = " (#{exp.encoding})" + act_comment = " (#{act.encoding})" + else + exp_str = exp_str.dump + act_str = act_str.dump + end + end + "<#{exp_str}>#{exp_comment} expected but was\n<#{act_str}>#{act_comment}" + } + assert(exp == act, msg) + end + + def assert_not_nil(exp, msg=nil) + msg = message(msg) { "<#{mu_pp(exp)}> expected to not be nil" } + assert(!exp.nil?, msg) + end + + def assert_not_equal(exp, act, msg=nil) + msg = message(msg) { "<#{mu_pp(exp)}> expected to be != to\n<#{mu_pp(act)}>" } + assert(exp != act, msg) + end + + def assert_no_match(regexp, string, msg=nil) + assert_instance_of(Regexp, regexp, "The first argument to assert_no_match should be a Regexp.") + msg = message(msg) { "<#{mu_pp(regexp)}> expected to not match\n<#{mu_pp(string)}>" } + assert(regexp !~ string, msg) + end + + def assert_not_same(expected, actual, message="") + msg = message(msg) { build_message(message, < +with id expected to not be equal\\? to + +with id . +EOT + assert(!actual.equal?(expected), msg) + end + + def build_message(head, template=nil, *arguments) + template &&= template.chomp + template.gsub(/\?/) { mu_pp(arguments.shift) } + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/test/unit/testcase.rb b/lib/ruby-1.9.1-rc1/lib/test/unit/testcase.rb new file mode 100644 index 0000000..89aa0f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/test/unit/testcase.rb @@ -0,0 +1,12 @@ +require 'test/unit/assertions' + +module Test + module Unit + class TestCase < MiniTest::Unit::TestCase + include Assertions + def self.test_order + :sorted + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/thread.rb b/lib/ruby-1.9.1-rc1/lib/thread.rb new file mode 100644 index 0000000..68eeaf5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/thread.rb @@ -0,0 +1,367 @@ +# +# thread.rb - thread support classes +# by Yukihiro Matsumoto +# +# Copyright (C) 2001 Yukihiro Matsumoto +# Copyright (C) 2000 Network Applied Communication Laboratory, Inc. +# Copyright (C) 2000 Information-technology Promotion Agency, Japan +# + +unless defined? Thread + raise "Thread not available for this ruby interpreter" +end + +unless defined? ThreadError + class ThreadError < StandardError + end +end + +if $DEBUG + Thread.abort_on_exception = true +end + +# +# ConditionVariable objects augment class Mutex. Using condition variables, +# it is possible to suspend while in the middle of a critical section until a +# resource becomes available. +# +# Example: +# +# require 'thread' +# +# mutex = Mutex.new +# resource = ConditionVariable.new +# +# a = Thread.new { +# mutex.synchronize { +# # Thread 'a' now needs the resource +# resource.wait(mutex) +# # 'a' can now have the resource +# } +# } +# +# b = Thread.new { +# mutex.synchronize { +# # Thread 'b' has finished using the resource +# resource.signal +# } +# } +# +class ConditionVariable + # + # Creates a new ConditionVariable + # + def initialize + @waiters = [] + @waiters_mutex = Mutex.new + end + + # + # Releases the lock held in +mutex+ and waits; reacquires the lock on wakeup. + # + def wait(mutex) + begin + # TODO: mutex should not be used + @waiters_mutex.synchronize do + @waiters.push(Thread.current) + end + mutex.sleep + end + end + + # + # Wakes up the first thread in line waiting for this lock. + # + def signal + begin + t = @waiters_mutex.synchronize { @waiters.shift } + t.run if t + rescue ThreadError + retry + end + end + + # + # Wakes up all threads waiting for this lock. + # + def broadcast + # TODO: imcomplete + waiters0 = nil + @waiters_mutex.synchronize do + waiters0 = @waiters.dup + @waiters.clear + end + for t in waiters0 + begin + t.run + rescue ThreadError + end + end + end +end + +# +# This class provides a way to synchronize communication between threads. +# +# Example: +# +# require 'thread' +# +# queue = Queue.new +# +# producer = Thread.new do +# 5.times do |i| +# sleep rand(i) # simulate expense +# queue << i +# puts "#{i} produced" +# end +# end +# +# consumer = Thread.new do +# 5.times do |i| +# value = queue.pop +# sleep rand(i/2) # simulate expense +# puts "consumed #{value}" +# end +# end +# +# consumer.join +# +class Queue + # + # Creates a new queue. + # + def initialize + @que = [] + @waiting = [] + @que.taint # enable tainted comunication + @waiting.taint + self.taint + @mutex = Mutex.new + end + + # + # Pushes +obj+ to the queue. + # + def push(obj) + t = nil + @mutex.synchronize{ + @que.push obj + begin + t = @waiting.shift + t.wakeup if t + rescue ThreadError + retry + end + } + begin + t.run if t + rescue ThreadError + end + end + + # + # Alias of push + # + alias << push + + # + # Alias of push + # + alias enq push + + # + # Retrieves data from the queue. If the queue is empty, the calling thread is + # suspended until data is pushed onto the queue. If +non_block+ is true, the + # thread isn't suspended, and an exception is raised. + # + def pop(non_block=false) + while true + @mutex.synchronize{ + if @que.empty? + raise ThreadError, "queue empty" if non_block + @waiting.push Thread.current + @mutex.sleep + else + return @que.shift + end + } + end + end + + # + # Alias of pop + # + alias shift pop + + # + # Alias of pop + # + alias deq pop + + # + # Returns +true+ if the queue is empty. + # + def empty? + @que.empty? + end + + # + # Removes all objects from the queue. + # + def clear + @que.clear + end + + # + # Returns the length of the queue. + # + def length + @que.length + end + + # + # Alias of length. + # + alias size length + + # + # Returns the number of threads waiting on the queue. + # + def num_waiting + @waiting.size + end +end + +# +# This class represents queues of specified size capacity. The push operation +# may be blocked if the capacity is full. +# +# See Queue for an example of how a SizedQueue works. +# +class SizedQueue < Queue + # + # Creates a fixed-length queue with a maximum size of +max+. + # + def initialize(max) + raise ArgumentError, "queue size must be positive" unless max > 0 + @max = max + @queue_wait = [] + @queue_wait.taint # enable tainted comunication + super() + end + + # + # Returns the maximum size of the queue. + # + def max + @max + end + + # + # Sets the maximum size of the queue. + # + def max=(max) + diff = nil + @mutex.synchronize { + if max <= @max + @max = max + else + diff = max - @max + @max = max + end + } + if diff + diff.times do + begin + t = @queue_wait.shift + t.run if t + rescue ThreadError + retry + end + end + end + max + end + + # + # Pushes +obj+ to the queue. If there is no space left in the queue, waits + # until space becomes available. + # + def push(obj) + t = nil + @mutex.synchronize{ + while true + break if @que.length <= @max + @queue_wait.push Thread.current + @mutex.sleep + end + + @que.push obj + begin + t = @waiting.shift + t.wakeup if t + rescue ThreadError + retry + end + } + + begin + t.run if t + rescue ThreadError + end + end + + # + # Alias of push + # + alias << push + + # + # Alias of push + # + alias enq push + + # + # Retrieves data from the queue and runs a waiting thread, if any. + # + def pop(*args) + retval = super + t = nil + @mutex.synchronize { + if @que.length < @max + begin + t = @queue_wait.shift + t.wakeup if t + rescue ThreadError + retry + end + end + } + begin + t.run if t + rescue ThreadError + end + retval + end + + # + # Alias of pop + # + alias shift pop + + # + # Alias of pop + # + alias deq pop + + # + # Returns the number of threads waiting on the queue. + # + def num_waiting + @waiting.size + @queue_wait.size + end +end + +# Documentation comments: +# - How do you make RDoc inherit documentation from superclass? diff --git a/lib/ruby-1.9.1-rc1/lib/thwait.rb b/lib/ruby-1.9.1-rc1/lib/thwait.rb new file mode 100644 index 0000000..029b259 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/thwait.rb @@ -0,0 +1,168 @@ +# +# thwait.rb - thread synchronization class +# $Release Version: 0.9 $ +# $Revision: 1.3 $ +# by Keiju ISHITSUKA(Nihpon Rational Software Co.,Ltd.) +# +# -- +# feature: +# provides synchronization for multiple threads. +# +# class methods: +# * ThreadsWait.all_waits(thread1,...) +# waits until all of specified threads are terminated. +# if a block is supplied for the method, evaluates it for +# each thread termination. +# * th = ThreadsWait.new(thread1,...) +# creates synchronization object, specifying thread(s) to wait. +# +# methods: +# * th.threads +# list threads to be synchronized +# * th.empty? +# is there any thread to be synchronized. +# * th.finished? +# is there already terminated thread. +# * th.join(thread1,...) +# wait for specified thread(s). +# * th.join_nowait(threa1,...) +# specifies thread(s) to wait. non-blocking. +# * th.next_wait +# waits until any of specified threads is terminated. +# * th.all_waits +# waits until all of specified threads are terminated. +# if a block is supplied for the method, evaluates it for +# each thread termination. +# + +require "thread.rb" +require "e2mmap.rb" + +# +# This class watches for termination of multiple threads. Basic functionality +# (wait until specified threads have terminated) can be accessed through the +# class method ThreadsWait::all_waits. Finer control can be gained using +# instance methods. +# +# Example: +# +# ThreadsWait.all_wait(thr1, thr2, ...) do |t| +# STDERR.puts "Thread #{t} has terminated." +# end +# +class ThreadsWait + RCS_ID='-$Id: thwait.rb,v 1.3 1998/06/26 03:19:34 keiju Exp keiju $-' + + extend Exception2MessageMapper + def_exception("ErrNoWaitingThread", "No threads for waiting.") + def_exception("ErrNoFinishedThread", "No finished threads.") + + # + # Waits until all specified threads have terminated. If a block is provided, + # it is executed for each thread termination. + # + def ThreadsWait.all_waits(*threads) # :yield: thread + tw = ThreadsWait.new(*threads) + if block_given? + tw.all_waits do |th| + yield th + end + else + tw.all_waits + end + end + + # + # Creates a ThreadsWait object, specifying the threads to wait on. + # Non-blocking. + # + def initialize(*threads) + @threads = [] + @wait_queue = Queue.new + join_nowait(*threads) unless threads.empty? + end + + # Returns the array of threads in the wait queue. + attr :threads + + # + # Returns +true+ if there are no threads to be synchronized. + # + def empty? + @threads.empty? + end + + # + # Returns +true+ if any thread has terminated. + # + def finished? + !@wait_queue.empty? + end + + # + # Waits for specified threads to terminate. + # + def join(*threads) + join_nowait(*threads) + next_wait + end + + # + # Specifies the threads that this object will wait for, but does not actually + # wait. + # + def join_nowait(*threads) + threads.flatten! + @threads.concat threads + for th in threads + Thread.start(th) do |t| + begin + t.join + ensure + @wait_queue.push t + end + end + end + end + + # + # Waits until any of the specified threads has terminated, and returns the one + # that does. + # + # If there is no thread to wait, raises +ErrNoWaitingThread+. If +nonblock+ + # is true, and there is no terminated thread, raises +ErrNoFinishedThread+. + # + def next_wait(nonblock = nil) + ThreadsWait.fail ErrNoWaitingThread if @threads.empty? + begin + @threads.delete(th = @wait_queue.pop(nonblock)) + th + rescue ThreadError + ThreadsWait.fail ErrNoFinishedThread + end + end + + # + # Waits until all of the specified threads are terminated. If a block is + # supplied for the method, it is executed for each thread termination. + # + # Raises exceptions in the same manner as +next_wait+. + # + def all_waits + until @threads.empty? + th = next_wait + yield th if block_given? + end + end +end + +ThWait = ThreadsWait + + +# Documentation comments: +# - Source of documentation is evenly split between Nutshell, existing +# comments, and my own rephrasing. +# - I'm not particularly confident that the comments are all exactly correct. +# - The history, etc., up the top appears in the RDoc output. Perhaps it would +# be better to direct that not to appear, and put something else there +# instead. diff --git a/lib/ruby-1.9.1-rc1/lib/time.rb b/lib/ruby-1.9.1-rc1/lib/time.rb new file mode 100644 index 0000000..3555571 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/time.rb @@ -0,0 +1,869 @@ + +# +# == Introduction +# +# This library extends the Time class: +# * conversion between date string and time object. +# * date-time defined by RFC 2822 +# * HTTP-date defined by RFC 2616 +# * dateTime defined by XML Schema Part 2: Datatypes (ISO 8601) +# * various formats handled by Date._parse (string to time only) +# +# == Design Issues +# +# === Specialized interface +# +# This library provides methods dedicated to special purposes: +# * RFC 2822, RFC 2616 and XML Schema. +# * They makes usual life easier. +# +# === Doesn't depend on strftime +# +# This library doesn't use +strftime+. Especially #rfc2822 doesn't depend +# on +strftime+ because: +# +# * %a and %b are locale sensitive +# +# Since they are locale sensitive, they may be replaced to +# invalid weekday/month name in some locales. +# Since ruby-1.6 doesn't invoke setlocale by default, +# the problem doesn't arise until some external library invokes setlocale. +# Ruby/GTK is the example of such library. +# +# * %z is not portable +# +# %z is required to generate zone in date-time of RFC 2822 +# but it is not portable. +# +# == Revision Information +# +# $Id$ +# + +require 'date/format' + +# +# Implements the extensions to the Time class that are described in the +# documentation for the time.rb library. +# +class Time + class << Time + + ZoneOffset = { + 'UTC' => 0, + # ISO 8601 + 'Z' => 0, + # RFC 822 + 'UT' => 0, 'GMT' => 0, + 'EST' => -5, 'EDT' => -4, + 'CST' => -6, 'CDT' => -5, + 'MST' => -7, 'MDT' => -6, + 'PST' => -8, 'PDT' => -7, + # Following definition of military zones is original one. + # See RFC 1123 and RFC 2822 for the error in RFC 822. + 'A' => +1, 'B' => +2, 'C' => +3, 'D' => +4, 'E' => +5, 'F' => +6, + 'G' => +7, 'H' => +8, 'I' => +9, 'K' => +10, 'L' => +11, 'M' => +12, + 'N' => -1, 'O' => -2, 'P' => -3, 'Q' => -4, 'R' => -5, 'S' => -6, + 'T' => -7, 'U' => -8, 'V' => -9, 'W' => -10, 'X' => -11, 'Y' => -12, + } + def zone_offset(zone, year=self.now.year) + off = nil + zone = zone.upcase + if /\A([+-])(\d\d):?(\d\d)\z/ =~ zone + off = ($1 == '-' ? -1 : 1) * ($2.to_i * 60 + $3.to_i) * 60 + elsif /\A[+-]\d\d\z/ =~ zone + off = zone.to_i * 3600 + elsif ZoneOffset.include?(zone) + off = ZoneOffset[zone] * 3600 + elsif ((t = self.local(year, 1, 1)).zone.upcase == zone rescue false) + off = t.utc_offset + elsif ((t = self.local(year, 7, 1)).zone.upcase == zone rescue false) + off = t.utc_offset + end + off + end + + def zone_utc?(zone) + # * +0000 + # In RFC 2822, +0000 indicate a time zone at Universal Time. + # Europe/London is "a time zone at Universal Time" in Winter. + # Europe/Lisbon is "a time zone at Universal Time" in Winter. + # Atlantic/Reykjavik is "a time zone at Universal Time". + # Africa/Dakar is "a time zone at Universal Time". + # So +0000 is a local time such as Europe/London, etc. + # * GMT + # GMT is used as a time zone abbreviation in Europe/London, + # Africa/Dakar, etc. + # So it is a local time. + # + # * -0000, -00:00 + # In RFC 2822, -0000 the date-time contains no information about the + # local time zone. + # In RFC 3339, -00:00 is used for the time in UTC is known, + # but the offset to local time is unknown. + # They are not appropriate for specific time zone such as + # Europe/London because time zone neutral, + # So -00:00 and -0000 are treated as UTC. + if /\A(?:-00:00|-0000|-00|UTC|Z|UT)\z/i =~ zone + true + else + false + end + end + private :zone_utc? + + LeapYearMonthDays = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + CommonYearMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + def month_days(y, m) + if ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0) + LeapYearMonthDays[m-1] + else + CommonYearMonthDays[m-1] + end + end + private :month_days + + def apply_offset(year, mon, day, hour, min, sec, off) + if off < 0 + off = -off + off, o = off.divmod(60) + if o != 0 then sec += o; o, sec = sec.divmod(60); off += o end + off, o = off.divmod(60) + if o != 0 then min += o; o, min = min.divmod(60); off += o end + off, o = off.divmod(24) + if o != 0 then hour += o; o, hour = hour.divmod(24); off += o end + if off != 0 + day += off + if month_days(year, mon) < day + mon += 1 + if 12 < mon + mon = 1 + year += 1 + end + day = 1 + end + end + elsif 0 < off + off, o = off.divmod(60) + if o != 0 then sec -= o; o, sec = sec.divmod(60); off -= o end + off, o = off.divmod(60) + if o != 0 then min -= o; o, min = min.divmod(60); off -= o end + off, o = off.divmod(24) + if o != 0 then hour -= o; o, hour = hour.divmod(24); off -= o end + if off != 0 then + day -= off + if day < 1 + mon -= 1 + if mon < 1 + year -= 1 + mon = 12 + end + day = month_days(year, mon) + end + end + end + return year, mon, day, hour, min, sec + end + private :apply_offset + + def make_time(year, mon, day, hour, min, sec, sec_fraction, zone, now) + usec = nil + usec = sec_fraction * 1000000 if sec_fraction + if now + begin + break if year; year = now.year + break if mon; mon = now.mon + break if day; day = now.day + break if hour; hour = now.hour + break if min; min = now.min + break if sec; sec = now.sec + break if sec_fraction; usec = now.tv_usec + end until true + end + + year ||= 1970 + mon ||= 1 + day ||= 1 + hour ||= 0 + min ||= 0 + sec ||= 0 + usec ||= 0 + + off = nil + off = zone_offset(zone, year) if zone + + if off + year, mon, day, hour, min, sec = + apply_offset(year, mon, day, hour, min, sec, off) + t = self.utc(year, mon, day, hour, min, sec, usec) + t.localtime if !zone_utc?(zone) + t + else + self.local(year, mon, day, hour, min, sec, usec) + end + end + private :make_time + + # + # Parses +date+ using Date._parse and converts it to a Time object. + # + # If a block is given, the year described in +date+ is converted by the + # block. For example: + # + # Time.parse(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y} + # + # If the upper components of the given time are broken or missing, they are + # supplied with those of +now+. For the lower components, the minimum + # values (1 or 0) are assumed if broken or missing. For example: + # + # # Suppose it is "Thu Nov 29 14:33:20 GMT 2001" now and + # # your timezone is GMT: + # Time.parse("16:30") #=> Thu Nov 29 16:30:00 GMT 2001 + # Time.parse("7/23") #=> Mon Jul 23 00:00:00 GMT 2001 + # Time.parse("Aug 31") #=> Fri Aug 31 00:00:00 GMT 2001 + # + # Since there are numerous conflicts among locally defined timezone + # abbreviations all over the world, this method is not made to + # understand all of them. For example, the abbreviation "CST" is + # used variously as: + # + # -06:00 in America/Chicago, + # -05:00 in America/Havana, + # +08:00 in Asia/Harbin, + # +09:30 in Australia/Darwin, + # +10:30 in Australia/Adelaide, + # etc. + # + # Based on the fact, this method only understands the timezone + # abbreviations described in RFC 822 and the system timezone, in the + # order named. (i.e. a definition in RFC 822 overrides the system + # timezone definition.) The system timezone is taken from + # Time.local(year, 1, 1).zone and + # Time.local(year, 7, 1).zone. + # If the extracted timezone abbreviation does not match any of them, + # it is ignored and the given time is regarded as a local time. + # + # ArgumentError is raised if Date._parse cannot extract information from + # +date+ or Time class cannot represent specified date. + # + # This method can be used as fail-safe for other parsing methods as: + # + # Time.rfc2822(date) rescue Time.parse(date) + # Time.httpdate(date) rescue Time.parse(date) + # Time.xmlschema(date) rescue Time.parse(date) + # + # A failure for Time.parse should be checked, though. + # + def parse(date, now=self.now) + d = Date._parse(date, false) + year = d[:year] + year = yield(year) if year && block_given? + make_time(year, d[:mon], d[:mday], d[:hour], d[:min], d[:sec], d[:sec_fraction], d[:zone], now) + end + + # + # Parses +date+ using Date._strptime and converts it to a Time object. + # + # If a block is given, the year described in +date+ is converted by the + # block. For example: + # + # Time.strptime(...) {|y| y < 100 ? (y >= 69 ? y + 1900 : y + 2000) : y} + def strptime(date, format, now=self.now) + d = Date._strptime(date, format) + raise ArgumentError, "invalid strptime format - `#{format}'" unless d + year = d[:year] + year = yield(year) if year && block_given? + make_time(year, d[:mon], d[:mday], d[:hour], d[:min], d[:sec], d[:sec_fraction], d[:zone], now) + end + + MonthValue = { + 'JAN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAY' => 5, 'JUN' => 6, + 'JUL' => 7, 'AUG' => 8, 'SEP' => 9, 'OCT' =>10, 'NOV' =>11, 'DEC' =>12 + } + + # + # Parses +date+ as date-time defined by RFC 2822 and converts it to a Time + # object. The format is identical to the date format defined by RFC 822 and + # updated by RFC 1123. + # + # ArgumentError is raised if +date+ is not compliant with RFC 2822 + # or Time class cannot represent specified date. + # + # See #rfc2822 for more information on this format. + # + def rfc2822(date) + if /\A\s* + (?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*,\s*)? + (\d{1,2})\s+ + (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+ + (\d{2,})\s+ + (\d{2})\s* + :\s*(\d{2})\s* + (?::\s*(\d{2}))?\s+ + ([+-]\d{4}| + UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date + # Since RFC 2822 permit comments, the regexp has no right anchor. + day = $1.to_i + mon = MonthValue[$2.upcase] + year = $3.to_i + hour = $4.to_i + min = $5.to_i + sec = $6 ? $6.to_i : 0 + zone = $7 + + # following year completion is compliant with RFC 2822. + year = if year < 50 + 2000 + year + elsif year < 1000 + 1900 + year + else + year + end + + year, mon, day, hour, min, sec = + apply_offset(year, mon, day, hour, min, sec, zone_offset(zone)) + t = self.utc(year, mon, day, hour, min, sec) + t.localtime if !zone_utc?(zone) + t + else + raise ArgumentError.new("not RFC 2822 compliant date: #{date.inspect}") + end + end + alias rfc822 rfc2822 + + # + # Parses +date+ as HTTP-date defined by RFC 2616 and converts it to a Time + # object. + # + # ArgumentError is raised if +date+ is not compliant with RFC 2616 or Time + # class cannot represent specified date. + # + # See #httpdate for more information on this format. + # + def httpdate(date) + if /\A\s* + (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\x20 + (\d{2})\x20 + (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\x20 + (\d{4})\x20 + (\d{2}):(\d{2}):(\d{2})\x20 + GMT + \s*\z/ix =~ date + self.rfc2822(date) + elsif /\A\s* + (?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday),\x20 + (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d)\x20 + (\d\d):(\d\d):(\d\d)\x20 + GMT + \s*\z/ix =~ date + year = $3.to_i + if year < 50 + year += 2000 + else + year += 1900 + end + self.utc(year, $2, $1.to_i, $4.to_i, $5.to_i, $6.to_i) + elsif /\A\s* + (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\x20 + (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\x20 + (\d\d|\x20\d)\x20 + (\d\d):(\d\d):(\d\d)\x20 + (\d{4}) + \s*\z/ix =~ date + self.utc($6.to_i, MonthValue[$1.upcase], $2.to_i, + $3.to_i, $4.to_i, $5.to_i) + else + raise ArgumentError.new("not RFC 2616 compliant date: #{date.inspect}") + end + end + + # + # Parses +date+ as dateTime defined by XML Schema and converts it to a Time + # object. The format is restricted version of the format defined by ISO + # 8601. + # + # ArgumentError is raised if +date+ is not compliant with the format or Time + # class cannot represent specified date. + # + # See #xmlschema for more information on this format. + # + def xmlschema(date) + if /\A\s* + (-?\d+)-(\d\d)-(\d\d) + T + (\d\d):(\d\d):(\d\d) + (\.\d+)? + (Z|[+-]\d\d:\d\d)? + \s*\z/ix =~ date + year = $1.to_i + mon = $2.to_i + day = $3.to_i + hour = $4.to_i + min = $5.to_i + sec = $6.to_i + usec = 0 + if $7 + usec = Rational($7) * 1000000 + end + if $8 + zone = $8 + year, mon, day, hour, min, sec = + apply_offset(year, mon, day, hour, min, sec, zone_offset(zone)) + self.utc(year, mon, day, hour, min, sec, usec) + else + self.local(year, mon, day, hour, min, sec, usec) + end + else + raise ArgumentError.new("invalid date: #{date.inspect}") + end + end + alias iso8601 xmlschema + end # class << self + + # + # Returns a string which represents the time as date-time defined by RFC 2822: + # + # day-of-week, DD month-name CCYY hh:mm:ss zone + # + # where zone is [+-]hhmm. + # + # If +self+ is a UTC time, -0000 is used as zone. + # + def rfc2822 + sprintf('%s, %02d %s %d %02d:%02d:%02d ', + RFC2822_DAY_NAME[wday], + day, RFC2822_MONTH_NAME[mon-1], year, + hour, min, sec) + + if utc? + '-0000' + else + off = utc_offset + sign = off < 0 ? '-' : '+' + sprintf('%s%02d%02d', sign, *(off.abs / 60).divmod(60)) + end + end + alias rfc822 rfc2822 + + RFC2822_DAY_NAME = [ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' + ] + RFC2822_MONTH_NAME = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ] + + # + # Returns a string which represents the time as rfc1123-date of HTTP-date + # defined by RFC 2616: + # + # day-of-week, DD month-name CCYY hh:mm:ss GMT + # + # Note that the result is always UTC (GMT). + # + def httpdate + t = dup.utc + sprintf('%s, %02d %s %d %02d:%02d:%02d GMT', + RFC2822_DAY_NAME[t.wday], + t.day, RFC2822_MONTH_NAME[t.mon-1], t.year, + t.hour, t.min, t.sec) + end + + # + # Returns a string which represents the time as dateTime defined by XML + # Schema: + # + # CCYY-MM-DDThh:mm:ssTZD + # CCYY-MM-DDThh:mm:ss.sssTZD + # + # where TZD is Z or [+-]hh:mm. + # + # If self is a UTC time, Z is used as TZD. [+-]hh:mm is used otherwise. + # + # +fractional_seconds+ specifies a number of digits of fractional seconds. + # Its default value is 0. + # + def xmlschema(fraction_digits=0) + sprintf('%d-%02d-%02dT%02d:%02d:%02d', + year, mon, day, hour, min, sec) + + if fraction_digits == 0 + '' + elsif fraction_digits <= 9 + '.' + sprintf('%09d', nsec)[0, fraction_digits] + else + '.' + sprintf('%09d', nsec) + '0' * (fraction_digits - 9) + end + + if utc? + 'Z' + else + off = utc_offset + sign = off < 0 ? '-' : '+' + sprintf('%s%02d:%02d', sign, *(off.abs / 60).divmod(60)) + end + end + alias iso8601 xmlschema +end + +if __FILE__ == $0 + require 'test/unit' + + class TimeExtentionTest < Test::Unit::TestCase # :nodoc: + def test_rfc822 + assert_equal(Time.utc(1976, 8, 26, 14, 30) + 4 * 3600, + Time.rfc2822("26 Aug 76 14:30 EDT")) + assert_equal(Time.utc(1976, 8, 27, 9, 32) + 7 * 3600, + Time.rfc2822("27 Aug 76 09:32 PDT")) + end + + def test_rfc2822 + assert_equal(Time.utc(1997, 11, 21, 9, 55, 6) + 6 * 3600, + Time.rfc2822("Fri, 21 Nov 1997 09:55:06 -0600")) + assert_equal(Time.utc(2003, 7, 1, 10, 52, 37) - 2 * 3600, + Time.rfc2822("Tue, 1 Jul 2003 10:52:37 +0200")) + assert_equal(Time.utc(1997, 11, 21, 10, 1, 10) + 6 * 3600, + Time.rfc2822("Fri, 21 Nov 1997 10:01:10 -0600")) + assert_equal(Time.utc(1997, 11, 21, 11, 0, 0) + 6 * 3600, + Time.rfc2822("Fri, 21 Nov 1997 11:00:00 -0600")) + assert_equal(Time.utc(1997, 11, 24, 14, 22, 1) + 8 * 3600, + Time.rfc2822("Mon, 24 Nov 1997 14:22:01 -0800")) + begin + Time.at(-1) + rescue ArgumentError + # ignore + else + assert_equal(Time.utc(1969, 2, 13, 23, 32, 54) + 3 * 3600 + 30 * 60, + Time.rfc2822("Thu, 13 Feb 1969 23:32:54 -0330")) + assert_equal(Time.utc(1969, 2, 13, 23, 32, 0) + 3 * 3600 + 30 * 60, + Time.rfc2822(" Thu, + 13 + Feb + 1969 + 23:32 + -0330 (Newfoundland Time)")) + end + assert_equal(Time.utc(1997, 11, 21, 9, 55, 6), + Time.rfc2822("21 Nov 97 09:55:06 GMT")) + assert_equal(Time.utc(1997, 11, 21, 9, 55, 6) + 6 * 3600, + Time.rfc2822("Fri, 21 Nov 1997 09 : 55 : 06 -0600")) + assert_raise(ArgumentError) { + # inner comment is not supported. + Time.rfc2822("Fri, 21 Nov 1997 09(comment): 55 : 06 -0600") + } + end + + def test_rfc2616 + t = Time.utc(1994, 11, 6, 8, 49, 37) + assert_equal(t, Time.httpdate("Sun, 06 Nov 1994 08:49:37 GMT")) + assert_equal(t, Time.httpdate("Sunday, 06-Nov-94 08:49:37 GMT")) + assert_equal(t, Time.httpdate("Sun Nov 6 08:49:37 1994")) + assert_equal(Time.utc(1995, 11, 15, 6, 25, 24), + Time.httpdate("Wed, 15 Nov 1995 06:25:24 GMT")) + assert_equal(Time.utc(1995, 11, 15, 4, 58, 8), + Time.httpdate("Wed, 15 Nov 1995 04:58:08 GMT")) + assert_equal(Time.utc(1994, 11, 15, 8, 12, 31), + Time.httpdate("Tue, 15 Nov 1994 08:12:31 GMT")) + assert_equal(Time.utc(1994, 12, 1, 16, 0, 0), + Time.httpdate("Thu, 01 Dec 1994 16:00:00 GMT")) + assert_equal(Time.utc(1994, 10, 29, 19, 43, 31), + Time.httpdate("Sat, 29 Oct 1994 19:43:31 GMT")) + assert_equal(Time.utc(1994, 11, 15, 12, 45, 26), + Time.httpdate("Tue, 15 Nov 1994 12:45:26 GMT")) + assert_equal(Time.utc(1999, 12, 31, 23, 59, 59), + Time.httpdate("Fri, 31 Dec 1999 23:59:59 GMT")) + + assert_equal(Time.utc(2007, 12, 23, 11, 22, 33), + Time.httpdate('Sunday, 23-Dec-07 11:22:33 GMT')) + end + + def test_rfc3339 + t = Time.utc(1985, 4, 12, 23, 20, 50, 520000) + s = "1985-04-12T23:20:50.52Z" + assert_equal(t, Time.iso8601(s)) + assert_equal(s, t.iso8601(2)) + + t = Time.utc(1996, 12, 20, 0, 39, 57) + s = "1996-12-19T16:39:57-08:00" + assert_equal(t, Time.iso8601(s)) + # There is no way to generate time string with arbitrary timezone. + s = "1996-12-20T00:39:57Z" + assert_equal(t, Time.iso8601(s)) + assert_equal(s, t.iso8601) + + t = Time.utc(1990, 12, 31, 23, 59, 60) + s = "1990-12-31T23:59:60Z" + assert_equal(t, Time.iso8601(s)) + # leap second is representable only if timezone file has it. + s = "1990-12-31T15:59:60-08:00" + assert_equal(t, Time.iso8601(s)) + + begin + Time.at(-1) + rescue ArgumentError + # ignore + else + t = Time.utc(1937, 1, 1, 11, 40, 27, 870000) + s = "1937-01-01T12:00:27.87+00:20" + assert_equal(t, Time.iso8601(s)) + end + end + + # http://www.w3.org/TR/xmlschema-2/ + def test_xmlschema + assert_equal(Time.utc(1999, 5, 31, 13, 20, 0) + 5 * 3600, + Time.xmlschema("1999-05-31T13:20:00-05:00")) + assert_equal(Time.local(2000, 1, 20, 12, 0, 0), + Time.xmlschema("2000-01-20T12:00:00")) + assert_equal(Time.utc(2000, 1, 20, 12, 0, 0), + Time.xmlschema("2000-01-20T12:00:00Z")) + assert_equal(Time.utc(2000, 1, 20, 12, 0, 0) - 12 * 3600, + Time.xmlschema("2000-01-20T12:00:00+12:00")) + assert_equal(Time.utc(2000, 1, 20, 12, 0, 0) + 13 * 3600, + Time.xmlschema("2000-01-20T12:00:00-13:00")) + assert_equal(Time.utc(2000, 3, 4, 23, 0, 0) - 3 * 3600, + Time.xmlschema("2000-03-04T23:00:00+03:00")) + assert_equal(Time.utc(2000, 3, 4, 20, 0, 0), + Time.xmlschema("2000-03-04T20:00:00Z")) + assert_equal(Time.local(2000, 1, 15, 0, 0, 0), + Time.xmlschema("2000-01-15T00:00:00")) + assert_equal(Time.local(2000, 2, 15, 0, 0, 0), + Time.xmlschema("2000-02-15T00:00:00")) + assert_equal(Time.local(2000, 1, 15, 12, 0, 0), + Time.xmlschema("2000-01-15T12:00:00")) + assert_equal(Time.utc(2000, 1, 16, 12, 0, 0), + Time.xmlschema("2000-01-16T12:00:00Z")) + assert_equal(Time.local(2000, 1, 1, 12, 0, 0), + Time.xmlschema("2000-01-01T12:00:00")) + assert_equal(Time.utc(1999, 12, 31, 23, 0, 0), + Time.xmlschema("1999-12-31T23:00:00Z")) + assert_equal(Time.local(2000, 1, 16, 12, 0, 0), + Time.xmlschema("2000-01-16T12:00:00")) + assert_equal(Time.local(2000, 1, 16, 0, 0, 0), + Time.xmlschema("2000-01-16T00:00:00")) + assert_equal(Time.utc(2000, 1, 12, 12, 13, 14), + Time.xmlschema("2000-01-12T12:13:14Z")) + assert_equal(Time.utc(2001, 4, 17, 19, 23, 17, 300000), + Time.xmlschema("2001-04-17T19:23:17.3Z")) + assert_raise(ArgumentError) { Time.xmlschema("2000-01-01T00:00:00.+00:00") } + end + + def test_encode_xmlschema + t = Time.utc(2001, 4, 17, 19, 23, 17, 300000) + assert_equal("2001-04-17T19:23:17Z", t.xmlschema) + assert_equal("2001-04-17T19:23:17.3Z", t.xmlschema(1)) + assert_equal("2001-04-17T19:23:17.300000Z", t.xmlschema(6)) + assert_equal("2001-04-17T19:23:17.3000000Z", t.xmlschema(7)) + + t = Time.utc(2001, 4, 17, 19, 23, 17, 123456) + assert_equal("2001-04-17T19:23:17.1234560Z", t.xmlschema(7)) + assert_equal("2001-04-17T19:23:17.123456Z", t.xmlschema(6)) + assert_equal("2001-04-17T19:23:17.12345Z", t.xmlschema(5)) + assert_equal("2001-04-17T19:23:17.1Z", t.xmlschema(1)) + + begin + Time.at(-1) + rescue ArgumentError + # ignore + else + t = Time.utc(1960, 12, 31, 23, 0, 0, 123456) + assert_equal("1960-12-31T23:00:00.123456Z", t.xmlschema(6)) + end + + assert_equal(249, Time.xmlschema("2008-06-05T23:49:23.000249+09:00").usec) + end + + def test_completion + now = Time.local(2001,11,29,21,26,35) + assert_equal(Time.local( 2001,11,29,21,12), + Time.parse("2001/11/29 21:12", now)) + assert_equal(Time.local( 2001,11,29), + Time.parse("2001/11/29", now)) + assert_equal(Time.local( 2001,11,29), + Time.parse( "11/29", now)) + #assert_equal(Time.local(2001,11,1), Time.parse("Nov", now)) + assert_equal(Time.local( 2001,11,29,10,22), + Time.parse( "10:22", now)) + end + + def test_invalid + # They were actually used in some web sites. + assert_raise(ArgumentError) { Time.httpdate("1 Dec 2001 10:23:57 GMT") } + assert_raise(ArgumentError) { Time.httpdate("Sat, 1 Dec 2001 10:25:42 GMT") } + assert_raise(ArgumentError) { Time.httpdate("Sat, 1-Dec-2001 10:53:55 GMT") } + assert_raise(ArgumentError) { Time.httpdate("Saturday, 01-Dec-2001 10:15:34 GMT") } + assert_raise(ArgumentError) { Time.httpdate("Saturday, 01-Dec-101 11:10:07 GMT") } + assert_raise(ArgumentError) { Time.httpdate("Fri, 30 Nov 2001 21:30:00 JST") } + + # They were actually used in some mails. + assert_raise(ArgumentError) { Time.rfc2822("01-5-20") } + assert_raise(ArgumentError) { Time.rfc2822("7/21/00") } + assert_raise(ArgumentError) { Time.rfc2822("2001-8-28") } + assert_raise(ArgumentError) { Time.rfc2822("00-5-6 1:13:06") } + assert_raise(ArgumentError) { Time.rfc2822("2001-9-27 9:36:49") } + assert_raise(ArgumentError) { Time.rfc2822("2000-12-13 11:01:11") } + assert_raise(ArgumentError) { Time.rfc2822("2001/10/17 04:29:55") } + assert_raise(ArgumentError) { Time.rfc2822("9/4/2001 9:23:19 PM") } + assert_raise(ArgumentError) { Time.rfc2822("01 Nov 2001 09:04:31") } + assert_raise(ArgumentError) { Time.rfc2822("13 Feb 2001 16:4 GMT") } + assert_raise(ArgumentError) { Time.rfc2822("01 Oct 00 5:41:19 PM") } + assert_raise(ArgumentError) { Time.rfc2822("2 Jul 00 00:51:37 JST") } + assert_raise(ArgumentError) { Time.rfc2822("01 11 2001 06:55:57 -0500") } + assert_raise(ArgumentError) { Time.rfc2822("18 \343\366\356\341\370 2000") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, Oct 2001 18:53:32") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 2 Nov 2001 03:47:54") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 27 Jul 2001 11.14.14 +0200") } + assert_raise(ArgumentError) { Time.rfc2822("Thu, 2 Nov 2000 04:13:53 -600") } + assert_raise(ArgumentError) { Time.rfc2822("Wed, 5 Apr 2000 22:57:09 JST") } + assert_raise(ArgumentError) { Time.rfc2822("Mon, 11 Sep 2000 19:47:33 00000") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 28 Apr 2000 20:40:47 +-900") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 19 Jan 2001 8:15:36 AM -0500") } + assert_raise(ArgumentError) { Time.rfc2822("Thursday, Sep 27 2001 7:42:35 AM EST") } + assert_raise(ArgumentError) { Time.rfc2822("3/11/2001 1:31:57 PM Pacific Daylight Time") } + assert_raise(ArgumentError) { Time.rfc2822("Mi, 28 Mrz 2001 11:51:36") } + assert_raise(ArgumentError) { Time.rfc2822("P, 30 sept 2001 23:03:14") } + assert_raise(ArgumentError) { Time.rfc2822("fr, 11 aug 2000 18:39:22") } + assert_raise(ArgumentError) { Time.rfc2822("Fr, 21 Sep 2001 17:44:03 -1000") } + assert_raise(ArgumentError) { Time.rfc2822("Mo, 18 Jun 2001 19:21:40 -1000") } + assert_raise(ArgumentError) { Time.rfc2822("l\366, 12 aug 2000 18:53:20") } + assert_raise(ArgumentError) { Time.rfc2822("l\366, 26 maj 2001 00:15:58") } + assert_raise(ArgumentError) { Time.rfc2822("Dom, 30 Sep 2001 17:36:30") } + assert_raise(ArgumentError) { Time.rfc2822("%&, 31 %2/ 2000 15:44:47 -0500") } + assert_raise(ArgumentError) { Time.rfc2822("dom, 26 ago 2001 03:57:07 -0300") } + assert_raise(ArgumentError) { Time.rfc2822("ter, 04 set 2001 16:27:58 -0300") } + assert_raise(ArgumentError) { Time.rfc2822("Wen, 3 oct 2001 23:17:49 -0400") } + assert_raise(ArgumentError) { Time.rfc2822("Wen, 3 oct 2001 23:17:49 -0400") } + assert_raise(ArgumentError) { Time.rfc2822("ele, 11 h: 2000 12:42:15 -0500") } + assert_raise(ArgumentError) { Time.rfc2822("Tue, 14 Aug 2001 3:55:3 +0200") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 25 Aug 2000 9:3:48 +0800") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 1 Dec 2000 0:57:50 EST") } + assert_raise(ArgumentError) { Time.rfc2822("Mon, 7 May 2001 9:39:51 +0200") } + assert_raise(ArgumentError) { Time.rfc2822("Wed, 1 Aug 2001 16:9:15 +0200") } + assert_raise(ArgumentError) { Time.rfc2822("Wed, 23 Aug 2000 9:17:36 +0800") } + assert_raise(ArgumentError) { Time.rfc2822("Fri, 11 Aug 2000 10:4:42 +0800") } + assert_raise(ArgumentError) { Time.rfc2822("Sat, 15 Sep 2001 13:22:2 +0300") } + assert_raise(ArgumentError) { Time.rfc2822("Wed,16 \276\305\324\302 2001 20:06:25 +0800") } + assert_raise(ArgumentError) { Time.rfc2822("Wed,7 \312\256\322\273\324\302 2001 23:47:22 +0800") } + assert_raise(ArgumentError) { Time.rfc2822("=?iso-8859-1?Q?(=C5=DA),?= 10 2 2001 23:32:26 +0900 (JST)") } + assert_raise(ArgumentError) { Time.rfc2822("\307\341\314\343\332\311, 30 \344\346\335\343\310\321 2001 10:01:06") } + assert_raise(ArgumentError) { Time.rfc2822("=?iso-8859-1?Q?(=BF=E5),?= 12 =?iso-8859-1?Q?9=B7=EE?= 2001 14:52:41\n+0900 (JST)") } + end + + def test_zone_0000 + assert_equal(true, Time.parse("2000-01-01T00:00:00Z").utc?) + assert_equal(true, Time.parse("2000-01-01T00:00:00-00:00").utc?) + assert_equal(false, Time.parse("2000-01-01T00:00:00+00:00").utc?) + assert_equal(false, Time.parse("Sat, 01 Jan 2000 00:00:00 GMT").utc?) + assert_equal(true, Time.parse("Sat, 01 Jan 2000 00:00:00 -0000").utc?) + assert_equal(false, Time.parse("Sat, 01 Jan 2000 00:00:00 +0000").utc?) + assert_equal(false, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 GMT").utc?) + assert_equal(true, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 -0000").utc?) + assert_equal(false, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 +0000").utc?) + assert_equal(true, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 UTC").utc?) + end + + def test_rfc2822_utc_roundtrip_winter + t1 = Time.local(2008,12,1) + t2 = Time.rfc2822(t1.rfc2822) + assert_equal(t1.utc?, t2.utc?, "[ruby-dev:37126]") + end + + def test_rfc2822_utc_roundtrip_summer + t1 = Time.local(2008,8,1) + t2 = Time.rfc2822(t1.rfc2822) + assert_equal(t1.utc?, t2.utc?) + end + + def test_parse_leap_second + t = Time.utc(1998,12,31,23,59,59) + assert_equal(t, Time.parse("Thu Dec 31 23:59:59 UTC 1998")) + assert_equal(t, Time.parse("Fri Dec 31 23:59:59 -0000 1998"));t.localtime + assert_equal(t, Time.parse("Fri Jan 1 08:59:59 +0900 1999")) + assert_equal(t, Time.parse("Fri Jan 1 00:59:59 +0100 1999")) + assert_equal(t, Time.parse("Fri Dec 31 23:59:59 +0000 1998")) + assert_equal(t, Time.parse("Fri Dec 31 22:59:59 -0100 1998"));t.utc + t += 1 + assert_equal(t, Time.parse("Thu Dec 31 23:59:60 UTC 1998")) + assert_equal(t, Time.parse("Fri Dec 31 23:59:60 -0000 1998"));t.localtime + assert_equal(t, Time.parse("Fri Jan 1 08:59:60 +0900 1999")) + assert_equal(t, Time.parse("Fri Jan 1 00:59:60 +0100 1999")) + assert_equal(t, Time.parse("Fri Dec 31 23:59:60 +0000 1998")) + assert_equal(t, Time.parse("Fri Dec 31 22:59:60 -0100 1998"));t.utc + t += 1 if t.sec == 60 + assert_equal(t, Time.parse("Thu Jan 1 00:00:00 UTC 1999")) + assert_equal(t, Time.parse("Fri Jan 1 00:00:00 -0000 1999"));t.localtime + assert_equal(t, Time.parse("Fri Jan 1 09:00:00 +0900 1999")) + assert_equal(t, Time.parse("Fri Jan 1 01:00:00 +0100 1999")) + assert_equal(t, Time.parse("Fri Jan 1 00:00:00 +0000 1999")) + assert_equal(t, Time.parse("Fri Dec 31 23:00:00 -0100 1998")) + end + + def test_rfc2822_leap_second + t = Time.utc(1998,12,31,23,59,59) + assert_equal(t, Time.rfc2822("Thu, 31 Dec 1998 23:59:59 UTC")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 23:59:59 -0000"));t.localtime + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 08:59:59 +0900")) + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 00:59:59 +0100")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 23:59:59 +0000")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 22:59:59 -0100"));t.utc + t += 1 + assert_equal(t, Time.rfc2822("Thu, 31 Dec 1998 23:59:60 UTC")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 23:59:60 -0000"));t.localtime + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 08:59:60 +0900")) + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 00:59:60 +0100")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 23:59:60 +0000")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 22:59:60 -0100"));t.utc + t += 1 if t.sec == 60 + assert_equal(t, Time.rfc2822("Thu, 1 Jan 1999 00:00:00 UTC")) + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 00:00:00 -0000"));t.localtime + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 09:00:00 +0900")) + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 01:00:00 +0100")) + assert_equal(t, Time.rfc2822("Fri, 1 Jan 1999 00:00:00 +0000")) + assert_equal(t, Time.rfc2822("Fri, 31 Dec 1998 23:00:00 -0100")) + end + + def test_xmlschema_leap_second + t = Time.utc(1998,12,31,23,59,59) + assert_equal(t, Time.xmlschema("1998-12-31T23:59:59Z")) + assert_equal(t, Time.xmlschema("1998-12-31T23:59:59-00:00"));t.localtime + assert_equal(t, Time.xmlschema("1999-01-01T08:59:59+09:00")) + assert_equal(t, Time.xmlschema("1999-01-01T00:59:59+01:00")) + assert_equal(t, Time.xmlschema("1998-12-31T23:59:59+00:00")) + assert_equal(t, Time.xmlschema("1998-12-31T22:59:59-01:00"));t.utc + t += 1 + assert_equal(t, Time.xmlschema("1998-12-31T23:59:60Z")) + assert_equal(t, Time.xmlschema("1998-12-31T23:59:60-00:00"));t.localtime + assert_equal(t, Time.xmlschema("1999-01-01T08:59:60+09:00")) + assert_equal(t, Time.xmlschema("1999-01-01T00:59:60+01:00")) + assert_equal(t, Time.xmlschema("1998-12-31T23:59:60+00:00")) + assert_equal(t, Time.xmlschema("1998-12-31T22:59:60-01:00"));t.utc + t += 1 if t.sec == 60 + assert_equal(t, Time.xmlschema("1999-01-01T00:00:00Z")) + assert_equal(t, Time.xmlschema("1999-01-01T00:00:00-00:00"));t.localtime + assert_equal(t, Time.xmlschema("1999-01-01T09:00:00+09:00")) + assert_equal(t, Time.xmlschema("1999-01-01T01:00:00+01:00")) + assert_equal(t, Time.xmlschema("1999-01-01T00:00:00+00:00")) + assert_equal(t, Time.xmlschema("1998-12-31T23:00:00-01:00")) + end + + def test_xmlschema_fraction + assert_equal(500000, Time.xmlschema("2000-01-01T00:00:00.5+00:00").tv_usec) + end + + def test_ruby_talk_152866 + t = Time::xmlschema('2005-08-30T22:48:00-07:00') + assert_equal(31, t.day) + assert_equal(8, t.mon) + end + + def test_parse_fraction + assert_equal(500000, Time.parse("2000-01-01T00:00:00.5+00:00").tv_usec) + end + + def test_strptime + assert_equal(Time.utc(2005, 8, 28, 06, 54, 20), Time.strptime("28/Aug/2005:06:54:20 +0000", "%d/%b/%Y:%T %z")) + end + + def test_nsec + assert_equal(123456789, Time.xmlschema("2000-01-01T00:00:00.123456789+00:00").tv_nsec) + assert_equal(123456789, Time.parse("2000-01-01T00:00:00.123456789+00:00").tv_nsec) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/timeout.rb b/lib/ruby-1.9.1-rc1/lib/timeout.rb new file mode 100644 index 0000000..19ccb96 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/timeout.rb @@ -0,0 +1,108 @@ +# = timeout.rb +# +# execution timeout +# +# = Synopsis +# +# require 'timeout' +# status = Timeout::timeout(5) { +# # Something that should be interrupted if it takes too much time... +# } +# +# = Description +# +# A way of performing a potentially long-running operation in a thread, and terminating +# it's execution if it hasn't finished by a fixed amount of time. +# +# Previous versions of timeout didn't provide use a module for namespace. This version +# provides both Timeout.timeout, and a backwards-compatible #timeout. +# +# = Copyright +# +# Copyright:: (C) 2000 Network Applied Communication Laboratory, Inc. +# Copyright:: (C) 2000 Information-technology Promotion Agency, Japan + +module Timeout + # Raised by Timeout#timeout when the block times out. + class Error < RuntimeError + end + class ExitException < ::Exception # :nodoc: + end + + THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o + CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0 + + # Executes the method's block. If the block execution terminates before + # +sec+ seconds has passed, it returns the result value of the block. + # If not, it terminates the execution and raises +exception+ (which defaults + # to Timeout::Error). + # + # Note that this is both a method of module Timeout, so you can 'include Timeout' + # into your classes so they have a #timeout method, as well as a module method, + # so you can call it directly as Timeout.timeout(). + def timeout(sec, klass = nil) #:yield: +sec+ + return yield(sec) if sec == nil or sec.zero? + exception = klass || Class.new(ExitException) + begin + x = Thread.current + y = Thread.start { + sleep sec + x.raise exception, "execution expired" if x.alive? + } + return yield(sec) + rescue exception => e + rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o + (bt = e.backtrace).reject! {|m| rej =~ m} + level = -caller(CALLER_OFFSET).size + while THIS_FILE =~ bt[level] + bt.delete_at(level) + level += 1 + end + raise if klass # if exception class is specified, it + # would be expected outside. + raise Error, e.message, e.backtrace + ensure + if y and y.alive? + y.kill + y.join # make sure y is dead. + end + end + end + + module_function :timeout +end + +# Identical to: +# +# Timeout::timeout(n, e, &block). +# +# Defined for backwards compatibility with earlier versions of timeout.rb, see +# Timeout#timeout. +def timeout(n, e = nil, &block) + Timeout::timeout(n, e, &block) +end + +# Another name for Timeout::Error, defined for backwards compatibility with +# earlier versions of timeout.rb. +TimeoutError = Timeout::Error + +if __FILE__ == $0 + p timeout(5) { + 45 + } + p timeout(5, TimeoutError) { + 45 + } + p timeout(nil) { + 54 + } + p timeout(0) { + 54 + } + p timeout(5) { + loop { + p 10 + sleep 1 + } + } +end diff --git a/lib/ruby-1.9.1-rc1/lib/tmpdir.rb b/lib/ruby-1.9.1-rc1/lib/tmpdir.rb new file mode 100644 index 0000000..e46c10c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/tmpdir.rb @@ -0,0 +1,137 @@ +# +# tmpdir - retrieve temporary directory path +# +# $Id: tmpdir.rb 19513 2008-09-24 05:39:39Z usa $ +# + +require 'fileutils' + +class Dir + + @@systmpdir = '/tmp' + + begin + require 'Win32API' + CSIDL_LOCAL_APPDATA = 0x001c + max_pathlen = 260 + windir = "\0"*(max_pathlen+1) + begin + getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L') + raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir) != 0 + windir = File.expand_path(windir.rstrip) + rescue RuntimeError + begin + getdir = Win32API.new('kernel32', 'GetSystemWindowsDirectory', 'PL', 'L') + rescue RuntimeError + getdir = Win32API.new('kernel32', 'GetWindowsDirectory', 'PL', 'L') + end + len = getdir.call(windir, windir.size) + windir = File.expand_path(windir[0, len]) + end + temp = File.join(windir.untaint, 'temp') + @@systmpdir = temp if File.directory?(temp) and File.writable?(temp) + rescue LoadError + end + + ## + # Returns the operating system's temporary file path. + + def Dir::tmpdir + tmp = '.' + if $SAFE > 0 + tmp = @@systmpdir + else + for dir in [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], + ENV['USERPROFILE'], @@systmpdir, '/tmp'] + if dir and File.directory?(dir) and File.writable?(dir) + tmp = dir + break + end + end + File.expand_path(tmp) + end + end + + # Dir.mktmpdir creates a temporary directory. + # + # The directory is created with 0700 permission. + # + # The prefix and suffix of the name of the directory is specified by + # the optional first argument, prefix_suffix. + # - If it is not specified or nil, "d" is used as the prefix and no suffix is used. + # - If it is a string, it is used as the prefix and no suffix is used. + # - If it is an array, first element is used as the prefix and second element is used as a suffix. + # + # Dir.mktmpdir {|dir| dir is ".../d..." } + # Dir.mktmpdir("foo") {|dir| dir is ".../foo..." } + # Dir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" } + # + # The directory is created under Dir.tmpdir or + # the optional second argument tmpdir if non-nil value is given. + # + # Dir.mktmpdir {|dir| dir is "#{Dir.tmpdir}/d..." } + # Dir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." } + # + # If a block is given, + # it is yielded with the path of the directory. + # The directory and its contents are removed + # using FileUtils.remove_entry_secure before Dir.mktmpdir returns. + # The value of the block is returned. + # + # Dir.mktmpdir {|dir| + # # use the directory... + # open("#{dir}/foo", "w") { ... } + # } + # + # If a block is not given, + # The path of the directory is returned. + # In this case, Dir.mktmpdir doesn't remove the directory. + # + # dir = Dir.mktmpdir + # begin + # # use the directory... + # open("#{dir}/foo", "w") { ... } + # ensure + # # remove the directory. + # FileUtils.remove_entry_secure dir + # end + # + def Dir.mktmpdir(prefix_suffix=nil, tmpdir=nil) + case prefix_suffix + when nil + prefix = "d" + suffix = "" + when String + prefix = prefix_suffix + suffix = "" + when Array + prefix = prefix_suffix[0] + suffix = prefix_suffix[1] + else + raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}" + end + tmpdir ||= Dir.tmpdir + t = Time.now.strftime("%Y%m%d") + n = nil + begin + path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}" + path << "-#{n}" if n + path << suffix + Dir.mkdir(path, 0700) + rescue Errno::EEXIST + n ||= 0 + n += 1 + retry + end + + if block_given? + begin + yield path + ensure + FileUtils.remove_entry_secure path + end + else + path + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/tracer.rb b/lib/ruby-1.9.1-rc1/lib/tracer.rb new file mode 100644 index 0000000..1fdc608 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/tracer.rb @@ -0,0 +1,166 @@ +# +# tracer.rb - +# $Release Version: 0.2$ +# $Revision: 1.8 $ +# by Keiju ISHITSUKA(Nippon Rational Inc.) +# +# -- +# +# +# + +# +# tracer main class +# +class Tracer + @RCS_ID='-$Id: tracer.rb,v 1.8 1998/05/19 03:42:49 keiju Exp keiju $-' + + @stdout = STDOUT + @verbose = false + class << self + attr_accessor :verbose + alias verbose? verbose + attr_accessor :stdout + end + + EVENT_SYMBOL = { + "line" => "-", + "call" => ">", + "return" => "<", + "class" => "C", + "end" => "E", + "c-call" => ">", + "c-return" => "<", + } + + def initialize + @threads = Hash.new + if defined? Thread.main + @threads[Thread.main.object_id] = 0 + else + @threads[Thread.current.object_id] = 0 + end + + @get_line_procs = {} + + @filters = [] + end + + def stdout + Tracer.stdout + end + + def on + if block_given? + on + begin + yield + ensure + off + end + else + set_trace_func method(:trace_func).to_proc + stdout.print "Trace on\n" if Tracer.verbose? + end + end + + def off + set_trace_func nil + stdout.print "Trace off\n" if Tracer.verbose? + end + + def add_filter(p = proc) + @filters.push p + end + + def set_get_line_procs(file, p = proc) + @get_line_procs[file] = p + end + + def get_line(file, line) + if p = @get_line_procs[file] + return p.call(line) + end + + unless list = SCRIPT_LINES__[file] + begin + f = open(file) + begin + SCRIPT_LINES__[file] = list = f.readlines + ensure + f.close + end + rescue + SCRIPT_LINES__[file] = list = [] + end + end + + if l = list[line - 1] + l + else + "-\n" + end + end + + def get_thread_no + if no = @threads[Thread.current.object_id] + no + else + @threads[Thread.current.object_id] = @threads.size + end + end + + def trace_func(event, file, line, id, binding, klass, *) + return if file == __FILE__ + + for p in @filters + return unless p.call event, file, line, id, binding, klass + end + + # saved_crit = Thread.critical + # Thread.critical = true + stdout.printf("#%d:%s:%d:%s:%s: %s", + get_thread_no, + file, + line, + klass || '', + EVENT_SYMBOL[event], + get_line(file, line)) + # Thread.critical = saved_crit + end + + Single = new + def Tracer.on + if block_given? + Single.on{yield} + else + Single.on + end + end + + def Tracer.off + Single.off + end + + def Tracer.set_get_line_procs(file_name, p = proc) + Single.set_get_line_procs(file_name, p) + end + + def Tracer.add_filter(p = proc) + Single.add_filter(p) + end + +end + +SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__ + +if $0 == __FILE__ + # direct call + + $0 = ARGV[0] + ARGV.shift + Tracer.on + require $0 +elsif caller(0).size == 1 + Tracer.on +end diff --git a/lib/ruby-1.9.1-rc1/lib/tsort.rb b/lib/ruby-1.9.1-rc1/lib/tsort.rb new file mode 100644 index 0000000..9fc4fea --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/tsort.rb @@ -0,0 +1,290 @@ +#!/usr/bin/env ruby +#-- +# tsort.rb - provides a module for topological sorting and strongly connected components. +#++ +# + +# +# TSort implements topological sorting using Tarjan's algorithm for +# strongly connected components. +# +# TSort is designed to be able to be used with any object which can be +# interpreted as a directed graph. +# +# TSort requires two methods to interpret an object as a graph, +# tsort_each_node and tsort_each_child. +# +# * tsort_each_node is used to iterate for all nodes over a graph. +# * tsort_each_child is used to iterate for child nodes of a given node. +# +# The equality of nodes are defined by eql? and hash since +# TSort uses Hash internally. +# +# == A Simple Example +# +# The following example demonstrates how to mix the TSort module into an +# existing class (in this case, Hash). Here, we're treating each key in +# the hash as a node in the graph, and so we simply alias the required +# #tsort_each_node method to Hash's #each_key method. For each key in the +# hash, the associated value is an array of the node's child nodes. This +# choice in turn leads to our implementation of the required #tsort_each_child +# method, which fetches the array of child nodes and then iterates over that +# array using the user-supplied block. +# +# require 'tsort' +# +# class Hash +# include TSort +# alias tsort_each_node each_key +# def tsort_each_child(node, &block) +# fetch(node).each(&block) +# end +# end +# +# {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort +# #=> [3, 2, 1, 4] +# +# {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components +# #=> [[4], [2, 3], [1]] +# +# == A More Realistic Example +# +# A very simple `make' like tool can be implemented as follows: +# +# require 'tsort' +# +# class Make +# def initialize +# @dep = {} +# @dep.default = [] +# end +# +# def rule(outputs, inputs=[], &block) +# triple = [outputs, inputs, block] +# outputs.each {|f| @dep[f] = [triple]} +# @dep[triple] = inputs +# end +# +# def build(target) +# each_strongly_connected_component_from(target) {|ns| +# if ns.length != 1 +# fs = ns.delete_if {|n| Array === n} +# raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}") +# end +# n = ns.first +# if Array === n +# outputs, inputs, block = n +# inputs_time = inputs.map {|f| File.mtime f}.max +# begin +# outputs_time = outputs.map {|f| File.mtime f}.min +# rescue Errno::ENOENT +# outputs_time = nil +# end +# if outputs_time == nil || +# inputs_time != nil && outputs_time <= inputs_time +# sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i +# block.call +# end +# end +# } +# end +# +# def tsort_each_child(node, &block) +# @dep[node].each(&block) +# end +# include TSort +# end +# +# def command(arg) +# print arg, "\n" +# system arg +# end +# +# m = Make.new +# m.rule(%w[t1]) { command 'date > t1' } +# m.rule(%w[t2]) { command 'date > t2' } +# m.rule(%w[t3]) { command 'date > t3' } +# m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 > t4' } +# m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 > t5' } +# m.build('t5') +# +# == Bugs +# +# * 'tsort.rb' is wrong name because this library uses +# Tarjan's algorithm for strongly connected components. +# Although 'strongly_connected_components.rb' is correct but too long. +# +# == References +# +# R. E. Tarjan, "Depth First Search and Linear Graph Algorithms", +# SIAM Journal on Computing, Vol. 1, No. 2, pp. 146-160, June 1972. +# + +module TSort + class Cyclic < StandardError + end + + # + # Returns a topologically sorted array of nodes. + # The array is sorted from children to parents, i.e. + # the first element has no child and the last node has no parent. + # + # If there is a cycle, TSort::Cyclic is raised. + # + def tsort + result = [] + tsort_each {|element| result << element} + result + end + + # + # The iterator version of the #tsort method. + # obj.tsort_each is similar to obj.tsort.each, but + # modification of _obj_ during the iteration may lead to unexpected results. + # + # #tsort_each returns +nil+. + # If there is a cycle, TSort::Cyclic is raised. + # + def tsort_each # :yields: node + each_strongly_connected_component {|component| + if component.size == 1 + yield component.first + else + raise Cyclic.new("topological sort failed: #{component.inspect}") + end + } + end + + # + # Returns strongly connected components as an array of arrays of nodes. + # The array is sorted from children to parents. + # Each elements of the array represents a strongly connected component. + # + def strongly_connected_components + result = [] + each_strongly_connected_component {|component| result << component} + result + end + + # + # The iterator version of the #strongly_connected_components method. + # obj.each_strongly_connected_component is similar to + # obj.strongly_connected_components.each, but + # modification of _obj_ during the iteration may lead to unexpected results. + # + # + # #each_strongly_connected_component returns +nil+. + # + def each_strongly_connected_component # :yields: nodes + id_map = {} + stack = [] + tsort_each_node {|node| + unless id_map.include? node + each_strongly_connected_component_from(node, id_map, stack) {|c| + yield c + } + end + } + nil + end + + # + # Iterates over strongly connected component in the subgraph reachable from + # _node_. + # + # Return value is unspecified. + # + # #each_strongly_connected_component_from doesn't call #tsort_each_node. + # + def each_strongly_connected_component_from(node, id_map={}, stack=[]) # :yields: nodes + minimum_id = node_id = id_map[node] = id_map.size + stack_length = stack.length + stack << node + + tsort_each_child(node) {|child| + if id_map.include? child + child_id = id_map[child] + minimum_id = child_id if child_id && child_id < minimum_id + else + sub_minimum_id = + each_strongly_connected_component_from(child, id_map, stack) {|c| + yield c + } + minimum_id = sub_minimum_id if sub_minimum_id < minimum_id + end + } + + if node_id == minimum_id + component = stack.slice!(stack_length .. -1) + component.each {|n| id_map[n] = nil} + yield component + end + + minimum_id + end + + # + # Should be implemented by a extended class. + # + # #tsort_each_node is used to iterate for all nodes over a graph. + # + def tsort_each_node # :yields: node + raise NotImplementedError.new + end + + # + # Should be implemented by a extended class. + # + # #tsort_each_child is used to iterate for child nodes of _node_. + # + def tsort_each_child(node) # :yields: child + raise NotImplementedError.new + end +end + +if __FILE__ == $0 + require 'test/unit' + + class TSortHash < Hash # :nodoc: + include TSort + alias tsort_each_node each_key + def tsort_each_child(node, &block) + fetch(node).each(&block) + end + end + + class TSortArray < Array # :nodoc: + include TSort + alias tsort_each_node each_index + def tsort_each_child(node, &block) + fetch(node).each(&block) + end + end + + class TSortTest < Test::Unit::TestCase # :nodoc: + def test_dag + h = TSortHash[{1=>[2, 3], 2=>[3], 3=>[]}] + assert_equal([3, 2, 1], h.tsort) + assert_equal([[3], [2], [1]], h.strongly_connected_components) + end + + def test_cycle + h = TSortHash[{1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}] + assert_equal([[4], [2, 3], [1]], + h.strongly_connected_components.map {|nodes| nodes.sort}) + assert_raise(TSort::Cyclic) { h.tsort } + end + + def test_array + a = TSortArray[[1], [0], [0], [2]] + assert_equal([[0, 1], [2], [3]], + a.strongly_connected_components.map {|nodes| nodes.sort}) + + a = TSortArray[[], [0]] + assert_equal([[0], [1]], + a.strongly_connected_components.map {|nodes| nodes.sort}) + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/ubygems.rb b/lib/ruby-1.9.1-rc1/lib/ubygems.rb new file mode 100644 index 0000000..fec880f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/ubygems.rb @@ -0,0 +1,10 @@ +# This file allows for the running of rubygems with a nice +# command line look-and-feel: ruby -rubygems foo.rb +#-- +# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. +# All rights reserved. +# See LICENSE.txt for permissions. +#++ + + +require 'rubygems' diff --git a/lib/ruby-1.9.1-rc1/lib/un.rb b/lib/ruby-1.9.1-rc1/lib/un.rb new file mode 100644 index 0000000..3dcdbed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/un.rb @@ -0,0 +1,302 @@ +# +# = un.rb +# +# Copyright (c) 2003 WATANABE Hirofumi +# +# This program is free software. +# You can distribute/modify this program under the same terms of Ruby. +# +# == Utilities to replace common UNIX commands in Makefiles etc +# +# == SYNOPSIS +# +# ruby -run -e cp -- [OPTION] SOURCE DEST +# ruby -run -e ln -- [OPTION] TARGET LINK_NAME +# ruby -run -e mv -- [OPTION] SOURCE DEST +# ruby -run -e rm -- [OPTION] FILE +# ruby -run -e mkdir -- [OPTION] DIRS +# ruby -run -e rmdir -- [OPTION] DIRS +# ruby -run -e install -- [OPTION] SOURCE DEST +# ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE +# ruby -run -e touch -- [OPTION] FILE +# ruby -run -e wait_writable -- [OPTION] FILE +# ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION] +# ruby -run -e help [COMMAND] + +require "fileutils" +require "optparse" + +module FileUtils +# @fileutils_label = "" + @fileutils_output = $stdout +end + +def setup(options = "", *long_options) + opt_hash = {} + argv = [] + OptionParser.new do |o| + options.scan(/.:?/) do |s| + opt_name = s.delete(":").intern + o.on("-" + s.tr(":", " ")) do |val| + opt_hash[opt_name] = val + end + end + long_options.each do |s| + opt_name = s[/\A(?:--)?([^\s=]+)/, 1].intern + o.on(s.sub(/\A(?!--)/, '--')) do |val| + opt_hash[opt_name] = val + end + end + o.on("-v") do opt_hash[:verbose] = true end + o.order!(ARGV) do |x| + if /[*?\[{]/ =~ x + argv.concat(Dir[x]) + else + argv << x + end + end + end + yield argv, opt_hash +end + +## +# Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY +# +# ruby -run -e cp -- [OPTION] SOURCE DEST +# +# -p preserve file attributes if possible +# -r copy recursively +# -v verbose +# + +def cp + setup("pr") do |argv, options| + cmd = "cp" + cmd += "_r" if options.delete :r + options[:preserve] = true if options.delete :p + dest = argv.pop + argv = argv[0] if argv.size == 1 + FileUtils.send cmd, argv, dest, options + end +end + +## +# Create a link to the specified TARGET with LINK_NAME. +# +# ruby -run -e ln -- [OPTION] TARGET LINK_NAME +# +# -s make symbolic links instead of hard links +# -f remove existing destination files +# -v verbose +# + +def ln + setup("sf") do |argv, options| + cmd = "ln" + cmd += "_s" if options.delete :s + options[:force] = true if options.delete :f + dest = argv.pop + argv = argv[0] if argv.size == 1 + FileUtils.send cmd, argv, dest, options + end +end + +## +# Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. +# +# ruby -run -e mv -- [OPTION] SOURCE DEST +# +# -v verbose +# + +def mv + setup do |argv, options| + dest = argv.pop + argv = argv[0] if argv.size == 1 + FileUtils.mv argv, dest, options + end +end + +## +# Remove the FILE +# +# ruby -run -e rm -- [OPTION] FILE +# +# -f ignore nonexistent files +# -r remove the contents of directories recursively +# -v verbose +# + +def rm + setup("fr") do |argv, options| + cmd = "rm" + cmd += "_r" if options.delete :r + options[:force] = true if options.delete :f + FileUtils.send cmd, argv, options + end +end + +## +# Create the DIR, if they do not already exist. +# +# ruby -run -e mkdir -- [OPTION] DIR +# +# -p no error if existing, make parent directories as needed +# -v verbose +# + +def mkdir + setup("p") do |argv, options| + cmd = "mkdir" + cmd += "_p" if options.delete :p + FileUtils.send cmd, argv, options + end +end + +## +# Remove the DIR. +# +# ruby -run -e rmdir -- [OPTION] DIR +# +# -v verbose +# + +def rmdir + setup do |argv, options| + FileUtils.rmdir argv, options + end +end + +## +# Copy SOURCE to DEST. +# +# ruby -run -e install -- [OPTION] SOURCE DEST +# +# -p apply access/modification times of SOURCE files to +# corresponding destination files +# -m set permission mode (as in chmod), instead of 0755 +# -v verbose +# + +def install + setup("pm:") do |argv, options| + options[:mode] = (mode = options.delete :m) ? mode.oct : 0755 + options[:preserve] = true if options.delete :p + dest = argv.pop + argv = argv[0] if argv.size == 1 + FileUtils.install argv, dest, options + end +end + +## +# Change the mode of each FILE to OCTAL-MODE. +# +# ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE +# +# -v verbose +# + +def chmod + setup do |argv, options| + mode = argv.shift.oct + FileUtils.chmod mode, argv, options + end +end + +## +# Update the access and modification times of each FILE to the current time. +# +# ruby -run -e touch -- [OPTION] FILE +# +# -v verbose +# + +def touch + setup do |argv, options| + FileUtils.touch argv, options + end +end + +## +# Wait until the file becomes writable. +# +# ruby -run -e wait_writable -- [OPTION] FILE +# +# -n RETRY count to retry +# -w SEC each wait time in seconds +# -v verbose +# + +def wait_writable + setup("n:w:v") do |argv, options| + verbose = options[:verbose] + n = options[:n] and n = Integer(n) + wait = (wait = options[:w]) ? Float(wait) : 0.2 + argv.each do |file| + begin + open(file, "r+b") + rescue Errno::ENOENT + break + rescue Errno::EACCES => e + raise if n and (n -= 1) <= 0 + puts e + STDOUT.flush + sleep wait + retry + end + end + end +end + +## +# Create makefile using mkmf. +# +# ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION] +# +# -d ARGS run dir_config +# -h ARGS run have_header +# -l ARGS run have_library +# -f ARGS run have_func +# -v ARGS run have_var +# -t ARGS run have_type +# -m ARGS run have_macro +# -c ARGS run have_const +# --vendor install to vendor_ruby +# + +def mkmf + setup("d:h:l:f:v:t:m:c:", "vendor") do |argv, options| + require 'mkmf' + opt = options[:d] and opt.split(/:/).each {|n| dir_config(*n.split(/,/))} + opt = options[:h] and opt.split(/:/).each {|n| have_header(*n.split(/,/))} + opt = options[:l] and opt.split(/:/).each {|n| have_library(*n.split(/,/))} + opt = options[:f] and opt.split(/:/).each {|n| have_func(*n.split(/,/))} + opt = options[:v] and opt.split(/:/).each {|n| have_var(*n.split(/,/))} + opt = options[:t] and opt.split(/:/).each {|n| have_type(*n.split(/,/))} + opt = options[:m] and opt.split(/:/).each {|n| have_macro(*n.split(/,/))} + opt = options[:c] and opt.split(/:/).each {|n| have_const(*n.split(/,/))} + $configure_args["--vendor"] = true if options[:vendor] + create_makefile(*argv) + end +end + +## +# Display help message. +# +# ruby -run -e help [COMMAND] +# + +def help + setup do |argv,| + all = argv.empty? + open(__FILE__) do |me| + while me.gets("##\n") + if help = me.gets("\n\n") + if all or argv.delete help[/-e \w+/].sub(/-e /, "") + print help.gsub(/^# ?/, "") + end + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri.rb b/lib/ruby-1.9.1-rc1/lib/uri.rb new file mode 100644 index 0000000..e354612 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri.rb @@ -0,0 +1,29 @@ +# +# URI support for Ruby +# +# Author:: Akira Yamada +# Documentation:: Akira Yamada , Dmitry V. Sabanin +# License:: +# Copyright (c) 2001 akira yamada +# You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: uri.rb 13772 2007-10-25 00:53:34Z akira $ +# +# See URI for documentation +# + +module URI + # :stopdoc: + VERSION_CODE = '000911'.freeze + VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze + # :startdoc: + +end + +require 'uri/common' +require 'uri/generic' +require 'uri/ftp' +require 'uri/http' +require 'uri/https' +require 'uri/ldap' +require 'uri/ldaps' +require 'uri/mailto' diff --git a/lib/ruby-1.9.1-rc1/lib/uri/.document b/lib/ruby-1.9.1-rc1/lib/uri/.document new file mode 100644 index 0000000..214dd2e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/.document @@ -0,0 +1,7 @@ +common.rb +ftp.rb +generic.rb +http.rb +https.rb +ldap.rb +mailto.rb diff --git a/lib/ruby-1.9.1-rc1/lib/uri/common.rb b/lib/ruby-1.9.1-rc1/lib/uri/common.rb new file mode 100644 index 0000000..a2f08e1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/common.rb @@ -0,0 +1,727 @@ +# = uri/common.rb +# +# Author:: Akira Yamada +# Revision:: $Id: common.rb 19413 2008-09-18 11:05:09Z mame $ +# License:: +# You can redistribute it and/or modify it under the same term as Ruby. +# + +module URI + module REGEXP + # + # Patterns used to parse URI's + # + module PATTERN + # :stopdoc: + + # RFC 2396 (URI Generic Syntax) + # RFC 2732 (IPv6 Literal Addresses in URL's) + # RFC 2373 (IPv6 Addressing Architecture) + + # alpha = lowalpha | upalpha + ALPHA = "a-zA-Z" + # alphanum = alpha | digit + ALNUM = "#{ALPHA}\\d" + + # hex = digit | "A" | "B" | "C" | "D" | "E" | "F" | + # "a" | "b" | "c" | "d" | "e" | "f" + HEX = "a-fA-F\\d" + # escaped = "%" hex hex + ESCAPED = "%[#{HEX}]{2}" + # mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | + # "(" | ")" + # unreserved = alphanum | mark + UNRESERVED = "-_.!~*'()#{ALNUM}" + # reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | + # "$" | "," + # reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | + # "$" | "," | "[" | "]" (RFC 2732) + RESERVED = ";/?:@&=+$,\\[\\]" + + # domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum + DOMLABEL = "(?:[#{ALNUM}](?:[-#{ALNUM}]*[#{ALNUM}])?)" + # toplabel = alpha | alpha *( alphanum | "-" ) alphanum + TOPLABEL = "(?:[#{ALPHA}](?:[-#{ALNUM}]*[#{ALNUM}])?)" + # hostname = *( domainlabel "." ) toplabel [ "." ] + HOSTNAME = "(?:#{DOMLABEL}\\.)*#{TOPLABEL}\\.?" + + # :startdoc: + end # PATTERN + + # :startdoc: + end # REGEXP + + class Parser + include REGEXP + + # + # == Synopsis + # + # URI::Parser.new([opts]) + # + # == Args + # + # The constructor accepts a hash as options for parser. + # Keys of options are pattern names of URI components + # and values of options are pattern strings. + # The constructor generetes set of regexps for parsing URIs. + # + # You can use the following keys: + # + # * :ESCAPED (URI::PATTERN::ESCAPED in default) + # * :UNRESERVED (URI::PATTERN::UNRESERVED in default) + # * :DOMLABEL (URI::PATTERN::DOMLABEL in default) + # * :TOPLABEL (URI::PATTERN::TOPLABEL in default) + # * :HOSTNAME (URI::PATTERN::HOSTNAME in default) + # + # == Examples + # + # p = URI::Parser.new(:ESCPAED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})" + # u = p.parse("http://example.jp/%uABCD") #=> # + # URI.parse(u.to_s) #=> raises URI::InvalidURIError + # + # s = "http://examle.com/ABCD" + # u1 = p.parse(s) #=> # + # u2 = URI.parse(s) #=> # + # u1 == u2 #=> true + # u1.eql?(u2) #=> false + # + def initialize(opts = {}) + @pattern = initialize_pattern(opts) + @pattern.each_value {|v| v.freeze} + @pattern.freeze + + @regexp = initialize_regexp(@pattern) + @regexp.each_value {|v| v.freeze} + @regexp.freeze + end + attr_reader :pattern, :regexp + + def split(uri) + case uri + when '' + # null uri + + when @regexp[:ABS_URI] + scheme, opaque, userinfo, host, port, + registry, path, query, fragment = $~[1..-1] + + # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + + # absoluteURI = scheme ":" ( hier_part | opaque_part ) + # hier_part = ( net_path | abs_path ) [ "?" query ] + # opaque_part = uric_no_slash *uric + + # abs_path = "/" path_segments + # net_path = "//" authority [ abs_path ] + + # authority = server | reg_name + # server = [ [ userinfo "@" ] hostport ] + + if !scheme + raise InvalidURIError, + "bad URI(absolute but no scheme): #{uri}" + end + if !opaque && (!path && (!host && !registry)) + raise InvalidURIError, + "bad URI(absolute but no path): #{uri}" + end + + when @regexp[:REL_URI] + scheme = nil + opaque = nil + + userinfo, host, port, registry, + rel_segment, abs_path, query, fragment = $~[1..-1] + if rel_segment && abs_path + path = rel_segment + abs_path + elsif rel_segment + path = rel_segment + elsif abs_path + path = abs_path + end + + # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + + # relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ] + + # net_path = "//" authority [ abs_path ] + # abs_path = "/" path_segments + # rel_path = rel_segment [ abs_path ] + + # authority = server | reg_name + # server = [ [ userinfo "@" ] hostport ] + + else + raise InvalidURIError, "bad URI(is not URI?): #{uri}" + end + + path = '' if !path && !opaque # (see RFC2396 Section 5.2) + ret = [ + scheme, + userinfo, host, port, # X + registry, # X + path, # Y + opaque, # Y + query, + fragment + ] + return ret + end + + def parse(uri) + scheme, userinfo, host, port, + registry, path, opaque, query, fragment = self.split(uri) + + if scheme && URI.scheme_list.include?(scheme.upcase) + URI.scheme_list[scheme.upcase].new(scheme, userinfo, host, port, + registry, path, opaque, query, + fragment, self) + else + Generic.new(scheme, userinfo, host, port, + registry, path, opaque, query, + fragment, self) + end + end + + def join(*str) + u = self.parse(str[0]) + str[1 .. -1].each do |x| + u = u.merge(x) + end + u + end + + def extract(str, schemes = nil, &block) + if block_given? + str.scan(make_regexp(schemes)) { yield $& } + nil + else + result = [] + str.scan(make_regexp(schemes)) { result.push $& } + result + end + end + + def make_regexp(schemes = nil) + unless schemes + @regexp[:ABS_URI_REF] + else + /(?=#{Regexp.union(*schemes)}:)#{@pattern[:X_ABS_URI]}/x + end + end + + def escape(str, unsafe = @regexp[:UNSAFE]) + unless unsafe.kind_of?(Regexp) + # perhaps unsafe is String object + unsafe = Regexp.new("[#{Regexp.quote(unsafe)}]", false) + end + str.gsub(unsafe) do + us = $& + tmp = '' + us.each_byte do |uc| + tmp << sprintf('%%%02X', uc) + end + tmp + end + end + + def unescape(str, escaped = @regexp[:ESCAPED]) + str.gsub(escaped) { [$&[1, 2].hex].pack('U') } + end + + @@to_s = Kernel.instance_method(:to_s) + def inspect + @@to_s.bind(self).call + end + + private + + def initialize_pattern(opts = {}) + ret = {} + ret[:ESCAPED] = escaped = (opts.delete(:ESCAPED) || PATTERN::ESCAPED) + ret[:UNRESERVED] = unreserved = opts.delete(:UNRESERVED) || PATTERN::UNRESERVED + ret[:RESERVED] = reserved = opts.delete(:RESERVED) || PATTERN::RESERVED + ret[:DOMLABEL] = domlabel = opts.delete(:DOMLABEL) || PATTERN::DOMLABEL + ret[:TOPLABEL] = toplabel = opts.delete(:TOPLABEL) || PATTERN::TOPLABEL + ret[:HOSTNAME] = hostname = opts.delete(:HOSTNAME) + + # RFC 2396 (URI Generic Syntax) + # RFC 2732 (IPv6 Literal Addresses in URL's) + # RFC 2373 (IPv6 Addressing Architecture) + + # uric = reserved | unreserved | escaped + ret[:URIC] = uric = "(?:[#{unreserved}#{reserved}]|#{escaped})" + # uric_no_slash = unreserved | escaped | ";" | "?" | ":" | "@" | + # "&" | "=" | "+" | "$" | "," + ret[:URIC_NO_SLASH] = uric_no_slash = "(?:[#{unreserved};?:@&=+$,]|#{escaped})" + # query = *uric + ret[:QUERY] = query = "#{uric}*" + # fragment = *uric + ret[:FRAGMENT] = fragment = "#{uric}*" + + # hostname = *( domainlabel "." ) toplabel [ "." ] + unless hostname + ret[:HOSTNAME] = hostname = "(?:#{domlabel}\\.)*#{toplabel}\\.?" + end + + # RFC 2373, APPENDIX B: + # IPv6address = hexpart [ ":" IPv4address ] + # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT + # hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ] + # hexseq = hex4 *( ":" hex4) + # hex4 = 1*4HEXDIG + # + # XXX: This definition has a flaw. "::" + IPv4address must be + # allowed too. Here is a replacement. + # + # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT + ret[:IPV4ADDR] = ipv4addr = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" + # hex4 = 1*4HEXDIG + hex4 = "[#{PATTERN::HEX}]{1,4}" + # lastpart = hex4 | IPv4address + lastpart = "(?:#{hex4}|#{ipv4addr})" + # hexseq1 = *( hex4 ":" ) hex4 + hexseq1 = "(?:#{hex4}:)*#{hex4}" + # hexseq2 = *( hex4 ":" ) lastpart + hexseq2 = "(?:#{hex4}:)*#{lastpart}" + # IPv6address = hexseq2 | [ hexseq1 ] "::" [ hexseq2 ] + ret[:IPV6ADDR] = ipv6addr = "(?:#{hexseq2}|(?:#{hexseq1})?::(?:#{hexseq2})?)" + + # IPv6prefix = ( hexseq1 | [ hexseq1 ] "::" [ hexseq1 ] ) "/" 1*2DIGIT + # unused + + # ipv6reference = "[" IPv6address "]" (RFC 2732) + ret[:IPV6REF] = ipv6ref = "\\[#{ipv6addr}\\]" + + # host = hostname | IPv4address + # host = hostname | IPv4address | IPv6reference (RFC 2732) + ret[:HOST] = host = "(?:#{hostname}|#{ipv4addr}|#{ipv6ref})" + # port = *digit + port = '\d*' + # hostport = host [ ":" port ] + ret[:HOSTPORT] = hostport = "#{host}(?::#{port})?" + + # userinfo = *( unreserved | escaped | + # ";" | ":" | "&" | "=" | "+" | "$" | "," ) + ret[:USERINFO] = userinfo = "(?:[#{unreserved};:&=+$,]|#{escaped})*" + + # pchar = unreserved | escaped | + # ":" | "@" | "&" | "=" | "+" | "$" | "," + pchar = "(?:[#{unreserved}:@&=+$,]|#{escaped})" + # param = *pchar + param = "#{pchar}*" + # segment = *pchar *( ";" param ) + segment = "#{pchar}*(?:;#{param})*" + # path_segments = segment *( "/" segment ) + ret[:PATH_SEGMENTS] = path_segments = "#{segment}(?:/#{segment})*" + + # server = [ [ userinfo "@" ] hostport ] + server = "(?:#{userinfo}@)?#{hostport}" + # reg_name = 1*( unreserved | escaped | "$" | "," | + # ";" | ":" | "@" | "&" | "=" | "+" ) + ret[:REG_NAME] = reg_name = "(?:[#{unreserved}$,;:@&=+]|#{escaped})+" + # authority = server | reg_name + authority = "(?:#{server}|#{reg_name})" + + # rel_segment = 1*( unreserved | escaped | + # ";" | "@" | "&" | "=" | "+" | "$" | "," ) + ret[:REL_SEGMENT] = rel_segment = "(?:[#{unreserved};@&=+$,]|#{escaped})+" + + # scheme = alpha *( alpha | digit | "+" | "-" | "." ) + ret[:SCHEME] = scheme = "[#{PATTERN::ALPHA}][-+.#{PATTERN::ALPHA}\\d]*" + + # abs_path = "/" path_segments + ret[:ABS_PATH] = abs_path = "/#{path_segments}" + # rel_path = rel_segment [ abs_path ] + ret[:REL_PATH] = rel_path = "#{rel_segment}(?:#{abs_path})?" + # net_path = "//" authority [ abs_path ] + ret[:NET_PATH] = net_path = "//#{authority}(?:#{abs_path})?" + + # hier_part = ( net_path | abs_path ) [ "?" query ] + ret[:HIER_PART] = hier_part = "(?:#{net_path}|#{abs_path})(?:\\?(?:#{query}))?" + # opaque_part = uric_no_slash *uric + ret[:OPAQUE_PART] = opaque_part = "#{uric_no_slash}#{uric}*" + + # absoluteURI = scheme ":" ( hier_part | opaque_part ) + ret[:ABS_URI] = abs_uri = "#{scheme}:(?:#{hier_part}|#{opaque_part})" + # relativeURI = ( net_path | abs_path | rel_path ) [ "?" query ] + ret[:REL_URI] = rel_uri = "(?:#{net_path}|#{abs_path}|#{rel_path})(?:\\?#{query})?" + + # URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + ret[:URI_REF] = uri_ref = "(?:#{abs_uri}|#{rel_uri})?(?:##{fragment})?" + + ret[:X_ABS_URI] = " + (#{scheme}): (?# 1: scheme) + (?: + (#{opaque_part}) (?# 2: opaque) + | + (?:(?: + //(?: + (?:(?:(#{userinfo})@)? (?# 3: userinfo) + (?:(#{host})(?::(\\d*))?))? (?# 4: host, 5: port) + | + (#{reg_name}) (?# 6: registry) + ) + | + (?!//)) (?# XXX: '//' is the mark for hostport) + (#{abs_path})? (?# 7: path) + )(?:\\?(#{query}))? (?# 8: query) + ) + (?:\\#(#{fragment}))? (?# 9: fragment) + " + + ret[:X_REL_URI] = " + (?: + (?: + // + (?: + (?:(#{userinfo})@)? (?# 1: userinfo) + (#{host})?(?::(\\d*))? (?# 2: host, 3: port) + | + (#{reg_name}) (?# 4: registry) + ) + ) + | + (#{rel_segment}) (?# 5: rel_segment) + )? + (#{abs_path})? (?# 6: abs_path) + (?:\\?(#{query}))? (?# 7: query) + (?:\\#(#{fragment}))? (?# 8: fragment) + " + + ret + end + + def initialize_regexp(pattern) + ret = {} + + # for URI::split + ret[:ABS_URI] = Regexp.new('^' + pattern[:X_ABS_URI] + '$', Regexp::EXTENDED) + ret[:REL_URI] = Regexp.new('^' + pattern[:X_REL_URI] + '$', Regexp::EXTENDED) + + # for URI::extract + ret[:URI_REF] = Regexp.new(pattern[:URI_REF]) + ret[:ABS_URI_REF] = Regexp.new(pattern[:X_ABS_URI], Regexp::EXTENDED) + ret[:REL_URI_REF] = Regexp.new(pattern[:X_REL_URI], Regexp::EXTENDED) + + # for URI::escape/unescape + ret[:ESCAPED] = Regexp.new(pattern[:ESCAPED]) + ret[:UNSAFE] = Regexp.new("[^#{pattern[:UNRESERVED]}#{pattern[:RESERVED]}]") + + # for Generic#initialize + ret[:SCHEME] = Regexp.new("^#{pattern[:SCHEME]}$") + ret[:USERINFO] = Regexp.new("^#{pattern[:USERINFO]}$") + ret[:HOST] = Regexp.new("^#{pattern[:HOST]}$") + ret[:PORT] = Regexp.new("^#{pattern[:PORT]}$") + ret[:OPAQUE] = Regexp.new("^#{pattern[:OPAQUE_PART]}$") + ret[:REGISTRY] = Regexp.new("^#{pattern[:REG_NAME]}$") + ret[:ABS_PATH] = Regexp.new("^#{pattern[:ABS_PATH]}$") + ret[:REL_PATH] = Regexp.new("^#{pattern[:REL_PATH]}$") + ret[:QUERY] = Regexp.new("^#{pattern[:QUERY]}$") + ret[:FRAGMENT] = Regexp.new("^#{pattern[:FRAGMENT]}$") + + ret + end + end # class Parser + + DEFAULT_PARSER = Parser.new + DEFAULT_PARSER.pattern.each_pair do |sym, str| + unless REGEXP::PATTERN.const_defined?(sym) + REGEXP::PATTERN.const_set(sym, str) + end + end + DEFAULT_PARSER.regexp.each_pair do |sym, str| + const_set(sym, str) + end + + module Util # :nodoc: + def make_components_hash(klass, array_hash) + tmp = {} + if array_hash.kind_of?(Array) && + array_hash.size == klass.component.size - 1 + klass.component[1..-1].each_index do |i| + begin + tmp[klass.component[i + 1]] = array_hash[i].clone + rescue TypeError + tmp[klass.component[i + 1]] = array_hash[i] + end + end + + elsif array_hash.kind_of?(Hash) + array_hash.each do |key, value| + begin + tmp[key] = value.clone + rescue TypeError + tmp[key] = value + end + end + else + raise ArgumentError, + "expected Array of or Hash of components of #{klass.to_s} (#{klass.component[1..-1].join(', ')})" + end + tmp[:scheme] = klass.to_s.sub(/\A.*::/, '').downcase + + return tmp + end + module_function :make_components_hash + end + + module Escape + # + # == Synopsis + # + # URI.escape(str [, unsafe]) + # + # == Args + # + # +str+:: + # String to replaces in. + # +unsafe+:: + # Regexp that matches all symbols that must be replaced with codes. + # By default uses REGEXP::UNSAFE. + # When this argument is a String, it represents a character set. + # + # == Description + # + # Escapes the string, replacing all unsafe characters with codes. + # + # == Usage + # + # require 'uri' + # + # enc_uri = URI.escape("http://example.com/?a=\11\15") + # p enc_uri + # # => "http://example.com/?a=%09%0D" + # + # p URI.unescape(enc_uri) + # # => "http://example.com/?a=\t\r" + # + # p URI.escape("@?@!", "!?") + # # => "@%3F@%21" + # + def escape(*arg) + DEFAULT_PARSER.escape(*arg) + end + alias encode escape + # + # == Synopsis + # + # URI.unescape(str) + # + # == Args + # + # +str+:: + # Unescapes the string. + # + # == Usage + # + # require 'uri' + # + # enc_uri = URI.escape("http://example.com/?a=\11\15") + # p enc_uri + # # => "http://example.com/?a=%09%0D" + # + # p URI.unescape(enc_uri) + # # => "http://example.com/?a=\t\r" + # + def unescape(*arg) + DEFAULT_PARSER.unescape(*arg) + end + alias decode unescape + end + + extend Escape + include REGEXP + + @@schemes = {} + def self.scheme_list + @@schemes + end + + # + # Base class for all URI exceptions. + # + class Error < StandardError; end + # + # Not a URI. + # + class InvalidURIError < Error; end + # + # Not a URI component. + # + class InvalidComponentError < Error; end + # + # URI is valid, bad usage is not. + # + class BadURIError < Error; end + + # + # == Synopsis + # + # URI::split(uri) + # + # == Args + # + # +uri+:: + # String with URI. + # + # == Description + # + # Splits the string on following parts and returns array with result: + # + # * Scheme + # * Userinfo + # * Host + # * Port + # * Registry + # * Path + # * Opaque + # * Query + # * Fragment + # + # == Usage + # + # require 'uri' + # + # p URI.split("http://www.ruby-lang.org/") + # # => ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil] + # + def self.split(uri) + DEFAULT_PARSER.split(uri) + end + + # + # == Synopsis + # + # URI::parse(uri_str) + # + # == Args + # + # +uri_str+:: + # String with URI. + # + # == Description + # + # Creates one of the URI's subclasses instance from the string. + # + # == Raises + # + # URI::InvalidURIError + # Raised if URI given is not a correct one. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://www.ruby-lang.org/") + # p uri + # # => # + # p uri.scheme + # # => "http" + # p uri.host + # # => "www.ruby-lang.org" + # + def self.parse(uri) + DEFAULT_PARSER.parse(uri) + end + + # + # == Synopsis + # + # URI::join(str[, str, ...]) + # + # == Args + # + # +str+:: + # String(s) to work with + # + # == Description + # + # Joins URIs. + # + # == Usage + # + # require 'uri' + # + # p URI.join("http://localhost/","main.rbx") + # # => # + # + def self.join(*str) + DEFAULT_PARSER.join(*str) + end + + # + # == Synopsis + # + # URI::extract(str[, schemes][,&blk]) + # + # == Args + # + # +str+:: + # String to extract URIs from. + # +schemes+:: + # Limit URI matching to a specific schemes. + # + # == Description + # + # Extracts URIs from a string. If block given, iterates through all matched URIs. + # Returns nil if block given or array with matches. + # + # == Usage + # + # require "uri" + # + # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") + # # => ["http://foo.example.com/bla", "mailto:test@example.com"] + # + def self.extract(str, schemes = nil, &block) + DEFAULT_PARSER.extract(str, schemes, &block) + end + + # + # == Synopsis + # + # URI::regexp([match_schemes]) + # + # == Args + # + # +match_schemes+:: + # Array of schemes. If given, resulting regexp matches to URIs + # whose scheme is one of the match_schemes. + # + # == Description + # Returns a Regexp object which matches to URI-like strings. + # The Regexp object returned by this method includes arbitrary + # number of capture group (parentheses). Never rely on it's number. + # + # == Usage + # + # require 'uri' + # + # # extract first URI from html_string + # html_string.slice(URI.regexp) + # + # # remove ftp URIs + # html_string.sub(URI.regexp(['ftp']) + # + # # You should not rely on the number of parentheses + # html_string.scan(URI.regexp) do |*matches| + # p $& + # end + # + def self.regexp(schemes = nil) + DEFAULT_PARSER.make_regexp(schemes) + end + +end + +module Kernel + # alias for URI.parse. + # + # This method is introduced at 1.8.2. + def URI(uri_str) # :doc: + URI.parse(uri_str) + end + module_function :URI +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/ftp.rb b/lib/ruby-1.9.1-rc1/lib/uri/ftp.rb new file mode 100644 index 0000000..6428634 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/ftp.rb @@ -0,0 +1,198 @@ +# +# = uri/ftp.rb +# +# Author:: Akira Yamada +# License:: You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: ftp.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# + +require 'uri/generic' + +module URI + + # + # FTP URI syntax is defined by RFC1738 section 3.2. + # + class FTP < Generic + DEFAULT_PORT = 21 + + COMPONENT = [ + :scheme, + :userinfo, :host, :port, + :path, :typecode + ].freeze + # + # Typecode is "a", "i" or "d". + # + # * "a" indicates a text file (the FTP command was ASCII) + # * "i" indicates a binary file (FTP command IMAGE) + # * "d" indicates the contents of a directory should be displayed + # + TYPECODE = ['a', 'i', 'd'].freeze + TYPECODE_PREFIX = ';type='.freeze + + def self.new2(user, password, host, port, path, + typecode = nil, arg_check = true) + typecode = nil if typecode.size == 0 + if typecode && !TYPECODE.include?(typecode) + raise ArgumentError, + "bad typecode is specified: #{typecode}" + end + + # do escape + + self.new('ftp', + [user, password], + host, port, nil, + typecode ? path + TYPECODE_PREFIX + typecode : path, + nil, nil, nil, arg_check) + end + + # + # == Description + # + # Creates a new URI::FTP object from components, with syntax checking. + # + # The components accepted are +userinfo+, +host+, +port+, +path+ and + # +typecode+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the order + # [userinfo, host, port, path, typecode] + # + # If the path supplied is absolute, it will be escaped in order to + # make it absolute in the URI. Examples: + # + # require 'uri' + # + # uri = URI::FTP.build(['user:password', 'ftp.example.com', nil, + # '/path/file.> zip', 'i']) + # puts uri.to_s -> ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=a + # + # uri2 = URI::FTP.build({:host => 'ftp.example.com', + # :path => 'ruby/src'}) + # puts uri2.to_s -> ftp://ftp.example.com/ruby/src + # + def self.build(args) + + # Fix the incoming path to be generic URL syntax + # FTP path -> URL path + # foo/bar /foo/bar + # /foo/bar /%2Ffoo/bar + # + if args.kind_of?(Array) + args[3] = '/' + args[3].sub(/^\//, '%2F') + else + args[:path] = '/' + args[:path].sub(/^\//, '%2F') + end + + tmp = Util::make_components_hash(self, args) + + if tmp[:typecode] + if tmp[:typecode].size == 1 + tmp[:typecode] = TYPECODE_PREFIX + tmp[:typecode] + end + tmp[:path] << tmp[:typecode] + end + + return super(tmp) + end + + # + # == Description + # + # Creates a new URI::FTP object from generic URL components with no + # syntax checking. + # + # Unlike build(), this method does not escape the path component as + # required by RFC1738; instead it is treated as per RFC2396. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+ and +fragment+, in that order. + # + def initialize(*arg) + super(*arg) + @typecode = nil + tmp = @path.index(TYPECODE_PREFIX) + if tmp + typecode = @path[tmp + TYPECODE_PREFIX.size..-1] + self.set_path(@path[0..tmp - 1]) + + if arg[-1] + self.typecode = typecode + else + self.set_typecode(typecode) + end + end + end + attr_reader :typecode + + def check_typecode(v) + if TYPECODE.include?(v) + return true + else + raise InvalidComponentError, + "bad typecode(expected #{TYPECODE.join(', ')}): #{v}" + end + end + private :check_typecode + + def set_typecode(v) + @typecode = v + end + protected :set_typecode + + def typecode=(typecode) + check_typecode(typecode) + set_typecode(typecode) + typecode + end + + def merge(oth) # :nodoc: + tmp = super(oth) + if self != tmp + tmp.set_typecode(oth.typecode) + end + + return tmp + end + + # Returns the path from an FTP URI. + # + # RFC 1738 specifically states that the path for an FTP URI does not + # include the / which separates the URI path from the URI host. Example: + # + # ftp://ftp.example.com/pub/ruby + # + # The above URI indicates that the client should connect to + # ftp.example.com then cd pub/ruby from the initial login directory. + # + # If you want to cd to an absolute directory, you must include an + # escaped / (%2F) in the path. Example: + # + # ftp://ftp.example.com/%2Fpub/ruby + # + # This method will then return "/pub/ruby" + # + def path + return @path.sub(/^\//,'').sub(/^%2F/,'/') + end + + def to_s + save_path = nil + if @typecode + save_path = @path + @path = @path + TYPECODE_PREFIX + @typecode + end + str = super + if @typecode + @path = save_path + end + + return str + end + end + @@schemes['FTP'] = FTP +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/generic.rb b/lib/ruby-1.9.1-rc1/lib/uri/generic.rb new file mode 100644 index 0000000..004a23c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/generic.rb @@ -0,0 +1,1128 @@ +# +# = uri/generic.rb +# +# Author:: Akira Yamada +# License:: You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: generic.rb 20258 2008-11-18 16:46:16Z yugui $ +# + +require 'uri/common' + +module URI + + # + # Base class for all URI classes. + # Implements generic URI syntax as per RFC 2396. + # + class Generic + include URI + + DEFAULT_PORT = nil + + # + # Returns default port + # + def self.default_port + self::DEFAULT_PORT + end + + def default_port + self.class.default_port + end + + COMPONENT = [ + :scheme, + :userinfo, :host, :port, :registry, + :path, :opaque, + :query, + :fragment + ].freeze + + # + # Components of the URI in the order. + # + def self.component + self::COMPONENT + end + + USE_REGISTRY = false + + # + # DOC: FIXME! + # + def self.use_registry + self::USE_REGISTRY + end + + # + # == Synopsis + # + # See #new + # + # == Description + # + # At first, tries to create a new URI::Generic instance using + # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, + # then it URI::Escape.escape all URI components and tries again. + # + # + def self.build2(args) + begin + return self.build(args) + rescue InvalidComponentError + if args.kind_of?(Array) + return self.build(args.collect{|x| + if x + @parser.escape(x) + else + x + end + }) + elsif args.kind_of?(Hash) + tmp = {} + args.each do |key, value| + tmp[key] = if value + @parser.escape(value) + else + value + end + end + return self.build(tmp) + end + end + end + + # + # == Synopsis + # + # See #new + # + # == Description + # + # Creates a new URI::Generic instance from components of URI::Generic + # with check. Components are: scheme, userinfo, host, port, registry, path, + # opaque, query and fragment. You can provide arguments either by an Array or a Hash. + # See #new for hash keys to use or for order of array items. + # + def self.build(args) + if args.kind_of?(Array) && + args.size == ::URI::Generic::COMPONENT.size + tmp = args + elsif args.kind_of?(Hash) + tmp = ::URI::Generic::COMPONENT.collect do |c| + if args.include?(c) + args[c] + else + nil + end + end + else + raise ArgumentError, + "expected Array of or Hash of components of #{self.class} (#{self.class.component.join(', ')})" + end + + tmp << DEFAULT_PARSER + tmp << true + return self.new(*tmp) + end + # + # == Args + # + # +scheme+:: + # Protocol scheme, i.e. 'http','ftp','mailto' and so on. + # +userinfo+:: + # User name and password, i.e. 'sdmitry:bla' + # +host+:: + # Server host name + # +port+:: + # Server port + # +registry+:: + # DOC: FIXME! + # +path+:: + # Path on server + # +opaque+:: + # DOC: FIXME! + # +query+:: + # Query data + # +fragment+:: + # A part of URI after '#' sign + # +parser+:: + # Parser for internal use [URI::DEFAULT_PARSER by default] + # +arg_check+:: + # Check arguments [false by default] + # + # == Description + # + # Creates a new URI::Generic instance from ``generic'' components without check. + # + def initialize(scheme, + userinfo, host, port, registry, + path, opaque, + query, + fragment, + parser = DEFAULT_PARSER, + arg_check = false) + @scheme = nil + @user = nil + @password = nil + @host = nil + @port = nil + @path = nil + @query = nil + @opaque = nil + @registry = nil + @fragment = nil + @parser = parser + + if arg_check + self.scheme = scheme + self.userinfo = userinfo + self.host = host + self.port = port + self.path = path + self.query = query + self.opaque = opaque + self.registry = registry + self.fragment = fragment + else + self.set_scheme(scheme) + self.set_userinfo(userinfo) + self.set_host(host) + self.set_port(port) + self.set_path(path) + self.set_query(query) + self.set_opaque(opaque) + self.set_registry(registry) + self.set_fragment(fragment) + end + if @registry && !self.class.use_registry + raise InvalidURIError, + "the scheme #{@scheme} does not accept registry part: #{@registry} (or bad hostname?)" + end + + @scheme.freeze if @scheme + self.set_path('') if !@path && !@opaque # (see RFC2396 Section 5.2) + self.set_port(self.default_port) if self.default_port && !@port + end + attr_reader :scheme + attr_reader :host + attr_reader :port + attr_reader :registry + attr_reader :path + attr_reader :query + attr_reader :opaque + attr_reader :fragment + attr_reader :parser + + # replace self by other URI object + def replace!(oth) + if self.class != oth.class + raise ArgumentError, "expected #{self.class} object" + end + + component.each do |c| + self.__send__("#{c}=", oth.__send__(c)) + end + end + private :replace! + + def component + self.class.component + end + + def check_scheme(v) + if v && @parser.regexp[:SCHEME] !~ v + raise InvalidComponentError, + "bad component(expected scheme component): #{v}" + end + + return true + end + private :check_scheme + + def set_scheme(v) + @scheme = v + end + protected :set_scheme + + def scheme=(v) + check_scheme(v) + set_scheme(v) + v + end + + def check_userinfo(user, password = nil) + if !password + user, password = split_userinfo(user) + end + check_user(user) + check_password(password, user) + + return true + end + private :check_userinfo + + def check_user(v) + if @registry || @opaque + raise InvalidURIError, + "can not set user with registry or opaque" + end + + return v unless v + + if @parser.regexp[:USERINFO] !~ v + raise InvalidComponentError, + "bad component(expected userinfo component or user component): #{v}" + end + + return true + end + private :check_user + + def check_password(v, user = @user) + if @registry || @opaque + raise InvalidURIError, + "can not set password with registry or opaque" + end + return v unless v + + if !user + raise InvalidURIError, + "password component depends user component" + end + + if @parser.regexp[:USERINFO] !~ v + raise InvalidComponentError, + "bad component(expected user component): #{v}" + end + + return true + end + private :check_password + + # + # Sets userinfo, argument is string like 'name:pass' + # + def userinfo=(userinfo) + if userinfo.nil? + return nil + end + check_userinfo(*userinfo) + set_userinfo(*userinfo) + # returns userinfo + end + + def user=(user) + check_user(user) + set_user(user) + # returns user + end + + def password=(password) + check_password(password) + set_password(password) + # returns password + end + + def set_userinfo(user, password = nil) + unless password + user, password = split_userinfo(user) + end + @user = user + @password = password if password + + [@user, @password] + end + protected :set_userinfo + + def set_user(v) + set_userinfo(v, @password) + v + end + protected :set_user + + def set_password(v) + @password = v + # returns v + end + protected :set_password + + def split_userinfo(ui) + return nil, nil unless ui + user, password = ui.split(/:/, 2) + + return user, password + end + private :split_userinfo + + def escape_userpass(v) + v = @parser.escape(v, /[@:\/]/o) # RFC 1738 section 3.1 #/ + end + private :escape_userpass + + def userinfo + if @user.nil? + nil + elsif @password.nil? + @user + else + @user + ':' + @password + end + end + + def user + @user + end + + def password + @password + end + + def check_host(v) + return v unless v + + if @registry || @opaque + raise InvalidURIError, + "can not set host with registry or opaque" + elsif @parser.regexp[:HOST] !~ v + raise InvalidComponentError, + "bad component(expected host component): #{v}" + end + + return true + end + private :check_host + + def set_host(v) + @host = v + end + protected :set_host + + def host=(v) + check_host(v) + set_host(v) + v + end + + def check_port(v) + return v unless v + + if @registry || @opaque + raise InvalidURIError, + "can not set port with registry or opaque" + elsif !v.kind_of?(Fixnum) && @parser.regexp[:PORT] !~ v + raise InvalidComponentError, + "bad component(expected port component): #{v}" + end + + return true + end + private :check_port + + def set_port(v) + unless !v || v.kind_of?(Fixnum) + if v.empty? + v = nil + else + v = v.to_i + end + end + @port = v + end + protected :set_port + + def port=(v) + check_port(v) + set_port(v) + port + end + + def check_registry(v) + return v unless v + + # raise if both server and registry are not nil, because: + # authority = server | reg_name + # server = [ [ userinfo "@" ] hostport ] + if @host || @port || @user # userinfo = @user + ':' + @password + raise InvalidURIError, + "can not set registry with host, port, or userinfo" + elsif v && @parser.regexp[:REGISTRY] !~ v + raise InvalidComponentError, + "bad component(expected registry component): #{v}" + end + + return true + end + private :check_registry + + def set_registry(v) + @registry = v + end + protected :set_registry + + def registry=(v) + check_registry(v) + set_registry(v) + v + end + + def check_path(v) + # raise if both hier and opaque are not nil, because: + # absoluteURI = scheme ":" ( hier_part | opaque_part ) + # hier_part = ( net_path | abs_path ) [ "?" query ] + if v && @opaque + raise InvalidURIError, + "path conflicts with opaque" + end + + if @scheme + if v && v != '' && @parser.regexp[:ABS_PATH] !~ v + raise InvalidComponentError, + "bad component(expected absolute path component): #{v}" + end + else + if v && v != '' && @parser.regexp[:ABS_PATH] !~ v && @parser.regexp[:REL_PATH] !~ v + raise InvalidComponentError, + "bad component(expected relative path component): #{v}" + end + end + + return true + end + private :check_path + + def set_path(v) + @path = v + end + protected :set_path + + def path=(v) + check_path(v) + set_path(v) + v + end + + def check_query(v) + return v unless v + + # raise if both hier and opaque are not nil, because: + # absoluteURI = scheme ":" ( hier_part | opaque_part ) + # hier_part = ( net_path | abs_path ) [ "?" query ] + if @opaque + raise InvalidURIError, + "query conflicts with opaque" + end + + if v && v != '' && @parser.regexp[:QUERY] !~ v + raise InvalidComponentError, + "bad component(expected query component): #{v}" + end + + return true + end + private :check_query + + def set_query(v) + @query = v + end + protected :set_query + + def query=(v) + check_query(v) + set_query(v) + v + end + + def check_opaque(v) + return v unless v + + # raise if both hier and opaque are not nil, because: + # absoluteURI = scheme ":" ( hier_part | opaque_part ) + # hier_part = ( net_path | abs_path ) [ "?" query ] + if @host || @port || @user || @path # userinfo = @user + ':' + @password + raise InvalidURIError, + "can not set opaque with host, port, userinfo or path" + elsif v && @parser.regexp[:OPAQUE] !~ v + raise InvalidComponentError, + "bad component(expected opaque component): #{v}" + end + + return true + end + private :check_opaque + + def set_opaque(v) + @opaque = v + end + protected :set_opaque + + def opaque=(v) + check_opaque(v) + set_opaque(v) + v + end + + def check_fragment(v) + return v unless v + + if v && v != '' && @parser.regexp[:FRAGMENT] !~ v + raise InvalidComponentError, + "bad component(expected fragment component): #{v}" + end + + return true + end + private :check_fragment + + def set_fragment(v) + @fragment = v + end + protected :set_fragment + + def fragment=(v) + check_fragment(v) + set_fragment(v) + v + end + + # + # Checks if URI has a path + # + def hierarchical? + if @path + true + else + false + end + end + + # + # Checks if URI is an absolute one + # + def absolute? + if @scheme + true + else + false + end + end + alias absolute absolute? + + # + # Checks if URI is relative + # + def relative? + !absolute? + end + + def split_path(path) + path.split(%r{/+}, -1) + end + private :split_path + + def merge_path(base, rel) + + # RFC2396, Section 5.2, 5) + # RFC2396, Section 5.2, 6) + base_path = split_path(base) + rel_path = split_path(rel) + + # RFC2396, Section 5.2, 6), a) + base_path << '' if base_path.last == '..' + while i = base_path.index('..') + base_path.slice!(i - 1, 2) + end + + if (first = rel_path.first) and first.empty? + base_path.clear + rel_path.shift + end + + # RFC2396, Section 5.2, 6), c) + # RFC2396, Section 5.2, 6), d) + rel_path.push('') if rel_path.last == '.' || rel_path.last == '..' + rel_path.delete('.') + + # RFC2396, Section 5.2, 6), e) + tmp = [] + rel_path.each do |x| + if x == '..' && + !(tmp.empty? || tmp.last == '..') + tmp.pop + else + tmp << x + end + end + + add_trailer_slash = !tmp.empty? + if base_path.empty? + base_path = [''] # keep '/' for root directory + elsif add_trailer_slash + base_path.pop + end + while x = tmp.shift + if x == '..' + # RFC2396, Section 4 + # a .. or . in an absolute path has no special meaning + base_path.pop if base_path.size > 1 + else + # if x == '..' + # valid absolute (but abnormal) path "/../..." + # else + # valid absolute path + # end + base_path << x + tmp.each {|t| base_path << t} + add_trailer_slash = false + break + end + end + base_path.push('') if add_trailer_slash + + return base_path.join('/') + end + private :merge_path + + # + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Destructive form of #merge + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge!("/main.rbx?page=1") + # p uri + # # => # + # + def merge!(oth) + t = merge(oth) + if self == t + nil + else + replace!(t) + self + end + end + + # + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URI's. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # p uri.merge("/main.rbx?page=1") + # # => # + # + def merge(oth) + begin + base, rel = merge0(oth) + rescue + raise $!.class, $!.message + end + + if base == rel + return base + end + + authority = rel.userinfo || rel.host || rel.port + + # RFC2396, Section 5.2, 2) + if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query + base.set_fragment(rel.fragment) if rel.fragment + return base + end + + base.set_query(nil) + base.set_fragment(nil) + + # RFC2396, Section 5.2, 4) + if !authority + base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path + else + # RFC2396, Section 5.2, 4) + base.set_path(rel.path) if rel.path + end + + # RFC2396, Section 5.2, 7) + base.set_userinfo(rel.userinfo) if rel.userinfo + base.set_host(rel.host) if rel.host + base.set_port(rel.port) if rel.port + base.set_query(rel.query) if rel.query + base.set_fragment(rel.fragment) if rel.fragment + + return base + end # merge + alias + merge + + # return base and rel. + # you can modify `base', but can not `rel'. + def merge0(oth) + case oth + when Generic + when String + oth = @parser.parse(oth) + else + raise ArgumentError, + "bad argument(expected URI object or URI string)" + end + + if self.relative? && oth.relative? + raise BadURIError, + "both URI are relative" + end + + if self.absolute? && oth.absolute? + #raise BadURIError, + # "both URI are absolute" + # hmm... should return oth for usability? + return oth, oth + end + + if self.absolute? + return self.dup, oth + else + return oth, oth + end + end + private :merge0 + + def route_from_path(src, dst) + # RFC2396, Section 4.2 + return '' if src == dst + + src_path = split_path(src) + dst_path = split_path(dst) + + # hmm... dst has abnormal absolute path, + # like "/./", "/../", "/x/../", ... + if dst_path.include?('..') || + dst_path.include?('.') + return dst.dup + end + + src_path.pop + + # discard same parts + while dst_path.first == src_path.first + break if dst_path.empty? + + src_path.shift + dst_path.shift + end + + tmp = dst_path.join('/') + + # calculate + if src_path.empty? + if tmp.empty? + return './' + elsif dst_path.first.include?(':') # (see RFC2396 Section 5) + return './' + tmp + else + return tmp + end + end + + return '../' * src_path.size + tmp + end + private :route_from_path + + def route_from0(oth) + case oth + when Generic + when String + oth = @parser.parse(oth) + else + raise ArgumentError, + "bad argument(expected URI object or URI string)" + end + + if self.relative? + raise BadURIError, + "relative URI: #{self}" + end + if oth.relative? + raise BadURIError, + "relative URI: #{oth}" + end + + if self.scheme != oth.scheme + return self, self.dup + end + rel = URI::Generic.new(nil, # it is relative URI + self.userinfo, self.host, self.port, + self.registry, self.path, self.opaque, + self.query, self.fragment, @parser) + + if rel.userinfo != oth.userinfo || + rel.host.to_s.downcase != oth.host.to_s.downcase || + rel.port != oth.port + if self.userinfo.nil? && self.host.nil? + return self, self.dup + end + rel.set_port(nil) if rel.port == oth.default_port + return rel, rel + end + rel.set_userinfo(nil) + rel.set_host(nil) + rel.set_port(nil) + + if rel.path && rel.path == oth.path + rel.set_path('') + rel.set_query(nil) if rel.query == oth.query + return rel, rel + elsif rel.opaque && rel.opaque == oth.opaque + rel.set_opaque('') + rel.set_query(nil) if rel.query == oth.query + return rel, rel + end + + # you can modify `rel', but can not `oth'. + return oth, rel + end + private :route_from0 + # + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # p uri.route_from('http://my.example.com') + # #=> # + # + def route_from(oth) + # you can modify `rel', but can not `oth'. + begin + oth, rel = route_from0(oth) + rescue + raise $!.class, $!.message + end + if oth == rel + return rel + end + + rel.set_path(route_from_path(oth.path, self.path)) + if rel.path == './' && self.query + # "./?foo" -> "?foo" + rel.set_path('') + end + + return rel + end + + alias - route_from + + # + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path to oth from self + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com') + # p uri.route_to('http://my.example.com/main.rbx?page=1') + # #=> # + # + def route_to(oth) + case oth + when Generic + when String + oth = @parser.parse(oth) + else + raise ArgumentError, + "bad argument(expected URI object or URI string)" + end + + oth.route_from(self) + end + + # + # Returns normalized URI + # + def normalize + uri = dup + uri.normalize! + uri + end + + # + # Destructive version of #normalize + # + def normalize! + if path && path == '' + set_path('/') + end + if host && host != host.downcase + set_host(self.host.downcase) + end + end + + def path_query + str = @path + if @query + str += '?' + @query + end + str + end + private :path_query + + # + # Constructs String from URI + # + def to_s + str = '' + if @scheme + str << @scheme + str << ':' + end + + if @opaque + str << @opaque + + else + if @registry + str << @registry + else + if @host + str << '//' + end + if self.userinfo + str << self.userinfo + str << '@' + end + if @host + str << @host + end + if @port && @port != self.default_port + str << ':' + str << @port.to_s + end + end + + str << path_query + end + + if @fragment + str << '#' + str << @fragment + end + + str + end + + # + # Compares to URI's + # + def ==(oth) + if self.class == oth.class + self.normalize.component_ary == oth.normalize.component_ary + else + false + end + end + + def hash + self.component_ary.hash + end + + def eql?(oth) + @parser == oth.parser && + self.component_ary.eql?(oth.component_ary) + end + +=begin + +--- URI::Generic#===(oth) + +=end +# def ===(oth) +# raise NotImplementedError +# end + +=begin +=end + def component_ary + component.collect do |x| + self.send(x) + end + end + protected :component_ary + + # == Args + # + # +components+:: + # Multiple Symbol arguments defined in URI::HTTP + # + # == Description + # + # Selects specified components from URI + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') + # p uri.select(:userinfo, :host, :path) + # # => ["myuser:mypass", "my.example.com", "/test.rbx"] + # + def select(*components) + components.collect do |c| + if component.include?(c) + self.send(c) + else + raise ArgumentError, + "expected of components of #{self.class} (#{self.class.component.join(', ')})" + end + end + end + + @@to_s = Kernel.instance_method(:to_s) + def inspect + @@to_s.bind(self).call.sub!(/>\z/) {" URL:#{self}>"} + end + + def coerce(oth) + case oth + when String + oth = @parser.parse(oth) + else + super + end + + return oth, self + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/http.rb b/lib/ruby-1.9.1-rc1/lib/uri/http.rb new file mode 100644 index 0000000..e1aa06d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/http.rb @@ -0,0 +1,100 @@ +# +# = uri/http.rb +# +# Author:: Akira Yamada +# License:: You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: http.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# + +require 'uri/generic' + +module URI + + # + # The syntax of HTTP URIs is defined in RFC1738 section 3.3. + # + # Note that the Ruby URI library allows HTTP URLs containing usernames and + # passwords. This is not legal as per the RFC, but used to be + # supported in Internet Explorer 5 and 6, before the MS04-004 security + # update. See . + # + class HTTP < Generic + DEFAULT_PORT = 80 + + COMPONENT = [ + :scheme, + :userinfo, :host, :port, + :path, + :query, + :fragment + ].freeze + + # + # == Description + # + # Create a new URI::HTTP object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, query and + # fragment. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the order + # [userinfo, host, port, path, query, fragment]. + # + # Example: + # + # newuri = URI::HTTP.build({:host => 'www.example.com', + # :path> => '/foo/bar'}) + # + # newuri = URI::HTTP.build([nil, "www.example.com", nil, "/path", + # "query", 'fragment']) + # + # Currently, if passed userinfo components this method generates + # invalid HTTP URIs as per RFC 1738. + # + def self.build(args) + tmp = Util::make_components_hash(self, args) + return super(tmp) + end + + # + # == Description + # + # Create a new URI::HTTP object from generic URI components as per + # RFC 2396. No HTTP-specific syntax checking (as per RFC 1738) is + # performed. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+ and +fragment+, in that order. + # + # Example: + # + # uri = URI::HTTP.new(['http', nil, "www.example.com", nil, "/path", + # "query", 'fragment']) + # + def initialize(*arg) + super(*arg) + end + + # + # == Description + # + # Returns the full path for an HTTP request, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + def request_uri + r = path_query + if r[0] != ?/ + r = '/' + r + end + + r + end + end + + @@schemes['HTTP'] = HTTP +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/https.rb b/lib/ruby-1.9.1-rc1/lib/uri/https.rb new file mode 100644 index 0000000..c8e9e35 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/https.rb @@ -0,0 +1,20 @@ +# +# = uri/https.rb +# +# Author:: Akira Yamada +# License:: You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: https.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# + +require 'uri/http' + +module URI + + # The default port for HTTPS URIs is 443, and the scheme is 'https:' rather + # than 'http:'. Other than that, HTTPS URIs are identical to HTTP URIs; + # see URI::HTTP. + class HTTPS < HTTP + DEFAULT_PORT = 443 + end + @@schemes['HTTPS'] = HTTPS +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/ldap.rb b/lib/ruby-1.9.1-rc1/lib/uri/ldap.rb new file mode 100644 index 0000000..7c14ff8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/ldap.rb @@ -0,0 +1,190 @@ +# +# = uri/ldap.rb +# +# Author:: +# Takaaki Tateishi +# Akira Yamada +# License:: +# URI::LDAP is copyrighted free software by Takaaki Tateishi and Akira Yamada. +# You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: ldap.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# + +require 'uri/generic' + +module URI + + # + # LDAP URI SCHEMA (described in RFC2255) + # ldap:///[?[?[?[?]]]] + # + class LDAP < Generic + + DEFAULT_PORT = 389 + + COMPONENT = [ + :scheme, + :host, :port, + :dn, + :attributes, + :scope, + :filter, + :extensions, + ].freeze + + SCOPE = [ + SCOPE_ONE = 'one', + SCOPE_SUB = 'sub', + SCOPE_BASE = 'base', + ].freeze + + def self.build(args) + tmp = Util::make_components_hash(self, args) + + if tmp[:dn] + tmp[:path] = tmp[:dn] + end + + query = [] + [:extensions, :filter, :scope, :attributes].collect do |x| + next if !tmp[x] && query.size == 0 + query.unshift(tmp[x]) + end + + tmp[:query] = query.join('?') + + return super(tmp) + end + + def initialize(*arg) + super(*arg) + + if @fragment + raise InvalidURIError, 'bad LDAP URL' + end + + parse_dn + parse_query + end + + def parse_dn + @dn = @path[1..-1] + end + private :parse_dn + + def parse_query + @attributes = nil + @scope = nil + @filter = nil + @extensions = nil + + if @query + attrs, scope, filter, extensions = @query.split('?') + + @attributes = attrs if attrs && attrs.size > 0 + @scope = scope if scope && scope.size > 0 + @filter = filter if filter && filter.size > 0 + @extensions = extensions if extensions && extensions.size > 0 + end + end + private :parse_query + + def build_path_query + @path = '/' + @dn + + query = [] + [@extensions, @filter, @scope, @attributes].each do |x| + next if !x && query.size == 0 + query.unshift(x) + end + @query = query.join('?') + end + private :build_path_query + + def dn + @dn + end + + def set_dn(val) + @dn = val + build_path_query + @dn + end + protected :set_dn + + def dn=(val) + set_dn(val) + val + end + + def attributes + @attributes + end + + def set_attributes(val) + @attributes = val + build_path_query + @attributes + end + protected :set_attributes + + def attributes=(val) + set_attributes(val) + val + end + + def scope + @scope + end + + def set_scope(val) + @scope = val + build_path_query + @scope + end + protected :set_scope + + def scope=(val) + set_scope(val) + val + end + + def filter + @filter + end + + def set_filter(val) + @filter = val + build_path_query + @filter + end + protected :set_filter + + def filter=(val) + set_filter(val) + val + end + + def extensions + @extensions + end + + def set_extensions(val) + @extensions = val + build_path_query + @extensions + end + protected :set_extensions + + def extensions=(val) + set_extensions(val) + val + end + + def hierarchical? + false + end + end + + @@schemes['LDAP'] = LDAP +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/ldaps.rb b/lib/ruby-1.9.1-rc1/lib/uri/ldaps.rb new file mode 100644 index 0000000..6da3331 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/ldaps.rb @@ -0,0 +1,12 @@ +require 'uri/ldap' + +module URI + + # The default port for LDAPS URIs is 636, and the scheme is 'ldaps:' rather + # than 'ldap:'. Other than that, LDAPS URIs are identical to LDAP URIs; + # see URI::LDAP. + class LDAPS < LDAP + DEFAULT_PORT = 636 + end + @@schemes['LDAPS'] = LDAPS +end diff --git a/lib/ruby-1.9.1-rc1/lib/uri/mailto.rb b/lib/ruby-1.9.1-rc1/lib/uri/mailto.rb new file mode 100644 index 0000000..ed3d77e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/uri/mailto.rb @@ -0,0 +1,266 @@ +# +# = uri/mailto.rb +# +# Author:: Akira Yamada +# License:: You can redistribute it and/or modify it under the same term as Ruby. +# Revision:: $Id: mailto.rb 19495 2008-09-23 18:16:08Z drbrain $ +# + +require 'uri/generic' + +module URI + + # + # RFC2368, The mailto URL scheme + # + class MailTo < Generic + include REGEXP + + DEFAULT_PORT = nil + + COMPONENT = [ :scheme, :to, :headers ].freeze + + # :stopdoc: + # "hname" and "hvalue" are encodings of an RFC 822 header name and + # value, respectively. As with "to", all URL reserved characters must + # be encoded. + # + # "#mailbox" is as specified in RFC 822 [RFC822]. This means that it + # consists of zero or more comma-separated mail addresses, possibly + # including "phrase" and "comment" components. Note that all URL + # reserved characters in "to" must be encoded: in particular, + # parentheses, commas, and the percent sign ("%"), which commonly occur + # in the "mailbox" syntax. + # + # Within mailto URLs, the characters "?", "=", "&" are reserved. + + # hname = *urlc + # hvalue = *urlc + # header = hname "=" hvalue + HEADER_PATTERN = "(?:[^?=&]*=[^?=&]*)".freeze + HEADER_REGEXP = Regexp.new(HEADER_PATTERN, 'N').freeze + # headers = "?" header *( "&" header ) + # to = #mailbox + # mailtoURL = "mailto:" [ to ] [ headers ] + MAILBOX_PATTERN = "(?:#{PATTERN::ESCAPED}|[^(),%?=&])".freeze + MAILTO_REGEXP = Regexp.new(" # :nodoc: + \\A + (#{MAILBOX_PATTERN}*?) (?# 1: to) + (?: + \\? + (#{HEADER_PATTERN}(?:\\&#{HEADER_PATTERN})*) (?# 2: headers) + )? + (?: + \\# + (#{PATTERN::FRAGMENT}) (?# 3: fragment) + )? + \\z + ", Regexp::EXTENDED).freeze + # :startdoc: + + # + # == Description + # + # Creates a new URI::MailTo object from components, with syntax checking. + # + # Components can be provided as an Array or Hash. If an Array is used, + # the components must be supplied as [to, headers]. + # + # If a Hash is used, the keys are the component names preceded by colons. + # + # The headers can be supplied as a pre-encoded string, such as + # "subject=subscribe&cc=address", or as an Array of Arrays like + # [['subject', 'subscribe'], ['cc', 'address']] + # + # Examples: + # + # require 'uri' + # + # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) + # puts m1.to_s -> mailto:joe@example.com?subject=Ruby + # + # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) + # puts m2.to_s -> mailto:john@example.com?Subject=Ruby&Cc=jack@example.com + # + # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) + # puts m3.to_s -> mailto:listman@example.com?subject=subscribe + # + def self.build(args) + tmp = Util::make_components_hash(self, args) + + if tmp[:to] + tmp[:opaque] = tmp[:to] + else + tmp[:opaque] = '' + end + + if tmp[:headers] + tmp[:opaque] << '?' + + if tmp[:headers].kind_of?(Array) + tmp[:opaque] << tmp[:headers].collect { |x| + if x.kind_of?(Array) + x[0] + '=' + x[1..-1].to_s + else + x.to_s + end + }.join('&') + + elsif tmp[:headers].kind_of?(Hash) + tmp[:opaque] << tmp[:headers].collect { |h,v| + h + '=' + v + }.join('&') + + else + tmp[:opaque] << tmp[:headers].to_s + end + end + + return super(tmp) + end + + # + # == Description + # + # Creates a new URI::MailTo object from generic URL components with + # no syntax checking. + # + # This method is usually called from URI::parse, which checks + # the validity of each component. + # + def initialize(*arg) + super(*arg) + + @to = nil + @headers = [] + + if MAILTO_REGEXP =~ @opaque + if arg[-1] + self.to = $1 + self.headers = $2 + else + set_to($1) + set_headers($2) + end + + else + raise InvalidComponentError, + "unrecognised opaque part for mailtoURL: #{@opaque}" + end + end + + # The primary e-mail address of the URL, as a String + attr_reader :to + + # E-mail headers set by the URL, as an Array of Arrays + attr_reader :headers + + def check_to(v) + return true unless v + return true if v.size == 0 + + if @parser.regexp[:OPAQUE] !~ v || /\A#{MAILBOX_PATTERN}*\z/o !~ v + raise InvalidComponentError, + "bad component(expected opaque component): #{v}" + end + + return true + end + private :check_to + + def set_to(v) + @to = v + end + protected :set_to + + def to=(v) + check_to(v) + set_to(v) + v + end + + def check_headers(v) + return true unless v + return true if v.size == 0 + + if @parser.regexp[:OPAQUE] !~ v || + /\A(#{HEADER_PATTERN}(?:\&#{HEADER_PATTERN})*)\z/o !~ v + raise InvalidComponentError, + "bad component(expected opaque component): #{v}" + end + + return true + end + private :check_headers + + def set_headers(v) + @headers = [] + if v + v.scan(HEADER_REGEXP) do |x| + @headers << x.split(/=/o, 2) + end + end + end + protected :set_headers + + def headers=(v) + check_headers(v) + set_headers(v) + v + end + + def to_s + @scheme + ':' + + if @to + @to + else + '' + end + + if @headers.size > 0 + '?' + @headers.collect{|x| x.join('=')}.join('&') + else + '' + end + + if @fragment + '#' + @fragment + else + '' + end + end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + def to_mailtext + to = @parser.unescape(@to) + head = '' + body = '' + @headers.each do |x| + case x[0] + when 'body' + body = @parser.unescape(x[1]) + when 'to' + to << ', ' + @parser.unescape(x[1]) + else + head << @parser.unescape(x[0]).capitalize + ': ' + + @parser.unescape(x[1]) + "\n" + end + end + + return "To: #{to} +#{head} +#{body} +" + end + alias to_rfc822text to_mailtext + end + + @@schemes['MAILTO'] = MailTo +end diff --git a/lib/ruby-1.9.1-rc1/lib/weakref.rb b/lib/ruby-1.9.1-rc1/lib/weakref.rb new file mode 100644 index 0000000..ba39242 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/weakref.rb @@ -0,0 +1,80 @@ +# Weak Reference class that does not bother GCing. +# +# Usage: +# foo = Object.new +# foo = Object.new +# p foo.to_s # original's class +# foo = WeakRef.new(foo) +# p foo.to_s # should be same class +# ObjectSpace.garbage_collect +# p foo.to_s # should raise exception (recycled) + +require "delegate" +require 'thread' + +class WeakRef < Delegator + + class RefError < StandardError + end + + @@id_map = {} # obj -> [ref,...] + @@id_rev_map = {} # ref -> obj + @@mutex = Mutex.new + @@final = lambda {|id| + @@mutex.synchronize { + rids = @@id_map[id] + if rids + for rid in rids + @@id_rev_map.delete(rid) + end + @@id_map.delete(id) + end + rid = @@id_rev_map[id] + if rid + @@id_rev_map.delete(id) + @@id_map[rid].delete(id) + @@id_map.delete(rid) if @@id_map[rid].empty? + end + } + } + + def initialize(orig) + @__id = orig.object_id + ObjectSpace.define_finalizer orig, @@final + ObjectSpace.define_finalizer self, @@final + @@mutex.synchronize { + @@id_map[@__id] = [] unless @@id_map[@__id] + } + @@id_map[@__id].push self.object_id + @@id_rev_map[self.object_id] = @__id + super + end + + def __getobj__ + unless @@id_rev_map[self.object_id] == @__id + Kernel::raise RefError, "Invalid Reference - probably recycled", Kernel::caller(2) + end + begin + ObjectSpace._id2ref(@__id) + rescue RangeError + Kernel::raise RefError, "Invalid Reference - probably recycled", Kernel::caller(2) + end + end + def __setobj__(obj) + end + + def weakref_alive? + @@id_rev_map[self.object_id] == @__id + end +end + +if __FILE__ == $0 +# require 'thread' + foo = Object.new + p foo.to_s # original's class + foo = WeakRef.new(foo) + p foo.to_s # should be same class + ObjectSpace.garbage_collect + ObjectSpace.garbage_collect + p foo.to_s # should raise exception (recycled) +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick.rb b/lib/ruby-1.9.1-rc1/lib/webrick.rb new file mode 100644 index 0000000..8fca81b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick.rb @@ -0,0 +1,29 @@ +# +# WEBrick -- WEB server toolkit. +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000 TAKAHASHI Masayoshi, GOTOU YUUZOU +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: webrick.rb,v 1.12 2002/10/01 17:16:31 gotoyuzo Exp $ + +require 'webrick/compat.rb' + +require 'webrick/version.rb' +require 'webrick/config.rb' +require 'webrick/log.rb' +require 'webrick/server.rb' +require 'webrick/utils.rb' +require 'webrick/accesslog' + +require 'webrick/htmlutils.rb' +require 'webrick/httputils.rb' +require 'webrick/cookie.rb' +require 'webrick/httpversion.rb' +require 'webrick/httpstatus.rb' +require 'webrick/httprequest.rb' +require 'webrick/httpresponse.rb' +require 'webrick/httpserver.rb' +require 'webrick/httpservlet.rb' +require 'webrick/httpauth.rb' diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/accesslog.rb b/lib/ruby-1.9.1-rc1/lib/webrick/accesslog.rb new file mode 100644 index 0000000..f977695 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/accesslog.rb @@ -0,0 +1,67 @@ +# +# accesslog.rb -- Access log handling utilities +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2002 keita yamaguchi +# Copyright (c) 2002 Internet Programming with Ruby writers +# +# $IPR: accesslog.rb,v 1.1 2002/10/01 17:16:32 gotoyuzo Exp $ + +module WEBrick + module AccessLog + class AccessLogError < StandardError; end + + CLF_TIME_FORMAT = "[%d/%b/%Y:%H:%M:%S %Z]" + COMMON_LOG_FORMAT = "%h %l %u %t \"%r\" %s %b" + CLF = COMMON_LOG_FORMAT + REFERER_LOG_FORMAT = "%{Referer}i -> %U" + AGENT_LOG_FORMAT = "%{User-Agent}i" + COMBINED_LOG_FORMAT = "#{CLF} \"%{Referer}i\" \"%{User-agent}i\"" + + module_function + + # This format specification is a subset of mod_log_config of Apache. + # http://httpd.apache.org/docs/mod/mod_log_config.html#formats + def setup_params(config, req, res) + params = Hash.new("") + params["a"] = req.peeraddr[3] + params["b"] = res.sent_size + params["e"] = ENV + params["f"] = res.filename || "" + params["h"] = req.peeraddr[2] + params["i"] = req + params["l"] = "-" + params["m"] = req.request_method + params["n"] = req.attributes + params["o"] = res + params["p"] = req.port + params["q"] = req.query_string + params["r"] = req.request_line.sub(/\x0d?\x0a\z/o, '') + params["s"] = res.status # won't support "%>s" + params["t"] = req.request_time + params["T"] = Time.now - req.request_time + params["u"] = req.user || "-" + params["U"] = req.unparsed_uri + params["v"] = config[:ServerName] + params + end + + def format(format_string, params) + format_string.gsub(/\%(?:\{(.*?)\})?>?([a-zA-Z%])/){ + param, spec = $1, $2 + case spec[0] + when ?e, ?i, ?n, ?o + raise AccessLogError, + "parameter is required for \"#{spec}\"" unless param + params[spec][param] || "-" + when ?t + params[spec].strftime(param || CLF_TIME_FORMAT) + when ?% + "%" + else + params[spec] + end + } + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/cgi.rb b/lib/ruby-1.9.1-rc1/lib/webrick/cgi.rb new file mode 100644 index 0000000..056997d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/cgi.rb @@ -0,0 +1,260 @@ +# +# cgi.rb -- Yet another CGI library +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $Id: cgi.rb 18678 2008-08-17 17:33:13Z gotoyuzo $ + +require "webrick/httprequest" +require "webrick/httpresponse" +require "webrick/config" +require "stringio" + +module WEBrick + class CGI + CGIError = Class.new(StandardError) + + attr_reader :config, :logger + + def initialize(*args) + if defined?(MOD_RUBY) + unless ENV.has_key?("GATEWAY_INTERFACE") + Apache.request.setup_cgi_env + end + end + if %r{HTTP/(\d+\.\d+)} =~ ENV["SERVER_PROTOCOL"] + httpv = $1 + end + @config = WEBrick::Config::HTTP.dup.update( + :ServerSoftware => ENV["SERVER_SOFTWARE"] || "null", + :HTTPVersion => HTTPVersion.new(httpv || "1.0"), + :RunOnCGI => true, # to detect if it runs on CGI. + :NPH => false # set true to run as NPH script. + ) + if config = args.shift + @config.update(config) + end + @config[:Logger] ||= WEBrick::BasicLog.new($stderr) + @logger = @config[:Logger] + @options = args + end + + def [](key) + @config[key] + end + + def start(env=ENV, stdin=$stdin, stdout=$stdout) + sock = WEBrick::CGI::Socket.new(@config, env, stdin, stdout) + req = HTTPRequest.new(@config) + res = HTTPResponse.new(@config) + unless @config[:NPH] or defined?(MOD_RUBY) + def res.setup_header + unless @header["status"] + phrase = HTTPStatus::reason_phrase(@status) + @header["status"] = "#{@status} #{phrase}" + end + super + end + def res.status_line + "" + end + end + + begin + req.parse(sock) + req.script_name = (env["SCRIPT_NAME"] || File.expand_path($0)).dup + req.path_info = (env["PATH_INFO"] || "").dup + req.query_string = env["QUERY_STRING"] + req.user = env["REMOTE_USER"] + res.request_method = req.request_method + res.request_uri = req.request_uri + res.request_http_version = req.http_version + res.keep_alive = req.keep_alive? + self.service(req, res) + rescue HTTPStatus::Error => ex + res.set_error(ex) + rescue HTTPStatus::Status => ex + res.status = ex.code + rescue Exception => ex + @logger.error(ex) + res.set_error(ex, true) + ensure + req.fixup + if defined?(MOD_RUBY) + res.setup_header + Apache.request.status_line = "#{res.status} #{res.reason_phrase}" + Apache.request.status = res.status + table = Apache.request.headers_out + res.header.each{|key, val| + case key + when /^content-encoding$/i + Apache::request.content_encoding = val + when /^content-type$/i + Apache::request.content_type = val + else + table[key] = val.to_s + end + } + res.cookies.each{|cookie| + table.add("Set-Cookie", cookie.to_s) + } + Apache.request.send_http_header + res.send_body(sock) + else + res.send_response(sock) + end + end + end + + def service(req, res) + method_name = "do_" + req.request_method.gsub(/-/, "_") + if respond_to?(method_name) + __send__(method_name, req, res) + else + raise HTTPStatus::MethodNotAllowed, + "unsupported method `#{req.request_method}'." + end + end + + class Socket + include Enumerable + + private + + def initialize(config, env, stdin, stdout) + @config = config + @env = env + @header_part = StringIO.new + @body_part = stdin + @out_port = stdout + @out_port.binmode + + @server_addr = @env["SERVER_ADDR"] || "0.0.0.0" + @server_name = @env["SERVER_NAME"] + @server_port = @env["SERVER_PORT"] + @remote_addr = @env["REMOTE_ADDR"] + @remote_host = @env["REMOTE_HOST"] || @remote_addr + @remote_port = @env["REMOTE_PORT"] || 0 + + begin + @header_part << request_line << CRLF + setup_header + @header_part << CRLF + @header_part.rewind + rescue Exception => ex + raise CGIError, "invalid CGI environment" + end + end + + def request_line + meth = @env["REQUEST_METHOD"] || "GET" + unless url = @env["REQUEST_URI"] + url = (@env["SCRIPT_NAME"] || File.expand_path($0)).dup + url << @env["PATH_INFO"].to_s + url = WEBrick::HTTPUtils.escape_path(url) + if query_string = @env["QUERY_STRING"] + unless query_string.empty? + url << "?" << query_string + end + end + end + # we cannot get real HTTP version of client ;) + httpv = @config[:HTTPVersion] + return "#{meth} #{url} HTTP/#{httpv}" + end + + def setup_header + @env.each{|key, value| + case key + when "CONTENT_TYPE", "CONTENT_LENGTH" + add_header(key.gsub(/_/, "-"), value) + when /^HTTP_(.*)/ + add_header($1.gsub(/_/, "-"), value) + end + } + end + + def add_header(hdrname, value) + unless value.empty? + @header_part << hdrname << ": " << value << CRLF + end + end + + def input + @header_part.eof? ? @body_part : @header_part + end + + public + + def peeraddr + [nil, @remote_port, @remote_host, @remote_addr] + end + + def addr + [nil, @server_port, @server_name, @server_addr] + end + + def gets(eol=LF, size=nil) + input.gets(eol, size) + end + + def read(size=nil) + input.read(size) + end + + def each + input.each{|line| yield(line) } + end + + def eof? + input.eof? + end + + def <<(data) + @out_port << data + end + + def cert + return nil unless defined?(OpenSSL) + if pem = @env["SSL_SERVER_CERT"] + OpenSSL::X509::Certificate.new(pem) unless pem.empty? + end + end + + def peer_cert + return nil unless defined?(OpenSSL) + if pem = @env["SSL_CLIENT_CERT"] + OpenSSL::X509::Certificate.new(pem) unless pem.empty? + end + end + + def peer_cert_chain + return nil unless defined?(OpenSSL) + if @env["SSL_CLIENT_CERT_CHAIN_0"] + keys = @env.keys + certs = keys.sort.collect{|k| + if /^SSL_CLIENT_CERT_CHAIN_\d+$/ =~ k + if pem = @env[k] + OpenSSL::X509::Certificate.new(pem) unless pem.empty? + end + end + } + certs.compact + end + end + + def cipher + return nil unless defined?(OpenSSL) + if cipher = @env["SSL_CIPHER"] + ret = [ cipher ] + ret << @env["SSL_PROTOCOL"] + ret << @env["SSL_CIPHER_USEKEYSIZE"] + ret << @env["SSL_CIPHER_ALGKEYSIZE"] + ret + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/compat.rb b/lib/ruby-1.9.1-rc1/lib/webrick/compat.rb new file mode 100644 index 0000000..ad7760b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/compat.rb @@ -0,0 +1,15 @@ +# +# compat.rb -- cross platform compatibility +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2002 GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: compat.rb,v 1.6 2002/10/01 17:16:32 gotoyuzo Exp $ + +module Errno + class EPROTO < SystemCallError; end + class ECONNRESET < SystemCallError; end + class ECONNABORTED < SystemCallError; end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/config.rb b/lib/ruby-1.9.1-rc1/lib/webrick/config.rb new file mode 100644 index 0000000..121669c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/config.rb @@ -0,0 +1,100 @@ +# +# config.rb -- Default configurations. +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: config.rb,v 1.52 2003/07/22 19:20:42 gotoyuzo Exp $ + +require 'webrick/version' +require 'webrick/httpversion' +require 'webrick/httputils' +require 'webrick/utils' +require 'webrick/log' + +module WEBrick + module Config + LIBDIR = File::dirname(__FILE__) + + # for GenericServer + General = { + :ServerName => Utils::getservername, + :BindAddress => nil, # "0.0.0.0" or "::" or nil + :Port => nil, # users MUST specifiy this!! + :MaxClients => 100, # maximum number of the concurrent connections + :ServerType => nil, # default: WEBrick::SimpleServer + :Logger => nil, # default: WEBrick::Log.new + :ServerSoftware => "WEBrick/#{WEBrick::VERSION} " + + "(Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})", + :TempDir => ENV['TMPDIR']||ENV['TMP']||ENV['TEMP']||'/tmp', + :DoNotListen => false, + :StartCallback => nil, + :StopCallback => nil, + :AcceptCallback => nil, + :DoNotReverseLookup => nil, + :ShutdownSocketWithoutClose => false, + } + + # for HTTPServer, HTTPRequest, HTTPResponse ... + HTTP = General.dup.update( + :Port => 80, + :RequestTimeout => 30, + :HTTPVersion => HTTPVersion.new("1.1"), + :AccessLog => nil, + :MimeTypes => HTTPUtils::DefaultMimeTypes, + :DirectoryIndex => ["index.html","index.htm","index.cgi","index.rhtml"], + :DocumentRoot => nil, + :DocumentRootOptions => { :FancyIndexing => true }, + :RequestCallback => nil, + :ServerAlias => nil, + :InputBufferSize => 65536, # input buffer size in reading request body + :OutputBufferSize => 65536, # output buffer size in sending File or IO + + # for HTTPProxyServer + :ProxyAuthProc => nil, + :ProxyContentHandler => nil, + :ProxyVia => true, + :ProxyTimeout => true, + :ProxyURI => nil, + + :CGIInterpreter => nil, + :CGIPathEnv => nil, + + # workaround: if Request-URIs contain 8bit chars, + # they should be escaped before calling of URI::parse(). + :Escape8bitURI => false + ) + + FileHandler = { + :NondisclosureName => [".ht*", "*~"], + :FancyIndexing => false, + :HandlerTable => {}, + :HandlerCallback => nil, + :DirectoryCallback => nil, + :FileCallback => nil, + :UserDir => nil, # e.g. "public_html" + :AcceptableLanguages => [] # ["en", "ja", ... ] + } + + BasicAuth = { + :AutoReloadUserDB => true, + } + + DigestAuth = { + :Algorithm => 'MD5-sess', # or 'MD5' + :Domain => nil, # an array includes domain names. + :Qop => [ 'auth' ], # 'auth' or 'auth-int' or both. + :UseOpaque => true, + :UseNextNonce => false, + :CheckNc => false, + :UseAuthenticationInfoHeader => true, + :AutoReloadUserDB => true, + :NonceExpirePeriod => 30*60, + :NonceExpireDelta => 60, + :InternetExplorerHack => true, + :OperaHack => true, + } + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/cookie.rb b/lib/ruby-1.9.1-rc1/lib/webrick/cookie.rb new file mode 100644 index 0000000..814e664 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/cookie.rb @@ -0,0 +1,110 @@ +# +# cookie.rb -- Cookie class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: cookie.rb,v 1.16 2002/09/21 12:23:35 gotoyuzo Exp $ + +require 'time' +require 'webrick/httputils' + +module WEBrick + class Cookie + + attr_reader :name + attr_accessor :value, :version + attr_accessor :domain, :path, :secure + attr_accessor :comment, :max_age + #attr_accessor :comment_url, :discard, :port + + def initialize(name, value) + @name = name + @value = value + @version = 0 # Netscape Cookie + + @domain = @path = @secure = @comment = @max_age = + @expires = @comment_url = @discard = @port = nil + end + + def expires=(t) + @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s) + end + + def expires + @expires && Time.parse(@expires) + end + + def to_s + ret = "" + ret << @name << "=" << @value + ret << "; " << "Version=" << @version.to_s if @version > 0 + ret << "; " << "Domain=" << @domain if @domain + ret << "; " << "Expires=" << @expires if @expires + ret << "; " << "Max-Age=" << @max_age.to_s if @max_age + ret << "; " << "Comment=" << @comment if @comment + ret << "; " << "Path=" << @path if @path + ret << "; " << "Secure" if @secure + ret + end + + # Cookie::parse() + # It parses Cookie field sent from the user agent. + def self.parse(str) + if str + ret = [] + cookie = nil + ver = 0 + str.split(/[;,]\s+/).each{|x| + key, val = x.split(/=/,2) + val = val ? HTTPUtils::dequote(val) : "" + case key + when "$Version"; ver = val.to_i + when "$Path"; cookie.path = val + when "$Domain"; cookie.domain = val + when "$Port"; cookie.port = val + else + ret << cookie if cookie + cookie = self.new(key, val) + cookie.version = ver + end + } + ret << cookie if cookie + ret + end + end + + def self.parse_set_cookie(str) + cookie_elem = str.split(/;/) + first_elem = cookie_elem.shift + first_elem.strip! + key, value = first_elem.split(/=/, 2) + cookie = new(key, HTTPUtils.dequote(value)) + cookie_elem.each{|pair| + pair.strip! + key, value = pair.split(/=/, 2) + if value + value = HTTPUtils.dequote(value.strip) + end + case key.downcase + when "domain" then cookie.domain = value + when "path" then cookie.path = value + when "expires" then cookie.expires = value + when "max-age" then cookie.max_age = Integer(value) + when "comment" then cookie.comment = value + when "version" then cookie.version = Integer(value) + when "secure" then cookie.secure = true + end + } + return cookie + end + + def self.parse_set_cookies(str) + return str.split(/,(?=[^;,]*=)|,$/).collect{|c| + parse_set_cookie(c) + } + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/htmlutils.rb b/lib/ruby-1.9.1-rc1/lib/webrick/htmlutils.rb new file mode 100644 index 0000000..cf8d542 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/htmlutils.rb @@ -0,0 +1,25 @@ +# +# htmlutils.rb -- HTMLUtils Module +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: htmlutils.rb,v 1.7 2002/09/21 12:23:35 gotoyuzo Exp $ + +module WEBrick + module HTMLUtils + + def escape(string) + str = string ? string.dup : "" + str.gsub!(/&/n, '&') + str.gsub!(/\"/n, '"') + str.gsub!(/>/n, '>') + str.gsub!(/ generate_next_nonce(req), + 'rspauth' => digest_res + } + if @use_opaque + opaque_struct.time = req.request_time + opaque_struct.nonce = auth_info['nextnonce'] + opaque_struct.nc = "%08x" % (auth_req['nc'].hex + 1) + end + if auth_req['qop'] == "auth" || auth_req['qop'] == "auth-int" + ['qop','cnonce','nc'].each{|key| + auth_info[key] = auth_req[key] + } + end + res[@resp_info_field] = auth_info.keys.map{|key| + if key == 'nc' + key + '=' + auth_info[key] + else + key + "=" + HTTPUtils::quote(auth_info[key]) + end + }.join(', ') + end + info('%s: authentication scceeded.', auth_req['username']) + req.user = auth_req['username'] + return true + end + + def split_param_value(string) + ret = {} + while string.bytesize != 0 + case string + when /^\s*([\w\-\.\*\%\!]+)=\s*\"((\\.|[^\"])*)\"\s*,?/ + key = $1 + matched = $2 + string = $' + ret[key] = matched.gsub(/\\(.)/, "\\1") + when /^\s*([\w\-\.\*\%\!]+)=\s*([^,\"]*),?/ + key = $1 + matched = $2 + string = $' + ret[key] = matched.clone + when /^s*^,/ + string = $' + else + break + end + end + ret + end + + def generate_next_nonce(req) + now = "%012d" % req.request_time.to_i + pk = hexdigest(now, @instance_key)[0,32] + nonce = [now + ":" + pk].pack("m*").chop # it has 60 length of chars. + nonce + end + + def check_nonce(req, auth_req) + username = auth_req['username'] + nonce = auth_req['nonce'] + + pub_time, pk = nonce.unpack("m*")[0].split(":", 2) + if (!pub_time || !pk) + error("%s: empty nonce is given", username) + return false + elsif (hexdigest(pub_time, @instance_key)[0,32] != pk) + error("%s: invalid private-key: %s for %s", + username, hexdigest(pub_time, @instance_key)[0,32], pk) + return false + end + + diff_time = req.request_time.to_i - pub_time.to_i + if (diff_time < 0) + error("%s: difference of time-stamp is negative.", username) + return false + elsif diff_time > @nonce_expire_period + error("%s: nonce is expired.", username) + return false + end + + return true + end + + def generate_opaque(req) + @mutex.synchronize{ + now = req.request_time + if now - @last_nonce_expire > @nonce_expire_delta + @opaques.delete_if{|key,val| + (now - val.time) > @nonce_expire_period + } + @last_nonce_expire = now + end + begin + opaque = Utils::random_string(16) + end while @opaques[opaque] + @opaques[opaque] = OpaqueInfo.new(now, nil, '00000001') + opaque + } + end + + def check_opaque(opaque_struct, req, auth_req) + if (@use_next_nonce && auth_req['nonce'] != opaque_struct.nonce) + error('%s: nonce unmatched. "%s" for "%s"', + auth_req['username'], auth_req['nonce'], opaque_struct.nonce) + return false + elsif !check_nonce(req, auth_req) + return false + end + if (@check_nc && auth_req['nc'] != opaque_struct.nc) + error('%s: nc unmatched."%s" for "%s"', + auth_req['username'], auth_req['nc'], opaque_struct.nc) + return false + end + true + end + + def check_uri(req, auth_req) + uri = auth_req['uri'] + if uri != req.request_uri.to_s && uri != req.unparsed_uri && + (@internet_explorer_hack && uri != req.path) + error('%s: uri unmatch. "%s" for "%s"', auth_req['username'], + auth_req['uri'], req.request_uri.to_s) + return false + end + true + end + + def hexdigest(*args) + @h.hexdigest(args.join(":")) + end + + end + + class ProxyDigestAuth < DigestAuth + include ProxyAuthenticator + + def check_uri(req, auth_req) + return true + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htdigest.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htdigest.rb new file mode 100644 index 0000000..3949756 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htdigest.rb @@ -0,0 +1,91 @@ +# +# httpauth/htdigest.rb -- Apache compatible htdigest file +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: htdigest.rb,v 1.4 2003/07/22 19:20:45 gotoyuzo Exp $ + +require 'webrick/httpauth/userdb' +require 'webrick/httpauth/digestauth' +require 'tempfile' + +module WEBrick + module HTTPAuth + class Htdigest + include UserDB + + def initialize(path) + @path = path + @mtime = Time.at(0) + @digest = Hash.new + @mutex = Mutex::new + @auth_type = DigestAuth + open(@path,"a").close unless File::exist?(@path) + reload + end + + def reload + mtime = File::mtime(@path) + if mtime > @mtime + @digest.clear + open(@path){|io| + while line = io.gets + line.chomp! + user, realm, pass = line.split(/:/, 3) + unless @digest[realm] + @digest[realm] = Hash.new + end + @digest[realm][user] = pass + end + } + @mtime = mtime + end + end + + def flush(output=nil) + output ||= @path + tmp = Tempfile.new("htpasswd", File::dirname(output)) + begin + each{|item| tmp.puts(item.join(":")) } + tmp.close + File::rename(tmp.path, output) + rescue + tmp.close(true) + end + end + + def get_passwd(realm, user, reload_db) + reload() if reload_db + if hash = @digest[realm] + hash[user] + end + end + + def set_passwd(realm, user, pass) + @mutex.synchronize{ + unless @digest[realm] + @digest[realm] = Hash.new + end + @digest[realm][user] = make_passwd(realm, user, pass) + } + end + + def delete_passwd(realm, user) + if hash = @digest[realm] + hash.delete(user) + end + end + + def each + @digest.keys.sort.each{|realm| + hash = @digest[realm] + hash.keys.sort.each{|user| + yield([user, realm, hash[user]]) + } + } + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htgroup.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htgroup.rb new file mode 100644 index 0000000..c9270c6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htgroup.rb @@ -0,0 +1,61 @@ +# +# httpauth/htgroup.rb -- Apache compatible htgroup file +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: htgroup.rb,v 1.1 2003/02/16 22:22:56 gotoyuzo Exp $ + +require 'tempfile' + +module WEBrick + module HTTPAuth + class Htgroup + def initialize(path) + @path = path + @mtime = Time.at(0) + @group = Hash.new + open(@path,"a").close unless File::exist?(@path) + reload + end + + def reload + if (mtime = File::mtime(@path)) > @mtime + @group.clear + open(@path){|io| + while line = io.gets + line.chomp! + group, members = line.split(/:\s*/) + @group[group] = members.split(/\s+/) + end + } + @mtime = mtime + end + end + + def flush(output=nil) + output ||= @path + tmp = Tempfile.new("htgroup", File::dirname(output)) + begin + @group.keys.sort.each{|group| + tmp.puts(format("%s: %s", group, self.members(group).join(" "))) + } + tmp.close + File::rename(tmp.path, output) + rescue + tmp.close(true) + end + end + + def members(group) + reload + @group[group] || [] + end + + def add(group, members) + @group[group] = members(group) | members + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htpasswd.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htpasswd.rb new file mode 100644 index 0000000..8a05886 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/htpasswd.rb @@ -0,0 +1,83 @@ +# +# httpauth/htpasswd -- Apache compatible htpasswd file +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: htpasswd.rb,v 1.4 2003/07/22 19:20:45 gotoyuzo Exp $ + +require 'webrick/httpauth/userdb' +require 'webrick/httpauth/basicauth' +require 'tempfile' + +module WEBrick + module HTTPAuth + class Htpasswd + include UserDB + + def initialize(path) + @path = path + @mtime = Time.at(0) + @passwd = Hash.new + @auth_type = BasicAuth + open(@path,"a").close unless File::exist?(@path) + reload + end + + def reload + mtime = File::mtime(@path) + if mtime > @mtime + @passwd.clear + open(@path){|io| + while line = io.gets + line.chomp! + case line + when %r!\A[^:]+:[a-zA-Z0-9./]{13}\z! + user, pass = line.split(":") + when /:\$/, /:{SHA}/ + raise NotImplementedError, + 'MD5, SHA1 .htpasswd file not supported' + else + raise StandardError, 'bad .htpasswd file' + end + @passwd[user] = pass + end + } + @mtime = mtime + end + end + + def flush(output=nil) + output ||= @path + tmp = Tempfile.new("htpasswd", File::dirname(output)) + begin + each{|item| tmp.puts(item.join(":")) } + tmp.close + File::rename(tmp.path, output) + rescue + tmp.close(true) + end + end + + def get_passwd(realm, user, reload_db) + reload() if reload_db + @passwd[user] + end + + def set_passwd(realm, user, pass) + @passwd[user] = make_passwd(realm, user, pass) + end + + def delete_passwd(realm, user) + @passwd.delete(user) + end + + def each + @passwd.keys.sort.each{|user| + yield([user, @passwd[user]]) + } + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/userdb.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/userdb.rb new file mode 100644 index 0000000..33e0140 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpauth/userdb.rb @@ -0,0 +1,29 @@ +# +# httpauth/userdb.rb -- UserDB mix-in module. +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: userdb.rb,v 1.2 2003/02/20 07:15:48 gotoyuzo Exp $ + +module WEBrick + module HTTPAuth + module UserDB + attr_accessor :auth_type # BasicAuth or DigestAuth + + def make_passwd(realm, user, pass) + @auth_type::make_passwd(realm, user, pass) + end + + def set_passwd(realm, user, pass) + self[user] = pass + end + + def get_passwd(realm, user, reload_db=false) + # reload_db is dummy + make_passwd(realm, user, self[user]) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpproxy.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpproxy.rb new file mode 100644 index 0000000..f35a177 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpproxy.rb @@ -0,0 +1,288 @@ +# +# httpproxy.rb -- HTTPProxy Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2002 GOTO Kentaro +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpproxy.rb,v 1.18 2003/03/08 18:58:10 gotoyuzo Exp $ +# $kNotwork: straw.rb,v 1.3 2002/02/12 15:13:07 gotoken Exp $ + +require "webrick/httpserver" +require "net/http" + +Net::HTTP::version_1_2 if RUBY_VERSION < "1.7" + +module WEBrick + NullReader = Object.new + class << NullReader + def read(*args) + nil + end + alias gets read + end + + FakeProxyURI = Object.new + class << FakeProxyURI + def method_missing(meth, *args) + if %w(scheme host port path query userinfo).member?(meth.to_s) + return nil + end + super + end + end + + class HTTPProxyServer < HTTPServer + def initialize(config={}, default=Config::HTTP) + super(config, default) + c = @config + @via = "#{c[:HTTPVersion]} #{c[:ServerName]}:#{c[:Port]}" + end + + def service(req, res) + if req.request_method == "CONNECT" + do_CONNECT(req, res) + elsif req.unparsed_uri =~ %r!^http://! + proxy_service(req, res) + else + super(req, res) + end + end + + def proxy_auth(req, res) + if proc = @config[:ProxyAuthProc] + proc.call(req, res) + end + req.header.delete("proxy-authorization") + end + + def proxy_uri(req, res) + # should return upstream proxy server's URI + return @config[:ProxyURI] + end + + def proxy_service(req, res) + # Proxy Authentication + proxy_auth(req, res) + + begin + self.send("do_#{req.request_method}", req, res) + rescue NoMethodError + raise HTTPStatus::MethodNotAllowed, + "unsupported method `#{req.request_method}'." + rescue => err + logger.debug("#{err.class}: #{err.message}") + raise HTTPStatus::ServiceUnavailable, err.message + end + + # Process contents + if handler = @config[:ProxyContentHandler] + handler.call(req, res) + end + end + + def do_CONNECT(req, res) + # Proxy Authentication + proxy_auth(req, res) + + ua = Thread.current[:WEBrickSocket] # User-Agent + raise HTTPStatus::InternalServerError, + "[BUG] cannot get socket" unless ua + + host, port = req.unparsed_uri.split(":", 2) + # Proxy authentication for upstream proxy server + if proxy = proxy_uri(req, res) + proxy_request_line = "CONNECT #{host}:#{port} HTTP/1.0" + if proxy.userinfo + credentials = "Basic " + [proxy.userinfo].pack("m").delete("\n") + end + host, port = proxy.host, proxy.port + end + + begin + @logger.debug("CONNECT: upstream proxy is `#{host}:#{port}'.") + os = TCPSocket.new(host, port) # origin server + + if proxy + @logger.debug("CONNECT: sending a Request-Line") + os << proxy_request_line << CRLF + @logger.debug("CONNECT: > #{proxy_request_line}") + if credentials + @logger.debug("CONNECT: sending a credentials") + os << "Proxy-Authorization: " << credentials << CRLF + end + os << CRLF + proxy_status_line = os.gets(LF) + @logger.debug("CONNECT: read a Status-Line form the upstream server") + @logger.debug("CONNECT: < #{proxy_status_line}") + if %r{^HTTP/\d+\.\d+\s+200\s*} =~ proxy_status_line + while line = os.gets(LF) + break if /\A(#{CRLF}|#{LF})\z/om =~ line + end + else + raise HTTPStatus::BadGateway + end + end + @logger.debug("CONNECT #{host}:#{port}: succeeded") + res.status = HTTPStatus::RC_OK + rescue => ex + @logger.debug("CONNECT #{host}:#{port}: failed `#{ex.message}'") + res.set_error(ex) + raise HTTPStatus::EOFError + ensure + if handler = @config[:ProxyContentHandler] + handler.call(req, res) + end + res.send_response(ua) + access_log(@config, req, res) + + # Should clear request-line not to send the sesponse twice. + # see: HTTPServer#run + req.parse(NullReader) rescue nil + end + + begin + while fds = IO::select([ua, os]) + if fds[0].member?(ua) + buf = ua.sysread(1024); + @logger.debug("CONNECT: #{buf.bytesize} byte from User-Agent") + os.syswrite(buf) + elsif fds[0].member?(os) + buf = os.sysread(1024); + @logger.debug("CONNECT: #{buf.bytesize} byte from #{host}:#{port}") + ua.syswrite(buf) + end + end + rescue => ex + os.close + @logger.debug("CONNECT #{host}:#{port}: closed") + end + + raise HTTPStatus::EOFError + end + + def do_GET(req, res) + perform_proxy_request(req, res) do |http, path, header| + http.get(path, header) + end + end + + def do_HEAD(req, res) + perform_proxy_request(req, res) do |http, path, header| + http.head(path, header) + end + end + + def do_POST(req, res) + perform_proxy_request(req, res) do |http, path, header| + http.post(path, req.body || "", header) + end + end + + def do_OPTIONS(req, res) + res['allow'] = "GET,HEAD,POST,OPTIONS,CONNECT" + end + + private + + # Some header fields should not be transferred. + HopByHop = %w( connection keep-alive proxy-authenticate upgrade + proxy-authorization te trailers transfer-encoding ) + ShouldNotTransfer = %w( set-cookie proxy-connection ) + def split_field(f) f ? f.split(/,\s+/).collect{|i| i.downcase } : [] end + + def choose_header(src, dst) + connections = split_field(src['connection']) + src.each{|key, value| + key = key.downcase + if HopByHop.member?(key) || # RFC2616: 13.5.1 + connections.member?(key) || # RFC2616: 14.10 + ShouldNotTransfer.member?(key) # pragmatics + @logger.debug("choose_header: `#{key}: #{value}'") + next + end + dst[key] = value + } + end + + # Net::HTTP is stupid about the multiple header fields. + # Here is workaround: + def set_cookie(src, dst) + if str = src['set-cookie'] + cookies = [] + str.split(/,\s*/).each{|token| + if /^[^=]+;/o =~ token + cookies[-1] << ", " << token + elsif /=/o =~ token + cookies << token + else + cookies[-1] << ", " << token + end + } + dst.cookies.replace(cookies) + end + end + + def set_via(h) + if @config[:ProxyVia] + if h['via'] + h['via'] << ", " << @via + else + h['via'] = @via + end + end + end + + def setup_proxy_header(req, res) + # Choose header fields to transfer + header = Hash.new + choose_header(req, header) + set_via(header) + return header + end + + def setup_upstream_proxy_authentication(req, res, header) + if upstream = proxy_uri(req, res) + if upstream.userinfo + header['proxy-authorization'] = + "Basic " + [upstream.userinfo].pack("m").delete("\n") + end + return upstream + end + return FakeProxyURI + end + + def perform_proxy_request(req, res) + uri = req.request_uri + path = uri.path.dup + path << "?" << uri.query if uri.query + header = setup_proxy_header(req, res) + upstream = setup_upstream_proxy_authentication(req, res, header) + response = nil + + http = Net::HTTP.new(uri.host, uri.port, upstream.host, upstream.port) + http.start do + if @config[:ProxyTimeout] + ################################## these issues are + http.open_timeout = 30 # secs # necessary (maybe bacause + http.read_timeout = 60 # secs # Ruby's bug, but why?) + ################################## + end + response = yield(http, path, header) + end + + # Persistent connection requirements are mysterious for me. + # So I will close the connection in every response. + res['proxy-connection'] = "close" + res['connection'] = "close" + + # Convert Net::HTTP::HTTPResponse to WEBrick::HTTPResponse + res.status = response.code.to_i + choose_header(response, res) + set_cookie(response, res) + set_via(res) + res.body = response.body + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httprequest.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httprequest.rb new file mode 100644 index 0000000..3a8d744 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httprequest.rb @@ -0,0 +1,406 @@ +# +# httprequest.rb -- HTTPRequest Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httprequest.rb,v 1.64 2003/07/13 17:18:22 gotoyuzo Exp $ + +require 'uri' +require 'webrick/httpversion' +require 'webrick/httpstatus' +require 'webrick/httputils' +require 'webrick/cookie' + +module WEBrick + class HTTPRequest + BODY_CONTAINABLE_METHODS = [ "POST", "PUT" ] + + # Request line + attr_reader :request_line + attr_reader :request_method, :unparsed_uri, :http_version + + # Request-URI + attr_reader :request_uri, :path + attr_accessor :script_name, :path_info, :query_string + + # Header and entity body + attr_reader :raw_header, :header, :cookies + attr_reader :accept, :accept_charset + attr_reader :accept_encoding, :accept_language + + # Misc + attr_accessor :user + attr_reader :addr, :peeraddr + attr_reader :attributes + attr_reader :keep_alive + attr_reader :request_time + + def initialize(config) + @config = config + @buffer_size = @config[:InputBufferSize] + @logger = config[:Logger] + + @request_line = @request_method = + @unparsed_uri = @http_version = nil + + @request_uri = @host = @port = @path = nil + @script_name = @path_info = nil + @query_string = nil + @query = nil + @form_data = nil + + @raw_header = Array.new + @header = nil + @cookies = [] + @accept = [] + @accept_charset = [] + @accept_encoding = [] + @accept_language = [] + @body = "" + + @addr = @peeraddr = nil + @attributes = {} + @user = nil + @keep_alive = false + @request_time = nil + + @remaining_size = nil + @socket = nil + + @forwarded_proto = @forwarded_host = @forwarded_port = + @forwarded_server = @forwarded_for = nil + end + + def parse(socket=nil) + @socket = socket + begin + @peeraddr = socket.respond_to?(:peeraddr) ? socket.peeraddr : [] + @addr = socket.respond_to?(:addr) ? socket.addr : [] + rescue Errno::ENOTCONN + raise HTTPStatus::EOFError + end + + read_request_line(socket) + if @http_version.major > 0 + read_header(socket) + @header['cookie'].each{|cookie| + @cookies += Cookie::parse(cookie) + } + @accept = HTTPUtils.parse_qvalues(self['accept']) + @accept_charset = HTTPUtils.parse_qvalues(self['accept-charset']) + @accept_encoding = HTTPUtils.parse_qvalues(self['accept-encoding']) + @accept_language = HTTPUtils.parse_qvalues(self['accept-language']) + end + return if @request_method == "CONNECT" + return if @unparsed_uri == "*" + + begin + setup_forwarded_info + @request_uri = parse_uri(@unparsed_uri) + @path = HTTPUtils::unescape(@request_uri.path) + @path = HTTPUtils::normalize_path(@path) + @host = @request_uri.host + @port = @request_uri.port + @query_string = @request_uri.query + @script_name = "" + @path_info = @path.dup + rescue + raise HTTPStatus::BadRequest, "bad URI `#{@unparsed_uri}'." + end + + if /close/io =~ self["connection"] + @keep_alive = false + elsif /keep-alive/io =~ self["connection"] + @keep_alive = true + elsif @http_version < "1.1" + @keep_alive = false + else + @keep_alive = true + end + end + + def body(&block) + block ||= Proc.new{|chunk| @body << chunk } + read_body(@socket, block) + @body.empty? ? nil : @body + end + + def query + unless @query + parse_query() + end + @query + end + + def content_length + return Integer(self['content-length']) + end + + def content_type + return self['content-type'] + end + + def [](header_name) + if @header + value = @header[header_name.downcase] + value.empty? ? nil : value.join(", ") + end + end + + def each + @header.each{|k, v| + value = @header[k] + yield(k, value.empty? ? nil : value.join(", ")) + } + end + + def host + return @forwarded_host || @host + end + + def port + return @forwarded_port || @port + end + + def server_name + return @forwarded_server || @config[:ServerName] + end + + def remote_ip + return self["client-ip"] || @forwarded_for || @peeraddr[3] + end + + def ssl? + return @request_uri.scheme == "https" + end + + def keep_alive? + @keep_alive + end + + def to_s + ret = @request_line.dup + @raw_header.each{|line| ret << line } + ret << CRLF + ret << body if body + ret + end + + def fixup() + begin + body{|chunk| } # read remaining body + rescue HTTPStatus::Error => ex + @logger.error("HTTPRequest#fixup: #{ex.class} occured.") + @keep_alive = false + rescue => ex + @logger.error(ex) + @keep_alive = false + end + end + + def meta_vars + # This method provides the metavariables defined by the revision 3 + # of ``The WWW Common Gateway Interface Version 1.1''. + # (http://Web.Golux.Com/coar/cgi/) + + meta = Hash.new + + cl = self["Content-Length"] + ct = self["Content-Type"] + meta["CONTENT_LENGTH"] = cl if cl.to_i > 0 + meta["CONTENT_TYPE"] = ct.dup if ct + meta["GATEWAY_INTERFACE"] = "CGI/1.1" + meta["PATH_INFO"] = @path_info ? @path_info.dup : "" + #meta["PATH_TRANSLATED"] = nil # no plan to be provided + meta["QUERY_STRING"] = @query_string ? @query_string.dup : "" + meta["REMOTE_ADDR"] = @peeraddr[3] + meta["REMOTE_HOST"] = @peeraddr[2] + #meta["REMOTE_IDENT"] = nil # no plan to be provided + meta["REMOTE_USER"] = @user + meta["REQUEST_METHOD"] = @request_method.dup + meta["REQUEST_URI"] = @request_uri.to_s + meta["SCRIPT_NAME"] = @script_name.dup + meta["SERVER_NAME"] = @host + meta["SERVER_PORT"] = @port.to_s + meta["SERVER_PROTOCOL"] = "HTTP/" + @config[:HTTPVersion].to_s + meta["SERVER_SOFTWARE"] = @config[:ServerSoftware].dup + + self.each{|key, val| + next if /^content-type$/i =~ key + next if /^content-length$/i =~ key + name = "HTTP_" + key + name.gsub!(/-/o, "_") + name.upcase! + meta[name] = val + } + + meta + end + + private + + def read_request_line(socket) + @request_line = read_line(socket, 1024) if socket + if @request_line.bytesize >= 1024 and @request_line[-1, 1] != LF + raise HTTPStatus::RequestURITooLarge + end + @request_time = Time.now + raise HTTPStatus::EOFError unless @request_line + if /^(\S+)\s+(\S++)(?:\s+HTTP\/(\d+\.\d+))?\r?\n/mo =~ @request_line + @request_method = $1 + @unparsed_uri = $2 + @http_version = HTTPVersion.new($3 ? $3 : "0.9") + else + rl = @request_line.sub(/\x0d?\x0a\z/o, '') + raise HTTPStatus::BadRequest, "bad Request-Line `#{rl}'." + end + end + + def read_header(socket) + if socket + while line = read_line(socket) + break if /\A(#{CRLF}|#{LF})\z/om =~ line + @raw_header << line + end + end + begin + @header = HTTPUtils::parse_header(@raw_header.join) + rescue => ex + raise HTTPStatus::BadRequest, ex.message + end + end + + def parse_uri(str, scheme="http") + if @config[:Escape8bitURI] + str = HTTPUtils::escape8bit(str) + end + uri = URI::parse(str) + return uri if uri.absolute? + if @forwarded_host + host, port = @forwarded_host, @forwarded_port + elsif self["host"] + pattern = /\A(#{URI::REGEXP::PATTERN::HOST})(?::(\d+))?\z/n + host, port = *self['host'].scan(pattern)[0] + elsif @addr.size > 0 + host, port = @addr[2], @addr[1] + else + host, port = @config[:ServerName], @config[:Port] + end + uri.scheme = @forwarded_proto || scheme + uri.host = host + uri.port = port ? port.to_i : nil + return URI::parse(uri.to_s) + end + + def read_body(socket, block) + return unless socket + if tc = self['transfer-encoding'] + case tc + when /chunked/io then read_chunked(socket, block) + else raise HTTPStatus::NotImplemented, "Transfer-Encoding: #{tc}." + end + elsif self['content-length'] || @remaining_size + @remaining_size ||= self['content-length'].to_i + while @remaining_size > 0 + sz = [@buffer_size, @remaining_size].min + break unless buf = read_data(socket, sz) + @remaining_size -= buf.bytesize + block.call(buf) + end + if @remaining_size > 0 && @socket.eof? + raise HTTPStatus::BadRequest, "invalid body size." + end + elsif BODY_CONTAINABLE_METHODS.member?(@request_method) + raise HTTPStatus::LengthRequired + end + return @body + end + + def read_chunk_size(socket) + line = read_line(socket) + if /^([0-9a-fA-F]+)(?:;(\S+))?/ =~ line + chunk_size = $1.hex + chunk_ext = $2 + [ chunk_size, chunk_ext ] + else + raise HTTPStatus::BadRequest, "bad chunk `#{line}'." + end + end + + def read_chunked(socket, block) + chunk_size, = read_chunk_size(socket) + while chunk_size > 0 + data = read_data(socket, chunk_size) # read chunk-data + if data.nil? || data.bytesize != chunk_size + raise BadRequest, "bad chunk data size." + end + read_line(socket) # skip CRLF + block.call(data) + chunk_size, = read_chunk_size(socket) + end + read_header(socket) # trailer + CRLF + @header.delete("transfer-encoding") + @remaining_size = 0 + end + + def _read_data(io, method, *arg) + begin + WEBrick::Utils.timeout(@config[:RequestTimeout]){ + return io.__send__(method, *arg) + } + rescue Errno::ECONNRESET + return nil + rescue TimeoutError + raise HTTPStatus::RequestTimeout + end + end + + def read_line(io, size=4096) + _read_data(io, :gets, LF, size) + end + + def read_data(io, size) + _read_data(io, :read, size) + end + + def parse_query() + begin + if @request_method == "GET" || @request_method == "HEAD" + @query = HTTPUtils::parse_query(@query_string) + elsif self['content-type'] =~ /^application\/x-www-form-urlencoded/ + @query = HTTPUtils::parse_query(body) + elsif self['content-type'] =~ /^multipart\/form-data; boundary=(.+)/ + boundary = HTTPUtils::dequote($1) + @query = HTTPUtils::parse_form_data(body, boundary) + else + @query = Hash.new + end + rescue => ex + raise HTTPStatus::BadRequest, ex.message + end + end + + PrivateNetworkRegexp = / + ^unknown$| + ^((::ffff:)?127.0.0.1|::1)$| + ^(::ffff:)?(10|172\.(1[6-9]|2[0-9]|3[01])|192\.168)\. + /ixo + + def setup_forwarded_info + @forwarded_server = self["x-forwarded-server"] + @forwarded_proto = self["x-forwarded-proto"] + if host_port = self["x-forwarded-host"] + @forwarded_host, tmp = host_port.split(":", 2) + @forwarded_port = (tmp || (@forwarded_proto == "https" ? 443 : 80)).to_i + end + if addrs = self["x-forwarded-for"] + addrs = addrs.split(",").collect(&:strip) + addrs.reject!{|ip| PrivateNetworkRegexp =~ ip } + @forwarded_for = addrs.first + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpresponse.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpresponse.rb new file mode 100644 index 0000000..740a8fe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpresponse.rb @@ -0,0 +1,326 @@ +# +# httpresponse.rb -- HTTPResponse Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpresponse.rb,v 1.45 2003/07/11 11:02:25 gotoyuzo Exp $ + +require 'time' +require 'webrick/httpversion' +require 'webrick/htmlutils' +require 'webrick/httputils' +require 'webrick/httpstatus' + +module WEBrick + class HTTPResponse + attr_reader :http_version, :status, :header + attr_reader :cookies + attr_accessor :reason_phrase + attr_accessor :body + + attr_accessor :request_method, :request_uri, :request_http_version + attr_accessor :filename + attr_accessor :keep_alive + attr_reader :config, :sent_size + + def initialize(config) + @config = config + @buffer_size = config[:OutputBufferSize] + @logger = config[:Logger] + @header = Hash.new + @status = HTTPStatus::RC_OK + @reason_phrase = nil + @http_version = HTTPVersion::convert(@config[:HTTPVersion]) + @body = '' + @keep_alive = true + @cookies = [] + @request_method = nil + @request_uri = nil + @request_http_version = @http_version # temporary + @chunked = false + @filename = nil + @sent_size = 0 + end + + def status_line + "HTTP/#@http_version #@status #@reason_phrase #{CRLF}" + end + + def status=(status) + @status = status + @reason_phrase = HTTPStatus::reason_phrase(status) + end + + def [](field) + @header[field.downcase] + end + + def []=(field, value) + @header[field.downcase] = value.to_s + end + + def content_length + if len = self['content-length'] + return Integer(len) + end + end + + def content_length=(len) + self['content-length'] = len.to_s + end + + def content_type + self['content-type'] + end + + def content_type=(type) + self['content-type'] = type + end + + def each + @header.each{|k, v| yield(k, v) } + end + + def chunked? + @chunked + end + + def chunked=(val) + @chunked = val ? true : false + end + + def keep_alive? + @keep_alive + end + + def send_response(socket) + begin + setup_header() + send_header(socket) + send_body(socket) + rescue Errno::EPIPE, Errno::ECONNRESET, Errno::ENOTCONN => ex + @logger.debug(ex) + @keep_alive = false + rescue Exception => ex + @logger.error(ex) + @keep_alive = false + end + end + + def setup_header() + @reason_phrase ||= HTTPStatus::reason_phrase(@status) + @header['server'] ||= @config[:ServerSoftware] + @header['date'] ||= Time.now.httpdate + + # HTTP/0.9 features + if @request_http_version < "1.0" + @http_version = HTTPVersion.new("0.9") + @keep_alive = false + end + + # HTTP/1.0 features + if @request_http_version < "1.1" + if chunked? + @chunked = false + ver = @request_http_version.to_s + msg = "chunked is set for an HTTP/#{ver} request. (ignored)" + @logger.warn(msg) + end + end + + # Determine the message length (RFC2616 -- 4.4 Message Length) + if @status == 304 || @status == 204 || HTTPStatus::info?(@status) + @header.delete('content-length') + @body = "" + elsif chunked? + @header["transfer-encoding"] = "chunked" + @header.delete('content-length') + elsif %r{^multipart/byteranges} =~ @header['content-type'] + @header.delete('content-length') + elsif @header['content-length'].nil? + unless @body.is_a?(IO) + @header['content-length'] = @body ? @body.bytesize : 0 + end + end + + # Keep-Alive connection. + if @header['connection'] == "close" + @keep_alive = false + elsif keep_alive? + if chunked? || @header['content-length'] + @header['connection'] = "Keep-Alive" + end + else + @header['connection'] = "close" + end + + # Location is a single absoluteURI. + if location = @header['location'] + if @request_uri + @header['location'] = @request_uri.merge(location) + end + end + end + + def send_header(socket) + if @http_version.major > 0 + data = status_line() + @header.each{|key, value| + tmp = key.gsub(/\bwww|^te$|\b\w/){ $&.upcase } + data << "#{tmp}: #{value}" << CRLF + } + @cookies.each{|cookie| + data << "Set-Cookie: " << cookie.to_s << CRLF + } + data << CRLF + _write_data(socket, data) + end + end + + def send_body(socket) + case @body + when IO then send_body_io(socket) + else send_body_string(socket) + end + end + + def to_s + ret = "" + send_response(ret) + ret + end + + def set_redirect(status, url) + @body = "#{url.to_s}.\n" + @header['location'] = url.to_s + raise status + end + + def set_error(ex, backtrace=false) + case ex + when HTTPStatus::Status + @keep_alive = false if HTTPStatus::error?(ex.code) + self.status = ex.code + else + @keep_alive = false + self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR + end + @header['content-type'] = "text/html" + + if respond_to?(:create_error_page) + create_error_page() + return + end + + if @request_uri + host, port = @request_uri.host, @request_uri.port + else + host, port = @config[:ServerName], @config[:Port] + end + + @body = '' + @body << <<-_end_of_html_ + + + #{HTMLUtils::escape(@reason_phrase)} + +

      #{HTMLUtils::escape(@reason_phrase)}

      + #{HTMLUtils::escape(ex.message)} +
      + _end_of_html_ + + if backtrace && $DEBUG + @body << "backtrace of `#{HTMLUtils::escape(ex.class.to_s)}' " + @body << "#{HTMLUtils::escape(ex.message)}" + @body << "
      "
      +        ex.backtrace.each{|line| @body << "\t#{line}\n"}
      +        @body << "

      " + end + + @body << <<-_end_of_html_ +
      + #{HTMLUtils::escape(@config[:ServerSoftware])} at + #{host}:#{port} +
      + + + _end_of_html_ + end + + private + + def send_body_io(socket) + begin + if @request_method == "HEAD" + # do nothing + elsif chunked? + while buf = @body.read(@buffer_size) + next if buf.empty? + data = "" + data << format("%x", buf.bytesize) << CRLF + data << buf << CRLF + _write_data(socket, data) + @sent_size += buf.bytesize + end + _write_data(socket, "0#{CRLF}#{CRLF}") + else + size = @header['content-length'].to_i + _send_file(socket, @body, 0, size) + @sent_size = size + end + ensure + @body.close + end + end + + def send_body_string(socket) + if @request_method == "HEAD" + # do nothing + elsif chunked? + remain = body ? @body.bytesize : 0 + while buf = @body[@sent_size, @buffer_size] + break if buf.empty? + data = "" + data << format("%x", buf.bytesize) << CRLF + data << buf << CRLF + _write_data(socket, data) + @sent_size += buf.bytesize + end + _write_data(socket, "0#{CRLF}#{CRLF}") + else + if @body && @body.bytesize > 0 + _write_data(socket, @body) + @sent_size = @body.bytesize + end + end + end + + def _send_file(output, input, offset, size) + while offset > 0 + sz = @buffer_size < size ? @buffer_size : size + buf = input.read(sz) + offset -= buf.bytesize + end + + if size == 0 + while buf = input.read(@buffer_size) + _write_data(output, buf) + end + else + while size > 0 + sz = @buffer_size < size ? @buffer_size : size + buf = input.read(sz) + _write_data(output, buf) + size -= buf.bytesize + end + end + end + + def _write_data(socket, data) + socket << data + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/https.rb b/lib/ruby-1.9.1-rc1/lib/webrick/https.rb new file mode 100644 index 0000000..81b65ce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/https.rb @@ -0,0 +1,63 @@ +# +# https.rb -- SSL/TLS enhancement for HTTPServer +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: https.rb,v 1.15 2003/07/22 19:20:42 gotoyuzo Exp $ + +require 'webrick/ssl' + +module WEBrick + module Config + HTTP.update(SSL) + end + + class HTTPRequest + attr_reader :cipher, :server_cert, :client_cert + + alias orig_parse parse + + def parse(socket=nil) + if socket.respond_to?(:cert) + @server_cert = socket.cert || @config[:SSLCertificate] + @client_cert = socket.peer_cert + @client_cert_chain = socket.peer_cert_chain + @cipher = socket.cipher + end + orig_parse(socket) + end + + alias orig_parse_uri parse_uri + + def parse_uri(str, scheme="https") + if @server_cert + return orig_parse_uri(str, scheme) + end + return orig_parse_uri(str) + end + + alias orig_meta_vars meta_vars + + def meta_vars + meta = orig_meta_vars + if @server_cert + meta["HTTPS"] = "on" + meta["SSL_SERVER_CERT"] = @server_cert.to_pem + meta["SSL_CLIENT_CERT"] = @client_cert ? @client_cert.to_pem : "" + if @client_cert_chain + @client_cert_chain.each_with_index{|cert, i| + meta["SSL_CLIENT_CERT_CHAIN_#{i}"] = cert.to_pem + } + end + meta["SSL_CIPHER"] = @cipher[0] + meta["SSL_PROTOCOL"] = @cipher[1] + meta["SSL_CIPHER_USEKEYSIZE"] = @cipher[2].to_s + meta["SSL_CIPHER_ALGKEYSIZE"] = @cipher[3].to_s + end + meta + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpserver.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpserver.rb new file mode 100644 index 0000000..495be26 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpserver.rb @@ -0,0 +1,217 @@ +# +# httpserver.rb -- HTTPServer Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpserver.rb,v 1.63 2002/10/01 17:16:32 gotoyuzo Exp $ + +require 'webrick/server' +require 'webrick/httputils' +require 'webrick/httpstatus' +require 'webrick/httprequest' +require 'webrick/httpresponse' +require 'webrick/httpservlet' +require 'webrick/accesslog' + +module WEBrick + class HTTPServerError < ServerError; end + + class HTTPServer < ::WEBrick::GenericServer + def initialize(config={}, default=Config::HTTP) + super(config, default) + @http_version = HTTPVersion::convert(@config[:HTTPVersion]) + + @mount_tab = MountTable.new + if @config[:DocumentRoot] + mount("/", HTTPServlet::FileHandler, @config[:DocumentRoot], + @config[:DocumentRootOptions]) + end + + unless @config[:AccessLog] + @config[:AccessLog] = [ + [ $stderr, AccessLog::COMMON_LOG_FORMAT ], + [ $stderr, AccessLog::REFERER_LOG_FORMAT ] + ] + end + + @virtual_hosts = Array.new + end + + def run(sock) + while true + res = HTTPResponse.new(@config) + req = HTTPRequest.new(@config) + server = self + begin + timeout = @config[:RequestTimeout] + while timeout > 0 + break if IO.select([sock], nil, nil, 0.5) + timeout = 0 if @status != :Running + timeout -= 0.5 + end + raise HTTPStatus::EOFError if timeout <= 0 + raise HTTPStatus::EOFError if sock.eof? + req.parse(sock) + res.request_method = req.request_method + res.request_uri = req.request_uri + res.request_http_version = req.http_version + res.keep_alive = req.keep_alive? + server = lookup_server(req) || self + if callback = server[:RequestCallback] + callback.call(req, res) + elsif callback = server[:RequestHandler] + msg = ":RequestHandler is deprecated, please use :RequestCallback" + @logger.warn(msg) + callback.call(req, res) + end + server.service(req, res) + rescue HTTPStatus::EOFError, HTTPStatus::RequestTimeout => ex + res.set_error(ex) + rescue HTTPStatus::Error => ex + @logger.error(ex.message) + res.set_error(ex) + rescue HTTPStatus::Status => ex + res.status = ex.code + rescue StandardError => ex + @logger.error(ex) + res.set_error(ex, true) + ensure + if req.request_line + if req.keep_alive? && res.keep_alive? + req.fixup() + end + res.send_response(sock) + server.access_log(@config, req, res) + end + end + break if @http_version < "1.1" + break unless req.keep_alive? + break unless res.keep_alive? + end + end + + def service(req, res) + if req.unparsed_uri == "*" + if req.request_method == "OPTIONS" + do_OPTIONS(req, res) + raise HTTPStatus::OK + end + raise HTTPStatus::NotFound, "`#{req.unparsed_uri}' not found." + end + + servlet, options, script_name, path_info = search_servlet(req.path) + raise HTTPStatus::NotFound, "`#{req.path}' not found." unless servlet + req.script_name = script_name + req.path_info = path_info + si = servlet.get_instance(self, *options) + @logger.debug(format("%s is invoked.", si.class.name)) + si.service(req, res) + end + + def do_OPTIONS(req, res) + res["allow"] = "GET,HEAD,POST,OPTIONS" + end + + def mount(dir, servlet, *options) + @logger.debug(sprintf("%s is mounted on %s.", servlet.inspect, dir)) + @mount_tab[dir] = [ servlet, options ] + end + + def mount_proc(dir, proc=nil, &block) + proc ||= block + raise HTTPServerError, "must pass a proc or block" unless proc + mount(dir, HTTPServlet::ProcHandler.new(proc)) + end + + def unmount(dir) + @logger.debug(sprintf("unmount %s.", dir)) + @mount_tab.delete(dir) + end + alias umount unmount + + def search_servlet(path) + script_name, path_info = @mount_tab.scan(path) + servlet, options = @mount_tab[script_name] + if servlet + [ servlet, options, script_name, path_info ] + end + end + + def virtual_host(server) + @virtual_hosts << server + @virtual_hosts = @virtual_hosts.sort_by{|s| + num = 0 + num -= 4 if s[:BindAddress] + num -= 2 if s[:Port] + num -= 1 if s[:ServerName] + num + } + end + + def lookup_server(req) + @virtual_hosts.find{|s| + (s[:BindAddress].nil? || req.addr[3] == s[:BindAddress]) && + (s[:Port].nil? || req.port == s[:Port]) && + ((s[:ServerName].nil? || req.host == s[:ServerName]) || + (!s[:ServerAlias].nil? && s[:ServerAlias].find{|h| h === req.host})) + } + end + + def access_log(config, req, res) + param = AccessLog::setup_params(config, req, res) + @config[:AccessLog].each{|logger, fmt| + logger << AccessLog::format(fmt+"\n", param) + } + end + + class MountTable + def initialize + @tab = Hash.new + compile + end + + def [](dir) + dir = normalize(dir) + @tab[dir] + end + + def []=(dir, val) + dir = normalize(dir) + @tab[dir] = val + compile + val + end + + def delete(dir) + dir = normalize(dir) + res = @tab.delete(dir) + compile + res + end + + def scan(path) + @scanner =~ path + [ $&, $' ] + end + + private + + def compile + k = @tab.keys + k.sort! + k.reverse! + k.collect!{|path| Regexp.escape(path) } + @scanner = Regexp.new("^(" + k.join("|") +")(?=/|$)") + end + + def normalize(dir) + ret = dir ? dir.dup : "" + ret.sub!(%r|/+$|, "") + ret + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet.rb new file mode 100644 index 0000000..ac7c022 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet.rb @@ -0,0 +1,22 @@ +# +# httpservlet.rb -- HTTPServlet Utility File +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpservlet.rb,v 1.21 2003/02/23 12:24:46 gotoyuzo Exp $ + +require 'webrick/httpservlet/abstract' +require 'webrick/httpservlet/filehandler' +require 'webrick/httpservlet/cgihandler' +require 'webrick/httpservlet/erbhandler' +require 'webrick/httpservlet/prochandler' + +module WEBrick + module HTTPServlet + FileHandler.add_handler("cgi", CGIHandler) + FileHandler.add_handler("rhtml", ERBHandler) + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/abstract.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/abstract.rb new file mode 100644 index 0000000..2a0a404 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/abstract.rb @@ -0,0 +1,71 @@ +# +# httpservlet.rb -- HTTPServlet Module +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: abstract.rb,v 1.24 2003/07/11 11:16:46 gotoyuzo Exp $ + +require 'thread' + +require 'webrick/htmlutils' +require 'webrick/httputils' +require 'webrick/httpstatus' + +module WEBrick + module HTTPServlet + class HTTPServletError < StandardError; end + + class AbstractServlet + def self.get_instance(config, *options) + self.new(config, *options) + end + + def initialize(server, *options) + @server = @config = server + @logger = @server[:Logger] + @options = options + end + + def service(req, res) + method_name = "do_" + req.request_method.gsub(/-/, "_") + if respond_to?(method_name) + __send__(method_name, req, res) + else + raise HTTPStatus::MethodNotAllowed, + "unsupported method `#{req.request_method}'." + end + end + + def do_GET(req, res) + raise HTTPStatus::NotFound, "not found." + end + + def do_HEAD(req, res) + do_GET(req, res) + end + + def do_OPTIONS(req, res) + m = self.methods.grep(/^do_[A-Z]+$/) + m.collect!{|i| i.sub(/do_/, "") } + m.sort! + res["allow"] = m.join(",") + end + + private + + def redirect_to_directory_uri(req, res) + if req.path[-1] != ?/ + location = WEBrick::HTTPUtils.escape_path(req.path + "/") + if req.query_string && req.query_string.bytesize > 0 + location << "?" << req.query_string + end + res.set_redirect(HTTPStatus::MovedPermanently, location) + end + end + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgi_runner.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgi_runner.rb new file mode 100644 index 0000000..dd7325d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgi_runner.rb @@ -0,0 +1,47 @@ +# +# cgi_runner.rb -- CGI launcher. +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000 TAKAHASHI Masayoshi, GOTOU YUUZOU +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: cgi_runner.rb,v 1.9 2002/09/25 11:33:15 gotoyuzo Exp $ + +def sysread(io, size) + buf = "" + while size > 0 + tmp = io.sysread(size) + buf << tmp + size -= tmp.bytesize + end + return buf +end + +STDIN.binmode + +buf = "" +len = sysread(STDIN, 8).to_i +out = sysread(STDIN, len) +STDOUT.reopen(open(out, "w")) + +len = sysread(STDIN, 8).to_i +err = sysread(STDIN, len) +STDERR.reopen(open(err, "w")) + +len = sysread(STDIN, 8).to_i +dump = sysread(STDIN, len) +hash = Marshal.restore(dump) +ENV.keys.each{|name| ENV.delete(name) } +hash.each{|k, v| ENV[k] = v if v } + +dir = File::dirname(ENV["SCRIPT_FILENAME"]) +Dir::chdir dir + +if interpreter = ARGV[0] + argv = ARGV.dup + argv << ENV["SCRIPT_FILENAME"] + exec(*argv) + # NOTREACHED +end +exec ENV["SCRIPT_FILENAME"] diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgihandler.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgihandler.rb new file mode 100644 index 0000000..f504f4d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/cgihandler.rb @@ -0,0 +1,110 @@ +# +# cgihandler.rb -- CGIHandler Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: cgihandler.rb,v 1.27 2003/03/21 19:56:01 gotoyuzo Exp $ + +require 'rbconfig' +require 'tempfile' +require 'webrick/config' +require 'webrick/httpservlet/abstract' + +module WEBrick + module HTTPServlet + + class CGIHandler < AbstractServlet + Ruby = File::join(RbConfig::CONFIG['bindir'], + RbConfig::CONFIG['ruby_install_name']) + Ruby << RbConfig::CONFIG['EXEEXT'] + CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\"" + + def initialize(server, name) + super(server, name) + @script_filename = name + @tempdir = server[:TempDir] + @cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}" + end + + def do_GET(req, res) + data = nil + status = -1 + + cgi_in = IO::popen(@cgicmd, "wb") + cgi_out = Tempfile.new("webrick.cgiout.", @tempdir) + cgi_out.set_encoding("ASCII-8BIT") + cgi_err = Tempfile.new("webrick.cgierr.", @tempdir) + cgi_err.set_encoding("ASCII-8BIT") + begin + cgi_in.sync = true + meta = req.meta_vars + meta["SCRIPT_FILENAME"] = @script_filename + meta["PATH"] = @config[:CGIPathEnv] + if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM + meta["SystemRoot"] = ENV["SystemRoot"] + end + dump = Marshal.dump(meta) + + cgi_in.write("%8d" % cgi_out.path.bytesize) + cgi_in.write(cgi_out.path) + cgi_in.write("%8d" % cgi_err.path.bytesize) + cgi_in.write(cgi_err.path) + cgi_in.write("%8d" % dump.bytesize) + cgi_in.write(dump) + + if req.body and req.body.bytesize > 0 + cgi_in.write(req.body) + end + ensure + cgi_in.close + status = $?.exitstatus + sleep 0.1 if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM + data = cgi_out.read + cgi_out.close(true) + if errmsg = cgi_err.read + if errmsg.bytesize > 0 + @logger.error("CGIHandler: #{@script_filename}:\n" + errmsg) + end + end + cgi_err.close(true) + end + + if status != 0 + @logger.error("CGIHandler: #{@script_filename} exit with #{status}") + end + + data = "" unless data + raw_header, body = data.split(/^[\xd\xa]+/, 2) + raise HTTPStatus::InternalServerError, + "Premature end of script headers: #{@script_filename}" if body.nil? + + begin + header = HTTPUtils::parse_header(raw_header) + if /^(\d+)/ =~ header['status'][0] + res.status = $1.to_i + header.delete('status') + end + if header.has_key?('location') + # RFC 3875 6.2.3, 6.2.4 + res.status = 302 unless (300...400) === res.status + end + if header.has_key?('set-cookie') + header['set-cookie'].each{|k| + res.cookies << Cookie.parse_set_cookie(k) + } + header.delete('set-cookie') + end + header.each{|key, val| res[key] = val.join(", ") } + rescue => ex + raise HTTPStatus::InternalServerError, ex.message + end + res.body = body + end + alias do_POST do_GET + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/erbhandler.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/erbhandler.rb new file mode 100644 index 0000000..4979219 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/erbhandler.rb @@ -0,0 +1,54 @@ +# +# erbhandler.rb -- ERBHandler Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: erbhandler.rb,v 1.25 2003/02/24 19:25:31 gotoyuzo Exp $ + +require 'webrick/httpservlet/abstract.rb' + +require 'erb' + +module WEBrick + module HTTPServlet + + class ERBHandler < AbstractServlet + def initialize(server, name) + super(server, name) + @script_filename = name + end + + def do_GET(req, res) + unless defined?(ERB) + @logger.warn "#{self.class}: ERB not defined." + raise HTTPStatus::Forbidden, "ERBHandler cannot work." + end + begin + data = open(@script_filename){|io| io.read } + res.body = evaluate(ERB.new(data), req, res) + res['content-type'] = + HTTPUtils::mime_type(@script_filename, @config[:MimeTypes]) + rescue StandardError => ex + raise + rescue Exception => ex + @logger.error(ex) + raise HTTPStatus::InternalServerError, ex.message + end + end + + alias do_POST do_GET + + private + def evaluate(erb, servlet_request, servlet_response) + Module.new.module_eval{ + meta_vars = servlet_request.meta_vars + query = servlet_request.query + erb.result(binding) + } + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/filehandler.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/filehandler.rb new file mode 100644 index 0000000..f1cc88b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/filehandler.rb @@ -0,0 +1,435 @@ +# +# filehandler.rb -- FileHandler Module +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: filehandler.rb,v 1.44 2003/06/07 01:34:51 gotoyuzo Exp $ + +require 'thread' +require 'time' + +require 'webrick/htmlutils' +require 'webrick/httputils' +require 'webrick/httpstatus' + +module WEBrick + module HTTPServlet + + class DefaultFileHandler < AbstractServlet + def initialize(server, local_path) + super(server, local_path) + @local_path = local_path + end + + def do_GET(req, res) + st = File::stat(@local_path) + mtime = st.mtime + res['etag'] = sprintf("%x-%x-%x", st.ino, st.size, st.mtime.to_i) + + if not_modified?(req, res, mtime, res['etag']) + res.body = '' + raise HTTPStatus::NotModified + elsif req['range'] + make_partial_content(req, res, @local_path, st.size) + raise HTTPStatus::PartialContent + else + mtype = HTTPUtils::mime_type(@local_path, @config[:MimeTypes]) + res['content-type'] = mtype + res['content-length'] = st.size + res['last-modified'] = mtime.httpdate + res.body = open(@local_path, "rb") + end + end + + def not_modified?(req, res, mtime, etag) + if ir = req['if-range'] + begin + if Time.httpdate(ir) >= mtime + return true + end + rescue + if HTTPUtils::split_header_value(ir).member?(res['etag']) + return true + end + end + end + + if (ims = req['if-modified-since']) && Time.parse(ims) >= mtime + return true + end + + if (inm = req['if-none-match']) && + HTTPUtils::split_header_value(inm).member?(res['etag']) + return true + end + + return false + end + + def make_partial_content(req, res, filename, filesize) + mtype = HTTPUtils::mime_type(filename, @config[:MimeTypes]) + unless ranges = HTTPUtils::parse_range_header(req['range']) + raise HTTPStatus::BadRequest, + "Unrecognized range-spec: \"#{req['range']}\"" + end + open(filename, "rb"){|io| + if ranges.size > 1 + time = Time.now + boundary = "#{time.sec}_#{time.usec}_#{Process::pid}" + body = '' + ranges.each{|range| + first, last = prepare_range(range, filesize) + next if first < 0 + io.pos = first + content = io.read(last-first+1) + body << "--" << boundary << CRLF + body << "Content-Type: #{mtype}" << CRLF + body << "Content-Range: #{first}-#{last}/#{filesize}" << CRLF + body << CRLF + body << content + body << CRLF + } + raise HTTPStatus::RequestRangeNotSatisfiable if body.empty? + body << "--" << boundary << "--" << CRLF + res["content-type"] = "multipart/byteranges; boundary=#{boundary}" + res.body = body + elsif range = ranges[0] + first, last = prepare_range(range, filesize) + raise HTTPStatus::RequestRangeNotSatisfiable if first < 0 + if last == filesize - 1 + content = io.dup + content.pos = first + else + io.pos = first + content = io.read(last-first+1) + end + res['content-type'] = mtype + res['content-range'] = "#{first}-#{last}/#{filesize}" + res['content-length'] = last - first + 1 + res.body = content + else + raise HTTPStatus::BadRequest + end + } + end + + def prepare_range(range, filesize) + first = range.first < 0 ? filesize + range.first : range.first + return -1, -1 if first < 0 || first >= filesize + last = range.last < 0 ? filesize + range.last : range.last + last = filesize - 1 if last >= filesize + return first, last + end + end + + class FileHandler < AbstractServlet + HandlerTable = Hash.new + + def self.add_handler(suffix, handler) + HandlerTable[suffix] = handler + end + + def self.remove_handler(suffix) + HandlerTable.delete(suffix) + end + + def initialize(server, root, options={}, default=Config::FileHandler) + @config = server.config + @logger = @config[:Logger] + @root = File.expand_path(root) + if options == true || options == false + options = { :FancyIndexing => options } + end + @options = default.dup.update(options) + end + + def service(req, res) + # if this class is mounted on "/" and /~username is requested. + # we're going to override path informations before invoking service. + if defined?(Etc) && @options[:UserDir] && req.script_name.empty? + if %r|^(/~([^/]+))| =~ req.path_info + script_name, user = $1, $2 + path_info = $' + begin + passwd = Etc::getpwnam(user) + @root = File::join(passwd.dir, @options[:UserDir]) + req.script_name = script_name + req.path_info = path_info + rescue + @logger.debug "#{self.class}#do_GET: getpwnam(#{user}) failed" + end + end + end + prevent_directory_traversal(req, res) + super(req, res) + end + + def do_GET(req, res) + unless exec_handler(req, res) + set_dir_list(req, res) + end + end + + def do_POST(req, res) + unless exec_handler(req, res) + raise HTTPStatus::NotFound, "`#{req.path}' not found." + end + end + + def do_OPTIONS(req, res) + unless exec_handler(req, res) + super(req, res) + end + end + + # ToDo + # RFC2518: HTTP Extensions for Distributed Authoring -- WEBDAV + # + # PROPFIND PROPPATCH MKCOL DELETE PUT COPY MOVE + # LOCK UNLOCK + + # RFC3253: Versioning Extensions to WebDAV + # (Web Distributed Authoring and Versioning) + # + # VERSION-CONTROL REPORT CHECKOUT CHECK_IN UNCHECKOUT + # MKWORKSPACE UPDATE LABEL MERGE ACTIVITY + + private + + def trailing_pathsep?(path) + # check for trailing path separator: + # File.dirname("/aaaa/bbbb/") #=> "/aaaa") + # File.dirname("/aaaa/bbbb/x") #=> "/aaaa/bbbb") + # File.dirname("/aaaa/bbbb") #=> "/aaaa") + # File.dirname("/aaaa/bbbbx") #=> "/aaaa") + return File.dirname(path) != File.dirname(path+"x") + end + + def prevent_directory_traversal(req, res) + # Preventing directory traversal on Windows platforms; + # Backslashes (0x5c) in path_info are not interpreted as special + # character in URI notation. So the value of path_info should be + # normalize before accessing to the filesystem. + + if trailing_pathsep?(req.path_info) + # File.expand_path removes the trailing path separator. + # Adding a character is a workaround to save it. + # File.expand_path("/aaa/") #=> "/aaa" + # File.expand_path("/aaa/" + "x") #=> "/aaa/x" + expanded = File.expand_path(req.path_info + "x") + expanded.chop! # remove trailing "x" + else + expanded = File.expand_path(req.path_info) + end + req.path_info = expanded + end + + def exec_handler(req, res) + raise HTTPStatus::NotFound, "`#{req.path}' not found" unless @root + if set_filename(req, res) + handler = get_handler(req, res) + call_callback(:HandlerCallback, req, res) + h = handler.get_instance(@config, res.filename) + h.service(req, res) + return true + end + call_callback(:HandlerCallback, req, res) + return false + end + + def get_handler(req, res) + suffix1 = (/\.(\w+)\z/ =~ res.filename) && $1.downcase + if /\.(\w+)\.([\w\-]+)\z/ =~ res.filename + if @options[:AcceptableLanguages].include?($2.downcase) + suffix2 = $1.downcase + end + end + handler_table = @options[:HandlerTable] + return handler_table[suffix1] || handler_table[suffix2] || + HandlerTable[suffix1] || HandlerTable[suffix2] || + DefaultFileHandler + end + + def set_filename(req, res) + res.filename = @root.dup + path_info = req.path_info.scan(%r|/[^/]*|) + + path_info.unshift("") # dummy for checking @root dir + while base = path_info.first + break if base == "/" + break unless File.directory?(File.expand_path(res.filename + base)) + shift_path_info(req, res, path_info) + call_callback(:DirectoryCallback, req, res) + end + + if base = path_info.first + if base == "/" + if file = search_index_file(req, res) + shift_path_info(req, res, path_info, file) + call_callback(:FileCallback, req, res) + return true + end + shift_path_info(req, res, path_info) + elsif file = search_file(req, res, base) + shift_path_info(req, res, path_info, file) + call_callback(:FileCallback, req, res) + return true + else + raise HTTPStatus::NotFound, "`#{req.path}' not found." + end + end + + return false + end + + def check_filename(req, res, name) + if nondisclosure_name?(name) || windows_ambiguous_name?(name) + @logger.warn("the request refers nondisclosure name `#{name}'.") + raise HTTPStatus::NotFound, "`#{req.path}' not found." + end + end + + def shift_path_info(req, res, path_info, base=nil) + tmp = path_info.shift + base = base || tmp + req.path_info = path_info.join + req.script_name << base + res.filename = File.expand_path(res.filename + base) + check_filename(req, res, File.basename(res.filename)) + end + + def search_index_file(req, res) + @config[:DirectoryIndex].each{|index| + if file = search_file(req, res, "/"+index) + return file + end + } + return nil + end + + def search_file(req, res, basename) + langs = @options[:AcceptableLanguages] + path = res.filename + basename + if File.file?(path) + return basename + elsif langs.size > 0 + req.accept_language.each{|lang| + path_with_lang = path + ".#{lang}" + if langs.member?(lang) && File.file?(path_with_lang) + return basename + ".#{lang}" + end + } + (langs - req.accept_language).each{|lang| + path_with_lang = path + ".#{lang}" + if File.file?(path_with_lang) + return basename + ".#{lang}" + end + } + end + return nil + end + + def call_callback(callback_name, req, res) + if cb = @options[callback_name] + cb.call(req, res) + end + end + + def windows_ambiguous_name?(name) + return true if /[. ]+\z/ =~ name + return true if /::\$DATA\z/ =~ name + return false + end + + def nondisclosure_name?(name) + @options[:NondisclosureName].each{|pattern| + if File.fnmatch(pattern, name, File::FNM_CASEFOLD) + return true + end + } + return false + end + + def set_dir_list(req, res) + redirect_to_directory_uri(req, res) + unless @options[:FancyIndexing] + raise HTTPStatus::Forbidden, "no access permission to `#{req.path}'" + end + local_path = res.filename + list = Dir::entries(local_path).collect{|name| + next if name == "." || name == ".." + next if nondisclosure_name?(name) + next if windows_ambiguous_name?(name) + st = (File::stat(File.join(local_path, name)) rescue nil) + if st.nil? + [ name, nil, -1 ] + elsif st.directory? + [ name + "/", st.mtime, -1 ] + else + [ name, st.mtime, st.size ] + end + } + list.compact! + + if d0 = req.query["N"]; idx = 0 + elsif d0 = req.query["M"]; idx = 1 + elsif d0 = req.query["S"]; idx = 2 + else d0 = "A" ; idx = 0 + end + d1 = (d0 == "A") ? "D" : "A" + + if d0 == "A" + list.sort!{|a,b| a[idx] <=> b[idx] } + else + list.sort!{|a,b| b[idx] <=> a[idx] } + end + + res['content-type'] = "text/html" + + res.body = <<-_end_of_html_ + + + Index of #{HTMLUtils::escape(req.path)} + +

      Index of #{HTMLUtils::escape(req.path)}

      + _end_of_html_ + + res.body << "
      \n"
      +        res.body << " Name                          "
      +        res.body << "Last modified         "
      +        res.body << "Size\n"
      +        res.body << "
      \n" + + list.unshift [ "..", File::mtime(local_path+"/.."), -1 ] + list.each{ |name, time, size| + if name == ".." + dname = "Parent Directory" + elsif name.bytesize > 25 + dname = name.sub(/^(.{23})(?:.*)/, '\1..') + else + dname = name + end + s = " #{dname}" + s << " " * (30 - dname.bytesize) + s << (time ? time.strftime("%Y/%m/%d %H:%M ") : " " * 22) + s << (size >= 0 ? size.to_s : "-") << "\n" + res.body << s + } + res.body << "

      " + + res.body << <<-_end_of_html_ +
      + #{HTMLUtils::escape(@config[:ServerSoftware])}
      + at #{req.host}:#{req.port} +
      + + + _end_of_html_ + end + + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/prochandler.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/prochandler.rb new file mode 100644 index 0000000..783cb27 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpservlet/prochandler.rb @@ -0,0 +1,33 @@ +# +# prochandler.rb -- ProcHandler Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: prochandler.rb,v 1.7 2002/09/21 12:23:42 gotoyuzo Exp $ + +require 'webrick/httpservlet/abstract.rb' + +module WEBrick + module HTTPServlet + + class ProcHandler < AbstractServlet + def get_instance(server, *options) + self + end + + def initialize(proc) + @proc = proc + end + + def do_GET(request, response) + @proc.call(request, response) + end + + alias do_POST do_GET + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpstatus.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpstatus.rb new file mode 100644 index 0000000..a4b42f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpstatus.rb @@ -0,0 +1,126 @@ +# +# httpstatus.rb -- HTTPStatus Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpstatus.rb,v 1.11 2003/03/24 20:18:55 gotoyuzo Exp $ + +module WEBrick + + module HTTPStatus + + class Status < StandardError; end + class Info < Status; end + class Success < Status; end + class Redirect < Status; end + class Error < Status; end + class ClientError < Error; end + class ServerError < Error; end + + class EOFError < StandardError; end + + StatusMessage = { + 100 => 'Continue', + 101 => 'Switching Protocols', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Request Range Not Satisfiable', + 417 => 'Expectation Failed', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported' + } + + CodeToError = {} + + StatusMessage.each{|code, message| + var_name = message.gsub(/[ \-]/,'_').upcase + err_name = message.gsub(/[ \-]/,'') + + case code + when 100...200; parent = Info + when 200...300; parent = Success + when 300...400; parent = Redirect + when 400...500; parent = ClientError + when 500...600; parent = ServerError + end + + eval %- + RC_#{var_name} = #{code} + class #{err_name} < #{parent} + def self.code() RC_#{var_name} end + def self.reason_phrase() StatusMessage[code] end + def code() self::class::code end + def reason_phrase() self::class::reason_phrase end + alias to_i code + end + - + + CodeToError[code] = const_get(err_name) + } + + def reason_phrase(code) + StatusMessage[code.to_i] + end + def info?(code) + code.to_i >= 100 and code.to_i < 200 + end + def success?(code) + code.to_i >= 200 and code.to_i < 300 + end + def redirect?(code) + code.to_i >= 300 and code.to_i < 400 + end + def error?(code) + code.to_i >= 400 and code.to_i < 600 + end + def client_error?(code) + code.to_i >= 400 and code.to_i < 500 + end + def server_error?(code) + code.to_i >= 500 and code.to_i < 600 + end + + def self.[](code) + CodeToError[code] + end + + module_function :reason_phrase + module_function :info?, :success?, :redirect?, :error? + module_function :client_error?, :server_error? + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httputils.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httputils.rb new file mode 100644 index 0000000..f921364 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httputils.rb @@ -0,0 +1,392 @@ +# +# httputils.rb -- HTTPUtils Module +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httputils.rb,v 1.34 2003/06/05 21:34:08 gotoyuzo Exp $ + +require 'socket' +require 'tempfile' + +module WEBrick + CR = "\x0d" + LF = "\x0a" + CRLF = "\x0d\x0a" + + module HTTPUtils + + def normalize_path(path) + raise "abnormal path `#{path}'" if path[0] != ?/ + ret = path.dup + + ret.gsub!(%r{/+}o, '/') # // => / + while ret.sub!(%r'/\.(?:/|\Z)', '/'); end # /. => / + while ret.sub!(%r'/(?!\.\./)[^/]+/\.\.(?:/|\Z)', '/'); end # /foo/.. => /foo + + raise "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret + ret + end + module_function :normalize_path + + ##### + + DefaultMimeTypes = { + "ai" => "application/postscript", + "asc" => "text/plain", + "avi" => "video/x-msvideo", + "bin" => "application/octet-stream", + "bmp" => "image/bmp", + "class" => "application/octet-stream", + "cer" => "application/pkix-cert", + "crl" => "application/pkix-crl", + "crt" => "application/x-x509-ca-cert", + #"crl" => "application/x-pkcs7-crl", + "css" => "text/css", + "dms" => "application/octet-stream", + "doc" => "application/msword", + "dvi" => "application/x-dvi", + "eps" => "application/postscript", + "etx" => "text/x-setext", + "exe" => "application/octet-stream", + "gif" => "image/gif", + "htm" => "text/html", + "html" => "text/html", + "jpe" => "image/jpeg", + "jpeg" => "image/jpeg", + "jpg" => "image/jpeg", + "lha" => "application/octet-stream", + "lzh" => "application/octet-stream", + "mov" => "video/quicktime", + "mpe" => "video/mpeg", + "mpeg" => "video/mpeg", + "mpg" => "video/mpeg", + "pbm" => "image/x-portable-bitmap", + "pdf" => "application/pdf", + "pgm" => "image/x-portable-graymap", + "png" => "image/png", + "pnm" => "image/x-portable-anymap", + "ppm" => "image/x-portable-pixmap", + "ppt" => "application/vnd.ms-powerpoint", + "ps" => "application/postscript", + "qt" => "video/quicktime", + "ras" => "image/x-cmu-raster", + "rb" => "text/plain", + "rd" => "text/plain", + "rtf" => "application/rtf", + "sgm" => "text/sgml", + "sgml" => "text/sgml", + "tif" => "image/tiff", + "tiff" => "image/tiff", + "txt" => "text/plain", + "xbm" => "image/x-xbitmap", + "xhtml" => "text/html", + "xls" => "application/vnd.ms-excel", + "xml" => "text/xml", + "xpm" => "image/x-xpixmap", + "xwd" => "image/x-xwindowdump", + "zip" => "application/zip", + } + + # Load Apache compatible mime.types file. + def load_mime_types(file) + open(file){ |io| + hash = Hash.new + io.each{ |line| + next if /^#/ =~ line + line.chomp! + mimetype, ext0 = line.split(/\s+/, 2) + next unless ext0 + next if ext0.empty? + ext0.split(/\s+/).each{ |ext| hash[ext] = mimetype } + } + hash + } + end + module_function :load_mime_types + + def mime_type(filename, mime_tab) + suffix1 = (/\.(\w+)$/ =~ filename && $1.downcase) + suffix2 = (/\.(\w+)\.[\w\-]+$/ =~ filename && $1.downcase) + mime_tab[suffix1] || mime_tab[suffix2] || "application/octet-stream" + end + module_function :mime_type + + ##### + + def parse_header(raw) + header = Hash.new([].freeze) + field = nil + raw.each_line{|line| + case line + when /^([A-Za-z0-9!\#$%&'*+\-.^_`|~]+):\s*(.*?)\s*\z/om + field, value = $1, $2 + field.downcase! + header[field] = [] unless header.has_key?(field) + header[field] << value + when /^\s+(.*?)\s*\z/om + value = $1 + unless field + raise "bad header '#{line.inspect}'." + end + header[field][-1] << " " << value + else + raise "bad header '#{line.inspect}'." + end + } + header.each{|key, values| + values.each{|value| + value.strip! + value.gsub!(/\s+/, " ") + } + } + header + end + module_function :parse_header + + def split_header_value(str) + str.scan(%r'\G((?:"(?:\\.|[^"])+?"|[^",]+)+) + (?:,\s*|\Z)'xn).flatten + end + module_function :split_header_value + + def parse_range_header(ranges_specifier) + if /^bytes=(.*)/ =~ ranges_specifier + byte_range_set = split_header_value($1) + byte_range_set.collect{|range_spec| + case range_spec + when /^(\d+)-(\d+)/ then $1.to_i .. $2.to_i + when /^(\d+)-/ then $1.to_i .. -1 + when /^-(\d+)/ then -($1.to_i) .. -1 + else return nil + end + } + end + end + module_function :parse_range_header + + def parse_qvalues(value) + tmp = [] + if value + parts = value.split(/,\s*/) + parts.each {|part| + if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part) + val = m[1] + q = (m[2] or 1).to_f + tmp.push([val, q]) + end + } + tmp = tmp.sort_by{|val, q| -q} + tmp.collect!{|val, q| val} + end + return tmp + end + module_function :parse_qvalues + + ##### + + def dequote(str) + ret = (/\A"(.*)"\Z/ =~ str) ? $1 : str.dup + ret.gsub!(/\\(.)/, "\\1") + ret + end + module_function :dequote + + def quote(str) + '"' << str.gsub(/[\\\"]/o, "\\\1") << '"' + end + module_function :quote + + ##### + + class FormData < String + EmptyRawHeader = [].freeze + EmptyHeader = {}.freeze + + attr_accessor :name, :filename, :next_data + protected :next_data + + def initialize(*args) + @name = @filename = @next_data = nil + if args.empty? + @raw_header = [] + @header = nil + super("") + else + @raw_header = EmptyRawHeader + @header = EmptyHeader + super(args.shift) + unless args.empty? + @next_data = self.class.new(*args) + end + end + end + + def [](*key) + begin + @header[key[0].downcase].join(", ") + rescue StandardError, NameError + super + end + end + + def <<(str) + if @header + super + elsif str == CRLF + @header = HTTPUtils::parse_header(@raw_header.join) + if cd = self['content-disposition'] + if /\s+name="(.*?)"/ =~ cd then @name = $1 end + if /\s+filename="(.*?)"/ =~ cd then @filename = $1 end + end + else + @raw_header << str + end + self + end + + def append_data(data) + tmp = self + while tmp + unless tmp.next_data + tmp.next_data = data + break + end + tmp = tmp.next_data + end + self + end + + def each_data + tmp = self + while tmp + next_data = tmp.next_data + yield(tmp) + tmp = next_data + end + end + + def list + ret = [] + each_data{|data| + ret << data.to_s + } + ret + end + + alias :to_ary :list + + def to_s + String.new(self) + end + end + + def parse_query(str) + query = Hash.new + if str + str.split(/[&;]/).each{|x| + next if x.empty? + key, val = x.split(/=/,2) + key = unescape_form(key) + val = unescape_form(val.to_s) + val = FormData.new(val) + val.name = key + if query.has_key?(key) + query[key].append_data(val) + next + end + query[key] = val + } + end + query + end + module_function :parse_query + + def parse_form_data(io, boundary) + boundary_regexp = /\A--#{boundary}(--)?#{CRLF}\z/ + form_data = Hash.new + return form_data unless io + data = nil + io.each_line{|line| + if boundary_regexp =~ line + if data + data.chop! + key = data.name + if form_data.has_key?(key) + form_data[key].append_data(data) + else + form_data[key] = data + end + end + data = FormData.new + next + else + if data + data << line + end + end + } + return form_data + end + module_function :parse_form_data + + ##### + + reserved = ';/?:@&=+$,' + num = '0123456789' + lowalpha = 'abcdefghijklmnopqrstuvwxyz' + upalpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + mark = '-_.!~*\'()' + unreserved = num + lowalpha + upalpha + mark + control = (0x0..0x1f).collect{|c| c.chr }.join + "\x7f" + space = " " + delims = '<>#%"' + unwise = '{}|\\^[]`' + nonascii = (0x80..0xff).collect{|c| c.chr }.join + + module_function + + def _make_regex(str) /([#{Regexp.escape(str)}])/n end + def _make_regex!(str) /([^#{Regexp.escape(str)}])/n end + def _escape(str, regex) str.gsub(regex){ "%%%02X" % $1.ord } end + def _unescape(str, regex) str.gsub(regex){ $1.hex.chr } end + + UNESCAPED = _make_regex(control+space+delims+unwise+nonascii) + UNESCAPED_FORM = _make_regex(reserved+control+delims+unwise+nonascii) + NONASCII = _make_regex(nonascii) + ESCAPED = /%([0-9a-fA-F]{2})/ + UNESCAPED_PCHAR = _make_regex!(unreserved+":@&=+$,") + + def escape(str) + _escape(str, UNESCAPED) + end + + def unescape(str) + _unescape(str, ESCAPED) + end + + def escape_form(str) + ret = _escape(str, UNESCAPED_FORM) + ret.gsub!(/ /, "+") + ret + end + + def unescape_form(str) + _unescape(str.gsub(/\+/, " "), ESCAPED) + end + + def escape_path(str) + result = "" + str.scan(%r{/([^/]*)}).each{|i| + result << "/" << _escape(i[0], UNESCAPED_PCHAR) + } + return result + end + + def escape8bit(str) + _escape(str, NONASCII) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/httpversion.rb b/lib/ruby-1.9.1-rc1/lib/webrick/httpversion.rb new file mode 100644 index 0000000..86907a2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/httpversion.rb @@ -0,0 +1,49 @@ +# +# HTTPVersion.rb -- presentation of HTTP version +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: httpversion.rb,v 1.5 2002/09/21 12:23:37 gotoyuzo Exp $ + +module WEBrick + class HTTPVersion + include Comparable + + attr_accessor :major, :minor + + def self.convert(version) + version.is_a?(self) ? version : new(version) + end + + def initialize(version) + case version + when HTTPVersion + @major, @minor = version.major, version.minor + when String + if /^(\d+)\.(\d+)$/ =~ version + @major, @minor = $1.to_i, $2.to_i + end + end + if @major.nil? || @minor.nil? + raise ArgumentError, + format("cannot convert %s into %s", version.class, self.class) + end + end + + def <=>(other) + unless other.is_a?(self.class) + other = self.class.new(other) + end + if (ret = @major <=> other.major) == 0 + return @minor <=> other.minor + end + return ret + end + + def to_s + format("%d.%d", @major, @minor) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/log.rb b/lib/ruby-1.9.1-rc1/lib/webrick/log.rb new file mode 100644 index 0000000..5d4fd0a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/log.rb @@ -0,0 +1,88 @@ +# +# log.rb -- Log Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: log.rb,v 1.26 2002/10/06 17:06:10 gotoyuzo Exp $ + +module WEBrick + class BasicLog + # log-level constant + FATAL, ERROR, WARN, INFO, DEBUG = 1, 2, 3, 4, 5 + + attr_accessor :level + + def initialize(log_file=nil, level=nil) + @level = level || INFO + case log_file + when String + @log = open(log_file, "a+") + @log.sync = true + @opened = true + when NilClass + @log = $stderr + else + @log = log_file # requires "<<". (see BasicLog#log) + end + end + + def close + @log.close if @opened + @log = nil + end + + def log(level, data) + if @log && level <= @level + data += "\n" if /\n\Z/ !~ data + @log << data + end + end + + def <<(obj) + log(INFO, obj.to_s) + end + + def fatal(msg) log(FATAL, "FATAL " << format(msg)); end + def error(msg) log(ERROR, "ERROR " << format(msg)); end + def warn(msg) log(WARN, "WARN " << format(msg)); end + def info(msg) log(INFO, "INFO " << format(msg)); end + def debug(msg) log(DEBUG, "DEBUG " << format(msg)); end + + def fatal?; @level >= FATAL; end + def error?; @level >= ERROR; end + def warn?; @level >= WARN; end + def info?; @level >= INFO; end + def debug?; @level >= DEBUG; end + + private + + def format(arg) + str = if arg.is_a?(Exception) + "#{arg.class}: #{arg.message}\n\t" << + arg.backtrace.join("\n\t") << "\n" + elsif arg.respond_to?(:to_str) + arg.to_str + else + arg.inspect + end + end + end + + class Log < BasicLog + attr_accessor :time_format + + def initialize(log_file=nil, level=nil) + super(log_file, level) + @time_format = "[%Y-%m-%d %H:%M:%S]" + end + + def log(level, data) + tmp = Time.now.strftime(@time_format) + tmp << " " << data + super(level, tmp) + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/server.rb b/lib/ruby-1.9.1-rc1/lib/webrick/server.rb new file mode 100644 index 0000000..d0b6f2b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/server.rb @@ -0,0 +1,210 @@ +# +# server.rb -- GenericServer Class +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: server.rb,v 1.62 2003/07/22 19:20:43 gotoyuzo Exp $ + +require 'thread' +require 'socket' +require 'webrick/config' +require 'webrick/log' + +module WEBrick + + class ServerError < StandardError; end + + class SimpleServer + def SimpleServer.start + yield + end + end + + class Daemon + def Daemon.start + exit!(0) if fork + Process::setsid + exit!(0) if fork + Dir::chdir("/") + File::umask(0) + STDIN.reopen("/dev/null") + STDOUT.reopen("/dev/null", "w") + STDERR.reopen("/dev/null", "w") + yield if block_given? + end + end + + class GenericServer + attr_reader :status, :config, :logger, :tokens, :listeners + + def initialize(config={}, default=Config::General) + @config = default.dup.update(config) + @status = :Stop + @config[:Logger] ||= Log::new + @logger = @config[:Logger] + + @tokens = SizedQueue.new(@config[:MaxClients]) + @config[:MaxClients].times{ @tokens.push(nil) } + + webrickv = WEBrick::VERSION + rubyv = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]" + @logger.info("WEBrick #{webrickv}") + @logger.info("ruby #{rubyv}") + + @listeners = [] + unless @config[:DoNotListen] + if @config[:Listen] + warn(":Listen option is deprecated; use GenericServer#listen") + end + listen(@config[:BindAddress], @config[:Port]) + if @config[:Port] == 0 + @config[:Port] = @listeners[0].addr[1] + end + end + end + + def [](key) + @config[key] + end + + def listen(address, port) + @listeners += Utils::create_listeners(address, port, @logger) + end + + def start(&block) + raise ServerError, "already started." if @status != :Stop + server_type = @config[:ServerType] || SimpleServer + + server_type.start{ + @logger.info \ + "#{self.class}#start: pid=#{$$} port=#{@config[:Port]}" + call_callback(:StartCallback) + + thgroup = ThreadGroup.new + @status = :Running + while @status == :Running + begin + if svrs = IO.select(@listeners, nil, nil, 2.0) + svrs[0].each{|svr| + @tokens.pop # blocks while no token is there. + if sock = accept_client(svr) + sock.do_not_reverse_lookup = config[:DoNotReverseLookup] + th = start_thread(sock, &block) + th[:WEBrickThread] = true + thgroup.add(th) + else + @tokens.push(nil) + end + } + end + rescue Errno::EBADF, IOError => ex + # if the listening socket was closed in GenericServer#shutdown, + # IO::select raise it. + rescue Exception => ex + msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" + @logger.error msg + end + end + + @logger.info "going to shutdown ..." + thgroup.list.each{|th| th.join if th[:WEBrickThread] } + call_callback(:StopCallback) + @logger.info "#{self.class}#start done." + @status = :Stop + } + end + + def stop + if @status == :Running + @status = :Shutdown + end + end + + def shutdown + stop + @listeners.each{|s| + if @logger.debug? + addr = s.addr + @logger.debug("close TCPSocket(#{addr[2]}, #{addr[1]})") + end + begin + s.shutdown + rescue Errno::ENOTCONN + # when `Errno::ENOTCONN: Socket is not connected' on some platforms, + # call #close instead of #shutdown. + # (ignore @config[:ShutdownSocketWithoutClose]) + s.close + else + unless @config[:ShutdownSocketWithoutClose] + s.close + end + end + } + @listeners.clear + end + + def run(sock) + @logger.fatal "run() must be provided by user." + end + + private + + def accept_client(svr) + sock = nil + begin + sock = svr.accept + sock.sync = true + Utils::set_non_blocking(sock) + Utils::set_close_on_exec(sock) + rescue Errno::ECONNRESET, Errno::ECONNABORTED, + Errno::EPROTO, Errno::EINVAL => ex + rescue Exception => ex + msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" + @logger.error msg + end + return sock + end + + def start_thread(sock, &block) + Thread.start{ + begin + Thread.current[:WEBrickSocket] = sock + begin + addr = sock.peeraddr + @logger.debug "accept: #{addr[3]}:#{addr[1]}" + rescue SocketError + @logger.debug "accept:
      " + raise + end + call_callback(:AcceptCallback, sock) + block ? block.call(sock) : run(sock) + rescue Errno::ENOTCONN + @logger.debug "Errno::ENOTCONN raised" + rescue ServerError => ex + msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" + @logger.error msg + rescue Exception => ex + @logger.error ex + ensure + @tokens.push(nil) + Thread.current[:WEBrickSocket] = nil + if addr + @logger.debug "close: #{addr[3]}:#{addr[1]}" + else + @logger.debug "close:
      " + end + sock.close + end + } + end + + def call_callback(callback_name, *args) + if cb = @config[callback_name] + cb.call(*args) + end + end + end # end of GenericServer +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/ssl.rb b/lib/ruby-1.9.1-rc1/lib/webrick/ssl.rb new file mode 100644 index 0000000..4c71c87 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/ssl.rb @@ -0,0 +1,126 @@ +# +# ssl.rb -- SSL/TLS enhancement for GenericServer +# +# Copyright (c) 2003 GOTOU Yuuzou All rights reserved. +# +# $Id: ssl.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require 'webrick' +require 'openssl' + +module WEBrick + module Config + svrsoft = General[:ServerSoftware] + osslv = ::OpenSSL::OPENSSL_VERSION.split[1] + SSL = { + :ServerSoftware => "#{svrsoft} OpenSSL/#{osslv}", + :SSLEnable => false, + :SSLCertificate => nil, + :SSLPrivateKey => nil, + :SSLClientCA => nil, + :SSLExtraChainCert => nil, + :SSLCACertificateFile => nil, + :SSLCACertificatePath => nil, + :SSLCertificateStore => nil, + :SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE, + :SSLVerifyDepth => nil, + :SSLVerifyCallback => nil, # custom verification + :SSLTimeout => nil, + :SSLOptions => nil, + :SSLStartImmediately => true, + # Must specify if you use auto generated certificate. + :SSLCertName => nil, + :SSLCertComment => "Generated by Ruby/OpenSSL" + } + General.update(SSL) + end + + module Utils + def create_self_signed_cert(bits, cn, comment) + rsa = OpenSSL::PKey::RSA.new(bits){|p, n| + case p + when 0; $stderr.putc "." # BN_generate_prime + when 1; $stderr.putc "+" # BN_generate_prime + when 2; $stderr.putc "*" # searching good prime, + # n = #of try, + # but also data from BN_generate_prime + when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, + # but also data from BN_generate_prime + else; $stderr.putc "*" # BN_generate_prime + end + } + cert = OpenSSL::X509::Certificate.new + cert.version = 3 + cert.serial = 0 + name = OpenSSL::X509::Name.new(cn) + cert.subject = name + cert.issuer = name + cert.not_before = Time.now + cert.not_after = Time.now + (365*24*60*60) + cert.public_key = rsa.public_key + + ef = OpenSSL::X509::ExtensionFactory.new(nil,cert) + ef.issuer_certificate = cert + cert.extensions = [ + ef.create_extension("basicConstraints","CA:FALSE"), + ef.create_extension("keyUsage", "keyEncipherment"), + ef.create_extension("subjectKeyIdentifier", "hash"), + ef.create_extension("extendedKeyUsage", "serverAuth"), + ef.create_extension("nsComment", comment), + ] + aki = ef.create_extension("authorityKeyIdentifier", + "keyid:always,issuer:always") + cert.add_extension(aki) + cert.sign(rsa, OpenSSL::Digest::SHA1.new) + + return [ cert, rsa ] + end + module_function :create_self_signed_cert + end + + class GenericServer + def ssl_context + @ssl_context ||= nil + end + + def listen(address, port) + listeners = Utils::create_listeners(address, port, @logger) + if @config[:SSLEnable] + unless ssl_context + @ssl_context = setup_ssl_context(@config) + @logger.info("\n" + @config[:SSLCertificate].to_text) + end + listeners.collect!{|svr| + ssvr = ::OpenSSL::SSL::SSLServer.new(svr, ssl_context) + ssvr.start_immediately = @config[:SSLStartImmediately] + ssvr + } + end + @listeners += listeners + end + + def setup_ssl_context(config) + unless config[:SSLCertificate] + cn = config[:SSLCertName] + comment = config[:SSLCertComment] + cert, key = Utils::create_self_signed_cert(1024, cn, comment) + config[:SSLCertificate] = cert + config[:SSLPrivateKey] = key + end + ctx = OpenSSL::SSL::SSLContext.new + ctx.key = config[:SSLPrivateKey] + ctx.cert = config[:SSLCertificate] + ctx.client_ca = config[:SSLClientCA] + ctx.extra_chain_cert = config[:SSLExtraChainCert] + ctx.ca_file = config[:SSLCACertificateFile] + ctx.ca_path = config[:SSLCACertificatePath] + ctx.cert_store = config[:SSLCertificateStore] + ctx.verify_mode = config[:SSLVerifyClient] + ctx.verify_depth = config[:SSLVerifyDepth] + ctx.verify_callback = config[:SSLVerifyCallback] + ctx.timeout = config[:SSLTimeout] + ctx.options = config[:SSLOptions] + ctx + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/utils.rb b/lib/ruby-1.9.1-rc1/lib/webrick/utils.rb new file mode 100644 index 0000000..f2ecfc1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/utils.rb @@ -0,0 +1,175 @@ +# +# utils.rb -- Miscellaneous utilities +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou +# Copyright (c) 2002 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: utils.rb,v 1.10 2003/02/16 22:22:54 gotoyuzo Exp $ + +require 'socket' +require 'fcntl' +begin + require 'etc' +rescue LoadError + nil +end + +module WEBrick + module Utils + def set_non_blocking(io) + flag = File::NONBLOCK + if defined?(Fcntl::F_GETFL) + flag |= io.fcntl(Fcntl::F_GETFL) + end + io.fcntl(Fcntl::F_SETFL, flag) + end + module_function :set_non_blocking + + def set_close_on_exec(io) + if defined?(Fcntl::FD_CLOEXEC) + io.fcntl(Fcntl::FD_CLOEXEC, 1) + end + end + module_function :set_close_on_exec + + def su(user) + if defined?(Etc) + pw = Etc.getpwnam(user) + Process::initgroups(user, pw.gid) + Process::Sys::setgid(pw.gid) + Process::Sys::setuid(pw.uid) + else + warn("WEBrick::Utils::su doesn't work on this platform") + end + end + module_function :su + + def getservername + host = Socket::gethostname + begin + Socket::gethostbyname(host)[0] + rescue + host + end + end + module_function :getservername + + def create_listeners(address, port, logger=nil) + unless port + raise ArgumentError, "must specify port" + end + res = Socket::getaddrinfo(address, port, + Socket::AF_UNSPEC, # address family + Socket::SOCK_STREAM, # socket type + 0, # protocol + Socket::AI_PASSIVE) # flag + last_error = nil + sockets = [] + res.each{|ai| + begin + logger.debug("TCPServer.new(#{ai[3]}, #{port})") if logger + sock = TCPServer.new(ai[3], port) + port = sock.addr[1] if port == 0 + Utils::set_close_on_exec(sock) + sockets << sock + rescue => ex + logger.warn("TCPServer Error: #{ex}") if logger + last_error = ex + end + } + raise last_error if sockets.empty? + return sockets + end + module_function :create_listeners + + RAND_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + "0123456789" + + "abcdefghijklmnopqrstuvwxyz" + + def random_string(len) + rand_max = RAND_CHARS.bytesize + ret = "" + len.times{ ret << RAND_CHARS[rand(rand_max)] } + ret + end + module_function :random_string + + ########### + + require "thread" + require "timeout" + require "singleton" + + class TimeoutHandler + include Singleton + TimeoutMutex = Mutex.new + + def TimeoutHandler.register(seconds, exception) + TimeoutMutex.synchronize{ + instance.register(Thread.current, Time.now + seconds, exception) + } + end + + def TimeoutHandler.cancel(id) + TimeoutMutex.synchronize{ + instance.cancel(Thread.current, id) + } + end + + def initialize + @timeout_info = Hash.new + Thread.start{ + while true + now = Time.now + @timeout_info.each{|thread, ary| + ary.dup.each{|info| + time, exception = *info + interrupt(thread, info.object_id, exception) if time < now + } + } + sleep 0.5 + end + } + end + + def interrupt(thread, id, exception) + TimeoutMutex.synchronize{ + if cancel(thread, id) && thread.alive? + thread.raise(exception, "execution timeout") + end + } + end + + def register(thread, time, exception) + @timeout_info[thread] ||= Array.new + @timeout_info[thread] << [time, exception] + return @timeout_info[thread].last.object_id + end + + def cancel(thread, id) + if ary = @timeout_info[thread] + ary.delete_if{|info| info.object_id == id } + if ary.empty? + @timeout_info.delete(thread) + end + return true + end + return false + end + end + + def timeout(seconds, exception=Timeout::Error) + return yield if seconds.nil? or seconds.zero? + # raise ThreadError, "timeout within critical session" if Thread.critical + id = TimeoutHandler.register(seconds, exception) + begin + yield(seconds) + ensure + TimeoutHandler.cancel(id) + end + end + module_function :timeout + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/webrick/version.rb b/lib/ruby-1.9.1-rc1/lib/webrick/version.rb new file mode 100644 index 0000000..b2b9fd3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/webrick/version.rb @@ -0,0 +1,13 @@ +# +# version.rb -- version and release date +# +# Author: IPR -- Internet Programming with Ruby -- writers +# Copyright (c) 2000 TAKAHASHI Masayoshi, GOTOU YUUZOU +# Copyright (c) 2003 Internet Programming with Ruby writers. All rights +# reserved. +# +# $IPR: version.rb,v 1.74 2003/07/22 19:20:43 gotoyuzo Exp $ + +module WEBrick + VERSION = "1.3.1" +end diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/.document b/lib/ruby-1.9.1-rc1/lib/xmlrpc/.document new file mode 100644 index 0000000..e475c53 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/.document @@ -0,0 +1 @@ +README.rdoc diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.rdoc b/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.rdoc new file mode 100644 index 0000000..221d675 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.rdoc @@ -0,0 +1,300 @@ += XMLRPC for Ruby + +== Author and Copyright + +Copyright (C) 2001-2004 by Michael Neumann (mailto:mneumann@ntecs.de) + +Released under the same term of license as Ruby. + +== Overview + +XMLRPC is a lightweight protocol that enables remote procedure calls over +HTTP. It is defined at http://www.xmlrpc.com. + +XMLRPC allows you to create simple distributed computing solutions that span +computer languages. Its distinctive feature is its simplicity compared to +other approaches like SOAP and CORBA. + +The Ruby standard library package 'xmlrpc' enables you to create a server that +implements remote procedures and a client that calls them. Very little code +is required to achieve either of these. + +== Example + +Try the following code. It calls a standard demonstration remote procedure. + + require 'xmlrpc/client' + require 'pp' + + server = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php") + result = server.call("sample.sumAndDifference", 5, 3) + pp result + +== Documentation + +See http://www.ntecs.de/projects/xmlrpc4r. There is plenty of detail there to +use the client and implement a server. + +== Features of XMLRPC for Ruby + +* Extensions + * Introspection + * multiCall + * optionally nil values and integers larger than 32 Bit + +* Server + * Standalone XML-RPC server + * CGI-based (works with FastCGI) + * Apache mod_ruby server + * WEBrick servlet + +* Client + * synchronous/asynchronous calls + * Basic HTTP-401 Authentification + * HTTPS protocol (SSL) + +* Parsers + * NQXML (NQXMLStreamParser, NQXMLTreeParser) + * Expat (XMLStreamParser, XMLTreeParser) + * REXML (REXMLStreamParser) + * xml-scan (XMLScanStreamParser) + * Fastest parser is Expat's XMLStreamParser! + +* General + * possible to choose between XMLParser module (Expat wrapper) and REXML/NQXML (pure Ruby) parsers + * Marshalling Ruby objects to Hashs and reconstruct them later from a Hash + * SandStorm component architecture Client interface + +== Howto + +=== Client + + require "xmlrpc/client" + + # Make an object to represent the XML-RPC server. + server = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") + + # Call the remote server and get our result + result = server.call("sample.sumAndDifference", 5, 3) + + sum = result["sum"] + difference = result["difference"] + + puts "Sum: #{sum}, Difference: #{difference}" + +=== Client with XML-RPC fault-structure handling + +There are two possible ways, of handling a fault-structure: + +==== by catching a XMLRPC::FaultException exception + + require "xmlrpc/client" + + # Make an object to represent the XML-RPC server. + server = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") + + begin + # Call the remote server and get our result + result = server.call("sample.sumAndDifference", 5, 3) + + sum = result["sum"] + difference = result["difference"] + + puts "Sum: #{sum}, Difference: #{difference}" + + rescue XMLRPC::FaultException => e + puts "Error: " + puts e.faultCode + puts e.faultString + end + +==== by calling "call2" which returns a boolean + + require "xmlrpc/client" + + # Make an object to represent the XML-RPC server. + server = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") + + # Call the remote server and get our result + ok, result = server.call2("sample.sumAndDifference", 5, 3) + + if ok + sum = result["sum"] + difference = result["difference"] + + puts "Sum: #{sum}, Difference: #{difference}" + else + puts "Error: " + puts result.faultCode + puts result.faultString + end + +=== Client using Proxy + +You can create a +Proxy+ object onto which you can call methods. This way it +looks nicer. Both forms, _call_ and _call2_ are supported through _proxy_ and +proxy2. You can additionally give arguments to the Proxy, which will be +given to each XML-RPC call using that Proxy. + + require "xmlrpc/client" + + # Make an object to represent the XML-RPC server. + server = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") + + # Create a Proxy object + sample = server.proxy("sample") + + # Call the remote server and get our result + result = sample.sumAndDifference(5,3) + + sum = result["sum"] + difference = result["difference"] + + puts "Sum: #{sum}, Difference: #{difference}" + +=== CGI-based Server + +There are also two ways to define handler, the first is +like C/PHP, the second like Java, of course both ways +can be mixed: + +==== C/PHP-like (handler functions) + + require "xmlrpc/server" + + s = XMLRPC::CGIServer.new + + s.add_handler("sample.sumAndDifference") do |a,b| + { "sum" => a + b, "difference" => a - b } + end + + s.serve + +==== Java-like (handler classes) + + require "xmlrpc/server" + + s = XMLRPC::CGIServer.new + + class MyHandler + def sumAndDifference(a, b) + { "sum" => a + b, "difference" => a - b } + end + end + + # NOTE: Security Hole (read below)!!! + s.add_handler("sample", MyHandler.new) + s.serve + + +To return a fault-structure you have to raise an FaultException e.g.: + + raise XMLRPC::FaultException.new(3, "division by Zero") + +===== Security Note + +From Brian Candler: + + Above code sample has an extremely nasty security hole, in that you can now call + any method of 'MyHandler' remotely, including methods inherited from Object + and Kernel! For example, in the client code, you can use + + puts server.call("sample.send","`","ls") + + (backtick being the method name for running system processes). Needless to + say, 'ls' can be replaced with something else. + + The version which binds proc objects (or the version presented below in the next section) + doesn't have this problem, but people may be tempted to use the second version because it's + so nice and 'Rubyesque'. I think it needs a big red disclaimer. + + +From Michael: + +A solution is to undef insecure methods or to use (({XMLRPC::iPIMethods})) as shown below: + + class MyHandler + def sumAndDifference(a, b) + { "sum" => a + b, "difference" => a - b } + end + end + + # ... server initialization ... + + s.add_handler(XMLRPC::iPIMethods("sample"), MyHandler.new) + + # ... + +This adds only public instance methods explicitly declared in class MyHandler +(and not those inherited from any other class). + +==== With interface declarations + +Code sample from the book Ruby Developer's Guide: + + require "xmlrpc/server" + + class Num + INTERFACE = XMLRPC::interface("num") { + meth 'int add(int, int)', 'Add two numbers', 'add' + meth 'int div(int, int)', 'Divide two numbers' + } + + def add(a, b) a + b end + def div(a, b) a / b end + end + + + s = XMLRPC::CGIServer.new + s.add_handler(Num::INTERFACE, Num.new) + s.serve + +=== Standalone server + +Same as CGI-based server, only that the line + + server = XMLRPC::CGIServer.new + +must be changed to + + server = XMLRPC::Server.new(8080) + +if you want a server listening on port 8080. +The rest is the same. + +=== Choosing a different XML Parser or XML Writer + +The examples above all use the default parser (which is now since 1.8 +REXMLStreamParser) and a default XML writer. If you want to use a different +XML parser, then you have to call the set_parser method of +XMLRPC::Client instances or instances of subclasses of +XMLRPC::BasicServer or by editing xmlrpc/config.rb. + +Client Example: + + # ... + server = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") + server.set_parser(XMLRPC::XMLParser::XMLParser.new) + # ... + +Server Example: + + # ... + s = XMLRPC::CGIServer.new + s.set_parser(XMLRPC::XMLParser::XMLStreamParser.new) + # ... + +or: + + # ... + server = XMLRPC::Server.new(8080) + server.set_parser(XMLRPC::XMLParser::NQXMLParser.new) + # ... + + +Note that XMLStreamParser is incredible faster (and uses less memory) than any +other parser and scales well for large documents. For example for a 0.5 MB XML +document with many tags, XMLStreamParser is ~350 (!) times faster than +NQXMLTreeParser and still ~18 times as fast as XMLTreeParser. + +You can change the XML-writer by calling method set_writer. diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.txt b/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.txt new file mode 100644 index 0000000..ade842d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/README.txt @@ -0,0 +1,31 @@ += XMLRPC for Ruby, Standard Library Documentation + +== Overview + +XMLRPC is a lightweight protocol that enables remote procedure calls over +HTTP. It is defined at http://www.xmlrpc.com. + +XMLRPC allows you to create simple distributed computing solutions that span +computer languages. Its distinctive feature is its simplicity compared to +other approaches like SOAP and CORBA. + +The Ruby standard library package 'xmlrpc' enables you to create a server that +implements remote procedures and a client that calls them. Very little code +is required to achieve either of these. + +== Example + +Try the following code. It calls a standard demonstration remote procedure. + + require 'xmlrpc/client' + require 'pp' + + server = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php") + result = server.call("sample.sumAndDifference", 5, 3) + pp result + +== Documentation + +See http://www.ntecs.de/projects/xmlrpc4r. There is plenty of detail there to +use the client and implement a server. + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/base64.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/base64.rb new file mode 100644 index 0000000..0fe5b82 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/base64.rb @@ -0,0 +1,81 @@ +=begin += xmlrpc/base64.rb +Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) + +Released under the same term of license as Ruby. + += Classes +* (()) + += XMLRPC::Base64 +== Description +This class is necessary for (('xmlrpc4r')) to determine that a string should +be transmitted base64-encoded and not as a raw-string. +You can use (({XMLRPC::Base64})) on the client and server-side as a +parameter and/or return-value. + +== Class Methods +--- XMLRPC::Base64.new( str, state = :dec ) + Creates a new (({XMLRPC::Base64})) instance with string ((|str|)) as the + internal string. When ((|state|)) is (({:dec})) it assumes that the + string ((|str|)) is not in base64 format (perhaps already decoded), + otherwise if ((|state|)) is (({:enc})) it decodes ((|str|)) + and stores it as the internal string. + +--- XMLRPC::Base64.decode( str ) + Decodes string ((|str|)) with base64 and returns that value. + +--- XMLRPC::Base64.encode( str ) + Encodes string ((|str|)) with base64 and returns that value. + +== Instance Methods +--- XMLRPC::Base64#decoded + Returns the internal string decoded. + +--- XMLRPC::Base64#encoded + Returns the internal string encoded with base64. + +=end + +module XMLRPC + +class Base64 + + def initialize(str, state = :dec) + case state + when :enc + @str = Base64.decode(str) + when :dec + @str = str + else + raise ArgumentError, "wrong argument; either :enc or :dec" + end + end + + def decoded + @str + end + + def encoded + Base64.encode(@str) + end + + + def Base64.decode(str) + str.gsub(/\s+/, "").unpack("m")[0] + end + + def Base64.encode(str) + [str].pack("m") + end + +end + + +end # module XMLRPC + + +=begin += History + $Id: base64.rb 11708 2007-02-12 23:01:19Z shyouhei $ +=end diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/client.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/client.rb new file mode 100644 index 0000000..07ea688 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/client.rb @@ -0,0 +1,625 @@ +=begin += xmlrpc/client.rb +Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) + +Released under the same term of license as Ruby. + += Classes +* (()) +* (()) + + += XMLRPC::Client +== Synopsis + require "xmlrpc/client" + + server = XMLRPC::Client.new("www.ruby-lang.org", "/RPC2", 80) + begin + param = server.call("michael.add", 4, 5) + puts "4 + 5 = #{param}" + rescue XMLRPC::FaultException => e + puts "Error:" + puts e.faultCode + puts e.faultString + end + +or + + require "xmlrpc/client" + + server = XMLRPC::Client.new("www.ruby-lang.org", "/RPC2", 80) + ok, param = server.call2("michael.add", 4, 5) + if ok then + puts "4 + 5 = #{param}" + else + puts "Error:" + puts param.faultCode + puts param.faultString + end + +== Description +Class (({XMLRPC::Client})) provides remote procedure calls to a XML-RPC server. +After setting the connection-parameters with (()) which +creates a new (({XMLRPC::Client})) instance, you can execute a remote procedure +by sending the (()) or (()) +message to this new instance. The given parameters indicate which method to +call on the remote-side and of course the parameters for the remote procedure. + +== Class Methods +--- XMLRPC::Client.new( host=nil, path=nil, port=nil, proxy_host=nil, proxy_port=nil, user=nil, password=nil, use_ssl=false, timeout =nil) + Creates an object which represents the remote XML-RPC server on the + given host ((|host|)). If the server is CGI-based, ((|path|)) is the + path to the CGI-script, which will be called, otherwise (in the + case of a standalone server) ((|path|)) should be (({"/RPC2"})). + ((|port|)) is the port on which the XML-RPC server listens. + If ((|proxy_host|)) is given, then a proxy server listening at + ((|proxy_host|)) is used. ((|proxy_port|)) is the port of the + proxy server. + + Default values for ((|host|)), ((|path|)) and ((|port|)) are 'localhost', '/RPC2' and + '80' respectively using SSL '443'. + + If ((|user|)) and ((|password|)) are given, each time a request is send, + a Authorization header is send. Currently only Basic Authentification is + implemented no Digest. + + If ((|use_ssl|)) is set to (({true})), comunication over SSL is enabled. + Note, that you need the SSL package from RAA installed. + + Parameter ((|timeout|)) is the time to wait for a XML-RPC response, defaults to 30. + +--- XMLRPC::Client.new2( uri, proxy=nil, timeout=nil) +--- XMLRPC::Client.new_from_uri( uri, proxy=nil, timeout=nil) +: uri + URI specifying protocol (http or https), host, port, path, user and password. + Example: https://user:password@host:port/path + +: proxy + Is of the form "host:port". + +: timeout + Defaults to 30. + +--- XMLRPC::Client.new3( hash={} ) +--- XMLRPC::Client.new_from_hash( hash={} ) + Parameter ((|hash|)) has following case-insensitive keys: + * host + * path + * port + * proxy_host + * proxy_port + * user + * password + * use_ssl + * timeout + + Calls (()) with the corresponding values. + +== Instance Methods +--- XMLRPC::Client#call( method, *args ) + Invokes the method named ((|method|)) with the parameters given by + ((|args|)) on the XML-RPC server. + The parameter ((|method|)) is converted into a (({String})) and should + be a valid XML-RPC method-name. + Each parameter of ((|args|)) must be of one of the following types, + where (({Hash})), (({Struct})) and (({Array})) can contain any of these listed ((:types:)): + * (({Fixnum})), (({Bignum})) + * (({TrueClass})), (({FalseClass})) ((({true})), (({false}))) + * (({String})), (({Symbol})) + * (({Float})) + * (({Hash})), (({Struct})) + * (({Array})) + * (({Date})), (({Time})), (({XMLRPC::DateTime})) + * (({XMLRPC::Base64})) + * A Ruby object which class includes XMLRPC::Marshallable (only if Config::ENABLE_MARSHALLABLE is (({true}))). + That object is converted into a hash, with one additional key/value pair "___class___" which contains the class name + for restoring later that object. + + The method returns the return-value from the RPC + ((-stands for Remote Procedure Call-)). + The type of the return-value is one of the above shown, + only that a (({Bignum})) is only allowed when it fits in 32-bit and + that a XML-RPC (('dateTime.iso8601')) type is always returned as + a ((<(({XMLRPC::DateTime}))|URL:datetime.html>)) object and + a (({Struct})) is never returned, only a (({Hash})), the same for a (({Symbol})), where + always a (({String})) is returned. + A (({XMLRPC::Base64})) is returned as a (({String})) from xmlrpc4r version 1.6.1 on. + + If the remote procedure returned a fault-structure, then a + (({XMLRPC::FaultException})) exception is raised, which has two accessor-methods + (({faultCode})) and (({faultString})) of type (({Integer})) and (({String})). + +--- XMLRPC::Client#call2( method, *args ) + The difference between this method and (()) is, that + this method do ((*not*)) raise a (({XMLRPC::FaultException})) exception. + The method returns an array of two values. The first value indicates if + the second value is a return-value ((({true}))) or an object of type + (({XMLRPC::FaultException})). + Both are explained in (()). + + Simple to remember: The "2" in "call2" denotes the number of values it returns. + +--- XMLRPC::Client#multicall( *methods ) + You can use this method to execute several methods on a XMLRPC server which supports + the multi-call extension. + Example: + + s.multicall( + ['michael.add', 3, 4], + ['michael.sub', 4, 5] + ) + # => [7, -1] + +--- XMLRPC::Client#multicall2( *methods ) + Same as (()), but returns like (()) two parameters + instead of raising an (({XMLRPC::FaultException})). + +--- XMLRPC::Client#proxy( prefix, *args ) + Returns an object of class (({XMLRPC::Client::Proxy})), initialized with + ((|prefix|)) and ((|args|)). A proxy object returned by this method behaves + like (()), i.e. a call on that object will raise a + (({XMLRPC::FaultException})) when a fault-structure is returned by that call. + +--- XMLRPC::Client#proxy2( prefix, *args ) + Almost the same like (()) only that a call on the returned + (({XMLRPC::Client::Proxy})) object behaves like (()), i.e. + a call on that object will return two parameters. + + + + +--- XMLRPC::Client#call_async(...) +--- XMLRPC::Client#call2_async(...) +--- XMLRPC::Client#multicall_async(...) +--- XMLRPC::Client#multicall2_async(...) +--- XMLRPC::Client#proxy_async(...) +--- XMLRPC::Client#proxy2_async(...) + In contrast to corresponding methods without "_async", these can be + called concurrently and use for each request a new connection, where the + non-asynchronous counterparts use connection-alive (one connection for all requests) + if possible. + + Note, that you have to use Threads to call these methods concurrently. + The following example calls two methods concurrently: + + Thread.new { + p client.call_async("michael.add", 4, 5) + } + + Thread.new { + p client.call_async("michael.div", 7, 9) + } + + +--- XMLRPC::Client#timeout +--- XMLRPC::Client#user +--- XMLRPC::Client#password + Return the corresponding attributes. + +--- XMLRPC::Client#timeout= (new_timeout) +--- XMLRPC::Client#user= (new_user) +--- XMLRPC::Client#password= (new_password) + Set the corresponding attributes. + + +--- XMLRPC::Client#set_writer( writer ) + Sets the XML writer to use for generating XML output. + Should be an instance of a class from module (({XMLRPC::XMLWriter})). + If this method is not called, then (({XMLRPC::Config::DEFAULT_WRITER})) is used. + +--- XMLRPC::Client#set_parser( parser ) + Sets the XML parser to use for parsing XML documents. + Should be an instance of a class from module (({XMLRPC::XMLParser})). + If this method is not called, then (({XMLRPC::Config::DEFAULT_PARSER})) is used. + +--- XMLRPC::Client#cookie +--- XMLRPC::Client#cookie= (cookieString) + Get and set the HTTP Cookie header. + +--- XMLRPC::Client#http_header_extra= (additionalHeaders) + Set extra HTTP headers that are included in the request. + +--- XMLRPC::Client#http_header_extra + Access the via (()) assigned header. + +--- XMLRPC::Client#http_last_response + Returns the (({Net::HTTPResponse})) object of the last RPC. + += XMLRPC::Client::Proxy +== Synopsis + require "xmlrpc/client" + + server = XMLRPC::Client.new("www.ruby-lang.org", "/RPC2", 80) + + michael = server.proxy("michael") + michael2 = server.proxy("michael", 4) + + # both calls should return the same value '9'. + p michael.add(4,5) + p michael2.add(5) + +== Description +Class (({XMLRPC::Client::Proxy})) makes XML-RPC calls look nicer! +You can call any method onto objects of that class - the object handles +(({method_missing})) and will forward the method call to a XML-RPC server. +Don't use this class directly, but use instead method (()) or +(()). + +== Class Methods +--- XMLRPC::Client::Proxy.new( server, prefix, args=[], meth=:call, delim="." ) + Creates an object which provides (({method_missing})). + + ((|server|)) must be of type (({XMLRPC::Client})), which is the XML-RPC server to be used + for a XML-RPC call. ((|prefix|)) and ((|delim|)) will be prepended to the methodname + called onto this object. + + Parameter ((|meth|)) is the method (call, call2, call_async, call2_async) to use for + a RPC. + + ((|args|)) are arguments which are automatically given + to every XML-RPC call before the arguments provides through (({method_missing})). + +== Instance Methods +Every method call is forwarded to the XML-RPC server defined in (()). + +Note: Inherited methods from class (({Object})) cannot be used as XML-RPC names, because they get around +(({method_missing})). + + + += History + $Id: client.rb 19657 2008-10-01 13:46:53Z mame $ + +=end + + + +require "xmlrpc/parser" +require "xmlrpc/create" +require "xmlrpc/config" +require "xmlrpc/utils" # ParserWriterChooseMixin +require "net/http" + +module XMLRPC + + class Client + + USER_AGENT = "XMLRPC::Client (Ruby #{RUBY_VERSION})" + + include ParserWriterChooseMixin + include ParseContentType + + + # Constructors ------------------------------------------------------------------- + + def initialize(host=nil, path=nil, port=nil, proxy_host=nil, proxy_port=nil, + user=nil, password=nil, use_ssl=nil, timeout=nil) + + @http_header_extra = nil + @http_last_response = nil + @cookie = nil + + @host = host || "localhost" + @path = path || "/RPC2" + @proxy_host = proxy_host + @proxy_port = proxy_port + @proxy_host ||= 'localhost' if @proxy_port != nil + @proxy_port ||= 8080 if @proxy_host != nil + @use_ssl = use_ssl || false + @timeout = timeout || 30 + + if use_ssl + require "net/https" + @port = port || 443 + else + @port = port || 80 + end + + @user, @password = user, password + + set_auth + + # convert ports to integers + @port = @port.to_i if @port != nil + @proxy_port = @proxy_port.to_i if @proxy_port != nil + + # HTTP object for synchronous calls + Net::HTTP.version_1_2 + @http = Net::HTTP.new(@host, @port, @proxy_host, @proxy_port) + @http.use_ssl = @use_ssl if @use_ssl + @http.read_timeout = @timeout + @http.open_timeout = @timeout + + @parser = nil + @create = nil + end + + + class << self + + def new2(uri, proxy=nil, timeout=nil) + if match = /^([^:]+):\/\/(([^@]+)@)?([^\/]+)(\/.*)?$/.match(uri) + proto = match[1] + user, passwd = (match[3] || "").split(":") + host, port = match[4].split(":") + path = match[5] + + if proto != "http" and proto != "https" + raise "Wrong protocol specified. Only http or https allowed!" + end + + else + raise "Wrong URI as parameter!" + end + + proxy_host, proxy_port = (proxy || "").split(":") + + self.new(host, path, port, proxy_host, proxy_port, user, passwd, (proto == "https"), timeout) + end + + alias new_from_uri new2 + + def new3(hash={}) + + # convert all keys into lowercase strings + h = {} + hash.each { |k,v| h[k.to_s.downcase] = v } + + self.new(h['host'], h['path'], h['port'], h['proxy_host'], h['proxy_port'], h['user'], h['password'], + h['use_ssl'], h['timeout']) + end + + alias new_from_hash new3 + + end + + + # Attribute Accessors ------------------------------------------------------------------- + + # add additional HTTP headers to the request + attr_accessor :http_header_extra + + # makes last HTTP response accessible + attr_reader :http_last_response + + # Cookie support + attr_accessor :cookie + + + attr_reader :timeout, :user, :password + + def timeout=(new_timeout) + @timeout = new_timeout + @http.read_timeout = @timeout + @http.open_timeout = @timeout + end + + def user=(new_user) + @user = new_user + set_auth + end + + def password=(new_password) + @password = new_password + set_auth + end + + # Call methods -------------------------------------------------------------- + + def call(method, *args) + ok, param = call2(method, *args) + if ok + param + else + raise param + end + end + + def call2(method, *args) + request = create().methodCall(method, *args) + data = do_rpc(request, false) + parser().parseMethodResponse(data) + end + + def call_async(method, *args) + ok, param = call2_async(method, *args) + if ok + param + else + raise param + end + end + + def call2_async(method, *args) + request = create().methodCall(method, *args) + data = do_rpc(request, true) + parser().parseMethodResponse(data) + end + + + # Multicall methods -------------------------------------------------------------- + + def multicall(*methods) + ok, params = multicall2(*methods) + if ok + params + else + raise params + end + end + + def multicall2(*methods) + gen_multicall(methods, false) + end + + def multicall_async(*methods) + ok, params = multicall2_async(*methods) + if ok + params + else + raise params + end + end + + def multicall2_async(*methods) + gen_multicall(methods, true) + end + + + # Proxy generating methods ------------------------------------------ + + def proxy(prefix=nil, *args) + Proxy.new(self, prefix, args, :call) + end + + def proxy2(prefix=nil, *args) + Proxy.new(self, prefix, args, :call2) + end + + def proxy_async(prefix=nil, *args) + Proxy.new(self, prefix, args, :call_async) + end + + def proxy2_async(prefix=nil, *args) + Proxy.new(self, prefix, args, :call2_async) + end + + + private # ---------------------------------------------------------- + + def set_auth + if @user.nil? + @auth = nil + else + a = "#@user" + a << ":#@password" if @password != nil + @auth = ("Basic " + [a].pack("m")).chomp + end + end + + def do_rpc(request, async=false) + header = { + "User-Agent" => USER_AGENT, + "Content-Type" => "text/xml; charset=utf-8", + "Content-Length" => request.size.to_s, + "Connection" => (async ? "close" : "keep-alive") + } + + header["Cookie"] = @cookie if @cookie + header.update(@http_header_extra) if @http_header_extra + + if @auth != nil + # add authorization header + header["Authorization"] = @auth + end + + resp = nil + @http_last_response = nil + + if async + # use a new HTTP object for each call + Net::HTTP.version_1_2 + http = Net::HTTP.new(@host, @port, @proxy_host, @proxy_port) + http.use_ssl = @use_ssl if @use_ssl + http.read_timeout = @timeout + http.open_timeout = @timeout + + # post request + http.start { + resp = http.post2(@path, request, header) + } + else + # reuse the HTTP object for each call => connection alive is possible + # we must start connection explicitely first time so that http.request + # does not assume that we don't want keepalive + @http.start if not @http.started? + + # post request + resp = @http.post2(@path, request, header) + end + + @http_last_response = resp + + data = resp.body + + if resp.code == "401" + # Authorization Required + raise "Authorization failed.\nHTTP-Error: #{resp.code} #{resp.message}" + elsif resp.code[0,1] != "2" + raise "HTTP-Error: #{resp.code} #{resp.message}" + end + + ct = parse_content_type(resp["Content-Type"]).first + if ct != "text/xml" + if ct == "text/html" + raise "Wrong content-type (received '#{ct}' but expected 'text/xml'): \n#{data}" + else + raise "Wrong content-type (received '#{ct}' but expected 'text/xml')" + end + end + + expected = resp["Content-Length"] || "" + if data.nil? or data.size == 0 + raise "Wrong size. Was #{data.size}, should be #{expected}" + elsif expected != "" and expected.to_i != data.size and resp["Transfer-Encoding"].nil? + raise "Wrong size. Was #{data.size}, should be #{expected}" + end + + set_cookies = resp.get_fields("Set-Cookie") + if set_cookies and !set_cookies.empty? + require 'webrick/cookie' + @cookie = set_cookies.collect do |set_cookie| + cookie = WEBrick::Cookie.parse_set_cookie(set_cookie) + WEBrick::Cookie.new(cookie.name, cookie.value).to_s + end.join("; ") + end + + return data + end + + def gen_multicall(methods=[], async=false) + meth = :call2 + meth = :call2_async if async + + ok, params = self.send(meth, "system.multicall", + methods.collect {|m| {'methodName' => m[0], 'params' => m[1..-1]} } + ) + + if ok + params = params.collect do |param| + if param.is_a? Array + param[0] + elsif param.is_a? Hash + XMLRPC::FaultException.new(param["faultCode"], param["faultString"]) + else + raise "Wrong multicall return value" + end + end + end + + return ok, params + end + + + + class Proxy + + def initialize(server, prefix, args=[], meth=:call, delim=".") + @server = server + @prefix = prefix ? prefix + delim : "" + @args = args + @meth = meth + end + + def method_missing(mid, *args) + pre = @prefix + mid.to_s + arg = @args + args + @server.send(@meth, pre, *arg) + end + + end # class Proxy + + end # class Client + +end # module XMLRPC + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/config.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/config.rb new file mode 100644 index 0000000..52f7340 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/config.rb @@ -0,0 +1,40 @@ +# +# $Id: config.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# Configuration file for XML-RPC for Ruby +# + +module XMLRPC + + module Config + + DEFAULT_WRITER = XMLWriter::Simple # or XMLWriter::XMLParser + + # available parser: + # * XMLParser::NQXMLTreeParser + # * XMLParser::NQXMLStreamParser + # * XMLParser::XMLTreeParser + # * XMLParser::XMLStreamParser (fastest) + # * XMLParser::REXMLStreamParser + # * XMLParser::XMLScanStreamParser + DEFAULT_PARSER = XMLParser::REXMLStreamParser + + # enable tag + ENABLE_NIL_CREATE = false + ENABLE_NIL_PARSER = false + + # allows integers greater than 32-bit if true + ENABLE_BIGINT = false + + # enable marshalling ruby objects which include XMLRPC::Marshallable + ENABLE_MARSHALLING = true + + # enable multiCall extension by default + ENABLE_MULTICALL = false + + # enable Introspection extension by default + ENABLE_INTROSPECTION = false + + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/create.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/create.rb new file mode 100644 index 0000000..31fdfb4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/create.rb @@ -0,0 +1,290 @@ +# +# Creates XML-RPC call/response documents +# +# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) +# +# $Id: create.rb 19657 2008-10-01 13:46:53Z mame $ +# + +require "date" +require "xmlrpc/base64" + +module XMLRPC + + module XMLWriter + + class Abstract + def ele(name, *children) + element(name, nil, *children) + end + + def tag(name, txt) + element(name, nil, text(txt)) + end + end + + + class Simple < Abstract + + def document_to_str(doc) + doc + end + + def document(*params) + params.join("") + end + + def pi(name, *params) + "" + end + + def element(name, attrs, *children) + raise "attributes not yet implemented" unless attrs.nil? + if children.empty? + "<#{name}/>" + else + "<#{name}>" + children.join("") + "" + end + end + + def text(txt) + cleaned = txt.dup + cleaned.gsub!(/&/, '&') + cleaned.gsub!(//, '>') + cleaned + end + + end # class Simple + + + class XMLParser < Abstract + + def initialize + require "xmltreebuilder" + end + + def document_to_str(doc) + doc.to_s + end + + def document(*params) + XML::SimpleTree::Document.new(*params) + end + + def pi(name, *params) + XML::SimpleTree::ProcessingInstruction.new(name, *params) + end + + def element(name, attrs, *children) + XML::SimpleTree::Element.new(name, attrs, *children) + end + + def text(txt) + XML::SimpleTree::Text.new(txt) + end + + end # class XMLParser + + Classes = [Simple, XMLParser] + + # yields an instance of each installed XML writer + def self.each_installed_writer + XMLRPC::XMLWriter::Classes.each do |klass| + begin + yield klass.new + rescue LoadError + end + end + end + + end # module XMLWriter + + class Create + + def initialize(xml_writer = nil) + @writer = xml_writer || Config::DEFAULT_WRITER.new + end + + + def methodCall(name, *params) + name = name.to_s + + if name !~ /[a-zA-Z0-9_.:\/]+/ + raise ArgumentError, "Wrong XML-RPC method-name" + end + + parameter = params.collect do |param| + @writer.ele("param", conv2value(param)) + end + + tree = @writer.document( + @writer.pi("xml", 'version="1.0"'), + @writer.ele("methodCall", + @writer.tag("methodName", name), + @writer.ele("params", *parameter) + ) + ) + + @writer.document_to_str(tree) + "\n" + end + + + + # + # generates a XML-RPC methodResponse document + # + # if is_ret == false then the params array must + # contain only one element, which is a structure + # of a fault return-value. + # + # if is_ret == true then a normal + # return-value of all the given params is created. + # + def methodResponse(is_ret, *params) + + if is_ret + resp = params.collect do |param| + @writer.ele("param", conv2value(param)) + end + + resp = [@writer.ele("params", *resp)] + else + if params.size != 1 or params[0] === XMLRPC::FaultException + raise ArgumentError, "no valid fault-structure given" + end + resp = @writer.ele("fault", conv2value(params[0].to_h)) + end + + + tree = @writer.document( + @writer.pi("xml", 'version="1.0"'), + @writer.ele("methodResponse", resp) + ) + + @writer.document_to_str(tree) + "\n" + end + + + + ##################################### + private + ##################################### + + # + # converts a Ruby object into + # a XML-RPC tag + # + def conv2value(param) + + val = case param + when Fixnum + @writer.tag("i4", param.to_s) + + when Bignum + if Config::ENABLE_BIGINT + @writer.tag("i4", param.to_s) + else + if param >= -(2**31) and param <= (2**31-1) + @writer.tag("i4", param.to_s) + else + raise "Bignum is too big! Must be signed 32-bit integer!" + end + end + when TrueClass, FalseClass + @writer.tag("boolean", param ? "1" : "0") + + when Symbol + @writer.tag("string", param.to_s) + + when String + @writer.tag("string", param) + + when NilClass + if Config::ENABLE_NIL_CREATE + @writer.ele("nil") + else + raise "Wrong type NilClass. Not allowed!" + end + + when Float + @writer.tag("double", param.to_s) + + when Struct + h = param.members.collect do |key| + value = param[key] + @writer.ele("member", + @writer.tag("name", key.to_s), + conv2value(value) + ) + end + + @writer.ele("struct", *h) + + when Hash + # TODO: can a Hash be empty? + + h = param.collect do |key, value| + @writer.ele("member", + @writer.tag("name", key.to_s), + conv2value(value) + ) + end + + @writer.ele("struct", *h) + + when Array + # TODO: can an Array be empty? + a = param.collect {|v| conv2value(v) } + + @writer.ele("array", + @writer.ele("data", *a) + ) + + when Time, Date, ::DateTime + @writer.tag("dateTime.iso8601", param.strftime("%Y%m%dT%H:%M:%S")) + + when XMLRPC::DateTime + @writer.tag("dateTime.iso8601", + format("%.4d%02d%02dT%02d:%02d:%02d", *param.to_a)) + + when XMLRPC::Base64 + @writer.tag("base64", param.encoded) + + else + if Config::ENABLE_MARSHALLING and param.class.included_modules.include? XMLRPC::Marshallable + # convert Ruby object into Hash + ret = {"___class___" => param.class.name} + param.instance_variables.each {|v| + name = v[1..-1] + val = param.instance_variable_get(v) + + if val.nil? + ret[name] = val if Config::ENABLE_NIL_CREATE + else + ret[name] = val + end + } + return conv2value(ret) + else + ok, pa = wrong_type(param) + if ok + return conv2value(pa) + else + raise "Wrong type!" + end + end + end + + @writer.ele("value", val) + end + + def wrong_type(value) + false + end + + + end # class Create + +end # module XMLRPC + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/datetime.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/datetime.rb new file mode 100644 index 0000000..b6e7a5a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/datetime.rb @@ -0,0 +1,142 @@ +=begin += xmlrpc/datetime.rb +Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) + +Released under the same term of license as Ruby. + += Classes +* (()) + += XMLRPC::DateTime +== Description +This class is important to handle XMLRPC (('dateTime.iso8601')) values, +correcly, because normal UNIX-dates (class (({Date}))) only handle dates +from year 1970 on, and class (({Time})) handles dates without the time +component. (({XMLRPC::DateTime})) is able to store a XMLRPC +(('dateTime.iso8601')) value correctly. + +== Class Methods +--- XMLRPC::DateTime.new( year, month, day, hour, min, sec ) + Creates a new (({XMLRPC::DateTime})) instance with the + parameters ((|year|)), ((|month|)), ((|day|)) as date and + ((|hour|)), ((|min|)), ((|sec|)) as time. + Raises (({ArgumentError})) if a parameter is out of range, or ((|year|)) is not + of type (({Integer})). + +== Instance Methods +--- XMLRPC::DateTime#year +--- XMLRPC::DateTime#month +--- XMLRPC::DateTime#day +--- XMLRPC::DateTime#hour +--- XMLRPC::DateTime#min +--- XMLRPC::DateTime#sec + Return the value of the specified date/time component. + +--- XMLRPC::DateTime#mon + Alias for (()). + +--- XMLRPC::DateTime#year=( value ) +--- XMLRPC::DateTime#month=( value ) +--- XMLRPC::DateTime#day=( value ) +--- XMLRPC::DateTime#hour=( value ) +--- XMLRPC::DateTime#min=( value ) +--- XMLRPC::DateTime#sec=( value ) + Set ((|value|)) as the new date/time component. + Raises (({ArgumentError})) if ((|value|)) is out of range, or in the case + of (({XMLRPC::DateTime#year=})) if ((|value|)) is not of type (({Integer})). + +--- XMLRPC::DateTime#mon=( value ) + Alias for (()). + +--- XMLRPC::DateTime#to_time + Return a (({Time})) object of the date/time which (({self})) represents. + If the (('year')) is below 1970, this method returns (({nil})), + because (({Time})) cannot handle years below 1970. + The used timezone is GMT. + +--- XMLRPC::DateTime#to_date + Return a (({Date})) object of the date which (({self})) represents. + The (({Date})) object do ((*not*)) contain the time component (only date). + +--- XMLRPC::DateTime#to_a + Returns all date/time components in an array. + Returns (({[year, month, day, hour, min, sec]})). +=end + +require "date" + +module XMLRPC + +class DateTime + + attr_reader :year, :month, :day, :hour, :min, :sec + + def year= (value) + raise ArgumentError, "date/time out of range" unless value.is_a? Integer + @year = value + end + + def month= (value) + raise ArgumentError, "date/time out of range" unless (1..12).include? value + @month = value + end + + def day= (value) + raise ArgumentError, "date/time out of range" unless (1..31).include? value + @day = value + end + + def hour= (value) + raise ArgumentError, "date/time out of range" unless (0..24).include? value + @hour = value + end + + def min= (value) + raise ArgumentError, "date/time out of range" unless (0..59).include? value + @min = value + end + + def sec= (value) + raise ArgumentError, "date/time out of range" unless (0..59).include? value + @sec = value + end + + alias mon month + alias mon= month= + + + def initialize(year, month, day, hour, min, sec) + self.year, self.month, self.day = year, month, day + self.hour, self.min, self.sec = hour, min, sec + end + + def to_time + if @year >= 1970 + Time.gm(*to_a) + else + nil + end + end + + def to_date + Date.new(*to_a[0,3]) + end + + def to_a + [@year, @month, @day, @hour, @min, @sec] + end + + def ==(o) + self.to_a == Array(o) rescue false + end + +end + + +end # module XMLRPC + + +=begin += History + $Id: datetime.rb 11708 2007-02-12 23:01:19Z shyouhei $ +=end diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/httpserver.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/httpserver.rb new file mode 100644 index 0000000..1e3412b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/httpserver.rb @@ -0,0 +1,178 @@ +# +# Implements a simple HTTP-server by using John W. Small's (jsmall@laser.net) +# ruby-generic-server. +# +# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) +# +# $Id: httpserver.rb 19657 2008-10-01 13:46:53Z mame $ +# + + +require "gserver" + +class HttpServer < GServer + + ## + # handle_obj specifies the object, that receives calls to request_handler + # and ip_auth_handler + def initialize(handle_obj, port = 8080, host = DEFAULT_HOST, maxConnections = 4, + stdlog = $stdout, audit = true, debug = true) + @handler = handle_obj + super(port, host, maxConnections, stdlog, audit, debug) + end + +private + + # Constants ----------------------------------------------- + + CRLF = "\r\n" + HTTP_PROTO = "HTTP/1.0" + SERVER_NAME = "HttpServer (Ruby #{RUBY_VERSION})" + + DEFAULT_HEADER = { + "Server" => SERVER_NAME + } + + ## + # Mapping of status code and error message + # + StatusCodeMapping = { + 200 => "OK", + 400 => "Bad Request", + 403 => "Forbidden", + 405 => "Method Not Allowed", + 411 => "Length Required", + 500 => "Internal Server Error" + } + + # Classes ------------------------------------------------- + + class Request + attr_reader :data, :header, :method, :path, :proto + + def initialize(data, method=nil, path=nil, proto=nil) + @header, @data = Table.new, data + @method, @path, @proto = method, path, proto + end + + def content_length + len = @header['Content-Length'] + return nil if len.nil? + return len.to_i + end + + end + + class Response + attr_reader :header + attr_accessor :body, :status, :status_message + + def initialize(status=200) + @status = status + @status_message = nil + @header = Table.new + end + end + + + ## + # a case-insensitive Hash class for HTTP header + # + class Table + include Enumerable + + def initialize(hash={}) + @hash = hash + update(hash) + end + + def [](key) + @hash[key.to_s.capitalize] + end + + def []=(key, value) + @hash[key.to_s.capitalize] = value + end + + def update(hash) + hash.each {|k,v| self[k] = v} + self + end + + def each + @hash.each {|k,v| yield k.capitalize, v } + end + + def writeTo(port) + each { |k,v| port << "#{k}: #{v}" << CRLF } + end + end # class Table + + + # Helper Methods ------------------------------------------ + + def http_header(header=nil) + new_header = Table.new(DEFAULT_HEADER) + new_header.update(header) unless header.nil? + + new_header["Connection"] = "close" + new_header["Date"] = http_date(Time.now) + + new_header + end + + def http_date( aTime ) + aTime.gmtime.strftime( "%a, %d %b %Y %H:%M:%S GMT" ) + end + + def http_resp(status_code, status_message=nil, header=nil, body=nil) + status_message ||= StatusCodeMapping[status_code] + + str = "" + str << "#{HTTP_PROTO} #{status_code} #{status_message}" << CRLF + http_header(header).writeTo(str) + str << CRLF + str << body unless body.nil? + str + end + + # Main Serve Loop ----------------------------------------- + + def serve(io) + # perform IP authentification + unless @handler.ip_auth_handler(io) + io << http_resp(403, "Forbidden") + return + end + + # parse first line + if io.gets =~ /^(\S+)\s+(\S+)\s+(\S+)/ + request = Request.new(io, $1, $2, $3) + else + io << http_resp(400, "Bad Request") + return + end + + # parse HTTP headers + while (line=io.gets) !~ /^(\n|\r)/ + if line =~ /^([\w-]+):\s*(.*)$/ + request.header[$1] = $2.strip + end + end + + io.binmode + response = Response.new + + # execute request handler + @handler.request_handler(request, response) + + # write response back to the client + io << http_resp(response.status, response.status_message, + response.header, response.body) + + rescue Exception => e + io << http_resp(500, "Internal Server Error") + end + +end # class HttpServer + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/marshal.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/marshal.rb new file mode 100644 index 0000000..ba8c720 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/marshal.rb @@ -0,0 +1,76 @@ +# +# Marshalling of XML-RPC methodCall and methodResponse +# +# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) +# +# $Id: marshal.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# + +require "xmlrpc/parser" +require "xmlrpc/create" +require "xmlrpc/config" +require "xmlrpc/utils" + +module XMLRPC + + class Marshal + include ParserWriterChooseMixin + + # class methods ------------------------------- + + class << self + + def dump_call( methodName, *params ) + new.dump_call( methodName, *params ) + end + + def dump_response( param ) + new.dump_response( param ) + end + + def load_call( stringOrReadable ) + new.load_call( stringOrReadable ) + end + + def load_response( stringOrReadable ) + new.load_response( stringOrReadable ) + end + + alias dump dump_response + alias load load_response + + end # class self + + # instance methods ---------------------------- + + def initialize( parser = nil, writer = nil ) + set_parser( parser ) + set_writer( writer ) + end + + def dump_call( methodName, *params ) + create.methodCall( methodName, *params ) + end + + def dump_response( param ) + create.methodResponse( ! param.kind_of?( XMLRPC::FaultException ) , param ) + end + + ## + # returns [ methodname, params ] + # + def load_call( stringOrReadable ) + parser.parseMethodCall( stringOrReadable ) + end + + ## + # returns paramOrFault + # + def load_response( stringOrReadable ) + parser.parseMethodResponse( stringOrReadable )[1] + end + + end # class Marshal + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/parser.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/parser.rb new file mode 100644 index 0000000..23ecc62 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/parser.rb @@ -0,0 +1,813 @@ +# +# Parser for XML-RPC call and response +# +# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) +# +# $Id: parser.rb 19657 2008-10-01 13:46:53Z mame $ +# + + +require "date" +require "xmlrpc/base64" +require "xmlrpc/datetime" + + +# add some methods to NQXML::Node +module NQXML + class Node + + def removeChild(node) + @children.delete(node) + end + def childNodes + @children + end + def hasChildNodes + not @children.empty? + end + def [] (index) + @children[index] + end + + def nodeType + if @entity.instance_of? NQXML::Text then :TEXT + elsif @entity.instance_of? NQXML::Comment then :COMMENT + #elsif @entity.instance_of? NQXML::Element then :ELEMENT + elsif @entity.instance_of? NQXML::Tag then :ELEMENT + else :ELSE + end + end + + def nodeValue + #TODO: error when wrong Entity-type + @entity.text + end + def nodeName + #TODO: error when wrong Entity-type + @entity.name + end + end # class Node +end # module NQXML + +module XMLRPC + + class FaultException < StandardError + attr_reader :faultCode, :faultString + + alias message faultString + + def initialize(faultCode, faultString) + @faultCode = faultCode + @faultString = faultString + end + + # returns a hash + def to_h + {"faultCode" => @faultCode, "faultString" => @faultString} + end + end + + module Convert + def self.int(str) + str.to_i + end + + def self.boolean(str) + case str + when "0" then false + when "1" then true + else + raise "RPC-value of type boolean is wrong" + end + end + + def self.double(str) + str.to_f + end + + def self.dateTime(str) + case str + when /^(-?\d\d\d\d)-?(\d\d)-?(\d\d)T(\d\d):(\d\d):(\d\d)(?:Z|([+-])(\d\d):?(\d\d))?$/ + a = [$1, $2, $3, $4, $5, $6].collect{|i| i.to_i} + if $7 + ofs = $8.to_i*3600 + $9.to_i*60 + ofs = -ofs if $7=='+' + utc = Time.utc(*a) + ofs + a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ] + end + XMLRPC::DateTime.new(*a) + when /^(-?\d\d)-?(\d\d)-?(\d\d)T(\d\d):(\d\d):(\d\d)(Z|([+-]\d\d):(\d\d))?$/ + a = [$1, $2, $3, $4, $5, $6].collect{|i| i.to_i} + if a[0] < 70 + a[0] += 2000 + else + a[0] += 1900 + end + if $7 + ofs = $8.to_i*3600 + $9.to_i*60 + ofs = -ofs if $7=='+' + utc = Time.utc(*a) + ofs + a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ] + end + XMLRPC::DateTime.new(*a) + else + raise "wrong dateTime.iso8601 format " + str + end + end + + def self.base64(str) + XMLRPC::Base64.decode(str) + end + + def self.struct(hash) + # convert to marhalled object + klass = hash["___class___"] + if klass.nil? or Config::ENABLE_MARSHALLING == false + hash + else + begin + mod = Module + klass.split("::").each {|const| mod = mod.const_get(const.strip)} + + obj = mod.allocate + + hash.delete "___class___" + hash.each {|key, value| + obj.instance_variable_set("@#{ key }", value) if key =~ /^([\w_][\w_0-9]*)$/ + } + obj + rescue + hash + end + end + end + + def self.fault(hash) + if hash.kind_of? Hash and hash.size == 2 and + hash.has_key? "faultCode" and hash.has_key? "faultString" and + hash["faultCode"].kind_of? Integer and hash["faultString"].kind_of? String + + XMLRPC::FaultException.new(hash["faultCode"], hash["faultString"]) + else + raise "wrong fault-structure: #{hash.inspect}" + end + end + + end # module Convert + + module XMLParser + + class AbstractTreeParser + + def parseMethodResponse(str) + methodResponse_document(createCleanedTree(str)) + end + + def parseMethodCall(str) + methodCall_document(createCleanedTree(str)) + end + + private + + # + # remove all whitespaces but in the tags i4, int, boolean.... + # and all comments + # + def removeWhitespacesAndComments(node) + remove = [] + childs = node.childNodes.to_a + childs.each do |nd| + case _nodeType(nd) + when :TEXT + # TODO: add nil? + unless %w(i4 int boolean string double dateTime.iso8601 base64).include? node.nodeName + + if node.nodeName == "value" + if not node.childNodes.to_a.detect {|n| _nodeType(n) == :ELEMENT}.nil? + remove << nd if nd.nodeValue.strip == "" + end + else + remove << nd if nd.nodeValue.strip == "" + end + end + when :COMMENT + remove << nd + else + removeWhitespacesAndComments(nd) + end + end + + remove.each { |i| node.removeChild(i) } + end + + + def nodeMustBe(node, name) + cmp = case name + when Array + name.include?(node.nodeName) + when String + name == node.nodeName + else + raise "error" + end + + if not cmp then + raise "wrong xml-rpc (name)" + end + + node + end + + # + # returns, when successfully the only child-node + # + def hasOnlyOneChild(node, name=nil) + if node.childNodes.to_a.size != 1 + raise "wrong xml-rpc (size)" + end + if name != nil then + nodeMustBe(node.firstChild, name) + end + end + + + def assert(b) + if not b then + raise "assert-fail" + end + end + + # the node `node` has empty string or string + def text_zero_one(node) + nodes = node.childNodes.to_a.size + + if nodes == 1 + text(node.firstChild) + elsif nodes == 0 + "" + else + raise "wrong xml-rpc (size)" + end + end + + + def integer(node) + #TODO: check string for float because to_i returnsa + # 0 when wrong string + nodeMustBe(node, %w(i4 int)) + hasOnlyOneChild(node) + + Convert.int(text(node.firstChild)) + end + + def boolean(node) + nodeMustBe(node, "boolean") + hasOnlyOneChild(node) + + Convert.boolean(text(node.firstChild)) + end + + def v_nil(node) + nodeMustBe(node, "nil") + assert( node.childNodes.to_a.size == 0 ) + nil + end + + def string(node) + nodeMustBe(node, "string") + text_zero_one(node) + end + + def double(node) + #TODO: check string for float because to_f returnsa + # 0.0 when wrong string + nodeMustBe(node, "double") + hasOnlyOneChild(node) + + Convert.double(text(node.firstChild)) + end + + def dateTime(node) + nodeMustBe(node, "dateTime.iso8601") + hasOnlyOneChild(node) + + Convert.dateTime( text(node.firstChild) ) + end + + def base64(node) + nodeMustBe(node, "base64") + #hasOnlyOneChild(node) + + Convert.base64(text_zero_one(node)) + end + + def member(node) + nodeMustBe(node, "member") + assert( node.childNodes.to_a.size == 2 ) + + [ name(node[0]), value(node[1]) ] + end + + def name(node) + nodeMustBe(node, "name") + #hasOnlyOneChild(node) + text_zero_one(node) + end + + def array(node) + nodeMustBe(node, "array") + hasOnlyOneChild(node, "data") + data(node.firstChild) + end + + def data(node) + nodeMustBe(node, "data") + + node.childNodes.to_a.collect do |val| + value(val) + end + end + + def param(node) + nodeMustBe(node, "param") + hasOnlyOneChild(node, "value") + value(node.firstChild) + end + + def methodResponse(node) + nodeMustBe(node, "methodResponse") + hasOnlyOneChild(node, %w(params fault)) + child = node.firstChild + + case child.nodeName + when "params" + [ true, params(child,false) ] + when "fault" + [ false, fault(child) ] + else + raise "unexpected error" + end + + end + + def methodName(node) + nodeMustBe(node, "methodName") + hasOnlyOneChild(node) + text(node.firstChild) + end + + def params(node, call=true) + nodeMustBe(node, "params") + + if call + node.childNodes.to_a.collect do |n| + param(n) + end + else # response (only one param) + hasOnlyOneChild(node) + param(node.firstChild) + end + end + + def fault(node) + nodeMustBe(node, "fault") + hasOnlyOneChild(node, "value") + f = value(node.firstChild) + Convert.fault(f) + end + + + + # _nodeType is defined in the subclass + def text(node) + assert( _nodeType(node) == :TEXT ) + assert( node.hasChildNodes == false ) + assert( node.nodeValue != nil ) + + node.nodeValue.to_s + end + + def struct(node) + nodeMustBe(node, "struct") + + hash = {} + node.childNodes.to_a.each do |me| + n, v = member(me) + hash[n] = v + end + + Convert.struct(hash) + end + + + def value(node) + nodeMustBe(node, "value") + nodes = node.childNodes.to_a.size + if nodes == 0 + return "" + elsif nodes > 1 + raise "wrong xml-rpc (size)" + end + + child = node.firstChild + + case _nodeType(child) + when :TEXT + text_zero_one(node) + when :ELEMENT + case child.nodeName + when "i4", "int" then integer(child) + when "boolean" then boolean(child) + when "string" then string(child) + when "double" then double(child) + when "dateTime.iso8601" then dateTime(child) + when "base64" then base64(child) + when "struct" then struct(child) + when "array" then array(child) + when "nil" + if Config::ENABLE_NIL_PARSER + v_nil(child) + else + raise "wrong/unknown XML-RPC type 'nil'" + end + else + raise "wrong/unknown XML-RPC type" + end + else + raise "wrong type of node" + end + + end + + def methodCall(node) + nodeMustBe(node, "methodCall") + assert( (1..2).include?( node.childNodes.to_a.size ) ) + name = methodName(node[0]) + + if node.childNodes.to_a.size == 2 then + pa = params(node[1]) + else # no parameters given + pa = [] + end + [name, pa] + end + + end # module TreeParserMixin + + class AbstractStreamParser + def parseMethodResponse(str) + parser = @parser_class.new + parser.parse(str) + raise "No valid method response!" if parser.method_name != nil + if parser.fault != nil + # is a fault structure + [false, parser.fault] + else + # is a normal return value + raise "Missing return value!" if parser.params.size == 0 + raise "Too many return values. Only one allowed!" if parser.params.size > 1 + [true, parser.params[0]] + end + end + + def parseMethodCall(str) + parser = @parser_class.new + parser.parse(str) + raise "No valid method call - missing method name!" if parser.method_name.nil? + [parser.method_name, parser.params] + end + end + + module StreamParserMixin + attr_reader :params + attr_reader :method_name + attr_reader :fault + + def initialize(*a) + super(*a) + @params = [] + @values = [] + @val_stack = [] + + @names = [] + @name = [] + + @structs = [] + @struct = {} + + @method_name = nil + @fault = nil + + @data = nil + end + + def startElement(name, attrs=[]) + @data = nil + case name + when "value" + @value = nil + when "nil" + raise "wrong/unknown XML-RPC type 'nil'" unless Config::ENABLE_NIL_PARSER + @value = :nil + when "array" + @val_stack << @values + @values = [] + when "struct" + @names << @name + @name = [] + + @structs << @struct + @struct = {} + end + end + + def endElement(name) + @data ||= "" + case name + when "string" + @value = @data + when "i4", "int" + @value = Convert.int(@data) + when "boolean" + @value = Convert.boolean(@data) + when "double" + @value = Convert.double(@data) + when "dateTime.iso8601" + @value = Convert.dateTime(@data) + when "base64" + @value = Convert.base64(@data) + when "value" + @value = @data if @value.nil? + @values << (@value == :nil ? nil : @value) + when "array" + @value = @values + @values = @val_stack.pop + when "struct" + @value = Convert.struct(@struct) + + @name = @names.pop + @struct = @structs.pop + when "name" + @name[0] = @data + when "member" + @struct[@name[0]] = @values.pop + + when "param" + @params << @values[0] + @values = [] + + when "fault" + @fault = Convert.fault(@values[0]) + + when "methodName" + @method_name = @data + end + + @data = nil + end + + def character(data) + if @data + @data << data + else + @data = data + end + end + + end # module StreamParserMixin + + # --------------------------------------------------------------------------- + class XMLStreamParser < AbstractStreamParser + def initialize + require "xmlparser" + @parser_class = Class.new(::XMLParser) { + include StreamParserMixin + } + end + end # class XMLStreamParser + # --------------------------------------------------------------------------- + class NQXMLStreamParser < AbstractStreamParser + def initialize + require "nqxml/streamingparser" + @parser_class = XMLRPCParser + end + + class XMLRPCParser + include StreamParserMixin + + def parse(str) + parser = NQXML::StreamingParser.new(str) + parser.each do |ele| + case ele + when NQXML::Text + @data = ele.text + #character(ele.text) + when NQXML::Tag + if ele.isTagEnd + endElement(ele.name) + else + startElement(ele.name, ele.attrs) + end + end + end # do + end # method parse + end # class XMLRPCParser + + end # class NQXMLStreamParser + # --------------------------------------------------------------------------- + class XMLTreeParser < AbstractTreeParser + + def initialize + require "xmltreebuilder" + + # The new XMLParser library (0.6.2+) uses a slightly different DOM implementation. + # The following code removes the differences between both versions. + if defined? XML::DOM::Builder + return if defined? XML::DOM::Node::DOCUMENT # code below has been already executed + klass = XML::DOM::Node + klass.const_set("DOCUMENT", klass::DOCUMENT_NODE) + klass.const_set("TEXT", klass::TEXT_NODE) + klass.const_set("COMMENT", klass::COMMENT_NODE) + klass.const_set("ELEMENT", klass::ELEMENT_NODE) + end + end + + private + + def _nodeType(node) + tp = node.nodeType + if tp == XML::SimpleTree::Node::TEXT then :TEXT + elsif tp == XML::SimpleTree::Node::COMMENT then :COMMENT + elsif tp == XML::SimpleTree::Node::ELEMENT then :ELEMENT + else :ELSE + end + end + + + def methodResponse_document(node) + assert( node.nodeType == XML::SimpleTree::Node::DOCUMENT ) + hasOnlyOneChild(node, "methodResponse") + + methodResponse(node.firstChild) + end + + def methodCall_document(node) + assert( node.nodeType == XML::SimpleTree::Node::DOCUMENT ) + hasOnlyOneChild(node, "methodCall") + + methodCall(node.firstChild) + end + + def createCleanedTree(str) + doc = XML::SimpleTreeBuilder.new.parse(str) + doc.documentElement.normalize + removeWhitespacesAndComments(doc) + doc + end + + end # class XMLParser + # --------------------------------------------------------------------------- + class NQXMLTreeParser < AbstractTreeParser + + def initialize + require "nqxml/treeparser" + end + + private + + def _nodeType(node) + node.nodeType + end + + def methodResponse_document(node) + methodResponse(node) + end + + def methodCall_document(node) + methodCall(node) + end + + def createCleanedTree(str) + doc = ::NQXML::TreeParser.new(str).document.rootNode + removeWhitespacesAndComments(doc) + doc + end + + end # class NQXMLTreeParser + # --------------------------------------------------------------------------- + class REXMLStreamParser < AbstractStreamParser + def initialize + require "rexml/document" + @parser_class = StreamListener + end + + class StreamListener + include StreamParserMixin + + alias :tag_start :startElement + alias :tag_end :endElement + alias :text :character + alias :cdata :character + + def method_missing(*a) + # ignore + end + + def parse(str) + parser = REXML::Document.parse_stream(str, self) + end + end + + end + # --------------------------------------------------------------------------- + class XMLScanStreamParser < AbstractStreamParser + def initialize + require "xmlscan/parser" + @parser_class = XMLScanParser + end + + class XMLScanParser + include StreamParserMixin + + Entities = { + "lt" => "<", + "gt" => ">", + "amp" => "&", + "quot" => '"', + "apos" => "'" + } + + def parse(str) + parser = XMLScan::XMLParser.new(self) + parser.parse(str) + end + + alias :on_stag :startElement + alias :on_etag :endElement + + def on_stag_end(name); end + + def on_stag_end_empty(name) + startElement(name) + endElement(name) + end + + def on_chardata(str) + character(str) + end + + def on_cdata(str) + character(str) + end + + def on_entityref(ent) + str = Entities[ent] + if str + character(str) + else + raise "unknown entity" + end + end + + def on_charref(code) + character(code.chr) + end + + def on_charref_hex(code) + character(code.chr) + end + + def method_missing(*a) + end + + # TODO: call/implement? + # valid_name? + # valid_chardata? + # valid_char? + # parse_error + + end + end + # --------------------------------------------------------------------------- + XMLParser = XMLTreeParser + NQXMLParser = NQXMLTreeParser + + Classes = [XMLStreamParser, XMLTreeParser, + NQXMLStreamParser, NQXMLTreeParser, + REXMLStreamParser, XMLScanStreamParser] + + # yields an instance of each installed parser + def self.each_installed_parser + XMLRPC::XMLParser::Classes.each do |klass| + begin + yield klass.new + rescue LoadError + end + end + end + + end # module XMLParser + + +end # module XMLRPC + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/server.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/server.rb new file mode 100644 index 0000000..a7e7c44 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/server.rb @@ -0,0 +1,782 @@ +=begin += xmlrpc/server.rb +Copyright (C) 2001, 2002, 2003, 2005 by Michael Neumann (mneumann@ntecs.de) + +Released under the same term of license as Ruby. + += Classes +* (()) +* (()) +* (()) +* (()) +* (()) + += XMLRPC::BasicServer +== Description +Is the base class for all XML-RPC server-types (CGI, standalone). +You can add handler and set a default handler. +Do not use this server, as this is/should be an abstract class. + +=== How the method to call is found +The arity (number of accepted arguments) of a handler (method or (({Proc})) object) is +compared to the given arguments submitted by the client for a RPC ((-Remote Procedure Call-)). +A handler is only called if it accepts the number of arguments, otherwise the search +for another handler will go on. When at the end no handler was found, +the (()) will be called. +With this technique it is possible to do overloading by number of parameters, but +only for (({Proc})) handler, because you cannot define two methods of the same name in +the same class. + + +== Class Methods +--- XMLRPC::BasicServer.new( class_delim="." ) + Creates a new (({XMLRPC::BasicServer})) instance, which should not be + done, because (({XMLRPC::BasicServer})) is an abstract class. This + method should be called from a subclass indirectly by a (({super})) call + in the method (({initialize})). The paramter ((|class_delim|)) is used + in (()) when an object is + added as handler, to delimit the object-prefix and the method-name. + +== Instance Methods +--- XMLRPC::BasicServer#add_handler( name, signature=nil, help=nil ) { aBlock } + Adds ((|aBlock|)) to the list of handlers, with ((|name|)) as the name of the method. + Parameters ((|signature|)) and ((|help|)) are used by the Introspection method if specified, + where ((|signature|)) is either an Array containing strings each representing a type of it's + signature (the first is the return value) or an Array of Arrays if the method has multiple + signatures. Value type-names are "int, boolean, double, string, dateTime.iso8601, base64, array, struct". + + Parameter ((|help|)) is a String with informations about how to call this method etc. + + A handler method or code-block can return the types listed at + (()). + When a method fails, it can tell it the client by throwing an + (({XMLRPC::FaultException})) like in this example: + s.add_handler("michael.div") do |a,b| + if b == 0 + raise XMLRPC::FaultException.new(1, "division by zero") + else + a / b + end + end + The client gets in the case of (({b==0})) an object back of type + (({XMLRPC::FaultException})) that has a ((|faultCode|)) and ((|faultString|)) + field. + +--- XMLRPC::BasicServer#add_handler( prefix, obj ) + This is the second form of (()). + To add an object write: + server.add_handler("michael", MyHandlerClass.new) + All public methods of (({MyHandlerClass})) are accessible to + the XML-RPC clients by (('michael."name of method"')). This is + where the ((|class_delim|)) in (()) + has it's role, a XML-RPC method-name is defined by + ((|prefix|)) + ((|class_delim|)) + (('"name of method"')). + +--- XMLRPC::BasicServer#add_handler( interface, obj ) + This is the third form of (()). + + Use (({XMLRPC::interface})) to generate an ServiceInterface object, which + represents an interface (with signature and help text) for a handler class. + + Parameter ((|interface|)) must be of type (({XMLRPC::ServiceInterface})). + Adds all methods of ((|obj|)) which are defined in ((|interface|)) to the + server. + + This is the recommended way of adding services to a server! + + +--- XMLRPC::BasicServer#get_default_handler + Returns the default-handler, which is called when no handler for + a method-name is found. + It is a (({Proc})) object or (({nil})). + +--- XMLRPC::BasicServer#set_default_handler ( &handler ) + Sets ((|handler|)) as the default-handler, which is called when + no handler for a method-name is found. ((|handler|)) is a code-block. + The default-handler is called with the (XML-RPC) method-name as first argument, and + the other arguments are the parameters given by the client-call. + + If no block is specified the default of (({XMLRPC::BasicServer})) is used, which raises a + XMLRPC::FaultException saying "method missing". + + +--- XMLRPC::BasicServer#set_writer( writer ) + Sets the XML writer to use for generating XML output. + Should be an instance of a class from module (({XMLRPC::XMLWriter})). + If this method is not called, then (({XMLRPC::Config::DEFAULT_WRITER})) is used. + +--- XMLRPC::BasicServer#set_parser( parser ) + Sets the XML parser to use for parsing XML documents. + Should be an instance of a class from module (({XMLRPC::XMLParser})). + If this method is not called, then (({XMLRPC::Config::DEFAULT_PARSER})) is used. + +--- XMLRPC::BasicServer#add_introspection + Adds the introspection handlers "system.listMethods", "system.methodSignature" and "system.methodHelp", + where only the first one works. + +--- XMLRPC::BasicServer#add_multicall + Adds the multi-call handler "system.multicall". + +--- XMLRPC::BasicServer#get_service_hook + Returns the service-hook, which is called on each service request (RPC) unless it's (({nil})). + +--- XMLRPC::BasicServer#set_service_hook ( &handler ) + A service-hook is called for each service request (RPC). + You can use a service-hook for example to wrap existing methods and catch exceptions of them or + convert values to values recognized by XMLRPC. You can disable it by passing (({nil})) as parameter + ((|handler|)) . + + The service-hook is called with a (({Proc})) object and with the parameters for this (({Proc})). + An example: + + server.set_service_hook {|obj, *args| + begin + ret = obj.call(*args) # call the original service-method + # could convert the return value + resuce + # rescue exceptions + end + } + +=end + + + +require "xmlrpc/parser" +require "xmlrpc/create" +require "xmlrpc/config" +require "xmlrpc/utils" # ParserWriterChooseMixin + + + +module XMLRPC + + +class BasicServer + + include ParserWriterChooseMixin + include ParseContentType + + ERR_METHOD_MISSING = 1 + ERR_UNCAUGHT_EXCEPTION = 2 + ERR_MC_WRONG_PARAM = 3 + ERR_MC_MISSING_PARAMS = 4 + ERR_MC_MISSING_METHNAME = 5 + ERR_MC_RECURSIVE_CALL = 6 + ERR_MC_WRONG_PARAM_PARAMS = 7 + ERR_MC_EXPECTED_STRUCT = 8 + + + def initialize(class_delim=".") + @handler = [] + @default_handler = nil + @service_hook = nil + + @class_delim = class_delim + @create = nil + @parser = nil + + add_multicall if Config::ENABLE_MULTICALL + add_introspection if Config::ENABLE_INTROSPECTION + end + + def add_handler(prefix, obj_or_signature=nil, help=nil, &block) + if block_given? + # proc-handler + @handler << [prefix, block, obj_or_signature, help] + else + if prefix.kind_of? String + # class-handler + raise ArgumentError, "Expected non-nil value" if obj_or_signature.nil? + @handler << [prefix + @class_delim, obj_or_signature] + elsif prefix.kind_of? XMLRPC::Service::BasicInterface + # class-handler with interface + # add all methods + @handler += prefix.get_methods(obj_or_signature, @class_delim) + else + raise ArgumentError, "Wrong type for parameter 'prefix'" + end + end + self + end + + def get_service_hook + @service_hook + end + + def set_service_hook(&handler) + @service_hook = handler + self + end + + def get_default_handler + @default_handler + end + + def set_default_handler (&handler) + @default_handler = handler + self + end + + def add_multicall + add_handler("system.multicall", %w(array array), "Multicall Extension") do |arrStructs| + unless arrStructs.is_a? Array + raise XMLRPC::FaultException.new(ERR_MC_WRONG_PARAM, "system.multicall expects an array") + end + + arrStructs.collect {|call| + if call.is_a? Hash + methodName = call["methodName"] + params = call["params"] + + if params.nil? + multicall_fault(ERR_MC_MISSING_PARAMS, "Missing params") + elsif methodName.nil? + multicall_fault(ERR_MC_MISSING_METHNAME, "Missing methodName") + else + if methodName == "system.multicall" + multicall_fault(ERR_MC_RECURSIVE_CALL, "Recursive system.multicall forbidden") + else + unless params.is_a? Array + multicall_fault(ERR_MC_WRONG_PARAM_PARAMS, "Parameter params have to be an Array") + else + ok, val = call_method(methodName, *params) + if ok + # correct return value + [val] + else + # exception + multicall_fault(val.faultCode, val.faultString) + end + end + end + end + + else + multicall_fault(ERR_MC_EXPECTED_STRUCT, "system.multicall expected struct") + end + } + end # end add_handler + self + end + + def add_introspection + add_handler("system.listMethods",%w(array), "List methods available on this XML-RPC server") do + methods = [] + @handler.each do |name, obj| + if obj.kind_of? Proc + methods << name + else + obj.class.public_instance_methods(false).each do |meth| + methods << "#{name}#{meth}" + end + end + end + methods + end + + add_handler("system.methodSignature", %w(array string), "Returns method signature") do |meth| + sigs = [] + @handler.each do |name, obj, sig| + if obj.kind_of? Proc and sig != nil and name == meth + if sig[0].kind_of? Array + # sig contains multiple signatures, e.g. [["array"], ["array", "string"]] + sig.each {|s| sigs << s} + else + # sig is a single signature, e.g. ["array"] + sigs << sig + end + end + end + sigs.uniq! || sigs # remove eventually duplicated signatures + end + + add_handler("system.methodHelp", %w(string string), "Returns help on using this method") do |meth| + help = nil + @handler.each do |name, obj, sig, hlp| + if obj.kind_of? Proc and name == meth + help = hlp + break + end + end + help || "" + end + + self + end + + + + def process(data) + method, params = parser().parseMethodCall(data) + handle(method, *params) + end + + private # -------------------------------------------------------------- + + def multicall_fault(nr, str) + {"faultCode" => nr, "faultString" => str} + end + + # + # method dispatch + # + def dispatch(methodname, *args) + for name, obj in @handler + if obj.kind_of? Proc + next unless methodname == name + else + next unless methodname =~ /^#{name}(.+)$/ + next unless obj.respond_to? $1 + obj = obj.method($1) + end + + if check_arity(obj, args.size) + if @service_hook.nil? + return obj.call(*args) + else + return @service_hook.call(obj, *args) + end + end + end + + if @default_handler.nil? + raise XMLRPC::FaultException.new(ERR_METHOD_MISSING, "Method #{methodname} missing or wrong number of parameters!") + else + @default_handler.call(methodname, *args) + end + end + + + # + # returns true, if the arity of "obj" matches + # + def check_arity(obj, n_args) + ary = obj.arity + + if ary >= 0 + n_args == ary + else + n_args >= (ary+1).abs + end + end + + + + def call_method(methodname, *args) + begin + [true, dispatch(methodname, *args)] + rescue XMLRPC::FaultException => e + [false, e] + rescue Exception => e + [false, XMLRPC::FaultException.new(ERR_UNCAUGHT_EXCEPTION, "Uncaught exception #{e.message} in method #{methodname}")] + end + end + + # + # + # + def handle(methodname, *args) + create().methodResponse(*call_method(methodname, *args)) + end + + +end + + +=begin += XMLRPC::CGIServer +== Synopsis + require "xmlrpc/server" + + s = XMLRPC::CGIServer.new + + s.add_handler("michael.add") do |a,b| + a + b + end + + s.add_handler("michael.div") do |a,b| + if b == 0 + raise XMLRPC::FaultException.new(1, "division by zero") + else + a / b + end + end + + s.set_default_handler do |name, *args| + raise XMLRPC::FaultException.new(-99, "Method #{name} missing" + + " or wrong number of parameters!") + end + + s.serve + +== Description +Implements a CGI-based XML-RPC server. + +== Superclass +(()) + +== Class Methods +--- XMLRPC::CGIServer.new( *a ) + Creates a new (({XMLRPC::CGIServer})) instance. All parameters given + are by-passed to (()). You can only create + ((*one*)) (({XMLRPC::CGIServer})) instance, because more than one makes + no sense. + +== Instance Methods +--- XMLRPC::CGIServer#serve + Call this after you have added all you handlers to the server. + This method processes a XML-RPC methodCall and sends the answer + back to the client. + Make sure that you don't write to standard-output in a handler, or in + any other part of your program, this would case a CGI-based server to fail! +=end + +class CGIServer < BasicServer + @@obj = nil + + def CGIServer.new(*a) + @@obj = super(*a) if @@obj.nil? + @@obj + end + + def initialize(*a) + super(*a) + end + + def serve + catch(:exit_serve) { + length = ENV['CONTENT_LENGTH'].to_i + + http_error(405, "Method Not Allowed") unless ENV['REQUEST_METHOD'] == "POST" + http_error(400, "Bad Request") unless parse_content_type(ENV['CONTENT_TYPE']).first == "text/xml" + http_error(411, "Length Required") unless length > 0 + + # TODO: do we need a call to binmode? + $stdin.binmode if $stdin.respond_to? :binmode + data = $stdin.read(length) + + http_error(400, "Bad Request") if data.nil? or data.size != length + + http_write(process(data), "Content-type" => "text/xml; charset=utf-8") + } + end + + + private + + def http_error(status, message) + err = "#{status} #{message}" + msg = <<-"MSGEND" + + + #{err} + + +

      #{err}

      +

      Unexpected error occured while processing XML-RPC request!

      + + + MSGEND + + http_write(msg, "Status" => err, "Content-type" => "text/html") + throw :exit_serve # exit from the #serve method + end + + def http_write(body, header) + h = {} + header.each {|key, value| h[key.to_s.capitalize] = value} + h['Status'] ||= "200 OK" + h['Content-length'] ||= body.size.to_s + + str = "" + h.each {|key, value| str << "#{key}: #{value}\r\n"} + str << "\r\n#{body}" + + print str + end + +end + +=begin += XMLRPC::ModRubyServer +== Description +Implements a XML-RPC server, which works with Apache mod_ruby. + +Use it in the same way as CGIServer! + +== Superclass +(()) +=end + +class ModRubyServer < BasicServer + + def initialize(*a) + @ap = Apache::request + super(*a) + end + + def serve + catch(:exit_serve) { + header = {} + @ap.headers_in.each {|key, value| header[key.capitalize] = value} + + length = header['Content-length'].to_i + + http_error(405, "Method Not Allowed") unless @ap.request_method == "POST" + http_error(400, "Bad Request") unless parse_content_type(header['Content-type']).first == "text/xml" + http_error(411, "Length Required") unless length > 0 + + # TODO: do we need a call to binmode? + @ap.binmode + data = @ap.read(length) + + http_error(400, "Bad Request") if data.nil? or data.size != length + + http_write(process(data), 200, "Content-type" => "text/xml; charset=utf-8") + } + end + + + private + + def http_error(status, message) + err = "#{status} #{message}" + msg = <<-"MSGEND" + + + #{err} + + +

      #{err}

      +

      Unexpected error occured while processing XML-RPC request!

      + + + MSGEND + + http_write(msg, status, "Status" => err, "Content-type" => "text/html") + throw :exit_serve # exit from the #serve method + end + + def http_write(body, status, header) + h = {} + header.each {|key, value| h[key.to_s.capitalize] = value} + h['Status'] ||= "200 OK" + h['Content-length'] ||= body.size.to_s + + h.each {|key, value| @ap.headers_out[key] = value } + @ap.content_type = h["Content-type"] + @ap.status = status.to_i + @ap.send_http_header + + @ap.print body + end + +end + +=begin += XMLRPC::Server +== Synopsis + require "xmlrpc/server" + + s = XMLRPC::Server.new(8080) + + s.add_handler("michael.add") do |a,b| + a + b + end + + s.add_handler("michael.div") do |a,b| + if b == 0 + raise XMLRPC::FaultException.new(1, "division by zero") + else + a / b + end + end + + s.set_default_handler do |name, *args| + raise XMLRPC::FaultException.new(-99, "Method #{name} missing" + + " or wrong number of parameters!") + end + + s.serve + +== Description +Implements a standalone XML-RPC server. The method (({serve}))) is left if a SIGHUP is sent to the +program. + +== Superclass +(()) + +== Class Methods +--- XMLRPC::Server.new( port=8080, host="127.0.0.1", maxConnections=4, stdlog=$stdout, audit=true, debug=true, *a ) + Creates a new (({XMLRPC::Server})) instance, which is a XML-RPC server listening on + port ((|port|)) and accepts requests for the host ((|host|)), which is by default only the localhost. + The server is not started, to start it you have to call (()). + + Parameters ((|audit|)) and ((|debug|)) are obsolete! + + All additionally given parameters in ((|*a|)) are by-passed to (()). + +== Instance Methods +--- XMLRPC::Server#serve + Call this after you have added all you handlers to the server. + This method starts the server to listen for XML-RPC requests and answer them. + +--- XMLRPC::Server#shutdown + Stops and shuts the server down. + +=end + +class WEBrickServlet < BasicServer; end # forward declaration + +class Server < WEBrickServlet + + def initialize(port=8080, host="127.0.0.1", maxConnections=4, stdlog=$stdout, audit=true, debug=true, *a) + super(*a) + require 'webrick' + @server = WEBrick::HTTPServer.new(:Port => port, :BindAddress => host, :MaxClients => maxConnections, + :Logger => WEBrick::Log.new(stdlog)) + @server.mount("/", self) + end + + def serve + if RUBY_PLATFORM =~ /mingw|mswin32/ + signals = [1] + else + signals = %w[INT TERM HUP] + end + signals.each { |signal| trap(signal) { @server.shutdown } } + + @server.start + end + + def shutdown + @server.shutdown + end + +end + +=begin += XMLRPC::WEBrickServlet +== Synopsis + + require "webrick" + require "xmlrpc/server" + + s = XMLRPC::WEBrickServlet.new + s.add_handler("michael.add") do |a,b| + a + b + end + + s.add_handler("michael.div") do |a,b| + if b == 0 + raise XMLRPC::FaultException.new(1, "division by zero") + else + a / b + end + end + + s.set_default_handler do |name, *args| + raise XMLRPC::FaultException.new(-99, "Method #{name} missing" + + " or wrong number of parameters!") + end + + httpserver = WEBrick::HTTPServer.new(:Port => 8080) + httpserver.mount("/RPC2", s) + trap("HUP") { httpserver.shutdown } # use 1 instead of "HUP" on Windows + httpserver.start + +== Instance Methods + +--- XMLRPC::WEBrickServlet#set_valid_ip( *ip_addr ) + Specifies the valid IP addresses that are allowed to connect to the server. + Each IP is either a (({String})) or a (({Regexp})). + +--- XMLRPC::WEBrickServlet#get_valid_ip + Return the via method (()) specified + valid IP addresses. + +== Description +Implements a servlet for use with WEBrick, a pure Ruby (HTTP-) server framework. + +== Superclass +(()) + +=end + +class WEBrickServlet < BasicServer + def initialize(*a) + super + require "webrick/httpstatus" + @valid_ip = nil + end + + # deprecated from WEBrick/1.2.2. + # but does not break anything. + def require_path_info? + false + end + + def get_instance(config, *options) + # TODO: set config & options + self + end + + def set_valid_ip(*ip_addr) + if ip_addr.size == 1 and ip_addr[0].nil? + @valid_ip = nil + else + @valid_ip = ip_addr + end + end + + def get_valid_ip + @valid_ip + end + + def service(request, response) + + if @valid_ip + raise WEBrick::HTTPStatus::Forbidden unless @valid_ip.any? { |ip| request.peeraddr[3] =~ ip } + end + + if request.request_method != "POST" + raise WEBrick::HTTPStatus::MethodNotAllowed, + "unsupported method `#{request.request_method}'." + end + + if parse_content_type(request['Content-type']).first != "text/xml" + raise WEBrick::HTTPStatus::BadRequest + end + + length = (request['Content-length'] || 0).to_i + + raise WEBrick::HTTPStatus::LengthRequired unless length > 0 + + data = request.body + + if data.nil? or data.size != length + raise WEBrick::HTTPStatus::BadRequest + end + + resp = process(data) + if resp.nil? or resp.size <= 0 + raise WEBrick::HTTPStatus::InternalServerError + end + + response.status = 200 + response['Content-Length'] = resp.size + response['Content-Type'] = "text/xml; charset=utf-8" + response.body = resp + end +end + + +end # module XMLRPC + + +=begin += History + $Id: server.rb 20879 2008-12-19 11:37:33Z yugui $ +=end + diff --git a/lib/ruby-1.9.1-rc1/lib/xmlrpc/utils.rb b/lib/ruby-1.9.1-rc1/lib/xmlrpc/utils.rb new file mode 100644 index 0000000..1c9df14 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/xmlrpc/utils.rb @@ -0,0 +1,165 @@ +# +# Defines ParserWriterChooseMixin, which makes it possible to choose a +# different XML writer and/or XML parser then the default one. +# The Mixin is used in client.rb (class Client) and server.rb (class +# BasicServer) +# +# Copyright (C) 2001, 2002, 2003 by Michael Neumann (mneumann@ntecs.de) +# +# $Id: utils.rb 19657 2008-10-01 13:46:53Z mame $ +# + +module XMLRPC + + # + # This module enables a user-class to be marshalled + # by XML-RPC for Ruby into a Hash, with one additional + # key/value pair "___class___" => ClassName + # + module Marshallable + end + + + module ParserWriterChooseMixin + + def set_writer(writer) + @create = Create.new(writer) + self + end + + def set_parser(parser) + @parser = parser + self + end + + private + + def create + # if set_writer was not already called then call it now + if @create.nil? then + set_writer(Config::DEFAULT_WRITER.new) + end + @create + end + + def parser + # if set_parser was not already called then call it now + if @parser.nil? then + set_parser(Config::DEFAULT_PARSER.new) + end + @parser + end + + end # module ParserWriterChooseMixin + + + module Service + + # + # base class for Service Interface definitions, used + # by BasicServer#add_handler + # + + class BasicInterface + attr_reader :prefix, :methods + + def initialize(prefix) + @prefix = prefix + @methods = [] + end + + def add_method(sig, help=nil, meth_name=nil) + mname = nil + sig = [sig] if sig.kind_of? String + + sig = sig.collect do |s| + name, si = parse_sig(s) + raise "Wrong signatures!" if mname != nil and name != mname + mname = name + si + end + + @methods << [mname, meth_name || mname, sig, help] + end + + private # --------------------------------- + + def parse_sig(sig) + # sig is a String + if sig =~ /^\s*(\w+)\s+([^(]+)(\(([^)]*)\))?\s*$/ + params = [$1] + name = $2.strip + $4.split(",").each {|i| params << i.strip} if $4 != nil + return name, params + else + raise "Syntax error in signature" + end + end + + end # class BasicInterface + + # + # class which wraps a Service Interface definition, used + # by BasicServer#add_handler + # + class Interface < BasicInterface + def initialize(prefix, &p) + raise "No interface specified" if p.nil? + super(prefix) + instance_eval(&p) + end + + def get_methods(obj, delim=".") + prefix = @prefix + delim + @methods.collect { |name, meth, sig, help| + [prefix + name, obj.method(meth).to_proc, sig, help] + } + end + + private # --------------------------------- + + def meth(*a) + add_method(*a) + end + + end # class Interface + + class PublicInstanceMethodsInterface < BasicInterface + def initialize(prefix) + super(prefix) + end + + def get_methods(obj, delim=".") + prefix = @prefix + delim + obj.class.public_instance_methods(false).collect { |name| + [prefix + name, obj.method(name).to_proc, nil, nil] + } + end + end + + + end # module Service + + + # + # short-form to create a Service::Interface + # + def self.interface(prefix, &p) + Service::Interface.new(prefix, &p) + end + + # short-cut for creating a PublicInstanceMethodsInterface + def self.iPIMethods(prefix) + Service::PublicInstanceMethodsInterface.new(prefix) + end + + + module ParseContentType + def parse_content_type(str) + a, *b = str.split(";") + return a.strip.downcase, *b + end + end + +end # module XMLRPC + diff --git a/lib/ruby-1.9.1-rc1/lib/yaml.rb b/lib/ruby-1.9.1-rc1/lib/yaml.rb new file mode 100644 index 0000000..7843f7f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml.rb @@ -0,0 +1,440 @@ +# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*- vim: sw=4 ts=4 +# $Id: yaml.rb 19495 2008-09-23 18:16:08Z drbrain $ +# +# = yaml.rb: top-level module with methods for loading and parsing YAML documents +# +# Author:: why the lucky stiff +# + +require 'stringio' +require 'yaml/error' +require 'yaml/syck' +require 'yaml/tag' +require 'yaml/stream' +require 'yaml/constants' + +# == YAML +# +# YAML(tm) (rhymes with 'camel') is a +# straightforward machine parsable data serialization format designed for +# human readability and interaction with scripting languages such as Perl +# and Python. YAML is optimized for data serialization, formatted +# dumping, configuration files, log files, Internet messaging and +# filtering. This specification describes the YAML information model and +# serialization format. Together with the Unicode standard for characters, it +# provides all the information necessary to understand YAML Version 1.0 +# and construct computer programs to process it. +# +# See http://yaml.org/ for more information. For a quick tutorial, please +# visit YAML In Five Minutes (http://yaml.kwiki.org/?YamlInFiveMinutes). +# +# == About This Library +# +# The YAML 1.0 specification outlines four stages of YAML loading and dumping. +# This library honors all four of those stages, although data is really only +# available to you in three stages. +# +# The four stages are: native, representation, serialization, and presentation. +# +# The native stage refers to data which has been loaded completely into Ruby's +# own types. (See +YAML::load+.) +# +# The representation stage means data which has been composed into +# +YAML::BaseNode+ objects. In this stage, the document is available as a +# tree of node objects. You can perform YPath queries and transformations +# at this level. (See +YAML::parse+.) +# +# The serialization stage happens inside the parser. The YAML parser used in +# Ruby is called Syck. Serialized nodes are available in the extension as +# SyckNode structs. +# +# The presentation stage is the YAML document itself. This is accessible +# to you as a string. (See +YAML::dump+.) +# +# For more information about the various information models, see Chapter +# 3 of the YAML 1.0 Specification (http://yaml.org/spec/#id2491269). +# +# The YAML module provides quick access to the most common loading (YAML::load) +# and dumping (YAML::dump) tasks. This module also provides an API for registering +# global types (YAML::add_domain_type). +# +# == Example +# +# A simple round-trip (load and dump) of an object. +# +# require "yaml" +# +# test_obj = ["dogs", "cats", "badgers"] +# +# yaml_obj = YAML::dump( test_obj ) +# # -> --- +# - dogs +# - cats +# - badgers +# ruby_obj = YAML::load( yaml_obj ) +# # => ["dogs", "cats", "badgers"] +# ruby_obj == test_obj +# # => true +# +# To register your custom types with the global resolver, use +add_domain_type+. +# +# YAML::add_domain_type( "your-site.com,2004", "widget" ) do |type, val| +# Widget.new( val ) +# end +# +module YAML + + Resolver = YAML::Syck::Resolver + DefaultResolver = YAML::Syck::DefaultResolver + DefaultResolver.use_types_at( @@tagged_classes ) + GenericResolver = YAML::Syck::GenericResolver + Parser = YAML::Syck::Parser + Emitter = YAML::Syck::Emitter + + # Returns a new default parser + def YAML.parser; Parser.new.set_resolver( YAML.resolver ); end + # Returns a new generic parser + def YAML.generic_parser; Parser.new.set_resolver( GenericResolver ); end + # Returns the default resolver + def YAML.resolver; DefaultResolver; end + # Returns a new default emitter + def YAML.emitter; Emitter.new.set_resolver( YAML.resolver ); end + + # + # Converts _obj_ to YAML and writes the YAML result to _io_. + # + # File.open( 'animals.yaml', 'w' ) do |out| + # YAML.dump( ['badger', 'elephant', 'tiger'], out ) + # end + # + # If no _io_ is provided, a string containing the dumped YAML + # is returned. + # + # YAML.dump( :locked ) + # #=> "--- :locked" + # + def YAML.dump( obj, io = nil ) + obj.to_yaml( io || io2 = StringIO.new ) + io || ( io2.rewind; io2.read ) + end + + # + # Load a document from the current _io_ stream. + # + # File.open( 'animals.yaml' ) { |yf| YAML::load( yf ) } + # #=> ['badger', 'elephant', 'tiger'] + # + # Can also load from a string. + # + # YAML.load( "--- :locked" ) + # #=> :locked + # + def YAML.load( io ) + yp = parser.load( io ) + end + + # + # Load a document from the file located at _filepath_. + # + # YAML.load_file( 'animals.yaml' ) + # #=> ['badger', 'elephant', 'tiger'] + # + def YAML.load_file( filepath ) + File.open( filepath ) do |f| + load( f ) + end + end + + # + # Parse the first document from the current _io_ stream + # + # File.open( 'animals.yaml' ) { |yf| YAML::load( yf ) } + # #=> #, + # #, + # #]> + # + # Can also load from a string. + # + # YAML.parse( "--- :locked" ) + # #=> # + # + def YAML.parse( io ) + yp = generic_parser.load( io ) + end + + # + # Parse a document from the file located at _filepath_. + # + # YAML.parse_file( 'animals.yaml' ) + # #=> #, + # #, + # #]> + # + def YAML.parse_file( filepath ) + File.open( filepath ) do |f| + parse( f ) + end + end + + # + # Calls _block_ with each consecutive document in the YAML + # stream contained in _io_. + # + # File.open( 'many-docs.yaml' ) do |yf| + # YAML.each_document( yf ) do |ydoc| + # ## ydoc contains the single object + # ## from the YAML document + # end + # end + # + def YAML.each_document( io, &block ) + yp = parser.load_documents( io, &block ) + end + + # + # Calls _block_ with each consecutive document in the YAML + # stream contained in _io_. + # + # File.open( 'many-docs.yaml' ) do |yf| + # YAML.load_documents( yf ) do |ydoc| + # ## ydoc contains the single object + # ## from the YAML document + # end + # end + # + def YAML.load_documents( io, &doc_proc ) + YAML.each_document( io, &doc_proc ) + end + + # + # Calls _block_ with a tree of +YAML::BaseNodes+, one tree for + # each consecutive document in the YAML stream contained in _io_. + # + # File.open( 'many-docs.yaml' ) do |yf| + # YAML.each_node( yf ) do |ydoc| + # ## ydoc contains a tree of nodes + # ## from the YAML document + # end + # end + # + def YAML.each_node( io, &doc_proc ) + yp = generic_parser.load_documents( io, &doc_proc ) + end + + # + # Calls _block_ with a tree of +YAML::BaseNodes+, one tree for + # each consecutive document in the YAML stream contained in _io_. + # + # File.open( 'many-docs.yaml' ) do |yf| + # YAML.parse_documents( yf ) do |ydoc| + # ## ydoc contains a tree of nodes + # ## from the YAML document + # end + # end + # + def YAML.parse_documents( io, &doc_proc ) + YAML.each_node( io, &doc_proc ) + end + + # + # Loads all documents from the current _io_ stream, + # returning a +YAML::Stream+ object containing all + # loaded documents. + # + def YAML.load_stream( io ) + d = nil + parser.load_documents( io ) do |doc| + d = YAML::Stream.new if not d + d.add( doc ) + end + return d + end + + # + # Returns a YAML stream containing each of the items in +objs+, + # each having their own document. + # + # YAML.dump_stream( 0, [], {} ) + # #=> --- 0 + # --- [] + # --- {} + # + def YAML.dump_stream( *objs ) + d = YAML::Stream.new + objs.each do |doc| + d.add( doc ) + end + d.emit + end + + # + # Add a global handler for a YAML domain type. + # + def YAML.add_domain_type( domain, type_tag, &transfer_proc ) + resolver.add_type( "tag:#{ domain }:#{ type_tag }", transfer_proc ) + end + + # + # Add a transfer method for a builtin type + # + def YAML.add_builtin_type( type_tag, &transfer_proc ) + resolver.add_type( "tag:yaml.org,2002:#{ type_tag }", transfer_proc ) + end + + # + # Add a transfer method for a builtin type + # + def YAML.add_ruby_type( type_tag, &transfer_proc ) + resolver.add_type( "tag:ruby.yaml.org,2002:#{ type_tag }", transfer_proc ) + end + + # + # Add a private document type + # + def YAML.add_private_type( type_re, &transfer_proc ) + resolver.add_type( "x-private:" + type_re, transfer_proc ) + end + + # + # Detect typing of a string + # + def YAML.detect_implicit( val ) + resolver.detect_implicit( val ) + end + + # + # Convert a type_id to a taguri + # + def YAML.tagurize( val ) + resolver.tagurize( val ) + end + + # + # Apply a transfer method to a Ruby object + # + def YAML.transfer( type_id, obj ) + resolver.transfer( YAML.tagurize( type_id ), obj ) + end + + # + # Apply any implicit a node may qualify for + # + def YAML.try_implicit( obj ) + YAML.transfer( YAML.detect_implicit( obj ), obj ) + end + + # + # Method to extract colon-seperated type and class, returning + # the type and the constant of the class + # + def YAML.read_type_class( type, obj_class ) + scheme, domain, type, tclass = type.split( ':', 4 ) + tclass.split( "::" ).each { |c| obj_class = obj_class.const_get( c ) } if tclass + return [ type, obj_class ] + end + + # + # Allocate blank object + # + def YAML.object_maker( obj_class, val ) + if Hash === val + o = obj_class.allocate + val.each_pair { |k,v| + o.instance_variable_set("@#{k}", v) + } + o + else + raise YAML::Error, "Invalid object explicitly tagged !ruby/Object: " + val.inspect + end + end + + # + # Allocate an Emitter if needed + # + def YAML.quick_emit( oid, opts = {}, &e ) + out = + if opts.is_a? YAML::Emitter + opts + else + emitter.reset( opts ) + end + oid = + case oid when Fixnum, NilClass; oid + else oid = "#{oid.object_id}-#{oid.hash}" + end + out.emit( oid, &e ) + end + +end + +require 'yaml/rubytypes' +require 'yaml/types' + +module Kernel + # + # ryan:: You know how Kernel.p is a really convenient way to dump ruby + # structures? The only downside is that it's not as legible as + # YAML. + # + # _why:: (listening) + # + # ryan:: I know you don't want to urinate all over your users' namespaces. + # But, on the other hand, convenience of dumping for debugging is, + # IMO, a big YAML use case. + # + # _why:: Go nuts! Have a pony parade! + # + # ryan:: Either way, I certainly will have a pony parade. + # + + # Prints any supplied _objects_ out in YAML. Intended as + # a variation on +Kernel::p+. + # + # S = Struct.new(:name, :state) + # s = S['dave', 'TX'] + # y s + # + # _produces:_ + # + # --- !ruby/struct:S + # name: dave + # state: TX + # + def y( object, *objects ) + objects.unshift object + puts( if objects.length == 1 + YAML::dump( *objects ) + else + YAML::dump_stream( *objects ) + end ) + end + private :y +end + + diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/baseemitter.rb b/lib/ruby-1.9.1-rc1/lib/yaml/baseemitter.rb new file mode 100644 index 0000000..4bdc796 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/baseemitter.rb @@ -0,0 +1,242 @@ +# +# BaseEmitter +# + +require 'yaml/constants' +require 'yaml/encoding' +require 'yaml/error' + +module YAML + module BaseEmitter + def options( opt = nil ) + if opt + @options[opt] || YAML::DEFAULTS[opt] + else + @options + end + end + + def options=( opt ) + @options = opt + end + + # + # Emit binary data + # + def binary_base64( value ) + self << "!binary " + self.node_text( [value].pack("m"), '|' ) + end + + # + # Emit plain, normal flowing text + # + def node_text( value, block = nil ) + @seq_map = false + valx = value.dup + unless block + block = + if options(:UseBlock) + '|' + elsif not options(:UseFold) and valx =~ /\n[ \t]/ and not valx =~ /#{YAML::ESCAPE_CHAR}/ + '|' + else + '>' + end + indt = $&.to_i if block =~ /\d+/ + if valx =~ /(\A\n*[ \t#]|^---\s+)/ + indt = options(:Indent) unless indt.to_i > 0 + block += indt.to_s + end + + block += + if valx =~ /\n\Z\n/ + "+" + elsif valx =~ /\Z\n/ + "" + else + "-" + end + end + block += "\n" + if block[0] == ?" + esc_skip = ( "\t\n" unless valx =~ /^[ \t]/ ) || "" + valx = fold( YAML::escape( valx, esc_skip ) + "\"" ).chomp + self << '"' + indent_text( valx, indt, false ) + else + if block[0] == ?> + valx = fold( valx ) + end + #p [block, indt] + self << block + indent_text( valx, indt ) + end + end + + # + # Emit a simple, unqouted string + # + def simple( value ) + @seq_map = false + self << value.to_s + end + + # + # Emit double-quoted string + # + def double( value ) + "\"#{YAML.escape( value )}\"" + end + + # + # Emit single-quoted string + # + def single( value ) + "'#{value}'" + end + + # + # Write a text block with the current indent + # + def indent_text( text, mod, first_line = true ) + return "" if text.to_s.empty? + spacing = indent( mod ) + text = text.gsub( /\A([^\n])/, "#{ spacing }\\1" ) if first_line + return text.gsub( /\n^([^\n])/, "\n#{spacing}\\1" ) + end + + # + # Write a current indent + # + def indent( mod = nil ) + #p [ self.id, level, mod, :INDENT ] + if level <= 0 + mod ||= 0 + else + mod ||= options(:Indent) + mod += ( level - 1 ) * options(:Indent) + end + return " " * mod + end + + # + # Add indent to the buffer + # + def indent! + self << indent + end + + # + # Folding paragraphs within a column + # + def fold( value ) + value.gsub( /(^[ \t]+.*$)|(\S.{0,#{options(:BestWidth) - 1}})(?:[ \t]+|(\n+(?=[ \t]|\Z))|$)/ ) do + $1 || $2 + ( $3 || "\n" ) + end + end + + # + # Quick mapping + # + def map( type, &e ) + val = Mapping.new + e.call( val ) + self << "#{type} " if type.length.nonzero? + + # + # Empty hashes + # + if val.length.zero? + self << "{}" + @seq_map = false + else + # FIXME + # if @buffer.length == 1 and options(:UseHeader) == false and type.length.zero? + # @headless = 1 + # end + + defkey = @options.delete( :DefaultKey ) + if defkey + seq_map_shortcut + self << "= : " + defkey.to_yaml( :Emitter => self ) + end + + # + # Emit the key and value + # + val.each { |v| + seq_map_shortcut + if v[0].is_complex_yaml? + self << "? " + end + v[0].to_yaml( :Emitter => self ) + if v[0].is_complex_yaml? + self << "\n" + indent! + end + self << ": " + v[1].to_yaml( :Emitter => self ) + } + end + end + + def seq_map_shortcut + # FIXME: seq_map needs to work with the new anchoring system + # if @seq_map + # @anchor_extras[@buffer.length - 1] = "\n" + indent + # @seq_map = false + # else + self << "\n" + indent! + # end + end + + # + # Quick sequence + # + def seq( type, &e ) + @seq_map = false + val = Sequence.new + e.call( val ) + self << "#{type} " if type.length.nonzero? + + # + # Empty arrays + # + if val.length.zero? + self << "[]" + else + # FIXME + # if @buffer.length == 1 and options(:UseHeader) == false and type.length.zero? + # @headless = 1 + # end + + # + # Emit the key and value + # + val.each { |v| + self << "\n" + indent! + self << "- " + @seq_map = true if v.class == Hash + v.to_yaml( :Emitter => self ) + } + end + end + end + + # + # Emitter helper classes + # + class Mapping < Array + def add( k, v ) + push [k, v] + end + end + + class Sequence < Array + def add( v ) + push v + end + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/basenode.rb b/lib/ruby-1.9.1-rc1/lib/yaml/basenode.rb new file mode 100644 index 0000000..5439903 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/basenode.rb @@ -0,0 +1,216 @@ +# +# YAML::BaseNode class +# +require 'yaml/ypath' + +module YAML + + # + # YAML Generic Model container + # + module BaseNode + + # + # Search for YPath entry and return + # qualified nodes. + # + def select( ypath_str ) + matches = match_path( ypath_str ) + + # + # Create a new generic view of the elements selected + # + if matches + result = [] + matches.each { |m| + result.push m.last + } + YAML.transfer( 'seq', result ) + end + end + + # + # Search for YPath entry and return + # transformed nodes. + # + def select!( ypath_str ) + matches = match_path( ypath_str ) + + # + # Create a new generic view of the elements selected + # + if matches + result = [] + matches.each { |m| + result.push m.last.transform + } + result + end + end + + # + # Search for YPath entry and return a list of + # qualified paths. + # + def search( ypath_str ) + matches = match_path( ypath_str ) + + if matches + matches.collect { |m| + path = [] + m.each_index { |i| + path.push m[i] if ( i % 2 ).zero? + } + "/" + path.compact.join( "/" ) + } + end + end + + def at( seg ) + if Hash === @value + self[seg] + elsif Array === @value and seg =~ /\A\d+\Z/ and @value[seg.to_i] + @value[seg.to_i] + end + end + + # + # YPath search returning a complete depth array + # + def match_path( ypath_str ) + depth = 0 + matches = [] + YPath.each_path( ypath_str ) do |ypath| + seg = match_segment( ypath, 0 ) + matches += seg if seg + end + matches.uniq + end + + # + # Search a node for a single YPath segment + # + def match_segment( ypath, depth ) + deep_nodes = [] + seg = ypath.segments[ depth ] + if seg == "/" + unless String === @value + idx = -1 + @value.collect { |v| + idx += 1 + if Hash === @value + match_init = [v[0].transform, v[1]] + match_deep = v[1].match_segment( ypath, depth ) + else + match_init = [idx, v] + match_deep = v.match_segment( ypath, depth ) + end + if match_deep + match_deep.each { |m| + deep_nodes.push( match_init + m ) + } + end + } + end + depth += 1 + seg = ypath.segments[ depth ] + end + match_nodes = + case seg + when "." + [[nil, self]] + when ".." + [["..", nil]] + when "*" + if @value.is_a? Enumerable + idx = -1 + @value.collect { |h| + idx += 1 + if Hash === @value + [h[0].transform, h[1]] + else + [idx, h] + end + } + end + else + if seg =~ /^"(.*)"$/ + seg = $1 + elsif seg =~ /^'(.*)'$/ + seg = $1 + end + if ( v = at( seg ) ) + [[ seg, v ]] + end + end + return deep_nodes unless match_nodes + pred = ypath.predicates[ depth ] + if pred + case pred + when /^\.=/ + pred = $' # ' + match_nodes.reject! { |n| + n.last.value != pred + } + else + match_nodes.reject! { |n| + n.last.at( pred ).nil? + } + end + end + return match_nodes + deep_nodes unless ypath.segments.length > depth + 1 + + #puts "DEPTH: #{depth + 1}" + deep_nodes = [] + match_nodes.each { |n| + if n[1].is_a? BaseNode + match_deep = n[1].match_segment( ypath, depth + 1 ) + if match_deep + match_deep.each { |m| + deep_nodes.push( n + m ) + } + end + else + deep_nodes = [] + end + } + deep_nodes = nil if deep_nodes.length == 0 + deep_nodes + end + + # + # We want the node to act like as Hash + # if it is. + # + def []( *key ) + if Hash === @value + v = @value.detect { |k,| k.transform == key.first } + v[1] if v + elsif Array === @value + @value.[]( *key ) + end + end + + def children + if Hash === @value + @value.values.collect { |c| c[1] } + elsif Array === @value + @value + end + end + + def children_with_index + if Hash === @value + @value.keys.collect { |i| [self[i], i] } + elsif Array === @value + i = -1; @value.collect { |v| i += 1; [v, i] } + end + end + + def emit + transform.to_yaml + end + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/constants.rb b/lib/ruby-1.9.1-rc1/lib/yaml/constants.rb new file mode 100644 index 0000000..fb833d3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/constants.rb @@ -0,0 +1,45 @@ +# +# Constants used throughout the library +# +module YAML + + # + # Constants + # + VERSION = '0.60' + SUPPORTED_YAML_VERSIONS = ['1.0'] + + # + # Parser tokens + # + WORD_CHAR = 'A-Za-z0-9' + PRINTABLE_CHAR = '-_A-Za-z0-9!?/()$\'". ' + NOT_PLAIN_CHAR = '\x7f\x0-\x1f\x80-\x9f' + ESCAPE_CHAR = '[\\x00-\\x09\\x0b-\\x1f]' + INDICATOR_CHAR = '*&!|\\\\^@%{}[]=' + SPACE_INDICATORS = '-#:,?' + RESTRICTED_INDICATORS = '#:,}]' + DNS_COMP_RE = "\\w(?:[-\\w]*\\w)?" + DNS_NAME_RE = "(?:(?:#{DNS_COMP_RE}\\.)+#{DNS_COMP_RE}|#{DNS_COMP_RE})" + ESCAPES = %w{\x00 \x01 \x02 \x03 \x04 \x05 \x06 \a + \x08 \t \n \v \f \r \x0e \x0f + \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 + \x18 \x19 \x1a \e \x1c \x1d \x1e \x1f + } + UNESCAPES = { + 'a' => "\x07", 'b' => "\x08", 't' => "\x09", + 'n' => "\x0a", 'v' => "\x0b", 'f' => "\x0c", + 'r' => "\x0d", 'e' => "\x1b", '\\' => '\\', + } + + # + # Default settings + # + DEFAULTS = { + :Indent => 2, :UseHeader => false, :UseVersion => false, :Version => '1.0', + :SortKeys => false, :AnchorFormat => 'id%03d', :ExplicitTypes => false, + :WidthType => 'absolute', :BestWidth => 80, + :UseBlock => false, :UseFold => false, :Encoding => :None + } + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/dbm.rb b/lib/ruby-1.9.1-rc1/lib/yaml/dbm.rb new file mode 100644 index 0000000..87d6009 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/dbm.rb @@ -0,0 +1,111 @@ +require 'yaml' +require 'dbm' +# +# YAML + DBM = YDBM +# - Same interface as DBM class +# +module YAML + +class DBM < ::DBM + VERSION = "0.1" + def []( key ) + fetch( key ) + end + def []=( key, val ) + store( key, val ) + end + def fetch( keystr, ifnone = nil ) + begin + val = super( keystr ) + return YAML::load( val ) if String === val + rescue IndexError + end + if block_given? + yield keystr + else + ifnone + end + end + def index( keystr ) + super( keystr.to_yaml ) + end + def values_at( *keys ) + keys.collect { |k| fetch( k ) } + end + def delete( key ) + v = super( key ) + if String === v + v = YAML::load( v ) + end + v + end + def delete_if + del_keys = keys.dup + del_keys.delete_if { |k| yield( k, fetch( k ) ) == false } + del_keys.each { |k| delete( k ) } + self + end + def reject + hsh = self.to_hash + hsh.reject { |k,v| yield k, v } + end + def each_pair + keys.each { |k| yield k, fetch( k ) } + self + end + def each_value + super { |v| yield YAML::load( v ) } + self + end + def values + super.collect { |v| YAML::load( v ) } + end + def has_value?( val ) + each_value { |v| return true if v == val } + return false + end + def invert + h = {} + keys.each { |k| h[ self.fetch( k ) ] = k } + h + end + def replace( hsh ) + clear + update( hsh ) + end + def shift + a = super + a[1] = YAML::load( a[1] ) if a + a + end + def select( *keys ) + if block_given? + self.keys.collect { |k| v = self[k]; [k, v] if yield k, v }.compact + else + values_at( *keys ) + end + end + def store( key, val ) + super( key, val.to_yaml ) + val + end + def update( hsh ) + hsh.keys.each do |k| + self.store( k, hsh.fetch( k ) ) + end + self + end + def to_a + a = [] + keys.each { |k| a.push [ k, self.fetch( k ) ] } + a + end + def to_hash + h = {} + keys.each { |k| h[ k ] = self.fetch( k ) } + h + end + alias :each :each_pair +end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/encoding.rb b/lib/ruby-1.9.1-rc1/lib/yaml/encoding.rb new file mode 100644 index 0000000..57dc553 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/encoding.rb @@ -0,0 +1,33 @@ +# +# Handle Unicode-to-Internal conversion +# + +module YAML + + # + # Escape the string, condensing common escapes + # + def YAML.escape( value, skip = "" ) + value.gsub( /\\/, "\\\\\\" ). + gsub( /"/, "\\\"" ). + gsub( /([\x00-\x1f])/ ) do + skip[$&] || ESCAPES[ $&.unpack("C")[0] ] + end + end + + # + # Unescape the condenses escapes + # + def YAML.unescape( value ) + value.gsub( /\\(?:([nevfbart\\])|0?x([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/ ) { + if $3 + ["#$3".hex ].pack('U*') + elsif $2 + [$2].pack( "H2" ) + else + UNESCAPES[$1] + end + } + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/error.rb b/lib/ruby-1.9.1-rc1/lib/yaml/error.rb new file mode 100644 index 0000000..15865a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/error.rb @@ -0,0 +1,34 @@ +# +# Error messages and exception class +# + +module YAML + + # + # Error messages + # + + ERROR_NO_HEADER_NODE = "With UseHeader=false, the node Array or Hash must have elements" + ERROR_NEED_HEADER = "With UseHeader=false, the node must be an Array or Hash" + ERROR_BAD_EXPLICIT = "Unsupported explicit transfer: '%s'" + ERROR_MANY_EXPLICIT = "More than one explicit transfer" + ERROR_MANY_IMPLICIT = "More than one implicit request" + ERROR_NO_ANCHOR = "No anchor for alias '%s'" + ERROR_BAD_ANCHOR = "Invalid anchor: %s" + ERROR_MANY_ANCHOR = "More than one anchor" + ERROR_ANCHOR_ALIAS = "Can't define both an anchor and an alias" + ERROR_BAD_ALIAS = "Invalid alias: %s" + ERROR_MANY_ALIAS = "More than one alias" + ERROR_ZERO_INDENT = "Can't use zero as an indentation width" + ERROR_UNSUPPORTED_VERSION = "This release of YAML.rb does not support YAML version %s" + ERROR_UNSUPPORTED_ENCODING = "Attempt to use unsupported encoding: %s" + + # + # YAML Error classes + # + + class Error < StandardError; end + class ParseError < Error; end + class TypeError < StandardError; end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/loader.rb b/lib/ruby-1.9.1-rc1/lib/yaml/loader.rb new file mode 100644 index 0000000..eb0709e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/loader.rb @@ -0,0 +1,14 @@ +# +# YAML::Loader class +# .. type handling .. +# +module YAML + class Loader + TRANSFER_DOMAINS = { + 'yaml.org,2002' => {}, + 'ruby.yaml.org,2002' => {} + } + PRIVATE_TYPES = {} + IMPLICIT_TYPES = [ 'null', 'bool', 'time', 'int', 'float' ] + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/rubytypes.rb b/lib/ruby-1.9.1-rc1/lib/yaml/rubytypes.rb new file mode 100644 index 0000000..ae65b35 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/rubytypes.rb @@ -0,0 +1,446 @@ +# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*- vim: sw=4 ts=4 +require 'date' + +class Class + def to_yaml( opts = {} ) + raise TypeError, "can't dump anonymous class %s" % self.class + end +end + +class Object + yaml_as "tag:ruby.yaml.org,2002:object" + def to_yaml_style; end + def to_yaml_properties; instance_variables.sort; end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( taguri, to_yaml_style ) do |map| + to_yaml_properties.each do |m| + map.add( m[1..-1], instance_variable_get( m ) ) + end + end + end + end +end + +class Hash + yaml_as "tag:ruby.yaml.org,2002:hash" + yaml_as "tag:yaml.org,2002:map" + def yaml_initialize( tag, val ) + if Array === val + update Hash.[]( *val ) # Convert the map to a sequence + elsif Hash === val + update val + else + raise YAML::TypeError, "Invalid map explicitly tagged #{ tag }: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( taguri, to_yaml_style ) do |map| + each do |k, v| + map.add( k, v ) + end + end + end + end +end + +class Struct + yaml_as "tag:ruby.yaml.org,2002:struct" + def self.yaml_tag_class_name; self.name.gsub( "Struct::", "" ); end + def self.yaml_tag_read_class( name ); "Struct::#{ name }"; end + def self.yaml_new( klass, tag, val ) + if Hash === val + struct_type = nil + + # + # Use existing Struct if it exists + # + props = {} + val.delete_if { |k,v| props[k] = v if k =~ /^@/ } + begin + struct_name, struct_type = YAML.read_type_class( tag, Struct ) + rescue NameError + end + if not struct_type + struct_def = [ tag.split( ':', 4 ).last ] + struct_type = Struct.new( *struct_def.concat( val.keys.collect { |k| k.intern } ) ) + end + + # + # Set the Struct properties + # + st = YAML::object_maker( struct_type, {} ) + st.members.each do |m| + st.send( "#{m}=", val[m] ) + end + props.each do |k,v| + st.instance_variable_set(k, v) + end + st + else + raise YAML::TypeError, "Invalid Ruby Struct: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + # + # Basic struct is passed as a YAML map + # + out.map( taguri, to_yaml_style ) do |map| + self.members.each do |m| + map.add( m, self[m] ) + end + self.to_yaml_properties.each do |m| + map.add( m, instance_variable_get( m ) ) + end + end + end + end +end + +class Array + yaml_as "tag:ruby.yaml.org,2002:array" + yaml_as "tag:yaml.org,2002:seq" + def yaml_initialize( tag, val ); concat( val.to_a ); end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.seq( taguri, to_yaml_style ) do |seq| + each do |x| + seq.add( x ) + end + end + end + end +end + +class Exception + yaml_as "tag:ruby.yaml.org,2002:exception" + def Exception.yaml_new( klass, tag, val ) + o = YAML.object_maker( klass, { 'mesg' => val.delete( 'message' ) } ) + val.each_pair do |k,v| + o.instance_variable_set("@#{k}", v) + end + o + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( taguri, to_yaml_style ) do |map| + map.add( 'message', message ) + to_yaml_properties.each do |m| + map.add( m[1..-1], instance_variable_get( m ) ) + end + end + end + end +end + +class String + yaml_as "tag:ruby.yaml.org,2002:string" + yaml_as "tag:yaml.org,2002:binary" + yaml_as "tag:yaml.org,2002:str" + def is_complex_yaml? + to_yaml_style or not to_yaml_properties.empty? or self =~ /\n.+/ + end + def is_binary_data? + ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? + end + def String.yaml_new( klass, tag, val ) + val = val.unpack("m")[0] if tag == "tag:yaml.org,2002:binary" + val = { 'str' => val } if String === val + if Hash === val + s = klass.allocate + # Thank you, NaHi + String.instance_method(:initialize). + bind(s). + call( val.delete( 'str' ) ) + val.each { |k,v| s.instance_variable_set( k, v ) } + s + else + raise YAML::TypeError, "Invalid String: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( is_complex_yaml? ? self : nil, opts ) do |out| + if is_binary_data? + out.scalar( "tag:yaml.org,2002:binary", [self].pack("m"), :literal ) + elsif to_yaml_properties.empty? + out.scalar( taguri, self, self =~ /^:/ ? :quote2 : to_yaml_style ) + else + out.map( taguri, to_yaml_style ) do |map| + map.add( 'str', "#{self}" ) + to_yaml_properties.each do |m| + map.add( m, instance_variable_get( m ) ) + end + end + end + end + end +end + +class Symbol + yaml_as "tag:ruby.yaml.org,2002:symbol" + yaml_as "tag:ruby.yaml.org,2002:sym" + def Symbol.yaml_new( klass, tag, val ) + if String === val + val = YAML::load( val ) if val =~ /\A(["']).*\1\z/ + val.intern + else + raise YAML::TypeError, "Invalid Symbol: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + out.scalar( "tag:yaml.org,2002:str", self.inspect, :plain ) + end + end +end + +class Range + yaml_as "tag:ruby.yaml.org,2002:range" + def Range.yaml_new( klass, tag, val ) + inr = %r'(\w+|[+-]?\d+(?:\.\d+)?(?:e[+-]\d+)?|"(?:[^\\"]|\\.)*")' + opts = {} + if String === val and val =~ /^#{inr}(\.{2,3})#{inr}$/o + r1, rdots, r2 = $1, $2, $3 + opts = { + 'begin' => YAML.load( "--- #{r1}" ), + 'end' => YAML.load( "--- #{r2}" ), + 'excl' => rdots.length == 3 + } + val = {} + elsif Hash === val + opts['begin'] = val.delete('begin') + opts['end'] = val.delete('end') + opts['excl'] = val.delete('excl') + end + if Hash === opts + r = YAML::object_maker( klass, {} ) + # Thank you, NaHi + Range.instance_method(:initialize). + bind(r). + call( opts['begin'], opts['end'], opts['excl'] ) + val.each { |k,v| r.instance_variable_set( k, v ) } + r + else + raise YAML::TypeError, "Invalid Range: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + # if self.begin.is_complex_yaml? or self.begin.respond_to? :to_str or + # self.end.is_complex_yaml? or self.end.respond_to? :to_str or + # not to_yaml_properties.empty? + out.map( taguri, to_yaml_style ) do |map| + map.add( 'begin', self.begin ) + map.add( 'end', self.end ) + map.add( 'excl', self.exclude_end? ) + to_yaml_properties.each do |m| + map.add( m, instance_variable_get( m ) ) + end + end + # else + # out.scalar( taguri ) do |sc| + # sc.embed( self.begin ) + # sc.concat( self.exclude_end? ? "..." : ".." ) + # sc.embed( self.end ) + # end + # end + end + end +end + +class Regexp + yaml_as "tag:ruby.yaml.org,2002:regexp" + def Regexp.yaml_new( klass, tag, val ) + if String === val and val =~ /^\/(.*)\/([mix]*)$/ + val = { 'regexp' => $1, 'mods' => $2 } + end + if Hash === val + mods = nil + unless val['mods'].to_s.empty? + mods = 0x00 + mods |= Regexp::EXTENDED if val['mods'].include?( 'x' ) + mods |= Regexp::IGNORECASE if val['mods'].include?( 'i' ) + mods |= Regexp::MULTILINE if val['mods'].include?( 'm' ) + end + val.delete( 'mods' ) + r = YAML::object_maker( klass, {} ) + Regexp.instance_method(:initialize). + bind(r). + call( val.delete( 'regexp' ), mods ) + val.each { |k,v| r.instance_variable_set( k, v ) } + r + else + raise YAML::TypeError, "Invalid Regular expression: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + if to_yaml_properties.empty? + out.scalar( taguri, self.inspect, :plain ) + else + out.map( taguri, to_yaml_style ) do |map| + src = self.inspect + if src =~ /\A\/(.*)\/([a-z]*)\Z/ + map.add( 'regexp', $1 ) + map.add( 'mods', $2 ) + else + raise YAML::TypeError, "Invalid Regular expression: " + src + end + to_yaml_properties.each do |m| + map.add( m, instance_variable_get( m ) ) + end + end + end + end + end +end + +class Time + yaml_as "tag:ruby.yaml.org,2002:time" + yaml_as "tag:yaml.org,2002:timestamp" + def Time.yaml_new( klass, tag, val ) + if Hash === val + t = val.delete( 'at' ) + val.each { |k,v| t.instance_variable_set( k, v ) } + t + else + raise YAML::TypeError, "Invalid Time: " + val.inspect + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + tz = "Z" + # from the tidy Tobias Peters Thanks! + unless self.utc? + utc_same_instant = self.dup.utc + utc_same_writing = Time.utc(year,month,day,hour,min,sec,usec) + difference_to_utc = utc_same_writing - utc_same_instant + if (difference_to_utc < 0) + difference_sign = '-' + absolute_difference = -difference_to_utc + else + difference_sign = '+' + absolute_difference = difference_to_utc + end + difference_minutes = (absolute_difference/60).round + tz = "%s%02d:%02d" % [ difference_sign, difference_minutes / 60, difference_minutes % 60] + end + standard = self.strftime( "%Y-%m-%d %H:%M:%S" ) + standard += ".%06d" % [usec] if usec.nonzero? + standard += " %s" % [tz] + if to_yaml_properties.empty? + out.scalar( taguri, standard, :plain ) + else + out.map( taguri, to_yaml_style ) do |map| + map.add( 'at', standard ) + to_yaml_properties.each do |m| + map.add( m, instance_variable_get( m ) ) + end + end + end + end + end +end + +class Date + yaml_as "tag:yaml.org,2002:timestamp#ymd" + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.scalar( "tag:yaml.org,2002:timestamp", self.to_s, :plain ) + end + end +end + +class Integer + yaml_as "tag:yaml.org,2002:int" + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + out.scalar( "tag:yaml.org,2002:int", self.to_s, :plain ) + end + end +end + +class Float + yaml_as "tag:yaml.org,2002:float" + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + str = self.to_s + if str == "Infinity" + str = ".Inf" + elsif str == "-Infinity" + str = "-.Inf" + elsif str == "NaN" + str = ".NaN" + end + out.scalar( "tag:yaml.org,2002:float", str, :plain ) + end + end +end + +class Rational + yaml_as "tag:ruby.yaml.org,2002:object:Rational" + def Rational.yaml_new( klass, tag, val ) + if val.is_a? String + Rational( val ) + else + Rational( val['numerator'], val['denominator'] ) + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( taguri, nil ) do |map| + map.add( 'denominator', denominator ) + map.add( 'numerator', numerator ) + end + end + end +end + +class Complex + yaml_as "tag:ruby.yaml.org,2002:object:Complex" + def Complex.yaml_new( klass, tag, val ) + if val.is_a? String + Complex( val ) + else + Complex( val['real'], val['image'] ) + end + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( taguri, nil ) do |map| + map.add( 'image', imaginary ) + map.add( 'real', real ) + end + end + end +end + +class TrueClass + yaml_as "tag:yaml.org,2002:bool#yes" + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + out.scalar( taguri, "true", :plain ) + end + end +end + +class FalseClass + yaml_as "tag:yaml.org,2002:bool#no" + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + out.scalar( taguri, "false", :plain ) + end + end +end + +class NilClass + yaml_as "tag:yaml.org,2002:null" + def to_yaml( opts = {} ) + YAML::quick_emit( nil, opts ) do |out| + out.scalar( taguri, "", :plain ) + end + end +end + diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/store.rb b/lib/ruby-1.9.1-rc1/lib/yaml/store.rb new file mode 100644 index 0000000..e3a8e9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/store.rb @@ -0,0 +1,43 @@ +# +# YAML::Store +# +require 'yaml' +require 'pstore' + +class YAML::Store < PStore + def initialize( *o ) + @opt = YAML::DEFAULTS.dup + if String === o.first + super(o.shift) + end + if o.last.is_a? Hash + @opt.update(o.pop) + end + end + + def dump(table) + @table.to_yaml(@opt) + end + + def load(content) + table = YAML::load(content) + if table == false + {} + else + table + end + end + + def marshal_dump_supports_canonical_option? + false + end + + EMPTY_MARSHAL_DATA = {}.to_yaml + EMPTY_MARSHAL_CHECKSUM = Digest::MD5.digest(EMPTY_MARSHAL_DATA) + def empty_marshal_data + EMPTY_MARSHAL_DATA + end + def empty_marshal_checksum + EMPTY_MARSHAL_CHECKSUM + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/stream.rb b/lib/ruby-1.9.1-rc1/lib/yaml/stream.rb new file mode 100644 index 0000000..060fbc4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/stream.rb @@ -0,0 +1,40 @@ +module YAML + + # + # YAML::Stream -- for emitting many documents + # + class Stream + + attr_accessor :documents, :options + + def initialize( opts = {} ) + @options = opts + @documents = [] + end + + def []( i ) + @documents[ i ] + end + + def add( doc ) + @documents << doc + end + + def edit( doc_num, doc ) + @documents[ doc_num ] = doc + end + + def emit( io = nil ) + # opts = @options.dup + # opts[:UseHeader] = true if @documents.length > 1 + out = YAML.emitter + out.reset( io || io2 = StringIO.new ) + @documents.each { |v| + v.to_yaml( out ) + } + io || ( io2.rewind; io2.read ) + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/stringio.rb b/lib/ruby-1.9.1-rc1/lib/yaml/stringio.rb new file mode 100644 index 0000000..8ad949f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/stringio.rb @@ -0,0 +1,83 @@ +# +# Limited StringIO if no core lib is available +# +begin +require 'stringio' +rescue LoadError + # StringIO based on code by MoonWolf + class StringIO + def initialize(string="") + @string=string + @pos=0 + @eof=(string.size==0) + end + def pos + @pos + end + def eof + @eof + end + alias eof? eof + def readline(rs=$/) + if @eof + raise EOFError + else + if p = @string[@pos..-1]=~rs + line = @string[@pos,p+1] + else + line = @string[@pos..-1] + end + @pos+=line.size + @eof =true if @pos==@string.size + $_ = line + end + end + def rewind + seek(0,0) + end + def seek(offset,whence) + case whence + when 0 + @pos=offset + when 1 + @pos+=offset + when 2 + @pos=@string.size+offset + end + @eof=(@pos>=@string.size) + 0 + end + end + + # + # Class method for creating streams + # + def YAML.make_stream( io ) + if String === io + io = StringIO.new( io ) + elsif not IO === io + raise YAML::Error, "YAML stream must be an IO or String object." + end + if YAML::unicode + def io.readline + YAML.utf_to_internal( readline( @ln_sep ), @utf_encoding ) + end + def io.check_unicode + @utf_encoding = YAML.sniff_encoding( read( 4 ) ) + @ln_sep = YAML.enc_separator( @utf_encoding ) + seek( -4, IO::SEEK_CUR ) + end + def io.utf_encoding + @utf_encoding + end + io.check_unicode + else + def io.utf_encoding + :None + end + end + io + end + +end + diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/syck.rb b/lib/ruby-1.9.1-rc1/lib/yaml/syck.rb new file mode 100644 index 0000000..faf57e8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/syck.rb @@ -0,0 +1,19 @@ +# +# YAML::Syck module +# .. glues syck and yaml.rb together .. +# +require 'syck' +require 'yaml/basenode' + +module YAML + module Syck + + # + # Mixin BaseNode functionality + # + class Node + include YAML::BaseNode + end + + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/tag.rb b/lib/ruby-1.9.1-rc1/lib/yaml/tag.rb new file mode 100644 index 0000000..a91f2bd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/tag.rb @@ -0,0 +1,91 @@ +# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*- vim: sw=4 ts=4 +# $Id: tag.rb 11708 2007-02-12 23:01:19Z shyouhei $ +# +# = yaml/tag.rb: methods for associating a taguri to a class. +# +# Author:: why the lucky stiff +# +module YAML + # A dictionary of taguris which map to + # Ruby classes. + @@tagged_classes = {} + + # + # Associates a taguri _tag_ with a Ruby class _cls_. The taguri is used to give types + # to classes when loading YAML. Taguris are of the form: + # + # tag:authorityName,date:specific + # + # The +authorityName+ is a domain name or email address. The +date+ is the date the type + # was issued in YYYY or YYYY-MM or YYYY-MM-DD format. The +specific+ is a name for + # the type being added. + # + # For example, built-in YAML types have 'yaml.org' as the +authorityName+ and '2002' as the + # +date+. The +specific+ is simply the name of the type: + # + # tag:yaml.org,2002:int + # tag:yaml.org,2002:float + # tag:yaml.org,2002:timestamp + # + # The domain must be owned by you on the +date+ declared. If you don't own any domains on the + # date you declare the type, you can simply use an e-mail address. + # + # tag:why@ruby-lang.org,2004:notes/personal + # + def YAML.tag_class( tag, cls ) + if @@tagged_classes.has_key? tag + warn "class #{ @@tagged_classes[tag] } held ownership of the #{ tag } tag" + end + @@tagged_classes[tag] = cls + end + + # Returns the complete dictionary of taguris, paired with classes. The key for + # the dictionary is the full taguri. The value for each key is the class constant + # associated to that taguri. + # + # YAML.tagged_classes["tag:yaml.org,2002:int"] => Integer + # + def YAML.tagged_classes + @@tagged_classes + end +end + +class Module + # :stopdoc: + + # Adds a taguri _tag_ to a class, used when dumping or loading the class + # in YAML. See YAML::tag_class for detailed information on typing and + # taguris. + def yaml_as( tag, sc = true ) + verbose, $VERBOSE = $VERBOSE, nil + class_eval <<-"end;", __FILE__, __LINE__+1 + attr_writer :taguri + def taguri + if respond_to? :to_yaml_type + YAML::tagurize( to_yaml_type[1..-1] ) + else + return @taguri if defined?(@taguri) and @taguri + tag = #{ tag.dump } + if self.class.yaml_tag_subclasses? and self.class != YAML::tagged_classes[tag] + tag = "\#{ tag }:\#{ self.class.yaml_tag_class_name }" + end + tag + end + end + def self.yaml_tag_subclasses?; #{ sc ? 'true' : 'false' }; end + end; + YAML::tag_class tag, self + ensure + $VERBOSE = verbose + end + # Transforms the subclass name into a name suitable for display + # in a subclassed tag. + def yaml_tag_class_name + self.name + end + # Transforms the subclass name found in the tag into a Ruby + # constant name. + def yaml_tag_read_class( name ) + name + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/types.rb b/lib/ruby-1.9.1-rc1/lib/yaml/types.rb new file mode 100644 index 0000000..3871c62 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/types.rb @@ -0,0 +1,192 @@ +# -*- mode: ruby; ruby-indent-level: 4 -*- vim: sw=4 +# +# Classes required by the full core typeset +# + +module YAML + + # + # Default private type + # + class PrivateType + def self.tag_subclasses?; false; end + verbose, $VERBOSE = $VERBOSE, nil + def initialize( type, val ) + @type_id = type; @value = val + @value.taguri = "x-private:#{ @type_id }" + end + def to_yaml( opts = {} ) + @value.to_yaml( opts ) + end + ensure + $VERBOSE = verbose + end + + # + # Default domain type + # + class DomainType + def self.tag_subclasses?; false; end + verbose, $VERBOSE = $VERBOSE, nil + def initialize( domain, type, val ) + @domain = domain; @type_id = type; @value = val + @value.taguri = "tag:#{ @domain }:#{ @type_id }" + end + def to_yaml( opts = {} ) + @value.to_yaml( opts ) + end + ensure + $VERBOSE = verbose + end + + # + # Unresolved objects + # + class Object + def self.tag_subclasses?; false; end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.map( "tag:ruby.yaml.org,2002:object:#{ @class }", to_yaml_style ) do |map| + @ivars.each do |k,v| + map.add( k, v ) + end + end + end + end + end + + # + # YAML Hash class to support comments and defaults + # + class SpecialHash < ::Hash + attr_accessor :default + def inspect + self.default.to_s + end + def to_s + self.default.to_s + end + def update( h ) + if YAML::SpecialHash === h + @default = h.default if h.default + end + super( h ) + end + def to_yaml( opts = {} ) + opts[:DefaultKey] = self.default + super( opts ) + end + end + + # + # Builtin collection: !omap + # + class Omap < ::Array + yaml_as "tag:yaml.org,2002:omap" + def yaml_initialize( tag, val ) + if Array === val + val.each do |v| + if Hash === v + concat( v.to_a ) # Convert the map to a sequence + else + raise YAML::Error, "Invalid !omap entry: " + val.inspect + end + end + else + raise YAML::Error, "Invalid !omap: " + val.inspect + end + self + end + def self.[]( *vals ) + o = Omap.new + 0.step( vals.length - 1, 2 ) do |i| + o[vals[i]] = vals[i+1] + end + o + end + def []( k ) + self.assoc( k ).to_a[1] + end + def []=( k, *rest ) + val, set = rest.reverse + if ( tmp = self.assoc( k ) ) and not set + tmp[1] = val + else + self << [ k, val ] + end + val + end + def has_key?( k ) + self.assoc( k ) ? true : false + end + def is_complex_yaml? + true + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.seq( taguri, to_yaml_style ) do |seq| + self.each do |v| + seq.add( Hash[ *v ] ) + end + end + end + end + end + + # + # Builtin collection: !pairs + # + class Pairs < ::Array + yaml_as "tag:yaml.org,2002:pairs" + def yaml_initialize( tag, val ) + if Array === val + val.each do |v| + if Hash === v + concat( v.to_a ) # Convert the map to a sequence + else + raise YAML::Error, "Invalid !pairs entry: " + val.inspect + end + end + else + raise YAML::Error, "Invalid !pairs: " + val.inspect + end + self + end + def self.[]( *vals ) + p = Pairs.new + 0.step( vals.length - 1, 2 ) { |i| + p[vals[i]] = vals[i+1] + } + p + end + def []( k ) + self.assoc( k ).to_a + end + def []=( k, val ) + self << [ k, val ] + val + end + def has_key?( k ) + self.assoc( k ) ? true : false + end + def is_complex_yaml? + true + end + def to_yaml( opts = {} ) + YAML::quick_emit( self, opts ) do |out| + out.seq( taguri, to_yaml_style ) do |seq| + self.each do |v| + seq.add( Hash[ *v ] ) + end + end + end + end + end + + # + # Builtin collection: !set + # + class Set < ::Hash + yaml_as "tag:yaml.org,2002:set" + end +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/yamlnode.rb b/lib/ruby-1.9.1-rc1/lib/yaml/yamlnode.rb new file mode 100644 index 0000000..8afa142 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/yamlnode.rb @@ -0,0 +1,54 @@ +# +# YAML::YamlNode class +# +require 'yaml/basenode' + +module YAML + + # + # YAML Generic Model container + # + class YamlNode + include BaseNode + attr_accessor :kind, :type_id, :value, :anchor + def initialize(t, v) + @type_id = t + if Hash === v + @kind = 'map' + @value = {} + v.each {|key,val| + @value[key.transform] = [key, val] + } + elsif Array === v + @kind = 'seq' + @value = v + elsif String === v + @kind = 'scalar' + @value = v + end + end + + # + # Transform this node fully into a native type + # + def transform + t = nil + if @value.is_a? Hash + t = {} + @value.each { |k,v| + t[ k ] = v[1].transform + } + elsif @value.is_a? Array + t = [] + @value.each { |v| + t.push v.transform + } + else + t = @value + end + YAML.transfer_method( @type_id, t ) + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/lib/yaml/ypath.rb b/lib/ruby-1.9.1-rc1/lib/yaml/ypath.rb new file mode 100644 index 0000000..81348ca --- /dev/null +++ b/lib/ruby-1.9.1-rc1/lib/yaml/ypath.rb @@ -0,0 +1,52 @@ +# +# YAML::YPath +# + +module YAML + + class YPath + attr_accessor :segments, :predicates, :flags + def initialize( str ) + @segments = [] + @predicates = [] + @flags = nil + while str =~ /^\/?(\/|[^\/\[]+)(?:\[([^\]]+)\])?/ + @segments.push $1 + @predicates.push $2 + str = $' + end + unless str.to_s.empty? + @segments += str.split( "/" ) + end + if @segments.length == 0 + @segments.push "." + end + end + def YPath.each_path( str ) + # + # Find choices + # + paths = [] + str = "(#{ str })" + while str.sub!( /\(([^()]+)\)/, "\n#{ paths.length }\n" ) + paths.push $1.split( '|' ) + end + + # + # Construct all possible paths + # + all = [ str ] + ( paths.length - 1 ).downto( 0 ) do |i| + all = all.collect do |a| + paths[i].collect do |p| + a.gsub( /\n#{ i }\n/, p ) + end + end.flatten.uniq + end + all.collect do |path| + yield YPath.new( path ) + end + end + end + +end diff --git a/lib/ruby-1.9.1-rc1/load.c b/lib/ruby-1.9.1-rc1/load.c new file mode 100644 index 0000000..efe130c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/load.c @@ -0,0 +1,721 @@ +/* + * load methods from eval.c + */ + +#include "ruby/ruby.h" +#include "ruby/util.h" +#include "dln.h" +#include "eval_intern.h" + +VALUE ruby_dln_librefs; + +#define IS_RBEXT(e) (strcmp(e, ".rb") == 0) +#define IS_SOEXT(e) (strcmp(e, ".so") == 0 || strcmp(e, ".o") == 0) +#ifdef DLEXT2 +#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0) +#else +#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0) +#endif + + +static const char *const loadable_ext[] = { + ".rb", DLEXT, +#ifdef DLEXT2 + DLEXT2, +#endif + 0 +}; + +VALUE +rb_get_load_path(void) +{ + VALUE load_path = GET_VM()->load_path; + return load_path; +} + +VALUE +rb_get_expanded_load_path(void) +{ + VALUE load_path = rb_get_load_path(); + VALUE ary = rb_ary_new2(RARRAY_LEN(load_path)); + long i; + + for (i = 0; i < RARRAY_LEN(load_path); ++i) { + VALUE path = rb_file_expand_path(RARRAY_PTR(load_path)[i], Qnil); + rb_str_freeze(path); + rb_ary_push(ary, path); + } + rb_obj_freeze(ary); + return ary; +} + +static VALUE +load_path_getter(ID id, rb_vm_t *vm) +{ + return vm->load_path; +} + +static VALUE +get_loaded_features(void) +{ + return GET_VM()->loaded_features; +} + +static st_table * +get_loading_table(void) +{ + return GET_VM()->loading_table; +} + +static VALUE +loaded_feature_path(const char *name, long vlen, const char *feature, long len, + int type, VALUE load_path) +{ + long i; + + for (i = 0; i < RARRAY_LEN(load_path); ++i) { + VALUE p = RARRAY_PTR(load_path)[i]; + const char *s = StringValuePtr(p); + long n = RSTRING_LEN(p); + + if (vlen < n + len + 1) continue; + if (n && (strncmp(name, s, n) || name[n] != '/')) continue; + if (strncmp(name + n + 1, feature, len)) continue; + if (name[n+len+1] && name[n+len+1] != '.') continue; + switch (type) { + case 's': + if (IS_DLEXT(&name[n+len+1])) return p; + break; + case 'r': + if (IS_RBEXT(&name[n+len+1])) return p; + break; + default: + return p; + } + } + return 0; +} + +struct loaded_feature_searching { + const char *name; + long len; + int type; + VALUE load_path; + const char *result; +}; + +static int +loaded_feature_path_i(st_data_t v, st_data_t b, st_data_t f) +{ + const char *s = (const char *)v; + struct loaded_feature_searching *fp = (struct loaded_feature_searching *)f; + VALUE p = loaded_feature_path(s, strlen(s), fp->name, fp->len, + fp->type, fp->load_path); + if (!p) return ST_CONTINUE; + fp->result = s; + return ST_STOP; +} + +static int +rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const char **fn) +{ + VALUE v, features, p, load_path = 0; + const char *f, *e; + long i, len, elen, n; + st_table *loading_tbl; + st_data_t data; + int type; + + if (fn) *fn = 0; + if (ext) { + len = ext - feature; + elen = strlen(ext); + type = rb ? 'r' : 's'; + } + else { + len = strlen(feature); + elen = 0; + type = 0; + } + features = get_loaded_features(); + for (i = 0; i < RARRAY_LEN(features); ++i) { + v = RARRAY_PTR(features)[i]; + f = StringValuePtr(v); + if ((n = RSTRING_LEN(v)) < len) continue; + if (strncmp(f, feature, len) != 0) { + if (expanded) continue; + if (!load_path) load_path = rb_get_expanded_load_path(); + if (!(p = loaded_feature_path(f, n, feature, len, type, load_path))) + continue; + expanded = 1; + f += RSTRING_LEN(p) + 1; + } + if (!*(e = f + len)) { + if (ext) continue; + return 'u'; + } + if (*e != '.') continue; + if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) { + return 's'; + } + if ((rb || !ext) && (IS_RBEXT(e))) { + return 'r'; + } + } + loading_tbl = get_loading_table(); + if (loading_tbl) { + f = 0; + if (!expanded) { + struct loaded_feature_searching fs; + fs.name = feature; + fs.len = len; + fs.type = type; + fs.load_path = load_path ? load_path : rb_get_load_path(); + fs.result = 0; + st_foreach(loading_tbl, loaded_feature_path_i, (st_data_t)&fs); + if ((f = fs.result) != 0) { + if (fn) *fn = f; + goto loading; + } + } + if (st_get_key(loading_tbl, (st_data_t)feature, &data)) { + if (fn) *fn = (const char*)data; + loading: + if (!ext) return 'u'; + return !IS_RBEXT(ext) ? 's' : 'r'; + } + else { + VALUE bufstr; + char *buf; + + if (ext && *ext) return 0; + bufstr = rb_str_tmp_new(len + DLEXT_MAXLEN); + buf = RSTRING_PTR(bufstr); + MEMCPY(buf, feature, char, len); + for (i = 0; (e = loadable_ext[i]) != 0; i++) { + strlcpy(buf + len, e, DLEXT_MAXLEN + 1); + if (st_get_key(loading_tbl, (st_data_t)buf, &data)) { + rb_str_resize(bufstr, 0); + if (fn) *fn = (const char*)data; + return i ? 's' : 'r'; + } + } + rb_str_resize(bufstr, 0); + } + } + return 0; +} + +int +rb_provided(const char *feature) +{ + return rb_feature_provided(feature, 0); +} + +int +rb_feature_provided(const char *feature, const char **loading) +{ + const char *ext = strrchr(feature, '.'); + volatile VALUE fullpath = 0; + + if (*feature == '.' && + (feature[1] == '/' || strncmp(feature+1, "./", 2) == 0)) { + fullpath = rb_file_expand_path(rb_str_new2(feature), Qnil); + feature = RSTRING_PTR(fullpath); + } + if (ext && !strchr(ext, '/')) { + if (IS_RBEXT(ext)) { + if (rb_feature_p(feature, ext, Qtrue, Qfalse, loading)) return Qtrue; + return Qfalse; + } + else if (IS_SOEXT(ext) || IS_DLEXT(ext)) { + if (rb_feature_p(feature, ext, Qfalse, Qfalse, loading)) return Qtrue; + return Qfalse; + } + } + if (rb_feature_p(feature, feature + strlen(feature), Qtrue, Qfalse, loading)) + return Qtrue; + return Qfalse; +} + +static void +rb_provide_feature(VALUE feature) +{ + rb_ary_push(get_loaded_features(), feature); +} + +void +rb_provide(const char *feature) +{ + rb_provide_feature(rb_str_new2(feature)); +} + +NORETURN(static void load_failed(VALUE)); + +void +rb_load(VALUE fname, int wrap) +{ + VALUE tmp; + int state; + rb_thread_t *th = GET_THREAD(); + volatile VALUE wrapper = th->top_wrapper; + volatile VALUE self = th->top_self; + volatile int loaded = Qfalse; + volatile int mild_compile_error; +#ifndef __GNUC__ + rb_thread_t *volatile th0 = th; +#endif + + FilePathValue(fname); + fname = rb_str_new4(fname); + tmp = rb_find_file(fname); + if (!tmp) { + load_failed(fname); + } + RB_GC_GUARD(fname) = rb_str_new4(tmp); + + th->errinfo = Qnil; /* ensure */ + + if (!wrap) { + rb_secure(4); /* should alter global state */ + th->top_wrapper = 0; + } + else { + /* load in anonymous module as toplevel */ + th->top_self = rb_obj_clone(rb_vm_top_self()); + th->top_wrapper = rb_module_new(); + rb_extend_object(th->top_self, th->top_wrapper); + } + + mild_compile_error = th->mild_compile_error; + PUSH_TAG(); + state = EXEC_TAG(); + if (state == 0) { + NODE *node; + VALUE iseq; + + th->mild_compile_error++; + node = (NODE *)rb_load_file(RSTRING_PTR(fname)); + loaded = Qtrue; + iseq = rb_iseq_new_top(node, rb_str_new2(""), fname, Qfalse); + th->mild_compile_error--; + rb_iseq_eval(iseq); + } + POP_TAG(); + +#ifndef __GNUC__ + th = th0; + fname = RB_GC_GUARD(fname); +#endif + th->mild_compile_error = mild_compile_error; + th->top_self = self; + th->top_wrapper = wrapper; + + if (!loaded) { + rb_exc_raise(GET_THREAD()->errinfo); + } + if (state) { + vm_jump_tag_but_local_jump(state, Qundef); + } + + if (!NIL_P(GET_THREAD()->errinfo)) { + /* exception during load */ + rb_exc_raise(th->errinfo); + } +} + +void +rb_load_protect(VALUE fname, int wrap, int *state) +{ + int status; + + PUSH_TAG(); + if ((status = EXEC_TAG()) == 0) { + rb_load(fname, wrap); + } + POP_TAG(); + if (state) + *state = status; +} + +/* + * call-seq: + * load(filename, wrap=false) => true + * + * Loads and executes the Ruby + * program in the file _filename_. If the filename does not + * resolve to an absolute path, the file is searched for in the library + * directories listed in $:. If the optional _wrap_ + * parameter is +true+, the loaded script will be executed + * under an anonymous module, protecting the calling program's global + * namespace. In no circumstance will any local variables in the loaded + * file be propagated to the loading environment. + */ + +static VALUE +rb_f_load(int argc, VALUE *argv) +{ + VALUE fname, wrap; + + rb_scan_args(argc, argv, "11", &fname, &wrap); + rb_load(fname, RTEST(wrap)); + return Qtrue; +} + +static char * +load_lock(const char *ftptr) +{ + st_data_t data; + st_table *loading_tbl = get_loading_table(); + + if (!loading_tbl || !st_lookup(loading_tbl, (st_data_t)ftptr, &data)) { + /* loading ruby library should be serialized. */ + if (!loading_tbl) { + GET_VM()->loading_table = loading_tbl = st_init_strtable(); + } + /* partial state */ + ftptr = ruby_strdup(ftptr); + data = (st_data_t)rb_barrier_new(); + st_insert(loading_tbl, (st_data_t)ftptr, data); + return (char *)ftptr; + } + return RTEST(rb_barrier_wait((VALUE)data)) ? (char *)ftptr : 0; +} + +static void +load_unlock(const char *ftptr, int done) +{ + if (ftptr) { + st_data_t key = (st_data_t)ftptr; + st_data_t data; + st_table *loading_tbl = get_loading_table(); + + if (st_delete(loading_tbl, &key, &data)) { + VALUE barrier = (VALUE)data; + xfree((char *)key); + if (done) + rb_barrier_destroy(barrier); + else + rb_barrier_release(barrier); + } + } +} + + +/* + * call-seq: + * require(string) => true or false + * + * Ruby tries to load the library named _string_, returning + * +true+ if successful. If the filename does not resolve to + * an absolute path, it will be searched for in the directories listed + * in $:. If the file has the extension ``.rb'', it is + * loaded as a source file; if the extension is ``.so'', ``.o'', or + * ``.dll'', or whatever the default shared library extension is on + * the current platform, Ruby loads the shared library as a Ruby + * extension. Otherwise, Ruby tries adding ``.rb'', ``.so'', and so on + * to the name. The name of the loaded feature is added to the array in + * $". A feature will not be loaded if it's name already + * appears in $". However, the file name is not converted + * to an absolute path, so that ``require 'a';require + * './a''' will load a.rb twice. + * + * require "my-library.rb" + * require "db-driver" + */ + +VALUE +rb_f_require(VALUE obj, VALUE fname) +{ + return rb_require_safe(fname, rb_safe_level()); +} + +static int +search_required(VALUE fname, volatile VALUE *path) +{ + VALUE tmp; + char *ext, *ftptr; + int type, ft = 0; + const char *loading; + + *path = 0; + ext = strrchr(ftptr = RSTRING_PTR(fname), '.'); + if (ext && !strchr(ext, '/')) { + if (IS_RBEXT(ext)) { + if (rb_feature_p(ftptr, ext, Qtrue, Qfalse, &loading)) { + if (loading) *path = rb_str_new2(loading); + return 'r'; + } + if ((tmp = rb_find_file(fname)) != 0) { + ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); + if (!rb_feature_p(ftptr, ext, Qtrue, Qtrue, &loading) || loading) + *path = tmp; + return 'r'; + } + return 0; + } + else if (IS_SOEXT(ext)) { + if (rb_feature_p(ftptr, ext, Qfalse, Qfalse, &loading)) { + if (loading) *path = rb_str_new2(loading); + return 's'; + } + tmp = rb_str_new(RSTRING_PTR(fname), ext - RSTRING_PTR(fname)); +#ifdef DLEXT2 + OBJ_FREEZE(tmp); + if (rb_find_file_ext(&tmp, loadable_ext + 1)) { + ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); + if (!rb_feature_p(ftptr, ext, Qfalse, Qtrue, &loading) || loading) + *path = tmp; + return 's'; + } +#else + rb_str_cat2(tmp, DLEXT); + OBJ_FREEZE(tmp); + if ((tmp = rb_find_file(tmp)) != 0) { + ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); + if (!rb_feature_p(ftptr, ext, Qfalse, Qtrue, &loading) || loading) + *path = tmp; + return 's'; + } +#endif + } + else if (IS_DLEXT(ext)) { + if (rb_feature_p(ftptr, ext, Qfalse, Qfalse, &loading)) { + if (loading) *path = rb_str_new2(loading); + return 's'; + } + if ((tmp = rb_find_file(fname)) != 0) { + ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); + if (!rb_feature_p(ftptr, ext, Qfalse, Qtrue, &loading) || loading) + *path = tmp; + return 's'; + } + } + } + else if ((ft = rb_feature_p(ftptr, 0, Qfalse, Qfalse, &loading)) == 'r') { + if (loading) *path = rb_str_new2(loading); + return 'r'; + } + tmp = fname; + type = rb_find_file_ext(&tmp, loadable_ext); + tmp = rb_file_expand_path(tmp, Qnil); + switch (type) { + case 0: + if (ft) + break; + ftptr = RSTRING_PTR(tmp); + return rb_feature_p(ftptr, 0, Qfalse, Qtrue, 0); + + default: + if (ft) + break; + case 1: + ext = strrchr(ftptr = RSTRING_PTR(tmp), '.'); + if (rb_feature_p(ftptr, ext, !--type, Qtrue, &loading) && !loading) + break; + *path = tmp; + } + return type ? 's' : 'r'; +} + +static void +load_failed(VALUE fname) +{ + rb_raise(rb_eLoadError, "no such file to load -- %s", + RSTRING_PTR(fname)); +} + +static VALUE +load_ext(VALUE path) +{ + SCOPE_SET(NOEX_PUBLIC); + return (VALUE)dln_load(RSTRING_PTR(path)); +} + +VALUE +rb_require_safe(VALUE fname, int safe) +{ + VALUE result = Qnil; + rb_thread_t *th = GET_THREAD(); + volatile VALUE errinfo = th->errinfo; + int state; + struct { + int safe; + } volatile saved; + char *volatile ftptr = 0; + + PUSH_TAG(); + saved.safe = rb_safe_level(); + if ((state = EXEC_TAG()) == 0) { + VALUE path; + long handle; + int found; + + rb_set_safe_level_force(safe); + FilePathValue(fname); + RB_GC_GUARD(fname) = rb_str_new4(fname); + found = search_required(fname, &path); + if (found) { + if (!path || !(ftptr = load_lock(RSTRING_PTR(path)))) { + result = Qfalse; + } + else { + rb_set_safe_level_force(0); + switch (found) { + case 'r': + rb_load(path, 0); + break; + + case 's': + handle = (long)rb_vm_call_cfunc(rb_vm_top_self(), load_ext, + path, 0, path); + rb_ary_push(ruby_dln_librefs, LONG2NUM(handle)); + break; + } + rb_provide_feature(path); + result = Qtrue; + } + } + } + POP_TAG(); + load_unlock(ftptr, !state); + + rb_set_safe_level_force(saved.safe); + if (state) { + JUMP_TAG(state); + } + + if (NIL_P(result)) { + load_failed(fname); + } + + th->errinfo = errinfo; + + return result; +} + +VALUE +rb_require(const char *fname) +{ + VALUE fn = rb_str_new2(fname); + OBJ_FREEZE(fn); + return rb_require_safe(fn, rb_safe_level()); +} + +static VALUE +init_ext_call(VALUE arg) +{ + SCOPE_SET(NOEX_PUBLIC); + (*(void (*)(void))arg)(); + return Qnil; +} + +void +ruby_init_ext(const char *name, void (*init)(void)) +{ + if (load_lock(name)) { + rb_vm_call_cfunc(rb_vm_top_self(), init_ext_call, (VALUE)init, + 0, rb_str_new2(name)); + rb_provide(name); + load_unlock(name, 1); + } +} + +/* + * call-seq: + * mod.autoload(name, filename) => nil + * + * Registers _filename_ to be loaded (using Kernel::require) + * the first time that _module_ (which may be a String or + * a symbol) is accessed in the namespace of _mod_. + * + * module A + * end + * A.autoload(:B, "b") + * A::B.doit # autoloads "b" + */ + +static VALUE +rb_mod_autoload(VALUE mod, VALUE sym, VALUE file) +{ + ID id = rb_to_id(sym); + + Check_SafeStr(file); + rb_autoload(mod, id, RSTRING_PTR(file)); + return Qnil; +} + +/* + * MISSING: documentation + */ + +static VALUE +rb_mod_autoload_p(VALUE mod, VALUE sym) +{ + return rb_autoload_p(mod, rb_to_id(sym)); +} + +/* + * call-seq: + * autoload(module, filename) => nil + * + * Registers _filename_ to be loaded (using Kernel::require) + * the first time that _module_ (which may be a String or + * a symbol) is accessed. + * + * autoload(:MyModule, "/usr/local/lib/modules/my_module.rb") + */ + +static VALUE +rb_f_autoload(VALUE obj, VALUE sym, VALUE file) +{ + VALUE klass = rb_vm_cbase(); + if (NIL_P(klass)) { + rb_raise(rb_eTypeError, "Can not set autoload on singleton class"); + } + return rb_mod_autoload(klass, sym, file); +} + +/* + * MISSING: documentation + */ + +static VALUE +rb_f_autoload_p(VALUE obj, VALUE sym) +{ + /* use rb_vm_cbase() as same as rb_f_autoload. */ + VALUE klass = rb_vm_cbase(); + if (NIL_P(klass)) { + return Qnil; + } + return rb_mod_autoload_p(klass, sym); +} + +void +Init_load() +{ +#undef rb_intern +#define rb_intern(str) rb_intern2(str, strlen(str)) + rb_vm_t *vm = GET_VM(); + static const char var_load_path[] = "$:"; + ID id_load_path = rb_intern2(var_load_path, sizeof(var_load_path)-1); + + rb_define_hooked_variable(var_load_path, (VALUE*)vm, load_path_getter, 0); + rb_alias_variable(rb_intern("$-I"), id_load_path); + rb_alias_variable(rb_intern("$LOAD_PATH"), id_load_path); + vm->load_path = rb_ary_new(); + + rb_define_virtual_variable("$\"", get_loaded_features, 0); + rb_define_virtual_variable("$LOADED_FEATURES", get_loaded_features, 0); + vm->loaded_features = rb_ary_new(); + + rb_define_global_function("load", rb_f_load, -1); + rb_define_global_function("require", rb_f_require, 1); + rb_define_method(rb_cModule, "autoload", rb_mod_autoload, 2); + rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1); + rb_define_global_function("autoload", rb_f_autoload, 2); + rb_define_global_function("autoload?", rb_f_autoload_p, 1); + + ruby_dln_librefs = rb_ary_new(); + rb_gc_register_mark_object(ruby_dln_librefs); +} diff --git a/lib/ruby-1.9.1-rc1/main.c b/lib/ruby-1.9.1-rc1/main.c new file mode 100644 index 0000000..3730327 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/main.c @@ -0,0 +1,37 @@ +/********************************************************************** + + main.c - + + $Author: akr $ + created at: Fri Aug 19 13:19:58 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#undef RUBY_EXPORT +#include "ruby.h" +#include "debug.h" +#ifdef HAVE_LOCALE_H +#include +#endif + +RUBY_GLOBAL_SETUP + +int +main(int argc, char **argv) +{ +#ifdef RUBY_DEBUG_ENV + ruby_set_debug_option(getenv("RUBY_DEBUG")); +#endif +#ifdef HAVE_LOCALE_H + setlocale(LC_CTYPE, ""); +#endif + + ruby_sysinit(&argc, &argv); + { + RUBY_INIT_STACK; + ruby_init(); + return ruby_run_node(ruby_options(argc, argv)); + } +} diff --git a/lib/ruby-1.9.1-rc1/man/erb.1 b/lib/ruby-1.9.1-rc1/man/erb.1 new file mode 100644 index 0000000..87a0a6f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/erb.1 @@ -0,0 +1,158 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd December 27, 2008 +.Dt ERB(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm erb +.Nd Ruby Templating +.Sh SYNOPSIS +.Nm +.Op Fl -version +.Op Fl UPdnvx +.Op Fl E Ar ext Ns Op Ns : Ns int +.Op Fl S Ar level +.Op Fl T Ar mode +.Op Fl r Ar library +.Op Fl - +.Op file ... +.Pp +.Sh DESCRIPTION +.Nm +is a command line front-end for +.Li "ERB" +library, which is an implementation of eRuby. + +eRuby provdes an easy to use but powerful templating system for Ruby. +Using eRuby, actual Ruby code can be added to any plain text document for the +purposes of generating document information details and/or flow control. + +.Nm +is a part of +.Nm Ruby . +.Pp +.Sh OPTIONS +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl -version +Prints the version of +.Nm . +.Pp +.It Fl E Ar external Ns Op : Ns Ar internal +.It Fl -encoding Ar external Ns Op : Ns Ar internal +Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:). + +You can ommit the one for internal encodings, then the value +.Pf ( Li "Encoding.default_internal" ) will be nil. +.Pp +.It Fl P +Evaluates lines starting with +.Li "%" +as Ruby code and removes the tailing EOLs. +.Pp +.It Fl S Ar level +Specifies the safe level in which eRuby script will run. +.Pp +.It Fl T Ar mode +Specifies trim mode (default 0). +.Ar mode +can be one of +.Bl -hang -offset indent +.It Sy 0 +EOL remains after the embedded ruby script is evaluated. +.Pp +.It Sy 1 +EOL is removed if the line ends with +.Li "%>" . +.Pp +.It Sy 2 +EOL is removed if the line starts with +.Li "<%" +and ends with +.Li "%>" . +.Pp +.It Sy - +EOL is removed if the line ends with +.Li "-%>" . +And leading whitespaces are removed if the erb directive starts with +.Li "<%-" . +.Pp +.El +.Pp +.It Fl U +can be one of +Sets the defalut value for internal encodings +.Pf ( Li "Encoding.default_internal" ) to UTF-8. +.Pp +.It Fl d +.It Fl -debug +Turns on debug mode. +.Li "$DEBUG" +will be set to true. +.Pp +.It Fl h +.It Fl -help +Prints a summry of the options. +.Pp +.It Fl n +Used with +.Fl x . +Prepends the line number to each line in the output. +.Pp +.It Fl v +Enables verbose mode. +.Li "$VERBOSE" +will be set to true. +.Pp +.It Fl x +Converts the eRuby script into Ruby script and prints it without line numbers. +.Pp +.El +.Pp +.Sh EXAMPLES +Here is an eRuby script +.Bd -literal -offset indent + +<% require 'prime' -%> + + <%= 1+1 %> + <%= __FILE__ %> + <%= Prime.each(10).to_a.join(", ") %> + +.Ed + +Command +.Dl "% erb -T - example.erb" +prints +.Bd -literal -offset indent + + + 2 + example.erb + 2, 3, 5, 7 + +.Ed +.Pp +.Sh SEE ALSO +.Xr ruby 1 . + +And see +.Xr ri 1 +documentation for +.Li "ERB" +class. +.El +.Pp +.Sh REPORTING BUGS +.Bl -bullet +.Li Security vulnerabilities should be reported via an email to +.Aq security@ruby-lang.org Ns +.Li . +Reported problems will be published after fixed. +.Pp +.Li And you can report other bugs and feature requests via the +Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Do not report security vulnerabilities +via the system because it publishes the vulnerabilities immedately. +.El +.Sh AUTHORS +Written by Masatoshi SEKI. diff --git a/lib/ruby-1.9.1-rc1/man/goruby.1 b/lib/ruby-1.9.1-rc1/man/goruby.1 new file mode 100644 index 0000000..f69b951 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/goruby.1 @@ -0,0 +1,39 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd October 25, 2008 +.Dt GORUBY(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm goruby +.Nd Code-golfer's best friend +.Sh SYNOPSIS +.Nm +.Op options ... +.Op Fl - +.Op Ar program_file +.Op Ar argument ... +.Sh DESCRIPTION +.Sy goruby +is a kind of Ruby language processor +which recognizes extremely shorten programs as bellow; +.Bd -literal -offset indent +rq"date";s De.td +.Ed +.Pp +This means +.Bd -literal -offset indent +require"date";puts Date.today +.Ed +.Pp +.Sh OPTIONS +.Sy goruby +takes same options as +.Xr ruby 1 . +.Sh SEE ALSO +.Bl -hang -compact -width "ruby(1)" +.It Xr ruby 1 +The stiff version of Ruby interpreter. +.El +.Pp +.Sh AUTHORS +Originally written by Nobuyoshi Nakada and developed by +Ruby core team. diff --git a/lib/ruby-1.9.1-rc1/man/irb.1 b/lib/ruby-1.9.1-rc1/man/irb.1 new file mode 100644 index 0000000..20e97e3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/irb.1 @@ -0,0 +1,173 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd October 25, 2008 +.Dt IRB(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm irb +.Nd Interactive Ruby Shell +.Sh SYNOPSIS +.Nm +.Op Fl -version +.Op Fl dfm +.Op Fl I Ar directory +.Op Fl r Ar library +.Op Fl - Ns Oo no Oc Ns inspect +.Op Fl - Ns Oo no Oc Ns readline +.Op Fl -prompt Ar mode +.Op Fl -prompt-mode Ar mode +.Op Fl -inf-ruby-mode +.Op Fl -simple-prompt +.Op Fl -noprompt +.Op Fl -tracer +.Op Fl -back-trace-limit Ar n +.Op Fl -irb_debug Ar n +.Op Fl - +.Op program_file +.Op argument ... +.Pp +.Sh DESCRIPTION +.Nm +is the REPL(read-eval&print loop) environment for Ruby programs. +.Pp +.Sh OPTIONS +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl -version +Prints the version of +.Nm . +.Pp +.It Fl E Ar external Ns Op : Ns Ar internal +.It Fl -encoding Ar external Ns Op : Ns Ar internal +Same as `ruby -E' . +Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:). + +You can ommit the one for internal encodings, then the value +.Pf ( Li "Encoding.default_internal" ) will be nil. +.Pp +.It Fl I Ar path +Same as `ruby -I' . +Specifies +.Li $LOAD_PATH +directory +.Pp +.It Fl U +Same as `ruby -U' . +Sets the defalut value for internal encodings +.Pf ( Li "Encoding.default_internal" ) to UTF-8. +.Pp +.It Fl d +Same as `ruby -d' . +Sets +.Li $DEBUG +to true. +.Pp +.It Fl f +Suppresses read of +.Pa ~/.irbrc . +.Pp +.It Fl h +.It Fl -help +Prints a summary of the options. +.Pp +.It Fl m +Bc mode (load mathn, fraction or matrix are available) +.Pp +.It Fl r Ar library +Same as `ruby -r'. +Causes irb to load the library using require. +.Pp +.It Fl -inspect +Uses `inspect' for output (default except for bc mode) +.Pp +.It Fl -noinspect +Doesn't use inspect for output +.Pp +.It Fl -readline +Uses Readline extension module. +.Pp +.It Fl -noreadline +Doesn't use Readline extension module. +.Pp +.It Fl -prompt Ar mode +.It Fl -prompt-mode Ar mode +Switch prompt mode. Pre-defined prompt modes are +`default', `simple', `xmp' and `inf-ruby'. +.Pp +.It Fl -inf-ruby-mode +Uses prompt appropriate for inf-ruby-mode on emacs. +Suppresses --readline. +.Pp +.It Fl -simple-prompt +Makes prompts simple. +.Pp +.It Fl -noprompt +No prompt mode. +.Pp +.It Fl -tracer +Displays trace for each execution of commands. +.Pp +.It Fl -back-trace-limit Ar n +Displays backtrace top +.Ar n +and tail +.Ar n Ns . +The default value is 16. +.Pp +.It Fl -irb_debug Ar n +Sets internal debug level to n (not for popular use) +.Pp +.El +.Pp +.Sh ENVIRONMENT +.Bl -tag -width "RUBYLIB_PREFIX" -compact +.It Ev IRBRC +.Pp +.El +.Pp +Also +.Nm +depends on same variables as +.Xr ruby 1 . +.Pp +.Sh FILES +.Bl -tag -width "RUBYLIB_PREFIX" -compact +.It Pa ~/.irbrc +Personal irb initialization. +.Pp +.El +.Pp +.Sh EXAMPLES +.Dl % irb +.Dl irb(main):001:0> Ic 1 + 1 +.Dl 2 +.Dl irb(main):002:0> Ic def t(x) +.Dl irb(main):003:1> Ic x+1 +.Dl irb(main):004:1> Ic end +.Dl => nil +.Dl irb(main):005:0> Ic t(3) +.Dl => 4 +.Dl irb(main):006:0> Ic if t(3) == 4 +.Dl irb(main):007:1> Ic p :ok +.Dl irb(main):008:1> Ic end +.Dl :ok +.Dl => :ok +.Dl irb(main):009:0> Ic quit +.Dl % +.Pp +.Sh SEE ALSO +.Xr ruby 1 . +.Pp +.Sh REPORTING BUGS +.Bl -bullet +.Li Security vulnerabilities should be reported via an email to +.Aq security@ruby-lang.org Ns +.Li . +Reported problems will be published after fixed. +.Pp +.Li And you can report other bugs and feature requests via the +Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Do not report security vulnerabilities +via the system because it publishes the vulnerabilities immedately. +.El +.Sh AUTHORS +Written by Keiju ISHITSUKA. diff --git a/lib/ruby-1.9.1-rc1/man/rake.1 b/lib/ruby-1.9.1-rc1/man/rake.1 new file mode 100644 index 0000000..3872026 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/rake.1 @@ -0,0 +1,169 @@ +.Dd November 30, 2008 +.Dt RAKE(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm rake +.Nd Ruby Make +.Sh SYNOPSIS +.Nm +.Op Fl -f Ar Rakefile +.Op Fl -version +.Op Fl CGNPgnqstv +.Op Fl D Op Ar PATTERN +.Op Fl E Ar CODE +.Op Fl I Ar LIBDIR +.Op Fl R Ar RAKELIBDIR +.Op Fl T Op Ar PATTERN +.Op Fl e Ar CODE +.Op Fl p Ar CODE +.Op Fl r Ar MODULE +.Op Fl -rules +.Op Ar variable Ns = Ns Ar value +.Ar target ... +.Sh DESCRIPTION +.Nm Rake +is a simple +.Xr ruby 1 +build program with capabilities similar to the regular +.Xr make 1 +command. + +.Nm Rake +has the following features: +.Bl -bullet +.It +Rakefiles (Rake's version of Makefiles) are completely defined in standard Ruby syntax. +No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?). +.It +Users can specify tasks with prerequisites. +.It +Rake supports rule patterns to sythesize implicit tasks. +.It +Flexible FileLists that act like arrays but know about manipulating file names and paths. +.It +A library of prepackaged tasks to make building rakefiles easier. +.El +.Pp +.Sh OPTIONS +.Bl -tag -width "--execute-continue" -compact +.Pp +.It Fl -version +Display the program version. +.Pp +.It Fl C +.It Fl -classic-namespace +Put Task and FileTask in the top level namespace +.Pp +.It Fl D Op Ar PATTERN +.It Fl -describe Op Ar PATTERN +Describe the tasks (matching optional +.Ar PATTERN Ns +), then exit. +.Pp +.It Fl E Ar CODE +.It Fl -execute-continue Ar CODE +Execute some Ruby code, then continue with normal task processing. +.Pp +.It Fl G +.It Fl -no-system +.It Fl -nosystem +Use standard project Rakefile search paths, ignore system wide rakefiles. +.Pp +.It Fl I Ar LIBDIR +.It Fl -libdir Ar LIBDIR +Include +.Ar LIBDIR +in the search path for required modules. +.Pp +.It Fl N +.It Fl -no-search +.It Fl -nosearch +Do not search parent directories for the Rakefile. +.Pp +.It Fl P +.It Fl -prereqs +Display the tasks and dependencies, then exit. +.Pp +.It Fl R Ar RAKELIBDIR +.It Fl -rakelib Ar RAKELIBDIR +.It Fl -rakelibdir Ar RAKELIBDIR +Auto-import any .rake files in +.Ar RAKELIBDIR . +(default is +.Pa rakelib +) +.Pp +.It Fl T Op Ar PATTERN +.It Fl -tasks Op Ar PATTERN +Display the tasks (matching optional +.Ar PATTERN Ns +) with descriptions, then exit. +.Pp +.It Fl e Ar CODE +.It Fl -execute Ar CODE +Execute some Ruby code and exit. +.Pp +.It Fl f Ar FILE +.It Fl -rakefile Ar FILE +Use FILE as the rakefile. +.Pp +.It Fl h +.It Fl -help +Prints a summary of options. +.Pp +.It Fl g +.It Fl -system +Using system wide (global) rakefiles (usually +.Pa ~/.rake/*.rake +). +.Pp +.It Fl n +.It Fl -dry-run +Do a dry run without executing actions. +.Pp +.It Fl p Ar CODE +.It Fl -execute-print Ar CODE +Execute some Ruby code, print the result, then exit. +.Pp +.It Fl q +.It Fl -quiet +Do not log messages to standard output. +.Pp +.It Fl r Ar MODULE +.It Fl -require Ar MODULE +Require MODULE before executing rakefile. +.Pp +.It Fl s +.It Fl -silent +Like +.Fl -quiet , +but also suppresses the 'in directory' announcement. +.Pp +.It Fl t +.It Fl -trace +Turn on invoke/execute tracing, enable full backtrace. +.Pp +.It Fl v +.It Fl -verbose +Log message to standard output (default). +.Pp +.It Fl -rules +Trace the rules resolution. +.Pp +.El +.Pp +.Sh SEE ALSO +.Xr ruby 1 +.Xr make 1 +.Pp +http://rake.rubyforge.org/ +.Sh REPORTING BUGS +Bugs, features requests and other issues can be logged at +<\fBhttp://onestepback.org/redmine/projects/show/rake\fR>. +.Pp +You will need an account to before you can post issues. Register at <\fBhttp://onestepback.org/redmine/account/register\fR>. +Or you can send an email to the author. +.Sh AUTHOR +.Nm Rake +is written by +.An Jim Weirich Aq jim@weirichhouse.org diff --git a/lib/ruby-1.9.1-rc1/man/ri.1 b/lib/ruby-1.9.1-rc1/man/ri.1 new file mode 100644 index 0000000..f414adb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/ri.1 @@ -0,0 +1,180 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd December 29, 2008 +.Dt RI(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm ri +.Nd Ruby API reference front end +.Sh SYNOPSIS +.Nm +.Op Fl Ti +.Op Fl d Ar directory +.Op Fl f Ar format +.Op Fl -list-doc-dirs +.Op Fl -no-standard-docs +.Op Fl - Ns Oo Cm no- Oc Ns Cm Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc +.Op Fl - Ns Oo Cm no- Oc Ns Cm use-cache +.Op Fl -width Ns = Ns Ar width +.Op Ar target ... +.Sh DESCRIPTION +.Nm +is a CUI front end for the Ruby API reference. +You can search and read API reference for classes and methods with +.Nm . + +.Nm +is a part of Ruby. + +.Ar target +can be one of the following forms: +.Bl -diag -offset indent +.It Class +for classes +.It Class::method +for class methods +.It Class#method +for instance methods +.It Class.method +for both class and instance methods +.It method +for both class and instance methods +.El + +All class names may be abbreviated to their minimum unambiguous form. If a name +is ambiguous, all valid options will be listed. + +For example: +.Bd -literal -offset indent +ri Fil +ri File +ri File.new +ri zip +.Ed + +Note that shell quoting may be required for method names containing +punctuation: +.Bd -literal -offset indent +ri 'Array.[]' +ri compact\! +.Ed +.Sh OPTIONS +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl -version +Prints the version of +.Nm . +.Pp +.It Fl T +.It Fl -no-pager +Send output directly to stdout, rather than to a pager. +.Pp +.It Fl d Ar directory +.It Fl -doc-dir Ns = Ns Ar directory +List of directories from which to source documentation in addition to the standard +directories. May be repeated. +.Pp +.It Fl f Ar FORMAT +.It Fl -fmt Ar FORMAT +.It Fl -format Ns = Ns FORMAT +Format to use when displaying output: +.Dd ansi, bs, html, plain, simple +.Pp +Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the +pager or tell the pager to allow control characters. +.Pp +.It Fl i +.It Fl -interactive +This makes +.Nm +go into interactive mode. +.Pp +When +.Nm +is in interactive mode it will allow the user to disambiguate lists of +methods in case multiple methods match against a method search string. It also +will allow the user to enter in a method name (with auto-completion, if readline +is supported) when viewing a class. +.Pp +.It Fl -list-doc-dirs +List the directories from which ri will source documentation on stdout and exit. +.Pp +.It Fl -no-standard-docs +Do not include documentation from the Ruby standard library, +.Pa site_lib , +installed gems, or +.Pa ~/.rdoc . + +Equivalent to specifying the options +.Fl -no-system , Fl -no-site , Fl -no-gems , +and +.Fl -no-home . +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm system +Include documentation from Ruby's standard library. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm site + Include documentation from libraries installed in site_lib. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm gems +Include documentation from RubyGems. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm home +Include documentation stored in ~/.rdoc. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm use-cache +Whether or not to use +.Nm Ns +.Ns 's cache. True by default. +.Pp +.It Fl w Ar width +.It Fl -width Ns = Ns Ar width +Set the width of the output. +.Pp +.El +.Pp +.Sh ENVIRONMENT +.Bl -tag -width "USERPROFILE" -compact +.Pp +.It Ev RI +Additional options. +.Pp +.It Ev PAGER +Used as the name of pager program for displaying. +.Pp +.It Ev HOME +.It Ev USERPROFILE +.It Ev HOMEPATH +Path to user's home directory. +.El +.Pp +.Sh FILES +.Bl -tag -width "USERPROFILE" -compact +.Pp +.It Pa ~/.ri +Caches recently referenced documents here. +.Pp +.It Pa ~/.rdoc +Searches user-wide documents here. +.Pp +.El +.Pp +.Sh SEE ALSO +.Xr ruby 1 +.Xr rdoc 1 +.Xr gem 1 +.Pp +.Sh REPORTING BUGS +.Bl -bullet +.Li Security vulnerabilities should be reported via an email to +.Aq security@ruby-lang.org Ns +.Li . +Reported problems will be published after fixed. +.Pp +.Li And you can report other bugs and feature requests via the +Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Do not report security vulnerabilities +via the system because it publishes the vulnerabilities immedately. +.El +.Sh AUTHORS +Written by Dave Thomas +.Aq dave@pragmaticprogrammer.com diff --git a/lib/ruby-1.9.1-rc1/man/ruby.1 b/lib/ruby-1.9.1-rc1/man/ruby.1 new file mode 100644 index 0000000..e2d0abd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/man/ruby.1 @@ -0,0 +1,511 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd October 25, 2008 +.Dt RUBY(1) "" "Ruby Programmers Reference Guide" +.\".Dt RUBY 1 +.Os UNIX +.Sh NAME +.Nm ruby +.Nd Interpreted object-oriented scripting language +.Sh SYNOPSIS +.Nm +.Op Fl -copyright +.Op Fl -version +.Op Fl SUacdlnpswvy +.Op Fl 0 Ns Op Ar octal +.Op Fl C Ar directory +.Op Fl E Ar external Ns Op : Ns Ar internal +.Op Fl F Ar pattern +.Op Fl I Ar directory +.Op Fl K Ar c +.Op Fl T Ns Op Ar level +.Op Fl W Ns Op Ar level +.Op Fl e Ar command +.Op Fl i Ns Op Ar extension +.Op Fl r Ar library +.Op Fl x Ns Op Ar directory +.Op - Ns Bro Cm enable Ns | Ns Cm disable Brc Ns - Ns Ar FEATURE +.Op Fl -dump Ns = Ns Ar target +.Op Fl -verbose +.Op Fl - +.Op Ar program_file +.Op Ar argument ... +.Sh DESCRIPTION +Ruby is an interpreted scripting language for quick and easy +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, +straight-forward, and extensible. +.Pp +If you want a language for easy object-oriented programming, or you +don't like the Perl ugliness, or you do like the concept of LISP, but +don't like too much parentheses, Ruby may be the language of your +choice. +.Sh FEATURES +Ruby's features are as follows: +.Bl -tag -width 6n +.It Sy "Interpretive" +Ruby is an interpreted language, so you don't have to recompile +programs written in Ruby to execute them. +.Pp +.It Sy "Variables have no type (dynamic typing)" +Variables in Ruby can contain data of any type. You don't have to +worry about variable typing. Consequently, it has a weaker compile +time check. +.Pp +.It Sy "No declaration needed" +You can use variables in your Ruby programs without any declarations. +Variable names denote their scope, local, global, instance, etc. +.Pp +.It Sy "Simple syntax" +Ruby has a simple syntax influenced slightly from Eiffel. +.Pp +.It Sy "No user-level memory management" +Ruby has automatic memory management. Objects no longer referenced +from anywhere are automatically collected by the garbage collector +built into the interpreter. +.Pp +.It Sy "Everything is an object" +Ruby is the purely object-oriented language, and was so since its +creation. Even such basic data as integers are seen as objects. +.Pp +.It Sy "Class, inheritance, and methods" +Of course, as an object-oriented language, Ruby has such basic +features like classes, inheritance, and methods. +.Pp +.It Sy "Singleton methods" +Ruby has the ability to define methods for certain objects. For +example, you can define a press-button action for certain widget by +defining a singleton method for the button. Or, you can make up your +own prototype based object system using singleton methods, if you want +to. +.Pp +.It Sy "Mix-in by modules" +Ruby intentionally does not have the multiple inheritance as it is a +source of confusion. Instead, Ruby has the ability to share +implementations across the inheritance tree. This is often called +.Sq Mix-in . +.Pp +.It Sy "Iterators" +Ruby has iterators for loop abstraction. +.Pp +.It Sy "Closures" +In Ruby, you can objectify the procedure. +.Pp +.It Sy "Text processing and regular expression" +Ruby has a bunch of text processing features like in Perl. +.Pp +.It Sy "M17N, character set independent" +Ruby supports multilingualized programming. Easy to process texts +written in many different natural languages and encoded in many +different character encodings, without dependence on Unicode. +.Pp +.It Sy "Bignums" +With built-in bignums, you can for example calculate factorial(400). +.Pp +.It Sy "Reflection and domain specific languages" +Class is also an instance of Class class. Definition of classes and methods +is just an expression as 1+1 is. So your programs can even write and modify programs. +Thus you can write your application in your own programming language on top of Ruby. +.Pp +.It Sy "Exception handling" +As in Java(tm). +.Pp +.It Sy "Direct access to the OS" +Ruby can use most +.Ux +system calls, often used in system programming. +.Pp +.It Sy "Dynamic loading" +On most +.Ux +systems, you can load object files into the Ruby interpreter +on-the-fly. +.It Sy "Rich libraries" +Libraries called "builtin libraries" and "standard libraries" are bundled with Ruby. +And you can obtain more libraries via the package management system called `RubyGems'. + +Moreover there are thousands of Ruby projects in Rubyforge +.Pf ( "http://www.rubyforge.org" ) and RAA +.Pf ( "http://raa.ruby-lang.org" ) Ns . +.El +.Pp +.Sh OPTIONS +Ruby interpreter accepts following command-line options (switches). +They are quite similar to those of +.Xr perl 1 . +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl -copyright +Prints the copyright notice. +.Pp +.It Fl -version +Prints the version of Ruby interpreter. +.Pp +.It Fl 0 Ns Op Ar octal +(The digit +.Dq zero . ) +Specifies the input record separator +.Pf ( Li "$/" ) +as an octal number. If no digit is given, the null character is taken +as the separator. Other switches may follow the digits. +.Fl 00 +turns Ruby into paragraph mode. +.Fl 0777 +makes Ruby read whole file at once as a single string since there is +no legal character with that value. +.Pp +.It Fl C Ar directory +.It Fl X Ar directory +Causes Ruby to switch to the directory. +.Pp +.It Fl E Ar external Ns Op : Ns Ar internal +.It Fl -encoding Ar external Ns Op : Ns Ar internal +Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:). + +You can ommit the one for internal encodings, then the value +.Pf ( Li "Encoding.default_internal" ) will be nil. +.Pp +.It Fl F Ar pattern +Specifies input field separator +.Pf ( Li "$;" ) . +.Pp +.It Fl I Ar directory +Used to tell Ruby where to load the library scripts. Directory path +will be added to the load-path variable +.Pf ( Li "$:" ) . +.Pp +.It Fl K Ar kcode +Specifies KANJI (Japanese) encoding. The default value for script encodings +.Pf ( Li "__ENCODING__" ) and external encodings ( Li "Encoding.default_external" ) will be the specified one. +.Ar kcode +can be one of +.Bl -hang -offset indent +.It Sy e +EUC-JP +.Pp +.It Sy s +Windows-31J (CP932) +.Pp +.It Sy u +UTF-8 +.Pp +.It Sy n +ASCII-8BIT (BINARY) +.El +.Pp +.It Fl S +Makes Ruby use the +.Ev PATH +environment variable to search for script, unless if its name begins +with a slash. This is used to emulate +.Li #! +on machines that don't support it, in the following manner: +.Bd -literal -offset indent +#! /usr/local/bin/ruby +# This line makes the next one a comment in Ruby \e + exec /usr/local/bin/ruby -S $0 $* +.Ed +.Pp +.It Fl T Ns Op Ar level +Turns on taint checks at the specified level (default 1). +.Pp +.It Fl U +Sets the defalut value for internal encodings +.Pf ( Li "Encoding.default_internal" ) to UTF-8. +.Pp +.It Fl W Ns Op Ar level +Turns on verbose mode at the specified level, without printing version +message at the beginning. The level can be; +.Bl -hang -offset indent +.It Sy 0 +Verbose mode is "silence". It sets the +.Li "$VERBOSE" +to nil. +.Pp +.It Sy 1 +Verbose mode is "medium". It sets the +.Li "$VERBOSE" +to false. +.Pp +.It Sy 2 (default) +Verbose mode is "verbose". It sets the +.Li "$VERBOSE" +to true. +.Fl W Ns +2 is same as +.Fl w +. +.El +.Pp +.It Fl a +Turns on auto-split mode when used with +.Fl n +or +.Fl p . +In auto-split mode, Ruby executes +.Dl $F = $_.split +at beginning of each loop. +.Pp +.It Fl c +Causes Ruby to check the syntax of the script and exit without +executing. If there are no syntax errors, Ruby will print +.Dq Syntax OK +to the standard output. +.Pp +.It Fl d +.It Fl -debug +Turns on debug mode. +.Li "$DEBUG" +will be set to true. +.Pp +.It Fl e Ar command +Specifies script from command-line while telling Ruby not to search +the rest of arguments for a script file name. +.Pp +.It Fl h +.It Fl -help +Prints a summary of the options. +.Pp +.It Fl i Ar extension +Specifies in-place-edit mode. The extension, if specified, is added +to old file name to make a backup copy. For example: +.Bd -literal -offset indent +% echo matz > /tmp/junk +% cat /tmp/junk +matz +% ruby -p -i.bak -e '$_.upcase!' /tmp/junk +% cat /tmp/junk +MATZ +% cat /tmp/junk.bak +matz +.Ed +.Pp +.It Fl l +(The lowercase letter +.Dq ell . ) +Enables automatic line-ending processing, which means to firstly set +.Li "$\e" +to the value of +.Li "$/" , +and secondly chops every line read using +.Li chop! . +.Pp +.It Fl n +Causes Ruby to assume the following loop around your script, which +makes it iterate over file name arguments somewhat like +.Nm sed +.Fl n +or +.Nm awk . +.Bd -literal -offset indent +while gets + ... +end +.Ed +.Pp +.It Fl p +Acts mostly same as -n switch, but print the value of variable +.Li "$_" +at the each end of the loop. For example: +.Bd -literal -offset indent +% echo matz | ruby -p -e '$_.tr! "a-z", "A-Z"' +MATZ +.Ed +.Pp +.It Fl r Ar library +Causes Ruby to load the library using require. It is useful when using +.Fl n +or +.Fl p . +.Pp +.It Fl s +Enables some switch parsing for switches after script name but before +any file name arguments (or before a +.Fl - ) . +Any switches found there are removed from +.Li ARGV +and set the corresponding variable in the script. For example: +.Bd -literal -offset indent +#! /usr/local/bin/ruby -s +# prints "true" if invoked with `-xyz' switch. +print "true\en" if $xyz +.Ed +.Pp +On some systems +.Li "$0" +does not always contain the full pathname, so you need the +.Fl S +switch to tell Ruby to search for the script if necessary. To handle +embedded spaces or such. A better construct than +.Li "$*" +would be +.Li ${1+"$@"} , +but it does not work if the script is being interpreted by +.Xr csh 1 . +.Pp +.It Fl v +Enables verbose mode. Ruby will print its version at the beginning, +and set the variable +.Li "$VERBOSE" +to true. Some methods print extra messages if this variable is true. +If this switch is given, and no other switches are present, Ruby quits +after printing its version. +.Pp +.It Fl w +Enables verbose mode without printing version message at the +beginning. It sets the +.Li "$VERBOSE" +variable to true. +.Pp +.It Fl x Ns Op Ar directory +Tells Ruby that the script is embedded in a message. Leading garbage +will be discarded until the first that starts with +.Dq #! +and contains the string, +.Dq ruby . +Any meaningful switches on that line will applied. The end of script +must be specified with either +.Li EOF , +.Li "^D" ( Li "control-D" ) , +.Li "^Z" ( Li "control-Z" ) , +or reserved word +.Li __END__ . +If the directory name is specified, Ruby will switch to that directory +before executing script. +.Pp +.It Fl y +.It Fl -yydebug +DO NOT USE. + +Turns on compiler debug mode. Ruby will print a bunch of internal +state messages during compiling scripts. You don't have to specify +this switch, unless you are going to debug the Ruby interpreter. +.Pp +.It Fl -disable- Ns Ar FEATURE +.It Fl -enable- Ns Ar FEATURE +Disables (or enables) the specified +.Ar FEATURE Ns +\&. +.Bl -tag -width "--disable-rubyopt" -compact +.It Fl -disable-gems +.It Fl -enable-gems +Disables (or enables) RubyGems libraries. By default, Ruby will load the latest +version of each installed gem. The +.Li Gem +constant is true if RubyGems is enabled, false if otherwise. +.Pp +.It Fl -disable-rubyopt +.It Fl -enable-rubyopt +Ignores (or considers) the +.Ev RUBYOPT +environment variable. By default, Ruby considers the variable. +.Pp +.It Fl -disable-all +.It Fl -enable-all +Disables (or enables) all features. +.Pp +.El +.Pp +.It Fl -dump Ns = Ns Ar target +DO NOT USE. + +Prints the specified target. +.Ar target +can be one of; +.Bl -hang -offset indent +.It Sy insns +disassembed instructions +.Pp +.El +.Pp +You don't have to specify this switch, unless you are going to debug the Ruby interpreter. +.Pp +.It Fl -verbose +Enables verbose mode without printing version message at the +beginning. It sets the +.Li "$VERBOSE" +variable to true. +If this switch is given, and no other switches are present, Ruby quits +after printing its version. +.El +.Pp +.Sh ENVIRONMENT +.Bl -tag -width "RUBYLIB_PREFIX" -compact +.It Ev RUBYLIB +A colon-separated list of directories that are added to Ruby's +library load path +.Pf ( Li "$:" ) . Directories from this environment variable are searched +before the standard load path is searched. +.Pp +e.g.: +.Dl RUBYLIB="$HOME/lib/ruby:$HOME/lib/rubyext" +.Pp +.It Ev RUBYOPT +Additional Ruby options. +.Pp +e.g. +.Dl RUBYOPT="-w -Ke" +.Pp +Note that RUBYOPT can contain only +.Fl d , Fl E , Fl I , Fl K , Fl r , Fl T , Fl U , Fl v , Fl w , Fl W, Fl -debug , +.Fl -disable- Ns Ar FEATURE +and +.Fl -enable- Ns Ar FEATURE . +.Pp +.It Ev RUBYPATH +A colon-separated list of directories that Ruby searches for +Ruby programs when the +.Fl S +flag is specified. This variable precedes the +.Ev PATH +environment variable. +.Pp +.It Ev RUBYSHELL +The path to the system shell command. This environment variable is +enabled for only mswin32, mingw32, and OS/2 platforms. If this +variable is not defined, Ruby refers to +.Ev COMSPEC . +.Pp +.It Ev PATH +Ruby refers to the +.Ev PATH +environment variable on calling Kernel#system. +.Pp +.It Ev RUBYLIB_PREFIX +This variable is obsolete. +.El +.Pp +And Ruby depends on some RubyGems related environment variables unless disabled RubyGems. +See the help of +.Xr gem 1 +as bellow. +.Bd -literal -offset indent +% gem help +.Ed +.Pp +.Sh SEE ALSO +.Bl -hang -compact -width "http://www.ruby-lang.org/123" +.It http://www.ruby-lang.org +The official web site. +.It http://www.rubyforge.org +hosting many open source ruby projects. +.It http://raa.ruby-lang.org +Ruby Application Archive. +.El +.Pp +.Sh REPORTING BUGS +.Bl -bullet +.Li Security vulnerabilities should be reported via an email to +.Aq security@ruby-lang.org Ns +.Li . +Reported problems will be published after fixed. +.Pp +.Li And you can report other bugs and feature requests via the +Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Do not report security vulnerabilities +via the system because it publishes the vulnerabilities immedately. +.El +.Sh AUTHORS +Ruby is designed and implemented by +.An Yukihiro Matsumoto Aq matz@netlab.jp . + +See <\fBhttp://redmine.ruby-lang.org/wiki/ruby/Contributors\fR> for contributors to Ruby. diff --git a/lib/ruby-1.9.1-rc1/marshal.c b/lib/ruby-1.9.1-rc1/marshal.c new file mode 100644 index 0000000..1e3efd8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/marshal.c @@ -0,0 +1,1752 @@ +/********************************************************************** + + marshal.c - + + $Author: nobu $ + created at: Thu Apr 27 16:30:01 JST 1995 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/st.h" +#include "ruby/util.h" +#include "ruby/encoding.h" + +#include +#ifdef HAVE_FLOAT_H +#include +#endif +#ifdef HAVE_IEEEFP_H +#include +#endif + +#define BITSPERSHORT (2*CHAR_BIT) +#define SHORTMASK ((1<newclass); + rb_gc_mark(p->oldclass); + return ST_CONTINUE; +} + +static void +mark_marshal_compat_t(void *tbl) +{ + if (!tbl) return; + st_foreach(tbl, mark_marshal_compat_i, 0); +} + +void +rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE)) +{ + marshal_compat_t *compat; + rb_alloc_func_t allocator = rb_get_alloc_func(newclass); + + if (!allocator) { + rb_raise(rb_eTypeError, "no allocator"); + } + + compat = ALLOC(marshal_compat_t); + compat->newclass = Qnil; + compat->oldclass = Qnil; + compat->newclass = newclass; + compat->oldclass = oldclass; + compat->dumper = dumper; + compat->loader = loader; + + st_insert(compat_allocator_tbl, (st_data_t)allocator, (st_data_t)compat); +} + +struct dump_arg { + VALUE obj; + VALUE str, dest; + st_table *symbols; + st_table *data; + int taint; + int untrust; + st_table *compat_tbl; + VALUE wrapper; + st_table *encodings; +}; + +struct dump_call_arg { + VALUE obj; + struct dump_arg *arg; + int limit; +}; + +static void +check_dump_arg(struct dump_arg *arg, ID sym) +{ + if (!DATA_PTR(arg->wrapper)) { + rb_raise(rb_eRuntimeError, "Marshal.dump reentered at %s", + rb_id2name(sym)); + } +} + +static void +mark_dump_arg(void *ptr) +{ + struct dump_arg *p = ptr; + if (!ptr) + return; + rb_mark_set(p->data); + rb_mark_hash(p->compat_tbl); +} + +static VALUE +class2path(VALUE klass) +{ + VALUE path = rb_class_path(klass); + char *n = RSTRING_PTR(path); + + if (n[0] == '#') { + rb_raise(rb_eTypeError, "can't dump anonymous %s %s", + (TYPE(klass) == T_CLASS ? "class" : "module"), + n); + } + if (rb_path2class(n) != rb_class_real(klass)) { + rb_raise(rb_eTypeError, "%s can't be referred", n); + } + return path; +} + +static void w_long(long, struct dump_arg*); + +static void +w_nbyte(const char *s, int n, struct dump_arg *arg) +{ + VALUE buf = arg->str; + rb_str_buf_cat(buf, s, n); + if (arg->dest && RSTRING_LEN(buf) >= BUFSIZ) { + if (arg->taint) OBJ_TAINT(buf); + if (arg->untrust) OBJ_UNTRUST(buf); + rb_io_write(arg->dest, buf); + rb_str_resize(buf, 0); + } +} + +static void +w_byte(char c, struct dump_arg *arg) +{ + w_nbyte(&c, 1, arg); +} + +static void +w_bytes(const char *s, int n, struct dump_arg *arg) +{ + w_long(n, arg); + w_nbyte(s, n, arg); +} + +static void +w_short(int x, struct dump_arg *arg) +{ + w_byte((char)((x >> 0) & 0xff), arg); + w_byte((char)((x >> 8) & 0xff), arg); +} + +static void +w_long(long x, struct dump_arg *arg) +{ + char buf[sizeof(long)+1]; + int i, len = 0; + +#if SIZEOF_LONG > 4 + if (!(RSHIFT(x, 31) == 0 || RSHIFT(x, 31) == -1)) { + /* big long does not fit in 4 bytes */ + rb_raise(rb_eTypeError, "long too big to dump"); + } +#endif + + if (x == 0) { + w_byte(0, arg); + return; + } + if (0 < x && x < 123) { + w_byte((char)(x + 5), arg); + return; + } + if (-124 < x && x < 0) { + w_byte((char)((x - 5)&0xff), arg); + return; + } + for (i=1;i 32 +#define MANT_BITS 32 +#elif DBL_MANT_DIG > 24 +#define MANT_BITS 24 +#elif DBL_MANT_DIG > 16 +#define MANT_BITS 16 +#else +#define MANT_BITS 8 +#endif + +static int +save_mantissa(double d, char *buf) +{ + int e, i = 0; + unsigned long m; + double n; + + d = modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d); + if (d > 0) { + buf[i++] = 0; + do { + d = modf(ldexp(d, MANT_BITS), &n); + m = (unsigned long)n; +#if MANT_BITS > 24 + buf[i++] = m >> 24; +#endif +#if MANT_BITS > 16 + buf[i++] = m >> 16; +#endif +#if MANT_BITS > 8 + buf[i++] = m >> 8; +#endif + buf[i++] = m; + } while (d > 0); + while (!buf[i - 1]) --i; + } + return i; +} + +static double +load_mantissa(double d, const char *buf, int len) +{ + if (--len > 0 && !*buf++) { /* binary mantissa mark */ + int e, s = d < 0, dig = 0; + unsigned long m; + + modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d); + do { + m = 0; + switch (len) { + default: m = *buf++ & 0xff; +#if MANT_BITS > 24 + case 3: m = (m << 8) | (*buf++ & 0xff); +#endif +#if MANT_BITS > 16 + case 2: m = (m << 8) | (*buf++ & 0xff); +#endif +#if MANT_BITS > 8 + case 1: m = (m << 8) | (*buf++ & 0xff); +#endif + } + dig -= len < MANT_BITS / 8 ? 8 * (unsigned)len : MANT_BITS; + d += ldexp((double)m, dig); + } while ((len -= MANT_BITS / 8) > 0); + d = ldexp(d, e - DECIMAL_MANT); + if (s) d = -d; + } + return d; +} +#else +#define load_mantissa(d, buf, len) (d) +#define save_mantissa(d, buf) 0 +#endif + +#ifdef DBL_DIG +#define FLOAT_DIG (DBL_DIG+2) +#else +#define FLOAT_DIG 17 +#endif + +static void +w_float(double d, struct dump_arg *arg) +{ + char buf[FLOAT_DIG + (DECIMAL_MANT + 7) / 8 + 10]; + + if (isinf(d)) { + if (d < 0) strcpy(buf, "-inf"); + else strcpy(buf, "inf"); + } + else if (isnan(d)) { + strcpy(buf, "nan"); + } + else if (d == 0.0) { + if (1.0/d < 0) strcpy(buf, "-0"); + else strcpy(buf, "0"); + } + else { + int len; + + /* xxx: should not use system's sprintf(3) */ + snprintf(buf, sizeof(buf), "%.*g", FLOAT_DIG, d); + len = strlen(buf); + w_bytes(buf, len + save_mantissa(d, buf + len), arg); + return; + } + w_bytes(buf, strlen(buf), arg); +} + +static void +w_symbol(ID id, struct dump_arg *arg) +{ + const char *sym; + st_data_t num; + + if (st_lookup(arg->symbols, id, &num)) { + w_byte(TYPE_SYMLINK, arg); + w_long((long)num, arg); + } + else { + sym = rb_id2name(id); + if (!sym) { + rb_raise(rb_eTypeError, "can't dump anonymous ID %ld", id); + } + w_byte(TYPE_SYMBOL, arg); + w_bytes(sym, strlen(sym), arg); + st_add_direct(arg->symbols, id, arg->symbols->num_entries); + } +} + +static void +w_unique(const char *s, struct dump_arg *arg) +{ + if (s[0] == '#') { + rb_raise(rb_eTypeError, "can't dump anonymous class %s", s); + } + w_symbol(rb_intern(s), arg); +} + +static void w_object(VALUE,struct dump_arg*,int); + +static int +hash_each(VALUE key, VALUE value, struct dump_call_arg *arg) +{ + w_object(key, arg->arg, arg->limit); + w_object(value, arg->arg, arg->limit); + return ST_CONTINUE; +} + +static void +w_extended(VALUE klass, struct dump_arg *arg, int check) +{ + const char *path; + + if (check && FL_TEST(klass, FL_SINGLETON)) { + if (RCLASS_M_TBL(klass)->num_entries || + (RCLASS_IV_TBL(klass) && RCLASS_IV_TBL(klass)->num_entries > 1)) { + rb_raise(rb_eTypeError, "singleton can't be dumped"); + } + klass = RCLASS_SUPER(klass); + } + while (BUILTIN_TYPE(klass) == T_ICLASS) { + path = rb_class2name(RBASIC(klass)->klass); + w_byte(TYPE_EXTENDED, arg); + w_unique(path, arg); + klass = RCLASS_SUPER(klass); + } +} + +static void +w_class(char type, VALUE obj, struct dump_arg *arg, int check) +{ + volatile VALUE p; + char *path; + st_data_t real_obj; + VALUE klass; + + if (st_lookup(arg->compat_tbl, (st_data_t)obj, &real_obj)) { + obj = (VALUE)real_obj; + } + klass = CLASS_OF(obj); + w_extended(klass, arg, check); + w_byte(type, arg); + p = class2path(rb_class_real(klass)); + path = RSTRING_PTR(p); + w_unique(path, arg); +} + +static void +w_uclass(VALUE obj, VALUE super, struct dump_arg *arg) +{ + VALUE klass = CLASS_OF(obj); + + w_extended(klass, arg, Qtrue); + klass = rb_class_real(klass); + if (klass != super) { + w_byte(TYPE_UCLASS, arg); + w_unique(RSTRING_PTR(class2path(klass)), arg); + } +} + +static int +w_obj_each(ID id, VALUE value, struct dump_call_arg *arg) +{ + if (id == rb_id_encoding()) return ST_CONTINUE; + w_symbol(id, arg->arg); + w_object(value, arg->arg, arg->limit); + return ST_CONTINUE; +} + +static void +w_encoding(VALUE obj, long num, struct dump_call_arg *arg) +{ + int encidx = rb_enc_get_index(obj); + rb_encoding *enc = 0; + st_data_t name; + + if (encidx <= 0 || !(enc = rb_enc_from_index(encidx))) { + w_long(num, arg->arg); + return; + } + w_long(num + 1, arg->arg); + w_symbol(rb_id_encoding(), arg->arg); + do { + if (!arg->arg->encodings) + arg->arg->encodings = st_init_strcasetable(); + else if (st_lookup(arg->arg->encodings, (st_data_t)rb_enc_name(enc), &name)) + break; + name = (st_data_t)rb_str_new2(rb_enc_name(enc)); + st_insert(arg->arg->encodings, (st_data_t)rb_enc_name(enc), name); + } while (0); + w_object(name, arg->arg, arg->limit); +} + +static void +w_ivar(VALUE obj, st_table *tbl, struct dump_call_arg *arg) +{ + long num = tbl ? tbl->num_entries : 0; + + w_encoding(obj, num, arg); + if (tbl) { + st_foreach_safe(tbl, w_obj_each, (st_data_t)arg); + } +} + +static void +w_objivar(VALUE obj, struct dump_call_arg *arg) +{ + VALUE *ptr; + long i, len, num; + + len = ROBJECT_NUMIV(obj); + ptr = ROBJECT_IVPTR(obj); + num = 0; + for (i = 0; i < len; i++) + if (ptr[i] != Qundef) + num += 1; + + w_encoding(obj, num, arg); + if (num != 0) { + rb_ivar_foreach(obj, w_obj_each, (st_data_t)arg); + } +} + +static void +w_object(VALUE obj, struct dump_arg *arg, int limit) +{ + struct dump_call_arg c_arg; + st_table *ivtbl = 0; + st_data_t num; + int hasiv = 0; +#define has_ivars(obj, ivtbl) ((ivtbl = rb_generic_ivar_table(obj)) != 0 || \ + (!SPECIAL_CONST_P(obj) && !ENCODING_IS_ASCII8BIT(obj))) + + if (limit == 0) { + rb_raise(rb_eArgError, "exceed depth limit"); + } + + limit--; + c_arg.limit = limit; + c_arg.arg = arg; + + if (st_lookup(arg->data, obj, &num)) { + w_byte(TYPE_LINK, arg); + w_long((long)num, arg); + return; + } + + if ((hasiv = has_ivars(obj, ivtbl)) != 0) { + w_byte(TYPE_IVAR, arg); + } + if (obj == Qnil) { + w_byte(TYPE_NIL, arg); + } + else if (obj == Qtrue) { + w_byte(TYPE_TRUE, arg); + } + else if (obj == Qfalse) { + w_byte(TYPE_FALSE, arg); + } + else if (FIXNUM_P(obj)) { +#if SIZEOF_LONG <= 4 + w_byte(TYPE_FIXNUM, arg); + w_long(FIX2INT(obj), arg); +#else + if (RSHIFT((long)obj, 31) == 0 || RSHIFT((long)obj, 31) == -1) { + w_byte(TYPE_FIXNUM, arg); + w_long(FIX2LONG(obj), arg); + } + else { + w_object(rb_int2big(FIX2LONG(obj)), arg, limit); + } +#endif + } + else if (SYMBOL_P(obj)) { + w_symbol(SYM2ID(obj), arg); + } + else { + if (OBJ_TAINTED(obj)) arg->taint = Qtrue; + if (OBJ_UNTRUSTED(obj)) arg->untrust = Qtrue; + + if (rb_respond_to(obj, s_mdump)) { + volatile VALUE v; + + st_add_direct(arg->data, obj, arg->data->num_entries); + + v = rb_funcall(obj, s_mdump, 0, 0); + check_dump_arg(arg, s_mdump); + w_class(TYPE_USRMARSHAL, obj, arg, Qfalse); + w_object(v, arg, limit); + if (hasiv) w_ivar(obj, 0, &c_arg); + return; + } + if (rb_respond_to(obj, s_dump)) { + VALUE v; + st_table *ivtbl2 = 0; + int hasiv2; + + v = rb_funcall(obj, s_dump, 1, INT2NUM(limit)); + check_dump_arg(arg, s_dump); + if (TYPE(v) != T_STRING) { + rb_raise(rb_eTypeError, "_dump() must return string"); + } + if ((hasiv2 = has_ivars(v, ivtbl2)) != 0 && !hasiv) { + w_byte(TYPE_IVAR, arg); + } + w_class(TYPE_USERDEF, obj, arg, Qfalse); + w_bytes(RSTRING_PTR(v), RSTRING_LEN(v), arg); + if (hasiv2) { + w_ivar(v, ivtbl2, &c_arg); + } + else if (hasiv) { + w_ivar(obj, ivtbl, &c_arg); + } + st_add_direct(arg->data, obj, arg->data->num_entries); + return; + } + + st_add_direct(arg->data, obj, arg->data->num_entries); + + { + st_data_t compat_data; + rb_alloc_func_t allocator = rb_get_alloc_func(RBASIC(obj)->klass); + if (st_lookup(compat_allocator_tbl, + (st_data_t)allocator, + &compat_data)) { + marshal_compat_t *compat = (marshal_compat_t*)compat_data; + VALUE real_obj = obj; + obj = compat->dumper(real_obj); + st_insert(arg->compat_tbl, (st_data_t)obj, (st_data_t)real_obj); + } + } + + switch (BUILTIN_TYPE(obj)) { + case T_CLASS: + if (FL_TEST(obj, FL_SINGLETON)) { + rb_raise(rb_eTypeError, "singleton class can't be dumped"); + } + w_byte(TYPE_CLASS, arg); + { + volatile VALUE path = class2path(obj); + w_bytes(RSTRING_PTR(path), RSTRING_LEN(path), arg); + } + break; + + case T_MODULE: + w_byte(TYPE_MODULE, arg); + { + VALUE path = class2path(obj); + w_bytes(RSTRING_PTR(path), RSTRING_LEN(path), arg); + } + break; + + case T_FLOAT: + w_byte(TYPE_FLOAT, arg); + w_float(RFLOAT_VALUE(obj), arg); + break; + + case T_BIGNUM: + w_byte(TYPE_BIGNUM, arg); + { + char sign = RBIGNUM_SIGN(obj) ? '+' : '-'; + long len = RBIGNUM_LEN(obj); + BDIGIT *d = RBIGNUM_DIGITS(obj); + + w_byte(sign, arg); + w_long(SHORTLEN(len), arg); /* w_short? */ + while (len--) { +#if SIZEOF_BDIGITS > SIZEOF_SHORT + BDIGIT num = *d; + int i; + + for (i=0; iifnone)) { + w_byte(TYPE_HASH, arg); + } + else if (FL_TEST(obj, FL_USER2)) { + /* FL_USER2 means HASH_PROC_DEFAULT (see hash.c) */ + rb_raise(rb_eTypeError, "can't dump hash with default proc"); + } + else { + w_byte(TYPE_HASH_DEF, arg); + } + w_long(RHASH_SIZE(obj), arg); + rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg); + if (!NIL_P(RHASH(obj)->ifnone)) { + w_object(RHASH(obj)->ifnone, arg, limit); + } + break; + + case T_STRUCT: + w_class(TYPE_STRUCT, obj, arg, Qtrue); + { + long len = RSTRUCT_LEN(obj); + VALUE mem; + long i; + + w_long(len, arg); + mem = rb_struct_members(obj); + for (i=0; iobj, arg->arg, arg->limit); + if (arg->arg->dest) { + rb_io_write(arg->arg->dest, arg->arg->str); + rb_str_resize(arg->arg->str, 0); + } + return 0; +} + +static VALUE +dump_ensure(struct dump_arg *arg) +{ + if (!DATA_PTR(arg->wrapper)) return 0; + st_free_table(arg->symbols); + st_free_table(arg->data); + st_free_table(arg->compat_tbl); + if (arg->encodings) st_free_table(arg->encodings); + DATA_PTR(arg->wrapper) = 0; + arg->wrapper = 0; + if (arg->taint) { + OBJ_TAINT(arg->str); + } + if (arg->untrust) { + OBJ_UNTRUST(arg->str); + } + return 0; +} + +/* + * call-seq: + * dump( obj [, anIO] , limit=--1 ) => anIO + * + * Serializes obj and all descendent objects. If anIO is + * specified, the serialized data will be written to it, otherwise the + * data will be returned as a String. If limit is specified, the + * traversal of subobjects will be limited to that depth. If limit is + * negative, no checking of depth will be performed. + * + * class Klass + * def initialize(str) + * @str = str + * end + * def sayHello + * @str + * end + * end + * + * (produces no output) + * + * o = Klass.new("hello\n") + * data = Marshal.dump(o) + * obj = Marshal.load(data) + * obj.sayHello #=> "hello\n" + */ +static VALUE +marshal_dump(int argc, VALUE *argv) +{ + VALUE obj, port, a1, a2; + int limit = -1; + struct dump_arg arg; + struct dump_call_arg c_arg; + + port = Qnil; + rb_scan_args(argc, argv, "12", &obj, &a1, &a2); + if (argc == 3) { + if (!NIL_P(a2)) limit = NUM2INT(a2); + if (NIL_P(a1)) goto type_error; + port = a1; + } + else if (argc == 2) { + if (FIXNUM_P(a1)) limit = FIX2INT(a1); + else if (NIL_P(a1)) goto type_error; + else port = a1; + } + arg.dest = 0; + arg.symbols = st_init_numtable(); + arg.data = st_init_numtable(); + arg.taint = Qfalse; + arg.untrust = Qfalse; + arg.compat_tbl = st_init_numtable(); + arg.encodings = 0; + arg.str = rb_str_buf_new(0); + RBASIC(arg.str)->klass = 0; + arg.wrapper = Data_Wrap_Struct(rb_cData, mark_dump_arg, 0, &arg); + if (!NIL_P(port)) { + if (!rb_respond_to(port, s_write)) { + type_error: + rb_raise(rb_eTypeError, "instance of IO needed"); + } + arg.dest = port; + if (rb_respond_to(port, s_binmode)) { + rb_funcall2(port, s_binmode, 0, 0); + check_dump_arg(&arg, s_binmode); + } + } + else { + port = arg.str; + } + + c_arg.obj = obj; + c_arg.arg = &arg; + c_arg.limit = limit; + + w_byte(MARSHAL_MAJOR, &arg); + w_byte(MARSHAL_MINOR, &arg); + + rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg); + RBASIC(arg.str)->klass = rb_cString; + + return port; +} + +struct load_arg { + VALUE src; + long offset; + st_table *symbols; + st_table *data; + VALUE proc; + int taint; + int untrust; + st_table *compat_tbl; + VALUE wrapper; +}; + +static void +check_load_arg(struct load_arg *arg, ID sym) +{ + if (!DATA_PTR(arg->wrapper)) { + rb_raise(rb_eRuntimeError, "Marshal.load reentered at %s", + rb_id2name(sym)); + } +} + +static void +mark_load_arg(void *ptr) +{ + struct load_arg *p = ptr; + if (!ptr) + return; + rb_mark_tbl(p->data); + rb_mark_hash(p->compat_tbl); +} + +static VALUE r_entry(VALUE v, struct load_arg *arg); +static VALUE r_object(struct load_arg *arg); +static VALUE path2class(const char *path); + +static int +r_byte(struct load_arg *arg) +{ + int c; + + if (TYPE(arg->src) == T_STRING) { + if (RSTRING_LEN(arg->src) > arg->offset) { + c = (unsigned char)RSTRING_PTR(arg->src)[arg->offset++]; + } + else { + rb_raise(rb_eArgError, "marshal data too short"); + } + } + else { + VALUE src = arg->src; + VALUE v = rb_funcall2(src, s_getbyte, 0, 0); + check_load_arg(arg, s_getbyte); + if (NIL_P(v)) rb_eof_error(); + c = (unsigned char)NUM2CHR(v); + } + return c; +} + +static void +long_toobig(int size) +{ + rb_raise(rb_eTypeError, "long too big for this architecture (size " + STRINGIZE(SIZEOF_LONG)", given %d)", size); +} + +#undef SIGN_EXTEND_CHAR +#if __STDC__ +# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) +#endif + +static long +r_long(struct load_arg *arg) +{ + register long x; + int c = SIGN_EXTEND_CHAR(r_byte(arg)); + long i; + + if (c == 0) return 0; + if (c > 0) { + if (4 < c && c < 128) { + return c - 5; + } + if (c > sizeof(long)) long_toobig(c); + x = 0; + for (i=0;i sizeof(long)) long_toobig(c); + x = -1; + for (i=0;isrc) == T_STRING) { + if (RSTRING_LEN(arg->src) - arg->offset >= len) { + str = rb_str_new(RSTRING_PTR(arg->src)+arg->offset, len); + arg->offset += len; + } + else { + too_short: + rb_raise(rb_eArgError, "marshal data too short"); + } + } + else { + VALUE src = arg->src; + VALUE n = LONG2NUM(len); + str = rb_funcall2(src, s_read, 1, &n); + check_load_arg(arg, s_read); + if (NIL_P(str)) goto too_short; + StringValue(str); + if (RSTRING_LEN(str) != len) goto too_short; + if (OBJ_TAINTED(str)) arg->taint = Qtrue; + if (OBJ_UNTRUSTED(str)) arg->untrust = Qtrue; + } + return str; +} + +static ID +r_symlink(struct load_arg *arg) +{ + ID id; + long num = r_long(arg); + + if (st_lookup(arg->symbols, num, &id)) { + return id; + } + rb_raise(rb_eArgError, "bad symbol"); +} + +static ID +r_symreal(struct load_arg *arg) +{ + volatile VALUE s = r_bytes(arg); + ID id = rb_intern(RSTRING_PTR(s)); + + st_insert(arg->symbols, arg->symbols->num_entries, id); + + return id; +} + +static ID +r_symbol(struct load_arg *arg) +{ + int type; + + switch ((type = r_byte(arg))) { + case TYPE_SYMBOL: + return r_symreal(arg); + case TYPE_SYMLINK: + return r_symlink(arg); + default: + rb_raise(rb_eArgError, "dump format error(0x%x)", type); + break; + } +} + +static const char* +r_unique(struct load_arg *arg) +{ + return rb_id2name(r_symbol(arg)); +} + +static VALUE +r_string(struct load_arg *arg) +{ + return r_bytes(arg); +} + +static VALUE +r_entry(VALUE v, struct load_arg *arg) +{ + st_data_t real_obj = (VALUE)Qundef; + if (st_lookup(arg->compat_tbl, v, &real_obj)) { + st_insert(arg->data, arg->data->num_entries, (st_data_t)real_obj); + } + else { + st_insert(arg->data, arg->data->num_entries, (st_data_t)v); + } + if (arg->taint) { + OBJ_TAINT(v); + if ((VALUE)real_obj != Qundef) + OBJ_TAINT((VALUE)real_obj); + } + if (arg->untrust) { + OBJ_UNTRUST(v); + if ((VALUE)real_obj != Qundef) + OBJ_UNTRUST((VALUE)real_obj); + } + return v; +} + +static VALUE +r_leave(VALUE v, struct load_arg *arg) +{ + st_data_t data; + if (st_lookup(arg->compat_tbl, v, &data)) { + VALUE real_obj = (VALUE)data; + rb_alloc_func_t allocator = rb_get_alloc_func(CLASS_OF(real_obj)); + st_data_t key = v; + if (st_lookup(compat_allocator_tbl, (st_data_t)allocator, &data)) { + marshal_compat_t *compat = (marshal_compat_t*)data; + compat->loader(real_obj, v); + } + st_delete(arg->compat_tbl, &key, 0); + v = real_obj; + } + if (arg->proc) { + v = rb_funcall(arg->proc, s_call, 1, v); + check_load_arg(arg, s_call); + } + return v; +} + +static void +r_ivar(VALUE obj, struct load_arg *arg) +{ + long len; + + len = r_long(arg); + if (len > 0) { + while (len--) { + ID id = r_symbol(arg); + VALUE val = r_object(arg); + if (id == rb_id_encoding()) { + int idx = rb_enc_find_index(StringValueCStr(val)); + if (idx > 0) rb_enc_associate_index(obj, idx); + } + else { + rb_ivar_set(obj, id, val); + } + } + } +} + +static VALUE +path2class(const char *path) +{ + VALUE v = rb_path2class(path); + + if (TYPE(v) != T_CLASS) { + rb_raise(rb_eArgError, "%s does not refer class", path); + } + return v; +} + +static VALUE +path2module(const char *path) +{ + VALUE v = rb_path2class(path); + + if (TYPE(v) != T_MODULE) { + rb_raise(rb_eArgError, "%s does not refer module", path); + } + return v; +} + +static VALUE +obj_alloc_by_path(const char *path, struct load_arg *arg) +{ + VALUE klass; + st_data_t data; + rb_alloc_func_t allocator; + + klass = path2class(path); + + allocator = rb_get_alloc_func(klass); + if (st_lookup(compat_allocator_tbl, (st_data_t)allocator, &data)) { + marshal_compat_t *compat = (marshal_compat_t*)data; + VALUE real_obj = rb_obj_alloc(klass); + VALUE obj = rb_obj_alloc(compat->oldclass); + st_insert(arg->compat_tbl, (st_data_t)obj, (st_data_t)real_obj); + return obj; + } + + return rb_obj_alloc(klass); +} + +static VALUE +r_object0(struct load_arg *arg, int *ivp, VALUE extmod) +{ + VALUE v = Qnil; + int type = r_byte(arg); + long id; + st_data_t link; + + switch (type) { + case TYPE_LINK: + id = r_long(arg); + if (!st_lookup(arg->data, (st_data_t)id, &link)) { + rb_raise(rb_eArgError, "dump format error (unlinked)"); + } + v = (VALUE)link; + if (arg->proc) { + v = rb_funcall(arg->proc, s_call, 1, v); + check_load_arg(arg, s_call); + } + break; + + case TYPE_IVAR: + { + int ivar = Qtrue; + + v = r_object0(arg, &ivar, extmod); + if (ivar) r_ivar(v, arg); + } + break; + + case TYPE_EXTENDED: + { + VALUE m = path2module(r_unique(arg)); + + if (NIL_P(extmod)) extmod = rb_ary_new2(0); + rb_ary_push(extmod, m); + + v = r_object0(arg, 0, extmod); + while (RARRAY_LEN(extmod) > 0) { + m = rb_ary_pop(extmod); + rb_extend_object(v, m); + } + } + break; + + case TYPE_UCLASS: + { + VALUE c = path2class(r_unique(arg)); + + if (FL_TEST(c, FL_SINGLETON)) { + rb_raise(rb_eTypeError, "singleton can't be loaded"); + } + v = r_object0(arg, 0, extmod); + if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) { + format_error: + rb_raise(rb_eArgError, "dump format error (user class)"); + } + if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) { + VALUE tmp = rb_obj_alloc(c); + + if (TYPE(v) != TYPE(tmp)) goto format_error; + } + RBASIC(v)->klass = c; + } + break; + + case TYPE_NIL: + v = Qnil; + v = r_leave(v, arg); + break; + + case TYPE_TRUE: + v = Qtrue; + v = r_leave(v, arg); + break; + + case TYPE_FALSE: + v = Qfalse; + v = r_leave(v, arg); + break; + + case TYPE_FIXNUM: + { + long i = r_long(arg); + v = LONG2FIX(i); + } + v = r_leave(v, arg); + break; + + case TYPE_FLOAT: + { + double d, t = 0.0; + VALUE str = r_bytes(arg); + const char *ptr = RSTRING_PTR(str); + + if (strcmp(ptr, "nan") == 0) { + d = t / t; + } + else if (strcmp(ptr, "inf") == 0) { + d = 1.0 / t; + } + else if (strcmp(ptr, "-inf") == 0) { + d = -1.0 / t; + } + else { + char *e; + d = strtod(ptr, &e); + d = load_mantissa(d, e, RSTRING_LEN(str) - (e - ptr)); + } + v = DBL2NUM(d); + v = r_entry(v, arg); + v = r_leave(v, arg); + } + break; + + case TYPE_BIGNUM: + { + long len; + BDIGIT *digits; + volatile VALUE data; + + NEWOBJ(big, struct RBignum); + OBJSETUP(big, rb_cBignum, T_BIGNUM); + RBIGNUM_SET_SIGN(big, (r_byte(arg) == '+')); + len = r_long(arg); + data = r_bytes0(len * 2, arg); +#if SIZEOF_BDIGITS == SIZEOF_SHORT + rb_big_resize((VALUE)big, len); +#else + rb_big_resize((VALUE)big, (len + 1) * 2 / sizeof(BDIGIT)); +#endif + digits = RBIGNUM_DIGITS(big); + MEMCPY(digits, RSTRING_PTR(data), char, len * 2); +#if SIZEOF_BDIGITS > SIZEOF_SHORT + MEMZERO((char *)digits + len * 2, char, + RBIGNUM_LEN(big) * sizeof(BDIGIT) - len * 2); +#endif + len = RBIGNUM_LEN(big); + while (len > 0) { + unsigned char *p = (unsigned char *)digits; + BDIGIT num = 0; +#if SIZEOF_BDIGITS > SIZEOF_SHORT + int shift = 0; + int i; + + for (i=0; iifnone = r_object(arg); + } + v = r_leave(v, arg); + } + break; + + case TYPE_STRUCT: + { + VALUE klass, mem; + VALUE values; + volatile long i; /* gcc 2.7.2.3 -O2 bug?? */ + long len; + ID slot; + + klass = path2class(r_unique(arg)); + len = r_long(arg); + + v = rb_obj_alloc(klass); + if (TYPE(v) != T_STRUCT) { + rb_raise(rb_eTypeError, "class %s not a struct", rb_class2name(klass)); + } + mem = rb_struct_s_members(klass); + if (RARRAY_LEN(mem) != len) { + rb_raise(rb_eTypeError, "struct %s not compatible (struct size differs)", + rb_class2name(klass)); + } + + v = r_entry(v, arg); + values = rb_ary_new2(len); + for (i=0; i 0) { + VALUE m = rb_ary_pop(extmod); + rb_extend_object(v, m); + } + } + if (!rb_respond_to(v, s_mload)) { + rb_raise(rb_eTypeError, "instance of %s needs to have method `marshal_load'", + rb_class2name(klass)); + } + v = r_entry(v, arg); + data = r_object(arg); + rb_funcall(v, s_mload, 1, data); + check_load_arg(arg, s_mload); + v = r_leave(v, arg); + } + break; + + case TYPE_OBJECT: + { + v = obj_alloc_by_path(r_unique(arg), arg); + if (TYPE(v) != T_OBJECT) { + rb_raise(rb_eArgError, "dump format error"); + } + v = r_entry(v, arg); + r_ivar(v, arg); + v = r_leave(v, arg); + } + break; + + case TYPE_DATA: + { + VALUE klass = path2class(r_unique(arg)); + if (rb_respond_to(klass, s_alloc)) { + static int warn = Qtrue; + if (warn) { + rb_warn("define `allocate' instead of `_alloc'"); + warn = Qfalse; + } + v = rb_funcall(klass, s_alloc, 0); + check_load_arg(arg, s_alloc); + } + else { + v = rb_obj_alloc(klass); + } + if (TYPE(v) != T_DATA) { + rb_raise(rb_eArgError, "dump format error"); + } + v = r_entry(v, arg); + if (!rb_respond_to(v, s_load_data)) { + rb_raise(rb_eTypeError, + "class %s needs to have instance method `_load_data'", + rb_class2name(klass)); + } + rb_funcall(v, s_load_data, 1, r_object0(arg, 0, extmod)); + check_load_arg(arg, s_load_data); + v = r_leave(v, arg); + } + break; + + case TYPE_MODULE_OLD: + { + volatile VALUE str = r_bytes(arg); + + v = rb_path2class(RSTRING_PTR(str)); + v = r_entry(v, arg); + v = r_leave(v, arg); + } + break; + + case TYPE_CLASS: + { + volatile VALUE str = r_bytes(arg); + + v = path2class(RSTRING_PTR(str)); + v = r_entry(v, arg); + v = r_leave(v, arg); + } + break; + + case TYPE_MODULE: + { + volatile VALUE str = r_bytes(arg); + + v = path2module(RSTRING_PTR(str)); + v = r_entry(v, arg); + v = r_leave(v, arg); + } + break; + + case TYPE_SYMBOL: + v = ID2SYM(r_symreal(arg)); + v = r_leave(v, arg); + break; + + case TYPE_SYMLINK: + v = ID2SYM(r_symlink(arg)); + break; + + default: + rb_raise(rb_eArgError, "dump format error(0x%x)", type); + break; + } + return v; +} + +static VALUE +r_object(struct load_arg *arg) +{ + return r_object0(arg, 0, Qnil); +} + +static VALUE +load(struct load_arg *arg) +{ + return r_object(arg); +} + +static VALUE +load_ensure(struct load_arg *arg) +{ + if (!DATA_PTR(arg->wrapper)) return 0; + st_free_table(arg->symbols); + st_free_table(arg->data); + st_free_table(arg->compat_tbl); + DATA_PTR(arg->wrapper) = 0; + arg->wrapper = 0; + return 0; +} + +/* + * call-seq: + * load( source [, proc] ) => obj + * restore( source [, proc] ) => obj + * + * Returns the result of converting the serialized data in source into a + * Ruby object (possibly with associated subordinate objects). source + * may be either an instance of IO or an object that responds to + * to_str. If proc is specified, it will be passed each object as it + * is deserialized. + */ +static VALUE +marshal_load(int argc, VALUE *argv) +{ + VALUE port, proc; + int major, minor; + VALUE v; + struct load_arg arg; + + rb_scan_args(argc, argv, "11", &port, &proc); + v = rb_check_string_type(port); + if (!NIL_P(v)) { + arg.taint = OBJ_TAINTED(port); /* original taintedness */ + port = v; + } + else if (rb_respond_to(port, s_getbyte) && rb_respond_to(port, s_read)) { + if (rb_respond_to(port, s_binmode)) { + rb_funcall2(port, s_binmode, 0, 0); + } + arg.taint = Qtrue; + } + else { + rb_raise(rb_eTypeError, "instance of IO needed"); + } + arg.untrust = OBJ_UNTRUSTED(port); + arg.src = port; + arg.offset = 0; + arg.symbols = st_init_numtable(); + arg.data = st_init_numtable(); + arg.compat_tbl = st_init_numtable(); + arg.proc = 0; + arg.wrapper = Data_Wrap_Struct(rb_cData, mark_load_arg, 0, &arg); + + major = r_byte(&arg); + minor = r_byte(&arg); + if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) { + rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\ +\tformat version %d.%d required; %d.%d given", + MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); + } + if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) { + rb_warn("incompatible marshal file format (can be read)\n\ +\tformat version %d.%d required; %d.%d given", + MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); + } + + if (!NIL_P(proc)) arg.proc = proc; + v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg); + + return v; +} + +/* + * The marshaling library converts collections of Ruby objects into a + * byte stream, allowing them to be stored outside the currently + * active script. This data may subsequently be read and the original + * objects reconstituted. + * Marshaled data has major and minor version numbers stored along + * with the object information. In normal use, marshaling can only + * load data written with the same major version number and an equal + * or lower minor version number. If Ruby's ``verbose'' flag is set + * (normally using -d, -v, -w, or --verbose) the major and minor + * numbers must match exactly. Marshal versioning is independent of + * Ruby's version numbers. You can extract the version by reading the + * first two bytes of marshaled data. + * + * str = Marshal.dump("thing") + * RUBY_VERSION #=> "1.9.0" + * str[0].ord #=> 4 + * str[1].ord #=> 8 + * + * Some objects cannot be dumped: if the objects to be dumped include + * bindings, procedure or method objects, instances of class IO, or + * singleton objects, a TypeError will be raised. + * If your class has special serialization needs (for example, if you + * want to serialize in some specific format), or if it contains + * objects that would otherwise not be serializable, you can implement + * your own serialization strategy by defining two methods, _dump and + * _load: + * The instance method _dump should return a String object containing + * all the information necessary to reconstitute objects of this class + * and all referenced objects up to a maximum depth given as an integer + * parameter (a value of -1 implies that you should disable depth checking). + * The class method _load should take a String and return an object of this class. + */ +void +Init_marshal(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + VALUE rb_mMarshal = rb_define_module("Marshal"); + + s_dump = rb_intern("_dump"); + s_load = rb_intern("_load"); + s_mdump = rb_intern("marshal_dump"); + s_mload = rb_intern("marshal_load"); + s_dump_data = rb_intern("_dump_data"); + s_load_data = rb_intern("_load_data"); + s_alloc = rb_intern("_alloc"); + s_call = rb_intern("call"); + s_getbyte = rb_intern("getbyte"); + s_read = rb_intern("read"); + s_write = rb_intern("write"); + s_binmode = rb_intern("binmode"); + + rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1); + rb_define_module_function(rb_mMarshal, "load", marshal_load, -1); + rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1); + + rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR)); + rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR)); + + compat_allocator_tbl = st_init_numtable(); + compat_allocator_tbl_wrapper = + Data_Wrap_Struct(rb_cData, mark_marshal_compat_t, 0, compat_allocator_tbl); + rb_gc_register_mark_object(compat_allocator_tbl_wrapper); +} + +VALUE +rb_marshal_dump(VALUE obj, VALUE port) +{ + int argc = 1; + VALUE argv[2]; + + argv[0] = obj; + argv[1] = port; + if (!NIL_P(port)) argc = 2; + return marshal_dump(argc, argv); +} + +VALUE +rb_marshal_load(VALUE port) +{ + return marshal_load(1, &port); +} diff --git a/lib/ruby-1.9.1-rc1/math.c b/lib/ruby-1.9.1-rc1/math.c new file mode 100644 index 0000000..0d3a336 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/math.c @@ -0,0 +1,758 @@ +/********************************************************************** + + math.c - + + $Author: yugui $ + created at: Tue Jan 25 14:12:56 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include +#include + +VALUE rb_mMath; + +static VALUE +to_flo(VALUE x) +{ + if (!rb_obj_is_kind_of(x, rb_cNumeric)) { + rb_raise(rb_eTypeError, "can't convert %s into Float", + NIL_P(x) ? "nil" : + x == Qtrue ? "true" : + x == Qfalse ? "false" : + rb_obj_classname(x)); + } + return rb_convert_type(x, T_FLOAT, "Float", "to_f"); +} + +#define Need_Float(x) (x) = to_flo(x) +#define Need_Float2(x,y) do {\ + Need_Float(x);\ + Need_Float(y);\ +} while (0) + +static void +domain_check(double x, double y, const char *msg) +{ + while(1) { + if (errno) { + rb_sys_fail(msg); + } + if (isnan(y)) { + if (isnan(x)) break; +#if defined(EDOM) + errno = EDOM; +#elif defined(ERANGE) + errno = ERANGE; +#endif + continue; + } + break; + } +} + +static void +infinity_check(VALUE arg, double res, const char *msg) +{ + while(1) { + if (errno) { + rb_sys_fail(msg); + } + if (isinf(res) && !isinf(RFLOAT_VALUE(arg))) { +#if defined(EDOM) + errno = EDOM; +#elif defined(ERANGE) + errno = ERANGE; +#endif + continue; + } + break; + } +} + +/* + * call-seq: + * Math.atan2(y, x) => float + * + * Computes the arc tangent given y and x. Returns + * -PI..PI. + * + */ + +static VALUE +math_atan2(VALUE obj, VALUE y, VALUE x) +{ + Need_Float2(y, x); + return DBL2NUM(atan2(RFLOAT_VALUE(y), RFLOAT_VALUE(x))); +} + + +/* + * call-seq: + * Math.cos(x) => float + * + * Computes the cosine of x (expressed in radians). Returns + * -1..1. + */ + +static VALUE +math_cos(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(cos(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.sin(x) => float + * + * Computes the sine of x (expressed in radians). Returns + * -1..1. + */ + +static VALUE +math_sin(VALUE obj, VALUE x) +{ + Need_Float(x); + + return DBL2NUM(sin(RFLOAT_VALUE(x))); +} + + +/* + * call-seq: + * Math.tan(x) => float + * + * Returns the tangent of x (expressed in radians). + */ + +static VALUE +math_tan(VALUE obj, VALUE x) +{ + Need_Float(x); + + return DBL2NUM(tan(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.acos(x) => float + * + * Computes the arc cosine of x. Returns 0..PI. + */ + +static VALUE +math_acos(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = acos(d0); + domain_check(d0, d, "acos"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.asin(x) => float + * + * Computes the arc sine of x. Returns -{PI/2} .. {PI/2}. + */ + +static VALUE +math_asin(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = asin(d0); + domain_check(d0, d, "asin"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.atan(x) => float + * + * Computes the arc tangent of x. Returns -{PI/2} .. {PI/2}. + */ + +static VALUE +math_atan(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(atan(RFLOAT_VALUE(x))); +} + +#ifndef HAVE_COSH +double +cosh(double x) +{ + return (exp(x) + exp(-x)) / 2; +} +#endif + +/* + * call-seq: + * Math.cosh(x) => float + * + * Computes the hyperbolic cosine of x (expressed in radians). + */ + +static VALUE +math_cosh(VALUE obj, VALUE x) +{ + Need_Float(x); + + return DBL2NUM(cosh(RFLOAT_VALUE(x))); +} + +#ifndef HAVE_SINH +double +sinh(double x) +{ + return (exp(x) - exp(-x)) / 2; +} +#endif + +/* + * call-seq: + * Math.sinh(x) => float + * + * Computes the hyperbolic sine of x (expressed in + * radians). + */ + +static VALUE +math_sinh(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(sinh(RFLOAT_VALUE(x))); +} + +#ifndef HAVE_TANH +double +tanh(double x) +{ + return sinh(x) / cosh(x); +} +#endif + +/* + * call-seq: + * Math.tanh() => float + * + * Computes the hyperbolic tangent of x (expressed in + * radians). + */ + +static VALUE +math_tanh(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(tanh(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.acosh(x) => float + * + * Computes the inverse hyperbolic cosine of x. + */ + +static VALUE +math_acosh(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = acosh(d0); + domain_check(d0, d, "acosh"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.asinh(x) => float + * + * Computes the inverse hyperbolic sine of x. + */ + +static VALUE +math_asinh(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(asinh(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.atanh(x) => float + * + * Computes the inverse hyperbolic tangent of x. + */ + +static VALUE +math_atanh(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = atanh(d0); + domain_check(d0, d, "atanh"); + infinity_check(x, d, "atanh"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.exp(x) => float + * + * Returns e**x. + */ + +static VALUE +math_exp(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(exp(RFLOAT_VALUE(x))); +} + +#if defined __CYGWIN__ +# include +# if CYGWIN_VERSION_DLL_MAJOR < 1005 +# define nan(x) nan() +# endif +# define log(x) ((x) < 0.0 ? nan("") : log(x)) +# define log10(x) ((x) < 0.0 ? nan("") : log10(x)) +#endif + +/* + * call-seq: + * Math.log(numeric) => float + * Math.log(num,base) => float + * + * Returns the natural logarithm of numeric. + * If additional second argument is given, it will be the base + * of logarithm. + */ + +static VALUE +math_log(int argc, VALUE *argv) +{ + VALUE x, base; + double d0, d; + + rb_scan_args(argc, argv, "11", &x, &base); + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = log(d0); + if (argc == 2) { + Need_Float(base); + d /= log(RFLOAT_VALUE(base)); + } + domain_check(d0, d, "log"); + infinity_check(x, d, "log"); + return DBL2NUM(d); +} + +#ifndef log2 +#ifndef HAVE_LOG2 +double +log2(double x) +{ + return log10(x)/log10(2.0); +} +#else +extern double log2(double); +#endif +#endif + +/* + * call-seq: + * Math.log2(numeric) => float + * + * Returns the base 2 logarithm of numeric. + */ + +static VALUE +math_log2(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = log2(d0); + domain_check(d0, d, "log2"); + infinity_check(x, d, "log2"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.log10(numeric) => float + * + * Returns the base 10 logarithm of numeric. + */ + +static VALUE +math_log10(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = log10(d0); + domain_check(d0, d, "log10"); + infinity_check(x, d, "log10"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.sqrt(numeric) => float + * + * Returns the non-negative square root of numeric. + * + * 0.upto(10) {|x| + * p [x, Math.sqrt(x), Math.sqrt(x)**2] + * } + * #=> + * [0, 0.0, 0.0] + * [1, 1.0, 1.0] + * [2, 1.4142135623731, 2.0] + * [3, 1.73205080756888, 3.0] + * [4, 2.0, 4.0] + * [5, 2.23606797749979, 5.0] + * [6, 2.44948974278318, 6.0] + * [7, 2.64575131106459, 7.0] + * [8, 2.82842712474619, 8.0] + * [9, 3.0, 9.0] + * [10, 3.16227766016838, 10.0] + * + */ + +static VALUE +math_sqrt(VALUE obj, VALUE x) +{ + double d0, d; + + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = sqrt(d0); + domain_check(d0, d, "sqrt"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.cbrt(numeric) => float + * + * Returns the cube root of numeric. + * + * -9.upto(9) {|x| + * p [x, Math.cbrt(x), Math.cbrt(x)**3] + * } + * #=> + * [-9, -2.0800838230519, -9.0] + * [-8, -2.0, -8.0] + * [-7, -1.91293118277239, -7.0] + * [-6, -1.81712059283214, -6.0] + * [-5, -1.7099759466767, -5.0] + * [-4, -1.5874010519682, -4.0] + * [-3, -1.44224957030741, -3.0] + * [-2, -1.25992104989487, -2.0] + * [-1, -1.0, -1.0] + * [0, 0.0, 0.0] + * [1, 1.0, 1.0] + * [2, 1.25992104989487, 2.0] + * [3, 1.44224957030741, 3.0] + * [4, 1.5874010519682, 4.0] + * [5, 1.7099759466767, 5.0] + * [6, 1.81712059283214, 6.0] + * [7, 1.91293118277239, 7.0] + * [8, 2.0, 8.0] + * [9, 2.0800838230519, 9.0] + * + */ + +static VALUE +math_cbrt(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(cbrt(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.frexp(numeric) => [ fraction, exponent ] + * + * Returns a two-element array containing the normalized fraction (a + * Float) and exponent (a Fixnum) of + * numeric. + * + * fraction, exponent = Math.frexp(1234) #=> [0.6025390625, 11] + * fraction * 2**exponent #=> 1234.0 + */ + +static VALUE +math_frexp(VALUE obj, VALUE x) +{ + double d; + int exp; + + Need_Float(x); + + d = frexp(RFLOAT_VALUE(x), &exp); + return rb_assoc_new(DBL2NUM(d), INT2NUM(exp)); +} + +/* + * call-seq: + * Math.ldexp(flt, int) -> float + * + * Returns the value of flt*(2**int). + * + * fraction, exponent = Math.frexp(1234) + * Math.ldexp(fraction, exponent) #=> 1234.0 + */ + +static VALUE +math_ldexp(VALUE obj, VALUE x, VALUE n) +{ + Need_Float(x); + return DBL2NUM(ldexp(RFLOAT_VALUE(x), NUM2INT(n))); +} + +/* + * call-seq: + * Math.hypot(x, y) => float + * + * Returns sqrt(x**2 + y**2), the hypotenuse of a right-angled triangle + * with sides x and y. + * + * Math.hypot(3, 4) #=> 5.0 + */ + +static VALUE +math_hypot(VALUE obj, VALUE x, VALUE y) +{ + Need_Float2(x, y); + return DBL2NUM(hypot(RFLOAT_VALUE(x), RFLOAT_VALUE(y))); +} + +/* + * call-seq: + * Math.erf(x) => float + * + * Calculates the error function of x. + */ + +static VALUE +math_erf(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(erf(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.erfc(x) => float + * + * Calculates the complementary error function of x. + */ + +static VALUE +math_erfc(VALUE obj, VALUE x) +{ + Need_Float(x); + return DBL2NUM(erfc(RFLOAT_VALUE(x))); +} + +/* + * call-seq: + * Math.gamma(x) => float + * + * Calculates the gamma function of x. + * + * Note that gamma(n) is same as fact(n-1) for integer n >= 0. + * However gamma(n) returns float and possibly has error in calculation. + * + * def fact(n) (1..n).inject(1) {|r,i| r*i } end + * 0.upto(25) {|i| p [i, Math.gamma(i+1), fact(i)] } + * #=> + * [0, 1.0, 1] + * [1, 1.0, 1] + * [2, 2.0, 2] + * [3, 6.0, 6] + * [4, 24.0, 24] + * [5, 120.0, 120] + * [6, 720.0, 720] + * [7, 5040.0, 5040] + * [8, 40320.0, 40320] + * [9, 362880.0, 362880] + * [10, 3628800.0, 3628800] + * [11, 39916800.0, 39916800] + * [12, 479001599.999999, 479001600] + * [13, 6227020800.00001, 6227020800] + * [14, 87178291199.9998, 87178291200] + * [15, 1307674368000.0, 1307674368000] + * [16, 20922789888000.0, 20922789888000] + * [17, 3.55687428096001e+14, 355687428096000] + * [18, 6.40237370572799e+15, 6402373705728000] + * [19, 1.21645100408832e+17, 121645100408832000] + * [20, 2.43290200817664e+18, 2432902008176640000] + * [21, 5.10909421717094e+19, 51090942171709440000] + * [22, 1.12400072777761e+21, 1124000727777607680000] + * [23, 2.58520167388851e+22, 25852016738884976640000] + * [24, 6.20448401733239e+23, 620448401733239439360000] + * [25, 1.5511210043331e+25, 15511210043330985984000000] + * + */ + +static VALUE +math_gamma(VALUE obj, VALUE x) +{ + double d0, d; + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = tgamma(d0); + domain_check(d0, d, "gamma"); + return DBL2NUM(d); +} + +/* + * call-seq: + * Math.lgamma(x) => [float, -1 or 1] + * + * Calculates the logarithmic gamma of x and + * the sign of gamma of x. + * + * Math.lgamma(x) is same as + * [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1] + * but avoid overflow by Math.gamma(x) for large x. + */ + +static VALUE +math_lgamma(VALUE obj, VALUE x) +{ + double d0, d; + int sign; + VALUE v; + Need_Float(x); + errno = 0; + d0 = RFLOAT_VALUE(x); + d = lgamma_r(d0, &sign); + domain_check(d0, d, "lgamma"); + v = DBL2NUM(d); + return rb_assoc_new(v, INT2FIX(sign)); +} + + +#define exp1(n) \ +VALUE \ +rb_math_##n(VALUE x)\ +{\ + return math_##n(rb_mMath, x);\ +} + +#define exp2(n) \ +VALUE \ +rb_math_##n(VALUE x, VALUE y)\ +{\ + return math_##n(rb_mMath, x, y);\ +} + +exp2(atan2) +exp1(cos) +exp1(cosh) +exp1(exp) +exp2(hypot) + +VALUE +rb_math_log(int argc, VALUE *argv) +{ + return math_log(argc, argv); +} + +exp1(sin) +exp1(sinh) +exp1(sqrt) + + +/* + * The Math module contains module functions for basic + * trigonometric and transcendental functions. See class + * Float for a list of constants that + * define Ruby's floating point accuracy. + */ + + +void +Init_Math(void) +{ + rb_mMath = rb_define_module("Math"); + +#ifdef M_PI + rb_define_const(rb_mMath, "PI", DBL2NUM(M_PI)); +#else + rb_define_const(rb_mMath, "PI", DBL2NUM(atan(1.0)*4.0)); +#endif + +#ifdef M_E + rb_define_const(rb_mMath, "E", DBL2NUM(M_E)); +#else + rb_define_const(rb_mMath, "E", DBL2NUM(exp(1.0))); +#endif + + rb_define_module_function(rb_mMath, "atan2", math_atan2, 2); + rb_define_module_function(rb_mMath, "cos", math_cos, 1); + rb_define_module_function(rb_mMath, "sin", math_sin, 1); + rb_define_module_function(rb_mMath, "tan", math_tan, 1); + + rb_define_module_function(rb_mMath, "acos", math_acos, 1); + rb_define_module_function(rb_mMath, "asin", math_asin, 1); + rb_define_module_function(rb_mMath, "atan", math_atan, 1); + + rb_define_module_function(rb_mMath, "cosh", math_cosh, 1); + rb_define_module_function(rb_mMath, "sinh", math_sinh, 1); + rb_define_module_function(rb_mMath, "tanh", math_tanh, 1); + + rb_define_module_function(rb_mMath, "acosh", math_acosh, 1); + rb_define_module_function(rb_mMath, "asinh", math_asinh, 1); + rb_define_module_function(rb_mMath, "atanh", math_atanh, 1); + + rb_define_module_function(rb_mMath, "exp", math_exp, 1); + rb_define_module_function(rb_mMath, "log", math_log, -1); + rb_define_module_function(rb_mMath, "log2", math_log2, 1); + rb_define_module_function(rb_mMath, "log10", math_log10, 1); + rb_define_module_function(rb_mMath, "sqrt", math_sqrt, 1); + rb_define_module_function(rb_mMath, "cbrt", math_cbrt, 1); + + rb_define_module_function(rb_mMath, "frexp", math_frexp, 1); + rb_define_module_function(rb_mMath, "ldexp", math_ldexp, 2); + + rb_define_module_function(rb_mMath, "hypot", math_hypot, 2); + + rb_define_module_function(rb_mMath, "erf", math_erf, 1); + rb_define_module_function(rb_mMath, "erfc", math_erfc, 1); + + rb_define_module_function(rb_mMath, "gamma", math_gamma, 1); + rb_define_module_function(rb_mMath, "lgamma", math_lgamma, 1); +} diff --git a/lib/ruby-1.9.1-rc1/miniprelude.c b/lib/ruby-1.9.1-rc1/miniprelude.c new file mode 100644 index 0000000..3924b9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/miniprelude.c @@ -0,0 +1,54 @@ +#include "ruby/ruby.h" +#include "vm_core.h" + +static const char prelude_name0[] = ""; +static const char prelude_code0[] = +"\n" +"# Mutex\n" +"\n" +"class Mutex\n" +" def synchronize\n" +" self.lock\n" +" begin\n" +" yield\n" +" ensure\n" +" self.unlock rescue nil\n" +" end\n" +" end\n" +"end\n" +"\n" +"# Thread\n" +"\n" +"class Thread\n" +" MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new\n" +" def self.exclusive\n" +" MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{\n" +" yield\n" +" }\n" +" end\n" +"end\n" +"\n" +"def require_relative(relative_feature)\n" +" c = caller.first\n" +" e = c.rindex(/:\\d+:in /)\n" +" file = $`\n" +" if /\\A\\((.*)\\)/ =~ file # eval, etc.\n" +" raise LoadError, \"require_relative is called in #{$1}\"\n" +" end\n" +" absolute_feature = File.expand_path(File.join(File.dirname(file), relative_feature))\n" +" require absolute_feature\n" +"end\n" +; + +void +Init_prelude(void) +{ + rb_iseq_eval(rb_iseq_compile( + rb_str_new(prelude_code0, sizeof(prelude_code0) - 1), + rb_str_new(prelude_name0, sizeof(prelude_name0) - 1), + INT2FIX(1))); + +#if 0 + puts(prelude_code0); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/misc/README b/lib/ruby-1.9.1-rc1/misc/README new file mode 100644 index 0000000..12646ac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/README @@ -0,0 +1,8 @@ +README this file +inf-ruby.el program to run ruby under emacs +ruby-mode.el ruby mode for emacs +rubydb2x.el ruby debugger support for emacs 19.2x or before +rubydb3x.el ruby debugger support for emacs 19.3x or later +ruby-electric.el emacs minor mode providing electric commands + +Check out http://rubyforge.org/projects/ruby-debug/ also. diff --git a/lib/ruby-1.9.1-rc1/misc/inf-ruby.el b/lib/ruby-1.9.1-rc1/misc/inf-ruby.el new file mode 100644 index 0000000..ec61546 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/inf-ruby.el @@ -0,0 +1,416 @@ +;;; -*-Emacs-Lisp-*- +;;; +;;; $Id: inf-ruby.el 19206 2008-09-06 22:36:10Z matz $ +;;; $Author: matz $ +;;; +;;; Inferior Ruby Mode - ruby process in a buffer. +;;; adapted from cmuscheme.el +;;; +;;; Usage: +;;; +;;; (0) check ruby-program-name variable that can run your environment. +;;; +;;; (1) modify .emacs to use ruby-mode +;;; for example : +;;; +;;; (autoload 'ruby-mode "ruby-mode" +;;; "Mode for editing ruby source files" t) +;;; (setq auto-mode-alist +;;; (append '(("\\.rb$" . ruby-mode)) auto-mode-alist)) +;;; (setq interpreter-mode-alist (append '(("ruby" . ruby-mode)) +;;; interpreter-mode-alist)) +;;; +;;; (2) set to load inf-ruby and set inf-ruby key definition in ruby-mode. +;;; +;;; (autoload 'run-ruby "inf-ruby" +;;; "Run an inferior Ruby process") +;;; (autoload 'inf-ruby-keys "inf-ruby" +;;; "Set local key defs for inf-ruby in ruby-mode") +;;; (add-hook 'ruby-mode-hook +;;; '(lambda () +;;; (inf-ruby-keys) +;;; )) +;;; +;;; HISTORY +;;; senda - 8 Apr 1998: Created. +;;; $Log$ +;;; Revision 1.7 2004/07/27 08:11:36 matz +;;; * eval.c (rb_eval): copy on write for argument local variable +;;; assignment. +;;; +;;; * eval.c (assign): ditto. +;;; +;;; * eval.c (rb_call0): update ruby_frame->argv with the default +;;; value used for the optional arguments. +;;; +;;; * object.c (Init_Object): "===" calls rb_obj_equal() directly. +;;; [ruby-list:39937] +;;; +;;; Revision 1.6 2002/09/07 14:35:46 nobu +;;; * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp +;;; alist for error message from ruby. +;;; +;;; * misc/inf-ruby.el (inferior-ruby-mode): fixed for Emacs. +;;; +;;; * misc/inf-ruby.el (ruby-send-region): compilation-parse-errors +;;; doesn't parse first line, so insert separators before each +;;; evaluations. +;;; +;;; Revision 1.5 2002/08/19 10:05:47 nobu +;;; * misc/inf-ruby.el (inf-ruby-keys): ruby-send-definition +;;; conflicted with ruby-insert-end. +;;; +;;; * misc/inf-ruby.el (inferior-ruby-mode): compilation-minor-mode. +;;; +;;; * misc/inf-ruby.el (ruby-send-region): send as here document to +;;; adjust source file/line. [ruby-talk:47113], [ruby-dev:17965] +;;; +;;; * misc/inf-ruby.el (ruby-send-terminator): added to make unique +;;; terminator. +;;; +;;; Revision 1.4 2002/01/29 07:16:09 matz +;;; * file.c (rb_stat_rdev_major): added. [new] +;;; +;;; * file.c (rb_stat_rdev_minor): added. [new] +;;; +;;; * file.c (rb_stat_inspect): print mode in octal. +;;; +;;; Revision 1.3 1999/12/01 09:24:18 matz +;;; 19991201 +;;; +;;; Revision 1.2 1999/08/13 05:45:18 matz +;;; 1.4.0 +;;; +;;; Revision 1.1.1.1.2.1 1999/07/15 07:59:59 matz +;;; 990715 +;;; +;;; Revision 1.1.1.1 1999/01/20 04:59:36 matz +;;; ruby 1.3 cycle +;;; +;;; Revision 1.1.2.1 1998/12/16 07:30:36 matz +;;; first public release of 1.1d (pre1.2) series +;;; +;;; Revision 1.4 1998/05/20 02:45:58 senda +;;; default program to irb +;;; +;;; Revision 1.3 1998/04/10 04:11:30 senda +;;; modification by Matsumoto san (1.1b9_09) +;;; remove-in-string defined +;;; global variable : +;;; inferior-ruby-first-prompt-pattern +;;; inferior-ruby-prompt-pattern +;;; defined +;;; +;;; Revision 1.2 1998/04/09 07:53:42 senda +;;; remove M-C-x in inferior-ruby-mode +;;; +;;; Revision 1.1 1998/04/09 07:28:36 senda +;;; Initial revision +;;; +;;; + +(require 'comint) +(require 'compile) +(require 'ruby-mode) + +;; +;; you may change these variables +;; +;(defvar ruby-program-name "rbc --noreadline" +; "*Program invoked by the run-ruby command") +; +;(defvar inferior-ruby-first-prompt-pattern "^rbc0> *" +; "first prompt regex pattern of ruby interpreter.") +; +;(defvar inferior-ruby-prompt-pattern "^\\(rbc.[>*\"'] *\\)+" +; "prompt regex pattern of ruby interpreter.") + +;;;; for irb +(defvar ruby-program-name "irb --inf-ruby-mode" + "*Program invoked by the run-ruby command") + +(defvar inferior-ruby-first-prompt-pattern "^irb(.*)[0-9:]+0> *" + "first prompt regex pattern of ruby interpreter.") + +(defvar inferior-ruby-prompt-pattern "^\\(irb(.*)[0-9:]+[>*\"'] *\\)+" + "prompt regex pattern of ruby interpreter.") + +;; +;; mode variables +;; +(defvar inferior-ruby-mode-hook nil + "*Hook for customising inferior-ruby mode.") +(defvar inferior-ruby-mode-map nil + "*Mode map for inferior-ruby-mode") + +(defconst inferior-ruby-error-regexp-alist + '(("SyntaxError: compile error\n^\\([^\(].*\\):\\([1-9][0-9]*\\):" 1 2) + ("^\tfrom \\([^\(].*\\):\\([1-9][0-9]*\\)\\(:in `.*'\\)?$" 1 2))) + +(cond ((not inferior-ruby-mode-map) + (setq inferior-ruby-mode-map + (copy-keymap comint-mode-map)) +; (define-key inferior-ruby-mode-map "\M-\C-x" ;gnu convention +; 'ruby-send-definition) +; (define-key inferior-ruby-mode-map "\C-x\C-e" 'ruby-send-last-sexp) + (define-key inferior-ruby-mode-map "\C-c\C-l" 'ruby-load-file) +)) + +(defun inf-ruby-keys () + "Set local key defs for inf-ruby in ruby-mode" + (define-key ruby-mode-map "\M-\C-x" 'ruby-send-definition) +; (define-key ruby-mode-map "\C-x\C-e" 'ruby-send-last-sexp) + (define-key ruby-mode-map "\C-c\C-b" 'ruby-send-block) + (define-key ruby-mode-map "\C-c\M-b" 'ruby-send-block-and-go) + (define-key ruby-mode-map "\C-c\C-x" 'ruby-send-definition) + (define-key ruby-mode-map "\C-c\M-x" 'ruby-send-definition-and-go) + (define-key ruby-mode-map "\C-c\C-r" 'ruby-send-region) + (define-key ruby-mode-map "\C-c\M-r" 'ruby-send-region-and-go) + (define-key ruby-mode-map "\C-c\C-z" 'switch-to-ruby) + (define-key ruby-mode-map "\C-c\C-l" 'ruby-load-file) + (define-key ruby-mode-map "\C-c\C-s" 'run-ruby) +) + +(defvar ruby-buffer nil "current ruby (actually irb) process buffer.") + +(defun inferior-ruby-mode () + "Major mode for interacting with an inferior ruby (irb) process. + +The following commands are available: +\\{inferior-ruby-mode-map} + +A ruby process can be fired up with M-x run-ruby. + +Customisation: Entry to this mode runs the hooks on comint-mode-hook and +inferior-ruby-mode-hook (in that order). + +You can send text to the inferior ruby process from other buffers containing +Ruby source. + switch-to-ruby switches the current buffer to the ruby process buffer. + ruby-send-definition sends the current definition to the ruby process. + ruby-send-region sends the current region to the ruby process. + + ruby-send-definition-and-go, ruby-send-region-and-go, + switch to the ruby process buffer after sending their text. +For information on running multiple processes in multiple buffers, see +documentation for variable ruby-buffer. + +Commands: +Return after the end of the process' output sends the text from the + end of process to point. +Return before the end of the process' output copies the sexp ending at point + to the end of the process' output, and sends it. +Delete converts tabs to spaces as it moves back. +Tab indents for ruby; with argument, shifts rest + of expression rigidly with the current line. +C-M-q does Tab on each line starting within following expression. +Paragraphs are separated only by blank lines. # start comments. +If you accidentally suspend your process, use \\[comint-continue-subjob] +to continue it." + (interactive) + (comint-mode) + ;; Customise in inferior-ruby-mode-hook + ;(setq comint-prompt-regexp "^[^>\n]*>+ *") + (setq comint-prompt-regexp inferior-ruby-prompt-pattern) + ;;(scheme-mode-variables) + (ruby-mode-variables) + (setq major-mode 'inferior-ruby-mode) + (setq mode-name "Inferior Ruby") + (setq mode-line-process '(":%s")) + (use-local-map inferior-ruby-mode-map) + (setq comint-input-filter (function ruby-input-filter)) + (setq comint-get-old-input (function ruby-get-old-input)) + (compilation-shell-minor-mode t) + (make-local-variable 'compilation-error-regexp-alist) + (setq compilation-error-regexp-alist inferior-ruby-error-regexp-alist) + (run-hooks 'inferior-ruby-mode-hook)) + +(defvar inferior-ruby-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'" + "*Input matching this regexp are not saved on the history list. +Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters.") + +(defun ruby-input-filter (str) + "Don't save anything matching inferior-ruby-filter-regexp" + (not (string-match inferior-ruby-filter-regexp str))) + +;; adapted from replace-in-string in XEmacs (subr.el) +(defun remove-in-string (str regexp) + "Remove all matches in STR for REGEXP and returns the new string." + (let ((rtn-str "") (start 0) match prev-start) + (while (setq match (string-match regexp str start)) + (setq prev-start start + start (match-end 0) + rtn-str (concat rtn-str (substring str prev-start match)))) + (concat rtn-str (substring str start)))) + +(defun ruby-get-old-input () + "Snarf the sexp ending at point" + (save-excursion + (let ((end (point))) + (re-search-backward inferior-ruby-first-prompt-pattern) + (remove-in-string (buffer-substring (point) end) + inferior-ruby-prompt-pattern) + ))) + +(defun ruby-args-to-list (string) + (let ((where (string-match "[ \t]" string))) + (cond ((null where) (list string)) + ((not (= where 0)) + (cons (substring string 0 where) + (ruby-args-to-list (substring string (+ 1 where) + (length string))))) + (t (let ((pos (string-match "[^ \t]" string))) + (if (null pos) + nil + (ruby-args-to-list (substring string pos + (length string))))))))) + +(defun run-ruby (cmd) + "Run an inferior Ruby process, input and output via buffer *ruby*. +If there is a process already running in `*ruby*', switch to that buffer. +With argument, allows you to edit the command line (default is value +of `ruby-program-name'). Runs the hooks `inferior-ruby-mode-hook' +\(after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.)" + + (interactive (list (if current-prefix-arg + (read-string "Run Ruby: " ruby-program-name) + ruby-program-name))) + (if (not (comint-check-proc "*ruby*")) + (let ((cmdlist (ruby-args-to-list cmd))) + (set-buffer (apply 'make-comint "ruby" (car cmdlist) + nil (cdr cmdlist))) + (inferior-ruby-mode))) + (setq ruby-program-name cmd) + (setq ruby-buffer "*ruby*") + (pop-to-buffer "*ruby*")) + +(defconst ruby-send-terminator "--inf-ruby-%x-%d-%d-%d--" + "Template for irb here document terminator. +Must not contain ruby meta characters.") + +(defconst ruby-eval-separator "") + +(defun ruby-send-region (start end) + "Send the current region to the inferior Ruby process." + (interactive "r") + (let (term (file (buffer-file-name)) line) + (save-excursion + (save-restriction + (widen) + (goto-char start) + (setq line (+ start (forward-line (- start)) 1)) + (goto-char start) + (while (progn + (setq term (apply 'format ruby-send-terminator (random) (current-time))) + (re-search-forward (concat "^" (regexp-quote term) "$") end t))))) + ;; compilation-parse-errors parses from second line. + (save-excursion + (let ((m (process-mark (ruby-proc)))) + (set-buffer (marker-buffer m)) + (goto-char m) + (insert ruby-eval-separator "\n") + (set-marker m (point)))) + (comint-send-string (ruby-proc) (format "eval <<'%s', nil, %S, %d\n" term file line)) + (comint-send-region (ruby-proc) start end) + (comint-send-string (ruby-proc) (concat "\n" term "\n")))) + +(defun ruby-send-definition () + "Send the current definition to the inferior Ruby process." + (interactive) + (save-excursion + (ruby-end-of-defun) + (let ((end (point))) + (ruby-beginning-of-defun) + (ruby-send-region (point) end)))) + +;(defun ruby-send-last-sexp () +; "Send the previous sexp to the inferior Ruby process." +; (interactive) +; (ruby-send-region (save-excursion (backward-sexp) (point)) (point))) + +(defun ruby-send-block () + "Send the current block to the inferior Ruby process." + (interactive) + (save-excursion + (ruby-end-of-block) + (end-of-line) + (let ((end (point))) + (ruby-beginning-of-block) + (ruby-send-region (point) end)))) + +(defun switch-to-ruby (eob-p) + "Switch to the ruby process buffer. +With argument, positions cursor at end of buffer." + (interactive "P") + (if (get-buffer ruby-buffer) + (pop-to-buffer ruby-buffer) + (error "No current process buffer. See variable ruby-buffer.")) + (cond (eob-p + (push-mark) + (goto-char (point-max))))) + +(defun ruby-send-region-and-go (start end) + "Send the current region to the inferior Ruby process. +Then switch to the process buffer." + (interactive "r") + (ruby-send-region start end) + (switch-to-ruby t)) + +(defun ruby-send-definition-and-go () + "Send the current definition to the inferior Ruby. +Then switch to the process buffer." + (interactive) + (ruby-send-definition) + (switch-to-ruby t)) + +(defun ruby-send-block-and-go () + "Send the current block to the inferior Ruby. +Then switch to the process buffer." + (interactive) + (ruby-send-block) + (switch-to-ruby t)) + +(defvar ruby-source-modes '(ruby-mode) + "*Used to determine if a buffer contains Ruby source code. +If it's loaded into a buffer that is in one of these major modes, it's +considered a ruby source file by ruby-load-file. +Used by these commands to determine defaults.") + +(defvar ruby-prev-l/c-dir/file nil + "Caches the last (directory . file) pair. +Caches the last pair used in the last ruby-load-file command. +Used for determining the default in the +next one.") + +(defun ruby-load-file (file-name) + "Load a Ruby file into the inferior Ruby process." + (interactive (comint-get-source "Load Ruby file: " ruby-prev-l/c-dir/file + ruby-source-modes t)) ; T because LOAD + ; needs an exact name + (comint-check-source file-name) ; Check to see if buffer needs saved. + (setq ruby-prev-l/c-dir/file (cons (file-name-directory file-name) + (file-name-nondirectory file-name))) + (comint-send-string (ruby-proc) (concat "(load \"" + file-name + "\"\)\n"))) + +(defun ruby-proc () + "Returns the current ruby process. See variable ruby-buffer." + (let ((proc (get-buffer-process (if (eq major-mode 'inferior-ruby-mode) + (current-buffer) + ruby-buffer)))) + (or proc + (error "No current process. See variable ruby-buffer")))) + +;;; Do the user's customisation... + +(defvar inf-ruby-load-hook nil + "This hook is run when inf-ruby is loaded in. +This is a good place to put keybindings.") + +(run-hooks 'inf-ruby-load-hook) + +(provide 'inf-ruby) + +;;; inf-ruby.el ends here diff --git a/lib/ruby-1.9.1-rc1/misc/ruby-electric.el b/lib/ruby-1.9.1-rc1/misc/ruby-electric.el new file mode 100644 index 0000000..174bd00 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/ruby-electric.el @@ -0,0 +1,200 @@ +;; -*-Emacs-Lisp-*- +;; +;; ruby-electric.el --- electric editing commands for ruby files +;; +;; Copyright (C) 2005 by Dee Zsombor . +;; Released under same license terms as Ruby. +;; +;; Due credit: this work was inspired by a code snippet posted by +;; Frederick Ros at http://rubygarden.org/ruby?EmacsExtensions. +;; +;; Following improvements where added: +;; +;; - handling of strings of type 'here document' +;; - more keywords, with special handling for 'do' +;; - packaged into a minor mode +;; +;; Usage: +;; +;; 0) copy ruby-electric.el into directory where emacs can find it. +;; +;; 1) modify your startup file (.emacs or whatever) by adding +;; following line: +;; +;; (require 'ruby-electric) +;; +;; note that you need to have font lock enabled beforehand. +;; +;; 2) toggle Ruby Electric Mode on/off with ruby-electric-mode. +;; +;; Changelog: +;; +;; 2005/Jan/14: inserts matching pair delimiters like {, [, (, ', ", +;; ' and | . +;; +;; 2005/Jan/14: added basic Custom support for configuring keywords +;; with electric closing. +;; +;; 2005/Jan/18: more Custom support for configuring characters for +;; which matching expansion should occur. +;; +;; 2005/Jan/18: no longer uses 'looking-back' or regexp character +;; classes like [:space:] since they are not implemented on XEmacs. +;; +;; 2005/Feb/01: explicitly provide default argument of 1 to +;; 'backward-word' as it requires it on Emacs 21.3 +;; +;; 2005/Mar/06: now stored inside ruby CVS; customize pages now have +;; ruby as parent; cosmetic fixes. + + +(require 'ruby-mode) + +(defgroup ruby-electric nil + "Minor mode providing electric editing commands for ruby files" + :group 'ruby) + +(defconst ruby-electric-expandable-do-re + "do\\s-$") + +(defconst ruby-electric-expandable-bar + "\\s-\\(do\\|{\\)\\s-+|") + +(defvar ruby-electric-matching-delimeter-alist + '((?\[ . ?\]) + (?\( . ?\)) + (?\' . ?\') + (?\` . ?\`) + (?\" . ?\"))) + +(defcustom ruby-electric-simple-keywords-re + (regexp-opt '("def" "if" "class" "module" "unless" "case" "while" "do" "until" "for" "begin") t) + "*Regular expresion matching keywords for which closing 'end' +is to be inserted." + :type 'regexp :group 'ruby-electric) + +(defcustom ruby-electric-expand-delimiters-list '(all) + "*List of contexts where matching delimiter should be +inserted. The word 'all' will do all insertions." + :type '(set :extra-offset 8 + (const :tag "Everything" all ) + (const :tag "Curly brace" ?\{ ) + (const :tag "Square brace" ?\[ ) + (const :tag "Round brace" ?\( ) + (const :tag "Quote" ?\' ) + (const :tag "Double quote" ?\" ) + (const :tag "Back quote" ?\` ) + (const :tag "Vertical bar" ?\| )) + :group 'ruby-electric) + +(defcustom ruby-electric-newline-before-closing-bracket nil + "*Controls whether a newline should be inserted before the +closing bracket or not." + :type 'boolean :group 'ruby-electric) + +(define-minor-mode ruby-electric-mode + "Toggle Ruby Electric minor mode. +With no argument, this command toggles the mode. Non-null prefix +argument turns on the mode. Null prefix argument turns off the +mode. + +When Ruby Electric mode is enabled, an indented 'end' is +heuristicaly inserted whenever typing a word like 'module', +'class', 'def', 'if', 'unless', 'case', 'until', 'for', 'begin', +'do'. Simple, double and back quotes as well as braces are paired +auto-magically. Expansion does not occur inside comments and +strings. Note that you must have Font Lock enabled." + ;; initial value. + nil + ;;indicator for the mode line. + " REl" + ;;keymap + ruby-mode-map + (ruby-electric-setup-keymap)) + +(defun ruby-electric-setup-keymap() + (define-key ruby-mode-map " " 'ruby-electric-space) + (define-key ruby-mode-map "{" 'ruby-electric-curlies) + (define-key ruby-mode-map "(" 'ruby-electric-matching-char) + (define-key ruby-mode-map "[" 'ruby-electric-matching-char) + (define-key ruby-mode-map "\"" 'ruby-electric-matching-char) + (define-key ruby-mode-map "\'" 'ruby-electric-matching-char) + (define-key ruby-mode-map "|" 'ruby-electric-bar)) + +(defun ruby-electric-space (arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (if (ruby-electric-space-can-be-expanded-p) + (save-excursion + (ruby-indent-line t) + (newline) + (ruby-insert-end)))) + +(defun ruby-electric-code-at-point-p() + (and ruby-electric-mode + (let* ((properties (text-properties-at (point)))) + (and (null (memq 'font-lock-string-face properties)) + (null (memq 'font-lock-comment-face properties)))))) + +(defun ruby-electric-string-at-point-p() + (and ruby-electric-mode + (consp (memq 'font-lock-string-face (text-properties-at (point)))))) + +(defun ruby-electric-is-last-command-char-expandable-punct-p() + (or (memq 'all ruby-electric-expand-delimiters-list) + (memq last-command-char ruby-electric-expand-delimiters-list))) + +(defun ruby-electric-space-can-be-expanded-p() + (if (ruby-electric-code-at-point-p) + (let* ((ruby-electric-keywords-re + (concat ruby-electric-simple-keywords-re "\\s-$")) + (ruby-electric-single-keyword-in-line-re + (concat "\\s-*" ruby-electric-keywords-re))) + (save-excursion + (backward-word 1) + (or (looking-at ruby-electric-expandable-do-re) + (and (looking-at ruby-electric-keywords-re) + (not (string= "do" (match-string 1))) + (progn + (beginning-of-line) + (looking-at ruby-electric-single-keyword-in-line-re)))))))) + + +(defun ruby-electric-curlies(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (if (ruby-electric-is-last-command-char-expandable-punct-p) + (cond ((ruby-electric-code-at-point-p) + (insert " ") + (save-excursion + (if ruby-electric-newline-before-closing-bracket + (newline)) + (insert "}"))) + ((ruby-electric-string-at-point-p) + (save-excursion + (backward-char 1) + (when (char-equal ?\# (preceding-char)) + (forward-char 1) + (insert "}"))))))) + +(defun ruby-electric-matching-char(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (and (ruby-electric-is-last-command-char-expandable-punct-p) + (ruby-electric-code-at-point-p) + (save-excursion + (insert (cdr (assoc last-command-char + ruby-electric-matching-delimeter-alist)))))) + +(defun ruby-electric-bar(arg) + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + (and (ruby-electric-is-last-command-char-expandable-punct-p) + (ruby-electric-code-at-point-p) + (and (save-excursion (re-search-backward ruby-electric-expandable-bar nil t)) + (= (point) (match-end 0))) ;looking-back is missing on XEmacs + (save-excursion + (insert "|")))) + + +(provide 'ruby-electric) diff --git a/lib/ruby-1.9.1-rc1/misc/ruby-mode.el b/lib/ruby-1.9.1-rc1/misc/ruby-mode.el new file mode 100644 index 0000000..dc701de --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/ruby-mode.el @@ -0,0 +1,1420 @@ +;;; ruby-mode.el --- Major mode for editing Ruby files + +;; Copyright (C) 1994, 1995, 1996 1997, 1998, 1999, 2000, 2001, +;; 2002,2003, 2004, 2005, 2006, 2007, 2008 +;; Free Software Foundation, Inc. + +;; Authors: Yukihiro Matsumoto, Nobuyoshi Nakada +;; URL: http://www.emacswiki.org/cgi-bin/wiki/RubyMode +;; Created: Fri Feb 4 14:49:13 JST 1994 +;; Keywords: languages ruby +;; Version: 0.9 + +;; This file is not part of GNU Emacs. However, a newer version of +;; ruby-mode is included in recent releases of GNU Emacs (version 23 +;; and up), but the new version is not guaranteed to be compatible +;; with older versions of Emacs or XEmacs. This file is the last +;; version that aims to keep this compatibility. + +;; You can also get the latest version from the Emacs Lisp Package +;; Archive: http://tromey.com/elpa + +;; This file is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; It is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with it. If not, see . + +;;; Commentary: + +;; Provides font-locking, indentation support, and navigation for Ruby code. +;; +;; If you're installing manually, you should add this to your .emacs +;; file after putting it on your load path: +;; +;; (autoload 'ruby-mode "ruby-mode" "Major mode for ruby files" t) +;; (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode)) +;; (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) +;; + +;;; Code: + +(defconst ruby-mode-revision "$Revision: 21019 $" + "Ruby mode revision string.") + +(defconst ruby-mode-version + (and (string-match "[0-9.]+" ruby-mode-revision) + (substring ruby-mode-revision (match-beginning 0) (match-end 0))) + "Ruby mode version number.") + +(defconst ruby-keyword-end-re + (if (string-match "\\_>" "ruby") + "\\_>" + "\\>")) + +(defconst ruby-block-beg-keywords + '("class" "module" "def" "if" "unless" "case" "while" "until" "for" "begin" "do") + "Keywords at the beginning of blocks.") + +(defconst ruby-block-beg-re + (regexp-opt ruby-block-beg-keywords) + "Regexp to match the beginning of blocks.") + +(defconst ruby-non-block-do-re + (concat (regexp-opt '("while" "until" "for" "rescue") t) ruby-keyword-end-re) + "Regexp to match") + +(defconst ruby-indent-beg-re + (concat "\\(\\s *" (regexp-opt '("class" "module" "def") t) "\\)" + (regexp-opt '("if" "unless" "case" "while" "until" "for" "begin"))) + "Regexp to match where the indentation gets deeper.") + +(defconst ruby-modifier-beg-keywords + '("if" "unless" "while" "until") + "Modifiers that are the same as the beginning of blocks.") + +(defconst ruby-modifier-beg-re + (regexp-opt ruby-modifier-beg-keywords) + "Regexp to match modifiers same as the beginning of blocks.") + +(defconst ruby-modifier-re + (regexp-opt (cons "rescue" ruby-modifier-beg-keywords)) + "Regexp to match modifiers.") + +(defconst ruby-block-mid-keywords + '("then" "else" "elsif" "when" "rescue" "ensure") + "Keywords where the indentation gets shallower in middle of block statements.") + +(defconst ruby-block-mid-re + (regexp-opt ruby-block-mid-keywords) + "Regexp to match where the indentation gets shallower in middle of block statements.") + +(defconst ruby-block-op-keywords + '("and" "or" "not") + "Block operators.") + +(defconst ruby-block-hanging-re + (regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords)) + "Regexp to match hanging block modifiers.") + +(defconst ruby-block-end-re "\\") + +(defconst ruby-here-doc-beg-re + "\\(<\\)<\\(-\\)?\\(\\([a-zA-Z0-9_]+\\)\\|[\"]\\([^\"]+\\)[\"]\\|[']\\([^']+\\)[']\\)") + +(defconst ruby-here-doc-end-re + "^\\([ \t]+\\)?\\(.*\\)\\(.\\)$") + +(defun ruby-here-doc-end-match () + (concat "^" + (if (match-string 2) "[ \t]*" nil) + (regexp-quote + (or (match-string 4) + (match-string 5) + (match-string 6))))) + +(defun ruby-here-doc-beg-match () + (let ((contents (regexp-quote (concat (match-string 2) (match-string 3))))) + (concat "<<" + (let ((match (match-string 1))) + (if (and match (> (length match) 0)) + (concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" (match-string 1) "\\)" + contents "\\b\\(\\1\\|\\2\\)") + (concat "-?\\([\"']\\|\\)" contents "\\b\\1")))))) + +(defconst ruby-delimiter + (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\(" + ruby-block-beg-re + "\\)\\>\\|" ruby-block-end-re + "\\|^=begin\\|" ruby-here-doc-beg-re) + ) + +(defconst ruby-negative + (concat "^[ \t]*\\(\\(" ruby-block-mid-re "\\)\\>\\|" + ruby-block-end-re "\\|}\\|\\]\\)") + "Regexp to match where the indentation gets shallower.") + +(defconst ruby-operator-chars "-,.+*/%&|^~=<>:") +(defconst ruby-operator-re (concat "[" ruby-operator-chars "]")) + +(defconst ruby-symbol-chars "a-zA-Z0-9_") +(defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]")) + +(defvar ruby-mode-abbrev-table nil + "Abbrev table in use in ruby-mode buffers.") + +(define-abbrev-table 'ruby-mode-abbrev-table ()) + +(defvar ruby-mode-map nil "Keymap used in ruby mode.") + +(if ruby-mode-map + nil + (setq ruby-mode-map (make-sparse-keymap)) + (define-key ruby-mode-map "{" 'ruby-electric-brace) + (define-key ruby-mode-map "}" 'ruby-electric-brace) + (define-key ruby-mode-map "\e\C-a" 'ruby-beginning-of-defun) + (define-key ruby-mode-map "\e\C-e" 'ruby-end-of-defun) + (define-key ruby-mode-map "\e\C-b" 'ruby-backward-sexp) + (define-key ruby-mode-map "\e\C-f" 'ruby-forward-sexp) + (define-key ruby-mode-map "\e\C-p" 'ruby-beginning-of-block) + (define-key ruby-mode-map "\e\C-n" 'ruby-end-of-block) + (define-key ruby-mode-map "\e\C-h" 'ruby-mark-defun) + (define-key ruby-mode-map "\e\C-q" 'ruby-indent-exp) + (define-key ruby-mode-map "\t" 'ruby-indent-command) + (define-key ruby-mode-map "\C-c\C-e" 'ruby-insert-end) + (define-key ruby-mode-map "\C-j" 'ruby-reindent-then-newline-and-indent) + (define-key ruby-mode-map "\C-m" 'newline)) + +(defvar ruby-mode-syntax-table nil + "Syntax table in use in ruby-mode buffers.") + +(if ruby-mode-syntax-table + () + (setq ruby-mode-syntax-table (make-syntax-table)) + (modify-syntax-entry ?\' "\"" ruby-mode-syntax-table) + (modify-syntax-entry ?\" "\"" ruby-mode-syntax-table) + (modify-syntax-entry ?\` "\"" ruby-mode-syntax-table) + (modify-syntax-entry ?# "<" ruby-mode-syntax-table) + (modify-syntax-entry ?\n ">" ruby-mode-syntax-table) + (modify-syntax-entry ?\\ "\\" ruby-mode-syntax-table) + (modify-syntax-entry ?$ "." ruby-mode-syntax-table) + (modify-syntax-entry ?? "_" ruby-mode-syntax-table) + (modify-syntax-entry ?_ "_" ruby-mode-syntax-table) + (modify-syntax-entry ?< "." ruby-mode-syntax-table) + (modify-syntax-entry ?> "." ruby-mode-syntax-table) + (modify-syntax-entry ?& "." ruby-mode-syntax-table) + (modify-syntax-entry ?| "." ruby-mode-syntax-table) + (modify-syntax-entry ?% "." ruby-mode-syntax-table) + (modify-syntax-entry ?= "." ruby-mode-syntax-table) + (modify-syntax-entry ?/ "." ruby-mode-syntax-table) + (modify-syntax-entry ?+ "." ruby-mode-syntax-table) + (modify-syntax-entry ?* "." ruby-mode-syntax-table) + (modify-syntax-entry ?- "." ruby-mode-syntax-table) + (modify-syntax-entry ?\; "." ruby-mode-syntax-table) + (modify-syntax-entry ?\( "()" ruby-mode-syntax-table) + (modify-syntax-entry ?\) ")(" ruby-mode-syntax-table) + (modify-syntax-entry ?\{ "(}" ruby-mode-syntax-table) + (modify-syntax-entry ?\} "){" ruby-mode-syntax-table) + (modify-syntax-entry ?\[ "(]" ruby-mode-syntax-table) + (modify-syntax-entry ?\] ")[" ruby-mode-syntax-table) + ) + +(defcustom ruby-indent-tabs-mode nil + "*Indentation can insert tabs in ruby mode if this is non-nil." + :type 'boolean :group 'ruby) +(put 'ruby-indent-tabs-mode 'safe-local-variable 'booleanp) + +(defcustom ruby-indent-level 2 + "*Indentation of ruby statements." + :type 'integer :group 'ruby) +(put 'ruby-indent-level 'safe-local-variable 'integerp) + +(defcustom ruby-comment-column 32 + "*Indentation column of comments." + :type 'integer :group 'ruby) +(put 'ruby-comment-column 'safe-local-variable 'integerp) + +(defcustom ruby-deep-arglist t + "*Deep indent lists in parenthesis when non-nil. +Also ignores spaces after parenthesis when 'space." + :group 'ruby) +(put 'ruby-deep-arglist 'safe-local-variable 'booleanp) + +(defcustom ruby-deep-indent-paren '(?\( ?\[ ?\] t) + "*Deep indent lists in parenthesis when non-nil. t means continuous line. +Also ignores spaces after parenthesis when 'space." + :group 'ruby) + +(defcustom ruby-deep-indent-paren-style 'space + "Default deep indent style." + :options '(t nil space) :group 'ruby) + +(defcustom ruby-encoding-map '((shift_jis . cp932) (shift-jis . cp932)) + "Alist to map encoding name from emacs to ruby." + :group 'ruby) + +(defcustom ruby-use-encoding-map t + "*Use `ruby-encoding-map' to set encoding magic comment if this is non-nil." + :type 'boolean :group 'ruby) + +(eval-when-compile (require 'cl)) +(defun ruby-imenu-create-index-in-block (prefix beg end) + (let ((index-alist '()) (case-fold-search nil) + name next pos decl sing) + (goto-char beg) + (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^\(\n ]+\\)\\)" end t) + (setq sing (match-beginning 3)) + (setq decl (match-string 5)) + (setq next (match-end 0)) + (setq name (or (match-string 4) (match-string 6))) + (setq pos (match-beginning 0)) + (cond + ((string= "alias" decl) + (if prefix (setq name (concat prefix name))) + (push (cons name pos) index-alist)) + ((string= "def" decl) + (if prefix + (setq name + (cond + ((string-match "^self\." name) + (concat (substring prefix 0 -1) (substring name 4))) + (t (concat prefix name))))) + (push (cons name pos) index-alist) + (ruby-accurate-end-of-block end)) + (t + (if (string= "self" name) + (if prefix (setq name (substring prefix 0 -1))) + (if prefix (setq name (concat (substring prefix 0 -1) "::" name))) + (push (cons name pos) index-alist)) + (ruby-accurate-end-of-block end) + (setq beg (point)) + (setq index-alist + (nconc (ruby-imenu-create-index-in-block + (concat name (if sing "." "#")) + next beg) index-alist)) + (goto-char beg)))) + index-alist)) + +(defun ruby-imenu-create-index () + (nreverse (ruby-imenu-create-index-in-block nil (point-min) nil))) + +(defun ruby-accurate-end-of-block (&optional end) + (let (state) + (or end (setq end (point-max))) + (while (and (setq state (apply 'ruby-parse-partial end state)) + (>= (nth 2 state) 0) (< (point) end))))) + +(defun ruby-mode-variables () + (set-syntax-table ruby-mode-syntax-table) + (setq local-abbrev-table ruby-mode-abbrev-table) + (make-local-variable 'indent-line-function) + (setq indent-line-function 'ruby-indent-line) + (make-local-variable 'require-final-newline) + (setq require-final-newline t) + (make-variable-buffer-local 'comment-start) + (setq comment-start "# ") + (make-variable-buffer-local 'comment-end) + (setq comment-end "") + (make-variable-buffer-local 'comment-column) + (setq comment-column ruby-comment-column) + (make-variable-buffer-local 'comment-start-skip) + (setq comment-start-skip "#+ *") + (setq indent-tabs-mode ruby-indent-tabs-mode) + (make-local-variable 'parse-sexp-ignore-comments) + (setq parse-sexp-ignore-comments t) + (make-local-variable 'parse-sexp-lookup-properties) + (setq parse-sexp-lookup-properties t) + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "$\\|" page-delimiter)) + (make-local-variable 'paragraph-separate) + (setq paragraph-separate paragraph-start) + (make-local-variable 'paragraph-ignore-fill-prefix) + (setq paragraph-ignore-fill-prefix t)) + +(defun ruby-mode-set-encoding () + (save-excursion + (widen) + (goto-char (point-min)) + (when (re-search-forward "[^\0-\177]" nil t) + (goto-char (point-min)) + (let ((coding-system + (or coding-system-for-write + buffer-file-coding-system))) + (if coding-system + (setq coding-system + (or (coding-system-get coding-system 'mime-charset) + (coding-system-change-eol-conversion coding-system nil)))) + (setq coding-system + (if coding-system + (symbol-name + (or (and ruby-use-encoding-map + (cdr (assq coding-system ruby-encoding-map))) + coding-system)) + "ascii-8bit")) + (if (looking-at "^#![^\n]*ruby") (beginning-of-line 2)) + (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") + (unless (string= (match-string 2) coding-system) + (goto-char (match-beginning 2)) + (delete-region (point) (match-end 2)) + (and (looking-at "-\*-") + (let ((n (skip-chars-backward " "))) + (cond ((= n 0) (insert " ") (backward-char)) + ((= n -1) (insert " ")) + ((forward-char))))) + (insert coding-system))) + ((looking-at "\\s *#.*coding\\s *[:=]")) + (t (insert "# -*- coding: " coding-system " -*-\n")) + ))))) + +;;;###autoload +(defun ruby-mode () + "Major mode for editing ruby scripts. +\\[ruby-indent-command] properly indents subexpressions of multi-line +class, module, def, if, while, for, do, and case statements, taking +nesting into account. + +The variable ruby-indent-level controls the amount of indentation. +\\{ruby-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map ruby-mode-map) + (setq mode-name "Ruby") + (setq major-mode 'ruby-mode) + (ruby-mode-variables) + + (make-local-variable 'imenu-create-index-function) + (setq imenu-create-index-function 'ruby-imenu-create-index) + + (make-local-variable 'add-log-current-defun-function) + (setq add-log-current-defun-function 'ruby-add-log-current-method) + + (add-hook + (cond ((boundp 'before-save-hook) + (make-local-variable 'before-save-hook) + 'before-save-hook) + ((boundp 'write-contents-functions) 'write-contents-functions) + ((boundp 'write-contents-hooks) 'write-contents-hooks)) + 'ruby-mode-set-encoding) + + (set (make-local-variable 'font-lock-defaults) '((ruby-font-lock-keywords) nil nil)) + (set (make-local-variable 'font-lock-keywords) ruby-font-lock-keywords) + (set (make-local-variable 'font-lock-syntax-table) ruby-font-lock-syntax-table) + (set (make-local-variable 'font-lock-syntactic-keywords) ruby-font-lock-syntactic-keywords) + + (if (fboundp 'run-mode-hooks) + (run-mode-hooks 'ruby-mode-hook) + (run-hooks 'ruby-mode-hook))) + +(defun ruby-current-indentation () + (save-excursion + (beginning-of-line) + (back-to-indentation) + (current-column))) + +(defun ruby-indent-line (&optional flag) + "Correct indentation of the current ruby line." + (ruby-indent-to (ruby-calculate-indent))) + +(defun ruby-indent-command () + (interactive) + (ruby-indent-line t)) + +(defun ruby-indent-to (x) + (if x + (let (shift top beg) + (and (< x 0) (error "invalid nest")) + (setq shift (current-column)) + (beginning-of-line) + (setq beg (point)) + (back-to-indentation) + (setq top (current-column)) + (skip-chars-backward " \t") + (if (>= shift top) (setq shift (- shift top)) + (setq shift 0)) + (if (and (bolp) + (= x top)) + (move-to-column (+ x shift)) + (move-to-column top) + (delete-region beg (point)) + (beginning-of-line) + (indent-to x) + (move-to-column (+ x shift)))))) + +(defun ruby-special-char-p (&optional pnt) + (setq pnt (or pnt (point))) + (let ((c (char-before pnt)) (b (and (< (point-min) pnt) (char-before (1- pnt))))) + (cond ((or (eq c ??) (eq c ?$))) + ((and (eq c ?:) (or (not b) (eq (char-syntax b) ? )))) + ((eq c ?\\) (eq b ??))))) + +(defun ruby-expr-beg (&optional option) + (save-excursion + (store-match-data nil) + (let ((space (skip-chars-backward " \t")) + (start (point))) + (cond + ((bolp) t) + ((progn + (forward-char -1) + (and (looking-at "\\?") + (or (eq (char-syntax (char-before (point))) ?w) + (ruby-special-char-p)))) + nil) + ((and (eq option 'heredoc) (< space 0)) t) + ((or (looking-at ruby-operator-re) + (looking-at "[\\[({,;]") + (and (looking-at "[!?]") + (or (not (eq option 'modifier)) + (bolp) + (save-excursion (forward-char -1) (looking-at "\\Sw$")))) + (and (looking-at ruby-symbol-re) + (skip-chars-backward ruby-symbol-chars) + (cond + ((looking-at (regexp-opt + (append ruby-block-beg-keywords + ruby-block-op-keywords + ruby-block-mid-keywords) + 'words)) + (goto-char (match-end 0)) + (not (looking-at "\\s_"))) + ((eq option 'expr-qstr) + (looking-at "[a-zA-Z][a-zA-z0-9_]* +%[^ \t]")) + ((eq option 'expr-re) + (looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]")) + (t nil))))))))) + +(defun ruby-forward-string (term &optional end no-error expand) + (let ((n 1) (c (string-to-char term)) + (re (if expand + (concat "[^\\]\\(\\\\\\\\\\)*\\([" term "]\\|\\(#{\\)\\)") + (concat "[^\\]\\(\\\\\\\\\\)*[" term "]")))) + (while (and (re-search-forward re end no-error) + (if (match-beginning 3) + (ruby-forward-string "}{" end no-error nil) + (> (setq n (if (eq (char-before (point)) c) + (1- n) (1+ n))) 0))) + (forward-char -1)) + (cond ((zerop n)) + (no-error nil) + ((error "unterminated string"))))) + +(defun ruby-deep-indent-paren-p (c) + (cond ((listp ruby-deep-indent-paren) + (let ((deep (assoc c ruby-deep-indent-paren))) + (cond (deep + (or (cdr deep) ruby-deep-indent-paren-style)) + ((memq c ruby-deep-indent-paren) + ruby-deep-indent-paren-style)))) + ((eq c ruby-deep-indent-paren) ruby-deep-indent-paren-style) + ((eq c ?\( ) ruby-deep-arglist))) + +(defun ruby-parse-partial (&optional end in-string nest depth pcol indent) + (or depth (setq depth 0)) + (or indent (setq indent 0)) + (when (re-search-forward ruby-delimiter end 'move) + (let ((pnt (point)) w re expand) + (goto-char (match-beginning 0)) + (cond + ((and (memq (char-before) '(?@ ?$)) (looking-at "\\sw")) + (goto-char pnt)) + ((looking-at "[\"`]") ;skip string + (cond + ((and (not (eobp)) + (ruby-forward-string (buffer-substring (point) (1+ (point))) end t t)) + nil) + (t + (setq in-string (point)) + (goto-char end)))) + ((looking-at "'") + (cond + ((and (not (eobp)) + (re-search-forward "[^\\]\\(\\\\\\\\\\)*'" end t)) + nil) + (t + (setq in-string (point)) + (goto-char end)))) + ((looking-at "/=") + (goto-char pnt)) + ((looking-at "/") + (cond + ((and (not (eobp)) (ruby-expr-beg 'expr-re)) + (if (ruby-forward-string "/" end t t) + nil + (setq in-string (point)) + (goto-char end))) + (t + (goto-char pnt)))) + ((looking-at "%") + (cond + ((and (not (eobp)) + (ruby-expr-beg 'expr-qstr) + (not (looking-at "%=")) + (looking-at "%[QqrxWw]?\\([^a-zA-Z0-9 \t\n]\\)")) + (goto-char (match-beginning 1)) + (setq expand (not (memq (char-before) '(?q ?w)))) + (setq w (match-string 1)) + (cond + ((string= w "[") (setq re "][")) + ((string= w "{") (setq re "}{")) + ((string= w "(") (setq re ")(")) + ((string= w "<") (setq re "><")) + ((and expand (string= w "\\")) + (setq w (concat "\\" w)))) + (unless (cond (re (ruby-forward-string re end t expand)) + (expand (ruby-forward-string w end t t)) + (t (re-search-forward + (if (string= w "\\") + "\\\\[^\\]*\\\\" + (concat "[^\\]\\(\\\\\\\\\\)*" w)) + end t))) + (setq in-string (point)) + (goto-char end))) + (t + (goto-char pnt)))) + ((looking-at "\\?") ;skip ?char + (cond + ((and (ruby-expr-beg) + (looking-at "?\\(\\\\C-\\|\\\\M-\\)*\\\\?.")) + (goto-char (match-end 0))) + (t + (goto-char pnt)))) + ((looking-at "\\$") ;skip $char + (goto-char pnt) + (forward-char 1)) + ((looking-at "#") ;skip comment + (forward-line 1) + (goto-char (point)) + ) + ((looking-at "[\\[{(]") + (let ((deep (ruby-deep-indent-paren-p (char-after)))) + (if (and deep (or (not (eq (char-after) ?\{)) (ruby-expr-beg))) + (progn + (and (eq deep 'space) (looking-at ".\\s +[^# \t\n]") + (setq pnt (1- (match-end 0)))) + (setq nest (cons (cons (char-after (point)) pnt) nest)) + (setq pcol (cons (cons pnt depth) pcol)) + (setq depth 0)) + (setq nest (cons (cons (char-after (point)) pnt) nest)) + (setq depth (1+ depth)))) + (goto-char pnt) + ) + ((looking-at "[])}]") + (if (ruby-deep-indent-paren-p (matching-paren (char-after))) + (setq depth (cdr (car pcol)) pcol (cdr pcol)) + (setq depth (1- depth))) + (setq nest (cdr nest)) + (goto-char pnt)) + ((looking-at ruby-block-end-re) + (if (or (and (not (bolp)) + (progn + (forward-char -1) + (setq w (char-after (point))) + (or (eq ?_ w) + (eq ?. w)))) + (progn + (goto-char pnt) + (setq w (char-after (point))) + (or (eq ?_ w) + (eq ?! w) + (eq ?? w)))) + nil + (setq nest (cdr nest)) + (setq depth (1- depth))) + (goto-char pnt)) + ((looking-at "def\\s +[^(\n;]*") + (if (or (bolp) + (progn + (forward-char -1) + (not (eq ?_ (char-after (point)))))) + (progn + (setq nest (cons (cons nil pnt) nest)) + (setq depth (1+ depth)))) + (goto-char (match-end 0))) + ((looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>")) + (and + (save-match-data + (or (not (looking-at (concat "do" ruby-keyword-end-re))) + (save-excursion + (back-to-indentation) + (not (looking-at ruby-non-block-do-re))))) + (or (bolp) + (progn + (forward-char -1) + (setq w (char-after (point))) + (not (or (eq ?_ w) + (eq ?. w))))) + (goto-char pnt) + (setq w (char-after (point))) + (not (eq ?_ w)) + (not (eq ?! w)) + (not (eq ?? w)) + (skip-chars-forward " \t") + (goto-char (match-beginning 0)) + (or (not (looking-at ruby-modifier-re)) + (ruby-expr-beg 'modifier)) + (goto-char pnt) + (setq nest (cons (cons nil pnt) nest)) + (setq depth (1+ depth))) + (goto-char pnt)) + ((looking-at ":\\(['\"]\\)") + (goto-char (match-beginning 1)) + (ruby-forward-string (buffer-substring (match-beginning 1) (match-end 1)) end)) + ((looking-at ":\\([-,.+*/%&|^~<>]=?\\|===?\\|<=>\\)") + (goto-char (match-end 0))) + ((looking-at ":\\([a-zA-Z_][a-zA-Z_0-9]*[!?=]?\\)?") + (goto-char (match-end 0))) + ((or (looking-at "\\.\\.\\.?") + (looking-at "\\.[0-9]+") + (looking-at "\\.[a-zA-Z_0-9]+") + (looking-at "\\.")) + (goto-char (match-end 0))) + ((looking-at "^=begin") + (if (re-search-forward "^=end" end t) + (forward-line 1) + (setq in-string (match-end 0)) + (goto-char end))) + ((looking-at "<<") + (cond + ((and (ruby-expr-beg 'heredoc) + (looking-at "<<\\(-\\)?\\(\\([\"'`]\\)\\([^\n]+?\\)\\3\\|\\(?:\\sw\\|\\s_\\)+\\)")) + (setq re (regexp-quote (or (match-string 4) (match-string 2)))) + (if (match-beginning 1) (setq re (concat "\\s *" re))) + (let* ((id-end (goto-char (match-end 0))) + (line-end-position (save-excursion (end-of-line) (point))) + (state (list in-string nest depth pcol indent))) + ;; parse the rest of the line + (while (and (> line-end-position (point)) + (setq state (apply 'ruby-parse-partial + line-end-position state)))) + (setq in-string (car state) + nest (nth 1 state) + depth (nth 2 state) + pcol (nth 3 state) + indent (nth 4 state)) + ;; skip heredoc section + (if (re-search-forward (concat "^" re "$") end 'move) + (forward-line 1) + (setq in-string id-end) + (goto-char end)))) + (t + (goto-char pnt)))) + ((looking-at "^__END__$") + (goto-char pnt)) + ((looking-at ruby-here-doc-beg-re) + (if (re-search-forward (ruby-here-doc-end-match) + indent-point t) + (forward-line 1) + (setq in-string (match-end 0)) + (goto-char indent-point))) + (t + (error (format "bad string %s" + (buffer-substring (point) pnt) + )))))) + (list in-string nest depth pcol)) + +(defun ruby-parse-region (start end) + (let (state) + (save-excursion + (if start + (goto-char start) + (ruby-beginning-of-indent)) + (save-restriction + (narrow-to-region (point) end) + (while (and (> end (point)) + (setq state (apply 'ruby-parse-partial end state)))))) + (list (nth 0 state) ; in-string + (car (nth 1 state)) ; nest + (nth 2 state) ; depth + (car (car (nth 3 state))) ; pcol + ;(car (nth 5 state)) ; indent + ))) + +(defun ruby-indent-size (pos nest) + (+ pos (* (or nest 1) ruby-indent-level))) + +(defun ruby-calculate-indent (&optional parse-start) + (save-excursion + (beginning-of-line) + (let ((indent-point (point)) + (case-fold-search nil) + state bol eol begin op-end + (paren (progn (skip-syntax-forward " ") + (and (char-after) (matching-paren (char-after))))) + (indent 0)) + (if parse-start + (goto-char parse-start) + (ruby-beginning-of-indent) + (setq parse-start (point))) + (back-to-indentation) + (setq indent (current-column)) + (setq state (ruby-parse-region parse-start indent-point)) + (cond + ((nth 0 state) ; within string + (setq indent nil)) ; do nothing + ((car (nth 1 state)) ; in paren + (goto-char (setq begin (cdr (nth 1 state)))) + (let ((deep (ruby-deep-indent-paren-p (car (nth 1 state))))) + (if deep + (cond ((and (eq deep t) (eq (car (nth 1 state)) paren)) + (skip-syntax-backward " ") + (setq indent (1- (current-column)))) + ((let ((s (ruby-parse-region (point) indent-point))) + (and (nth 2 s) (> (nth 2 s) 0) + (or (goto-char (cdr (nth 1 s))) t))) + (forward-word -1) + (setq indent (ruby-indent-size (current-column) (nth 2 state)))) + (t + (setq indent (current-column)) + (cond ((eq deep 'space)) + (paren (setq indent (1- indent))) + (t (setq indent (ruby-indent-size (1- indent) 1)))))) + (if (nth 3 state) (goto-char (nth 3 state)) + (goto-char parse-start) (back-to-indentation)) + (setq indent (ruby-indent-size (current-column) (nth 2 state)))) + (and (eq (car (nth 1 state)) paren) + (ruby-deep-indent-paren-p (matching-paren paren)) + (search-backward (char-to-string paren)) + (setq indent (current-column))))) + ((and (nth 2 state) (> (nth 2 state) 0)) ; in nest + (if (null (cdr (nth 1 state))) + (error "invalid nest")) + (goto-char (cdr (nth 1 state))) + (forward-word -1) ; skip back a keyword + (setq begin (point)) + (cond + ((looking-at "do\\>[^_]") ; iter block is a special case + (if (nth 3 state) (goto-char (nth 3 state)) + (goto-char parse-start) (back-to-indentation)) + (setq indent (ruby-indent-size (current-column) (nth 2 state)))) + (t + (setq indent (+ (current-column) ruby-indent-level))))) + + ((and (nth 2 state) (< (nth 2 state) 0)) ; in negative nest + (setq indent (ruby-indent-size (current-column) (nth 2 state))))) + (when indent + (goto-char indent-point) + (end-of-line) + (setq eol (point)) + (beginning-of-line) + (cond + ((and (not (ruby-deep-indent-paren-p paren)) + (re-search-forward ruby-negative eol t)) + (and (not (eq ?_ (char-after (match-end 0)))) + (setq indent (- indent ruby-indent-level)))) + ((and + (save-excursion + (beginning-of-line) + (not (bobp))) + (or (ruby-deep-indent-paren-p t) + (null (car (nth 1 state))))) + ;; goto beginning of non-empty no-comment line + (let (end done) + (while (not done) + (skip-chars-backward " \t\n") + (setq end (point)) + (beginning-of-line) + (if (re-search-forward "^\\s *#" end t) + (beginning-of-line) + (setq done t)))) + (setq bol (point)) + (end-of-line) + ;; skip the comment at the end + (skip-chars-backward " \t") + (let (end (pos (point))) + (beginning-of-line) + (while (and (re-search-forward "#" pos t) + (setq end (1- (point))) + (or (ruby-special-char-p end) + (and (setq state (ruby-parse-region parse-start end)) + (nth 0 state)))) + (setq end nil)) + (goto-char (or end pos)) + (skip-chars-backward " \t") + (setq begin (if (and end (nth 0 state)) pos (cdr (nth 1 state)))) + (setq state (ruby-parse-region parse-start (point)))) + (or (bobp) (forward-char -1)) + (and + (or (and (looking-at ruby-symbol-re) + (skip-chars-backward ruby-symbol-chars) + (looking-at (concat "\\<\\(" ruby-block-hanging-re "\\)\\>")) + (not (eq (point) (nth 3 state))) + (save-excursion + (goto-char (match-end 0)) + (not (looking-at "[a-z_]")))) + (and (looking-at ruby-operator-re) + (not (ruby-special-char-p)) + ;; operator at the end of line + (let ((c (char-after (point)))) + (and +;; (or (null begin) +;; (save-excursion +;; (goto-char begin) +;; (skip-chars-forward " \t") +;; (not (or (eolp) (looking-at "#") +;; (and (eq (car (nth 1 state)) ?{) +;; (looking-at "|")))))) + (or (not (eq ?/ c)) + (null (nth 0 (ruby-parse-region (or begin parse-start) (point))))) + (or (not (eq ?| (char-after (point)))) + (save-excursion + (or (eolp) (forward-char -1)) + (cond + ((search-backward "|" nil t) + (skip-chars-backward " \t\n") + (and (not (eolp)) + (progn + (forward-char -1) + (not (looking-at "{"))) + (progn + (forward-word -1) + (not (looking-at "do\\>[^_]"))))) + (t t)))) + (not (eq ?, c)) + (setq op-end t))))) + (setq indent + (cond + ((and + (null op-end) + (not (looking-at (concat "\\<\\(" ruby-block-hanging-re "\\)\\>"))) + (eq (ruby-deep-indent-paren-p t) 'space) + (not (bobp))) + (widen) + (goto-char (or begin parse-start)) + (skip-syntax-forward " ") + (current-column)) + ((car (nth 1 state)) indent) + (t + (+ indent ruby-indent-level)))))))) + (goto-char indent-point) + (beginning-of-line) + (skip-syntax-forward " ") + (if (looking-at "\\.[^.]") + (+ indent ruby-indent-level) + indent)))) + +(defun ruby-electric-brace (arg) + (interactive "P") + (insert-char last-command-char 1) + (ruby-indent-line t) + (delete-char -1) + (self-insert-command (prefix-numeric-value arg))) + +(eval-when-compile + (defmacro defun-region-command (func args &rest body) + (let ((intr (car body))) + (when (featurep 'xemacs) + (if (stringp intr) (setq intr (cadr body))) + (and (eq (car intr) 'interactive) + (setq intr (cdr intr)) + (setcar intr (concat "_" (car intr))))) + (cons 'defun (cons func (cons args body)))))) + +(defun-region-command ruby-beginning-of-defun (&optional arg) + "Move backward to next beginning-of-defun. +With argument, do this that many times. +Returns t unless search stops due to end of buffer." + (interactive "p") + (and (re-search-backward (concat "^\\(" ruby-block-beg-re "\\)\\b") + nil 'move (or arg 1)) + (progn (beginning-of-line) t))) + +(defun ruby-beginning-of-indent () + (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") + nil 'move) + (progn + (beginning-of-line) + t))) + +(defun-region-command ruby-end-of-defun (&optional arg) + "Move forward to next end of defun. +An end of a defun is found by moving forward from the beginning of one." + (interactive "p") + (and (re-search-forward (concat "^\\(" ruby-block-end-re "\\)\\($\\|\\b[^_]\\)") + nil 'move (or arg 1)) + (progn (beginning-of-line) t)) + (forward-line 1)) + +(defun ruby-move-to-block (n) + (let (start pos done down) + (setq start (ruby-calculate-indent)) + (setq down (looking-at (if (< n 0) ruby-block-end-re + (concat "\\<\\(" ruby-block-beg-re "\\)\\>")))) + (while (and (not done) (not (if (< n 0) (bobp) (eobp)))) + (forward-line n) + (cond + ((looking-at "^\\s *$")) + ((looking-at "^\\s *#")) + ((and (> n 0) (looking-at "^=begin\\>")) + (re-search-forward "^=end\\>")) + ((and (< n 0) (looking-at "^=end\\>")) + (re-search-backward "^=begin\\>")) + (t + (setq pos (current-indentation)) + (cond + ((< start pos) + (setq down t)) + ((and down (= pos start)) + (setq done t)) + ((> start pos) + (setq done t))))) + (if done + (save-excursion + (back-to-indentation) + (if (looking-at (concat "\\<\\(" ruby-block-mid-re "\\)\\>")) + (setq done nil)))))) + (back-to-indentation)) + +(defun-region-command ruby-beginning-of-block (&optional arg) + "Move backward to next beginning-of-block" + (interactive "p") + (ruby-move-to-block (- (or arg 1)))) + +(defun-region-command ruby-end-of-block (&optional arg) + "Move forward to next beginning-of-block" + (interactive "p") + (ruby-move-to-block (or arg 1))) + +(defun-region-command ruby-forward-sexp (&optional cnt) + (interactive "p") + (if (and (numberp cnt) (< cnt 0)) + (ruby-backward-sexp (- cnt)) + (let ((i (or cnt 1))) + (condition-case nil + (while (> i 0) + (skip-syntax-forward " ") + (cond ((looking-at "\\?\\(\\\\[CM]-\\)*\\\\?\\S ") + (goto-char (match-end 0))) + ((progn + (skip-chars-forward ",.:;|&^~=!?\\+\\-\\*") + (looking-at "\\s(")) + (goto-char (scan-sexps (point) 1))) + ((and (looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>")) + (not (eq (char-before (point)) ?.)) + (not (eq (char-before (point)) ?:))) + (ruby-end-of-block) + (forward-word 1)) + ((looking-at "\\(\\$\\|@@?\\)?\\sw") + (while (progn + (while (progn (forward-word 1) (looking-at "_"))) + (cond ((looking-at "::") (forward-char 2) t) + ((> (skip-chars-forward ".") 0)) + ((looking-at "\\?\\|!\\(=[~=>]\\|[^~=]\\)") + (forward-char 1) nil))))) + ((let (state expr) + (while + (progn + (setq expr (or expr (ruby-expr-beg) + (looking-at "%\\sw?\\Sw\\|[\"'`/]"))) + (nth 1 (setq state (apply 'ruby-parse-partial nil state)))) + (setq expr t) + (skip-chars-forward "<")) + (not expr)))) + (setq i (1- i))) + ((error) (forward-word 1))) + i))) + +(defun-region-command ruby-backward-sexp (&optional cnt) + (interactive "p") + (if (and (numberp cnt) (< cnt 0)) + (ruby-forward-sexp (- cnt)) + (let ((i (or cnt 1))) + (condition-case nil + (while (> i 0) + (skip-chars-backward " \t\n,.:;|&^~=!?\\+\\-\\*") + (forward-char -1) + (cond ((looking-at "\\s)") + (goto-char (scan-sexps (1+ (point)) -1)) + (case (char-before) + (?% (forward-char -1)) + ('(?q ?Q ?w ?W ?r ?x) + (if (eq (char-before (1- (point))) ?%) (forward-char -2)))) + nil) + ((looking-at "\\s\"\\|\\\\\\S_") + (let ((c (char-to-string (char-before (match-end 0))))) + (while (and (search-backward c) + (oddp (skip-chars-backward "\\"))))) + nil) + ((looking-at "\\s.\\|\\s\\") + (if (ruby-special-char-p) (forward-char -1))) + ((looking-at "\\s(") nil) + (t + (forward-char 1) + (while (progn (forward-word -1) + (case (char-before) + (?_ t) + (?. (forward-char -1) t) + ((?$ ?@) + (forward-char -1) + (and (eq (char-before) (char-after)) (forward-char -1))) + (?: + (forward-char -1) + (eq (char-before) :))))) + (if (looking-at ruby-block-end-re) + (ruby-beginning-of-block)) + nil)) + (setq i (1- i))) + ((error))) + i))) + +(defun ruby-reindent-then-newline-and-indent () + (interactive "*") + (newline) + (save-excursion + (end-of-line 0) + (indent-according-to-mode) + (delete-region (point) (progn (skip-chars-backward " \t") (point)))) + (indent-according-to-mode)) + +(fset 'ruby-encomment-region (symbol-function 'comment-region)) + +(defun ruby-decomment-region (beg end) + (interactive "r") + (save-excursion + (goto-char beg) + (while (re-search-forward "^\\([ \t]*\\)#" end t) + (replace-match "\\1" nil nil) + (save-excursion + (ruby-indent-line))))) + +(defun ruby-insert-end () + (interactive) + (insert "end") + (ruby-indent-line t) + (end-of-line)) + +(defun ruby-mark-defun () + "Put mark at end of this Ruby function, point at beginning." + (interactive) + (push-mark (point)) + (ruby-end-of-defun) + (push-mark (point) nil t) + (ruby-beginning-of-defun) + (re-search-backward "^\n" (- (point) 1) t)) + +(defun ruby-indent-exp (&optional shutup-p) + "Indent each line in the balanced expression following point syntactically. +If optional SHUTUP-P is non-nil, no errors are signalled if no +balanced expression is found." + (interactive "*P") + (let ((here (point-marker)) start top column (nest t)) + (set-marker-insertion-type here t) + (unwind-protect + (progn + (beginning-of-line) + (setq start (point) top (current-indentation)) + (while (and (not (eobp)) + (progn + (setq column (ruby-calculate-indent start)) + (cond ((> column top) + (setq nest t)) + ((and (= column top) nest) + (setq nest nil) t)))) + (ruby-indent-to column) + (beginning-of-line 2))) + (goto-char here) + (set-marker here nil)))) + +(defun ruby-add-log-current-method () + "Return current method string." + (condition-case nil + (save-excursion + (let (mname mlist (indent 0)) + ;; get current method (or class/module) + (if (re-search-backward + (concat "^[ \t]*\\(def\\|class\\|module\\)[ \t]+" + "\\(" + ;; \\. and :: for class method + "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)" + "+\\)") + nil t) + (progn + (setq mname (match-string 2)) + (unless (string-equal "def" (match-string 1)) + (setq mlist (list mname) mname nil)) + (goto-char (match-beginning 1)) + (setq indent (current-column)) + (beginning-of-line))) + ;; nest class/module + (while (and (> indent 0) + (re-search-backward + (concat + "^[ \t]*\\(class\\|module\\)[ \t]+" + "\\([A-Z]" ruby-symbol-re "*\\)") + nil t)) + (goto-char (match-beginning 1)) + (if (< (current-column) indent) + (progn + (setq mlist (cons (match-string 2) mlist)) + (setq indent (current-column)) + (beginning-of-line)))) + (when mname + (let ((mn (split-string mname "\\.\\|::"))) + (if (cdr mn) + (progn + (cond + ((string-equal "" (car mn)) + (setq mn (cdr mn) mlist nil)) + ((string-equal "self" (car mn)) + (setq mn (cdr mn))) + ((let ((ml (nreverse mlist))) + (while ml + (if (string-equal (car ml) (car mn)) + (setq mlist (nreverse (cdr ml)) ml nil)) + (or (setq ml (cdr ml)) (nreverse mlist)))))) + (if mlist + (setcdr (last mlist) mn) + (setq mlist mn)) + (setq mn (last mn 2)) + (setq mname (concat "." (cadr mn))) + (setcdr mn nil)) + (setq mname (concat "#" mname))))) + ;; generate string + (if (consp mlist) + (setq mlist (mapconcat (function identity) mlist "::"))) + (if mname + (if mlist (concat mlist mname) mname) + mlist))))) + +(cond + ((featurep 'font-lock) + (or (boundp 'font-lock-variable-name-face) + (setq font-lock-variable-name-face font-lock-type-face)) + + (setq ruby-font-lock-syntactic-keywords + `( + ;; #{ }, #$hoge, #@foo are not comments + ("\\(#\\)[{$@]" 1 (1 . nil)) + ;; the last $', $", $` in the respective string is not variable + ;; the last ?', ?", ?` in the respective string is not ascii code + ("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)" + (2 (7 . nil)) + (4 (7 . nil))) + ;; $' $" $` .... are variables + ;; ?' ?" ?` are ascii codes + ("\\(^\\|[^\\\\]\\)\\(\\\\\\\\\\)*[?$]\\([#\"'`]\\)" 3 (1 . nil)) + ;; regexps + ("\\(^\\|[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)" + (4 (7 . ?/)) + (6 (7 . ?/))) + ("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil)) + ("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil)) + (,(concat ruby-here-doc-beg-re ".*\\(\n\\)") + ,(+ 1 (regexp-opt-depth ruby-here-doc-beg-re)) + (ruby-here-doc-beg-syntax)) + (,ruby-here-doc-end-re 3 (ruby-here-doc-end-syntax)))) + + (unless (functionp 'syntax-ppss) + (defun syntax-ppss (&optional pos) + (parse-partial-sexp (point-min) (or pos (point))))) + + (defun ruby-in-ppss-context-p (context &optional ppss) + (let ((ppss (or ppss (syntax-ppss (point))))) + (if (cond + ((eq context 'anything) + (or (nth 3 ppss) + (nth 4 ppss))) + ((eq context 'string) + (nth 3 ppss)) + ((eq context 'heredoc) + (and (nth 3 ppss) + ;; If it's generic string, it's a heredoc and we don't care + ;; See `parse-partial-sexp' + (not (numberp (nth 3 ppss))))) + ((eq context 'non-heredoc) + (and (ruby-in-ppss-context-p 'anything) + (not (ruby-in-ppss-context-p 'heredoc)))) + ((eq context 'comment) + (nth 4 ppss)) + (t + (error (concat + "Internal error on `ruby-in-ppss-context-p': " + "context name `" (symbol-name context) "' is unknown")))) + t))) + + (defun ruby-in-here-doc-p () + (save-excursion + (let ((old-point (point)) (case-fold-search nil)) + (beginning-of-line) + (catch 'found-beg + (while (re-search-backward ruby-here-doc-beg-re nil t) + (if (not (or (ruby-in-ppss-context-p 'anything) + (ruby-here-doc-find-end old-point))) + (throw 'found-beg t))))))) + + (defun ruby-here-doc-find-end (&optional limit) + "Expects the point to be on a line with one or more heredoc +openers. Returns the buffer position at which all heredocs on the +line are terminated, or nil if they aren't terminated before the +buffer position `limit' or the end of the buffer." + (save-excursion + (beginning-of-line) + (catch 'done + (let ((eol (save-excursion (end-of-line) (point))) + (case-fold-search nil) + ;; Fake match data such that (match-end 0) is at eol + (end-match-data (progn (looking-at ".*$") (match-data))) + beg-match-data end-re) + (while (re-search-forward ruby-here-doc-beg-re eol t) + (setq beg-match-data (match-data)) + (setq end-re (ruby-here-doc-end-match)) + + (set-match-data end-match-data) + (goto-char (match-end 0)) + (unless (re-search-forward end-re limit t) (throw 'done nil)) + (setq end-match-data (match-data)) + + (set-match-data beg-match-data) + (goto-char (match-end 0))) + (set-match-data end-match-data) + (goto-char (match-end 0)) + (point))))) + + (defun ruby-here-doc-beg-syntax () + (save-excursion + (goto-char (match-beginning 0)) + (unless (or (ruby-in-ppss-context-p 'non-heredoc) + (ruby-in-here-doc-p)) + (string-to-syntax "|")))) + + (defun ruby-here-doc-end-syntax () + (let ((pss (syntax-ppss)) (case-fold-search nil)) + (when (ruby-in-ppss-context-p 'heredoc pss) + (save-excursion + (goto-char (nth 8 pss)) ; Go to the beginning of heredoc. + (let ((eol (point))) + (beginning-of-line) + (if (and (re-search-forward (ruby-here-doc-beg-match) eol t) ; If there is a heredoc that matches this line... + (not (ruby-in-ppss-context-p 'anything)) ; And that's not inside a heredoc/string/comment... + (progn (goto-char (match-end 0)) ; And it's the last heredoc on its line... + (not (re-search-forward ruby-here-doc-beg-re eol t)))) + (string-to-syntax "|"))))))) + + (if (featurep 'xemacs) + (put 'ruby-mode 'font-lock-defaults + '((ruby-font-lock-keywords) + nil nil nil + beginning-of-line + (font-lock-syntactic-keywords + . ruby-font-lock-syntactic-keywords)))) + + (defun ruby-font-lock-docs (limit) + (if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t) + (let (beg) + (beginning-of-line) + (setq beg (point)) + (forward-line 1) + (if (re-search-forward "^=end\\(\\s \\|$\\)" limit t) + (progn + (set-match-data (list beg (point))) + t))))) + + (defun ruby-font-lock-maybe-docs (limit) + (let (beg) + (save-excursion + (if (and (re-search-backward "^=\\(begin\\|end\\)\\(\\s \\|$\\)" nil t) + (string= (match-string 1) "begin")) + (progn + (beginning-of-line) + (setq beg (point))))) + (if (and beg (and (re-search-forward "^=\\(begin\\|end\\)\\(\\s \\|$\\)" nil t) + (string= (match-string 1) "end"))) + (progn + (set-match-data (list beg (point))) + t) + nil))) + + (defvar ruby-font-lock-syntax-table + (let* ((tbl (copy-syntax-table ruby-mode-syntax-table))) + (modify-syntax-entry ?_ "w" tbl) + tbl)) + + (defconst ruby-font-lock-keywords + (list + ;; functions + '("^\\s *def\\s +\\([^( \t\n]+\\)" + 1 font-lock-function-name-face) + ;; keywords + (cons (concat + "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(defined\\?\\|" + (regexp-opt + '("alias" + "and" + "begin" + "break" + "case" + "catch" + "class" + "def" + "do" + "elsif" + "else" + "fail" + "ensure" + "for" + "end" + "if" + "in" + "module" + "next" + "not" + "or" + "raise" + "redo" + "rescue" + "retry" + "return" + "then" + "throw" + "super" + "unless" + "undef" + "until" + "when" + "while" + "yield" + ) + t) + "\\)" + ruby-keyword-end-re) + 2) + ;; here-doc beginnings + (list ruby-here-doc-beg-re 0 'font-lock-string-face) + ;; variables + '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" + 2 font-lock-variable-name-face) + ;; variables + '("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W" + 1 font-lock-variable-name-face) + '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" + 0 font-lock-variable-name-face) + ;; embedded document + '(ruby-font-lock-docs + 0 font-lock-comment-face t) + '(ruby-font-lock-maybe-docs + 0 font-lock-comment-face t) + ;; general delimited string + '("\\(^\\|[[ \t\n<+(,=]\\)\\(%[xrqQwW]?\\([^<[{(a-zA-Z0-9 \n]\\)[^\n\\\\]*\\(\\\\.[^\n\\\\]*\\)*\\(\\3\\)\\)" + (2 font-lock-string-face)) + ;; constants + '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" + 2 font-lock-type-face) + ;; symbols + '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" + 2 font-lock-reference-face) + ;; expression expansion + '("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)" + 0 font-lock-variable-name-face t) + ;; warn lower camel case + ;'("\\<[a-z]+[a-z0-9]*[A-Z][A-Za-z0-9]*\\([!?]?\\|\\>\\)" + ; 0 font-lock-warning-face) + ) + "*Additional expressions to highlight in ruby mode.")) + + ((featurep 'hilit19) + (hilit-set-mode-patterns + 'ruby-mode + '(("[^$\\?]\\(\"[^\\\"]*\\(\\\\\\(.\\|\n\\)[^\\\"]*\\)*\"\\)" 1 string) + ("[^$\\?]\\('[^\\']*\\(\\\\\\(.\\|\n\\)[^\\']*\\)*'\\)" 1 string) + ("[^$\\?]\\(`[^\\`]*\\(\\\\\\(.\\|\n\\)[^\\`]*\\)*`\\)" 1 string) + ("^\\s *#.*$" nil comment) + ("[^$@?\\]\\(#[^$@{\n].*$\\)" 1 comment) + ("[^a-zA-Z_]\\(\\?\\(\\\\[CM]-\\)*.\\)" 1 string) + ("^\\s *\\(require\\|load\\).*$" nil include) + ("^\\s *\\(include\\|alias\\|undef\\).*$" nil decl) + ("^\\s *\\<\\(class\\|def\\|module\\)\\>" "[)\n;]" defun) + ("[^_]\\<\\(begin\\|case\\|else\\|elsif\\|end\\|ensure\\|for\\|if\\|unless\\|rescue\\|then\\|when\\|while\\|until\\|do\\|yield\\)\\>\\([^_]\\|$\\)" 1 defun) + ("[^_]\\<\\(and\\|break\\|next\\|raise\\|fail\\|in\\|not\\|or\\|redo\\|retry\\|return\\|super\\|yield\\|catch\\|throw\\|self\\|nil\\)\\>\\([^_]\\|$\\)" 1 keyword) + ("\\$\\(.\\|\\sw+\\)" nil type) + ("[$@].[a-zA-Z_0-9]*" nil struct) + ("^__END__" nil label)))) + ) + + +(provide 'ruby-mode) diff --git a/lib/ruby-1.9.1-rc1/misc/ruby-style.el b/lib/ruby-1.9.1-rc1/misc/ruby-style.el new file mode 100644 index 0000000..b97257c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/ruby-style.el @@ -0,0 +1,76 @@ +;;; -*- emacs-lisp -*- +;;; +;;; ruby-style.el - +;;; +;;; C/C++ mode style for Ruby. +;;; +;;; $Author: nobu $ +;;; created at: Thu Apr 26 13:54:01 JST 2007 +;;; +;;; sets ruby style if it seems like a source of ruby. +;;; +;;; (require 'ruby-style) +;;; (add-hook 'c-mode-hook 'ruby-style-c-mode) +;;; (add-hook 'c++-mode-hook 'ruby-style-c-mode) +;;; +;;; uses ruby style always. +;;; (setq-default c-file-style "ruby") + +(defconst ruby-style-revision "$Revision: 19731 $" + "Ruby style revision string.") + +(defconst ruby-style-version + (progn + (string-match "[0-9.]+" ruby-style-revision) + (substring ruby-style-revision (match-beginning 0) (match-end 0))) + "Ruby style version number.") + +(defun ruby-style-case-indent (x) + (save-excursion + (back-to-indentation) + (unless (progn (backward-up-list) (back-to-indentation) + (> (point) (cdr x))) + (goto-char (cdr x)) + (if (looking-at "\\") '*)))) + +(defun ruby-style-label-indent (x) + (save-excursion + (back-to-indentation) + (unless (progn (backward-up-list) (back-to-indentation) + (>= (point) (cdr x))) + (goto-char (cdr x)) + (condition-case () + (progn + (backward-up-list) + (backward-sexp 2) + (if (looking-at "\\") '/)) + (error))))) + +(require 'cc-styles) +(c-add-style + "ruby" + '("bsd" + (c-basic-offset . 4) + (tab-width . 8) + (indent-tabs-mode . t) + (c-offsets-alist + (case-label . *) + (label . (ruby-style-label-indent *)) + (statement-case-intro . *) + (statement-case-open . *) + (statement-block-intro . (ruby-style-case-indent +)) + (access-label /) + ))) + +(defun ruby-style-c-mode () + (interactive) + (if (or (let ((name (buffer-file-name))) (and name (string-match "/ruby\\>" name))) + (save-excursion + (goto-char (point-min)) + (let ((head (progn (forward-line 100) (point))) + (case-fold-search nil)) + (goto-char (point-min)) + (re-search-forward "Copyright (C) .* Yukihiro Matsumoto" head t)))) + (setq c-file-style "ruby"))) + +(provide 'ruby-style) diff --git a/lib/ruby-1.9.1-rc1/misc/rubydb2x.el b/lib/ruby-1.9.1-rc1/misc/rubydb2x.el new file mode 100644 index 0000000..a74265f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/rubydb2x.el @@ -0,0 +1,104 @@ +(require 'gud) +(provide 'rubydb) + +;; ====================================================================== +;; rubydb functions + +;;; History of argument lists passed to rubydb. +(defvar gud-rubydb-history nil) + +(defun gud-rubydb-massage-args (file args) + (cons "-I" (cons "." (cons "-r" (cons "debug" (cons file args)))))) + +;; There's no guarantee that Emacs will hand the filter the entire +;; marker at once; it could be broken up across several strings. We +;; might even receive a big chunk with several markers in it. If we +;; receive a chunk of text which looks like it might contain the +;; beginning of a marker, we save it here between calls to the +;; filter. +(defvar gud-rubydb-marker-acc "") + +(defun gud-rubydb-marker-filter (string) + (save-match-data + (setq gud-marker-acc (concat gud-marker-acc string)) + (let ((output "")) + + ;; Process all the complete markers in this chunk. + (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n" + gud-marker-acc) + (setq + + ;; Extract the frame position from the marker. + gud-last-frame + (cons (substring gud-marker-acc (match-beginning 1) (match-end 1)) + (string-to-int (substring gud-marker-acc + (match-beginning 2) + (match-end 2)))) + + ;; Append any text before the marker to the output we're going + ;; to return - we don't include the marker in this text. + output (concat output + (substring gud-marker-acc 0 (match-beginning 0))) + + ;; Set the accumulator to the remaining text. + gud-marker-acc (substring gud-marker-acc (match-end 0)))) + + ;; Does the remaining text look like it might end with the + ;; beginning of another marker? If it does, then keep it in + ;; gud-marker-acc until we receive the rest of it. Since we + ;; know the full marker regexp above failed, it's pretty simple to + ;; test for marker starts. + (if (string-match "\032.*\\'" gud-marker-acc) + (progn + ;; Everything before the potential marker start can be output. + (setq output (concat output (substring gud-marker-acc + 0 (match-beginning 0)))) + + ;; Everything after, we save, to combine with later input. + (setq gud-marker-acc + (substring gud-marker-acc (match-beginning 0)))) + + (setq output (concat output gud-marker-acc) + gud-marker-acc "")) + + output))) + +(defun gud-rubydb-find-file (f) + (find-file-noselect f)) + +(defvar rubydb-command-name "ruby" + "File name for executing ruby.") + +;;;###autoload +(defun rubydb (command-line) + "Run rubydb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger." + (interactive + (list (read-from-minibuffer "Run rubydb (like this): " + (if (consp gud-rubydb-history) + (car gud-rubydb-history) + (concat rubydb-command-name " ")) + nil nil + '(gud-rubydb-history . 1)))) + + (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) + (gud-marker-filter . gud-rubydb-marker-filter) + (gud-find-file . gud-rubydb-find-file) + )) + (gud-common-init command-line) + + (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") +; (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line") + (gud-def gud-step "s" "\C-s" "Step one source line with display.") + (gud-def gud-next "n" "\C-n" "Step one line (skip functions).") + (gud-def gud-cont "c" "\C-r" "Continue with display.") + (gud-def gud-finish "finish" "\C-f" "Finish executing current function.") + (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") + (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") + (gud-def gud-print "p %e" "\C-p" "Evaluate ruby expression at point.") + + (setq comint-prompt-regexp "^(rdb:-) ") + (setq paragraph-start comint-prompt-regexp) + (run-hooks 'rubydb-mode-hook) + ) diff --git a/lib/ruby-1.9.1-rc1/misc/rubydb3x.el b/lib/ruby-1.9.1-rc1/misc/rubydb3x.el new file mode 100644 index 0000000..9d6bc57 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/misc/rubydb3x.el @@ -0,0 +1,115 @@ +(require 'gud) +(provide 'rubydb) + +;; ====================================================================== +;; rubydb functions + +;;; History of argument lists passed to rubydb. +(defvar gud-rubydb-history nil) + +(if (fboundp 'gud-overload-functions) + (defun gud-rubydb-massage-args (file args) + (cons "-r" (cons "debug" (cons file args)))) + (defun gud-rubydb-massage-args (file args) + (cons "-r" (cons "debug" args)))) + +;; There's no guarantee that Emacs will hand the filter the entire +;; marker at once; it could be broken up across several strings. We +;; might even receive a big chunk with several markers in it. If we +;; receive a chunk of text which looks like it might contain the +;; beginning of a marker, we save it here between calls to the +;; filter. +(defvar gud-rubydb-marker-acc "") +(make-variable-buffer-local 'gud-rubydb-marker-acc) + +(defun gud-rubydb-marker-filter (string) + (setq gud-rubydb-marker-acc (concat gud-rubydb-marker-acc string)) + (let ((output "")) + + ;; Process all the complete markers in this chunk. + (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n" + gud-rubydb-marker-acc) + (setq + + ;; Extract the frame position from the marker. + gud-last-frame + (cons (substring gud-rubydb-marker-acc (match-beginning 1) (match-end 1)) + (string-to-int (substring gud-rubydb-marker-acc + (match-beginning 2) + (match-end 2)))) + + ;; Append any text before the marker to the output we're going + ;; to return - we don't include the marker in this text. + output (concat output + (substring gud-rubydb-marker-acc 0 (match-beginning 0))) + + ;; Set the accumulator to the remaining text. + gud-rubydb-marker-acc (substring gud-rubydb-marker-acc (match-end 0)))) + + ;; Does the remaining text look like it might end with the + ;; beginning of another marker? If it does, then keep it in + ;; gud-rubydb-marker-acc until we receive the rest of it. Since we + ;; know the full marker regexp above failed, it's pretty simple to + ;; test for marker starts. + (if (string-match "\032.*\\'" gud-rubydb-marker-acc) + (progn + ;; Everything before the potential marker start can be output. + (setq output (concat output (substring gud-rubydb-marker-acc + 0 (match-beginning 0)))) + + ;; Everything after, we save, to combine with later input. + (setq gud-rubydb-marker-acc + (substring gud-rubydb-marker-acc (match-beginning 0)))) + + (setq output (concat output gud-rubydb-marker-acc) + gud-rubydb-marker-acc "")) + + output)) + +(defun gud-rubydb-find-file (f) + (save-excursion + (let ((buf (find-file-noselect f))) + (set-buffer buf) +;; (gud-make-debug-menu) + buf))) + +(defvar rubydb-command-name "ruby" + "File name for executing ruby.") + +;;;###autoload +(defun rubydb (command-line) + "Run rubydb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger." + (interactive + (list (read-from-minibuffer "Run rubydb (like this): " + (if (consp gud-rubydb-history) + (car gud-rubydb-history) + (concat rubydb-command-name " ")) + nil nil + '(gud-rubydb-history . 1)))) + + (if (not (fboundp 'gud-overload-functions)) + (gud-common-init command-line 'gud-rubydb-massage-args + 'gud-rubydb-marker-filter 'gud-rubydb-find-file) + (gud-overload-functions '((gud-massage-args . gud-rubydb-massage-args) + (gud-marker-filter . gud-rubydb-marker-filter) + (gud-find-file . gud-rubydb-find-file))) + (gud-common-init command-line rubydb-command-name)) + + (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") +; (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line") + (gud-def gud-step "s" "\C-s" "Step one source line with display.") + (gud-def gud-next "n" "\C-n" "Step one line (skip functions).") + (gud-def gud-cont "c" "\C-r" "Continue with display.") + (gud-def gud-finish "finish" "\C-f" "Finish executing current function.") + (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") + (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") + (gud-def gud-print "p %e" "\C-p" "Evaluate ruby expression at point.") + + (setq comint-prompt-regexp "^(rdb:-) ") + (if (boundp 'comint-last-output-start) + (set-marker comint-last-output-start (point))) + (set (make-local-variable 'paragraph-start) comint-prompt-regexp) + (run-hooks 'rubydb-mode-hook) + ) diff --git a/lib/ruby-1.9.1-rc1/missing/acosh.c b/lib/ruby-1.9.1-rc1/missing/acosh.c new file mode 100644 index 0000000..47d2d31 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/acosh.c @@ -0,0 +1,93 @@ +/********************************************************************** + + acosh.c - + + $Author: usa $ + created at: Fri Apr 12 00:34:17 JST 2002 + + public domain rewrite of acosh(3), asinh(3) and atanh(3) + +**********************************************************************/ + +#include +#include +#include +#include "ruby.h" + +/* DBL_MANT_DIG must be less than 4 times of bits of int */ +#ifndef DBL_MANT_DIG +#define DBL_MANT_DIG 53 /* in this case, at least 12 digit precision */ +#endif +#define BIG_CRITERIA_BIT (1< 0 +#define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT) +#else +#define BIG_CRITERIA (1.0*(1< 0 +#define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT) +#else +#define SMALL_CRITERIA (1.0*(1< BIG_CRITERIA) + x += x; + else + x += sqrt((x + 1) * (x - 1)); + return log(x); +} +#endif + +#ifndef HAVE_ASINH +double +asinh(double x) +{ + int neg = x < 0; + double z = fabs(x); + + if (z < SMALL_CRITERIA) return x; + if (z < (1.0/(1< BIG_CRITERIA) { + z = log(z + z); + } + else { + z = log(z + sqrt(z * z + 1)); + } + if (neg) z = -z; + return z; +} +#endif + +#ifndef HAVE_ATANH +double +atanh(double x) +{ + int neg = x < 0; + double z = fabs(x); + + if (z < SMALL_CRITERIA) return x; + z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2; + if (neg) z = -z; + if (isinf(z)) +#if defined(ERANGE) + errno = ERANGE; +#elif defined(EDOM) + errno = EDOM; +#else + ; +#endif + return z; +} +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/alloca.c b/lib/ruby-1.9.1-rc1/missing/alloca.c new file mode 100644 index 0000000..067f76b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/alloca.c @@ -0,0 +1,194 @@ +/* alloca -- (mostly) portable public-domain implementation -- D A Gwyn + + last edit: 86/05/30 rms + include config.h, since on VMS it renames some symbols. + Use xmalloc instead of malloc. + + This implementation of the PWB library alloca() function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + + It should work under any C implementation that uses an + actual procedure stack (as opposed to a linked list of + frames). There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca()-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. +*/ +#ifndef lint +static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */ +#endif + +#include "ruby/config.h" +#ifdef emacs +#ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +#ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +#endif /* STACK_DIRECTION undefined */ +#endif /* static */ +#endif /* emacs */ + +#ifdef X3J11 +typedef void *pointer; /* generic pointer type */ +#else +typedef char *pointer; /* generic pointer type */ +#endif /* X3J11 */ + +#define NULL 0 /* null pointer constant */ + +#ifdef RUBY_LIB +#define xmalloc ruby_xmalloc +#define xfree ruby_xfree +#endif + +extern void xfree(); +extern pointer xmalloc(); + +/* + Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown +*/ + +#ifndef STACK_DIRECTION +#define STACK_DIRECTION 0 /* direction unknown */ +#endif + +#if STACK_DIRECTION != 0 + +#define STACK_DIR STACK_DIRECTION /* known at compile-time */ + +#else /* STACK_DIRECTION == 0; need run-time code */ + +static int stack_dir; /* 1 or -1 once known */ +#define STACK_DIR stack_dir + +static void +find_stack_direction (/* void */) +{ + static char *addr = NULL; /* address of first + `dummy', once known */ + auto char dummy; /* to get stack address */ + + if (addr == NULL) + { /* initial entry */ + addr = &dummy; + + find_stack_direction (); /* recurse once */ + } + else /* second entry */ + if (&dummy > addr) + stack_dir = 1; /* stack grew upward */ + else + stack_dir = -1; /* stack grew downward */ +} + +#endif /* STACK_DIRECTION == 0 */ + +/* + An "alloca header" is used to: + (a) chain together all alloca()ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc() + alignment chunk size. The following default should work okay. +*/ + +#ifndef ALIGN_SIZE +#define ALIGN_SIZE sizeof(double) +#endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* to force sizeof(header) */ + struct + { + union hdr *next; /* for chaining headers */ + char *deep; /* for stack depth measure */ + } h; +} header; + +/* + alloca( size ) returns a pointer to at least `size' bytes of + storage which will be automatically reclaimed upon exit from + the procedure that called alloca(). Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. +*/ + +static header *last_alloca_header = NULL; /* -> last alloca header */ + +pointer +alloca (size) /* returns pointer to storage */ + unsigned size; /* # bytes to allocate */ +{ + auto char probe; /* probes stack depth: */ + register char *depth = &probe; + +#if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* unknown growth direction */ + find_stack_direction (); +#endif + + /* Reclaim garbage, defined as all alloca()ed storage that + was allocated from deeper in the stack than currently. */ + { + register header *hp; /* traverses linked list */ + + for (hp = last_alloca_header; hp != NULL;) + if (STACK_DIR > 0 && hp->h.deep > depth + || STACK_DIR < 0 && hp->h.deep < depth) + { + register header *np = hp->h.next; + + xfree ((pointer) hp); /* collect garbage */ + + hp = np; /* -> next header */ + } + else + break; /* rest are not deeper */ + + last_alloca_header = hp; /* -> last valid storage */ + } + + if (size == 0) + return NULL; /* no allocation required */ + + /* Allocate combined header + user data storage. */ + + { + register pointer new = xmalloc (sizeof (header) + size); + /* address of header */ + + ((header *)new)->h.next = last_alloca_header; + ((header *)new)->h.deep = depth; + + last_alloca_header = (header *)new; + + /* User storage begins just after header. */ + + return (pointer)((char *)new + sizeof(header)); + } +} + diff --git a/lib/ruby-1.9.1-rc1/missing/cbrt.c b/lib/ruby-1.9.1-rc1/missing/cbrt.c new file mode 100644 index 0000000..54db270 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/cbrt.c @@ -0,0 +1,10 @@ +#include + +double cbrt(double x) +{ + if (x < 0) + return -pow(-x, 1/3.0); + else + return pow(x, 1/3.0); +} + diff --git a/lib/ruby-1.9.1-rc1/missing/crypt.c b/lib/ruby-1.9.1-rc1/missing/crypt.c new file mode 100644 index 0000000..32736bc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/crypt.c @@ -0,0 +1,992 @@ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Tom Truscott. + * + * 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. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#ifdef HAVE_PWD_H +#include +#endif +#include +#ifndef _PASSWORD_EFMT1 +#define _PASSWORD_EFMT1 '_' +#endif + +/* + * UNIX password, and DES, encryption. + * By Tom Truscott, trt@rti.rti.org, + * from algorithms by Robert W. Baldwin and James Gillogly. + * + * References: + * "Mathematical Cryptology for Computer Scientists and Mathematicians," + * by Wayne Patterson, 1987, ISBN 0-8476-7438-X. + * + * "Password Security: A Case History," R. Morris and Ken Thompson, + * Communications of the ACM, vol. 22, pp. 594-597, Nov. 1979. + * + * "DES will be Totally Insecure within Ten Years," M.E. Hellman, + * IEEE Spectrum, vol. 16, pp. 32-39, July 1979. + */ + +/* ===== Configuration ==================== */ + +/* + * define "MUST_ALIGN" if your compiler cannot load/store + * long integers at arbitrary (e.g. odd) memory locations. + * (Either that or never pass unaligned addresses to des_cipher!) + */ +#if !defined(vax) +#define MUST_ALIGN +#endif + +#ifdef CHAR_BITS +#if CHAR_BITS != 8 + #error C_block structure assumes 8 bit characters +#endif +#endif + +/* + * define "LONG_IS_32_BITS" only if sizeof(long)==4. + * This avoids use of bit fields (your compiler may be sloppy with them). + */ +#if !defined(cray) +#define LONG_IS_32_BITS +#endif + +/* + * define "B64" to be the declaration for a 64 bit integer. + * XXX this feature is currently unused, see "endian" comment below. + */ +#if defined(cray) +#define B64 long +#endif +#if defined(convex) +#define B64 long long +#endif + +/* + * define "LARGEDATA" to get faster permutations, by using about 72 kilobytes + * of lookup tables. This speeds up des_setkey() and des_cipher(), but has + * little effect on crypt(). + */ +#if defined(notdef) +#define LARGEDATA +#endif + +int des_setkey(), des_cipher(); + +/* compile with "-DSTATIC=int" when profiling */ +#ifndef STATIC +#define STATIC static +#endif +STATIC void init_des(), init_perm(), permute(); +#ifdef DEBUG +STATIC void prtab(); +#endif + +/* ==================================== */ + +/* + * Cipher-block representation (Bob Baldwin): + * + * DES operates on groups of 64 bits, numbered 1..64 (sigh). One + * representation is to store one bit per byte in an array of bytes. Bit N of + * the NBS spec is stored as the LSB of the Nth byte (index N-1) in the array. + * Another representation stores the 64 bits in 8 bytes, with bits 1..8 in the + * first byte, 9..16 in the second, and so on. The DES spec apparently has + * bit 1 in the MSB of the first byte, but that is particularly noxious so we + * bit-reverse each byte so that bit 1 is the LSB of the first byte, bit 8 is + * the MSB of the first byte. Specifically, the 64-bit input data and key are + * converted to LSB format, and the output 64-bit block is converted back into + * MSB format. + * + * DES operates internally on groups of 32 bits which are expanded to 48 bits + * by permutation E and shrunk back to 32 bits by the S boxes. To speed up + * the computation, the expansion is applied only once, the expanded + * representation is maintained during the encryption, and a compression + * permutation is applied only at the end. To speed up the S-box lookups, + * the 48 bits are maintained as eight 6 bit groups, one per byte, which + * directly feed the eight S-boxes. Within each byte, the 6 bits are the + * most significant ones. The low two bits of each byte are zero. (Thus, + * bit 1 of the 48 bit E expansion is stored as the "4"-valued bit of the + * first byte in the eight byte representation, bit 2 of the 48 bit value is + * the "8"-valued bit, and so on.) In fact, a combined "SPE"-box lookup is + * used, in which the output is the 64 bit result of an S-box lookup which + * has been permuted by P and expanded by E, and is ready for use in the next + * iteration. Two 32-bit wide tables, SPE[0] and SPE[1], are used for this + * lookup. Since each byte in the 48 bit path is a multiple of four, indexed + * lookup of SPE[0] and SPE[1] is simple and fast. The key schedule and + * "salt" are also converted to this 8*(6+2) format. The SPE table size is + * 8*64*8 = 4K bytes. + * + * To speed up bit-parallel operations (such as XOR), the 8 byte + * representation is "union"ed with 32 bit values "i0" and "i1", and, on + * machines which support it, a 64 bit value "b64". This data structure, + * "C_block", has two problems. First, alignment restrictions must be + * honored. Second, the byte-order (e.g. little-endian or big-endian) of + * the architecture becomes visible. + * + * The byte-order problem is unfortunate, since on the one hand it is good + * to have a machine-independent C_block representation (bits 1..8 in the + * first byte, etc.), and on the other hand it is good for the LSB of the + * first byte to be the LSB of i0. We cannot have both these things, so we + * currently use the "little-endian" representation and avoid any multi-byte + * operations that depend on byte order. This largely precludes use of the + * 64-bit datatype since the relative order of i0 and i1 are unknown. It + * also inhibits grouping the SPE table to look up 12 bits at a time. (The + * 12 bits can be stored in a 16-bit field with 3 low-order zeroes and 1 + * high-order zero, providing fast indexing into a 64-bit wide SPE.) On the + * other hand, 64-bit datatypes are currently rare, and a 12-bit SPE lookup + * requires a 128 kilobyte table, so perhaps this is not a big loss. + * + * Permutation representation (Jim Gillogly): + * + * A transformation is defined by its effect on each of the 8 bytes of the + * 64-bit input. For each byte we give a 64-bit output that has the bits in + * the input distributed appropriately. The transformation is then the OR + * of the 8 sets of 64-bits. This uses 8*256*8 = 16K bytes of storage for + * each transformation. Unless LARGEDATA is defined, however, a more compact + * table is used which looks up 16 4-bit "chunks" rather than 8 8-bit chunks. + * The smaller table uses 16*16*8 = 2K bytes for each transformation. This + * is slower but tolerable, particularly for password encryption in which + * the SPE transformation is iterated many times. The small tables total 9K + * bytes, the large tables total 72K bytes. + * + * The transformations used are: + * IE3264: MSB->LSB conversion, initial permutation, and expansion. + * This is done by collecting the 32 even-numbered bits and applying + * a 32->64 bit transformation, and then collecting the 32 odd-numbered + * bits and applying the same transformation. Since there are only + * 32 input bits, the IE3264 transformation table is half the size of + * the usual table. + * CF6464: Compression, final permutation, and LSB->MSB conversion. + * This is done by two trivial 48->32 bit compressions to obtain + * a 64-bit block (the bit numbering is given in the "CIFP" table) + * followed by a 64->64 bit "cleanup" transformation. (It would + * be possible to group the bits in the 64-bit block so that 2 + * identical 32->32 bit transformations could be used instead, + * saving a factor of 4 in space and possibly 2 in time, but + * byte-ordering and other complications rear their ugly head. + * Similar opportunities/problems arise in the key schedule + * transforms.) + * PC1ROT: MSB->LSB, PC1 permutation, rotate, and PC2 permutation. + * This admittedly baroque 64->64 bit transformation is used to + * produce the first code (in 8*(6+2) format) of the key schedule. + * PC2ROT[0]: Inverse PC2 permutation, rotate, and PC2 permutation. + * It would be possible to define 15 more transformations, each + * with a different rotation, to generate the entire key schedule. + * To save space, however, we instead permute each code into the + * next by using a transformation that "undoes" the PC2 permutation, + * rotates the code, and then applies PC2. Unfortunately, PC2 + * transforms 56 bits into 48 bits, dropping 8 bits, so PC2 is not + * invertible. We get around that problem by using a modified PC2 + * which retains the 8 otherwise-lost bits in the unused low-order + * bits of each byte. The low-order bits are cleared when the + * codes are stored into the key schedule. + * PC2ROT[1]: Same as PC2ROT[0], but with two rotations. + * This is faster than applying PC2ROT[0] twice, + * + * The Bell Labs "salt" (Bob Baldwin): + * + * The salting is a simple permutation applied to the 48-bit result of E. + * Specifically, if bit i (1 <= i <= 24) of the salt is set then bits i and + * i+24 of the result are swapped. The salt is thus a 24 bit number, with + * 16777216 possible values. (The original salt was 12 bits and could not + * swap bits 13..24 with 36..48.) + * + * It is possible, but ugly, to warp the SPE table to account for the salt + * permutation. Fortunately, the conditional bit swapping requires only + * about four machine instructions and can be done on-the-fly with about an + * 8% performance penalty. + */ + +typedef union { + unsigned char b[8]; + struct { +#if defined(LONG_IS_32_BITS) + /* long is often faster than a 32-bit bit field */ + long i0; + long i1; +#else + long i0: 32; + long i1: 32; +#endif + } b32; +#if defined(B64) + B64 b64; +#endif +} C_block; + +/* + * Convert twenty-four-bit long in host-order + * to six bits (and 2 low-order zeroes) per char little-endian format. + */ +#define TO_SIX_BIT(rslt, src) { \ + C_block cvt; \ + cvt.b[0] = src; src >>= 6; \ + cvt.b[1] = src; src >>= 6; \ + cvt.b[2] = src; src >>= 6; \ + cvt.b[3] = src; \ + rslt = (cvt.b32.i0 & 0x3f3f3f3fL) << 2; \ + } + +/* + * These macros may someday permit efficient use of 64-bit integers. + */ +#define ZERO(d,d0,d1) d0 = 0, d1 = 0 +#define LOAD(d,d0,d1,bl) d0 = (bl).b32.i0, d1 = (bl).b32.i1 +#define LOADREG(d,d0,d1,s,s0,s1) d0 = s0, d1 = s1 +#define OR(d,d0,d1,bl) d0 |= (bl).b32.i0, d1 |= (bl).b32.i1 +#define STORE(s,s0,s1,bl) (bl).b32.i0 = s0, (bl).b32.i1 = s1 +#define DCL_BLOCK(d,d0,d1) long d0, d1 + +#if defined(LARGEDATA) + /* Waste memory like crazy. Also, do permutations in line */ +#define LGCHUNKBITS 3 +#define CHUNKBITS (1<>4]; OR(D,D0,D1,*tp); p += (1< 0); + STORE(D,D0,D1,*out); +} +#endif /* LARGEDATA */ + + +/* ===== (mostly) Standard DES Tables ==================== */ + +static unsigned char IP[] = { /* initial permutation */ + 58, 50, 42, 34, 26, 18, 10, 2, + 60, 52, 44, 36, 28, 20, 12, 4, + 62, 54, 46, 38, 30, 22, 14, 6, + 64, 56, 48, 40, 32, 24, 16, 8, + 57, 49, 41, 33, 25, 17, 9, 1, + 59, 51, 43, 35, 27, 19, 11, 3, + 61, 53, 45, 37, 29, 21, 13, 5, + 63, 55, 47, 39, 31, 23, 15, 7, +}; + +/* The final permutation is the inverse of IP - no table is necessary */ + +static unsigned char ExpandTr[] = { /* expansion operation */ + 32, 1, 2, 3, 4, 5, + 4, 5, 6, 7, 8, 9, + 8, 9, 10, 11, 12, 13, + 12, 13, 14, 15, 16, 17, + 16, 17, 18, 19, 20, 21, + 20, 21, 22, 23, 24, 25, + 24, 25, 26, 27, 28, 29, + 28, 29, 30, 31, 32, 1, +}; + +static unsigned char PC1[] = { /* permuted choice table 1 */ + 57, 49, 41, 33, 25, 17, 9, + 1, 58, 50, 42, 34, 26, 18, + 10, 2, 59, 51, 43, 35, 27, + 19, 11, 3, 60, 52, 44, 36, + + 63, 55, 47, 39, 31, 23, 15, + 7, 62, 54, 46, 38, 30, 22, + 14, 6, 61, 53, 45, 37, 29, + 21, 13, 5, 28, 20, 12, 4, +}; + +static unsigned char Rotates[] = { /* PC1 rotation schedule */ + 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, +}; + +/* note: each "row" of PC2 is left-padded with bits that make it invertible */ +static unsigned char PC2[] = { /* permuted choice table 2 */ + 9, 18, 14, 17, 11, 24, 1, 5, + 22, 25, 3, 28, 15, 6, 21, 10, + 35, 38, 23, 19, 12, 4, 26, 8, + 43, 54, 16, 7, 27, 20, 13, 2, + + 0, 0, 41, 52, 31, 37, 47, 55, + 0, 0, 30, 40, 51, 45, 33, 48, + 0, 0, 44, 49, 39, 56, 34, 53, + 0, 0, 46, 42, 50, 36, 29, 32, +}; + +static unsigned char S[8][64] = { /* 48->32 bit substitution tables */ + { + /* S[1] */ + 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7, + 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8, + 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0, + 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13, + }, + { + /* S[2] */ + 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10, + 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5, + 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15, + 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9, + }, + { + /* S[3] */ + 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8, + 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1, + 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7, + 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12, + }, + { + /* S[4] */ + 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15, + 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9, + 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4, + 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14, + }, + { + /* S[5] */ + 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9, + 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6, + 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14, + 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3, + }, + { + /* S[6] */ + 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11, + 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8, + 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6, + 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13, + }, + { + /* S[7] */ + 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1, + 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6, + 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2, + 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12, + }, + { + /* S[8] */ + 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7, + 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2, + 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8, + 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11, + }, +}; + +static unsigned char P32Tr[] = { /* 32-bit permutation function */ + 16, 7, 20, 21, + 29, 12, 28, 17, + 1, 15, 23, 26, + 5, 18, 31, 10, + 2, 8, 24, 14, + 32, 27, 3, 9, + 19, 13, 30, 6, + 22, 11, 4, 25, +}; + +static unsigned char CIFP[] = { /* compressed/interleaved permutation */ + 1, 2, 3, 4, 17, 18, 19, 20, + 5, 6, 7, 8, 21, 22, 23, 24, + 9, 10, 11, 12, 25, 26, 27, 28, + 13, 14, 15, 16, 29, 30, 31, 32, + + 33, 34, 35, 36, 49, 50, 51, 52, + 37, 38, 39, 40, 53, 54, 55, 56, + 41, 42, 43, 44, 57, 58, 59, 60, + 45, 46, 47, 48, 61, 62, 63, 64, +}; + +static unsigned char itoa64[] = /* 0..63 => ascii-64 */ + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + + +/* ===== Tables that are initialized at run time ==================== */ + + +static unsigned char a64toi[128]; /* ascii-64 => 0..63 */ + +/* Initial key schedule permutation */ +static C_block PC1ROT[64/CHUNKBITS][1< final permutation table */ +static C_block CF6464[64/CHUNKBITS][1<= 0; ) { + if ((t = (unsigned char)setting[i]) == '\0') + t = '.'; + encp[i] = t; + num_iter = (num_iter<<6) | a64toi[t]; + } + setting += 4; + encp += 4; + salt_size = 4; + break; + default: + num_iter = 25; + salt_size = 2; + } + + salt = 0; + for (i = salt_size; --i >= 0; ) { + if ((t = (unsigned char)setting[i]) == '\0') + t = '.'; + encp[i] = t; + salt = (salt<<6) | a64toi[t]; + } + encp += salt_size; + if (des_cipher((char *)&constdatablock, (char *)&rsltblock, + salt, num_iter)) + return (NULL); + + /* + * Encode the 64 cipher bits as 11 ascii characters. + */ + i = ((long)((rsltblock.b[0]<<8) | rsltblock.b[1])<<8) | rsltblock.b[2]; + encp[3] = itoa64[i&0x3f]; i >>= 6; + encp[2] = itoa64[i&0x3f]; i >>= 6; + encp[1] = itoa64[i&0x3f]; i >>= 6; + encp[0] = itoa64[i]; encp += 4; + i = ((long)((rsltblock.b[3]<<8) | rsltblock.b[4])<<8) | rsltblock.b[5]; + encp[3] = itoa64[i&0x3f]; i >>= 6; + encp[2] = itoa64[i&0x3f]; i >>= 6; + encp[1] = itoa64[i&0x3f]; i >>= 6; + encp[0] = itoa64[i]; encp += 4; + i = ((long)((rsltblock.b[6])<<8) | rsltblock.b[7])<<2; + encp[2] = itoa64[i&0x3f]; i >>= 6; + encp[1] = itoa64[i&0x3f]; i >>= 6; + encp[0] = itoa64[i]; + + encp[3] = 0; + + return (cryptresult); +} + + +/* + * The Key Schedule, filled in by des_setkey() or setkey(). + */ +#define KS_SIZE 16 +static C_block KS[KS_SIZE]; + +/* + * Set up the key schedule from the key. + */ +int +des_setkey(key) + register const char *key; +{ + register DCL_BLOCK(K, K0, K1); + register C_block *ptabp; + register int i; + static int des_ready = 0; + + if (!des_ready) { + init_des(); + des_ready = 1; + } + + PERM6464(K,K0,K1,(unsigned char *)key,(C_block *)PC1ROT); + key = (char *)&KS[0]; + STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key); + for (i = 1; i < 16; i++) { + key += sizeof(C_block); + STORE(K,K0,K1,*(C_block *)key); + ptabp = (C_block *)PC2ROT[Rotates[i]-1]; + PERM6464(K,K0,K1,(unsigned char *)key,ptabp); + STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key); + } + return (0); +} + +/* + * Encrypt (or decrypt if num_iter < 0) the 8 chars at "in" with abs(num_iter) + * iterations of DES, using the the given 24-bit salt and the pre-computed key + * schedule, and store the resulting 8 chars at "out" (in == out is permitted). + * + * NOTE: the performance of this routine is critically dependent on your + * compiler and machine architecture. + */ +int +des_cipher(in, out, salt, num_iter) + const char *in; + char *out; + long salt; + int num_iter; +{ + /* variables that we want in registers, most important first */ +#if defined(pdp11) + register int j; +#endif + register long L0, L1, R0, R1, k; + register C_block *kp; + register int ks_inc, loop_count; + C_block B; + + L0 = salt; + TO_SIX_BIT(salt, L0); /* convert to 4*(6+2) format */ + +#if defined(vax) || defined(pdp11) + salt = ~salt; /* "x &~ y" is faster than "x & y". */ +#define SALT (~salt) +#else +#define SALT salt +#endif + +#if defined(MUST_ALIGN) + B.b[0] = in[0]; B.b[1] = in[1]; B.b[2] = in[2]; B.b[3] = in[3]; + B.b[4] = in[4]; B.b[5] = in[5]; B.b[6] = in[6]; B.b[7] = in[7]; + LOAD(L,L0,L1,B); +#else + LOAD(L,L0,L1,*(C_block *)in); +#endif + LOADREG(R,R0,R1,L,L0,L1); + L0 &= 0x55555555L; + L1 &= 0x55555555L; + L0 = (L0 << 1) | L1; /* L0 is the even-numbered input bits */ + R0 &= 0xaaaaaaaaL; + R1 = (R1 >> 1) & 0x55555555L; + L1 = R0 | R1; /* L1 is the odd-numbered input bits */ + STORE(L,L0,L1,B); + PERM3264(L,L0,L1,B.b, (C_block *)IE3264); /* even bits */ + PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264); /* odd bits */ + + if (num_iter >= 0) + { /* encryption */ + kp = &KS[0]; + ks_inc = sizeof(*kp); + } + else + { /* decryption */ + num_iter = -num_iter; + kp = &KS[KS_SIZE-1]; + ks_inc = -sizeof(*kp); + } + + while (--num_iter >= 0) { + loop_count = 8; + do { + +#define SPTAB(t, i) (*(long *)((unsigned char *)t + i*(sizeof(long)/4))) +#if defined(gould) + /* use this if B.b[i] is evaluated just once ... */ +#define DOXOR(x,y,i) x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]); +#else +#if defined(pdp11) + /* use this if your "long" int indexing is slow */ +#define DOXOR(x,y,i) j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j); +#else + /* use this if "k" is allocated to a register ... */ +#define DOXOR(x,y,i) k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k); +#endif +#endif + +#define CRUNCH(p0, p1, q0, q1) \ + k = (q0 ^ q1) & SALT; \ + B.b32.i0 = k ^ q0 ^ kp->b32.i0; \ + B.b32.i1 = k ^ q1 ^ kp->b32.i1; \ + kp = (C_block *)((char *)kp+ks_inc); \ + \ + DOXOR(p0, p1, 0); \ + DOXOR(p0, p1, 1); \ + DOXOR(p0, p1, 2); \ + DOXOR(p0, p1, 3); \ + DOXOR(p0, p1, 4); \ + DOXOR(p0, p1, 5); \ + DOXOR(p0, p1, 6); \ + DOXOR(p0, p1, 7); + + CRUNCH(L0, L1, R0, R1); + CRUNCH(R0, R1, L0, L1); + } while (--loop_count != 0); + kp = (C_block *)((char *)kp-(ks_inc*KS_SIZE)); + + + /* swap L and R */ + L0 ^= R0; L1 ^= R1; + R0 ^= L0; R1 ^= L1; + L0 ^= R0; L1 ^= R1; + } + + /* store the encrypted (or decrypted) result */ + L0 = ((L0 >> 3) & 0x0f0f0f0fL) | ((L1 << 1) & 0xf0f0f0f0L); + L1 = ((R0 >> 3) & 0x0f0f0f0fL) | ((R1 << 1) & 0xf0f0f0f0L); + STORE(L,L0,L1,B); + PERM6464(L,L0,L1,B.b, (C_block *)CF6464); +#if defined(MUST_ALIGN) + STORE(L,L0,L1,B); + out[0] = B.b[0]; out[1] = B.b[1]; out[2] = B.b[2]; out[3] = B.b[3]; + out[4] = B.b[4]; out[5] = B.b[5]; out[6] = B.b[6]; out[7] = B.b[7]; +#else + STORE(L,L0,L1,*(C_block *)out); +#endif + return (0); +} + + +/* + * Initialize various tables. This need only be done once. It could even be + * done at compile time, if the compiler were capable of that sort of thing. + */ +STATIC void +init_des() +{ + register int i, j; + register long k; + register int tableno; + static unsigned char perm[64], tmp32[32]; /* "static" for speed */ + + /* + * table that converts chars "./0-9A-Za-z"to integers 0-63. + */ + for (i = 0; i < 64; i++) + a64toi[itoa64[i]] = i; + + /* + * PC1ROT - bit reverse, then PC1, then Rotate, then PC2. + */ + for (i = 0; i < 64; i++) + perm[i] = 0; + for (i = 0; i < 64; i++) { + if ((k = PC2[i]) == 0) + continue; + k += Rotates[0]-1; + if ((k%28) < Rotates[0]) k -= 28; + k = PC1[k]; + if (k > 0) { + k--; + k = (k|07) - (k&07); + k++; + } + perm[i] = k; + } +#ifdef DEBUG + prtab("pc1tab", perm, 8); +#endif + init_perm(PC1ROT, perm, 8, 8); + + /* + * PC2ROT - PC2 inverse, then Rotate (once or twice), then PC2. + */ + for (j = 0; j < 2; j++) { + unsigned char pc2inv[64]; + for (i = 0; i < 64; i++) + perm[i] = pc2inv[i] = 0; + for (i = 0; i < 64; i++) { + if ((k = PC2[i]) == 0) + continue; + pc2inv[k-1] = i+1; + } + for (i = 0; i < 64; i++) { + if ((k = PC2[i]) == 0) + continue; + k += j; + if ((k%28) <= j) k -= 28; + perm[i] = pc2inv[k]; + } +#ifdef DEBUG + prtab("pc2tab", perm, 8); +#endif + init_perm(PC2ROT[j], perm, 8, 8); + } + + /* + * Bit reverse, then initial permutation, then expansion. + */ + for (i = 0; i < 8; i++) { + for (j = 0; j < 8; j++) { + k = (j < 2)? 0: IP[ExpandTr[i*6+j-2]-1]; + if (k > 32) + k -= 32; + else if (k > 0) + k--; + if (k > 0) { + k--; + k = (k|07) - (k&07); + k++; + } + perm[i*8+j] = k; + } + } +#ifdef DEBUG + prtab("ietab", perm, 8); +#endif + init_perm(IE3264, perm, 4, 8); + + /* + * Compression, then final permutation, then bit reverse. + */ + for (i = 0; i < 64; i++) { + k = IP[CIFP[i]-1]; + if (k > 0) { + k--; + k = (k|07) - (k&07); + k++; + } + perm[k-1] = i+1; + } +#ifdef DEBUG + prtab("cftab", perm, 8); +#endif + init_perm(CF6464, perm, 8, 8); + + /* + * SPE table + */ + for (i = 0; i < 48; i++) + perm[i] = P32Tr[ExpandTr[i]-1]; + for (tableno = 0; tableno < 8; tableno++) { + for (j = 0; j < 64; j++) { + k = (((j >> 0) &01) << 5)| + (((j >> 1) &01) << 3)| + (((j >> 2) &01) << 2)| + (((j >> 3) &01) << 1)| + (((j >> 4) &01) << 0)| + (((j >> 5) &01) << 4); + k = S[tableno][k]; + k = (((k >> 3)&01) << 0)| + (((k >> 2)&01) << 1)| + (((k >> 1)&01) << 2)| + (((k >> 0)&01) << 3); + for (i = 0; i < 32; i++) + tmp32[i] = 0; + for (i = 0; i < 4; i++) + tmp32[4 * tableno + i] = (k >> i) & 01; + k = 0; + for (i = 24; --i >= 0; ) + k = (k<<1) | tmp32[perm[i]-1]; + TO_SIX_BIT(SPE[0][tableno][j], k); + k = 0; + for (i = 24; --i >= 0; ) + k = (k<<1) | tmp32[perm[i+24]-1]; + TO_SIX_BIT(SPE[1][tableno][j], k); + } + } +} + +/* + * Initialize "perm" to represent transformation "p", which rearranges + * (perhaps with expansion and/or contraction) one packed array of bits + * (of size "chars_in" characters) into another array (of size "chars_out" + * characters). + * + * "perm" must be all-zeroes on entry to this routine. + */ +STATIC void +init_perm(perm, p, chars_in, chars_out) + C_block perm[64/CHUNKBITS][1<>LGCHUNKBITS; /* which chunk this bit comes from */ + l = 1<<(l&(CHUNKBITS-1)); /* mask for this bit */ + for (j = 0; j < (1<>3] |= 1<<(k&07); + } + } +} + +/* + * "setkey" routine (for backwards compatibility) + */ +int +setkey(key) + register const char *key; +{ + register int i, j, k; + C_block keyblock; + + for (i = 0; i < 8; i++) { + k = 0; + for (j = 0; j < 8; j++) { + k <<= 1; + k |= (unsigned char)*key++; + } + keyblock.b[i] = k; + } + return (des_setkey((char *)keyblock.b)); +} + +/* + * "encrypt" routine (for backwards compatibility) + */ +int +encrypt(block, flag) + register char *block; + int flag; +{ + register int i, j, k; + C_block cblock; + + for (i = 0; i < 8; i++) { + k = 0; + for (j = 0; j < 8; j++) { + k <<= 1; + k |= (unsigned char)*block++; + } + cblock.b[i] = k; + } + if (des_cipher((char *)&cblock, (char *)&cblock, 0L, (flag ? -1: 1))) + return (1); + for (i = 7; i >= 0; i--) { + k = cblock.b[i]; + for (j = 7; j >= 0; j--) { + *--block = k&01; + k >>= 1; + } + } + return (0); +} + +#ifdef DEBUG +STATIC void +prtab(s, t, num_rows) + char *s; + unsigned char *t; + int num_rows; +{ + register int i, j; + + (void)printf("%s:\n", s); + for (i = 0; i < num_rows; i++) { + for (j = 0; j < 8; j++) { + (void)printf("%3d", t[i*8+j]); + } + (void)printf("\n"); + } + (void)printf("\n"); +} +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/dup2.c b/lib/ruby-1.9.1-rc1/missing/dup2.c new file mode 100644 index 0000000..7554084 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/dup2.c @@ -0,0 +1,60 @@ +/* + * Public domain dup2() lookalike + * by Curtis Jackson @ AT&T Technologies, Burlington, NC + * electronic address: burl!rcj + * + * dup2 performs the following functions: + * + * Check to make sure that fd1 is a valid open file descriptor. + * Check to see if fd2 is already open; if so, close it. + * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd. + * Return fd2 if all went well; return BADEXIT otherwise. + */ + +#include "ruby/config.h" + +#if defined(HAVE_FCNTL) +# include +#endif + +#if !defined(HAVE_FCNTL) || !defined(F_DUPFD) +# include +#endif + +#define BADEXIT -1 + +int +dup2(int fd1, int fd2) +{ +#if defined(HAVE_FCNTL) && defined(F_DUPFD) + if (fd1 != fd2) { +#ifdef F_GETFL + if (fcntl(fd1, F_GETFL) < 0) + return BADEXIT; + if (fcntl(fd2, F_GETFL) >= 0) + close(fd2); +#else + close(fd2); +#endif + if (fcntl(fd1, F_DUPFD, fd2) < 0) + return BADEXIT; + } + return fd2; +#else + extern int errno; + int i, fd, fds[256]; + + if (fd1 == fd2) return 0; + close(fd2); + for (i=0; i<256; i++) { + fd = fds[i] = dup(fd1); + if (fd == fd2) break; + } + while (i) { + close(fds[i--]); + } + if (fd == fd2) return 0; + errno = EMFILE; + return BADEXIT; +#endif +} diff --git a/lib/ruby-1.9.1-rc1/missing/erf.c b/lib/ruby-1.9.1-rc1/missing/erf.c new file mode 100644 index 0000000..fe65b9a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/erf.c @@ -0,0 +1,88 @@ +/* erf.c - public domain implementation of error function erf(3m) + +reference - Haruhiko Okumura: C-gengo niyoru saishin algorithm jiten + (New Algorithm handbook in C language) (Gijyutsu hyouron + sha, Tokyo, 1991) p.227 [in Japanese] */ +#include +#include + +#ifdef _WIN32 +# include +# if !defined __MINGW32__ || defined __NO_ISOCEXT +# ifndef isnan +# define isnan(x) _isnan(x) +# endif +# ifndef isinf +# define isinf(x) (!_finite(x) && !_isnan(x)) +# endif +# ifndef finite +# define finite(x) _finite(x) +# endif +# endif +#endif + +static double q_gamma(double, double, double); + +/* Incomplete gamma function + 1 / Gamma(a) * Int_0^x exp(-t) t^(a-1) dt */ +static double p_gamma(double a, double x, double loggamma_a) +{ + int k; + double result, term, previous; + + if (x >= 1 + a) return 1 - q_gamma(a, x, loggamma_a); + if (x == 0) return 0; + result = term = exp(a * log(x) - x - loggamma_a) / a; + for (k = 1; k < 1000; k++) { + term *= x / (a + k); + previous = result; result += term; + if (result == previous) return result; + } + fprintf(stderr, "erf.c:%d:p_gamma() could not converge.", __LINE__); + return result; +} + +/* Incomplete gamma function + 1 / Gamma(a) * Int_x^inf exp(-t) t^(a-1) dt */ +static double q_gamma(double a, double x, double loggamma_a) +{ + int k; + double result, w, temp, previous; + double la = 1, lb = 1 + x - a; /* Laguerre polynomial */ + + if (x < 1 + a) return 1 - p_gamma(a, x, loggamma_a); + w = exp(a * log(x) - x - loggamma_a); + result = w / lb; + for (k = 2; k < 1000; k++) { + temp = ((k - 1 - a) * (lb - la) + (k + x) * lb) / k; + la = lb; lb = temp; + w *= (k - 1 - a) / k; + temp = w / (la * lb); + previous = result; result += temp; + if (result == previous) return result; + } + fprintf(stderr, "erf.c:%d:q_gamma() could not converge.", __LINE__); + return result; +} + +#define LOG_PI_OVER_2 0.572364942924700087071713675675 /* log_e(PI)/2 */ + +double erf(double x) +{ + if (!finite(x)) { + if (isnan(x)) return x; /* erf(NaN) = NaN */ + return (x>0 ? 1.0 : -1.0); /* erf(+-inf) = +-1.0 */ + } + if (x >= 0) return p_gamma(0.5, x * x, LOG_PI_OVER_2); + else return - p_gamma(0.5, x * x, LOG_PI_OVER_2); +} + +double erfc(double x) +{ + if (!finite(x)) { + if (isnan(x)) return x; /* erfc(NaN) = NaN */ + return (x>0 ? 0.0 : 2.0); /* erfc(+-inf) = 0.0, 2.0 */ + } + if (x >= 0) return q_gamma(0.5, x * x, LOG_PI_OVER_2); + else return 1 + p_gamma(0.5, x * x, LOG_PI_OVER_2); +} diff --git a/lib/ruby-1.9.1-rc1/missing/file.h b/lib/ruby-1.9.1-rc1/missing/file.h new file mode 100644 index 0000000..2d491d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/file.h @@ -0,0 +1,22 @@ +/* This is file FILE.H */ + +#ifndef _FILE_H_ +#define _FILE_H_ + +#include + +#ifndef L_SET +# define L_SET 0 /* seek from beginning. */ +# define L_CURR 1 /* seek from current position. */ +# define L_INCR 1 /* ditto. */ +# define L_XTND 2 /* seek from end. */ +#endif + +#ifndef R_OK +# define R_OK 4 /* test whether readable. */ +# define W_OK 2 /* test whether writable. */ +# define X_OK 1 /* test whether execubale. */ +# define F_OK 0 /* test whether exist. */ +#endif + +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/fileblocks.c b/lib/ruby-1.9.1-rc1/missing/fileblocks.c new file mode 100644 index 0000000..ccb8d66 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/fileblocks.c @@ -0,0 +1 @@ +/* dummy for autoconf */ diff --git a/lib/ruby-1.9.1-rc1/missing/finite.c b/lib/ruby-1.9.1-rc1/missing/finite.c new file mode 100644 index 0000000..8d0b7af --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/finite.c @@ -0,0 +1,7 @@ +/* public domain rewrite of finite(3) */ + +int +finite(double n) +{ + return !isnan(n) && !isinf(n); +} diff --git a/lib/ruby-1.9.1-rc1/missing/flock.c b/lib/ruby-1.9.1-rc1/missing/flock.c new file mode 100644 index 0000000..b02f8bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/flock.c @@ -0,0 +1,129 @@ +#include "ruby/config.h" + +#if defined _WIN32 +#elif defined HAVE_FCNTL && defined HAVE_FCNTL_H + +/* These are the flock() constants. Since this sytems doesn't have + flock(), the values of the constants are probably not available. +*/ +# ifndef LOCK_SH +# define LOCK_SH 1 +# endif +# ifndef LOCK_EX +# define LOCK_EX 2 +# endif +# ifndef LOCK_NB +# define LOCK_NB 4 +# endif +# ifndef LOCK_UN +# define LOCK_UN 8 +# endif + +#include +#include +#include + +int +flock(int fd, int operation) +{ + struct flock lock; + + switch (operation & ~LOCK_NB) { + case LOCK_SH: + lock.l_type = F_RDLCK; + break; + case LOCK_EX: + lock.l_type = F_WRLCK; + break; + case LOCK_UN: + lock.l_type = F_UNLCK; + break; + default: + errno = EINVAL; + return -1; + } + lock.l_whence = SEEK_SET; + lock.l_start = lock.l_len = 0L; + + return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock); +} + +#elif defined(HAVE_LOCKF) + +#include +#include + +/* Emulate flock() with lockf() or fcntl(). This is just to increase + portability of scripts. The calls might not be completely + interchangeable. What's really needed is a good file + locking module. +*/ + +# ifndef F_ULOCK +# define F_ULOCK 0 /* Unlock a previously locked region */ +# endif +# ifndef F_LOCK +# define F_LOCK 1 /* Lock a region for exclusive use */ +# endif +# ifndef F_TLOCK +# define F_TLOCK 2 /* Test and lock a region for exclusive use */ +# endif +# ifndef F_TEST +# define F_TEST 3 /* Test a region for other processes locks */ +# endif + +/* These are the flock() constants. Since this sytems doesn't have + flock(), the values of the constants are probably not available. +*/ +# ifndef LOCK_SH +# define LOCK_SH 1 +# endif +# ifndef LOCK_EX +# define LOCK_EX 2 +# endif +# ifndef LOCK_NB +# define LOCK_NB 4 +# endif +# ifndef LOCK_UN +# define LOCK_UN 8 +# endif + +int +flock(int fd, int operation) +{ + switch (operation) { + + /* LOCK_SH - get a shared lock */ + case LOCK_SH: + rb_notimplement(); + return -1; + /* LOCK_EX - get an exclusive lock */ + case LOCK_EX: + return lockf (fd, F_LOCK, 0); + + /* LOCK_SH|LOCK_NB - get a non-blocking shared lock */ + case LOCK_SH|LOCK_NB: + rb_notimplement(); + return -1; + /* LOCK_EX|LOCK_NB - get a non-blocking exclusive lock */ + case LOCK_EX|LOCK_NB: + return lockf (fd, F_TLOCK, 0); + + /* LOCK_UN - unlock */ + case LOCK_UN: + return lockf (fd, F_ULOCK, 0); + + /* Default - can't decipher operation */ + default: + errno = EINVAL; + return -1; + } +} +#else +int +flock(int fd, int operation) +{ + rb_notimplement(); + return -1; +} +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/hypot.c b/lib/ruby-1.9.1-rc1/missing/hypot.c new file mode 100644 index 0000000..5a66355 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/hypot.c @@ -0,0 +1,16 @@ +/* public domain rewrite of hypot */ + +#include + +double hypot(double x, double y) +{ + if (x < 0) x = -x; + if (y < 0) y = -y; + if (x < y) { + double tmp = x; + x = y; y = tmp; + } + if (y == 0.0) return x; + y /= x; + return x * sqrt(1.0+y*y); +} diff --git a/lib/ruby-1.9.1-rc1/missing/isinf.c b/lib/ruby-1.9.1-rc1/missing/isinf.c new file mode 100644 index 0000000..4aef51b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/isinf.c @@ -0,0 +1,69 @@ +/* public domain rewrite of isinf(3) */ + +#ifdef __osf__ + +#define _IEEE 1 +#include + +int +isinf(double n) +{ + if (IsNANorINF(n) && IsINF(n)) { + return 1; + } + else { + return 0; + } +} + +#else + +#include "ruby/config.h" + +#if defined(HAVE_FINITE) && defined(HAVE_ISNAN) + +#include +#ifdef HAVE_IEEEFP_H +#include +#endif + +/* + * isinf may be provided only as a macro. + * ex. HP-UX, Solaris 10 + * http://www.gnu.org/software/automake/manual/autoconf/Function-Portability.html + */ +#ifndef isinf +int +isinf(double n) +{ + return (!finite(n) && !isnan(n)); +} +#endif + +#else + +#ifdef HAVE_STRING_H +# include +#else +# include +#endif + +static double zero(void) { return 0.0; } +static double one (void) { return 1.0; } +static double inf (void) { return one() / zero(); } + +int +isinf(double n) +{ + static double pinf = 0.0; + static double ninf = 0.0; + + if (pinf == 0.0) { + pinf = inf(); + ninf = -pinf; + } + return memcmp(&n, &pinf, sizeof n) == 0 + || memcmp(&n, &ninf, sizeof n) == 0; +} +#endif +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/isnan.c b/lib/ruby-1.9.1-rc1/missing/isnan.c new file mode 100644 index 0000000..a873397 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/isnan.c @@ -0,0 +1,15 @@ +/* public domain rewrite of isnan(3) */ + +static int double_ne(double n1, double n2); + +int +isnan(double n) +{ + return double_ne(n, n); +} + +static int +double_ne(double n1, double n2) +{ + return n1 != n2; +} diff --git a/lib/ruby-1.9.1-rc1/missing/lgamma_r.c b/lib/ruby-1.9.1-rc1/missing/lgamma_r.c new file mode 100644 index 0000000..ba8535b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/lgamma_r.c @@ -0,0 +1,68 @@ +/* lgamma_r.c - public domain implementation of function lgamma_r(3m) + +lgamma_r() is based on gamma(). modified by Tanaka Akira. + +reference - Haruhiko Okumura: C-gengo niyoru saishin algorithm jiten + (New Algorithm handbook in C language) (Gijyutsu hyouron + sha, Tokyo, 1991) [in Japanese] + http://oku.edu.mie-u.ac.jp/~okumura/algo/ +*/ + +/*********************************************************** + gamma.c -- Gamma function +***********************************************************/ +#include +#include +#define PI 3.14159265358979324 /* $\pi$ */ +#define LOG_2PI 1.83787706640934548 /* $\log 2\pi$ */ +#define LOG_PI 1.14472988584940017 /* $\log_e \pi$ */ +#define N 8 + +#define B0 1 /* Bernoulli numbers */ +#define B1 (-1.0 / 2.0) +#define B2 ( 1.0 / 6.0) +#define B4 (-1.0 / 30.0) +#define B6 ( 1.0 / 42.0) +#define B8 (-1.0 / 30.0) +#define B10 ( 5.0 / 66.0) +#define B12 (-691.0 / 2730.0) +#define B14 ( 7.0 / 6.0) +#define B16 (-3617.0 / 510.0) + +static double +loggamma(double x) /* the natural logarithm of the Gamma function. */ +{ + double v, w; + + if (x == 1.0 || x == 2.0) return 0.0; + + v = 1; + while (x < N) { v *= x; x++; } + w = 1 / (x * x); + return ((((((((B16 / (16 * 15)) * w + (B14 / (14 * 13))) * w + + (B12 / (12 * 11))) * w + (B10 / (10 * 9))) * w + + (B8 / ( 8 * 7))) * w + (B6 / ( 6 * 5))) * w + + (B4 / ( 4 * 3))) * w + (B2 / ( 2 * 1))) / x + + 0.5 * LOG_2PI - log(v) - x + (x - 0.5) * log(x); +} + +/* the natural logarithm of the absolute value of the Gamma function */ +double +lgamma_r(double x, int *signp) +{ + if (x <= 0) { + double i, f, s; + f = modf(-x, &i); + if (f == 0.0) { /* pole error */ + *signp = 1; + errno = ERANGE; + return HUGE_VAL; + } + *signp = (fmod(i, 2.0) != 0.0) ? 1 : -1; + s = sin(PI * f); + if (s < 0) s = -s; + return LOG_PI - log(s) - loggamma(1 - x); + } + *signp = 1; + return loggamma(x); +} diff --git a/lib/ruby-1.9.1-rc1/missing/memcmp.c b/lib/ruby-1.9.1-rc1/missing/memcmp.c new file mode 100644 index 0000000..5b3ad38 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/memcmp.c @@ -0,0 +1,17 @@ +/* public domain rewrite of memcmp(3) */ + +#include + +int +memcmp(const void *s1, const void *s2, size_t len) +{ + register unsigned char *a = (unsigned char*)s1; + register unsigned char *b = (unsigned char*)s2; + register int tmp; + + for (; len; --len) { + if (tmp = *a++ - *b++) + return tmp; + } + return 0; +} diff --git a/lib/ruby-1.9.1-rc1/missing/memmove.c b/lib/ruby-1.9.1-rc1/missing/memmove.c new file mode 100644 index 0000000..19c5f18 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/memmove.c @@ -0,0 +1,21 @@ +/* public domain rewrite of memcmp(3) */ + +#include + +void * +memmove(void *d, const void *s, size_t n) +{ + char *dst = (char *)d; + const char *src = (const char *)s; + + if (src < dst) { + src += n; + dst += n; + for (; n; --n) + *--dst = *--src; + } + else if (dst < src) + for (; n; --n) + *dst++ = *src++; + return d; +} diff --git a/lib/ruby-1.9.1-rc1/missing/os2.c b/lib/ruby-1.9.1-rc1/missing/os2.c new file mode 100644 index 0000000..3448cdc --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/os2.c @@ -0,0 +1,138 @@ +/* os/2 compatibility functions -- follows Ruby's license */ + +#include "ruby.h" +#include +#include +#include +#include +#include +#include + +#define INCL_DOS +#include + +int +chown(char *path, int owner, int group) +{ + return 0; +} + +#if 0 +int +link(char *from, char *to) +{ + return -1; +} +#endif + +#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD) \ + || defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR) +#include + +#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD) +/* to handle the drive letter and DBCS characters within a given path */ +char * +getcwd(char *path, size_t len) +{ + return _getcwd2(path, (int)len); +} +#endif + +#if defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR) +/* to handle the drive letter and DBCS characters within a given path */ +int +chdir(__const__ char *path) +{ + return _chdir2(path); +} +#endif +#endif + +typedef char* CHARP; + +int +do_spawn(cmd) +char *cmd; +{ + register char **a; + register char *s; + char **argv; + char *shell, *sw, *cmd2; + int status; + + if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') { + s = shell; + do + *s = isupper(*s) ? tolower(*s) : *s; + while (*++s); + if (strstr(shell, "cmd") || strstr(shell, "4os2")) + sw = "/c"; + else + sw = "-c"; + } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') { + s = shell; + do + *s = isupper(*s) ? tolower(*s) : *s; + while (*++s); + if (strstr(shell, "cmd") || strstr(shell, "4os2")) + sw = "/c"; + else + sw = "-c"; + } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') { + s = shell; + do + *s = isupper(*s) ? tolower(*s) : *s; + while (*++s); + if (strstr(shell, "cmd") || strstr(shell, "4os2")) + sw = "/c"; + else + sw = "-c"; + } + /* see if there are shell metacharacters in it */ + /*SUPPRESS 530*/ + /* for (s = cmd; *s && isalpha(*s); s++) ; + if (*s == '=') + goto doshell; */ + for (s = cmd; *s; s++) { + if (*sw == '-' && *s != ' ' && + !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) { + if (*s == '\n' && !s[1]) { + *s = '\0'; + break; + } + goto doshell; + } else if (*sw == '/' && *s != ' ' && + !isalpha(*s) && index("^()<>|&\n",*s)) { + if (*s == '\n' && !s[1]) { + *s = '\0'; + break; + } + doshell: + status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL); + return status; + } + } + argv = ALLOC_N(CHARP,(strlen(cmd) / 2 + 2)); + cmd2 = ALLOC_N(char, (strlen(cmd) + 1)); + strcpy(cmd2, cmd); + a = argv; + for (s = cmd2; *s;) { + while (*s && isspace(*s)) s++; + if (*s) + *(a++) = s; + while (*s && !isspace(*s)) s++; + if (*s) + *s++ = '\0'; + } + *a = NULL; + if (argv[0]) { + if ((status = spawnvp(P_WAIT, argv[0], argv)) == -1) { + free(argv); + free(cmd2); + return -1; + } + } + free(cmd2); + free(argv); + return status; +} diff --git a/lib/ruby-1.9.1-rc1/missing/strchr.c b/lib/ruby-1.9.1-rc1/missing/strchr.c new file mode 100644 index 0000000..bebd7ba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strchr.c @@ -0,0 +1,28 @@ +/* public domain rewrite of strchr(3) and strrchr(3) */ + +char * +strchr(const char *s, int c) +{ + if (c == 0) return (char *)s + strlen(s); + while (*s) { + if (*s == c) + return (char *)s; + s++; + } + return 0; +} + +char * +strrchr(const char *s, int c) +{ + const char *save; + + if (c == 0) return (char *)s + strlen(s); + save = 0; + while (*s) { + if (*s == c) + save = s; + s++; + } + return (char *)save; +} diff --git a/lib/ruby-1.9.1-rc1/missing/strerror.c b/lib/ruby-1.9.1-rc1/missing/strerror.c new file mode 100644 index 0000000..023935a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strerror.c @@ -0,0 +1,16 @@ +/* public domain rewrite of strerror(3) */ + +extern int sys_nerr; +extern char *sys_errlist[]; + +static char msg[50]; + +char * +strerror(int error) +{ + if (error <= sys_nerr && error > 0) { + return sys_errlist[error]; + } + sprintf(msg, "Unknown error (%d)", error); + return msg; +} diff --git a/lib/ruby-1.9.1-rc1/missing/strlcat.c b/lib/ruby-1.9.1-rc1/missing/strlcat.c new file mode 100644 index 0000000..b309648 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strlcat.c @@ -0,0 +1,73 @@ +/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */ + +/* + * Copyright (c) 1998 Todd C. Miller + * 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 ``AS IS'' AND ANY EXPRESS OR 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +size_t +strlcat(dst, src, siz) + char *dst; + const char *src; + size_t siz; +{ + register char *d = dst; + register const char *s = src; + register size_t n = siz; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return(dlen + strlen(s)); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return(dlen + (s - src)); /* count does not include NUL */ +} diff --git a/lib/ruby-1.9.1-rc1/missing/strlcpy.c b/lib/ruby-1.9.1-rc1/missing/strlcpy.c new file mode 100644 index 0000000..5f58696 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strlcpy.c @@ -0,0 +1,69 @@ +/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */ + +/* + * Copyright (c) 1998 Todd C. Miller + * 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 ``AS IS'' AND ANY EXPRESS OR 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. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +size_t +strlcpy(dst, src, siz) + char *dst; + const char *src; + size_t siz; +{ + register char *d = dst; + register const char *s = src; + register size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} diff --git a/lib/ruby-1.9.1-rc1/missing/strstr.c b/lib/ruby-1.9.1-rc1/missing/strstr.c new file mode 100644 index 0000000..2e9c282 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strstr.c @@ -0,0 +1,25 @@ +/* public domain rewrite of strstr(3) */ + +char * +strstr(const char *haystack, const char *needle) +{ + const char *hend; + const char *a, *b; + + if (*needle == 0) return (char *)haystack; + hend = haystack + strlen(haystack) - strlen(needle) + 1; + while (haystack < hend) { + if (*haystack == *needle) { + a = haystack; + b = needle; + for (;;) { + if (*b == 0) return (char *)haystack; + if (*a++ != *b++) { + break; + } + } + } + haystack++; + } + return 0; +} diff --git a/lib/ruby-1.9.1-rc1/missing/strtol.c b/lib/ruby-1.9.1-rc1/missing/strtol.c new file mode 100644 index 0000000..da6636f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/strtol.c @@ -0,0 +1,26 @@ +/* public domain rewrite of strtol(3) */ + +#include + +long +strtol(const char *nptr, char **endptr, int base) +{ + long result; + const char *p = nptr; + + while (isspace(*p)) { + p++; + } + if (*p == '-') { + p++; + result = -strtoul(p, endptr, base); + } + else { + if (*p == '+') p++; + result = strtoul(p, endptr, base); + } + if (endptr != 0 && *endptr == p) { + *endptr = (char *)nptr; + } + return result; +} diff --git a/lib/ruby-1.9.1-rc1/missing/tgamma.c b/lib/ruby-1.9.1-rc1/missing/tgamma.c new file mode 100644 index 0000000..5e306fb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/tgamma.c @@ -0,0 +1,92 @@ +/* tgamma.c - public domain implementation of function tgamma(3m) + +reference - Haruhiko Okumura: C-gengo niyoru saishin algorithm jiten + (New Algorithm handbook in C language) (Gijyutsu hyouron + sha, Tokyo, 1991) [in Japanese] + http://oku.edu.mie-u.ac.jp/~okumura/algo/ +*/ + +/*********************************************************** + gamma.c -- Gamma function +***********************************************************/ +#include "ruby/config.h" +#include +#include + +#ifdef HAVE_LGAMMA_R + +double tgamma(double x) +{ + int sign; + double d; + if (x == 0.0) { /* Pole Error */ + errno = ERANGE; + return 1/x < 0 ? -HUGE_VAL : HUGE_VAL; + } + if (x < 0) { + static double zero = 0.0; + double i, f; + f = modf(-x, &i); + if (f == 0.0) { /* Domain Error */ + errno = EDOM; + return zero/zero; + } + } + d = lgamma_r(x, &sign); + return sign * exp(d); +} + +#else + +#include +#define PI 3.14159265358979324 /* $\pi$ */ +#define LOG_2PI 1.83787706640934548 /* $\log 2\pi$ */ +#define N 8 + +#define B0 1 /* Bernoulli numbers */ +#define B1 (-1.0 / 2.0) +#define B2 ( 1.0 / 6.0) +#define B4 (-1.0 / 30.0) +#define B6 ( 1.0 / 42.0) +#define B8 (-1.0 / 30.0) +#define B10 ( 5.0 / 66.0) +#define B12 (-691.0 / 2730.0) +#define B14 ( 7.0 / 6.0) +#define B16 (-3617.0 / 510.0) + +static double +loggamma(double x) /* the natural logarithm of the Gamma function. */ +{ + double v, w; + + v = 1; + while (x < N) { v *= x; x++; } + w = 1 / (x * x); + return ((((((((B16 / (16 * 15)) * w + (B14 / (14 * 13))) * w + + (B12 / (12 * 11))) * w + (B10 / (10 * 9))) * w + + (B8 / ( 8 * 7))) * w + (B6 / ( 6 * 5))) * w + + (B4 / ( 4 * 3))) * w + (B2 / ( 2 * 1))) / x + + 0.5 * LOG_2PI - log(v) - x + (x - 0.5) * log(x); +} + +double tgamma(double x) /* Gamma function */ +{ + if (x == 0.0) { /* Pole Error */ + errno = ERANGE; + return 1/x < 0 ? -HUGE_VAL : HUGE_VAL; + } + if (x < 0) { + int sign; + static double zero = 0.0; + double i, f; + f = modf(-x, &i); + if (f == 0.0) { /* Domain Error */ + errno = EDOM; + return zero/zero; + } + sign = (fmod(i, 2.0) != 0.0) ? 1 : -1; + return sign * PI / (sin(PI * f) * exp(loggamma(1 - x))); + } + return exp(loggamma(x)); +} +#endif diff --git a/lib/ruby-1.9.1-rc1/missing/vsnprintf.c b/lib/ruby-1.9.1-rc1/missing/vsnprintf.c new file mode 100644 index 0000000..1ea2f14 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/missing/vsnprintf.c @@ -0,0 +1,1207 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * 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. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * IMPORTANT NOTE: + * -------------- + * From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + * paragraph 3 above is now null and void. + */ + +/* SNPRINTF.C + * fjc 7-31-97 Modified by Mib Software to be a standalone snprintf.c module. + * http://www.mibsoftware.com + * Mib Software does not warrant this software any differently than the + * University of California, Berkeley as described above. All warranties + * are disclaimed. Use this software at your own risk. + * + * All code referencing FILE * functions was eliminated, since it could + * never be called. All header files and necessary files are collapsed + * into one file, internal functions are declared static. This should + * allow inclusion into libraries with less chance of namespace collisions. + * + * snprintf should be the only externally visible item. + * + * As of 7-31-97 FLOATING_POINT is NOT provided. The code is somewhat + * non-portable, so it is disabled. + */ + +/* Define FLOATING_POINT to get floating point. */ +/* +#define FLOATING_POINT +*/ + +#include +#define u_long unsigned long +#define u_short unsigned short +#define u_int unsigned int + +#if !defined(HAVE_STDARG_PROTOTYPES) +#if defined(__STDC__) +#define HAVE_STDARG_PROTOTYPES 1 +#endif +#endif + +#undef __P +#if defined(HAVE_STDARG_PROTOTYPES) +# include +# if !defined(__P) +# define __P(x) x +# endif +#else +# define __P(x) () +# if !defined(const) +# define const +# endif +# include +#endif +#ifndef _BSD_VA_LIST_ +#define _BSD_VA_LIST_ va_list +#endif + +#ifdef __STDC__ +# include +#else +# ifndef LONG_MAX +# ifdef HAVE_LIMITS_H +# include +# else + /* assuming 32bit(2's compliment) long */ +# define LONG_MAX 2147483647 +# endif +# endif +#endif + +#if defined(__hpux) && !defined(__GNUC__) && !defined(__STDC__) +#define const +#endif + +#if defined(sgi) +#undef __const +#define __const +#endif /* People who don't like const sys_error */ + +#include +#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC) +#include +#endif + +#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__) +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +/* + * NB: to fit things in six character monocase externals, the stdio + * code uses the prefix `__s' for stdio objects, typically followed + * by a three-character attempt at a mnemonic. + */ + +/* stdio buffers */ +struct __sbuf { + unsigned char *_base; + size_t _size; +}; + + +/* + * stdio state variables. + * + * The following always hold: + * + * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), + * _lbfsize is -_bf._size, else _lbfsize is 0 + * if _flags&__SRD, _w is 0 + * if _flags&__SWR, _r is 0 + * + * This ensures that the getc and putc macros (or inline functions) never + * try to write or read from a file that is in `read' or `write' mode. + * (Moreover, they can, and do, automatically switch from read mode to + * write mode, and back, on "r+" and "w+" files.) + * + * _lbfsize is used only to make the inline line-buffered output stream + * code as compact as possible. + * + * _ub, _up, and _ur are used when ungetc() pushes back more characters + * than fit in the current _bf, or when ungetc() pushes back a character + * that does not match the previous one in _bf. When this happens, + * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff + * _ub._base!=NULL) and _up and _ur save the current values of _p and _r. + * + * NB: see WARNING above before changing the layout of this structure! + */ +typedef struct __sFILE { + unsigned char *_p; /* current position in (some) buffer */ +#if 0 + size_t _r; /* read space left for getc() */ +#endif + size_t _w; /* write space left for putc() */ + short _flags; /* flags, below; this FILE is free if 0 */ + short _file; /* fileno, if Unix descriptor, else -1 */ + struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */ + size_t _lbfsize; /* 0 or -_bf._size, for inline putc */ + int (*vwrite)(/* struct __sFILE*, struct __suio * */); +} FILE; + + +#define __SLBF 0x0001 /* line buffered */ +#define __SNBF 0x0002 /* unbuffered */ +#define __SRD 0x0004 /* OK to read */ +#define __SWR 0x0008 /* OK to write */ + /* RD and WR are never simultaneously asserted */ +#define __SRW 0x0010 /* open for reading & writing */ +#define __SEOF 0x0020 /* found EOF */ +#define __SERR 0x0040 /* found error */ +#define __SMBF 0x0080 /* _buf is from malloc */ +#define __SAPP 0x0100 /* fdopen()ed in append mode */ +#define __SSTR 0x0200 /* this is an sprintf/snprintf string */ +#define __SOPT 0x0400 /* do fseek() optimisation */ +#define __SNPT 0x0800 /* do not do fseek() optimisation */ +#define __SOFF 0x1000 /* set iff _offset is in fact correct */ +#define __SMOD 0x2000 /* true => fgetln modified _p text */ + + +#define EOF (-1) + + +#define __sfeof(p) (((p)->_flags & __SEOF) != 0) +#define __sferror(p) (((p)->_flags & __SERR) != 0) +#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) +#define __sfileno(p) ((p)->_file) + +#undef feof +#undef ferror +#undef clearerr +#define feof(p) __sfeof(p) +#define ferror(p) __sferror(p) +#define clearerr(p) __sclearerr(p) + +#ifndef _ANSI_SOURCE +#define fileno(p) __sfileno(p) +#endif + + +/* + * I/O descriptors for __sfvwrite(). + */ +struct __siov { + const void *iov_base; + size_t iov_len; +}; +struct __suio { + struct __siov *uio_iov; + int uio_iovcnt; + int uio_resid; +}; + +#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_SNPRINTF) +/* + * Write some memory regions. Return zero on success, EOF on error. + * + * This routine is large and unsightly, but most of the ugliness due + * to the three different kinds of output buffering is handled here. + */ +static int BSD__sfvwrite(fp, uio) + register FILE *fp; + register struct __suio *uio; +{ + register size_t len; + register const char *p; + register struct __siov *iov; + register int w; + + if ((len = uio->uio_resid) == 0) + return (0); +#ifndef __hpux +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) + + iov = uio->uio_iov; + p = iov->iov_base; + len = iov->iov_len; + iov++; +#define GETIOV(extra_work) \ + while (len == 0) { \ + extra_work; \ + p = iov->iov_base; \ + len = iov->iov_len; \ + iov++; \ + } + if (fp->_flags & __SNBF) { + /* fjc 7-31-97 Will never happen. We are working with + strings only + */ + } else if ((fp->_flags & __SLBF) == 0) { + /* + * Fully buffered: fill partially full buffer, if any, + * and then flush. If there is no partial buffer, write + * one _bf._size byte chunk directly (without copying). + * + * String output is a special case: write as many bytes + * as fit, but pretend we wrote everything. This makes + * snprintf() return the number of bytes needed, rather + * than the number used, and avoids its write function + * (so that the write function can be invalid). + */ + do { + GETIOV(;); + w = fp->_w; + if (fp->_flags & __SSTR) { + if (len < w) + w = len; + COPY(w); /* copy MIN(fp->_w,len), */ + fp->_w -= w; + fp->_p += w; + w = len; /* but pretend copied all */ + } else { + /* fjc 7-31-97 Will never happen. We are working with + strings only + */ + } + p += w; + len -= w; + } while ((uio->uio_resid -= w) != 0); + } else { + /* fjc 7-31-97 Will never happen. We are working with + strings only + */ + } + return (0); +} +#endif + +/* + * Actual printf innards. + * + * This code is large and complicated... + */ + +/* + * Flush out all the vectors defined by the given uio, + * then reset it so that it can be reused. + */ +static int +BSD__sprint(FILE *fp, register struct __suio *uio) +{ + register int err; + + if (uio->uio_resid == 0) { + uio->uio_iovcnt = 0; + return (0); + } + err = (*fp->vwrite)(fp, uio); + uio->uio_resid = 0; + uio->uio_iovcnt = 0; + return (err); +} + + +/* + * Helper function for `fprintf to unbuffered unix file': creates a + * temporary buffer. We only work on write-only files; this avoids + * worries about ungetc buffers and so forth. + */ +static int +BSD__sbprintf(register FILE *fp, const char *fmt, va_list ap) +{ +/* We don't support files. */ + return 0; +} + + +/* + * Macros for converting digits to letters and vice versa + */ +#define to_digit(c) ((c) - '0') +#define is_digit(c) ((unsigned)to_digit(c) <= 9) +#define to_char(n) ((n) + '0') + +#ifdef _HAVE_SANE_QUAD_ +/* + * Convert an unsigned long long to ASCII for printf purposes, returning + * a pointer to the first character of the string representation. + * Octal numbers can be forced to have a leading zero; hex numbers + * use the given digits. + */ +static char * +BSD__uqtoa(register u_quad_t val, char *endp, int base, int octzero, const char *xdigs) +{ + register char *cp = endp; + register long sval; + + /* + * Handle the three cases separately, in the hope of getting + * better/faster code. + */ + switch (base) { + case 10: + if (val < 10) { /* many numbers are 1 digit */ + *--cp = to_char(val); + return (cp); + } + /* + * On many machines, unsigned arithmetic is harder than + * signed arithmetic, so we do at most one unsigned mod and + * divide; this is sufficient to reduce the range of + * the incoming value to where signed arithmetic works. + */ + if (val > LLONG_MAX) { + *--cp = to_char(val % 10); + sval = val / 10; + } else + sval = val; + do { + *--cp = to_char(sval % 10); + sval /= 10; + } while (sval != 0); + break; + + case 8: + do { + *--cp = to_char(val & 7); + val >>= 3; + } while (val); + if (octzero && *cp != '0') + *--cp = '0'; + break; + + case 16: + do { + *--cp = xdigs[val & 15]; + val >>= 4; + } while (val); + break; + + default: /* oops */ + /* + abort(); + */ + break; /* fjc 7-31-97. Don't reference abort() here */ + } + return (cp); +} +#endif /* _HAVE_SANE_QUAD_ */ + +/* + * Convert an unsigned long to ASCII for printf purposes, returning + * a pointer to the first character of the string representation. + * Octal numbers can be forced to have a leading zero; hex numbers + * use the given digits. + */ +static char * +BSD__ultoa(register u_long val, char *endp, int base, int octzero, const char *xdigs) +{ + register char *cp = endp; + register long sval; + + /* + * Handle the three cases separately, in the hope of getting + * better/faster code. + */ + switch (base) { + case 10: + if (val < 10) { /* many numbers are 1 digit */ + *--cp = to_char(val); + return (cp); + } + /* + * On many machines, unsigned arithmetic is harder than + * signed arithmetic, so we do at most one unsigned mod and + * divide; this is sufficient to reduce the range of + * the incoming value to where signed arithmetic works. + */ + if (val > LONG_MAX) { + *--cp = to_char(val % 10); + sval = val / 10; + } else + sval = val; + do { + *--cp = to_char(sval % 10); + sval /= 10; + } while (sval != 0); + break; + + case 8: + do { + *--cp = to_char(val & 7); + val >>= 3; + } while (val); + if (octzero && *cp != '0') + *--cp = '0'; + break; + + case 16: + do { + *--cp = xdigs[val & 15]; + val >>= 4; + } while (val); + break; + + default: /* oops */ + /* + abort(); + */ + break; /* fjc 7-31-97. Don't reference abort() here */ + } + return (cp); +} + +#ifdef FLOATING_POINT +#include +/* #include "floatio.h" */ + +#ifndef MAXEXP +# define MAXEXP 1024 +#endif + +#ifndef MAXFRACT +# define MAXFRACT 64 +#endif + +#define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */ +#define DEFPREC 6 + +static char *cvt __P((double, int, int, char *, int *, int, int *)); +static int exponent __P((char *, int, int)); + +#else /* no FLOATING_POINT */ + +#define BUF 68 + +#endif /* FLOATING_POINT */ + + +/* + * Flags used during conversion. + */ +#define ALT 0x001 /* alternate form */ +#define HEXPREFIX 0x002 /* add 0x or 0X prefix */ +#define LADJUST 0x004 /* left adjustment */ +#define LONGDBL 0x008 /* long double; unimplemented */ +#define LONGINT 0x010 /* long integer */ + +#ifdef _HAVE_SANE_QUAD_ +#define QUADINT 0x020 /* quad integer */ +#endif /* _HAVE_SANE_QUAD_ */ + +#define SHORTINT 0x040 /* short integer */ +#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */ +#define FPT 0x100 /* Floating point number */ +static int +BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap) +{ + register const char *fmt; /* format string */ + register int ch; /* character from fmt */ + register int n; /* handy integer (short term usage) */ + register const char *cp;/* handy char pointer (short term usage) */ + register struct __siov *iovp;/* for PRINT macro */ + register int flags; /* flags as above */ + int ret; /* return value accumulator */ + int width; /* width from format (%8d), or 0 */ + int prec; /* precision from format (%.3d), or -1 */ + char sign; /* sign prefix (' ', '+', '-', or \0) */ +#ifdef FLOATING_POINT + char softsign; /* temporary negative sign for floats */ + double _double = 0; /* double precision arguments %[eEfgG] */ + int expt; /* integer value of exponent */ + int expsize = 0; /* character count for expstr */ + int ndig = 0; /* actual number of digits returned by cvt */ + char expstr[7]; /* buffer for exponent string */ +#endif + u_long ulval; /* integer arguments %[diouxX] */ +#ifdef _HAVE_SANE_QUAD_ + u_quad_t uqval; /* %q integers */ +#endif /* _HAVE_SANE_QUAD_ */ + int base; /* base for [diouxX] conversion */ + int dprec; /* a copy of prec if [diouxX], 0 otherwise */ + int fieldsz; /* field size expanded by sign, etc */ + int realsz; /* field size expanded by dprec */ + int size; /* size of converted field or string */ + const char *xdigs = 0; /* digits for [xX] conversion */ +#define NIOV 8 + struct __suio uio; /* output information: summary */ + struct __siov iov[NIOV];/* ... and individual io vectors */ + char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ + char ox[2]; /* space for 0x hex-prefix */ + char *const ebuf = buf + sizeof(buf); + + /* + * Choose PADSIZE to trade efficiency vs. size. If larger printf + * fields occur frequently, increase PADSIZE and make the initializers + * below longer. + */ +#define PADSIZE 16 /* pad chunk size */ + static const char blanks[PADSIZE] = + {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}; + static const char zeroes[PADSIZE] = + {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}; + + /* + * BEWARE, these `goto error' on error, and PAD uses `n'. + */ +#define PRINT(ptr, len) { \ + iovp->iov_base = (ptr); \ + iovp->iov_len = (len); \ + uio.uio_resid += (len); \ + iovp++; \ + if (++uio.uio_iovcnt >= NIOV) { \ + if (BSD__sprint(fp, &uio)) \ + goto error; \ + iovp = iov; \ + } \ +} +#define PAD(howmany, with) { \ + if ((n = (howmany)) > 0) { \ + while (n > PADSIZE) { \ + PRINT(with, PADSIZE); \ + n -= PADSIZE; \ + } \ + PRINT(with, n); \ + } \ +} +#define FLUSH() { \ + if (uio.uio_resid && BSD__sprint(fp, &uio)) \ + goto error; \ + uio.uio_iovcnt = 0; \ + iovp = iov; \ +} + + /* + * To extend shorts properly, we need both signed and unsigned + * argument extraction methods. + */ +#define SARG() \ + (flags&LONGINT ? va_arg(ap, long) : \ + flags&SHORTINT ? (long)(short)va_arg(ap, int) : \ + (long)va_arg(ap, int)) +#define UARG() \ + (flags&LONGINT ? va_arg(ap, u_long) : \ + flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \ + (u_long)va_arg(ap, u_int)) + + /* optimise fprintf(stderr) (and other unbuffered Unix files) */ + if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && + fp->_file >= 0) + return (BSD__sbprintf(fp, fmt0, ap)); + + fmt = fmt0; + uio.uio_iov = iovp = iov; + uio.uio_resid = 0; + uio.uio_iovcnt = 0; + ret = 0; + xdigs = 0; + + /* + * Scan the format for conversions (`%' character). + */ + for (;;) { + for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++) + /* void */; + if ((n = fmt - cp) != 0) { + PRINT(cp, n); + ret += n; + } + if (ch == '\0') + goto done; + fmt++; /* skip over '%' */ + + flags = 0; + dprec = 0; + width = 0; + prec = -1; + sign = '\0'; + +rflag: ch = *fmt++; +reswitch: switch (ch) { + case ' ': + /* + * ``If the space and + flags both appear, the space + * flag will be ignored.'' + * -- ANSI X3J11 + */ + if (!sign) + sign = ' '; + goto rflag; + case '#': + flags |= ALT; + goto rflag; + case '*': + /* + * ``A negative field width argument is taken as a + * - flag followed by a positive field width.'' + * -- ANSI X3J11 + * They don't exclude field widths read from args. + */ + if ((width = va_arg(ap, int)) >= 0) + goto rflag; + width = -width; + /* FALLTHROUGH */ + case '-': + flags |= LADJUST; + goto rflag; + case '+': + sign = '+'; + goto rflag; + case '.': + if ((ch = *fmt++) == '*') { + n = va_arg(ap, int); + prec = n < 0 ? -1 : n; + goto rflag; + } + n = 0; + while (is_digit(ch)) { + n = 10 * n + to_digit(ch); + ch = *fmt++; + } + prec = n < 0 ? -1 : n; + goto reswitch; + case '0': + /* + * ``Note that 0 is taken as a flag, not as the + * beginning of a field width.'' + * -- ANSI X3J11 + */ + flags |= ZEROPAD; + goto rflag; + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + n = 0; + do { + n = 10 * n + to_digit(ch); + ch = *fmt++; + } while (is_digit(ch)); + width = n; + goto reswitch; +#ifdef FLOATING_POINT + case 'L': + flags |= LONGDBL; + goto rflag; +#endif + case 'h': + flags |= SHORTINT; + goto rflag; + case 'l': + flags |= LONGINT; + goto rflag; +#ifdef _HAVE_SANE_QUAD_ + case 'q': + flags |= QUADINT; + goto rflag; +#endif /* _HAVE_SANE_QUAD_ */ + case 'c': + cp = buf; + *buf = (char)va_arg(ap, int); + size = 1; + sign = '\0'; + break; + case 'D': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'd': + case 'i': +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) { + uqval = va_arg(ap, quad_t); + if ((quad_t)uqval < 0) { + uqval = -uqval; + sign = '-'; + } + } else +#endif /* _HAVE_SANE_QUAD_ */ + { + ulval = SARG(); + if ((long)ulval < 0) { + ulval = -ulval; + sign = '-'; + } + } + base = 10; + goto number; +#ifdef FLOATING_POINT + case 'e': /* anomalous precision */ + case 'E': + if (prec != 0) + flags |= ALT; + prec = (prec == -1) ? + DEFPREC + 1 : prec + 1; + /* FALLTHROUGH */ + goto fp_begin; + case 'f': /* always print trailing zeroes */ + if (prec != 0) + flags |= ALT; + case 'g': + case 'G': + if (prec == -1) + prec = DEFPREC; +fp_begin: _double = va_arg(ap, double); + /* do this before tricky precision changes */ + if (isinf(_double)) { + if (_double < 0) + sign = '-'; + cp = "Inf"; + size = 3; + break; + } + if (isnan(_double)) { + cp = "NaN"; + size = 3; + break; + } + flags |= FPT; + cp = cvt(_double, prec, flags, &softsign, + &expt, ch, &ndig); + if (ch == 'g' || ch == 'G') { + if (expt <= -4 || (expt > prec && expt > 1)) + ch = (ch == 'g') ? 'e' : 'E'; + else + ch = 'g'; + } + if (ch <= 'e') { /* 'e' or 'E' fmt */ + --expt; + expsize = exponent(expstr, expt, ch); + size = expsize + ndig; + if (ndig > 1 || flags & ALT) + ++size; + } else if (ch == 'f') { /* f fmt */ + if (expt > 0) { + size = expt; + if (prec || flags & ALT) + size += prec + 1; + } else if (!prec) { /* "0" */ + size = 1; + } else /* "0.X" */ + size = prec + 2; + } else if (expt >= ndig) { /* fixed g fmt */ + size = expt; + if (flags & ALT) + ++size; + } else + size = ndig + (expt > 0 ? + 1 : 2 - expt); + + if (softsign) + sign = '-'; + break; +#endif /* FLOATING_POINT */ + case 'n': +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) + *va_arg(ap, quad_t *) = ret; + else if (flags & LONGINT) +#else /* _HAVE_SANE_QUAD_ */ + if (flags & LONGINT) +#endif /* _HAVE_SANE_QUAD_ */ + *va_arg(ap, long *) = ret; + else if (flags & SHORTINT) + *va_arg(ap, short *) = ret; + else + *va_arg(ap, int *) = ret; + continue; /* no output */ + case 'O': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'o': +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) + uqval = va_arg(ap, u_quad_t); + else +#endif /* _HAVE_SANE_QUAD_ */ + ulval = UARG(); + base = 8; + goto nosign; + case 'p': + /* + * ``The argument shall be a pointer to void. The + * value of the pointer is converted to a sequence + * of printable characters, in an implementation- + * defined manner.'' + * -- ANSI X3J11 + */ + prec = sizeof(void*)*CHAR_BIT/4; +#ifdef _HAVE_LLP64_ + uqval = (u_long)va_arg(ap, void *); + flags = (flags) | QUADINT | HEXPREFIX; +#else + ulval = (u_long)va_arg(ap, void *); +#ifdef _HAVE_SANE_QUAD_ + flags = (flags & ~QUADINT) | HEXPREFIX; +#else /* _HAVE_SANE_QUAD_ */ + flags = (flags) | HEXPREFIX; +#endif /* _HAVE_SANE_QUAD_ */ +#endif + base = 16; + xdigs = "0123456789abcdef"; + ch = 'x'; + goto nosign; + case 's': + if ((cp = va_arg(ap, char *)) == NULL) + cp = "(null)"; + if (prec >= 0) { + /* + * can't use strlen; can only look for the + * NUL in the first `prec' characters, and + * strlen() will go further. + */ + const char *p = (char *)memchr(cp, 0, prec); + + if (p != NULL) { + size = p - cp; + if (size > prec) + size = prec; + } else + size = prec; + } else + size = strlen(cp); + sign = '\0'; + break; + case 'U': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'u': +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) + uqval = va_arg(ap, u_quad_t); + else +#endif /* _HAVE_SANE_QUAD_ */ + ulval = UARG(); + base = 10; + goto nosign; + case 'X': + xdigs = "0123456789ABCDEF"; + goto hex; + case 'x': + xdigs = "0123456789abcdef"; +hex: +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) + uqval = va_arg(ap, u_quad_t); + else +#endif /* _HAVE_SANE_QUAD_ */ + ulval = UARG(); + base = 16; + /* leading 0x/X only if non-zero */ + if (flags & ALT && +#ifdef _HAVE_SANE_QUAD_ + (flags & QUADINT ? uqval != 0 : ulval != 0) +#else /* _HAVE_SANE_QUAD_ */ + ulval != 0 +#endif /* _HAVE_SANE_QUAD_ */ + ) + flags |= HEXPREFIX; + + /* unsigned conversions */ +nosign: sign = '\0'; + /* + * ``... diouXx conversions ... if a precision is + * specified, the 0 flag will be ignored.'' + * -- ANSI X3J11 + */ +number: if ((dprec = prec) >= 0) + flags &= ~ZEROPAD; + + /* + * ``The result of converting a zero value with an + * explicit precision of zero is no characters.'' + * -- ANSI X3J11 + */ +#ifdef _HAVE_SANE_QUAD_ + if (flags & QUADINT) { + if (uqval != 0 || prec != 0) + cp = BSD__uqtoa(uqval, ebuf, base, + flags & ALT, xdigs); + } else +#else /* _HAVE_SANE_QUAD_ */ +#endif /* _HAVE_SANE_QUAD_ */ + { + if (ulval != 0 || prec != 0) + cp = BSD__ultoa(ulval, ebuf, base, + flags & ALT, xdigs); + } + size = ebuf - cp; + break; + default: /* "%?" prints ?, unless ? is NUL */ + if (ch == '\0') + goto done; + /* pretend it was %c with argument ch */ + cp = buf; + *buf = ch; + size = 1; + sign = '\0'; + break; + } + + /* + * All reasonable formats wind up here. At this point, `cp' + * points to a string which (if not flags&LADJUST) should be + * padded out to `width' places. If flags&ZEROPAD, it should + * first be prefixed by any sign or other prefix; otherwise, + * it should be blank padded before the prefix is emitted. + * After any left-hand padding and prefixing, emit zeroes + * required by a decimal [diouxX] precision, then print the + * string proper, then emit zeroes required by any leftover + * floating precision; finally, if LADJUST, pad with blanks. + * + * Compute actual size, so we know how much to pad. + * fieldsz excludes decimal prec; realsz includes it. + */ + fieldsz = size; + if (sign) + fieldsz++; + else if (flags & HEXPREFIX) + fieldsz += 2; + realsz = dprec > fieldsz ? dprec : fieldsz; + + /* right-adjusting blank padding */ + if ((flags & (LADJUST|ZEROPAD)) == 0) + PAD(width - realsz, blanks); + + /* prefix */ + if (sign) { + PRINT(&sign, 1); + } else if (flags & HEXPREFIX) { + ox[0] = '0'; + ox[1] = ch; + PRINT(ox, 2); + } + + /* right-adjusting zero padding */ + if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) + PAD(width - realsz, zeroes); + + /* leading zeroes from decimal precision */ + PAD(dprec - fieldsz, zeroes); + + /* the string or number proper */ +#ifdef FLOATING_POINT + if ((flags & FPT) == 0) { + PRINT(cp, size); + } else { /* glue together f_p fragments */ + if (ch >= 'f') { /* 'f' or 'g' */ + if (_double == 0) { + /* kludge for __dtoa irregularity */ + if (ndig <= 1 && + (flags & ALT) == 0) { + PRINT("0", 1); + } else { + PRINT("0.", 2); + PAD(ndig - 1, zeroes); + } + } else if (expt == 0 && ndig == 0 && (flags & ALT) == 0) { + PRINT("0", 1); + } else if (expt <= 0) { + PRINT("0.", 2); + PAD(-expt, zeroes); + PRINT(cp, ndig); + } else if (expt >= ndig) { + PRINT(cp, ndig); + PAD(expt - ndig, zeroes); + if (flags & ALT) + PRINT(".", 1); + } else { + PRINT(cp, expt); + cp += expt; + PRINT(".", 1); + PRINT(cp, ndig-expt); + } + } else { /* 'e' or 'E' */ + if (ndig > 1 || flags & ALT) { + ox[0] = *cp++; + ox[1] = '.'; + PRINT(ox, 2); + if (_double || flags & ALT == 0) { + PRINT(cp, ndig-1); + } else /* 0.[0..] */ + /* __dtoa irregularity */ + PAD(ndig - 1, zeroes); + } else /* XeYYY */ + PRINT(cp, 1); + PRINT(expstr, expsize); + } + } +#else + PRINT(cp, size); +#endif + /* left-adjusting padding (always blank) */ + if (flags & LADJUST) + PAD(width - realsz, blanks); + + /* finally, adjust ret */ + ret += width > realsz ? width : realsz; + + FLUSH(); /* copy out the I/O vectors */ + } +done: + FLUSH(); +error: + return (__sferror(fp) ? EOF : ret); + /* NOTREACHED */ +} + +#ifdef FLOATING_POINT + +extern char *BSD__dtoa __P((double, int, int, int *, int *, char **)); + +static char * +cvt(value, ndigits, flags, sign, decpt, ch, length) + double value; + int ndigits, flags, *decpt, ch, *length; + char *sign; +{ + int mode, dsgn; + char *digits, *bp, *rve; + + if (ch == 'f') + mode = 3; + else { + mode = 2; + } + if (value < 0) { + value = -value; + *sign = '-'; + } else if (value == 0.0 && 1.0/value < 0) { + *sign = '-'; + } else { + *sign = '\000'; + } + digits = BSD__dtoa(value, mode, ndigits, decpt, &dsgn, &rve); + if (flags & ALT) { /* Print trailing zeros */ + bp = digits + ndigits; + if (ch == 'f') { + if (*digits == '0' && value) + *decpt = -ndigits + 1; + bp += *decpt; + } + if (value == 0) /* kludge for __dtoa irregularity */ + rve = bp; + while (rve < bp) + *rve++ = '0'; + } + *length = rve - digits; + return (digits); +} + +static int +exponent(p0, exp, fmtch) + char *p0; + int exp, fmtch; +{ + register char *p, *t; + char expbuf[MAXEXP]; + + p = p0; + *p++ = fmtch; + if (exp < 0) { + exp = -exp; + *p++ = '-'; + } + else + *p++ = '+'; + t = expbuf + MAXEXP; + if (exp > 9) { + do { + *--t = to_char(exp % 10); + } while ((exp /= 10) > 9); + *--t = to_char(exp); + for (; t < expbuf + MAXEXP; *p++ = *t++); + } + else { + *p++ = '0'; + *p++ = to_char(exp); + } + return (p - p0); +} +#endif /* FLOATING_POINT */ + +#ifndef HAVE_VSNPRINTF +int +vsnprintf(str, n, fmt, ap) + char *str; + size_t n; + const char *fmt; + _BSD_VA_LIST_ ap; +{ + int ret; + FILE f; + + if ((int)n < 1) + return (EOF); + f._flags = __SWR | __SSTR; + f._bf._base = f._p = (unsigned char *)str; + f._bf._size = f._w = n - 1; + f.vwrite = BSD__sfvwrite; + ret = BSD_vfprintf(&f, fmt, ap); + *f._p = 0; + return (ret); +} +#endif + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +#ifndef HAVE_SNPRINTF +int +#if defined(HAVE_STDARG_PROTOTYPES) +snprintf(char *str, size_t n, char const *fmt, ...) +#else +snprintf(str, n, fmt, va_alist) +char *str, *fmt; +size_t n; +va_dcl +#endif +{ + int ret; + va_list ap; + FILE f; + + if ((int)n < 1) + return (EOF); + +#if defined(HAVE_STDARG_PROTOTYPES) + va_start(ap, fmt); +#else + va_start(ap); +#endif + f._flags = __SWR | __SSTR; + f._bf._base = f._p = (unsigned char *)str; + f._bf._size = f._w = n - 1; + f.vwrite = BSD__sfvwrite; + ret = BSD_vfprintf(&f, fmt, ap); + *f._p = 0; + va_end(ap); + return (ret); +} +#endif diff --git a/lib/ruby-1.9.1-rc1/mkconfig.rb b/lib/ruby-1.9.1-rc1/mkconfig.rb new file mode 100755 index 0000000..d6a9d03 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/mkconfig.rb @@ -0,0 +1,195 @@ +#!./miniruby -s + +# avoid warnings with -d. +$install_name ||= nil +$so_name ||= nil + +srcdir = File.dirname(__FILE__) +$:.replace [srcdir+"/lib"] unless defined?(CROSS_COMPILING) +$:.unshift(".") + +require "fileutils" +mkconfig = File.basename($0) + +rbconfig_rb = ARGV[0] || 'rbconfig.rb' +unless File.directory?(dir = File.dirname(rbconfig_rb)) + FileUtils.makedirs(dir, :verbose => true) +end + +version = RUBY_VERSION +config = "" +def config.write(arg) + concat(arg.to_s) +end +$stdout = config + +fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE} +print %[ +# This file was created by #{mkconfig} when ruby was built. Any +# changes made to this file will be lost the next time ruby is built. + +module RbConfig + RUBY_VERSION == "#{version}" or + raise "ruby lib version (#{version}) doesn't match executable version (\#{RUBY_VERSION})" + +] + +v_fast = [] +v_others = [] +vars = {} +has_version = false +continued_name = nil +continued_line = nil +File.foreach "config.status" do |line| + next if /^#/ =~ line + name = nil + case line + when /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/ + name = $2 + val = $3.gsub(/\\(?=,)/, '') + when /^S\["(\w+)"\]\s*=\s*"(.*)"\s*(\\)?$/ + name = $1 + val = $2 + if $3 + continued_line = [] + continued_line << val + continued_name = name + next + end + when /^"(.*)"\s*(\\)?$/ + if continued_line + continued_line << $1 + next if $2 + val = continued_line.join("") + name = continued_name + continued_line = nil + end + when /^(?:ac_given_)?INSTALL=(.*)/ + v_fast << " CONFIG[\"INSTALL\"] = " + $1 + "\n" + end + + if name + next if /^(?:ac_.*|configure_input|(?:top_)?srcdir|\w+OBJS)$/ =~ name + next if /^\$\(ac_\w+\)$/ =~ val + next if /^\$\{ac_\w+\}$/ =~ val + next if /^\$ac_\w+$/ =~ val + next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name + next if $so_name and /^RUBY_SO_NAME$/ =~ name + next if /^(?:X|(?:MINI|RUN)RUBY$)/ =~ name + if /^program_transform_name$/ =~ name and /^s(\\?.)(.*)\1$/ =~ val + next if $install_name + sep = %r"#{Regexp.quote($1)}" + ptn = $2.sub(/\$\$/, '$').split(sep, 2) + name = "ruby_install_name" + val = "ruby".sub(/#{ptn[0]}/, ptn[1]) + end + val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM + val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + if /^prefix$/ =~ name + val = "(TOPDIR || DESTDIR + #{val})" + end + v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n" + vars[name] = true + if fast[name] + v_fast << v + else + v_others << v + end + has_version = true if name == "MAJOR" + end +# break if /^CEOF/ +end + +drive = File::PATH_SEPARATOR == ';' + +prefix = '/lib/ruby/' + RUBY_VERSION + '/' + RUBY_PLATFORM +print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" +print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" +print " CONFIG = {}\n" +print " CONFIG[\"DESTDIR\"] = DESTDIR\n" + +unless has_version + RUBY_VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) { + print " CONFIG[\"MAJOR\"] = \"" + $1 + "\"\n" + print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" + print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" + } + patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l| + m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(\d+)/.match(l) and break m[1] + } + print " CONFIG[\"PATCHLEVEL\"] = \"#{patchlevel}\"\n" +end + +dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/ +v_others.collect! do |x| + if /^\s*CONFIG\["(?!abs_|old)[a-z]+(?:_prefix|dir)"\]/ === x + x.sub(dest, '= "$(DESTDIR)') + else + x + end +end + +if $install_name + v_fast << " CONFIG[\"ruby_install_name\"] = \"" + $install_name + "\"\n" + v_fast << " CONFIG[\"RUBY_INSTALL_NAME\"] = \"" + $install_name + "\"\n" +end +if $so_name + v_fast << " CONFIG[\"RUBY_SO_NAME\"] = \"" + $so_name + "\"\n" +end + +print(*v_fast) +print(*v_others) +print <flags & NODE_TYPEMASK)>>NODE_TYPESHIFT)) +#define nd_set_type(n,t) \ + RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<flags>>NODE_LSHIFT)&NODE_LMASK)) +#define nd_set_line(n,l) \ + RNODE(n)->flags=((RNODE(n)->flags&~(-1<> 8) & 0x0F) +#define NOEX_WITH(n, s) ((s << 8) | (n) | (ruby_running ? 0 : NOEX_BASIC)) +#define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level()) + +#define CALL_PUBLIC 0 +#define CALL_FCALL 1 +#define CALL_VCALL 2 +#define CALL_SUPER 3 + +#define RUBY_VM_METHOD_NODE NODE_METHOD + +VALUE rb_parser_new(void); +VALUE rb_parser_end_seen_p(VALUE); +VALUE rb_parser_encoding(VALUE); + +NODE *rb_parser_compile_cstr(volatile VALUE, const char*, const char*, int, int); +NODE *rb_parser_compile_string(volatile VALUE, const char*, VALUE, int); +NODE *rb_parser_compile_file(volatile VALUE, const char*, VALUE, int); + +NODE *rb_compile_cstr(const char*, const char*, int, int); +NODE *rb_compile_string(const char*, VALUE, int); +NODE *rb_compile_file(const char*, VALUE, int); + +void rb_add_method(VALUE, ID, NODE *, int); +NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE); + +NODE* rb_method_node(VALUE klass, ID id); +int rb_node_arity(NODE* node); + +struct global_entry *rb_global_entry(ID); +VALUE rb_gvar_get(struct global_entry *); +VALUE rb_gvar_set(struct global_entry *, VALUE); +VALUE rb_gvar_defined(struct global_entry *); + +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBY_NODE_H */ diff --git a/lib/ruby-1.9.1-rc1/node_name.inc b/lib/ruby-1.9.1-rc1/node_name.inc new file mode 100644 index 0000000..ddc7ebd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/node_name.inc @@ -0,0 +1,216 @@ + case NODE_METHOD: + return "NODE_METHOD"; + case NODE_FBODY: + return "NODE_FBODY"; + case NODE_CFUNC: + return "NODE_CFUNC"; + case NODE_SCOPE: + return "NODE_SCOPE"; + case NODE_BLOCK: + return "NODE_BLOCK"; + case NODE_IF: + return "NODE_IF"; + case NODE_CASE: + return "NODE_CASE"; + case NODE_WHEN: + return "NODE_WHEN"; + case NODE_OPT_N: + return "NODE_OPT_N"; + case NODE_WHILE: + return "NODE_WHILE"; + case NODE_UNTIL: + return "NODE_UNTIL"; + case NODE_ITER: + return "NODE_ITER"; + case NODE_FOR: + return "NODE_FOR"; + case NODE_BREAK: + return "NODE_BREAK"; + case NODE_NEXT: + return "NODE_NEXT"; + case NODE_REDO: + return "NODE_REDO"; + case NODE_RETRY: + return "NODE_RETRY"; + case NODE_BEGIN: + return "NODE_BEGIN"; + case NODE_RESCUE: + return "NODE_RESCUE"; + case NODE_RESBODY: + return "NODE_RESBODY"; + case NODE_ENSURE: + return "NODE_ENSURE"; + case NODE_AND: + return "NODE_AND"; + case NODE_OR: + return "NODE_OR"; + case NODE_MASGN: + return "NODE_MASGN"; + case NODE_LASGN: + return "NODE_LASGN"; + case NODE_DASGN: + return "NODE_DASGN"; + case NODE_DASGN_CURR: + return "NODE_DASGN_CURR"; + case NODE_GASGN: + return "NODE_GASGN"; + case NODE_IASGN: + return "NODE_IASGN"; + case NODE_IASGN2: + return "NODE_IASGN2"; + case NODE_CDECL: + return "NODE_CDECL"; + case NODE_CVASGN: + return "NODE_CVASGN"; + case NODE_CVDECL: + return "NODE_CVDECL"; + case NODE_OP_ASGN1: + return "NODE_OP_ASGN1"; + case NODE_OP_ASGN2: + return "NODE_OP_ASGN2"; + case NODE_OP_ASGN_AND: + return "NODE_OP_ASGN_AND"; + case NODE_OP_ASGN_OR: + return "NODE_OP_ASGN_OR"; + case NODE_CALL: + return "NODE_CALL"; + case NODE_FCALL: + return "NODE_FCALL"; + case NODE_VCALL: + return "NODE_VCALL"; + case NODE_SUPER: + return "NODE_SUPER"; + case NODE_ZSUPER: + return "NODE_ZSUPER"; + case NODE_ARRAY: + return "NODE_ARRAY"; + case NODE_ZARRAY: + return "NODE_ZARRAY"; + case NODE_VALUES: + return "NODE_VALUES"; + case NODE_HASH: + return "NODE_HASH"; + case NODE_RETURN: + return "NODE_RETURN"; + case NODE_YIELD: + return "NODE_YIELD"; + case NODE_LVAR: + return "NODE_LVAR"; + case NODE_DVAR: + return "NODE_DVAR"; + case NODE_GVAR: + return "NODE_GVAR"; + case NODE_IVAR: + return "NODE_IVAR"; + case NODE_CONST: + return "NODE_CONST"; + case NODE_CVAR: + return "NODE_CVAR"; + case NODE_NTH_REF: + return "NODE_NTH_REF"; + case NODE_BACK_REF: + return "NODE_BACK_REF"; + case NODE_MATCH: + return "NODE_MATCH"; + case NODE_MATCH2: + return "NODE_MATCH2"; + case NODE_MATCH3: + return "NODE_MATCH3"; + case NODE_LIT: + return "NODE_LIT"; + case NODE_STR: + return "NODE_STR"; + case NODE_DSTR: + return "NODE_DSTR"; + case NODE_XSTR: + return "NODE_XSTR"; + case NODE_DXSTR: + return "NODE_DXSTR"; + case NODE_EVSTR: + return "NODE_EVSTR"; + case NODE_DREGX: + return "NODE_DREGX"; + case NODE_DREGX_ONCE: + return "NODE_DREGX_ONCE"; + case NODE_ARGS: + return "NODE_ARGS"; + case NODE_ARGS_AUX: + return "NODE_ARGS_AUX"; + case NODE_OPT_ARG: + return "NODE_OPT_ARG"; + case NODE_POSTARG: + return "NODE_POSTARG"; + case NODE_ARGSCAT: + return "NODE_ARGSCAT"; + case NODE_ARGSPUSH: + return "NODE_ARGSPUSH"; + case NODE_SPLAT: + return "NODE_SPLAT"; + case NODE_TO_ARY: + return "NODE_TO_ARY"; + case NODE_BLOCK_ARG: + return "NODE_BLOCK_ARG"; + case NODE_BLOCK_PASS: + return "NODE_BLOCK_PASS"; + case NODE_DEFN: + return "NODE_DEFN"; + case NODE_DEFS: + return "NODE_DEFS"; + case NODE_ALIAS: + return "NODE_ALIAS"; + case NODE_VALIAS: + return "NODE_VALIAS"; + case NODE_UNDEF: + return "NODE_UNDEF"; + case NODE_CLASS: + return "NODE_CLASS"; + case NODE_MODULE: + return "NODE_MODULE"; + case NODE_SCLASS: + return "NODE_SCLASS"; + case NODE_COLON2: + return "NODE_COLON2"; + case NODE_COLON3: + return "NODE_COLON3"; + case NODE_DOT2: + return "NODE_DOT2"; + case NODE_DOT3: + return "NODE_DOT3"; + case NODE_FLIP2: + return "NODE_FLIP2"; + case NODE_FLIP3: + return "NODE_FLIP3"; + case NODE_ATTRSET: + return "NODE_ATTRSET"; + case NODE_SELF: + return "NODE_SELF"; + case NODE_NIL: + return "NODE_NIL"; + case NODE_TRUE: + return "NODE_TRUE"; + case NODE_FALSE: + return "NODE_FALSE"; + case NODE_ERRINFO: + return "NODE_ERRINFO"; + case NODE_DEFINED: + return "NODE_DEFINED"; + case NODE_POSTEXE: + return "NODE_POSTEXE"; + case NODE_ALLOCA: + return "NODE_ALLOCA"; + case NODE_BMETHOD: + return "NODE_BMETHOD"; + case NODE_MEMO: + return "NODE_MEMO"; + case NODE_IFUNC: + return "NODE_IFUNC"; + case NODE_DSYM: + return "NODE_DSYM"; + case NODE_ATTRASGN: + return "NODE_ATTRASGN"; + case NODE_PRELUDE: + return "NODE_PRELUDE"; + case NODE_LAMBDA: + return "NODE_LAMBDA"; + case NODE_OPTBLOCK: + return "NODE_OPTBLOCK"; diff --git a/lib/ruby-1.9.1-rc1/numeric.c b/lib/ruby-1.9.1-rc1/numeric.c new file mode 100644 index 0000000..52d47ac --- /dev/null +++ b/lib/ruby-1.9.1-rc1/numeric.c @@ -0,0 +1,3252 @@ +/********************************************************************** + + numeric.c - + + $Author: yugui $ + created at: Fri Aug 13 18:33:09 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" +#include +#include +#include + +#if defined(__FreeBSD__) && __FreeBSD__ < 4 +#include +#endif + +#ifdef HAVE_FLOAT_H +#include +#endif + +#ifdef HAVE_IEEEFP_H +#include +#endif + +/* use IEEE 64bit values if not defined */ +#ifndef FLT_RADIX +#define FLT_RADIX 2 +#endif +#ifndef FLT_ROUNDS +#define FLT_ROUNDS 1 +#endif +#ifndef DBL_MIN +#define DBL_MIN 2.2250738585072014e-308 +#endif +#ifndef DBL_MAX +#define DBL_MAX 1.7976931348623157e+308 +#endif +#ifndef DBL_MIN_EXP +#define DBL_MIN_EXP (-1021) +#endif +#ifndef DBL_MAX_EXP +#define DBL_MAX_EXP 1024 +#endif +#ifndef DBL_MIN_10_EXP +#define DBL_MIN_10_EXP (-307) +#endif +#ifndef DBL_MAX_10_EXP +#define DBL_MAX_10_EXP 308 +#endif +#ifndef DBL_DIG +#define DBL_DIG 15 +#endif +#ifndef DBL_MANT_DIG +#define DBL_MANT_DIG 53 +#endif +#ifndef DBL_EPSILON +#define DBL_EPSILON 2.2204460492503131e-16 +#endif + +#ifndef HAVE_ROUND +double +round(double x) +{ + double f; + + if (x > 0.0) { + f = floor(x); + x = f + (x - f >= 0.5); + } + else if (x < 0.0) { + f = ceil(x); + x = f - (f - x >= 0.5); + } + return x; +} +#elif defined(__BEOS__) +/* appears to be a bug in the BeOS headers */ +double round(double x); +#endif + +static ID id_coerce, id_to_i, id_eq; + +VALUE rb_cNumeric; +VALUE rb_cFloat; +VALUE rb_cInteger; +VALUE rb_cFixnum; + +VALUE rb_eZeroDivError; +VALUE rb_eFloatDomainError; + +void +rb_num_zerodiv(void) +{ + rb_raise(rb_eZeroDivError, "divided by 0"); +} + + +/* + * call-seq: + * num.coerce(numeric) => array + * + * If aNumeric is the same type as num, returns an array + * containing aNumeric and num. Otherwise, returns an + * array with both aNumeric and num represented as + * Float objects. This coercion mechanism is used by + * Ruby to handle mixed-type numeric operations: it is intended to + * find a compatible common type between the two operands of the operator. + * + * 1.coerce(2.5) #=> [2.5, 1.0] + * 1.2.coerce(3) #=> [3.0, 1.2] + * 1.coerce(2) #=> [2, 1] + */ + +static VALUE +num_coerce(VALUE x, VALUE y) +{ + if (CLASS_OF(x) == CLASS_OF(y)) + return rb_assoc_new(y, x); + x = rb_Float(x); + y = rb_Float(y); + return rb_assoc_new(y, x); +} + +static VALUE +coerce_body(VALUE *x) +{ + return rb_funcall(x[1], id_coerce, 1, x[0]); +} + +static VALUE +coerce_rescue(VALUE *x) +{ + volatile VALUE v = rb_inspect(x[1]); + + rb_raise(rb_eTypeError, "%s can't be coerced into %s", + rb_special_const_p(x[1])? + RSTRING_PTR(v): + rb_obj_classname(x[1]), + rb_obj_classname(x[0])); + return Qnil; /* dummy */ +} + +static int +do_coerce(VALUE *x, VALUE *y, int err) +{ + VALUE ary; + VALUE a[2]; + + a[0] = *x; a[1] = *y; + + ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a); + if (TYPE(ary) != T_ARRAY || RARRAY_LEN(ary) != 2) { + if (err) { + rb_raise(rb_eTypeError, "coerce must return [x, y]"); + } + return Qfalse; + } + + *x = RARRAY_PTR(ary)[0]; + *y = RARRAY_PTR(ary)[1]; + return Qtrue; +} + +VALUE +rb_num_coerce_bin(VALUE x, VALUE y, ID func) +{ + do_coerce(&x, &y, Qtrue); + return rb_funcall(x, func, 1, y); +} + +VALUE +rb_num_coerce_cmp(VALUE x, VALUE y, ID func) +{ + if (do_coerce(&x, &y, Qfalse)) + return rb_funcall(x, func, 1, y); + return Qnil; +} + +VALUE +rb_num_coerce_relop(VALUE x, VALUE y, ID func) +{ + VALUE c, x0 = x, y0 = y; + + if (!do_coerce(&x, &y, Qfalse) || + NIL_P(c = rb_funcall(x, func, 1, y))) { + rb_cmperr(x0, y0); + return Qnil; /* not reached */ + } + return c; +} + +/* + * Trap attempts to add methods to Numeric objects. Always + * raises a TypeError + */ + +static VALUE +num_sadded(VALUE x, VALUE name) +{ + const char *nstr = rb_id2name(rb_to_id(name)); + /* ruby_frame = ruby_frame->prev; */ /* pop frame for "singleton_method_added" */ + /* Numerics should be values; singleton_methods should not be added to them */ + rb_remove_method(rb_singleton_class(x), nstr); + rb_raise(rb_eTypeError, + "can't define singleton method \"%s\" for %s", + nstr, + rb_obj_classname(x)); + return Qnil; /* not reached */ +} + +/* :nodoc: */ +static VALUE +num_init_copy(VALUE x, VALUE y) +{ + /* Numerics are immutable values, which should not be copied */ + rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x)); + return Qnil; /* not reached */ +} + +/* + * call-seq: + * +num => num + * + * Unary Plus---Returns the receiver's value. + */ + +static VALUE +num_uplus(VALUE num) +{ + return num; +} + +/* + * call-seq: + * -num => numeric + * + * Unary Minus---Returns the receiver's value, negated. + */ + +static VALUE +num_uminus(VALUE num) +{ + VALUE zero; + + zero = INT2FIX(0); + do_coerce(&zero, &num, Qtrue); + + return rb_funcall(zero, '-', 1, num); +} + +/* + * call-seq: + * num.quo(numeric) => result + * + * Returns most exact division (rational for integers, float for floats). + */ + +static VALUE +num_quo(VALUE x, VALUE y) +{ + return rb_funcall(rb_rational_raw1(x), '/', 1, y); +} + + +/* + * call-seq: + * num.fdiv(numeric) => float + * + * Returns float division. + */ + +static VALUE +num_fdiv(VALUE x, VALUE y) +{ + return rb_funcall(rb_Float(x), '/', 1, y); +} + + +static VALUE num_floor(VALUE num); + +/* + * call-seq: + * num.div(numeric) => integer + * + * Uses / to perform division, then converts the result to + * an integer. Numeric does not define the / + * operator; this is left to subclasses. + */ + +static VALUE +num_div(VALUE x, VALUE y) +{ + if (rb_equal(INT2FIX(0), y)) rb_num_zerodiv(); + return num_floor(rb_funcall(x, '/', 1, y)); +} + + +/* + * call-seq: + * num.divmod( aNumeric ) -> anArray + * + * Returns an array containing the quotient and modulus obtained by + * dividing num by aNumeric. If q, r = + * x.divmod(y), then + * + * q = floor(float(x)/float(y)) + * x = q*y + r + * + * The quotient is rounded toward -infinity, as shown in the following table: + * + * a | b | a.divmod(b) | a/b | a.modulo(b) | a.remainder(b) + * ------+-----+---------------+---------+-------------+--------------- + * 13 | 4 | 3, 1 | 3 | 1 | 1 + * ------+-----+---------------+---------+-------------+--------------- + * 13 | -4 | -4, -3 | -3 | -3 | 1 + * ------+-----+---------------+---------+-------------+--------------- + * -13 | 4 | -4, 3 | -4 | 3 | -1 + * ------+-----+---------------+---------+-------------+--------------- + * -13 | -4 | 3, -1 | 3 | -1 | -1 + * ------+-----+---------------+---------+-------------+--------------- + * 11.5 | 4 | 2, 3.5 | 2.875 | 3.5 | 3.5 + * ------+-----+---------------+---------+-------------+--------------- + * 11.5 | -4 | -3, -0.5 | -2.875 | -0.5 | 3.5 + * ------+-----+---------------+---------+-------------+--------------- + * -11.5 | 4 | -3, 0.5 | -2.875 | 0.5 | -3.5 + * ------+-----+---------------+---------+-------------+--------------- + * -11.5 | -4 | 2, -3.5 | 2.875 | -3.5 | -3.5 + * + * + * Examples + * + * 11.divmod(3) #=> [3, 2] + * 11.divmod(-3) #=> [-4, -1] + * 11.divmod(3.5) #=> [3, 0.5] + * (-11).divmod(3.5) #=> [-4, 3.0] + * (11.5).divmod(3.5) #=> [3, 1.0] + */ + +static VALUE +num_divmod(VALUE x, VALUE y) +{ + return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y)); +} + +/* + * call-seq: + * num.modulo(numeric) => result + * + * Equivalent to + * num.divmod(aNumeric)[1]. + */ + +static VALUE +num_modulo(VALUE x, VALUE y) +{ + return rb_funcall(x, '%', 1, y); +} + +/* + * call-seq: + * num.remainder(numeric) => result + * + * If num and numeric have different signs, returns + * mod-numeric; otherwise, returns mod. In + * both cases mod is the value + * num.modulo(numeric). The + * differences between remainder and modulo + * (%) are shown in the table under Numeric#divmod. + */ + +static VALUE +num_remainder(VALUE x, VALUE y) +{ + VALUE z = rb_funcall(x, '%', 1, y); + + if ((!rb_equal(z, INT2FIX(0))) && + ((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) && + RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) || + (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) && + RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) { + return rb_funcall(z, '-', 1, y); + } + return z; +} + +/* + * call-seq: + * num.real? -> true or false + * + * Returns true if num is a Real + * (i.e. non Complex). + */ + +static VALUE +num_real_p(VALUE num) +{ + return Qtrue; +} + +/* + * call-seq: + * num.integer? -> true or false + * + * Returns true if num is an Integer + * (including Fixnum and Bignum). + */ + +static VALUE +num_int_p(VALUE num) +{ + return Qfalse; +} + +/* + * call-seq: + * num.abs => num or numeric + * + * Returns the absolute value of num. + * + * 12.abs #=> 12 + * (-34.56).abs #=> 34.56 + * -34.56.abs #=> 34.56 + */ + +static VALUE +num_abs(VALUE num) +{ + if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) { + return rb_funcall(num, rb_intern("-@"), 0); + } + return num; +} + + +/* + * call-seq: + * num.zero? => true or false + * + * Returns true if num has a zero value. + */ + +static VALUE +num_zero_p(VALUE num) +{ + if (rb_equal(num, INT2FIX(0))) { + return Qtrue; + } + return Qfalse; +} + + +/* + * call-seq: + * num.nonzero? => num or nil + * + * Returns num if num is not zero, nil + * otherwise. This behavior is useful when chaining comparisons: + * + * a = %w( z Bb bB bb BB a aA Aa AA A ) + * b = a.sort {|a,b| (a.downcase <=> b.downcase).nonzero? || a <=> b } + * b #=> ["A", "a", "AA", "Aa", "aA", "BB", "Bb", "bB", "bb", "z"] + */ + +static VALUE +num_nonzero_p(VALUE num) +{ + if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) { + return Qnil; + } + return num; +} + +/* + * call-seq: + * num.to_int => integer + * + * Invokes the child class's to_i method to convert + * num to an integer. + */ + +static VALUE +num_to_int(VALUE num) +{ + return rb_funcall(num, id_to_i, 0, 0); +} + + +/******************************************************************** + * + * Document-class: Float + * + * Float objects represent real numbers using the native + * architecture's double-precision floating point representation. + */ + +VALUE +rb_float_new(double d) +{ + NEWOBJ(flt, struct RFloat); + OBJSETUP(flt, rb_cFloat, T_FLOAT); + + flt->float_value = d; + return (VALUE)flt; +} + +/* + * call-seq: + * flt.to_s => string + * + * Returns a string containing a representation of self. As well as a + * fixed or exponential form of the number, the call may return + * ``NaN'', ``Infinity'', and + * ``-Infinity''. + */ + +static VALUE +flo_to_s(VALUE flt) +{ + char buf[32]; + double value = RFLOAT_VALUE(flt); + char *p, *e; + + if (isinf(value)) + return rb_usascii_str_new2(value < 0 ? "-Infinity" : "Infinity"); + else if(isnan(value)) + return rb_usascii_str_new2("NaN"); + + snprintf(buf, sizeof(buf), "%#.15g", value); /* ensure to print decimal point */ + if (!(e = strchr(buf, 'e'))) { + e = buf + strlen(buf); + } + if (!ISDIGIT(e[-1])) { /* reformat if ended with decimal point (ex 111111111111111.) */ + snprintf(buf, sizeof(buf), "%#.14e", value); + if (!(e = strchr(buf, 'e'))) { + e = buf + strlen(buf); + } + } + p = e; + while (p[-1]=='0' && ISDIGIT(p[-2])) + p--; + memmove(p, e, strlen(e)+1); + return rb_usascii_str_new2(buf); +} + +/* + * MISSING: documentation + */ + +static VALUE +flo_coerce(VALUE x, VALUE y) +{ + return rb_assoc_new(rb_Float(y), x); +} + +/* + * call-seq: + * -float => float + * + * Returns float, negated. + */ + +static VALUE +flo_uminus(VALUE flt) +{ + return DBL2NUM(-RFLOAT_VALUE(flt)); +} + +/* + * call-seq: + * float + other => float + * + * Returns a new float which is the sum of float + * and other. + */ + +static VALUE +flo_plus(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + return DBL2NUM(RFLOAT_VALUE(x) + (double)FIX2LONG(y)); + case T_BIGNUM: + return DBL2NUM(RFLOAT_VALUE(x) + rb_big2dbl(y)); + case T_FLOAT: + return DBL2NUM(RFLOAT_VALUE(x) + RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '+'); + } +} + +/* + * call-seq: + * float + other => float + * + * Returns a new float which is the difference of float + * and other. + */ + +static VALUE +flo_minus(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + return DBL2NUM(RFLOAT_VALUE(x) - (double)FIX2LONG(y)); + case T_BIGNUM: + return DBL2NUM(RFLOAT_VALUE(x) - rb_big2dbl(y)); + case T_FLOAT: + return DBL2NUM(RFLOAT_VALUE(x) - RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '-'); + } +} + +/* + * call-seq: + * float * other => float + * + * Returns a new float which is the product of float + * and other. + */ + +static VALUE +flo_mul(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + return DBL2NUM(RFLOAT_VALUE(x) * (double)FIX2LONG(y)); + case T_BIGNUM: + return DBL2NUM(RFLOAT_VALUE(x) * rb_big2dbl(y)); + case T_FLOAT: + return DBL2NUM(RFLOAT_VALUE(x) * RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '*'); + } +} + +/* + * call-seq: + * float / other => float + * + * Returns a new float which is the result of dividing + * float by other. + */ + +static VALUE +flo_div(VALUE x, VALUE y) +{ + long f_y; + double d; + + switch (TYPE(y)) { + case T_FIXNUM: + f_y = FIX2LONG(y); + return DBL2NUM(RFLOAT_VALUE(x) / (double)f_y); + case T_BIGNUM: + d = rb_big2dbl(y); + return DBL2NUM(RFLOAT_VALUE(x) / d); + case T_FLOAT: + return DBL2NUM(RFLOAT_VALUE(x) / RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '/'); + } +} + +static VALUE +flo_quo(VALUE x, VALUE y) +{ + return rb_funcall(x, '/', 1, y); +} + +static void +flodivmod(double x, double y, double *divp, double *modp) +{ + double div, mod; + +#ifdef HAVE_FMOD + mod = fmod(x, y); +#else + { + double z; + + modf(x/y, &z); + mod = x - z * y; + } +#endif + if (isinf(x) && !isinf(y) && !isnan(y)) + div = x; + else + div = (x - mod) / y; + if (y*mod < 0) { + mod += y; + div -= 1.0; + } + if (modp) *modp = mod; + if (divp) *divp = div; +} + + +/* + * call-seq: + * flt % other => float + * flt.modulo(other) => float + * + * Return the modulo after division of flt by other. + * + * 6543.21.modulo(137) #=> 104.21 + * 6543.21.modulo(137.24) #=> 92.9299999999996 + */ + +static VALUE +flo_mod(VALUE x, VALUE y) +{ + double fy, mod; + + switch (TYPE(y)) { + case T_FIXNUM: + fy = (double)FIX2LONG(y); + break; + case T_BIGNUM: + fy = rb_big2dbl(y); + break; + case T_FLOAT: + fy = RFLOAT_VALUE(y); + break; + default: + return rb_num_coerce_bin(x, y, '%'); + } + flodivmod(RFLOAT_VALUE(x), fy, 0, &mod); + return DBL2NUM(mod); +} + +static VALUE +dbl2ival(double d) +{ + if (FIXABLE(d)) { + d = round(d); + return LONG2FIX((long)d); + } + else if (isnan(d) || isinf(d)) { + /* special case: cannot return integer value */ + return rb_float_new(d); + } + else { + return rb_dbl2big(d); + } +} + +/* + * call-seq: + * flt.divmod(numeric) => array + * + * See Numeric#divmod. + */ + +static VALUE +flo_divmod(VALUE x, VALUE y) +{ + double fy, div, mod; + volatile VALUE a, b; + + switch (TYPE(y)) { + case T_FIXNUM: + fy = (double)FIX2LONG(y); + break; + case T_BIGNUM: + fy = rb_big2dbl(y); + break; + case T_FLOAT: + fy = RFLOAT_VALUE(y); + break; + default: + return rb_num_coerce_bin(x, y, rb_intern("divmod")); + } + flodivmod(RFLOAT_VALUE(x), fy, &div, &mod); + a = dbl2ival(div); + b = DBL2NUM(mod); + return rb_assoc_new(a, b); +} + +/* + * call-seq: + * + * flt ** other => float + * + * Raises float the other power. + */ + +static VALUE +flo_pow(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_FIXNUM: + return DBL2NUM(pow(RFLOAT_VALUE(x), (double)FIX2LONG(y))); + case T_BIGNUM: + return DBL2NUM(pow(RFLOAT_VALUE(x), rb_big2dbl(y))); + case T_FLOAT: + return DBL2NUM(pow(RFLOAT_VALUE(x), RFLOAT_VALUE(y))); + default: + return rb_num_coerce_bin(x, y, rb_intern("**")); + } +} + +/* + * call-seq: + * num.eql?(numeric) => true or false + * + * Returns true if num and numeric are the + * same type and have equal values. + * + * 1 == 1.0 #=> true + * 1.eql?(1.0) #=> false + * (1.0).eql?(1.0) #=> true + */ + +static VALUE +num_eql(VALUE x, VALUE y) +{ + if (TYPE(x) != TYPE(y)) return Qfalse; + + return rb_equal(x, y); +} + +/* + * call-seq: + * num <=> other -> 0 or nil + * + * Returns zero if num equals other, nil + * otherwise. + */ + +static VALUE +num_cmp(VALUE x, VALUE y) +{ + if (x == y) return INT2FIX(0); + return Qnil; +} + +static VALUE +num_equal(VALUE x, VALUE y) +{ + if (x == y) return Qtrue; + return rb_funcall(y, id_eq, 1, x); +} + +/* + * call-seq: + * flt == obj => true or false + * + * Returns true only if obj has the same value + * as flt. Contrast this with Float#eql?, which + * requires obj to be a Float. + * + * 1.0 == 1 #=> true + * + */ + +static VALUE +flo_eq(VALUE x, VALUE y) +{ + volatile double a, b; + + switch (TYPE(y)) { + case T_FIXNUM: + b = FIX2LONG(y); + break; + case T_BIGNUM: + b = rb_big2dbl(y); + break; + case T_FLOAT: + b = RFLOAT_VALUE(y); + if (isnan(b)) return Qfalse; + break; + default: + return num_equal(x, y); + } + a = RFLOAT_VALUE(x); + if (isnan(a)) return Qfalse; + return (a == b)?Qtrue:Qfalse; +} + +/* + * call-seq: + * flt.hash => integer + * + * Returns a hash code for this float. + */ + +static VALUE +flo_hash(VALUE num) +{ + double d; + int hash; + + d = RFLOAT_VALUE(num); + hash = rb_memhash(&d, sizeof(d)); + return INT2FIX(hash); +} + +VALUE +rb_dbl_cmp(double a, double b) +{ + if (isnan(a) || isnan(b)) return Qnil; + if (a == b) return INT2FIX(0); + if (a > b) return INT2FIX(1); + if (a < b) return INT2FIX(-1); + return Qnil; +} + +/* + * call-seq: + * flt <=> numeric => -1, 0, +1 + * + * Returns -1, 0, or +1 depending on whether flt is less than, + * equal to, or greater than numeric. This is the basis for the + * tests in Comparable. + */ + +static VALUE +flo_cmp(VALUE x, VALUE y) +{ + double a, b; + + a = RFLOAT_VALUE(x); + switch (TYPE(y)) { + case T_FIXNUM: + b = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + b = rb_big2dbl(y); + break; + + case T_FLOAT: + b = RFLOAT_VALUE(y); + break; + + default: + return rb_num_coerce_cmp(x, y, rb_intern("<=>")); + } + return rb_dbl_cmp(a, b); +} + +/* + * call-seq: + * flt > other => true or false + * + * true if flt is greater than other. + */ + +static VALUE +flo_gt(VALUE x, VALUE y) +{ + double a, b; + + a = RFLOAT_VALUE(x); + switch (TYPE(y)) { + case T_FIXNUM: + b = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + b = rb_big2dbl(y); + break; + + case T_FLOAT: + b = RFLOAT_VALUE(y); + if (isnan(b)) return Qfalse; + break; + + default: + return rb_num_coerce_relop(x, y, '>'); + } + if (isnan(a)) return Qfalse; + return (a > b)?Qtrue:Qfalse; +} + +/* + * call-seq: + * flt >= other => true or false + * + * true if flt is greater than + * or equal to other. + */ + +static VALUE +flo_ge(VALUE x, VALUE y) +{ + double a, b; + + a = RFLOAT_VALUE(x); + switch (TYPE(y)) { + case T_FIXNUM: + b = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + b = rb_big2dbl(y); + break; + + case T_FLOAT: + b = RFLOAT_VALUE(y); + if (isnan(b)) return Qfalse; + break; + + default: + return rb_num_coerce_relop(x, y, rb_intern(">=")); + } + if (isnan(a)) return Qfalse; + return (a >= b)?Qtrue:Qfalse; +} + +/* + * call-seq: + * flt < other => true or false + * + * true if flt is less than other. + */ + +static VALUE +flo_lt(VALUE x, VALUE y) +{ + double a, b; + + a = RFLOAT_VALUE(x); + switch (TYPE(y)) { + case T_FIXNUM: + b = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + b = rb_big2dbl(y); + break; + + case T_FLOAT: + b = RFLOAT_VALUE(y); + if (isnan(b)) return Qfalse; + break; + + default: + return rb_num_coerce_relop(x, y, '<'); + } + if (isnan(a)) return Qfalse; + return (a < b)?Qtrue:Qfalse; +} + +/* + * call-seq: + * flt <= other => true or false + * + * true if flt is less than + * or equal to other. + */ + +static VALUE +flo_le(VALUE x, VALUE y) +{ + double a, b; + + a = RFLOAT_VALUE(x); + switch (TYPE(y)) { + case T_FIXNUM: + b = (double)FIX2LONG(y); + break; + + case T_BIGNUM: + b = rb_big2dbl(y); + break; + + case T_FLOAT: + b = RFLOAT_VALUE(y); + if (isnan(b)) return Qfalse; + break; + + default: + return rb_num_coerce_relop(x, y, rb_intern("<=")); + } + if (isnan(a)) return Qfalse; + return (a <= b)?Qtrue:Qfalse; +} + +/* + * call-seq: + * flt.eql?(obj) => true or false + * + * Returns true only if obj is a + * Float with the same value as flt. Contrast this + * with Float#==, which performs type conversions. + * + * 1.0.eql?(1) #=> false + */ + +static VALUE +flo_eql(VALUE x, VALUE y) +{ + if (TYPE(y) == T_FLOAT) { + double a = RFLOAT_VALUE(x); + double b = RFLOAT_VALUE(y); + + if (isnan(a) || isnan(b)) return Qfalse; + if (a == b) return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * flt.to_f => flt + * + * As flt is already a float, returns self. + */ + +static VALUE +flo_to_f(VALUE num) +{ + return num; +} + +/* + * call-seq: + * flt.abs => float + * + * Returns the absolute value of flt. + * + * (-34.56).abs #=> 34.56 + * -34.56.abs #=> 34.56 + * + */ + +static VALUE +flo_abs(VALUE flt) +{ + double val = fabs(RFLOAT_VALUE(flt)); + return DBL2NUM(val); +} + +/* + * call-seq: + * flt.zero? -> true or false + * + * Returns true if flt is 0.0. + * + */ + +static VALUE +flo_zero_p(VALUE num) +{ + if (RFLOAT_VALUE(num) == 0.0) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * flt.nan? -> true or false + * + * Returns true if flt is an invalid IEEE floating + * point number. + * + * a = -1.0 #=> -1.0 + * a.nan? #=> false + * a = 0.0/0.0 #=> NaN + * a.nan? #=> true + */ + +static VALUE +flo_is_nan_p(VALUE num) +{ + double value = RFLOAT_VALUE(num); + + return isnan(value) ? Qtrue : Qfalse; +} + +/* + * call-seq: + * flt.infinite? -> nil, -1, +1 + * + * Returns nil, -1, or +1 depending on whether flt + * is finite, -infinity, or +infinity. + * + * (0.0).infinite? #=> nil + * (-1.0/0.0).infinite? #=> -1 + * (+1.0/0.0).infinite? #=> 1 + */ + +static VALUE +flo_is_infinite_p(VALUE num) +{ + double value = RFLOAT_VALUE(num); + + if (isinf(value)) { + return INT2FIX( value < 0 ? -1 : 1 ); + } + + return Qnil; +} + +/* + * call-seq: + * flt.finite? -> true or false + * + * Returns true if flt is a valid IEEE floating + * point number (it is not infinite, and nan? is + * false). + * + */ + +static VALUE +flo_is_finite_p(VALUE num) +{ + double value = RFLOAT_VALUE(num); + +#if HAVE_FINITE + if (!finite(value)) + return Qfalse; +#else + if (isinf(value) || isnan(value)) + return Qfalse; +#endif + + return Qtrue; +} + +/* + * call-seq: + * flt.floor => integer + * + * Returns the largest integer less than or equal to flt. + * + * 1.2.floor #=> 1 + * 2.0.floor #=> 2 + * (-1.2).floor #=> -2 + * (-2.0).floor #=> -2 + */ + +static VALUE +flo_floor(VALUE num) +{ + double f = floor(RFLOAT_VALUE(num)); + long val; + + if (!FIXABLE(f)) { + return rb_dbl2big(f); + } + val = f; + return LONG2FIX(val); +} + +/* + * call-seq: + * flt.ceil => integer + * + * Returns the smallest Integer greater than or equal to + * flt. + * + * 1.2.ceil #=> 2 + * 2.0.ceil #=> 2 + * (-1.2).ceil #=> -1 + * (-2.0).ceil #=> -2 + */ + +static VALUE +flo_ceil(VALUE num) +{ + double f = ceil(RFLOAT_VALUE(num)); + long val; + + if (!FIXABLE(f)) { + return rb_dbl2big(f); + } + val = f; + return LONG2FIX(val); +} + +/* + * call-seq: + * flt.round([ndigits]) => integer or float + * + * Rounds flt to a given precision in decimal digits (default 0 digits). + * Precision may be negative. Returns a a floating point number when ndigits + * is more than one. + * + * 1.5.round #=> 2 + * (-1.5).round #=> -2 + */ + +static VALUE +flo_round(int argc, VALUE *argv, VALUE num) +{ + VALUE nd; + double number, f; + int ndigits = 0, i; + long val; + + if (argc > 0 && rb_scan_args(argc, argv, "01", &nd) == 1) { + ndigits = NUM2INT(nd); + } + number = RFLOAT_VALUE(num); + f = 1.0; + i = abs(ndigits); + while (--i >= 0) + f = f*10.0; + + if (isinf(f)) { + if (ndigits < 0) number = 0; + } + else { + if (ndigits < 0) number /= f; + else number *= f; + number = round(number); + if (ndigits < 0) number *= f; + else number /= f; + } + + if (ndigits > 0) return DBL2NUM(number); + + if (!FIXABLE(number)) { + return rb_dbl2big(number); + } + val = number; + return LONG2FIX(val); +} + +/* + * call-seq: + * flt.to_i => integer + * flt.to_int => integer + * flt.truncate => integer + * + * Returns flt truncated to an Integer. + */ + +static VALUE +flo_truncate(VALUE num) +{ + double f = RFLOAT_VALUE(num); + long val; + + if (f > 0.0) f = floor(f); + if (f < 0.0) f = ceil(f); + + if (!FIXABLE(f)) { + return rb_dbl2big(f); + } + val = f; + return LONG2FIX(val); +} + + +/* + * call-seq: + * num.floor => integer + * + * Returns the largest integer less than or equal to num. + * Numeric implements this by converting anInteger + * to a Float and invoking Float#floor. + * + * 1.floor #=> 1 + * (-1).floor #=> -1 + */ + +static VALUE +num_floor(VALUE num) +{ + return flo_floor(rb_Float(num)); +} + + +/* + * call-seq: + * num.ceil => integer + * + * Returns the smallest Integer greater than or equal to + * num. Class Numeric achieves this by converting + * itself to a Float then invoking + * Float#ceil. + * + * 1.ceil #=> 1 + * 1.2.ceil #=> 2 + * (-1.2).ceil #=> -1 + * (-1.0).ceil #=> -1 + */ + +static VALUE +num_ceil(VALUE num) +{ + return flo_ceil(rb_Float(num)); +} + +/* + * call-seq: + * num.round([ndigits]) => integer or float + * + * Rounds num to a given precision in decimal digits (default 0 digits). + * Precision may be negative. Returns a a floating point number when ndigits + * is more than one. Numeric implements this by converting itself + * to a Float and invoking Float#round. + */ + +static VALUE +num_round(int argc, VALUE* argv, VALUE num) +{ + return flo_round(argc, argv, rb_Float(num)); +} + +/* + * call-seq: + * num.truncate => integer + * + * Returns num truncated to an integer. Numeric + * implements this by converting its value to a float and invoking + * Float#truncate. + */ + +static VALUE +num_truncate(VALUE num) +{ + return flo_truncate(rb_Float(num)); +} + + +/* + * call-seq: + * num.step(limit, step ) {|i| block } => num + * + * Invokes block with the sequence of numbers starting at + * num, incremented by step on each call. The loop + * finishes when the value to be passed to the block is greater than + * limit (if step is positive) or less than + * limit (if step is negative). If all the arguments are + * integers, the loop operates using an integer counter. If any of the + * arguments are floating point numbers, all are converted to floats, + * and the loop is executed floor(n + n*epsilon)+ 1 times, + * where n = (limit - num)/step. Otherwise, the loop + * starts at num, uses either the < or + * > operator to compare the counter against + * limit, and increments itself using the + + * operator. + * + * 1.step(10, 2) { |i| print i, " " } + * Math::E.step(Math::PI, 0.2) { |f| print f, " " } + * + * produces: + * + * 1 3 5 7 9 + * 2.71828182845905 2.91828182845905 3.11828182845905 + */ + +static VALUE +num_step(int argc, VALUE *argv, VALUE from) +{ + VALUE to, step; + + RETURN_ENUMERATOR(from, argc, argv); + if (argc == 1) { + to = argv[0]; + step = INT2FIX(1); + } + else { + if (argc == 2) { + to = argv[0]; + step = argv[1]; + } + else { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + if (rb_equal(step, INT2FIX(0))) { + rb_raise(rb_eArgError, "step can't be 0"); + } + } + + if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) { + long i, end, diff; + + i = FIX2LONG(from); + end = FIX2LONG(to); + diff = FIX2LONG(step); + + if (diff > 0) { + while (i <= end) { + rb_yield(LONG2FIX(i)); + i += diff; + } + } + else { + while (i >= end) { + rb_yield(LONG2FIX(i)); + i += diff; + } + } + } + else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) { + const double epsilon = DBL_EPSILON; + double beg = NUM2DBL(from); + double end = NUM2DBL(to); + double unit = NUM2DBL(step); + double n = (end - beg)/unit; + double err = (fabs(beg) + fabs(end) + fabs(end-beg)) / fabs(unit) * epsilon; + long i; + + if (isinf(unit)) { + if (unit > 0) rb_yield(DBL2NUM(beg)); + } + else { + if (err>0.5) err=0.5; + n = floor(n + err) + 1; + for (i=0; i', 1, INT2FIX(0)))) { + cmp = '>'; + } + else { + cmp = '<'; + } + for (;;) { + if (RTEST(rb_funcall(i, cmp, 1, to))) break; + rb_yield(i); + i = rb_funcall(i, '+', 1, step); + } + } + return from; +} + +SIGNED_VALUE +rb_num2long(VALUE val) +{ + again: + if (NIL_P(val)) { + rb_raise(rb_eTypeError, "no implicit conversion from nil to integer"); + } + + if (FIXNUM_P(val)) return FIX2LONG(val); + + switch (TYPE(val)) { + case T_FLOAT: + if (RFLOAT_VALUE(val) <= (double)LONG_MAX + && RFLOAT_VALUE(val) >= (double)LONG_MIN) { + return (SIGNED_VALUE)(RFLOAT_VALUE(val)); + } + else { + char buf[24]; + char *s; + + snprintf(buf, sizeof(buf), "%-.10g", RFLOAT_VALUE(val)); + if ((s = strchr(buf, ' ')) != 0) *s = '\0'; + rb_raise(rb_eRangeError, "float %s out of range of integer", buf); + } + + case T_BIGNUM: + return rb_big2long(val); + + default: + val = rb_to_int(val); + goto again; + } +} + +VALUE +rb_num2ulong(VALUE val) +{ + if (TYPE(val) == T_BIGNUM) { + return rb_big2ulong(val); + } + return (VALUE)rb_num2long(val); +} + +#if SIZEOF_INT < SIZEOF_VALUE +static void +check_int(SIGNED_VALUE num) +{ + const char *s; + + if (num < INT_MIN) { + s = "small"; + } + else if (num > INT_MAX) { + s = "big"; + } + else { + return; + } + rb_raise(rb_eRangeError, "integer %"PRIdVALUE " too %s to convert to `int'", num, s); +} + +static void +check_uint(VALUE num, VALUE sign) +{ + static const VALUE mask = ~(VALUE)UINT_MAX; + + if (RTEST(sign)) { + /* minus */ + if ((num & mask) != mask || (num & ~mask) <= INT_MAX + 1UL) + rb_raise(rb_eRangeError, "integer %"PRIdVALUE " too small to convert to `unsigned int'", num); + } + else { + /* plus */ + if ((num & mask) != 0) + rb_raise(rb_eRangeError, "integer %"PRIuVALUE " too big to convert to `unsigned int'", num); + } +} + +long +rb_num2int(VALUE val) +{ + long num = rb_num2long(val); + + check_int(num); + return num; +} + +long +rb_fix2int(VALUE val) +{ + long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val); + + check_int(num); + return num; +} + +unsigned long +rb_num2uint(VALUE val) +{ + unsigned long num = rb_num2ulong(val); + + check_uint(num, rb_funcall(val, '<', 1, INT2FIX(0))); + return num; +} + +unsigned long +rb_fix2uint(VALUE val) +{ + unsigned long num; + + if (!FIXNUM_P(val)) { + return rb_num2uint(val); + } + num = FIX2ULONG(val); + + check_uint(num, rb_funcall(val, '<', 1, INT2FIX(0))); + return num; +} +#else +long +rb_num2int(VALUE val) +{ + return rb_num2long(val); +} + +long +rb_fix2int(VALUE val) +{ + return FIX2INT(val); +} +#endif + +VALUE +rb_num2fix(VALUE val) +{ + long v; + + if (FIXNUM_P(val)) return val; + + v = rb_num2long(val); + if (!FIXABLE(v)) + rb_raise(rb_eRangeError, "integer %"PRIdVALUE " out of range of fixnum", v); + return LONG2FIX(v); +} + +#if HAVE_LONG_LONG + +LONG_LONG +rb_num2ll(VALUE val) +{ + if (NIL_P(val)) { + rb_raise(rb_eTypeError, "no implicit conversion from nil"); + } + + if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val); + + switch (TYPE(val)) { + case T_FLOAT: + if (RFLOAT_VALUE(val) <= (double)LLONG_MAX + && RFLOAT_VALUE(val) >= (double)LLONG_MIN) { + return (LONG_LONG)(RFLOAT_VALUE(val)); + } + else { + char buf[24]; + char *s; + + snprintf(buf, sizeof(buf), "%-.10g", RFLOAT_VALUE(val)); + if ((s = strchr(buf, ' ')) != 0) *s = '\0'; + rb_raise(rb_eRangeError, "float %s out of range of long long", buf); + } + + case T_BIGNUM: + return rb_big2ll(val); + + case T_STRING: + rb_raise(rb_eTypeError, "no implicit conversion from string"); + return Qnil; /* not reached */ + + case T_TRUE: + case T_FALSE: + rb_raise(rb_eTypeError, "no implicit conversion from boolean"); + return Qnil; /* not reached */ + + default: + val = rb_to_int(val); + return NUM2LL(val); + } +} + +unsigned LONG_LONG +rb_num2ull(VALUE val) +{ + if (TYPE(val) == T_BIGNUM) { + return rb_big2ull(val); + } + return (unsigned LONG_LONG)rb_num2ll(val); +} + +#endif /* HAVE_LONG_LONG */ + +static VALUE +num_numerator(VALUE num) +{ + return rb_funcall(rb_Rational1(num), rb_intern("numerator"), 0); +} + +static VALUE +num_denominator(VALUE num) +{ + return rb_funcall(rb_Rational1(num), rb_intern("denominator"), 0); +} + +/* + * Document-class: Integer + * + * Integer is the basis for the two concrete classes that + * hold whole numbers, Bignum and Fixnum. + * + */ + + +/* + * call-seq: + * int.to_i => int + * int.to_int => int + * int.floor => int + * int.ceil => int + * int.round => int + * int.truncate => int + * + * As int is already an Integer, all these + * methods simply return the receiver. + */ + +static VALUE +int_to_i(VALUE num) +{ + return num; +} + +/* + * call-seq: + * int.integer? -> true + * + * Always returns true. + */ + +static VALUE +int_int_p(VALUE num) +{ + return Qtrue; +} + +/* + * call-seq: + * int.odd? -> true or false + * + * Returns true if int is an odd number. + */ + +static VALUE +int_odd_p(VALUE num) +{ + if (rb_funcall(num, '%', 1, INT2FIX(2)) != INT2FIX(0)) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * int.even? -> true or false + * + * Returns true if int is an even number. + */ + +static VALUE +int_even_p(VALUE num) +{ + if (rb_funcall(num, '%', 1, INT2FIX(2)) == INT2FIX(0)) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * fixnum.next => integer + * fixnum.succ => integer + * + * Returns the Integer equal to int + 1. + * + * 1.next #=> 2 + * (-1).next #=> 0 + */ + +static VALUE +fix_succ(VALUE num) +{ + long i = FIX2LONG(num) + 1; + return LONG2NUM(i); +} + +/* + * call-seq: + * int.next => integer + * int.succ => integer + * + * Returns the Integer equal to int + 1. + * + * 1.next #=> 2 + * (-1).next #=> 0 + */ + +static VALUE +int_succ(VALUE num) +{ + if (FIXNUM_P(num)) { + long i = FIX2LONG(num) + 1; + return LONG2NUM(i); + } + return rb_funcall(num, '+', 1, INT2FIX(1)); +} + +/* + * call-seq: + * int.pred => integer + * + * Returns the Integer equal to int - 1. + * + * 1.pred #=> 0 + * (-1).pred #=> -2 + */ + +static VALUE +int_pred(VALUE num) +{ + if (FIXNUM_P(num)) { + long i = FIX2LONG(num) - 1; + return LONG2NUM(i); + } + return rb_funcall(num, '-', 1, INT2FIX(1)); +} + +/* + * call-seq: + * int.chr([encoding]) => string + * + * Returns a string containing the character represented by the + * receiver's value according to +encoding+. + * + * 65.chr #=> "A" + * 230.chr #=> "\346" + * 255.chr(Encoding::UTF_8) #=> "\303\277" + */ + +static VALUE +int_chr(int argc, VALUE *argv, VALUE num) +{ + char c; + int n; + long i = NUM2LONG(num); + rb_encoding *enc; + VALUE str; + + switch (argc) { + case 0: + if (i < 0 || 0xff < i) { + out_of_range: + rb_raise(rb_eRangeError, "%"PRIdVALUE " out of char range", i); + } + c = i; + if (i < 0x80) { + return rb_usascii_str_new(&c, 1); + } + else { + return rb_str_new(&c, 1); + } + case 1: + break; + default: + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 or 1)", argc); + break; + } + enc = rb_to_encoding(argv[0]); + if (!enc) enc = rb_ascii8bit_encoding(); + if (i < 0 || (n = rb_enc_codelen(i, enc)) <= 0) goto out_of_range; + str = rb_enc_str_new(0, n, enc); + rb_enc_mbcput(i, RSTRING_PTR(str), enc); + return str; +} + +/* + * call-seq: + * int.ord => int + * + * Returns the int itself. + * + * ?a.ord #=> 97 + * + * This method is intended for compatibility to + * character constant in Ruby 1.9. + * For example, ?a.ord returns 97 both in 1.8 and 1.9. + */ + +static VALUE +int_ord(num) + VALUE num; +{ + return num; +} + +static VALUE +int_numerator(VALUE num) +{ + return num; +} + +static VALUE +int_denominator(VALUE num) +{ + return INT2FIX(1); +} + +/******************************************************************** + * + * Document-class: Fixnum + * + * A Fixnum holds Integer values that can be + * represented in a native machine word (minus 1 bit). If any operation + * on a Fixnum exceeds this range, the value is + * automatically converted to a Bignum. + * + * Fixnum objects have immediate value. This means that + * when they are assigned or passed as parameters, the actual object is + * passed, rather than a reference to that object. Assignment does not + * alias Fixnum objects. There is effectively only one + * Fixnum object instance for any given integer value, so, + * for example, you cannot add a singleton method to a + * Fixnum. + */ + + +/* + * call-seq: + * -fix => integer + * + * Negates fix (which might return a Bignum). + */ + +static VALUE +fix_uminus(VALUE num) +{ + return LONG2NUM(-FIX2LONG(num)); +} + +VALUE +rb_fix2str(VALUE x, int base) +{ + extern const char ruby_digitmap[]; + char buf[SIZEOF_VALUE*CHAR_BIT + 2], *b = buf + sizeof buf; + long val = FIX2LONG(x); + int neg = 0; + + if (base < 2 || 36 < base) { + rb_raise(rb_eArgError, "invalid radix %d", base); + } + if (val == 0) { + return rb_usascii_str_new2("0"); + } + if (val < 0) { + val = -val; + neg = 1; + } + *--b = '\0'; + do { + *--b = ruby_digitmap[(int)(val % base)]; + } while (val /= base); + if (neg) { + *--b = '-'; + } + + return rb_usascii_str_new2(b); +} + +/* + * call-seq: + * fix.to_s( base=10 ) -> aString + * + * Returns a string containing the representation of fix radix + * base (between 2 and 36). + * + * 12345.to_s #=> "12345" + * 12345.to_s(2) #=> "11000000111001" + * 12345.to_s(8) #=> "30071" + * 12345.to_s(10) #=> "12345" + * 12345.to_s(16) #=> "3039" + * 12345.to_s(36) #=> "9ix" + * + */ +static VALUE +fix_to_s(int argc, VALUE *argv, VALUE x) +{ + int base; + + if (argc == 0) base = 10; + else { + VALUE b; + + rb_scan_args(argc, argv, "01", &b); + base = NUM2INT(b); + } + + return rb_fix2str(x, base); +} + +/* + * call-seq: + * fix + numeric => numeric_result + * + * Performs addition: the class of the resulting object depends on + * the class of numeric and on the magnitude of the + * result. + */ + +static VALUE +fix_plus(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + long a, b, c; + VALUE r; + + a = FIX2LONG(x); + b = FIX2LONG(y); + c = a + b; + r = LONG2NUM(c); + + return r; + } + switch (TYPE(y)) { + case T_BIGNUM: + return rb_big_plus(y, x); + case T_FLOAT: + return DBL2NUM((double)FIX2LONG(x) + RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '+'); + } +} + +/* + * call-seq: + * fix - numeric => numeric_result + * + * Performs subtraction: the class of the resulting object depends on + * the class of numeric and on the magnitude of the + * result. + */ + +static VALUE +fix_minus(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + long a, b, c; + VALUE r; + + a = FIX2LONG(x); + b = FIX2LONG(y); + c = a - b; + r = LONG2NUM(c); + + return r; + } + switch (TYPE(y)) { + case T_BIGNUM: + x = rb_int2big(FIX2LONG(x)); + return rb_big_minus(x, y); + case T_FLOAT: + return DBL2NUM((double)FIX2LONG(x) - RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '-'); + } +} + +#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2)) +/*tests if N*N would overflow*/ +#define FIT_SQRT_LONG(n) (((n)=-SQRT_LONG_MAX)) + +/* + * call-seq: + * fix * numeric => numeric_result + * + * Performs multiplication: the class of the resulting object depends on + * the class of numeric and on the magnitude of the + * result. + */ + +static VALUE +fix_mul(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { +#ifdef __HP_cc +/* avoids an optimization bug of HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005] */ + volatile +#endif + SIGNED_VALUE a, b; +#if SIZEOF_VALUE * 2 <= SIZEOF_LONG_LONG + LONG_LONG d; +#else + SIGNED_VALUE c; + VALUE r; +#endif + + a = FIX2LONG(x); + b = FIX2LONG(y); + +#if SIZEOF_VALUE * 2 <= SIZEOF_LONG_LONG + d = (LONG_LONG)a * b; + if (FIXABLE(d)) return LONG2FIX(d); + return rb_ll2inum(d); +#else + if (FIT_SQRT_LONG(a) && FIT_SQRT_LONG(b)) + return LONG2FIX(a*b); + c = a * b; + r = LONG2FIX(c); + + if (a == 0) return x; + if (FIX2LONG(r) != c || c/a != b) { + r = rb_big_mul(rb_int2big(a), rb_int2big(b)); + } + return r; +#endif + } + switch (TYPE(y)) { + case T_BIGNUM: + return rb_big_mul(y, x); + case T_FLOAT: + return DBL2NUM((double)FIX2LONG(x) * RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, '*'); + } +} + +static void +fixdivmod(long x, long y, long *divp, long *modp) +{ + long div, mod; + + if (y == 0) rb_num_zerodiv(); + if (y < 0) { + if (x < 0) + div = -x / -y; + else + div = - (x / -y); + } + else { + if (x < 0) + div = - (-x / y); + else + div = x / y; + } + mod = x - div*y; + if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) { + mod += y; + div -= 1; + } + if (divp) *divp = div; + if (modp) *modp = mod; +} + +/* + * call-seq: + * fix.fdiv(numeric) => float + * + * Returns the floating point result of dividing fix by + * numeric. + * + * 654321.fdiv(13731) #=> 47.6528293642124 + * 654321.fdiv(13731.24) #=> 47.6519964693647 + * + */ + +static VALUE +fix_fdiv(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + return DBL2NUM((double)FIX2LONG(x) / (double)FIX2LONG(y)); + } + switch (TYPE(y)) { + case T_BIGNUM: + return DBL2NUM((double)FIX2LONG(x) / rb_big2dbl(y)); + case T_FLOAT: + return DBL2NUM((double)FIX2LONG(x) / RFLOAT_VALUE(y)); + default: + return rb_num_coerce_bin(x, y, rb_intern("fdiv")); + } +} + +static VALUE +fix_divide(VALUE x, VALUE y, ID op) +{ + if (FIXNUM_P(y)) { + long div; + + fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0); + return LONG2NUM(div); + } + switch (TYPE(y)) { + case T_BIGNUM: + x = rb_int2big(FIX2LONG(x)); + return rb_big_div(x, y); + case T_FLOAT: + { + double div; + + if (op == '/') { + div = (double)FIX2LONG(x) / RFLOAT_VALUE(y); + return DBL2NUM(div); + } + else { + if (RFLOAT_VALUE(y) == 0) rb_num_zerodiv(); + div = (double)FIX2LONG(x) / RFLOAT_VALUE(y); + return rb_dbl2big(floor(div)); + } + } + default: + return rb_num_coerce_bin(x, y, op); + } +} + +/* + * call-seq: + * fix / numeric => numeric_result + * + * Performs division: the class of the resulting object depends on + * the class of numeric and on the magnitude of the + * result. + */ + +static VALUE +fix_div(VALUE x, VALUE y) +{ + return fix_divide(x, y, '/'); +} + +/* + * call-seq: + * fix.div(numeric) => numeric_result + * + * Performs integer division: returns integer value. + */ + +static VALUE +fix_idiv(VALUE x, VALUE y) +{ + return fix_divide(x, y, rb_intern("div")); +} + +/* + * call-seq: + * fix % other => Numeric + * fix.modulo(other) => Numeric + * + * Returns fix modulo other. + * See Numeric.divmod for more information. + */ + +static VALUE +fix_mod(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + long mod; + + fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod); + return LONG2NUM(mod); + } + switch (TYPE(y)) { + case T_BIGNUM: + x = rb_int2big(FIX2LONG(x)); + return rb_big_modulo(x, y); + case T_FLOAT: + { + double mod; + + flodivmod((double)FIX2LONG(x), RFLOAT_VALUE(y), 0, &mod); + return DBL2NUM(mod); + } + default: + return rb_num_coerce_bin(x, y, '%'); + } +} + +/* + * call-seq: + * fix.divmod(numeric) => array + * + * See Numeric#divmod. + */ +static VALUE +fix_divmod(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + long div, mod; + + fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod); + + return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod)); + } + switch (TYPE(y)) { + case T_BIGNUM: + x = rb_int2big(FIX2LONG(x)); + return rb_big_divmod(x, y); + case T_FLOAT: + { + double div, mod; + volatile VALUE a, b; + + flodivmod((double)FIX2LONG(x), RFLOAT_VALUE(y), &div, &mod); + a = dbl2ival(div); + b = DBL2NUM(mod); + return rb_assoc_new(a, b); + } + default: + return rb_num_coerce_bin(x, y, rb_intern("divmod")); + } +} + +static VALUE +int_pow(long x, unsigned long y) +{ + int neg = x < 0; + long z = 1; + + if (neg) x = -x; + if (y & 1) + z = x; + else + neg = 0; + y &= ~1; + do { + while (y % 2 == 0) { + if (!FIT_SQRT_LONG(x)) { + VALUE v; + bignum: + v = rb_big_pow(rb_int2big(x), LONG2NUM(y)); + if (z != 1) v = rb_big_mul(rb_int2big(neg ? -z : z), v); + return v; + } + x = x * x; + y >>= 1; + } + { + long xz = x * z; + if (!POSFIXABLE(xz) || xz / x != z) { + goto bignum; + } + z = xz; + } + } while (--y); + if (neg) z = -z; + return LONG2NUM(z); +} + +/* + * call-seq: + * fix ** other => Numeric + * + * Raises fix to the other power, which may + * be negative or fractional. + * + * 2 ** 3 #=> 8 + * 2 ** -1 #=> 0.5 + * 2 ** 0.5 #=> 1.4142135623731 + */ + +static VALUE +fix_pow(VALUE x, VALUE y) +{ + static const double zero = 0.0; + long a = FIX2LONG(x); + + if (FIXNUM_P(y)) { + long b = FIX2LONG(y); + + if (b < 0) + return rb_funcall(rb_rational_raw1(x), rb_intern("**"), 1, y); + + if (b == 0) return INT2FIX(1); + if (b == 1) return x; + if (a == 0) { + if (b > 0) return INT2FIX(0); + return DBL2NUM(1.0 / zero); + } + if (a == 1) return INT2FIX(1); + if (a == -1) { + if (b % 2 == 0) + return INT2FIX(1); + else + return INT2FIX(-1); + } + return int_pow(a, b); + } + switch (TYPE(y)) { + case T_BIGNUM: + + if (rb_funcall(y, '<', 1, INT2FIX(0))) + return rb_funcall(rb_rational_raw1(x), rb_intern("**"), 1, y); + + if (a == 0) return INT2FIX(0); + if (a == 1) return INT2FIX(1); + if (a == -1) { + if (int_even_p(y)) return INT2FIX(1); + else return INT2FIX(-1); + } + x = rb_int2big(FIX2LONG(x)); + return rb_big_pow(x, y); + case T_FLOAT: + if (RFLOAT_VALUE(y) == 0.0) return DBL2NUM(1.0); + if (a == 0) { + return DBL2NUM(RFLOAT_VALUE(y) < 0 ? (1.0 / zero) : 0.0); + } + if (a == 1) return DBL2NUM(1.0); + return DBL2NUM(pow((double)a, RFLOAT_VALUE(y))); + default: + return rb_num_coerce_bin(x, y, rb_intern("**")); + } +} + +/* + * call-seq: + * fix == other + * + * Return true if fix equals other + * numerically. + * + * 1 == 2 #=> false + * 1 == 1.0 #=> true + */ + +static VALUE +fix_equal(VALUE x, VALUE y) +{ + if (x == y) return Qtrue; + if (FIXNUM_P(y)) return Qfalse; + switch (TYPE(y)) { + case T_BIGNUM: + return rb_big_eq(y, x); + case T_FLOAT: + return (double)FIX2LONG(x) == RFLOAT_VALUE(y) ? Qtrue : Qfalse; + default: + return num_equal(x, y); + } +} + +/* + * call-seq: + * fix <=> numeric => -1, 0, +1 + * + * Comparison---Returns -1, 0, or +1 depending on whether fix is + * less than, equal to, or greater than numeric. This is the + * basis for the tests in Comparable. + */ + +static VALUE +fix_cmp(VALUE x, VALUE y) +{ + if (x == y) return INT2FIX(0); + if (FIXNUM_P(y)) { + if (FIX2LONG(x) > FIX2LONG(y)) return INT2FIX(1); + return INT2FIX(-1); + } + switch (TYPE(y)) { + case T_BIGNUM: + return rb_big_cmp(rb_int2big(FIX2LONG(x)), y); + case T_FLOAT: + return rb_dbl_cmp((double)FIX2LONG(x), RFLOAT_VALUE(y)); + default: + return rb_num_coerce_cmp(x, y, rb_intern("<=>")); + } +} + +/* + * call-seq: + * fix > other => true or false + * + * Returns true if the value of fix is + * greater than that of other. + */ + +static VALUE +fix_gt(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + if (FIX2LONG(x) > FIX2LONG(y)) return Qtrue; + return Qfalse; + } + switch (TYPE(y)) { + case T_BIGNUM: + return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse; + case T_FLOAT: + return (double)FIX2LONG(x) > RFLOAT_VALUE(y) ? Qtrue : Qfalse; + default: + return rb_num_coerce_relop(x, y, '>'); + } +} + +/* + * call-seq: + * fix >= other => true or false + * + * Returns true if the value of fix is + * greater than or equal to that of other. + */ + +static VALUE +fix_ge(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + if (FIX2LONG(x) >= FIX2LONG(y)) return Qtrue; + return Qfalse; + } + switch (TYPE(y)) { + case T_BIGNUM: + return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse; + case T_FLOAT: + return (double)FIX2LONG(x) >= RFLOAT_VALUE(y) ? Qtrue : Qfalse; + default: + return rb_num_coerce_relop(x, y, rb_intern(">=")); + } +} + +/* + * call-seq: + * fix < other => true or false + * + * Returns true if the value of fix is + * less than that of other. + */ + +static VALUE +fix_lt(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + if (FIX2LONG(x) < FIX2LONG(y)) return Qtrue; + return Qfalse; + } + switch (TYPE(y)) { + case T_BIGNUM: + return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse; + case T_FLOAT: + return (double)FIX2LONG(x) < RFLOAT_VALUE(y) ? Qtrue : Qfalse; + default: + return rb_num_coerce_relop(x, y, '<'); + } +} + +/* + * call-seq: + * fix <= other => true or false + * + * Returns true if the value of fix is + * less than or equal to that of other. + */ + +static VALUE +fix_le(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + if (FIX2LONG(x) <= FIX2LONG(y)) return Qtrue; + return Qfalse; + } + switch (TYPE(y)) { + case T_BIGNUM: + return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse; + case T_FLOAT: + return (double)FIX2LONG(x) <= RFLOAT_VALUE(y) ? Qtrue : Qfalse; + default: + return rb_num_coerce_relop(x, y, rb_intern("<=")); + } +} + +/* + * call-seq: + * ~fix => integer + * + * One's complement: returns a number where each bit is flipped. + */ + +static VALUE +fix_rev(VALUE num) +{ + long val = FIX2LONG(num); + + val = ~val; + return LONG2NUM(val); +} + +static VALUE +bit_coerce(VALUE x) +{ + while (!FIXNUM_P(x) && TYPE(x) != T_BIGNUM) { + if (TYPE(x) == T_FLOAT) { + rb_raise(rb_eTypeError, "can't convert Float into Integer"); + } + x = rb_to_int(x); + } + return x; +} + +/* + * call-seq: + * fix & other => integer + * + * Bitwise AND. + */ + +static VALUE +fix_and(VALUE x, VALUE y) +{ + long val; + + if (!FIXNUM_P(y = bit_coerce(y))) { + return rb_big_and(y, x); + } + val = FIX2LONG(x) & FIX2LONG(y); + return LONG2NUM(val); +} + +/* + * call-seq: + * fix | other => integer + * + * Bitwise OR. + */ + +static VALUE +fix_or(VALUE x, VALUE y) +{ + long val; + + if (!FIXNUM_P(y = bit_coerce(y))) { + return rb_big_or(y, x); + } + val = FIX2LONG(x) | FIX2LONG(y); + return LONG2NUM(val); +} + +/* + * call-seq: + * fix ^ other => integer + * + * Bitwise EXCLUSIVE OR. + */ + +static VALUE +fix_xor(VALUE x, VALUE y) +{ + long val; + + if (!FIXNUM_P(y = bit_coerce(y))) { + return rb_big_xor(y, x); + } + val = FIX2LONG(x) ^ FIX2LONG(y); + return LONG2NUM(val); +} + +static VALUE fix_lshift(long, unsigned long); +static VALUE fix_rshift(long, unsigned long); + +/* + * call-seq: + * fix << count => integer + * + * Shifts _fix_ left _count_ positions (right if _count_ is negative). + */ + +static VALUE +rb_fix_lshift(VALUE x, VALUE y) +{ + long val, width; + + val = NUM2LONG(x); + if (!FIXNUM_P(y)) + return rb_big_lshift(rb_int2big(val), y); + width = FIX2LONG(y); + if (width < 0) + return fix_rshift(val, (unsigned long)-width); + return fix_lshift(val, width); +} + +static VALUE +fix_lshift(long val, unsigned long width) +{ + if (width > (SIZEOF_LONG*CHAR_BIT-1) + || ((unsigned long)val)>>(SIZEOF_LONG*CHAR_BIT-1-width) > 0) { + return rb_big_lshift(rb_int2big(val), ULONG2NUM(width)); + } + val = val << width; + return LONG2NUM(val); +} + +/* + * call-seq: + * fix >> count => integer + * + * Shifts _fix_ right _count_ positions (left if _count_ is negative). + */ + +static VALUE +rb_fix_rshift(VALUE x, VALUE y) +{ + long i, val; + + val = FIX2LONG(x); + if (!FIXNUM_P(y)) + return rb_big_rshift(rb_int2big(val), y); + i = FIX2LONG(y); + if (i == 0) return x; + if (i < 0) + return fix_lshift(val, (unsigned long)-i); + return fix_rshift(val, i); +} + +static VALUE +fix_rshift(long val, unsigned long i) +{ + if (i >= sizeof(long)*CHAR_BIT-1) { + if (val < 0) return INT2FIX(-1); + return INT2FIX(0); + } + val = RSHIFT(val, i); + return LONG2FIX(val); +} + +/* + * call-seq: + * fix[n] => 0, 1 + * + * Bit Reference---Returns the nth bit in the binary + * representation of fix, where fix[0] is the least + * significant bit. + * + * a = 0b11001100101010 + * 30.downto(0) do |n| print a[n] end + * + * produces: + * + * 0000000000000000011001100101010 + */ + +static VALUE +fix_aref(VALUE fix, VALUE idx) +{ + long val = FIX2LONG(fix); + long i; + + idx = rb_to_int(idx); + if (!FIXNUM_P(idx)) { + idx = rb_big_norm(idx); + if (!FIXNUM_P(idx)) { + if (!RBIGNUM_SIGN(idx) || val >= 0) + return INT2FIX(0); + return INT2FIX(1); + } + } + i = FIX2LONG(idx); + + if (i < 0) return INT2FIX(0); + if (SIZEOF_LONG*CHAR_BIT-1 < i) { + if (val < 0) return INT2FIX(1); + return INT2FIX(0); + } + if (val & (1L< float + * + * Converts fix to a Float. + * + */ + +static VALUE +fix_to_f(VALUE num) +{ + double val; + + val = (double)FIX2LONG(num); + + return DBL2NUM(val); +} + +/* + * call-seq: + * fix.abs -> aFixnum + * + * Returns the absolute value of fix. + * + * -12345.abs #=> 12345 + * 12345.abs #=> 12345 + * + */ + +static VALUE +fix_abs(VALUE fix) +{ + long i = FIX2LONG(fix); + + if (i < 0) i = -i; + + return LONG2NUM(i); +} + + + +/* + * call-seq: + * fix.size -> fixnum + * + * Returns the number of bytes in the machine representation + * of a Fixnum. + * + * 1.size #=> 4 + * -1.size #=> 4 + * 2147483647.size #=> 4 + */ + +static VALUE +fix_size(VALUE fix) +{ + return INT2FIX(sizeof(long)); +} + +/* + * call-seq: + * int.upto(limit) {|i| block } => int + * + * Iterates block, passing in integer values from int + * up to and including limit. + * + * 5.upto(10) { |i| print i, " " } + * + * produces: + * + * 5 6 7 8 9 10 + */ + +static VALUE +int_upto(VALUE from, VALUE to) +{ + RETURN_ENUMERATOR(from, 1, &to); + if (FIXNUM_P(from) && FIXNUM_P(to)) { + long i, end; + + end = FIX2LONG(to); + for (i = FIX2LONG(from); i <= end; i++) { + rb_yield(LONG2FIX(i)); + } + } + else { + VALUE i = from, c; + + while (!(c = rb_funcall(i, '>', 1, to))) { + rb_yield(i); + i = rb_funcall(i, '+', 1, INT2FIX(1)); + } + if (NIL_P(c)) rb_cmperr(i, to); + } + return from; +} + +/* + * call-seq: + * int.downto(limit) {|i| block } => int + * + * Iterates block, passing decreasing values from int + * down to and including limit. + * + * 5.downto(1) { |n| print n, ".. " } + * print " Liftoff!\n" + * + * produces: + * + * 5.. 4.. 3.. 2.. 1.. Liftoff! + */ + +static VALUE +int_downto(VALUE from, VALUE to) +{ + RETURN_ENUMERATOR(from, 1, &to); + if (FIXNUM_P(from) && FIXNUM_P(to)) { + long i, end; + + end = FIX2LONG(to); + for (i=FIX2LONG(from); i >= end; i--) { + rb_yield(LONG2FIX(i)); + } + } + else { + VALUE i = from, c; + + while (!(c = rb_funcall(i, '<', 1, to))) { + rb_yield(i); + i = rb_funcall(i, '-', 1, INT2FIX(1)); + } + if (NIL_P(c)) rb_cmperr(i, to); + } + return from; +} + +/* + * call-seq: + * int.times {|i| block } => int + * + * Iterates block int times, passing in values from zero to + * int - 1. + * + * 5.times do |i| + * print i, " " + * end + * + * produces: + * + * 0 1 2 3 4 + */ + +static VALUE +int_dotimes(VALUE num) +{ + RETURN_ENUMERATOR(num, 0, 0); + + if (FIXNUM_P(num)) { + long i, end; + + end = FIX2LONG(num); + for (i=0; i 0) { + return rb_Float(num); + } + if (ndigits == 0) { + return num; + } + ndigits = -ndigits; + if (ndigits < 0) { + rb_raise(rb_eArgError, "ndigits out of range"); + } + f = int_pow(10, ndigits); + if (FIXNUM_P(num) && FIXNUM_P(f)) { + SIGNED_VALUE x = FIX2LONG(num), y = FIX2LONG(f); + int neg = x < 0; + if (neg) x = -x; + x = (x + y / 2) / y * y; + if (neg) x = -x; + return LONG2NUM(x); + } + h = rb_funcall(f, '/', 1, INT2FIX(2)); + r = rb_funcall(num, '%', 1, f); + n = rb_funcall(num, '-', 1, r); + if (!RTEST(rb_funcall(r, '<', 1, h))) { + n = rb_funcall(n, '+', 1, f); + } + return n; +} + +/* + * call-seq: + * fix.zero? => true or false + * + * Returns true if fix is zero. + * + */ + +static VALUE +fix_zero_p(VALUE num) +{ + if (FIX2LONG(num) == 0) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * fix.odd? -> true or false + * + * Returns true if fix is an odd number. + */ + +static VALUE +fix_odd_p(VALUE num) +{ + if (num & 2) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * fix.even? -> true or false + * + * Returns true if fix is an even number. + */ + +static VALUE +fix_even_p(VALUE num) +{ + if (num & 2) { + return Qfalse; + } + return Qtrue; +} + +void +Init_Numeric(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + +#if defined(__FreeBSD__) && __FreeBSD__ < 4 + /* allow divide by zero -- Inf */ + fpsetmask(fpgetmask() & ~(FP_X_DZ|FP_X_INV|FP_X_OFL)); +#elif defined(_UNICOSMP) + /* Turn off floating point exceptions for divide by zero, etc. */ + _set_Creg(0, 0); +#elif defined(__BORLANDC__) + /* Turn off floating point exceptions for overflow, etc. */ + _control87(MCW_EM, MCW_EM); +#endif + id_coerce = rb_intern("coerce"); + id_to_i = rb_intern("to_i"); + id_eq = rb_intern("=="); + + rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError); + rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError); + rb_cNumeric = rb_define_class("Numeric", rb_cObject); + + rb_define_method(rb_cNumeric, "singleton_method_added", num_sadded, 1); + rb_include_module(rb_cNumeric, rb_mComparable); + rb_define_method(rb_cNumeric, "initialize_copy", num_init_copy, 1); + rb_define_method(rb_cNumeric, "coerce", num_coerce, 1); + + rb_define_method(rb_cNumeric, "+@", num_uplus, 0); + rb_define_method(rb_cNumeric, "-@", num_uminus, 0); + rb_define_method(rb_cNumeric, "<=>", num_cmp, 1); + rb_define_method(rb_cNumeric, "eql?", num_eql, 1); + rb_define_method(rb_cNumeric, "quo", num_quo, 1); + rb_define_method(rb_cNumeric, "fdiv", num_fdiv, 1); + rb_define_method(rb_cNumeric, "div", num_div, 1); + rb_define_method(rb_cNumeric, "divmod", num_divmod, 1); + rb_define_method(rb_cNumeric, "modulo", num_modulo, 1); + rb_define_method(rb_cNumeric, "remainder", num_remainder, 1); + rb_define_method(rb_cNumeric, "abs", num_abs, 0); + rb_define_method(rb_cNumeric, "magnitude", num_abs, 0); + rb_define_method(rb_cNumeric, "to_int", num_to_int, 0); + + rb_define_method(rb_cNumeric, "real?", num_real_p, 0); + rb_define_method(rb_cNumeric, "integer?", num_int_p, 0); + rb_define_method(rb_cNumeric, "zero?", num_zero_p, 0); + rb_define_method(rb_cNumeric, "nonzero?", num_nonzero_p, 0); + + rb_define_method(rb_cNumeric, "floor", num_floor, 0); + rb_define_method(rb_cNumeric, "ceil", num_ceil, 0); + rb_define_method(rb_cNumeric, "round", num_round, -1); + rb_define_method(rb_cNumeric, "truncate", num_truncate, 0); + rb_define_method(rb_cNumeric, "step", num_step, -1); + + rb_define_method(rb_cNumeric, "numerator", num_numerator, 0); + rb_define_method(rb_cNumeric, "denominator", num_denominator, 0); + + rb_cInteger = rb_define_class("Integer", rb_cNumeric); + rb_undef_alloc_func(rb_cInteger); + rb_undef_method(CLASS_OF(rb_cInteger), "new"); + + rb_define_method(rb_cInteger, "integer?", int_int_p, 0); + rb_define_method(rb_cInteger, "odd?", int_odd_p, 0); + rb_define_method(rb_cInteger, "even?", int_even_p, 0); + rb_define_method(rb_cInteger, "upto", int_upto, 1); + rb_define_method(rb_cInteger, "downto", int_downto, 1); + rb_define_method(rb_cInteger, "times", int_dotimes, 0); + rb_define_method(rb_cInteger, "succ", int_succ, 0); + rb_define_method(rb_cInteger, "next", int_succ, 0); + rb_define_method(rb_cInteger, "pred", int_pred, 0); + rb_define_method(rb_cInteger, "chr", int_chr, -1); + rb_define_method(rb_cInteger, "ord", int_ord, 0); + rb_define_method(rb_cInteger, "to_i", int_to_i, 0); + rb_define_method(rb_cInteger, "to_int", int_to_i, 0); + rb_define_method(rb_cInteger, "floor", int_to_i, 0); + rb_define_method(rb_cInteger, "ceil", int_to_i, 0); + rb_define_method(rb_cInteger, "truncate", int_to_i, 0); + rb_define_method(rb_cInteger, "round", int_round, -1); + + rb_define_method(rb_cInteger, "numerator", int_numerator, 0); + rb_define_method(rb_cInteger, "denominator", int_denominator, 0); + + rb_cFixnum = rb_define_class("Fixnum", rb_cInteger); + + rb_define_method(rb_cFixnum, "to_s", fix_to_s, -1); + + rb_define_method(rb_cFixnum, "-@", fix_uminus, 0); + rb_define_method(rb_cFixnum, "+", fix_plus, 1); + rb_define_method(rb_cFixnum, "-", fix_minus, 1); + rb_define_method(rb_cFixnum, "*", fix_mul, 1); + rb_define_method(rb_cFixnum, "/", fix_div, 1); + rb_define_method(rb_cFixnum, "div", fix_idiv, 1); + rb_define_method(rb_cFixnum, "%", fix_mod, 1); + rb_define_method(rb_cFixnum, "modulo", fix_mod, 1); + rb_define_method(rb_cFixnum, "divmod", fix_divmod, 1); + rb_define_method(rb_cFixnum, "fdiv", fix_fdiv, 1); + rb_define_method(rb_cFixnum, "**", fix_pow, 1); + + rb_define_method(rb_cFixnum, "abs", fix_abs, 0); + rb_define_method(rb_cFixnum, "magnitude", fix_abs, 0); + + rb_define_method(rb_cFixnum, "==", fix_equal, 1); + rb_define_method(rb_cFixnum, "<=>", fix_cmp, 1); + rb_define_method(rb_cFixnum, ">", fix_gt, 1); + rb_define_method(rb_cFixnum, ">=", fix_ge, 1); + rb_define_method(rb_cFixnum, "<", fix_lt, 1); + rb_define_method(rb_cFixnum, "<=", fix_le, 1); + + rb_define_method(rb_cFixnum, "~", fix_rev, 0); + rb_define_method(rb_cFixnum, "&", fix_and, 1); + rb_define_method(rb_cFixnum, "|", fix_or, 1); + rb_define_method(rb_cFixnum, "^", fix_xor, 1); + rb_define_method(rb_cFixnum, "[]", fix_aref, 1); + + rb_define_method(rb_cFixnum, "<<", rb_fix_lshift, 1); + rb_define_method(rb_cFixnum, ">>", rb_fix_rshift, 1); + + rb_define_method(rb_cFixnum, "to_f", fix_to_f, 0); + rb_define_method(rb_cFixnum, "size", fix_size, 0); + rb_define_method(rb_cFixnum, "zero?", fix_zero_p, 0); + rb_define_method(rb_cFixnum, "odd?", fix_odd_p, 0); + rb_define_method(rb_cFixnum, "even?", fix_even_p, 0); + rb_define_method(rb_cFixnum, "succ", fix_succ, 0); + + rb_cFloat = rb_define_class("Float", rb_cNumeric); + + rb_undef_alloc_func(rb_cFloat); + rb_undef_method(CLASS_OF(rb_cFloat), "new"); + + rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS)); + rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX)); + rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG)); + rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG)); + rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP)); + rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP)); + rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP)); + rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP)); + rb_define_const(rb_cFloat, "MIN", DBL2NUM(DBL_MIN)); + rb_define_const(rb_cFloat, "MAX", DBL2NUM(DBL_MAX)); + rb_define_const(rb_cFloat, "EPSILON", DBL2NUM(DBL_EPSILON)); + + rb_define_method(rb_cFloat, "to_s", flo_to_s, 0); + rb_define_method(rb_cFloat, "coerce", flo_coerce, 1); + rb_define_method(rb_cFloat, "-@", flo_uminus, 0); + rb_define_method(rb_cFloat, "+", flo_plus, 1); + rb_define_method(rb_cFloat, "-", flo_minus, 1); + rb_define_method(rb_cFloat, "*", flo_mul, 1); + rb_define_method(rb_cFloat, "/", flo_div, 1); + rb_define_method(rb_cFloat, "quo", flo_quo, 1); + rb_define_method(rb_cFloat, "fdiv", flo_quo, 1); + rb_define_method(rb_cFloat, "%", flo_mod, 1); + rb_define_method(rb_cFloat, "modulo", flo_mod, 1); + rb_define_method(rb_cFloat, "divmod", flo_divmod, 1); + rb_define_method(rb_cFloat, "**", flo_pow, 1); + rb_define_method(rb_cFloat, "==", flo_eq, 1); + rb_define_method(rb_cFloat, "<=>", flo_cmp, 1); + rb_define_method(rb_cFloat, ">", flo_gt, 1); + rb_define_method(rb_cFloat, ">=", flo_ge, 1); + rb_define_method(rb_cFloat, "<", flo_lt, 1); + rb_define_method(rb_cFloat, "<=", flo_le, 1); + rb_define_method(rb_cFloat, "eql?", flo_eql, 1); + rb_define_method(rb_cFloat, "hash", flo_hash, 0); + rb_define_method(rb_cFloat, "to_f", flo_to_f, 0); + rb_define_method(rb_cFloat, "abs", flo_abs, 0); + rb_define_method(rb_cFloat, "magnitude", flo_abs, 0); + rb_define_method(rb_cFloat, "zero?", flo_zero_p, 0); + + rb_define_method(rb_cFloat, "to_i", flo_truncate, 0); + rb_define_method(rb_cFloat, "to_int", flo_truncate, 0); + rb_define_method(rb_cFloat, "floor", flo_floor, 0); + rb_define_method(rb_cFloat, "ceil", flo_ceil, 0); + rb_define_method(rb_cFloat, "round", flo_round, -1); + rb_define_method(rb_cFloat, "truncate", flo_truncate, 0); + + rb_define_method(rb_cFloat, "nan?", flo_is_nan_p, 0); + rb_define_method(rb_cFloat, "infinite?", flo_is_infinite_p, 0); + rb_define_method(rb_cFloat, "finite?", flo_is_finite_p, 0); +} diff --git a/lib/ruby-1.9.1-rc1/object.c b/lib/ruby-1.9.1-rc1/object.c new file mode 100644 index 0000000..be99de6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/object.c @@ -0,0 +1,2647 @@ +/********************************************************************** + + object.c - + + $Author: ko1 $ + created at: Thu Jul 15 12:01:24 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/util.h" +#include +#include +#include +#include +#include + +VALUE rb_cBasicObject; +VALUE rb_mKernel; +VALUE rb_cObject; +VALUE rb_cModule; +VALUE rb_cClass; +VALUE rb_cData; + +VALUE rb_cNilClass; +VALUE rb_cTrueClass; +VALUE rb_cFalseClass; + +static ID id_eq, id_eql, id_match, id_inspect, id_init_copy; + +/* + * call-seq: + * obj === other => true or false + * + * Case Equality---For class Object, effectively the same + * as calling #==, but typically overridden by descendents + * to provide meaningful semantics in case statements. + */ + +VALUE +rb_equal(VALUE obj1, VALUE obj2) +{ + VALUE result; + + if (obj1 == obj2) return Qtrue; + result = rb_funcall(obj1, id_eq, 1, obj2); + if (RTEST(result)) return Qtrue; + return Qfalse; +} + +int +rb_eql(VALUE obj1, VALUE obj2) +{ + return RTEST(rb_funcall(obj1, id_eql, 1, obj2)); +} + +/* + * call-seq: + * obj == other => true or false + * obj.equal?(other) => true or false + * obj.eql?(other) => true or false + * + * Equality---At the Object level, == returns + * true only if obj and other are the + * same object. Typically, this method is overridden in descendent + * classes to provide class-specific meaning. + * + * Unlike ==, the equal? method should never be + * overridden by subclasses: it is used to determine object identity + * (that is, a.equal?(b) iff a is the same + * object as b). + * + * The eql? method returns true if + * obj and anObject have the same value. Used by + * Hash to test members for equality. For objects of + * class Object, eql? is synonymous with + * ==. Subclasses normally continue this tradition, but + * there are exceptions. Numeric types, for example, + * perform type conversion across ==, but not across + * eql?, so: + * + * 1 == 1.0 #=> true + * 1.eql? 1.0 #=> false + */ + +VALUE +rb_obj_equal(VALUE obj1, VALUE obj2) +{ + if (obj1 == obj2) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * !obj => true or false + * + * Boolean negate. + */ + +VALUE +rb_obj_not(VALUE obj) +{ + return RTEST(obj) ? Qfalse : Qtrue; +} + +/* + * call-seq: + * obj != other => true or false + * + * Returns true if two objects are not-equal, otherwise false. + */ + +VALUE +rb_obj_not_equal(VALUE obj1, VALUE obj2) +{ + VALUE result = rb_funcall(obj1, id_eq, 1, obj2); + return RTEST(result) ? Qfalse : Qtrue; +} + +VALUE +rb_class_real(VALUE cl) +{ + if (cl == 0) + return 0; + while ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS) { + cl = RCLASS_SUPER(cl); + } + return cl; +} + +/* + * call-seq: + * obj.class => class + * + * Returns the class of obj, now preferred over + * Object#type, as an object's type in Ruby is only + * loosely tied to that object's class. This method must always be + * called with an explicit receiver, as class is also a + * reserved word in Ruby. + * + * 1.class #=> Fixnum + * self.class #=> Object + */ + +VALUE +rb_obj_class(VALUE obj) +{ + return rb_class_real(CLASS_OF(obj)); +} + +static void +init_copy(VALUE dest, VALUE obj) +{ + if (OBJ_FROZEN(dest)) { + rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest)); + } + RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR); + RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT|FL_UNTRUSTED); + rb_copy_generic_ivar(dest, obj); + rb_gc_copy_finalizer(dest, obj); + switch (TYPE(obj)) { + case T_OBJECT: + if (!(RBASIC(dest)->flags & ROBJECT_EMBED) && ROBJECT_IVPTR(dest)) { + xfree(ROBJECT_IVPTR(dest)); + ROBJECT(dest)->as.heap.ivptr = 0; + ROBJECT(dest)->as.heap.numiv = 0; + ROBJECT(dest)->as.heap.iv_index_tbl = 0; + } + if (RBASIC(obj)->flags & ROBJECT_EMBED) { + MEMCPY(ROBJECT(dest)->as.ary, ROBJECT(obj)->as.ary, VALUE, ROBJECT_EMBED_LEN_MAX); + RBASIC(dest)->flags |= ROBJECT_EMBED; + } + else { + long len = ROBJECT(obj)->as.heap.numiv; + VALUE *ptr = ALLOC_N(VALUE, len); + MEMCPY(ptr, ROBJECT(obj)->as.heap.ivptr, VALUE, len); + ROBJECT(dest)->as.heap.ivptr = ptr; + ROBJECT(dest)->as.heap.numiv = len; + ROBJECT(dest)->as.heap.iv_index_tbl = ROBJECT(obj)->as.heap.iv_index_tbl; + RBASIC(dest)->flags &= ~ROBJECT_EMBED; + } + break; + case T_CLASS: + case T_MODULE: + if (RCLASS_IV_TBL(dest)) { + st_free_table(RCLASS_IV_TBL(dest)); + RCLASS_IV_TBL(dest) = 0; + } + if (RCLASS_IV_TBL(obj)) { + RCLASS_IV_TBL(dest) = st_copy(RCLASS_IV_TBL(obj)); + } + break; + } + rb_funcall(dest, id_init_copy, 1, obj); +} + +/* + * call-seq: + * obj.clone -> an_object + * + * Produces a shallow copy of obj---the instance variables of + * obj are copied, but not the objects they reference. Copies + * the frozen and tainted state of obj. See also the discussion + * under Object#dup. + * + * class Klass + * attr_accessor :str + * end + * s1 = Klass.new #=> # + * s1.str = "Hello" #=> "Hello" + * s2 = s1.clone #=> # + * s2.str[1,4] = "i" #=> "i" + * s1.inspect #=> "#" + * s2.inspect #=> "#" + * + * This method may have class-specific behavior. If so, that + * behavior will be documented under the #+initialize_copy+ method of + * the class. + */ + +VALUE +rb_obj_clone(VALUE obj) +{ + VALUE clone; + + if (rb_special_const_p(obj)) { + rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj)); + } + clone = rb_obj_alloc(rb_obj_class(obj)); + RBASIC(clone)->klass = rb_singleton_class_clone(obj); + RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE); + init_copy(clone, obj); + RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE; + + return clone; +} + +/* + * call-seq: + * obj.dup -> an_object + * + * Produces a shallow copy of obj---the instance variables of + * obj are copied, but not the objects they reference. + * dup copies the tainted state of obj. See also + * the discussion under Object#clone. In general, + * clone and dup may have different semantics + * in descendent classes. While clone is used to duplicate + * an object, including its internal state, dup typically + * uses the class of the descendent object to create the new instance. + * + * This method may have class-specific behavior. If so, that + * behavior will be documented under the #+initialize_copy+ method of + * the class. + */ + +VALUE +rb_obj_dup(VALUE obj) +{ + VALUE dup; + + if (rb_special_const_p(obj)) { + rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj)); + } + dup = rb_obj_alloc(rb_obj_class(obj)); + init_copy(dup, obj); + + return dup; +} + +/* :nodoc: */ +VALUE +rb_obj_init_copy(VALUE obj, VALUE orig) +{ + if (obj == orig) return obj; + rb_check_frozen(obj); + if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) { + rb_raise(rb_eTypeError, "initialize_copy should take same class object"); + } + return obj; +} + +/* + * call-seq: + * obj.to_s => string + * + * Returns a string representing obj. The default + * to_s prints the object's class and an encoding of the + * object id. As a special case, the top-level object that is the + * initial execution context of Ruby programs returns ``main.'' + */ + +VALUE +rb_any_to_s(VALUE obj) +{ + const char *cname = rb_obj_classname(obj); + VALUE str; + + str = rb_sprintf("#<%s:%p>", cname, (void*)obj); + OBJ_INFECT(str, obj); + + return str; +} + +VALUE +rb_inspect(VALUE obj) +{ + return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0)); +} + +static int +inspect_i(ID id, VALUE value, VALUE str) +{ + VALUE str2; + const char *ivname; + + /* need not to show internal data */ + if (CLASS_OF(value) == 0) return ST_CONTINUE; + if (!rb_is_instance_id(id)) return ST_CONTINUE; + if (RSTRING_PTR(str)[0] == '-') { /* first element */ + RSTRING_PTR(str)[0] = '#'; + rb_str_cat2(str, " "); + } + else { + rb_str_cat2(str, ", "); + } + ivname = rb_id2name(id); + rb_str_cat2(str, ivname); + rb_str_cat2(str, "="); + str2 = rb_inspect(value); + rb_str_append(str, str2); + OBJ_INFECT(str, str2); + + return ST_CONTINUE; +} + +static VALUE +inspect_obj(VALUE obj, VALUE str, int recur) +{ + if (recur) { + rb_str_cat2(str, " ..."); + } + else { + rb_ivar_foreach(obj, inspect_i, str); + } + rb_str_cat2(str, ">"); + RSTRING_PTR(str)[0] = '#'; + OBJ_INFECT(str, obj); + + return str; +} + +/* + * call-seq: + * obj.inspect => string + * + * Returns a string containing a human-readable representation of + * obj. If not overridden, uses the to_s method to + * generate the string. + * + * [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" + * Time.new.inspect #=> "2008-03-08 19:43:39 +0900" + */ + + +static VALUE +rb_obj_inspect(VALUE obj) +{ + + if (TYPE(obj) == T_OBJECT) { + int has_ivar = 0; + VALUE *ptr = ROBJECT_IVPTR(obj); + long len = ROBJECT_NUMIV(obj); + long i; + + for (i = 0; i < len; i++) { + if (ptr[i] != Qundef) { + has_ivar = 1; + break; + } + } + + if (has_ivar) { + VALUE str; + const char *c = rb_obj_classname(obj); + + str = rb_sprintf("-<%s:%p", c, (void*)obj); + return rb_exec_recursive(inspect_obj, obj, str); + } + } + return rb_funcall(obj, rb_intern("to_s"), 0, 0); +} + + +/* + * call-seq: + * obj.instance_of?(class) => true or false + * + * Returns true if obj is an instance of the given + * class. See also Object#kind_of?. + */ + +VALUE +rb_obj_is_instance_of(VALUE obj, VALUE c) +{ + switch (TYPE(c)) { + case T_MODULE: + case T_CLASS: + case T_ICLASS: + break; + default: + rb_raise(rb_eTypeError, "class or module required"); + } + + if (rb_obj_class(obj) == c) return Qtrue; + return Qfalse; +} + + +/* + * call-seq: + * obj.is_a?(class) => true or false + * obj.kind_of?(class) => true or false + * + * Returns true if class is the class of + * obj, or if class is one of the superclasses of + * obj or modules included in obj. + * + * module M; end + * class A + * include M + * end + * class B < A; end + * class C < B; end + * b = B.new + * b.instance_of? A #=> false + * b.instance_of? B #=> true + * b.instance_of? C #=> false + * b.instance_of? M #=> false + * b.kind_of? A #=> true + * b.kind_of? B #=> true + * b.kind_of? C #=> false + * b.kind_of? M #=> true + */ + +VALUE +rb_obj_is_kind_of(VALUE obj, VALUE c) +{ + VALUE cl = CLASS_OF(obj); + + switch (TYPE(c)) { + case T_MODULE: + case T_CLASS: + case T_ICLASS: + break; + + default: + rb_raise(rb_eTypeError, "class or module required"); + } + + while (cl) { + if (cl == c || RCLASS_M_TBL(cl) == RCLASS_M_TBL(c)) + return Qtrue; + cl = RCLASS_SUPER(cl); + } + return Qfalse; +} + + +/* + * call-seq: + * obj.tap{|x|...} => obj + * + * Yields x to the block, and then returns x. + * The primary purpose of this method is to "tap into" a method chain, + * in order to perform operations on intermediate results within the chain. + * + * (1..10) .tap {|x| puts "original: #{x.inspect}"} + * .to_a .tap {|x| puts "array: #{x.inspect}"} + * .select {|x| x%2==0} .tap {|x| puts "evens: #{x.inspect}"} + * .map { |x| x*x } .tap {|x| puts "squares: #{x.inspect}"} + * + */ + +VALUE +rb_obj_tap(VALUE obj) +{ + rb_yield(obj); + return obj; +} + + +/* + * Document-method: inherited + * + * call-seq: + * inherited(subclass) + * + * Callback invoked whenever a subclass of the current class is created. + * + * Example: + * + * class Foo + * def self.inherited(subclass) + * puts "New subclass: #{subclass}" + * end + * end + * + * class Bar < Foo + * end + * + * class Baz < Bar + * end + * + * produces: + * + * New subclass: Bar + * New subclass: Baz + */ + +/* + * Document-method: singleton_method_added + * + * call-seq: + * singleton_method_added(symbol) + * + * Invoked as a callback whenever a singleton method is added to the + * receiver. + * + * module Chatty + * def Chatty.singleton_method_added(id) + * puts "Adding #{id.id2name}" + * end + * def self.one() end + * def two() end + * def Chatty.three() end + * end + * + * produces: + * + * Adding singleton_method_added + * Adding one + * Adding three + * + */ + +/* + * Document-method: singleton_method_removed + * + * call-seq: + * singleton_method_removed(symbol) + * + * Invoked as a callback whenever a singleton method is removed from + * the receiver. + * + * module Chatty + * def Chatty.singleton_method_removed(id) + * puts "Removing #{id.id2name}" + * end + * def self.one() end + * def two() end + * def Chatty.three() end + * class <produces:
      + * + * Removing three + * Removing one + */ + +/* + * Document-method: singleton_method_undefined + * + * call-seq: + * singleton_method_undefined(symbol) + * + * Invoked as a callback whenever a singleton method is undefined in + * the receiver. + * + * module Chatty + * def Chatty.singleton_method_undefined(id) + * puts "Undefining #{id.id2name}" + * end + * def Chatty.one() end + * class << self + * undef_method(:one) + * end + * end + * + * produces: + * + * Undefining one + */ + + +/* + * Document-method: included + * + * call-seq: + * included( othermod ) + * + * Callback invoked whenever the receiver is included in another + * module or class. This should be used in preference to + * Module.append_features if your code wants to perform some + * action when a module is included in another. + * + * module A + * def A.included(mod) + * puts "#{self} included in #{mod}" + * end + * end + * module Enumerable + * include A + * end + */ + + +/* + * Not documented + */ + +static VALUE +rb_obj_dummy(void) +{ + return Qnil; +} + +/* + * call-seq: + * obj.tainted? => true or false + * + * Returns true if the object is tainted. + */ + +VALUE +rb_obj_tainted(VALUE obj) +{ + if (OBJ_TAINTED(obj)) + return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj.taint -> obj + * + * Marks obj as tainted---if the $SAFE level is + * set appropriately, many method calls which might alter the running + * programs environment will refuse to accept tainted strings. + */ + +VALUE +rb_obj_taint(VALUE obj) +{ + rb_secure(4); + if (!OBJ_TAINTED(obj)) { + if (OBJ_FROZEN(obj)) { + rb_error_frozen("object"); + } + OBJ_TAINT(obj); + } + return obj; +} + + +/* + * call-seq: + * obj.untaint => obj + * + * Removes the taint from obj. + */ + +VALUE +rb_obj_untaint(VALUE obj) +{ + rb_secure(3); + if (OBJ_TAINTED(obj)) { + if (OBJ_FROZEN(obj)) { + rb_error_frozen("object"); + } + FL_UNSET(obj, FL_TAINT); + } + return obj; +} + +/* + * call-seq: + * obj.untrusted? => true or false + * + * Returns true if the object is untrusted. + */ + +VALUE +rb_obj_untrusted(VALUE obj) +{ + if (OBJ_UNTRUSTED(obj)) + return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * obj.untrust -> obj + * + * Marks obj as untrusted. + */ + +VALUE +rb_obj_untrust(VALUE obj) +{ + rb_secure(4); + if (!OBJ_UNTRUSTED(obj)) { + if (OBJ_FROZEN(obj)) { + rb_error_frozen("object"); + } + OBJ_UNTRUST(obj); + } + return obj; +} + + +/* + * call-seq: + * obj.trust => obj + * + * Removes the untrusted mark from obj. + */ + +VALUE +rb_obj_trust(VALUE obj) +{ + rb_secure(3); + if (OBJ_UNTRUSTED(obj)) { + if (OBJ_FROZEN(obj)) { + rb_error_frozen("object"); + } + FL_UNSET(obj, FL_UNTRUSTED); + } + return obj; +} + +void +rb_obj_infect(VALUE obj1, VALUE obj2) +{ + OBJ_INFECT(obj1, obj2); +} + +static st_table *immediate_frozen_tbl = 0; + +/* + * call-seq: + * obj.freeze => obj + * + * Prevents further modifications to obj. A + * RuntimeError will be raised if modification is attempted. + * There is no way to unfreeze a frozen object. See also + * Object#frozen?. + * + * a = [ "a", "b", "c" ] + * a.freeze + * a << "z" + * + * produces: + * + * prog.rb:3:in `<<': can't modify frozen array (RuntimeError) + * from prog.rb:3 + */ + +VALUE +rb_obj_freeze(VALUE obj) +{ + if (!OBJ_FROZEN(obj)) { + if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(obj)) { + rb_raise(rb_eSecurityError, "Insecure: can't freeze object"); + } + OBJ_FREEZE(obj); + if (SPECIAL_CONST_P(obj)) { + if (!immediate_frozen_tbl) { + immediate_frozen_tbl = st_init_numtable(); + } + st_insert(immediate_frozen_tbl, obj, (st_data_t)Qtrue); + } + } + return obj; +} + +/* + * call-seq: + * obj.frozen? => true or false + * + * Returns the freeze status of obj. + * + * a = [ "a", "b", "c" ] + * a.freeze #=> ["a", "b", "c"] + * a.frozen? #=> true + */ + +VALUE +rb_obj_frozen_p(VALUE obj) +{ + if (OBJ_FROZEN(obj)) return Qtrue; + if (SPECIAL_CONST_P(obj)) { + if (!immediate_frozen_tbl) return Qfalse; + if (st_lookup(immediate_frozen_tbl, obj, 0)) return Qtrue; + } + return Qfalse; +} + + +/* + * Document-class: NilClass + * + * The class of the singleton object nil. + */ + +/* + * call-seq: + * nil.to_i => 0 + * + * Always returns zero. + * + * nil.to_i #=> 0 + */ + + +static VALUE +nil_to_i(VALUE obj) +{ + return INT2FIX(0); +} + +/* + * call-seq: + * nil.to_f => 0.0 + * + * Always returns zero. + * + * nil.to_f #=> 0.0 + */ + +static VALUE +nil_to_f(VALUE obj) +{ + return DBL2NUM(0.0); +} + +/* + * call-seq: + * nil.to_s => "" + * + * Always returns the empty string. + */ + +static VALUE +nil_to_s(VALUE obj) +{ + return rb_usascii_str_new(0, 0); +} + +/* + * Document-method: to_a + * + * call-seq: + * nil.to_a => [] + * + * Always returns an empty array. + * + * nil.to_a #=> [] + */ + +static VALUE +nil_to_a(VALUE obj) +{ + return rb_ary_new2(0); +} + +/* + * call-seq: + * nil.inspect => "nil" + * + * Always returns the string "nil". + */ + +static VALUE +nil_inspect(VALUE obj) +{ + return rb_usascii_str_new2("nil"); +} + +/*********************************************************************** + * Document-class: TrueClass + * + * The global value true is the only instance of class + * TrueClass and represents a logically true value in + * boolean expressions. The class provides operators allowing + * true to be used in logical expressions. + */ + + +/* + * call-seq: + * true.to_s => "true" + * + * The string representation of true is "true". + */ + +static VALUE +true_to_s(VALUE obj) +{ + return rb_usascii_str_new2("true"); +} + + +/* + * call-seq: + * true & obj => true or false + * + * And---Returns false if obj is + * nil or false, true otherwise. + */ + +static VALUE +true_and(VALUE obj, VALUE obj2) +{ + return RTEST(obj2)?Qtrue:Qfalse; +} + +/* + * call-seq: + * true | obj => true + * + * Or---Returns true. As anObject is an argument to + * a method call, it is always evaluated; there is no short-circuit + * evaluation in this case. + * + * true | puts("or") + * true || puts("logical or") + * + * produces: + * + * or + */ + +static VALUE +true_or(VALUE obj, VALUE obj2) +{ + return Qtrue; +} + + +/* + * call-seq: + * true ^ obj => !obj + * + * Exclusive Or---Returns true if obj is + * nil or false, false + * otherwise. + */ + +static VALUE +true_xor(VALUE obj, VALUE obj2) +{ + return RTEST(obj2)?Qfalse:Qtrue; +} + + +/* + * Document-class: FalseClass + * + * The global value false is the only instance of class + * FalseClass and represents a logically false value in + * boolean expressions. The class provides operators allowing + * false to participate correctly in logical expressions. + * + */ + +/* + * call-seq: + * false.to_s => "false" + * + * 'nuf said... + */ + +static VALUE +false_to_s(VALUE obj) +{ + return rb_usascii_str_new2("false"); +} + +/* + * call-seq: + * false & obj => false + * nil & obj => false + * + * And---Returns false. obj is always + * evaluated as it is the argument to a method call---there is no + * short-circuit evaluation in this case. + */ + +static VALUE +false_and(VALUE obj, VALUE obj2) +{ + return Qfalse; +} + + +/* + * call-seq: + * false | obj => true or false + * nil | obj => true or false + * + * Or---Returns false if obj is + * nil or false; true otherwise. + */ + +static VALUE +false_or(VALUE obj, VALUE obj2) +{ + return RTEST(obj2)?Qtrue:Qfalse; +} + + + +/* + * call-seq: + * false ^ obj => true or false + * nil ^ obj => true or false + * + * Exclusive Or---If obj is nil or + * false, returns false; otherwise, returns + * true. + * + */ + +static VALUE +false_xor(VALUE obj, VALUE obj2) +{ + return RTEST(obj2)?Qtrue:Qfalse; +} + +/* + * call_seq: + * nil.nil? => true + * + * Only the object nil responds true to nil?. + */ + +static VALUE +rb_true(VALUE obj) +{ + return Qtrue; +} + +/* + * call_seq: + * nil.nil? => true + * .nil? => false + * + * Only the object nil responds true to nil?. + */ + + +static VALUE +rb_false(VALUE obj) +{ + return Qfalse; +} + + +/* + * call-seq: + * obj =~ other => nil + * + * Pattern Match---Overridden by descendents (notably + * Regexp and String) to provide meaningful + * pattern-match semantics. + */ + +static VALUE +rb_obj_match(VALUE obj1, VALUE obj2) +{ + return Qnil; +} + +/* + * call-seq: + * obj !~ other => nil + * + * Returns true if two objects does not match, using =~ method. + */ + +static VALUE +rb_obj_not_match(VALUE obj1, VALUE obj2) +{ + VALUE result = rb_funcall(obj1, id_match, 1, obj2); + return RTEST(result) ? Qfalse : Qtrue; +} + + +/*********************************************************************** + * + * Document-class: Module + * + * A Module is a collection of methods and constants. The + * methods in a module may be instance methods or module methods. + * Instance methods appear as methods in a class when the module is + * included, module methods do not. Conversely, module methods may be + * called without creating an encapsulating object, while instance + * methods may not. (See Module#module_function) + * + * In the descriptions that follow, the parameter syml refers + * to a symbol, which is either a quoted string or a + * Symbol (such as :name). + * + * module Mod + * include Math + * CONST = 1 + * def meth + * # ... + * end + * end + * Mod.class #=> Module + * Mod.constants #=> [:CONST, :PI, :E] + * Mod.instance_methods #=> [:meth] + * + */ + +/* + * call-seq: + * mod.to_s => string + * + * Return a string representing this module or class. For basic + * classes and modules, this is the name. For singletons, we + * show information on the thing we're attached to as well. + */ + +static VALUE +rb_mod_to_s(VALUE klass) +{ + if (FL_TEST(klass, FL_SINGLETON)) { + VALUE s = rb_usascii_str_new2("#<"); + VALUE v = rb_iv_get(klass, "__attached__"); + + rb_str_cat2(s, "Class:"); + switch (TYPE(v)) { + case T_CLASS: case T_MODULE: + rb_str_append(s, rb_inspect(v)); + break; + default: + rb_str_append(s, rb_any_to_s(v)); + break; + } + rb_str_cat2(s, ">"); + + return s; + } + return rb_str_dup(rb_class_name(klass)); +} + +/* + * call-seq: + * mod.freeze + * + * Prevents further modifications to mod. + */ + +static VALUE +rb_mod_freeze(VALUE mod) +{ + rb_class_name(mod); + return rb_obj_freeze(mod); +} + +/* + * call-seq: + * mod === obj => true or false + * + * Case Equality---Returns true if anObject is an + * instance of mod or one of mod's descendents. Of + * limited use for modules, but can be used in case + * statements to classify objects by class. + */ + +static VALUE +rb_mod_eqq(VALUE mod, VALUE arg) +{ + return rb_obj_is_kind_of(arg, mod); +} + +/* + * call-seq: + * mod <= other => true, false, or nil + * + * Returns true if mod is a subclass of other or + * is the same as other. Returns + * nil if there's no relationship between the two. + * (Think of the relationship in terms of the class definition: + * "class A arg */ + while (arg) { + if (RCLASS_M_TBL(arg) == RCLASS_M_TBL(start)) + return Qfalse; + arg = RCLASS_SUPER(arg); + } + return Qnil; +} + +/* + * call-seq: + * mod < other => true, false, or nil + * + * Returns true if mod is a subclass of other. Returns + * nil if there's no relationship between the two. + * (Think of the relationship in terms of the class definition: + * "class A= other => true, false, or nil + * + * Returns true if mod is an ancestor of other, or the + * two modules are the same. Returns + * nil if there's no relationship between the two. + * (Think of the relationship in terms of the class definition: + * "class AA"). + * + */ + +static VALUE +rb_mod_ge(VALUE mod, VALUE arg) +{ + switch (TYPE(arg)) { + case T_MODULE: + case T_CLASS: + break; + default: + rb_raise(rb_eTypeError, "compared with non class/module"); + } + + return rb_class_inherited_p(arg, mod); +} + +/* + * call-seq: + * mod > other => true, false, or nil + * + * Returns true if mod is an ancestor of other. Returns + * nil if there's no relationship between the two. + * (Think of the relationship in terms of the class definition: + * "class AA"). + * + */ + +static VALUE +rb_mod_gt(VALUE mod, VALUE arg) +{ + if (mod == arg) return Qfalse; + return rb_mod_ge(mod, arg); +} + +/* + * call-seq: + * mod <=> other_mod => -1, 0, +1, or nil + * + * Comparison---Returns -1 if mod includes other_mod, 0 if + * mod is the same as other_mod, and +1 if mod is + * included by other_mod or if mod has no relationship with + * other_mod. Returns nil if other_mod is + * not a module. + */ + +static VALUE +rb_mod_cmp(VALUE mod, VALUE arg) +{ + VALUE cmp; + + if (mod == arg) return INT2FIX(0); + switch (TYPE(arg)) { + case T_MODULE: + case T_CLASS: + break; + default: + return Qnil; + } + + cmp = rb_class_inherited_p(mod, arg); + if (NIL_P(cmp)) return Qnil; + if (cmp) { + return INT2FIX(-1); + } + return INT2FIX(1); +} + +static VALUE +rb_module_s_alloc(VALUE klass) +{ + VALUE mod = rb_module_new(); + + RBASIC(mod)->klass = klass; + return mod; +} + +static VALUE +rb_class_s_alloc(VALUE klass) +{ + return rb_class_boot(0); +} + +/* + * call-seq: + * Module.new => mod + * Module.new {|mod| block } => mod + * + * Creates a new anonymous module. If a block is given, it is passed + * the module object, and the block is evaluated in the context of this + * module using module_eval. + * + * Fred = Module.new do + * def meth1 + * "hello" + * end + * def meth2 + * "bye" + * end + * end + * a = "my string" + * a.extend(Fred) #=> "my string" + * a.meth1 #=> "hello" + * a.meth2 #=> "bye" + */ + +static VALUE +rb_mod_initialize(VALUE module) +{ + extern VALUE rb_mod_module_exec(int argc, VALUE *argv, VALUE mod); + + if (rb_block_given_p()) { + rb_mod_module_exec(1, &module, module); + } + return Qnil; +} + +/* + * call-seq: + * Class.new(super_class=Object) => a_class + * + * Creates a new anonymous (unnamed) class with the given superclass + * (or Object if no parameter is given). You can give a + * class a name by assigning the class object to a constant. + * + */ + +static VALUE +rb_class_initialize(int argc, VALUE *argv, VALUE klass) +{ + VALUE super; + + if (RCLASS_SUPER(klass) != 0) { + rb_raise(rb_eTypeError, "already initialized class"); + } + if (argc == 0) { + super = rb_cObject; + } + else { + rb_scan_args(argc, argv, "01", &super); + rb_check_inheritable(super); + } + RCLASS_SUPER(klass) = super; + rb_make_metaclass(klass, RBASIC(super)->klass); + rb_class_inherited(super, klass); + rb_mod_initialize(klass); + + return klass; +} + +/* + * call-seq: + * class.allocate() => obj + * + * Allocates space for a new object of class's class and does not + * call initialize on the new instance. The returned object must be an + * instance of class. + * + * klass = Class.new do + * def initialize(*args) + * @initialized = true + * end + * + * def initialized? + * @initialized || false + * end + * end + * + * klass.allocate.initialized? #=> false + * + */ + +VALUE +rb_obj_alloc(VALUE klass) +{ + VALUE obj; + + if (RCLASS_SUPER(klass) == 0 && klass != rb_cBasicObject) { + rb_raise(rb_eTypeError, "can't instantiate uninitialized class"); + } + if (FL_TEST(klass, FL_SINGLETON)) { + rb_raise(rb_eTypeError, "can't create instance of singleton class"); + } + obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0); + if (rb_obj_class(obj) != rb_class_real(klass)) { + rb_raise(rb_eTypeError, "wrong instance allocation"); + } + return obj; +} + +static VALUE +rb_class_allocate_instance(VALUE klass) +{ + NEWOBJ(obj, struct RObject); + OBJSETUP(obj, klass, T_OBJECT); + return (VALUE)obj; +} + +/* + * call-seq: + * class.new(args, ...) => obj + * + * Calls allocate to create a new object of + * class's class, then invokes that object's + * initialize method, passing it args. + * This is the method that ends up getting called whenever + * an object is constructed using .new. + * + */ + +VALUE +rb_class_new_instance(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj; + + obj = rb_obj_alloc(klass); + rb_obj_call_init(obj, argc, argv); + + return obj; +} + +/* + * call-seq: + * class.superclass -> a_super_class or nil + * + * Returns the superclass of class, or nil. + * + * File.superclass #=> IO + * IO.superclass #=> Object + * Object.superclass #=> BasicObject + * class Foo; end + * class Bar < Foo; end + * Bar.superclass #=> Foo + * + * returns nil when the given class hasn't a parent class: + * + * BasicObject.superclass #=> nil + * + */ + +static VALUE +rb_class_superclass(VALUE klass) +{ + VALUE super = RCLASS_SUPER(klass); + + if (!super) { + if (klass == rb_cBasicObject) return Qnil; + rb_raise(rb_eTypeError, "uninitialized class"); + } + while (TYPE(super) == T_ICLASS) { + super = RCLASS_SUPER(super); + } + if (!super) { + return Qnil; + } + return super; +} + +/* + * call-seq: + * attr_reader(symbol, ...) => nil + * attr(symbol, ...) => nil + * + * Creates instance variables and corresponding methods that return the + * value of each instance variable. Equivalent to calling + * ``attr:name'' on each name in turn. + */ + +static VALUE +rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass) +{ + int i; + + for (i=0; i nil + * + * Creates an accessor method to allow assignment to the attribute + * aSymbol.id2name. + */ + +static VALUE +rb_mod_attr_writer(int argc, VALUE *argv, VALUE klass) +{ + int i; + + for (i=0; i nil + * + * Defines a named attribute for this module, where the name is + * symbol.id2name, creating an instance variable + * (@name) and a corresponding access method to read it. + * Also creates a method called name= to set the attribute. + * + * module Mod + * attr_accessor(:one, :two) + * end + * Mod.instance_methods.sort #=> [:one, :one=, :two, :two=] + */ + +static VALUE +rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass) +{ + int i; + + for (i=0; i obj + * + * Returns the value of the named constant in mod. + * + * Math.const_get(:PI) #=> 3.14159265358979 + * + * If the constant is not defined or is defined by the ancestors and + * +inherit+ is false, +NameError+ will be raised. + */ + +static VALUE +rb_mod_const_get(int argc, VALUE *argv, VALUE mod) +{ + VALUE name, recur; + ID id; + + if (argc == 1) { + name = argv[0]; + recur = Qtrue; + } + else { + rb_scan_args(argc, argv, "11", &name, &recur); + } + id = rb_to_id(name); + if (!rb_is_const_id(id)) { + rb_name_error(id, "wrong constant name %s", rb_id2name(id)); + } + return RTEST(recur) ? rb_const_get(mod, id) : rb_const_get_at(mod, id); +} + +/* + * call-seq: + * mod.const_set(sym, obj) => obj + * + * Sets the named constant to the given object, returning that object. + * Creates a new constant if no constant with the given name previously + * existed. + * + * Math.const_set("HIGH_SCHOOL_PI", 22.0/7.0) #=> 3.14285714285714 + * Math::HIGH_SCHOOL_PI - Math::PI #=> 0.00126448926734968 + */ + +static VALUE +rb_mod_const_set(VALUE mod, VALUE name, VALUE value) +{ + ID id = rb_to_id(name); + + if (!rb_is_const_id(id)) { + rb_name_error(id, "wrong constant name %s", rb_id2name(id)); + } + rb_const_set(mod, id, value); + return value; +} + +/* + * call-seq: + * mod.const_defined?(sym, inherit=true) => true or false + * + * Returns true if a constant with the given name is + * defined by mod, or its ancestors if +inherit+ is not false. + * + * Math.const_defined? "PI" #=> true + * IO.const_defined? "SYNC" #=> true + * IO.const_defined? "SYNC", false #=> false + */ + +static VALUE +rb_mod_const_defined(int argc, VALUE *argv, VALUE mod) +{ + VALUE name, recur; + ID id; + + if (argc == 1) { + name = argv[0]; + recur = Qtrue; + } + else { + rb_scan_args(argc, argv, "11", &name, &recur); + } + id = rb_to_id(name); + if (!rb_is_const_id(id)) { + rb_name_error(id, "wrong constant name %s", rb_id2name(id)); + } + return RTEST(recur) ? rb_const_defined(mod, id) : rb_const_defined_at(mod, id); +} + +/* + * call-seq: + * obj.methods => array + * + * Returns a list of the names of methods publicly accessible in + * obj. This will include all the methods accessible in + * obj's ancestors. + * + * class Klass + * def kMethod() + * end + * end + * k = Klass.new + * k.methods[0..9] #=> ["kMethod", "freeze", "nil?", "is_a?", + * # "class", "instance_variable_set", + * # "methods", "extend", "__send__", "instance_eval"] + * k.methods.length #=> 42 + */ + +static VALUE +rb_obj_methods(int argc, VALUE *argv, VALUE obj) +{ + retry: + if (argc == 0) { + VALUE args[1]; + + args[0] = Qtrue; + return rb_class_instance_methods(1, args, CLASS_OF(obj)); + } + else { + VALUE recur; + + rb_scan_args(argc, argv, "1", &recur); + if (RTEST(recur)) { + argc = 0; + goto retry; + } + return rb_obj_singleton_methods(argc, argv, obj); + } +} + +/* + * call-seq: + * obj.protected_methods(all=true) => array + * + * Returns the list of protected methods accessible to obj. If + * the all parameter is set to false, only those methods + * in the receiver will be listed. + */ + +static VALUE +rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj) +{ + if (argc == 0) { /* hack to stop warning */ + VALUE args[1]; + + args[0] = Qtrue; + return rb_class_protected_instance_methods(1, args, CLASS_OF(obj)); + } + return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj)); +} + +/* + * call-seq: + * obj.private_methods(all=true) => array + * + * Returns the list of private methods accessible to obj. If + * the all parameter is set to false, only those methods + * in the receiver will be listed. + */ + +static VALUE +rb_obj_private_methods(int argc, VALUE *argv, VALUE obj) +{ + if (argc == 0) { /* hack to stop warning */ + VALUE args[1]; + + args[0] = Qtrue; + return rb_class_private_instance_methods(1, args, CLASS_OF(obj)); + } + return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj)); +} + +/* + * call-seq: + * obj.public_methods(all=true) => array + * + * Returns the list of public methods accessible to obj. If + * the all parameter is set to false, only those methods + * in the receiver will be listed. + */ + +static VALUE +rb_obj_public_methods(int argc, VALUE *argv, VALUE obj) +{ + if (argc == 0) { /* hack to stop warning */ + VALUE args[1]; + + args[0] = Qtrue; + return rb_class_public_instance_methods(1, args, CLASS_OF(obj)); + } + return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj)); +} + +/* + * call-seq: + * obj.instance_variable_get(symbol) => obj + * + * Returns the value of the given instance variable, or nil if the + * instance variable is not set. The @ part of the + * variable name should be included for regular instance + * variables. Throws a NameError exception if the + * supplied symbol is not valid as an instance variable name. + * + * class Fred + * def initialize(p1, p2) + * @a, @b = p1, p2 + * end + * end + * fred = Fred.new('cat', 99) + * fred.instance_variable_get(:@a) #=> "cat" + * fred.instance_variable_get("@b") #=> 99 + */ + +static VALUE +rb_obj_ivar_get(VALUE obj, VALUE iv) +{ + ID id = rb_to_id(iv); + + if (!rb_is_instance_id(id)) { + rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id)); + } + return rb_ivar_get(obj, id); +} + +/* + * call-seq: + * obj.instance_variable_set(symbol, obj) => obj + * + * Sets the instance variable names by symbol to + * object, thereby frustrating the efforts of the class's + * author to attempt to provide proper encapsulation. The variable + * did not have to exist prior to this call. + * + * class Fred + * def initialize(p1, p2) + * @a, @b = p1, p2 + * end + * end + * fred = Fred.new('cat', 99) + * fred.instance_variable_set(:@a, 'dog') #=> "dog" + * fred.instance_variable_set(:@c, 'cat') #=> "cat" + * fred.inspect #=> "#" + */ + +static VALUE +rb_obj_ivar_set(VALUE obj, VALUE iv, VALUE val) +{ + ID id = rb_to_id(iv); + + if (!rb_is_instance_id(id)) { + rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id)); + } + return rb_ivar_set(obj, id, val); +} + +/* + * call-seq: + * obj.instance_variable_defined?(symbol) => true or false + * + * Returns true if the given instance variable is + * defined in obj. + * + * class Fred + * def initialize(p1, p2) + * @a, @b = p1, p2 + * end + * end + * fred = Fred.new('cat', 99) + * fred.instance_variable_defined?(:@a) #=> true + * fred.instance_variable_defined?("@b") #=> true + * fred.instance_variable_defined?("@c") #=> false + */ + +static VALUE +rb_obj_ivar_defined(VALUE obj, VALUE iv) +{ + ID id = rb_to_id(iv); + + if (!rb_is_instance_id(id)) { + rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id)); + } + return rb_ivar_defined(obj, id); +} + +/* + * call-seq: + * mod.class_variable_get(symbol) => obj + * + * Returns the value of the given class variable (or throws a + * NameError exception). The @@ part of the + * variable name should be included for regular class variables + * + * class Fred + * @@foo = 99 + * end + * Fred.class_variable_get(:@@foo) #=> 99 + */ + +static VALUE +rb_mod_cvar_get(VALUE obj, VALUE iv) +{ + ID id = rb_to_id(iv); + + if (!rb_is_class_id(id)) { + rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id)); + } + return rb_cvar_get(obj, id); +} + +/* + * call-seq: + * obj.class_variable_set(symbol, obj) => obj + * + * Sets the class variable names by symbol to + * object. + * + * class Fred + * @@foo = 99 + * def foo + * @@foo + * end + * end + * Fred.class_variable_set(:@@foo, 101) #=> 101 + * Fred.new.foo #=> 101 + */ + +static VALUE +rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE val) +{ + ID id = rb_to_id(iv); + + if (!rb_is_class_id(id)) { + rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id)); + } + rb_cvar_set(obj, id, val); + return val; +} + +/* + * call-seq: + * obj.class_variable_defined?(symbol) => true or false + * + * Returns true if the given class variable is defined + * in obj. + * + * class Fred + * @@foo = 99 + * end + * Fred.class_variable_defined?(:@@foo) #=> true + * Fred.class_variable_defined?(:@@bar) #=> false + */ + +static VALUE +rb_mod_cvar_defined(VALUE obj, VALUE iv) +{ + ID id = rb_to_id(iv); + + if (!rb_is_class_id(id)) { + rb_name_error(id, "`%s' is not allowed as a class variable name", rb_id2name(id)); + } + return rb_cvar_defined(obj, id); +} + +static struct conv_method_tbl { + const char *method; + ID id; +} conv_method_names[] = { + {"to_int", 0}, + {"to_ary", 0}, + {"to_str", 0}, + {"to_sym", 0}, + {"to_hash", 0}, + {"to_proc", 0}, + {"to_io", 0}, + {"to_a", 0}, + {"to_s", 0}, + {NULL, 0} +}; + +static VALUE +convert_type(VALUE val, const char *tname, const char *method, int raise) +{ + ID m = 0; + int i; + + for (i=0; conv_method_names[i].method; i++) { + if (conv_method_names[i].method[0] == method[0] && + strcmp(conv_method_names[i].method, method) == 0) { + m = conv_method_names[i].id; + break; + } + } + if (!m) m = rb_intern(method); + if (!rb_respond_to(val, m)) { + if (raise) { + rb_raise(rb_eTypeError, "can't convert %s into %s", + NIL_P(val) ? "nil" : + val == Qtrue ? "true" : + val == Qfalse ? "false" : + rb_obj_classname(val), + tname); + } + else { + return Qnil; + } + } + return rb_funcall(val, m, 0); +} + +VALUE +rb_convert_type(VALUE val, int type, const char *tname, const char *method) +{ + VALUE v; + + if (TYPE(val) == type) return val; + v = convert_type(val, tname, method, Qtrue); + if (TYPE(v) != type) { + const char *cname = rb_obj_classname(val); + rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)", + cname, tname, cname, method, rb_obj_classname(v)); + } + return v; +} + +VALUE +rb_check_convert_type(VALUE val, int type, const char *tname, const char *method) +{ + VALUE v; + + /* always convert T_DATA */ + if (TYPE(val) == type && type != T_DATA) return val; + v = convert_type(val, tname, method, Qfalse); + if (NIL_P(v)) return Qnil; + if (TYPE(v) != type) { + const char *cname = rb_obj_classname(val); + rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)", + cname, tname, cname, method, rb_obj_classname(v)); + } + return v; +} + + +static VALUE +rb_to_integer(VALUE val, const char *method) +{ + VALUE v; + + if (FIXNUM_P(val)) return val; + v = convert_type(val, "Integer", method, Qtrue); + if (!rb_obj_is_kind_of(v, rb_cInteger)) { + const char *cname = rb_obj_classname(val); + rb_raise(rb_eTypeError, "can't convert %s to Integer (%s#%s gives %s)", + cname, cname, method, rb_obj_classname(v)); + } + return v; +} + +VALUE +rb_check_to_integer(VALUE val, const char *method) +{ + VALUE v; + + if (FIXNUM_P(val)) return val; + v = convert_type(val, "Integer", method, Qfalse); + if (!rb_obj_is_kind_of(v, rb_cInteger)) { + return Qnil; + } + return v; +} + +VALUE +rb_to_int(VALUE val) +{ + return rb_to_integer(val, "to_int"); +} + +VALUE +rb_Integer(VALUE val) +{ + VALUE tmp; + + switch (TYPE(val)) { + case T_FLOAT: + if (RFLOAT_VALUE(val) <= (double)FIXNUM_MAX + && RFLOAT_VALUE(val) >= (double)FIXNUM_MIN) { + break; + } + return rb_dbl2big(RFLOAT_VALUE(val)); + + case T_FIXNUM: + case T_BIGNUM: + return val; + + case T_STRING: + return rb_str_to_inum(val, 0, Qtrue); + + case T_NIL: + rb_raise(rb_eTypeError, "can't convert nil into Integer"); + break; + + default: + break; + } + tmp = convert_type(val, "Integer", "to_int", Qfalse); + if (NIL_P(tmp)) { + return rb_to_integer(val, "to_i"); + } + return tmp; +} + +/* + * call-seq: + * Integer(arg) => integer + * + * Converts arg to a Fixnum or Bignum. + * Numeric types are converted directly (with floating point numbers + * being truncated). If arg is a String, leading + * radix indicators (0, 0b, and + * 0x) are honored. Others are converted using + * to_int and to_i. This behavior is + * different from that of String#to_i. + * + * Integer(123.999) #=> 123 + * Integer("0x1a") #=> 26 + * Integer(Time.new) #=> 1204973019 + */ + +static VALUE +rb_f_integer(VALUE obj, VALUE arg) +{ + return rb_Integer(arg); +} + +double +rb_cstr_to_dbl(const char *p, int badcheck) +{ + const char *q; + char *end; + double d; + const char *ellipsis = ""; + int w; +#define OutOfRange() (((w = end - p) > 20) ? (w = 20, ellipsis = "...") : (ellipsis = "")) + + if (!p) return 0.0; + q = p; + while (ISSPACE(*p)) p++; + d = strtod(p, &end); + if (errno == ERANGE) { + OutOfRange(); + rb_warning("Float %.*s%s out of range", w, p, ellipsis); + errno = 0; + } + if (p == end) { + if (badcheck) { + bad: + rb_invalid_str(q, "Float()"); + } + return d; + } + if (*end) { + char buf[DBL_DIG * 4 + 10]; + char *n = buf; + char *e = buf + sizeof(buf) - 1; + char prev = 0; + + while (p < end && n < e) prev = *n++ = *p++; + while (*p) { + if (*p == '_') { + /* remove underscores between digits */ + if (badcheck) { + if (n == buf || !ISDIGIT(prev)) goto bad; + ++p; + if (!ISDIGIT(*p)) goto bad; + } + else { + while (*++p == '_'); + continue; + } + } + prev = *p++; + if (n < e) *n++ = prev; + } + *n = '\0'; + p = buf; + d = strtod(p, &end); + if (errno == ERANGE) { + OutOfRange(); + rb_warning("Float %.*s%s out of range", w, p, ellipsis); + errno = 0; + } + if (badcheck) { + if (!end || p == end) goto bad; + while (*end && ISSPACE(*end)) end++; + if (*end) goto bad; + } + } + if (errno == ERANGE) { + errno = 0; + OutOfRange(); + rb_raise(rb_eArgError, "Float %.*s%s out of range", w, q, ellipsis); + } + return d; +} + +double +rb_str_to_dbl(VALUE str, int badcheck) +{ + char *s; + long len; + + StringValue(str); + s = RSTRING_PTR(str); + len = RSTRING_LEN(str); + if (s) { + if (s[len]) { /* no sentinel somehow */ + char *p = ALLOCA_N(char, len+1); + + MEMCPY(p, s, char, len); + p[len] = '\0'; + s = p; + } + if (badcheck && len != strlen(s)) { + rb_raise(rb_eArgError, "string for Float contains null byte"); + } + } + return rb_cstr_to_dbl(s, badcheck); +} + +VALUE +rb_Float(VALUE val) +{ + switch (TYPE(val)) { + case T_FIXNUM: + return DBL2NUM((double)FIX2LONG(val)); + + case T_FLOAT: + return val; + + case T_BIGNUM: + return DBL2NUM(rb_big2dbl(val)); + + case T_STRING: + return DBL2NUM(rb_str_to_dbl(val, Qtrue)); + + case T_NIL: + rb_raise(rb_eTypeError, "can't convert nil into Float"); + break; + + default: + return rb_convert_type(val, T_FLOAT, "Float", "to_f"); + } +} + +/* + * call-seq: + * Float(arg) => float + * + * Returns arg converted to a float. Numeric types are converted + * directly, the rest are converted using arg.to_f. As of Ruby + * 1.8, converting nil generates a TypeError. + * + * Float(1) #=> 1.0 + * Float("123.456") #=> 123.456 + */ + +static VALUE +rb_f_float(VALUE obj, VALUE arg) +{ + return rb_Float(arg); +} + +double +rb_num2dbl(VALUE val) +{ + switch (TYPE(val)) { + case T_FLOAT: + return RFLOAT_VALUE(val); + + case T_STRING: + rb_raise(rb_eTypeError, "no implicit conversion to float from string"); + break; + + case T_NIL: + rb_raise(rb_eTypeError, "no implicit conversion to float from nil"); + break; + + default: + break; + } + + return RFLOAT_VALUE(rb_Float(val)); +} + +char* +rb_str2cstr(VALUE str, long *len) +{ + StringValue(str); + if (len) *len = RSTRING_LEN(str); + else if (RTEST(ruby_verbose) && RSTRING_LEN(str) != strlen(RSTRING_PTR(str))) { + rb_warn("string contains \\0 character"); + } + return RSTRING_PTR(str); +} + +VALUE +rb_String(VALUE val) +{ + return rb_convert_type(val, T_STRING, "String", "to_s"); +} + + +/* + * call-seq: + * String(arg) => string + * + * Converts arg to a String by calling its + * to_s method. + * + * String(self) #=> "main" + * String(self.class) #=> "Object" + * String(123456) #=> "123456" + */ + +static VALUE +rb_f_string(VALUE obj, VALUE arg) +{ + return rb_String(arg); +} + +VALUE +rb_Array(VALUE val) +{ + VALUE tmp = rb_check_array_type(val); + + if (NIL_P(tmp)) { + tmp = rb_check_convert_type(val, T_ARRAY, "Array", "to_a"); + if (NIL_P(tmp)) { + return rb_ary_new3(1, val); + } + } + return tmp; +} + +/* + * call-seq: + * Array(arg) => array + * + * Returns arg as an Array. First tries to call + * arg.to_ary, then arg.to_a. + * + * Array(1..5) #=> [1, 2, 3, 4, 5] + */ + +static VALUE +rb_f_array(VALUE obj, VALUE arg) +{ + return rb_Array(arg); +} + +static VALUE +boot_defclass(const char *name, VALUE super) +{ + extern st_table *rb_class_tbl; + VALUE obj = rb_class_boot(super); + ID id = rb_intern(name); + + rb_name_class(obj, id); + st_add_direct(rb_class_tbl, id, obj); + rb_const_set((rb_cObject ? rb_cObject : obj), id, obj); + return obj; +} + +static void +boot_defmetametaclass(VALUE klass, VALUE metametaclass) +{ + RBASIC(RBASIC(klass)->klass)->klass = metametaclass; +} + +/* + * Document-class: Class + * + * Classes in Ruby are first-class objects---each is an instance of + * class Class. + * + * When a new class is created (typically using class Name ... + * end), an object of type Class is created and + * assigned to a global constant (Name in this case). When + * Name.new is called to create a new object, the + * new method in Class is run by default. + * This can be demonstrated by overriding new in + * Class: + * + * class Class + * alias oldNew new + * def new(*args) + * print "Creating a new ", self.name, "\n" + * oldNew(*args) + * end + * end + * + * + * class Name + * end + * + * + * n = Name.new + * + * produces: + * + * Creating a new Name + * + * Classes, modules, and objects are interrelated. In the diagram + * that follows, the vertical arrows represent inheritance, and the + * parentheses meta-classes. All metaclasses are instances + * of the class `Class'. + * + * +-----------------+ + * | | + * BasicObject-->(BasicObject) | + * ^ ^ | + * | | | + * Object---->(Object) | + * ^ ^ ^ ^ | + * | | | | | + * | | +-----+ +---------+ | + * | | | | | + * | +-----------+ | | + * | | | | | + * +------+ | Module--->(Module) | + * | | ^ ^ | + * OtherClass-->(OtherClass) | | | + * | | | + * Class---->(Class) | + * ^ | + * | | + * +----------------+ + */ + + +/* + * BasicObject is the parent class of all classes in Ruby. + * It's an explicit blank class. Object, the root of Ruby's + * class hierarchy is a direct subclass of BasicObject. Its + * methods are therefore available to all objects unless explicitly + * overridden. + * + * Object mixes in the Kernel module, making + * the built-in kernel functions globally accessible. Although the + * instance methods of Object are defined by the + * Kernel module, we have chosen to document them here for + * clarity. + * + * In the descriptions of Object's methods, the parameter symbol refers + * to a symbol, which is either a quoted string or a + * Symbol (such as :name). + */ + +void +Init_Object(void) +{ + int i; + +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + VALUE metaclass; + + rb_cBasicObject = boot_defclass("BasicObject", 0); + rb_cObject = boot_defclass("Object", rb_cBasicObject); + rb_cModule = boot_defclass("Module", rb_cObject); + rb_cClass = boot_defclass("Class", rb_cModule); + + metaclass = rb_make_metaclass(rb_cBasicObject, rb_cClass); + metaclass = rb_make_metaclass(rb_cObject, metaclass); + metaclass = rb_make_metaclass(rb_cModule, metaclass); + metaclass = rb_make_metaclass(rb_cClass, metaclass); + boot_defmetametaclass(rb_cModule, metaclass); + boot_defmetametaclass(rb_cObject, metaclass); + boot_defmetametaclass(rb_cBasicObject, metaclass); + + rb_define_private_method(rb_cBasicObject, "initialize", rb_obj_dummy, 0); + rb_define_alloc_func(rb_cBasicObject, rb_class_allocate_instance); + rb_define_method(rb_cBasicObject, "==", rb_obj_equal, 1); + rb_define_method(rb_cBasicObject, "equal?", rb_obj_equal, 1); + rb_define_method(rb_cBasicObject, "!", rb_obj_not, 0); + rb_define_method(rb_cBasicObject, "!=", rb_obj_not_equal, 1); + + rb_define_private_method(rb_cBasicObject, "singleton_method_added", rb_obj_dummy, 1); + rb_define_private_method(rb_cBasicObject, "singleton_method_removed", rb_obj_dummy, 1); + rb_define_private_method(rb_cBasicObject, "singleton_method_undefined", rb_obj_dummy, 1); + + rb_mKernel = rb_define_module("Kernel"); + rb_include_module(rb_cObject, rb_mKernel); + rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1); + rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1); + rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1); + rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1); + rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1); + rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1); + + rb_define_method(rb_mKernel, "nil?", rb_false, 0); + rb_define_method(rb_mKernel, "===", rb_equal, 1); + rb_define_method(rb_mKernel, "=~", rb_obj_match, 1); + rb_define_method(rb_mKernel, "!~", rb_obj_not_match, 1); + rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1); + + rb_define_method(rb_mKernel, "class", rb_obj_class, 0); + rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0); + rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0); + rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1); + + rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0); + rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0); + rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0); + rb_define_method(rb_mKernel, "untrust", rb_obj_untrust, 0); + rb_define_method(rb_mKernel, "untrusted?", rb_obj_untrusted, 0); + rb_define_method(rb_mKernel, "trust", rb_obj_trust, 0); + rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0); + rb_define_method(rb_mKernel, "frozen?", rb_obj_frozen_p, 0); + + rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0); + rb_define_method(rb_mKernel, "inspect", rb_obj_inspect, 0); + rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1); + rb_define_method(rb_mKernel, "singleton_methods", rb_obj_singleton_methods, -1); /* in class.c */ + rb_define_method(rb_mKernel, "protected_methods", rb_obj_protected_methods, -1); + rb_define_method(rb_mKernel, "private_methods", rb_obj_private_methods, -1); + rb_define_method(rb_mKernel, "public_methods", rb_obj_public_methods, -1); + rb_define_method(rb_mKernel, "instance_variables", rb_obj_instance_variables, 0); /* in variable.c */ + rb_define_method(rb_mKernel, "instance_variable_get", rb_obj_ivar_get, 1); + rb_define_method(rb_mKernel, "instance_variable_set", rb_obj_ivar_set, 2); + rb_define_method(rb_mKernel, "instance_variable_defined?", rb_obj_ivar_defined, 1); + rb_define_private_method(rb_mKernel, "remove_instance_variable", + rb_obj_remove_instance_variable, 1); /* in variable.c */ + + rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1); + rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1); + rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1); + rb_define_method(rb_mKernel, "tap", rb_obj_tap, 0); + + rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */ + rb_define_global_function("format", rb_f_sprintf, -1); /* in sprintf.c */ + + rb_define_global_function("Integer", rb_f_integer, 1); + rb_define_global_function("Float", rb_f_float, 1); + + rb_define_global_function("String", rb_f_string, 1); + rb_define_global_function("Array", rb_f_array, 1); + + rb_cNilClass = rb_define_class("NilClass", rb_cObject); + rb_define_method(rb_cNilClass, "to_i", nil_to_i, 0); + rb_define_method(rb_cNilClass, "to_f", nil_to_f, 0); + rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0); + rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0); + rb_define_method(rb_cNilClass, "inspect", nil_inspect, 0); + rb_define_method(rb_cNilClass, "&", false_and, 1); + rb_define_method(rb_cNilClass, "|", false_or, 1); + rb_define_method(rb_cNilClass, "^", false_xor, 1); + + rb_define_method(rb_cNilClass, "nil?", rb_true, 0); + rb_undef_alloc_func(rb_cNilClass); + rb_undef_method(CLASS_OF(rb_cNilClass), "new"); + rb_define_global_const("NIL", Qnil); + + rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0); + rb_define_method(rb_cModule, "===", rb_mod_eqq, 1); + rb_define_method(rb_cModule, "==", rb_obj_equal, 1); + rb_define_method(rb_cModule, "<=>", rb_mod_cmp, 1); + rb_define_method(rb_cModule, "<", rb_mod_lt, 1); + rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1); + rb_define_method(rb_cModule, ">", rb_mod_gt, 1); + rb_define_method(rb_cModule, ">=", rb_mod_ge, 1); + rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */ + rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0); + rb_define_method(rb_cModule, "included_modules", rb_mod_included_modules, 0); /* in class.c */ + rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */ + rb_define_method(rb_cModule, "name", rb_mod_name, 0); /* in variable.c */ + rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */ + + rb_define_private_method(rb_cModule, "attr", rb_mod_attr, -1); + rb_define_private_method(rb_cModule, "attr_reader", rb_mod_attr_reader, -1); + rb_define_private_method(rb_cModule, "attr_writer", rb_mod_attr_writer, -1); + rb_define_private_method(rb_cModule, "attr_accessor", rb_mod_attr_accessor, -1); + + rb_define_alloc_func(rb_cModule, rb_module_s_alloc); + rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0); + rb_define_method(rb_cModule, "instance_methods", rb_class_instance_methods, -1); /* in class.c */ + rb_define_method(rb_cModule, "public_instance_methods", + rb_class_public_instance_methods, -1); /* in class.c */ + rb_define_method(rb_cModule, "protected_instance_methods", + rb_class_protected_instance_methods, -1); /* in class.c */ + rb_define_method(rb_cModule, "private_instance_methods", + rb_class_private_instance_methods, -1); /* in class.c */ + + rb_define_method(rb_cModule, "constants", rb_mod_constants, -1); /* in variable.c */ + rb_define_method(rb_cModule, "const_get", rb_mod_const_get, -1); + rb_define_method(rb_cModule, "const_set", rb_mod_const_set, 2); + rb_define_method(rb_cModule, "const_defined?", rb_mod_const_defined, -1); + rb_define_private_method(rb_cModule, "remove_const", + rb_mod_remove_const, 1); /* in variable.c */ + rb_define_method(rb_cModule, "const_missing", + rb_mod_const_missing, 1); /* in variable.c */ + rb_define_method(rb_cModule, "class_variables", + rb_mod_class_variables, 0); /* in variable.c */ + rb_define_method(rb_cModule, "remove_class_variable", + rb_mod_remove_cvar, 1); /* in variable.c */ + rb_define_method(rb_cModule, "class_variable_get", rb_mod_cvar_get, 1); + rb_define_method(rb_cModule, "class_variable_set", rb_mod_cvar_set, 2); + rb_define_method(rb_cModule, "class_variable_defined?", rb_mod_cvar_defined, 1); + + rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0); + rb_define_method(rb_cClass, "new", rb_class_new_instance, -1); + rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1); + rb_define_method(rb_cClass, "initialize_copy", rb_class_init_copy, 1); /* in class.c */ + rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0); + rb_define_alloc_func(rb_cClass, rb_class_s_alloc); + rb_undef_method(rb_cClass, "extend_object"); + rb_undef_method(rb_cClass, "append_features"); + + rb_cData = rb_define_class("Data", rb_cObject); + rb_undef_alloc_func(rb_cData); + + rb_cTrueClass = rb_define_class("TrueClass", rb_cObject); + rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0); + rb_define_method(rb_cTrueClass, "&", true_and, 1); + rb_define_method(rb_cTrueClass, "|", true_or, 1); + rb_define_method(rb_cTrueClass, "^", true_xor, 1); + rb_undef_alloc_func(rb_cTrueClass); + rb_undef_method(CLASS_OF(rb_cTrueClass), "new"); + rb_define_global_const("TRUE", Qtrue); + + rb_cFalseClass = rb_define_class("FalseClass", rb_cObject); + rb_define_method(rb_cFalseClass, "to_s", false_to_s, 0); + rb_define_method(rb_cFalseClass, "&", false_and, 1); + rb_define_method(rb_cFalseClass, "|", false_or, 1); + rb_define_method(rb_cFalseClass, "^", false_xor, 1); + rb_undef_alloc_func(rb_cFalseClass); + rb_undef_method(CLASS_OF(rb_cFalseClass), "new"); + rb_define_global_const("FALSE", Qfalse); + + id_eq = rb_intern("=="); + id_eql = rb_intern("eql?"); + id_match = rb_intern("=~"); + id_inspect = rb_intern("inspect"); + id_init_copy = rb_intern("initialize_copy"); + + for (i=0; conv_method_names[i].method; i++) { + conv_method_names[i].id = rb_intern(conv_method_names[i].method); + } +} diff --git a/lib/ruby-1.9.1-rc1/opt_sc.inc b/lib/ruby-1.9.1-rc1/opt_sc.inc new file mode 100644 index 0000000..60fefd4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/opt_sc.inc @@ -0,0 +1,662 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/opt_sc.inc.tmpl' + or rb/insns2vm.rb + */ + +#define SC_STATE_SIZE 6 + +#define SCS_XX 1 +#define SCS_AX 2 +#define SCS_BX 3 +#define SCS_AB 4 +#define SCS_BA 5 + +#define SC_ERROR 0xffffffff + +static const VALUE sc_insn_info[][SC_STATE_SIZE] = { + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR}, + { +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR, +SC_ERROR} +}; + +static const VALUE sc_insn_next[] = { + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX, + SCS_XX +}; + diff --git a/lib/ruby-1.9.1-rc1/optinsn.inc b/lib/ruby-1.9.1-rc1/optinsn.inc new file mode 100644 index 0000000..d525fe8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/optinsn.inc @@ -0,0 +1,30 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/optinsn.inc.tmpl' + or rb/insns2vm.rb + */ + +static INSN * +insn_operands_unification(INSN *insnobj){ +#ifdef OPT_OPERANDS_UNIFICATION + /* optimize rule */ + switch(insnobj->insn_id){ + + + + default: + /* do nothing */; + break; + } +#endif + return insnobj; +} + diff --git a/lib/ruby-1.9.1-rc1/optunifs.inc b/lib/ruby-1.9.1-rc1/optunifs.inc new file mode 100644 index 0000000..f110cab --- /dev/null +++ b/lib/ruby-1.9.1-rc1/optunifs.inc @@ -0,0 +1,115 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/optunifs.inc.tmpl' + or rb/insns2vm.rb + */ + +/* + static const int UNIFIED_insn_name_1[] = {id, size, ...}; + static const int UNIFIED_insn_name_2[] = {id, size, ...}; + ... + + static const int *const UNIFIED_insn_name[] = {size, + UNIFIED_insn_name_1, + UNIFIED_insn_name_2, ...}; + ... + + static const int *const *const unified_insns_data[] = { + UNIFIED_insn_nameA, + UNIFIED_insn_nameB, ...}; + */ + + + +static const int *const *const unified_insns_data[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0}; + + +#undef GET_INSN_NAME + diff --git a/lib/ruby-1.9.1-rc1/pack.c b/lib/ruby-1.9.1-rc1/pack.c new file mode 100644 index 0000000..478d80b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/pack.c @@ -0,0 +1,2180 @@ +/********************************************************************** + + pack.c - + + $Author: yugui $ + created at: Thu Feb 10 15:17:05 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" +#include +#include +#include + +#define SIZE16 2 +#define SIZE32 4 + +#if SIZEOF_SHORT != 2 || SIZEOF_LONG != 4 +# define NATINT_PACK +#endif + +#ifdef NATINT_PACK +# define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16))) +# define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32))) +# define NATINT_LEN(type,len) (natint?sizeof(type):(len)) +# ifdef WORDS_BIGENDIAN +# define OFF16(p) OFF16B(p) +# define OFF32(p) OFF32B(p) +# endif +# define NATINT_HTOVS(x) (natint?htovs(x):htov16(x)) +# define NATINT_HTOVL(x) (natint?htovl(x):htov32(x)) +# define NATINT_HTONS(x) (natint?htons(x):hton16(x)) +# define NATINT_HTONL(x) (natint?htonl(x):hton32(x)) +#else +# define NATINT_LEN(type,len) sizeof(type) +# define NATINT_HTOVS(x) htovs(x) +# define NATINT_HTOVL(x) htovl(x) +# define NATINT_HTONS(x) htons(x) +# define NATINT_HTONL(x) htonl(x) +#endif + +#ifndef OFF16 +# define OFF16(p) (char*)(p) +# define OFF32(p) (char*)(p) +#endif +#ifndef OFF16B +# define OFF16B(p) (char*)(p) +# define OFF32B(p) (char*)(p) +#endif + +#define define_swapx(x, xtype) \ +static xtype \ +TOKEN_PASTE(swap,x)(xtype z) \ +{ \ + xtype r; \ + xtype *zp; \ + unsigned char *s, *t; \ + int i; \ + \ + zp = xmalloc(sizeof(xtype)); \ + *zp = z; \ + s = (unsigned char*)zp; \ + t = xmalloc(sizeof(xtype)); \ + for (i=0; i>8)&0xFF)) +#endif +#if SIZEOF_SHORT == 2 +#define swaps(x) swap16(x) +#else +#if SIZEOF_SHORT == 4 +#define swaps(x) ((((x)&0xFF)<<24) \ + |(((x)>>24)&0xFF) \ + |(((x)&0x0000FF00)<<8) \ + |(((x)&0x00FF0000)>>8) ) +#else +define_swapx(s,short) +#endif +#endif + +#ifndef swap32 +#define swap32(x) ((((x)&0xFF)<<24) \ + |(((x)>>24)&0xFF) \ + |(((x)&0x0000FF00)<<8) \ + |(((x)&0x00FF0000)>>8) ) +#endif +#if SIZEOF_LONG == 4 +#define swapl(x) swap32(x) +#else +#if SIZEOF_LONG == 8 +#define swapl(x) ((((x)&0x00000000000000FF)<<56) \ + |(((x)&0xFF00000000000000)>>56) \ + |(((x)&0x000000000000FF00)<<40) \ + |(((x)&0x00FF000000000000)>>40) \ + |(((x)&0x0000000000FF0000)<<24) \ + |(((x)&0x0000FF0000000000)>>24) \ + |(((x)&0x00000000FF000000)<<8) \ + |(((x)&0x000000FF00000000)>>8)) +#else +define_swapx(l,long) +#endif +#endif + +#if SIZEOF_FLOAT == 4 +#if SIZEOF_LONG == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_LONG */ +#define swapf(x) swapl(x) +#define FLOAT_SWAPPER unsigned long +#else +#if SIZEOF_SHORT == 4 /* SIZEOF_FLOAT == 4 == SIZEOF_SHORT */ +#define swapf(x) swaps(x) +#define FLOAT_SWAPPER unsigned short +#else /* SIZEOF_FLOAT == 4 but undivide by known size of int */ +define_swapx(f,float) +#endif /* #if SIZEOF_SHORT == 4 */ +#endif /* #if SIZEOF_LONG == 4 */ +#else /* SIZEOF_FLOAT != 4 */ +define_swapx(f,float) +#endif /* #if SIZEOF_FLOAT == 4 */ + +#if SIZEOF_DOUBLE == 8 +#if SIZEOF_LONG == 8 /* SIZEOF_DOUBLE == 8 == SIZEOF_LONG */ +#define swapd(x) swapl(x) +#define DOUBLE_SWAPPER unsigned long +#else +#if SIZEOF_LONG == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */ +static double +swapd(const double d) +{ + double dtmp = d; + unsigned long utmp[2]; + unsigned long utmp0; + + utmp[0] = 0; utmp[1] = 0; + memcpy(utmp,&dtmp,sizeof(double)); + utmp0 = utmp[0]; + utmp[0] = swapl(utmp[1]); + utmp[1] = swapl(utmp0); + memcpy(&dtmp,utmp,sizeof(double)); + return dtmp; +} +#else +#if SIZEOF_SHORT == 4 /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */ +static double +swapd(const double d) +{ + double dtmp = d; + unsigned short utmp[2]; + unsigned short utmp0; + + utmp[0] = 0; utmp[1] = 0; + memcpy(utmp,&dtmp,sizeof(double)); + utmp0 = utmp[0]; + utmp[0] = swaps(utmp[1]); + utmp[1] = swaps(utmp0); + memcpy(&dtmp,utmp,sizeof(double)); + return dtmp; +} +#else /* SIZEOF_DOUBLE == 8 but undivied by known size of int */ +define_swapx(d, double) +#endif /* #if SIZEOF_SHORT == 4 */ +#endif /* #if SIZEOF_LONG == 4 */ +#endif /* #if SIZEOF_LONG == 8 */ +#else /* SIZEOF_DOUBLE != 8 */ +define_swapx(d, double) +#endif /* #if SIZEOF_DOUBLE == 8 */ + +#undef define_swapx + +#ifdef DYNAMIC_ENDIAN +#ifdef ntohs +#undef ntohs +#undef ntohl +#undef htons +#undef htonl +#endif +static int +endian(void) +{ + static int init = 0; + static int endian_value; + char *p; + + if (init) return endian_value; + init = 1; + p = (char*)&init; + return endian_value = p[0]?0:1; +} + +#define ntohs(x) (endian()?(x):swaps(x)) +#define ntohl(x) (endian()?(x):swapl(x)) +#define ntohf(x) (endian()?(x):swapf(x)) +#define ntohd(x) (endian()?(x):swapd(x)) +#define htons(x) (endian()?(x):swaps(x)) +#define htonl(x) (endian()?(x):swapl(x)) +#define htonf(x) (endian()?(x):swapf(x)) +#define htond(x) (endian()?(x):swapd(x)) +#define htovs(x) (endian()?swaps(x):(x)) +#define htovl(x) (endian()?swapl(x):(x)) +#define htovf(x) (endian()?swapf(x):(x)) +#define htovd(x) (endian()?swapd(x):(x)) +#define vtohs(x) (endian()?swaps(x):(x)) +#define vtohl(x) (endian()?swapl(x):(x)) +#define vtohf(x) (endian()?swapf(x):(x)) +#define vtohd(x) (endian()?swapd(x):(x)) +# ifdef NATINT_PACK +#define htov16(x) (endian()?swap16(x):(x)) +#define htov32(x) (endian()?swap32(x):(x)) +#define hton16(x) (endian()?(x):swap16(x)) +#define hton32(x) (endian()?(x):swap32(x)) +# endif +#else +#ifdef WORDS_BIGENDIAN +#ifndef ntohs +#define ntohs(x) (x) +#define ntohl(x) (x) +#define htons(x) (x) +#define htonl(x) (x) +#endif +#define ntohf(x) (x) +#define ntohd(x) (x) +#define htonf(x) (x) +#define htond(x) (x) +#define htovs(x) swaps(x) +#define htovl(x) swapl(x) +#define htovf(x) swapf(x) +#define htovd(x) swapd(x) +#define vtohs(x) swaps(x) +#define vtohl(x) swapl(x) +#define vtohf(x) swapf(x) +#define vtohd(x) swapd(x) +# ifdef NATINT_PACK +#define htov16(x) swap16(x) +#define htov32(x) swap32(x) +#define hton16(x) (x) +#define hton32(x) (x) +# endif +#else /* LITTLE ENDIAN */ +#ifdef ntohs +#undef ntohs +#undef ntohl +#undef htons +#undef htonl +#endif +#define ntohs(x) swaps(x) +#define ntohl(x) swapl(x) +#define htons(x) swaps(x) +#define htonl(x) swapl(x) +#define ntohf(x) swapf(x) +#define ntohd(x) swapd(x) +#define htonf(x) swapf(x) +#define htond(x) swapd(x) +#define htovs(x) (x) +#define htovl(x) (x) +#define htovf(x) (x) +#define htovd(x) (x) +#define vtohs(x) (x) +#define vtohl(x) (x) +#define vtohf(x) (x) +#define vtohd(x) (x) +# ifdef NATINT_PACK +#define htov16(x) (x) +#define htov32(x) (x) +#define hton16(x) swap16(x) +#define hton32(x) swap32(x) +# endif +#endif +#endif + +#ifdef FLOAT_SWAPPER +#define FLOAT_CONVWITH(y) FLOAT_SWAPPER y; +#define HTONF(x,y) (memcpy(&y,&x,sizeof(float)), \ + y = htonf((FLOAT_SWAPPER)y), \ + memcpy(&x,&y,sizeof(float)), \ + x) +#define HTOVF(x,y) (memcpy(&y,&x,sizeof(float)), \ + y = htovf((FLOAT_SWAPPER)y), \ + memcpy(&x,&y,sizeof(float)), \ + x) +#define NTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \ + y = ntohf((FLOAT_SWAPPER)y), \ + memcpy(&x,&y,sizeof(float)), \ + x) +#define VTOHF(x,y) (memcpy(&y,&x,sizeof(float)), \ + y = vtohf((FLOAT_SWAPPER)y), \ + memcpy(&x,&y,sizeof(float)), \ + x) +#else +#define FLOAT_CONVWITH(y) +#define HTONF(x,y) htonf(x) +#define HTOVF(x,y) htovf(x) +#define NTOHF(x,y) ntohf(x) +#define VTOHF(x,y) vtohf(x) +#endif + +#ifdef DOUBLE_SWAPPER +#define DOUBLE_CONVWITH(y) DOUBLE_SWAPPER y; +#define HTOND(x,y) (memcpy(&y,&x,sizeof(double)), \ + y = htond((DOUBLE_SWAPPER)y), \ + memcpy(&x,&y,sizeof(double)), \ + x) +#define HTOVD(x,y) (memcpy(&y,&x,sizeof(double)), \ + y = htovd((DOUBLE_SWAPPER)y), \ + memcpy(&x,&y,sizeof(double)), \ + x) +#define NTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \ + y = ntohd((DOUBLE_SWAPPER)y), \ + memcpy(&x,&y,sizeof(double)), \ + x) +#define VTOHD(x,y) (memcpy(&y,&x,sizeof(double)), \ + y = vtohd((DOUBLE_SWAPPER)y), \ + memcpy(&x,&y,sizeof(double)), \ + x) +#else +#define DOUBLE_CONVWITH(y) +#define HTOND(x,y) htond(x) +#define HTOVD(x,y) htovd(x) +#define NTOHD(x,y) ntohd(x) +#define VTOHD(x,y) vtohd(x) +#endif + +unsigned long rb_big2ulong_pack(VALUE x); + +static unsigned long +num2i32(VALUE x) +{ + x = rb_to_int(x); /* is nil OK? (should not) */ + + if (FIXNUM_P(x)) return FIX2LONG(x); + if (TYPE(x) == T_BIGNUM) { + return rb_big2ulong_pack(x); + } + rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x)); + return 0; /* not reached */ +} + +#if SIZEOF_LONG == SIZE32 +# define EXTEND32(x) +#else +/* invariant in modulo 1<<31 */ +# define EXTEND32(x) do { if (!natint) {(x) = (((1L<<31)-1-(x))^~(~0L<<31));}} while(0) +#endif +#if SIZEOF_SHORT == SIZE16 +# define EXTEND16(x) +#else +# define EXTEND16(x) do { if (!natint) {(x) = (short)(((1<<15)-1-(x))^~(~0<<15));}} while(0) +#endif + +#ifdef HAVE_LONG_LONG +# define QUAD_SIZE sizeof(LONG_LONG) +#else +# define QUAD_SIZE 8 +#endif +static const char toofew[] = "too few arguments"; + +static void encodes(VALUE,const char*,long,int,int); +static void qpencode(VALUE,VALUE,long); + +static unsigned long utf8_to_uv(const char*,long*); + +/* + * call-seq: + * arr.pack ( aTemplateString ) -> aBinaryString + * + * Packs the contents of arr into a binary sequence according to + * the directives in aTemplateString (see the table below) + * Directives ``A,'' ``a,'' and ``Z'' may be followed by a count, + * which gives the width of the resulting field. The remaining + * directives also may take a count, indicating the number of array + * elements to convert. If the count is an asterisk + * (``*''), all remaining array elements will be + * converted. Any of the directives ``sSiIlL'' may be + * followed by an underscore (``_'') to use the underlying + * platform's native size for the specified type; otherwise, they use a + * platform-independent size. Spaces are ignored in the template + * string. See also String#unpack. + * + * a = [ "a", "b", "c" ] + * n = [ 65, 66, 67 ] + * a.pack("A3A3A3") #=> "a b c " + * a.pack("a3a3a3") #=> "a\000\000b\000\000c\000\000" + * n.pack("ccc") #=> "ABC" + * + * Directives for +pack+. + * + * Directive Meaning + * --------------------------------------------------------------- + * @ | Moves to absolute position + * A | arbitrary binary string (space padded, count is width) + * a | arbitrary binary string (null padded, count is width) + * B | Bit string (descending bit order) + * b | Bit string (ascending bit order) + * C | Unsigned byte (C unsigned char) + * c | Byte (C char) + * D, d | Double-precision float, native format + * E | Double-precision float, little-endian byte order + * e | Single-precision float, little-endian byte order + * F, f | Single-precision float, native format + * G | Double-precision float, network (big-endian) byte order + * g | Single-precision float, network (big-endian) byte order + * H | Hex string (high nibble first) + * h | Hex string (low nibble first) + * I | Unsigned integer + * i | Integer + * L | Unsigned long + * l | Long + * M | Quoted printable, MIME encoding (see RFC2045) + * m | Base64 encoded string (see RFC 2045, count is width) + * | (if count is 0, no line feed are added, see RFC 4648) + * N | Long, network (big-endian) byte order + * n | Short, network (big-endian) byte-order + * P | Pointer to a structure (fixed-length string) + * p | Pointer to a null-terminated string + * Q, q | 64-bit number + * S | Unsigned short + * s | Short + * U | UTF-8 + * u | UU-encoded string + * V | Long, little-endian byte order + * v | Short, little-endian byte order + * w | BER-compressed integer\fnm + * X | Back up a byte + * x | Null byte + * Z | Same as ``a'', except that null is added with * + */ + +static VALUE +pack_pack(VALUE ary, VALUE fmt) +{ + static const char nul10[] = "\0\0\0\0\0\0\0\0\0\0"; + static const char spc10[] = " "; + const char *p, *pend; + VALUE res, from, associates = 0; + char type; + long items, len, idx, plen; + const char *ptr; + int enc_info = 1; /* 0 - BINARY, 1 - US-ASCII, 2 - UTF-8 */ +#ifdef NATINT_PACK + int natint; /* native integer */ +#endif + + StringValue(fmt); + p = RSTRING_PTR(fmt); + pend = p + RSTRING_LEN(fmt); + res = rb_str_buf_new(0); + + items = RARRAY_LEN(ary); + idx = 0; + +#define TOO_FEW (rb_raise(rb_eArgError, toofew), 0) +#define THISFROM (items > 0 ? RARRAY_PTR(ary)[idx] : TOO_FEW) +#define NEXTFROM (items-- > 0 ? RARRAY_PTR(ary)[idx++] : TOO_FEW) + + while (p < pend) { + if (RSTRING_PTR(fmt) + RSTRING_LEN(fmt) != pend) { + rb_raise(rb_eRuntimeError, "format string modified"); + } + type = *p++; /* get data type */ +#ifdef NATINT_PACK + natint = 0; +#endif + + if (ISSPACE(type)) continue; + if (type == '#') { + while ((p < pend) && (*p != '\n')) { + p++; + } + continue; + } + if (*p == '_' || *p == '!') { + static const char natstr[] = "sSiIlL"; + + if (strchr(natstr, type)) { +#ifdef NATINT_PACK + natint = 1; +#endif + p++; + } + else { + rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr); + } + } + if (*p == '*') { /* set data length */ + len = strchr("@Xxu", type) ? 0 + : strchr("PMm", type) ? 1 + : items; + p++; + } + else if (ISDIGIT(*p)) { + errno = 0; + len = STRTOUL(p, (char**)&p, 10); + if (errno) { + rb_raise(rb_eRangeError, "pack length too big"); + } + } + else { + len = 1; + } + + switch (type) { + case 'U': + /* if encoding is US-ASCII, upgrade to UTF-8 */ + if (enc_info == 1) enc_info = 2; + break; + case 'm': case 'M': case 'u': + /* keep US-ASCII (do nothing) */ + break; + default: + /* fall back to BINARY */ + enc_info = 0; + break; + } + switch (type) { + case 'A': case 'a': case 'Z': + case 'B': case 'b': + case 'H': case 'h': + from = NEXTFROM; + if (NIL_P(from)) { + ptr = ""; + plen = 0; + } + else { + StringValue(from); + ptr = RSTRING_PTR(from); + plen = RSTRING_LEN(from); + OBJ_INFECT(res, from); + } + + if (p[-1] == '*') + len = plen; + + switch (type) { + case 'a': /* arbitrary binary string (null padded) */ + case 'A': /* arbitrary binary string (ASCII space padded) */ + case 'Z': /* null terminated string */ + if (plen >= len) { + rb_str_buf_cat(res, ptr, len); + if (p[-1] == '*' && type == 'Z') + rb_str_buf_cat(res, nul10, 1); + } + else { + rb_str_buf_cat(res, ptr, plen); + len -= plen; + while (len >= 10) { + rb_str_buf_cat(res, (type == 'A')?spc10:nul10, 10); + len -= 10; + } + rb_str_buf_cat(res, (type == 'A')?spc10:nul10, len); + } + break; + + case 'b': /* bit string (ascending) */ + { + int byte = 0; + long i, j = 0; + + if (len > plen) { + j = (len - plen + 1)/2; + len = plen; + } + for (i=0; i++ < len; ptr++) { + if (*ptr & 1) + byte |= 128; + if (i & 7) + byte >>= 1; + else { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + byte = 0; + } + } + if (len & 7) { + char c; + byte >>= 7 - (len & 7); + c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + } + len = j; + goto grow; + } + break; + + case 'B': /* bit string (descending) */ + { + int byte = 0; + long i, j = 0; + + if (len > plen) { + j = (len - plen + 1)/2; + len = plen; + } + for (i=0; i++ < len; ptr++) { + byte |= *ptr & 1; + if (i & 7) + byte <<= 1; + else { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + byte = 0; + } + } + if (len & 7) { + char c; + byte <<= 7 - (len & 7); + c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + } + len = j; + goto grow; + } + break; + + case 'h': /* hex string (low nibble first) */ + { + int byte = 0; + long i, j = 0; + + if (len > plen) { + j = (len + 1) / 2 - (plen + 1) / 2; + len = plen; + } + for (i=0; i++ < len; ptr++) { + if (ISALPHA(*ptr)) + byte |= (((*ptr & 15) + 9) & 15) << 4; + else + byte |= (*ptr & 15) << 4; + if (i & 1) + byte >>= 4; + else { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + byte = 0; + } + } + if (len & 1) { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + } + len = j; + goto grow; + } + break; + + case 'H': /* hex string (high nibble first) */ + { + int byte = 0; + long i, j = 0; + + if (len > plen) { + j = (len + 1) / 2 - (plen + 1) / 2; + len = plen; + } + for (i=0; i++ < len; ptr++) { + if (ISALPHA(*ptr)) + byte |= ((*ptr & 15) + 9) & 15; + else + byte |= *ptr & 15; + if (i & 1) + byte <<= 4; + else { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + byte = 0; + } + } + if (len & 1) { + char c = byte & 0xff; + rb_str_buf_cat(res, &c, 1); + } + len = j; + goto grow; + } + break; + } + break; + + case 'c': /* signed char */ + case 'C': /* unsigned char */ + while (len-- > 0) { + char c; + + from = NEXTFROM; + c = num2i32(from); + rb_str_buf_cat(res, &c, sizeof(char)); + } + break; + + case 's': /* signed short */ + case 'S': /* unsigned short */ + while (len-- > 0) { + short s; + + from = NEXTFROM; + s = num2i32(from); + rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); + } + break; + + case 'i': /* signed int */ + case 'I': /* unsigned int */ + while (len-- > 0) { + int i; + + from = NEXTFROM; + i = num2i32(from); + rb_str_buf_cat(res, (char*)&i, sizeof(int)); + } + break; + + case 'l': /* signed long */ + case 'L': /* unsigned long */ + while (len-- > 0) { + long l; + + from = NEXTFROM; + l = num2i32(from); + rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); + } + break; + + case 'q': /* signed quad (64bit) int */ + case 'Q': /* unsigned quad (64bit) int */ + while (len-- > 0) { + char tmp[QUAD_SIZE]; + + from = NEXTFROM; + rb_quad_pack(tmp, from); + rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE); + } + break; + + case 'n': /* unsigned short (network byte-order) */ + while (len-- > 0) { + unsigned short s; + + from = NEXTFROM; + s = num2i32(from); + s = NATINT_HTONS(s); + rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); + } + break; + + case 'N': /* unsigned long (network byte-order) */ + while (len-- > 0) { + unsigned long l; + + from = NEXTFROM; + l = num2i32(from); + l = NATINT_HTONL(l); + rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); + } + break; + + case 'v': /* unsigned short (VAX byte-order) */ + while (len-- > 0) { + unsigned short s; + + from = NEXTFROM; + s = num2i32(from); + s = NATINT_HTOVS(s); + rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2)); + } + break; + + case 'V': /* unsigned long (VAX byte-order) */ + while (len-- > 0) { + unsigned long l; + + from = NEXTFROM; + l = num2i32(from); + l = NATINT_HTOVL(l); + rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4)); + } + break; + + case 'f': /* single precision float in native format */ + case 'F': /* ditto */ + while (len-- > 0) { + float f; + + from = NEXTFROM; + f = RFLOAT_VALUE(rb_Float(from)); + rb_str_buf_cat(res, (char*)&f, sizeof(float)); + } + break; + + case 'e': /* single precision float in VAX byte-order */ + while (len-- > 0) { + float f; + FLOAT_CONVWITH(ftmp); + + from = NEXTFROM; + f = RFLOAT_VALUE(rb_Float(from)); + f = HTOVF(f,ftmp); + rb_str_buf_cat(res, (char*)&f, sizeof(float)); + } + break; + + case 'E': /* double precision float in VAX byte-order */ + while (len-- > 0) { + double d; + DOUBLE_CONVWITH(dtmp); + + from = NEXTFROM; + d = RFLOAT_VALUE(rb_Float(from)); + d = HTOVD(d,dtmp); + rb_str_buf_cat(res, (char*)&d, sizeof(double)); + } + break; + + case 'd': /* double precision float in native format */ + case 'D': /* ditto */ + while (len-- > 0) { + double d; + + from = NEXTFROM; + d = RFLOAT_VALUE(rb_Float(from)); + rb_str_buf_cat(res, (char*)&d, sizeof(double)); + } + break; + + case 'g': /* single precision float in network byte-order */ + while (len-- > 0) { + float f; + FLOAT_CONVWITH(ftmp); + + from = NEXTFROM; + f = RFLOAT_VALUE(rb_Float(from)); + f = HTONF(f,ftmp); + rb_str_buf_cat(res, (char*)&f, sizeof(float)); + } + break; + + case 'G': /* double precision float in network byte-order */ + while (len-- > 0) { + double d; + DOUBLE_CONVWITH(dtmp); + + from = NEXTFROM; + d = RFLOAT_VALUE(rb_Float(from)); + d = HTOND(d,dtmp); + rb_str_buf_cat(res, (char*)&d, sizeof(double)); + } + break; + + case 'x': /* null byte */ + grow: + while (len >= 10) { + rb_str_buf_cat(res, nul10, 10); + len -= 10; + } + rb_str_buf_cat(res, nul10, len); + break; + + case 'X': /* back up byte */ + shrink: + plen = RSTRING_LEN(res); + if (plen < len) + rb_raise(rb_eArgError, "X outside of string"); + rb_str_set_len(res, plen - len); + break; + + case '@': /* null fill to absolute position */ + len -= RSTRING_LEN(res); + if (len > 0) goto grow; + len = -len; + if (len > 0) goto shrink; + break; + + case '%': + rb_raise(rb_eArgError, "%% is not supported"); + break; + + case 'U': /* Unicode character */ + while (len-- > 0) { + SIGNED_VALUE l; + char buf[8]; + int le; + + from = NEXTFROM; + from = rb_to_int(from); + l = NUM2LONG(from); + if (l < 0) { + rb_raise(rb_eRangeError, "pack(U): value out of range"); + } + le = rb_uv_to_utf8(buf, l); + rb_str_buf_cat(res, (char*)buf, le); + } + break; + + case 'u': /* uuencoded string */ + case 'm': /* base64 encoded string */ + from = NEXTFROM; + StringValue(from); + ptr = RSTRING_PTR(from); + plen = RSTRING_LEN(from); + + if (len == 0 && type == 'm') { + encodes(res, ptr, plen, type, 0); + ptr += plen; + break; + } + if (len <= 2) + len = 45; + else + len = len / 3 * 3; + while (plen > 0) { + long todo; + + if (plen > len) + todo = len; + else + todo = plen; + encodes(res, ptr, todo, type, 1); + plen -= todo; + ptr += todo; + } + break; + + case 'M': /* quoted-printable encoded string */ + from = rb_obj_as_string(NEXTFROM); + if (len <= 1) + len = 72; + qpencode(res, from, len); + break; + + case 'P': /* pointer to packed byte string */ + from = THISFROM; + if (!NIL_P(from)) { + StringValue(from); + if (RSTRING_LEN(from) < len) { + rb_raise(rb_eArgError, "too short buffer for P(%ld for %ld)", + RSTRING_LEN(from), len); + } + } + len = 1; + /* FALL THROUGH */ + case 'p': /* pointer to string */ + while (len-- > 0) { + char *t; + from = NEXTFROM; + if (NIL_P(from)) { + t = 0; + } + else { + t = StringValuePtr(from); + } + if (!associates) { + associates = rb_ary_new(); + } + rb_ary_push(associates, from); + rb_obj_taint(from); + rb_str_buf_cat(res, (char*)&t, sizeof(char*)); + } + break; + + case 'w': /* BER compressed integer */ + while (len-- > 0) { + unsigned long ul; + VALUE buf = rb_str_new(0, 0); + char c, *bufs, *bufe; + + from = NEXTFROM; + if (TYPE(from) == T_BIGNUM) { + VALUE big128 = rb_uint2big(128); + while (TYPE(from) == T_BIGNUM) { + from = rb_big_divmod(from, big128); + c = NUM2INT(RARRAY_PTR(from)[1]) | 0x80; /* mod */ + rb_str_buf_cat(buf, &c, sizeof(char)); + from = RARRAY_PTR(from)[0]; /* div */ + } + } + + { + long l = NUM2LONG(from); + if (l < 0) { + rb_raise(rb_eArgError, "can't compress negative numbers"); + } + ul = l; + } + + while (ul) { + c = ((ul & 0x7f) | 0x80); + rb_str_buf_cat(buf, &c, sizeof(char)); + ul >>= 7; + } + + if (RSTRING_LEN(buf)) { + bufs = RSTRING_PTR(buf); + bufe = bufs + RSTRING_LEN(buf) - 1; + *bufs &= 0x7f; /* clear continue bit */ + while (bufs < bufe) { /* reverse */ + c = *bufs; + *bufs++ = *bufe; + *bufe-- = c; + } + rb_str_buf_cat(res, RSTRING_PTR(buf), RSTRING_LEN(buf)); + } + else { + c = 0; + rb_str_buf_cat(res, &c, sizeof(char)); + } + } + break; + + default: + break; + } + } + + if (associates) { + rb_str_associate(res, associates); + } + OBJ_INFECT(res, fmt); + switch (enc_info) { + case 1: + ENCODING_CODERANGE_SET(res, rb_usascii_encindex(), ENC_CODERANGE_7BIT); + break; + case 2: + rb_enc_set_index(res, rb_utf8_encindex()); + break; + default: + /* do nothing, keep ASCII-8BIT */ + break; + } + return res; +} + +static const char uu_table[] = +"`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"; +static const char b64_table[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +static void +encodes(VALUE str, const char *s, long len, int type, int tail_lf) +{ + char buff[4096]; + long i = 0; + const char *trans = type == 'u' ? uu_table : b64_table; + int padding; + + if (type == 'u') { + buff[i++] = len + ' '; + padding = '`'; + } + else { + padding = '='; + } + while (len >= 3) { + while (len >= 3 && sizeof(buff)-i >= 4) { + buff[i++] = trans[077 & (*s >> 2)]; + buff[i++] = trans[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))]; + buff[i++] = trans[077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03))]; + buff[i++] = trans[077 & s[2]]; + s += 3; + len -= 3; + } + if (sizeof(buff)-i < 4) { + rb_str_buf_cat(str, buff, i); + i = 0; + } + } + + if (len == 2) { + buff[i++] = trans[077 & (*s >> 2)]; + buff[i++] = trans[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))]; + buff[i++] = trans[077 & (((s[1] << 2) & 074) | (('\0' >> 6) & 03))]; + buff[i++] = padding; + } + else if (len == 1) { + buff[i++] = trans[077 & (*s >> 2)]; + buff[i++] = trans[077 & (((*s << 4) & 060) | (('\0' >> 4) & 017))]; + buff[i++] = padding; + buff[i++] = padding; + } + if (tail_lf) buff[i++] = '\n'; + rb_str_buf_cat(str, buff, i); +} + +static const char hex_table[] = "0123456789ABCDEF"; + +static void +qpencode(VALUE str, VALUE from, long len) +{ + char buff[1024]; + long i = 0, n = 0, prev = EOF; + unsigned char *s = (unsigned char*)RSTRING_PTR(from); + unsigned char *send = s + RSTRING_LEN(from); + + while (s < send) { + if ((*s > 126) || + (*s < 32 && *s != '\n' && *s != '\t') || + (*s == '=')) { + buff[i++] = '='; + buff[i++] = hex_table[*s >> 4]; + buff[i++] = hex_table[*s & 0x0f]; + n += 3; + prev = EOF; + } + else if (*s == '\n') { + if (prev == ' ' || prev == '\t') { + buff[i++] = '='; + buff[i++] = *s; + } + buff[i++] = *s; + n = 0; + prev = *s; + } + else { + buff[i++] = *s; + n++; + prev = *s; + } + if (n > len) { + buff[i++] = '='; + buff[i++] = '\n'; + n = 0; + prev = '\n'; + } + if (i > 1024 - 5) { + rb_str_buf_cat(str, buff, i); + i = 0; + } + s++; + } + if (n > 0) { + buff[i++] = '='; + buff[i++] = '\n'; + } + if (i > 0) { + rb_str_buf_cat(str, buff, i); + } +} + +static inline int +hex2num(char c) +{ + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return c - '0'; + case 'a': case 'b': case 'c': + case 'd': case 'e': case 'f': + return c - 'a' + 10; + case 'A': case 'B': case 'C': + case 'D': case 'E': case 'F': + return c - 'A' + 10; + default: + return -1; + } +} + +#define PACK_LENGTH_ADJUST_SIZE(sz) do { \ + tmp = 0; \ + if (len > (send-s)/sz) { \ + if (!star) { \ + tmp = len-(send-s)/sz; \ + } \ + len = (send-s)/sz; \ + } \ +} while (0) + +#ifdef NATINT_PACK +#define PACK_LENGTH_ADJUST(type,sz) do { \ + int t__len = NATINT_LEN(type,(sz)); \ + PACK_LENGTH_ADJUST_SIZE(t__len); \ +} while (0) +#else +#define PACK_LENGTH_ADJUST(type,sz) \ + PACK_LENGTH_ADJUST_SIZE(sizeof(type)) +#endif + +#define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil) + +static VALUE +infected_str_new(const char *ptr, long len, VALUE str) +{ + VALUE s = rb_str_new(ptr, len); + + OBJ_INFECT(s, str); + return s; +} + +/* + * call-seq: + * str.unpack(format) => anArray + * + * Decodes str (which may contain binary data) according to the + * format string, returning an array of each value extracted. The + * format string consists of a sequence of single-character directives, + * summarized in the table at the end of this entry. + * Each directive may be followed + * by a number, indicating the number of times to repeat with this + * directive. An asterisk (``*'') will use up all + * remaining elements. The directives sSiIlL may each be + * followed by an underscore (``_'') to use the underlying + * platform's native size for the specified type; otherwise, it uses a + * platform-independent consistent size. Spaces are ignored in the + * format string. See also Array#pack. + * + * "abc \0\0abc \0\0".unpack('A6Z6') #=> ["abc", "abc "] + * "abc \0\0".unpack('a3a3') #=> ["abc", " \000\000"] + * "abc \0abc \0".unpack('Z*Z*') #=> ["abc ", "abc "] + * "aa".unpack('b8B8') #=> ["10000110", "01100001"] + * "aaa".unpack('h2H2c') #=> ["16", "61", 97] + * "\xfe\xff\xfe\xff".unpack('sS') #=> [-2, 65534] + * "now=20is".unpack('M*') #=> ["now is"] + * "whole".unpack('xax2aX2aX1aX2a') #=> ["h", "e", "l", "l", "o"] + * + * This table summarizes the various formats and the Ruby classes + * returned by each. + * + * Format | Returns | Function + * -------+---------+----------------------------------------- + * A | String | arbitrary binary string with trailing + * | | nulls and ASCII spaces removed + * -------+---------+----------------------------------------- + * a | String | arbitrary binary string + * -------+---------+----------------------------------------- + * B | String | extract bits from each character (msb first) + * -------+---------+----------------------------------------- + * b | String | extract bits from each character (lsb first) + * -------+---------+----------------------------------------- + * C | Fixnum | extract a byte (C char) as an unsigned integer + * -------+---------+----------------------------------------- + * c | Fixnum | extract a byte (C char) as an integer + * -------+---------+----------------------------------------- + * d,D | Float | treat sizeof(double) characters as + * | | a native double + * -------+---------+----------------------------------------- + * E | Float | treat sizeof(double) characters as + * | | a double in little-endian byte order + * -------+---------+----------------------------------------- + * e | Float | treat sizeof(float) characters as + * | | a float in little-endian byte order + * -------+---------+----------------------------------------- + * f,F | Float | treat sizeof(float) characters as + * | | a native float + * -------+---------+----------------------------------------- + * G | Float | treat sizeof(double) characters as + * | | a double in network byte order + * -------+---------+----------------------------------------- + * g | Float | treat sizeof(float) characters as a + * | | float in network byte order + * -------+---------+----------------------------------------- + * H | String | extract hex nibbles from each character + * | | (most significant first) + * -------+---------+----------------------------------------- + * h | String | extract hex nibbles from each character + * | | (least significant first) + * -------+---------+----------------------------------------- + * I | Integer | treat sizeof(int) (modified by _) + * | | successive characters as an unsigned + * | | native integer + * -------+---------+----------------------------------------- + * i | Integer | treat sizeof(int) (modified by _) + * | | successive characters as a signed + * | | native integer + * -------+---------+----------------------------------------- + * L | Integer | treat four (modified by _) successive + * | | characters as an unsigned native + * | | long integer + * -------+---------+----------------------------------------- + * l | Integer | treat four (modified by _) successive + * | | characters as a signed native + * | | long integer + * -------+---------+----------------------------------------- + * M | String | quoted-printable + * -------+---------+----------------------------------------- + * m | String | base64-encoded (RFC 2045) (default) + * | | base64-encoded (RFC 4648) if followed by 0 + * -------+---------+----------------------------------------- + * N | Integer | treat four characters as an unsigned + * | | long in network byte order + * -------+---------+----------------------------------------- + * n | Fixnum | treat two characters as an unsigned + * | | short in network byte order + * -------+---------+----------------------------------------- + * P | String | treat sizeof(char *) characters as a + * | | pointer, and return \emph{len} characters + * | | from the referenced location + * -------+---------+----------------------------------------- + * p | String | treat sizeof(char *) characters as a + * | | pointer to a null-terminated string + * -------+---------+----------------------------------------- + * Q | Integer | treat 8 characters as an unsigned + * | | quad word (64 bits) + * -------+---------+----------------------------------------- + * q | Integer | treat 8 characters as a signed + * | | quad word (64 bits) + * -------+---------+----------------------------------------- + * S | Fixnum | treat two (different if _ used) + * | | successive characters as an unsigned + * | | short in native byte order + * -------+---------+----------------------------------------- + * s | Fixnum | Treat two (different if _ used) + * | | successive characters as a signed short + * | | in native byte order + * -------+---------+----------------------------------------- + * U | Integer | UTF-8 characters as unsigned integers + * -------+---------+----------------------------------------- + * u | String | UU-encoded + * -------+---------+----------------------------------------- + * V | Fixnum | treat four characters as an unsigned + * | | long in little-endian byte order + * -------+---------+----------------------------------------- + * v | Fixnum | treat two characters as an unsigned + * | | short in little-endian byte order + * -------+---------+----------------------------------------- + * w | Integer | BER-compressed integer (see Array.pack) + * -------+---------+----------------------------------------- + * X | --- | skip backward one character + * -------+---------+----------------------------------------- + * x | --- | skip forward one character + * -------+---------+----------------------------------------- + * Z | String | with trailing nulls removed + * | | upto first null with * + * -------+---------+----------------------------------------- + * @ | --- | skip to the offset given by the + * | | length argument + * -------+---------+----------------------------------------- + */ + +static VALUE +pack_unpack(VALUE str, VALUE fmt) +{ + static const char hexdigits[] = "0123456789abcdef"; + char *s, *send; + char *p, *pend; + VALUE ary; + char type; + long len; + int tmp, star; +#ifdef NATINT_PACK + int natint; /* native integer */ +#endif + int block_p = rb_block_given_p(); +#define UNPACK_PUSH(item) do {\ + VALUE item_val = (item);\ + if (block_p) {\ + rb_yield(item_val);\ + }\ + else {\ + rb_ary_push(ary, item_val);\ + }\ + } while (0) + + StringValue(str); + StringValue(fmt); + s = RSTRING_PTR(str); + send = s + RSTRING_LEN(str); + p = RSTRING_PTR(fmt); + pend = p + RSTRING_LEN(fmt); + + ary = block_p ? Qnil : rb_ary_new(); + while (p < pend) { + type = *p++; +#ifdef NATINT_PACK + natint = 0; +#endif + + if (ISSPACE(type)) continue; + if (type == '#') { + while ((p < pend) && (*p != '\n')) { + p++; + } + continue; + } + star = 0; + if (*p == '_' || *p == '!') { + static const char natstr[] = "sSiIlL"; + + if (strchr(natstr, type)) { +#ifdef NATINT_PACK + natint = 1; +#endif + p++; + } + else { + rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr); + } + } + if (p >= pend) + len = 1; + else if (*p == '*') { + star = 1; + len = send - s; + p++; + } + else if (ISDIGIT(*p)) { + errno = 0; + len = STRTOUL(p, (char**)&p, 10); + if (errno) { + rb_raise(rb_eRangeError, "pack length too big"); + } + } + else { + len = (type != '@'); + } + + switch (type) { + case '%': + rb_raise(rb_eArgError, "%% is not supported"); + break; + + case 'A': + if (len > send - s) len = send - s; + { + long end = len; + char *t = s + len - 1; + + while (t >= s) { + if (*t != ' ' && *t != '\0') break; + t--; len--; + } + UNPACK_PUSH(infected_str_new(s, len, str)); + s += end; + } + break; + + case 'Z': + { + char *t = s; + + if (len > send-s) len = send-s; + while (t < s+len && *t) t++; + UNPACK_PUSH(infected_str_new(s, t-s, str)); + if (t < send) t++; + s = star ? t : s+len; + } + break; + + case 'a': + if (len > send - s) len = send - s; + UNPACK_PUSH(infected_str_new(s, len, str)); + s += len; + break; + + case 'b': + { + VALUE bitstr; + char *t; + int bits; + long i; + + if (p[-1] == '*' || len > (send - s) * 8) + len = (send - s) * 8; + bits = 0; + UNPACK_PUSH(bitstr = rb_str_new(0, len)); + t = RSTRING_PTR(bitstr); + for (i=0; i>= 1; + else bits = *s++; + *t++ = (bits & 1) ? '1' : '0'; + } + } + break; + + case 'B': + { + VALUE bitstr; + char *t; + int bits; + long i; + + if (p[-1] == '*' || len > (send - s) * 8) + len = (send - s) * 8; + bits = 0; + UNPACK_PUSH(bitstr = rb_str_new(0, len)); + t = RSTRING_PTR(bitstr); + for (i=0; i (send - s) * 2) + len = (send - s) * 2; + bits = 0; + UNPACK_PUSH(bitstr = rb_str_new(0, len)); + t = RSTRING_PTR(bitstr); + for (i=0; i>= 4; + else + bits = *s++; + *t++ = hexdigits[bits & 15]; + } + } + break; + + case 'H': + { + VALUE bitstr; + char *t; + int bits; + long i; + + if (p[-1] == '*' || len > (send - s) * 2) + len = (send - s) * 2; + bits = 0; + UNPACK_PUSH(bitstr = rb_str_new(0, len)); + t = RSTRING_PTR(bitstr); + for (i=0; i> 4) & 15]; + } + } + break; + + case 'c': + PACK_LENGTH_ADJUST(char,sizeof(char)); + while (len-- > 0) { + int c = *s++; + if (c > (char)127) c-=256; + UNPACK_PUSH(INT2FIX(c)); + } + PACK_ITEM_ADJUST(); + break; + + case 'C': + PACK_LENGTH_ADJUST(unsigned char,sizeof(unsigned char)); + while (len-- > 0) { + unsigned char c = *s++; + UNPACK_PUSH(INT2FIX(c)); + } + PACK_ITEM_ADJUST(); + break; + + case 's': + PACK_LENGTH_ADJUST(short,2); + while (len-- > 0) { + short tmp = 0; + memcpy(OFF16(&tmp), s, NATINT_LEN(short,2)); + EXTEND16(tmp); + s += NATINT_LEN(short,2); + UNPACK_PUSH(INT2FIX(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'S': + PACK_LENGTH_ADJUST(unsigned short,2); + while (len-- > 0) { + unsigned short tmp = 0; + memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2)); + s += NATINT_LEN(unsigned short,2); + UNPACK_PUSH(INT2FIX(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'i': + PACK_LENGTH_ADJUST(int,sizeof(int)); + while (len-- > 0) { + int tmp; + memcpy(&tmp, s, sizeof(int)); + s += sizeof(int); + UNPACK_PUSH(INT2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'I': + PACK_LENGTH_ADJUST(unsigned int,sizeof(unsigned int)); + while (len-- > 0) { + unsigned int tmp; + memcpy(&tmp, s, sizeof(unsigned int)); + s += sizeof(unsigned int); + UNPACK_PUSH(UINT2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'l': + PACK_LENGTH_ADJUST(long,4); + while (len-- > 0) { + long tmp = 0; + memcpy(OFF32(&tmp), s, NATINT_LEN(long,4)); + EXTEND32(tmp); + s += NATINT_LEN(long,4); + UNPACK_PUSH(LONG2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + case 'L': + PACK_LENGTH_ADJUST(unsigned long,4); + while (len-- > 0) { + unsigned long tmp = 0; + memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4)); + s += NATINT_LEN(unsigned long,4); + UNPACK_PUSH(ULONG2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'q': + PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE); + while (len-- > 0) { + char *tmp = (char*)s; + s += QUAD_SIZE; + UNPACK_PUSH(rb_quad_unpack(tmp, 1)); + } + PACK_ITEM_ADJUST(); + break; + case 'Q': + PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE); + while (len-- > 0) { + char *tmp = (char*)s; + s += QUAD_SIZE; + UNPACK_PUSH(rb_quad_unpack(tmp, 0)); + } + break; + + case 'n': + PACK_LENGTH_ADJUST(unsigned short,2); + while (len-- > 0) { + unsigned short tmp = 0; + memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2)); + s += NATINT_LEN(unsigned short,2); + UNPACK_PUSH(UINT2NUM(ntohs(tmp))); + } + PACK_ITEM_ADJUST(); + break; + + case 'N': + PACK_LENGTH_ADJUST(unsigned long,4); + while (len-- > 0) { + unsigned long tmp = 0; + memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4)); + s += NATINT_LEN(unsigned long,4); + UNPACK_PUSH(ULONG2NUM(ntohl(tmp))); + } + PACK_ITEM_ADJUST(); + break; + + case 'v': + PACK_LENGTH_ADJUST(unsigned short,2); + while (len-- > 0) { + unsigned short tmp = 0; + memcpy(&tmp, s, NATINT_LEN(unsigned short,2)); + s += NATINT_LEN(unsigned short,2); + UNPACK_PUSH(UINT2NUM(vtohs(tmp))); + } + PACK_ITEM_ADJUST(); + break; + + case 'V': + PACK_LENGTH_ADJUST(unsigned long,4); + while (len-- > 0) { + unsigned long tmp = 0; + memcpy(&tmp, s, NATINT_LEN(long,4)); + s += NATINT_LEN(long,4); + UNPACK_PUSH(ULONG2NUM(vtohl(tmp))); + } + PACK_ITEM_ADJUST(); + break; + + case 'f': + case 'F': + PACK_LENGTH_ADJUST(float,sizeof(float)); + while (len-- > 0) { + float tmp; + memcpy(&tmp, s, sizeof(float)); + s += sizeof(float); + UNPACK_PUSH(DBL2NUM((double)tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'e': + PACK_LENGTH_ADJUST(float,sizeof(float)); + while (len-- > 0) { + float tmp; + FLOAT_CONVWITH(ftmp); + + memcpy(&tmp, s, sizeof(float)); + s += sizeof(float); + tmp = VTOHF(tmp,ftmp); + UNPACK_PUSH(DBL2NUM((double)tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'E': + PACK_LENGTH_ADJUST(double,sizeof(double)); + while (len-- > 0) { + double tmp; + DOUBLE_CONVWITH(dtmp); + + memcpy(&tmp, s, sizeof(double)); + s += sizeof(double); + tmp = VTOHD(tmp,dtmp); + UNPACK_PUSH(DBL2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'D': + case 'd': + PACK_LENGTH_ADJUST(double,sizeof(double)); + while (len-- > 0) { + double tmp; + memcpy(&tmp, s, sizeof(double)); + s += sizeof(double); + UNPACK_PUSH(DBL2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'g': + PACK_LENGTH_ADJUST(float,sizeof(float)); + while (len-- > 0) { + float tmp; + FLOAT_CONVWITH(ftmp;) + + memcpy(&tmp, s, sizeof(float)); + s += sizeof(float); + tmp = NTOHF(tmp,ftmp); + UNPACK_PUSH(DBL2NUM((double)tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'G': + PACK_LENGTH_ADJUST(double,sizeof(double)); + while (len-- > 0) { + double tmp; + DOUBLE_CONVWITH(dtmp); + + memcpy(&tmp, s, sizeof(double)); + s += sizeof(double); + tmp = NTOHD(tmp,dtmp); + UNPACK_PUSH(DBL2NUM(tmp)); + } + PACK_ITEM_ADJUST(); + break; + + case 'U': + if (len > send - s) len = send - s; + while (len > 0 && s < send) { + long alen = send - s; + unsigned long l; + + l = utf8_to_uv(s, &alen); + s += alen; len--; + UNPACK_PUSH(ULONG2NUM(l)); + } + break; + + case 'u': + { + VALUE buf = infected_str_new(0, (send - s)*3/4, str); + char *ptr = RSTRING_PTR(buf); + long total = 0; + + while (s < send && *s > ' ' && *s < 'a') { + long a,b,c,d; + char hunk[4]; + + hunk[3] = '\0'; + len = (*s++ - ' ') & 077; + total += len; + if (total > RSTRING_LEN(buf)) { + len -= total - RSTRING_LEN(buf); + total = RSTRING_LEN(buf); + } + + while (len > 0) { + long mlen = len > 3 ? 3 : len; + + if (s < send && *s >= ' ') + a = (*s++ - ' ') & 077; + else + a = 0; + if (s < send && *s >= ' ') + b = (*s++ - ' ') & 077; + else + b = 0; + if (s < send && *s >= ' ') + c = (*s++ - ' ') & 077; + else + c = 0; + if (s < send && *s >= ' ') + d = (*s++ - ' ') & 077; + else + d = 0; + hunk[0] = a << 2 | b >> 4; + hunk[1] = b << 4 | c >> 2; + hunk[2] = c << 6 | d; + memcpy(ptr, hunk, mlen); + ptr += mlen; + len -= mlen; + } + if (*s == '\r') s++; + if (*s == '\n') s++; + else if (s < send && (s+1 == send || s[1] == '\n')) + s += 2; /* possible checksum byte */ + } + + rb_str_set_len(buf, total); + UNPACK_PUSH(buf); + } + break; + + case 'm': + { + VALUE buf = infected_str_new(0, (send - s)*3/4, str); + char *ptr = RSTRING_PTR(buf); + int a = -1,b = -1,c = 0,d = 0; + static signed char b64_xtable[256]; + + if (b64_xtable['/'] <= 0) { + int i; + + for (i = 0; i < 256; i++) { + b64_xtable[i] = -1; + } + for (i = 0; i < 64; i++) { + b64_xtable[(unsigned char)b64_table[i]] = i; + } + } + if (len == 0) { + while (s < send) { + a = b = c = d = -1; + a = b64_xtable[(unsigned char)*s++]; + if (s >= send || a == -1) rb_raise(rb_eArgError, "invalid base64"); + b = b64_xtable[(unsigned char)*s++]; + if (s >= send || b == -1) rb_raise(rb_eArgError, "invalid base64"); + if (*s == '=') { + if (s + 2 == send && *(s + 1) == '=') break; + rb_raise(rb_eArgError, "invalid base64"); + } + c = b64_xtable[(unsigned char)*s++]; + if (s >= send || c == -1) rb_raise(rb_eArgError, "invalid base64"); + if (s + 1 == send && *s == '=') break; + d = b64_xtable[(unsigned char)*s++]; + if (d == -1) rb_raise(rb_eArgError, "invalid base64"); + *ptr++ = a << 2 | b >> 4; + *ptr++ = b << 4 | c >> 2; + *ptr++ = c << 6 | d; + } + if (c == -1) { + *ptr++ = a << 2 | b >> 4; + if (b & 0xf) rb_raise(rb_eArgError, "invalid base64"); + } + else if (d == -1) { + *ptr++ = a << 2 | b >> 4; + *ptr++ = b << 4 | c >> 2; + if (c & 0x3) rb_raise(rb_eArgError, "invalid base64"); + } + } + else { + while (s < send) { + a = b = c = d = -1; + while ((a = b64_xtable[(unsigned char)*s]) == -1 && s < send) {s++;} + if (s >= send) break; + s++; + while ((b = b64_xtable[(unsigned char)*s]) == -1 && s < send) {s++;} + if (s >= send) break; + s++; + while ((c = b64_xtable[(unsigned char)*s]) == -1 && s < send) {if (*s == '=') break; s++;} + if (*s == '=' || s >= send) break; + s++; + while ((d = b64_xtable[(unsigned char)*s]) == -1 && s < send) {if (*s == '=') break; s++;} + if (*s == '=' || s >= send) break; + s++; + *ptr++ = a << 2 | b >> 4; + *ptr++ = b << 4 | c >> 2; + *ptr++ = c << 6 | d; + } + if (a != -1 && b != -1) { + if (c == -1 && *s == '=') + *ptr++ = a << 2 | b >> 4; + else if (c != -1 && *s == '=') { + *ptr++ = a << 2 | b >> 4; + *ptr++ = b << 4 | c >> 2; + } + } + } + rb_str_set_len(buf, ptr - RSTRING_PTR(buf)); + UNPACK_PUSH(buf); + } + break; + + case 'M': + { + VALUE buf = infected_str_new(0, send - s, str); + char *ptr = RSTRING_PTR(buf); + int c1, c2; + + while (s < send) { + if (*s == '=') { + if (++s == send) break; + if (s+1 < send && *s == '\r' && *(s+1) == '\n') + s++; + if (*s != '\n') { + if ((c1 = hex2num(*s)) == -1) break; + if (++s == send) break; + if ((c2 = hex2num(*s)) == -1) break; + *ptr++ = c1 << 4 | c2; + } + } + else { + *ptr++ = *s; + } + s++; + } + rb_str_set_len(buf, ptr - RSTRING_PTR(buf)); + ENCODING_CODERANGE_SET(buf, rb_usascii_encindex(), ENC_CODERANGE_7BIT); + UNPACK_PUSH(buf); + } + break; + + case '@': + if (len > RSTRING_LEN(str)) + rb_raise(rb_eArgError, "@ outside of string"); + s = RSTRING_PTR(str) + len; + break; + + case 'X': + if (len > s - RSTRING_PTR(str)) + rb_raise(rb_eArgError, "X outside of string"); + s -= len; + break; + + case 'x': + if (len > send - s) + rb_raise(rb_eArgError, "x outside of string"); + s += len; + break; + + case 'P': + if (sizeof(char *) <= send - s) { + VALUE tmp = Qnil; + char *t; + + memcpy(&t, s, sizeof(char *)); + s += sizeof(char *); + + if (t) { + VALUE a, *p, *pend; + + if (!(a = rb_str_associated(str))) { + rb_raise(rb_eArgError, "no associated pointer"); + } + p = RARRAY_PTR(a); + pend = p + RARRAY_LEN(a); + while (p < pend) { + if (TYPE(*p) == T_STRING && RSTRING_PTR(*p) == t) { + if (len < RSTRING_LEN(*p)) { + tmp = rb_tainted_str_new(t, len); + rb_str_associate(tmp, a); + } + else { + tmp = *p; + } + break; + } + p++; + } + if (p == pend) { + rb_raise(rb_eArgError, "non associated pointer"); + } + } + UNPACK_PUSH(tmp); + } + break; + + case 'p': + if (len > (send - s) / sizeof(char *)) + len = (send - s) / sizeof(char *); + while (len-- > 0) { + if (send - s < sizeof(char *)) + break; + else { + VALUE tmp = Qnil; + char *t; + + memcpy(&t, s, sizeof(char *)); + s += sizeof(char *); + + if (t) { + VALUE a, *p, *pend; + + if (!(a = rb_str_associated(str))) { + rb_raise(rb_eArgError, "no associated pointer"); + } + p = RARRAY_PTR(a); + pend = p + RARRAY_LEN(a); + while (p < pend) { + if (TYPE(*p) == T_STRING && RSTRING_PTR(*p) == t) { + tmp = *p; + break; + } + p++; + } + if (p == pend) { + rb_raise(rb_eArgError, "non associated pointer"); + } + } + UNPACK_PUSH(tmp); + } + } + break; + + case 'w': + { + unsigned long ul = 0; + unsigned long ulmask = 0xfeUL << ((sizeof(unsigned long) - 1) * 8); + + while (len > 0 && s < send) { + ul <<= 7; + ul |= (*s & 0x7f); + if (!(*s++ & 0x80)) { + UNPACK_PUSH(ULONG2NUM(ul)); + len--; + ul = 0; + } + else if (ul & ulmask) { + VALUE big = rb_uint2big(ul); + VALUE big128 = rb_uint2big(128); + while (s < send) { + big = rb_big_mul(big, big128); + big = rb_big_plus(big, rb_uint2big(*s & 0x7f)); + if (!(*s++ & 0x80)) { + UNPACK_PUSH(big); + len--; + ul = 0; + break; + } + } + } + } + } + break; + + default: + break; + } + } + + return ary; +} + +#define BYTEWIDTH 8 + +int +rb_uv_to_utf8(char buf[6], unsigned long uv) +{ + if (uv <= 0x7f) { + buf[0] = (char)uv; + return 1; + } + if (uv <= 0x7ff) { + buf[0] = ((uv>>6)&0xff)|0xc0; + buf[1] = (uv&0x3f)|0x80; + return 2; + } + if (uv <= 0xffff) { + buf[0] = ((uv>>12)&0xff)|0xe0; + buf[1] = ((uv>>6)&0x3f)|0x80; + buf[2] = (uv&0x3f)|0x80; + return 3; + } + if (uv <= 0x1fffff) { + buf[0] = ((uv>>18)&0xff)|0xf0; + buf[1] = ((uv>>12)&0x3f)|0x80; + buf[2] = ((uv>>6)&0x3f)|0x80; + buf[3] = (uv&0x3f)|0x80; + return 4; + } + if (uv <= 0x3ffffff) { + buf[0] = ((uv>>24)&0xff)|0xf8; + buf[1] = ((uv>>18)&0x3f)|0x80; + buf[2] = ((uv>>12)&0x3f)|0x80; + buf[3] = ((uv>>6)&0x3f)|0x80; + buf[4] = (uv&0x3f)|0x80; + return 5; + } + if (uv <= 0x7fffffff) { + buf[0] = ((uv>>30)&0xff)|0xfc; + buf[1] = ((uv>>24)&0x3f)|0x80; + buf[2] = ((uv>>18)&0x3f)|0x80; + buf[3] = ((uv>>12)&0x3f)|0x80; + buf[4] = ((uv>>6)&0x3f)|0x80; + buf[5] = (uv&0x3f)|0x80; + return 6; + } + rb_raise(rb_eRangeError, "pack(U): value out of range"); +} + +static const unsigned long utf8_limits[] = { + 0x0, /* 1 */ + 0x80, /* 2 */ + 0x800, /* 3 */ + 0x10000, /* 4 */ + 0x200000, /* 5 */ + 0x4000000, /* 6 */ + 0x80000000, /* 7 */ +}; + +static unsigned long +utf8_to_uv(const char *p, long *lenp) +{ + int c = *p++ & 0xff; + unsigned long uv = c; + long n; + + if (!(uv & 0x80)) { + *lenp = 1; + return uv; + } + if (!(uv & 0x40)) { + *lenp = 1; + rb_raise(rb_eArgError, "malformed UTF-8 character"); + } + + if (!(uv & 0x20)) { n = 2; uv &= 0x1f; } + else if (!(uv & 0x10)) { n = 3; uv &= 0x0f; } + else if (!(uv & 0x08)) { n = 4; uv &= 0x07; } + else if (!(uv & 0x04)) { n = 5; uv &= 0x03; } + else if (!(uv & 0x02)) { n = 6; uv &= 0x01; } + else { + *lenp = 1; + rb_raise(rb_eArgError, "malformed UTF-8 character"); + } + if (n > *lenp) { + rb_raise(rb_eArgError, "malformed UTF-8 character (expected %ld bytes, given %ld bytes)", + n, *lenp); + } + *lenp = n--; + if (n != 0) { + while (n--) { + c = *p++ & 0xff; + if ((c & 0xc0) != 0x80) { + *lenp -= n + 1; + rb_raise(rb_eArgError, "malformed UTF-8 character"); + } + else { + c &= 0x3f; + uv = uv << 6 | c; + } + } + } + n = *lenp - 1; + if (uv < utf8_limits[n]) { + rb_raise(rb_eArgError, "redundant UTF-8 sequence"); + } + return uv; +} + +void +Init_pack(void) +{ + rb_define_method(rb_cArray, "pack", pack_pack, 1); + rb_define_method(rb_cString, "unpack", pack_unpack, 1); +} diff --git a/lib/ruby-1.9.1-rc1/parse.c b/lib/ruby-1.9.1-rc1/parse.c new file mode 100644 index 0000000..b04808f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/parse.c @@ -0,0 +1,15556 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + keyword_class = 258, + keyword_module = 259, + keyword_def = 260, + keyword_undef = 261, + keyword_begin = 262, + keyword_rescue = 263, + keyword_ensure = 264, + keyword_end = 265, + keyword_if = 266, + keyword_unless = 267, + keyword_then = 268, + keyword_elsif = 269, + keyword_else = 270, + keyword_case = 271, + keyword_when = 272, + keyword_while = 273, + keyword_until = 274, + keyword_for = 275, + keyword_break = 276, + keyword_next = 277, + keyword_redo = 278, + keyword_retry = 279, + keyword_in = 280, + keyword_do = 281, + keyword_do_cond = 282, + keyword_do_block = 283, + keyword_do_LAMBDA = 284, + keyword_return = 285, + keyword_yield = 286, + keyword_super = 287, + keyword_self = 288, + keyword_nil = 289, + keyword_true = 290, + keyword_false = 291, + keyword_and = 292, + keyword_or = 293, + keyword_not = 294, + modifier_if = 295, + modifier_unless = 296, + modifier_while = 297, + modifier_until = 298, + modifier_rescue = 299, + keyword_alias = 300, + keyword_defined = 301, + keyword_BEGIN = 302, + keyword_END = 303, + keyword__LINE__ = 304, + keyword__FILE__ = 305, + keyword__ENCODING__ = 306, + tIDENTIFIER = 307, + tFID = 308, + tGVAR = 309, + tIVAR = 310, + tCONSTANT = 311, + tCVAR = 312, + tLABEL = 313, + tINTEGER = 314, + tFLOAT = 315, + tSTRING_CONTENT = 316, + tCHAR = 317, + tNTH_REF = 318, + tBACK_REF = 319, + tREGEXP_END = 320, + tUPLUS = 321, + tUMINUS = 322, + tPOW = 323, + tCMP = 324, + tEQ = 325, + tEQQ = 326, + tNEQ = 327, + tGEQ = 328, + tLEQ = 329, + tANDOP = 330, + tOROP = 331, + tMATCH = 332, + tNMATCH = 333, + tDOT2 = 334, + tDOT3 = 335, + tAREF = 336, + tASET = 337, + tLSHFT = 338, + tRSHFT = 339, + tCOLON2 = 340, + tCOLON3 = 341, + tOP_ASGN = 342, + tASSOC = 343, + tLPAREN = 344, + tLPAREN_ARG = 345, + tRPAREN = 346, + tLBRACK = 347, + tLBRACE = 348, + tLBRACE_ARG = 349, + tSTAR = 350, + tAMPER = 351, + tLAMBDA = 352, + tSYMBEG = 353, + tSTRING_BEG = 354, + tXSTRING_BEG = 355, + tREGEXP_BEG = 356, + tWORDS_BEG = 357, + tQWORDS_BEG = 358, + tSTRING_DBEG = 359, + tSTRING_DVAR = 360, + tSTRING_END = 361, + tLAMBEG = 362, + tLOWEST = 363, + tUMINUS_NUM = 364, + idNULL = 365, + idRespond_to = 366, + idIFUNC = 367, + idCFUNC = 368, + idThrowState = 369, + id_core_set_method_alias = 370, + id_core_set_variable_alias = 371, + id_core_undef_method = 372, + id_core_define_method = 373, + id_core_define_singleton_method = 374, + id_core_set_postexe = 375, + tLAST_TOKEN = 376 + }; +#endif +/* Tokens. */ +#define keyword_class 258 +#define keyword_module 259 +#define keyword_def 260 +#define keyword_undef 261 +#define keyword_begin 262 +#define keyword_rescue 263 +#define keyword_ensure 264 +#define keyword_end 265 +#define keyword_if 266 +#define keyword_unless 267 +#define keyword_then 268 +#define keyword_elsif 269 +#define keyword_else 270 +#define keyword_case 271 +#define keyword_when 272 +#define keyword_while 273 +#define keyword_until 274 +#define keyword_for 275 +#define keyword_break 276 +#define keyword_next 277 +#define keyword_redo 278 +#define keyword_retry 279 +#define keyword_in 280 +#define keyword_do 281 +#define keyword_do_cond 282 +#define keyword_do_block 283 +#define keyword_do_LAMBDA 284 +#define keyword_return 285 +#define keyword_yield 286 +#define keyword_super 287 +#define keyword_self 288 +#define keyword_nil 289 +#define keyword_true 290 +#define keyword_false 291 +#define keyword_and 292 +#define keyword_or 293 +#define keyword_not 294 +#define modifier_if 295 +#define modifier_unless 296 +#define modifier_while 297 +#define modifier_until 298 +#define modifier_rescue 299 +#define keyword_alias 300 +#define keyword_defined 301 +#define keyword_BEGIN 302 +#define keyword_END 303 +#define keyword__LINE__ 304 +#define keyword__FILE__ 305 +#define keyword__ENCODING__ 306 +#define tIDENTIFIER 307 +#define tFID 308 +#define tGVAR 309 +#define tIVAR 310 +#define tCONSTANT 311 +#define tCVAR 312 +#define tLABEL 313 +#define tINTEGER 314 +#define tFLOAT 315 +#define tSTRING_CONTENT 316 +#define tCHAR 317 +#define tNTH_REF 318 +#define tBACK_REF 319 +#define tREGEXP_END 320 +#define tUPLUS 321 +#define tUMINUS 322 +#define tPOW 323 +#define tCMP 324 +#define tEQ 325 +#define tEQQ 326 +#define tNEQ 327 +#define tGEQ 328 +#define tLEQ 329 +#define tANDOP 330 +#define tOROP 331 +#define tMATCH 332 +#define tNMATCH 333 +#define tDOT2 334 +#define tDOT3 335 +#define tAREF 336 +#define tASET 337 +#define tLSHFT 338 +#define tRSHFT 339 +#define tCOLON2 340 +#define tCOLON3 341 +#define tOP_ASGN 342 +#define tASSOC 343 +#define tLPAREN 344 +#define tLPAREN_ARG 345 +#define tRPAREN 346 +#define tLBRACK 347 +#define tLBRACE 348 +#define tLBRACE_ARG 349 +#define tSTAR 350 +#define tAMPER 351 +#define tLAMBDA 352 +#define tSYMBEG 353 +#define tSTRING_BEG 354 +#define tXSTRING_BEG 355 +#define tREGEXP_BEG 356 +#define tWORDS_BEG 357 +#define tQWORDS_BEG 358 +#define tSTRING_DBEG 359 +#define tSTRING_DVAR 360 +#define tSTRING_END 361 +#define tLAMBEG 362 +#define tLOWEST 363 +#define tUMINUS_NUM 364 +#define idNULL 365 +#define idRespond_to 366 +#define idIFUNC 367 +#define idCFUNC 368 +#define idThrowState 369 +#define id_core_set_method_alias 370 +#define id_core_set_variable_alias 371 +#define id_core_undef_method 372 +#define id_core_define_method 373 +#define id_core_define_singleton_method 374 +#define id_core_set_postexe 375 +#define tLAST_TOKEN 376 + + + + +/* Copy the first part of user declarations. */ +#line 12 "parse.y" + + +#define YYDEBUG 1 +#define YYERROR_VERBOSE 1 +#define YYSTACK_USE_ALLOCA 0 + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/encoding.h" +#include "node.h" +#include "parse.h" +#include "id.h" +#include "regenc.h" +#include +#include +#include + +#define YYMALLOC(size) rb_parser_malloc(parser, size) +#define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) +#define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) +#define YYFREE(ptr) rb_parser_free(parser, ptr) +#define malloc YYMALLOC +#define realloc YYREALLOC +#define calloc YYCALLOC +#define free YYFREE + +#ifndef RIPPER +static ID register_symid(ID, const char *, long, rb_encoding *); +#define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) +#include "id.c" +#endif + +#define is_notop_id(id) ((id)>tLAST_TOKEN) +#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) +#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) +#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) +#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) +#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) +#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) +#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) + +#define is_asgn_or_id(id) ((is_notop_id(id)) && \ + (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ + ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ + ((id)&ID_SCOPE_MASK) == ID_CLASS)) + +enum lex_state_e { + EXPR_BEG, /* ignore newline, +/- is a sign. */ + EXPR_END, /* newline significant, +/- is an operator. */ + EXPR_ENDARG, /* ditto, and unbound braces. */ + EXPR_ARG, /* newline significant, +/- is an operator. */ + EXPR_CMDARG, /* newline significant, +/- is an operator. */ + EXPR_MID, /* newline significant, +/- is an operator. */ + EXPR_FNAME, /* ignore newline, no reserved words. */ + EXPR_DOT, /* right after `.' or `::', no reserved words. */ + EXPR_CLASS, /* immediate after `class', no here document. */ + EXPR_VALUE /* alike EXPR_BEG but label is disallowed. */ +}; + +# ifdef HAVE_LONG_LONG +typedef unsigned LONG_LONG stack_type; +# else +typedef unsigned long stack_type; +# endif + +# define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) +# define BITSTACK_POP(stack) (stack = stack >> 1) +# define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) +# define BITSTACK_SET_P(stack) (stack&1) + +#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) +#define COND_POP() BITSTACK_POP(cond_stack) +#define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) +#define COND_P() BITSTACK_SET_P(cond_stack) + +#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) +#define CMDARG_POP() BITSTACK_POP(cmdarg_stack) +#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) +#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) + +struct vtable { + ID *tbl; + int pos; + int capa; + struct vtable *prev; +}; + +struct local_vars { + struct vtable *args; + struct vtable *vars; + struct local_vars *prev; +}; + +#define DVARS_INHERIT ((void*)1) +#define DVARS_TOPSCOPE NULL +#define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) +#define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) + +#ifndef RIPPER +static int +vtable_size(const struct vtable *tbl) +{ + if (POINTER_P(tbl)) { + return tbl->pos; + } + else { + return 0; + } +} + +#define VTBL_DEBUG 0 + +static struct vtable * +vtable_alloc(struct vtable *prev) +{ + struct vtable *tbl = ALLOC(struct vtable); + tbl->pos = 0; + tbl->capa = 8; + tbl->tbl = ALLOC_N(ID, tbl->capa); + tbl->prev = prev; + if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); + return tbl; +} + +static void +vtable_free(struct vtable *tbl) +{ + if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); + if (POINTER_P(tbl)) { + if (tbl->tbl) { + xfree(tbl->tbl); + } + xfree(tbl); + } +} + +static void +vtable_add(struct vtable *tbl, ID id) +{ + if (!POINTER_P(tbl)) { + rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); + } + if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); + + if (tbl->pos == tbl->capa) { + tbl->capa = tbl->capa * 2; + REALLOC_N(tbl->tbl, ID, tbl->capa); + } + tbl->tbl[tbl->pos++] = id; +} + +static int +vtable_included(const struct vtable * tbl, ID id) +{ + int i; + + if (POINTER_P(tbl)) { + for (i = 0; i < tbl->pos; i++) { + if (tbl->tbl[i] == id) { + return 1; + } + } + } + return 0; +} + + +typedef struct token_info { + const char *token; + int linenum; + int column; + int nonspc; + struct token_info *next; +} token_info; +#endif + +/* + Structure of Lexer Buffer: + + lex_pbeg tokp lex_p lex_pend + | | | | + |-----------+--------------+------------| + |<------------>| + token +*/ +struct parser_params { + int is_ripper; + NODE *heap; + + YYSTYPE *parser_yylval; + VALUE eofp; + + NODE *parser_lex_strterm; + enum lex_state_e parser_lex_state; + stack_type parser_cond_stack; + stack_type parser_cmdarg_stack; + int parser_class_nest; + int parser_paren_nest; + int parser_lpar_beg; + int parser_in_single; + int parser_in_def; + int parser_compile_for_eval; + VALUE parser_cur_mid; + int parser_in_defined; + char *parser_tokenbuf; + int parser_tokidx; + int parser_toksiz; + VALUE parser_lex_input; + VALUE parser_lex_lastline; + VALUE parser_lex_nextline; + const char *parser_lex_pbeg; + const char *parser_lex_p; + const char *parser_lex_pend; + int parser_heredoc_end; + int parser_command_start; + NODE *parser_deferred_nodes; + int parser_lex_gets_ptr; + VALUE (*parser_lex_gets)(struct parser_params*,VALUE); + struct local_vars *parser_lvtbl; + int parser_ruby__end__seen; + int line_count; + int has_shebang; + char *parser_ruby_sourcefile; /* current source file */ + int parser_ruby_sourceline; /* current line no. */ + rb_encoding *enc; + rb_encoding *utf8; + + int parser_yydebug; + +#ifndef RIPPER + /* Ruby core only */ + NODE *parser_eval_tree_begin; + NODE *parser_eval_tree; + VALUE debug_lines; + VALUE coverage; + int nerr; + + token_info *parser_token_info; +#else + /* Ripper only */ + VALUE parser_ruby_sourcefile_string; + const char *tokp; + VALUE delayed; + int delayed_line; + int delayed_col; + + VALUE value; + VALUE result; + VALUE parsing_thread; + int toplevel_p; +#endif +}; + +#define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ + (parser->utf8 = rb_utf8_encoding())) +#define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) +#define STR_NEW0() rb_enc_str_new(0,0,parser->enc) +#define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) +#define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) +#define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) +#define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) + +#ifdef YYMALLOC +void *rb_parser_malloc(struct parser_params *, size_t); +void *rb_parser_realloc(struct parser_params *, void *, size_t); +void *rb_parser_calloc(struct parser_params *, size_t, size_t); +void rb_parser_free(struct parser_params *, void *); +#endif + +static int parser_yyerror(struct parser_params*, const char*); +#define yyerror(msg) parser_yyerror(parser, msg) + +#define YYLEX_PARAM parser + +#define lex_strterm (parser->parser_lex_strterm) +#define lex_state (parser->parser_lex_state) +#define cond_stack (parser->parser_cond_stack) +#define cmdarg_stack (parser->parser_cmdarg_stack) +#define class_nest (parser->parser_class_nest) +#define paren_nest (parser->parser_paren_nest) +#define lpar_beg (parser->parser_lpar_beg) +#define in_single (parser->parser_in_single) +#define in_def (parser->parser_in_def) +#define compile_for_eval (parser->parser_compile_for_eval) +#define cur_mid (parser->parser_cur_mid) +#define in_defined (parser->parser_in_defined) +#define tokenbuf (parser->parser_tokenbuf) +#define tokidx (parser->parser_tokidx) +#define toksiz (parser->parser_toksiz) +#define lex_input (parser->parser_lex_input) +#define lex_lastline (parser->parser_lex_lastline) +#define lex_nextline (parser->parser_lex_nextline) +#define lex_pbeg (parser->parser_lex_pbeg) +#define lex_p (parser->parser_lex_p) +#define lex_pend (parser->parser_lex_pend) +#define heredoc_end (parser->parser_heredoc_end) +#define command_start (parser->parser_command_start) +#define deferred_nodes (parser->parser_deferred_nodes) +#define lex_gets_ptr (parser->parser_lex_gets_ptr) +#define lex_gets (parser->parser_lex_gets) +#define lvtbl (parser->parser_lvtbl) +#define ruby__end__seen (parser->parser_ruby__end__seen) +#define ruby_sourceline (parser->parser_ruby_sourceline) +#define ruby_sourcefile (parser->parser_ruby_sourcefile) +#define yydebug (parser->parser_yydebug) +#ifdef RIPPER +#else +#define ruby_eval_tree (parser->parser_eval_tree) +#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) +#define ruby_debug_lines (parser->debug_lines) +#define ruby_coverage (parser->coverage) +#endif + +static int yylex(void*, void*); + +#ifndef RIPPER +#define yyparse ruby_yyparse + +static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); +#define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) + +static NODE *cond_gen(struct parser_params*,NODE*); +#define cond(node) cond_gen(parser, node) +static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); +#define logop(type,node1,node2) logop_gen(parser, type, node1, node2) + +static NODE *newline_node(NODE*); +static void fixpos(NODE*,NODE*); + +static int value_expr_gen(struct parser_params*,NODE*); +static void void_expr_gen(struct parser_params*,NODE*); +static NODE *remove_begin(NODE*); +#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) +#define void_expr0(node) void_expr_gen(parser, (node)) +#define void_expr(node) void_expr0((node) = remove_begin(node)) +static void void_stmts_gen(struct parser_params*,NODE*); +#define void_stmts(node) void_stmts_gen(parser, node) +static void reduce_nodes_gen(struct parser_params*,NODE**); +#define reduce_nodes(n) reduce_nodes_gen(parser,n) +static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); +#define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2) + +static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); +#define block_append(h,t) block_append_gen(parser,h,t) +static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); +#define list_append(l,i) list_append_gen(parser,l,i) +static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); +#define list_concat(h,t) list_concat_gen(parser,h,t) +static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); +#define arg_append(h,t) arg_append_gen(parser,h,t) +static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); +#define arg_concat(h,t) arg_concat_gen(parser,h,t) +static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); +#define literal_concat(h,t) literal_concat_gen(parser,h,t) +static NODE *new_evstr_gen(struct parser_params*,NODE*); +#define new_evstr(n) new_evstr_gen(parser,n) +static NODE *evstr2dstr_gen(struct parser_params*,NODE*); +#define evstr2dstr(n) evstr2dstr_gen(parser,n) +static NODE *splat_array(NODE*); + +static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); +#define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1) +static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); +#define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id) + +static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); +#define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b) +static void shadowing_lvar_gen(struct parser_params*,ID); +#define shadowing_lvar(name) shadowing_lvar_gen(parser, name) + +static NODE *negate_lit(NODE*); +static NODE *ret_args_gen(struct parser_params*,NODE*); +#define ret_args(node) ret_args_gen(parser, node) +static NODE *arg_blk_pass(NODE*,NODE*); +static NODE *new_yield_gen(struct parser_params*,NODE*); +#define new_yield(node) new_yield_gen(parser, node) + +static NODE *gettable_gen(struct parser_params*,ID); +#define gettable(id) gettable_gen(parser,id) +static NODE *assignable_gen(struct parser_params*,ID,NODE*); +#define assignable(id,node) assignable_gen(parser, id, node) +static void new_bv_gen(struct parser_params*,ID); +#define new_bv(id) new_bv_gen(parser, id) +static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); +#define aryset(node1,node2) aryset_gen(parser, node1, node2) +static NODE *attrset_gen(struct parser_params*,NODE*,ID); +#define attrset(node,id) attrset_gen(parser, node, id) + +static void rb_backref_error_gen(struct parser_params*,NODE*); +#define rb_backref_error(n) rb_backref_error_gen(parser,n) +static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); +#define node_assign(node1, node2) node_assign_gen(parser, node1, node2) + +static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); +#define match_op(node1,node2) match_op_gen(parser, node1, node2) + +static void local_push_gen(struct parser_params*,int); +#define local_push(top) local_push_gen(parser,top) +static void local_pop_gen(struct parser_params*); +#define local_pop() local_pop_gen(parser) +static int local_var_gen(struct parser_params*, ID); +#define local_var(id) local_var_gen(parser, id); +static int arg_var_gen(struct parser_params*, ID); +#define arg_var(id) arg_var_gen(parser, id) +static int local_id_gen(struct parser_params*, ID); +#define local_id(id) local_id_gen(parser, id) +static ID *local_tbl_gen(struct parser_params*); +#define local_tbl() local_tbl_gen(parser) +static ID internal_id_gen(struct parser_params*); +#define internal_id() internal_id_gen(parser) + +static void dyna_push_gen(struct parser_params*); +#define dyna_push() dyna_push_gen(parser) +static void dyna_pop_gen(struct parser_params*); +#define dyna_pop() dyna_pop_gen(parser) +static int dyna_in_block_gen(struct parser_params*); +#define dyna_in_block() dyna_in_block_gen(parser) +#define dyna_var(id) local_var(id) +static int dvar_defined_gen(struct parser_params*,ID); +#define dvar_defined(id) dvar_defined_gen(parser, id) +static int dvar_curr_gen(struct parser_params*,ID); +#define dvar_curr(id) dvar_curr_gen(parser, id) + +static void fixup_nodes(NODE **); + +extern int rb_dvar_defined(ID); +extern int rb_local_defined(ID); +extern int rb_parse_in_eval(void); + +static VALUE reg_compile_gen(struct parser_params*, VALUE, int); +#define reg_compile(str,options) reg_compile_gen(parser, str, options) +static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); +#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options) +static void reg_fragment_check_gen(struct parser_params*, VALUE, int); +#define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options) +static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); +#define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match) +int rb_enc_symname2_p(const char *, int, rb_encoding *); +#else +#define remove_begin(node) (node) +#endif /* !RIPPER */ +static int lvar_defined_gen(struct parser_params*, ID); +#define lvar_defined(id) lvar_defined_gen(parser, id) + +#define RE_OPTION_ONCE (1<<16) +#define RE_OPTION_ENCODING_SHIFT 8 +#define RE_OPTION_ENCODING(e) (((e)&0xff)<>RE_OPTION_ENCODING_SHIFT)&0xff) +#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) +#define RE_OPTION_MASK 0xff +#define RE_OPTION_ARG_ENCODING_NONE 32 + +#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ +#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ +#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) +#define nd_func u1.id +#if SIZEOF_SHORT == 2 +#define nd_term(node) ((signed short)(node)->u2.id) +#else +#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) +#endif +#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) +#define nd_nest u3.cnt + +/****** Ripper *******/ + +#ifdef RIPPER +#define RIPPER_VERSION "0.1.0" + +#include "eventids1.c" +#include "eventids2.c" +static ID ripper_id_gets; + +static VALUE ripper_dispatch0(struct parser_params*,ID); +static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); +static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); +static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); + +#define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) +#define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a) +#define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b) +#define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c) +#define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d) +#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e) + +#define yyparse ripper_yyparse + +static VALUE ripper_intern(const char*); +static VALUE ripper_id2sym(ID); +#ifdef __GNUC__ +#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ + ID2SYM(id) : ripper_id2sym(id)) +#endif + +#define arg_new() dispatch0(args_new) +#define arg_add(l,a) dispatch2(args_add, l, a) +#define arg_prepend(l,a) dispatch2(args_prepend, l, a) +#define arg_add_star(l,a) dispatch2(args_add_star, l, a) +#define arg_add_block(l,b) dispatch2(args_add_block, l, b) +#define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b)) +#define bare_assoc(v) dispatch1(bare_assoc_hash, v) +#define arg_add_assocs(l,b) arg_add(l, bare_assoc(b)) + +#define args2mrhs(a) dispatch1(mrhs_new_from_args, a) +#define mrhs_new() dispatch0(mrhs_new) +#define mrhs_add(l,a) dispatch2(mrhs_add, l, a) +#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a) + +#define mlhs_new() dispatch0(mlhs_new) +#define mlhs_add(l,a) dispatch2(mlhs_add, l, a) +#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a) + +#define params_new(pars, opts, rest, pars2, blk) \ + dispatch5(params, pars, opts, rest, pars2, blk) + +#define blockvar_new(p,v) dispatch2(block_var, p, v) +#define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a) +#define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a) + +#define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a)) +#define method_arg(m,a) dispatch2(method_add_arg,m,a) +#define method_add_block(m,b) dispatch2(method_add_block, m, b) + +#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) + +#define FIXME 0 + +#endif /* RIPPER */ + +#ifndef RIPPER +# define ifndef_ripper(x) x +#else +# define ifndef_ripper(x) +#endif + +#ifndef RIPPER +# define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) +#else +# define rb_warn0(fmt) ripper_warn0(parser, fmt) +# define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a) +# define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a) +# define rb_warning0(fmt) ripper_warning0(parser, fmt) +# define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a) +static void ripper_warn0(struct parser_params*, const char*); +static void ripper_warnI(struct parser_params*, const char*, int); +#if 0 +static void ripper_warnS(struct parser_params*, const char*, const char*); +#endif +static void ripper_warning0(struct parser_params*, const char*); +static void ripper_warningS(struct parser_params*, const char*, const char*); +#endif + +#ifdef RIPPER +static void ripper_compile_error(struct parser_params*, const char *fmt, ...); +# define rb_compile_error ripper_compile_error +# define compile_error ripper_compile_error +# define PARSER_ARG parser, +#else +# define compile_error parser->nerr++,rb_compile_error +# define PARSER_ARG ruby_sourcefile, ruby_sourceline, +#endif + +/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, + for instance). This is too low for Ruby to parse some files, such as + date/format.rb, therefore bump the value up to at least Bison's default. */ +#ifdef OLD_YACC +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif +#endif + +#ifndef RIPPER +static void token_info_push(struct parser_params*, const char *token); +static void token_info_pop(struct parser_params*, const char *token); +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 598 "parse.y" +{ + VALUE val; + NODE *node; + ID id; + int num; +} +/* Line 187 of yacc.c. */ +#line 928 "parse.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 941 "parse.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 3 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 10225 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 149 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 166 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 554 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 961 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 376 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 148, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 147, 123, 2, 2, 2, 121, 116, 2, + 143, 144, 119, 117, 141, 118, 140, 120, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 111, 146, + 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 139, 2, 145, 115, 2, 142, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 137, 114, 138, 124, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 4, 7, 12, 15, 17, 19, 23, + 26, 27, 32, 36, 40, 44, 47, 51, 55, 59, + 63, 67, 68, 74, 79, 83, 87, 91, 98, 104, + 110, 116, 120, 124, 128, 132, 134, 136, 140, 144, + 148, 151, 153, 155, 157, 159, 162, 165, 168, 170, + 175, 180, 181, 187, 190, 194, 199, 205, 210, 216, + 219, 222, 224, 228, 230, 234, 236, 239, 243, 249, + 252, 257, 260, 265, 267, 271, 273, 277, 280, 284, + 286, 290, 292, 297, 301, 305, 309, 313, 316, 318, + 320, 325, 329, 333, 337, 341, 344, 346, 348, 350, + 353, 355, 359, 361, 363, 365, 367, 369, 371, 373, + 375, 377, 379, 380, 385, 387, 389, 391, 393, 395, + 397, 399, 401, 403, 405, 407, 409, 411, 413, 415, + 417, 419, 421, 423, 425, 427, 429, 431, 433, 435, + 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, + 457, 459, 461, 463, 465, 467, 469, 471, 473, 475, + 477, 479, 481, 483, 485, 487, 489, 491, 493, 495, + 497, 499, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519, 521, 523, 525, 529, 535, 539, 545, 552, + 558, 564, 570, 576, 581, 585, 589, 593, 597, 601, + 605, 609, 613, 617, 622, 627, 630, 633, 637, 641, + 645, 649, 653, 657, 661, 665, 669, 673, 677, 681, + 685, 688, 691, 695, 699, 703, 707, 708, 713, 720, + 722, 724, 726, 729, 734, 737, 741, 743, 745, 747, + 749, 751, 754, 757, 762, 764, 765, 768, 771, 774, + 776, 778, 780, 783, 787, 792, 796, 801, 804, 806, + 808, 810, 812, 814, 816, 818, 820, 822, 823, 828, + 829, 834, 838, 842, 845, 849, 853, 855, 860, 864, + 866, 867, 874, 879, 883, 886, 888, 891, 894, 901, + 908, 909, 910, 918, 919, 920, 928, 934, 939, 940, + 941, 951, 952, 959, 960, 961, 970, 971, 977, 978, + 985, 986, 987, 997, 999, 1001, 1003, 1005, 1007, 1009, + 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1029, + 1031, 1033, 1036, 1038, 1040, 1042, 1048, 1050, 1053, 1055, + 1057, 1059, 1063, 1065, 1069, 1071, 1076, 1083, 1087, 1093, + 1096, 1101, 1103, 1107, 1114, 1123, 1128, 1135, 1140, 1143, + 1150, 1153, 1158, 1165, 1168, 1173, 1176, 1181, 1183, 1185, + 1187, 1191, 1193, 1198, 1200, 1203, 1205, 1209, 1211, 1213, + 1214, 1218, 1223, 1225, 1229, 1233, 1234, 1240, 1243, 1248, + 1253, 1256, 1261, 1266, 1270, 1274, 1278, 1281, 1283, 1288, + 1289, 1295, 1296, 1302, 1308, 1310, 1312, 1319, 1321, 1323, + 1325, 1327, 1330, 1332, 1335, 1337, 1339, 1341, 1343, 1345, + 1347, 1349, 1352, 1356, 1360, 1364, 1368, 1372, 1373, 1377, + 1379, 1382, 1386, 1390, 1391, 1395, 1396, 1399, 1400, 1403, + 1405, 1406, 1410, 1411, 1416, 1418, 1420, 1422, 1424, 1427, + 1429, 1431, 1433, 1435, 1439, 1441, 1443, 1446, 1449, 1451, + 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471, + 1473, 1475, 1477, 1479, 1481, 1483, 1484, 1489, 1492, 1496, + 1499, 1506, 1515, 1520, 1527, 1532, 1539, 1542, 1547, 1554, + 1557, 1562, 1565, 1570, 1572, 1573, 1575, 1577, 1579, 1581, + 1583, 1585, 1587, 1591, 1593, 1597, 1601, 1605, 1607, 1611, + 1613, 1617, 1619, 1621, 1624, 1626, 1628, 1630, 1633, 1636, + 1638, 1640, 1641, 1646, 1648, 1651, 1653, 1657, 1661, 1664, + 1666, 1668, 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, + 1686, 1688, 1689, 1691, 1692, 1694, 1697, 1700, 1701, 1703, + 1705, 1707, 1709, 1711, 1714 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 150, 0, -1, -1, 151, 153, -1, 153, 252, 228, + 255, -1, 154, 307, -1, 314, -1, 155, -1, 154, + 313, 155, -1, 1, 155, -1, -1, 45, 177, 156, + 177, -1, 45, 54, 54, -1, 45, 54, 64, -1, + 45, 54, 63, -1, 6, 178, -1, 155, 40, 159, + -1, 155, 41, 159, -1, 155, 42, 159, -1, 155, + 43, 159, -1, 155, 44, 155, -1, -1, 47, 157, + 137, 153, 138, -1, 48, 137, 153, 138, -1, 172, + 109, 160, -1, 165, 109, 160, -1, 279, 87, 160, + -1, 213, 139, 188, 310, 87, 160, -1, 213, 140, + 52, 87, 160, -1, 213, 140, 56, 87, 160, -1, + 213, 85, 52, 87, 160, -1, 280, 87, 160, -1, + 172, 109, 195, -1, 165, 109, 184, -1, 165, 109, + 195, -1, 158, -1, 160, -1, 158, 37, 158, -1, + 158, 38, 158, -1, 39, 308, 158, -1, 123, 160, + -1, 182, -1, 158, -1, 164, -1, 161, -1, 30, + 189, -1, 21, 189, -1, 22, 189, -1, 245, -1, + 245, 140, 304, 190, -1, 245, 85, 304, 190, -1, + -1, 94, 163, 234, 153, 138, -1, 303, 190, -1, + 303, 190, 162, -1, 213, 140, 304, 190, -1, 213, + 140, 304, 190, 162, -1, 213, 85, 304, 190, -1, + 213, 85, 304, 190, 162, -1, 32, 190, -1, 31, + 190, -1, 167, -1, 89, 166, 309, -1, 167, -1, + 89, 166, 309, -1, 169, -1, 169, 168, -1, 169, + 95, 171, -1, 169, 95, 171, 141, 170, -1, 169, + 95, -1, 169, 95, 141, 170, -1, 95, 171, -1, + 95, 171, 141, 170, -1, 95, -1, 95, 141, 170, + -1, 171, -1, 89, 166, 309, -1, 168, 141, -1, + 169, 168, 141, -1, 168, -1, 170, 141, 168, -1, + 277, -1, 213, 139, 188, 310, -1, 213, 140, 52, + -1, 213, 85, 52, -1, 213, 140, 56, -1, 213, + 85, 56, -1, 86, 56, -1, 280, -1, 277, -1, + 213, 139, 188, 310, -1, 213, 140, 52, -1, 213, + 85, 52, -1, 213, 140, 56, -1, 213, 85, 56, + -1, 86, 56, -1, 280, -1, 52, -1, 56, -1, + 86, 173, -1, 173, -1, 213, 85, 173, -1, 52, + -1, 56, -1, 53, -1, 180, -1, 181, -1, 175, + -1, 273, -1, 176, -1, 275, -1, 177, -1, -1, + 178, 141, 179, 177, -1, 114, -1, 115, -1, 116, + -1, 69, -1, 70, -1, 71, -1, 77, -1, 78, + -1, 112, -1, 73, -1, 113, -1, 74, -1, 72, + -1, 83, -1, 84, -1, 117, -1, 118, -1, 119, + -1, 95, -1, 120, -1, 121, -1, 68, -1, 123, + -1, 124, -1, 66, -1, 67, -1, 81, -1, 82, + -1, 142, -1, 49, -1, 50, -1, 51, -1, 47, + -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, + -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, + -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, + -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, + -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, + -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, + -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, + -1, 18, -1, 19, -1, 172, 109, 182, -1, 172, + 109, 182, 44, 182, -1, 279, 87, 182, -1, 279, + 87, 182, 44, 182, -1, 213, 139, 188, 310, 87, + 182, -1, 213, 140, 52, 87, 182, -1, 213, 140, + 56, 87, 182, -1, 213, 85, 52, 87, 182, -1, + 213, 85, 56, 87, 182, -1, 86, 56, 87, 182, + -1, 280, 87, 182, -1, 182, 79, 182, -1, 182, + 80, 182, -1, 182, 117, 182, -1, 182, 118, 182, + -1, 182, 119, 182, -1, 182, 120, 182, -1, 182, + 121, 182, -1, 182, 68, 182, -1, 122, 59, 68, + 182, -1, 122, 60, 68, 182, -1, 66, 182, -1, + 67, 182, -1, 182, 114, 182, -1, 182, 115, 182, + -1, 182, 116, 182, -1, 182, 69, 182, -1, 182, + 112, 182, -1, 182, 73, 182, -1, 182, 113, 182, + -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, + 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, + -1, 182, 78, 182, -1, 123, 182, -1, 124, 182, + -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, + 75, 182, -1, 182, 76, 182, -1, -1, 46, 308, + 183, 182, -1, 182, 110, 182, 308, 111, 182, -1, + 196, -1, 182, -1, 314, -1, 194, 311, -1, 194, + 141, 301, 311, -1, 301, 311, -1, 143, 188, 309, + -1, 314, -1, 186, -1, 314, -1, 189, -1, 164, + -1, 194, 193, -1, 301, 193, -1, 194, 141, 301, + 193, -1, 192, -1, -1, 191, 189, -1, 96, 184, + -1, 141, 192, -1, 141, -1, 314, -1, 184, -1, + 95, 184, -1, 194, 141, 184, -1, 194, 141, 95, + 184, -1, 194, 141, 184, -1, 194, 141, 95, 184, + -1, 95, 184, -1, 256, -1, 257, -1, 260, -1, + 261, -1, 262, -1, 265, -1, 278, -1, 280, -1, + 53, -1, -1, 214, 197, 152, 224, -1, -1, 90, + 158, 198, 309, -1, 89, 153, 144, -1, 213, 85, + 56, -1, 86, 56, -1, 92, 185, 145, -1, 93, + 300, 138, -1, 30, -1, 31, 143, 189, 309, -1, + 31, 143, 309, -1, 31, -1, -1, 46, 308, 143, + 199, 158, 309, -1, 39, 143, 158, 309, -1, 39, + 143, 309, -1, 303, 247, -1, 246, -1, 246, 247, + -1, 97, 239, -1, 215, 159, 225, 153, 227, 224, + -1, 216, 159, 225, 153, 228, 224, -1, -1, -1, + 217, 200, 159, 226, 201, 153, 224, -1, -1, -1, + 218, 202, 159, 226, 203, 153, 224, -1, 219, 159, + 307, 250, 224, -1, 219, 307, 250, 224, -1, -1, + -1, 220, 229, 25, 204, 159, 226, 205, 153, 224, + -1, -1, 221, 174, 281, 206, 152, 224, -1, -1, + -1, 221, 83, 158, 207, 312, 208, 152, 224, -1, + -1, 222, 174, 209, 152, 224, -1, -1, 223, 175, + 210, 283, 152, 224, -1, -1, -1, 223, 298, 306, + 211, 175, 212, 283, 152, 224, -1, 21, -1, 22, + -1, 23, -1, 24, -1, 196, -1, 7, -1, 11, + -1, 12, -1, 18, -1, 19, -1, 16, -1, 20, + -1, 3, -1, 4, -1, 5, -1, 10, -1, 312, + -1, 13, -1, 312, 13, -1, 312, -1, 27, -1, + 228, -1, 14, 159, 225, 153, 227, -1, 314, -1, + 15, 153, -1, 172, -1, 165, -1, 286, -1, 89, + 232, 309, -1, 230, -1, 231, 141, 230, -1, 231, + -1, 231, 141, 95, 286, -1, 231, 141, 95, 286, + 141, 231, -1, 231, 141, 95, -1, 231, 141, 95, + 141, 231, -1, 95, 286, -1, 95, 286, 141, 231, + -1, 95, -1, 95, 141, 231, -1, 288, 141, 291, + 141, 294, 297, -1, 288, 141, 291, 141, 294, 141, + 288, 297, -1, 288, 141, 291, 297, -1, 288, 141, + 291, 141, 288, 297, -1, 288, 141, 294, 297, -1, + 288, 141, -1, 288, 141, 294, 141, 288, 297, -1, + 288, 297, -1, 291, 141, 294, 297, -1, 291, 141, + 294, 141, 288, 297, -1, 291, 297, -1, 291, 141, + 288, 297, -1, 294, 297, -1, 294, 141, 288, 297, + -1, 296, -1, 314, -1, 235, -1, 114, 236, 114, + -1, 76, -1, 114, 233, 236, 114, -1, 314, -1, + 146, 237, -1, 238, -1, 237, 141, 238, -1, 52, + -1, 285, -1, -1, 240, 241, 242, -1, 143, 284, + 236, 309, -1, 284, -1, 107, 153, 138, -1, 29, + 153, 10, -1, -1, 28, 244, 234, 153, 10, -1, + 164, 243, -1, 245, 140, 304, 187, -1, 245, 85, + 304, 187, -1, 303, 186, -1, 213, 140, 304, 187, + -1, 213, 85, 304, 186, -1, 213, 85, 305, -1, + 213, 140, 186, -1, 213, 85, 186, -1, 32, 186, + -1, 32, -1, 213, 139, 188, 310, -1, -1, 137, + 248, 234, 153, 138, -1, -1, 26, 249, 234, 153, + 10, -1, 17, 194, 225, 153, 251, -1, 228, -1, + 250, -1, 8, 253, 254, 225, 153, 252, -1, 314, + -1, 184, -1, 195, -1, 314, -1, 88, 172, -1, + 314, -1, 9, 153, -1, 314, -1, 276, -1, 273, + -1, 275, -1, 258, -1, 62, -1, 259, -1, 258, + 259, -1, 99, 267, 106, -1, 100, 268, 106, -1, + 101, 268, 65, -1, 102, 147, 106, -1, 102, 263, + 106, -1, -1, 263, 264, 147, -1, 269, -1, 264, + 269, -1, 103, 147, 106, -1, 103, 266, 106, -1, + -1, 266, 61, 147, -1, -1, 267, 269, -1, -1, + 268, 269, -1, 61, -1, -1, 105, 270, 272, -1, + -1, 104, 271, 153, 138, -1, 54, -1, 55, -1, + 57, -1, 280, -1, 98, 274, -1, 175, -1, 55, + -1, 54, -1, 57, -1, 98, 268, 106, -1, 59, + -1, 60, -1, 122, 59, -1, 122, 60, -1, 52, + -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, + -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, + -1, 51, -1, 277, -1, 277, -1, 63, -1, 64, + -1, 312, -1, -1, 113, 282, 159, 312, -1, 1, + 312, -1, 143, 284, 309, -1, 284, 312, -1, 288, + 141, 292, 141, 294, 297, -1, 288, 141, 292, 141, + 294, 141, 288, 297, -1, 288, 141, 292, 297, -1, + 288, 141, 292, 141, 288, 297, -1, 288, 141, 294, + 297, -1, 288, 141, 294, 141, 288, 297, -1, 288, + 297, -1, 292, 141, 294, 297, -1, 292, 141, 294, + 141, 288, 297, -1, 292, 297, -1, 292, 141, 288, + 297, -1, 294, 297, -1, 294, 141, 288, 297, -1, + 296, -1, -1, 56, -1, 55, -1, 54, -1, 57, + -1, 285, -1, 52, -1, 286, -1, 89, 232, 309, + -1, 287, -1, 288, 141, 287, -1, 52, 109, 184, + -1, 52, 109, 213, -1, 290, -1, 291, 141, 290, + -1, 289, -1, 292, 141, 289, -1, 119, -1, 95, + -1, 293, 52, -1, 293, -1, 116, -1, 96, -1, + 295, 52, -1, 141, 296, -1, 314, -1, 278, -1, + -1, 143, 299, 158, 309, -1, 314, -1, 301, 311, + -1, 302, -1, 301, 141, 302, -1, 184, 88, 184, + -1, 58, 184, -1, 52, -1, 56, -1, 53, -1, + 52, -1, 56, -1, 53, -1, 180, -1, 52, -1, + 53, -1, 180, -1, 140, -1, 85, -1, -1, 313, + -1, -1, 148, -1, 308, 144, -1, 308, 145, -1, + -1, 148, -1, 141, -1, 146, -1, 148, -1, 312, + -1, 313, 146, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 763, 763, 763, 793, 826, 837, 846, 854, 862, + 868, 868, 876, 884, 895, 905, 913, 922, 931, 944, + 957, 967, 966, 988, 1000, 1009, 1019, 1048, 1069, 1086, + 1103, 1120, 1130, 1139, 1148, 1157, 1160, 1161, 1169, 1177, + 1185, 1193, 1196, 1208, 1209, 1210, 1218, 1226, 1236, 1237, + 1246, 1258, 1257, 1279, 1288, 1300, 1309, 1321, 1330, 1342, + 1351, 1362, 1363, 1373, 1374, 1384, 1392, 1400, 1408, 1416, + 1424, 1432, 1440, 1448, 1456, 1466, 1467, 1477, 1485, 1495, + 1503, 1513, 1521, 1529, 1537, 1545, 1553, 1565, 1575, 1587, + 1595, 1603, 1611, 1619, 1627, 1640, 1653, 1664, 1672, 1675, + 1683, 1691, 1701, 1702, 1703, 1704, 1714, 1726, 1727, 1730, + 1738, 1741, 1749, 1749, 1759, 1760, 1761, 1762, 1763, 1764, + 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, + 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, + 1785, 1786, 1787, 1790, 1790, 1790, 1791, 1791, 1792, 1792, + 1792, 1793, 1793, 1793, 1793, 1794, 1794, 1794, 1794, 1795, + 1795, 1795, 1796, 1796, 1796, 1796, 1797, 1797, 1797, 1797, + 1798, 1798, 1798, 1798, 1799, 1799, 1799, 1799, 1800, 1800, + 1800, 1800, 1801, 1801, 1804, 1813, 1823, 1852, 1883, 1904, + 1921, 1938, 1955, 1966, 1977, 1988, 2002, 2016, 2024, 2032, + 2040, 2048, 2056, 2064, 2073, 2082, 2090, 2098, 2106, 2114, + 2122, 2130, 2138, 2146, 2154, 2162, 2170, 2178, 2186, 2197, + 2205, 2213, 2221, 2229, 2237, 2245, 2253, 2253, 2263, 2273, + 2279, 2291, 2292, 2296, 2304, 2314, 2324, 2325, 2328, 2329, + 2332, 2340, 2348, 2358, 2367, 2376, 2376, 2388, 2398, 2402, + 2406, 2412, 2420, 2428, 2442, 2458, 2472, 2487, 2497, 2498, + 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2514, 2513, 2538, + 2538, 2547, 2555, 2563, 2571, 2584, 2592, 2600, 2608, 2616, + 2624, 2624, 2634, 2642, 2650, 2661, 2662, 2673, 2677, 2689, + 2701, 2701, 2701, 2712, 2712, 2712, 2723, 2734, 2743, 2745, + 2742, 2809, 2808, 2830, 2835, 2829, 2857, 2856, 2878, 2877, + 2904, 2905, 2904, 2929, 2937, 2945, 2953, 2963, 2975, 2982, + 2989, 2996, 3003, 3010, 3017, 3024, 3031, 3038, 3045, 3052, + 3057, 3058, 3065, 3070, 3073, 3074, 3087, 3088, 3098, 3099, + 3102, 3110, 3120, 3128, 3138, 3146, 3154, 3162, 3170, 3178, + 3186, 3197, 3205, 3215, 3223, 3231, 3239, 3247, 3255, 3264, + 3272, 3280, 3288, 3296, 3304, 3312, 3320, 3328, 3338, 3339, + 3345, 3354, 3363, 3374, 3375, 3385, 3392, 3401, 3409, 3415, + 3415, 3437, 3445, 3455, 3459, 3466, 3465, 3486, 3502, 3511, + 3522, 3531, 3541, 3551, 3559, 3570, 3581, 3589, 3597, 3612, + 3611, 3633, 3632, 3653, 3665, 3666, 3669, 3688, 3691, 3699, + 3707, 3710, 3714, 3717, 3725, 3728, 3729, 3737, 3740, 3757, + 3758, 3759, 3769, 3779, 3806, 3848, 3856, 3863, 3870, 3880, + 3888, 3898, 3906, 3913, 3920, 3931, 3938, 3949, 3956, 3966, + 3968, 3967, 3984, 3983, 4005, 4013, 4021, 4029, 4032, 4044, + 4045, 4046, 4047, 4050, 4081, 4082, 4083, 4091, 4101, 4102, + 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, + 4115, 4125, 4135, 4136, 4139, 4148, 4147, 4155, 4167, 4179, + 4185, 4193, 4201, 4209, 4217, 4225, 4233, 4241, 4249, 4257, + 4265, 4273, 4281, 4289, 4298, 4307, 4316, 4325, 4334, 4345, + 4346, 4358, 4366, 4385, 4392, 4405, 4419, 4433, 4441, 4457, + 4465, 4481, 4482, 4485, 4497, 4508, 4509, 4512, 4528, 4532, + 4542, 4552, 4552, 4581, 4582, 4592, 4599, 4609, 4617, 4627, + 4628, 4629, 4632, 4633, 4634, 4635, 4638, 4639, 4640, 4643, + 4648, 4655, 4656, 4659, 4660, 4663, 4666, 4669, 4670, 4671, + 4674, 4675, 4678, 4679, 4683 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "keyword_class", "keyword_module", + "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", + "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", + "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", + "keyword_when", "keyword_while", "keyword_until", "keyword_for", + "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", + "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", + "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", + "keyword_self", "keyword_nil", "keyword_true", "keyword_false", + "keyword_and", "keyword_or", "keyword_not", "modifier_if", + "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", + "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", + "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", + "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", + "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", + "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", + "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", + "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", + "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", + "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", + "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", + "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", + "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", + "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", + "idRespond_to", "idIFUNC", "idCFUNC", "idThrowState", + "id_core_set_method_alias", "id_core_set_variable_alias", + "id_core_undef_method", "id_core_define_method", + "id_core_define_singleton_method", "id_core_set_postexe", "tLAST_TOKEN", + "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", + "' '", "'\\n'", "$accept", "program", "@1", "bodystmt", "compstmt", + "stmts", "stmt", "@2", "@3", "expr", "expr_value", "command_call", + "block_command", "cmd_brace_block", "@4", "command", "mlhs", + "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", + "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem", + "undef_list", "@5", "op", "reswords", "arg", "@6", "arg_value", + "aref_args", "paren_args", "opt_paren_args", "opt_call_args", + "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args", + "mrhs", "primary", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", + "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "primary_value", + "k_begin", "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for", + "k_class", "k_module", "k_def", "k_end", "then", "do", "if_tail", + "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "block_param", + "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", + "lambda", "@24", "f_larglist", "lambda_body", "do_block", "@25", + "block_call", "method_call", "brace_block", "@26", "@27", "case_body", + "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", + "strings", "string", "string1", "xstring", "regexp", "words", + "word_list", "word", "qwords", "qword_list", "string_contents", + "xstring_contents", "string_content", "@28", "@29", "string_dvar", + "symbol", "sym", "dsym", "numeric", "variable", "var_ref", "var_lhs", + "backref", "superclass", "@30", "f_arglist", "f_args", "f_bad_arg", + "f_norm_arg", "f_arg_item", "f_arg", "f_opt", "f_block_opt", + "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg", + "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "@31", + "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3", + "dot_or_colon", "opt_terms", "opt_nl", "rparen", "rbracket", "trailer", + "term", "terms", "none", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, + 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, + 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 123, 125, 91, + 46, 44, 96, 40, 41, 93, 59, 32, 10 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 149, 151, 150, 152, 153, 154, 154, 154, 154, + 156, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 157, 155, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 158, 158, 158, 158, + 158, 158, 159, 160, 160, 160, 160, 160, 161, 161, + 161, 163, 162, 164, 164, 164, 164, 164, 164, 164, + 164, 165, 165, 166, 166, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 168, 168, 169, 169, 170, + 170, 171, 171, 171, 171, 171, 171, 171, 171, 172, + 172, 172, 172, 172, 172, 172, 172, 173, 173, 174, + 174, 174, 175, 175, 175, 175, 175, 176, 176, 177, + 177, 178, 179, 178, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 183, 182, 182, 182, + 184, 185, 185, 185, 185, 186, 187, 187, 188, 188, + 189, 189, 189, 189, 189, 191, 190, 192, 193, 193, + 193, 194, 194, 194, 194, 195, 195, 195, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 197, 196, 198, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 200, 201, 196, 202, 203, 196, 196, 196, 204, 205, + 196, 206, 196, 207, 208, 196, 209, 196, 210, 196, + 211, 212, 196, 196, 196, 196, 196, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 225, 225, 226, 226, 227, 227, 228, 228, 229, 229, + 230, 230, 231, 231, 232, 232, 232, 232, 232, 232, + 232, 232, 232, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 234, 234, + 235, 235, 235, 236, 236, 237, 237, 238, 238, 240, + 239, 241, 241, 242, 242, 244, 243, 245, 245, 245, + 246, 246, 246, 246, 246, 246, 246, 246, 246, 248, + 247, 249, 247, 250, 251, 251, 252, 252, 253, 253, + 253, 254, 254, 255, 255, 256, 256, 256, 257, 258, + 258, 258, 259, 260, 261, 262, 262, 263, 263, 264, + 264, 265, 265, 266, 266, 267, 267, 268, 268, 269, + 270, 269, 271, 269, 272, 272, 272, 272, 273, 274, + 274, 274, 274, 275, 276, 276, 276, 276, 277, 277, + 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + 278, 279, 280, 280, 281, 282, 281, 281, 283, 283, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 285, 285, 285, 285, 286, + 286, 287, 287, 288, 288, 289, 290, 291, 291, 292, + 292, 293, 293, 294, 294, 295, 295, 296, 297, 297, + 298, 299, 298, 300, 300, 301, 301, 302, 302, 303, + 303, 303, 304, 304, 304, 304, 305, 305, 305, 306, + 306, 307, 307, 308, 308, 309, 310, 311, 311, 311, + 312, 312, 313, 313, 314 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 4, 2, 1, 1, 3, 2, + 0, 4, 3, 3, 3, 2, 3, 3, 3, 3, + 3, 0, 5, 4, 3, 3, 3, 6, 5, 5, + 5, 3, 3, 3, 3, 1, 1, 3, 3, 3, + 2, 1, 1, 1, 1, 2, 2, 2, 1, 4, + 4, 0, 5, 2, 3, 4, 5, 4, 5, 2, + 2, 1, 3, 1, 3, 1, 2, 3, 5, 2, + 4, 2, 4, 1, 3, 1, 3, 2, 3, 1, + 3, 1, 4, 3, 3, 3, 3, 2, 1, 1, + 4, 3, 3, 3, 3, 2, 1, 1, 1, 2, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 3, 5, 6, 5, + 5, 5, 5, 4, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 4, 4, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 3, 3, 3, 3, 0, 4, 6, 1, + 1, 1, 2, 4, 2, 3, 1, 1, 1, 1, + 1, 2, 2, 4, 1, 0, 2, 2, 2, 1, + 1, 1, 2, 3, 4, 3, 4, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, + 4, 3, 3, 2, 3, 3, 1, 4, 3, 1, + 0, 6, 4, 3, 2, 1, 2, 2, 6, 6, + 0, 0, 7, 0, 0, 7, 5, 4, 0, 0, + 9, 0, 6, 0, 0, 8, 0, 5, 0, 6, + 0, 0, 9, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, + 1, 3, 1, 3, 1, 4, 6, 3, 5, 2, + 4, 1, 3, 6, 8, 4, 6, 4, 2, 6, + 2, 4, 6, 2, 4, 2, 4, 1, 1, 1, + 3, 1, 4, 1, 2, 1, 3, 1, 1, 0, + 3, 4, 1, 3, 3, 0, 5, 2, 4, 4, + 2, 4, 4, 3, 3, 3, 2, 1, 4, 0, + 5, 0, 5, 5, 1, 1, 6, 1, 1, 1, + 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 2, 3, 3, 3, 3, 3, 0, 3, 1, + 2, 3, 3, 0, 3, 0, 2, 0, 2, 1, + 0, 3, 0, 4, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 4, 2, 3, 2, + 6, 8, 4, 6, 4, 6, 2, 4, 6, 2, + 4, 2, 4, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 3, 3, 3, 1, 3, 1, + 3, 1, 1, 2, 1, 1, 1, 2, 2, 1, + 1, 0, 4, 1, 2, 1, 3, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 1, 0, 1, 2, 2, 0, 1, 1, + 1, 1, 1, 2, 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 2, 0, 0, 1, 0, 325, 326, 327, 0, 318, + 319, 320, 323, 321, 322, 324, 313, 314, 315, 316, + 276, 245, 245, 464, 463, 465, 466, 543, 0, 543, + 21, 0, 468, 467, 469, 458, 531, 460, 459, 461, + 462, 454, 455, 419, 472, 473, 0, 0, 0, 0, + 0, 554, 554, 73, 379, 437, 435, 437, 437, 427, + 433, 0, 0, 0, 3, 541, 7, 35, 36, 44, + 43, 0, 61, 0, 65, 75, 0, 41, 229, 0, + 267, 0, 0, 290, 293, 541, 0, 0, 0, 0, + 48, 285, 258, 259, 418, 420, 260, 261, 262, 263, + 416, 417, 415, 470, 264, 0, 265, 245, 6, 9, + 153, 164, 154, 177, 150, 170, 160, 159, 180, 181, + 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, + 169, 171, 163, 156, 172, 179, 174, 173, 166, 176, + 161, 149, 168, 167, 148, 155, 146, 147, 143, 144, + 145, 102, 104, 103, 138, 139, 135, 117, 118, 119, + 126, 123, 125, 120, 121, 140, 141, 127, 128, 132, + 122, 124, 114, 115, 116, 129, 130, 131, 133, 134, + 136, 137, 142, 107, 109, 111, 15, 105, 106, 108, + 110, 313, 314, 276, 0, 0, 0, 0, 0, 0, + 0, 240, 0, 230, 251, 46, 244, 554, 0, 470, + 0, 265, 554, 525, 47, 45, 543, 60, 0, 554, + 396, 59, 543, 544, 0, 0, 10, 226, 0, 0, + 279, 397, 205, 0, 0, 206, 273, 0, 0, 543, + 63, 269, 0, 547, 547, 231, 0, 0, 547, 523, + 543, 0, 0, 0, 71, 317, 0, 81, 88, 287, + 494, 451, 450, 452, 449, 0, 448, 0, 0, 0, + 0, 0, 0, 0, 456, 457, 40, 220, 221, 550, + 551, 5, 552, 542, 0, 0, 0, 0, 0, 0, + 0, 385, 387, 0, 77, 0, 69, 66, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 554, 0, 0, 42, + 0, 0, 0, 0, 541, 0, 542, 0, 339, 338, + 0, 0, 470, 265, 97, 98, 0, 0, 100, 0, + 0, 470, 265, 306, 173, 166, 176, 161, 143, 144, + 145, 102, 103, 521, 308, 520, 0, 0, 0, 401, + 399, 286, 421, 0, 0, 390, 53, 284, 112, 528, + 273, 252, 247, 0, 0, 249, 241, 250, 0, 554, + 0, 0, 0, 249, 242, 543, 0, 278, 246, 543, + 239, 238, 543, 283, 39, 12, 14, 13, 0, 280, + 0, 0, 0, 0, 0, 0, 543, 271, 62, 543, + 274, 549, 548, 232, 549, 234, 275, 524, 0, 87, + 456, 457, 79, 74, 0, 0, 554, 0, 500, 497, + 496, 495, 498, 0, 512, 516, 515, 511, 494, 0, + 382, 499, 501, 503, 554, 509, 554, 514, 554, 0, + 493, 439, 442, 440, 453, 438, 422, 436, 423, 424, + 425, 426, 0, 429, 431, 0, 432, 0, 0, 553, + 8, 16, 17, 18, 19, 20, 37, 38, 554, 0, + 25, 33, 0, 34, 543, 0, 67, 78, 24, 184, + 251, 32, 202, 210, 215, 216, 217, 212, 214, 224, + 225, 218, 219, 195, 196, 222, 223, 543, 211, 213, + 207, 208, 209, 197, 198, 199, 200, 201, 532, 537, + 533, 538, 395, 245, 393, 543, 532, 534, 533, 535, + 394, 245, 0, 554, 330, 0, 329, 0, 0, 0, + 0, 0, 0, 273, 0, 554, 0, 298, 303, 97, + 98, 99, 0, 475, 301, 474, 0, 554, 0, 0, + 0, 494, 540, 539, 310, 532, 533, 245, 245, 554, + 554, 26, 186, 31, 194, 51, 54, 0, 184, 527, + 0, 253, 248, 554, 536, 533, 543, 532, 533, 526, + 277, 545, 235, 282, 11, 0, 227, 0, 23, 0, + 554, 193, 64, 270, 547, 0, 72, 84, 86, 543, + 532, 533, 0, 500, 0, 351, 342, 344, 543, 340, + 554, 0, 0, 380, 0, 486, 519, 0, 489, 513, + 0, 491, 517, 0, 0, 428, 430, 434, 203, 204, + 371, 554, 0, 369, 368, 257, 0, 76, 70, 0, + 0, 0, 0, 0, 392, 57, 0, 398, 0, 0, + 237, 391, 55, 236, 328, 268, 554, 554, 407, 554, + 331, 554, 333, 291, 332, 294, 0, 0, 297, 536, + 272, 543, 532, 533, 0, 0, 477, 0, 0, 97, + 98, 101, 543, 0, 543, 494, 0, 0, 0, 389, + 50, 388, 49, 0, 0, 0, 554, 113, 254, 243, + 0, 398, 0, 0, 543, 22, 233, 80, 82, 505, + 543, 0, 349, 0, 502, 0, 543, 373, 0, 0, + 504, 554, 554, 518, 554, 510, 554, 554, 0, 444, + 445, 446, 441, 447, 500, 554, 0, 554, 507, 554, + 554, 367, 0, 0, 255, 68, 185, 0, 30, 191, + 192, 58, 546, 0, 28, 189, 29, 190, 56, 408, + 409, 554, 410, 0, 554, 336, 0, 0, 334, 0, + 0, 0, 296, 0, 0, 398, 0, 304, 0, 0, + 398, 307, 522, 543, 0, 479, 311, 0, 0, 187, + 0, 0, 281, 341, 352, 0, 347, 343, 377, 374, + 375, 378, 381, 384, 383, 0, 482, 0, 484, 0, + 490, 0, 487, 492, 443, 0, 0, 370, 358, 360, + 0, 363, 0, 365, 386, 256, 228, 27, 188, 0, + 0, 412, 337, 0, 4, 414, 0, 288, 289, 0, + 0, 253, 554, 299, 0, 476, 302, 478, 309, 494, + 402, 400, 0, 0, 350, 0, 345, 0, 554, 554, + 554, 554, 0, 506, 372, 554, 554, 554, 508, 554, + 554, 0, 411, 0, 89, 96, 0, 413, 0, 292, + 295, 404, 405, 403, 0, 0, 0, 52, 348, 0, + 376, 483, 0, 480, 485, 488, 273, 0, 0, 355, + 0, 357, 364, 0, 361, 366, 95, 0, 554, 0, + 554, 554, 0, 305, 0, 346, 554, 536, 272, 554, + 554, 554, 554, 536, 94, 543, 532, 533, 406, 335, + 300, 312, 481, 356, 0, 353, 359, 362, 398, 554, + 354 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 2, 542, 543, 65, 66, 408, 228, 67, + 330, 68, 69, 586, 716, 70, 71, 239, 72, 73, + 74, 433, 75, 202, 348, 349, 183, 184, 185, 186, + 587, 539, 188, 77, 410, 204, 242, 532, 671, 399, + 400, 217, 218, 206, 386, 207, 493, 78, 328, 419, + 605, 332, 790, 333, 791, 694, 904, 698, 695, 864, + 569, 571, 708, 869, 233, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 675, 545, 683, 787, 788, + 341, 626, 627, 628, 755, 652, 653, 736, 819, 820, + 259, 260, 449, 633, 292, 488, 90, 91, 377, 580, + 579, 552, 903, 677, 781, 850, 854, 92, 93, 94, + 95, 96, 97, 98, 271, 472, 99, 273, 267, 265, + 465, 644, 643, 752, 100, 266, 101, 102, 209, 104, + 210, 211, 564, 697, 706, 707, 451, 452, 453, 454, + 455, 758, 759, 456, 457, 458, 459, 743, 635, 366, + 570, 247, 212, 213, 234, 609, 534, 574, 281, 396, + 397, 667, 423, 546, 336, 108 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -747 +static const yytype_int16 yypact[] = +{ + -747, 103, 2364, -747, 6711, -747, -747, -747, 6222, -747, + -747, -747, -747, -747, -747, -747, 6820, 6820, -747, -747, + 6820, 3057, 2631, -747, -747, -747, -747, 282, 6082, -24, + -747, 64, -747, -747, -747, 5317, 2773, -747, -747, 5445, + -747, -747, -747, -747, -747, -747, 8019, 8019, 74, 4131, + 8128, 7038, 7365, 6487, -747, 5942, -747, -747, -747, 142, + 154, 84, 8237, 8019, -747, 473, 925, 71, -747, -747, + 238, 234, -747, 205, 8346, -747, 268, 2472, 31, 46, + -747, 8128, 8128, -747, -747, 4792, 8451, 8556, 8661, 5189, + 14, 70, -747, -747, 290, -747, -747, -747, -747, -747, + -747, -747, -747, 26, -747, 366, 355, 210, -747, 925, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -747, 321, -747, -747, -747, + -747, -747, -747, -747, 328, 8019, 433, 4262, 8019, 8019, + 8019, -747, 403, 2472, 440, -747, -747, 418, 300, 13, + 457, 24, 437, -747, -747, -747, 4670, -747, 6820, 6820, + -747, -747, 4923, -747, 8128, 438, -747, 436, 449, 4393, + 452, 463, -747, 346, 210, 546, 451, 4131, 474, -24, + 525, 71, 477, 165, 276, -747, 440, 498, 276, -747, + -24, 582, 250, 8766, 501, -747, 374, 384, 394, -747, + 933, -747, -747, -747, -747, 595, -747, 659, 673, 76, + 552, 721, 553, 43, 584, 596, -747, -747, -747, -747, + -747, -747, -747, 5045, 8128, 8128, 8128, 8128, 6711, 8128, + 8128, -747, -747, 7474, -747, 4131, 6599, 524, 7474, 8019, + 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, + 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, 8019, + 8019, 8019, 8019, 8019, 8019, 9033, 6820, 9111, 3431, 71, + 119, 119, 8128, 8128, 473, 652, 528, 614, -747, -747, + 424, 654, 56, 92, 335, 344, 8128, 131, -747, 42, + 444, -747, -747, -747, 33, 35, 53, 217, 227, 235, + 265, 298, 333, -747, -747, -747, 358, 10047, 10047, -747, + -747, -747, -747, 8237, 8237, -747, 587, -747, -747, -747, + 305, -747, -747, 8019, 8019, 6929, -747, -747, 9189, 6820, + 9267, 8019, 8019, 7147, -747, -24, 540, -747, -747, -24, + -747, -747, 242, -747, -747, -747, -747, -747, 6222, -747, + 8019, 4393, 555, 9189, 9267, 8019, -24, -747, 556, -24, + -747, 7256, -747, -747, 7365, -747, -747, -747, 436, 470, + -747, -747, -747, 557, 8766, 9345, 6820, 9423, 585, -747, + -747, -747, -747, 843, -747, -747, -747, -747, 835, 49, + -747, -747, -747, -747, 564, -747, 565, 658, 572, 662, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, 21, -747, -747, 569, -747, 8019, 8019, -747, + 925, -747, -747, -747, -747, -747, -747, -747, 38, 8019, + -747, 577, 578, -747, -24, 8766, 581, -747, -747, 2225, + -747, -747, 546, 2143, 2143, 2143, 2143, 1115, 1115, 2614, + 2024, 2143, 2143, 1738, 1738, 718, 718, 1856, 1115, 1115, + 619, 619, 692, 274, 274, 546, 546, 546, 3199, 5687, + 3285, 5801, -747, 463, -747, -24, 460, -747, 471, -747, + -747, 2915, 715, 734, -747, 3577, 713, 3869, 175, 175, + 652, 7583, 715, 96, 9501, 6820, 9579, -747, 71, -747, + 470, -747, 473, -747, -747, -747, 9657, 6820, 9735, 3431, + 8128, 1108, -747, -747, -747, -747, -747, 996, 996, 38, + 38, -747, 2242, -747, 2472, -747, -747, 6222, 10104, -747, + 8019, 440, -747, 437, 5573, 2489, -24, 367, 390, -747, + -747, -747, -747, -747, -747, 8128, 2472, 605, -747, 463, + 463, 2472, -7, -747, 276, 8766, 557, 500, 267, -24, + 48, 50, 8019, -747, 843, 592, -747, 603, -24, -747, + 600, 4539, 4393, -747, 835, -747, -747, 835, -747, -747, + 634, -747, -747, 4393, 865, -747, -747, -747, 546, 546, + -747, 411, 4539, -747, -747, 607, 7692, -747, 557, 8766, + 8019, 644, 8237, 8019, -747, 587, 612, 544, 8237, 8237, + -747, -747, 587, -747, -747, -747, 7801, 744, -747, 413, + -747, 744, -747, -747, -747, -747, 715, 208, -747, 62, + 85, -24, 117, 120, 8128, 473, -747, 8128, 3431, 500, + 267, -747, -24, 715, 242, 835, 3431, 473, 6362, -747, + -747, -747, -747, 4539, 4393, 8019, 38, -747, -747, -747, + 8019, 432, 8019, 8019, 242, -747, -747, -747, 465, -747, + -24, 788, 620, 854, -747, 885, -24, -747, 756, 631, + -747, 629, 633, -747, 639, -747, 642, 639, 657, -747, + -747, -747, -747, -747, 681, 600, 683, 665, -747, 666, + 676, -747, 789, 8019, 680, 557, 2472, 8019, -747, 2472, + 2472, -747, -747, 8237, -747, 2472, -747, 2472, -747, 577, + -747, 710, -747, 4000, 814, -747, 8128, 715, -747, 715, + 4539, 4539, -747, 7910, 3723, 133, 175, -747, 473, 715, + -747, -747, -747, -24, 715, -747, -747, 822, 696, 2472, + 4393, 8019, -747, -747, 700, 788, 621, -747, -747, 705, + -747, -747, -747, -747, -747, 835, -747, 634, -747, 634, + -747, 634, -747, -747, -747, 8871, 736, -747, 1125, -747, + 1125, -747, 634, -747, -747, 711, 2472, -747, 2472, 8976, + 119, -747, -747, 4539, -747, -747, 119, -747, -747, 715, + 715, -747, 505, -747, 3431, -747, -747, -747, -747, 1108, + -747, -747, 717, 788, 700, 788, 716, 885, 639, 720, + 639, 639, 807, 487, -747, 725, 726, 639, -747, 728, + 639, 815, -747, 522, 384, 394, 3431, -747, 3577, -747, + -747, -747, -747, -747, 4539, 715, 3431, -747, 700, 788, + -747, -747, 634, -747, -747, -747, -747, 9813, 1125, -747, + 634, -747, -747, 634, -747, -747, 470, 9891, 6820, 9969, + 734, 413, 715, -747, 715, 700, 639, 727, 730, 639, + 738, 639, 639, 212, 267, -24, 152, 187, -747, -747, + -747, -747, -747, -747, 634, -747, -747, -747, 193, 639, + -747 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -747, -747, -747, -537, 976, -747, 20, -747, -747, -14, + 30, -45, -747, -133, -747, 22, 772, -149, 9, -69, + -747, -400, -4, 1540, -303, 793, -54, -747, -12, -747, + -747, 0, -747, 802, -747, -48, -747, -16, -29, -313, + 81, 55, -747, -245, -192, -41, -272, -34, -747, -747, + -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -2, -747, -747, -747, -747, -747, + -747, -747, -747, -747, -747, -31, -319, -519, -49, -607, + -747, -664, -641, 260, -747, -487, -747, -532, -747, 8, + -747, -747, -747, -747, -747, -747, -747, -747, 795, -747, + -747, -528, -747, -42, -747, -747, -747, -747, -747, -747, + 799, -747, -747, -747, -747, -747, -747, -747, -747, 513, + -208, -747, -747, -747, -5, -747, 29, -747, 1251, 816, + 747, 1369, -747, -747, 47, -235, -673, -393, -569, -40, + -576, -746, 69, 278, -747, -474, -747, -249, 959, -747, + -747, -747, -6, -288, 162, -261, -747, -747, -56, -20, + 17, -563, -217, -44, 850, 752 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -555 +static const yytype_int16 yytable[] = +{ + 79, 264, 79, 189, 246, 297, 220, 224, 187, 227, + 243, 460, 547, 535, 208, 208, 226, 276, 208, 255, + 394, 282, 686, 189, 109, 450, 501, 425, 187, 335, + 685, 427, 703, 721, 616, 364, 241, 190, 201, 201, + 255, 282, 201, 562, 561, 244, 248, 79, 208, 254, + 629, 256, 255, 255, 255, 187, 728, 190, 240, 467, + 208, 745, 821, 473, 533, 740, 541, 329, 329, 817, + 784, 329, 256, -83, 789, -85, 596, 221, 631, 208, + 208, -89, 461, 208, 340, 350, 350, -92, 416, 187, + 814, 375, 713, 714, 888, 658, 369, 205, 214, 367, + -471, 215, -62, 3, 475, 599, 577, 578, 289, 290, + -94, 392, 331, -471, 650, 334, -317, -96, -464, 756, + -463, -95, -89, 619, 223, 462, 463, 533, 795, 541, + 236, 325, 544, -96, -76, -89, 599, 461, -465, 800, + 592, 469, -91, 274, 275, -93, 494, 379, 592, 476, + 381, 382, 651, 610, 368, 563, 632, -83, -90, -85, + 742, 799, 376, 746, 107, -91, 107, -81, 645, 804, + -317, -317, 888, -464, 874, -463, 610, 760, 107, 107, + 462, 463, 107, 559, 432, 326, 327, 560, 279, -83, + 280, -85, -83, -465, -85, 79, -83, -81, -85, 460, + -93, 229, 682, -84, 821, -532, -90, 370, 402, 817, + 404, 107, 107, 630, 208, 220, 208, 208, 375, 255, + 208, 544, 208, 836, 107, -92, -86, 79, -533, 810, + 428, 629, 732, -88, 908, 79, 369, -87, 201, 403, + 201, 201, 691, 107, 107, 491, 240, 107, 490, 745, + 500, 256, 492, 498, 702, 901, 418, 492, -83, 765, + 740, -85, 255, 701, 646, 279, 291, 280, 935, 740, + 329, 329, 329, 329, -82, 486, 487, 863, 550, 289, + 290, 79, 208, 208, 208, 208, 79, 208, 208, 270, + 282, 208, 496, 79, 256, 610, 208, 395, -91, 398, + -91, 272, -466, 480, 240, 565, 421, 610, 485, 430, + 431, 540, -468, 422, 481, 482, 483, 484, 329, 329, + -467, 279, 460, 280, 208, 531, 79, 905, 581, 583, + 208, 208, 558, -93, 902, -93, 589, 591, 629, -90, + 629, -90, 299, 293, 208, 246, 294, 370, 201, 793, + -469, 879, -272, 219, 279, -532, 280, -466, -92, 107, + -92, -529, 548, 549, 886, 432, 889, -468, 794, 934, + -530, 208, 208, 591, 540, -467, 246, 298, 107, 593, + 107, 107, 958, -458, 107, 388, 107, 208, 531, 56, + 223, 107, 415, 322, 323, 324, 604, 726, 540, 107, + 255, 719, 761, 189, 780, -469, -272, -272, 187, 79, + -533, 201, 600, 531, -95, 614, 602, 424, -461, 603, + -458, 540, 629, 876, 422, 222, 432, 786, 783, -461, + 223, 413, 256, 612, 208, 531, 613, 190, -458, 389, + 390, 655, 374, 572, 940, 107, 107, 107, 107, 107, + 107, 107, 107, 373, 722, 107, 460, 107, 201, 435, + 107, 255, 378, 754, -96, 439, 440, 441, 442, -470, + 803, 222, -529, -461, -458, -458, -91, 723, -529, -265, + 629, -530, 629, -461, -461, 389, 414, -530, 107, 380, + 107, -398, 405, 256, 107, 107, -88, 661, 573, -93, + 443, 406, 407, 500, 684, 684, 444, 445, 107, 554, + 687, 657, 383, 436, 437, 666, 629, 664, 696, 811, + 783, 688, 551, -470, -470, 670, -536, 446, 384, 566, + 447, 896, 771, -265, -265, 107, 107, 898, 415, 778, + 540, -90, 718, 79, 391, 79, 727, 668, 709, 711, + -398, 107, 540, 208, 531, -273, 704, 735, 669, 385, + -95, 670, 670, 555, 556, 208, 531, 79, 208, -91, + 268, 269, 917, 107, 729, 717, 666, 201, 393, 409, + -93, 255, 189, 567, 568, -536, 411, 187, 665, 201, + 432, 724, -87, 664, 670, 216, 672, 744, 107, 666, + 747, -83, -398, 208, -398, -398, 219, 927, 764, -273, + -273, 757, -85, 256, 299, 945, 190, 768, 417, 279, + 460, 280, 420, 774, 776, 255, 567, 568, 779, 79, + 79, 773, 710, 712, -61, 492, 426, -536, 429, -536, + -536, 79, 434, -532, 623, 734, 439, 440, 441, 442, + 79, 797, 477, -90, 806, 792, 461, 256, 470, 474, + 208, 928, 929, 805, 478, 497, 208, 208, 610, 551, + 553, 666, 801, 623, 479, 439, 440, 441, 442, 557, + 329, 585, 666, 329, 601, -82, 623, 299, 439, 440, + 441, 442, 208, 608, 622, 208, 79, -76, 615, 462, + 463, 464, 312, 313, 79, 634, 637, 107, 187, 107, + 639, 79, 79, 640, 642, 845, 647, 107, -251, 656, + 461, 802, 659, 443, 796, 674, 680, 798, 847, 107, + 445, 107, 107, 731, 461, 319, 320, 321, 322, 323, + 324, 812, 676, 725, 733, 861, 735, 813, -252, 105, + 446, 105, 684, 822, 865, 767, 857, 772, 858, 783, + 299, 815, 875, 462, 463, 466, 823, 107, 866, 824, + 825, 208, 329, 868, 827, 312, 313, 462, 463, 468, + 829, 79, 461, 831, 208, 878, 299, 880, 79, 79, + 835, 881, 79, 107, 107, 834, 105, 837, 849, 844, + 887, 255, 890, 245, 249, 107, 838, 840, 79, 320, + 321, 322, 323, 324, 107, 255, 856, 842, 203, 203, + 867, -253, 203, 853, 107, 462, 463, 471, 899, 900, + 107, 107, 870, 883, 871, 320, 321, 322, 323, 324, + 623, 873, 439, 440, 441, 442, 877, 893, 232, 235, + 884, 79, -254, 203, 203, 907, 107, 909, 338, 107, + 107, 912, 79, 916, 277, 278, 918, 920, 107, 923, + -532, 926, 936, -533, 933, 107, 107, 624, 939, 954, + 941, 353, 949, 942, 730, 910, 371, 438, 948, 439, + 440, 441, 442, 372, 79, 623, 79, 439, 440, 441, + 442, 950, 79, 951, 79, 365, 623, 885, 439, 440, + 441, 442, 741, 540, 959, 283, 906, 531, 0, 749, + 750, 0, 751, 0, 443, 666, 208, 531, 44, 45, + 444, 445, 624, 0, 0, 107, 0, 818, 625, 439, + 440, 441, 442, 624, 105, 107, 0, 0, 107, 816, + 201, 446, 107, 107, 447, 0, 107, 0, 0, 387, + 0, 0, 0, 0, 387, 284, 285, 286, 287, 288, + 0, 401, 107, 0, 0, 0, 105, 0, 64, 0, + 0, 0, 0, 0, 105, 438, 0, 439, 440, 441, + 442, 0, 0, 0, 0, 0, -554, 203, 0, 0, + 203, 203, 277, 0, -554, -554, -554, 0, 0, -554, + -554, -554, 0, -554, 0, 107, 0, 0, 203, 0, + 203, 203, 443, -554, 0, 238, 107, 0, 444, 445, + 105, 0, 0, -554, -554, 105, -554, -554, -554, -554, + -554, 0, 105, 0, 0, 0, 0, 0, 0, 446, + 0, 0, 447, 0, 0, 0, 0, 0, 107, 0, + 107, 0, 0, 0, 0, 0, 107, 0, 107, 0, + 0, 0, 0, 0, 0, 105, 448, 0, 401, 0, + 0, -554, 0, 0, 0, 0, 0, 0, 0, 0, + 107, 0, 0, 0, 0, 203, 0, 0, 0, 0, + 499, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 0, 203, 0, + 0, 0, 0, 0, -554, 0, -554, 0, 0, 219, + -554, 401, -554, 0, -554, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, + 438, 0, 439, 440, 441, 442, 0, 0, 0, 0, + 0, 0, 0, 238, 0, 582, 584, 754, 0, 439, + 440, 441, 442, 299, 0, 588, 203, 203, 401, 0, + 0, 203, 0, 582, 584, 203, 0, 443, 312, 313, + 0, 0, 0, 444, 445, 412, 636, 0, 636, 0, + 636, 0, 606, 238, 443, 0, 0, 611, 0, 0, + 444, 445, 0, 203, 446, 0, 203, 447, 0, 317, + 318, 319, 320, 321, 322, 323, 324, 0, 203, 0, + 654, 446, 0, 0, 447, 0, 0, 0, 0, 0, + 0, 705, 0, 103, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 238, 0, 0, 0, 0, 0, 0, 0, 648, + 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 203, 105, 673, 105, 678, 0, 0, 0, 0, + 103, 0, 0, 0, 257, 0, 0, 401, 0, 0, + 0, 0, 0, 0, 0, 0, 105, 0, 0, 401, + 0, 0, 0, 0, 0, 257, 0, 0, 0, 673, + 673, 654, 654, 0, 0, 0, 0, 342, 351, 351, + 351, 0, 0, 0, 0, 387, 0, 0, 0, 0, + 0, 0, 0, 203, 0, 0, 0, 203, 0, 0, + 0, 0, 673, 0, 0, 0, 0, 0, 0, 203, + 0, 106, 0, 106, 0, 0, 0, 0, 105, 105, + 0, 0, 737, 0, 0, 0, 0, 607, 0, 0, + 105, 0, 203, 0, 0, 0, 0, 0, 0, 105, + 0, 0, 0, 737, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 638, 0, 641, 106, 0, + 0, 0, 258, 0, 203, 0, 0, 0, 782, 785, + 0, 785, 0, 785, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 258, 0, 105, 0, 0, 103, 0, + 0, 0, 0, 105, 0, 343, 352, 352, 203, 0, + 105, 105, 766, 0, 769, 770, 0, 0, 654, 0, + 775, 777, 0, 0, 0, 0, 0, 0, 203, 0, + 103, 0, 0, 0, 0, 0, 0, 0, 103, 0, + 0, 0, 0, 636, 636, 0, 636, 0, 636, 636, + 0, 0, 0, 0, 257, 0, 0, 737, 0, 636, + 0, 636, 636, 0, 0, 0, 0, 809, 0, 0, + 0, 679, 769, 681, 775, 777, 0, 0, 0, 0, + 105, 0, 0, 851, 103, 0, 855, 105, 105, 103, + 0, 105, 76, 0, 76, 0, 103, 257, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, + 0, 0, 0, 0, 0, 203, 106, 0, 0, 846, + 0, 0, 0, 0, 0, 848, 0, 0, 0, 103, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, + 0, 0, 0, 0, 0, 203, 0, 0, 106, 0, + 105, 0, 0, 0, 0, 0, 106, 738, 739, 0, + 0, 105, 0, 848, 785, 0, 0, 0, 0, 748, + 0, 0, 258, 0, 0, 0, 339, 0, 762, 0, + 636, 636, 636, 636, 0, 0, 0, 636, 636, 636, + 0, 636, 636, 105, 0, 105, 0, 0, 0, 0, + 0, 105, 106, 105, 0, 0, 0, 106, 0, 0, + 0, 0, 103, 0, 106, 258, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 401, 0, 678, 785, 0, 257, 0, 0, 636, 807, + 808, 636, 636, 636, 636, 0, 0, 106, 0, 0, + 826, 828, 0, 830, 0, 832, 833, 0, 0, 0, + 0, 636, 0, 0, 0, 0, 839, 0, 841, 843, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 203, 0, 0, 0, 0, 0, 0, 76, 0, 0, + 0, 0, 0, 0, 0, 0, 257, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 852, + 0, 0, 0, 0, 0, 0, 859, 860, 0, 76, + 862, 0, 0, 0, 0, 0, 0, 76, 0, 0, + 106, 0, 0, 0, 0, 0, 872, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 103, 0, 103, 0, + 0, 0, 0, 258, 0, 0, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 309, -555, -555, 0, + 103, 312, 313, 76, 0, 0, 0, 0, 76, 897, + 0, 0, 0, 0, 0, 76, 0, 911, 913, 914, + 915, 0, 0, 0, 919, 921, 922, 0, 924, 925, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 0, 0, 0, 0, 258, 0, 257, 0, 76, 0, + 0, 0, 930, 0, 931, 0, 0, 0, 0, 0, + 932, 0, 103, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 103, 952, 0, 0, 953, 955, + 956, 957, 0, 103, 0, 0, 0, 0, 0, 0, + 257, 0, 0, 0, 106, 0, 106, 0, 960, 0, + 0, 0, 0, 0, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 0, 106, 312, + 313, 0, 0, 0, 0, 0, 0, 0, 0, 103, + 0, 76, 0, 0, 0, 0, 0, 103, 0, 0, + 0, 0, 0, 0, 103, 103, 314, 0, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, + 0, 0, 0, 0, 258, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 106, 106, 0, 0, 223, 0, 0, 0, 0, 0, + 0, 0, 106, 753, 0, 0, 0, 0, 0, 0, + 0, 106, 0, 0, 0, 0, 0, 0, 258, 0, + 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, + 0, 103, 103, 0, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 103, 0, 0, 0, 0, 0, 106, 0, 0, + 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, + 0, 0, 106, 106, 0, 76, 351, 76, 0, 0, + 0, 0, 299, 300, 301, 302, 303, 304, 305, 306, + 894, 308, 309, 0, 103, 0, 0, 312, 313, 76, + 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 103, 0, 103, + 0, 0, 106, 0, 0, 103, 0, 103, 0, 106, + 106, 0, 0, 106, 0, 0, 0, 0, 0, 0, + 0, 76, 76, 0, 0, 0, 0, 0, 0, 106, + 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, + 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 352, 0, 0, 0, 0, 0, + 0, 299, -555, -555, -555, -555, 304, 305, 895, 0, + -555, -555, 106, 0, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 106, 0, 0, 0, 0, 76, 0, + 0, 0, 0, 0, 0, 0, 76, 0, 0, 0, + 0, 0, 0, 76, 76, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 106, 0, 106, 0, 660, + 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 715, 0, 0, 0, + 0, 0, 0, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 0, 0, 312, 313, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 76, 0, 312, 313, 0, 0, 0, + 76, 76, 0, 0, 76, 314, 0, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, + 76, 0, 314, 0, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, -554, 4, -230, 5, 6, 7, + 8, 9, 0, 0, 0, 10, 11, 0, 0, 0, + 12, 0, 13, 14, 15, 16, 17, 18, 19, 892, + 0, 0, 0, 76, 20, 21, 22, 23, 24, 25, + 26, 0, 0, 27, 76, 0, 0, 0, 0, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, + 46, 47, 0, 0, 0, 0, 76, 0, 76, 0, + 0, 0, 0, 0, 76, 0, 76, 0, 0, 0, + 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, + 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 61, 62, 63, -272, + 0, 0, 0, 0, 0, 0, 0, -272, -272, -272, + 0, 0, -272, -272, -272, 0, -272, 0, 0, 0, + -554, 0, -554, 0, 0, 0, -272, -272, -272, 0, + 0, 0, 0, 0, 0, 0, -272, -272, 0, -272, + -272, -272, -272, -272, 0, 0, 0, 0, 0, 0, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 0, 0, 312, 313, -272, -272, -272, + -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, + 0, 0, -272, -272, -272, 0, 663, -272, 0, 0, + 0, 0, 314, -272, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 0, 0, -272, 0, -94, -272, + -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, + -272, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -272, -272, -272, + -272, -397, 0, -272, -272, -272, 0, -272, 0, -397, + -397, -397, 0, 0, -397, -397, -397, 0, -397, 0, + 0, 0, 0, 0, 0, 0, 0, -397, -397, -397, + 0, 0, 0, 0, 0, 0, 0, 0, -397, -397, + 0, -397, -397, -397, -397, -397, 0, 0, 0, 0, + 0, 0, 299, 300, 301, 302, 303, 304, 305, 0, + 0, 308, 309, 0, 0, 0, 0, 312, 313, -397, + -397, -397, -397, -397, -397, -397, -397, -397, -397, -397, + -397, -397, 0, 0, -397, -397, -397, 0, 0, -397, + 0, 0, 0, 0, 0, -397, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, + 0, -397, 0, -397, -397, -397, -397, -397, -397, -397, + -397, -397, -397, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -397, -397, + -397, -397, -397, -266, 219, -397, -397, -397, 0, -397, + 0, -266, -266, -266, 0, 0, -266, -266, -266, 0, + -266, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -266, -266, -266, 0, 0, 0, 0, 0, 0, 0, + -266, -266, 0, -266, -266, -266, -266, -266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -266, -266, -266, -266, -266, -266, -266, -266, -266, + -266, -266, -266, -266, 0, 0, -266, -266, -266, 0, + 0, -266, 0, 0, 0, 0, 0, -266, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -266, 0, 0, -266, -266, -266, -266, -266, -266, -266, + -266, -266, -266, -266, -266, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -266, -266, -266, -266, -554, 0, -266, -266, -266, + 0, -266, 0, -554, -554, -554, 0, 0, -554, -554, + -554, 0, -554, 0, 0, 0, 0, 0, 0, 0, + 0, -554, -554, -554, 0, 0, 0, 0, 0, 0, + 0, 0, -554, -554, 0, -554, -554, -554, -554, -554, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -554, -554, -554, -554, -554, -554, -554, + -554, -554, -554, -554, -554, -554, 0, 0, -554, -554, + -554, 0, 0, -554, 0, 0, 0, 0, 0, -554, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -554, 0, -554, -554, -554, + -554, -554, -554, -554, -554, -554, -554, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -554, -554, -554, -554, -554, -279, 219, -554, + -554, -554, 0, -554, 0, -279, -279, -279, 0, 0, + -279, -279, -279, 0, -279, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -279, -279, 0, 0, 0, 0, + 0, 0, 0, 0, -279, -279, 0, -279, -279, -279, + -279, -279, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -279, -279, -279, -279, -279, + -279, -279, -279, -279, -279, -279, -279, -279, 0, 0, + -279, -279, -279, 0, 0, -279, 0, 0, 0, 0, + 0, -279, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -279, 0, -279, + -279, -279, -279, -279, -279, -279, -279, -279, -279, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -279, -279, -279, -279, -536, + 216, -279, -279, -279, 0, -279, 0, -536, -536, -536, + 0, 0, 0, -536, -536, 0, -536, 0, 0, 0, + 0, 0, 0, 0, 0, -536, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -536, -536, 0, -536, + -536, -536, -536, -536, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -536, -536, -536, + -536, -536, -536, -536, -536, -536, -536, -536, -536, -536, + 0, 0, -536, -536, -536, -272, 662, 0, 0, 0, + 0, 0, 0, -272, -272, -272, 0, 0, 0, -272, + -272, 0, -272, 0, 0, 0, 0, 0, -92, -536, + 0, -536, -536, -536, -536, -536, -536, -536, -536, -536, + -536, 0, -272, -272, 0, -272, -272, -272, -272, -272, + 0, 0, 0, 0, 0, 0, -536, -536, -536, -536, + -84, 0, 0, -536, 0, -536, 0, -536, 0, 0, + 0, 0, 0, -272, -272, -272, -272, -272, -272, -272, + -272, -272, -272, -272, -272, -272, 0, 0, -272, -272, + -272, 0, 663, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -94, -272, 0, -272, -272, -272, + -272, -272, -272, -272, -272, -272, -272, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -272, -272, -272, -86, 0, 0, -272, + 0, -272, 4, -272, 5, 6, 7, 8, 9, -554, + -554, -554, 10, 11, 0, 0, -554, 12, 0, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 61, 62, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -554, 4, -554, + 5, 6, 7, 8, 9, 0, 0, -554, 10, 11, + 0, -554, -554, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, + 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, + 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, + 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -554, 4, -554, 5, 6, 7, 8, + 9, 0, 0, -554, 10, 11, 0, 0, -554, 12, + -554, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, + 4, -554, 5, 6, 7, 8, 9, 0, 0, -554, + 10, 11, 0, 0, -554, 12, 0, 13, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, + 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 5, 6, 7, 8, 9, 0, -554, + -554, 10, 11, 0, 0, -554, 12, -554, 13, 14, + 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, + 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, + 0, 0, 0, 0, 0, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, + 50, 0, 51, 52, 0, 53, 0, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 62, 63, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 5, 6, 7, 8, 9, 0, + 0, 0, 10, 11, 0, 0, -554, 12, -554, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 237, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 61, 62, 63, 0, 0, 0, 0, + 0, 0, 0, 4, 0, 5, 6, 7, 8, 9, + 0, 0, 0, 10, 11, -554, 0, -554, 12, -554, + 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, + 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, + 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 5, 6, 7, 8, + 9, 0, 0, 0, 10, 11, -554, 0, -554, 12, + -554, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -554, 0, 0, 0, 0, 0, 0, 0, -554, + 4, -554, 5, 6, 7, 8, 9, 0, 0, -554, + 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, + 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, + 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, + 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 0, 0, -554, 12, -554, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 21, 22, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 61, 200, 63, 5, 6, 7, 0, 9, + 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, + 13, 14, 15, 16, 17, 18, 19, 0, 223, 0, + 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, + 0, 197, 50, 0, 51, 52, 0, 0, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, + 9, 0, 0, 0, 10, 11, 0, 0, 279, 12, + 280, 13, 14, 15, 16, 17, 18, 19, 0, 0, + 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, + 0, 0, 27, 0, 0, 0, 0, 0, 0, 29, + 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, + 0, 0, 197, 50, 0, 51, 52, 0, 0, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 61, 62, 63, 5, 6, + 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, + 0, 12, 0, 13, 14, 15, 16, 17, 18, 19, + 0, 223, 0, 0, 0, 20, 21, 22, 23, 24, + 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, + 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, + 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 479, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 134, + 135, 136, 354, 355, 356, 357, 141, 142, 143, 0, + 0, 0, 0, 0, 144, 145, 146, 147, 358, 359, + 360, 361, 152, 37, 38, 362, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 0, + -529, -529, -529, 0, -529, 0, 0, 0, -529, -529, + 0, 182, 363, -529, 0, -529, -529, -529, -529, -529, + -529, -529, 0, -529, 0, 0, 0, -529, -529, -529, + -529, -529, -529, -529, 0, 0, -529, 0, 0, 0, + 0, 0, 0, -529, 0, 0, -529, -529, -529, -529, + -529, -529, -529, -529, -529, -529, -529, -529, 0, -529, + -529, -529, 0, -529, -529, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -529, 0, 0, -529, -529, 0, -529, + -529, 0, -529, -529, -529, -529, -529, -529, -529, -529, + -529, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -529, + -529, -529, 0, 0, 0, 0, 0, 0, -530, -530, + -530, 0, -530, 0, -529, 0, -530, -530, 0, 0, + -529, -530, 0, -530, -530, -530, -530, -530, -530, -530, + 0, -530, 0, 0, 0, -530, -530, -530, -530, -530, + -530, -530, 0, 0, -530, 0, 0, 0, 0, 0, + 0, -530, 0, 0, -530, -530, -530, -530, -530, -530, + -530, -530, -530, -530, -530, -530, 0, -530, -530, -530, + 0, -530, -530, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -530, 0, 0, -530, -530, 0, -530, -530, 0, + -530, -530, -530, -530, -530, -530, -530, -530, -530, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -530, -530, -530, + 0, 0, 0, 0, 0, 0, -532, -532, -532, 0, + -532, 0, -530, 0, -532, -532, 0, 0, -530, -532, + 0, -532, -532, -532, -532, -532, -532, -532, 0, 0, + 0, 0, 0, -532, -532, -532, -532, -532, -532, -532, + 0, 0, -532, 0, 0, 0, 0, 0, 0, -532, + 0, 0, -532, -532, -532, -532, -532, -532, -532, -532, + -532, -532, -532, -532, 0, -532, -532, -532, 0, -532, + -532, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -532, + 720, 0, -532, -532, 0, -532, -532, 0, -532, -532, + -532, -532, -532, -532, -532, -532, -532, 0, 0, 0, + 0, 0, -92, 0, 0, 0, 0, 0, 0, 0, + -534, -534, -534, 0, -534, -532, -532, -532, -534, -534, + 0, 0, 0, -534, 0, -534, -534, -534, -534, -534, + -534, -534, 0, 0, 0, 0, -532, -534, -534, -534, + -534, -534, -534, -534, 0, 0, -534, 0, 0, 0, + 0, 0, 0, -534, 0, 0, -534, -534, -534, -534, + -534, -534, -534, -534, -534, -534, -534, -534, 0, -534, + -534, -534, 0, -534, -534, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -534, 0, 0, -534, -534, 0, -534, + -534, 0, -534, -534, -534, -534, -534, -534, -534, -534, + -534, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -535, -535, -535, 0, -535, -534, + -534, -534, -535, -535, 0, 0, 0, -535, 0, -535, + -535, -535, -535, -535, -535, -535, 0, 0, 0, 0, + -534, -535, -535, -535, -535, -535, -535, -535, 0, 0, + -535, 0, 0, 0, 0, 0, 0, -535, 0, 0, + -535, -535, -535, -535, -535, -535, -535, -535, -535, -535, + -535, -535, 0, -535, -535, -535, 0, -535, -535, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -535, 0, 0, + -535, -535, 0, -535, -535, 0, -535, -535, -535, -535, + -535, -535, -535, -535, -535, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -535, -535, -535, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -535, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 261, 262, 153, 263, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 225, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 0, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 182, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 0, 0, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 163, + 164, 0, 0, 165, 166, 167, 168, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 169, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 180, 181, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 0, 0, 0, 12, 182, 13, 14, 15, 191, 192, + 18, 19, 0, 0, 0, 0, 0, 193, 230, 231, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 250, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 251, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 252, + 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 253, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 250, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 251, 0, 0, 197, 50, + 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, + 0, 252, 10, 11, 0, 0, 0, 12, 0, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 495, 20, 21, 22, 23, 24, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 21, 22, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, + 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 0, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, + 0, 51, 52, 0, 590, 199, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, + 11, 61, 200, 63, 12, 0, 13, 14, 15, 191, + 192, 18, 19, 0, 0, 0, 0, 0, 193, 230, + 231, 23, 24, 25, 26, 0, 0, 194, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, + 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, + 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, + 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 61, 200, 63, 12, 0, 13, 14, 15, 191, 192, + 18, 19, 0, 0, 0, 0, 0, 193, 230, 231, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, + 200, 63, 12, 0, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, + 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, + 0, 590, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, + 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, + 63, 12, 0, 13, 14, 15, 191, 192, 18, 19, + 0, 0, 0, 0, 0, 193, 230, 231, 23, 24, + 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, + 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, + 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, + 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, + 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, + 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, + 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, + 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, + 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, + 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 196, 0, 0, 197, 50, 0, 51, 52, 0, 489, + 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, + 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, + 0, 13, 14, 15, 191, 192, 18, 19, 0, 0, + 0, 0, 0, 193, 230, 231, 23, 24, 25, 26, + 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, + 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, + 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, + 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, + 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, + 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, + 13, 14, 15, 191, 192, 18, 19, 0, 0, 0, + 0, 0, 193, 230, 231, 23, 24, 25, 26, 0, + 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, + 0, 197, 50, 0, 51, 52, 0, 763, 0, 54, + 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, + 197, 50, 0, 51, 52, 0, 489, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, + 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, + 15, 191, 192, 18, 19, 0, 0, 0, 0, 0, + 193, 230, 231, 23, 24, 25, 26, 0, 0, 194, + 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, + 50, 0, 51, 52, 0, 590, 0, 54, 55, 56, + 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, + 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, + 191, 192, 18, 19, 0, 0, 0, 0, 0, 193, + 230, 231, 23, 24, 25, 26, 0, 0, 194, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, + 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, + 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, + 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, + 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, + 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, + 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, + 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, + 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, + 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, + 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, + 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, + 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, + 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, + 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, + 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, + 200, 63, 12, 0, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 251, 0, 0, 295, 50, 0, 51, 52, + 0, 296, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 337, 0, 0, + 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 344, 36, + 37, 38, 345, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, + 0, 0, 347, 0, 0, 197, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 344, 36, 37, 38, 345, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 347, 0, 0, + 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 251, 0, 0, 295, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, + 0, 0, 10, 11, 0, 0, 0, 12, 252, 13, + 14, 15, 191, 192, 18, 19, 0, 0, 0, 0, + 0, 193, 230, 231, 23, 24, 25, 26, 0, 0, + 194, 0, 0, 0, 0, 0, 0, 250, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, + 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 882, 0, 0, + 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, + 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, + 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, + 0, 0, 12, 252, 13, 14, 15, 191, 192, 18, + 19, 0, 0, 0, 0, 0, 193, 230, 231, 23, + 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, + 0, 0, 250, 0, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, + 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 891, 0, 0, 197, 50, 0, 51, 52, + 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, + 0, 0, 0, 0, 0, 528, 529, 0, 0, 530, + 0, 0, 0, 0, 0, 0, 0, 0, 252, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 536, 537, 0, 0, 538, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 594, 529, 0, 0, 595, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 597, + 537, 0, 0, 598, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 0, 0, 0, 0, 0, 617, 529, 0, + 0, 618, 0, 0, 0, 0, 0, 0, 0, 182, + 219, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 0, 0, 163, 164, 0, 0, 165, 166, 167, 168, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 0, 0, 0, 0, 0, 620, 537, 0, 0, 621, + 0, 0, 0, 0, 0, 0, 0, 182, 219, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 689, 529, 0, 0, 690, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 692, 537, 0, 0, 693, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 699, + 529, 0, 0, 700, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 0, 0, 0, 0, 0, 575, 537, 0, + 0, 576, 0, 0, 0, 0, 0, 0, 0, 182, + 219, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 0, 0, 163, 164, 0, 0, 165, 166, 167, 168, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 180, 181, + 0, 0, 0, 0, 0, 937, 529, 0, 0, 938, + 0, 0, 0, 0, 0, 0, 0, 182, 219, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 0, 0, + 163, 164, 0, 0, 165, 166, 167, 168, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 0, 180, 181, 0, 0, + 0, 0, 0, 943, 529, 0, 0, 944, 0, 0, + 0, 0, 0, 0, 0, 182, 219, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 0, 0, 163, 164, + 0, 0, 165, 166, 167, 168, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 0, 180, 181, 0, 0, 0, 0, + 0, 946, 537, 0, 0, 947, 0, 0, 0, 0, + 0, 0, 0, 182, 219, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 0, 0, 163, 164, 0, 0, + 165, 166, 167, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 169, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 180, 181, 0, 0, 0, 0, 0, 575, + 537, 0, 0, 576, 0, 0, 0, 0, 0, 0, + 0, 182, 219, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 0, 0, 163, 164, 0, 0, 165, 166, + 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 169, 0, 0, 0, 0, 0, 660, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, + 180, 181, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 0, 0, 312, 313, 182, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 314, 0, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324 +}; + +static const yytype_int16 yycheck[] = +{ + 2, 55, 4, 8, 52, 74, 22, 27, 8, 29, + 51, 260, 331, 326, 16, 17, 28, 62, 20, 53, + 212, 65, 550, 28, 4, 260, 298, 244, 28, 85, + 549, 248, 569, 596, 434, 89, 50, 8, 16, 17, + 74, 85, 20, 1, 347, 51, 52, 49, 50, 53, + 443, 53, 86, 87, 88, 55, 619, 28, 49, 267, + 62, 637, 735, 271, 325, 634, 327, 81, 82, 733, + 677, 85, 74, 25, 681, 25, 389, 22, 29, 81, + 82, 25, 61, 85, 86, 87, 88, 25, 237, 89, + 731, 107, 579, 580, 840, 495, 26, 16, 17, 85, + 87, 20, 109, 0, 61, 393, 367, 368, 37, 38, + 25, 87, 82, 87, 76, 85, 85, 25, 85, 651, + 85, 25, 109, 436, 148, 104, 105, 388, 691, 390, + 56, 85, 13, 109, 141, 109, 424, 61, 85, 702, + 385, 65, 25, 59, 60, 25, 295, 195, 393, 106, + 198, 199, 114, 414, 140, 113, 107, 109, 25, 109, + 634, 698, 107, 637, 2, 13, 4, 141, 147, 706, + 139, 140, 918, 140, 815, 140, 437, 651, 16, 17, + 104, 105, 20, 52, 253, 139, 140, 56, 146, 141, + 148, 141, 144, 140, 144, 197, 148, 141, 148, 448, + 13, 137, 27, 141, 877, 143, 13, 137, 222, 873, + 224, 49, 50, 448, 216, 231, 218, 219, 234, 253, + 222, 13, 224, 755, 62, 13, 141, 229, 143, 716, + 250, 624, 625, 141, 875, 237, 26, 141, 216, 222, + 218, 219, 555, 81, 82, 293, 237, 85, 293, 825, + 298, 253, 293, 298, 567, 862, 239, 298, 141, 659, + 829, 141, 296, 566, 472, 146, 28, 148, 909, 838, + 284, 285, 286, 287, 141, 289, 290, 796, 334, 37, + 38, 283, 284, 285, 286, 287, 288, 289, 290, 147, + 334, 293, 296, 295, 296, 556, 298, 216, 146, 218, + 148, 147, 85, 283, 295, 349, 141, 568, 288, 59, + 60, 327, 85, 148, 284, 285, 286, 287, 332, 333, + 85, 146, 571, 148, 326, 325, 328, 864, 373, 374, + 332, 333, 346, 146, 862, 148, 384, 385, 731, 146, + 733, 148, 68, 109, 346, 393, 141, 137, 326, 141, + 85, 825, 85, 143, 146, 143, 148, 140, 146, 197, + 148, 26, 332, 333, 838, 434, 840, 140, 687, 906, + 26, 373, 374, 421, 390, 140, 424, 109, 216, 385, + 218, 219, 945, 85, 222, 85, 224, 389, 388, 99, + 148, 229, 87, 119, 120, 121, 408, 614, 414, 237, + 434, 593, 651, 408, 676, 140, 139, 140, 408, 411, + 143, 389, 395, 413, 109, 421, 399, 141, 85, 402, + 85, 437, 815, 816, 148, 143, 495, 14, 15, 85, + 148, 85, 434, 416, 436, 435, 419, 408, 140, 139, + 140, 489, 87, 85, 918, 283, 284, 285, 286, 287, + 288, 289, 290, 87, 87, 293, 705, 295, 436, 85, + 298, 495, 141, 52, 109, 54, 55, 56, 57, 85, + 705, 143, 137, 140, 139, 140, 109, 87, 143, 85, + 873, 137, 875, 139, 140, 139, 140, 143, 326, 56, + 328, 26, 54, 495, 332, 333, 141, 517, 140, 109, + 89, 63, 64, 551, 548, 549, 95, 96, 346, 85, + 551, 494, 109, 139, 140, 535, 909, 533, 562, 87, + 15, 552, 17, 139, 140, 541, 26, 116, 88, 85, + 119, 850, 665, 139, 140, 373, 374, 856, 87, 672, + 556, 109, 590, 545, 87, 547, 615, 87, 577, 578, + 85, 389, 568, 555, 554, 85, 570, 146, 87, 141, + 109, 577, 578, 139, 140, 567, 566, 569, 570, 109, + 57, 58, 85, 411, 622, 587, 596, 555, 141, 143, + 109, 615, 587, 139, 140, 85, 137, 587, 533, 567, + 659, 605, 141, 609, 610, 143, 541, 637, 436, 619, + 640, 141, 137, 605, 139, 140, 143, 85, 656, 139, + 140, 651, 141, 615, 68, 928, 587, 662, 144, 146, + 869, 148, 145, 668, 669, 659, 139, 140, 676, 631, + 632, 87, 577, 578, 109, 676, 138, 137, 56, 139, + 140, 643, 141, 143, 52, 628, 54, 55, 56, 57, + 652, 695, 68, 109, 708, 686, 61, 659, 106, 106, + 662, 139, 140, 707, 68, 141, 668, 669, 929, 17, + 56, 691, 703, 52, 146, 54, 55, 56, 57, 25, + 694, 94, 702, 697, 144, 141, 52, 68, 54, 55, + 56, 57, 694, 138, 109, 697, 698, 141, 141, 104, + 105, 106, 83, 84, 706, 141, 141, 545, 708, 547, + 52, 713, 714, 141, 52, 763, 147, 555, 141, 141, + 61, 704, 141, 89, 694, 10, 13, 697, 773, 567, + 96, 569, 570, 141, 61, 116, 117, 118, 119, 120, + 121, 724, 8, 138, 141, 793, 146, 730, 141, 2, + 116, 4, 796, 736, 798, 111, 787, 145, 789, 15, + 68, 141, 141, 104, 105, 106, 10, 605, 799, 138, + 141, 773, 786, 804, 141, 83, 84, 104, 105, 106, + 141, 783, 61, 141, 786, 825, 68, 827, 790, 791, + 109, 831, 794, 631, 632, 138, 49, 114, 88, 10, + 840, 835, 842, 51, 52, 643, 141, 141, 810, 117, + 118, 119, 120, 121, 652, 849, 786, 141, 16, 17, + 803, 141, 20, 9, 662, 104, 105, 106, 859, 860, + 668, 669, 10, 835, 138, 117, 118, 119, 120, 121, + 52, 141, 54, 55, 56, 57, 141, 849, 46, 47, + 114, 853, 141, 51, 52, 138, 694, 141, 86, 697, + 698, 141, 864, 56, 62, 63, 141, 141, 706, 141, + 143, 56, 912, 143, 905, 713, 714, 89, 918, 141, + 920, 88, 931, 923, 624, 877, 91, 52, 930, 54, + 55, 56, 57, 94, 896, 52, 898, 54, 55, 56, + 57, 932, 904, 934, 906, 89, 52, 838, 54, 55, + 56, 57, 634, 929, 954, 65, 869, 917, -1, 54, + 55, -1, 57, -1, 89, 945, 928, 927, 63, 64, + 95, 96, 89, -1, -1, 773, -1, 52, 95, 54, + 55, 56, 57, 89, 197, 783, -1, -1, 786, 95, + 928, 116, 790, 791, 119, -1, 794, -1, -1, 207, + -1, -1, -1, -1, 212, 40, 41, 42, 43, 44, + -1, 219, 810, -1, -1, -1, 229, -1, 2, -1, + -1, -1, -1, -1, 237, 52, -1, 54, 55, 56, + 57, -1, -1, -1, -1, -1, 0, 195, -1, -1, + 198, 199, 200, -1, 8, 9, 10, -1, -1, 13, + 14, 15, -1, 17, -1, 853, -1, -1, 216, -1, + 218, 219, 89, 27, -1, 49, 864, -1, 95, 96, + 283, -1, -1, 37, 38, 288, 40, 41, 42, 43, + 44, -1, 295, -1, -1, -1, -1, -1, -1, 116, + -1, -1, 119, -1, -1, -1, -1, -1, 896, -1, + 898, -1, -1, -1, -1, -1, 904, -1, 906, -1, + -1, -1, -1, -1, -1, 328, 143, -1, 326, -1, + -1, 85, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, -1, -1, -1, 293, -1, -1, -1, -1, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, -1, 326, -1, + -1, -1, -1, -1, 138, -1, 140, -1, -1, 143, + 144, 389, 146, -1, 148, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 411, -1, + 52, -1, 54, 55, 56, 57, -1, -1, -1, -1, + -1, -1, -1, 197, -1, 373, 374, 52, -1, 54, + 55, 56, 57, 68, -1, 383, 384, 385, 436, -1, + -1, 389, -1, 391, 392, 393, -1, 89, 83, 84, + -1, -1, -1, 95, 96, 229, 454, -1, 456, -1, + 458, -1, 410, 237, 89, -1, -1, 415, -1, -1, + 95, 96, -1, 421, 116, -1, 424, 119, -1, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 436, -1, + 488, 116, -1, -1, 119, -1, -1, -1, -1, -1, + -1, 143, -1, 2, -1, 4, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 295, -1, -1, -1, -1, -1, -1, -1, 477, + 478, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 489, 545, 541, 547, 543, -1, -1, -1, -1, + 49, -1, -1, -1, 53, -1, -1, 555, -1, -1, + -1, -1, -1, -1, -1, -1, 569, -1, -1, 567, + -1, -1, -1, -1, -1, 74, -1, -1, -1, 577, + 578, 579, 580, -1, -1, -1, -1, 86, 87, 88, + 89, -1, -1, -1, -1, 593, -1, -1, -1, -1, + -1, -1, -1, 551, -1, -1, -1, 555, -1, -1, + -1, -1, 610, -1, -1, -1, -1, -1, -1, 567, + -1, 2, -1, 4, -1, -1, -1, -1, 631, 632, + -1, -1, 630, -1, -1, -1, -1, 411, -1, -1, + 643, -1, 590, -1, -1, -1, -1, -1, -1, 652, + -1, -1, -1, 651, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 456, -1, 458, 49, -1, + -1, -1, 53, -1, 622, -1, -1, -1, 676, 677, + -1, 679, -1, 681, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 74, -1, 698, -1, -1, 197, -1, + -1, -1, -1, 706, -1, 86, 87, 88, 656, -1, + 713, 714, 660, -1, 662, 663, -1, -1, 716, -1, + 668, 669, -1, -1, -1, -1, -1, -1, 676, -1, + 229, -1, -1, -1, -1, -1, -1, -1, 237, -1, + -1, -1, -1, 741, 742, -1, 744, -1, 746, 747, + -1, -1, -1, -1, 253, -1, -1, 755, -1, 757, + -1, 759, 760, -1, -1, -1, -1, 715, -1, -1, + -1, 545, 720, 547, 722, 723, -1, -1, -1, -1, + 783, -1, -1, 781, 283, -1, 784, 790, 791, 288, + -1, 794, 2, -1, 4, -1, 295, 296, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 810, -1, -1, + -1, -1, -1, -1, -1, 763, 197, -1, -1, 767, + -1, -1, -1, -1, -1, 773, -1, -1, -1, 328, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, + -1, -1, -1, -1, -1, 793, -1, -1, 229, -1, + 853, -1, -1, -1, -1, -1, 237, 631, 632, -1, + -1, 864, -1, 811, 862, -1, -1, -1, -1, 643, + -1, -1, 253, -1, -1, -1, 86, -1, 652, -1, + 878, 879, 880, 881, -1, -1, -1, 885, 886, 887, + -1, 889, 890, 896, -1, 898, -1, -1, -1, -1, + -1, 904, 283, 906, -1, -1, -1, 288, -1, -1, + -1, -1, 411, -1, 295, 296, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, 930, 931, -1, 434, -1, -1, 936, 713, + 714, 939, 940, 941, 942, -1, -1, 328, -1, -1, + 741, 742, -1, 744, -1, 746, 747, -1, -1, -1, + -1, 959, -1, -1, -1, -1, 757, -1, 759, 760, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 928, -1, -1, -1, -1, -1, -1, 197, -1, -1, + -1, -1, -1, -1, -1, -1, 495, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 783, + -1, -1, -1, -1, -1, -1, 790, 791, -1, 229, + 794, -1, -1, -1, -1, -1, -1, 237, -1, -1, + 411, -1, -1, -1, -1, -1, 810, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 545, -1, 547, -1, + -1, -1, -1, 434, -1, -1, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, + 569, 83, 84, 283, -1, -1, -1, -1, 288, 853, + -1, -1, -1, -1, -1, 295, -1, 878, 879, 880, + 881, -1, -1, -1, 885, 886, 887, -1, 889, 890, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -1, -1, -1, -1, 495, -1, 615, -1, 328, -1, + -1, -1, 896, -1, 898, -1, -1, -1, -1, -1, + 904, -1, 631, 632, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 643, 936, -1, -1, 939, 940, + 941, 942, -1, 652, -1, -1, -1, -1, -1, -1, + 659, -1, -1, -1, 545, -1, 547, -1, 959, -1, + -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, -1, 569, 83, + 84, -1, -1, -1, -1, -1, -1, -1, -1, 698, + -1, 411, -1, -1, -1, -1, -1, 706, -1, -1, + -1, -1, -1, -1, 713, 714, 110, -1, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, + -1, -1, -1, -1, 615, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 631, 632, -1, -1, 148, -1, -1, -1, -1, -1, + -1, -1, 643, 644, -1, -1, -1, -1, -1, -1, + -1, 652, -1, -1, -1, -1, -1, -1, 659, -1, + -1, -1, -1, -1, 783, -1, -1, -1, -1, -1, + -1, 790, 791, -1, -1, 794, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 810, -1, -1, -1, -1, -1, 698, -1, -1, + -1, -1, -1, -1, -1, 706, -1, -1, -1, -1, + -1, -1, 713, 714, -1, 545, 835, 547, -1, -1, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 849, 77, 78, -1, 853, -1, -1, 83, 84, 569, + -1, -1, -1, -1, -1, 864, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, -1, 896, -1, 898, + -1, -1, 783, -1, -1, 904, -1, 906, -1, 790, + 791, -1, -1, 794, -1, -1, -1, -1, -1, -1, + -1, 631, 632, -1, -1, -1, -1, -1, -1, 810, + -1, -1, -1, 643, -1, -1, -1, -1, -1, -1, + -1, -1, 652, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 835, -1, -1, -1, -1, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 849, -1, + 77, 78, 853, -1, -1, -1, 83, 84, -1, -1, + -1, -1, -1, 864, -1, -1, -1, -1, 698, -1, + -1, -1, -1, -1, -1, -1, 706, -1, -1, -1, + -1, -1, -1, 713, 714, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 896, -1, 898, -1, 44, + -1, -1, -1, 904, -1, 906, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 783, -1, 83, 84, -1, -1, -1, + 790, 791, -1, -1, 794, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + 810, -1, 110, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 0, 1, 141, 3, 4, 5, + 6, 7, -1, -1, -1, 11, 12, -1, -1, -1, + 16, -1, 18, 19, 20, 21, 22, 23, 24, 849, + -1, -1, -1, 853, 30, 31, 32, 33, 34, 35, + 36, -1, -1, 39, 864, -1, -1, -1, -1, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, + 66, 67, -1, -1, -1, -1, 896, -1, 898, -1, + -1, -1, -1, -1, 904, -1, 906, -1, -1, -1, + 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, + -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 122, 123, 124, 0, + -1, -1, -1, -1, -1, -1, -1, 8, 9, 10, + -1, -1, 13, 14, 15, -1, 17, -1, -1, -1, + 146, -1, 148, -1, -1, -1, 27, 28, 29, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, 40, + 41, 42, 43, 44, -1, -1, -1, -1, -1, -1, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, -1, -1, 83, 84, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, -1, 83, 84, 85, -1, 87, 88, -1, -1, + -1, -1, 110, 94, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, -1, 107, -1, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 138, 139, 140, + 141, 0, -1, 144, 145, 146, -1, 148, -1, 8, + 9, 10, -1, -1, 13, 14, 15, -1, 17, -1, + -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, + -1, -1, -1, -1, -1, -1, -1, -1, 37, 38, + -1, 40, 41, 42, 43, 44, -1, -1, -1, -1, + -1, -1, 68, 69, 70, 71, 72, 73, 74, -1, + -1, 77, 78, -1, -1, -1, -1, 83, 84, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, -1, -1, 83, 84, 85, -1, -1, 88, + -1, -1, -1, -1, -1, 94, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, + -1, 110, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 137, 138, + 139, 140, 141, 0, 143, 144, 145, 146, -1, 148, + -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, + 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, + -1, 88, -1, -1, -1, -1, -1, 94, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 107, -1, -1, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 138, 139, 140, 141, 0, -1, 144, 145, 146, + -1, 148, -1, 8, 9, 10, -1, -1, 13, 14, + 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, + -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, + -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 137, 138, 139, 140, 141, 0, 143, 144, + 145, 146, -1, 148, -1, 8, 9, 10, -1, -1, + 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, + -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, + 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, + -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 138, 139, 140, 141, 0, + 143, 144, 145, 146, -1, 148, -1, 8, 9, 10, + -1, -1, -1, 14, 15, -1, 17, -1, -1, -1, + -1, -1, -1, -1, -1, 26, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 37, 38, -1, 40, + 41, 42, 43, 44, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + -1, -1, 83, 84, 85, 0, 87, -1, -1, -1, + -1, -1, -1, 8, 9, 10, -1, -1, -1, 14, + 15, -1, 17, -1, -1, -1, -1, -1, 109, 110, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 37, 38, -1, 40, 41, 42, 43, 44, + -1, -1, -1, -1, -1, -1, 137, 138, 139, 140, + 141, -1, -1, 144, -1, 146, -1, 148, -1, -1, + -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, + 85, -1, 87, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 109, 110, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 138, 139, 140, 141, -1, -1, 144, + -1, 146, 1, 148, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, -1, -1, 15, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 146, 1, 148, + 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, + -1, 14, 15, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, + 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 146, 1, 148, 3, 4, 5, 6, + 7, -1, -1, 10, 11, 12, -1, -1, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 146, + 1, 148, 3, 4, 5, 6, 7, -1, -1, 10, + 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, + -1, 1, -1, 3, 4, 5, 6, 7, -1, 9, + 10, 11, 12, -1, -1, 146, 16, 148, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 122, 123, 124, -1, -1, -1, -1, -1, + -1, -1, 1, -1, 3, 4, 5, 6, 7, -1, + -1, -1, 11, 12, -1, -1, 146, 16, 148, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, + -1, -1, -1, 11, 12, 144, -1, 146, 16, 148, + 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, + -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, + 7, -1, -1, -1, 11, 12, 144, -1, 146, 16, + 148, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 1, 148, 3, 4, 5, 6, 7, -1, -1, 10, + 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, -1, -1, 146, 16, 148, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 122, 123, 124, 3, 4, 5, -1, 7, + -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, + 18, 19, 20, 21, 22, 23, 24, -1, 148, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, + -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, -1, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, -1, -1, 11, 12, -1, -1, 146, 16, + 148, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 122, 123, 124, 3, 4, + 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, + -1, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, 148, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 146, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, + -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + -1, 142, 143, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, 26, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, + 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, + 5, -1, 7, -1, 137, -1, 11, 12, -1, -1, + 143, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, 137, -1, 11, 12, -1, -1, 143, 16, + -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + 87, -1, 89, 90, -1, 92, 93, -1, 95, 96, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, 109, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, + -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, 143, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, -1, 7, 122, + 123, 124, 11, 12, -1, -1, -1, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + 143, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 122, 123, 124, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 143, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 142, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, + 48, 49, 50, 51, 52, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, + 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + -1, -1, -1, 16, 142, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, 122, + 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, 141, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, + -1, 122, 11, 12, -1, -1, -1, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + 141, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, + 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, + 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, + 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, + 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, + -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, + 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, + 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, + 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, + 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, + 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, + 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, + 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, + -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, + -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, + -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, + -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, + 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, + -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, + 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, + 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, + 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, + 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, + -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, + 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, + -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, + -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, + 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, + -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, + 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, + -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, + -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, + 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, + -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, + -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, + -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, + -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, + 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, + 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, + 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, + -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, + -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, + -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, + 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, + -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, + 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, + 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, + 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, + -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, + 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, + 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, + 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, + 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, + 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, + 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, + -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, + 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, + 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, + 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, + -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, + 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, + 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, + 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, + 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, + 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, + -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, + 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, + -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, -1, 122, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, -1, -1, -1, -1, -1, 52, 53, -1, + -1, 56, -1, -1, -1, -1, -1, -1, -1, 142, + 143, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, 142, 143, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, -1, -1, -1, -1, -1, 52, 53, -1, + -1, 56, -1, -1, -1, -1, -1, -1, -1, 142, + 143, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, + -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, 142, 143, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, + -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, 142, 143, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, + -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, + -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 142, 143, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, + 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, -1, 123, 124, -1, -1, -1, -1, -1, 52, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 142, 143, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, + 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 95, -1, -1, -1, -1, -1, 44, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, + 123, 124, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, -1, -1, 83, 84, 142, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 150, 151, 0, 1, 3, 4, 5, 6, 7, + 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, + 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, + 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, + 103, 122, 123, 124, 153, 154, 155, 158, 160, 161, + 164, 165, 167, 168, 169, 171, 172, 182, 196, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 245, 246, 256, 257, 258, 259, 260, 261, 262, 265, + 273, 275, 276, 277, 278, 279, 280, 303, 314, 155, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 56, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 77, 78, 81, 82, 83, 84, 95, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 123, 124, 142, 175, 176, 177, 178, 180, 181, 273, + 275, 21, 22, 30, 39, 58, 86, 89, 95, 96, + 123, 164, 172, 182, 184, 189, 192, 194, 213, 277, + 279, 280, 301, 302, 189, 189, 143, 190, 191, 143, + 186, 190, 143, 148, 308, 54, 177, 308, 157, 137, + 31, 32, 182, 213, 303, 182, 56, 89, 153, 166, + 167, 158, 185, 194, 301, 314, 184, 300, 301, 314, + 46, 86, 122, 141, 171, 196, 213, 277, 280, 239, + 240, 54, 55, 57, 175, 268, 274, 267, 268, 268, + 147, 263, 147, 266, 59, 60, 160, 182, 182, 146, + 148, 307, 312, 313, 40, 41, 42, 43, 44, 37, + 38, 28, 243, 109, 141, 89, 95, 168, 109, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 83, 84, 110, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 85, 139, 140, 197, 158, + 159, 159, 200, 202, 159, 307, 313, 86, 165, 172, + 213, 229, 277, 280, 52, 56, 83, 86, 173, 174, + 213, 277, 280, 174, 33, 34, 35, 36, 49, 50, + 51, 52, 56, 143, 175, 278, 298, 85, 140, 26, + 137, 247, 259, 87, 87, 186, 190, 247, 141, 184, + 56, 184, 184, 109, 88, 141, 193, 314, 85, 139, + 140, 87, 87, 141, 193, 189, 308, 309, 189, 188, + 189, 314, 158, 309, 158, 54, 63, 64, 156, 143, + 183, 137, 153, 85, 140, 87, 166, 144, 309, 198, + 145, 141, 148, 311, 141, 311, 138, 311, 308, 56, + 59, 60, 168, 170, 141, 85, 139, 140, 52, 54, + 55, 56, 57, 89, 95, 96, 116, 119, 143, 241, + 284, 285, 286, 287, 288, 289, 292, 293, 294, 295, + 296, 61, 104, 105, 106, 269, 106, 269, 106, 65, + 106, 106, 264, 269, 106, 61, 106, 68, 68, 146, + 155, 159, 159, 159, 159, 155, 158, 158, 244, 95, + 160, 184, 194, 195, 166, 141, 171, 141, 160, 182, + 184, 195, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 52, 53, + 56, 180, 186, 304, 305, 188, 52, 53, 56, 180, + 186, 304, 152, 153, 13, 225, 312, 225, 159, 159, + 307, 17, 250, 56, 85, 139, 140, 25, 158, 52, + 56, 173, 1, 113, 281, 312, 85, 139, 140, 209, + 299, 210, 85, 140, 306, 52, 56, 304, 304, 249, + 248, 160, 182, 160, 182, 94, 162, 179, 182, 184, + 95, 184, 192, 301, 52, 56, 188, 52, 56, 302, + 309, 144, 309, 309, 177, 199, 182, 153, 138, 304, + 304, 182, 309, 309, 301, 141, 170, 52, 56, 188, + 52, 56, 109, 52, 89, 95, 230, 231, 232, 286, + 284, 29, 107, 242, 141, 297, 314, 141, 297, 52, + 141, 297, 52, 271, 270, 147, 269, 147, 182, 182, + 76, 114, 234, 235, 314, 184, 141, 309, 170, 141, + 44, 308, 87, 87, 186, 190, 308, 310, 87, 87, + 186, 187, 190, 314, 10, 224, 8, 252, 314, 153, + 13, 153, 27, 226, 312, 226, 250, 194, 224, 52, + 56, 188, 52, 56, 204, 207, 312, 282, 206, 52, + 56, 173, 188, 152, 158, 143, 283, 284, 211, 187, + 190, 187, 190, 234, 234, 44, 163, 177, 184, 193, + 87, 310, 87, 87, 158, 138, 311, 168, 310, 184, + 232, 141, 286, 141, 309, 146, 236, 314, 153, 153, + 287, 292, 294, 296, 288, 289, 294, 288, 153, 54, + 55, 57, 272, 280, 52, 233, 236, 288, 290, 291, + 294, 296, 153, 95, 184, 170, 182, 111, 160, 182, + 182, 162, 145, 87, 160, 182, 160, 182, 162, 184, + 195, 253, 314, 15, 228, 314, 14, 227, 228, 228, + 201, 203, 224, 141, 225, 310, 159, 312, 159, 152, + 310, 224, 309, 284, 152, 312, 175, 153, 153, 182, + 234, 87, 309, 309, 231, 141, 95, 230, 52, 237, + 238, 285, 309, 10, 138, 141, 297, 141, 297, 141, + 297, 141, 297, 297, 138, 109, 236, 114, 141, 297, + 141, 297, 141, 297, 10, 184, 182, 160, 182, 88, + 254, 314, 153, 9, 255, 314, 159, 224, 224, 153, + 153, 184, 153, 226, 208, 312, 224, 309, 224, 212, + 10, 138, 153, 141, 231, 141, 286, 141, 288, 294, + 288, 288, 86, 213, 114, 291, 294, 288, 290, 294, + 288, 86, 172, 213, 277, 280, 225, 153, 225, 224, + 224, 228, 250, 251, 205, 152, 283, 138, 231, 141, + 238, 297, 141, 297, 297, 297, 56, 85, 141, 297, + 141, 297, 297, 141, 297, 297, 56, 85, 139, 140, + 153, 153, 153, 224, 152, 231, 288, 52, 56, 288, + 294, 288, 288, 52, 56, 188, 52, 56, 252, 227, + 224, 224, 297, 297, 141, 297, 297, 297, 310, 288, + 297 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + parser_yyerror (parser, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, parser); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + struct parser_params *parser; +#endif +{ + if (!yyvaluep) + return; + YYUSE (parser); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, parser) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + struct parser_params *parser; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) +#else +static void +yy_reduce_print (yyvsp, yyrule, parser) + YYSTYPE *yyvsp; + int yyrule; + struct parser_params *parser; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , parser); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, parser); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +#ifndef yydebug +int yydebug; +#endif +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, parser) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + struct parser_params *parser; +#endif +{ + YYUSE (yyvaluep); + YYUSE (parser); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (struct parser_params *parser); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (struct parser_params *parser) +#else +int +yyparse (parser) + struct parser_params *parser; +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 763 "parse.y" + { + lex_state = EXPR_BEG; + /*%%%*/ + local_push(compile_for_eval); + /*% + %*/ + ;} + break; + + case 3: +#line 771 "parse.y" + { + /*%%%*/ + if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { + /* last expression should not be void */ + if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node)); + else { + NODE *node = (yyvsp[(2) - (2)].node); + while (node->nd_next) { + node = node->nd_next; + } + void_expr(node->nd_head); + } + } + ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node))); + local_pop(); + /*% + $$ = $2; + parser->result = dispatch1(program, $$); + %*/ + ;} + break; + + case 4: +#line 797 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(1) - (4)].node); + if ((yyvsp[(2) - (4)].node)) { + (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node)); + } + else if ((yyvsp[(3) - (4)].node)) { + rb_warn0("else without rescue is useless"); + (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node)); + } + if ((yyvsp[(4) - (4)].node)) { + if ((yyval.node)) { + (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node)); + } + else { + (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL()); + } + } + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch4(body_stmt, + escape_Qundef($1), + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($4)); + %*/ + ;} + break; + + case 5: +#line 827 "parse.y" + { + /*%%%*/ + void_stmts((yyvsp[(1) - (2)].node)); + fixup_nodes(&deferred_nodes); + /*% + %*/ + (yyval.node) = (yyvsp[(1) - (2)].node); + ;} + break; + + case 6: +#line 838 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch2(stmts_add, dispatch0(stmts_new), + dispatch0(void_stmt)); + %*/ + ;} + break; + + case 7: +#line 847 "parse.y" + { + /*%%%*/ + (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); + /*% + $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); + %*/ + ;} + break; + + case 8: +#line 855 "parse.y" + { + /*%%%*/ + (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); + /*% + $$ = dispatch2(stmts_add, $1, $3); + %*/ + ;} + break; + + case 9: +#line 863 "parse.y" + { + (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); + ;} + break; + + case 10: +#line 868 "parse.y" + {lex_state = EXPR_FNAME;;} + break; + + case 11: +#line 869 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); + /*% + $$ = dispatch2(alias, $2, $4); + %*/ + ;} + break; + + case 12: +#line 877 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch2(var_alias, $2, $3); + %*/ + ;} + break; + + case 13: +#line 885 "parse.y" + { + /*%%%*/ + char buf[3]; + + sprintf(buf, "$%c", (char)(yyvsp[(3) - (3)].node)->nd_nth); + (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern(buf)); + /*% + $$ = dispatch2(var_alias, $2, $3); + %*/ + ;} + break; + + case 14: +#line 896 "parse.y" + { + /*%%%*/ + yyerror("can't make alias for the number variables"); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch2(var_alias, $2, $3); + $$ = dispatch1(alias_error, $$); + %*/ + ;} + break; + + case 15: +#line 906 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (2)].node); + /*% + $$ = dispatch1(undef, $2); + %*/ + ;} + break; + + case 16: +#line 914 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); + fixpos((yyval.node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(if_mod, $3, $1); + %*/ + ;} + break; + + case 17: +#line 923 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); + fixpos((yyval.node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(unless_mod, $3, $1); + %*/ + ;} + break; + + case 18: +#line 932 "parse.y" + { + /*%%%*/ + if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { + (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); + } + else { + (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); + } + /*% + $$ = dispatch2(while_mod, $3, $1); + %*/ + ;} + break; + + case 19: +#line 945 "parse.y" + { + /*%%%*/ + if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { + (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); + } + else { + (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); + } + /*% + $$ = dispatch2(until_mod, $3, $1); + %*/ + ;} + break; + + case 20: +#line 958 "parse.y" + { + /*%%%*/ + NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); + (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0); + /*% + $$ = dispatch2(rescue_mod, $3, $1); + %*/ + ;} + break; + + case 21: +#line 967 "parse.y" + { + if (in_def || in_single) { + yyerror("BEGIN in method"); + } + /*%%%*/ + /* local_push(0); */ + /*% + %*/ + ;} + break; + + case 22: +#line 977 "parse.y" + { + /*%%%*/ + ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, + (yyvsp[(4) - (5)].node)); + /* NEW_PREEXE($4)); */ + /* local_pop(); */ + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(BEGIN, $4); + %*/ + ;} + break; + + case 23: +#line 989 "parse.y" + { + if (in_def || in_single) { + rb_warn0("END in method; use at_exit"); + } + /*%%%*/ + (yyval.node) = NEW_POSTEXE(NEW_NODE( + NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */)); + /*% + $$ = dispatch1(END, $3); + %*/ + ;} + break; + + case 24: +#line 1001 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + ;} + break; + + case 25: +#line 1010 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[(1) - (3)].node); + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + ;} + break; + + case 26: +#line 1020 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + if ((yyvsp[(1) - (3)].node)) { + ID vid = (yyvsp[(1) - (3)].node)->nd_vid; + if ((yyvsp[(2) - (3)].id) == tOROP) { + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); + if (is_asgn_or_id(vid)) { + (yyval.node)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (3)].id) == tANDOP) { + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); + } + else { + (yyval.node) = (yyvsp[(1) - (3)].node); + (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); + } + } + else { + (yyval.node) = NEW_BEGIN(0); + } + /*% + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + ;} + break; + + case 27: +#line 1049 "parse.y" + { + /*%%%*/ + NODE *args; + + value_expr((yyvsp[(6) - (6)].node)); + if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); + args = arg_concat((yyvsp[(6) - (6)].node), (yyvsp[(3) - (6)].node)); + if ((yyvsp[(5) - (6)].id) == tOROP) { + (yyvsp[(5) - (6)].id) = 0; + } + else if ((yyvsp[(5) - (6)].id) == tANDOP) { + (yyvsp[(5) - (6)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); + fixpos((yyval.node), (yyvsp[(1) - (6)].node)); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $$, $5, $6); + %*/ + ;} + break; + + case 28: +#line 1070 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + ;} + break; + + case 29: +#line 1087 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + ;} + break; + + case 30: +#line 1104 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + ;} + break; + + case 31: +#line 1121 "parse.y" + { + /*%%%*/ + rb_backref_error((yyvsp[(1) - (3)].node)); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch2(assign, dispatch1(var_field, $1), $3); + $$ = dispatch1(assign_error, $$); + %*/ + ;} + break; + + case 32: +#line 1131 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + ;} + break; + + case 33: +#line 1140 "parse.y" + { + /*%%%*/ + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[(1) - (3)].node); + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + ;} + break; + + case 34: +#line 1149 "parse.y" + { + /*%%%*/ + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[(1) - (3)].node); + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + ;} + break; + + case 37: +#line 1162 "parse.y" + { + /*%%%*/ + (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("and"), $3); + %*/ + ;} + break; + + case 38: +#line 1170 "parse.y" + { + /*%%%*/ + (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("or"), $3); + %*/ + ;} + break; + + case 39: +#line 1178 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), $3); + %*/ + ;} + break; + + case 40: +#line 1186 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); + /*% + $$ = dispatch2(unary, ripper_id2sym('!'), $2); + %*/ + ;} + break; + + case 42: +#line 1197 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); + if (!(yyval.node)) (yyval.node) = NEW_NIL(); + /*% + $$ = $1; + %*/ + ;} + break; + + case 45: +#line 1211 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); + /*% + $$ = dispatch1(return, $2); + %*/ + ;} + break; + + case 46: +#line 1219 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); + /*% + $$ = dispatch1(break, $2); + %*/ + ;} + break; + + case 47: +#line 1227 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); + /*% + $$ = dispatch1(next, $2); + %*/ + ;} + break; + + case 49: +#line 1238 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_arg($$, $4); + %*/ + ;} + break; + + case 50: +#line 1247 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_arg($$, $4); + %*/ + ;} + break; + + case 51: +#line 1258 "parse.y" + { + /*%%%*/ + dyna_push(); + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 52: +#line 1268 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); + nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); + dyna_pop(); + /*% + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + %*/ + ;} + break; + + case 53: +#line 1280 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); + fixpos((yyval.node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(command, $1, $2); + %*/ + ;} + break; + + case 54: +#line 1289 "parse.y" + { + /*%%%*/ + block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)); + (yyvsp[(3) - (3)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node)); + (yyval.node) = (yyvsp[(3) - (3)].node); + fixpos((yyval.node), (yyvsp[(2) - (3)].node)); + /*% + $$ = dispatch2(command, $1, $2); + $$ = method_add_block($$, $3); + %*/ + ;} + break; + + case 55: +#line 1301 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + %*/ + ;} + break; + + case 56: +#line 1310 "parse.y" + { + /*%%%*/ + block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); + (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); + (yyval.node) = (yyvsp[(5) - (5)].node); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + $$ = method_add_block($$, $5); + %*/ + ;} + break; + + case 57: +#line 1322 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + %*/ + ;} + break; + + case 58: +#line 1331 "parse.y" + { + /*%%%*/ + block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); + (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); + (yyval.node) = (yyvsp[(5) - (5)].node); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + $$ = method_add_block($$, $5); + %*/ + ;} + break; + + case 59: +#line 1343 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); + fixpos((yyval.node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch1(super, $2); + %*/ + ;} + break; + + case 60: +#line 1352 "parse.y" + { + /*%%%*/ + (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); + fixpos((yyval.node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch1(yield, $2); + %*/ + ;} + break; + + case 62: +#line 1364 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + ;} + break; + + case 64: +#line 1375 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + ;} + break; + + case 65: +#line 1385 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); + /*% + $$ = $1; + %*/ + ;} + break; + + case 66: +#line 1393 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); + /*% + $$ = mlhs_add($1, $2); + %*/ + ;} + break; + + case 67: +#line 1401 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = mlhs_add_star($1, $3); + %*/ + ;} + break; + + case 68: +#line 1409 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node))); + /*% + $$ = mlhs_add_star($1, $3); + %*/ + ;} + break; + + case 69: +#line 1417 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + ;} + break; + + case 70: +#line 1425 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node))); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + ;} + break; + + case 71: +#line 1433 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + ;} + break; + + case 72: +#line 1441 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node))); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + ;} + break; + + case 73: +#line 1449 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, -1); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + ;} + break; + + case 74: +#line 1457 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + ;} + break; + + case 76: +#line 1468 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + ;} + break; + + case 77: +#line 1478 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + ;} + break; + + case 78: +#line 1486 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); + /*% + $$ = mlhs_add($1, $2); + %*/ + ;} + break; + + case 79: +#line 1496 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + ;} + break; + + case 80: +#line 1504 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = mlhs_add($1, $3); + %*/ + ;} + break; + + case 81: +#line 1514 "parse.y" + { + /*%%%*/ + (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); + /*% + $$ = $1; + %*/ + ;} + break; + + case 82: +#line 1522 "parse.y" + { + /*%%%*/ + (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + %*/ + ;} + break; + + case 83: +#line 1530 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + ;} + break; + + case 84: +#line 1538 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch2(const_path_field, $1, $3); + %*/ + ;} + break; + + case 85: +#line 1546 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + ;} + break; + + case 86: +#line 1554 "parse.y" + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); + /*% + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = dispatch2(const_path_field, $1, $3); + %*/ + ;} + break; + + case 87: +#line 1566 "parse.y" + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); + /*% + $$ = dispatch1(top_const_field, $2); + %*/ + ;} + break; + + case 88: +#line 1576 "parse.y" + { + /*%%%*/ + rb_backref_error((yyvsp[(1) - (1)].node)); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + $$ = dispatch1(assign_error, $$); + %*/ + ;} + break; + + case 89: +#line 1588 "parse.y" + { + /*%%%*/ + if (!((yyval.node) = assignable((yyvsp[(1) - (1)].id), 0))) (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + %*/ + ;} + break; + + case 90: +#line 1596 "parse.y" + { + /*%%%*/ + (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + %*/ + ;} + break; + + case 91: +#line 1604 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + ;} + break; + + case 92: +#line 1612 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + %*/ + ;} + break; + + case 93: +#line 1620 "parse.y" + { + /*%%%*/ + (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + ;} + break; + + case 94: +#line 1628 "parse.y" + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); + /*% + $$ = dispatch2(const_path_field, $1, $3); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + %*/ + ;} + break; + + case 95: +#line 1641 "parse.y" + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); + /*% + $$ = dispatch1(top_const_field, $2); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + %*/ + ;} + break; + + case 96: +#line 1654 "parse.y" + { + /*%%%*/ + rb_backref_error((yyvsp[(1) - (1)].node)); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(assign_error, $1); + %*/ + ;} + break; + + case 97: +#line 1665 "parse.y" + { + /*%%%*/ + yyerror("class/module name must be CONSTANT"); + /*% + $$ = dispatch1(class_name_error, $1); + %*/ + ;} + break; + + case 99: +#line 1676 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); + /*% + $$ = dispatch1(top_const_ref, $2); + %*/ + ;} + break; + + case 100: +#line 1684 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_COLON2(0, (yyval.node)); + /*% + $$ = dispatch1(const_ref, $1); + %*/ + ;} + break; + + case 101: +#line 1692 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch2(const_path_ref, $1, $3); + %*/ + ;} + break; + + case 105: +#line 1705 "parse.y" + { + /*%%%*/ + lex_state = EXPR_END; + (yyval.id) = (yyvsp[(1) - (1)].id); + /*% + lex_state = EXPR_END; + $$ = $1; + %*/ + ;} + break; + + case 106: +#line 1715 "parse.y" + { + /*%%%*/ + lex_state = EXPR_END; + (yyval.id) = (yyvsp[(1) - (1)].id); + /*% + lex_state = EXPR_END; + $$ = $1; + %*/ + ;} + break; + + case 109: +#line 1731 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); + /*% + $$ = dispatch1(symbol_literal, $1); + %*/ + ;} + break; + + case 111: +#line 1742 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + ;} + break; + + case 112: +#line 1749 "parse.y" + {lex_state = EXPR_FNAME;;} + break; + + case 113: +#line 1750 "parse.y" + { + /*%%%*/ + (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); + /*% + rb_ary_push($1, $4); + %*/ + ;} + break; + + case 114: +#line 1759 "parse.y" + { ifndef_ripper((yyval.id) = '|'); ;} + break; + + case 115: +#line 1760 "parse.y" + { ifndef_ripper((yyval.id) = '^'); ;} + break; + + case 116: +#line 1761 "parse.y" + { ifndef_ripper((yyval.id) = '&'); ;} + break; + + case 117: +#line 1762 "parse.y" + { ifndef_ripper((yyval.id) = tCMP); ;} + break; + + case 118: +#line 1763 "parse.y" + { ifndef_ripper((yyval.id) = tEQ); ;} + break; + + case 119: +#line 1764 "parse.y" + { ifndef_ripper((yyval.id) = tEQQ); ;} + break; + + case 120: +#line 1765 "parse.y" + { ifndef_ripper((yyval.id) = tMATCH); ;} + break; + + case 121: +#line 1766 "parse.y" + { ifndef_ripper((yyval.id) = tNMATCH); ;} + break; + + case 122: +#line 1767 "parse.y" + { ifndef_ripper((yyval.id) = '>'); ;} + break; + + case 123: +#line 1768 "parse.y" + { ifndef_ripper((yyval.id) = tGEQ); ;} + break; + + case 124: +#line 1769 "parse.y" + { ifndef_ripper((yyval.id) = '<'); ;} + break; + + case 125: +#line 1770 "parse.y" + { ifndef_ripper((yyval.id) = tLEQ); ;} + break; + + case 126: +#line 1771 "parse.y" + { ifndef_ripper((yyval.id) = tNEQ); ;} + break; + + case 127: +#line 1772 "parse.y" + { ifndef_ripper((yyval.id) = tLSHFT); ;} + break; + + case 128: +#line 1773 "parse.y" + { ifndef_ripper((yyval.id) = tRSHFT); ;} + break; + + case 129: +#line 1774 "parse.y" + { ifndef_ripper((yyval.id) = '+'); ;} + break; + + case 130: +#line 1775 "parse.y" + { ifndef_ripper((yyval.id) = '-'); ;} + break; + + case 131: +#line 1776 "parse.y" + { ifndef_ripper((yyval.id) = '*'); ;} + break; + + case 132: +#line 1777 "parse.y" + { ifndef_ripper((yyval.id) = '*'); ;} + break; + + case 133: +#line 1778 "parse.y" + { ifndef_ripper((yyval.id) = '/'); ;} + break; + + case 134: +#line 1779 "parse.y" + { ifndef_ripper((yyval.id) = '%'); ;} + break; + + case 135: +#line 1780 "parse.y" + { ifndef_ripper((yyval.id) = tPOW); ;} + break; + + case 136: +#line 1781 "parse.y" + { ifndef_ripper((yyval.id) = '!'); ;} + break; + + case 137: +#line 1782 "parse.y" + { ifndef_ripper((yyval.id) = '~'); ;} + break; + + case 138: +#line 1783 "parse.y" + { ifndef_ripper((yyval.id) = tUPLUS); ;} + break; + + case 139: +#line 1784 "parse.y" + { ifndef_ripper((yyval.id) = tUMINUS); ;} + break; + + case 140: +#line 1785 "parse.y" + { ifndef_ripper((yyval.id) = tAREF); ;} + break; + + case 141: +#line 1786 "parse.y" + { ifndef_ripper((yyval.id) = tASET); ;} + break; + + case 142: +#line 1787 "parse.y" + { ifndef_ripper((yyval.id) = '`'); ;} + break; + + case 184: +#line 1805 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + ;} + break; + + case 185: +#line 1814 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (5)].node)); + (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); + (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node)); + /*% + $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); + %*/ + ;} + break; + + case 186: +#line 1824 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (3)].node)); + if ((yyvsp[(1) - (3)].node)) { + ID vid = (yyvsp[(1) - (3)].node)->nd_vid; + if ((yyvsp[(2) - (3)].id) == tOROP) { + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); + if (is_asgn_or_id(vid)) { + (yyval.node)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (3)].id) == tANDOP) { + (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); + (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); + } + else { + (yyval.node) = (yyvsp[(1) - (3)].node); + (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); + } + } + else { + (yyval.node) = NEW_BEGIN(0); + } + /*% + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + ;} + break; + + case 187: +#line 1853 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(3) - (5)].node)); + (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); + if ((yyvsp[(1) - (5)].node)) { + ID vid = (yyvsp[(1) - (5)].node)->nd_vid; + if ((yyvsp[(2) - (5)].id) == tOROP) { + (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); + (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].node)); + if (is_asgn_or_id(vid)) { + (yyval.node)->nd_aid = vid; + } + } + else if ((yyvsp[(2) - (5)].id) == tANDOP) { + (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); + (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].node)); + } + else { + (yyval.node) = (yyvsp[(1) - (5)].node); + (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].id), NEW_LIST((yyvsp[(3) - (5)].node))); + } + } + else { + (yyval.node) = NEW_BEGIN(0); + } + /*% + $3 = dispatch2(rescue_mod, $3, $5); + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + ;} + break; + + case 188: +#line 1884 "parse.y" + { + /*%%%*/ + NODE *args; + + value_expr((yyvsp[(6) - (6)].node)); + if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); + args = arg_concat((yyvsp[(6) - (6)].node), (yyvsp[(3) - (6)].node)); + if ((yyvsp[(5) - (6)].id) == tOROP) { + (yyvsp[(5) - (6)].id) = 0; + } + else if ((yyvsp[(5) - (6)].id) == tANDOP) { + (yyvsp[(5) - (6)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); + fixpos((yyval.node), (yyvsp[(1) - (6)].node)); + /*% + $1 = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $1, $5, $6); + %*/ + ;} + break; + + case 189: +#line 1905 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + ;} + break; + + case 190: +#line 1922 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + ;} + break; + + case 191: +#line 1939 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(5) - (5)].node)); + if ((yyvsp[(4) - (5)].id) == tOROP) { + (yyvsp[(4) - (5)].id) = 0; + } + else if ((yyvsp[(4) - (5)].id) == tANDOP) { + (yyvsp[(4) - (5)].id) = 1; + } + (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(1) - (5)].node)); + /*% + $1 = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + ;} + break; + + case 192: +#line 1956 "parse.y" + { + /*%%%*/ + yyerror("constant re-assignment"); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch2(const_path_field, $1, $3); + $$ = dispatch3(opassign, $$, $4, $5); + $$ = dispatch1(assign_error, $$); + %*/ + ;} + break; + + case 193: +#line 1967 "parse.y" + { + /*%%%*/ + yyerror("constant re-assignment"); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(top_const_field, $2); + $$ = dispatch3(opassign, $$, $3, $4); + $$ = dispatch1(assign_error, $$); + %*/ + ;} + break; + + case 194: +#line 1978 "parse.y" + { + /*%%%*/ + rb_backref_error((yyvsp[(1) - (3)].node)); + (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + $$ = dispatch3(opassign, $$, $2, $3); + $$ = dispatch1(assign_error, $$); + %*/ + ;} + break; + + case 195: +#line 1989 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (3)].node)); + value_expr((yyvsp[(3) - (3)].node)); + (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && + nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, (yyval.node)); + } + /*% + $$ = dispatch2(dot2, $1, $3); + %*/ + ;} + break; + + case 196: +#line 2003 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (3)].node)); + value_expr((yyvsp[(3) - (3)].node)); + (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && + nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, (yyval.node)); + } + /*% + $$ = dispatch2(dot3, $1, $3); + %*/ + ;} + break; + + case 197: +#line 2017 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('+'), $3); + %*/ + ;} + break; + + case 198: +#line 2025 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('-'), $3); + %*/ + ;} + break; + + case 199: +#line 2033 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('*'), $3); + %*/ + ;} + break; + + case 200: +#line 2041 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('/'), $3); + %*/ + ;} + break; + + case 201: +#line 2049 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('%'), $3); + %*/ + ;} + break; + + case 202: +#line 2057 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("**"), $3); + %*/ + ;} + break; + + case 203: +#line 2065 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); + /*% + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + %*/ + ;} + break; + + case 204: +#line 2074 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); + /*% + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + %*/ + ;} + break; + + case 205: +#line 2083 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS); + /*% + $$ = dispatch2(unary, ripper_intern("+@"), $2); + %*/ + ;} + break; + + case 206: +#line 2091 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + ;} + break; + + case 207: +#line 2099 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('|'), $3); + %*/ + ;} + break; + + case 208: +#line 2107 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('^'), $3); + %*/ + ;} + break; + + case 209: +#line 2115 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('&'), $3); + %*/ + ;} + break; + + case 210: +#line 2123 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); + %*/ + ;} + break; + + case 211: +#line 2131 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('>'), $3); + %*/ + ;} + break; + + case 212: +#line 2139 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern(">="), $3); + %*/ + ;} + break; + + case 213: +#line 2147 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ID2SYM('<'), $3); + %*/ + ;} + break; + + case 214: +#line 2155 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<="), $3); + %*/ + ;} + break; + + case 215: +#line 2163 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("=="), $3); + %*/ + ;} + break; + + case 216: +#line 2171 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("==="), $3); + %*/ + ;} + break; + + case 217: +#line 2179 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("!="), $3); + %*/ + ;} + break; + + case 218: +#line 2187 "parse.y" + { + /*%%%*/ + (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].node)->nd_lit) == T_REGEXP) { + (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node)); + } + /*% + $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); + %*/ + ;} + break; + + case 219: +#line 2198 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); + %*/ + ;} + break; + + case 220: +#line 2206 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); + /*% + $$ = dispatch2(unary, ID2SYM('!'), $2); + %*/ + ;} + break; + + case 221: +#line 2214 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~'); + /*% + $$ = dispatch2(unary, ID2SYM('~'), $2); + %*/ + ;} + break; + + case 222: +#line 2222 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); + %*/ + ;} + break; + + case 223: +#line 2230 "parse.y" + { + /*%%%*/ + (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); + %*/ + ;} + break; + + case 224: +#line 2238 "parse.y" + { + /*%%%*/ + (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); + %*/ + ;} + break; + + case 225: +#line 2246 "parse.y" + { + /*%%%*/ + (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch3(binary, $1, ripper_intern("||"), $3); + %*/ + ;} + break; + + case 226: +#line 2253 "parse.y" + {in_defined = 1;;} + break; + + case 227: +#line 2254 "parse.y" + { + /*%%%*/ + in_defined = 0; + (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node)); + /*% + in_defined = 0; + $$ = dispatch1(defined, $4); + %*/ + ;} + break; + + case 228: +#line 2264 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (6)].node)); + (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); + fixpos((yyval.node), (yyvsp[(1) - (6)].node)); + /*% + $$ = dispatch3(ifop, $1, $3, $6); + %*/ + ;} + break; + + case 229: +#line 2274 "parse.y" + { + (yyval.node) = (yyvsp[(1) - (1)].node); + ;} + break; + + case 230: +#line 2280 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); + if (!(yyval.node)) (yyval.node) = NEW_NIL(); + /*% + $$ = $1; + %*/ + ;} + break; + + case 232: +#line 2293 "parse.y" + { + (yyval.node) = (yyvsp[(1) - (2)].node); + ;} + break; + + case 233: +#line 2297 "parse.y" + { + /*%%%*/ + (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); + /*% + $$ = arg_add_assocs($1, $3); + %*/ + ;} + break; + + case 234: +#line 2305 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); + /*% + $$ = arg_add_assocs(arg_new(), $1); + %*/ + ;} + break; + + case 235: +#line 2315 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(arg_paren, escape_Qundef($2)); + %*/ + ;} + break; + + case 240: +#line 2333 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); + /*% + $$ = arg_add(arg_new(), $1); + %*/ + ;} + break; + + case 241: +#line 2341 "parse.y" + { + /*%%%*/ + (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + /*% + $$ = arg_add_optblock($1, $2); + %*/ + ;} + break; + + case 242: +#line 2349 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); + (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node)); + /*% + $$ = arg_add_assocs(arg_new(), $1); + $$ = arg_add_optblock($$, $2); + %*/ + ;} + break; + + case 243: +#line 2359 "parse.y" + { + /*%%%*/ + (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); + (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node)); + /*% + $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); + %*/ + ;} + break; + + case 245: +#line 2376 "parse.y" + { + (yyval.num) = cmdarg_stack; + CMDARG_PUSH(1); + ;} + break; + + case 246: +#line 2381 "parse.y" + { + /* CMDARG_POP() */ + cmdarg_stack = (yyvsp[(1) - (2)].num); + (yyval.node) = (yyvsp[(2) - (2)].node); + ;} + break; + + case 247: +#line 2389 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); + /*% + $$ = $2; + %*/ + ;} + break; + + case 248: +#line 2399 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (2)].node); + ;} + break; + + case 249: +#line 2403 "parse.y" + { + (yyval.node) = 0; + ;} + break; + + case 250: +#line 2407 "parse.y" + { + (yyval.node) = 0; + ;} + break; + + case 251: +#line 2413 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); + /*% + $$ = arg_add(arg_new(), $1); + %*/ + ;} + break; + + case 252: +#line 2421 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); + /*% + $$ = arg_add_star(arg_new(), $2); + %*/ + ;} + break; + + case 253: +#line 2429 "parse.y" + { + /*%%%*/ + NODE *n1; + if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { + (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); + } + else { + (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + } + /*% + $$ = arg_add($1, $3); + %*/ + ;} + break; + + case 254: +#line 2443 "parse.y" + { + /*%%%*/ + NODE *n1; + if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { + (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); + } + else { + (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); + } + /*% + $$ = arg_add_star($1, $4); + %*/ + ;} + break; + + case 255: +#line 2459 "parse.y" + { + /*%%%*/ + NODE *n1; + if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { + (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); + } + else { + (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + } + /*% + $$ = mrhs_add(args2mrhs($1), $3); + %*/ + ;} + break; + + case 256: +#line 2473 "parse.y" + { + /*%%%*/ + NODE *n1; + if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY && + (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { + (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); + } + else { + (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); + } + /*% + $$ = mrhs_add_star(args2mrhs($1), $4); + %*/ + ;} + break; + + case 257: +#line 2488 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); + /*% + $$ = mrhs_add_star(mrhs_new(), $2); + %*/ + ;} + break; + + case 266: +#line 2506 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); + /*% + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + %*/ + ;} + break; + + case 267: +#line 2514 "parse.y" + { + /*%%%*/ + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 268: +#line 2522 "parse.y" + { + /*%%%*/ + if ((yyvsp[(3) - (4)].node) == NULL) { + (yyval.node) = NEW_NIL(); + } + else { + if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE || + nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE) + nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num)); + (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node)); + } + nd_set_line((yyval.node), (yyvsp[(2) - (4)].num)); + /*% + $$ = dispatch1(begin, $3); + %*/ + ;} + break; + + case 269: +#line 2538 "parse.y" + {lex_state = EXPR_ENDARG;;} + break; + + case 270: +#line 2539 "parse.y" + { + rb_warning0("(...) interpreted as grouped expression"); + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (4)].node); + /*% + $$ = dispatch1(paren, $2); + %*/ + ;} + break; + + case 271: +#line 2548 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(paren, $2); + %*/ + ;} + break; + + case 272: +#line 2556 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); + /*% + $$ = dispatch2(const_path_ref, $1, $3); + %*/ + ;} + break; + + case 273: +#line 2564 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); + /*% + $$ = dispatch1(top_const_ref, $2); + %*/ + ;} + break; + + case 274: +#line 2572 "parse.y" + { + /*%%%*/ + if ((yyvsp[(2) - (3)].node) == 0) { + (yyval.node) = NEW_ZARRAY(); /* zero length array*/ + } + else { + (yyval.node) = (yyvsp[(2) - (3)].node); + } + /*% + $$ = dispatch1(array, escape_Qundef($2)); + %*/ + ;} + break; + + case 275: +#line 2585 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); + /*% + $$ = dispatch1(hash, escape_Qundef($2)); + %*/ + ;} + break; + + case 276: +#line 2593 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_RETURN(0); + /*% + $$ = dispatch0(return0); + %*/ + ;} + break; + + case 277: +#line 2601 "parse.y" + { + /*%%%*/ + (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); + /*% + $$ = dispatch1(yield, dispatch1(paren, $3)); + %*/ + ;} + break; + + case 278: +#line 2609 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_YIELD(0, Qfalse); + /*% + $$ = dispatch1(yield, dispatch1(paren, arg_new())); + %*/ + ;} + break; + + case 279: +#line 2617 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_YIELD(0, Qfalse); + /*% + $$ = dispatch0(yield0); + %*/ + ;} + break; + + case 280: +#line 2624 "parse.y" + {in_defined = 1;;} + break; + + case 281: +#line 2625 "parse.y" + { + /*%%%*/ + in_defined = 0; + (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node)); + /*% + in_defined = 0; + $$ = dispatch1(defined, $5); + %*/ + ;} + break; + + case 282: +#line 2635 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), $3); + %*/ + ;} + break; + + case 283: +#line 2643 "parse.y" + { + /*%%%*/ + (yyval.node) = call_uni_op(cond(NEW_NIL()), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), Qnil); + %*/ + ;} + break; + + case 284: +#line 2651 "parse.y" + { + /*%%%*/ + (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0); + (yyval.node) = (yyvsp[(2) - (2)].node); + fixpos((yyvsp[(2) - (2)].node)->nd_iter, (yyvsp[(2) - (2)].node)); + /*% + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + $$ = method_add_block($$, $2); + %*/ + ;} + break; + + case 286: +#line 2663 "parse.y" + { + /*%%%*/ + block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); + (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); + (yyval.node) = (yyvsp[(2) - (2)].node); + fixpos((yyval.node), (yyvsp[(1) - (2)].node)); + /*% + $$ = method_add_block($1, $2); + %*/ + ;} + break; + + case 287: +#line 2674 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (2)].node); + ;} + break; + + case 288: +#line 2681 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); + fixpos((yyval.node), (yyvsp[(2) - (6)].node)); + /*% + $$ = dispatch3(if, $2, $4, escape_Qundef($5)); + %*/ + ;} + break; + + case 289: +#line 2693 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); + fixpos((yyval.node), (yyvsp[(2) - (6)].node)); + /*% + $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); + %*/ + ;} + break; + + case 290: +#line 2701 "parse.y" + {COND_PUSH(1);;} + break; + + case 291: +#line 2701 "parse.y" + {COND_POP();;} + break; + + case 292: +#line 2704 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); + fixpos((yyval.node), (yyvsp[(3) - (7)].node)); + /*% + $$ = dispatch2(while, $3, $6); + %*/ + ;} + break; + + case 293: +#line 2712 "parse.y" + {COND_PUSH(1);;} + break; + + case 294: +#line 2712 "parse.y" + {COND_POP();;} + break; + + case 295: +#line 2715 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); + fixpos((yyval.node), (yyvsp[(3) - (7)].node)); + /*% + $$ = dispatch2(until, $3, $6); + %*/ + ;} + break; + + case 296: +#line 2726 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); + fixpos((yyval.node), (yyvsp[(2) - (5)].node)); + /*% + $$ = dispatch2(case, $2, $4); + %*/ + ;} + break; + + case 297: +#line 2735 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node)); + /*% + $$ = dispatch2(case, Qnil, $3); + %*/ + ;} + break; + + case 298: +#line 2743 "parse.y" + {COND_PUSH(1);;} + break; + + case 299: +#line 2745 "parse.y" + {COND_POP();;} + break; + + case 300: +#line 2748 "parse.y" + { + /*%%%*/ + /* + * for a, b, c in e + * #=> + * e.each{|*x| a, b, c = x + * + * for a in e + * #=> + * e.each{|x| a, = x} + */ + ID id = internal_id(); + ID *tbl = ALLOC_N(ID, 2); + NODE *m = NEW_ARGS_AUX(0, 0); + NODE *args, *scope; + + if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) { + /* if args.length == 1 && args[0].kind_of?(Array) + * args = args[0] + * end + */ + NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); + NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); + m->nd_next = block_append( + NEW_IF( + NEW_NODE(NODE_AND, + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), + rb_intern("=="), one), + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), + rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), + 0), + NEW_DASGN_CURR(id, + NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), + 0), + node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id))); + + args = new_args(m, 0, id, 0, 0); + } + else { + if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN || + nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN || + nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) { + (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id); + m->nd_plen = 1; + m->nd_next = (yyvsp[(2) - (9)].node); + args = new_args(m, 0, 0, 0, 0); + } + else { + m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id)); + args = new_args(m, 0, id, 0, 0); + } + } + scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args); + tbl[0] = 1; tbl[1] = id; + (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope); + fixpos((yyval.node), (yyvsp[(2) - (9)].node)); + /*% + $$ = dispatch3(for, $2, $5, $8); + %*/ + ;} + break; + + case 301: +#line 2809 "parse.y" + { + if (in_def || in_single) + yyerror("class definition in method body"); + /*%%%*/ + local_push(0); + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 302: +#line 2820 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); + nd_set_line((yyval.node), (yyvsp[(4) - (6)].num)); + local_pop(); + /*% + $$ = dispatch3(class, $2, $3, $5); + %*/ + ;} + break; + + case 303: +#line 2830 "parse.y" + { + (yyval.num) = in_def; + in_def = 0; + ;} + break; + + case 304: +#line 2835 "parse.y" + { + (yyval.num) = in_single; + in_single = 0; + /*%%%*/ + local_push(0); + /*% + %*/ + ;} + break; + + case 305: +#line 2845 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); + fixpos((yyval.node), (yyvsp[(3) - (8)].node)); + local_pop(); + /*% + $$ = dispatch2(sclass, $3, $7); + %*/ + in_def = (yyvsp[(4) - (8)].num); + in_single = (yyvsp[(6) - (8)].num); + ;} + break; + + case 306: +#line 2857 "parse.y" + { + if (in_def || in_single) + yyerror("module definition in method body"); + /*%%%*/ + local_push(0); + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 307: +#line 2868 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); + nd_set_line((yyval.node), (yyvsp[(3) - (5)].num)); + local_pop(); + /*% + $$ = dispatch2(module, $2, $4); + %*/ + ;} + break; + + case 308: +#line 2878 "parse.y" + { + (yyval.id) = cur_mid; + cur_mid = (yyvsp[(2) - (2)].id); + in_def++; + /*%%%*/ + local_push(0); + /*% + %*/ + ;} + break; + + case 309: +#line 2890 "parse.y" + { + /*%%%*/ + NODE *body = remove_begin((yyvsp[(5) - (6)].node)); + reduce_nodes(&body); + (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE); + fixpos((yyval.node), (yyvsp[(4) - (6)].node)); + fixpos((yyval.node)->nd_defn, (yyvsp[(4) - (6)].node)); + local_pop(); + /*% + $$ = dispatch3(def, $2, $4, $5); + %*/ + in_def--; + cur_mid = (yyvsp[(3) - (6)].id); + ;} + break; + + case 310: +#line 2904 "parse.y" + {lex_state = EXPR_FNAME;;} + break; + + case 311: +#line 2905 "parse.y" + { + in_single++; + lex_state = EXPR_END; /* force for args */ + /*%%%*/ + local_push(0); + /*% + %*/ + ;} + break; + + case 312: +#line 2916 "parse.y" + { + /*%%%*/ + NODE *body = remove_begin((yyvsp[(8) - (9)].node)); + reduce_nodes(&body); + (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body); + fixpos((yyval.node), (yyvsp[(2) - (9)].node)); + fixpos((yyval.node)->nd_defn, (yyvsp[(2) - (9)].node)); + local_pop(); + /*% + $$ = dispatch5(defs, $2, $3, $5, $7, $8); + %*/ + in_single--; + ;} + break; + + case 313: +#line 2930 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_BREAK(0); + /*% + $$ = dispatch1(break, arg_new()); + %*/ + ;} + break; + + case 314: +#line 2938 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_NEXT(0); + /*% + $$ = dispatch1(next, arg_new()); + %*/ + ;} + break; + + case 315: +#line 2946 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_REDO(); + /*% + $$ = dispatch0(redo); + %*/ + ;} + break; + + case 316: +#line 2954 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_RETRY(); + /*% + $$ = dispatch0(retry); + %*/ + ;} + break; + + case 317: +#line 2964 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); + if (!(yyval.node)) (yyval.node) = NEW_NIL(); + /*% + $$ = $1; + %*/ + ;} + break; + + case 318: +#line 2976 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "begin"); +#endif + ;} + break; + + case 319: +#line 2983 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "if"); +#endif + ;} + break; + + case 320: +#line 2990 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "unless"); +#endif + ;} + break; + + case 321: +#line 2997 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "while"); +#endif + ;} + break; + + case 322: +#line 3004 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "until"); +#endif + ;} + break; + + case 323: +#line 3011 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "case"); +#endif + ;} + break; + + case 324: +#line 3018 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "for"); +#endif + ;} + break; + + case 325: +#line 3025 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "class"); +#endif + ;} + break; + + case 326: +#line 3032 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "module"); +#endif + ;} + break; + + case 327: +#line 3039 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "def"); +#endif + ;} + break; + + case 328: +#line 3046 "parse.y" + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_pop(parser, "end"); /* POP */ +#endif + ;} + break; + + case 335: +#line 3077 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + fixpos((yyval.node), (yyvsp[(2) - (5)].node)); + /*% + $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); + %*/ + ;} + break; + + case 337: +#line 3089 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (2)].node); + /*% + $$ = dispatch1(else, $2); + %*/ + ;} + break; + + case 340: +#line 3103 "parse.y" + { + /*%%%*/ + (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); + /*% + $$ = dispatch1(mlhs_paren, $1); + %*/ + ;} + break; + + case 341: +#line 3111 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + ;} + break; + + case 342: +#line 3121 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + ;} + break; + + case 343: +#line 3129 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = mlhs_add($1, $3); + %*/ + ;} + break; + + case 344: +#line 3139 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); + /*% + $$ = $1; + %*/ + ;} + break; + + case 345: +#line 3147 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), assignable((yyvsp[(4) - (4)].id), 0)); + /*% + $$ = mlhs_add_star($1, $4); + %*/ + ;} + break; + + case 346: +#line 3155 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG(assignable((yyvsp[(4) - (6)].id), 0), (yyvsp[(6) - (6)].node))); + /*% + $$ = mlhs_add_star($1, $4); + %*/ + ;} + break; + + case 347: +#line 3163 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + ;} + break; + + case 348: +#line 3171 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node))); + /*% + $$ = mlhs_add_star($1, $5); + %*/ + ;} + break; + + case 349: +#line 3179 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, assignable((yyvsp[(2) - (2)].id), 0)); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + ;} + break; + + case 350: +#line 3187 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, NEW_POSTARG(assignable((yyvsp[(2) - (4)].id), 0), (yyvsp[(4) - (4)].node))); + /*% + #if 0 + TODO: Check me + #endif + $$ = mlhs_add_star($2, $4); + %*/ + ;} + break; + + case 351: +#line 3198 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, -1); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + ;} + break; + + case 352: +#line 3206 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + ;} + break; + + case 353: +#line 3216 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + %*/ + ;} + break; + + case 354: +#line 3224 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); + /*% + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + %*/ + ;} + break; + + case 355: +#line 3232 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 356: +#line 3240 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 357: +#line 3248 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 358: +#line 3256 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 1, 0, 0); + /*% + $$ = params_new($1, Qnil, Qnil, Qnil, Qnil); + dispatch1(excessed_comma, $$); + %*/ + ;} + break; + + case 359: +#line 3265 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 360: +#line 3273 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2)); + %*/ + ;} + break; + + case 361: +#line 3281 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 362: +#line 3289 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 363: +#line 3297 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + %*/ + ;} + break; + + case 364: +#line 3305 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + %*/ + ;} + break; + + case 365: +#line 3313 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2)); + %*/ + ;} + break; + + case 366: +#line 3321 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + %*/ + ;} + break; + + case 367: +#line 3329 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + %*/ + ;} + break; + + case 369: +#line 3340 "parse.y" + { + command_start = Qtrue; + ;} + break; + + case 370: +#line 3346 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + escape_Qundef($2)); + %*/ + ;} + break; + + case 371: +#line 3355 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + Qnil); + %*/ + ;} + break; + + case 372: +#line 3364 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (4)].node); + /*% + $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); + %*/ + ;} + break; + + case 374: +#line 3376 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = $2; + %*/ + ;} + break; + + case 377: +#line 3402 "parse.y" + { + /*%%%*/ + new_bv((yyvsp[(1) - (1)].id)); + /*% + $$ = $1; + %*/ + ;} + break; + + case 378: +#line 3410 "parse.y" + { + (yyval.node) = 0; + ;} + break; + + case 379: +#line 3415 "parse.y" + { + /*%%%*/ + dyna_push(); + /*% + %*/ + (yyval.num) = lpar_beg; + lpar_beg = ++paren_nest; + ;} + break; + + case 380: +#line 3425 "parse.y" + { + lpar_beg = (yyvsp[(1) - (3)].num); + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + (yyval.node)->nd_body = NEW_SCOPE((yyvsp[(2) - (3)].node)->nd_head, (yyvsp[(3) - (3)].node)); + dyna_pop(); + /*% + $$ = dispatch2(lambda, $2, $3); + %*/ + ;} + break; + + case 381: +#line 3438 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LAMBDA((yyvsp[(2) - (4)].node)); + /*% + $$ = dispatch1(paren, $2); + %*/ + ;} + break; + + case 382: +#line 3446 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LAMBDA((yyvsp[(1) - (1)].node)); + /*% + $$ = $1; + %*/ + ;} + break; + + case 383: +#line 3456 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (3)].node); + ;} + break; + + case 384: +#line 3460 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (3)].node); + ;} + break; + + case 385: +#line 3466 "parse.y" + { + /*%%%*/ + dyna_push(); + (yyval.num) = ruby_sourceline; + /*% %*/ + ;} + break; + + case 386: +#line 3475 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); + nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); + dyna_pop(); + /*% + $$ = dispatch2(do_block, escape_Qundef($3), $4); + %*/ + ;} + break; + + case 387: +#line 3487 "parse.y" + { + /*%%%*/ + if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) { + compile_error(PARSER_ARG "block given to yield"); + } + else { + block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); + } + (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); + (yyval.node) = (yyvsp[(2) - (2)].node); + fixpos((yyval.node), (yyvsp[(1) - (2)].node)); + /*% + $$ = method_add_block($1, $2); + %*/ + ;} + break; + + case 388: +#line 3503 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + ;} + break; + + case 389: +#line 3512 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_optarg($$, $4); + %*/ + ;} + break; + + case 390: +#line 3523 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); + fixpos((yyval.node), (yyvsp[(2) - (2)].node)); + /*% + $$ = method_arg(dispatch1(fcall, $1), $2); + %*/ + ;} + break; + + case 391: +#line 3532 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + ;} + break; + + case 392: +#line 3542 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + ;} + break; + + case 393: +#line 3552 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + %*/ + ;} + break; + + case 394: +#line 3560 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); + fixpos((yyval.node), (yyvsp[(1) - (3)].node)); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + ;} + break; + + case 395: +#line 3571 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); + fixpos((yyval.node), (yyvsp[(1) - (3)].node)); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + ;} + break; + + case 396: +#line 3582 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch1(super, $2); + %*/ + ;} + break; + + case 397: +#line 3590 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ZSUPER(); + /*% + $$ = dispatch0(zsuper); + %*/ + ;} + break; + + case 398: +#line 3598 "parse.y" + { + /*%%%*/ + if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) + (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node)); + else + (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node)); + fixpos((yyval.node), (yyvsp[(1) - (4)].node)); + /*% + $$ = dispatch2(aref, $1, escape_Qundef($3)); + %*/ + ;} + break; + + case 399: +#line 3612 "parse.y" + { + /*%%%*/ + dyna_push(); + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 400: +#line 3621 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); + nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); + nd_set_line((yyval.node)->nd_body, (yyvsp[(2) - (5)].num)); + nd_set_line((yyval.node)->nd_body->nd_body, (yyvsp[(2) - (5)].num)); + dyna_pop(); + /*% + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + %*/ + ;} + break; + + case 401: +#line 3633 "parse.y" + { + /*%%%*/ + dyna_push(); + (yyval.num) = ruby_sourceline; + /*% + %*/ + ;} + break; + + case 402: +#line 3642 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); + nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); + dyna_pop(); + /*% + $$ = dispatch2(do_block, escape_Qundef($3), $4); + %*/ + ;} + break; + + case 403: +#line 3656 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); + /*% + $$ = dispatch3(when, $2, $4, escape_Qundef($5)); + %*/ + ;} + break; + + case 406: +#line 3672 "parse.y" + { + /*%%%*/ + if ((yyvsp[(3) - (6)].node)) { + (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO()); + (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)); + } + (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); + fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node)); + /*% + $$ = dispatch4(rescue, + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($5), + escape_Qundef($6)); + %*/ + ;} + break; + + case 408: +#line 3692 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + ;} + break; + + case 409: +#line 3700 "parse.y" + { + /*%%%*/ + if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node); + /*% + $$ = $1; + %*/ + ;} + break; + + case 411: +#line 3711 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (2)].node); + ;} + break; + + case 413: +#line 3718 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (2)].node); + /*% + $$ = dispatch1(ensure, $2); + %*/ + ;} + break; + + case 416: +#line 3730 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); + /*% + $$ = dispatch1(symbol_literal, $1); + %*/ + ;} + break; + + case 418: +#line 3741 "parse.y" + { + /*%%%*/ + NODE *node = (yyvsp[(1) - (1)].node); + if (!node) { + node = NEW_STR(STR_NEW0()); + } + else { + node = evstr2dstr(node); + } + (yyval.node) = node; + /*% + $$ = $1; + %*/ + ;} + break; + + case 421: +#line 3760 "parse.y" + { + /*%%%*/ + (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(string_concat, $1, $2); + %*/ + ;} + break; + + case 422: +#line 3770 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(string_literal, $2); + %*/ + ;} + break; + + case 423: +#line 3780 "parse.y" + { + /*%%%*/ + NODE *node = (yyvsp[(2) - (3)].node); + if (!node) { + node = NEW_XSTR(STR_NEW0()); + } + else { + switch (nd_type(node)) { + case NODE_STR: + nd_set_type(node, NODE_XSTR); + break; + case NODE_DSTR: + nd_set_type(node, NODE_DXSTR); + break; + default: + node = NEW_NODE(NODE_DXSTR, STR_NEW0(), 1, NEW_LIST(node)); + break; + } + } + (yyval.node) = node; + /*% + $$ = dispatch1(xstring_literal, $2); + %*/ + ;} + break; + + case 424: +#line 3807 "parse.y" + { + /*%%%*/ + int options = (yyvsp[(3) - (3)].num); + NODE *node = (yyvsp[(2) - (3)].node); + NODE *list; + if (!node) { + node = NEW_LIT(reg_compile(STR_NEW0(), options)); + } + else switch (nd_type(node)) { + case NODE_STR: + { + VALUE src = node->nd_lit; + nd_set_type(node, NODE_LIT); + node->nd_lit = reg_compile(src, options); + } + break; + default: + node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); + case NODE_DSTR: + if (options & RE_OPTION_ONCE) { + nd_set_type(node, NODE_DREGX_ONCE); + } + else { + nd_set_type(node, NODE_DREGX); + } + node->nd_cflag = options & RE_OPTION_MASK; + reg_fragment_check(node->nd_lit, options); + for (list = node->nd_next; list; list = list->nd_next) { + if (nd_type(list->nd_head) == NODE_STR) { + reg_fragment_check(list->nd_head->nd_lit, options); + } + } + break; + } + (yyval.node) = node; + /*% + $$ = dispatch2(regexp_literal, $2, $3); + %*/ + ;} + break; + + case 425: +#line 3849 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ZARRAY(); + /*% + $$ = dispatch0(words_new); + %*/ + ;} + break; + + case 426: +#line 3857 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (3)].node); + ;} + break; + + case 427: +#line 3863 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = dispatch0(words_new); + %*/ + ;} + break; + + case 428: +#line 3871 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); + /*% + $$ = dispatch2(words_add, $1, $2); + %*/ + ;} + break; + + case 430: +#line 3889 "parse.y" + { + /*%%%*/ + (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(word_add, $1, $2); + %*/ + ;} + break; + + case 431: +#line 3899 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_ZARRAY(); + /*% + $$ = dispatch0(qwords_new); + %*/ + ;} + break; + + case 432: +#line 3907 "parse.y" + { + (yyval.node) = (yyvsp[(2) - (3)].node); + ;} + break; + + case 433: +#line 3913 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = dispatch0(qwords_new); + %*/ + ;} + break; + + case 434: +#line 3921 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); + /*% + $$ = dispatch2(qwords_add, $1, $2); + %*/ + ;} + break; + + case 435: +#line 3931 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = dispatch0(string_content); + %*/ + ;} + break; + + case 436: +#line 3939 "parse.y" + { + /*%%%*/ + (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(string_add, $1, $2); + %*/ + ;} + break; + + case 437: +#line 3949 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = dispatch0(xstring_new); + %*/ + ;} + break; + + case 438: +#line 3957 "parse.y" + { + /*%%%*/ + (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(xstring_add, $1, $2); + %*/ + ;} + break; + + case 440: +#line 3968 "parse.y" + { + (yyval.node) = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + ;} + break; + + case 441: +#line 3974 "parse.y" + { + /*%%%*/ + lex_strterm = (yyvsp[(2) - (3)].node); + (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node)); + /*% + lex_strterm = $2; + $$ = dispatch1(string_dvar, $3); + %*/ + ;} + break; + + case 442: +#line 3984 "parse.y" + { + (yyval.node) = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + ;} + break; + + case 443: +#line 3992 "parse.y" + { + lex_strterm = (yyvsp[(2) - (4)].node); + COND_LEXPOP(); + CMDARG_LEXPOP(); + /*%%%*/ + if ((yyvsp[(3) - (4)].node)) (yyvsp[(3) - (4)].node)->flags &= ~NODE_FL_NEWLINE; + (yyval.node) = new_evstr((yyvsp[(3) - (4)].node)); + /*% + $$ = dispatch1(string_embexpr, $3); + %*/ + ;} + break; + + case 444: +#line 4006 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id)); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + ;} + break; + + case 445: +#line 4014 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id)); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + ;} + break; + + case 446: +#line 4022 "parse.y" + { + /*%%%*/ + (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id)); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + ;} + break; + + case 448: +#line 4033 "parse.y" + { + /*%%%*/ + lex_state = EXPR_END; + (yyval.id) = (yyvsp[(2) - (2)].id); + /*% + lex_state = EXPR_END; + $$ = dispatch1(symbol, $2); + %*/ + ;} + break; + + case 453: +#line 4051 "parse.y" + { + /*%%%*/ + lex_state = EXPR_END; + if (!((yyval.node) = (yyvsp[(2) - (3)].node))) { + (yyval.node) = NEW_LIT(ID2SYM(rb_intern(""))); + } + else { + VALUE lit; + + switch (nd_type((yyval.node))) { + case NODE_DSTR: + nd_set_type((yyval.node), NODE_DSYM); + break; + case NODE_STR: + lit = (yyval.node)->nd_lit; + (yyval.node)->nd_lit = ID2SYM(rb_intern_str(lit)); + nd_set_type((yyval.node), NODE_LIT); + break; + default: + (yyval.node) = NEW_NODE(NODE_DSYM, STR_NEW0(), 1, NEW_LIST((yyval.node))); + break; + } + } + /*% + lex_state = EXPR_END; + $$ = dispatch1(dyna_symbol, $2); + %*/ + ;} + break; + + case 456: +#line 4084 "parse.y" + { + /*%%%*/ + (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + ;} + break; + + case 457: +#line 4092 "parse.y" + { + /*%%%*/ + (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + ;} + break; + + case 463: +#line 4106 "parse.y" + {ifndef_ripper((yyval.id) = keyword_nil);;} + break; + + case 464: +#line 4107 "parse.y" + {ifndef_ripper((yyval.id) = keyword_self);;} + break; + + case 465: +#line 4108 "parse.y" + {ifndef_ripper((yyval.id) = keyword_true);;} + break; + + case 466: +#line 4109 "parse.y" + {ifndef_ripper((yyval.id) = keyword_false);;} + break; + + case 467: +#line 4110 "parse.y" + {ifndef_ripper((yyval.id) = keyword__FILE__);;} + break; + + case 468: +#line 4111 "parse.y" + {ifndef_ripper((yyval.id) = keyword__LINE__);;} + break; + + case 469: +#line 4112 "parse.y" + {ifndef_ripper((yyval.id) = keyword__ENCODING__);;} + break; + + case 470: +#line 4116 "parse.y" + { + /*%%%*/ + if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + ;} + break; + + case 471: +#line 4126 "parse.y" + { + /*%%%*/ + (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); + /*% + $$ = dispatch1(var_field, $1); + %*/ + ;} + break; + + case 474: +#line 4140 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = Qnil; + %*/ + ;} + break; + + case 475: +#line 4148 "parse.y" + { + lex_state = EXPR_BEG; + ;} + break; + + case 476: +#line 4152 "parse.y" + { + (yyval.node) = (yyvsp[(3) - (4)].node); + ;} + break; + + case 477: +#line 4156 "parse.y" + { + /*%%%*/ + yyerrok; + (yyval.node) = 0; + /*% + yyerrok; + $$ = Qnil; + %*/ + ;} + break; + + case 478: +#line 4168 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(2) - (3)].node); + lex_state = EXPR_BEG; + command_start = Qtrue; + /*% + $$ = dispatch1(paren, $2); + lex_state = EXPR_BEG; + command_start = Qtrue; + %*/ + ;} + break; + + case 479: +#line 4180 "parse.y" + { + (yyval.node) = (yyvsp[(1) - (2)].node); + ;} + break; + + case 480: +#line 4186 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + %*/ + ;} + break; + + case 481: +#line 4194 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); + /*% + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + %*/ + ;} + break; + + case 482: +#line 4202 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 483: +#line 4210 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 484: +#line 4218 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 485: +#line 4226 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 486: +#line 4234 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); + %*/ + ;} + break; + + case 487: +#line 4242 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + %*/ + ;} + break; + + case 488: +#line 4250 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); + /*% + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + %*/ + ;} + break; + + case 489: +#line 4258 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + %*/ + ;} + break; + + case 490: +#line 4266 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + %*/ + ;} + break; + + case 491: +#line 4274 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); + /*% + $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); + %*/ + ;} + break; + + case 492: +#line 4282 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); + /*% + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + %*/ + ;} + break; + + case 493: +#line 4290 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + %*/ + ;} + break; + + case 494: +#line 4298 "parse.y" + { + /*%%%*/ + (yyval.node) = new_args(0, 0, 0, 0, 0); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); + %*/ + ;} + break; + + case 495: +#line 4308 "parse.y" + { + /*%%%*/ + yyerror("formal argument cannot be a constant"); + (yyval.id) = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + ;} + break; + + case 496: +#line 4317 "parse.y" + { + /*%%%*/ + yyerror("formal argument cannot be an instance variable"); + (yyval.id) = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + ;} + break; + + case 497: +#line 4326 "parse.y" + { + /*%%%*/ + yyerror("formal argument cannot be a global variable"); + (yyval.id) = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + ;} + break; + + case 498: +#line 4335 "parse.y" + { + /*%%%*/ + yyerror("formal argument cannot be a class variable"); + (yyval.id) = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + ;} + break; + + case 500: +#line 4347 "parse.y" + { + /*%%%*/ + if (!is_local_id((yyvsp[(1) - (1)].id))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (1)].id)); + /*% + %*/ + (yyval.id) = (yyvsp[(1) - (1)].id); + ;} + break; + + case 501: +#line 4359 "parse.y" + { + /*%%%*/ + arg_var((yyvsp[(1) - (1)].id)); + (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1); + /*% + %*/ + ;} + break; + + case 502: +#line 4367 "parse.y" + { + /*%%%*/ + ID tid = internal_id(); + arg_var(tid); + if (dyna_in_block()) { + (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid); + } + else { + (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid); + } + (yyval.node) = NEW_ARGS_AUX(tid, 1); + (yyval.node)->nd_next = (yyvsp[(2) - (3)].node); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + ;} + break; + + case 504: +#line 4393 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(1) - (3)].node); + (yyval.node)->nd_plen++; + (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next); + rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node)); + /*% + $$ = rb_ary_push($1, $3); + %*/ + ;} + break; + + case 505: +#line 4406 "parse.y" + { + /*%%%*/ + if (!is_local_id((yyvsp[(1) - (3)].id))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (3)].id)); + arg_var((yyvsp[(1) - (3)].id)); + (yyval.node) = NEW_OPT_ARG(0, assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node))); + /*% + $$ = rb_assoc_new($1, $3); + %*/ + ;} + break; + + case 506: +#line 4420 "parse.y" + { + /*%%%*/ + if (!is_local_id((yyvsp[(1) - (3)].id))) + yyerror("formal argument must be local variable"); + shadowing_lvar((yyvsp[(1) - (3)].id)); + arg_var((yyvsp[(1) - (3)].id)); + (yyval.node) = NEW_OPT_ARG(0, assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node))); + /*% + $$ = rb_assoc_new($1, $3); + %*/ + ;} + break; + + case 507: +#line 4434 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(1) - (1)].node); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + ;} + break; + + case 508: +#line 4442 "parse.y" + { + /*%%%*/ + NODE *opts = (yyvsp[(1) - (3)].node); + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[(1) - (3)].node); + /*% + $$ = rb_ary_push($1, $3); + %*/ + ;} + break; + + case 509: +#line 4458 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(1) - (1)].node); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + ;} + break; + + case 510: +#line 4466 "parse.y" + { + /*%%%*/ + NODE *opts = (yyvsp[(1) - (3)].node); + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = (yyvsp[(3) - (3)].node); + (yyval.node) = (yyvsp[(1) - (3)].node); + /*% + $$ = rb_ary_push($1, $3); + %*/ + ;} + break; + + case 513: +#line 4486 "parse.y" + { + /*%%%*/ + if (!is_local_id((yyvsp[(2) - (2)].id))) + yyerror("rest argument must be local variable"); + shadowing_lvar((yyvsp[(2) - (2)].id)); + arg_var((yyvsp[(2) - (2)].id)); + (yyval.id) = (yyvsp[(2) - (2)].id); + /*% + $$ = dispatch1(rest_param, $2); + %*/ + ;} + break; + + case 514: +#line 4498 "parse.y" + { + /*%%%*/ + (yyval.id) = internal_id(); + arg_var((yyval.id)); + /*% + $$ = dispatch1(rest_param, Qnil); + %*/ + ;} + break; + + case 517: +#line 4513 "parse.y" + { + /*%%%*/ + if (!is_local_id((yyvsp[(2) - (2)].id))) + yyerror("block argument must be local variable"); + else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id))) + yyerror("duplicated block argument name"); + shadowing_lvar((yyvsp[(2) - (2)].id)); + arg_var((yyvsp[(2) - (2)].id)); + (yyval.id) = (yyvsp[(2) - (2)].id); + /*% + $$ = dispatch1(blockarg, $2); + %*/ + ;} + break; + + case 518: +#line 4529 "parse.y" + { + (yyval.id) = (yyvsp[(2) - (2)].id); + ;} + break; + + case 519: +#line 4533 "parse.y" + { + /*%%%*/ + (yyval.id) = 0; + /*% + $$ = Qundef; + %*/ + ;} + break; + + case 520: +#line 4543 "parse.y" + { + /*%%%*/ + value_expr((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); + if (!(yyval.node)) (yyval.node) = NEW_NIL(); + /*% + $$ = $1; + %*/ + ;} + break; + + case 521: +#line 4552 "parse.y" + {lex_state = EXPR_BEG;;} + break; + + case 522: +#line 4553 "parse.y" + { + /*%%%*/ + if ((yyvsp[(3) - (4)].node) == 0) { + yyerror("can't define singleton method for ()."); + } + else { + switch (nd_type((yyvsp[(3) - (4)].node))) { + case NODE_STR: + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_DREGX: + case NODE_LIT: + case NODE_ARRAY: + case NODE_ZARRAY: + yyerror("can't define singleton method for literals"); + default: + value_expr((yyvsp[(3) - (4)].node)); + break; + } + } + (yyval.node) = (yyvsp[(3) - (4)].node); + /*% + $$ = dispatch1(paren, $3); + %*/ + ;} + break; + + case 524: +#line 4583 "parse.y" + { + /*%%%*/ + (yyval.node) = (yyvsp[(1) - (2)].node); + /*% + $$ = dispatch1(assoclist_from_args, $1); + %*/ + ;} + break; + + case 526: +#line 4600 "parse.y" + { + /*%%%*/ + (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); + /*% + $$ = rb_ary_push($1, $3); + %*/ + ;} + break; + + case 527: +#line 4610 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); + /*% + $$ = dispatch2(assoc_new, $1, $3); + %*/ + ;} + break; + + case 528: +#line 4618 "parse.y" + { + /*%%%*/ + (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node)); + /*% + $$ = dispatch2(assoc_new, $1, $2); + %*/ + ;} + break; + + case 550: +#line 4674 "parse.y" + {yyerrok;;} + break; + + case 553: +#line 4679 "parse.y" + {yyerrok;;} + break; + + case 554: +#line 4683 "parse.y" + { + /*%%%*/ + (yyval.node) = 0; + /*% + $$ = Qundef; + %*/ + ;} + break; + + +/* Line 1267 of yacc.c. */ +#line 9722 "parse.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + parser_yyerror (parser, YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + parser_yyerror (parser, yymsg); + } + else + { + parser_yyerror (parser, YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, parser); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, parser); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + parser_yyerror (parser, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, parser); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, parser); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 4691 "parse.y" + +# undef parser +# undef yylex +# undef yylval +# define yylval (*((YYSTYPE*)(parser->parser_yylval))) + +static int parser_regx_options(struct parser_params*); +static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); +static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); +static int parser_parse_string(struct parser_params*,NODE*); +static int parser_here_document(struct parser_params*,NODE*); + + +# define nextc() parser_nextc(parser) +# define pushback(c) parser_pushback(parser, c) +# define newtok() parser_newtok(parser) +# define tokspace(n) parser_tokspace(parser, n) +# define tokadd(c) parser_tokadd(parser, c) +# define tok_hex(numlen) parser_tok_hex(parser, numlen) +# define read_escape(flags,e) parser_read_escape(parser, flags, e) +# define tokadd_escape(e) parser_tokadd_escape(parser, e) +# define regx_options() parser_regx_options(parser) +# define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e) +# define parse_string(n) parser_parse_string(parser,n) +# define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) +# define here_document(n) parser_here_document(parser,n) +# define heredoc_identifier() parser_heredoc_identifier(parser) +# define heredoc_restore(n) parser_heredoc_restore(parser,n) +# define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i) + +#ifdef RIPPER +/* FIXME */ +# define local_id(x) 1 +# define dyna_in_block() 1 +#endif /* RIPPER */ + +#ifndef RIPPER +# define set_yylval_str(x) yylval.node = NEW_STR(x) +# define set_yylval_num(x) yylval.num = x +# define set_yylval_id(x) yylval.id = x +# define set_yylval_literal(x) yylval.node = NEW_LIT(x) +# define set_yylval_node(x) yylval.node = x +# define yylval_id() yylval.id +#else +# define set_yylval_str(x) (void)(x) +# define set_yylval_num(x) (void)(x) +# define set_yylval_id(x) (void)(x) +# define set_yylval_literal(x) (void)(x) +# define set_yylval_node(x) (void)(x) +# define yylval_id() SYM2ID(yylval.val) +#endif + +#ifdef RIPPER +#define ripper_flush(p) (p->tokp = p->parser_lex_p) + +static void +ripper_dispatch_scan_event(struct parser_params *parser, int t) +{ + VALUE str; + + if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); + if (lex_p == parser->tokp) return; + str = STR_NEW(parser->tokp, lex_p - parser->tokp); + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str); + ripper_flush(parser); +} + +static void +ripper_dispatch_delayed_token(struct parser_params *parser, int t) +{ + int saved_line = ruby_sourceline; + const char *saved_tokp = parser->tokp; + + ruby_sourceline = parser->delayed_line; + parser->tokp = lex_pbeg + parser->delayed_col; + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); + parser->delayed = Qnil; + ruby_sourceline = saved_line; + parser->tokp = saved_tokp; +} +#endif /* RIPPER */ + +#include "ruby/regex.h" +#include "ruby/util.h" + +/* We remove any previous definition of `SIGN_EXTEND_CHAR', + since ours (we hope) works properly with all combinations of + machines, compilers, `char' and `unsigned char' argument types. + (Per Bothner suggested the basic approach.) */ +#undef SIGN_EXTEND_CHAR +#if __STDC__ +# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) +#endif + +#define parser_encoding_name() (parser->enc->name) +#define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) +#define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) +#define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) +#define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) + +#define parser_isascii() ISASCII(*(lex_p-1)) + +#ifndef RIPPER +static int +token_info_get_column(struct parser_params *parser, const char *token) +{ + int column = 1; + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p == '\t') { + column = (((column - 1) / 8) + 1) * 8; + } + column++; + } + return column; +} + +static int +token_info_has_nonspaces(struct parser_params *parser, const char *token) +{ + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p != ' ' && *p != '\t') { + return 1; + } + } + return 0; +} + +static void +token_info_push(struct parser_params *parser, const char *token) +{ + token_info *ptinfo; + + if (compile_for_eval) return; + ptinfo = ALLOC(token_info); + ptinfo->token = token; + ptinfo->linenum = ruby_sourceline; + ptinfo->column = token_info_get_column(parser, token); + ptinfo->nonspc = token_info_has_nonspaces(parser, token); + ptinfo->next = parser->parser_token_info; + + parser->parser_token_info = ptinfo; +} + +static void +token_info_pop(struct parser_params *parser, const char *token) +{ + int linenum; + token_info *ptinfo = parser->parser_token_info; + + if (!ptinfo) return; + parser->parser_token_info = ptinfo->next; + if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ + goto finish; + } + linenum = ruby_sourceline; + if (linenum == ptinfo->linenum) { /* SKIP */ + goto finish; + } + if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ + goto finish; + } + rb_compile_warning(ruby_sourcefile, linenum, + "mismatched indentations at '%s' with '%s' at %d", + token, ptinfo->token, ptinfo->linenum); + + finish: + xfree(ptinfo); +} +#endif /* RIPPER */ + +static int +parser_yyerror(struct parser_params *parser, const char *msg) +{ +#ifndef RIPPER + const int max_line_margin = 30; + const char *p, *pe; + char *buf; + int len, i; + + compile_error(PARSER_ARG "%s", msg); + p = lex_p; + while (lex_pbeg <= p) { + if (*p == '\n') break; + p--; + } + p++; + + pe = lex_p; + while (pe < lex_pend) { + if (*pe == '\n') break; + pe++; + } + + len = pe - p; + if (len > 4) { + char *p2; + const char *pre = "", *post = ""; + + if (len > max_line_margin * 2 + 10) { + if (lex_p - p > max_line_margin) { + p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); + pre = "..."; + } + if (pe - lex_p > max_line_margin) { + pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); + post = "..."; + } + len = pe - p; + } + buf = ALLOCA_N(char, len+2); + MEMCPY(buf, p, char, len); + buf[len] = '\0'; + rb_compile_error_append("%s%s%s", pre, buf, post); + + i = lex_p - p; + p2 = buf; pe = buf + len; + + while (p2 < pe) { + if (*p2 != '\t') *p2 = ' '; + p2++; + } + buf[i] = '^'; + buf[i+1] = '\0'; + rb_compile_error_append("%s%s", pre, buf); + } +#else + dispatch1(parse_error, STR_NEW2(msg)); +#endif /* !RIPPER */ + return 0; +} + +static void parser_prepare(struct parser_params *parser); + +#ifndef RIPPER +VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); + +static VALUE +debug_lines(const char *f) +{ + if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { + VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + if (TYPE(hash) == T_HASH) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new(); + rb_hash_aset(hash, fname, lines); + return lines; + } + } + return 0; +} + +static VALUE +coverage(const char *f, int n) +{ + extern VALUE rb_get_coverages(void); + VALUE coverages = rb_get_coverages(); + if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new2(n); + int i; + RBASIC(lines)->klass = 0; + for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; + RARRAY(lines)->as.heap.len = n; + rb_hash_aset(coverages, fname, lines); + return lines; + } + return 0; +} + +static int +e_option_supplied(struct parser_params *parser) +{ + if (strcmp(ruby_sourcefile, "-e") == 0) + return Qtrue; + return Qfalse; +} + +static VALUE +yycompile0(VALUE arg, int tracing) +{ + int n; + NODE *tree; + struct parser_params *parser = (struct parser_params *)arg; + + if (!compile_for_eval && rb_safe_level() == 0) { + ruby_debug_lines = debug_lines(ruby_sourcefile); + if (ruby_debug_lines && ruby_sourceline > 0) { + VALUE str = STR_NEW0(); + n = ruby_sourceline; + do { + rb_ary_push(ruby_debug_lines, str); + } while (--n); + } + + if (!e_option_supplied(parser)) { + ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); + } + } + + parser_prepare(parser); + deferred_nodes = 0; + n = yyparse((void*)parser); + ruby_debug_lines = 0; + ruby_coverage = 0; + compile_for_eval = 0; + + lex_strterm = 0; + lex_p = lex_pbeg = lex_pend = 0; + lex_lastline = lex_nextline = 0; + if (parser->nerr) { + return 0; + } + tree = ruby_eval_tree; + if (!tree) { + tree = NEW_NIL(); + } + if (ruby_eval_tree_begin) { + NODE *scope = ruby_eval_tree; + + if (scope) { + scope->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, scope->nd_body); + } + tree = scope; + } + else { + tree = ruby_eval_tree; + } + return (VALUE)tree; +} + +static NODE* +yycompile(struct parser_params *parser, const char *f, int line) +{ + ruby_sourcefile = ruby_strdup(f); + ruby_sourceline = line - 1; + return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue); +} +#endif /* !RIPPER */ + +static VALUE +lex_get_str(struct parser_params *parser, VALUE s) +{ + char *beg, *end, *pend; + + beg = RSTRING_PTR(s); + if (lex_gets_ptr) { + if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; + beg += lex_gets_ptr; + } + pend = RSTRING_PTR(s) + RSTRING_LEN(s); + end = beg; + while (end < pend) { + if (*end++ == '\n') break; + } + lex_gets_ptr = end - RSTRING_PTR(s); + return rb_enc_str_new(beg, end - beg, rb_enc_get(s)); +} + +static VALUE +lex_getline(struct parser_params *parser) +{ + VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); +#ifndef RIPPER + if (ruby_debug_lines && !NIL_P(line)) { + rb_ary_push(ruby_debug_lines, line); + } + if (ruby_coverage && !NIL_P(line)) { + rb_ary_push(ruby_coverage, Qnil); + } +#endif + return line; +} + +#ifndef RIPPER +NODE* +rb_compile_string(const char *f, VALUE s, int line) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_string(vparser, f, s, line); +} + +NODE* +rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) +{ + struct parser_params *parser; + NODE *node; + volatile VALUE tmp; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_get_str; + lex_gets_ptr = 0; + lex_input = s; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, line); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} + +NODE* +rb_compile_cstr(const char *f, const char *s, int len, int line) +{ + return rb_compile_string(f, rb_str_new(s, len), line); +} + +NODE* +rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) +{ + return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line); +} + +static VALUE +lex_io_gets(struct parser_params *parser, VALUE io) +{ + return rb_io_gets(io); +} + +NODE* +rb_compile_file(const char *f, VALUE file, int start) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_file(vparser, f, file, start); +} + +NODE* +rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) +{ + struct parser_params *parser; + volatile VALUE tmp; + NODE *node; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_io_gets; + lex_input = file; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, start); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} +#endif /* !RIPPER */ + +#define STR_FUNC_ESCAPE 0x01 +#define STR_FUNC_EXPAND 0x02 +#define STR_FUNC_REGEXP 0x04 +#define STR_FUNC_QWORDS 0x08 +#define STR_FUNC_SYMBOL 0x10 +#define STR_FUNC_INDENT 0x20 + +enum string_type { + str_squote = (0), + str_dquote = (STR_FUNC_EXPAND), + str_xquote = (STR_FUNC_EXPAND), + str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), + str_sword = (STR_FUNC_QWORDS), + str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), + str_ssym = (STR_FUNC_SYMBOL), + str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) +}; + +static VALUE +parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) +{ + VALUE str; + + str = rb_enc_str_new(p, n, enc); + if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + } + else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + + return str; +} + +#define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) +#define peek(c) (lex_p < lex_pend && (c) == *lex_p) + +static inline int +parser_nextc(struct parser_params *parser) +{ + int c; + + if (lex_p == lex_pend) { + VALUE v = lex_nextline; + lex_nextline = 0; + if (!v) { + if (parser->eofp) + return -1; + + if (!lex_input || NIL_P(v = lex_getline(parser))) { + parser->eofp = Qtrue; + lex_goto_eol(parser); + return -1; + } + } + { +#ifdef RIPPER + if (parser->tokp < lex_pend) { + if (NIL_P(parser->delayed)) { + parser->delayed = rb_str_buf_new(1024); + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + parser->delayed_line = ruby_sourceline; + parser->delayed_col = parser->tokp - lex_pbeg; + } + else { + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + } + } +#endif + if (heredoc_end > 0) { + ruby_sourceline = heredoc_end; + heredoc_end = 0; + } + ruby_sourceline++; + parser->line_count++; + lex_pbeg = lex_p = RSTRING_PTR(v); + lex_pend = lex_p + RSTRING_LEN(v); +#ifdef RIPPER + ripper_flush(parser); +#endif + lex_lastline = v; + } + } + c = (unsigned char)*lex_p++; + if (c == '\r' && peek('\n')) { + lex_p++; + c = '\n'; + } + + return c; +} + +static void +parser_pushback(struct parser_params *parser, int c) +{ + if (c == -1) return; + lex_p--; + if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { + lex_p--; + } +} + +#define was_bol() (lex_p == lex_pbeg + 1) + +#define tokfix() (tokenbuf[tokidx]='\0') +#define tok() tokenbuf +#define toklen() tokidx +#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) + +static char* +parser_newtok(struct parser_params *parser) +{ + tokidx = 0; + if (!tokenbuf) { + toksiz = 60; + tokenbuf = ALLOC_N(char, 60); + } + if (toksiz > 4096) { + toksiz = 60; + REALLOC_N(tokenbuf, char, 60); + } + return tokenbuf; +} + +static char * +parser_tokspace(struct parser_params *parser, int n) +{ + tokidx += n; + + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); + REALLOC_N(tokenbuf, char, toksiz); + } + return &tokenbuf[tokidx-n]; +} + +static void +parser_tokadd(struct parser_params *parser, int c) +{ + tokenbuf[tokidx++] = (char)c; + if (tokidx >= toksiz) { + toksiz *= 2; + REALLOC_N(tokenbuf, char, toksiz); + } +} + +static int +parser_tok_hex(struct parser_params *parser, int *numlen) +{ + int c; + + c = scan_hex(lex_p, 2, numlen); + if (!*numlen) { + yyerror("invalid hex escape"); + return 0; + } + lex_p += *numlen; + return c; +} + +#define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) + +static int +parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, + int string_literal, int symbol_literal, int regexp_literal) +{ + /* + * If string_literal is true, then we allow multiple codepoints + * in \u{}, and add the codepoints to the current token. + * Otherwise we're parsing a character literal and return a single + * codepoint without adding it + */ + + int codepoint; + int numlen; + + if (regexp_literal) { tokadd('\\'); tokadd('u'); } + + if (peek('{')) { /* handle \u{...} form */ + do { + if (regexp_literal) { tokadd(*lex_p); } + nextc(); + codepoint = scan_hex(lex_p, 6, &numlen); + if (numlen == 0) { + yyerror("invalid Unicode escape"); + return 0; + } + if (codepoint > 0x10ffff) { + yyerror("invalid Unicode codepoint (too large)"); + return 0; + } + lex_p += numlen; + if (regexp_literal) { + tokcopy(numlen); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u{0}'"); + return 0; + } + + tokadd(codepoint); + } + } while (string_literal && (peek(' ') || peek('\t'))); + + if (!peek('}')) { + yyerror("unterminated Unicode escape"); + return 0; + } + + if (regexp_literal) { tokadd('}'); } + nextc(); + } + else { /* handle \uxxxx form */ + codepoint = scan_hex(lex_p, 4, &numlen); + if (numlen < 4) { + yyerror("invalid Unicode escape"); + return 0; + } + lex_p += 4; + if (regexp_literal) { + tokcopy(4); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u0000'"); + return 0; + } + + tokadd(codepoint); + } + } + + return codepoint; +} + +#define ESCAPE_CONTROL 1 +#define ESCAPE_META 2 + +static int +parser_read_escape(struct parser_params *parser, int flags, + rb_encoding **encp) +{ + int c; + int numlen; + + switch (c = nextc()) { + case '\\': /* Backslash */ + return c; + + case 'n': /* newline */ + return '\n'; + + case 't': /* horizontal tab */ + return '\t'; + + case 'r': /* carriage-return */ + return '\r'; + + case 'f': /* form-feed */ + return '\f'; + + case 'v': /* vertical tab */ + return '\13'; + + case 'a': /* alarm(bell) */ + return '\007'; + + case 'e': /* escape */ + return 033; + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + + pushback(c); + c = scan_oct(lex_p, 3, &numlen); + lex_p += numlen; + } + return c; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + c = tok_hex(&numlen); + if (numlen == 0) return 0; + return c; + + case 'b': /* backspace */ + return '\010'; + + case 's': /* space */ + return ' '; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + if ((c = nextc()) == '\\') { + return read_escape(flags|ESCAPE_META, encp) | 0x80; + } + else if (c == -1 || !ISASCII(c)) goto eof; + else { + return ((c & 0xff) | 0x80); + } + + case 'C': + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc())== '\\') { + c = read_escape(flags|ESCAPE_CONTROL, encp); + } + else if (c == '?') + return 0177; + else if (c == -1 || !ISASCII(c)) goto eof; + return c & 0x9f; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return '\0'; + + default: + return c; + } +} + +static void +parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) +{ + int len = rb_enc_codelen(c, enc); + rb_enc_mbcput(c, tokspace(len), enc); +} + +static int +parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) +{ + int c; + int flags = 0; + + first: + switch (c = nextc()) { + case '\n': + return 0; /* just ignore */ + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int oct; + + oct = scan_oct(--lex_p, 3, &numlen); + if (numlen == 0) goto eof; + lex_p += numlen; + tokcopy(numlen + 1); + } + return 0; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int hex; + + hex = tok_hex(&numlen); + if (numlen == 0) goto eof; + tokcopy(numlen + 2); + } + return 0; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + flags |= ESCAPE_META; + goto escaped; + + case 'C': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + goto escaped; + + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + tokcopy(2); + flags |= ESCAPE_CONTROL; + escaped: + if ((c = nextc()) == '\\') { + goto first; + } + else if (c == -1) goto eof; + tokadd(c); + return 0; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return -1; + + default: + tokadd('\\'); + tokadd(c); + } + return 0; +} + +extern int rb_char_to_option_kcode(int c, int *option, int *kcode); + +static int +parser_regx_options(struct parser_params *parser) +{ + int kcode = 0; + int options = 0; + int c, opt, kc; + + newtok(); + while (c = nextc(), ISALPHA(c)) { + if (c == 'o') { + options |= RE_OPTION_ONCE; + } + else if (rb_char_to_option_kcode(c, &opt, &kc)) { + options |= opt; + if (kc >= 0) kcode = c; + } + else { + tokadd(c); + } + } + pushback(c); + if (toklen()) { + tokfix(); + compile_error(PARSER_ARG "unknown regexp option%s - %s", + toklen() > 1 ? "s" : "", tok()); + } + return options | RE_OPTION_ENCODING(kcode); +} + +static void +dispose_string(VALUE str) +{ + /* TODO: should use another API? */ + if (RBASIC(str)->flags & RSTRING_NOEMBED) + xfree(RSTRING_PTR(str)); + rb_gc_force_recycle(str); +} + +static int +parser_tokadd_mbchar(struct parser_params *parser, int c) +{ + int len = parser_precise_mbclen(); + if (!MBCLEN_CHARFOUND_P(len)) { + compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); + return -1; + } + tokadd(c); + lex_p += --len; + if (len > 0) tokcopy(len); + return c; +} + +#define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) + +static int +parser_tokadd_string(struct parser_params *parser, + int func, int term, int paren, long *nest, + rb_encoding **encp) +{ + int c; + int has_nonascii = 0; + rb_encoding *enc = *encp; + char *errbuf = 0; + static const char mixed_msg[] = "%s mixed within %s source"; + +#define mixed_error(enc1, enc2) if (!errbuf) { \ + int len = sizeof(mixed_msg) - 4; \ + len += strlen(rb_enc_name(enc1)); \ + len += strlen(rb_enc_name(enc2)); \ + errbuf = ALLOCA_N(char, len); \ + snprintf(errbuf, len, mixed_msg, \ + rb_enc_name(enc1), \ + rb_enc_name(enc2)); \ + yyerror(errbuf); \ + } +#define mixed_escape(beg, enc1, enc2) do { \ + const char *pos = lex_p; \ + lex_p = beg; \ + mixed_error(enc1, enc2); \ + lex_p = pos; \ + } while (0) + + while ((c = nextc()) != -1) { + if (paren && c == paren) { + ++*nest; + } + else if (c == term) { + if (!nest || !*nest) { + pushback(c); + break; + } + --*nest; + } + else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { + int c2 = *lex_p; + if (c2 == '$' || c2 == '@' || c2 == '{') { + pushback(c); + break; + } + } + else if (c == '\\') { + const char *beg = lex_p - 1; + c = nextc(); + switch (c) { + case '\n': + if (func & STR_FUNC_QWORDS) break; + if (func & STR_FUNC_EXPAND) continue; + tokadd('\\'); + break; + + case '\\': + if (func & STR_FUNC_ESCAPE) tokadd(c); + break; + + case 'u': + if ((func & STR_FUNC_EXPAND) == 0) { + tokadd('\\'); + break; + } + parser_tokadd_utf8(parser, &enc, 1, + func & STR_FUNC_SYMBOL, + func & STR_FUNC_REGEXP); + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + + default: + if (func & STR_FUNC_REGEXP) { + pushback(c); + if ((c = tokadd_escape(&enc)) < 0) + return -1; + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + } + else if (func & STR_FUNC_EXPAND) { + pushback(c); + if (func & STR_FUNC_ESCAPE) tokadd('\\'); + c = read_escape(0, &enc); + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + /* ignore backslashed spaces in %w */ + } + else if (c != term && !(paren && c == paren)) { + tokadd('\\'); + } + } + } + else if (!parser_isascii()) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + if (tokadd_mbchar(c) == -1) return -1; + continue; + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + pushback(c); + break; + } + if (!c && (func & STR_FUNC_SYMBOL)) { + func &= ~STR_FUNC_SYMBOL; + compile_error(PARSER_ARG "symbol cannot contain '\\0'"); + continue; + } + if (c & 0x80) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + } + tokadd(c); + } + *encp = enc; + return c; +} + +#define NEW_STRTERM(func, term, paren) \ + rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) + +static int +parser_parse_string(struct parser_params *parser, NODE *quote) +{ + int func = quote->nd_func; + int term = nd_term(quote); + int paren = nd_paren(quote); + int c, space = 0; + rb_encoding *enc = parser->enc; + + if (func == -1) return tSTRING_END; + c = nextc(); + if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + do {c = nextc();} while (ISSPACE(c)); + space = 1; + } + if (c == term && !quote->nd_nest) { + if (func & STR_FUNC_QWORDS) { + quote->nd_func = -1; + return ' '; + } + if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; + set_yylval_num(regx_options()); + return tREGEXP_END; + } + if (space) { + pushback(c); + return ' '; + } + newtok(); + if ((func & STR_FUNC_EXPAND) && c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + pushback(c); + if (tokadd_string(func, term, paren, "e->nd_nest, + &enc) == -1) { + ruby_sourceline = nd_line(quote); + if (func & STR_FUNC_REGEXP) { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated regexp meets end of file"); + return tREGEXP_END; + } + else { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated string meets end of file"); + return tSTRING_END; + } + } + + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; +} + +static int +parser_heredoc_identifier(struct parser_params *parser) +{ + int c = nextc(), term, func = 0, len; + + if (c == '-') { + c = nextc(); + func = STR_FUNC_INDENT; + } + switch (c) { + case '\'': + func |= str_squote; goto quoted; + case '"': + func |= str_dquote; goto quoted; + case '`': + func |= str_xquote; + quoted: + newtok(); + tokadd(func); + term = c; + while ((c = nextc()) != -1 && c != term) { + if (tokadd_mbchar(c) == -1) return 0; + } + if (c == -1) { + compile_error(PARSER_ARG "unterminated here document identifier"); + return 0; + } + break; + + default: + if (!parser_is_identchar()) { + pushback(c); + if (func & STR_FUNC_INDENT) { + pushback('-'); + } + return 0; + } + newtok(); + term = '"'; + tokadd(func |= str_dquote); + do { + if (tokadd_mbchar(c) == -1) return 0; + } while ((c = nextc()) != -1 && parser_is_identchar()); + pushback(c); + break; + } + + tokfix(); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tHEREDOC_BEG); +#endif + len = lex_p - lex_pbeg; + lex_goto_eol(parser); + lex_strterm = rb_node_newnode(NODE_HEREDOC, + STR_NEW(tok(), toklen()), /* nd_lit */ + len, /* nd_nth */ + lex_lastline); /* nd_orig */ + nd_set_line(lex_strterm, ruby_sourceline); +#ifdef RIPPER + ripper_flush(parser); +#endif + return term == '`' ? tXSTRING_BEG : tSTRING_BEG; +} + +static void +parser_heredoc_restore(struct parser_params *parser, NODE *here) +{ + VALUE line; + +#ifdef RIPPER + if (!NIL_P(parser->delayed)) + ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tHEREDOC_END); +#endif + line = here->nd_orig; + lex_lastline = line; + lex_pbeg = RSTRING_PTR(line); + lex_pend = lex_pbeg + RSTRING_LEN(line); + lex_p = lex_pbeg + here->nd_nth; + heredoc_end = ruby_sourceline; + ruby_sourceline = nd_line(here); + dispose_string(here->nd_lit); + rb_gc_force_recycle((VALUE)here); +#ifdef RIPPER + ripper_flush(parser); +#endif +} + +static int +parser_whole_match_p(struct parser_params *parser, + const char *eos, int len, int indent) +{ + const char *p = lex_pbeg; + int n; + + if (indent) { + while (*p && ISSPACE(*p)) p++; + } + n= lex_pend - (p + len); + if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse; + if (strncmp(eos, p, len) == 0) return Qtrue; + return Qfalse; +} + +static int +parser_here_document(struct parser_params *parser, NODE *here) +{ + int c, func, indent = 0; + const char *eos, *p, *pend; + long len; + VALUE str = 0; + + eos = RSTRING_PTR(here->nd_lit); + len = RSTRING_LEN(here->nd_lit) - 1; + indent = (func = *eos++) & STR_FUNC_INDENT; + + if ((c = nextc()) == -1) { + error: + compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); + restore: + heredoc_restore(lex_strterm); + lex_strterm = 0; + return 0; + } + if (was_bol() && whole_match_p(eos, len, indent)) { + heredoc_restore(lex_strterm); + return tSTRING_END; + } + + if (!(func & STR_FUNC_EXPAND)) { + do { + p = RSTRING_PTR(lex_lastline); + pend = lex_pend; + if (pend > p) { + switch (pend[-1]) { + case '\n': + if (--pend == p || pend[-1] != '\r') { + pend++; + break; + } + case '\r': + --pend; + } + } + if (str) + rb_str_cat(str, p, pend - p); + else + str = STR_NEW(p, pend - p); + if (pend < lex_pend) rb_str_cat(str, "\n", 1); + lex_goto_eol(parser); + if (nextc() == -1) { + if (str) dispose_string(str); + goto error; + } + } while (!whole_match_p(eos, len, indent)); + } + else { + /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ + rb_encoding *enc = parser->enc; + newtok(); + if (c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + do { + pushback(c); + if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { + if (parser->eofp) goto error; + goto restore; + } + if (c != '\n') { + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; + } + tokadd(nextc()); + /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ + if ((c = nextc()) == -1) goto error; + } while (!whole_match_p(eos, len, indent)); + str = STR_NEW3(tok(), toklen(), enc, func); + } + heredoc_restore(lex_strterm); + lex_strterm = NEW_STRTERM(-1, 0, 0); + set_yylval_str(str); + return tSTRING_CONTENT; +} + +#include "lex.c" + +#ifndef RIPPER +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + rb_warning0("ambiguous first argument; put parentheses or even spaces"); +} +#else +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + dispatch0(arg_ambiguous); +} +#endif +#define arg_ambiguous() arg_ambiguous_gen(parser) + +static int +lvar_defined_gen(struct parser_params *parser, ID id) +{ +#ifndef RIPPER + return (dyna_in_block() && dvar_defined(id)) || local_id(id); +#else + return 0; +#endif +} + +/* emacsen -*- hack */ +static int +parser_encode_length(struct parser_params *parser, const char *name, int len) +{ + int nlen; + + if (len > 5 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) + return nlen; + } + if (len > 4 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) + return nlen; + if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) + return nlen; + } + return len; +} + +static void +parser_set_encode(struct parser_params *parser, const char *name) +{ + int idx = rb_enc_find_index(name); + rb_encoding *enc; + + if (idx < 0) { + rb_raise(rb_eArgError, "unknown encoding name: %s", name); + } + enc = rb_enc_from_index(idx); + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eArgError, "%s is not ASCII compatible", rb_enc_name(enc)); + } + parser->enc = enc; +} + +static int +comment_at_top(struct parser_params *parser) +{ + const char *p = lex_pbeg, *pend = lex_p - 1; + if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; + while (p < pend) { + if (!ISSPACE(*p)) return 0; + p++; + } + return 1; +} + +#ifndef RIPPER +typedef int (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, int len); +typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); + +static void +magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) +{ + if (!comment_at_top(parser)) { + rb_warning("encoding '%s' is ignored, valid only in the first line except for shebang line.", + val); + return; + } + parser_set_encode(parser, val); +} + +struct magic_comment { + const char *name; + rb_magic_comment_setter_t func; + rb_magic_comment_length_t length; +}; + +static const struct magic_comment magic_comments[] = { + {"coding", magic_comment_encoding, parser_encode_length}, + {"encoding", magic_comment_encoding, parser_encode_length}, +}; +#endif + +static const char * +magic_comment_marker(const char *str, int len) +{ + int i = 2; + + while (i < len) { + switch (str[i]) { + case '-': + if (str[i-1] == '*' && str[i-2] == '-') { + return str + i + 1; + } + i += 2; + break; + case '*': + if (i + 1 >= len) return 0; + if (str[i+1] != '-') { + i += 4; + } + else if (str[i-1] != '-') { + i += 2; + } + else { + return str + i + 2; + } + break; + default: + i += 3; + break; + } + } + return 0; +} + +static int +parser_magic_comment(struct parser_params *parser, const char *str, int len) +{ + VALUE name = 0, val = 0; + const char *beg, *end, *vbeg, *vend; +#define str_copy(_s, _p, _n) ((_s) \ + ? (rb_str_resize((_s), (_n)), \ + MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ + : ((_s) = STR_NEW((_p), (_n)))) + + if (len <= 7) return Qfalse; + if (!(beg = magic_comment_marker(str, len))) return Qfalse; + if (!(end = magic_comment_marker(beg, str + len - beg))) return Qfalse; + str = beg; + len = end - beg - 3; + + /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ + while (len > 0) { +#ifndef RIPPER + const struct magic_comment *p = magic_comments; +#endif + char *s; + int i, n = 0; + + for (; len > 0 && *str; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + continue; + } + if (!ISSPACE(*str)) break; + } + for (beg = str; len > 0; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + break; + default: + if (ISSPACE(*str)) break; + continue; + } + break; + } + for (end = str; len > 0 && ISSPACE(*str); str++, --len); + if (!len) break; + if (*str != ':') continue; + + do str++; while (--len > 0 && ISSPACE(*str)); + if (!len) break; + if (*str == '"') { + for (vbeg = ++str; --len > 0 && *str != '"'; str++) { + if (*str == '\\') { + --len; + ++str; + } + } + vend = str; + if (len) { + --len; + ++str; + } + } + else { + for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); + vend = str; + } + while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; + + n = end - beg; + str_copy(name, beg, n); + s = RSTRING_PTR(name); + for (i = 0; i < n; ++i) { + if (*s == '-') *s = '_'; + } +#ifndef RIPPER + do { + if (STRNCASECMP(p->name, s, n) == 0) { + n = vend - vbeg; + if (p->length) { + n = (*p->length)(parser, vbeg, n); + } + str_copy(val, vbeg, n); + (*p->func)(parser, s, RSTRING_PTR(val)); + break; + } + } while (++p < magic_comments + sizeof(magic_comments) / sizeof(*p)); +#else + dispatch2(magic_comment, name, val); +#endif + } + + return Qtrue; +} + +static void +set_file_encoding(struct parser_params *parser, const char *str, const char *send) +{ + int sep = 0; + const char *beg = str; + VALUE s; + + for (;;) { + if (send - str <= 6) return; + switch (str[6]) { + case 'C': case 'c': str += 6; continue; + case 'O': case 'o': str += 5; continue; + case 'D': case 'd': str += 4; continue; + case 'I': case 'i': str += 3; continue; + case 'N': case 'n': str += 2; continue; + case 'G': case 'g': str += 1; continue; + case '=': case ':': + sep = 1; + str += 6; + break; + default: + str += 6; + if (ISSPACE(*str)) break; + continue; + } + if (STRNCASECMP(str-6, "coding", 6) == 0) break; + } + for (;;) { + do { + if (++str >= send) return; + } while (ISSPACE(*str)); + if (sep) break; + if (*str != '=' && *str != ':') return; + sep = 1; + str++; + } + beg = str; + while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); + s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); + parser_set_encode(parser, RSTRING_PTR(s)); + rb_str_resize(s, 0); +} + +static void +parser_prepare(struct parser_params *parser) +{ + int c = nextc(); + switch (c) { + case '#': + if (peek('!')) parser->has_shebang = 1; + break; + case 0xef: /* UTF-8 BOM marker */ + if (lex_pend - lex_p >= 2 && + (unsigned char)lex_p[0] == 0xbb && + (unsigned char)lex_p[1] == 0xbf) { + parser->enc = rb_utf8_encoding(); + lex_p += 2; + lex_pbeg = lex_p; + return; + } + break; + case EOF: + return; + } + pushback(c); + parser->enc = rb_enc_get(lex_lastline); +} + +#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) +#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) + +static int +parser_yylex(struct parser_params *parser) +{ + register int c; + int space_seen = 0; + int cmd_state; + enum lex_state_e last_state; + rb_encoding *enc; + int mb; +#ifdef RIPPER + int fallthru = Qfalse; +#endif + + if (lex_strterm) { + int token; + if (nd_type(lex_strterm) == NODE_HEREDOC) { + token = here_document(lex_strterm); + if (token == tSTRING_END) { + lex_strterm = 0; + lex_state = EXPR_END; + } + } + else { + token = parse_string(lex_strterm); + if (token == tSTRING_END || token == tREGEXP_END) { + rb_gc_force_recycle((VALUE)lex_strterm); + lex_strterm = 0; + lex_state = EXPR_END; + } + } + return token; + } + cmd_state = command_start; + command_start = Qfalse; + retry: + switch (c = nextc()) { + case '\0': /* NUL */ + case '\004': /* ^D */ + case '\032': /* ^Z */ + case -1: /* end of script. */ + return 0; + + /* white spaces */ + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; +#ifdef RIPPER + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + break; + default: + goto outofloop; + } + } + outofloop: + pushback(c); + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; + + case '#': /* it's a comment */ + /* no magic_comment in shebang line */ + if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { + if (comment_at_top(parser)) { + set_file_encoding(parser, lex_p, lex_pend); + } + } + lex_p = lex_pend; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tCOMMENT); + fallthru = Qtrue; +#endif + /* fall through */ + case '\n': + switch (lex_state) { + case EXPR_BEG: + case EXPR_FNAME: + case EXPR_DOT: + case EXPR_CLASS: + case EXPR_VALUE: +#ifdef RIPPER + if (!fallthru) { + ripper_dispatch_scan_event(parser, tIGNORED_NL); + } + fallthru = Qfalse; +#endif + goto retry; + default: + break; + } + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; + break; + case '.': { + if ((c = nextc()) != '.') { + pushback(c); + pushback('.'); + goto retry; + } + } + default: + --ruby_sourceline; + lex_nextline = lex_lastline; + case -1: /* EOF no decrement*/ + lex_goto_eol(parser); +#ifdef RIPPER + if (c != -1) { + parser->tokp = lex_p; + } +#endif + goto normal_newline; + } + } + normal_newline: + command_start = Qtrue; + lex_state = EXPR_BEG; + return '\n'; + + case '*': + if ((c = nextc()) == '*') { + if ((c = nextc()) == '=') { + set_yylval_id(tPOW); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + c = tPOW; + } + else { + if (c == '=') { + set_yylval_id('*'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`*' interpreted as argument prefix"); + c = tSTAR; + } + else if (IS_BEG()) { + c = tSTAR; + } + else { + c = '*'; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return c; + + case '!': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return '!'; + } + } + else { + lex_state = EXPR_BEG; + } + if (c == '=') { + return tNEQ; + } + if (c == '~') { + return tNMATCH; + } + pushback(c); + return '!'; + + case '=': + if (was_bol()) { + /* skip embedded rd document */ + if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { +#ifdef RIPPER + int first_p = Qtrue; + + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tEMBDOC_BEG); +#endif + for (;;) { + lex_goto_eol(parser); +#ifdef RIPPER + if (!first_p) { + ripper_dispatch_scan_event(parser, tEMBDOC); + } + first_p = Qfalse; +#endif + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "embedded document meets end of file"); + return 0; + } + if (c != '=') continue; + if (strncmp(lex_p, "end", 3) == 0 && + (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { + break; + } + } + lex_goto_eol(parser); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tEMBDOC_END); +#endif + goto retry; + } + } + + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + if ((c = nextc()) == '=') { + return tEQQ; + } + pushback(c); + return tEQ; + } + if (c == '~') { + return tMATCH; + } + else if (c == '>') { + return tASSOC; + } + pushback(c); + return '='; + + case '<': + c = nextc(); + if (c == '<' && + lex_state != EXPR_END && + lex_state != EXPR_DOT && + lex_state != EXPR_ENDARG && + lex_state != EXPR_CLASS && + (!IS_ARG() || space_seen)) { + int token = heredoc_identifier(); + if (token) return token; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if (c == '=') { + if ((c = nextc()) == '>') { + return tCMP; + } + pushback(c); + return tLEQ; + } + if (c == '<') { + if ((c = nextc()) == '=') { + set_yylval_id(tLSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tLSHFT; + } + pushback(c); + return '<'; + + case '>': + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + return tGEQ; + } + if (c == '>') { + if ((c = nextc()) == '=') { + set_yylval_id(tRSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tRSHFT; + } + pushback(c); + return '>'; + + case '"': + lex_strterm = NEW_STRTERM(str_dquote, '"', 0); + return tSTRING_BEG; + + case '`': + if (lex_state == EXPR_FNAME) { + lex_state = EXPR_END; + return c; + } + if (lex_state == EXPR_DOT) { + if (cmd_state) + lex_state = EXPR_CMDARG; + else + lex_state = EXPR_ARG; + return c; + } + lex_strterm = NEW_STRTERM(str_xquote, '`', 0); + return tXSTRING_BEG; + + case '\'': + lex_strterm = NEW_STRTERM(str_squote, '\'', 0); + return tSTRING_BEG; + + case '?': + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG) { + lex_state = EXPR_VALUE; + return '?'; + } + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "incomplete character syntax"); + return 0; + } + if (rb_enc_isspace(c, parser->enc)) { + if (!IS_ARG()) { + int c2 = 0; + switch (c) { + case ' ': + c2 = 's'; + break; + case '\n': + c2 = 'n'; + break; + case '\t': + c2 = 't'; + break; + case '\v': + c2 = 'v'; + break; + case '\r': + c2 = 'r'; + break; + case '\f': + c2 = 'f'; + break; + } + if (c2) { + rb_warnI("invalid character syntax; use ?\\%c", c2); + } + } + ternary: + pushback(c); + lex_state = EXPR_VALUE; + return '?'; + } + newtok(); + enc = parser->enc; + if (!parser_isascii()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && + lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { + goto ternary; + } + else if (c == '\\') { + if (peek('u')) { + nextc(); + c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); + if (0x80 <= c) { + tokaddmbc(c, enc); + } + else { + tokadd(c); + } + } + else { + c = read_escape(0, &enc); + tokadd(c); + } + } + else { + tokadd(c); + } + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); + lex_state = EXPR_END; + return tCHAR; + + case '&': + if ((c = nextc()) == '&') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tANDOP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tANDOP; + } + else if (c == '=') { + set_yylval_id('&'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`&' interpreted as argument prefix"); + c = tAMPER; + } + else if (IS_BEG()) { + c = tAMPER; + } + else { + c = '&'; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; + } + return c; + + case '|': + if ((c = nextc()) == '|') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tOROP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tOROP; + } + if (c == '=') { + set_yylval_id('|'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + pushback(c); + return '|'; + + case '+': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUPLUS; + } + pushback(c); + return '+'; + } + if (c == '=') { + set_yylval_id('+'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + c = '+'; + goto start_num; + } + return tUPLUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '+'; + + case '-': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUMINUS; + } + pushback(c); + return '-'; + } + if (c == '=') { + set_yylval_id('-'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (c == '>') { + lex_state = EXPR_ARG; + return tLAMBDA; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + return tUMINUS_NUM; + } + return tUMINUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '-'; + + case '.': + lex_state = EXPR_BEG; + if ((c = nextc()) == '.') { + if ((c = nextc()) == '.') { + return tDOT3; + } + pushback(c); + return tDOT2; + } + pushback(c); + if (c != -1 && ISDIGIT(c)) { + yyerror("no . floating literal anymore; put 0 before dot"); + } + lex_state = EXPR_DOT; + return '.'; + + start_num: + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + int is_float, seen_point, seen_e, nondigit; + + is_float = seen_point = seen_e = nondigit = 0; + lex_state = EXPR_END; + newtok(); + if (c == '-' || c == '+') { + tokadd(c); + c = nextc(); + } + if (c == '0') { + int start = toklen(); + c = nextc(); + if (c == 'x' || c == 'X') { + /* hexadecimal */ + c = nextc(); + if (c != -1 && ISXDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISXDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse)); + return tINTEGER; + } + if (c == 'b' || c == 'B') { + /* binary */ + c = nextc(); + if (c == '0' || c == '1') { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c != '0' && c != '1') break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse)); + return tINTEGER; + } + if (c == 'd' || c == 'D') { + /* decimal */ + c = nextc(); + if (c != -1 && ISDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + if (c == '_') { + /* 0_0 */ + goto octal_number; + } + if (c == 'o' || c == 'O') { + /* prefixed octal */ + c = nextc(); + if (c == -1 || c == '_' || !ISDIGIT(c)) { + yyerror("numeric literal without digits"); + } + } + if (c >= '0' && c <= '7') { + /* octal */ + octal_number: + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c < '0' || c > '9') break; + if (c > '7') goto invalid_octal; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + if (toklen() > start) { + pushback(c); + tokfix(); + if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse)); + return tINTEGER; + } + if (nondigit) { + pushback(c); + goto trailing_uc; + } + } + if (c > '7' && c <= '9') { + invalid_octal: + yyerror("Invalid octal digit"); + } + else if (c == '.' || c == 'e' || c == 'E') { + tokadd('0'); + } + else { + pushback(c); + set_yylval_literal(INT2FIX(0)); + return tINTEGER; + } + } + + for (;;) { + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + nondigit = 0; + tokadd(c); + break; + + case '.': + if (nondigit) goto trailing_uc; + if (seen_point || seen_e) { + goto decode_num; + } + else { + int c0 = nextc(); + if (c == -1 || !ISDIGIT(c0)) { + pushback(c0); + goto decode_num; + } + c = c0; + } + tokadd('.'); + tokadd(c); + is_float++; + seen_point++; + nondigit = 0; + break; + + case 'e': + case 'E': + if (nondigit) { + pushback(c); + c = nondigit; + goto decode_num; + } + if (seen_e) { + goto decode_num; + } + tokadd(c); + seen_e++; + is_float++; + nondigit = c; + c = nextc(); + if (c != '-' && c != '+') continue; + tokadd(c); + nondigit = c; + break; + + case '_': /* `_' in number just ignored */ + if (nondigit) goto decode_num; + nondigit = c; + break; + + default: + goto decode_num; + } + c = nextc(); + } + + decode_num: + pushback(c); + tokfix(); + if (nondigit) { + char tmp[30]; + trailing_uc: + sprintf(tmp, "trailing `%c' in number", nondigit); + yyerror(tmp); + } + if (is_float) { + double d = strtod(tok(), 0); + if (errno == ERANGE) { + rb_warningS("Float %s out of range", tok()); + errno = 0; + } + set_yylval_literal(DBL2NUM(d)); + return tFLOAT; + } + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + + case ')': + case ']': + paren_nest--; + case '}': + COND_LEXPOP(); + CMDARG_LEXPOP(); + if (c == ')') + lex_state = EXPR_END; + else + lex_state = EXPR_ENDARG; + return c; + + case ':': + c = nextc(); + if (c == ':') { + if (IS_BEG() || + lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) { + lex_state = EXPR_BEG; + return tCOLON3; + } + lex_state = EXPR_DOT; + return tCOLON2; + } + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || (c != -1 && ISSPACE(c))) { + pushback(c); + lex_state = EXPR_BEG; + return ':'; + } + switch (c) { + case '\'': + lex_strterm = NEW_STRTERM(str_ssym, c, 0); + break; + case '"': + lex_strterm = NEW_STRTERM(str_dsym, c, 0); + break; + default: + pushback(c); + break; + } + lex_state = EXPR_FNAME; + return tSYMBEG; + + case '/': + if (IS_BEG()) { + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + if ((c = nextc()) == '=') { + set_yylval_id('/'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen) { + if (!ISSPACE(c)) { + arg_ambiguous(); + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return '/'; + + case '^': + if ((c = nextc()) == '=') { + set_yylval_id('^'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '^'; + + case ';': + lex_state = EXPR_BEG; + command_start = Qtrue; + return ';'; + + case ',': + lex_state = EXPR_BEG; + return ','; + + case '~': + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + if ((c = nextc()) != '@') { + pushback(c); + } + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + return '~'; + + case '(': + if (IS_BEG()) { + c = tLPAREN; + } + else if (space_seen) { + if (IS_ARG()) { + c = tLPAREN_ARG; + } + } + paren_nest++; + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + return c; + + case '[': + paren_nest++; + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if ((c = nextc()) == ']') { + if ((c = nextc()) == '=') { + return tASET; + } + pushback(c); + return tAREF; + } + pushback(c); + return '['; + } + else if (IS_BEG()) { + c = tLBRACK; + } + else if (IS_ARG() && space_seen) { + c = tLBRACK; + } + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + return c; + + case '{': + if (lpar_beg && lpar_beg == paren_nest) { + lex_state = EXPR_BEG; + lpar_beg = 0; + --paren_nest; + return tLAMBEG; + } + if (IS_ARG() || lex_state == EXPR_END) + c = '{'; /* block (primary) */ + else if (lex_state == EXPR_ENDARG) + c = tLBRACE_ARG; /* block (expr) */ + else + c = tLBRACE; /* hash */ + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + if (c != tLBRACE) command_start = Qtrue; + return c; + + case '\\': + c = nextc(); + if (c == '\n') { + space_seen = 1; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; /* skip \\n */ + } + pushback(c); + return '\\'; + + case '%': + if (IS_BEG()) { + int term; + int paren; + + c = nextc(); + quotation: + if (c == -1 || !ISALNUM(c)) { + term = c; + c = 'Q'; + } + else { + term = nextc(); + if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { + yyerror("unknown type of %string"); + return 0; + } + } + if (c == -1 || term == -1) { + compile_error(PARSER_ARG "unterminated quoted string meets end of file"); + return 0; + } + paren = term; + if (term == '(') term = ')'; + else if (term == '[') term = ']'; + else if (term == '{') term = '}'; + else if (term == '<') term = '>'; + else paren = 0; + + switch (c) { + case 'Q': + lex_strterm = NEW_STRTERM(str_dquote, term, paren); + return tSTRING_BEG; + + case 'q': + lex_strterm = NEW_STRTERM(str_squote, term, paren); + return tSTRING_BEG; + + case 'W': + lex_strterm = NEW_STRTERM(str_dword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tWORDS_BEG; + + case 'w': + lex_strterm = NEW_STRTERM(str_sword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tQWORDS_BEG; + + case 'x': + lex_strterm = NEW_STRTERM(str_xquote, term, paren); + return tXSTRING_BEG; + + case 'r': + lex_strterm = NEW_STRTERM(str_regexp, term, paren); + return tREGEXP_BEG; + + case 's': + lex_strterm = NEW_STRTERM(str_ssym, term, paren); + lex_state = EXPR_FNAME; + return tSYMBEG; + + default: + yyerror("unknown type of %string"); + return 0; + } + } + if ((c = nextc()) == '=') { + set_yylval_id('%'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_ARG() && space_seen && !ISSPACE(c)) { + goto quotation; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '%'; + + case '$': + last_state = lex_state; + lex_state = EXPR_END; + newtok(); + c = nextc(); + switch (c) { + case '_': /* $_: last read line string */ + c = nextc(); + if (parser_is_identchar()) { + tokadd('$'); + tokadd('_'); + break; + } + pushback(c); + c = '_'; + /* fall through */ + case '~': /* $~: match-data */ + case '*': /* $*: argv */ + case '$': /* $$: pid */ + case '?': /* $?: last status */ + case '!': /* $!: error string */ + case '@': /* $@: error position */ + case '/': /* $/: input record separator */ + case '\\': /* $\: output record separator */ + case ';': /* $;: field separator */ + case ',': /* $,: output field separator */ + case '.': /* $.: last read line number */ + case '=': /* $=: ignorecase */ + case ':': /* $:: load path */ + case '<': /* $<: reading filename */ + case '>': /* $>: default output handle */ + case '\"': /* $": already loaded files */ + tokadd('$'); + tokadd(c); + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '-': + tokadd('$'); + tokadd(c); + c = nextc(); + if (parser_is_identchar()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else { + pushback(c); + } + gvar: + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '&': /* $&: last match */ + case '`': /* $`: string before last match */ + case '\'': /* $': string after last match */ + case '+': /* $+: string matches last paren. */ + if (last_state == EXPR_FNAME) { + tokadd('$'); + tokadd(c); + goto gvar; + } + set_yylval_node(NEW_BACK_REF(c)); + return tBACK_REF; + + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': case '8': case '9': + tokadd('$'); + do { + tokadd(c); + c = nextc(); + } while (c != -1 && ISDIGIT(c)); + pushback(c); + if (last_state == EXPR_FNAME) goto gvar; + tokfix(); + set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); + return tNTH_REF; + + default: + if (!parser_is_identchar()) { + pushback(c); + return '$'; + } + case '0': + tokadd('$'); + } + break; + + case '@': + c = nextc(); + newtok(); + tokadd('@'); + if (c == '@') { + tokadd('@'); + c = nextc(); + } + if (c != -1 && ISDIGIT(c)) { + if (tokidx == 1) { + compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); + } + else { + compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); + } + return 0; + } + if (!parser_is_identchar()) { + pushback(c); + return '@'; + } + break; + + case '_': + if (was_bol() && whole_match_p("__END__", 7, 0)) { + ruby__end__seen = 1; + parser->eofp = Qtrue; +#ifndef RIPPER + return -1; +#else + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, k__END__); + return 0; +#endif + } + newtok(); + break; + + default: + if (!parser_is_identchar()) { + rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); + goto retry; + } + + newtok(); + break; + } + + mb = ENC_CODERANGE_7BIT; + do { + if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; + if (tokadd_mbchar(c) == -1) return 0; + c = nextc(); + } while (parser_is_identchar()); + switch (tok()[0]) { + case '@': case '$': + pushback(c); + break; + default: + if ((c == '!' || c == '?') && !peek('=')) { + tokadd(c); + } + else { + pushback(c); + } + } + tokfix(); + + { + int result = 0; + + last_state = lex_state; + switch (tok()[0]) { + case '$': + lex_state = EXPR_END; + result = tGVAR; + break; + case '@': + lex_state = EXPR_END; + if (tok()[1] == '@') + result = tCVAR; + else + result = tIVAR; + break; + + default: + if (toklast() == '!' || toklast() == '?') { + result = tFID; + } + else { + if (lex_state == EXPR_FNAME) { + if ((c = nextc()) == '=' && !peek('~') && !peek('>') && + (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) { + result = tIDENTIFIER; + tokadd(c); + tokfix(); + } + else { + pushback(c); + } + } + if (result == 0 && ISUPPER(tok()[0])) { + result = tCONSTANT; + } + else { + result = tIDENTIFIER; + } + } + + if ((lex_state == EXPR_BEG && !cmd_state) || + lex_state == EXPR_ARG || + lex_state == EXPR_CMDARG) { + if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { + lex_state = EXPR_BEG; + nextc(); + set_yylval_id(TOK_INTERN(!ENC_SINGLE(mb))); + return tLABEL; + } + } + if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { + const struct kwtable *kw; + + /* See if it is a reserved word. */ + kw = rb_reserved_word(tok(), toklen()); + if (kw) { + enum lex_state_e state = lex_state; + lex_state = kw->state; + if (state == EXPR_FNAME) { + set_yylval_id(rb_intern(kw->name)); + return kw->id[0]; + } + if (kw->id[0] == keyword_do) { + command_start = Qtrue; + if (lpar_beg && lpar_beg == paren_nest) { + lpar_beg = 0; + --paren_nest; + return keyword_do_LAMBDA; + } + if (COND_P()) return keyword_do_cond; + if (CMDARG_P() && state != EXPR_CMDARG) + return keyword_do_block; + if (state == EXPR_ENDARG || state == EXPR_BEG) + return keyword_do_block; + return keyword_do; + } + if (state == EXPR_BEG || state == EXPR_VALUE) + return kw->id[0]; + else { + if (kw->id[0] != kw->id[1]) + lex_state = EXPR_BEG; + return kw->id[1]; + } + } + } + + if (IS_BEG() || + lex_state == EXPR_DOT || + IS_ARG()) { + if (cmd_state) { + lex_state = EXPR_CMDARG; + } + else { + lex_state = EXPR_ARG; + } + } + else { + lex_state = EXPR_END; + } + } + { + ID ident = TOK_INTERN(!ENC_SINGLE(mb)); + + set_yylval_id(ident); + if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { + lex_state = EXPR_END; + } + } + return result; + } +} + +#if YYPURE +static int +yylex(void *lval, void *p) +#else +yylex(void *p) +#endif +{ + struct parser_params *parser = (struct parser_params*)p; + int t; + +#if YYPURE + parser->parser_yylval = lval; + parser->parser_yylval->val = Qundef; +#endif + t = parser_yylex(parser); +#ifdef RIPPER + if (!NIL_P(parser->delayed)) { + ripper_dispatch_delayed_token(parser, t); + return t; + } + if (t != 0) + ripper_dispatch_scan_event(parser, t); +#endif + + return t; +} + +#ifndef RIPPER +static NODE* +node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) +{ + NODE *n = (rb_node_newnode)(type, a0, a1, a2); + nd_set_line(n, ruby_sourceline); + return n; +} + +enum node_type +nodetype(NODE *node) /* for debug */ +{ + return (enum node_type)nd_type(node); +} + +int +nodeline(NODE *node) +{ + return nd_line(node); +} + +static NODE* +newline_node(NODE *node) +{ + if (node) { + node = remove_begin(node); + node->flags |= NODE_FL_NEWLINE; + } + return node; +} + +static void +fixpos(NODE *node, NODE *orig) +{ + if (!node) return; + if (!orig) return; + if (orig == (NODE*)1) return; + nd_set_line(node, nd_line(orig)); +} + +static void +parser_warning(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warning(node, mesg) parser_warning(parser, node, mesg) + +static void +parser_warn(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warn(node, mesg) parser_warn(parser, node, mesg) + +static NODE* +block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *end, *h = head, *nd; + + if (tail == 0) return head; + + if (h == 0) return tail; + switch (nd_type(h)) { + case NODE_LIT: + case NODE_STR: + case NODE_SELF: + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + parser_warning(h, "unused literal ignored"); + return tail; + default: + h = end = NEW_BLOCK(head); + end->nd_end = end; + fixpos(end, head); + head = end; + break; + case NODE_BLOCK: + end = h->nd_end; + break; + } + + nd = end->nd_head; + switch (nd_type(nd)) { + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (RTEST(ruby_verbose)) { + parser_warning(nd, "statement not reached"); + } + break; + + default: + break; + } + + if (nd_type(tail) != NODE_BLOCK) { + tail = NEW_BLOCK(tail); + tail->nd_end = tail; + } + end->nd_next = tail; + h->nd_end = tail->nd_end; + return head; +} + +/* append item to the list */ +static NODE* +list_append_gen(struct parser_params *parser, NODE *list, NODE *item) +{ + NODE *last; + + if (list == 0) return NEW_LIST(item); + if (list->nd_next) { + last = list->nd_next->nd_end; + } + else { + last = list; + } + + list->nd_alen += 1; + last->nd_next = NEW_LIST(item); + list->nd_next->nd_end = last->nd_next; + return list; +} + +/* concat two lists */ +static NODE* +list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *last; + + if (head->nd_next) { + last = head->nd_next->nd_end; + } + else { + last = head; + } + + head->nd_alen += tail->nd_alen; + last->nd_next = tail; + if (tail->nd_next) { + head->nd_next->nd_end = tail->nd_next->nd_end; + } + else { + head->nd_next->nd_end = tail; + } + + return head; +} + +static int +literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) +{ + if (!rb_enc_compatible(head, tail)) { + compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", + rb_enc_name(rb_enc_get(head)), + rb_enc_name(rb_enc_get(tail))); + rb_str_resize(head, 0); + rb_str_resize(tail, 0); + return 0; + } + rb_str_buf_append(head, tail); + return 1; +} + +/* concat two string literals */ +static NODE * +literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + enum node_type htype; + + if (!head) return tail; + if (!tail) return head; + + htype = nd_type(head); + if (htype == NODE_EVSTR) { + NODE *node = NEW_DSTR(STR_NEW0()); + head = list_append(node, head); + } + switch (nd_type(tail)) { + case NODE_STR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { + error: + rb_gc_force_recycle((VALUE)head); + rb_gc_force_recycle((VALUE)tail); + return 0; + } + rb_gc_force_recycle((VALUE)tail); + } + else { + list_append(head, tail); + } + break; + + case NODE_DSTR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) + goto error; + tail->nd_lit = head->nd_lit; + rb_gc_force_recycle((VALUE)head); + head = tail; + } + else { + nd_set_type(tail, NODE_ARRAY); + tail->nd_head = NEW_STR(tail->nd_lit); + list_concat(head, tail); + } + break; + + case NODE_EVSTR: + if (htype == NODE_STR) { + nd_set_type(head, NODE_DSTR); + head->nd_alen = 1; + } + list_append(head, tail); + break; + } + return head; +} + +static NODE * +evstr2dstr_gen(struct parser_params *parser, NODE *node) +{ + if (nd_type(node) == NODE_EVSTR) { + node = list_append(NEW_DSTR(STR_NEW0()), node); + } + return node; +} + +static NODE * +new_evstr_gen(struct parser_params *parser, NODE *node) +{ + NODE *head = node; + + if (node) { + switch (nd_type(node)) { + case NODE_STR: case NODE_DSTR: case NODE_EVSTR: + return node; + } + } + return NEW_EVSTR(head); +} + +static NODE * +call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) +{ + value_expr(recv); + value_expr(arg1); + return NEW_CALL(recv, id, NEW_LIST(arg1)); +} + +static NODE * +call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) +{ + value_expr(recv); + return NEW_CALL(recv, id, 0); +} + +static NODE* +match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + value_expr(node1); + value_expr(node2); + if (node1) { + switch (nd_type(node1)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH2(node1, node2); + + case NODE_LIT: + if (TYPE(node1->nd_lit) == T_REGEXP) { + return NEW_MATCH2(node1, node2); + } + } + } + + if (node2) { + switch (nd_type(node2)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH3(node2, node1); + + case NODE_LIT: + if (TYPE(node2->nd_lit) == T_REGEXP) { + return NEW_MATCH3(node2, node1); + } + } + } + + return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); +} + +static NODE* +gettable_gen(struct parser_params *parser, ID id) +{ + if (id == keyword_self) { + return NEW_SELF(); + } + else if (id == keyword_nil) { + return NEW_NIL(); + } + else if (id == keyword_true) { + return NEW_TRUE(); + } + else if (id == keyword_false) { + return NEW_FALSE(); + } + else if (id == keyword__FILE__) { + return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), + rb_filesystem_encoding())); + } + else if (id == keyword__LINE__) { + return NEW_LIT(INT2FIX(ruby_sourceline)); + } + else if (id == keyword__ENCODING__) { + return NEW_LIT(rb_enc_from_encoding(parser->enc)); + } + else if (is_local_id(id)) { + if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); + if (local_id(id)) return NEW_LVAR(id); + /* method call without arguments */ + return NEW_VCALL(id); + } + else if (is_global_id(id)) { + return NEW_GVAR(id); + } + else if (is_instance_id(id)) { + return NEW_IVAR(id); + } + else if (is_const_id(id)) { + return NEW_CONST(id); + } + else if (is_class_id(id)) { + return NEW_CVAR(id); + } + compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); + return 0; +} + +static NODE* +assignable_gen(struct parser_params *parser, ID id, NODE *val) +{ + if (!id) return 0; + if (id == keyword_self) { + yyerror("Can't change the value of self"); + } + else if (id == keyword_nil) { + yyerror("Can't assign to nil"); + } + else if (id == keyword_true) { + yyerror("Can't assign to true"); + } + else if (id == keyword_false) { + yyerror("Can't assign to false"); + } + else if (id == keyword__FILE__) { + yyerror("Can't assign to __FILE__"); + } + else if (id == keyword__LINE__) { + yyerror("Can't assign to __LINE__"); + } + else if (id == keyword__ENCODING__) { + yyerror("Can't assign to __ENCODING__"); + } + else if (is_local_id(id)) { + if (dyna_in_block()) { + if (dvar_curr(id)) { + return NEW_DASGN_CURR(id, val); + } + else if (dvar_defined(id)) { + return NEW_DASGN(id, val); + } + else if (local_id(id)) { + return NEW_LASGN(id, val); + } + else{ + dyna_var(id); + return NEW_DASGN_CURR(id, val); + } + } + else { + if (!local_id(id)) { + local_var(id); + } + return NEW_LASGN(id, val); + } + } + else if (is_global_id(id)) { + return NEW_GASGN(id, val); + } + else if (is_instance_id(id)) { + return NEW_IASGN(id, val); + } + else if (is_const_id(id)) { + if (in_def || in_single) + yyerror("dynamic constant assignment"); + return NEW_CDECL(id, val, 0); + } + else if (is_class_id(id)) { + return NEW_CVASGN(id, val); + } + else { + compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); + } + return 0; +} + +static void +shadowing_lvar_gen(struct parser_params *parser, ID name) +{ + ID uscore; + + CONST_ID(uscore, "_"); + if (uscore == name) return; + if (dyna_in_block()) { + if (dvar_curr(name)) { + yyerror("duplicated argument name"); + } + else if (dvar_defined(name) || local_id(name)) { + rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); + vtable_add(lvtbl->vars, name); + } + } + else { + if (local_id(name)) { + yyerror("duplicated argument name"); + } + } +} + +static void +new_bv_gen(struct parser_params *parser, ID name) +{ + if (!name) return; + if (!is_local_id(name)) { + compile_error(PARSER_ARG "invalid local variable - %s", + rb_id2name(name)); + return; + } + shadowing_lvar(name); + dyna_var(name); +} + +static NODE * +aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, tASET, idx); +} + +static void +block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "both block arg and actual block given"); + } +} + +ID +rb_id_attrset(ID id) +{ + id &= ~ID_SCOPE_MASK; + id |= ID_ATTRSET; + return id; +} + +static NODE * +attrset_gen(struct parser_params *parser, NODE *recv, ID id) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); +} + +static void +rb_backref_error_gen(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_NTH_REF: + compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); + break; + case NODE_BACK_REF: + compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); + break; + } +} + +static NODE * +arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node2) return node1; + switch (nd_type(node1)) { + case NODE_BLOCK_PASS: + node1->nd_iter = arg_concat(node1->nd_iter, node2); + return node1; + case NODE_ARGSPUSH: + if (nd_type(node2) != NODE_ARRAY) break; + node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + case NODE_ARGSCAT: + if (nd_type(node2) != NODE_ARRAY || + nd_type(node1->nd_body) != NODE_ARRAY) break; + node1->nd_body = list_concat(node1->nd_body, node2); + return node1; + } + return NEW_ARGSCAT(node1, node2); +} + +static NODE * +arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node1) return NEW_LIST(node2); + switch (nd_type(node1)) { + case NODE_ARRAY: + return list_append(node1, node2); + case NODE_BLOCK_PASS: + node1->nd_head = arg_append(node1->nd_head, node2); + return node1; + case NODE_ARGSPUSH: + node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + } + return NEW_ARGSPUSH(node1, node2); +} + +static NODE * +splat_array(NODE* node) +{ + if (nd_type(node) == NODE_SPLAT) node = node->nd_head; + if (nd_type(node) == NODE_ARRAY) return node; + return 0; +} + +static NODE * +node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) +{ + if (!lhs) return 0; + + switch (nd_type(lhs)) { + case NODE_GASGN: + case NODE_IASGN: + case NODE_IASGN2: + case NODE_LASGN: + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_MASGN: + case NODE_CDECL: + case NODE_CVASGN: + lhs->nd_value = rhs; + break; + + case NODE_ATTRASGN: + case NODE_CALL: + lhs->nd_args = arg_append(lhs->nd_args, rhs); + break; + + default: + /* should not happen */ + break; + } + + return lhs; +} + +static int +value_expr_gen(struct parser_params *parser, NODE *node) +{ + int cond = 0; + + if (!node) { + rb_warning0("empty expression"); + } + while (node) { + switch (nd_type(node)) { + case NODE_DEFN: + case NODE_DEFS: + parser_warning(node, "void value expression"); + return Qfalse; + + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (!cond) yyerror("void value expression"); + /* or "control never reach"? */ + return Qfalse; + + case NODE_BLOCK: + while (node->nd_next) { + node = node->nd_next; + } + node = node->nd_head; + break; + + case NODE_BEGIN: + node = node->nd_body; + break; + + case NODE_IF: + if (!node->nd_body) { + node = node->nd_else; + break; + } + else if (!node->nd_else) { + node = node->nd_body; + break; + } + if (!value_expr(node->nd_body)) return Qfalse; + node = node->nd_else; + break; + + case NODE_AND: + case NODE_OR: + cond = 1; + node = node->nd_2nd; + break; + + default: + return Qtrue; + } + } + + return Qtrue; +} + +static void +void_expr_gen(struct parser_params *parser, NODE *node) +{ + const char *useless = 0; + + if (!RTEST(ruby_verbose)) return; + + if (!node) return; + switch (nd_type(node)) { + case NODE_CALL: + switch (node->nd_mid) { + case '+': + case '-': + case '*': + case '/': + case '%': + case tPOW: + case tUPLUS: + case tUMINUS: + case '|': + case '^': + case '&': + case tCMP: + case '>': + case tGEQ: + case '<': + case tLEQ: + case tEQ: + case tNEQ: + useless = rb_id2name(node->nd_mid); + break; + } + break; + + case NODE_LVAR: + case NODE_DVAR: + case NODE_GVAR: + case NODE_IVAR: + case NODE_CVAR: + case NODE_NTH_REF: + case NODE_BACK_REF: + useless = "a variable"; + break; + case NODE_CONST: + useless = "a constant"; + break; + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + useless = "a literal"; + break; + case NODE_COLON2: + case NODE_COLON3: + useless = "::"; + break; + case NODE_DOT2: + useless = ".."; + break; + case NODE_DOT3: + useless = "..."; + break; + case NODE_SELF: + useless = "self"; + break; + case NODE_NIL: + useless = "nil"; + break; + case NODE_TRUE: + useless = "true"; + break; + case NODE_FALSE: + useless = "false"; + break; + case NODE_DEFINED: + useless = "defined?"; + break; + } + + if (useless) { + int line = ruby_sourceline; + + ruby_sourceline = nd_line(node); + rb_warnS("useless use of %s in void context", useless); + ruby_sourceline = line; + } +} + +static void +void_stmts_gen(struct parser_params *parser, NODE *node) +{ + if (!RTEST(ruby_verbose)) return; + if (!node) return; + if (nd_type(node) != NODE_BLOCK) return; + + for (;;) { + if (!node->nd_next) return; + void_expr0(node->nd_head); + node = node->nd_next; + } +} + +static NODE * +remove_begin(NODE *node) +{ + NODE **n = &node, *n1 = node; + while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { + *n = n1 = n1->nd_body; + } + return node; +} + +static void +reduce_nodes_gen(struct parser_params *parser, NODE **body) +{ + NODE *node = *body; + + if (!node) { + *body = NEW_NIL(); + return; + } +#define subnodes(n1, n2) \ + ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ + (!node->n2) ? (body = &node->n1, 1) : \ + (reduce_nodes(&node->n1), body = &node->n2, 1)) + + while (node) { + switch (nd_type(node)) { + end: + case NODE_NIL: + *body = 0; + return; + case NODE_RETURN: + *body = node = node->nd_stts; + continue; + case NODE_BEGIN: + *body = node = node->nd_body; + continue; + case NODE_BLOCK: + body = &node->nd_end->nd_head; + break; + case NODE_IF: + if (subnodes(nd_body, nd_else)) break; + return; + case NODE_CASE: + body = &node->nd_body; + break; + case NODE_WHEN: + if (!subnodes(nd_body, nd_next)) goto end; + break; + case NODE_ENSURE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + case NODE_RESCUE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + default: + return; + } + node = *body; + } + +#undef subnodes +} + +static int +assign_in_cond(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_MASGN: + yyerror("multiple assignment in conditional"); + return 1; + + case NODE_LASGN: + case NODE_DASGN: + case NODE_GASGN: + case NODE_IASGN: + break; + + default: + return 0; + } + + switch (nd_type(node->nd_value)) { + case NODE_LIT: + case NODE_STR: + case NODE_NIL: + case NODE_TRUE: + case NODE_FALSE: + /* reports always */ + parser_warn(node->nd_value, "found = in conditional, should be =="); + return 1; + + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_EVSTR: + case NODE_DREGX: + default: + break; + } + return 1; +} + +static void +warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warn(node, str); +} + +static void +warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warning(node, str); +} + +static void +fixup_nodes(NODE **rootnode) +{ + NODE *node, *next, *head; + + for (node = *rootnode; node; node = next) { + enum node_type type; + VALUE val; + + next = node->nd_next; + head = node->nd_head; + rb_gc_force_recycle((VALUE)node); + *rootnode = next; + switch (type = nd_type(head)) { + case NODE_DOT2: + case NODE_DOT3: + val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, + type == NODE_DOT3 ? Qtrue : Qfalse); + rb_gc_force_recycle((VALUE)head->nd_beg); + rb_gc_force_recycle((VALUE)head->nd_end); + nd_set_type(head, NODE_LIT); + head->nd_lit = val; + break; + default: + break; + } + } +} + +static NODE *cond0(struct parser_params*,NODE*); + +static NODE* +range_op(struct parser_params *parser, NODE *node) +{ + enum node_type type; + + if (node == 0) return 0; + + type = nd_type(node); + value_expr(node); + if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { + warn_unless_e_option(parser, node, "integer literal in conditional range"); + return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); + } + return cond0(parser, node); +} + +static int +literal_node(NODE *node) +{ + if (!node) return 1; /* same as NODE_NIL */ + switch (nd_type(node)) { + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_EVSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + case NODE_DSYM: + return 2; + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + return 1; + } + return 0; +} + +static NODE* +cond0(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + assign_in_cond(parser, node); + + switch (nd_type(node)) { + case NODE_DSTR: + case NODE_EVSTR: + case NODE_STR: + rb_warn0("string literal in condition"); + break; + + case NODE_DREGX: + case NODE_DREGX_ONCE: + warning_unless_e_option(parser, node, "regex literal in condition"); + return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); + + case NODE_AND: + case NODE_OR: + node->nd_1st = cond0(parser, node->nd_1st); + node->nd_2nd = cond0(parser, node->nd_2nd); + break; + + case NODE_DOT2: + case NODE_DOT3: + node->nd_beg = range_op(parser, node->nd_beg); + node->nd_end = range_op(parser, node->nd_end); + if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); + else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); + if (!e_option_supplied(parser)) { + int b = literal_node(node->nd_beg); + int e = literal_node(node->nd_end); + if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { + parser_warn(node, "range literal in condition"); + } + } + break; + + case NODE_DSYM: + parser_warning(node, "literal in condition"); + break; + + case NODE_LIT: + if (TYPE(node->nd_lit) == T_REGEXP) { + warn_unless_e_option(parser, node, "regex literal in condition"); + nd_set_type(node, NODE_MATCH); + } + else { + parser_warning(node, "literal in condition"); + } + default: + break; + } + return node; +} + +static NODE* +cond_gen(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + return cond0(parser, node); +} + +static NODE* +logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) +{ + value_expr(left); + if (left && nd_type(left) == type) { + NODE *node = left, *second; + while ((second = node->nd_2nd) != 0 && nd_type(second) == type) { + node = second; + } + node->nd_2nd = NEW_NODE(type, second, right, 0); + return left; + } + return NEW_NODE(type, left, right, 0); +} + +static void +no_blockarg(struct parser_params *parser, NODE *node) +{ + if (node && nd_type(node) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "block argument should not be given"); + } +} + +static NODE * +ret_args_gen(struct parser_params *parser, NODE *node) +{ + if (node) { + no_blockarg(parser, node); + if (nd_type(node) == NODE_ARRAY) { + if (node->nd_next == 0) { + node = node->nd_head; + } + else { + nd_set_type(node, NODE_VALUES); + } + } + } + return node; +} + +static NODE * +new_yield_gen(struct parser_params *parser, NODE *node) +{ + long state = Qtrue; + + if (node) { + no_blockarg(parser, node); + if (node && nd_type(node) == NODE_SPLAT) { + state = Qtrue; + } + } + else { + state = Qfalse; + } + return NEW_YIELD(node, state); +} + +static NODE* +negate_lit(NODE *node) +{ + switch (TYPE(node->nd_lit)) { + case T_FIXNUM: + node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); + break; + case T_BIGNUM: + node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); + break; + case T_FLOAT: + RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); + break; + default: + break; + } + return node; +} + +static NODE * +arg_blk_pass(NODE *node1, NODE *node2) +{ + if (node2) { + node2->nd_head = node1; + return node2; + } + return node1; +} + +static NODE* +new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) +{ + int saved_line = ruby_sourceline; + NODE *node; + NODE *i1, *i2 = 0; + + node = NEW_ARGS(m ? m->nd_plen : 0, o); + i1 = m ? m->nd_next : 0; + node->nd_next = NEW_ARGS_AUX(r, b); + + if (p) { + i2 = p->nd_next; + node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); + } + else if (i1) { + node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); + } + if (i1 || i2) { + node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); + } + ruby_sourceline = saved_line; + return node; +} + +static void +local_push_gen(struct parser_params *parser, int inherit_dvars) +{ + struct local_vars *local; + + local = ALLOC(struct local_vars); + local->prev = lvtbl; + local->args = vtable_alloc(0); + local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); + lvtbl = local; +} + +static void +local_pop_gen(struct parser_params *parser) +{ + struct local_vars *local = lvtbl->prev; + vtable_free(lvtbl->args); + vtable_free(lvtbl->vars); + xfree(lvtbl); + lvtbl = local; +} + +static ID* +vtable_tblcpy(ID *buf, const struct vtable *src) +{ + int i, cnt = vtable_size(src); + + if (cnt > 0) { + buf[0] = cnt; + for (i = 0; i < cnt; i++) { + buf[i] = src->tbl[i]; + } + return buf; + } + return 0; +} + +static ID* +local_tbl_gen(struct parser_params *parser) +{ + int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); + ID *buf; + + if (cnt <= 0) return 0; + buf = ALLOC_N(ID, cnt + 1); + vtable_tblcpy(buf+1, lvtbl->args); + vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); + buf[0] = cnt; + return buf; +} + +static int +arg_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->args, id); + return vtable_size(lvtbl->args) - 1; +} + +static int +local_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->vars, id); + return vtable_size(lvtbl->vars) - 1; +} + +static int +local_id_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + vars = lvtbl->vars; + args = lvtbl->args; + + while (vars && POINTER_P(vars->prev)) { + vars = vars->prev; + args = args->prev; + } + + if (vars && vars->prev == DVARS_INHERIT) { + return rb_local_defined(id); + } + else { + return (vtable_included(args, id) || + vtable_included(vars, id)); + } +} + +static void +dyna_push_gen(struct parser_params *parser) +{ + lvtbl->args = vtable_alloc(lvtbl->args); + lvtbl->vars = vtable_alloc(lvtbl->vars); +} + +static void +dyna_pop_gen(struct parser_params *parser) +{ + struct vtable *tmp; + + tmp = lvtbl->args; + lvtbl->args = lvtbl->args->prev; + vtable_free(tmp); + tmp = lvtbl->vars; + lvtbl->vars = lvtbl->vars->prev; + vtable_free(tmp); +} + +static int +dyna_in_block_gen(struct parser_params *parser) +{ + return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; +} + +static int +dvar_defined_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + args = lvtbl->args; + vars = lvtbl->vars; + + while (POINTER_P(vars)) { + if (vtable_included(args, id)) { + return 1; + } + if (vtable_included(vars, id)) { + return 1; + } + args = args->prev; + vars = vars->prev; + } + + if (vars == DVARS_INHERIT) { + return rb_dvar_defined(id); + } + + return 0; +} + +static int +dvar_curr_gen(struct parser_params *parser, ID id) +{ + return (vtable_included(lvtbl->args, id) || + vtable_included(lvtbl->vars, id)); +} + +VALUE rb_reg_compile(VALUE str, int options); +VALUE rb_reg_check_preprocess(VALUE); + +static void +reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) +{ + int c = RE_OPTION_ENCODING_IDX(options); + + if (c) { + int opt, idx; + rb_char_to_option_kcode(c, &opt, &idx); + if (idx != ENCODING_GET(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + goto error; + } + ENCODING_SET(str, idx); + } + else if (RE_OPTION_ENCODING_NONE(options)) { + if (!ENCODING_IS_ASCII8BIT(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + c = 'n'; + goto error; + } + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + else if (parser->enc == rb_usascii_encoding()) { + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + /* raise in re.c */ + rb_enc_associate(str, rb_usascii_encoding()); + } + else { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + return; + + error: + compile_error(PARSER_ARG + "regexp encoding option '%c' differs from source encoding '%s'", + c, rb_enc_name(rb_enc_get(str))); +} + +static void +reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE err; + reg_fragment_setenc_gen(parser, str, options); + err = rb_reg_check_preprocess(str); + if (err != Qnil) { + err = rb_obj_as_string(err); + compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); + RB_GC_GUARD(err); + } +} + +typedef struct { + struct parser_params* parser; + rb_encoding *enc; + NODE *succ_block; + NODE *fail_block; + int num; +} reg_named_capture_assign_t; + +static int +reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg0) +{ + reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; + struct parser_params* parser = arg->parser; + rb_encoding *enc = arg->enc; + int len = name_end - name; + const char *s = (const char *)name; + ID var; + + arg->num++; + + if (arg->succ_block == 0) { + arg->succ_block = NEW_BEGIN(0); + arg->fail_block = NEW_BEGIN(0); + } + + if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || + rb_reserved_word(s, len) || !rb_enc_symname2_p(s, len, enc)) { + return ST_CONTINUE; + } + var = rb_intern3(s, len, enc); + if (dvar_defined(var) || local_id(var)) { + rb_warningS("named capture conflicts a local variable - %s", + rb_id2name(var)); + } + arg->succ_block = block_append(arg->succ_block, + newline_node(node_assign(assignable(var,0), + NEW_CALL( + gettable(rb_intern("$~")), + idAREF, + NEW_LIST(NEW_LIT(ID2SYM(var)))) + ))); + arg->fail_block = block_append(arg->fail_block, + newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); + return ST_CONTINUE; +} + +static NODE * +reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) +{ + reg_named_capture_assign_t arg; + + arg.parser = parser; + arg.enc = rb_enc_get(regexp); + arg.succ_block = 0; + arg.fail_block = 0; + arg.num = 0; + onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); + + if (arg.num == 0) + return match; + + return + block_append( + newline_node(match), + NEW_IF(gettable(rb_intern("$~")), + block_append( + newline_node(arg.succ_block), + newline_node( + NEW_CALL( + gettable(rb_intern("$~")), + rb_intern("begin"), + NEW_LIST(NEW_LIT(INT2FIX(0)))))), + block_append( + newline_node(arg.fail_block), + newline_node( + NEW_LIT(Qnil))))); +} + +static VALUE +reg_compile_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE re; + VALUE err; + + reg_fragment_setenc(str, options); + err = rb_errinfo(); + re = rb_reg_compile(str, options & RE_OPTION_MASK); + if (NIL_P(re)) { + ID mesg = rb_intern("mesg"); + VALUE m = rb_attr_get(rb_errinfo(), mesg); + rb_set_errinfo(err); + if (!NIL_P(err)) { + rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); + } + else { + compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); + } + return Qnil; + } + return re; +} + +void +rb_gc_mark_parser(void) +{ +} + +NODE* +rb_parser_append_print(VALUE vparser, NODE *node) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + + node = block_append(node, + NEW_FCALL(rb_intern("print"), + NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +NODE * +rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + if (split) { + node = block_append(NEW_GASGN(rb_intern("$F"), + NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("split"), 0)), + node); + } + if (chop) { + node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("chop!"), 0), node); + } + + node = NEW_OPT_N(node); + + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +static const struct { + ID token; + const char *name; +} op_tbl[] = { + {tDOT2, ".."}, + {tDOT3, "..."}, + {'+', "+(binary)"}, + {'-', "-(binary)"}, + {tPOW, "**"}, + {tUPLUS, "+@"}, + {tUMINUS, "-@"}, + {tCMP, "<=>"}, + {tGEQ, ">="}, + {tLEQ, "<="}, + {tEQ, "=="}, + {tEQQ, "==="}, + {tNEQ, "!="}, + {tMATCH, "=~"}, + {tNMATCH, "!~"}, + {tAREF, "[]"}, + {tASET, "[]="}, + {tLSHFT, "<<"}, + {tRSHFT, ">>"}, + {tCOLON2, "::"}, +}; + +#define op_tbl_count (sizeof(op_tbl) / sizeof(op_tbl[0])) + +static struct symbols { + ID last_id; + st_table *sym_id; + st_table *id_str; + st_table *ivar2_id; + st_table *id_ivar2; + VALUE op_sym[tLAST_TOKEN]; +} global_symbols = {tLAST_ID}; + +static const struct st_hash_type symhash = { + rb_str_hash_cmp, + rb_str_hash, +}; + +struct ivar2_key { + ID id; + VALUE klass; +}; + +static int +ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) +{ + if (key1->id == key2->id && key1->klass == key2->klass) { + return 0; + } + return 1; +} + +static int +ivar2_hash(struct ivar2_key *key) +{ + return (key->id << 8) ^ (key->klass >> 2); +} + +static const struct st_hash_type ivar2_hash_type = { + ivar2_cmp, + ivar2_hash, +}; + +void +Init_sym(void) +{ + global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); + global_symbols.id_str = st_init_numtable_with_size(1000); + global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); + global_symbols.id_ivar2 = st_init_numtable_with_size(1000); + + Init_id(); +} + +void +rb_gc_mark_symbols(void) +{ + rb_mark_tbl(global_symbols.id_str); + rb_gc_mark_locations(global_symbols.op_sym, + global_symbols.op_sym + tLAST_TOKEN); +} + +static ID +internal_id_gen(struct parser_params *parser) +{ + ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); + id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; + return ID_INTERNAL | (id << ID_SCOPE_SHIFT); +} + +static int +is_special_global_name(const char *m, const char *e, rb_encoding *enc) +{ + int mb = 0; + + if (m >= e) return 0; + switch (*m) { + case '~': case '*': case '$': case '?': case '!': case '@': + case '/': case '\\': case ';': case ',': case '.': case '=': + case ':': case '<': case '>': case '\"': + case '&': case '`': case '\'': case '+': + case '0': + ++m; + break; + case '-': + ++m; + if (m < e && is_identchar(m, e, enc)) { + if (!ISASCII(*m)) mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + break; + default: + if (!rb_enc_isdigit(*m, enc)) return 0; + do { + if (!ISASCII(*m)) mb = 1; + ++m; + } while (rb_enc_isdigit(*m, enc)); + } + return m == e ? mb + 1 : 0; +} + +int +rb_symname_p(const char *name) +{ + return rb_enc_symname_p(name, rb_ascii8bit_encoding()); +} + +int +rb_enc_symname_p(const char *name, rb_encoding *enc) +{ + return rb_enc_symname2_p(name, strlen(name), enc); +} + +int +rb_enc_symname2_p(const char *name, int len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + int localid = Qfalse; + + if (!m) return Qfalse; + switch (*m) { + case '\0': + return Qfalse; + + case '$': + if (is_special_global_name(++m, e, enc)) return Qtrue; + goto id; + + case '@': + if (*++m == '@') ++m; + goto id; + + case '<': + switch (*++m) { + case '<': ++m; break; + case '=': if (*++m == '>') ++m; break; + default: break; + } + break; + + case '>': + switch (*++m) { + case '>': case '=': ++m; break; + } + break; + + case '=': + switch (*++m) { + case '~': ++m; break; + case '=': if (*++m == '=') ++m; break; + default: return Qfalse; + } + break; + + case '*': + if (*++m == '*') ++m; + break; + + case '+': case '-': + if (*++m == '@') ++m; + break; + + case '|': case '^': case '&': case '/': case '%': case '~': case '`': + ++m; + break; + + case '[': + if (*++m != ']') return Qfalse; + if (*++m == '=') ++m; + break; + + case '!': + switch (*++m) { + case '\0': return Qtrue; + case '=': case '~': ++m; break; + default: return Qfalse; + } + break; + + default: + localid = !rb_enc_isupper(*m, enc); + id: + if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) + return Qfalse; + while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); + if (localid) { + switch (*m) { + case '!': case '?': case '=': ++m; + } + } + break; + } + return *m ? Qfalse : Qtrue; +} + +static ID +register_symid(ID id, const char *name, long len, rb_encoding *enc) +{ + VALUE str = rb_enc_str_new(name, len, enc); + OBJ_FREEZE(str); + st_add_direct(global_symbols.sym_id, (st_data_t)str, id); + st_add_direct(global_symbols.id_str, id, (st_data_t)str); + return id; +} + +ID +rb_intern3(const char *name, long len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + unsigned char c; + VALUE str; + ID id; + int last; + int mb; + struct RString fake_str; + fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE; + fake_str.basic.klass = rb_cString; + fake_str.as.heap.len = len; + fake_str.as.heap.ptr = (char *)name; + fake_str.as.heap.aux.capa = len; + str = (VALUE)&fake_str; + rb_enc_associate(str, enc); + + if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) + return id; + + if (rb_cString && !rb_enc_asciicompat(enc)) { + id = ID_JUNK; + goto new_id; + } + last = len-1; + id = 0; + switch (*m) { + case '$': + id |= ID_GLOBAL; + if ((mb = is_special_global_name(++m, e, enc)) != 0) { + if (!--mb) enc = rb_ascii8bit_encoding(); + goto new_id; + } + break; + case '@': + if (m[1] == '@') { + m++; + id |= ID_CLASS; + } + else { + id |= ID_INSTANCE; + } + m++; + break; + default: + c = m[0]; + if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { + /* operators */ + int i; + + if (len == 1) { + id = c; + goto id_register; + } + for (i = 0; i < op_tbl_count; i++) { + if (*op_tbl[i].name == *m && + strcmp(op_tbl[i].name, m) == 0) { + id = op_tbl[i].token; + goto id_register; + } + } + } + + if (m[last] == '=') { + /* attribute assignment */ + id = rb_intern3(name, last, enc); + if (id > tLAST_TOKEN && !is_attrset_id(id)) { + enc = rb_enc_get(rb_id2str(id)); + id = rb_id_attrset(id); + goto id_register; + } + id = ID_ATTRSET; + } + else if (rb_enc_isupper(m[0], enc)) { + id = ID_CONST; + } + else { + id = ID_LOCAL; + } + break; + } + mb = 0; + if (!rb_enc_isdigit(*m, enc)) { + while (m <= name + last && is_identchar(m, e, enc)) { + if (ISASCII(*m)) { + m++; + } + else { + mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + } + } + if (m - name < len) id = ID_JUNK; + if (enc != rb_usascii_encoding()) { + /* + * this clause makes sense only when called from other than + * rb_intern_str() taking care of code-range. + */ + if (!mb) { + for (; m <= name + len; ++m) { + if (!ISASCII(*m)) goto mbstr; + } + enc = rb_usascii_encoding(); + } + mbstr:; + } + new_id: + id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; + id_register: + return register_symid(id, name, len, enc); +} + +ID +rb_intern2(const char *name, long len) +{ + return rb_intern3(name, len, rb_usascii_encoding()); +} + +#undef rb_intern +ID +rb_intern(const char *name) +{ + return rb_intern2(name, strlen(name)); +} + +ID +rb_intern_str(VALUE str) +{ + rb_encoding *enc; + ID id; + + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + enc = rb_usascii_encoding(); + } + else { + enc = rb_enc_get(str); + } + id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); + RB_GC_GUARD(str); + return id; +} + +VALUE +rb_id2str(ID id) +{ + st_data_t data; + + if (id < tLAST_TOKEN) { + int i = 0; + + if (rb_ispunct(id)) { + VALUE str = global_symbols.op_sym[i = (int)id]; + if (!str) { + char name[2]; + name[0] = (char)id; + name[1] = 0; + str = rb_usascii_str_new(name, 1); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + for (i = 0; i < op_tbl_count; i++) { + if (op_tbl[i].token == id) { + VALUE str = global_symbols.op_sym[i]; + if (!str) { + str = rb_usascii_str_new2(op_tbl[i].name); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + } + } + + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + + if (is_attrset_id(id)) { + ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; + VALUE str; + + while (!(str = rb_id2str(id2))) { + if (!is_local_id(id2)) return 0; + id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; + } + str = rb_str_dup(str); + rb_str_cat(str, "=", 1); + rb_intern_str(str); + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + } + return 0; +} + +const char * +rb_id2name(ID id) +{ + VALUE str = rb_id2str(id); + + if (!str) return 0; + return RSTRING_PTR(str); +} + +static int +symbols_i(VALUE sym, ID value, VALUE ary) +{ + rb_ary_push(ary, ID2SYM(value)); + return ST_CONTINUE; +} + +/* + * call-seq: + * Symbol.all_symbols => array + * + * Returns an array of all the symbols currently in Ruby's symbol + * table. + * + * Symbol.all_symbols.size #=> 903 + * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, + * :chown, :EOFError, :$;, :String, + * :LOCK_SH, :"setuid?", :$<, + * :default_proc, :compact, :extend, + * :Tms, :getwd, :$=, :ThreadGroup, + * :wait2, :$>] + */ + +VALUE +rb_sym_all_symbols(void) +{ + VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); + + st_foreach(global_symbols.sym_id, symbols_i, ary); + return ary; +} + +int +rb_is_const_id(ID id) +{ + if (is_const_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_class_id(ID id) +{ + if (is_class_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_instance_id(ID id) +{ + if (is_instance_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_local_id(ID id) +{ + if (is_local_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_junk_id(ID id) +{ + if (is_junk_id(id)) return Qtrue; + return Qfalse; +} + +#endif /* !RIPPER */ + +static void +parser_initialize(struct parser_params *parser) +{ + parser->eofp = Qfalse; + + parser->parser_lex_strterm = 0; + parser->parser_cond_stack = 0; + parser->parser_cmdarg_stack = 0; + parser->parser_class_nest = 0; + parser->parser_paren_nest = 0; + parser->parser_lpar_beg = 0; + parser->parser_in_single = 0; + parser->parser_in_def = 0; + parser->parser_in_defined = 0; + parser->parser_compile_for_eval = 0; + parser->parser_cur_mid = 0; + parser->parser_tokenbuf = NULL; + parser->parser_tokidx = 0; + parser->parser_toksiz = 0; + parser->parser_heredoc_end = 0; + parser->parser_command_start = Qtrue; + parser->parser_deferred_nodes = 0; + parser->parser_lex_pbeg = 0; + parser->parser_lex_p = 0; + parser->parser_lex_pend = 0; + parser->parser_lvtbl = 0; + parser->parser_ruby__end__seen = 0; + parser->parser_ruby_sourcefile = 0; +#ifndef RIPPER + parser->is_ripper = 0; + parser->parser_eval_tree_begin = 0; + parser->parser_eval_tree = 0; +#else + parser->is_ripper = 1; + parser->parser_ruby_sourcefile_string = Qnil; + parser->delayed = Qnil; + + parser->result = Qnil; + parser->parsing_thread = Qnil; + parser->toplevel_p = Qtrue; +#endif +#ifdef YYMALLOC + parser->heap = NULL; +#endif + parser->enc = rb_usascii_encoding(); +} + +#ifdef RIPPER +#define parser_mark ripper_parser_mark +#define parser_free ripper_parser_free +#endif + +static void +parser_mark(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + + rb_gc_mark((VALUE)p->parser_lex_strterm); + rb_gc_mark((VALUE)p->parser_deferred_nodes); + rb_gc_mark(p->parser_lex_input); + rb_gc_mark(p->parser_lex_lastline); + rb_gc_mark(p->parser_lex_nextline); +#ifndef RIPPER + rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; + rb_gc_mark((VALUE)p->parser_eval_tree) ; + rb_gc_mark(p->debug_lines); +#else + rb_gc_mark(p->parser_ruby_sourcefile_string); + rb_gc_mark(p->delayed); + rb_gc_mark(p->value); + rb_gc_mark(p->result); + rb_gc_mark(p->parsing_thread); +#endif +#ifdef YYMALLOC + rb_gc_mark((VALUE)p->heap); +#endif +} + +static void +parser_free(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + struct local_vars *local, *prev; + + if (p->parser_tokenbuf) { + xfree(p->parser_tokenbuf); + } + for (local = p->parser_lvtbl; local; local = prev) { + if (local->vars) xfree(local->vars); + prev = local->prev; + xfree(local); + } +#ifndef RIPPER + xfree(p->parser_ruby_sourcefile); +#endif + xfree(p); +} + +VALUE rb_parser_get_yydebug(VALUE); +VALUE rb_parser_set_yydebug(VALUE, VALUE); + +#ifndef RIPPER +static struct parser_params * +parser_new(void) +{ + struct parser_params *p; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + parser_initialize(p); + return p; +} + +VALUE +rb_parser_new(void) +{ + struct parser_params *p = parser_new(); + + return Data_Wrap_Struct(0, parser_mark, parser_free, p); +} + +/* + * call-seq: + * ripper#end_seen? -> Boolean + * + * Return if parsed source ended by +\_\_END\_\_+. + * This number starts from 1. + */ +VALUE +rb_parser_end_seen_p(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return ruby__end__seen ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper#encoding -> encoding + * + * Return encoding of the source. + */ +VALUE +rb_parser_encoding(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return rb_enc_from_encoding(parser->enc); +} + +/* + * call-seq: + * ripper.yydebug -> true or false + * + * Get yydebug. + */ +VALUE +rb_parser_get_yydebug(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + return yydebug ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper.yydebug = flag + * + * Set yydebug. + */ +VALUE +rb_parser_set_yydebug(VALUE self, VALUE flag) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + yydebug = RTEST(flag); + return flag; +} + +#ifdef YYMALLOC +#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) +#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) +#define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ + (n)->u3.cnt = (c), (p)) + +void * +rb_parser_malloc(struct parser_params *parser, size_t size) +{ + size_t cnt = HEAPCNT(1, size); + NODE *n = NEWHEAP(); + void *ptr = xmalloc(size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) +{ + size_t cnt = HEAPCNT(nelem, size); + NODE *n = NEWHEAP(); + void *ptr = xcalloc(nelem, size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) +{ + NODE *n; + size_t cnt = HEAPCNT(1, size); + + if (ptr && (n = parser->heap) != NULL) { + do { + if (n->u1.node == ptr) { + n->u1.node = ptr = xrealloc(ptr, size); + if (n->u3.cnt) n->u3.cnt = cnt; + return ptr; + } + } while ((n = n->u2.node) != NULL); + } + n = NEWHEAP(); + ptr = xrealloc(ptr, size); + return ADD2HEAP(n, cnt, ptr); +} + +void +rb_parser_free(struct parser_params *parser, void *ptr) +{ + NODE **prev = &parser->heap, *n; + + while ((n = *prev) != NULL) { + if (n->u1.node == ptr) { + *prev = n->u2.node; + rb_gc_force_recycle((VALUE)n); + break; + } + prev = &n->u2.node; + } + xfree(ptr); +} +#endif +#endif + +#ifdef RIPPER +#ifdef RIPPER_DEBUG +extern int rb_is_pointer_to_heap(VALUE); + +/* :nodoc: */ +static VALUE +ripper_validate_object(VALUE self, VALUE x) +{ + if (x == Qfalse) return x; + if (x == Qtrue) return x; + if (x == Qnil) return x; + if (x == Qundef) + rb_raise(rb_eArgError, "Qundef given"); + if (FIXNUM_P(x)) return x; + if (SYMBOL_P(x)) return x; + if (!rb_is_pointer_to_heap(x)) + rb_raise(rb_eArgError, "invalid pointer: %p", x); + switch (TYPE(x)) { + case T_STRING: + case T_OBJECT: + case T_ARRAY: + case T_BIGNUM: + case T_FLOAT: + return x; + case T_NODE: + rb_raise(rb_eArgError, "NODE given: %p", x); + default: + rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", + x, rb_obj_classname(x)); + } + return x; +} +#endif + +#define validate(x) + +static VALUE +ripper_dispatch0(struct parser_params *parser, ID mid) +{ + return rb_funcall(parser->value, mid, 0); +} + +static VALUE +ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) +{ + validate(a); + return rb_funcall(parser->value, mid, 1, a); +} + +static VALUE +ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) +{ + validate(a); + validate(b); + return rb_funcall(parser->value, mid, 2, a, b); +} + +static VALUE +ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) +{ + validate(a); + validate(b); + validate(c); + return rb_funcall(parser->value, mid, 3, a, b, c); +} + +static VALUE +ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) +{ + validate(a); + validate(b); + validate(c); + validate(d); + return rb_funcall(parser->value, mid, 4, a, b, c, d); +} + +static VALUE +ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) +{ + validate(a); + validate(b); + validate(c); + validate(d); + validate(e); + return rb_funcall(parser->value, mid, 5, a, b, c, d, e); +} + +static const struct kw_assoc { + ID id; + const char *name; +} keyword_to_name[] = { + {keyword_class, "class"}, + {keyword_module, "module"}, + {keyword_def, "def"}, + {keyword_undef, "undef"}, + {keyword_begin, "begin"}, + {keyword_rescue, "rescue"}, + {keyword_ensure, "ensure"}, + {keyword_end, "end"}, + {keyword_if, "if"}, + {keyword_unless, "unless"}, + {keyword_then, "then"}, + {keyword_elsif, "elsif"}, + {keyword_else, "else"}, + {keyword_case, "case"}, + {keyword_when, "when"}, + {keyword_while, "while"}, + {keyword_until, "until"}, + {keyword_for, "for"}, + {keyword_break, "break"}, + {keyword_next, "next"}, + {keyword_redo, "redo"}, + {keyword_retry, "retry"}, + {keyword_in, "in"}, + {keyword_do, "do"}, + {keyword_do_cond, "do"}, + {keyword_do_block, "do"}, + {keyword_return, "return"}, + {keyword_yield, "yield"}, + {keyword_super, "super"}, + {keyword_self, "self"}, + {keyword_nil, "nil"}, + {keyword_true, "true"}, + {keyword_false, "false"}, + {keyword_and, "and"}, + {keyword_or, "or"}, + {keyword_not, "not"}, + {modifier_if, "if"}, + {modifier_unless, "unless"}, + {modifier_while, "while"}, + {modifier_until, "until"}, + {modifier_rescue, "rescue"}, + {keyword_alias, "alias"}, + {keyword_defined, "defined?"}, + {keyword_BEGIN, "BEGIN"}, + {keyword_END, "END"}, + {keyword__LINE__, "__LINE__"}, + {keyword__FILE__, "__FILE__"}, + {keyword__ENCODING__, "__ENCODING__"}, + {0, NULL} +}; + +static const char* +keyword_id_to_str(ID id) +{ + const struct kw_assoc *a; + + for (a = keyword_to_name; a->id; a++) { + if (a->id == id) + return a->name; + } + return NULL; +} + +#undef ripper_id2sym +static VALUE +ripper_id2sym(ID id) +{ + const char *name; + char buf[8]; + + if (id <= 256) { + buf[0] = id; + buf[1] = '\0'; + return ID2SYM(rb_intern(buf)); + } + if ((name = keyword_id_to_str(id))) { + return ID2SYM(rb_intern(name)); + } + switch (id) { + case tOROP: + name = "||"; + break; + case tANDOP: + name = "&&"; + break; + default: + name = rb_id2name(id); + if (!name) { + rb_bug("cannot convert ID to string: %ld", (unsigned long)id); + } + break; + } + return ID2SYM(rb_intern(name)); +} + +static VALUE +ripper_intern(const char *s) +{ + return ID2SYM(rb_intern(s)); +} + +static void +ripper_compile_error(struct parser_params *parser, const char *fmt, ...) +{ + VALUE str; + va_list args; + + va_start(args, fmt); + str = rb_vsprintf(fmt, args); + va_end(args); + rb_funcall(parser->value, rb_intern("compile_error"), 1, str); +} + +static void +ripper_warn0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warnI(struct parser_params *parser, const char *fmt, int a) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), INT2NUM(a)); +} + +#if 0 +static void +ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} +#endif + +static void +ripper_warning0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warning"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} + +static VALUE +ripper_lex_get_generic(struct parser_params *parser, VALUE src) +{ + return rb_funcall(src, ripper_id_gets, 0); +} + +static VALUE +ripper_s_allocate(VALUE klass) +{ + struct parser_params *p; + VALUE self; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + self = Data_Wrap_Struct(klass, parser_mark, parser_free, p); + p->value = self; + return self; +} + +#define ripper_initialized_p(r) ((r)->parser_lex_input != 0) + +/* + * call-seq: + * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper + * + * Create a new Ripper object. + * _src_ must be a String, an IO, or an Object which has #gets method. + * + * This method does not starts parsing. + * See also Ripper#parse and Ripper.parse. + */ +static VALUE +ripper_initialize(int argc, VALUE *argv, VALUE self) +{ + struct parser_params *parser; + VALUE src, fname, lineno; + + Data_Get_Struct(self, struct parser_params, parser); + rb_scan_args(argc, argv, "12", &src, &fname, &lineno); + if (rb_obj_respond_to(src, ripper_id_gets, 0)) { + parser->parser_lex_gets = ripper_lex_get_generic; + } + else { + StringValue(src); + parser->parser_lex_gets = lex_get_str; + } + parser->parser_lex_input = src; + parser->eofp = Qfalse; + if (NIL_P(fname)) { + fname = STR_NEW2("(ripper)"); + } + else { + StringValue(fname); + } + parser_initialize(parser); + + parser->parser_ruby_sourcefile_string = fname; + parser->parser_ruby_sourcefile = RSTRING_PTR(fname); + parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; + + return Qnil; +} + +extern VALUE rb_thread_pass(void); + +struct ripper_args { + struct parser_params *parser; + int argc; + VALUE *argv; +}; + +static VALUE +ripper_parse0(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser_prepare(parser); + ripper_yyparse((void*)parser); + return parser->result; +} + +static VALUE +ripper_ensure(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser->parsing_thread = Qnil; + return Qnil; +} + +/* + * call-seq: + * ripper#parse + * + * Start parsing and returns the value of the root action. + */ +static VALUE +ripper_parse(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (!NIL_P(parser->parsing_thread)) { + if (parser->parsing_thread == rb_thread_current()) + rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); + else + rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); + } + parser->parsing_thread = rb_thread_current(); + rb_ensure(ripper_parse0, self, ripper_ensure, self); + + return parser->result; +} + +/* + * call-seq: + * ripper#column -> Integer + * + * Return column number of current parsing line. + * This number starts from 0. + */ +static VALUE +ripper_column(VALUE self) +{ + struct parser_params *parser; + long col; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + col = parser->tokp - parser->parser_lex_pbeg; + return LONG2NUM(col); +} + +/* + * call-seq: + * ripper#lineno -> Integer + * + * Return line number of current parsing line. + * This number starts from 1. + */ +static VALUE +ripper_lineno(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + return INT2NUM(parser->parser_ruby_sourceline); +} + +#ifdef RIPPER_DEBUG +/* :nodoc: */ +static VALUE +ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) +{ + StringValue(msg); + if (obj == Qundef) { + rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); + } + return Qnil; +} + +/* :nodoc: */ +static VALUE +ripper_value(VALUE self, VALUE obj) +{ + return ULONG2NUM(obj); +} +#endif + +void +Init_ripper(void) +{ + VALUE Ripper; + + Ripper = rb_define_class("Ripper", rb_cObject); + rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); + rb_define_alloc_func(Ripper, ripper_s_allocate); + rb_define_method(Ripper, "initialize", ripper_initialize, -1); + rb_define_method(Ripper, "parse", ripper_parse, 0); + rb_define_method(Ripper, "column", ripper_column, 0); + rb_define_method(Ripper, "lineno", ripper_lineno, 0); + rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); + rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); + rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); + rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); +#ifdef RIPPER_DEBUG + rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); + rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); + rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); +#endif + + ripper_id_gets = rb_intern("gets"); + ripper_init_eventids1(Ripper); + ripper_init_eventids2(Ripper); + /* ensure existing in symbol table */ + rb_intern("||"); + rb_intern("&&"); +} +#endif /* RIPPER */ + diff --git a/lib/ruby-1.9.1-rc1/parse.h b/lib/ruby-1.9.1-rc1/parse.h new file mode 100644 index 0000000..d8b91c4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/parse.h @@ -0,0 +1,303 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + keyword_class = 258, + keyword_module = 259, + keyword_def = 260, + keyword_undef = 261, + keyword_begin = 262, + keyword_rescue = 263, + keyword_ensure = 264, + keyword_end = 265, + keyword_if = 266, + keyword_unless = 267, + keyword_then = 268, + keyword_elsif = 269, + keyword_else = 270, + keyword_case = 271, + keyword_when = 272, + keyword_while = 273, + keyword_until = 274, + keyword_for = 275, + keyword_break = 276, + keyword_next = 277, + keyword_redo = 278, + keyword_retry = 279, + keyword_in = 280, + keyword_do = 281, + keyword_do_cond = 282, + keyword_do_block = 283, + keyword_do_LAMBDA = 284, + keyword_return = 285, + keyword_yield = 286, + keyword_super = 287, + keyword_self = 288, + keyword_nil = 289, + keyword_true = 290, + keyword_false = 291, + keyword_and = 292, + keyword_or = 293, + keyword_not = 294, + modifier_if = 295, + modifier_unless = 296, + modifier_while = 297, + modifier_until = 298, + modifier_rescue = 299, + keyword_alias = 300, + keyword_defined = 301, + keyword_BEGIN = 302, + keyword_END = 303, + keyword__LINE__ = 304, + keyword__FILE__ = 305, + keyword__ENCODING__ = 306, + tIDENTIFIER = 307, + tFID = 308, + tGVAR = 309, + tIVAR = 310, + tCONSTANT = 311, + tCVAR = 312, + tLABEL = 313, + tINTEGER = 314, + tFLOAT = 315, + tSTRING_CONTENT = 316, + tCHAR = 317, + tNTH_REF = 318, + tBACK_REF = 319, + tREGEXP_END = 320, + tUPLUS = 321, + tUMINUS = 322, + tPOW = 323, + tCMP = 324, + tEQ = 325, + tEQQ = 326, + tNEQ = 327, + tGEQ = 328, + tLEQ = 329, + tANDOP = 330, + tOROP = 331, + tMATCH = 332, + tNMATCH = 333, + tDOT2 = 334, + tDOT3 = 335, + tAREF = 336, + tASET = 337, + tLSHFT = 338, + tRSHFT = 339, + tCOLON2 = 340, + tCOLON3 = 341, + tOP_ASGN = 342, + tASSOC = 343, + tLPAREN = 344, + tLPAREN_ARG = 345, + tRPAREN = 346, + tLBRACK = 347, + tLBRACE = 348, + tLBRACE_ARG = 349, + tSTAR = 350, + tAMPER = 351, + tLAMBDA = 352, + tSYMBEG = 353, + tSTRING_BEG = 354, + tXSTRING_BEG = 355, + tREGEXP_BEG = 356, + tWORDS_BEG = 357, + tQWORDS_BEG = 358, + tSTRING_DBEG = 359, + tSTRING_DVAR = 360, + tSTRING_END = 361, + tLAMBEG = 362, + tLOWEST = 363, + tUMINUS_NUM = 364, + idNULL = 365, + idRespond_to = 366, + idIFUNC = 367, + idCFUNC = 368, + idThrowState = 369, + id_core_set_method_alias = 370, + id_core_set_variable_alias = 371, + id_core_undef_method = 372, + id_core_define_method = 373, + id_core_define_singleton_method = 374, + id_core_set_postexe = 375, + tLAST_TOKEN = 376 + }; +#endif +/* Tokens. */ +#define keyword_class 258 +#define keyword_module 259 +#define keyword_def 260 +#define keyword_undef 261 +#define keyword_begin 262 +#define keyword_rescue 263 +#define keyword_ensure 264 +#define keyword_end 265 +#define keyword_if 266 +#define keyword_unless 267 +#define keyword_then 268 +#define keyword_elsif 269 +#define keyword_else 270 +#define keyword_case 271 +#define keyword_when 272 +#define keyword_while 273 +#define keyword_until 274 +#define keyword_for 275 +#define keyword_break 276 +#define keyword_next 277 +#define keyword_redo 278 +#define keyword_retry 279 +#define keyword_in 280 +#define keyword_do 281 +#define keyword_do_cond 282 +#define keyword_do_block 283 +#define keyword_do_LAMBDA 284 +#define keyword_return 285 +#define keyword_yield 286 +#define keyword_super 287 +#define keyword_self 288 +#define keyword_nil 289 +#define keyword_true 290 +#define keyword_false 291 +#define keyword_and 292 +#define keyword_or 293 +#define keyword_not 294 +#define modifier_if 295 +#define modifier_unless 296 +#define modifier_while 297 +#define modifier_until 298 +#define modifier_rescue 299 +#define keyword_alias 300 +#define keyword_defined 301 +#define keyword_BEGIN 302 +#define keyword_END 303 +#define keyword__LINE__ 304 +#define keyword__FILE__ 305 +#define keyword__ENCODING__ 306 +#define tIDENTIFIER 307 +#define tFID 308 +#define tGVAR 309 +#define tIVAR 310 +#define tCONSTANT 311 +#define tCVAR 312 +#define tLABEL 313 +#define tINTEGER 314 +#define tFLOAT 315 +#define tSTRING_CONTENT 316 +#define tCHAR 317 +#define tNTH_REF 318 +#define tBACK_REF 319 +#define tREGEXP_END 320 +#define tUPLUS 321 +#define tUMINUS 322 +#define tPOW 323 +#define tCMP 324 +#define tEQ 325 +#define tEQQ 326 +#define tNEQ 327 +#define tGEQ 328 +#define tLEQ 329 +#define tANDOP 330 +#define tOROP 331 +#define tMATCH 332 +#define tNMATCH 333 +#define tDOT2 334 +#define tDOT3 335 +#define tAREF 336 +#define tASET 337 +#define tLSHFT 338 +#define tRSHFT 339 +#define tCOLON2 340 +#define tCOLON3 341 +#define tOP_ASGN 342 +#define tASSOC 343 +#define tLPAREN 344 +#define tLPAREN_ARG 345 +#define tRPAREN 346 +#define tLBRACK 347 +#define tLBRACE 348 +#define tLBRACE_ARG 349 +#define tSTAR 350 +#define tAMPER 351 +#define tLAMBDA 352 +#define tSYMBEG 353 +#define tSTRING_BEG 354 +#define tXSTRING_BEG 355 +#define tREGEXP_BEG 356 +#define tWORDS_BEG 357 +#define tQWORDS_BEG 358 +#define tSTRING_DBEG 359 +#define tSTRING_DVAR 360 +#define tSTRING_END 361 +#define tLAMBEG 362 +#define tLOWEST 363 +#define tUMINUS_NUM 364 +#define idNULL 365 +#define idRespond_to 366 +#define idIFUNC 367 +#define idCFUNC 368 +#define idThrowState 369 +#define id_core_set_method_alias 370 +#define id_core_set_variable_alias 371 +#define id_core_undef_method 372 +#define id_core_define_method 373 +#define id_core_define_singleton_method 374 +#define id_core_set_postexe 375 +#define tLAST_TOKEN 376 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + VALUE val; + NODE *node; + ID id; + int num; +} +/* Line 1489 of yacc.c. */ + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + diff --git a/lib/ruby-1.9.1-rc1/parse.y b/lib/ruby-1.9.1-rc1/parse.y new file mode 100644 index 0000000..8cb73df --- /dev/null +++ b/lib/ruby-1.9.1-rc1/parse.y @@ -0,0 +1,10308 @@ +/********************************************************************** + + parse.y - + + $Author: yugui $ + created at: Fri May 28 18:02:42 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +%{ + +#define YYDEBUG 1 +#define YYERROR_VERBOSE 1 +#define YYSTACK_USE_ALLOCA 0 + +#include "ruby/ruby.h" +#include "ruby/st.h" +#include "ruby/encoding.h" +#include "node.h" +#include "parse.h" +#include "id.h" +#include "regenc.h" +#include +#include +#include + +#define YYMALLOC(size) rb_parser_malloc(parser, size) +#define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) +#define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) +#define YYFREE(ptr) rb_parser_free(parser, ptr) +#define malloc YYMALLOC +#define realloc YYREALLOC +#define calloc YYCALLOC +#define free YYFREE + +#ifndef RIPPER +static ID register_symid(ID, const char *, long, rb_encoding *); +#define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) +#include "id.c" +#endif + +#define is_notop_id(id) ((id)>tLAST_TOKEN) +#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) +#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) +#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) +#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) +#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) +#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) +#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) + +#define is_asgn_or_id(id) ((is_notop_id(id)) && \ + (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ + ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ + ((id)&ID_SCOPE_MASK) == ID_CLASS)) + +enum lex_state_e { + EXPR_BEG, /* ignore newline, +/- is a sign. */ + EXPR_END, /* newline significant, +/- is an operator. */ + EXPR_ENDARG, /* ditto, and unbound braces. */ + EXPR_ARG, /* newline significant, +/- is an operator. */ + EXPR_CMDARG, /* newline significant, +/- is an operator. */ + EXPR_MID, /* newline significant, +/- is an operator. */ + EXPR_FNAME, /* ignore newline, no reserved words. */ + EXPR_DOT, /* right after `.' or `::', no reserved words. */ + EXPR_CLASS, /* immediate after `class', no here document. */ + EXPR_VALUE /* alike EXPR_BEG but label is disallowed. */ +}; + +# ifdef HAVE_LONG_LONG +typedef unsigned LONG_LONG stack_type; +# else +typedef unsigned long stack_type; +# endif + +# define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) +# define BITSTACK_POP(stack) (stack = stack >> 1) +# define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) +# define BITSTACK_SET_P(stack) (stack&1) + +#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) +#define COND_POP() BITSTACK_POP(cond_stack) +#define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) +#define COND_P() BITSTACK_SET_P(cond_stack) + +#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) +#define CMDARG_POP() BITSTACK_POP(cmdarg_stack) +#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) +#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) + +struct vtable { + ID *tbl; + int pos; + int capa; + struct vtable *prev; +}; + +struct local_vars { + struct vtable *args; + struct vtable *vars; + struct local_vars *prev; +}; + +#define DVARS_INHERIT ((void*)1) +#define DVARS_TOPSCOPE NULL +#define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) +#define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) + +#ifndef RIPPER +static int +vtable_size(const struct vtable *tbl) +{ + if (POINTER_P(tbl)) { + return tbl->pos; + } + else { + return 0; + } +} + +#define VTBL_DEBUG 0 + +static struct vtable * +vtable_alloc(struct vtable *prev) +{ + struct vtable *tbl = ALLOC(struct vtable); + tbl->pos = 0; + tbl->capa = 8; + tbl->tbl = ALLOC_N(ID, tbl->capa); + tbl->prev = prev; + if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); + return tbl; +} + +static void +vtable_free(struct vtable *tbl) +{ + if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); + if (POINTER_P(tbl)) { + if (tbl->tbl) { + xfree(tbl->tbl); + } + xfree(tbl); + } +} + +static void +vtable_add(struct vtable *tbl, ID id) +{ + if (!POINTER_P(tbl)) { + rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); + } + if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); + + if (tbl->pos == tbl->capa) { + tbl->capa = tbl->capa * 2; + REALLOC_N(tbl->tbl, ID, tbl->capa); + } + tbl->tbl[tbl->pos++] = id; +} + +static int +vtable_included(const struct vtable * tbl, ID id) +{ + int i; + + if (POINTER_P(tbl)) { + for (i = 0; i < tbl->pos; i++) { + if (tbl->tbl[i] == id) { + return 1; + } + } + } + return 0; +} + + +typedef struct token_info { + const char *token; + int linenum; + int column; + int nonspc; + struct token_info *next; +} token_info; +#endif + +/* + Structure of Lexer Buffer: + + lex_pbeg tokp lex_p lex_pend + | | | | + |-----------+--------------+------------| + |<------------>| + token +*/ +struct parser_params { + int is_ripper; + NODE *heap; + + YYSTYPE *parser_yylval; + VALUE eofp; + + NODE *parser_lex_strterm; + enum lex_state_e parser_lex_state; + stack_type parser_cond_stack; + stack_type parser_cmdarg_stack; + int parser_class_nest; + int parser_paren_nest; + int parser_lpar_beg; + int parser_in_single; + int parser_in_def; + int parser_compile_for_eval; + VALUE parser_cur_mid; + int parser_in_defined; + char *parser_tokenbuf; + int parser_tokidx; + int parser_toksiz; + VALUE parser_lex_input; + VALUE parser_lex_lastline; + VALUE parser_lex_nextline; + const char *parser_lex_pbeg; + const char *parser_lex_p; + const char *parser_lex_pend; + int parser_heredoc_end; + int parser_command_start; + NODE *parser_deferred_nodes; + int parser_lex_gets_ptr; + VALUE (*parser_lex_gets)(struct parser_params*,VALUE); + struct local_vars *parser_lvtbl; + int parser_ruby__end__seen; + int line_count; + int has_shebang; + char *parser_ruby_sourcefile; /* current source file */ + int parser_ruby_sourceline; /* current line no. */ + rb_encoding *enc; + rb_encoding *utf8; + + int parser_yydebug; + +#ifndef RIPPER + /* Ruby core only */ + NODE *parser_eval_tree_begin; + NODE *parser_eval_tree; + VALUE debug_lines; + VALUE coverage; + int nerr; + + token_info *parser_token_info; +#else + /* Ripper only */ + VALUE parser_ruby_sourcefile_string; + const char *tokp; + VALUE delayed; + int delayed_line; + int delayed_col; + + VALUE value; + VALUE result; + VALUE parsing_thread; + int toplevel_p; +#endif +}; + +#define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ + (parser->utf8 = rb_utf8_encoding())) +#define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) +#define STR_NEW0() rb_enc_str_new(0,0,parser->enc) +#define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) +#define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) +#define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) +#define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) + +#ifdef YYMALLOC +void *rb_parser_malloc(struct parser_params *, size_t); +void *rb_parser_realloc(struct parser_params *, void *, size_t); +void *rb_parser_calloc(struct parser_params *, size_t, size_t); +void rb_parser_free(struct parser_params *, void *); +#endif + +static int parser_yyerror(struct parser_params*, const char*); +#define yyerror(msg) parser_yyerror(parser, msg) + +#define YYLEX_PARAM parser + +#define lex_strterm (parser->parser_lex_strterm) +#define lex_state (parser->parser_lex_state) +#define cond_stack (parser->parser_cond_stack) +#define cmdarg_stack (parser->parser_cmdarg_stack) +#define class_nest (parser->parser_class_nest) +#define paren_nest (parser->parser_paren_nest) +#define lpar_beg (parser->parser_lpar_beg) +#define in_single (parser->parser_in_single) +#define in_def (parser->parser_in_def) +#define compile_for_eval (parser->parser_compile_for_eval) +#define cur_mid (parser->parser_cur_mid) +#define in_defined (parser->parser_in_defined) +#define tokenbuf (parser->parser_tokenbuf) +#define tokidx (parser->parser_tokidx) +#define toksiz (parser->parser_toksiz) +#define lex_input (parser->parser_lex_input) +#define lex_lastline (parser->parser_lex_lastline) +#define lex_nextline (parser->parser_lex_nextline) +#define lex_pbeg (parser->parser_lex_pbeg) +#define lex_p (parser->parser_lex_p) +#define lex_pend (parser->parser_lex_pend) +#define heredoc_end (parser->parser_heredoc_end) +#define command_start (parser->parser_command_start) +#define deferred_nodes (parser->parser_deferred_nodes) +#define lex_gets_ptr (parser->parser_lex_gets_ptr) +#define lex_gets (parser->parser_lex_gets) +#define lvtbl (parser->parser_lvtbl) +#define ruby__end__seen (parser->parser_ruby__end__seen) +#define ruby_sourceline (parser->parser_ruby_sourceline) +#define ruby_sourcefile (parser->parser_ruby_sourcefile) +#define yydebug (parser->parser_yydebug) +#ifdef RIPPER +#else +#define ruby_eval_tree (parser->parser_eval_tree) +#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) +#define ruby_debug_lines (parser->debug_lines) +#define ruby_coverage (parser->coverage) +#endif + +static int yylex(void*, void*); + +#ifndef RIPPER +#define yyparse ruby_yyparse + +static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); +#define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) + +static NODE *cond_gen(struct parser_params*,NODE*); +#define cond(node) cond_gen(parser, node) +static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); +#define logop(type,node1,node2) logop_gen(parser, type, node1, node2) + +static NODE *newline_node(NODE*); +static void fixpos(NODE*,NODE*); + +static int value_expr_gen(struct parser_params*,NODE*); +static void void_expr_gen(struct parser_params*,NODE*); +static NODE *remove_begin(NODE*); +#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) +#define void_expr0(node) void_expr_gen(parser, (node)) +#define void_expr(node) void_expr0((node) = remove_begin(node)) +static void void_stmts_gen(struct parser_params*,NODE*); +#define void_stmts(node) void_stmts_gen(parser, node) +static void reduce_nodes_gen(struct parser_params*,NODE**); +#define reduce_nodes(n) reduce_nodes_gen(parser,n) +static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); +#define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2) + +static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); +#define block_append(h,t) block_append_gen(parser,h,t) +static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); +#define list_append(l,i) list_append_gen(parser,l,i) +static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); +#define list_concat(h,t) list_concat_gen(parser,h,t) +static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); +#define arg_append(h,t) arg_append_gen(parser,h,t) +static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); +#define arg_concat(h,t) arg_concat_gen(parser,h,t) +static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); +#define literal_concat(h,t) literal_concat_gen(parser,h,t) +static NODE *new_evstr_gen(struct parser_params*,NODE*); +#define new_evstr(n) new_evstr_gen(parser,n) +static NODE *evstr2dstr_gen(struct parser_params*,NODE*); +#define evstr2dstr(n) evstr2dstr_gen(parser,n) +static NODE *splat_array(NODE*); + +static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); +#define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1) +static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); +#define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id) + +static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); +#define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b) +static void shadowing_lvar_gen(struct parser_params*,ID); +#define shadowing_lvar(name) shadowing_lvar_gen(parser, name) + +static NODE *negate_lit(NODE*); +static NODE *ret_args_gen(struct parser_params*,NODE*); +#define ret_args(node) ret_args_gen(parser, node) +static NODE *arg_blk_pass(NODE*,NODE*); +static NODE *new_yield_gen(struct parser_params*,NODE*); +#define new_yield(node) new_yield_gen(parser, node) + +static NODE *gettable_gen(struct parser_params*,ID); +#define gettable(id) gettable_gen(parser,id) +static NODE *assignable_gen(struct parser_params*,ID,NODE*); +#define assignable(id,node) assignable_gen(parser, id, node) +static void new_bv_gen(struct parser_params*,ID); +#define new_bv(id) new_bv_gen(parser, id) +static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); +#define aryset(node1,node2) aryset_gen(parser, node1, node2) +static NODE *attrset_gen(struct parser_params*,NODE*,ID); +#define attrset(node,id) attrset_gen(parser, node, id) + +static void rb_backref_error_gen(struct parser_params*,NODE*); +#define rb_backref_error(n) rb_backref_error_gen(parser,n) +static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); +#define node_assign(node1, node2) node_assign_gen(parser, node1, node2) + +static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); +#define match_op(node1,node2) match_op_gen(parser, node1, node2) + +static void local_push_gen(struct parser_params*,int); +#define local_push(top) local_push_gen(parser,top) +static void local_pop_gen(struct parser_params*); +#define local_pop() local_pop_gen(parser) +static int local_var_gen(struct parser_params*, ID); +#define local_var(id) local_var_gen(parser, id); +static int arg_var_gen(struct parser_params*, ID); +#define arg_var(id) arg_var_gen(parser, id) +static int local_id_gen(struct parser_params*, ID); +#define local_id(id) local_id_gen(parser, id) +static ID *local_tbl_gen(struct parser_params*); +#define local_tbl() local_tbl_gen(parser) +static ID internal_id_gen(struct parser_params*); +#define internal_id() internal_id_gen(parser) + +static void dyna_push_gen(struct parser_params*); +#define dyna_push() dyna_push_gen(parser) +static void dyna_pop_gen(struct parser_params*); +#define dyna_pop() dyna_pop_gen(parser) +static int dyna_in_block_gen(struct parser_params*); +#define dyna_in_block() dyna_in_block_gen(parser) +#define dyna_var(id) local_var(id) +static int dvar_defined_gen(struct parser_params*,ID); +#define dvar_defined(id) dvar_defined_gen(parser, id) +static int dvar_curr_gen(struct parser_params*,ID); +#define dvar_curr(id) dvar_curr_gen(parser, id) + +static void fixup_nodes(NODE **); + +extern int rb_dvar_defined(ID); +extern int rb_local_defined(ID); +extern int rb_parse_in_eval(void); + +static VALUE reg_compile_gen(struct parser_params*, VALUE, int); +#define reg_compile(str,options) reg_compile_gen(parser, str, options) +static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); +#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options) +static void reg_fragment_check_gen(struct parser_params*, VALUE, int); +#define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options) +static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); +#define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match) +int rb_enc_symname2_p(const char *, int, rb_encoding *); +#else +#define remove_begin(node) (node) +#endif /* !RIPPER */ +static int lvar_defined_gen(struct parser_params*, ID); +#define lvar_defined(id) lvar_defined_gen(parser, id) + +#define RE_OPTION_ONCE (1<<16) +#define RE_OPTION_ENCODING_SHIFT 8 +#define RE_OPTION_ENCODING(e) (((e)&0xff)<>RE_OPTION_ENCODING_SHIFT)&0xff) +#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) +#define RE_OPTION_MASK 0xff +#define RE_OPTION_ARG_ENCODING_NONE 32 + +#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ +#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ +#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) +#define nd_func u1.id +#if SIZEOF_SHORT == 2 +#define nd_term(node) ((signed short)(node)->u2.id) +#else +#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) +#endif +#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) +#define nd_nest u3.cnt + +/****** Ripper *******/ + +#ifdef RIPPER +#define RIPPER_VERSION "0.1.0" + +#include "eventids1.c" +#include "eventids2.c" +static ID ripper_id_gets; + +static VALUE ripper_dispatch0(struct parser_params*,ID); +static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); +static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); +static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); +static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); + +#define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) +#define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a) +#define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b) +#define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c) +#define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d) +#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e) + +#define yyparse ripper_yyparse + +static VALUE ripper_intern(const char*); +static VALUE ripper_id2sym(ID); +#ifdef __GNUC__ +#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ + ID2SYM(id) : ripper_id2sym(id)) +#endif + +#define arg_new() dispatch0(args_new) +#define arg_add(l,a) dispatch2(args_add, l, a) +#define arg_prepend(l,a) dispatch2(args_prepend, l, a) +#define arg_add_star(l,a) dispatch2(args_add_star, l, a) +#define arg_add_block(l,b) dispatch2(args_add_block, l, b) +#define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b)) +#define bare_assoc(v) dispatch1(bare_assoc_hash, v) +#define arg_add_assocs(l,b) arg_add(l, bare_assoc(b)) + +#define args2mrhs(a) dispatch1(mrhs_new_from_args, a) +#define mrhs_new() dispatch0(mrhs_new) +#define mrhs_add(l,a) dispatch2(mrhs_add, l, a) +#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a) + +#define mlhs_new() dispatch0(mlhs_new) +#define mlhs_add(l,a) dispatch2(mlhs_add, l, a) +#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a) + +#define params_new(pars, opts, rest, pars2, blk) \ + dispatch5(params, pars, opts, rest, pars2, blk) + +#define blockvar_new(p,v) dispatch2(block_var, p, v) +#define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a) +#define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a) + +#define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a)) +#define method_arg(m,a) dispatch2(method_add_arg,m,a) +#define method_add_block(m,b) dispatch2(method_add_block, m, b) + +#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) + +#define FIXME 0 + +#endif /* RIPPER */ + +#ifndef RIPPER +# define ifndef_ripper(x) x +#else +# define ifndef_ripper(x) +#endif + +#ifndef RIPPER +# define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) +# define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) +# define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) +#else +# define rb_warn0(fmt) ripper_warn0(parser, fmt) +# define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a) +# define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a) +# define rb_warning0(fmt) ripper_warning0(parser, fmt) +# define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a) +static void ripper_warn0(struct parser_params*, const char*); +static void ripper_warnI(struct parser_params*, const char*, int); +#if 0 +static void ripper_warnS(struct parser_params*, const char*, const char*); +#endif +static void ripper_warning0(struct parser_params*, const char*); +static void ripper_warningS(struct parser_params*, const char*, const char*); +#endif + +#ifdef RIPPER +static void ripper_compile_error(struct parser_params*, const char *fmt, ...); +# define rb_compile_error ripper_compile_error +# define compile_error ripper_compile_error +# define PARSER_ARG parser, +#else +# define compile_error parser->nerr++,rb_compile_error +# define PARSER_ARG ruby_sourcefile, ruby_sourceline, +#endif + +/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, + for instance). This is too low for Ruby to parse some files, such as + date/format.rb, therefore bump the value up to at least Bison's default. */ +#ifdef OLD_YACC +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif +#endif + +#ifndef RIPPER +static void token_info_push(struct parser_params*, const char *token); +static void token_info_pop(struct parser_params*, const char *token); +#endif +%} + +%pure_parser +%parse-param {struct parser_params *parser} + +%union { + VALUE val; + NODE *node; + ID id; + int num; +} + +/*%%%*/ +%token +/*% +%token +%*/ + keyword_class + keyword_module + keyword_def + keyword_undef + keyword_begin + keyword_rescue + keyword_ensure + keyword_end + keyword_if + keyword_unless + keyword_then + keyword_elsif + keyword_else + keyword_case + keyword_when + keyword_while + keyword_until + keyword_for + keyword_break + keyword_next + keyword_redo + keyword_retry + keyword_in + keyword_do + keyword_do_cond + keyword_do_block + keyword_do_LAMBDA + keyword_return + keyword_yield + keyword_super + keyword_self + keyword_nil + keyword_true + keyword_false + keyword_and + keyword_or + keyword_not + modifier_if + modifier_unless + modifier_while + modifier_until + modifier_rescue + keyword_alias + keyword_defined + keyword_BEGIN + keyword_END + keyword__LINE__ + keyword__FILE__ + keyword__ENCODING__ + +%token tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL +%token tINTEGER tFLOAT tSTRING_CONTENT tCHAR +%token tNTH_REF tBACK_REF +%token tREGEXP_END + +%type singleton strings string string1 xstring regexp +%type string_contents xstring_contents string_content +%type words qwords word_list qword_list word +%type literal numeric dsym cpath +%type bodystmt compstmt stmts stmt expr arg primary command command_call method_call +%type expr_value arg_value primary_value +%type if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure +%type args call_args opt_call_args +%type paren_args opt_paren_args +%type command_args aref_args opt_block_arg block_arg var_ref var_lhs +%type mrhs superclass block_call block_command +%type f_block_optarg f_block_opt +%type f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs +%type assoc_list assocs assoc undef_list backref string_dvar for_var +%type block_param opt_block_param block_param_def f_opt +%type bv_decls opt_bv_decl bvar +%type lambda f_larglist lambda_body +%type brace_block cmd_brace_block do_block lhs none fitem +%type mlhs mlhs_head mlhs_basic mlhs_item mlhs_node mlhs_post mlhs_inner +%type fsym variable sym symbol operation operation2 operation3 +%type cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg f_bad_arg +/*%%%*/ +/*% +%type program reswords then do dot_or_colon +%*/ +%token tUPLUS /* unary+ */ +%token tUMINUS /* unary- */ +%token tPOW /* ** */ +%token tCMP /* <=> */ +%token tEQ /* == */ +%token tEQQ /* === */ +%token tNEQ /* != */ +%token tGEQ /* >= */ +%token tLEQ /* <= */ +%token tANDOP tOROP /* && and || */ +%token tMATCH tNMATCH /* =~ and !~ */ +%token tDOT2 tDOT3 /* .. and ... */ +%token tAREF tASET /* [] and []= */ +%token tLSHFT tRSHFT /* << and >> */ +%token tCOLON2 /* :: */ +%token tCOLON3 /* :: at EXPR_BEG */ +%token tOP_ASGN /* +=, -= etc. */ +%token tASSOC /* => */ +%token tLPAREN /* ( */ +%token tLPAREN_ARG /* ( */ +%token tRPAREN /* ) */ +%token tLBRACK /* [ */ +%token tLBRACE /* { */ +%token tLBRACE_ARG /* { */ +%token tSTAR /* * */ +%token tAMPER /* & */ +%token tLAMBDA /* -> */ +%token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG +%token tSTRING_DBEG tSTRING_DVAR tSTRING_END tLAMBEG + +/* + * precedence table + */ + +%nonassoc tLOWEST +%nonassoc tLBRACE_ARG + +%nonassoc modifier_if modifier_unless modifier_while modifier_until +%left keyword_or keyword_and +%right keyword_not +%nonassoc keyword_defined +%right '=' tOP_ASGN +%left modifier_rescue +%right '?' ':' +%nonassoc tDOT2 tDOT3 +%left tOROP +%left tANDOP +%nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH +%left '>' tGEQ '<' tLEQ +%left '|' '^' +%left '&' +%left tLSHFT tRSHFT +%left '+' '-' +%left '*' '/' '%' +%right tUMINUS_NUM tUMINUS +%right tPOW +%right '!' '~' tUPLUS + +%nonassoc idNULL +%nonassoc idRespond_to +%nonassoc idIFUNC +%nonassoc idCFUNC +%nonassoc idThrowState +%nonassoc id_core_set_method_alias +%nonassoc id_core_set_variable_alias +%nonassoc id_core_undef_method +%nonassoc id_core_define_method +%nonassoc id_core_define_singleton_method +%nonassoc id_core_set_postexe + +%token tLAST_TOKEN + +%% +program : { + lex_state = EXPR_BEG; + /*%%%*/ + local_push(compile_for_eval); + /*% + %*/ + } + compstmt + { + /*%%%*/ + if ($2 && !compile_for_eval) { + /* last expression should not be void */ + if (nd_type($2) != NODE_BLOCK) void_expr($2); + else { + NODE *node = $2; + while (node->nd_next) { + node = node->nd_next; + } + void_expr(node->nd_head); + } + } + ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, $2)); + local_pop(); + /*% + $$ = $2; + parser->result = dispatch1(program, $$); + %*/ + } + ; + +bodystmt : compstmt + opt_rescue + opt_else + opt_ensure + { + /*%%%*/ + $$ = $1; + if ($2) { + $$ = NEW_RESCUE($1, $2, $3); + } + else if ($3) { + rb_warn0("else without rescue is useless"); + $$ = block_append($$, $3); + } + if ($4) { + if ($$) { + $$ = NEW_ENSURE($$, $4); + } + else { + $$ = block_append($4, NEW_NIL()); + } + } + fixpos($$, $1); + /*% + $$ = dispatch4(body_stmt, + escape_Qundef($1), + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($4)); + %*/ + } + ; + +compstmt : stmts opt_terms + { + /*%%%*/ + void_stmts($1); + fixup_nodes(&deferred_nodes); + /*% + %*/ + $$ = $1; + } + ; + +stmts : none + { + /*%%%*/ + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch2(stmts_add, dispatch0(stmts_new), + dispatch0(void_stmt)); + %*/ + } + | stmt + { + /*%%%*/ + $$ = newline_node($1); + /*% + $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); + %*/ + } + | stmts terms stmt + { + /*%%%*/ + $$ = block_append($1, newline_node($3)); + /*% + $$ = dispatch2(stmts_add, $1, $3); + %*/ + } + | error stmt + { + $$ = remove_begin($2); + } + ; + +stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem + { + /*%%%*/ + $$ = NEW_ALIAS($2, $4); + /*% + $$ = dispatch2(alias, $2, $4); + %*/ + } + | keyword_alias tGVAR tGVAR + { + /*%%%*/ + $$ = NEW_VALIAS($2, $3); + /*% + $$ = dispatch2(var_alias, $2, $3); + %*/ + } + | keyword_alias tGVAR tBACK_REF + { + /*%%%*/ + char buf[3]; + + sprintf(buf, "$%c", (char)$3->nd_nth); + $$ = NEW_VALIAS($2, rb_intern(buf)); + /*% + $$ = dispatch2(var_alias, $2, $3); + %*/ + } + | keyword_alias tGVAR tNTH_REF + { + /*%%%*/ + yyerror("can't make alias for the number variables"); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch2(var_alias, $2, $3); + $$ = dispatch1(alias_error, $$); + %*/ + } + | keyword_undef undef_list + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(undef, $2); + %*/ + } + | stmt modifier_if expr_value + { + /*%%%*/ + $$ = NEW_IF(cond($3), remove_begin($1), 0); + fixpos($$, $3); + /*% + $$ = dispatch2(if_mod, $3, $1); + %*/ + } + | stmt modifier_unless expr_value + { + /*%%%*/ + $$ = NEW_UNLESS(cond($3), remove_begin($1), 0); + fixpos($$, $3); + /*% + $$ = dispatch2(unless_mod, $3, $1); + %*/ + } + | stmt modifier_while expr_value + { + /*%%%*/ + if ($1 && nd_type($1) == NODE_BEGIN) { + $$ = NEW_WHILE(cond($3), $1->nd_body, 0); + } + else { + $$ = NEW_WHILE(cond($3), $1, 1); + } + /*% + $$ = dispatch2(while_mod, $3, $1); + %*/ + } + | stmt modifier_until expr_value + { + /*%%%*/ + if ($1 && nd_type($1) == NODE_BEGIN) { + $$ = NEW_UNTIL(cond($3), $1->nd_body, 0); + } + else { + $$ = NEW_UNTIL(cond($3), $1, 1); + } + /*% + $$ = dispatch2(until_mod, $3, $1); + %*/ + } + | stmt modifier_rescue stmt + { + /*%%%*/ + NODE *resq = NEW_RESBODY(0, remove_begin($3), 0); + $$ = NEW_RESCUE(remove_begin($1), resq, 0); + /*% + $$ = dispatch2(rescue_mod, $3, $1); + %*/ + } + | keyword_BEGIN + { + if (in_def || in_single) { + yyerror("BEGIN in method"); + } + /*%%%*/ + /* local_push(0); */ + /*% + %*/ + } + '{' compstmt '}' + { + /*%%%*/ + ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, + $4); + /* NEW_PREEXE($4)); */ + /* local_pop(); */ + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(BEGIN, $4); + %*/ + } + | keyword_END '{' compstmt '}' + { + if (in_def || in_single) { + rb_warn0("END in method; use at_exit"); + } + /*%%%*/ + $$ = NEW_POSTEXE(NEW_NODE( + NODE_SCOPE, 0 /* tbl */, $3 /* body */, 0 /* args */)); + /*% + $$ = dispatch1(END, $3); + %*/ + } + | lhs '=' command_call + { + /*%%%*/ + value_expr($3); + $$ = node_assign($1, $3); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + } + | mlhs '=' command_call + { + /*%%%*/ + value_expr($3); + $1->nd_value = $3; + $$ = $1; + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + } + | var_lhs tOP_ASGN command_call + { + /*%%%*/ + value_expr($3); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } + /*% + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + } + | primary_value '[' opt_call_args rbracket tOP_ASGN command_call + { + /*%%%*/ + NODE *args; + + value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); + args = arg_concat($6, $3); + if ($5 == tOROP) { + $5 = 0; + } + else if ($5 == tANDOP) { + $5 = 1; + } + $$ = NEW_OP_ASGN1($1, $5, args); + fixpos($$, $1); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $$, $5, $6); + %*/ + } + | primary_value '.' tIDENTIFIER tOP_ASGN command_call + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + } + | primary_value '.' tCONSTANT tOP_ASGN command_call + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $$, $4, $5); + %*/ + } + | backref tOP_ASGN command_call + { + /*%%%*/ + rb_backref_error($1); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch2(assign, dispatch1(var_field, $1), $3); + $$ = dispatch1(assign_error, $$); + %*/ + } + | lhs '=' mrhs + { + /*%%%*/ + value_expr($3); + $$ = node_assign($1, $3); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + } + | mlhs '=' arg_value + { + /*%%%*/ + $1->nd_value = $3; + $$ = $1; + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + } + | mlhs '=' mrhs + { + /*%%%*/ + $1->nd_value = $3; + $$ = $1; + /*% + $$ = dispatch2(massign, $1, $3); + %*/ + } + | expr + ; + +expr : command_call + | expr keyword_and expr + { + /*%%%*/ + $$ = logop(NODE_AND, $1, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("and"), $3); + %*/ + } + | expr keyword_or expr + { + /*%%%*/ + $$ = logop(NODE_OR, $1, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("or"), $3); + %*/ + } + | keyword_not opt_nl expr + { + /*%%%*/ + $$ = call_uni_op(cond($3), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), $3); + %*/ + } + | '!' command_call + { + /*%%%*/ + $$ = call_uni_op(cond($2), '!'); + /*% + $$ = dispatch2(unary, ripper_id2sym('!'), $2); + %*/ + } + | arg + ; + +expr_value : expr + { + /*%%%*/ + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); + /*% + $$ = $1; + %*/ + } + ; + +command_call : command + | block_command + | keyword_return call_args + { + /*%%%*/ + $$ = NEW_RETURN(ret_args($2)); + /*% + $$ = dispatch1(return, $2); + %*/ + } + | keyword_break call_args + { + /*%%%*/ + $$ = NEW_BREAK(ret_args($2)); + /*% + $$ = dispatch1(break, $2); + %*/ + } + | keyword_next call_args + { + /*%%%*/ + $$ = NEW_NEXT(ret_args($2)); + /*% + $$ = dispatch1(next, $2); + %*/ + } + ; + +block_command : block_call + | block_call '.' operation2 command_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_arg($$, $4); + %*/ + } + | block_call tCOLON2 operation2 command_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_arg($$, $4); + %*/ + } + ; + +cmd_brace_block : tLBRACE_ARG + { + /*%%%*/ + dyna_push(); + $$ = ruby_sourceline; + /*% + %*/ + } + opt_block_param + compstmt + '}' + { + /*%%%*/ + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); + /*% + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + %*/ + } + ; + +command : operation command_args %prec tLOWEST + { + /*%%%*/ + $$ = NEW_FCALL($1, $2); + fixpos($$, $2); + /*% + $$ = dispatch2(command, $1, $2); + %*/ + } + | operation command_args cmd_brace_block + { + /*%%%*/ + block_dup_check($2,$3); + $3->nd_iter = NEW_FCALL($1, $2); + $$ = $3; + fixpos($$, $2); + /*% + $$ = dispatch2(command, $1, $2); + $$ = method_add_block($$, $3); + %*/ + } + | primary_value '.' operation2 command_args %prec tLOWEST + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); + /*% + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + %*/ + } + | primary_value '.' operation2 command_args cmd_brace_block + { + /*%%%*/ + block_dup_check($4,$5); + $5->nd_iter = NEW_CALL($1, $3, $4); + $$ = $5; + fixpos($$, $1); + /*% + $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); + $$ = method_add_block($$, $5); + %*/ + } + | primary_value tCOLON2 operation2 command_args %prec tLOWEST + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); + /*% + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + %*/ + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + /*%%%*/ + block_dup_check($4,$5); + $5->nd_iter = NEW_CALL($1, $3, $4); + $$ = $5; + fixpos($$, $1); + /*% + $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); + $$ = method_add_block($$, $5); + %*/ + } + | keyword_super command_args + { + /*%%%*/ + $$ = NEW_SUPER($2); + fixpos($$, $2); + /*% + $$ = dispatch1(super, $2); + %*/ + } + | keyword_yield command_args + { + /*%%%*/ + $$ = new_yield($2); + fixpos($$, $2); + /*% + $$ = dispatch1(yield, $2); + %*/ + } + ; + +mlhs : mlhs_basic + | tLPAREN mlhs_inner rparen + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +mlhs_inner : mlhs_basic + | tLPAREN mlhs_inner rparen + { + /*%%%*/ + $$ = NEW_MASGN(NEW_LIST($2), 0); + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +mlhs_basic : mlhs_head + { + /*%%%*/ + $$ = NEW_MASGN($1, 0); + /*% + $$ = $1; + %*/ + } + | mlhs_head mlhs_item + { + /*%%%*/ + $$ = NEW_MASGN(list_append($1,$2), 0); + /*% + $$ = mlhs_add($1, $2); + %*/ + } + | mlhs_head tSTAR mlhs_node + { + /*%%%*/ + $$ = NEW_MASGN($1, $3); + /*% + $$ = mlhs_add_star($1, $3); + %*/ + } + | mlhs_head tSTAR mlhs_node ',' mlhs_post + { + /*%%%*/ + $$ = NEW_MASGN($1, NEW_POSTARG($3,$5)); + /*% + $$ = mlhs_add_star($1, $3); + %*/ + } + | mlhs_head tSTAR + { + /*%%%*/ + $$ = NEW_MASGN($1, -1); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + } + | mlhs_head tSTAR ',' mlhs_post + { + /*%%%*/ + $$ = NEW_MASGN($1, NEW_POSTARG(-1, $4)); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + } + | tSTAR mlhs_node + { + /*%%%*/ + $$ = NEW_MASGN(0, $2); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + } + | tSTAR mlhs_node ',' mlhs_post + { + /*%%%*/ + $$ = NEW_MASGN(0, NEW_POSTARG($2,$4)); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + } + | tSTAR + { + /*%%%*/ + $$ = NEW_MASGN(0, -1); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + } + | tSTAR ',' mlhs_post + { + /*%%%*/ + $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3)); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + } + ; + +mlhs_item : mlhs_node + | tLPAREN mlhs_inner rparen + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +mlhs_head : mlhs_item ',' + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + } + | mlhs_head mlhs_item ',' + { + /*%%%*/ + $$ = list_append($1, $2); + /*% + $$ = mlhs_add($1, $2); + %*/ + } + ; + +mlhs_post : mlhs_item + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + } + | mlhs_post ',' mlhs_item + { + /*%%%*/ + $$ = list_append($1, $3); + /*% + $$ = mlhs_add($1, $3); + %*/ + } + ; + +mlhs_node : variable + { + /*%%%*/ + $$ = assignable($1, 0); + /*% + $$ = $1; + %*/ + } + | primary_value '[' opt_call_args rbracket + { + /*%%%*/ + $$ = aryset($1, $3); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + %*/ + } + | primary_value '.' tIDENTIFIER + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + } + | primary_value tCOLON2 tIDENTIFIER + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch2(const_path_field, $1, $3); + %*/ + } + | primary_value '.' tCONSTANT + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + } + | primary_value tCOLON2 tCONSTANT + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3)); + /*% + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = dispatch2(const_path_field, $1, $3); + %*/ + } + | tCOLON3 tCONSTANT + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON3($2)); + /*% + $$ = dispatch1(top_const_field, $2); + %*/ + } + | backref + { + /*%%%*/ + rb_backref_error($1); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + $$ = dispatch1(assign_error, $$); + %*/ + } + ; + +lhs : variable + { + /*%%%*/ + if (!($$ = assignable($1, 0))) $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + %*/ + } + | primary_value '[' opt_call_args rbracket + { + /*%%%*/ + $$ = aryset($1, $3); + /*% + $$ = dispatch2(aref_field, $1, escape_Qundef($3)); + %*/ + } + | primary_value '.' tIDENTIFIER + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + } + | primary_value tCOLON2 tIDENTIFIER + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch3(field, $1, ripper_intern("::"), $3); + %*/ + } + | primary_value '.' tCONSTANT + { + /*%%%*/ + $$ = attrset($1, $3); + /*% + $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); + %*/ + } + | primary_value tCOLON2 tCONSTANT + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3)); + /*% + $$ = dispatch2(const_path_field, $1, $3); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + %*/ + } + | tCOLON3 tCONSTANT + { + /*%%%*/ + if (in_def || in_single) + yyerror("dynamic constant assignment"); + $$ = NEW_CDECL(0, 0, NEW_COLON3($2)); + /*% + $$ = dispatch1(top_const_field, $2); + if (in_def || in_single) { + $$ = dispatch1(assign_error, $$); + } + %*/ + } + | backref + { + /*%%%*/ + rb_backref_error($1); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(assign_error, $1); + %*/ + } + ; + +cname : tIDENTIFIER + { + /*%%%*/ + yyerror("class/module name must be CONSTANT"); + /*% + $$ = dispatch1(class_name_error, $1); + %*/ + } + | tCONSTANT + ; + +cpath : tCOLON3 cname + { + /*%%%*/ + $$ = NEW_COLON3($2); + /*% + $$ = dispatch1(top_const_ref, $2); + %*/ + } + | cname + { + /*%%%*/ + $$ = NEW_COLON2(0, $$); + /*% + $$ = dispatch1(const_ref, $1); + %*/ + } + | primary_value tCOLON2 cname + { + /*%%%*/ + $$ = NEW_COLON2($1, $3); + /*% + $$ = dispatch2(const_path_ref, $1, $3); + %*/ + } + ; + +fname : tIDENTIFIER + | tCONSTANT + | tFID + | op + { + /*%%%*/ + lex_state = EXPR_END; + $$ = $1; + /*% + lex_state = EXPR_END; + $$ = $1; + %*/ + } + | reswords + { + /*%%%*/ + lex_state = EXPR_END; + $$ = $1; + /*% + lex_state = EXPR_END; + $$ = $1; + %*/ + } + ; + +fsym : fname + | symbol + ; + +fitem : fsym + { + /*%%%*/ + $$ = NEW_LIT(ID2SYM($1)); + /*% + $$ = dispatch1(symbol_literal, $1); + %*/ + } + | dsym + ; + +undef_list : fitem + { + /*%%%*/ + $$ = NEW_UNDEF($1); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + } + | undef_list ',' {lex_state = EXPR_FNAME;} fitem + { + /*%%%*/ + $$ = block_append($1, NEW_UNDEF($4)); + /*% + rb_ary_push($1, $4); + %*/ + } + ; + +op : '|' { ifndef_ripper($$ = '|'); } + | '^' { ifndef_ripper($$ = '^'); } + | '&' { ifndef_ripper($$ = '&'); } + | tCMP { ifndef_ripper($$ = tCMP); } + | tEQ { ifndef_ripper($$ = tEQ); } + | tEQQ { ifndef_ripper($$ = tEQQ); } + | tMATCH { ifndef_ripper($$ = tMATCH); } + | tNMATCH { ifndef_ripper($$ = tNMATCH); } + | '>' { ifndef_ripper($$ = '>'); } + | tGEQ { ifndef_ripper($$ = tGEQ); } + | '<' { ifndef_ripper($$ = '<'); } + | tLEQ { ifndef_ripper($$ = tLEQ); } + | tNEQ { ifndef_ripper($$ = tNEQ); } + | tLSHFT { ifndef_ripper($$ = tLSHFT); } + | tRSHFT { ifndef_ripper($$ = tRSHFT); } + | '+' { ifndef_ripper($$ = '+'); } + | '-' { ifndef_ripper($$ = '-'); } + | '*' { ifndef_ripper($$ = '*'); } + | tSTAR { ifndef_ripper($$ = '*'); } + | '/' { ifndef_ripper($$ = '/'); } + | '%' { ifndef_ripper($$ = '%'); } + | tPOW { ifndef_ripper($$ = tPOW); } + | '!' { ifndef_ripper($$ = '!'); } + | '~' { ifndef_ripper($$ = '~'); } + | tUPLUS { ifndef_ripper($$ = tUPLUS); } + | tUMINUS { ifndef_ripper($$ = tUMINUS); } + | tAREF { ifndef_ripper($$ = tAREF); } + | tASET { ifndef_ripper($$ = tASET); } + | '`' { ifndef_ripper($$ = '`'); } + ; + +reswords : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__ + | keyword_BEGIN | keyword_END + | keyword_alias | keyword_and | keyword_begin + | keyword_break | keyword_case | keyword_class | keyword_def + | keyword_defined | keyword_do | keyword_else | keyword_elsif + | keyword_end | keyword_ensure | keyword_false + | keyword_for | keyword_in | keyword_module | keyword_next + | keyword_nil | keyword_not | keyword_or | keyword_redo + | keyword_rescue | keyword_retry | keyword_return | keyword_self + | keyword_super | keyword_then | keyword_true | keyword_undef + | keyword_when | keyword_yield | keyword_if | keyword_unless + | keyword_while | keyword_until + ; + +arg : lhs '=' arg + { + /*%%%*/ + value_expr($3); + $$ = node_assign($1, $3); + /*% + $$ = dispatch2(assign, $1, $3); + %*/ + } + | lhs '=' arg modifier_rescue arg + { + /*%%%*/ + value_expr($3); + $3 = NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0); + $$ = node_assign($1, $3); + /*% + $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); + %*/ + } + | var_lhs tOP_ASGN arg + { + /*%%%*/ + value_expr($3); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } + /*% + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + } + | var_lhs tOP_ASGN arg modifier_rescue arg + { + /*%%%*/ + value_expr($3); + $3 = NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0); + if ($1) { + ID vid = $1->nd_vid; + if ($2 == tOROP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_OR(gettable(vid), $1); + if (is_asgn_or_id(vid)) { + $$->nd_aid = vid; + } + } + else if ($2 == tANDOP) { + $1->nd_value = $3; + $$ = NEW_OP_ASGN_AND(gettable(vid), $1); + } + else { + $$ = $1; + $$->nd_value = NEW_CALL(gettable(vid), $2, NEW_LIST($3)); + } + } + else { + $$ = NEW_BEGIN(0); + } + /*% + $3 = dispatch2(rescue_mod, $3, $5); + $$ = dispatch3(opassign, $1, $2, $3); + %*/ + } + | primary_value '[' opt_call_args rbracket tOP_ASGN arg + { + /*%%%*/ + NODE *args; + + value_expr($6); + if (!$3) $3 = NEW_ZARRAY(); + args = arg_concat($6, $3); + if ($5 == tOROP) { + $5 = 0; + } + else if ($5 == tANDOP) { + $5 = 1; + } + $$ = NEW_OP_ASGN1($1, $5, args); + fixpos($$, $1); + /*% + $1 = dispatch2(aref_field, $1, escape_Qundef($3)); + $$ = dispatch3(opassign, $1, $5, $6); + %*/ + } + | primary_value '.' tIDENTIFIER tOP_ASGN arg + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + } + | primary_value '.' tCONSTANT tOP_ASGN arg + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + /*%%%*/ + value_expr($5); + if ($4 == tOROP) { + $4 = 0; + } + else if ($4 == tANDOP) { + $4 = 1; + } + $$ = NEW_OP_ASGN2($1, $3, $4, $5); + fixpos($$, $1); + /*% + $1 = dispatch3(field, $1, ripper_intern("::"), $3); + $$ = dispatch3(opassign, $1, $4, $5); + %*/ + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + /*%%%*/ + yyerror("constant re-assignment"); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch2(const_path_field, $1, $3); + $$ = dispatch3(opassign, $$, $4, $5); + $$ = dispatch1(assign_error, $$); + %*/ + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + /*%%%*/ + yyerror("constant re-assignment"); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(top_const_field, $2); + $$ = dispatch3(opassign, $$, $3, $4); + $$ = dispatch1(assign_error, $$); + %*/ + } + | backref tOP_ASGN arg + { + /*%%%*/ + rb_backref_error($1); + $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_field, $1); + $$ = dispatch3(opassign, $$, $2, $3); + $$ = dispatch1(assign_error, $$); + %*/ + } + | arg tDOT2 arg + { + /*%%%*/ + value_expr($1); + value_expr($3); + $$ = NEW_DOT2($1, $3); + if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, $$); + } + /*% + $$ = dispatch2(dot2, $1, $3); + %*/ + } + | arg tDOT3 arg + { + /*%%%*/ + value_expr($1); + value_expr($3); + $$ = NEW_DOT3($1, $3); + if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) && + nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) { + deferred_nodes = list_append(deferred_nodes, $$); + } + /*% + $$ = dispatch2(dot3, $1, $3); + %*/ + } + | arg '+' arg + { + /*%%%*/ + $$ = call_bin_op($1, '+', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('+'), $3); + %*/ + } + | arg '-' arg + { + /*%%%*/ + $$ = call_bin_op($1, '-', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('-'), $3); + %*/ + } + | arg '*' arg + { + /*%%%*/ + $$ = call_bin_op($1, '*', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('*'), $3); + %*/ + } + | arg '/' arg + { + /*%%%*/ + $$ = call_bin_op($1, '/', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('/'), $3); + %*/ + } + | arg '%' arg + { + /*%%%*/ + $$ = call_bin_op($1, '%', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('%'), $3); + %*/ + } + | arg tPOW arg + { + /*%%%*/ + $$ = call_bin_op($1, tPOW, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("**"), $3); + %*/ + } + | tUMINUS_NUM tINTEGER tPOW arg + { + /*%%%*/ + $$ = NEW_CALL(call_bin_op($2, tPOW, $4), tUMINUS, 0); + /*% + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + %*/ + } + | tUMINUS_NUM tFLOAT tPOW arg + { + /*%%%*/ + $$ = NEW_CALL(call_bin_op($2, tPOW, $4), tUMINUS, 0); + /*% + $$ = dispatch3(binary, $2, ripper_intern("**"), $4); + $$ = dispatch2(unary, ripper_intern("-@"), $$); + %*/ + } + | tUPLUS arg + { + /*%%%*/ + $$ = call_uni_op($2, tUPLUS); + /*% + $$ = dispatch2(unary, ripper_intern("+@"), $2); + %*/ + } + | tUMINUS arg + { + /*%%%*/ + $$ = call_uni_op($2, tUMINUS); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + } + | arg '|' arg + { + /*%%%*/ + $$ = call_bin_op($1, '|', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('|'), $3); + %*/ + } + | arg '^' arg + { + /*%%%*/ + $$ = call_bin_op($1, '^', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('^'), $3); + %*/ + } + | arg '&' arg + { + /*%%%*/ + $$ = call_bin_op($1, '&', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('&'), $3); + %*/ + } + | arg tCMP arg + { + /*%%%*/ + $$ = call_bin_op($1, tCMP, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); + %*/ + } + | arg '>' arg + { + /*%%%*/ + $$ = call_bin_op($1, '>', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('>'), $3); + %*/ + } + | arg tGEQ arg + { + /*%%%*/ + $$ = call_bin_op($1, tGEQ, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern(">="), $3); + %*/ + } + | arg '<' arg + { + /*%%%*/ + $$ = call_bin_op($1, '<', $3); + /*% + $$ = dispatch3(binary, $1, ID2SYM('<'), $3); + %*/ + } + | arg tLEQ arg + { + /*%%%*/ + $$ = call_bin_op($1, tLEQ, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<="), $3); + %*/ + } + | arg tEQ arg + { + /*%%%*/ + $$ = call_bin_op($1, tEQ, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("=="), $3); + %*/ + } + | arg tEQQ arg + { + /*%%%*/ + $$ = call_bin_op($1, tEQQ, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("==="), $3); + %*/ + } + | arg tNEQ arg + { + /*%%%*/ + $$ = call_bin_op($1, tNEQ, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("!="), $3); + %*/ + } + | arg tMATCH arg + { + /*%%%*/ + $$ = match_op($1, $3); + if (nd_type($1) == NODE_LIT && TYPE($1->nd_lit) == T_REGEXP) { + $$ = reg_named_capture_assign($1->nd_lit, $$); + } + /*% + $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); + %*/ + } + | arg tNMATCH arg + { + /*%%%*/ + $$ = call_bin_op($1, tNMATCH, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); + %*/ + } + | '!' arg + { + /*%%%*/ + $$ = call_uni_op(cond($2), '!'); + /*% + $$ = dispatch2(unary, ID2SYM('!'), $2); + %*/ + } + | '~' arg + { + /*%%%*/ + $$ = call_uni_op($2, '~'); + /*% + $$ = dispatch2(unary, ID2SYM('~'), $2); + %*/ + } + | arg tLSHFT arg + { + /*%%%*/ + $$ = call_bin_op($1, tLSHFT, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); + %*/ + } + | arg tRSHFT arg + { + /*%%%*/ + $$ = call_bin_op($1, tRSHFT, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); + %*/ + } + | arg tANDOP arg + { + /*%%%*/ + $$ = logop(NODE_AND, $1, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); + %*/ + } + | arg tOROP arg + { + /*%%%*/ + $$ = logop(NODE_OR, $1, $3); + /*% + $$ = dispatch3(binary, $1, ripper_intern("||"), $3); + %*/ + } + | keyword_defined opt_nl {in_defined = 1;} arg + { + /*%%%*/ + in_defined = 0; + $$ = NEW_DEFINED($4); + /*% + in_defined = 0; + $$ = dispatch1(defined, $4); + %*/ + } + | arg '?' arg opt_nl ':' arg + { + /*%%%*/ + value_expr($1); + $$ = NEW_IF(cond($1), $3, $6); + fixpos($$, $1); + /*% + $$ = dispatch3(ifop, $1, $3, $6); + %*/ + } + | primary + { + $$ = $1; + } + ; + +arg_value : arg + { + /*%%%*/ + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); + /*% + $$ = $1; + %*/ + } + ; + +aref_args : none + | args trailer + { + $$ = $1; + } + | args ',' assocs trailer + { + /*%%%*/ + $$ = arg_append($1, NEW_HASH($3)); + /*% + $$ = arg_add_assocs($1, $3); + %*/ + } + | assocs trailer + { + /*%%%*/ + $$ = NEW_LIST(NEW_HASH($1)); + /*% + $$ = arg_add_assocs(arg_new(), $1); + %*/ + } + ; + +paren_args : '(' opt_call_args rparen + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(arg_paren, escape_Qundef($2)); + %*/ + } + ; + +opt_paren_args : none + | paren_args + ; + +opt_call_args : none + | call_args + ; + +call_args : command + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = arg_add(arg_new(), $1); + %*/ + } + | args opt_block_arg + { + /*%%%*/ + $$ = arg_blk_pass($1, $2); + /*% + $$ = arg_add_optblock($1, $2); + %*/ + } + | assocs opt_block_arg + { + /*%%%*/ + $$ = NEW_LIST(NEW_HASH($1)); + $$ = arg_blk_pass($$, $2); + /*% + $$ = arg_add_assocs(arg_new(), $1); + $$ = arg_add_optblock($$, $2); + %*/ + } + | args ',' assocs opt_block_arg + { + /*%%%*/ + $$ = arg_append($1, NEW_HASH($3)); + $$ = arg_blk_pass($$, $4); + /*% + $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); + %*/ + } + | block_arg + /*%c%*/ + /*%c + { + $$ = arg_add_block(arg_new(), $1); + } + %*/ + ; + +command_args : { + $$ = cmdarg_stack; + CMDARG_PUSH(1); + } + call_args + { + /* CMDARG_POP() */ + cmdarg_stack = $1; + $$ = $2; + } + ; + +block_arg : tAMPER arg_value + { + /*%%%*/ + $$ = NEW_BLOCK_PASS($2); + /*% + $$ = $2; + %*/ + } + ; + +opt_block_arg : ',' block_arg + { + $$ = $2; + } + | ',' + { + $$ = 0; + } + | none + { + $$ = 0; + } + ; + +args : arg_value + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = arg_add(arg_new(), $1); + %*/ + } + | tSTAR arg_value + { + /*%%%*/ + $$ = NEW_SPLAT($2); + /*% + $$ = arg_add_star(arg_new(), $2); + %*/ + } + | args ',' arg_value + { + /*%%%*/ + NODE *n1; + if ((n1 = splat_array($1)) != 0) { + $$ = list_append(n1, $3); + } + else { + $$ = arg_append($1, $3); + } + /*% + $$ = arg_add($1, $3); + %*/ + } + | args ',' tSTAR arg_value + { + /*%%%*/ + NODE *n1; + if ((nd_type($4) == NODE_ARRAY) && (n1 = splat_array($1)) != 0) { + $$ = list_concat(n1, $4); + } + else { + $$ = arg_concat($1, $4); + } + /*% + $$ = arg_add_star($1, $4); + %*/ + } + ; + +mrhs : args ',' arg_value + { + /*%%%*/ + NODE *n1; + if ((n1 = splat_array($1)) != 0) { + $$ = list_append(n1, $3); + } + else { + $$ = arg_append($1, $3); + } + /*% + $$ = mrhs_add(args2mrhs($1), $3); + %*/ + } + | args ',' tSTAR arg_value + { + /*%%%*/ + NODE *n1; + if (nd_type($4) == NODE_ARRAY && + (n1 = splat_array($1)) != 0) { + $$ = list_concat(n1, $4); + } + else { + $$ = arg_concat($1, $4); + } + /*% + $$ = mrhs_add_star(args2mrhs($1), $4); + %*/ + } + | tSTAR arg_value + { + /*%%%*/ + $$ = NEW_SPLAT($2); + /*% + $$ = mrhs_add_star(mrhs_new(), $2); + %*/ + } + ; + +primary : literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + /*%%%*/ + $$ = NEW_FCALL($1, 0); + /*% + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + %*/ + } + | k_begin + { + /*%%%*/ + $$ = ruby_sourceline; + /*% + %*/ + } + bodystmt + k_end + { + /*%%%*/ + if ($3 == NULL) { + $$ = NEW_NIL(); + } + else { + if (nd_type($3) == NODE_RESCUE || + nd_type($3) == NODE_ENSURE) + nd_set_line($3, $2); + $$ = NEW_BEGIN($3); + } + nd_set_line($$, $2); + /*% + $$ = dispatch1(begin, $3); + %*/ + } + | tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} rparen + { + rb_warning0("(...) interpreted as grouped expression"); + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(paren, $2); + %*/ + } + | tLPAREN compstmt ')' + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(paren, $2); + %*/ + } + | primary_value tCOLON2 tCONSTANT + { + /*%%%*/ + $$ = NEW_COLON2($1, $3); + /*% + $$ = dispatch2(const_path_ref, $1, $3); + %*/ + } + | tCOLON3 tCONSTANT + { + /*%%%*/ + $$ = NEW_COLON3($2); + /*% + $$ = dispatch1(top_const_ref, $2); + %*/ + } + | tLBRACK aref_args ']' + { + /*%%%*/ + if ($2 == 0) { + $$ = NEW_ZARRAY(); /* zero length array*/ + } + else { + $$ = $2; + } + /*% + $$ = dispatch1(array, escape_Qundef($2)); + %*/ + } + | tLBRACE assoc_list '}' + { + /*%%%*/ + $$ = NEW_HASH($2); + /*% + $$ = dispatch1(hash, escape_Qundef($2)); + %*/ + } + | keyword_return + { + /*%%%*/ + $$ = NEW_RETURN(0); + /*% + $$ = dispatch0(return0); + %*/ + } + | keyword_yield '(' call_args rparen + { + /*%%%*/ + $$ = new_yield($3); + /*% + $$ = dispatch1(yield, dispatch1(paren, $3)); + %*/ + } + | keyword_yield '(' rparen + { + /*%%%*/ + $$ = NEW_YIELD(0, Qfalse); + /*% + $$ = dispatch1(yield, dispatch1(paren, arg_new())); + %*/ + } + | keyword_yield + { + /*%%%*/ + $$ = NEW_YIELD(0, Qfalse); + /*% + $$ = dispatch0(yield0); + %*/ + } + | keyword_defined opt_nl '(' {in_defined = 1;} expr rparen + { + /*%%%*/ + in_defined = 0; + $$ = NEW_DEFINED($5); + /*% + in_defined = 0; + $$ = dispatch1(defined, $5); + %*/ + } + | keyword_not '(' expr rparen + { + /*%%%*/ + $$ = call_uni_op(cond($3), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), $3); + %*/ + } + | keyword_not '(' rparen + { + /*%%%*/ + $$ = call_uni_op(cond(NEW_NIL()), '!'); + /*% + $$ = dispatch2(unary, ripper_intern("not"), Qnil); + %*/ + } + | operation brace_block + { + /*%%%*/ + $2->nd_iter = NEW_FCALL($1, 0); + $$ = $2; + fixpos($2->nd_iter, $2); + /*% + $$ = method_arg(dispatch1(fcall, $1), arg_new()); + $$ = method_add_block($$, $2); + %*/ + } + | method_call + | method_call brace_block + { + /*%%%*/ + block_dup_check($1->nd_args, $2); + $2->nd_iter = $1; + $$ = $2; + fixpos($$, $1); + /*% + $$ = method_add_block($1, $2); + %*/ + } + | tLAMBDA lambda + { + $$ = $2; + } + | k_if expr_value then + compstmt + if_tail + k_end + { + /*%%%*/ + $$ = NEW_IF(cond($2), $4, $5); + fixpos($$, $2); + /*% + $$ = dispatch3(if, $2, $4, escape_Qundef($5)); + %*/ + } + | k_unless expr_value then + compstmt + opt_else + k_end + { + /*%%%*/ + $$ = NEW_UNLESS(cond($2), $4, $5); + fixpos($$, $2); + /*% + $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); + %*/ + } + | k_while {COND_PUSH(1);} expr_value do {COND_POP();} + compstmt + k_end + { + /*%%%*/ + $$ = NEW_WHILE(cond($3), $6, 1); + fixpos($$, $3); + /*% + $$ = dispatch2(while, $3, $6); + %*/ + } + | k_until {COND_PUSH(1);} expr_value do {COND_POP();} + compstmt + k_end + { + /*%%%*/ + $$ = NEW_UNTIL(cond($3), $6, 1); + fixpos($$, $3); + /*% + $$ = dispatch2(until, $3, $6); + %*/ + } + | k_case expr_value opt_terms + case_body + k_end + { + /*%%%*/ + $$ = NEW_CASE($2, $4); + fixpos($$, $2); + /*% + $$ = dispatch2(case, $2, $4); + %*/ + } + | k_case opt_terms case_body k_end + { + /*%%%*/ + $$ = NEW_CASE(0, $3); + /*% + $$ = dispatch2(case, Qnil, $3); + %*/ + } + | k_for for_var keyword_in + {COND_PUSH(1);} + expr_value do + {COND_POP();} + compstmt + k_end + { + /*%%%*/ + /* + * for a, b, c in e + * #=> + * e.each{|*x| a, b, c = x + * + * for a in e + * #=> + * e.each{|x| a, = x} + */ + ID id = internal_id(); + ID *tbl = ALLOC_N(ID, 2); + NODE *m = NEW_ARGS_AUX(0, 0); + NODE *args, *scope; + + if (nd_type($2) == NODE_MASGN) { + /* if args.length == 1 && args[0].kind_of?(Array) + * args = args[0] + * end + */ + NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); + NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); + m->nd_next = block_append( + NEW_IF( + NEW_NODE(NODE_AND, + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), + rb_intern("=="), one), + NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), + rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), + 0), + NEW_DASGN_CURR(id, + NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), + 0), + node_assign($2, NEW_DVAR(id))); + + args = new_args(m, 0, id, 0, 0); + } + else { + if (nd_type($2) == NODE_LASGN || + nd_type($2) == NODE_DASGN || + nd_type($2) == NODE_DASGN_CURR) { + $2->nd_value = NEW_DVAR(id); + m->nd_plen = 1; + m->nd_next = $2; + args = new_args(m, 0, 0, 0, 0); + } + else { + m->nd_next = node_assign(NEW_MASGN(NEW_LIST($2), 0), NEW_DVAR(id)); + args = new_args(m, 0, id, 0, 0); + } + } + scope = NEW_NODE(NODE_SCOPE, tbl, $8, args); + tbl[0] = 1; tbl[1] = id; + $$ = NEW_FOR(0, $5, scope); + fixpos($$, $2); + /*% + $$ = dispatch3(for, $2, $5, $8); + %*/ + } + | k_class cpath superclass + { + if (in_def || in_single) + yyerror("class definition in method body"); + /*%%%*/ + local_push(0); + $$ = ruby_sourceline; + /*% + %*/ + } + bodystmt + k_end + { + /*%%%*/ + $$ = NEW_CLASS($2, $5, $3); + nd_set_line($$, $4); + local_pop(); + /*% + $$ = dispatch3(class, $2, $3, $5); + %*/ + } + | k_class tLSHFT expr + { + $$ = in_def; + in_def = 0; + } + term + { + $$ = in_single; + in_single = 0; + /*%%%*/ + local_push(0); + /*% + %*/ + } + bodystmt + k_end + { + /*%%%*/ + $$ = NEW_SCLASS($3, $7); + fixpos($$, $3); + local_pop(); + /*% + $$ = dispatch2(sclass, $3, $7); + %*/ + in_def = $4; + in_single = $6; + } + | k_module cpath + { + if (in_def || in_single) + yyerror("module definition in method body"); + /*%%%*/ + local_push(0); + $$ = ruby_sourceline; + /*% + %*/ + } + bodystmt + k_end + { + /*%%%*/ + $$ = NEW_MODULE($2, $4); + nd_set_line($$, $3); + local_pop(); + /*% + $$ = dispatch2(module, $2, $4); + %*/ + } + | k_def fname + { + $$ = cur_mid; + cur_mid = $2; + in_def++; + /*%%%*/ + local_push(0); + /*% + %*/ + } + f_arglist + bodystmt + k_end + { + /*%%%*/ + NODE *body = remove_begin($5); + reduce_nodes(&body); + $$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE); + fixpos($$, $4); + fixpos($$->nd_defn, $4); + local_pop(); + /*% + $$ = dispatch3(def, $2, $4, $5); + %*/ + in_def--; + cur_mid = $3; + } + | k_def singleton dot_or_colon {lex_state = EXPR_FNAME;} fname + { + in_single++; + lex_state = EXPR_END; /* force for args */ + /*%%%*/ + local_push(0); + /*% + %*/ + } + f_arglist + bodystmt + k_end + { + /*%%%*/ + NODE *body = remove_begin($8); + reduce_nodes(&body); + $$ = NEW_DEFS($2, $5, $7, body); + fixpos($$, $2); + fixpos($$->nd_defn, $2); + local_pop(); + /*% + $$ = dispatch5(defs, $2, $3, $5, $7, $8); + %*/ + in_single--; + } + | keyword_break + { + /*%%%*/ + $$ = NEW_BREAK(0); + /*% + $$ = dispatch1(break, arg_new()); + %*/ + } + | keyword_next + { + /*%%%*/ + $$ = NEW_NEXT(0); + /*% + $$ = dispatch1(next, arg_new()); + %*/ + } + | keyword_redo + { + /*%%%*/ + $$ = NEW_REDO(); + /*% + $$ = dispatch0(redo); + %*/ + } + | keyword_retry + { + /*%%%*/ + $$ = NEW_RETRY(); + /*% + $$ = dispatch0(retry); + %*/ + } + ; + +primary_value : primary + { + /*%%%*/ + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); + /*% + $$ = $1; + %*/ + } + ; + +k_begin : keyword_begin + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "begin"); +#endif + } + +k_if : keyword_if + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "if"); +#endif + } + +k_unless : keyword_unless + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "unless"); +#endif + } + +k_while : keyword_while + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "while"); +#endif + } + +k_until : keyword_until + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "until"); +#endif + } + +k_case : keyword_case + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "case"); +#endif + } + +k_for : keyword_for + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "for"); +#endif + } + +k_class : keyword_class + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "class"); +#endif + } + +k_module : keyword_module + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "module"); +#endif + } + +k_def : keyword_def + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_push(parser, "def"); +#endif + } + +k_end : keyword_end + { +#ifndef RIPPER + if (RTEST(ruby_verbose)) token_info_pop(parser, "end"); /* POP */ +#endif + } + +then : term + /*%c%*/ + /*%c + { $$ = Qnil; } + %*/ + | keyword_then + | term keyword_then + /*%c%*/ + /*%c + { $$ = $2; } + %*/ + ; + +do : term + /*%c%*/ + /*%c + { $$ = Qnil; } + %*/ + | keyword_do_cond + ; + +if_tail : opt_else + | keyword_elsif expr_value then + compstmt + if_tail + { + /*%%%*/ + $$ = NEW_IF(cond($2), $4, $5); + fixpos($$, $2); + /*% + $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); + %*/ + } + ; + +opt_else : none + | keyword_else compstmt + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(else, $2); + %*/ + } + ; + +for_var : lhs + | mlhs + ; + +f_marg : f_norm_arg + { + /*%%%*/ + $$ = assignable($1, 0); + /*% + $$ = dispatch1(mlhs_paren, $1); + %*/ + } + | tLPAREN f_margs rparen + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +f_marg_list : f_marg + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = mlhs_add(mlhs_new(), $1); + %*/ + } + | f_marg_list ',' f_marg + { + /*%%%*/ + $$ = list_append($1, $3); + /*% + $$ = mlhs_add($1, $3); + %*/ + } + ; + +f_margs : f_marg_list + { + /*%%%*/ + $$ = NEW_MASGN($1, 0); + /*% + $$ = $1; + %*/ + } + | f_marg_list ',' tSTAR f_norm_arg + { + /*%%%*/ + $$ = NEW_MASGN($1, assignable($4, 0)); + /*% + $$ = mlhs_add_star($1, $4); + %*/ + } + | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list + { + /*%%%*/ + $$ = NEW_MASGN($1, NEW_POSTARG(assignable($4, 0), $6)); + /*% + $$ = mlhs_add_star($1, $4); + %*/ + } + | f_marg_list ',' tSTAR + { + /*%%%*/ + $$ = NEW_MASGN($1, -1); + /*% + $$ = mlhs_add_star($1, Qnil); + %*/ + } + | f_marg_list ',' tSTAR ',' f_marg_list + { + /*%%%*/ + $$ = NEW_MASGN($1, NEW_POSTARG(-1, $5)); + /*% + $$ = mlhs_add_star($1, $5); + %*/ + } + | tSTAR f_norm_arg + { + /*%%%*/ + $$ = NEW_MASGN(0, assignable($2, 0)); + /*% + $$ = mlhs_add_star(mlhs_new(), $2); + %*/ + } + | tSTAR f_norm_arg ',' f_marg_list + { + /*%%%*/ + $$ = NEW_MASGN(0, NEW_POSTARG(assignable($2, 0), $4)); + /*% + #if 0 + TODO: Check me + #endif + $$ = mlhs_add_star($2, $4); + %*/ + } + | tSTAR + { + /*%%%*/ + $$ = NEW_MASGN(0, -1); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + } + | tSTAR ',' f_marg_list + { + /*%%%*/ + $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3)); + /*% + $$ = mlhs_add_star(mlhs_new(), Qnil); + %*/ + } + ; + +block_param : f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, $5, 0, $6); + /*% + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + %*/ + } + | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, $5, $7, $8); + /*% + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + %*/ + } + | f_arg ',' f_block_optarg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, 0, 0, $4); + /*% + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + %*/ + } + | f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, 0, $5, $6); + /*% + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + %*/ + } + | f_arg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, $3, 0, $4); + /*% + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + %*/ + } + | f_arg ',' + { + /*%%%*/ + $$ = new_args($1, 0, 1, 0, 0); + /*% + $$ = params_new($1, Qnil, Qnil, Qnil, Qnil); + dispatch1(excessed_comma, $$); + %*/ + } + | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, $3, $5, $6); + /*% + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + %*/ + } + | f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, 0, 0, $2); + /*% + $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2)); + %*/ + } + | f_block_optarg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, $3, 0, $4); + /*% + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + %*/ + } + | f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, $3, $5, $6); + /*% + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + %*/ + } + | f_block_optarg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, 0, 0, $2); + /*% + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + %*/ + } + | f_block_optarg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, 0, $3, $4); + /*% + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + %*/ + } + | f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, $1, 0, $2); + /*% + $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2)); + %*/ + } + | f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, $1, $3, $4); + /*% + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + %*/ + } + | f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, 0, 0, $1); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + %*/ + } + ; + +opt_block_param : none + | block_param_def + { + command_start = Qtrue; + } + ; + +block_param_def : '|' opt_bv_decl '|' + { + /*%%%*/ + $$ = 0; + /*% + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + escape_Qundef($2)); + %*/ + } + | tOROP + { + /*%%%*/ + $$ = 0; + /*% + $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), + Qnil); + %*/ + } + | '|' block_param opt_bv_decl '|' + { + /*%%%*/ + $$ = $2; + /*% + $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); + %*/ + } + ; + + +opt_bv_decl : none + | ';' bv_decls + { + /*%%%*/ + $$ = 0; + /*% + $$ = $2; + %*/ + } + ; + +bv_decls : bvar + /*%c%*/ + /*%c + { + $$ = rb_ary_new2($1); + } + %*/ + | bv_decls ',' bvar + /*%c%*/ + /*%c + { + rb_ary_push($$, $3); + } + %*/ + ; + +bvar : tIDENTIFIER + { + /*%%%*/ + new_bv($1); + /*% + $$ = $1; + %*/ + } + | f_bad_arg + { + $$ = 0; + } + ; + +lambda : { + /*%%%*/ + dyna_push(); + /*% + %*/ + $$ = lpar_beg; + lpar_beg = ++paren_nest; + } + f_larglist + lambda_body + { + lpar_beg = $1; + /*%%%*/ + $$ = $2; + $$->nd_body = NEW_SCOPE($2->nd_head, $3); + dyna_pop(); + /*% + $$ = dispatch2(lambda, $2, $3); + %*/ + } + ; + +f_larglist : '(' f_args opt_bv_decl rparen + { + /*%%%*/ + $$ = NEW_LAMBDA($2); + /*% + $$ = dispatch1(paren, $2); + %*/ + } + | f_args + { + /*%%%*/ + $$ = NEW_LAMBDA($1); + /*% + $$ = $1; + %*/ + } + ; + +lambda_body : tLAMBEG compstmt '}' + { + $$ = $2; + } + | keyword_do_LAMBDA compstmt keyword_end + { + $$ = $2; + } + ; + +do_block : keyword_do_block + { + /*%%%*/ + dyna_push(); + $$ = ruby_sourceline; + /*% %*/ + } + opt_block_param + compstmt + keyword_end + { + /*%%%*/ + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); + /*% + $$ = dispatch2(do_block, escape_Qundef($3), $4); + %*/ + } + ; + +block_call : command do_block + { + /*%%%*/ + if (nd_type($1) == NODE_YIELD) { + compile_error(PARSER_ARG "block given to yield"); + } + else { + block_dup_check($1->nd_args, $2); + } + $2->nd_iter = $1; + $$ = $2; + fixpos($$, $1); + /*% + $$ = method_add_block($1, $2); + %*/ + } + | block_call '.' operation2 opt_paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + } + | block_call tCOLON2 operation2 opt_paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + $$ = method_optarg($$, $4); + %*/ + } + ; + +method_call : operation paren_args + { + /*%%%*/ + $$ = NEW_FCALL($1, $2); + fixpos($$, $2); + /*% + $$ = method_arg(dispatch1(fcall, $1), $2); + %*/ + } + | primary_value '.' operation2 opt_paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + } + | primary_value tCOLON2 operation2 paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, $3, $4); + fixpos($$, $1); + /*% + $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); + $$ = method_optarg($$, $4); + %*/ + } + | primary_value tCOLON2 operation3 + { + /*%%%*/ + $$ = NEW_CALL($1, $3, 0); + /*% + $$ = dispatch3(call, $1, ripper_intern("::"), $3); + %*/ + } + | primary_value '.' paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + } + | primary_value tCOLON2 paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + } + | keyword_super paren_args + { + /*%%%*/ + $$ = NEW_SUPER($2); + /*% + $$ = dispatch1(super, $2); + %*/ + } + | keyword_super + { + /*%%%*/ + $$ = NEW_ZSUPER(); + /*% + $$ = dispatch0(zsuper); + %*/ + } + | primary_value '[' opt_call_args rbracket + { + /*%%%*/ + if ($1 && nd_type($1) == NODE_SELF) + $$ = NEW_FCALL(tAREF, $3); + else + $$ = NEW_CALL($1, tAREF, $3); + fixpos($$, $1); + /*% + $$ = dispatch2(aref, $1, escape_Qundef($3)); + %*/ + } + ; + +brace_block : '{' + { + /*%%%*/ + dyna_push(); + $$ = ruby_sourceline; + /*% + %*/ + } + opt_block_param + compstmt '}' + { + /*%%%*/ + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + nd_set_line($$->nd_body, $2); + nd_set_line($$->nd_body->nd_body, $2); + dyna_pop(); + /*% + $$ = dispatch2(brace_block, escape_Qundef($3), $4); + %*/ + } + | keyword_do + { + /*%%%*/ + dyna_push(); + $$ = ruby_sourceline; + /*% + %*/ + } + opt_block_param + compstmt keyword_end + { + /*%%%*/ + $$ = NEW_ITER($3,$4); + nd_set_line($$, $2); + dyna_pop(); + /*% + $$ = dispatch2(do_block, escape_Qundef($3), $4); + %*/ + } + ; + +case_body : keyword_when args then + compstmt + cases + { + /*%%%*/ + $$ = NEW_WHEN($2, $4, $5); + /*% + $$ = dispatch3(when, $2, $4, escape_Qundef($5)); + %*/ + } + ; + +cases : opt_else + | case_body + ; + +opt_rescue : keyword_rescue exc_list exc_var then + compstmt + opt_rescue + { + /*%%%*/ + if ($3) { + $3 = node_assign($3, NEW_ERRINFO()); + $5 = block_append($3, $5); + } + $$ = NEW_RESBODY($2, $5, $6); + fixpos($$, $2?$2:$5); + /*% + $$ = dispatch4(rescue, + escape_Qundef($2), + escape_Qundef($3), + escape_Qundef($5), + escape_Qundef($6)); + %*/ + } + | none + ; + +exc_list : arg_value + { + /*%%%*/ + $$ = NEW_LIST($1); + /*% + $$ = rb_ary_new3(1, $1); + %*/ + } + | mrhs + { + /*%%%*/ + if (!($$ = splat_array($1))) $$ = $1; + /*% + $$ = $1; + %*/ + } + | none + ; + +exc_var : tASSOC lhs + { + $$ = $2; + } + | none + ; + +opt_ensure : keyword_ensure compstmt + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(ensure, $2); + %*/ + } + | none + ; + +literal : numeric + | symbol + { + /*%%%*/ + $$ = NEW_LIT(ID2SYM($1)); + /*% + $$ = dispatch1(symbol_literal, $1); + %*/ + } + | dsym + ; + +strings : string + { + /*%%%*/ + NODE *node = $1; + if (!node) { + node = NEW_STR(STR_NEW0()); + } + else { + node = evstr2dstr(node); + } + $$ = node; + /*% + $$ = $1; + %*/ + } + ; + +string : tCHAR + | string1 + | string string1 + { + /*%%%*/ + $$ = literal_concat($1, $2); + /*% + $$ = dispatch2(string_concat, $1, $2); + %*/ + } + ; + +string1 : tSTRING_BEG string_contents tSTRING_END + { + /*%%%*/ + $$ = $2; + /*% + $$ = dispatch1(string_literal, $2); + %*/ + } + ; + +xstring : tXSTRING_BEG xstring_contents tSTRING_END + { + /*%%%*/ + NODE *node = $2; + if (!node) { + node = NEW_XSTR(STR_NEW0()); + } + else { + switch (nd_type(node)) { + case NODE_STR: + nd_set_type(node, NODE_XSTR); + break; + case NODE_DSTR: + nd_set_type(node, NODE_DXSTR); + break; + default: + node = NEW_NODE(NODE_DXSTR, STR_NEW0(), 1, NEW_LIST(node)); + break; + } + } + $$ = node; + /*% + $$ = dispatch1(xstring_literal, $2); + %*/ + } + ; + +regexp : tREGEXP_BEG xstring_contents tREGEXP_END + { + /*%%%*/ + int options = $3; + NODE *node = $2; + NODE *list; + if (!node) { + node = NEW_LIT(reg_compile(STR_NEW0(), options)); + } + else switch (nd_type(node)) { + case NODE_STR: + { + VALUE src = node->nd_lit; + nd_set_type(node, NODE_LIT); + node->nd_lit = reg_compile(src, options); + } + break; + default: + node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); + case NODE_DSTR: + if (options & RE_OPTION_ONCE) { + nd_set_type(node, NODE_DREGX_ONCE); + } + else { + nd_set_type(node, NODE_DREGX); + } + node->nd_cflag = options & RE_OPTION_MASK; + reg_fragment_check(node->nd_lit, options); + for (list = node->nd_next; list; list = list->nd_next) { + if (nd_type(list->nd_head) == NODE_STR) { + reg_fragment_check(list->nd_head->nd_lit, options); + } + } + break; + } + $$ = node; + /*% + $$ = dispatch2(regexp_literal, $2, $3); + %*/ + } + ; + +words : tWORDS_BEG ' ' tSTRING_END + { + /*%%%*/ + $$ = NEW_ZARRAY(); + /*% + $$ = dispatch0(words_new); + %*/ + } + | tWORDS_BEG word_list tSTRING_END + { + $$ = $2; + } + ; + +word_list : /* none */ + { + /*%%%*/ + $$ = 0; + /*% + $$ = dispatch0(words_new); + %*/ + } + | word_list word ' ' + { + /*%%%*/ + $$ = list_append($1, evstr2dstr($2)); + /*% + $$ = dispatch2(words_add, $1, $2); + %*/ + } + ; + +word : string_content + /*%c%*/ + /*%c + { + $$ = dispatch0(word_new); + $$ = dispatch2(word_add, $$, $1); + } + %*/ + | word string_content + { + /*%%%*/ + $$ = literal_concat($1, $2); + /*% + $$ = dispatch2(word_add, $1, $2); + %*/ + } + ; + +qwords : tQWORDS_BEG ' ' tSTRING_END + { + /*%%%*/ + $$ = NEW_ZARRAY(); + /*% + $$ = dispatch0(qwords_new); + %*/ + } + | tQWORDS_BEG qword_list tSTRING_END + { + $$ = $2; + } + ; + +qword_list : /* none */ + { + /*%%%*/ + $$ = 0; + /*% + $$ = dispatch0(qwords_new); + %*/ + } + | qword_list tSTRING_CONTENT ' ' + { + /*%%%*/ + $$ = list_append($1, $2); + /*% + $$ = dispatch2(qwords_add, $1, $2); + %*/ + } + ; + +string_contents : /* none */ + { + /*%%%*/ + $$ = 0; + /*% + $$ = dispatch0(string_content); + %*/ + } + | string_contents string_content + { + /*%%%*/ + $$ = literal_concat($1, $2); + /*% + $$ = dispatch2(string_add, $1, $2); + %*/ + } + ; + +xstring_contents: /* none */ + { + /*%%%*/ + $$ = 0; + /*% + $$ = dispatch0(xstring_new); + %*/ + } + | xstring_contents string_content + { + /*%%%*/ + $$ = literal_concat($1, $2); + /*% + $$ = dispatch2(xstring_add, $1, $2); + %*/ + } + ; + +string_content : tSTRING_CONTENT + | tSTRING_DVAR + { + $$ = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + } + string_dvar + { + /*%%%*/ + lex_strterm = $2; + $$ = NEW_EVSTR($3); + /*% + lex_strterm = $2; + $$ = dispatch1(string_dvar, $3); + %*/ + } + | tSTRING_DBEG + { + $$ = lex_strterm; + lex_strterm = 0; + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + } + compstmt '}' + { + lex_strterm = $2; + COND_LEXPOP(); + CMDARG_LEXPOP(); + /*%%%*/ + if ($3) $3->flags &= ~NODE_FL_NEWLINE; + $$ = new_evstr($3); + /*% + $$ = dispatch1(string_embexpr, $3); + %*/ + } + ; + +string_dvar : tGVAR + { + /*%%%*/ + $$ = NEW_GVAR($1); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + } + | tIVAR + { + /*%%%*/ + $$ = NEW_IVAR($1); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + } + | tCVAR + { + /*%%%*/ + $$ = NEW_CVAR($1); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + } + | backref + ; + +symbol : tSYMBEG sym + { + /*%%%*/ + lex_state = EXPR_END; + $$ = $2; + /*% + lex_state = EXPR_END; + $$ = dispatch1(symbol, $2); + %*/ + } + ; + +sym : fname + | tIVAR + | tGVAR + | tCVAR + ; + +dsym : tSYMBEG xstring_contents tSTRING_END + { + /*%%%*/ + lex_state = EXPR_END; + if (!($$ = $2)) { + $$ = NEW_LIT(ID2SYM(rb_intern(""))); + } + else { + VALUE lit; + + switch (nd_type($$)) { + case NODE_DSTR: + nd_set_type($$, NODE_DSYM); + break; + case NODE_STR: + lit = $$->nd_lit; + $$->nd_lit = ID2SYM(rb_intern_str(lit)); + nd_set_type($$, NODE_LIT); + break; + default: + $$ = NEW_NODE(NODE_DSYM, STR_NEW0(), 1, NEW_LIST($$)); + break; + } + } + /*% + lex_state = EXPR_END; + $$ = dispatch1(dyna_symbol, $2); + %*/ + } + ; + +numeric : tINTEGER + | tFLOAT + | tUMINUS_NUM tINTEGER %prec tLOWEST + { + /*%%%*/ + $$ = negate_lit($2); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + } + | tUMINUS_NUM tFLOAT %prec tLOWEST + { + /*%%%*/ + $$ = negate_lit($2); + /*% + $$ = dispatch2(unary, ripper_intern("-@"), $2); + %*/ + } + ; + +variable : tIDENTIFIER + | tIVAR + | tGVAR + | tCONSTANT + | tCVAR + | keyword_nil {ifndef_ripper($$ = keyword_nil);} + | keyword_self {ifndef_ripper($$ = keyword_self);} + | keyword_true {ifndef_ripper($$ = keyword_true);} + | keyword_false {ifndef_ripper($$ = keyword_false);} + | keyword__FILE__ {ifndef_ripper($$ = keyword__FILE__);} + | keyword__LINE__ {ifndef_ripper($$ = keyword__LINE__);} + | keyword__ENCODING__ {ifndef_ripper($$ = keyword__ENCODING__);} + ; + +var_ref : variable + { + /*%%%*/ + if (!($$ = gettable($1))) $$ = NEW_BEGIN(0); + /*% + $$ = dispatch1(var_ref, $1); + %*/ + } + ; + +var_lhs : variable + { + /*%%%*/ + $$ = assignable($1, 0); + /*% + $$ = dispatch1(var_field, $1); + %*/ + } + ; + +backref : tNTH_REF + | tBACK_REF + ; + +superclass : term + { + /*%%%*/ + $$ = 0; + /*% + $$ = Qnil; + %*/ + } + | '<' + { + lex_state = EXPR_BEG; + } + expr_value term + { + $$ = $3; + } + | error term + { + /*%%%*/ + yyerrok; + $$ = 0; + /*% + yyerrok; + $$ = Qnil; + %*/ + } + ; + +f_arglist : '(' f_args rparen + { + /*%%%*/ + $$ = $2; + lex_state = EXPR_BEG; + command_start = Qtrue; + /*% + $$ = dispatch1(paren, $2); + lex_state = EXPR_BEG; + command_start = Qtrue; + %*/ + } + | f_args term + { + $$ = $1; + } + ; + +f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, $5, 0, $6); + /*% + $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); + %*/ + } + | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, $5, $7, $8); + /*% + $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); + %*/ + } + | f_arg ',' f_optarg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, 0, 0, $4); + /*% + $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); + %*/ + } + | f_arg ',' f_optarg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, $3, 0, $5, $6); + /*% + $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); + %*/ + } + | f_arg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, $3, 0, $4); + /*% + $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); + %*/ + } + | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, $3, $5, $6); + /*% + $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); + %*/ + } + | f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args($1, 0, 0, 0, $2); + /*% + $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); + %*/ + } + | f_optarg ',' f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, $3, 0, $4); + /*% + $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); + %*/ + } + | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, $3, $5, $6); + /*% + $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); + %*/ + } + | f_optarg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, 0, 0, $2); + /*% + $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); + %*/ + } + | f_optarg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, $1, 0, $3, $4); + /*% + $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); + %*/ + } + | f_rest_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, $1, 0, $2); + /*% + $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); + %*/ + } + | f_rest_arg ',' f_arg opt_f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, $1, $3, $4); + /*% + $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); + %*/ + } + | f_block_arg + { + /*%%%*/ + $$ = new_args(0, 0, 0, 0, $1); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); + %*/ + } + | /* none */ + { + /*%%%*/ + $$ = new_args(0, 0, 0, 0, 0); + /*% + $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); + %*/ + } + ; + +f_bad_arg : tCONSTANT + { + /*%%%*/ + yyerror("formal argument cannot be a constant"); + $$ = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + } + | tIVAR + { + /*%%%*/ + yyerror("formal argument cannot be an instance variable"); + $$ = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + } + | tGVAR + { + /*%%%*/ + yyerror("formal argument cannot be a global variable"); + $$ = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + } + | tCVAR + { + /*%%%*/ + yyerror("formal argument cannot be a class variable"); + $$ = 0; + /*% + $$ = dispatch1(param_error, $1); + %*/ + } + ; + +f_norm_arg : f_bad_arg + | tIDENTIFIER + { + /*%%%*/ + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); + /*% + %*/ + $$ = $1; + } + ; + +f_arg_item : f_norm_arg + { + /*%%%*/ + arg_var($1); + $$ = NEW_ARGS_AUX($1, 1); + /*% + %*/ + } + | tLPAREN f_margs rparen + { + /*%%%*/ + ID tid = internal_id(); + arg_var(tid); + if (dyna_in_block()) { + $2->nd_value = NEW_DVAR(tid); + } + else { + $2->nd_value = NEW_LVAR(tid); + } + $$ = NEW_ARGS_AUX(tid, 1); + $$->nd_next = $2; + /*% + $$ = dispatch1(mlhs_paren, $2); + %*/ + } + ; + +f_arg : f_arg_item + /*%c%*/ + /*%c + { + $$ = rb_ary_new3(1, $1); + } + c%*/ + | f_arg ',' f_arg_item + { + /*%%%*/ + $$ = $1; + $$->nd_plen++; + $$->nd_next = block_append($$->nd_next, $3->nd_next); + rb_gc_force_recycle((VALUE)$3); + /*% + $$ = rb_ary_push($1, $3); + %*/ + } + ; + +f_opt : tIDENTIFIER '=' arg_value + { + /*%%%*/ + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); + arg_var($1); + $$ = NEW_OPT_ARG(0, assignable($1, $3)); + /*% + $$ = rb_assoc_new($1, $3); + %*/ + } + ; + +f_block_opt : tIDENTIFIER '=' primary_value + { + /*%%%*/ + if (!is_local_id($1)) + yyerror("formal argument must be local variable"); + shadowing_lvar($1); + arg_var($1); + $$ = NEW_OPT_ARG(0, assignable($1, $3)); + /*% + $$ = rb_assoc_new($1, $3); + %*/ + } + ; + +f_block_optarg : f_block_opt + { + /*%%%*/ + $$ = $1; + /*% + $$ = rb_ary_new3(1, $1); + %*/ + } + | f_block_optarg ',' f_block_opt + { + /*%%%*/ + NODE *opts = $1; + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = $3; + $$ = $1; + /*% + $$ = rb_ary_push($1, $3); + %*/ + } + ; + +f_optarg : f_opt + { + /*%%%*/ + $$ = $1; + /*% + $$ = rb_ary_new3(1, $1); + %*/ + } + | f_optarg ',' f_opt + { + /*%%%*/ + NODE *opts = $1; + + while (opts->nd_next) { + opts = opts->nd_next; + } + opts->nd_next = $3; + $$ = $1; + /*% + $$ = rb_ary_push($1, $3); + %*/ + } + ; + +restarg_mark : '*' + | tSTAR + ; + +f_rest_arg : restarg_mark tIDENTIFIER + { + /*%%%*/ + if (!is_local_id($2)) + yyerror("rest argument must be local variable"); + shadowing_lvar($2); + arg_var($2); + $$ = $2; + /*% + $$ = dispatch1(rest_param, $2); + %*/ + } + | restarg_mark + { + /*%%%*/ + $$ = internal_id(); + arg_var($$); + /*% + $$ = dispatch1(rest_param, Qnil); + %*/ + } + ; + +blkarg_mark : '&' + | tAMPER + ; + +f_block_arg : blkarg_mark tIDENTIFIER + { + /*%%%*/ + if (!is_local_id($2)) + yyerror("block argument must be local variable"); + else if (!dyna_in_block() && local_id($2)) + yyerror("duplicated block argument name"); + shadowing_lvar($2); + arg_var($2); + $$ = $2; + /*% + $$ = dispatch1(blockarg, $2); + %*/ + } + ; + +opt_f_block_arg : ',' f_block_arg + { + $$ = $2; + } + | none + { + /*%%%*/ + $$ = 0; + /*% + $$ = Qundef; + %*/ + } + ; + +singleton : var_ref + { + /*%%%*/ + value_expr($1); + $$ = $1; + if (!$$) $$ = NEW_NIL(); + /*% + $$ = $1; + %*/ + } + | '(' {lex_state = EXPR_BEG;} expr rparen + { + /*%%%*/ + if ($3 == 0) { + yyerror("can't define singleton method for ()."); + } + else { + switch (nd_type($3)) { + case NODE_STR: + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_DREGX: + case NODE_LIT: + case NODE_ARRAY: + case NODE_ZARRAY: + yyerror("can't define singleton method for literals"); + default: + value_expr($3); + break; + } + } + $$ = $3; + /*% + $$ = dispatch1(paren, $3); + %*/ + } + ; + +assoc_list : none + | assocs trailer + { + /*%%%*/ + $$ = $1; + /*% + $$ = dispatch1(assoclist_from_args, $1); + %*/ + } + ; + +assocs : assoc + /*%c%*/ + /*%c + { + $$ = rb_ary_new3(1, $1); + } + %*/ + | assocs ',' assoc + { + /*%%%*/ + $$ = list_concat($1, $3); + /*% + $$ = rb_ary_push($1, $3); + %*/ + } + ; + +assoc : arg_value tASSOC arg_value + { + /*%%%*/ + $$ = list_append(NEW_LIST($1), $3); + /*% + $$ = dispatch2(assoc_new, $1, $3); + %*/ + } + | tLABEL arg_value + { + /*%%%*/ + $$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2); + /*% + $$ = dispatch2(assoc_new, $1, $2); + %*/ + } + ; + +operation : tIDENTIFIER + | tCONSTANT + | tFID + ; + +operation2 : tIDENTIFIER + | tCONSTANT + | tFID + | op + ; + +operation3 : tIDENTIFIER + | tFID + | op + ; + +dot_or_colon : '.' + /*%c%*/ + /*%c + { $$ = $1; } + %*/ + | tCOLON2 + /*%c%*/ + /*%c + { $$ = $1; } + %*/ + ; + +opt_terms : /* none */ + | terms + ; + +opt_nl : /* none */ + | '\n' + ; + +rparen : opt_nl ')' + ; + +rbracket : opt_nl ']' + ; + +trailer : /* none */ + | '\n' + | ',' + ; + +term : ';' {yyerrok;} + | '\n' + ; + +terms : term + | terms ';' {yyerrok;} + ; + +none : /* none */ + { + /*%%%*/ + $$ = 0; + /*% + $$ = Qundef; + %*/ + } + ; +%% +# undef parser +# undef yylex +# undef yylval +# define yylval (*((YYSTYPE*)(parser->parser_yylval))) + +static int parser_regx_options(struct parser_params*); +static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); +static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); +static int parser_parse_string(struct parser_params*,NODE*); +static int parser_here_document(struct parser_params*,NODE*); + + +# define nextc() parser_nextc(parser) +# define pushback(c) parser_pushback(parser, c) +# define newtok() parser_newtok(parser) +# define tokspace(n) parser_tokspace(parser, n) +# define tokadd(c) parser_tokadd(parser, c) +# define tok_hex(numlen) parser_tok_hex(parser, numlen) +# define read_escape(flags,e) parser_read_escape(parser, flags, e) +# define tokadd_escape(e) parser_tokadd_escape(parser, e) +# define regx_options() parser_regx_options(parser) +# define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e) +# define parse_string(n) parser_parse_string(parser,n) +# define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) +# define here_document(n) parser_here_document(parser,n) +# define heredoc_identifier() parser_heredoc_identifier(parser) +# define heredoc_restore(n) parser_heredoc_restore(parser,n) +# define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i) + +#ifdef RIPPER +/* FIXME */ +# define local_id(x) 1 +# define dyna_in_block() 1 +#endif /* RIPPER */ + +#ifndef RIPPER +# define set_yylval_str(x) yylval.node = NEW_STR(x) +# define set_yylval_num(x) yylval.num = x +# define set_yylval_id(x) yylval.id = x +# define set_yylval_literal(x) yylval.node = NEW_LIT(x) +# define set_yylval_node(x) yylval.node = x +# define yylval_id() yylval.id +#else +# define set_yylval_str(x) (void)(x) +# define set_yylval_num(x) (void)(x) +# define set_yylval_id(x) (void)(x) +# define set_yylval_literal(x) (void)(x) +# define set_yylval_node(x) (void)(x) +# define yylval_id() SYM2ID(yylval.val) +#endif + +#ifdef RIPPER +#define ripper_flush(p) (p->tokp = p->parser_lex_p) + +static void +ripper_dispatch_scan_event(struct parser_params *parser, int t) +{ + VALUE str; + + if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); + if (lex_p == parser->tokp) return; + str = STR_NEW(parser->tokp, lex_p - parser->tokp); + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str); + ripper_flush(parser); +} + +static void +ripper_dispatch_delayed_token(struct parser_params *parser, int t) +{ + int saved_line = ruby_sourceline; + const char *saved_tokp = parser->tokp; + + ruby_sourceline = parser->delayed_line; + parser->tokp = lex_pbeg + parser->delayed_col; + yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); + parser->delayed = Qnil; + ruby_sourceline = saved_line; + parser->tokp = saved_tokp; +} +#endif /* RIPPER */ + +#include "ruby/regex.h" +#include "ruby/util.h" + +/* We remove any previous definition of `SIGN_EXTEND_CHAR', + since ours (we hope) works properly with all combinations of + machines, compilers, `char' and `unsigned char' argument types. + (Per Bothner suggested the basic approach.) */ +#undef SIGN_EXTEND_CHAR +#if __STDC__ +# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) +#else /* not __STDC__ */ +/* As in Harbison and Steele. */ +# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) +#endif + +#define parser_encoding_name() (parser->enc->name) +#define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) +#define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) +#define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) +#define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) + +#define parser_isascii() ISASCII(*(lex_p-1)) + +#ifndef RIPPER +static int +token_info_get_column(struct parser_params *parser, const char *token) +{ + int column = 1; + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p == '\t') { + column = (((column - 1) / 8) + 1) * 8; + } + column++; + } + return column; +} + +static int +token_info_has_nonspaces(struct parser_params *parser, const char *token) +{ + const char *p, *pend = lex_p - strlen(token); + for (p = lex_pbeg; p < pend; p++) { + if (*p != ' ' && *p != '\t') { + return 1; + } + } + return 0; +} + +static void +token_info_push(struct parser_params *parser, const char *token) +{ + token_info *ptinfo; + + if (compile_for_eval) return; + ptinfo = ALLOC(token_info); + ptinfo->token = token; + ptinfo->linenum = ruby_sourceline; + ptinfo->column = token_info_get_column(parser, token); + ptinfo->nonspc = token_info_has_nonspaces(parser, token); + ptinfo->next = parser->parser_token_info; + + parser->parser_token_info = ptinfo; +} + +static void +token_info_pop(struct parser_params *parser, const char *token) +{ + int linenum; + token_info *ptinfo = parser->parser_token_info; + + if (!ptinfo) return; + parser->parser_token_info = ptinfo->next; + if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ + goto finish; + } + linenum = ruby_sourceline; + if (linenum == ptinfo->linenum) { /* SKIP */ + goto finish; + } + if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ + goto finish; + } + rb_compile_warning(ruby_sourcefile, linenum, + "mismatched indentations at '%s' with '%s' at %d", + token, ptinfo->token, ptinfo->linenum); + + finish: + xfree(ptinfo); +} +#endif /* RIPPER */ + +static int +parser_yyerror(struct parser_params *parser, const char *msg) +{ +#ifndef RIPPER + const int max_line_margin = 30; + const char *p, *pe; + char *buf; + int len, i; + + compile_error(PARSER_ARG "%s", msg); + p = lex_p; + while (lex_pbeg <= p) { + if (*p == '\n') break; + p--; + } + p++; + + pe = lex_p; + while (pe < lex_pend) { + if (*pe == '\n') break; + pe++; + } + + len = pe - p; + if (len > 4) { + char *p2; + const char *pre = "", *post = ""; + + if (len > max_line_margin * 2 + 10) { + if (lex_p - p > max_line_margin) { + p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); + pre = "..."; + } + if (pe - lex_p > max_line_margin) { + pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); + post = "..."; + } + len = pe - p; + } + buf = ALLOCA_N(char, len+2); + MEMCPY(buf, p, char, len); + buf[len] = '\0'; + rb_compile_error_append("%s%s%s", pre, buf, post); + + i = lex_p - p; + p2 = buf; pe = buf + len; + + while (p2 < pe) { + if (*p2 != '\t') *p2 = ' '; + p2++; + } + buf[i] = '^'; + buf[i+1] = '\0'; + rb_compile_error_append("%s%s", pre, buf); + } +#else + dispatch1(parse_error, STR_NEW2(msg)); +#endif /* !RIPPER */ + return 0; +} + +static void parser_prepare(struct parser_params *parser); + +#ifndef RIPPER +VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); + +static VALUE +debug_lines(const char *f) +{ + if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) { + VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); + if (TYPE(hash) == T_HASH) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new(); + rb_hash_aset(hash, fname, lines); + return lines; + } + } + return 0; +} + +static VALUE +coverage(const char *f, int n) +{ + extern VALUE rb_get_coverages(void); + VALUE coverages = rb_get_coverages(); + if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { + VALUE fname = rb_str_new2(f); + VALUE lines = rb_ary_new2(n); + int i; + RBASIC(lines)->klass = 0; + for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; + RARRAY(lines)->as.heap.len = n; + rb_hash_aset(coverages, fname, lines); + return lines; + } + return 0; +} + +static int +e_option_supplied(struct parser_params *parser) +{ + if (strcmp(ruby_sourcefile, "-e") == 0) + return Qtrue; + return Qfalse; +} + +static VALUE +yycompile0(VALUE arg, int tracing) +{ + int n; + NODE *tree; + struct parser_params *parser = (struct parser_params *)arg; + + if (!compile_for_eval && rb_safe_level() == 0) { + ruby_debug_lines = debug_lines(ruby_sourcefile); + if (ruby_debug_lines && ruby_sourceline > 0) { + VALUE str = STR_NEW0(); + n = ruby_sourceline; + do { + rb_ary_push(ruby_debug_lines, str); + } while (--n); + } + + if (!e_option_supplied(parser)) { + ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); + } + } + + parser_prepare(parser); + deferred_nodes = 0; + n = yyparse((void*)parser); + ruby_debug_lines = 0; + ruby_coverage = 0; + compile_for_eval = 0; + + lex_strterm = 0; + lex_p = lex_pbeg = lex_pend = 0; + lex_lastline = lex_nextline = 0; + if (parser->nerr) { + return 0; + } + tree = ruby_eval_tree; + if (!tree) { + tree = NEW_NIL(); + } + if (ruby_eval_tree_begin) { + NODE *scope = ruby_eval_tree; + + if (scope) { + scope->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, scope->nd_body); + } + tree = scope; + } + else { + tree = ruby_eval_tree; + } + return (VALUE)tree; +} + +static NODE* +yycompile(struct parser_params *parser, const char *f, int line) +{ + ruby_sourcefile = ruby_strdup(f); + ruby_sourceline = line - 1; + return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue); +} +#endif /* !RIPPER */ + +static VALUE +lex_get_str(struct parser_params *parser, VALUE s) +{ + char *beg, *end, *pend; + + beg = RSTRING_PTR(s); + if (lex_gets_ptr) { + if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; + beg += lex_gets_ptr; + } + pend = RSTRING_PTR(s) + RSTRING_LEN(s); + end = beg; + while (end < pend) { + if (*end++ == '\n') break; + } + lex_gets_ptr = end - RSTRING_PTR(s); + return rb_enc_str_new(beg, end - beg, rb_enc_get(s)); +} + +static VALUE +lex_getline(struct parser_params *parser) +{ + VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); +#ifndef RIPPER + if (ruby_debug_lines && !NIL_P(line)) { + rb_ary_push(ruby_debug_lines, line); + } + if (ruby_coverage && !NIL_P(line)) { + rb_ary_push(ruby_coverage, Qnil); + } +#endif + return line; +} + +#ifndef RIPPER +NODE* +rb_compile_string(const char *f, VALUE s, int line) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_string(vparser, f, s, line); +} + +NODE* +rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) +{ + struct parser_params *parser; + NODE *node; + volatile VALUE tmp; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_get_str; + lex_gets_ptr = 0; + lex_input = s; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, line); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} + +NODE* +rb_compile_cstr(const char *f, const char *s, int len, int line) +{ + return rb_compile_string(f, rb_str_new(s, len), line); +} + +NODE* +rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) +{ + return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line); +} + +static VALUE +lex_io_gets(struct parser_params *parser, VALUE io) +{ + return rb_io_gets(io); +} + +NODE* +rb_compile_file(const char *f, VALUE file, int start) +{ + VALUE volatile vparser = rb_parser_new(); + + return rb_parser_compile_file(vparser, f, file, start); +} + +NODE* +rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) +{ + struct parser_params *parser; + volatile VALUE tmp; + NODE *node; + + Data_Get_Struct(vparser, struct parser_params, parser); + lex_gets = lex_io_gets; + lex_input = file; + lex_pbeg = lex_p = lex_pend = 0; + compile_for_eval = rb_parse_in_eval(); + + node = yycompile(parser, f, start); + tmp = vparser; /* prohibit tail call optimization */ + + return node; +} +#endif /* !RIPPER */ + +#define STR_FUNC_ESCAPE 0x01 +#define STR_FUNC_EXPAND 0x02 +#define STR_FUNC_REGEXP 0x04 +#define STR_FUNC_QWORDS 0x08 +#define STR_FUNC_SYMBOL 0x10 +#define STR_FUNC_INDENT 0x20 + +enum string_type { + str_squote = (0), + str_dquote = (STR_FUNC_EXPAND), + str_xquote = (STR_FUNC_EXPAND), + str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), + str_sword = (STR_FUNC_QWORDS), + str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), + str_ssym = (STR_FUNC_SYMBOL), + str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) +}; + +static VALUE +parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) +{ + VALUE str; + + str = rb_enc_str_new(p, n, enc); + if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + } + else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + + return str; +} + +#define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) +#define peek(c) (lex_p < lex_pend && (c) == *lex_p) + +static inline int +parser_nextc(struct parser_params *parser) +{ + int c; + + if (lex_p == lex_pend) { + VALUE v = lex_nextline; + lex_nextline = 0; + if (!v) { + if (parser->eofp) + return -1; + + if (!lex_input || NIL_P(v = lex_getline(parser))) { + parser->eofp = Qtrue; + lex_goto_eol(parser); + return -1; + } + } + { +#ifdef RIPPER + if (parser->tokp < lex_pend) { + if (NIL_P(parser->delayed)) { + parser->delayed = rb_str_buf_new(1024); + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + parser->delayed_line = ruby_sourceline; + parser->delayed_col = parser->tokp - lex_pbeg; + } + else { + rb_str_buf_cat(parser->delayed, + parser->tokp, lex_pend - parser->tokp); + } + } +#endif + if (heredoc_end > 0) { + ruby_sourceline = heredoc_end; + heredoc_end = 0; + } + ruby_sourceline++; + parser->line_count++; + lex_pbeg = lex_p = RSTRING_PTR(v); + lex_pend = lex_p + RSTRING_LEN(v); +#ifdef RIPPER + ripper_flush(parser); +#endif + lex_lastline = v; + } + } + c = (unsigned char)*lex_p++; + if (c == '\r' && peek('\n')) { + lex_p++; + c = '\n'; + } + + return c; +} + +static void +parser_pushback(struct parser_params *parser, int c) +{ + if (c == -1) return; + lex_p--; + if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { + lex_p--; + } +} + +#define was_bol() (lex_p == lex_pbeg + 1) + +#define tokfix() (tokenbuf[tokidx]='\0') +#define tok() tokenbuf +#define toklen() tokidx +#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) + +static char* +parser_newtok(struct parser_params *parser) +{ + tokidx = 0; + if (!tokenbuf) { + toksiz = 60; + tokenbuf = ALLOC_N(char, 60); + } + if (toksiz > 4096) { + toksiz = 60; + REALLOC_N(tokenbuf, char, 60); + } + return tokenbuf; +} + +static char * +parser_tokspace(struct parser_params *parser, int n) +{ + tokidx += n; + + if (tokidx >= toksiz) { + do {toksiz *= 2;} while (toksiz < tokidx); + REALLOC_N(tokenbuf, char, toksiz); + } + return &tokenbuf[tokidx-n]; +} + +static void +parser_tokadd(struct parser_params *parser, int c) +{ + tokenbuf[tokidx++] = (char)c; + if (tokidx >= toksiz) { + toksiz *= 2; + REALLOC_N(tokenbuf, char, toksiz); + } +} + +static int +parser_tok_hex(struct parser_params *parser, int *numlen) +{ + int c; + + c = scan_hex(lex_p, 2, numlen); + if (!*numlen) { + yyerror("invalid hex escape"); + return 0; + } + lex_p += *numlen; + return c; +} + +#define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) + +static int +parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, + int string_literal, int symbol_literal, int regexp_literal) +{ + /* + * If string_literal is true, then we allow multiple codepoints + * in \u{}, and add the codepoints to the current token. + * Otherwise we're parsing a character literal and return a single + * codepoint without adding it + */ + + int codepoint; + int numlen; + + if (regexp_literal) { tokadd('\\'); tokadd('u'); } + + if (peek('{')) { /* handle \u{...} form */ + do { + if (regexp_literal) { tokadd(*lex_p); } + nextc(); + codepoint = scan_hex(lex_p, 6, &numlen); + if (numlen == 0) { + yyerror("invalid Unicode escape"); + return 0; + } + if (codepoint > 0x10ffff) { + yyerror("invalid Unicode codepoint (too large)"); + return 0; + } + lex_p += numlen; + if (regexp_literal) { + tokcopy(numlen); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u{0}'"); + return 0; + } + + tokadd(codepoint); + } + } while (string_literal && (peek(' ') || peek('\t'))); + + if (!peek('}')) { + yyerror("unterminated Unicode escape"); + return 0; + } + + if (regexp_literal) { tokadd('}'); } + nextc(); + } + else { /* handle \uxxxx form */ + codepoint = scan_hex(lex_p, 4, &numlen); + if (numlen < 4) { + yyerror("invalid Unicode escape"); + return 0; + } + lex_p += 4; + if (regexp_literal) { + tokcopy(4); + } + else if (codepoint >= 0x80) { + *encp = UTF8_ENC(); + if (string_literal) tokaddmbc(codepoint, *encp); + } + else if (string_literal) { + if (codepoint == 0 && symbol_literal) { + yyerror("symbol cannot contain '\\u0000'"); + return 0; + } + + tokadd(codepoint); + } + } + + return codepoint; +} + +#define ESCAPE_CONTROL 1 +#define ESCAPE_META 2 + +static int +parser_read_escape(struct parser_params *parser, int flags, + rb_encoding **encp) +{ + int c; + int numlen; + + switch (c = nextc()) { + case '\\': /* Backslash */ + return c; + + case 'n': /* newline */ + return '\n'; + + case 't': /* horizontal tab */ + return '\t'; + + case 'r': /* carriage-return */ + return '\r'; + + case 'f': /* form-feed */ + return '\f'; + + case 'v': /* vertical tab */ + return '\13'; + + case 'a': /* alarm(bell) */ + return '\007'; + + case 'e': /* escape */ + return 033; + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + + pushback(c); + c = scan_oct(lex_p, 3, &numlen); + lex_p += numlen; + } + return c; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + c = tok_hex(&numlen); + if (numlen == 0) return 0; + return c; + + case 'b': /* backspace */ + return '\010'; + + case 's': /* space */ + return ' '; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + if ((c = nextc()) == '\\') { + return read_escape(flags|ESCAPE_META, encp) | 0x80; + } + else if (c == -1 || !ISASCII(c)) goto eof; + else { + return ((c & 0xff) | 0x80); + } + + case 'C': + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc())== '\\') { + c = read_escape(flags|ESCAPE_CONTROL, encp); + } + else if (c == '?') + return 0177; + else if (c == -1 || !ISASCII(c)) goto eof; + return c & 0x9f; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return '\0'; + + default: + return c; + } +} + +static void +parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) +{ + int len = rb_enc_codelen(c, enc); + rb_enc_mbcput(c, tokspace(len), enc); +} + +static int +parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) +{ + int c; + int flags = 0; + + first: + switch (c = nextc()) { + case '\n': + return 0; /* just ignore */ + + case '0': case '1': case '2': case '3': /* octal constant */ + case '4': case '5': case '6': case '7': + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int oct; + + oct = scan_oct(--lex_p, 3, &numlen); + if (numlen == 0) goto eof; + lex_p += numlen; + tokcopy(numlen + 1); + } + return 0; + + case 'x': /* hex constant */ + if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; + { + int numlen; + int hex; + + hex = tok_hex(&numlen); + if (numlen == 0) goto eof; + tokcopy(numlen + 2); + } + return 0; + + case 'M': + if (flags & ESCAPE_META) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + flags |= ESCAPE_META; + goto escaped; + + case 'C': + if (flags & ESCAPE_CONTROL) goto eof; + if ((c = nextc()) != '-') { + pushback(c); + goto eof; + } + tokcopy(3); + goto escaped; + + case 'c': + if (flags & ESCAPE_CONTROL) goto eof; + tokcopy(2); + flags |= ESCAPE_CONTROL; + escaped: + if ((c = nextc()) == '\\') { + goto first; + } + else if (c == -1) goto eof; + tokadd(c); + return 0; + + eof: + case -1: + yyerror("Invalid escape character syntax"); + return -1; + + default: + tokadd('\\'); + tokadd(c); + } + return 0; +} + +extern int rb_char_to_option_kcode(int c, int *option, int *kcode); + +static int +parser_regx_options(struct parser_params *parser) +{ + int kcode = 0; + int options = 0; + int c, opt, kc; + + newtok(); + while (c = nextc(), ISALPHA(c)) { + if (c == 'o') { + options |= RE_OPTION_ONCE; + } + else if (rb_char_to_option_kcode(c, &opt, &kc)) { + options |= opt; + if (kc >= 0) kcode = c; + } + else { + tokadd(c); + } + } + pushback(c); + if (toklen()) { + tokfix(); + compile_error(PARSER_ARG "unknown regexp option%s - %s", + toklen() > 1 ? "s" : "", tok()); + } + return options | RE_OPTION_ENCODING(kcode); +} + +static void +dispose_string(VALUE str) +{ + /* TODO: should use another API? */ + if (RBASIC(str)->flags & RSTRING_NOEMBED) + xfree(RSTRING_PTR(str)); + rb_gc_force_recycle(str); +} + +static int +parser_tokadd_mbchar(struct parser_params *parser, int c) +{ + int len = parser_precise_mbclen(); + if (!MBCLEN_CHARFOUND_P(len)) { + compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); + return -1; + } + tokadd(c); + lex_p += --len; + if (len > 0) tokcopy(len); + return c; +} + +#define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) + +static int +parser_tokadd_string(struct parser_params *parser, + int func, int term, int paren, long *nest, + rb_encoding **encp) +{ + int c; + int has_nonascii = 0; + rb_encoding *enc = *encp; + char *errbuf = 0; + static const char mixed_msg[] = "%s mixed within %s source"; + +#define mixed_error(enc1, enc2) if (!errbuf) { \ + int len = sizeof(mixed_msg) - 4; \ + len += strlen(rb_enc_name(enc1)); \ + len += strlen(rb_enc_name(enc2)); \ + errbuf = ALLOCA_N(char, len); \ + snprintf(errbuf, len, mixed_msg, \ + rb_enc_name(enc1), \ + rb_enc_name(enc2)); \ + yyerror(errbuf); \ + } +#define mixed_escape(beg, enc1, enc2) do { \ + const char *pos = lex_p; \ + lex_p = beg; \ + mixed_error(enc1, enc2); \ + lex_p = pos; \ + } while (0) + + while ((c = nextc()) != -1) { + if (paren && c == paren) { + ++*nest; + } + else if (c == term) { + if (!nest || !*nest) { + pushback(c); + break; + } + --*nest; + } + else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { + int c2 = *lex_p; + if (c2 == '$' || c2 == '@' || c2 == '{') { + pushback(c); + break; + } + } + else if (c == '\\') { + const char *beg = lex_p - 1; + c = nextc(); + switch (c) { + case '\n': + if (func & STR_FUNC_QWORDS) break; + if (func & STR_FUNC_EXPAND) continue; + tokadd('\\'); + break; + + case '\\': + if (func & STR_FUNC_ESCAPE) tokadd(c); + break; + + case 'u': + if ((func & STR_FUNC_EXPAND) == 0) { + tokadd('\\'); + break; + } + parser_tokadd_utf8(parser, &enc, 1, + func & STR_FUNC_SYMBOL, + func & STR_FUNC_REGEXP); + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + + default: + if (func & STR_FUNC_REGEXP) { + pushback(c); + if ((c = tokadd_escape(&enc)) < 0) + return -1; + if (has_nonascii && enc != *encp) { + mixed_escape(beg, enc, *encp); + } + continue; + } + else if (func & STR_FUNC_EXPAND) { + pushback(c); + if (func & STR_FUNC_ESCAPE) tokadd('\\'); + c = read_escape(0, &enc); + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + /* ignore backslashed spaces in %w */ + } + else if (c != term && !(paren && c == paren)) { + tokadd('\\'); + } + } + } + else if (!parser_isascii()) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + if (tokadd_mbchar(c) == -1) return -1; + continue; + } + else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + pushback(c); + break; + } + if (!c && (func & STR_FUNC_SYMBOL)) { + func &= ~STR_FUNC_SYMBOL; + compile_error(PARSER_ARG "symbol cannot contain '\\0'"); + continue; + } + if (c & 0x80) { + has_nonascii = 1; + if (enc != *encp) { + mixed_error(enc, *encp); + continue; + } + } + tokadd(c); + } + *encp = enc; + return c; +} + +#define NEW_STRTERM(func, term, paren) \ + rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) + +static int +parser_parse_string(struct parser_params *parser, NODE *quote) +{ + int func = quote->nd_func; + int term = nd_term(quote); + int paren = nd_paren(quote); + int c, space = 0; + rb_encoding *enc = parser->enc; + + if (func == -1) return tSTRING_END; + c = nextc(); + if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { + do {c = nextc();} while (ISSPACE(c)); + space = 1; + } + if (c == term && !quote->nd_nest) { + if (func & STR_FUNC_QWORDS) { + quote->nd_func = -1; + return ' '; + } + if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; + set_yylval_num(regx_options()); + return tREGEXP_END; + } + if (space) { + pushback(c); + return ' '; + } + newtok(); + if ((func & STR_FUNC_EXPAND) && c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + pushback(c); + if (tokadd_string(func, term, paren, "e->nd_nest, + &enc) == -1) { + ruby_sourceline = nd_line(quote); + if (func & STR_FUNC_REGEXP) { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated regexp meets end of file"); + return tREGEXP_END; + } + else { + if (parser->eofp) + compile_error(PARSER_ARG "unterminated string meets end of file"); + return tSTRING_END; + } + } + + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; +} + +static int +parser_heredoc_identifier(struct parser_params *parser) +{ + int c = nextc(), term, func = 0, len; + + if (c == '-') { + c = nextc(); + func = STR_FUNC_INDENT; + } + switch (c) { + case '\'': + func |= str_squote; goto quoted; + case '"': + func |= str_dquote; goto quoted; + case '`': + func |= str_xquote; + quoted: + newtok(); + tokadd(func); + term = c; + while ((c = nextc()) != -1 && c != term) { + if (tokadd_mbchar(c) == -1) return 0; + } + if (c == -1) { + compile_error(PARSER_ARG "unterminated here document identifier"); + return 0; + } + break; + + default: + if (!parser_is_identchar()) { + pushback(c); + if (func & STR_FUNC_INDENT) { + pushback('-'); + } + return 0; + } + newtok(); + term = '"'; + tokadd(func |= str_dquote); + do { + if (tokadd_mbchar(c) == -1) return 0; + } while ((c = nextc()) != -1 && parser_is_identchar()); + pushback(c); + break; + } + + tokfix(); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tHEREDOC_BEG); +#endif + len = lex_p - lex_pbeg; + lex_goto_eol(parser); + lex_strterm = rb_node_newnode(NODE_HEREDOC, + STR_NEW(tok(), toklen()), /* nd_lit */ + len, /* nd_nth */ + lex_lastline); /* nd_orig */ + nd_set_line(lex_strterm, ruby_sourceline); +#ifdef RIPPER + ripper_flush(parser); +#endif + return term == '`' ? tXSTRING_BEG : tSTRING_BEG; +} + +static void +parser_heredoc_restore(struct parser_params *parser, NODE *here) +{ + VALUE line; + +#ifdef RIPPER + if (!NIL_P(parser->delayed)) + ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tHEREDOC_END); +#endif + line = here->nd_orig; + lex_lastline = line; + lex_pbeg = RSTRING_PTR(line); + lex_pend = lex_pbeg + RSTRING_LEN(line); + lex_p = lex_pbeg + here->nd_nth; + heredoc_end = ruby_sourceline; + ruby_sourceline = nd_line(here); + dispose_string(here->nd_lit); + rb_gc_force_recycle((VALUE)here); +#ifdef RIPPER + ripper_flush(parser); +#endif +} + +static int +parser_whole_match_p(struct parser_params *parser, + const char *eos, int len, int indent) +{ + const char *p = lex_pbeg; + int n; + + if (indent) { + while (*p && ISSPACE(*p)) p++; + } + n= lex_pend - (p + len); + if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse; + if (strncmp(eos, p, len) == 0) return Qtrue; + return Qfalse; +} + +static int +parser_here_document(struct parser_params *parser, NODE *here) +{ + int c, func, indent = 0; + const char *eos, *p, *pend; + long len; + VALUE str = 0; + + eos = RSTRING_PTR(here->nd_lit); + len = RSTRING_LEN(here->nd_lit) - 1; + indent = (func = *eos++) & STR_FUNC_INDENT; + + if ((c = nextc()) == -1) { + error: + compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); + restore: + heredoc_restore(lex_strterm); + lex_strterm = 0; + return 0; + } + if (was_bol() && whole_match_p(eos, len, indent)) { + heredoc_restore(lex_strterm); + return tSTRING_END; + } + + if (!(func & STR_FUNC_EXPAND)) { + do { + p = RSTRING_PTR(lex_lastline); + pend = lex_pend; + if (pend > p) { + switch (pend[-1]) { + case '\n': + if (--pend == p || pend[-1] != '\r') { + pend++; + break; + } + case '\r': + --pend; + } + } + if (str) + rb_str_cat(str, p, pend - p); + else + str = STR_NEW(p, pend - p); + if (pend < lex_pend) rb_str_cat(str, "\n", 1); + lex_goto_eol(parser); + if (nextc() == -1) { + if (str) dispose_string(str); + goto error; + } + } while (!whole_match_p(eos, len, indent)); + } + else { + /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ + rb_encoding *enc = parser->enc; + newtok(); + if (c == '#') { + switch (c = nextc()) { + case '$': + case '@': + pushback(c); + return tSTRING_DVAR; + case '{': + return tSTRING_DBEG; + } + tokadd('#'); + } + do { + pushback(c); + if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { + if (parser->eofp) goto error; + goto restore; + } + if (c != '\n') { + set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); + return tSTRING_CONTENT; + } + tokadd(nextc()); + /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ + if ((c = nextc()) == -1) goto error; + } while (!whole_match_p(eos, len, indent)); + str = STR_NEW3(tok(), toklen(), enc, func); + } + heredoc_restore(lex_strterm); + lex_strterm = NEW_STRTERM(-1, 0, 0); + set_yylval_str(str); + return tSTRING_CONTENT; +} + +#include "lex.c" + +#ifndef RIPPER +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + rb_warning0("ambiguous first argument; put parentheses or even spaces"); +} +#else +static void +arg_ambiguous_gen(struct parser_params *parser) +{ + dispatch0(arg_ambiguous); +} +#endif +#define arg_ambiguous() arg_ambiguous_gen(parser) + +static int +lvar_defined_gen(struct parser_params *parser, ID id) +{ +#ifndef RIPPER + return (dyna_in_block() && dvar_defined(id)) || local_id(id); +#else + return 0; +#endif +} + +/* emacsen -*- hack */ +static int +parser_encode_length(struct parser_params *parser, const char *name, int len) +{ + int nlen; + + if (len > 5 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) + return nlen; + } + if (len > 4 && name[nlen = len - 5] == '-') { + if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) + return nlen; + if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) + return nlen; + } + return len; +} + +static void +parser_set_encode(struct parser_params *parser, const char *name) +{ + int idx = rb_enc_find_index(name); + rb_encoding *enc; + + if (idx < 0) { + rb_raise(rb_eArgError, "unknown encoding name: %s", name); + } + enc = rb_enc_from_index(idx); + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eArgError, "%s is not ASCII compatible", rb_enc_name(enc)); + } + parser->enc = enc; +} + +static int +comment_at_top(struct parser_params *parser) +{ + const char *p = lex_pbeg, *pend = lex_p - 1; + if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; + while (p < pend) { + if (!ISSPACE(*p)) return 0; + p++; + } + return 1; +} + +#ifndef RIPPER +typedef int (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, int len); +typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); + +static void +magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) +{ + if (!comment_at_top(parser)) { + rb_warning("encoding '%s' is ignored, valid only in the first line except for shebang line.", + val); + return; + } + parser_set_encode(parser, val); +} + +struct magic_comment { + const char *name; + rb_magic_comment_setter_t func; + rb_magic_comment_length_t length; +}; + +static const struct magic_comment magic_comments[] = { + {"coding", magic_comment_encoding, parser_encode_length}, + {"encoding", magic_comment_encoding, parser_encode_length}, +}; +#endif + +static const char * +magic_comment_marker(const char *str, int len) +{ + int i = 2; + + while (i < len) { + switch (str[i]) { + case '-': + if (str[i-1] == '*' && str[i-2] == '-') { + return str + i + 1; + } + i += 2; + break; + case '*': + if (i + 1 >= len) return 0; + if (str[i+1] != '-') { + i += 4; + } + else if (str[i-1] != '-') { + i += 2; + } + else { + return str + i + 2; + } + break; + default: + i += 3; + break; + } + } + return 0; +} + +static int +parser_magic_comment(struct parser_params *parser, const char *str, int len) +{ + VALUE name = 0, val = 0; + const char *beg, *end, *vbeg, *vend; +#define str_copy(_s, _p, _n) ((_s) \ + ? (rb_str_resize((_s), (_n)), \ + MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ + : ((_s) = STR_NEW((_p), (_n)))) + + if (len <= 7) return Qfalse; + if (!(beg = magic_comment_marker(str, len))) return Qfalse; + if (!(end = magic_comment_marker(beg, str + len - beg))) return Qfalse; + str = beg; + len = end - beg - 3; + + /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ + while (len > 0) { +#ifndef RIPPER + const struct magic_comment *p = magic_comments; +#endif + char *s; + int i, n = 0; + + for (; len > 0 && *str; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + continue; + } + if (!ISSPACE(*str)) break; + } + for (beg = str; len > 0; str++, --len) { + switch (*str) { + case '\'': case '"': case ':': case ';': + break; + default: + if (ISSPACE(*str)) break; + continue; + } + break; + } + for (end = str; len > 0 && ISSPACE(*str); str++, --len); + if (!len) break; + if (*str != ':') continue; + + do str++; while (--len > 0 && ISSPACE(*str)); + if (!len) break; + if (*str == '"') { + for (vbeg = ++str; --len > 0 && *str != '"'; str++) { + if (*str == '\\') { + --len; + ++str; + } + } + vend = str; + if (len) { + --len; + ++str; + } + } + else { + for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); + vend = str; + } + while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; + + n = end - beg; + str_copy(name, beg, n); + s = RSTRING_PTR(name); + for (i = 0; i < n; ++i) { + if (*s == '-') *s = '_'; + } +#ifndef RIPPER + do { + if (STRNCASECMP(p->name, s, n) == 0) { + n = vend - vbeg; + if (p->length) { + n = (*p->length)(parser, vbeg, n); + } + str_copy(val, vbeg, n); + (*p->func)(parser, s, RSTRING_PTR(val)); + break; + } + } while (++p < magic_comments + sizeof(magic_comments) / sizeof(*p)); +#else + dispatch2(magic_comment, name, val); +#endif + } + + return Qtrue; +} + +static void +set_file_encoding(struct parser_params *parser, const char *str, const char *send) +{ + int sep = 0; + const char *beg = str; + VALUE s; + + for (;;) { + if (send - str <= 6) return; + switch (str[6]) { + case 'C': case 'c': str += 6; continue; + case 'O': case 'o': str += 5; continue; + case 'D': case 'd': str += 4; continue; + case 'I': case 'i': str += 3; continue; + case 'N': case 'n': str += 2; continue; + case 'G': case 'g': str += 1; continue; + case '=': case ':': + sep = 1; + str += 6; + break; + default: + str += 6; + if (ISSPACE(*str)) break; + continue; + } + if (STRNCASECMP(str-6, "coding", 6) == 0) break; + } + for (;;) { + do { + if (++str >= send) return; + } while (ISSPACE(*str)); + if (sep) break; + if (*str != '=' && *str != ':') return; + sep = 1; + str++; + } + beg = str; + while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); + s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); + parser_set_encode(parser, RSTRING_PTR(s)); + rb_str_resize(s, 0); +} + +static void +parser_prepare(struct parser_params *parser) +{ + int c = nextc(); + switch (c) { + case '#': + if (peek('!')) parser->has_shebang = 1; + break; + case 0xef: /* UTF-8 BOM marker */ + if (lex_pend - lex_p >= 2 && + (unsigned char)lex_p[0] == 0xbb && + (unsigned char)lex_p[1] == 0xbf) { + parser->enc = rb_utf8_encoding(); + lex_p += 2; + lex_pbeg = lex_p; + return; + } + break; + case EOF: + return; + } + pushback(c); + parser->enc = rb_enc_get(lex_lastline); +} + +#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) +#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) + +static int +parser_yylex(struct parser_params *parser) +{ + register int c; + int space_seen = 0; + int cmd_state; + enum lex_state_e last_state; + rb_encoding *enc; + int mb; +#ifdef RIPPER + int fallthru = Qfalse; +#endif + + if (lex_strterm) { + int token; + if (nd_type(lex_strterm) == NODE_HEREDOC) { + token = here_document(lex_strterm); + if (token == tSTRING_END) { + lex_strterm = 0; + lex_state = EXPR_END; + } + } + else { + token = parse_string(lex_strterm); + if (token == tSTRING_END || token == tREGEXP_END) { + rb_gc_force_recycle((VALUE)lex_strterm); + lex_strterm = 0; + lex_state = EXPR_END; + } + } + return token; + } + cmd_state = command_start; + command_start = Qfalse; + retry: + switch (c = nextc()) { + case '\0': /* NUL */ + case '\004': /* ^D */ + case '\032': /* ^Z */ + case -1: /* end of script. */ + return 0; + + /* white spaces */ + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; +#ifdef RIPPER + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + break; + default: + goto outofloop; + } + } + outofloop: + pushback(c); + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; + + case '#': /* it's a comment */ + /* no magic_comment in shebang line */ + if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { + if (comment_at_top(parser)) { + set_file_encoding(parser, lex_p, lex_pend); + } + } + lex_p = lex_pend; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tCOMMENT); + fallthru = Qtrue; +#endif + /* fall through */ + case '\n': + switch (lex_state) { + case EXPR_BEG: + case EXPR_FNAME: + case EXPR_DOT: + case EXPR_CLASS: + case EXPR_VALUE: +#ifdef RIPPER + if (!fallthru) { + ripper_dispatch_scan_event(parser, tIGNORED_NL); + } + fallthru = Qfalse; +#endif + goto retry; + default: + break; + } + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; + break; + case '.': { + if ((c = nextc()) != '.') { + pushback(c); + pushback('.'); + goto retry; + } + } + default: + --ruby_sourceline; + lex_nextline = lex_lastline; + case -1: /* EOF no decrement*/ + lex_goto_eol(parser); +#ifdef RIPPER + if (c != -1) { + parser->tokp = lex_p; + } +#endif + goto normal_newline; + } + } + normal_newline: + command_start = Qtrue; + lex_state = EXPR_BEG; + return '\n'; + + case '*': + if ((c = nextc()) == '*') { + if ((c = nextc()) == '=') { + set_yylval_id(tPOW); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + c = tPOW; + } + else { + if (c == '=') { + set_yylval_id('*'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`*' interpreted as argument prefix"); + c = tSTAR; + } + else if (IS_BEG()) { + c = tSTAR; + } + else { + c = '*'; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return c; + + case '!': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return '!'; + } + } + else { + lex_state = EXPR_BEG; + } + if (c == '=') { + return tNEQ; + } + if (c == '~') { + return tNMATCH; + } + pushback(c); + return '!'; + + case '=': + if (was_bol()) { + /* skip embedded rd document */ + if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { +#ifdef RIPPER + int first_p = Qtrue; + + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, tEMBDOC_BEG); +#endif + for (;;) { + lex_goto_eol(parser); +#ifdef RIPPER + if (!first_p) { + ripper_dispatch_scan_event(parser, tEMBDOC); + } + first_p = Qfalse; +#endif + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "embedded document meets end of file"); + return 0; + } + if (c != '=') continue; + if (strncmp(lex_p, "end", 3) == 0 && + (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { + break; + } + } + lex_goto_eol(parser); +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tEMBDOC_END); +#endif + goto retry; + } + } + + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + if ((c = nextc()) == '=') { + return tEQQ; + } + pushback(c); + return tEQ; + } + if (c == '~') { + return tMATCH; + } + else if (c == '>') { + return tASSOC; + } + pushback(c); + return '='; + + case '<': + c = nextc(); + if (c == '<' && + lex_state != EXPR_END && + lex_state != EXPR_DOT && + lex_state != EXPR_ENDARG && + lex_state != EXPR_CLASS && + (!IS_ARG() || space_seen)) { + int token = heredoc_identifier(); + if (token) return token; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if (c == '=') { + if ((c = nextc()) == '>') { + return tCMP; + } + pushback(c); + return tLEQ; + } + if (c == '<') { + if ((c = nextc()) == '=') { + set_yylval_id(tLSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tLSHFT; + } + pushback(c); + return '<'; + + case '>': + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + if ((c = nextc()) == '=') { + return tGEQ; + } + if (c == '>') { + if ((c = nextc()) == '=') { + set_yylval_id(tRSHFT); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tRSHFT; + } + pushback(c); + return '>'; + + case '"': + lex_strterm = NEW_STRTERM(str_dquote, '"', 0); + return tSTRING_BEG; + + case '`': + if (lex_state == EXPR_FNAME) { + lex_state = EXPR_END; + return c; + } + if (lex_state == EXPR_DOT) { + if (cmd_state) + lex_state = EXPR_CMDARG; + else + lex_state = EXPR_ARG; + return c; + } + lex_strterm = NEW_STRTERM(str_xquote, '`', 0); + return tXSTRING_BEG; + + case '\'': + lex_strterm = NEW_STRTERM(str_squote, '\'', 0); + return tSTRING_BEG; + + case '?': + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG) { + lex_state = EXPR_VALUE; + return '?'; + } + c = nextc(); + if (c == -1) { + compile_error(PARSER_ARG "incomplete character syntax"); + return 0; + } + if (rb_enc_isspace(c, parser->enc)) { + if (!IS_ARG()) { + int c2 = 0; + switch (c) { + case ' ': + c2 = 's'; + break; + case '\n': + c2 = 'n'; + break; + case '\t': + c2 = 't'; + break; + case '\v': + c2 = 'v'; + break; + case '\r': + c2 = 'r'; + break; + case '\f': + c2 = 'f'; + break; + } + if (c2) { + rb_warnI("invalid character syntax; use ?\\%c", c2); + } + } + ternary: + pushback(c); + lex_state = EXPR_VALUE; + return '?'; + } + newtok(); + enc = parser->enc; + if (!parser_isascii()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && + lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { + goto ternary; + } + else if (c == '\\') { + if (peek('u')) { + nextc(); + c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); + if (0x80 <= c) { + tokaddmbc(c, enc); + } + else { + tokadd(c); + } + } + else { + c = read_escape(0, &enc); + tokadd(c); + } + } + else { + tokadd(c); + } + tokfix(); + set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); + lex_state = EXPR_END; + return tCHAR; + + case '&': + if ((c = nextc()) == '&') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tANDOP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tANDOP; + } + else if (c == '=') { + set_yylval_id('&'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen && !ISSPACE(c)) { + rb_warning0("`&' interpreted as argument prefix"); + c = tAMPER; + } + else if (IS_BEG()) { + c = tAMPER; + } + else { + c = '&'; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; + } + return c; + + case '|': + if ((c = nextc()) == '|') { + lex_state = EXPR_BEG; + if ((c = nextc()) == '=') { + set_yylval_id(tOROP); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + return tOROP; + } + if (c == '=') { + set_yylval_id('|'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + pushback(c); + return '|'; + + case '+': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUPLUS; + } + pushback(c); + return '+'; + } + if (c == '=') { + set_yylval_id('+'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + c = '+'; + goto start_num; + } + return tUPLUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '+'; + + case '-': + c = nextc(); + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if (c == '@') { + return tUMINUS; + } + pushback(c); + return '-'; + } + if (c == '=') { + set_yylval_id('-'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (c == '>') { + lex_state = EXPR_ARG; + return tLAMBDA; + } + if (IS_BEG() || + (IS_ARG() && space_seen && !ISSPACE(c))) { + if (IS_ARG()) arg_ambiguous(); + lex_state = EXPR_BEG; + pushback(c); + if (c != -1 && ISDIGIT(c)) { + return tUMINUS_NUM; + } + return tUMINUS; + } + lex_state = EXPR_BEG; + pushback(c); + return '-'; + + case '.': + lex_state = EXPR_BEG; + if ((c = nextc()) == '.') { + if ((c = nextc()) == '.') { + return tDOT3; + } + pushback(c); + return tDOT2; + } + pushback(c); + if (c != -1 && ISDIGIT(c)) { + yyerror("no . floating literal anymore; put 0 before dot"); + } + lex_state = EXPR_DOT; + return '.'; + + start_num: + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + int is_float, seen_point, seen_e, nondigit; + + is_float = seen_point = seen_e = nondigit = 0; + lex_state = EXPR_END; + newtok(); + if (c == '-' || c == '+') { + tokadd(c); + c = nextc(); + } + if (c == '0') { + int start = toklen(); + c = nextc(); + if (c == 'x' || c == 'X') { + /* hexadecimal */ + c = nextc(); + if (c != -1 && ISXDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISXDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse)); + return tINTEGER; + } + if (c == 'b' || c == 'B') { + /* binary */ + c = nextc(); + if (c == '0' || c == '1') { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c != '0' && c != '1') break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse)); + return tINTEGER; + } + if (c == 'd' || c == 'D') { + /* decimal */ + c = nextc(); + if (c != -1 && ISDIGIT(c)) { + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (!ISDIGIT(c)) break; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + } + pushback(c); + tokfix(); + if (toklen() == start) { + yyerror("numeric literal without digits"); + } + else if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + if (c == '_') { + /* 0_0 */ + goto octal_number; + } + if (c == 'o' || c == 'O') { + /* prefixed octal */ + c = nextc(); + if (c == -1 || c == '_' || !ISDIGIT(c)) { + yyerror("numeric literal without digits"); + } + } + if (c >= '0' && c <= '7') { + /* octal */ + octal_number: + do { + if (c == '_') { + if (nondigit) break; + nondigit = c; + continue; + } + if (c < '0' || c > '9') break; + if (c > '7') goto invalid_octal; + nondigit = 0; + tokadd(c); + } while ((c = nextc()) != -1); + if (toklen() > start) { + pushback(c); + tokfix(); + if (nondigit) goto trailing_uc; + set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse)); + return tINTEGER; + } + if (nondigit) { + pushback(c); + goto trailing_uc; + } + } + if (c > '7' && c <= '9') { + invalid_octal: + yyerror("Invalid octal digit"); + } + else if (c == '.' || c == 'e' || c == 'E') { + tokadd('0'); + } + else { + pushback(c); + set_yylval_literal(INT2FIX(0)); + return tINTEGER; + } + } + + for (;;) { + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + nondigit = 0; + tokadd(c); + break; + + case '.': + if (nondigit) goto trailing_uc; + if (seen_point || seen_e) { + goto decode_num; + } + else { + int c0 = nextc(); + if (c == -1 || !ISDIGIT(c0)) { + pushback(c0); + goto decode_num; + } + c = c0; + } + tokadd('.'); + tokadd(c); + is_float++; + seen_point++; + nondigit = 0; + break; + + case 'e': + case 'E': + if (nondigit) { + pushback(c); + c = nondigit; + goto decode_num; + } + if (seen_e) { + goto decode_num; + } + tokadd(c); + seen_e++; + is_float++; + nondigit = c; + c = nextc(); + if (c != '-' && c != '+') continue; + tokadd(c); + nondigit = c; + break; + + case '_': /* `_' in number just ignored */ + if (nondigit) goto decode_num; + nondigit = c; + break; + + default: + goto decode_num; + } + c = nextc(); + } + + decode_num: + pushback(c); + tokfix(); + if (nondigit) { + char tmp[30]; + trailing_uc: + sprintf(tmp, "trailing `%c' in number", nondigit); + yyerror(tmp); + } + if (is_float) { + double d = strtod(tok(), 0); + if (errno == ERANGE) { + rb_warningS("Float %s out of range", tok()); + errno = 0; + } + set_yylval_literal(DBL2NUM(d)); + return tFLOAT; + } + set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse)); + return tINTEGER; + } + + case ')': + case ']': + paren_nest--; + case '}': + COND_LEXPOP(); + CMDARG_LEXPOP(); + if (c == ')') + lex_state = EXPR_END; + else + lex_state = EXPR_ENDARG; + return c; + + case ':': + c = nextc(); + if (c == ':') { + if (IS_BEG() || + lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) { + lex_state = EXPR_BEG; + return tCOLON3; + } + lex_state = EXPR_DOT; + return tCOLON2; + } + if (lex_state == EXPR_END || lex_state == EXPR_ENDARG || (c != -1 && ISSPACE(c))) { + pushback(c); + lex_state = EXPR_BEG; + return ':'; + } + switch (c) { + case '\'': + lex_strterm = NEW_STRTERM(str_ssym, c, 0); + break; + case '"': + lex_strterm = NEW_STRTERM(str_dsym, c, 0); + break; + default: + pushback(c); + break; + } + lex_state = EXPR_FNAME; + return tSYMBEG; + + case '/': + if (IS_BEG()) { + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + if ((c = nextc()) == '=') { + set_yylval_id('/'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + pushback(c); + if (IS_ARG() && space_seen) { + if (!ISSPACE(c)) { + arg_ambiguous(); + lex_strterm = NEW_STRTERM(str_regexp, '/', 0); + return tREGEXP_BEG; + } + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + return '/'; + + case '^': + if ((c = nextc()) == '=') { + set_yylval_id('^'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '^'; + + case ';': + lex_state = EXPR_BEG; + command_start = Qtrue; + return ';'; + + case ',': + lex_state = EXPR_BEG; + return ','; + + case '~': + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + if ((c = nextc()) != '@') { + pushback(c); + } + lex_state = EXPR_ARG; + } + else { + lex_state = EXPR_BEG; + } + return '~'; + + case '(': + if (IS_BEG()) { + c = tLPAREN; + } + else if (space_seen) { + if (IS_ARG()) { + c = tLPAREN_ARG; + } + } + paren_nest++; + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + return c; + + case '[': + paren_nest++; + if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { + lex_state = EXPR_ARG; + if ((c = nextc()) == ']') { + if ((c = nextc()) == '=') { + return tASET; + } + pushback(c); + return tAREF; + } + pushback(c); + return '['; + } + else if (IS_BEG()) { + c = tLBRACK; + } + else if (IS_ARG() && space_seen) { + c = tLBRACK; + } + lex_state = EXPR_BEG; + COND_PUSH(0); + CMDARG_PUSH(0); + return c; + + case '{': + if (lpar_beg && lpar_beg == paren_nest) { + lex_state = EXPR_BEG; + lpar_beg = 0; + --paren_nest; + return tLAMBEG; + } + if (IS_ARG() || lex_state == EXPR_END) + c = '{'; /* block (primary) */ + else if (lex_state == EXPR_ENDARG) + c = tLBRACE_ARG; /* block (expr) */ + else + c = tLBRACE; /* hash */ + COND_PUSH(0); + CMDARG_PUSH(0); + lex_state = EXPR_BEG; + if (c != tLBRACE) command_start = Qtrue; + return c; + + case '\\': + c = nextc(); + if (c == '\n') { + space_seen = 1; +#ifdef RIPPER + ripper_dispatch_scan_event(parser, tSP); +#endif + goto retry; /* skip \\n */ + } + pushback(c); + return '\\'; + + case '%': + if (IS_BEG()) { + int term; + int paren; + + c = nextc(); + quotation: + if (c == -1 || !ISALNUM(c)) { + term = c; + c = 'Q'; + } + else { + term = nextc(); + if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { + yyerror("unknown type of %string"); + return 0; + } + } + if (c == -1 || term == -1) { + compile_error(PARSER_ARG "unterminated quoted string meets end of file"); + return 0; + } + paren = term; + if (term == '(') term = ')'; + else if (term == '[') term = ']'; + else if (term == '{') term = '}'; + else if (term == '<') term = '>'; + else paren = 0; + + switch (c) { + case 'Q': + lex_strterm = NEW_STRTERM(str_dquote, term, paren); + return tSTRING_BEG; + + case 'q': + lex_strterm = NEW_STRTERM(str_squote, term, paren); + return tSTRING_BEG; + + case 'W': + lex_strterm = NEW_STRTERM(str_dword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tWORDS_BEG; + + case 'w': + lex_strterm = NEW_STRTERM(str_sword, term, paren); + do {c = nextc();} while (ISSPACE(c)); + pushback(c); + return tQWORDS_BEG; + + case 'x': + lex_strterm = NEW_STRTERM(str_xquote, term, paren); + return tXSTRING_BEG; + + case 'r': + lex_strterm = NEW_STRTERM(str_regexp, term, paren); + return tREGEXP_BEG; + + case 's': + lex_strterm = NEW_STRTERM(str_ssym, term, paren); + lex_state = EXPR_FNAME; + return tSYMBEG; + + default: + yyerror("unknown type of %string"); + return 0; + } + } + if ((c = nextc()) == '=') { + set_yylval_id('%'); + lex_state = EXPR_BEG; + return tOP_ASGN; + } + if (IS_ARG() && space_seen && !ISSPACE(c)) { + goto quotation; + } + switch (lex_state) { + case EXPR_FNAME: case EXPR_DOT: + lex_state = EXPR_ARG; break; + default: + lex_state = EXPR_BEG; break; + } + pushback(c); + return '%'; + + case '$': + last_state = lex_state; + lex_state = EXPR_END; + newtok(); + c = nextc(); + switch (c) { + case '_': /* $_: last read line string */ + c = nextc(); + if (parser_is_identchar()) { + tokadd('$'); + tokadd('_'); + break; + } + pushback(c); + c = '_'; + /* fall through */ + case '~': /* $~: match-data */ + case '*': /* $*: argv */ + case '$': /* $$: pid */ + case '?': /* $?: last status */ + case '!': /* $!: error string */ + case '@': /* $@: error position */ + case '/': /* $/: input record separator */ + case '\\': /* $\: output record separator */ + case ';': /* $;: field separator */ + case ',': /* $,: output field separator */ + case '.': /* $.: last read line number */ + case '=': /* $=: ignorecase */ + case ':': /* $:: load path */ + case '<': /* $<: reading filename */ + case '>': /* $>: default output handle */ + case '\"': /* $": already loaded files */ + tokadd('$'); + tokadd(c); + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '-': + tokadd('$'); + tokadd(c); + c = nextc(); + if (parser_is_identchar()) { + if (tokadd_mbchar(c) == -1) return 0; + } + else { + pushback(c); + } + gvar: + tokfix(); + set_yylval_id(rb_intern(tok())); + return tGVAR; + + case '&': /* $&: last match */ + case '`': /* $`: string before last match */ + case '\'': /* $': string after last match */ + case '+': /* $+: string matches last paren. */ + if (last_state == EXPR_FNAME) { + tokadd('$'); + tokadd(c); + goto gvar; + } + set_yylval_node(NEW_BACK_REF(c)); + return tBACK_REF; + + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': case '8': case '9': + tokadd('$'); + do { + tokadd(c); + c = nextc(); + } while (c != -1 && ISDIGIT(c)); + pushback(c); + if (last_state == EXPR_FNAME) goto gvar; + tokfix(); + set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); + return tNTH_REF; + + default: + if (!parser_is_identchar()) { + pushback(c); + return '$'; + } + case '0': + tokadd('$'); + } + break; + + case '@': + c = nextc(); + newtok(); + tokadd('@'); + if (c == '@') { + tokadd('@'); + c = nextc(); + } + if (c != -1 && ISDIGIT(c)) { + if (tokidx == 1) { + compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); + } + else { + compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); + } + return 0; + } + if (!parser_is_identchar()) { + pushback(c); + return '@'; + } + break; + + case '_': + if (was_bol() && whole_match_p("__END__", 7, 0)) { + ruby__end__seen = 1; + parser->eofp = Qtrue; +#ifndef RIPPER + return -1; +#else + lex_goto_eol(parser); + ripper_dispatch_scan_event(parser, k__END__); + return 0; +#endif + } + newtok(); + break; + + default: + if (!parser_is_identchar()) { + rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); + goto retry; + } + + newtok(); + break; + } + + mb = ENC_CODERANGE_7BIT; + do { + if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; + if (tokadd_mbchar(c) == -1) return 0; + c = nextc(); + } while (parser_is_identchar()); + switch (tok()[0]) { + case '@': case '$': + pushback(c); + break; + default: + if ((c == '!' || c == '?') && !peek('=')) { + tokadd(c); + } + else { + pushback(c); + } + } + tokfix(); + + { + int result = 0; + + last_state = lex_state; + switch (tok()[0]) { + case '$': + lex_state = EXPR_END; + result = tGVAR; + break; + case '@': + lex_state = EXPR_END; + if (tok()[1] == '@') + result = tCVAR; + else + result = tIVAR; + break; + + default: + if (toklast() == '!' || toklast() == '?') { + result = tFID; + } + else { + if (lex_state == EXPR_FNAME) { + if ((c = nextc()) == '=' && !peek('~') && !peek('>') && + (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) { + result = tIDENTIFIER; + tokadd(c); + tokfix(); + } + else { + pushback(c); + } + } + if (result == 0 && ISUPPER(tok()[0])) { + result = tCONSTANT; + } + else { + result = tIDENTIFIER; + } + } + + if ((lex_state == EXPR_BEG && !cmd_state) || + lex_state == EXPR_ARG || + lex_state == EXPR_CMDARG) { + if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { + lex_state = EXPR_BEG; + nextc(); + set_yylval_id(TOK_INTERN(!ENC_SINGLE(mb))); + return tLABEL; + } + } + if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { + const struct kwtable *kw; + + /* See if it is a reserved word. */ + kw = rb_reserved_word(tok(), toklen()); + if (kw) { + enum lex_state_e state = lex_state; + lex_state = kw->state; + if (state == EXPR_FNAME) { + set_yylval_id(rb_intern(kw->name)); + return kw->id[0]; + } + if (kw->id[0] == keyword_do) { + command_start = Qtrue; + if (lpar_beg && lpar_beg == paren_nest) { + lpar_beg = 0; + --paren_nest; + return keyword_do_LAMBDA; + } + if (COND_P()) return keyword_do_cond; + if (CMDARG_P() && state != EXPR_CMDARG) + return keyword_do_block; + if (state == EXPR_ENDARG || state == EXPR_BEG) + return keyword_do_block; + return keyword_do; + } + if (state == EXPR_BEG || state == EXPR_VALUE) + return kw->id[0]; + else { + if (kw->id[0] != kw->id[1]) + lex_state = EXPR_BEG; + return kw->id[1]; + } + } + } + + if (IS_BEG() || + lex_state == EXPR_DOT || + IS_ARG()) { + if (cmd_state) { + lex_state = EXPR_CMDARG; + } + else { + lex_state = EXPR_ARG; + } + } + else { + lex_state = EXPR_END; + } + } + { + ID ident = TOK_INTERN(!ENC_SINGLE(mb)); + + set_yylval_id(ident); + if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { + lex_state = EXPR_END; + } + } + return result; + } +} + +#if YYPURE +static int +yylex(void *lval, void *p) +#else +yylex(void *p) +#endif +{ + struct parser_params *parser = (struct parser_params*)p; + int t; + +#if YYPURE + parser->parser_yylval = lval; + parser->parser_yylval->val = Qundef; +#endif + t = parser_yylex(parser); +#ifdef RIPPER + if (!NIL_P(parser->delayed)) { + ripper_dispatch_delayed_token(parser, t); + return t; + } + if (t != 0) + ripper_dispatch_scan_event(parser, t); +#endif + + return t; +} + +#ifndef RIPPER +static NODE* +node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) +{ + NODE *n = (rb_node_newnode)(type, a0, a1, a2); + nd_set_line(n, ruby_sourceline); + return n; +} + +enum node_type +nodetype(NODE *node) /* for debug */ +{ + return (enum node_type)nd_type(node); +} + +int +nodeline(NODE *node) +{ + return nd_line(node); +} + +static NODE* +newline_node(NODE *node) +{ + if (node) { + node = remove_begin(node); + node->flags |= NODE_FL_NEWLINE; + } + return node; +} + +static void +fixpos(NODE *node, NODE *orig) +{ + if (!node) return; + if (!orig) return; + if (orig == (NODE*)1) return; + nd_set_line(node, nd_line(orig)); +} + +static void +parser_warning(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warning(node, mesg) parser_warning(parser, node, mesg) + +static void +parser_warn(struct parser_params *parser, NODE *node, const char *mesg) +{ + rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); +} +#define parser_warn(node, mesg) parser_warn(parser, node, mesg) + +static NODE* +block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *end, *h = head, *nd; + + if (tail == 0) return head; + + if (h == 0) return tail; + switch (nd_type(h)) { + case NODE_LIT: + case NODE_STR: + case NODE_SELF: + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + parser_warning(h, "unused literal ignored"); + return tail; + default: + h = end = NEW_BLOCK(head); + end->nd_end = end; + fixpos(end, head); + head = end; + break; + case NODE_BLOCK: + end = h->nd_end; + break; + } + + nd = end->nd_head; + switch (nd_type(nd)) { + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (RTEST(ruby_verbose)) { + parser_warning(nd, "statement not reached"); + } + break; + + default: + break; + } + + if (nd_type(tail) != NODE_BLOCK) { + tail = NEW_BLOCK(tail); + tail->nd_end = tail; + } + end->nd_next = tail; + h->nd_end = tail->nd_end; + return head; +} + +/* append item to the list */ +static NODE* +list_append_gen(struct parser_params *parser, NODE *list, NODE *item) +{ + NODE *last; + + if (list == 0) return NEW_LIST(item); + if (list->nd_next) { + last = list->nd_next->nd_end; + } + else { + last = list; + } + + list->nd_alen += 1; + last->nd_next = NEW_LIST(item); + list->nd_next->nd_end = last->nd_next; + return list; +} + +/* concat two lists */ +static NODE* +list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + NODE *last; + + if (head->nd_next) { + last = head->nd_next->nd_end; + } + else { + last = head; + } + + head->nd_alen += tail->nd_alen; + last->nd_next = tail; + if (tail->nd_next) { + head->nd_next->nd_end = tail->nd_next->nd_end; + } + else { + head->nd_next->nd_end = tail; + } + + return head; +} + +static int +literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) +{ + if (!rb_enc_compatible(head, tail)) { + compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", + rb_enc_name(rb_enc_get(head)), + rb_enc_name(rb_enc_get(tail))); + rb_str_resize(head, 0); + rb_str_resize(tail, 0); + return 0; + } + rb_str_buf_append(head, tail); + return 1; +} + +/* concat two string literals */ +static NODE * +literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) +{ + enum node_type htype; + + if (!head) return tail; + if (!tail) return head; + + htype = nd_type(head); + if (htype == NODE_EVSTR) { + NODE *node = NEW_DSTR(STR_NEW0()); + head = list_append(node, head); + } + switch (nd_type(tail)) { + case NODE_STR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { + error: + rb_gc_force_recycle((VALUE)head); + rb_gc_force_recycle((VALUE)tail); + return 0; + } + rb_gc_force_recycle((VALUE)tail); + } + else { + list_append(head, tail); + } + break; + + case NODE_DSTR: + if (htype == NODE_STR) { + if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) + goto error; + tail->nd_lit = head->nd_lit; + rb_gc_force_recycle((VALUE)head); + head = tail; + } + else { + nd_set_type(tail, NODE_ARRAY); + tail->nd_head = NEW_STR(tail->nd_lit); + list_concat(head, tail); + } + break; + + case NODE_EVSTR: + if (htype == NODE_STR) { + nd_set_type(head, NODE_DSTR); + head->nd_alen = 1; + } + list_append(head, tail); + break; + } + return head; +} + +static NODE * +evstr2dstr_gen(struct parser_params *parser, NODE *node) +{ + if (nd_type(node) == NODE_EVSTR) { + node = list_append(NEW_DSTR(STR_NEW0()), node); + } + return node; +} + +static NODE * +new_evstr_gen(struct parser_params *parser, NODE *node) +{ + NODE *head = node; + + if (node) { + switch (nd_type(node)) { + case NODE_STR: case NODE_DSTR: case NODE_EVSTR: + return node; + } + } + return NEW_EVSTR(head); +} + +static NODE * +call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) +{ + value_expr(recv); + value_expr(arg1); + return NEW_CALL(recv, id, NEW_LIST(arg1)); +} + +static NODE * +call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) +{ + value_expr(recv); + return NEW_CALL(recv, id, 0); +} + +static NODE* +match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + value_expr(node1); + value_expr(node2); + if (node1) { + switch (nd_type(node1)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH2(node1, node2); + + case NODE_LIT: + if (TYPE(node1->nd_lit) == T_REGEXP) { + return NEW_MATCH2(node1, node2); + } + } + } + + if (node2) { + switch (nd_type(node2)) { + case NODE_DREGX: + case NODE_DREGX_ONCE: + return NEW_MATCH3(node2, node1); + + case NODE_LIT: + if (TYPE(node2->nd_lit) == T_REGEXP) { + return NEW_MATCH3(node2, node1); + } + } + } + + return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); +} + +static NODE* +gettable_gen(struct parser_params *parser, ID id) +{ + if (id == keyword_self) { + return NEW_SELF(); + } + else if (id == keyword_nil) { + return NEW_NIL(); + } + else if (id == keyword_true) { + return NEW_TRUE(); + } + else if (id == keyword_false) { + return NEW_FALSE(); + } + else if (id == keyword__FILE__) { + return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), + rb_filesystem_encoding())); + } + else if (id == keyword__LINE__) { + return NEW_LIT(INT2FIX(ruby_sourceline)); + } + else if (id == keyword__ENCODING__) { + return NEW_LIT(rb_enc_from_encoding(parser->enc)); + } + else if (is_local_id(id)) { + if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); + if (local_id(id)) return NEW_LVAR(id); + /* method call without arguments */ + return NEW_VCALL(id); + } + else if (is_global_id(id)) { + return NEW_GVAR(id); + } + else if (is_instance_id(id)) { + return NEW_IVAR(id); + } + else if (is_const_id(id)) { + return NEW_CONST(id); + } + else if (is_class_id(id)) { + return NEW_CVAR(id); + } + compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); + return 0; +} + +static NODE* +assignable_gen(struct parser_params *parser, ID id, NODE *val) +{ + if (!id) return 0; + if (id == keyword_self) { + yyerror("Can't change the value of self"); + } + else if (id == keyword_nil) { + yyerror("Can't assign to nil"); + } + else if (id == keyword_true) { + yyerror("Can't assign to true"); + } + else if (id == keyword_false) { + yyerror("Can't assign to false"); + } + else if (id == keyword__FILE__) { + yyerror("Can't assign to __FILE__"); + } + else if (id == keyword__LINE__) { + yyerror("Can't assign to __LINE__"); + } + else if (id == keyword__ENCODING__) { + yyerror("Can't assign to __ENCODING__"); + } + else if (is_local_id(id)) { + if (dyna_in_block()) { + if (dvar_curr(id)) { + return NEW_DASGN_CURR(id, val); + } + else if (dvar_defined(id)) { + return NEW_DASGN(id, val); + } + else if (local_id(id)) { + return NEW_LASGN(id, val); + } + else{ + dyna_var(id); + return NEW_DASGN_CURR(id, val); + } + } + else { + if (!local_id(id)) { + local_var(id); + } + return NEW_LASGN(id, val); + } + } + else if (is_global_id(id)) { + return NEW_GASGN(id, val); + } + else if (is_instance_id(id)) { + return NEW_IASGN(id, val); + } + else if (is_const_id(id)) { + if (in_def || in_single) + yyerror("dynamic constant assignment"); + return NEW_CDECL(id, val, 0); + } + else if (is_class_id(id)) { + return NEW_CVASGN(id, val); + } + else { + compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); + } + return 0; +} + +static void +shadowing_lvar_gen(struct parser_params *parser, ID name) +{ + ID uscore; + + CONST_ID(uscore, "_"); + if (uscore == name) return; + if (dyna_in_block()) { + if (dvar_curr(name)) { + yyerror("duplicated argument name"); + } + else if (dvar_defined(name) || local_id(name)) { + rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); + vtable_add(lvtbl->vars, name); + } + } + else { + if (local_id(name)) { + yyerror("duplicated argument name"); + } + } +} + +static void +new_bv_gen(struct parser_params *parser, ID name) +{ + if (!name) return; + if (!is_local_id(name)) { + compile_error(PARSER_ARG "invalid local variable - %s", + rb_id2name(name)); + return; + } + shadowing_lvar(name); + dyna_var(name); +} + +static NODE * +aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, tASET, idx); +} + +static void +block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "both block arg and actual block given"); + } +} + +ID +rb_id_attrset(ID id) +{ + id &= ~ID_SCOPE_MASK; + id |= ID_ATTRSET; + return id; +} + +static NODE * +attrset_gen(struct parser_params *parser, NODE *recv, ID id) +{ + if (recv && nd_type(recv) == NODE_SELF) + recv = (NODE *)1; + return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); +} + +static void +rb_backref_error_gen(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_NTH_REF: + compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); + break; + case NODE_BACK_REF: + compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); + break; + } +} + +static NODE * +arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node2) return node1; + switch (nd_type(node1)) { + case NODE_BLOCK_PASS: + node1->nd_iter = arg_concat(node1->nd_iter, node2); + return node1; + case NODE_ARGSPUSH: + if (nd_type(node2) != NODE_ARRAY) break; + node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + case NODE_ARGSCAT: + if (nd_type(node2) != NODE_ARRAY || + nd_type(node1->nd_body) != NODE_ARRAY) break; + node1->nd_body = list_concat(node1->nd_body, node2); + return node1; + } + return NEW_ARGSCAT(node1, node2); +} + +static NODE * +arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) +{ + if (!node1) return NEW_LIST(node2); + switch (nd_type(node1)) { + case NODE_ARRAY: + return list_append(node1, node2); + case NODE_BLOCK_PASS: + node1->nd_head = arg_append(node1->nd_head, node2); + return node1; + case NODE_ARGSPUSH: + node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); + nd_set_type(node1, NODE_ARGSCAT); + return node1; + } + return NEW_ARGSPUSH(node1, node2); +} + +static NODE * +splat_array(NODE* node) +{ + if (nd_type(node) == NODE_SPLAT) node = node->nd_head; + if (nd_type(node) == NODE_ARRAY) return node; + return 0; +} + +static NODE * +node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) +{ + if (!lhs) return 0; + + switch (nd_type(lhs)) { + case NODE_GASGN: + case NODE_IASGN: + case NODE_IASGN2: + case NODE_LASGN: + case NODE_DASGN: + case NODE_DASGN_CURR: + case NODE_MASGN: + case NODE_CDECL: + case NODE_CVASGN: + lhs->nd_value = rhs; + break; + + case NODE_ATTRASGN: + case NODE_CALL: + lhs->nd_args = arg_append(lhs->nd_args, rhs); + break; + + default: + /* should not happen */ + break; + } + + return lhs; +} + +static int +value_expr_gen(struct parser_params *parser, NODE *node) +{ + int cond = 0; + + if (!node) { + rb_warning0("empty expression"); + } + while (node) { + switch (nd_type(node)) { + case NODE_DEFN: + case NODE_DEFS: + parser_warning(node, "void value expression"); + return Qfalse; + + case NODE_RETURN: + case NODE_BREAK: + case NODE_NEXT: + case NODE_REDO: + case NODE_RETRY: + if (!cond) yyerror("void value expression"); + /* or "control never reach"? */ + return Qfalse; + + case NODE_BLOCK: + while (node->nd_next) { + node = node->nd_next; + } + node = node->nd_head; + break; + + case NODE_BEGIN: + node = node->nd_body; + break; + + case NODE_IF: + if (!node->nd_body) { + node = node->nd_else; + break; + } + else if (!node->nd_else) { + node = node->nd_body; + break; + } + if (!value_expr(node->nd_body)) return Qfalse; + node = node->nd_else; + break; + + case NODE_AND: + case NODE_OR: + cond = 1; + node = node->nd_2nd; + break; + + default: + return Qtrue; + } + } + + return Qtrue; +} + +static void +void_expr_gen(struct parser_params *parser, NODE *node) +{ + const char *useless = 0; + + if (!RTEST(ruby_verbose)) return; + + if (!node) return; + switch (nd_type(node)) { + case NODE_CALL: + switch (node->nd_mid) { + case '+': + case '-': + case '*': + case '/': + case '%': + case tPOW: + case tUPLUS: + case tUMINUS: + case '|': + case '^': + case '&': + case tCMP: + case '>': + case tGEQ: + case '<': + case tLEQ: + case tEQ: + case tNEQ: + useless = rb_id2name(node->nd_mid); + break; + } + break; + + case NODE_LVAR: + case NODE_DVAR: + case NODE_GVAR: + case NODE_IVAR: + case NODE_CVAR: + case NODE_NTH_REF: + case NODE_BACK_REF: + useless = "a variable"; + break; + case NODE_CONST: + useless = "a constant"; + break; + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + useless = "a literal"; + break; + case NODE_COLON2: + case NODE_COLON3: + useless = "::"; + break; + case NODE_DOT2: + useless = ".."; + break; + case NODE_DOT3: + useless = "..."; + break; + case NODE_SELF: + useless = "self"; + break; + case NODE_NIL: + useless = "nil"; + break; + case NODE_TRUE: + useless = "true"; + break; + case NODE_FALSE: + useless = "false"; + break; + case NODE_DEFINED: + useless = "defined?"; + break; + } + + if (useless) { + int line = ruby_sourceline; + + ruby_sourceline = nd_line(node); + rb_warnS("useless use of %s in void context", useless); + ruby_sourceline = line; + } +} + +static void +void_stmts_gen(struct parser_params *parser, NODE *node) +{ + if (!RTEST(ruby_verbose)) return; + if (!node) return; + if (nd_type(node) != NODE_BLOCK) return; + + for (;;) { + if (!node->nd_next) return; + void_expr0(node->nd_head); + node = node->nd_next; + } +} + +static NODE * +remove_begin(NODE *node) +{ + NODE **n = &node, *n1 = node; + while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { + *n = n1 = n1->nd_body; + } + return node; +} + +static void +reduce_nodes_gen(struct parser_params *parser, NODE **body) +{ + NODE *node = *body; + + if (!node) { + *body = NEW_NIL(); + return; + } +#define subnodes(n1, n2) \ + ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ + (!node->n2) ? (body = &node->n1, 1) : \ + (reduce_nodes(&node->n1), body = &node->n2, 1)) + + while (node) { + switch (nd_type(node)) { + end: + case NODE_NIL: + *body = 0; + return; + case NODE_RETURN: + *body = node = node->nd_stts; + continue; + case NODE_BEGIN: + *body = node = node->nd_body; + continue; + case NODE_BLOCK: + body = &node->nd_end->nd_head; + break; + case NODE_IF: + if (subnodes(nd_body, nd_else)) break; + return; + case NODE_CASE: + body = &node->nd_body; + break; + case NODE_WHEN: + if (!subnodes(nd_body, nd_next)) goto end; + break; + case NODE_ENSURE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + case NODE_RESCUE: + if (!subnodes(nd_head, nd_resq)) goto end; + break; + default: + return; + } + node = *body; + } + +#undef subnodes +} + +static int +assign_in_cond(struct parser_params *parser, NODE *node) +{ + switch (nd_type(node)) { + case NODE_MASGN: + yyerror("multiple assignment in conditional"); + return 1; + + case NODE_LASGN: + case NODE_DASGN: + case NODE_GASGN: + case NODE_IASGN: + break; + + default: + return 0; + } + + switch (nd_type(node->nd_value)) { + case NODE_LIT: + case NODE_STR: + case NODE_NIL: + case NODE_TRUE: + case NODE_FALSE: + /* reports always */ + parser_warn(node->nd_value, "found = in conditional, should be =="); + return 1; + + case NODE_DSTR: + case NODE_XSTR: + case NODE_DXSTR: + case NODE_EVSTR: + case NODE_DREGX: + default: + break; + } + return 1; +} + +static void +warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warn(node, str); +} + +static void +warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) +{ + if (!e_option_supplied(parser)) parser_warning(node, str); +} + +static void +fixup_nodes(NODE **rootnode) +{ + NODE *node, *next, *head; + + for (node = *rootnode; node; node = next) { + enum node_type type; + VALUE val; + + next = node->nd_next; + head = node->nd_head; + rb_gc_force_recycle((VALUE)node); + *rootnode = next; + switch (type = nd_type(head)) { + case NODE_DOT2: + case NODE_DOT3: + val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, + type == NODE_DOT3 ? Qtrue : Qfalse); + rb_gc_force_recycle((VALUE)head->nd_beg); + rb_gc_force_recycle((VALUE)head->nd_end); + nd_set_type(head, NODE_LIT); + head->nd_lit = val; + break; + default: + break; + } + } +} + +static NODE *cond0(struct parser_params*,NODE*); + +static NODE* +range_op(struct parser_params *parser, NODE *node) +{ + enum node_type type; + + if (node == 0) return 0; + + type = nd_type(node); + value_expr(node); + if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { + warn_unless_e_option(parser, node, "integer literal in conditional range"); + return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); + } + return cond0(parser, node); +} + +static int +literal_node(NODE *node) +{ + if (!node) return 1; /* same as NODE_NIL */ + switch (nd_type(node)) { + case NODE_LIT: + case NODE_STR: + case NODE_DSTR: + case NODE_EVSTR: + case NODE_DREGX: + case NODE_DREGX_ONCE: + case NODE_DSYM: + return 2; + case NODE_TRUE: + case NODE_FALSE: + case NODE_NIL: + return 1; + } + return 0; +} + +static NODE* +cond0(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + assign_in_cond(parser, node); + + switch (nd_type(node)) { + case NODE_DSTR: + case NODE_EVSTR: + case NODE_STR: + rb_warn0("string literal in condition"); + break; + + case NODE_DREGX: + case NODE_DREGX_ONCE: + warning_unless_e_option(parser, node, "regex literal in condition"); + return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); + + case NODE_AND: + case NODE_OR: + node->nd_1st = cond0(parser, node->nd_1st); + node->nd_2nd = cond0(parser, node->nd_2nd); + break; + + case NODE_DOT2: + case NODE_DOT3: + node->nd_beg = range_op(parser, node->nd_beg); + node->nd_end = range_op(parser, node->nd_end); + if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); + else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); + if (!e_option_supplied(parser)) { + int b = literal_node(node->nd_beg); + int e = literal_node(node->nd_end); + if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { + parser_warn(node, "range literal in condition"); + } + } + break; + + case NODE_DSYM: + parser_warning(node, "literal in condition"); + break; + + case NODE_LIT: + if (TYPE(node->nd_lit) == T_REGEXP) { + warn_unless_e_option(parser, node, "regex literal in condition"); + nd_set_type(node, NODE_MATCH); + } + else { + parser_warning(node, "literal in condition"); + } + default: + break; + } + return node; +} + +static NODE* +cond_gen(struct parser_params *parser, NODE *node) +{ + if (node == 0) return 0; + return cond0(parser, node); +} + +static NODE* +logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) +{ + value_expr(left); + if (left && nd_type(left) == type) { + NODE *node = left, *second; + while ((second = node->nd_2nd) != 0 && nd_type(second) == type) { + node = second; + } + node->nd_2nd = NEW_NODE(type, second, right, 0); + return left; + } + return NEW_NODE(type, left, right, 0); +} + +static void +no_blockarg(struct parser_params *parser, NODE *node) +{ + if (node && nd_type(node) == NODE_BLOCK_PASS) { + compile_error(PARSER_ARG "block argument should not be given"); + } +} + +static NODE * +ret_args_gen(struct parser_params *parser, NODE *node) +{ + if (node) { + no_blockarg(parser, node); + if (nd_type(node) == NODE_ARRAY) { + if (node->nd_next == 0) { + node = node->nd_head; + } + else { + nd_set_type(node, NODE_VALUES); + } + } + } + return node; +} + +static NODE * +new_yield_gen(struct parser_params *parser, NODE *node) +{ + long state = Qtrue; + + if (node) { + no_blockarg(parser, node); + if (node && nd_type(node) == NODE_SPLAT) { + state = Qtrue; + } + } + else { + state = Qfalse; + } + return NEW_YIELD(node, state); +} + +static NODE* +negate_lit(NODE *node) +{ + switch (TYPE(node->nd_lit)) { + case T_FIXNUM: + node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); + break; + case T_BIGNUM: + node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); + break; + case T_FLOAT: + RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); + break; + default: + break; + } + return node; +} + +static NODE * +arg_blk_pass(NODE *node1, NODE *node2) +{ + if (node2) { + node2->nd_head = node1; + return node2; + } + return node1; +} + +static NODE* +new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) +{ + int saved_line = ruby_sourceline; + NODE *node; + NODE *i1, *i2 = 0; + + node = NEW_ARGS(m ? m->nd_plen : 0, o); + i1 = m ? m->nd_next : 0; + node->nd_next = NEW_ARGS_AUX(r, b); + + if (p) { + i2 = p->nd_next; + node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); + } + else if (i1) { + node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); + } + if (i1 || i2) { + node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); + } + ruby_sourceline = saved_line; + return node; +} + +static void +local_push_gen(struct parser_params *parser, int inherit_dvars) +{ + struct local_vars *local; + + local = ALLOC(struct local_vars); + local->prev = lvtbl; + local->args = vtable_alloc(0); + local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); + lvtbl = local; +} + +static void +local_pop_gen(struct parser_params *parser) +{ + struct local_vars *local = lvtbl->prev; + vtable_free(lvtbl->args); + vtable_free(lvtbl->vars); + xfree(lvtbl); + lvtbl = local; +} + +static ID* +vtable_tblcpy(ID *buf, const struct vtable *src) +{ + int i, cnt = vtable_size(src); + + if (cnt > 0) { + buf[0] = cnt; + for (i = 0; i < cnt; i++) { + buf[i] = src->tbl[i]; + } + return buf; + } + return 0; +} + +static ID* +local_tbl_gen(struct parser_params *parser) +{ + int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); + ID *buf; + + if (cnt <= 0) return 0; + buf = ALLOC_N(ID, cnt + 1); + vtable_tblcpy(buf+1, lvtbl->args); + vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); + buf[0] = cnt; + return buf; +} + +static int +arg_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->args, id); + return vtable_size(lvtbl->args) - 1; +} + +static int +local_var_gen(struct parser_params *parser, ID id) +{ + vtable_add(lvtbl->vars, id); + return vtable_size(lvtbl->vars) - 1; +} + +static int +local_id_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + vars = lvtbl->vars; + args = lvtbl->args; + + while (vars && POINTER_P(vars->prev)) { + vars = vars->prev; + args = args->prev; + } + + if (vars && vars->prev == DVARS_INHERIT) { + return rb_local_defined(id); + } + else { + return (vtable_included(args, id) || + vtable_included(vars, id)); + } +} + +static void +dyna_push_gen(struct parser_params *parser) +{ + lvtbl->args = vtable_alloc(lvtbl->args); + lvtbl->vars = vtable_alloc(lvtbl->vars); +} + +static void +dyna_pop_gen(struct parser_params *parser) +{ + struct vtable *tmp; + + tmp = lvtbl->args; + lvtbl->args = lvtbl->args->prev; + vtable_free(tmp); + tmp = lvtbl->vars; + lvtbl->vars = lvtbl->vars->prev; + vtable_free(tmp); +} + +static int +dyna_in_block_gen(struct parser_params *parser) +{ + return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; +} + +static int +dvar_defined_gen(struct parser_params *parser, ID id) +{ + struct vtable *vars, *args; + + args = lvtbl->args; + vars = lvtbl->vars; + + while (POINTER_P(vars)) { + if (vtable_included(args, id)) { + return 1; + } + if (vtable_included(vars, id)) { + return 1; + } + args = args->prev; + vars = vars->prev; + } + + if (vars == DVARS_INHERIT) { + return rb_dvar_defined(id); + } + + return 0; +} + +static int +dvar_curr_gen(struct parser_params *parser, ID id) +{ + return (vtable_included(lvtbl->args, id) || + vtable_included(lvtbl->vars, id)); +} + +VALUE rb_reg_compile(VALUE str, int options); +VALUE rb_reg_check_preprocess(VALUE); + +static void +reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) +{ + int c = RE_OPTION_ENCODING_IDX(options); + + if (c) { + int opt, idx; + rb_char_to_option_kcode(c, &opt, &idx); + if (idx != ENCODING_GET(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + goto error; + } + ENCODING_SET(str, idx); + } + else if (RE_OPTION_ENCODING_NONE(options)) { + if (!ENCODING_IS_ASCII8BIT(str) && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + c = 'n'; + goto error; + } + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + else if (parser->enc == rb_usascii_encoding()) { + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + /* raise in re.c */ + rb_enc_associate(str, rb_usascii_encoding()); + } + else { + rb_enc_associate(str, rb_ascii8bit_encoding()); + } + } + return; + + error: + compile_error(PARSER_ARG + "regexp encoding option '%c' differs from source encoding '%s'", + c, rb_enc_name(rb_enc_get(str))); +} + +static void +reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE err; + reg_fragment_setenc_gen(parser, str, options); + err = rb_reg_check_preprocess(str); + if (err != Qnil) { + err = rb_obj_as_string(err); + compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); + RB_GC_GUARD(err); + } +} + +typedef struct { + struct parser_params* parser; + rb_encoding *enc; + NODE *succ_block; + NODE *fail_block; + int num; +} reg_named_capture_assign_t; + +static int +reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg0) +{ + reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; + struct parser_params* parser = arg->parser; + rb_encoding *enc = arg->enc; + int len = name_end - name; + const char *s = (const char *)name; + ID var; + + arg->num++; + + if (arg->succ_block == 0) { + arg->succ_block = NEW_BEGIN(0); + arg->fail_block = NEW_BEGIN(0); + } + + if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || + rb_reserved_word(s, len) || !rb_enc_symname2_p(s, len, enc)) { + return ST_CONTINUE; + } + var = rb_intern3(s, len, enc); + if (dvar_defined(var) || local_id(var)) { + rb_warningS("named capture conflicts a local variable - %s", + rb_id2name(var)); + } + arg->succ_block = block_append(arg->succ_block, + newline_node(node_assign(assignable(var,0), + NEW_CALL( + gettable(rb_intern("$~")), + idAREF, + NEW_LIST(NEW_LIT(ID2SYM(var)))) + ))); + arg->fail_block = block_append(arg->fail_block, + newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); + return ST_CONTINUE; +} + +static NODE * +reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) +{ + reg_named_capture_assign_t arg; + + arg.parser = parser; + arg.enc = rb_enc_get(regexp); + arg.succ_block = 0; + arg.fail_block = 0; + arg.num = 0; + onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); + + if (arg.num == 0) + return match; + + return + block_append( + newline_node(match), + NEW_IF(gettable(rb_intern("$~")), + block_append( + newline_node(arg.succ_block), + newline_node( + NEW_CALL( + gettable(rb_intern("$~")), + rb_intern("begin"), + NEW_LIST(NEW_LIT(INT2FIX(0)))))), + block_append( + newline_node(arg.fail_block), + newline_node( + NEW_LIT(Qnil))))); +} + +static VALUE +reg_compile_gen(struct parser_params* parser, VALUE str, int options) +{ + VALUE re; + VALUE err; + + reg_fragment_setenc(str, options); + err = rb_errinfo(); + re = rb_reg_compile(str, options & RE_OPTION_MASK); + if (NIL_P(re)) { + ID mesg = rb_intern("mesg"); + VALUE m = rb_attr_get(rb_errinfo(), mesg); + rb_set_errinfo(err); + if (!NIL_P(err)) { + rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); + } + else { + compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); + } + return Qnil; + } + return re; +} + +void +rb_gc_mark_parser(void) +{ +} + +NODE* +rb_parser_append_print(VALUE vparser, NODE *node) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + + node = block_append(node, + NEW_FCALL(rb_intern("print"), + NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +NODE * +rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) +{ + NODE *prelude = 0; + NODE *scope = node; + struct parser_params *parser; + + if (!node) return node; + + Data_Get_Struct(vparser, struct parser_params, parser); + + node = node->nd_body; + + if (nd_type(node) == NODE_PRELUDE) { + prelude = node; + node = node->nd_body; + } + if (split) { + node = block_append(NEW_GASGN(rb_intern("$F"), + NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("split"), 0)), + node); + } + if (chop) { + node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), + rb_intern("chop!"), 0), node); + } + + node = NEW_OPT_N(node); + + if (prelude) { + prelude->nd_body = node; + scope->nd_body = prelude; + } + else { + scope->nd_body = node; + } + + return scope; +} + +static const struct { + ID token; + const char *name; +} op_tbl[] = { + {tDOT2, ".."}, + {tDOT3, "..."}, + {'+', "+(binary)"}, + {'-', "-(binary)"}, + {tPOW, "**"}, + {tUPLUS, "+@"}, + {tUMINUS, "-@"}, + {tCMP, "<=>"}, + {tGEQ, ">="}, + {tLEQ, "<="}, + {tEQ, "=="}, + {tEQQ, "==="}, + {tNEQ, "!="}, + {tMATCH, "=~"}, + {tNMATCH, "!~"}, + {tAREF, "[]"}, + {tASET, "[]="}, + {tLSHFT, "<<"}, + {tRSHFT, ">>"}, + {tCOLON2, "::"}, +}; + +#define op_tbl_count (sizeof(op_tbl) / sizeof(op_tbl[0])) + +static struct symbols { + ID last_id; + st_table *sym_id; + st_table *id_str; + st_table *ivar2_id; + st_table *id_ivar2; + VALUE op_sym[tLAST_TOKEN]; +} global_symbols = {tLAST_ID}; + +static const struct st_hash_type symhash = { + rb_str_hash_cmp, + rb_str_hash, +}; + +struct ivar2_key { + ID id; + VALUE klass; +}; + +static int +ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) +{ + if (key1->id == key2->id && key1->klass == key2->klass) { + return 0; + } + return 1; +} + +static int +ivar2_hash(struct ivar2_key *key) +{ + return (key->id << 8) ^ (key->klass >> 2); +} + +static const struct st_hash_type ivar2_hash_type = { + ivar2_cmp, + ivar2_hash, +}; + +void +Init_sym(void) +{ + global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); + global_symbols.id_str = st_init_numtable_with_size(1000); + global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); + global_symbols.id_ivar2 = st_init_numtable_with_size(1000); + + Init_id(); +} + +void +rb_gc_mark_symbols(void) +{ + rb_mark_tbl(global_symbols.id_str); + rb_gc_mark_locations(global_symbols.op_sym, + global_symbols.op_sym + tLAST_TOKEN); +} + +static ID +internal_id_gen(struct parser_params *parser) +{ + ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); + id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; + return ID_INTERNAL | (id << ID_SCOPE_SHIFT); +} + +static int +is_special_global_name(const char *m, const char *e, rb_encoding *enc) +{ + int mb = 0; + + if (m >= e) return 0; + switch (*m) { + case '~': case '*': case '$': case '?': case '!': case '@': + case '/': case '\\': case ';': case ',': case '.': case '=': + case ':': case '<': case '>': case '\"': + case '&': case '`': case '\'': case '+': + case '0': + ++m; + break; + case '-': + ++m; + if (m < e && is_identchar(m, e, enc)) { + if (!ISASCII(*m)) mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + break; + default: + if (!rb_enc_isdigit(*m, enc)) return 0; + do { + if (!ISASCII(*m)) mb = 1; + ++m; + } while (rb_enc_isdigit(*m, enc)); + } + return m == e ? mb + 1 : 0; +} + +int +rb_symname_p(const char *name) +{ + return rb_enc_symname_p(name, rb_ascii8bit_encoding()); +} + +int +rb_enc_symname_p(const char *name, rb_encoding *enc) +{ + return rb_enc_symname2_p(name, strlen(name), enc); +} + +int +rb_enc_symname2_p(const char *name, int len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + int localid = Qfalse; + + if (!m) return Qfalse; + switch (*m) { + case '\0': + return Qfalse; + + case '$': + if (is_special_global_name(++m, e, enc)) return Qtrue; + goto id; + + case '@': + if (*++m == '@') ++m; + goto id; + + case '<': + switch (*++m) { + case '<': ++m; break; + case '=': if (*++m == '>') ++m; break; + default: break; + } + break; + + case '>': + switch (*++m) { + case '>': case '=': ++m; break; + } + break; + + case '=': + switch (*++m) { + case '~': ++m; break; + case '=': if (*++m == '=') ++m; break; + default: return Qfalse; + } + break; + + case '*': + if (*++m == '*') ++m; + break; + + case '+': case '-': + if (*++m == '@') ++m; + break; + + case '|': case '^': case '&': case '/': case '%': case '~': case '`': + ++m; + break; + + case '[': + if (*++m != ']') return Qfalse; + if (*++m == '=') ++m; + break; + + case '!': + switch (*++m) { + case '\0': return Qtrue; + case '=': case '~': ++m; break; + default: return Qfalse; + } + break; + + default: + localid = !rb_enc_isupper(*m, enc); + id: + if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) + return Qfalse; + while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); + if (localid) { + switch (*m) { + case '!': case '?': case '=': ++m; + } + } + break; + } + return *m ? Qfalse : Qtrue; +} + +static ID +register_symid(ID id, const char *name, long len, rb_encoding *enc) +{ + VALUE str = rb_enc_str_new(name, len, enc); + OBJ_FREEZE(str); + st_add_direct(global_symbols.sym_id, (st_data_t)str, id); + st_add_direct(global_symbols.id_str, id, (st_data_t)str); + return id; +} + +ID +rb_intern3(const char *name, long len, rb_encoding *enc) +{ + const char *m = name; + const char *e = m + len; + unsigned char c; + VALUE str; + ID id; + int last; + int mb; + struct RString fake_str; + fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE; + fake_str.basic.klass = rb_cString; + fake_str.as.heap.len = len; + fake_str.as.heap.ptr = (char *)name; + fake_str.as.heap.aux.capa = len; + str = (VALUE)&fake_str; + rb_enc_associate(str, enc); + + if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id)) + return id; + + if (rb_cString && !rb_enc_asciicompat(enc)) { + id = ID_JUNK; + goto new_id; + } + last = len-1; + id = 0; + switch (*m) { + case '$': + id |= ID_GLOBAL; + if ((mb = is_special_global_name(++m, e, enc)) != 0) { + if (!--mb) enc = rb_ascii8bit_encoding(); + goto new_id; + } + break; + case '@': + if (m[1] == '@') { + m++; + id |= ID_CLASS; + } + else { + id |= ID_INSTANCE; + } + m++; + break; + default: + c = m[0]; + if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { + /* operators */ + int i; + + if (len == 1) { + id = c; + goto id_register; + } + for (i = 0; i < op_tbl_count; i++) { + if (*op_tbl[i].name == *m && + strcmp(op_tbl[i].name, m) == 0) { + id = op_tbl[i].token; + goto id_register; + } + } + } + + if (m[last] == '=') { + /* attribute assignment */ + id = rb_intern3(name, last, enc); + if (id > tLAST_TOKEN && !is_attrset_id(id)) { + enc = rb_enc_get(rb_id2str(id)); + id = rb_id_attrset(id); + goto id_register; + } + id = ID_ATTRSET; + } + else if (rb_enc_isupper(m[0], enc)) { + id = ID_CONST; + } + else { + id = ID_LOCAL; + } + break; + } + mb = 0; + if (!rb_enc_isdigit(*m, enc)) { + while (m <= name + last && is_identchar(m, e, enc)) { + if (ISASCII(*m)) { + m++; + } + else { + mb = 1; + m += rb_enc_mbclen(m, e, enc); + } + } + } + if (m - name < len) id = ID_JUNK; + if (enc != rb_usascii_encoding()) { + /* + * this clause makes sense only when called from other than + * rb_intern_str() taking care of code-range. + */ + if (!mb) { + for (; m <= name + len; ++m) { + if (!ISASCII(*m)) goto mbstr; + } + enc = rb_usascii_encoding(); + } + mbstr:; + } + new_id: + id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; + id_register: + return register_symid(id, name, len, enc); +} + +ID +rb_intern2(const char *name, long len) +{ + return rb_intern3(name, len, rb_usascii_encoding()); +} + +#undef rb_intern +ID +rb_intern(const char *name) +{ + return rb_intern2(name, strlen(name)); +} + +ID +rb_intern_str(VALUE str) +{ + rb_encoding *enc; + ID id; + + if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { + enc = rb_usascii_encoding(); + } + else { + enc = rb_enc_get(str); + } + id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); + RB_GC_GUARD(str); + return id; +} + +VALUE +rb_id2str(ID id) +{ + st_data_t data; + + if (id < tLAST_TOKEN) { + int i = 0; + + if (rb_ispunct(id)) { + VALUE str = global_symbols.op_sym[i = (int)id]; + if (!str) { + char name[2]; + name[0] = (char)id; + name[1] = 0; + str = rb_usascii_str_new(name, 1); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + for (i = 0; i < op_tbl_count; i++) { + if (op_tbl[i].token == id) { + VALUE str = global_symbols.op_sym[i]; + if (!str) { + str = rb_usascii_str_new2(op_tbl[i].name); + OBJ_FREEZE(str); + global_symbols.op_sym[i] = str; + } + return str; + } + } + } + + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + + if (is_attrset_id(id)) { + ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; + VALUE str; + + while (!(str = rb_id2str(id2))) { + if (!is_local_id(id2)) return 0; + id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; + } + str = rb_str_dup(str); + rb_str_cat(str, "=", 1); + rb_intern_str(str); + if (st_lookup(global_symbols.id_str, id, &data)) { + VALUE str = (VALUE)data; + if (RBASIC(str)->klass == 0) + RBASIC(str)->klass = rb_cString; + return str; + } + } + return 0; +} + +const char * +rb_id2name(ID id) +{ + VALUE str = rb_id2str(id); + + if (!str) return 0; + return RSTRING_PTR(str); +} + +static int +symbols_i(VALUE sym, ID value, VALUE ary) +{ + rb_ary_push(ary, ID2SYM(value)); + return ST_CONTINUE; +} + +/* + * call-seq: + * Symbol.all_symbols => array + * + * Returns an array of all the symbols currently in Ruby's symbol + * table. + * + * Symbol.all_symbols.size #=> 903 + * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, + * :chown, :EOFError, :$;, :String, + * :LOCK_SH, :"setuid?", :$<, + * :default_proc, :compact, :extend, + * :Tms, :getwd, :$=, :ThreadGroup, + * :wait2, :$>] + */ + +VALUE +rb_sym_all_symbols(void) +{ + VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); + + st_foreach(global_symbols.sym_id, symbols_i, ary); + return ary; +} + +int +rb_is_const_id(ID id) +{ + if (is_const_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_class_id(ID id) +{ + if (is_class_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_instance_id(ID id) +{ + if (is_instance_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_local_id(ID id) +{ + if (is_local_id(id)) return Qtrue; + return Qfalse; +} + +int +rb_is_junk_id(ID id) +{ + if (is_junk_id(id)) return Qtrue; + return Qfalse; +} + +#endif /* !RIPPER */ + +static void +parser_initialize(struct parser_params *parser) +{ + parser->eofp = Qfalse; + + parser->parser_lex_strterm = 0; + parser->parser_cond_stack = 0; + parser->parser_cmdarg_stack = 0; + parser->parser_class_nest = 0; + parser->parser_paren_nest = 0; + parser->parser_lpar_beg = 0; + parser->parser_in_single = 0; + parser->parser_in_def = 0; + parser->parser_in_defined = 0; + parser->parser_compile_for_eval = 0; + parser->parser_cur_mid = 0; + parser->parser_tokenbuf = NULL; + parser->parser_tokidx = 0; + parser->parser_toksiz = 0; + parser->parser_heredoc_end = 0; + parser->parser_command_start = Qtrue; + parser->parser_deferred_nodes = 0; + parser->parser_lex_pbeg = 0; + parser->parser_lex_p = 0; + parser->parser_lex_pend = 0; + parser->parser_lvtbl = 0; + parser->parser_ruby__end__seen = 0; + parser->parser_ruby_sourcefile = 0; +#ifndef RIPPER + parser->is_ripper = 0; + parser->parser_eval_tree_begin = 0; + parser->parser_eval_tree = 0; +#else + parser->is_ripper = 1; + parser->parser_ruby_sourcefile_string = Qnil; + parser->delayed = Qnil; + + parser->result = Qnil; + parser->parsing_thread = Qnil; + parser->toplevel_p = Qtrue; +#endif +#ifdef YYMALLOC + parser->heap = NULL; +#endif + parser->enc = rb_usascii_encoding(); +} + +#ifdef RIPPER +#define parser_mark ripper_parser_mark +#define parser_free ripper_parser_free +#endif + +static void +parser_mark(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + + rb_gc_mark((VALUE)p->parser_lex_strterm); + rb_gc_mark((VALUE)p->parser_deferred_nodes); + rb_gc_mark(p->parser_lex_input); + rb_gc_mark(p->parser_lex_lastline); + rb_gc_mark(p->parser_lex_nextline); +#ifndef RIPPER + rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; + rb_gc_mark((VALUE)p->parser_eval_tree) ; + rb_gc_mark(p->debug_lines); +#else + rb_gc_mark(p->parser_ruby_sourcefile_string); + rb_gc_mark(p->delayed); + rb_gc_mark(p->value); + rb_gc_mark(p->result); + rb_gc_mark(p->parsing_thread); +#endif +#ifdef YYMALLOC + rb_gc_mark((VALUE)p->heap); +#endif +} + +static void +parser_free(void *ptr) +{ + struct parser_params *p = (struct parser_params*)ptr; + struct local_vars *local, *prev; + + if (p->parser_tokenbuf) { + xfree(p->parser_tokenbuf); + } + for (local = p->parser_lvtbl; local; local = prev) { + if (local->vars) xfree(local->vars); + prev = local->prev; + xfree(local); + } +#ifndef RIPPER + xfree(p->parser_ruby_sourcefile); +#endif + xfree(p); +} + +VALUE rb_parser_get_yydebug(VALUE); +VALUE rb_parser_set_yydebug(VALUE, VALUE); + +#ifndef RIPPER +static struct parser_params * +parser_new(void) +{ + struct parser_params *p; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + parser_initialize(p); + return p; +} + +VALUE +rb_parser_new(void) +{ + struct parser_params *p = parser_new(); + + return Data_Wrap_Struct(0, parser_mark, parser_free, p); +} + +/* + * call-seq: + * ripper#end_seen? -> Boolean + * + * Return if parsed source ended by +\_\_END\_\_+. + * This number starts from 1. + */ +VALUE +rb_parser_end_seen_p(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return ruby__end__seen ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper#encoding -> encoding + * + * Return encoding of the source. + */ +VALUE +rb_parser_encoding(VALUE vparser) +{ + struct parser_params *parser; + + Data_Get_Struct(vparser, struct parser_params, parser); + return rb_enc_from_encoding(parser->enc); +} + +/* + * call-seq: + * ripper.yydebug -> true or false + * + * Get yydebug. + */ +VALUE +rb_parser_get_yydebug(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + return yydebug ? Qtrue : Qfalse; +} + +/* + * call-seq: + * ripper.yydebug = flag + * + * Set yydebug. + */ +VALUE +rb_parser_set_yydebug(VALUE self, VALUE flag) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + yydebug = RTEST(flag); + return flag; +} + +#ifdef YYMALLOC +#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) +#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) +#define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ + (n)->u3.cnt = (c), (p)) + +void * +rb_parser_malloc(struct parser_params *parser, size_t size) +{ + size_t cnt = HEAPCNT(1, size); + NODE *n = NEWHEAP(); + void *ptr = xmalloc(size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) +{ + size_t cnt = HEAPCNT(nelem, size); + NODE *n = NEWHEAP(); + void *ptr = xcalloc(nelem, size); + + return ADD2HEAP(n, cnt, ptr); +} + +void * +rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) +{ + NODE *n; + size_t cnt = HEAPCNT(1, size); + + if (ptr && (n = parser->heap) != NULL) { + do { + if (n->u1.node == ptr) { + n->u1.node = ptr = xrealloc(ptr, size); + if (n->u3.cnt) n->u3.cnt = cnt; + return ptr; + } + } while ((n = n->u2.node) != NULL); + } + n = NEWHEAP(); + ptr = xrealloc(ptr, size); + return ADD2HEAP(n, cnt, ptr); +} + +void +rb_parser_free(struct parser_params *parser, void *ptr) +{ + NODE **prev = &parser->heap, *n; + + while ((n = *prev) != NULL) { + if (n->u1.node == ptr) { + *prev = n->u2.node; + rb_gc_force_recycle((VALUE)n); + break; + } + prev = &n->u2.node; + } + xfree(ptr); +} +#endif +#endif + +#ifdef RIPPER +#ifdef RIPPER_DEBUG +extern int rb_is_pointer_to_heap(VALUE); + +/* :nodoc: */ +static VALUE +ripper_validate_object(VALUE self, VALUE x) +{ + if (x == Qfalse) return x; + if (x == Qtrue) return x; + if (x == Qnil) return x; + if (x == Qundef) + rb_raise(rb_eArgError, "Qundef given"); + if (FIXNUM_P(x)) return x; + if (SYMBOL_P(x)) return x; + if (!rb_is_pointer_to_heap(x)) + rb_raise(rb_eArgError, "invalid pointer: %p", x); + switch (TYPE(x)) { + case T_STRING: + case T_OBJECT: + case T_ARRAY: + case T_BIGNUM: + case T_FLOAT: + return x; + case T_NODE: + rb_raise(rb_eArgError, "NODE given: %p", x); + default: + rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", + x, rb_obj_classname(x)); + } + return x; +} +#endif + +#define validate(x) + +static VALUE +ripper_dispatch0(struct parser_params *parser, ID mid) +{ + return rb_funcall(parser->value, mid, 0); +} + +static VALUE +ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) +{ + validate(a); + return rb_funcall(parser->value, mid, 1, a); +} + +static VALUE +ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) +{ + validate(a); + validate(b); + return rb_funcall(parser->value, mid, 2, a, b); +} + +static VALUE +ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) +{ + validate(a); + validate(b); + validate(c); + return rb_funcall(parser->value, mid, 3, a, b, c); +} + +static VALUE +ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) +{ + validate(a); + validate(b); + validate(c); + validate(d); + return rb_funcall(parser->value, mid, 4, a, b, c, d); +} + +static VALUE +ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) +{ + validate(a); + validate(b); + validate(c); + validate(d); + validate(e); + return rb_funcall(parser->value, mid, 5, a, b, c, d, e); +} + +static const struct kw_assoc { + ID id; + const char *name; +} keyword_to_name[] = { + {keyword_class, "class"}, + {keyword_module, "module"}, + {keyword_def, "def"}, + {keyword_undef, "undef"}, + {keyword_begin, "begin"}, + {keyword_rescue, "rescue"}, + {keyword_ensure, "ensure"}, + {keyword_end, "end"}, + {keyword_if, "if"}, + {keyword_unless, "unless"}, + {keyword_then, "then"}, + {keyword_elsif, "elsif"}, + {keyword_else, "else"}, + {keyword_case, "case"}, + {keyword_when, "when"}, + {keyword_while, "while"}, + {keyword_until, "until"}, + {keyword_for, "for"}, + {keyword_break, "break"}, + {keyword_next, "next"}, + {keyword_redo, "redo"}, + {keyword_retry, "retry"}, + {keyword_in, "in"}, + {keyword_do, "do"}, + {keyword_do_cond, "do"}, + {keyword_do_block, "do"}, + {keyword_return, "return"}, + {keyword_yield, "yield"}, + {keyword_super, "super"}, + {keyword_self, "self"}, + {keyword_nil, "nil"}, + {keyword_true, "true"}, + {keyword_false, "false"}, + {keyword_and, "and"}, + {keyword_or, "or"}, + {keyword_not, "not"}, + {modifier_if, "if"}, + {modifier_unless, "unless"}, + {modifier_while, "while"}, + {modifier_until, "until"}, + {modifier_rescue, "rescue"}, + {keyword_alias, "alias"}, + {keyword_defined, "defined?"}, + {keyword_BEGIN, "BEGIN"}, + {keyword_END, "END"}, + {keyword__LINE__, "__LINE__"}, + {keyword__FILE__, "__FILE__"}, + {keyword__ENCODING__, "__ENCODING__"}, + {0, NULL} +}; + +static const char* +keyword_id_to_str(ID id) +{ + const struct kw_assoc *a; + + for (a = keyword_to_name; a->id; a++) { + if (a->id == id) + return a->name; + } + return NULL; +} + +#undef ripper_id2sym +static VALUE +ripper_id2sym(ID id) +{ + const char *name; + char buf[8]; + + if (id <= 256) { + buf[0] = id; + buf[1] = '\0'; + return ID2SYM(rb_intern(buf)); + } + if ((name = keyword_id_to_str(id))) { + return ID2SYM(rb_intern(name)); + } + switch (id) { + case tOROP: + name = "||"; + break; + case tANDOP: + name = "&&"; + break; + default: + name = rb_id2name(id); + if (!name) { + rb_bug("cannot convert ID to string: %ld", (unsigned long)id); + } + break; + } + return ID2SYM(rb_intern(name)); +} + +static VALUE +ripper_intern(const char *s) +{ + return ID2SYM(rb_intern(s)); +} + +static void +ripper_compile_error(struct parser_params *parser, const char *fmt, ...) +{ + VALUE str; + va_list args; + + va_start(args, fmt); + str = rb_vsprintf(fmt, args); + va_end(args); + rb_funcall(parser->value, rb_intern("compile_error"), 1, str); +} + +static void +ripper_warn0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warnI(struct parser_params *parser, const char *fmt, int a) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), INT2NUM(a)); +} + +#if 0 +static void +ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warn"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} +#endif + +static void +ripper_warning0(struct parser_params *parser, const char *fmt) +{ + rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); +} + +static void +ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) +{ + rb_funcall(parser->value, rb_intern("warning"), 2, + STR_NEW2(fmt), STR_NEW2(str)); +} + +static VALUE +ripper_lex_get_generic(struct parser_params *parser, VALUE src) +{ + return rb_funcall(src, ripper_id_gets, 0); +} + +static VALUE +ripper_s_allocate(VALUE klass) +{ + struct parser_params *p; + VALUE self; + + p = ALLOC_N(struct parser_params, 1); + MEMZERO(p, struct parser_params, 1); + self = Data_Wrap_Struct(klass, parser_mark, parser_free, p); + p->value = self; + return self; +} + +#define ripper_initialized_p(r) ((r)->parser_lex_input != 0) + +/* + * call-seq: + * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper + * + * Create a new Ripper object. + * _src_ must be a String, an IO, or an Object which has #gets method. + * + * This method does not starts parsing. + * See also Ripper#parse and Ripper.parse. + */ +static VALUE +ripper_initialize(int argc, VALUE *argv, VALUE self) +{ + struct parser_params *parser; + VALUE src, fname, lineno; + + Data_Get_Struct(self, struct parser_params, parser); + rb_scan_args(argc, argv, "12", &src, &fname, &lineno); + if (rb_obj_respond_to(src, ripper_id_gets, 0)) { + parser->parser_lex_gets = ripper_lex_get_generic; + } + else { + StringValue(src); + parser->parser_lex_gets = lex_get_str; + } + parser->parser_lex_input = src; + parser->eofp = Qfalse; + if (NIL_P(fname)) { + fname = STR_NEW2("(ripper)"); + } + else { + StringValue(fname); + } + parser_initialize(parser); + + parser->parser_ruby_sourcefile_string = fname; + parser->parser_ruby_sourcefile = RSTRING_PTR(fname); + parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; + + return Qnil; +} + +extern VALUE rb_thread_pass(void); + +struct ripper_args { + struct parser_params *parser; + int argc; + VALUE *argv; +}; + +static VALUE +ripper_parse0(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser_prepare(parser); + ripper_yyparse((void*)parser); + return parser->result; +} + +static VALUE +ripper_ensure(VALUE parser_v) +{ + struct parser_params *parser; + + Data_Get_Struct(parser_v, struct parser_params, parser); + parser->parsing_thread = Qnil; + return Qnil; +} + +/* + * call-seq: + * ripper#parse + * + * Start parsing and returns the value of the root action. + */ +static VALUE +ripper_parse(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (!NIL_P(parser->parsing_thread)) { + if (parser->parsing_thread == rb_thread_current()) + rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); + else + rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); + } + parser->parsing_thread = rb_thread_current(); + rb_ensure(ripper_parse0, self, ripper_ensure, self); + + return parser->result; +} + +/* + * call-seq: + * ripper#column -> Integer + * + * Return column number of current parsing line. + * This number starts from 0. + */ +static VALUE +ripper_column(VALUE self) +{ + struct parser_params *parser; + long col; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + col = parser->tokp - parser->parser_lex_pbeg; + return LONG2NUM(col); +} + +/* + * call-seq: + * ripper#lineno -> Integer + * + * Return line number of current parsing line. + * This number starts from 1. + */ +static VALUE +ripper_lineno(VALUE self) +{ + struct parser_params *parser; + + Data_Get_Struct(self, struct parser_params, parser); + if (!ripper_initialized_p(parser)) { + rb_raise(rb_eArgError, "method called for uninitialized object"); + } + if (NIL_P(parser->parsing_thread)) return Qnil; + return INT2NUM(parser->parser_ruby_sourceline); +} + +#ifdef RIPPER_DEBUG +/* :nodoc: */ +static VALUE +ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) +{ + StringValue(msg); + if (obj == Qundef) { + rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); + } + return Qnil; +} + +/* :nodoc: */ +static VALUE +ripper_value(VALUE self, VALUE obj) +{ + return ULONG2NUM(obj); +} +#endif + +void +Init_ripper(void) +{ + VALUE Ripper; + + Ripper = rb_define_class("Ripper", rb_cObject); + rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); + rb_define_alloc_func(Ripper, ripper_s_allocate); + rb_define_method(Ripper, "initialize", ripper_initialize, -1); + rb_define_method(Ripper, "parse", ripper_parse, 0); + rb_define_method(Ripper, "column", ripper_column, 0); + rb_define_method(Ripper, "lineno", ripper_lineno, 0); + rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); + rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); + rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); + rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); +#ifdef RIPPER_DEBUG + rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); + rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); + rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); +#endif + + ripper_id_gets = rb_intern("gets"); + ripper_init_eventids1(Ripper); + ripper_init_eventids2(Ripper); + /* ensure existing in symbol table */ + rb_intern("||"); + rb_intern("&&"); +} +#endif /* RIPPER */ diff --git a/lib/ruby-1.9.1-rc1/prelude.rb b/lib/ruby-1.9.1-rc1/prelude.rb new file mode 100644 index 0000000..fdf401b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/prelude.rb @@ -0,0 +1,35 @@ + +# Mutex + +class Mutex + def synchronize + self.lock + begin + yield + ensure + self.unlock rescue nil + end + end +end + +# Thread + +class Thread + MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new + def self.exclusive + MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{ + yield + } + end +end + +def require_relative(relative_feature) + c = caller.first + e = c.rindex(/:\d+:in /) + file = $` + if /\A\((.*)\)/ =~ file # eval, etc. + raise LoadError, "require_relative is called in #{$1}" + end + absolute_feature = File.expand_path(File.join(File.dirname(file), relative_feature)) + require absolute_feature +end diff --git a/lib/ruby-1.9.1-rc1/proc.c b/lib/ruby-1.9.1-rc1/proc.c new file mode 100644 index 0000000..b366a42 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/proc.c @@ -0,0 +1,1924 @@ +/********************************************************************** + + proc.c - Proc, Binding, Env + + $Author: yugui $ + created at: Wed Jan 17 12:13:14 2007 + + Copyright (C) 2004-2007 Koichi Sasada + +**********************************************************************/ + +#include "eval_intern.h" +#include "gc.h" + +struct METHOD { + VALUE oclass; /* class that holds the method */ + VALUE rclass; /* class of the receiver */ + VALUE recv; + ID id, oid; + NODE *body; +}; + +VALUE rb_cUnboundMethod; +VALUE rb_cMethod; +VALUE rb_cBinding; +VALUE rb_cProc; + +static VALUE bmcall(VALUE, VALUE); +static int method_arity(VALUE); +static VALUE rb_obj_is_method(VALUE m); + +/* Proc */ + +static void +proc_free(void *ptr) +{ + RUBY_FREE_ENTER("proc"); + if (ptr) { + ruby_xfree(ptr); + } + RUBY_FREE_LEAVE("proc"); +} + +static void +proc_mark(void *ptr) +{ + rb_proc_t *proc; + RUBY_MARK_ENTER("proc"); + if (ptr) { + proc = ptr; + RUBY_MARK_UNLESS_NULL(proc->envval); + RUBY_MARK_UNLESS_NULL(proc->blockprocval); + RUBY_MARK_UNLESS_NULL(proc->block.proc); + RUBY_MARK_UNLESS_NULL(proc->block.self); + if (proc->block.iseq && RUBY_VM_IFUNC_P(proc->block.iseq)) { + RUBY_MARK_UNLESS_NULL((VALUE)(proc->block.iseq)); + } + } + RUBY_MARK_LEAVE("proc"); +} + +VALUE +rb_proc_alloc(VALUE klass) +{ + VALUE obj; + rb_proc_t *proc; + obj = Data_Make_Struct(klass, rb_proc_t, proc_mark, proc_free, proc); + MEMZERO(proc, rb_proc_t, 1); + return obj; +} + +VALUE +rb_obj_is_proc(VALUE proc) +{ + if (TYPE(proc) == T_DATA && + RDATA(proc)->dfree == (RUBY_DATA_FUNC) proc_free) { + return Qtrue; + } + else { + return Qfalse; + } +} + +static VALUE +proc_dup(VALUE self) +{ + VALUE procval = rb_proc_alloc(rb_cProc); + rb_proc_t *src, *dst; + GetProcPtr(self, src); + GetProcPtr(procval, dst); + + dst->block = src->block; + dst->block.proc = procval; + dst->envval = src->envval; + dst->safe_level = src->safe_level; + dst->is_lambda = src->is_lambda; + + return procval; +} + +static VALUE +proc_clone(VALUE self) +{ + VALUE procval = proc_dup(self); + CLONESETUP(procval, self); + return procval; +} + +/* + * call-seq: + * prc.lambda? => true or false + * + * Returns true for a Proc object which argument handling is rigid. + * Such procs are typically generated by lambda. + * + * A Proc object generated by proc ignore extra arguments. + * + * proc {|a,b| [a,b] }.call(1,2,3) => [1,2] + * + * It provides nil for lacked arguments. + * + * proc {|a,b| [a,b] }.call(1) => [1,nil] + * + * It expand single-array argument. + * + * proc {|a,b| [a,b] }.call([1,2]) => [1,2] + * + * A Proc object generated by lambda doesn't have such tricks. + * + * lambda {|a,b| [a,b] }.call(1,2,3) => ArgumentError + * lambda {|a,b| [a,b] }.call(1) => ArgumentError + * lambda {|a,b| [a,b] }.call([1,2]) => ArgumentError + * + * Proc#lambda? is a predicate for the tricks. + * It returns true if no tricks. + * + * lambda {}.lambda? => true + * proc {}.lambda? => false + * + * Proc.new is same as proc. + * + * Proc.new {}.lambda? => false + * + * lambda, proc and Proc.new preserves the tricks of + * a Proc object given by & argument. + * + * lambda(&lambda {}).lambda? => true + * proc(&lambda {}).lambda? => true + * Proc.new(&lambda {}).lambda? => true + * + * lambda(&proc {}).lambda? => false + * proc(&proc {}).lambda? => false + * Proc.new(&proc {}).lambda? => false + * + * A Proc object generated by & argument has the tricks + * + * def n(&b) b.lambda? end + * n {} => false + * + * The & argument preserves the tricks if a Proc object is given + * by & argument. + * + * n(&lambda {}) => true + * n(&proc {}) => false + * n(&Proc.new {}) => false + * + * A Proc object converted from a method has no tricks. + * + * def m() end + * method(:m).to_proc.lambda? => true + * + * n(&method(:m)) => true + * n(&method(:m).to_proc) => true + * + * define_method is treated same as method definition. + * The defined method has no tricks. + * + * class C + * define_method(:d) {} + * end + * C.new.e(1,2) => ArgumentError + * C.new.method(:d).to_proc.lambda? => true + * + * define_method always defines a method without the tricks, + * even if a non-lambda Proc object is given. + * This is the only exception which the tricks are not preserved. + * + * class C + * define_method(:e, &proc {}) + * end + * C.new.e(1,2) => ArgumentError + * C.new.method(:e).to_proc.lambda? => true + * + * This exception is for a wrapper of define_method. + * It eases defining a method defining method which defines a usual method which has no tricks. + * + * class << C + * def def2(name, &body) + * define_method(name, &body) + * end + * end + * class C + * def2(:f) {} + * end + * C.new.f(1,2) => ArgumentError + * + * The wrapper, def2, defines a method which has no tricks. + * + */ + +static VALUE +proc_lambda_p(VALUE procval) +{ + rb_proc_t *proc; + GetProcPtr(procval, proc); + + return proc->is_lambda ? Qtrue : Qfalse; +} + +/* Binding */ + +static void +binding_free(void *ptr) +{ + rb_binding_t *bind; + RUBY_FREE_ENTER("binding"); + if (ptr) { + bind = ptr; + ruby_xfree(ptr); + } + RUBY_FREE_LEAVE("binding"); +} + +static void +binding_mark(void *ptr) +{ + rb_binding_t *bind; + RUBY_MARK_ENTER("binding"); + if (ptr) { + bind = ptr; + RUBY_MARK_UNLESS_NULL(bind->env); + } + RUBY_MARK_LEAVE("binding"); +} + +static VALUE +binding_alloc(VALUE klass) +{ + VALUE obj; + rb_binding_t *bind; + obj = Data_Make_Struct(klass, rb_binding_t, binding_mark, binding_free, bind); + return obj; +} + +static VALUE +binding_dup(VALUE self) +{ + VALUE bindval = binding_alloc(rb_cBinding); + rb_binding_t *src, *dst; + GetBindingPtr(self, src); + GetBindingPtr(bindval, dst); + dst->env = src->env; + return bindval; +} + +static VALUE +binding_clone(VALUE self) +{ + VALUE bindval = binding_dup(self); + CLONESETUP(bindval, self); + return bindval; +} + +rb_control_frame_t *vm_get_ruby_level_next_cfp(rb_thread_t *th, rb_control_frame_t *cfp); + +VALUE +rb_binding_new(void) +{ + rb_thread_t *th = GET_THREAD(); + rb_control_frame_t *cfp = vm_get_ruby_level_next_cfp(th, th->cfp); + VALUE bindval = binding_alloc(rb_cBinding); + rb_binding_t *bind; + + if (cfp == 0) { + rb_raise(rb_eRuntimeError, "Can't create Binding Object on top of Fiber."); + } + + GetBindingPtr(bindval, bind); + bind->env = vm_make_env_object(th, cfp); + return bindval; +} + +/* + * call-seq: + * binding -> a_binding + * + * Returns a +Binding+ object, describing the variable and + * method bindings at the point of call. This object can be used when + * calling +eval+ to execute the evaluated command in this + * environment. Also see the description of class +Binding+. + * + * def getBinding(param) + * return binding + * end + * b = getBinding("hello") + * eval("param", b) #=> "hello" + */ + +static VALUE +rb_f_binding(VALUE self) +{ + return rb_binding_new(); +} + +/* + * call-seq: + * binding.eval(string [, filename [,lineno]]) => obj + * + * Evaluates the Ruby expression(s) in string, in the + * binding's context. If the optional filename and + * lineno parameters are present, they will be used when + * reporting syntax errors. + * + * def getBinding(param) + * return binding + * end + * b = getBinding("hello") + * b.eval("param") #=> "hello" + */ + +static VALUE +bind_eval(int argc, VALUE *argv, VALUE bindval) +{ + VALUE args[4]; + + rb_scan_args(argc, argv, "12", &args[0], &args[2], &args[3]); + args[1] = bindval; + return rb_f_eval(argc+1, args, Qnil /* self will be searched in eval */); +} + +static VALUE +proc_new(VALUE klass, int is_lambda) +{ + VALUE procval = Qnil; + rb_thread_t *th = GET_THREAD(); + rb_control_frame_t *cfp = th->cfp; + rb_block_t *block; + + if ((GC_GUARDED_PTR_REF(cfp->lfp[0])) != 0 && + !RUBY_VM_CLASS_SPECIAL_P(cfp->lfp[0])) { + + block = GC_GUARDED_PTR_REF(cfp->lfp[0]); + } + else { + cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp); + + if ((GC_GUARDED_PTR_REF(cfp->lfp[0])) != 0 && + !RUBY_VM_CLASS_SPECIAL_P(cfp->lfp[0])) { + + block = GC_GUARDED_PTR_REF(cfp->lfp[0]); + + if (is_lambda) { + rb_warn("tried to create Proc object without a block"); + } + } + else { + rb_raise(rb_eArgError, + "tried to create Proc object without a block"); + } + } + + procval = block->proc; + + if (procval) { + if (RBASIC(procval)->klass == klass) { + return procval; + } + else { + VALUE newprocval = proc_dup(procval); + RBASIC(newprocval)->klass = klass; + return newprocval; + } + } + + procval = vm_make_proc(th, block, klass); + + if (is_lambda) { + rb_proc_t *proc; + GetProcPtr(procval, proc); + proc->is_lambda = Qtrue; + } + return procval; +} + +/* + * call-seq: + * Proc.new {|...| block } => a_proc + * Proc.new => a_proc + * + * Creates a new Proc object, bound to the current + * context. Proc::new may be called without a block only + * within a method with an attached block, in which case that block is + * converted to the Proc object. + * + * def proc_from + * Proc.new + * end + * proc = proc_from { "hello" } + * proc.call #=> "hello" + */ + +static VALUE +rb_proc_s_new(int argc, VALUE *argv, VALUE klass) +{ + VALUE block = proc_new(klass, Qfalse); + + rb_obj_call_init(block, argc, argv); + return block; +} + +/* + * call-seq: + * proc { |...| block } => a_proc + * + * Equivalent to Proc.new. + */ + +VALUE +rb_block_proc(void) +{ + return proc_new(rb_cProc, Qfalse); +} + +VALUE +rb_block_lambda(void) +{ + return proc_new(rb_cProc, Qtrue); +} + +VALUE +rb_f_lambda(void) +{ + rb_warn("rb_f_lambda() is deprecated; use rb_block_proc() instead"); + return rb_block_lambda(); +} + +/* + * call-seq: + * lambda { |...| block } => a_proc + * + * Equivalent to Proc.new, except the resulting Proc objects + * check the number of parameters passed when called. + */ + +static VALUE +proc_lambda(void) +{ + return rb_block_lambda(); +} + +/* CHECKME: are the argument checking semantics correct? */ + +/* + * call-seq: + * prc.call(params,...) => obj + * prc[params,...] => obj + * prc.(params,...) => obj + * + * Invokes the block, setting the block's parameters to the values in + * params using something close to method calling semantics. + * Generates a warning if multiple values are passed to a proc that + * expects just one (previously this silently converted the parameters + * to an array). Note that prc.() invokes prc.call() with the parameters + * given. It's a syntax sugar to hide "call". + * + * For procs created using Kernel.proc, generates an + * error if the wrong number of parameters + * are passed to a proc with multiple parameters. For procs created using + * Proc.new, extra parameters are silently discarded. + * + * Returns the value of the last expression evaluated in the block. See + * also Proc#yield. + * + * a_proc = Proc.new {|a, *b| b.collect {|i| i*a }} + * a_proc.call(9, 1, 2, 3) #=> [9, 18, 27] + * a_proc[9, 1, 2, 3] #=> [9, 18, 27] + * a_proc = Proc.new {|a,b| a} + * a_proc.call(1,2,3) + * + * produces: + * + * prog.rb:5: wrong number of arguments (3 for 2) (ArgumentError) + * from prog.rb:4:in `call' + * from prog.rb:5 + */ + +/* + * call-seq: + * prc === obj => obj + * + * Invokes the block, with obj as the block's parameter. It is + * to allow a proc object to be a target of when clause in the case statement. + */ + +static VALUE +proc_call(int argc, VALUE *argv, VALUE procval) +{ + rb_proc_t *proc; + rb_block_t *blockptr = 0; + rb_iseq_t *iseq; + GetProcPtr(procval, proc); + + iseq = proc->block.iseq; + if (BUILTIN_TYPE(iseq) == T_NODE || iseq->arg_block != -1) { + if (rb_block_given_p()) { + rb_proc_t *proc; + VALUE procval; + procval = rb_block_proc(); + GetProcPtr(procval, proc); + blockptr = &proc->block; + } + } + + return vm_invoke_proc(GET_THREAD(), proc, proc->block.self, + argc, argv, blockptr); +} + +VALUE +rb_proc_call(VALUE self, VALUE args) +{ + rb_proc_t *proc; + GetProcPtr(self, proc); + return vm_invoke_proc(GET_THREAD(), proc, proc->block.self, + RARRAY_LEN(args), RARRAY_PTR(args), 0); +} + +VALUE +rb_proc_call_with_block(VALUE self, int argc, VALUE *argv, VALUE pass_procval) +{ + rb_proc_t *proc; + rb_block_t *block = 0; + GetProcPtr(self, proc); + + if (!NIL_P(pass_procval)) { + rb_proc_t *pass_proc; + GetProcPtr(pass_procval, pass_proc); + block = &pass_proc->block; + } + + return vm_invoke_proc(GET_THREAD(), proc, proc->block.self, + argc, argv, block); +} + +/* + * call-seq: + * prc.arity -> fixnum + * + * Returns the number of arguments that would not be ignored. If the block + * is declared to take no arguments, returns 0. If the block is known + * to take exactly n arguments, returns n. If the block has optional + * arguments, return -n-1, where n is the number of mandatory + * arguments. A proc with no argument declarations + * is the same a block declaring || as its arguments. + * + * Proc.new {}.arity #=> 0 + * Proc.new {||}.arity #=> 0 + * Proc.new {|a|}.arity #=> 1 + * Proc.new {|a,b|}.arity #=> 2 + * Proc.new {|a,b,c|}.arity #=> 3 + * Proc.new {|*a|}.arity #=> -1 + * Proc.new {|a,*b|}.arity #=> -2 + * Proc.new {|a,*b, c|}.arity #=> -3 + */ + +static VALUE +proc_arity(VALUE self) +{ + rb_proc_t *proc; + rb_iseq_t *iseq; + GetProcPtr(self, proc); + iseq = proc->block.iseq; + if (iseq) { + if (BUILTIN_TYPE(iseq) != T_NODE) { + if (iseq->arg_rest < 0) { + return INT2FIX(iseq->argc); + } + else { + return INT2FIX(-(iseq->argc + 1 + iseq->arg_post_len)); + } + } + else { + NODE *node = (NODE *)iseq; + if (nd_type(node) == NODE_IFUNC && node->nd_cfnc == bmcall) { + /* method(:foo).to_proc.arity */ + return INT2FIX(method_arity(node->nd_tval)); + } + } + } + return INT2FIX(-1); +} + +int +rb_proc_arity(VALUE proc) +{ + return FIX2INT(proc_arity(proc)); +} + +static rb_iseq_t * +get_proc_iseq(VALUE self) +{ + rb_proc_t *proc; + rb_iseq_t *iseq; + + GetProcPtr(self, proc); + iseq = proc->block.iseq; + if (!RUBY_VM_NORMAL_ISEQ_P(iseq)) + return 0; + return iseq; +} + +static VALUE +iseq_location(rb_iseq_t *iseq) +{ + VALUE loc[2]; + + if (!iseq) return Qnil; + loc[0] = iseq->filename; + if (iseq->insn_info_table) { + loc[1] = INT2FIX(rb_iseq_first_lineno(iseq)); + } + else { + loc[1] = Qnil; + } + return rb_ary_new4(2, loc); +} + +/* + * call-seq: + * prc.source_location => [String, Fixnum] + * + * returns the ruby source filename and line number containing this proc + * or nil if this proc was not defined in ruby (i.e. native) + */ + +VALUE +rb_proc_location(VALUE self) +{ + return iseq_location(get_proc_iseq(self)); +} + +/* + * call-seq: + * prc == other_proc => true or false + * + * Return true if prc is the same object as + * other_proc, or if they are both procs with the same body. + */ + +static VALUE +proc_eq(VALUE self, VALUE other) +{ + if (self == other) { + return Qtrue; + } + else { + if (TYPE(other) == T_DATA && + RDATA(other)->dmark == proc_mark) { + rb_proc_t *p1, *p2; + GetProcPtr(self, p1); + GetProcPtr(other, p2); + if (p1->envval == p2->envval && + p1->block.iseq->iseq_size == p2->block.iseq->iseq_size && + p1->block.iseq->local_size == p2->block.iseq->local_size && + MEMCMP(p1->block.iseq->iseq, p2->block.iseq->iseq, VALUE, + p1->block.iseq->iseq_size) == 0) { + return Qtrue; + } + } + } + return Qfalse; +} + +/* + * call-seq: + * prc.hash => integer + * + * Return hash value corresponding to proc body. + */ + +static VALUE +proc_hash(VALUE self) +{ + int hash; + rb_proc_t *proc; + GetProcPtr(self, proc); + hash = (long)proc->block.iseq; + hash ^= (long)proc->envval; + hash ^= (long)proc->block.lfp >> 16; + return INT2FIX(hash); +} + +/* + * call-seq: + * prc.to_s => string + * + * Shows the unique identifier for this proc, along with + * an indication of where the proc was defined. + */ + +static VALUE +proc_to_s(VALUE self) +{ + VALUE str = 0; + rb_proc_t *proc; + const char *cname = rb_obj_classname(self); + rb_iseq_t *iseq; + const char *is_lambda; + + GetProcPtr(self, proc); + iseq = proc->block.iseq; + is_lambda = proc->is_lambda ? " (lambda)" : ""; + + if (RUBY_VM_NORMAL_ISEQ_P(iseq)) { + int line_no = 0; + + if (iseq->insn_info_table) { + line_no = rb_iseq_first_lineno(iseq); + } + str = rb_sprintf("#<%s:%p@%s:%d%s>", cname, (void *)self, + RSTRING_PTR(iseq->filename), + line_no, is_lambda); + } + else { + str = rb_sprintf("#<%s:%p%s>", cname, (void *)proc->block.iseq, + is_lambda); + } + + if (OBJ_TAINTED(self)) { + OBJ_TAINT(str); + } + return str; +} + +/* + * call-seq: + * prc.to_proc -> prc + * + * Part of the protocol for converting objects to Proc + * objects. Instances of class Proc simply return + * themselves. + */ + +static VALUE +proc_to_proc(VALUE self) +{ + return self; +} + +static void +bm_mark(struct METHOD *data) +{ + rb_gc_mark(data->rclass); + rb_gc_mark(data->oclass); + rb_gc_mark(data->recv); + rb_gc_mark((VALUE)data->body); +} + +NODE * +rb_method_body(VALUE method) +{ + struct METHOD *data; + + if (TYPE(method) == T_DATA && + RDATA(method)->dmark == (RUBY_DATA_FUNC) bm_mark) { + Data_Get_Struct(method, struct METHOD, data); + return data->body; + } + else { + return 0; + } +} + +NODE *rb_get_method_body(VALUE klass, ID id, ID *idp); + +static VALUE +mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope) +{ + VALUE method; + NODE *body; + struct METHOD *data; + VALUE rclass = klass; + ID oid = id; + + again: + if ((body = rb_get_method_body(klass, id, 0)) == 0) { + rb_print_undef(rclass, oid, 0); + } + if (scope && (body->nd_noex & NOEX_MASK) != NOEX_PUBLIC) { + rb_print_undef(rclass, oid, (body->nd_noex & NOEX_MASK)); + } + + klass = body->nd_clss; + body = body->nd_body; + + if (nd_type(body) == NODE_ZSUPER) { + klass = RCLASS_SUPER(klass); + goto again; + } + + while (rclass != klass && + (FL_TEST(rclass, FL_SINGLETON) || TYPE(rclass) == T_ICLASS)) { + rclass = RCLASS_SUPER(rclass); + } + if (TYPE(klass) == T_ICLASS) + klass = RBASIC(klass)->klass; + method = Data_Make_Struct(mclass, struct METHOD, bm_mark, -1, data); + data->oclass = klass; + data->recv = obj; + + data->id = id; + data->body = body; + data->rclass = rclass; + data->oid = oid; + OBJ_INFECT(method, klass); + + return method; +} + + +/********************************************************************** + * + * Document-class : Method + * + * Method objects are created by Object#method, and are + * associated with a particular object (not just with a class). They + * may be used to invoke the method within the object, and as a block + * associated with an iterator. They may also be unbound from one + * object (creating an UnboundMethod) and bound to + * another. + * + * class Thing + * def square(n) + * n*n + * end + * end + * thing = Thing.new + * meth = thing.method(:square) + * + * meth.call(9) #=> 81 + * [ 1, 2, 3 ].collect(&meth) #=> [1, 4, 9] + * + */ + +/* + * call-seq: + * meth == other_meth => true or false + * + * Two method objects are equal if that are bound to the same + * object and contain the same body. + */ + + +static VALUE +method_eq(VALUE method, VALUE other) +{ + struct METHOD *m1, *m2; + + if (TYPE(other) != T_DATA + || RDATA(other)->dmark != (RUBY_DATA_FUNC) bm_mark) + return Qfalse; + if (CLASS_OF(method) != CLASS_OF(other)) + return Qfalse; + + Data_Get_Struct(method, struct METHOD, m1); + Data_Get_Struct(other, struct METHOD, m2); + + if (m1->oclass != m2->oclass || m1->rclass != m2->rclass || + m1->recv != m2->recv || m1->body != m2->body) + return Qfalse; + + return Qtrue; +} + +/* + * call-seq: + * meth.hash => integer + * + * Return a hash value corresponding to the method object. + */ + +static VALUE +method_hash(VALUE method) +{ + struct METHOD *m; + long hash; + + Data_Get_Struct(method, struct METHOD, m); + hash = (long)m->oclass; + hash ^= (long)m->rclass; + hash ^= (long)m->recv; + hash ^= (long)m->body; + + return INT2FIX(hash); +} + +/* + * call-seq: + * meth.unbind => unbound_method + * + * Dissociates meth from it's current receiver. The resulting + * UnboundMethod can subsequently be bound to a new object + * of the same class (see UnboundMethod). + */ + +static VALUE +method_unbind(VALUE obj) +{ + VALUE method; + struct METHOD *orig, *data; + + Data_Get_Struct(obj, struct METHOD, orig); + method = + Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, -1, data); + data->oclass = orig->oclass; + data->recv = Qundef; + data->id = orig->id; + data->body = orig->body; + data->rclass = orig->rclass; + data->oid = orig->oid; + OBJ_INFECT(method, obj); + + return method; +} + +/* + * call-seq: + * meth.receiver => object + * + * Returns the bound receiver of the method object. + */ + +static VALUE +method_receiver(VALUE obj) +{ + struct METHOD *data; + + Data_Get_Struct(obj, struct METHOD, data); + return data->recv; +} + +/* + * call-seq: + * meth.name => symbol + * + * Returns the name of the method. + */ + +static VALUE +method_name(VALUE obj) +{ + struct METHOD *data; + + Data_Get_Struct(obj, struct METHOD, data); + return ID2SYM(data->id); +} + +/* + * call-seq: + * meth.owner => class_or_module + * + * Returns the class or module that defines the method. + */ + +static VALUE +method_owner(VALUE obj) +{ + struct METHOD *data; + + Data_Get_Struct(obj, struct METHOD, data); + return data->oclass; +} + +/* + * call-seq: + * obj.method(sym) => method + * + * Looks up the named method as a receiver in obj, returning a + * Method object (or raising NameError). The + * Method object acts as a closure in obj's object + * instance, so instance variables and the value of self + * remain available. + * + * class Demo + * def initialize(n) + * @iv = n + * end + * def hello() + * "Hello, @iv = #{@iv}" + * end + * end + * + * k = Demo.new(99) + * m = k.method(:hello) + * m.call #=> "Hello, @iv = 99" + * + * l = Demo.new('Fred') + * m = l.method("hello") + * m.call #=> "Hello, @iv = Fred" + */ + +VALUE +rb_obj_method(VALUE obj, VALUE vid) +{ + return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod, Qfalse); +} + +VALUE +rb_obj_public_method(VALUE obj, VALUE vid) +{ + return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod, Qtrue); +} + +/* + * call-seq: + * mod.instance_method(symbol) => unbound_method + * + * Returns an +UnboundMethod+ representing the given + * instance method in _mod_. + * + * class Interpreter + * def do_a() print "there, "; end + * def do_d() print "Hello "; end + * def do_e() print "!\n"; end + * def do_v() print "Dave"; end + * Dispatcher = { + * ?a => instance_method(:do_a), + * ?d => instance_method(:do_d), + * ?e => instance_method(:do_e), + * ?v => instance_method(:do_v) + * } + * def interpret(string) + * string.each_byte {|b| Dispatcher[b].bind(self).call } + * end + * end + * + * + * interpreter = Interpreter.new + * interpreter.interpret('dave') + * + * produces: + * + * Hello there, Dave! + */ + +static VALUE +rb_mod_instance_method(VALUE mod, VALUE vid) +{ + return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod, Qfalse); +} + +static VALUE +rb_mod_public_instance_method(VALUE mod, VALUE vid) +{ + return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod, Qtrue); +} + +/* + * call-seq: + * define_method(symbol, method) => new_method + * define_method(symbol) { block } => proc + * + * Defines an instance method in the receiver. The _method_ + * parameter can be a +Proc+ or +Method+ object. + * If a block is specified, it is used as the method body. This block + * is evaluated using instance_eval, a point that is + * tricky to demonstrate because define_method is private. + * (This is why we resort to the +send+ hack in this example.) + * + * class A + * def fred + * puts "In Fred" + * end + * def create_method(name, &block) + * self.class.send(:define_method, name, &block) + * end + * define_method(:wilma) { puts "Charge it!" } + * end + * class B < A + * define_method(:barney, instance_method(:fred)) + * end + * a = B.new + * a.barney + * a.wilma + * a.create_method(:betty) { p self } + * a.betty + * + * produces: + * + * In Fred + * Charge it! + * # + */ + +static VALUE +rb_mod_define_method(int argc, VALUE *argv, VALUE mod) +{ + ID id; + VALUE body; + NODE *node; + int noex = NOEX_PUBLIC; + + if (argc == 1) { + id = rb_to_id(argv[0]); + body = rb_block_lambda(); + } + else if (argc == 2) { + id = rb_to_id(argv[0]); + body = argv[1]; + if (!rb_obj_is_method(body) && !rb_obj_is_proc(body)) { + rb_raise(rb_eTypeError, + "wrong argument type %s (expected Proc/Method)", + rb_obj_classname(body)); + } + } + else { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); + } + + if (RDATA(body)->dmark == (RUBY_DATA_FUNC) bm_mark) { + struct METHOD *method = (struct METHOD *)DATA_PTR(body); + VALUE rclass = method->rclass; + if (rclass != mod) { + if (FL_TEST(rclass, FL_SINGLETON)) { + rb_raise(rb_eTypeError, + "can't bind singleton method to a different class"); + } + if (!RTEST(rb_class_inherited_p(mod, rclass))) { + rb_raise(rb_eTypeError, + "bind argument must be a subclass of %s", + rb_class2name(rclass)); + } + } + node = method->body; + } + else if (rb_obj_is_proc(body)) { + rb_proc_t *proc; + body = proc_dup(body); + GetProcPtr(body, proc); + if (BUILTIN_TYPE(proc->block.iseq) != T_NODE) { + proc->block.iseq->defined_method_id = id; + proc->block.iseq->klass = mod; + proc->is_lambda = Qtrue; + proc->is_from_method = Qtrue; + } + node = NEW_BMETHOD(body); + } + else { + /* type error */ + rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)"); + } + + /* TODO: visibility */ + + rb_add_method(mod, id, node, noex); + return body; +} + +static VALUE +rb_obj_define_method(int argc, VALUE *argv, VALUE obj) +{ + VALUE klass = rb_singleton_class(obj); + + return rb_mod_define_method(argc, argv, klass); +} + + +/* + * MISSING: documentation + */ + +static VALUE +method_clone(VALUE self) +{ + VALUE clone; + struct METHOD *orig, *data; + + Data_Get_Struct(self, struct METHOD, orig); + clone = Data_Make_Struct(CLASS_OF(self), struct METHOD, bm_mark, -1, data); + CLONESETUP(clone, self); + *data = *orig; + + return clone; +} + +/* + * call-seq: + * meth.call(args, ...) => obj + * meth[args, ...] => obj + * + * Invokes the meth with the specified arguments, returning the + * method's return value. + * + * m = 12.method("+") + * m.call(3) #=> 15 + * m.call(20) #=> 32 + */ + +VALUE +rb_method_call(int argc, VALUE *argv, VALUE method) +{ + VALUE result = Qnil; /* OK */ + struct METHOD *data; + int state; + volatile int safe = -1; + + Data_Get_Struct(method, struct METHOD, data); + if (data->recv == Qundef) { + rb_raise(rb_eTypeError, "can't call unbound method; bind first"); + } + PUSH_TAG(); + if (OBJ_TAINTED(method)) { + safe = rb_safe_level(); + if (rb_safe_level() < 4) { + rb_set_safe_level_force(4); + } + } + if ((state = EXEC_TAG()) == 0) { + rb_thread_t *th = GET_THREAD(); + VALUE rb_vm_call(rb_thread_t * th, VALUE klass, VALUE recv, VALUE id, ID oid, + int argc, const VALUE *argv, const NODE *body, int nosuper); + + PASS_PASSED_BLOCK_TH(th); + result = rb_vm_call(th, data->oclass, data->recv, data->id, data->oid, + argc, argv, data->body, 0); + } + POP_TAG(); + if (safe >= 0) + rb_set_safe_level_force(safe); + if (state) + JUMP_TAG(state); + return result; +} + +/********************************************************************** + * + * Document-class: UnboundMethod + * + * Ruby supports two forms of objectified methods. Class + * Method is used to represent methods that are associated + * with a particular object: these method objects are bound to that + * object. Bound method objects for an object can be created using + * Object#method. + * + * Ruby also supports unbound methods; methods objects that are not + * associated with a particular object. These can be created either by + * calling Module#instance_method or by calling + * unbind on a bound method object. The result of both of + * these is an UnboundMethod object. + * + * Unbound methods can only be called after they are bound to an + * object. That object must be be a kind_of? the method's original + * class. + * + * class Square + * def area + * @side * @side + * end + * def initialize(side) + * @side = side + * end + * end + * + * area_un = Square.instance_method(:area) + * + * s = Square.new(12) + * area = area_un.bind(s) + * area.call #=> 144 + * + * Unbound methods are a reference to the method at the time it was + * objectified: subsequent changes to the underlying class will not + * affect the unbound method. + * + * class Test + * def test + * :original + * end + * end + * um = Test.instance_method(:test) + * class Test + * def test + * :modified + * end + * end + * t = Test.new + * t.test #=> :modified + * um.bind(t).call #=> :original + * + */ + +/* + * call-seq: + * umeth.bind(obj) -> method + * + * Bind umeth to obj. If Klass was the class + * from which umeth was obtained, + * obj.kind_of?(Klass) must be true. + * + * class A + * def test + * puts "In test, class = #{self.class}" + * end + * end + * class B < A + * end + * class C < B + * end + * + * + * um = B.instance_method(:test) + * bm = um.bind(C.new) + * bm.call + * bm = um.bind(B.new) + * bm.call + * bm = um.bind(A.new) + * bm.call + * + * produces: + * + * In test, class = C + * In test, class = B + * prog.rb:16:in `bind': bind argument must be an instance of B (TypeError) + * from prog.rb:16 + */ + +static VALUE +umethod_bind(VALUE method, VALUE recv) +{ + struct METHOD *data, *bound; + + Data_Get_Struct(method, struct METHOD, data); + if (data->rclass != CLASS_OF(recv)) { + if (FL_TEST(data->rclass, FL_SINGLETON)) { + rb_raise(rb_eTypeError, + "singleton method called for a different object"); + } + if (!rb_obj_is_kind_of(recv, data->rclass)) { + rb_raise(rb_eTypeError, "bind argument must be an instance of %s", + rb_class2name(data->rclass)); + } + } + + method = Data_Make_Struct(rb_cMethod, struct METHOD, bm_mark, -1, bound); + *bound = *data; + bound->recv = recv; + bound->rclass = CLASS_OF(recv); + + return method; +} + +int +rb_node_arity(NODE* body) +{ + switch (nd_type(body)) { + case NODE_CFUNC: + if (body->nd_argc < 0) + return -1; + return body->nd_argc; + case NODE_ZSUPER: + return -1; + case NODE_ATTRSET: + return 1; + case NODE_IVAR: + return 0; + case NODE_BMETHOD: + return rb_proc_arity(body->nd_cval); + case RUBY_VM_METHOD_NODE: + { + rb_iseq_t *iseq; + GetISeqPtr((VALUE)body->nd_body, iseq); + if (iseq->arg_rest == -1 && iseq->arg_opts == 0) { + return iseq->argc; + } + else { + return -(iseq->argc + 1 + iseq->arg_post_len); + } + } + default: + rb_raise(rb_eArgError, "invalid node 0x%x", nd_type(body)); + } +} + +/* + * call-seq: + * meth.arity => fixnum + * + * Returns an indication of the number of arguments accepted by a + * method. Returns a nonnegative integer for methods that take a fixed + * number of arguments. For Ruby methods that take a variable number of + * arguments, returns -n-1, where n is the number of required + * arguments. For methods written in C, returns -1 if the call takes a + * variable number of arguments. + * + * class C + * def one; end + * def two(a); end + * def three(*a); end + * def four(a, b); end + * def five(a, b, *c); end + * def six(a, b, *c, &d); end + * end + * c = C.new + * c.method(:one).arity #=> 0 + * c.method(:two).arity #=> 1 + * c.method(:three).arity #=> -1 + * c.method(:four).arity #=> 2 + * c.method(:five).arity #=> -3 + * c.method(:six).arity #=> -3 + * + * "cat".method(:size).arity #=> 0 + * "cat".method(:replace).arity #=> 1 + * "cat".method(:squeeze).arity #=> -1 + * "cat".method(:count).arity #=> -1 + */ + +static VALUE +method_arity_m(VALUE method) +{ + int n = method_arity(method); + return INT2FIX(n); +} + +static int +method_arity(VALUE method) +{ + struct METHOD *data; + + Data_Get_Struct(method, struct METHOD, data); + return rb_node_arity(data->body); +} + +int +rb_mod_method_arity(VALUE mod, ID id) +{ + NODE *node = rb_method_node(mod, id); + return rb_node_arity(node); +} + +int +rb_obj_method_arity(VALUE obj, ID id) +{ + return rb_mod_method_arity(CLASS_OF(obj), id); +} + +static rb_iseq_t * +get_method_iseq(VALUE method) +{ + struct METHOD *data; + NODE *body; + rb_iseq_t *iseq; + + Data_Get_Struct(method, struct METHOD, data); + body = data->body; + switch (nd_type(body)) { + case RUBY_VM_METHOD_NODE: + GetISeqPtr((VALUE)body->nd_body, iseq); + if (RUBY_VM_NORMAL_ISEQ_P(iseq)) break; + default: + return 0; + } + return iseq; +} + +/* + * call-seq: + * meth.source_location => [String, Fixnum] + * + * returns the ruby source filename and line number containing this method + * or nil if this method was not defined in ruby (i.e. native) + */ + +VALUE +rb_method_location(VALUE method) +{ + return iseq_location(get_method_iseq(method)); +} + +/* + * call-seq: + * meth.to_s => string + * meth.inspect => string + * + * Show the name of the underlying method. + * + * "cat".method(:count).inspect #=> "#" + */ + +static VALUE +method_inspect(VALUE method) +{ + struct METHOD *data; + VALUE str; + const char *s; + const char *sharp = "#"; + + Data_Get_Struct(method, struct METHOD, data); + str = rb_str_buf_new2("#<"); + s = rb_obj_classname(method); + rb_str_buf_cat2(str, s); + rb_str_buf_cat2(str, ": "); + + if (FL_TEST(data->oclass, FL_SINGLETON)) { + VALUE v = rb_iv_get(data->oclass, "__attached__"); + + if (data->recv == Qundef) { + rb_str_buf_append(str, rb_inspect(data->oclass)); + } + else if (data->recv == v) { + rb_str_buf_append(str, rb_inspect(v)); + sharp = "."; + } + else { + rb_str_buf_append(str, rb_inspect(data->recv)); + rb_str_buf_cat2(str, "("); + rb_str_buf_append(str, rb_inspect(v)); + rb_str_buf_cat2(str, ")"); + sharp = "."; + } + } + else { + rb_str_buf_cat2(str, rb_class2name(data->rclass)); + if (data->rclass != data->oclass) { + rb_str_buf_cat2(str, "("); + rb_str_buf_cat2(str, rb_class2name(data->oclass)); + rb_str_buf_cat2(str, ")"); + } + } + rb_str_buf_cat2(str, sharp); + rb_str_append(str, rb_id2str(data->oid)); + rb_str_buf_cat2(str, ">"); + + return str; +} + +static VALUE +mproc(VALUE method) +{ + return rb_funcall(Qnil, rb_intern("proc"), 0); +} + +static VALUE +mlambda(VALUE method) +{ + return rb_funcall(Qnil, rb_intern("lambda"), 0); +} + +static VALUE +bmcall(VALUE args, VALUE method) +{ + volatile VALUE a; + + if (CLASS_OF(args) != rb_cArray) { + args = rb_ary_new3(1, args); + } + + a = args; + return rb_method_call(RARRAY_LEN(a), RARRAY_PTR(a), method); +} + +VALUE +rb_proc_new( + VALUE (*func)(ANYARGS), /* VALUE yieldarg[, VALUE procarg] */ + VALUE val) +{ + VALUE procval = rb_iterate(mproc, 0, func, val); + return procval; +} + +/* + * call-seq: + * meth.to_proc => prc + * + * Returns a Proc object corresponding to this method. + */ + +static VALUE +method_proc(VALUE method) +{ + VALUE procval; + rb_proc_t *proc; + /* + * class Method + * def to_proc + * proc{|*args| + * self.call(*args) + * } + * end + * end + */ + procval = rb_iterate(mlambda, 0, bmcall, method); + GetProcPtr(procval, proc); + proc->is_from_method = 1; + return procval; +} + +static VALUE +rb_obj_is_method(VALUE m) +{ + if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC) bm_mark) { + return Qtrue; + } + return Qfalse; +} + +/* + * call_seq: + * local_jump_error.exit_value => obj + * + * Returns the exit value associated with this +LocalJumpError+. + */ +static VALUE +localjump_xvalue(VALUE exc) +{ + return rb_iv_get(exc, "@exit_value"); +} + +/* + * call-seq: + * local_jump_error.reason => symbol + * + * The reason this block was terminated: + * :break, :redo, :retry, :next, :return, or :noreason. + */ + +static VALUE +localjump_reason(VALUE exc) +{ + return rb_iv_get(exc, "@reason"); +} + +/* + * call-seq: + * prc.binding => binding + * + * Returns the binding associated with prc. Note that + * Kernel#eval accepts either a Proc or a + * Binding object as its second parameter. + * + * def fred(param) + * proc {} + * end + * + * b = fred(99) + * eval("param", b.binding) #=> 99 + */ +static VALUE +proc_binding(VALUE self) +{ + rb_proc_t *proc; + VALUE bindval = binding_alloc(rb_cBinding); + rb_binding_t *bind; + + GetProcPtr(self, proc); + GetBindingPtr(bindval, bind); + + if (TYPE(proc->block.iseq) == T_NODE) { + rb_raise(rb_eArgError, "Can't create Binding from C level Proc"); + } + + bind->env = proc->envval; + return bindval; +} + +static VALUE curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc); + +static VALUE +make_curry_proc(VALUE proc, VALUE passed, VALUE arity) +{ + VALUE args = rb_ary_new3(3, proc, passed, arity); + rb_ary_freeze(passed); + rb_ary_freeze(args); + return rb_proc_new(curry, args); +} + +static VALUE +curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc) +{ + VALUE proc, passed, arity; + proc = RARRAY_PTR(args)[0]; + passed = RARRAY_PTR(args)[1]; + arity = RARRAY_PTR(args)[2]; + + passed = rb_ary_plus(passed, rb_ary_new4(argc, argv)); + rb_ary_freeze(passed); + + if(RARRAY_LEN(passed) < FIX2INT(arity)) { + if (!NIL_P(passed_proc)) { + rb_warn("given block not used"); + } + arity = make_curry_proc(proc, passed, arity); + return arity; + } + else { + return rb_proc_call_with_block(proc, RARRAY_LEN(passed), RARRAY_PTR(passed), passed_proc); + } +} + + /* + * call-seq: + * prc.curry => a_proc + * prc.curry(arity) => a_proc + * + * Returns a curried proc. If the optional arity argument is given, + * it determines the number of arguments. + * A curried proc receives some arguments. If a sufficient number of + * arguments are supplied, it passes the supplied arguments to the original + * proc and returns the result. Otherwise, returns another curried proc that + * takes the rest of arguments. + * + * b = proc {|x, y, z| (x||0) + (y||0) + (z||0) } + * p b.curry[1][2][3] #=> 6 + * p b.curry[1, 2][3, 4] #=> 6 + * p b.curry(5)[1][2][3][4][5] #=> 6 + * p b.curry(5)[1, 2][3, 4][5] #=> 6 + * p b.curry(1)[1] #=> 1 + * + * b = proc {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.inject(0, &:+) } + * p b.curry[1][2][3] #=> 6 + * p b.curry[1, 2][3, 4] #=> 10 + * p b.curry(5)[1][2][3][4][5] #=> 15 + * p b.curry(5)[1, 2][3, 4][5] #=> 15 + * p b.curry(1)[1] #=> 1 + * + * b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) } + * p b.curry[1][2][3] #=> 6 + * p b.curry[1, 2][3, 4] #=> wrong number of arguments (4 or 3) + * p b.curry(5) #=> wrong number of arguments (5 or 3) + * p b.curry(1) #=> wrong number of arguments (1 or 3) + * + * b = lambda {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.inject(0, &:+) } + * p b.curry[1][2][3] #=> 6 + * p b.curry[1, 2][3, 4] #=> 10 + * p b.curry(5)[1][2][3][4][5] #=> 15 + * p b.curry(5)[1, 2][3, 4][5] #=> 15 + * p b.curry(1) #=> wrong number of arguments (1 or 3) + * + * b = proc { :foo } + * p b.curry[] #=> :foo + */ +static VALUE +proc_curry(int argc, VALUE *argv, VALUE self) +{ + int sarity, marity = FIX2INT(proc_arity(self)); + VALUE arity, opt = Qfalse; + + if (marity < 0) { + marity = -marity - 1; + opt = Qtrue; + } + + rb_scan_args(argc, argv, "01", &arity); + if (NIL_P(arity)) { + arity = INT2FIX(marity); + } + else { + sarity = FIX2INT(arity); + if (proc_lambda_p(self) && (sarity < marity || (sarity > marity && !opt))) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", sarity, marity); + } + } + + return make_curry_proc(self, rb_ary_new(), arity); +} + +/* + * Proc objects are blocks of code that have been bound to + * a set of local variables. Once bound, the code may be called in + * different contexts and still access those variables. + * + * def gen_times(factor) + * return Proc.new {|n| n*factor } + * end + * + * times3 = gen_times(3) + * times5 = gen_times(5) + * + * times3.call(12) #=> 36 + * times5.call(5) #=> 25 + * times3.call(times5.call(4)) #=> 60 + * + */ + +void +Init_Proc(void) +{ + /* Proc */ + rb_cProc = rb_define_class("Proc", rb_cObject); + rb_undef_alloc_func(rb_cProc); + rb_define_singleton_method(rb_cProc, "new", rb_proc_s_new, -1); + rb_define_method(rb_cProc, "call", proc_call, -1); + rb_define_method(rb_cProc, "[]", proc_call, -1); + rb_define_method(rb_cProc, "===", proc_call, -1); + rb_define_method(rb_cProc, "yield", proc_call, -1); + rb_define_method(rb_cProc, "to_proc", proc_to_proc, 0); + rb_define_method(rb_cProc, "arity", proc_arity, 0); + rb_define_method(rb_cProc, "clone", proc_clone, 0); + rb_define_method(rb_cProc, "dup", proc_dup, 0); + rb_define_method(rb_cProc, "==", proc_eq, 1); + rb_define_method(rb_cProc, "eql?", proc_eq, 1); + rb_define_method(rb_cProc, "hash", proc_hash, 0); + rb_define_method(rb_cProc, "to_s", proc_to_s, 0); + rb_define_method(rb_cProc, "lambda?", proc_lambda_p, 0); + rb_define_method(rb_cProc, "binding", proc_binding, 0); + rb_define_method(rb_cProc, "curry", proc_curry, -1); + rb_define_method(rb_cProc, "source_location", rb_proc_location, 0); + + /* Exceptions */ + rb_eLocalJumpError = rb_define_class("LocalJumpError", rb_eStandardError); + rb_define_method(rb_eLocalJumpError, "exit_value", localjump_xvalue, 0); + rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0); + + rb_eSysStackError = rb_define_class("SystemStackError", rb_eException); + sysstack_error = rb_exc_new3(rb_eSysStackError, + rb_obj_freeze(rb_str_new2("stack level too deep"))); + OBJ_TAINT(sysstack_error); + OBJ_FREEZE(sysstack_error); + + /* utility functions */ + rb_define_global_function("proc", rb_block_proc, 0); + rb_define_global_function("lambda", proc_lambda, 0); + + /* Method */ + rb_cMethod = rb_define_class("Method", rb_cObject); + rb_undef_alloc_func(rb_cMethod); + rb_undef_method(CLASS_OF(rb_cMethod), "new"); + rb_define_method(rb_cMethod, "==", method_eq, 1); + rb_define_method(rb_cMethod, "eql?", method_eq, 1); + rb_define_method(rb_cMethod, "hash", method_hash, 0); + rb_define_method(rb_cMethod, "clone", method_clone, 0); + rb_define_method(rb_cMethod, "call", rb_method_call, -1); + rb_define_method(rb_cMethod, "[]", rb_method_call, -1); + rb_define_method(rb_cMethod, "arity", method_arity_m, 0); + rb_define_method(rb_cMethod, "inspect", method_inspect, 0); + rb_define_method(rb_cMethod, "to_s", method_inspect, 0); + rb_define_method(rb_cMethod, "to_proc", method_proc, 0); + rb_define_method(rb_cMethod, "receiver", method_receiver, 0); + rb_define_method(rb_cMethod, "name", method_name, 0); + rb_define_method(rb_cMethod, "owner", method_owner, 0); + rb_define_method(rb_cMethod, "unbind", method_unbind, 0); + rb_define_method(rb_cMethod, "source_location", rb_method_location, 0); + rb_define_method(rb_mKernel, "method", rb_obj_method, 1); + rb_define_method(rb_mKernel, "public_method", rb_obj_public_method, 1); + + /* UnboundMethod */ + rb_cUnboundMethod = rb_define_class("UnboundMethod", rb_cObject); + rb_undef_alloc_func(rb_cUnboundMethod); + rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new"); + rb_define_method(rb_cUnboundMethod, "==", method_eq, 1); + rb_define_method(rb_cUnboundMethod, "eql?", method_eq, 1); + rb_define_method(rb_cUnboundMethod, "hash", method_hash, 0); + rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0); + rb_define_method(rb_cUnboundMethod, "arity", method_arity_m, 0); + rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0); + rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0); + rb_define_method(rb_cUnboundMethod, "name", method_name, 0); + rb_define_method(rb_cUnboundMethod, "owner", method_owner, 0); + rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1); + rb_define_method(rb_cUnboundMethod, "source_location", rb_method_location, 0); + + /* Module#*_method */ + rb_define_method(rb_cModule, "instance_method", rb_mod_instance_method, 1); + rb_define_method(rb_cModule, "public_instance_method", rb_mod_public_instance_method, 1); + rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1); + + /* Kernel */ + rb_define_method(rb_mKernel, "define_singleton_method", rb_obj_define_method, -1); +} + +/* + * Objects of class Binding encapsulate the execution + * context at some particular place in the code and retain this context + * for future use. The variables, methods, value of self, + * and possibly an iterator block that can be accessed in this context + * are all retained. Binding objects can be created using + * Kernel#binding, and are made available to the callback + * of Kernel#set_trace_func. + * + * These binding objects can be passed as the second argument of the + * Kernel#eval method, establishing an environment for the + * evaluation. + * + * class Demo + * def initialize(n) + * @secret = n + * end + * def getBinding + * return binding() + * end + * end + * + * k1 = Demo.new(99) + * b1 = k1.getBinding + * k2 = Demo.new(-3) + * b2 = k2.getBinding + * + * eval("@secret", b1) #=> 99 + * eval("@secret", b2) #=> -3 + * eval("@secret") #=> nil + * + * Binding objects have no class-specific methods. + * + */ + +void +Init_Binding(void) +{ + rb_cBinding = rb_define_class("Binding", rb_cObject); + rb_undef_alloc_func(rb_cBinding); + rb_undef_method(CLASS_OF(rb_cBinding), "new"); + rb_define_method(rb_cBinding, "clone", binding_clone, 0); + rb_define_method(rb_cBinding, "dup", binding_dup, 0); + rb_define_method(rb_cBinding, "eval", bind_eval, -1); + rb_define_global_function("binding", rb_f_binding, 0); +} + diff --git a/lib/ruby-1.9.1-rc1/process.c b/lib/ruby-1.9.1-rc1/process.c new file mode 100644 index 0000000..1b98d06 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/process.c @@ -0,0 +1,5225 @@ +/********************************************************************** + + process.c - + + $Author: yugui $ + created at: Tue Aug 10 14:30:50 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/io.h" +#include "ruby/util.h" +#include "vm_core.h" + +#include +#include +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif + +#include +#include + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + +struct timeval rb_time_interval(VALUE); + +#ifdef HAVE_SYS_WAIT_H +# include +#endif +#ifdef HAVE_SYS_RESOURCE_H +# include +#endif +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +#endif +#include "ruby/st.h" + +#ifdef __EMX__ +#undef HAVE_GETPGRP +#endif + +#include + +#ifdef HAVE_SYS_TIMES_H +#include +#endif + +#ifdef HAVE_GRP_H +#include +#endif + +#if defined(HAVE_TIMES) || defined(_WIN32) +static VALUE rb_cProcessTms; +#endif + +#ifndef WIFEXITED +#define WIFEXITED(w) (((w) & 0xff) == 0) +#endif +#ifndef WIFSIGNALED +#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) +#endif +#ifndef WIFSTOPPED +#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(w) (((w) >> 8) & 0xff) +#endif +#ifndef WTERMSIG +#define WTERMSIG(w) ((w) & 0x7f) +#endif +#ifndef WSTOPSIG +#define WSTOPSIG WEXITSTATUS +#endif + +#if defined(__APPLE__) && ( defined(__MACH__) || defined(__DARWIN__) ) && !defined(__MacOS_X__) +#define __MacOS_X__ 1 +#endif + +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) +#define HAVE_44BSD_SETUID 1 +#define HAVE_44BSD_SETGID 1 +#endif + +#ifdef __NetBSD__ +#undef HAVE_SETRUID +#undef HAVE_SETRGID +#endif + +#ifdef BROKEN_SETREUID +#define setreuid ruby_setreuid +#endif +#ifdef BROKEN_SETREGID +#define setregid ruby_setregid +#endif + +#if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__) +#if !defined(USE_SETREUID) && !defined(BROKEN_SETREUID) +#define OBSOLETE_SETREUID 1 +#endif +#if !defined(USE_SETREGID) && !defined(BROKEN_SETREGID) +#define OBSOLETE_SETREGID 1 +#endif +#endif + +#if SIZEOF_RLIM_T == SIZEOF_INT +# define RLIM2NUM(v) UINT2NUM(v) +# define NUM2RLIM(v) NUM2UINT(v) +#elif SIZEOF_RLIM_T == SIZEOF_LONG +# define RLIM2NUM(v) ULONG2NUM(v) +# define NUM2RLIM(v) NUM2ULONG(v) +#elif SIZEOF_RLIM_T == SIZEOF_LONG_LONG +# define RLIM2NUM(v) ULL2NUM(v) +# define NUM2RLIM(v) NUM2ULL(v) +#endif + +#define preserving_errno(stmts) \ + do {int saved_errno = errno; stmts; errno = saved_errno;} while (0) + + +/* + * call-seq: + * Process.pid => fixnum + * + * Returns the process id of this process. Not available on all + * platforms. + * + * Process.pid #=> 27415 + */ + +static VALUE +get_pid(void) +{ + rb_secure(2); + return PIDT2NUM(getpid()); +} + + +/* + * call-seq: + * Process.ppid => fixnum + * + * Returns the process id of the parent of this process. Returns + * untrustworthy value on Win32/64. Not available on all platforms. + * + * puts "I am #{Process.pid}" + * Process.fork { puts "Dad is #{Process.ppid}" } + * + * produces: + * + * I am 27417 + * Dad is 27417 + */ + +static VALUE +get_ppid(void) +{ + rb_secure(2); + return PIDT2NUM(getppid()); +} + + +/********************************************************************* + * + * Document-class: Process::Status + * + * Process::Status encapsulates the information on the + * status of a running or terminated system process. The built-in + * variable $? is either +nil+ or a + * Process::Status object. + * + * fork { exit 99 } #=> 26557 + * Process.wait #=> 26557 + * $?.class #=> Process::Status + * $?.to_i #=> 25344 + * $? >> 8 #=> 99 + * $?.stopped? #=> false + * $?.exited? #=> true + * $?.exitstatus #=> 99 + * + * Posix systems record information on processes using a 16-bit + * integer. The lower bits record the process status (stopped, + * exited, signaled) and the upper bits possibly contain additional + * information (for example the program's return code in the case of + * exited processes). Pre Ruby 1.8, these bits were exposed directly + * to the Ruby program. Ruby now encapsulates these in a + * Process::Status object. To maximize compatibility, + * however, these objects retain a bit-oriented interface. In the + * descriptions that follow, when we talk about the integer value of + * _stat_, we're referring to this 16 bit value. + */ + +static VALUE rb_cProcessStatus; + +VALUE +rb_last_status_get(void) +{ + return GET_THREAD()->last_status; +} + +void +rb_last_status_set(int status, rb_pid_t pid) +{ + rb_thread_t *th = GET_THREAD(); + th->last_status = rb_obj_alloc(rb_cProcessStatus); + rb_iv_set(th->last_status, "status", INT2FIX(status)); + rb_iv_set(th->last_status, "pid", PIDT2NUM(pid)); +} + +static void +rb_last_status_clear(void) +{ + GET_THREAD()->last_status = Qnil; +} + +/* + * call-seq: + * stat.to_i => fixnum + * stat.to_int => fixnum + * + * Returns the bits in _stat_ as a Fixnum. Poking + * around in these bits is platform dependent. + * + * fork { exit 0xab } #=> 26566 + * Process.wait #=> 26566 + * sprintf('%04x', $?.to_i) #=> "ab00" + */ + +static VALUE +pst_to_i(VALUE st) +{ + return rb_iv_get(st, "status"); +} + +#define PST2INT(st) NUM2INT(pst_to_i(st)) + +/* + * call-seq: + * stat.pid => fixnum + * + * Returns the process ID that this status object represents. + * + * fork { exit } #=> 26569 + * Process.wait #=> 26569 + * $?.pid #=> 26569 + */ + +static VALUE +pst_pid(VALUE st) +{ + return rb_attr_get(st, rb_intern("pid")); +} + +static void +pst_message(VALUE str, rb_pid_t pid, int status) +{ + rb_str_catf(str, "pid %ld", (long)pid); + if (WIFSTOPPED(status)) { + int stopsig = WSTOPSIG(status); + const char *signame = ruby_signal_name(stopsig); + if (signame) { + rb_str_catf(str, " stopped SIG%s (signal %d)", signame, stopsig); + } + else { + rb_str_catf(str, " stopped signal %d", stopsig); + } + } + if (WIFSIGNALED(status)) { + int termsig = WTERMSIG(status); + const char *signame = ruby_signal_name(termsig); + if (signame) { + rb_str_catf(str, " SIG%s (signal %d)", signame, termsig); + } + else { + rb_str_catf(str, " signal %d", termsig); + } + } + if (WIFEXITED(status)) { + rb_str_catf(str, " exit %d", WEXITSTATUS(status)); + } +#ifdef WCOREDUMP + if (WCOREDUMP(status)) { + rb_str_cat2(str, " (core dumped)"); + } +#endif +} + + +/* + * call-seq: + * stat.to_s => string + * + * Show pid and exit status as a string. + */ + +static VALUE +pst_to_s(VALUE st) +{ + rb_pid_t pid; + int status; + VALUE str; + + pid = NUM2LONG(pst_pid(st)); + status = PST2INT(st); + + str = rb_str_buf_new(0); + pst_message(str, pid, status); + return str; +} + + +/* + * call-seq: + * stat.inspect => string + * + * Override the inspection method. + */ + +static VALUE +pst_inspect(VALUE st) +{ + rb_pid_t pid; + int status; + VALUE vpid, str; + + vpid = pst_pid(st); + if (NIL_P(vpid)) { + return rb_sprintf("#<%s: uninitialized>", rb_class2name(CLASS_OF(st))); + } + pid = NUM2LONG(vpid); + status = PST2INT(st); + + str = rb_sprintf("#<%s: ", rb_class2name(CLASS_OF(st))); + pst_message(str, pid, status); + rb_str_cat2(str, ">"); + return str; +} + + +/* + * call-seq: + * stat == other => true or false + * + * Returns +true+ if the integer value of _stat_ + * equals other. + */ + +static VALUE +pst_equal(VALUE st1, VALUE st2) +{ + if (st1 == st2) return Qtrue; + return rb_equal(pst_to_i(st1), st2); +} + + +/* + * call-seq: + * stat & num => fixnum + * + * Logical AND of the bits in _stat_ with num. + * + * fork { exit 0x37 } + * Process.wait + * sprintf('%04x', $?.to_i) #=> "3700" + * sprintf('%04x', $? & 0x1e00) #=> "1600" + */ + +static VALUE +pst_bitand(VALUE st1, VALUE st2) +{ + int status = PST2INT(st1) & NUM2INT(st2); + + return INT2NUM(status); +} + + +/* + * call-seq: + * stat >> num => fixnum + * + * Shift the bits in _stat_ right num places. + * + * fork { exit 99 } #=> 26563 + * Process.wait #=> 26563 + * $?.to_i #=> 25344 + * $? >> 8 #=> 99 + */ + +static VALUE +pst_rshift(VALUE st1, VALUE st2) +{ + int status = PST2INT(st1) >> NUM2INT(st2); + + return INT2NUM(status); +} + + +/* + * call-seq: + * stat.stopped? => true or false + * + * Returns +true+ if this process is stopped. This is only + * returned if the corresponding wait call had the + * WUNTRACED flag set. + */ + +static VALUE +pst_wifstopped(VALUE st) +{ + int status = PST2INT(st); + + if (WIFSTOPPED(status)) + return Qtrue; + else + return Qfalse; +} + + +/* + * call-seq: + * stat.stopsig => fixnum or nil + * + * Returns the number of the signal that caused _stat_ to stop + * (or +nil+ if self is not stopped). + */ + +static VALUE +pst_wstopsig(VALUE st) +{ + int status = PST2INT(st); + + if (WIFSTOPPED(status)) + return INT2NUM(WSTOPSIG(status)); + return Qnil; +} + + +/* + * call-seq: + * stat.signaled? => true or false + * + * Returns +true+ if _stat_ terminated because of + * an uncaught signal. + */ + +static VALUE +pst_wifsignaled(VALUE st) +{ + int status = PST2INT(st); + + if (WIFSIGNALED(status)) + return Qtrue; + else + return Qfalse; +} + + +/* + * call-seq: + * stat.termsig => fixnum or nil + * + * Returns the number of the signal that caused _stat_ to + * terminate (or +nil+ if self was not terminated by an + * uncaught signal). + */ + +static VALUE +pst_wtermsig(VALUE st) +{ + int status = PST2INT(st); + + if (WIFSIGNALED(status)) + return INT2NUM(WTERMSIG(status)); + return Qnil; +} + + +/* + * call-seq: + * stat.exited? => true or false + * + * Returns +true+ if _stat_ exited normally (for + * example using an exit() call or finishing the + * program). + */ + +static VALUE +pst_wifexited(VALUE st) +{ + int status = PST2INT(st); + + if (WIFEXITED(status)) + return Qtrue; + else + return Qfalse; +} + + +/* + * call-seq: + * stat.exitstatus => fixnum or nil + * + * Returns the least significant eight bits of the return code of + * _stat_. Only available if exited? is + * +true+. + * + * fork { } #=> 26572 + * Process.wait #=> 26572 + * $?.exited? #=> true + * $?.exitstatus #=> 0 + * + * fork { exit 99 } #=> 26573 + * Process.wait #=> 26573 + * $?.exited? #=> true + * $?.exitstatus #=> 99 + */ + +static VALUE +pst_wexitstatus(VALUE st) +{ + int status = PST2INT(st); + + if (WIFEXITED(status)) + return INT2NUM(WEXITSTATUS(status)); + return Qnil; +} + + +/* + * call-seq: + * stat.success? => true, false or nil + * + * Returns +true+ if _stat_ is successful, +false+ if not. + * Returns +nil+ if exited? is not +true+. + */ + +static VALUE +pst_success_p(VALUE st) +{ + int status = PST2INT(st); + + if (!WIFEXITED(status)) + return Qnil; + return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse; +} + + +/* + * call-seq: + * stat.coredump? => true or false + * + * Returns +true+ if _stat_ generated a coredump + * when it terminated. Not available on all platforms. + */ + +static VALUE +pst_wcoredump(VALUE st) +{ +#ifdef WCOREDUMP + int status = PST2INT(st); + + if (WCOREDUMP(status)) + return Qtrue; + else + return Qfalse; +#else + return Qfalse; +#endif +} + +#if !defined(HAVE_WAITPID) && !defined(HAVE_WAIT4) +#define NO_WAITPID +static st_table *pid_tbl; +#else +struct waitpid_arg { + rb_pid_t pid; + int *st; + int flags; +}; +#endif + +static VALUE +rb_waitpid_blocking(void *data) +{ + rb_pid_t result; +#ifndef NO_WAITPID + struct waitpid_arg *arg = data; +#endif + +#if defined NO_WAITPID + result = wait(data); +#elif defined HAVE_WAITPID + result = waitpid(arg->pid, arg->st, arg->flags); +#else /* HAVE_WAIT4 */ + result = wait4(arg->pid, arg->st, arg->flags, NULL); +#endif + + return (VALUE)result; +} + +rb_pid_t +rb_waitpid(rb_pid_t pid, int *st, int flags) +{ + rb_pid_t result; +#ifndef NO_WAITPID + struct waitpid_arg arg; + +retry: + arg.pid = pid; + arg.st = st; + arg.flags = flags; + result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, &arg, + RUBY_UBF_PROCESS, 0); + if (result < 0) { + if (errno == EINTR) { + RUBY_VM_CHECK_INTS(); + goto retry; + } + return -1; + } +#else /* NO_WAITPID */ + if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) { + rb_last_status_set(*st, pid); + st_delete(pid_tbl, (st_data_t*)&pid, NULL); + return pid; + } + + if (flags) { + rb_raise(rb_eArgError, "can't do waitpid with flags"); + } + + for (;;) { + result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, + st, RUBY_UBF_PROCESS); + if (result < 0) { + if (errno == EINTR) { + rb_thread_schedule(); + continue; + } + return -1; + } + if (result == pid) { + break; + } + if (!pid_tbl) + pid_tbl = st_init_numtable(); + st_insert(pid_tbl, pid, (st_data_t)st); + if (!rb_thread_alone()) rb_thread_schedule(); + } +#endif + if (result > 0) { + rb_last_status_set(*st, result); + } + return result; +} + +#ifdef NO_WAITPID +struct wait_data { + rb_pid_t pid; + int status; +}; + +static int +wait_each(rb_pid_t pid, int status, struct wait_data *data) +{ + if (data->status != -1) return ST_STOP; + + data->pid = pid; + data->status = status; + return ST_DELETE; +} + +static int +waitall_each(rb_pid_t pid, int status, VALUE ary) +{ + rb_last_status_set(status, pid); + rb_ary_push(ary, rb_assoc_new(PIDT2NUM(pid), rb_last_status_get()); + return ST_DELETE; +} +#endif + + +/* [MG]:FIXME: I wasn't sure how this should be done, since ::wait() + has historically been documented as if it didn't take any arguments + despite the fact that it's just an alias for ::waitpid(). The way I + have it below is more truthful, but a little confusing. + + I also took the liberty of putting in the pid values, as they're + pretty useful, and it looked as if the original 'ri' output was + supposed to contain them after "[...]depending on the value of + aPid:". + + The 'ansi' and 'bs' formats of the ri output don't display the + definition list for some reason, but the plain text one does. + */ + +/* + * call-seq: + * Process.wait() => fixnum + * Process.wait(pid=-1, flags=0) => fixnum + * Process.waitpid(pid=-1, flags=0) => fixnum + * + * Waits for a child process to exit, returns its process id, and + * sets $? to a Process::Status object + * containing information on that process. Which child it waits on + * depends on the value of _pid_: + * + * > 0:: Waits for the child whose process ID equals _pid_. + * + * 0:: Waits for any child whose process group ID equals that of the + * calling process. + * + * -1:: Waits for any child process (the default if no _pid_ is + * given). + * + * < -1:: Waits for any child whose process group ID equals the absolute + * value of _pid_. + * + * The _flags_ argument may be a logical or of the flag values + * Process::WNOHANG (do not block if no child available) + * or Process::WUNTRACED (return stopped children that + * haven't been reported). Not all flags are available on all + * platforms, but a flag value of zero will work on all platforms. + * + * Calling this method raises a SystemError if there are + * no child processes. Not available on all platforms. + * + * include Process + * fork { exit 99 } #=> 27429 + * wait #=> 27429 + * $?.exitstatus #=> 99 + * + * pid = fork { sleep 3 } #=> 27440 + * Time.now #=> 2008-03-08 19:56:16 +0900 + * waitpid(pid, Process::WNOHANG) #=> nil + * Time.now #=> 2008-03-08 19:56:16 +0900 + * waitpid(pid, 0) #=> 27440 + * Time.now #=> 2008-03-08 19:56:19 +0900 + */ + +static VALUE +proc_wait(int argc, VALUE *argv) +{ + VALUE vpid, vflags; + rb_pid_t pid; + int flags, status; + + rb_secure(2); + flags = 0; + if (argc == 0) { + pid = -1; + } + else { + rb_scan_args(argc, argv, "02", &vpid, &vflags); + pid = NUM2PIDT(vpid); + if (argc == 2 && !NIL_P(vflags)) { + flags = NUM2UINT(vflags); + } + } + if ((pid = rb_waitpid(pid, &status, flags)) < 0) + rb_sys_fail(0); + if (pid == 0) { + rb_last_status_clear(); + return Qnil; + } + return PIDT2NUM(pid); +} + + +/* + * call-seq: + * Process.wait2(pid=-1, flags=0) => [pid, status] + * Process.waitpid2(pid=-1, flags=0) => [pid, status] + * + * Waits for a child process to exit (see Process::waitpid for exact + * semantics) and returns an array containing the process id and the + * exit status (a Process::Status object) of that + * child. Raises a SystemError if there are no child + * processes. + * + * Process.fork { exit 99 } #=> 27437 + * pid, status = Process.wait2 + * pid #=> 27437 + * status.exitstatus #=> 99 + */ + +static VALUE +proc_wait2(int argc, VALUE *argv) +{ + VALUE pid = proc_wait(argc, argv); + if (NIL_P(pid)) return Qnil; + return rb_assoc_new(pid, rb_last_status_get()); +} + + +/* + * call-seq: + * Process.waitall => [ [pid1,status1], ...] + * + * Waits for all children, returning an array of + * _pid_/_status_ pairs (where _status_ is a + * Process::Status object). + * + * fork { sleep 0.2; exit 2 } #=> 27432 + * fork { sleep 0.1; exit 1 } #=> 27433 + * fork { exit 0 } #=> 27434 + * p Process.waitall + * + * produces: + * + * [[27434, #], + * [27433, #], + * [27432, #]] + */ + +static VALUE +proc_waitall(void) +{ + VALUE result; + rb_pid_t pid; + int status; + + rb_secure(2); + result = rb_ary_new(); +#ifdef NO_WAITPID + if (pid_tbl) { + st_foreach(pid_tbl, waitall_each, result); + } +#else + rb_last_status_clear(); +#endif + + for (pid = -1;;) { +#ifdef NO_WAITPID + pid = wait(&status); +#else + pid = rb_waitpid(-1, &status, 0); +#endif + if (pid == -1) { + if (errno == ECHILD) + break; +#ifdef NO_WAITPID + if (errno == EINTR) { + rb_thread_schedule(); + continue; + } +#endif + rb_sys_fail(0); + } +#ifdef NO_WAITPID + rb_last_status_set(status, pid); +#endif + rb_ary_push(result, rb_assoc_new(PIDT2NUM(pid), rb_last_status_get())); + } + return result; +} + +static inline ID +id_pid(void) +{ + ID pid; + CONST_ID(pid, "pid"); + return pid; +} + +static VALUE +detach_process_pid(VALUE thread) +{ + return rb_thread_local_aref(thread, id_pid()); +} + +static VALUE +detach_process_watcher(void *arg) +{ + rb_pid_t cpid, pid = (rb_pid_t)(VALUE)arg; + int status; + + while ((cpid = rb_waitpid(pid, &status, 0)) == 0) { + /* wait while alive */ + } + return rb_last_status_get(); +} + +VALUE +rb_detach_process(rb_pid_t pid) +{ + VALUE watcher = rb_thread_create(detach_process_watcher, (void*)(VALUE)pid); + rb_thread_local_aset(watcher, id_pid(), PIDT2NUM(pid)); + rb_define_singleton_method(watcher, "pid", detach_process_pid, 0); + return watcher; +} + + +/* + * call-seq: + * Process.detach(pid) => thread + * + * Some operating systems retain the status of terminated child + * processes until the parent collects that status (normally using + * some variant of wait(). If the parent never collects + * this status, the child stays around as a zombie process. + * Process::detach prevents this by setting up a + * separate Ruby thread whose sole job is to reap the status of the + * process _pid_ when it terminates. Use detach + * only when you do not intent to explicitly wait for the child to + * terminate. + * + * The waiting thread returns the exit status of the detached process + * when it terminates, so you can use Thread#join to + * know the result. If specified _pid_ is not a valid child process + * ID, the thread returns +nil+ immediately. + * + * In this first example, we don't reap the first child process, so + * it appears as a zombie in the process status display. + * + * p1 = fork { sleep 0.1 } + * p2 = fork { sleep 0.2 } + * Process.waitpid(p2) + * sleep 2 + * system("ps -ho pid,state -p #{p1}") + * + * produces: + * + * 27389 Z + * + * In the next example, Process::detach is used to reap + * the child automatically. + * + * p1 = fork { sleep 0.1 } + * p2 = fork { sleep 0.2 } + * Process.detach(p1) + * Process.waitpid(p2) + * sleep 2 + * system("ps -ho pid,state -p #{p1}") + * + * (produces no output) + */ + +static VALUE +proc_detach(VALUE obj, VALUE pid) +{ + rb_secure(2); + return rb_detach_process(NUM2PIDT(pid)); +} + +#ifndef HAVE_STRING_H +char *strtok(); +#endif + +void rb_thread_stop_timer_thread(void); +void rb_thread_start_timer_thread(void); +void rb_thread_reset_timer_thread(void); + +static int forked_child = 0; + +#define before_exec() \ + (rb_enable_interrupt(), forked_child ? 0 : rb_thread_stop_timer_thread()) +#define after_exec() \ + (rb_thread_reset_timer_thread(), rb_thread_start_timer_thread(), forked_child = 0, rb_disable_interrupt()) +#define before_fork() before_exec() +#define after_fork() (GET_THREAD()->thrown_errinfo = 0, after_exec()) + +#include "dln.h" + +static void +security(const char *str) +{ + if (rb_env_path_tainted()) { + if (rb_safe_level() > 0) { + rb_raise(rb_eSecurityError, "Insecure PATH - %s", str); + } + } +} + +static int +proc_exec_v(char **argv, const char *prog) +{ + char fbuf[MAXPATHLEN]; + + if (!prog) + prog = argv[0]; + prog = dln_find_exe_r(prog, 0, fbuf, sizeof(fbuf)); + if (!prog) { + errno = ENOENT; + return -1; + } + +#if defined(__EMX__) || defined(OS2) + { +#define COMMAND "cmd.exe" + char *extension; + + if ((extension = strrchr(prog, '.')) != NULL && STRCASECMP(extension, ".bat") == 0) { + char **new_argv; + char *p; + int n; + + for (n = 0; argv[n]; n++) + /* no-op */; + new_argv = ALLOCA_N(char*, n + 2); + for (; n > 0; n--) + new_argv[n + 1] = argv[n]; + new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]); + for (p = new_argv[1]; *p != '\0'; p++) + if (*p == '/') + *p = '\\'; + new_argv[0] = COMMAND; + argv = new_argv; + prog = dln_find_exe_r(argv[0], 0, fbuf, sizeof(fbuf)); + if (!prog) { + errno = ENOENT; + return -1; + } + } + } +#endif /* __EMX__ */ + before_exec(); + execv(prog, argv); + preserving_errno(after_exec()); + return -1; +} + +int +rb_proc_exec_n(int argc, VALUE *argv, const char *prog) +{ + char **args; + int i; + + args = ALLOCA_N(char*, argc+1); + for (i=0; i()~&|\\$;'`\"\n",*s)) { +#if defined(__CYGWIN32__) || defined(__EMX__) + char fbuf[MAXPATHLEN]; + char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); + int status = -1; + before_exec(); + if (shell) + execl(shell, "sh", "-c", str, (char *) NULL); + else + status = system(str); + after_exec(); + if (status != -1) + exit(status); +#else + before_exec(); + execl("/bin/sh", "sh", "-c", str, (char *)NULL); + preserving_errno(after_exec()); +#endif + return -1; + } + } + a = argv = ALLOCA_N(char*, (s-str)/2+2); + ss = ALLOCA_N(char, s-str+1); + memcpy(ss, str, s-str); + ss[s-str] = '\0'; + if ((*a++ = strtok(ss, " \t")) != 0) { + while ((t = strtok(NULL, " \t")) != 0) { + *a++ = t; + } + *a = NULL; + } + if (argv[0]) { + return proc_exec_v(argv, 0); + } + errno = ENOENT; +#endif /* _WIN32 */ + return -1; +} + +#if defined(_WIN32) +#define HAVE_SPAWNV 1 +#endif + +#if !defined(HAVE_FORK) && defined(HAVE_SPAWNV) +#if defined(_WIN32) +#define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv) +#else +static rb_pid_t +proc_spawn_v(char **argv, char *prog) +{ + char fbuf[MAXPATHLEN]; + char *extension; + rb_pid_t status; + + if (!prog) + prog = argv[0]; + security(prog); + prog = dln_find_exe_r(prog, 0, fbuf, sizeof(fbuf)); + if (!prog) + return -1; + + before_exec(); + status = spawnv(P_WAIT, prog, argv); + rb_last_status_set(status == -1 ? 127 : status, 0); + after_exec(); + return status; +} +#endif + +static rb_pid_t +proc_spawn_n(int argc, VALUE *argv, VALUE prog) +{ + char **args; + int i; + + args = ALLOCA_N(char*, argc + 1); + for (i = 0; i < argc; i++) { + args[i] = RSTRING_PTR(argv[i]); + } + args[i] = (char*) 0; + if (args[0]) + return proc_spawn_v(args, prog ? RSTRING_PTR(prog) : 0); + return -1; +} + +#if defined(_WIN32) +#define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0) +#else +static rb_pid_t +proc_spawn(char *str) +{ + char fbuf[MAXPATHLEN]; + char *s, *t; + char **argv, **a; + rb_pid_t status; + + for (s = str; *s; s++) { + if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) { + char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); + before_exec(); + status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str); + rb_last_status_set(status == -1 ? 127 : status, 0); + after_exec(); + return status; + } + } + a = argv = ALLOCA_N(char*, (s - str) / 2 + 2); + s = ALLOCA_N(char, s - str + 1); + strcpy(s, str); + if (*a++ = strtok(s, " \t")) { + while (t = strtok(NULL, " \t")) + *a++ = t; + *a = NULL; + } + return argv[0] ? proc_spawn_v(argv, 0) : -1; +} +#endif +#endif + +static VALUE +hide_obj(VALUE obj) +{ + RBASIC(obj)->klass = 0; + return obj; +} + +enum { + EXEC_OPTION_PGROUP, + EXEC_OPTION_RLIMIT, + EXEC_OPTION_UNSETENV_OTHERS, + EXEC_OPTION_ENV, + EXEC_OPTION_CHDIR, + EXEC_OPTION_UMASK, + EXEC_OPTION_DUP2, + EXEC_OPTION_CLOSE, + EXEC_OPTION_OPEN, + EXEC_OPTION_CLOSE_OTHERS +}; + +static VALUE +check_exec_redirect_fd(VALUE v) +{ + VALUE tmp; + int fd; + if (FIXNUM_P(v)) { + fd = FIX2INT(v); + } + else if (!NIL_P(tmp = rb_check_convert_type(v, T_FILE, "IO", "to_io"))) { + rb_io_t *fptr; + GetOpenFile(tmp, fptr); + if (fptr->tied_io_for_writing) + rb_raise(rb_eArgError, "duplex IO redirection"); + fd = fptr->fd; + } + else { + rb_raise(rb_eArgError, "wrong exec redirect"); + } + if (fd < 0) { + rb_raise(rb_eArgError, "negative file descriptor"); + } + return INT2FIX(fd); +} + +static void +check_exec_redirect(VALUE key, VALUE val, VALUE options) +{ + int index; + VALUE ary, param; + VALUE path, flags, perm; + ID id; + + switch (TYPE(val)) { + case T_SYMBOL: + id = SYM2ID(val); + if (id == rb_intern("close")) { + index = EXEC_OPTION_CLOSE; + param = Qnil; + } + else { + rb_raise(rb_eArgError, "wrong exec redirect symbol: %s", + rb_id2name(id)); + } + break; + + case T_FILE: + val = check_exec_redirect_fd(val); + /* fall through */ + case T_FIXNUM: + index = EXEC_OPTION_DUP2; + param = val; + break; + + case T_ARRAY: + index = EXEC_OPTION_OPEN; + path = rb_ary_entry(val, 0); + FilePathValue(path); + flags = rb_ary_entry(val, 1); + if (NIL_P(flags)) + flags = INT2NUM(O_RDONLY); + else if (TYPE(flags) == T_STRING) + flags = INT2NUM(rb_io_modestr_oflags(StringValueCStr(flags))); + else + flags = rb_to_int(flags); + perm = rb_ary_entry(val, 2); + perm = NIL_P(perm) ? INT2FIX(0644) : rb_to_int(perm); + param = hide_obj(rb_ary_new3(3, hide_obj(rb_str_dup(path)), + flags, perm)); + break; + + case T_STRING: + index = EXEC_OPTION_OPEN; + path = val; + FilePathValue(path); + if (TYPE(key) == T_FILE) + key = check_exec_redirect_fd(key); + if (FIXNUM_P(key) && (FIX2INT(key) == 1 || FIX2INT(key) == 2)) + flags = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC); + else + flags = INT2NUM(O_RDONLY); + perm = INT2FIX(0644); + param = hide_obj(rb_ary_new3(3, hide_obj(rb_str_dup(path)), + flags, perm)); + break; + + default: + rb_raise(rb_eArgError, "wrong exec redirect action"); + } + + ary = rb_ary_entry(options, index); + if (NIL_P(ary)) { + ary = hide_obj(rb_ary_new()); + rb_ary_store(options, index, ary); + } + if (TYPE(key) != T_ARRAY) { + VALUE fd = check_exec_redirect_fd(key); + rb_ary_push(ary, hide_obj(rb_assoc_new(fd, param))); + } + else { + int i, n=0; + for (i = 0 ; i < RARRAY_LEN(key); i++) { + VALUE v = RARRAY_PTR(key)[i]; + VALUE fd = check_exec_redirect_fd(v); + rb_ary_push(ary, hide_obj(rb_assoc_new(fd, param))); + n++; + } + } +} + +#ifdef RLIM2NUM +static int rlimit_type_by_lname(const char *name); +#endif + +int +rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val) +{ + VALUE options = e->options; + ID id; +#ifdef RLIM2NUM + int rtype; +#endif + + rb_secure(2); + + switch (TYPE(key)) { + case T_SYMBOL: + id = SYM2ID(key); +#ifdef HAVE_SETPGID + if (id == rb_intern("pgroup")) { + if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_PGROUP))) { + rb_raise(rb_eArgError, "pgroup option specified twice"); + } + if (!RTEST(val)) + val = Qfalse; + else if (val == Qtrue) + val = INT2FIX(0); + else { + pid_t pgroup = NUM2PIDT(val); + if (pgroup < 0) { + rb_raise(rb_eArgError, "negative process group ID : %ld", (long)pgroup); + } + val = PIDT2NUM(pgroup); + } + rb_ary_store(options, EXEC_OPTION_PGROUP, val); + } + else +#endif +#ifdef RLIM2NUM + if (strncmp("rlimit_", rb_id2name(id), 7) == 0 && + (rtype = rlimit_type_by_lname(rb_id2name(id)+7)) != -1) { + VALUE ary = rb_ary_entry(options, EXEC_OPTION_RLIMIT); + VALUE tmp, softlim, hardlim; + if (NIL_P(ary)) { + ary = hide_obj(rb_ary_new()); + rb_ary_store(options, EXEC_OPTION_RLIMIT, ary); + } + tmp = rb_check_array_type(val); + if (!NIL_P(tmp)) { + if (RARRAY_LEN(tmp) == 1) + softlim = hardlim = rb_to_int(rb_ary_entry(tmp, 0)); + else if (RARRAY_LEN(tmp) == 2) { + softlim = rb_to_int(rb_ary_entry(tmp, 0)); + hardlim = rb_to_int(rb_ary_entry(tmp, 1)); + } + else { + rb_raise(rb_eArgError, "wrong exec rlimit option"); + } + } + else { + softlim = hardlim = rb_to_int(val); + } + tmp = hide_obj(rb_ary_new3(3, INT2NUM(rtype), softlim, hardlim)); + rb_ary_push(ary, tmp); + } + else +#endif + if (id == rb_intern("unsetenv_others")) { + if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_UNSETENV_OTHERS))) { + rb_raise(rb_eArgError, "unsetenv_others option specified twice"); + } + val = RTEST(val) ? Qtrue : Qfalse; + rb_ary_store(options, EXEC_OPTION_UNSETENV_OTHERS, val); + } + else if (id == rb_intern("chdir")) { + if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_CHDIR))) { + rb_raise(rb_eArgError, "chdir option specified twice"); + } + FilePathValue(val); + rb_ary_store(options, EXEC_OPTION_CHDIR, + hide_obj(rb_str_dup(val))); + } + else if (id == rb_intern("umask")) { + mode_t cmask = NUM2LONG(val); + if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_UMASK))) { + rb_raise(rb_eArgError, "umask option specified twice"); + } + rb_ary_store(options, EXEC_OPTION_UMASK, LONG2NUM(cmask)); + } + else if (id == rb_intern("close_others")) { + if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_CLOSE_OTHERS))) { + rb_raise(rb_eArgError, "close_others option specified twice"); + } + val = RTEST(val) ? Qtrue : Qfalse; + rb_ary_store(options, EXEC_OPTION_CLOSE_OTHERS, val); + } + else if (id == rb_intern("in")) { + key = INT2FIX(0); + goto redirect; + } + else if (id == rb_intern("out")) { + key = INT2FIX(1); + goto redirect; + } + else if (id == rb_intern("err")) { + key = INT2FIX(2); + goto redirect; + } + else { + rb_raise(rb_eArgError, "wrong exec option symbol: %s", + rb_id2name(id)); + } + break; + + case T_FIXNUM: + case T_FILE: + case T_ARRAY: +redirect: + check_exec_redirect(key, val, options); + break; + + default: + rb_raise(rb_eArgError, "wrong exec option"); + } + + return ST_CONTINUE; +} + +static int +check_exec_options_i(st_data_t st_key, st_data_t st_val, st_data_t arg) +{ + VALUE key = (VALUE)st_key; + VALUE val = (VALUE)st_val; + struct rb_exec_arg *e = (struct rb_exec_arg *)arg; + return rb_exec_arg_addopt(e, key, val); +} + +static VALUE +check_exec_fds(VALUE options) +{ + VALUE h = rb_hash_new(); + VALUE ary; + int index, i; + int maxhint = -1; + + for (index = EXEC_OPTION_DUP2; index <= EXEC_OPTION_OPEN; index++) { + ary = rb_ary_entry(options, index); + if (NIL_P(ary)) + continue; + for (i = 0; i < RARRAY_LEN(ary); i++) { + VALUE elt = RARRAY_PTR(ary)[i]; + int fd = FIX2INT(RARRAY_PTR(elt)[0]); + if (RTEST(rb_hash_lookup(h, INT2FIX(fd)))) { + rb_raise(rb_eArgError, "fd %d specified twice", fd); + } + rb_hash_aset(h, INT2FIX(fd), Qtrue); + if (maxhint < fd) + maxhint = fd; + if (index == EXEC_OPTION_DUP2) { + fd = FIX2INT(RARRAY_PTR(elt)[1]); + if (maxhint < fd) + maxhint = fd; + } + } + } + if (rb_ary_entry(options, EXEC_OPTION_CLOSE_OTHERS) != Qfalse) { + rb_ary_store(options, EXEC_OPTION_CLOSE_OTHERS, INT2FIX(maxhint)); + } + return h; +} + +static void +rb_check_exec_options(VALUE opthash, struct rb_exec_arg *e) +{ + if (RHASH_EMPTY_P(opthash)) + return; + st_foreach(RHASH_TBL(opthash), check_exec_options_i, (st_data_t)e); +} + +static int +check_exec_env_i(st_data_t st_key, st_data_t st_val, st_data_t arg) +{ + VALUE key = (VALUE)st_key; + VALUE val = (VALUE)st_val; + VALUE env = (VALUE)arg; + char *k; + + k = StringValueCStr(key); + if (strchr(k, '=')) + rb_raise(rb_eArgError, "environment name contains a equal : %s", k); + + if (!NIL_P(val)) + StringValueCStr(val); + + rb_ary_push(env, hide_obj(rb_assoc_new(key, val))); + + return ST_CONTINUE; +} + +static VALUE +rb_check_exec_env(VALUE hash) +{ + VALUE env; + + env = hide_obj(rb_ary_new()); + st_foreach(RHASH_TBL(hash), check_exec_env_i, (st_data_t)env); + + return env; +} + +static VALUE +rb_check_argv(int argc, VALUE *argv) +{ + VALUE tmp, prog; + int i; + const char *name = 0; + + if (argc == 0) { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + + prog = 0; + tmp = rb_check_array_type(argv[0]); + if (!NIL_P(tmp)) { + if (RARRAY_LEN(tmp) != 2) { + rb_raise(rb_eArgError, "wrong first argument"); + } + prog = RARRAY_PTR(tmp)[0]; + argv[0] = RARRAY_PTR(tmp)[1]; + SafeStringValue(prog); + StringValueCStr(prog); + prog = rb_str_new4(prog); + name = RSTRING_PTR(prog); + } + for (i = 0; i < argc; i++) { + SafeStringValue(argv[i]); + argv[i] = rb_str_new4(argv[i]); + StringValueCStr(argv[i]); + } + security(name ? name : RSTRING_PTR(argv[0])); + return prog; +} + +static VALUE +rb_exec_getargs(int *argc_p, VALUE **argv_p, int accept_shell, VALUE *env_ret, VALUE *opthash_ret, struct rb_exec_arg *e) +{ + VALUE hash, prog; + + if (0 < *argc_p) { + hash = rb_check_convert_type((*argv_p)[*argc_p-1], T_HASH, "Hash", "to_hash"); + if (!NIL_P(hash)) { + *opthash_ret = hash; + (*argc_p)--; + } + } + + if (0 < *argc_p) { + hash = rb_check_convert_type((*argv_p)[0], T_HASH, "Hash", "to_hash"); + if (!NIL_P(hash)) { + *env_ret = hash; + (*argc_p)--; + (*argv_p)++; + } + } + prog = rb_check_argv(*argc_p, *argv_p); + if (!prog) { + prog = (*argv_p)[0]; + if (accept_shell && *argc_p == 1) { + *argc_p = 0; + *argv_p = 0; + } + } + return prog; +} + +static void +rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, struct rb_exec_arg *e) +{ + VALUE options; + MEMZERO(e, struct rb_exec_arg, 1); + options = hide_obj(rb_ary_new()); + e->options = options; + + if (!NIL_P(opthash)) { + rb_check_exec_options(opthash, e); + } + if (!NIL_P(env)) { + env = rb_check_exec_env(env); + rb_ary_store(options, EXEC_OPTION_ENV, env); + } + + e->argc = argc; + e->argv = argv; + e->prog = prog ? RSTRING_PTR(prog) : 0; +} + +VALUE +rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e) +{ + VALUE prog; + VALUE env = Qnil, opthash = Qnil; + prog = rb_exec_getargs(&argc, &argv, accept_shell, &env, &opthash, e); + rb_exec_fillarg(prog, argc, argv, env, opthash, e); + return prog; +} + +void +rb_exec_arg_fixup(struct rb_exec_arg *e) +{ + e->redirect_fds = check_exec_fds(e->options); +} + +/* + * call-seq: + * exec([env,] command [, arg, ...] [,options]) + * + * Replaces the current process by running the given external _command_. + * If optional arguments, sequence of +arg+, are not given, that argument is + * taken as a line that is subject to shell expansion before being + * executed. If one or more +arg+ given, they + * are passed as parameters to _command_ with no shell + * expansion. If +command+ is a two-element array, the first + * element is the command to be executed, and the second argument is + * used as the argv[0] value, which may show up in process + * listings. In order to execute the command, one of the exec(2) + * system calls is used, so the running command may inherit some of the environment + * of the original program (including open file descriptors). + * + * The hash arguments, env and options, are same as + * system and spawn. + * See spawn for details. + * + * Raises SystemCallError if the _command_ couldn't execute (typically + * Errno::ENOENT when it was not found). + * + * exec "echo *" # echoes list of files in current directory + * # never get here + * + * + * exec "echo", "*" # echoes an asterisk + * # never get here + */ + +VALUE +rb_f_exec(int argc, VALUE *argv) +{ + struct rb_exec_arg earg; + + rb_exec_arg_init(argc, argv, Qtrue, &earg); + if (NIL_P(rb_ary_entry(earg.options, EXEC_OPTION_CLOSE_OTHERS))) + rb_exec_arg_addopt(&earg, ID2SYM(rb_intern("close_others")), Qfalse); + rb_exec_arg_fixup(&earg); + + rb_exec(&earg); + rb_sys_fail(earg.prog); + return Qnil; /* dummy */ +} + +/*#define DEBUG_REDIRECT*/ +#if defined(DEBUG_REDIRECT) + +#include + +static void +ttyprintf(const char *fmt, ...) +{ + va_list ap; + FILE *tty; + int save = errno; + tty = fopen("/dev/tty", "w"); + if (!tty) + return; + + va_start(ap, fmt); + vfprintf(tty, fmt, ap); + va_end(ap); + fclose(tty); + errno = save; +} + +static int +redirect_dup(int oldfd) +{ + int ret; + ret = dup(oldfd); + ttyprintf("dup(%d) => %d\n", oldfd, ret); + return ret; +} + +static int +redirect_dup2(int oldfd, int newfd) +{ + int ret; + ret = dup2(oldfd, newfd); + ttyprintf("dup2(%d, %d)\n", oldfd, newfd); + return ret; +} + +static int +redirect_close(int fd) +{ + int ret; + ret = close(fd); + ttyprintf("close(%d)\n", fd); + return ret; +} + +static int +redirect_open(const char *pathname, int flags, mode_t perm) +{ + int ret; + ret = open(pathname, flags, perm); + ttyprintf("open(\"%s\", 0x%x, 0%o) => %d\n", pathname, flags, perm, ret); + return ret; +} + +#else +#define redirect_dup(oldfd) dup(oldfd) +#define redirect_dup2(oldfd, newfd) dup2(oldfd, newfd) +#define redirect_close(fd) close(fd) +#define redirect_open(pathname, flags, perm) open(pathname, flags, perm) +#endif + +static int +save_redirect_fd(int fd, VALUE save) +{ + if (!NIL_P(save)) { + VALUE newary; + int save_fd = redirect_dup(fd); + if (save_fd == -1) return -1; + newary = rb_ary_entry(save, EXEC_OPTION_DUP2); + if (NIL_P(newary)) { + newary = hide_obj(rb_ary_new()); + rb_ary_store(save, EXEC_OPTION_DUP2, newary); + } + rb_ary_push(newary, + hide_obj(rb_assoc_new(INT2FIX(fd), INT2FIX(save_fd)))); + + newary = rb_ary_entry(save, EXEC_OPTION_CLOSE); + if (NIL_P(newary)) { + newary = hide_obj(rb_ary_new()); + rb_ary_store(save, EXEC_OPTION_CLOSE, newary); + } + rb_ary_push(newary, hide_obj(rb_assoc_new(INT2FIX(save_fd), Qnil))); + } + + return 0; +} + +static VALUE +save_env_i(VALUE i, VALUE ary, int argc, VALUE *argv) +{ + rb_ary_push(ary, hide_obj(rb_ary_dup(argv[0]))); + return Qnil; +} + +static void +save_env(VALUE save) +{ + if (!NIL_P(save) && NIL_P(rb_ary_entry(save, EXEC_OPTION_ENV))) { + VALUE env = rb_const_get(rb_cObject, rb_intern("ENV")); + if (RTEST(env)) { + VALUE ary = hide_obj(rb_ary_new()); + rb_block_call(env, rb_intern("each"), 0, 0, save_env_i, + (VALUE)ary); + rb_ary_store(save, EXEC_OPTION_ENV, ary); + } + rb_ary_store(save, EXEC_OPTION_UNSETENV_OTHERS, Qtrue); + } +} + +static int +intcmp(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +static int +run_exec_dup2(VALUE ary, VALUE save) +{ + int n, i; + int ret; + int extra_fd = -1; + struct fd_pair { + int oldfd; + int newfd; + int older_index; + int num_newer; + } *pairs = 0; + + n = RARRAY_LEN(ary); + pairs = ALLOC_N(struct fd_pair, n); + + /* initialize oldfd and newfd: O(n) */ + for (i = 0; i < n; i++) { + VALUE elt = RARRAY_PTR(ary)[i]; + pairs[i].oldfd = FIX2INT(RARRAY_PTR(elt)[1]); + pairs[i].newfd = FIX2INT(RARRAY_PTR(elt)[0]); /* unique */ + pairs[i].older_index = -1; + } + + /* sort the table by oldfd: O(n log n) */ + qsort(pairs, n, sizeof(struct fd_pair), intcmp); + + /* initialize older_index and num_newer: O(n log n) */ + for (i = 0; i < n; i++) { + int newfd = pairs[i].newfd; + struct fd_pair key, *found; + key.oldfd = newfd; + found = bsearch(&key, pairs, n, sizeof(struct fd_pair), intcmp); + pairs[i].num_newer = 0; + if (found) { + while (pairs < found && (found-1)->oldfd == newfd) + found--; + while (found < pairs+n && found->oldfd == newfd) { + pairs[i].num_newer++; + found->older_index = i; + found++; + } + } + } + + /* non-cyclic redirection: O(n) */ + for (i = 0; i < n; i++) { + int j = i; + while (j != -1 && pairs[j].oldfd != -1 && pairs[j].num_newer == 0) { + if (save_redirect_fd(pairs[j].newfd, save) < 0) + goto fail; + ret = redirect_dup2(pairs[j].oldfd, pairs[j].newfd); + if (ret == -1) + goto fail; + pairs[j].oldfd = -1; + j = pairs[j].older_index; + if (j != -1) + pairs[j].num_newer--; + } + } + + /* cyclic redirection: O(n) */ + for (i = 0; i < n; i++) { + int j; + if (pairs[i].oldfd == -1) + continue; + if (pairs[i].oldfd == pairs[i].newfd) { /* self cycle */ +#ifdef F_GETFD + int fd = pairs[i].oldfd; + ret = fcntl(fd, F_GETFD); + if (ret == -1) + goto fail; + if (ret & FD_CLOEXEC) { + ret &= ~FD_CLOEXEC; + ret = fcntl(fd, F_SETFD, ret); + if (ret == -1) + goto fail; + } +#endif + pairs[i].oldfd = -1; + continue; + } + if (extra_fd == -1) { + extra_fd = redirect_dup(pairs[i].oldfd); + if (extra_fd == -1) + goto fail; + } + else { + ret = redirect_dup2(pairs[i].oldfd, extra_fd); + if (ret == -1) + goto fail; + } + pairs[i].oldfd = extra_fd; + j = pairs[i].older_index; + pairs[i].older_index = -1; + while (j != -1) { + ret = redirect_dup2(pairs[j].oldfd, pairs[j].newfd); + if (ret == -1) + goto fail; + pairs[j].oldfd = -1; + j = pairs[j].older_index; + } + } + if (extra_fd != -1) { + ret = redirect_close(extra_fd); + if (ret == -1) + goto fail; + } + + xfree(pairs); + return 0; + + fail: + xfree(pairs); + return -1; +} + +static int +run_exec_close(VALUE ary) +{ + int i, ret; + + for (i = 0; i < RARRAY_LEN(ary); i++) { + VALUE elt = RARRAY_PTR(ary)[i]; + int fd = FIX2INT(RARRAY_PTR(elt)[0]); + ret = redirect_close(fd); + if (ret == -1) + return -1; + } + return 0; +} + +static int +run_exec_open(VALUE ary, VALUE save) +{ + int i, ret; + + for (i = 0; i < RARRAY_LEN(ary);) { + VALUE elt = RARRAY_PTR(ary)[i]; + int fd = FIX2INT(RARRAY_PTR(elt)[0]); + VALUE param = RARRAY_PTR(elt)[1]; + char *path = RSTRING_PTR(RARRAY_PTR(param)[0]); + int flags = NUM2INT(RARRAY_PTR(param)[1]); + int perm = NUM2INT(RARRAY_PTR(param)[2]); + int need_close = 1; + int fd2 = redirect_open(path, flags, perm); + if (fd2 == -1) return -1; + while (i < RARRAY_LEN(ary) && + (elt = RARRAY_PTR(ary)[i], RARRAY_PTR(elt)[1] == param)) { + fd = FIX2INT(RARRAY_PTR(elt)[0]); + if (fd == fd2) { + need_close = 0; + } + else { + if (save_redirect_fd(fd, save) < 0) + return -1; + ret = redirect_dup2(fd2, fd); + if (ret == -1) return -1; + } + i++; + } + if (need_close) { + ret = redirect_close(fd2); + if (ret == -1) return -1; + } + } + return 0; +} + +#ifdef HAVE_SETPGID +static int +run_exec_pgroup(VALUE obj, VALUE save) +{ + /* + * If FD_CLOEXEC is available, rb_fork waits the child's execve. + * So setpgid is done in the child when rb_fork is returned in the parent. + * No race condition, even without setpgid from the parent. + * (Is there an environment which has setpgid but FD_CLOEXEC?) + */ + pid_t pgroup; + if (!NIL_P(save)) { + /* maybe meaningless with no fork environment... */ + rb_ary_store(save, EXEC_OPTION_PGROUP, PIDT2NUM(getpgrp())); + } + pgroup = NUM2PIDT(obj); + if (pgroup == 0) { + pgroup = getpid(); + } + return setpgid(getpid(), pgroup); +} +#endif + +#ifdef RLIM2NUM +static int +run_exec_rlimit(VALUE ary, VALUE save) +{ + int i; + for (i = 0; i < RARRAY_LEN(ary); i++) { + VALUE elt = RARRAY_PTR(ary)[i]; + int rtype = NUM2INT(RARRAY_PTR(elt)[0]); + struct rlimit rlim; + if (!NIL_P(save)) { + VALUE tmp, newary; + if (getrlimit(rtype, &rlim) == -1) + return -1; + tmp = hide_obj(rb_ary_new3(3, RARRAY_PTR(elt)[0], + RLIM2NUM(rlim.rlim_cur), + RLIM2NUM(rlim.rlim_max))); + newary = rb_ary_entry(save, EXEC_OPTION_RLIMIT); + if (NIL_P(newary)) { + newary = hide_obj(rb_ary_new()); + rb_ary_store(save, EXEC_OPTION_RLIMIT, newary); + } + rb_ary_push(newary, tmp); + } + rlim.rlim_cur = NUM2RLIM(RARRAY_PTR(elt)[1]); + rlim.rlim_max = NUM2RLIM(RARRAY_PTR(elt)[2]); + if (setrlimit(rtype, &rlim) == -1) + return -1; + } + return 0; +} +#endif + +int +rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s) +{ + VALUE options = e->options; + VALUE soptions = Qnil; + VALUE obj; + + if (!RTEST(options)) + return 0; + + if (s) { + s->argc = 0; + s->argv = NULL; + s->prog = NULL; + s->options = soptions = hide_obj(rb_ary_new()); + s->redirect_fds = Qnil; + } + +#ifdef HAVE_SETPGID + obj = rb_ary_entry(options, EXEC_OPTION_PGROUP); + if (RTEST(obj)) { + if (run_exec_pgroup(obj, soptions) == -1) + return -1; + } +#endif + +#ifdef RLIM2NUM + obj = rb_ary_entry(options, EXEC_OPTION_RLIMIT); + if (!NIL_P(obj)) { + if (run_exec_rlimit(obj, soptions) == -1) + return -1; + } +#endif + + obj = rb_ary_entry(options, EXEC_OPTION_UNSETENV_OTHERS); + if (RTEST(obj)) { + save_env(soptions); + rb_env_clear(); + } + + obj = rb_ary_entry(options, EXEC_OPTION_ENV); + if (!NIL_P(obj)) { + int i; + save_env(soptions); + for (i = 0; i < RARRAY_LEN(obj); i++) { + VALUE pair = RARRAY_PTR(obj)[i]; + VALUE key = RARRAY_PTR(pair)[0]; + VALUE val = RARRAY_PTR(pair)[1]; + if (NIL_P(val)) + ruby_setenv(StringValueCStr(key), 0); + else + ruby_setenv(StringValueCStr(key), StringValueCStr(val)); + } + } + + obj = rb_ary_entry(options, EXEC_OPTION_CHDIR); + if (!NIL_P(obj)) { + if (!NIL_P(soptions)) { + char *cwd = my_getcwd(); + rb_ary_store(soptions, EXEC_OPTION_CHDIR, + hide_obj(rb_str_new2(cwd))); + xfree(cwd); + } + if (chdir(RSTRING_PTR(obj)) == -1) + return -1; + } + + obj = rb_ary_entry(options, EXEC_OPTION_UMASK); + if (!NIL_P(obj)) { + mode_t mask = NUM2LONG(obj); + mode_t oldmask = umask(mask); /* never fail */ + if (!NIL_P(soptions)) + rb_ary_store(soptions, EXEC_OPTION_UMASK, LONG2NUM(oldmask)); + } + + obj = rb_ary_entry(options, EXEC_OPTION_DUP2); + if (!NIL_P(obj)) { + if (run_exec_dup2(obj, soptions) == -1) + return -1; + } + + obj = rb_ary_entry(options, EXEC_OPTION_CLOSE); + if (!NIL_P(obj)) { + if (!NIL_P(soptions)) + rb_warn("cannot close fd before spawn"); + else { + if (run_exec_close(obj) == -1) + return -1; + } + } + +#ifdef HAVE_FORK + obj = rb_ary_entry(options, EXEC_OPTION_CLOSE_OTHERS); + if (obj != Qfalse) { + rb_close_before_exec(3, FIX2LONG(obj), e->redirect_fds); + } +#endif + + obj = rb_ary_entry(options, EXEC_OPTION_OPEN); + if (!NIL_P(obj)) { + if (run_exec_open(obj, soptions) == -1) + return -1; + } + + return 0; +} + +int +rb_exec(const struct rb_exec_arg *e) +{ + int argc = e->argc; + VALUE *argv = e->argv; + const char *prog = e->prog; + + if (rb_run_exec_options(e, NULL) < 0) { + return -1; + } + + if (argc == 0) { + rb_proc_exec(prog); + } + else { + rb_proc_exec_n(argc, argv, prog); + } +#ifndef FD_CLOEXEC + preserving_errno({ + fprintf(stderr, "%s:%d: command not found: %s\n", + rb_sourcefile(), rb_sourceline(), prog); + }); +#endif + return -1; +} + +#ifdef HAVE_FORK +static int +rb_exec_atfork(void* arg) +{ + rb_thread_atfork_before_exec(); + return rb_exec(arg); +} +#endif + +#ifdef HAVE_FORK +#ifdef FD_CLOEXEC +#if SIZEOF_INT == SIZEOF_LONG +#define proc_syswait (VALUE (*)(VALUE))rb_syswait +#else +static VALUE +proc_syswait(VALUE pid) +{ + rb_syswait((int)pid); + return Qnil; +} +#endif +#endif + +static int +move_fds_to_avoid_crash(int *fdp, int n, VALUE fds) +{ + long min = 0; + int i; + for (i = 0; i < n; i++) { + int ret; + while (RTEST(rb_hash_lookup(fds, INT2FIX(fdp[i])))) { + if (min <= fdp[i]) + min = fdp[i]+1; + while (RTEST(rb_hash_lookup(fds, INT2FIX(min)))) + min++; + ret = fcntl(fdp[i], F_DUPFD, min); + if (ret == -1) + return -1; + close(fdp[i]); + fdp[i] = ret; + } + } + return 0; +} + +static int +pipe_nocrash(int filedes[2], VALUE fds) +{ + int ret; + ret = rb_pipe(filedes); + if (ret == -1) + return -1; + if (RTEST(fds)) { + int save = errno; + if (move_fds_to_avoid_crash(filedes, 2, fds) == -1) { + close(filedes[0]); + close(filedes[1]); + return -1; + } + errno = save; + } + return ret; +} + +/* + * Forks child process, and returns the process ID in the parent + * process. + * + * If +status+ is given, protects from any exceptions and sets the + * jump status to it. + * + * In the child process, just returns 0 if +chfunc+ is +NULL+. + * Otherwise +chfunc+ will be called with +charg+, and then the child + * process exits with +EXIT_SUCCESS+ when it returned zero. + * + * In the case of the function is called and returns non-zero value, + * the child process exits with non-+EXIT_SUCCESS+ value (normally + * 127). And, on the platforms where +FD_CLOEXEC+ is available, + * +errno+ is propagated to the parent process, and this function + * returns -1 in the parent process. On the other platforms, just + * returns pid. + * + * If fds is not Qnil, internal pipe for the errno propagation is + * arranged to avoid conflicts of the hash keys in +fds+. + * + * +chfunc+ must not raise any exceptions. + */ +rb_pid_t +rb_fork(int *status, int (*chfunc)(void*), void *charg, VALUE fds) +{ + rb_pid_t pid; + int err, state = 0; +#ifdef FD_CLOEXEC + int ep[2]; +#endif + +#define prefork() ( \ + rb_io_flush(rb_stdout), \ + rb_io_flush(rb_stderr) \ + ) + prefork(); + +#ifdef FD_CLOEXEC + if (chfunc) { + if (pipe_nocrash(ep, fds)) return -1; + if (fcntl(ep[1], F_SETFD, FD_CLOEXEC)) { + preserving_errno((close(ep[0]), close(ep[1]))); + return -1; + } + } +#endif + for (; before_fork(), (pid = fork()) < 0; prefork()) { + after_fork(); + switch (errno) { + case EAGAIN: +#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + if (!status && !chfunc) { + rb_thread_sleep(1); + continue; + } + else { + rb_protect((VALUE (*)())rb_thread_sleep, 1, &state); + if (status) *status = state; + if (!state) continue; + } + default: +#ifdef FD_CLOEXEC + if (chfunc) { + preserving_errno((close(ep[0]), close(ep[1]))); + } +#endif + if (state && !status) rb_jump_tag(state); + return -1; + } + } + if (!pid) { + forked_child = 1; + if (chfunc) { +#ifdef FD_CLOEXEC + close(ep[0]); +#endif + if (!(*chfunc)(charg)) _exit(EXIT_SUCCESS); +#ifdef FD_CLOEXEC + err = errno; + write(ep[1], &err, sizeof(err)); +#endif +#if EXIT_SUCCESS == 127 + _exit(EXIT_FAILURE); +#else + _exit(127); +#endif + } + } + after_fork(); +#ifdef FD_CLOEXEC + if (pid && chfunc) { + close(ep[1]); + if ((state = read(ep[0], &err, sizeof(err))) < 0) { + err = errno; + } + close(ep[0]); + if (state) { + if (status) { + rb_protect(proc_syswait, (VALUE)pid, status); + } + else { + rb_syswait(pid); + } + errno = err; + return -1; + } + } +#endif + return pid; +} +#endif + +/* + * call-seq: + * Kernel.fork [{ block }] => fixnum or nil + * Process.fork [{ block }] => fixnum or nil + * + * Creates a subprocess. If a block is specified, that block is run + * in the subprocess, and the subprocess terminates with a status of + * zero. Otherwise, the +fork+ call returns twice, once in + * the parent, returning the process ID of the child, and once in + * the child, returning _nil_. The child process can exit using + * Kernel.exit! to avoid running any + * at_exit functions. The parent process should + * use Process.wait to collect the termination statuses + * of its children or use Process.detach to register + * disinterest in their status; otherwise, the operating system + * may accumulate zombie processes. + * + * The thread calling fork is the only thread in the created child process. + * fork doesn't copy other threads. + */ + +static VALUE +rb_f_fork(VALUE obj) +{ +#if defined(HAVE_FORK) && !defined(CANNOT_FORK_WITH_PTHREAD) + rb_pid_t pid; + + rb_secure(2); + + switch (pid = rb_fork(0, 0, 0, Qnil)) { + case 0: +#ifdef linux + after_exec(); +#endif + rb_thread_atfork(); + if (rb_block_given_p()) { + int status; + + rb_protect(rb_yield, Qundef, &status); + ruby_stop(status); + } + return Qnil; + + case -1: + rb_sys_fail("fork(2)"); + return Qnil; + + default: + return PIDT2NUM(pid); + } +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * Process.exit!(fixnum=-1) + * + * Exits the process immediately. No exit handlers are + * run. fixnum is returned to the underlying system as the + * exit status. + * + * Process.exit!(0) + */ + +static VALUE +rb_f_exit_bang(int argc, VALUE *argv, VALUE obj) +{ + VALUE status; + int istatus; + + rb_secure(4); + if (argc > 0 && rb_scan_args(argc, argv, "01", &status) == 1) { + switch (status) { + case Qtrue: + istatus = EXIT_SUCCESS; + break; + case Qfalse: + istatus = EXIT_FAILURE; + break; + default: + istatus = NUM2INT(status); + break; + } + } + else { + istatus = EXIT_FAILURE; + } + _exit(istatus); + + return Qnil; /* not reached */ +} + +void +rb_exit(int status) +{ + if (GET_THREAD()->tag) { + VALUE args[2]; + + args[0] = INT2NUM(status); + args[1] = rb_str_new2("exit"); + rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit)); + } + ruby_finalize(); + exit(status); +} + + +/* + * call-seq: + * exit(integer=0) + * Kernel::exit(integer=0) + * Process::exit(integer=0) + * + * Initiates the termination of the Ruby script by raising the + * SystemExit exception. This exception may be caught. The + * optional parameter is used to return a status code to the invoking + * environment. + * + * begin + * exit + * puts "never get here" + * rescue SystemExit + * puts "rescued a SystemExit exception" + * end + * puts "after begin block" + * + * produces: + * + * rescued a SystemExit exception + * after begin block + * + * Just prior to termination, Ruby executes any at_exit functions + * (see Kernel::at_exit) and runs any object finalizers (see + * ObjectSpace::define_finalizer). + * + * at_exit { puts "at_exit function" } + * ObjectSpace.define_finalizer("string", proc { puts "in finalizer" }) + * exit + * + * produces: + * + * at_exit function + * in finalizer + */ + +VALUE +rb_f_exit(int argc, VALUE *argv) +{ + VALUE status; + int istatus; + + rb_secure(4); + if (argc > 0 && rb_scan_args(argc, argv, "01", &status) == 1) { + switch (status) { + case Qtrue: + istatus = EXIT_SUCCESS; + break; + case Qfalse: + istatus = EXIT_FAILURE; + break; + default: + istatus = NUM2INT(status); +#if EXIT_SUCCESS != 0 + if (istatus == 0) + istatus = EXIT_SUCCESS; +#endif + break; + } + } + else { + istatus = EXIT_SUCCESS; + } + rb_exit(istatus); + return Qnil; /* not reached */ +} + + +/* + * call-seq: + * abort + * Kernel::abort + * Process::abort + * + * Terminate execution immediately, effectively by calling + * Kernel.exit(1). If _msg_ is given, it is written + * to STDERR prior to terminating. + */ + +VALUE +rb_f_abort(int argc, VALUE *argv) +{ + extern void ruby_error_print(void); + + rb_secure(4); + if (argc == 0) { + if (!NIL_P(GET_THREAD()->errinfo)) { + ruby_error_print(); + } + rb_exit(EXIT_FAILURE); + } + else { + VALUE args[2]; + + rb_scan_args(argc, argv, "1", &args[1]); + StringValue(argv[0]); + rb_io_puts(argc, argv, rb_stderr); + args[0] = INT2NUM(EXIT_FAILURE); + rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit)); + } + return Qnil; /* not reached */ +} + + +#if defined(sun) +#define signal(a,b) sigset(a,b) +#else +# if defined(POSIX_SIGNAL) +# define signal(a,b) posix_signal(a,b) +# endif +#endif + +void +rb_syswait(rb_pid_t pid) +{ + static int overriding; +#ifdef SIGHUP + RETSIGTYPE (*hfunc)(int) = 0; +#endif +#ifdef SIGQUIT + RETSIGTYPE (*qfunc)(int) = 0; +#endif + RETSIGTYPE (*ifunc)(int) = 0; + int status; + int i, hooked = Qfalse; + + if (!overriding) { +#ifdef SIGHUP + hfunc = signal(SIGHUP, SIG_IGN); +#endif +#ifdef SIGQUIT + qfunc = signal(SIGQUIT, SIG_IGN); +#endif + ifunc = signal(SIGINT, SIG_IGN); + overriding = Qtrue; + hooked = Qtrue; + } + + do { + i = rb_waitpid(pid, &status, 0); + } while (i == -1 && errno == EINTR); + + if (hooked) { +#ifdef SIGHUP + signal(SIGHUP, hfunc); +#endif +#ifdef SIGQUIT + signal(SIGQUIT, qfunc); +#endif + signal(SIGINT, ifunc); + overriding = Qfalse; + } +} + +static rb_pid_t +rb_spawn_internal(int argc, VALUE *argv, int default_close_others) +{ + rb_pid_t status; + VALUE prog; + struct rb_exec_arg earg; +#if !defined HAVE_FORK + struct rb_exec_arg sarg; +#endif + + prog = rb_exec_arg_init(argc, argv, Qtrue, &earg); + if (NIL_P(rb_ary_entry(earg.options, EXEC_OPTION_CLOSE_OTHERS))) { + VALUE v = default_close_others ? Qtrue : Qfalse; + rb_exec_arg_addopt(&earg, ID2SYM(rb_intern("close_others")), v); + } + rb_exec_arg_fixup(&earg); + +#if defined HAVE_FORK + status = rb_fork(&status, rb_exec_atfork, &earg, earg.redirect_fds); + if (prog && earg.argc) earg.argv[0] = prog; +#else + if (rb_run_exec_options(&earg, &sarg) < 0) { + return -1; + } + + argc = earg.argc; + argv = earg.argv; + if (prog && argc) argv[0] = prog; +# if defined HAVE_SPAWNV + if (!argc) { + status = proc_spawn(RSTRING_PTR(prog)); + } + else { + status = proc_spawn_n(argc, argv, prog); + } +# if defined(_WIN32) + if (status == -1) + rb_last_status_set(0x7f << 8, 0); +# endif +# else + if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" ")); + status = system(StringValuePtr(prog)); + rb_last_status_set((status & 0xff) << 8, 0); +# endif + + rb_run_exec_options(&sarg, NULL); +#endif + return status; +} + +rb_pid_t +rb_spawn(int argc, VALUE *argv) +{ + return rb_spawn_internal(argc, argv, Qtrue); +} + +/* + * call-seq: + * system([env,] cmd [, arg, ...] [,options]) => true, false or nil + * + * Executes _cmd_ in a subshell, returning +true+ if the command + * gives zero exit status, +false+ for non zero exit status. Returns + * +nil+ if command execution fails. An error status is available in + * $?. The arguments are processed in the same way as + * for Kernel::exec. + * + * The hash arguments, env and options, are same as + * exec and spawn. + * See spawn for details. + * + * system("echo *") + * system("echo", "*") + * + * produces: + * + * config.h main.rb + * * + */ + +static VALUE +rb_f_system(int argc, VALUE *argv) +{ + int status; + +#if defined(SIGCLD) && !defined(SIGCHLD) +# define SIGCHLD SIGCLD +#endif + +#ifdef SIGCHLD + RETSIGTYPE (*chfunc)(int); + + chfunc = signal(SIGCHLD, SIG_DFL); +#endif + status = rb_spawn_internal(argc, argv, Qfalse); +#if defined(HAVE_FORK) || defined(HAVE_SPAWNV) + if (status > 0) { + rb_syswait(status); + } +#endif +#ifdef SIGCHLD + signal(SIGCHLD, chfunc); +#endif + if (status < 0) { + return Qnil; + } + status = PST2INT(rb_last_status_get()); + if (status == EXIT_SUCCESS) return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * spawn([env,] cmd [, arg, ...] [,options]) => pid + * + * Similar to Kernel::system except for not waiting for + * end of _cmd_, but returns its pid. + * + * If a hash is given as +env+, the environment is + * updated by +env+ before exec(2) in the child process. + * If a pair in +env+ has nil as the value, the variable is deleted. + * + * # set FOO as BAR and unset BAZ. + * pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command) + * + * If a hash is given as +options+, + * it specifies + * process group, + * resource limit, + * current directory, + * umask and + * redirects for the child process. + * Also, it can be specified to clear environment variables. + * + * The :unsetenv_others key in +options+ specifies + * to clear environment variables, other than specified by +env+. + * + * pid = spawn(command, :unsetenv_others=>true) # no environment variable + * pid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true) # FOO only + * + * The :pgroup key in +options+ specifies a process group. + * The corresponding value should be true, zero or positive integer. + * true and zero means the process should be a process leader. + * Other values specifies a process group to be belongs. + * + * pid = spawn(command, :pgroup=>true) # process leader + * pid = spawn(command, :pgroup=>10) # belongs to the process group 10 + * + * The :rlimit_foo key specifies a resource limit. + * foo should be one of resource types such as core + * The corresponding value should be an integer or an array which have one or + * two integers: same as cur_limit and max_limit arguments for + * Process.setrlimit. + * + * pid = spawn(command, :rlimit_core=>0) # never dump core. + * cur, max = Process.getrlimit(:CORE) + * pid = spawn(command, :rlimit_core=>[0,max]) # disable core temporary. + * pid = spawn(command, :rlimit_core=>max) # enable core dump + * + * The :chdir key in +options+ specifies the current directory. + * + * pid = spawn(command, :chdir=>"/var/tmp") + * + * The :umask key in +options+ specifies the umask. + * + * pid = spawn(command, :umask=>077) + * + * The :in, :out, :err, a fixnum, an IO and an array key specifies a redirect. + * The redirection maps a file descriptor in the child process. + * + * For example, stderr can be merged into stdout: + * + * pid = spawn(command, :err=>:out) + * pid = spawn(command, STDERR=>STDOUT) + * pid = spawn(command, 2=>1) + * + * The hash keys specifies a file descriptor + * in the child process started by spawn. + * :err, STDERR and 2 specifies the standard error stream. + * + * The hash values specifies a file descriptor + * in the parent process which invokes spawn. + * :out, STDOUT and 1 specifies the standard output stream. + * + * The standard output in the child process is not specified. + * So it is inherited from the parent process. + * + * The standard input stream can be specifed by :in, STDIN and 0. + * + * A filename can be specified as a hash value. + * + * pid = spawn(command, STDIN=>"/dev/null") # read mode + * pid = spawn(command, STDOUT=>"/dev/null") # write mode + * pid = spawn(command, STDERR=>"log") # write mode + * pid = spawn(command, 3=>"/dev/null") # read mode + * + * For standard output and standard error, + * it is opened in write mode. + * Otherwise read mode is used. + * + * For specifying flags and permission of file creation explicitly, + * an array is used instead. + * + * pid = spawn(command, STDIN=>["file"]) # read mode is assumed + * pid = spawn(command, STDIN=>["file", "r"]) + * pid = spawn(command, STDOUT=>["log", "w"]) # 0644 assumed + * pid = spawn(command, STDOUT=>["log", "w", 0600]) + * pid = spawn(command, STDOUT=>["log", File::WRONLY|File::EXCL|File::CREAT, 0600]) + * + * The array specifies a filename, flags and permission. + * The flags can be a string or an integer. + * If the flags is ommitted or nil, File::RDONLY is assumed. + * The permission should be an integer. + * If the permission is ommitted or nil, 0644 is assumed. + * + * If an array of IOs and integers are specified as a hash key, + * all the elemetns are redirected. + * + * # standard output and standard error is redirected to log file. + * pid = spawn(command, [STDOUT, STDERR]=>["log", "w"]) + * + * spawn closes all non-standard unspecified descriptors by default. + * The "standard" descriptors are 0, 1 and 2. + * This behavior is specified by :close_others option. + * :close_others doesn't affect the standard descriptors which are + * closed only if :close is specified explicitly. + * + * pid = spawn(command, :close_others=>true) # close 3,4,5,... (default) + * pid = spawn(command, :close_others=>false) # don't close 3,4,5,... + * + * :close_others is true by default for spawn and IO.popen. + * + * So IO.pipe and spawn can be used as IO.popen. + * + * # similar to r = IO.popen(command) + * r, w = IO.pipe + * pid = spawn(command, STDOUT=>w) # r, w is closed in the child process. + * w.close + * + * :close is specified as a hash value to close a fd individualy. + * + * f = open(foo) + * system(command, f=>:close) # don't inherit f. + * + * It is also possible to exchange file descriptors. + * + * pid = spawn(command, STDOUT=>STDERR, STDERR=>STDOUT) + * + * The hash keys specify file descriptors in the child process. + * The hash values specifies file descriptors in the parent process. + * So the above specifies exchanging STDOUT and STDERR. + * Internally, +spawn+ uses an extra file descriptor to resolve such cyclic + * file descriptor mapping. + * + */ + +static VALUE +rb_f_spawn(int argc, VALUE *argv) +{ + rb_pid_t pid; + + pid = rb_spawn(argc, argv); + if (pid == -1) rb_sys_fail(RSTRING_PTR(argv[0])); +#if defined(HAVE_FORK) || defined(HAVE_SPAWNV) + return PIDT2NUM(pid); +#else + return Qnil; +#endif +} + +/* + * call-seq: + * sleep([duration]) => fixnum + * + * Suspends the current thread for _duration_ seconds (which may be any number, + * including a +Float+ with fractional seconds). Returns the actual number of + * seconds slept (rounded), which may be less than that asked for if another + * thread calls Thread#run. Zero arguments causes +sleep+ to sleep + * forever. + * + * Time.new #=> 2008-03-08 19:56:19 +0900 + * sleep 1.2 #=> 1 + * Time.new #=> 2008-03-08 19:56:20 +0900 + * sleep 1.9 #=> 2 + * Time.new #=> 2008-03-08 19:56:22 +0900 + */ + +static VALUE +rb_f_sleep(int argc, VALUE *argv) +{ + int beg, end; + + beg = time(0); + if (argc == 0) { + rb_thread_sleep_forever(); + } + else if (argc == 1) { + rb_thread_wait_for(rb_time_interval(argv[0])); + } + else { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + + end = time(0) - beg; + + return INT2FIX(end); +} + + +/* + * call-seq: + * Process.getpgrp => integer + * + * Returns the process group ID for this process. Not available on + * all platforms. + * + * Process.getpgid(0) #=> 25527 + * Process.getpgrp #=> 25527 + */ + +static VALUE +proc_getpgrp(void) +{ +#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID) || defined(HAVE_GETPGID) + rb_pid_t pgrp; +#endif + + rb_secure(2); +#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID) + pgrp = getpgrp(); + if (pgrp < 0) rb_sys_fail(0); + return PIDT2NUM(pgrp); +#else +# ifdef HAVE_GETPGID + pgrp = getpgid(0); + if (pgrp < 0) rb_sys_fail(0); + return PIDT2NUM(pgrp); +# else + rb_notimplement(); +# endif +#endif +} + + +/* + * call-seq: + * Process.setpgrp => 0 + * + * Equivalent to setpgid(0,0). Not available on all + * platforms. + */ + +static VALUE +proc_setpgrp(void) +{ + rb_secure(2); + /* check for posix setpgid() first; this matches the posix */ + /* getpgrp() above. It appears that configure will set SETPGRP_VOID */ + /* even though setpgrp(0,0) would be preferred. The posix call avoids */ + /* this confusion. */ +#ifdef HAVE_SETPGID + if (setpgid(0,0) < 0) rb_sys_fail(0); +#elif defined(HAVE_SETPGRP) && defined(SETPGRP_VOID) + if (setpgrp() < 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return INT2FIX(0); +} + + +/* + * call-seq: + * Process.getpgid(pid) => integer + * + * Returns the process group ID for the given process id. Not + * available on all platforms. + * + * Process.getpgid(Process.ppid()) #=> 25527 + */ + +static VALUE +proc_getpgid(VALUE obj, VALUE pid) +{ +#if defined(HAVE_GETPGID) && !defined(__CHECKER__) + rb_pid_t i; + + rb_secure(2); + i = getpgid(NUM2PIDT(pid)); + if (i < 0) rb_sys_fail(0); + return PIDT2NUM(i); +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * Process.setpgid(pid, integer) => 0 + * + * Sets the process group ID of _pid_ (0 indicates this + * process) to integer. Not available on all platforms. + */ + +static VALUE +proc_setpgid(VALUE obj, VALUE pid, VALUE pgrp) +{ +#ifdef HAVE_SETPGID + rb_pid_t ipid, ipgrp; + + rb_secure(2); + ipid = NUM2PIDT(pid); + ipgrp = NUM2PIDT(pgrp); + + if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0); + return INT2FIX(0); +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * Process.setsid => fixnum + * + * Establishes this process as a new session and process group + * leader, with no controlling tty. Returns the session id. Not + * available on all platforms. + * + * Process.setsid #=> 27422 + */ + +static VALUE +proc_setsid(void) +{ +#if defined(HAVE_SETSID) + rb_pid_t pid; + + rb_secure(2); + pid = setsid(); + if (pid < 0) rb_sys_fail(0); + return PIDT2NUM(pid); +#elif defined(HAVE_SETPGRP) && defined(TIOCNOTTY) + rb_pid_t pid; + int ret; + + rb_secure(2); + pid = getpid(); +#if defined(SETPGRP_VOID) + ret = setpgrp(); + /* If `pid_t setpgrp(void)' is equivalent to setsid(), + `ret' will be the same value as `pid', and following open() will fail. + In Linux, `int setpgrp(void)' is equivalent to setpgid(0, 0). */ +#else + ret = setpgrp(0, pid); +#endif + if (ret == -1) rb_sys_fail(0); + + if ((fd = open("/dev/tty", O_RDWR)) >= 0) { + ioctl(fd, TIOCNOTTY, NULL); + close(fd); + } + return PIDT2NUM(pid); +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * Process.getpriority(kind, integer) => fixnum + * + * Gets the scheduling priority for specified process, process group, + * or user. kind indicates the kind of entity to find: one + * of Process::PRIO_PGRP, + * Process::PRIO_USER, or + * Process::PRIO_PROCESS. _integer_ is an id + * indicating the particular process, process group, or user (an id + * of 0 means _current_). Lower priorities are more favorable + * for scheduling. Not available on all platforms. + * + * Process.getpriority(Process::PRIO_USER, 0) #=> 19 + * Process.getpriority(Process::PRIO_PROCESS, 0) #=> 19 + */ + +static VALUE +proc_getpriority(VALUE obj, VALUE which, VALUE who) +{ +#ifdef HAVE_GETPRIORITY + int prio, iwhich, iwho; + + rb_secure(2); + iwhich = NUM2INT(which); + iwho = NUM2INT(who); + + errno = 0; + prio = getpriority(iwhich, iwho); + if (errno) rb_sys_fail(0); + return INT2FIX(prio); +#else + rb_notimplement(); +#endif +} + + +/* + * call-seq: + * Process.setpriority(kind, integer, priority) => 0 + * + * See Process#getpriority. + * + * Process.setpriority(Process::PRIO_USER, 0, 19) #=> 0 + * Process.setpriority(Process::PRIO_PROCESS, 0, 19) #=> 0 + * Process.getpriority(Process::PRIO_USER, 0) #=> 19 + * Process.getpriority(Process::PRIO_PROCESS, 0) #=> 19 + */ + +static VALUE +proc_setpriority(VALUE obj, VALUE which, VALUE who, VALUE prio) +{ +#ifdef HAVE_GETPRIORITY + int iwhich, iwho, iprio; + + rb_secure(2); + iwhich = NUM2INT(which); + iwho = NUM2INT(who); + iprio = NUM2INT(prio); + + if (setpriority(iwhich, iwho, iprio) < 0) + rb_sys_fail(0); + return INT2FIX(0); +#else + rb_notimplement(); +#endif +} + +#if defined(RLIM2NUM) +static int +rlimit_resource_name2int(const char *name, int casetype) +{ + size_t len = strlen(name); + if (16 < len) return -1; + if (casetype == 1) { + int i; + char *name2 = ALLOCA_N(char, len+1); + for (i = 0; i < len; i++) { + if (!ISLOWER(name[i])) + return -1; + name2[i] = TOUPPER(name[i]); + } + name2[len] = '\0'; + name = name2; + } + + switch (*name) { + case 'A': +#ifdef RLIMIT_AS + if (strcmp(name, "AS") == 0) return RLIMIT_AS; +#endif + break; + + case 'C': +#ifdef RLIMIT_CORE + if (strcmp(name, "CORE") == 0) return RLIMIT_CORE; +#endif +#ifdef RLIMIT_CPU + if (strcmp(name, "CPU") == 0) return RLIMIT_CPU; +#endif + break; + + case 'D': +#ifdef RLIMIT_DATA + if (strcmp(name, "DATA") == 0) return RLIMIT_DATA; +#endif + break; + + case 'F': +#ifdef RLIMIT_FSIZE + if (strcmp(name, "FSIZE") == 0) return RLIMIT_FSIZE; +#endif + break; + + case 'M': +#ifdef RLIMIT_MEMLOCK + if (strcmp(name, "MEMLOCK") == 0) return RLIMIT_MEMLOCK; +#endif + break; + + case 'N': +#ifdef RLIMIT_NOFILE + if (strcmp(name, "NOFILE") == 0) return RLIMIT_NOFILE; +#endif +#ifdef RLIMIT_NPROC + if (strcmp(name, "NPROC") == 0) return RLIMIT_NPROC; +#endif + break; + + case 'R': +#ifdef RLIMIT_RSS + if (strcmp(name, "RSS") == 0) return RLIMIT_RSS; +#endif + break; + + case 'S': +#ifdef RLIMIT_STACK + if (strcmp(name, "STACK") == 0) return RLIMIT_STACK; +#endif +#ifdef RLIMIT_SBSIZE + if (strcmp(name, "SBSIZE") == 0) return RLIMIT_SBSIZE; +#endif + break; + } + return -1; +} + +static int +rlimit_type_by_hname(const char *name) +{ + return rlimit_resource_name2int(name, 0); +} + +static int +rlimit_type_by_lname(const char *name) +{ + return rlimit_resource_name2int(name, 1); +} + +static int +rlimit_resource_type(VALUE rtype) +{ + const char *name; + VALUE v; + int r; + + switch (TYPE(rtype)) { + case T_SYMBOL: + name = rb_id2name(SYM2ID(rtype)); + break; + + default: + v = rb_check_string_type(rtype); + if (!NIL_P(v)) { + rtype = v; + case T_STRING: + name = StringValueCStr(rtype); + break; + } + /* fall through */ + + case T_FIXNUM: + case T_BIGNUM: + return NUM2INT(rtype); + } + + r = rlimit_type_by_hname(name); + if (r != -1) + return r; + + rb_raise(rb_eArgError, "invalid resource name: %s", name); +} + +static rlim_t +rlimit_resource_value(VALUE rval) +{ + const char *name; + VALUE v; + + switch (TYPE(rval)) { + case T_SYMBOL: + name = rb_id2name(SYM2ID(rval)); + break; + + default: + v = rb_check_string_type(rval); + if (!NIL_P(v)) { + rval = v; + case T_STRING: + name = StringValueCStr(rval); + break; + } + /* fall through */ + + case T_FIXNUM: + case T_BIGNUM: + return NUM2RLIM(rval); + } + +#ifdef RLIM_INFINITY + if (strcmp(name, "INFINITY") == 0) return RLIM_INFINITY; +#endif +#ifdef RLIM_SAVED_MAX + if (strcmp(name, "SAVED_MAX") == 0) return RLIM_SAVED_MAX; +#endif +#ifdef RLIM_SAVED_CUR + if (strcmp(name, "SAVED_CUR") == 0) return RLIM_SAVED_CUR; +#endif + rb_raise(rb_eArgError, "invalid resource value: %s", name); +} +#endif + +/* + * call-seq: + * Process.getrlimit(resource) => [cur_limit, max_limit] + * + * Gets the resource limit of the process. + * _cur_limit_ means current (soft) limit and + * _max_limit_ means maximum (hard) limit. + * + * _resource_ indicates the kind of resource to limit. + * It is specified as a symbol such as :CORE, + * a string such as "CORE" or + * a constant such as Process::RLIMIT_CORE. + * See Process.setrlimit for details. + * + * _cur_limit_ and _max_limit_ may be Process::RLIM_INFINITY, + * Process::RLIM_SAVED_MAX or + * Process::RLIM_SAVED_CUR. + * See Process.setrlimit and the system getrlimit(2) manual for details. + */ + +static VALUE +proc_getrlimit(VALUE obj, VALUE resource) +{ +#if defined(HAVE_GETRLIMIT) && defined(RLIM2NUM) + struct rlimit rlim; + + rb_secure(2); + + if (getrlimit(rlimit_resource_type(resource), &rlim) < 0) { + rb_sys_fail("getrlimit"); + } + return rb_assoc_new(RLIM2NUM(rlim.rlim_cur), RLIM2NUM(rlim.rlim_max)); +#else + rb_notimplement(); +#endif +} + +/* + * call-seq: + * Process.setrlimit(resource, cur_limit, max_limit) => nil + * Process.setrlimit(resource, cur_limit) => nil + * + * Sets the resource limit of the process. + * _cur_limit_ means current (soft) limit and + * _max_limit_ means maximum (hard) limit. + * + * If _max_limit_ is not given, _cur_limit_ is used. + * + * _resource_ indicates the kind of resource to limit. + * It should be a symbol such as :CORE, + * a string such as "CORE" or + * a constant such as Process::RLIMIT_CORE. + * The available resources are OS dependent. + * Ruby may support following resources. + * + * [CORE] core size (bytes) (SUSv3) + * [CPU] CPU time (seconds) (SUSv3) + * [DATA] data segment (bytes) (SUSv3) + * [FSIZE] file size (bytes) (SUSv3) + * [NOFILE] file descriptors (number) (SUSv3) + * [STACK] stack size (bytes) (SUSv3) + * [AS] total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite) + * [MEMLOCK] total size for mlock(2) (bytes) (4.4BSD, GNU/Linux) + * [NPROC] number of processes for the user (number) (4.4BSD, GNU/Linux) + * [RSS] resident memory size (bytes) (4.2BSD, GNU/Linux) + * [SBSIZE] all socket buffers (bytes) (NetBSD, FreeBSD) + * + * _cur_limit_ and _max_limit_ may be + * :INFINITY, "INFINITY" or + * Process::RLIM_INFINITY, + * which means that the resource is not limited. + * They may be Process::RLIM_SAVED_MAX, + * Process::RLIM_SAVED_CUR and + * corresponding symbols and strings too. + * See system setrlimit(2) manual for details. + * + * The following example raise the soft limit of core size to + * the hard limit to try to make core dump possible. + * + * Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1]) + * + */ + +static VALUE +proc_setrlimit(int argc, VALUE *argv, VALUE obj) +{ +#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM) + VALUE resource, rlim_cur, rlim_max; + struct rlimit rlim; + + rb_secure(2); + + rb_scan_args(argc, argv, "21", &resource, &rlim_cur, &rlim_max); + if (rlim_max == Qnil) + rlim_max = rlim_cur; + + rlim.rlim_cur = rlimit_resource_value(rlim_cur); + rlim.rlim_max = rlimit_resource_value(rlim_max); + + if (setrlimit(rlimit_resource_type(resource), &rlim) < 0) { + rb_sys_fail("setrlimit"); + } + return Qnil; +#else + rb_notimplement(); +#endif +} + +static int under_uid_switch = 0; +static void +check_uid_switch(void) +{ + rb_secure(2); + if (under_uid_switch) { + rb_raise(rb_eRuntimeError, "can't handle UID while evaluating block given to Process::UID.switch method"); + } +} + +static int under_gid_switch = 0; +static void +check_gid_switch(void) +{ + rb_secure(2); + if (under_gid_switch) { + rb_raise(rb_eRuntimeError, "can't handle GID while evaluating block given to Process::UID.switch method"); + } +} + + +/********************************************************************* + * Document-class: Process::Sys + * + * The Process::Sys module contains UID and GID + * functions which provide direct bindings to the system calls of the + * same names instead of the more-portable versions of the same + * functionality found in the Process, + * Process::UID, and Process::GID modules. + */ + + +/* + * call-seq: + * Process::Sys.setuid(integer) => nil + * + * Set the user ID of the current process to _integer_. Not + * available on all platforms. + * + */ + +static VALUE +p_sys_setuid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETUID + check_uid_switch(); + if (setuid(NUM2UIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + + +/* + * call-seq: + * Process::Sys.setruid(integer) => nil + * + * Set the real user ID of the calling process to _integer_. + * Not available on all platforms. + * + */ + +static VALUE +p_sys_setruid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETRUID + check_uid_switch(); + if (setruid(NUM2UIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.seteuid(integer) => nil + * + * Set the effective user ID of the calling process to + * _integer_. Not available on all platforms. + * + */ + +static VALUE +p_sys_seteuid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETEUID + check_uid_switch(); + if (seteuid(NUM2UIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.setreuid(rid, eid) => nil + * + * Sets the (integer) real and/or effective user IDs of the current + * process to _rid_ and _eid_, respectively. A value of + * -1 for either means to leave that ID unchanged. Not + * available on all platforms. + * + */ + +static VALUE +p_sys_setreuid(VALUE obj, VALUE rid, VALUE eid) +{ +#if defined HAVE_SETREUID + check_uid_switch(); + if (setreuid(NUM2UIDT(rid),NUM2UIDT(eid)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.setresuid(rid, eid, sid) => nil + * + * Sets the (integer) real, effective, and saved user IDs of the + * current process to _rid_, _eid_, and _sid_ respectively. A + * value of -1 for any value means to + * leave that ID unchanged. Not available on all platforms. + * + */ + +static VALUE +p_sys_setresuid(VALUE obj, VALUE rid, VALUE eid, VALUE sid) +{ +#if defined HAVE_SETRESUID + check_uid_switch(); + if (setresuid(NUM2UIDT(rid),NUM2UIDT(eid),NUM2UIDT(sid)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process.uid => fixnum + * Process::UID.rid => fixnum + * Process::Sys.getuid => fixnum + * + * Returns the (real) user ID of this process. + * + * Process.uid #=> 501 + */ + +static VALUE +proc_getuid(VALUE obj) +{ + rb_uid_t uid = getuid(); + return UIDT2NUM(uid); +} + + +/* + * call-seq: + * Process.uid= integer => numeric + * + * Sets the (integer) user ID for this process. Not available on all + * platforms. + */ + +static VALUE +proc_setuid(VALUE obj, VALUE id) +{ + rb_uid_t uid; + + check_uid_switch(); + + uid = NUM2UIDT(id); +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) + if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETREUID + if (setreuid(uid, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETRUID + if (setruid(uid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETUID + { + if (geteuid() == uid) { + if (setuid(uid) < 0) rb_sys_fail(0); + } + else { + rb_notimplement(); + } + } +#else + rb_notimplement(); +#endif + return id; +} + + +/******************************************************************** + * + * Document-class: Process::UID + * + * The Process::UID module contains a collection of + * module functions which can be used to portably get, set, and + * switch the current process's real, effective, and saved user IDs. + * + */ + +static rb_uid_t SAVED_USER_ID = -1; + +#ifdef BROKEN_SETREUID +int +setreuid(rb_uid_t ruid, rb_uid_t euid) +{ + if (ruid != -1 && ruid != getuid()) { + if (euid == -1) euid = geteuid(); + if (setuid(ruid) < 0) return -1; + } + if (euid != -1 && euid != geteuid()) { + if (seteuid(euid) < 0) return -1; + } + return 0; +} +#endif + +/* + * call-seq: + * Process::UID.change_privilege(integer) => fixnum + * + * Change the current process's real and effective user ID to that + * specified by _integer_. Returns the new user ID. Not + * available on all platforms. + * + * [Process.uid, Process.euid] #=> [0, 0] + * Process::UID.change_privilege(31) #=> 31 + * [Process.uid, Process.euid] #=> [31, 31] + */ + +static VALUE +p_uid_change_privilege(VALUE obj, VALUE id) +{ + rb_uid_t uid; + + check_uid_switch(); + + uid = NUM2UIDT(id); + + if (geteuid() == 0) { /* root-user */ +#if defined(HAVE_SETRESUID) + if (setresuid(uid, uid, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; +#elif defined(HAVE_SETUID) + if (setuid(uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; +#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID) + if (getuid() == uid) { + if (SAVED_USER_ID == uid) { + if (setreuid(-1, uid) < 0) rb_sys_fail(0); + } else { + if (uid == 0) { /* (r,e,s) == (root, root, x) */ + if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0); + if (setreuid(SAVED_USER_ID, 0) < 0) rb_sys_fail(0); + SAVED_USER_ID = 0; /* (r,e,s) == (x, root, root) */ + if (setreuid(uid, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } else { + if (setreuid(0, -1) < 0) rb_sys_fail(0); + SAVED_USER_ID = 0; + if (setreuid(uid, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } + } + } else { + if (setreuid(uid, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } +#elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID) + if (getuid() == uid) { + if (SAVED_USER_ID == uid) { + if (seteuid(uid) < 0) rb_sys_fail(0); + } else { + if (uid == 0) { + if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0); + SAVED_USER_ID = 0; + if (setruid(0) < 0) rb_sys_fail(0); + } else { + if (setruid(0) < 0) rb_sys_fail(0); + SAVED_USER_ID = 0; + if (seteuid(uid) < 0) rb_sys_fail(0); + if (setruid(uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } + } + } else { + if (seteuid(uid) < 0) rb_sys_fail(0); + if (setruid(uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } +#else + rb_notimplement(); +#endif + } else { /* unprivileged user */ +#if defined(HAVE_SETRESUID) + if (setresuid((getuid() == uid)? -1: uid, + (geteuid() == uid)? -1: uid, + (SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; +#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID) + if (SAVED_USER_ID == uid) { + if (setreuid((getuid() == uid)? -1: uid, + (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0); + } else if (getuid() != uid) { + if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } else if (/* getuid() == uid && */ geteuid() != uid) { + if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + if (setreuid(uid, -1) < 0) rb_sys_fail(0); + } else { /* getuid() == uid && geteuid() == uid */ + if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0); + if (setreuid(SAVED_USER_ID, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + if (setreuid(uid, -1) < 0) rb_sys_fail(0); + } +#elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID) + if (SAVED_USER_ID == uid) { + if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0); + if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0); + } else if (/* SAVED_USER_ID != uid && */ geteuid() == uid) { + if (getuid() != uid) { + if (setruid(uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } else { + if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + if (setruid(uid) < 0) rb_sys_fail(0); + } + } else if (/* geteuid() != uid && */ getuid() == uid) { + if (seteuid(uid) < 0) rb_sys_fail(0); + if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + if (setruid(uid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_44BSD_SETUID + if (getuid() == uid) { + /* (r,e,s)==(uid,?,?) ==> (uid,uid,uid) */ + if (setuid(uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_SETEUID + if (getuid() == uid && SAVED_USER_ID == uid) { + if (seteuid(uid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_SETUID + if (getuid() == uid && SAVED_USER_ID == uid) { + if (setuid(uid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#else + rb_notimplement(); +#endif + } + return id; +} + + + +/* + * call-seq: + * Process::Sys.setgid(integer) => nil + * + * Set the group ID of the current process to _integer_. Not + * available on all platforms. + * + */ + +static VALUE +p_sys_setgid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETGID + check_gid_switch(); + if (setgid(NUM2GIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.setrgid(integer) => nil + * + * Set the real group ID of the calling process to _integer_. + * Not available on all platforms. + * + */ + +static VALUE +p_sys_setrgid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETRGID + check_gid_switch(); + if (setrgid(NUM2GIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + + +/* + * call-seq: + * Process::Sys.setegid(integer) => nil + * + * Set the effective group ID of the calling process to + * _integer_. Not available on all platforms. + * + */ + +static VALUE +p_sys_setegid(VALUE obj, VALUE id) +{ +#if defined HAVE_SETEGID + check_gid_switch(); + if (setegid(NUM2GIDT(id)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.setregid(rid, eid) => nil + * + * Sets the (integer) real and/or effective group IDs of the current + * process to rid and eid, respectively. A value of + * -1 for either means to leave that ID unchanged. Not + * available on all platforms. + * + */ + +static VALUE +p_sys_setregid(VALUE obj, VALUE rid, VALUE eid) +{ +#if defined HAVE_SETREGID + check_gid_switch(); + if (setregid(NUM2GIDT(rid),NUM2GIDT(eid)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + +/* + * call-seq: + * Process::Sys.setresgid(rid, eid, sid) => nil + * + * Sets the (integer) real, effective, and saved user IDs of the + * current process to rid, eid, and sid + * respectively. A value of -1 for any value means to + * leave that ID unchanged. Not available on all platforms. + * + */ + +static VALUE +p_sys_setresgid(VALUE obj, VALUE rid, VALUE eid, VALUE sid) +{ +#if defined HAVE_SETRESGID + check_gid_switch(); + if (setresgid(NUM2GIDT(rid),NUM2GIDT(eid),NUM2GIDT(sid)) != 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return Qnil; +} + + +/* + * call-seq: + * Process::Sys.issetugid => true or false + * + * Returns +true+ if the process was created as a result + * of an execve(2) system call which had either of the setuid or + * setgid bits set (and extra privileges were given as a result) or + * if it has changed any of its real, effective or saved user or + * group IDs since it began execution. + * + */ + +static VALUE +p_sys_issetugid(VALUE obj) +{ +#if defined HAVE_ISSETUGID + rb_secure(2); + if (issetugid()) { + return Qtrue; + } else { + return Qfalse; + } +#else + rb_notimplement(); + return Qnil; /* not reached */ +#endif +} + + +/* + * call-seq: + * Process.gid => fixnum + * Process::GID.rid => fixnum + * Process::Sys.getgid => fixnum + * + * Returns the (real) group ID for this process. + * + * Process.gid #=> 500 + */ + +static VALUE +proc_getgid(VALUE obj) +{ + rb_gid_t gid = getgid(); + return GIDT2NUM(gid); +} + + +/* + * call-seq: + * Process.gid= fixnum => fixnum + * + * Sets the group ID for this process. + */ + +static VALUE +proc_setgid(VALUE obj, VALUE id) +{ + rb_gid_t gid; + + check_gid_switch(); + + gid = NUM2GIDT(id); +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) + if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETREGID + if (setregid(gid, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETRGID + if (setrgid(gid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETGID + { + if (getegid() == gid) { + if (setgid(gid) < 0) rb_sys_fail(0); + } + else { + rb_notimplement(); + } + } +#else + rb_notimplement(); +#endif + return GIDT2NUM(gid); +} + + +static size_t maxgroups = 32; + + +/* + * call-seq: + * Process.groups => array + * + * Get an Array of the gids of groups in the + * supplemental group access list for this process. + * + * Process.groups #=> [27, 6, 10, 11] + * + */ + +static VALUE +proc_getgroups(VALUE obj) +{ +#ifdef HAVE_GETGROUPS + VALUE ary; + size_t ngroups; + rb_gid_t *groups; + int i; + + groups = ALLOCA_N(rb_gid_t, maxgroups); + + ngroups = getgroups(maxgroups, groups); + if (ngroups == -1) + rb_sys_fail(0); + + ary = rb_ary_new(); + for (i = 0; i < ngroups; i++) + rb_ary_push(ary, GIDT2NUM(groups[i])); + + return ary; +#else + rb_notimplement(); + return Qnil; +#endif +} + + +/* + * call-seq: + * Process.groups= array => array + * + * Set the supplemental group access list to the given + * Array of group IDs. + * + * Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] + * Process.groups = [27, 6, 10, 11] #=> [27, 6, 10, 11] + * Process.groups #=> [27, 6, 10, 11] + * + */ + +static VALUE +proc_setgroups(VALUE obj, VALUE ary) +{ +#ifdef HAVE_SETGROUPS + size_t ngroups; + rb_gid_t *groups; + int i; + struct group *gr; + + Check_Type(ary, T_ARRAY); + + ngroups = RARRAY_LEN(ary); + if (ngroups > maxgroups) + rb_raise(rb_eArgError, "too many groups, %lu max", (unsigned long)maxgroups); + + groups = ALLOCA_N(rb_gid_t, ngroups); + + for (i = 0; i < ngroups && i < RARRAY_LEN(ary); i++) { + VALUE g = RARRAY_PTR(ary)[i]; + + if (FIXNUM_P(g)) { + groups[i] = NUM2GIDT(g); + } + else { + VALUE tmp = rb_check_string_type(g); + + if (NIL_P(tmp)) { + groups[i] = NUM2GIDT(g); + } + else { + gr = getgrnam(RSTRING_PTR(tmp)); + if (gr == NULL) + rb_raise(rb_eArgError, + "can't find group for %s", RSTRING_PTR(tmp)); + groups[i] = gr->gr_gid; + } + } + } + + i = setgroups(ngroups, groups); + if (i == -1) + rb_sys_fail(0); + + return proc_getgroups(obj); +#else + rb_notimplement(); + return Qnil; +#endif +} + + +/* + * call-seq: + * Process.initgroups(username, gid) => array + * + * Initializes the supplemental group access list by reading the + * system group database and using all groups of which the given user + * is a member. The group with the specified gid is also + * added to the list. Returns the resulting Array of the + * gids of all the groups in the supplementary group access list. Not + * available on all platforms. + * + * Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] + * Process.initgroups( "mgranger", 30 ) #=> [30, 6, 10, 11] + * Process.groups #=> [30, 6, 10, 11] + * + */ + +static VALUE +proc_initgroups(VALUE obj, VALUE uname, VALUE base_grp) +{ +#ifdef HAVE_INITGROUPS + if (initgroups(StringValuePtr(uname), NUM2GIDT(base_grp)) != 0) { + rb_sys_fail(0); + } + return proc_getgroups(obj); +#else + rb_notimplement(); + return Qnil; +#endif +} + + +/* + * call-seq: + * Process.maxgroups => fixnum + * + * Returns the maximum number of gids allowed in the supplemental + * group access list. + * + * Process.maxgroups #=> 32 + */ + +static VALUE +proc_getmaxgroups(VALUE obj) +{ + return INT2FIX(maxgroups); +} + + +/* + * call-seq: + * Process.maxgroups= fixnum => fixnum + * + * Sets the maximum number of gids allowed in the supplemental group + * access list. + */ + +static VALUE +proc_setmaxgroups(VALUE obj, VALUE val) +{ + size_t ngroups = FIX2INT(val); + + if (ngroups > 4096) + ngroups = 4096; + + maxgroups = ngroups; + + return INT2FIX(maxgroups); +} + +/* + * call-seq: + * Process.daemon() => fixnum + * Process.daemon(nochdir=nil,noclose=nil) => fixnum + * + * Detach the process from controlling terminal and run in + * the background as system daemon. Unless the argument + * nochdir is true (i.e. non false), it changes the current + * working directory to the root ("/"). Unless the argument + * noclose is true, daemon() will redirect standard input, + * standard output and standard error to /dev/null. + */ + +static VALUE +proc_daemon(int argc, VALUE *argv) +{ + VALUE nochdir, noclose; +#if defined(HAVE_DAEMON) || defined(HAVE_FORK) + int n; +#endif + + rb_secure(2); + rb_scan_args(argc, argv, "02", &nochdir, &noclose); + +#if defined(HAVE_DAEMON) + n = daemon(RTEST(nochdir), RTEST(noclose)); + if (n < 0) rb_sys_fail("daemon"); + return INT2FIX(n); +#elif defined(HAVE_FORK) + switch (rb_fork(0, 0, 0, Qnil)) { + case -1: + return (-1); + case 0: + break; + default: + _exit(0); + } + + proc_setsid(); + + if (!RTEST(nochdir)) + (void)chdir("/"); + + if (!RTEST(noclose) && (n = open("/dev/null", O_RDWR, 0)) != -1) { + (void)dup2(n, 0); + (void)dup2(n, 1); + (void)dup2(n, 2); + if (n > 2) + (void)close (n); + } + return INT2FIX(0); +#else + rb_notimplement(); +#endif +} + +/******************************************************************** + * + * Document-class: Process::GID + * + * The Process::GID module contains a collection of + * module functions which can be used to portably get, set, and + * switch the current process's real, effective, and saved group IDs. + * + */ + +static int SAVED_GROUP_ID = -1; + +#ifdef BROKEN_SETREGID +int +setregid(rb_gid_t rgid, rb_gid_t egid) +{ + if (rgid != -1 && rgid != getgid()) { + if (egid == -1) egid = getegid(); + if (setgid(rgid) < 0) return -1; + } + if (egid != -1 && egid != getegid()) { + if (setegid(egid) < 0) return -1; + } + return 0; +} +#endif + +/* + * call-seq: + * Process::GID.change_privilege(integer) => fixnum + * + * Change the current process's real and effective group ID to that + * specified by _integer_. Returns the new group ID. Not + * available on all platforms. + * + * [Process.gid, Process.egid] #=> [0, 0] + * Process::GID.change_privilege(33) #=> 33 + * [Process.gid, Process.egid] #=> [33, 33] + */ + +static VALUE +p_gid_change_privilege(VALUE obj, VALUE id) +{ + rb_gid_t gid; + + check_gid_switch(); + + gid = NUM2GIDT(id); + + if (geteuid() == 0) { /* root-user */ +#if defined(HAVE_SETRESGID) + if (setresgid(gid, gid, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; +#elif defined HAVE_SETGID + if (setgid(gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; +#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID) + if (getgid() == gid) { + if (SAVED_GROUP_ID == gid) { + if (setregid(-1, gid) < 0) rb_sys_fail(0); + } else { + if (gid == 0) { /* (r,e,s) == (root, y, x) */ + if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0); + if (setregid(SAVED_GROUP_ID, 0) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = 0; /* (r,e,s) == (x, root, root) */ + if (setregid(gid, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } else { /* (r,e,s) == (z, y, x) */ + if (setregid(0, 0) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = 0; + if (setregid(gid, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } + } + } else { + if (setregid(gid, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } +#elif defined(HAVE_SETRGID) && defined (HAVE_SETEGID) + if (getgid() == gid) { + if (SAVED_GROUP_ID == gid) { + if (setegid(gid) < 0) rb_sys_fail(0); + } else { + if (gid == 0) { + if (setegid(gid) < 0) rb_sys_fail(0); + if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = 0; + if (setrgid(0) < 0) rb_sys_fail(0); + } else { + if (setrgid(0) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = 0; + if (setegid(gid) < 0) rb_sys_fail(0); + if (setrgid(gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } + } + } else { + if (setegid(gid) < 0) rb_sys_fail(0); + if (setrgid(gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } +#else + rb_notimplement(); +#endif + } else { /* unprivileged user */ +#if defined(HAVE_SETRESGID) + if (setresgid((getgid() == gid)? -1: gid, + (getegid() == gid)? -1: gid, + (SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; +#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID) + if (SAVED_GROUP_ID == gid) { + if (setregid((getgid() == gid)? -1: gid, + (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0); + } else if (getgid() != gid) { + if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } else if (/* getgid() == gid && */ getegid() != gid) { + if (setregid(getegid(), gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + if (setregid(gid, -1) < 0) rb_sys_fail(0); + } else { /* getgid() == gid && getegid() == gid */ + if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0); + if (setregid(SAVED_GROUP_ID, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + if (setregid(gid, -1) < 0) rb_sys_fail(0); + } +#elif defined(HAVE_SETRGID) && defined(HAVE_SETEGID) + if (SAVED_GROUP_ID == gid) { + if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0); + if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0); + } else if (/* SAVED_GROUP_ID != gid && */ getegid() == gid) { + if (getgid() != gid) { + if (setrgid(gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } else { + if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + if (setrgid(gid) < 0) rb_sys_fail(0); + } + } else if (/* getegid() != gid && */ getgid() == gid) { + if (setegid(gid) < 0) rb_sys_fail(0); + if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + if (setrgid(gid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_44BSD_SETGID + if (getgid() == gid) { + /* (r,e,s)==(gid,?,?) ==> (gid,gid,gid) */ + if (setgid(gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_SETEGID + if (getgid() == gid && SAVED_GROUP_ID == gid) { + if (setegid(gid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#elif defined HAVE_SETGID + if (getgid() == gid && SAVED_GROUP_ID == gid) { + if (setgid(gid) < 0) rb_sys_fail(0); + } else { + errno = EPERM; + rb_sys_fail(0); + } +#else + rb_notimplement(); +#endif + } + return id; +} + + +/* + * call-seq: + * Process.euid => fixnum + * Process::UID.eid => fixnum + * Process::Sys.geteuid => fixnum + * + * Returns the effective user ID for this process. + * + * Process.euid #=> 501 + */ + +static VALUE +proc_geteuid(VALUE obj) +{ + rb_uid_t euid = geteuid(); + return UIDT2NUM(euid); +} + + +/* + * call-seq: + * Process.euid= integer + * + * Sets the effective user ID for this process. Not available on all + * platforms. + */ + +static VALUE +proc_seteuid(VALUE obj, VALUE euid) +{ + rb_uid_t uid; + + check_uid_switch(); + + uid = NUM2UIDT(euid); +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) + if (setresuid(-1, uid, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETREUID + if (setreuid(-1, uid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETEUID + if (seteuid(uid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETUID + if (uid == getuid()) { + if (setuid(uid) < 0) rb_sys_fail(0); + } + else { + rb_notimplement(); + } +#else + rb_notimplement(); +#endif + return euid; +} + +static rb_uid_t +rb_seteuid_core(rb_uid_t euid) +{ + rb_uid_t uid; + + check_uid_switch(); + + uid = getuid(); + +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) + if (uid != euid) { + if (setresuid(-1,euid,euid) < 0) rb_sys_fail(0); + SAVED_USER_ID = euid; + } else { + if (setresuid(-1,euid,-1) < 0) rb_sys_fail(0); + } +#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID) + if (setreuid(-1, euid) < 0) rb_sys_fail(0); + if (uid != euid) { + if (setreuid(euid,uid) < 0) rb_sys_fail(0); + if (setreuid(uid,euid) < 0) rb_sys_fail(0); + SAVED_USER_ID = euid; + } +#elif defined HAVE_SETEUID + if (seteuid(euid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETUID + if (geteuid() == 0) rb_sys_fail(0); + if (setuid(euid) < 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return euid; +} + + +/* + * call-seq: + * Process::UID.grant_privilege(integer) => fixnum + * Process::UID.eid= integer => fixnum + * + * Set the effective user ID, and if possible, the saved user ID of + * the process to the given _integer_. Returns the new + * effective user ID. Not available on all platforms. + * + * [Process.uid, Process.euid] #=> [0, 0] + * Process::UID.grant_privilege(31) #=> 31 + * [Process.uid, Process.euid] #=> [0, 31] + */ + +static VALUE +p_uid_grant_privilege(VALUE obj, VALUE id) +{ + rb_seteuid_core(NUM2UIDT(id)); + return id; +} + + +/* + * call-seq: + * Process.egid => fixnum + * Process::GID.eid => fixnum + * Process::Sys.geteid => fixnum + * + * Returns the effective group ID for this process. Not available on + * all platforms. + * + * Process.egid #=> 500 + */ + +static VALUE +proc_getegid(VALUE obj) +{ + rb_gid_t egid = getegid(); + + return GIDT2NUM(egid); +} + + +/* + * call-seq: + * Process.egid = fixnum => fixnum + * + * Sets the effective group ID for this process. Not available on all + * platforms. + */ + +static VALUE +proc_setegid(VALUE obj, VALUE egid) +{ + rb_gid_t gid; + + check_gid_switch(); + + gid = NUM2GIDT(egid); +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) + if (setresgid(-1, gid, -1) < 0) rb_sys_fail(0); +#elif defined HAVE_SETREGID + if (setregid(-1, gid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETEGID + if (setegid(gid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETGID + if (gid == getgid()) { + if (setgid(gid) < 0) rb_sys_fail(0); + } + else { + rb_notimplement(); + } +#else + rb_notimplement(); +#endif + return egid; +} + +static rb_gid_t +rb_setegid_core(rb_gid_t egid) +{ + rb_gid_t gid; + + check_gid_switch(); + + gid = getgid(); + +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) + if (gid != egid) { + if (setresgid(-1,egid,egid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = egid; + } else { + if (setresgid(-1,egid,-1) < 0) rb_sys_fail(0); + } +#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID) + if (setregid(-1, egid) < 0) rb_sys_fail(0); + if (gid != egid) { + if (setregid(egid,gid) < 0) rb_sys_fail(0); + if (setregid(gid,egid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = egid; + } +#elif defined HAVE_SETEGID + if (setegid(egid) < 0) rb_sys_fail(0); +#elif defined HAVE_SETGID + if (geteuid() == 0 /* root user */) rb_sys_fail(0); + if (setgid(egid) < 0) rb_sys_fail(0); +#else + rb_notimplement(); +#endif + return egid; +} + + +/* + * call-seq: + * Process::GID.grant_privilege(integer) => fixnum + * Process::GID.eid = integer => fixnum + * + * Set the effective group ID, and if possible, the saved group ID of + * the process to the given _integer_. Returns the new + * effective group ID. Not available on all platforms. + * + * [Process.gid, Process.egid] #=> [0, 0] + * Process::GID.grant_privilege(31) #=> 33 + * [Process.gid, Process.egid] #=> [0, 33] + */ + +static VALUE +p_gid_grant_privilege(VALUE obj, VALUE id) +{ + rb_setegid_core(NUM2GIDT(id)); + return id; +} + + +/* + * call-seq: + * Process::UID.re_exchangeable? => true or false + * + * Returns +true+ if the real and effective user IDs of a + * process may be exchanged on the current platform. + * + */ + +static VALUE +p_uid_exchangeable(void) +{ +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) + return Qtrue; +#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID) + return Qtrue; +#else + return Qfalse; +#endif +} + + +/* + * call-seq: + * Process::UID.re_exchange => fixnum + * + * Exchange real and effective user IDs and return the new effective + * user ID. Not available on all platforms. + * + * [Process.uid, Process.euid] #=> [0, 31] + * Process::UID.re_exchange #=> 0 + * [Process.uid, Process.euid] #=> [31, 0] + */ + +static VALUE +p_uid_exchange(VALUE obj) +{ + rb_uid_t uid, euid; + + check_uid_switch(); + + uid = getuid(); + euid = geteuid(); + +#if defined(HAVE_SETRESUID) && !defined(__CHECKER__) + if (setresuid(euid, uid, uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; +#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID) + if (setreuid(euid,uid) < 0) rb_sys_fail(0); + SAVED_USER_ID = uid; +#else + rb_notimplement(); +#endif + return UIDT2NUM(uid); +} + + +/* + * call-seq: + * Process::GID.re_exchangeable? => true or false + * + * Returns +true+ if the real and effective group IDs of a + * process may be exchanged on the current platform. + * + */ + +static VALUE +p_gid_exchangeable(void) +{ +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) + return Qtrue; +#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID) + return Qtrue; +#else + return Qfalse; +#endif +} + + +/* + * call-seq: + * Process::GID.re_exchange => fixnum + * + * Exchange real and effective group IDs and return the new effective + * group ID. Not available on all platforms. + * + * [Process.gid, Process.egid] #=> [0, 33] + * Process::GID.re_exchange #=> 0 + * [Process.gid, Process.egid] #=> [33, 0] + */ + +static VALUE +p_gid_exchange(VALUE obj) +{ + rb_gid_t gid, egid; + + check_gid_switch(); + + gid = getgid(); + egid = getegid(); + +#if defined(HAVE_SETRESGID) && !defined(__CHECKER__) + if (setresgid(egid, gid, gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; +#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID) + if (setregid(egid,gid) < 0) rb_sys_fail(0); + SAVED_GROUP_ID = gid; +#else + rb_notimplement(); +#endif + return GIDT2NUM(gid); +} + +/* [MG] :FIXME: Is this correct? I'm not sure how to phrase this. */ + +/* + * call-seq: + * Process::UID.sid_available? => true or false + * + * Returns +true+ if the current platform has saved user + * ID functionality. + * + */ + +static VALUE +p_uid_have_saved_id(void) +{ +#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS) + return Qtrue; +#else + return Qfalse; +#endif +} + + +#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS) +static VALUE +p_uid_sw_ensure(rb_uid_t id) +{ + under_uid_switch = 0; + id = rb_seteuid_core(id); + return UIDT2NUM(id); +} + + +/* + * call-seq: + * Process::UID.switch => fixnum + * Process::UID.switch {|| block} => object + * + * Switch the effective and real user IDs of the current process. If + * a block is given, the user IDs will be switched back + * after the block is executed. Returns the new effective user ID if + * called without a block, and the return value of the block if one + * is given. + * + */ + +static VALUE +p_uid_switch(VALUE obj) +{ + rb_uid_t uid, euid; + + check_uid_switch(); + + uid = getuid(); + euid = geteuid(); + + if (uid != euid) { + proc_seteuid(obj, UIDT2NUM(uid)); + if (rb_block_given_p()) { + under_uid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID); + } else { + return UIDT2NUM(euid); + } + } else if (euid != SAVED_USER_ID) { + proc_seteuid(obj, UIDT2NUM(SAVED_USER_ID)); + if (rb_block_given_p()) { + under_uid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid); + } else { + return UIDT2NUM(uid); + } + } else { + errno = EPERM; + rb_sys_fail(0); + } +} +#else +static VALUE +p_uid_sw_ensure(VALUE obj) +{ + under_uid_switch = 0; + return p_uid_exchange(obj); +} + +static VALUE +p_uid_switch(VALUE obj) +{ + rb_uid_t uid, euid; + + check_uid_switch(); + + uid = getuid(); + euid = geteuid(); + + if (uid == euid) { + errno = EPERM; + rb_sys_fail(0); + } + p_uid_exchange(obj); + if (rb_block_given_p()) { + under_uid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj); + } else { + return UIDT2NUM(euid); + } +} +#endif + + +/* [MG] :FIXME: Is this correct? I'm not sure how to phrase this. */ + +/* + * call-seq: + * Process::GID.sid_available? => true or false + * + * Returns +true+ if the current platform has saved group + * ID functionality. + * + */ + +static VALUE +p_gid_have_saved_id(void) +{ +#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS) + return Qtrue; +#else + return Qfalse; +#endif +} + +#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS) +static VALUE +p_gid_sw_ensure(rb_gid_t id) +{ + under_gid_switch = 0; + id = rb_setegid_core(id); + return GIDT2NUM(id); +} + + +/* + * call-seq: + * Process::GID.switch => fixnum + * Process::GID.switch {|| block} => object + * + * Switch the effective and real group IDs of the current process. If + * a block is given, the group IDs will be switched back + * after the block is executed. Returns the new effective group ID if + * called without a block, and the return value of the block if one + * is given. + * + */ + +static VALUE +p_gid_switch(VALUE obj) +{ + int gid, egid; + + check_gid_switch(); + + gid = getgid(); + egid = getegid(); + + if (gid != egid) { + proc_setegid(obj, GIDT2NUM(gid)); + if (rb_block_given_p()) { + under_gid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID); + } else { + return GIDT2NUM(egid); + } + } else if (egid != SAVED_GROUP_ID) { + proc_setegid(obj, GIDT2NUM(SAVED_GROUP_ID)); + if (rb_block_given_p()) { + under_gid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid); + } else { + return GIDT2NUM(gid); + } + } else { + errno = EPERM; + rb_sys_fail(0); + } +} +#else +static VALUE +p_gid_sw_ensure(VALUE obj) +{ + under_gid_switch = 0; + return p_gid_exchange(obj); +} + +static VALUE +p_gid_switch(VALUE obj) +{ + rb_gid_t gid, egid; + + check_gid_switch(); + + gid = getgid(); + egid = getegid(); + + if (gid == egid) { + errno = EPERM; + rb_sys_fail(0); + } + p_gid_exchange(obj); + if (rb_block_given_p()) { + under_gid_switch = 1; + return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj); + } else { + return GIDT2NUM(egid); + } +} +#endif + + +/* + * call-seq: + * Process.times => aStructTms + * + * Returns a Tms structure (see Struct::Tms + * on page 388) that contains user and system CPU times for this + * process. + * + * t = Process.times + * [ t.utime, t.stime ] #=> [0.0, 0.02] + */ + +VALUE +rb_proc_times(VALUE obj) +{ +#if defined(HAVE_TIMES) && !defined(__CHECKER__) + const double hertz = +#ifdef HAVE__SC_CLK_TCK + (double)sysconf(_SC_CLK_TCK); +#else +#ifndef HZ +# ifdef CLK_TCK +# define HZ CLK_TCK +# else +# define HZ 60 +# endif +#endif /* HZ */ + HZ; +#endif + struct tms buf; + volatile VALUE utime, stime, cutime, sctime; + + times(&buf); + return rb_struct_new(rb_cProcessTms, + utime = DBL2NUM(buf.tms_utime / hertz), + stime = DBL2NUM(buf.tms_stime / hertz), + cutime = DBL2NUM(buf.tms_cutime / hertz), + sctime = DBL2NUM(buf.tms_cstime / hertz)); +#else + rb_notimplement(); +#endif +} + +VALUE rb_mProcess; +VALUE rb_mProcUID; +VALUE rb_mProcGID; +VALUE rb_mProcID_Syscall; + + +/* + * The Process module is a collection of methods used to + * manipulate processes. + */ + +void +Init_process(void) +{ + rb_define_virtual_variable("$?", rb_last_status_get, 0); + rb_define_virtual_variable("$$", get_pid, 0); + rb_define_global_function("exec", rb_f_exec, -1); + rb_define_global_function("fork", rb_f_fork, 0); + rb_define_global_function("exit!", rb_f_exit_bang, -1); + rb_define_global_function("system", rb_f_system, -1); + rb_define_global_function("spawn", rb_f_spawn, -1); + rb_define_global_function("sleep", rb_f_sleep, -1); + rb_define_global_function("exit", rb_f_exit, -1); + rb_define_global_function("abort", rb_f_abort, -1); + + rb_mProcess = rb_define_module("Process"); + +#ifdef WNOHANG + rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG)); +#else + rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0)); +#endif +#ifdef WUNTRACED + rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED)); +#else + rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0)); +#endif + + rb_define_singleton_method(rb_mProcess, "exec", rb_f_exec, -1); + rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0); + rb_define_singleton_method(rb_mProcess, "spawn", rb_f_spawn, -1); + rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1); + rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1); + rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); + + rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */ + rb_define_module_function(rb_mProcess, "wait", proc_wait, -1); + rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1); + rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1); + rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1); + rb_define_module_function(rb_mProcess, "waitall", proc_waitall, 0); + rb_define_module_function(rb_mProcess, "detach", proc_detach, 1); + + rb_cProcessStatus = rb_define_class_under(rb_mProcess, "Status", rb_cObject); + rb_undef_method(CLASS_OF(rb_cProcessStatus), "new"); + + rb_define_method(rb_cProcessStatus, "==", pst_equal, 1); + rb_define_method(rb_cProcessStatus, "&", pst_bitand, 1); + rb_define_method(rb_cProcessStatus, ">>", pst_rshift, 1); + rb_define_method(rb_cProcessStatus, "to_i", pst_to_i, 0); + rb_define_method(rb_cProcessStatus, "to_s", pst_to_s, 0); + rb_define_method(rb_cProcessStatus, "inspect", pst_inspect, 0); + + rb_define_method(rb_cProcessStatus, "pid", pst_pid, 0); + + rb_define_method(rb_cProcessStatus, "stopped?", pst_wifstopped, 0); + rb_define_method(rb_cProcessStatus, "stopsig", pst_wstopsig, 0); + rb_define_method(rb_cProcessStatus, "signaled?", pst_wifsignaled, 0); + rb_define_method(rb_cProcessStatus, "termsig", pst_wtermsig, 0); + rb_define_method(rb_cProcessStatus, "exited?", pst_wifexited, 0); + rb_define_method(rb_cProcessStatus, "exitstatus", pst_wexitstatus, 0); + rb_define_method(rb_cProcessStatus, "success?", pst_success_p, 0); + rb_define_method(rb_cProcessStatus, "coredump?", pst_wcoredump, 0); + + rb_define_module_function(rb_mProcess, "pid", get_pid, 0); + rb_define_module_function(rb_mProcess, "ppid", get_ppid, 0); + + rb_define_module_function(rb_mProcess, "getpgrp", proc_getpgrp, 0); + rb_define_module_function(rb_mProcess, "setpgrp", proc_setpgrp, 0); + rb_define_module_function(rb_mProcess, "getpgid", proc_getpgid, 1); + rb_define_module_function(rb_mProcess, "setpgid", proc_setpgid, 2); + + rb_define_module_function(rb_mProcess, "setsid", proc_setsid, 0); + + rb_define_module_function(rb_mProcess, "getpriority", proc_getpriority, 2); + rb_define_module_function(rb_mProcess, "setpriority", proc_setpriority, 3); + +#ifdef HAVE_GETPRIORITY + rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS)); + rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP)); + rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER)); +#endif + + rb_define_module_function(rb_mProcess, "getrlimit", proc_getrlimit, 1); + rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, -1); +#ifdef RLIM2NUM + { + VALUE inf = RLIM2NUM(RLIM_INFINITY); +#ifdef RLIM_SAVED_MAX + VALUE v = RLIM_INFINITY == RLIM_SAVED_MAX ? inf : RLIM2NUM(RLIM_SAVED_MAX); + rb_define_const(rb_mProcess, "RLIM_SAVED_MAX", v); +#endif + rb_define_const(rb_mProcess, "RLIM_INFINITY", inf); +#ifdef RLIM_SAVED_CUR + v = RLIM_INFINITY == RLIM_SAVED_CUR ? inf : RLIM2NUM(RLIM_SAVED_CUR); + rb_define_const(rb_mProcess, "RLIM_SAVED_CUR", v); +#endif + } +#ifdef RLIMIT_CORE + rb_define_const(rb_mProcess, "RLIMIT_CORE", INT2FIX(RLIMIT_CORE)); +#endif +#ifdef RLIMIT_CPU + rb_define_const(rb_mProcess, "RLIMIT_CPU", INT2FIX(RLIMIT_CPU)); +#endif +#ifdef RLIMIT_DATA + rb_define_const(rb_mProcess, "RLIMIT_DATA", INT2FIX(RLIMIT_DATA)); +#endif +#ifdef RLIMIT_FSIZE + rb_define_const(rb_mProcess, "RLIMIT_FSIZE", INT2FIX(RLIMIT_FSIZE)); +#endif +#ifdef RLIMIT_NOFILE + rb_define_const(rb_mProcess, "RLIMIT_NOFILE", INT2FIX(RLIMIT_NOFILE)); +#endif +#ifdef RLIMIT_STACK + rb_define_const(rb_mProcess, "RLIMIT_STACK", INT2FIX(RLIMIT_STACK)); +#endif +#ifdef RLIMIT_AS + rb_define_const(rb_mProcess, "RLIMIT_AS", INT2FIX(RLIMIT_AS)); +#endif +#ifdef RLIMIT_MEMLOCK + rb_define_const(rb_mProcess, "RLIMIT_MEMLOCK", INT2FIX(RLIMIT_MEMLOCK)); +#endif +#ifdef RLIMIT_NPROC + rb_define_const(rb_mProcess, "RLIMIT_NPROC", INT2FIX(RLIMIT_NPROC)); +#endif +#ifdef RLIMIT_RSS + rb_define_const(rb_mProcess, "RLIMIT_RSS", INT2FIX(RLIMIT_RSS)); +#endif +#ifdef RLIMIT_SBSIZE + rb_define_const(rb_mProcess, "RLIMIT_SBSIZE", INT2FIX(RLIMIT_SBSIZE)); +#endif +#endif + + rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0); + rb_define_module_function(rb_mProcess, "uid=", proc_setuid, 1); + rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0); + rb_define_module_function(rb_mProcess, "gid=", proc_setgid, 1); + rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0); + rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1); + rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0); + rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1); + rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2); + rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0); + rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1); + rb_define_module_function(rb_mProcess, "maxgroups", proc_getmaxgroups, 0); + rb_define_module_function(rb_mProcess, "maxgroups=", proc_setmaxgroups, 1); + + rb_define_module_function(rb_mProcess, "daemon", proc_daemon, -1); + + rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0); + +#if defined(HAVE_TIMES) || defined(_WIN32) + rb_cProcessTms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL); +#endif + + SAVED_USER_ID = geteuid(); + SAVED_GROUP_ID = getegid(); + + rb_mProcUID = rb_define_module_under(rb_mProcess, "UID"); + rb_mProcGID = rb_define_module_under(rb_mProcess, "GID"); + + rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0); + rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0); + rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0); + rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0); + rb_define_module_function(rb_mProcUID, "change_privilege", p_uid_change_privilege, 1); + rb_define_module_function(rb_mProcGID, "change_privilege", p_gid_change_privilege, 1); + rb_define_module_function(rb_mProcUID, "grant_privilege", p_uid_grant_privilege, 1); + rb_define_module_function(rb_mProcGID, "grant_privilege", p_gid_grant_privilege, 1); + rb_define_alias(rb_singleton_class(rb_mProcUID), "eid=", "grant_privilege"); + rb_define_alias(rb_singleton_class(rb_mProcGID), "eid=", "grant_privilege"); + rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0); + rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0); + rb_define_module_function(rb_mProcUID, "re_exchangeable?", p_uid_exchangeable, 0); + rb_define_module_function(rb_mProcGID, "re_exchangeable?", p_gid_exchangeable, 0); + rb_define_module_function(rb_mProcUID, "sid_available?", p_uid_have_saved_id, 0); + rb_define_module_function(rb_mProcGID, "sid_available?", p_gid_have_saved_id, 0); + rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0); + rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0); + + rb_mProcID_Syscall = rb_define_module_under(rb_mProcess, "Sys"); + + rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0); + rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0); + rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0); + rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0); + + rb_define_module_function(rb_mProcID_Syscall, "setuid", p_sys_setuid, 1); + rb_define_module_function(rb_mProcID_Syscall, "setgid", p_sys_setgid, 1); + + rb_define_module_function(rb_mProcID_Syscall, "setruid", p_sys_setruid, 1); + rb_define_module_function(rb_mProcID_Syscall, "setrgid", p_sys_setrgid, 1); + + rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1); + rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1); + + rb_define_module_function(rb_mProcID_Syscall, "setreuid", p_sys_setreuid, 2); + rb_define_module_function(rb_mProcID_Syscall, "setregid", p_sys_setregid, 2); + + rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3); + rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3); + rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0); +} diff --git a/lib/ruby-1.9.1-rc1/random.c b/lib/ruby-1.9.1-rc1/random.c new file mode 100644 index 0000000..229652e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/random.c @@ -0,0 +1,560 @@ +/********************************************************************** + + random.c - + + $Author: matz $ + created at: Fri Dec 24 16:39:21 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +/* +This is based on trimmed version of MT19937. To get the original version, +contact . + +The original copyright notice follows. + + A C-program for MT19937, with initialization improved 2002/2/10. + Coded by Takuji Nishimura and Makoto Matsumoto. + This is a faster version by taking Shawn Cokus's optimization, + Matthe Bellew's simplification, Isaku Wada's real version. + + Before using, initialize the state by using init_genrand(mt, seed) + or init_by_array(mt, init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + 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 names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + + + Any feedback is very welcome. + http://www.math.keio.ac.jp/matumoto/emt.html + email: matumoto@math.keio.ac.jp +*/ + +/* Period parameters */ +#define N 624 +#define M 397 +#define MATRIX_A 0x9908b0dfUL /* constant vector a */ +#define UMASK 0x80000000UL /* most significant w-r bits */ +#define LMASK 0x7fffffffUL /* least significant r bits */ +#define MIXBITS(u,v) ( ((u) & UMASK) | ((v) & LMASK) ) +#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) + +struct MT { + unsigned long state[N]; /* the array for the state vector */ + unsigned long *next; + int left; +}; + +#define genrand_initialized(mt) ((mt)->next != 0) +#define uninit_genrand(mt) ((mt)->next = 0) + +/* initializes state[N] with a seed */ +static void +init_genrand(struct MT *mt, unsigned long s) +{ + int j; + mt->state[0] = s & 0xffffffffUL; + for (j=1; jstate[j] = (1812433253UL * (mt->state[j-1] ^ (mt->state[j-1] >> 30)) + j); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array state[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + mt->state[j] &= 0xffffffffUL; /* for >32 bit machines */ + } + mt->left = 1; + mt->next = mt->state + N - 1; +} + +/* initialize by an array with array-length */ +/* init_key is the array for initializing keys */ +/* key_length is its length */ +/* slight change for C++, 2004/2/26 */ +static void +init_by_array(struct MT *mt, unsigned long init_key[], int key_length) +{ + int i, j, k; + init_genrand(mt, 19650218UL); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + mt->state[i] = (mt->state[i] ^ ((mt->state[i-1] ^ (mt->state[i-1] >> 30)) * 1664525UL)) + + init_key[j] + j; /* non linear */ + mt->state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; j++; + if (i>=N) { mt->state[0] = mt->state[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + mt->state[i] = (mt->state[i] ^ ((mt->state[i-1] ^ (mt->state[i-1] >> 30)) * 1566083941UL)) + - i; /* non linear */ + mt->state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; + if (i>=N) { mt->state[0] = mt->state[N-1]; i=1; } + } + + mt->state[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ +} + +static void +next_state(struct MT *mt) +{ + unsigned long *p = mt->state; + int j; + + /* if init_genrand() has not been called, */ + /* a default initial seed is used */ + if (!genrand_initialized(mt)) init_genrand(mt, 5489UL); + + mt->left = N; + mt->next = mt->state; + + for (j=N-M+1; --j; p++) + *p = p[M] ^ TWIST(p[0], p[1]); + + for (j=M; --j; p++) + *p = p[M-N] ^ TWIST(p[0], p[1]); + + *p = p[M-N] ^ TWIST(p[0], mt->state[0]); +} + +/* generates a random number on [0,0xffffffff]-interval */ +static unsigned long +genrand_int32(struct MT *mt) +{ + unsigned long y; + + if (--mt->left <= 0) next_state(mt); + y = *mt->next++; + + /* Tempering */ + y ^= (y >> 11); + y ^= (y << 7) & 0x9d2c5680UL; + y ^= (y << 15) & 0xefc60000UL; + y ^= (y >> 18); + + return y; +} + +/* generates a random number on [0,1) with 53-bit resolution*/ +static double +genrand_real(struct MT *mt) +{ + unsigned long a=genrand_int32(mt)>>5, b=genrand_int32(mt)>>6; + return(a*67108864.0+b)*(1.0/9007199254740992.0); +} +/* These real versions are due to Isaku Wada, 2002/01/09 added */ + +#undef N +#undef M + +/* These real versions are due to Isaku Wada, 2002/01/09 added */ + +#include "ruby/ruby.h" + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#ifdef HAVE_FCNTL_H +#include +#endif + +#define DEFAULT_SEED_CNT 4 + +struct RandSeed { + VALUE value; + unsigned long initial[DEFAULT_SEED_CNT]; +}; + +struct Random { + struct MT mt; + struct RandSeed seed; +}; + +static struct Random default_mt; + +unsigned long +rb_genrand_int32(void) +{ + return genrand_int32(&default_mt.mt); +} + +double +rb_genrand_real(void) +{ + return genrand_real(&default_mt.mt); +} + +static VALUE +rand_init(struct MT *mt, VALUE vseed) +{ + volatile VALUE seed; + long len; + unsigned long *buf; + + seed = rb_to_int(vseed); + switch (TYPE(seed)) { + case T_FIXNUM: + len = sizeof(VALUE); + break; + case T_BIGNUM: + len = RBIGNUM_LEN(seed) * SIZEOF_BDIGITS; + if (len == 0) + len = 4; + break; + default: + rb_raise(rb_eTypeError, "failed to convert %s into Integer", + rb_obj_classname(vseed)); + } + len = (len + 3) / 4; /* number of 32bit words */ + buf = ALLOC_N(unsigned long, len); /* allocate longs for init_by_array */ + memset(buf, 0, len * sizeof(long)); + if (FIXNUM_P(seed)) { + buf[0] = FIX2ULONG(seed) & 0xffffffff; +#if SIZEOF_LONG > 4 + buf[1] = FIX2ULONG(seed) >> 32; +#endif + } + else { + int i, j; + for (i = RBIGNUM_LEN(seed)-1; 0 <= i; i--) { + j = i * SIZEOF_BDIGITS / 4; +#if SIZEOF_BDIGITS < 4 + buf[j] <<= SIZEOF_BDIGITS * 8; +#endif + buf[j] |= RBIGNUM_DIGITS(seed)[i]; + } + } + while (1 < len && buf[len-1] == 0) { + len--; + } + if (len <= 1) { + init_genrand(mt, buf[0]); + } + else { + if (buf[len-1] == 1) /* remove leading-zero-guard */ + len--; + init_by_array(mt, buf, len); + } + xfree(buf); + return seed; +} + +#define DEFAULT_SEED_LEN (DEFAULT_SEED_CNT * sizeof(long)) + +static void +fill_random_seed(unsigned long seed[DEFAULT_SEED_CNT]) +{ + static int n = 0; + struct timeval tv; + int fd; + struct stat statbuf; + + memset(seed, 0, DEFAULT_SEED_LEN); + +#ifdef S_ISCHR + if ((fd = open("/dev/urandom", O_RDONLY +#ifdef O_NONBLOCK + |O_NONBLOCK +#endif +#ifdef O_NOCTTY + |O_NOCTTY +#endif +#ifdef O_NOFOLLOW + |O_NOFOLLOW +#endif + )) >= 0) { + if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) { + read(fd, seed, DEFAULT_SEED_LEN); + } + close(fd); + } +#endif + + gettimeofday(&tv, 0); + seed[0] ^= tv.tv_usec; + seed[1] ^= tv.tv_sec; + seed[2] ^= getpid() ^ (n++ << 16); + seed[3] ^= (unsigned long)&seed; +} + +static VALUE +make_seed_value(const void *ptr) +{ + BDIGIT *digits; + NEWOBJ(big, struct RBignum); + OBJSETUP(big, rb_cBignum, T_BIGNUM); + + RBIGNUM_SET_SIGN(big, 1); + rb_big_resize((VALUE)big, DEFAULT_SEED_LEN / SIZEOF_BDIGITS + 1); + digits = RBIGNUM_DIGITS(big); + + MEMCPY((char *)RBIGNUM_DIGITS(big), ptr, char, DEFAULT_SEED_LEN); + + /* set leading-zero-guard if need. */ + digits[RBIGNUM_LEN(big)-1] = digits[RBIGNUM_LEN(big)-2] <= 1 ? 1 : 0; + + return rb_big_norm((VALUE)big); +} + +static VALUE +random_seed(void) +{ + unsigned long buf[DEFAULT_SEED_CNT]; + fill_random_seed(buf); + return make_seed_value(buf); +} + +/* + * call-seq: + * srand(number=0) => old_seed + * + * Seeds the pseudorandom number generator to the value of + * number.to_i.abs. If number is omitted + * or zero, seeds the generator using a combination of the time, the + * process id, and a sequence number. (This is also the behavior if + * Kernel::rand is called without previously calling + * srand, but without the sequence.) By setting the seed + * to a known value, scripts can be made deterministic during testing. + * The previous seed value is returned. Also see Kernel::rand. + */ + +static VALUE +rb_f_srand(int argc, VALUE *argv, VALUE obj) +{ + VALUE seed, old; + + rb_secure(4); + if (argc == 0) { + seed = random_seed(); + } + else { + rb_scan_args(argc, argv, "01", &seed); + } + old = default_mt.seed.value; + default_mt.seed.value = rand_init(&default_mt.mt, seed); + + return old; +} + +static unsigned long +make_mask(unsigned long x) +{ + x = x | x >> 1; + x = x | x >> 2; + x = x | x >> 4; + x = x | x >> 8; + x = x | x >> 16; +#if 4 < SIZEOF_LONG + x = x | x >> 32; +#endif + return x; +} + +static unsigned long +limited_rand(struct MT *mt, unsigned long limit) +{ + unsigned long mask = make_mask(limit); + int i; + unsigned long val; + + retry: + val = 0; + for (i = SIZEOF_LONG/4-1; 0 <= i; i--) { + if (mask >> (i * 32)) { + val |= genrand_int32(mt) << (i * 32); + val &= mask; + if (limit < val) + goto retry; + } + } + return val; +} + +static VALUE +limited_big_rand(struct MT *mt, struct RBignum *limit) +{ + unsigned long mask, lim, rnd; + struct RBignum *val; + int i, len, boundary; + + len = (RBIGNUM_LEN(limit) * SIZEOF_BDIGITS + 3) / 4; + val = (struct RBignum *)rb_big_clone((VALUE)limit); + RBIGNUM_SET_SIGN(val, 1); +#if SIZEOF_BDIGITS == 2 +# define BIG_GET32(big,i) \ + (RBIGNUM_DIGITS(big)[(i)*2] | \ + ((i)*2+1 < RBIGNUM_LEN(big) ? \ + (RBIGNUM_DIGITS(big)[(i)*2+1] << 16) : \ + 0)) +# define BIG_SET32(big,i,d) \ + ((RBIGNUM_DIGITS(big)[(i)*2] = (d) & 0xffff), \ + ((i)*2+1 < RBIGNUM_LEN(big) ? \ + (RBIGNUM_DIGITS(big)[(i)*2+1] = (d) >> 16) : \ + 0)) +#else + /* SIZEOF_BDIGITS == 4 */ +# define BIG_GET32(big,i) (RBIGNUM_DIGITS(big)[i]) +# define BIG_SET32(big,i,d) (RBIGNUM_DIGITS(big)[i] = (d)) +#endif + retry: + mask = 0; + boundary = 1; + for (i = len-1; 0 <= i; i--) { + lim = BIG_GET32(limit, i); + mask = mask ? 0xffffffff : make_mask(lim); + if (mask) { + rnd = genrand_int32(mt) & mask; + if (boundary) { + if (lim < rnd) + goto retry; + if (rnd < lim) + boundary = 0; + } + } + else { + rnd = 0; + } + BIG_SET32(val, i, rnd); + } + return rb_big_norm((VALUE)val); +} + +/* + * call-seq: + * rand(max=0) => number + * + * Converts max to an integer using max1 = + * max.to_i.abs. If the result is zero, returns a + * pseudorandom floating point number greater than or equal to 0.0 and + * less than 1.0. Otherwise, returns a pseudorandom integer greater + * than or equal to zero and less than max1. Kernel::srand + * may be used to ensure repeatable sequences of random numbers between + * different runs of the program. Ruby currently uses a modified + * Mersenne Twister with a period of 2**19937-1. + * + * srand 1234 #=> 0 + * [ rand, rand ] #=> [0.191519450163469, 0.49766366626136] + * [ rand(10), rand(1000) ] #=> [6, 817] + * srand 1234 #=> 1234 + * [ rand, rand ] #=> [0.191519450163469, 0.49766366626136] + */ + +static VALUE +rb_f_rand(int argc, VALUE *argv, VALUE obj) +{ + VALUE vmax; + long val, max; + struct MT *mt = &default_mt.mt; + + rb_scan_args(argc, argv, "01", &vmax); + if (!genrand_initialized(mt)) { + rand_init(mt, random_seed()); + } + switch (TYPE(vmax)) { + case T_FLOAT: + if (RFLOAT_VALUE(vmax) <= LONG_MAX && RFLOAT_VALUE(vmax) >= LONG_MIN) { + max = (long)RFLOAT_VALUE(vmax); + break; + } + if (RFLOAT_VALUE(vmax) < 0) + vmax = rb_dbl2big(-RFLOAT_VALUE(vmax)); + else + vmax = rb_dbl2big(RFLOAT_VALUE(vmax)); + /* fall through */ + case T_BIGNUM: + bignum: + { + struct RBignum *limit = (struct RBignum *)vmax; + if (!RBIGNUM_SIGN(limit)) { + limit = (struct RBignum *)rb_big_clone(vmax); + RBIGNUM_SET_SIGN(limit, 1); + } + limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1)); + if (FIXNUM_P((VALUE)limit)) { + if (FIX2LONG((VALUE)limit) == -1) + return DBL2NUM(genrand_real(mt)); + return LONG2NUM(limited_rand(mt, FIX2LONG((VALUE)limit))); + } + return limited_big_rand(mt, limit); + } + case T_NIL: + max = 0; + break; + default: + vmax = rb_Integer(vmax); + if (TYPE(vmax) == T_BIGNUM) goto bignum; + case T_FIXNUM: + max = FIX2LONG(vmax); + break; + } + + if (max == 0) { + return DBL2NUM(genrand_real(mt)); + } + if (max < 0) max = -max; + val = limited_rand(mt, max-1); + return LONG2NUM(val); +} + +void +Init_RandomSeed(void) +{ + fill_random_seed(default_mt.seed.initial); + init_by_array(&default_mt.mt, default_mt.seed.initial, DEFAULT_SEED_CNT); +} + +static void +Init_RandomSeed2(void) +{ + default_mt.seed.value = make_seed_value(default_mt.seed.initial); + memset(default_mt.seed.initial, 0, DEFAULT_SEED_LEN); +} + +void +rb_reset_random_seed(void) +{ + uninit_genrand(&default_mt.mt); + default_mt.seed.value = INT2FIX(0); +} + +void +Init_Random(void) +{ + Init_RandomSeed2(); + rb_define_global_function("srand", rb_f_srand, -1); + rb_define_global_function("rand", rb_f_rand, -1); + rb_global_variable(&default_mt.seed.value); +} diff --git a/lib/ruby-1.9.1-rc1/range.c b/lib/ruby-1.9.1-rc1/range.c new file mode 100644 index 0000000..b7d5737 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/range.c @@ -0,0 +1,948 @@ +/********************************************************************** + + range.c - + + $Author: yugui $ + created at: Thu Aug 19 17:46:47 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/encoding.h" + +VALUE rb_cRange; +static ID id_cmp, id_succ, id_beg, id_end, id_excl; + +extern VALUE rb_struct_init_copy(VALUE copy, VALUE s); + +#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0]) +#define RANGE_END(r) (RSTRUCT(r)->as.ary[1]) +#define RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2]) + +#define EXCL(r) RTEST(RANGE_EXCL(r)) +#define SET_EXCL(r,v) (RSTRUCT(r)->as.ary[2] = (v) ? Qtrue : Qfalse) + +static VALUE +range_failed(void) +{ + rb_raise(rb_eArgError, "bad value for range"); + return Qnil; /* dummy */ +} + +static VALUE +range_check(VALUE *args) +{ + return rb_funcall(args[0], id_cmp, 1, args[1]); +} + +static void +range_init(VALUE range, VALUE beg, VALUE end, int exclude_end) +{ + VALUE args[2]; + + args[0] = beg; + args[1] = end; + + if (!FIXNUM_P(beg) || !FIXNUM_P(end)) { + VALUE v; + + v = rb_rescue(range_check, (VALUE)args, range_failed, 0); + if (NIL_P(v)) + range_failed(); + } + + SET_EXCL(range, exclude_end); + RSTRUCT(range)->as.ary[0] = beg; + RSTRUCT(range)->as.ary[1] = end; +} + +VALUE +rb_range_new(VALUE beg, VALUE end, int exclude_end) +{ + VALUE range = rb_obj_alloc(rb_cRange); + + range_init(range, beg, end, exclude_end); + return range; +} + +/* + * call-seq: + * Range.new(start, end, exclusive=false) => range + * + * Constructs a range using the given start and end. If the third + * parameter is omitted or is false, the range will include + * the end object; otherwise, it will be excluded. + */ + +static VALUE +range_initialize(int argc, VALUE *argv, VALUE range) +{ + VALUE beg, end, flags; + + rb_scan_args(argc, argv, "21", &beg, &end, &flags); + /* Ranges are immutable, so that they should be initialized only once. */ + if (RANGE_EXCL(range) != Qnil) { + rb_name_error(rb_intern("initialize"), "`initialize' called twice"); + } + range_init(range, beg, end, RTEST(flags)); + return Qnil; +} + +#define range_initialize_copy rb_struct_init_copy /* :nodoc: */ + +/* + * call-seq: + * rng.exclude_end? => true or false + * + * Returns true if rng excludes its end value. + */ + +static VALUE +range_exclude_end_p(VALUE range) +{ + return EXCL(range) ? Qtrue : Qfalse; +} + + +/* + * call-seq: + * rng == obj => true or false + * + * Returns true only if obj is a Range, has equivalent + * beginning and end items (by comparing them with ==), and has + * the same #exclude_end? setting as rng. + * + * (0..2) == (0..2) #=> true + * (0..2) == Range.new(0,2) #=> true + * (0..2) == (0...2) #=> false + * + */ + +static VALUE +range_eq(VALUE range, VALUE obj) +{ + if (range == obj) + return Qtrue; + if (!rb_obj_is_instance_of(obj, rb_obj_class(range))) + return Qfalse; + + if (!rb_equal(RANGE_BEG(range), RANGE_BEG(obj))) + return Qfalse; + if (!rb_equal(RANGE_END(range), RANGE_END(obj))) + return Qfalse; + + if (EXCL(range) != EXCL(obj)) + return Qfalse; + + return Qtrue; +} + +static int +r_lt(VALUE a, VALUE b) +{ + VALUE r = rb_funcall(a, id_cmp, 1, b); + + if (NIL_P(r)) + return Qfalse; + if (rb_cmpint(r, a, b) < 0) + return Qtrue; + return Qfalse; +} + +static int +r_le(VALUE a, VALUE b) +{ + int c; + VALUE r = rb_funcall(a, id_cmp, 1, b); + + if (NIL_P(r)) + return Qfalse; + c = rb_cmpint(r, a, b); + if (c == 0) + return INT2FIX(0); + if (c < 0) + return Qtrue; + return Qfalse; +} + + +/* + * call-seq: + * rng.eql?(obj) => true or false + * + * Returns true only if obj is a Range, has equivalent + * beginning and end items (by comparing them with #eql?), and has the same + * #exclude_end? setting as rng. + * + * (0..2) == (0..2) #=> true + * (0..2) == Range.new(0,2) #=> true + * (0..2) == (0...2) #=> false + * + */ + +static VALUE +range_eql(VALUE range, VALUE obj) +{ + if (range == obj) + return Qtrue; + if (!rb_obj_is_instance_of(obj, rb_obj_class(range))) + return Qfalse; + + if (!rb_eql(RANGE_BEG(range), RANGE_BEG(obj))) + return Qfalse; + if (!rb_eql(RANGE_END(range), RANGE_END(obj))) + return Qfalse; + + if (EXCL(range) != EXCL(obj)) + return Qfalse; + + return Qtrue; +} + +/* + * call-seq: + * rng.hash => fixnum + * + * Generate a hash value such that two ranges with the same start and + * end points, and the same value for the "exclude end" flag, generate + * the same hash value. + */ + +static VALUE +range_hash(VALUE range) +{ + long hash = EXCL(range); + VALUE v; + + v = rb_hash(RANGE_BEG(range)); + hash ^= v << 1; + v = rb_hash(RANGE_END(range)); + hash ^= v << 9; + hash ^= EXCL(range) << 24; + + return LONG2FIX(hash); +} + +static void +range_each_func(VALUE range, VALUE (*func) (VALUE, void *), void *arg) +{ + int c; + VALUE b = RANGE_BEG(range); + VALUE e = RANGE_END(range); + VALUE v = b; + + if (EXCL(range)) { + while (r_lt(v, e)) { + (*func) (v, arg); + v = rb_funcall(v, id_succ, 0, 0); + } + } + else { + while (RTEST(c = r_le(v, e))) { + (*func) (v, arg); + if (c == INT2FIX(0)) + break; + v = rb_funcall(v, id_succ, 0, 0); + } + } +} + +static VALUE +step_i(VALUE i, void *arg) +{ + VALUE *iter = arg; + + if (FIXNUM_P(iter[0])) { + iter[0] -= INT2FIX(1) & ~FIXNUM_FLAG; + } + else { + iter[0] = rb_funcall(iter[0], '-', 1, INT2FIX(1)); + } + if (iter[0] == INT2FIX(0)) { + rb_yield(i); + iter[0] = iter[1]; + } + return Qnil; +} + +/* + * call-seq: + * rng.step(n=1) {| obj | block } => rng + * + * Iterates over rng, passing each nth element to the block. If + * the range contains numbers, n is added for each iteration. Otherwise + * step invokes succ to iterate through range + * elements. The following code uses class Xs, which is defined + * in the class-level documentation. + * + * range = Xs.new(1)..Xs.new(10) + * range.step(2) {|x| puts x} + * range.step(3) {|x| puts x} + * + * produces: + * + * 1 x + * 3 xxx + * 5 xxxxx + * 7 xxxxxxx + * 9 xxxxxxxxx + * 1 x + * 4 xxxx + * 7 xxxxxxx + * 10 xxxxxxxxxx + */ + + +static VALUE +range_step(int argc, VALUE *argv, VALUE range) +{ + VALUE b, e, step, tmp; + + RETURN_ENUMERATOR(range, argc, argv); + + b = RANGE_BEG(range); + e = RANGE_END(range); + if (argc == 0) { + step = INT2FIX(1); + } + else { + rb_scan_args(argc, argv, "01", &step); + if (!rb_obj_is_kind_of(step, rb_cNumeric)) { + step = rb_to_int(step); + } + if (rb_funcall(step, '<', 1, INT2FIX(0))) { + rb_raise(rb_eArgError, "step can't be negative"); + } + else if (!rb_funcall(step, '>', 1, INT2FIX(0))) { + rb_raise(rb_eArgError, "step can't be 0"); + } + } + + if (FIXNUM_P(b) && FIXNUM_P(e) && FIXNUM_P(step)) { /* fixnums are special */ + long end = FIX2LONG(e); + long i, unit = FIX2LONG(step); + + if (!EXCL(range)) + end += 1; + i = FIX2LONG(b); + while (i < end) { + rb_yield(LONG2NUM(i)); + if (i + unit < i) break; + i += unit; + } + + } + else if (rb_obj_is_kind_of(b, rb_cNumeric) || + !NIL_P(rb_check_to_integer(b, "to_int")) || + !NIL_P(rb_check_to_integer(e, "to_int"))) { + ID op = EXCL(range) ? '<' : rb_intern("<="); + + while (RTEST(rb_funcall(b, op, 1, e))) { + rb_yield(b); + b = rb_funcall(b, '+', 1, step); + } + } + else { + tmp = rb_check_string_type(b); + + if (!NIL_P(tmp)) { + VALUE args[2], iter[2]; + + b = tmp; + args[0] = e; + args[1] = EXCL(range) ? Qtrue : Qfalse; + iter[0] = INT2FIX(1); + iter[1] = step; + rb_block_call(b, rb_intern("upto"), 2, args, step_i, (VALUE)iter); + } + else { + VALUE args[2]; + + if (!rb_respond_to(b, id_succ)) { + rb_raise(rb_eTypeError, "can't iterate from %s", + rb_obj_classname(b)); + } + args[0] = INT2FIX(1); + args[1] = step; + range_each_func(range, step_i, args); + } + } + return range; +} + +static VALUE +each_i(VALUE v, void *arg) +{ + rb_yield(v); + return Qnil; +} + +/* + * call-seq: + * rng.each {| i | block } => rng + * + * Iterates over the elements rng, passing each in turn to the + * block. You can only iterate if the start object of the range + * supports the +succ+ method (which means that you can't iterate over + * ranges of +Float+ objects). + * + * (10..15).each do |n| + * print n, ' ' + * end + * + * produces: + * + * 10 11 12 13 14 15 + */ + +static VALUE +range_each(VALUE range) +{ + VALUE beg, end; + + RETURN_ENUMERATOR(range, 0, 0); + + beg = RANGE_BEG(range); + end = RANGE_END(range); + + if (!rb_respond_to(beg, id_succ)) { + rb_raise(rb_eTypeError, "can't iterate from %s", + rb_obj_classname(beg)); + } + if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */ + long lim = FIX2LONG(end); + long i; + + if (!EXCL(range)) + lim += 1; + for (i = FIX2LONG(beg); i < lim; i++) { + rb_yield(LONG2FIX(i)); + } + } + else if (TYPE(beg) == T_STRING) { + VALUE args[2]; + + args[0] = end; + args[1] = EXCL(range) ? Qtrue : Qfalse; + rb_block_call(beg, rb_intern("upto"), 2, args, rb_yield, 0); + } + else { + range_each_func(range, each_i, NULL); + } + return range; +} + +/* + * call-seq: + * rng.begin => obj + * + * Returns the first object in rng. + */ + +static VALUE +range_begin(VALUE range) +{ + return RANGE_BEG(range); +} + + +/* + * call-seq: + * rng.end => obj + * + * Returns the object that defines the end of rng. + * + * (1..10).end #=> 10 + * (1...10).end #=> 10 + */ + + +static VALUE +range_end(VALUE range) +{ + return RANGE_END(range); +} + + +static VALUE +first_i(VALUE i, VALUE *ary) +{ + long n = NUM2LONG(ary[0]); + + if (n <= 0) { + rb_iter_break(); + } + rb_ary_push(ary[1], i); + n--; + ary[0] = INT2NUM(n); + return Qnil; +} + +/* + * call-seq: + * rng.first => obj + * rng.first(n) => an_array + * + * Returns the first object in rng, or the first +n+ elements. + */ + +static VALUE +range_first(int argc, VALUE *argv, VALUE range) +{ + VALUE n, ary[2]; + + if (argc == 0) return RANGE_BEG(range); + + rb_scan_args(argc, argv, "1", &n); + ary[0] = n; + ary[1] = rb_ary_new2(NUM2LONG(n)); + rb_block_call(range, rb_intern("each"), 0, 0, first_i, (VALUE)ary); + + return ary[1]; +} + + +/* + * call-seq: + * rng.last => obj + * rng.last(n) => an_array + * + * Returns the last object in rng, or the last +n+ elements. + */ + +static VALUE +range_last(int argc, VALUE *argv, VALUE range) +{ + VALUE rb_ary_last(int, VALUE *, VALUE); + + if (argc == 0) return RANGE_END(range); + return rb_ary_last(argc, argv, rb_Array(range)); +} + + +/* + * call-seq: + * rng.min => obj + * rng.min {| a,b | block } => obj + * + * Returns the minimum value in rng. The second uses + * the block to compare values. Returns nil if the first + * value in range is larger than the last value. + * + */ + + +static VALUE +range_min(VALUE range) +{ + if (rb_block_given_p()) { + return rb_call_super(0, 0); + } + else { + VALUE b = RANGE_BEG(range); + VALUE e = RANGE_END(range); + int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e); + + if (c > 0 || (c == 0 && EXCL(range))) + return Qnil; + return b; + } +} + +/* + * call-seq: + * rng.max => obj + * rng.max {| a,b | block } => obj + * + * Returns the maximum value in rng. The second uses + * the block to compare values. Returns nil if the first + * value in range is larger than the last value. + * + */ + + +static VALUE +range_max(VALUE range) +{ + VALUE e = RANGE_END(range); + int ip = FIXNUM_P(e) || rb_obj_is_kind_of(e, rb_cInteger); + + if (rb_block_given_p() || (EXCL(range) && !ip)) { + return rb_call_super(0, 0); + } + else { + VALUE b = RANGE_BEG(range); + int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e); + + if (c > 0) + return Qnil; + if (EXCL(range)) { + if (c == 0) return Qnil; + if (FIXNUM_P(e)) { + return LONG2NUM(FIX2LONG(e) - 1); + } + return rb_funcall(e, '-', 1, INT2FIX(1)); + } + return e; + } +} + +VALUE +rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err) +{ + VALUE b, e; + long beg, end, excl; + + if (rb_obj_is_kind_of(range, rb_cRange)) { + b = RANGE_BEG(range); + e = RANGE_END(range); + excl = EXCL(range); + } + else { + if (!rb_respond_to(range, id_beg)) return Qfalse; + if (!rb_respond_to(range, id_end)) return Qfalse; + b = rb_funcall(range, id_beg, 0); + e = rb_funcall(range, id_end, 0); + excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0)); + } + beg = NUM2LONG(b); + end = NUM2LONG(e); + + if (beg < 0) { + beg += len; + if (beg < 0) + goto out_of_range; + } + if (err == 0 || err == 2) { + if (beg > len) + goto out_of_range; + if (end > len) + end = len; + } + if (end < 0) + end += len; + if (!excl) + end++; /* include end point */ + len = end - beg; + if (len < 0) + len = 0; + + *begp = beg; + *lenp = len; + return Qtrue; + + out_of_range: + if (err) { + rb_raise(rb_eRangeError, "%ld..%s%ld out of range", + NUM2LONG(b), excl ? "." : "", NUM2LONG(e)); + } + return Qnil; +} + +/* + * call-seq: + * rng.to_s => string + * + * Convert this range object to a printable form. + */ + +static VALUE +range_to_s(VALUE range) +{ + VALUE str, str2; + + str = rb_obj_as_string(RANGE_BEG(range)); + str2 = rb_obj_as_string(RANGE_END(range)); + str = rb_str_dup(str); + rb_str_cat(str, "...", EXCL(range) ? 3 : 2); + rb_str_append(str, str2); + OBJ_INFECT(str, str2); + + return str; +} + +static VALUE +inspect_range(VALUE range, VALUE dummy, int recur) +{ + VALUE str, str2; + + if (recur) { + return rb_str_new2(EXCL(range) ? "(... ... ...)" : "(... .. ...)"); + } + str = rb_inspect(RANGE_BEG(range)); + str2 = rb_inspect(RANGE_END(range)); + str = rb_str_dup(str); + rb_str_cat(str, "...", EXCL(range) ? 3 : 2); + rb_str_append(str, str2); + OBJ_INFECT(str, str2); + + return str; +} + +/* + * call-seq: + * rng.inspect => string + * + * Convert this range object to a printable form (using + * inspect to convert the start and end + * objects). + */ + + +static VALUE +range_inspect(VALUE range) +{ + return rb_exec_recursive(inspect_range, range, 0); +} + +/* + * call-seq: + * rng === obj => true or false + * + * Returns true if obj is an element of + * rng, false otherwise. Conveniently, + * === is the comparison operator used by + * case statements. + * + * case 79 + * when 1..50 then print "low\n" + * when 51..75 then print "medium\n" + * when 76..100 then print "high\n" + * end + * + * produces: + * + * high + */ + +static VALUE +range_eqq(VALUE range, VALUE val) +{ + return rb_funcall(range, rb_intern("include?"), 1, val); +} + + +/* + * call-seq: + * rng.member?(val) => true or false + * rng.include?(val) => true or false + * + * Returns true if obj is an element of + * rng, false otherwise. If beg and end are + * numeric, comparison is done according magnitude of values. + * + * ("a".."z").include?("g") # => true + * ("a".."z").include?("A") # => false + */ + +static VALUE +range_include(VALUE range, VALUE val) +{ + VALUE beg = RANGE_BEG(range); + VALUE end = RANGE_END(range); + int nv = FIXNUM_P(beg) || FIXNUM_P(end) || + rb_obj_is_kind_of(beg, rb_cNumeric) || + rb_obj_is_kind_of(end, rb_cNumeric); + + if (nv || + !NIL_P(rb_check_to_integer(beg, "to_int")) || + !NIL_P(rb_check_to_integer(end, "to_int"))) { + if (r_le(beg, val)) { + if (EXCL(range)) { + if (r_lt(val, end)) + return Qtrue; + } + else { + if (r_le(val, end)) + return Qtrue; + } + } + return Qfalse; + } + else if (TYPE(beg) == T_STRING && TYPE(end) == T_STRING && + RSTRING_LEN(beg) == 1 && RSTRING_LEN(end) == 1) { + if (NIL_P(val)) return Qfalse; + if (TYPE(val) == T_STRING) { + if (RSTRING_LEN(val) == 0 || RSTRING_LEN(val) > 1) + return Qfalse; + else { + char b = RSTRING_PTR(beg)[0]; + char e = RSTRING_PTR(end)[0]; + char v = RSTRING_PTR(val)[0]; + + if (ISASCII(b) && ISASCII(e) && ISASCII(v)) { + if (b <= v && v < e) return Qtrue; + if (!EXCL(range) && v == e) return Qtrue; + return Qfalse; + } + } + } + } + /* TODO: ruby_frame->this_func = rb_intern("include?"); */ + return rb_call_super(1, &val); +} + + +/* + * call-seq: + * rng.cover?(val) => true or false + * + * Returns true if obj is between beg and end, + * i.e beg <= obj <= end (or end exclusive when + * exclude_end? is true). + * + * ("a".."z").cover?("c") #=> true + * ("a".."z").cover?("5") #=> false + */ + +static VALUE +range_cover(VALUE range, VALUE val) +{ + VALUE beg, end; + + beg = RANGE_BEG(range); + end = RANGE_END(range); + if (r_le(beg, val)) { + if (EXCL(range)) { + if (r_lt(val, end)) + return Qtrue; + } + else { + if (r_le(val, end)) + return Qtrue; + } + } + return Qfalse; +} + +static VALUE +range_dumper(VALUE range) +{ + VALUE v; + NEWOBJ(m, struct RObject); + OBJSETUP(m, rb_cObject, T_OBJECT); + + v = (VALUE)m; + + rb_ivar_set(v, id_excl, RANGE_EXCL(range)); + rb_ivar_set(v, id_beg, RANGE_BEG(range)); + rb_ivar_set(v, id_end, RANGE_END(range)); + return v; +} + +static VALUE +range_loader(VALUE range, VALUE obj) +{ + if (TYPE(obj) != T_OBJECT || RBASIC(obj)->klass != rb_cObject) { + rb_raise(rb_eTypeError, "not a dumped range object"); + } + + RSTRUCT(range)->as.ary[0] = rb_ivar_get(obj, id_beg); + RSTRUCT(range)->as.ary[1] = rb_ivar_get(obj, id_end); + RSTRUCT(range)->as.ary[2] = rb_ivar_get(obj, id_excl); + return range; +} + +static VALUE +range_alloc(VALUE klass) +{ + /* rb_struct_alloc_noinit itself should not be used because + * rb_marshal_define_compat uses equality of allocaiton function */ + return rb_struct_alloc_noinit(klass); +} + +/* A Range represents an interval---a set of values with a + * start and an end. Ranges may be constructed using the + * s..e and + * s...e literals, or with + * Range::new. Ranges constructed using .. + * run from the start to the end inclusively. Those created using + * ... exclude the end value. When used as an iterator, + * ranges return each value in the sequence. + * + * (-1..-5).to_a #=> [] + * (-5..-1).to_a #=> [-5, -4, -3, -2, -1] + * ('a'..'e').to_a #=> ["a", "b", "c", "d", "e"] + * ('a'...'e').to_a #=> ["a", "b", "c", "d"] + * + * Ranges can be constructed using objects of any type, as long as the + * objects can be compared using their <=> operator and + * they support the succ method to return the next object + * in sequence. + * + * class Xs # represent a string of 'x's + * include Comparable + * attr :length + * def initialize(n) + * @length = n + * end + * def succ + * Xs.new(@length + 1) + * end + * def <=>(other) + * @length <=> other.length + * end + * def to_s + * sprintf "%2d #{inspect}", @length + * end + * def inspect + * 'x' * @length + * end + * end + * + * r = Xs.new(3)..Xs.new(6) #=> xxx..xxxxxx + * r.to_a #=> [xxx, xxxx, xxxxx, xxxxxx] + * r.member?(Xs.new(5)) #=> true + * + * In the previous code example, class Xs includes the + * Comparable module. This is because + * Enumerable#member? checks for equality using + * ==. Including Comparable ensures that the + * == method is defined in terms of the <=> + * method implemented in Xs. + * + */ + +void +Init_Range(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + id_cmp = rb_intern("<=>"); + id_succ = rb_intern("succ"); + id_beg = rb_intern("begin"); + id_end = rb_intern("end"); + id_excl = rb_intern("excl"); + + rb_cRange = rb_struct_define_without_accessor( + "Range", rb_cObject, range_alloc, + "begin", "end", "excl", NULL); + + rb_include_module(rb_cRange, rb_mEnumerable); + rb_marshal_define_compat(rb_cRange, rb_cObject, range_dumper, range_loader); + rb_define_method(rb_cRange, "initialize", range_initialize, -1); + rb_define_method(rb_cRange, "initialize_copy", range_initialize_copy, 1); + rb_define_method(rb_cRange, "==", range_eq, 1); + rb_define_method(rb_cRange, "===", range_eqq, 1); + rb_define_method(rb_cRange, "eql?", range_eql, 1); + rb_define_method(rb_cRange, "hash", range_hash, 0); + rb_define_method(rb_cRange, "each", range_each, 0); + rb_define_method(rb_cRange, "step", range_step, -1); + rb_define_method(rb_cRange, "begin", range_begin, 0); + rb_define_method(rb_cRange, "end", range_end, 0); + rb_define_method(rb_cRange, "first", range_first, -1); + rb_define_method(rb_cRange, "last", range_last, -1); + rb_define_method(rb_cRange, "min", range_min, 0); + rb_define_method(rb_cRange, "max", range_max, 0); + rb_define_method(rb_cRange, "to_s", range_to_s, 0); + rb_define_method(rb_cRange, "inspect", range_inspect, 0); + + rb_define_method(rb_cRange, "exclude_end?", range_exclude_end_p, 0); + + rb_define_method(rb_cRange, "member?", range_include, 1); + rb_define_method(rb_cRange, "include?", range_include, 1); + rb_define_method(rb_cRange, "cover?", range_cover, 1); +} diff --git a/lib/ruby-1.9.1-rc1/rational.c b/lib/ruby-1.9.1-rc1/rational.c new file mode 100644 index 0000000..0dc445d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/rational.c @@ -0,0 +1,1606 @@ +/* + rational.c: Coded by Tadayoshi Funaba 2008 + + This implementation is based on Keiju Ishitsuka's Rational library + which is written in ruby. +*/ + +#include "ruby.h" +#include +#include + +#ifdef HAVE_IEEEFP_H +#include +#endif + +#define NDEBUG +#include + +#ifndef RATIONAL_NAME +#define RATIONAL_NAME "Rational" +#endif + +#define ZERO INT2FIX(0) +#define ONE INT2FIX(1) +#define TWO INT2FIX(2) + +VALUE rb_cRational; + +static ID id_abs, id_cmp, id_convert, id_equal_p, id_expt, id_floor, + id_hash, id_idiv, id_inspect, id_integer_p, id_negate, id_to_f, + id_to_i, id_to_s, id_truncate; + +#define f_boolcast(x) ((x) ? Qtrue : Qfalse) + +#define binop(n,op) \ +inline static VALUE \ +f_##n(VALUE x, VALUE y)\ +{\ + return rb_funcall(x, op, 1, y);\ +} + +#define fun1(n) \ +inline static VALUE \ +f_##n(VALUE x)\ +{\ + return rb_funcall(x, id_##n, 0);\ +} + +#define fun2(n) \ +inline static VALUE \ +f_##n(VALUE x, VALUE y)\ +{\ + return rb_funcall(x, id_##n, 1, y);\ +} + +inline static VALUE +f_add(VALUE x, VALUE y) +{ + if (FIXNUM_P(y) && FIX2LONG(y) == 0) + return x; + else if (FIXNUM_P(x) && FIX2LONG(x) == 0) + return y; + return rb_funcall(x, '+', 1, y); +} + +inline static VALUE +f_cmp(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) { + long c = FIX2LONG(x) - FIX2LONG(y); + if (c > 0) + c = 1; + else if (c < 0) + c = -1; + return INT2FIX(c); + } + return rb_funcall(x, id_cmp, 1, y); +} + +inline static VALUE +f_div(VALUE x, VALUE y) +{ + if (FIXNUM_P(y) && FIX2LONG(y) == 1) + return x; + return rb_funcall(x, '/', 1, y); +} + +inline static VALUE +f_gt_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) > FIX2LONG(y)); + return rb_funcall(x, '>', 1, y); +} + +inline static VALUE +f_lt_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) < FIX2LONG(y)); + return rb_funcall(x, '<', 1, y); +} + +binop(mod, '%') + +inline static VALUE +f_mul(VALUE x, VALUE y) +{ + if (FIXNUM_P(y)) { + long iy = FIX2LONG(y); + if (iy == 0) { + if (FIXNUM_P(x) || TYPE(x) == T_BIGNUM) + return ZERO; + } + else if (iy == 1) + return x; + } + else if (FIXNUM_P(x)) { + long ix = FIX2LONG(x); + if (ix == 0) { + if (FIXNUM_P(y) || TYPE(y) == T_BIGNUM) + return ZERO; + } + else if (ix == 1) + return y; + } + return rb_funcall(x, '*', 1, y); +} + +inline static VALUE +f_sub(VALUE x, VALUE y) +{ + if (FIXNUM_P(y) && FIX2LONG(y) == 0) + return x; + return rb_funcall(x, '-', 1, y); +} + +binop(xor, '^') + +fun1(abs) +fun1(floor) +fun1(hash) +fun1(inspect) +fun1(integer_p) +fun1(negate) +fun1(to_f) +fun1(to_i) +fun1(to_s) +fun1(truncate) + +inline static VALUE +f_equal_p(VALUE x, VALUE y) +{ + if (FIXNUM_P(x) && FIXNUM_P(y)) + return f_boolcast(FIX2LONG(x) == FIX2LONG(y)); + return rb_funcall(x, id_equal_p, 1, y); +} + +fun2(expt) +fun2(idiv) + +inline static VALUE +f_negative_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) < 0); + return rb_funcall(x, '<', 1, ZERO); +} + +#define f_positive_p(x) (!f_negative_p(x)) + +inline static VALUE +f_zero_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) == 0); + return rb_funcall(x, id_equal_p, 1, ZERO); +} + +#define f_nonzero_p(x) (!f_zero_p(x)) + +inline static VALUE +f_one_p(VALUE x) +{ + if (FIXNUM_P(x)) + return f_boolcast(FIX2LONG(x) == 1); + return rb_funcall(x, id_equal_p, 1, ONE); +} + +inline static VALUE +f_kind_of_p(VALUE x, VALUE c) +{ + return rb_obj_is_kind_of(x, c); +} + +inline static VALUE +k_numeric_p(VALUE x) +{ + return f_kind_of_p(x, rb_cNumeric); +} + +inline static VALUE +k_integer_p(VALUE x) +{ + return f_kind_of_p(x, rb_cInteger); +} + +inline static VALUE +k_float_p(VALUE x) +{ + return f_kind_of_p(x, rb_cFloat); +} + +inline static VALUE +k_rational_p(VALUE x) +{ + return f_kind_of_p(x, rb_cRational); +} + +#define k_exact_p(x) (!k_float_p(x)) +#define k_inexact_p(x) k_float_p(x) + +#ifndef NDEBUG +#define f_gcd f_gcd_orig +#endif + +inline static long +i_gcd(long x, long y) +{ + if (x < 0) + x = -x; + if (y < 0) + y = -y; + + if (x == 0) + return y; + if (y == 0) + return x; + + while (x > 0) { + long t = x; + x = y % x; + y = t; + } + return y; +} + +inline static VALUE +f_gcd(VALUE x, VALUE y) +{ + VALUE z; + + if (FIXNUM_P(x) && FIXNUM_P(y)) + return LONG2NUM(i_gcd(FIX2LONG(x), FIX2LONG(y))); + + if (f_negative_p(x)) + x = f_negate(x); + if (f_negative_p(y)) + y = f_negate(y); + + if (f_zero_p(x)) + return y; + if (f_zero_p(y)) + return x; + + for (;;) { + if (FIXNUM_P(x)) { + if (FIX2LONG(x) == 0) + return y; + if (FIXNUM_P(y)) + return LONG2NUM(i_gcd(FIX2LONG(x), FIX2LONG(y))); + } + z = x; + x = f_mod(y, x); + y = z; + } + /* NOTREACHED */ +} + +#ifndef NDEBUG +#undef f_gcd + +inline static VALUE +f_gcd(VALUE x, VALUE y) +{ + VALUE r = f_gcd_orig(x, y); + if (f_nonzero_p(r)) { + assert(f_zero_p(f_mod(x, r))); + assert(f_zero_p(f_mod(y, r))); + } + return r; +} +#endif + +inline static VALUE +f_lcm(VALUE x, VALUE y) +{ + if (f_zero_p(x) || f_zero_p(y)) + return ZERO; + return f_abs(f_mul(f_div(x, f_gcd(x, y)), y)); +} + +#define get_dat1(x) \ + struct RRational *dat;\ + dat = ((struct RRational *)(x)) + +#define get_dat2(x,y) \ + struct RRational *adat, *bdat;\ + adat = ((struct RRational *)(x));\ + bdat = ((struct RRational *)(y)) + +inline static VALUE +nurat_s_new_internal(VALUE klass, VALUE num, VALUE den) +{ + NEWOBJ(obj, struct RRational); + OBJSETUP(obj, klass, T_RATIONAL); + + obj->num = num; + obj->den = den; + + return (VALUE)obj; +} + +static VALUE +nurat_s_alloc(VALUE klass) +{ + return nurat_s_new_internal(klass, ZERO, ONE); +} + +#define rb_raise_zerodiv() rb_raise(rb_eZeroDivError, "divided by zero") + +#if 0 +static VALUE +nurat_s_new_bang(int argc, VALUE *argv, VALUE klass) +{ + VALUE num, den; + + switch (rb_scan_args(argc, argv, "11", &num, &den)) { + case 1: + if (!k_integer_p(num)) + num = f_to_i(num); + den = ONE; + break; + default: + if (!k_integer_p(num)) + num = f_to_i(num); + if (!k_integer_p(den)) + den = f_to_i(den); + + switch (FIX2INT(f_cmp(den, ZERO))) { + case -1: + num = f_negate(num); + den = f_negate(den); + break; + case 0: + rb_raise_zerodiv(); + break; + } + break; + } + + return nurat_s_new_internal(klass, num, den); +} +#endif + +inline static VALUE +f_rational_new_bang1(VALUE klass, VALUE x) +{ + return nurat_s_new_internal(klass, x, ONE); +} + +inline static VALUE +f_rational_new_bang2(VALUE klass, VALUE x, VALUE y) +{ + assert(f_positive_p(y)); + assert(f_nonzero_p(y)); + return nurat_s_new_internal(klass, x, y); +} + +#ifdef CANONICALIZATION_FOR_MATHN +#define CANON +#endif + +#ifdef CANON +static int canonicalization = 0; + +void +nurat_canonicalization(int f) +{ + canonicalization = f; +} +#endif + +inline static void +nurat_int_check(VALUE num) +{ + switch (TYPE(num)) { + case T_FIXNUM: + case T_BIGNUM: + break; + default: + if (!k_numeric_p(num) || !f_integer_p(num)) + rb_raise(rb_eArgError, "not an integer"); + } +} + +inline static VALUE +nurat_int_value(VALUE num) +{ + nurat_int_check(num); + if (!k_integer_p(num)) + num = f_to_i(num); + return num; +} + +inline static VALUE +nurat_s_canonicalize_internal(VALUE klass, VALUE num, VALUE den) +{ + VALUE gcd; + + switch (FIX2INT(f_cmp(den, ZERO))) { + case -1: + num = f_negate(num); + den = f_negate(den); + break; + case 0: + rb_raise_zerodiv(); + break; + } + + gcd = f_gcd(num, den); + num = f_idiv(num, gcd); + den = f_idiv(den, gcd); + +#ifdef CANON + if (f_one_p(den) && canonicalization) + return num; +#endif + return nurat_s_new_internal(klass, num, den); +} + +inline static VALUE +nurat_s_canonicalize_internal_no_reduce(VALUE klass, VALUE num, VALUE den) +{ + switch (FIX2INT(f_cmp(den, ZERO))) { + case -1: + num = f_negate(num); + den = f_negate(den); + break; + case 0: + rb_raise_zerodiv(); + break; + } + +#ifdef CANON + if (f_one_p(den) && canonicalization) + return num; +#endif + return nurat_s_new_internal(klass, num, den); +} + +static VALUE +nurat_s_new(int argc, VALUE *argv, VALUE klass) +{ + VALUE num, den; + + switch (rb_scan_args(argc, argv, "11", &num, &den)) { + case 1: + num = nurat_int_value(num); + den = ONE; + break; + default: + num = nurat_int_value(num); + den = nurat_int_value(den); + break; + } + + return nurat_s_canonicalize_internal(klass, num, den); +} + +inline static VALUE +f_rational_new1(VALUE klass, VALUE x) +{ + assert(!k_rational_p(x)); + return nurat_s_canonicalize_internal(klass, x, ONE); +} + +inline static VALUE +f_rational_new2(VALUE klass, VALUE x, VALUE y) +{ + assert(!k_rational_p(x)); + assert(!k_rational_p(y)); + return nurat_s_canonicalize_internal(klass, x, y); +} + +inline static VALUE +f_rational_new_no_reduce1(VALUE klass, VALUE x) +{ + assert(!k_rational_p(x)); + return nurat_s_canonicalize_internal_no_reduce(klass, x, ONE); +} + +inline static VALUE +f_rational_new_no_reduce2(VALUE klass, VALUE x, VALUE y) +{ + assert(!k_rational_p(x)); + assert(!k_rational_p(y)); + return nurat_s_canonicalize_internal_no_reduce(klass, x, y); +} + +static VALUE +nurat_f_rational(int argc, VALUE *argv, VALUE klass) +{ + return rb_funcall2(rb_cRational, id_convert, argc, argv); +} + +static VALUE +nurat_numerator(VALUE self) +{ + get_dat1(self); + return dat->num; +} + +static VALUE +nurat_denominator(VALUE self) +{ + get_dat1(self); + return dat->den; +} + +#ifndef NDEBUG +#define f_imul f_imul_orig +#endif + +inline static VALUE +f_imul(long a, long b) +{ + VALUE r; + long c; + + if (a == 0 || b == 0) + return ZERO; + else if (a == 1) + return LONG2NUM(b); + else if (b == 1) + return LONG2NUM(a); + + c = a * b; + r = LONG2NUM(c); + if (NUM2LONG(r) != c || (c / a) != b) + r = rb_big_mul(rb_int2big(a), rb_int2big(b)); + return r; +} + +#ifndef NDEBUG +#undef f_imul + +inline static VALUE +f_imul(long x, long y) +{ + VALUE r = f_imul_orig(x, y); + assert(f_equal_p(r, f_mul(LONG2NUM(x), LONG2NUM(y)))); + return r; +} +#endif + +inline static VALUE +f_addsub(VALUE self, VALUE anum, VALUE aden, VALUE bnum, VALUE bden, int k) +{ + VALUE num, den; + + if (FIXNUM_P(anum) && FIXNUM_P(aden) && + FIXNUM_P(bnum) && FIXNUM_P(bden)) { + long an = FIX2LONG(anum); + long ad = FIX2LONG(aden); + long bn = FIX2LONG(bnum); + long bd = FIX2LONG(bden); + long ig = i_gcd(ad, bd); + + VALUE g = LONG2NUM(ig); + VALUE a = f_imul(an, bd / ig); + VALUE b = f_imul(bn, ad / ig); + VALUE c; + + if (k == '+') + c = f_add(a, b); + else + c = f_sub(a, b); + + b = f_idiv(aden, g); + g = f_gcd(c, g); + num = f_idiv(c, g); + a = f_idiv(bden, g); + den = f_mul(a, b); + } + else { + VALUE g = f_gcd(aden, bden); + VALUE a = f_mul(anum, f_idiv(bden, g)); + VALUE b = f_mul(bnum, f_idiv(aden, g)); + VALUE c; + + if (k == '+') + c = f_add(a, b); + else + c = f_sub(a, b); + + b = f_idiv(aden, g); + g = f_gcd(c, g); + num = f_idiv(c, g); + a = f_idiv(bden, g); + den = f_mul(a, b); + } + return f_rational_new_no_reduce2(CLASS_OF(self), num, den); +} + +static VALUE +nurat_add(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + get_dat1(self); + + return f_addsub(self, + dat->num, dat->den, + other, ONE, '+'); + } + case T_FLOAT: + return f_add(f_to_f(self), other); + case T_RATIONAL: + { + get_dat2(self, other); + + return f_addsub(self, + adat->num, adat->den, + bdat->num, bdat->den, '+'); + } + default: + return rb_num_coerce_bin(self, other, '+'); + } +} + +static VALUE +nurat_sub(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + get_dat1(self); + + return f_addsub(self, + dat->num, dat->den, + other, ONE, '-'); + } + case T_FLOAT: + return f_sub(f_to_f(self), other); + case T_RATIONAL: + { + get_dat2(self, other); + + return f_addsub(self, + adat->num, adat->den, + bdat->num, bdat->den, '-'); + } + default: + return rb_num_coerce_bin(self, other, '-'); + } +} + +inline static VALUE +f_muldiv(VALUE self, VALUE anum, VALUE aden, VALUE bnum, VALUE bden, int k) +{ + VALUE num, den; + + if (k == '/') { + VALUE t; + + if (f_negative_p(bnum)) { + anum = f_negate(anum); + bnum = f_negate(bnum); + } + t = bnum; + bnum = bden; + bden = t; + } + + if (FIXNUM_P(anum) && FIXNUM_P(aden) && + FIXNUM_P(bnum) && FIXNUM_P(bden)) { + long an = FIX2LONG(anum); + long ad = FIX2LONG(aden); + long bn = FIX2LONG(bnum); + long bd = FIX2LONG(bden); + long g1 = i_gcd(an, bd); + long g2 = i_gcd(ad, bn); + + num = f_imul(an / g1, bn / g2); + den = f_imul(ad / g2, bd / g1); + } + else { + VALUE g1 = f_gcd(anum, bden); + VALUE g2 = f_gcd(aden, bnum); + + num = f_mul(f_idiv(anum, g1), f_idiv(bnum, g2)); + den = f_mul(f_idiv(aden, g2), f_idiv(bden, g1)); + } + return f_rational_new_no_reduce2(CLASS_OF(self), num, den); +} + +static VALUE +nurat_mul(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + get_dat1(self); + + return f_muldiv(self, + dat->num, dat->den, + other, ONE, '*'); + } + case T_FLOAT: + return f_mul(f_to_f(self), other); + case T_RATIONAL: + { + get_dat2(self, other); + + return f_muldiv(self, + adat->num, adat->den, + bdat->num, bdat->den, '*'); + } + default: + return rb_num_coerce_bin(self, other, '*'); + } +} + +static VALUE +nurat_div(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + if (f_zero_p(other)) + rb_raise_zerodiv(); + { + get_dat1(self); + + return f_muldiv(self, + dat->num, dat->den, + other, ONE, '/'); + } + case T_FLOAT: + return rb_funcall(f_to_f(self), '/', 1, other); + case T_RATIONAL: + if (f_zero_p(other)) + rb_raise_zerodiv(); + { + get_dat2(self, other); + + return f_muldiv(self, + adat->num, adat->den, + bdat->num, bdat->den, '/'); + } + default: + return rb_num_coerce_bin(self, other, '/'); + } +} + +static VALUE +nurat_fdiv(VALUE self, VALUE other) +{ + return f_div(f_to_f(self), other); +} + +static VALUE +nurat_expt(VALUE self, VALUE other) +{ + if (k_exact_p(other) && f_zero_p(other)) + return f_rational_new_bang1(CLASS_OF(self), ONE); + + if (k_rational_p(other)) { + get_dat1(other); + + if (f_one_p(dat->den)) + other = dat->num; /* good? */ + } + + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + VALUE num, den; + + get_dat1(self); + + switch (FIX2INT(f_cmp(other, ZERO))) { + case 1: + num = f_expt(dat->num, other); + den = f_expt(dat->den, other); + break; + case -1: + num = f_expt(dat->den, f_negate(other)); + den = f_expt(dat->num, f_negate(other)); + break; + default: + num = ONE; + den = ONE; + break; + } + return f_rational_new2(CLASS_OF(self), num, den); + } + case T_FLOAT: + case T_RATIONAL: + return f_expt(f_to_f(self), other); + default: + return rb_num_coerce_bin(self, other, id_expt); + } +} + +static VALUE +nurat_cmp(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + get_dat1(self); + + if (FIXNUM_P(dat->den) && FIX2LONG(dat->den) == 1) + return f_cmp(dat->num, other); + return f_cmp(self, f_rational_new_bang1(CLASS_OF(self), other)); + } + case T_FLOAT: + return f_cmp(f_to_f(self), other); + case T_RATIONAL: + { + VALUE num1, num2; + + get_dat2(self, other); + + if (FIXNUM_P(adat->num) && FIXNUM_P(adat->den) && + FIXNUM_P(bdat->num) && FIXNUM_P(bdat->den)) { + num1 = f_imul(FIX2LONG(adat->num), FIX2LONG(bdat->den)); + num2 = f_imul(FIX2LONG(bdat->num), FIX2LONG(adat->den)); + } + else { + num1 = f_mul(adat->num, bdat->den); + num2 = f_mul(bdat->num, adat->den); + } + return f_cmp(f_sub(num1, num2), ZERO); + } + default: + return rb_num_coerce_bin(self, other, id_cmp); + } +} + +static VALUE +nurat_equal_p(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + { + get_dat1(self); + + if (f_zero_p(dat->num) && f_zero_p(other)) + return Qtrue; + + if (!FIXNUM_P(dat->den)) + return Qfalse; + if (FIX2LONG(dat->den) != 1) + return Qfalse; + if (f_equal_p(dat->num, other)) + return Qtrue; + return Qfalse; + } + case T_FLOAT: + return f_equal_p(f_to_f(self), other); + case T_RATIONAL: + { + get_dat2(self, other); + + if (f_zero_p(adat->num) && f_zero_p(bdat->num)) + return Qtrue; + + return f_boolcast(f_equal_p(adat->num, bdat->num) && + f_equal_p(adat->den, bdat->den)); + } + default: + return f_equal_p(other, self); + } +} + +static VALUE +nurat_coerce(VALUE self, VALUE other) +{ + switch (TYPE(other)) { + case T_FIXNUM: + case T_BIGNUM: + return rb_assoc_new(f_rational_new_bang1(CLASS_OF(self), other), self); + case T_FLOAT: + return rb_assoc_new(other, f_to_f(self)); + } + + rb_raise(rb_eTypeError, "%s can't be coerced into %s", + rb_obj_classname(other), rb_obj_classname(self)); + return Qnil; +} + +static VALUE +nurat_idiv(VALUE self, VALUE other) +{ + return f_floor(f_div(self, other)); +} + +static VALUE +nurat_mod(VALUE self, VALUE other) +{ + VALUE val = f_floor(f_div(self, other)); + return f_sub(self, f_mul(other, val)); +} + +static VALUE +nurat_divmod(VALUE self, VALUE other) +{ + VALUE val = f_floor(f_div(self, other)); + return rb_assoc_new(val, f_sub(self, f_mul(other, val))); +} + +#if 0 +static VALUE +nurat_quot(VALUE self, VALUE other) +{ + return f_truncate(f_div(self, other)); +} +#endif + +static VALUE +nurat_rem(VALUE self, VALUE other) +{ + VALUE val = f_truncate(f_div(self, other)); + return f_sub(self, f_mul(other, val)); +} + +#if 0 +static VALUE +nurat_quotrem(VALUE self, VALUE other) +{ + VALUE val = f_truncate(f_div(self, other)); + return rb_assoc_new(val, f_sub(self, f_mul(other, val))); +} +#endif + +static VALUE +nurat_abs(VALUE self) +{ + if (f_positive_p(self)) + return self; + return f_negate(self); +} + +#if 0 +static VALUE +nurat_true(VALUE self) +{ + return Qtrue; +} +#endif + +static VALUE +nurat_floor(VALUE self) +{ + get_dat1(self); + return f_idiv(dat->num, dat->den); +} + +static VALUE +nurat_ceil(VALUE self) +{ + get_dat1(self); + return f_negate(f_idiv(f_negate(dat->num), dat->den)); +} + +static VALUE +nurat_truncate(VALUE self) +{ + get_dat1(self); + if (f_negative_p(dat->num)) + return f_negate(f_idiv(f_negate(dat->num), dat->den)); + return f_idiv(dat->num, dat->den); +} + +static VALUE +nurat_round(VALUE self) +{ + get_dat1(self); + + if (f_negative_p(dat->num)) { + VALUE num, den; + + num = f_negate(dat->num); + num = f_add(f_mul(num, TWO), dat->den); + den = f_mul(dat->den, TWO); + return f_negate(f_idiv(num, den)); + } + else { + VALUE num = f_add(f_mul(dat->num, TWO), dat->den); + VALUE den = f_mul(dat->den, TWO); + return f_idiv(num, den); + } +} + +#define f_size(x) rb_funcall(x, rb_intern("size"), 0) +#define f_rshift(x,y) rb_funcall(x, rb_intern(">>"), 1, y) + +inline static long +i_ilog2(VALUE x) +{ + long q, r, fx; + + assert(!f_lt_p(x, ONE)); + + q = (NUM2LONG(f_size(x)) - sizeof(long)) * 8 + 1; + + if (q > 0) + x = f_rshift(x, LONG2NUM(q)); + + fx = NUM2LONG(x); + + r = -1; + while (fx) { + fx >>= 1; + r += 1; + } + + return q + r; +} + +static long ml; + +static VALUE +nurat_to_f(VALUE self) +{ + VALUE num, den; + int minus = 0; + long nl, dl, ne, de; + int e; + double f; + + { + get_dat1(self); + + if (f_zero_p(dat->num)) + return rb_float_new(0.0); + + num = dat->num; + den = dat->den; + } + + if (f_negative_p(num)) { + num = f_negate(num); + minus = 1; + } + + nl = i_ilog2(num); + dl = i_ilog2(den); + + ne = 0; + if (nl > ml) { + ne = nl - ml; + num = f_rshift(num, LONG2NUM(ne)); + } + + de = 0; + if (dl > ml) { + de = dl - ml; + den = f_rshift(den, LONG2NUM(de)); + } + + e = (int)(ne - de); + + if ((e > DBL_MAX_EXP) || (e < DBL_MIN_EXP)) { + rb_warning("%s out of Float range", rb_obj_classname(self)); + return rb_float_new(e > 0 ? HUGE_VAL : 0.0); + } + + f = NUM2DBL(num) / NUM2DBL(den); + if (minus) + f = -f; + f = ldexp(f, e); + + if (isinf(f) || isnan(f)) + rb_warning("%s out of Float range", rb_obj_classname(self)); + + return rb_float_new(f); +} + +static VALUE +nurat_to_r(VALUE self) +{ + return self; +} + +static VALUE +nurat_hash(VALUE self) +{ + get_dat1(self); + return f_xor(f_hash(dat->num), f_hash(dat->den)); +} + +static VALUE +nurat_format(VALUE self, VALUE (*func)(VALUE)) +{ + VALUE s; + get_dat1(self); + + s = (*func)(dat->num); + rb_str_cat2(s, "/"); + rb_str_concat(s, (*func)(dat->den)); + + return s; +} + +static VALUE +nurat_to_s(VALUE self) +{ + return nurat_format(self, f_to_s); +} + +static VALUE +nurat_inspect(VALUE self) +{ + VALUE s; + + s = rb_usascii_str_new2("("); + rb_str_concat(s, nurat_format(self, f_inspect)); + rb_str_cat2(s, ")"); + + return s; +} + +static VALUE +nurat_marshal_dump(VALUE self) +{ + VALUE a; + get_dat1(self); + + a = rb_assoc_new(dat->num, dat->den); + rb_copy_generic_ivar(a, self); + return a; +} + +static VALUE +nurat_marshal_load(VALUE self, VALUE a) +{ + get_dat1(self); + dat->num = RARRAY_PTR(a)[0]; + dat->den = RARRAY_PTR(a)[1]; + rb_copy_generic_ivar(self, a); + + if (f_zero_p(dat->den)) + rb_raise_zerodiv(); + + return self; +} + +/* --- */ + +VALUE +rb_gcd(VALUE self, VALUE other) +{ + other = nurat_int_value(other); + return f_gcd(self, other); +} + +VALUE +rb_lcm(VALUE self, VALUE other) +{ + other = nurat_int_value(other); + return f_lcm(self, other); +} + +VALUE +rb_gcdlcm(VALUE self, VALUE other) +{ + other = nurat_int_value(other); + return rb_assoc_new(f_gcd(self, other), f_lcm(self, other)); +} + +VALUE +rb_rational_raw(VALUE x, VALUE y) +{ + return nurat_s_new_internal(rb_cRational, x, y); +} + +VALUE +rb_rational_new(VALUE x, VALUE y) +{ + return nurat_s_canonicalize_internal(rb_cRational, x, y); +} + +static VALUE nurat_s_convert(int argc, VALUE *argv, VALUE klass); + +VALUE +rb_Rational(VALUE x, VALUE y) +{ + VALUE a[2]; + a[0] = x; + a[1] = y; + return nurat_s_convert(2, a, rb_cRational); +} + +static VALUE +nilclass_to_r(VALUE self) +{ + return rb_rational_new1(INT2FIX(0)); +} + +static VALUE +integer_to_r(VALUE self) +{ + return rb_rational_new1(self); +} + +static void +float_decode_internal(VALUE self, VALUE *rf, VALUE *rn) +{ + double f; + int n; + + f = frexp(RFLOAT_VALUE(self), &n); + f = ldexp(f, DBL_MANT_DIG); + n -= DBL_MANT_DIG; + *rf = rb_dbl2big(f); + *rn = INT2FIX(n); +} + +#if 0 +static VALUE +float_decode(VALUE self) +{ + VALUE f, n; + + float_decode_internal(self, &f, &n); + return rb_assoc_new(f, n); +} +#endif + +static VALUE +float_to_r(VALUE self) +{ + VALUE f, n; + + float_decode_internal(self, &f, &n); + return f_mul(f, f_expt(INT2FIX(FLT_RADIX), n)); +} + +static VALUE rat_pat, an_e_pat, a_dot_pat, underscores_pat, an_underscore; + +#define WS "\\s*" +#define DIGITS "(?:\\d(?:_\\d|\\d)*)" +#define NUMERATOR "(?:" DIGITS "?\\.)?" DIGITS "(?:[eE][-+]?" DIGITS ")?" +#define DENOMINATOR DIGITS +#define PATTERN "\\A" WS "([-+])?(" NUMERATOR ")(?:\\/(" DENOMINATOR "))?" WS + +static void +make_patterns(void) +{ + static const char rat_pat_source[] = PATTERN; + static const char an_e_pat_source[] = "[eE]"; + static const char a_dot_pat_source[] = "\\."; + static const char underscores_pat_source[] = "_+"; + + if (rat_pat) return; + + rat_pat = rb_reg_new(rat_pat_source, sizeof rat_pat_source - 1, 0); + rb_gc_register_mark_object(rat_pat); + + an_e_pat = rb_reg_new(an_e_pat_source, sizeof an_e_pat_source - 1, 0); + rb_gc_register_mark_object(an_e_pat); + + a_dot_pat = rb_reg_new(a_dot_pat_source, sizeof a_dot_pat_source - 1, 0); + rb_gc_register_mark_object(a_dot_pat); + + underscores_pat = rb_reg_new(underscores_pat_source, + sizeof underscores_pat_source - 1, 0); + rb_gc_register_mark_object(underscores_pat); + + an_underscore = rb_usascii_str_new2("_"); + rb_gc_register_mark_object(an_underscore); +} + +#define id_match rb_intern("match") +#define f_match(x,y) rb_funcall(x, id_match, 1, y) + +#define id_aref rb_intern("[]") +#define f_aref(x,y) rb_funcall(x, id_aref, 1, y) + +#define id_post_match rb_intern("post_match") +#define f_post_match(x) rb_funcall(x, id_post_match, 0) + +#define id_split rb_intern("split") +#define f_split(x,y) rb_funcall(x, id_split, 1, y) + +#include + +static VALUE +string_to_r_internal(VALUE self) +{ + VALUE s, m; + + s = self; + + if (RSTRING_LEN(s) == 0) + return rb_assoc_new(Qnil, self); + + m = f_match(rat_pat, s); + + if (!NIL_P(m)) { + VALUE v, ifp, exp, ip, fp; + VALUE si = f_aref(m, INT2FIX(1)); + VALUE nu = f_aref(m, INT2FIX(2)); + VALUE de = f_aref(m, INT2FIX(3)); + VALUE re = f_post_match(m); + + { + VALUE a; + + a = f_split(nu, an_e_pat); + ifp = RARRAY_PTR(a)[0]; + if (RARRAY_LEN(a) != 2) + exp = Qnil; + else + exp = RARRAY_PTR(a)[1]; + + a = f_split(ifp, a_dot_pat); + ip = RARRAY_PTR(a)[0]; + if (RARRAY_LEN(a) != 2) + fp = Qnil; + else + fp = RARRAY_PTR(a)[1]; + } + + v = rb_rational_new1(f_to_i(ip)); + + if (!NIL_P(fp)) { + char *p = StringValuePtr(fp); + long count = 0; + VALUE l; + + while (*p) { + if (rb_isdigit(*p)) + count++; + p++; + } + + l = f_expt(INT2FIX(10), LONG2NUM(count)); + v = f_mul(v, l); + v = f_add(v, f_to_i(fp)); + v = f_div(v, l); + } + if (!NIL_P(si) && *StringValuePtr(si) == '-') + v = f_negate(v); + if (!NIL_P(exp)) + v = f_mul(v, f_expt(INT2FIX(10), f_to_i(exp))); +#if 0 + if (!NIL_P(de) && (!NIL_P(fp) || !NIL_P(exp))) + return rb_assoc_new(v, rb_usascii_str_new2("dummy")); +#endif + if (!NIL_P(de)) + v = f_div(v, f_to_i(de)); + + return rb_assoc_new(v, re); + } + return rb_assoc_new(Qnil, self); +} + +static VALUE +string_to_r_strict(VALUE self) +{ + VALUE a = string_to_r_internal(self); + if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) { + VALUE s = f_inspect(self); + rb_raise(rb_eArgError, "invalid value for Rational: %s", + StringValuePtr(s)); + } + return RARRAY_PTR(a)[0]; +} + +#define id_gsub rb_intern("gsub") +#define f_gsub(x,y,z) rb_funcall(x, id_gsub, 2, y, z) + +static VALUE +string_to_r(VALUE self) +{ + VALUE s, a, backref; + + backref = rb_backref_get(); + rb_match_busy(backref); + + s = f_gsub(self, underscores_pat, an_underscore); + a = string_to_r_internal(s); + + rb_backref_set(backref); + + if (!NIL_P(RARRAY_PTR(a)[0])) + return RARRAY_PTR(a)[0]; + return rb_rational_new1(INT2FIX(0)); +} + +#define id_to_r rb_intern("to_r") +#define f_to_r(x) rb_funcall(x, id_to_r, 0) + +static VALUE +nurat_s_convert(int argc, VALUE *argv, VALUE klass) +{ + VALUE a1, a2, backref; + + rb_scan_args(argc, argv, "11", &a1, &a2); + + switch (TYPE(a1)) { + case T_COMPLEX: + if (k_exact_p(RCOMPLEX(a1)->imag) && f_zero_p(RCOMPLEX(a1)->imag)) + a1 = RCOMPLEX(a1)->real; + } + + switch (TYPE(a2)) { + case T_COMPLEX: + if (k_exact_p(RCOMPLEX(a2)->imag) && f_zero_p(RCOMPLEX(a2)->imag)) + a2 = RCOMPLEX(a2)->real; + } + + backref = rb_backref_get(); + rb_match_busy(backref); + + switch (TYPE(a1)) { + case T_FIXNUM: + case T_BIGNUM: + break; + case T_FLOAT: + a1 = f_to_r(a1); + break; + case T_STRING: + a1 = string_to_r_strict(a1); + break; + } + + switch (TYPE(a2)) { + case T_FIXNUM: + case T_BIGNUM: + break; + case T_FLOAT: + a2 = f_to_r(a2); + break; + case T_STRING: + a2 = string_to_r_strict(a2); + break; + } + + rb_backref_set(backref); + + switch (TYPE(a1)) { + case T_RATIONAL: + if (argc == 1 || (k_exact_p(a2) && f_one_p(a2))) + return a1; + } + + if (argc == 1) { + if (k_numeric_p(a1) && !f_integer_p(a1)) + return a1; + } + else { + if ((k_numeric_p(a1) && k_numeric_p(a2)) && + (!f_integer_p(a1) || !f_integer_p(a2))) + return f_div(a1, a2); + } + + { + VALUE argv2[2]; + argv2[0] = a1; + argv2[1] = a2; + return nurat_s_new(argc, argv2, klass); + } +} + +void +Init_Rational(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + assert(fprintf(stderr, "assert() is now active\n")); + + id_abs = rb_intern("abs"); + id_cmp = rb_intern("<=>"); + id_convert = rb_intern("convert"); + id_equal_p = rb_intern("=="); + id_expt = rb_intern("**"); + id_floor = rb_intern("floor"); + id_hash = rb_intern("hash"); + id_idiv = rb_intern("div"); + id_inspect = rb_intern("inspect"); + id_integer_p = rb_intern("integer?"); + id_negate = rb_intern("-@"); + id_to_f = rb_intern("to_f"); + id_to_i = rb_intern("to_i"); + id_to_s = rb_intern("to_s"); + id_truncate = rb_intern("truncate"); + + ml = (long)(log(DBL_MAX) / log(2.0) - 1); + + rb_cRational = rb_define_class(RATIONAL_NAME, rb_cNumeric); + + rb_define_alloc_func(rb_cRational, nurat_s_alloc); + rb_undef_method(CLASS_OF(rb_cRational), "allocate"); + +#if 0 + rb_define_private_method(CLASS_OF(rb_cRational), "new!", nurat_s_new_bang, -1); + rb_define_private_method(CLASS_OF(rb_cRational), "new", nurat_s_new, -1); +#else + rb_undef_method(CLASS_OF(rb_cRational), "new"); +#endif + + rb_define_global_function(RATIONAL_NAME, nurat_f_rational, -1); + + rb_define_method(rb_cRational, "numerator", nurat_numerator, 0); + rb_define_method(rb_cRational, "denominator", nurat_denominator, 0); + + rb_define_method(rb_cRational, "+", nurat_add, 1); + rb_define_method(rb_cRational, "-", nurat_sub, 1); + rb_define_method(rb_cRational, "*", nurat_mul, 1); + rb_define_method(rb_cRational, "/", nurat_div, 1); + rb_define_method(rb_cRational, "quo", nurat_div, 1); + rb_define_method(rb_cRational, "fdiv", nurat_fdiv, 1); + rb_define_method(rb_cRational, "**", nurat_expt, 1); + + rb_define_method(rb_cRational, "<=>", nurat_cmp, 1); + rb_define_method(rb_cRational, "==", nurat_equal_p, 1); + rb_define_method(rb_cRational, "coerce", nurat_coerce, 1); + + rb_define_method(rb_cRational, "div", nurat_idiv, 1); + +#if 0 /* NUBY */ + rb_define_method(rb_cRational, "//", nurat_idiv, 1); +#endif + + rb_define_method(rb_cRational, "modulo", nurat_mod, 1); + rb_define_method(rb_cRational, "%", nurat_mod, 1); + rb_define_method(rb_cRational, "divmod", nurat_divmod, 1); + +#if 0 + rb_define_method(rb_cRational, "quot", nurat_quot, 1); +#endif + rb_define_method(rb_cRational, "remainder", nurat_rem, 1); +#if 0 + rb_define_method(rb_cRational, "quotrem", nurat_quotrem, 1); +#endif + + rb_define_method(rb_cRational, "abs", nurat_abs, 0); + +#if 0 + rb_define_method(rb_cRational, "rational?", nurat_true, 0); + rb_define_method(rb_cRational, "exact?", nurat_true, 0); +#endif + + rb_define_method(rb_cRational, "floor", nurat_floor, 0); + rb_define_method(rb_cRational, "ceil", nurat_ceil, 0); + rb_define_method(rb_cRational, "truncate", nurat_truncate, 0); + rb_define_method(rb_cRational, "round", nurat_round, 0); + + rb_define_method(rb_cRational, "to_i", nurat_truncate, 0); + rb_define_method(rb_cRational, "to_f", nurat_to_f, 0); + rb_define_method(rb_cRational, "to_r", nurat_to_r, 0); + + rb_define_method(rb_cRational, "hash", nurat_hash, 0); + + rb_define_method(rb_cRational, "to_s", nurat_to_s, 0); + rb_define_method(rb_cRational, "inspect", nurat_inspect, 0); + + rb_define_method(rb_cRational, "marshal_dump", nurat_marshal_dump, 0); + rb_define_method(rb_cRational, "marshal_load", nurat_marshal_load, 1); + + /* --- */ + + rb_define_method(rb_cInteger, "gcd", rb_gcd, 1); + rb_define_method(rb_cInteger, "lcm", rb_lcm, 1); + rb_define_method(rb_cInteger, "gcdlcm", rb_gcdlcm, 1); + + rb_define_method(rb_cNilClass, "to_r", nilclass_to_r, 0); + rb_define_method(rb_cInteger, "to_r", integer_to_r, 0); + rb_define_method(rb_cFloat, "to_r", float_to_r, 0); + + make_patterns(); + + rb_define_method(rb_cString, "to_r", string_to_r, 0); + + rb_define_private_method(CLASS_OF(rb_cRational), "convert", nurat_s_convert, -1); +} + +/* +Local variables: +c-file-style: "ruby" +End: +*/ diff --git a/lib/ruby-1.9.1-rc1/re.c b/lib/ruby-1.9.1-rc1/re.c new file mode 100644 index 0000000..95e4dd3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/re.c @@ -0,0 +1,3434 @@ +/********************************************************************** + + re.c - + + $Author: yugui $ + created at: Mon Aug 9 18:24:49 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/encoding.h" +#include "ruby/util.h" +#include "regint.h" +#include + +VALUE rb_eRegexpError; + +typedef char onig_errmsg_buffer[ONIG_MAX_ERROR_MESSAGE_LEN]; +#define errcpy(err, msg) strlcpy((err), (msg), ONIG_MAX_ERROR_MESSAGE_LEN) + +#define BEG(no) regs->beg[no] +#define END(no) regs->end[no] + +#if 'a' == 97 /* it's ascii */ +static const char casetable[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + /* ' ' '!' '"' '#' '$' '%' '&' ''' */ + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + /* '(' ')' '*' '+' ',' '-' '.' '/' */ + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + /* '0' '1' '2' '3' '4' '5' '6' '7' */ + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + /* '8' '9' ':' ';' '<' '=' '>' '?' */ + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + /* '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G' */ + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + /* 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' */ + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + /* 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' */ + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + /* 'X' 'Y' 'Z' '[' '\' ']' '^' '_' */ + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + /* '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' */ + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + /* 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' */ + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + /* 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' */ + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + /* 'x' 'y' 'z' '{' '|' '}' '~' */ + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; +#else +# error >>> "You lose. You will need a translation table for your character set." <<< +#endif + +int +rb_memcicmp(const void *x, const void *y, long len) +{ + const unsigned char *p1 = x, *p2 = y; + int tmp; + + while (len--) { + if ((tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++])) + return tmp; + } + return 0; +} + +#undef rb_memcmp + +int +rb_memcmp(const void *p1, const void *p2, long len) +{ + return memcmp(p1, p2, len); +} + +static inline long +rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n) +{ + const unsigned char *x = xs, *xe = xs + m; + const unsigned char *y = ys, *ye = ys + n; +#ifndef VALUE_MAX +# if SIZEOF_VALUE == 8 +# define VALUE_MAX 0xFFFFFFFFFFFFFFFFULL +# elif SIZEOF_VALUE == 4 +# define VALUE_MAX 0xFFFFFFFFUL +# endif +#endif + VALUE hx, hy, mask = VALUE_MAX >> ((SIZEOF_VALUE - m) * CHAR_BIT); + + if (m > SIZEOF_VALUE) + rb_bug("!!too long pattern string!!"); + + /* Prepare hash value */ + for (hx = *x++, hy = *y++; x < xe; ++x, ++y) { + hx <<= CHAR_BIT; + hy <<= CHAR_BIT; + hx |= *x; + hy |= *y; + } + /* Searching */ + while (hx != hy) { + if (y == ye) + return -1; + hy <<= CHAR_BIT; + hy |= *y; + hy &= mask; + y++; + } + return y - ys - m; +} + +static inline long +rb_memsearch_qs(const unsigned char *xs, long m, const unsigned char *ys, long n) +{ + const unsigned char *x = xs, *xe = xs + m; + const unsigned char *y = ys; + VALUE i, qstable[256]; + + /* Preprocessing */ + for (i = 0; i < 256; ++i) + qstable[i] = m + 1; + for (; x < xe; ++x) + qstable[*x] = xe - x; + /* Searching */ + for (; y + m <= ys + n; y += *(qstable + y[m])) { + if (*xs == *y && memcmp(xs, y, m) == 0) + return y - ys; + } + return -1; +} + +static inline unsigned int +rb_memsearch_qs_utf8_hash(const unsigned char *x) +{ + register const unsigned int mix = 8353; + register unsigned int h = *x; + if (h < 0xC0) { + return h + 256; + } + else if (h < 0xE0) { + h *= mix; + h += x[1]; + } + else if (h < 0xF0) { + h *= mix; + h += x[1]; + h *= mix; + h += x[2]; + } + else if (h < 0xF5) { + h *= mix; + h += x[1]; + h *= mix; + h += x[2]; + h *= mix; + h += x[3]; + } + else { + return h + 256; + } + return (unsigned char)h; +} + +static inline long +rb_memsearch_qs_utf8(const unsigned char *xs, long m, const unsigned char *ys, long n) +{ + const unsigned char *x = xs, *xe = xs + m; + const unsigned char *y = ys; + VALUE i, qstable[512]; + + /* Preprocessing */ + for (i = 0; i < 512; ++i) { + qstable[i] = m + 1; + } + for (; x < xe; ++x) { + qstable[rb_memsearch_qs_utf8_hash(x)] = xe - x; + } + /* Searching */ + for (; y + m <= ys + n; y += qstable[rb_memsearch_qs_utf8_hash(y+m)]) { + if (*xs == *y && memcmp(xs, y, m) == 0) + return y - ys; + } + return -1; +} + +long +rb_memsearch(const void *x0, long m, const void *y0, long n, rb_encoding *enc) +{ + const unsigned char *x = x0, *y = y0; + + if (m > n) return -1; + else if (m == n) { + return memcmp(x0, y0, m) == 0 ? 0 : -1; + } + else if (m < 1) { + return 0; + } + else if (m == 1) { + const unsigned char *ys = y, *ye = ys + n; + for (; y < ye; ++y) { + if (*x == *y) + return y - ys; + } + return -1; + } + else if (m <= SIZEOF_VALUE) { + return rb_memsearch_ss(x0, m, y0, n); + } + else if (enc == rb_utf8_encoding()){ + return rb_memsearch_qs_utf8(x0, m, y0, n); + } + else { + return rb_memsearch_qs(x0, m, y0, n); + } +} + +#define REG_LITERAL FL_USER5 +#define REG_ENCODING_NONE FL_USER6 + +#define KCODE_FIXED FL_USER4 + +#define ARG_REG_OPTION_MASK \ + (ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND) +#define ARG_ENCODING_FIXED 16 +#define ARG_ENCODING_NONE 32 + +static int +char_to_option(int c) +{ + int val; + + switch (c) { + case 'i': + val = ONIG_OPTION_IGNORECASE; + break; + case 'x': + val = ONIG_OPTION_EXTEND; + break; + case 'm': + val = ONIG_OPTION_MULTILINE; + break; + default: + val = 0; + break; + } + return val; +} + +static char * +option_to_str(char str[4], int options) +{ + char *p = str; + if (options & ONIG_OPTION_MULTILINE) *p++ = 'm'; + if (options & ONIG_OPTION_IGNORECASE) *p++ = 'i'; + if (options & ONIG_OPTION_EXTEND) *p++ = 'x'; + *p = 0; + return str; +} + +extern int +rb_char_to_option_kcode(int c, int *option, int *kcode) +{ + *option = 0; + + switch (c) { + case 'n': + *kcode = -1; + return (*option = ARG_ENCODING_NONE); + case 'e': + *kcode = rb_enc_find_index("EUC-JP"); + break; + case 's': + *kcode = rb_enc_find_index("Windows-31J"); + break; + case 'u': + *kcode = rb_enc_find_index("UTF-8"); + break; + default: + *kcode = -1; + return (*option = char_to_option(c)); + } + *option = ARG_ENCODING_FIXED; + return 1; +} + +static void +rb_reg_check(VALUE re) +{ + if (!RREGEXP(re)->ptr || !RREGEXP_SRC(re) || !RREGEXP_SRC_PTR(re)) { + rb_raise(rb_eTypeError, "uninitialized Regexp"); + } +} + +static void +rb_reg_expr_str(VALUE str, const char *s, long len) +{ + rb_encoding *enc = rb_enc_get(str); + const char *p, *pend; + int need_escape = 0; + int c, clen; + + p = s; pend = p + len; + while (pptr->options)) + rb_str_buf_cat2(str, opts); + } + OBJ_INFECT(str, re); + return str; +} + + +/* + * call-seq: + * rxp.source => str + * + * Returns the original string of the pattern. + * + * /ab+c/ix.source #=> "ab+c" + * + * Note that escape sequences are retained as is. + * + * /\x20\+/.source #=> "\\x20\\+" + * + */ + +static VALUE +rb_reg_source(VALUE re) +{ + VALUE str; + + rb_reg_check(re); + str = rb_enc_str_new(RREGEXP_SRC_PTR(re),RREGEXP_SRC_LEN(re), rb_enc_get(re)); + if (OBJ_TAINTED(re)) OBJ_TAINT(str); + return str; +} + +/* + * call-seq: + * rxp.inspect => string + * + * Produce a nicely formatted string-version of _rxp_. Perhaps surprisingly, + * #inspect actually produces the more natural version of + * the string than #to_s. + * + * /ab+c/ix.inspect #=> "/ab+c/ix" + * + */ + +static VALUE +rb_reg_inspect(VALUE re) +{ + if (!RREGEXP(re)->ptr || !RREGEXP_SRC(re) || !RREGEXP_SRC_PTR(re)) { + return rb_any_to_s(re); + } + return rb_reg_desc(RREGEXP_SRC_PTR(re), RREGEXP_SRC_LEN(re), re); +} + + +/* + * call-seq: + * rxp.to_s => str + * + * Returns a string containing the regular expression and its options (using the + * (?opts:source) notation. This string can be fed back in to + * Regexp::new to a regular expression with the same semantics as + * the original. (However, Regexp#== may not return true when + * comparing the two, as the source of the regular expression itself may + * differ, as the example shows). Regexp#inspect produces a + * generally more readable version of rxp. + * + * r1 = /ab+c/ix #=> /ab+c/ix + * s1 = r1.to_s #=> "(?ix-m:ab+c)" + * r2 = Regexp.new(s1) #=> /(?ix-m:ab+c)/ + * r1 == r2 #=> false + * r1.source #=> "ab+c" + * r2.source #=> "(?ix-m:ab+c)" + */ + +static VALUE +rb_reg_to_s(VALUE re) +{ + int options, opt; + const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND; + long len; + const UChar* ptr; + VALUE str = rb_str_buf_new2("(?"); + char optbuf[5]; + + rb_reg_check(re); + + rb_enc_copy(str, re); + options = RREGEXP(re)->ptr->options; + ptr = (UChar*)RREGEXP_SRC_PTR(re); + len = RREGEXP_SRC_LEN(re); + again: + if (len >= 4 && ptr[0] == '(' && ptr[1] == '?') { + int err = 1; + ptr += 2; + if ((len -= 2) > 0) { + do { + opt = char_to_option((int )*ptr); + if (opt != 0) { + options |= opt; + } + else { + break; + } + ++ptr; + } while (--len > 0); + } + if (len > 1 && *ptr == '-') { + ++ptr; + --len; + do { + opt = char_to_option((int )*ptr); + if (opt != 0) { + options &= ~opt; + } + else { + break; + } + ++ptr; + } while (--len > 0); + } + if (*ptr == ')') { + --len; + ++ptr; + goto again; + } + if (*ptr == ':' && ptr[len-1] == ')') { + int r; + Regexp *rp; + r = onig_alloc_init(&rp, ONIG_OPTION_DEFAULT, + ONIGENC_CASE_FOLD_DEFAULT, + rb_enc_get(re), + OnigDefaultSyntax); + if (r == 0) { + ++ptr; + len -= 2; + err = (onig_compile(rp, ptr, ptr + len, NULL) != 0); + } + onig_free(rp); + } + if (err) { + options = RREGEXP(re)->ptr->options; + ptr = (UChar*)RREGEXP_SRC_PTR(re); + len = RREGEXP_SRC_LEN(re); + } + } + + if (*option_to_str(optbuf, options)) rb_str_buf_cat2(str, optbuf); + + if ((options & embeddable) != embeddable) { + optbuf[0] = '-'; + option_to_str(optbuf + 1, ~options); + rb_str_buf_cat2(str, optbuf); + } + + rb_str_buf_cat2(str, ":"); + rb_reg_expr_str(str, (char*)ptr, len); + rb_str_buf_cat2(str, ")"); + rb_enc_copy(str, re); + + OBJ_INFECT(str, re); + return str; +} + +static void +rb_reg_raise(const char *s, long len, const char *err, VALUE re) +{ + VALUE desc = rb_reg_desc(s, len, re); + + rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING_PTR(desc)); +} + +static VALUE +rb_enc_reg_error_desc(const char *s, long len, rb_encoding *enc, int options, const char *err) +{ + char opts[6]; + VALUE desc = rb_str_buf_new2(err); + + rb_enc_associate(desc, enc); + rb_str_buf_cat2(desc, ": /"); + rb_reg_expr_str(desc, s, len); + opts[0] = '/'; + option_to_str(opts + 1, options); + rb_str_buf_cat2(desc, opts); + return rb_exc_new3(rb_eRegexpError, desc); +} + +static void +rb_enc_reg_raise(const char *s, long len, rb_encoding *enc, int options, const char *err) +{ + rb_exc_raise(rb_enc_reg_error_desc(s, len, enc, options, err)); +} + +static VALUE +rb_reg_error_desc(VALUE str, int options, const char *err) +{ + return rb_enc_reg_error_desc(RSTRING_PTR(str), RSTRING_LEN(str), + rb_enc_get(str), options, err); +} + +static void +rb_reg_raise_str(VALUE str, int options, const char *err) +{ + rb_exc_raise(rb_reg_error_desc(str, options, err)); +} + + +/* + * call-seq: + * rxp.casefold? => true or false + * + * Returns the value of the case-insensitive flag. + * + * /a/.casefold? #=> false + * /a/i.casefold? #=> true + * /(?i:a)/.casefold? #=> false + */ + +static VALUE +rb_reg_casefold_p(VALUE re) +{ + rb_reg_check(re); + if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue; + return Qfalse; +} + + +/* + * call-seq: + * rxp.options => fixnum + * + * Returns the set of bits corresponding to the options used when creating this + * Regexp (see Regexp::new for details. Note that additional bits + * may be set in the returned options: these are used internally by the regular + * expression code. These extra bits are ignored if the options are passed to + * Regexp::new. + * + * Regexp::IGNORECASE #=> 1 + * Regexp::EXTENDED #=> 2 + * Regexp::MULTILINE #=> 4 + * + * /cat/.options #=> 0 + * /cat/ix.options #=> 3 + * Regexp.new('cat', true).options #=> 1 + * /\xa1\xa2/e.options #=> 16 + * + * r = /cat/ix + * Regexp.new(r.source, r.options) #=> /cat/ix + */ + +static VALUE +rb_reg_options_m(VALUE re) +{ + int options = rb_reg_options(re); + return INT2NUM(options); +} + +static int +reg_names_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg) +{ + VALUE ary = (VALUE)arg; + rb_ary_push(ary, rb_str_new((const char *)name, name_end-name)); + return 0; +} + +/* + * call-seq: + * rxp.names => [name1, name2, ...] + * + * Returns a list of names of captures as an array of strings. + * + * /(?.)(?.)(?.)/.names + * #=> ["foo", "bar", "baz"] + * + * /(?.)(?.)/.names + * #=> ["foo"] + * + * /(.)(.)/.names + * #=> [] + */ + +static VALUE +rb_reg_names(VALUE re) +{ + VALUE ary = rb_ary_new(); + rb_reg_check(re); + onig_foreach_name(RREGEXP(re)->ptr, reg_names_iter, (void*)ary); + return ary; +} + +static int +reg_named_captures_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg) +{ + VALUE hash = (VALUE)arg; + VALUE ary = rb_ary_new2(back_num); + int i; + + for(i = 0; i < back_num; i++) + rb_ary_store(ary, i, INT2NUM(back_refs[i])); + + rb_hash_aset(hash, rb_str_new((const char*)name, name_end-name),ary); + + return 0; +} + +/* + * call-seq: + * rxp.named_captures => hash + * + * Returns a hash representing information about named captures of rxp. + * + * A key of the hash is a name of the named captures. + * A value of the hash is an array which is list of indexes of corresponding + * named captures. + * + * /(?.)(?.)/.named_captures + * #=> {"foo"=>[1], "bar"=>[2]} + * + * /(?.)(?.)/.named_captures + * #=> {"foo"=>[1, 2]} + * + * If there are no named captures, an empty hash is returned. + * + * /(.)(.)/.named_captures + * #=> {} + */ + +static VALUE +rb_reg_named_captures(VALUE re) +{ + VALUE hash = rb_hash_new(); + rb_reg_check(re); + onig_foreach_name(RREGEXP(re)->ptr, reg_named_captures_iter, (void*)hash); + return hash; +} + +static Regexp* +make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_buffer err) +{ + Regexp *rp; + int r; + OnigErrorInfo einfo; + + /* Handle escaped characters first. */ + + /* Build a copy of the string (in dest) with the + escaped characters translated, and generate the regex + from that. + */ + + r = onig_alloc_init(&rp, flags, ONIGENC_CASE_FOLD_DEFAULT, + enc, OnigDefaultSyntax); + if (r) { + onig_error_code_to_str((UChar*)err, r); + return 0; + } + + r = onig_compile(rp, (UChar*)s, (UChar*)(s + len), &einfo); + + if (r != 0) { + onig_free(rp); + (void )onig_error_code_to_str((UChar*)err, r, &einfo); + return 0; + } + return rp; +} + + +/* + * Document-class: MatchData + * + * MatchData is the type of the special variable $~, + * and is the type of the object returned by Regexp#match and + * Regexp.last_match. It encapsulates all the results of a pattern + * match, results normally accessed through the special variables + * $&, $', $`, $1, + * $2, and so on. + * + */ + +VALUE rb_cMatch; + +static VALUE +match_alloc(VALUE klass) +{ + NEWOBJ(match, struct RMatch); + OBJSETUP(match, klass, T_MATCH); + + match->str = 0; + match->rmatch = 0; + match->regexp = 0; + match->rmatch = ALLOC(struct rmatch); + MEMZERO(match->rmatch, struct rmatch, 1); + + return (VALUE)match; +} + +typedef struct { + int byte_pos; + int char_pos; +} pair_t; + +static int +pair_byte_cmp(const void *pair1, const void *pair2) +{ + return ((pair_t*)pair1)->byte_pos - ((pair_t*)pair2)->byte_pos; +} + +static void +update_char_offset(VALUE match) +{ + struct rmatch *rm = RMATCH(match)->rmatch; + struct re_registers *regs; + int num_regs; + int i, num_pos, c; + char *s, *p, *q, *e; + rb_encoding *enc; + pair_t *pairs; + + if (rm->char_offset_updated) + return; + + regs = &rm->regs; + num_regs = rm->regs.num_regs; + + if (rm->char_offset_num_allocated < num_regs) { + REALLOC_N(rm->char_offset, struct rmatch_offset, num_regs); + rm->char_offset_num_allocated = num_regs; + } + + enc = rb_enc_get(RMATCH(match)->str); + if (rb_enc_mbmaxlen(enc) == 1) { + for (i = 0; i < num_regs; i++) { + rm->char_offset[i].beg = BEG(i); + rm->char_offset[i].end = END(i); + } + rm->char_offset_updated = 1; + return; + } + + pairs = ALLOCA_N(pair_t, num_regs*2); + num_pos = 0; + for (i = 0; i < num_regs; i++) { + if (BEG(i) < 0) + continue; + pairs[num_pos++].byte_pos = BEG(i); + pairs[num_pos++].byte_pos = END(i); + } + qsort(pairs, num_pos, sizeof(pair_t), pair_byte_cmp); + + s = p = RSTRING_PTR(RMATCH(match)->str); + e = s + RSTRING_LEN(RMATCH(match)->str); + c = 0; + for (i = 0; i < num_pos; i++) { + q = s + pairs[i].byte_pos; + c += rb_enc_strlen(p, q, enc); + pairs[i].char_pos = c; + p = q; + } + + for (i = 0; i < num_regs; i++) { + pair_t key, *found; + if (BEG(i) < 0) { + rm->char_offset[i].beg = -1; + rm->char_offset[i].end = -1; + continue; + } + + key.byte_pos = BEG(i); + found = bsearch(&key, pairs, num_pos, sizeof(pair_t), pair_byte_cmp); + rm->char_offset[i].beg = found->char_pos; + + key.byte_pos = END(i); + found = bsearch(&key, pairs, num_pos, sizeof(pair_t), pair_byte_cmp); + rm->char_offset[i].end = found->char_pos; + } + + rm->char_offset_updated = 1; +} + +static void +match_check(VALUE match) +{ + if (!RMATCH(match)->regexp) { + rb_raise(rb_eTypeError, "uninitialized Match"); + } +} + +/* :nodoc: */ +static VALUE +match_init_copy(VALUE obj, VALUE orig) +{ + struct rmatch *rm; + + if (obj == orig) return obj; + + if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) { + rb_raise(rb_eTypeError, "wrong argument class"); + } + RMATCH(obj)->str = RMATCH(orig)->str; + RMATCH(obj)->regexp = RMATCH(orig)->regexp; + + rm = RMATCH(obj)->rmatch; + onig_region_copy(&rm->regs, RMATCH_REGS(orig)); + + if (!RMATCH(orig)->rmatch->char_offset_updated) { + rm->char_offset_updated = 0; + } + else { + if (rm->char_offset_num_allocated < rm->regs.num_regs) { + REALLOC_N(rm->char_offset, struct rmatch_offset, rm->regs.num_regs); + rm->char_offset_num_allocated = rm->regs.num_regs; + } + MEMCPY(rm->char_offset, RMATCH(orig)->rmatch->char_offset, + struct rmatch_offset, rm->regs.num_regs); + rm->char_offset_updated = 1; + } + + return obj; +} + + +/* + * call-seq: + * mtch.regexp => regexp + * + * Returns the regexp. + * + * m = /a.*b/.match("abc") + * m.regexp #=> /a.*b/ + */ + +static VALUE +match_regexp(VALUE match) +{ + match_check(match); + return RMATCH(match)->regexp; +} + +/* + * call-seq: + * mtch.names => [name1, name2, ...] + * + * Returns a list of names of captures as an array of strings. + * It is same as mtch.regexp.names. + * + * /(?.)(?.)(?.)/.match("hoge").names + * #=> ["foo", "bar", "baz"] + * + * m = /(?.)(?.)?/.match("a") #=> # + * m.names #=> ["x", "y"] + */ + +static VALUE +match_names(VALUE match) +{ + match_check(match); + return rb_reg_names(RMATCH(match)->regexp); +} + +/* + * call-seq: + * mtch.length => integer + * mtch.size => integer + * + * Returns the number of elements in the match array. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.length #=> 5 + * m.size #=> 5 + */ + +static VALUE +match_size(VALUE match) +{ + match_check(match); + return INT2FIX(RMATCH_REGS(match)->num_regs); +} + +static int +match_backref_number(VALUE match, VALUE backref) +{ + const char *name; + int num; + + struct re_registers *regs = RMATCH_REGS(match); + VALUE regexp = RMATCH(match)->regexp; + + match_check(match); + switch(TYPE(backref)) { + default: + return NUM2INT(backref); + + case T_SYMBOL: + name = rb_id2name(SYM2ID(backref)); + break; + + case T_STRING: + name = StringValueCStr(backref); + break; + } + + num = onig_name_to_backref_number(RREGEXP(regexp)->ptr, + (const unsigned char*)name, + (const unsigned char*)name + strlen(name), + regs); + + if (num < 1) { + rb_raise(rb_eIndexError, "undefined group name reference: %s", name); + } + + return num; +} + + +/* + * call-seq: + * mtch.offset(n) => array + * + * Returns a two-element array containing the beginning and ending offsets of + * the nth match. + * n can be a string or symbol to reference a named capture. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.offset(0) #=> [1, 7] + * m.offset(4) #=> [6, 7] + * + * m = /(?.)(.)(?.)/.match("hoge") + * p m.offset(:foo) #=> [0, 1] + * p m.offset(:bar) #=> [2, 3] + * + */ + +static VALUE +match_offset(VALUE match, VALUE n) +{ + int i = match_backref_number(match, n); + struct re_registers *regs = RMATCH_REGS(match); + + match_check(match); + if (i < 0 || regs->num_regs <= i) + rb_raise(rb_eIndexError, "index %d out of matches", i); + + if (BEG(i) < 0) + return rb_assoc_new(Qnil, Qnil); + + update_char_offset(match); + return rb_assoc_new(INT2FIX(RMATCH(match)->rmatch->char_offset[i].beg), + INT2FIX(RMATCH(match)->rmatch->char_offset[i].end)); +} + + +/* + * call-seq: + * mtch.begin(n) => integer + * + * Returns the offset of the start of the nth element of the match + * array in the string. + * n can be a string or symbol to reference a named capture. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.begin(0) #=> 1 + * m.begin(2) #=> 2 + * + * m = /(?.)(.)(?.)/.match("hoge") + * p m.begin(:foo) #=> 0 + * p m.begin(:bar) #=> 2 + */ + +static VALUE +match_begin(VALUE match, VALUE n) +{ + int i = match_backref_number(match, n); + struct re_registers *regs = RMATCH_REGS(match); + + match_check(match); + if (i < 0 || regs->num_regs <= i) + rb_raise(rb_eIndexError, "index %d out of matches", i); + + if (BEG(i) < 0) + return Qnil; + + update_char_offset(match); + return INT2FIX(RMATCH(match)->rmatch->char_offset[i].beg); +} + + +/* + * call-seq: + * mtch.end(n) => integer + * + * Returns the offset of the character immediately following the end of the + * nth element of the match array in the string. + * n can be a string or symbol to reference a named capture. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.end(0) #=> 7 + * m.end(2) #=> 3 + * + * m = /(?.)(.)(?.)/.match("hoge") + * p m.end(:foo) #=> 1 + * p m.end(:bar) #=> 3 + */ + +static VALUE +match_end(VALUE match, VALUE n) +{ + int i = match_backref_number(match, n); + struct re_registers *regs = RMATCH_REGS(match); + + match_check(match); + if (i < 0 || regs->num_regs <= i) + rb_raise(rb_eIndexError, "index %d out of matches", i); + + if (BEG(i) < 0) + return Qnil; + + update_char_offset(match); + return INT2FIX(RMATCH(match)->rmatch->char_offset[i].end); +} + +#define MATCH_BUSY FL_USER2 + +void +rb_match_busy(VALUE match) +{ + FL_SET(match, MATCH_BUSY); +} + +/* + * call-seq: + * rxp.fixed_encoding? => true or false + * + * Returns false if rxp is applicable to + * a string with any ASCII compatible encoding. + * Returns true otherwise. + * + * r = /a/ + * r.fixed_encoding? #=> false + * r =~ "\u{6666} a" #=> 2 + * r =~ "\xa1\xa2 a".force_encoding("euc-jp") #=> 2 + * r =~ "abc".force_encoding("euc-jp") #=> 0 + * + * r = /a/u + * r.fixed_encoding? #=> true + * r.encoding #=> # + * r =~ "\u{6666} a" #=> 2 + * r =~ "\xa1\xa2".force_encoding("euc-jp") #=> ArgumentError + * r =~ "abc".force_encoding("euc-jp") #=> 0 + * + * r = /\u{6666}/ + * r.fixed_encoding? #=> true + * r.encoding #=> # + * r =~ "\u{6666} a" #=> 0 + * r =~ "\xa1\xa2".force_encoding("euc-jp") #=> ArgumentError + * r =~ "abc".force_encoding("euc-jp") #=> nil + */ + +static VALUE +rb_reg_fixed_encoding_p(VALUE re) +{ + if (FL_TEST(re, KCODE_FIXED)) + return Qtrue; + else + return Qfalse; +} + +static VALUE +rb_reg_preprocess(const char *p, const char *end, rb_encoding *enc, + rb_encoding **fixed_enc, onig_errmsg_buffer err); + + +static void +reg_enc_error(VALUE re, VALUE str) +{ + rb_raise(rb_eEncCompatError, + "incompatible encoding regexp match (%s regexp with %s string)", + rb_enc_name(RREGEXP(re)->ptr->enc), + rb_enc_name(rb_enc_get(str))); +} + +static rb_encoding* +rb_reg_prepare_enc(VALUE re, VALUE str, int warn) +{ + rb_encoding *enc = 0; + + if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { + rb_raise(rb_eArgError, + "invalid byte sequence in %s", + rb_enc_name(rb_enc_get(str))); + } + + rb_reg_check(re); + enc = rb_enc_get(str); + if (!rb_enc_str_asciicompat_p(str)) { + if (RREGEXP(re)->ptr->enc != enc) { + reg_enc_error(re, str); + } + } + else if (rb_reg_fixed_encoding_p(re)) { + if (RREGEXP(re)->ptr->enc != enc && + (!rb_enc_asciicompat(RREGEXP(re)->ptr->enc) || + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT)) { + reg_enc_error(re, str); + } + enc = RREGEXP(re)->ptr->enc; + } + if (warn && (RBASIC(re)->flags & REG_ENCODING_NONE) && + enc != rb_ascii8bit_encoding() && + rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + rb_warn("regexp match /.../n against to %s string", + rb_enc_name(enc)); + } + return enc; +} + +regex_t * +rb_reg_prepare_re(VALUE re, VALUE str) +{ + regex_t *reg = RREGEXP(re)->ptr; + onig_errmsg_buffer err = ""; + int r; + OnigErrorInfo einfo; + const char *pattern; + VALUE unescaped; + rb_encoding *fixed_enc = 0; + rb_encoding *enc = rb_reg_prepare_enc(re, str, 1); + + if (reg->enc == enc) return reg; + + rb_reg_check(re); + reg = RREGEXP(re)->ptr; + pattern = RREGEXP_SRC_PTR(re); + + unescaped = rb_reg_preprocess( + pattern, pattern + RREGEXP_SRC_LEN(re), enc, + &fixed_enc, err); + + if (unescaped == Qnil) { + rb_raise(rb_eArgError, "regexp preprocess failed: %s", err); + } + + r = onig_new(®, (UChar* )RSTRING_PTR(unescaped), + (UChar* )(RSTRING_PTR(unescaped) + RSTRING_LEN(unescaped)), + reg->options, enc, + OnigDefaultSyntax, &einfo); + if (r) { + onig_error_code_to_str((UChar*)err, r, &einfo); + rb_reg_raise(pattern, RREGEXP_SRC_LEN(re), err, re); + } + + RB_GC_GUARD(unescaped); + return reg; +} + +int +rb_reg_adjust_startpos(VALUE re, VALUE str, int pos, int reverse) +{ + int range; + rb_encoding *enc; + UChar *p, *string; + + enc = rb_reg_prepare_enc(re, str, 0); + + if (reverse) { + range = -pos; + } + else { + range = RSTRING_LEN(str) - pos; + } + + if (pos > 0 && ONIGENC_MBC_MAXLEN(enc) != 1 && pos < RSTRING_LEN(str)) { + string = (UChar*)RSTRING_PTR(str); + + if (range > 0) { + p = onigenc_get_right_adjust_char_head(enc, string, string + pos, string + RSTRING_LEN(str)); + } + else { + p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, string, string + pos, string + RSTRING_LEN(str)); + } + return p - string; + } + + return pos; +} + +int +rb_reg_search(VALUE re, VALUE str, int pos, int reverse) +{ + int result; + VALUE match; + struct re_registers regi, *regs = ®i; + char *range = RSTRING_PTR(str); + regex_t *reg; + int tmpreg; + + if (pos > RSTRING_LEN(str) || pos < 0) { + rb_backref_set(Qnil); + return -1; + } + + reg = rb_reg_prepare_re(re, str); + tmpreg = reg != RREGEXP(re)->ptr; + if (!tmpreg) RREGEXP(re)->usecnt++; + + match = rb_backref_get(); + if (!NIL_P(match)) { + if (FL_TEST(match, MATCH_BUSY)) { + match = Qnil; + } + else { + regs = RMATCH_REGS(match); + } + } + if (NIL_P(match)) { + MEMZERO(regs, struct re_registers, 1); + } + if (!reverse) { + range += RSTRING_LEN(str); + } + result = onig_search(reg, + (UChar*)(RSTRING_PTR(str)), + ((UChar*)(RSTRING_PTR(str)) + RSTRING_LEN(str)), + ((UChar*)(RSTRING_PTR(str)) + pos), + ((UChar*)range), + regs, ONIG_OPTION_NONE); + if (!tmpreg) RREGEXP(re)->usecnt--; + if (tmpreg) { + if (RREGEXP(re)->usecnt) { + onig_free(reg); + } + else { + onig_free(RREGEXP(re)->ptr); + RREGEXP(re)->ptr = reg; + } + } + if (result < 0) { + if (regs == ®i) + onig_region_free(regs, 0); + if (result == ONIG_MISMATCH) { + rb_backref_set(Qnil); + return result; + } + else { + onig_errmsg_buffer err = ""; + onig_error_code_to_str((UChar*)err, result); + rb_reg_raise(RREGEXP_SRC_PTR(re), RREGEXP_SRC_LEN(re), err, 0); + } + } + + if (NIL_P(match)) { + match = match_alloc(rb_cMatch); + onig_region_copy(RMATCH_REGS(match), regs); + onig_region_free(regs, 0); + } + else { + if (rb_safe_level() >= 3) + OBJ_TAINT(match); + else + FL_UNSET(match, FL_TAINT); + } + + RMATCH(match)->str = rb_str_new4(str); + RMATCH(match)->regexp = re; + RMATCH(match)->rmatch->char_offset_updated = 0; + rb_backref_set(match); + + OBJ_INFECT(match, re); + OBJ_INFECT(match, str); + + return result; +} + +VALUE +rb_reg_nth_defined(int nth, VALUE match) +{ + struct re_registers *regs; + if (NIL_P(match)) return Qnil; + match_check(match); + regs = RMATCH_REGS(match); + if (nth >= regs->num_regs) { + return Qnil; + } + if (nth < 0) { + nth += regs->num_regs; + if (nth <= 0) return Qnil; + } + if (BEG(nth) == -1) return Qfalse; + return Qtrue; +} + +VALUE +rb_reg_nth_match(int nth, VALUE match) +{ + VALUE str; + long start, end, len; + struct re_registers *regs; + + if (NIL_P(match)) return Qnil; + match_check(match); + regs = RMATCH_REGS(match); + if (nth >= regs->num_regs) { + return Qnil; + } + if (nth < 0) { + nth += regs->num_regs; + if (nth <= 0) return Qnil; + } + start = BEG(nth); + if (start == -1) return Qnil; + end = END(nth); + len = end - start; + str = rb_str_subseq(RMATCH(match)->str, start, len); + OBJ_INFECT(str, match); + return str; +} + +VALUE +rb_reg_last_match(VALUE match) +{ + return rb_reg_nth_match(0, match); +} + + +/* + * call-seq: + * mtch.pre_match => str + * + * Returns the portion of the original string before the current match. + * Equivalent to the special variable $`. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.pre_match #=> "T" + */ + +VALUE +rb_reg_match_pre(VALUE match) +{ + VALUE str; + struct re_registers *regs; + + if (NIL_P(match)) return Qnil; + match_check(match); + regs = RMATCH_REGS(match); + if (BEG(0) == -1) return Qnil; + str = rb_str_subseq(RMATCH(match)->str, 0, BEG(0)); + if (OBJ_TAINTED(match)) OBJ_TAINT(str); + return str; +} + + +/* + * call-seq: + * mtch.post_match => str + * + * Returns the portion of the original string after the current match. + * Equivalent to the special variable $'. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") + * m.post_match #=> ": The Movie" + */ + +VALUE +rb_reg_match_post(VALUE match) +{ + VALUE str; + long pos; + struct re_registers *regs; + + if (NIL_P(match)) return Qnil; + match_check(match); + regs = RMATCH_REGS(match); + if (BEG(0) == -1) return Qnil; + str = RMATCH(match)->str; + pos = END(0); + str = rb_str_subseq(str, pos, RSTRING_LEN(str) - pos); + if (OBJ_TAINTED(match)) OBJ_TAINT(str); + return str; +} + +VALUE +rb_reg_match_last(VALUE match) +{ + int i; + struct re_registers *regs; + + if (NIL_P(match)) return Qnil; + match_check(match); + regs = RMATCH_REGS(match); + if (BEG(0) == -1) return Qnil; + + for (i=regs->num_regs-1; BEG(i) == -1 && i > 0; i--) + ; + if (i == 0) return Qnil; + return rb_reg_nth_match(i, match); +} + +static VALUE +last_match_getter(void) +{ + return rb_reg_last_match(rb_backref_get()); +} + +static VALUE +prematch_getter(void) +{ + return rb_reg_match_pre(rb_backref_get()); +} + +static VALUE +postmatch_getter(void) +{ + return rb_reg_match_post(rb_backref_get()); +} + +static VALUE +last_paren_match_getter(void) +{ + return rb_reg_match_last(rb_backref_get()); +} + +static VALUE +match_array(VALUE match, int start) +{ + struct re_registers *regs = RMATCH_REGS(match); + VALUE ary = rb_ary_new2(regs->num_regs); + VALUE target = RMATCH(match)->str; + int i; + int taint = OBJ_TAINTED(match); + + match_check(match); + for (i=start; inum_regs; i++) { + if (regs->beg[i] == -1) { + rb_ary_push(ary, Qnil); + } + else { + VALUE str = rb_str_subseq(target, regs->beg[i], regs->end[i]-regs->beg[i]); + if (taint) OBJ_TAINT(str); + rb_ary_push(ary, str); + } + } + return ary; +} + + +/* [MG]:FIXME: I put parens around the /.../.match() in the first line of the + second example to prevent the '*' followed by a '/' from ending the + comment. */ + +/* + * call-seq: + * mtch.to_a => anArray + * + * Returns the array of matches. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.to_a #=> ["HX1138", "H", "X", "113", "8"] + * + * Because to_a is called when expanding + * *variable, there's a useful assignment + * shortcut for extracting matched fields. This is slightly slower than + * accessing the fields directly (as an intermediate array is + * generated). + * + * all,f1,f2,f3 = *(/(.)(.)(\d+)(\d)/.match("THX1138.")) + * all #=> "HX1138" + * f1 #=> "H" + * f2 #=> "X" + * f3 #=> "113" + */ + +static VALUE +match_to_a(VALUE match) +{ + return match_array(match, 0); +} + + +/* + * call-seq: + * mtch.captures => array + * + * Returns the array of captures; equivalent to mtch.to_a[1..-1]. + * + * f1,f2,f3,f4 = /(.)(.)(\d+)(\d)/.match("THX1138.").captures + * f1 #=> "H" + * f2 #=> "X" + * f3 #=> "113" + * f4 #=> "8" + */ +static VALUE +match_captures(VALUE match) +{ + return match_array(match, 1); +} + +static int +name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name, const char* name_end) +{ + int num; + + num = onig_name_to_backref_number(RREGEXP(regexp)->ptr, + (const unsigned char* )name, (const unsigned char* )name_end, regs); + if (num >= 1) { + return num; + } + else { + VALUE s = rb_str_new(name, (long )(name_end - name)); + rb_raise(rb_eIndexError, "undefined group name reference: %s", + StringValuePtr(s)); + } +} + +/* + * call-seq: + * mtch[i] => str or nil + * mtch[start, length] => array + * mtch[range] => array + * mtch[name] => str or nil + * + * Match Reference---MatchData acts as an array, and may be + * accessed using the normal array indexing techniques. mtch[0] is + * equivalent to the special variable $&, and returns the entire + * matched string. mtch[1], mtch[2], and so on return the values + * of the matched backreferences (portions of the pattern between parentheses). + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m #=> # + * m[0] #=> "HX1138" + * m[1, 2] #=> ["H", "X"] + * m[1..3] #=> ["H", "X", "113"] + * m[-3, 2] #=> ["X", "113"] + * + * m = /(?a+)b/.match("ccaaab") + * m #=> # + * m["foo"] #=> "aaa" + * m[:foo] #=> "aaa" + */ + +static VALUE +match_aref(int argc, VALUE *argv, VALUE match) +{ + VALUE idx, rest; + + match_check(match); + rb_scan_args(argc, argv, "11", &idx, &rest); + + if (NIL_P(rest)) { + if (FIXNUM_P(idx)) { + if (FIX2INT(idx) >= 0) { + return rb_reg_nth_match(FIX2INT(idx), match); + } + } + else { + const char *p; + int num; + + switch (TYPE(idx)) { + case T_SYMBOL: + p = rb_id2name(SYM2ID(idx)); + goto name_to_backref; + break; + case T_STRING: + p = StringValuePtr(idx); + + name_to_backref: + num = name_to_backref_number(RMATCH_REGS(match), + RMATCH(match)->regexp, p, p + strlen(p)); + return rb_reg_nth_match(num, match); + break; + + default: + break; + } + } + } + + return rb_ary_aref(argc, argv, match_to_a(match)); +} + +static VALUE +match_entry(VALUE match, long n) +{ + return rb_reg_nth_match(n, match); +} + + +/* + * call-seq: + * + * mtch.values_at([index]*) => array + * + * Uses each index to access the matching values, returning an array of + * the corresponding matches. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") + * m.to_a #=> ["HX1138", "H", "X", "113", "8"] + * m.values_at(0, 2, -2) #=> ["HX1138", "X", "113"] + */ + +static VALUE +match_values_at(int argc, VALUE *argv, VALUE match) +{ + struct re_registers *regs = RMATCH_REGS(match); + match_check(match); + return rb_get_values_at(match, regs->num_regs, argc, argv, match_entry); +} + + +/* + * call-seq: + * mtch.to_s => str + * + * Returns the entire matched string. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.to_s #=> "HX1138" + */ + +static VALUE +match_to_s(VALUE match) +{ + VALUE str = rb_reg_last_match(match); + + match_check(match); + if (NIL_P(str)) str = rb_str_new(0,0); + if (OBJ_TAINTED(match)) OBJ_TAINT(str); + if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str); + return str; +} + + +/* + * call-seq: + * mtch.string => str + * + * Returns a frozen copy of the string passed in to match. + * + * m = /(.)(.)(\d+)(\d)/.match("THX1138.") + * m.string #=> "THX1138." + */ + +static VALUE +match_string(VALUE match) +{ + match_check(match); + return RMATCH(match)->str; /* str is frozen */ +} + +struct backref_name_tag { + const UChar *name; + long len; +}; + +static int +match_inspect_name_iter(const OnigUChar *name, const OnigUChar *name_end, + int back_num, int *back_refs, OnigRegex regex, void *arg0) +{ + struct backref_name_tag *arg = (struct backref_name_tag *)arg0; + int i; + + for (i = 0; i < back_num; i++) { + arg[back_refs[i]].name = name; + arg[back_refs[i]].len = name_end - name; + } + return 0; +} + +/* + * call-seq: + * mtch.inspect => str + * + * Returns a printable version of mtch. + * + * puts /.$/.match("foo").inspect + * #=> # + * + * puts /(.)(.)(.)/.match("foo").inspect + * #=> # + * + * puts /(.)(.)?(.)/.match("fo").inspect + * #=> # + * + * puts /(?.)(?.)(?.)/.match("hoge").inspect + * #=> # + * + */ + +static VALUE +match_inspect(VALUE match) +{ + const char *cname = rb_obj_classname(match); + VALUE str; + int i; + struct re_registers *regs = RMATCH_REGS(match); + int num_regs = regs->num_regs; + struct backref_name_tag *names; + VALUE regexp = RMATCH(match)->regexp; + + if (regexp == 0) { + return rb_sprintf("#<%s:%p>", cname, (void*)match); + } + + names = ALLOCA_N(struct backref_name_tag, num_regs); + MEMZERO(names, struct backref_name_tag, num_regs); + + onig_foreach_name(RREGEXP(regexp)->ptr, + match_inspect_name_iter, names); + + str = rb_str_buf_new2("#<"); + rb_str_buf_cat2(str, cname); + + for (i = 0; i < num_regs; i++) { + VALUE v; + rb_str_buf_cat2(str, " "); + if (0 < i) { + if (names[i].name) + rb_str_buf_cat(str, (const char *)names[i].name, names[i].len); + else { + rb_str_catf(str, "%d", i); + } + rb_str_buf_cat2(str, ":"); + } + v = rb_reg_nth_match(i, match); + if (v == Qnil) + rb_str_buf_cat2(str, "nil"); + else + rb_str_buf_append(str, rb_str_inspect(v)); + } + rb_str_buf_cat2(str, ">"); + + return str; +} + +VALUE rb_cRegexp; + +static int +read_escaped_byte(const char **pp, const char *end, onig_errmsg_buffer err) +{ + const char *p = *pp; + int code; + int meta_prefix = 0, ctrl_prefix = 0; + int len; + int retbyte; + + retbyte = -1; + if (p == end || *p++ != '\\') { + errcpy(err, "too short escaped multibyte character"); + return -1; + } + +again: + if (p == end) { + errcpy(err, "too short escape sequence"); + return -1; + } + switch (*p++) { + case '\\': code = '\\'; break; + case 'n': code = '\n'; break; + case 't': code = '\t'; break; + case 'r': code = '\r'; break; + case 'f': code = '\f'; break; + case 'v': code = '\013'; break; + case 'a': code = '\007'; break; + case 'e': code = '\033'; break; + + /* \OOO */ + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + p--; + code = ruby_scan_oct(p, end < p+3 ? end-p : 3, &len); + p += len; + break; + + case 'x': /* \xHH */ + code = ruby_scan_hex(p, end < p+2 ? end-p : 2, &len); + if (len < 1) { + errcpy(err, "invalid hex escape"); + return -1; + } + p += len; + break; + + case 'M': /* \M-X, \M-\C-X, \M-\cX */ + if (meta_prefix) { + errcpy(err, "duplicate meta escape"); + return -1; + } + meta_prefix = 1; + if (p+1 < end && *p++ == '-' && (*p & 0x80) == 0) { + if (*p == '\\') { + p++; + goto again; + } + else { + code = *p++; + break; + } + } + errcpy(err, "too short meta escape"); + return -1; + + case 'C': /* \C-X, \C-\M-X */ + if (p == end || *p++ != '-') { + errcpy(err, "too short control escape"); + return -1; + } + case 'c': /* \cX, \c\M-X */ + if (ctrl_prefix) { + errcpy(err, "duplicate control escape"); + return -1; + } + ctrl_prefix = 1; + if (p < end && (*p & 0x80) == 0) { + if (*p == '\\') { + p++; + goto again; + } + else { + code = *p++; + break; + } + } + errcpy(err, "too short control escape"); + return -1; + + default: + errcpy(err, "unexpected escape sequence"); + return -1; + } + if (code < 0 || 0xff < code) { + errcpy(err, "invalid escape code"); + return -1; + } + + if (ctrl_prefix) + code &= 0x1f; + if (meta_prefix) + code |= 0x80; + + *pp = p; + return code; +} + +static int +unescape_escaped_nonascii(const char **pp, const char *end, rb_encoding *enc, + VALUE buf, rb_encoding **encp, onig_errmsg_buffer err) +{ + const char *p = *pp; + int chmaxlen = rb_enc_mbmaxlen(enc); + char *chbuf = ALLOCA_N(char, chmaxlen); + int chlen = 0; + int byte; + int l; + + memset(chbuf, 0, chmaxlen); + + byte = read_escaped_byte(&p, end, err); + if (byte == -1) { + return -1; + } + + chbuf[chlen++] = byte; + while (chlen < chmaxlen && + MBCLEN_NEEDMORE_P(rb_enc_precise_mbclen(chbuf, chbuf+chlen, enc))) { + byte = read_escaped_byte(&p, end, err); + if (byte == -1) { + return -1; + } + chbuf[chlen++] = byte; + } + + l = rb_enc_precise_mbclen(chbuf, chbuf+chlen, enc); + if (MBCLEN_INVALID_P(l)) { + errcpy(err, "invalid multibyte escape"); + return -1; + } + if (1 < chlen || (chbuf[0] & 0x80)) { + rb_str_buf_cat(buf, chbuf, chlen); + + if (*encp == 0) + *encp = enc; + else if (*encp != enc) { + errcpy(err, "escaped non ASCII character in UTF-8 regexp"); + return -1; + } + } + else { + char escbuf[5]; + snprintf(escbuf, sizeof(escbuf), "\\x%02X", chbuf[0]&0xff); + rb_str_buf_cat(buf, escbuf, 4); + } + *pp = p; + return 0; +} + +static int +check_unicode_range(unsigned long code, onig_errmsg_buffer err) +{ + if ((0xd800 <= code && code <= 0xdfff) || /* Surrogates */ + 0x10ffff < code) { + errcpy(err, "invalid Unicode range"); + return -1; + } + return 0; +} + +static int +append_utf8(unsigned long uv, + VALUE buf, rb_encoding **encp, onig_errmsg_buffer err) +{ + if (check_unicode_range(uv, err) != 0) + return -1; + if (uv < 0x80) { + char escbuf[5]; + snprintf(escbuf, sizeof(escbuf), "\\x%02X", (int)uv); + rb_str_buf_cat(buf, escbuf, 4); + } + else { + int len; + char utf8buf[6]; + len = rb_uv_to_utf8(utf8buf, uv); + rb_str_buf_cat(buf, utf8buf, len); + + if (*encp == 0) + *encp = rb_utf8_encoding(); + else if (*encp != rb_utf8_encoding()) { + errcpy(err, "UTF-8 character in non UTF-8 regexp"); + return -1; + } + } + return 0; +} + +static int +unescape_unicode_list(const char **pp, const char *end, + VALUE buf, rb_encoding **encp, onig_errmsg_buffer err) +{ + const char *p = *pp; + int has_unicode = 0; + unsigned long code; + int len; + + while (p < end && ISSPACE(*p)) p++; + + while (1) { + code = ruby_scan_hex(p, end-p, &len); + if (len == 0) + break; + if (6 < len) { /* max 10FFFF */ + errcpy(err, "invalid Unicode range"); + return -1; + } + p += len; + if (append_utf8(code, buf, encp, err) != 0) + return -1; + has_unicode = 1; + + while (p < end && ISSPACE(*p)) p++; + } + + if (has_unicode == 0) { + errcpy(err, "invalid Unicode list"); + return -1; + } + + *pp = p; + + return 0; +} + +static int +unescape_unicode_bmp(const char **pp, const char *end, + VALUE buf, rb_encoding **encp, onig_errmsg_buffer err) +{ + const char *p = *pp; + int len; + unsigned long code; + + if (end < p+4) { + errcpy(err, "invalid Unicode escape"); + return -1; + } + code = ruby_scan_hex(p, 4, &len); + if (len != 4) { + errcpy(err, "invalid Unicode escape"); + return -1; + } + if (append_utf8(code, buf, encp, err) != 0) + return -1; + *pp = p + 4; + return 0; +} + +static int +unescape_nonascii(const char *p, const char *end, rb_encoding *enc, + VALUE buf, rb_encoding **encp, int *has_property, + onig_errmsg_buffer err) +{ + char c; + char smallbuf[2]; + + while (p < end) { + int chlen = rb_enc_precise_mbclen(p, end, enc); + if (!MBCLEN_CHARFOUND_P(chlen)) { + errcpy(err, "invalid multibyte character"); + return -1; + } + chlen = MBCLEN_CHARFOUND_LEN(chlen); + if (1 < chlen || (*p & 0x80)) { + rb_str_buf_cat(buf, p, chlen); + p += chlen; + if (*encp == 0) + *encp = enc; + else if (*encp != enc) { + errcpy(err, "non ASCII character in UTF-8 regexp"); + return -1; + } + continue; + } + + switch (c = *p++) { + case '\\': + if (p == end) { + errcpy(err, "too short escape sequence"); + return -1; + } + switch (c = *p++) { + case '1': case '2': case '3': + case '4': case '5': case '6': case '7': /* \O, \OO, \OOO or backref */ + { + int octlen; + if (ruby_scan_oct(p-1, end-(p-1), &octlen) <= 0177) { + /* backref or 7bit octal. + no need to unescape anyway. + re-escaping may break backref */ + goto escape_asis; + } + } + /* xxx: How about more than 199 subexpressions? */ + + case '0': /* \0, \0O, \0OO */ + + case 'x': /* \xHH */ + case 'c': /* \cX, \c\M-X */ + case 'C': /* \C-X, \C-\M-X */ + case 'M': /* \M-X, \M-\C-X, \M-\cX */ + p = p-2; + if (unescape_escaped_nonascii(&p, end, enc, buf, encp, err) != 0) + return -1; + break; + + case 'u': + if (p == end) { + errcpy(err, "too short escape sequence"); + return -1; + } + if (*p == '{') { + /* \u{H HH HHH HHHH HHHHH HHHHHH ...} */ + p++; + if (unescape_unicode_list(&p, end, buf, encp, err) != 0) + return -1; + if (p == end || *p++ != '}') { + errcpy(err, "invalid Unicode list"); + return -1; + } + break; + } + else { + /* \uHHHH */ + if (unescape_unicode_bmp(&p, end, buf, encp, err) != 0) + return -1; + break; + } + + case 'p': /* \p{Hiragana} */ + if (!*encp) { + *has_property = 1; + } + goto escape_asis; + + default: /* \n, \\, \d, \9, etc. */ +escape_asis: + smallbuf[0] = '\\'; + smallbuf[1] = c; + rb_str_buf_cat(buf, smallbuf, 2); + break; + } + break; + + default: + rb_str_buf_cat(buf, &c, 1); + break; + } + } + + return 0; +} + +static VALUE +rb_reg_preprocess(const char *p, const char *end, rb_encoding *enc, + rb_encoding **fixed_enc, onig_errmsg_buffer err) +{ + VALUE buf; + int has_property = 0; + + buf = rb_str_buf_new(0); + + if (rb_enc_asciicompat(enc)) + *fixed_enc = 0; + else { + *fixed_enc = enc; + rb_enc_associate(buf, enc); + } + + if (unescape_nonascii(p, end, enc, buf, fixed_enc, &has_property, err) != 0) + return Qnil; + + if (has_property && !*fixed_enc) { + *fixed_enc = enc; + } + + if (*fixed_enc) { + rb_enc_associate(buf, *fixed_enc); + } + + return buf; +} + +VALUE +rb_reg_check_preprocess(VALUE str) +{ + rb_encoding *fixed_enc = 0; + onig_errmsg_buffer err = ""; + VALUE buf; + char *p, *end; + rb_encoding *enc; + + StringValue(str); + p = RSTRING_PTR(str); + end = p + RSTRING_LEN(str); + enc = rb_enc_get(str); + + buf = rb_reg_preprocess(p, end, enc, &fixed_enc, err); + RB_GC_GUARD(str); + + if (buf == Qnil) { + return rb_reg_error_desc(str, 0, err); + } + return Qnil; +} + +static VALUE +rb_reg_preprocess_dregexp(VALUE ary) +{ + rb_encoding *fixed_enc = 0; + rb_encoding *regexp_enc = 0; + onig_errmsg_buffer err = ""; + int i; + VALUE result = 0; + + if (RARRAY_LEN(ary) == 0) { + rb_raise(rb_eArgError, "no arguments given"); + } + + for (i = 0; i < RARRAY_LEN(ary); i++) { + VALUE str = RARRAY_PTR(ary)[i]; + VALUE buf; + char *p, *end; + rb_encoding *src_enc; + + StringValue(str); + p = RSTRING_PTR(str); + end = p + RSTRING_LEN(str); + src_enc = rb_enc_get(str); + + buf = rb_reg_preprocess(p, end, src_enc, &fixed_enc, err); + + if (buf == Qnil) + rb_raise(rb_eArgError, "%s", err); + + if (fixed_enc != 0) { + if (regexp_enc != 0 && regexp_enc != fixed_enc) { + rb_raise(rb_eArgError, "encoding mismatch in dynamic regexp : %s and %s", + rb_enc_name(regexp_enc), rb_enc_name(fixed_enc)); + } + regexp_enc = fixed_enc; + } + + if (!result) + result = rb_str_new3(str); + else + rb_str_buf_append(result, str); + } + if (regexp_enc) { + rb_enc_associate(result, regexp_enc); + } + + return result; +} + +static int +rb_reg_initialize(VALUE obj, const char *s, int len, rb_encoding *enc, + int options, onig_errmsg_buffer err) +{ + struct RRegexp *re = RREGEXP(obj); + VALUE unescaped; + rb_encoding *fixed_enc = 0; + rb_encoding *a_enc = rb_ascii8bit_encoding(); + + if (!OBJ_UNTRUSTED(obj) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't modify regexp"); + rb_check_frozen(obj); + if (FL_TEST(obj, REG_LITERAL)) + rb_raise(rb_eSecurityError, "can't modify literal regexp"); + if (re->ptr) + rb_raise(rb_eTypeError, "already initialized regexp"); + re->ptr = 0; + + if (rb_enc_dummy_p(enc)) { + errcpy(err, "can't make regexp with dummy encoding"); + return -1; + } + + unescaped = rb_reg_preprocess(s, s+len, enc, &fixed_enc, err); + if (unescaped == Qnil) + return -1; + + if (fixed_enc) { + if ((fixed_enc != enc && (options & ARG_ENCODING_FIXED)) || + (fixed_enc != a_enc && (options & ARG_ENCODING_NONE))) { + errcpy(err, "incompatible character encoding"); + return -1; + } + if (fixed_enc != a_enc) { + options |= ARG_ENCODING_FIXED; + enc = fixed_enc; + } + } + else if (!(options & ARG_ENCODING_FIXED)) { + enc = rb_usascii_encoding(); + } + + rb_enc_associate((VALUE)re, enc); + if ((options & ARG_ENCODING_FIXED) || fixed_enc) { + re->basic.flags |= KCODE_FIXED; + } + if (options & ARG_ENCODING_NONE) { + re->basic.flags |= REG_ENCODING_NONE; + } + + re->ptr = make_regexp(RSTRING_PTR(unescaped), RSTRING_LEN(unescaped), enc, + options & ARG_REG_OPTION_MASK, err); + if (!re->ptr) return -1; + re->src = rb_enc_str_new(s, len, enc); + OBJ_FREEZE(re->src); + RB_GC_GUARD(unescaped); + return 0; +} + +static int +rb_reg_initialize_str(VALUE obj, VALUE str, int options, onig_errmsg_buffer err) +{ + int ret; + rb_encoding *enc = rb_enc_get(str); + if (options & ARG_ENCODING_NONE) { + rb_encoding *ascii8bit = rb_ascii8bit_encoding(); + if (enc != ascii8bit) { + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { + errcpy(err, "/.../n has a non escaped non ASCII character in non ASCII-8BIT script"); + return -1; + } + enc = ascii8bit; + } + } + ret = rb_reg_initialize(obj, RSTRING_PTR(str), RSTRING_LEN(str), enc, + options, err); + RB_GC_GUARD(str); + return ret; +} + +static VALUE +rb_reg_s_alloc(VALUE klass) +{ + NEWOBJ(re, struct RRegexp); + OBJSETUP(re, klass, T_REGEXP); + + re->ptr = 0; + re->src = 0; + re->usecnt = 0; + + return (VALUE)re; +} + +VALUE +rb_reg_new_str(VALUE s, int options) +{ + VALUE re = rb_reg_s_alloc(rb_cRegexp); + onig_errmsg_buffer err = ""; + + if (rb_reg_initialize_str(re, s, options, err) != 0) { + rb_reg_raise_str(s, options, err); + } + + return re; +} + +VALUE +rb_reg_new_ary(VALUE ary, int opt) +{ + return rb_reg_new_str(rb_reg_preprocess_dregexp(ary), opt); +} + +VALUE +rb_enc_reg_new(const char *s, long len, rb_encoding *enc, int options) +{ + VALUE re = rb_reg_s_alloc(rb_cRegexp); + onig_errmsg_buffer err = ""; + + if (rb_reg_initialize(re, s, len, enc, options, err) != 0) { + rb_enc_reg_raise(s, len, enc, options, err); + } + + return re; +} + +VALUE +rb_reg_new(const char *s, long len, int options) +{ + return rb_enc_reg_new(s, len, rb_ascii8bit_encoding(), options); +} + +VALUE +rb_reg_compile(VALUE str, int options) +{ + VALUE re = rb_reg_s_alloc(rb_cRegexp); + onig_errmsg_buffer err = ""; + + if (!str) str = rb_str_new(0,0); + if (rb_reg_initialize_str(re, str, options, err) != 0) { + rb_set_errinfo(rb_reg_error_desc(str, options, err)); + return Qnil; + } + FL_SET(re, REG_LITERAL); + return re; +} + +static VALUE reg_cache; + +VALUE +rb_reg_regcomp(VALUE str) +{ + volatile VALUE save_str = str; + if (reg_cache && RREGEXP_SRC_LEN(reg_cache) == RSTRING_LEN(str) + && ENCODING_GET(reg_cache) == ENCODING_GET(str) + && memcmp(RREGEXP_SRC_PTR(reg_cache), RSTRING_PTR(str), RSTRING_LEN(str)) == 0) + return reg_cache; + + return reg_cache = rb_reg_new_str(save_str, 0); +} + +/* + * call-seq: + * rxp.hash => fixnum + * + * Produce a hash based on the text and options of this regular expression. + */ + +static VALUE +rb_reg_hash(VALUE re) +{ + int hashval, len; + char *p; + + rb_reg_check(re); + hashval = RREGEXP(re)->ptr->options; + len = RREGEXP_SRC_LEN(re); + p = RREGEXP_SRC_PTR(re); + while (len--) { + hashval = hashval * 33 + *p++; + } + hashval = hashval + (hashval>>5); + + return INT2FIX(hashval); +} + + +/* + * call-seq: + * rxp == other_rxp => true or false + * rxp.eql?(other_rxp) => true or false + * + * Equality---Two regexps are equal if their patterns are identical, they have + * the same character set code, and their casefold? values are the + * same. + * + * /abc/ == /abc/x #=> false + * /abc/ == /abc/i #=> false + * /abc/ == /abc/n #=> false + * /abc/u == /abc/n #=> false + */ + +static VALUE +rb_reg_equal(VALUE re1, VALUE re2) +{ + if (re1 == re2) return Qtrue; + if (TYPE(re2) != T_REGEXP) return Qfalse; + rb_reg_check(re1); rb_reg_check(re2); + if (FL_TEST(re1, KCODE_FIXED) != FL_TEST(re2, KCODE_FIXED)) return Qfalse; + if (RREGEXP(re1)->ptr->options != RREGEXP(re2)->ptr->options) return Qfalse; + if (RREGEXP_SRC_LEN(re1) != RREGEXP_SRC_LEN(re2)) return Qfalse; + if (ENCODING_GET(re1) != ENCODING_GET(re2)) return Qfalse; + if (memcmp(RREGEXP_SRC_PTR(re1), RREGEXP_SRC_PTR(re2), RREGEXP_SRC_LEN(re1)) == 0) { + return Qtrue; + } + return Qfalse; +} + +static VALUE +reg_operand(VALUE s, int check) +{ + if (SYMBOL_P(s)) { + return rb_sym_to_s(s); + } + else { + VALUE tmp = rb_check_string_type(s); + if (check && NIL_P(tmp)) { + rb_raise(rb_eTypeError, "can't convert %s to String", + rb_obj_classname(s)); + } + return tmp; + } +} + +static long +reg_match_pos(VALUE re, VALUE *strp, long pos) +{ + VALUE str = *strp; + + if (NIL_P(str)) { + rb_backref_set(Qnil); + return -1; + } + *strp = str = reg_operand(str, Qtrue); + if (pos != 0) { + if (pos < 0) { + VALUE l = rb_str_length(str); + pos += NUM2INT(l); + if (pos < 0) { + return pos; + } + } + pos = rb_reg_adjust_startpos(re, str, pos, 0); + } + return rb_reg_search(re, str, pos, 0); +} + +/* + * call-seq: + * rxp =~ str => integer or nil + * + * Match---Matches rxp against str. + * + * /at/ =~ "input data" #=> 7 + * /ax/ =~ "input data" #=> nil + * + * If =~ is used with a regexp literal with named captures, + * captured strings (or nil) is assigned to local variables named by + * the capture names. + * + * /(?\w+)\s*=\s*(?\w+)/ =~ " x = y " + * p lhs #=> "x" + * p rhs #=> "y" + * + * If it is not matched, nil is assigned for the variables. + * + * /(?\w+)\s*=\s*(?\w+)/ =~ " x = " + * p lhs #=> nil + * p rhs #=> nil + * + * This assignment is implemented in the Ruby parser. + * The parser detects 'regexp-literal =~ expression' for the assignment. + * The regexp must be a literal without interpolation and placed at left hand side. + * + * The assignment is not occur if the regexp is not a literal. + * + * re = /(?\w+)\s*=\s*(?\w+)/ + * re =~ " x = y " + * p lhs # undefined local variable + * p rhs # undefined local variable + * + * A regexp interpolation, #{}, also disables + * the assignment. + * + * rhs_pat = /(?\w+)/ + * /(?\w+)\s*=\s*#{rhs_pat}/ =~ "x = y" + * p lhs # undefined local variable + * + * The assignment is not occur if the regexp is placed at right hand side. + * + * " x = y " =~ /(?\w+)\s*=\s*(?\w+)/ + * p lhs, rhs # undefined local variable + * + */ + +VALUE +rb_reg_match(VALUE re, VALUE str) +{ + long pos = reg_match_pos(re, &str, 0); + if (pos < 0) return Qnil; + pos = rb_str_sublen(str, pos); + return LONG2FIX(pos); +} + +/* + * call-seq: + * rxp === str => true or false + * + * Case Equality---Synonym for Regexp#=~ used in case statements. + * + * a = "HELLO" + * case a + * when /^[a-z]*$/; print "Lower case\n" + * when /^[A-Z]*$/; print "Upper case\n" + * else; print "Mixed case\n" + * end + * + * produces: + * + * Upper case + */ + +VALUE +rb_reg_eqq(VALUE re, VALUE str) +{ + long start; + + str = reg_operand(str, Qfalse); + if (NIL_P(str)) { + rb_backref_set(Qnil); + return Qfalse; + } + start = rb_reg_search(re, str, 0, 0); + if (start < 0) { + return Qfalse; + } + return Qtrue; +} + + +/* + * call-seq: + * ~ rxp => integer or nil + * + * Match---Matches rxp against the contents of $_. + * Equivalent to rxp =~ $_. + * + * $_ = "input data" + * ~ /at/ #=> 7 + */ + +VALUE +rb_reg_match2(VALUE re) +{ + long start; + VALUE line = rb_lastline_get(); + + if (TYPE(line) != T_STRING) { + rb_backref_set(Qnil); + return Qnil; + } + + start = rb_reg_search(re, line, 0, 0); + if (start < 0) { + return Qnil; + } + start = rb_str_sublen(line, start); + return LONG2FIX(start); +} + + +/* + * call-seq: + * rxp.match(str) => matchdata or nil + * rxp.match(str,pos) => matchdata or nil + * + * Returns a MatchData object describing the match, or + * nil if there was no match. This is equivalent to retrieving the + * value of the special variable $~ following a normal match. + * If the second parameter is present, it specifies the position in the string + * to begin the search. + * + * /(.)(.)(.)/.match("abc")[2] #=> "b" + * /(.)(.)/.match("abc", 1)[2] #=> "c" + * + * If a block is given, invoke the block with MatchData if match succeed, so + * that you can write + * + * pat.match(str) {|m| ...} + * + * instead of + * + * if m = pat.match(str) + * ... + * end + * + * The return value is a value from block execution in this case. + */ + +static VALUE +rb_reg_match_m(int argc, VALUE *argv, VALUE re) +{ + VALUE result, str, initpos; + long pos; + + if (rb_scan_args(argc, argv, "11", &str, &initpos) == 2) { + pos = NUM2LONG(initpos); + } + else { + pos = 0; + } + + pos = reg_match_pos(re, &str, pos); + if (pos < 0) { + rb_backref_set(Qnil); + return Qnil; + } + result = rb_backref_get(); + rb_match_busy(result); + if (!NIL_P(result) && rb_block_given_p()) { + return rb_yield(result); + } + return result; +} + +/* + * Document-method: compile + * + * Synonym for Regexp.new + */ + + +/* + * call-seq: + * Regexp.new(string [, options]) => regexp + * Regexp.new(regexp) => regexp + * Regexp.compile(string [, options]) => regexp + * Regexp.compile(regexp) => regexp + * + * Constructs a new regular expression from pattern, which can be either + * a String or a Regexp (in which case that regexp's + * options are propagated, and new options may not be specified (a change as of + * Ruby 1.8). If options is a Fixnum, it should be one or + * more of the constants Regexp::EXTENDED, + * Regexp::IGNORECASE, and Regexp::MULTILINE, + * or-ed together. Otherwise, if options is not + * nil, the regexp will be case insensitive. + * + * r1 = Regexp.new('^a-z+:\\s+\w+') #=> /^a-z+:\s+\w+/ + * r2 = Regexp.new('cat', true) #=> /cat/i + * r3 = Regexp.new('dog', Regexp::EXTENDED) #=> /dog/x + * r4 = Regexp.new(r2) #=> /cat/i + */ + +static VALUE +rb_reg_initialize_m(int argc, VALUE *argv, VALUE self) +{ + onig_errmsg_buffer err = ""; + int flags = 0; + VALUE str; + rb_encoding *enc; + const char *ptr; + long len; + + if (argc == 0 || argc > 3) { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + if (TYPE(argv[0]) == T_REGEXP) { + VALUE re = argv[0]; + + if (argc > 1) { + rb_warn("flags ignored"); + } + rb_reg_check(re); + flags = rb_reg_options(re); + ptr = RREGEXP_SRC_PTR(re); + len = RREGEXP_SRC_LEN(re); + enc = rb_enc_get(re); + if (rb_reg_initialize(self, ptr, len, enc, flags, err)) { + str = rb_enc_str_new(ptr, len, enc); + rb_reg_raise_str(str, flags, err); + } + } + else { + if (argc >= 2) { + if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]); + else if (RTEST(argv[1])) flags = ONIG_OPTION_IGNORECASE; + } + enc = 0; + if (argc == 3 && !NIL_P(argv[2])) { + char *kcode = StringValuePtr(argv[2]); + if (kcode[0] == 'n' || kcode[1] == 'N') { + enc = rb_ascii8bit_encoding(); + flags |= ARG_ENCODING_NONE; + } + else { + rb_warn("encoding option is ignored - %s", kcode); + } + } + str = argv[0]; + ptr = StringValuePtr(str); + if (enc + ? rb_reg_initialize(self, ptr, RSTRING_LEN(str), enc, flags, err) + : rb_reg_initialize_str(self, str, flags, err)) { + rb_reg_raise_str(str, flags, err); + } + } + return self; +} + +VALUE +rb_reg_quote(VALUE str) +{ + rb_encoding *enc = rb_enc_get(str); + char *s, *send, *t; + VALUE tmp; + int c, clen; + int ascii_only = rb_enc_str_asciionly_p(str); + + s = RSTRING_PTR(str); + send = s + RSTRING_LEN(str); + while (s < send) { + c = rb_enc_ascget(s, send, &clen, enc); + if (c == -1) { + s += mbclen(s, send, enc); + continue; + } + switch (c) { + case '[': case ']': case '{': case '}': + case '(': case ')': case '|': case '-': + case '*': case '.': case '\\': + case '?': case '+': case '^': case '$': + case ' ': case '#': + case '\t': case '\f': case '\v': case '\n': case '\r': + goto meta_found; + } + s += clen; + } + tmp = rb_str_new3(str); + if (ascii_only) { + rb_enc_associate(tmp, rb_usascii_encoding()); + } + return tmp; + + meta_found: + tmp = rb_str_new(0, RSTRING_LEN(str)*2); + if (ascii_only) { + rb_enc_associate(tmp, rb_usascii_encoding()); + } + else { + rb_enc_copy(tmp, str); + } + t = RSTRING_PTR(tmp); + /* copy upto metacharacter */ + memcpy(t, RSTRING_PTR(str), s - RSTRING_PTR(str)); + t += s - RSTRING_PTR(str); + + while (s < send) { + c = rb_enc_ascget(s, send, &clen, enc); + if (c == -1) { + int n = mbclen(s, send, enc); + + while (n--) + *t++ = *s++; + continue; + } + s += clen; + switch (c) { + case '[': case ']': case '{': case '}': + case '(': case ')': case '|': case '-': + case '*': case '.': case '\\': + case '?': case '+': case '^': case '$': + case '#': + t += rb_enc_mbcput('\\', t, enc); + break; + case ' ': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput(' ', t, enc); + continue; + case '\t': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput('t', t, enc); + continue; + case '\n': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput('n', t, enc); + continue; + case '\r': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput('r', t, enc); + continue; + case '\f': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput('f', t, enc); + continue; + case '\v': + t += rb_enc_mbcput('\\', t, enc); + t += rb_enc_mbcput('v', t, enc); + continue; + } + t += rb_enc_mbcput(c, t, enc); + } + rb_str_resize(tmp, t - RSTRING_PTR(tmp)); + OBJ_INFECT(tmp, str); + return tmp; +} + + +/* + * call-seq: + * Regexp.escape(str) => string + * Regexp.quote(str) => string + * + * Escapes any characters that would have special meaning in a regular + * expression. Returns a new escaped string, or self if no characters are + * escaped. For any string, + * Regexp.new(Regexp.escape(str))=~str will be true. + * + * Regexp.escape('\*?{}.') #=> \\\*\?\{\}\. + * + */ + +static VALUE +rb_reg_s_quote(VALUE c, VALUE str) +{ + return rb_reg_quote(reg_operand(str, Qtrue)); +} + +int +rb_reg_options(VALUE re) +{ + int options; + + rb_reg_check(re); + options = RREGEXP(re)->ptr->options & ARG_REG_OPTION_MASK; + if (RBASIC(re)->flags & KCODE_FIXED) options |= ARG_ENCODING_FIXED; + if (RBASIC(re)->flags & REG_ENCODING_NONE) options |= ARG_ENCODING_NONE; + return options; +} + +VALUE +rb_check_regexp_type(VALUE re) +{ + return rb_check_convert_type(re, T_REGEXP, "Regexp", "to_regexp"); +} + +/* + * call-seq: + * Regexp.try_convert(obj) -> re or nil + * + * Try to convert obj into a Regexp, using to_regexp method. + * Returns converted regexp or nil if obj cannot be converted + * for any reason. + * + * Regexp.try_convert(/re/) #=> /re/ + * Regexp.try_convert("re") #=> nil + * + * o = Object.new + * Regexp.try_convert(o) #=> nil + * def o.to_regexp() /foo/ end + * Regexp.try_convert(o) #=> /foo/ + * + */ +static VALUE +rb_reg_s_try_convert(VALUE dummy, VALUE re) +{ + return rb_check_regexp_type(re); +} + +static VALUE +rb_reg_s_union(VALUE self, VALUE args0) +{ + long argc = RARRAY_LEN(args0); + + if (argc == 0) { + VALUE args[1]; + args[0] = rb_str_new2("(?!)"); + return rb_class_new_instance(1, args, rb_cRegexp); + } + else if (argc == 1) { + VALUE arg = rb_ary_entry(args0, 0); + VALUE re = rb_check_regexp_type(arg); + if (!NIL_P(re)) + return re; + else { + VALUE quoted; + quoted = rb_reg_s_quote(Qnil, arg); + return rb_reg_new_str(quoted, 0); + } + } + else { + int i; + VALUE source = rb_str_buf_new(0); + rb_encoding *result_enc; + + int has_asciionly = 0; + rb_encoding *has_ascii_compat_fixed = 0; + rb_encoding *has_ascii_incompat = 0; + + for (i = 0; i < argc; i++) { + volatile VALUE v; + VALUE e = rb_ary_entry(args0, i); + + if (0 < i) + rb_str_buf_cat_ascii(source, "|"); + + v = rb_check_regexp_type(e); + if (!NIL_P(v)) { + rb_encoding *enc = rb_enc_get(v); + if (!rb_enc_asciicompat(enc)) { + if (!has_ascii_incompat) + has_ascii_incompat = enc; + else if (has_ascii_incompat != enc) + rb_raise(rb_eArgError, "incompatible encodings: %s and %s", + rb_enc_name(has_ascii_incompat), rb_enc_name(enc)); + } + else if (rb_reg_fixed_encoding_p(v)) { + if (!has_ascii_compat_fixed) + has_ascii_compat_fixed = enc; + else if (has_ascii_compat_fixed != enc) + rb_raise(rb_eArgError, "incompatible encodings: %s and %s", + rb_enc_name(has_ascii_compat_fixed), rb_enc_name(enc)); + } + else { + has_asciionly = 1; + } + v = rb_reg_to_s(v); + } + else { + rb_encoding *enc; + StringValue(e); + enc = rb_enc_get(e); + if (!rb_enc_str_asciicompat_p(e)) { + if (!has_ascii_incompat) + has_ascii_incompat = enc; + else if (has_ascii_incompat != enc) + rb_raise(rb_eArgError, "incompatible encodings: %s and %s", + rb_enc_name(has_ascii_incompat), rb_enc_name(enc)); + } + else if (rb_enc_str_asciionly_p(e)) { + has_asciionly = 1; + } + else { + if (!has_ascii_compat_fixed) + has_ascii_compat_fixed = enc; + else if (has_ascii_compat_fixed != enc) + rb_raise(rb_eArgError, "incompatible encodings: %s and %s", + rb_enc_name(has_ascii_compat_fixed), rb_enc_name(enc)); + } + v = rb_reg_s_quote(Qnil, e); + } + if (has_ascii_incompat) { + if (has_asciionly) { + rb_raise(rb_eArgError, "ASCII incompatible encoding: %s", + rb_enc_name(has_ascii_incompat)); + } + if (has_ascii_compat_fixed) { + rb_raise(rb_eArgError, "incompatible encodings: %s and %s", + rb_enc_name(has_ascii_incompat), rb_enc_name(has_ascii_compat_fixed)); + } + } + + if (i == 0) { + rb_enc_copy(source, v); + } + rb_str_append(source, v); + } + + if (has_ascii_incompat) { + result_enc = has_ascii_incompat; + } + else if (has_ascii_compat_fixed) { + result_enc = has_ascii_compat_fixed; + } + else { + result_enc = rb_ascii8bit_encoding(); + } + + rb_enc_associate(source, result_enc); + return rb_class_new_instance(1, &source, rb_cRegexp); + } +} + +/* + * call-seq: + * Regexp.union(pat1, pat2, ...) => new_regexp + * Regexp.union(pats_ary) => new_regexp + * + * Return a Regexp object that is the union of the given + * patterns, i.e., will match any of its parts. The patterns + * can be Regexp objects, in which case their options will be preserved, or + * Strings. If no patterns are given, returns /(?!)/. + * + * Regexp.union #=> /(?!)/ + * Regexp.union("penzance") #=> /penzance/ + * Regexp.union("a+b*c") #=> /a\+b\*c/ + * Regexp.union("skiing", "sledding") #=> /skiing|sledding/ + * Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ + * Regexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/ + */ +static VALUE +rb_reg_s_union_m(VALUE self, VALUE args) +{ + VALUE v; + if (RARRAY_LEN(args) == 1 && + !NIL_P(v = rb_check_array_type(rb_ary_entry(args, 0)))) { + return rb_reg_s_union(self, v); + } + return rb_reg_s_union(self, args); +} + +/* :nodoc: */ +static VALUE +rb_reg_init_copy(VALUE copy, VALUE re) +{ + onig_errmsg_buffer err = ""; + const char *s; + long len; + + if (copy == re) return copy; + rb_check_frozen(copy); + /* need better argument type check */ + if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) { + rb_raise(rb_eTypeError, "wrong argument type"); + } + rb_reg_check(re); + s = RREGEXP_SRC_PTR(re); + len = RREGEXP_SRC_LEN(re); + if (rb_reg_initialize(copy, s, len, rb_enc_get(re), rb_reg_options(re), err) != 0) { + rb_reg_raise(s, len, err, re); + } + return copy; +} + +VALUE +rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp) +{ + VALUE val = 0; + char *p, *s, *e; + int no, clen; + rb_encoding *str_enc = rb_enc_get(str); + rb_encoding *src_enc = rb_enc_get(src); + int acompat = rb_enc_asciicompat(str_enc); +#define ASCGET(s,e,cl) (acompat ? (*cl=1,ISASCII(s[0])?s[0]:-1) : rb_enc_ascget(s, e, cl, str_enc)) + + p = s = RSTRING_PTR(str); + e = s + RSTRING_LEN(str); + + while (s < e) { + int c = ASCGET(s, e, &clen); + char *ss; + + if (c == -1) { + s += mbclen(s, e, str_enc); + continue; + } + ss = s; + s += clen; + + if (c != '\\' || s == e) continue; + + if (!val) { + val = rb_str_buf_new(ss-p); + } + rb_enc_str_buf_cat(val, p, ss-p, str_enc); + + c = ASCGET(s, e, &clen); + if (c == -1) { + s += mbclen(s, e, str_enc); + rb_enc_str_buf_cat(val, ss, s-ss, str_enc); + p = s; + continue; + } + s += clen; + + p = s; + switch (c) { + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (onig_noname_group_capture_is_active(RREGEXP(regexp)->ptr)) { + no = c - '0'; + } + else { + continue; + } + break; + + case 'k': + if (s < e && ASCGET(s, e, &clen) == '<') { + char *name, *name_end; + + name_end = name = s + clen; + while (name_end < e) { + c = ASCGET(name_end, e, &clen); + if (c == '>') break; + name_end += c == -1 ? mbclen(name_end, e, str_enc) : clen; + } + if (name_end < e) { + no = name_to_backref_number(regs, regexp, name, name_end); + p = s = name_end + clen; + break; + } + else { + rb_raise(rb_eRuntimeError, "invalid group name reference format"); + } + } + + rb_enc_str_buf_cat(val, ss, s-ss, str_enc); + continue; + + case '0': + case '&': + no = 0; + break; + + case '`': + rb_enc_str_buf_cat(val, RSTRING_PTR(src), BEG(0), src_enc); + continue; + + case '\'': + rb_enc_str_buf_cat(val, RSTRING_PTR(src)+END(0), RSTRING_LEN(src)-END(0), src_enc); + continue; + + case '+': + no = regs->num_regs-1; + while (BEG(no) == -1 && no > 0) no--; + if (no == 0) continue; + break; + + case '\\': + rb_enc_str_buf_cat(val, s-clen, clen, str_enc); + continue; + + default: + rb_enc_str_buf_cat(val, ss, s-ss, str_enc); + continue; + } + + if (no >= 0) { + if (no >= regs->num_regs) continue; + if (BEG(no) == -1) continue; + rb_enc_str_buf_cat(val, RSTRING_PTR(src)+BEG(no), END(no)-BEG(no), src_enc); + } + } + + if (!val) return str; + if (p < e) { + rb_enc_str_buf_cat(val, p, e-p, str_enc); + } + + return val; +} + +static VALUE +kcode_getter(void) +{ + rb_warn("variable $KCODE is no longer effective"); + return Qnil; +} + +static void +kcode_setter(VALUE val, ID id) +{ + rb_warn("variable $KCODE is no longer effective; ignored"); +} + +static VALUE +ignorecase_getter(void) +{ + rb_warn("variable $= is no longer effective"); + return Qfalse; +} + +static void +ignorecase_setter(VALUE val, ID id) +{ + rb_warn("variable $= is no longer effective; ignored"); +} + +static VALUE +match_getter(void) +{ + VALUE match = rb_backref_get(); + + if (NIL_P(match)) return Qnil; + rb_match_busy(match); + return match; +} + +static void +match_setter(VALUE val) +{ + if (!NIL_P(val)) { + Check_Type(val, T_MATCH); + } + rb_backref_set(val); +} + +/* + * call-seq: + * Regexp.last_match => matchdata + * Regexp.last_match(n) => str + * + * The first form returns the MatchData object generated by the + * last successful pattern match. Equivalent to reading the global variable + * $~. The second form returns the nth field in this + * MatchData object. + * n can be a string or symbol to reference a named capture. + * + * /c(.)t/ =~ 'cat' #=> 0 + * Regexp.last_match #=> # + * Regexp.last_match(0) #=> "cat" + * Regexp.last_match(1) #=> "a" + * Regexp.last_match(2) #=> nil + * + * /(?\w+)\s*=\s*(?\w+)/ =~ "var = val" + * Regexp.last_match #=> # + * Regexp.last_match(:lhs) #=> "var" + * Regexp.last_match(:rhs) #=> "val" + */ + +static VALUE +rb_reg_s_last_match(int argc, VALUE *argv) +{ + VALUE nth; + + if (argc > 0 && rb_scan_args(argc, argv, "01", &nth) == 1) { + VALUE match = rb_backref_get(); + int n; + if (NIL_P(match)) return Qnil; + n = match_backref_number(match, nth); + return rb_reg_nth_match(n, match); + } + return match_getter(); +} + +static void +re_warn(const char *s) +{ + rb_warn("%s", s); +} + +/* + * Document-class: Regexp + * + * A Regexp holds a regular expression, used to match a pattern + * against strings. Regexps are created using the /.../ and + * %r{...} literals, and by the Regexp::new + * constructor. + * + */ + +void +Init_Regexp(void) +{ + rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError); + + onigenc_set_default_caseconv_table((UChar*)casetable); + onigenc_set_default_encoding(ONIG_ENCODING_ASCII); + onig_set_warn_func(re_warn); + onig_set_verb_warn_func(re_warn); + + rb_define_virtual_variable("$~", match_getter, match_setter); + rb_define_virtual_variable("$&", last_match_getter, 0); + rb_define_virtual_variable("$`", prematch_getter, 0); + rb_define_virtual_variable("$'", postmatch_getter, 0); + rb_define_virtual_variable("$+", last_paren_match_getter, 0); + + rb_define_virtual_variable("$=", ignorecase_getter, ignorecase_setter); + rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter); + rb_define_virtual_variable("$-K", kcode_getter, kcode_setter); + + rb_cRegexp = rb_define_class("Regexp", rb_cObject); + rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc); + rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1); + rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, 1); + rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, 1); + rb_define_singleton_method(rb_cRegexp, "union", rb_reg_s_union_m, -2); + rb_define_singleton_method(rb_cRegexp, "last_match", rb_reg_s_last_match, -1); + rb_define_singleton_method(rb_cRegexp, "try_convert", rb_reg_s_try_convert, 1); + + rb_define_method(rb_cRegexp, "initialize", rb_reg_initialize_m, -1); + rb_define_method(rb_cRegexp, "initialize_copy", rb_reg_init_copy, 1); + rb_define_method(rb_cRegexp, "hash", rb_reg_hash, 0); + rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1); + rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1); + rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1); + rb_define_method(rb_cRegexp, "===", rb_reg_eqq, 1); + rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0); + rb_define_method(rb_cRegexp, "match", rb_reg_match_m, -1); + rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0); + rb_define_method(rb_cRegexp, "inspect", rb_reg_inspect, 0); + rb_define_method(rb_cRegexp, "source", rb_reg_source, 0); + rb_define_method(rb_cRegexp, "casefold?", rb_reg_casefold_p, 0); + rb_define_method(rb_cRegexp, "options", rb_reg_options_m, 0); + rb_define_method(rb_cRegexp, "encoding", rb_obj_encoding, 0); /* in encoding.c */ + rb_define_method(rb_cRegexp, "fixed_encoding?", rb_reg_fixed_encoding_p, 0); + rb_define_method(rb_cRegexp, "names", rb_reg_names, 0); + rb_define_method(rb_cRegexp, "named_captures", rb_reg_named_captures, 0); + + rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(ONIG_OPTION_IGNORECASE)); + rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(ONIG_OPTION_EXTEND)); + rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(ONIG_OPTION_MULTILINE)); + + rb_global_variable(®_cache); + + rb_cMatch = rb_define_class("MatchData", rb_cObject); + rb_define_alloc_func(rb_cMatch, match_alloc); + rb_undef_method(CLASS_OF(rb_cMatch), "new"); + + rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1); + rb_define_method(rb_cMatch, "regexp", match_regexp, 0); + rb_define_method(rb_cMatch, "names", match_names, 0); + rb_define_method(rb_cMatch, "size", match_size, 0); + rb_define_method(rb_cMatch, "length", match_size, 0); + rb_define_method(rb_cMatch, "offset", match_offset, 1); + rb_define_method(rb_cMatch, "begin", match_begin, 1); + rb_define_method(rb_cMatch, "end", match_end, 1); + rb_define_method(rb_cMatch, "to_a", match_to_a, 0); + rb_define_method(rb_cMatch, "[]", match_aref, -1); + rb_define_method(rb_cMatch, "captures", match_captures, 0); + rb_define_method(rb_cMatch, "values_at", match_values_at, -1); + rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0); + rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0); + rb_define_method(rb_cMatch, "to_s", match_to_s, 0); + rb_define_method(rb_cMatch, "inspect", match_inspect, 0); + rb_define_method(rb_cMatch, "string", match_string, 0); +} diff --git a/lib/ruby-1.9.1-rc1/regcomp.c b/lib/ruby-1.9.1-rc1/regcomp.c new file mode 100644 index 0000000..cb54c44 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regcomp.c @@ -0,0 +1,6311 @@ +/********************************************************************** + regcomp.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regparse.h" + +OnigCaseFoldType OnigDefaultCaseFoldFlag = ONIGENC_CASE_FOLD_MIN; + +extern OnigCaseFoldType +onig_get_default_case_fold_flag(void) +{ + return OnigDefaultCaseFoldFlag; +} + +extern int +onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag) +{ + OnigDefaultCaseFoldFlag = case_fold_flag; + return 0; +} + + +#ifndef PLATFORM_UNALIGNED_WORD_ACCESS +static unsigned char PadBuf[WORD_ALIGNMENT_SIZE]; +#endif + +static UChar* +str_dup(UChar* s, UChar* end) +{ + int len = end - s; + + if (len > 0) { + UChar* r = (UChar* )xmalloc(len + 1); + CHECK_NULL_RETURN(r); + xmemcpy(r, s, len); + r[len] = (UChar )0; + return r; + } + else return NULL; +} + +static void +swap_node(Node* a, Node* b) +{ + Node c; + c = *a; *a = *b; *b = c; + + if (NTYPE(a) == NT_STR) { + StrNode* sn = NSTR(a); + if (sn->capa == 0) { + int len = sn->end - sn->s; + sn->s = sn->buf; + sn->end = sn->s + len; + } + } + + if (NTYPE(b) == NT_STR) { + StrNode* sn = NSTR(b); + if (sn->capa == 0) { + int len = sn->end - sn->s; + sn->s = sn->buf; + sn->end = sn->s + len; + } + } +} + +static OnigDistance +distance_add(OnigDistance d1, OnigDistance d2) +{ + if (d1 == ONIG_INFINITE_DISTANCE || d2 == ONIG_INFINITE_DISTANCE) + return ONIG_INFINITE_DISTANCE; + else { + if (d1 <= ONIG_INFINITE_DISTANCE - d2) return d1 + d2; + else return ONIG_INFINITE_DISTANCE; + } +} + +static OnigDistance +distance_multiply(OnigDistance d, int m) +{ + if (m == 0) return 0; + + if (d < ONIG_INFINITE_DISTANCE / m) + return d * m; + else + return ONIG_INFINITE_DISTANCE; +} + +static int +bitset_is_empty(BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { + if (bs[i] != 0) return 0; + } + return 1; +} + +#ifdef ONIG_DEBUG +static int +bitset_on_num(BitSetRef bs) +{ + int i, n; + + n = 0; + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (BITSET_AT(bs, i)) n++; + } + return n; +} +#endif + +extern int +onig_bbuf_init(BBuf* buf, int size) +{ + if (size <= 0) { + size = 0; + buf->p = NULL; + } + else { + buf->p = (UChar* )xmalloc(size); + if (IS_NULL(buf->p)) return(ONIGERR_MEMORY); + } + + buf->alloc = size; + buf->used = 0; + return 0; +} + + +#ifdef USE_SUBEXP_CALL + +static int +unset_addr_list_init(UnsetAddrList* uslist, int size) +{ + UnsetAddr* p; + + p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size); + CHECK_NULL_RETURN_MEMERR(p); + uslist->num = 0; + uslist->alloc = size; + uslist->us = p; + return 0; +} + +static void +unset_addr_list_end(UnsetAddrList* uslist) +{ + if (IS_NOT_NULL(uslist->us)) + xfree(uslist->us); +} + +static int +unset_addr_list_add(UnsetAddrList* uslist, int offset, struct _Node* node) +{ + UnsetAddr* p; + int size; + + if (uslist->num >= uslist->alloc) { + size = uslist->alloc * 2; + p = (UnsetAddr* )xrealloc(uslist->us, sizeof(UnsetAddr) * size); + CHECK_NULL_RETURN_MEMERR(p); + uslist->alloc = size; + uslist->us = p; + } + + uslist->us[uslist->num].offset = offset; + uslist->us[uslist->num].target = node; + uslist->num++; + return 0; +} +#endif /* USE_SUBEXP_CALL */ + + +static int +add_opcode(regex_t* reg, int opcode) +{ + BBUF_ADD1(reg, opcode); + return 0; +} + +#ifdef USE_COMBINATION_EXPLOSION_CHECK +static int +add_state_check_num(regex_t* reg, int num) +{ + StateCheckNumType n = (StateCheckNumType )num; + + BBUF_ADD(reg, &n, SIZE_STATE_CHECK_NUM); + return 0; +} +#endif + +static int +add_rel_addr(regex_t* reg, int addr) +{ + RelAddrType ra = (RelAddrType )addr; + + BBUF_ADD(reg, &ra, SIZE_RELADDR); + return 0; +} + +static int +add_abs_addr(regex_t* reg, int addr) +{ + AbsAddrType ra = (AbsAddrType )addr; + + BBUF_ADD(reg, &ra, SIZE_ABSADDR); + return 0; +} + +static int +add_length(regex_t* reg, int len) +{ + LengthType l = (LengthType )len; + + BBUF_ADD(reg, &l, SIZE_LENGTH); + return 0; +} + +static int +add_mem_num(regex_t* reg, int num) +{ + MemNumType n = (MemNumType )num; + + BBUF_ADD(reg, &n, SIZE_MEMNUM); + return 0; +} + +static int +add_pointer(regex_t* reg, void* addr) +{ + PointerType ptr = (PointerType )addr; + + BBUF_ADD(reg, &ptr, SIZE_POINTER); + return 0; +} + +static int +add_option(regex_t* reg, OnigOptionType option) +{ + BBUF_ADD(reg, &option, SIZE_OPTION); + return 0; +} + +static int +add_opcode_rel_addr(regex_t* reg, int opcode, int addr) +{ + int r; + + r = add_opcode(reg, opcode); + if (r) return r; + r = add_rel_addr(reg, addr); + return r; +} + +static int +add_bytes(regex_t* reg, UChar* bytes, int len) +{ + BBUF_ADD(reg, bytes, len); + return 0; +} + +static int +add_bitset(regex_t* reg, BitSetRef bs) +{ + BBUF_ADD(reg, bs, SIZE_BITSET); + return 0; +} + +static int +add_opcode_option(regex_t* reg, int opcode, OnigOptionType option) +{ + int r; + + r = add_opcode(reg, opcode); + if (r) return r; + r = add_option(reg, option); + return r; +} + +static int compile_length_tree(Node* node, regex_t* reg); +static int compile_tree(Node* node, regex_t* reg); + + +#define IS_NEED_STR_LEN_OP_EXACT(op) \ + ((op) == OP_EXACTN || (op) == OP_EXACTMB2N ||\ + (op) == OP_EXACTMB3N || (op) == OP_EXACTMBN || (op) == OP_EXACTN_IC) + +static int +select_str_opcode(int mb_len, int str_len, int ignore_case) +{ + int op; + + if (ignore_case) { + switch (str_len) { + case 1: op = OP_EXACT1_IC; break; + default: op = OP_EXACTN_IC; break; + } + } + else { + switch (mb_len) { + case 1: + switch (str_len) { + case 1: op = OP_EXACT1; break; + case 2: op = OP_EXACT2; break; + case 3: op = OP_EXACT3; break; + case 4: op = OP_EXACT4; break; + case 5: op = OP_EXACT5; break; + default: op = OP_EXACTN; break; + } + break; + + case 2: + switch (str_len) { + case 1: op = OP_EXACTMB2N1; break; + case 2: op = OP_EXACTMB2N2; break; + case 3: op = OP_EXACTMB2N3; break; + default: op = OP_EXACTMB2N; break; + } + break; + + case 3: + op = OP_EXACTMB3N; + break; + + default: + op = OP_EXACTMBN; + break; + } + } + return op; +} + +static int +compile_tree_empty_check(Node* node, regex_t* reg, int empty_info) +{ + int r; + int saved_num_null_check = reg->num_null_check; + + if (empty_info != 0) { + r = add_opcode(reg, OP_NULL_CHECK_START); + if (r) return r; + r = add_mem_num(reg, reg->num_null_check); /* NULL CHECK ID */ + if (r) return r; + reg->num_null_check++; + } + + r = compile_tree(node, reg); + if (r) return r; + + if (empty_info != 0) { + if (empty_info == NQ_TARGET_IS_EMPTY) + r = add_opcode(reg, OP_NULL_CHECK_END); + else if (empty_info == NQ_TARGET_IS_EMPTY_MEM) + r = add_opcode(reg, OP_NULL_CHECK_END_MEMST); + else if (empty_info == NQ_TARGET_IS_EMPTY_REC) + r = add_opcode(reg, OP_NULL_CHECK_END_MEMST_PUSH); + + if (r) return r; + r = add_mem_num(reg, saved_num_null_check); /* NULL CHECK ID */ + } + return r; +} + +#ifdef USE_SUBEXP_CALL +static int +compile_call(CallNode* node, regex_t* reg) +{ + int r; + + r = add_opcode(reg, OP_CALL); + if (r) return r; + r = unset_addr_list_add(node->unset_addr_list, BBUF_GET_OFFSET_POS(reg), + node->target); + if (r) return r; + r = add_abs_addr(reg, 0 /*dummy addr.*/); + return r; +} +#endif + +static int +compile_tree_n_times(Node* node, int n, regex_t* reg) +{ + int i, r; + + for (i = 0; i < n; i++) { + r = compile_tree(node, reg); + if (r) return r; + } + return 0; +} + +static int +add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len, + regex_t* reg ARG_UNUSED, int ignore_case) +{ + int len; + int op = select_str_opcode(mb_len, str_len, ignore_case); + + len = SIZE_OPCODE; + + if (op == OP_EXACTMBN) len += SIZE_LENGTH; + if (IS_NEED_STR_LEN_OP_EXACT(op)) + len += SIZE_LENGTH; + + len += mb_len * str_len; + return len; +} + +static int +add_compile_string(UChar* s, int mb_len, int str_len, + regex_t* reg, int ignore_case) +{ + int op = select_str_opcode(mb_len, str_len, ignore_case); + add_opcode(reg, op); + + if (op == OP_EXACTMBN) + add_length(reg, mb_len); + + if (IS_NEED_STR_LEN_OP_EXACT(op)) { + if (op == OP_EXACTN_IC) + add_length(reg, mb_len * str_len); + else + add_length(reg, str_len); + } + + add_bytes(reg, s, mb_len * str_len); + return 0; +} + + +static int +compile_length_string_node(Node* node, regex_t* reg) +{ + int rlen, r, len, prev_len, slen, ambig; + OnigEncoding enc = reg->enc; + UChar *p, *prev; + StrNode* sn; + + sn = NSTR(node); + if (sn->end <= sn->s) + return 0; + + ambig = NSTRING_IS_AMBIG(node); + + p = prev = sn->s; + prev_len = enclen(enc, p, sn->end); + p += prev_len; + slen = 1; + rlen = 0; + + for (; p < sn->end; ) { + len = enclen(enc, p, sn->end); + if (len == prev_len) { + slen++; + } + else { + r = add_compile_string_length(prev, prev_len, slen, reg, ambig); + rlen += r; + prev = p; + slen = 1; + prev_len = len; + } + p += len; + } + r = add_compile_string_length(prev, prev_len, slen, reg, ambig); + rlen += r; + return rlen; +} + +static int +compile_length_string_raw_node(StrNode* sn, regex_t* reg) +{ + if (sn->end <= sn->s) + return 0; + + return add_compile_string_length(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0); +} + +static int +compile_string_node(Node* node, regex_t* reg) +{ + int r, len, prev_len, slen, ambig; + OnigEncoding enc = reg->enc; + UChar *p, *prev, *end; + StrNode* sn; + + sn = NSTR(node); + if (sn->end <= sn->s) + return 0; + + end = sn->end; + ambig = NSTRING_IS_AMBIG(node); + + p = prev = sn->s; + prev_len = enclen(enc, p, end); + p += prev_len; + slen = 1; + + for (; p < end; ) { + len = enclen(enc, p, end); + if (len == prev_len) { + slen++; + } + else { + r = add_compile_string(prev, prev_len, slen, reg, ambig); + if (r) return r; + + prev = p; + slen = 1; + prev_len = len; + } + + p += len; + } + return add_compile_string(prev, prev_len, slen, reg, ambig); +} + +static int +compile_string_raw_node(StrNode* sn, regex_t* reg) +{ + if (sn->end <= sn->s) + return 0; + + return add_compile_string(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0); +} + +static int +add_multi_byte_cclass(BBuf* mbuf, regex_t* reg) +{ +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS + add_length(reg, mbuf->used); + return add_bytes(reg, mbuf->p, mbuf->used); +#else + int r, pad_size; + UChar* p = BBUF_GET_ADD_ADDRESS(reg) + SIZE_LENGTH; + + GET_ALIGNMENT_PAD_SIZE(p, pad_size); + add_length(reg, mbuf->used + (WORD_ALIGNMENT_SIZE - 1)); + if (pad_size != 0) add_bytes(reg, PadBuf, pad_size); + + r = add_bytes(reg, mbuf->p, mbuf->used); + + /* padding for return value from compile_length_cclass_node() to be fix. */ + pad_size = (WORD_ALIGNMENT_SIZE - 1) - pad_size; + if (pad_size != 0) add_bytes(reg, PadBuf, pad_size); + return r; +#endif +} + +static int +compile_length_cclass_node(CClassNode* cc, regex_t* reg) +{ + int len; + + if (IS_NCCLASS_SHARE(cc)) { + len = SIZE_OPCODE + SIZE_POINTER; + return len; + } + + if (IS_NULL(cc->mbuf)) { + len = SIZE_OPCODE + SIZE_BITSET; + } + else { + if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) { + len = SIZE_OPCODE; + } + else { + len = SIZE_OPCODE + SIZE_BITSET; + } +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS + len += SIZE_LENGTH + cc->mbuf->used; +#else + len += SIZE_LENGTH + cc->mbuf->used + (WORD_ALIGNMENT_SIZE - 1); +#endif + } + + return len; +} + +static int +compile_cclass_node(CClassNode* cc, regex_t* reg) +{ + int r; + + if (IS_NCCLASS_SHARE(cc)) { + add_opcode(reg, OP_CCLASS_NODE); + r = add_pointer(reg, cc); + return r; + } + + if (IS_NULL(cc->mbuf)) { + if (IS_NCCLASS_NOT(cc)) + add_opcode(reg, OP_CCLASS_NOT); + else + add_opcode(reg, OP_CCLASS); + + r = add_bitset(reg, cc->bs); + } + else { + if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) { + if (IS_NCCLASS_NOT(cc)) + add_opcode(reg, OP_CCLASS_MB_NOT); + else + add_opcode(reg, OP_CCLASS_MB); + + r = add_multi_byte_cclass(cc->mbuf, reg); + } + else { + if (IS_NCCLASS_NOT(cc)) + add_opcode(reg, OP_CCLASS_MIX_NOT); + else + add_opcode(reg, OP_CCLASS_MIX); + + r = add_bitset(reg, cc->bs); + if (r) return r; + r = add_multi_byte_cclass(cc->mbuf, reg); + } + } + + return r; +} + +static int +entry_repeat_range(regex_t* reg, int id, int lower, int upper) +{ +#define REPEAT_RANGE_ALLOC 4 + + OnigRepeatRange* p; + + if (reg->repeat_range_alloc == 0) { + p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC); + CHECK_NULL_RETURN_MEMERR(p); + reg->repeat_range = p; + reg->repeat_range_alloc = REPEAT_RANGE_ALLOC; + } + else if (reg->repeat_range_alloc <= id) { + int n; + n = reg->repeat_range_alloc + REPEAT_RANGE_ALLOC; + p = (OnigRepeatRange* )xrealloc(reg->repeat_range, + sizeof(OnigRepeatRange) * n); + CHECK_NULL_RETURN_MEMERR(p); + reg->repeat_range = p; + reg->repeat_range_alloc = n; + } + else { + p = reg->repeat_range; + } + + p[id].lower = lower; + p[id].upper = (IS_REPEAT_INFINITE(upper) ? 0x7fffffff : upper); + return 0; +} + +static int +compile_range_repeat_node(QtfrNode* qn, int target_len, int empty_info, + regex_t* reg) +{ + int r; + int num_repeat = reg->num_repeat; + + r = add_opcode(reg, qn->greedy ? OP_REPEAT : OP_REPEAT_NG); + if (r) return r; + r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */ + reg->num_repeat++; + if (r) return r; + r = add_rel_addr(reg, target_len + SIZE_OP_REPEAT_INC); + if (r) return r; + + r = entry_repeat_range(reg, num_repeat, qn->lower, qn->upper); + if (r) return r; + + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + + if ( +#ifdef USE_SUBEXP_CALL + reg->num_call > 0 || +#endif + IS_QUANTIFIER_IN_REPEAT(qn)) { + r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC_SG : OP_REPEAT_INC_NG_SG); + } + else { + r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC : OP_REPEAT_INC_NG); + } + if (r) return r; + r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */ + return r; +} + +static int +is_anychar_star_quantifier(QtfrNode* qn) +{ + if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) && + NTYPE(qn->target) == NT_CANY) + return 1; + else + return 0; +} + +#define QUANTIFIER_EXPAND_LIMIT_SIZE 50 +#define CKN_ON (ckn > 0) + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + +static int +compile_length_quantifier_node(QtfrNode* qn, regex_t* reg) +{ + int len, mod_tlen, cklen; + int ckn; + int infinite = IS_REPEAT_INFINITE(qn->upper); + int empty_info = qn->target_empty_info; + int tlen = compile_length_tree(qn->target, reg); + + if (tlen < 0) return tlen; + + ckn = ((reg->num_comb_exp_check > 0) ? qn->comb_exp_check_num : 0); + + cklen = (CKN_ON ? SIZE_STATE_CHECK_NUM: 0); + + /* anychar repeat */ + if (NTYPE(qn->target) == NT_CANY) { + if (qn->greedy && infinite) { + if (IS_NOT_NULL(qn->next_head_exact) && !CKN_ON) + return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower + cklen; + else + return SIZE_OP_ANYCHAR_STAR + tlen * qn->lower + cklen; + } + } + + if (empty_info != 0) + mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END); + else + mod_tlen = tlen; + + if (infinite && qn->lower <= 1) { + if (qn->greedy) { + if (qn->lower == 1) + len = SIZE_OP_JUMP; + else + len = 0; + + len += SIZE_OP_PUSH + cklen + mod_tlen + SIZE_OP_JUMP; + } + else { + if (qn->lower == 0) + len = SIZE_OP_JUMP; + else + len = 0; + + len += mod_tlen + SIZE_OP_PUSH + cklen; + } + } + else if (qn->upper == 0) { + if (qn->is_refered != 0) /* /(?..){0}/ */ + len = SIZE_OP_JUMP + tlen; + else + len = 0; + } + else if (qn->upper == 1 && qn->greedy) { + if (qn->lower == 0) { + if (CKN_ON) { + len = SIZE_OP_STATE_CHECK_PUSH + tlen; + } + else { + len = SIZE_OP_PUSH + tlen; + } + } + else { + len = tlen; + } + } + else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + len = SIZE_OP_PUSH + cklen + SIZE_OP_JUMP + tlen; + } + else { + len = SIZE_OP_REPEAT_INC + + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM; + if (CKN_ON) + len += SIZE_OP_STATE_CHECK; + } + + return len; +} + +static int +compile_quantifier_node(QtfrNode* qn, regex_t* reg) +{ + int r, mod_tlen; + int ckn; + int infinite = IS_REPEAT_INFINITE(qn->upper); + int empty_info = qn->target_empty_info; + int tlen = compile_length_tree(qn->target, reg); + + if (tlen < 0) return tlen; + + ckn = ((reg->num_comb_exp_check > 0) ? qn->comb_exp_check_num : 0); + + if (is_anychar_star_quantifier(qn)) { + r = compile_tree_n_times(qn->target, qn->lower, reg); + if (r) return r; + if (IS_NOT_NULL(qn->next_head_exact) && !CKN_ON) { + if (IS_MULTILINE(reg->options)) + r = add_opcode(reg, OP_ANYCHAR_ML_STAR_PEEK_NEXT); + else + r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT); + if (r) return r; + if (CKN_ON) { + r = add_state_check_num(reg, ckn); + if (r) return r; + } + + return add_bytes(reg, NSTR(qn->next_head_exact)->s, 1); + } + else { + if (IS_MULTILINE(reg->options)) { + r = add_opcode(reg, (CKN_ON ? + OP_STATE_CHECK_ANYCHAR_ML_STAR + : OP_ANYCHAR_ML_STAR)); + } + else { + r = add_opcode(reg, (CKN_ON ? + OP_STATE_CHECK_ANYCHAR_STAR + : OP_ANYCHAR_STAR)); + } + if (r) return r; + if (CKN_ON) + r = add_state_check_num(reg, ckn); + + return r; + } + } + + if (empty_info != 0) + mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END); + else + mod_tlen = tlen; + + if (infinite && qn->lower <= 1) { + if (qn->greedy) { + if (qn->lower == 1) { + r = add_opcode_rel_addr(reg, OP_JUMP, + (CKN_ON ? SIZE_OP_STATE_CHECK_PUSH : SIZE_OP_PUSH)); + if (r) return r; + } + + if (CKN_ON) { + r = add_opcode(reg, OP_STATE_CHECK_PUSH); + if (r) return r; + r = add_state_check_num(reg, ckn); + if (r) return r; + r = add_rel_addr(reg, mod_tlen + SIZE_OP_JUMP); + } + else { + r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP); + } + if (r) return r; + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, + -(mod_tlen + (int )SIZE_OP_JUMP + + (int )(CKN_ON ? SIZE_OP_STATE_CHECK_PUSH : SIZE_OP_PUSH))); + } + else { + if (qn->lower == 0) { + r = add_opcode_rel_addr(reg, OP_JUMP, mod_tlen); + if (r) return r; + } + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + if (CKN_ON) { + r = add_opcode(reg, OP_STATE_CHECK_PUSH_OR_JUMP); + if (r) return r; + r = add_state_check_num(reg, ckn); + if (r) return r; + r = add_rel_addr(reg, + -(mod_tlen + (int )SIZE_OP_STATE_CHECK_PUSH_OR_JUMP)); + } + else + r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH)); + } + } + else if (qn->upper == 0) { + if (qn->is_refered != 0) { /* /(?..){0}/ */ + r = add_opcode_rel_addr(reg, OP_JUMP, tlen); + if (r) return r; + r = compile_tree(qn->target, reg); + } + else + r = 0; + } + else if (qn->upper == 1 && qn->greedy) { + if (qn->lower == 0) { + if (CKN_ON) { + r = add_opcode(reg, OP_STATE_CHECK_PUSH); + if (r) return r; + r = add_state_check_num(reg, ckn); + if (r) return r; + r = add_rel_addr(reg, tlen); + } + else { + r = add_opcode_rel_addr(reg, OP_PUSH, tlen); + } + if (r) return r; + } + + r = compile_tree(qn->target, reg); + } + else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + if (CKN_ON) { + r = add_opcode(reg, OP_STATE_CHECK_PUSH); + if (r) return r; + r = add_state_check_num(reg, ckn); + if (r) return r; + r = add_rel_addr(reg, SIZE_OP_JUMP); + } + else { + r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP); + } + + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, tlen); + if (r) return r; + r = compile_tree(qn->target, reg); + } + else { + r = compile_range_repeat_node(qn, mod_tlen, empty_info, reg); + if (CKN_ON) { + if (r) return r; + r = add_opcode(reg, OP_STATE_CHECK); + if (r) return r; + r = add_state_check_num(reg, ckn); + } + } + return r; +} + +#else /* USE_COMBINATION_EXPLOSION_CHECK */ + +static int +compile_length_quantifier_node(QtfrNode* qn, regex_t* reg) +{ + int len, mod_tlen; + int infinite = IS_REPEAT_INFINITE(qn->upper); + int empty_info = qn->target_empty_info; + int tlen = compile_length_tree(qn->target, reg); + + if (tlen < 0) return tlen; + + /* anychar repeat */ + if (NTYPE(qn->target) == NT_CANY) { + if (qn->greedy && infinite) { + if (IS_NOT_NULL(qn->next_head_exact)) + return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower; + else + return SIZE_OP_ANYCHAR_STAR + tlen * qn->lower; + } + } + + if (empty_info != 0) + mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END); + else + mod_tlen = tlen; + + if (infinite && + (qn->lower <= 1 || tlen * qn->lower <= QUANTIFIER_EXPAND_LIMIT_SIZE)) { + if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) { + len = SIZE_OP_JUMP; + } + else { + len = tlen * qn->lower; + } + + if (qn->greedy) { + if (IS_NOT_NULL(qn->head_exact)) + len += SIZE_OP_PUSH_OR_JUMP_EXACT1 + mod_tlen + SIZE_OP_JUMP; + else if (IS_NOT_NULL(qn->next_head_exact)) + len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP; + else + len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP; + } + else + len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH; + } + else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?..){0}/ */ + len = SIZE_OP_JUMP + tlen; + } + else if (!infinite && qn->greedy && + (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper + <= QUANTIFIER_EXPAND_LIMIT_SIZE)) { + len = tlen * qn->lower; + len += (SIZE_OP_PUSH + tlen) * (qn->upper - qn->lower); + } + else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen; + } + else { + len = SIZE_OP_REPEAT_INC + + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM; + } + + return len; +} + +static int +compile_quantifier_node(QtfrNode* qn, regex_t* reg) +{ + int i, r, mod_tlen; + int infinite = IS_REPEAT_INFINITE(qn->upper); + int empty_info = qn->target_empty_info; + int tlen = compile_length_tree(qn->target, reg); + + if (tlen < 0) return tlen; + + if (is_anychar_star_quantifier(qn)) { + r = compile_tree_n_times(qn->target, qn->lower, reg); + if (r) return r; + if (IS_NOT_NULL(qn->next_head_exact)) { + if (IS_MULTILINE(reg->options)) + r = add_opcode(reg, OP_ANYCHAR_ML_STAR_PEEK_NEXT); + else + r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT); + if (r) return r; + return add_bytes(reg, NSTR(qn->next_head_exact)->s, 1); + } + else { + if (IS_MULTILINE(reg->options)) + return add_opcode(reg, OP_ANYCHAR_ML_STAR); + else + return add_opcode(reg, OP_ANYCHAR_STAR); + } + } + + if (empty_info != 0) + mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END); + else + mod_tlen = tlen; + + if (infinite && + (qn->lower <= 1 || tlen * qn->lower <= QUANTIFIER_EXPAND_LIMIT_SIZE)) { + if (qn->lower == 1 && tlen > QUANTIFIER_EXPAND_LIMIT_SIZE) { + if (qn->greedy) { + if (IS_NOT_NULL(qn->head_exact)) + r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_OR_JUMP_EXACT1); + else if (IS_NOT_NULL(qn->next_head_exact)) + r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_IF_PEEK_NEXT); + else + r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH); + } + else { + r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_JUMP); + } + if (r) return r; + } + else { + r = compile_tree_n_times(qn->target, qn->lower, reg); + if (r) return r; + } + + if (qn->greedy) { + if (IS_NOT_NULL(qn->head_exact)) { + r = add_opcode_rel_addr(reg, OP_PUSH_OR_JUMP_EXACT1, + mod_tlen + SIZE_OP_JUMP); + if (r) return r; + add_bytes(reg, NSTR(qn->head_exact)->s, 1); + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, + -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_OR_JUMP_EXACT1)); + } + else if (IS_NOT_NULL(qn->next_head_exact)) { + r = add_opcode_rel_addr(reg, OP_PUSH_IF_PEEK_NEXT, + mod_tlen + SIZE_OP_JUMP); + if (r) return r; + add_bytes(reg, NSTR(qn->next_head_exact)->s, 1); + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, + -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT)); + } + else { + r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP); + if (r) return r; + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, + -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH)); + } + } + else { + r = add_opcode_rel_addr(reg, OP_JUMP, mod_tlen); + if (r) return r; + r = compile_tree_empty_check(qn->target, reg, empty_info); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH)); + } + } + else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?..){0}/ */ + r = add_opcode_rel_addr(reg, OP_JUMP, tlen); + if (r) return r; + r = compile_tree(qn->target, reg); + } + else if (!infinite && qn->greedy && + (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper + <= QUANTIFIER_EXPAND_LIMIT_SIZE)) { + int n = qn->upper - qn->lower; + + r = compile_tree_n_times(qn->target, qn->lower, reg); + if (r) return r; + + for (i = 0; i < n; i++) { + r = add_opcode_rel_addr(reg, OP_PUSH, + (n - i) * tlen + (n - i - 1) * SIZE_OP_PUSH); + if (r) return r; + r = compile_tree(qn->target, reg); + if (r) return r; + } + } + else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */ + r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, tlen); + if (r) return r; + r = compile_tree(qn->target, reg); + } + else { + r = compile_range_repeat_node(qn, mod_tlen, empty_info, reg); + } + return r; +} +#endif /* USE_COMBINATION_EXPLOSION_CHECK */ + +static int +compile_length_option_node(EncloseNode* node, regex_t* reg) +{ + int tlen; + OnigOptionType prev = reg->options; + + reg->options = node->option; + tlen = compile_length_tree(node->target, reg); + reg->options = prev; + + if (tlen < 0) return tlen; + + if (IS_DYNAMIC_OPTION(prev ^ node->option)) { + return SIZE_OP_SET_OPTION_PUSH + SIZE_OP_SET_OPTION + SIZE_OP_FAIL + + tlen + SIZE_OP_SET_OPTION; + } + else + return tlen; +} + +static int +compile_option_node(EncloseNode* node, regex_t* reg) +{ + int r; + OnigOptionType prev = reg->options; + + if (IS_DYNAMIC_OPTION(prev ^ node->option)) { + r = add_opcode_option(reg, OP_SET_OPTION_PUSH, node->option); + if (r) return r; + r = add_opcode_option(reg, OP_SET_OPTION, prev); + if (r) return r; + r = add_opcode(reg, OP_FAIL); + if (r) return r; + } + + reg->options = node->option; + r = compile_tree(node->target, reg); + reg->options = prev; + + if (IS_DYNAMIC_OPTION(prev ^ node->option)) { + if (r) return r; + r = add_opcode_option(reg, OP_SET_OPTION, prev); + } + return r; +} + +static int +compile_length_enclose_node(EncloseNode* node, regex_t* reg) +{ + int len; + int tlen; + + if (node->type == ENCLOSE_OPTION) + return compile_length_option_node(node, reg); + + if (node->target) { + tlen = compile_length_tree(node->target, reg); + if (tlen < 0) return tlen; + } + else + tlen = 0; + + switch (node->type) { + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_CALLED(node)) { + len = SIZE_OP_MEMORY_START_PUSH + tlen + + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN; + if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)) + len += (IS_ENCLOSE_RECURSION(node) + ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH); + else + len += (IS_ENCLOSE_RECURSION(node) + ? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END); + } + else +#endif + { + if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum)) + len = SIZE_OP_MEMORY_START_PUSH; + else + len = SIZE_OP_MEMORY_START; + + len += tlen + (BIT_STATUS_AT(reg->bt_mem_end, node->regnum) + ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END); + } + break; + + case ENCLOSE_STOP_BACKTRACK: + if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) { + QtfrNode* qn = NQTFR(node->target); + tlen = compile_length_tree(qn->target, reg); + if (tlen < 0) return tlen; + + len = tlen * qn->lower + + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP; + } + else { + len = SIZE_OP_PUSH_STOP_BT + tlen + SIZE_OP_POP_STOP_BT; + } + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return len; +} + +static int get_char_length_tree(Node* node, regex_t* reg, int* len); + +static int +compile_enclose_node(EncloseNode* node, regex_t* reg) +{ + int r, len; + + if (node->type == ENCLOSE_OPTION) + return compile_option_node(node, reg); + + switch (node->type) { + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_CALLED(node)) { + r = add_opcode(reg, OP_CALL); + if (r) return r; + node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP; + node->state |= NST_ADDR_FIXED; + r = add_abs_addr(reg, (int )node->call_addr); + if (r) return r; + len = compile_length_tree(node->target, reg); + len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN); + if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)) + len += (IS_ENCLOSE_RECURSION(node) + ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH); + else + len += (IS_ENCLOSE_RECURSION(node) + ? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END); + + r = add_opcode_rel_addr(reg, OP_JUMP, len); + if (r) return r; + } +#endif + if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum)) + r = add_opcode(reg, OP_MEMORY_START_PUSH); + else + r = add_opcode(reg, OP_MEMORY_START); + if (r) return r; + r = add_mem_num(reg, node->regnum); + if (r) return r; + r = compile_tree(node->target, reg); + if (r) return r; +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_CALLED(node)) { + if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)) + r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node) + ? OP_MEMORY_END_PUSH_REC : OP_MEMORY_END_PUSH)); + else + r = add_opcode(reg, (IS_ENCLOSE_RECURSION(node) + ? OP_MEMORY_END_REC : OP_MEMORY_END)); + + if (r) return r; + r = add_mem_num(reg, node->regnum); + if (r) return r; + r = add_opcode(reg, OP_RETURN); + } + else +#endif + { + if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)) + r = add_opcode(reg, OP_MEMORY_END_PUSH); + else + r = add_opcode(reg, OP_MEMORY_END); + if (r) return r; + r = add_mem_num(reg, node->regnum); + } + break; + + case ENCLOSE_STOP_BACKTRACK: + if (IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(node)) { + QtfrNode* qn = NQTFR(node->target); + r = compile_tree_n_times(qn->target, qn->lower, reg); + if (r) return r; + + len = compile_length_tree(qn->target, reg); + if (len < 0) return len; + + r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP); + if (r) return r; + r = compile_tree(qn->target, reg); + if (r) return r; + r = add_opcode(reg, OP_POP); + if (r) return r; + r = add_opcode_rel_addr(reg, OP_JUMP, + -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP)); + } + else { + r = add_opcode(reg, OP_PUSH_STOP_BT); + if (r) return r; + r = compile_tree(node->target, reg); + if (r) return r; + r = add_opcode(reg, OP_POP_STOP_BT); + } + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_length_anchor_node(AnchorNode* node, regex_t* reg) +{ + int len; + int tlen = 0; + + if (node->target) { + tlen = compile_length_tree(node->target, reg); + if (tlen < 0) return tlen; + } + + switch (node->type) { + case ANCHOR_PREC_READ: + len = SIZE_OP_PUSH_POS + tlen + SIZE_OP_POP_POS; + break; + case ANCHOR_PREC_READ_NOT: + len = SIZE_OP_PUSH_POS_NOT + tlen + SIZE_OP_FAIL_POS; + break; + case ANCHOR_LOOK_BEHIND: + len = SIZE_OP_LOOK_BEHIND + tlen; + break; + case ANCHOR_LOOK_BEHIND_NOT: + len = SIZE_OP_PUSH_LOOK_BEHIND_NOT + tlen + SIZE_OP_FAIL_LOOK_BEHIND_NOT; + break; + + default: + len = SIZE_OPCODE; + break; + } + + return len; +} + +static int +compile_anchor_node(AnchorNode* node, regex_t* reg) +{ + int r, len; + + switch (node->type) { + case ANCHOR_BEGIN_BUF: r = add_opcode(reg, OP_BEGIN_BUF); break; + case ANCHOR_END_BUF: r = add_opcode(reg, OP_END_BUF); break; + case ANCHOR_BEGIN_LINE: r = add_opcode(reg, OP_BEGIN_LINE); break; + case ANCHOR_END_LINE: r = add_opcode(reg, OP_END_LINE); break; + case ANCHOR_SEMI_END_BUF: r = add_opcode(reg, OP_SEMI_END_BUF); break; + case ANCHOR_BEGIN_POSITION: r = add_opcode(reg, OP_BEGIN_POSITION); break; + + case ANCHOR_WORD_BOUND: r = add_opcode(reg, OP_WORD_BOUND); break; + case ANCHOR_NOT_WORD_BOUND: r = add_opcode(reg, OP_NOT_WORD_BOUND); break; +#ifdef USE_WORD_BEGIN_END + case ANCHOR_WORD_BEGIN: r = add_opcode(reg, OP_WORD_BEGIN); break; + case ANCHOR_WORD_END: r = add_opcode(reg, OP_WORD_END); break; +#endif + + case ANCHOR_PREC_READ: + r = add_opcode(reg, OP_PUSH_POS); + if (r) return r; + r = compile_tree(node->target, reg); + if (r) return r; + r = add_opcode(reg, OP_POP_POS); + break; + + case ANCHOR_PREC_READ_NOT: + len = compile_length_tree(node->target, reg); + if (len < 0) return len; + r = add_opcode_rel_addr(reg, OP_PUSH_POS_NOT, len + SIZE_OP_FAIL_POS); + if (r) return r; + r = compile_tree(node->target, reg); + if (r) return r; + r = add_opcode(reg, OP_FAIL_POS); + break; + + case ANCHOR_LOOK_BEHIND: + { + int n; + r = add_opcode(reg, OP_LOOK_BEHIND); + if (r) return r; + if (node->char_len < 0) { + r = get_char_length_tree(node->target, reg, &n); + if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + else + n = node->char_len; + r = add_length(reg, n); + if (r) return r; + r = compile_tree(node->target, reg); + } + break; + + case ANCHOR_LOOK_BEHIND_NOT: + { + int n; + len = compile_length_tree(node->target, reg); + r = add_opcode_rel_addr(reg, OP_PUSH_LOOK_BEHIND_NOT, + len + SIZE_OP_FAIL_LOOK_BEHIND_NOT); + if (r) return r; + if (node->char_len < 0) { + r = get_char_length_tree(node->target, reg, &n); + if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + else + n = node->char_len; + r = add_length(reg, n); + if (r) return r; + r = compile_tree(node->target, reg); + if (r) return r; + r = add_opcode(reg, OP_FAIL_LOOK_BEHIND_NOT); + } + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_length_tree(Node* node, regex_t* reg) +{ + int len, type, r; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + len = 0; + do { + r = compile_length_tree(NCAR(node), reg); + if (r < 0) return r; + len += r; + } while (IS_NOT_NULL(node = NCDR(node))); + r = len; + break; + + case NT_ALT: + { + int n; + + n = r = 0; + do { + r += compile_length_tree(NCAR(node), reg); + n++; + } while (IS_NOT_NULL(node = NCDR(node))); + r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1); + } + break; + + case NT_STR: + if (NSTRING_IS_RAW(node)) + r = compile_length_string_raw_node(NSTR(node), reg); + else + r = compile_length_string_node(node, reg); + break; + + case NT_CCLASS: + r = compile_length_cclass_node(NCCLASS(node), reg); + break; + + case NT_CTYPE: + case NT_CANY: + r = SIZE_OPCODE; + break; + + case NT_BREF: + { + BRefNode* br = NBREF(node); + +#ifdef USE_BACKREF_WITH_LEVEL + if (IS_BACKREF_NEST_LEVEL(br)) { + r = SIZE_OPCODE + SIZE_OPTION + SIZE_LENGTH + + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num); + } + else +#endif + if (br->back_num == 1) { + r = ((!IS_IGNORECASE(reg->options) && br->back_static[0] <= 2) + ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM)); + } + else { + r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num); + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + r = SIZE_OP_CALL; + break; +#endif + + case NT_QTFR: + r = compile_length_quantifier_node(NQTFR(node), reg); + break; + + case NT_ENCLOSE: + r = compile_length_enclose_node(NENCLOSE(node), reg); + break; + + case NT_ANCHOR: + r = compile_length_anchor_node(NANCHOR(node), reg); + break; + + default: + return ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +compile_tree(Node* node, regex_t* reg) +{ + int n, type, len, pos, r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + do { + r = compile_tree(NCAR(node), reg); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_ALT: + { + Node* x = node; + len = 0; + do { + len += compile_length_tree(NCAR(x), reg); + if (NCDR(x) != NULL) { + len += SIZE_OP_PUSH + SIZE_OP_JUMP; + } + } while (IS_NOT_NULL(x = NCDR(x))); + pos = reg->used + len; /* goal position */ + + do { + len = compile_length_tree(NCAR(node), reg); + if (IS_NOT_NULL(NCDR(node))) { + r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP); + if (r) break; + } + r = compile_tree(NCAR(node), reg); + if (r) break; + if (IS_NOT_NULL(NCDR(node))) { + len = pos - (reg->used + SIZE_OP_JUMP); + r = add_opcode_rel_addr(reg, OP_JUMP, len); + if (r) break; + } + } while (IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_STR: + if (NSTRING_IS_RAW(node)) + r = compile_string_raw_node(NSTR(node), reg); + else + r = compile_string_node(node, reg); + break; + + case NT_CCLASS: + r = compile_cclass_node(NCCLASS(node), reg); + break; + + case NT_CTYPE: + { + int op; + + switch (NCTYPE(node)->ctype) { + case ONIGENC_CTYPE_WORD: + if (NCTYPE(node)->not != 0) op = OP_NOT_WORD; + else op = OP_WORD; + break; + default: + return ONIGERR_TYPE_BUG; + break; + } + r = add_opcode(reg, op); + } + break; + + case NT_CANY: + if (IS_MULTILINE(reg->options)) + r = add_opcode(reg, OP_ANYCHAR_ML); + else + r = add_opcode(reg, OP_ANYCHAR); + break; + + case NT_BREF: + { + BRefNode* br = NBREF(node); + +#ifdef USE_BACKREF_WITH_LEVEL + if (IS_BACKREF_NEST_LEVEL(br)) { + r = add_opcode(reg, OP_BACKREF_WITH_LEVEL); + if (r) return r; + r = add_option(reg, (reg->options & ONIG_OPTION_IGNORECASE)); + if (r) return r; + r = add_length(reg, br->nest_level); + if (r) return r; + + goto add_bacref_mems; + } + else +#endif + if (br->back_num == 1) { + n = br->back_static[0]; + if (IS_IGNORECASE(reg->options)) { + r = add_opcode(reg, OP_BACKREFN_IC); + if (r) return r; + r = add_mem_num(reg, n); + } + else { + switch (n) { + case 1: r = add_opcode(reg, OP_BACKREF1); break; + case 2: r = add_opcode(reg, OP_BACKREF2); break; + default: + r = add_opcode(reg, OP_BACKREFN); + if (r) return r; + r = add_mem_num(reg, n); + break; + } + } + } + else { + int i; + int* p; + + if (IS_IGNORECASE(reg->options)) { + r = add_opcode(reg, OP_BACKREF_MULTI_IC); + } + else { + r = add_opcode(reg, OP_BACKREF_MULTI); + } + if (r) return r; + +#ifdef USE_BACKREF_WITH_LEVEL + add_bacref_mems: +#endif + r = add_length(reg, br->back_num); + if (r) return r; + p = BACKREFS_P(br); + for (i = br->back_num - 1; i >= 0; i--) { + r = add_mem_num(reg, p[i]); + if (r) return r; + } + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + r = compile_call(NCALL(node), reg); + break; +#endif + + case NT_QTFR: + r = compile_quantifier_node(NQTFR(node), reg); + break; + + case NT_ENCLOSE: + r = compile_enclose_node(NENCLOSE(node), reg); + break; + + case NT_ANCHOR: + r = compile_anchor_node(NANCHOR(node), reg); + break; + + default: +#ifdef ONIG_DEBUG + fprintf(stderr, "compile_tree: undefined node type %d\n", NTYPE(node)); +#endif + break; + } + + return r; +} + +#ifdef USE_NAMED_GROUP + +static int +noname_disable_map(Node** plink, GroupNumRemap* map, int* counter) +{ + int r = 0; + Node* node = *plink; + + switch (NTYPE(node)) { + case NT_LIST: + case NT_ALT: + do { + r = noname_disable_map(&(NCAR(node)), map, counter); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_QTFR: + { + Node** ptarget = &(NQTFR(node)->target); + Node* old = *ptarget; + r = noname_disable_map(ptarget, map, counter); + if (*ptarget != old && NTYPE(*ptarget) == NT_QTFR) { + onig_reduce_nested_quantifier(node, *ptarget); + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + if (en->type == ENCLOSE_MEMORY) { + if (IS_ENCLOSE_NAMED_GROUP(en)) { + (*counter)++; + map[en->regnum].new_val = *counter; + en->regnum = *counter; + r = noname_disable_map(&(en->target), map, counter); + } + else { + *plink = en->target; + en->target = NULL_NODE; + onig_node_free(node); + r = noname_disable_map(plink, map, counter); + } + } + else + r = noname_disable_map(&(en->target), map, counter); + } + break; + + default: + break; + } + + return r; +} + +static int +renumber_node_backref(Node* node, GroupNumRemap* map) +{ + int i, pos, n, old_num; + int *backs; + BRefNode* bn = NBREF(node); + + if (! IS_BACKREF_NAME_REF(bn)) + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + + old_num = bn->back_num; + if (IS_NULL(bn->back_dynamic)) + backs = bn->back_static; + else + backs = bn->back_dynamic; + + for (i = 0, pos = 0; i < old_num; i++) { + n = map[backs[i]].new_val; + if (n > 0) { + backs[pos] = n; + pos++; + } + } + + bn->back_num = pos; + return 0; +} + +static int +renumber_by_map(Node* node, GroupNumRemap* map) +{ + int r = 0; + + switch (NTYPE(node)) { + case NT_LIST: + case NT_ALT: + do { + r = renumber_by_map(NCAR(node), map); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + case NT_QTFR: + r = renumber_by_map(NQTFR(node)->target, map); + break; + case NT_ENCLOSE: + r = renumber_by_map(NENCLOSE(node)->target, map); + break; + + case NT_BREF: + r = renumber_node_backref(node, map); + break; + + default: + break; + } + + return r; +} + +static int +numbered_ref_check(Node* node) +{ + int r = 0; + + switch (NTYPE(node)) { + case NT_LIST: + case NT_ALT: + do { + r = numbered_ref_check(NCAR(node)); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + case NT_QTFR: + r = numbered_ref_check(NQTFR(node)->target); + break; + case NT_ENCLOSE: + r = numbered_ref_check(NENCLOSE(node)->target); + break; + + case NT_BREF: + if (! IS_BACKREF_NAME_REF(NBREF(node))) + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + break; + + default: + break; + } + + return r; +} + +static int +disable_noname_group_capture(Node** root, regex_t* reg, ScanEnv* env) +{ + int r, i, pos, counter; + BitStatusType loc; + GroupNumRemap* map; + + map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1)); + CHECK_NULL_RETURN_MEMERR(map); + for (i = 1; i <= env->num_mem; i++) { + map[i].new_val = 0; + } + counter = 0; + r = noname_disable_map(root, map, &counter); + if (r != 0) return r; + + r = renumber_by_map(*root, map); + if (r != 0) return r; + + for (i = 1, pos = 1; i <= env->num_mem; i++) { + if (map[i].new_val > 0) { + SCANENV_MEM_NODES(env)[pos] = SCANENV_MEM_NODES(env)[i]; + pos++; + } + } + + loc = env->capture_history; + BIT_STATUS_CLEAR(env->capture_history); + for (i = 1; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) { + if (BIT_STATUS_AT(loc, i)) { + BIT_STATUS_ON_AT_SIMPLE(env->capture_history, map[i].new_val); + } + } + + env->num_mem = env->num_named; + reg->num_mem = env->num_named; + + return onig_renumber_name_table(reg, map); +} +#endif /* USE_NAMED_GROUP */ + +#ifdef USE_SUBEXP_CALL +static int +unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg) +{ + int i, offset; + EncloseNode* en; + AbsAddrType addr; + + for (i = 0; i < uslist->num; i++) { + en = NENCLOSE(uslist->us[i].target); + if (! IS_ENCLOSE_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG; + addr = en->call_addr; + offset = uslist->us[i].offset; + + BBUF_WRITE(reg, offset, &addr, SIZE_ABSADDR); + } + return 0; +} +#endif + +#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT +static int +quantifiers_memory_node_info(Node* node) +{ + int r = 0; + + switch (NTYPE(node)) { + case NT_LIST: + case NT_ALT: + { + int v; + do { + v = quantifiers_memory_node_info(NCAR(node)); + if (v > r) r = v; + } while (v >= 0 && IS_NOT_NULL(node = NCDR(node))); + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (IS_CALL_RECURSION(NCALL(node))) { + return NQ_TARGET_IS_EMPTY_REC; /* tiny version */ + } + else + r = quantifiers_memory_node_info(NCALL(node)->target); + break; +#endif + + case NT_QTFR: + { + QtfrNode* qn = NQTFR(node); + if (qn->upper != 0) { + r = quantifiers_memory_node_info(qn->target); + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + switch (en->type) { + case ENCLOSE_MEMORY: + return NQ_TARGET_IS_EMPTY_MEM; + break; + + case ENCLOSE_OPTION: + case ENCLOSE_STOP_BACKTRACK: + r = quantifiers_memory_node_info(en->target); + break; + default: + break; + } + } + break; + + case NT_BREF: + case NT_STR: + case NT_CTYPE: + case NT_CCLASS: + case NT_CANY: + case NT_ANCHOR: + default: + break; + } + + return r; +} +#endif /* USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT */ + +static int +get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env) +{ + OnigDistance tmin; + int r = 0; + + *min = 0; + switch (NTYPE(node)) { + case NT_BREF: + { + int i; + int* backs; + Node** nodes = SCANENV_MEM_NODES(env); + BRefNode* br = NBREF(node); + if (br->state & NST_RECURSION) break; + + backs = BACKREFS_P(br); + if (backs[0] > env->num_mem) return ONIGERR_INVALID_BACKREF; + r = get_min_match_length(nodes[backs[0]], min, env); + if (r != 0) break; + for (i = 1; i < br->back_num; i++) { + if (backs[i] > env->num_mem) return ONIGERR_INVALID_BACKREF; + r = get_min_match_length(nodes[backs[i]], &tmin, env); + if (r != 0) break; + if (*min > tmin) *min = tmin; + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (IS_CALL_RECURSION(NCALL(node))) { + EncloseNode* en = NENCLOSE(NCALL(node)->target); + if (IS_ENCLOSE_MIN_FIXED(en)) + *min = en->min_len; + } + else + r = get_min_match_length(NCALL(node)->target, min, env); + break; +#endif + + case NT_LIST: + do { + r = get_min_match_length(NCAR(node), &tmin, env); + if (r == 0) *min += tmin; + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_ALT: + { + Node *x, *y; + y = node; + do { + x = NCAR(y); + r = get_min_match_length(x, &tmin, env); + if (r != 0) break; + if (y == node) *min = tmin; + else if (*min > tmin) *min = tmin; + } while (r == 0 && IS_NOT_NULL(y = NCDR(y))); + } + break; + + case NT_STR: + { + StrNode* sn = NSTR(node); + *min = sn->end - sn->s; + } + break; + + case NT_CTYPE: + *min = 1; + break; + + case NT_CCLASS: + case NT_CANY: + *min = 1; + break; + + case NT_QTFR: + { + QtfrNode* qn = NQTFR(node); + + if (qn->lower > 0) { + r = get_min_match_length(qn->target, min, env); + if (r == 0) + *min = distance_multiply(*min, qn->lower); + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + switch (en->type) { + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_MIN_FIXED(en)) + *min = en->min_len; + else { + r = get_min_match_length(en->target, min, env); + if (r == 0) { + en->min_len = *min; + SET_ENCLOSE_STATUS(node, NST_MIN_FIXED); + } + } + break; +#endif + case ENCLOSE_OPTION: + case ENCLOSE_STOP_BACKTRACK: + r = get_min_match_length(en->target, min, env); + break; + } + } + break; + + case NT_ANCHOR: + default: + break; + } + + return r; +} + +static int +get_max_match_length(Node* node, OnigDistance *max, ScanEnv* env) +{ + OnigDistance tmax; + int r = 0; + + *max = 0; + switch (NTYPE(node)) { + case NT_LIST: + do { + r = get_max_match_length(NCAR(node), &tmax, env); + if (r == 0) + *max = distance_add(*max, tmax); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_ALT: + do { + r = get_max_match_length(NCAR(node), &tmax, env); + if (r == 0 && *max < tmax) *max = tmax; + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_STR: + { + StrNode* sn = NSTR(node); + *max = sn->end - sn->s; + } + break; + + case NT_CTYPE: + *max = ONIGENC_MBC_MAXLEN_DIST(env->enc); + break; + + case NT_CCLASS: + case NT_CANY: + *max = ONIGENC_MBC_MAXLEN_DIST(env->enc); + break; + + case NT_BREF: + { + int i; + int* backs; + Node** nodes = SCANENV_MEM_NODES(env); + BRefNode* br = NBREF(node); + if (br->state & NST_RECURSION) { + *max = ONIG_INFINITE_DISTANCE; + break; + } + backs = BACKREFS_P(br); + for (i = 0; i < br->back_num; i++) { + if (backs[i] > env->num_mem) return ONIGERR_INVALID_BACKREF; + r = get_max_match_length(nodes[backs[i]], &tmax, env); + if (r != 0) break; + if (*max < tmax) *max = tmax; + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (! IS_CALL_RECURSION(NCALL(node))) + r = get_max_match_length(NCALL(node)->target, max, env); + else + *max = ONIG_INFINITE_DISTANCE; + break; +#endif + + case NT_QTFR: + { + QtfrNode* qn = NQTFR(node); + + if (qn->upper != 0) { + r = get_max_match_length(qn->target, max, env); + if (r == 0 && *max != 0) { + if (! IS_REPEAT_INFINITE(qn->upper)) + *max = distance_multiply(*max, qn->upper); + else + *max = ONIG_INFINITE_DISTANCE; + } + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + switch (en->type) { + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_MAX_FIXED(en)) + *max = en->max_len; + else { + r = get_max_match_length(en->target, max, env); + if (r == 0) { + en->max_len = *max; + SET_ENCLOSE_STATUS(node, NST_MAX_FIXED); + } + } + break; +#endif + case ENCLOSE_OPTION: + case ENCLOSE_STOP_BACKTRACK: + r = get_max_match_length(en->target, max, env); + break; + } + } + break; + + case NT_ANCHOR: + default: + break; + } + + return r; +} + +#define GET_CHAR_LEN_VARLEN -1 +#define GET_CHAR_LEN_TOP_ALT_VARLEN -2 + +/* fixed size pattern node only */ +static int +get_char_length_tree1(Node* node, regex_t* reg, int* len, int level) +{ + int tlen; + int r = 0; + + level++; + *len = 0; + switch (NTYPE(node)) { + case NT_LIST: + do { + r = get_char_length_tree1(NCAR(node), reg, &tlen, level); + if (r == 0) + *len = distance_add(*len, tlen); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_ALT: + { + int tlen2; + int varlen = 0; + + r = get_char_length_tree1(NCAR(node), reg, &tlen, level); + while (r == 0 && IS_NOT_NULL(node = NCDR(node))) { + r = get_char_length_tree1(NCAR(node), reg, &tlen2, level); + if (r == 0) { + if (tlen != tlen2) + varlen = 1; + } + } + if (r == 0) { + if (varlen != 0) { + if (level == 1) + r = GET_CHAR_LEN_TOP_ALT_VARLEN; + else + r = GET_CHAR_LEN_VARLEN; + } + else + *len = tlen; + } + } + break; + + case NT_STR: + { + StrNode* sn = NSTR(node); + UChar *s = sn->s; + while (s < sn->end) { + s += enclen(reg->enc, s, sn->end); + (*len)++; + } + } + break; + + case NT_QTFR: + { + QtfrNode* qn = NQTFR(node); + if (qn->lower == qn->upper) { + r = get_char_length_tree1(qn->target, reg, &tlen, level); + if (r == 0) + *len = distance_multiply(tlen, qn->lower); + } + else + r = GET_CHAR_LEN_VARLEN; + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (! IS_CALL_RECURSION(NCALL(node))) + r = get_char_length_tree1(NCALL(node)->target, reg, len, level); + else + r = GET_CHAR_LEN_VARLEN; + break; +#endif + + case NT_CTYPE: + *len = 1; + break; + + case NT_CCLASS: + case NT_CANY: + *len = 1; + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + switch (en->type) { + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + if (IS_ENCLOSE_CLEN_FIXED(en)) + *len = en->char_len; + else { + r = get_char_length_tree1(en->target, reg, len, level); + if (r == 0) { + en->char_len = *len; + SET_ENCLOSE_STATUS(node, NST_CLEN_FIXED); + } + } + break; +#endif + case ENCLOSE_OPTION: + case ENCLOSE_STOP_BACKTRACK: + r = get_char_length_tree1(en->target, reg, len, level); + break; + default: + break; + } + } + break; + + case NT_ANCHOR: + break; + + default: + r = GET_CHAR_LEN_VARLEN; + break; + } + + return r; +} + +static int +get_char_length_tree(Node* node, regex_t* reg, int* len) +{ + return get_char_length_tree1(node, reg, len, 0); +} + +/* x is not included y ==> 1 : 0 */ +static int +is_not_included(Node* x, Node* y, regex_t* reg) +{ + int i, len; + OnigCodePoint code; + UChar *p, c; + int ytype; + + retry: + ytype = NTYPE(y); + switch (NTYPE(x)) { + case NT_CTYPE: + { + switch (ytype) { + case NT_CTYPE: + if (NCTYPE(y)->ctype == NCTYPE(x)->ctype && + NCTYPE(y)->not != NCTYPE(x)->not) + return 1; + else + return 0; + break; + + case NT_CCLASS: + swap: + { + Node* tmp; + tmp = x; x = y; y = tmp; + goto retry; + } + break; + + case NT_STR: + goto swap; + break; + + default: + break; + } + } + break; + + case NT_CCLASS: + { + CClassNode* xc = NCCLASS(x); + switch (ytype) { + case NT_CTYPE: + switch (NCTYPE(y)->ctype) { + case ONIGENC_CTYPE_WORD: + if (NCTYPE(y)->not == 0) { + if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (BITSET_AT(xc->bs, i)) { + if (IS_CODE_SB_WORD(reg->enc, i)) return 0; + } + } + return 1; + } + return 0; + } + else { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (! IS_CODE_SB_WORD(reg->enc, i)) { + if (!IS_NCCLASS_NOT(xc)) { + if (BITSET_AT(xc->bs, i)) + return 0; + } + else { + if (! BITSET_AT(xc->bs, i)) + return 0; + } + } + } + return 1; + } + break; + + default: + break; + } + break; + + case NT_CCLASS: + { + int v; + CClassNode* yc = NCCLASS(y); + + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + v = BITSET_AT(xc->bs, i); + if ((v != 0 && !IS_NCCLASS_NOT(xc)) || + (v == 0 && IS_NCCLASS_NOT(xc))) { + v = BITSET_AT(yc->bs, i); + if ((v != 0 && !IS_NCCLASS_NOT(yc)) || + (v == 0 && IS_NCCLASS_NOT(yc))) + return 0; + } + } + if ((IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) || + (IS_NULL(yc->mbuf) && !IS_NCCLASS_NOT(yc))) + return 1; + return 0; + } + break; + + case NT_STR: + goto swap; + break; + + default: + break; + } + } + break; + + case NT_STR: + { + StrNode* xs = NSTR(x); + if (NSTRING_LEN(x) == 0) + break; + + c = *(xs->s); + switch (ytype) { + case NT_CTYPE: + switch (NCTYPE(y)->ctype) { + case ONIGENC_CTYPE_WORD: + if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) + return NCTYPE(y)->not; + else + return !(NCTYPE(y)->not); + break; + default: + break; + } + break; + + case NT_CCLASS: + { + CClassNode* cc = NCCLASS(y); + + code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s, + xs->s + ONIGENC_MBC_MAXLEN(reg->enc)); + return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1); + } + break; + + case NT_STR: + { + UChar *q; + StrNode* ys = NSTR(y); + len = NSTRING_LEN(x); + if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y); + if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) { + /* tiny version */ + return 0; + } + else { + for (i = 0, p = ys->s, q = xs->s; i < len; i++, p++, q++) { + if (*p != *q) return 1; + } + } + } + break; + + default: + break; + } + } + break; + + default: + break; + } + + return 0; +} + +static Node* +get_head_value_node(Node* node, int exact, regex_t* reg) +{ + Node* n = NULL_NODE; + + switch (NTYPE(node)) { + case NT_BREF: + case NT_ALT: + case NT_CANY: +#ifdef USE_SUBEXP_CALL + case NT_CALL: +#endif + break; + + case NT_CTYPE: + case NT_CCLASS: + if (exact == 0) { + n = node; + } + break; + + case NT_LIST: + n = get_head_value_node(NCAR(node), exact, reg); + break; + + case NT_STR: + { + StrNode* sn = NSTR(node); + + if (sn->end <= sn->s) + break; + + if (exact != 0 && + !NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) { + } + else { + n = node; + } + } + break; + + case NT_QTFR: + { + QtfrNode* qn = NQTFR(node); + if (qn->lower > 0) { + if (IS_NOT_NULL(qn->head_exact)) + n = qn->head_exact; + else + n = get_head_value_node(qn->target, exact, reg); + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + switch (en->type) { + case ENCLOSE_OPTION: + { + OnigOptionType options = reg->options; + + reg->options = NENCLOSE(node)->option; + n = get_head_value_node(NENCLOSE(node)->target, exact, reg); + reg->options = options; + } + break; + + case ENCLOSE_MEMORY: + case ENCLOSE_STOP_BACKTRACK: + n = get_head_value_node(en->target, exact, reg); + break; + } + } + break; + + case NT_ANCHOR: + if (NANCHOR(node)->type == ANCHOR_PREC_READ) + n = get_head_value_node(NANCHOR(node)->target, exact, reg); + break; + + default: + break; + } + + return n; +} + +static int +check_type_tree(Node* node, int type_mask, int enclose_mask, int anchor_mask) +{ + int type, r = 0; + + type = NTYPE(node); + if ((NTYPE2BIT(type) & type_mask) == 0) + return 1; + + switch (type) { + case NT_LIST: + case NT_ALT: + do { + r = check_type_tree(NCAR(node), type_mask, enclose_mask, + anchor_mask); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_QTFR: + r = check_type_tree(NQTFR(node)->target, type_mask, enclose_mask, + anchor_mask); + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + if ((en->type & enclose_mask) == 0) + return 1; + + r = check_type_tree(en->target, type_mask, enclose_mask, anchor_mask); + } + break; + + case NT_ANCHOR: + type = NANCHOR(node)->type; + if ((type & anchor_mask) == 0) + return 1; + + if (NANCHOR(node)->target) + r = check_type_tree(NANCHOR(node)->target, + type_mask, enclose_mask, anchor_mask); + break; + + default: + break; + } + return r; +} + +#ifdef USE_SUBEXP_CALL + +#define RECURSION_EXIST 1 +#define RECURSION_INFINITE 2 + +static int +subexp_inf_recursive_check(Node* node, ScanEnv* env, int head) +{ + int type; + int r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + { + Node *x; + OnigDistance min; + int ret; + + x = node; + do { + ret = subexp_inf_recursive_check(NCAR(x), env, head); + if (ret < 0 || ret == RECURSION_INFINITE) return ret; + r |= ret; + if (head) { + ret = get_min_match_length(NCAR(x), &min, env); + if (ret != 0) return ret; + if (min != 0) head = 0; + } + } while (IS_NOT_NULL(x = NCDR(x))); + } + break; + + case NT_ALT: + { + int ret; + r = RECURSION_EXIST; + do { + ret = subexp_inf_recursive_check(NCAR(node), env, head); + if (ret < 0 || ret == RECURSION_INFINITE) return ret; + r &= ret; + } while (IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_QTFR: + r = subexp_inf_recursive_check(NQTFR(node)->target, env, head); + if (r == RECURSION_EXIST) { + if (NQTFR(node)->lower == 0) r = 0; + } + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + switch (an->type) { + case ANCHOR_PREC_READ: + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: + case ANCHOR_LOOK_BEHIND_NOT: + r = subexp_inf_recursive_check(an->target, env, head); + break; + } + } + break; + + case NT_CALL: + r = subexp_inf_recursive_check(NCALL(node)->target, env, head); + break; + + case NT_ENCLOSE: + if (IS_ENCLOSE_MARK2(NENCLOSE(node))) + return 0; + else if (IS_ENCLOSE_MARK1(NENCLOSE(node))) + return (head == 0 ? RECURSION_EXIST : RECURSION_INFINITE); + else { + SET_ENCLOSE_STATUS(node, NST_MARK2); + r = subexp_inf_recursive_check(NENCLOSE(node)->target, env, head); + CLEAR_ENCLOSE_STATUS(node, NST_MARK2); + } + break; + + default: + break; + } + + return r; +} + +static int +subexp_inf_recursive_check_trav(Node* node, ScanEnv* env) +{ + int type; + int r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + case NT_ALT: + do { + r = subexp_inf_recursive_check_trav(NCAR(node), env); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_QTFR: + r = subexp_inf_recursive_check_trav(NQTFR(node)->target, env); + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + switch (an->type) { + case ANCHOR_PREC_READ: + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: + case ANCHOR_LOOK_BEHIND_NOT: + r = subexp_inf_recursive_check_trav(an->target, env); + break; + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + + if (IS_ENCLOSE_RECURSION(en)) { + SET_ENCLOSE_STATUS(node, NST_MARK1); + r = subexp_inf_recursive_check(en->target, env, 1); + if (r > 0) return ONIGERR_NEVER_ENDING_RECURSION; + CLEAR_ENCLOSE_STATUS(node, NST_MARK1); + } + r = subexp_inf_recursive_check_trav(en->target, env); + } + + break; + + default: + break; + } + + return r; +} + +static int +subexp_recursive_check(Node* node) +{ + int r = 0; + + switch (NTYPE(node)) { + case NT_LIST: + case NT_ALT: + do { + r |= subexp_recursive_check(NCAR(node)); + } while (IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_QTFR: + r = subexp_recursive_check(NQTFR(node)->target); + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + switch (an->type) { + case ANCHOR_PREC_READ: + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: + case ANCHOR_LOOK_BEHIND_NOT: + r = subexp_recursive_check(an->target); + break; + } + } + break; + + case NT_CALL: + r = subexp_recursive_check(NCALL(node)->target); + if (r != 0) SET_CALL_RECURSION(node); + break; + + case NT_ENCLOSE: + if (IS_ENCLOSE_MARK2(NENCLOSE(node))) + return 0; + else if (IS_ENCLOSE_MARK1(NENCLOSE(node))) + return 1; /* recursion */ + else { + SET_ENCLOSE_STATUS(node, NST_MARK2); + r = subexp_recursive_check(NENCLOSE(node)->target); + CLEAR_ENCLOSE_STATUS(node, NST_MARK2); + } + break; + + default: + break; + } + + return r; +} + + +static int +subexp_recursive_check_trav(Node* node, ScanEnv* env) +{ +#define FOUND_CALLED_NODE 1 + + int type; + int r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + case NT_ALT: + { + int ret; + do { + ret = subexp_recursive_check_trav(NCAR(node), env); + if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NODE; + else if (ret < 0) return ret; + } while (IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_QTFR: + r = subexp_recursive_check_trav(NQTFR(node)->target, env); + if (NQTFR(node)->upper == 0) { + if (r == FOUND_CALLED_NODE) + NQTFR(node)->is_refered = 1; + } + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + switch (an->type) { + case ANCHOR_PREC_READ: + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: + case ANCHOR_LOOK_BEHIND_NOT: + r = subexp_recursive_check_trav(an->target, env); + break; + } + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + + if (! IS_ENCLOSE_RECURSION(en)) { + if (IS_ENCLOSE_CALLED(en)) { + SET_ENCLOSE_STATUS(node, NST_MARK1); + r = subexp_recursive_check(en->target); + if (r != 0) SET_ENCLOSE_STATUS(node, NST_RECURSION); + CLEAR_ENCLOSE_STATUS(node, NST_MARK1); + } + } + r = subexp_recursive_check_trav(en->target, env); + if (IS_ENCLOSE_CALLED(en)) + r |= FOUND_CALLED_NODE; + } + break; + + default: + break; + } + + return r; +} + +static int +setup_subexp_call(Node* node, ScanEnv* env) +{ + int type; + int r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + do { + r = setup_subexp_call(NCAR(node), env); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_ALT: + do { + r = setup_subexp_call(NCAR(node), env); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_QTFR: + r = setup_subexp_call(NQTFR(node)->target, env); + break; + case NT_ENCLOSE: + r = setup_subexp_call(NENCLOSE(node)->target, env); + break; + + case NT_CALL: + { + CallNode* cn = NCALL(node); + Node** nodes = SCANENV_MEM_NODES(env); + + if (cn->group_num != 0) { + int gnum = cn->group_num; + +#ifdef USE_NAMED_GROUP + if (env->num_named > 0 && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + !ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_CAPTURE_GROUP)) { + return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED; + } +#endif + if (gnum > env->num_mem) { + onig_scan_env_set_error_string(env, + ONIGERR_UNDEFINED_GROUP_REFERENCE, cn->name, cn->name_end); + return ONIGERR_UNDEFINED_GROUP_REFERENCE; + } + +#ifdef USE_NAMED_GROUP + set_call_attr: +#endif + cn->target = nodes[cn->group_num]; + if (IS_NULL(cn->target)) { + onig_scan_env_set_error_string(env, + ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + SET_ENCLOSE_STATUS(cn->target, NST_CALLED); + BIT_STATUS_ON_AT(env->bt_mem_start, cn->group_num); + cn->unset_addr_list = env->unset_addr_list; + } +#ifdef USE_NAMED_GROUP + else { + int *refs; + + int n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end, + &refs); + if (n <= 0) { + onig_scan_env_set_error_string(env, + ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + else if (n > 1) { + onig_scan_env_set_error_string(env, + ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, cn->name, cn->name_end); + return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL; + } + else { + cn->group_num = refs[0]; + goto set_call_attr; + } + } +#endif + } + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + + switch (an->type) { + case ANCHOR_PREC_READ: + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: + case ANCHOR_LOOK_BEHIND_NOT: + r = setup_subexp_call(an->target, env); + break; + } + } + break; + + default: + break; + } + + return r; +} +#endif + +/* divide different length alternatives in look-behind. + (?<=A|B) ==> (?<=A)|(?<=B) + (? (?type; + + head = an->target; + np = NCAR(head); + swap_node(node, head); + NCAR(node) = head; + NANCHOR(head)->target = np; + + np = node; + while ((np = NCDR(np)) != NULL_NODE) { + insert_node = onig_node_new_anchor(anc_type); + CHECK_NULL_RETURN_MEMERR(insert_node); + NANCHOR(insert_node)->target = NCAR(np); + NCAR(np) = insert_node; + } + + if (anc_type == ANCHOR_LOOK_BEHIND_NOT) { + np = node; + do { + SET_NTYPE(np, NT_LIST); /* alt -> list */ + } while ((np = NCDR(np)) != NULL_NODE); + } + return 0; +} + +static int +setup_look_behind(Node* node, regex_t* reg, ScanEnv* env) +{ + int r, len; + AnchorNode* an = NANCHOR(node); + + r = get_char_length_tree(an->target, reg, &len); + if (r == 0) + an->char_len = len; + else if (r == GET_CHAR_LEN_VARLEN) + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + else if (r == GET_CHAR_LEN_TOP_ALT_VARLEN) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND)) + r = divide_look_behind_alternatives(node); + else + r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + } + + return r; +} + +static int +next_setup(Node* node, Node* next_node, regex_t* reg) +{ + int type; + + retry: + type = NTYPE(node); + if (type == NT_QTFR) { + QtfrNode* qn = NQTFR(node); + if (qn->greedy && IS_REPEAT_INFINITE(qn->upper)) { +#ifdef USE_QTFR_PEEK_NEXT + Node* n = get_head_value_node(next_node, 1, reg); + /* '\0': for UTF-16BE etc... */ + if (IS_NOT_NULL(n) && NSTR(n)->s[0] != '\0') { + qn->next_head_exact = n; + } +#endif + /* automatic posseivation a*b ==> (?>a*)b */ + if (qn->lower <= 1) { + int ttype = NTYPE(qn->target); + if (IS_NODE_TYPE_SIMPLE(ttype)) { + Node *x, *y; + x = get_head_value_node(qn->target, 0, reg); + if (IS_NOT_NULL(x)) { + y = get_head_value_node(next_node, 0, reg); + if (IS_NOT_NULL(y) && is_not_included(x, y, reg)) { + Node* en = onig_node_new_enclose(ENCLOSE_STOP_BACKTRACK); + CHECK_NULL_RETURN_MEMERR(en); + SET_ENCLOSE_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT); + swap_node(node, en); + NENCLOSE(node)->target = en; + } + } + } + } + } + } + else if (type == NT_ENCLOSE) { + EncloseNode* en = NENCLOSE(node); + if (en->type == ENCLOSE_MEMORY) { + node = en->target; + goto retry; + } + } + return 0; +} + + +static int +update_string_node_case_fold(regex_t* reg, Node *node) +{ + UChar *p, *q, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *sbuf, *ebuf, *sp; + int r, i, len, sbuf_size; + StrNode* sn = NSTR(node); + + end = sn->end; + sbuf_size = (end - sn->s) * 2; + sbuf = (UChar* )xmalloc(sbuf_size); + CHECK_NULL_RETURN_MEMERR(sbuf); + ebuf = sbuf + sbuf_size; + + sp = sbuf; + p = sn->s; + while (p < end) { + len = ONIGENC_MBC_CASE_FOLD(reg->enc, reg->case_fold_flag, &p, end, buf); + q = buf; + for (i = 0; i < len; i++) { + if (sp >= ebuf) { + sbuf = (UChar* )xrealloc(sbuf, sbuf_size * 2); + CHECK_NULL_RETURN_MEMERR(sbuf); + sp = sbuf + sbuf_size; + sbuf_size *= 2; + ebuf = sbuf + sbuf_size; + } + + *sp++ = buf[i]; + } + } + + r = onig_node_str_set(node, sbuf, sp); + if (r != 0) { + xfree(sbuf); + return r; + } + + xfree(sbuf); + return 0; +} + +static int +expand_case_fold_make_rem_string(Node** rnode, UChar *s, UChar *end, + regex_t* reg) +{ + int r; + Node *node; + + node = onig_node_new_str(s, end); + if (IS_NULL(node)) return ONIGERR_MEMORY; + + r = update_string_node_case_fold(reg, node); + if (r != 0) { + onig_node_free(node); + return r; + } + + NSTRING_SET_AMBIG(node); + NSTRING_SET_DONT_GET_OPT_INFO(node); + *rnode = node; + return 0; +} + +static int +expand_case_fold_string_alt(int item_num, OnigCaseFoldCodeItem items[], + UChar *p, int slen, UChar *end, + regex_t* reg, Node **rnode) +{ + int r, i, j, len, varlen; + Node *anode, *var_anode, *snode, *xnode, *an; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + + *rnode = var_anode = NULL_NODE; + + varlen = 0; + for (i = 0; i < item_num; i++) { + if (items[i].byte_len != slen) { + varlen = 1; + break; + } + } + + if (varlen != 0) { + *rnode = var_anode = onig_node_new_alt(NULL_NODE, NULL_NODE); + if (IS_NULL(var_anode)) return ONIGERR_MEMORY; + + xnode = onig_node_new_list(NULL, NULL); + if (IS_NULL(xnode)) goto mem_err; + NCAR(var_anode) = xnode; + + anode = onig_node_new_alt(NULL_NODE, NULL_NODE); + if (IS_NULL(anode)) goto mem_err; + NCAR(xnode) = anode; + } + else { + *rnode = anode = onig_node_new_alt(NULL_NODE, NULL_NODE); + if (IS_NULL(anode)) return ONIGERR_MEMORY; + } + + snode = onig_node_new_str(p, p + slen); + if (IS_NULL(snode)) goto mem_err; + + NCAR(anode) = snode; + + for (i = 0; i < item_num; i++) { + snode = onig_node_new_str(NULL, NULL); + if (IS_NULL(snode)) goto mem_err; + + for (j = 0; j < items[i].code_len; j++) { + len = ONIGENC_CODE_TO_MBC(reg->enc, items[i].code[j], buf); + if (len < 0) { + r = len; + goto mem_err2; + } + + r = onig_node_str_cat(snode, buf, buf + len); + if (r != 0) goto mem_err2; + } + + an = onig_node_new_alt(NULL_NODE, NULL_NODE); + if (IS_NULL(an)) { + goto mem_err2; + } + + if (items[i].byte_len != slen) { + Node *rem; + UChar *q = p + items[i].byte_len; + + if (q < end) { + r = expand_case_fold_make_rem_string(&rem, q, end, reg); + if (r != 0) { + onig_node_free(an); + goto mem_err2; + } + + xnode = onig_node_list_add(NULL_NODE, snode); + if (IS_NULL(xnode)) { + onig_node_free(an); + onig_node_free(rem); + goto mem_err2; + } + if (IS_NULL(onig_node_list_add(xnode, rem))) { + onig_node_free(an); + onig_node_free(xnode); + onig_node_free(rem); + goto mem_err; + } + + NCAR(an) = xnode; + } + else { + NCAR(an) = snode; + } + + NCDR(var_anode) = an; + var_anode = an; + } + else { + NCAR(an) = snode; + NCDR(anode) = an; + anode = an; + } + } + + return varlen; + + mem_err2: + onig_node_free(snode); + + mem_err: + onig_node_free(*rnode); + + return ONIGERR_MEMORY; +} + +static int +expand_case_fold_string(Node* node, regex_t* reg) +{ +#define THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION 8 + + int r, n, len, alt_num; + UChar *start, *end, *p; + Node *top_root, *root, *snode, *prev_node; + OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM]; + StrNode* sn = NSTR(node); + + if (NSTRING_IS_AMBIG(node)) return 0; + + start = sn->s; + end = sn->end; + if (start >= end) return 0; + + r = 0; + top_root = root = prev_node = snode = NULL_NODE; + alt_num = 1; + p = start; + while (p < end) { + n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(reg->enc, reg->case_fold_flag, + p, end, items); + if (n < 0) { + r = n; + goto err; + } + + len = enclen(reg->enc, p, end); + + if (n == 0) { + if (IS_NULL(snode)) { + if (IS_NULL(root) && IS_NOT_NULL(prev_node)) { + top_root = root = onig_node_list_add(NULL_NODE, prev_node); + if (IS_NULL(root)) { + onig_node_free(prev_node); + goto mem_err; + } + } + + prev_node = snode = onig_node_new_str(NULL, NULL); + if (IS_NULL(snode)) goto mem_err; + if (IS_NOT_NULL(root)) { + if (IS_NULL(onig_node_list_add(root, snode))) { + onig_node_free(snode); + goto mem_err; + } + } + } + + r = onig_node_str_cat(snode, p, p + len); + if (r != 0) goto err; + } + else { + alt_num *= (n + 1); + if (alt_num > THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION) break; + + if (IS_NULL(root) && IS_NOT_NULL(prev_node)) { + top_root = root = onig_node_list_add(NULL_NODE, prev_node); + if (IS_NULL(root)) { + onig_node_free(prev_node); + goto mem_err; + } + } + + r = expand_case_fold_string_alt(n, items, p, len, end, reg, &prev_node); + if (r < 0) goto mem_err; + if (r == 1) { + if (IS_NULL(root)) { + top_root = prev_node; + } + else { + if (IS_NULL(onig_node_list_add(root, prev_node))) { + onig_node_free(prev_node); + goto mem_err; + } + } + + root = NCAR(prev_node); + } + else { /* r == 0 */ + if (IS_NOT_NULL(root)) { + if (IS_NULL(onig_node_list_add(root, prev_node))) { + onig_node_free(prev_node); + goto mem_err; + } + } + } + + snode = NULL_NODE; + } + + p += len; + } + + if (p < end) { + Node *srem; + + r = expand_case_fold_make_rem_string(&srem, p, end, reg); + if (r != 0) goto mem_err; + + if (IS_NOT_NULL(prev_node) && IS_NULL(root)) { + top_root = root = onig_node_list_add(NULL_NODE, prev_node); + if (IS_NULL(root)) { + onig_node_free(srem); + onig_node_free(prev_node); + goto mem_err; + } + } + + if (IS_NULL(root)) { + prev_node = srem; + } + else { + if (IS_NULL(onig_node_list_add(root, srem))) { + onig_node_free(srem); + goto mem_err; + } + } + } + + /* ending */ + top_root = (IS_NOT_NULL(top_root) ? top_root : prev_node); + swap_node(node, top_root); + onig_node_free(top_root); + return 0; + + mem_err: + r = ONIGERR_MEMORY; + + err: + onig_node_free(top_root); + return r; +} + + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + +#define CEC_THRES_NUM_BIG_REPEAT 512 +#define CEC_INFINITE_NUM 0x7fffffff + +#define CEC_IN_INFINITE_REPEAT (1<<0) +#define CEC_IN_FINITE_REPEAT (1<<1) +#define CEC_CONT_BIG_REPEAT (1<<2) + +static int +setup_comb_exp_check(Node* node, int state, ScanEnv* env) +{ + int type; + int r = state; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + { + Node* prev = NULL_NODE; + do { + r = setup_comb_exp_check(NCAR(node), r, env); + prev = NCAR(node); + } while (r >= 0 && IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_ALT: + { + int ret; + do { + ret = setup_comb_exp_check(NCAR(node), state, env); + r |= ret; + } while (ret >= 0 && IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_QTFR: + { + int child_state = state; + int add_state = 0; + QtfrNode* qn = NQTFR(node); + Node* target = qn->target; + int var_num; + + if (! IS_REPEAT_INFINITE(qn->upper)) { + if (qn->upper > 1) { + /* {0,1}, {1,1} are allowed */ + child_state |= CEC_IN_FINITE_REPEAT; + + /* check (a*){n,m}, (a+){n,m} => (a*){n,n}, (a+){n,n} */ + if (env->backrefed_mem == 0) { + if (NTYPE(qn->target) == NT_ENCLOSE) { + EncloseNode* en = NENCLOSE(qn->target); + if (en->type == ENCLOSE_MEMORY) { + if (NTYPE(en->target) == NT_QTFR) { + QtfrNode* q = NQTFR(en->target); + if (IS_REPEAT_INFINITE(q->upper) + && q->greedy == qn->greedy) { + qn->upper = (qn->lower == 0 ? 1 : qn->lower); + if (qn->upper == 1) + child_state = state; + } + } + } + } + } + } + } + + if (state & CEC_IN_FINITE_REPEAT) { + qn->comb_exp_check_num = -1; + } + else { + if (IS_REPEAT_INFINITE(qn->upper)) { + var_num = CEC_INFINITE_NUM; + child_state |= CEC_IN_INFINITE_REPEAT; + } + else { + var_num = qn->upper - qn->lower; + } + + if (var_num >= CEC_THRES_NUM_BIG_REPEAT) + add_state |= CEC_CONT_BIG_REPEAT; + + if (((state & CEC_IN_INFINITE_REPEAT) != 0 && var_num != 0) || + ((state & CEC_CONT_BIG_REPEAT) != 0 && + var_num >= CEC_THRES_NUM_BIG_REPEAT)) { + if (qn->comb_exp_check_num == 0) { + env->num_comb_exp_check++; + qn->comb_exp_check_num = env->num_comb_exp_check; + if (env->curr_max_regnum > env->comb_exp_max_regnum) + env->comb_exp_max_regnum = env->curr_max_regnum; + } + } + } + + r = setup_comb_exp_check(target, child_state, env); + r |= add_state; + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + + switch (en->type) { + case ENCLOSE_MEMORY: + { + if (env->curr_max_regnum < en->regnum) + env->curr_max_regnum = en->regnum; + + r = setup_comb_exp_check(en->target, state, env); + } + break; + + default: + r = setup_comb_exp_check(en->target, state, env); + break; + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (IS_CALL_RECURSION(NCALL(node))) + env->has_recursion = 1; + else + r = setup_comb_exp_check(NCALL(node)->target, state, env); + break; +#endif + + default: + break; + } + + return r; +} +#endif + +#define IN_ALT (1<<0) +#define IN_NOT (1<<1) +#define IN_REPEAT (1<<2) +#define IN_VAR_REPEAT (1<<3) + +/* setup_tree does the following work. + 1. check empty loop. (set qn->target_empty_info) + 2. expand ignore-case in char class. + 3. set memory status bit flags. (reg->mem_stats) + 4. set qn->head_exact for [push, exact] -> [push_or_jump_exact1, exact]. + 5. find invalid patterns in look-behind. + 6. expand repeated string. + */ +static int +setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env) +{ + int type; + int r = 0; + + type = NTYPE(node); + switch (type) { + case NT_LIST: + { + Node* prev = NULL_NODE; + do { + r = setup_tree(NCAR(node), reg, state, env); + if (IS_NOT_NULL(prev) && r == 0) { + r = next_setup(prev, NCAR(node), reg); + } + prev = NCAR(node); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + } + break; + + case NT_ALT: + do { + r = setup_tree(NCAR(node), reg, (state | IN_ALT), env); + } while (r == 0 && IS_NOT_NULL(node = NCDR(node))); + break; + + case NT_CCLASS: + break; + + case NT_STR: + if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) { + r = expand_case_fold_string(node, reg); + } + break; + + case NT_CTYPE: + case NT_CANY: + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + break; +#endif + + case NT_BREF: + { + int i; + int* p; + Node** nodes = SCANENV_MEM_NODES(env); + BRefNode* br = NBREF(node); + p = BACKREFS_P(br); + for (i = 0; i < br->back_num; i++) { + if (p[i] > env->num_mem) return ONIGERR_INVALID_BACKREF; + BIT_STATUS_ON_AT(env->backrefed_mem, p[i]); + BIT_STATUS_ON_AT(env->bt_mem_start, p[i]); +#ifdef USE_BACKREF_WITH_LEVEL + if (IS_BACKREF_NEST_LEVEL(br)) { + BIT_STATUS_ON_AT(env->bt_mem_end, p[i]); + } +#endif + SET_ENCLOSE_STATUS(nodes[p[i]], NST_MEM_BACKREFED); + } + } + break; + + case NT_QTFR: + { + OnigDistance d; + QtfrNode* qn = NQTFR(node); + Node* target = qn->target; + + if ((state & IN_REPEAT) != 0) { + qn->state |= NST_IN_REPEAT; + } + + if (IS_REPEAT_INFINITE(qn->upper) || qn->upper >= 1) { + r = get_min_match_length(target, &d, env); + if (r) break; + if (d == 0) { + qn->target_empty_info = NQ_TARGET_IS_EMPTY; +#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT + r = quantifiers_memory_node_info(target); + if (r < 0) break; + if (r > 0) { + qn->target_empty_info = r; + } +#endif +#if 0 + r = get_max_match_length(target, &d, env); + if (r == 0 && d == 0) { + /* ()* ==> ()?, ()+ ==> () */ + qn->upper = 1; + if (qn->lower > 1) qn->lower = 1; + if (NTYPE(target) == NT_STR) { + qn->upper = qn->lower = 0; /* /(?:)+/ ==> // */ + } + } +#endif + } + } + + state |= IN_REPEAT; + if (qn->lower != qn->upper) + state |= IN_VAR_REPEAT; + r = setup_tree(target, reg, state, env); + if (r) break; + + /* expand string */ +#define EXPAND_STRING_MAX_LENGTH 100 + if (NTYPE(target) == NT_STR) { + if (!IS_REPEAT_INFINITE(qn->lower) && qn->lower == qn->upper && + qn->lower > 1 && qn->lower <= EXPAND_STRING_MAX_LENGTH) { + int len = NSTRING_LEN(target); + StrNode* sn = NSTR(target); + + if (len * qn->lower <= EXPAND_STRING_MAX_LENGTH) { + int i, n = qn->lower; + onig_node_conv_to_str_node(node, NSTR(target)->flag); + for (i = 0; i < n; i++) { + r = onig_node_str_cat(node, sn->s, sn->end); + if (r) break; + } + onig_node_free(target); + break; /* break case NT_QTFR: */ + } + } + } + +#ifdef USE_OP_PUSH_OR_JUMP_EXACT + if (qn->greedy && (qn->target_empty_info != 0)) { + if (NTYPE(target) == NT_QTFR) { + QtfrNode* tqn = NQTFR(target); + if (IS_NOT_NULL(tqn->head_exact)) { + qn->head_exact = tqn->head_exact; + tqn->head_exact = NULL; + } + } + else { + qn->head_exact = get_head_value_node(qn->target, 1, reg); + } + } +#endif + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + + switch (en->type) { + case ENCLOSE_OPTION: + { + OnigOptionType options = reg->options; + reg->options = NENCLOSE(node)->option; + r = setup_tree(NENCLOSE(node)->target, reg, state, env); + reg->options = options; + } + break; + + case ENCLOSE_MEMORY: + if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) { + BIT_STATUS_ON_AT(env->bt_mem_start, en->regnum); + /* SET_ENCLOSE_STATUS(node, NST_MEM_IN_ALT_NOT); */ + } + r = setup_tree(en->target, reg, state, env); + break; + + case ENCLOSE_STOP_BACKTRACK: + { + Node* target = en->target; + r = setup_tree(target, reg, state, env); + if (NTYPE(target) == NT_QTFR) { + QtfrNode* tqn = NQTFR(target); + if (IS_REPEAT_INFINITE(tqn->upper) && tqn->lower <= 1 && + tqn->greedy != 0) { /* (?>a*), a*+ etc... */ + int qtype = NTYPE(tqn->target); + if (IS_NODE_TYPE_SIMPLE(qtype)) + SET_ENCLOSE_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT); + } + } + } + break; + } + } + break; + + case NT_ANCHOR: + { + AnchorNode* an = NANCHOR(node); + + switch (an->type) { + case ANCHOR_PREC_READ: + r = setup_tree(an->target, reg, state, env); + break; + case ANCHOR_PREC_READ_NOT: + r = setup_tree(an->target, reg, (state | IN_NOT), env); + break; + +/* allowed node types in look-behind */ +#define ALLOWED_TYPE_IN_LB \ + ( BIT_NT_LIST | BIT_NT_ALT | BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE | \ + BIT_NT_CANY | BIT_NT_ANCHOR | BIT_NT_ENCLOSE | BIT_NT_QTFR | BIT_NT_CALL ) + +#define ALLOWED_ENCLOSE_IN_LB ( ENCLOSE_MEMORY ) +#define ALLOWED_ENCLOSE_IN_LB_NOT 0 + +#define ALLOWED_ANCHOR_IN_LB \ +( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) +#define ALLOWED_ANCHOR_IN_LB_NOT \ +( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION ) + + case ANCHOR_LOOK_BEHIND: + { + r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB, + ALLOWED_ENCLOSE_IN_LB, ALLOWED_ANCHOR_IN_LB); + if (r < 0) return r; + if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + r = setup_look_behind(node, reg, env); + if (r != 0) return r; + r = setup_tree(an->target, reg, state, env); + } + break; + + case ANCHOR_LOOK_BEHIND_NOT: + { + r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB, + ALLOWED_ENCLOSE_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT); + if (r < 0) return r; + if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN; + r = setup_look_behind(node, reg, env); + if (r != 0) return r; + r = setup_tree(an->target, reg, (state | IN_NOT), env); + } + break; + } + } + break; + + default: + break; + } + + return r; +} + +/* set skip map for Boyer-Moor search */ +static int +set_bm_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, + UChar skip[], int** int_skip) +{ + int i, len; + + len = end - s; + if (len < ONIG_CHAR_TABLE_SIZE) { + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) skip[i] = len; + + for (i = 0; i < len - 1; i++) + skip[s[i]] = len - 1 - i; + } + else { + if (IS_NULL(*int_skip)) { + *int_skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE); + if (IS_NULL(*int_skip)) return ONIGERR_MEMORY; + } + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) (*int_skip)[i] = len; + + for (i = 0; i < len - 1; i++) + (*int_skip)[s[i]] = len - 1 - i; + } + return 0; +} + +#define OPT_EXACT_MAXLEN 24 + +typedef struct { + OnigDistance min; /* min byte length */ + OnigDistance max; /* max byte length */ +} MinMaxLen; + +typedef struct { + MinMaxLen mmd; + OnigEncoding enc; + OnigOptionType options; + OnigCaseFoldType case_fold_flag; + ScanEnv* scan_env; +} OptEnv; + +typedef struct { + int left_anchor; + int right_anchor; +} OptAncInfo; + +typedef struct { + MinMaxLen mmd; /* info position */ + OptAncInfo anc; + + int reach_end; + int ignore_case; + int len; + UChar s[OPT_EXACT_MAXLEN]; +} OptExactInfo; + +typedef struct { + MinMaxLen mmd; /* info position */ + OptAncInfo anc; + + int value; /* weighted value */ + UChar map[ONIG_CHAR_TABLE_SIZE]; +} OptMapInfo; + +typedef struct { + MinMaxLen len; + + OptAncInfo anc; + OptExactInfo exb; /* boundary */ + OptExactInfo exm; /* middle */ + OptExactInfo expr; /* prec read (?=...) */ + + OptMapInfo map; /* boundary */ +} NodeOptInfo; + + +static int +map_position_value(OnigEncoding enc, int i) +{ + static const short int ByteValTable[] = { + 5, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 10, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 12, 4, 7, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 1 + }; + + if (i < (int )(sizeof(ByteValTable)/sizeof(ByteValTable[0]))) { + if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1) + return 20; + else + return (int )ByteValTable[i]; + } + else + return 4; /* Take it easy. */ +} + +static int +distance_value(MinMaxLen* mm) +{ + /* 1000 / (min-max-dist + 1) */ + static const short int dist_vals[] = { + 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100, + 91, 83, 77, 71, 67, 63, 59, 56, 53, 50, + 48, 45, 43, 42, 40, 38, 37, 36, 34, 33, + 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, + 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, + 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, + 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 10, 10, 10, 10, 10 + }; + + int d; + + if (mm->max == ONIG_INFINITE_DISTANCE) return 0; + + d = mm->max - mm->min; + if (d < (int )(sizeof(dist_vals)/sizeof(dist_vals[0]))) + /* return dist_vals[d] * 16 / (mm->min + 12); */ + return (int )dist_vals[d]; + else + return 1; +} + +static int +comp_distance_value(MinMaxLen* d1, MinMaxLen* d2, int v1, int v2) +{ + if (v2 <= 0) return -1; + if (v1 <= 0) return 1; + + v1 *= distance_value(d1); + v2 *= distance_value(d2); + + if (v2 > v1) return 1; + if (v2 < v1) return -1; + + if (d2->min < d1->min) return 1; + if (d2->min > d1->min) return -1; + return 0; +} + +static int +is_equal_mml(MinMaxLen* a, MinMaxLen* b) +{ + return (a->min == b->min && a->max == b->max) ? 1 : 0; +} + + +static void +set_mml(MinMaxLen* mml, OnigDistance min, OnigDistance max) +{ + mml->min = min; + mml->max = max; +} + +static void +clear_mml(MinMaxLen* mml) +{ + mml->min = mml->max = 0; +} + +static void +copy_mml(MinMaxLen* to, MinMaxLen* from) +{ + to->min = from->min; + to->max = from->max; +} + +static void +add_mml(MinMaxLen* to, MinMaxLen* from) +{ + to->min = distance_add(to->min, from->min); + to->max = distance_add(to->max, from->max); +} + +#if 0 +static void +add_len_mml(MinMaxLen* to, OnigDistance len) +{ + to->min = distance_add(to->min, len); + to->max = distance_add(to->max, len); +} +#endif + +static void +alt_merge_mml(MinMaxLen* to, MinMaxLen* from) +{ + if (to->min > from->min) to->min = from->min; + if (to->max < from->max) to->max = from->max; +} + +static void +copy_opt_env(OptEnv* to, OptEnv* from) +{ + *to = *from; +} + +static void +clear_opt_anc_info(OptAncInfo* anc) +{ + anc->left_anchor = 0; + anc->right_anchor = 0; +} + +static void +copy_opt_anc_info(OptAncInfo* to, OptAncInfo* from) +{ + *to = *from; +} + +static void +concat_opt_anc_info(OptAncInfo* to, OptAncInfo* left, OptAncInfo* right, + OnigDistance left_len, OnigDistance right_len) +{ + clear_opt_anc_info(to); + + to->left_anchor = left->left_anchor; + if (left_len == 0) { + to->left_anchor |= right->left_anchor; + } + + to->right_anchor = right->right_anchor; + if (right_len == 0) { + to->right_anchor |= left->right_anchor; + } +} + +static int +is_left_anchor(int anc) +{ + if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF || + anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ || + anc == ANCHOR_PREC_READ_NOT) + return 0; + + return 1; +} + +static int +is_set_opt_anc_info(OptAncInfo* to, int anc) +{ + if ((to->left_anchor & anc) != 0) return 1; + + return ((to->right_anchor & anc) != 0 ? 1 : 0); +} + +static void +add_opt_anc_info(OptAncInfo* to, int anc) +{ + if (is_left_anchor(anc)) + to->left_anchor |= anc; + else + to->right_anchor |= anc; +} + +static void +remove_opt_anc_info(OptAncInfo* to, int anc) +{ + if (is_left_anchor(anc)) + to->left_anchor &= ~anc; + else + to->right_anchor &= ~anc; +} + +static void +alt_merge_opt_anc_info(OptAncInfo* to, OptAncInfo* add) +{ + to->left_anchor &= add->left_anchor; + to->right_anchor &= add->right_anchor; +} + +static int +is_full_opt_exact_info(OptExactInfo* ex) +{ + return (ex->len >= OPT_EXACT_MAXLEN ? 1 : 0); +} + +static void +clear_opt_exact_info(OptExactInfo* ex) +{ + clear_mml(&ex->mmd); + clear_opt_anc_info(&ex->anc); + ex->reach_end = 0; + ex->ignore_case = 0; + ex->len = 0; + ex->s[0] = '\0'; +} + +static void +copy_opt_exact_info(OptExactInfo* to, OptExactInfo* from) +{ + *to = *from; +} + +static void +concat_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OnigEncoding enc) +{ + int i, j, len; + UChar *p, *end; + OptAncInfo tanc; + + if (! to->ignore_case && add->ignore_case) { + if (to->len >= add->len) return ; /* avoid */ + + to->ignore_case = 1; + } + + p = add->s; + end = p + add->len; + for (i = to->len; p < end; ) { + len = enclen(enc, p, end); + if (i + len > OPT_EXACT_MAXLEN) break; + for (j = 0; j < len && p < end; j++) + to->s[i++] = *p++; + } + + to->len = i; + to->reach_end = (p == end ? add->reach_end : 0); + + concat_opt_anc_info(&tanc, &to->anc, &add->anc, 1, 1); + if (! to->reach_end) tanc.right_anchor = 0; + copy_opt_anc_info(&to->anc, &tanc); +} + +static void +concat_opt_exact_info_str(OptExactInfo* to, UChar* s, UChar* end, + int raw ARG_UNUSED, OnigEncoding enc) +{ + int i, j, len; + UChar *p; + + for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) { + len = enclen(enc, p, end); + if (i + len > OPT_EXACT_MAXLEN) break; + for (j = 0; j < len && p < end; j++) + to->s[i++] = *p++; + } + + to->len = i; +} + +static void +alt_merge_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OptEnv* env) +{ + int i, j, len; + + if (add->len == 0 || to->len == 0) { + clear_opt_exact_info(to); + return ; + } + + if (! is_equal_mml(&to->mmd, &add->mmd)) { + clear_opt_exact_info(to); + return ; + } + + for (i = 0; i < to->len && i < add->len; ) { + if (to->s[i] != add->s[i]) break; + len = enclen(env->enc, to->s + i, to->s + to->len); + + for (j = 1; j < len; j++) { + if (to->s[i+j] != add->s[i+j]) break; + } + if (j < len) break; + i += len; + } + + if (! add->reach_end || i < add->len || i < to->len) { + to->reach_end = 0; + } + to->len = i; + to->ignore_case |= add->ignore_case; + + alt_merge_opt_anc_info(&to->anc, &add->anc); + if (! to->reach_end) to->anc.right_anchor = 0; +} + +static void +select_opt_exact_info(OnigEncoding enc, OptExactInfo* now, OptExactInfo* alt) +{ + int v1, v2; + + v1 = now->len; + v2 = alt->len; + + if (v2 == 0) { + return ; + } + else if (v1 == 0) { + copy_opt_exact_info(now, alt); + return ; + } + else if (v1 <= 2 && v2 <= 2) { + /* ByteValTable[x] is big value --> low price */ + v2 = map_position_value(enc, now->s[0]); + v1 = map_position_value(enc, alt->s[0]); + + if (now->len > 1) v1 += 5; + if (alt->len > 1) v2 += 5; + } + + if (now->ignore_case == 0) v1 *= 2; + if (alt->ignore_case == 0) v2 *= 2; + + if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0) + copy_opt_exact_info(now, alt); +} + +static void +clear_opt_map_info(OptMapInfo* map) +{ + static const OptMapInfo clean_info = { + {0, 0}, {0, 0}, 0, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }; + + xmemcpy(map, &clean_info, sizeof(OptMapInfo)); +} + +static void +copy_opt_map_info(OptMapInfo* to, OptMapInfo* from) +{ + *to = *from; +} + +static void +add_char_opt_map_info(OptMapInfo* map, UChar c, OnigEncoding enc) +{ + if (map->map[c] == 0) { + map->map[c] = 1; + map->value += map_position_value(enc, c); + } +} + +static int +add_char_amb_opt_map_info(OptMapInfo* map, UChar* p, UChar* end, + OnigEncoding enc, OnigCaseFoldType case_fold_flag) +{ + OnigCaseFoldCodeItem items[ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM]; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + int i, n; + + add_char_opt_map_info(map, p[0], enc); + + case_fold_flag = DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag); + n = ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc, case_fold_flag, p, end, items); + if (n < 0) return n; + + for (i = 0; i < n; i++) { + ONIGENC_CODE_TO_MBC(enc, items[i].code[0], buf); + add_char_opt_map_info(map, buf[0], enc); + } + + return 0; +} + +static void +select_opt_map_info(OptMapInfo* now, OptMapInfo* alt) +{ + const int z = 1<<15; /* 32768: something big value */ + + int v1, v2; + + if (alt->value == 0) return ; + if (now->value == 0) { + copy_opt_map_info(now, alt); + return ; + } + + v1 = z / now->value; + v2 = z / alt->value; + if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0) + copy_opt_map_info(now, alt); +} + +static int +comp_opt_exact_or_map_info(OptExactInfo* e, OptMapInfo* m) +{ +#define COMP_EM_BASE 20 + int ve, vm; + + if (m->value <= 0) return -1; + + ve = COMP_EM_BASE * e->len * (e->ignore_case ? 1 : 2); + vm = COMP_EM_BASE * 5 * 2 / m->value; + return comp_distance_value(&e->mmd, &m->mmd, ve, vm); +} + +static void +alt_merge_opt_map_info(OnigEncoding enc, OptMapInfo* to, OptMapInfo* add) +{ + int i, val; + + /* if (! is_equal_mml(&to->mmd, &add->mmd)) return ; */ + if (to->value == 0) return ; + if (add->value == 0 || to->mmd.max < add->mmd.min) { + clear_opt_map_info(to); + return ; + } + + alt_merge_mml(&to->mmd, &add->mmd); + + val = 0; + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) { + if (add->map[i]) + to->map[i] = 1; + + if (to->map[i]) + val += map_position_value(enc, i); + } + to->value = val; + + alt_merge_opt_anc_info(&to->anc, &add->anc); +} + +static void +set_bound_node_opt_info(NodeOptInfo* opt, MinMaxLen* mmd) +{ + copy_mml(&(opt->exb.mmd), mmd); + copy_mml(&(opt->expr.mmd), mmd); + copy_mml(&(opt->map.mmd), mmd); +} + +static void +clear_node_opt_info(NodeOptInfo* opt) +{ + clear_mml(&opt->len); + clear_opt_anc_info(&opt->anc); + clear_opt_exact_info(&opt->exb); + clear_opt_exact_info(&opt->exm); + clear_opt_exact_info(&opt->expr); + clear_opt_map_info(&opt->map); +} + +static void +copy_node_opt_info(NodeOptInfo* to, NodeOptInfo* from) +{ + *to = *from; +} + +static void +concat_left_node_opt_info(OnigEncoding enc, NodeOptInfo* to, NodeOptInfo* add) +{ + int exb_reach, exm_reach; + OptAncInfo tanc; + + concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max); + copy_opt_anc_info(&to->anc, &tanc); + + if (add->exb.len > 0 && to->len.max == 0) { + concat_opt_anc_info(&tanc, &to->anc, &add->exb.anc, + to->len.max, add->len.max); + copy_opt_anc_info(&add->exb.anc, &tanc); + } + + if (add->map.value > 0 && to->len.max == 0) { + if (add->map.mmd.max == 0) + add->map.anc.left_anchor |= to->anc.left_anchor; + } + + exb_reach = to->exb.reach_end; + exm_reach = to->exm.reach_end; + + if (add->len.max != 0) + to->exb.reach_end = to->exm.reach_end = 0; + + if (add->exb.len > 0) { + if (exb_reach) { + concat_opt_exact_info(&to->exb, &add->exb, enc); + clear_opt_exact_info(&add->exb); + } + else if (exm_reach) { + concat_opt_exact_info(&to->exm, &add->exb, enc); + clear_opt_exact_info(&add->exb); + } + } + select_opt_exact_info(enc, &to->exm, &add->exb); + select_opt_exact_info(enc, &to->exm, &add->exm); + + if (to->expr.len > 0) { + if (add->len.max > 0) { + if (to->expr.len > (int )add->len.max) + to->expr.len = add->len.max; + + if (to->expr.mmd.max == 0) + select_opt_exact_info(enc, &to->exb, &to->expr); + else + select_opt_exact_info(enc, &to->exm, &to->expr); + } + } + else if (add->expr.len > 0) { + copy_opt_exact_info(&to->expr, &add->expr); + } + + select_opt_map_info(&to->map, &add->map); + + add_mml(&to->len, &add->len); +} + +static void +alt_merge_node_opt_info(NodeOptInfo* to, NodeOptInfo* add, OptEnv* env) +{ + alt_merge_opt_anc_info (&to->anc, &add->anc); + alt_merge_opt_exact_info(&to->exb, &add->exb, env); + alt_merge_opt_exact_info(&to->exm, &add->exm, env); + alt_merge_opt_exact_info(&to->expr, &add->expr, env); + alt_merge_opt_map_info(env->enc, &to->map, &add->map); + + alt_merge_mml(&to->len, &add->len); +} + + +#define MAX_NODE_OPT_INFO_REF_COUNT 5 + +static int +optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) +{ + int type; + int r = 0; + + clear_node_opt_info(opt); + set_bound_node_opt_info(opt, &env->mmd); + + type = NTYPE(node); + switch (type) { + case NT_LIST: + { + OptEnv nenv; + NodeOptInfo nopt; + Node* nd = node; + + copy_opt_env(&nenv, env); + do { + r = optimize_node_left(NCAR(nd), &nopt, &nenv); + if (r == 0) { + add_mml(&nenv.mmd, &nopt.len); + concat_left_node_opt_info(env->enc, opt, &nopt); + } + } while (r == 0 && IS_NOT_NULL(nd = NCDR(nd))); + } + break; + + case NT_ALT: + { + NodeOptInfo nopt; + Node* nd = node; + + do { + r = optimize_node_left(NCAR(nd), &nopt, env); + if (r == 0) { + if (nd == node) copy_node_opt_info(opt, &nopt); + else alt_merge_node_opt_info(opt, &nopt, env); + } + } while ((r == 0) && IS_NOT_NULL(nd = NCDR(nd))); + } + break; + + case NT_STR: + { + StrNode* sn = NSTR(node); + int slen = sn->end - sn->s; + int is_raw = NSTRING_IS_RAW(node); + + if (! NSTRING_IS_AMBIG(node)) { + concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, + NSTRING_IS_RAW(node), env->enc); + if (slen > 0) { + add_char_opt_map_info(&opt->map, *(sn->s), env->enc); + } + set_mml(&opt->len, slen, slen); + } + else { + int max; + + if (NSTRING_IS_DONT_GET_OPT_INFO(node)) { + int n = onigenc_strlen(env->enc, sn->s, sn->end); + max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n; + } + else { + concat_opt_exact_info_str(&opt->exb, sn->s, sn->end, + is_raw, env->enc); + opt->exb.ignore_case = 1; + + if (slen > 0) { + r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end, + env->enc, env->case_fold_flag); + if (r != 0) break; + } + + max = slen; + } + + set_mml(&opt->len, slen, max); + } + + if (opt->exb.len == slen) + opt->exb.reach_end = 1; + } + break; + + case NT_CCLASS: + { + int i, z; + CClassNode* cc = NCCLASS(node); + + /* no need to check ignore case. (setted in setup_tree()) */ + + if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) { + OnigDistance min = ONIGENC_MBC_MINLEN(env->enc); + OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc); + + set_mml(&opt->len, min, max); + } + else { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + z = BITSET_AT(cc->bs, i); + if ((z && !IS_NCCLASS_NOT(cc)) || (!z && IS_NCCLASS_NOT(cc))) { + add_char_opt_map_info(&opt->map, (UChar )i, env->enc); + } + } + set_mml(&opt->len, 1, 1); + } + } + break; + + case NT_CTYPE: + { + int i, min, max; + + max = ONIGENC_MBC_MAXLEN_DIST(env->enc); + + if (max == 1) { + min = 1; + + switch (NCTYPE(node)->ctype) { + case ONIGENC_CTYPE_WORD: + if (NCTYPE(node)->not != 0) { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (! ONIGENC_IS_CODE_WORD(env->enc, i)) { + add_char_opt_map_info(&opt->map, (UChar )i, env->enc); + } + } + } + else { + for (i = 0; i < SINGLE_BYTE_SIZE; i++) { + if (ONIGENC_IS_CODE_WORD(env->enc, i)) { + add_char_opt_map_info(&opt->map, (UChar )i, env->enc); + } + } + } + break; + } + } + else { + min = ONIGENC_MBC_MINLEN(env->enc); + } + set_mml(&opt->len, min, max); + } + break; + + case NT_CANY: + { + OnigDistance min = ONIGENC_MBC_MINLEN(env->enc); + OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc); + set_mml(&opt->len, min, max); + } + break; + + case NT_ANCHOR: + switch (NANCHOR(node)->type) { + case ANCHOR_BEGIN_BUF: + case ANCHOR_BEGIN_POSITION: + case ANCHOR_BEGIN_LINE: + case ANCHOR_END_BUF: + case ANCHOR_SEMI_END_BUF: + case ANCHOR_END_LINE: + add_opt_anc_info(&opt->anc, NANCHOR(node)->type); + break; + + case ANCHOR_PREC_READ: + { + NodeOptInfo nopt; + + r = optimize_node_left(NANCHOR(node)->target, &nopt, env); + if (r == 0) { + if (nopt.exb.len > 0) + copy_opt_exact_info(&opt->expr, &nopt.exb); + else if (nopt.exm.len > 0) + copy_opt_exact_info(&opt->expr, &nopt.exm); + + opt->expr.reach_end = 0; + + if (nopt.map.value > 0) + copy_opt_map_info(&opt->map, &nopt.map); + } + } + break; + + case ANCHOR_PREC_READ_NOT: + case ANCHOR_LOOK_BEHIND: /* Sorry, I can't make use of it. */ + case ANCHOR_LOOK_BEHIND_NOT: + break; + } + break; + + case NT_BREF: + { + int i; + int* backs; + OnigDistance min, max, tmin, tmax; + Node** nodes = SCANENV_MEM_NODES(env->scan_env); + BRefNode* br = NBREF(node); + + if (br->state & NST_RECURSION) { + set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); + break; + } + backs = BACKREFS_P(br); + r = get_min_match_length(nodes[backs[0]], &min, env->scan_env); + if (r != 0) break; + r = get_max_match_length(nodes[backs[0]], &max, env->scan_env); + if (r != 0) break; + for (i = 1; i < br->back_num; i++) { + r = get_min_match_length(nodes[backs[i]], &tmin, env->scan_env); + if (r != 0) break; + r = get_max_match_length(nodes[backs[i]], &tmax, env->scan_env); + if (r != 0) break; + if (min > tmin) min = tmin; + if (max < tmax) max = tmax; + } + if (r == 0) set_mml(&opt->len, min, max); + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + if (IS_CALL_RECURSION(NCALL(node))) + set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE); + else { + OnigOptionType save = env->options; + env->options = NENCLOSE(NCALL(node)->target)->option; + r = optimize_node_left(NCALL(node)->target, opt, env); + env->options = save; + } + break; +#endif + + case NT_QTFR: + { + int i; + OnigDistance min, max; + NodeOptInfo nopt; + QtfrNode* qn = NQTFR(node); + + r = optimize_node_left(qn->target, &nopt, env); + if (r) break; + + if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) { + if (env->mmd.max == 0 && + NTYPE(qn->target) == NT_CANY && qn->greedy) { + if (IS_MULTILINE(env->options)) + add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_ML); + else + add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR); + } + } + else { + if (qn->lower > 0) { + copy_node_opt_info(opt, &nopt); + if (nopt.exb.len > 0) { + if (nopt.exb.reach_end) { + for (i = 2; i < qn->lower && + ! is_full_opt_exact_info(&opt->exb); i++) { + concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc); + } + if (i < qn->lower) { + opt->exb.reach_end = 0; + } + } + } + + if (qn->lower != qn->upper) { + opt->exb.reach_end = 0; + opt->exm.reach_end = 0; + } + if (qn->lower > 1) + opt->exm.reach_end = 0; + } + } + + min = distance_multiply(nopt.len.min, qn->lower); + if (IS_REPEAT_INFINITE(qn->upper)) + max = (nopt.len.max > 0 ? ONIG_INFINITE_DISTANCE : 0); + else + max = distance_multiply(nopt.len.max, qn->upper); + + set_mml(&opt->len, min, max); + } + break; + + case NT_ENCLOSE: + { + EncloseNode* en = NENCLOSE(node); + + switch (en->type) { + case ENCLOSE_OPTION: + { + OnigOptionType save = env->options; + + env->options = en->option; + r = optimize_node_left(en->target, opt, env); + env->options = save; + } + break; + + case ENCLOSE_MEMORY: +#ifdef USE_SUBEXP_CALL + en->opt_count++; + if (en->opt_count > MAX_NODE_OPT_INFO_REF_COUNT) { + OnigDistance min, max; + + min = 0; + max = ONIG_INFINITE_DISTANCE; + if (IS_ENCLOSE_MIN_FIXED(en)) min = en->min_len; + if (IS_ENCLOSE_MAX_FIXED(en)) max = en->max_len; + set_mml(&opt->len, min, max); + } + else +#endif + { + r = optimize_node_left(en->target, opt, env); + + if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) { + if (BIT_STATUS_AT(env->scan_env->backrefed_mem, en->regnum)) + remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK); + } + } + break; + + case ENCLOSE_STOP_BACKTRACK: + r = optimize_node_left(en->target, opt, env); + break; + } + } + break; + + default: +#ifdef ONIG_DEBUG + fprintf(stderr, "optimize_node_left: undefined node type %d\n", + NTYPE(node)); +#endif + r = ONIGERR_TYPE_BUG; + break; + } + + return r; +} + +static int +set_optimize_exact_info(regex_t* reg, OptExactInfo* e) +{ + int r; + + if (e->len == 0) return 0; + + if (e->ignore_case) { + reg->exact = (UChar* )xmalloc(e->len); + CHECK_NULL_RETURN_MEMERR(reg->exact); + xmemcpy(reg->exact, e->s, e->len); + reg->exact_end = reg->exact + e->len; + reg->optimize = ONIG_OPTIMIZE_EXACT_IC; + } + else { + int allow_reverse; + + reg->exact = str_dup(e->s, e->s + e->len); + CHECK_NULL_RETURN_MEMERR(reg->exact); + reg->exact_end = reg->exact + e->len; + + allow_reverse = + ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end); + + if (e->len >= 3 || (e->len >= 2 && allow_reverse)) { + r = set_bm_skip(reg->exact, reg->exact_end, reg->enc, + reg->map, &(reg->int_map)); + if (r) return r; + + reg->optimize = (allow_reverse != 0 + ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV); + } + else { + reg->optimize = ONIG_OPTIMIZE_EXACT; + } + } + + reg->dmin = e->mmd.min; + reg->dmax = e->mmd.max; + + if (reg->dmin != ONIG_INFINITE_DISTANCE) { + reg->threshold_len = reg->dmin + (reg->exact_end - reg->exact); + } + + return 0; +} + +static void +set_optimize_map_info(regex_t* reg, OptMapInfo* m) +{ + int i; + + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) + reg->map[i] = m->map[i]; + + reg->optimize = ONIG_OPTIMIZE_MAP; + reg->dmin = m->mmd.min; + reg->dmax = m->mmd.max; + + if (reg->dmin != ONIG_INFINITE_DISTANCE) { + reg->threshold_len = reg->dmin + 1; + } +} + +static void +set_sub_anchor(regex_t* reg, OptAncInfo* anc) +{ + reg->sub_anchor |= anc->left_anchor & ANCHOR_BEGIN_LINE; + reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE; +} + +#ifdef ONIG_DEBUG +static void print_optimize_info(FILE* f, regex_t* reg); +#endif + +static int +set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env) +{ + + int r; + NodeOptInfo opt; + OptEnv env; + + env.enc = reg->enc; + env.options = reg->options; + env.case_fold_flag = reg->case_fold_flag; + env.scan_env = scan_env; + clear_mml(&env.mmd); + + r = optimize_node_left(node, &opt, &env); + if (r) return r; + + reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF | + ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML); + + reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF); + + if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) { + reg->anchor_dmin = opt.len.min; + reg->anchor_dmax = opt.len.max; + } + + if (opt.exb.len > 0 || opt.exm.len > 0) { + select_opt_exact_info(reg->enc, &opt.exb, &opt.exm); + if (opt.map.value > 0 && + comp_opt_exact_or_map_info(&opt.exb, &opt.map) > 0) { + goto set_map; + } + else { + r = set_optimize_exact_info(reg, &opt.exb); + set_sub_anchor(reg, &opt.exb.anc); + } + } + else if (opt.map.value > 0) { + set_map: + set_optimize_map_info(reg, &opt.map); + set_sub_anchor(reg, &opt.map.anc); + } + else { + reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE; + if (opt.len.max == 0) + reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE; + } + +#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH) + print_optimize_info(stderr, reg); +#endif + return r; +} + +static void +clear_optimize_info(regex_t* reg) +{ + reg->optimize = ONIG_OPTIMIZE_NONE; + reg->anchor = 0; + reg->anchor_dmin = 0; + reg->anchor_dmax = 0; + reg->sub_anchor = 0; + reg->exact_end = (UChar* )NULL; + reg->threshold_len = 0; + if (IS_NOT_NULL(reg->exact)) { + xfree(reg->exact); + reg->exact = (UChar* )NULL; + } +} + +#ifdef ONIG_DEBUG + +static void print_enc_string(FILE* fp, OnigEncoding enc, + const UChar *s, const UChar *end) +{ + fprintf(fp, "\nPATTERN: /"); + + if (ONIGENC_MBC_MINLEN(enc) > 1) { + const UChar *p; + OnigCodePoint code; + + p = s; + while (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code >= 0x80) { + fprintf(fp, " 0x%04x ", (int )code); + } + else { + fputc((int )code, fp); + } + + p += enclen(enc, p); + } + } + else { + while (s < end) { + fputc((int )*s, fp); + s++; + } + } + + fprintf(fp, "/\n"); +} + +static void +print_distance_range(FILE* f, OnigDistance a, OnigDistance b) +{ + if (a == ONIG_INFINITE_DISTANCE) + fputs("inf", f); + else + fprintf(f, "(%u)", a); + + fputs("-", f); + + if (b == ONIG_INFINITE_DISTANCE) + fputs("inf", f); + else + fprintf(f, "(%u)", b); +} + +static void +print_anchor(FILE* f, int anchor) +{ + int q = 0; + + fprintf(f, "["); + + if (anchor & ANCHOR_BEGIN_BUF) { + fprintf(f, "begin-buf"); + q = 1; + } + if (anchor & ANCHOR_BEGIN_LINE) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "begin-line"); + } + if (anchor & ANCHOR_BEGIN_POSITION) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "begin-pos"); + } + if (anchor & ANCHOR_END_BUF) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "end-buf"); + } + if (anchor & ANCHOR_SEMI_END_BUF) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "semi-end-buf"); + } + if (anchor & ANCHOR_END_LINE) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "end-line"); + } + if (anchor & ANCHOR_ANYCHAR_STAR) { + if (q) fprintf(f, ", "); + q = 1; + fprintf(f, "anychar-star"); + } + if (anchor & ANCHOR_ANYCHAR_STAR_ML) { + if (q) fprintf(f, ", "); + fprintf(f, "anychar-star-pl"); + } + + fprintf(f, "]"); +} + +static void +print_optimize_info(FILE* f, regex_t* reg) +{ + static const char* on[] = { "NONE", "EXACT", "EXACT_BM", "EXACT_BM_NOT_REV", + "EXACT_IC", "MAP" }; + + fprintf(f, "optimize: %s\n", on[reg->optimize]); + fprintf(f, " anchor: "); print_anchor(f, reg->anchor); + if ((reg->anchor & ANCHOR_END_BUF_MASK) != 0) + print_distance_range(f, reg->anchor_dmin, reg->anchor_dmax); + fprintf(f, "\n"); + + if (reg->optimize) { + fprintf(f, " sub anchor: "); print_anchor(f, reg->sub_anchor); + fprintf(f, "\n"); + } + fprintf(f, "\n"); + + if (reg->exact) { + UChar *p; + fprintf(f, "exact: ["); + for (p = reg->exact; p < reg->exact_end; p++) { + fputc(*p, f); + } + fprintf(f, "]: length: %d\n", (reg->exact_end - reg->exact)); + } + else if (reg->optimize & ONIG_OPTIMIZE_MAP) { + int c, i, n = 0; + + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) + if (reg->map[i]) n++; + + fprintf(f, "map: n=%d\n", n); + if (n > 0) { + c = 0; + fputc('[', f); + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) { + if (reg->map[i] != 0) { + if (c > 0) fputs(", ", f); + c++; + if (ONIGENC_MBC_MAXLEN(reg->enc) == 1 && + ONIGENC_IS_CODE_PRINT(reg->enc, (OnigCodePoint )i)) + fputc(i, f); + else + fprintf(f, "%d", i); + } + } + fprintf(f, "]\n"); + } + } +} +#endif /* ONIG_DEBUG */ + + +static void +onig_free_body(regex_t* reg) +{ + if (IS_NOT_NULL(reg->p)) xfree(reg->p); + if (IS_NOT_NULL(reg->exact)) xfree(reg->exact); + if (IS_NOT_NULL(reg->int_map)) xfree(reg->int_map); + if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward); + if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range); + if (IS_NOT_NULL(reg->chain)) onig_free(reg->chain); + +#ifdef USE_NAMED_GROUP + onig_names_free(reg); +#endif +} + +extern void +onig_free(regex_t* reg) +{ + if (IS_NOT_NULL(reg)) { + onig_free_body(reg); + xfree(reg); + } +} + +#define REGEX_TRANSFER(to,from) do {\ + (to)->state = ONIG_STATE_MODIFY;\ + onig_free_body(to);\ + xmemcpy(to, from, sizeof(regex_t));\ + xfree(from);\ +} while (0) + +extern void +onig_transfer(regex_t* to, regex_t* from) +{ + THREAD_ATOMIC_START; + REGEX_TRANSFER(to, from); + THREAD_ATOMIC_END; +} + +#define REGEX_CHAIN_HEAD(reg) do {\ + while (IS_NOT_NULL((reg)->chain)) {\ + (reg) = (reg)->chain;\ + }\ +} while (0) + +extern void +onig_chain_link_add(regex_t* to, regex_t* add) +{ + THREAD_ATOMIC_START; + REGEX_CHAIN_HEAD(to); + to->chain = add; + THREAD_ATOMIC_END; +} + +extern void +onig_chain_reduce(regex_t* reg) +{ + regex_t *head, *prev; + + prev = reg; + head = prev->chain; + if (IS_NOT_NULL(head)) { + reg->state = ONIG_STATE_MODIFY; + while (IS_NOT_NULL(head->chain)) { + prev = head; + head = head->chain; + } + prev->chain = (regex_t* )NULL; + REGEX_TRANSFER(reg, head); + } +} + +#if 0 +extern int +onig_clone(regex_t** to, regex_t* from) +{ + int r, size; + regex_t* reg; + +#ifdef USE_MULTI_THREAD_SYSTEM + if (ONIG_STATE(from) >= ONIG_STATE_NORMAL) { + ONIG_STATE_INC(from); + if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) { + onig_chain_reduce(from); + ONIG_STATE_INC(from); + } + } + else { + int n = 0; + while (ONIG_STATE(from) < ONIG_STATE_NORMAL) { + if (++n > THREAD_PASS_LIMIT_COUNT) + return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT; + THREAD_PASS; + } + ONIG_STATE_INC(from); + } +#endif /* USE_MULTI_THREAD_SYSTEM */ + + r = onig_alloc_init(®, ONIG_OPTION_NONE, ONIGENC_CASE_FOLD_DEFAULT, + from->enc, ONIG_SYNTAX_DEFAULT); + if (r != 0) { + ONIG_STATE_DEC(from); + return r; + } + + xmemcpy(reg, from, sizeof(onig_t)); + reg->chain = (regex_t* )NULL; + reg->state = ONIG_STATE_NORMAL; + + if (from->p) { + reg->p = (UChar* )xmalloc(reg->alloc); + if (IS_NULL(reg->p)) goto mem_error; + xmemcpy(reg->p, from->p, reg->alloc); + } + + if (from->exact) { + reg->exact = (UChar* )xmalloc(from->exact_end - from->exact); + if (IS_NULL(reg->exact)) goto mem_error; + reg->exact_end = reg->exact + (from->exact_end - from->exact); + xmemcpy(reg->exact, from->exact, reg->exact_end - reg->exact); + } + + if (from->int_map) { + size = sizeof(int) * ONIG_CHAR_TABLE_SIZE; + reg->int_map = (int* )xmalloc(size); + if (IS_NULL(reg->int_map)) goto mem_error; + xmemcpy(reg->int_map, from->int_map, size); + } + + if (from->int_map_backward) { + size = sizeof(int) * ONIG_CHAR_TABLE_SIZE; + reg->int_map_backward = (int* )xmalloc(size); + if (IS_NULL(reg->int_map_backward)) goto mem_error; + xmemcpy(reg->int_map_backward, from->int_map_backward, size); + } + +#ifdef USE_NAMED_GROUP + reg->name_table = names_clone(from); /* names_clone is not implemented */ +#endif + + ONIG_STATE_DEC(from); + *to = reg; + return 0; + + mem_error: + ONIG_STATE_DEC(from); + return ONIGERR_MEMORY; +} +#endif + +#ifdef ONIG_DEBUG +static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg)); +#endif +#ifdef ONIG_DEBUG_PARSE_TREE +static void print_tree P_((FILE* f, Node* node)); +#endif + +extern int +onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, + OnigErrorInfo* einfo) +{ +#define COMPILE_INIT_SIZE 20 + + int r, init_size; + Node* root; + ScanEnv scan_env; +#ifdef USE_SUBEXP_CALL + UnsetAddrList uslist; +#endif + + reg->state = ONIG_STATE_COMPILING; + +#ifdef ONIG_DEBUG + print_enc_string(stderr, reg->enc, pattern, pattern_end); +#endif + + if (reg->alloc == 0) { + init_size = (pattern_end - pattern) * 2; + if (init_size <= 0) init_size = COMPILE_INIT_SIZE; + r = BBUF_INIT(reg, init_size); + if (r != 0) goto end; + } + else + reg->used = 0; + + reg->num_mem = 0; + reg->num_repeat = 0; + reg->num_null_check = 0; + reg->repeat_range_alloc = 0; + reg->repeat_range = (OnigRepeatRange* )NULL; +#ifdef USE_COMBINATION_EXPLOSION_CHECK + reg->num_comb_exp_check = 0; +#endif + + r = onig_parse_make_tree(&root, pattern, pattern_end, reg, &scan_env); + if (r != 0) goto err; + +#ifdef USE_NAMED_GROUP + /* mixed use named group and no-named group */ + if (scan_env.num_named > 0 && + IS_SYNTAX_BV(scan_env.syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) { + if (scan_env.num_named != scan_env.num_mem) + r = disable_noname_group_capture(&root, reg, &scan_env); + else + r = numbered_ref_check(root); + + if (r != 0) goto err; + } +#endif + +#ifdef USE_SUBEXP_CALL + if (scan_env.num_call > 0) { + r = unset_addr_list_init(&uslist, scan_env.num_call); + if (r != 0) goto err; + scan_env.unset_addr_list = &uslist; + r = setup_subexp_call(root, &scan_env); + if (r != 0) goto err_unset; + r = subexp_recursive_check_trav(root, &scan_env); + if (r < 0) goto err_unset; + r = subexp_inf_recursive_check_trav(root, &scan_env); + if (r != 0) goto err_unset; + + reg->num_call = scan_env.num_call; + } + else + reg->num_call = 0; +#endif + + r = setup_tree(root, reg, 0, &scan_env); + if (r != 0) goto err_unset; + +#ifdef ONIG_DEBUG_PARSE_TREE + print_tree(stderr, root); +#endif + + reg->capture_history = scan_env.capture_history; + reg->bt_mem_start = scan_env.bt_mem_start; + reg->bt_mem_start |= reg->capture_history; + if (IS_FIND_CONDITION(reg->options)) + BIT_STATUS_ON_ALL(reg->bt_mem_end); + else { + reg->bt_mem_end = scan_env.bt_mem_end; + reg->bt_mem_end |= reg->capture_history; + } + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + if (scan_env.backrefed_mem == 0 +#ifdef USE_SUBEXP_CALL + || scan_env.num_call == 0 +#endif + ) { + setup_comb_exp_check(root, 0, &scan_env); +#ifdef USE_SUBEXP_CALL + if (scan_env.has_recursion != 0) { + scan_env.num_comb_exp_check = 0; + } + else +#endif + if (scan_env.comb_exp_max_regnum > 0) { + int i; + for (i = 1; i <= scan_env.comb_exp_max_regnum; i++) { + if (BIT_STATUS_AT(scan_env.backrefed_mem, i) != 0) { + scan_env.num_comb_exp_check = 0; + break; + } + } + } + } + + reg->num_comb_exp_check = scan_env.num_comb_exp_check; +#endif + + clear_optimize_info(reg); +#ifndef ONIG_DONT_OPTIMIZE + r = set_optimize_info_from_tree(root, reg, &scan_env); + if (r != 0) goto err_unset; +#endif + + if (IS_NOT_NULL(scan_env.mem_nodes_dynamic)) { + xfree(scan_env.mem_nodes_dynamic); + scan_env.mem_nodes_dynamic = (Node** )NULL; + } + + r = compile_tree(root, reg); + if (r == 0) { + r = add_opcode(reg, OP_END); +#ifdef USE_SUBEXP_CALL + if (scan_env.num_call > 0) { + r = unset_addr_list_fix(&uslist, reg); + unset_addr_list_end(&uslist); + if (r) goto err; + } +#endif + + if ((reg->num_repeat != 0) || (reg->bt_mem_end != 0)) + reg->stack_pop_level = STACK_POP_LEVEL_ALL; + else { + if (reg->bt_mem_start != 0) + reg->stack_pop_level = STACK_POP_LEVEL_MEM_START; + else + reg->stack_pop_level = STACK_POP_LEVEL_FREE; + } + } +#ifdef USE_SUBEXP_CALL + else if (scan_env.num_call > 0) { + unset_addr_list_end(&uslist); + } +#endif + onig_node_free(root); + +#ifdef ONIG_DEBUG_COMPILE +#ifdef USE_NAMED_GROUP + onig_print_names(stderr, reg); +#endif + print_compiled_byte_code_list(stderr, reg); +#endif + + end: + reg->state = ONIG_STATE_NORMAL; + return r; + + err_unset: +#ifdef USE_SUBEXP_CALL + if (scan_env.num_call > 0) { + unset_addr_list_end(&uslist); + } +#endif + err: + if (IS_NOT_NULL(scan_env.error)) { + if (IS_NOT_NULL(einfo)) { + einfo->enc = scan_env.enc; + einfo->par = scan_env.error; + einfo->par_end = scan_env.error_end; + } + } + + onig_node_free(root); + if (IS_NOT_NULL(scan_env.mem_nodes_dynamic)) + xfree(scan_env.mem_nodes_dynamic); + return r; +} + +#ifdef USE_RECOMPILE_API +extern int +onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, + OnigErrorInfo* einfo) +{ + int r; + regex_t *new_reg; + + r = onig_new(&new_reg, pattern, pattern_end, option, enc, syntax, einfo); + if (r) return r; + if (ONIG_STATE(reg) == ONIG_STATE_NORMAL) { + onig_transfer(reg, new_reg); + } + else { + onig_chain_link_add(reg, new_reg); + } + return 0; +} +#endif + +static int onig_inited = 0; + +extern int +onig_alloc_init(regex_t** reg, OnigOptionType option, + OnigCaseFoldType case_fold_flag, + OnigEncoding enc, const OnigSyntaxType* syntax) +{ + if (! onig_inited) + onig_init(); + + if (ONIGENC_IS_UNDEF(enc)) + return ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED; + + if ((option & (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) + == (ONIG_OPTION_DONT_CAPTURE_GROUP|ONIG_OPTION_CAPTURE_GROUP)) { + return ONIGERR_INVALID_COMBINATION_OF_OPTIONS; + } + + *reg = (regex_t* )xmalloc(sizeof(regex_t)); + if (IS_NULL(*reg)) return ONIGERR_MEMORY; + (*reg)->state = ONIG_STATE_MODIFY; + + if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) { + option |= syntax->options; + option &= ~ONIG_OPTION_SINGLELINE; + } + else + option |= syntax->options; + + (*reg)->enc = enc; + (*reg)->options = option; + (*reg)->syntax = syntax; + (*reg)->optimize = 0; + (*reg)->exact = (UChar* )NULL; + (*reg)->int_map = (int* )NULL; + (*reg)->int_map_backward = (int* )NULL; + (*reg)->chain = (regex_t* )NULL; + + (*reg)->p = (UChar* )NULL; + (*reg)->alloc = 0; + (*reg)->used = 0; + (*reg)->name_table = (void* )NULL; + + (*reg)->case_fold_flag = case_fold_flag; + return 0; +} + +extern int +onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end, + OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, + OnigErrorInfo* einfo) +{ + int r; + + if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL; + + r = onig_alloc_init(reg, option, ONIGENC_CASE_FOLD_DEFAULT, + enc, syntax); + if (r) return r; + + r = onig_compile(*reg, pattern, pattern_end, einfo); + if (r) { + onig_free(*reg); + *reg = NULL; + } + return r; +} + +extern int +onig_init(void) +{ + if (onig_inited != 0) + return 0; + + THREAD_SYSTEM_INIT; + THREAD_ATOMIC_START; + + onig_inited = 1; + + onigenc_init(); + /* onigenc_set_default_caseconv_table((UChar* )0); */ + +#ifdef ONIG_DEBUG_STATISTICS + onig_statistics_init(); +#endif + + THREAD_ATOMIC_END; + return 0; +} + + +extern int +onig_end(void) +{ + THREAD_ATOMIC_START; + +#ifdef ONIG_DEBUG_STATISTICS + onig_print_statistics(stderr); +#endif + +#ifdef USE_SHARED_CCLASS_TABLE + onig_free_shared_cclass_table(); +#endif + +#ifdef USE_PARSE_TREE_NODE_RECYCLE + onig_free_node_list(); +#endif + + onig_inited = 0; + + THREAD_ATOMIC_END; + THREAD_SYSTEM_END; + return 0; +} + +extern int +onig_is_in_code_range(const UChar* p, OnigCodePoint code) +{ + OnigCodePoint n, *data; + OnigCodePoint low, high, x; + + GET_CODE_POINT(n, p); + data = (OnigCodePoint* )p; + data++; + + for (low = 0, high = n; low < high; ) { + x = (low + high) >> 1; + if (code > data[x * 2 + 1]) + low = x + 1; + else + high = x; + } + + return ((low < n && code >= data[low * 2]) ? 1 : 0); +} + +extern int +onig_is_code_in_cc_len(int elen, OnigCodePoint code, CClassNode* cc) +{ + int found; + + if (elen > 1 || (code >= SINGLE_BYTE_SIZE)) { + if (IS_NULL(cc->mbuf)) { + found = 0; + } + else { + found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0); + } + } + else { + found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1); + } + + if (IS_NCCLASS_NOT(cc)) + return !found; + else + return found; +} + +extern int +onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc) +{ + int len; + + if (ONIGENC_MBC_MINLEN(enc) > 1) { + len = 2; + } + else { + len = ONIGENC_CODE_TO_MBCLEN(enc, code); + } + return onig_is_code_in_cc_len(len, code, cc); +} + + +#ifdef ONIG_DEBUG + +/* arguments type */ +#define ARG_SPECIAL -1 +#define ARG_NON 0 +#define ARG_RELADDR 1 +#define ARG_ABSADDR 2 +#define ARG_LENGTH 3 +#define ARG_MEMNUM 4 +#define ARG_OPTION 5 +#define ARG_STATE_CHECK 6 + +OnigOpInfoType OnigOpInfo[] = { + { OP_FINISH, "finish", ARG_NON }, + { OP_END, "end", ARG_NON }, + { OP_EXACT1, "exact1", ARG_SPECIAL }, + { OP_EXACT2, "exact2", ARG_SPECIAL }, + { OP_EXACT3, "exact3", ARG_SPECIAL }, + { OP_EXACT4, "exact4", ARG_SPECIAL }, + { OP_EXACT5, "exact5", ARG_SPECIAL }, + { OP_EXACTN, "exactn", ARG_SPECIAL }, + { OP_EXACTMB2N1, "exactmb2-n1", ARG_SPECIAL }, + { OP_EXACTMB2N2, "exactmb2-n2", ARG_SPECIAL }, + { OP_EXACTMB2N3, "exactmb2-n3", ARG_SPECIAL }, + { OP_EXACTMB2N, "exactmb2-n", ARG_SPECIAL }, + { OP_EXACTMB3N, "exactmb3n" , ARG_SPECIAL }, + { OP_EXACTMBN, "exactmbn", ARG_SPECIAL }, + { OP_EXACT1_IC, "exact1-ic", ARG_SPECIAL }, + { OP_EXACTN_IC, "exactn-ic", ARG_SPECIAL }, + { OP_CCLASS, "cclass", ARG_SPECIAL }, + { OP_CCLASS_MB, "cclass-mb", ARG_SPECIAL }, + { OP_CCLASS_MIX, "cclass-mix", ARG_SPECIAL }, + { OP_CCLASS_NOT, "cclass-not", ARG_SPECIAL }, + { OP_CCLASS_MB_NOT, "cclass-mb-not", ARG_SPECIAL }, + { OP_CCLASS_MIX_NOT, "cclass-mix-not", ARG_SPECIAL }, + { OP_CCLASS_NODE, "cclass-node", ARG_SPECIAL }, + { OP_ANYCHAR, "anychar", ARG_NON }, + { OP_ANYCHAR_ML, "anychar-ml", ARG_NON }, + { OP_ANYCHAR_STAR, "anychar*", ARG_NON }, + { OP_ANYCHAR_ML_STAR, "anychar-ml*", ARG_NON }, + { OP_ANYCHAR_STAR_PEEK_NEXT, "anychar*-peek-next", ARG_SPECIAL }, + { OP_ANYCHAR_ML_STAR_PEEK_NEXT, "anychar-ml*-peek-next", ARG_SPECIAL }, + { OP_WORD, "word", ARG_NON }, + { OP_NOT_WORD, "not-word", ARG_NON }, + { OP_WORD_BOUND, "word-bound", ARG_NON }, + { OP_NOT_WORD_BOUND, "not-word-bound", ARG_NON }, + { OP_WORD_BEGIN, "word-begin", ARG_NON }, + { OP_WORD_END, "word-end", ARG_NON }, + { OP_BEGIN_BUF, "begin-buf", ARG_NON }, + { OP_END_BUF, "end-buf", ARG_NON }, + { OP_BEGIN_LINE, "begin-line", ARG_NON }, + { OP_END_LINE, "end-line", ARG_NON }, + { OP_SEMI_END_BUF, "semi-end-buf", ARG_NON }, + { OP_BEGIN_POSITION, "begin-position", ARG_NON }, + { OP_BACKREF1, "backref1", ARG_NON }, + { OP_BACKREF2, "backref2", ARG_NON }, + { OP_BACKREFN, "backrefn", ARG_MEMNUM }, + { OP_BACKREFN_IC, "backrefn-ic", ARG_SPECIAL }, + { OP_BACKREF_MULTI, "backref_multi", ARG_SPECIAL }, + { OP_BACKREF_MULTI_IC, "backref_multi-ic", ARG_SPECIAL }, + { OP_BACKREF_WITH_LEVEL, "backref_at_level", ARG_SPECIAL }, + { OP_MEMORY_START_PUSH, "mem-start-push", ARG_MEMNUM }, + { OP_MEMORY_START, "mem-start", ARG_MEMNUM }, + { OP_MEMORY_END_PUSH, "mem-end-push", ARG_MEMNUM }, + { OP_MEMORY_END_PUSH_REC, "mem-end-push-rec", ARG_MEMNUM }, + { OP_MEMORY_END, "mem-end", ARG_MEMNUM }, + { OP_MEMORY_END_REC, "mem-end-rec", ARG_MEMNUM }, + { OP_SET_OPTION_PUSH, "set-option-push", ARG_OPTION }, + { OP_SET_OPTION, "set-option", ARG_OPTION }, + { OP_FAIL, "fail", ARG_NON }, + { OP_JUMP, "jump", ARG_RELADDR }, + { OP_PUSH, "push", ARG_RELADDR }, + { OP_POP, "pop", ARG_NON }, + { OP_PUSH_OR_JUMP_EXACT1, "push-or-jump-e1", ARG_SPECIAL }, + { OP_PUSH_IF_PEEK_NEXT, "push-if-peek-next", ARG_SPECIAL }, + { OP_REPEAT, "repeat", ARG_SPECIAL }, + { OP_REPEAT_NG, "repeat-ng", ARG_SPECIAL }, + { OP_REPEAT_INC, "repeat-inc", ARG_MEMNUM }, + { OP_REPEAT_INC_NG, "repeat-inc-ng", ARG_MEMNUM }, + { OP_REPEAT_INC_SG, "repeat-inc-sg", ARG_MEMNUM }, + { OP_REPEAT_INC_NG_SG, "repeat-inc-ng-sg", ARG_MEMNUM }, + { OP_NULL_CHECK_START, "null-check-start", ARG_MEMNUM }, + { OP_NULL_CHECK_END, "null-check-end", ARG_MEMNUM }, + { OP_NULL_CHECK_END_MEMST,"null-check-end-memst", ARG_MEMNUM }, + { OP_NULL_CHECK_END_MEMST_PUSH,"null-check-end-memst-push", ARG_MEMNUM }, + { OP_PUSH_POS, "push-pos", ARG_NON }, + { OP_POP_POS, "pop-pos", ARG_NON }, + { OP_PUSH_POS_NOT, "push-pos-not", ARG_RELADDR }, + { OP_FAIL_POS, "fail-pos", ARG_NON }, + { OP_PUSH_STOP_BT, "push-stop-bt", ARG_NON }, + { OP_POP_STOP_BT, "pop-stop-bt", ARG_NON }, + { OP_LOOK_BEHIND, "look-behind", ARG_SPECIAL }, + { OP_PUSH_LOOK_BEHIND_NOT, "push-look-behind-not", ARG_SPECIAL }, + { OP_FAIL_LOOK_BEHIND_NOT, "fail-look-behind-not", ARG_NON }, + { OP_CALL, "call", ARG_ABSADDR }, + { OP_RETURN, "return", ARG_NON }, + { OP_STATE_CHECK_PUSH, "state-check-push", ARG_SPECIAL }, + { OP_STATE_CHECK_PUSH_OR_JUMP, "state-check-push-or-jump", ARG_SPECIAL }, + { OP_STATE_CHECK, "state-check", ARG_STATE_CHECK }, + { OP_STATE_CHECK_ANYCHAR_STAR, "state-check-anychar*", ARG_STATE_CHECK }, + { OP_STATE_CHECK_ANYCHAR_ML_STAR, + "state-check-anychar-ml*", ARG_STATE_CHECK }, + { -1, "", ARG_NON } +}; + +static char* +op2name(int opcode) +{ + int i; + + for (i = 0; OnigOpInfo[i].opcode >= 0; i++) { + if (opcode == OnigOpInfo[i].opcode) + return OnigOpInfo[i].name; + } + return ""; +} + +static int +op2arg_type(int opcode) +{ + int i; + + for (i = 0; OnigOpInfo[i].opcode >= 0; i++) { + if (opcode == OnigOpInfo[i].opcode) + return OnigOpInfo[i].arg_type; + } + return ARG_SPECIAL; +} + +static void +Indent(FILE* f, int indent) +{ + int i; + for (i = 0; i < indent; i++) putc(' ', f); +} + +static void +p_string(FILE* f, int len, UChar* s) +{ + fputs(":", f); + while (len-- > 0) { fputc(*s++, f); } +} + +static void +p_len_string(FILE* f, LengthType len, int mb_len, UChar* s) +{ + int x = len * mb_len; + + fprintf(f, ":%d:", len); + while (x-- > 0) { fputc(*s++, f); } +} + +extern void +onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, + OnigEncoding enc) +{ + int i, n, arg_type; + RelAddrType addr; + LengthType len; + MemNumType mem; + StateCheckNumType scn; + OnigCodePoint code; + UChar *q; + + fprintf(f, "[%s", op2name(*bp)); + arg_type = op2arg_type(*bp); + if (arg_type != ARG_SPECIAL) { + bp++; + switch (arg_type) { + case ARG_NON: + break; + case ARG_RELADDR: + GET_RELADDR_INC(addr, bp); + fprintf(f, ":(%d)", addr); + break; + case ARG_ABSADDR: + GET_ABSADDR_INC(addr, bp); + fprintf(f, ":(%d)", addr); + break; + case ARG_LENGTH: + GET_LENGTH_INC(len, bp); + fprintf(f, ":%d", len); + break; + case ARG_MEMNUM: + mem = *((MemNumType* )bp); + bp += SIZE_MEMNUM; + fprintf(f, ":%d", mem); + break; + case ARG_OPTION: + { + OnigOptionType option = *((OnigOptionType* )bp); + bp += SIZE_OPTION; + fprintf(f, ":%d", option); + } + break; + + case ARG_STATE_CHECK: + scn = *((StateCheckNumType* )bp); + bp += SIZE_STATE_CHECK_NUM; + fprintf(f, ":%d", scn); + break; + } + } + else { + switch (*bp++) { + case OP_EXACT1: + case OP_ANYCHAR_STAR_PEEK_NEXT: + case OP_ANYCHAR_ML_STAR_PEEK_NEXT: + p_string(f, 1, bp++); break; + case OP_EXACT2: + p_string(f, 2, bp); bp += 2; break; + case OP_EXACT3: + p_string(f, 3, bp); bp += 3; break; + case OP_EXACT4: + p_string(f, 4, bp); bp += 4; break; + case OP_EXACT5: + p_string(f, 5, bp); bp += 5; break; + case OP_EXACTN: + GET_LENGTH_INC(len, bp); + p_len_string(f, len, 1, bp); + bp += len; + break; + + case OP_EXACTMB2N1: + p_string(f, 2, bp); bp += 2; break; + case OP_EXACTMB2N2: + p_string(f, 4, bp); bp += 4; break; + case OP_EXACTMB2N3: + p_string(f, 6, bp); bp += 6; break; + case OP_EXACTMB2N: + GET_LENGTH_INC(len, bp); + p_len_string(f, len, 2, bp); + bp += len * 2; + break; + case OP_EXACTMB3N: + GET_LENGTH_INC(len, bp); + p_len_string(f, len, 3, bp); + bp += len * 3; + break; + case OP_EXACTMBN: + { + int mb_len; + + GET_LENGTH_INC(mb_len, bp); + GET_LENGTH_INC(len, bp); + fprintf(f, ":%d:%d:", mb_len, len); + n = len * mb_len; + while (n-- > 0) { fputc(*bp++, f); } + } + break; + + case OP_EXACT1_IC: + len = enclen(enc, bp); + p_string(f, len, bp); + bp += len; + break; + case OP_EXACTN_IC: + GET_LENGTH_INC(len, bp); + p_len_string(f, len, 1, bp); + bp += len; + break; + + case OP_CCLASS: + n = bitset_on_num((BitSetRef )bp); + bp += SIZE_BITSET; + fprintf(f, ":%d", n); + break; + + case OP_CCLASS_NOT: + n = bitset_on_num((BitSetRef )bp); + bp += SIZE_BITSET; + fprintf(f, ":%d", n); + break; + + case OP_CCLASS_MB: + case OP_CCLASS_MB_NOT: + GET_LENGTH_INC(len, bp); + q = bp; +#ifndef PLATFORM_UNALIGNED_WORD_ACCESS + ALIGNMENT_RIGHT(q); +#endif + GET_CODE_POINT(code, q); + bp += len; + fprintf(f, ":%d:%d", (int )code, len); + break; + + case OP_CCLASS_MIX: + case OP_CCLASS_MIX_NOT: + n = bitset_on_num((BitSetRef )bp); + bp += SIZE_BITSET; + GET_LENGTH_INC(len, bp); + q = bp; +#ifndef PLATFORM_UNALIGNED_WORD_ACCESS + ALIGNMENT_RIGHT(q); +#endif + GET_CODE_POINT(code, q); + bp += len; + fprintf(f, ":%d:%d:%d", n, (int )code, len); + break; + + case OP_CCLASS_NODE: + { + CClassNode *cc; + + GET_POINTER_INC(cc, bp); + n = bitset_on_num(cc->bs); + fprintf(f, ":%u:%d", (unsigned int )cc, n); + } + break; + + case OP_BACKREFN_IC: + mem = *((MemNumType* )bp); + bp += SIZE_MEMNUM; + fprintf(f, ":%d", mem); + break; + + case OP_BACKREF_MULTI_IC: + case OP_BACKREF_MULTI: + fputs(" ", f); + GET_LENGTH_INC(len, bp); + for (i = 0; i < len; i++) { + GET_MEMNUM_INC(mem, bp); + if (i > 0) fputs(", ", f); + fprintf(f, "%d", mem); + } + break; + + case OP_BACKREF_WITH_LEVEL: + { + OnigOptionType option; + LengthType level; + + GET_OPTION_INC(option, bp); + fprintf(f, ":%d", option); + GET_LENGTH_INC(level, bp); + fprintf(f, ":%d", level); + + fputs(" ", f); + GET_LENGTH_INC(len, bp); + for (i = 0; i < len; i++) { + GET_MEMNUM_INC(mem, bp); + if (i > 0) fputs(", ", f); + fprintf(f, "%d", mem); + } + } + break; + + case OP_REPEAT: + case OP_REPEAT_NG: + { + mem = *((MemNumType* )bp); + bp += SIZE_MEMNUM; + addr = *((RelAddrType* )bp); + bp += SIZE_RELADDR; + fprintf(f, ":%d:%d", mem, addr); + } + break; + + case OP_PUSH_OR_JUMP_EXACT1: + case OP_PUSH_IF_PEEK_NEXT: + addr = *((RelAddrType* )bp); + bp += SIZE_RELADDR; + fprintf(f, ":(%d)", addr); + p_string(f, 1, bp); + bp += 1; + break; + + case OP_LOOK_BEHIND: + GET_LENGTH_INC(len, bp); + fprintf(f, ":%d", len); + break; + + case OP_PUSH_LOOK_BEHIND_NOT: + GET_RELADDR_INC(addr, bp); + GET_LENGTH_INC(len, bp); + fprintf(f, ":%d:(%d)", len, addr); + break; + + case OP_STATE_CHECK_PUSH: + case OP_STATE_CHECK_PUSH_OR_JUMP: + scn = *((StateCheckNumType* )bp); + bp += SIZE_STATE_CHECK_NUM; + addr = *((RelAddrType* )bp); + bp += SIZE_RELADDR; + fprintf(f, ":%d:(%d)", scn, addr); + break; + + default: + fprintf(stderr, "onig_print_compiled_byte_code: undefined code %d\n", + *--bp); + } + } + fputs("]", f); + if (nextp) *nextp = bp; +} + +static void +print_compiled_byte_code_list(FILE* f, regex_t* reg) +{ + int ncode; + UChar* bp = reg->p; + UChar* end = reg->p + reg->used; + + fprintf(f, "code length: %d\n", reg->used); + + ncode = 0; + while (bp < end) { + ncode++; + if (bp > reg->p) { + if (ncode % 5 == 0) + fprintf(f, "\n"); + else + fputs(" ", f); + } + onig_print_compiled_byte_code(f, bp, &bp, reg->enc); + } + + fprintf(f, "\n"); +} + +static void +print_indent_tree(FILE* f, Node* node, int indent) +{ + int i, type; + int add = 3; + UChar* p; + + Indent(f, indent); + if (IS_NULL(node)) { + fprintf(f, "ERROR: null node!!!\n"); + exit (0); + } + + type = NTYPE(node); + switch (type) { + case NT_LIST: + case NT_ALT: + if (NTYPE(node) == NT_LIST) + fprintf(f, "\n", (int )node); + else + fprintf(f, "\n", (int )node); + + print_indent_tree(f, NCAR(node), indent + add); + while (IS_NOT_NULL(node = NCDR(node))) { + if (NTYPE(node) != type) { + fprintf(f, "ERROR: list/alt right is not a cons. %d\n", NTYPE(node)); + exit(0); + } + print_indent_tree(f, NCAR(node), indent + add); + } + break; + + case NT_STR: + fprintf(f, "", + (NSTRING_IS_RAW(node) ? "-raw" : ""), (int )node); + for (p = NSTR(node)->s; p < NSTR(node)->end; p++) { + if (*p >= 0x20 && *p < 0x7f) + fputc(*p, f); + else { + fprintf(f, " 0x%02x", *p); + } + } + break; + + case NT_CCLASS: + fprintf(f, "", (int )node); + if (IS_NCCLASS_NOT(NCCLASS(node))) fputs(" not", f); + if (NCCLASS(node)->mbuf) { + BBuf* bbuf = NCCLASS(node)->mbuf; + for (i = 0; i < bbuf->used; i++) { + if (i > 0) fprintf(f, ","); + fprintf(f, "%0x", bbuf->p[i]); + } + } + break; + + case NT_CTYPE: + fprintf(f, " ", (int )node); + switch (NCTYPE(node)->ctype) { + case ONIGENC_CTYPE_WORD: + if (NCTYPE(node)->not != 0) + fputs("not word", f); + else + fputs("word", f); + break; + + default: + fprintf(f, "ERROR: undefined ctype.\n"); + exit(0); + } + break; + + case NT_CANY: + fprintf(f, "", (int )node); + break; + + case NT_ANCHOR: + fprintf(f, " ", (int )node); + switch (NANCHOR(node)->type) { + case ANCHOR_BEGIN_BUF: fputs("begin buf", f); break; + case ANCHOR_END_BUF: fputs("end buf", f); break; + case ANCHOR_BEGIN_LINE: fputs("begin line", f); break; + case ANCHOR_END_LINE: fputs("end line", f); break; + case ANCHOR_SEMI_END_BUF: fputs("semi end buf", f); break; + case ANCHOR_BEGIN_POSITION: fputs("begin position", f); break; + + case ANCHOR_WORD_BOUND: fputs("word bound", f); break; + case ANCHOR_NOT_WORD_BOUND: fputs("not word bound", f); break; +#ifdef USE_WORD_BEGIN_END + case ANCHOR_WORD_BEGIN: fputs("word begin", f); break; + case ANCHOR_WORD_END: fputs("word end", f); break; +#endif + case ANCHOR_PREC_READ: fputs("prec read", f); break; + case ANCHOR_PREC_READ_NOT: fputs("prec read not", f); break; + case ANCHOR_LOOK_BEHIND: fputs("look_behind", f); break; + case ANCHOR_LOOK_BEHIND_NOT: fputs("look_behind_not",f); break; + + default: + fprintf(f, "ERROR: undefined anchor type.\n"); + break; + } + break; + + case NT_BREF: + { + int* p; + BRefNode* br = NBREF(node); + p = BACKREFS_P(br); + fprintf(f, "", (int )node); + for (i = 0; i < br->back_num; i++) { + if (i > 0) fputs(", ", f); + fprintf(f, "%d", p[i]); + } + } + break; + +#ifdef USE_SUBEXP_CALL + case NT_CALL: + { + CallNode* cn = NCALL(node); + fprintf(f, "", (int )node); + p_string(f, cn->name_end - cn->name, cn->name); + } + break; +#endif + + case NT_QTFR: + fprintf(f, "{%d,%d}%s\n", (int )node, + NQTFR(node)->lower, NQTFR(node)->upper, + (NQTFR(node)->greedy ? "" : "?")); + print_indent_tree(f, NQTFR(node)->target, indent + add); + break; + + case NT_ENCLOSE: + fprintf(f, " ", (int )node); + switch (NENCLOSE(node)->type) { + case ENCLOSE_OPTION: + fprintf(f, "option:%d\n", NENCLOSE(node)->option); + print_indent_tree(f, NENCLOSE(node)->target, indent + add); + break; + case ENCLOSE_MEMORY: + fprintf(f, "memory:%d", NENCLOSE(node)->regnum); + break; + case ENCLOSE_STOP_BACKTRACK: + fprintf(f, "stop-bt"); + break; + + default: + break; + } + fprintf(f, "\n"); + print_indent_tree(f, NENCLOSE(node)->target, indent + add); + break; + + default: + fprintf(f, "print_indent_tree: undefined node type %d\n", NTYPE(node)); + break; + } + + if (type != NT_LIST && type != NT_ALT && type != NT_QTFR && + type != NT_ENCLOSE) + fprintf(f, "\n"); + fflush(f); +} +#endif /* ONIG_DEBUG */ + +#ifdef ONIG_DEBUG_PARSE_TREE +static void +print_tree(FILE* f, Node* node) +{ + print_indent_tree(f, node, 0); +} +#endif diff --git a/lib/ruby-1.9.1-rc1/regenc.c b/lib/ruby-1.9.1-rc1/regenc.c new file mode 100644 index 0000000..634afd8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regenc.c @@ -0,0 +1,931 @@ +/********************************************************************** + regenc.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regint.h" + +OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT; + +extern int +onigenc_init(void) +{ + return 0; +} + +extern OnigEncoding +onigenc_get_default_encoding(void) +{ + return OnigEncDefaultCharEncoding; +} + +extern int +onigenc_set_default_encoding(OnigEncoding enc) +{ + OnigEncDefaultCharEncoding = enc; + return 0; +} + +extern int +onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, struct OnigEncodingTypeST* enc) +{ + int ret = ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e); + if (ONIGENC_MBCLEN_CHARFOUND_P(ret)) + return ONIGENC_MBCLEN_CHARFOUND_LEN(ret); + else if (ONIGENC_MBCLEN_NEEDMORE_P(ret)) + return e-p+ONIGENC_MBCLEN_NEEDMORE_LEN(ret); + return 1; +} + +extern UChar* +onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s, const UChar* end) +{ + UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s, end); + if (p < s) { + p += enclen(enc, p, end); + } + return p; +} + +extern UChar* +onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, + const UChar* start, const UChar* s, const UChar* end, const UChar** prev) +{ + UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s, end); + + if (p < s) { + if (prev) *prev = (const UChar* )p; + p += enclen(enc, p, end); + } + else { + if (prev) *prev = (const UChar* )NULL; /* Sorry */ + } + return p; +} + +extern UChar* +onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s, const UChar* end) +{ + if (s <= start) + return (UChar* )NULL; + + return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1, end); +} + +extern UChar* +onigenc_step_back(OnigEncoding enc, const UChar* start, const UChar* s, const UChar* end, int n) +{ + while (ONIG_IS_NOT_NULL(s) && n-- > 0) { + if (s <= start) + return (UChar* )NULL; + + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1, end); + } + return (UChar* )s; +} + +extern UChar* +onigenc_step(OnigEncoding enc, const UChar* p, const UChar* end, int n) +{ + UChar* q = (UChar* )p; + while (n-- > 0) { + q += ONIGENC_MBC_ENC_LEN(enc, q, end); + } + return (q <= end ? q : NULL); +} + +extern int +onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end) +{ + int n = 0; + UChar* q = (UChar* )p; + + while (q < end) { + q += ONIGENC_MBC_ENC_LEN(enc, q, end); + n++; + } + return n; +} + +extern int +onigenc_strlen_null(OnigEncoding enc, const UChar* s) +{ + int n = 0; + UChar* p = (UChar* )s; + UChar* e = p + strlen((const char *)s); + + while (1) { + if (*p == '\0') { + UChar* q; + int len = ONIGENC_MBC_MINLEN(enc); + + if (len == 1) return n; + q = p + 1; + while (len > 1) { + if (*q != '\0') break; + q++; + len--; + } + if (len == 1) return n; + } + p += ONIGENC_MBC_ENC_LEN(enc, p, e); + n++; + } +} + +extern int +onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s) +{ + UChar* start = (UChar* )s; + UChar* p = (UChar* )s; + UChar* e = p + strlen((const char *)s); + + while (1) { + if (*p == '\0') { + UChar* q; + int len = ONIGENC_MBC_MINLEN(enc); + + if (len == 1) return (int )(p - start); + q = p + 1; + while (len > 1) { + if (*q != '\0') break; + q++; + len--; + } + if (len == 1) return (int )(p - start); + } + p += ONIGENC_MBC_ENC_LEN(enc, p, e); + } +} + +const UChar OnigEncAsciiToLowerCaseTable[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; + +#ifdef USE_UPPER_CASE_TABLE +const UChar OnigEncAsciiToUpperCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137', + '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; +#endif + +const unsigned short OnigEncAsciiCtypeTable[256] = { + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x420c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, + 0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, + 0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, + 0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, + 0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0, + 0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, + 0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 +}; + +const UChar OnigEncISO_8859_1_ToLowerCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +#ifdef USE_UPPER_CASE_TABLE +const UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137', + '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107', + '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117', + '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127', + '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\367', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\377', +}; +#endif + +extern void +onigenc_set_default_caseconv_table(const UChar* table ARG_UNUSED) +{ + /* nothing */ + /* obsoleted. */ +} + +extern UChar* +onigenc_get_left_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s, const UChar* end) +{ + return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s, end); +} + +const OnigPairCaseFoldCodes OnigAsciiLowerMap[] = { + { 0x41, 0x61 }, + { 0x42, 0x62 }, + { 0x43, 0x63 }, + { 0x44, 0x64 }, + { 0x45, 0x65 }, + { 0x46, 0x66 }, + { 0x47, 0x67 }, + { 0x48, 0x68 }, + { 0x49, 0x69 }, + { 0x4a, 0x6a }, + { 0x4b, 0x6b }, + { 0x4c, 0x6c }, + { 0x4d, 0x6d }, + { 0x4e, 0x6e }, + { 0x4f, 0x6f }, + { 0x50, 0x70 }, + { 0x51, 0x71 }, + { 0x52, 0x72 }, + { 0x53, 0x73 }, + { 0x54, 0x74 }, + { 0x55, 0x75 }, + { 0x56, 0x76 }, + { 0x57, 0x77 }, + { 0x58, 0x78 }, + { 0x59, 0x79 }, + { 0x5a, 0x7a } +}; + +extern int +onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, + OnigApplyAllCaseFoldFunc f, void* arg, + OnigEncoding enc ARG_UNUSED) +{ + OnigCodePoint code; + int i, r; + + for (i = 0; + i < (int )(sizeof(OnigAsciiLowerMap)/sizeof(OnigPairCaseFoldCodes)); + i++) { + code = OnigAsciiLowerMap[i].to; + r = (*f)(OnigAsciiLowerMap[i].from, &code, 1, arg); + if (r != 0) return r; + + code = OnigAsciiLowerMap[i].from; + r = (*f)(OnigAsciiLowerMap[i].to, &code, 1, arg); + if (r != 0) return r; + } + + return 0; +} + +extern int +onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED, + const OnigUChar* p, const OnigUChar* end ARG_UNUSED, OnigCaseFoldCodeItem items[], + OnigEncoding enc ARG_UNUSED) +{ + if (0x41 <= *p && *p <= 0x5a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + return 1; + } + else if (0x61 <= *p && *p <= 0x7a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + return 1; + } + else + return 0; +} + +static int +ss_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + OnigCodePoint ss[] = { 0x73, 0x73 }; + + return (*f)((OnigCodePoint )0xdf, ss, 2, arg); +} + +extern int +onigenc_apply_all_case_fold_with_map(int map_size, + const OnigPairCaseFoldCodes map[], + int ess_tsett_flag, OnigCaseFoldType flag, + OnigApplyAllCaseFoldFunc f, void* arg) +{ + OnigCodePoint code; + int i, r; + + r = onigenc_ascii_apply_all_case_fold(flag, f, arg, 0); + if (r != 0) return r; + + for (i = 0; i < map_size; i++) { + code = map[i].to; + r = (*f)(map[i].from, &code, 1, arg); + if (r != 0) return r; + + code = map[i].from; + r = (*f)(map[i].to, &code, 1, arg); + if (r != 0) return r; + } + + if (ess_tsett_flag != 0) + return ss_apply_all_case_fold(flag, f, arg); + + return 0; +} + +extern int +onigenc_get_case_fold_codes_by_str_with_map(int map_size, + const OnigPairCaseFoldCodes map[], + int ess_tsett_flag, OnigCaseFoldType flag ARG_UNUSED, + const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) +{ + if (0x41 <= *p && *p <= 0x5a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p + 0x20); + if (*p == 0x53 && ess_tsett_flag != 0 && end > p + 1 + && (*(p+1) == 0x53 || *(p+1) == 0x73)) { + /* SS */ + items[1].byte_len = 2; + items[1].code_len = 1; + items[1].code[0] = (OnigCodePoint )0xdf; + return 2; + } + else + return 1; + } + else if (0x61 <= *p && *p <= 0x7a) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = (OnigCodePoint )(*p - 0x20); + if (*p == 0x73 && ess_tsett_flag != 0 && end > p + 1 + && (*(p+1) == 0x73 || *(p+1) == 0x53)) { + /* ss */ + items[1].byte_len = 2; + items[1].code_len = 1; + items[1].code[0] = (OnigCodePoint )0xdf; + return 2; + } + else + return 1; + } + else if (*p == 0xdf && ess_tsett_flag != 0) { + items[0].byte_len = 1; + items[0].code_len = 2; + items[0].code[0] = (OnigCodePoint )'s'; + items[0].code[1] = (OnigCodePoint )'s'; + + items[1].byte_len = 1; + items[1].code_len = 2; + items[1].code[0] = (OnigCodePoint )'S'; + items[1].code[1] = (OnigCodePoint )'S'; + + items[2].byte_len = 1; + items[2].code_len = 2; + items[2].code[0] = (OnigCodePoint )'s'; + items[2].code[1] = (OnigCodePoint )'S'; + + items[3].byte_len = 1; + items[3].code_len = 2; + items[3].code[0] = (OnigCodePoint )'S'; + items[3].code[1] = (OnigCodePoint )'s'; + + return 4; + } + else { + int i; + + for (i = 0; i < map_size; i++) { + if (*p == map[i].from) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = map[i].to; + return 1; + } + else if (*p == map[i].to) { + items[0].byte_len = 1; + items[0].code_len = 1; + items[0].code[0] = map[i].from; + return 1; + } + } + } + + return 0; +} + + +extern int +onigenc_not_support_get_ctype_code_range(OnigCtype ctype, + OnigCodePoint* sb_out, const OnigCodePoint* ranges[], + OnigEncoding enc) +{ + return ONIG_NO_SUPPORT_CONFIG; +} + +extern int +onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end, OnigEncoding enc ARG_UNUSED) +{ + if (p < end) { + if (*p == 0x0a) return 1; + } + return 0; +} + +/* for single byte encodings */ +extern int +onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p, + const UChar*end, UChar* lower, OnigEncoding enc ARG_UNUSED) +{ + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p); + + (*p)++; + return 1; /* return byte length of converted char to lower */ +} + +#if 0 +extern int +onigenc_ascii_is_mbc_ambiguous(OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED) +{ + const UChar* p = *pp; + + (*pp)++; + return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p); +} +#endif + +extern int +onigenc_single_byte_mbc_enc_len(const UChar* p ARG_UNUSED, const UChar* e ARG_UNUSED, + OnigEncoding enc ARG_UNUSED) +{ + return 1; +} + +extern OnigCodePoint +onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED, + OnigEncoding enc ARG_UNUSED) +{ + return (OnigCodePoint )(*p); +} + +extern int +onigenc_single_byte_code_to_mbclen(OnigCodePoint code ARG_UNUSED, OnigEncoding enc ARG_UNUSED) +{ + return 1; +} + +extern int +onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc ARG_UNUSED) +{ + if (code > 0xff) + rb_raise(rb_eRangeError, "%u out of char range", code); + *buf = (UChar )(code & 0xff); + return 1; +} + +extern UChar* +onigenc_single_byte_left_adjust_char_head(const UChar* start ARG_UNUSED, const UChar* s, + const UChar* end, + OnigEncoding enc ARG_UNUSED) +{ + return (UChar* )s; +} + +extern int +onigenc_always_true_is_allowed_reverse_match(const UChar* s ARG_UNUSED, const UChar* end ARG_UNUSED, + OnigEncoding enc ARG_UNUSED) +{ + return TRUE; +} + +extern int +onigenc_always_false_is_allowed_reverse_match(const UChar* s ARG_UNUSED, const UChar* end ARG_UNUSED, + OnigEncoding enc ARG_UNUSED) +{ + return FALSE; +} + +extern int +onigenc_ascii_is_code_ctype(OnigCodePoint code, unsigned int ctype, + OnigEncoding enc ARG_UNUSED) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else + return FALSE; +} + +extern OnigCodePoint +onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end) +{ + int c, i, len; + OnigCodePoint n; + + len = enclen(enc, p, end); + n = (OnigCodePoint )(*p++); + if (len == 1) return n; + + for (i = 1; i < len; i++) { + if (p >= end) break; + c = *p++; + n <<= 8; n += c; + } + return n; +} + +extern int +onigenc_mbn_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED, + const UChar** pp, const UChar* end ARG_UNUSED, + UChar* lower) +{ + int len; + const UChar *p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { + *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); + (*pp)++; + return 1; + } + else { + int i; + + len = enclen(enc, p, end); + for (i = 0; i < len; i++) { + *lower++ = *p++; + } + (*pp) += len; + return len; /* return byte length of converted to lower char */ + } +} + +#if 0 +extern int +onigenc_mbn_is_mbc_ambiguous(OnigEncoding enc, OnigCaseFoldType flag, + const UChar** pp ARG_UNUSED, const UChar* end ARG_UNUSED) +{ + const UChar* p = *pp; + + if (ONIGENC_IS_MBC_ASCII(p)) { + (*pp)++; + return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p); + } + + (*pp) += enclen(enc, p); + return FALSE; +} +#endif + +extern int +onigenc_mb2_code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED) +{ + if ((code & 0xff00) != 0) return 2; + else return 1; +} + +extern int +onigenc_mb4_code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED) +{ + if ((code & 0xff000000) != 0) return 4; + else if ((code & 0xff0000) != 0) return 3; + else if ((code & 0xff00) != 0) return 2; + else return 1; +} + +extern int +onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff00) != 0) { + *p++ = (UChar )((code >> 8) & 0xff); + } + *p++ = (UChar )(code & 0xff); + +#if 1 + if (enclen(enc, buf, p) != (p - buf)) + return ONIGERR_INVALID_CODE_POINT_VALUE; +#endif + return p - buf; +} + +extern int +onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf) +{ + UChar *p = buf; + + if ((code & 0xff000000) != 0) { + *p++ = (UChar )((code >> 24) & 0xff); + } + if ((code & 0xff0000) != 0 || p != buf) { + *p++ = (UChar )((code >> 16) & 0xff); + } + if ((code & 0xff00) != 0 || p != buf) { + *p++ = (UChar )((code >> 8) & 0xff); + } + *p++ = (UChar )(code & 0xff); + +#if 1 + if (enclen(enc, buf, p) != (p - buf)) + return ONIGERR_INVALID_CODE_POINT_VALUE; +#endif + return p - buf; +} + +extern int +onigenc_minimum_property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) +{ + static const PosixBracketEntryType PBS[] = { + { (UChar* )"Alnum", ONIGENC_CTYPE_ALNUM, 5 }, + { (UChar* )"Alpha", ONIGENC_CTYPE_ALPHA, 5 }, + { (UChar* )"Blank", ONIGENC_CTYPE_BLANK, 5 }, + { (UChar* )"Cntrl", ONIGENC_CTYPE_CNTRL, 5 }, + { (UChar* )"Digit", ONIGENC_CTYPE_DIGIT, 5 }, + { (UChar* )"Graph", ONIGENC_CTYPE_GRAPH, 5 }, + { (UChar* )"Lower", ONIGENC_CTYPE_LOWER, 5 }, + { (UChar* )"Print", ONIGENC_CTYPE_PRINT, 5 }, + { (UChar* )"Punct", ONIGENC_CTYPE_PUNCT, 5 }, + { (UChar* )"Space", ONIGENC_CTYPE_SPACE, 5 }, + { (UChar* )"Upper", ONIGENC_CTYPE_UPPER, 5 }, + { (UChar* )"XDigit", ONIGENC_CTYPE_XDIGIT, 6 }, + { (UChar* )"ASCII", ONIGENC_CTYPE_ASCII, 5 }, + { (UChar* )"Word", ONIGENC_CTYPE_WORD, 4 }, + { (UChar* )NULL, -1, 0 } + }; + + const PosixBracketEntryType *pb; + int len; + + len = onigenc_strlen(enc, p, end); + for (pb = PBS; IS_NOT_NULL(pb->name); pb++) { + if (len == pb->len && + onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) + return pb->ctype; + } + + return ONIGERR_INVALID_CHAR_PROPERTY_NAME; +} + +extern int +onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code, + unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE); + } + } + + return FALSE; +} + +extern int +onigenc_mb4_is_code_ctype(OnigEncoding enc, OnigCodePoint code, + unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else { + if (CTYPE_IS_WORD_GRAPH_PRINT(ctype)) { + return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE); + } + } + + return FALSE; +} + +extern int +onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end, + const UChar* sascii /* ascii */, int n) +{ + int x, c; + + while (n-- > 0) { + if (p >= end) return (int )(*sascii); + + c = (int )ONIGENC_MBC_TO_CODE(enc, p, end); + x = *sascii - c; + if (x) return x; + + sascii++; + p += enclen(enc, p, end); + } + return 0; +} + +/* Property management */ +static int +resize_property_list(int new_size, const OnigCodePoint*** plist, int* psize) +{ + int size; + const OnigCodePoint **list = *plist; + + size = sizeof(OnigCodePoint*) * new_size; + if (IS_NULL(list)) { + list = (const OnigCodePoint** )xmalloc(size); + } + else { + list = (const OnigCodePoint** )xrealloc((void* )list, size); + } + + if (IS_NULL(list)) return ONIGERR_MEMORY; + + *plist = list; + *psize = new_size; + + return 0; +} + +extern int +onigenc_property_list_add_property(UChar* name, const OnigCodePoint* prop, + hash_table_type **table, const OnigCodePoint*** plist, int *pnum, + int *psize) +{ +#define PROP_INIT_SIZE 16 + + int r; + + if (*psize <= *pnum) { + int new_size = (*psize == 0 ? PROP_INIT_SIZE : *psize * 2); + r = resize_property_list(new_size, plist, psize); + if (r != 0) return r; + } + + (*plist)[*pnum] = prop; + + if (ONIG_IS_NULL(*table)) { + *table = onig_st_init_strend_table_with_size(PROP_INIT_SIZE); + if (ONIG_IS_NULL(*table)) return ONIGERR_MEMORY; + } + + *pnum = *pnum + 1; + onig_st_insert_strend(*table, name, name + strlen((char* )name), + (hash_data_type )(*pnum + ONIGENC_MAX_STD_CTYPE)); + return 0; +} + +extern int +onigenc_property_list_init(int (*f)(void)) +{ + int r; + + THREAD_ATOMIC_START; + + r = f(); + + THREAD_ATOMIC_END; + return r; +} diff --git a/lib/ruby-1.9.1-rc1/regenc.h b/lib/ruby-1.9.1-rc1/regenc.h new file mode 100644 index 0000000..3844e41 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regenc.h @@ -0,0 +1,207 @@ +#ifndef ONIGURUMA_REGENC_H +#define ONIGURUMA_REGENC_H +/********************************************************************** + regenc.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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. + */ +#ifndef REGINT_H +#ifndef RUBY_EXTERN +#include "ruby/config.h" +#include "ruby/defines.h" +#endif +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#endif +#include "ruby/oniguruma.h" + +typedef struct { + OnigCodePoint from; + OnigCodePoint to; +} OnigPairCaseFoldCodes; + + +#ifndef NULL +#define NULL ((void* )0) +#endif + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef ARG_UNUSED +#if defined(__GNUC__) +# define ARG_UNUSED __attribute__ ((unused)) +#else +# define ARG_UNUSED +#endif +#endif + +#define ONIG_IS_NULL(p) (((void*)(p)) == (void*)0) +#define ONIG_IS_NOT_NULL(p) (((void*)(p)) != (void*)0) +#define ONIG_CHECK_NULL_RETURN(p) if (ONIG_IS_NULL(p)) return NULL +#define ONIG_CHECK_NULL_RETURN_VAL(p,val) if (ONIG_IS_NULL(p)) return (val) + +#define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e)) + +/* character types bit flag */ +#define BIT_CTYPE_NEWLINE (1<< ONIGENC_CTYPE_NEWLINE) +#define BIT_CTYPE_ALPHA (1<< ONIGENC_CTYPE_ALPHA) +#define BIT_CTYPE_BLANK (1<< ONIGENC_CTYPE_BLANK) +#define BIT_CTYPE_CNTRL (1<< ONIGENC_CTYPE_CNTRL) +#define BIT_CTYPE_DIGIT (1<< ONIGENC_CTYPE_DIGIT) +#define BIT_CTYPE_GRAPH (1<< ONIGENC_CTYPE_GRAPH) +#define BIT_CTYPE_LOWER (1<< ONIGENC_CTYPE_LOWER) +#define BIT_CTYPE_PRINT (1<< ONIGENC_CTYPE_PRINT) +#define BIT_CTYPE_PUNCT (1<< ONIGENC_CTYPE_PUNCT) +#define BIT_CTYPE_SPACE (1<< ONIGENC_CTYPE_SPACE) +#define BIT_CTYPE_UPPER (1<< ONIGENC_CTYPE_UPPER) +#define BIT_CTYPE_XDIGIT (1<< ONIGENC_CTYPE_XDIGIT) +#define BIT_CTYPE_WORD (1<< ONIGENC_CTYPE_WORD) +#define BIT_CTYPE_ALNUM (1<< ONIGENC_CTYPE_ALNUM) +#define BIT_CTYPE_ASCII (1<< ONIGENC_CTYPE_ASCII) + +#define CTYPE_TO_BIT(ctype) (1<<(ctype)) +#define CTYPE_IS_WORD_GRAPH_PRINT(ctype) \ + ((ctype) == ONIGENC_CTYPE_WORD || (ctype) == ONIGENC_CTYPE_GRAPH ||\ + (ctype) == ONIGENC_CTYPE_PRINT) + + +typedef struct { + UChar *name; + int ctype; + short int len; +} PosixBracketEntryType; + + +/* #define USE_CRNL_AS_LINE_TERMINATOR */ +#define USE_UNICODE_PROPERTIES +/* #define USE_UNICODE_CASE_FOLD_TURKISH_AZERI */ +/* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTF#18 */ + + +#define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII + +/* for encoding system implementation (internal) */ +ONIG_EXTERN int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)); +ONIG_EXTERN int onigenc_ascii_get_case_fold_codes_by_str P_((OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc)); +ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); +ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); +ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], OnigEncoding enc)); +ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end, OnigEncoding enc)); + + +/* methods for single byte encoding */ +ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower, OnigEncoding enc)); +ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p, const UChar* e, OnigEncoding enc)); +ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end, OnigEncoding enc)); +ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)); +ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf, OnigEncoding enc)); +ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s, const OnigUChar* end, OnigEncoding enc)); +ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc)); +ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc)); +ONIG_EXTERN int onigenc_ascii_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc)); + +/* methods for multi byte encoding */ +ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end)); +ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower)); +ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)); +ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); +ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); +ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); +ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); +ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)); +ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); +ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); + + +/* in enc/unicode.c */ +ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc)); +ONIG_EXTERN int onigenc_utf16_32_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint* ranges[], OnigEncoding enc)); +ONIG_EXTERN int onigenc_unicode_ctype_code_range P_((int ctype, const OnigCodePoint* ranges[])); +ONIG_EXTERN int onigenc_unicode_get_case_fold_codes_by_str P_((OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); +ONIG_EXTERN int onigenc_unicode_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** pp, const UChar* end, UChar* fold)); +ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc)); + + +#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \ + OnigEncISO_8859_1_ToLowerCaseTable[c] +#define ONIGENC_ISO_8859_1_TO_UPPER_CASE(c) \ + OnigEncISO_8859_1_ToUpperCaseTable[c] + +ONIG_EXTERN const UChar OnigEncISO_8859_1_ToLowerCaseTable[]; +ONIG_EXTERN const UChar OnigEncISO_8859_1_ToUpperCaseTable[]; + +ONIG_EXTERN int +onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n)); +ONIG_EXTERN UChar* +onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n)); + +/* defined in regexec.c, but used in enc/xxx.c */ +extern int onig_is_in_code_range P_((const UChar* p, OnigCodePoint code)); + +ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding; +ONIG_EXTERN const UChar OnigEncAsciiToLowerCaseTable[]; +ONIG_EXTERN const UChar OnigEncAsciiToUpperCaseTable[]; +ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[]; + +#define ONIGENC_IS_ASCII_CODE(code) ((code) < 0x80) +#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c) OnigEncAsciiToLowerCaseTable[c] +#define ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) OnigEncAsciiToUpperCaseTable[c] +#define ONIGENC_IS_ASCII_CODE_CTYPE(code,ctype) \ + ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) +#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \ + (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\ + ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) + +#ifdef ONIG_ENC_REGISTER +extern int ONIG_ENC_REGISTER(const char *, OnigEncodingType*); +#define OnigEncodingName(n) encoding_##n +#define OnigEncodingDeclare(n) static OnigEncodingType OnigEncodingName(n) +#define OnigEncodingDefine(f,n) \ + OnigEncodingDeclare(n); \ + void Init_##f(void) { \ + ONIG_ENC_REGISTER(OnigEncodingName(n).name, \ + &OnigEncodingName(n)); \ + } \ + OnigEncodingDeclare(n) +#else +#define OnigEncodingName(n) OnigEncoding##n +#define OnigEncodingDeclare(n) OnigEncodingType OnigEncodingName(n) +#define OnigEncodingDefine(f,n) OnigEncodingDeclare(n) +#endif + +/* macros for define replica encoding and encoding alias */ +#define ENC_REPLICATE(name, orig) +#define ENC_ALIAS(name, orig) +#define ENC_DUMMY(name) + +#endif /* ONIGURUMA_REGENC_H */ diff --git a/lib/ruby-1.9.1-rc1/regerror.c b/lib/ruby-1.9.1-rc1/regerror.c new file mode 100644 index 0000000..780ba94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regerror.c @@ -0,0 +1,387 @@ +/********************************************************************** + regerror.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regint.h" +#include /* for vsnprintf() */ + +#ifdef HAVE_STDARG_PROTOTYPES +#include +#define va_init_list(a,b) va_start(a,b) +#else +#include +#define va_init_list(a,b) va_start(a) +#endif + +extern UChar* +onig_error_code_to_format(int code) +{ + const char *p; + + if (code >= 0) return (UChar* )0; + + switch (code) { + case ONIG_MISMATCH: + p = "mismatch"; break; + case ONIG_NO_SUPPORT_CONFIG: + p = "no support in this configuration"; break; + case ONIGERR_MEMORY: + p = "failed to allocate memory"; break; + case ONIGERR_MATCH_STACK_LIMIT_OVER: + p = "match-stack limit over"; break; + case ONIGERR_TYPE_BUG: + p = "undefined type (bug)"; break; + case ONIGERR_PARSER_BUG: + p = "internal parser error (bug)"; break; + case ONIGERR_STACK_BUG: + p = "stack error (bug)"; break; + case ONIGERR_UNDEFINED_BYTECODE: + p = "undefined bytecode (bug)"; break; + case ONIGERR_UNEXPECTED_BYTECODE: + p = "unexpected bytecode (bug)"; break; + case ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED: + p = "default multibyte-encoding is not setted"; break; + case ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR: + p = "can't convert to wide-char on specified multibyte-encoding"; break; + case ONIGERR_INVALID_ARGUMENT: + p = "invalid argument"; break; + case ONIGERR_END_PATTERN_AT_LEFT_BRACE: + p = "end pattern at left brace"; break; + case ONIGERR_END_PATTERN_AT_LEFT_BRACKET: + p = "end pattern at left bracket"; break; + case ONIGERR_EMPTY_CHAR_CLASS: + p = "empty char-class"; break; + case ONIGERR_PREMATURE_END_OF_CHAR_CLASS: + p = "premature end of char-class"; break; + case ONIGERR_END_PATTERN_AT_ESCAPE: + p = "end pattern at escape"; break; + case ONIGERR_END_PATTERN_AT_META: + p = "end pattern at meta"; break; + case ONIGERR_END_PATTERN_AT_CONTROL: + p = "end pattern at control"; break; + case ONIGERR_META_CODE_SYNTAX: + p = "invalid meta-code syntax"; break; + case ONIGERR_CONTROL_CODE_SYNTAX: + p = "invalid control-code syntax"; break; + case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE: + p = "char-class value at end of range"; break; + case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE: + p = "char-class value at start of range"; break; + case ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS: + p = "unmatched range specifier in char-class"; break; + case ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED: + p = "target of repeat operator is not specified"; break; + case ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID: + p = "target of repeat operator is invalid"; break; + case ONIGERR_NESTED_REPEAT_OPERATOR: + p = "nested repeat operator"; break; + case ONIGERR_UNMATCHED_CLOSE_PARENTHESIS: + p = "unmatched close parenthesis"; break; + case ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS: + p = "end pattern with unmatched parenthesis"; break; + case ONIGERR_END_PATTERN_IN_GROUP: + p = "end pattern in group"; break; + case ONIGERR_UNDEFINED_GROUP_OPTION: + p = "undefined group option"; break; + case ONIGERR_INVALID_POSIX_BRACKET_TYPE: + p = "invalid POSIX bracket type"; break; + case ONIGERR_INVALID_LOOK_BEHIND_PATTERN: + p = "invalid pattern in look-behind"; break; + case ONIGERR_INVALID_REPEAT_RANGE_PATTERN: + p = "invalid repeat range {lower,upper}"; break; + case ONIGERR_TOO_BIG_NUMBER: + p = "too big number"; break; + case ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE: + p = "too big number for repeat range"; break; + case ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE: + p = "upper is smaller than lower in repeat range"; break; + case ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS: + p = "empty range in char class"; break; + case ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE: + p = "mismatch multibyte code length in char-class range"; break; + case ONIGERR_TOO_MANY_MULTI_BYTE_RANGES: + p = "too many multibyte code ranges are specified"; break; + case ONIGERR_TOO_SHORT_MULTI_BYTE_STRING: + p = "too short multibyte code string"; break; + case ONIGERR_TOO_BIG_BACKREF_NUMBER: + p = "too big backref number"; break; + case ONIGERR_INVALID_BACKREF: +#ifdef USE_NAMED_GROUP + p = "invalid backref number/name"; break; +#else + p = "invalid backref number"; break; +#endif + case ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED: + p = "numbered backref/call is not allowed. (use name)"; break; + case ONIGERR_TOO_BIG_WIDE_CHAR_VALUE: + p = "too big wide-char value"; break; + case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE: + p = "too long wide-char value"; break; + case ONIGERR_INVALID_CODE_POINT_VALUE: + p = "invalid code point value"; break; + case ONIGERR_EMPTY_GROUP_NAME: + p = "group name is empty"; break; + case ONIGERR_INVALID_GROUP_NAME: + p = "invalid group name <%n>"; break; + case ONIGERR_INVALID_CHAR_IN_GROUP_NAME: +#ifdef USE_NAMED_GROUP + p = "invalid char in group name <%n>"; break; +#else + p = "invalid char in group number <%n>"; break; +#endif + case ONIGERR_UNDEFINED_NAME_REFERENCE: + p = "undefined name <%n> reference"; break; + case ONIGERR_UNDEFINED_GROUP_REFERENCE: + p = "undefined group <%n> reference"; break; + case ONIGERR_MULTIPLEX_DEFINED_NAME: + p = "multiplex defined name <%n>"; break; + case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL: + p = "multiplex definition name <%n> call"; break; + case ONIGERR_NEVER_ENDING_RECURSION: + p = "never ending recursion"; break; + case ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY: + p = "group number is too big for capture history"; break; + case ONIGERR_INVALID_CHAR_PROPERTY_NAME: + p = "invalid character property name {%n}"; break; + case ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION: + p = "not supported encoding combination"; break; + case ONIGERR_INVALID_COMBINATION_OF_OPTIONS: + p = "invalid combination of options"; break; + case ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT: + p = "over thread pass limit count"; break; + + default: + p = "undefined error code"; break; + } + + return (UChar* )p; +} + +static void sprint_byte(char* s, unsigned int v) +{ + sprintf(s, "%02x", (v & 0377)); +} + +static void sprint_byte_with_x(char* s, unsigned int v) +{ + sprintf(s, "\\x%02x", (v & 0377)); +} + +static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, + UChar buf[], int buf_size, int *is_over) +{ + int len; + UChar *p; + OnigCodePoint code; + + if (ONIGENC_MBC_MINLEN(enc) > 1) { + p = s; + len = 0; + while (p < end) { + code = ONIGENC_MBC_TO_CODE(enc, p, end); + if (code >= 0x80) { + if (code > 0xffff && len + 10 <= buf_size) { + sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24)); + sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16)); + sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8)); + sprint_byte((char*)(&(buf[len+8])), (unsigned int)code); + len += 10; + } + else if (len + 6 <= buf_size) { + sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8)); + sprint_byte((char*)(&(buf[len+4])), (unsigned int)code); + len += 6; + } + else { + break; + } + } + else { + buf[len++] = (UChar )code; + } + + p += enclen(enc, p, end); + if (len >= buf_size) break; + } + + *is_over = ((p < end) ? 1 : 0); + } + else { + len = MIN((end - s), buf_size); + xmemcpy(buf, s, (size_t )len); + *is_over = ((buf_size < (end - s)) ? 1 : 0); + } + + return len; +} + + +/* for ONIG_MAX_ERROR_MESSAGE_LEN */ +#define MAX_ERROR_PAR_LEN 30 + +extern int +#ifdef HAVE_STDARG_PROTOTYPES +onig_error_code_to_str(UChar* s, int code, ...) +#else +onig_error_code_to_str(s, code, va_alist) + UChar* s; + int code; + va_dcl +#endif +{ + UChar *p, *q; + OnigErrorInfo* einfo; + int len, is_over; + UChar parbuf[MAX_ERROR_PAR_LEN]; + va_list vargs; + + va_init_list(vargs, code); + + switch (code) { + case ONIGERR_UNDEFINED_NAME_REFERENCE: + case ONIGERR_UNDEFINED_GROUP_REFERENCE: + case ONIGERR_MULTIPLEX_DEFINED_NAME: + case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL: + case ONIGERR_INVALID_GROUP_NAME: + case ONIGERR_INVALID_CHAR_IN_GROUP_NAME: + case ONIGERR_INVALID_CHAR_PROPERTY_NAME: + einfo = va_arg(vargs, OnigErrorInfo*); + len = to_ascii(einfo->enc, einfo->par, einfo->par_end, + parbuf, MAX_ERROR_PAR_LEN - 3, &is_over); + q = onig_error_code_to_format(code); + p = s; + while (*q != '\0') { + if (*q == '%') { + q++; + if (*q == 'n') { /* '%n': name */ + xmemcpy(p, parbuf, len); + p += len; + if (is_over != 0) { + xmemcpy(p, "...", 3); + p += 3; + } + q++; + } + else + goto normal_char; + } + else { + normal_char: + *p++ = *q++; + } + } + *p = '\0'; + len = p - s; + break; + + default: + q = onig_error_code_to_format(code); + len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q); + xmemcpy(s, q, len); + s[len] = '\0'; + break; + } + + va_end(vargs); + return len; +} + + +void +#ifdef HAVE_STDARG_PROTOTYPES +onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc, + UChar* pat, UChar* pat_end, const UChar *fmt, ...) +#else +onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) + UChar buf[]; + int bufsize; + OnigEncoding enc; + UChar* pat; + UChar* pat_end; + const UChar *fmt; + va_dcl +#endif +{ + int n, need, len; + UChar *p, *s, *bp; + UChar bs[6]; + va_list args; + + va_init_list(args, fmt); + n = xvsnprintf((char* )buf, bufsize, (const char* )fmt, args); + va_end(args); + + need = (pat_end - pat) * 4 + 4; + + if (n + need < bufsize) { + strcat((char* )buf, ": /"); + s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf); + + p = pat; + while (p < pat_end) { + if (*p == '\\') { + *s++ = *p++; + len = enclen(enc, p, pat_end); + while (len-- > 0) *s++ = *p++; + } + else if (*p == '/') { + *s++ = (unsigned char )'\\'; + *s++ = *p++; + } + else if (ONIGENC_IS_MBC_HEAD(enc, p, pat_end)) { + len = enclen(enc, p, pat_end); + if (ONIGENC_MBC_MINLEN(enc) == 1) { + while (len-- > 0) *s++ = *p++; + } + else { /* for UTF16 */ + int blen; + + while (len-- > 0) { + sprint_byte_with_x((char* )bs, (unsigned int )(*p++)); + blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); + bp = bs; + while (blen-- > 0) *s++ = *bp++; + } + } + } + else if (!ONIGENC_IS_CODE_PRINT(enc, *p) && + !ONIGENC_IS_CODE_SPACE(enc, *p)) { + sprint_byte_with_x((char* )bs, (unsigned int )(*p++)); + len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); + bp = bs; + while (len-- > 0) *s++ = *bp++; + } + else { + *s++ = *p++; + } + } + + *s++ = '/'; + *s = '\0'; + } +} diff --git a/lib/ruby-1.9.1-rc1/regexec.c b/lib/ruby-1.9.1-rc1/regexec.c new file mode 100644 index 0000000..2605059 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regexec.c @@ -0,0 +1,3822 @@ +/********************************************************************** + regexec.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regint.h" + +/* #define USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */ + +#ifdef USE_CRNL_AS_LINE_TERMINATOR +#define ONIGENC_IS_MBC_CRNL(enc,p,end) \ + (ONIGENC_MBC_TO_CODE(enc,p,end) == 13 && \ + ONIGENC_IS_MBC_NEWLINE(enc,(p+enclen(enc,p)),end)) +#endif + +#ifdef USE_CAPTURE_HISTORY +static void history_tree_free(OnigCaptureTreeNode* node); + +static void +history_tree_clear(OnigCaptureTreeNode* node) +{ + int i; + + if (IS_NOT_NULL(node)) { + for (i = 0; i < node->num_childs; i++) { + if (IS_NOT_NULL(node->childs[i])) { + history_tree_free(node->childs[i]); + } + } + for (i = 0; i < node->allocated; i++) { + node->childs[i] = (OnigCaptureTreeNode* )0; + } + node->num_childs = 0; + node->beg = ONIG_REGION_NOTPOS; + node->end = ONIG_REGION_NOTPOS; + node->group = -1; + } +} + +static void +history_tree_free(OnigCaptureTreeNode* node) +{ + history_tree_clear(node); + xfree(node); +} + +static void +history_root_free(OnigRegion* r) +{ + if (IS_NOT_NULL(r->history_root)) { + history_tree_free(r->history_root); + r->history_root = (OnigCaptureTreeNode* )0; + } +} + +static OnigCaptureTreeNode* +history_node_new(void) +{ + OnigCaptureTreeNode* node; + + node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode)); + CHECK_NULL_RETURN(node); + node->childs = (OnigCaptureTreeNode** )0; + node->allocated = 0; + node->num_childs = 0; + node->group = -1; + node->beg = ONIG_REGION_NOTPOS; + node->end = ONIG_REGION_NOTPOS; + + return node; +} + +static int +history_tree_add_child(OnigCaptureTreeNode* parent, OnigCaptureTreeNode* child) +{ +#define HISTORY_TREE_INIT_ALLOC_SIZE 8 + + if (parent->num_childs >= parent->allocated) { + int n, i; + + if (IS_NULL(parent->childs)) { + n = HISTORY_TREE_INIT_ALLOC_SIZE; + parent->childs = + (OnigCaptureTreeNode** )xmalloc(sizeof(OnigCaptureTreeNode*) * n); + } + else { + n = parent->allocated * 2; + parent->childs = + (OnigCaptureTreeNode** )xrealloc(parent->childs, + sizeof(OnigCaptureTreeNode*) * n); + } + CHECK_NULL_RETURN_MEMERR(parent->childs); + for (i = parent->allocated; i < n; i++) { + parent->childs[i] = (OnigCaptureTreeNode* )0; + } + parent->allocated = n; + } + + parent->childs[parent->num_childs] = child; + parent->num_childs++; + return 0; +} + +static OnigCaptureTreeNode* +history_tree_clone(OnigCaptureTreeNode* node) +{ + int i; + OnigCaptureTreeNode *clone, *child; + + clone = history_node_new(); + CHECK_NULL_RETURN(clone); + + clone->beg = node->beg; + clone->end = node->end; + for (i = 0; i < node->num_childs; i++) { + child = history_tree_clone(node->childs[i]); + if (IS_NULL(child)) { + history_tree_free(clone); + return (OnigCaptureTreeNode* )0; + } + history_tree_add_child(clone, child); + } + + return clone; +} + +extern OnigCaptureTreeNode* +onig_get_capture_tree(OnigRegion* region) +{ + return region->history_root; +} +#endif /* USE_CAPTURE_HISTORY */ + +extern void +onig_region_clear(OnigRegion* region) +{ + int i; + + for (i = 0; i < region->num_regs; i++) { + region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; + } +#ifdef USE_CAPTURE_HISTORY + history_root_free(region); +#endif +} + +extern int +onig_region_resize(OnigRegion* region, int n) +{ + region->num_regs = n; + + if (n < ONIG_NREGION) + n = ONIG_NREGION; + + if (region->allocated == 0) { + region->beg = (int* )xmalloc(n * sizeof(int)); + if (region->beg == 0) + return ONIGERR_MEMORY; + + region->end = (int* )xmalloc(n * sizeof(int)); + if (region->end == 0) { + xfree(region->beg); + return ONIGERR_MEMORY; + } + + region->allocated = n; + } + else if (region->allocated < n) { + int *tmp; + + region->allocated = 0; + tmp = (int* )xrealloc(region->beg, n * sizeof(int)); + if (tmp == 0) { + xfree(region->beg); + xfree(region->end); + return ONIGERR_MEMORY; + } + region->beg = tmp; + tmp = (int* )xrealloc(region->end, n * sizeof(int)); + if (tmp == 0) { + xfree(region->beg); + return ONIGERR_MEMORY; + } + region->end = tmp; + + if (region->beg == 0 || region->end == 0) + return ONIGERR_MEMORY; + + region->allocated = n; + } + + return 0; +} + +static int +onig_region_resize_clear(OnigRegion* region, int n) +{ + int r; + + r = onig_region_resize(region, n); + if (r != 0) return r; + onig_region_clear(region); + return 0; +} + +extern int +onig_region_set(OnigRegion* region, int at, int beg, int end) +{ + if (at < 0) return ONIGERR_INVALID_ARGUMENT; + + if (at >= region->allocated) { + int r = onig_region_resize(region, at + 1); + if (r < 0) return r; + } + + region->beg[at] = beg; + region->end[at] = end; + return 0; +} + +extern void +onig_region_init(OnigRegion* region) +{ + region->num_regs = 0; + region->allocated = 0; + region->beg = (int* )0; + region->end = (int* )0; + region->history_root = (OnigCaptureTreeNode* )0; +} + +extern OnigRegion* +onig_region_new(void) +{ + OnigRegion* r; + + r = (OnigRegion* )xmalloc(sizeof(OnigRegion)); + if (r) + onig_region_init(r); + return r; +} + +extern void +onig_region_free(OnigRegion* r, int free_self) +{ + if (r) { + if (r->allocated > 0) { + if (r->beg) xfree(r->beg); + if (r->end) xfree(r->end); + r->allocated = 0; + } +#ifdef USE_CAPTURE_HISTORY + history_root_free(r); +#endif + if (free_self) xfree(r); + } +} + +extern void +onig_region_copy(OnigRegion* to, OnigRegion* from) +{ +#define RREGC_SIZE (sizeof(int) * from->num_regs) + int i; + + if (to == from) return; + + onig_region_resize(to, from->num_regs); + for (i = 0; i < from->num_regs; i++) { + to->beg[i] = from->beg[i]; + to->end[i] = from->end[i]; + } + to->num_regs = from->num_regs; + +#ifdef USE_CAPTURE_HISTORY + history_root_free(to); + + if (IS_NOT_NULL(from->history_root)) { + to->history_root = history_tree_clone(from->history_root); + } +#endif +} + + +/** stack **/ +#define INVALID_STACK_INDEX -1 + +/* stack type */ +/* used by normal-POP */ +#define STK_ALT 0x0001 +#define STK_LOOK_BEHIND_NOT 0x0002 +#define STK_POS_NOT 0x0003 +/* handled by normal-POP */ +#define STK_MEM_START 0x0100 +#define STK_MEM_END 0x8200 +#define STK_REPEAT_INC 0x0300 +#define STK_STATE_CHECK_MARK 0x1000 +/* avoided by normal-POP */ +#define STK_NULL_CHECK_START 0x3000 +#define STK_NULL_CHECK_END 0x5000 /* for recursive call */ +#define STK_MEM_END_MARK 0x8400 +#define STK_POS 0x0500 /* used when POP-POS */ +#define STK_STOP_BT 0x0600 /* mark for "(?>...)" */ +#define STK_REPEAT 0x0700 +#define STK_CALL_FRAME 0x0800 +#define STK_RETURN 0x0900 +#define STK_VOID 0x0a00 /* for fill a blank */ + +/* stack type check mask */ +#define STK_MASK_POP_USED 0x00ff +#define STK_MASK_TO_VOID_TARGET 0x10ff +#define STK_MASK_MEM_END_OR_MARK 0x8000 /* MEM_END or MEM_END_MARK */ + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +#define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option);\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ + (msa).best_len = ONIG_MISMATCH;\ +} while(0) +#else +#define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\ + (msa).stack_p = (void* )0;\ + (msa).options = (arg_option);\ + (msa).region = (arg_region);\ + (msa).start = (arg_start);\ +} while(0) +#endif + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + +#define STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE 16 + +#define STATE_CHECK_BUFF_INIT(msa, str_len, offset, state_num) do { \ + if ((state_num) > 0 && str_len >= STATE_CHECK_STRING_THRESHOLD_LEN) {\ + unsigned int size = (unsigned int )(((str_len) + 1) * (state_num) + 7) >> 3;\ + offset = ((offset) * (state_num)) >> 3;\ + if (size > 0 && offset < size && size < STATE_CHECK_BUFF_MAX_SIZE) {\ + if (size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) {\ + (msa).state_check_buff = (void* )xmalloc(size);\ + CHECK_NULL_RETURN_MEMERR((msa).state_check_buff);\ + }\ + else \ + (msa).state_check_buff = (void* )xalloca(size);\ + xmemset(((char* )((msa).state_check_buff)+(offset)), 0, \ + (size_t )(size - (offset))); \ + (msa).state_check_buff_size = size;\ + }\ + else {\ + (msa).state_check_buff = (void* )0;\ + (msa).state_check_buff_size = 0;\ + }\ + }\ + else {\ + (msa).state_check_buff = (void* )0;\ + (msa).state_check_buff_size = 0;\ + }\ + } while(0) + +#define MATCH_ARG_FREE(msa) do {\ + if ((msa).stack_p) xfree((msa).stack_p);\ + if ((msa).state_check_buff_size >= STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE) { \ + if ((msa).state_check_buff) xfree((msa).state_check_buff);\ + }\ +} while(0) +#else +#define MATCH_ARG_FREE(msa) if ((msa).stack_p) xfree((msa).stack_p) +#endif + + + +#define STACK_INIT(alloc_addr, ptr_num, stack_num) do {\ + if (msa->stack_p) {\ + alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num));\ + stk_alloc = (OnigStackType* )(msa->stack_p);\ + stk_base = stk_alloc;\ + stk = stk_base;\ + stk_end = stk_base + msa->stack_n;\ + }\ + else {\ + alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num)\ + + sizeof(OnigStackType) * (stack_num));\ + stk_alloc = (OnigStackType* )(alloc_addr + sizeof(char*) * (ptr_num));\ + stk_base = stk_alloc;\ + stk = stk_base;\ + stk_end = stk_base + (stack_num);\ + }\ +} while(0) + +#define STACK_SAVE do{\ + if (stk_base != stk_alloc) {\ + msa->stack_p = stk_base;\ + msa->stack_n = stk_end - stk_base;\ + };\ +} while(0) + +static unsigned int MatchStackLimitSize = DEFAULT_MATCH_STACK_LIMIT_SIZE; + +extern unsigned int +onig_get_match_stack_limit_size(void) +{ + return MatchStackLimitSize; +} + +extern int +onig_set_match_stack_limit_size(unsigned int size) +{ + MatchStackLimitSize = size; + return 0; +} + +static int +stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end, + OnigStackType** arg_stk, OnigStackType* stk_alloc, OnigMatchArg* msa) +{ + unsigned int n; + OnigStackType *x, *stk_base, *stk_end, *stk; + + stk_base = *arg_stk_base; + stk_end = *arg_stk_end; + stk = *arg_stk; + + n = stk_end - stk_base; + if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) { + x = (OnigStackType* )xmalloc(sizeof(OnigStackType) * n * 2); + if (IS_NULL(x)) { + STACK_SAVE; + return ONIGERR_MEMORY; + } + xmemcpy(x, stk_base, n * sizeof(OnigStackType)); + n *= 2; + } + else { + unsigned int limit_size = MatchStackLimitSize; + n *= 2; + if (limit_size != 0 && n > limit_size) { + if ((unsigned int )(stk_end - stk_base) == limit_size) + return ONIGERR_MATCH_STACK_LIMIT_OVER; + else + n = limit_size; + } + x = (OnigStackType* )xrealloc(stk_base, sizeof(OnigStackType) * n); + if (IS_NULL(x)) { + STACK_SAVE; + return ONIGERR_MEMORY; + } + } + *arg_stk = x + (stk - stk_base); + *arg_stk_base = x; + *arg_stk_end = x + n; + return 0; +} + +#define STACK_ENSURE(n) do {\ + if (stk_end - stk < (n)) {\ + int r = stack_double(&stk_base, &stk_end, &stk, stk_alloc, msa);\ + if (r != 0) { STACK_SAVE; return r; } \ + }\ +} while(0) + +#define STACK_AT(index) (stk_base + (index)) +#define GET_STACK_INDEX(stk) ((stk) - stk_base) + +#define STACK_PUSH_TYPE(stack_type) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + STACK_INC;\ +} while(0) + +#define IS_TO_VOID_TARGET(stk) (((stk)->type & STK_MASK_TO_VOID_TARGET) != 0) + +#ifdef USE_COMBINATION_EXPLOSION_CHECK +#define STATE_CHECK_POS(s,snum) \ + (((s) - str) * num_comb_exp_check + ((snum) - 1)) +#define STATE_CHECK_VAL(v,snum) do {\ + if (state_check_buff != NULL) {\ + int x = STATE_CHECK_POS(s,snum);\ + (v) = state_check_buff[x/8] & (1<<(x%8));\ + }\ + else (v) = 0;\ +} while(0) + + +#define ELSE_IF_STATE_CHECK_MARK(stk) \ + else if ((stk)->type == STK_STATE_CHECK_MARK) { \ + int x = STATE_CHECK_POS(stk->u.state.pstr, stk->u.state.state_check);\ + state_check_buff[x/8] |= (1<<(x%8)); \ + } + +#define STACK_PUSH(stack_type,pat,s,sprev) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = (s);\ + stk->u.state.pstr_prev = (sprev);\ + stk->u.state.state_check = 0;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_ENSURED(stack_type,pat) do {\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + stk->u.state.state_check = 0;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_ALT_WITH_STATE_CHECK(pat,s,sprev,snum) do {\ + STACK_ENSURE(1);\ + stk->type = STK_ALT;\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = (s);\ + stk->u.state.pstr_prev = (sprev);\ + stk->u.state.state_check = ((state_check_buff != NULL) ? (snum) : 0);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_STATE_CHECK(s,snum) do {\ + if (state_check_buff != NULL) {\ + STACK_ENSURE(1);\ + stk->type = STK_STATE_CHECK_MARK;\ + stk->u.state.pstr = (s);\ + stk->u.state.state_check = (snum);\ + STACK_INC;\ + }\ +} while(0) + +#else /* USE_COMBINATION_EXPLOSION_CHECK */ + +#define ELSE_IF_STATE_CHECK_MARK(stk) + +#define STACK_PUSH(stack_type,pat,s,sprev) do {\ + STACK_ENSURE(1);\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + stk->u.state.pstr = (s);\ + stk->u.state.pstr_prev = (sprev);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_ENSURED(stack_type,pat) do {\ + stk->type = (stack_type);\ + stk->u.state.pcode = (pat);\ + STACK_INC;\ +} while(0) +#endif /* USE_COMBINATION_EXPLOSION_CHECK */ + +#define STACK_PUSH_ALT(pat,s,sprev) STACK_PUSH(STK_ALT,pat,s,sprev) +#define STACK_PUSH_POS(s,sprev) STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev) +#define STACK_PUSH_POS_NOT(pat,s,sprev) STACK_PUSH(STK_POS_NOT,pat,s,sprev) +#define STACK_PUSH_STOP_BT STACK_PUSH_TYPE(STK_STOP_BT) +#define STACK_PUSH_LOOK_BEHIND_NOT(pat,s,sprev) \ + STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev) + +#define STACK_PUSH_REPEAT(id, pat) do {\ + STACK_ENSURE(1);\ + stk->type = STK_REPEAT;\ + stk->u.repeat.num = (id);\ + stk->u.repeat.pcode = (pat);\ + stk->u.repeat.count = 0;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_REPEAT_INC(sindex) do {\ + STACK_ENSURE(1);\ + stk->type = STK_REPEAT_INC;\ + stk->u.repeat_inc.si = (sindex);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_START(mnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_START;\ + stk->u.mem.num = (mnum);\ + stk->u.mem.pstr = (s);\ + stk->u.mem.start = mem_start_stk[mnum];\ + stk->u.mem.end = mem_end_stk[mnum];\ + mem_start_stk[mnum] = GET_STACK_INDEX(stk);\ + mem_end_stk[mnum] = INVALID_STACK_INDEX;\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_END(mnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_END;\ + stk->u.mem.num = (mnum);\ + stk->u.mem.pstr = (s);\ + stk->u.mem.start = mem_start_stk[mnum];\ + stk->u.mem.end = mem_end_stk[mnum];\ + mem_end_stk[mnum] = GET_STACK_INDEX(stk);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_MEM_END_MARK(mnum) do {\ + STACK_ENSURE(1);\ + stk->type = STK_MEM_END_MARK;\ + stk->u.mem.num = (mnum);\ + STACK_INC;\ +} while(0) + +#define STACK_GET_MEM_START(mnum, k) do {\ + int level = 0;\ + k = stk;\ + while (k > stk_base) {\ + k--;\ + if ((k->type & STK_MASK_MEM_END_OR_MARK) != 0 \ + && k->u.mem.num == (mnum)) {\ + level++;\ + }\ + else if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\ + if (level == 0) break;\ + level--;\ + }\ + }\ +} while(0) + +#define STACK_GET_MEM_RANGE(k, mnum, start, end) do {\ + int level = 0;\ + while (k < stk) {\ + if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\ + if (level == 0) (start) = k->u.mem.pstr;\ + level++;\ + }\ + else if (k->type == STK_MEM_END && k->u.mem.num == (mnum)) {\ + level--;\ + if (level == 0) {\ + (end) = k->u.mem.pstr;\ + break;\ + }\ + }\ + k++;\ + }\ +} while(0) + +#define STACK_PUSH_NULL_CHECK_START(cnum, s) do {\ + STACK_ENSURE(1);\ + stk->type = STK_NULL_CHECK_START;\ + stk->u.null_check.num = (cnum);\ + stk->u.null_check.pstr = (s);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_NULL_CHECK_END(cnum) do {\ + STACK_ENSURE(1);\ + stk->type = STK_NULL_CHECK_END;\ + stk->u.null_check.num = (cnum);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_CALL_FRAME(pat) do {\ + STACK_ENSURE(1);\ + stk->type = STK_CALL_FRAME;\ + stk->u.call_frame.ret_addr = (pat);\ + STACK_INC;\ +} while(0) + +#define STACK_PUSH_RETURN do {\ + STACK_ENSURE(1);\ + stk->type = STK_RETURN;\ + STACK_INC;\ +} while(0) + + +#ifdef ONIG_DEBUG +#define STACK_BASE_CHECK(p, at) \ + if ((p) < stk_base) {\ + fprintf(stderr, "at %s\n", at);\ + goto stack_error;\ + } +#else +#define STACK_BASE_CHECK(p, at) +#endif + +#define STACK_POP_ONE do {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP_ONE"); \ +} while(0) + +#define STACK_POP do {\ + switch (pop_level) {\ + case STACK_POP_LEVEL_FREE:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + ELSE_IF_STATE_CHECK_MARK(stk);\ + }\ + break;\ + case STACK_POP_LEVEL_MEM_START:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP 2"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + else if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + ELSE_IF_STATE_CHECK_MARK(stk);\ + }\ + break;\ + default:\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP 3"); \ + if ((stk->type & STK_MASK_POP_USED) != 0) break;\ + else if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + else if (stk->type == STK_REPEAT_INC) {\ + STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + ELSE_IF_STATE_CHECK_MARK(stk);\ + }\ + break;\ + }\ +} while(0) + +#define STACK_POP_TIL_POS_NOT do {\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP_TIL_POS_NOT"); \ + if (stk->type == STK_POS_NOT) break;\ + else if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + else if (stk->type == STK_REPEAT_INC) {\ + STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + ELSE_IF_STATE_CHECK_MARK(stk);\ + }\ +} while(0) + +#define STACK_POP_TIL_LOOK_BEHIND_NOT do {\ + while (1) {\ + stk--;\ + STACK_BASE_CHECK(stk, "STACK_POP_TIL_LOOK_BEHIND_NOT"); \ + if (stk->type == STK_LOOK_BEHIND_NOT) break;\ + else if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + else if (stk->type == STK_REPEAT_INC) {\ + STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\ + mem_end_stk[stk->u.mem.num] = stk->u.mem.end;\ + }\ + ELSE_IF_STATE_CHECK_MARK(stk);\ + }\ +} while(0) + +#define STACK_POS_END(k) do {\ + k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_POS_END"); \ + if (IS_TO_VOID_TARGET(k)) {\ + k->type = STK_VOID;\ + }\ + else if (k->type == STK_POS) {\ + k->type = STK_VOID;\ + break;\ + }\ + }\ +} while(0) + +#define STACK_STOP_BT_END do {\ + OnigStackType *k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_STOP_BT_END"); \ + if (IS_TO_VOID_TARGET(k)) {\ + k->type = STK_VOID;\ + }\ + else if (k->type == STK_STOP_BT) {\ + k->type = STK_VOID;\ + break;\ + }\ + }\ +} while(0) + +#define STACK_NULL_CHECK(isnull,id,s) do {\ + OnigStackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_NULL_CHECK"); \ + if (k->type == STK_NULL_CHECK_START) {\ + if (k->u.null_check.num == (id)) {\ + (isnull) = (k->u.null_check.pstr == (s));\ + break;\ + }\ + }\ + }\ +} while(0) + +#define STACK_NULL_CHECK_REC(isnull,id,s) do {\ + int level = 0;\ + OnigStackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_NULL_CHECK_REC"); \ + if (k->type == STK_NULL_CHECK_START) {\ + if (k->u.null_check.num == (id)) {\ + if (level == 0) {\ + (isnull) = (k->u.null_check.pstr == (s));\ + break;\ + }\ + else level--;\ + }\ + }\ + else if (k->type == STK_NULL_CHECK_END) {\ + level++;\ + }\ + }\ +} while(0) + +#define STACK_NULL_CHECK_MEMST(isnull,id,s,reg) do {\ + OnigStackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_NULL_CHECK_MEMST"); \ + if (k->type == STK_NULL_CHECK_START) {\ + if (k->u.null_check.num == (id)) {\ + if (k->u.null_check.pstr != (s)) {\ + (isnull) = 0;\ + break;\ + }\ + else {\ + UChar* endp;\ + (isnull) = 1;\ + while (k < stk) {\ + if (k->type == STK_MEM_START) {\ + if (k->u.mem.end == INVALID_STACK_INDEX) {\ + (isnull) = 0; break;\ + }\ + if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\ + endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\ + else\ + endp = (UChar* )k->u.mem.end;\ + if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\ + (isnull) = 0; break;\ + }\ + else if (endp != s) {\ + (isnull) = -1; /* empty, but position changed */ \ + }\ + }\ + k++;\ + }\ + break;\ + }\ + }\ + }\ + }\ +} while(0) + +#define STACK_NULL_CHECK_MEMST_REC(isnull,id,s,reg) do {\ + int level = 0;\ + OnigStackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_NULL_CHECK_MEMST_REC"); \ + if (k->type == STK_NULL_CHECK_START) {\ + if (k->u.null_check.num == (id)) {\ + if (level == 0) {\ + if (k->u.null_check.pstr != (s)) {\ + (isnull) = 0;\ + break;\ + }\ + else {\ + UChar* endp;\ + (isnull) = 1;\ + while (k < stk) {\ + if (k->type == STK_MEM_START) {\ + if (k->u.mem.end == INVALID_STACK_INDEX) {\ + (isnull) = 0; break;\ + }\ + if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\ + endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\ + else\ + endp = (UChar* )k->u.mem.end;\ + if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\ + (isnull) = 0; break;\ + }\ + else if (endp != s) {\ + (isnull) = -1; /* empty, but position changed */ \ + }\ + }\ + k++;\ + }\ + break;\ + }\ + }\ + else {\ + level--;\ + }\ + }\ + }\ + else if (k->type == STK_NULL_CHECK_END) {\ + if (k->u.null_check.num == (id)) level++;\ + }\ + }\ +} while(0) + +#define STACK_GET_REPEAT(id, k) do {\ + int level = 0;\ + k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_GET_REPEAT"); \ + if (k->type == STK_REPEAT) {\ + if (level == 0) {\ + if (k->u.repeat.num == (id)) {\ + break;\ + }\ + }\ + }\ + else if (k->type == STK_CALL_FRAME) level--;\ + else if (k->type == STK_RETURN) level++;\ + }\ +} while(0) + +#define STACK_RETURN(addr) do {\ + int level = 0;\ + OnigStackType* k = stk;\ + while (1) {\ + k--;\ + STACK_BASE_CHECK(k, "STACK_RETURN"); \ + if (k->type == STK_CALL_FRAME) {\ + if (level == 0) {\ + (addr) = k->u.call_frame.ret_addr;\ + break;\ + }\ + else level--;\ + }\ + else if (k->type == STK_RETURN)\ + level++;\ + }\ +} while(0) + + +#define STRING_CMP(s1,s2,len) do {\ + while (len-- > 0) {\ + if (*s1++ != *s2++) goto fail;\ + }\ +} while(0) + +#define STRING_CMP_IC(case_fold_flag,s1,ps2,len,text_end) do {\ + if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len, text_end) == 0) \ + goto fail; \ +} while(0) + +static int string_cmp_ic(OnigEncoding enc, int case_fold_flag, + UChar* s1, UChar** ps2, int mblen, const UChar* text_end) +{ + UChar buf1[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar buf2[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *p1, *p2, *end1, *s2; + int len1, len2; + + s2 = *ps2; + end1 = s1 + mblen; + while (s1 < end1) { + len1 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s1, text_end, buf1); + len2 = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &s2, text_end, buf2); + if (len1 != len2) return 0; + p1 = buf1; + p2 = buf2; + while (len1-- > 0) { + if (*p1 != *p2) return 0; + p1++; + p2++; + } + } + + *ps2 = s2; + return 1; +} + +#define STRING_CMP_VALUE(s1,s2,len,is_fail) do {\ + is_fail = 0;\ + while (len-- > 0) {\ + if (*s1++ != *s2++) {\ + is_fail = 1; break;\ + }\ + }\ +} while(0) + +#define STRING_CMP_VALUE_IC(case_fold_flag,s1,ps2,len,text_end,is_fail) do {\ + if (string_cmp_ic(encode, case_fold_flag, s1, ps2, len, text_end) == 0) \ + is_fail = 1; \ + else \ + is_fail = 0; \ +} while(0) + + +#define IS_EMPTY_STR (str == end) +#define ON_STR_BEGIN(s) ((s) == str) +#define ON_STR_END(s) ((s) == end) +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE +#define DATA_ENSURE_CHECK1 (s < right_range) +#define DATA_ENSURE_CHECK(n) (s + (n) <= right_range) +#define DATA_ENSURE(n) if (s + (n) > right_range) goto fail +#else +#define DATA_ENSURE_CHECK1 (s < end) +#define DATA_ENSURE_CHECK(n) (s + (n) <= end) +#define DATA_ENSURE(n) if (s + (n) > end) goto fail +#endif /* USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */ + + +#ifdef USE_CAPTURE_HISTORY +static int +make_capture_history_tree(OnigCaptureTreeNode* node, OnigStackType** kp, + OnigStackType* stk_top, UChar* str, regex_t* reg) +{ + int n, r; + OnigCaptureTreeNode* child; + OnigStackType* k = *kp; + + while (k < stk_top) { + if (k->type == STK_MEM_START) { + n = k->u.mem.num; + if (n <= ONIG_MAX_CAPTURE_HISTORY_GROUP && + BIT_STATUS_AT(reg->capture_history, n) != 0) { + child = history_node_new(); + CHECK_NULL_RETURN_MEMERR(child); + child->group = n; + child->beg = (int )(k->u.mem.pstr - str); + r = history_tree_add_child(node, child); + if (r != 0) return r; + *kp = (k + 1); + r = make_capture_history_tree(child, kp, stk_top, str, reg); + if (r != 0) return r; + + k = *kp; + child->end = (int )(k->u.mem.pstr - str); + } + } + else if (k->type == STK_MEM_END) { + if (k->u.mem.num == node->group) { + node->end = (int )(k->u.mem.pstr - str); + *kp = k; + return 0; + } + } + k++; + } + + return 1; /* 1: root node ending. */ +} +#endif + +#ifdef USE_BACKREF_WITH_LEVEL +static int mem_is_in_memp(int mem, int num, UChar* memp) +{ + int i; + MemNumType m; + + for (i = 0; i < num; i++) { + GET_MEMNUM_INC(m, memp); + if (mem == (int )m) return 1; + } + return 0; +} + +static int backref_match_at_nested_level(regex_t* reg + , OnigStackType* top, OnigStackType* stk_base + , int ignore_case, int case_fold_flag + , int nest, int mem_num, UChar* memp, UChar** s, const UChar* send) +{ + UChar *ss, *p, *pstart, *pend = NULL_UCHARP; + int level; + OnigStackType* k; + + level = 0; + k = top; + k--; + while (k >= stk_base) { + if (k->type == STK_CALL_FRAME) { + level--; + } + else if (k->type == STK_RETURN) { + level++; + } + else if (level == nest) { + if (k->type == STK_MEM_START) { + if (mem_is_in_memp(k->u.mem.num, mem_num, memp)) { + pstart = k->u.mem.pstr; + if (pend != NULL_UCHARP) { + if (pend - pstart > send - *s) return 0; /* or goto next_mem; */ + p = pstart; + ss = *s; + + if (ignore_case != 0) { + if (string_cmp_ic(reg->enc, case_fold_flag, + pstart, &ss, (int )(pend - pstart), send) == 0) + return 0; /* or goto next_mem; */ + } + else { + while (p < pend) { + if (*p++ != *ss++) return 0; /* or goto next_mem; */ + } + } + + *s = ss; + return 1; + } + } + } + else if (k->type == STK_MEM_END) { + if (mem_is_in_memp(k->u.mem.num, mem_num, memp)) { + pend = k->u.mem.pstr; + } + } + } + k--; + } + + return 0; +} +#endif /* USE_BACKREF_WITH_LEVEL */ + + +#ifdef ONIG_DEBUG_STATISTICS + +#define USE_TIMEOFDAY + +#ifdef USE_TIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +static struct timeval ts, te; +#define GETTIME(t) gettimeofday(&(t), (struct timezone* )0) +#define TIMEDIFF(te,ts) (((te).tv_usec - (ts).tv_usec) + \ + (((te).tv_sec - (ts).tv_sec)*1000000)) +#else +#ifdef HAVE_SYS_TIMES_H +#include +#endif +static struct tms ts, te; +#define GETTIME(t) times(&(t)) +#define TIMEDIFF(te,ts) ((te).tms_utime - (ts).tms_utime) +#endif + +static int OpCounter[256]; +static int OpPrevCounter[256]; +static unsigned long OpTime[256]; +static int OpCurr = OP_FINISH; +static int OpPrevTarget = OP_FAIL; +static int MaxStackDepth = 0; + +#define MOP_IN(opcode) do {\ + if (opcode == OpPrevTarget) OpPrevCounter[OpCurr]++;\ + OpCurr = opcode;\ + OpCounter[opcode]++;\ + GETTIME(ts);\ +} while(0) + +#define MOP_OUT do {\ + GETTIME(te);\ + OpTime[OpCurr] += TIMEDIFF(te, ts);\ +} while(0) + +extern void +onig_statistics_init(void) +{ + int i; + for (i = 0; i < 256; i++) { + OpCounter[i] = OpPrevCounter[i] = 0; OpTime[i] = 0; + } + MaxStackDepth = 0; +} + +extern void +onig_print_statistics(FILE* f) +{ + int i; + fprintf(f, " count prev time\n"); + for (i = 0; OnigOpInfo[i].opcode >= 0; i++) { + fprintf(f, "%8d: %8d: %10ld: %s\n", + OpCounter[i], OpPrevCounter[i], OpTime[i], OnigOpInfo[i].name); + } + fprintf(f, "\nmax stack depth: %d\n", MaxStackDepth); +} + +#define STACK_INC do {\ + stk++;\ + if (stk - stk_base > MaxStackDepth) \ + MaxStackDepth = stk - stk_base;\ +} while(0) + +#else +#define STACK_INC stk++ + +#define MOP_IN(opcode) +#define MOP_OUT +#endif + + +/* matching region of POSIX API */ +typedef int regoff_t; + +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} posix_regmatch_t; + +/* match data(str - end) from position (sstart). */ +/* if sstart == str then set sprev to NULL. */ +static int +match_at(regex_t* reg, const UChar* str, const UChar* end, +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE + const UChar* right_range, +#endif + const UChar* sstart, UChar* sprev, OnigMatchArg* msa) +{ + static const UChar FinishCode[] = { OP_FINISH }; + + int i, n, num_mem, best_len, pop_level; + LengthType tlen, tlen2; + MemNumType mem; + RelAddrType addr; + OnigOptionType option = reg->options; + OnigEncoding encode = reg->enc; + OnigCaseFoldType case_fold_flag = reg->case_fold_flag; + UChar *s, *q, *sbegin; + UChar *p = reg->p; + char *alloca_base; + OnigStackType *stk_alloc, *stk_base, *stk, *stk_end; + OnigStackType *stkp; /* used as any purpose. */ + OnigStackIndex si; + OnigStackIndex *repeat_stk; + OnigStackIndex *mem_start_stk, *mem_end_stk; +#ifdef USE_COMBINATION_EXPLOSION_CHECK + int scv; + unsigned char* state_check_buff = msa->state_check_buff; + int num_comb_exp_check = reg->num_comb_exp_check; +#endif + n = reg->num_repeat + reg->num_mem * 2; + + STACK_INIT(alloca_base, n, INIT_MATCH_STACK_SIZE); + pop_level = reg->stack_pop_level; + num_mem = reg->num_mem; + repeat_stk = (OnigStackIndex* )alloca_base; + + mem_start_stk = (OnigStackIndex* )(repeat_stk + reg->num_repeat); + mem_end_stk = mem_start_stk + num_mem; + mem_start_stk--; /* for index start from 1, + mem_start_stk[1]..mem_start_stk[num_mem] */ + mem_end_stk--; /* for index start from 1, + mem_end_stk[1]..mem_end_stk[num_mem] */ + for (i = 1; i <= num_mem; i++) { + mem_start_stk[i] = mem_end_stk[i] = INVALID_STACK_INDEX; + } + +#ifdef ONIG_DEBUG_MATCH + fprintf(stderr, "match_at: str: %d, end: %d, start: %d, sprev: %d\n", + (int )str, (int )end, (int )sstart, (int )sprev); + fprintf(stderr, "size: %d, start offset: %d\n", + (int )(end - str), (int )(sstart - str)); +#endif + + STACK_PUSH_ENSURED(STK_ALT, (UChar *)FinishCode); /* bottom stack */ + best_len = ONIG_MISMATCH; + s = (UChar* )sstart; + while (1) { +#ifdef ONIG_DEBUG_MATCH + { + UChar *q, *bp, buf[50]; + int len; + fprintf(stderr, "%4d> \"", (int )(s - str)); + bp = buf; + for (i = 0, q = s; i < 7 && q < end; i++) { + len = enclen(encode, q); + while (len-- > 0) *bp++ = *q++; + } + if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; } + else { xmemcpy(bp, "\"", 1); bp += 1; } + *bp = 0; + fputs((char* )buf, stderr); + for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr); + onig_print_compiled_byte_code(stderr, p, NULL, encode); + fprintf(stderr, "\n"); + } +#endif + + sbegin = s; + switch (*p++) { + case OP_END: MOP_IN(OP_END); + n = s - sstart; + if (n > best_len) { + OnigRegion* region; +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (IS_FIND_LONGEST(option)) { + if (n > msa->best_len) { + msa->best_len = n; + msa->best_s = (UChar* )sstart; + } + else + goto end_best_len; + } +#endif + best_len = n; + region = msa->region; + if (region) { +#ifdef USE_POSIX_API_REGION_OPTION + if (IS_POSIX_REGION(msa->options)) { + posix_regmatch_t* rmt = (posix_regmatch_t* )region; + + rmt[0].rm_so = sstart - str; + rmt[0].rm_eo = s - str; + for (i = 1; i <= num_mem; i++) { + if (mem_end_stk[i] != INVALID_STACK_INDEX) { + if (BIT_STATUS_AT(reg->bt_mem_start, i)) + rmt[i].rm_so = STACK_AT(mem_start_stk[i])->u.mem.pstr - str; + else + rmt[i].rm_so = (UChar* )((void* )(mem_start_stk[i])) - str; + + rmt[i].rm_eo = (BIT_STATUS_AT(reg->bt_mem_end, i) + ? STACK_AT(mem_end_stk[i])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[i])) - str; + } + else { + rmt[i].rm_so = rmt[i].rm_eo = ONIG_REGION_NOTPOS; + } + } + } + else { +#endif /* USE_POSIX_API_REGION_OPTION */ + region->beg[0] = sstart - str; + region->end[0] = s - str; + for (i = 1; i <= num_mem; i++) { + if (mem_end_stk[i] != INVALID_STACK_INDEX) { + if (BIT_STATUS_AT(reg->bt_mem_start, i)) + region->beg[i] = STACK_AT(mem_start_stk[i])->u.mem.pstr - str; + else + region->beg[i] = (UChar* )((void* )mem_start_stk[i]) - str; + + region->end[i] = (BIT_STATUS_AT(reg->bt_mem_end, i) + ? STACK_AT(mem_end_stk[i])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[i])) - str; + } + else { + region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS; + } + } + +#ifdef USE_CAPTURE_HISTORY + if (reg->capture_history != 0) { + int r; + OnigCaptureTreeNode* node; + + if (IS_NULL(region->history_root)) { + region->history_root = node = history_node_new(); + CHECK_NULL_RETURN_MEMERR(node); + } + else { + node = region->history_root; + history_tree_clear(node); + } + + node->group = 0; + node->beg = sstart - str; + node->end = s - str; + + stkp = stk_base; + r = make_capture_history_tree(region->history_root, &stkp, + stk, (UChar* )str, reg); + if (r < 0) { + best_len = r; /* error code */ + goto finish; + } + } +#endif /* USE_CAPTURE_HISTORY */ +#ifdef USE_POSIX_API_REGION_OPTION + } /* else IS_POSIX_REGION() */ +#endif + } /* if (region) */ + } /* n > best_len */ + +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + end_best_len: +#endif + MOP_OUT; + + if (IS_FIND_CONDITION(option)) { + if (IS_FIND_NOT_EMPTY(option) && s == sstart) { + best_len = ONIG_MISMATCH; + goto fail; /* for retry */ + } + if (IS_FIND_LONGEST(option) && DATA_ENSURE_CHECK1) { + goto fail; /* for retry */ + } + } + + /* default behavior: return first-matching result. */ + goto finish; + break; + + case OP_EXACT1: MOP_IN(OP_EXACT1); +#if 0 + DATA_ENSURE(1); + if (*p != *s) goto fail; + p++; s++; +#endif + if (*p != *s++) goto fail; + DATA_ENSURE(0); + p++; + MOP_OUT; + break; + + case OP_EXACT1_IC: MOP_IN(OP_EXACT1_IC); + { + int len; + UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + + DATA_ENSURE(1); + len = ONIGENC_MBC_CASE_FOLD(encode, + /* DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag), */ + case_fold_flag, + &s, end, lowbuf); + DATA_ENSURE(0); + q = lowbuf; + while (len-- > 0) { + if (*p != *q) { + goto fail; + } + p++; q++; + } + } + MOP_OUT; + break; + + case OP_EXACT2: MOP_IN(OP_EXACT2); + DATA_ENSURE(2); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + sprev = s; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACT3: MOP_IN(OP_EXACT3); + DATA_ENSURE(3); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + sprev = s; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACT4: MOP_IN(OP_EXACT4); + DATA_ENSURE(4); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + sprev = s; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACT5: MOP_IN(OP_EXACT5); + DATA_ENSURE(5); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + sprev = s; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACTN: MOP_IN(OP_EXACTN); + GET_LENGTH_INC(tlen, p); + DATA_ENSURE(tlen); + while (tlen-- > 0) { + if (*p++ != *s++) goto fail; + } + sprev = s - 1; + MOP_OUT; + continue; + break; + + case OP_EXACTN_IC: MOP_IN(OP_EXACTN_IC); + { + int len; + UChar *q, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + + GET_LENGTH_INC(tlen, p); + endp = p + tlen; + + while (p < endp) { + sprev = s; + DATA_ENSURE(1); + len = ONIGENC_MBC_CASE_FOLD(encode, + /* DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag), */ + case_fold_flag, + &s, end, lowbuf); + DATA_ENSURE(0); + q = lowbuf; + while (len-- > 0) { + if (*p != *q) goto fail; + p++; q++; + } + } + } + + MOP_OUT; + continue; + break; + + case OP_EXACTMB2N1: MOP_IN(OP_EXACTMB2N1); + DATA_ENSURE(2); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + MOP_OUT; + break; + + case OP_EXACTMB2N2: MOP_IN(OP_EXACTMB2N2); + DATA_ENSURE(4); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + sprev = s; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACTMB2N3: MOP_IN(OP_EXACTMB2N3); + DATA_ENSURE(6); + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + sprev = s; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + MOP_OUT; + continue; + break; + + case OP_EXACTMB2N: MOP_IN(OP_EXACTMB2N); + GET_LENGTH_INC(tlen, p); + DATA_ENSURE(tlen * 2); + while (tlen-- > 0) { + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + } + sprev = s - 2; + MOP_OUT; + continue; + break; + + case OP_EXACTMB3N: MOP_IN(OP_EXACTMB3N); + GET_LENGTH_INC(tlen, p); + DATA_ENSURE(tlen * 3); + while (tlen-- > 0) { + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + if (*p != *s) goto fail; + p++; s++; + } + sprev = s - 3; + MOP_OUT; + continue; + break; + + case OP_EXACTMBN: MOP_IN(OP_EXACTMBN); + GET_LENGTH_INC(tlen, p); /* mb-len */ + GET_LENGTH_INC(tlen2, p); /* string len */ + tlen2 *= tlen; + DATA_ENSURE(tlen2); + while (tlen2-- > 0) { + if (*p != *s) goto fail; + p++; s++; + } + sprev = s - tlen; + MOP_OUT; + continue; + break; + + case OP_CCLASS: MOP_IN(OP_CCLASS); + DATA_ENSURE(1); + if (BITSET_AT(((BitSetRef )p), *s) == 0) goto fail; + p += SIZE_BITSET; + s += enclen(encode, s, end); /* OP_CCLASS can match mb-code. \D, \S */ + MOP_OUT; + break; + + case OP_CCLASS_MB: MOP_IN(OP_CCLASS_MB); + if (! ONIGENC_IS_MBC_HEAD(encode, s, end)) goto fail; + + cclass_mb: + GET_LENGTH_INC(tlen, p); + { + OnigCodePoint code; + UChar *ss; + int mb_len; + + DATA_ENSURE(1); + mb_len = enclen(encode, s, end); + DATA_ENSURE(mb_len); + ss = s; + s += mb_len; + code = ONIGENC_MBC_TO_CODE(encode, ss, s); + +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS + if (! onig_is_in_code_range(p, code)) goto fail; +#else + q = p; + ALIGNMENT_RIGHT(q); + if (! onig_is_in_code_range(q, code)) goto fail; +#endif + } + p += tlen; + MOP_OUT; + break; + + case OP_CCLASS_MIX: MOP_IN(OP_CCLASS_MIX); + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_HEAD(encode, s, end)) { + p += SIZE_BITSET; + goto cclass_mb; + } + else { + if (BITSET_AT(((BitSetRef )p), *s) == 0) + goto fail; + + p += SIZE_BITSET; + GET_LENGTH_INC(tlen, p); + p += tlen; + s++; + } + MOP_OUT; + break; + + case OP_CCLASS_NOT: MOP_IN(OP_CCLASS_NOT); + DATA_ENSURE(1); + if (BITSET_AT(((BitSetRef )p), *s) != 0) goto fail; + p += SIZE_BITSET; + s += enclen(encode, s, end); + MOP_OUT; + break; + + case OP_CCLASS_MB_NOT: MOP_IN(OP_CCLASS_MB_NOT); + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_HEAD(encode, s, end)) { + s++; + GET_LENGTH_INC(tlen, p); + p += tlen; + goto cc_mb_not_success; + } + + cclass_mb_not: + GET_LENGTH_INC(tlen, p); + { + OnigCodePoint code; + UChar *ss; + int mb_len = enclen(encode, s, end); + + if (! DATA_ENSURE_CHECK(mb_len)) { + DATA_ENSURE(1); + s = (UChar* )end; + p += tlen; + goto cc_mb_not_success; + } + + ss = s; + s += mb_len; + code = ONIGENC_MBC_TO_CODE(encode, ss, s); + +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS + if (onig_is_in_code_range(p, code)) goto fail; +#else + q = p; + ALIGNMENT_RIGHT(q); + if (onig_is_in_code_range(q, code)) goto fail; +#endif + } + p += tlen; + + cc_mb_not_success: + MOP_OUT; + break; + + case OP_CCLASS_MIX_NOT: MOP_IN(OP_CCLASS_MIX_NOT); + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_HEAD(encode, s, end)) { + p += SIZE_BITSET; + goto cclass_mb_not; + } + else { + if (BITSET_AT(((BitSetRef )p), *s) != 0) + goto fail; + + p += SIZE_BITSET; + GET_LENGTH_INC(tlen, p); + p += tlen; + s++; + } + MOP_OUT; + break; + + case OP_CCLASS_NODE: MOP_IN(OP_CCLASS_NODE); + { + OnigCodePoint code; + void *node; + int mb_len; + UChar *ss; + + DATA_ENSURE(1); + GET_POINTER_INC(node, p); + mb_len = enclen(encode, s, end); + ss = s; + s += mb_len; + DATA_ENSURE(0); + code = ONIGENC_MBC_TO_CODE(encode, ss, s); + if (onig_is_code_in_cc_len(mb_len, code, node) == 0) goto fail; + } + MOP_OUT; + break; + + case OP_ANYCHAR: MOP_IN(OP_ANYCHAR); + DATA_ENSURE(1); + n = enclen(encode, s, end); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + s += n; + MOP_OUT; + break; + + case OP_ANYCHAR_ML: MOP_IN(OP_ANYCHAR_ML); + DATA_ENSURE(1); + n = enclen(encode, s, end); + DATA_ENSURE(n); + s += n; + MOP_OUT; + break; + + case OP_ANYCHAR_STAR: MOP_IN(OP_ANYCHAR_STAR); + while (DATA_ENSURE_CHECK1) { + STACK_PUSH_ALT(p, s, sprev); + n = enclen(encode, s, end); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + sprev = s; + s += n; + } + MOP_OUT; + break; + + case OP_ANYCHAR_ML_STAR: MOP_IN(OP_ANYCHAR_ML_STAR); + while (DATA_ENSURE_CHECK1) { + STACK_PUSH_ALT(p, s, sprev); + n = enclen(encode, s, end); + if (n > 1) { + DATA_ENSURE(n); + sprev = s; + s += n; + } + else { + sprev = s; + s++; + } + } + MOP_OUT; + break; + + case OP_ANYCHAR_STAR_PEEK_NEXT: MOP_IN(OP_ANYCHAR_STAR_PEEK_NEXT); + while (DATA_ENSURE_CHECK1) { + if (*p == *s) { + STACK_PUSH_ALT(p + 1, s, sprev); + } + n = enclen(encode, s, end); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + sprev = s; + s += n; + } + p++; + MOP_OUT; + break; + + case OP_ANYCHAR_ML_STAR_PEEK_NEXT:MOP_IN(OP_ANYCHAR_ML_STAR_PEEK_NEXT); + while (DATA_ENSURE_CHECK1) { + if (*p == *s) { + STACK_PUSH_ALT(p + 1, s, sprev); + } + n = enclen(encode, s, end); + if (n > 1) { + DATA_ENSURE(n); + sprev = s; + s += n; + } + else { + sprev = s; + s++; + } + } + p++; + MOP_OUT; + break; + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + case OP_STATE_CHECK_ANYCHAR_STAR: MOP_IN(OP_STATE_CHECK_ANYCHAR_STAR); + GET_STATE_CHECK_NUM_INC(mem, p); + while (DATA_ENSURE_CHECK1) { + STATE_CHECK_VAL(scv, mem); + if (scv) goto fail; + + STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem); + n = enclen(encode, s); + DATA_ENSURE(n); + if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; + sprev = s; + s += n; + } + MOP_OUT; + break; + + case OP_STATE_CHECK_ANYCHAR_ML_STAR: + MOP_IN(OP_STATE_CHECK_ANYCHAR_ML_STAR); + + GET_STATE_CHECK_NUM_INC(mem, p); + while (DATA_ENSURE_CHECK1) { + STATE_CHECK_VAL(scv, mem); + if (scv) goto fail; + + STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem); + n = enclen(encode, s); + if (n > 1) { + DATA_ENSURE(n); + sprev = s; + s += n; + } + else { + sprev = s; + s++; + } + } + MOP_OUT; + break; +#endif /* USE_COMBINATION_EXPLOSION_CHECK */ + + case OP_WORD: MOP_IN(OP_WORD); + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + + s += enclen(encode, s, end); + MOP_OUT; + break; + + case OP_NOT_WORD: MOP_IN(OP_NOT_WORD); + DATA_ENSURE(1); + if (ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + + s += enclen(encode, s, end); + MOP_OUT; + break; + + case OP_WORD_BOUND: MOP_IN(OP_WORD_BOUND); + if (ON_STR_BEGIN(s)) { + DATA_ENSURE(1); + if (! ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + } + else if (ON_STR_END(s)) { + if (! ONIGENC_IS_MBC_WORD(encode, sprev, end)) + goto fail; + } + else { + if (ONIGENC_IS_MBC_WORD(encode, s, end) + == ONIGENC_IS_MBC_WORD(encode, sprev, end)) + goto fail; + } + MOP_OUT; + continue; + break; + + case OP_NOT_WORD_BOUND: MOP_IN(OP_NOT_WORD_BOUND); + if (ON_STR_BEGIN(s)) { + if (DATA_ENSURE_CHECK1 && ONIGENC_IS_MBC_WORD(encode, s, end)) + goto fail; + } + else if (ON_STR_END(s)) { + if (ONIGENC_IS_MBC_WORD(encode, sprev, end)) + goto fail; + } + else { + if (ONIGENC_IS_MBC_WORD(encode, s, end) + != ONIGENC_IS_MBC_WORD(encode, sprev, end)) + goto fail; + } + MOP_OUT; + continue; + break; + +#ifdef USE_WORD_BEGIN_END + case OP_WORD_BEGIN: MOP_IN(OP_WORD_BEGIN); + if (DATA_ENSURE_CHECK1 && ONIGENC_IS_MBC_WORD(encode, s, end)) { + if (ON_STR_BEGIN(s) || !ONIGENC_IS_MBC_WORD(encode, sprev, end)) { + MOP_OUT; + continue; + } + } + goto fail; + break; + + case OP_WORD_END: MOP_IN(OP_WORD_END); + if (!ON_STR_BEGIN(s) && ONIGENC_IS_MBC_WORD(encode, sprev, end)) { + if (ON_STR_END(s) || !ONIGENC_IS_MBC_WORD(encode, s, end)) { + MOP_OUT; + continue; + } + } + goto fail; + break; +#endif + + case OP_BEGIN_BUF: MOP_IN(OP_BEGIN_BUF); + if (! ON_STR_BEGIN(s)) goto fail; + + MOP_OUT; + continue; + break; + + case OP_END_BUF: MOP_IN(OP_END_BUF); + if (! ON_STR_END(s)) goto fail; + + MOP_OUT; + continue; + break; + + case OP_BEGIN_LINE: MOP_IN(OP_BEGIN_LINE); + if (ON_STR_BEGIN(s)) { + if (IS_NOTBOL(msa->options)) goto fail; + MOP_OUT; + continue; + } + else if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end) && !ON_STR_END(s)) { + MOP_OUT; + continue; + } + goto fail; + break; + + case OP_END_LINE: MOP_IN(OP_END_LINE); + if (ON_STR_END(s)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) { +#endif + if (IS_NOTEOL(msa->options)) goto fail; + MOP_OUT; + continue; +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + } +#endif + } + else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) { + MOP_OUT; + continue; + } +#ifdef USE_CRNL_AS_LINE_TERMINATOR + else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) { + MOP_OUT; + continue; + } +#endif + goto fail; + break; + + case OP_SEMI_END_BUF: MOP_IN(OP_SEMI_END_BUF); + if (ON_STR_END(s)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) { +#endif + if (IS_NOTEOL(msa->options)) goto fail; + MOP_OUT; + continue; +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + } +#endif + } + else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) && + ON_STR_END(s + enclen(encode, s, end))) { + MOP_OUT; + continue; + } +#ifdef USE_CRNL_AS_LINE_TERMINATOR + else if (ONIGENC_IS_MBC_CRNL(encode, s, end)) { + UChar* ss = s + enclen(encode, s); + ss += enclen(encode, ss); + if (ON_STR_END(ss)) { + MOP_OUT; + continue; + } + } +#endif + goto fail; + break; + + case OP_BEGIN_POSITION: MOP_IN(OP_BEGIN_POSITION); + if (s != msa->start) + goto fail; + + MOP_OUT; + continue; + break; + + case OP_MEMORY_START_PUSH: MOP_IN(OP_MEMORY_START_PUSH); + GET_MEMNUM_INC(mem, p); + STACK_PUSH_MEM_START(mem, s); + MOP_OUT; + continue; + break; + + case OP_MEMORY_START: MOP_IN(OP_MEMORY_START); + GET_MEMNUM_INC(mem, p); + mem_start_stk[mem] = (OnigStackIndex )((void* )s); + MOP_OUT; + continue; + break; + + case OP_MEMORY_END_PUSH: MOP_IN(OP_MEMORY_END_PUSH); + GET_MEMNUM_INC(mem, p); + STACK_PUSH_MEM_END(mem, s); + MOP_OUT; + continue; + break; + + case OP_MEMORY_END: MOP_IN(OP_MEMORY_END); + GET_MEMNUM_INC(mem, p); + mem_end_stk[mem] = (OnigStackIndex )((void* )s); + MOP_OUT; + continue; + break; + +#ifdef USE_SUBEXP_CALL + case OP_MEMORY_END_PUSH_REC: MOP_IN(OP_MEMORY_END_PUSH_REC); + GET_MEMNUM_INC(mem, p); + STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */ + STACK_PUSH_MEM_END(mem, s); + mem_start_stk[mem] = GET_STACK_INDEX(stkp); + MOP_OUT; + continue; + break; + + case OP_MEMORY_END_REC: MOP_IN(OP_MEMORY_END_REC); + GET_MEMNUM_INC(mem, p); + mem_end_stk[mem] = (OnigStackIndex )((void* )s); + STACK_GET_MEM_START(mem, stkp); + + if (BIT_STATUS_AT(reg->bt_mem_start, mem)) + mem_start_stk[mem] = GET_STACK_INDEX(stkp); + else + mem_start_stk[mem] = (OnigStackIndex )((void* )stkp->u.mem.pstr); + + STACK_PUSH_MEM_END_MARK(mem); + MOP_OUT; + continue; + break; +#endif + + case OP_BACKREF1: MOP_IN(OP_BACKREF1); + mem = 1; + goto backref; + break; + + case OP_BACKREF2: MOP_IN(OP_BACKREF2); + mem = 2; + goto backref; + break; + + case OP_BACKREFN: MOP_IN(OP_BACKREFN); + GET_MEMNUM_INC(mem, p); + backref: + { + int len; + UChar *pstart, *pend; + + /* if you want to remove following line, + you should check in parse and compile time. */ + if (mem > num_mem) goto fail; + if (mem_end_stk[mem] == INVALID_STACK_INDEX) goto fail; + if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail; + + if (BIT_STATUS_AT(reg->bt_mem_start, mem)) + pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr; + else + pstart = (UChar* )((void* )mem_start_stk[mem]); + + pend = (BIT_STATUS_AT(reg->bt_mem_end, mem) + ? STACK_AT(mem_end_stk[mem])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[mem])); + n = pend - pstart; + DATA_ENSURE(n); + sprev = s; + STRING_CMP(pstart, s, n); + while (sprev + (len = enclen(encode, sprev, end)) < s) + sprev += len; + + MOP_OUT; + continue; + } + break; + + case OP_BACKREFN_IC: MOP_IN(OP_BACKREFN_IC); + GET_MEMNUM_INC(mem, p); + { + int len; + UChar *pstart, *pend; + + /* if you want to remove following line, + you should check in parse and compile time. */ + if (mem > num_mem) goto fail; + if (mem_end_stk[mem] == INVALID_STACK_INDEX) goto fail; + if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail; + + if (BIT_STATUS_AT(reg->bt_mem_start, mem)) + pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr; + else + pstart = (UChar* )((void* )mem_start_stk[mem]); + + pend = (BIT_STATUS_AT(reg->bt_mem_end, mem) + ? STACK_AT(mem_end_stk[mem])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[mem])); + n = pend - pstart; + DATA_ENSURE(n); + sprev = s; + STRING_CMP_IC(case_fold_flag, pstart, &s, n, end); + while (sprev + (len = enclen(encode, sprev, end)) < s) + sprev += len; + + MOP_OUT; + continue; + } + break; + + case OP_BACKREF_MULTI: MOP_IN(OP_BACKREF_MULTI); + { + int len, is_fail; + UChar *pstart, *pend, *swork; + + GET_LENGTH_INC(tlen, p); + for (i = 0; i < tlen; i++) { + GET_MEMNUM_INC(mem, p); + + if (mem_end_stk[mem] == INVALID_STACK_INDEX) continue; + if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue; + + if (BIT_STATUS_AT(reg->bt_mem_start, mem)) + pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr; + else + pstart = (UChar* )((void* )mem_start_stk[mem]); + + pend = (BIT_STATUS_AT(reg->bt_mem_end, mem) + ? STACK_AT(mem_end_stk[mem])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[mem])); + n = pend - pstart; + DATA_ENSURE(n); + sprev = s; + swork = s; + STRING_CMP_VALUE(pstart, swork, n, is_fail); + if (is_fail) continue; + s = swork; + while (sprev + (len = enclen(encode, sprev, end)) < s) + sprev += len; + + p += (SIZE_MEMNUM * (tlen - i - 1)); + break; /* success */ + } + if (i == tlen) goto fail; + MOP_OUT; + continue; + } + break; + + case OP_BACKREF_MULTI_IC: MOP_IN(OP_BACKREF_MULTI_IC); + { + int len, is_fail; + UChar *pstart, *pend, *swork; + + GET_LENGTH_INC(tlen, p); + for (i = 0; i < tlen; i++) { + GET_MEMNUM_INC(mem, p); + + if (mem_end_stk[mem] == INVALID_STACK_INDEX) continue; + if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue; + + if (BIT_STATUS_AT(reg->bt_mem_start, mem)) + pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr; + else + pstart = (UChar* )((void* )mem_start_stk[mem]); + + pend = (BIT_STATUS_AT(reg->bt_mem_end, mem) + ? STACK_AT(mem_end_stk[mem])->u.mem.pstr + : (UChar* )((void* )mem_end_stk[mem])); + n = pend - pstart; + DATA_ENSURE(n); + sprev = s; + swork = s; + STRING_CMP_VALUE_IC(case_fold_flag, pstart, &swork, n, end, is_fail); + if (is_fail) continue; + s = swork; + while (sprev + (len = enclen(encode, sprev, end)) < s) + sprev += len; + + p += (SIZE_MEMNUM * (tlen - i - 1)); + break; /* success */ + } + if (i == tlen) goto fail; + MOP_OUT; + continue; + } + break; + +#ifdef USE_BACKREF_WITH_LEVEL + case OP_BACKREF_WITH_LEVEL: + { + int len; + OnigOptionType ic; + LengthType level; + + GET_OPTION_INC(ic, p); + GET_LENGTH_INC(level, p); + GET_LENGTH_INC(tlen, p); + + sprev = s; + if (backref_match_at_nested_level(reg, stk, stk_base, ic + , case_fold_flag, (int )level, (int )tlen, p, &s, end)) { + while (sprev + (len = enclen(encode, sprev, end)) < s) + sprev += len; + + p += (SIZE_MEMNUM * tlen); + } + else + goto fail; + + MOP_OUT; + continue; + } + + break; +#endif + +#if 0 /* no need: IS_DYNAMIC_OPTION() == 0 */ + case OP_SET_OPTION_PUSH: MOP_IN(OP_SET_OPTION_PUSH); + GET_OPTION_INC(option, p); + STACK_PUSH_ALT(p, s, sprev); + p += SIZE_OP_SET_OPTION + SIZE_OP_FAIL; + MOP_OUT; + continue; + break; + + case OP_SET_OPTION: MOP_IN(OP_SET_OPTION); + GET_OPTION_INC(option, p); + MOP_OUT; + continue; + break; +#endif + + case OP_NULL_CHECK_START: MOP_IN(OP_NULL_CHECK_START); + GET_MEMNUM_INC(mem, p); /* mem: null check id */ + STACK_PUSH_NULL_CHECK_START(mem, s); + MOP_OUT; + continue; + break; + + case OP_NULL_CHECK_END: MOP_IN(OP_NULL_CHECK_END); + { + int isnull; + + GET_MEMNUM_INC(mem, p); /* mem: null check id */ + STACK_NULL_CHECK(isnull, mem, s); + if (isnull) { +#ifdef ONIG_DEBUG_MATCH + fprintf(stderr, "NULL_CHECK_END: skip id:%d, s:%d\n", + (int )mem, (int )s); +#endif + null_check_found: + /* empty loop founded, skip next instruction */ + switch (*p++) { + case OP_JUMP: + case OP_PUSH: + p += SIZE_RELADDR; + break; + case OP_REPEAT_INC: + case OP_REPEAT_INC_NG: + case OP_REPEAT_INC_SG: + case OP_REPEAT_INC_NG_SG: + p += SIZE_MEMNUM; + break; + default: + goto unexpected_bytecode_error; + break; + } + } + } + MOP_OUT; + continue; + break; + +#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT + case OP_NULL_CHECK_END_MEMST: MOP_IN(OP_NULL_CHECK_END_MEMST); + { + int isnull; + + GET_MEMNUM_INC(mem, p); /* mem: null check id */ + STACK_NULL_CHECK_MEMST(isnull, mem, s, reg); + if (isnull) { +#ifdef ONIG_DEBUG_MATCH + fprintf(stderr, "NULL_CHECK_END_MEMST: skip id:%d, s:%d\n", + (int )mem, (int )s); +#endif + if (isnull == -1) goto fail; + goto null_check_found; + } + } + MOP_OUT; + continue; + break; +#endif + +#ifdef USE_SUBEXP_CALL + case OP_NULL_CHECK_END_MEMST_PUSH: + MOP_IN(OP_NULL_CHECK_END_MEMST_PUSH); + { + int isnull; + + GET_MEMNUM_INC(mem, p); /* mem: null check id */ +#ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT + STACK_NULL_CHECK_MEMST_REC(isnull, mem, s, reg); +#else + STACK_NULL_CHECK_REC(isnull, mem, s); +#endif + if (isnull) { +#ifdef ONIG_DEBUG_MATCH + fprintf(stderr, "NULL_CHECK_END_MEMST_PUSH: skip id:%d, s:%d\n", + (int )mem, (int )s); +#endif + if (isnull == -1) goto fail; + goto null_check_found; + } + else { + STACK_PUSH_NULL_CHECK_END(mem); + } + } + MOP_OUT; + continue; + break; +#endif + + case OP_JUMP: MOP_IN(OP_JUMP); + GET_RELADDR_INC(addr, p); + p += addr; + MOP_OUT; + CHECK_INTERRUPT_IN_MATCH_AT; + continue; + break; + + case OP_PUSH: MOP_IN(OP_PUSH); + GET_RELADDR_INC(addr, p); + STACK_PUSH_ALT(p + addr, s, sprev); + MOP_OUT; + continue; + break; + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + case OP_STATE_CHECK_PUSH: MOP_IN(OP_STATE_CHECK_PUSH); + GET_STATE_CHECK_NUM_INC(mem, p); + STATE_CHECK_VAL(scv, mem); + if (scv) goto fail; + + GET_RELADDR_INC(addr, p); + STACK_PUSH_ALT_WITH_STATE_CHECK(p + addr, s, sprev, mem); + MOP_OUT; + continue; + break; + + case OP_STATE_CHECK_PUSH_OR_JUMP: MOP_IN(OP_STATE_CHECK_PUSH_OR_JUMP); + GET_STATE_CHECK_NUM_INC(mem, p); + GET_RELADDR_INC(addr, p); + STATE_CHECK_VAL(scv, mem); + if (scv) { + p += addr; + } + else { + STACK_PUSH_ALT_WITH_STATE_CHECK(p + addr, s, sprev, mem); + } + MOP_OUT; + continue; + break; + + case OP_STATE_CHECK: MOP_IN(OP_STATE_CHECK); + GET_STATE_CHECK_NUM_INC(mem, p); + STATE_CHECK_VAL(scv, mem); + if (scv) goto fail; + + STACK_PUSH_STATE_CHECK(s, mem); + MOP_OUT; + continue; + break; +#endif /* USE_COMBINATION_EXPLOSION_CHECK */ + + case OP_POP: MOP_IN(OP_POP); + STACK_POP_ONE; + MOP_OUT; + continue; + break; + + case OP_PUSH_OR_JUMP_EXACT1: MOP_IN(OP_PUSH_OR_JUMP_EXACT1); + GET_RELADDR_INC(addr, p); + if (*p == *s && DATA_ENSURE_CHECK1) { + p++; + STACK_PUSH_ALT(p + addr, s, sprev); + MOP_OUT; + continue; + } + p += (addr + 1); + MOP_OUT; + continue; + break; + + case OP_PUSH_IF_PEEK_NEXT: MOP_IN(OP_PUSH_IF_PEEK_NEXT); + GET_RELADDR_INC(addr, p); + if (*p == *s) { + p++; + STACK_PUSH_ALT(p + addr, s, sprev); + MOP_OUT; + continue; + } + p++; + MOP_OUT; + continue; + break; + + case OP_REPEAT: MOP_IN(OP_REPEAT); + { + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + GET_RELADDR_INC(addr, p); + + STACK_ENSURE(1); + repeat_stk[mem] = GET_STACK_INDEX(stk); + STACK_PUSH_REPEAT(mem, p); + + if (reg->repeat_range[mem].lower == 0) { + STACK_PUSH_ALT(p + addr, s, sprev); + } + } + MOP_OUT; + continue; + break; + + case OP_REPEAT_NG: MOP_IN(OP_REPEAT_NG); + { + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + GET_RELADDR_INC(addr, p); + + STACK_ENSURE(1); + repeat_stk[mem] = GET_STACK_INDEX(stk); + STACK_PUSH_REPEAT(mem, p); + + if (reg->repeat_range[mem].lower == 0) { + STACK_PUSH_ALT(p, s, sprev); + p += addr; + } + } + MOP_OUT; + continue; + break; + + case OP_REPEAT_INC: MOP_IN(OP_REPEAT_INC); + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + si = repeat_stk[mem]; + stkp = STACK_AT(si); + + repeat_inc: + stkp->u.repeat.count++; + if (stkp->u.repeat.count >= reg->repeat_range[mem].upper) { + /* end of repeat. Nothing to do. */ + } + else if (stkp->u.repeat.count >= reg->repeat_range[mem].lower) { + STACK_PUSH_ALT(p, s, sprev); + p = STACK_AT(si)->u.repeat.pcode; /* Don't use stkp after PUSH. */ + } + else { + p = stkp->u.repeat.pcode; + } + STACK_PUSH_REPEAT_INC(si); + MOP_OUT; + CHECK_INTERRUPT_IN_MATCH_AT; + continue; + break; + + case OP_REPEAT_INC_SG: MOP_IN(OP_REPEAT_INC_SG); + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + STACK_GET_REPEAT(mem, stkp); + si = GET_STACK_INDEX(stkp); + goto repeat_inc; + break; + + case OP_REPEAT_INC_NG: MOP_IN(OP_REPEAT_INC_NG); + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + si = repeat_stk[mem]; + stkp = STACK_AT(si); + + repeat_inc_ng: + stkp->u.repeat.count++; + if (stkp->u.repeat.count < reg->repeat_range[mem].upper) { + if (stkp->u.repeat.count >= reg->repeat_range[mem].lower) { + UChar* pcode = stkp->u.repeat.pcode; + + STACK_PUSH_REPEAT_INC(si); + STACK_PUSH_ALT(pcode, s, sprev); + } + else { + p = stkp->u.repeat.pcode; + STACK_PUSH_REPEAT_INC(si); + } + } + else if (stkp->u.repeat.count == reg->repeat_range[mem].upper) { + STACK_PUSH_REPEAT_INC(si); + } + MOP_OUT; + CHECK_INTERRUPT_IN_MATCH_AT; + continue; + break; + + case OP_REPEAT_INC_NG_SG: MOP_IN(OP_REPEAT_INC_NG_SG); + GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */ + STACK_GET_REPEAT(mem, stkp); + si = GET_STACK_INDEX(stkp); + goto repeat_inc_ng; + break; + + case OP_PUSH_POS: MOP_IN(OP_PUSH_POS); + STACK_PUSH_POS(s, sprev); + MOP_OUT; + continue; + break; + + case OP_POP_POS: MOP_IN(OP_POP_POS); + { + STACK_POS_END(stkp); + s = stkp->u.state.pstr; + sprev = stkp->u.state.pstr_prev; + } + MOP_OUT; + continue; + break; + + case OP_PUSH_POS_NOT: MOP_IN(OP_PUSH_POS_NOT); + GET_RELADDR_INC(addr, p); + STACK_PUSH_POS_NOT(p + addr, s, sprev); + MOP_OUT; + continue; + break; + + case OP_FAIL_POS: MOP_IN(OP_FAIL_POS); + STACK_POP_TIL_POS_NOT; + goto fail; + break; + + case OP_PUSH_STOP_BT: MOP_IN(OP_PUSH_STOP_BT); + STACK_PUSH_STOP_BT; + MOP_OUT; + continue; + break; + + case OP_POP_STOP_BT: MOP_IN(OP_POP_STOP_BT); + STACK_STOP_BT_END; + MOP_OUT; + continue; + break; + + case OP_LOOK_BEHIND: MOP_IN(OP_LOOK_BEHIND); + GET_LENGTH_INC(tlen, p); + s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, end, (int )tlen); + if (IS_NULL(s)) goto fail; + sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s, end); + MOP_OUT; + continue; + break; + + case OP_PUSH_LOOK_BEHIND_NOT: MOP_IN(OP_PUSH_LOOK_BEHIND_NOT); + GET_RELADDR_INC(addr, p); + GET_LENGTH_INC(tlen, p); + q = (UChar* )ONIGENC_STEP_BACK(encode, str, s, end, (int )tlen); + if (IS_NULL(q)) { + /* too short case -> success. ex. /(?p + addr; + MOP_OUT; + continue; + break; + + case OP_RETURN: MOP_IN(OP_RETURN); + STACK_RETURN(p); + STACK_PUSH_RETURN; + MOP_OUT; + continue; + break; +#endif + + case OP_FINISH: + goto finish; + break; + + fail: + MOP_OUT; + /* fall */ + case OP_FAIL: MOP_IN(OP_FAIL); + STACK_POP; + p = stk->u.state.pcode; + s = stk->u.state.pstr; + sprev = stk->u.state.pstr_prev; + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + if (stk->u.state.state_check != 0) { + stk->type = STK_STATE_CHECK_MARK; + stk++; + } +#endif + + MOP_OUT; + continue; + break; + + default: + goto bytecode_error; + + } /* end of switch */ + sprev = sbegin; + } /* end of while(1) */ + + finish: + STACK_SAVE; + return best_len; + +#ifdef ONIG_DEBUG + stack_error: + STACK_SAVE; + return ONIGERR_STACK_BUG; +#endif + + bytecode_error: + STACK_SAVE; + return ONIGERR_UNDEFINED_BYTECODE; + + unexpected_bytecode_error: + STACK_SAVE; + return ONIGERR_UNEXPECTED_BYTECODE; +} + + +static UChar* +slow_search(OnigEncoding enc, UChar* target, UChar* target_end, + const UChar* text, const UChar* text_end, UChar* text_range) +{ + UChar *t, *p, *s, *end; + + end = (UChar* )text_end; + end -= target_end - target - 1; + if (end > text_range) + end = text_range; + + s = (UChar* )text; + + if (enc->max_enc_len == enc->min_enc_len) { + int n = enc->max_enc_len; + + while (s < end) { + if (*s == *target) { + p = s + 1; + t = target + 1; + if (target_end == t || memcmp(t, p, target_end - t) == 0) + return s; + } + s += n; + } + return (UChar*)NULL; + } + while (s < end) { + if (*s == *target) { + p = s + 1; + t = target + 1; + if (target_end == t || memcmp(t, p, target_end - t) == 0) + return s; + } + s += enclen(enc, s, text_end); + } + + return (UChar* )NULL; +} + +static int +str_lower_case_match(OnigEncoding enc, int case_fold_flag, + const UChar* t, const UChar* tend, + const UChar* p, const UChar* end) +{ + int lowlen; + UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + + while (t < tend) { + lowlen = ONIGENC_MBC_CASE_FOLD(enc, case_fold_flag, &p, end, lowbuf); + q = lowbuf; + while (lowlen > 0) { + if (*t++ != *q++) return 0; + lowlen--; + } + } + + return 1; +} + +static UChar* +slow_search_ic(OnigEncoding enc, int case_fold_flag, + UChar* target, UChar* target_end, + const UChar* text, const UChar* text_end, UChar* text_range) +{ + UChar *s, *end; + + end = (UChar* )text_end; + end -= target_end - target - 1; + if (end > text_range) + end = text_range; + + s = (UChar* )text; + + while (s < end) { + if (str_lower_case_match(enc, case_fold_flag, target, target_end, + s, text_end)) + return s; + + s += enclen(enc, s, text_end); + } + + return (UChar* )NULL; +} + +static UChar* +slow_search_backward(OnigEncoding enc, UChar* target, UChar* target_end, + const UChar* text, const UChar* adjust_text, + const UChar* text_end, const UChar* text_start) +{ + UChar *t, *p, *s; + + s = (UChar* )text_end; + s -= (target_end - target); + if (s > text_start) + s = (UChar* )text_start; + else + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s, text_end); + + while (s >= text) { + if (*s == *target) { + p = s + 1; + t = target + 1; + while (t < target_end) { + if (*t != *p++) + break; + t++; + } + if (t == target_end) + return s; + } + s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s, text_end); + } + + return (UChar* )NULL; +} + +static UChar* +slow_search_backward_ic(OnigEncoding enc, int case_fold_flag, + UChar* target, UChar* target_end, + const UChar* text, const UChar* adjust_text, + const UChar* text_end, const UChar* text_start) +{ + UChar *s; + + s = (UChar* )text_end; + s -= (target_end - target); + if (s > text_start) + s = (UChar* )text_start; + else + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s, text_end); + + while (s >= text) { + if (str_lower_case_match(enc, case_fold_flag, + target, target_end, s, text_end)) + return s; + + s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s, text_end); + } + + return (UChar* )NULL; +} + +static UChar* +bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end, + const UChar* text, const UChar* text_end, + const UChar* text_range) +{ + const UChar *s, *se, *t, *p, *end; + const UChar *tail; + int skip, tlen1; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "bm_search_notrev: text: %d, text_end: %d, text_range: %d\n", + (int )text, (int )text_end, (int )text_range); +#endif + + tail = target_end - 1; + tlen1 = tail - target; + end = text_range; + if (end + tlen1 > text_end) + end = text_end - tlen1; + + s = text; + + if (IS_NULL(reg->int_map)) { + while (s < end) { + p = se = s + tlen1; + t = tail; + while (t >= target && *p == *t) { + p--; t--; + } + if (t < target) return (UChar* )s; + + skip = reg->map[*se]; + t = s; + do { + s += enclen(reg->enc, s, end); + } while ((s - t) < skip && s < end); + } + } + else { + while (s < end) { + p = se = s + tlen1; + t = tail; + while (t >= target && *p == *t) { + p--; t--; + } + if (t < target) return (UChar* )s; + + skip = reg->int_map[*se]; + t = s; + do { + s += enclen(reg->enc, s, end); + } while ((s - t) < skip && s < end); + } + } + + return (UChar* )NULL; +} + +static UChar* +bm_search(regex_t* reg, const UChar* target, const UChar* target_end, + const UChar* text, const UChar* text_end, const UChar* text_range) +{ + const UChar *s, *t, *p, *end; + const UChar *tail; + + end = text_range + (target_end - target) - 1; + if (end > text_end) + end = text_end; + + tail = target_end - 1; + s = text + (target_end - target) - 1; + if (IS_NULL(reg->int_map)) { + while (s < end) { + p = s; + t = tail; + while (t >= target && *p == *t) { + p--; t--; + } + if (t < target) return (UChar* )(p + 1); + s += reg->map[*s]; + } + } + else { /* see int_map[] */ + while (s < end) { + p = s; + t = tail; + while (t >= target && *p == *t) { + p--; t--; + } + if (t < target) return (UChar* )(p + 1); + s += reg->int_map[*s]; + } + } + return (UChar* )NULL; +} + +static int +set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, + int** skip) + +{ + int i, len; + + if (IS_NULL(*skip)) { + *skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE); + if (IS_NULL(*skip)) return ONIGERR_MEMORY; + } + + len = end - s; + for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) + (*skip)[i] = len; + + for (i = len - 1; i > 0; i--) + (*skip)[s[i]] = i; + + return 0; +} + +static UChar* +bm_search_backward(regex_t* reg, const UChar* target, const UChar* target_end, + const UChar* text, const UChar* adjust_text, + const UChar* text_end, const UChar* text_start) +{ + const UChar *s, *t, *p; + + s = text_end - (target_end - target); + if (text_start < s) + s = text_start; + else + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s, text_end); + + while (s >= text) { + p = s; + t = target; + while (t < target_end && *p == *t) { + p++; t++; + } + if (t == target_end) + return (UChar* )s; + + s -= reg->int_map_backward[*s]; + s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s, text_end); + } + + return (UChar* )NULL; +} + +static UChar* +map_search(OnigEncoding enc, UChar map[], + const UChar* text, const UChar* text_range, const UChar* text_end) +{ + const UChar *s = text; + + while (s < text_range) { + if (map[*s]) return (UChar* )s; + + s += enclen(enc, s, text_end); + } + return (UChar* )NULL; +} + +static UChar* +map_search_backward(OnigEncoding enc, UChar map[], + const UChar* text, const UChar* adjust_text, + const UChar* text_start, const UChar* text_end) +{ + const UChar *s = text_start; + + while (s >= text) { + if (map[*s]) return (UChar* )s; + + s = onigenc_get_prev_char_head(enc, adjust_text, s, text_end); + } + return (UChar* )NULL; +} + +extern int +onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, + OnigOptionType option) +{ + int r; + UChar *prev; + OnigMatchArg msa; + +#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM) + start: + THREAD_ATOMIC_START; + if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) { + ONIG_STATE_INC(reg); + if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) { + onig_chain_reduce(reg); + ONIG_STATE_INC(reg); + } + } + else { + int n; + + THREAD_ATOMIC_END; + n = 0; + while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) { + if (++n > THREAD_PASS_LIMIT_COUNT) + return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT; + THREAD_PASS; + } + goto start; + } + THREAD_ATOMIC_END; +#endif /* USE_RECOMPILE_API && USE_MULTI_THREAD_SYSTEM */ + + MATCH_ARG_INIT(msa, option, region, at); +#ifdef USE_COMBINATION_EXPLOSION_CHECK + { + int offset = at - str; + STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); + } +#endif + + if (region +#ifdef USE_POSIX_API_REGION_OPTION + && !IS_POSIX_REGION(option) +#endif + ) { + r = onig_region_resize_clear(region, reg->num_mem + 1); + } + else + r = 0; + + if (r == 0) { + prev = (UChar* )onigenc_get_prev_char_head(reg->enc, str, at, end); + r = match_at(reg, str, end, +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE + end, +#endif + at, prev, &msa); + } + + MATCH_ARG_FREE(msa); + ONIG_STATE_DEC_THREAD(reg); + return r; +} + +static int +forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s, + UChar* range, UChar** low, UChar** high, UChar** low_prev) +{ + UChar *p, *pprev = (UChar* )NULL; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "forward_search_range: str: %d, end: %d, s: %d, range: %d\n", + (int )str, (int )end, (int )s, (int )range); +#endif + + p = s; + if (reg->dmin > 0) { + if (ONIGENC_IS_SINGLEBYTE(reg->enc)) { + p += reg->dmin; + } + else { + UChar *q = p + reg->dmin; + while (p < q) p += enclen(reg->enc, p, end); + } + } + + retry: + switch (reg->optimize) { + case ONIG_OPTIMIZE_EXACT: + p = slow_search(reg->enc, reg->exact, reg->exact_end, p, end, range); + break; + case ONIG_OPTIMIZE_EXACT_IC: + p = slow_search_ic(reg->enc, reg->case_fold_flag, + reg->exact, reg->exact_end, p, end, range); + break; + + case ONIG_OPTIMIZE_EXACT_BM: + p = bm_search(reg, reg->exact, reg->exact_end, p, end, range); + break; + + case ONIG_OPTIMIZE_EXACT_BM_NOT_REV: + p = bm_search_notrev(reg, reg->exact, reg->exact_end, p, end, range); + break; + + case ONIG_OPTIMIZE_MAP: + p = map_search(reg->enc, reg->map, p, range, end); + break; + } + + if (p && p < range) { + if (p - reg->dmin < s) { + retry_gate: + pprev = p; + p += enclen(reg->enc, p, end); + goto retry; + } + + if (reg->sub_anchor) { + UChar* prev; + + switch (reg->sub_anchor) { + case ANCHOR_BEGIN_LINE: + if (!ON_STR_BEGIN(p)) { + prev = onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : str), p, end); + if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) + goto retry_gate; + } + break; + + case ANCHOR_END_LINE: + if (ON_STR_END(p)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + prev = (UChar* )onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : str), p); + if (prev && ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) + goto retry_gate; +#endif + } + else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end) +#ifdef USE_CRNL_AS_LINE_TERMINATOR + && ! ONIGENC_IS_MBC_CRNL(reg->enc, p, end) +#endif + ) + goto retry_gate; + break; + } + } + + if (reg->dmax == 0) { + *low = p; + if (low_prev) { + if (*low > s) + *low_prev = onigenc_get_prev_char_head(reg->enc, s, p, end); + else + *low_prev = onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : str), p, end); + } + } + else { + if (reg->dmax != ONIG_INFINITE_DISTANCE) { + *low = p - reg->dmax; + if (*low > s) { + *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s, + *low, end, (const UChar** )low_prev); + if (low_prev && IS_NULL(*low_prev)) + *low_prev = onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : s), *low, end); + } + else { + if (low_prev) + *low_prev = onigenc_get_prev_char_head(reg->enc, + (pprev ? pprev : str), *low, end); + } + } + } + /* no needs to adjust *high, *high is used as range check only */ + *high = p - reg->dmin; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, + "forward_search_range success: low: %d, high: %d, dmin: %d, dmax: %d\n", + (int )(*low - str), (int )(*high - str), reg->dmin, reg->dmax); +#endif + return 1; /* success */ + } + + return 0; /* fail */ +} + +static int set_bm_backward_skip P_((UChar* s, UChar* end, OnigEncoding enc, + int** skip)); + +#define BM_BACKWARD_SEARCH_LENGTH_THRESHOLD 100 + +static int +backward_search_range(regex_t* reg, const UChar* str, const UChar* end, + UChar* s, const UChar* range, UChar* adjrange, + UChar** low, UChar** high) +{ + int r; + UChar *p; + + range += reg->dmin; + p = s; + + retry: + switch (reg->optimize) { + case ONIG_OPTIMIZE_EXACT: + exact_method: + p = slow_search_backward(reg->enc, reg->exact, reg->exact_end, + range, adjrange, end, p); + break; + + case ONIG_OPTIMIZE_EXACT_IC: + p = slow_search_backward_ic(reg->enc, reg->case_fold_flag, + reg->exact, reg->exact_end, + range, adjrange, end, p); + break; + + case ONIG_OPTIMIZE_EXACT_BM: + case ONIG_OPTIMIZE_EXACT_BM_NOT_REV: + if (IS_NULL(reg->int_map_backward)) { + if (s - range < BM_BACKWARD_SEARCH_LENGTH_THRESHOLD) + goto exact_method; + + r = set_bm_backward_skip(reg->exact, reg->exact_end, reg->enc, + &(reg->int_map_backward)); + if (r) return r; + } + p = bm_search_backward(reg, reg->exact, reg->exact_end, range, adjrange, + end, p); + break; + + case ONIG_OPTIMIZE_MAP: + p = map_search_backward(reg->enc, reg->map, range, adjrange, p, end); + break; + } + + if (p) { + if (reg->sub_anchor) { + UChar* prev; + + switch (reg->sub_anchor) { + case ANCHOR_BEGIN_LINE: + if (!ON_STR_BEGIN(p)) { + prev = onigenc_get_prev_char_head(reg->enc, str, p, end); + if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) { + p = prev; + goto retry; + } + } + break; + + case ANCHOR_END_LINE: + if (ON_STR_END(p)) { +#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE + prev = onigenc_get_prev_char_head(reg->enc, adjrange, p); + if (IS_NULL(prev)) goto fail; + if (ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) { + p = prev; + goto retry; + } +#endif + } + else if (! ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end) +#ifdef USE_CRNL_AS_LINE_TERMINATOR + && ! ONIGENC_IS_MBC_CRNL(reg->enc, p, end) +#endif + ) { + p = onigenc_get_prev_char_head(reg->enc, adjrange, p, end); + if (IS_NULL(p)) goto fail; + goto retry; + } + break; + } + } + + /* no needs to adjust *high, *high is used as range check only */ + if (reg->dmax != ONIG_INFINITE_DISTANCE) { + *low = p - reg->dmax; + *high = p - reg->dmin; + *high = onigenc_get_right_adjust_char_head(reg->enc, adjrange, *high, end); + } + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "backward_search_range: low: %d, high: %d\n", + (int )(*low - str), (int )(*high - str)); +#endif + return 1; /* success */ + } + + fail: +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "backward_search_range: fail.\n"); +#endif + return 0; /* fail */ +} + + +extern int +onig_search(regex_t* reg, const UChar* str, const UChar* end, + const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option) +{ + int r; + UChar *s, *prev; + OnigMatchArg msa; + const UChar *orig_start = start; +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE + const UChar *orig_range = range; +#endif + +#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM) + start: + THREAD_ATOMIC_START; + if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) { + ONIG_STATE_INC(reg); + if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) { + onig_chain_reduce(reg); + ONIG_STATE_INC(reg); + } + } + else { + int n; + + THREAD_ATOMIC_END; + n = 0; + while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) { + if (++n > THREAD_PASS_LIMIT_COUNT) + return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT; + THREAD_PASS; + } + goto start; + } + THREAD_ATOMIC_END; +#endif /* USE_RECOMPILE_API && USE_MULTI_THREAD_SYSTEM */ + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, + "onig_search (entry point): str: %d, end: %d, start: %d, range: %d\n", + (int )str, (int )(end - str), (int )(start - str), (int )(range - str)); +#endif + + if (region +#ifdef USE_POSIX_API_REGION_OPTION + && !IS_POSIX_REGION(option) +#endif + ) { + r = onig_region_resize_clear(region, reg->num_mem + 1); + if (r) goto finish_no_msa; + } + + if (start > end || start < str) goto mismatch_no_msa; + + +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +#define MATCH_AND_RETURN_CHECK(upper_range) \ + r = match_at(reg, str, end, (upper_range), s, prev, &msa); \ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + if (! IS_FIND_LONGEST(reg->options)) {\ + goto match;\ + }\ + }\ + else goto finish; /* error */ \ + } +#else +#define MATCH_AND_RETURN_CHECK(upper_range) \ + r = match_at(reg, str, end, (upper_range), s, prev, &msa); \ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + goto match;\ + }\ + else goto finish; /* error */ \ + } +#endif /* USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE */ +#else +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +#define MATCH_AND_RETURN_CHECK(none) \ + r = match_at(reg, str, end, s, prev, &msa);\ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + if (! IS_FIND_LONGEST(reg->options)) {\ + goto match;\ + }\ + }\ + else goto finish; /* error */ \ + } +#else +#define MATCH_AND_RETURN_CHECK(none) \ + r = match_at(reg, str, end, s, prev, &msa);\ + if (r != ONIG_MISMATCH) {\ + if (r >= 0) {\ + goto match;\ + }\ + else goto finish; /* error */ \ + } +#endif /* USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE */ +#endif /* USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */ + + + /* anchor optimize: resume search range */ + if (reg->anchor != 0 && str < end) { + UChar *min_semi_end, *max_semi_end; + + if (reg->anchor & ANCHOR_BEGIN_POSITION) { + /* search start-position only */ + begin_position: + if (range > start) + range = start + 1; + else + range = start; + } + else if (reg->anchor & ANCHOR_BEGIN_BUF) { + /* search str-position only */ + if (range > start) { + if (start != str) goto mismatch_no_msa; + range = str + 1; + } + else { + if (range <= str) { + start = str; + range = str; + } + else + goto mismatch_no_msa; + } + } + else if (reg->anchor & ANCHOR_END_BUF) { + min_semi_end = max_semi_end = (UChar* )end; + + end_buf: + if ((OnigDistance )(max_semi_end - str) < reg->anchor_dmin) + goto mismatch_no_msa; + + if (range > start) { + if ((OnigDistance )(min_semi_end - start) > reg->anchor_dmax) { + start = min_semi_end - reg->anchor_dmax; + if (start < end) + start = onigenc_get_right_adjust_char_head(reg->enc, str, start, end); + else { /* match with empty at end */ + start = onigenc_get_prev_char_head(reg->enc, str, end, end); + } + } + if ((OnigDistance )(max_semi_end - (range - 1)) < reg->anchor_dmin) { + range = max_semi_end - reg->anchor_dmin + 1; + } + + if (start >= range) goto mismatch_no_msa; + } + else { + if ((OnigDistance )(min_semi_end - range) > reg->anchor_dmax) { + range = min_semi_end - reg->anchor_dmax; + } + if ((OnigDistance )(max_semi_end - start) < reg->anchor_dmin) { + start = max_semi_end - reg->anchor_dmin; + start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, start, end); + } + if (range > start) goto mismatch_no_msa; + } + } + else if (reg->anchor & ANCHOR_SEMI_END_BUF) { + UChar* pre_end = ONIGENC_STEP_BACK(reg->enc, str, end, end, 1); + + max_semi_end = (UChar* )end; + if (ONIGENC_IS_MBC_NEWLINE(reg->enc, pre_end, end)) { + min_semi_end = pre_end; + +#ifdef USE_CRNL_AS_LINE_TERMINATOR + pre_end = ONIGENC_STEP_BACK(reg->enc, str, pre_end, end, 1); + if (IS_NOT_NULL(pre_end) && + ONIGENC_IS_MBC_CRNL(reg->enc, pre_end, end)) { + min_semi_end = pre_end; + } +#endif + if (min_semi_end > str && start <= min_semi_end) { + goto end_buf; + } + } + else { + min_semi_end = (UChar* )end; + goto end_buf; + } + } + else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_ML)) { + goto begin_position; + } + } + else if (str == end) { /* empty string */ + static const UChar address_for_empty_string[] = ""; + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "onig_search: empty string.\n"); +#endif + + if (reg->threshold_len == 0) { + start = end = str = address_for_empty_string; + s = (UChar* )start; + prev = (UChar* )NULL; + + MATCH_ARG_INIT(msa, option, region, start); +#ifdef USE_COMBINATION_EXPLOSION_CHECK + msa.state_check_buff = (void* )0; + msa.state_check_buff_size = 0; /* NO NEED, for valgrind */ +#endif + MATCH_AND_RETURN_CHECK(end); + goto mismatch; + } + goto mismatch_no_msa; + } + +#ifdef ONIG_DEBUG_SEARCH + fprintf(stderr, "onig_search(apply anchor): end: %d, start: %d, range: %d\n", + (int )(end - str), (int )(start - str), (int )(range - str)); +#endif + + MATCH_ARG_INIT(msa, option, region, orig_start); +#ifdef USE_COMBINATION_EXPLOSION_CHECK + { + int offset = (MIN(start, range) - str); + STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); + } +#endif + + s = (UChar* )start; + if (range > start) { /* forward search */ + if (s > str) + prev = onigenc_get_prev_char_head(reg->enc, str, s, end); + else + prev = (UChar* )NULL; + + if (reg->optimize != ONIG_OPTIMIZE_NONE) { + UChar *sch_range, *low, *high, *low_prev; + + sch_range = (UChar* )range; + if (reg->dmax != 0) { + if (reg->dmax == ONIG_INFINITE_DISTANCE) + sch_range = (UChar* )end; + else { + sch_range += reg->dmax; + if (sch_range > end) sch_range = (UChar* )end; + } + } + + if ((end - start) < reg->threshold_len) + goto mismatch; + + if (reg->dmax != ONIG_INFINITE_DISTANCE) { + do { + if (! forward_search_range(reg, str, end, s, sch_range, + &low, &high, &low_prev)) goto mismatch; + if (s < low) { + s = low; + prev = low_prev; + } + while (s <= high) { + MATCH_AND_RETURN_CHECK(orig_range); + prev = s; + s += enclen(reg->enc, s, end); + } + } while (s < range); + goto mismatch; + } + else { /* check only. */ + if (! forward_search_range(reg, str, end, s, sch_range, + &low, &high, (UChar** )NULL)) goto mismatch; + + if ((reg->anchor & ANCHOR_ANYCHAR_STAR) != 0) { + do { + MATCH_AND_RETURN_CHECK(orig_range); + prev = s; + s += enclen(reg->enc, s, end); + + while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) && s < range) { + prev = s; + s += enclen(reg->enc, s, end); + } + } while (s < range); + goto mismatch; + } + } + } + + do { + MATCH_AND_RETURN_CHECK(orig_range); + prev = s; + s += enclen(reg->enc, s, end); + } while (s < range); + + if (s == range) { /* because empty match with /$/. */ + MATCH_AND_RETURN_CHECK(orig_range); + } + } + else { /* backward search */ +#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE + if (orig_start < end) + orig_start += enclen(reg->enc, orig_start, end); /* is upper range */ +#endif + + if (reg->optimize != ONIG_OPTIMIZE_NONE) { + UChar *low, *high, *adjrange, *sch_start; + + if (range < end) + adjrange = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, range, end); + else + adjrange = (UChar* )end; + + if (reg->dmax != ONIG_INFINITE_DISTANCE && + (end - range) >= reg->threshold_len) { + do { + sch_start = s + reg->dmax; + if (sch_start > end) sch_start = (UChar* )end; + if (backward_search_range(reg, str, end, sch_start, range, adjrange, + &low, &high) <= 0) + goto mismatch; + + if (s > high) + s = high; + + while (s >= low) { + prev = onigenc_get_prev_char_head(reg->enc, str, s, end); + MATCH_AND_RETURN_CHECK(orig_start); + s = prev; + } + } while (s >= range); + goto mismatch; + } + else { /* check only. */ + if ((end - range) < reg->threshold_len) goto mismatch; + + sch_start = s; + if (reg->dmax != 0) { + if (reg->dmax == ONIG_INFINITE_DISTANCE) + sch_start = (UChar* )end; + else { + sch_start += reg->dmax; + if (sch_start > end) sch_start = (UChar* )end; + else + sch_start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, + start, sch_start, end); + } + } + if (backward_search_range(reg, str, end, sch_start, range, adjrange, + &low, &high) <= 0) goto mismatch; + } + } + + do { + prev = onigenc_get_prev_char_head(reg->enc, str, s, end); + MATCH_AND_RETURN_CHECK(orig_start); + s = prev; + } while (s >= range); + } + + mismatch: +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + if (IS_FIND_LONGEST(reg->options)) { + if (msa.best_len >= 0) { + s = msa.best_s; + goto match; + } + } +#endif + r = ONIG_MISMATCH; + + finish: + MATCH_ARG_FREE(msa); + ONIG_STATE_DEC_THREAD(reg); + + /* If result is mismatch and no FIND_NOT_EMPTY option, + then the region is not setted in match_at(). */ + if (IS_FIND_NOT_EMPTY(reg->options) && region +#ifdef USE_POSIX_API_REGION_OPTION + && !IS_POSIX_REGION(option) +#endif + ) { + onig_region_clear(region); + } + +#ifdef ONIG_DEBUG + if (r != ONIG_MISMATCH) + fprintf(stderr, "onig_search: error %d\n", r); +#endif + return r; + + mismatch_no_msa: + r = ONIG_MISMATCH; + finish_no_msa: + ONIG_STATE_DEC_THREAD(reg); +#ifdef ONIG_DEBUG + if (r != ONIG_MISMATCH) + fprintf(stderr, "onig_search: error %d\n", r); +#endif + return r; + + match: + ONIG_STATE_DEC_THREAD(reg); + MATCH_ARG_FREE(msa); + return s - str; +} + +extern OnigEncoding +onig_get_encoding(regex_t* reg) +{ + return reg->enc; +} + +extern OnigOptionType +onig_get_options(regex_t* reg) +{ + return reg->options; +} + +extern OnigCaseFoldType +onig_get_case_fold_flag(regex_t* reg) +{ + return reg->case_fold_flag; +} + +extern const OnigSyntaxType* +onig_get_syntax(regex_t* reg) +{ + return reg->syntax; +} + +extern int +onig_number_of_captures(regex_t* reg) +{ + return reg->num_mem; +} + +extern int +onig_number_of_capture_histories(regex_t* reg) +{ +#ifdef USE_CAPTURE_HISTORY + int i, n; + + n = 0; + for (i = 0; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) { + if (BIT_STATUS_AT(reg->capture_history, i) != 0) + n++; + } + return n; +#else + return 0; +#endif +} + +extern void +onig_copy_encoding(OnigEncoding to, OnigEncoding from) +{ + *to = *from; +} + diff --git a/lib/ruby-1.9.1-rc1/regint.h b/lib/ruby-1.9.1-rc1/regint.h new file mode 100644 index 0000000..fc37f65 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regint.h @@ -0,0 +1,842 @@ +#ifndef ONIGURUMA_REGINT_H +#define ONIGURUMA_REGINT_H +/********************************************************************** + regint.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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. + */ + +/* for debug */ +/* #define ONIG_DEBUG_PARSE_TREE */ +/* #define ONIG_DEBUG_COMPILE */ +/* #define ONIG_DEBUG_SEARCH */ +/* #define ONIG_DEBUG_MATCH */ +/* #define ONIG_DONT_OPTIMIZE */ + +/* for byte-code statistical data. */ +/* #define ONIG_DEBUG_STATISTICS */ + +#if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \ + defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) || \ + defined(ONIG_DEBUG_STATISTICS) +#ifndef ONIG_DEBUG +#define ONIG_DEBUG +#endif +#endif + +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ + (defined(__ppc__) && defined(__APPLE__)) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD86) || \ + defined(__mc68020__) +#define PLATFORM_UNALIGNED_WORD_ACCESS +#endif + +/* config */ +/* spec. config */ +#define USE_NAMED_GROUP +#define USE_SUBEXP_CALL +#define USE_BACKREF_WITH_LEVEL /* \k, \k */ +#define USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT /* /(?:()|())*\2/ */ +#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */ +#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR +/* #define USE_RECOMPILE_API */ +/* !!! moved to regenc.h. */ /* #define USE_CRNL_AS_LINE_TERMINATOR */ + +/* internal config */ +#define USE_PARSE_TREE_NODE_RECYCLE +#define USE_OP_PUSH_OR_JUMP_EXACT +#define USE_QTFR_PEEK_NEXT +#define USE_ST_LIBRARY +#define USE_SHARED_CCLASS_TABLE + +#define INIT_MATCH_STACK_SIZE 160 +#define DEFAULT_MATCH_STACK_LIMIT_SIZE 0 /* unlimited */ + +#if defined(__GNUC__) +# define ARG_UNUSED __attribute__ ((unused)) +#else +# define ARG_UNUSED +#endif + +/* */ +/* escape other system UChar definition */ +#ifndef RUBY_DEFINES_H +#include "ruby/ruby.h" +#undef xmalloc +#undef xrealloc +#undef xcalloc +#undef xfree +#endif +#ifdef ONIG_ESCAPE_UCHAR_COLLISION +#undef ONIG_ESCAPE_UCHAR_COLLISION +#endif +#undef USE_MATCH_RANGE_IS_COMPLETE_RANGE +#undef USE_CAPTURE_HISTORY +#define USE_VARIABLE_META_CHARS +#define USE_WORD_BEGIN_END /* "\<": word-begin, "\>": word-end */ +#define USE_POSIX_REGION_OPTION /* needed for POSIX API support */ +#define USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE +/* #define USE_COMBINATION_EXPLOSION_CHECK */ /* (X*)* */ +/* #define USE_MULTI_THREAD_SYSTEM */ +#define THREAD_SYSTEM_INIT /* depend on thread system */ +#define THREAD_SYSTEM_END /* depend on thread system */ +#define THREAD_ATOMIC_START /* depend on thread system */ +#define THREAD_ATOMIC_END /* depend on thread system */ +#define THREAD_PASS /* depend on thread system */ +#ifndef xmalloc +#define xmalloc malloc +#define xrealloc realloc +#define xcalloc calloc +#define xfree free +#endif + +#ifdef RUBY + +#define CHECK_INTERRUPT_IN_MATCH_AT rb_thread_check_ints() +#define onig_st_init_table st_init_table +#define onig_st_init_table_with_size st_init_table_with_size +#define onig_st_init_numtable st_init_numtable +#define onig_st_init_numtable_with_size st_init_numtable_with_size +#define onig_st_init_strtable st_init_strtable +#define onig_st_init_strtable_with_size st_init_strtable_with_size +#define onig_st_delete st_delete +#define onig_st_delete_safe st_delete_safe +#define onig_st_insert st_insert +#define onig_st_lookup st_lookup +#define onig_st_foreach st_foreach +#define onig_st_add_direct st_add_direct +#define onig_st_free_table st_free_table +#define onig_st_cleanup_safe st_cleanup_safe +#define onig_st_copy st_copy +#define onig_st_nothing_key_clone st_nothing_key_clone +#define onig_st_nothing_key_free st_nothing_key_free +#define onig_st_is_member st_is_member + +#define USE_UPPER_CASE_TABLE +#else + +#define st_init_table onig_st_init_table +#define st_init_table_with_size onig_st_init_table_with_size +#define st_init_numtable onig_st_init_numtable +#define st_init_numtable_with_size onig_st_init_numtable_with_size +#define st_init_strtable onig_st_init_strtable +#define st_init_strtable_with_size onig_st_init_strtable_with_size +#define st_delete onig_st_delete +#define st_delete_safe onig_st_delete_safe +#define st_insert onig_st_insert +#define st_lookup onig_st_lookup +#define st_foreach onig_st_foreach +#define st_add_direct onig_st_add_direct +#define st_free_table onig_st_free_table +#define st_cleanup_safe onig_st_cleanup_safe +#define st_copy onig_st_copy +#define st_nothing_key_clone onig_st_nothing_key_clone +#define st_nothing_key_free onig_st_nothing_key_free +/* */ +#define onig_st_is_member st_is_member + +#define CHECK_INTERRUPT_IN_MATCH_AT + +#endif + +#define STATE_CHECK_STRING_THRESHOLD_LEN 7 +#define STATE_CHECK_BUFF_MAX_SIZE 0x4000 + +#define THREAD_PASS_LIMIT_COUNT 8 +#define xmemset memset +#define xmemcpy memcpy +#define xmemmove memmove + +#if defined(_WIN32) && !defined(__GNUC__) +#define xalloca _alloca +#define xvsnprintf _vsnprintf +#else +#define xalloca alloca +#define xvsnprintf vsnprintf +#endif + + +#if defined(USE_RECOMPILE_API) && defined(USE_MULTI_THREAD_SYSTEM) +#define ONIG_STATE_INC(reg) (reg)->state++ +#define ONIG_STATE_DEC(reg) (reg)->state-- + +#define ONIG_STATE_INC_THREAD(reg) do {\ + THREAD_ATOMIC_START;\ + (reg)->state++;\ + THREAD_ATOMIC_END;\ +} while(0) +#define ONIG_STATE_DEC_THREAD(reg) do {\ + THREAD_ATOMIC_START;\ + (reg)->state--;\ + THREAD_ATOMIC_END;\ +} while(0) +#else +#define ONIG_STATE_INC(reg) /* Nothing */ +#define ONIG_STATE_DEC(reg) /* Nothing */ +#define ONIG_STATE_INC_THREAD(reg) /* Nothing */ +#define ONIG_STATE_DEC_THREAD(reg) /* Nothing */ +#endif /* USE_RECOMPILE_API && USE_MULTI_THREAD_SYSTEM */ + +#ifdef HAVE_STDLIB_H +#include +#endif + +#if defined(HAVE_ALLOCA_H) && (defined(_AIX) || !defined(__GNUC__)) +#include +#endif + +#ifdef HAVE_STRING_H +# include +#else +# include +#endif + +#include +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef ONIG_DEBUG +# include +#endif + +#include "regenc.h" + +#ifdef MIN +#undef MIN +#endif +#ifdef MAX +#undef MAX +#endif +#define MIN(a,b) (((a)>(b))?(b):(a)) +#define MAX(a,b) (((a)<(b))?(b):(a)) + +#define IS_NULL(p) (((void*)(p)) == (void*)0) +#define IS_NOT_NULL(p) (((void*)(p)) != (void*)0) +#define CHECK_NULL_RETURN(p) if (IS_NULL(p)) return NULL +#define CHECK_NULL_RETURN_MEMERR(p) if (IS_NULL(p)) return ONIGERR_MEMORY +#define NULL_UCHARP ((UChar* )0) + +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS + +#define PLATFORM_GET_INC(val,p,type) do{\ + val = *(type* )p;\ + (p) += sizeof(type);\ +} while(0) + +#else + +#define PLATFORM_GET_INC(val,p,type) do{\ + xmemcpy(&val, (p), sizeof(type));\ + (p) += sizeof(type);\ +} while(0) + +/* sizeof(OnigCodePoint) */ +#define WORD_ALIGNMENT_SIZE SIZEOF_LONG + +#define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ + (pad_size) = WORD_ALIGNMENT_SIZE \ + - ((uintptr_t )(addr) % WORD_ALIGNMENT_SIZE);\ + if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\ +} while (0) + +#define ALIGNMENT_RIGHT(addr) do {\ + (addr) += (WORD_ALIGNMENT_SIZE - 1);\ + (addr) -= ((uintptr_t )(addr) % WORD_ALIGNMENT_SIZE);\ +} while (0) + +#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */ + +/* stack pop level */ +#define STACK_POP_LEVEL_FREE 0 +#define STACK_POP_LEVEL_MEM_START 1 +#define STACK_POP_LEVEL_ALL 2 + +/* optimize flags */ +#define ONIG_OPTIMIZE_NONE 0 +#define ONIG_OPTIMIZE_EXACT 1 /* Slow Search */ +#define ONIG_OPTIMIZE_EXACT_BM 2 /* Boyer Moore Search */ +#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV 3 /* BM (but not simple match) */ +#define ONIG_OPTIMIZE_EXACT_IC 4 /* Slow Search (ignore case) */ +#define ONIG_OPTIMIZE_MAP 5 /* char map */ + +/* bit status */ +typedef unsigned int BitStatusType; + +#define BIT_STATUS_BITS_NUM (sizeof(BitStatusType) * 8) +#define BIT_STATUS_CLEAR(stats) (stats) = 0 +#define BIT_STATUS_ON_ALL(stats) (stats) = ~((BitStatusType )0) +#define BIT_STATUS_AT(stats,n) \ + ((n) < (int )BIT_STATUS_BITS_NUM ? ((stats) & (1 << n)) : ((stats) & 1)) + +#define BIT_STATUS_ON_AT(stats,n) do {\ + if ((n) < (int )BIT_STATUS_BITS_NUM) \ + (stats) |= (1 << (n));\ + else\ + (stats) |= 1;\ +} while (0) + +#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\ + if ((n) < (int )BIT_STATUS_BITS_NUM)\ + (stats) |= (1 << (n));\ +} while (0) + + +#define INT_MAX_LIMIT ((1UL << (SIZEOF_INT * 8 - 1)) - 1) + +#define DIGITVAL(code) ((code) - '0') +#define ODIGITVAL(code) DIGITVAL(code) +#define XDIGITVAL(enc,code) \ + (ONIGENC_IS_CODE_DIGIT(enc,code) ? DIGITVAL(code) \ + : (ONIGENC_IS_CODE_UPPER(enc,code) ? (code) - 'A' + 10 : (code) - 'a' + 10)) + +#define IS_SINGLELINE(option) ((option) & ONIG_OPTION_SINGLELINE) +#define IS_MULTILINE(option) ((option) & ONIG_OPTION_MULTILINE) +#define IS_IGNORECASE(option) ((option) & ONIG_OPTION_IGNORECASE) +#define IS_EXTEND(option) ((option) & ONIG_OPTION_EXTEND) +#define IS_FIND_LONGEST(option) ((option) & ONIG_OPTION_FIND_LONGEST) +#define IS_FIND_NOT_EMPTY(option) ((option) & ONIG_OPTION_FIND_NOT_EMPTY) +#define IS_FIND_CONDITION(option) ((option) & \ + (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY)) +#define IS_NOTBOL(option) ((option) & ONIG_OPTION_NOTBOL) +#define IS_NOTEOL(option) ((option) & ONIG_OPTION_NOTEOL) +#define IS_POSIX_REGION(option) ((option) & ONIG_OPTION_POSIX_REGION) + +/* OP_SET_OPTION is required for these options. +#define IS_DYNAMIC_OPTION(option) \ + (((option) & (ONIG_OPTION_MULTILINE | ONIG_OPTION_IGNORECASE)) != 0) +*/ +/* ignore-case and multibyte status are included in compiled code. */ +#define IS_DYNAMIC_OPTION(option) 0 + +#define DISABLE_CASE_FOLD_MULTI_CHAR(case_fold_flag) \ + ((case_fold_flag) & ~INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) + +#define REPEAT_INFINITE -1 +#define IS_REPEAT_INFINITE(n) ((n) == REPEAT_INFINITE) + +/* bitset */ +#define BITS_PER_BYTE 8 +#define SINGLE_BYTE_SIZE (1 << BITS_PER_BYTE) +#define BITS_IN_ROOM (sizeof(Bits) * BITS_PER_BYTE) +#define BITSET_SIZE (SINGLE_BYTE_SIZE / BITS_IN_ROOM) + +#ifdef PLATFORM_UNALIGNED_WORD_ACCESS +typedef unsigned int Bits; +#else +typedef unsigned char Bits; +#endif +typedef Bits BitSet[BITSET_SIZE]; +typedef Bits* BitSetRef; + +#define SIZE_BITSET sizeof(BitSet) + +#define BITSET_CLEAR(bs) do {\ + int i;\ + for (i = 0; i < (int )BITSET_SIZE; i++) { (bs)[i] = 0; } \ +} while (0) + +#define BS_ROOM(bs,pos) (bs)[pos / BITS_IN_ROOM] +#define BS_BIT(pos) (1 << (pos % BITS_IN_ROOM)) + +#define BITSET_AT(bs, pos) (BS_ROOM(bs,pos) & BS_BIT(pos)) +#define BITSET_SET_BIT(bs, pos) BS_ROOM(bs,pos) |= BS_BIT(pos) +#define BITSET_CLEAR_BIT(bs, pos) BS_ROOM(bs,pos) &= ~(BS_BIT(pos)) +#define BITSET_INVERT_BIT(bs, pos) BS_ROOM(bs,pos) ^= BS_BIT(pos) + +/* bytes buffer */ +typedef struct _BBuf { + UChar* p; + unsigned int used; + unsigned int alloc; +} BBuf; + +#define BBUF_INIT(buf,size) onig_bbuf_init((BBuf* )(buf), (size)) + +#define BBUF_SIZE_INC(buf,inc) do{\ + (buf)->alloc += (inc);\ + (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ + if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\ +} while (0) + +#define BBUF_EXPAND(buf,low) do{\ + do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\ + (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\ + if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\ +} while (0) + +#define BBUF_ENSURE_SIZE(buf,size) do{\ + unsigned int new_alloc = (buf)->alloc;\ + while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\ + if ((buf)->alloc != new_alloc) {\ + (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\ + if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\ + (buf)->alloc = new_alloc;\ + }\ +} while (0) + +#define BBUF_WRITE(buf,pos,bytes,n) do{\ + int used = (pos) + (n);\ + if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\ + xmemcpy((buf)->p + (pos), (bytes), (n));\ + if ((buf)->used < (unsigned int )used) (buf)->used = used;\ +} while (0) + +#define BBUF_WRITE1(buf,pos,byte) do{\ + int used = (pos) + 1;\ + if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\ + (buf)->p[(pos)] = (byte);\ + if ((buf)->used < (unsigned int )used) (buf)->used = used;\ +} while (0) + +#define BBUF_ADD(buf,bytes,n) BBUF_WRITE((buf),(buf)->used,(bytes),(n)) +#define BBUF_ADD1(buf,byte) BBUF_WRITE1((buf),(buf)->used,(byte)) +#define BBUF_GET_ADD_ADDRESS(buf) ((buf)->p + (buf)->used) +#define BBUF_GET_OFFSET_POS(buf) ((buf)->used) + +/* from < to */ +#define BBUF_MOVE_RIGHT(buf,from,to,n) do {\ + if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\ + xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ + if ((unsigned int )((to)+(n)) > (buf)->used) (buf)->used = (to) + (n);\ +} while (0) + +/* from > to */ +#define BBUF_MOVE_LEFT(buf,from,to,n) do {\ + xmemmove((buf)->p + (to), (buf)->p + (from), (n));\ +} while (0) + +/* from > to */ +#define BBUF_MOVE_LEFT_REDUCE(buf,from,to) do {\ + xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\ + (buf)->used -= (from - to);\ +} while (0) + +#define BBUF_INSERT(buf,pos,bytes,n) do {\ + if (pos >= (buf)->used) {\ + BBUF_WRITE(buf,pos,bytes,n);\ + }\ + else {\ + BBUF_MOVE_RIGHT((buf),(pos),(pos) + (n),((buf)->used - (pos)));\ + xmemcpy((buf)->p + (pos), (bytes), (n));\ + }\ +} while (0) + +#define BBUF_GET_BYTE(buf, pos) (buf)->p[(pos)] + + +#define ANCHOR_BEGIN_BUF (1<<0) +#define ANCHOR_BEGIN_LINE (1<<1) +#define ANCHOR_BEGIN_POSITION (1<<2) +#define ANCHOR_END_BUF (1<<3) +#define ANCHOR_SEMI_END_BUF (1<<4) +#define ANCHOR_END_LINE (1<<5) + +#define ANCHOR_WORD_BOUND (1<<6) +#define ANCHOR_NOT_WORD_BOUND (1<<7) +#define ANCHOR_WORD_BEGIN (1<<8) +#define ANCHOR_WORD_END (1<<9) +#define ANCHOR_PREC_READ (1<<10) +#define ANCHOR_PREC_READ_NOT (1<<11) +#define ANCHOR_LOOK_BEHIND (1<<12) +#define ANCHOR_LOOK_BEHIND_NOT (1<<13) + +#define ANCHOR_ANYCHAR_STAR (1<<14) /* ".*" optimize info */ +#define ANCHOR_ANYCHAR_STAR_ML (1<<15) /* ".*" optimize info (multi-line) */ + +/* operation code */ +enum OpCode { + OP_FINISH = 0, /* matching process terminator (no more alternative) */ + OP_END = 1, /* pattern code terminator (success end) */ + + OP_EXACT1 = 2, /* single byte, N = 1 */ + OP_EXACT2, /* single byte, N = 2 */ + OP_EXACT3, /* single byte, N = 3 */ + OP_EXACT4, /* single byte, N = 4 */ + OP_EXACT5, /* single byte, N = 5 */ + OP_EXACTN, /* single byte */ + OP_EXACTMB2N1, /* mb-length = 2 N = 1 */ + OP_EXACTMB2N2, /* mb-length = 2 N = 2 */ + OP_EXACTMB2N3, /* mb-length = 2 N = 3 */ + OP_EXACTMB2N, /* mb-length = 2 */ + OP_EXACTMB3N, /* mb-length = 3 */ + OP_EXACTMBN, /* other length */ + + OP_EXACT1_IC, /* single byte, N = 1, ignore case */ + OP_EXACTN_IC, /* single byte, ignore case */ + + OP_CCLASS, + OP_CCLASS_MB, + OP_CCLASS_MIX, + OP_CCLASS_NOT, + OP_CCLASS_MB_NOT, + OP_CCLASS_MIX_NOT, + OP_CCLASS_NODE, /* pointer to CClassNode node */ + + OP_ANYCHAR, /* "." */ + OP_ANYCHAR_ML, /* "." multi-line */ + OP_ANYCHAR_STAR, /* ".*" */ + OP_ANYCHAR_ML_STAR, /* ".*" multi-line */ + OP_ANYCHAR_STAR_PEEK_NEXT, + OP_ANYCHAR_ML_STAR_PEEK_NEXT, + + OP_WORD, + OP_NOT_WORD, + OP_WORD_BOUND, + OP_NOT_WORD_BOUND, + OP_WORD_BEGIN, + OP_WORD_END, + + OP_BEGIN_BUF, + OP_END_BUF, + OP_BEGIN_LINE, + OP_END_LINE, + OP_SEMI_END_BUF, + OP_BEGIN_POSITION, + + OP_BACKREF1, + OP_BACKREF2, + OP_BACKREFN, + OP_BACKREFN_IC, + OP_BACKREF_MULTI, + OP_BACKREF_MULTI_IC, + OP_BACKREF_WITH_LEVEL, /* \k, \k */ + + OP_MEMORY_START, + OP_MEMORY_START_PUSH, /* push back-tracker to stack */ + OP_MEMORY_END_PUSH, /* push back-tracker to stack */ + OP_MEMORY_END_PUSH_REC, /* push back-tracker to stack */ + OP_MEMORY_END, + OP_MEMORY_END_REC, /* push marker to stack */ + + OP_FAIL, /* pop stack and move */ + OP_JUMP, + OP_PUSH, + OP_POP, + OP_PUSH_OR_JUMP_EXACT1, /* if match exact then push, else jump. */ + OP_PUSH_IF_PEEK_NEXT, /* if match exact then push, else none. */ + OP_REPEAT, /* {n,m} */ + OP_REPEAT_NG, /* {n,m}? (non greedy) */ + OP_REPEAT_INC, + OP_REPEAT_INC_NG, /* non greedy */ + OP_REPEAT_INC_SG, /* search and get in stack */ + OP_REPEAT_INC_NG_SG, /* search and get in stack (non greedy) */ + OP_NULL_CHECK_START, /* null loop checker start */ + OP_NULL_CHECK_END, /* null loop checker end */ + OP_NULL_CHECK_END_MEMST, /* null loop checker end (with capture status) */ + OP_NULL_CHECK_END_MEMST_PUSH, /* with capture status and push check-end */ + + OP_PUSH_POS, /* (?=...) start */ + OP_POP_POS, /* (?=...) end */ + OP_PUSH_POS_NOT, /* (?!...) start */ + OP_FAIL_POS, /* (?!...) end */ + OP_PUSH_STOP_BT, /* (?>...) start */ + OP_POP_STOP_BT, /* (?>...) end */ + OP_LOOK_BEHIND, /* (?<=...) start (no needs end opcode) */ + OP_PUSH_LOOK_BEHIND_NOT, /* (? */ + OP_RETURN, + + OP_STATE_CHECK_PUSH, /* combination explosion check and push */ + OP_STATE_CHECK_PUSH_OR_JUMP, /* check ok -> push, else jump */ + OP_STATE_CHECK, /* check only */ + OP_STATE_CHECK_ANYCHAR_STAR, + OP_STATE_CHECK_ANYCHAR_ML_STAR, + + /* no need: IS_DYNAMIC_OPTION() == 0 */ + OP_SET_OPTION_PUSH, /* set option and push recover option */ + OP_SET_OPTION /* set option */ +}; + +typedef int RelAddrType; +typedef int AbsAddrType; +typedef int LengthType; +typedef int RepeatNumType; +typedef short int MemNumType; +typedef short int StateCheckNumType; +typedef void* PointerType; + +#define SIZE_OPCODE 1 +#define SIZE_RELADDR sizeof(RelAddrType) +#define SIZE_ABSADDR sizeof(AbsAddrType) +#define SIZE_LENGTH sizeof(LengthType) +#define SIZE_MEMNUM sizeof(MemNumType) +#define SIZE_STATE_CHECK_NUM sizeof(StateCheckNumType) +#define SIZE_REPEATNUM sizeof(RepeatNumType) +#define SIZE_OPTION sizeof(OnigOptionType) +#define SIZE_CODE_POINT sizeof(OnigCodePoint) +#define SIZE_POINTER sizeof(PointerType) + + +#define GET_RELADDR_INC(addr,p) PLATFORM_GET_INC(addr, p, RelAddrType) +#define GET_ABSADDR_INC(addr,p) PLATFORM_GET_INC(addr, p, AbsAddrType) +#define GET_LENGTH_INC(len,p) PLATFORM_GET_INC(len, p, LengthType) +#define GET_MEMNUM_INC(num,p) PLATFORM_GET_INC(num, p, MemNumType) +#define GET_REPEATNUM_INC(num,p) PLATFORM_GET_INC(num, p, RepeatNumType) +#define GET_OPTION_INC(option,p) PLATFORM_GET_INC(option, p, OnigOptionType) +#define GET_POINTER_INC(ptr,p) PLATFORM_GET_INC(ptr, p, PointerType) +#define GET_STATE_CHECK_NUM_INC(num,p) PLATFORM_GET_INC(num, p, StateCheckNumType) + +/* code point's address must be aligned address. */ +#define GET_CODE_POINT(code,p) code = *((OnigCodePoint* )(p)) +#define GET_BYTE_INC(byte,p) do{\ + byte = *(p);\ + (p)++;\ +} while(0) + + +/* op-code + arg size */ +#define SIZE_OP_ANYCHAR_STAR SIZE_OPCODE +#define SIZE_OP_ANYCHAR_STAR_PEEK_NEXT (SIZE_OPCODE + 1) +#define SIZE_OP_JUMP (SIZE_OPCODE + SIZE_RELADDR) +#define SIZE_OP_PUSH (SIZE_OPCODE + SIZE_RELADDR) +#define SIZE_OP_POP SIZE_OPCODE +#define SIZE_OP_PUSH_OR_JUMP_EXACT1 (SIZE_OPCODE + SIZE_RELADDR + 1) +#define SIZE_OP_PUSH_IF_PEEK_NEXT (SIZE_OPCODE + SIZE_RELADDR + 1) +#define SIZE_OP_REPEAT_INC (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_REPEAT_INC_NG (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_PUSH_POS SIZE_OPCODE +#define SIZE_OP_PUSH_POS_NOT (SIZE_OPCODE + SIZE_RELADDR) +#define SIZE_OP_POP_POS SIZE_OPCODE +#define SIZE_OP_FAIL_POS SIZE_OPCODE +#define SIZE_OP_SET_OPTION (SIZE_OPCODE + SIZE_OPTION) +#define SIZE_OP_SET_OPTION_PUSH (SIZE_OPCODE + SIZE_OPTION) +#define SIZE_OP_FAIL SIZE_OPCODE +#define SIZE_OP_MEMORY_START (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_MEMORY_START_PUSH (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_MEMORY_END_PUSH (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_MEMORY_END_PUSH_REC (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_MEMORY_END (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_MEMORY_END_REC (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_PUSH_STOP_BT SIZE_OPCODE +#define SIZE_OP_POP_STOP_BT SIZE_OPCODE +#define SIZE_OP_NULL_CHECK_START (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_NULL_CHECK_END (SIZE_OPCODE + SIZE_MEMNUM) +#define SIZE_OP_LOOK_BEHIND (SIZE_OPCODE + SIZE_LENGTH) +#define SIZE_OP_PUSH_LOOK_BEHIND_NOT (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH) +#define SIZE_OP_FAIL_LOOK_BEHIND_NOT SIZE_OPCODE +#define SIZE_OP_CALL (SIZE_OPCODE + SIZE_ABSADDR) +#define SIZE_OP_RETURN SIZE_OPCODE + +#ifdef USE_COMBINATION_EXPLOSION_CHECK +#define SIZE_OP_STATE_CHECK (SIZE_OPCODE + SIZE_STATE_CHECK_NUM) +#define SIZE_OP_STATE_CHECK_PUSH (SIZE_OPCODE + SIZE_STATE_CHECK_NUM + SIZE_RELADDR) +#define SIZE_OP_STATE_CHECK_PUSH_OR_JUMP (SIZE_OPCODE + SIZE_STATE_CHECK_NUM + SIZE_RELADDR) +#define SIZE_OP_STATE_CHECK_ANYCHAR_STAR (SIZE_OPCODE + SIZE_STATE_CHECK_NUM) +#endif + +#define MC_ESC(syn) (syn)->meta_char_table.esc +#define MC_ANYCHAR(syn) (syn)->meta_char_table.anychar +#define MC_ANYTIME(syn) (syn)->meta_char_table.anytime +#define MC_ZERO_OR_ONE_TIME(syn) (syn)->meta_char_table.zero_or_one_time +#define MC_ONE_OR_MORE_TIME(syn) (syn)->meta_char_table.one_or_more_time +#define MC_ANYCHAR_ANYTIME(syn) (syn)->meta_char_table.anychar_anytime + +#define IS_MC_ESC_CODE(code, syn) \ + ((code) == MC_ESC(syn) && \ + !IS_SYNTAX_OP2((syn), ONIG_SYN_OP2_INEFFECTIVE_ESCAPE)) + + +#define SYN_POSIX_COMMON_OP \ + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \ + ONIG_SYN_OP_DECIMAL_BACKREF | \ + ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \ + ONIG_SYN_OP_LINE_ANCHOR | \ + ONIG_SYN_OP_ESC_CONTROL_CHARS ) + +#define SYN_GNU_REGEX_OP \ + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \ + ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \ + ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \ + ONIG_SYN_OP_VBAR_ALT | \ + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \ + ONIG_SYN_OP_QMARK_ZERO_ONE | \ + ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \ + ONIG_SYN_OP_ESC_W_WORD | \ + ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \ + ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \ + ONIG_SYN_OP_LINE_ANCHOR ) + +#define SYN_GNU_REGEX_BV \ + ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | \ + ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \ + ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) + + +#define NCCLASS_FLAGS(cc) ((cc)->flags) +#define NCCLASS_FLAG_SET(cc,flag) (NCCLASS_FLAGS(cc) |= (flag)) +#define NCCLASS_FLAG_CLEAR(cc,flag) (NCCLASS_FLAGS(cc) &= ~(flag)) +#define IS_NCCLASS_FLAG_ON(cc,flag) ((NCCLASS_FLAGS(cc) & (flag)) != 0) + +/* cclass node */ +#define FLAG_NCCLASS_NOT (1<<0) +#define FLAG_NCCLASS_SHARE (1<<1) + +#define NCCLASS_SET_NOT(nd) NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_NOT) +#define NCCLASS_SET_SHARE(nd) NCCLASS_FLAG_SET(nd, FLAG_NCCLASS_SHARE) +#define NCCLASS_CLEAR_NOT(nd) NCCLASS_FLAG_CLEAR(nd, FLAG_NCCLASS_NOT) +#define IS_NCCLASS_NOT(nd) IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_NOT) +#define IS_NCCLASS_SHARE(nd) IS_NCCLASS_FLAG_ON(nd, FLAG_NCCLASS_SHARE) + +typedef struct { + int type; + /* struct _Node* next; */ + /* unsigned int flags; */ +} NodeBase; + +typedef struct { + NodeBase base; + unsigned int flags; + BitSet bs; + BBuf* mbuf; /* multi-byte info or NULL */ +} CClassNode; + +typedef long OnigStackIndex; + +typedef struct _OnigStackType { + unsigned int type; + union { + struct { + UChar *pcode; /* byte code position */ + UChar *pstr; /* string position */ + UChar *pstr_prev; /* previous char position of pstr */ +#ifdef USE_COMBINATION_EXPLOSION_CHECK + unsigned int state_check; +#endif + } state; + struct { + int count; /* for OP_REPEAT_INC, OP_REPEAT_INC_NG */ + UChar *pcode; /* byte code position (head of repeated target) */ + int num; /* repeat id */ + } repeat; + struct { + OnigStackIndex si; /* index of stack */ + } repeat_inc; + struct { + int num; /* memory num */ + UChar *pstr; /* start/end position */ + /* Following information is setted, if this stack type is MEM-START */ + OnigStackIndex start; /* prev. info (for backtrack "(...)*" ) */ + OnigStackIndex end; /* prev. info (for backtrack "(...)*" ) */ + } mem; + struct { + int num; /* null check id */ + UChar *pstr; /* start position */ + } null_check; +#ifdef USE_SUBEXP_CALL + struct { + UChar *ret_addr; /* byte code position */ + int num; /* null check id */ + UChar *pstr; /* string position */ + } call_frame; +#endif + } u; +} OnigStackType; + +typedef struct { + void* stack_p; + int stack_n; + OnigOptionType options; + OnigRegion* region; + const UChar* start; /* search start position (for \G: BEGIN_POSITION) */ +#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE + int best_len; /* for ONIG_OPTION_FIND_LONGEST */ + UChar* best_s; +#endif +#ifdef USE_COMBINATION_EXPLOSION_CHECK + void* state_check_buff; + int state_check_buff_size; +#endif +} OnigMatchArg; + + +#define IS_CODE_SB_WORD(enc,code) \ + (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code)) + +#ifdef ONIG_DEBUG + +typedef struct { + short int opcode; + char* name; + short int arg_type; +} OnigOpInfoType; + +extern OnigOpInfoType OnigOpInfo[]; + +extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc)); + +#ifdef ONIG_DEBUG_STATISTICS +extern void onig_statistics_init P_((void)); +extern void onig_print_statistics P_((FILE* f)); +#endif +#endif + +extern UChar* onig_error_code_to_format P_((int code)); +extern void onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...)); +extern int onig_bbuf_init P_((BBuf* buf, int size)); +extern int onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax)); +extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo)); +extern void onig_chain_reduce P_((regex_t* reg)); +extern void onig_chain_link_add P_((regex_t* to, regex_t* add)); +extern void onig_transfer P_((regex_t* to, regex_t* from)); +extern int onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc)); +extern int onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, CClassNode* cc)); + +/* strend hash */ +typedef void hash_table_type; +#ifdef RUBY +#include "ruby/st.h" +typedef st_data_t hash_data_type; +#else +typedef unsigned long hash_data_type; +#endif + +extern hash_table_type* onig_st_init_strend_table_with_size P_((int size)); +extern int onig_st_lookup_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type *value)); +extern int onig_st_insert_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type value)); + +/* encoding property management */ +#define PROPERTY_LIST_ADD_PROP(Name, CR) \ + r = onigenc_property_list_add_property((UChar* )Name, CR,\ + &PropertyNameTable, &PropertyList, &PropertyListNum,\ + &PropertyListSize);\ + if (r != 0) goto end + +#define PROPERTY_LIST_INIT_CHECK \ + if (PropertyInited == 0) {\ + int r = onigenc_property_list_init(init_property_list);\ + if (r != 0) return r;\ + } + +extern int onigenc_property_list_add_property P_((UChar* name, const OnigCodePoint* prop, hash_table_type **table, const OnigCodePoint*** plist, int *pnum, int *psize)); + +typedef int (*ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE)(void); + +extern int onigenc_property_list_init P_((ONIGENC_INIT_PROPERTY_LIST_FUNC_TYPE)); + +#endif /* ONIGURUMA_REGINT_H */ diff --git a/lib/ruby-1.9.1-rc1/regparse.c b/lib/ruby-1.9.1-rc1/regparse.c new file mode 100644 index 0000000..8a02966 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regparse.c @@ -0,0 +1,5551 @@ +/********************************************************************** + regparse.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regparse.h" + +#define WARN_BUFSIZE 256 + +#define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + + +const OnigSyntaxType OnigSyntaxRuby = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT | + ONIG_SYN_OP2_OPTION_RUBY | + ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF | + ONIG_SYN_OP2_ESC_G_SUBEXP_CALL | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | + ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL | + ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB | + ONIG_SYN_OP2_ESC_H_XDIGIT ) + , ( SYN_GNU_REGEX_BV | + ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV | + ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND | + ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | + ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME | + ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY | + ONIG_SYN_WARN_CC_OP_NOT_ESCAPED | + ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT ) + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_RUBY; + +extern void onig_null_warn(const char* s ARG_UNUSED) { } + +#ifdef DEFAULT_WARN_FUNCTION +static OnigWarnFunc onig_warn = (OnigWarnFunc )DEFAULT_WARN_FUNCTION; +#else +static OnigWarnFunc onig_warn = onig_null_warn; +#endif + +#ifdef DEFAULT_VERB_WARN_FUNCTION +static OnigWarnFunc onig_verb_warn = (OnigWarnFunc )DEFAULT_VERB_WARN_FUNCTION; +#else +static OnigWarnFunc onig_verb_warn = onig_null_warn; +#endif + +extern void onig_set_warn_func(OnigWarnFunc f) +{ + onig_warn = f; +} + +extern void onig_set_verb_warn_func(OnigWarnFunc f) +{ + onig_verb_warn = f; +} + +static void +bbuf_free(BBuf* bbuf) +{ + if (IS_NOT_NULL(bbuf)) { + if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p); + xfree(bbuf); + } +} + +static int +bbuf_clone(BBuf** rto, BBuf* from) +{ + int r; + BBuf *to; + + *rto = to = (BBuf* )xmalloc(sizeof(BBuf)); + CHECK_NULL_RETURN_MEMERR(to); + r = BBUF_INIT(to, from->alloc); + if (r != 0) return r; + to->used = from->used; + xmemcpy(to->p, from->p, from->used); + return 0; +} + +#define BACKREF_REL_TO_ABS(rel_no, env) \ + ((env)->num_mem + 1 + (rel_no)) + +#define ONOFF(v,f,negative) (negative) ? ((v) &= ~(f)) : ((v) |= (f)) + +#define MBCODE_START_POS(enc) \ + (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) + +#define SET_ALL_MULTI_BYTE_RANGE(enc, pbuf) \ + add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0)) + +#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\ + if (! ONIGENC_IS_SINGLEBYTE(enc)) {\ + r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\ + if (r) return r;\ + }\ +} while (0) + + +#define BITSET_IS_EMPTY(bs,empty) do {\ + int i;\ + empty = 1;\ + for (i = 0; i < (int )BITSET_SIZE; i++) {\ + if ((bs)[i] != 0) {\ + empty = 0; break;\ + }\ + }\ +} while (0) + +static void +bitset_set_range(BitSetRef bs, int from, int to) +{ + int i; + for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) { + BITSET_SET_BIT(bs, i); + } +} + +#if 0 +static void +bitset_set_all(BitSetRef bs) +{ + int i; + for (i = 0; i < BITSET_SIZE; i++) { bs[i] = ~((Bits )0); } +} +#endif + +static void +bitset_invert(BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { bs[i] = ~(bs[i]); } +} + +static void +bitset_invert_to(BitSetRef from, BitSetRef to) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { to[i] = ~(from[i]); } +} + +static void +bitset_and(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] &= bs[i]; } +} + +static void +bitset_or(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] |= bs[i]; } +} + +static void +bitset_copy(BitSetRef dest, BitSetRef bs) +{ + int i; + for (i = 0; i < (int )BITSET_SIZE; i++) { dest[i] = bs[i]; } +} + +extern int +onig_strncmp(const UChar* s1, const UChar* s2, int n) +{ + int x; + + while (n-- > 0) { + x = *s2++ - *s1++; + if (x) return x; + } + return 0; +} + +extern void +onig_strcpy(UChar* dest, const UChar* src, const UChar* end) +{ + int len = end - src; + if (len > 0) { + xmemcpy(dest, src, len); + dest[len] = (UChar )0; + } +} + +#ifdef USE_NAMED_GROUP +static UChar* +strdup_with_null(OnigEncoding enc, UChar* s, UChar* end) +{ + int slen, term_len, i; + UChar *r; + + slen = end - s; + term_len = ONIGENC_MBC_MINLEN(enc); + + r = (UChar* )xmalloc(slen + term_len); + CHECK_NULL_RETURN(r); + xmemcpy(r, s, slen); + + for (i = 0; i < term_len; i++) + r[slen + i] = (UChar )0; + + return r; +} +#endif + +/* scan pattern methods */ +#define PEND_VALUE 0 + +#define PFETCH_READY UChar* pfetch_prev +#define PEND (p < end ? 0 : 1) +#define PUNFETCH p = pfetch_prev +#define PINC do { \ + pfetch_prev = p; \ + p += enclen(enc, p, end); \ +} while (0) +#define PFETCH(c) do { \ + c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \ + pfetch_prev = p; \ + p += enclen(enc, p, end); \ +} while (0) + +#define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) +#define PPEEK_IS(c) (PPEEK == (OnigCodePoint )c) + +static UChar* +strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end, + int capa) +{ + UChar* r; + + if (dest) + r = (UChar* )xrealloc(dest, capa + 1); + else + r = (UChar* )xmalloc(capa + 1); + + CHECK_NULL_RETURN(r); + onig_strcpy(r + (dest_end - dest), src, src_end); + return r; +} + +/* dest on static area */ +static UChar* +strcat_capa_from_static(UChar* dest, UChar* dest_end, + const UChar* src, const UChar* src_end, int capa) +{ + UChar* r; + + r = (UChar* )xmalloc(capa + 1); + CHECK_NULL_RETURN(r); + onig_strcpy(r, dest, dest_end); + onig_strcpy(r + (dest_end - dest), src, src_end); + return r; +} + + +#ifdef USE_ST_LIBRARY + +#include "ruby/st.h" + +typedef struct { + UChar* s; + UChar* end; +} st_str_end_key; + +static int +str_end_cmp(st_str_end_key* x, st_str_end_key* y) +{ + UChar *p, *q; + int c; + + if ((x->end - x->s) != (y->end - y->s)) + return 1; + + p = x->s; + q = y->s; + while (p < x->end) { + c = (int )*p - (int )*q; + if (c != 0) return c; + + p++; q++; + } + + return 0; +} + +static int +str_end_hash(st_str_end_key* x) +{ + UChar *p; + int val = 0; + + p = x->s; + while (p < x->end) { + val = val * 997 + (int )*p++; + } + + return val + (val >> 5); +} + +extern hash_table_type* +onig_st_init_strend_table_with_size(int size) +{ + static const struct st_hash_type hashType = { + str_end_cmp, + str_end_hash, + }; + + return (hash_table_type* ) + onig_st_init_table_with_size(&hashType, size); +} + +extern int +onig_st_lookup_strend(hash_table_type* table, const UChar* str_key, + const UChar* end_key, hash_data_type *value) +{ + st_str_end_key key; + + key.s = (UChar* )str_key; + key.end = (UChar* )end_key; + + return onig_st_lookup(table, (st_data_t )(&key), value); +} + +extern int +onig_st_insert_strend(hash_table_type* table, const UChar* str_key, + const UChar* end_key, hash_data_type value) +{ + st_str_end_key* key; + int result; + + key = (st_str_end_key* )xmalloc(sizeof(st_str_end_key)); + key->s = (UChar* )str_key; + key->end = (UChar* )end_key; + result = onig_st_insert(table, (st_data_t )key, value); + if (result) { + xfree(key); + } + return result; +} + +#endif /* USE_ST_LIBRARY */ + + +#ifdef USE_NAMED_GROUP + +#define INIT_NAME_BACKREFS_ALLOC_NUM 8 + +typedef struct { + UChar* name; + int name_len; /* byte length */ + int back_num; /* number of backrefs */ + int back_alloc; + int back_ref1; + int* back_refs; +} NameEntry; + +#ifdef USE_ST_LIBRARY + +typedef st_table NameTable; +typedef st_data_t HashDataType; /* 1.6 st.h doesn't define st_data_t type */ + +#define NAMEBUF_SIZE 24 +#define NAMEBUF_SIZE_1 25 + +#ifdef ONIG_DEBUG +static int +i_print_name_entry(UChar* key, NameEntry* e, void* arg) +{ + int i; + FILE* fp = (FILE* )arg; + + fprintf(fp, "%s: ", e->name); + if (e->back_num == 0) + fputs("-", fp); + else if (e->back_num == 1) + fprintf(fp, "%d", e->back_ref1); + else { + for (i = 0; i < e->back_num; i++) { + if (i > 0) fprintf(fp, ", "); + fprintf(fp, "%d", e->back_refs[i]); + } + } + fputs("\n", fp); + return ST_CONTINUE; +} + +extern int +onig_print_names(FILE* fp, regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + fprintf(fp, "name table\n"); + onig_st_foreach(t, i_print_name_entry, (HashDataType )fp); + fputs("\n", fp); + } + return 0; +} +#endif /* ONIG_DEBUG */ + +static int +i_free_name_entry(UChar* key, NameEntry* e, void* arg ARG_UNUSED) +{ + xfree(e->name); + if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs); + xfree(key); + xfree(e); + return ST_DELETE; +} + +static int +names_clear(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_free_name_entry, 0); + } + return 0; +} + +extern int +onig_names_free(regex_t* reg) +{ + int r; + NameTable* t; + + r = names_clear(reg); + if (r) return r; + + t = (NameTable* )reg->name_table; + if (IS_NOT_NULL(t)) onig_st_free_table(t); + reg->name_table = (void* )NULL; + return 0; +} + +static NameEntry* +name_find(regex_t* reg, const UChar* name, const UChar* name_end) +{ + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + e = (NameEntry* )NULL; + if (IS_NOT_NULL(t)) { + onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e))); + } + return e; +} + +typedef struct { + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*); + regex_t* reg; + void* arg; + int ret; + OnigEncoding enc; +} INamesArg; + +static int +i_names(UChar* key ARG_UNUSED, NameEntry* e, INamesArg* arg) +{ + int r = (*(arg->func))(e->name, + e->name + e->name_len, + e->back_num, + (e->back_num > 1 ? e->back_refs : &(e->back_ref1)), + arg->reg, arg->arg); + if (r != 0) { + arg->ret = r; + return ST_STOP; + } + return ST_CONTINUE; +} + +extern int +onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg) +{ + INamesArg narg; + NameTable* t = (NameTable* )reg->name_table; + + narg.ret = 0; + if (IS_NOT_NULL(t)) { + narg.func = func; + narg.reg = reg; + narg.arg = arg; + narg.enc = reg->enc; /* should be pattern encoding. */ + onig_st_foreach(t, i_names, (HashDataType )&narg); + } + return narg.ret; +} + +static int +i_renumber_name(UChar* key ARG_UNUSED, NameEntry* e, GroupNumRemap* map) +{ + int i; + + if (e->back_num > 1) { + for (i = 0; i < e->back_num; i++) { + e->back_refs[i] = map[e->back_refs[i]].new_val; + } + } + else if (e->back_num == 1) { + e->back_ref1 = map[e->back_ref1].new_val; + } + + return ST_CONTINUE; +} + +extern int +onig_renumber_name_table(regex_t* reg, GroupNumRemap* map) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + onig_st_foreach(t, i_renumber_name, (HashDataType )map); + } + return 0; +} + + +extern int +onig_number_of_names(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) + return t->num_entries; + else + return 0; +} + +#else /* USE_ST_LIBRARY */ + +#define INIT_NAMES_ALLOC_NUM 8 + +typedef struct { + NameEntry* e; + int num; + int alloc; +} NameTable; + +#ifdef ONIG_DEBUG +extern int +onig_print_names(FILE* fp, regex_t* reg) +{ + int i, j; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t) && t->num > 0) { + fprintf(fp, "name table\n"); + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + fprintf(fp, "%s: ", e->name); + if (e->back_num == 0) { + fputs("-", fp); + } + else if (e->back_num == 1) { + fprintf(fp, "%d", e->back_ref1); + } + else { + for (j = 0; j < e->back_num; j++) { + if (j > 0) fprintf(fp, ", "); + fprintf(fp, "%d", e->back_refs[j]); + } + } + fputs("\n", fp); + } + fputs("\n", fp); + } + return 0; +} +#endif + +static int +names_clear(regex_t* reg) +{ + int i; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (IS_NOT_NULL(e->name)) { + xfree(e->name); + e->name = NULL; + e->name_len = 0; + e->back_num = 0; + e->back_alloc = 0; + if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs); + e->back_refs = (int* )NULL; + } + } + if (IS_NOT_NULL(t->e)) { + xfree(t->e); + t->e = NULL; + } + t->num = 0; + } + return 0; +} + +extern int +onig_names_free(regex_t* reg) +{ + int r; + NameTable* t; + + r = names_clear(reg); + if (r) return r; + + t = (NameTable* )reg->name_table; + if (IS_NOT_NULL(t)) xfree(t); + reg->name_table = NULL; + return 0; +} + +static NameEntry* +name_find(regex_t* reg, UChar* name, UChar* name_end) +{ + int i, len; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + len = name_end - name; + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + if (len == e->name_len && onig_strncmp(name, e->name, len) == 0) + return e; + } + } + return (NameEntry* )NULL; +} + +extern int +onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg) +{ + int i, r; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) { + for (i = 0; i < t->num; i++) { + e = &(t->e[i]); + r = (*func)(e->name, e->name + e->name_len, e->back_num, + (e->back_num > 1 ? e->back_refs : &(e->back_ref1)), + reg, arg); + if (r != 0) return r; + } + } + return 0; +} + +extern int +onig_number_of_names(regex_t* reg) +{ + NameTable* t = (NameTable* )reg->name_table; + + if (IS_NOT_NULL(t)) + return t->num; + else + return 0; +} + +#endif /* else USE_ST_LIBRARY */ + +static int +name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env) +{ + int alloc; + NameEntry* e; + NameTable* t = (NameTable* )reg->name_table; + + if (name_end - name <= 0) + return ONIGERR_EMPTY_GROUP_NAME; + + e = name_find(reg, name, name_end); + if (IS_NULL(e)) { +#ifdef USE_ST_LIBRARY + if (IS_NULL(t)) { + t = onig_st_init_strend_table_with_size(5); + reg->name_table = (void* )t; + } + e = (NameEntry* )xmalloc(sizeof(NameEntry)); + CHECK_NULL_RETURN_MEMERR(e); + + e->name = strdup_with_null(reg->enc, name, name_end); + if (IS_NULL(e->name)) { + xfree(e); + return ONIGERR_MEMORY; + } + onig_st_insert_strend(t, e->name, (e->name + (name_end - name)), + (HashDataType )e); + + e->name_len = name_end - name; + e->back_num = 0; + e->back_alloc = 0; + e->back_refs = (int* )NULL; + +#else + + if (IS_NULL(t)) { + alloc = INIT_NAMES_ALLOC_NUM; + t = (NameTable* )xmalloc(sizeof(NameTable)); + CHECK_NULL_RETURN_MEMERR(t); + t->e = NULL; + t->alloc = 0; + t->num = 0; + + t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc); + if (IS_NULL(t->e)) { + xfree(t); + return ONIGERR_MEMORY; + } + t->alloc = alloc; + reg->name_table = t; + goto clear; + } + else if (t->num == t->alloc) { + int i; + + alloc = t->alloc * 2; + t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc); + CHECK_NULL_RETURN_MEMERR(t->e); + t->alloc = alloc; + + clear: + for (i = t->num; i < t->alloc; i++) { + t->e[i].name = NULL; + t->e[i].name_len = 0; + t->e[i].back_num = 0; + t->e[i].back_alloc = 0; + t->e[i].back_refs = (int* )NULL; + } + } + e = &(t->e[t->num]); + t->num++; + e->name = strdup_with_null(reg->enc, name, name_end); + e->name_len = name_end - name; +#endif + } + + if (e->back_num >= 1 && + ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) { + onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME, + name, name_end); + return ONIGERR_MULTIPLEX_DEFINED_NAME; + } + + e->back_num++; + if (e->back_num == 1) { + e->back_ref1 = backref; + } + else { + if (e->back_num == 2) { + alloc = INIT_NAME_BACKREFS_ALLOC_NUM; + e->back_refs = (int* )xmalloc(sizeof(int) * alloc); + CHECK_NULL_RETURN_MEMERR(e->back_refs); + e->back_alloc = alloc; + e->back_refs[0] = e->back_ref1; + e->back_refs[1] = backref; + } + else { + if (e->back_num > e->back_alloc) { + alloc = e->back_alloc * 2; + e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc); + CHECK_NULL_RETURN_MEMERR(e->back_refs); + e->back_alloc = alloc; + } + e->back_refs[e->back_num - 1] = backref; + } + } + + return 0; +} + +extern int +onig_name_to_group_numbers(regex_t* reg, const UChar* name, + const UChar* name_end, int** nums) +{ + NameEntry* e = name_find(reg, name, name_end); + + if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE; + + switch (e->back_num) { + case 0: + *nums = 0; + break; + case 1: + *nums = &(e->back_ref1); + break; + default: + *nums = e->back_refs; + break; + } + return e->back_num; +} + +extern int +onig_name_to_backref_number(regex_t* reg, const UChar* name, + const UChar* name_end, OnigRegion *region) +{ + int i, n, *nums; + + n = onig_name_to_group_numbers(reg, name, name_end, &nums); + if (n < 0) + return n; + else if (n == 0) + return ONIGERR_PARSER_BUG; + else if (n == 1) + return nums[0]; + else { + if (IS_NOT_NULL(region)) { + for (i = n - 1; i >= 0; i--) { + if (region->beg[nums[i]] != ONIG_REGION_NOTPOS) + return nums[i]; + } + } + return nums[n - 1]; + } +} + +#else /* USE_NAMED_GROUP */ + +extern int +onig_name_to_group_numbers(regex_t* reg, const UChar* name, + const UChar* name_end, int** nums) +{ + return ONIG_NO_SUPPORT_CONFIG; +} + +extern int +onig_name_to_backref_number(regex_t* reg, const UChar* name, + const UChar* name_end, OnigRegion* region) +{ + return ONIG_NO_SUPPORT_CONFIG; +} + +extern int +onig_foreach_name(regex_t* reg, + int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg) +{ + return ONIG_NO_SUPPORT_CONFIG; +} + +extern int +onig_number_of_names(regex_t* reg) +{ + return 0; +} +#endif /* else USE_NAMED_GROUP */ + +extern int +onig_noname_group_capture_is_active(regex_t* reg) +{ + if (ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_DONT_CAPTURE_GROUP)) + return 0; + +#ifdef USE_NAMED_GROUP + if (onig_number_of_names(reg) > 0 && + IS_SYNTAX_BV(reg->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) && + !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) { + return 0; + } +#endif + + return 1; +} + + +#define INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 + +static void +scan_env_clear(ScanEnv* env) +{ + int i; + + BIT_STATUS_CLEAR(env->capture_history); + BIT_STATUS_CLEAR(env->bt_mem_start); + BIT_STATUS_CLEAR(env->bt_mem_end); + BIT_STATUS_CLEAR(env->backrefed_mem); + env->error = (UChar* )NULL; + env->error_end = (UChar* )NULL; + env->num_call = 0; + env->num_mem = 0; +#ifdef USE_NAMED_GROUP + env->num_named = 0; +#endif + env->mem_alloc = 0; + env->mem_nodes_dynamic = (Node** )NULL; + + for (i = 0; i < SCANENV_MEMNODES_SIZE; i++) + env->mem_nodes_static[i] = NULL_NODE; + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + env->num_comb_exp_check = 0; + env->comb_exp_max_regnum = 0; + env->curr_max_regnum = 0; + env->has_recursion = 0; +#endif +} + +static int +scan_env_add_mem_entry(ScanEnv* env) +{ + int i, need, alloc; + Node** p; + + need = env->num_mem + 1; + if (need >= SCANENV_MEMNODES_SIZE) { + if (env->mem_alloc <= need) { + if (IS_NULL(env->mem_nodes_dynamic)) { + alloc = INIT_SCANENV_MEMNODES_ALLOC_SIZE; + p = (Node** )xmalloc(sizeof(Node*) * alloc); + xmemcpy(p, env->mem_nodes_static, + sizeof(Node*) * SCANENV_MEMNODES_SIZE); + } + else { + alloc = env->mem_alloc * 2; + p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc); + } + CHECK_NULL_RETURN_MEMERR(p); + + for (i = env->num_mem + 1; i < alloc; i++) + p[i] = NULL_NODE; + + env->mem_nodes_dynamic = p; + env->mem_alloc = alloc; + } + } + + env->num_mem++; + return env->num_mem; +} + +static int +scan_env_set_mem_node(ScanEnv* env, int num, Node* node) +{ + if (env->num_mem >= num) + SCANENV_MEM_NODES(env)[num] = node; + else + return ONIGERR_PARSER_BUG; + return 0; +} + + +#ifdef USE_PARSE_TREE_NODE_RECYCLE +typedef struct _FreeNode { + struct _FreeNode* next; +} FreeNode; + +static FreeNode* FreeNodeList = (FreeNode* )NULL; +#endif + +extern void +onig_node_free(Node* node) +{ + start: + if (IS_NULL(node)) return ; + + switch (NTYPE(node)) { + case NT_STR: + if (NSTR(node)->capa != 0 && + IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) { + xfree(NSTR(node)->s); + } + break; + + case NT_LIST: + case NT_ALT: + onig_node_free(NCAR(node)); + { + Node* next_node = NCDR(node); + +#ifdef USE_PARSE_TREE_NODE_RECYCLE + { + FreeNode* n = (FreeNode* )node; + + THREAD_ATOMIC_START; + n->next = FreeNodeList; + FreeNodeList = n; + THREAD_ATOMIC_END; + } +#else + xfree(node); +#endif + node = next_node; + goto start; + } + break; + + case NT_CCLASS: + { + CClassNode* cc = NCCLASS(node); + + if (IS_NCCLASS_SHARE(cc)) return ; + if (cc->mbuf) + bbuf_free(cc->mbuf); + } + break; + + case NT_QTFR: + if (NQTFR(node)->target) + onig_node_free(NQTFR(node)->target); + break; + + case NT_ENCLOSE: + if (NENCLOSE(node)->target) + onig_node_free(NENCLOSE(node)->target); + break; + + case NT_BREF: + if (IS_NOT_NULL(NBREF(node)->back_dynamic)) + xfree(NBREF(node)->back_dynamic); + break; + + case NT_ANCHOR: + if (NANCHOR(node)->target) + onig_node_free(NANCHOR(node)->target); + break; + } + +#ifdef USE_PARSE_TREE_NODE_RECYCLE + { + FreeNode* n = (FreeNode* )node; + + THREAD_ATOMIC_START; + n->next = FreeNodeList; + FreeNodeList = n; + THREAD_ATOMIC_END; + } +#else + xfree(node); +#endif +} + +#ifdef USE_PARSE_TREE_NODE_RECYCLE +extern int +onig_free_node_list(void) +{ + FreeNode* n; + + /* THREAD_ATOMIC_START; */ + while (IS_NOT_NULL(FreeNodeList)) { + n = FreeNodeList; + FreeNodeList = FreeNodeList->next; + xfree(n); + } + /* THREAD_ATOMIC_END; */ + return 0; +} +#endif + +static Node* +node_new(void) +{ + Node* node; + +#ifdef USE_PARSE_TREE_NODE_RECYCLE + THREAD_ATOMIC_START; + if (IS_NOT_NULL(FreeNodeList)) { + node = (Node* )FreeNodeList; + FreeNodeList = FreeNodeList->next; + THREAD_ATOMIC_END; + return node; + } + THREAD_ATOMIC_END; +#endif + + node = (Node* )xmalloc(sizeof(Node)); + /* xmemset(node, 0, sizeof(Node)); */ + return node; +} + + +static void +initialize_cclass(CClassNode* cc) +{ + BITSET_CLEAR(cc->bs); + /* cc->base.flags = 0; */ + cc->flags = 0; + cc->mbuf = NULL; +} + +static Node* +node_new_cclass(void) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_CCLASS); + initialize_cclass(NCCLASS(node)); + return node; +} + +static Node* +node_new_cclass_by_codepoint_range(int not, OnigCodePoint sb_out, + const OnigCodePoint ranges[]) +{ + int n, i; + CClassNode* cc; + OnigCodePoint j; + + Node* node = node_new_cclass(); + CHECK_NULL_RETURN(node); + + cc = NCCLASS(node); + if (not != 0) NCCLASS_SET_NOT(cc); + + BITSET_CLEAR(cc->bs); + if (sb_out > 0 && IS_NOT_NULL(ranges)) { + n = ONIGENC_CODE_RANGE_NUM(ranges); + for (i = 0; i < n; i++) { + for (j = ONIGENC_CODE_RANGE_FROM(ranges, i); + j <= (OnigCodePoint )ONIGENC_CODE_RANGE_TO(ranges, i); j++) { + if (j >= sb_out) goto sb_end; + + BITSET_SET_BIT(cc->bs, j); + } + } + } + + sb_end: + if (IS_NULL(ranges)) { + is_null: + cc->mbuf = NULL; + } + else { + BBuf* bbuf; + + n = ONIGENC_CODE_RANGE_NUM(ranges); + if (n == 0) goto is_null; + + bbuf = (BBuf* )xmalloc(sizeof(BBuf)); + CHECK_NULL_RETURN(bbuf); + bbuf->alloc = n + 1; + bbuf->used = n + 1; + bbuf->p = (UChar* )((void* )ranges); + + cc->mbuf = bbuf; + } + + return node; +} + +static Node* +node_new_ctype(int type, int not) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_CTYPE); + NCTYPE(node)->ctype = type; + NCTYPE(node)->not = not; + return node; +} + +static Node* +node_new_anychar(void) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_CANY); + return node; +} + +static Node* +node_new_list(Node* left, Node* right) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_LIST); + NCAR(node) = left; + NCDR(node) = right; + return node; +} + +extern Node* +onig_node_new_list(Node* left, Node* right) +{ + return node_new_list(left, right); +} + +extern Node* +onig_node_list_add(Node* list, Node* x) +{ + Node *n; + + n = onig_node_new_list(x, NULL); + if (IS_NULL(n)) return NULL_NODE; + + if (IS_NOT_NULL(list)) { + while (IS_NOT_NULL(NCDR(list))) + list = NCDR(list); + + NCDR(list) = n; + } + + return n; +} + +extern Node* +onig_node_new_alt(Node* left, Node* right) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_ALT); + NCAR(node) = left; + NCDR(node) = right; + return node; +} + +extern Node* +onig_node_new_anchor(int type) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_ANCHOR); + NANCHOR(node)->type = type; + NANCHOR(node)->target = NULL; + NANCHOR(node)->char_len = -1; + return node; +} + +static Node* +node_new_backref(int back_num, int* backrefs, int by_name, +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level, int nest_level, +#endif + ScanEnv* env) +{ + int i; + Node* node = node_new(); + + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_BREF); + NBREF(node)->state = 0; + NBREF(node)->back_num = back_num; + NBREF(node)->back_dynamic = (int* )NULL; + if (by_name != 0) + NBREF(node)->state |= NST_NAME_REF; + +#ifdef USE_BACKREF_WITH_LEVEL + if (exist_level != 0) { + NBREF(node)->state |= NST_NEST_LEVEL; + NBREF(node)->nest_level = nest_level; + } +#endif + + for (i = 0; i < back_num; i++) { + if (backrefs[i] <= env->num_mem && + IS_NULL(SCANENV_MEM_NODES(env)[backrefs[i]])) { + NBREF(node)->state |= NST_RECURSION; /* /...(\1).../ */ + break; + } + } + + if (back_num <= NODE_BACKREFS_SIZE) { + for (i = 0; i < back_num; i++) + NBREF(node)->back_static[i] = backrefs[i]; + } + else { + int* p = (int* )xmalloc(sizeof(int) * back_num); + if (IS_NULL(p)) { + onig_node_free(node); + return NULL; + } + NBREF(node)->back_dynamic = p; + for (i = 0; i < back_num; i++) + p[i] = backrefs[i]; + } + return node; +} + +#ifdef USE_SUBEXP_CALL +static Node* +node_new_call(UChar* name, UChar* name_end, int gnum) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_CALL); + NCALL(node)->state = 0; + NCALL(node)->target = NULL_NODE; + NCALL(node)->name = name; + NCALL(node)->name_end = name_end; + NCALL(node)->group_num = gnum; /* call by number if gnum != 0 */ + return node; +} +#endif + +static Node* +node_new_quantifier(int lower, int upper, int by_number) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_QTFR); + NQTFR(node)->state = 0; + NQTFR(node)->target = NULL; + NQTFR(node)->lower = lower; + NQTFR(node)->upper = upper; + NQTFR(node)->greedy = 1; + NQTFR(node)->target_empty_info = NQ_TARGET_ISNOT_EMPTY; + NQTFR(node)->head_exact = NULL_NODE; + NQTFR(node)->next_head_exact = NULL_NODE; + NQTFR(node)->is_refered = 0; + if (by_number != 0) + NQTFR(node)->state |= NST_BY_NUMBER; + +#ifdef USE_COMBINATION_EXPLOSION_CHECK + NQTFR(node)->comb_exp_check_num = 0; +#endif + + return node; +} + +static Node* +node_new_enclose(int type) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_ENCLOSE); + NENCLOSE(node)->type = type; + NENCLOSE(node)->state = 0; + NENCLOSE(node)->regnum = 0; + NENCLOSE(node)->option = 0; + NENCLOSE(node)->target = NULL; + NENCLOSE(node)->call_addr = -1; + NENCLOSE(node)->opt_count = 0; + return node; +} + +extern Node* +onig_node_new_enclose(int type) +{ + return node_new_enclose(type); +} + +static Node* +node_new_enclose_memory(OnigOptionType option, int is_named) +{ + Node* node = node_new_enclose(ENCLOSE_MEMORY); + CHECK_NULL_RETURN(node); + if (is_named != 0) + SET_ENCLOSE_STATUS(node, NST_NAMED_GROUP); + +#ifdef USE_SUBEXP_CALL + NENCLOSE(node)->option = option; +#endif + return node; +} + +static Node* +node_new_option(OnigOptionType option) +{ + Node* node = node_new_enclose(ENCLOSE_OPTION); + CHECK_NULL_RETURN(node); + NENCLOSE(node)->option = option; + return node; +} + +extern int +onig_node_str_cat(Node* node, const UChar* s, const UChar* end) +{ + int addlen = end - s; + + if (addlen > 0) { + int len = NSTR(node)->end - NSTR(node)->s; + + if (NSTR(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) { + UChar* p; + int capa = len + addlen + NODE_STR_MARGIN; + + if (capa <= NSTR(node)->capa) { + onig_strcpy(NSTR(node)->s + len, s, end); + } + else { + if (NSTR(node)->s == NSTR(node)->buf) + p = strcat_capa_from_static(NSTR(node)->s, NSTR(node)->end, + s, end, capa); + else + p = strcat_capa(NSTR(node)->s, NSTR(node)->end, s, end, capa); + + CHECK_NULL_RETURN_MEMERR(p); + NSTR(node)->s = p; + NSTR(node)->capa = capa; + } + } + else { + onig_strcpy(NSTR(node)->s + len, s, end); + } + NSTR(node)->end = NSTR(node)->s + len + addlen; + } + + return 0; +} + +extern int +onig_node_str_set(Node* node, const UChar* s, const UChar* end) +{ + onig_node_str_clear(node); + return onig_node_str_cat(node, s, end); +} + +static int +node_str_cat_char(Node* node, UChar c) +{ + UChar s[1]; + + s[0] = c; + return onig_node_str_cat(node, s, s + 1); +} + +extern void +onig_node_conv_to_str_node(Node* node, int flag) +{ + SET_NTYPE(node, NT_STR); + NSTR(node)->flag = flag; + NSTR(node)->capa = 0; + NSTR(node)->s = NSTR(node)->buf; + NSTR(node)->end = NSTR(node)->buf; +} + +extern void +onig_node_str_clear(Node* node) +{ + if (NSTR(node)->capa != 0 && + IS_NOT_NULL(NSTR(node)->s) && NSTR(node)->s != NSTR(node)->buf) { + xfree(NSTR(node)->s); + } + + NSTR(node)->capa = 0; + NSTR(node)->flag = 0; + NSTR(node)->s = NSTR(node)->buf; + NSTR(node)->end = NSTR(node)->buf; +} + +static Node* +node_new_str(const UChar* s, const UChar* end) +{ + Node* node = node_new(); + CHECK_NULL_RETURN(node); + + SET_NTYPE(node, NT_STR); + NSTR(node)->capa = 0; + NSTR(node)->flag = 0; + NSTR(node)->s = NSTR(node)->buf; + NSTR(node)->end = NSTR(node)->buf; + if (onig_node_str_cat(node, s, end)) { + onig_node_free(node); + return NULL; + } + return node; +} + +extern Node* +onig_node_new_str(const UChar* s, const UChar* end) +{ + return node_new_str(s, end); +} + +static Node* +node_new_str_raw(UChar* s, UChar* end) +{ + Node* node = node_new_str(s, end); + NSTRING_SET_RAW(node); + return node; +} + +static Node* +node_new_empty(void) +{ + return node_new_str(NULL, NULL); +} + +static Node* +node_new_str_raw_char(UChar c) +{ + UChar p[1]; + + p[0] = c; + return node_new_str_raw(p, p + 1); +} + +static Node* +str_node_split_last_char(StrNode* sn, OnigEncoding enc) +{ + const UChar *p; + Node* n = NULL_NODE; + + if (sn->end > sn->s) { + p = onigenc_get_prev_char_head(enc, sn->s, sn->end, sn->end); + if (p && p > sn->s) { /* can be splitted. */ + n = node_new_str(p, sn->end); + if ((sn->flag & NSTR_RAW) != 0) + NSTRING_SET_RAW(n); + sn->end = (UChar* )p; + } + } + return n; +} + +static int +str_node_can_be_split(StrNode* sn, OnigEncoding enc) +{ + if (sn->end > sn->s) { + return ((enclen(enc, sn->s, sn->end) < sn->end - sn->s) ? 1 : 0); + } + return 0; +} + +#ifdef USE_PAD_TO_SHORT_BYTE_CHAR +static int +node_str_head_pad(StrNode* sn, int num, UChar val) +{ + UChar buf[NODE_STR_BUF_SIZE]; + int i, len; + + len = sn->end - sn->s; + onig_strcpy(buf, sn->s, sn->end); + onig_strcpy(&(sn->s[num]), buf, buf + len); + sn->end += num; + + for (i = 0; i < num; i++) { + sn->s[i] = val; + } +} +#endif + +extern int +onig_scan_unsigned_number(UChar** src, const UChar* end, OnigEncoding enc) +{ + unsigned int num, val; + OnigCodePoint c; + UChar* p = *src; + PFETCH_READY; + + num = 0; + while (!PEND) { + PFETCH(c); + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + val = (unsigned int )DIGITVAL(c); + if ((INT_MAX_LIMIT - val) / 10UL < num) + return -1; /* overflow */ + + num = num * 10 + val; + } + else { + PUNFETCH; + break; + } + } + *src = p; + return num; +} + +static int +scan_unsigned_hexadecimal_number(UChar** src, UChar* end, int maxlen, + OnigEncoding enc) +{ + OnigCodePoint c; + unsigned int num, val; + UChar* p = *src; + PFETCH_READY; + + num = 0; + while (!PEND && maxlen-- != 0) { + PFETCH(c); + if (ONIGENC_IS_CODE_XDIGIT(enc, c)) { + val = (unsigned int )XDIGITVAL(enc,c); + if ((INT_MAX_LIMIT - val) / 16UL < num) + return -1; /* overflow */ + + num = (num << 4) + XDIGITVAL(enc,c); + } + else { + PUNFETCH; + break; + } + } + *src = p; + return num; +} + +static int +scan_unsigned_octal_number(UChar** src, UChar* end, int maxlen, + OnigEncoding enc) +{ + OnigCodePoint c; + unsigned int num, val; + UChar* p = *src; + PFETCH_READY; + + num = 0; + while (!PEND && maxlen-- != 0) { + PFETCH(c); + if (ONIGENC_IS_CODE_DIGIT(enc, c) && c < '8') { + val = ODIGITVAL(c); + if ((INT_MAX_LIMIT - val) / 8UL < num) + return -1; /* overflow */ + + num = (num << 3) + val; + } + else { + PUNFETCH; + break; + } + } + *src = p; + return num; +} + + +#define BBUF_WRITE_CODE_POINT(bbuf,pos,code) \ + BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) + +/* data format: + [n][from-1][to-1][from-2][to-2] ... [from-n][to-n] + (all data size is OnigCodePoint) + */ +static int +new_code_range(BBuf** pbuf) +{ +#define INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) + int r; + OnigCodePoint n; + BBuf* bbuf; + + bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf)); + CHECK_NULL_RETURN_MEMERR(*pbuf); + r = BBUF_INIT(*pbuf, INIT_MULTI_BYTE_RANGE_SIZE); + if (r) return r; + + n = 0; + BBUF_WRITE_CODE_POINT(bbuf, 0, n); + return 0; +} + +static int +add_code_range_to_buf(BBuf** pbuf, OnigCodePoint from, OnigCodePoint to) +{ + int r, inc_n, pos; + int low, high, bound, x; + OnigCodePoint n, *data; + BBuf* bbuf; + + if (from > to) { + n = from; from = to; to = n; + } + + if (IS_NULL(*pbuf)) { + r = new_code_range(pbuf); + if (r) return r; + bbuf = *pbuf; + n = 0; + } + else { + bbuf = *pbuf; + GET_CODE_POINT(n, bbuf->p); + } + data = (OnigCodePoint* )(bbuf->p); + data++; + + for (low = 0, bound = n; low < bound; ) { + x = (low + bound) >> 1; + if (from > data[x*2 + 1]) + low = x + 1; + else + bound = x; + } + + for (high = low, bound = n; high < bound; ) { + x = (high + bound) >> 1; + if (to >= data[x*2] - 1) + high = x + 1; + else + bound = x; + } + + inc_n = low + 1 - high; + if (n + inc_n > ONIG_MAX_MULTI_BYTE_RANGES_NUM) + return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES; + + if (inc_n != 1) { + if (from > data[low*2]) + from = data[low*2]; + if (to < data[(high - 1)*2 + 1]) + to = data[(high - 1)*2 + 1]; + } + + if (inc_n != 0 && (OnigCodePoint )high < n) { + int from_pos = SIZE_CODE_POINT * (1 + high * 2); + int to_pos = SIZE_CODE_POINT * (1 + (low + 1) * 2); + int size = (n - high) * 2 * SIZE_CODE_POINT; + + if (inc_n > 0) { + BBUF_MOVE_RIGHT(bbuf, from_pos, to_pos, size); + } + else { + BBUF_MOVE_LEFT_REDUCE(bbuf, from_pos, to_pos); + } + } + + pos = SIZE_CODE_POINT * (1 + low * 2); + BBUF_ENSURE_SIZE(bbuf, pos + SIZE_CODE_POINT * 2); + BBUF_WRITE_CODE_POINT(bbuf, pos, from); + BBUF_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to); + n += inc_n; + BBUF_WRITE_CODE_POINT(bbuf, 0, n); + + return 0; +} + +static int +add_code_range(BBuf** pbuf, ScanEnv* env, OnigCodePoint from, OnigCodePoint to) +{ + if (from > to) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + return 0; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + + return add_code_range_to_buf(pbuf, from, to); +} + +static int +not_code_range_buf(OnigEncoding enc, BBuf* bbuf, BBuf** pbuf) +{ + int r, i, n; + OnigCodePoint pre, from, *data, to = 0; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf)) { + set_all: + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + } + + data = (OnigCodePoint* )(bbuf->p); + GET_CODE_POINT(n, data); + data++; + if (n <= 0) goto set_all; + + r = 0; + pre = MBCODE_START_POS(enc); + for (i = 0; i < n; i++) { + from = data[i*2]; + to = data[i*2+1]; + if (pre <= from - 1) { + r = add_code_range_to_buf(pbuf, pre, from - 1); + if (r != 0) return r; + } + if (to == ~((OnigCodePoint )0)) break; + pre = to + 1; + } + if (to < ~((OnigCodePoint )0)) { + r = add_code_range_to_buf(pbuf, to + 1, ~((OnigCodePoint )0)); + } + return r; +} + +#define SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) do {\ + BBuf *tbuf; \ + int tnot; \ + tnot = not1; not1 = not2; not2 = tnot; \ + tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \ +} while (0) + +static int +or_code_range_buf(OnigEncoding enc, BBuf* bbuf1, int not1, + BBuf* bbuf2, int not2, BBuf** pbuf) +{ + int r; + OnigCodePoint i, n1, *data1; + OnigCodePoint from, to; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) { + if (not1 != 0 || not2 != 0) + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + return 0; + } + + r = 0; + if (IS_NULL(bbuf2)) + SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2); + + if (IS_NULL(bbuf1)) { + if (not1 != 0) { + return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf); + } + else { + if (not2 == 0) { + return bbuf_clone(pbuf, bbuf2); + } + else { + return not_code_range_buf(enc, bbuf2, pbuf); + } + } + } + + if (not1 != 0) + SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2); + + data1 = (OnigCodePoint* )(bbuf1->p); + GET_CODE_POINT(n1, data1); + data1++; + + if (not2 == 0 && not1 == 0) { /* 1 OR 2 */ + r = bbuf_clone(pbuf, bbuf2); + } + else if (not1 == 0) { /* 1 OR (not 2) */ + r = not_code_range_buf(enc, bbuf2, pbuf); + } + if (r != 0) return r; + + for (i = 0; i < n1; i++) { + from = data1[i*2]; + to = data1[i*2+1]; + r = add_code_range_to_buf(pbuf, from, to); + if (r != 0) return r; + } + return 0; +} + +static int +and_code_range1(BBuf** pbuf, OnigCodePoint from1, OnigCodePoint to1, + OnigCodePoint* data, int n) +{ + int i, r; + OnigCodePoint from2, to2; + + for (i = 0; i < n; i++) { + from2 = data[i*2]; + to2 = data[i*2+1]; + if (from2 < from1) { + if (to2 < from1) continue; + else { + from1 = to2 + 1; + } + } + else if (from2 <= to1) { + if (to2 < to1) { + if (from1 <= from2 - 1) { + r = add_code_range_to_buf(pbuf, from1, from2-1); + if (r != 0) return r; + } + from1 = to2 + 1; + } + else { + to1 = from2 - 1; + } + } + else { + from1 = from2; + } + if (from1 > to1) break; + } + if (from1 <= to1) { + r = add_code_range_to_buf(pbuf, from1, to1); + if (r != 0) return r; + } + return 0; +} + +static int +and_code_range_buf(BBuf* bbuf1, int not1, BBuf* bbuf2, int not2, BBuf** pbuf) +{ + int r; + OnigCodePoint i, j, n1, n2, *data1, *data2; + OnigCodePoint from, to, from1, to1, from2, to2; + + *pbuf = (BBuf* )NULL; + if (IS_NULL(bbuf1)) { + if (not1 != 0 && IS_NOT_NULL(bbuf2)) /* not1 != 0 -> not2 == 0 */ + return bbuf_clone(pbuf, bbuf2); + return 0; + } + else if (IS_NULL(bbuf2)) { + if (not2 != 0) + return bbuf_clone(pbuf, bbuf1); + return 0; + } + + if (not1 != 0) + SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2); + + data1 = (OnigCodePoint* )(bbuf1->p); + data2 = (OnigCodePoint* )(bbuf2->p); + GET_CODE_POINT(n1, data1); + GET_CODE_POINT(n2, data2); + data1++; + data2++; + + if (not2 == 0 && not1 == 0) { /* 1 AND 2 */ + for (i = 0; i < n1; i++) { + from1 = data1[i*2]; + to1 = data1[i*2+1]; + for (j = 0; j < n2; j++) { + from2 = data2[j*2]; + to2 = data2[j*2+1]; + if (from2 > to1) break; + if (to2 < from1) continue; + from = MAX(from1, from2); + to = MIN(to1, to2); + r = add_code_range_to_buf(pbuf, from, to); + if (r != 0) return r; + } + } + } + else if (not1 == 0) { /* 1 AND (not 2) */ + for (i = 0; i < n1; i++) { + from1 = data1[i*2]; + to1 = data1[i*2+1]; + r = and_code_range1(pbuf, from1, to1, data2, n2); + if (r != 0) return r; + } + } + + return 0; +} + +static int +and_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc) +{ + int r, not1, not2; + BBuf *buf1, *buf2, *pbuf; + BitSetRef bsr1, bsr2; + BitSet bs1, bs2; + + not1 = IS_NCCLASS_NOT(dest); + bsr1 = dest->bs; + buf1 = dest->mbuf; + not2 = IS_NCCLASS_NOT(cc); + bsr2 = cc->bs; + buf2 = cc->mbuf; + + if (not1 != 0) { + bitset_invert_to(bsr1, bs1); + bsr1 = bs1; + } + if (not2 != 0) { + bitset_invert_to(bsr2, bs2); + bsr2 = bs2; + } + bitset_and(bsr1, bsr2); + if (bsr1 != dest->bs) { + bitset_copy(dest->bs, bsr1); + bsr1 = dest->bs; + } + if (not1 != 0) { + bitset_invert(dest->bs); + } + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + if (not1 != 0 && not2 != 0) { + r = or_code_range_buf(enc, buf1, 0, buf2, 0, &pbuf); + } + else { + r = and_code_range_buf(buf1, not1, buf2, not2, &pbuf); + if (r == 0 && not1 != 0) { + BBuf *tbuf; + r = not_code_range_buf(enc, pbuf, &tbuf); + if (r != 0) { + bbuf_free(pbuf); + return r; + } + bbuf_free(pbuf); + pbuf = tbuf; + } + } + if (r != 0) return r; + + dest->mbuf = pbuf; + bbuf_free(buf1); + return r; + } + return 0; +} + +static int +or_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc) +{ + int r, not1, not2; + BBuf *buf1, *buf2, *pbuf; + BitSetRef bsr1, bsr2; + BitSet bs1, bs2; + + not1 = IS_NCCLASS_NOT(dest); + bsr1 = dest->bs; + buf1 = dest->mbuf; + not2 = IS_NCCLASS_NOT(cc); + bsr2 = cc->bs; + buf2 = cc->mbuf; + + if (not1 != 0) { + bitset_invert_to(bsr1, bs1); + bsr1 = bs1; + } + if (not2 != 0) { + bitset_invert_to(bsr2, bs2); + bsr2 = bs2; + } + bitset_or(bsr1, bsr2); + if (bsr1 != dest->bs) { + bitset_copy(dest->bs, bsr1); + bsr1 = dest->bs; + } + if (not1 != 0) { + bitset_invert(dest->bs); + } + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + if (not1 != 0 && not2 != 0) { + r = and_code_range_buf(buf1, 0, buf2, 0, &pbuf); + } + else { + r = or_code_range_buf(enc, buf1, not1, buf2, not2, &pbuf); + if (r == 0 && not1 != 0) { + BBuf *tbuf; + r = not_code_range_buf(enc, pbuf, &tbuf); + if (r != 0) { + bbuf_free(pbuf); + return r; + } + bbuf_free(pbuf); + pbuf = tbuf; + } + } + if (r != 0) return r; + + dest->mbuf = pbuf; + bbuf_free(buf1); + return r; + } + else + return 0; +} + +static int +conv_backslash_value(int c, ScanEnv* env) +{ + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) { + switch (c) { + case 'n': return '\n'; + case 't': return '\t'; + case 'r': return '\r'; + case 'f': return '\f'; + case 'a': return '\007'; + case 'b': return '\010'; + case 'e': return '\033'; + case 'v': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB)) + return '\v'; + break; + + default: + break; + } + } + return c; +} + +#if 0 /* no invalid quantifier */ +static int +is_invalid_quantifier_target(Node* node) +{ + switch (NTYPE(node)) { + case NT_ANCHOR: + return 1; + break; + + case NT_ENCLOSE: + /* allow enclosed elements */ + /* return is_invalid_quantifier_target(NENCLOSE(node)->target); */ + break; + + case NT_LIST: + do { + if (! is_invalid_quantifier_target(NCAR(node))) return 0; + } while (IS_NOT_NULL(node = NCDR(node))); + return 0; + break; + + case NT_ALT: + do { + if (is_invalid_quantifier_target(NCAR(node))) return 1; + } while (IS_NOT_NULL(node = NCDR(node))); + break; + + default: + break; + } + return 0; +} +#else +#define is_invalid_quantifier_target(node) 0 +#endif + +/* ?:0, *:1, +:2, ??:3, *?:4, +?:5 */ +static int +popular_quantifier_num(QtfrNode* q) +{ + if (q->greedy) { + if (q->lower == 0) { + if (q->upper == 1) return 0; + else if (IS_REPEAT_INFINITE(q->upper)) return 1; + } + else if (q->lower == 1) { + if (IS_REPEAT_INFINITE(q->upper)) return 2; + } + } + else { + if (q->lower == 0) { + if (q->upper == 1) return 3; + else if (IS_REPEAT_INFINITE(q->upper)) return 4; + } + else if (q->lower == 1) { + if (IS_REPEAT_INFINITE(q->upper)) return 5; + } + } + return -1; +} + + +enum ReduceType { + RQ_ASIS = 0, /* as is */ + RQ_DEL = 1, /* delete parent */ + RQ_A, /* to '*' */ + RQ_AQ, /* to '*?' */ + RQ_QQ, /* to '??' */ + RQ_P_QQ, /* to '+)??' */ + RQ_PQ_Q /* to '+?)?' */ +}; + +static enum ReduceType const ReduceTypeTable[6][6] = { + {RQ_DEL, RQ_A, RQ_A, RQ_QQ, RQ_AQ, RQ_ASIS}, /* '?' */ + {RQ_DEL, RQ_DEL, RQ_DEL, RQ_P_QQ, RQ_P_QQ, RQ_DEL}, /* '*' */ + {RQ_A, RQ_A, RQ_DEL, RQ_ASIS, RQ_P_QQ, RQ_DEL}, /* '+' */ + {RQ_DEL, RQ_AQ, RQ_AQ, RQ_DEL, RQ_AQ, RQ_AQ}, /* '??' */ + {RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL}, /* '*?' */ + {RQ_ASIS, RQ_PQ_Q, RQ_DEL, RQ_AQ, RQ_AQ, RQ_DEL} /* '+?' */ +}; + +extern void +onig_reduce_nested_quantifier(Node* pnode, Node* cnode) +{ + int pnum, cnum; + QtfrNode *p, *c; + + p = NQTFR(pnode); + c = NQTFR(cnode); + pnum = popular_quantifier_num(p); + cnum = popular_quantifier_num(c); + if (pnum < 0 || cnum < 0) return ; + + switch(ReduceTypeTable[cnum][pnum]) { + case RQ_DEL: + *pnode = *cnode; + break; + case RQ_A: + p->target = c->target; + p->lower = 0; p->upper = REPEAT_INFINITE; p->greedy = 1; + break; + case RQ_AQ: + p->target = c->target; + p->lower = 0; p->upper = REPEAT_INFINITE; p->greedy = 0; + break; + case RQ_QQ: + p->target = c->target; + p->lower = 0; p->upper = 1; p->greedy = 0; + break; + case RQ_P_QQ: + p->target = cnode; + p->lower = 0; p->upper = 1; p->greedy = 0; + c->lower = 1; c->upper = REPEAT_INFINITE; c->greedy = 1; + return ; + break; + case RQ_PQ_Q: + p->target = cnode; + p->lower = 0; p->upper = 1; p->greedy = 1; + c->lower = 1; c->upper = REPEAT_INFINITE; c->greedy = 0; + return ; + break; + case RQ_ASIS: + p->target = cnode; + return ; + break; + } + + c->target = NULL_NODE; + onig_node_free(cnode); +} + + +enum TokenSyms { + TK_EOT = 0, /* end of token */ + TK_RAW_BYTE = 1, + TK_CHAR, + TK_STRING, + TK_CODE_POINT, + TK_ANYCHAR, + TK_CHAR_TYPE, + TK_BACKREF, + TK_CALL, + TK_ANCHOR, + TK_OP_REPEAT, + TK_INTERVAL, + TK_ANYCHAR_ANYTIME, /* SQL '%' == .* */ + TK_ALT, + TK_SUBEXP_OPEN, + TK_SUBEXP_CLOSE, + TK_CC_OPEN, + TK_QUOTE_OPEN, + TK_CHAR_PROPERTY, /* \p{...}, \P{...} */ + /* in cc */ + TK_CC_CLOSE, + TK_CC_RANGE, + TK_POSIX_BRACKET_OPEN, + TK_CC_AND, /* && */ + TK_CC_CC_OPEN /* [ */ +}; + +typedef struct { + enum TokenSyms type; + int escaped; + int base; /* is number: 8, 16 (used in [....]) */ + UChar* backp; + union { + UChar* s; + int c; + OnigCodePoint code; + int anchor; + int subtype; + struct { + int lower; + int upper; + int greedy; + int possessive; + } repeat; + struct { + int num; + int ref1; + int* refs; + int by_name; +#ifdef USE_BACKREF_WITH_LEVEL + int exist_level; + int level; /* \k */ +#endif + } backref; + struct { + UChar* name; + UChar* name_end; + int gnum; + } call; + struct { + int ctype; + int not; + } prop; + } u; +} OnigToken; + + +static int +fetch_range_quantifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env) +{ + int low, up, syn_allow, non_low = 0; + int r = 0; + OnigCodePoint c; + OnigEncoding enc = env->enc; + UChar* p = *src; + PFETCH_READY; + + syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL); + + if (PEND) { + if (syn_allow) + return 1; /* "....{" : OK! */ + else + return ONIGERR_END_PATTERN_AT_LEFT_BRACE; /* "....{" syntax error */ + } + + if (! syn_allow) { + c = PPEEK; + if (c == ')' || c == '(' || c == '|') { + return ONIGERR_END_PATTERN_AT_LEFT_BRACE; + } + } + + low = onig_scan_unsigned_number(&p, end, env->enc); + if (low < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + if (low > ONIG_MAX_REPEAT_NUM) + return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + if (p == *src) { /* can't read low */ + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV)) { + /* allow {,n} as {0,n} */ + low = 0; + non_low = 1; + } + else + goto invalid; + } + + if (PEND) goto invalid; + PFETCH(c); + if (c == ',') { + UChar* prev = p; + up = onig_scan_unsigned_number(&p, end, env->enc); + if (up < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + if (up > ONIG_MAX_REPEAT_NUM) + return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE; + + if (p == prev) { + if (non_low != 0) + goto invalid; + up = REPEAT_INFINITE; /* {n,} : {n,infinite} */ + } + } + else { + if (non_low != 0) + goto invalid; + + PUNFETCH; + up = low; /* {n} : exact n times */ + r = 2; /* fixed */ + } + + if (PEND) goto invalid; + PFETCH(c); + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) { + if (c != MC_ESC(env->syntax)) goto invalid; + PFETCH(c); + } + if (c != '}') goto invalid; + + if (!IS_REPEAT_INFINITE(up) && low > up) { + return ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE; + } + + tok->type = TK_INTERVAL; + tok->u.repeat.lower = low; + tok->u.repeat.upper = up; + *src = p; + return r; /* 0: normal {n,m}, 2: fixed {n} */ + + invalid: + if (syn_allow) + return 1; /* OK */ + else + return ONIGERR_INVALID_REPEAT_RANGE_PATTERN; +} + +/* \M-, \C-, \c, or \... */ +static int +fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env) +{ + int v; + OnigCodePoint c; + OnigEncoding enc = env->enc; + UChar* p = *src; + PFETCH_READY; + + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + PFETCH(c); + switch (c) { + case 'M': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) { + if (PEND) return ONIGERR_END_PATTERN_AT_META; + PFETCH(c); + if (c != '-') return ONIGERR_META_CODE_SYNTAX; + if (PEND) return ONIGERR_END_PATTERN_AT_META; + PFETCH(c); + if (c == MC_ESC(env->syntax)) { + v = fetch_escaped_value(&p, end, env); + if (v < 0) return v; + c = (OnigCodePoint )v; + } + c = ((c & 0xff) | 0x80); + } + else + goto backslash; + break; + + case 'C': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) { + if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; + PFETCH(c); + if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX; + goto control; + } + else + goto backslash; + + case 'c': + if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) { + control: + if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; + PFETCH(c); + if (c == '?') { + c = 0177; + } + else { + if (c == MC_ESC(env->syntax)) { + v = fetch_escaped_value(&p, end, env); + if (v < 0) return v; + c = (OnigCodePoint )v; + } + c &= 0x9f; + } + break; + } + /* fall through */ + + default: + { + backslash: + c = conv_backslash_value(c, env); + } + break; + } + + *src = p; + return c; +} + +static int fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env); + +static OnigCodePoint +get_name_end_code_point(OnigCodePoint start) +{ + switch (start) { + case '<': return (OnigCodePoint )'>'; break; + case '\'': return (OnigCodePoint )'\''; break; + default: + break; + } + + return (OnigCodePoint )0; +} + +#ifdef USE_NAMED_GROUP +#ifdef USE_BACKREF_WITH_LEVEL +/* + \k, \k + \k, \k + \k<-num+n>, \k<-num-n> +*/ +static int +fetch_name_with_level(OnigCodePoint start_code, UChar** src, UChar* end, + UChar** rname_end, ScanEnv* env, + int* rback_num, int* rlevel) +{ + int r, sign, is_num, exist_level; + OnigCodePoint end_code; + OnigCodePoint c = 0; + OnigEncoding enc = env->enc; + UChar *name_end; + UChar *pnum_head; + UChar *p = *src; + PFETCH_READY; + + *rback_num = 0; + is_num = exist_level = 0; + sign = 1; + pnum_head = *src; + + end_code = get_name_end_code_point(start_code); + + name_end = end; + r = 0; + if (PEND) { + return ONIGERR_EMPTY_GROUP_NAME; + } + else { + PFETCH(c); + if (c == end_code) + return ONIGERR_EMPTY_GROUP_NAME; + + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + is_num = 1; + } + else if (c == '-') { + is_num = 2; + sign = -1; + pnum_head = p; + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + while (!PEND) { + name_end = p; + PFETCH(c); + if (c == end_code || c == ')' || c == '+' || c == '-') { + if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME; + break; + } + + if (is_num != 0) { + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + is_num = 1; + } + else { + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; + } + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + if (r == 0 && c != end_code) { + if (c == '+' || c == '-') { + int level; + int flag = (c == '-' ? -1 : 1); + + PFETCH(c); + if (! ONIGENC_IS_CODE_DIGIT(enc, c)) goto err; + PUNFETCH; + level = onig_scan_unsigned_number(&p, end, enc); + if (level < 0) return ONIGERR_TOO_BIG_NUMBER; + *rlevel = (level * flag); + exist_level = 1; + + PFETCH(c); + if (c == end_code) + goto end; + } + + err: + r = ONIGERR_INVALID_GROUP_NAME; + name_end = end; + } + + end: + if (r == 0) { + if (is_num != 0) { + *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc); + if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; + else if (*rback_num == 0) goto err; + + *rback_num *= sign; + } + + *rname_end = name_end; + *src = p; + return (exist_level ? 1 : 0); + } + else { + onig_scan_env_set_error_string(env, r, *src, name_end); + return r; + } +} +#endif /* USE_BACKREF_WITH_LEVEL */ + +/* + def: 0 -> define name (don't allow number name) + 1 -> reference name (allow number name) +*/ +static int +fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, + UChar** rname_end, ScanEnv* env, int* rback_num, int ref) +{ + int r, is_num, sign; + OnigCodePoint end_code; + OnigCodePoint c = 0; + OnigEncoding enc = env->enc; + UChar *name_end; + UChar *pnum_head; + UChar *p = *src; + PFETCH_READY; + + *rback_num = 0; + + end_code = get_name_end_code_point(start_code); + + name_end = end; + pnum_head = *src; + r = 0; + is_num = 0; + sign = 1; + if (PEND) { + return ONIGERR_EMPTY_GROUP_NAME; + } + else { + PFETCH(c); + if (c == end_code) + return ONIGERR_EMPTY_GROUP_NAME; + + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + if (ref == 1) + is_num = 1; + else { + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; + } + } + else if (c == '-') { + if (ref == 1) { + is_num = 2; + sign = -1; + pnum_head = p; + } + else { + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; + } + } + else if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + if (r == 0) { + while (!PEND) { + name_end = p; + PFETCH(c); + if (c == end_code || c == ')') { + if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME; + break; + } + + if (is_num != 0) { + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + is_num = 1; + } + else { + if (!ONIGENC_IS_CODE_WORD(enc, c)) + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + else + r = ONIGERR_INVALID_GROUP_NAME; + + is_num = 0; + } + } + else { + if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + } + + if (c != end_code) { + r = ONIGERR_INVALID_GROUP_NAME; + name_end = end; + } + + if (is_num != 0) { + *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc); + if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; + else if (*rback_num == 0) { + r = ONIGERR_INVALID_GROUP_NAME; + goto err; + } + + *rback_num *= sign; + } + + *rname_end = name_end; + *src = p; + return 0; + } + else { + while (!PEND) { + name_end = p; + PFETCH(c); + if (c == end_code || c == ')') + break; + } + if (PEND) + name_end = end; + + err: + onig_scan_env_set_error_string(env, r, *src, name_end); + return r; + } +} +#else +static int +fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, + UChar** rname_end, ScanEnv* env, int* rback_num, int ref) +{ + int r, is_num, sign; + OnigCodePoint end_code; + OnigCodePoint c = 0; + UChar *name_end; + OnigEncoding enc = env->enc; + UChar *pnum_head; + UChar *p = *src; + PFETCH_READY; + + *rback_num = 0; + + end_code = get_name_end_code_point(start_code); + + *rname_end = name_end = end; + r = 0; + pnum_head = *src; + is_num = 0; + sign = 1; + + if (PEND) { + return ONIGERR_EMPTY_GROUP_NAME; + } + else { + PFETCH(c); + if (c == end_code) + return ONIGERR_EMPTY_GROUP_NAME; + + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + is_num = 1; + } + else if (c == '-') { + is_num = 2; + sign = -1; + pnum_head = p; + } + else { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + } + + while (!PEND) { + name_end = p; + + PFETCH(c); + if (c == end_code || c == ')') break; + if (! ONIGENC_IS_CODE_DIGIT(enc, c)) + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } + if (r == 0 && c != end_code) { + r = ONIGERR_INVALID_GROUP_NAME; + name_end = end; + } + + if (r == 0) { + *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc); + if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; + else if (*rback_num == 0) { + r = ONIGERR_INVALID_GROUP_NAME; + goto err; + } + *rback_num *= sign; + + *rname_end = name_end; + *src = p; + return 0; + } + else { + err: + onig_scan_env_set_error_string(env, r, *src, name_end); + return r; + } +} +#endif /* USE_NAMED_GROUP */ + +static void +CC_ESC_WARN(ScanEnv* env, UChar *c) +{ + if (onig_warn == onig_null_warn) return ; + + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) { + UChar buf[WARN_BUFSIZE]; + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + (UChar* )"character class has '%s' without escape", c); + (*onig_warn)((char* )buf); + } +} + +static void +CLOSE_BRACKET_WITHOUT_ESC_WARN(ScanEnv* env, UChar* c) +{ + if (onig_warn == onig_null_warn) return ; + + if (IS_SYNTAX_BV((env)->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED)) { + UChar buf[WARN_BUFSIZE]; + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, (env)->enc, + (env)->pattern, (env)->pattern_end, + (UChar* )"regular expression has '%s' without escape", c); + (*onig_warn)((char* )buf); + } +} + +static UChar* +find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to, + UChar **next, OnigEncoding enc) +{ + int i; + OnigCodePoint x; + UChar *q; + UChar *p = from; + + while (p < to) { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + q = p + enclen(enc, p, to); + if (x == s[0]) { + for (i = 1; i < n && q < to; i++) { + x = ONIGENC_MBC_TO_CODE(enc, q, to); + if (x != s[i]) break; + q += enclen(enc, q, to); + } + if (i >= n) { + if (IS_NOT_NULL(next)) + *next = q; + return p; + } + } + p = q; + } + return NULL_UCHARP; +} + +static int +str_exist_check_with_esc(OnigCodePoint s[], int n, UChar* from, UChar* to, + OnigCodePoint bad, OnigEncoding enc, const OnigSyntaxType* syn) +{ + int i, in_esc; + OnigCodePoint x; + UChar *q; + UChar *p = from; + + in_esc = 0; + while (p < to) { + if (in_esc) { + in_esc = 0; + p += enclen(enc, p, to); + } + else { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + q = p + enclen(enc, p, to); + if (x == s[0]) { + for (i = 1; i < n && q < to; i++) { + x = ONIGENC_MBC_TO_CODE(enc, q, to); + if (x != s[i]) break; + q += enclen(enc, q, to); + } + if (i >= n) return 1; + p += enclen(enc, p, to); + } + else { + x = ONIGENC_MBC_TO_CODE(enc, p, to); + if (x == bad) return 0; + else if (x == MC_ESC(syn)) in_esc = 1; + p = q; + } + } + } + return 0; +} + +static int +fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) +{ + int num; + OnigCodePoint c, c2; + const OnigSyntaxType* syn = env->syntax; + OnigEncoding enc = env->enc; + UChar* prev; + UChar* p = *src; + PFETCH_READY; + + if (PEND) { + tok->type = TK_EOT; + return tok->type; + } + + PFETCH(c); + tok->type = TK_CHAR; + tok->base = 0; + tok->u.c = c; + tok->escaped = 0; + + if (c == ']') { + tok->type = TK_CC_CLOSE; + } + else if (c == '-') { + tok->type = TK_CC_RANGE; + } + else if (c == MC_ESC(syn)) { + if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) + goto end; + + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + PFETCH(c); + tok->escaped = 1; + tok->u.c = c; + switch (c) { + case 'w': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 0; + break; + case 'W': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 1; + break; + case 'd': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 0; + break; + case 'D': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 1; + break; + case 's': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 0; + break; + case 'S': + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 1; + break; + case 'h': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 0; + break; + case 'H': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 1; + break; + + case 'p': + case 'P': + c2 = PPEEK; + if (c2 == '{' && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) { + PINC; + tok->type = TK_CHAR_PROPERTY; + tok->u.prop.not = (c == 'P' ? 1 : 0); + + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) { + PFETCH(c2); + if (c2 == '^') { + tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0); + } + else + PUNFETCH; + } + } + break; + + case 'x': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) { + PINC; + num = scan_unsigned_hexadecimal_number(&p, end, 8, enc); + if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE; + if (!PEND) { + c2 = PPEEK; + if (ONIGENC_IS_CODE_XDIGIT(enc, c2)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + if (p > prev + enclen(enc, prev, end) && !PEND && (PPEEK_IS('}'))) { + PINC; + tok->type = TK_CODE_POINT; + tok->base = 16; + tok->u.code = (OnigCodePoint )num; + } + else { + /* can't read nothing or invalid format */ + p = prev; + } + } + else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) { + num = scan_unsigned_hexadecimal_number(&p, end, 2, enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_RAW_BYTE; + tok->base = 16; + tok->u.c = num; + } + break; + + case 'u': + if (PEND) break; + + prev = p; + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) { + num = scan_unsigned_hexadecimal_number(&p, end, 4, enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_CODE_POINT; + tok->base = 16; + tok->u.code = (OnigCodePoint )num; + } + break; + + case '0': + case '1': case '2': case '3': case '4': case '5': case '6': case '7': + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { + PUNFETCH; + prev = p; + num = scan_unsigned_octal_number(&p, end, 3, enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_RAW_BYTE; + tok->base = 8; + tok->u.c = num; + } + break; + + default: + PUNFETCH; + num = fetch_escaped_value(&p, end, env); + if (num < 0) return num; + if (tok->u.c != num) { + tok->u.code = (OnigCodePoint )num; + tok->type = TK_CODE_POINT; + } + break; + } + } + else if (c == '[') { + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) { + OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' }; + tok->backp = p; /* point at '[' is readed */ + PINC; + if (str_exist_check_with_esc(send, 2, p, end, + (OnigCodePoint )']', enc, syn)) { + tok->type = TK_POSIX_BRACKET_OPEN; + } + else { + PUNFETCH; + goto cc_in_cc; + } + } + else { + cc_in_cc: + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) { + tok->type = TK_CC_CC_OPEN; + } + else { + CC_ESC_WARN(env, (UChar* )"["); + } + } + } + else if (c == '&') { + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) && + !PEND && (PPEEK_IS('&'))) { + PINC; + tok->type = TK_CC_AND; + } + } + + end: + *src = p; + return tok->type; +} + +static int +fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) +{ + int r, num; + OnigCodePoint c; + OnigEncoding enc = env->enc; + const OnigSyntaxType* syn = env->syntax; + UChar* prev; + UChar* p = *src; + PFETCH_READY; + + start: + if (PEND) { + tok->type = TK_EOT; + return tok->type; + } + + tok->type = TK_STRING; + tok->base = 0; + tok->backp = p; + + PFETCH(c); + if (IS_MC_ESC_CODE(c, syn)) { + if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; + + tok->backp = p; + PFETCH(c); + + tok->u.c = c; + tok->escaped = 1; + switch (c) { + case '*': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF)) break; + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = REPEAT_INFINITE; + goto greedy_check; + break; + + case '+': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_PLUS_ONE_INF)) break; + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 1; + tok->u.repeat.upper = REPEAT_INFINITE; + goto greedy_check; + break; + + case '?': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE)) break; + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = 1; + greedy_check: + if (!PEND && PPEEK_IS('?') && + IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY)) { + PFETCH(c); + tok->u.repeat.greedy = 0; + tok->u.repeat.possessive = 0; + } + else { + possessive_check: + if (!PEND && PPEEK_IS('+') && + ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) && + tok->type != TK_INTERVAL) || + (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL) && + tok->type == TK_INTERVAL))) { + PFETCH(c); + tok->u.repeat.greedy = 1; + tok->u.repeat.possessive = 1; + } + else { + tok->u.repeat.greedy = 1; + tok->u.repeat.possessive = 0; + } + } + break; + + case '{': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break; + r = fetch_range_quantifier(&p, end, tok, env); + if (r < 0) return r; /* error */ + if (r == 0) goto greedy_check; + else if (r == 2) { /* {n} */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY)) + goto possessive_check; + + goto greedy_check; + } + /* r == 1 : normal char */ + break; + + case '|': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_VBAR_ALT)) break; + tok->type = TK_ALT; + break; + + case '(': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_OPEN; + break; + + case ')': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_CLOSE; + break; + + case 'w': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 0; + break; + + case 'W': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_WORD; + tok->u.prop.not = 1; + break; + + case 'b': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCHOR_WORD_BOUND; + break; + + case 'B': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCHOR_NOT_WORD_BOUND; + break; + +#ifdef USE_WORD_BEGIN_END + case '<': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCHOR_WORD_BEGIN; + break; + + case '>': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break; + tok->type = TK_ANCHOR; + tok->u.anchor = ANCHOR_WORD_END; + break; +#endif + + case 's': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 0; + break; + + case 'S': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_SPACE; + tok->u.prop.not = 1; + break; + + case 'd': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 0; + break; + + case 'D': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_DIGIT; + tok->u.prop.not = 1; + break; + + case 'h': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 0; + break; + + case 'H': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break; + tok->type = TK_CHAR_TYPE; + tok->u.prop.ctype = ONIGENC_CTYPE_XDIGIT; + tok->u.prop.not = 1; + break; + + case 'A': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + begin_buf: + tok->type = TK_ANCHOR; + tok->u.subtype = ANCHOR_BEGIN_BUF; + break; + + case 'Z': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = ANCHOR_SEMI_END_BUF; + break; + + case 'z': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break; + end_buf: + tok->type = TK_ANCHOR; + tok->u.subtype = ANCHOR_END_BUF; + break; + + case 'G': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = ANCHOR_BEGIN_POSITION; + break; + + case '`': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break; + goto begin_buf; + break; + + case '\'': + if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break; + goto end_buf; + break; + + case 'x': + if (PEND) break; + + prev = p; + if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) { + PINC; + num = scan_unsigned_hexadecimal_number(&p, end, 8, enc); + if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE; + if (!PEND) { + if (ONIGENC_IS_CODE_XDIGIT(enc, PPEEK)) + return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE; + } + + if ((p > prev + enclen(enc, prev, end)) && !PEND && PPEEK_IS('}')) { + PINC; + tok->type = TK_CODE_POINT; + tok->u.code = (OnigCodePoint )num; + } + else { + /* can't read nothing or invalid format */ + p = prev; + } + } + else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) { + num = scan_unsigned_hexadecimal_number(&p, end, 2, enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_RAW_BYTE; + tok->base = 16; + tok->u.c = num; + } + break; + + case 'u': + if (PEND) break; + + prev = p; + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) { + num = scan_unsigned_hexadecimal_number(&p, end, 4, enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_CODE_POINT; + tok->base = 16; + tok->u.code = (OnigCodePoint )num; + } + break; + + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + PUNFETCH; + prev = p; + num = onig_scan_unsigned_number(&p, end, enc); + if (num < 0 || num > ONIG_MAX_BACKREF_NUM) { + goto skip_backref; + } + + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) && + (num <= env->num_mem || num <= 9)) { /* This spec. from GNU regex */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num])) + return ONIGERR_INVALID_BACKREF; + } + + tok->type = TK_BACKREF; + tok->u.backref.num = 1; + tok->u.backref.ref1 = num; + tok->u.backref.by_name = 0; +#ifdef USE_BACKREF_WITH_LEVEL + tok->u.backref.exist_level = 0; +#endif + break; + } + + skip_backref: + if (c == '8' || c == '9') { + /* normal char */ + p = prev; PINC; + break; + } + + p = prev; + /* fall through */ + case '0': + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) { + prev = p; + num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc); + if (num < 0) return ONIGERR_TOO_BIG_NUMBER; + if (p == prev) { /* can't read nothing. */ + num = 0; /* but, it's not error */ + } + tok->type = TK_RAW_BYTE; + tok->base = 8; + tok->u.c = num; + } + else if (c != '0') { + PINC; + } + break; + +#ifdef USE_NAMED_GROUP + case 'k': + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) { + PFETCH(c); + if (c == '<' || c == '\'') { + UChar* name_end; + int* backs; + int back_num; + + prev = p; + +#ifdef USE_BACKREF_WITH_LEVEL + name_end = NULL_UCHARP; /* no need. escape gcc warning. */ + r = fetch_name_with_level((OnigCodePoint )c, &p, end, &name_end, + env, &back_num, &tok->u.backref.level); + if (r == 1) tok->u.backref.exist_level = 1; + else tok->u.backref.exist_level = 0; +#else + r = fetch_name(&p, end, &name_end, env, &back_num, 1); +#endif + if (r < 0) return r; + + if (back_num != 0) { + if (back_num < 0) { + back_num = BACKREF_REL_TO_ABS(back_num, env); + if (back_num <= 0) + return ONIGERR_INVALID_BACKREF; + } + + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + if (back_num > env->num_mem || + IS_NULL(SCANENV_MEM_NODES(env)[back_num])) + return ONIGERR_INVALID_BACKREF; + } + tok->type = TK_BACKREF; + tok->u.backref.by_name = 0; + tok->u.backref.num = 1; + tok->u.backref.ref1 = back_num; + } + else { + num = onig_name_to_group_numbers(env->reg, prev, name_end, &backs); + if (num <= 0) { + onig_scan_env_set_error_string(env, + ONIGERR_UNDEFINED_NAME_REFERENCE, prev, name_end); + return ONIGERR_UNDEFINED_NAME_REFERENCE; + } + if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { + int i; + for (i = 0; i < num; i++) { + if (backs[i] > env->num_mem || + IS_NULL(SCANENV_MEM_NODES(env)[backs[i]])) + return ONIGERR_INVALID_BACKREF; + } + } + + tok->type = TK_BACKREF; + tok->u.backref.by_name = 1; + if (num == 1) { + tok->u.backref.num = 1; + tok->u.backref.ref1 = backs[0]; + } + else { + tok->u.backref.num = num; + tok->u.backref.refs = backs; + } + } + } + else + PUNFETCH; + } + break; +#endif + +#ifdef USE_SUBEXP_CALL + case 'g': + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) { + PFETCH(c); + if (c == '<' || c == '\'') { + int gnum; + UChar* name_end; + + prev = p; + r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &gnum, 1); + if (r < 0) return r; + + tok->type = TK_CALL; + tok->u.call.name = prev; + tok->u.call.name_end = name_end; + tok->u.call.gnum = gnum; + } + else + PUNFETCH; + } + break; +#endif + + case 'Q': + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE)) { + tok->type = TK_QUOTE_OPEN; + } + break; + + case 'p': + case 'P': + if (PPEEK_IS('{') && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) { + PINC; + tok->type = TK_CHAR_PROPERTY; + tok->u.prop.not = (c == 'P' ? 1 : 0); + + if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) { + PFETCH(c); + if (c == '^') { + tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0); + } + else + PUNFETCH; + } + } + break; + + default: + PUNFETCH; + num = fetch_escaped_value(&p, end, env); + if (num < 0) return num; + /* set_raw: */ + if (tok->u.c != num) { + tok->type = TK_CODE_POINT; + tok->u.code = (OnigCodePoint )num; + } + else { /* string */ + p = tok->backp + enclen(enc, tok->backp, end); + } + break; + } + } + else { + tok->u.c = c; + tok->escaped = 0; + +#ifdef USE_VARIABLE_META_CHARS + if ((c != ONIG_INEFFECTIVE_META_CHAR) && + IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) { + if (c == MC_ANYCHAR(syn)) + goto any_char; + else if (c == MC_ANYTIME(syn)) + goto anytime; + else if (c == MC_ZERO_OR_ONE_TIME(syn)) + goto zero_or_one_time; + else if (c == MC_ONE_OR_MORE_TIME(syn)) + goto one_or_more_time; + else if (c == MC_ANYCHAR_ANYTIME(syn)) { + tok->type = TK_ANYCHAR_ANYTIME; + goto out; + } + } +#endif + + switch (c) { + case '.': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break; +#ifdef USE_VARIABLE_META_CHARS + any_char: +#endif + tok->type = TK_ANYCHAR; + break; + + case '*': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break; +#ifdef USE_VARIABLE_META_CHARS + anytime: +#endif + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = REPEAT_INFINITE; + goto greedy_check; + break; + + case '+': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break; +#ifdef USE_VARIABLE_META_CHARS + one_or_more_time: +#endif + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 1; + tok->u.repeat.upper = REPEAT_INFINITE; + goto greedy_check; + break; + + case '?': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break; +#ifdef USE_VARIABLE_META_CHARS + zero_or_one_time: +#endif + tok->type = TK_OP_REPEAT; + tok->u.repeat.lower = 0; + tok->u.repeat.upper = 1; + goto greedy_check; + break; + + case '{': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break; + r = fetch_range_quantifier(&p, end, tok, env); + if (r < 0) return r; /* error */ + if (r == 0) goto greedy_check; + else if (r == 2) { /* {n} */ + if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY)) + goto possessive_check; + + goto greedy_check; + } + /* r == 1 : normal char */ + break; + + case '|': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break; + tok->type = TK_ALT; + break; + + case '(': + if (PPEEK_IS('?') && + IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) { + PINC; + if (PPEEK_IS('#')) { + PFETCH(c); + while (1) { + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + if (c == MC_ESC(syn)) { + if (!PEND) PFETCH(c); + } + else { + if (c == ')') break; + } + } + goto start; + } + PUNFETCH; + } + + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_OPEN; + break; + + case ')': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break; + tok->type = TK_SUBEXP_CLOSE; + break; + + case '^': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = (IS_SINGLELINE(env->option) + ? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE); + break; + + case '$': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break; + tok->type = TK_ANCHOR; + tok->u.subtype = (IS_SINGLELINE(env->option) + ? ANCHOR_SEMI_END_BUF : ANCHOR_END_LINE); + break; + + case '[': + if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break; + tok->type = TK_CC_OPEN; + break; + + case ']': + if (*src > env->pattern) /* /].../ is allowed. */ + CLOSE_BRACKET_WITHOUT_ESC_WARN(env, (UChar* )"]"); + break; + + case '#': + if (IS_EXTEND(env->option)) { + while (!PEND) { + PFETCH(c); + if (ONIGENC_IS_CODE_NEWLINE(enc, c)) + break; + } + goto start; + break; + } + break; + + case ' ': case '\t': case '\n': case '\r': case '\f': + if (IS_EXTEND(env->option)) + goto start; + break; + + default: + /* string */ + break; + } + } + +#ifdef USE_VARIABLE_META_CHARS + out: +#endif + *src = p; + return tok->type; +} + +static int +add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not, + OnigEncoding enc ARG_UNUSED, + OnigCodePoint sb_out, const OnigCodePoint mbr[]) +{ + int i, r; + OnigCodePoint j; + + int n = ONIGENC_CODE_RANGE_NUM(mbr); + + if (not == 0) { + for (i = 0; i < n; i++) { + for (j = ONIGENC_CODE_RANGE_FROM(mbr, i); + j <= ONIGENC_CODE_RANGE_TO(mbr, i); j++) { + if (j >= sb_out) { + if (j == ONIGENC_CODE_RANGE_TO(mbr, i)) i++; + else if (j > ONIGENC_CODE_RANGE_FROM(mbr, i)) { + r = add_code_range_to_buf(&(cc->mbuf), j, + ONIGENC_CODE_RANGE_TO(mbr, i)); + if (r != 0) return r; + i++; + } + + goto sb_end; + } + BITSET_SET_BIT(cc->bs, j); + } + } + + sb_end: + for ( ; i < n; i++) { + r = add_code_range_to_buf(&(cc->mbuf), + ONIGENC_CODE_RANGE_FROM(mbr, i), + ONIGENC_CODE_RANGE_TO(mbr, i)); + if (r != 0) return r; + } + } + else { + OnigCodePoint prev = 0; + + for (i = 0; i < n; i++) { + for (j = prev; + j < ONIGENC_CODE_RANGE_FROM(mbr, i); j++) { + if (j >= sb_out) { + goto sb_end2; + } + BITSET_SET_BIT(cc->bs, j); + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1; + } + for (j = prev; j < sb_out; j++) { + BITSET_SET_BIT(cc->bs, j); + } + + sb_end2: + prev = sb_out; + + for (i = 0; i < n; i++) { + if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) { + r = add_code_range_to_buf(&(cc->mbuf), prev, + ONIGENC_CODE_RANGE_FROM(mbr, i) - 1); + if (r != 0) return r; + } + prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1; + } + if (prev < 0x7fffffff) { + r = add_code_range_to_buf(&(cc->mbuf), prev, 0x7fffffff); + if (r != 0) return r; + } + } + + return 0; +} + +static int +add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env) +{ + int c, r; + const OnigCodePoint *ranges; + OnigCodePoint sb_out; + OnigEncoding enc = env->enc; + + r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sb_out, &ranges); + if (r == 0) { + return add_ctype_to_cc_by_range(cc, ctype, not, env->enc, sb_out, ranges); + } + else if (r != ONIG_NO_SUPPORT_CONFIG) { + return r; + } + + r = 0; + switch (ctype) { + case ONIGENC_CTYPE_ALPHA: + case ONIGENC_CTYPE_BLANK: + case ONIGENC_CTYPE_CNTRL: + case ONIGENC_CTYPE_DIGIT: + case ONIGENC_CTYPE_LOWER: + case ONIGENC_CTYPE_PUNCT: + case ONIGENC_CTYPE_SPACE: + case ONIGENC_CTYPE_UPPER: + case ONIGENC_CTYPE_XDIGIT: + case ONIGENC_CTYPE_ASCII: + case ONIGENC_CTYPE_ALNUM: + if (not != 0) { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + else { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + } + break; + + case ONIGENC_CTYPE_GRAPH: + case ONIGENC_CTYPE_PRINT: + if (not != 0) { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + } + else { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype)) + BITSET_SET_BIT(cc->bs, c); + } + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + break; + + case ONIGENC_CTYPE_WORD: + if (not == 0) { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if (IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c); + } + ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); + } + else { + for (c = 0; c < SINGLE_BYTE_SIZE; c++) { + if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0) /* check invalid code point */ + && ! ONIGENC_IS_CODE_WORD(enc, c)) + BITSET_SET_BIT(cc->bs, c); + } + } + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + + return r; +} + +static int +parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env) +{ +#define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 +#define POSIX_BRACKET_NAME_MIN_LEN 4 + + static const PosixBracketEntryType PBS[] = { + { (UChar* )"alnum", ONIGENC_CTYPE_ALNUM, 5 }, + { (UChar* )"alpha", ONIGENC_CTYPE_ALPHA, 5 }, + { (UChar* )"blank", ONIGENC_CTYPE_BLANK, 5 }, + { (UChar* )"cntrl", ONIGENC_CTYPE_CNTRL, 5 }, + { (UChar* )"digit", ONIGENC_CTYPE_DIGIT, 5 }, + { (UChar* )"graph", ONIGENC_CTYPE_GRAPH, 5 }, + { (UChar* )"lower", ONIGENC_CTYPE_LOWER, 5 }, + { (UChar* )"print", ONIGENC_CTYPE_PRINT, 5 }, + { (UChar* )"punct", ONIGENC_CTYPE_PUNCT, 5 }, + { (UChar* )"space", ONIGENC_CTYPE_SPACE, 5 }, + { (UChar* )"upper", ONIGENC_CTYPE_UPPER, 5 }, + { (UChar* )"xdigit", ONIGENC_CTYPE_XDIGIT, 6 }, + { (UChar* )"ascii", ONIGENC_CTYPE_ASCII, 5 }, + { (UChar* )"word", ONIGENC_CTYPE_WORD, 4 }, + { (UChar* )NULL, -1, 0 } + }; + + const PosixBracketEntryType *pb; + int not, i, r; + OnigCodePoint c; + OnigEncoding enc = env->enc; + UChar *p = *src; + PFETCH_READY; + + if (PPEEK_IS('^')) { + PINC; + not = 1; + } + else + not = 0; + + if (onigenc_strlen(enc, p, end) < POSIX_BRACKET_NAME_MIN_LEN + 3) + goto not_posix_bracket; + + for (pb = PBS; IS_NOT_NULL(pb->name); pb++) { + if (onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) { + p = (UChar* )onigenc_step(enc, p, end, pb->len); + if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0) + return ONIGERR_INVALID_POSIX_BRACKET_TYPE; + + r = add_ctype_to_cc(cc, pb->ctype, not, env); + if (r != 0) return r; + + PINC; PINC; + *src = p; + return 0; + } + } + + not_posix_bracket: + c = 0; + i = 0; + while (!PEND && ((c = PPEEK) != ':') && c != ']') { + PINC; + if (++i > POSIX_BRACKET_CHECK_LIMIT_LENGTH) break; + } + if (c == ':' && ! PEND) { + PINC; + if (! PEND) { + PFETCH(c); + if (c == ']') + return ONIGERR_INVALID_POSIX_BRACKET_TYPE; + } + } + + return 1; /* 1: is not POSIX bracket, but no error. */ +} + +static int +fetch_char_property_to_ctype(UChar** src, UChar* end, ScanEnv* env) +{ + int r; + OnigCodePoint c; + OnigEncoding enc = env->enc; + UChar *prev, *start, *p = *src; + PFETCH_READY; + + r = 0; + start = prev = p; + + while (!PEND) { + prev = p; + PFETCH(c); + if (c == '}') { + r = ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, start, prev); + if (r < 0) break; + + *src = p; + return r; + } + else if (c == '(' || c == ')' || c == '{' || c == '|') { + r = ONIGERR_INVALID_CHAR_PROPERTY_NAME; + break; + } + } + + onig_scan_env_set_error_string(env, r, *src, prev); + return r; +} + +static int +parse_char_property(Node** np, OnigToken* tok, UChar** src, UChar* end, + ScanEnv* env) +{ + int r, ctype; + CClassNode* cc; + + ctype = fetch_char_property_to_ctype(src, end, env); + if (ctype < 0) return ctype; + + *np = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(*np); + cc = NCCLASS(*np); + r = add_ctype_to_cc(cc, ctype, 0, env); + if (r != 0) return r; + if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc); + + return 0; +} + + +enum CCSTATE { + CCS_VALUE, + CCS_RANGE, + CCS_COMPLETE, + CCS_START +}; + +enum CCVALTYPE { + CCV_SB, + CCV_CODE_POINT, + CCV_CLASS +}; + +static int +next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type, + enum CCSTATE* state, ScanEnv* env) +{ + int r; + + if (*state == CCS_RANGE) + return ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE; + + if (*state == CCS_VALUE && *type != CCV_CLASS) { + if (*type == CCV_SB) + BITSET_SET_BIT(cc->bs, (int )(*vs)); + else if (*type == CCV_CODE_POINT) { + r = add_code_range(&(cc->mbuf), env, *vs, *vs); + if (r < 0) return r; + } + } + + *state = CCS_VALUE; + *type = CCV_CLASS; + return 0; +} + +static int +next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v, + int* vs_israw, int v_israw, + enum CCVALTYPE intype, enum CCVALTYPE* type, + enum CCSTATE* state, ScanEnv* env) +{ + int r; + + switch (*state) { + case CCS_VALUE: + if (*type == CCV_SB) + BITSET_SET_BIT(cc->bs, (int )(*vs)); + else if (*type == CCV_CODE_POINT) { + r = add_code_range(&(cc->mbuf), env, *vs, *vs); + if (r < 0) return r; + } + break; + + case CCS_RANGE: + if (intype == *type) { + if (intype == CCV_SB) { + if (*vs > 0xff || v > 0xff) + return ONIGERR_INVALID_CODE_POINT_VALUE; + + if (*vs > v) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + goto ccs_range_end; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + bitset_set_range(cc->bs, (int )*vs, (int )v); + } + else { + r = add_code_range(&(cc->mbuf), env, *vs, v); + if (r < 0) return r; + } + } + else { +#if 0 + if (intype == CCV_CODE_POINT && *type == CCV_SB) { +#endif + if (*vs > v) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC)) + goto ccs_range_end; + else + return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS; + } + bitset_set_range(cc->bs, (int )*vs, (int )(v < 0xff ? v : 0xff)); + r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*vs, v); + if (r < 0) return r; +#if 0 + } + else + return ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE; +#endif + } + ccs_range_end: + *state = CCS_COMPLETE; + break; + + case CCS_COMPLETE: + case CCS_START: + *state = CCS_VALUE; + break; + + default: + break; + } + + *vs_israw = v_israw; + *vs = v; + *type = intype; + return 0; +} + +static int +code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped, + ScanEnv* env) +{ + int in_esc; + OnigCodePoint code; + OnigEncoding enc = env->enc; + UChar* p = from; + PFETCH_READY; + + in_esc = 0; + while (! PEND) { + if (ignore_escaped && in_esc) { + in_esc = 0; + } + else { + PFETCH(code); + if (code == c) return 1; + if (code == MC_ESC(env->syntax)) in_esc = 1; + } + } + return 0; +} + +static int +parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end, + ScanEnv* env) +{ + int r, neg, len, fetched, and_start; + OnigCodePoint v, vs; + UChar *p; + Node* node; + CClassNode *cc, *prev_cc; + CClassNode work_cc; + + enum CCSTATE state; + enum CCVALTYPE val_type, in_type; + int val_israw, in_israw; + + prev_cc = (CClassNode* )NULL; + *np = NULL_NODE; + r = fetch_token_in_cc(tok, src, end, env); + if (r == TK_CHAR && tok->u.c == '^' && tok->escaped == 0) { + neg = 1; + r = fetch_token_in_cc(tok, src, end, env); + } + else { + neg = 0; + } + + if (r < 0) return r; + if (r == TK_CC_CLOSE) { + if (! code_exist_check((OnigCodePoint )']', + *src, env->pattern_end, 1, env)) + return ONIGERR_EMPTY_CHAR_CLASS; + + CC_ESC_WARN(env, (UChar* )"]"); + r = tok->type = TK_CHAR; /* allow []...] */ + } + + *np = node = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(node); + cc = NCCLASS(node); + + and_start = 0; + state = CCS_START; + p = *src; + while (r != TK_CC_CLOSE) { + fetched = 0; + switch (r) { + case TK_CHAR: + if ((tok->u.code >= SINGLE_BYTE_SIZE) || + (len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c)) > 1) { + in_type = CCV_CODE_POINT; + } + else if (len < 0) { + r = len; + goto err; + } + else { + sb_char: + in_type = CCV_SB; + } + v = (OnigCodePoint )tok->u.c; + in_israw = 0; + goto val_entry2; + break; + + case TK_RAW_BYTE: + /* tok->base != 0 : octal or hexadec. */ + if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base != 0) { + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN; + UChar* psave = p; + int i, base = tok->base; + + buf[0] = tok->u.c; + for (i = 1; i < ONIGENC_MBC_MAXLEN(env->enc); i++) { + r = fetch_token_in_cc(tok, &p, end, env); + if (r < 0) goto err; + if (r != TK_RAW_BYTE || tok->base != base) { + fetched = 1; + break; + } + buf[i] = tok->u.c; + } + + if (i < ONIGENC_MBC_MINLEN(env->enc)) { + r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + goto err; + } + + len = enclen(env->enc, buf, buf+i); + if (i < len) { + r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + goto err; + } + else if (i > len) { /* fetch back */ + p = psave; + for (i = 1; i < len; i++) { + r = fetch_token_in_cc(tok, &p, end, env); + } + fetched = 0; + } + + if (i == 1) { + v = (OnigCodePoint )buf[0]; + goto raw_single; + } + else { + v = ONIGENC_MBC_TO_CODE(env->enc, buf, bufe); + in_type = CCV_CODE_POINT; + } + } + else { + v = (OnigCodePoint )tok->u.c; + raw_single: + in_type = CCV_SB; + } + in_israw = 1; + goto val_entry2; + break; + + case TK_CODE_POINT: + v = tok->u.code; + in_israw = 1; + val_entry: + len = ONIGENC_CODE_TO_MBCLEN(env->enc, v); + if (len < 0) { + r = len; + goto err; + } + in_type = (len == 1 ? CCV_SB : CCV_CODE_POINT); + val_entry2: + r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type, + &state, env); + if (r != 0) goto err; + break; + + case TK_POSIX_BRACKET_OPEN: + r = parse_posix_bracket(cc, &p, end, env); + if (r < 0) goto err; + if (r == 1) { /* is not POSIX bracket */ + CC_ESC_WARN(env, (UChar* )"["); + p = tok->backp; + v = (OnigCodePoint )tok->u.c; + in_israw = 0; + goto val_entry; + } + goto next_class; + break; + + case TK_CHAR_TYPE: + r = add_ctype_to_cc(cc, tok->u.prop.ctype, tok->u.prop.not, env); + if (r != 0) return r; + + next_class: + r = next_state_class(cc, &vs, &val_type, &state, env); + if (r != 0) goto err; + break; + + case TK_CHAR_PROPERTY: + { + int ctype; + + ctype = fetch_char_property_to_ctype(&p, end, env); + if (ctype < 0) return ctype; + r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, env); + if (r != 0) return r; + goto next_class; + } + break; + + case TK_CC_RANGE: + if (state == CCS_VALUE) { + r = fetch_token_in_cc(tok, &p, end, env); + if (r < 0) goto err; + fetched = 1; + if (r == TK_CC_CLOSE) { /* allow [x-] */ + range_end_val: + v = (OnigCodePoint )'-'; + in_israw = 0; + goto val_entry; + } + else if (r == TK_CC_AND) { + CC_ESC_WARN(env, (UChar* )"-"); + goto range_end_val; + } + state = CCS_RANGE; + } + else if (state == CCS_START) { + /* [-xa] is allowed */ + v = (OnigCodePoint )tok->u.c; + in_israw = 0; + + r = fetch_token_in_cc(tok, &p, end, env); + if (r < 0) goto err; + fetched = 1; + /* [--x] or [a&&-x] is warned. */ + if (r == TK_CC_RANGE || and_start != 0) + CC_ESC_WARN(env, (UChar* )"-"); + + goto val_entry; + } + else if (state == CCS_RANGE) { + CC_ESC_WARN(env, (UChar* )"-"); + goto sb_char; /* [!--x] is allowed */ + } + else { /* CCS_COMPLETE */ + r = fetch_token_in_cc(tok, &p, end, env); + if (r < 0) goto err; + fetched = 1; + if (r == TK_CC_CLOSE) goto range_end_val; /* allow [a-b-] */ + else if (r == TK_CC_AND) { + CC_ESC_WARN(env, (UChar* )"-"); + goto range_end_val; + } + + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) { + CC_ESC_WARN(env, (UChar* )"-"); + goto sb_char; /* [0-9-a] is allowed as [0-9\-a] */ + } + r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS; + goto err; + } + break; + + case TK_CC_CC_OPEN: /* [ */ + { + Node *anode; + CClassNode* acc; + + r = parse_char_class(&anode, tok, &p, end, env); + if (r != 0) goto cc_open_err; + acc = NCCLASS(anode); + r = or_cclass(cc, acc, env->enc); + + onig_node_free(anode); + cc_open_err: + if (r != 0) goto err; + } + break; + + case TK_CC_AND: /* && */ + { + if (state == CCS_VALUE) { + r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type, + &val_type, &state, env); + if (r != 0) goto err; + } + /* initialize local variables */ + and_start = 1; + state = CCS_START; + + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc, env->enc); + if (r != 0) goto err; + bbuf_free(cc->mbuf); + } + else { + prev_cc = cc; + cc = &work_cc; + } + initialize_cclass(cc); + } + break; + + case TK_EOT: + r = ONIGERR_PREMATURE_END_OF_CHAR_CLASS; + goto err; + break; + default: + r = ONIGERR_PARSER_BUG; + goto err; + break; + } + + if (fetched) + r = tok->type; + else { + r = fetch_token_in_cc(tok, &p, end, env); + if (r < 0) goto err; + } + } + + if (state == CCS_VALUE) { + r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type, + &val_type, &state, env); + if (r != 0) goto err; + } + + if (IS_NOT_NULL(prev_cc)) { + r = and_cclass(prev_cc, cc, env->enc); + if (r != 0) goto err; + bbuf_free(cc->mbuf); + cc = prev_cc; + } + + if (neg != 0) + NCCLASS_SET_NOT(cc); + else + NCCLASS_CLEAR_NOT(cc); + if (IS_NCCLASS_NOT(cc) && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) { + int is_empty; + + is_empty = (IS_NULL(cc->mbuf) ? 1 : 0); + if (is_empty != 0) + BITSET_IS_EMPTY(cc->bs, is_empty); + + if (is_empty == 0) { +#define NEWLINE_CODE 0x0a + + if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) { + if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1) + BITSET_SET_BIT(cc->bs, NEWLINE_CODE); + else + add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE); + } + } + } + *src = p; + return 0; + + err: + if (cc != NCCLASS(*np)) + bbuf_free(cc->mbuf); + onig_node_free(*np); + return r; +} + +static int parse_subexp(Node** top, OnigToken* tok, int term, + UChar** src, UChar* end, ScanEnv* env); + +static int +parse_enclose(Node** np, OnigToken* tok, int term, UChar** src, UChar* end, + ScanEnv* env) +{ + int r, num; + Node *target; + OnigOptionType option; + OnigCodePoint c; + OnigEncoding enc = env->enc; + +#ifdef USE_NAMED_GROUP + int list_capture; +#endif + + UChar* p = *src; + PFETCH_READY; + + *np = NULL; + if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS; + + option = env->option; + if (PPEEK_IS('?') && + IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) { + PINC; + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + + PFETCH(c); + switch (c) { + case ':': /* (?:...) grouping only */ + group: + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = parse_subexp(np, tok, term, &p, end, env); + if (r < 0) return r; + *src = p; + return 1; /* group */ + break; + + case '=': + *np = onig_node_new_anchor(ANCHOR_PREC_READ); + break; + case '!': /* preceding read */ + *np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT); + break; + case '>': /* (?>...) stop backtrack */ + *np = node_new_enclose(ENCLOSE_STOP_BACKTRACK); + break; + +#ifdef USE_NAMED_GROUP + case '\'': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + goto named_group1; + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; +#endif + + case '<': /* look behind (?<=...), (?syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + UChar *name; + UChar *name_end; + + PUNFETCH; + c = '<'; + + named_group1: + list_capture = 0; + + named_group2: + name = p; + r = fetch_name((OnigCodePoint )c, &p, end, &name_end, env, &num, 0); + if (r < 0) return r; + + num = scan_env_add_mem_entry(env); + if (num < 0) return num; + if (list_capture != 0 && num >= (int )BIT_STATUS_BITS_NUM) + return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY; + + r = name_add(env->reg, name, name_end, num, env); + if (r != 0) return r; + *np = node_new_enclose_memory(env->option, 1); + CHECK_NULL_RETURN_MEMERR(*np); + NENCLOSE(*np)->regnum = num; + if (list_capture != 0) + BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num); + env->num_named++; + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + } +#else + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } +#endif + break; + + case '@': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)) { +#ifdef USE_NAMED_GROUP + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) { + PFETCH(c); + if (c == '<' || c == '\'') { + list_capture = 1; + goto named_group2; /* (?@...) */ + } + PUNFETCH; + } +#endif + *np = node_new_enclose_memory(env->option, 0); + CHECK_NULL_RETURN_MEMERR(*np); + num = scan_env_add_mem_entry(env); + if (num < 0) { + onig_node_free(*np); + return num; + } + else if (num >= (int )BIT_STATUS_BITS_NUM) { + onig_node_free(*np); + return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY; + } + NENCLOSE(*np)->regnum = num; + BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num); + } + else { + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + break; + +#ifdef USE_POSIXLINE_OPTION + case 'p': +#endif + case '-': case 'i': case 'm': case 's': case 'x': + { + int neg = 0; + + while (1) { + switch (c) { + case ':': + case ')': + break; + + case '-': neg = 1; break; + case 'x': ONOFF(option, ONIG_OPTION_EXTEND, neg); break; + case 'i': ONOFF(option, ONIG_OPTION_IGNORECASE, neg); break; + case 's': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) { + ONOFF(option, ONIG_OPTION_MULTILINE, neg); + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; + + case 'm': + if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) { + ONOFF(option, ONIG_OPTION_SINGLELINE, (neg == 0 ? 1 : 0)); + } + else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) { + ONOFF(option, ONIG_OPTION_MULTILINE, neg); + } + else + return ONIGERR_UNDEFINED_GROUP_OPTION; + break; +#ifdef USE_POSIXLINE_OPTION + case 'p': + ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg); + break; +#endif + default: + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + + if (c == ')') { + *np = node_new_option(option); + CHECK_NULL_RETURN_MEMERR(*np); + *src = p; + return 2; /* option only */ + } + else if (c == ':') { + OnigOptionType prev = env->option; + + env->option = option; + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = parse_subexp(&target, tok, term, &p, end, env); + env->option = prev; + if (r < 0) return r; + *np = node_new_option(option); + CHECK_NULL_RETURN_MEMERR(*np); + NENCLOSE(*np)->target = target; + *src = p; + return 0; + } + + if (PEND) return ONIGERR_END_PATTERN_IN_GROUP; + PFETCH(c); + } + } + break; + + default: + return ONIGERR_UNDEFINED_GROUP_OPTION; + } + } + else { + if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP)) + goto group; + + *np = node_new_enclose_memory(env->option, 0); + CHECK_NULL_RETURN_MEMERR(*np); + num = scan_env_add_mem_entry(env); + if (num < 0) return num; + NENCLOSE(*np)->regnum = num; + } + + CHECK_NULL_RETURN_MEMERR(*np); + r = fetch_token(tok, &p, end, env); + if (r < 0) return r; + r = parse_subexp(&target, tok, term, &p, end, env); + if (r < 0) return r; + + if (NTYPE(*np) == NT_ANCHOR) + NANCHOR(*np)->target = target; + else { + NENCLOSE(*np)->target = target; + if (NENCLOSE(*np)->type == ENCLOSE_MEMORY) { + /* Don't move this to previous of parse_subexp() */ + r = scan_env_set_mem_node(env, NENCLOSE(*np)->regnum, *np); + if (r != 0) return r; + } + } + + *src = p; + return 0; +} + +static const char* const PopularQStr[] = { + "?", "*", "+", "??", "*?", "+?" +}; + +static const char* const ReduceQStr[] = { + "", "", "*", "*?", "??", "+ and ??", "+? and ?" +}; + +static int +set_quantifier(Node* qnode, Node* target, int group, ScanEnv* env) +{ + QtfrNode* qn; + + qn = NQTFR(qnode); + if (qn->lower == 1 && qn->upper == 1) { + return 1; + } + + switch (NTYPE(target)) { + case NT_STR: + if (! group) { + StrNode* sn = NSTR(target); + if (str_node_can_be_split(sn, env->enc)) { + Node* n = str_node_split_last_char(sn, env->enc); + if (IS_NOT_NULL(n)) { + qn->target = n; + return 2; + } + } + } + break; + + case NT_QTFR: + { /* check redundant double repeat. */ + /* verbose warn (?:.?)? etc... but not warn (.?)? etc... */ + QtfrNode* qnt = NQTFR(target); + int nestq_num = popular_quantifier_num(qn); + int targetq_num = popular_quantifier_num(qnt); + +#ifdef USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR + if (!IS_QUANTIFIER_BY_NUMBER(qn) && !IS_QUANTIFIER_BY_NUMBER(qnt) && + IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) { + UChar buf[WARN_BUFSIZE]; + + switch(ReduceTypeTable[targetq_num][nestq_num]) { + case RQ_ASIS: + break; + + case RQ_DEL: + if (onig_verb_warn != onig_null_warn) { + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + (UChar* )"redundant nested repeat operator"); + (*onig_verb_warn)((char* )buf); + } + goto warn_exit; + break; + + default: + if (onig_verb_warn != onig_null_warn) { + onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc, + env->pattern, env->pattern_end, + (UChar* )"nested repeat operator %s and %s was replaced with '%s'", + PopularQStr[targetq_num], PopularQStr[nestq_num], + ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]); + (*onig_verb_warn)((char* )buf); + } + goto warn_exit; + break; + } + } + + warn_exit: +#endif + if (targetq_num >= 0) { + if (nestq_num >= 0) { + onig_reduce_nested_quantifier(qnode, target); + goto q_exit; + } + else if (targetq_num == 1 || targetq_num == 2) { /* * or + */ + /* (?:a*){n,m}, (?:a+){n,m} => (?:a*){n,n}, (?:a+){n,n} */ + if (! IS_REPEAT_INFINITE(qn->upper) && qn->upper > 1 && qn->greedy) { + qn->upper = (qn->lower == 0 ? 1 : qn->lower); + } + } + } + } + break; + + default: + break; + } + + qn->target = target; + q_exit: + return 0; +} + + +#ifdef USE_SHARED_CCLASS_TABLE + +#define THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS 8 + +/* for ctype node hash table */ + +typedef struct { + OnigEncoding enc; + int not; + int type; +} type_cclass_key; + +static int type_cclass_cmp(type_cclass_key* x, type_cclass_key* y) +{ + if (x->type != y->type) return 1; + if (x->enc != y->enc) return 1; + if (x->not != y->not) return 1; + return 0; +} + +static int type_cclass_hash(type_cclass_key* key) +{ + int i, val; + UChar *p; + + val = 0; + + p = (UChar* )&(key->enc); + for (i = 0; i < (int )sizeof(key->enc); i++) { + val = val * 997 + (int )*p++; + } + + p = (UChar* )(&key->type); + for (i = 0; i < (int )sizeof(key->type); i++) { + val = val * 997 + (int )*p++; + } + + val += key->not; + return val + (val >> 5); +} + +static const struct st_hash_type type_type_cclass_hash = { + type_cclass_cmp, + type_cclass_hash, +}; + +static st_table* OnigTypeCClassTable; + + +static int +i_free_shared_class(type_cclass_key* key, Node* node, void* arg ARG_UNUSED) +{ + if (IS_NOT_NULL(node)) { + CClassNode* cc = NCCLASS(node); + if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf); + xfree(node); + } + + if (IS_NOT_NULL(key)) xfree(key); + return ST_DELETE; +} + +extern int +onig_free_shared_cclass_table(void) +{ + THREAD_ATOMIC_START; + if (IS_NOT_NULL(OnigTypeCClassTable)) { + onig_st_foreach(OnigTypeCClassTable, i_free_shared_class, 0); + onig_st_free_table(OnigTypeCClassTable); + OnigTypeCClassTable = NULL; + } + THREAD_ATOMIC_END; + + return 0; +} + +#endif /* USE_SHARED_CCLASS_TABLE */ + + +#ifndef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS +static int +clear_not_flag_cclass(CClassNode* cc, OnigEncoding enc) +{ + BBuf *tbuf; + int r; + + if (IS_NCCLASS_NOT(cc)) { + bitset_invert(cc->bs); + + if (! ONIGENC_IS_SINGLEBYTE(enc)) { + r = not_code_range_buf(enc, cc->mbuf, &tbuf); + if (r != 0) return r; + + bbuf_free(cc->mbuf); + cc->mbuf = tbuf; + } + + NCCLASS_CLEAR_NOT(cc); + } + + return 0; +} +#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */ + +typedef struct { + ScanEnv* env; + CClassNode* cc; + Node* alt_root; + Node** ptail; +} IApplyCaseFoldArg; + +static int +i_apply_case_fold(OnigCodePoint from, OnigCodePoint to[], + int to_len, void* arg) +{ + IApplyCaseFoldArg* iarg; + ScanEnv* env; + CClassNode* cc; + BitSetRef bs; + + iarg = (IApplyCaseFoldArg* )arg; + env = iarg->env; + cc = iarg->cc; + bs = cc->bs; + + if (to_len == 1) { + int is_in = onig_is_code_in_cc(env->enc, from, cc); +#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + if ((is_in != 0 && !IS_NCCLASS_NOT(cc)) || + (is_in == 0 && IS_NCCLASS_NOT(cc))) { + if (ONIGENC_MBC_MINLEN(env->enc) > 1 || *to >= SINGLE_BYTE_SIZE) { + add_code_range(&(cc->mbuf), env, *to, *to); + } + else { + BITSET_SET_BIT(bs, *to); + } + } +#else + if (is_in != 0) { + if (ONIGENC_MBC_MINLEN(env->enc) > 1 || *to >= SINGLE_BYTE_SIZE) { + if (IS_NCCLASS_NOT(cc)) clear_not_flag_cclass(cc, env->enc); + add_code_range(&(cc->mbuf), env, *to, *to); + } + else { + if (IS_NCCLASS_NOT(cc)) { + BITSET_CLEAR_BIT(bs, *to); + } + else + BITSET_SET_BIT(bs, *to); + } + } +#endif /* CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS */ + } + else { + int r, i, len; + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + Node *snode = NULL_NODE; + + if (onig_is_code_in_cc(env->enc, from, cc) +#ifdef CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS + && !IS_NCCLASS_NOT(cc) +#endif + ) { + for (i = 0; i < to_len; i++) { + len = ONIGENC_CODE_TO_MBC(env->enc, to[i], buf); + if (i == 0) { + snode = onig_node_new_str(buf, buf + len); + CHECK_NULL_RETURN_MEMERR(snode); + + /* char-class expanded multi-char only + compare with string folded at match time. */ + NSTRING_SET_AMBIG(snode); + } + else { + r = onig_node_str_cat(snode, buf, buf + len); + if (r < 0) { + onig_node_free(snode); + return r; + } + } + } + + *(iarg->ptail) = onig_node_new_alt(snode, NULL_NODE); + CHECK_NULL_RETURN_MEMERR(*(iarg->ptail)); + iarg->ptail = &(NCDR((*(iarg->ptail)))); + } + } + + return 0; +} + +static int +parse_exp(Node** np, OnigToken* tok, int term, + UChar** src, UChar* end, ScanEnv* env) +{ + int r, len, group = 0; + Node* qn; + Node** targetp; + + *np = NULL; + if (tok->type == (enum TokenSyms )term) + goto end_of_token; + + switch (tok->type) { + case TK_ALT: + case TK_EOT: + end_of_token: + *np = node_new_empty(); + return tok->type; + break; + + case TK_SUBEXP_OPEN: + r = parse_enclose(np, tok, TK_SUBEXP_CLOSE, src, end, env); + if (r < 0) return r; + if (r == 1) group = 1; + else if (r == 2) { /* option only */ + Node* target; + OnigOptionType prev = env->option; + + env->option = NENCLOSE(*np)->option; + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + r = parse_subexp(&target, tok, term, src, end, env); + env->option = prev; + if (r < 0) return r; + NENCLOSE(*np)->target = target; + return tok->type; + } + break; + + case TK_SUBEXP_CLOSE: + if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP)) + return ONIGERR_UNMATCHED_CLOSE_PARENTHESIS; + + if (tok->escaped) goto tk_raw_byte; + else goto tk_byte; + break; + + case TK_STRING: + tk_byte: + { + *np = node_new_str(tok->backp, *src); + CHECK_NULL_RETURN_MEMERR(*np); + + while (1) { + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + if (r != TK_STRING) break; + + r = onig_node_str_cat(*np, tok->backp, *src); + if (r < 0) return r; + } + + string_end: + targetp = np; + goto repeat; + } + break; + + case TK_RAW_BYTE: + tk_raw_byte: + { + *np = node_new_str_raw_char((UChar )tok->u.c); + CHECK_NULL_RETURN_MEMERR(*np); + len = 1; + while (1) { + if (len >= ONIGENC_MBC_MINLEN(env->enc)) { + if (len == enclen(env->enc, NSTR(*np)->s, NSTR(*np)->end)) { + r = fetch_token(tok, src, end, env); + NSTRING_CLEAR_RAW(*np); + goto string_end; + } + } + + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + if (r != TK_RAW_BYTE) { + /* Don't use this, it is wrong for little endian encodings. */ +#ifdef USE_PAD_TO_SHORT_BYTE_CHAR + int rem; + if (len < ONIGENC_MBC_MINLEN(env->enc)) { + rem = ONIGENC_MBC_MINLEN(env->enc) - len; + (void )node_str_head_pad(NSTR(*np), rem, (UChar )0); + if (len + rem == enclen(env->enc, NSTR(*np)->s)) { + NSTRING_CLEAR_RAW(*np); + goto string_end; + } + } +#endif + return ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; + } + + r = node_str_cat_char(*np, (UChar )tok->u.c); + if (r < 0) return r; + + len++; + } + } + break; + + case TK_CODE_POINT: + { + UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; + int num = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf); + if (num < 0) return num; +#ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG + *np = node_new_str_raw(buf, buf + num); +#else + *np = node_new_str(buf, buf + num); +#endif + CHECK_NULL_RETURN_MEMERR(*np); + } + break; + + case TK_QUOTE_OPEN: + { + OnigCodePoint end_op[2]; + UChar *qstart, *qend, *nextp; + + end_op[0] = (OnigCodePoint )MC_ESC(env->syntax); + end_op[1] = (OnigCodePoint )'E'; + qstart = *src; + qend = find_str_position(end_op, 2, qstart, end, &nextp, env->enc); + if (IS_NULL(qend)) { + nextp = qend = end; + } + *np = node_new_str(qstart, qend); + CHECK_NULL_RETURN_MEMERR(*np); + *src = nextp; + } + break; + + case TK_CHAR_TYPE: + { + switch (tok->u.prop.ctype) { + case ONIGENC_CTYPE_WORD: + *np = node_new_ctype(tok->u.prop.ctype, tok->u.prop.not); + CHECK_NULL_RETURN_MEMERR(*np); + break; + + case ONIGENC_CTYPE_SPACE: + case ONIGENC_CTYPE_DIGIT: + case ONIGENC_CTYPE_XDIGIT: + { + CClassNode* cc; + +#ifdef USE_SHARED_CCLASS_TABLE + const OnigCodePoint *mbr; + OnigCodePoint sb_out; + + r = ONIGENC_GET_CTYPE_CODE_RANGE(env->enc, tok->u.prop.ctype, + &sb_out, &mbr); + if (r == 0 && + ONIGENC_CODE_RANGE_NUM(mbr) + >= THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS) { + type_cclass_key key; + type_cclass_key* new_key; + + key.enc = env->enc; + key.not = tok->u.prop.not; + key.type = tok->u.prop.ctype; + + THREAD_ATOMIC_START; + + if (IS_NULL(OnigTypeCClassTable)) { + OnigTypeCClassTable + = onig_st_init_table_with_size(&type_type_cclass_hash, 10); + if (IS_NULL(OnigTypeCClassTable)) { + THREAD_ATOMIC_END; + return ONIGERR_MEMORY; + } + } + else { + if (onig_st_lookup(OnigTypeCClassTable, (st_data_t )&key, + (st_data_t* )np)) { + THREAD_ATOMIC_END; + break; + } + } + + *np = node_new_cclass_by_codepoint_range(tok->u.prop.not, + sb_out, mbr); + if (IS_NULL(*np)) { + THREAD_ATOMIC_END; + return ONIGERR_MEMORY; + } + + cc = NCCLASS(*np); + NCCLASS_SET_SHARE(cc); + new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key)); + xmemcpy(new_key, &key, sizeof(type_cclass_key)); + onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key, + (st_data_t )*np); + + THREAD_ATOMIC_END; + } + else { +#endif + *np = node_new_cclass(); + CHECK_NULL_RETURN_MEMERR(*np); + cc = NCCLASS(*np); + add_ctype_to_cc(cc, tok->u.prop.ctype, 0, env); + if (tok->u.prop.not != 0) NCCLASS_SET_NOT(cc); +#ifdef USE_SHARED_CCLASS_TABLE + } +#endif + } + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + } + break; + + case TK_CHAR_PROPERTY: + r = parse_char_property(np, tok, src, end, env); + if (r != 0) return r; + break; + + case TK_CC_OPEN: + { + CClassNode* cc; + + r = parse_char_class(np, tok, src, end, env); + if (r != 0) return r; + + cc = NCCLASS(*np); + if (IS_IGNORECASE(env->option)) { + IApplyCaseFoldArg iarg; + + iarg.env = env; + iarg.cc = cc; + iarg.alt_root = NULL_NODE; + iarg.ptail = &(iarg.alt_root); + + r = ONIGENC_APPLY_ALL_CASE_FOLD(env->enc, env->case_fold_flag, + i_apply_case_fold, &iarg); + if (r != 0) { + onig_node_free(iarg.alt_root); + return r; + } + if (IS_NOT_NULL(iarg.alt_root)) { + Node* work = onig_node_new_alt(*np, iarg.alt_root); + if (IS_NULL(work)) { + onig_node_free(iarg.alt_root); + return ONIGERR_MEMORY; + } + *np = work; + } + } + } + break; + + case TK_ANYCHAR: + *np = node_new_anychar(); + CHECK_NULL_RETURN_MEMERR(*np); + break; + + case TK_ANYCHAR_ANYTIME: + *np = node_new_anychar(); + CHECK_NULL_RETURN_MEMERR(*np); + qn = node_new_quantifier(0, REPEAT_INFINITE, 0); + CHECK_NULL_RETURN_MEMERR(qn); + NQTFR(qn)->target = *np; + *np = qn; + break; + + case TK_BACKREF: + len = tok->u.backref.num; + *np = node_new_backref(len, + (len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)), + tok->u.backref.by_name, +#ifdef USE_BACKREF_WITH_LEVEL + tok->u.backref.exist_level, + tok->u.backref.level, +#endif + env); + CHECK_NULL_RETURN_MEMERR(*np); + break; + +#ifdef USE_SUBEXP_CALL + case TK_CALL: + { + int gnum = tok->u.call.gnum; + + if (gnum < 0) { + gnum = BACKREF_REL_TO_ABS(gnum, env); + if (gnum <= 0) + return ONIGERR_INVALID_BACKREF; + } + *np = node_new_call(tok->u.call.name, tok->u.call.name_end, gnum); + CHECK_NULL_RETURN_MEMERR(*np); + env->num_call++; + } + break; +#endif + + case TK_ANCHOR: + *np = onig_node_new_anchor(tok->u.anchor); + break; + + case TK_OP_REPEAT: + case TK_INTERVAL: + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) { + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS)) + return ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED; + else + *np = node_new_empty(); + } + else { + goto tk_byte; + } + break; + + default: + return ONIGERR_PARSER_BUG; + break; + } + + { + targetp = np; + + re_entry: + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + + repeat: + if (r == TK_OP_REPEAT || r == TK_INTERVAL) { + if (is_invalid_quantifier_target(*targetp)) + return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID; + + qn = node_new_quantifier(tok->u.repeat.lower, tok->u.repeat.upper, + (r == TK_INTERVAL ? 1 : 0)); + CHECK_NULL_RETURN_MEMERR(qn); + NQTFR(qn)->greedy = tok->u.repeat.greedy; + r = set_quantifier(qn, *targetp, group, env); + if (r < 0) return r; + + if (tok->u.repeat.possessive != 0) { + Node* en; + en = node_new_enclose(ENCLOSE_STOP_BACKTRACK); + if (IS_NULL(en)) { + onig_node_free(qn); + return ONIGERR_MEMORY; + } + NENCLOSE(en)->target = qn; + qn = en; + } + + if (r == 0) { + *targetp = qn; + } + else if (r == 1) { + onig_node_free(qn); + } + else if (r == 2) { /* split case: /abc+/ */ + Node *tmp; + + *targetp = node_new_list(*targetp, NULL); + CHECK_NULL_RETURN_MEMERR(*targetp); + tmp = NCDR(*targetp) = node_new_list(qn, NULL); + CHECK_NULL_RETURN_MEMERR(tmp); + targetp = &(NCAR(tmp)); + } + goto re_entry; + } + } + + return r; +} + +static int +parse_branch(Node** top, OnigToken* tok, int term, + UChar** src, UChar* end, ScanEnv* env) +{ + int r; + Node *node, **headp; + + *top = NULL; + r = parse_exp(&node, tok, term, src, end, env); + if (r < 0) return r; + + if (r == TK_EOT || r == term || r == TK_ALT) { + *top = node; + } + else { + *top = node_new_list(node, NULL); + headp = &(NCDR(*top)); + while (r != TK_EOT && r != term && r != TK_ALT) { + r = parse_exp(&node, tok, term, src, end, env); + if (r < 0) return r; + + if (NTYPE(node) == NT_LIST) { + *headp = node; + while (IS_NOT_NULL(NCDR(node))) node = NCDR(node); + headp = &(NCDR(node)); + } + else { + *headp = node_new_list(node, NULL); + headp = &(NCDR(*headp)); + } + } + } + + return r; +} + +/* term_tok: TK_EOT or TK_SUBEXP_CLOSE */ +static int +parse_subexp(Node** top, OnigToken* tok, int term, + UChar** src, UChar* end, ScanEnv* env) +{ + int r; + Node *node, **headp; + + *top = NULL; + r = parse_branch(&node, tok, term, src, end, env); + if (r < 0) { + onig_node_free(node); + return r; + } + + if (r == term) { + *top = node; + } + else if (r == TK_ALT) { + *top = onig_node_new_alt(node, NULL); + headp = &(NCDR(*top)); + while (r == TK_ALT) { + r = fetch_token(tok, src, end, env); + if (r < 0) return r; + r = parse_branch(&node, tok, term, src, end, env); + if (r < 0) return r; + + *headp = onig_node_new_alt(node, NULL); + headp = &(NCDR(*headp)); + } + + if (tok->type != (enum TokenSyms )term) + goto err; + } + else { + err: + if (term == TK_SUBEXP_CLOSE) + return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS; + else + return ONIGERR_PARSER_BUG; + } + + return r; +} + +static int +parse_regexp(Node** top, UChar** src, UChar* end, ScanEnv* env) +{ + int r; + OnigToken tok; + + r = fetch_token(&tok, src, end, env); + if (r < 0) return r; + r = parse_subexp(top, &tok, TK_EOT, src, end, env); + if (r < 0) return r; + return 0; +} + +extern int +onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, + regex_t* reg, ScanEnv* env) +{ + int r; + UChar* p; + +#ifdef USE_NAMED_GROUP + names_clear(reg); +#endif + + scan_env_clear(env); + env->option = reg->options; + env->case_fold_flag = reg->case_fold_flag; + env->enc = reg->enc; + env->syntax = reg->syntax; + env->pattern = (UChar* )pattern; + env->pattern_end = (UChar* )end; + env->reg = reg; + + *root = NULL; + p = (UChar* )pattern; + r = parse_regexp(root, &p, (UChar* )end, env); + reg->num_mem = env->num_mem; + return r; +} + +extern void +onig_scan_env_set_error_string(ScanEnv* env, int ecode ARG_UNUSED, + UChar* arg, UChar* arg_end) +{ + env->error = arg; + env->error_end = arg_end; +} diff --git a/lib/ruby-1.9.1-rc1/regparse.h b/lib/ruby-1.9.1-rc1/regparse.h new file mode 100644 index 0000000..cd653f5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regparse.h @@ -0,0 +1,351 @@ +#ifndef ONIGURUMA_REGPARSE_H +#define ONIGURUMA_REGPARSE_H +/********************************************************************** + regparse.h - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2007 K.Kosako + * 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. + * + * 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 "regint.h" + +/* node type */ +#define NT_STR 0 +#define NT_CCLASS 1 +#define NT_CTYPE 2 +#define NT_CANY 3 +#define NT_BREF 4 +#define NT_QTFR 5 +#define NT_ENCLOSE 6 +#define NT_ANCHOR 7 +#define NT_LIST 8 +#define NT_ALT 9 +#define NT_CALL 10 + +/* node type bit */ +#define NTYPE2BIT(type) (1<<(type)) + +#define BIT_NT_STR NTYPE2BIT(NT_STR) +#define BIT_NT_CCLASS NTYPE2BIT(NT_CCLASS) +#define BIT_NT_CTYPE NTYPE2BIT(NT_CTYPE) +#define BIT_NT_CANY NTYPE2BIT(NT_CANY) +#define BIT_NT_BREF NTYPE2BIT(NT_BREF) +#define BIT_NT_QTFR NTYPE2BIT(NT_QTFR) +#define BIT_NT_ENCLOSE NTYPE2BIT(NT_ENCLOSE) +#define BIT_NT_ANCHOR NTYPE2BIT(NT_ANCHOR) +#define BIT_NT_LIST NTYPE2BIT(NT_LIST) +#define BIT_NT_ALT NTYPE2BIT(NT_ALT) +#define BIT_NT_CALL NTYPE2BIT(NT_CALL) + +#define IS_NODE_TYPE_SIMPLE(type) \ + ((NTYPE2BIT(type) & (BIT_NT_STR | BIT_NT_CCLASS | BIT_NT_CTYPE |\ + BIT_NT_CANY | BIT_NT_BREF)) != 0) + +#define NTYPE(node) ((node)->u.base.type) +#define SET_NTYPE(node, ntype) (node)->u.base.type = (ntype) + +#define NSTR(node) (&((node)->u.str)) +#define NCCLASS(node) (&((node)->u.cclass)) +#define NCTYPE(node) (&((node)->u.ctype)) +#define NBREF(node) (&((node)->u.bref)) +#define NQTFR(node) (&((node)->u.qtfr)) +#define NENCLOSE(node) (&((node)->u.enclose)) +#define NANCHOR(node) (&((node)->u.anchor)) +#define NCONS(node) (&((node)->u.cons)) +#define NCALL(node) (&((node)->u.call)) + +#define NCAR(node) (NCONS(node)->car) +#define NCDR(node) (NCONS(node)->cdr) + + + +#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_ML) +#define ANCHOR_END_BUF_MASK (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF) + +#define ENCLOSE_MEMORY (1<<0) +#define ENCLOSE_OPTION (1<<1) +#define ENCLOSE_STOP_BACKTRACK (1<<2) + +#define NODE_STR_MARGIN 16 +#define NODE_STR_BUF_SIZE 24 /* sizeof(CClassNode) - sizeof(int)*4 */ +#define NODE_BACKREFS_SIZE 6 + +#define NSTR_RAW (1<<0) /* by backslashed number */ +#define NSTR_AMBIG (1<<1) +#define NSTR_DONT_GET_OPT_INFO (1<<2) + +#define NSTRING_LEN(node) ((node)->u.str.end - (node)->u.str.s) +#define NSTRING_SET_RAW(node) (node)->u.str.flag |= NSTR_RAW +#define NSTRING_CLEAR_RAW(node) (node)->u.str.flag &= ~NSTR_RAW +#define NSTRING_SET_AMBIG(node) (node)->u.str.flag |= NSTR_AMBIG +#define NSTRING_SET_DONT_GET_OPT_INFO(node) \ + (node)->u.str.flag |= NSTR_DONT_GET_OPT_INFO +#define NSTRING_IS_RAW(node) (((node)->u.str.flag & NSTR_RAW) != 0) +#define NSTRING_IS_AMBIG(node) (((node)->u.str.flag & NSTR_AMBIG) != 0) +#define NSTRING_IS_DONT_GET_OPT_INFO(node) \ + (((node)->u.str.flag & NSTR_DONT_GET_OPT_INFO) != 0) + +#define BACKREFS_P(br) \ + (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static); + +#define NQ_TARGET_ISNOT_EMPTY 0 +#define NQ_TARGET_IS_EMPTY 1 +#define NQ_TARGET_IS_EMPTY_MEM 2 +#define NQ_TARGET_IS_EMPTY_REC 3 + +/* status bits */ +#define NST_MIN_FIXED (1<<0) +#define NST_MAX_FIXED (1<<1) +#define NST_CLEN_FIXED (1<<2) +#define NST_MARK1 (1<<3) +#define NST_MARK2 (1<<4) +#define NST_MEM_BACKREFED (1<<5) +#define NST_STOP_BT_SIMPLE_REPEAT (1<<6) +#define NST_RECURSION (1<<7) +#define NST_CALLED (1<<8) +#define NST_ADDR_FIXED (1<<9) +#define NST_NAMED_GROUP (1<<10) +#define NST_NAME_REF (1<<11) +#define NST_IN_REPEAT (1<<12) /* STK_REPEAT is nested in stack. */ +#define NST_NEST_LEVEL (1<<13) +#define NST_BY_NUMBER (1<<14) /* {n,m} */ + +#define SET_ENCLOSE_STATUS(node,f) (node)->u.enclose.state |= (f) +#define CLEAR_ENCLOSE_STATUS(node,f) (node)->u.enclose.state &= ~(f) + +#define IS_ENCLOSE_CALLED(en) (((en)->state & NST_CALLED) != 0) +#define IS_ENCLOSE_ADDR_FIXED(en) (((en)->state & NST_ADDR_FIXED) != 0) +#define IS_ENCLOSE_RECURSION(en) (((en)->state & NST_RECURSION) != 0) +#define IS_ENCLOSE_MARK1(en) (((en)->state & NST_MARK1) != 0) +#define IS_ENCLOSE_MARK2(en) (((en)->state & NST_MARK2) != 0) +#define IS_ENCLOSE_MIN_FIXED(en) (((en)->state & NST_MIN_FIXED) != 0) +#define IS_ENCLOSE_MAX_FIXED(en) (((en)->state & NST_MAX_FIXED) != 0) +#define IS_ENCLOSE_CLEN_FIXED(en) (((en)->state & NST_CLEN_FIXED) != 0) +#define IS_ENCLOSE_STOP_BT_SIMPLE_REPEAT(en) \ + (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0) +#define IS_ENCLOSE_NAMED_GROUP(en) (((en)->state & NST_NAMED_GROUP) != 0) + +#define SET_CALL_RECURSION(node) (node)->u.call.state |= NST_RECURSION +#define IS_CALL_RECURSION(cn) (((cn)->state & NST_RECURSION) != 0) +#define IS_CALL_NAME_REF(cn) (((cn)->state & NST_NAME_REF) != 0) +#define IS_BACKREF_NAME_REF(bn) (((bn)->state & NST_NAME_REF) != 0) +#define IS_BACKREF_NEST_LEVEL(bn) (((bn)->state & NST_NEST_LEVEL) != 0) +#define IS_QUANTIFIER_IN_REPEAT(qn) (((qn)->state & NST_IN_REPEAT) != 0) +#define IS_QUANTIFIER_BY_NUMBER(qn) (((qn)->state & NST_BY_NUMBER) != 0) + +#define CALLNODE_REFNUM_UNDEF -1 + +typedef struct { + NodeBase base; + UChar* s; + UChar* end; + unsigned int flag; + int capa; /* (allocated size - 1) or 0: use buf[] */ + UChar buf[NODE_STR_BUF_SIZE]; +} StrNode; + +typedef struct { + NodeBase base; + int state; + struct _Node* target; + int lower; + int upper; + int greedy; + int target_empty_info; + struct _Node* head_exact; + struct _Node* next_head_exact; + int is_refered; /* include called node. don't eliminate even if {0} */ +#ifdef USE_COMBINATION_EXPLOSION_CHECK + int comb_exp_check_num; /* 1,2,3...: check, 0: no check */ +#endif +} QtfrNode; + +typedef struct { + NodeBase base; + int state; + int type; + int regnum; + OnigOptionType option; + struct _Node* target; + AbsAddrType call_addr; + /* for multiple call reference */ + OnigDistance min_len; /* min length (byte) */ + OnigDistance max_len; /* max length (byte) */ + int char_len; /* character length */ + int opt_count; /* referenced count in optimize_node_left() */ +} EncloseNode; + +#ifdef USE_SUBEXP_CALL + +typedef struct { + int offset; + struct _Node* target; +} UnsetAddr; + +typedef struct { + int num; + int alloc; + UnsetAddr* us; +} UnsetAddrList; + +typedef struct { + NodeBase base; + int state; + int group_num; + UChar* name; + UChar* name_end; + struct _Node* target; /* EncloseNode : ENCLOSE_MEMORY */ + UnsetAddrList* unset_addr_list; +} CallNode; + +#endif + +typedef struct { + NodeBase base; + int state; + int back_num; + int back_static[NODE_BACKREFS_SIZE]; + int* back_dynamic; + int nest_level; +} BRefNode; + +typedef struct { + NodeBase base; + int type; + struct _Node* target; + int char_len; +} AnchorNode; + +typedef struct { + NodeBase base; + struct _Node* car; + struct _Node* cdr; +} ConsAltNode; + +typedef struct { + NodeBase base; + int ctype; + int not; +} CtypeNode; + +typedef struct _Node { + union { + NodeBase base; + StrNode str; + CClassNode cclass; + QtfrNode qtfr; + EncloseNode enclose; + BRefNode bref; + AnchorNode anchor; + ConsAltNode cons; + CtypeNode ctype; +#ifdef USE_SUBEXP_CALL + CallNode call; +#endif + } u; +} Node; + + +#define NULL_NODE ((Node* )0) + +#define SCANENV_MEMNODES_SIZE 8 +#define SCANENV_MEM_NODES(senv) \ + (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \ + (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static) + +typedef struct { + OnigOptionType option; + OnigCaseFoldType case_fold_flag; + OnigEncoding enc; + const OnigSyntaxType* syntax; + BitStatusType capture_history; + BitStatusType bt_mem_start; + BitStatusType bt_mem_end; + BitStatusType backrefed_mem; + UChar* pattern; + UChar* pattern_end; + UChar* error; + UChar* error_end; + regex_t* reg; /* for reg->names only */ + int num_call; +#ifdef USE_SUBEXP_CALL + UnsetAddrList* unset_addr_list; +#endif + int num_mem; +#ifdef USE_NAMED_GROUP + int num_named; +#endif + int mem_alloc; + Node* mem_nodes_static[SCANENV_MEMNODES_SIZE]; + Node** mem_nodes_dynamic; +#ifdef USE_COMBINATION_EXPLOSION_CHECK + int num_comb_exp_check; + int comb_exp_max_regnum; + int curr_max_regnum; + int has_recursion; +#endif +} ScanEnv; + + +#define IS_SYNTAX_OP(syn, opm) (((syn)->op & (opm)) != 0) +#define IS_SYNTAX_OP2(syn, opm) (((syn)->op2 & (opm)) != 0) +#define IS_SYNTAX_BV(syn, bvm) (((syn)->behavior & (bvm)) != 0) + +#ifdef USE_NAMED_GROUP +typedef struct { + int new_val; +} GroupNumRemap; + +extern int onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map)); +#endif + +extern int onig_strncmp P_((const UChar* s1, const UChar* s2, int n)); +extern void onig_strcpy P_((UChar* dest, const UChar* src, const UChar* end)); +extern void onig_scan_env_set_error_string P_((ScanEnv* env, int ecode, UChar* arg, UChar* arg_end)); +extern int onig_scan_unsigned_number P_((UChar** src, const UChar* end, OnigEncoding enc)); +extern void onig_reduce_nested_quantifier P_((Node* pnode, Node* cnode)); +extern void onig_node_conv_to_str_node P_((Node* node, int raw)); +extern int onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end)); +extern int onig_node_str_set P_((Node* node, const UChar* s, const UChar* end)); +extern void onig_node_free P_((Node* node)); +extern Node* onig_node_new_enclose P_((int type)); +extern Node* onig_node_new_anchor P_((int type)); +extern Node* onig_node_new_str P_((const UChar* s, const UChar* end)); +extern Node* onig_node_new_list P_((Node* left, Node* right)); +extern Node* onig_node_list_add P_((Node* list, Node* x)); +extern Node* onig_node_new_alt P_((Node* left, Node* right)); +extern void onig_node_str_clear P_((Node* node)); +extern int onig_free_node_list P_((void)); +extern int onig_names_free P_((regex_t* reg)); +extern int onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env)); +extern int onig_free_shared_cclass_table P_((void)); + +#ifdef ONIG_DEBUG +#ifdef USE_NAMED_GROUP +extern int onig_print_names(FILE*, regex_t*); +#endif +#endif + +#endif /* ONIGURUMA_REGPARSE_H */ diff --git a/lib/ruby-1.9.1-rc1/regsyntax.c b/lib/ruby-1.9.1-rc1/regsyntax.c new file mode 100644 index 0000000..96348b0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/regsyntax.c @@ -0,0 +1,315 @@ +/********************************************************************** + regsyntax.c - Oniguruma (regular expression library) +**********************************************************************/ +/*- + * Copyright (c) 2002-2006 K.Kosako + * 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. + * + * 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 "regint.h" + +const OnigSyntaxType OnigSyntaxASIS = { + 0 + , ONIG_SYN_OP2_INEFFECTIVE_ESCAPE + , 0 + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxPosixBasic = { + ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_ESC_LPAREN_SUBEXP | + ONIG_SYN_OP_ESC_BRACE_INTERVAL ) + , 0 + , 0 + , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE ) + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxPosixExtended = { + ( SYN_POSIX_COMMON_OP | ONIG_SYN_OP_LPAREN_SUBEXP | + ONIG_SYN_OP_BRACE_INTERVAL | + ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT ) + , 0 + , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | + ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | + ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP | + ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) + , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE ) + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxEmacs = { + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | + ONIG_SYN_OP_ESC_BRACE_INTERVAL | + ONIG_SYN_OP_ESC_LPAREN_SUBEXP | ONIG_SYN_OP_ESC_VBAR_ALT | + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | + ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_DECIMAL_BACKREF | + ONIG_SYN_OP_LINE_ANCHOR | ONIG_SYN_OP_ESC_CONTROL_CHARS ) + , ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR + , ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxGrep = { + ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_POSIX_BRACKET | + ONIG_SYN_OP_ESC_BRACE_INTERVAL | ONIG_SYN_OP_ESC_LPAREN_SUBEXP | + ONIG_SYN_OP_ESC_VBAR_ALT | + ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_ESC_PLUS_ONE_INF | + ONIG_SYN_OP_ESC_QMARK_ZERO_ONE | ONIG_SYN_OP_LINE_ANCHOR | + ONIG_SYN_OP_ESC_W_WORD | ONIG_SYN_OP_ESC_B_WORD_BOUND | + ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | ONIG_SYN_OP_DECIMAL_BACKREF ) + , 0 + , ( ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC | ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC ) + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxGnuRegex = { + SYN_GNU_REGEX_OP + , 0 + , SYN_GNU_REGEX_BV + , ONIG_OPTION_NONE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxJava = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_CONTROL_CHARS | ONIG_SYN_OP_ESC_C_CONTROL | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | ONIG_SYN_OP2_QMARK_GROUP_EFFECT | + ONIG_SYN_OP2_OPTION_PERL | ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT | + ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL | ONIG_SYN_OP2_CCLASS_SET_OP | + ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_U_HEX4 | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY ) + , ( SYN_GNU_REGEX_BV | ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +const OnigSyntaxType OnigSyntaxPerl = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | + ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT ) + , SYN_GNU_REGEX_BV + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + +/* Perl + named group */ +const OnigSyntaxType OnigSyntaxPerl_NG = { + (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY | + ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 | + ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS | + ONIG_SYN_OP_ESC_C_CONTROL ) + & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END ) + , ( ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE | + ONIG_SYN_OP2_QMARK_GROUP_EFFECT | ONIG_SYN_OP2_OPTION_PERL | + ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY | + ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT | + ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | + ONIG_SYN_OP2_ESC_K_NAMED_BACKREF | + ONIG_SYN_OP2_ESC_G_SUBEXP_CALL ) + , ( SYN_GNU_REGEX_BV | + ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | + ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME ) + , ONIG_OPTION_SINGLELINE + , + { + (OnigCodePoint )'\\' /* esc */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */ + , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */ + } +}; + + + +extern int +onig_set_default_syntax(const OnigSyntaxType* syntax) +{ + if (IS_NULL(syntax)) + syntax = ONIG_SYNTAX_RUBY; + + OnigDefaultSyntax = syntax; + return 0; +} + +extern void +onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from) +{ + *to = *from; +} + +extern void +onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op) +{ + syntax->op = op; +} + +extern void +onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2) +{ + syntax->op2 = op2; +} + +extern void +onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior) +{ + syntax->behavior = behavior; +} + +extern void +onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options) +{ + syntax->options = options; +} + +extern unsigned int +onig_get_syntax_op(OnigSyntaxType* syntax) +{ + return syntax->op; +} + +extern unsigned int +onig_get_syntax_op2(OnigSyntaxType* syntax) +{ + return syntax->op2; +} + +extern unsigned int +onig_get_syntax_behavior(OnigSyntaxType* syntax) +{ + return syntax->behavior; +} + +extern OnigOptionType +onig_get_syntax_options(OnigSyntaxType* syntax) +{ + return syntax->options; +} + +#ifdef USE_VARIABLE_META_CHARS +extern int onig_set_meta_char(OnigSyntaxType* enc, + unsigned int what, OnigCodePoint code) +{ + switch (what) { + case ONIG_META_CHAR_ESCAPE: + enc->meta_char_table.esc = code; + break; + case ONIG_META_CHAR_ANYCHAR: + enc->meta_char_table.anychar = code; + break; + case ONIG_META_CHAR_ANYTIME: + enc->meta_char_table.anytime = code; + break; + case ONIG_META_CHAR_ZERO_OR_ONE_TIME: + enc->meta_char_table.zero_or_one_time = code; + break; + case ONIG_META_CHAR_ONE_OR_MORE_TIME: + enc->meta_char_table.one_or_more_time = code; + break; + case ONIG_META_CHAR_ANYCHAR_ANYTIME: + enc->meta_char_table.anychar_anytime = code; + break; + default: + return ONIGERR_INVALID_ARGUMENT; + break; + } + return 0; +} +#endif /* USE_VARIABLE_META_CHARS */ diff --git a/lib/ruby-1.9.1-rc1/revision.h b/lib/ruby-1.9.1-rc1/revision.h new file mode 100644 index 0000000..51ab3d0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/revision.h @@ -0,0 +1 @@ +#define RUBY_REVISION 21203 diff --git a/lib/ruby-1.9.1-rc1/ruby.c b/lib/ruby-1.9.1-rc1/ruby.c new file mode 100644 index 0000000..7a9c2c9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/ruby.c @@ -0,0 +1,1841 @@ +/********************************************************************** + + ruby.c - + + $Author: yugui $ + created at: Tue Aug 10 12:47:31 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#ifdef __CYGWIN__ +#include +#include +#endif +#include "ruby/ruby.h" +#include "ruby/encoding.h" +#include "eval_intern.h" +#include "dln.h" +#include +#include +#include + +#ifdef __hpux +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif +#if defined(HAVE_FCNTL_H) +#include +#elif defined(HAVE_SYS_FCNTL_H) +#include +#endif +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +#endif + +#include "ruby/util.h" + +#ifndef HAVE_STDLIB_H +char *getenv(); +#endif + +VALUE rb_parser_get_yydebug(VALUE); +VALUE rb_parser_set_yydebug(VALUE, VALUE); + +const char *ruby_get_inplace_mode(void); +void ruby_set_inplace_mode(const char *); + +#define DISABLE_BIT(bit) (1U << disable_##bit) +enum disable_flag_bits { + disable_gems, + disable_rubyopt +}; + +#define DUMP_BIT(bit) (1U << dump_##bit) +enum dump_flag_bits { + dump_insns +}; + +struct cmdline_options { + int sflag, xflag; + int do_loop, do_print; + int do_check, do_line; + int do_split, do_search; + int usage; + int version; + int copyright; + unsigned int disable; + int verbose; + int yydebug; + int safe_level; + unsigned int setids; + unsigned int dump; + const char *script; + VALUE script_name; + VALUE e_script; + struct { + struct { + VALUE name; + int index; + } enc; + } src, ext, intern; + VALUE req_list; +}; + +static void init_ids(struct cmdline_options *); + +#define src_encoding_index GET_VM()->src_encoding_index + +static struct cmdline_options * +cmdline_options_init(struct cmdline_options *opt) +{ + MEMZERO(opt, *opt, 1); + init_ids(opt); + opt->src.enc.index = src_encoding_index; + return opt; +} + +struct cmdline_arguments { + int argc; + char **argv; + struct cmdline_options *opt; +}; + +static NODE *load_file(VALUE, const char *, int, struct cmdline_options *); +static void forbid_setid(const char *, struct cmdline_options *); +#define forbid_setid(s) forbid_setid(s, opt) + +static struct { + int argc; + char **argv; +#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) + int len; +#endif +} origarg; + +static void +usage(const char *name) +{ + /* This message really ought to be max 23 lines. + * Removed -h because the user already knows that option. Others? */ + + static const char *const usage_msg[] = { + "-0[octal] specify record separator (\\0, if no argument)", + "-a autosplit mode with -n or -p (splits $_ into $F)", + "-c check syntax only", + "-Cdirectory cd to directory, before executing your script", + "-d set debugging flags (set $DEBUG to true)", + "-e 'command' one line of script. Several -e's allowed. Omit [programfile]", + "-Eex[:in] specify the default external and internal character encodings", + "-Fpattern split() pattern for autosplit (-a)", + "-i[extension] edit ARGV files in place (make backup if extension supplied)", + "-Idirectory specify $LOAD_PATH directory (may be used more than once)", + "-l enable line ending processing", + "-n assume 'while gets(); ... end' loop around your script", + "-p assume loop like -n but print line also like sed", + "-rlibrary require the library, before executing your script", + "-s enable some switch parsing for switches after script name", + "-S look for the script using PATH environment variable", + "-T[level] turn on tainting checks", + "-v print version number, then turn on verbose mode", + "-w turn warnings on for your script", + "-W[level] set warning level; 0=silence, 1=medium, 2=verbose (default for level)", + "-x[directory] strip off text before #!ruby line and perhaps cd to directory", + "--copyright print the copyright", + "--version print the version", + NULL + }; + const char *const *p = usage_msg; + + printf("Usage: %s [switches] [--] [programfile] [arguments]\n", name); + while (*p) + printf(" %s\n", *p++); +} + +VALUE rb_get_load_path(void); + +#ifndef CharNext /* defined as CharNext[AW] on Windows. */ +#define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE)) +#endif + +#if defined DOSISH || defined __CYGWIN__ +static inline void +translate_char(char *p, int from, int to) +{ + while (*p) { + if ((unsigned char)*p == from) + *p = to; + p = CharNext(p); + } +} +#endif + +#if defined _WIN32 || defined __CYGWIN__ +static VALUE +rubylib_mangled_path(const char *s, unsigned int l) +{ + static char *newp, *oldp; + static int newl, oldl, notfound; + char *ptr; + VALUE ret; + + if (!newp && !notfound) { + newp = getenv("RUBYLIB_PREFIX"); + if (newp) { + oldp = newp = strdup(newp); + while (*newp && !ISSPACE(*newp) && *newp != ';') { + newp = CharNext(newp); /* Skip digits. */ + } + oldl = newp - oldp; + while (*newp && (ISSPACE(*newp) || *newp == ';')) { + newp = CharNext(newp); /* Skip whitespace. */ + } + newl = strlen(newp); + if (newl == 0 || oldl == 0) { + rb_fatal("malformed RUBYLIB_PREFIX"); + } + translate_char(newp, '\\', '/'); + } + else { + notfound = 1; + } + } + if (!newp || l < oldl || STRNCASECMP(oldp, s, oldl) != 0) { + return rb_str_new(s, l); + } + ret = rb_str_new(0, l + newl - oldl); + ptr = RSTRING_PTR(ret); + memcpy(ptr, newp, newl); + memcpy(ptr + newl, s + oldl, l - oldl); + ptr[l + newl - oldl] = 0; + return ret; +} + +static VALUE +rubylib_mangled_path2(const char *s) +{ + return rubylib_mangled_path(s, strlen(s)); +} +#else +#define rubylib_mangled_path rb_str_new +#define rubylib_mangled_path2 rb_str_new_cstr +#endif + +static void +push_include(const char *path, VALUE (*filter)(VALUE)) +{ + const char sep = PATH_SEP_CHAR; + const char *p, *s; + VALUE load_path = GET_VM()->load_path; + + p = path; + while (*p) { + while (*p == sep) + p++; + if (!*p) break; + for (s = p; *s && *s != sep; s = CharNext(s)); + rb_ary_push(load_path, (*filter)(rubylib_mangled_path(p, s - p))); + p = s; + } +} + +#ifdef __CYGWIN__ +static void +push_include_cygwin(const char *path, VALUE (*filter)(VALUE)) +{ + const char *p, *s; + char rubylib[FILENAME_MAX]; + VALUE buf = 0; + + p = path; + while (*p) { + unsigned int len; + while (*p == ';') + p++; + if (!*p) break; + for (s = p; *s && *s != ';'; s = CharNext(s)); + len = s - p; + if (*s) { + if (!buf) { + buf = rb_str_new(p, len); + p = RSTRING_PTR(buf); + } + else { + rb_str_resize(buf, len); + p = strncpy(RSTRING_PTR(buf), p, len); + } + } + if (cygwin_conv_to_posix_path(p, rubylib) == 0) + p = rubylib; + push_include(p, filter); + if (!*s) break; + p = s + 1; + } +} + +#define push_include push_include_cygwin +#endif + +void +ruby_push_include(const char *path, VALUE (*filter)(VALUE)) +{ + if (path == 0) + return; + push_include(path, filter); +} + +static VALUE +identical_path(VALUE path) +{ + return path; +} +static VALUE +locale_path(VALUE path) +{ + rb_enc_associate(path, rb_locale_encoding()); + return path; +} + +void +ruby_incpush(const char *path) +{ + ruby_push_include(path, locale_path); +} + +static VALUE +expand_include_path(VALUE path) +{ + char *p = RSTRING_PTR(path); + if (!p) + return path; + if (*p == '.' && p[1] == '/') + return path; + return rb_file_expand_path(path, Qnil); +} + +void +ruby_incpush_expand(const char *path) +{ + ruby_push_include(path, expand_include_path); +} + +#if defined DOSISH || defined __CYGWIN__ +#define LOAD_RELATIVE 1 +#endif + +#if defined _WIN32 || defined __CYGWIN__ +static HMODULE libruby; + +BOOL WINAPI +DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved) +{ + if (reason == DLL_PROCESS_ATTACH) + libruby = dll; + return TRUE; +} +#endif + +void ruby_init_loadpath_safe(int safe_level); + +void +ruby_init_loadpath(void) +{ + ruby_init_loadpath_safe(0); +} + +void +ruby_init_loadpath_safe(int safe_level) +{ + VALUE load_path; +#if defined LOAD_RELATIVE + char libpath[MAXPATHLEN + 1]; + char *p; + int rest; + +#if defined _WIN32 || defined __CYGWIN__ + GetModuleFileName(libruby, libpath, sizeof libpath); +#elif defined(__EMX__) + _execname(libpath, sizeof(libpath) - 1); +#endif + + libpath[sizeof(libpath) - 1] = '\0'; +#if defined DOSISH + translate_char(libpath, '\\', '/'); +#elif defined __CYGWIN__ + { + char rubylib[FILENAME_MAX]; + cygwin_conv_to_posix_path(libpath, rubylib); + strncpy(libpath, rubylib, sizeof(libpath)); + } +#endif + p = strrchr(libpath, '/'); + if (p) { + *p = 0; + if (p - libpath > 3 && !STRCASECMP(p - 4, "/bin")) { + p -= 4; + *p = 0; + } + } + else { + strcpy(libpath, "."); + p = libpath + 1; + } + + rest = sizeof(libpath) - 1 - (p - libpath); + +#define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath) +#else +#define RUBY_RELATIVE(path) (path) +#endif +#define incpush(path) rb_ary_push(load_path, rubylib_mangled_path2(path)) + load_path = GET_VM()->load_path; + + if (safe_level == 0) { + ruby_push_include(getenv("RUBYLIB"), identical_path); + } + +#ifdef RUBY_SEARCH_PATH + incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH)); +#endif + + incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); +#ifdef RUBY_SITE_THIN_ARCHLIB + incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); +#endif + incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); + + incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2)); +#ifdef RUBY_VENDOR_THIN_ARCHLIB + incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB)); +#endif + incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB)); + + incpush(RUBY_RELATIVE(RUBY_LIB)); +#ifdef RUBY_THIN_ARCHLIB + incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); +#endif + incpush(RUBY_RELATIVE(RUBY_ARCHLIB)); + + if (safe_level == 0) { + incpush("."); + } +} + + +static void +add_modules(struct cmdline_options *opt, const char *mod) +{ + VALUE list = opt->req_list; + + if (!list) { + opt->req_list = list = rb_ary_new(); + RBASIC(list)->klass = 0; + } + rb_ary_push(list, rb_obj_freeze(rb_str_new2(mod))); +} + +extern void Init_ext(void); +extern VALUE rb_vm_top_self(void); + +static void +require_libraries(struct cmdline_options *opt) +{ + VALUE list = opt->req_list; + ID require; + rb_thread_t *th = GET_THREAD(); + rb_block_t *prev_base_block = th->base_block; + th->base_block = 0; + + Init_ext(); /* should be called here for some reason :-( */ + CONST_ID(require, "require"); + while (list && RARRAY_LEN(list) > 0) { + VALUE feature = rb_ary_shift(list); + rb_funcall2(rb_vm_top_self(), require, 1, &feature); + } + opt->req_list = 0; + th->base_block = prev_base_block; +} + +static void +process_sflag(struct cmdline_options *opt) +{ + if (opt->sflag) { + long n; + VALUE *args; + VALUE argv = rb_argv; + + n = RARRAY_LEN(argv); + args = RARRAY_PTR(argv); + while (n > 0) { + VALUE v = *args++; + char *s = StringValuePtr(v); + char *p; + int hyphen = Qfalse; + + if (s[0] != '-') + break; + n--; + if (s[1] == '-' && s[2] == '\0') + break; + + v = Qtrue; + /* check if valid name before replacing - with _ */ + for (p = s + 1; *p; p++) { + if (*p == '=') { + *p++ = '\0'; + v = rb_str_new2(p); + break; + } + if (*p == '-') { + hyphen = Qtrue; + } + else if (*p != '_' && !ISALNUM(*p)) { + VALUE name_error[2]; + name_error[0] = + rb_str_new2("invalid name for global variable - "); + if (!(p = strchr(p, '='))) { + rb_str_cat2(name_error[0], s); + } + else { + rb_str_cat(name_error[0], s, p - s); + } + name_error[1] = args[-1]; + rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError)); + } + } + s[0] = '$'; + if (hyphen) { + for (p = s + 1; *p; ++p) { + if (*p == '-') + *p = '_'; + } + } + rb_gv_set(s, v); + } + n = RARRAY_LEN(argv) - n; + while (n--) { + rb_ary_shift(argv); + } + } + opt->sflag = 0; +} + +NODE *rb_parser_append_print(VALUE, NODE *); +NODE *rb_parser_while_loop(VALUE, NODE *, int, int); +static int proc_options(int argc, char **argv, struct cmdline_options *opt, int envopt); + +static void +moreswitches(const char *s, struct cmdline_options *opt, int envopt) +{ + int argc, i; + char **argv, *p; + const char *ap = 0; + VALUE argstr, argary; + + while (ISSPACE(*s)) s++; + if (!*s) return; + argstr = rb_str_tmp_new(strlen(s) + 2); + argary = rb_str_tmp_new(0); + + p = RSTRING_PTR(argstr); + *p++ = ' '; + strcpy(p, s); + ap = 0; + rb_str_cat(argary, (char *)&ap, sizeof(ap)); + while (*p) { + ap = p; + rb_str_cat(argary, (char *)&ap, sizeof(ap)); + while (*p && !ISSPACE(*p)) ++p; + if (!*p) break; + *p++ = '\0'; + while (ISSPACE(*p)) ++p; + } + argc = RSTRING_LEN(argary) / sizeof(ap); + ap = 0; + rb_str_cat(argary, (char *)&ap, sizeof(ap)); + argv = (char **)RSTRING_PTR(argary); + + while ((i = proc_options(argc, argv, opt, envopt)) > 1 && (argc -= i) > 0) { + argv += i; + if (**argv != '-') { + *--*argv = '-'; + } + if ((*argv)[1]) { + ++argc; + --argv; + } + } + + /* get rid of GC */ + rb_str_resize(argary, 0); + rb_str_resize(argstr, 0); +} + +#define NAME_MATCH_P(name, str, len) \ + ((len) < sizeof(name) && strncmp((str), name, (len)) == 0) + +#define UNSET_WHEN(name, bit, str, len) \ + if (NAME_MATCH_P(name, str, len)) { \ + *(unsigned int *)arg &= ~(bit); \ + return; \ + } + +#define SET_WHEN(name, bit, str, len) \ + if (NAME_MATCH_P(name, str, len)) { \ + *(unsigned int *)arg |= (bit); \ + return; \ + } + +static void +enable_option(const char *str, int len, void *arg) +{ +#define UNSET_WHEN_DISABLE(bit) UNSET_WHEN(#bit, DISABLE_BIT(bit), str, len) + UNSET_WHEN_DISABLE(gems); + UNSET_WHEN_DISABLE(rubyopt); + if (NAME_MATCH_P("all", str, len)) { + *(unsigned int *)arg = 0U; + return; + } + rb_warn("unknown argument for --enable: `%.*s'", len, str); +} + +static void +disable_option(const char *str, int len, void *arg) +{ +#define SET_WHEN_DISABLE(bit) SET_WHEN(#bit, DISABLE_BIT(bit), str, len) + SET_WHEN_DISABLE(gems); + SET_WHEN_DISABLE(rubyopt); + if (NAME_MATCH_P("all", str, len)) { + *(unsigned int *)arg = ~0U; + return; + } + rb_warn("unknown argument for --disable: `%.*s'", len, str); +} + +static void +dump_option(const char *str, int len, void *arg) +{ +#define SET_WHEN_DUMP(bit) SET_WHEN(#bit, DUMP_BIT(bit), str, len) + SET_WHEN_DUMP(insns); + rb_warn("don't know how to dump `%.*s', (insns)", len, str); +} + +static void +set_option_encoding_once(const char *type, VALUE *name, const char *e, int elen) +{ + VALUE ename; + + if (!elen) elen = strlen(e); + ename = rb_str_new(e, elen); + + if (*name && + rb_funcall(ename, rb_intern("casecmp"), 1, *name) != INT2FIX(0)) { + rb_raise(rb_eRuntimeError, + "%s already set to %s", type, RSTRING_PTR(*name)); + } + *name = ename; +} + +#define set_internal_encoding_once(opt, e, elen) \ + set_option_encoding_once("default_intenal", &opt->intern.enc.name, e, elen) +#define set_external_encoding_once(opt, e, elen) \ + set_option_encoding_once("default_extenal", &opt->ext.enc.name, e, elen) +#define set_source_encoding_once(opt, e, elen) \ + set_option_encoding_once("source", &opt->src.enc.name, e, elen) + +static int +proc_options(int argc, char **argv, struct cmdline_options *opt, int envopt) +{ + int n, argc0 = argc; + const char *s; + + if (argc == 0) + return 0; + + for (argc--, argv++; argc > 0; argc--, argv++) { + const char *const arg = argv[0]; + if (arg[0] != '-' || !arg[1]) + break; + + s = arg + 1; + reswitch: + switch (*s) { + case 'a': + if (envopt) goto noenvopt; + opt->do_split = Qtrue; + s++; + goto reswitch; + + case 'p': + if (envopt) goto noenvopt; + opt->do_print = Qtrue; + /* through */ + case 'n': + if (envopt) goto noenvopt; + opt->do_loop = Qtrue; + s++; + goto reswitch; + + case 'd': + ruby_debug = Qtrue; + ruby_verbose = Qtrue; + s++; + goto reswitch; + + case 'y': + if (envopt) goto noenvopt; + opt->yydebug = 1; + s++; + goto reswitch; + + case 'v': + if (opt->verbose) { + s++; + goto reswitch; + } + ruby_show_version(); + opt->verbose = 1; + case 'w': + ruby_verbose = Qtrue; + s++; + goto reswitch; + + case 'W': + { + int numlen; + int v = 2; /* -W as -W2 */ + + if (*++s) { + v = scan_oct(s, 1, &numlen); + if (numlen == 0) + v = 1; + s += numlen; + } + switch (v) { + case 0: + ruby_verbose = Qnil; + break; + case 1: + ruby_verbose = Qfalse; + break; + default: + ruby_verbose = Qtrue; + break; + } + } + goto reswitch; + + case 'c': + if (envopt) goto noenvopt; + opt->do_check = Qtrue; + s++; + goto reswitch; + + case 's': + if (envopt) goto noenvopt; + forbid_setid("-s"); + opt->sflag = 1; + s++; + goto reswitch; + + case 'h': + if (envopt) goto noenvopt; + usage(origarg.argv[0]); + rb_exit(EXIT_SUCCESS); + break; + + case 'l': + if (envopt) goto noenvopt; + opt->do_line = Qtrue; + rb_output_rs = rb_rs; + s++; + goto reswitch; + + case 'S': + if (envopt) goto noenvopt; + forbid_setid("-S"); + opt->do_search = Qtrue; + s++; + goto reswitch; + + case 'e': + if (envopt) goto noenvopt; + forbid_setid("-e"); + if (!*++s) { + s = argv[1]; + argc--, argv++; + } + if (!s) { + rb_raise(rb_eRuntimeError, "no code specified for -e"); + } + if (!opt->e_script) { + opt->e_script = rb_str_new(0, 0); + if (opt->script == 0) + opt->script = "-e"; + } + rb_str_cat2(opt->e_script, s); + rb_str_cat2(opt->e_script, "\n"); + break; + + case 'r': + forbid_setid("-r"); + if (*++s) { + add_modules(opt, s); + } + else if (argv[1]) { + add_modules(opt, argv[1]); + argc--, argv++; + } + break; + + case 'i': + if (envopt) goto noenvopt; + forbid_setid("-i"); + ruby_set_inplace_mode(s + 1); + break; + + case 'x': + if (envopt) goto noenvopt; + opt->xflag = Qtrue; + s++; + if (*s && chdir(s) < 0) { + rb_fatal("Can't chdir to %s", s); + } + break; + + case 'C': + case 'X': + if (envopt) goto noenvopt; + s++; + if (!*s) { + s = argv[1]; + argc--, argv++; + } + if (!s || !*s) { + rb_fatal("Can't chdir"); + } + if (chdir(s) < 0) { + rb_fatal("Can't chdir to %s", s); + } + break; + + case 'F': + if (envopt) goto noenvopt; + if (*++s) { + rb_fs = rb_reg_new(s, strlen(s), 0); + } + break; + + case 'E': + if (!*++s && (!--argc || !(s = *++argv))) { + rb_raise(rb_eRuntimeError, "missing argument for -E"); + } + goto encoding; + + case 'U': + set_internal_encoding_once(opt, "UTF-8", 0); + ++s; + goto reswitch; + + case 'K': + if (*++s) { + const char *enc_name = 0; + switch (*s) { + case 'E': case 'e': + enc_name = "EUC-JP"; + break; + case 'S': case 's': + enc_name = "Windows-31J"; + break; + case 'U': case 'u': + enc_name = "UTF-8"; + break; + case 'N': case 'n': case 'A': case 'a': + enc_name = "ASCII-8BIT"; + break; + } + if (enc_name) { + opt->src.enc.name = rb_str_new2(enc_name); + if (!opt->ext.enc.name) + opt->ext.enc.name = opt->src.enc.name; + } + s++; + } + goto reswitch; + + case 'T': + { + int numlen; + int v = 1; + + if (*++s) { + v = scan_oct(s, 2, &numlen); + if (numlen == 0) + v = 1; + s += numlen; + } + if (v > opt->safe_level) opt->safe_level = v; + } + goto reswitch; + + case 'I': + forbid_setid("-I"); + if (*++s) + ruby_incpush_expand(s); + else if (argv[1]) { + ruby_incpush_expand(argv[1]); + argc--, argv++; + } + break; + + case '0': + if (envopt) goto noenvopt; + { + int numlen; + int v; + char c; + + v = scan_oct(s, 4, &numlen); + s += numlen; + if (v > 0377) + rb_rs = Qnil; + else if (v == 0 && numlen >= 2) { + rb_rs = rb_str_new2("\n\n"); + } + else { + c = v & 0xff; + rb_rs = rb_str_new(&c, 1); + } + } + goto reswitch; + + case '-': + if (!s[1] || (s[1] == '\r' && !s[2])) { + argc--, argv++; + goto switch_end; + } + s++; + +# define is_option_end(c, allow_hyphen) \ + (!(c) || (allow_hyphen && (c) == '-') || (c) == '=') +# define check_envopt(name, allow_envopt) \ + ((allow_envopt || !envopt) ? (void)0 : \ + rb_raise(rb_eRuntimeError, "invalid switch in RUBYOPT: --" name)) +# define need_argument(name, s) \ + ((*s++ ? !*s : (!--argc || !(s = *++argv))) ? \ + rb_raise(rb_eRuntimeError, "missing argument for --" name) \ + : (void)0) +# define is_option_with_arg(name, allow_hyphen, allow_envopt) \ + (strncmp(name, s, n = sizeof(name) - 1) == 0 && is_option_end(s[n], allow_hyphen) ? \ + (check_envopt(name, allow_envopt), s += n, need_argument(name, s), 1) : 0) + + if (strcmp("copyright", s) == 0) { + if (envopt) goto noenvopt_long; + opt->copyright = 1; + } + else if (strcmp("debug", s) == 0) { + ruby_debug = Qtrue; + ruby_verbose = Qtrue; + } + else if (is_option_with_arg("enable", Qtrue, Qtrue)) { + ruby_each_words(s, enable_option, &opt->disable); + } + else if (is_option_with_arg("disable", Qtrue, Qtrue)) { + ruby_each_words(s, disable_option, &opt->disable); + } + else if (is_option_with_arg("encoding", Qfalse, Qtrue)) { + char *p; + encoding: + do { +# define set_encoding_part(type) \ + if (!(p = strchr(s, ':'))) { \ + set_##type##_encoding_once(opt, s, 0); \ + break; \ + } \ + else if (p > s) { \ + set_##type##_encoding_once(opt, s, p-s); \ + } + set_encoding_part(external); + if (!*(s = ++p)) break; + set_encoding_part(internal); + if (!*(s = ++p)) break; + rb_raise(rb_eRuntimeError, "extra argument for %s: %s", + (arg[1] == '-' ? "--encoding" : "-E"), s); +# undef set_encoding_part + } while (0); + } + else if (is_option_with_arg("internal-encoding", Qfalse, Qtrue)) { + set_internal_encoding_once(opt, s, 0); + } + else if (is_option_with_arg("external-encoding", Qfalse, Qtrue)) { + set_external_encoding_once(opt, s, 0); + } + else if (strcmp("version", s) == 0) { + if (envopt) goto noenvopt_long; + opt->version = 1; + } + else if (strcmp("verbose", s) == 0) { + opt->verbose = 1; + ruby_verbose = Qtrue; + } + else if (strcmp("yydebug", s) == 0) { + if (envopt) goto noenvopt_long; + opt->yydebug = 1; + } + else if (is_option_with_arg("dump", Qfalse, Qfalse)) { + ruby_each_words(s, dump_option, &opt->dump); + } + else if (strcmp("help", s) == 0) { + if (envopt) goto noenvopt_long; + usage(origarg.argv[0]); + rb_exit(EXIT_SUCCESS); + } + else { + rb_raise(rb_eRuntimeError, + "invalid option --%s (-h will show valid options)", s); + } + break; + + case '\r': + if (!s[1]) + break; + + default: + { + if (ISPRINT(*s)) { + rb_raise(rb_eRuntimeError, + "invalid option -%c (-h will show valid options)", + (int)(unsigned char)*s); + } + else { + rb_raise(rb_eRuntimeError, + "invalid option -\\x%02X (-h will show valid options)", + (int)(unsigned char)*s); + } + } + goto switch_end; + + noenvopt: + /* "EIdvwWrKU" only */ + rb_raise(rb_eRuntimeError, "invalid switch in RUBYOPT: -%c", *s); + break; + + noenvopt_long: + rb_raise(rb_eRuntimeError, "invalid switch in RUBYOPT: --%s", s); + break; + + case 0: + break; +# undef is_option_end +# undef check_envopt +# undef need_argument +# undef is_option_with_arg + } + } + + switch_end: + return argc0 - argc; +} + +void Init_prelude(void); + +static void +ruby_init_gems(int enable) +{ + if (enable) rb_define_module("Gem"); + Init_prelude(); +} + +static int +opt_enc_index(VALUE enc_name) +{ + const char *s = RSTRING_PTR(enc_name); + int i = rb_enc_find_index(s); + + if (i < 0) { + rb_raise(rb_eRuntimeError, "unknown encoding name - %s", s); + } + else if (rb_enc_dummy_p(rb_enc_from_index(i))) { + rb_raise(rb_eRuntimeError, "dummy encoding is not acceptable - %s ", s); + } + return i; +} + +#define rb_progname (GET_VM()->progname) +VALUE rb_argv0; + +static VALUE +false_value(void) +{ + return Qfalse; +} + +static VALUE +true_value(void) +{ + return Qtrue; +} + +#define rb_define_readonly_boolean(name, val) \ + rb_define_virtual_variable((name), (val) ? true_value : false_value, 0) + +static VALUE +uscore_get() +{ + VALUE line; + + line = rb_lastline_get(); + if (TYPE(line) != T_STRING) { + rb_raise(rb_eTypeError, "$_ value need to be String (%s given)", + NIL_P(line) ? "nil" : rb_obj_classname(line)); + } + return line; +} + +/* + * call-seq: + * sub(pattern, replacement) => $_ + * sub(pattern) { block } => $_ + * + * Equivalent to $_.sub(args), except that + * $_ will be updated if substitution occurs. + * Available only when -p/-n command line option specified. + */ + +static VALUE +rb_f_sub(argc, argv) + int argc; + VALUE *argv; +{ + VALUE str = rb_funcall3(uscore_get(), rb_intern("sub"), argc, argv); + rb_lastline_set(str); + return str; +} + +/* + * call-seq: + * gsub(pattern, replacement) => string + * gsub(pattern) {|...| block } => string + * + * Equivalent to $_.gsub..., except that $_ + * receives the modified result. + * Available only when -p/-n command line option specified. + * + */ + +static VALUE +rb_f_gsub(argc, argv) + int argc; + VALUE *argv; +{ + VALUE str = rb_funcall3(uscore_get(), rb_intern("gsub"), argc, argv); + rb_lastline_set(str); + return str; +} + +/* + * call-seq: + * chop => string + * + * Equivalent to ($_.dup).chop!, except nil + * is never returned. See String#chop!. + * Available only when -p/-n command line option specified. + * + */ + +static VALUE +rb_f_chop() +{ + VALUE str = rb_funcall3(uscore_get(), rb_intern("chop"), 0, 0); + rb_lastline_set(str); + return str; +} + + +/* + * call-seq: + * chomp => $_ + * chomp(string) => $_ + * + * Equivalent to $_ = $_.chomp(string). See + * String#chomp. + * Available only when -p/-n command line option specified. + * + */ + +static VALUE +rb_f_chomp(argc, argv) + int argc; + VALUE *argv; +{ + VALUE str = rb_funcall3(uscore_get(), rb_intern("chomp"), argc, argv); + rb_lastline_set(str); + return str; +} + +static VALUE +process_options(VALUE arg) +{ + struct cmdline_arguments *argp = (struct cmdline_arguments *)arg; + struct cmdline_options *opt = argp->opt; + int argc = argp->argc; + char **argv = argp->argv; + NODE *tree = 0; + VALUE parser; + VALUE iseq; + rb_encoding *enc, *lenc; + const char *s; + char fbuf[MAXPATHLEN]; + int i = proc_options(argc, argv, opt, 0); + rb_thread_t *th = GET_THREAD(); + rb_env_t *env = 0; + + argc -= i; + argv += i; + + if (!(opt->disable & DISABLE_BIT(rubyopt)) && + opt->safe_level == 0 && (s = getenv("RUBYOPT"))) { + VALUE src_enc_name = opt->src.enc.name; + VALUE ext_enc_name = opt->ext.enc.name; + VALUE int_enc_name = opt->intern.enc.name; + + opt->src.enc.name = opt->ext.enc.name = opt->intern.enc.name = 0; + moreswitches(s, opt, 1); + if (src_enc_name) + opt->src.enc.name = src_enc_name; + if (ext_enc_name) + opt->ext.enc.name = ext_enc_name; + if (int_enc_name) + opt->intern.enc.name = int_enc_name; + } + + if (opt->version) { + ruby_show_version(); + return Qtrue; + } + if (opt->copyright) { + ruby_show_copyright(); + } + + if (opt->safe_level >= 4) { + OBJ_TAINT(rb_argv); + OBJ_TAINT(GET_VM()->load_path); + } + + if (!opt->e_script) { + if (argc == 0) { /* no more args */ + if (opt->verbose) + return Qtrue; + opt->script = "-"; + } + else { + opt->script = argv[0]; + if (opt->script[0] == '\0') { + opt->script = "-"; + } + else if (opt->do_search) { + char *path = getenv("RUBYPATH"); + + opt->script = 0; + if (path) { + opt->script = dln_find_file_r(argv[0], path, fbuf, sizeof(fbuf)); + } + if (!opt->script) { + opt->script = dln_find_file_r(argv[0], getenv(PATH_ENV), fbuf, sizeof(fbuf)); + } + if (!opt->script) + opt->script = argv[0]; + } + argc--; + argv++; + } + } + + opt->script_name = rb_str_new_cstr(opt->script); + opt->script = RSTRING_PTR(opt->script_name); +#if defined DOSISH || defined __CYGWIN__ + translate_char(RSTRING_PTR(opt->script_name), '\\', '/'); +#endif + rb_obj_freeze(opt->script_name); + + ruby_init_loadpath_safe(opt->safe_level); + rb_enc_find_index("encdb"); + lenc = rb_locale_encoding(); + rb_enc_associate(rb_progname, lenc); + parser = rb_parser_new(); + if (opt->yydebug) rb_parser_set_yydebug(parser, Qtrue); + if (opt->ext.enc.name != 0) { + opt->ext.enc.index = opt_enc_index(opt->ext.enc.name); + } + if (opt->intern.enc.name != 0) { + opt->intern.enc.index = opt_enc_index(opt->intern.enc.name); + } + if (opt->src.enc.name != 0) { + opt->src.enc.index = opt_enc_index(opt->src.enc.name); + src_encoding_index = opt->src.enc.index; + } + if (opt->ext.enc.index >= 0) { + enc = rb_enc_from_index(opt->ext.enc.index); + } + else { + enc = lenc; + } + rb_enc_set_default_external(rb_enc_from_encoding(enc)); + if (opt->intern.enc.index >= 0) { + enc = rb_enc_from_index(opt->intern.enc.index); + rb_enc_set_default_internal(rb_enc_from_encoding(enc)); + opt->intern.enc.index = -1; + } + rb_enc_associate(opt->script_name, lenc); + { + long i; + VALUE load_path = GET_VM()->load_path; + for (i = 0; i < RARRAY_LEN(load_path); ++i) { + rb_enc_associate(RARRAY_PTR(load_path)[i], lenc); + } + } + ruby_init_gems(!(opt->disable & DISABLE_BIT(gems))); + ruby_set_argv(argc, argv); + process_sflag(opt); + + { + /* set eval context */ + VALUE toplevel_binding = rb_const_get(rb_cObject, rb_intern("TOPLEVEL_BINDING")); + rb_binding_t *bind; + + GetBindingPtr(toplevel_binding, bind); + GetEnvPtr(bind->env, env); + } + +#define PREPARE_PARSE_MAIN(expr) do { \ + th->parse_in_eval++; \ + th->base_block = &env->block; \ + expr; \ + th->parse_in_eval--; \ + th->base_block = 0; \ +} while (0) + + if (opt->e_script) { + rb_encoding *eenc; + if (opt->src.enc.index >= 0) { + eenc = rb_enc_from_index(opt->src.enc.index); + } + else { + eenc = lenc; + } + rb_enc_associate(opt->e_script, eenc); + require_libraries(opt); + + PREPARE_PARSE_MAIN({ + tree = rb_parser_compile_string(parser, opt->script, opt->e_script, 1); + }); + } + else { + if (opt->script[0] == '-' && !opt->script[1]) { + forbid_setid("program input from stdin"); + } + + PREPARE_PARSE_MAIN({ + tree = load_file(parser, opt->script, 1, opt); + }); + } + + if (opt->intern.enc.index >= 0) { + /* Set in the shebang line */ + enc = rb_enc_from_index(opt->intern.enc.index); + rb_enc_set_default_internal(rb_enc_from_encoding(enc)); + } + else if (!rb_default_internal_encoding()) + /* Freeze default_internal */ + rb_enc_set_default_internal(Qnil); + + if (!tree) return Qfalse; + + process_sflag(opt); + opt->xflag = 0; + + if (opt->safe_level >= 4) { + FL_UNSET(rb_argv, FL_TAINT); + FL_UNSET(GET_VM()->load_path, FL_TAINT); + } + + if (opt->do_check) { + printf("Syntax OK\n"); + return Qtrue; + } + + if (opt->do_print) { + PREPARE_PARSE_MAIN({ + tree = rb_parser_append_print(parser, tree); + }); + } + if (opt->do_loop) { + PREPARE_PARSE_MAIN({ + tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split); + }); + rb_define_global_function("sub", rb_f_sub, -1); + rb_define_global_function("gsub", rb_f_gsub, -1); + rb_define_global_function("chop", rb_f_chop, 0); + rb_define_global_function("chomp", rb_f_chomp, -1); + } + + PREPARE_PARSE_MAIN({ + iseq = rb_iseq_new_main(tree, opt->script_name); + }); + + if (opt->dump & DUMP_BIT(insns)) { + rb_io_write(rb_stdout, ruby_iseq_disasm(iseq)); + rb_io_flush(rb_stdout); + return Qtrue; + } + + rb_set_safe_level(opt->safe_level); + rb_progname = opt->script_name; + + return iseq; +} + +struct load_file_arg { + VALUE parser; + const char *fname; + int script; + struct cmdline_options *opt; +}; + +static VALUE +load_file_internal(VALUE arg) +{ + extern VALUE rb_stdin; + struct load_file_arg *argp = (struct load_file_arg *)arg; + VALUE parser = argp->parser; + const char *fname = argp->fname; + int script = argp->script; + struct cmdline_options *opt = argp->opt; + VALUE f; + int line_start = 1; + NODE *tree = 0; + rb_encoding *enc; + ID set_encoding; + + if (!fname) + rb_load_fail(fname); + if (strcmp(fname, "-") == 0) { + f = rb_stdin; + } + else { + int fd, mode = O_RDONLY; +#if defined DOSISH || defined __CYGWIN__ + { + const char *ext = strrchr(fname, '.'); + if (ext && STRCASECMP(ext, ".exe") == 0) + mode |= O_BINARY; + } +#endif + if ((fd = open(fname, mode)) < 0) { + rb_load_fail(fname); + } + + f = rb_io_fdopen(fd, mode, fname); + } + + CONST_ID(set_encoding, "set_encoding"); + if (script) { + VALUE c = 1; /* something not nil */ + VALUE line; + char *p; + int no_src_enc = !opt->src.enc.name; + int no_ext_enc = !opt->ext.enc.name; + int no_int_enc = !opt->intern.enc.name; + + enc = rb_ascii8bit_encoding(); + rb_funcall(f, set_encoding, 1, rb_enc_from_encoding(enc)); + + if (opt->xflag) { + forbid_setid("-x"); + opt->xflag = Qfalse; + while (!NIL_P(line = rb_io_gets(f))) { + line_start++; + if (RSTRING_LEN(line) > 2 + && RSTRING_PTR(line)[0] == '#' + && RSTRING_PTR(line)[1] == '!') { + if ((p = strstr(RSTRING_PTR(line), "ruby")) != 0) { + goto start_read; + } + } + } + rb_raise(rb_eLoadError, "no Ruby script found in input"); + } + + c = rb_io_getbyte(f); + if (c == INT2FIX('#')) { + c = rb_io_getbyte(f); + if (c == INT2FIX('!')) { + line = rb_io_gets(f); + if (NIL_P(line)) + return 0; + + if ((p = strstr(RSTRING_PTR(line), "ruby")) == 0) { + /* not ruby script, kick the program */ + char **argv; + char *path; + char *pend = RSTRING_PTR(line) + RSTRING_LEN(line); + + p = RSTRING_PTR(line); /* skip `#!' */ + if (pend[-1] == '\n') + pend--; /* chomp line */ + if (pend[-1] == '\r') + pend--; + *pend = '\0'; + while (p < pend && ISSPACE(*p)) + p++; + path = p; /* interpreter path */ + while (p < pend && !ISSPACE(*p)) + p++; + *p++ = '\0'; + if (p < pend) { + argv = ALLOCA_N(char *, origarg.argc + 3); + argv[1] = p; + MEMCPY(argv + 2, origarg.argv + 1, char *, origarg.argc); + } + else { + argv = origarg.argv; + } + argv[0] = path; + execv(path, argv); + + rb_fatal("Can't exec %s", path); + } + + start_read: + p += 4; + RSTRING_PTR(line)[RSTRING_LEN(line) - 1] = '\0'; + if (RSTRING_PTR(line)[RSTRING_LEN(line) - 2] == '\r') + RSTRING_PTR(line)[RSTRING_LEN(line) - 2] = '\0'; + if ((p = strstr(p, " -")) != 0) { + moreswitches(p + 1, opt, 0); + } + + /* push back shebang for pragma may exist in next line */ + rb_io_ungetbyte(f, rb_str_new2("!\n")); + } + else if (!NIL_P(c)) { + rb_io_ungetbyte(f, c); + } + rb_io_ungetbyte(f, INT2FIX('#')); + if (no_src_enc && opt->src.enc.name) { + opt->src.enc.index = opt_enc_index(opt->src.enc.name); + src_encoding_index = opt->src.enc.index; + } + if (no_ext_enc && opt->ext.enc.name) { + opt->ext.enc.index = opt_enc_index(opt->ext.enc.name); + } + if (no_int_enc && opt->intern.enc.name) { + opt->intern.enc.index = opt_enc_index(opt->intern.enc.name); + } + } + else if (!NIL_P(c)) { + rb_io_ungetbyte(f, c); + } + require_libraries(opt); /* Why here? unnatural */ + } + if (opt->src.enc.index >= 0) { + enc = rb_enc_from_index(opt->src.enc.index); + } + else if (f == rb_stdin) { + enc = rb_locale_encoding(); + } + else { + enc = rb_usascii_encoding(); + } + rb_funcall(f, set_encoding, 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-")); + tree = (NODE *)rb_parser_compile_file(parser, fname, f, line_start); + rb_funcall(f, set_encoding, 1, rb_parser_encoding(parser)); + if (script && rb_parser_end_seen_p(parser)) { + rb_define_global_const("DATA", f); + } + else if (f != rb_stdin) { + rb_io_close(f); + } + return (VALUE)tree; +} + +static VALUE +restore_lineno(VALUE lineno) +{ + return rb_gv_set("$.", lineno); +} + +static NODE * +load_file(VALUE parser, const char *fname, int script, struct cmdline_options *opt) +{ + struct load_file_arg arg; + arg.parser = parser; + arg.fname = fname; + arg.script = script; + arg.opt = opt; + return (NODE *)rb_ensure(load_file_internal, (VALUE)&arg, restore_lineno, rb_gv_get("$.")); +} + +void * +rb_load_file(const char *fname) +{ + struct cmdline_options opt; + + return load_file(rb_parser_new(), fname, 0, cmdline_options_init(&opt)); +} + +#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) +#if !defined(_WIN32) && !(defined(HAVE_SETENV) && defined(HAVE_UNSETENV)) +#define USE_ENVSPACE_FOR_ARG0 +#endif + +#ifdef USE_ENVSPACE_FOR_ARG0 +extern char **environ; +#endif + +static int +get_arglen(int argc, char **argv) +{ + char *s = argv[0]; + int i; + + if (!argc) return 0; + s += strlen(s); + /* See if all the arguments are contiguous in memory */ + for (i = 1; i < argc; i++) { + if (argv[i] == s + 1) { + s++; + s += strlen(s); /* this one is ok too */ + } + else { + break; + } + } +#if defined(USE_ENVSPACE_FOR_ARG0) + if (environ && (s == environ[0])) { + s += strlen(s); + for (i = 1; environ[i]; i++) { + if (environ[i] == s + 1) { + s++; + s += strlen(s); /* this one is ok too */ + } + } + ruby_setenv("", NULL); /* duplicate environ vars */ + } +#endif + return s - argv[0]; +} +#endif + +static void +set_arg0(VALUE val, ID id) +{ + char *s; + long i; + + if (origarg.argv == 0) + rb_raise(rb_eRuntimeError, "$0 not initialized"); + StringValue(val); + s = RSTRING_PTR(val); + i = RSTRING_LEN(val); +#if defined(PSTAT_SETCMD) + if (i > PST_CLEN) { + union pstun un; + char buf[PST_CLEN + 1]; /* PST_CLEN is 64 (HP-UX 11.23) */ + strlcpy(buf, s, sizeof(buf)); + un.pst_command = buf; + pstat(PSTAT_SETCMD, un, PST_CLEN, 0, 0); + } + else { + union pstun un; + un.pst_command = s; + pstat(PSTAT_SETCMD, un, i, 0, 0); + } +#elif defined(HAVE_SETPROCTITLE) + setproctitle("%.*s", (int)i, s); +#else + + if (i >= origarg.len) { + i = origarg.len; + } + + memcpy(origarg.argv[0], s, i); + + { + int j; + char *t = origarg.argv[0] + i; + *t = '\0'; + + if (i + 1 < origarg.len) memset(t + 1, ' ', origarg.len - i - 1); + for (j = 1; j < origarg.argc; j++) { + origarg.argv[j] = t; + } + } +#endif + rb_progname = rb_obj_freeze(rb_external_str_new(s, i)); +} + +void +ruby_script(const char *name) +{ + if (name) { + rb_progname = rb_obj_freeze(rb_external_str_new(name, strlen(name))); + } +} + +static void +init_ids(struct cmdline_options *opt) +{ + rb_uid_t uid = getuid(); + rb_uid_t euid = geteuid(); + rb_gid_t gid = getgid(); + rb_gid_t egid = getegid(); + + if (uid != euid) opt->setids |= 1; + if (egid != gid) opt->setids |= 2; + if (uid && opt->setids) { + if (opt->safe_level < 1) opt->safe_level = 1; + } +} + +#undef forbid_setid +static void +forbid_setid(const char *s, struct cmdline_options *opt) +{ + if (opt->setids & 1) + rb_raise(rb_eSecurityError, "no %s allowed while running setuid", s); + if (opt->setids & 2) + rb_raise(rb_eSecurityError, "no %s allowed while running setgid", s); + if (opt->safe_level > 0) + rb_raise(rb_eSecurityError, "no %s allowed in tainted mode", s); +} + +static void +verbose_setter(VALUE val, ID id, void *data) +{ + VALUE *variable = data; + *variable = RTEST(val) ? Qtrue : val; +} + +static VALUE +opt_W_getter(ID id, void *data) +{ + VALUE *variable = data; + switch (*variable) { + case Qnil: + return INT2FIX(0); + case Qfalse: + return INT2FIX(1); + case Qtrue: + return INT2FIX(2); + } + return Qnil; /* not reached */ +} + +void +ruby_prog_init(void) +{ + rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter); + rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter); + rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter); + rb_define_hooked_variable("$-W", &ruby_verbose, opt_W_getter, 0); + rb_define_variable("$DEBUG", &ruby_debug); + rb_define_variable("$-d", &ruby_debug); + + rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0); + rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0); + + rb_define_global_const("ARGV", rb_argv); +} + +void +ruby_set_argv(int argc, char **argv) +{ + int i; + VALUE av = rb_argv; + +#if defined(USE_DLN_A_OUT) + if (origarg.argv) + dln_argv0 = origarg.argv[0]; + else + dln_argv0 = argv[0]; +#endif + rb_ary_clear(av); + for (i = 0; i < argc; i++) { + VALUE arg = rb_external_str_new(argv[i], strlen(argv[i])); + + OBJ_FREEZE(arg); + rb_ary_push(av, arg); + } +} + +void * +ruby_process_options(int argc, char **argv) +{ + struct cmdline_arguments args; + struct cmdline_options opt; + NODE *tree; + + ruby_script(argv[0]); /* for the time being */ + rb_argv0 = rb_str_new4(rb_progname); + rb_gc_register_mark_object(rb_argv0); + args.argc = argc; + args.argv = argv; + args.opt = cmdline_options_init(&opt); + opt.ext.enc.index = -1; + opt.intern.enc.index = -1; + tree = (NODE *)rb_vm_call_cfunc(rb_vm_top_self(), + process_options, (VALUE)&args, + 0, rb_progname); + + rb_define_readonly_boolean("$-p", opt.do_print); + rb_define_readonly_boolean("$-l", opt.do_line); + rb_define_readonly_boolean("$-a", opt.do_split); + + return tree; +} + +void +ruby_sysinit(int *argc, char ***argv) +{ +#if defined(__APPLE__) && (defined(__MACH__) || defined(__DARWIN__)) + int i, n = *argc, len = 0; + char **v1 = *argv, **v2, *p; + + for (i = 0; i < n; ++i) { + len += strlen(v1[i]) + 1; + } + v2 = malloc((n + 1)* sizeof(char*) + len); + p = (char *)&v2[n + 1]; + for (i = 0; i < n; ++i) { + int l = strlen(v1[i]); + memcpy(p, v1[i], l + 1); + v2[i] = p; + p += l + 1; + } + v2[n] = 0; + *argv = v2; +#elif defined(_WIN32) + void rb_w32_sysinit(int *argc, char ***argv); + rb_w32_sysinit(argc, argv); +#endif + origarg.argc = *argc; + origarg.argv = *argv; +#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) + origarg.len = get_arglen(origarg.argc, origarg.argv); +#endif +#if defined(USE_DLN_A_OUT) + dln_argv0 = origarg.argv[0]; +#endif +} diff --git a/lib/ruby-1.9.1-rc1/rubytest.rb b/lib/ruby-1.9.1-rc1/rubytest.rb new file mode 100755 index 0000000..6c3939a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/rubytest.rb @@ -0,0 +1,49 @@ +#! ./miniruby + +exit if defined?(CROSS_COMPILING) +load './rbconfig.rb' +include RbConfig + +ruby = "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}" +unless File.exist? ruby + print "#{ruby} is not found.\n" + print "Try `make' first, then `make test', please.\n" + exit false +end + +if File.exist? CONFIG['LIBRUBY_SO'] + case RUBY_PLATFORM + when /-hpux/ + dldpath = "SHLIB_PATH" + when /-aix/ + dldpath = "LIBPATH" + when /-beos/ + dldpath = "LIBRARY_PATH" + when /-darwin/ + dldpath = "DYLD_LIBRARY_PATH" + else + dldpath = "LD_LIBRARY_PATH" + end + x = ENV[dldpath] + x = x ? ".:"+x : "." + ENV[dldpath] = x +end + +if /linux/ =~ RUBY_PLATFORM and File.exist? CONFIG['LIBRUBY_SO'] + ENV["LD_PRELOAD"] = "./#{CONFIG['LIBRUBY_SO']}" +end + +$stderr.reopen($stdout) +error = '' + +srcdir = File.dirname(__FILE__) +`#{ruby} -I.ext/#{RUBY_PLATFORM} -I#{srcdir}/lib #{srcdir}/sample/test.rb`.each_line do |line| + if line =~ /^end of test/ + print "\ntest succeeded\n" + exit true + end + error << line if %r:^(sample/test.rb|not): =~ line +end +print error +print "test failed\n" +exit false diff --git a/lib/ruby-1.9.1-rc1/runruby.rb b/lib/ruby-1.9.1-rc1/runruby.rb new file mode 100755 index 0000000..c439784 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/runruby.rb @@ -0,0 +1,79 @@ +#!./miniruby + +pure = true +while arg = ARGV[0] + break ARGV.shift if arg == '--' + /\A--([-\w]+)(?:=(.*))?\z/ =~ arg or break + arg, value = $1, $2 + re = Regexp.new('\A'+arg.gsub(/\w+\b/, '\&\\w*')+'\z', "i") + case + when re =~ "srcdir" + srcdir = value + when re =~ "archdir" + archdir = value + when re =~ "extout" + extout = value + when re =~ "pure" + pure = (value != "no") + when re =~ "debugger" + debugger = value ? (value.split unless value == "no") : %w"gdb --args" + else + break + end + ARGV.shift +end + +srcdir ||= File.dirname(__FILE__) +archdir ||= '.' + +abs_archdir = File.expand_path(archdir) +$:.unshift(abs_archdir) + +require 'rbconfig' +config = RbConfig::CONFIG + +ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) +unless File.exist?(ruby) + abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n" +end + +libs = [abs_archdir] +if extout + abs_extout = File.expand_path(extout) + libs << File.expand_path("common", abs_extout) << File.expand_path(RUBY_PLATFORM, abs_extout) +end +libs << File.expand_path("lib", srcdir) +config["bindir"] = abs_archdir + +env = {} + +env["RUBY"] = File.expand_path(ruby) +env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR) + +if pure + libs << File.expand_path("ext", srcdir) << "-" +elsif e = ENV["RUBYLIB"] + libs |= e.split(File::PATH_SEPARATOR) +end +env["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR) + +libruby_so = File.join(abs_archdir, config['LIBRUBY_SO']) +if File.file?(libruby_so) + if e = config['LIBPATHENV'] and !e.empty? + env[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR) + end + if /linux/ =~ RUBY_PLATFORM + env["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ') + end +end + +ENV.update env + +cmd = [ruby] +cmd << "-rpurelib.rb" if pure +cmd.concat(ARGV) +cmd.unshift(*debugger) if debugger + +#require 'shellwords'; puts Shellwords.join(env.map {|k,v| "#{k}=#{v}" } + cmd) + +exec(*cmd) diff --git a/lib/ruby-1.9.1-rc1/safe.c b/lib/ruby-1.9.1-rc1/safe.c new file mode 100644 index 0000000..6a6be15 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/safe.c @@ -0,0 +1,129 @@ +/********************************************************************** + + eval.c - + + $Author: yugui $ + created at: Tue Sep 23 09:44:32 JST 2008 + + Copyright (C) 2008 Yukihiro Matsumoto + +**********************************************************************/ + +/* safe-level: + 0 - strings from streams/environment/ARGV are tainted (default) + 1 - no dangerous operation by tainted value + 2 - process/file operations prohibited + 3 - all generated objects are tainted + 4 - no global (non-tainted) variable modification/no direct output +*/ + +#define SAFE_LEVEL_MAX 4 + +#include "ruby/ruby.h" +#include "vm_core.h" + +/* $SAFE accessor */ + +int +rb_safe_level(void) +{ + return GET_THREAD()->safe_level; +} + +void +rb_set_safe_level_force(int safe) +{ + GET_THREAD()->safe_level = safe; +} + +void +rb_set_safe_level(int level) +{ + rb_thread_t *th = GET_THREAD(); + + if (level > th->safe_level) { + if (level > SAFE_LEVEL_MAX) { + level = SAFE_LEVEL_MAX; + } + th->safe_level = level; + } +} + +static VALUE +safe_getter(void) +{ + return INT2NUM(rb_safe_level()); +} + +static void +safe_setter(VALUE val) +{ + int level = NUM2INT(val); + rb_thread_t *th = GET_THREAD(); + + if (level < th->safe_level) { + rb_raise(rb_eSecurityError, + "tried to downgrade safe level from %d to %d", + th->safe_level, level); + } + if (level == 3) { + rb_warning("$SAFE=3 does no sandboxing; you might want to use $SAFE=4"); + } + if (level > SAFE_LEVEL_MAX) { + level = SAFE_LEVEL_MAX; + } + th->safe_level = level; +} + +void +rb_secure(int level) +{ + if (level <= rb_safe_level()) { + if (rb_frame_callee()) { + rb_raise(rb_eSecurityError, "Insecure operation `%s' at level %d", + rb_id2name(rb_frame_callee()), rb_safe_level()); + } + else { + rb_raise(rb_eSecurityError, "Insecure operation at level %d", + rb_safe_level()); + } + } +} + +void +rb_secure_update(VALUE obj) +{ + if (!OBJ_TAINTED(obj)) + rb_secure(4); +} + +void +rb_check_safe_obj(VALUE x) +{ + if (rb_safe_level() > 0 && OBJ_TAINTED(x)) { + if (rb_frame_callee()) { + rb_raise(rb_eSecurityError, "Insecure operation - %s", + rb_id2name(rb_frame_callee())); + } + else { + rb_raise(rb_eSecurityError, "Insecure operation: -r"); + } + } + rb_secure(4); +} + +void +rb_check_safe_str(VALUE x) +{ + rb_check_safe_obj(x); + if (TYPE(x) != T_STRING) { + rb_raise(rb_eTypeError, "wrong argument type %s (expected String)", + rb_obj_classname(x)); + } +} + +void +Init_safe(void) +{ + rb_define_virtual_variable("$SAFE", safe_getter, safe_setter); +} diff --git a/lib/ruby-1.9.1-rc1/sample/README b/lib/ruby-1.9.1-rc1/sample/README new file mode 100644 index 0000000..9187a9d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/README @@ -0,0 +1,47 @@ +README this file +biorhythm.rb biorhythm calculator +cal.rb cal(1) clone +cbreak.rb no echo done by ioctl +clnt.rb socket client +dir.rb directory access +dualstack-fetch.rb IPv6 demo +dualstack-httpd.rb IPv6 demo +dstore.rb object database on dbm +eval.rb simple evaluator +export.rb method access example +exyacc.rb extrace BNF from yacc file +fact.rb factorial calculator +fib.awk Fibonacci number (AWK) +fib.pl Fibonacci number (Perl) +fib.py Fibonacci number (Python) +fib.rb Fibonacci number (Ruby) +fib.scm Fibonacci number (Scheme) +freq.rb count word occurrence +from.rb scan mail spool +fullpath.rb convert ls -lR to fullpath format +io.rb io test +irb.rb interactive ruby +less.rb front end for less +list.rb stupid object sample +list2.rb stupid object sample +list3.rb stupid object sample +mine.rb simple mine sweeper +mkproto.rb extract prototype from C +mpart.rb split file int multi part +observ.rb observer design pattern sample +occur.pl count word occurrence (Perl) +occur.rb count word occurrence (Ruby) +occur2.rb count word occurrence - another style +philos.rb famous dining philosophers +pi.rb calculate PI +rcs.awk random character stereogram (AWK) +rcs.rb random character stereogram (Ruby) +rcs.dat data for random character stereogram +rd2html.rb rd (Ruby Document) to HTML translator +sieve.rb sieve of Eratosthenes +svr.rb socket server +test.rb test suite used by `make test' +time.rb /usr/bin/time clone +trojan.rb simple tool to find file that may be trojan horse. +tsvr.rb socket server using thread +uumerge.rb merge files and uudecode them diff --git a/lib/ruby-1.9.1-rc1/sample/biorhythm.rb b/lib/ruby-1.9.1-rc1/sample/biorhythm.rb new file mode 100644 index 0000000..92eb6bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/biorhythm.rb @@ -0,0 +1,124 @@ +#!/usr/local/bin/ruby +# +# biorhythm.rb - +# $Release Version: $ +# $Revision: 14912 $ +# by Yasuo OHBA(STAFS Development Room) +# +# -- +# +# +# + +# probably based on: +# +# Newsgroups: comp.sources.misc,de.comp.sources.os9 +# From: fkk@stasys.sta.sub.org (Frank Kaefer) +# Subject: v41i126: br - Biorhythm v3.0, Part01/01 +# Message-ID: <1994Feb1.070616.15982@sparky.sterling.com> +# Sender: kent@sparky.sterling.com (Kent Landfield) +# Organization: Sterling Software +# Date: Tue, 1 Feb 1994 07:06:16 GMT +# +# Posting-number: Volume 41, Issue 126 +# Archive-name: br/part01 +# Environment: basic, dos, os9 + +include Math +require "date.rb" +require "optparse" +require "optparse/date" + +def printHeader(y, m, d, p, w) + print "\n>>> Biorhythm <<<\n" + printf "The birthday %04d.%02d.%02d is a %s\n", y, m, d, w + printf "Age in days: [%d]\n\n", p +end + +def getPosition(z) + pi = Math::PI + z = Integer(z) + phys = (50.0 * (1.0 + sin((z / 23.0 - (z / 23)) * 360.0 * pi / 180.0))).to_i + emot = (50.0 * (1.0 + sin((z / 28.0 - (z / 28)) * 360.0 * pi / 180.0))).to_i + geist =(50.0 * (1.0 + sin((z / 33.0 - (z / 33)) * 360.0 * pi / 180.0))).to_i + return phys, emot, geist +end + +def prompt(msg) + $stderr.print msg + return gets.chomp +end + +# +# main program +# +options = { + :graph => true, + :date => Date.today, + :days => 9, +} +ARGV.options do |opts| + opts.on("-b", "--birthday=DATE", Date, "specify your birthday"){|v| + options[:birthday] = v + } + opts.on("--date=DATE", Date, "specify date to show"){|v| + options[:date] = v + } + opts.on("-g", "--show-graph", TrueClass, "show graph (default)"){|v| + options[:graph] = v + } + opts.on("-v", "--show-values", TrueClass, "show values"){|v| + options[:graph] = !v + } + opts.on("--days=DAYS", Integer, "graph range (only in effect for graph)"){|v| + options[:days] = v - 1 + } + opts.on_tail("-h", "--help", "show this message"){puts opts; exit} + begin + opts.parse! + rescue => ex + puts "Error: #{ex.message}" + puts opts + exit + end +end + +bd = options[:birthday] || Date.parse(prompt("Your birthday (YYYYMMDD): ")) +dd = options[:date] || Date.today +ausgabeart = options[:graph] ? "g" : "v" +display_period = options[:days] + +if ausgabeart == "v" + printHeader(bd.year, bd.month, bd.day, dd - bd, bd.strftime("%a")) + print "\n" + + phys, emot, geist = getPosition(dd - bd) + printf "Biorhythm: %04d.%02d.%02d\n", dd.year, dd.month, dd.day + printf "Physical: %d%%\n", phys + printf "Emotional: %d%%\n", emot + printf "Mental: %d%%\n", geist + print "\n" +else + printHeader(bd.year, bd.month, bd.day, dd - bd, bd.strftime("%a")) + print " P=physical, E=emotional, M=mental\n" + print " -------------------------+-------------------------\n" + print " Bad Condition | Good Condition\n" + print " -------------------------+-------------------------\n" + + (dd - bd).step(dd - bd + display_period) do |z| + phys, emot, geist = getPosition(z) + + printf "%04d.%02d.%02d : ", dd.year, dd.month, dd.day + p = (phys / 2.0 + 0.5).to_i + e = (emot / 2.0 + 0.5).to_i + g = (geist / 2.0 + 0.5).to_i + graph = "." * 51 + graph[25] = ?| + graph[p] = ?P + graph[e] = ?E + graph[g] = ?M + print graph, "\n" + dd = dd + 1 + end + print " -------------------------+-------------------------\n\n" +end diff --git a/lib/ruby-1.9.1-rc1/sample/cal.rb b/lib/ruby-1.9.1-rc1/sample/cal.rb new file mode 100644 index 0000000..3876574 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/cal.rb @@ -0,0 +1,166 @@ +#! /usr/bin/env ruby + +# cal.rb: Written by Tadayoshi Funaba 1998-2004,2006,2008 +# $Id: cal.rb,v 2.11 2008-01-06 08:42:17+09 tadf Exp $ + +require 'date' + +class Cal + + START = + { + 'cn' => Date::GREGORIAN, # China + 'de' => 2342032, # Germany (protestant states) + 'dk' => 2342032, # Denmark + 'es' => 2299161, # Spain + 'fi' => 2361390, # Finland + 'fr' => 2299227, # France + 'gb' => 2361222, # United Kingdom + 'gr' => 2423868, # Greece + 'hu' => 2301004, # Hungary + 'it' => 2299161, # Italy + 'jp' => Date::GREGORIAN, # Japan + 'no' => 2342032, # Norway + 'pl' => 2299161, # Poland + 'pt' => 2299161, # Portugal + 'ru' => 2421639, # Russia + 'se' => 2361390, # Sweden + 'us' => 2361222, # United States + 'os' => Date::JULIAN, # (old style) + 'ns' => Date::GREGORIAN # (new style) + } + + DEFAULT_START = 'gb' + + def initialize + opt_j; opt_m; opt_t; opt_y; opt_c + end + + def opt_j(flag=false) @opt_j = flag end + def opt_m(flag=false) @opt_m = flag end + def opt_t(flag=false) @opt_t = flag end + def opt_y(flag=false) @opt_y = flag end + + def opt_c(arg=DEFAULT_START) @start = START[arg] end + + def set_params + @dw = if @opt_j then 3 else 2 end + @mw = (@dw + 1) * 7 - 1 + @mn = if @opt_j then 2 else 3 end + @tw = (@mw + 2) * @mn - 2 + @k = if @opt_m then 1 else 0 end + @da = if @opt_j then :yday else :mday end + end + + def pict(y, m) + d = (1..31).detect{|x| Date.valid_date?(y, m, x, @start)} + fi = Date.new(y, m, d, @start) + fi -= (fi.jd - @k + 1) % 7 + + ve = (fi..fi + 6).collect{|cu| + %w(S M Tu W Th F S)[cu.wday] + } + ve += (fi..fi + 41).collect{|cu| + if cu.mon == m then cu.send(@da) end.to_s + } + + ve = ve.collect{|e| e.rjust(@dw)} + + gr = group(ve, 7) + gr = trans(gr) if @opt_t + ta = gr.collect{|xs| xs.join(' ')} + + ca = %w(January February March April May June July + August September October November December)[m - 1] + ca = ca + ' ' + y.to_s if !@opt_y + ca = ca.center(@mw) + + ta.unshift(ca) + end + + def group(xs, n) + (0..xs.size / n - 1).collect{|i| xs[i * n, n]} + end + + def trans(xs) + (0..xs[0].size - 1).collect{|i| xs.collect{|x| x[i]}} + end + + def stack(xs) + if xs.empty? then [] else xs[0] + stack(xs[1..-1]) end + end + + def block(xs, n) + stack(group(xs, n).collect{|ys| trans(ys).collect{|zs| zs.join(' ')}}) + end + + def unlines(xs) + xs.collect{|x| x + "\n"}.join + end + + def monthly(y, m) + unlines(pict(y, m)) + end + + def addmon(y, m, n) + y, m = (y * 12 + (m - 1) + n).divmod(12) + return y, m + 1 + end + + def yearly(y) + y.to_s.center(@tw) + "\n\n" + + unlines(block((0..11).collect{|n| pict(*addmon(y, 1, n))}, @mn)) + "\n" + end + + def print(y, m) + set_params + if @opt_y then yearly(y) else monthly(y, m) end + end + +end + +if __FILE__ == $0 + + require 'getoptlong' + + def usage + warn 'usage: cal [-c iso3166] [-jmty] [[month] year]' + exit 1 + end + + cal = Cal.new + + begin + GetoptLong.new(['-c', GetoptLong::REQUIRED_ARGUMENT], + ['-j', GetoptLong::NO_ARGUMENT], + ['-m', GetoptLong::NO_ARGUMENT], + ['-t', GetoptLong::NO_ARGUMENT], + ['-y', GetoptLong::NO_ARGUMENT]). + each do |opt, arg| + case opt + when '-c'; cal.opt_c(arg) || raise + when '-j'; cal.opt_j(true) + when '-m'; cal.opt_m(true) + when '-t'; cal.opt_t(true) + when '-y'; cal.opt_y(true) + end + end + rescue + usage + end + + y, m = ARGV.values_at(1, 0).compact.collect{|x| x.to_i} + cal.opt_y(true) if y && !m + + to = Date.today + y ||= to.year + m ||= to.mon + + usage unless m >= 1 && m <= 12 + usage unless y >= -4712 + + print cal.print(y, m) + +end + +# See Bird & Wadler's Introduction to functional programming 4.5. diff --git a/lib/ruby-1.9.1-rc1/sample/cbreak.rb b/lib/ruby-1.9.1-rc1/sample/cbreak.rb new file mode 100644 index 0000000..76b534a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/cbreak.rb @@ -0,0 +1,36 @@ +# ioctl example works on Sun + +CBREAK = 0x00000002 +ECHO = 0x00000008 +TIOCGETP = 0x40067408 +TIOCSETP = 0x80067409 + +def cbreak () + set_cbreak(true) +end + +def cooked () + set_cbreak(false) +end + +def set_cbreak (on) + tty = "\0" * 256 + STDIN.ioctl(TIOCGETP, tty) + ttys = tty.unpack("C4 S") + if on + ttys[4] |= CBREAK + ttys[4] &= ~ECHO + else + ttys[4] &= ~CBREAK + ttys[4] |= ECHO + end + tty = ttys.pack("C4 S") + STDIN.ioctl(TIOCSETP, tty) +end +cbreak(); + +print("this is no-echo line: "); +readline().print +cooked(); +print("this is echo line: "); +readline() diff --git a/lib/ruby-1.9.1-rc1/sample/clnt.rb b/lib/ruby-1.9.1-rc1/sample/clnt.rb new file mode 100644 index 0000000..0f3d17b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/clnt.rb @@ -0,0 +1,21 @@ +# socket example - client side +# usage: ruby clnt.rb [host] port + +require "socket" + +if ARGV.length >= 2 + host = ARGV.shift +else + host = "localhost" +end +print("Trying ", host, " ...") +STDOUT.flush +s = TCPSocket.open(host, ARGV.shift) +print(" done\n") +print("addr: ", s.addr.join(":"), "\n") +print("peer: ", s.peeraddr.join(":"), "\n") +while line = gets() + s.write(line) + print(s.readline) +end +s.close diff --git a/lib/ruby-1.9.1-rc1/sample/coverage.rb b/lib/ruby-1.9.1-rc1/sample/coverage.rb new file mode 100644 index 0000000..3f45e9f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/coverage.rb @@ -0,0 +1,60 @@ +require "coverage.so" + +Coverage.start + +ext = ENV["COVERUBY_EXT"] || ".cov" +accum = ENV["COVERUBY_ACCUM"] +accum = !accum || accum == "" || !(%w(f n 0).include?(accum[0])) +pwd = Dir.pwd + +at_exit do + Dir.chdir(pwd) do + Coverage.result.each do |sfile, covs| + cfile = sfile + ext + + writable = proc do |f| + File.writable?(f) || File.writable?(File.dirname(f)) + end + unless writable[cfile] + cfile = cfile.gsub(File.PATH_SEPARATOR, "#") + next unless writable[cfile] + end + + readlines = proc do |f| + File.read(f).force_encoding("ASCII-8BIT").lines.to_a + end + + sources = (readlines[sfile] rescue []) + + pcovs = [] + if accum + pcovs = (readlines[cfile] rescue []).map.with_index do |line, idx| + if line[/^\s*(?:(#####)|(\d+)|-):\s*\d+:(.*)$/n] + cov, line = $1 ? 0 : ($2 ? $2.to_i : nil), $3 + if !sources[idx] || sources[idx].chomp != line.chomp + warn("source file changed, ignoring: `#{ cfile }'") + break [] + end + cov + else + p line + warn("coverage file corrupted, ignoring: #{ cfile }") + break [] + end + end + unless pcovs.empty? || pcovs.size == covs.size + warn("coverage file changed, ignoring: `#{ cfile }'") + pcovs = [] + end + end + + open(cfile, "w") do |out| + covs.zip(sources, pcovs).each_with_index do |(cov, line, pcov), idx| + cov += pcov || 0 if cov + cov = (cov ? (cov == 0 ? "#####" : cov.to_s) : "-").rjust(9) + out.puts("%s:% 5d:%s" % [cov, idx + 1, line]) + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/dir.rb b/lib/ruby-1.9.1-rc1/sample/dir.rb new file mode 100644 index 0000000..b627383 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/dir.rb @@ -0,0 +1,12 @@ +# directory access +# list all files but .*/*~/*.o +dirp = Dir.open(".") +for f in dirp + case f + when /^\./, /~$/, /\.o/ + # do not print + else + print f, "\n" + end +end +dirp.close diff --git a/lib/ruby-1.9.1-rc1/sample/drb/README.rd b/lib/ruby-1.9.1-rc1/sample/drb/README.rd new file mode 100644 index 0000000..5cf1f51 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/README.rd @@ -0,0 +1,56 @@ += Sample scripts + +* array and iteretor + * darray.rb --- server + * darrayc.rb --- client + +* simple chat + * dchats.rb --- server + * dchatc.rb --- client + +* distributed chasen (for Japanese) + * dhasen.rb --- server + * dhasenc.rb --- client + +* simple log server + * dlogd.rb --- server + * dlogc.rb --- client + +* Queue server, and DRbUnknown demo + * dqueue.rb --- server + * dqin.rb --- client. push DQEntry objects. + * dqout.rb --- client. pop DQEntry objects. + * dqlib.rb --- define DQEntry + +* IdConv customize demo: reference by name + * name.rb --- server + * namec.rb --- client + +* extserv + * extserv_test.rb + +* IdConv customize demo 2: using TimerIdConv + * holders.rb --- server + * holderc.rb --- client + +* rinda, remote tuplespace + * rinda_ts.rb --- TupleSpace server. + * rindas.rb --- provide simple service via TupleSpace. + * rindac.rb --- service user + +* observer + cdbiff - (()) + * dbiff.rb --- dcdbiff server + * dcdbiff.rb --- dcdbiff client + +* drbssl + * drbssl_s.rb + * drbssl_c.rb + +* add DRbProtocl + * http0.rb + * http0serv.rb + +* Rinda::Ring + * ring_place.rb + * ring_echo.rb diff --git a/lib/ruby-1.9.1-rc1/sample/drb/README.rd.ja b/lib/ruby-1.9.1-rc1/sample/drb/README.rd.ja new file mode 100644 index 0000000..04143b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/README.rd.ja @@ -0,0 +1,59 @@ += ¥µ¥ó¥×¥ë¥¹¥¯¥ê¥×¥È + +* Array¤ò¥ê¥â¡¼¥È¤«¤éÍøÍѤ·¤Æ¥¤¥Æ¥ì¡¼¥¿¤ò»î¤¹¡£ + * darray.rb --- server + * darrayc.rb --- client + +* ´Ê°×¥Á¥ã¥Ã¥È + * dchats.rb --- server + * dchatc.rb --- client + +* ʬ»¶chasen + * dhasen.rb --- server + * dhasenc.rb --- client + +* ´Ê°×¥í¥°¥µ¡¼¥Ð + * dlogd.rb --- server + * dlogc.rb --- client + +* Queue¥µ¡¼¥Ð¡£ + ¥¯¥é¥¤¥¢¥ó¥Èdqin.rb¤ÏQueue¥µ¡¼¥Ð¤ÎÃΤé¤Ê¤¤¥ª¥Ö¥¸¥§¥¯¥È(DQEntry)¤ò + push¤¹¤ë¤¬DRbUnknown¤Ë¤è¤ê¥¯¥é¥¤¥¢¥ó¥Èdqout.rb¤¬pop¤Ç¤­¤ë¡£ + * dqueue.rb --- server + * dqin.rb --- client¡£DQEntry¥ª¥Ö¥¸¥§¥¯¥È¤òpush¤¹¤ë + * dqout.rb --- client¡£DQEntry¥ª¥Ö¥¸¥§¥¯¥È¤òpop¤¹¤ë + * dqlib.rb --- DQEntry¤òÄêµÁ¤·¤¿¥é¥¤¥Ö¥é¥ê + +* ̾Á°¤Ë¤è¤ë»²¾È + IdConv¤ò¥«¥¹¥¿¥Þ¥¤¥º¤·¤Æid¤Ç¤Ê¤¯Ì¾Á°¤Ç»²¾È¤¹¤ëÎã + * name.rb --- server + * namec.rb --- client + +* extserv¤Î¥µ¥ó¥×¥ë + * extserv_test.rb + +* TimerIdConv¤Î»ÈÍÑÎã + * holders.rb --- server¡£ruby -d hodlers.rb¤È¤¹¤ë¤ÈTimerIdConv¤ò»ÈÍѤ¹¤ë¡£ + * holderc.rb --- client + +* rinda.rb¤Î»ÈÍÑÎã + * rinda_ts.rb --- TupleSpace¥µ¡¼¥Ð¡£ + * rindac.rb --- TupleSpace¤Îclient¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Îclient + * rindas.rb --- TupleSpace¤Îclient¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Îserver + +* observer¤Î»ÈÍÑÎã + cdbiff - (()) + * dbiff.rb --- dcdbiff server + * dcdbiff.rb --- dcdbiff client + +* drbssl¤Î»ÈÍÑÎã + * drbssl_s.rb + * drbssl_c.rb + +* DRbProtocl¤ÎÄɲÃÎã + * http0.rb + * http0serv.rb + +* ring¤Î»ÈÍÑÎã + * ring_place.rb + * ring_echo.rb diff --git a/lib/ruby-1.9.1-rc1/sample/drb/darray.rb b/lib/ruby-1.9.1-rc1/sample/drb/darray.rb new file mode 100644 index 0000000..95ee01f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/darray.rb @@ -0,0 +1,12 @@ +=begin + distributed Ruby --- Array + Copyright (c) 1999-2001 Masatoshi SEKI +=end + +require 'drb/drb' + +here = ARGV.shift +DRb.start_service(here, [1, 2, "III", 4, "five", 6]) +puts DRb.uri +DRb.thread.join + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/darrayc.rb b/lib/ruby-1.9.1-rc1/sample/drb/darrayc.rb new file mode 100644 index 0000000..b181d22 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/darrayc.rb @@ -0,0 +1,47 @@ +=begin + distributed Ruby --- Array client + Copyright (c) 1999-2001 Masatoshi SEKI +=end + +require 'drb/drb' + +there = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service(nil, nil) +ro = DRbObject.new(nil, there) +p ro.size + +puts "# collect" +a = ro.collect { |x| + x + x +} +p a + +puts "# find" +p ro.find { |x| x.kind_of? String } + +puts "# each, break" +ro.each do |x| + next if x == "five" + puts x +end + +puts "# each, break" +ro.each do |x| + break if x == "five" + puts x +end + +puts "# each, next" +ro.each do |x| + next if x == "five" + puts x +end + +puts "# each, redo" +count = 0 +ro.each do |x| + count += 1 + puts count + redo if count == 3 +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dbiff.rb b/lib/ruby-1.9.1-rc1/sample/drb/dbiff.rb new file mode 100644 index 0000000..8faef50 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dbiff.rb @@ -0,0 +1,51 @@ +# +# dbiff.rb - distributed cdbiff (server) +# * original: cdbiff by Satoru Takabayashi + +require 'drb/drb' +require 'drb/eq' +require 'drb/observer' + +class Biff + include DRb::DRbObservable + + def initialize(filename, interval) + super() + @filename = filename + @interval = interval + end + + def run + last = Time.now + while true + begin + sleep(@interval) + current = File::mtime(@filename) + if current > last + changed + begin + notify_observers(@filename, current) + rescue Error + end + last = current + end + rescue + next + end + end + end +end + +def main + filename = "/var/mail/#{ENV['USER']}" + interval = 15 + uri = 'druby://:19903' + + biff = Biff.new(filename, interval) + + DRb.start_service(uri, biff) + biff.run +end + +main + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dcdbiff.rb b/lib/ruby-1.9.1-rc1/sample/drb/dcdbiff.rb new file mode 100644 index 0000000..6a24680 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dcdbiff.rb @@ -0,0 +1,43 @@ +# +# dcdbiff.rb - distributed cdbiff (client) +# * original: cdbiff by Satoru Takabayashi + +require 'drb/drb' +require 'drb/eq' + +class Notify + include DRbUndumped + + def initialize(biff, command) + @biff = biff + @command = command + + @biff.add_observer(self) + end + + def update(filename, time) + p [filename, time] if $DEBUG + system(@command) + end + + def done + begin + @biff.delete_observer(self) + rescue + end + end +end + +def main + command = 'eject' + uri = 'druby://localhost:19903' + + DRb.start_service + biff = DRbObject.new(nil, uri) + notify = Notify.new(biff, command) + + trap("INT"){ notify.done } + DRb.thread.join +end + +main diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dchatc.rb b/lib/ruby-1.9.1-rc1/sample/drb/dchatc.rb new file mode 100644 index 0000000..b506f5b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dchatc.rb @@ -0,0 +1,41 @@ +=begin + distributed Ruby --- chat client + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' + +class ChatClient + include DRbUndumped + + def initialize(name) + @name = name + @key = nil + end + attr_reader(:name) + attr_accessor(:key) + + def message(there, str) + raise 'invalid key' unless @key == there + puts str + end +end + +if __FILE__ == $0 + begin + there = ARGV.shift + name = ARGV.shift + raise "usage" unless (there and name) + rescue + $stderr.puts("usage: #{$0} ") + exit 1 + end + DRb.start_service + ro = DRbObject.new(nil, there) + + chat = ChatClient.new(name) + entry = ro.add_member(chat) + while gets + entry.say($_) + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dchats.rb b/lib/ruby-1.9.1-rc1/sample/drb/dchats.rb new file mode 100644 index 0000000..012dfee --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dchats.rb @@ -0,0 +1,70 @@ +=begin + distributed Ruby --- chat server + Copyright (c) 1999-2000 Masatoshi SEKI +=end +require 'thread' +require 'drb/drb' + +class ChatEntry + include DRbUndumped + + def initialize(server, there) + @server = server + @there = there + @name = there.name + @key = there.key = Time.now + end + attr :name, true + attr :there + + def say(str) + @server.distribute(@there, str) + end + + def listen(str) + @there.message(@key, str) + end +end + + +class ChatServer + def initialize + @mutex = Mutex.new + @members = {} + end + + def add_member(there) + client = ChatEntry.new(self, there) + @mutex.synchronize do + @members[there] = client + end + client + end + + def distribute(there, str) + name = @members[there].name + msg = "<#{name}> #{str}" + msg2 = ">#{name}< #{str}" + @mutex.synchronize do + for m in @members.keys + begin + if m == there + @members[m].listen(msg2) + else + @members[m].listen(msg) + end + rescue + p $! + @members.delete(m) + end + end + end + end +end + +if __FILE__ == $0 + here = ARGV.shift + DRb.start_service(here, ChatServer.new) + puts DRb.uri + DRb.thread.join +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dhasen.rb b/lib/ruby-1.9.1-rc1/sample/drb/dhasen.rb new file mode 100644 index 0000000..fb1724a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dhasen.rb @@ -0,0 +1,42 @@ +=begin + distributed Ruby --- dRuby Sample Server --- chasen server + Copyright (c) 1999-2001 Masatoshi SEKI +=end + +=begin + How to play. + + Terminal 1 + | % ruby dhasen.rb + | druby://yourhost:7640 + + Terminal 2 + | % ruby dhasenc.rb druby://yourhost:7640 + +=end + +require 'drb/drb' +require 'chasen' +require 'thread' + +class Dhasen + include DRbUndumped + + def initialize + @mutex = Mutex.new + end + + def sparse(str, *arg) + @mutex.synchronize do + Chasen.getopt(*arg) + Chasen.sparse(str) + end + end +end + +if __FILE__ == $0 + DRb.start_service(nil, Dhasen.new) + puts DRb.uri + DRb.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dhasenc.rb b/lib/ruby-1.9.1-rc1/sample/drb/dhasenc.rb new file mode 100644 index 0000000..8114e92 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dhasenc.rb @@ -0,0 +1,13 @@ +=begin + distributed Ruby --- dRuby Sample Client -- chasen client + Copyright (c) 1999-2001 Masatoshi SEKI +=end + +require 'drb/drb' + +there = ARGV.shift || raise("usage: #{$0} ") +DRb.start_service +dhasen = DRbObject.new(nil, there) + +print dhasen.sparse("ËÜÆü¤Ï¡¢À²Å·¤Ê¤ê¡£", "-F", '(%BB %m %M)\n', "-j") +print dhasen.sparse("ËÜÆü¤Ï¡¢À²Å·¤Ê¤ê¡£", "-F", '(%m %M)\n') diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dlogc.rb b/lib/ruby-1.9.1-rc1/sample/drb/dlogc.rb new file mode 100644 index 0000000..c75bc7b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dlogc.rb @@ -0,0 +1,16 @@ +=begin + distributed Ruby --- Log test + Copyright (c) 1999-2001 Masatoshi SEKI +=end + +require 'drb/drb' + +there = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service +ro = DRbObject.new(nil, there) +ro.log(123) +ro.log("hello") +sleep 2 +ro.log("wakeup") + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dlogd.rb b/lib/ruby-1.9.1-rc1/sample/drb/dlogd.rb new file mode 100644 index 0000000..9f9aa2f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dlogd.rb @@ -0,0 +1,39 @@ +=begin + distributed Ruby --- Log server + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' +require 'thread' + +class Logger + def initialize(fname) + @fname = fname.to_s + @fp = File.open(@fname, "a+") + @queue = Queue.new + @th = Thread.new { self.flush } + end + + def log(str) + @queue.push("#{Time.now}\t" + str.to_s) + end + + def flush + begin + while(1) + @fp.puts(@queue.pop) + @fp.flush + end + ensure + @fp.close + end + end +end + +if __FILE__ == $0 + here = ARGV.shift + DRb.start_service(here, Logger.new('/usr/tmp/dlogd.log')) + puts DRb.uri + DRb.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dqin.rb b/lib/ruby-1.9.1-rc1/sample/drb/dqin.rb new file mode 100644 index 0000000..3ba1caa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dqin.rb @@ -0,0 +1,13 @@ +=begin + distributed Ruby --- store + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' +require 'dqlib' + +there = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service +queue = DRbObject.new(nil, there) +queue.push(DQEntry.new(DRb.uri)) diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dqlib.rb b/lib/ruby-1.9.1-rc1/sample/drb/dqlib.rb new file mode 100644 index 0000000..75f2e61 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dqlib.rb @@ -0,0 +1,14 @@ +class DQEntry + def initialize(name) + @name = name + end + + def greeting + "Hello, This is #{@name}." + end + alias to_s greeting +end + +if __FILE__ == $0 + puts DQEntry.new('DQEntry') +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dqout.rb b/lib/ruby-1.9.1-rc1/sample/drb/dqout.rb new file mode 100644 index 0000000..4700e55 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dqout.rb @@ -0,0 +1,14 @@ +=begin + distributed Ruby --- fetch + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' +require 'dqlib' + +there = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service +queue = DRbObject.new(nil, there) +entry = queue.pop +puts entry.greeting diff --git a/lib/ruby-1.9.1-rc1/sample/drb/dqueue.rb b/lib/ruby-1.9.1-rc1/sample/drb/dqueue.rb new file mode 100644 index 0000000..a5a4365 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/dqueue.rb @@ -0,0 +1,12 @@ +=begin + distributed Ruby --- Queue + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'thread' +require 'drb/drb' + +DRb.start_service(nil, Queue.new) +puts DRb.uri +DRb.thread.join + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbc.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbc.rb new file mode 100644 index 0000000..00132b4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbc.rb @@ -0,0 +1,45 @@ +=begin + distributed Ruby --- dRuby Sample Client + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' + +class DRbEx2 + include DRbUndumped + + def initialize(n) + @n = n + end + + def to_i + @n.to_i + end +end + +if __FILE__ == $0 + there = ARGV.shift + unless there + $stderr.puts("usage: #{$0} ") + exit 1 + end + + DRb.start_service() + ro = DRbObject.new_with_uri(there) + + puts ro + p ro.to_a + puts ro.hello + p ro.hello + puts ro.sample(DRbEx2.new(1), 2, 3) + puts ro.sample(1, ro.sample(DRbEx2.new(1), 2, 3), DRbEx2.new(3)) + + begin + ro.err + rescue DRb::DRbUnknownError + p $! + p $!.unknown + rescue RuntimeError + p $! + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbch.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbch.rb new file mode 100644 index 0000000..495ff1c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbch.rb @@ -0,0 +1,48 @@ +=begin + distributed Ruby --- dRuby Sample Client + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +require 'drb/drb' +require 'drb/http' + +class DRbEx2 + include DRbUndumped + + def initialize(n) + @n = n + end + + def to_i + @n.to_i + end +end + +if __FILE__ == $0 + there = ARGV.shift + unless there + $stderr.puts("usage: #{$0} ") + exit 1 + end + + DRb::DRbConn.proxy_map['x68k'] = 'http://x68k/~mas/http_cgi.rb' + + DRb.start_service() + ro = DRbObject.new(nil, there) + + puts ro + p ro.to_a + puts ro.hello + p ro.hello + puts ro.sample(DRbEx2.new(1), 2, 3) + puts ro.sample(1, ro.sample(DRbEx2.new(1), 2, 3), DRbEx2.new(3)) + + begin + ro.err + rescue DRb::DRbUnknownError + p $! + p $!.unknown + rescue RuntimeError + p $! + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbm.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbm.rb new file mode 100644 index 0000000..74a15a4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbm.rb @@ -0,0 +1,60 @@ +=begin + multiple DRbServer + Copyright (c) 1999-2002 Masatoshi SEKI +=end + +=begin + How to play. + + Terminal 1 + | % ruby drbm.rb + | druby://yourhost:7640 druby://yourhost:7641 + + Terminal 2 + | % ruby drbmc.rb druby://yourhost:7640 druby://yourhost:7641 + | [#, "FOO"] + | [#, "FOO"] + +=end + +require 'drb/drb' + +class Hoge + include DRbUndumped + def initialize(s) + @str = s + end + + def to_s + @str + end +end + +class Foo + def initialize(s='FOO') + @hoge = Hoge.new(s) + end + + def hello + @hoge + end +end + +class Bar < Foo + def initialize(foo) + @hoge = foo.hello + end +end + + +if __FILE__ == $0 + foo = Foo.new + s1 = DRb::DRbServer.new('druby://:7640', foo) + s2 = DRb::DRbServer.new('druby://:7641', Bar.new(foo)) + + puts "#{s1.uri} #{s2.uri}" + + s1.thread.join + s2.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbmc.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbmc.rb new file mode 100644 index 0000000..c654fce --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbmc.rb @@ -0,0 +1,22 @@ +=begin + multiple DRbServer client + Copyright (c) 1999-2002 Masatoshi SEKI +=end + +require 'drb/drb' + +if __FILE__ == $0 + s1 = ARGV.shift + s2 = ARGV.shift + unless s1 && s2 + $stderr.puts("usage: #{$0} ") + exit 1 + end + + DRb.start_service() + r1 = DRbObject.new(nil, s1) + r2 = DRbObject.new(nil, s2) + + p [r1.hello, r1.hello.to_s] + p [r2.hello, r2.hello.to_s] +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbs-acl.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbs-acl.rb new file mode 100644 index 0000000..151dd94 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbs-acl.rb @@ -0,0 +1,51 @@ +=begin + distributed Ruby --- dRuby Sample Server + Copyright (c) 1999-2000 Masatoshi SEKI +=end + +=begin + How to play. + + Terminal 1 + | % ruby drbs.rb + | druby://yourhost:7640 + + Terminal 2 + | % ruby drbc.rb druby://yourhost:7640 + | "hello" + | 6 + | 10 + +=end + +require 'drb/drb' +require 'acl' + +class DRbEx + def initialize + @hello = 'hello' + end + + def hello + info = Thread.current['DRb'] + p info['socket'].peeraddr if info + @hello + end + + def sample(a, b, c) + a.to_i + b.to_i + c.to_i + end +end + +if __FILE__ == $0 + acl = ACL.new(%w(deny all + allow 192.168.1.* + allow localhost)) + + DRb.install_acl(acl) + + DRb.start_service(nil, DRbEx.new) + puts DRb.uri + DRb.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbs.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbs.rb new file mode 100644 index 0000000..b76e283 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbs.rb @@ -0,0 +1,64 @@ +=begin + distributed Ruby --- dRuby Sample Server + Copyright (c) 1999-2000,2002 Masatoshi SEKI +=end + +=begin + How to play. + + Terminal 1 + | % ruby drbs.rb + | druby://yourhost:7640 + + Terminal 2 + | % ruby drbc.rb druby://yourhost:7640 + | "hello" + | .... + +=end + +require 'drb/drb' + +class DRbEx + include DRbUndumped + + def initialize + @hello = 'hello' + end + + def hello + cntxt = Thread.current['DRb'] + if cntxt + p cntxt['server'].uri + p cntxt['client'].peeraddr + end + Foo::Unknown.new + end + + def err + raise FooError + end + + def sample(a, b, c) + a.to_i + b.to_i + c.to_i + end +end + +class Foo + class Unknown + end +end + +class FooError < RuntimeError +end + +if __FILE__ == $0 + DRb.start_service(ARGV.shift || 'druby://:7640', DRbEx.new) + puts DRb.uri + Thread.new do + sleep 10 + DRb.stop_service + end + DRb.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbssl_c.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbssl_c.rb new file mode 100644 index 0000000..65112f6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbssl_c.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby + +require 'drb' +require 'drb/ssl' + +there = ARGV.shift || "drbssl://localhost:3456" + +config = Hash.new +config[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER +config[:SSLVerifyCallback] = lambda{|ok,x509_store| + p [ok, x509_store.error_string] + true +} + +DRb.start_service(nil,nil,config) +h = DRbObject.new(nil, there) +while line = gets + p h.hello(line.chomp) +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/drbssl_s.rb b/lib/ruby-1.9.1-rc1/sample/drb/drbssl_s.rb new file mode 100644 index 0000000..4d96f59 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/drbssl_s.rb @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +require 'drb' +require 'drb/ssl' + +here = ARGV.shift || "drbssl://localhost:3456" + +class HelloWorld + include DRbUndumped + + def hello(name) + "Hello, #{name}." + end +end + +config = Hash.new +config[:verbose] = true +begin + data = open("sample.key"){|io| io.read } + config[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(data) + data = open("sample.crt"){|io| io.read } + config[:SSLCertificate] = OpenSSL::X509::Certificate.new(data) +rescue + $stderr.puts "Switching to use self-signed certificate" + config[:SSLCertName] = + [ ["C","JP"], ["O","Foo.DRuby.Org"], ["CN", "Sample"] ] +end + +DRb.start_service(here, HelloWorld.new, config) +puts DRb.uri +DRb.thread.join diff --git a/lib/ruby-1.9.1-rc1/sample/drb/extserv_test.rb b/lib/ruby-1.9.1-rc1/sample/drb/extserv_test.rb new file mode 100644 index 0000000..83d871a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/extserv_test.rb @@ -0,0 +1,80 @@ +=begin + dRuby sample + Copyright (c) 2000 Masatoshi SEKI + += How to play + +* Terminal 1 + + % ruby -I. extserv_test.rb server + druby://yourhost:12345 + +* Terminal 2 + + % ruby -I. extserv_test.rb druby://yourhost:12345 + ... + +=end + +require 'drb/drb' + +def ARGV.shift + it = super() + raise "usage:\nserver: #{$0} server []\nclient: #{$0} [quit] " unless it + it +end + +class Foo + include DRbUndumped + + def initialize(str) + @str = str + end + + def hello(it) + "#{it}: #{self}" + end + + def to_s + @str + end +end + +cmd = ARGV.shift +case cmd +when 'itest1', 'itest2' + require 'drb/extserv' + + front = Foo.new(cmd) + server = DRb::DRbServer.new(nil, front) + es = DRb::ExtServ.new(ARGV.shift, ARGV.shift, server) + server.thread.join + +when 'server' + require 'drb/extservm' + + DRb::ExtServManager.command['itest1'] = "ruby -I. #{$0} itest1" + DRb::ExtServManager.command['itest2'] = "ruby -I. #{$0} itest2" + + s = DRb::ExtServManager.new + DRb.start_service(ARGV.shift, s) + puts DRb.uri + DRb.thread.join + + +else + uri = (cmd == 'quit') ? ARGV.shift : cmd + + DRb.start_service + s = DRbObject.new(nil, uri) + t1 = s.service('itest1').front + puts t1 + t2 = s.service('itest2').front + puts t2 + puts t1.hello(t2) + if (cmd == 'quit') + s.service('itest1').stop_service + s.service('itest2').stop_service + end +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/gw_ct.rb b/lib/ruby-1.9.1-rc1/sample/drb/gw_ct.rb new file mode 100644 index 0000000..0622784 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/gw_ct.rb @@ -0,0 +1,29 @@ +require 'drb/drb' + +class Foo + include DRbUndumped + + def foo(n) + n + n + end + + def bar(n) + yield(n) + yield(n) + end +end + +DRb.start_service(nil) +puts DRb.uri + +ro = DRbObject.new(nil, ARGV.shift) +ro[:tcp] = Foo.new +gets + +it = ro[:unix] +p [it, it.foo(1)] +gets + +p it.bar('2') {|n| n * 3} +gets + + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/gw_cu.rb b/lib/ruby-1.9.1-rc1/sample/drb/gw_cu.rb new file mode 100644 index 0000000..0e5ed36 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/gw_cu.rb @@ -0,0 +1,28 @@ +require 'drb/drb' +require 'drb/unix' + +class Foo + include DRbUndumped + + def foo(n) + n + n + end + + def bar(n) + yield(n) + yield(n) + end +end + +DRb.start_service('drubyunix:', nil) +puts DRb.uri + +ro = DRbObject.new(nil, ARGV.shift) +ro[:unix] = Foo.new +gets + +it = ro[:tcp] +p [it, it.foo(1)] +gets + +p it.bar('2') {|n| n * 3} +gets diff --git a/lib/ruby-1.9.1-rc1/sample/drb/gw_s.rb b/lib/ruby-1.9.1-rc1/sample/drb/gw_s.rb new file mode 100644 index 0000000..c2bea0b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/gw_s.rb @@ -0,0 +1,10 @@ +require 'drb/drb' +require 'drb/unix' +require 'drb/gw' + +DRb.install_id_conv(DRb::GWIdConv.new) +gw = DRb::GW.new +s1 = DRb::DRbServer.new(ARGV.shift, gw) +s2 = DRb::DRbServer.new(ARGV.shift, gw) +s1.thread.join +s2.thread.join diff --git a/lib/ruby-1.9.1-rc1/sample/drb/holderc.rb b/lib/ruby-1.9.1-rc1/sample/drb/holderc.rb new file mode 100644 index 0000000..8dd72eb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/holderc.rb @@ -0,0 +1,22 @@ +require 'drb/drb' + +begin + there = ARGV.shift || raise +rescue + $stderr.puts("usage: #{$0} ") + exit 1 +end + +DRb.start_service() +ro = DRbObject.new(nil, there) + +ary = [] +10.times do + ary.push(ro.gen) +end + +sleep 5 if $DEBUG + +ary.each do |e| + p e.sample([1]) +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/holders.rb b/lib/ruby-1.9.1-rc1/sample/drb/holders.rb new file mode 100644 index 0000000..2d9974f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/holders.rb @@ -0,0 +1,63 @@ +=begin += How to play. + +== with timeridconv: + % ruby -d holders.rb + druby://yourhost:1234 + + % ruby holderc.rb druby://yourhost:1234 + + +== without timeridconv: + % ruby holders.rb + druby://yourhost:1234 + + % ruby holderc.rb druby://yourhost:1234 +=end + + +require 'drb/drb' + +class DRbEx3 + include DRbUndumped + + def initialize(n) + @v = n + end + + def sample(list) + sum = 0 + list.each do |e| + sum += e.to_i + end + @v * sum + end +end + +class DRbEx4 + include DRbUndumped + + def initialize + @curr = 1 + end + + def gen + begin + @curr += 1 + DRbEx3.new(@curr) + ensure + GC.start + end + end +end + +if __FILE__ == $0 + if $DEBUG + require 'drb/timeridconv' + DRb.install_id_conv(DRb::TimerIdConv.new(2)) + end + + DRb.start_service(nil, DRbEx4.new) + puts DRb.uri + DRb.thread.join +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/http0.rb b/lib/ruby-1.9.1-rc1/sample/drb/http0.rb new file mode 100644 index 0000000..7649925 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/http0.rb @@ -0,0 +1,77 @@ +require 'drb/drb' +require 'net/http' +require 'uri' + +module DRb + module HTTP0 + class StrStream + def initialize(str='') + @buf = str + end + attr_reader :buf + + def read(n) + begin + return @buf[0,n] + ensure + @buf[0,n] = '' + end + end + + def write(s) + @buf.concat s + end + end + + def self.uri_option(uri, config) + return uri, nil + end + + def self.open(uri, config) + unless /^http:/ =~ uri + raise(DRbBadScheme, uri) unless uri =~ /^http:/ + raise(DRbBadURI, 'can\'t parse uri:' + uri) + end + ClientSide.new(uri, config) + end + + class ClientSide + def initialize(uri, config) + @uri = uri + @res = nil + @config = config + @msg = DRbMessage.new(config) + @proxy = ENV['HTTP_PROXY'] + end + + def close; end + def alive?; false; end + + def send_request(ref, msg_id, *arg, &b) + stream = StrStream.new + @msg.send_request(stream, ref, msg_id, *arg, &b) + @reply_stream = StrStream.new + post(@uri, stream.buf) + end + + def recv_reply + @msg.recv_reply(@reply_stream) + end + + def post(url, data) + it = URI.parse(url) + path = [(it.path=='' ? '/' : it.path), it.query].compact.join('?') + http = Net::HTTP.new(it.host, it.port) + sio = StrStream.new + http.post(path, data, {'Content-Type'=>'application/octetstream;'}) do |str| + sio.write(str) + if @config[:load_limit] < sio.buf.size + raise TypeError, 'too large packet' + end + end + @reply_stream = sio + end + end + end + DRbProtocol.add_protocol(HTTP0) +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/http0serv.rb b/lib/ruby-1.9.1-rc1/sample/drb/http0serv.rb new file mode 100644 index 0000000..100d126 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/http0serv.rb @@ -0,0 +1,119 @@ +require 'webrick' +require 'drb/drb' +require 'drb/http0' +require 'thread' + +module DRb + module HTTP0 + + def self.open_server(uri, config) + unless /^http:/ =~ uri + raise(DRbBadScheme, uri) unless uri =~ /^http:/ + raise(DRbBadURI, 'can\'t parse uri:' + uri) + end + Server.new(uri, config) + end + + class Callback < WEBrick::HTTPServlet::AbstractServlet + def initialize(config, drb) + @config = config + @drb = drb + @queue = Queue.new + end + + def do_POST(req, res) + @req = req + @res = res + @drb.push(self) + @res.body = @queue.pop + @res['content-type'] = 'application/octet-stream;' + end + + def req_body + @req.body + end + + def reply(body) + @queue.push(body) + end + + def close + @queue.push('') + end + end + + class Server + def initialize(uri, config) + @uri = uri + @config = config + @queue = Queue.new + setup_webrick(uri) + end + attr_reader :uri + + def close + @server.shutdown if @server + @server = nil + end + + def push(callback) + @queue.push(callback) + end + + def accept + client = @queue.pop + ServerSide.new(client, @config) + end + + def setup_webrick(uri) + logger = WEBrick::Log::new($stderr, WEBrick::Log::FATAL) + u = URI.parse(uri) + s = WEBrick::HTTPServer.new(:Port => u.port, + :AddressFamily => Socket::AF_INET, + :BindAddress => u.host, + :Logger => logger, + :ServerType => Thread) + s.mount(u.path, Callback, self) + @server = s + s.start + end + end + + class ServerSide + def initialize(callback, config) + @callback = callback + @config = config + @msg = DRbMessage.new(@config) + @req_stream = StrStream.new(@callback.req_body) + end + + def close + @callback.close if @callback + @callback = nil + end + + def alive?; false; end + + def recv_request + begin + @msg.recv_request(@req_stream) + rescue + close + raise $! + end + end + + def send_reply(succ, result) + begin + return unless @callback + stream = StrStream.new + @msg.send_reply(stream, succ, result) + @callback.reply(stream.buf) + rescue + close + raise $! + end + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/name.rb b/lib/ruby-1.9.1-rc1/sample/drb/name.rb new file mode 100644 index 0000000..86b478f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/name.rb @@ -0,0 +1,117 @@ +=begin + distributed Ruby --- NamedObject Sample + Copyright (c) 2000-2001 Masatoshi SEKI +=end + +=begin +How to play. + +* start server + Terminal 1 + | % ruby name.rb druby://yourhost:7640 + | druby://yourhost:7640 + | [return] to exit + +* start client + Terminal 2 + | % ruby namec.rb druby://yourhost:7640 + | # + | # + | 1 + | 2 + | [return] to continue + +* restart server + Terminal 1 + type [return] + | % ruby name.rb druby://yourhost:7640 + | druby://yourhost:7640 + | [return] to exit + +* continue client + Terminal 2 + type [return] + | 1 + | 2 +=end + +require 'thread.rb' +require 'drb/drb' + +module DRbNamedObject + DRbNAMEDICT = {} + attr_reader(:drb_name) + + def drb_name=(name) + @drb_name = name + Thread.exclusive do + raise(IndexError, name) if DRbNAMEDICT[name] + DRbNAMEDICT[name] = self + end + end +end + +class DRbNamedIdConv < DRb::DRbIdConv + def initialize + @dict = DRbNamedObject::DRbNAMEDICT + end + + def to_obj(ref) + @dict.fetch(ref) do super end + end + + def to_id(obj) + if obj.kind_of? DRbNamedObject + return obj.drb_name + else + return super + end + end +end + +class Seq + include DRbUndumped + include DRbNamedObject + + def initialize(v, name) + @counter = v + @mutex = Mutex.new + self.drb_name = name + end + + def next_value + @mutex.synchronize do + @counter += 1 + return @counter + end + end +end + +class Front + def initialize + seq = Seq.new(0, 'seq') + mutex = Mutex.new + mutex.extend(DRbUndumped) + mutex.extend(DRbNamedObject) + mutex.drb_name = 'mutex' + @name = {} + @name['seq'] = seq + @name['mutex'] = mutex + end + + def [](k) + @name[k] + end +end + +if __FILE__ == $0 + uri = ARGV.shift + + name_conv = DRbNamedIdConv.new + + DRb.install_id_conv(name_conv) + DRb.start_service(uri, Front.new) + puts DRb.uri + DRb.thread.join +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/namec.rb b/lib/ruby-1.9.1-rc1/sample/drb/namec.rb new file mode 100644 index 0000000..f6db6f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/namec.rb @@ -0,0 +1,36 @@ +=begin + distributed Ruby --- NamedObject Sample Client + Copyright (c) 2000-2001 Masatoshi SEKI +=end + +require 'drb/drb' + +begin + there = ARGV.shift || raise +rescue + puts "usage: #{$0} " + exit 1 +end + +DRb.start_service() +ro = DRbObject.new(nil, there) + +seq = ro["seq"] +mutex = ro["mutex"] + +p seq +p mutex + +mutex.synchronize do + p seq.next_value + p seq.next_value +end + +puts '[return] to continue' +gets + +mutex.synchronize do + p seq.next_value + p seq.next_value +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/old_tuplespace.rb b/lib/ruby-1.9.1-rc1/sample/drb/old_tuplespace.rb new file mode 100644 index 0000000..3e13b92 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/old_tuplespace.rb @@ -0,0 +1,214 @@ +#!/usr/local/bin/ruby +# TupleSpace +# Copyright (c) 1999-2000 Masatoshi SEKI +# You can redistribute it and/or modify it under the same terms as Ruby. + +require 'thread' + +class TupleSpace + class Template + def initialize(list) + @list = list + @check_idx = [] + @list.each_with_index do |x, i| + @check_idx.push i if x + end + @size = @list.size + end + + attr :size + alias length size + + def match(tuple) + return nil if tuple.size != self.size + @check_idx.each do |i| + unless @list[i] === tuple[i] + return false + end + end + return true + end + end + + def initialize + @que = {} + @waiting = {} + @que.taint # enable tainted comunication + @waiting.taint + self.taint + end + + def wakeup_waiting(tuple) + sz = tuple.length + return nil unless @waiting[sz] + + x = nil + i = -1 + found = false + @waiting[sz] = @waiting[sz].find_all { |x| + if x[0].match(tuple) + begin + x[1].wakeup + rescue ThreadError + end + false + else + true + end + } + end + + def put_waiting(template, thread) + sz = template.length + @waiting[sz] = [] unless @waiting[sz] + @waiting[sz].push([Template.new(template), thread]) + end + private :wakeup_waiting + private :put_waiting + + def get_que(template) + sz = template.length + return nil unless @que[sz] + + template = Template.new(template) + + x = nil + i = -1 + found = false + @que[sz].each_with_index do |x, i| + if template.match(x) + found = true + break + end + end + return nil unless found + + @que[sz].delete_at(i) + + return x + end + + def put_que(tuple) + sz = tuple.length + @que[sz] = [] unless @que[sz] + @que[sz].push tuple + end + private :get_que + private :put_que + + def out(*tuples) + tuples.each do |tuple| + Thread.critical = true + put_que(tuple) + wakeup_waiting(tuple) + Thread.critical = false + end + end + alias put out + alias write out + + def in(template, non_block=false) + begin + loop do + Thread.critical = true + tuple = get_que(template) + unless tuple + if non_block + raise ThreadError, "queue empty" + end + put_waiting(template, Thread.current) + Thread.stop + else + return tuple + end + end + ensure + Thread.critical = false + end + end + alias get in + alias take in + + def rd(template, non_block=false) + tuple = self.in(template, non_block) + out(tuple) + tuple + end + alias read rd + + def mv(dest, template, non_block=false) + tuple = self.in(template, non_block) + begin + dest.out(tuple) + rescue + self.out(tuple) + end + end + alias move mv +end + +if __FILE__ == $0 + ts = TupleSpace.new + clients = [] + servers = [] + + def server(ts, id) + Thread.start { + loop do + req = ts.in(['req', nil, nil]) + ac = req[1] + num = req[2] + sleep id + ts.out([ac, id, num, num * num]) + end + } + end + + def client(ts, n) + Thread.start { + ac = Object.new + tuples = (1..10).collect { |i| + ['req', ac, i * 10 + n] + } + ts.out(*tuples) + ts.out(tuples[0]) + puts "out: #{n}" + 11.times do |i| + ans = ts.in([ac, nil, nil, nil]) + puts "client(#{n}) server(#{ans[1]}) #{ans[2]} #{ans[3]}" + end + } + end + + def watcher(ts) + Thread.start { + loop do + begin + sleep 1 + p ts.rd(['req', nil, nil], true) + rescue ThreadError + puts "'req' not found." + end + end + } + end + + (0..3).each do |n| + servers.push(server(ts, n)) + end + + (1..6).each do |n| + clients.push(client(ts, n)) + end + + (1..3).each do + watcher(ts) + end + + clients.each do |t| + t.join + end +end + + + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/rinda_ts.rb b/lib/ruby-1.9.1-rc1/sample/drb/rinda_ts.rb new file mode 100644 index 0000000..6f2fae5 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/rinda_ts.rb @@ -0,0 +1,7 @@ +require 'drb/drb' +require 'rinda/tuplespace' + +uri = ARGV.shift +DRb.start_service(uri, Rinda::TupleSpace.new) +puts DRb.uri +DRb.thread.join diff --git a/lib/ruby-1.9.1-rc1/sample/drb/rindac.rb b/lib/ruby-1.9.1-rc1/sample/drb/rindac.rb new file mode 100644 index 0000000..72be09d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/rindac.rb @@ -0,0 +1,17 @@ +require 'drb/drb' +require 'rinda/rinda' + +uri = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service +ts = Rinda::TupleSpaceProxy.new(DRbObject.new(nil, uri)) + +(1..10).each do |n| + ts.write(['sum', DRb.uri, n]) +end + +(1..10).each do |n| + ans = ts.take(['ans', DRb.uri, n, nil]) + p [ans[2], ans[3]] +end + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/rindas.rb b/lib/ruby-1.9.1-rc1/sample/drb/rindas.rb new file mode 100644 index 0000000..9fd9ada --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/rindas.rb @@ -0,0 +1,18 @@ +require 'drb/drb' +require 'rinda/rinda' + +def do_it(v) + puts "do_it(#{v})" + v + v +end + +uri = ARGV.shift || raise("usage: #{$0} ") + +DRb.start_service +ts = Rinda::TupleSpaceProxy.new(DRbObject.new(nil, uri)) + +while true + r = ts.take(['sum', nil, nil]) + v = do_it(r[2]) + ts.write(['ans', r[1], r[2], v]) +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/ring_echo.rb b/lib/ruby-1.9.1-rc1/sample/drb/ring_echo.rb new file mode 100644 index 0000000..0633aa8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/ring_echo.rb @@ -0,0 +1,30 @@ +require 'drb/drb' +require 'drb/eq' +require 'rinda/ring' +require 'thread' + +class RingEcho + include DRbUndumped + def initialize(name) + @name = name + end + + def echo(str) + "#{@name}: #{str}" + end +end + +DRb.start_service + +renewer = Rinda::SimpleRenewer.new + +finder = Rinda::RingFinger.new +ts = finder.lookup_ring_any +ts.read_all([:name, :RingEcho, nil, nil]).each do |tuple| + p tuple[2] + puts tuple[2].echo('Hello, World') rescue nil +end +ts.write([:name, :RingEcho, RingEcho.new(DRb.uri), ''], renewer) + +DRb.thread.join + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/ring_inspect.rb b/lib/ruby-1.9.1-rc1/sample/drb/ring_inspect.rb new file mode 100644 index 0000000..c096cd7 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/ring_inspect.rb @@ -0,0 +1,30 @@ +require 'rinda/ring' +require 'drb/drb' + +class Inspector + def initialize + end + + def primary + Rinda::RingFinger.primary + end + + def list_place + Rinda::RingFinger.to_a + end + + def list(idx = -1) + if idx < 0 + ts = primary + else + ts = list_place[idx] + raise "RingNotFound" unless ts + end + ts.read_all([:name, nil, nil, nil]) + end +end + +def main + DRb.start_service + r = Inspector.new +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/ring_place.rb b/lib/ruby-1.9.1-rc1/sample/drb/ring_place.rb new file mode 100644 index 0000000..0ceef7c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/ring_place.rb @@ -0,0 +1,25 @@ +require 'drb/drb' +require 'rinda/ring' +require 'rinda/tuplespace' + +unless $DEBUG + # Run as a daemon... + exit!( 0 ) if fork + Process.setsid + exit!( 0 ) if fork +end + +DRb.start_service(ARGV.shift) + +ts = Rinda::TupleSpace.new +place = Rinda::RingServer.new(ts) + +if $DEBUG + puts DRb.uri + DRb.thread.join +else + STDIN.reopen('/dev/null') + STDOUT.reopen('/dev/null', 'w') + STDERR.reopen('/dev/null', 'w') + DRb.thread.join +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/simpletuple.rb b/lib/ruby-1.9.1-rc1/sample/drb/simpletuple.rb new file mode 100644 index 0000000..3ae9208 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/simpletuple.rb @@ -0,0 +1,91 @@ +#!/usr/local/bin/ruby +# SimpleTupleSpace +# Copyright (c) 1999-2000 Masatoshi SEKI +# You can redistribute it and/or modify it under the same terms as Ruby. + +require 'thread' + +class SimpleTupleSpace + def initialize + @hash = {} + @waiting = {} + @hash.taint + @waiting.taint + self.taint + end + + def out(key, obj) + Thread.critical = true + @hash[key] ||= [] + @waiting[key] ||= [] + @hash[key].push obj + begin + t = @waiting[key].shift + @waiting.delete(key) if @waiting[key].length == 0 + t.wakeup if t + rescue ThreadError + retry + ensure + Thread.critical = false + end + end + + def in(key) + Thread.critical = true + @hash[key] ||= [] + @waiting[key] ||= [] + begin + loop do + if @hash[key].length == 0 + @waiting[key].push Thread.current + Thread.stop + else + return @hash[key].shift + end + end + ensure + @hash.delete(key) if @hash[key].length == 0 + Thread.critical = false + end + end +end + +if __FILE__ == $0 + ts = SimpleTupleSpace.new + clients = [] + servers = [] + + def server(ts) + Thread.start { + loop do + req = ts.in('req') + ac = req[0] + num = req[1] + ts.out(ac, num * num) + end + } + end + + def client(ts, n) + Thread.start { + ac = Object.new + ts.out('req', [ac, n]) + ans = ts.in(ac) + puts "#{n}: #{ans}" + } + end + + 3.times do + servers.push(server(ts)) + end + + (1..6).each do |n| + clients.push(client(ts, n)) + end + + clients.each do |t| + t.join + end +end + + diff --git a/lib/ruby-1.9.1-rc1/sample/drb/speedc.rb b/lib/ruby-1.9.1-rc1/sample/drb/speedc.rb new file mode 100644 index 0000000..14d526d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/speedc.rb @@ -0,0 +1,21 @@ +#!/usr/local/bin/ruby + +uri = ARGV.shift || raise("usage: #{$0} URI") +N = (ARGV.shift || 100).to_i + +case uri +when /^tcpromp:/, /^unixromp:/ + require 'romp' + + client = ROMP::Client.new(uri, false) + foo = client.resolve("foo") +when /^druby:/ + require 'drb/drb' + + DRb.start_service + foo = DRbObject.new(nil, uri) +end + +N.times do |n| + foo.foo(n) +end diff --git a/lib/ruby-1.9.1-rc1/sample/drb/speeds.rb b/lib/ruby-1.9.1-rc1/sample/drb/speeds.rb new file mode 100644 index 0000000..76b4b29 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/drb/speeds.rb @@ -0,0 +1,31 @@ +class Foo + attr_reader :i + def initialize + @i = 0 + end + + def foo(i) + @i = i + i + i + end +end + +# server = ROMP::Server.new('tcpromp://localhost:4242', nil, true) + +uri = ARGV.shift || raise("usage: #{$0} URI") +foo = Foo.new + +case uri +when /^tcpromp:/, /^unixromp:/ + require 'romp' + + server = ROMP::Server.new(uri, nil, true) + server.bind(foo, "foo") + +when /^druby:/ + require 'drb/drb' + + DRb.start_service(uri, Foo.new) +end + +DRb.thread.join diff --git a/lib/ruby-1.9.1-rc1/sample/dualstack-fetch.rb b/lib/ruby-1.9.1-rc1/sample/dualstack-fetch.rb new file mode 100644 index 0000000..1897a3d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/dualstack-fetch.rb @@ -0,0 +1,48 @@ +# simple webpage fetcher + +# The code demonstrates how a multi-protocol client should be written. +# TCPSocket is using getaddrinfo() internally, so there should be no problem. + +require "socket" + +if ARGV.size != 1 + STDERR.print "requires URL\n" + exit +end + +url = ARGV[0] +if url !~ /^http:\/\/([^\/]+)(\/.*)$/ + STDERR.print "only http with full hostname is supported\n" + exit +end + +# split URL into host, port and path +hostport = $1 +path = $2 +if (hostport =~ /^(.*):([0-9]+)$/) + host = $1 + port = $2 +else + host = hostport + port = 80 +end +if host =~ /^\[(.*)\]$/ + host = $1 +end + +#STDERR.print "url=<#{ARGV[0]}>\n" +#STDERR.print "host=<#{host}>\n" +#STDERR.print "port=<#{port}>\n" +#STDERR.print "path=<#{path}>\n" + +STDERR.print "conntecting to #{host} port #{port}\n" +c = TCPSocket.new(host, port) +dest = Socket.getnameinfo(c.getpeername, + Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV) +STDERR.print "conntected to #{dest[0]} port #{dest[1]}\n" +c.print "GET #{path} HTTP/1.0\n" +c.print "Host: #{host}\n" +c.print "\n" +while c.gets + print +end diff --git a/lib/ruby-1.9.1-rc1/sample/dualstack-httpd.rb b/lib/ruby-1.9.1-rc1/sample/dualstack-httpd.rb new file mode 100644 index 0000000..69e3181 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/dualstack-httpd.rb @@ -0,0 +1,55 @@ +# simple httpd + +# The code demonstrates how a multi-protocol daemon should be written. + +require "socket" +require "thread" + +port = 8888 +res = Socket.getaddrinfo(nil, port, nil, Socket::SOCK_STREAM, nil, Socket::AI_PASSIVE) +sockpool = [] +names = [] +threads = [] + +res.each do |i| + s = TCPserver.new(i[3], i[1]) + n = Socket.getnameinfo(s.getsockname, Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV).join(" port ") + sockpool.push s + names.push n +end + +(0 .. sockpool.size - 1).each do |i| + mysock = sockpool[i] + myname = names[i] + STDERR.print "socket #{mysock} started, address #{myname}\n" + threads[i] = Thread.start do # Thread.start cannot be used here! + ls = mysock # copy to dynamic variable + t = Thread.current + STDERR.print "socket #{myname} listener started, pid #{$$} thread #{t}\n" + while true + as = ls.accept + Thread.start do + STDERR.print "socket #{myname} accepted, thread ", Thread.current, "\n" + s = as # copy to dynamic variable + str = '' + while line = s.gets + break if line == "\r\n" or line == "\n" + str << line + end + STDERR.print "socket #{myname} got string\n" + s.write("HTTP/1.0 200 OK\n") + s.write("Content-type: text/plain\n\n") + s.write("this is test: my name is #{myname}, you sent:\n") + s.write("---start\n") + s.write(str) + s.write("---end\n") + s.close + STDERR.print "socket #{myname} processed, thread ", Thread.current, " terminating\n" + end + end + end +end + +for t in threads + t.join +end diff --git a/lib/ruby-1.9.1-rc1/sample/eval.rb b/lib/ruby-1.9.1-rc1/sample/eval.rb new file mode 100644 index 0000000..ed4b7c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/eval.rb @@ -0,0 +1,41 @@ +line = '' +indent = 0 +$stdout.sync = true +print "ruby> " +loop do + l = gets + if l.nil? + break if line.empty? + else + line += l + if l =~ /,\s*$/ + print "ruby| " + next + end + if l =~ /^\s*(class|module|def|if|unless|case|while|until|for|begin)\b[^_]/ + indent += 1 + end + if l =~ /^\s*end\b[^_]/ + indent -= 1 + end + if l =~ /\{\s*(\|.*\|)?\s*$/ + indent += 1 + end + if l =~ /^\s*\}/ + indent -= 1 + end + if indent > 0 + print "ruby| " + next + end + end + begin + print eval(line).inspect, "\n" + rescue ScriptError, StandardError + printf "ERR: %s\n", $! || 'exception raised' + end + break if l.nil? + line = '' + print "ruby> " +end +print "\n" diff --git a/lib/ruby-1.9.1-rc1/sample/export.rb b/lib/ruby-1.9.1-rc1/sample/export.rb new file mode 100644 index 0000000..949e5b1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/export.rb @@ -0,0 +1,40 @@ +# method access permission +# output: +# foobar +# Foo + +class Foo + public :printf + def baz + print "baz\n" + end + private :baz + + def quux + print "in QUUX " + baz() + end +end + +def foobar + print "foobar\n" +end + +f = Foo.new +#Foo.private :printf +class Foo # redefines foobar's scope + public :foobar +end +f.foobar +f.printf "%s\n", Foo + +f.quux + +class Bar 1 ? 2 : 1 + break if rlen + delta > len + rlen += delta + res += char + end + res += ' ' * (len - rlen) if rlen < len + res + end +end + +def fromout(date, from, subj) + return 0 if !date + y, m, d = Time.parse(date).to_a.reverse[4, 3] if date + y ||= 0; m ||= 0; d ||= 0 + from ||= "sombody@somewhere" + from.delete!("\r\n") + from = from.kconv(Encoding.default_external).kjust(28) + subj ||= "(nil)" + subj.delete!("\r\n") + subj = subj.kconv(Encoding.default_external).kjust(40) + printf "%02d/%02d/%02d [%s] %s\n", y%100, m, d, from, subj + return 1 +end + +def get_mailfile(user) + file = user + unless user + file = ENV['MAIL'] + user = ENV['USER'] || ENV['USERNAME'] || ENV['LOGNAME'] + end + + if file == nil or !File.exist?(file) + [ENV['SPOOLDIR'], '/usr/spool', '/var/spool', '/usr', '/var'].each do |m| + path = "#{m}/mail/#{user}" + if File.exist?(path) + file = path + break + end + end + end + file +end + +def from_main + if ARGV[0] == '-w' + wait = true + ARGV.shift + end + file = get_mailfile(ARGV[0]) + + outcount = 0 + if File.exist?(file) + atime = File.atime(file) + mtime = File.mtime(file) + open(file, "r") do |f| + until f.eof? + header = {} + f.each_line do |line| + next if /^From / =~ line # skip From-line + break if /^$/ =~ line # end of header + + if /^(?\S+?):\s*(?.*)/ =~ line + attr.capitalize! + header[attr] = value + elsif attr + header[attr] += "\n" + line.lstrip + end + end + + f.each_line do |line| + break if /^From / =~ line + end + outcount += fromout(header['Date'], header['From'], header['Subject']) + end + end + File.utime(atime, mtime, file) + end + + if outcount == 0 + print "You have no mail.\n" + sleep 2 if wait + elsif wait + system "stty cbreak -echo" + $stdin.getc + system "stty cooked echo" + end +end + +if __FILE__ == $0 + from_main +end + +__END__ + +=begin + += from.rb + +== USAGE + +ruby from.rb [-w] [username_or_filename] + +=end diff --git a/lib/ruby-1.9.1-rc1/sample/fullpath.rb b/lib/ruby-1.9.1-rc1/sample/fullpath.rb new file mode 100644 index 0000000..8472e5d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/fullpath.rb @@ -0,0 +1,23 @@ +#! /usr/local/bin/ruby +# convert ls-lR filename into fullpath. + +if ARGV[0] =~ /-p/ + ARGV.shift + path = ARGV.shift +end + +if path == nil + path = "" +elsif path !~ %r|/$| + path += "/" +end + +while line = gets() + case line + when /:$/ + path = line.chop.chop + "/" + when /^total/, /^d/ + when /^(.*\d )(.+)$/ + print($1, path, $2, "\n") + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/less.rb b/lib/ruby-1.9.1-rc1/sample/less.rb new file mode 100644 index 0000000..8be3591 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/less.rb @@ -0,0 +1,17 @@ +#! /usr/local/bin/ruby + +ZCAT = "/usr/local/bin/zcat" +LESS = "/usr/local/bin/less" + +FILE = ARGV.pop +OPTION = (if ARGV.length == 0; "" else ARGV.join(" "); end) + +if FILE =~ /\.(Z|gz)$/ + exec(format("%s %s | %s %s", ZCAT, FILE, LESS, OPTION)) +elsif FILE == nil + exec(format("%s %s", LESS, OPTION)) +else + print(format("%s %s %s", LESS, OPTION, FILE), "\n") + exec(format("%s %s %s", LESS, OPTION, FILE)) +end +exit() diff --git a/lib/ruby-1.9.1-rc1/sample/list.rb b/lib/ruby-1.9.1-rc1/sample/list.rb new file mode 100644 index 0000000..221f7ed --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/list.rb @@ -0,0 +1,80 @@ +# Linked list example +class MyElem + # object initializer called from Class#new + def initialize(item) + # @variables are instance variable, no declaration needed + @data = item + @succ = nil + end + + def data + @data + end + + def succ + @succ + end + + # the method invoked by ``obj.data = val'' + def succ=(new) + @succ = new + end +end + +class MyList + def add_to_list(obj) + elt = MyElem.new(obj) + if @head + @tail.succ = elt + else + @head = elt + end + @tail = elt + end + + def each + elt = @head + while elt + yield elt + elt = elt.succ + end + end + + # the method to convert object into string. + # redefining this will affect print. + def to_s + str = " 0 && y > 0 then open(x-1,y-1) end + if y > 0 then open(x, y-1) end + if x < @wi-1 && y > 0 then open(x+1,y-1) end + if x > 0 then open(x-1,y) end + if x < @wi-1 then open(x+1,y) end + if x > 0 && y < @hi-1 then open(x-1,y+1) end + if y < @hi -1 then open(x,y+1) end + if x < @wi-1 && y < @hi-1 then open(x+1,y+1) end + pos(@cx,@cy) + end + def fetch(x,y) + # (x,y)¤Î°ÌÃÖ¤ÎÇúÃƤοô(0 or 1)¤òÊÖ¤¹ + if x < 0 then 0 + elsif x >= @wi then 0 + elsif y < 0 then 0 + elsif y >= @hi then 0 + else + @data[y*@wi+x] + end + end + def count(x,y) + # (x,y)¤ËÎÙÀܤ¹¤ëÇúÃƤοô¤òÊÖ¤¹ + fetch(x-1,y-1)+fetch(x,y-1)+fetch(x+1,y-1)+ + fetch(x-1,y) + fetch(x+1,y)+ + fetch(x-1,y+1)+fetch(x,y+1)+fetch(x+1,y+1) + end + def over(win) + # ¥²¡¼¥à¤Î½ªÎ» + quit + unless win + pos(@cx,@cy); print CHR[11] + end + pos(0,@hi) + if win then print "*** YOU WIN !! ***" + else print "*** GAME OVER ***" + end + end + def over? + # ¥²¡¼¥à¤Î½ªÎ»¥Á¥§¥Ã¥¯ + # ½ªÎ»½èÍý¤â¸Æ¤Ó½Ð¤¹ + remain = (@mc+@total == 0) + if @over || remain + over(remain) + true + else + false + end + end + def quit + # ¥²¡¼¥à¤ÎÃæÃÇ(¤Þ¤¿¤Ï½ªÎ») + # È×Ì̤òÁ´¤Æ¸«¤»¤ë + @hi.times do|y| + pos(0,y) + @wi.times do|x| + colorstr(if @state[y*@wi+x] == "MARK" then COL[1] else COL[2] end, + if fetch(x,y)==1 then CHR[10] else CHR[count(x,y)] end) + end + end + end + def down + # ¥«¡¼¥½¥ë¤ò²¼¤Ë + if @cy < @hi-1 then @cy=@cy+1; pos(@cx, @cy) end + end + def up + # ¥«¡¼¥½¥ë¤ò¾å¤Ë + if @cy > 0 then @cy=@cy-1; pos(@cx, @cy) end + end + def left + # ¥«¡¼¥½¥ë¤òº¸¤Ë + if @cx > 0 then @cx=@cx-1; pos(@cx, @cy) end + end + def right + # ¥«¡¼¥½¥ë¤ò±¦¤Ë + if @cx < @wi-1 then @cx=@cx+1; pos(@cx, @cy) end + end +end + +bd=Board.new(10,10,10) +system("stty raw -echo") +begin + loop do + case STDIN.getc + when ?n # new game + bd.reset + when ?m # mark + bd.mark + when ?j + bd.down + when ?k + bd.up + when ?h + bd.left + when ?l + bd.right + when ?\s + bd.open + when ?q,?\C-c # quit game + bd.quit + break + end + if bd.over? + if STDIN.getc == ?q then break end + bd.reset + end + end +ensure + system("stty -raw echo") +end +print "\n" diff --git a/lib/ruby-1.9.1-rc1/sample/mkproto.rb b/lib/ruby-1.9.1-rc1/sample/mkproto.rb new file mode 100644 index 0000000..754ca2d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/mkproto.rb @@ -0,0 +1,27 @@ +$/ = nil +while line = gets() + if /^((void|VALUE|int|char *\*|ID|struct [\w_]+ *\*|st_table *\*) *)?\n([\w\d_]+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line + line = $' + printf "%s %s(", $2, $3 + args = [] + for arg in $4.split(/;\n\s*/) + arg.gsub!(/ +/, ' ') + if arg =~ /,/ + if arg =~ /(([^*]+) *\** *[\w\d_]+),/ + type = $2.strip + args.push $1.strip + arg = $' + else + type = "" + end + while arg.sub!(/(\** *[\w\d_]+)(,|$)/, "") && $~ + args.push type + " " + $1.strip + end + else + args.push arg.strip + end + end + printf "%s);\n", args.join(', ') + redo + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/mpart.rb b/lib/ruby-1.9.1-rc1/sample/mpart.rb new file mode 100644 index 0000000..a88eba0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/mpart.rb @@ -0,0 +1,44 @@ +#! ./ruby +# split into multi part +# usage: mpart.rb [-nnn] file.. + +lines = 1000 + +if (ARGV[0] =~ /^-(\d+)$/ ) + lines = $1.to_i; + ARGV.shift; +end + +basename = ARGV[0] +extname = "part" + +part = 1 +line = 0 + +fline = 0 +for i in ifp = open(basename) + fline = fline + 1 +end +ifp.close + +parts = fline / lines + 1 + +for i in ifp = open(basename) + if line == 0 + ofp = open(sprintf("%s.%s%02d", basename, extname, part), "w") + printf(ofp, "%s part%02d/%02d\n", basename, part, parts) + ofp.write("BEGIN--cut here--cut here\n") + end + ofp.write(i) + line = line + 1 + if line >= lines and !ifp.eof? + ofp.write("END--cut here--cut here\n") + ofp.close + part = part + 1 + line = 0 + end +end +ofp.write("END--cut here--cut here\n") +ofp.close + +ifp.close diff --git a/lib/ruby-1.9.1-rc1/sample/observ.rb b/lib/ruby-1.9.1-rc1/sample/observ.rb new file mode 100644 index 0000000..72e5178 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/observ.rb @@ -0,0 +1,32 @@ +#! /usr/local/bin/ruby + +require "thread" +require "observer" + +class Tick + include Observable + def initialize + Thread.start do + loop do + sleep 0.999 + now = Time.now + changed + notify_observers(now.hour, now.min, now.sec) + end + end + end +end + +class Clock + def initialize(tick) + @tick = tick + @tick.add_observer(self) + end + def update(h, m, s) + printf "\e[8D%02d:%02d:%02d", h, m, s + STDOUT.flush + end +end + +clock = Clock.new(Tick.new) +sleep diff --git a/lib/ruby-1.9.1-rc1/sample/occur.pl b/lib/ruby-1.9.1-rc1/sample/occur.pl new file mode 100644 index 0000000..1f5fcf2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/occur.pl @@ -0,0 +1,9 @@ +while (<>) { + for (split(/\W+/)) { + $freq{$_}++; + } +} + +for (sort keys %freq) { + print "$_ -- $freq{$_}\n"; +} diff --git a/lib/ruby-1.9.1-rc1/sample/occur.rb b/lib/ruby-1.9.1-rc1/sample/occur.rb new file mode 100644 index 0000000..4ec6ae4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/occur.rb @@ -0,0 +1,12 @@ +# word occurrence listing +# usege: ruby occur.rb file.. +freq = Hash.new(0) +while line = gets() + for word in line.split(/\W+/) + freq[word] += 1 + end +end + +for word in freq.keys.sort! + print word, " -- ", freq[word], "\n" +end diff --git a/lib/ruby-1.9.1-rc1/sample/occur2.rb b/lib/ruby-1.9.1-rc1/sample/occur2.rb new file mode 100644 index 0000000..53885c0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/occur2.rb @@ -0,0 +1,16 @@ +# word occurrence listing +# usege: ruby occur2.rb file.. +freq = {} +while gets() + for word in split(/\W+/) + begin + freq[word] += 1 + rescue NameError + freq[word] = 1 + end + end +end + +for word in freq.keys.sort + printf("%s -- %d\n", word, freq[word]) +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/c_rehash.rb b/lib/ruby-1.9.1-rc1/sample/openssl/c_rehash.rb new file mode 100644 index 0000000..afbb654 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/c_rehash.rb @@ -0,0 +1,174 @@ +#!/usr/bin/env ruby + +require 'openssl' +require 'digest/md5' + +class CHashDir + include Enumerable + + def initialize(dirpath) + @dirpath = dirpath + @fingerprint_cache = @cert_cache = @crl_cache = nil + end + + def hash_dir(silent = false) + # ToDo: Should lock the directory... + @silent = silent + @fingerprint_cache = Hash.new + @cert_cache = Hash.new + @crl_cache = Hash.new + do_hash_dir + end + + def get_certs(name = nil) + if name + @cert_cache[hash_name(name)] + else + @cert_cache.values.flatten + end + end + + def get_crls(name = nil) + if name + @crl_cache[hash_name(name)] + else + @crl_cache.values.flatten + end + end + + def delete_crl(crl) + File.unlink(crl_filename(crl)) + hash_dir(true) + end + + def add_crl(crl) + File.open(crl_filename(crl), "w") do |f| + f << crl.to_pem + end + hash_dir(true) + end + + def load_pem_file(filepath) + str = File.read(filepath) + begin + OpenSSL::X509::Certificate.new(str) + rescue + begin + OpenSSL::X509::CRL.new(str) + rescue + begin + OpenSSL::X509::Request.new(str) + rescue + nil + end + end + end + end + +private + + def crl_filename(crl) + path(hash_name(crl.issuer)) + '.pem' + end + + def do_hash_dir + Dir.chdir(@dirpath) do + delete_symlink + Dir.glob('*.pem') do |pemfile| + cert = load_pem_file(pemfile) + case cert + when OpenSSL::X509::Certificate + link_hash_cert(pemfile, cert) + when OpenSSL::X509::CRL + link_hash_crl(pemfile, cert) + else + STDERR.puts("WARNING: #{pemfile} does not contain a certificate or CRL: skipping") unless @silent + end + end + end + end + + def delete_symlink + Dir.entries(".").each do |entry| + next unless /^[\da-f]+\.r{0,1}\d+$/ =~ entry + File.unlink(entry) if FileTest.symlink?(entry) + end + end + + def link_hash_cert(org_filename, cert) + name_hash = hash_name(cert.subject) + fingerprint = fingerprint(cert.to_der) + filepath = link_hash(org_filename, name_hash, fingerprint) { |idx| + "#{name_hash}.#{idx}" + } + unless filepath + unless @silent + STDERR.puts("WARNING: Skipping duplicate certificate #{org_filename}") + end + else + (@cert_cache[name_hash] ||= []) << path(filepath) + end + end + + def link_hash_crl(org_filename, crl) + name_hash = hash_name(crl.issuer) + fingerprint = fingerprint(crl.to_der) + filepath = link_hash(org_filename, name_hash, fingerprint) { |idx| + "#{name_hash}.r#{idx}" + } + unless filepath + unless @silent + STDERR.puts("WARNING: Skipping duplicate CRL #{org_filename}") + end + else + (@crl_cache[name_hash] ||= []) << path(filepath) + end + end + + def link_hash(org_filename, name, fingerprint) + idx = 0 + filepath = nil + while true + filepath = yield(idx) + break unless FileTest.symlink?(filepath) or FileTest.exist?(filepath) + if @fingerprint_cache[filepath] == fingerprint + return false + end + idx += 1 + end + STDOUT.puts("#{org_filename} => #{filepath}") unless @silent + symlink(org_filename, filepath) + @fingerprint_cache[filepath] = fingerprint + filepath + end + + def symlink(from, to) + begin + File.symlink(from, to) + rescue + File.open(to, "w") do |f| + f << File.read(from) + end + end + end + + def path(filename) + File.join(@dirpath, filename) + end + + def hash_name(name) + sprintf("%x", name.hash) + end + + def fingerprint(der) + Digest::MD5.hexdigest(der).upcase + end +end + +if $0 == __FILE__ + dirlist = ARGV + dirlist << '/usr/ssl/certs' if dirlist.empty? + dirlist.each do |dir| + CHashDir.new(dir).hash_dir + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/cert2text.rb b/lib/ruby-1.9.1-rc1/sample/openssl/cert2text.rb new file mode 100644 index 0000000..50da224 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/cert2text.rb @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby + +require 'openssl' +include OpenSSL::X509 + +def cert2text(cert_str) + [Certificate, CRL, Request].each do |klass| + begin + puts klass.new(cert_str).to_text + return + rescue + end + end + raise ArgumentError.new('Unknown format.') +end + +if ARGV.empty? + cert2text(STDIN.read) +else + ARGV.each do |file| + cert2text(File.read(file)) + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/certstore.rb b/lib/ruby-1.9.1-rc1/sample/openssl/certstore.rb new file mode 100644 index 0000000..bbc637f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/certstore.rb @@ -0,0 +1,161 @@ +require 'c_rehash' +require 'crlstore' + + +class CertStore + include OpenSSL + include X509 + + attr_reader :self_signed_ca + attr_reader :other_ca + attr_reader :ee + attr_reader :crl + attr_reader :request + + def initialize(certs_dir) + @certs_dir = certs_dir + @c_store = CHashDir.new(@certs_dir) + @c_store.hash_dir(true) + @crl_store = CrlStore.new(@c_store) + @x509store = Store.new + @self_signed_ca = @other_ca = @ee = @crl = nil + + # Uncomment this line to let OpenSSL to check CRL for each certs. + # @x509store.flags = V_FLAG_CRL_CHECK | V_FLAG_CRL_CHECK_ALL + + add_path + scan_certs + end + + def generate_cert(filename) + @c_store.load_pem_file(filename) + end + + def verify(cert) + error, crl_map = do_verify(cert) + if error + [[false, cert, crl_map[cert.subject], error]] + else + @x509store.chain.collect { |c| [true, c, crl_map[c.subject], nil] } + end + end + + def match_cert(cert1, cert2) + (cert1.issuer.cmp(cert2.issuer) == 0) and cert1.serial == cert2.serial + end + + def is_ca?(cert) + case guess_cert_type(cert) + when CERT_TYPE_SELF_SIGNED + true + when CERT_TYPE_OTHER + true + else + false + end + end + + def scan_certs + @self_signed_ca = [] + @other_ca = [] + @ee = [] + @crl = [] + @request = [] + load_certs + end + +private + + def add_path + @x509store.add_path(@certs_dir) + end + + def do_verify(cert) + error_map = {} + crl_map = {} + result = @x509store.verify(cert) do |ok, ctx| + cert = ctx.current_cert + if ctx.current_crl + crl_map[cert.subject] = true + end + if ok + if !ctx.current_crl + if crl = @crl_store.find_crl(cert) + crl_map[cert.subject] = true + if crl.revoked.find { |revoked| revoked.serial == cert.serial } + ok = false + error_string = 'certification revoked' + end + end + end + end + error_map[cert.subject] = error_string if error_string + ok + end + error = if result + nil + else + error_map[cert.subject] || @x509store.error_string + end + return error, crl_map + end + + def load_certs + @c_store.get_certs.each do |certfile| + cert = generate_cert(certfile) + case guess_cert_type(cert) + when CERT_TYPE_SELF_SIGNED + @self_signed_ca << cert + when CERT_TYPE_OTHER + @other_ca << cert + when CERT_TYPE_EE + @ee << cert + else + raise "Unknown cert type." + end + end + @c_store.get_crls.each do |crlfile| + @crl << generate_cert(crlfile) + end + end + + CERT_TYPE_SELF_SIGNED = 0 + CERT_TYPE_OTHER = 1 + CERT_TYPE_EE = 2 + def guess_cert_type(cert) + ca = self_signed = is_cert_self_signed(cert) + cert.extensions.each do |ext| + # Ignores criticality of extensions. It's 'guess'ing. + case ext.oid + when 'basicConstraints' + /CA:(TRUE|FALSE), pathlen:(\d+)/ =~ ext.value + ca = ($1 == 'TRUE') unless ca + when 'keyUsage' + usage = ext.value.split(/\s*,\s*/) + ca = usage.include?('Certificate Sign') unless ca + when 'nsCertType' + usage = ext.value.split(/\s*,\s*/) + ca = usage.include?('SSL CA') unless ca + end + end + if ca + if self_signed + CERT_TYPE_SELF_SIGNED + else + CERT_TYPE_OTHER + end + else + CERT_TYPE_EE + end + end + + def is_cert_self_signed(cert) + # cert.subject.cmp(cert.issuer) == 0 + cert.subject.to_s == cert.issuer.to_s + end +end + + +if $0 == __FILE__ + c = CertStore.new("trust_certs") +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/cipher.rb b/lib/ruby-1.9.1-rc1/sample/openssl/cipher.rb new file mode 100644 index 0000000..58b10d6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/cipher.rb @@ -0,0 +1,54 @@ +#!/usr/bin/env ruby +require 'openssl' + +def crypt_by_password(alg, pass, salt, text) + puts "--Setup--" + puts %(cipher alg: "#{alg}") + puts %(plain text: "#{text}") + puts %(password: "#{pass}") + puts %(salt: "#{salt}") + puts + + puts "--Encrypting--" + enc = OpenSSL::Cipher::Cipher.new(alg) + enc.encrypt + enc.pkcs5_keyivgen(pass, salt) + cipher = enc.update(text) + cipher << enc.final + puts %(encrypted text: #{cipher.inspect}) + puts + + puts "--Decrypting--" + dec = OpenSSL::Cipher::Cipher.new(alg) + dec.decrypt + dec.pkcs5_keyivgen(pass, salt) + plain = dec.update(cipher) + plain << dec.final + puts %(decrypted text: "#{plain}") + puts +end + +def ciphers + ciphers = OpenSSL::Cipher.ciphers.sort + ciphers.each{|i| + if i.upcase != i && ciphers.include?(i.upcase) + ciphers.delete(i) + end + } + return ciphers +end + +puts "Supported ciphers in #{OpenSSL::OPENSSL_VERSION}:" +ciphers.each_with_index{|name, i| + printf("%-15s", name) + puts if (i + 1) % 5 == 0 +} +puts +puts + +alg = ARGV.shift || ciphers.first +pass = "secret password" +salt = "8 octets" # or nil +text = "abcdefghijklmnopqrstuvwxyz" + +crypt_by_password(alg, pass, salt, text) diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/crlstore.rb b/lib/ruby-1.9.1-rc1/sample/openssl/crlstore.rb new file mode 100644 index 0000000..b305913 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/crlstore.rb @@ -0,0 +1,122 @@ +begin + require 'http-access2' +rescue LoadError + STDERR.puts("Cannot load http-access2. CRL might not be fetched.") +end +require 'c_rehash' + + +class CrlStore + def initialize(c_store) + @c_store = c_store + @c_store.hash_dir(true) + end + + def find_crl(cert) + do_find_crl(cert) + end + +private + + def do_find_crl(cert) + unless ca = find_ca(cert) + return nil + end + unless crlfiles = @c_store.get_crls(ca.subject) + if crl = renew_crl(cert, ca) + @c_store.add_crl(crl) + return crl + end + return nil + end + crlfiles.each do |crlfile| + next unless crl = load_crl(crlfile) + if crl.next_update < Time.now + if new_crl = renew_crl(cert, ca) + @c_store.delete_crl(crl) + @c_store.add_crl(new_crl) + crl = new_crl + end + end + if check_valid(crl, ca) + return crl + end + end + nil + end + + def find_ca(cert) + @c_store.get_certs(cert.issuer).each do |cafile| + ca = load_cert(cafile) + if cert.verify(ca.public_key) + return ca + end + end + nil + end + + def fetch(location) + if /\AURI:(.*)\z/ =~ location + begin + c = HTTPAccess2::Client.new(ENV['http_proxy'] || ENV['HTTP_PROXY']) + c.get_content($1) + rescue NameError, StandardError + nil + end + else + nil + end + end + + def load_cert(certfile) + load_cert_str(File.read(certfile)) + end + + def load_crl(crlfile) + load_crl_str(File.read(crlfile)) + end + + def load_cert_str(cert_str) + OpenSSL::X509::Certificate.new(cert_str) + end + + def load_crl_str(crl_str) + OpenSSL::X509::CRL.new(crl_str) + end + + def check_valid(crl, ca) + unless crl.verify(ca.public_key) + return false + end + crl.last_update <= Time.now + end + + RE_CDP = /\AcrlDistributionPoints\z/ + def get_cdp(cert) + if cdp_ext = cert.extensions.find { |ext| RE_CDP =~ ext.oid } + cdp_ext.value.chomp + else + false + end + end + + def renew_crl(cert, ca) + if cdp = get_cdp(cert) + if new_crl_str = fetch(cdp) + new_crl = load_crl_str(new_crl_str) + if check_valid(new_crl, ca) + return new_crl + end + end + end + false + end +end + +if $0 == __FILE__ + dir = "trust_certs" + c_store = CHashDir.new(dir) + s = CrlStore.new(c_store) + c = OpenSSL::X509::Certificate.new(File.read("cert_store/google_codesign.pem")) + p s.find_crl(c) +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/echo_cli.rb b/lib/ruby-1.9.1-rc1/sample/openssl/echo_cli.rb new file mode 100644 index 0000000..069a21e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/echo_cli.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby + +require 'socket' +require 'openssl' +require 'optparse' + +options = ARGV.getopts("p:c:k:C:") + +host = ARGV[0] || "localhost" +port = options["p"] || "2000" +cert_file = options["c"] +key_file = options["k"] +ca_path = options["C"] + +ctx = OpenSSL::SSL::SSLContext.new() +if cert_file && key_file + ctx.cert = OpenSSL::X509::Certificate.new(File::read(cert_file)) + ctx.key = OpenSSL::PKey::RSA.new(File::read(key_file)) +end +if ca_path + ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER + ctx.ca_path = ca_path +else + $stderr.puts "!!! WARNING: PEER CERTIFICATE WON'T BE VERIFIED !!!" +end + +s = TCPSocket.new(host, port) +ssl = OpenSSL::SSL::SSLSocket.new(s, ctx) +ssl.connect # start SSL session +p ssl.peer_cert +errors = Hash.new +OpenSSL::X509.constants.grep(/^V_(ERR_|OK)/).each do |name| + errors[OpenSSL::X509.const_get(name)] = name +end +p errors[ssl.verify_result] + +ssl.sync_close = true # if true the underlying socket will be + # closed in SSLSocket#close. (default: false) +while line = $stdin.gets + ssl.write line + puts ssl.gets.inspect +end + +ssl.close diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/echo_svr.rb b/lib/ruby-1.9.1-rc1/sample/openssl/echo_svr.rb new file mode 100644 index 0000000..719de6b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/echo_svr.rb @@ -0,0 +1,65 @@ +#!/usr/bin/env ruby + +require 'socket' +require 'openssl' +require 'optparse' + +options = ARGV.getopts("p:c:k:C:") + +port = options["p"] || "2000" +cert_file = options["c"] +key_file = options["k"] +ca_path = options["C"] + +if cert_file && key_file + cert = OpenSSL::X509::Certificate.new(File::read(cert_file)) + key = OpenSSL::PKey::RSA.new(File::read(key_file)) +else + key = OpenSSL::PKey::RSA.new(512){ print "." } + puts + cert = OpenSSL::X509::Certificate.new + cert.version = 2 + cert.serial = 0 + name = OpenSSL::X509::Name.new([["C","JP"],["O","TEST"],["CN","localhost"]]) + cert.subject = name + cert.issuer = name + cert.not_before = Time.now + cert.not_after = Time.now + 3600 + cert.public_key = key.public_key + ef = OpenSSL::X509::ExtensionFactory.new(nil,cert) + cert.extensions = [ + ef.create_extension("basicConstraints","CA:FALSE"), + ef.create_extension("subjectKeyIdentifier","hash"), + ef.create_extension("extendedKeyUsage","serverAuth"), + ef.create_extension("keyUsage", + "keyEncipherment,dataEncipherment,digitalSignature") + ] + ef.issuer_certificate = cert + cert.add_extension ef.create_extension("authorityKeyIdentifier", + "keyid:always,issuer:always") + cert.sign(key, OpenSSL::Digest::SHA1.new) +end + +ctx = OpenSSL::SSL::SSLContext.new() +ctx.key = key +ctx.cert = cert +if ca_path + ctx.verify_mode = + OpenSSL::SSL::VERIFY_PEER|OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT + ctx.ca_path = ca_path +else + $stderr.puts "!!! WARNING: PEER CERTIFICATE WON'T BE VERIFIED !!!" +end + +tcps = TCPServer.new(port) +ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx) +loop do + ns = ssls.accept + puts "connected from #{ns.peeraddr}" + while line = ns.gets + puts line.inspect + ns.write line + end + puts "connection closed" + ns.close +end diff --git a/lib/ruby-1.9.1-rc1/sample/openssl/gen_csr.rb b/lib/ruby-1.9.1-rc1/sample/openssl/gen_csr.rb new file mode 100644 index 0000000..4228707 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/openssl/gen_csr.rb @@ -0,0 +1,51 @@ +#!/usr/bin/env ruby + +require 'optparse' +require 'openssl' + +include OpenSSL + +def usage + myname = File::basename($0) + $stderr.puts < "iso-2022-jp", "sjis" => "shift_jis"} +POSSIBLE_CODES = "(#{(CODES+CODE_ALIASES.keys).join(',')})" + +ARGV.options do + |opts| + opts.banner << " argv..." + + # separater + opts.on_tail + opts.on_tail("common options:") + + # no argument, shows at tail + opts.on_tail("--help", "show this message") {puts opts; exit} + + # mandatory argument + opts.on("-r", "--require=LIBRARY", String, + "require the LIBRARY, before", + "executing your script") {|lib|@library=lib} + + # optional argument + opts.on("-i", "--inplace=[EXTENSION]", + "edit ARGV files in place", # multiline description + "(make backup if EXTENSION supplied)") {|inplace| @inplace = inplace || ''} + + opts.on("-N=[NUM]", Integer) {|num|@number=num} + + # additional class + opts.on("-t", "--[no-]time[=TIME]", Time, "it's the time") {|time|@time=time} + + # limit argument syntax + opts.on("-[0-7]", "-F", "--irs=[OCTAL]", OptionParser::OctalInteger, + "specify record separator", "(\\0, if no argument)") {|irs|@irs=irs} + + # boolean switch(default true) + @exec = true + opts.on("-n", "--no-exec[=FLAG]", TrueClass, "not really execute") {|exec|@exec=exec} + + # array + opts.on("-a", "--list[=LIST,LIST]", Array, "list") {|list|@list=list} + + # fixed size array + opts.on("--pair[=car,cdr]", Array, "pair") {|x,y|@x=x; @y=y} + + # keyword completion + opts.on("--code=CODE", CODES, CODE_ALIASES, "select coding system", + "("+CODES.join(",")+",", " "+CODE_ALIASES.keys.join(",")+")") {|c|@code=c} + + # optional argument with keyword completion + opts.on("--type[=TYPE]", [:text, :binary], "select type(text, binary)") {|t|@type=t} + + # boolean switch with optional argument(default false) + opts.on("-v", "--[no-]verbose=[FLAG]", "run verbosely") {|v|@verbose=v} + + # easy way, set local variable + opts.on("-q", "--quit", "quit when ARGV is empty") {|q|@quit=q} + + # adding on the fly + opts.on("--add=SWITCH=[ARG]", "add option on the fly", /\A(\w+)(?:=.+)?\Z/) do + |opt, var| + opts.on("--#{opt}", "added in runtime", &eval("proc {|x|@#{var}=x}")) + end + + opts.on_head("specific options:") + + # no argument + opts.on_tail("--version", "show version") do + puts OptionParser::Version.join('.') + exit + end + opts.parse! +end + +pp self +begin print ARGV.options; exit end if @quit +ARGV.options = nil # no more parse +puts "ARGV = #{ARGV.join(' ')}" if !ARGV.empty? +#opts.variable.each {|sym| puts "#{sym} = #{opts.send(sym).inspect}"} diff --git a/lib/ruby-1.9.1-rc1/sample/optparse/subcommand.rb b/lib/ruby-1.9.1-rc1/sample/optparse/subcommand.rb new file mode 100755 index 0000000..21c42dd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/optparse/subcommand.rb @@ -0,0 +1,19 @@ +#! /usr/bin/ruby +# contributed by Minero Aoki. + +require 'optparse' + +parser = OptionParser.new +parser.on('-i') { puts "-i" } +parser.on('-o') { puts '-o' } + +subparsers = Hash.new {|h,k| + $stderr.puts "no such subcommand: #{k}" + exit 1 +} +subparsers['add'] = OptionParser.new.on('-i') { puts "add -i" } +subparsers['del'] = OptionParser.new.on('-i') { puts "del -i" } +subparsers['list'] = OptionParser.new.on('-i') { puts "list -i" } + +parser.order!(ARGV) +subparsers[ARGV.shift].parse!(ARGV) unless ARGV.empty? diff --git a/lib/ruby-1.9.1-rc1/sample/philos.rb b/lib/ruby-1.9.1-rc1/sample/philos.rb new file mode 100644 index 0000000..5c8f43c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/philos.rb @@ -0,0 +1,54 @@ +# +# The Dining Philosophers - thread example +# +require "thread" + +srand +#srand +N=9 # number of philosophers +$forks = [] +for i in 0..N-1 + $forks[i] = Mutex.new +end +$state = "-o"*N + +def wait + sleep rand(20)/10.0 +end + +def think(n) + wait +end + +def eat(n) + wait +end + +def philosopher(n) + while true + think n + $forks[n].lock + if not $forks[(n+1)%N].try_lock + $forks[n].unlock # avoid deadlock + next + end + $state[n*2] = ?|; + $state[(n+1)%N*2] = ?|; + $state[n*2+1] = ?*; + print $state, "\n" + eat(n) + $state[n*2] = ?-; + $state[(n+1)%N*2] = ?-; + $state[n*2+1] = ?o; + print $state, "\n" + $forks[n].unlock + $forks[(n+1)%N].unlock + end +end + +for n in 0..N-1 + Thread.start(n){|i| philosopher(i)} + sleep 0.1 +end + +sleep diff --git a/lib/ruby-1.9.1-rc1/sample/pi.rb b/lib/ruby-1.9.1-rc1/sample/pi.rb new file mode 100644 index 0000000..63be974 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/pi.rb @@ -0,0 +1,18 @@ +#!/usr/local/bin/ruby + +k, a, b, a1, b1 = 2, 4, 1, 12, 4 + +loop do + # Next approximation + p, q, k = k*k, 2*k+1, k+1 + a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1 + # Print common digits + d = a / b + d1 = a1 / b1 + while d == d1 + print d + $stdout.flush + a, a1 = 10*(a%b), 10*(a1%b1) + d, d1 = a/b, a1/b1 + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/rcs.awk b/lib/ruby-1.9.1-rc1/sample/rcs.awk new file mode 100644 index 0000000..0897928 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rcs.awk @@ -0,0 +1,33 @@ +BEGIN { + sw = 40.0; + dw = 78.0; + hdw = dw / 2.0; + w = 20.0; + h =1.0; + d = 0.2; + ss="abcdefghijklmnopqrstuvwxyz0123456789!#$%^&*()-=\\[];'`,./"; + rnd = srand(); +} + +{ + xr = -hdw; y = h * 1.0; maxxl = -999; + s = ""; + while (xr < hdw) { + x = xr * (1 + y) - y * w / 2; + i = (x / (1 + h) + sw /2); + c = (0 < i && i < length($0)) ? substr($0, i, 1) : "0"; + y = h - d * c; + xl = xr - w * y / (1 + y); + if (xl < -hdw || xl >= hdw || xl <= maxxl) { + t = rand() * length(ss); + c = substr(ss, t, 1); + } + else { + c = substr(s, xl + hdw, 1); + maxxl = xl; + } + s = s c; + xr = xr + 1; + } + print s; +} diff --git a/lib/ruby-1.9.1-rc1/sample/rcs.dat b/lib/ruby-1.9.1-rc1/sample/rcs.dat new file mode 100644 index 0000000..61c88bf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rcs.dat @@ -0,0 +1,17 @@ +0000000000000000220000000000000000 +0000000000000111221110000000000000 +0000000000111112222111110000000000 +0000000111111112222111111110000000 +0000111111111122222211111111110000 +0111111111111222222221111111111110 +2222222222222222222222222222222222 +1122222222222222222222222222222211 +0111122222222222222222222222211110 +0011111122222222222222222211111100 +0001111111222222222222221111111000 +0000111112222222222222222111110000 +0000011122222222112222222211100000 +0000001122222221111222222211000000 +0000000122221111111111222210000000 +0000000221111111111111111220000000 +0000000000000000000000000000000000 diff --git a/lib/ruby-1.9.1-rc1/sample/rcs.rb b/lib/ruby-1.9.1-rc1/sample/rcs.rb new file mode 100644 index 0000000..0bdf81c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rcs.rb @@ -0,0 +1,39 @@ +# random dot steraogram +# usage: rcs.rb rcs.dat + +sw = 40.0 # width of original pattern +dw = 78.0 # width of generating Random Character Streogram +hdw = dw / 2.0 +w = 20.0 # distance between eyes +h =1.0 # distance from screen and base plane +d = 0.2 # z value unit +ss="abcdefghijklmnopqrstuvwxyz0123456789#!$%^&*()-=\\[];'`,./" +rnd = srand() # You don't actually need this in ruby - srand() is called + # on the first call of rand(). + +while gets() +# print($_) + xr = -hdw; y = h * 1.0; maxxl = -999 + s = "" + while xr < hdw + x = xr * (1 + y) - y * w / 2 + i = (x / (1 + h) + sw / 2) + if (1 < i && i < $_.length) + c = $_[i, 1].to_i + else + c = 0 + end + y = h - d * c + xl = xr - w * y / (1 + y) + if xl < -hdw || xl >= hdw || xl <= maxxl + tt = rand(ss.length) + c = ss[tt, 1] + else + c = s[xl + hdw, 1] + maxxl = xl + end + s += c + xr += 1 + end + print(s, "\n") +end diff --git a/lib/ruby-1.9.1-rc1/sample/rdoc/markup/rdoc2latex.rb b/lib/ruby-1.9.1-rc1/sample/rdoc/markup/rdoc2latex.rb new file mode 100644 index 0000000..aa8079e --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rdoc/markup/rdoc2latex.rb @@ -0,0 +1,15 @@ +#!/usr/local/bin/ruby +# Illustration of a script to convert an RDoc-style file to a LaTeX document + +require 'rdoc/markup' +require 'rdoc/markup/to_latex' + +p = RDoc::Markup.new +h = RDoc::Markup::ToLaTeX.new + +#puts "\\documentclass{report}" +#puts "\\usepackage{tabularx}" +#puts "\\usepackage{parskip}" +#puts "\\begin{document}" +puts p.convert(ARGF.read, h) +#puts "\\end{document}" diff --git a/lib/ruby-1.9.1-rc1/sample/rdoc/markup/sample.rb b/lib/ruby-1.9.1-rc1/sample/rdoc/markup/sample.rb new file mode 100644 index 0000000..db5d88d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rdoc/markup/sample.rb @@ -0,0 +1,40 @@ +# This program illustrates the basic use of the SimpleMarkup +# class. It extracts the first comment block from the +# simple_markup.rb file and converts it into HTML on +# standard output. Run it using +# +# % ruby sample.rb +# +# You should be in the sample/rdoc/markup/ directory when you do this, +# as it hardwires the path to the files it needs to require. +# This isn't necessary in the code you write once you've +# installed the package. +# +# For a better way of formatting code comment blocks (and more) +# see the rdoc package. +# + +require 'rdoc/markup/simple_markup' +require 'rdoc/markup/simple_markup/to_html' + +# Extract the comment block from the source file + +input_string = "" + +File.foreach("../../../lib/rdoc/markup/simple_markup.rb") do |line| + break unless line.gsub!(/^\# ?/, '') + input_string << line +end + +# Create a markup object +markup = SM::SimpleMarkup.new + +# Attach it to an HTML formatter +h = SM::ToHtml.new + +# And convert out comment block to html. Wrap it a body +# tag pair to let browsers view it + +puts "" +puts markup.convert(input_string, h) +puts "" diff --git a/lib/ruby-1.9.1-rc1/sample/ripper/ruby2html.rb b/lib/ruby-1.9.1-rc1/sample/ripper/ruby2html.rb new file mode 100644 index 0000000..8f64f5a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/ripper/ruby2html.rb @@ -0,0 +1,112 @@ +#!/usr/bin/env ruby +# $originalId: ruby2html.rb,v 1.2 2005/09/23 22:53:47 aamine Exp $ + +TEMPLATE_LINE = __LINE__ + 2 +TEMPLATE = <<-EndTemplate + + + + +<% if css %> + +<% end %> + <%= File.basename(f.path) %> + + +
      +<%
      +    if print_line_number
      +      Ruby2HTML.compile(f).each_with_index do |line, idx|
      +%><%= sprintf('%4d  %s', idx+1, line) %><%
      +      end
      +    else
      +%><%= Ruby2HTML.compile(f) %><%
      +    end
      +%>
      +
      + + +EndTemplate + +require 'ripper' +require 'stringio' +require 'cgi' +require 'erb' +require 'optparse' + +def main + encoding = 'us-ascii' + css = nil + print_line_number = false + parser = OptionParser.new + parser.banner = "Usage: #{File.basename($0)} [-l] [...]" + parser.on('--encoding=NAME', 'Character encoding [us-ascii].') {|name| + encoding = name + } + parser.on('--css=URL', 'Set a link to CSS.') {|url| + css = url + } + parser.on('-l', '--line-number', 'Show line number.') { + print_line_number = true + } + parser.on('--help', 'Prints this message and quit.') { + puts parser.help + exit 0 + } + begin + parser.parse! + rescue OptionParser::ParseError => err + $stderr.puts err + $stderr.puts parser.help + exit 1 + end + puts ruby2html(ARGF, encoding, css, print_line_number) +end + +class ERB + attr_accessor :lineno + + remove_method :result + def result(b) + eval(@src, b, (@filename || '(erb)'), (@lineno || 1)) + end +end + +def ruby2html(f, encoding, css, print_line_number) + erb = ERB.new(TEMPLATE, nil, '>') + erb.filename = __FILE__ + erb.lineno = TEMPLATE_LINE + erb.result(binding()) +end + +class Ruby2HTML < Ripper::Filter + def Ruby2HTML.compile(f) + buf = StringIO.new + Ruby2HTML.new(f).parse(buf) + buf.string + end + + def on_default(event, tok, f) + f << CGI.escapeHTML(tok) + end + + def on_kw(tok, f) + f << %Q[#{CGI.escapeHTML(tok)}] + end + + def on_comment(tok, f) + f << %Q[#{CGI.escapeHTML(tok.rstrip)}\n] + end + + def on_tstring_beg(tok, f) + f << %Q[#{CGI.escapeHTML(tok)}] + end + + def on_tstring_end(tok, f) + f << %Q[#{CGI.escapeHTML(tok)}] + end +end + +if $0 == __FILE__ + main +end diff --git a/lib/ruby-1.9.1-rc1/sample/ripper/strip-comment.rb b/lib/ruby-1.9.1-rc1/sample/ripper/strip-comment.rb new file mode 100644 index 0000000..9a8f175 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/ripper/strip-comment.rb @@ -0,0 +1,19 @@ +# $Id: strip-comment.rb 11708 2007-02-12 23:01:19Z shyouhei $ + +require 'ripper/filter' + +class CommentStripper < Ripper::Filter + def CommentStripper.strip(src) + new(src).parse(nil) + end + + def on_default(event, token, data) + print token + end + + def on_comment(token, data) + puts + end +end + +CommentStripper.strip(ARGF) diff --git a/lib/ruby-1.9.1-rc1/sample/rss/blend.rb b/lib/ruby-1.9.1-rc1/sample/rss/blend.rb new file mode 100755 index 0000000..351f6f3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rss/blend.rb @@ -0,0 +1,79 @@ +#!/usr/bin/env ruby + +require "rss" + +feeds = [] +verbose = false +encoding = "UTF-8" + +def error(exception) + mark = "=" * 20 + mark = "#{mark} error #{mark}" + STDERR.puts mark + STDERR.puts exception.class + STDERR.puts exception.message + STDERR.puts exception.backtrace + STDERR.puts mark +end + +before_time = Time.now +ARGV.each do |fname| + if fname == '-v' + verbose = true + next + end + rss = nil + f = File.new(fname).read + begin + ## do validate parse + rss = RSS::Parser.parse(f) + rescue RSS::InvalidRSSError + error($!) if verbose + ## do non validate parse for invalid RSS 1.0 + begin + rss = RSS::Parser.parse(f, false) + rescue RSS::Error + ## invalid RSS. + error($!) if verbose + end + rescue RSS::Error + error($!) if verbose + end + if rss.nil? + STDERR.puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" + else + begin + rss.output_encoding = encoding + rescue RSS::UnknownConversionMethodError + error($!) if verbose + end + feeds << rss + end +end +processing_time = Time.now - before_time + +rss = RSS::Maker.make("1.0") do |maker| + maker.encoding = encoding + maker.channel.about = "http://example.com/blend.rdf" + maker.channel.title = "blended feeds" + maker.channel.link = "http://example.com/" + maker.channel.description = "blended feeds generated by RSS Parser" + + feeds.each do |feed| + feed.items.each do |item| + item.setup_maker(maker.items) + end + end + + maker.items.each do |item| + item.title ||= "UNKNOWN" + item.link ||= "UNKNOWN" + end + + maker.items.do_sort = true + maker.items.max_size = 15 +end +puts rss + +STDERR.puts "Used XML parser: #{RSS::Parser.default_parser}" +STDERR.puts "Processing time: #{processing_time}s" diff --git a/lib/ruby-1.9.1-rc1/sample/rss/convert.rb b/lib/ruby-1.9.1-rc1/sample/rss/convert.rb new file mode 100755 index 0000000..e6bff4c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rss/convert.rb @@ -0,0 +1,69 @@ +#!/usr/bin/env ruby + +require "rss" + +feeds = [] +verbose = false +encoding = "UTF-8" +to_version = "1.0" + +def error(exception) + mark = "=" * 20 + mark = "#{mark} error #{mark}" + STDERR.puts mark + STDERR.puts exception.class + STDERR.puts exception.message + STDERR.puts exception.backtrace + STDERR.puts mark +end + +before_time = Time.now +ARGV.each do |fname| + case fname + when '-v' + verbose = true + next + when /^-t(0\.91|1\.0|2\.0|atom)$/ + to_version = $1 + next + end + rss = nil + f = File.read(fname) + begin + ## do validate parse + rss = RSS::Parser.parse(f) + rescue RSS::InvalidRSSError + error($!) if verbose + ## do non validate parse for invalid RSS 1.0 + begin + rss = RSS::Parser.parse(f, false) + rescue RSS::Error + ## invalid RSS. + error($!) if verbose + end + rescue RSS::Error + error($!) if verbose + end + if rss.nil? + STDERR.puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" + else + begin + rss.output_encoding = encoding + rescue RSS::UnknownConversionMethodError + error($!) if verbose + end + feeds << [fname, rss] + end +end +processing_time = Time.now - before_time + +feeds.each do |fname, rss| + converted_rss = rss.to_xml(to_version) + output_name = fname.sub(/(\.[^\.]+)$/, "-#{to_version}\\1") + File.open(output_name, "w") do |output| + output.print(converted_rss) + end +end + +STDERR.puts "Used XML parser: #{RSS::Parser.default_parser}" +STDERR.puts "Processing time: #{processing_time}s" diff --git a/lib/ruby-1.9.1-rc1/sample/rss/list_description.rb b/lib/ruby-1.9.1-rc1/sample/rss/list_description.rb new file mode 100755 index 0000000..d4b98a9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rss/list_description.rb @@ -0,0 +1,91 @@ +#!/usr/bin/env ruby + +require "nkf" +class String + # From tdiary.rb + def shorten( len = 120 ) + lines = NKF::nkf( "-e -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) + lines[0].concat( '...' ) if lines[0] and lines[1] + lines[0] + end +end + +require "rss" + +channels = {} +verbose = false + +def error(exception) + mark = "=" * 20 + mark = "#{mark} error #{mark}" + puts mark + puts exception.class + puts exception.message + puts exception.backtrace + puts mark +end + +before_time = Time.now +ARGV.each do |fname| + if fname == '-v' + verbose = true + next + end + rss = nil + f = File.new(fname).read + begin + ## do validate parse + rss = RSS::Parser.parse(f) + rescue RSS::InvalidRSSError + error($!) if verbose + ## do non validate parse for invalid RSS 1.0 + begin + rss = RSS::Parser.parse(f, false) + rescue RSS::Error + ## invalid RSS. + error($!) if verbose + end + rescue RSS::Error + error($!) if verbose + end + if rss.nil? + puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" + else + begin + rss.output_encoding = "euc-jp" + rescue RSS::UnknownConversionMethodError + error($!) if verbose + end + + rss = rss.to_rss("1.0") do |maker| + maker.channel.about ||= maker.channel.link + maker.channel.description ||= "No description" + maker.items.each do |item| + item.title ||= "No title" + item.link ||= "UNKNOWN" + end + end + next if rss.nil? + + rss.items.each do |item| + channels[rss.channel.title] ||= [] + channels[rss.channel.title] << item if item.description + end + end +end +processing_time = Time.now - before_time + +channels.sort do |x, y| + x[0] <=> y[0] +end[0..20].each do |title, items| + puts "Channel: #{title}" unless items.empty? + items.sort do |x, y| + x.title <=> y.title + end[0..10].each do |item| + puts " Item: #{item.title.shorten(50)}" + puts " Description: #{item.description.shorten(50)}" + end +end + +puts "Used XML parser: #{RSS::Parser.default_parser}" +puts "Processing time: #{processing_time}s" diff --git a/lib/ruby-1.9.1-rc1/sample/rss/re_read.rb b/lib/ruby-1.9.1-rc1/sample/rss/re_read.rb new file mode 100755 index 0000000..ee54a18 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rss/re_read.rb @@ -0,0 +1,64 @@ +#!/usr/bin/env ruby + +require "rss" + +def error(exception) + mark = "=" * 20 + mark = "#{mark} error #{mark}" + puts mark + puts exception.class + puts exception.message + puts exception.backtrace + puts mark +end + +verbose = false +before_time = Time.now + +ARGV.each do |fname| + if fname == '-v' + verbose = true + next + end + source = nil + File.open(fname) do |f| + source = f.read + end + + rss = nil + read = false + begin + rss = RSS::Parser.parse(source) + puts "Re-read valid feed: #{fname}" + RSS::Parser.parse(rss.to_s) + read = true + rescue RSS::InvalidRSSError + error($!) if verbose + ## do non validate parse for invalid feed + begin + rss = RSS::Parser.parse(source, false) + rescue RSS::Error + ## invalid feed + error($!) if verbose + end + rescue RSS::Error + error($!) if verbose + end + + if rss.nil? + puts "Invalid feed: #{fname}" + elsif !read + puts "Re-read invalid feed: #{fname}" + begin + RSS::Parser.parse(rss.to_s) + rescue RSS::Error + puts " Error occurred: #{fname}" + error($!) if verbose + end + end +end + +processing_time = Time.now - before_time + +puts "Used XML parser: #{RSS::Parser.default_parser}" +puts "Processing time: #{processing_time}s" diff --git a/lib/ruby-1.9.1-rc1/sample/rss/rss_recent.rb b/lib/ruby-1.9.1-rc1/sample/rss/rss_recent.rb new file mode 100755 index 0000000..38b57c3 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/rss/rss_recent.rb @@ -0,0 +1,85 @@ +#!/usr/bin/env ruby + +require "nkf" +class String + # From tdiary.rb + def shorten( len = 120 ) + lines = NKF::nkf( "-e -m0 -f#{len}", self.gsub( /\n/, ' ' ) ).split( /\n/ ) + lines[0].concat( '...' ) if lines[0] and lines[1] + lines[0] + end +end + +require "rss" + +items = [] +verbose = false + +def error(exception) + mark = "=" * 20 + mark = "#{mark} error #{mark}" + puts mark + puts exception.class + puts exception.message + puts exception.backtrace + puts mark +end +before_time = Time.now +ARGV.each do |fname| + if fname == '-v' + verbose = true + next + end + rss = nil + f = File.new(fname).read + begin + ## do validate parse + rss = RSS::Parser.parse(f) + rescue RSS::InvalidRSSError + error($!) if verbose + ## do non validate parse for invalid RSS 1.0 + begin + rss = RSS::Parser.parse(f, false) + rescue RSS::Error + ## invalid RSS. + error($!) if verbose + end + rescue RSS::Error + error($!) if verbose + end + if rss.nil? + puts "#{fname} does not include RSS 1.0 or 0.9x/2.0" + else + begin + rss.output_encoding = "euc-jp" + rescue RSS::UnknownConversionMethodError + error($!) if verbose + end + + rss = rss.to_rss("1.0") do |maker| + maker.channel.about ||= maker.channel.link + maker.channel.description ||= "No description" + maker.items.each do |item| + item.title ||= "UNKNOWN" + item.link ||= "UNKNOWN" + end + end + next if rss.nil? + + rss.items.each do |item| + items << [rss.channel, item] if item.dc_date + end + end +end +processing_time = Time.now - before_time + +items.sort do |x, y| + y[1].dc_date <=> x[1].dc_date +end[0..20].each do |channel, item| + puts "#{item.dc_date.localtime.iso8601}: " << + "#{channel.title}: #{item.title}" + puts " Description: #{item.description.shorten(50)}" if item.description +end + +puts "Used XML parser: #{RSS::Parser.default_parser}" +puts "Processing time: #{processing_time}s" diff --git a/lib/ruby-1.9.1-rc1/sample/sieve.rb b/lib/ruby-1.9.1-rc1/sample/sieve.rb new file mode 100644 index 0000000..e0bb21d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/sieve.rb @@ -0,0 +1,14 @@ +# sieve of Eratosthenes +max = Integer(ARGV.shift || 100) +sieve = [] +for i in 2 .. max + sieve[i] = i +end + +for i in 2 .. Math.sqrt(max) + next unless sieve[i] + (i*i).step(max, i) do |j| + sieve[j] = nil + end +end +puts sieve.compact.join(", ") diff --git a/lib/ruby-1.9.1-rc1/sample/svr.rb b/lib/ruby-1.9.1-rc1/sample/svr.rb new file mode 100644 index 0000000..11cfc5f --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/svr.rb @@ -0,0 +1,34 @@ +# socket example - server side +# usage: ruby svr.rb + +# this server might be blocked by an ill-behaved client. +# see tsvr.rb which is safe from client blocking. + +require "socket" + +gs = TCPserver.open(0) +addr = gs.addr +addr.shift +printf("server is on %s\n", addr.join(":")) +socks = [gs] + +loop do + nsock = select(socks); + next if nsock == nil + for s in nsock[0] + if s == gs + ns = s.accept + socks.push(ns) + print(s, " is accepted\n") + else + if s.eof? + print(s, " is gone\n") + s.close + socks.delete(s) + # single thread gets may block whole service + elsif str = s.gets + s.write(str) + end + end + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/test.rb b/lib/ruby-1.9.1-rc1/sample/test.rb new file mode 100644 index 0000000..2165688 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/test.rb @@ -0,0 +1,2292 @@ +#! /usr/bin/env ruby + +$testnum=0 +$ntest=0 +$failed = 0 + +def test_check(what) + STDERR.print "\nsample/test.rb:#{what} " + $what = what + $testnum = 0 +end + +def test_ok(cond,n=1) + $testnum+=1 + $ntest+=1 + where = (st = caller(n)) ? st[0] : "caller error! (n=#{n}, trace=#{caller(0).join(', ')}" + if cond + STDERR.print "." + printf "ok %d (%s)\n", $testnum, where + else + STDERR.print "F" + printf "not ok %s %d -- %s\n", $what, $testnum, where + $failed+=1 + end + STDOUT.flush + STDERR.flush +end + +# make sure conditional operators work + +test_check "assignment" + +a=[]; a[0] ||= "bar"; +test_ok(a[0] == "bar") +h={}; h["foo"] ||= "bar"; +test_ok(h["foo"] == "bar") + +aa = 5 +aa ||= 25 +test_ok(aa == 5) +bb ||= 25 +test_ok(bb == 25) +cc &&=33 +test_ok(cc == nil) +cc = 5 +cc &&=44 +test_ok(cc == 44) + +a = nil; test_ok(a == nil) +a = 1; test_ok(a == 1) +a = []; test_ok(a == []) +a = [1]; test_ok(a == [1]) +a = [nil]; test_ok(a == [nil]) +a = [[]]; test_ok(a == [[]]) +a = [1,2]; test_ok(a == [1,2]) +a = [*[]]; test_ok(a == []) +a = [*[1]]; test_ok(a == [1]) +a = [*[1,2]]; test_ok(a == [1,2]) + +a = *[]; test_ok(a == []) +a = *[1]; test_ok(a == [1]) +a = *[nil]; test_ok(a == [nil]) +a = *[[]]; test_ok(a == [[]]) +a = *[1,2]; test_ok(a == [1,2]) +a = *[*[]]; test_ok(a == []) +a = *[*[1]]; test_ok(a == [1]) +a = *[*[1,2]]; test_ok(a == [1,2]) + +a, = nil; test_ok(a == nil) +a, = 1; test_ok(a == 1) +a, = []; test_ok(a == nil) +a, = [1]; test_ok(a == 1) +a, = [nil]; test_ok(a == nil) +a, = [[]]; test_ok(a == []) +a, = 1,2; test_ok(a == 1) +a, = [1,2]; test_ok(a == 1) +a, = [*[]]; test_ok(a == nil) +a, = [*[1]]; test_ok(a == 1) +a, = *[1,2]; test_ok(a == 1) +a, = [*[1,2]]; test_ok(a == 1) + +a, = *[]; test_ok(a == nil) +a, = *[1]; test_ok(a == 1) +a, = *[nil]; test_ok(a == nil) +a, = *[[]]; test_ok(a == []) +a, = *[1,2]; test_ok(a == 1) +a, = *[*[]]; test_ok(a == nil) +a, = *[*[1]]; test_ok(a == 1) +a, = *[*[1,2]]; test_ok(a == 1) + +*a = nil; test_ok(a == [nil]) +*a = 1; test_ok(a == [1]) +*a = []; test_ok(a == []) +*a = [1]; test_ok(a == [1]) +*a = [nil]; test_ok(a == [nil]) +*a = [[]]; test_ok(a == [[]]) +*a = [1,2]; test_ok(a == [1,2]) +*a = [*[]]; test_ok(a == []) +*a = [*[1]]; test_ok(a == [1]) +*a = [*[1,2]]; test_ok(a == [1,2]) + +*a = *[]; test_ok(a == []) +*a = *[1]; test_ok(a == [1]) +*a = *[nil]; test_ok(a == [nil]) +*a = *[[]]; test_ok(a == [[]]) +*a = *[1,2]; test_ok(a == [1,2]) +*a = *[*[]]; test_ok(a == []) +*a = *[*[1]]; test_ok(a == [1]) +*a = *[*[1,2]]; test_ok(a == [1,2]) + +a,b,*c = nil; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = 1; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = []; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = [1]; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = [nil]; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = [[]]; test_ok([a,b,c] == [[],nil,[]]) +a,b,*c = [1,2]; test_ok([a,b,c] == [1,2,[]]) +a,b,*c = [*[]]; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = [*[1]]; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = [*[1,2]]; test_ok([a,b,c] == [1,2,[]]) + +a,b,*c = *[]; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = *[1]; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = *[nil]; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = *[[]]; test_ok([a,b,c] == [[],nil,[]]) +a,b,*c = *[1,2]; test_ok([a,b,c] == [1,2,[]]) +a,b,*c = *[*[]]; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = *[*[1]]; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]]) + +def f; yield nil; end; f {|a| test_ok(a == nil)} +def f; yield 1; end; f {|a| test_ok(a == 1)} +def f; yield []; end; f {|a| test_ok(a == [])} +def f; yield [1]; end; f {|a| test_ok(a == [1])} +def f; yield [nil]; end; f {|a| test_ok(a == [nil])} +def f; yield [[]]; end; f {|a| test_ok(a == [[]])} +def f; yield [*[]]; end; f {|a| test_ok(a == [])} +def f; yield [*[1]]; end; f {|a| test_ok(a == [1])} +def f; yield [*[1,2]]; end; f {|a| test_ok(a == [1,2])} +def f; yield *[]; end; f {|a| test_ok(a == nil)} +def f; yield *[1]; end; f {|a| test_ok(a == 1)} +def f; yield *[nil]; end; f {|a| test_ok(a == nil)} +def f; yield *[[]]; end; f {|a| test_ok(a == [])} +def f; yield *[*[]]; end; f {|a| test_ok(a == nil)} +def f; yield *[*[1]]; end; f {|a| test_ok(a == 1)} +def f; yield *[*[1,2]]; end; f {|a| test_ok(a == 1)} + +def f; yield; end; f {|a,| test_ok(a == nil)} +def f; yield nil; end; f {|a,| test_ok(a == nil)} +def f; yield 1; end; f {|a,| test_ok(a == 1)} +def f; yield []; end; f {|a,| test_ok(a == nil)} +def f; yield [1]; end; f {|a,| test_ok(a == 1)} +def f; yield [nil]; end; f {|a,| test_ok(a == nil)} +def f; yield [[]]; end; f {|a,| test_ok(a == [])} +def f; yield [*[]]; end; f {|a,| test_ok(a == nil)} +def f; yield [*[1]]; end; f {|a,| test_ok(a == 1)} +def f; yield [*[1,2]]; end; f {|a,| test_ok(a == 1)} + +def f; yield *[]; end; f {|a,| test_ok(a == nil)} +def f; yield *[1]; end; f {|a,| test_ok(a == 1)} +def f; yield *[nil]; end; f {|a,| test_ok(a == nil)} +def f; yield *[[]]; end; f {|a,| test_ok(a == nil)} +def f; yield *[*[]]; end; f {|a,| test_ok(a == nil)} +def f; yield *[*[1]]; end; f {|a,| test_ok(a == 1)} +def f; yield *[*[1,2]]; end; f {|a,| test_ok(a == 1)} + +def f; yield; end; f {|*a| test_ok(a == [])} +def f; yield nil; end; f {|*a| test_ok(a == [nil])} +def f; yield 1; end; f {|*a| test_ok(a == [1])} +def f; yield []; end; f {|*a| test_ok(a == [[]])} +def f; yield [1]; end; f {|*a| test_ok(a == [[1]])} +def f; yield [nil]; end; f {|*a| test_ok(a == [[nil]])} +def f; yield [[]]; end; f {|*a| test_ok(a == [[[]]])} +def f; yield [1,2]; end; f {|*a| test_ok(a == [[1,2]])} +def f; yield [*[]]; end; f {|*a| test_ok(a == [[]])} +def f; yield [*[1]]; end; f {|*a| test_ok(a == [[1]])} +def f; yield [*[1,2]]; end; f {|*a| test_ok(a == [[1,2]])} + +def f; yield *[]; end; f {|*a| test_ok(a == [])} +def f; yield *[1]; end; f {|*a| test_ok(a == [1])} +def f; yield *[nil]; end; f {|*a| test_ok(a == [nil])} +def f; yield *[[]]; end; f {|*a| test_ok(a == [[]])} +def f; yield *[*[]]; end; f {|*a| test_ok(a == [])} +def f; yield *[*[1]]; end; f {|*a| test_ok(a == [1])} +def f; yield *[*[1,2]]; end; f {|*a| test_ok(a == [1,2])} + +def f; yield; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield nil; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield 1; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])} +def f; yield []; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield [1]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])} +def f; yield [nil]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield [[]]; end; f {|a,b,*c| test_ok([a,b,c] == [[],nil,[]])} +def f; yield [*[]]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield [*[1]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])} +def f; yield [*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,2,[]])} + +def f; yield *[]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield *[1]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])} +def f; yield *[nil]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield *[[]]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield *[*[]]; end; f {|a,b,*c| test_ok([a,b,c] == [nil,nil,[]])} +def f; yield *[*[1]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,nil,[]])} +def f; yield *[*[1,2]]; end; f {|a,b,*c| test_ok([a,b,c] == [1,2,[]])} + +def r; return; end; a = r(); test_ok(a == nil) +def r; return nil; end; a = r(); test_ok(a == nil) +def r; return 1; end; a = r(); test_ok(a == 1) +def r; return []; end; a = r(); test_ok(a == []) +def r; return [1]; end; a = r(); test_ok(a == [1]) +def r; return [nil]; end; a = r(); test_ok(a == [nil]) +def r; return [[]]; end; a = r(); test_ok(a == [[]]) +def r; return [*[]]; end; a = r(); test_ok(a == []) +def r; return [*[1]]; end; a = r(); test_ok(a == [1]) +def r; return [*[1,2]]; end; a = r(); test_ok(a == [1,2]) + +def r; return *[]; end; a = r(); test_ok(a == []) +def r; return *[1]; end; a = r(); test_ok(a == [1]) +def r; return *[nil]; end; a = r(); test_ok(a == [nil]) +def r; return *[[]]; end; a = r(); test_ok(a == [[]]) +def r; return *[*[]]; end; a = r(); test_ok(a == []) +def r; return *[*[1]]; end; a = r(); test_ok(a == [1]) +def r; return *[*[1,2]]; end; a = r(); test_ok(a == [1,2]) + +def r; return *[[]]; end; a = *r(); test_ok(a == [[]]) +def r; return *[*[1,2]]; end; a = *r(); test_ok(a == [1,2]) + +def r; return; end; *a = r(); test_ok(a == [nil]) +def r; return nil; end; *a = r(); test_ok(a == [nil]) +def r; return 1; end; *a = r(); test_ok(a == [1]) +def r; return []; end; *a = r(); test_ok(a == []) +def r; return [1]; end; *a = r(); test_ok(a == [1]) +def r; return [nil]; end; *a = r(); test_ok(a == [nil]) +def r; return [[]]; end; *a = r(); test_ok(a == [[]]) +def r; return [1,2]; end; *a = r(); test_ok(a == [1,2]) +def r; return [*[]]; end; *a = r(); test_ok(a == []) +def r; return [*[1]]; end; *a = r(); test_ok(a == [1]) +def r; return [*[1,2]]; end; *a = r(); test_ok(a == [1,2]) + +def r; return *[]; end; *a = r(); test_ok(a == []) +def r; return *[1]; end; *a = r(); test_ok(a == [1]) +def r; return *[nil]; end; *a = r(); test_ok(a == [nil]) +def r; return *[[]]; end; *a = r(); test_ok(a == [[]]) +def r; return *[1,2]; end; *a = r(); test_ok(a == [1,2]) +def r; return *[*[]]; end; *a = r(); test_ok(a == []) +def r; return *[*[1]]; end; *a = r(); test_ok(a == [1]) +def r; return *[*[1,2]]; end; *a = r(); test_ok(a == [1,2]) + +def r; return *[[]]; end; *a = *r(); test_ok(a == [[]]) +def r; return *[1,2]; end; *a = *r(); test_ok(a == [1,2]) +def r; return *[*[1,2]]; end; *a = *r(); test_ok(a == [1,2]) + +def r; return; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return nil; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return 1; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]]) +def r; return []; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return [1]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]]) +def r; return [nil]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return [[]]; end; a,b,*c = r(); test_ok([a,b,c] == [[],nil,[]]) +def r; return [1,2]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]]) +def r; return [*[]]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return [*[1]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]]) +def r; return [*[1,2]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]]) + +def r; return *[]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return *[1]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]]) +def r; return *[nil]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return *[[]]; end; a,b,*c = r(); test_ok([a,b,c] == [[],nil,[]]) +def r; return *[1,2]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]]) +def r; return *[*[]]; end; a,b,*c = r(); test_ok([a,b,c] == [nil,nil,[]]) +def r; return *[*[1]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,nil,[]]) +def r; return *[*[1,2]]; end; a,b,*c = r(); test_ok([a,b,c] == [1,2,[]]) + +f = lambda {|r,| test_ok([] == r)} +f.call([], *[]) + +f = lambda {|r,*l| test_ok([] == r); test_ok([1] == l)} +f.call([], *[1]) + +f = lambda{|x| x} +test_ok(f.call(42) == 42) +test_ok(f.call([42]) == [42]) +test_ok(f.call([[42]]) == [[42]]) +test_ok(f.call([42,55]) == [42,55]) + +f = lambda{|x,| x} +test_ok(f.call(42) == 42) +test_ok(f.call([42]) == [42]) +test_ok(f.call([[42]]) == [[42]]) +test_ok(f.call([42,55]) == [42,55]) + +f = lambda{|*x| x} +test_ok(f.call(42) == [42]) +test_ok(f.call([42]) == [[42]]) +test_ok(f.call([[42]]) == [[[42]]]) +test_ok(f.call([42,55]) == [[42,55]]) +test_ok(f.call(42,55) == [42,55]) + +f = lambda { |a, b=42, *c| [a,b,c] } +test_ok(f.call(1 ) == [1,42,[ ]] ) +test_ok(f.call(1,43 ) == [1,43,[ ]] ) +test_ok(f.call(1,43,44) == [1,43,[44]] ) + +f = lambda { |a, b=(a|16), *c, &block| [a,b,c,block&&block[]] } +test_ok(f.call(8 ) == [8,24,[ ],nil] ) +test_ok(f.call(8,43 ) == [8,43,[ ],nil] ) +test_ok(f.call(8,43,44) == [8,43,[44],nil] ) +test_ok(f.call(8 ){45} == [8,24,[ ],45 ] ) +test_ok(f.call(8,43 ){45} == [8,43,[ ],45 ] ) +test_ok(f.call(8,43,44){45} == [8,43,[44],45 ] ) + +f = lambda { |a, b=42, *c, d| [a,b,c,d] } +test_ok(f.call(1 ,99) == [1,42,[ ],99] ) +test_ok(f.call(1,43 ,99) == [1,43,[ ],99] ) +test_ok(f.call(1,43,44,99) == [1,43,[44],99] ) + +f = lambda { |a, b=(a|16), &block| [a,b,block&&block[]] } +test_ok(f.call(8 ) == [8,24,nil] ) +test_ok(f.call(8,43) == [8,43,nil] ) +test_ok(f.call(8,43) == [8,43,nil] ) +test_ok(f.call(8 ){45} == [8,24,45 ] ) +test_ok(f.call(8,43){45} == [8,43,45 ] ) +test_ok(f.call(8,43){45} == [8,43,45 ] ) + +f = lambda { |a, b=42, d| [a,b,d] } +test_ok(f.call(1 ,99) == [1,42,99] ) +test_ok(f.call(1,43,99) == [1,43,99] ) +test_ok(f.call(1,43,99) == [1,43,99] ) + +f = lambda { |b=42, *c, &block| [b,c,block&&block[]] } +test_ok(f.call( ) == [42,[ ],nil] ) +test_ok(f.call(43 ) == [43,[ ],nil] ) +test_ok(f.call(43,44) == [43,[44],nil] ) +test_ok(f.call( ){45} == [42,[ ],45 ] ) +test_ok(f.call(43 ){45} == [43,[ ],45 ] ) +test_ok(f.call(43,44){45} == [43,[44],45 ] ) + +f = lambda { |b=42, *c, d| [b,c,d] } +test_ok(f.call( 99) == [42,[ ],99] ) +test_ok(f.call(43 ,99) == [43,[ ],99] ) +test_ok(f.call(43,44,99) == [43,[44],99] ) + +f = lambda { |b=42, &block| [b,block&&block[]] } +test_ok(f.call( ) == [42,nil] ) +test_ok(f.call(43) == [43,nil] ) +test_ok(f.call(43) == [43,nil] ) +test_ok(f.call( ){45} == [42,45 ] ) +test_ok(f.call(43){45} == [43,45 ] ) +test_ok(f.call(43){45} == [43,45 ] ) + +f = lambda { |b=42, d| [b,d] } +test_ok(f.call( 99) == [42,99] ) +test_ok(f.call(43,99) == [43,99] ) +test_ok(f.call(43,99) == [43,99] ) + + +a,=*[1] +test_ok(a == 1) +a,=*[[1]] +test_ok(a == [1]) +a,=*[[[1]]] +test_ok(a == [[1]]) + +x, (y, z) = 1, 2, 3 +test_ok([1,2,nil] == [x,y,z]) +x, (y, z) = 1, [2,3] +test_ok([1,2,3] == [x,y,z]) +x, (y, z) = 1, [2] +test_ok([1,2,nil] == [x,y,z]) + +a = loop do break; end; test_ok(a == nil) +a = loop do break nil; end; test_ok(a == nil) +a = loop do break 1; end; test_ok(a == 1) +a = loop do break []; end; test_ok(a == []) +a = loop do break [1]; end; test_ok(a == [1]) +a = loop do break [nil]; end; test_ok(a == [nil]) +a = loop do break [[]]; end; test_ok(a == [[]]) +a = loop do break [*[]]; end; test_ok(a == []) +a = loop do break [*[1]]; end; test_ok(a == [1]) +a = loop do break [*[1,2]]; end; test_ok(a == [1,2]) + +a = loop do break *[]; end; test_ok(a == []) +a = loop do break *[1]; end; test_ok(a == [1]) +a = loop do break *[nil]; end; test_ok(a == [nil]) +a = loop do break *[[]]; end; test_ok(a == [[]]) +a = loop do break *[*[]]; end; test_ok(a == []) +a = loop do break *[*[1]]; end; test_ok(a == [1]) +a = loop do break *[*[1,2]]; end; test_ok(a == [1,2]) + +*a = loop do break; end; test_ok(a == [nil]) +*a = loop do break nil; end; test_ok(a == [nil]) +*a = loop do break 1; end; test_ok(a == [1]) +*a = loop do break []; end; test_ok(a == []) +*a = loop do break [1]; end; test_ok(a == [1]) +*a = loop do break [nil]; end; test_ok(a == [nil]) +*a = loop do break [[]]; end; test_ok(a == [[]]) +*a = loop do break [1,2]; end; test_ok(a == [1,2]) +*a = loop do break [*[]]; end; test_ok(a == []) +*a = loop do break [*[1]]; end; test_ok(a == [1]) +*a = loop do break [*[1,2]]; end; test_ok(a == [1,2]) + +*a = loop do break *[]; end; test_ok(a == []) +*a = loop do break *[1]; end; test_ok(a == [1]) +*a = loop do break *[nil]; end; test_ok(a == [nil]) +*a = loop do break *[[]]; end; test_ok(a == [[]]) +*a = loop do break *[1,2]; end; test_ok(a == [1,2]) +*a = loop do break *[*[]]; end; test_ok(a == []) +*a = loop do break *[*[1]]; end; test_ok(a == [1]) +*a = loop do break *[*[1,2]]; end; test_ok(a == [1,2]) + +*a = *loop do break *[[]]; end; test_ok(a == [[]]) +*a = *loop do break *[1,2]; end; test_ok(a == [1,2]) +*a = *loop do break *[*[1,2]]; end; test_ok(a == [1,2]) + +a,b,*c = loop do break; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break nil; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break 1; end; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = loop do break []; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break [1]; end; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = loop do break [nil]; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break [[]]; end; test_ok([a,b,c] == [[],nil,[]]) +a,b,*c = loop do break [1,2]; end; test_ok([a,b,c] == [1,2,[]]) +a,b,*c = loop do break [*[]]; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break [*[1]]; end; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = loop do break [*[1,2]]; end; test_ok([a,b,c] == [1,2,[]]) + +a,b,*c = loop do break *[]; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break *[1]; end; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = loop do break *[nil]; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break *[[]]; end; test_ok([a,b,c] == [[],nil,[]]) +a,b,*c = loop do break *[1,2]; end; test_ok([a,b,c] == [1,2,[]]) +a,b,*c = loop do break *[*[]]; end; test_ok([a,b,c] == [nil,nil,[]]) +a,b,*c = loop do break *[*[1]]; end; test_ok([a,b,c] == [1,nil,[]]) +a,b,*c = loop do break *[*[1,2]]; end; test_ok([a,b,c] == [1,2,[]]) + +def r(val); a = yield(); test_ok(a == val, 2); end +r(nil){next} +r(nil){next nil} +r(1){next 1} +r([]){next []} +r([1]){next [1]} +r([nil]){next [nil]} +r([[]]){next [[]]} +r([]){next [*[]]} +r([1]){next [*[1]]} +r([1,2]){next [*[1,2]]} + +r([]){next *[]} +r([1]){next *[1]} +r([nil]){next *[nil]} +r([[]]){next *[[]]} +r([]){next *[*[]]} +r([1]){next *[*[1]]} +r([1,2]){next *[*[1,2]]} + +def r(val); *a = yield(); test_ok(a == val, 2); end +r([nil]){next} +r([nil]){next nil} +r([1]){next 1} +r([]){next []} +r([1]){next [1]} +r([nil]){next [nil]} +r([[]]){next [[]]} +r([1,2]){next [1,2]} +r([]){next [*[]]} +r([1]){next [*[1]]} +r([1,2]){next [*[1,2]]} + +def r(val); *a = *yield(); test_ok(a == val, 2); end +r([[]]){next *[[]]} +r([1,2]){next *[1,2]} +r([1,2]){next *[*[1,2]]} + +def r(val); a,b,*c = yield(); test_ok([a,b,c] == val, 2); end +r([nil,nil,[]]){next} +r([nil,nil,[]]){next nil} +r([1,nil,[]]){next 1} +r([nil,nil,[]]){next []} +r([1,nil,[]]){next [1]} +r([nil,nil,[]]){next [nil]} +r([[],nil,[]]){next [[]]} +r([1,2,[]]){next [1,2]} +r([nil,nil,[]]){next [*[]]} +r([1,nil,[]]){next [*[1]]} +r([1,2,[]]){next [*[1,2]]} + +def r(val); a,b,*c = *yield(); test_ok([a,b,c] == val, 2); end +r([[],nil,[]]){next *[[]]} +r([1,2,[]]){next *[1,2]} +r([1,2,[]]){next *[*[1,2]]} + +test_check "condition" + +$x = '0'; + +$x == $x && test_ok(true) +$x != $x && test_ok(false) +$x == $x || test_ok(false) +$x != $x || test_ok(true) + +# first test to see if we can run the tests. + +test_check "if/unless"; + +$x = 'test'; +test_ok(if $x == $x then true else false end) +$bad = false +unless $x == $x + $bad = true +end +test_ok(!$bad) +test_ok(unless $x != $x then true else false end) + +test_check "case" + +case 5 +when 1, 2, 3, 4, 6, 7, 8 + test_ok(false) +when 5 + test_ok(true) +end + +case 5 +when 5 + test_ok(true) +when 1..10 + test_ok(false) +end + +case 5 +when 1..10 + test_ok(true) +else + test_ok(false) +end + +case 5 +when 5 + test_ok(true) +else + test_ok(false) +end + +case "foobar" +when /^f.*r$/ + test_ok(true) +else + test_ok(false) +end + +test_check "while/until"; + +tmp = open("while_tmp", "w") +tmp.print "tvi925\n"; +tmp.print "tvi920\n"; +tmp.print "vt100\n"; +tmp.print "Amiga\n"; +tmp.print "paper\n"; +tmp.close + +# test break + +tmp = open("while_tmp", "r") +test_ok(tmp.kind_of?(File)) + +while line = tmp.gets() + break if /vt100/ =~ line +end + +test_ok(!tmp.eof? && /vt100/ =~ line) +tmp.close + +# test next +$bad = false +tmp = open("while_tmp", "r") +while line = tmp.gets() + next if /vt100/ =~ line + $bad = 1 if /vt100/ =~ line +end +test_ok(!(!tmp.eof? || /vt100/ =~ line || $bad)) +tmp.close + +# test redo +$bad = false +tmp = open("while_tmp", "r") +while line = tmp.gets() + lastline = line + line = line.gsub(/vt100/, 'VT100') + if lastline != line + line.gsub!('VT100', 'Vt100') + redo + end + $bad = 1 if /vt100/ =~ line + $bad = 1 if /VT100/ =~ line +end +test_ok(tmp.eof? && !$bad) +tmp.close + +sum=0 +for i in 1..10 + sum += i + i -= 1 + if i > 0 + redo + end +end +test_ok(sum == 220) + +# test interval +$bad = false +tmp = open("while_tmp", "r") +while line = tmp.gets() + break if 3 + case line + when /vt100/, /Amiga/, /paper/ + $bad = true + end +end +test_ok(!$bad) +tmp.close + +File.unlink "while_tmp" or `/bin/rm -f "while_tmp"` +test_ok(!File.exist?("while_tmp")) + +i = 0 +until i>4 + i+=1 +end +test_ok(i>4) + + +# exception handling +test_check "exception"; + +begin + raise "this must be handled" + test_ok(false) +rescue + test_ok(true) +end + +$bad = true +begin + raise "this must be handled no.2" +rescue + if $bad + $bad = false + retry + test_ok(false) + end +end +test_ok(true) + +# exception in rescue clause +$string = "this must be handled no.3" +begin + begin + raise "exception in rescue clause" + rescue + raise $string + end + test_ok(false) +rescue => e + test_ok($! == e) + test_ok(e.message == $string) + test_ok(e != $string) +end + +# exception in ensure clause +begin + begin + raise "this must be handled no.4" + ensure + raise "exception in ensure clause" + end + test_ok(false) +rescue + test_ok(true) +end + +$bad = true +begin + begin + raise "this must be handled no.5" + ensure + $bad = false + end +rescue +end +test_ok(!$bad) + +$bad = true +begin + begin + raise "this must be handled no.6" + ensure + $bad = false + end +rescue +end +test_ok(!$bad) + +$bad = true +while true + begin + break + ensure + $bad = false + end +end +test_ok(!$bad) + +test_ok(catch(:foo) { + loop do + loop do + throw :foo, true + break + end + break + test_ok(false) # should no reach here + end + false + }) + +test_check "array" +test_ok([1, 2] + [3, 4] == [1, 2, 3, 4]) +test_ok([1, 2] * 2 == [1, 2, 1, 2]) +test_ok([1, 2] * ":" == "1:2") + +test_ok([1, 2].hash == [1, 2].hash) + +test_ok([1,2,3] & [2,3,4] == [2,3]) +test_ok([1,2,3] | [2,3,4] == [1,2,3,4]) +test_ok([1,2,3] - [2,3] == [1]) + +$x = [0, 1, 2, 3, 4, 5] +test_ok($x[2] == 2) +test_ok($x[1..3] == [1, 2, 3]) +test_ok($x[1,3] == [1, 2, 3]) + +$x[0, 2] = 10 +test_ok($x[0] == 10 && $x[1] == 2) + +$x[0, 0] = -1 +test_ok($x[0] == -1 && $x[1] == 10) + +$x[-1, 1] = 20 +test_ok($x[-1] == 20 && $x.pop == 20) + +# array and/or +test_ok(([1,2,3]&[2,4,6]) == [2]) +test_ok(([1,2,3]|[2,4,6]) == [1,2,3,4,6]) + +# compact +$x = [nil, 1, nil, nil, 5, nil, nil] +$x.compact! +test_ok($x == [1, 5]) + +# uniq +$x = [1, 1, 4, 2, 5, 4, 5, 1, 2] +$x.uniq! +test_ok($x == [1, 4, 2, 5]) + +# empty? +test_ok(!$x.empty?) +$x = [] +test_ok($x.empty?) + +# sort +$x = ["it", "came", "to", "pass", "that", "..."] +$x = $x.sort.join(" ") +test_ok($x == "... came it pass that to") +$x = [2,5,3,1,7] +$x.sort!{|a,b| a<=>b} # sort with condition +test_ok($x == [1,2,3,5,7]) +$x.sort!{|a,b| b-a} # reverse sort +test_ok($x == [7,5,3,2,1]) + +# split test +$x = "The Book of Mormon" +test_ok($x.split(//).reverse!.join == $x.reverse) +test_ok($x.reverse == $x.reverse!) +test_ok("1 byte string".split(//).reverse.join(":") == "g:n:i:r:t:s: :e:t:y:b: :1") +$x = "a b c d" +test_ok($x.split == ['a', 'b', 'c', 'd']) +test_ok($x.split(' ') == ['a', 'b', 'c', 'd']) +test_ok(defined? "a".chomp) +test_ok("abc".scan(/./) == ["a", "b", "c"]) +test_ok("1a2b3c".scan(/(\d.)/) == [["1a"], ["2b"], ["3c"]]) +# non-greedy match +test_ok("a=12;b=22".scan(/(.*?)=(\d*);?/) == [["a", "12"], ["b", "22"]]) + +$x = [1] +test_ok(($x * 5).join(":") == '1:1:1:1:1') +test_ok(($x * 1).join(":") == '1') +test_ok(($x * 0).join(":") == '') + +*$x = *(1..7).to_a +test_ok($x.size == 7) +test_ok($x == [1, 2, 3, 4, 5, 6, 7]) + +$x = [1,2,3] +$x[1,0] = $x +test_ok($x == [1,1,2,3,2,3]) + +$x = [1,2,3] +$x[-1,0] = $x +test_ok($x == [1,2,1,2,3,3]) + +$x = [1,2,3] +$x.concat($x) +test_ok($x == [1,2,3,1,2,3]) + +test_check "hash" +$x = {1=>2, 2=>4, 3=>6} + +test_ok($x[1] == 2) + +test_ok(begin + for k,v in $x + raise if k*2 != v + end + true + rescue + false + end) + +test_ok($x.length == 3) +test_ok($x.has_key?(1)) +test_ok($x.has_value?(4)) +test_ok($x.values_at(2,3) == [4,6]) +test_ok($x == {1=>2, 2=>4, 3=>6}) + +$z = $x.keys.sort.join(":") +test_ok($z == "1:2:3") + +$z = $x.values.sort.join(":") +test_ok($z == "2:4:6") +test_ok($x == $x) + +$x.shift +test_ok($x.length == 2) + +$z = [1,2] +$x[$z] = 256 +test_ok($x[$z] == 256) + +$x = Hash.new(0) +$x[1] = 1 +test_ok($x[1] == 1) +test_ok($x[2] == 0) + +$x = Hash.new([]) +test_ok($x[22] == []) +test_ok($x[22].equal?($x[22])) + +$x = Hash.new{[]} +test_ok($x[22] == []) +test_ok(!$x[22].equal?($x[22])) + +$x = Hash.new{|h,k| $z = k; h[k] = k*2} +$z = 0 +test_ok($x[22] == 44) +test_ok($z == 22) +$z = 0 +test_ok($x[22] == 44) +test_ok($z == 0) +$x.default = 5 +test_ok($x[23] == 5) + +$x = Hash.new +def $x.default(k) + $z = k + self[k] = k*2 +end +$z = 0 +test_ok($x[22] == 44) +test_ok($z == 22) +$z = 0 +test_ok($x[22] == 44) +test_ok($z == 0) + +test_check "iterator" + +test_ok(!iterator?) + +def ttt + test_ok(iterator?) +end +ttt{} + +# yield at top level +test_ok(!defined?(yield)) + +$x = [1, 2, 3, 4] +$y = [] + +# iterator over array +for i in $x + $y.push i +end +test_ok($x == $y) + +# nested iterator +def tt + 1.upto(10) {|i| + yield i + } +end + +i=0 +tt{|i| break if i == 5} +test_ok(i == 0) + +def tt2(dummy) + yield 1 +end + +def tt3(&block) + tt2(raise(ArgumentError,""),&block) +end + +$x = false +begin + tt3{} +rescue ArgumentError + $x = true +rescue Exception +end +test_ok($x) + +def tt4 &block + tt2(raise(ArgumentError,""),&block) +end +$x = false +begin + tt4{} +rescue ArgumentError + $x = true +rescue Exception +end +test_ok($x) + +# iterator break/redo/next/retry +done = true +loop{ + break + done = false # should not reach here +} +test_ok(done) + +done = false +$bad = false +loop { + break if done + done = true + next + $bad = true # should not reach here +} +test_ok(!$bad) + +done = false +$bad = false +loop { + break if done + done = true + redo + $bad = true # should not reach here +} +test_ok(!$bad) + +$x = [] +for i in 1 .. 7 + $x.push i +end +test_ok($x.size == 7) +test_ok($x == [1, 2, 3, 4, 5, 6, 7]) + +# append method to built-in class +class Array + def iter_test1 + collect{|e| [e, yield(e)]}.sort{|a,b|a[1]<=>b[1]} + end + def iter_test2 + a = collect{|e| [e, yield(e)]} + a.sort{|a,b|a[1]<=>b[1]} + end +end +$x = [[1,2],[3,4],[5,6]] +test_ok($x.iter_test1{|x|x} == $x.iter_test2{|x|x}) + +class IterTest + def initialize(e); @body = e; end + + def each0(&block); @body.each(&block); end + def each1(&block); @body.each {|*x| block.call(*x) } end + def each2(&block); @body.each {|*x| block.call(x) } end + def each3(&block); @body.each {|x| block.call(*x) } end + def each4(&block); @body.each {|x| block.call(x) } end + def each5; @body.each {|*x| yield(*x) } end + def each6; @body.each {|*x| yield(x) } end + def each7; @body.each {|x| yield(*x) } end + def each8; @body.each {|x| yield(x) } end + + def f(a) + a + end +end +test_ok(IterTest.new(nil).method(:f).to_proc.call([1]) == [1]) +m = /\w+/.match("abc") +test_ok(IterTest.new(nil).method(:f).to_proc.call([m]) == [m]) + +IterTest.new([0]).each0 {|x| test_ok(x == 0)} +IterTest.new([1]).each1 {|x| test_ok(x == 1)} +IterTest.new([2]).each2 {|x| test_ok(x == [2])} +#IterTest.new([3]).each3 {|x| test_ok(x == 3)} +IterTest.new([4]).each4 {|x| test_ok(x == 4)} +IterTest.new([5]).each5 {|x| test_ok(x == 5)} +IterTest.new([6]).each6 {|x| test_ok(x == [6])} +#IterTest.new([7]).each7 {|x| test_ok(x == 7)} +IterTest.new([8]).each8 {|x| test_ok(x == 8)} + +IterTest.new([[0]]).each0 {|x| test_ok(x == [0])} +IterTest.new([[1]]).each1 {|x| test_ok(x == [1])} +IterTest.new([[2]]).each2 {|x| test_ok(x == [[2]])} +IterTest.new([[3]]).each3 {|x| test_ok(x == 3)} +IterTest.new([[4]]).each4 {|x| test_ok(x == [4])} +IterTest.new([[5]]).each5 {|x| test_ok(x == [5])} +IterTest.new([[6]]).each6 {|x| test_ok(x == [[6]])} +IterTest.new([[7]]).each7 {|x| test_ok(x == 7)} +IterTest.new([[8]]).each8 {|x| test_ok(x == [8])} + +IterTest.new([[0,0]]).each0 {|*x| test_ok(x == [[0,0]])} +IterTest.new([[8,8]]).each8 {|*x| test_ok(x == [[8,8]])} + +def m0(v) + v +end + +def m1 + m0(block_given?) +end +test_ok(m1{p 'test'}) +test_ok(!m1) + +def m + m0(block_given?,&Proc.new{}) +end +test_ok(m1{p 'test'}) +test_ok(!m1) + +class C + include Enumerable + def initialize + @a = [1,2,3] + end + def each(&block) + @a.each(&block) + end +end + +test_ok(C.new.collect{|n| n} == [1,2,3]) + +test_ok(Proc == lambda{}.class) +test_ok(Proc == Proc.new{}.class) +lambda{|a|test_ok(a==1)}.call(1) +def block_test(klass, &block) + test_ok(klass === block) +end + +block_test(NilClass) +block_test(Proc){} + +def call_argument_test(state, proc, *args) + x = state + begin + proc.call(*args) + rescue ArgumentError + x = !x + end + test_ok(x,2) +end + +call_argument_test(true, lambda{||}) +call_argument_test(false, lambda{||}, 1) +call_argument_test(true, lambda{|a,|}, 1) +call_argument_test(false, lambda{|a,|}) +call_argument_test(false, lambda{|a,|}, 1,2) + +call_argument_test(true, Proc.new{||}) +call_argument_test(true, Proc.new{||}, 1) +call_argument_test(true, Proc.new{|a,|}, 1) +call_argument_test(true, Proc.new{|a,|}) +call_argument_test(true, Proc.new{|a,|}, 1,2) + +def block_get(&block) + block +end + +test_ok(Proc == block_get{}.class) +call_argument_test(true, block_get{||}) +call_argument_test(true, block_get{||}, 1) +call_argument_test(true, block_get{|a,|}, 1) +call_argument_test(true, block_get{|a,|}) +call_argument_test(true, block_get{|a,|}, 1,2) + +call_argument_test(true, block_get(&lambda{||})) +call_argument_test(false, block_get(&lambda{||}),1) +call_argument_test(true, block_get(&lambda{|a,|}),1) +call_argument_test(false, block_get(&lambda{|a,|}),1,2) + +blk = block_get{11} +test_ok(blk.class == Proc) +test_ok(blk.to_proc.class == Proc) +test_ok(blk.clone.call == 11) +test_ok(block_get(&blk).class == Proc) + +lmd = lambda{44} +test_ok(lmd.class == Proc) +test_ok(lmd.to_proc.class == Proc) +test_ok(lmd.clone.call == 44) +test_ok(block_get(&lmd).class == Proc) + +test_ok(Proc.new{|a,| a}.yield(1,2,3) == 1) +call_argument_test(true, Proc.new{|a,|}, 1,2) + +test_ok(Proc.new{|&b| b.call(10)}.call {|x| x} == 10) +test_ok(Proc.new{|a,&b| b.call(a)}.call(12) {|x| x} == 12) + +def test_return1 + Proc.new { + return 55 + }.yield + 5 +end +test_ok(test_return1() == 55) +def test_return2 + lambda { + return 55 + }.call + 5 +end +test_ok(test_return2() == 60) + +def proc_call(&b) + b.call +end +def proc_yield() + yield +end +def proc_return1 + lambda{return 42}.call+1 +end +test_ok(proc_return1() == 43) +def proc_return2 + ->{return 42}.call+1 +end +test_ok(proc_return2() == 43) +def proc_return3 + proc_call{return 42}+1 +end +test_ok(proc_return3() == 42) +def proc_return4 + proc_yield{return 42}+1 +end +test_ok(proc_return4() == 42) + +def ljump_test(state, proc, *args) + x = state + begin + proc.call(*args) + rescue LocalJumpError + x = !x + end + test_ok(x,2) +end + +ljump_test(false, block_get{break}) +ljump_test(true, lambda{break}) + +def exit_value_test(&block) + block.call +rescue LocalJumpError + $!.exit_value +end + +test_ok(45 == exit_value_test{break 45}) + +test_ok(55 == begin + block_get{break 55}.call + rescue LocalJumpError + $!.exit_value + end) + +def block_call(&block) + block.call +end + +def test_b1 + block_call{break 11} +end +test_ok(test_b1() == 11) + +def ljump_rescue(r) + begin + yield + rescue LocalJumpError => e + r if /from proc-closure/ =~ e.message + end +end + +def test_b2 + ljump_rescue(22) do + block_get{break 21}.call + end +end +test_ok(test_b2() == 22) + +def test_b3 + ljump_rescue(33) do + Proc.new{break 31}.yield + end +end +test_ok(test_b3() == 33) + +def test_b4 + lambda{break 44}.call +end +test_ok(test_b4() == 44) + +def test_b5 + ljump_rescue(55) do + b = block_get{break 54} + block_call(&b) + end +end +test_ok(test_b5() == 55) + +def test_b6 + b = lambda{break 67} + block_call(&b) + 66 +end +test_ok(test_b6() == 66) + +def util_r7 + block_get{break 78} +end + +def test_b7 + b = util_r7() + ljump_rescue(77) do + block_call(&b) + end +end +test_ok(test_b7() == 77) + +def util_b8(&block) + block_call(&block) +end + +def test_b8 + util_b8{break 88} +end +test_ok(test_b8() == 88) + +def util_b9(&block) + lambda{block.call; 98}.call +end + +def test_b9 + util_b9{break 99} +end +test_ok(test_b9() == 99) + +def util_b10 + util_b9{break 100} +end + +def test_b10 + util_b10() +end +test_ok(test_b10() == 100) + +def test_b11 + ljump_rescue(111) do + loop do + Proc.new{break 110}.yield + break 112 + end + end +end +test_ok(test_b11() == 111) + +def test_b12 + loop do + break lambda{break 122}.call + break 121 + end +end +test_ok(test_b12() == 122) + +def test_b13 + ljump_rescue(133) do + while true + Proc.new{break 130}.yield + break 131 + end + end +end +test_ok(test_b13() == 133) + +def test_b14 + while true + break lambda{break 144}.call + break 143 + end +end +test_ok(test_b14() == 144) + +def test_b15 + [0].each {|c| yield 1 } + 156 +end +test_ok(test_b15{|e| break 155 } == 155) + +def marity_test(m) + method = method(m) + test_ok(method.arity == method.to_proc.arity, 2) +end +marity_test(:test_ok) +marity_test(:marity_test) +marity_test(:p) + +lambda(&method(:test_ok)).call(true) +lambda(&block_get{|a,n| test_ok(a,n)}).call(true, 2) + +class ITER_TEST1 + def a + block_given? + end +end + +class ITER_TEST2 < ITER_TEST1 + def a + test_ok(super) + super + end +end +test_ok(ITER_TEST2.new.a {}) + +class ITER_TEST3 + def foo x + return yield if block_given? + x + end +end + +class ITER_TEST4 < ITER_TEST3 + def foo x + test_ok(super == yield) + test_ok(super(x, &nil) == x) + end +end + +ITER_TEST4.new.foo(44){55} + +class ITER_TEST5 + def tt(aa) + aa + end + + def uu(a) + class << self + define_method(:tt) do |sym| + super(sym) + end + end + end + + def xx(*x) + x.size + end +end + +a = ITER_TEST5.new +a.uu(12) +test_ok(a.tt(1) == 1) + +class ITER_TEST6 < ITER_TEST5 + def xx(*a) + a << 12 + super + end +end + +test_ok(ITER_TEST6.new.xx([24]) == 2) + +test_check "float" +test_ok(2.6.floor == 2) +test_ok((-2.6).floor == -3) +test_ok(2.6.ceil == 3) +test_ok((-2.6).ceil == -2) +test_ok(2.6.truncate == 2) +test_ok((-2.6).truncate == -2) +test_ok(2.6.round == 3) +test_ok((-2.4).truncate == -2) +test_ok((13.4 % 1 - 0.4).abs < 0.0001) +nan = 0.0/0 +def nan_test(x,y) + test_ok(x != y) + test_ok((x < y) == false) + test_ok((x > y) == false) + test_ok((x <= y) == false) + test_ok((x >= y) == false) +end +nan_test(nan, nan) +nan_test(nan, 0) +nan_test(nan, 1) +nan_test(nan, -1) +nan_test(nan, 1000) +nan_test(nan, -1000) +nan_test(nan, 1_000_000_000_000) +nan_test(nan, -1_000_000_000_000) +nan_test(nan, 100.0); +nan_test(nan, -100.0); +nan_test(nan, 0.001); +nan_test(nan, -0.001); +nan_test(nan, 1.0/0); +nan_test(nan, -1.0/0); + +#s = "3.7517675036461267e+17" +#test_ok(s == sprintf("%.16e", s.to_f)) +f = 3.7517675036461267e+17 +test_ok(f == sprintf("%.16e", f).to_f) + + +test_check "bignum" +def fact(n) + return 1 if n == 0 + f = 1 + while n>0 + f *= n + n -= 1 + end + return f +end +$x = fact(40) +test_ok($x == $x) +test_ok($x == fact(40)) +test_ok($x < $x+2) +test_ok($x > $x-2) +test_ok($x == 815915283247897734345611269596115894272000000000) +test_ok($x != 815915283247897734345611269596115894272000000001) +test_ok($x+1 == 815915283247897734345611269596115894272000000001) +test_ok($x/fact(20) == 335367096786357081410764800000) +$x = -$x +test_ok($x == -815915283247897734345611269596115894272000000000) +test_ok(2-(2**32) == -(2**32-2)) +test_ok(2**32 - 5 == (2**32-3)-2) + +$good = true; +for i in 1000..1014 + $good = false if ((1 << i) != (2**i)) +end +test_ok($good) + +$good = true; +n1= 1 << 1000 +for i in 1000..1014 + $good = false if ((1 << i) != n1) + n1 *= 2 +end +test_ok($good) + +$good = true; +n2=n1 +for i in 1..10 + n1 = n1 / 2 + n2 = n2 >> 1 + $good = false if (n1 != n2) +end +test_ok($good) + +$good = true; +for i in 4000..4096 + n1 = 1 << i; + if (n1**2-1) / (n1+1) != (n1-1) + $good = false + end +end +test_ok($good) + +b = 10**80 +a = b * 9 + 7 +test_ok(7 == a.modulo(b)) +test_ok(-b + 7 == a.modulo(-b)) +test_ok(b + -7 == (-a).modulo(b)) +test_ok(-7 == (-a).modulo(-b)) +test_ok(7 == a.remainder(b)) +test_ok(7 == a.remainder(-b)) +test_ok(-7 == (-a).remainder(b)) +test_ok(-7 == (-a).remainder(-b)) + +test_ok(10**40+10**20 == 10000000000000000000100000000000000000000) +test_ok(10**40/10**20 == 100000000000000000000) + +a = 677330545177305025495135714080 +b = 14269972710765292560 +test_ok(a % b == 0) +test_ok(-a % b == 0) + +def shift_test(a) + b = a / (2 ** 32) + c = a >> 32 + test_ok(b == c) + + b = a * (2 ** 32) + c = a << 32 + test_ok(b == c) +end + +shift_test(-4518325415524767873) +shift_test(-0xfffffffffffffffff) + +test_check "string & char" + +test_ok("abcd" == "abcd") +test_ok("abcd" =~ /abcd/) +test_ok("abcd" === "abcd") +# compile time string concatenation +test_ok("ab" "cd" == "abcd") +test_ok("#{22}aa" "cd#{44}" == "22aacd44") +test_ok("#{22}aa" "cd#{44}" "55" "#{66}" == "22aacd445566") +test_ok("abc" !~ /^$/) +test_ok("abc\n" !~ /^$/) +test_ok("abc" !~ /^d*$/) +test_ok(("abc" =~ /d*$/) == 3) +test_ok("" =~ /^$/) +test_ok("\n" =~ /^$/) +test_ok("a\n\n" =~ /^$/) +test_ok("abcabc" =~ /.*a/ && $& == "abca") +test_ok("abcabc" =~ /.*c/ && $& == "abcabc") +test_ok("abcabc" =~ /.*?a/ && $& == "a") +test_ok("abcabc" =~ /.*?c/ && $& == "abc") +test_ok(/(.|\n)*?\n(b|\n)/ =~ "a\nb\n\n" && $& == "a\nb") + +test_ok(/^(ab+)+b/ =~ "ababb" && $& == "ababb") +test_ok(/^(?:ab+)+b/ =~ "ababb" && $& == "ababb") +test_ok(/^(ab+)+/ =~ "ababb" && $& == "ababb") +test_ok(/^(?:ab+)+/ =~ "ababb" && $& == "ababb") + +test_ok(/(\s+\d+){2}/ =~ " 1 2" && $& == " 1 2") +test_ok(/(?:\s+\d+){2}/ =~ " 1 2" && $& == " 1 2") + +$x = <') == "") + +# character constants(assumes ASCII) +test_ok("a"[0] == ?a) +test_ok(?a == ?a) +test_ok(?\C-a == "\1") +test_ok(?\M-a == "\341") +test_ok(?\M-\C-a == "\201") +test_ok("a".upcase![0] == ?A) +test_ok("A".downcase![0] == ?a) +test_ok("abc".tr!("a-z", "A-Z") == "ABC") +test_ok("aabbcccc".tr_s!("a-z", "A-Z") == "ABC") +test_ok("abcc".squeeze!("a-z") == "abc") +test_ok("abcd".delete!("bc") == "ad") + +$x = "abcdef" +$y = [ ?a, ?b, ?c, ?d, ?e, ?f ] +$bad = false +$x.each_byte {|i| + if i.chr != $y.shift + $bad = true + break + end +} +test_ok(!$bad) + +s = "a string" +s[0..s.size]="another string" +test_ok(s == "another string") + +s = < Object) == -1) +test_ok((Object <=> String) == 1) +test_ok((Array <=> String) == nil) + +test_check "clone" +foo = Object.new +def foo.test + "test" +end +bar = foo.clone +def bar.test2 + "test2" +end + +test_ok(bar.test2 == "test2") +test_ok(bar.test == "test") +test_ok(foo.test == "test") + +begin + foo.test2 + test_ok false +rescue NoMethodError + test_ok true +end + +module M001; end +module M002; end +module M003; include M002; end +module M002; include M001; end +module M003; include M002; end + +test_ok(M003.ancestors == [M003, M002, M001]) + +test_check "marshal" +$x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)] +$y = Marshal.dump($x) +test_ok($x == Marshal.load($y)) + +StrClone=String.clone; +test_ok(Marshal.load(Marshal.dump(StrClone.new("abc"))).class == StrClone) + +[[1,2,3,4], [81, 2, 118, 3146]].each { |w,x,y,z| + a = (x.to_f + y.to_f / z.to_f) * Math.exp(w.to_f / (x.to_f + y.to_f / z.to_f)) + ma = Marshal.dump(a) + b = Marshal.load(ma) + test_ok(a == b) +} + +test_check "pack" + +$format = "c2x5CCxsdils_l_a6"; +# Need the expression in here to force ary[5] to be numeric. This avoids +# test2 failing because ary2 goes str->numeric->str and ary does not. +ary = [1,-100,127,128,32767,987.654321098 / 100.0,12345,123456,-32767,-123456,"abcdef"] +$x = ary.pack($format) +ary2 = $x.unpack($format) + +test_ok(ary.length == ary2.length) +test_ok(ary.join(':') == ary2.join(':')) +test_ok($x =~ /def/) + +$x = [-1073741825] +test_ok($x.pack("q").unpack("q") == $x) + +test_check "math" +test_ok(Math.sqrt(4) == 2) + +include Math +test_ok(sqrt(4) == 2) + +test_check "struct" +struct_test = Struct.new("Test", :foo, :bar) +test_ok(struct_test == Struct::Test) + +test = struct_test.new(1, 2) +test_ok(test.foo == 1 && test.bar == 2) +test_ok(test[0] == 1 && test[1] == 2) + +a, b = test.to_a +test_ok(a == 1 && b == 2) + +test[0] = 22 +test_ok(test.foo == 22) + +test.bar = 47 +test_ok(test.bar == 47) + +test_check "variable" +test_ok($$.instance_of?(Fixnum)) + +# read-only variable +begin + $$ = 5 + test_ok false +rescue NameError + test_ok true +end + +foobar = "foobar" +$_ = foobar +test_ok($_ == foobar) + +class Gods + @@rule = "Uranus" # private to Gods + def ruler0 + @@rule + end + + def self.ruler1 # <= per method definition style + @@rule + end + class << self # <= multiple method definition style + def ruler2 + @@rule + end + end +end + +module Olympians + @@rule ="Zeus" + def ruler3 + @@rule + end +end + +class Titans < Gods + @@rule = "Cronus" # do not affect @@rule in Gods + include Olympians + def ruler4 + @@rule + end +end + +test_ok(Gods.new.ruler0 == "Cronus") +test_ok(Gods.ruler1 == "Cronus") +test_ok(Gods.ruler2 == "Cronus") +test_ok(Titans.ruler1 == "Cronus") +test_ok(Titans.ruler2 == "Cronus") +atlas = Titans.new +test_ok(atlas.ruler0 == "Cronus") +test_ok(atlas.ruler3 == "Zeus") +test_ok(atlas.ruler4 == "Cronus") + +test_check "trace" +$x = 1234 +$y = 0 +trace_var :$x, Proc.new{$y = $x} +$x = 40414 +test_ok($y == $x) + +untrace_var :$x +$x = 19660208 +test_ok($y != $x) + +trace_var :$x, Proc.new{$x *= 2} +$x = 5 +test_ok($x == 10) + +untrace_var :$x + +test_check "defined?" + +test_ok(defined?($x)) # global variable +test_ok(defined?($x) == 'global-variable')# returns description + +foo=5 +test_ok(defined?(foo)) # local variable + +test_ok(defined?(Array)) # constant +test_ok(defined?(Object.new)) # method +test_ok(!defined?(Object.print))# private method +test_ok(defined?(1 == 2)) # operator expression + +class Foo + def foo + p :foo + end + protected :foo + def bar(f) + test_ok(defined?(self.foo)) + test_ok(defined?(f.foo)) + end +end +f = Foo.new +test_ok(defined?(f.foo) == nil) +f.bar(f) + +def defined_test + return !defined?(yield) +end + +test_ok(defined_test) # not iterator +test_ok(!defined_test{}) # called as iterator + +test_check "alias" +class Alias0 + def foo; "foo" end +end +class Alias1 0 + printf "not ok/test: %d failed %d\n", $ntest, $failed +else + printf "end of test(test: %d)\n", $ntest +end diff --git a/lib/ruby-1.9.1-rc1/sample/testunit/adder.rb b/lib/ruby-1.9.1-rc1/sample/testunit/adder.rb new file mode 100644 index 0000000..aa5c88c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/testunit/adder.rb @@ -0,0 +1,13 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +class Adder + def initialize(number) + @number = number + end + def add(number) + return @number + number + end +end + diff --git a/lib/ruby-1.9.1-rc1/sample/testunit/subtracter.rb b/lib/ruby-1.9.1-rc1/sample/testunit/subtracter.rb new file mode 100644 index 0000000..2c08247 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/testunit/subtracter.rb @@ -0,0 +1,12 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +class Subtracter + def initialize(number) + @number = number + end + def subtract(number) + return @number - number + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/testunit/tc_adder.rb b/lib/ruby-1.9.1-rc1/sample/testunit/tc_adder.rb new file mode 100644 index 0000000..8453beb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/testunit/tc_adder.rb @@ -0,0 +1,18 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +require 'test/unit' +require 'adder' + +class TC_Adder < Test::Unit::TestCase + def setup + @adder = Adder.new(5) + end + def test_add + assert_equal(7, @adder.add(2), "Should have added correctly") + end + def teardown + @adder = nil + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/testunit/tc_subtracter.rb b/lib/ruby-1.9.1-rc1/sample/testunit/tc_subtracter.rb new file mode 100644 index 0000000..d2c8313 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/testunit/tc_subtracter.rb @@ -0,0 +1,18 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +require 'test/unit' +require 'subtracter' + +class TC_Subtracter < Test::Unit::TestCase + def setup + @subtracter = Subtracter.new(5) + end + def test_subtract + assert_equal(3, @subtracter.subtract(2), "Should have subtracted correctly") + end + def teardown + @subtracter = nil + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/testunit/ts_examples.rb b/lib/ruby-1.9.1-rc1/sample/testunit/ts_examples.rb new file mode 100644 index 0000000..3d24dd6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/testunit/ts_examples.rb @@ -0,0 +1,7 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +require 'test/unit' +require 'tc_adder' +require 'tc_subtracter' diff --git a/lib/ruby-1.9.1-rc1/sample/time.rb b/lib/ruby-1.9.1-rc1/sample/time.rb new file mode 100644 index 0000000..e169120 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/time.rb @@ -0,0 +1,12 @@ +#! /usr/bin/env ruby + +b = Time.now +system(*ARGV) +e = Time.now + +tms = Process.times +real = e - b +user = tms.cutime +sys = tms.cstime + +STDERR.printf("%11.1f real %11.1f user %11.1f sys\n", real, user, sys) diff --git a/lib/ruby-1.9.1-rc1/sample/trojan.rb b/lib/ruby-1.9.1-rc1/sample/trojan.rb new file mode 100644 index 0000000..3a35ac2 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/trojan.rb @@ -0,0 +1,15 @@ +#! /usr/local/bin/ruby + +path = ENV['PATH'].split(File::PATH_SEPARATOR) + +for dir in path + if File.directory?(dir) + for f in d = Dir.open(dir) + fpath = File.join(dir, f) + if File.file?(fpath) && (File.stat(fpath).mode & 022) != 0 + printf("file %s is writable from other users\n", fpath) + end + end + d.close + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/tsvr.rb b/lib/ruby-1.9.1-rc1/sample/tsvr.rb new file mode 100644 index 0000000..52cdd32 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/tsvr.rb @@ -0,0 +1,20 @@ +# socket example - server side using thread +# usage: ruby tsvr.rb + +require "socket" + +gs = TCPserver.open(0) +addr = gs.addr +addr.shift +printf("server is on %s\n", addr.join(":")) + +loop do + Thread.start(gs.accept) do |s| + print(s, " is accepted\n") + while line = s.gets + s.write(line) + end + print(s, " is gone\n") + s.close + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/uumerge.rb b/lib/ruby-1.9.1-rc1/sample/uumerge.rb new file mode 100644 index 0000000..2576bcb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/uumerge.rb @@ -0,0 +1,43 @@ +#!/usr/bin/env ruby + +if ARGV[0] == "-c" + out_stdout = 1 + ARGV.shift +end + +$sawbegin = 0 +$sawend = 0 + +while line = gets() + if /^begin\s*(\d*)\s*(\S*)/ =~ line + $mode, $file = $1, $2 + $sawbegin+=1 + if out_stdout + out = STDOUT + else + out = open($file, "w") if $file != "" + end + out.binmode + break + end +end + +raise "missing begin" unless $sawbegin + +out.binmode +while line = gets() + if /^end/ =~ line + $sawend+=1 + out.close unless out_stdout + File.chmod $mode.oct, $file unless out_stdout + next + end + line.sub!(/[a-z]+$/, "") # handle stupid trailing lowercase letters + next if /[a-z]/ =~ line + next if !(((($_[0] - 32) & 077) + 2) / 3 == $_.length / 4) + out << $_.unpack("u") if $sawbegin > $sawend +end + +raise "missing end" if $sawbegin > $sawend +raise "missing begin" if ! $sawbegin +exit 0 diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/demo-app.rb b/lib/ruby-1.9.1-rc1/sample/webrick/demo-app.rb new file mode 100644 index 0000000..c7a2a0a --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/demo-app.rb @@ -0,0 +1,66 @@ +require "pp" + +module DemoApplication + def initialize(config, enctype) + super + @enctype = enctype + end + + def do_GET(req, res) + if req.path_info != "/" + res.set_redirect(WEBrick::HTTPStatus::Found, req.script_name + "/") + end + res.body =<<-_end_of_html_ + +
      + text:
      + file:
      + check: + a, + b, + c, +
      + +
      + + _end_of_html_ + res['content-type'] = 'text/html; charset=iso-8859-1' + end + + def do_POST(req, res) + if req["content-length"].to_i > 1024*10 + raise WEBrick::HTTPStatus::Forbidden, "file size too large" + end + res.body =<<-_end_of_html_ + +

      Query Parameters

      + #{display_query(req.query)} + return +

      Request

      +
      #{WEBrick::HTMLUtils::escape(PP::pp(req, "", 80))}
      +

      Response

      +
      #{WEBrick::HTMLUtils::escape(PP::pp(res, "", 80))}
      + + _end_of_html_ + res['content-type'] = 'text/html; charset=iso-8859-1' + end + + private + + def display_query(q) + ret = "" + q.each{|key, val| + ret << "

      #{WEBrick::HTMLUtils::escape(key)}

      " + ret << "" + ret << make_tr("val", val.inspect) + ret << make_tr("val.to_a", val.to_a.inspect) + ret << make_tr("val.to_ary", val.to_ary.inspect) + ret << "
      " + } + ret + end + + def make_tr(arg0, arg1) + "#{arg0}#{WEBrick::HTMLUtils::escape(arg1)}" + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/demo-multipart.cgi b/lib/ruby-1.9.1-rc1/sample/webrick/demo-multipart.cgi new file mode 100644 index 0000000..0893fad --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/demo-multipart.cgi @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +require "webrick/cgi" +require "webrick/https" # should load if it runs on HTTPS server +require "./demo-app" + +class DemoCGI < WEBrick::CGI + include DemoApplication +end + +config = { :NPH => false } +cgi = DemoCGI.new(config, "multipart/form-data") +cgi.start diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/demo-servlet.rb b/lib/ruby-1.9.1-rc1/sample/webrick/demo-servlet.rb new file mode 100644 index 0000000..9c18cc6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/demo-servlet.rb @@ -0,0 +1,6 @@ +require "webrick" +require "./demo-app" + +class DemoServlet < WEBrick::HTTPServlet::AbstractServlet + include DemoApplication +end diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/demo-urlencoded.cgi b/lib/ruby-1.9.1-rc1/sample/webrick/demo-urlencoded.cgi new file mode 100644 index 0000000..e4706f8 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/demo-urlencoded.cgi @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +require "webrick/cgi" +require "webrick/https" # should load if it runs on HTTPS server +require "./demo-app" + +class DemoCGI < WEBrick::CGI + include DemoApplication +end + +config = { :NPH => false } +cgi = DemoCGI.new(config, "application/x-www-form-urlencoded") +cgi.start diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/hello.cgi b/lib/ruby-1.9.1-rc1/sample/webrick/hello.cgi new file mode 100644 index 0000000..35d2240 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/hello.cgi @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +require "webrick/cgi" + +class HelloCGI < WEBrick::CGI + def do_GET(req, res) + res["content-type"] = "text/plain" + res.body = "Hello, world.\n" + end +end + +HelloCGI.new.start diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/hello.rb b/lib/ruby-1.9.1-rc1/sample/webrick/hello.rb new file mode 100644 index 0000000..4d02676 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/hello.rb @@ -0,0 +1,8 @@ +require "webrick" + +class HelloServlet < WEBrick::HTTPServlet::AbstractServlet + def do_GET(req, res) + res["content-type"] = "text/plain" + res.body = "Hello, world.\n" + end +end diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/httpd.rb b/lib/ruby-1.9.1-rc1/sample/webrick/httpd.rb new file mode 100644 index 0000000..b0edf47 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/httpd.rb @@ -0,0 +1,23 @@ +require "webrick" + +httpd = WEBrick::HTTPServer.new( + :DocumentRoot => File::dirname(__FILE__), + :Port => 10080, + :Logger => WEBrick::Log.new($stderr, WEBrick::Log::DEBUG), + :AccessLog => [ + [ $stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT ], + [ $stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT ], + [ $stderr, WEBrick::AccessLog::AGENT_LOG_FORMAT ], + ], + :CGIPathEnv => ENV["PATH"] # PATH environment variable for CGI. +) + +require "./hello" +httpd.mount("/hello", HelloServlet) + +require "./demo-servlet" +httpd.mount("/urlencoded", DemoServlet, "application/x-www-form-urlencoded") +httpd.mount("/multipart", DemoServlet, "multipart/form-data") + +trap(:INT){ httpd.shutdown } +httpd.start diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/httpproxy.rb b/lib/ruby-1.9.1-rc1/sample/webrick/httpproxy.rb new file mode 100644 index 0000000..bca0cc4 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/httpproxy.rb @@ -0,0 +1,26 @@ +require "webrick" +require "webrick/httpproxy" + +# :ProxyContentHandler will be invoked before sending +# response to User-Agenge. You can inspect the pair of +# request and response messages (or can edit the response +# message if necessary). + +pch = Proc.new{|req, res| + p [ req.request_line, res.status_line ] +} + +def upstream_proxy + if prx = ENV["http_proxy"] + return URI.parse(prx) + end + return nil +end + +httpd = WEBrick::HTTPProxyServer.new( + :Port => 10080, + :ProxyContentHandler => pch, + :ProxyURI => upstream_proxy +) +Signal.trap(:INT){ httpd.shutdown } +httpd.start diff --git a/lib/ruby-1.9.1-rc1/sample/webrick/httpsd.rb b/lib/ruby-1.9.1-rc1/sample/webrick/httpsd.rb new file mode 100644 index 0000000..a120782 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sample/webrick/httpsd.rb @@ -0,0 +1,33 @@ +require "webrick" +require "webrick/https" + +hostname = WEBrick::Utils::getservername +subject = [["O", "ruby-lang.org"], ["OU", "sample"], ["CN", hostname]] +comment = "Comment for self-signed certificate" + +httpd = WEBrick::HTTPServer.new( + :DocumentRoot => File::dirname(__FILE__), + :Port => 10443, + :SSLEnable => true, + + # Specify key pair and server certificate. + # :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.read("server.key")), + # :SSLCertificate => OpenSSL::X509::Certificate.new(File.read("server.crt")), + + # specify the following SSL options if you want to use auto + # generated self-signed certificate. + :SSLCertName => subject, + :SSLComment => comment, + + :CGIPathEnv => ENV["PATH"] # PATH environment variable for CGI. +) + +require "./hello" +httpd.mount("/hello", HelloServlet) + +require "./demo-servlet" +httpd.mount("/urlencoded", DemoServlet, "application/x-www-form-urlencoded") +httpd.mount("/multipart", DemoServlet, "multipart/form-data") + +trap(:INT){ httpd.shutdown } +httpd.start diff --git a/lib/ruby-1.9.1-rc1/signal.c b/lib/ruby-1.9.1-rc1/signal.c new file mode 100644 index 0000000..058e741 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/signal.c @@ -0,0 +1,1146 @@ +/********************************************************************** + + signal.c - + + $Author: yugui $ + created at: Tue Dec 20 10:13:44 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "vm_core.h" +#include +#include +#include + +#ifdef _WIN32 +typedef LONG rb_atomic_t; + +# define ATOMIC_TEST(var) InterlockedExchange(&(var), 0) +# define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val)) +# define ATOMIC_INC(var) InterlockedIncrement(&(var)) +# define ATOMIC_DEC(var) InterlockedDecrement(&(var)) + +#else +typedef int rb_atomic_t; + +# define ATOMIC_TEST(var) ((var) ? ((var) = 0, 1) : 0) +# define ATOMIC_SET(var, val) ((var) = (val)) +# define ATOMIC_INC(var) (++(var)) +# define ATOMIC_DEC(var) (--(var)) +#endif + +#ifdef __BEOS__ +#undef SIGBUS +#endif + +#if defined HAVE_SIGPROCMASK || defined HAVE_SIGSETMASK +#define USE_TRAP_MASK 1 +#else +#define USE_TRAP_MASK 0 +#endif + +#ifndef NSIG +# define NSIG (_SIGMAX + 1) /* For QNX */ +#endif + +static const struct signals { + const char *signm; + int signo; +} siglist [] = { + {"EXIT", 0}, +#ifdef SIGHUP + {"HUP", SIGHUP}, +#endif + {"INT", SIGINT}, +#ifdef SIGQUIT + {"QUIT", SIGQUIT}, +#endif +#ifdef SIGILL + {"ILL", SIGILL}, +#endif +#ifdef SIGTRAP + {"TRAP", SIGTRAP}, +#endif +#ifdef SIGIOT + {"IOT", SIGIOT}, +#endif +#ifdef SIGABRT + {"ABRT", SIGABRT}, +#endif +#ifdef SIGEMT + {"EMT", SIGEMT}, +#endif +#ifdef SIGFPE + {"FPE", SIGFPE}, +#endif +#ifdef SIGKILL + {"KILL", SIGKILL}, +#endif +#ifdef SIGBUS + {"BUS", SIGBUS}, +#endif +#ifdef SIGSEGV + {"SEGV", SIGSEGV}, +#endif +#ifdef SIGSYS + {"SYS", SIGSYS}, +#endif +#ifdef SIGPIPE + {"PIPE", SIGPIPE}, +#endif +#ifdef SIGALRM + {"ALRM", SIGALRM}, +#endif +#ifdef SIGTERM + {"TERM", SIGTERM}, +#endif +#ifdef SIGURG + {"URG", SIGURG}, +#endif +#ifdef SIGSTOP + {"STOP", SIGSTOP}, +#endif +#ifdef SIGTSTP + {"TSTP", SIGTSTP}, +#endif +#ifdef SIGCONT + {"CONT", SIGCONT}, +#endif +#ifdef SIGCHLD + {"CHLD", SIGCHLD}, +#endif +#ifdef SIGCLD + {"CLD", SIGCLD}, +#else +# ifdef SIGCHLD + {"CLD", SIGCHLD}, +# endif +#endif +#ifdef SIGTTIN + {"TTIN", SIGTTIN}, +#endif +#ifdef SIGTTOU + {"TTOU", SIGTTOU}, +#endif +#ifdef SIGIO + {"IO", SIGIO}, +#endif +#ifdef SIGXCPU + {"XCPU", SIGXCPU}, +#endif +#ifdef SIGXFSZ + {"XFSZ", SIGXFSZ}, +#endif +#ifdef SIGVTALRM + {"VTALRM", SIGVTALRM}, +#endif +#ifdef SIGPROF + {"PROF", SIGPROF}, +#endif +#ifdef SIGWINCH + {"WINCH", SIGWINCH}, +#endif +#ifdef SIGUSR1 + {"USR1", SIGUSR1}, +#endif +#ifdef SIGUSR2 + {"USR2", SIGUSR2}, +#endif +#ifdef SIGLOST + {"LOST", SIGLOST}, +#endif +#ifdef SIGMSG + {"MSG", SIGMSG}, +#endif +#ifdef SIGPWR + {"PWR", SIGPWR}, +#endif +#ifdef SIGPOLL + {"POLL", SIGPOLL}, +#endif +#ifdef SIGDANGER + {"DANGER", SIGDANGER}, +#endif +#ifdef SIGMIGRATE + {"MIGRATE", SIGMIGRATE}, +#endif +#ifdef SIGPRE + {"PRE", SIGPRE}, +#endif +#ifdef SIGGRANT + {"GRANT", SIGGRANT}, +#endif +#ifdef SIGRETRACT + {"RETRACT", SIGRETRACT}, +#endif +#ifdef SIGSOUND + {"SOUND", SIGSOUND}, +#endif +#ifdef SIGINFO + {"INFO", SIGINFO}, +#endif + {NULL, 0} +}; + +static int +signm2signo(const char *nm) +{ + const struct signals *sigs; + + for (sigs = siglist; sigs->signm; sigs++) + if (strcmp(sigs->signm, nm) == 0) + return sigs->signo; + return 0; +} + +static const char* +signo2signm(int no) +{ + const struct signals *sigs; + + for (sigs = siglist; sigs->signm; sigs++) + if (sigs->signo == no) + return sigs->signm; + return 0; +} + +const char * +ruby_signal_name(int no) +{ + return signo2signm(no); +} + +/* + * call-seq: + * SignalException.new(sig) => signal_exception + * + * Construct a new SignalException object. +sig+ should be a known + * signal name, or a signal number. + */ + +static VALUE +esignal_init(int argc, VALUE *argv, VALUE self) +{ + int argnum = 1; + VALUE sig = Qnil; + int signo; + const char *signm; + + if (argc > 0) { + sig = rb_check_to_integer(argv[0], "to_int"); + if (!NIL_P(sig)) argnum = 2; + else sig = argv[0]; + } + if (argc < 1 || argnum < argc) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", + argc, argnum); + } + if (argnum == 2) { + signo = NUM2INT(sig); + if (signo < 0 || signo > NSIG) { + rb_raise(rb_eArgError, "invalid signal number (%d)", signo); + } + if (argc > 1) { + sig = argv[1]; + } + else { + signm = signo2signm(signo); + if (signm) { + sig = rb_sprintf("SIG%s", signm); + } + else { + sig = rb_sprintf("SIG%u", signo); + } + } + } + else { + signm = SYMBOL_P(sig) ? rb_id2name(SYM2ID(sig)) : StringValuePtr(sig); + if (strncmp(signm, "SIG", 3) == 0) signm += 3; + signo = signm2signo(signm); + if (!signo) { + rb_raise(rb_eArgError, "unsupported name `SIG%s'", signm); + } + sig = rb_sprintf("SIG%s", signm); + } + rb_call_super(1, &sig); + rb_iv_set(self, "signo", INT2NUM(signo)); + + return self; +} + +/* + * call-seq: + * signal_exception.signo => num + * + * Returns a signal number. + */ + +static VALUE +esignal_signo(VALUE self) +{ + return rb_iv_get(self, "signo"); +} + +static VALUE +interrupt_init(int argc, VALUE *argv, VALUE self) +{ + VALUE args[2]; + + args[0] = INT2FIX(SIGINT); + rb_scan_args(argc, argv, "01", &args[1]); + return rb_call_super(2, args); +} + +void +ruby_default_signal(int sig) +{ + signal(sig, SIG_DFL); + raise(sig); +} + +/* + * call-seq: + * Process.kill(signal, pid, ...) => fixnum + * + * Sends the given signal to the specified process id(s), or to the + * current process if _pid_ is zero. _signal_ may be an + * integer signal number or a POSIX signal name (either with or without + * a +SIG+ prefix). If _signal_ is negative (or starts + * with a minus sign), kills process groups instead of + * processes. Not all signals are available on all platforms. + * + * pid = fork do + * Signal.trap("HUP") { puts "Ouch!"; exit } + * # ... do some work ... + * end + * # ... + * Process.kill("HUP", pid) + * Process.wait + * + * produces: + * + * Ouch! + */ + +VALUE +rb_f_kill(int argc, VALUE *argv) +{ +#ifndef HAS_KILLPG +#define killpg(pg, sig) kill(-(pg), sig) +#endif + int negative = 0; + int sig; + int i; + const char *s; + + rb_secure(2); + if (argc < 2) + rb_raise(rb_eArgError, "wrong number of arguments -- kill(sig, pid...)"); + switch (TYPE(argv[0])) { + case T_FIXNUM: + sig = FIX2INT(argv[0]); + break; + + case T_SYMBOL: + s = rb_id2name(SYM2ID(argv[0])); + if (!s) rb_raise(rb_eArgError, "bad signal"); + goto str_signal; + + case T_STRING: + s = RSTRING_PTR(argv[0]); + if (s[0] == '-') { + negative++; + s++; + } + str_signal: + if (strncmp("SIG", s, 3) == 0) + s += 3; + if((sig = signm2signo(s)) == 0) + rb_raise(rb_eArgError, "unsupported name `SIG%s'", s); + + if (negative) + sig = -sig; + break; + + default: + { + VALUE str; + + str = rb_check_string_type(argv[0]); + if (!NIL_P(str)) { + s = RSTRING_PTR(str); + goto str_signal; + } + rb_raise(rb_eArgError, "bad signal type %s", + rb_obj_classname(argv[0])); + } + break; + } + + if (sig < 0) { + sig = -sig; + for (i=1; i +#endif + +void +rb_disable_interrupt(void) +{ +#ifndef _WIN32 + sigset_t mask; + sigfillset(&mask); + sigdelset(&mask, SIGVTALRM); + sigdelset(&mask, SIGSEGV); + pthread_sigmask(SIG_SETMASK, &mask, NULL); +#endif +} + +void +rb_enable_interrupt(void) +{ +#ifndef _WIN32 + sigset_t mask; + sigemptyset(&mask); + pthread_sigmask(SIG_SETMASK, &mask, NULL); +#endif +} + +int +rb_get_next_signal(void) +{ + int i, sig = 0; + + for (i=1; i 0) { + rb_disable_interrupt(); + { + ATOMIC_DEC(signal_buff.cnt[i]); + ATOMIC_DEC(signal_buff.size); + } + rb_enable_interrupt(); + sig = i; + break; + } + } + return sig; +} + +#ifdef SIGBUS +static RETSIGTYPE +sigbus(int sig) +{ + rb_bug("Bus Error"); +} +#endif + +#ifdef SIGSEGV +static int segv_received = 0; +static RETSIGTYPE +sigsegv(int sig SIGINFO_ARG) +{ +#ifdef USE_SIGALTSTACK + int ruby_stack_overflowed_p(const rb_thread_t *, const void *); + NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th)); + rb_thread_t *th = GET_THREAD(); + if (ruby_stack_overflowed_p(th, info->si_addr)) { + ruby_thread_stack_overflow(th); + } +#endif + if (segv_received) { + fprintf(stderr, "SEGV recieved in SEGV handler\n"); + exit(EXIT_FAILURE); + } + else { + extern int ruby_disable_gc_stress; + segv_received = 1; + ruby_disable_gc_stress = 1; + rb_bug("Segmentation fault"); + } +} +#endif + +#ifdef SIGPIPE +static RETSIGTYPE +sigpipe(int sig) +{ + /* do nothing */ +} +#endif + +static void +signal_exec(VALUE cmd, int safe, int sig) +{ + VALUE signum = INT2NUM(sig); + rb_eval_cmd(cmd, rb_ary_new3(1, signum), safe); +} + +void +rb_trap_exit(void) +{ + rb_vm_t *vm = GET_VM(); + VALUE trap_exit = vm->trap_list[0].cmd; + + if (trap_exit) { + vm->trap_list[0].cmd = 0; + signal_exec(trap_exit, vm->trap_list[0].safe, 0); + } +} + +void +rb_signal_exec(rb_thread_t *th, int sig) +{ + rb_vm_t *vm = GET_VM(); + VALUE cmd = vm->trap_list[sig].cmd; + int safe = vm->trap_list[sig].safe; + + if (cmd == 0) { + switch (sig) { + case SIGINT: + rb_interrupt(); + break; +#ifdef SIGHUP + case SIGHUP: +#endif +#ifdef SIGQUIT + case SIGQUIT: +#endif +#ifdef SIGTERM + case SIGTERM: +#endif +#ifdef SIGALRM + case SIGALRM: +#endif +#ifdef SIGUSR1 + case SIGUSR1: +#endif +#ifdef SIGUSR2 + case SIGUSR2: +#endif + rb_thread_signal_raise(th, sig); + break; + } + } + else if (cmd == Qundef) { + rb_thread_signal_exit(th); + } + else { + signal_exec(cmd, safe, sig); + } +} + +struct trap_arg { +#if USE_TRAP_MASK +# ifdef HAVE_SIGPROCMASK + sigset_t mask; +# else + int mask; +# endif +#endif + int sig; + sighandler_t func; + VALUE cmd; +}; + +static sighandler_t +default_handler(int sig) +{ + sighandler_t func; + switch (sig) { + case SIGINT: +#ifdef SIGHUP + case SIGHUP: +#endif +#ifdef SIGQUIT + case SIGQUIT: +#endif +#ifdef SIGTERM + case SIGTERM: +#endif +#ifdef SIGALRM + case SIGALRM: +#endif +#ifdef SIGUSR1 + case SIGUSR1: +#endif +#ifdef SIGUSR2 + case SIGUSR2: +#endif + func = sighandler; + break; +#ifdef SIGBUS + case SIGBUS: + func = sigbus; + break; +#endif +#ifdef SIGSEGV + case SIGSEGV: + func = (sighandler_t)sigsegv; +# ifdef USE_SIGALTSTACK + register_sigaltstack(); +# endif + break; +#endif +#ifdef SIGPIPE + case SIGPIPE: + func = sigpipe; + break; +#endif + default: + func = SIG_DFL; + break; + } + + return func; +} + +static sighandler_t +trap_handler(VALUE *cmd, int sig) +{ + sighandler_t func = sighandler; + VALUE command; + + if (NIL_P(*cmd)) { + func = SIG_IGN; + } + else { + command = rb_check_string_type(*cmd); + if (!NIL_P(command)) { + SafeStringValue(command); /* taint check */ + *cmd = command; + switch (RSTRING_LEN(command)) { + case 0: + goto sig_ign; + break; + case 14: + if (strncmp(RSTRING_PTR(command), "SYSTEM_DEFAULT", 14) == 0) { + func = SIG_DFL; + *cmd = 0; + } + break; + case 7: + if (strncmp(RSTRING_PTR(command), "SIG_IGN", 7) == 0) { +sig_ign: + func = SIG_IGN; + *cmd = 0; + } + else if (strncmp(RSTRING_PTR(command), "SIG_DFL", 7) == 0) { +sig_dfl: + func = default_handler(sig); + *cmd = 0; + } + else if (strncmp(RSTRING_PTR(command), "DEFAULT", 7) == 0) { + goto sig_dfl; + } + break; + case 6: + if (strncmp(RSTRING_PTR(command), "IGNORE", 6) == 0) { + goto sig_ign; + } + break; + case 4: + if (strncmp(RSTRING_PTR(command), "EXIT", 4) == 0) { + *cmd = Qundef; + } + break; + } + } + else { + rb_proc_t *proc; + GetProcPtr(*cmd, proc); + } + } + + return func; +} + +static int +trap_signm(VALUE vsig) +{ + int sig = -1; + const char *s; + + switch (TYPE(vsig)) { + case T_FIXNUM: + sig = FIX2INT(vsig); + if (sig < 0 || sig >= NSIG) { + rb_raise(rb_eArgError, "invalid signal number (%d)", sig); + } + break; + + case T_SYMBOL: + s = rb_id2name(SYM2ID(vsig)); + if (!s) rb_raise(rb_eArgError, "bad signal"); + goto str_signal; + + default: + s = StringValuePtr(vsig); + + str_signal: + if (strncmp("SIG", s, 3) == 0) + s += 3; + sig = signm2signo(s); + if (sig == 0 && strcmp(s, "EXIT") != 0) + rb_raise(rb_eArgError, "unsupported signal SIG%s", s); + } + return sig; +} + +static VALUE +trap(struct trap_arg *arg) +{ + sighandler_t oldfunc, func = arg->func; + VALUE oldcmd, command = arg->cmd; + int sig = arg->sig; + rb_vm_t *vm = GET_VM(); + + oldfunc = ruby_signal(sig, func); + oldcmd = vm->trap_list[sig].cmd; + switch (oldcmd) { + case 0: + if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE"); + else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT"); + else oldcmd = Qnil; + break; + case Qundef: + oldcmd = rb_str_new2("EXIT"); + break; + } + + vm->trap_list[sig].cmd = command; + vm->trap_list[sig].safe = rb_safe_level(); + /* enable at least specified signal. */ +#if USE_TRAP_MASK +#ifdef HAVE_SIGPROCMASK + sigdelset(&arg->mask, sig); +#else + arg->mask &= ~sigmask(sig); +#endif +#endif + return oldcmd; +} + +#if USE_TRAP_MASK +static VALUE +trap_ensure(struct trap_arg *arg) +{ + /* enable interrupt */ +#ifdef HAVE_SIGPROCMASK + sigprocmask(SIG_SETMASK, &arg->mask, NULL); +#else + sigsetmask(arg->mask); +#endif + trap_last_mask = arg->mask; + return 0; +} +#endif + +void +rb_trap_restore_mask(void) +{ +#if USE_TRAP_MASK +# ifdef HAVE_SIGPROCMASK + sigprocmask(SIG_SETMASK, &trap_last_mask, NULL); +# else + sigsetmask(trap_last_mask); +# endif +#endif +} + +/* + * call-seq: + * Signal.trap( signal, command ) => obj + * Signal.trap( signal ) {| | block } => obj + * + * Specifies the handling of signals. The first parameter is a signal + * name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a + * signal number. The characters ``SIG'' may be omitted from the + * signal name. The command or block specifies code to be run when the + * signal is raised. + * If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal + * will be ignored. + * If the command is ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler + * will be invoked. + * If the command is ``EXIT'', the script will be terminated by the signal. + * If the command is ``SYSTEM_DEFAULT'', the operating system's default + * handler will be invoked. + * Otherwise, the given command or block will be run. + * The special signal name ``EXIT'' or signal number zero will be + * invoked just prior to program termination. + * trap returns the previous handler for the given signal. + * + * Signal.trap(0, proc { puts "Terminating: #{$$}" }) + * Signal.trap("CLD") { puts "Child died" } + * fork && Process.wait + * + * produces: + * Terminating: 27461 + * Child died + * Terminating: 27460 + */ +static VALUE +sig_trap(int argc, VALUE *argv) +{ + struct trap_arg arg; + + rb_secure(2); + if (argc == 0 || argc > 2) { + rb_raise(rb_eArgError, "wrong number of arguments -- trap(sig, cmd)/trap(sig){...}"); + } + + arg.sig = trap_signm(argv[0]); + if (argc == 1) { + arg.cmd = rb_block_proc(); + arg.func = sighandler; + } + else if (argc == 2) { + arg.cmd = argv[1]; + arg.func = trap_handler(&arg.cmd, arg.sig); + } + + if (OBJ_TAINTED(arg.cmd)) { + rb_raise(rb_eSecurityError, "Insecure: tainted signal trap"); + } +#if USE_TRAP_MASK + /* disable interrupt */ +# ifdef HAVE_SIGPROCMASK + sigfillset(&arg.mask); + sigprocmask(SIG_BLOCK, &arg.mask, &arg.mask); +# else + arg.mask = sigblock(~0); +# endif + + return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg); +#else + return trap(&arg); +#endif +} + +/* + * call-seq: + * Signal.list => a_hash + * + * Returns a list of signal names mapped to the corresponding + * underlying signal numbers. + * + * Signal.list #=> {"EXIT"=>0, "HUP"=>1, "INT"=>2, "QUIT"=>3, "ILL"=>4, "TRAP"=>5, "IOT"=>6, "ABRT"=>6, "FPE"=>8, "KILL"=>9, "BUS"=>7, "SEGV"=>11, "SYS"=>31, "PIPE"=>13, "ALRM"=>14, "TERM"=>15, "URG"=>23, "STOP"=>19, "TSTP"=>20, "CONT"=>18, "CHLD"=>17, "CLD"=>17, "TTIN"=>21, "TTOU"=>22, "IO"=>29, "XCPU"=>24, "XFSZ"=>25, "VTALRM"=>26, "PROF"=>27, "WINCH"=>28, "USR1"=>10, "USR2"=>12, "PWR"=>30, "POLL"=>29} + */ +static VALUE +sig_list(void) +{ + VALUE h = rb_hash_new(); + const struct signals *sigs; + + for (sigs = siglist; sigs->signm; sigs++) { + rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo)); + } + return h; +} + +static void +install_sighandler(int signum, sighandler_t handler) +{ + sighandler_t old; + + old = ruby_signal(signum, handler); + if (old != SIG_DFL) { + ruby_signal(signum, old); + } +} + +#if defined(SIGCLD) || defined(SIGCHLD) +static void +init_sigchld(int sig) +{ + sighandler_t oldfunc; +#if USE_TRAP_MASK +# ifdef HAVE_SIGPROCMASK + sigset_t mask; +# else + int mask; +# endif +#endif + +#if USE_TRAP_MASK + /* disable interrupt */ +# ifdef HAVE_SIGPROCMASK + sigfillset(&mask); + sigprocmask(SIG_BLOCK, &mask, &mask); +# else + mask = sigblock(~0); +# endif +#endif + + oldfunc = ruby_signal(sig, SIG_DFL); + if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) { + ruby_signal(sig, oldfunc); + } else { + GET_VM()->trap_list[sig].cmd = 0; + } + +#if USE_TRAP_MASK +#ifdef HAVE_SIGPROCMASK + sigdelset(&mask, sig); + sigprocmask(SIG_SETMASK, &mask, NULL); +#else + mask &= ~sigmask(sig); + sigsetmask(mask); +#endif + trap_last_mask = mask; +#endif +} +#endif + +void +ruby_sig_finalize() +{ + sighandler_t oldfunc; + + oldfunc = ruby_signal(SIGINT, SIG_IGN); + if (oldfunc == sighandler) { + ruby_signal(SIGINT, SIG_DFL); + } +} + + +#ifdef RUBY_DEBUG_ENV +int ruby_enable_coredump = 0; +#endif + +/* + * Many operating systems allow signals to be sent to running + * processes. Some signals have a defined effect on the process, while + * others may be trapped at the code level and acted upon. For + * example, your process may trap the USR1 signal and use it to toggle + * debugging, and may use TERM to initiate a controlled shutdown. + * + * pid = fork do + * Signal.trap("USR1") do + * $debug = !$debug + * puts "Debug now: #$debug" + * end + * Signal.trap("TERM") do + * puts "Terminating..." + * shutdown() + * end + * # . . . do some work . . . + * end + * + * Process.detach(pid) + * + * # Controlling program: + * Process.kill("USR1", pid) + * # ... + * Process.kill("USR1", pid) + * # ... + * Process.kill("TERM", pid) + * + * produces: + * Debug now: true + * Debug now: false + * Terminating... + * + * The list of available signal names and their interpretation is + * system dependent. Signal delivery semantics may also vary between + * systems; in particular signal delivery may not always be reliable. + */ +void +Init_signal(void) +{ + VALUE mSignal = rb_define_module("Signal"); + + rb_define_global_function("trap", sig_trap, -1); + rb_define_module_function(mSignal, "trap", sig_trap, -1); + rb_define_module_function(mSignal, "list", sig_list, 0); + + rb_define_method(rb_eSignal, "initialize", esignal_init, -1); + rb_define_method(rb_eSignal, "signo", esignal_signo, 0); + rb_alias(rb_eSignal, rb_intern("signm"), rb_intern("message")); + rb_define_method(rb_eInterrupt, "initialize", interrupt_init, -1); + + install_sighandler(SIGINT, sighandler); +#ifdef SIGHUP + install_sighandler(SIGHUP, sighandler); +#endif +#ifdef SIGQUIT + install_sighandler(SIGQUIT, sighandler); +#endif +#ifdef SIGTERM + install_sighandler(SIGTERM, sighandler); +#endif +#ifdef SIGALRM + install_sighandler(SIGALRM, sighandler); +#endif +#ifdef SIGUSR1 + install_sighandler(SIGUSR1, sighandler); +#endif +#ifdef SIGUSR2 + install_sighandler(SIGUSR2, sighandler); +#endif + +#ifdef RUBY_DEBUG_ENV + if (!ruby_enable_coredump) +#endif + { +#ifdef SIGBUS + install_sighandler(SIGBUS, sigbus); +#endif +#ifdef SIGSEGV +# ifdef USE_SIGALTSTACK + register_sigaltstack(); +# endif + install_sighandler(SIGSEGV, (sighandler_t)sigsegv); +#endif + } +#ifdef SIGPIPE + install_sighandler(SIGPIPE, sigpipe); +#endif + +#if defined(SIGCLD) + init_sigchld(SIGCLD); +#elif defined(SIGCHLD) + init_sigchld(SIGCHLD); +#endif +} diff --git a/lib/ruby-1.9.1-rc1/spec/README b/lib/ruby-1.9.1-rc1/spec/README new file mode 100644 index 0000000..ea10bcf --- /dev/null +++ b/lib/ruby-1.9.1-rc1/spec/README @@ -0,0 +1,39 @@ += RubySpec + +RubySpec (http://rubyspec.org) provides the Ruby langauge specification in an +executable format. The make task `update-rubyspec' retrieves the specification +and put it into this directory. + +== Directory structure + spec + +-- mspec driver library for executing the specification. + +-- rubyspec + +-- 1.8 specification for both Ruby 1.8 and 1.9 + | +-- core specification for core libraries + | | +-- array + | | +-- bignum + | | +-- ... + | | + | +-- fixtures example classes for writing specs + | +-- language specification for Ruby language itself + | +-- library specification for standard libraries + | +-- addrev + | +-- ... + | +-- core + | +-- ... + | + +-- 1.9 specification for new features and large changes in Ruby 1.9 + +-- core + +-- fixtures + +-- language + +-- library + +-- core + +-- ... + +== How to run +:make target + verifies all specs. + $ make test-rubyspec +:mspec command + verifies the specified spec. + $ mspec spec/path/to/some_spec.rb diff --git a/lib/ruby-1.9.1-rc1/spec/default.mspec b/lib/ruby-1.9.1-rc1/spec/default.mspec new file mode 100644 index 0000000..402065b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/spec/default.mspec @@ -0,0 +1,18 @@ +load File.dirname(__FILE__) + '/rubyspec/ruby.1.9.mspec' +class MSpecScript + builddir = File.expand_path(File.join(File.dirname(__FILE__), '..')) + srcdir = ENV['SRCDIR'] + srcdir ||= $1 if File.read("#{builddir}/Makefile")[/^\s*srcdir\s*=\s*(.+)/i] + srcdir ||= builddir + config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`} + + # The default implementation to run the specs. + set :target, File.join(builddir, "miniruby#{config['exeext']}") + set :flags, %W[ + -I#{srcdir}/lib + -I#{srcdir}/#{config['EXTOUT']}/common + -I#{srcdir}/- + -r#{srcdir}/ext/purelib.rb + #{srcdir}/runruby.rb --extout=#{config['EXTOUT']} + ] +end diff --git a/lib/ruby-1.9.1-rc1/sprintf.c b/lib/ruby-1.9.1-rc1/sprintf.c new file mode 100644 index 0000000..6e35c10 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/sprintf.c @@ -0,0 +1,1208 @@ +/********************************************************************** + + sprintf.c - + + $Author: yugui $ + created at: Fri Oct 15 10:39:26 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/encoding.h" +#include +#include + +#ifdef HAVE_IEEEFP_H +#include +#endif + +#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */ +#define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT) +#define EXTENDSIGN(n, l) (((~0 << (n)) >> (((n)*(l)) % BITSPERDIG)) & ~(~0 << (n))) + +static void fmt_setup(char*,size_t,int,int,int,int); + +static char* +remove_sign_bits(char *str, int base) +{ + char *s, *t; + + s = t = str; + + if (base == 16) { + while (*t == 'f') { + t++; + } + } + else if (base == 8) { + *t |= EXTENDSIGN(3, strlen(t)); + while (*t == '7') { + t++; + } + } + else if (base == 2) { + while (*t == '1') { + t++; + } + } + + return t; +} + +static char +sign_bits(int base, const char *p) +{ + char c = '.'; + + switch (base) { + case 16: + if (*p == 'X') c = 'F'; + else c = 'f'; + break; + case 8: + c = '7'; break; + case 2: + c = '1'; break; + } + return c; +} + +#define FNONE 0 +#define FSHARP 1 +#define FMINUS 2 +#define FPLUS 4 +#define FZERO 8 +#define FSPACE 16 +#define FWIDTH 32 +#define FPREC 64 +#define FPREC0 128 + +#define CHECK(l) do {\ + while (blen + (l) >= bsiz) {\ + bsiz*=2;\ + }\ + rb_str_resize(result, bsiz);\ + buf = RSTRING_PTR(result);\ +} while (0) + +#define PUSH(s, l) do { \ + CHECK(l);\ + memcpy(&buf[blen], s, l);\ + blen += (l);\ +} while (0) + +#define FILL(c, l) do { \ + CHECK(l);\ + memset(&buf[blen], c, l);\ + blen += (l);\ +} while (0) + +#define GETARG() (nextvalue != Qundef ? nextvalue : \ + posarg == -1 ? \ + (rb_raise(rb_eArgError, "unnumbered(%d) mixed with numbered", nextarg), 0) : \ + posarg == -2 ? \ + (rb_raise(rb_eArgError, "unnumbered(%d) mixed with named", nextarg), 0) : \ + (posarg = nextarg++, GETNTHARG(posarg))) + +#define GETPOSARG(n) (posarg > 0 ? \ + (rb_raise(rb_eArgError, "numbered(%d) after unnumbered(%d)", n, posarg), 0) : \ + posarg == -2 ? \ + (rb_raise(rb_eArgError, "numbered(%d) after named", n), 0) : \ + ((n < 1) ? (rb_raise(rb_eArgError, "invalid index - %d$", n), 0) : \ + (posarg = -1, GETNTHARG(n)))) + +#define GETNTHARG(nth) \ + ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments"), 0) : argv[nth]) + +#define GETNAMEARG(id) (posarg > 0 ? \ + (rb_raise(rb_eArgError, "named after unnumbered(%d)", posarg), 0) : \ + posarg == -1 ? \ + (rb_raise(rb_eArgError, "named after numbered"), 0) : \ + rb_hash_fetch(get_hash(&hash, argc, argv), id)) + +#define GETNUM(n, val) \ + for (; p < end && rb_enc_isdigit(*p, enc); p++) { \ + int next_n = 10 * n + (*p - '0'); \ + if (next_n / 10 != n) {\ + rb_raise(rb_eArgError, #val " too big"); \ + } \ + n = next_n; \ + } \ + if (p >= end) { \ + rb_raise(rb_eArgError, "malformed format string - %%*[0-9]"); \ + } + +#define GETASTER(val) do { \ + t = p++; \ + n = 0; \ + GETNUM(n, val); \ + if (*p == '$') { \ + tmp = GETPOSARG(n); \ + } \ + else { \ + tmp = GETARG(); \ + p = t; \ + } \ + val = NUM2INT(tmp); \ +} while (0) + +static VALUE +get_hash(volatile VALUE *hash, int argc, const VALUE *argv) +{ + VALUE tmp; + + if (*hash != Qundef) return *hash; + if (argc != 2) { + rb_raise(rb_eArgError, "one hash required"); + } + tmp = rb_check_convert_type(argv[1], T_HASH, "Hash", "to_hash"); + if (NIL_P(tmp)) { + rb_raise(rb_eArgError, "one hash required"); + } + return (*hash = tmp); +} + +/* + * call-seq: + * format(format_string [, arguments...] ) => string + * sprintf(format_string [, arguments...] ) => string + * + * Returns the string resulting from applying format_string to + * any additional arguments. Within the format string, any characters + * other than format sequences are copied to the result. + * + * The syntax of a format sequence is follows. + * + * %[flags][width][.precision]type + * + * A format + * sequence consists of a percent sign, followed by optional flags, + * width, and precision indicators, then terminated with a field type + * character. The field type controls how the corresponding + * sprintf argument is to be interpreted, while the flags + * modify that interpretation. + * + * The field type characters are: + * + * Field | Integer Format + * ------+-------------------------------------------------------------- + * b | Convert argument as a binary number. + * | Negative numbers will be displayed as a two's complement + * | prefixed with `..1'. + * B | Equivalent to `b', but uses an uppercase 0B for prefix + * | in the alternative format by #. + * d | Convert argument as a decimal number. + * i | Identical to `d'. + * o | Convert argument as an octal number. + * | Negative numbers will be displayed as a two's complement + * | prefixed with `..7'. + * u | Identical to `d'. + * x | Convert argument as a hexadecimal number. + * | Negative numbers will be displayed as a two's complement + * | prefixed with `..f' (representing an infinite string of + * | leading 'ff's). + * X | Equivalent to `x', but uses uppercase letters. + * + * Field | Float Format + * ------+-------------------------------------------------------------- + * e | Convert floating point argument into exponential notation + * | with one digit before the decimal point as [-]d.dddddde[+-]dd. + * | The precision specifies the number of digits after the decimal + * | point (defaulting to six). + * E | Equivalent to `e', but uses an uppercase E to indicate + * | the exponent. + * f | Convert floating point argument as [-]ddd.dddddd, + * | where the precision specifies the number of digits after + * | the decimal point. + * g | Convert a floating point number using exponential form + * | if the exponent is less than -4 or greater than or + * | equal to the precision, or in dd.dddd form otherwise. + * | The precision specifies the number of significant digits. + * G | Equivalent to `g', but use an uppercase `E' in exponent form. + * + * Field | Other Format + * ------+-------------------------------------------------------------- + * c | Argument is the numeric code for a single character or + * | a single character string itself. + * p | The valuing of argument.inspect. + * s | Argument is a string to be substituted. If the format + * | sequence contains a precision, at most that many characters + * | will be copied. + * % | A percent sign itself will be displayed. No argument taken. + * + * The flags modifies the behavior of the formats. + * The flag characters are: + * + * Flag | Applies to | Meaning + * ---------+---------------+----------------------------------------- + * space | bBdiouxX | Leave a space at the start of + * | eEfgG | non-negative numbers. + * | (numeric fmt) | For `o', `x', `X', `b' and `B', use + * | | a minus sign with absolute value for + * | | negative values. + * ---------+---------------+----------------------------------------- + * (digit)$ | all | Specifies the absolute argument number + * | | for this field. Absolute and relative + * | | argument numbers cannot be mixed in a + * | | sprintf string. + * ---------+---------------+----------------------------------------- + * # | bBoxX | Use an alternative format. + * | eEfgG | For the conversions `o', increase the precision + * | | until the first digit will be `0' if + * | | it is not formatted as complements. + * | | For the conversions `x', `X', `b' and `B' + * | | on non-zero, prefix the result with ``0x'', + * | | ``0X'', ``0b'' and ``0B'', respectively. + * | | For `e', `E', `f', `g', and 'G', + * | | force a decimal point to be added, + * | | even if no digits follow. + * | | For `g' and 'G', do not remove trailing zeros. + * ---------+---------------+----------------------------------------- + * + | bBdiouxX | Add a leading plus sign to non-negative + * | eEfgG | numbers. + * | (numeric fmt) | For `o', `x', `X', `b' and `B', use + * | | a minus sign with absolute value for + * | | negative values. + * ---------+---------------+----------------------------------------- + * - | all | Left-justify the result of this conversion. + * ---------+---------------+----------------------------------------- + * 0 (zero) | bBdiouxX | Pad with zeros, not spaces. + * | eEfgG | For `o', `x', `X', `b' and `B', radix-1 + * | (numeric fmt) | is used for negative numbers formatted as + * | | complements. + * ---------+---------------+----------------------------------------- + * * | all | Use the next argument as the field width. + * | | If negative, left-justify the result. If the + * | | asterisk is followed by a number and a dollar + * | | sign, use the indicated argument as the width. + * + * Examples of flags: + * + * # `+' and space flag specifies the sign of non-negative numbers. + * sprintf("%d", 123) #=> "123" + * sprintf("%+d", 123) #=> "+123" + * sprintf("% d", 123) #=> " 123" + * + * # `#' flag for `o' increases number of digits to show `0'. + * # `+' and space flag changes format of negative numbers. + * sprintf("%o", 123) #=> "173" + * sprintf("%#o", 123) #=> "0173" + * sprintf("%+o", -123) #=> "-173" + * sprintf("%o", -123) #=> "..7605" + * sprintf("%#o", -123) #=> "..7605" + * + * # `#' flag for `x' add a prefix `0x' for non-zero numbers. + * # `+' and space flag disables complements for negative numbers. + * sprintf("%x", 123) #=> "7b" + * sprintf("%#x", 123) #=> "0x7b" + * sprintf("%+x", -123) #=> "-7b" + * sprintf("%x", -123) #=> "..f85" + * sprintf("%#x", -123) #=> "0x..f85" + * sprintf("%#x", 0) #=> "0" + * + * # `#' for `X' uses the prefix `0X'. + * sprintf("%X", 123) #=> "7B" + * sprintf("%#X", 123) #=> "0X7B" + * + * # `#' flag for `b' add a prefix `0b' for non-zero numbers. + * # `+' and space flag disables complements for negative numbers. + * sprintf("%b", 123) #=> "1111011" + * sprintf("%#b", 123) #=> "0b1111011" + * sprintf("%+b", -123) #=> "-1111011" + * sprintf("%b", -123) #=> "..10000101" + * sprintf("%#b", -123) #=> "0b..10000101" + * sprintf("%#b", 0) #=> "0" + * + * # `#' for `B' uses the prefix `0B'. + * sprintf("%B", 123) #=> "1111011" + * sprintf("%#B", 123) #=> "0B1111011" + * + * # `#' for `e' forces to show the decimal point. + * sprintf("%.0e", 1) #=> "1e+00" + * sprintf("%#.0e", 1) #=> "1.e+00" + * + * # `#' for `f' forces to show the decimal point. + * sprintf("%.0f", 1234) #=> "1234" + * sprintf("%#.0f", 1234) #=> "1234." + * + * # `#' for `g' forces to show the decimal point. + * # It also disables stripping lowest zeros. + * sprintf("%g", 123.4) #=> "123.4" + * sprintf("%#g", 123.4) #=> "123.400" + * sprintf("%g", 123456) #=> "123456" + * sprintf("%#g", 123456) #=> "123456." + * + * The field width is an optional integer, followed optionally by a + * period and a precision. The width specifies the minimum number of + * characters that will be written to the result for this field. + * + * Examples of width: + * + * # padding is done by spaces, width=20 + * # 0 or radix-1. <------------------> + * sprintf("%20d", 123) #=> " 123" + * sprintf("%+20d", 123) #=> " +123" + * sprintf("%020d", 123) #=> "00000000000000000123" + * sprintf("%+020d", 123) #=> "+0000000000000000123" + * sprintf("% 020d", 123) #=> " 0000000000000000123" + * sprintf("%-20d", 123) #=> "123 " + * sprintf("%-+20d", 123) #=> "+123 " + * sprintf("%- 20d", 123) #=> " 123 " + * sprintf("%020x", -123) #=> "..ffffffffffffffff85" + * + * For + * numeric fields, the precision controls the number of decimal places + * displayed. For string fields, the precision determines the maximum + * number of characters to be copied from the string. (Thus, the format + * sequence %10.10s will always contribute exactly ten + * characters to the result.) + * + * Examples of precisions: + * + * # precision for `d', 'o', 'x' and 'b' is + * # minimum number of digits <------> + * sprintf("%20.8d", 123) #=> " 00000123" + * sprintf("%20.8o", 123) #=> " 00000173" + * sprintf("%20.8x", 123) #=> " 0000007b" + * sprintf("%20.8b", 123) #=> " 01111011" + * sprintf("%20.8d", -123) #=> " -00000123" + * sprintf("%20.8o", -123) #=> " ..777605" + * sprintf("%20.8x", -123) #=> " ..ffff85" + * sprintf("%20.8b", -11) #=> " ..110101" + * + * # "0x" and "0b" for `#x' and `#b' is not counted for + * # precision but "0" for `#o' is counted. <------> + * sprintf("%#20.8d", 123) #=> " 00000123" + * sprintf("%#20.8o", 123) #=> " 00000173" + * sprintf("%#20.8x", 123) #=> " 0x0000007b" + * sprintf("%#20.8b", 123) #=> " 0b01111011" + * sprintf("%#20.8d", -123) #=> " -00000123" + * sprintf("%#20.8o", -123) #=> " ..777605" + * sprintf("%#20.8x", -123) #=> " 0x..ffff85" + * sprintf("%#20.8b", -11) #=> " 0b..110101" + * + * # precision for `e' is number of + * # digits after the decimal point <------> + * sprintf("%20.8e", 1234.56789) #=> " 1.23456789e+03" + * + * # precision for `f' is number of + * # digits after the decimal point <------> + * sprintf("%20.8f", 1234.56789) #=> " 1234.56789000" + * + * # precision for `g' is number of + * # significant digits <-------> + * sprintf("%20.8g", 1234.56789) #=> " 1234.5679" + * + * # <-------> + * sprintf("%20.8g", 123456789) #=> " 1.2345679e+08" + * + * # precision for `s' is + * # maximum number of characters <------> + * sprintf("%20.8s", "string test") #=> " string t" + * + * Examples: + * + * sprintf("%d %04x", 123, 123) #=> "123 007b" + * sprintf("%08b '%4s'", 123, 123) #=> "01111011 ' 123'" + * sprintf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello" + * sprintf("%1$*2$s %2$d", "hello", -8) #=> "hello -8" + * sprintf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23" + * sprintf("%u", -123) #=> "-123" + */ + +VALUE +rb_f_sprintf(int argc, const VALUE *argv) +{ + return rb_str_format(argc - 1, argv + 1, GETNTHARG(0)); +} + +VALUE +rb_str_format(int argc, const VALUE *argv, VALUE fmt) +{ + rb_encoding *enc; + const char *p, *end; + char *buf; + int blen, bsiz; + VALUE result; + + int width, prec, flags = FNONE; + int nextarg = 1; + int posarg = 0; + int tainted = 0; + VALUE nextvalue; + VALUE tmp; + VALUE str; + volatile VALUE hash = Qundef; + +#define CHECK_FOR_WIDTH(f) \ + if ((f) & FWIDTH) { \ + rb_raise(rb_eArgError, "width given twice"); \ + } \ + if ((f) & FPREC0) { \ + rb_raise(rb_eArgError, "width after precision"); \ + } +#define CHECK_FOR_FLAGS(f) \ + if ((f) & FWIDTH) { \ + rb_raise(rb_eArgError, "flag after width"); \ + } \ + if ((f) & FPREC0) { \ + rb_raise(rb_eArgError, "flag after precision"); \ + } + + ++argc; + --argv; + if (OBJ_TAINTED(fmt)) tainted = 1; + StringValue(fmt); + enc = rb_enc_get(fmt); + fmt = rb_str_new4(fmt); + p = RSTRING_PTR(fmt); + end = p + RSTRING_LEN(fmt); + blen = 0; + bsiz = 120; + result = rb_str_buf_new(bsiz); + rb_enc_copy(result, fmt); + buf = RSTRING_PTR(result); + memset(buf, 0, bsiz); + + for (; p < end; p++) { + const char *t; + int n; + + for (t = p; t < end && *t != '%'; t++) ; + PUSH(p, t - p); + if (t >= end) { + /* end of fmt string */ + goto sprint_exit; + } + p = t + 1; /* skip `%' */ + + width = prec = -1; + nextvalue = Qundef; + retry: + switch (*p) { + default: + if (rb_enc_isprint(*p, enc)) + rb_raise(rb_eArgError, "malformed format string - %%%c", *p); + else + rb_raise(rb_eArgError, "malformed format string"); + break; + + case ' ': + CHECK_FOR_FLAGS(flags); + flags |= FSPACE; + p++; + goto retry; + + case '#': + CHECK_FOR_FLAGS(flags); + flags |= FSHARP; + p++; + goto retry; + + case '+': + CHECK_FOR_FLAGS(flags); + flags |= FPLUS; + p++; + goto retry; + + case '-': + CHECK_FOR_FLAGS(flags); + flags |= FMINUS; + p++; + goto retry; + + case '0': + CHECK_FOR_FLAGS(flags); + flags |= FZERO; + p++; + goto retry; + + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + n = 0; + GETNUM(n, width); + if (*p == '$') { + if (nextvalue != Qundef) { + rb_raise(rb_eArgError, "value given twice - %d$", n); + } + nextvalue = GETPOSARG(n); + p++; + goto retry; + } + CHECK_FOR_WIDTH(flags); + width = n; + flags |= FWIDTH; + goto retry; + + case '<': + case '{': + { + const char *start = p; + char term = (*p == '<') ? '>' : '}'; + ID id; + + for (; p < end && *p != term; ) { + p += rb_enc_mbclen(p, end, enc); + } + if (p >= end) { + rb_raise(rb_eArgError, "malformed name - unmatched parenthesis"); + } + id = rb_intern3(start + 1, p - start - 1, enc); + nextvalue = GETNAMEARG(ID2SYM(id)); + if (term == '}') goto format_s; + p++; + goto retry; + } + + case '*': + CHECK_FOR_WIDTH(flags); + flags |= FWIDTH; + GETASTER(width); + if (width < 0) { + flags |= FMINUS; + width = -width; + } + p++; + goto retry; + + case '.': + if (flags & FPREC0) { + rb_raise(rb_eArgError, "precision given twice"); + } + flags |= FPREC|FPREC0; + + prec = 0; + p++; + if (*p == '*') { + GETASTER(prec); + if (prec < 0) { /* ignore negative precision */ + flags &= ~FPREC; + } + p++; + goto retry; + } + + GETNUM(prec, precision); + goto retry; + + case '\n': + case '\0': + p--; + case '%': + if (flags != FNONE) { + rb_raise(rb_eArgError, "invalid format character - %%"); + } + PUSH("%", 1); + break; + + case 'c': + { + VALUE val = GETARG(); + VALUE tmp; + unsigned int c; + int n; + + tmp = rb_check_string_type(val); + if (!NIL_P(tmp)) { + if (rb_enc_strlen(RSTRING_PTR(tmp),RSTRING_END(tmp),enc) != 1) { + rb_raise(rb_eArgError, "%%c requires a character"); + } + c = rb_enc_codepoint(RSTRING_PTR(tmp), RSTRING_END(tmp), enc); + } + else { + c = NUM2INT(val); + } + n = rb_enc_codelen(c, enc); + if (n <= 0) { + rb_raise(rb_eArgError, "invalid character"); + } + if (!(flags & FWIDTH)) { + CHECK(n); + rb_enc_mbcput(c, &buf[blen], enc); + blen += n; + } + else if ((flags & FMINUS)) { + CHECK(n); + rb_enc_mbcput(c, &buf[blen], enc); + blen += n; + FILL(' ', width-1); + } + else { + FILL(' ', width-1); + CHECK(n); + rb_enc_mbcput(c, &buf[blen], enc); + blen += n; + } + } + break; + + case 's': + case 'p': + format_s: + { + VALUE arg = GETARG(); + long len, slen; + + if (*p == 'p') arg = rb_inspect(arg); + str = rb_obj_as_string(arg); + if (OBJ_TAINTED(str)) tainted = 1; + len = RSTRING_LEN(str); + enc = rb_enc_check(result, str); + if (flags&(FPREC|FWIDTH)) { + slen = rb_enc_strlen(RSTRING_PTR(str),RSTRING_END(str),enc); + if (slen < 0) { + rb_raise(rb_eArgError, "invalid mbstring sequence"); + } + if ((flags&FPREC) && (prec < slen)) { + char *p = rb_enc_nth(RSTRING_PTR(str), RSTRING_END(str), + prec, enc); + slen = prec; + len = p - RSTRING_PTR(str); + } + /* need to adjust multi-byte string pos */ + if ((flags&FWIDTH) && (width > slen)) { + width -= slen; + if (!(flags&FMINUS)) { + CHECK(width); + while (width--) { + buf[blen++] = ' '; + } + } + CHECK(len); + memcpy(&buf[blen], RSTRING_PTR(str), len); + blen += len; + if (flags&FMINUS) { + CHECK(width); + while (width--) { + buf[blen++] = ' '; + } + } + rb_enc_associate(result, enc); + break; + } + } + PUSH(RSTRING_PTR(str), len); + rb_enc_associate(result, enc); + } + break; + + case 'd': + case 'i': + case 'o': + case 'x': + case 'X': + case 'b': + case 'B': + case 'u': + { + volatile VALUE tmp1; + volatile VALUE val = GETARG(); + char fbuf[32], nbuf[64], *s; + const char *prefix = 0; + int sign = 0, dots = 0; + char sc = 0; + long v = 0; + int base, bignum = 0; + int len, pos; + + switch (*p) { + case 'd': + case 'i': + case 'u': + sign = 1; break; + case 'o': + case 'x': + case 'X': + case 'b': + case 'B': + if (flags&(FPLUS|FSPACE)) sign = 1; + break; + } + if (flags & FSHARP) { + switch (*p) { + case 'o': + prefix = "0"; break; + case 'x': + prefix = "0x"; break; + case 'X': + prefix = "0X"; break; + case 'b': + prefix = "0b"; break; + case 'B': + prefix = "0B"; break; + } + } + + bin_retry: + switch (TYPE(val)) { + case T_FLOAT: + if (FIXABLE(RFLOAT_VALUE(val))) { + val = LONG2FIX((long)RFLOAT_VALUE(val)); + goto bin_retry; + } + val = rb_dbl2big(RFLOAT_VALUE(val)); + if (FIXNUM_P(val)) goto bin_retry; + bignum = 1; + break; + case T_STRING: + val = rb_str_to_inum(val, 0, Qtrue); + goto bin_retry; + case T_BIGNUM: + bignum = 1; + break; + case T_FIXNUM: + v = FIX2LONG(val); + break; + default: + val = rb_Integer(val); + goto bin_retry; + } + + switch (*p) { + case 'o': + base = 8; break; + case 'x': + case 'X': + base = 16; break; + case 'b': + case 'B': + base = 2; break; + case 'u': + case 'd': + case 'i': + default: + base = 10; break; + } + + if (!bignum) { + if (base == 2) { + val = rb_int2big(v); + goto bin_retry; + } + if (sign) { + char c = *p; + if (c == 'i') c = 'd'; /* %d and %i are identical */ + if (v < 0) { + v = -v; + sc = '-'; + width--; + } + else if (flags & FPLUS) { + sc = '+'; + width--; + } + else if (flags & FSPACE) { + sc = ' '; + width--; + } + snprintf(fbuf, sizeof(fbuf), "%%l%c", c); + snprintf(nbuf, sizeof(nbuf), fbuf, v); + s = nbuf; + } + else { + s = nbuf; + if (v < 0) { + dots = 1; + } + snprintf(fbuf, sizeof(fbuf), "%%l%c", *p == 'X' ? 'x' : *p); + snprintf(++s, sizeof(nbuf) - 1, fbuf, v); + if (v < 0) { + char d = 0; + + s = remove_sign_bits(s, base); + switch (base) { + case 16: + d = 'f'; break; + case 8: + d = '7'; break; + } + if (d && *s != d) { + *--s = d; + } + } + } + } + else { + if (sign) { + tmp = rb_big2str(val, base); + s = RSTRING_PTR(tmp); + if (s[0] == '-') { + s++; + sc = '-'; + width--; + } + else if (flags & FPLUS) { + sc = '+'; + width--; + } + else if (flags & FSPACE) { + sc = ' '; + width--; + } + } + else { + if (!RBIGNUM_SIGN(val)) { + val = rb_big_clone(val); + rb_big_2comp(val); + } + tmp1 = tmp = rb_big2str0(val, base, RBIGNUM_SIGN(val)); + s = RSTRING_PTR(tmp); + if (*s == '-') { + dots = 1; + if (base == 10) { + rb_warning("negative number for %%u specifier"); + } + s = remove_sign_bits(++s, base); + switch (base) { + case 16: + if (s[0] != 'f') *--s = 'f'; break; + case 8: + if (s[0] != '7') *--s = '7'; break; + case 2: + if (s[0] != '1') *--s = '1'; break; + } + } + } + } + + pos = -1; + len = strlen(s); + if (dots) { + prec -= 2; + width -= 2; + } + + if (*p == 'X') { + char *pp = s; + int c; + while ((c = (int)(unsigned char)*pp) != 0) { + *pp = rb_enc_toupper(c, enc); + pp++; + } + } + if (prefix && !prefix[1]) { /* octal */ + if (dots) { + prefix = 0; + } + else if (len == 1 && *s == '0') { + len = 0; + if (flags & FPREC) prec--; + } + else if ((flags & FPREC) && (prec > len)) { + prefix = 0; + } + } + else if (len == 1 && *s == '0') { + prefix = 0; + } + if (prefix) { + width -= strlen(prefix); + } + if ((flags & (FZERO|FMINUS|FPREC)) == FZERO) { + prec = width; + width = 0; + } + else { + if (prec < len) { + if (!prefix && prec == 0 && len == 1 && *s == '0') len = 0; + prec = len; + } + width -= prec; + } + if (!(flags&FMINUS)) { + CHECK(width); + while (width-- > 0) { + buf[blen++] = ' '; + } + } + if (sc) PUSH(&sc, 1); + if (prefix) { + int plen = strlen(prefix); + PUSH(prefix, plen); + } + CHECK(prec - len); + if (dots) PUSH("..", 2); + if (!bignum && v < 0) { + char c = sign_bits(base, p); + while (len < prec--) { + buf[blen++] = c; + } + } + else if ((flags & (FMINUS|FPREC)) != FMINUS) { + char c; + + if (!sign && bignum && !RBIGNUM_SIGN(val)) + c = sign_bits(base, p); + else + c = '0'; + while (len < prec--) { + buf[blen++] = c; + } + } + PUSH(s, len); + CHECK(width); + while (width-- > 0) { + buf[blen++] = ' '; + } + } + break; + + case 'f': + case 'g': + case 'G': + case 'e': + case 'E': + { + VALUE val = GETARG(); + double fval; + int i, need = 6; + char fbuf[32]; + + fval = RFLOAT_VALUE(rb_Float(val)); + if (isnan(fval) || isinf(fval)) { + const char *expr; + + if (isnan(fval)) { + expr = "NaN"; + } + else { + expr = "Inf"; + } + need = strlen(expr); + if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS)) + need++; + if ((flags & FWIDTH) && need < width) + need = width; + + CHECK(need + 1); + snprintf(&buf[blen], need + 1, "%*s", need, ""); + if (flags & FMINUS) { + if (!isnan(fval) && fval < 0.0) + buf[blen++] = '-'; + else if (flags & FPLUS) + buf[blen++] = '+'; + else if (flags & FSPACE) + blen++; + strncpy(&buf[blen], expr, strlen(expr)); + } + else { + if (!isnan(fval) && fval < 0.0) + buf[blen + need - strlen(expr) - 1] = '-'; + else if (flags & FPLUS) + buf[blen + need - strlen(expr) - 1] = '+'; + else if ((flags & FSPACE) && need > width) + blen++; + strncpy(&buf[blen + need - strlen(expr)], expr, + strlen(expr)); + } + blen += strlen(&buf[blen]); + break; + } + + fmt_setup(fbuf, sizeof(fbuf), *p, flags, width, prec); + need = 0; + if (*p != 'e' && *p != 'E') { + i = INT_MIN; + frexp(fval, &i); + if (i > 0) + need = BIT_DIGITS(i); + } + need += (flags&FPREC) ? prec : 6; + if ((flags&FWIDTH) && need < width) + need = width; + need += 20; + + CHECK(need); + snprintf(&buf[blen], need, fbuf, fval); + blen += strlen(&buf[blen]); + } + break; + } + flags = FNONE; + } + + sprint_exit: + /* XXX - We cannot validate the number of arguments if (digit)$ style used. + */ + if (posarg >= 0 && nextarg < argc) { + const char *mesg = "too many arguments for format string"; + if (RTEST(ruby_debug)) rb_raise(rb_eArgError, "%s", mesg); + if (RTEST(ruby_verbose)) rb_warn("%s", mesg); + } + rb_str_resize(result, blen); + + if (tainted) OBJ_TAINT(result); + return result; +} + +static void +fmt_setup(char *buf, size_t size, int c, int flags, int width, int prec) +{ + char *end = buf + size; + *buf++ = '%'; + if (flags & FSHARP) *buf++ = '#'; + if (flags & FPLUS) *buf++ = '+'; + if (flags & FMINUS) *buf++ = '-'; + if (flags & FZERO) *buf++ = '0'; + if (flags & FSPACE) *buf++ = ' '; + + if (flags & FWIDTH) { + snprintf(buf, end - buf, "%d", width); + buf += strlen(buf); + } + + if (flags & FPREC) { + snprintf(buf, end - buf, ".%d", prec); + buf += strlen(buf); + } + + *buf++ = c; + *buf = '\0'; +} + +#undef FILE +#define FILE rb_printf_buffer +#define __sbuf rb_printf_sbuf +#define __sFILE rb_printf_sfile +#undef feof +#undef ferror +#undef clearerr +#undef fileno +#if SIZEOF_LONG < SIZEOF_VOIDP +# if SIZEOF_LONG_LONG == SIZEOF_VOIDP +# define _HAVE_SANE_QUAD_ +# define _HAVE_LLP64_ +# define quad_t LONG_LONG +# define u_quad_t unsigned LONG_LONG +# endif +#endif +#undef snprintf +#define FLOATING_POINT 1 +#define BSD__dtoa ruby_dtoa +#if _MSC_VER >= 1300 +#pragma warning(disable: 4273) +#endif +#include "missing/vsnprintf.c" +#if _MSC_VER >= 1300 +#pragma warning(default: 4273) +#endif + +static int +ruby__sfvwrite(register rb_printf_buffer *fp, register struct __suio *uio) +{ + struct __siov *iov; + VALUE result = (VALUE)fp->_bf._base; + char *buf = (char*)fp->_p; + size_t len, n; + size_t blen = buf - RSTRING_PTR(result), bsiz = fp->_w; + + if (RBASIC(result)->klass) { + rb_raise(rb_eRuntimeError, "rb_vsprintf reentered"); + } + if ((len = uio->uio_resid) == 0) + return 0; + CHECK(len); + buf += blen; + fp->_w = bsiz; + for (iov = uio->uio_iov; len > 0; ++iov) { + MEMCPY(buf, iov->iov_base, char, n = iov->iov_len); + buf += n; + len -= n; + } + fp->_p = (unsigned char *)buf; + return 0; +} + +VALUE +rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap) +{ + rb_printf_buffer f; + VALUE result; + + f._flags = __SWR | __SSTR; + f._bf._size = 0; + f._w = 120; + result = rb_str_buf_new(f._w); + if (enc) rb_enc_associate(result, enc); + f._bf._base = (unsigned char *)result; + f._p = (unsigned char *)RSTRING_PTR(result); + RBASIC(result)->klass = 0; + f.vwrite = ruby__sfvwrite; + BSD_vfprintf(&f, fmt, ap); + RBASIC(result)->klass = rb_cString; + rb_str_resize(result, (char *)f._p - RSTRING_PTR(result)); + + return result; +} + +VALUE +rb_enc_sprintf(rb_encoding *enc, const char *format, ...) +{ + VALUE result; + va_list ap; + + va_start(ap, format); + result = rb_enc_vsprintf(enc, format, ap); + va_end(ap); + + return result; +} + +VALUE +rb_vsprintf(const char *fmt, va_list ap) +{ + return rb_enc_vsprintf(NULL, fmt, ap); +} + +VALUE +rb_sprintf(const char *format, ...) +{ + VALUE result; + va_list ap; + + va_start(ap, format); + result = rb_vsprintf(format, ap); + va_end(ap); + + return result; +} + +VALUE +rb_str_vcatf(VALUE str, const char *fmt, va_list ap) +{ + rb_printf_buffer f; + VALUE klass; + + StringValue(str); + rb_str_modify(str); + f._flags = __SWR | __SSTR; + f._bf._size = 0; + f._w = rb_str_capacity(str); + f._bf._base = (unsigned char *)str; + f._p = (unsigned char *)RSTRING_END(str); + klass = RBASIC(str)->klass; + RBASIC(str)->klass = 0; + f.vwrite = ruby__sfvwrite; + BSD_vfprintf(&f, fmt, ap); + RBASIC(str)->klass = klass; + rb_str_resize(str, (char *)f._p - RSTRING_PTR(str)); + + return str; +} + +VALUE +rb_str_catf(VALUE str, const char *format, ...) +{ + va_list ap; + + va_start(ap, format); + str = rb_str_vcatf(str, format, ap); + va_end(ap); + + return str; +} diff --git a/lib/ruby-1.9.1-rc1/st.c b/lib/ruby-1.9.1-rc1/st.c new file mode 100644 index 0000000..54e1072 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/st.c @@ -0,0 +1,946 @@ +/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ + +/* static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */ + +#ifdef NOT_RUBY +#include "regint.h" +#include "st.h" +#else +#include "ruby/ruby.h" +#endif + +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#include + +typedef struct st_table_entry st_table_entry; + +struct st_table_entry { + unsigned int hash; + st_data_t key; + st_data_t record; + st_table_entry *next; + st_table_entry *fore, *back; +}; + +#define ST_DEFAULT_MAX_DENSITY 5 +#define ST_DEFAULT_INIT_TABLE_SIZE 11 + + /* + * DEFAULT_MAX_DENSITY is the default for the largest we allow the + * average number of items per bin before increasing the number of + * bins + * + * DEFAULT_INIT_TABLE_SIZE is the default for the number of bins + * allocated initially + * + */ + +static const struct st_hash_type type_numhash = { + st_numcmp, + st_numhash, +}; + +/* extern int strcmp(const char *, const char *); */ +static int strhash(const char *); +static const struct st_hash_type type_strhash = { + strcmp, + strhash, +}; + +static int strcasehash(const char *); +static const struct st_hash_type type_strcasehash = { + st_strcasecmp, + strcasehash, +}; + +static void rehash(st_table *); + +#ifdef RUBY +#define malloc xmalloc +#define calloc xcalloc +#define free(x) xfree(x) +#endif + +#define alloc(type) (type*)malloc((size_t)sizeof(type)) +#define Calloc(n,s) (char*)calloc((n),(s)) + +#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0) + +#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key)) +#define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins) + +/* + * MINSIZE is the minimum size of a dictionary. + */ + +#define MINSIZE 8 + +/* +Table of prime numbers 2^n+a, 2<=n<=30. +*/ +static const long primes[] = { + 8 + 3, + 16 + 3, + 32 + 5, + 64 + 3, + 128 + 3, + 256 + 27, + 512 + 9, + 1024 + 9, + 2048 + 5, + 4096 + 3, + 8192 + 27, + 16384 + 43, + 32768 + 3, + 65536 + 45, + 131072 + 29, + 262144 + 3, + 524288 + 21, + 1048576 + 7, + 2097152 + 17, + 4194304 + 15, + 8388608 + 9, + 16777216 + 43, + 33554432 + 35, + 67108864 + 15, + 134217728 + 29, + 268435456 + 3, + 536870912 + 11, + 1073741824 + 85, + 0 +}; + +static int +new_size(int size) +{ + int i; + +#if 0 + for (i=3; i<31; i++) { + if ((1< size) return 1< size) return primes[i]; + } + /* Ran out of polynomials */ +#ifndef NOT_RUBY + rb_raise(rb_eRuntimeError, "st_table too big"); +#endif + return -1; /* should raise exception */ +#endif +} + +#ifdef HASH_LOG +static int collision = 0; +static int init_st = 0; + +static void +stat_col() +{ + FILE *f = fopen("/tmp/col", "w"); + fprintf(f, "collision: %d\n", collision); + fclose(f); +} +#endif + +#define MAX_PACKED_NUMHASH 5 + +st_table* +st_init_table_with_size(const struct st_hash_type *type, int size) +{ + st_table *tbl; + +#ifdef HASH_LOG + if (init_st == 0) { + init_st = 1; + atexit(stat_col); + } +#endif + + size = new_size(size); /* round up to prime number */ + + tbl = alloc(st_table); + tbl->type = type; + tbl->num_entries = 0; + tbl->entries_packed = type == &type_numhash && size/2 <= MAX_PACKED_NUMHASH; + tbl->num_bins = size; + tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*)); + tbl->head = 0; + + return tbl; +} + +st_table* +st_init_table(const struct st_hash_type *type) +{ + return st_init_table_with_size(type, 0); +} + +st_table* +st_init_numtable(void) +{ + return st_init_table(&type_numhash); +} + +st_table* +st_init_numtable_with_size(int size) +{ + return st_init_table_with_size(&type_numhash, size); +} + +st_table* +st_init_strtable(void) +{ + return st_init_table(&type_strhash); +} + +st_table* +st_init_strtable_with_size(int size) +{ + return st_init_table_with_size(&type_strhash, size); +} + +st_table* +st_init_strcasetable(void) +{ + return st_init_table(&type_strcasehash); +} + +st_table* +st_init_strcasetable_with_size(int size) +{ + return st_init_table_with_size(&type_strcasehash, size); +} + +void +st_clear(st_table *table) +{ + register st_table_entry *ptr, *next; + int i; + + if (table->entries_packed) { + table->num_entries = 0; + return; + } + + for(i = 0; i < table->num_bins; i++) { + ptr = table->bins[i]; + table->bins[i] = 0; + while (ptr != 0) { + next = ptr->next; + free(ptr); + ptr = next; + } + } + table->num_entries = 0; + table->head = 0; +} + +void +st_free_table(st_table *table) +{ + st_clear(table); + free(table->bins); + free(table); +} + +#define PTR_NOT_EQUAL(table, ptr, hash_val, key) \ +((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key))) + +#ifdef HASH_LOG +#define COLLISION collision++ +#else +#define COLLISION +#endif + +#define FIND_ENTRY(table, ptr, hash_val, bin_pos) do {\ + bin_pos = hash_val%(table)->num_bins;\ + ptr = (table)->bins[bin_pos];\ + if (PTR_NOT_EQUAL(table, ptr, hash_val, key)) {\ + COLLISION;\ + while (PTR_NOT_EQUAL(table, ptr->next, hash_val, key)) {\ + ptr = ptr->next;\ + }\ + ptr = ptr->next;\ + }\ +} while (0) + +int +st_lookup(st_table *table, register st_data_t key, st_data_t *value) +{ + unsigned int hash_val, bin_pos; + register st_table_entry *ptr; + + if (table->entries_packed) { + int i; + for (i = 0; i < table->num_entries; i++) { + if ((st_data_t)table->bins[i*2] == key) { + if (value !=0) *value = (st_data_t)table->bins[i*2+1]; + return 1; + } + } + return 0; + } + + hash_val = do_hash(key, table); + FIND_ENTRY(table, ptr, hash_val, bin_pos); + + if (ptr == 0) { + return 0; + } + else { + if (value != 0) *value = ptr->record; + return 1; + } +} + +int +st_get_key(st_table *table, register st_data_t key, st_data_t *result) +{ + unsigned int hash_val, bin_pos; + register st_table_entry *ptr; + + if (table->entries_packed) { + int i; + for (i = 0; i < table->num_entries; i++) { + if ((st_data_t)table->bins[i*2] == key) { + if (result !=0) *result = (st_data_t)table->bins[i*2]; + return 1; + } + } + return 0; + } + + hash_val = do_hash(key, table); + FIND_ENTRY(table, ptr, hash_val, bin_pos); + + if (ptr == 0) { + return 0; + } + else { + if (result != 0) *result = ptr->key; + return 1; + } +} + +#define ADD_DIRECT(table, key, value, hash_val, bin_pos)\ +do {\ + st_table_entry *entry, *head;\ + if (table->num_entries/(table->num_bins) > ST_DEFAULT_MAX_DENSITY) {\ + rehash(table);\ + bin_pos = hash_val % table->num_bins;\ + }\ + \ + entry = alloc(st_table_entry);\ + \ + entry->hash = hash_val;\ + entry->key = key;\ + entry->record = value;\ + entry->next = table->bins[bin_pos];\ + if ((head = table->head) != 0) {\ + entry->fore = head;\ + (entry->back = head->back)->fore = entry;\ + head->back = entry;\ + }\ + else {\ + table->head = entry->fore = entry->back = entry;\ + }\ + table->bins[bin_pos] = entry;\ + table->num_entries++;\ +} while (0) + +static void +unpack_entries(register st_table *table) +{ + int i; + struct st_table_entry *packed_bins[MAX_PACKED_NUMHASH*2]; + int num_entries = table->num_entries; + + memcpy(packed_bins, table->bins, sizeof(struct st_table_entry *) * num_entries*2); + table->entries_packed = 0; + table->num_entries = 0; + memset(table->bins, 0, sizeof(struct st_table_entry *) * table->num_bins); + for (i = 0; i < num_entries; i++) { + st_insert(table, (st_data_t)packed_bins[i*2], (st_data_t)packed_bins[i*2+1]); + } +} + +int +st_insert(register st_table *table, register st_data_t key, st_data_t value) +{ + unsigned int hash_val, bin_pos; + register st_table_entry *ptr; + + if (table->entries_packed) { + int i; + for (i = 0; i < table->num_entries; i++) { + if ((st_data_t)table->bins[i*2] == key) { + table->bins[i*2+1] = (struct st_table_entry*)value; + return 1; + } + } + if ((table->num_entries+1) * 2 <= table->num_bins && table->num_entries+1 <= MAX_PACKED_NUMHASH) { + i = table->num_entries++; + table->bins[i*2] = (struct st_table_entry*)key; + table->bins[i*2+1] = (struct st_table_entry*)value; + return 0; + } + else { + unpack_entries(table); + } + } + + hash_val = do_hash(key, table); + FIND_ENTRY(table, ptr, hash_val, bin_pos); + + if (ptr == 0) { + ADD_DIRECT(table, key, value, hash_val, bin_pos); + return 0; + } + else { + ptr->record = value; + return 1; + } +} + +void +st_add_direct(st_table *table, st_data_t key, st_data_t value) +{ + unsigned int hash_val, bin_pos; + + if (table->entries_packed) { + int i; + if ((table->num_entries+1) * 2 <= table->num_bins && table->num_entries+1 <= MAX_PACKED_NUMHASH) { + i = table->num_entries++; + table->bins[i*2] = (struct st_table_entry*)key; + table->bins[i*2+1] = (struct st_table_entry*)value; + return; + } + else { + unpack_entries(table); + } + } + + hash_val = do_hash(key, table); + bin_pos = hash_val % table->num_bins; + ADD_DIRECT(table, key, value, hash_val, bin_pos); +} + +static void +rehash(register st_table *table) +{ + register st_table_entry *ptr, **new_bins; + int i, new_num_bins; + unsigned int hash_val; + + new_num_bins = new_size(table->num_bins+1); + new_bins = (st_table_entry**) + xrealloc(table->bins, new_num_bins * sizeof(st_table_entry*)); + for (i = 0; i < new_num_bins; ++i) new_bins[i] = 0; + table->num_bins = new_num_bins; + table->bins = new_bins; + + if ((ptr = table->head) != 0) { + do { + hash_val = ptr->hash % new_num_bins; + ptr->next = new_bins[hash_val]; + new_bins[hash_val] = ptr; + } while ((ptr = ptr->fore) != table->head); + } +} + +st_table* +st_copy(st_table *old_table) +{ + st_table *new_table; + st_table_entry *ptr, *entry, *prev, **tail; + int num_bins = old_table->num_bins; + unsigned int hash_val; + + new_table = alloc(st_table); + if (new_table == 0) { + return 0; + } + + *new_table = *old_table; + new_table->bins = (st_table_entry**) + Calloc((unsigned)num_bins, sizeof(st_table_entry*)); + + if (new_table->bins == 0) { + free(new_table); + return 0; + } + + if (old_table->entries_packed) { + memcpy(new_table->bins, old_table->bins, sizeof(struct st_table_entry *) * old_table->num_bins); + return new_table; + } + + if ((ptr = old_table->head) != 0) { + prev = 0; + tail = &new_table->head; + do { + entry = alloc(st_table_entry); + if (entry == 0) { + st_free_table(new_table); + return 0; + } + *entry = *ptr; + hash_val = entry->hash % num_bins; + entry->next = new_table->bins[hash_val]; + new_table->bins[hash_val] = entry; + entry->back = prev; + *tail = prev = entry; + tail = &entry->fore; + } while ((ptr = ptr->fore) != old_table->head); + entry = new_table->head; + entry->back = prev; + *tail = entry; + } + + return new_table; +} + +#define REMOVE_ENTRY(table, ptr) do \ + { \ + if (ptr == ptr->fore) { \ + table->head = 0; \ + } \ + else { \ + st_table_entry *fore = ptr->fore, *back = ptr->back; \ + fore->back = back; \ + back->fore = fore; \ + if (ptr == table->head) table->head = fore; \ + } \ + table->num_entries--; \ + } while (0) + +int +st_delete(register st_table *table, register st_data_t *key, st_data_t *value) +{ + unsigned int hash_val; + st_table_entry **prev; + register st_table_entry *ptr; + + if (table->entries_packed) { + int i; + for (i = 0; i < table->num_entries; i++) { + if ((st_data_t)table->bins[i*2] == *key) { + if (value != 0) *value = (st_data_t)table->bins[i*2+1]; + table->num_entries--; + memmove(&table->bins[i*2], &table->bins[(i+1)*2], + sizeof(struct st_table_entry*) * 2*(table->num_entries-i)); + return 1; + } + } + if (value != 0) *value = 0; + return 0; + } + + hash_val = do_hash_bin(*key, table); + + for (prev = &table->bins[hash_val]; (ptr = *prev) != 0; prev = &ptr->next) { + if (EQUAL(table, *key, ptr->key)) { + *prev = ptr->next; + REMOVE_ENTRY(table, ptr); + if (value != 0) *value = ptr->record; + *key = ptr->key; + free(ptr); + return 1; + } + } + + if (value != 0) *value = 0; + return 0; +} + +int +st_delete_safe(register st_table *table, register st_data_t *key, st_data_t *value, st_data_t never) +{ + unsigned int hash_val; + register st_table_entry *ptr; + + hash_val = do_hash_bin(*key, table); + ptr = table->bins[hash_val]; + + for (; ptr != 0; ptr = ptr->next) { + if ((ptr->key != never) && EQUAL(table, ptr->key, *key)) { + REMOVE_ENTRY(table, ptr); + *key = ptr->key; + if (value != 0) *value = ptr->record; + ptr->key = ptr->record = never; + return 1; + } + } + + if (value != 0) *value = 0; + return 0; +} + +void +st_cleanup_safe(st_table *table, st_data_t never) +{ + st_table_entry *ptr, **last, *tmp; + int i; + + for (i = 0; i < table->num_bins; i++) { + ptr = *(last = &table->bins[i]); + while (ptr != 0) { + if (ptr->key == never) { + tmp = ptr; + *last = ptr = ptr->next; + free(tmp); + } + else { + ptr = *(last = &ptr->next); + } + } + } +} + +int +st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) +{ + st_table_entry *ptr, **last, *tmp; + enum st_retval retval; + int i, end; + + if (table->entries_packed) { + for (i = 0; i < table->num_entries; i++) { + int j; + st_data_t key, val; + key = (st_data_t)table->bins[i*2]; + val = (st_data_t)table->bins[i*2+1]; + retval = (*func)(key, val, arg); + switch (retval) { + case ST_CHECK: /* check if hash is modified during iteration */ + for (j = 0; j < table->num_entries; j++) { + if ((st_data_t)table->bins[j*2] == key) + break; + } + if (j == table->num_entries) { + /* call func with error notice */ + retval = (*func)(0, 0, arg, 1); + return 1; + } + /* fall through */ + case ST_CONTINUE: + break; + case ST_STOP: + return 0; + case ST_DELETE: + table->num_entries--; + memmove(&table->bins[i*2], &table->bins[(i+1)*2], + sizeof(struct st_table_entry*) * 2*(table->num_entries-i)); + i--; + break; + } + } + return 0; + } + + if ((ptr = table->head) != 0) { + do { + end = ptr->fore == table->head; + retval = (*func)(ptr->key, ptr->record, arg); + switch (retval) { + case ST_CHECK: /* check if hash is modified during iteration */ + i = ptr->hash % table->num_bins; + for (tmp = table->bins[i]; tmp != ptr; tmp = tmp->next) { + if (!tmp) { + /* call func with error notice */ + retval = (*func)(0, 0, arg, 1); + return 1; + } + } + /* fall through */ + case ST_CONTINUE: + ptr = ptr->fore; + break; + case ST_STOP: + return 0; + case ST_DELETE: + last = &table->bins[ptr->hash % table->num_bins]; + for (; (tmp = *last) != 0; last = &tmp->next) { + if (ptr == tmp) { + tmp = ptr->fore; + *last = ptr->next; + REMOVE_ENTRY(table, ptr); + free(ptr); + if (ptr == tmp) return 0; + ptr = tmp; + break; + } + } + } + } while (!end && table->head); + } + return 0; +} + +#if 0 /* unused right now */ +int +st_reverse_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) +{ + st_table_entry *ptr, **last, *tmp; + enum st_retval retval; + int i, end; + + if (table->entries_packed) { + for (i = table->num_entries-1; 0 <= i; i--) { + int j; + st_data_t key, val; + key = (st_data_t)table->bins[i*2]; + val = (st_data_t)table->bins[i*2+1]; + retval = (*func)(key, val, arg); + switch (retval) { + case ST_CHECK: /* check if hash is modified during iteration */ + for (j = 0; j < table->num_entries; j++) { + if ((st_data_t)table->bins[j*2] == key) + break; + } + if (j == table->num_entries) { + /* call func with error notice */ + retval = (*func)(0, 0, arg, 1); + return 1; + } + /* fall through */ + case ST_CONTINUE: + break; + case ST_STOP: + return 0; + case ST_DELETE: + table->num_entries--; + memmove(&table->bins[i*2], &table->bins[(i+1)*2], + sizeof(struct st_table_entry*) * 2*(table->num_entries-i)); + break; + } + } + return 0; + } + + if ((ptr = table->head) != 0) { + ptr = ptr->back; + do { + end = ptr == table->head; + retval = (*func)(ptr->key, ptr->record, arg, 0); + switch (retval) { + case ST_CHECK: /* check if hash is modified during iteration */ + i = ptr->hash % table->num_bins; + for (tmp = table->bins[i]; tmp != ptr; tmp = tmp->next) { + if (!tmp) { + /* call func with error notice */ + retval = (*func)(0, 0, arg, 1); + return 1; + } + } + /* fall through */ + case ST_CONTINUE: + ptr = ptr->back; + break; + case ST_STOP: + return 0; + case ST_DELETE: + last = &table->bins[ptr->hash % table->num_bins]; + for (; (tmp = *last) != 0; last = &tmp->next) { + if (ptr == tmp) { + tmp = ptr->back; + *last = ptr->next; + REMOVE_ENTRY(table, ptr); + free(ptr); + ptr = tmp; + break; + } + } + ptr = ptr->next; + free(tmp); + table->num_entries--; + } + } while (!end && table->head); + } + return 0; +} +#endif + +/* + * hash_32 - 32 bit Fowler/Noll/Vo FNV-1a hash code + * + * @(#) $Hash32: Revision: 1.1 $ + * @(#) $Hash32: Id: hash_32a.c,v 1.1 2003/10/03 20:38:53 chongo Exp $ + * @(#) $Hash32: Source: /usr/local/src/cmd/fnv/RCS/hash_32a.c,v $ + * + *** + * + * Fowler/Noll/Vo hash + * + * The basis of this hash algorithm was taken from an idea sent + * as reviewer comments to the IEEE POSIX P1003.2 committee by: + * + * Phong Vo (http://www.research.att.com/info/kpv/) + * Glenn Fowler (http://www.research.att.com/~gsf/) + * + * In a subsequent ballot round: + * + * Landon Curt Noll (http://www.isthe.com/chongo/) + * + * improved on their algorithm. Some people tried this hash + * and found that it worked rather well. In an EMail message + * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash. + * + * FNV hashes are designed to be fast while maintaining a low + * collision rate. The FNV speed allows one to quickly hash lots + * of data while maintaining a reasonable collision rate. See: + * + * http://www.isthe.com/chongo/tech/comp/fnv/index.html + * + * for more details as well as other forms of the FNV hash. + *** + * + * To use the recommended 32 bit FNV-1a hash, pass FNV1_32A_INIT as the + * Fnv32_t hashval argument to fnv_32a_buf() or fnv_32a_str(). + * + *** + * + * Please do not copyright this code. This code is in the public domain. + * + * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO + * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * By: + * chongo /\oo/\ + * http://www.isthe.com/chongo/ + * + * Share and Enjoy! :-) + */ + +/* + * 32 bit FNV-1 and FNV-1a non-zero initial basis + * + * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets: + * + * chongo /\../\ + * + * NOTE: The \'s above are not back-slashing escape characters. + * They are literal ASCII backslash 0x5c characters. + * + * NOTE: The FNV-1a initial basis is the same value as FNV-1 by definition. + */ +#define FNV1_32A_INIT 0x811c9dc5 + +/* + * 32 bit magic FNV-1a prime + */ +#define FNV_32_PRIME 0x01000193 + +static int +strhash(register const char *string) +{ + register unsigned int hval = FNV1_32A_INIT; + + /* + * FNV-1a hash each octet in the buffer + */ + while (*string) { + /* xor the bottom with the current octet */ + hval ^= (unsigned int)*string++; + + /* multiply by the 32 bit FNV magic prime mod 2^32 */ + hval *= FNV_32_PRIME; + } + return hval; +} + +int +st_strcasecmp(const char *s1, const char *s2) +{ + unsigned int c1, c2; + + while (1) { + c1 = (unsigned char)*s1++; + c2 = (unsigned char)*s2++; + if (c1 == '\0' || c2 == '\0') { + if (c1 != '\0') return 1; + if (c2 != '\0') return -1; + return 0; + } + if ((unsigned int)(c1 - 'A') <= ('Z' - 'A')) c1 += 'a' - 'A'; + if ((unsigned int)(c2 - 'A') <= ('Z' - 'A')) c2 += 'a' - 'A'; + if (c1 != c2) { + if (c1 > c2) + return 1; + else + return -1; + } + } +} + +int +st_strncasecmp(const char *s1, const char *s2, size_t n) +{ + unsigned int c1, c2; + + while (n--) { + c1 = (unsigned char)*s1++; + c2 = (unsigned char)*s2++; + if (c1 == '\0' || c2 == '\0') { + if (c1 != '\0') return 1; + if (c2 != '\0') return -1; + return 0; + } + if ((unsigned int)(c1 - 'A') <= ('Z' - 'A')) c1 += 'a' - 'A'; + if ((unsigned int)(c2 - 'A') <= ('Z' - 'A')) c2 += 'a' - 'A'; + if (c1 != c2) { + if (c1 > c2) + return 1; + else + return -1; + } + } + return 0; +} + +static int +strcasehash(register const char *string) +{ + register unsigned int hval = FNV1_32A_INIT; + + /* + * FNV-1a hash each octet in the buffer + */ + while (*string) { + unsigned int c = (unsigned char)*string++; + if ((unsigned int)(c - 'A') <= ('Z' - 'A')) c += 'a' - 'A'; + hval ^= c; + + /* multiply by the 32 bit FNV magic prime mod 2^32 */ + hval *= FNV_32_PRIME; + } + return hval; +} + +int +st_numcmp(st_data_t x, st_data_t y) +{ + return x != y; +} + +int +st_numhash(st_data_t n) +{ + return (int)n; +} diff --git a/lib/ruby-1.9.1-rc1/strftime.c b/lib/ruby-1.9.1-rc1/strftime.c new file mode 100644 index 0000000..38167fd --- /dev/null +++ b/lib/ruby-1.9.1-rc1/strftime.c @@ -0,0 +1,1108 @@ +/* -*- c-file-style: "linux" -*- */ + +/* + * strftime.c + * + * Public-domain implementation of ANSI C library routine. + * + * It's written in old-style C for maximal portability. + * However, since I'm used to prototypes, I've included them too. + * + * If you want stuff in the System V ascftime routine, add the SYSV_EXT define. + * For extensions from SunOS, add SUNOS_EXT. + * For stuff needed to implement the P1003.2 date command, add POSIX2_DATE. + * For VMS dates, add VMS_EXT. + * For a an RFC822 time format, add MAILHEADER_EXT. + * For ISO week years, add ISO_DATE_EXT. + * For complete POSIX semantics, add POSIX_SEMANTICS. + * + * The code for %c, %x, and %X now follows the 1003.2 specification for + * the POSIX locale. + * This version ignores LOCALE information. + * It also doesn't worry about multi-byte characters. + * So there. + * + * This file is also shipped with GAWK (GNU Awk), gawk specific bits of + * code are included if GAWK is defined. + * + * Arnold Robbins + * January, February, March, 1991 + * Updated March, April 1992 + * Updated April, 1993 + * Updated February, 1994 + * Updated May, 1994 + * Updated January, 1995 + * Updated September, 1995 + * Updated January, 1996 + * + * Fixes from ado@elsie.nci.nih.gov + * February 1991, May 1992 + * Fixes from Tor Lillqvist tml@tik.vtt.fi + * May, 1993 + * Further fixes from ado@elsie.nci.nih.gov + * February 1994 + * %z code from chip@chinacat.unicom.com + * Applied September 1995 + * %V code fixed (again) and %G, %g added, + * January 1996 + */ + +#include "ruby/ruby.h" + +#ifndef GAWK +#include +#include +#include +#include +#include +#include +#endif +#if defined(TM_IN_SYS_TIME) || !defined(GAWK) +#include +#if HAVE_SYS_TIME_H +#include +#endif +#endif +#include + +/* defaults: season to taste */ +#define SYSV_EXT 1 /* stuff in System V ascftime routine */ +#define SUNOS_EXT 1 /* stuff in SunOS strftime routine */ +#define POSIX2_DATE 1 /* stuff in Posix 1003.2 date command */ +#define VMS_EXT 1 /* include %v for VMS date format */ +#define MAILHEADER_EXT 1 /* add %z for HHMM format */ +#define ISO_DATE_EXT 1 /* %G and %g for year of ISO week */ +#ifndef GAWK +#define POSIX_SEMANTICS 1 /* call tzset() if TZ changes */ +#endif + +#if defined(ISO_DATE_EXT) +#if ! defined(POSIX2_DATE) +#define POSIX2_DATE 1 +#endif +#endif + +#if defined(POSIX2_DATE) +#if ! defined(SYSV_EXT) +#define SYSV_EXT 1 +#endif +#if ! defined(SUNOS_EXT) +#define SUNOS_EXT 1 +#endif +#endif + +#if defined(POSIX2_DATE) +#define adddecl(stuff) stuff +#else +#define adddecl(stuff) +#endif + +#undef strchr /* avoid AIX weirdness */ + +#if !defined __STDC__ && !defined _WIN32 +#define const /**/ +static int weeknumber(); +adddecl(static int iso8601wknum();) +#else +static int weeknumber(const struct tm *timeptr, int firstweekday); +adddecl(static int iso8601wknum(const struct tm *timeptr);) +#endif + +#ifdef STDC_HEADERS +#include +#include +#else +extern void *malloc(); +extern void *realloc(); +extern char *getenv(); +extern char *strchr(); +#endif + +#define range(low, item, hi) max(low, min(item, hi)) + +#if defined __WIN32__ || defined _WIN32 +#define DLL_IMPORT __declspec(dllimport) +#endif +#ifndef DLL_IMPORT +#define DLL_IMPORT +#endif +#if !defined(OS2) && defined(HAVE_TZNAME) +extern DLL_IMPORT char *tzname[2]; +#ifdef HAVE_DAYLIGHT +extern DLL_IMPORT int daylight; +#endif +#ifdef HAVE_VAR_TIMEZONE +extern DLL_IMPORT TYPEOF_VAR_TIMEZONE timezone; +#endif +#ifdef HAVE_VAR_ALTZONE +extern DLL_IMPORT TYPEOF_VAR_ALTZONE altzone; +#endif +#endif + +#undef min /* just in case */ + +/* min --- return minimum of two numbers */ + +#ifndef __STDC__ +static inline int +min(a, b) +int a, b; +#else +static inline int +min(int a, int b) +#endif +{ + return (a < b ? a : b); +} + +#undef max /* also, just in case */ + +/* max --- return maximum of two numbers */ + +#ifndef __STDC__ +static inline int +max(a, b) +int a, b; +#else +static inline int +max(int a, int b) +#endif +{ + return (a > b ? a : b); +} + +#ifdef NO_STRING_LITERAL_CONCATENATION +#error No string literal concatenation +#endif + +/* strftime --- produce formatted time */ + +size_t +rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr, const struct timespec *ts, int gmt) +{ + char *endp = s + maxsize; + char *start = s; + const char *sp, *tp; + auto char tbuf[100]; + long off; + int i, w; + long y; + static short first = 1; +#ifdef POSIX_SEMANTICS + static char *savetz = NULL; + static int savetzlen = 0; + char *tz; +#endif /* POSIX_SEMANTICS */ +#ifndef HAVE_TM_ZONE +#ifndef HAVE_TM_NAME +#if ((defined(MAILHEADER_EXT) && !HAVE_VAR_TIMEZONE && HAVE_GETTIMEOFDAY) || \ + (!HAVE_TZNAME && HAVE_TIMEZONE)) + struct timeval tv; + struct timezone zone; +#endif +#endif /* HAVE_TM_NAME */ +#endif /* HAVE_TM_ZONE */ + int precision, flags; + char padding; + enum {LEFT, CHCASE, LOWER, UPPER, LOCALE_O, LOCALE_E}; +#define BIT_OF(n) (1U<<(n)) + + /* various tables, useful in North America */ + static const char days_l[][10] = { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday", + }; + static const char months_l[][10] = { + "January", "February", "March", "April", + "May", "June", "July", "August", "September", + "October", "November", "December", + }; + static const char ampm[][3] = { "AM", "PM", }; + + if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0) + return 0; + + /* quick check if we even need to bother */ + if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize) { + err: + errno = ERANGE; + return 0; + } + +#ifndef POSIX_SEMANTICS + if (first) { + tzset(); + first = 0; + } +#else /* POSIX_SEMANTICS */ + tz = getenv("TZ"); + if (first) { + if (tz != NULL) { + int tzlen = strlen(tz); + + savetz = (char *) malloc(tzlen + 1); + if (savetz != NULL) { + savetzlen = tzlen + 1; + strcpy(savetz, tz); + } + } + tzset(); + first = 0; + } + /* if we have a saved TZ, and it is different, recapture and reset */ + if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) { + i = strlen(tz) + 1; + if (i > savetzlen) { + savetz = (char *) realloc(savetz, i); + if (savetz) { + savetzlen = i; + strcpy(savetz, tz); + } + } else + strcpy(savetz, tz); + tzset(); + } +#endif /* POSIX_SEMANTICS */ + + for (; *format && s < endp - 1; format++) { +#define FLAG_FOUND() do { \ + if (precision > 0 || flags & (BIT_OF(LOCALE_E)|BIT_OF(LOCALE_O))) \ + goto unknown; \ + } while (0) +#define NEEDS(n) do if (s + (n) >= endp - 1) goto err; while (0) +#define FILL_PADDING(i) do { \ + if (!(flags & BIT_OF(LEFT)) && precision > i) { \ + NEEDS(precision); \ + memset(s, padding ? padding : ' ', precision - i); \ + s += precision - i; \ + } \ + else { \ + NEEDS(i); \ + } \ +} while (0); +#define FMT(def_pad, def_prec, fmt, val) \ + do { \ + int l; \ + if (precision <= 0) precision = (def_prec); \ + if (flags & BIT_OF(LEFT)) precision = 1; \ + l = snprintf(s, endp - s, \ + ((padding == '0' || (!padding && def_pad == '0')) ? "%0*"fmt : "%*"fmt), \ + precision, val); \ + if (l < 0) goto err; \ + s += l; \ + } while (0) +#define STRFTIME(fmt) \ + do { \ + i = rb_strftime(s, endp - s, fmt, timeptr, ts, gmt); \ + if (!i) return 0; \ + if (precision > i) {\ + memmove(s + precision - i, s, i);\ + memset(s, padding ? padding : ' ', precision - i); \ + s += precision; \ + }\ + else s += i; \ + } while (0) + + if (*format != '%') { + *s++ = *format; + continue; + } + tp = tbuf; + sp = format; + precision = -1; + flags = 0; + padding = 0; + again: + switch (*++format) { + case '\0': + format--; + goto unknown; + + case '%': + FILL_PADDING(1); + *s++ = '%'; + continue; + + case 'a': /* abbreviated weekday name */ + if (flags & BIT_OF(CHCASE)) { + flags &= ~(BIT_OF(LOWER)|BIT_OF(CHCASE)); + flags |= BIT_OF(UPPER); + } + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + i = 1, tp = "?"; + else + i = 3, tp = days_l[timeptr->tm_wday]; + break; + + case 'A': /* full weekday name */ + if (flags & BIT_OF(CHCASE)) { + flags &= ~(BIT_OF(LOWER)|BIT_OF(CHCASE)); + flags |= BIT_OF(UPPER); + } + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + i = 1, tp = "?"; + else + i = strlen(tp = days_l[timeptr->tm_wday]); + break; + +#ifdef SYSV_EXT + case 'h': /* abbreviated month name */ +#endif + case 'b': /* abbreviated month name */ + if (flags & BIT_OF(CHCASE)) { + flags &= ~(BIT_OF(LOWER)|BIT_OF(CHCASE)); + flags |= BIT_OF(UPPER); + } + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + i = 1, tp = "?"; + else + i = 3, tp = months_l[timeptr->tm_mon]; + break; + + case 'B': /* full month name */ + if (flags & BIT_OF(CHCASE)) { + flags &= ~(BIT_OF(LOWER)|BIT_OF(CHCASE)); + flags |= BIT_OF(UPPER); + } + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + i = 1, tp = "?"; + else + i = strlen(tp = months_l[timeptr->tm_mon]); + break; + + case 'c': /* appropriate date and time representation */ + STRFTIME("%a %b %e %H:%M:%S %Y"); + continue; + + case 'd': /* day of the month, 01 - 31 */ + i = range(1, timeptr->tm_mday, 31); + FMT('0', 2, "d", i); + continue; + + case 'H': /* hour, 24-hour clock, 00 - 23 */ + i = range(0, timeptr->tm_hour, 23); + FMT('0', 2, "d", i); + continue; + + case 'I': /* hour, 12-hour clock, 01 - 12 */ + i = range(0, timeptr->tm_hour, 23); + if (i == 0) + i = 12; + else if (i > 12) + i -= 12; + FMT('0', 2, "d", i); + continue; + + case 'j': /* day of the year, 001 - 366 */ + FMT('0', 3, "d", timeptr->tm_yday + 1); + continue; + + case 'm': /* month, 01 - 12 */ + i = range(0, timeptr->tm_mon, 11); + FMT('0', 2, "d", i + 1); + continue; + + case 'M': /* minute, 00 - 59 */ + i = range(0, timeptr->tm_min, 59); + FMT('0', 2, "d", i); + continue; + + case 'p': /* AM or PM based on 12-hour clock */ + case 'P': /* am or pm based on 12-hour clock */ + if ((*format == 'p' && (flags & BIT_OF(CHCASE))) || + (*format == 'P' && !(flags & (BIT_OF(CHCASE)|BIT_OF(UPPER))))) { + flags &= ~(BIT_OF(UPPER)|BIT_OF(CHCASE)); + flags |= BIT_OF(LOWER); + } + i = range(0, timeptr->tm_hour, 23); + if (i < 12) + tp = ampm[0]; + else + tp = ampm[1]; + i = 2; + break; + + case 's': + FMT('0', 1, "d", (int) ts->tv_sec); + continue; + + case 'S': /* second, 00 - 60 */ + i = range(0, timeptr->tm_sec, 60); + FMT('0', 2, "d", i); + continue; + + case 'U': /* week of year, Sunday is first day of week */ + FMT('0', 2, "d", weeknumber(timeptr, 0)); + continue; + + case 'w': /* weekday, Sunday == 0, 0 - 6 */ + i = range(0, timeptr->tm_wday, 6); + FMT('0', 1, "d", i); + continue; + + case 'W': /* week of year, Monday is first day of week */ + FMT('0', 2, "d", weeknumber(timeptr, 1)); + continue; + + case 'x': /* appropriate date representation */ + STRFTIME("%m/%d/%y"); + continue; + + case 'X': /* appropriate time representation */ + STRFTIME("%H:%M:%S"); + continue; + + case 'y': /* year without a century, 00 - 99 */ + i = timeptr->tm_year % 100; + FMT('0', 2, "d", i); + continue; + + case 'Y': /* year with century */ + FMT('0', 1, "ld", 1900L + timeptr->tm_year); + continue; + +#ifdef MAILHEADER_EXT + /* + * From: Chip Rosenthal + * Date: Sun, 19 Mar 1995 00:33:29 -0600 (CST) + * + * Warning: the %z [code] is implemented by inspecting the + * timezone name conditional compile settings, and + * inferring a method to get timezone offsets. I've tried + * this code on a couple of machines, but I don't doubt + * there is some system out there that won't like it. + * Maybe the easiest thing to do would be to bracket this + * with an #ifdef that can turn it off. The %z feature + * would be an admittedly obscure one that most folks can + * live without, but it would be a great help to those of + * us that muck around with various message processors. + */ + case 'z': /* time zone offset east of GMT e.g. -0600 */ + if (precision < 4) precision = 4; + NEEDS(precision + 1); + if (gmt) { + off = 0; + } + else { +#ifdef HAVE_TM_NAME + /* + * Systems with tm_name probably have tm_tzadj as + * secs west of GMT. Convert to mins east of GMT. + */ + off = -timeptr->tm_tzadj / 60; +#else /* !HAVE_TM_NAME */ +#ifdef HAVE_TM_ZONE + /* + * Systems with tm_zone probably have tm_gmtoff as + * secs east of GMT. Convert to mins east of GMT. + */ + off = timeptr->tm_gmtoff / 60; +#else /* !HAVE_TM_ZONE */ +#if HAVE_VAR_TIMEZONE +#if HAVE_VAR_ALTZONE + off = -(daylight ? timezone : altzone) / 60; +#else + off = -timezone / 60; +#endif +#else /* !HAVE_VAR_TIMEZONE */ +#ifdef HAVE_GETTIMEOFDAY + gettimeofday(&tv, &zone); + off = -zone.tz_minuteswest; +#else + /* no timezone info, then calc by myself */ + { + struct tm utc; + time_t now; + time(&now); + utc = *gmtime(&now); + off = (now - mktime(&utc)) / 60; + } +#endif +#endif /* !HAVE_VAR_TIMEZONE */ +#endif /* !HAVE_TM_ZONE */ +#endif /* !HAVE_TM_NAME */ + } + if (off < 0) { + off = -off; + *s++ = '-'; + } else { + *s++ = '+'; + } + off = off/60*100 + off%60; + i = snprintf(s, endp - s, (padding == ' ' ? "%*ld" : "%.*ld"), + precision - (precision > 4), off); + if (i < 0) goto err; + s += i; + continue; +#endif /* MAILHEADER_EXT */ + + case 'Z': /* time zone name or abbrevation */ + if (flags & BIT_OF(CHCASE)) { + flags &= ~(BIT_OF(UPPER)|BIT_OF(CHCASE)); + flags |= BIT_OF(LOWER); + } + if (gmt) { + i = 3; + tp = "UTC"; + break; + } +#ifdef HAVE_TZNAME + i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */ + tp = tzname[i]; +#else +#ifdef HAVE_TM_ZONE + tp = timeptr->tm_zone; +#else +#ifdef HAVE_TM_NAME + tp = timeptr->tm_name; +#else +#ifdef HAVE_TIMEZONE + gettimeofday(& tv, & zone); +#ifdef TIMEZONE_VOID + tp = timezone(); +#else + tp = timezone(zone.tz_minuteswest, timeptr->tm_isdst > 0); +#endif /* TIMEZONE_VOID */ +#endif /* HAVE_TIMEZONE */ +#endif /* HAVE_TM_NAME */ +#endif /* HAVE_TM_ZONE */ +#endif /* HAVE_TZNAME */ + i = strlen(tp); + break; + +#ifdef SYSV_EXT + case 'n': /* same as \n */ + FILL_PADDING(1); + *s++ = '\n'; + continue; + + case 't': /* same as \t */ + FILL_PADDING(1); + *s++ = '\t'; + continue; + + case 'D': /* date as %m/%d/%y */ + STRFTIME("%m/%d/%y"); + continue; + + case 'e': /* day of month, blank padded */ + FMT(' ', 2, "d", range(1, timeptr->tm_mday, 31)); + continue; + + case 'r': /* time as %I:%M:%S %p */ + STRFTIME("%I:%M:%S %p"); + continue; + + case 'R': /* time as %H:%M */ + STRFTIME("%H:%M"); + continue; + + case 'T': /* time as %H:%M:%S */ + STRFTIME("%H:%M:%S"); + continue; +#endif + +#ifdef SUNOS_EXT + case 'k': /* hour, 24-hour clock, blank pad */ + i = range(0, timeptr->tm_hour, 23); + FMT(' ', 2, "d", i); + continue; + + case 'l': /* hour, 12-hour clock, 1 - 12, blank pad */ + i = range(0, timeptr->tm_hour, 23); + if (i == 0) + i = 12; + else if (i > 12) + i -= 12; + FMT(' ', 2, "d", i); + continue; +#endif + + +#ifdef VMS_EXT + case 'v': /* date as dd-bbb-YYYY */ + w = snprintf(s, endp - s, "%2d-%3.3s-%4ld", + range(1, timeptr->tm_mday, 31), + months_l[range(0, timeptr->tm_mon, 11)], + timeptr->tm_year + 1900L); + if (w < 0) goto err; + for (i = 3; i < 6; i++) + if (ISLOWER(s[i])) + s[i] = TOUPPER(s[i]); + s += w; + continue; +#endif + + +#ifdef POSIX2_DATE + case 'C': + FMT('0', 2, "ld", (timeptr->tm_year + 1900L) / 100); + continue; + + + case 'E': + /* POSIX locale extensions, ignored for now */ + flags |= BIT_OF(LOCALE_E); + goto again; + case 'O': + /* POSIX locale extensions, ignored for now */ + flags |= BIT_OF(LOCALE_O); + goto again; + + case 'V': /* week of year according ISO 8601 */ + FMT('0', 2, "d", iso8601wknum(timeptr)); + continue; + + case 'u': + /* ISO 8601: Weekday as a decimal number [1 (Monday) - 7] */ + FMT('0', 1, "d", timeptr->tm_wday == 0 ? 7 : timeptr->tm_wday); + continue; +#endif /* POSIX2_DATE */ + +#ifdef ISO_DATE_EXT + case 'G': + case 'g': + /* + * Year of ISO week. + * + * If it's December but the ISO week number is one, + * that week is in next year. + * If it's January but the ISO week number is 52 or + * 53, that week is in last year. + * Otherwise, it's this year. + */ + w = iso8601wknum(timeptr); + if (timeptr->tm_mon == 11 && w == 1) + y = 1900L + timeptr->tm_year + 1; + else if (timeptr->tm_mon == 0 && w >= 52) + y = 1900L + timeptr->tm_year - 1; + else + y = 1900L + timeptr->tm_year; + + if (*format == 'G') + FMT('0', 1, "ld", y); + else + FMT('0', 2, "ld", y % 100); + continue; +#endif /* ISO_DATE_EXT */ + + + case 'L': + w = 3; + goto subsec; + + case 'N': + /* + * fractional second digits. default is 9 digits + * (nanosecond). + * + * %3N millisecond (3 digits) + * %6N microsecond (6 digits) + * %9N nanosecond (9 digits) + */ + w = 9; + subsec: + { + long n = ts->tv_nsec; + + if (precision <= 0) { + precision = w; + } + NEEDS(precision); + if (precision < w) { + snprintf(tbuf, w + 1, "%.*ld", w, n); + memcpy(s, tbuf, precision); + } + else { + snprintf(s, endp - s, "%.*ld", w, n); + memset(s + w, '0', precision - w); + } + s += precision; + } + continue; + + case 'F': /* Equivalent to %Y-%m-%d */ + { + int mon, mday; + mon = range(0, timeptr->tm_mon, 11) + 1; + mday = range(1, timeptr->tm_mday, 31); + i = snprintf(s, endp - s, "%ld-%02d-%02d", + 1900L + timeptr->tm_year, mon, mday); + if (i < 0) + goto err; + s += i; + } + continue; + + case '-': + FLAG_FOUND(); + flags |= BIT_OF(LEFT); + padding = precision = 0; + goto again; + + case '^': + FLAG_FOUND(); + flags |= BIT_OF(UPPER); + goto again; + + case '#': + FLAG_FOUND(); + flags |= BIT_OF(CHCASE); + goto again; + + case '_': + FLAG_FOUND(); + padding = ' '; + goto again; + + case '0': + padding = '0'; + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + char *e; + precision = (int)strtoul(format, &e, 10); + format = e - 1; + goto again; + } + + default: + unknown: + i = format - sp + 1; + tp = sp; + precision = -1; + flags = 0; + padding = 0; + break; + } + if (i) { + FILL_PADDING(i); + memcpy(s, tp, i); + switch (flags & (BIT_OF(UPPER)|BIT_OF(LOWER))) { + case BIT_OF(UPPER): + do { + if (ISLOWER(*s)) *s = TOUPPER(*s); + } while (s++, --i); + break; + case BIT_OF(LOWER): + do { + if (ISUPPER(*s)) *s = TOLOWER(*s); + } while (s++, --i); + break; + default: + s += i; + break; + } + } + } + if (s >= endp) { + goto err; + } + if (*format == '\0') { + *s = '\0'; + return (s - start); + } else + return 0; +} + +/* isleap --- is a year a leap year? */ + +#ifndef __STDC__ +static int +isleap(year) +long year; +#else +static int +isleap(long year) +#endif +{ + return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0); +} + + +#ifdef POSIX2_DATE +/* iso8601wknum --- compute week number according to ISO 8601 */ + +#ifndef __STDC__ +static int +iso8601wknum(timeptr) +const struct tm *timeptr; +#else +static int +iso8601wknum(const struct tm *timeptr) +#endif +{ + /* + * From 1003.2: + * If the week (Monday to Sunday) containing January 1 + * has four or more days in the new year, then it is week 1; + * otherwise it is the highest numbered week of the previous + * year (52 or 53), and the next week is week 1. + * + * ADR: This means if Jan 1 was Monday through Thursday, + * it was week 1, otherwise week 52 or 53. + * + * XPG4 erroneously included POSIX.2 rationale text in the + * main body of the standard. Thus it requires week 53. + */ + + int weeknum, jan1day; + + /* get week number, Monday as first day of the week */ + weeknum = weeknumber(timeptr, 1); + + /* + * With thanks and tip of the hatlo to tml@tik.vtt.fi + * + * What day of the week does January 1 fall on? + * We know that + * (timeptr->tm_yday - jan1.tm_yday) MOD 7 == + * (timeptr->tm_wday - jan1.tm_wday) MOD 7 + * and that + * jan1.tm_yday == 0 + * and that + * timeptr->tm_wday MOD 7 == timeptr->tm_wday + * from which it follows that. . . + */ + jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7); + if (jan1day < 0) + jan1day += 7; + + /* + * If Jan 1 was a Monday through Thursday, it was in + * week 1. Otherwise it was last year's highest week, which is + * this year's week 0. + * + * What does that mean? + * If Jan 1 was Monday, the week number is exactly right, it can + * never be 0. + * If it was Tuesday through Thursday, the weeknumber is one + * less than it should be, so we add one. + * Otherwise, Friday, Saturday or Sunday, the week number is + * OK, but if it is 0, it needs to be 52 or 53. + */ + switch (jan1day) { + case 1: /* Monday */ + break; + case 2: /* Tuesday */ + case 3: /* Wednesday */ + case 4: /* Thursday */ + weeknum++; + break; + case 5: /* Friday */ + case 6: /* Saturday */ + case 0: /* Sunday */ + if (weeknum == 0) { +#ifdef USE_BROKEN_XPG4 + /* XPG4 (as of March 1994) says 53 unconditionally */ + weeknum = 53; +#else + /* get week number of last week of last year */ + struct tm dec31ly; /* 12/31 last year */ + dec31ly = *timeptr; + dec31ly.tm_year--; + dec31ly.tm_mon = 11; + dec31ly.tm_mday = 31; + dec31ly.tm_wday = (jan1day == 0) ? 6 : jan1day - 1; + dec31ly.tm_yday = 364 + isleap(dec31ly.tm_year + 1900L); + weeknum = iso8601wknum(& dec31ly); +#endif + } + break; + } + + if (timeptr->tm_mon == 11) { + /* + * The last week of the year + * can be in week 1 of next year. + * Sigh. + * + * This can only happen if + * M T W + * 29 30 31 + * 30 31 + * 31 + */ + int wday, mday; + + wday = timeptr->tm_wday; + mday = timeptr->tm_mday; + if ( (wday == 1 && (mday >= 29 && mday <= 31)) + || (wday == 2 && (mday == 30 || mday == 31)) + || (wday == 3 && mday == 31)) + weeknum = 1; + } + + return weeknum; +} +#endif + +/* weeknumber --- figure how many weeks into the year */ + +/* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */ + +#ifndef __STDC__ +static int +weeknumber(timeptr, firstweekday) +const struct tm *timeptr; +int firstweekday; +#else +static int +weeknumber(const struct tm *timeptr, int firstweekday) +#endif +{ + int wday = timeptr->tm_wday; + int ret; + + if (firstweekday == 1) { + if (wday == 0) /* sunday */ + wday = 6; + else + wday--; + } + ret = ((timeptr->tm_yday + 7 - wday) / 7); + if (ret < 0) + ret = 0; + return ret; +} + +#if 0 +/* ADR --- I'm loathe to mess with ado's code ... */ + +Date: Wed, 24 Apr 91 20:54:08 MDT +From: Michal Jaegermann +To: arnold@audiofax.com + +Hi Arnold, +in a process of fixing of strftime() in libraries on Atari ST I grabbed +some pieces of code from your own strftime. When doing that it came +to mind that your weeknumber() function compiles a little bit nicer +in the following form: +/* + * firstweekday is 0 if starting in Sunday, non-zero if in Monday + */ +{ + return (timeptr->tm_yday - timeptr->tm_wday + + (firstweekday ? (timeptr->tm_wday ? 8 : 1) : 7)) / 7; +} +How nicer it depends on a compiler, of course, but always a tiny bit. + + Cheers, + Michal + ntomczak@vm.ucs.ualberta.ca +#endif + +#ifdef TEST_STRFTIME + +/* + * NAME: + * tst + * + * SYNOPSIS: + * tst + * + * DESCRIPTION: + * "tst" is a test driver for the function "strftime". + * + * OPTIONS: + * None. + * + * AUTHOR: + * Karl Vogel + * Control Data Systems, Inc. + * vogelke@c-17igp.wpafb.af.mil + * + * BUGS: + * None noticed yet. + * + * COMPILE: + * cc -o tst -DTEST_STRFTIME strftime.c + */ + +/* ADR: I reformatted this to my liking, and deleted some unneeded code. */ + +#ifndef NULL +#include +#endif +#include +#include + +#define MAXTIME 132 + +/* + * Array of time formats. + */ + +static char *array[] = +{ + "(%%A) full weekday name, var length (Sunday..Saturday) %A", + "(%%B) full month name, var length (January..December) %B", + "(%%C) Century %C", + "(%%D) date (%%m/%%d/%%y) %D", + "(%%E) Locale extensions (ignored) %E", + "(%%H) hour (24-hour clock, 00..23) %H", + "(%%I) hour (12-hour clock, 01..12) %I", + "(%%M) minute (00..59) %M", + "(%%O) Locale extensions (ignored) %O", + "(%%R) time, 24-hour (%%H:%%M) %R", + "(%%S) second (00..60) %S", + "(%%T) time, 24-hour (%%H:%%M:%%S) %T", + "(%%U) week of year, Sunday as first day of week (00..53) %U", + "(%%V) week of year according to ISO 8601 %V", + "(%%W) week of year, Monday as first day of week (00..53) %W", + "(%%X) appropriate locale time representation (%H:%M:%S) %X", + "(%%Y) year with century (1970...) %Y", + "(%%Z) timezone (EDT), or blank if timezone not determinable %Z", + "(%%a) locale's abbreviated weekday name (Sun..Sat) %a", + "(%%b) locale's abbreviated month name (Jan..Dec) %b", + "(%%c) full date (Sat Nov 4 12:02:33 1989)%n%t%t%t %c", + "(%%d) day of the month (01..31) %d", + "(%%e) day of the month, blank-padded ( 1..31) %e", + "(%%h) should be same as (%%b) %h", + "(%%j) day of the year (001..366) %j", + "(%%k) hour, 24-hour clock, blank pad ( 0..23) %k", + "(%%l) hour, 12-hour clock, blank pad ( 0..12) %l", + "(%%m) month (01..12) %m", + "(%%p) locale's AM or PM based on 12-hour clock %p", + "(%%r) time, 12-hour (same as %%I:%%M:%%S %%p) %r", + "(%%u) ISO 8601: Weekday as decimal number [1 (Monday) - 7] %u", + "(%%v) VMS date (dd-bbb-YYYY) %v", + "(%%w) day of week (0..6, Sunday == 0) %w", + "(%%x) appropriate locale date representation %x", + "(%%y) last two digits of year (00..99) %y", + "(%%z) timezone offset east of GMT as HHMM (e.g. -0500) %z", + (char *) NULL +}; + +/* main routine. */ + +int +main(argc, argv) +int argc; +char **argv; +{ + long time(); + + char *next; + char string[MAXTIME]; + + int k; + int length; + + struct tm *tm; + + long clock; + + /* Call the function. */ + + clock = time((long *) 0); + tm = localtime(&clock); + + for (k = 0; next = array[k]; k++) { + length = strftime(string, MAXTIME, next, tm); + printf("%s\n", string); + } + + exit(0); +} +#endif /* TEST_STRFTIME */ diff --git a/lib/ruby-1.9.1-rc1/string.c b/lib/ruby-1.9.1-rc1/string.c new file mode 100644 index 0000000..51bc39b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/string.c @@ -0,0 +1,7231 @@ +/********************************************************************** + + string.c - + + $Author: yugui $ + created at: Mon Aug 9 17:12:58 JST 1993 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + Copyright (C) 2000 Network Applied Communication Laboratory, Inc. + Copyright (C) 2000 Information-technology Promotion Agency, Japan + +**********************************************************************/ + +#include "ruby/ruby.h" +#include "ruby/re.h" +#include "ruby/encoding.h" + +#define BEG(no) regs->beg[no] +#define END(no) regs->end[no] + +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#undef rb_str_new_cstr +#undef rb_tainted_str_new_cstr +#undef rb_usascii_str_new_cstr +#undef rb_external_str_new_cstr +#undef rb_locale_str_new_cstr +#undef rb_str_new2 +#undef rb_str_new3 +#undef rb_str_new4 +#undef rb_str_new5 +#undef rb_tainted_str_new2 +#undef rb_usascii_str_new2 +#undef rb_str_dup_frozen +#undef rb_str_buf_new_cstr +#undef rb_str_buf_new2 +#undef rb_str_buf_cat2 +#undef rb_str_cat2 + +VALUE rb_cString; +VALUE rb_cSymbol; + +#define RUBY_MAX_CHAR_LEN 16 +#define STR_TMPLOCK FL_USER7 +#define STR_NOEMBED FL_USER1 +#define STR_SHARED FL_USER2 /* = ELTS_SHARED */ +#define STR_ASSOC FL_USER3 +#define STR_SHARED_P(s) FL_ALL(s, STR_NOEMBED|ELTS_SHARED) +#define STR_ASSOC_P(s) FL_ALL(s, STR_NOEMBED|STR_ASSOC) +#define STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC) +#define STR_NOCAPA_P(s) (FL_TEST(s,STR_NOEMBED) && FL_ANY(s,ELTS_SHARED|STR_ASSOC)) +#define STR_UNSET_NOCAPA(s) do {\ + if (FL_TEST(s,STR_NOEMBED)) FL_UNSET(s,(ELTS_SHARED|STR_ASSOC));\ +} while (0) + + +#define STR_SET_NOEMBED(str) do {\ + FL_SET(str, STR_NOEMBED);\ + STR_SET_EMBED_LEN(str, 0);\ +} while (0) +#define STR_SET_EMBED(str) FL_UNSET(str, STR_NOEMBED) +#define STR_EMBED_P(str) (!FL_TEST(str, STR_NOEMBED)) +#define STR_SET_EMBED_LEN(str, n) do { \ + long tmp_n = (n);\ + RBASIC(str)->flags &= ~RSTRING_EMBED_LEN_MASK;\ + RBASIC(str)->flags |= (tmp_n) << RSTRING_EMBED_LEN_SHIFT;\ +} while (0) + +#define STR_SET_LEN(str, n) do { \ + if (STR_EMBED_P(str)) {\ + STR_SET_EMBED_LEN(str, n);\ + }\ + else {\ + RSTRING(str)->as.heap.len = (n);\ + }\ +} while (0) + +#define STR_DEC_LEN(str) do {\ + if (STR_EMBED_P(str)) {\ + long n = RSTRING_LEN(str);\ + n--;\ + STR_SET_EMBED_LEN(str, n);\ + }\ + else {\ + RSTRING(str)->as.heap.len--;\ + }\ +} while (0) + +#define RESIZE_CAPA(str,capacity) do {\ + if (STR_EMBED_P(str)) {\ + if ((capacity) > RSTRING_EMBED_LEN_MAX) {\ + char *tmp = ALLOC_N(char, capacity+1);\ + memcpy(tmp, RSTRING_PTR(str), RSTRING_LEN(str));\ + RSTRING(str)->as.heap.ptr = tmp;\ + RSTRING(str)->as.heap.len = RSTRING_LEN(str);\ + STR_SET_NOEMBED(str);\ + RSTRING(str)->as.heap.aux.capa = (capacity);\ + }\ + }\ + else {\ + REALLOC_N(RSTRING(str)->as.heap.ptr, char, (capacity)+1);\ + if (!STR_NOCAPA_P(str))\ + RSTRING(str)->as.heap.aux.capa = (capacity);\ + }\ +} while (0) + +#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) +#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) + +#define STR_ENC_GET(str) rb_enc_from_index(ENCODING_GET(str)) + +static inline int +single_byte_optimizable(VALUE str) +{ + rb_encoding *enc; + + /* Conservative. It may be ENC_CODERANGE_UNKNOWN. */ + if (ENC_CODERANGE(str) == ENC_CODERANGE_7BIT) + return 1; + + enc = STR_ENC_GET(str); + if (rb_enc_mbmaxlen(enc) == 1) + return 1; + + /* Conservative. Possibly single byte. + * "\xa1" in Shift_JIS for example. */ + return 0; +} + +VALUE rb_fs; + +static inline const char * +search_nonascii(const char *p, const char *e) +{ +#if SIZEOF_VALUE == 8 +# define NONASCII_MASK 0x8080808080808080LL +#elif SIZEOF_VALUE == 4 +# define NONASCII_MASK 0x80808080UL +#endif +#ifdef NONASCII_MASK + if (sizeof(VALUE) * 2 < e - p) { + const VALUE *s, *t; + const VALUE lowbits = sizeof(VALUE) - 1; + s = (const VALUE*)(~lowbits & ((VALUE)p + lowbits)); + while (p < (const char *)s) { + if (!ISASCII(*p)) + return p; + p++; + } + t = (const VALUE*)(~lowbits & (VALUE)e); + while (s < t) { + if (*s & NONASCII_MASK) { + t = s; + break; + } + s++; + } + p = (const char *)t; + } +#endif + while (p < e) { + if (!ISASCII(*p)) + return p; + p++; + } + return NULL; +} + +static int +coderange_scan(const char *p, long len, rb_encoding *enc) +{ + const char *e = p + len; + + if (rb_enc_to_index(enc) == 0) { + /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */ + p = search_nonascii(p, e); + return p ? ENC_CODERANGE_VALID : ENC_CODERANGE_7BIT; + } + + if (rb_enc_asciicompat(enc)) { + p = search_nonascii(p, e); + if (!p) { + return ENC_CODERANGE_7BIT; + } + while (p < e) { + int ret = rb_enc_precise_mbclen(p, e, enc); + if (!MBCLEN_CHARFOUND_P(ret)) { + return ENC_CODERANGE_BROKEN; + } + p += MBCLEN_CHARFOUND_LEN(ret); + if (p < e) { + p = search_nonascii(p, e); + if (!p) { + return ENC_CODERANGE_VALID; + } + } + } + if (e < p) { + return ENC_CODERANGE_BROKEN; + } + return ENC_CODERANGE_VALID; + } + + while (p < e) { + int ret = rb_enc_precise_mbclen(p, e, enc); + + if (!MBCLEN_CHARFOUND_P(ret)) { + return ENC_CODERANGE_BROKEN; + } + p += MBCLEN_CHARFOUND_LEN(ret); + } + if (e < p) { + return ENC_CODERANGE_BROKEN; + } + return ENC_CODERANGE_VALID; +} + +long +rb_str_coderange_scan_restartable(const char *s, const char *e, rb_encoding *enc, int *cr) +{ + const char *p = s; + + if (*cr == ENC_CODERANGE_BROKEN) + return e - s; + + if (rb_enc_to_index(enc) == 0) { + /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */ + p = search_nonascii(p, e); + *cr = (!p && *cr != ENC_CODERANGE_VALID) ? ENC_CODERANGE_7BIT : ENC_CODERANGE_VALID; + return e - s; + } + else if (rb_enc_asciicompat(enc)) { + p = search_nonascii(p, e); + if (!p) { + if (*cr != ENC_CODERANGE_VALID) *cr = ENC_CODERANGE_7BIT; + return e - s; + } + while (p < e) { + int ret = rb_enc_precise_mbclen(p, e, enc); + if (!MBCLEN_CHARFOUND_P(ret)) { + *cr = MBCLEN_INVALID_P(ret) ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_UNKNOWN; + return p - s; + } + p += MBCLEN_CHARFOUND_LEN(ret); + if (p < e) { + p = search_nonascii(p, e); + if (!p) { + *cr = ENC_CODERANGE_VALID; + return e - s; + } + } + } + *cr = e < p ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_VALID; + return p - s; + } + else { + while (p < e) { + int ret = rb_enc_precise_mbclen(p, e, enc); + if (!MBCLEN_CHARFOUND_P(ret)) { + *cr = MBCLEN_INVALID_P(ret) ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_UNKNOWN; + return p - s; + } + p += MBCLEN_CHARFOUND_LEN(ret); + } + *cr = e < p ? ENC_CODERANGE_BROKEN: ENC_CODERANGE_VALID; + return p - s; + } +} + +static inline void +str_enc_copy(VALUE str1, VALUE str2) +{ + rb_enc_set_index(str1, ENCODING_GET(str2)); +} + +static void +rb_enc_cr_str_copy_for_substr(VALUE dest, VALUE src) +{ + /* this function is designed for copying encoding and coderange + * from src to new string "dest" which is made from the part of src. + */ + str_enc_copy(dest, src); + switch (ENC_CODERANGE(src)) { + case ENC_CODERANGE_7BIT: + ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT); + break; + case ENC_CODERANGE_VALID: + if (!rb_enc_asciicompat(STR_ENC_GET(src)) || + search_nonascii(RSTRING_PTR(dest), RSTRING_END(dest))) + ENC_CODERANGE_SET(dest, ENC_CODERANGE_VALID); + else + ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT); + break; + default: + if (RSTRING_LEN(dest) == 0) { + if (!rb_enc_asciicompat(STR_ENC_GET(src))) + ENC_CODERANGE_SET(dest, ENC_CODERANGE_VALID); + else + ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT); + } + break; + } +} + +static void +rb_enc_cr_str_exact_copy(VALUE dest, VALUE src) +{ + str_enc_copy(dest, src); + ENC_CODERANGE_SET(dest, ENC_CODERANGE(src)); +} + +int +rb_enc_str_coderange(VALUE str) +{ + int cr = ENC_CODERANGE(str); + + if (cr == ENC_CODERANGE_UNKNOWN) { + rb_encoding *enc = STR_ENC_GET(str); + cr = coderange_scan(RSTRING_PTR(str), RSTRING_LEN(str), enc); + ENC_CODERANGE_SET(str, cr); + } + return cr; +} + +int +rb_enc_str_asciionly_p(VALUE str) +{ + rb_encoding *enc = STR_ENC_GET(str); + + if (!rb_enc_asciicompat(enc)) + return Qfalse; + else if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) + return Qtrue; + return Qfalse; +} + +static inline void +str_mod_check(VALUE s, const char *p, long len) +{ + if (RSTRING_PTR(s) != p || RSTRING_LEN(s) != len){ + rb_raise(rb_eRuntimeError, "string modified"); + } +} + +static inline void +str_frozen_check(VALUE s) +{ + if (OBJ_FROZEN(s)) { + rb_raise(rb_eRuntimeError, "string frozen"); + } +} + +size_t +rb_str_capacity(VALUE str) +{ + if (STR_EMBED_P(str)) { + return RSTRING_EMBED_LEN_MAX; + } + else if (STR_NOCAPA_P(str)) { + return RSTRING(str)->as.heap.len; + } + else { + return RSTRING(str)->as.heap.aux.capa; + } +} + +static inline VALUE +str_alloc(VALUE klass) +{ + NEWOBJ(str, struct RString); + OBJSETUP(str, klass, T_STRING); + + str->as.heap.ptr = 0; + str->as.heap.len = 0; + str->as.heap.aux.capa = 0; + + return (VALUE)str; +} + +static VALUE +str_new(VALUE klass, const char *ptr, long len) +{ + VALUE str; + + if (len < 0) { + rb_raise(rb_eArgError, "negative string size (or size too big)"); + } + + str = str_alloc(klass); + if (len > RSTRING_EMBED_LEN_MAX) { + RSTRING(str)->as.heap.aux.capa = len; + RSTRING(str)->as.heap.ptr = ALLOC_N(char,len+1); + STR_SET_NOEMBED(str); + } + else if (len == 0) { + ENC_CODERANGE_SET(str, ENC_CODERANGE_7BIT); + } + if (ptr) { + memcpy(RSTRING_PTR(str), ptr, len); + } + STR_SET_LEN(str, len); + RSTRING_PTR(str)[len] = '\0'; + return str; +} + +VALUE +rb_str_new(const char *ptr, long len) +{ + return str_new(rb_cString, ptr, len); +} + +VALUE +rb_usascii_str_new(const char *ptr, long len) +{ + VALUE str = rb_str_new(ptr, len); + ENCODING_CODERANGE_SET(str, rb_usascii_encindex(), ENC_CODERANGE_7BIT); + return str; +} + +VALUE +rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) +{ + VALUE str = rb_str_new(ptr, len); + rb_enc_associate(str, enc); + return str; +} + +VALUE +rb_str_new_cstr(const char *ptr) +{ + if (!ptr) { + rb_raise(rb_eArgError, "NULL pointer given"); + } + return rb_str_new(ptr, strlen(ptr)); +} + +RUBY_ALIAS_FUNCTION(rb_str_new2(const char *ptr), rb_str_new_cstr, (ptr)) +#define rb_str_new2 rb_str_new_cstr + +VALUE +rb_usascii_str_new_cstr(const char *ptr) +{ + VALUE str = rb_str_new2(ptr); + ENCODING_CODERANGE_SET(str, rb_usascii_encindex(), ENC_CODERANGE_7BIT); + return str; +} + +RUBY_ALIAS_FUNCTION(rb_usascii_str_new2(const char *ptr), rb_usascii_str_new_cstr, (ptr)) +#define rb_usascii_str_new2 rb_usascii_str_new_cstr + +VALUE +rb_tainted_str_new(const char *ptr, long len) +{ + VALUE str = rb_str_new(ptr, len); + + OBJ_TAINT(str); + return str; +} + +VALUE +rb_tainted_str_new_cstr(const char *ptr) +{ + VALUE str = rb_str_new2(ptr); + + OBJ_TAINT(str); + return str; +} + +RUBY_ALIAS_FUNCTION(rb_tainted_str_new2(const char *ptr), rb_tainted_str_new_cstr, (ptr)) +#define rb_tainted_str_new2 rb_tainted_str_new_cstr + +VALUE +rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts) +{ + rb_econv_t *ec; + rb_econv_result_t ret; + long len; + VALUE newstr; + const unsigned char *sp; + unsigned char *dp; + + if (!to) return str; + if (from == to) return str; + if ((rb_enc_asciicompat(to) && ENC_CODERANGE(str) == ENC_CODERANGE_7BIT) || + to == rb_ascii8bit_encoding()) { + if (STR_ENC_GET(str) != to) { + str = rb_str_dup(str); + rb_enc_associate(str, to); + } + return str; + } + + len = RSTRING_LEN(str); + newstr = rb_str_new(0, len); + + retry: + ec = rb_econv_open_opts(from->name, to->name, ecflags, ecopts); + if (!ec) return str; + + sp = (unsigned char*)RSTRING_PTR(str); + dp = (unsigned char*)RSTRING_PTR(newstr); + ret = rb_econv_convert(ec, &sp, (unsigned char*)RSTRING_END(str), + &dp, (unsigned char*)RSTRING_END(newstr), 0); + rb_econv_close(ec); + switch (ret) { + case econv_destination_buffer_full: + /* destination buffer short */ + len *= 2; + rb_str_resize(newstr, len); + goto retry; + + case econv_finished: + len = dp - (unsigned char*)RSTRING_PTR(newstr); + rb_str_set_len(newstr, len); + rb_enc_associate(newstr, to); + return newstr; + + default: + /* some error, return original */ + return str; + } +} + +VALUE +rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to) +{ + return rb_str_conv_enc_opts(str, from, to, 0, Qnil); +} + +VALUE +rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *eenc) +{ + VALUE str; + + str = rb_tainted_str_new(ptr, len); + if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT && + eenc == rb_usascii_encoding()) { + rb_enc_associate(str, rb_ascii8bit_encoding()); + return str; + } + rb_enc_associate(str, eenc); + return rb_str_conv_enc(str, eenc, rb_default_internal_encoding()); +} + +VALUE +rb_external_str_new(const char *ptr, long len) +{ + return rb_external_str_new_with_enc(ptr, len, rb_default_external_encoding()); +} + +VALUE +rb_external_str_new_cstr(const char *ptr) +{ + return rb_external_str_new_with_enc(ptr, strlen(ptr), rb_default_external_encoding()); +} + +VALUE +rb_locale_str_new(const char *ptr, long len) +{ + return rb_external_str_new_with_enc(ptr, len, rb_locale_encoding()); +} + +VALUE +rb_locale_str_new_cstr(const char *ptr) +{ + return rb_external_str_new_with_enc(ptr, strlen(ptr), rb_locale_encoding()); +} + +VALUE +rb_str_export(VALUE str) +{ + return rb_str_conv_enc(str, STR_ENC_GET(str), rb_default_external_encoding()); +} + +VALUE +rb_str_export_locale(VALUE str) +{ + return rb_str_conv_enc(str, STR_ENC_GET(str), rb_locale_encoding()); +} + +VALUE +rb_str_export_to_enc(VALUE str, rb_encoding *enc) +{ + return rb_str_conv_enc(str, STR_ENC_GET(str), enc); +} + +static VALUE +str_replace_shared(VALUE str2, VALUE str) +{ + if (RSTRING_LEN(str) <= RSTRING_EMBED_LEN_MAX) { + STR_SET_EMBED(str2); + memcpy(RSTRING_PTR(str2), RSTRING_PTR(str), RSTRING_LEN(str)+1); + STR_SET_EMBED_LEN(str2, RSTRING_LEN(str)); + } + else { + FL_SET(str2, STR_NOEMBED); + RSTRING(str2)->as.heap.len = RSTRING_LEN(str); + RSTRING(str2)->as.heap.ptr = RSTRING_PTR(str); + RSTRING(str2)->as.heap.aux.shared = str; + FL_SET(str2, ELTS_SHARED); + } + rb_enc_cr_str_exact_copy(str2, str); + + return str2; +} + +static VALUE +str_new_shared(VALUE klass, VALUE str) +{ + return str_replace_shared(str_alloc(klass), str); +} + +static VALUE +str_new3(VALUE klass, VALUE str) +{ + return str_new_shared(klass, str); +} + +VALUE +rb_str_new_shared(VALUE str) +{ + VALUE str2 = str_new3(rb_obj_class(str), str); + + OBJ_INFECT(str2, str); + return str2; +} + +RUBY_ALIAS_FUNCTION(rb_str_new3(VALUE str), rb_str_new_shared, (str)) +#define rb_str_new3 rb_str_new_shared + +static VALUE +str_new4(VALUE klass, VALUE str) +{ + VALUE str2; + + str2 = str_alloc(klass); + STR_SET_NOEMBED(str2); + RSTRING(str2)->as.heap.len = RSTRING_LEN(str); + RSTRING(str2)->as.heap.ptr = RSTRING_PTR(str); + if (STR_SHARED_P(str)) { + FL_SET(str2, ELTS_SHARED); + RSTRING(str2)->as.heap.aux.shared = RSTRING(str)->as.heap.aux.shared; + } + else { + FL_SET(str, ELTS_SHARED); + RSTRING(str)->as.heap.aux.shared = str2; + } + rb_enc_cr_str_exact_copy(str2, str); + OBJ_INFECT(str2, str); + return str2; +} + +VALUE +rb_str_new_frozen(VALUE orig) +{ + VALUE klass, str; + + if (OBJ_FROZEN(orig)) return orig; + klass = rb_obj_class(orig); + if (STR_SHARED_P(orig) && (str = RSTRING(orig)->as.heap.aux.shared)) { + long ofs; + ofs = RSTRING_LEN(str) - RSTRING_LEN(orig); + if ((ofs > 0) || (klass != RBASIC(str)->klass) || + (!OBJ_TAINTED(str) && OBJ_TAINTED(orig))) { + str = str_new3(klass, str); + RSTRING(str)->as.heap.ptr += ofs; + RSTRING(str)->as.heap.len -= ofs; + } + rb_enc_cr_str_exact_copy(str, orig); + OBJ_INFECT(str, orig); + } + else if (STR_EMBED_P(orig)) { + str = str_new(klass, RSTRING_PTR(orig), RSTRING_LEN(orig)); + rb_enc_cr_str_exact_copy(str, orig); + OBJ_INFECT(str, orig); + } + else if (STR_ASSOC_P(orig)) { + VALUE assoc = RSTRING(orig)->as.heap.aux.shared; + FL_UNSET(orig, STR_ASSOC); + str = str_new4(klass, orig); + FL_SET(str, STR_ASSOC); + RSTRING(str)->as.heap.aux.shared = assoc; + } + else { + str = str_new4(klass, orig); + } + OBJ_FREEZE(str); + return str; +} + +RUBY_ALIAS_FUNCTION(rb_str_new4(VALUE orig), rb_str_new_frozen, (orig)) +#define rb_str_new4 rb_str_new_frozen + +VALUE +rb_str_new_with_class(VALUE obj, const char *ptr, long len) +{ + return str_new(rb_obj_class(obj), ptr, len); +} + +RUBY_ALIAS_FUNCTION(rb_str_new5(VALUE obj, const char *ptr, long len), + rb_str_new_with_class, (obj, ptr, len)) +#define rb_str_new5 rb_str_new_with_class + +#define STR_BUF_MIN_SIZE 128 + +VALUE +rb_str_buf_new(long capa) +{ + VALUE str = str_alloc(rb_cString); + + if (capa < STR_BUF_MIN_SIZE) { + capa = STR_BUF_MIN_SIZE; + } + FL_SET(str, STR_NOEMBED); + RSTRING(str)->as.heap.aux.capa = capa; + RSTRING(str)->as.heap.ptr = ALLOC_N(char, capa+1); + RSTRING(str)->as.heap.ptr[0] = '\0'; + + return str; +} + +VALUE +rb_str_buf_new_cstr(const char *ptr) +{ + VALUE str; + long len = strlen(ptr); + + str = rb_str_buf_new(len); + rb_str_buf_cat(str, ptr, len); + + return str; +} + +RUBY_ALIAS_FUNCTION(rb_str_buf_new2(const char *ptr), rb_str_buf_new_cstr, (ptr)) +#define rb_str_buf_new2 rb_str_buf_new_cstr + +VALUE +rb_str_tmp_new(long len) +{ + return str_new(0, 0, len); +} + +void +rb_str_free(VALUE str) +{ + if (!STR_EMBED_P(str) && !STR_SHARED_P(str)) { + xfree(RSTRING(str)->as.heap.ptr); + } +} + +VALUE +rb_str_to_str(VALUE str) +{ + return rb_convert_type(str, T_STRING, "String", "to_str"); +} + +void +rb_str_shared_replace(VALUE str, VALUE str2) +{ + rb_encoding *enc; + int cr; + if (str == str2) return; + enc = STR_ENC_GET(str2); + cr = ENC_CODERANGE(str2); + rb_str_modify(str); + OBJ_INFECT(str, str2); + if (!STR_SHARED_P(str) && !STR_EMBED_P(str)) { + xfree(RSTRING_PTR(str)); + } + if (RSTRING_LEN(str2) <= RSTRING_EMBED_LEN_MAX) { + STR_SET_EMBED(str); + memcpy(RSTRING_PTR(str), RSTRING_PTR(str2), RSTRING_LEN(str2)+1); + STR_SET_EMBED_LEN(str, RSTRING_LEN(str2)); + rb_enc_associate(str, enc); + ENC_CODERANGE_SET(str, cr); + return; + } + STR_SET_NOEMBED(str); + STR_UNSET_NOCAPA(str); + RSTRING(str)->as.heap.ptr = RSTRING_PTR(str2); + RSTRING(str)->as.heap.len = RSTRING_LEN(str2); + if (STR_NOCAPA_P(str2)) { + FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA); + RSTRING(str)->as.heap.aux.shared = RSTRING(str2)->as.heap.aux.shared; + } + else { + RSTRING(str)->as.heap.aux.capa = RSTRING(str2)->as.heap.aux.capa; + } + STR_SET_EMBED(str2); /* abandon str2 */ + RSTRING_PTR(str2)[0] = 0; + STR_SET_EMBED_LEN(str2, 0); + rb_enc_associate(str, enc); + ENC_CODERANGE_SET(str, cr); +} + +static ID id_to_s; + +VALUE +rb_obj_as_string(VALUE obj) +{ + VALUE str; + + if (TYPE(obj) == T_STRING) { + return obj; + } + str = rb_funcall(obj, id_to_s, 0); + if (TYPE(str) != T_STRING) + return rb_any_to_s(obj); + if (OBJ_TAINTED(obj)) OBJ_TAINT(str); + return str; +} + +static VALUE rb_str_replace(VALUE, VALUE); + +VALUE +rb_str_dup(VALUE str) +{ + VALUE dup = str_alloc(rb_obj_class(str)); + rb_str_replace(dup, str); + return dup; +} + + +/* + * call-seq: + * String.new(str="") => new_str + * + * Returns a new string object containing a copy of str. + */ + +static VALUE +rb_str_init(int argc, VALUE *argv, VALUE str) +{ + VALUE orig; + + if (argc > 0 && rb_scan_args(argc, argv, "01", &orig) == 1) + rb_str_replace(str, orig); + return str; +} + +long +rb_enc_strlen(const char *p, const char *e, rb_encoding *enc) +{ + long c; + const char *q; + + if (rb_enc_mbmaxlen(enc) == rb_enc_mbminlen(enc)) { + return (e - p + rb_enc_mbminlen(enc) - 1) / rb_enc_mbminlen(enc); + } + else if (rb_enc_asciicompat(enc)) { + c = 0; + while (p < e) { + if (ISASCII(*p)) { + q = search_nonascii(p, e); + if (!q) + return c + (e - p); + c += q - p; + p = q; + } + p += rb_enc_mbclen(p, e, enc); + c++; + } + return c; + } + + for (c=0; p>1); + d >>= 6; + d &= NONASCII_MASK >> 7; + d += (d>>8); + d += (d>>16); +#if SIZEOF_VALUE == 8 + d += (d>>32); +#endif + return (d&0xF); +} +#endif + +static long +str_strlen(VALUE str, rb_encoding *enc) +{ + const char *p, *e; + int n, cr; + + if (single_byte_optimizable(str)) return RSTRING_LEN(str); + if (!enc) enc = STR_ENC_GET(str); + p = RSTRING_PTR(str); + e = RSTRING_END(str); +#ifdef NONASCII_MASK + if (ENC_CODERANGE(str) == ENC_CODERANGE_VALID && + enc == rb_utf8_encoding()) { + VALUE len = 0; + if (sizeof(VALUE) * 2 < e - p) { + const VALUE *s, *t; + const VALUE lowbits = sizeof(VALUE) - 1; + s = (const VALUE*)(~lowbits & ((VALUE)p + lowbits)); + t = (const VALUE*)(~lowbits & (VALUE)e); + while (p < (const char *)s) { + if (is_utf8_lead_byte(*p)) len++; + p++; + } + while (s < t) { + len += count_utf8_lead_bytes_with_word(s); + s++; + } + p = (const char *)s; + } + while (p < e) { + if (is_utf8_lead_byte(*p)) len++; + p++; + } + return (long)len; + } +#endif + n = rb_enc_strlen_cr(p, e, enc, &cr); + if (cr) { + ENC_CODERANGE_SET(str, cr); + } + return n; +} + +/* + * call-seq: + * str.length => integer + * str.size => integer + * + * Returns the character length of str. + */ + +VALUE +rb_str_length(VALUE str) +{ + int len; + + len = str_strlen(str, STR_ENC_GET(str)); + return INT2NUM(len); +} + +/* + * call-seq: + * str.bytesize => integer + * + * Returns the length of str in bytes. + */ + +static VALUE +rb_str_bytesize(VALUE str) +{ + return INT2NUM(RSTRING_LEN(str)); +} + +/* + * call-seq: + * str.empty? => true or false + * + * Returns true if str has a length of zero. + * + * "hello".empty? #=> false + * "".empty? #=> true + */ + +static VALUE +rb_str_empty(VALUE str) +{ + if (RSTRING_LEN(str) == 0) + return Qtrue; + return Qfalse; +} + +/* + * call-seq: + * str + other_str => new_str + * + * Concatenation---Returns a new String containing + * other_str concatenated to str. + * + * "Hello from " + self.to_s #=> "Hello from main" + */ + +VALUE +rb_str_plus(VALUE str1, VALUE str2) +{ + VALUE str3; + rb_encoding *enc; + + StringValue(str2); + enc = rb_enc_check(str1, str2); + str3 = rb_str_new(0, RSTRING_LEN(str1)+RSTRING_LEN(str2)); + memcpy(RSTRING_PTR(str3), RSTRING_PTR(str1), RSTRING_LEN(str1)); + memcpy(RSTRING_PTR(str3) + RSTRING_LEN(str1), + RSTRING_PTR(str2), RSTRING_LEN(str2)); + RSTRING_PTR(str3)[RSTRING_LEN(str3)] = '\0'; + + if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2)) + OBJ_TAINT(str3); + ENCODING_CODERANGE_SET(str3, rb_enc_to_index(enc), + ENC_CODERANGE_AND(ENC_CODERANGE(str1), ENC_CODERANGE(str2))); + return str3; +} + +/* + * call-seq: + * str * integer => new_str + * + * Copy---Returns a new String containing integer copies of + * the receiver. + * + * "Ho! " * 3 #=> "Ho! Ho! Ho! " + */ + +VALUE +rb_str_times(VALUE str, VALUE times) +{ + VALUE str2; + long n, len; + + len = NUM2LONG(times); + if (len < 0) { + rb_raise(rb_eArgError, "negative argument"); + } + if (len && LONG_MAX/len < RSTRING_LEN(str)) { + rb_raise(rb_eArgError, "argument too big"); + } + + str2 = rb_str_new5(str, 0, len *= RSTRING_LEN(str)); + if (len) { + n = RSTRING_LEN(str); + memcpy(RSTRING_PTR(str2), RSTRING_PTR(str), n); + while (n <= len/2) { + memcpy(RSTRING_PTR(str2) + n, RSTRING_PTR(str2), n); + n *= 2; + } + memcpy(RSTRING_PTR(str2) + n, RSTRING_PTR(str2), len-n); + } + RSTRING_PTR(str2)[RSTRING_LEN(str2)] = '\0'; + OBJ_INFECT(str2, str); + rb_enc_cr_str_copy_for_substr(str2, str); + + return str2; +} + +/* + * call-seq: + * str % arg => new_str + * + * Format---Uses str as a format specification, and returns the result + * of applying it to arg. If the format specification contains more than + * one substitution, then arg must be an Array containing + * the values to be substituted. See Kernel::sprintf for details + * of the format string. + * + * "%05d" % 123 #=> "00123" + * "%-5s: %08x" % [ "ID", self.object_id ] #=> "ID : 200e14d6" + */ + +static VALUE +rb_str_format_m(VALUE str, VALUE arg) +{ + volatile VALUE tmp = rb_check_array_type(arg); + + if (!NIL_P(tmp)) { + return rb_str_format(RARRAY_LEN(tmp), RARRAY_PTR(tmp), str); + } + return rb_str_format(1, &arg, str); +} + +static inline void +str_modifiable(VALUE str) +{ + if (FL_TEST(str, STR_TMPLOCK)) { + rb_raise(rb_eRuntimeError, "can't modify string; temporarily locked"); + } + if (OBJ_FROZEN(str)) rb_error_frozen("string"); + if (!OBJ_UNTRUSTED(str) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't modify string"); +} + +static inline int +str_independent(VALUE str) +{ + str_modifiable(str); + if (!STR_SHARED_P(str)) return 1; + if (STR_EMBED_P(str)) return 1; + return 0; +} + +static void +str_make_independent(VALUE str) +{ + char *ptr; + long len = RSTRING_LEN(str); + + ptr = ALLOC_N(char, len+1); + if (RSTRING_PTR(str)) { + memcpy(ptr, RSTRING_PTR(str), len); + } + STR_SET_NOEMBED(str); + ptr[len] = 0; + RSTRING(str)->as.heap.ptr = ptr; + RSTRING(str)->as.heap.len = len; + RSTRING(str)->as.heap.aux.capa = len; + STR_UNSET_NOCAPA(str); +} + +void +rb_str_modify(VALUE str) +{ + if (!str_independent(str)) + str_make_independent(str); + ENC_CODERANGE_CLEAR(str); +} + +/* As rb_str_modify(), but don't clear coderange */ +static void +str_modify_keep_cr(VALUE str) +{ + if (!str_independent(str)) + str_make_independent(str); + if (ENC_CODERANGE(str) == ENC_CODERANGE_BROKEN) + /* Force re-scan later */ + ENC_CODERANGE_CLEAR(str); +} + +void +rb_str_associate(VALUE str, VALUE add) +{ + /* sanity check */ + if (OBJ_FROZEN(str)) rb_error_frozen("string"); + if (STR_ASSOC_P(str)) { + /* already associated */ + rb_ary_concat(RSTRING(str)->as.heap.aux.shared, add); + } + else { + if (STR_SHARED_P(str)) { + VALUE assoc = RSTRING(str)->as.heap.aux.shared; + str_make_independent(str); + if (STR_ASSOC_P(assoc)) { + assoc = RSTRING(assoc)->as.heap.aux.shared; + rb_ary_concat(assoc, add); + add = assoc; + } + } + else if (STR_EMBED_P(str)) { + str_make_independent(str); + } + else if (RSTRING(str)->as.heap.aux.capa != RSTRING_LEN(str)) { + RESIZE_CAPA(str, RSTRING_LEN(str)); + } + FL_SET(str, STR_ASSOC); + RBASIC(add)->klass = 0; + RSTRING(str)->as.heap.aux.shared = add; + } +} + +VALUE +rb_str_associated(VALUE str) +{ + if (STR_SHARED_P(str)) str = RSTRING(str)->as.heap.aux.shared; + if (STR_ASSOC_P(str)) { + return RSTRING(str)->as.heap.aux.shared; + } + return Qfalse; +} + +VALUE +rb_string_value(volatile VALUE *ptr) +{ + VALUE s = *ptr; + if (TYPE(s) != T_STRING) { + s = rb_str_to_str(s); + *ptr = s; + } + return s; +} + +char * +rb_string_value_ptr(volatile VALUE *ptr) +{ + VALUE str = rb_string_value(ptr); + return RSTRING_PTR(str); +} + +char * +rb_string_value_cstr(volatile VALUE *ptr) +{ + VALUE str = rb_string_value(ptr); + char *s = RSTRING_PTR(str); + + if (!s || RSTRING_LEN(str) != strlen(s)) { + rb_raise(rb_eArgError, "string contains null byte"); + } + return s; +} + +VALUE +rb_check_string_type(VALUE str) +{ + str = rb_check_convert_type(str, T_STRING, "String", "to_str"); + return str; +} + +/* + * call-seq: + * String.try_convert(obj) -> string or nil + * + * Try to convert obj into a String, using to_str method. + * Returns converted regexp or nil if obj cannot be converted + * for any reason. + * + * String.try_convert("str") # => str + * String.try_convert(/re/) # => nil + */ +static VALUE +rb_str_s_try_convert(VALUE dummy, VALUE str) +{ + return rb_check_string_type(str); +} + +char* +rb_enc_nth(const char *p, const char *e, int nth, rb_encoding *enc) +{ + if (rb_enc_mbmaxlen(enc) == 1) { + p += nth; + } + else if (rb_enc_mbmaxlen(enc) == rb_enc_mbminlen(enc)) { + p += nth * rb_enc_mbmaxlen(enc); + } + else if (rb_enc_asciicompat(enc)) { + const char *p2, *e2; + int n; + + while (p < e && 0 < nth) { + e2 = p + nth; + if (e < e2) + return (char *)e; + if (ISASCII(*p)) { + p2 = search_nonascii(p, e2); + if (!p2) + return (char *)e2; + nth -= p2 - p; + p = p2; + } + n = rb_enc_mbclen(p, e, enc); + p += n; + nth--; + } + if (nth != 0) + return (char *)e; + return (char *)p; + } + else { + while (p e) p = e; + return (char*)p; +} + +static char* +str_nth(const char *p, const char *e, int nth, rb_encoding *enc, int singlebyte) +{ + if (singlebyte) + p += nth; + else { + p = rb_enc_nth(p, e, nth, enc); + } + if (!p) return 0; + if (p > e) p = e; + return (char *)p; +} + +/* char offset to byte offset */ +static int +str_offset(const char *p, const char *e, int nth, rb_encoding *enc, int singlebyte) +{ + const char *pp = str_nth(p, e, nth, enc, singlebyte); + if (!pp) return e - p; + return pp - p; +} + +#ifdef NONASCII_MASK +static char * +str_utf8_nth(const char *p, const char *e, int nth) +{ + if (sizeof(VALUE) * 2 < nth) { + const VALUE *s, *t; + const VALUE lowbits = sizeof(VALUE) - 1; + s = (const VALUE*)(~lowbits & ((VALUE)p + lowbits)); + t = (const VALUE*)(~lowbits & (VALUE)e); + while (p < (const char *)s) { + if (is_utf8_lead_byte(*p)) nth--; + p++; + } + do { + nth -= count_utf8_lead_bytes_with_word(s); + s++; + } while (s < t && sizeof(VALUE) <= nth); + p = (char *)s; + } + while (p < e) { + if (is_utf8_lead_byte(*p)) { + if (nth == 0) break; + nth--; + } + p++; + } + return (char *)p; +} + +static int +str_utf8_offset(const char *p, const char *e, int nth) +{ + const char *pp = str_utf8_nth(p, e, nth); + if (!pp) return e - p; + return pp - p; +} +#endif + +/* byte offset to char offset */ +long +rb_str_sublen(VALUE str, long pos) +{ + if (single_byte_optimizable(str) || pos < 0) + return pos; + else { + char *p = RSTRING_PTR(str); + return rb_enc_strlen(p, p + pos, STR_ENC_GET(str)); + } +} + +VALUE +rb_str_subseq(VALUE str, long beg, long len) +{ + VALUE str2; + + if (RSTRING_LEN(str) == beg + len && + RSTRING_EMBED_LEN_MAX < len) { + str2 = rb_str_new_shared(rb_str_new_frozen(str)); + rb_str_drop_bytes(str2, beg); + } + else { + str2 = rb_str_new5(str, RSTRING_PTR(str)+beg, len); + } + + rb_enc_cr_str_copy_for_substr(str2, str); + OBJ_INFECT(str2, str); + + return str2; +} + +VALUE +rb_str_substr(VALUE str, long beg, long len) +{ + rb_encoding *enc = STR_ENC_GET(str); + VALUE str2; + char *p, *s = RSTRING_PTR(str), *e = s + RSTRING_LEN(str); + + if (len < 0) return Qnil; + if (!RSTRING_LEN(str)) { + len = 0; + } + if (single_byte_optimizable(str)) { + if (beg > RSTRING_LEN(str)) return Qnil; + if (beg < 0) { + beg += RSTRING_LEN(str); + if (beg < 0) return Qnil; + } + if (beg + len > RSTRING_LEN(str)) + len = RSTRING_LEN(str) - beg; + if (len <= 0) { + len = 0; + p = 0; + } + else + p = s + beg; + goto sub; + } + if (beg < 0) { + if (len > -beg) len = -beg; + if (-beg * rb_enc_mbmaxlen(enc) < RSTRING_LEN(str) / 8) { + beg = -beg; + while (beg-- > len && (e = rb_enc_prev_char(s, e, e, enc)) != 0); + p = e; + if (!p) return Qnil; + while (len-- > 0 && (p = rb_enc_prev_char(s, p, e, enc)) != 0); + if (!p) return Qnil; + len = e - p; + goto sub; + } + else { + beg += str_strlen(str, enc); + if (beg < 0) return Qnil; + } + } + else if (beg > 0 && beg > str_strlen(str, enc)) { + return Qnil; + } + if (len == 0) { + p = 0; + } +#ifdef NONASCII_MASK + else if (ENC_CODERANGE(str) == ENC_CODERANGE_VALID && + enc == rb_utf8_encoding()) { + p = str_utf8_nth(s, e, beg); + len = str_utf8_offset(p, e, len); + } +#endif + else if (rb_enc_mbmaxlen(enc) == rb_enc_mbminlen(enc)) { + int char_sz = rb_enc_mbmaxlen(enc); + + p = s + beg * char_sz; + if (p > e) { + p = e; + len = 0; + } + else if (len * char_sz > e - p) + len = e - p; + else + len *= char_sz; + } + else if ((p = str_nth(s, e, beg, enc, 0)) == e) { + len = 0; + } + else { + len = str_offset(p, e, len, enc, 0); + } + sub: + if (len > RSTRING_EMBED_LEN_MAX && beg + len == RSTRING_LEN(str)) { + str2 = rb_str_new4(str); + str2 = str_new3(rb_obj_class(str2), str2); + RSTRING(str2)->as.heap.ptr += RSTRING(str2)->as.heap.len - len; + RSTRING(str2)->as.heap.len = len; + } + else { + str2 = rb_str_new5(str, p, len); + rb_enc_cr_str_copy_for_substr(str2, str); + OBJ_INFECT(str2, str); + } + + return str2; +} + +VALUE +rb_str_freeze(VALUE str) +{ + if (STR_ASSOC_P(str)) { + VALUE ary = RSTRING(str)->as.heap.aux.shared; + OBJ_FREEZE(ary); + } + return rb_obj_freeze(str); +} + +RUBY_ALIAS_FUNCTION(rb_str_dup_frozen(VALUE str), rb_str_new_frozen, (str)) +#define rb_str_dup_frozen rb_str_new_frozen + +VALUE +rb_str_locktmp(VALUE str) +{ + if (FL_TEST(str, STR_TMPLOCK)) { + rb_raise(rb_eRuntimeError, "temporal locking already locked string"); + } + FL_SET(str, STR_TMPLOCK); + return str; +} + +VALUE +rb_str_unlocktmp(VALUE str) +{ + if (!FL_TEST(str, STR_TMPLOCK)) { + rb_raise(rb_eRuntimeError, "temporal unlocking already unlocked string"); + } + FL_UNSET(str, STR_TMPLOCK); + return str; +} + +void +rb_str_set_len(VALUE str, long len) +{ + STR_SET_LEN(str, len); + RSTRING_PTR(str)[len] = '\0'; +} + +VALUE +rb_str_resize(VALUE str, long len) +{ + long slen; + + if (len < 0) { + rb_raise(rb_eArgError, "negative string size (or size too big)"); + } + + rb_str_modify(str); + slen = RSTRING_LEN(str); + if (len != slen) { + if (STR_EMBED_P(str)) { + char *ptr; + if (len <= RSTRING_EMBED_LEN_MAX) { + STR_SET_EMBED_LEN(str, len); + RSTRING(str)->as.ary[len] = '\0'; + return str; + } + ptr = ALLOC_N(char,len+1); + MEMCPY(ptr, RSTRING(str)->as.ary, char, slen); + RSTRING(str)->as.heap.ptr = ptr; + STR_SET_NOEMBED(str); + } + else if (len <= RSTRING_EMBED_LEN_MAX) { + char *ptr = RSTRING(str)->as.heap.ptr; + STR_SET_EMBED(str); + if (slen > 0) MEMCPY(RSTRING(str)->as.ary, ptr, char, len); + RSTRING(str)->as.ary[len] = '\0'; + STR_SET_EMBED_LEN(str, len); + xfree(ptr); + return str; + } + else if (slen < len || slen - len > 1024) { + REALLOC_N(RSTRING(str)->as.heap.ptr, char, len+1); + } + if (!STR_NOCAPA_P(str)) { + RSTRING(str)->as.heap.aux.capa = len; + } + RSTRING(str)->as.heap.len = len; + RSTRING(str)->as.heap.ptr[len] = '\0'; /* sentinel */ + } + return str; +} + +static VALUE +str_buf_cat(VALUE str, const char *ptr, long len) +{ + long capa, total, off = -1; + + if (ptr >= RSTRING_PTR(str) && ptr <= RSTRING_END(str)) { + off = ptr - RSTRING_PTR(str); + } + rb_str_modify(str); + if (len == 0) return 0; + if (STR_ASSOC_P(str)) { + FL_UNSET(str, STR_ASSOC); + capa = RSTRING(str)->as.heap.aux.capa = RSTRING_LEN(str); + } + else if (STR_EMBED_P(str)) { + capa = RSTRING_EMBED_LEN_MAX; + } + else { + capa = RSTRING(str)->as.heap.aux.capa; + } + if (RSTRING_LEN(str) >= LONG_MAX - len) { + rb_raise(rb_eArgError, "string sizes too big"); + } + total = RSTRING_LEN(str)+len; + if (capa <= total) { + while (total > capa) { + if (capa + 1 >= LONG_MAX / 2) { + capa = (total + 4095) / 4096; + break; + } + capa = (capa + 1) * 2; + } + RESIZE_CAPA(str, capa); + } + if (off != -1) { + ptr = RSTRING_PTR(str) + off; + } + memcpy(RSTRING_PTR(str) + RSTRING_LEN(str), ptr, len); + STR_SET_LEN(str, total); + RSTRING_PTR(str)[total] = '\0'; /* sentinel */ + + return str; +} + +VALUE +rb_str_buf_cat(VALUE str, const char *ptr, long len) +{ + if (len == 0) return str; + if (len < 0) { + rb_raise(rb_eArgError, "negative string size (or size too big)"); + } + return str_buf_cat(str, ptr, len); +} + +VALUE +rb_str_buf_cat2(VALUE str, const char *ptr) +{ + return rb_str_buf_cat(str, ptr, strlen(ptr)); +} + +VALUE +rb_str_cat(VALUE str, const char *ptr, long len) +{ + if (len < 0) { + rb_raise(rb_eArgError, "negative string size (or size too big)"); + } + if (STR_ASSOC_P(str)) { + rb_str_modify(str); + if (STR_EMBED_P(str)) str_make_independent(str); + REALLOC_N(RSTRING(str)->as.heap.ptr, char, RSTRING(str)->as.heap.len+len+1); + memcpy(RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len, ptr, len); + RSTRING(str)->as.heap.len += len; + RSTRING(str)->as.heap.ptr[RSTRING(str)->as.heap.len] = '\0'; /* sentinel */ + return str; + } + + return rb_str_buf_cat(str, ptr, len); +} + +VALUE +rb_str_cat2(VALUE str, const char *ptr) +{ + return rb_str_cat(str, ptr, strlen(ptr)); +} + +static VALUE +rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len, + int ptr_encindex, int ptr_cr, int *ptr_cr_ret) +{ + int str_encindex = ENCODING_GET(str); + int res_encindex; + int str_cr, res_cr; + int str_a8 = ENCODING_IS_ASCII8BIT(str); + int ptr_a8 = ptr_encindex == 0; + + str_cr = ENC_CODERANGE(str); + + if (str_encindex == ptr_encindex) { + if (str_cr == ENC_CODERANGE_UNKNOWN || + (ptr_a8 && str_cr != ENC_CODERANGE_7BIT)) { + ptr_cr = ENC_CODERANGE_UNKNOWN; + } + else if (ptr_cr == ENC_CODERANGE_UNKNOWN) { + ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); + } + } + else { + rb_encoding *str_enc = rb_enc_from_index(str_encindex); + rb_encoding *ptr_enc = rb_enc_from_index(ptr_encindex); + if (!rb_enc_asciicompat(str_enc) || !rb_enc_asciicompat(ptr_enc)) { + if (len == 0) + return str; + if (RSTRING_LEN(str) == 0) { + rb_str_buf_cat(str, ptr, len); + ENCODING_CODERANGE_SET(str, ptr_encindex, ptr_cr); + return str; + } + goto incompatible; + } + if (ptr_cr == ENC_CODERANGE_UNKNOWN) { + ptr_cr = coderange_scan(ptr, len, ptr_enc); + } + if (str_cr == ENC_CODERANGE_UNKNOWN) { + if (str_a8 || ptr_cr != ENC_CODERANGE_7BIT) { + str_cr = rb_enc_str_coderange(str); + } + } + } + if (ptr_cr_ret) + *ptr_cr_ret = ptr_cr; + + if (str_encindex != ptr_encindex && + str_cr != ENC_CODERANGE_7BIT && + ptr_cr != ENC_CODERANGE_7BIT) { + incompatible: + rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s", + rb_enc_name(rb_enc_from_index(str_encindex)), + rb_enc_name(rb_enc_from_index(ptr_encindex))); + } + + if (str_cr == ENC_CODERANGE_UNKNOWN) { + res_encindex = str_encindex; + res_cr = ENC_CODERANGE_UNKNOWN; + } + else if (str_cr == ENC_CODERANGE_7BIT) { + if (ptr_cr == ENC_CODERANGE_7BIT) { + res_encindex = !str_a8 ? str_encindex : ptr_encindex; + res_cr = ENC_CODERANGE_7BIT; + } + else { + res_encindex = ptr_encindex; + res_cr = ptr_cr; + } + } + else if (str_cr == ENC_CODERANGE_VALID) { + res_encindex = str_encindex; + res_cr = str_cr; + } + else { /* str_cr == ENC_CODERANGE_BROKEN */ + res_encindex = str_encindex; + res_cr = str_cr; + if (0 < len) res_cr = ENC_CODERANGE_UNKNOWN; + } + + if (len < 0) { + rb_raise(rb_eArgError, "negative string size (or size too big)"); + } + str_buf_cat(str, ptr, len); + ENCODING_CODERANGE_SET(str, res_encindex, res_cr); + return str; +} + +VALUE +rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *ptr_enc) +{ + return rb_enc_cr_str_buf_cat(str, ptr, len, + rb_enc_to_index(ptr_enc), ENC_CODERANGE_UNKNOWN, NULL); +} + +VALUE +rb_str_buf_cat_ascii(VALUE str, const char *ptr) +{ + /* ptr must reference NUL terminated ASCII string. */ + int encindex = ENCODING_GET(str); + rb_encoding *enc = rb_enc_from_index(encindex); + if (rb_enc_asciicompat(enc)) { + return rb_enc_cr_str_buf_cat(str, ptr, strlen(ptr), + encindex, ENC_CODERANGE_7BIT, 0); + } + else { + char *buf = ALLOCA_N(char, rb_enc_mbmaxlen(enc)); + while (*ptr) { + unsigned int c = (unsigned char)*ptr; + int len = rb_enc_codelen(c, enc); + rb_enc_mbcput(c, buf, enc); + rb_enc_cr_str_buf_cat(str, buf, len, + encindex, ENC_CODERANGE_VALID, 0); + ptr++; + } + return str; + } +} + +VALUE +rb_str_buf_append(VALUE str, VALUE str2) +{ + int str2_cr; + + str2_cr = ENC_CODERANGE(str2); + + rb_enc_cr_str_buf_cat(str, RSTRING_PTR(str2), RSTRING_LEN(str2), + ENCODING_GET(str2), str2_cr, &str2_cr); + + OBJ_INFECT(str, str2); + ENC_CODERANGE_SET(str2, str2_cr); + + return str; +} + +VALUE +rb_str_append(VALUE str, VALUE str2) +{ + rb_encoding *enc; + int cr, cr2; + + StringValue(str2); + if (RSTRING_LEN(str2) > 0 && STR_ASSOC_P(str)) { + long len = RSTRING_LEN(str)+RSTRING_LEN(str2); + enc = rb_enc_check(str, str2); + cr = ENC_CODERANGE(str); + if ((cr2 = ENC_CODERANGE(str2)) > cr) cr = cr2; + rb_str_modify(str); + REALLOC_N(RSTRING(str)->as.heap.ptr, char, len+1); + memcpy(RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len, + RSTRING_PTR(str2), RSTRING_LEN(str2)+1); + RSTRING(str)->as.heap.len = len; + rb_enc_associate(str, enc); + ENC_CODERANGE_SET(str, cr); + OBJ_INFECT(str, str2); + return str; + } + return rb_str_buf_append(str, str2); +} + + +/* + * call-seq: + * str << integer => str + * str.concat(integer) => str + * str << obj => str + * str.concat(obj) => str + * + * Append---Concatenates the given object to str. If the object is a + * Integer, it is considered as a codepoint, and is converted + * to a character before concatenation. + * + * a = "hello " + * a << "world" #=> "hello world" + * a.concat(33) #=> "hello world!" + */ + +VALUE +rb_str_concat(VALUE str1, VALUE str2) +{ + if (FIXNUM_P(str2) || TYPE(str2) == T_BIGNUM) { + rb_encoding *enc = STR_ENC_GET(str1); + unsigned int c = NUM2UINT(str2); + int pos = RSTRING_LEN(str1); + int len = rb_enc_codelen(c, enc); + int cr = ENC_CODERANGE(str1); + + rb_str_resize(str1, pos+len); + rb_enc_mbcput(c, RSTRING_PTR(str1)+pos, enc); + ENC_CODERANGE_SET(str1, cr); + return str1; + } + return rb_str_append(str1, str2); +} + +#if defined __i386__ || defined _M_IX86 +#define UNALIGNED_WORD_ACCESS 1 +#endif +#ifndef UNALIGNED_WORD_ACCESS +#define UNALIGNED_WORD_ACCESS 0 +#endif + +/* MurmurHash described in http://murmurhash.googlepages.com/ */ +static unsigned int +hash(const unsigned char * data, int len, unsigned int h) +{ + const unsigned int m = 0x7fd652ad; + const int r = 16; + + h += 0xdeadbeef; + + if (len >= 4) { +#if !UNALIGNED_WORD_ACCESS + int align = (VALUE)data & 3; + if (align) { + uint32_t t = 0, d = 0; + int sl, sr, pack; + + switch (align) { +#ifdef WORDS_BIGENDIAN + case 1: t |= data[2]; + case 2: t |= data[1] << 8; + case 3: t |= data[0] << 16; +#else + case 1: t |= data[2] << 16; + case 2: t |= data[1] << 8; + case 3: t |= data[0]; +#endif + } + +#ifdef WORDS_BIGENDIAN + t >>= (8 * align) - 8; +#else + t <<= (8 * align); +#endif + + data += 4-align; + len -= 4-align; + + sl = 8 * (4-align); + sr = 8 * align; + + while (len >= 4) { + d = *(uint32_t *)data; +#ifdef WORDS_BIGENDIAN + t = (t << sr) | (d >> sl); +#else + t = (t >> sr) | (d << sl); +#endif + h += t; + h *= m; + h ^= h >> r; + t = d; + + data += 4; + len -= 4; + } + + pack = len < align ? len : align; + d = 0; + switch (pack) { +#ifdef WORDS_BIGENDIAN + case 3: d |= data[2] << 8; + case 2: d |= data[1] << 16; + case 1: d |= data[0] << 24; + case 0: + h += (t << sr) | (d >> sl); +#else + case 3: d |= data[2] << 16; + case 2: d |= data[1] << 8; + case 1: d |= data[0]; + case 0: + h += (t >> sr) | (d << sl); +#endif + h *= m; + h ^= h >> r; + } + + data += pack; + len -= pack; + } + else +#endif + { + do { + h += *(uint32_t *)data; + h *= m; + h ^= h >> r; + + data += 4; + len -= 4; + } while (len >= 4); + } + } + + switch(len) { +#ifdef WORDS_BIGENDIAN + case 3: + h += data[2] << 8; + case 2: + h += data[1] << 16; + case 1: + h += data[0] << 24; +#else + case 3: + h += data[2] << 16; + case 2: + h += data[1] << 8; + case 1: + h += data[0]; +#endif + h *= m; + h ^= h >> r; + } + + h *= m; + h ^= h >> 10; + h *= m; + h ^= h >> 17; + + return h; +} + +int +rb_memhash(const void *ptr, long len) +{ + static int hashseed_init = 0; + static unsigned int hashseed; + + if (!hashseed_init) { + hashseed = rb_genrand_int32(); + hashseed_init = 1; + } + + return hash(ptr, len, hashseed); +} + +int +rb_str_hash(VALUE str) +{ + int e = ENCODING_GET(str); + if (e) { + if (rb_enc_str_asciionly_p(str)) e = 0; + } + return rb_memhash((const void *)RSTRING_PTR(str), RSTRING_LEN(str)) ^ e; +} + +int +rb_str_hash_cmp(VALUE str1, VALUE str2) +{ + int len; + + if (!rb_str_comparable(str1, str2)) return 1; + if (RSTRING_LEN(str1) == (len = RSTRING_LEN(str2)) && + memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), len) == 0) { + return 0; + } + return 1; +} + +/* + * call-seq: + * str.hash => fixnum + * + * Return a hash based on the string's length and content. + */ + +static VALUE +rb_str_hash_m(VALUE str) +{ + int hval = rb_str_hash(str); + return INT2FIX(hval); +} + +#define lesser(a,b) (((a)>(b))?(b):(a)) + +int +rb_str_comparable(VALUE str1, VALUE str2) +{ + int idx1, idx2; + int rc1, rc2; + + if (RSTRING_LEN(str1) == 0) return Qtrue; + if (RSTRING_LEN(str2) == 0) return Qtrue; + idx1 = ENCODING_GET(str1); + idx2 = ENCODING_GET(str2); + if (idx1 == idx2) return Qtrue; + rc1 = rb_enc_str_coderange(str1); + rc2 = rb_enc_str_coderange(str2); + if (rc1 == ENC_CODERANGE_7BIT) { + if (rc2 == ENC_CODERANGE_7BIT) return Qtrue; + if (rb_enc_asciicompat(rb_enc_from_index(idx2))) + return Qtrue; + } + if (rc2 == ENC_CODERANGE_7BIT) { + if (rb_enc_asciicompat(rb_enc_from_index(idx1))) + return Qtrue; + } + return Qfalse; +} + +int +rb_str_cmp(VALUE str1, VALUE str2) +{ + long len; + int retval; + + len = lesser(RSTRING_LEN(str1), RSTRING_LEN(str2)); + retval = memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), len); + if (retval == 0) { + if (RSTRING_LEN(str1) == RSTRING_LEN(str2)) { + if (!rb_str_comparable(str1, str2)) { + if (ENCODING_GET(str1) > ENCODING_GET(str2)) + return 1; + return -1; + } + return 0; + } + if (RSTRING_LEN(str1) > RSTRING_LEN(str2)) return 1; + return -1; + } + if (retval > 0) return 1; + return -1; +} + + +/* + * call-seq: + * str == obj => true or false + * + * Equality---If obj is not a String, returns + * false. Otherwise, returns true if str + * <=> obj returns zero. + */ + +VALUE +rb_str_equal(VALUE str1, VALUE str2) +{ + int len; + + if (str1 == str2) return Qtrue; + if (TYPE(str2) != T_STRING) { + if (!rb_respond_to(str2, rb_intern("to_str"))) { + return Qfalse; + } + return rb_equal(str2, str1); + } + if (!rb_str_comparable(str1, str2)) return Qfalse; + if (RSTRING_LEN(str1) == (len = RSTRING_LEN(str2)) && + memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), len) == 0) { + return Qtrue; + } + return Qfalse; +} + +/* + * call-seq: + * str.eql?(other) => true or false + * + * Two strings are equal if the have the same length and content. + */ + +static VALUE +rb_str_eql(VALUE str1, VALUE str2) +{ + if (TYPE(str2) != T_STRING || RSTRING_LEN(str1) != RSTRING_LEN(str2)) + return Qfalse; + + if (!rb_str_comparable(str1, str2)) return Qfalse; + if (memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), + lesser(RSTRING_LEN(str1), RSTRING_LEN(str2))) == 0) + return Qtrue; + + return Qfalse; +} + +/* + * call-seq: + * str <=> other_str => -1, 0, +1 + * + * Comparison---Returns -1 if other_str is greater than, 0 if + * other_str is equal to, and +1 if other_str is less than + * str. If the strings are of different lengths, and the strings are + * equal when compared up to the shortest length, then the longer string is + * considered greater than the shorter one. In older versions of Ruby, setting + * $= allowed case-insensitive comparisons; this is now deprecated + * in favor of using String#casecmp. + * + * <=> is the basis for the methods <, + * <=, >, >=, and between?, + * included from module Comparable. The method + * String#== does not use Comparable#==. + * + * "abcdef" <=> "abcde" #=> 1 + * "abcdef" <=> "abcdef" #=> 0 + * "abcdef" <=> "abcdefg" #=> -1 + * "abcdef" <=> "ABCDEF" #=> 1 + */ + +static VALUE +rb_str_cmp_m(VALUE str1, VALUE str2) +{ + long result; + + if (TYPE(str2) != T_STRING) { + if (!rb_respond_to(str2, rb_intern("to_str"))) { + return Qnil; + } + else if (!rb_respond_to(str2, rb_intern("<=>"))) { + return Qnil; + } + else { + VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1); + + if (NIL_P(tmp)) return Qnil; + if (!FIXNUM_P(tmp)) { + return rb_funcall(LONG2FIX(0), '-', 1, tmp); + } + result = -FIX2LONG(tmp); + } + } + else { + result = rb_str_cmp(str1, str2); + } + return LONG2NUM(result); +} + +/* + * call-seq: + * str.casecmp(other_str) => -1, 0, +1 + * + * Case-insensitive version of String#<=>. + * + * "abcdef".casecmp("abcde") #=> 1 + * "aBcDeF".casecmp("abcdef") #=> 0 + * "abcdef".casecmp("abcdefg") #=> -1 + * "abcdef".casecmp("ABCDEF") #=> 0 + */ + +static VALUE +rb_str_casecmp(VALUE str1, VALUE str2) +{ + long len; + rb_encoding *enc; + char *p1, *p1end, *p2, *p2end; + + StringValue(str2); + enc = rb_enc_compatible(str1, str2); + if (!enc) { + return Qnil; + } + + p1 = RSTRING_PTR(str1); p1end = RSTRING_END(str1); + p2 = RSTRING_PTR(str2); p2end = RSTRING_END(str2); + if (single_byte_optimizable(str1) && single_byte_optimizable(str2)) { + while (p1 < p1end && p2 < p2end) { + if (*p1 != *p2) { + unsigned int c1 = TOUPPER(*p1 & 0xff); + unsigned int c2 = TOUPPER(*p2 & 0xff); + if (c1 != c2) + return INT2FIX(c1 < c2 ? -1 : 1); + } + p1++; + p2++; + } + } + else { + while (p1 < p1end && p2 < p2end) { + int l1, c1 = rb_enc_ascget(p1, p1end, &l1, enc); + int l2, c2 = rb_enc_ascget(p2, p2end, &l2, enc); + + if (0 <= c1 && 0 <= c2) { + c1 = TOUPPER(c1); + c2 = TOUPPER(c2); + if (c1 != c2) + return INT2FIX(c1 < c2 ? -1 : 1); + } + else { + int r; + l1 = rb_enc_mbclen(p1, p1end, enc); + l2 = rb_enc_mbclen(p2, p2end, enc); + len = l1 < l2 ? l1 : l2; + r = memcmp(p1, p2, len); + if (r != 0) + return INT2FIX(r < 0 ? -1 : 1); + if (l1 != l2) + return INT2FIX(l1 < l2 ? -1 : 1); + } + p1 += l1; + p2 += l2; + } + } + if (RSTRING_LEN(str1) == RSTRING_LEN(str2)) return INT2FIX(0); + if (RSTRING_LEN(str1) > RSTRING_LEN(str2)) return INT2FIX(1); + return INT2FIX(-1); +} + +static long +rb_str_index(VALUE str, VALUE sub, long offset) +{ + long pos; + char *s, *sptr, *e; + long len, slen; + rb_encoding *enc; + + enc = rb_enc_check(str, sub); + if (is_broken_string(sub)) { + return -1; + } + len = str_strlen(str, enc); + slen = str_strlen(sub, enc); + if (offset < 0) { + offset += len; + if (offset < 0) return -1; + } + if (len - offset < slen) return -1; + s = RSTRING_PTR(str); + e = s + RSTRING_LEN(str); + if (offset) { + offset = str_offset(s, RSTRING_END(str), offset, enc, single_byte_optimizable(str)); + s += offset; + } + if (slen == 0) return offset; + /* need proceed one character at a time */ + sptr = RSTRING_PTR(sub); + slen = RSTRING_LEN(sub); + len = RSTRING_LEN(str) - offset; + for (;;) { + char *t; + pos = rb_memsearch(sptr, slen, s, len, enc); + if (pos < 0) return pos; + t = rb_enc_right_char_head(s, s+pos, e, enc); + if (t == s + pos) break; + if ((len -= t - s) <= 0) return -1; + offset += t - s; + s = t; + } + return pos + offset; +} + + +/* + * call-seq: + * str.index(substring [, offset]) => fixnum or nil + * str.index(regexp [, offset]) => fixnum or nil + * + * Returns the index of the first occurrence of the given substring or + * pattern (regexp) in str. Returns nil if not + * found. If the second parameter is present, it specifies the position in the + * string to begin the search. + * + * "hello".index('e') #=> 1 + * "hello".index('lo') #=> 3 + * "hello".index('a') #=> nil + * "hello".index(?e) #=> 1 + * "hello".index(/[aeiou]/, -3) #=> 4 + */ + +static VALUE +rb_str_index_m(int argc, VALUE *argv, VALUE str) +{ + VALUE sub; + VALUE initpos; + long pos; + + if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) { + pos = NUM2LONG(initpos); + } + else { + pos = 0; + } + if (pos < 0) { + pos += str_strlen(str, STR_ENC_GET(str)); + if (pos < 0) { + if (TYPE(sub) == T_REGEXP) { + rb_backref_set(Qnil); + } + return Qnil; + } + } + + switch (TYPE(sub)) { + case T_REGEXP: + pos = str_offset(RSTRING_PTR(str), RSTRING_END(str), pos, + rb_enc_check(str, sub), single_byte_optimizable(str)); + + pos = rb_reg_adjust_startpos(sub, str, pos, 0); + pos = rb_reg_search(sub, str, pos, 0); + pos = rb_str_sublen(str, pos); + break; + + default: { + VALUE tmp; + + tmp = rb_check_string_type(sub); + if (NIL_P(tmp)) { + rb_raise(rb_eTypeError, "type mismatch: %s given", + rb_obj_classname(sub)); + } + sub = tmp; + } + /* fall through */ + case T_STRING: + pos = rb_str_index(str, sub, pos); + pos = rb_str_sublen(str, pos); + break; + } + + if (pos == -1) return Qnil; + return LONG2NUM(pos); +} + +static long +rb_str_rindex(VALUE str, VALUE sub, long pos) +{ + long len, slen; + char *s, *sbeg, *e, *t; + rb_encoding *enc; + int singlebyte = single_byte_optimizable(str); + + enc = rb_enc_check(str, sub); + if (is_broken_string(sub)) { + return -1; + } + len = str_strlen(str, enc); + slen = str_strlen(sub, enc); + /* substring longer than string */ + if (len < slen) return -1; + if (len - pos < slen) { + pos = len - slen; + } + if (len == 0) { + return pos; + } + sbeg = RSTRING_PTR(str); + e = RSTRING_END(str); + t = RSTRING_PTR(sub); + slen = RSTRING_LEN(sub); + for (;;) { + s = str_nth(sbeg, e, pos, enc, singlebyte); + if (!s) return -1; + if (memcmp(s, t, slen) == 0) { + return pos; + } + if (pos == 0) break; + pos--; + } + return -1; +} + + +/* + * call-seq: + * str.rindex(substring [, fixnum]) => fixnum or nil + * str.rindex(regexp [, fixnum]) => fixnum or nil + * + * Returns the index of the last occurrence of the given substring or + * pattern (regexp) in str. Returns nil if not + * found. If the second parameter is present, it specifies the position in the + * string to end the search---characters beyond this point will not be + * considered. + * + * "hello".rindex('e') #=> 1 + * "hello".rindex('l') #=> 3 + * "hello".rindex('a') #=> nil + * "hello".rindex(?e) #=> 1 + * "hello".rindex(/[aeiou]/, -2) #=> 1 + */ + +static VALUE +rb_str_rindex_m(int argc, VALUE *argv, VALUE str) +{ + VALUE sub; + VALUE vpos; + rb_encoding *enc = STR_ENC_GET(str); + long pos, len = str_strlen(str, enc); + + if (rb_scan_args(argc, argv, "11", &sub, &vpos) == 2) { + pos = NUM2LONG(vpos); + if (pos < 0) { + pos += len; + if (pos < 0) { + if (TYPE(sub) == T_REGEXP) { + rb_backref_set(Qnil); + } + return Qnil; + } + } + if (pos > len) pos = len; + } + else { + pos = len; + } + + switch (TYPE(sub)) { + case T_REGEXP: + /* enc = rb_get_check(str, sub); */ + pos = str_offset(RSTRING_PTR(str), RSTRING_END(str), pos, + STR_ENC_GET(str), single_byte_optimizable(str)); + + if (!RREGEXP(sub)->ptr || RREGEXP_SRC_LEN(sub)) { + pos = rb_reg_adjust_startpos(sub, str, pos, 1); + pos = rb_reg_search(sub, str, pos, 1); + pos = rb_str_sublen(str, pos); + } + if (pos >= 0) return LONG2NUM(pos); + break; + + default: { + VALUE tmp; + + tmp = rb_check_string_type(sub); + if (NIL_P(tmp)) { + rb_raise(rb_eTypeError, "type mismatch: %s given", + rb_obj_classname(sub)); + } + sub = tmp; + } + /* fall through */ + case T_STRING: + pos = rb_str_rindex(str, sub, pos); + if (pos >= 0) return LONG2NUM(pos); + break; + } + return Qnil; +} + +/* + * call-seq: + * str =~ obj => fixnum or nil + * + * Match---If obj is a Regexp, use it as a pattern to match + * against str,and returns the position the match starts, or + * nil if there is no match. Otherwise, invokes + * obj.=~, passing str as an argument. The default + * =~ in Object returns false. + * + * "cat o' 9 tails" =~ /\d/ #=> 7 + * "cat o' 9 tails" =~ 9 #=> nil + */ + +static VALUE +rb_str_match(VALUE x, VALUE y) +{ + switch (TYPE(y)) { + case T_STRING: + rb_raise(rb_eTypeError, "type mismatch: String given"); + + case T_REGEXP: + return rb_reg_match(y, x); + + default: + return rb_funcall(y, rb_intern("=~"), 1, x); + } +} + + +static VALUE get_pat(VALUE, int); + + +/* + * call-seq: + * str.match(pattern) => matchdata or nil + * + * Converts pattern to a Regexp (if it isn't already one), + * then invokes its match method on str. If the second + * parameter is present, it specifies the position in the string to begin the + * search. + * + * 'hello'.match('(.)\1') #=> # + * 'hello'.match('(.)\1')[0] #=> "ll" + * 'hello'.match(/(.)\1/)[0] #=> "ll" + * 'hello'.match('xx') #=> nil + * + * If a block is given, invoke the block with MatchData if match succeed, so + * that you can write + * + * str.match(pat) {|m| ...} + * + * instead of + * + * if m = str.match(pat) + * ... + * end + * + * The return value is a value from block execution in this case. + */ + +static VALUE +rb_str_match_m(int argc, VALUE *argv, VALUE str) +{ + VALUE re, result; + if (argc < 1) + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); + re = argv[0]; + argv[0] = str; + result = rb_funcall2(get_pat(re, 0), rb_intern("match"), argc, argv); + if (!NIL_P(result) && rb_block_given_p()) { + return rb_yield(result); + } + return result; +} + +enum neighbor_char { + NEIGHBOR_NOT_CHAR, + NEIGHBOR_FOUND, + NEIGHBOR_WRAPPED +}; + +static enum neighbor_char +enc_succ_char(char *p, int len, rb_encoding *enc) +{ + int i, l; + while (1) { + for (i = len-1; 0 <= i && (unsigned char)p[i] == 0xff; i--) + p[i] = '\0'; + if (i < 0) + return NEIGHBOR_WRAPPED; + ++((unsigned char*)p)[i]; + l = rb_enc_precise_mbclen(p, p+len, enc); + if (MBCLEN_CHARFOUND_P(l)) { + l = MBCLEN_CHARFOUND_LEN(l); + if (l == len) { + return NEIGHBOR_FOUND; + } + else { + memset(p+l, 0xff, len-l); + } + } + if (MBCLEN_INVALID_P(l) && i < len-1) { + int len2, l2; + for (len2 = len-1; 0 < len2; len2--) { + l2 = rb_enc_precise_mbclen(p, p+len2, enc); + if (!MBCLEN_INVALID_P(l2)) + break; + } + memset(p+len2+1, 0xff, len-(len2+1)); + } + } +} + +static enum neighbor_char +enc_pred_char(char *p, int len, rb_encoding *enc) +{ + int i, l; + while (1) { + for (i = len-1; 0 <= i && (unsigned char)p[i] == 0; i--) + p[i] = '\xff'; + if (i < 0) + return NEIGHBOR_WRAPPED; + --((unsigned char*)p)[i]; + l = rb_enc_precise_mbclen(p, p+len, enc); + if (MBCLEN_CHARFOUND_P(l)) { + l = MBCLEN_CHARFOUND_LEN(l); + if (l == len) { + return NEIGHBOR_FOUND; + } + else { + memset(p+l, 0, len-l); + } + } + if (MBCLEN_INVALID_P(l) && i < len-1) { + int len2, l2; + for (len2 = len-1; 0 < len2; len2--) { + l2 = rb_enc_precise_mbclen(p, p+len2, enc); + if (!MBCLEN_INVALID_P(l2)) + break; + } + memset(p+len2+1, 0, len-(len2+1)); + } + } +} + +/* + overwrite +p+ by succeeding letter in +enc+ and returns + NEIGHBOR_FOUND or NEIGHBOR_WRAPPED. + When NEIGHBOR_WRAPPED, carried-out letter is stored into carry. + assuming each ranges are successive, and mbclen + never change in each ranges. + NEIGHBOR_NOT_CHAR is returned if invalid character or the range has only one + character. + */ +static enum neighbor_char +enc_succ_alnum_char(char *p, int len, rb_encoding *enc, char *carry) +{ + enum neighbor_char ret; + unsigned int c; + int ctype; + int range; + char save[ONIGENC_CODE_TO_MBC_MAXLEN]; + + c = rb_enc_mbc_to_codepoint(p, p+len, enc); + if (rb_enc_isctype(c, ONIGENC_CTYPE_DIGIT, enc)) + ctype = ONIGENC_CTYPE_DIGIT; + else if (rb_enc_isctype(c, ONIGENC_CTYPE_ALPHA, enc)) + ctype = ONIGENC_CTYPE_ALPHA; + else + return NEIGHBOR_NOT_CHAR; + + MEMCPY(save, p, char, len); + ret = enc_succ_char(p, len, enc); + if (ret == NEIGHBOR_FOUND) { + c = rb_enc_mbc_to_codepoint(p, p+len, enc); + if (rb_enc_isctype(c, ctype, enc)) + return NEIGHBOR_FOUND; + } + MEMCPY(p, save, char, len); + range = 1; + while (1) { + MEMCPY(save, p, char, len); + ret = enc_pred_char(p, len, enc); + if (ret == NEIGHBOR_FOUND) { + c = rb_enc_mbc_to_codepoint(p, p+len, enc); + if (!rb_enc_isctype(c, ctype, enc)) { + MEMCPY(p, save, char, len); + break; + } + } + else { + MEMCPY(p, save, char, len); + break; + } + range++; + } + if (range == 1) { + return NEIGHBOR_NOT_CHAR; + } + + if (ctype != ONIGENC_CTYPE_DIGIT) { + MEMCPY(carry, p, char, len); + return NEIGHBOR_WRAPPED; + } + + MEMCPY(carry, p, char, len); + enc_succ_char(carry, len, enc); + return NEIGHBOR_WRAPPED; +} + + +/* + * call-seq: + * str.succ => new_str + * str.next => new_str + * + * Returns the successor to str. The successor is calculated by + * incrementing characters starting from the rightmost alphanumeric (or + * the rightmost character if there are no alphanumerics) in the + * string. Incrementing a digit always results in another digit, and + * incrementing a letter results in another letter of the same case. + * Incrementing nonalphanumerics uses the underlying character set's + * collating sequence. + * + * If the increment generates a ``carry,'' the character to the left of + * it is incremented. This process repeats until there is no carry, + * adding an additional character if necessary. + * + * "abcd".succ #=> "abce" + * "THX1138".succ #=> "THX1139" + * "<>".succ #=> "<>" + * "1999zzz".succ #=> "2000aaa" + * "ZZZ9999".succ #=> "AAAA0000" + * "***".succ #=> "**+" + */ + +VALUE +rb_str_succ(VALUE orig) +{ + rb_encoding *enc; + VALUE str; + char *sbeg, *s, *e, *last_alnum = 0; + int c = -1; + long l; + char carry[ONIGENC_CODE_TO_MBC_MAXLEN] = "\1"; + int carry_pos = 0, carry_len = 1; + enum neighbor_char neighbor = NEIGHBOR_FOUND; + + str = rb_str_new5(orig, RSTRING_PTR(orig), RSTRING_LEN(orig)); + rb_enc_cr_str_copy_for_substr(str, orig); + OBJ_INFECT(str, orig); + if (RSTRING_LEN(str) == 0) return str; + + enc = STR_ENC_GET(orig); + sbeg = RSTRING_PTR(str); + s = e = sbeg + RSTRING_LEN(str); + + while ((s = rb_enc_prev_char(sbeg, s, e, enc)) != 0) { + if (neighbor == NEIGHBOR_NOT_CHAR && last_alnum) { + if (ISALPHA(*last_alnum) ? ISDIGIT(*s) : + ISDIGIT(*last_alnum) ? ISALPHA(*s) : 0) { + s = last_alnum; + break; + } + } + if ((l = rb_enc_precise_mbclen(s, e, enc)) <= 0) continue; + neighbor = enc_succ_alnum_char(s, l, enc, carry); + switch (neighbor) { + case NEIGHBOR_NOT_CHAR: + continue; + case NEIGHBOR_FOUND: + return str; + case NEIGHBOR_WRAPPED: + last_alnum = s; + break; + } + c = 1; + carry_pos = s - sbeg; + carry_len = l; + } + if (c == -1) { /* str contains no alnum */ + s = e; + while ((s = rb_enc_prev_char(sbeg, s, e, enc)) != 0) { + enum neighbor_char neighbor; + if ((l = rb_enc_precise_mbclen(s, e, enc)) <= 0) continue; + neighbor = enc_succ_char(s, l, enc); + if (neighbor == NEIGHBOR_FOUND) + return str; + if (rb_enc_precise_mbclen(s, s+l, enc) != l) { + /* wrapped to \0...\0. search next valid char. */ + enc_succ_char(s, l, enc); + } + if (!rb_enc_asciicompat(enc)) { + MEMCPY(carry, s, char, l); + carry_len = l; + } + carry_pos = s - sbeg; + } + } + RESIZE_CAPA(str, RSTRING_LEN(str) + carry_len); + s = RSTRING_PTR(str) + carry_pos; + memmove(s + carry_len, s, RSTRING_LEN(str) - carry_pos); + memmove(s, carry, carry_len); + STR_SET_LEN(str, RSTRING_LEN(str) + carry_len); + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + rb_enc_str_coderange(str); + return str; +} + + +/* + * call-seq: + * str.succ! => str + * str.next! => str + * + * Equivalent to String#succ, but modifies the receiver in + * place. + */ + +static VALUE +rb_str_succ_bang(VALUE str) +{ + rb_str_shared_replace(str, rb_str_succ(str)); + + return str; +} + + +/* + * call-seq: + * str.upto(other_str, exclusive=false) {|s| block } => str + * + * Iterates through successive values, starting at str and + * ending at other_str inclusive, passing each value in turn to + * the block. The String#succ method is used to generate + * each value. If optional second argument exclusive is omitted or is false, + * the last value will be included; otherwise it will be excluded. + * + * "a8".upto("b6") {|s| print s, ' ' } + * for s in "a8".."b6" + * print s, ' ' + * end + * + * produces: + * + * a8 a9 b0 b1 b2 b3 b4 b5 b6 + * a8 a9 b0 b1 b2 b3 b4 b5 b6 + */ + +static VALUE +rb_str_upto(int argc, VALUE *argv, VALUE beg) +{ + VALUE end, exclusive; + VALUE current, after_end; + ID succ; + int n, excl; + rb_encoding *enc; + + rb_scan_args(argc, argv, "11", &end, &exclusive); + RETURN_ENUMERATOR(beg, argc, argv); + excl = RTEST(exclusive); + CONST_ID(succ, "succ"); + StringValue(end); + enc = rb_enc_check(beg, end); + if (RSTRING_LEN(beg) == 1 && RSTRING_LEN(end) == 1 && + is_ascii_string(beg) && is_ascii_string(end)) { + char c = RSTRING_PTR(beg)[0]; + char e = RSTRING_PTR(end)[0]; + + if (c > e || (excl && c == e)) return beg; + for (;;) { + rb_yield(rb_enc_str_new(&c, 1, enc)); + if (!excl && c == e) break; + c++; + if (excl && c == e) break; + } + return beg; + } + n = rb_str_cmp(beg, end); + if (n > 0 || (excl && n == 0)) return beg; + + after_end = rb_funcall(end, succ, 0, 0); + current = beg; + while (!rb_str_equal(current, after_end)) { + rb_yield(current); + if (!excl && rb_str_equal(current, end)) break; + current = rb_funcall(current, succ, 0, 0); + StringValue(current); + if (excl && rb_str_equal(current, end)) break; + if (RSTRING_LEN(current) > RSTRING_LEN(end) || RSTRING_LEN(current) == 0) + break; + } + + return beg; +} + +static VALUE +rb_str_subpat(VALUE str, VALUE re, int nth) +{ + if (rb_reg_search(re, str, 0, 0) >= 0) { + return rb_reg_nth_match(nth, rb_backref_get()); + } + return Qnil; +} + +static VALUE +rb_str_aref(VALUE str, VALUE indx) +{ + long idx; + + switch (TYPE(indx)) { + case T_FIXNUM: + idx = FIX2LONG(indx); + + num_index: + str = rb_str_substr(str, idx, 1); + if (!NIL_P(str) && RSTRING_LEN(str) == 0) return Qnil; + return str; + + case T_REGEXP: + return rb_str_subpat(str, indx, 0); + + case T_STRING: + if (rb_str_index(str, indx, 0) != -1) + return rb_str_dup(indx); + return Qnil; + + default: + /* check if indx is Range */ + { + long beg, len; + VALUE tmp; + + len = str_strlen(str, STR_ENC_GET(str)); + switch (rb_range_beg_len(indx, &beg, &len, len, 0)) { + case Qfalse: + break; + case Qnil: + return Qnil; + default: + tmp = rb_str_substr(str, beg, len); + return tmp; + } + } + idx = NUM2LONG(indx); + goto num_index; + } + return Qnil; /* not reached */ +} + + +/* + * call-seq: + * str[fixnum] => new_str or nil + * str[fixnum, fixnum] => new_str or nil + * str[range] => new_str or nil + * str[regexp] => new_str or nil + * str[regexp, fixnum] => new_str or nil + * str[other_str] => new_str or nil + * str.slice(fixnum) => new_str or nil + * str.slice(fixnum, fixnum) => new_str or nil + * str.slice(range) => new_str or nil + * str.slice(regexp) => new_str or nil + * str.slice(regexp, fixnum) => new_str or nil + * str.slice(other_str) => new_str or nil + * + * Element Reference---If passed a single Fixnum, returns a + * substring of one character at that position. If passed two Fixnum + * objects, returns a substring starting at the offset given by the first, and + * a length given by the second. If given a range, a substring containing + * characters at offsets given by the range is returned. In all three cases, if + * an offset is negative, it is counted from the end of str. Returns + * nil if the initial offset falls outside the string, the length + * is negative, or the beginning of the range is greater than the end. + * + * If a Regexp is supplied, the matching portion of str is + * returned. If a numeric parameter follows the regular expression, that + * component of the MatchData is returned instead. If a + * String is given, that string is returned if it occurs in + * str. In both cases, nil is returned if there is no + * match. + * + * a = "hello there" + * a[1] #=> "e" + * a[1,3] #=> "ell" + * a[1..3] #=> "ell" + * a[-3,2] #=> "er" + * a[-4..-2] #=> "her" + * a[12..-1] #=> nil + * a[-2..-4] #=> "" + * a[/[aeiou](.)\1/] #=> "ell" + * a[/[aeiou](.)\1/, 0] #=> "ell" + * a[/[aeiou](.)\1/, 1] #=> "l" + * a[/[aeiou](.)\1/, 2] #=> nil + * a["lo"] #=> "lo" + * a["bye"] #=> nil + */ + +static VALUE +rb_str_aref_m(int argc, VALUE *argv, VALUE str) +{ + if (argc == 2) { + if (TYPE(argv[0]) == T_REGEXP) { + return rb_str_subpat(str, argv[0], NUM2INT(argv[1])); + } + return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1])); + } + if (argc != 1) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); + } + return rb_str_aref(str, argv[0]); +} + +VALUE +rb_str_drop_bytes(VALUE str, long len) +{ + char *ptr = RSTRING_PTR(str); + long olen = RSTRING_LEN(str), nlen; + + str_modifiable(str); + if (len > olen) len = olen; + nlen = olen - len; + if (nlen <= RSTRING_EMBED_LEN_MAX) { + char *oldptr = ptr; + int fl = (RBASIC(str)->flags & (STR_NOEMBED|ELTS_SHARED)); + STR_SET_EMBED(str); + STR_SET_EMBED_LEN(str, nlen); + ptr = RSTRING(str)->as.ary; + memmove(ptr, oldptr + len, nlen); + if (fl == STR_NOEMBED) xfree(oldptr); + } + else { + if (!STR_SHARED_P(str)) rb_str_new4(str); + ptr = RSTRING(str)->as.heap.ptr += len; + RSTRING(str)->as.heap.len = nlen; + } + ptr[nlen] = 0; + ENC_CODERANGE_CLEAR(str); + return str; +} + +static void +rb_str_splice_0(VALUE str, long beg, long len, VALUE val) +{ + if (beg == 0 && RSTRING_LEN(val) == 0) { + rb_str_drop_bytes(str, len); + OBJ_INFECT(str, val); + return; + } + + rb_str_modify(str); + if (len < RSTRING_LEN(val)) { + /* expand string */ + RESIZE_CAPA(str, RSTRING_LEN(str) + RSTRING_LEN(val) - len + 1); + } + + if (RSTRING_LEN(val) != len) { + memmove(RSTRING_PTR(str) + beg + RSTRING_LEN(val), + RSTRING_PTR(str) + beg + len, + RSTRING_LEN(str) - (beg + len)); + } + if (RSTRING_LEN(val) < beg && len < 0) { + MEMZERO(RSTRING_PTR(str) + RSTRING_LEN(str), char, -len); + } + if (RSTRING_LEN(val) > 0) { + memmove(RSTRING_PTR(str)+beg, RSTRING_PTR(val), RSTRING_LEN(val)); + } + STR_SET_LEN(str, RSTRING_LEN(str) + RSTRING_LEN(val) - len); + if (RSTRING_PTR(str)) { + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + } + OBJ_INFECT(str, val); +} + +static void +rb_str_splice(VALUE str, long beg, long len, VALUE val) +{ + long slen; + char *p, *e; + rb_encoding *enc; + int singlebyte = single_byte_optimizable(str); + int cr; + + if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len); + + StringValue(val); + enc = rb_enc_check(str, val); + slen = str_strlen(str, enc); + + if (slen < beg) { + out_of_range: + rb_raise(rb_eIndexError, "index %ld out of string", beg); + } + if (beg < 0) { + if (-beg > slen) { + goto out_of_range; + } + beg += slen; + } + if (slen < len || slen < beg + len) { + len = slen - beg; + } + str_modify_keep_cr(str); + p = str_nth(RSTRING_PTR(str), RSTRING_END(str), beg, enc, singlebyte); + if (!p) p = RSTRING_END(str); + e = str_nth(p, RSTRING_END(str), len, enc, singlebyte); + if (!e) e = RSTRING_END(str); + /* error check */ + beg = p - RSTRING_PTR(str); /* physical position */ + len = e - p; /* physical length */ + rb_str_splice_0(str, beg, len, val); + rb_enc_associate(str, enc); + cr = ENC_CODERANGE_AND(ENC_CODERANGE(str), ENC_CODERANGE(val)); + if (cr != ENC_CODERANGE_BROKEN) + ENC_CODERANGE_SET(str, cr); +} + +void +rb_str_update(VALUE str, long beg, long len, VALUE val) +{ + rb_str_splice(str, beg, len, val); +} + +static void +rb_str_subpat_set(VALUE str, VALUE re, int nth, VALUE val) +{ + VALUE match; + long start, end, len; + rb_encoding *enc; + struct re_registers *regs; + + if (rb_reg_search(re, str, 0, 0) < 0) { + rb_raise(rb_eIndexError, "regexp not matched"); + } + match = rb_backref_get(); + regs = RMATCH_REGS(match); + if (nth >= regs->num_regs) { + out_of_range: + rb_raise(rb_eIndexError, "index %d out of regexp", nth); + } + if (nth < 0) { + if (-nth >= regs->num_regs) { + goto out_of_range; + } + nth += regs->num_regs; + } + + start = BEG(nth); + if (start == -1) { + rb_raise(rb_eIndexError, "regexp group %d not matched", nth); + } + end = END(nth); + len = end - start; + StringValue(val); + enc = rb_enc_check(str, val); + rb_str_splice_0(str, start, len, val); + rb_enc_associate(str, enc); +} + +static VALUE +rb_str_aset(VALUE str, VALUE indx, VALUE val) +{ + long idx, beg; + + switch (TYPE(indx)) { + case T_FIXNUM: + idx = FIX2LONG(indx); + num_index: + rb_str_splice(str, idx, 1, val); + return val; + + case T_REGEXP: + rb_str_subpat_set(str, indx, 0, val); + return val; + + case T_STRING: + beg = rb_str_index(str, indx, 0); + if (beg < 0) { + rb_raise(rb_eIndexError, "string not matched"); + } + beg = rb_str_sublen(str, beg); + rb_str_splice(str, beg, str_strlen(indx, 0), val); + return val; + + default: + /* check if indx is Range */ + { + long beg, len; + if (rb_range_beg_len(indx, &beg, &len, str_strlen(str, 0), 2)) { + rb_str_splice(str, beg, len, val); + return val; + } + } + idx = NUM2LONG(indx); + goto num_index; + } +} + +/* + * call-seq: + * str[fixnum] = new_str + * str[fixnum, fixnum] = new_str + * str[range] = aString + * str[regexp] = new_str + * str[regexp, fixnum] = new_str + * str[other_str] = new_str + * + * Element Assignment---Replaces some or all of the content of str. The + * portion of the string affected is determined using the same criteria as + * String#[]. If the replacement string is not the same length as + * the text it is replacing, the string will be adjusted accordingly. If the + * regular expression or string is used as the index doesn't match a position + * in the string, IndexError is raised. If the regular expression + * form is used, the optional second Fixnum allows you to specify + * which portion of the match to replace (effectively using the + * MatchData indexing rules. The forms that take a + * Fixnum will raise an IndexError if the value is + * out of range; the Range form will raise a + * RangeError, and the Regexp and String + * forms will silently ignore the assignment. + */ + +static VALUE +rb_str_aset_m(int argc, VALUE *argv, VALUE str) +{ + if (argc == 3) { + if (TYPE(argv[0]) == T_REGEXP) { + rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]); + } + else { + rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]); + } + return argv[2]; + } + if (argc != 2) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); + } + return rb_str_aset(str, argv[0], argv[1]); +} + +/* + * call-seq: + * str.insert(index, other_str) => str + * + * Inserts other_str before the character at the given + * index, modifying str. Negative indices count from the + * end of the string, and insert after the given character. + * The intent is insert aString so that it starts at the given + * index. + * + * "abcd".insert(0, 'X') #=> "Xabcd" + * "abcd".insert(3, 'X') #=> "abcXd" + * "abcd".insert(4, 'X') #=> "abcdX" + * "abcd".insert(-3, 'X') #=> "abXcd" + * "abcd".insert(-1, 'X') #=> "abcdX" + */ + +static VALUE +rb_str_insert(VALUE str, VALUE idx, VALUE str2) +{ + long pos = NUM2LONG(idx); + + if (pos == -1) { + return rb_str_append(str, str2); + } + else if (pos < 0) { + pos++; + } + rb_str_splice(str, pos, 0, str2); + return str; +} + + +/* + * call-seq: + * str.slice!(fixnum) => fixnum or nil + * str.slice!(fixnum, fixnum) => new_str or nil + * str.slice!(range) => new_str or nil + * str.slice!(regexp) => new_str or nil + * str.slice!(other_str) => new_str or nil + * + * Deletes the specified portion from str, and returns the portion + * deleted. + * + * string = "this is a string" + * string.slice!(2) #=> "i" + * string.slice!(3..6) #=> " is " + * string.slice!(/s.*t/) #=> "sa st" + * string.slice!("r") #=> "r" + * string #=> "thing" + */ + +static VALUE +rb_str_slice_bang(int argc, VALUE *argv, VALUE str) +{ + VALUE result; + VALUE buf[3]; + int i; + + if (argc < 1 || 2 < argc) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc); + } + for (i=0; i str or nil + * str.sub!(pattern) {|match| block } => str or nil + * + * Performs the substitutions of String#sub in place, + * returning str, or nil if no substitutions were + * performed. + */ + +static VALUE +rb_str_sub_bang(int argc, VALUE *argv, VALUE str) +{ + VALUE pat, repl, hash = Qnil; + int iter = 0; + int tainted = 0; + int untrusted = 0; + long plen; + + if (argc == 1 && rb_block_given_p()) { + iter = 1; + } + else if (argc == 2) { + repl = argv[1]; + hash = rb_check_convert_type(argv[1], T_HASH, "Hash", "to_hash"); + if (NIL_P(hash)) { + StringValue(repl); + } + if (OBJ_TAINTED(repl)) tainted = 1; + if (OBJ_UNTRUSTED(repl)) untrusted = 1; + } + else { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); + } + + pat = get_pat(argv[0], 1); + if (rb_reg_search(pat, str, 0, 0) >= 0) { + rb_encoding *enc; + int cr = ENC_CODERANGE(str); + VALUE match = rb_backref_get(); + struct re_registers *regs = RMATCH_REGS(match); + long beg0 = BEG(0); + long end0 = END(0); + + if (iter || !NIL_P(hash)) { + char *p = RSTRING_PTR(str); long len = RSTRING_LEN(str); + + if (iter) { + repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match))); + } + else { + repl = rb_hash_aref(hash, rb_str_subseq(str, beg0, end0 - beg0)); + repl = rb_obj_as_string(repl); + } + str_mod_check(str, p, len); + str_frozen_check(str); + } + else { + repl = rb_reg_regsub(repl, str, regs, pat); + } + enc = rb_enc_compatible(str, repl); + if (!enc) { + rb_encoding *str_enc = STR_ENC_GET(str); + if (coderange_scan(RSTRING_PTR(str), beg0, str_enc) != ENC_CODERANGE_7BIT || + coderange_scan(RSTRING_PTR(str)+end0, + RSTRING_LEN(str)-end0, str_enc) != ENC_CODERANGE_7BIT) { + rb_raise(rb_eEncCompatError, "incompatible character encodings: %s and %s", + rb_enc_name(str_enc), + rb_enc_name(STR_ENC_GET(repl))); + } + enc = STR_ENC_GET(repl); + } + rb_str_modify(str); + rb_enc_associate(str, enc); + if (OBJ_TAINTED(repl)) tainted = 1; + if (OBJ_UNTRUSTED(repl)) untrusted = 1; + if (ENC_CODERANGE_UNKNOWN < cr && cr < ENC_CODERANGE_BROKEN) { + int cr2 = ENC_CODERANGE(repl); + if (cr2 == ENC_CODERANGE_BROKEN || + (cr == ENC_CODERANGE_VALID && cr2 == ENC_CODERANGE_7BIT)) + cr = ENC_CODERANGE_UNKNOWN; + else + cr = cr2; + } + plen = end0 - beg0; + if (RSTRING_LEN(repl) > plen) { + RESIZE_CAPA(str, RSTRING_LEN(str) + RSTRING_LEN(repl) - plen); + } + if (RSTRING_LEN(repl) != plen) { + memmove(RSTRING_PTR(str) + beg0 + RSTRING_LEN(repl), + RSTRING_PTR(str) + beg0 + plen, + RSTRING_LEN(str) - beg0 - plen); + } + memcpy(RSTRING_PTR(str) + beg0, + RSTRING_PTR(repl), RSTRING_LEN(repl)); + STR_SET_LEN(str, RSTRING_LEN(str) + RSTRING_LEN(repl) - plen); + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + ENC_CODERANGE_SET(str, cr); + if (tainted) OBJ_TAINT(str); + if (untrusted) OBJ_UNTRUST(str); + + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.sub(pattern, replacement) => new_str + * str.sub(pattern) {|match| block } => new_str + * + * Returns a copy of str with the first occurrence of + * pattern replaced with either replacement or the value of the + * block. The pattern will typically be a Regexp; if it is + * a String then no regular expression metacharacters will be + * interpreted (that is /\d/ will match a digit, but + * '\d' will match a backslash followed by a 'd'). + * + * If the method call specifies replacement, special variables such as + * $& will not be useful, as substitution into the string occurs + * before the pattern match starts. However, the sequences \1, + * \2, \k, etc., may be used. + * + * In the block form, the current match string is passed in as a parameter, and + * variables such as $1, $2, $`, + * $&, and $' will be set appropriately. The value + * returned by the block will be substituted for the match on each call. + * + * The result inherits any tainting in the original string or any supplied + * replacement string. + * + * "hello".sub(/[aeiou]/, '*') #=> "h*llo" + * "hello".sub(/([aeiou])/, '<\1>') #=> "hllo" + * "hello".sub(/./) {|s| s[0].ord.to_s + ' ' } #=> "104 ello" + * "hello".sub(/(?[aeiou])/, '*\k*') #=> "h*e*llo" + */ + +static VALUE +rb_str_sub(int argc, VALUE *argv, VALUE str) +{ + str = rb_str_dup(str); + rb_str_sub_bang(argc, argv, str); + return str; +} + +static VALUE +str_gsub(int argc, VALUE *argv, VALUE str, int bang) +{ + VALUE pat, val, repl, match, dest, hash = Qnil; + struct re_registers *regs; + long beg, n; + long beg0, end0; + long offset, blen, slen, len, last; + int iter = 0; + char *sp, *cp; + int tainted = 0; + rb_encoding *str_enc; + + switch (argc) { + case 1: + RETURN_ENUMERATOR(str, argc, argv); + iter = 1; + break; + case 2: + repl = argv[1]; + hash = rb_check_convert_type(argv[1], T_HASH, "Hash", "to_hash"); + if (NIL_P(hash)) { + StringValue(repl); + } + if (OBJ_TAINTED(repl)) tainted = 1; + break; + default: + rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); + } + + pat = get_pat(argv[0], 1); + beg = rb_reg_search(pat, str, 0, 0); + if (beg < 0) { + if (bang) return Qnil; /* no match, no substitution */ + return rb_str_dup(str); + } + + offset = 0; + n = 0; + blen = RSTRING_LEN(str) + 30; /* len + margin */ + dest = rb_str_buf_new(blen); + sp = RSTRING_PTR(str); + slen = RSTRING_LEN(str); + cp = sp; + str_enc = STR_ENC_GET(str); + + do { + n++; + match = rb_backref_get(); + regs = RMATCH_REGS(match); + beg0 = BEG(0); + end0 = END(0); + if (iter || !NIL_P(hash)) { + if (iter) { + val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match))); + } + else { + val = rb_hash_aref(hash, rb_str_subseq(str, BEG(0), END(0) - BEG(0))); + val = rb_obj_as_string(val); + } + str_mod_check(str, sp, slen); + if (bang) str_frozen_check(str); + if (val == dest) { /* paranoid check [ruby-dev:24827] */ + rb_raise(rb_eRuntimeError, "block should not cheat"); + } + } + else { + val = rb_reg_regsub(repl, str, regs, pat); + } + + if (OBJ_TAINTED(val)) tainted = 1; + + len = beg - offset; /* copy pre-match substr */ + if (len) { + rb_enc_str_buf_cat(dest, cp, len, str_enc); + } + + rb_str_buf_append(dest, val); + + last = offset; + offset = end0; + if (beg0 == end0) { + /* + * Always consume at least one character of the input string + * in order to prevent infinite loops. + */ + if (RSTRING_LEN(str) <= end0) break; + len = rb_enc_mbclen(RSTRING_PTR(str)+end0, RSTRING_END(str), str_enc); + rb_enc_str_buf_cat(dest, RSTRING_PTR(str)+end0, len, str_enc); + offset = end0 + len; + } + cp = RSTRING_PTR(str) + offset; + if (offset > RSTRING_LEN(str)) break; + beg = rb_reg_search(pat, str, offset, 0); + } while (beg >= 0); + if (RSTRING_LEN(str) > offset) { + rb_enc_str_buf_cat(dest, cp, RSTRING_LEN(str) - offset, str_enc); + } + rb_reg_search(pat, str, last, 0); + if (bang) { + rb_str_shared_replace(str, dest); + } + else { + RBASIC(dest)->klass = rb_obj_class(str); + OBJ_INFECT(dest, str); + str = dest; + } + + if (tainted) OBJ_TAINT(str); + return str; +} + + +/* + * call-seq: + * str.gsub!(pattern, replacement) => str or nil + * str.gsub!(pattern) {|match| block } => str or nil + * + * Performs the substitutions of String#gsub in place, returning + * str, or nil if no substitutions were performed. + */ + +static VALUE +rb_str_gsub_bang(int argc, VALUE *argv, VALUE str) +{ + return str_gsub(argc, argv, str, 1); +} + + +/* + * call-seq: + * str.gsub(pattern, replacement) => new_str + * str.gsub(pattern) {|match| block } => new_str + * + * Returns a copy of str with all occurrences of pattern + * replaced with either replacement or the value of the block. The + * pattern will typically be a Regexp; if it is a + * String then no regular expression metacharacters will be + * interpreted (that is /\d/ will match a digit, but + * '\d' will match a backslash followed by a 'd'). + * + * If a string is used as the replacement, special variables from the match + * (such as $& and $1) cannot be substituted into it, + * as substitution into the string occurs before the pattern match + * starts. However, the sequences \1, \2, + * \k, and so on may be used to interpolate + * successive groups in the match. + * + * In the block form, the current match string is passed in as a parameter, and + * variables such as $1, $2, $`, + * $&, and $' will be set appropriately. The value + * returned by the block will be substituted for the match on each call. + * + * The result inherits any tainting in the original string or any supplied + * replacement string. + * + * "hello".gsub(/[aeiou]/, '*') #=> "h*ll*" + * "hello".gsub(/([aeiou])/, '<\1>') #=> "hll" + * "hello".gsub(/./) {|s| s[0].ord.to_s + ' '} #=> "104 101 108 108 111 " + * "hello".gsub(/(?[aeiou])/, '{\k}') #=> "h{e}ll{o}" + */ + +static VALUE +rb_str_gsub(int argc, VALUE *argv, VALUE str) +{ + return str_gsub(argc, argv, str, 0); +} + + +/* + * call-seq: + * str.replace(other_str) => str + * + * Replaces the contents and taintedness of str with the corresponding + * values in other_str. + * + * s = "hello" #=> "hello" + * s.replace "world" #=> "world" + */ + +static VALUE +rb_str_replace(VALUE str, VALUE str2) +{ + long len; + if (str == str2) return str; + + StringValue(str2); + len = RSTRING_LEN(str2); + if (STR_ASSOC_P(str2)) { + str2 = rb_str_new4(str2); + } + if (str_independent(str) && !STR_EMBED_P(str)) { + xfree(RSTRING_PTR(str)); + } + if (STR_SHARED_P(str2)) { + STR_SET_NOEMBED(str); + RSTRING(str)->as.heap.len = len; + RSTRING(str)->as.heap.ptr = RSTRING_PTR(str2); + FL_SET(str, ELTS_SHARED); + FL_UNSET(str, STR_ASSOC); + RSTRING(str)->as.heap.aux.shared = RSTRING(str2)->as.heap.aux.shared; + } + else { + str_replace_shared(str, rb_str_new4(str2)); + } + + OBJ_INFECT(str, str2); + rb_enc_cr_str_exact_copy(str, str2); + return str; +} + +/* + * call-seq: + * string.clear -> string + * + * Makes string empty. + * + * a = "abcde" + * a.clear #=> "" + */ + +static VALUE +rb_str_clear(VALUE str) +{ + /* rb_str_modify() */ /* no need for str_make_independent */ + if (str_independent(str) && !STR_EMBED_P(str)) { + xfree(RSTRING_PTR(str)); + } + STR_SET_EMBED(str); + STR_SET_EMBED_LEN(str, 0); + RSTRING_PTR(str)[0] = 0; + if (rb_enc_asciicompat(STR_ENC_GET(str))) + ENC_CODERANGE_SET(str, ENC_CODERANGE_7BIT); + else + ENC_CODERANGE_SET(str, ENC_CODERANGE_VALID); + return str; +} + +/* + * call-seq: + * string.chr -> string + * + * Returns a one-character string at the beginning of the string. + * + * a = "abcde" + * a.chr #=> "a" + */ + +static VALUE +rb_str_chr(VALUE str) +{ + return rb_str_substr(str, 0, 1); +} + +/* + * call-seq: + * str.getbyte(index) => 0 .. 255 + * + * returns the indexth byte as an integer. + */ +static VALUE +rb_str_getbyte(VALUE str, VALUE index) +{ + long pos = NUM2LONG(index); + + if (pos < 0) + pos += RSTRING_LEN(str); + if (pos < 0 || RSTRING_LEN(str) <= pos) + return Qnil; + + return INT2FIX((unsigned char)RSTRING_PTR(str)[pos]); +} + +/* + * call-seq: + * str.setbyte(index, int) => int + * + * modifies the indexth byte as int. + */ +static VALUE +rb_str_setbyte(VALUE str, VALUE index, VALUE value) +{ + long pos = NUM2LONG(index); + int byte = NUM2INT(value); + + rb_str_modify(str); + + if (pos < -RSTRING_LEN(str) || RSTRING_LEN(str) <= pos) + rb_raise(rb_eIndexError, "index %ld out of string", pos); + if (pos < 0) + pos += RSTRING_LEN(str); + + RSTRING_PTR(str)[pos] = byte; + + return value; +} + +/* + * call-seq: + * str.reverse => new_str + * + * Returns a new string with the characters from str in reverse order. + * + * "stressed".reverse #=> "desserts" + */ + +static VALUE +rb_str_reverse(VALUE str) +{ + rb_encoding *enc; + VALUE rev; + char *s, *e, *p; + int single = 1; + + if (RSTRING_LEN(str) <= 1) return rb_str_dup(str); + enc = STR_ENC_GET(str); + rev = rb_str_new5(str, 0, RSTRING_LEN(str)); + s = RSTRING_PTR(str); e = RSTRING_END(str); + p = RSTRING_END(rev); + + if (RSTRING_LEN(str) > 1) { + if (single_byte_optimizable(str)) { + while (s < e) { + *--p = *s++; + } + } + else { + while (s < e) { + int clen = rb_enc_mbclen(s, e, enc); + + if (clen > 1 || (*s & 0x80)) single = 0; + p -= clen; + memcpy(p, s, clen); + s += clen; + } + } + } + STR_SET_LEN(rev, RSTRING_LEN(str)); + OBJ_INFECT(rev, str); + if (ENC_CODERANGE(str) == ENC_CODERANGE_UNKNOWN) { + if (single) { + ENC_CODERANGE_SET(str, ENC_CODERANGE_7BIT); + } + else { + ENC_CODERANGE_SET(str, ENC_CODERANGE_VALID); + } + } + rb_enc_cr_str_copy_for_substr(rev, str); + + return rev; +} + + +/* + * call-seq: + * str.reverse! => str + * + * Reverses str in place. + */ + +static VALUE +rb_str_reverse_bang(VALUE str) +{ + if (RSTRING_LEN(str) > 1) { + if (single_byte_optimizable(str)) { + char *s, *e, c; + + str_modify_keep_cr(str); + s = RSTRING_PTR(str); + e = RSTRING_END(str) - 1; + while (s < e) { + c = *s; + *s++ = *e; + *e-- = c; + } + } + else { + rb_str_shared_replace(str, rb_str_reverse(str)); + } + } + return str; +} + + +/* + * call-seq: + * str.include? other_str => true or false + * + * Returns true if str contains the given string or + * character. + * + * "hello".include? "lo" #=> true + * "hello".include? "ol" #=> false + * "hello".include? ?h #=> true + */ + +static VALUE +rb_str_include(VALUE str, VALUE arg) +{ + long i; + + StringValue(arg); + i = rb_str_index(str, arg, 0); + + if (i == -1) return Qfalse; + return Qtrue; +} + + +/* + * call-seq: + * str.to_i(base=10) => integer + * + * Returns the result of interpreting leading characters in str as an + * integer base base (between 2 and 36). Extraneous characters past the + * end of a valid number are ignored. If there is not a valid number at the + * start of str, 0 is returned. This method never raises an + * exception. + * + * "12345".to_i #=> 12345 + * "99 red balloons".to_i #=> 99 + * "0a".to_i #=> 0 + * "0a".to_i(16) #=> 10 + * "hello".to_i #=> 0 + * "1100101".to_i(2) #=> 101 + * "1100101".to_i(8) #=> 294977 + * "1100101".to_i(10) #=> 1100101 + * "1100101".to_i(16) #=> 17826049 + */ + +static VALUE +rb_str_to_i(int argc, VALUE *argv, VALUE str) +{ + int base; + + if (argc == 0) base = 10; + else { + VALUE b; + + rb_scan_args(argc, argv, "01", &b); + base = NUM2INT(b); + } + if (base < 0) { + rb_raise(rb_eArgError, "invalid radix %d", base); + } + return rb_str_to_inum(str, base, Qfalse); +} + + +/* + * call-seq: + * str.to_f => float + * + * Returns the result of interpreting leading characters in str as a + * floating point number. Extraneous characters past the end of a valid number + * are ignored. If there is not a valid number at the start of str, + * 0.0 is returned. This method never raises an exception. + * + * "123.45e1".to_f #=> 1234.5 + * "45.67 degrees".to_f #=> 45.67 + * "thx1138".to_f #=> 0.0 + */ + +static VALUE +rb_str_to_f(VALUE str) +{ + return DBL2NUM(rb_str_to_dbl(str, Qfalse)); +} + + +/* + * call-seq: + * str.to_s => str + * str.to_str => str + * + * Returns the receiver. + */ + +static VALUE +rb_str_to_s(VALUE str) +{ + if (rb_obj_class(str) != rb_cString) { + VALUE dup = str_alloc(rb_cString); + rb_str_replace(dup, str); + return dup; + } + return str; +} + +static void +str_cat_char(VALUE str, unsigned int c, rb_encoding *enc) +{ + char s[RUBY_MAX_CHAR_LEN]; + int n = rb_enc_codelen(c, enc); + + rb_enc_mbcput(c, s, enc); + rb_enc_str_buf_cat(str, s, n, enc); +} + +static void +prefix_escape(VALUE str, unsigned int c, rb_encoding *enc) +{ + str_cat_char(str, '\\', enc); + str_cat_char(str, c, enc); +} + +/* + * call-seq: + * str.inspect => string + * + * Returns a printable version of _str_, surrounded by quote marks, + * with special characters escaped. + * + * str = "hello" + * str[3] = "\b" + * str.inspect #=> "\"hel\\bo\"" + */ + +VALUE +rb_str_inspect(VALUE str) +{ + rb_encoding *enc = STR_ENC_GET(str); + char *p, *pend; + VALUE result = rb_str_buf_new(0); + + if (!rb_enc_asciicompat(enc)) enc = rb_usascii_encoding(); + rb_enc_associate(result, enc); + str_cat_char(result, '"', enc); + p = RSTRING_PTR(str); pend = RSTRING_END(str); + while (p < pend) { + unsigned int c, cc; + int n; + + n = rb_enc_precise_mbclen(p, pend, enc); + if (!MBCLEN_CHARFOUND_P(n)) { + p++; + n = 1; + goto escape_codepoint; + } + n = MBCLEN_CHARFOUND_LEN(n); + + c = rb_enc_codepoint(p, pend, enc); + n = rb_enc_codelen(c, enc); + + p += n; + if (c == '"'|| c == '\\' || + (c == '#' && + p < pend && + MBCLEN_CHARFOUND_P(rb_enc_precise_mbclen(p,pend,enc)) && + (cc = rb_enc_codepoint(p,pend,enc), + (cc == '$' || cc == '@' || cc == '{')))) { + prefix_escape(result, c, enc); + } + else if (c == '\n') { + prefix_escape(result, 'n', enc); + } + else if (c == '\r') { + prefix_escape(result, 'r', enc); + } + else if (c == '\t') { + prefix_escape(result, 't', enc); + } + else if (c == '\f') { + prefix_escape(result, 'f', enc); + } + else if (c == '\013') { + prefix_escape(result, 'v', enc); + } + else if (c == '\010') { + prefix_escape(result, 'b', enc); + } + else if (c == '\007') { + prefix_escape(result, 'a', enc); + } + else if (c == 033) { + prefix_escape(result, 'e', enc); + } + else if (rb_enc_isprint(c, enc)) { + rb_enc_str_buf_cat(result, p-n, n, enc); + } + else { + char buf[5]; + char *s; + char *q; + + escape_codepoint: + for (q = p-n; q < p; q++) { + s = buf; + sprintf(buf, "\\x%02X", *q & 0377); + while (*s) { + str_cat_char(result, *s++, enc); + } + } + } + } + str_cat_char(result, '"', enc); + + OBJ_INFECT(result, str); + return result; +} + +#define IS_EVSTR(p,e) ((p) < (e) && (*(p) == '$' || *(p) == '@' || *(p) == '{')) + +/* + * call-seq: + * str.dump => new_str + * + * Produces a version of str with all nonprinting characters replaced by + * \nnn notation and all special characters escaped. + */ + +VALUE +rb_str_dump(VALUE str) +{ + rb_encoding *enc = rb_enc_get(str); + long len; + const char *p, *pend; + char *q, *qend; + VALUE result; + int u8 = (enc == rb_utf8_encoding()); + + len = 2; /* "" */ + p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str); + while (p < pend) { + unsigned char c = *p++; + switch (c) { + case '"': case '\\': + case '\n': case '\r': + case '\t': case '\f': + case '\013': case '\010': case '\007': case '\033': + len += 2; + break; + + case '#': + len += IS_EVSTR(p, pend) ? 2 : 1; + break; + + default: + if (ISPRINT(c)) { + len++; + } + else { + if (u8) { /* \u{NN} */ + char buf[32]; + int n = rb_enc_precise_mbclen(p-1, pend, enc) - 1; + if (MBCLEN_CHARFOUND_P(n)) { + int cc = rb_enc_codepoint(p-1, pend, enc); + sprintf(buf, "%x", cc); + len += strlen(buf)+4; + p += n; + break; + } + } + len += 4; /* \xNN */ + } + break; + } + } + if (!rb_enc_asciicompat(enc)) { + len += 19; /* ".force_encoding('')" */ + len += strlen(enc->name); + } + + result = rb_str_new5(str, 0, len); + p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str); + q = RSTRING_PTR(result); qend = q + len; + + *q++ = '"'; + while (p < pend) { + unsigned char c = *p++; + + if (c == '"' || c == '\\') { + *q++ = '\\'; + *q++ = c; + } + else if (c == '#') { + if (IS_EVSTR(p, pend)) *q++ = '\\'; + *q++ = '#'; + } + else if (c == '\n') { + *q++ = '\\'; + *q++ = 'n'; + } + else if (c == '\r') { + *q++ = '\\'; + *q++ = 'r'; + } + else if (c == '\t') { + *q++ = '\\'; + *q++ = 't'; + } + else if (c == '\f') { + *q++ = '\\'; + *q++ = 'f'; + } + else if (c == '\013') { + *q++ = '\\'; + *q++ = 'v'; + } + else if (c == '\010') { + *q++ = '\\'; + *q++ = 'b'; + } + else if (c == '\007') { + *q++ = '\\'; + *q++ = 'a'; + } + else if (c == '\033') { + *q++ = '\\'; + *q++ = 'e'; + } + else if (ISPRINT(c)) { + *q++ = c; + } + else { + *q++ = '\\'; + if (u8) { + int n = rb_enc_precise_mbclen(p-1, pend, enc) - 1; + if (MBCLEN_CHARFOUND_P(n)) { + int cc = rb_enc_codepoint(p-1, pend, enc); + p += n; + sprintf(q, "u{%x}", cc); + q += strlen(q); + continue; + } + } + sprintf(q, "x%02X", c); + q += 3; + } + } + *q++ = '"'; + *q = '\0'; + if (!rb_enc_asciicompat(enc)) { + sprintf(q, ".force_encoding(\"%s\")", enc->name); + enc = rb_ascii8bit_encoding(); + } + OBJ_INFECT(result, str); + /* result from dump is ASCII */ + rb_enc_associate(result, enc); + ENC_CODERANGE_SET(result, ENC_CODERANGE_7BIT); + return result; +} + + +static void +rb_str_check_dummy_enc(rb_encoding *enc) +{ + if (rb_enc_dummy_p(enc)) { + rb_raise(rb_eEncCompatError, "incompatible encoding with this operation: %s", + rb_enc_name(enc)); + } +} + +/* + * call-seq: + * str.upcase! => str or nil + * + * Upcases the contents of str, returning nil if no changes + * were made. + * Note: case replacement is effective only in ASCII region. + */ + +static VALUE +rb_str_upcase_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *send; + int modify = 0; + + str_modify_keep_cr(str); + enc = STR_ENC_GET(str); + rb_str_check_dummy_enc(enc); + s = RSTRING_PTR(str); send = RSTRING_END(str); + if (single_byte_optimizable(str)) { + while (s < send) { + unsigned int c = *(unsigned char*)s; + + if (rb_enc_isascii(c, enc) && 'a' <= c && c <= 'z') { + *s = 'A' + (c - 'a'); + modify = 1; + } + s++; + } + } + else { + int ascompat = rb_enc_asciicompat(enc); + + while (s < send) { + unsigned int c; + + if (ascompat && (c = *(unsigned char*)s) < 0x80) { + if (rb_enc_isascii(c, enc) && 'a' <= c && c <= 'z') { + *s = 'A' + (c - 'a'); + modify = 1; + } + s++; + } + else { + c = rb_enc_codepoint(s, send, enc); + if (rb_enc_islower(c, enc)) { + /* assuming toupper returns codepoint with same size */ + rb_enc_mbcput(rb_enc_toupper(c, enc), s, enc); + modify = 1; + } + s += rb_enc_codelen(c, enc); + } + } + } + + if (modify) return str; + return Qnil; +} + + +/* + * call-seq: + * str.upcase => new_str + * + * Returns a copy of str with all lowercase letters replaced with their + * uppercase counterparts. The operation is locale insensitive---only + * characters ``a'' to ``z'' are affected. + * Note: case replacement is effective only in ASCII region. + * + * "hEllO".upcase #=> "HELLO" + */ + +static VALUE +rb_str_upcase(VALUE str) +{ + str = rb_str_dup(str); + rb_str_upcase_bang(str); + return str; +} + + +/* + * call-seq: + * str.downcase! => str or nil + * + * Downcases the contents of str, returning nil if no + * changes were made. + * Note: case replacement is effective only in ASCII region. + */ + +static VALUE +rb_str_downcase_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *send; + int modify = 0; + + str_modify_keep_cr(str); + enc = STR_ENC_GET(str); + rb_str_check_dummy_enc(enc); + s = RSTRING_PTR(str); send = RSTRING_END(str); + if (single_byte_optimizable(str)) { + while (s < send) { + unsigned int c = *(unsigned char*)s; + + if (rb_enc_isascii(c, enc) && 'A' <= c && c <= 'Z') { + *s = 'a' + (c - 'A'); + modify = 1; + } + s++; + } + } + else { + int ascompat = rb_enc_asciicompat(enc); + + while (s < send) { + unsigned int c; + + if (ascompat && (c = *(unsigned char*)s) < 0x80) { + if (rb_enc_isascii(c, enc) && 'A' <= c && c <= 'Z') { + *s = 'a' + (c - 'A'); + modify = 1; + } + s++; + } + else { + c = rb_enc_codepoint(s, send, enc); + if (rb_enc_isupper(c, enc)) { + /* assuming toupper returns codepoint with same size */ + rb_enc_mbcput(rb_enc_tolower(c, enc), s, enc); + modify = 1; + } + s += rb_enc_codelen(c, enc); + } + } + } + + if (modify) return str; + return Qnil; +} + + +/* + * call-seq: + * str.downcase => new_str + * + * Returns a copy of str with all uppercase letters replaced with their + * lowercase counterparts. The operation is locale insensitive---only + * characters ``A'' to ``Z'' are affected. + * Note: case replacement is effective only in ASCII region. + * + * "hEllO".downcase #=> "hello" + */ + +static VALUE +rb_str_downcase(VALUE str) +{ + str = rb_str_dup(str); + rb_str_downcase_bang(str); + return str; +} + + +/* + * call-seq: + * str.capitalize! => str or nil + * + * Modifies str by converting the first character to uppercase and the + * remainder to lowercase. Returns nil if no changes are made. + * Note: case conversion is effective only in ASCII region. + * + * a = "hello" + * a.capitalize! #=> "Hello" + * a #=> "Hello" + * a.capitalize! #=> nil + */ + +static VALUE +rb_str_capitalize_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *send; + int modify = 0; + unsigned int c; + + str_modify_keep_cr(str); + enc = STR_ENC_GET(str); + rb_str_check_dummy_enc(enc); + if (RSTRING_LEN(str) == 0 || !RSTRING_PTR(str)) return Qnil; + s = RSTRING_PTR(str); send = RSTRING_END(str); + + c = rb_enc_codepoint(s, send, enc); + if (rb_enc_islower(c, enc)) { + rb_enc_mbcput(rb_enc_toupper(c, enc), s, enc); + modify = 1; + } + s += rb_enc_codelen(c, enc); + while (s < send) { + c = rb_enc_codepoint(s, send, enc); + if (rb_enc_isupper(c, enc)) { + rb_enc_mbcput(rb_enc_tolower(c, enc), s, enc); + modify = 1; + } + s += rb_enc_codelen(c, enc); + } + + if (modify) return str; + return Qnil; +} + + +/* + * call-seq: + * str.capitalize => new_str + * + * Returns a copy of str with the first character converted to uppercase + * and the remainder to lowercase. + * Note: case conversion is effective only in ASCII region. + * + * "hello".capitalize #=> "Hello" + * "HELLO".capitalize #=> "Hello" + * "123ABC".capitalize #=> "123abc" + */ + +static VALUE +rb_str_capitalize(VALUE str) +{ + str = rb_str_dup(str); + rb_str_capitalize_bang(str); + return str; +} + + +/* + * call-seq: +* str.swapcase! => str or nil + * + * Equivalent to String#swapcase, but modifies the receiver in + * place, returning str, or nil if no changes were made. + * Note: case conversion is effective only in ASCII region. + */ + +static VALUE +rb_str_swapcase_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *send; + int modify = 0; + + str_modify_keep_cr(str); + enc = STR_ENC_GET(str); + rb_str_check_dummy_enc(enc); + s = RSTRING_PTR(str); send = RSTRING_END(str); + while (s < send) { + unsigned int c = rb_enc_codepoint(s, send, enc); + + if (rb_enc_isupper(c, enc)) { + /* assuming toupper returns codepoint with same size */ + rb_enc_mbcput(rb_enc_tolower(c, enc), s, enc); + modify = 1; + } + else if (rb_enc_islower(c, enc)) { + /* assuming tolower returns codepoint with same size */ + rb_enc_mbcput(rb_enc_toupper(c, enc), s, enc); + modify = 1; + } + s += rb_enc_mbclen(s, send, enc); + } + + if (modify) return str; + return Qnil; +} + + +/* + * call-seq: + * str.swapcase => new_str + * + * Returns a copy of str with uppercase alphabetic characters converted + * to lowercase and lowercase characters converted to uppercase. + * Note: case conversion is effective only in ASCII region. + * + * "Hello".swapcase #=> "hELLO" + * "cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11" + */ + +static VALUE +rb_str_swapcase(VALUE str) +{ + str = rb_str_dup(str); + rb_str_swapcase_bang(str); + return str; +} + +typedef unsigned char *USTR; + +struct tr { + int gen; + unsigned int now, max; + char *p, *pend; +}; + +static unsigned int +trnext(struct tr *t, rb_encoding *enc) +{ + for (;;) { + if (!t->gen) { + if (t->p == t->pend) return -1; + if (t->p < t->pend - 1 && *t->p == '\\') { + t->p++; + } + t->now = rb_enc_codepoint(t->p, t->pend, enc); + t->p += rb_enc_codelen(t->now, enc); + if (t->p < t->pend - 1 && *t->p == '-') { + t->p++; + if (t->p < t->pend) { + unsigned int c = rb_enc_codepoint(t->p, t->pend, enc); + t->p += rb_enc_codelen(c, enc); + if (t->now > c) continue; + t->gen = 1; + t->max = c; + } + } + return t->now; + } + else if (++t->now < t->max) { + return t->now; + } + else { + t->gen = 0; + return t->max; + } + } +} + +static VALUE rb_str_delete_bang(int,VALUE*,VALUE); + +static VALUE +tr_trans(VALUE str, VALUE src, VALUE repl, int sflag) +{ + const unsigned int errc = -1; + unsigned int trans[256]; + rb_encoding *enc, *e1, *e2; + struct tr trsrc, trrepl; + int cflag = 0; + unsigned int c, c0; + int last = 0, modify = 0, i, l; + char *s, *send; + VALUE hash = 0; + int singlebyte = single_byte_optimizable(str); + int cr; + + StringValue(src); + StringValue(repl); + if (RSTRING_LEN(str) == 0 || !RSTRING_PTR(str)) return Qnil; + if (RSTRING_LEN(repl) == 0) { + return rb_str_delete_bang(1, &src, str); + } + + cr = ENC_CODERANGE(str); + e1 = rb_enc_check(str, src); + e2 = rb_enc_check(str, repl); + if (e1 == e2) { + enc = e1; + } + else { + enc = rb_enc_check(src, repl); + } + trsrc.p = RSTRING_PTR(src); trsrc.pend = trsrc.p + RSTRING_LEN(src); + if (RSTRING_LEN(src) > 1 && + rb_enc_ascget(trsrc.p, trsrc.pend, &l, enc) == '^' && + trsrc.p + l < trsrc.pend) { + cflag = 1; + trsrc.p += l; + } + trrepl.p = RSTRING_PTR(repl); + trrepl.pend = trrepl.p + RSTRING_LEN(repl); + trsrc.gen = trrepl.gen = 0; + trsrc.now = trrepl.now = 0; + trsrc.max = trrepl.max = 0; + + if (cflag) { + for (i=0; i<256; i++) { + trans[i] = 1; + } + while ((c = trnext(&trsrc, enc)) != errc) { + if (c < 256) { + trans[c] = errc; + } + else { + if (!hash) hash = rb_hash_new(); + rb_hash_aset(hash, UINT2NUM(c), Qtrue); + } + } + while ((c = trnext(&trrepl, enc)) != errc) + /* retrieve last replacer */; + last = trrepl.now; + for (i=0; i<256; i++) { + if (trans[i] != errc) { + trans[i] = last; + } + } + } + else { + unsigned int r; + + for (i=0; i<256; i++) { + trans[i] = errc; + } + while ((c = trnext(&trsrc, enc)) != errc) { + r = trnext(&trrepl, enc); + if (r == errc) r = trrepl.now; + if (c < 256) { + trans[c] = r; + if (r > 255) singlebyte = 0; + } + else { + if (!hash) hash = rb_hash_new(); + rb_hash_aset(hash, UINT2NUM(c), UINT2NUM(r)); + } + } + } + + str_modify_keep_cr(str); + s = RSTRING_PTR(str); send = RSTRING_END(str); + if (sflag) { + int clen, tlen, max = RSTRING_LEN(str); + int offset, save = -1; + char *buf = ALLOC_N(char, max), *t = buf; + + while (s < send) { + c0 = c = rb_enc_codepoint(s, send, enc); + tlen = clen = rb_enc_codelen(c, enc); + + s += clen; + if (c < 256) { + c = trans[c]; + } + else if (hash) { + VALUE tmp = rb_hash_lookup(hash, UINT2NUM(c)); + if (NIL_P(tmp)) { + if (cflag) c = last; + else c = errc; + } + else if (cflag) c = errc; + else c = NUM2INT(tmp); + } + else { + c = errc; + } + if (c != -1) { + if (save == c) continue; + save = c; + tlen = rb_enc_codelen(c, enc); + modify = 1; + } + else { + save = -1; + c = c0; + } + while (t - buf + tlen >= max) { + offset = t - buf; + max *= 2; + REALLOC_N(buf, char, max); + t = buf + offset; + } + rb_enc_mbcput(c, t, enc); + t += tlen; + } + *t = '\0'; + RSTRING(str)->as.heap.ptr = buf; + RSTRING(str)->as.heap.len = t - buf; + STR_SET_NOEMBED(str); + RSTRING(str)->as.heap.aux.capa = max; + } + else if (rb_enc_mbmaxlen(enc) == 1 || (singlebyte && !hash)) { + while (s < send) { + c = (unsigned char)*s; + if (trans[c] != errc) { + if (!cflag) { + c = trans[c]; + *s = c; + modify = 1; + } + else { + *s = last; + modify = 1; + } + } + s++; + } + } + else { + int clen, tlen, max = RSTRING_LEN(str) * 1.2; + int offset; + char *buf = ALLOC_N(char, max), *t = buf; + + while (s < send) { + c0 = c = rb_enc_codepoint(s, send, enc); + tlen = clen = rb_enc_codelen(c, enc); + + if (c < 256) { + c = trans[c]; + } + else if (hash) { + VALUE tmp = rb_hash_lookup(hash, UINT2NUM(c)); + if (NIL_P(tmp)) { + if (cflag) c = last; + else c = errc; + } + else if (cflag) c = errc; + else c = NUM2INT(tmp); + } + else { + c = errc; + } + if (c != errc) { + tlen = rb_enc_codelen(c, enc); + modify = 1; + } + else { + modify = 1; + c = c0; + } + while (t - buf + tlen >= max) { + offset = t - buf; + max *= 2; + REALLOC_N(buf, char, max); + t = buf + offset; + } + if (s != t) rb_enc_mbcput(c, t, enc); + s += clen; + t += tlen; + } + if (!STR_EMBED_P(str)) { + xfree(RSTRING(str)->as.heap.ptr); + } + *t = '\0'; + RSTRING(str)->as.heap.ptr = buf; + RSTRING(str)->as.heap.len = t - buf; + STR_SET_NOEMBED(str); + RSTRING(str)->as.heap.aux.capa = max; + } + + if (modify) { + cr = ENC_CODERANGE_AND(cr, ENC_CODERANGE(repl)); + if (cr != ENC_CODERANGE_BROKEN) + ENC_CODERANGE_SET(str, cr); + rb_enc_associate(str, enc); + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.tr!(from_str, to_str) => str or nil + * + * Translates str in place, using the same rules as + * String#tr. Returns str, or nil if no + * changes were made. + */ + +static VALUE +rb_str_tr_bang(VALUE str, VALUE src, VALUE repl) +{ + return tr_trans(str, src, repl, 0); +} + + +/* + * call-seq: + * str.tr(from_str, to_str) => new_str + * + * Returns a copy of str with the characters in from_str replaced + * by the corresponding characters in to_str. If to_str is + * shorter than from_str, it is padded with its last character. Both + * strings may use the c1--c2 notation to denote ranges of characters, and + * from_str may start with a ^, which denotes all + * characters except those listed. + * + * "hello".tr('aeiou', '*') #=> "h*ll*" + * "hello".tr('^aeiou', '*') #=> "*e**o" + * "hello".tr('el', 'ip') #=> "hippo" + * "hello".tr('a-y', 'b-z') #=> "ifmmp" + */ + +static VALUE +rb_str_tr(VALUE str, VALUE src, VALUE repl) +{ + str = rb_str_dup(str); + tr_trans(str, src, repl, 0); + return str; +} + +static void +tr_setup_table(VALUE str, char stable[256], int first, + VALUE *tablep, VALUE *ctablep, rb_encoding *enc) +{ + const unsigned int errc = -1; + char buf[256]; + struct tr tr; + unsigned int c; + VALUE table = 0, ptable = 0; + int i, l, cflag = 0; + + tr.p = RSTRING_PTR(str); tr.pend = tr.p + RSTRING_LEN(str); + tr.gen = tr.now = tr.max = 0; + + if (RSTRING_LEN(str) > 1 && rb_enc_ascget(tr.p, tr.pend, &l, enc) == '^') { + cflag = 1; + tr.p += l; + } + if (first) { + for (i=0; i<256; i++) { + stable[i] = 1; + } + } + for (i=0; i<256; i++) { + buf[i] = cflag; + } + + while ((c = trnext(&tr, enc)) != errc) { + if (c < 256) { + buf[c & 0xff] = !cflag; + } + else { + VALUE key = UINT2NUM(c); + + if (!table) { + table = rb_hash_new(); + if (cflag) { + ptable = *ctablep; + *ctablep = table; + } + else { + ptable = *tablep; + *tablep = table; + } + } + if (!ptable || !NIL_P(rb_hash_aref(ptable, key))) { + rb_hash_aset(table, key, Qtrue); + } + } + } + for (i=0; i<256; i++) { + stable[i] = stable[i] && buf[i]; + } +} + + +static int +tr_find(unsigned int c, char table[256], VALUE del, VALUE nodel) +{ + if (c < 256) { + return table[c] ? Qtrue : Qfalse; + } + else { + VALUE v = UINT2NUM(c); + + if (del && !NIL_P(rb_hash_lookup(del, v))) { + if (!nodel || NIL_P(rb_hash_lookup(nodel, v))) { + return Qtrue; + } + } + return Qfalse; + } +} + +/* + * call-seq: + * str.delete!([other_str]+) => str or nil + * + * Performs a delete operation in place, returning str, or + * nil if str was not modified. + */ + +static VALUE +rb_str_delete_bang(int argc, VALUE *argv, VALUE str) +{ + char squeez[256]; + rb_encoding *enc = 0; + char *s, *send, *t; + VALUE del = 0, nodel = 0; + int modify = 0; + int i, ascompat; + + if (RSTRING_LEN(str) == 0 || !RSTRING_PTR(str)) return Qnil; + if (argc < 1) { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + for (i=0; i new_str + * + * Returns a copy of str with all characters in the intersection of its + * arguments deleted. Uses the same rules for building the set of characters as + * String#count. + * + * "hello".delete "l","lo" #=> "heo" + * "hello".delete "lo" #=> "he" + * "hello".delete "aeiou", "^e" #=> "hell" + * "hello".delete "ej-m" #=> "ho" + */ + +static VALUE +rb_str_delete(int argc, VALUE *argv, VALUE str) +{ + str = rb_str_dup(str); + rb_str_delete_bang(argc, argv, str); + return str; +} + + +/* + * call-seq: + * str.squeeze!([other_str]*) => str or nil + * + * Squeezes str in place, returning either str, or + * nil if no changes were made. + */ + +static VALUE +rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str) +{ + char squeez[256]; + rb_encoding *enc = 0; + VALUE del = 0, nodel = 0; + char *s, *send, *t; + int save, modify = 0; + int i; + int ascompat, singlebyte = single_byte_optimizable(str); + + if (argc == 0) { + enc = STR_ENC_GET(str); + } + else { + for (i=0; i 0 && !squeez[c])) { + *t++ = save = c; + } + } + } else { + while (s < send) { + unsigned int c; + int clen; + + if (ascompat && (c = *(unsigned char*)s) < 0x80) { + if (c != save || (argc > 0 && !squeez[c])) { + *t++ = save = c; + } + s++; + } + else { + c = rb_enc_codepoint(s, send, enc); + clen = rb_enc_codelen(c, enc); + + if (c != save || (argc > 0 && !tr_find(c, squeez, del, nodel))) { + if (t != s) rb_enc_mbcput(c, t, enc); + save = c; + t += clen; + } + s += clen; + } + } + } + + *t = '\0'; + if (t - RSTRING_PTR(str) != RSTRING_LEN(str)) { + STR_SET_LEN(str, t - RSTRING_PTR(str)); + modify = 1; + } + + if (modify) return str; + return Qnil; +} + + +/* + * call-seq: + * str.squeeze([other_str]*) => new_str + * + * Builds a set of characters from the other_str parameter(s) using the + * procedure described for String#count. Returns a new string + * where runs of the same character that occur in this set are replaced by a + * single character. If no arguments are given, all runs of identical + * characters are replaced by a single character. + * + * "yellow moon".squeeze #=> "yelow mon" + * " now is the".squeeze(" ") #=> " now is the" + * "putters shoot balls".squeeze("m-z") #=> "puters shot balls" + */ + +static VALUE +rb_str_squeeze(int argc, VALUE *argv, VALUE str) +{ + str = rb_str_dup(str); + rb_str_squeeze_bang(argc, argv, str); + return str; +} + + +/* + * call-seq: + * str.tr_s!(from_str, to_str) => str or nil + * + * Performs String#tr_s processing on str in place, + * returning str, or nil if no changes were made. + */ + +static VALUE +rb_str_tr_s_bang(VALUE str, VALUE src, VALUE repl) +{ + return tr_trans(str, src, repl, 1); +} + + +/* + * call-seq: + * str.tr_s(from_str, to_str) => new_str + * + * Processes a copy of str as described under String#tr, + * then removes duplicate characters in regions that were affected by the + * translation. + * + * "hello".tr_s('l', 'r') #=> "hero" + * "hello".tr_s('el', '*') #=> "h*o" + * "hello".tr_s('el', 'hx') #=> "hhxo" + */ + +static VALUE +rb_str_tr_s(VALUE str, VALUE src, VALUE repl) +{ + str = rb_str_dup(str); + tr_trans(str, src, repl, 1); + return str; +} + + +/* + * call-seq: + * str.count([other_str]+) => fixnum + * + * Each other_str parameter defines a set of characters to count. The + * intersection of these sets defines the characters to count in + * str. Any other_str that starts with a caret (^) is + * negated. The sequence c1--c2 means all characters between c1 and c2. + * + * a = "hello world" + * a.count "lo" #=> 5 + * a.count "lo", "o" #=> 2 + * a.count "hello", "^l" #=> 4 + * a.count "ej-m" #=> 4 + */ + +static VALUE +rb_str_count(int argc, VALUE *argv, VALUE str) +{ + char table[256]; + rb_encoding *enc = 0; + VALUE del = 0, nodel = 0; + char *s, *send; + int i; + int ascompat; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong number of arguments"); + } + for (i=0; i anArray + * + * Divides str into substrings based on a delimiter, returning an array + * of these substrings. + * + * If pattern is a String, then its contents are used as + * the delimiter when splitting str. If pattern is a single + * space, str is split on whitespace, with leading whitespace and runs + * of contiguous whitespace characters ignored. + * + * If pattern is a Regexp, str is divided where the + * pattern matches. Whenever the pattern matches a zero-length string, + * str is split into individual characters. If pattern contains + * groups, the respective matches will be returned in the array as well. + * + * If pattern is omitted, the value of $; is used. If + * $; is nil (which is the default), str is + * split on whitespace as if ` ' were specified. + * + * If the limit parameter is omitted, trailing null fields are + * suppressed. If limit is a positive number, at most that number of + * fields will be returned (if limit is 1, the entire + * string is returned as the only entry in an array). If negative, there is no + * limit to the number of fields returned, and trailing null fields are not + * suppressed. + * + * " now's the time".split #=> ["now's", "the", "time"] + * " now's the time".split(' ') #=> ["now's", "the", "time"] + * " now's the time".split(/ /) #=> ["", "now's", "", "the", "time"] + * "1, 2.34,56, 7".split(%r{,\s*}) #=> ["1", "2.34", "56", "7"] + * "hello".split(//) #=> ["h", "e", "l", "l", "o"] + * "hello".split(//, 3) #=> ["h", "e", "llo"] + * "hi mom".split(%r{\s*}) #=> ["h", "i", "m", "o", "m"] + * + * "mellow yellow".split("ello") #=> ["m", "w y", "w"] + * "1,2,,3,4,,".split(',') #=> ["1", "2", "", "3", "4"] + * "1,2,,3,4,,".split(',', 4) #=> ["1", "2", "", "3,4,,"] + * "1,2,,3,4,,".split(',', -4) #=> ["1", "2", "", "3", "4", "", ""] + */ + +static VALUE +rb_str_split_m(int argc, VALUE *argv, VALUE str) +{ + rb_encoding *enc; + VALUE spat; + VALUE limit; + enum {awk, string, regexp} split_type; + long beg, end, i = 0; + int lim = 0; + VALUE result, tmp; + + if (rb_scan_args(argc, argv, "02", &spat, &limit) == 2) { + lim = NUM2INT(limit); + if (lim <= 0) limit = Qnil; + else if (lim == 1) { + if (RSTRING_LEN(str) == 0) + return rb_ary_new2(0); + return rb_ary_new3(1, str); + } + i = 1; + } + + enc = STR_ENC_GET(str); + if (NIL_P(spat)) { + if (!NIL_P(rb_fs)) { + spat = rb_fs; + goto fs_set; + } + split_type = awk; + } + else { + fs_set: + if (TYPE(spat) == T_STRING) { + rb_encoding *enc2 = STR_ENC_GET(spat); + + split_type = string; + if (RSTRING_LEN(spat) == 0) { + /* Special case - split into chars */ + spat = rb_reg_regcomp(spat); + split_type = regexp; + } + else if (rb_enc_asciicompat(enc2) == 1) { + if (RSTRING_LEN(spat) == 1 && RSTRING_PTR(spat)[0] == ' '){ + split_type = awk; + } + } + else { + int l; + if (rb_enc_ascget(RSTRING_PTR(spat), RSTRING_END(spat), &l, enc2) == ' ' && + RSTRING_LEN(spat) == l) { + split_type = awk; + } + } + } + else { + spat = get_pat(spat, 1); + split_type = regexp; + } + } + + result = rb_ary_new(); + beg = 0; + if (split_type == awk) { + char *ptr = RSTRING_PTR(str); + char *eptr = RSTRING_END(str); + char *bptr = ptr; + int skip = 1; + unsigned int c; + + end = beg; + while (ptr < eptr) { + c = rb_enc_codepoint(ptr, eptr, enc); + ptr += rb_enc_mbclen(ptr, eptr, enc); + if (skip) { + if (rb_enc_isspace(c, enc)) { + beg = ptr - bptr; + } + else { + end = ptr - bptr; + skip = 0; + if (!NIL_P(limit) && lim <= i) break; + } + } + else { + if (rb_enc_isspace(c, enc)) { + rb_ary_push(result, rb_str_subseq(str, beg, end-beg)); + skip = 1; + beg = ptr - bptr; + if (!NIL_P(limit)) ++i; + } + else { + end = ptr - bptr; + } + } + } + } + else if (split_type == string) { + char *ptr = RSTRING_PTR(str); + char *eptr = RSTRING_END(str); + char *sptr = RSTRING_PTR(spat); + int slen = RSTRING_LEN(spat); + + if (is_broken_string(str)) { + rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(STR_ENC_GET(str))); + } + if (is_broken_string(spat)) { + rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(STR_ENC_GET(spat))); + } + enc = rb_enc_check(str, spat); + while (ptr < eptr && + (end = rb_memsearch(sptr, slen, ptr, eptr - ptr, enc)) >= 0) { + /* Check we are at the start of a char */ + char *t = rb_enc_right_char_head(ptr, ptr + end, eptr, enc); + if (t != ptr + end) { + ptr = t; + continue; + } + rb_ary_push(result, rb_str_subseq(str, ptr - RSTRING_PTR(str), end)); + ptr += end + slen; + if (!NIL_P(limit) && lim <= ++i) break; + } + beg = ptr - RSTRING_PTR(str); + } + else { + long start = beg; + long idx; + int last_null = 0; + struct re_registers *regs; + + while ((end = rb_reg_search(spat, str, start, 0)) >= 0) { + regs = RMATCH_REGS(rb_backref_get()); + if (start == end && BEG(0) == END(0)) { + if (!RSTRING_PTR(str)) { + rb_ary_push(result, rb_str_new("", 0)); + break; + } + else if (last_null == 1) { + rb_ary_push(result, rb_str_subseq(str, beg, + rb_enc_mbclen(RSTRING_PTR(str)+beg, + RSTRING_END(str), + enc))); + beg = start; + } + else { + if (RSTRING_PTR(str)+start == RSTRING_END(str)) + start++; + else + start += rb_enc_mbclen(RSTRING_PTR(str)+start,RSTRING_END(str),enc); + last_null = 1; + continue; + } + } + else { + rb_ary_push(result, rb_str_subseq(str, beg, end-beg)); + beg = start = END(0); + } + last_null = 0; + + for (idx=1; idx < regs->num_regs; idx++) { + if (BEG(idx) == -1) continue; + if (BEG(idx) == END(idx)) + tmp = rb_str_new5(str, 0, 0); + else + tmp = rb_str_subseq(str, BEG(idx), END(idx)-BEG(idx)); + rb_ary_push(result, tmp); + } + if (!NIL_P(limit) && lim <= ++i) break; + } + } + if (RSTRING_LEN(str) > 0 && (!NIL_P(limit) || RSTRING_LEN(str) > beg || lim < 0)) { + if (RSTRING_LEN(str) == beg) + tmp = rb_str_new5(str, 0, 0); + else + tmp = rb_str_subseq(str, beg, RSTRING_LEN(str)-beg); + rb_ary_push(result, tmp); + } + if (NIL_P(limit) && lim == 0) { + long len; + while ((len = RARRAY_LEN(result)) > 0 && + (tmp = RARRAY_PTR(result)[len-1], RSTRING_LEN(tmp) == 0)) + rb_ary_pop(result); + } + + return result; +} + +VALUE +rb_str_split(VALUE str, const char *sep0) +{ + VALUE sep; + + StringValue(str); + sep = rb_str_new2(sep0); + return rb_str_split_m(1, &sep, str); +} + + +/* + * Document-method: lines + * call-seq: + * str.lines(separator=$/) => anEnumerator + * str.lines(separator=$/) {|substr| block } => str + * + * Returns an enumerator that gives each line in the string. If a block is + * given, it iterates over each line in the string. + * + * "foo\nbar\n".lines.to_a #=> ["foo\n", "bar\n"] + * "foo\nb ar".lines.sort #=> ["b ar", "foo\n"] + */ + +/* + * Document-method: each_line + * call-seq: + * str.each_line(separator=$/) {|substr| block } => str + * + * Splits str using the supplied parameter as the record separator + * ($/ by default), passing each substring in turn to the supplied + * block. If a zero-length record separator is supplied, the string is split + * into paragraphs delimited by multiple successive newlines. + * + * print "Example one\n" + * "hello\nworld".each {|s| p s} + * print "Example two\n" + * "hello\nworld".each('l') {|s| p s} + * print "Example three\n" + * "hello\n\n\nworld".each('') {|s| p s} + * + * produces: + * + * Example one + * "hello\n" + * "world" + * Example two + * "hel" + * "l" + * "o\nworl" + * "d" + * Example three + * "hello\n\n\n" + * "world" + */ + +static VALUE +rb_str_each_line(int argc, VALUE *argv, VALUE str) +{ + rb_encoding *enc; + VALUE rs; + unsigned int newline; + char *p, *pend, *s, *ptr; + long len, rslen; + VALUE line; + int n; + VALUE orig = str; + + if (argc == 0) { + rs = rb_rs; + } + else { + rb_scan_args(argc, argv, "01", &rs); + } + RETURN_ENUMERATOR(str, argc, argv); + if (NIL_P(rs)) { + rb_yield(str); + return orig; + } + str = rb_str_new4(str); + ptr = p = s = RSTRING_PTR(str); + pend = p + RSTRING_LEN(str); + len = RSTRING_LEN(str); + StringValue(rs); + if (rs == rb_default_rs) { + enc = rb_enc_get(str); + while (p < pend) { + char *p0; + + p = memchr(p, '\n', pend - p); + if (!p) break; + p0 = rb_enc_left_char_head(s, p, pend, enc); + if (!rb_enc_is_newline(p0, pend, enc)) { + p++; + continue; + } + p = p0 + rb_enc_mbclen(p0, pend, enc); + line = rb_str_new5(str, s, p - s); + OBJ_INFECT(line, str); + rb_enc_cr_str_copy_for_substr(line, str); + rb_yield(line); + str_mod_check(str, ptr, len); + s = p; + } + goto finish; + } + + enc = rb_enc_check(str, rs); + rslen = RSTRING_LEN(rs); + if (rslen == 0) { + newline = '\n'; + } + else { + newline = rb_enc_codepoint(RSTRING_PTR(rs), RSTRING_END(rs), enc); + } + + while (p < pend) { + unsigned int c = rb_enc_codepoint(p, pend, enc); + + again: + n = rb_enc_codelen(c, enc); + if (rslen == 0 && c == newline) { + p += n; + if (p < pend && (c = rb_enc_codepoint(p, pend, enc)) != newline) { + goto again; + } + while (p < pend && rb_enc_codepoint(p, pend, enc) == newline) { + p += n; + } + p -= n; + } + if (c == newline && + (rslen <= 1 || memcmp(RSTRING_PTR(rs), p, rslen) == 0)) { + line = rb_str_new5(str, s, p - s + (rslen ? rslen : n)); + OBJ_INFECT(line, str); + rb_enc_cr_str_copy_for_substr(line, str); + rb_yield(line); + str_mod_check(str, ptr, len); + s = p + (rslen ? rslen : n); + } + p += n; + } + + finish: + if (s != pend) { + line = rb_str_new5(str, s, pend - s); + OBJ_INFECT(line, str); + rb_enc_cr_str_copy_for_substr(line, str); + rb_yield(line); + } + + return orig; +} + + +/* + * Document-method: bytes + * call-seq: + * str.bytes => anEnumerator + * str.bytes {|fixnum| block } => str + * + * Returns an enumerator that gives each byte in the string. If a block is + * given, it iterates over each byte in the string. + * + * "hello".bytes.to_a #=> [104, 101, 108, 108, 111] + */ + +/* + * Document-method: each_byte + * call-seq: + * str.each_byte {|fixnum| block } => str + * + * Passes each byte in str to the given block. + * + * "hello".each_byte {|c| print c, ' ' } + * + * produces: + * + * 104 101 108 108 111 + */ + +static VALUE +rb_str_each_byte(VALUE str) +{ + long i; + + RETURN_ENUMERATOR(str, 0, 0); + for (i=0; i anEnumerator + * str.chars {|substr| block } => str + * + * Returns an enumerator that gives each character in the string. + * If a block is given, it iterates over each character in the string. + * + * "foo".chars.to_a #=> ["f","o","o"] + */ + +/* + * Document-method: each_char + * call-seq: + * str.each_char {|cstr| block } => str + * + * Passes each character in str to the given block. + * + * "hello".each_char {|c| print c, ' ' } + * + * produces: + * + * h e l l o + */ + +static VALUE +rb_str_each_char(VALUE str) +{ + int i, len, n; + const char *ptr; + rb_encoding *enc; + + RETURN_ENUMERATOR(str, 0, 0); + str = rb_str_new4(str); + ptr = RSTRING_PTR(str); + len = RSTRING_LEN(str); + enc = rb_enc_get(str); + for (i = 0; i < len; i += n) { + n = rb_enc_mbclen(ptr + i, ptr + len, enc); + rb_yield(rb_str_subseq(str, i, n)); + } + return str; +} + +/* + * Document-method: codepoints + * call-seq: + * str.codepoints => anEnumerator + * str.codepoints {|fixnum| block } => str + * + * Returns an enumerator that gives the Integer ordinal + * of each character in the string, also known as a codepoint + * when applied to Unicode strings. If a block is given, it iterates + * over each character in the string. + * + * "foo\u0635".chars.to_a #=> [102, 111, 111, 1589] + */ + +/* + * Document-method: each_codepoint + * call-seq: + * str.each_codepoint {|integer| block } => str + * + * Passes the Integer ordinal of each character in str, + * also known as a codepoint when applied to Unicode strings to the + * given block. + * + * "hello\u0639".each_codepoint {|c| print c, ' ' } + * + * produces: + * + * 104 101 108 108 111 1593 + */ + +static VALUE +rb_str_each_codepoint(VALUE str) +{ + int len, n; + unsigned int c; + const char *ptr, *end; + rb_encoding *enc; + + if (single_byte_optimizable(str)) return rb_str_each_byte(str); + RETURN_ENUMERATOR(str, 0, 0); + ptr = RSTRING_PTR(str); + len = RSTRING_LEN(str); + end = RSTRING_END(str); + enc = STR_ENC_GET(str); + while (ptr < end) { + c = rb_enc_codepoint(ptr, end, enc); + n = rb_enc_codelen(c, enc); + rb_yield(UINT2NUM(c)); + ptr += n; + } + return str; +} + +static long +chopped_length(VALUE str) +{ + rb_encoding *enc = STR_ENC_GET(str); + const char *p, *p2, *beg, *end; + + beg = RSTRING_PTR(str); + end = beg + RSTRING_LEN(str); + if (beg > end) return 0; + p = rb_enc_prev_char(beg, end, end, enc); + if (!p) return 0; + if (p > beg && rb_enc_codepoint(p, end, enc) == '\n') { + p2 = rb_enc_prev_char(beg, p, end, enc); + if (p2 && rb_enc_codepoint(p2, end, enc) == '\r') p = p2; + } + return p - beg; +} + +/* + * call-seq: + * str.chop! => str or nil + * + * Processes str as for String#chop, returning str, + * or nil if str is the empty string. See also + * String#chomp!. + */ + +static VALUE +rb_str_chop_bang(VALUE str) +{ + if (RSTRING_LEN(str) > 0) { + long len; + str_modify_keep_cr(str); + len = chopped_length(str); + STR_SET_LEN(str, len); + RSTRING_PTR(str)[len] = '\0'; + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.chop => new_str + * + * Returns a new String with the last character removed. If the + * string ends with \r\n, both characters are removed. Applying + * chop to an empty string returns an empty + * string. String#chomp is often a safer alternative, as it leaves + * the string unchanged if it doesn't end in a record separator. + * + * "string\r\n".chop #=> "string" + * "string\n\r".chop #=> "string\n" + * "string\n".chop #=> "string" + * "string".chop #=> "strin" + * "x".chop.chop #=> "" + */ + +static VALUE +rb_str_chop(VALUE str) +{ + VALUE str2 = rb_str_new5(str, RSTRING_PTR(str), chopped_length(str)); + rb_enc_cr_str_copy_for_substr(str2, str); + OBJ_INFECT(str2, str); + return str2; +} + + +/* + * call-seq: + * str.chomp!(separator=$/) => str or nil + * + * Modifies str in place as described for String#chomp, + * returning str, or nil if no modifications were made. + */ + +static VALUE +rb_str_chomp_bang(int argc, VALUE *argv, VALUE str) +{ + rb_encoding *enc; + VALUE rs; + int newline; + char *p, *pp, *e; + long len, rslen; + + len = RSTRING_LEN(str); + if (len == 0) return Qnil; + p = RSTRING_PTR(str); + e = p + len; + if (argc == 0) { + rs = rb_rs; + if (rs == rb_default_rs) { + smart_chomp: + str_modify_keep_cr(str); + enc = rb_enc_get(str); + if (rb_enc_mbminlen(enc) > 1) { + pp = rb_enc_left_char_head(p, e-rb_enc_mbminlen(enc), e, enc); + if (rb_enc_is_newline(pp, e, enc)) { + e = pp; + } + pp = e - rb_enc_mbminlen(enc); + if (pp >= p) { + pp = rb_enc_left_char_head(p, pp, e, enc); + if (rb_enc_ascget(pp, e, 0, enc) == '\r') { + e = pp; + } + } + if (e == RSTRING_END(str)) { + return Qnil; + } + len = e - RSTRING_PTR(str); + STR_SET_LEN(str, len); + } + else { + if (RSTRING_PTR(str)[len-1] == '\n') { + STR_DEC_LEN(str); + if (RSTRING_LEN(str) > 0 && + RSTRING_PTR(str)[RSTRING_LEN(str)-1] == '\r') { + STR_DEC_LEN(str); + } + } + else if (RSTRING_PTR(str)[len-1] == '\r') { + STR_DEC_LEN(str); + } + else { + return Qnil; + } + } + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + return str; + } + } + else { + rb_scan_args(argc, argv, "01", &rs); + } + if (NIL_P(rs)) return Qnil; + StringValue(rs); + rslen = RSTRING_LEN(rs); + if (rslen == 0) { + while (len>0 && p[len-1] == '\n') { + len--; + if (len>0 && p[len-1] == '\r') + len--; + } + if (len < RSTRING_LEN(str)) { + str_modify_keep_cr(str); + STR_SET_LEN(str, len); + RSTRING_PTR(str)[len] = '\0'; + return str; + } + return Qnil; + } + if (rslen > len) return Qnil; + newline = RSTRING_PTR(rs)[rslen-1]; + if (rslen == 1 && newline == '\n') + goto smart_chomp; + + enc = rb_enc_check(str, rs); + if (is_broken_string(rs)) { + return Qnil; + } + pp = e - rslen; + if (p[len-1] == newline && + (rslen <= 1 || + memcmp(RSTRING_PTR(rs), pp, rslen) == 0)) { + if (rb_enc_left_char_head(p, pp, e, enc) != pp) + return Qnil; + str_modify_keep_cr(str); + STR_SET_LEN(str, RSTRING_LEN(str) - rslen); + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.chomp(separator=$/) => new_str + * + * Returns a new String with the given record separator removed + * from the end of str (if present). If $/ has not been + * changed from the default Ruby record separator, then chomp also + * removes carriage return characters (that is it will remove \n, + * \r, and \r\n). + * + * "hello".chomp #=> "hello" + * "hello\n".chomp #=> "hello" + * "hello\r\n".chomp #=> "hello" + * "hello\n\r".chomp #=> "hello\n" + * "hello\r".chomp #=> "hello" + * "hello \n there".chomp #=> "hello \n there" + * "hello".chomp("llo") #=> "he" + */ + +static VALUE +rb_str_chomp(int argc, VALUE *argv, VALUE str) +{ + str = rb_str_dup(str); + rb_str_chomp_bang(argc, argv, str); + return str; +} + +/* + * call-seq: + * str.lstrip! => self or nil + * + * Removes leading whitespace from str, returning nil if no + * change was made. See also String#rstrip! and + * String#strip!. + * + * " hello ".lstrip #=> "hello " + * "hello".lstrip! #=> nil + */ + +static VALUE +rb_str_lstrip_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *t, *e; + + str_modify_keep_cr(str); + enc = STR_ENC_GET(str); + s = RSTRING_PTR(str); + if (!s || RSTRING_LEN(str) == 0) return Qnil; + e = t = RSTRING_END(str); + /* remove spaces at head */ + while (s < e) { + unsigned int cc = rb_enc_codepoint(s, e, enc); + + if (!rb_enc_isspace(cc, enc)) break; + s += rb_enc_codelen(cc, enc); + } + + if (s > RSTRING_PTR(str)) { + STR_SET_LEN(str, t-s); + memmove(RSTRING_PTR(str), s, RSTRING_LEN(str)); + RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0'; + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.lstrip => new_str + * + * Returns a copy of str with leading whitespace removed. See also + * String#rstrip and String#strip. + * + * " hello ".lstrip #=> "hello " + * "hello".lstrip #=> "hello" + */ + +static VALUE +rb_str_lstrip(VALUE str) +{ + str = rb_str_dup(str); + rb_str_lstrip_bang(str); + return str; +} + + +/* + * call-seq: + * str.rstrip! => self or nil + * + * Removes trailing whitespace from str, returning nil if + * no change was made. See also String#lstrip! and + * String#strip!. + * + * " hello ".rstrip #=> " hello" + * "hello".rstrip! #=> nil + */ + +static VALUE +rb_str_rstrip_bang(VALUE str) +{ + rb_encoding *enc; + char *s, *t, *e; + + enc = STR_ENC_GET(str); + rb_str_check_dummy_enc(enc); + s = RSTRING_PTR(str); + if (!s || RSTRING_LEN(str) == 0) return Qnil; + t = e = RSTRING_END(str); + + /* remove trailing spaces or '\0's */ + if (single_byte_optimizable(str)) { + while (s < t && (*(t-1) == '\0' || rb_enc_isspace(*(t-1), enc))) t--; + } + else { + char *tp; + + while ((tp = rb_enc_prev_char(s, t, e, enc)) != NULL) { + unsigned int c = rb_enc_codepoint(tp, e, enc); + if (c && !rb_enc_isspace(c, enc)) break; + t = tp; + } + } + if (t < e) { + int len = t-RSTRING_PTR(str); + + str_modify_keep_cr(str); + STR_SET_LEN(str, len); + RSTRING_PTR(str)[len] = '\0'; + return str; + } + return Qnil; +} + + +/* + * call-seq: + * str.rstrip => new_str + * + * Returns a copy of str with trailing whitespace removed. See also + * String#lstrip and String#strip. + * + * " hello ".rstrip #=> " hello" + * "hello".rstrip #=> "hello" + */ + +static VALUE +rb_str_rstrip(VALUE str) +{ + str = rb_str_dup(str); + rb_str_rstrip_bang(str); + return str; +} + + +/* + * call-seq: + * str.strip! => str or nil + * + * Removes leading and trailing whitespace from str. Returns + * nil if str was not altered. + */ + +static VALUE +rb_str_strip_bang(VALUE str) +{ + VALUE l = rb_str_lstrip_bang(str); + VALUE r = rb_str_rstrip_bang(str); + + if (NIL_P(l) && NIL_P(r)) return Qnil; + return str; +} + + +/* + * call-seq: + * str.strip => new_str + * + * Returns a copy of str with leading and trailing whitespace removed. + * + * " hello ".strip #=> "hello" + * "\tgoodbye\r\n".strip #=> "goodbye" + */ + +static VALUE +rb_str_strip(VALUE str) +{ + str = rb_str_dup(str); + rb_str_strip_bang(str); + return str; +} + +static VALUE +scan_once(VALUE str, VALUE pat, long *start) +{ + VALUE result, match; + struct re_registers *regs; + long i; + + if (rb_reg_search(pat, str, *start, 0) >= 0) { + match = rb_backref_get(); + regs = RMATCH_REGS(match); + if (BEG(0) == END(0)) { + rb_encoding *enc = STR_ENC_GET(str); + /* + * Always consume at least one character of the input string + */ + if (RSTRING_LEN(str) > END(0)) + *start = END(0)+rb_enc_mbclen(RSTRING_PTR(str)+END(0), + RSTRING_END(str), enc); + else + *start = END(0)+1; + } + else { + *start = END(0); + } + if (regs->num_regs == 1) { + return rb_reg_nth_match(0, match); + } + result = rb_ary_new2(regs->num_regs); + for (i=1; i < regs->num_regs; i++) { + rb_ary_push(result, rb_reg_nth_match(i, match)); + } + + return result; + } + return Qnil; +} + + +/* + * call-seq: + * str.scan(pattern) => array + * str.scan(pattern) {|match, ...| block } => str + * + * Both forms iterate through str, matching the pattern (which may be a + * Regexp or a String). For each match, a result is + * generated and either added to the result array or passed to the block. If + * the pattern contains no groups, each individual result consists of the + * matched string, $&. If the pattern contains groups, each + * individual result is itself an array containing one entry per group. + * + * a = "cruel world" + * a.scan(/\w+/) #=> ["cruel", "world"] + * a.scan(/.../) #=> ["cru", "el ", "wor"] + * a.scan(/(...)/) #=> [["cru"], ["el "], ["wor"]] + * a.scan(/(..)(..)/) #=> [["cr", "ue"], ["l ", "wo"]] + * + * And the block form: + * + * a.scan(/\w+/) {|w| print "<<#{w}>> " } + * print "\n" + * a.scan(/(.)(.)/) {|x,y| print y, x } + * print "\n" + * + * produces: + * + * <> <> + * rceu lowlr + */ + +static VALUE +rb_str_scan(VALUE str, VALUE pat) +{ + VALUE result; + long start = 0; + long last = -1, prev = 0; + char *p = RSTRING_PTR(str); long len = RSTRING_LEN(str); + + pat = get_pat(pat, 1); + if (!rb_block_given_p()) { + VALUE ary = rb_ary_new(); + + while (!NIL_P(result = scan_once(str, pat, &start))) { + last = prev; + prev = start; + rb_ary_push(ary, result); + } + if (last >= 0) rb_reg_search(pat, str, last, 0); + return ary; + } + + while (!NIL_P(result = scan_once(str, pat, &start))) { + last = prev; + prev = start; + rb_yield(result); + str_mod_check(str, p, len); + } + if (last >= 0) rb_reg_search(pat, str, last, 0); + return str; +} + + +/* + * call-seq: + * str.hex => integer + * + * Treats leading characters from str as a string of hexadecimal digits + * (with an optional sign and an optional 0x) and returns the + * corresponding number. Zero is returned on error. + * + * "0x0a".hex #=> 10 + * "-1234".hex #=> -4660 + * "0".hex #=> 0 + * "wombat".hex #=> 0 + */ + +static VALUE +rb_str_hex(VALUE str) +{ + rb_encoding *enc = rb_enc_get(str); + + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eEncCompatError, "ASCII incompatible encoding: %s", rb_enc_name(enc)); + } + return rb_str_to_inum(str, 16, Qfalse); +} + + +/* + * call-seq: + * str.oct => integer + * + * Treats leading characters of str as a string of octal digits (with an + * optional sign) and returns the corresponding number. Returns 0 if the + * conversion fails. + * + * "123".oct #=> 83 + * "-377".oct #=> -255 + * "bad".oct #=> 0 + * "0377bad".oct #=> 255 + */ + +static VALUE +rb_str_oct(VALUE str) +{ + rb_encoding *enc = rb_enc_get(str); + + if (!rb_enc_asciicompat(enc)) { + rb_raise(rb_eEncCompatError, "ASCII incompatible encoding: %s", rb_enc_name(enc)); + } + return rb_str_to_inum(str, -8, Qfalse); +} + + +/* + * call-seq: + * str.crypt(other_str) => new_str + * + * Applies a one-way cryptographic hash to str by invoking the standard + * library function crypt. The argument is the salt string, which + * should be two characters long, each character drawn from + * [a-zA-Z0-9./]. + */ + +static VALUE +rb_str_crypt(VALUE str, VALUE salt) +{ + extern char *crypt(const char *, const char *); + VALUE result; + const char *s, *saltp; +#ifdef BROKEN_CRYPT + char salt_8bit_clean[3]; +#endif + + StringValue(salt); + if (RSTRING_LEN(salt) < 2) + rb_raise(rb_eArgError, "salt too short (need >=2 bytes)"); + + s = RSTRING_PTR(str); + if (!s) s = ""; + saltp = RSTRING_PTR(salt); +#ifdef BROKEN_CRYPT + if (!ISASCII((unsigned char)saltp[0]) || !ISASCII((unsigned char)saltp[1])) { + salt_8bit_clean[0] = saltp[0] & 0x7f; + salt_8bit_clean[1] = saltp[1] & 0x7f; + salt_8bit_clean[2] = '\0'; + saltp = salt_8bit_clean; + } +#endif + result = rb_str_new2(crypt(s, saltp)); + OBJ_INFECT(result, str); + OBJ_INFECT(result, salt); + return result; +} + + +/* + * call-seq: + * str.intern => symbol + * str.to_sym => symbol + * + * Returns the Symbol corresponding to str, creating the + * symbol if it did not previously exist. See Symbol#id2name. + * + * "Koala".intern #=> :Koala + * s = 'cat'.to_sym #=> :cat + * s == :cat #=> true + * s = '@cat'.to_sym #=> :@cat + * s == :@cat #=> true + * + * This can also be used to create symbols that cannot be represented using the + * :xxx notation. + * + * 'cat and dog'.to_sym #=> :"cat and dog" + */ + +VALUE +rb_str_intern(VALUE s) +{ + VALUE str = RB_GC_GUARD(s); + VALUE sym; + ID id, id2; + + id = rb_intern_str(str); + sym = ID2SYM(id); + id2 = SYM2ID(sym); + if (id != id2) { + const char *name = rb_id2name(id2); + + if (name) { + rb_raise(rb_eRuntimeError, "symbol table overflow (%s given for %s)", + name, RSTRING_PTR(str)); + } + else { + rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %s)", + RSTRING_PTR(str)); + } + } + return sym; +} + + +/* + * call-seq: + * str.ord => integer + * + * Return the Integer ordinal of a one-character string. + * + * "a".ord #=> 97 + */ + +VALUE +rb_str_ord(VALUE s) +{ + unsigned int c; + + c = rb_enc_codepoint(RSTRING_PTR(s), RSTRING_END(s), STR_ENC_GET(s)); + return UINT2NUM(c); +} +/* + * call-seq: + * str.sum(n=16) => integer + * + * Returns a basic n-bit checksum of the characters in str, + * where n is the optional Fixnum parameter, defaulting + * to 16. The result is simply the sum of the binary value of each character in + * str modulo 2n - 1. This is not a particularly good + * checksum. + */ + +static VALUE +rb_str_sum(int argc, VALUE *argv, VALUE str) +{ + VALUE vbits; + int bits; + char *ptr, *p, *pend; + long len; + + if (argc == 0) { + bits = 16; + } + else { + rb_scan_args(argc, argv, "01", &vbits); + bits = NUM2INT(vbits); + } + ptr = p = RSTRING_PTR(str); + len = RSTRING_LEN(str); + pend = p + len; + if (bits >= sizeof(long)*CHAR_BIT) { + VALUE sum = INT2FIX(0); + + while (p < pend) { + str_mod_check(str, ptr, len); + sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p)); + p++; + } + if (bits != 0) { + VALUE mod; + + mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits)); + mod = rb_funcall(mod, '-', 1, INT2FIX(1)); + sum = rb_funcall(sum, '&', 1, mod); + } + return sum; + } + else { + unsigned long sum = 0; + + while (p < pend) { + str_mod_check(str, ptr, len); + sum += (unsigned char)*p; + p++; + } + if (bits != 0) { + sum &= (((unsigned long)1)<= width) return rb_str_dup(str); + n = width - len; + llen = (jflag == 'l') ? 0 : ((jflag == 'r') ? n : n/2); + rlen = n - llen; + cr = ENC_CODERANGE(str); + res = rb_str_new5(str, 0, RSTRING_LEN(str)+n*flen/fclen+2); + p = RSTRING_PTR(res); + while (llen) { + if (flen <= 1) { + *p++ = *f; + llen--; + } + else if (llen > fclen) { + memcpy(p,f,flen); + p += flen; + llen -= fclen; + } + else { + char *fp = str_nth(f, f+flen, llen, enc, singlebyte); + n = fp - f; + memcpy(p,f,n); + p+=n; + break; + } + } + memcpy(p, RSTRING_PTR(str), RSTRING_LEN(str)); + p+=RSTRING_LEN(str); + while (rlen) { + if (flen <= 1) { + *p++ = *f; + rlen--; + } + else if (rlen > fclen) { + memcpy(p,f,flen); + p += flen; + rlen -= fclen; + } + else { + char *fp = str_nth(f, f+flen, rlen, enc, singlebyte); + n = fp - f; + memcpy(p,f,n); + p+=n; + break; + } + } + *p = '\0'; + STR_SET_LEN(res, p-RSTRING_PTR(res)); + OBJ_INFECT(res, str); + if (!NIL_P(pad)) OBJ_INFECT(res, pad); + rb_enc_associate(res, enc); + if (argc == 2) + cr = ENC_CODERANGE_AND(cr, ENC_CODERANGE(pad)); + if (cr != ENC_CODERANGE_BROKEN) + ENC_CODERANGE_SET(res, cr); + return res; +} + + +/* + * call-seq: + * str.ljust(integer, padstr=' ') => new_str + * + * If integer is greater than the length of str, returns a new + * String of length integer with str left justified + * and padded with padstr; otherwise, returns str. + * + * "hello".ljust(4) #=> "hello" + * "hello".ljust(20) #=> "hello " + * "hello".ljust(20, '1234') #=> "hello123412341234123" + */ + +static VALUE +rb_str_ljust(int argc, VALUE *argv, VALUE str) +{ + return rb_str_justify(argc, argv, str, 'l'); +} + + +/* + * call-seq: + * str.rjust(integer, padstr=' ') => new_str + * + * If integer is greater than the length of str, returns a new + * String of length integer with str right justified + * and padded with padstr; otherwise, returns str. + * + * "hello".rjust(4) #=> "hello" + * "hello".rjust(20) #=> " hello" + * "hello".rjust(20, '1234') #=> "123412341234123hello" + */ + +static VALUE +rb_str_rjust(int argc, VALUE *argv, VALUE str) +{ + return rb_str_justify(argc, argv, str, 'r'); +} + + +/* + * call-seq: + * str.center(integer, padstr) => new_str + * + * If integer is greater than the length of str, returns a new + * String of length integer with str centered and + * padded with padstr; otherwise, returns str. + * + * "hello".center(4) #=> "hello" + * "hello".center(20) #=> " hello " + * "hello".center(20, '123') #=> "1231231hello12312312" + */ + +static VALUE +rb_str_center(int argc, VALUE *argv, VALUE str) +{ + return rb_str_justify(argc, argv, str, 'c'); +} + +/* + * call-seq: + * str.partition(sep) => [head, sep, tail] + * + * Searches the string for sep and returns the part before + * it, the sep, and the part after it. If sep is not found, + * returns str and two empty strings. + * + * "hello".partition("l") #=> ["he", "l", "lo"] + * "hello".partition("x") #=> ["hello", "", ""] + */ + +static VALUE +rb_str_partition(VALUE str, VALUE sep) +{ + long pos; + int regex = Qfalse; + + if (TYPE(sep) == T_REGEXP) { + pos = rb_reg_search(sep, str, 0, 0); + regex = Qtrue; + } + else { + VALUE tmp; + + tmp = rb_check_string_type(sep); + if (NIL_P(tmp)) { + rb_raise(rb_eTypeError, "type mismatch: %s given", + rb_obj_classname(sep)); + } + pos = rb_str_index(str, sep, 0); + } + if (pos < 0) { + failed: + return rb_ary_new3(3, str, rb_str_new(0,0),rb_str_new(0,0)); + } + if (regex) { + sep = rb_str_subpat(str, sep, 0); + if (pos == 0 && RSTRING_LEN(sep) == 0) goto failed; + } + return rb_ary_new3(3, rb_str_subseq(str, 0, pos), + sep, + rb_str_subseq(str, pos+RSTRING_LEN(sep), + RSTRING_LEN(str)-pos-RSTRING_LEN(sep))); +} + +/* + * call-seq: + * str.rpartition(sep) => [head, sep, tail] + * + * Searches sep in the string from the end of the string, and + * returns the part before it, the sep, and the part after it. + * If sep is not found, returns two empty strings and + * str. + * + * "hello".rpartition("l") #=> ["hel", "l", "o"] + * "hello".rpartition("x") #=> ["", "", "hello"] + */ + +static VALUE +rb_str_rpartition(VALUE str, VALUE sep) +{ + long pos = RSTRING_LEN(str); + int regex = Qfalse; + + if (TYPE(sep) == T_REGEXP) { + pos = rb_reg_search(sep, str, pos, 1); + regex = Qtrue; + } + else { + VALUE tmp; + + tmp = rb_check_string_type(sep); + if (NIL_P(tmp)) { + rb_raise(rb_eTypeError, "type mismatch: %s given", + rb_obj_classname(sep)); + } + pos = rb_str_sublen(str, pos); + pos = rb_str_rindex(str, sep, pos); + } + if (pos < 0) { + return rb_ary_new3(3, rb_str_new(0,0),rb_str_new(0,0), str); + } + if (regex) { + sep = rb_reg_nth_match(0, rb_backref_get()); + } + return rb_ary_new3(3, rb_str_substr(str, 0, pos), + sep, + rb_str_substr(str,pos+str_strlen(sep,STR_ENC_GET(sep)),RSTRING_LEN(str))); +} + +/* + * call-seq: + * str.start_with?([prefix]+) => true or false + * + * Returns true if str starts with the prefix given. + */ + +static VALUE +rb_str_start_with(int argc, VALUE *argv, VALUE str) +{ + int i; + + for (i=0; i true or false + * + * Returns true if str ends with the suffix given. + */ + +static VALUE +rb_str_end_with(int argc, VALUE *argv, VALUE str) +{ + int i; + char *p, *s, *e; + rb_encoding *enc; + + for (i=0; i str + * + * Changes the encoding to +encoding+ and returns self. + */ + +static VALUE +rb_str_force_encoding(VALUE str, VALUE enc) +{ + str_modifiable(str); + rb_enc_associate(str, rb_to_encoding(enc)); + return str; +} + +/* + * call-seq: + * str.valid_encoding? => true or false + * + * Returns true for a string which encoded correctly. + * + * "\xc2\xa1".force_encoding("UTF-8").valid_encoding? => true + * "\xc2".force_encoding("UTF-8").valid_encoding? => false + * "\x80".force_encoding("UTF-8").valid_encoding? => false + */ + +static VALUE +rb_str_valid_encoding_p(VALUE str) +{ + int cr = rb_enc_str_coderange(str); + + return cr == ENC_CODERANGE_BROKEN ? Qfalse : Qtrue; +} + +/* + * call-seq: + * str.ascii_only? => true or false + * + * Returns true for a string which has only ASCII characters. + * + * "abc".force_encoding("UTF-8").ascii_only? => true + * "abc\u{6666}".force_encoding("UTF-8").ascii_only? => false + */ + +static VALUE +rb_str_is_ascii_only_p(VALUE str) +{ + int cr = rb_enc_str_coderange(str); + + return cr == ENC_CODERANGE_7BIT ? Qtrue : Qfalse; +} + +/********************************************************************** + * Document-class: Symbol + * + * Symbol objects represent names and some strings + * inside the Ruby + * interpreter. They are generated using the :name and + * :"string" literals + * syntax, and by the various to_sym methods. The same + * Symbol object will be created for a given name or string + * for the duration of a program's execution, regardless of the context + * or meaning of that name. Thus if Fred is a constant in + * one context, a method in another, and a class in a third, the + * Symbol :Fred will be the same object in + * all three contexts. + * + * module One + * class Fred + * end + * $f1 = :Fred + * end + * module Two + * Fred = 1 + * $f2 = :Fred + * end + * def Fred() + * end + * $f3 = :Fred + * $f1.object_id #=> 2514190 + * $f2.object_id #=> 2514190 + * $f3.object_id #=> 2514190 + * + */ + + +/* + * call-seq: + * sym == obj => true or false + * + * Equality---If sym and obj are exactly the same + * symbol, returns true. + */ + +static VALUE +sym_equal(VALUE sym1, VALUE sym2) +{ + if (sym1 == sym2) return Qtrue; + return Qfalse; +} + + +static int +sym_printable(const char *s, const char *send, rb_encoding *enc) +{ + while (s < send) { + int c = rb_enc_codepoint(s, send, enc); + int n = rb_enc_codelen(c, enc); + if (!rb_enc_isprint(c, enc)) return Qfalse; + s += n; + } + return Qtrue; +} + +/* + * call-seq: + * sym.inspect => string + * + * Returns the representation of sym as a symbol literal. + * + * :fred.inspect #=> ":fred" + */ + +static VALUE +sym_inspect(VALUE sym) +{ + VALUE str; + ID id = SYM2ID(sym); + rb_encoding *enc; + + sym = rb_id2str(id); + enc = STR_ENC_GET(sym); + str = rb_enc_str_new(0, RSTRING_LEN(sym)+1, enc); + RSTRING_PTR(str)[0] = ':'; + memcpy(RSTRING_PTR(str)+1, RSTRING_PTR(sym), RSTRING_LEN(sym)); + if (RSTRING_LEN(sym) != strlen(RSTRING_PTR(sym)) || + !rb_enc_symname_p(RSTRING_PTR(sym), enc) || + !sym_printable(RSTRING_PTR(sym), RSTRING_END(sym), enc)) { + str = rb_str_inspect(str); + strncpy(RSTRING_PTR(str), ":\"", 2); + } + return str; +} + + +/* + * call-seq: + * sym.id2name => string + * sym.to_s => string + * + * Returns the name or string corresponding to sym. + * + * :fred.id2name #=> "fred" + */ + + +VALUE +rb_sym_to_s(VALUE sym) +{ + ID id = SYM2ID(sym); + + return str_new3(rb_cString, rb_id2str(id)); +} + + +/* + * call-seq: + * sym.to_sym => sym + * sym.intern => sym + * + * In general, to_sym returns the Symbol corresponding + * to an object. As sym is already a symbol, self is returned + * in this case. + */ + +static VALUE +sym_to_sym(VALUE sym) +{ + return sym; +} + +static VALUE +sym_call(VALUE args, VALUE sym, int argc, VALUE *argv) +{ + VALUE obj; + + if (argc < 1) { + rb_raise(rb_eArgError, "no receiver given"); + } + obj = argv[0]; + return rb_funcall3(obj, (ID)sym, argc - 1, argv + 1); +} + +/* + * call-seq: + * sym.to_proc + * + * Returns a _Proc_ object which respond to the given method by _sym_. + * + * (1..3).collect(&:to_s) #=> ["1", "2", "3"] + */ + +static VALUE +sym_to_proc(VALUE sym) +{ + return rb_proc_new(sym_call, (VALUE)SYM2ID(sym)); +} + + +static VALUE +sym_succ(VALUE sym) +{ + return rb_str_intern(rb_str_succ(rb_sym_to_s(sym))); +} + +static VALUE +sym_cmp(VALUE sym, VALUE other) +{ + if (!SYMBOL_P(other)) { + return Qnil; + } + return rb_str_cmp_m(rb_sym_to_s(sym), rb_sym_to_s(other)); +} + +static VALUE +sym_casecmp(VALUE sym, VALUE other) +{ + if (!SYMBOL_P(other)) { + return Qnil; + } + return rb_str_casecmp(rb_sym_to_s(sym), rb_sym_to_s(other)); +} + +static VALUE +sym_match(VALUE sym, VALUE other) +{ + return rb_str_match(rb_sym_to_s(sym), other); +} + +static VALUE +sym_aref(int argc, VALUE *argv, VALUE sym) +{ + return rb_str_aref_m(argc, argv, rb_sym_to_s(sym)); +} + +static VALUE +sym_length(VALUE sym) +{ + return rb_str_length(rb_id2str(SYM2ID(sym))); +} + +static VALUE +sym_empty(VALUE sym) +{ + return rb_str_empty(rb_id2str(SYM2ID(sym))); +} + +static VALUE +sym_upcase(VALUE sym) +{ + return rb_str_intern(rb_str_upcase(rb_id2str(SYM2ID(sym)))); +} + +static VALUE +sym_downcase(VALUE sym) +{ + return rb_str_intern(rb_str_downcase(rb_id2str(SYM2ID(sym)))); +} + +static VALUE +sym_capitalize(VALUE sym) +{ + return rb_str_intern(rb_str_capitalize(rb_id2str(SYM2ID(sym)))); +} + +static VALUE +sym_swapcase(VALUE sym) +{ + return rb_str_intern(rb_str_swapcase(rb_id2str(SYM2ID(sym)))); +} + +static VALUE +sym_encoding(VALUE sym) +{ + return rb_obj_encoding(rb_id2str(SYM2ID(sym))); +} + +ID +rb_to_id(VALUE name) +{ + VALUE tmp; + ID id; + + switch (TYPE(name)) { + default: + tmp = rb_check_string_type(name); + if (NIL_P(tmp)) { + tmp = rb_inspect(name); + rb_raise(rb_eTypeError, "%s is not a symbol", + RSTRING_PTR(tmp)); + } + name = tmp; + /* fall through */ + case T_STRING: + name = rb_str_intern(name); + /* fall through */ + case T_SYMBOL: + return SYM2ID(name); + } + return id; +} + +/* + * A String object holds and manipulates an arbitrary sequence of + * bytes, typically representing characters. String objects may be created + * using String::new or as literals. + * + * Because of aliasing issues, users of strings should be aware of the methods + * that modify the contents of a String object. Typically, + * methods with names ending in ``!'' modify their receiver, while those + * without a ``!'' return a new String. However, there are + * exceptions, such as String#[]=. + * + */ + +void +Init_String(void) +{ +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) + + rb_cString = rb_define_class("String", rb_cObject); + rb_include_module(rb_cString, rb_mComparable); + rb_define_alloc_func(rb_cString, str_alloc); + rb_define_singleton_method(rb_cString, "try_convert", rb_str_s_try_convert, 1); + rb_define_method(rb_cString, "initialize", rb_str_init, -1); + rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1); + rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1); + rb_define_method(rb_cString, "==", rb_str_equal, 1); + rb_define_method(rb_cString, "eql?", rb_str_eql, 1); + rb_define_method(rb_cString, "hash", rb_str_hash_m, 0); + rb_define_method(rb_cString, "casecmp", rb_str_casecmp, 1); + rb_define_method(rb_cString, "+", rb_str_plus, 1); + rb_define_method(rb_cString, "*", rb_str_times, 1); + rb_define_method(rb_cString, "%", rb_str_format_m, 1); + rb_define_method(rb_cString, "[]", rb_str_aref_m, -1); + rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1); + rb_define_method(rb_cString, "insert", rb_str_insert, 2); + rb_define_method(rb_cString, "length", rb_str_length, 0); + rb_define_method(rb_cString, "size", rb_str_length, 0); + rb_define_method(rb_cString, "bytesize", rb_str_bytesize, 0); + rb_define_method(rb_cString, "empty?", rb_str_empty, 0); + rb_define_method(rb_cString, "=~", rb_str_match, 1); + rb_define_method(rb_cString, "match", rb_str_match_m, -1); + rb_define_method(rb_cString, "succ", rb_str_succ, 0); + rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0); + rb_define_method(rb_cString, "next", rb_str_succ, 0); + rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0); + rb_define_method(rb_cString, "upto", rb_str_upto, -1); + rb_define_method(rb_cString, "index", rb_str_index_m, -1); + rb_define_method(rb_cString, "rindex", rb_str_rindex_m, -1); + rb_define_method(rb_cString, "replace", rb_str_replace, 1); + rb_define_method(rb_cString, "clear", rb_str_clear, 0); + rb_define_method(rb_cString, "chr", rb_str_chr, 0); + rb_define_method(rb_cString, "getbyte", rb_str_getbyte, 1); + rb_define_method(rb_cString, "setbyte", rb_str_setbyte, 2); + + rb_define_method(rb_cString, "to_i", rb_str_to_i, -1); + rb_define_method(rb_cString, "to_f", rb_str_to_f, 0); + rb_define_method(rb_cString, "to_s", rb_str_to_s, 0); + rb_define_method(rb_cString, "to_str", rb_str_to_s, 0); + rb_define_method(rb_cString, "inspect", rb_str_inspect, 0); + rb_define_method(rb_cString, "dump", rb_str_dump, 0); + + rb_define_method(rb_cString, "upcase", rb_str_upcase, 0); + rb_define_method(rb_cString, "downcase", rb_str_downcase, 0); + rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0); + rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0); + + rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0); + rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0); + rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0); + rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0); + + rb_define_method(rb_cString, "hex", rb_str_hex, 0); + rb_define_method(rb_cString, "oct", rb_str_oct, 0); + rb_define_method(rb_cString, "split", rb_str_split_m, -1); + rb_define_method(rb_cString, "lines", rb_str_each_line, -1); + rb_define_method(rb_cString, "bytes", rb_str_each_byte, 0); + rb_define_method(rb_cString, "chars", rb_str_each_char, 0); + rb_define_method(rb_cString, "codepoints", rb_str_each_codepoint, 0); + rb_define_method(rb_cString, "reverse", rb_str_reverse, 0); + rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0); + rb_define_method(rb_cString, "concat", rb_str_concat, 1); + rb_define_method(rb_cString, "<<", rb_str_concat, 1); + rb_define_method(rb_cString, "crypt", rb_str_crypt, 1); + rb_define_method(rb_cString, "intern", rb_str_intern, 0); + rb_define_method(rb_cString, "to_sym", rb_str_intern, 0); + rb_define_method(rb_cString, "ord", rb_str_ord, 0); + + rb_define_method(rb_cString, "include?", rb_str_include, 1); + rb_define_method(rb_cString, "start_with?", rb_str_start_with, -1); + rb_define_method(rb_cString, "end_with?", rb_str_end_with, -1); + + rb_define_method(rb_cString, "scan", rb_str_scan, 1); + + rb_define_method(rb_cString, "ljust", rb_str_ljust, -1); + rb_define_method(rb_cString, "rjust", rb_str_rjust, -1); + rb_define_method(rb_cString, "center", rb_str_center, -1); + + rb_define_method(rb_cString, "sub", rb_str_sub, -1); + rb_define_method(rb_cString, "gsub", rb_str_gsub, -1); + rb_define_method(rb_cString, "chop", rb_str_chop, 0); + rb_define_method(rb_cString, "chomp", rb_str_chomp, -1); + rb_define_method(rb_cString, "strip", rb_str_strip, 0); + rb_define_method(rb_cString, "lstrip", rb_str_lstrip, 0); + rb_define_method(rb_cString, "rstrip", rb_str_rstrip, 0); + + rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1); + rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1); + rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0); + rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1); + rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0); + rb_define_method(rb_cString, "lstrip!", rb_str_lstrip_bang, 0); + rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0); + + rb_define_method(rb_cString, "tr", rb_str_tr, 2); + rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2); + rb_define_method(rb_cString, "delete", rb_str_delete, -1); + rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1); + rb_define_method(rb_cString, "count", rb_str_count, -1); + + rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2); + rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2); + rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1); + rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1); + + rb_define_method(rb_cString, "each_line", rb_str_each_line, -1); + rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0); + rb_define_method(rb_cString, "each_char", rb_str_each_char, 0); + rb_define_method(rb_cString, "each_codepoint", rb_str_each_codepoint, 0); + + rb_define_method(rb_cString, "sum", rb_str_sum, -1); + + rb_define_method(rb_cString, "slice", rb_str_aref_m, -1); + rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1); + + rb_define_method(rb_cString, "partition", rb_str_partition, 1); + rb_define_method(rb_cString, "rpartition", rb_str_rpartition, 1); + + rb_define_method(rb_cString, "encoding", rb_obj_encoding, 0); /* in encoding.c */ + rb_define_method(rb_cString, "force_encoding", rb_str_force_encoding, 1); + rb_define_method(rb_cString, "valid_encoding?", rb_str_valid_encoding_p, 0); + rb_define_method(rb_cString, "ascii_only?", rb_str_is_ascii_only_p, 0); + + id_to_s = rb_intern("to_s"); + + rb_fs = Qnil; + rb_define_variable("$;", &rb_fs); + rb_define_variable("$-F", &rb_fs); + + rb_cSymbol = rb_define_class("Symbol", rb_cObject); + rb_include_module(rb_cSymbol, rb_mComparable); + rb_undef_alloc_func(rb_cSymbol); + rb_undef_method(CLASS_OF(rb_cSymbol), "new"); + rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */ + + rb_define_method(rb_cSymbol, "==", sym_equal, 1); + rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0); + rb_define_method(rb_cSymbol, "to_s", rb_sym_to_s, 0); + rb_define_method(rb_cSymbol, "id2name", rb_sym_to_s, 0); + rb_define_method(rb_cSymbol, "intern", sym_to_sym, 0); + rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0); + rb_define_method(rb_cSymbol, "to_proc", sym_to_proc, 0); + rb_define_method(rb_cSymbol, "succ", sym_succ, 0); + rb_define_method(rb_cSymbol, "next", sym_succ, 0); + + rb_define_method(rb_cSymbol, "<=>", sym_cmp, 1); + rb_define_method(rb_cSymbol, "casecmp", sym_casecmp, 1); + rb_define_method(rb_cSymbol, "=~", sym_match, 1); + + rb_define_method(rb_cSymbol, "[]", sym_aref, -1); + rb_define_method(rb_cSymbol, "slice", sym_aref, -1); + rb_define_method(rb_cSymbol, "length", sym_length, 0); + rb_define_method(rb_cSymbol, "size", sym_length, 0); + rb_define_method(rb_cSymbol, "empty?", sym_empty, 0); + rb_define_method(rb_cSymbol, "match", sym_match, 1); + + rb_define_method(rb_cSymbol, "upcase", sym_upcase, 0); + rb_define_method(rb_cSymbol, "downcase", sym_downcase, 0); + rb_define_method(rb_cSymbol, "capitalize", sym_capitalize, 0); + rb_define_method(rb_cSymbol, "swapcase", sym_swapcase, 0); + + rb_define_method(rb_cSymbol, "encoding", sym_encoding, 0); +} diff --git a/lib/ruby-1.9.1-rc1/struct.c b/lib/ruby-1.9.1-rc1/struct.c new file mode 100644 index 0000000..7e6da06 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/struct.c @@ -0,0 +1,909 @@ +/********************************************************************** + + struct.c - + + $Author: yugui $ + created at: Tue Mar 22 18:44:30 JST 1995 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#include "ruby/ruby.h" + +VALUE rb_cStruct; + +static VALUE struct_alloc(VALUE); + +VALUE +rb_struct_iv_get(VALUE c, const char *name) +{ + ID id; + + id = rb_intern(name); + for (;;) { + if (rb_ivar_defined(c, id)) + return rb_ivar_get(c, id); + c = RCLASS_SUPER(c); + if (c == 0 || c == rb_cStruct) + return Qnil; + } +} + +VALUE +rb_struct_s_members(VALUE klass) +{ + VALUE members = rb_struct_iv_get(klass, "__members__"); + + if (NIL_P(members)) { + rb_raise(rb_eTypeError, "uninitialized struct"); + } + if (TYPE(members) != T_ARRAY) { + rb_raise(rb_eTypeError, "corrupted struct"); + } + return members; +} + +VALUE +rb_struct_members(VALUE s) +{ + VALUE members = rb_struct_s_members(rb_obj_class(s)); + + if (RSTRUCT_LEN(s) != RARRAY_LEN(members)) { + rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)", + RARRAY_LEN(members), RSTRUCT_LEN(s)); + } + return members; +} + +static VALUE +rb_struct_s_members_m(VALUE klass) +{ + VALUE members, ary; + VALUE *p, *pend; + + members = rb_struct_s_members(klass); + ary = rb_ary_new2(RARRAY_LEN(members)); + p = RARRAY_PTR(members); pend = p + RARRAY_LEN(members); + while (p < pend) { + rb_ary_push(ary, *p); + p++; + } + + return ary; +} + +/* + * call-seq: + * struct.members => array + * + * Returns an array of strings representing the names of the instance + * variables. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joe.members #=> [:name, :address, :zip] + */ + +static VALUE +rb_struct_members_m(VALUE obj) +{ + return rb_struct_s_members_m(rb_obj_class(obj)); +} + +VALUE +rb_struct_getmember(VALUE obj, ID id) +{ + VALUE members, slot; + long i; + + members = rb_struct_members(obj); + slot = ID2SYM(id); + for (i=0; i= 4) + rb_raise(rb_eSecurityError, "Insecure: can't modify Struct"); +} + +static VALUE +rb_struct_set(VALUE obj, VALUE val) +{ + VALUE members, slot; + long i; + + members = rb_struct_members(obj); + rb_struct_modify(obj); + for (i=0; iklass); + rb_class_inherited(klass, nstr); + } + else { + /* old style: should we warn? */ + name = rb_str_to_str(name); + id = rb_to_id(name); + if (!rb_is_const_id(id)) { + rb_name_error(id, "identifier %s needs to be constant", StringValuePtr(name)); + } + if (rb_const_defined_at(klass, id)) { + rb_warn("redefining constant Struct::%s", StringValuePtr(name)); + rb_mod_remove_const(klass, ID2SYM(id)); + } + nstr = rb_define_class_under(klass, rb_id2name(id), klass); + } + rb_iv_set(nstr, "__members__", members); + + rb_define_alloc_func(nstr, struct_alloc); + rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1); + rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1); + rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0); + for (i=0; i< RARRAY_LEN(members); i++) { + ID id = SYM2ID(RARRAY_PTR(members)[i]); + if (rb_is_local_id(id) || rb_is_const_id(id)) { + if (i < N_REF_FUNC) { + rb_define_method_id(nstr, id, ref_func[i], 0); + } + else { + rb_define_method_id(nstr, id, rb_struct_ref, 0); + } + rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1); + } + } + + return nstr; +} + +VALUE +rb_struct_alloc_noinit(VALUE klass) +{ + return struct_alloc(klass); +} + +VALUE +rb_struct_define_without_accessor(const char *class_name, VALUE super, rb_alloc_func_t alloc, ...) +{ + VALUE klass; + va_list ar; + VALUE members; + long i; + char *name; + + members = rb_ary_new2(0); + va_start(ar, alloc); + i = 0; + while ((name = va_arg(ar, char*)) != NULL) { + rb_ary_push(members, ID2SYM(rb_intern(name))); + } + va_end(ar); + OBJ_FREEZE(members); + + if (class_name) { + klass = rb_define_class(class_name, super); + } + else { + klass = rb_class_new(super); + rb_make_metaclass(klass, RBASIC(super)->klass); + rb_class_inherited(super, klass); + } + + rb_iv_set(klass, "__members__", members); + + if (alloc) + rb_define_alloc_func(klass, alloc); + else + rb_define_alloc_func(klass, struct_alloc); + + return klass; +} + +VALUE +rb_struct_define(const char *name, ...) +{ + va_list ar; + VALUE nm, ary; + char *mem; + + if (!name) nm = Qnil; + else nm = rb_str_new2(name); + ary = rb_ary_new(); + + va_start(ar, name); + while ((mem = va_arg(ar, char*)) != 0) { + ID slot = rb_intern(mem); + rb_ary_push(ary, ID2SYM(slot)); + } + va_end(ar); + + return make_struct(nm, ary, rb_cStruct); +} + +/* + * call-seq: + * Struct.new( [aString] [, aSym]+> ) => StructClass + * StructClass.new(arg, ...) => obj + * StructClass[arg, ...] => obj + * + * Creates a new class, named by aString, containing accessor + * methods for the given symbols. If the name aString is + * omitted, an anonymous structure class will be created. Otherwise, + * the name of this struct will appear as a constant in class + * Struct, so it must be unique for all + * Structs in the system and should start with a capital + * letter. Assigning a structure class to a constant effectively gives + * the class the name of the constant. + * + * Struct::new returns a new Class object, + * which can then be used to create specific instances of the new + * structure. The number of actual parameters must be + * less than or equal to the number of attributes defined for this + * class; unset parameters default to \nil{}. Passing too many + * parameters will raise an \E{ArgumentError}. + * + * The remaining methods listed in this section (class and instance) + * are defined for this generated class. + * + * # Create a structure with a name in Struct + * Struct.new("Customer", :name, :address) #=> Struct::Customer + * Struct::Customer.new("Dave", "123 Main") #=> # + * + * # Create a structure named by its constant + * Customer = Struct.new(:name, :address) #=> Customer + * Customer.new("Dave", "123 Main") #=> # + */ + +static VALUE +rb_struct_s_def(int argc, VALUE *argv, VALUE klass) +{ + VALUE name, rest; + long i; + VALUE st; + ID id; + + rb_scan_args(argc, argv, "1*", &name, &rest); + if (!NIL_P(name) && SYMBOL_P(name)) { + rb_ary_unshift(rest, name); + name = Qnil; + } + for (i=0; i argc) { + rb_mem_clear(RSTRUCT_PTR(self)+argc, n-argc); + } + return Qnil; +} + +VALUE +rb_struct_initialize(VALUE self, VALUE values) +{ + return rb_struct_initialize_m(RARRAY_LEN(values), RARRAY_PTR(values), self); +} + +static VALUE +struct_alloc(VALUE klass) +{ + long n; + NEWOBJ(st, struct RStruct); + OBJSETUP(st, klass, T_STRUCT); + + n = num_members(klass); + + if (0 < n && n <= RSTRUCT_EMBED_LEN_MAX) { + RBASIC(st)->flags &= ~RSTRUCT_EMBED_LEN_MASK; + RBASIC(st)->flags |= n << RSTRUCT_EMBED_LEN_SHIFT; + rb_mem_clear(st->as.ary, n); + } + else { + st->as.heap.ptr = ALLOC_N(VALUE, n); + rb_mem_clear(st->as.heap.ptr, n); + st->as.heap.len = n; + } + + return (VALUE)st; +} + +VALUE +rb_struct_alloc(VALUE klass, VALUE values) +{ + return rb_class_new_instance(RARRAY_LEN(values), RARRAY_PTR(values), klass); +} + +VALUE +rb_struct_new(VALUE klass, ...) +{ + VALUE *mem; + long size, i; + va_list args; + + size = num_members(klass); + mem = ALLOCA_N(VALUE, size); + va_start(args, klass); + for (i=0; i struct + * + * Calls block once for each instance variable, passing the + * value as a parameter. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joe.each {|x| puts(x) } + * + * produces: + * + * Joe Smith + * 123 Maple, Anytown NC + * 12345 + */ + +static VALUE +rb_struct_each(VALUE s) +{ + long i; + + RETURN_ENUMERATOR(s, 0, 0); + for (i=0; i struct + * + * Calls block once for each instance variable, passing the name + * (as a symbol) and the value as parameters. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joe.each_pair {|name, value| puts("#{name} => #{value}") } + * + * produces: + * + * name => Joe Smith + * address => 123 Maple, Anytown NC + * zip => 12345 + */ + +static VALUE +rb_struct_each_pair(VALUE s) +{ + VALUE members; + long i; + + RETURN_ENUMERATOR(s, 0, 0); + members = rb_struct_members(s); + for (i=0; i", cname); + } + + members = rb_struct_members(s); + if (cname[0] == '#') { + str = rb_str_new2("# 0) { + rb_str_cat2(str, ", "); + } + slot = RARRAY_PTR(members)[i]; + id = SYM2ID(slot); + if (rb_is_local_id(id) || rb_is_const_id(id)) { + rb_str_append(str, rb_id2str(id)); + } + else { + rb_str_append(str, rb_inspect(slot)); + } + rb_str_cat2(str, "="); + rb_str_append(str, rb_inspect(RSTRUCT_PTR(s)[i])); + } + rb_str_cat2(str, ">"); + OBJ_INFECT(str, s); + + return str; +} + +/* + * call-seq: + * struct.to_s => string + * struct.inspect => string + * + * Describe the contents of this struct in a string. + */ + +static VALUE +rb_struct_inspect(VALUE s) +{ + return rb_exec_recursive(inspect_struct, s, 0); +} + +/* + * call-seq: + * struct.to_a => array + * struct.values => array + * + * Returns the values for this instance as an array. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joe.to_a[1] #=> "123 Maple, Anytown NC" + */ + +static VALUE +rb_struct_to_a(VALUE s) +{ + return rb_ary_new4(RSTRUCT_LEN(s), RSTRUCT_PTR(s)); +} + +/* :nodoc: */ +VALUE +rb_struct_init_copy(VALUE copy, VALUE s) +{ + if (copy == s) return copy; + rb_check_frozen(copy); + if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) { + rb_raise(rb_eTypeError, "wrong argument class"); + } + if (RSTRUCT_LEN(copy) != RSTRUCT_LEN(s)) { + rb_raise(rb_eTypeError, "struct size mismatch"); + } + MEMCPY(RSTRUCT_PTR(copy), RSTRUCT_PTR(s), VALUE, RSTRUCT_LEN(copy)); + + return copy; +} + +static VALUE +rb_struct_aref_id(VALUE s, ID id) +{ + VALUE members; + long i, len; + + members = rb_struct_members(s); + len = RARRAY_LEN(members); + for (i=0; i anObject + * struct[fixnum] => anObject + * + * Attribute Reference---Returns the value of the instance variable + * named by symbol, or indexed (0..length-1) by + * fixnum. Will raise NameError if the named + * variable does not exist, or IndexError if the index is + * out of range. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * + * joe["name"] #=> "Joe Smith" + * joe[:name] #=> "Joe Smith" + * joe[0] #=> "Joe Smith" + */ + +VALUE +rb_struct_aref(VALUE s, VALUE idx) +{ + long i; + + if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) { + return rb_struct_aref_id(s, rb_to_id(idx)); + } + + i = NUM2LONG(idx); + if (i < 0) i = RSTRUCT_LEN(s) + i; + if (i < 0) + rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)", + i, RSTRUCT_LEN(s)); + if (RSTRUCT_LEN(s) <= i) + rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)", + i, RSTRUCT_LEN(s)); + return RSTRUCT_PTR(s)[i]; +} + +static VALUE +rb_struct_aset_id(VALUE s, ID id, VALUE val) +{ + VALUE members; + long i, len; + + members = rb_struct_members(s); + rb_struct_modify(s); + len = RARRAY_LEN(members); + if (RSTRUCT_LEN(s) != RARRAY_LEN(members)) { + rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)", + RARRAY_LEN(members), RSTRUCT_LEN(s)); + } + for (i=0; i obj + * struct[fixnum] = obj => obj + * + * Attribute Assignment---Assigns to the instance variable named by + * symbol or fixnum the value obj and + * returns it. Will raise a NameError if the named + * variable does not exist, or an IndexError if the index + * is out of range. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * + * joe["name"] = "Luke" + * joe[:zip] = "90210" + * + * joe.name #=> "Luke" + * joe.zip #=> "90210" + */ + +VALUE +rb_struct_aset(VALUE s, VALUE idx, VALUE val) +{ + long i; + + if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) { + return rb_struct_aset_id(s, rb_to_id(idx), val); + } + + i = NUM2LONG(idx); + if (i < 0) i = RSTRUCT_LEN(s) + i; + if (i < 0) { + rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)", + i, RSTRUCT_LEN(s)); + } + if (RSTRUCT_LEN(s) <= i) { + rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)", + i, RSTRUCT_LEN(s)); + } + rb_struct_modify(s); + return RSTRUCT_PTR(s)[i] = val; +} + +static VALUE +struct_entry(VALUE s, long n) +{ + return rb_struct_aref(s, LONG2NUM(n)); +} + +/* + * call-seq: + * struct.values_at(selector,... ) => an_array + * + * Returns an array containing the elements in + * _self_ corresponding to the given selector(s). The selectors + * may be either integer indices or ranges. + * See also .select. + * + * a = %w{ a b c d e f } + * a.values_at(1, 3, 5) + * a.values_at(1, 3, 5, 7) + * a.values_at(-1, -3, -5, -7) + * a.values_at(1..3, 2...5) + */ + +static VALUE +rb_struct_values_at(int argc, VALUE *argv, VALUE s) +{ + return rb_get_values_at(s, RSTRUCT_LEN(s), argc, argv, struct_entry); +} + +/* + * call-seq: + * struct.select {|i| block } => array + * + * Invokes the block passing in successive elements from + * struct, returning an array containing those elements + * for which the block returns a true value (equivalent to + * Enumerable#select). + * + * Lots = Struct.new(:a, :b, :c, :d, :e, :f) + * l = Lots.new(11, 22, 33, 44, 55, 66) + * l.select {|v| (v % 2).zero? } #=> [22, 44, 66] + */ + +static VALUE +rb_struct_select(int argc, VALUE *argv, VALUE s) +{ + VALUE result; + long i; + + if (argc > 0) { + rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); + } + result = rb_ary_new(); + for (i = 0; i < RSTRUCT_LEN(s); i++) { + if (RTEST(rb_yield(RSTRUCT_PTR(s)[i]))) { + rb_ary_push(result, RSTRUCT_PTR(s)[i]); + } + } + + return result; +} + +/* + * call-seq: + * struct == other_struct => true or false + * + * Equality---Returns true if other_struct is + * equal to this one: they must be of the same class as generated by + * Struct::new, and the values of all instance variables + * must be equal (according to Object#==). + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joejr = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * jane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345) + * joe == joejr #=> true + * joe == jane #=> false + */ + +static VALUE +rb_struct_equal(VALUE s, VALUE s2) +{ + long i; + + if (s == s2) return Qtrue; + if (TYPE(s2) != T_STRUCT) return Qfalse; + if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse; + if (RSTRUCT_LEN(s) != RSTRUCT_LEN(s2)) { + rb_bug("inconsistent struct"); /* should never happen */ + } + + for (i=0; i fixnum + * + * Return a hash value based on this struct's contents. + */ + +static VALUE +rb_struct_hash(VALUE s) +{ + long i, h; + VALUE n; + + h = rb_hash(rb_obj_class(s)); + for (i = 0; i < RSTRUCT_LEN(s); i++) { + h = (h << 1) | (h<0 ? 1 : 0); + n = rb_hash(RSTRUCT_PTR(s)[i]); + h ^= NUM2LONG(n); + } + return LONG2FIX(h); +} + +/* + * code-seq: + * struct.eql?(other) => true or false + * + * Two structures are equal if they are the same object, or if all their + * fields are equal (using eql?). + */ + +static VALUE +rb_struct_eql(VALUE s, VALUE s2) +{ + long i; + + if (s == s2) return Qtrue; + if (TYPE(s2) != T_STRUCT) return Qfalse; + if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse; + if (RSTRUCT_LEN(s) != RSTRUCT_LEN(s2)) { + rb_bug("inconsistent struct"); /* should never happen */ + } + + for (i=0; i fixnum + * struct.size => fixnum + * + * Returns the number of instance variables. + * + * Customer = Struct.new(:name, :address, :zip) + * joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) + * joe.length #=> 3 + */ + +static VALUE +rb_struct_size(VALUE s) +{ + return LONG2FIX(RSTRUCT_LEN(s)); +} + +/* + * A Struct is a convenient way to bundle a number of + * attributes together, using accessor methods, without having to write + * an explicit class. + * + * The Struct class is a generator of specific classes, + * each one of which is defined to hold a set of variables and their + * accessors. In these examples, we'll call the generated class + * ``CustomerClass,'' and we'll show an example instance of that + * class as ``CustomerInst.'' + * + * In the descriptions that follow, the parameter symbol refers + * to a symbol, which is either a quoted string or a + * Symbol (such as :name). + */ +void +Init_Struct(void) +{ + rb_cStruct = rb_define_class("Struct", rb_cObject); + rb_include_module(rb_cStruct, rb_mEnumerable); + + rb_undef_alloc_func(rb_cStruct); + rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1); + + rb_define_method(rb_cStruct, "initialize", rb_struct_initialize_m, -1); + rb_define_method(rb_cStruct, "initialize_copy", rb_struct_init_copy, 1); + + rb_define_method(rb_cStruct, "==", rb_struct_equal, 1); + rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1); + rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0); + + rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0); + rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0); + rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0); + rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0); + rb_define_method(rb_cStruct, "size", rb_struct_size, 0); + rb_define_method(rb_cStruct, "length", rb_struct_size, 0); + + rb_define_method(rb_cStruct, "each", rb_struct_each, 0); + rb_define_method(rb_cStruct, "each_pair", rb_struct_each_pair, 0); + rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1); + rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2); + rb_define_method(rb_cStruct, "select", rb_struct_select, -1); + rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1); + + rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0); +} diff --git a/lib/ruby-1.9.1-rc1/template/id.h.tmpl b/lib/ruby-1.9.1-rc1/template/id.h.tmpl new file mode 100644 index 0000000..b511f9c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/id.h.tmpl @@ -0,0 +1,127 @@ +%# -*- c -*- +/* DO NOT EDIT THIS FILE DIRECTLY */ +/********************************************************************** + + id.h - + + $Author: yugui $ + created at: Sun Oct 19 21:12:51 2008 + + Copyright (C) 2007 Koichi Sasada + +**********************************************************************/ +<% +require 'optparse' +vpath = ["."] +input = nil +opt = OptionParser.new do |o| + o.on('-v', '--vpath=DIR') {|dirs| vpath.concat dirs.split(File::PATH_SEPARATOR)} + input, = o.order!(ARGV) +end or abort opt.opt_s + +tokens = nil +vpath.find do |dir| + begin + if line = File.read(File.join(dir, input))[/^\s*enum\s+yytokentype\s*\{([^{}]*)\s*\};/m, 1] + tokens = line.scan(/\b(t(?:LAST_TOKEN|U(?:PLUS|MINUS)|POW|CMP|EQQ?|[NGL]EQ|(?:AND|OR)OP|N?MATCH|DOT\d|AREF|ASET|[LR]SHFT|LAMBDA)|id\w+)\s*=\s*(\d+),?/m) + end + rescue Errno::ENOENT + nil + else + true + end +end +%> +#ifndef RUBY_ID_H +#define RUBY_ID_H + +#define ID_SCOPE_SHIFT 3 +#define ID_SCOPE_MASK 0x07 +#define ID_LOCAL 0x00 +#define ID_INSTANCE 0x01 +#define ID_GLOBAL 0x03 +#define ID_ATTRSET 0x04 +#define ID_CONST 0x05 +#define ID_CLASS 0x06 +#define ID_JUNK 0x07 +#define ID_INTERNAL ID_JUNK + +#ifdef USE_PARSE_H +#include "parse.h" +#endif + +#define symIFUNC ID2SYM(idIFUNC) +#define symCFUNC ID2SYM(idCFUNC) + +#if !defined tLAST_TOKEN && defined YYTOKENTYPE +#define tLAST_TOKEN tLAST_TOKEN +#endif + +enum ruby_method_ids { +#ifndef tLAST_TOKEN +% tokens.each do |token, value| + <%=token%> = <%=value%>, +% end +#endif + idPLUS = '+', + idMINUS = '-', + idMULT = '*', + idDIV = '/', + idMOD = '%', + idLT = '<', + idLTLT = tLSHFT, + idLE = tLEQ, + idGT = '>', + idGE = tGEQ, + idEq = tEQ, + idEqq = tEQQ, + idNeq = tNEQ, + idNot = '!', + idBackquote = '`', + idEqTilde = tMATCH, + idAREF = tAREF, + idASET = tASET, + idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT, + tIntern, + tMethodMissing, + tLength, + tGets, + tSucc, + tEach, + tLambda, + tSend, + t__send__, + tInitialize, +#if SUPPORT_JOKE + tBitblt, + tAnswer, +#endif + tLAST_ID, +#define TOKEN2ID(n) id##n = ((t##n<, <%=value%>); +% end +}; +#endif + +#endif /* RUBY_ID_H */ diff --git a/lib/ruby-1.9.1-rc1/template/insns.inc.tmpl b/lib/ruby-1.9.1-rc1/template/insns.inc.tmpl new file mode 100644 index 0000000..a64b39c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/insns.inc.tmpl @@ -0,0 +1,20 @@ +/** -*-c-*- + This file contains YARV instructions list. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/insns.inc.tmpl' + or insns2vm.rb + */ + + +/* BIN : Basic Instruction Name */ +#define BIN(n) YARVINSN_##n + +enum ruby_vminsn_type { +<%= insns %> + VM_INSTRUCTION_SIZE = <%= @insns.size %> +}; + diff --git a/lib/ruby-1.9.1-rc1/template/insns_info.inc.tmpl b/lib/ruby-1.9.1-rc1/template/insns_info.inc.tmpl new file mode 100644 index 0000000..a58ac3c --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/insns_info.inc.tmpl @@ -0,0 +1,83 @@ +/** -*-c-*- + This file contains instruction information for yarv instruction sequence. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/insns_info.inc.tmpl' + or insns2vm.rb + */ + +<%= insn_type_chars %> + +static const char *const insn_name_info[] = { +<%= insn_names %> +}; + +static const char *const insn_operand_info[] = { +<%= operands_info %> +}; + +static const int insn_len_info[] = { +<%= operands_num_info %> +}; + +#ifdef USE_INSN_RET_NUM +static const int insn_stack_push_num_info[] = { +<%= stack_num_info %> +}; +#endif + +#ifdef USE_INSN_STACK_INCREASE +static int +insn_stack_increase(int depth, int insn, VALUE *opes) +{ + switch(insn){ +<%= stack_increase %> + default: + rb_bug("insn_sp_increase: unreachable"); + } + return 0; +} +#endif + +/* some utilities */ + +static int +insn_len(int insn) +{ + return insn_len_info[insn]; +} + +static const char * +insn_name(int insn) +{ + return insn_name_info[insn]; +} + +static const char * +insn_op_types(int insn) +{ + return insn_operand_info[insn]; +} + +static int +insn_op_type(int insn, int pos) +{ + int len = insn_len(insn) - 1; + if(pos < len){ + return insn_operand_info[insn][pos]; + } + else{ + return 0; + } +} + +#ifdef USE_INSN_RET_NUM +static int +insn_ret_num(int insn) +{ + return insn_stack_push_num_info[insn]; +} +#endif diff --git a/lib/ruby-1.9.1-rc1/template/known_errors.inc.tmpl b/lib/ruby-1.9.1-rc1/template/known_errors.inc.tmpl new file mode 100644 index 0000000..23bca21 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/known_errors.inc.tmpl @@ -0,0 +1,14 @@ +/** -*-c-*- + * DO NOT EDIT + * This file is automatically generated by tools/generic_erb.rb from + * template/known_errors.inc.tmpl and defs/known_errors.def. + */ + +% error_names = ARGF.read.split(/\s+/) +% error_names.each do |name| +#ifdef <%=name%> + set_syserr(<%=name%>, "<%=name%>"); +#else + set_syserr(0, "<%=name%>"); +#endif +% end diff --git a/lib/ruby-1.9.1-rc1/template/minsns.inc.tmpl b/lib/ruby-1.9.1-rc1/template/minsns.inc.tmpl new file mode 100644 index 0000000..f994c9b --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/minsns.inc.tmpl @@ -0,0 +1,14 @@ +/** -*-c-*- + This file contains YARV instructions list, to define YARVCore::Instructions. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/minsns.inc.tmpl' + or insns2vm.rb + */ + +<%= defs %> + + diff --git a/lib/ruby-1.9.1-rc1/template/opt_sc.inc.tmpl b/lib/ruby-1.9.1-rc1/template/opt_sc.inc.tmpl new file mode 100644 index 0000000..f5ad339 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/opt_sc.inc.tmpl @@ -0,0 +1,32 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/opt_sc.inc.tmpl' + or rb/insns2vm.rb + */ + +#define SC_STATE_SIZE 6 + +#define SCS_XX 1 +#define SCS_AX 2 +#define SCS_BX 3 +#define SCS_AB 4 +#define SCS_BA 5 + +#define SC_ERROR 0xffffffff + +static const VALUE sc_insn_info[][SC_STATE_SIZE] = { +<%= sc_insn_info %> +}; + +static const VALUE sc_insn_next[] = { +<%= sc_insn_next %> +}; + diff --git a/lib/ruby-1.9.1-rc1/template/optinsn.inc.tmpl b/lib/ruby-1.9.1-rc1/template/optinsn.inc.tmpl new file mode 100644 index 0000000..c7828fe --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/optinsn.inc.tmpl @@ -0,0 +1,30 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/optinsn.inc.tmpl' + or rb/insns2vm.rb + */ + +static INSN * +insn_operands_unification(INSN *insnobj){ +#ifdef OPT_OPERANDS_UNIFICATION + /* optimize rule */ + switch(insnobj->insn_id){ + +<%= rule %> + + default: + /* do nothing */; + break; + } +#endif + return insnobj; +} + diff --git a/lib/ruby-1.9.1-rc1/template/optunifs.inc.tmpl b/lib/ruby-1.9.1-rc1/template/optunifs.inc.tmpl new file mode 100644 index 0000000..9b268f0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/optunifs.inc.tmpl @@ -0,0 +1,35 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/optunifs.inc.tmpl' + or rb/insns2vm.rb + */ + +/* + static const int UNIFIED_insn_name_1[] = {id, size, ...}; + static const int UNIFIED_insn_name_2[] = {id, size, ...}; + ... + + static const int *const UNIFIED_insn_name[] = {size, + UNIFIED_insn_name_1, + UNIFIED_insn_name_2, ...}; + ... + + static const int *const *const unified_insns_data[] = { + UNIFIED_insn_nameA, + UNIFIED_insn_nameB, ...}; + */ + +<%= unif_insns_each %> +<%= unif_insns %> +<%= unif_insns_data %> + +#undef GET_INSN_NAME + diff --git a/lib/ruby-1.9.1-rc1/template/vm.inc.tmpl b/lib/ruby-1.9.1-rc1/template/vm.inc.tmpl new file mode 100644 index 0000000..d152665 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/vm.inc.tmpl @@ -0,0 +1,29 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is VM main loop. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'insns.c' + */ + +<%= +line = 15 +vm_body.gsub(/\n|__CURRENT_LINE__|__CURRENT_FILE__/){ + e = $& + case e + when '__CURRENT_LINE__' + line.to_s + when '__CURRENT_FILE__' + "vm.inc" + else + line += 1 + e + end +} +%> + diff --git a/lib/ruby-1.9.1-rc1/template/vmtc.inc.tmpl b/lib/ruby-1.9.1-rc1/template/vmtc.inc.tmpl new file mode 100644 index 0000000..f73bbc6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/vmtc.inc.tmpl @@ -0,0 +1,18 @@ +/* -*-c-*- *********************************************************/ +/*******************************************************************/ +/*******************************************************************/ +/** + This file is for threaded code. + + ---- + This file is auto generated by insns2vm.rb + DO NOT TOUCH! + + If you want to fix something, you must edit 'template/vmtc.inc.tmpl' + or insns2vm.rb + */ + +static const void *const insns_address_table[] = { +<%= insns_table %> +}; + diff --git a/lib/ruby-1.9.1-rc1/template/yarvarch.en b/lib/ruby-1.9.1-rc1/template/yarvarch.en new file mode 100644 index 0000000..7a76e25 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/yarvarch.en @@ -0,0 +1,7 @@ +#title YARV: Yet another RubyVM - Software Architecture + +maybe writing. + +* YARV instruction set + +<%= d %> diff --git a/lib/ruby-1.9.1-rc1/template/yarvarch.ja b/lib/ruby-1.9.1-rc1/template/yarvarch.ja new file mode 100644 index 0000000..c332c20 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/yarvarch.ja @@ -0,0 +1,454 @@ +#title YARVƒA[ƒLƒeƒNƒ`ƒƒ +#set author “ú–{ Ruby ‚Ì‰ï ‚³‚³‚¾‚±‚¤‚¢‚¿ + + +- 2005-03-03(Thu) 00:31:12 +0900 ‚¢‚ë‚¢‚ë‚Ə‘‚«’¼‚µ + +---- + +* ‚±‚ê‚́H + +[[YARV: Yet Another RubyVM|http://www.atdot.net/yarv]] ‚Ì ÝŒvƒƒ‚‚Å‚·B + + +YARV ‚́ARuby ƒvƒƒOƒ‰ƒ€‚Ì‚½‚ß‚ÌŽŸ‚Ì‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B + +- Compiler +- VM Generator +- VM (Virtual Machine) +- Assembler +- Dis-Assembler +- (experimental) JIT Compiler +- (experimental) AOT Compiler + + +Œ»Ý‚Ì YARV ‚Í Ruby ƒCƒ“ƒ^ƒvƒŠƒ^‚ÌŠg’£ƒ‰ƒCƒuƒ‰ƒŠ‚Æ‚µ‚ÄŽÀ‘•‚µ‚Ä‚¢‚Ü‚·B‚± +‚ê‚É‚æ‚èARuby ƒCƒ“ƒ^ƒvƒŠƒ^‚Ì•K—v‚È‹@”\iƒp[ƒTAƒIƒuƒWƒFƒNƒgŠÇ—AŠù‘¶ +‚ÌŠg’£ƒ‰ƒCƒuƒ‰ƒŠj‚È‚Ç‚ª‚Ù‚Ú‚»‚Ì‚Ü‚Ü—˜—p‚Å‚«‚Ü‚·B + +‚½‚¾‚µA‚¢‚­‚‚©‚̃pƒbƒ`‚ð Ruby ƒCƒ“ƒ^ƒvƒŠƒ^‚É“–‚Ä‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB + +¡Œã‚́ARuby –{‘̂̃Cƒ“ƒ^ƒvƒŠƒ^•”•ªieval.cj‚ð’u‚«Š·‚¦‚邱‚Æ‚ð–ÚŽw‚µ‚Ä +ŠJ”­‚ðŒp‘±‚·‚é—\’è‚Å‚·B + + +* Compiler (compile.h, compile.c) + +ƒRƒ“ƒpƒCƒ‰‚́ARuby ƒCƒ“ƒ^ƒvƒŠƒ^‚̃p[ƒT‚É‚æ‚Á‚ж¬‚³‚ꂽ\•¶–؁iRNode +ƒf[ƒ^‚É‚æ‚é–؁j‚ð YARV –½—ß—ñ‚É•ÏŠ·‚µ‚Ü‚·BYARV –½—߂ɂ‚¢‚Ä‚ÍŒãq‚µ‚Ü +‚·B + +‚Æ‚­‚ɓ‚¢‚±‚Æ‚Í‚µ‚Ä‚¢‚Ü‚¹‚ñ‚ªAƒXƒR[ƒv‚È‚Ç‚ÌŠJŽnŽž‚Ƀ[ƒJƒ‹•Ï”‚̏‰ +Šú‰»‚È‚Ç‚ðs‚¢A‚ ‚Ƃ͍\•¶–Ø‚ð’H‚è•ÏŠ·‚µ‚Ä‚¢‚«‚Ü‚·B + +•ÏŠ·’†‚Í Ruby ‚Ì Array ƒIƒuƒWƒFƒNƒg‚É YARV –½—߃IƒuƒWƒFƒNƒgA‚¨‚æ‚уIƒy +ƒ‰ƒ“ƒh‚ðŠi”[‚µ‚Ä‚¢‚«AÅŒã‚ÉŽÀs‚Å‚«‚éŒ`‚É•ÏŠ·‚µ‚Ü‚·BƒRƒ“ƒpƒCƒ‰‚ł́AƒR +ƒ“ƒpƒCƒ‹’†‚ɐ¶¬‚·‚郁ƒ‚ƒŠ—̈æ‚ÌŠÇ—‚ª–â‘è‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·‚ªAYARV +‚̏ꍇARuby ƒCƒ“ƒ^ƒvƒŠƒ^‚ª‚·‚ׂĖʓ|‚ð‚Ý‚Ä‚­‚ê‚é‚Ì‚Å‚±‚Ì•”•ª‚Í”ñí‚ÉŠy +‚ɍì‚邱‚Æ‚ª‚Å‚«‚Ü‚µ‚½iƒK[ƒx[ƒWƒRƒŒƒNƒ^‚É‚æ‚Á‚ÄŽ©“®“I‚Ƀƒ‚ƒŠŠÇ—‚ð‚µ +‚Ä‚­‚ê‚邽‚߁jB + +YARV –½—߂́A–½—ß‚ðŽ¦‚·Ž¯•ÊŽqAƒIƒyƒ‰ƒ“ƒh‚ȂǁA‚·‚×‚Ä 1 word iƒ}ƒVƒ“‚Å +•\Œ»‚Å‚«‚鎩‘R‚È’lBC Œ¾Œê‚ł̓|ƒCƒ“ƒ^‚̃TƒCƒYBRuby ƒCƒ“ƒ^ƒvƒŠƒ^—pŒê‚Å +‚Í VALUE ‚̃TƒCƒYj‚Å•\Œ»‚³‚ê‚Ü‚·B‚»‚Ì‚½‚߁AYARV –½—ß‚Í‚¢‚í‚ä‚éuƒoƒCƒg +ƒR[ƒhv‚Å‚Í‚ ‚è‚Ü‚¹‚ñB‚»‚Ì‚½‚߁AYARV ‚Ìà–¾‚Ȃǂł́u–½—ß—ñv‚Æ‚¢‚¤—p +Œê‚ðŽg‚Á‚Ä‚¢‚Ü‚·B + +1 word ‚Å‚ ‚邽‚߁Aƒƒ‚ƒŠ‚Ì—˜—pŒø—¦‚Í‘½­ˆ«‚­‚È‚è‚Ü‚·‚ªAƒAƒNƒZƒX‘¬“x‚È +‚Ç‚ðl—¶‚·‚é‚ƁA–{•ûŽ®‚ªˆê”Ô‚¢‚¢‚ƍl‚¦‚Ä‚¨‚è‚Ü‚·B‚½‚Æ‚¦‚΃Iƒyƒ‰ƒ“ƒh‚ðƒR +ƒ“ƒXƒ^ƒ“ƒgƒv[ƒ‹‚ÉŠi”[‚µAƒCƒ“ƒfƒbƒNƒX‚Ì‚Ý‚ðƒIƒyƒ‰ƒ“ƒh‚ÅŽ¦‚·‚±‚Æ‚à‰Â”\‚Å +‚·‚ªAŠÔÚƒAƒNƒZƒX‚É‚È‚Á‚Ä‚µ‚Ü‚¤‚̂Ő«”\‚ɉe‹¿‚ªo‚邽‚߁A‹p‰º‚µ‚Ü‚µ‚½B + + +* VM Generator (rb/insns2vm.rb, insns.def) + +rb/insns2vm.rb ‚Æ‚¢‚¤ƒXƒNƒŠƒvƒg‚́Ainsns.def ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ð“ǂݍž‚݁A +VM ‚Ì‚½‚ß‚É•K—v‚ȃtƒ@ƒCƒ‹‚𐶐¬‚µ‚Ü‚·B‹ï‘Ì“I‚ɂ́A–½—ß‚ðŽÀs‚·‚é•”•ª‚ð +¶¬‚µ‚Ü‚·‚ªA‚Ù‚©‚É‚àƒRƒ“ƒpƒCƒ‹‚É•K—v‚ȏî•ñAÅ“K‰»‚É•K—v‚ȏî•ñA‚âƒAƒZ +ƒ“ƒuƒ‰A‹tƒAƒZƒ“ƒuƒ‰‚É•K—v‚ȏî•ñ‚ðŽ¦‚·ƒtƒ@ƒCƒ‹‚à¶¬‚µ‚Ü‚·B + + +** –½—ß‹Lq + +insns.def ‚ɂ́AŠe–½—ß‚ª‚ǂ̂悤‚È–½—ß‚Å‚ ‚é‚©‚ð‹Lq‚µ‚Ü‚·B‹ï‘Ì“I‚É‚ÍŽŸ +‚̏î•ñ‚ð‹Lq‚µ‚Ü‚·B + +- –½—ß‚Ì–¼‘O +- ‚»‚Ì–½—߂̃JƒeƒSƒŠAƒRƒƒ“ƒgi‰pŒêA“ú–{Œêj +- ƒIƒyƒ‰ƒ“ƒh‚Ì–¼‘O +- ‚»‚Ì–½—ߎÀs‘O‚ɃXƒ^ƒbƒN‚©‚çƒ|ƒbƒv‚·‚é’l +- ‚»‚Ì–½—ߎÀsŒã‚ɃXƒ^ƒbƒN‚ɃvƒbƒVƒ…‚·‚é’l +- ‚»‚Ì–½—߂̃ƒWƒbƒNiC Œ¾Œê‚Å‹Lqj + +‚½‚Æ‚¦‚΁AƒXƒ^ƒbƒN‚É self ‚ð‚¨‚­ putself ‚Æ‚¢‚¤–½—ß‚ÍŽŸ‚̂悤‚É‹Lq‚µ‚Ü +‚·B + +#code +/** + @c put + @e put self. + @j self ‚ð’u‚­B + */ +DEFINE_INSN +putself +() +() +(VALUE val) +{ + val = GET_SELF(); +} +#end + +‚±‚̏ꍇAƒIƒyƒ‰ƒ“ƒh‚ƁAƒXƒ^ƒbƒN‚©‚çƒ|ƒbƒv‚·‚é’l‚Í–³‚¢‚±‚Æ‚É‚È‚è‚Ü‚·B–½ +—ߏI—¹ŒãAself ‚ðƒXƒ^ƒbƒNƒgƒbƒv‚É’u‚«‚½‚¢‚킯‚Å‚·‚ªA‚»‚ê‚Í val ‚Æ‚¢‚¤A +ƒXƒ^ƒbƒN‚ɃvƒbƒVƒ…‚·‚é’l‚Æ‚µ‚Đ錾‚µ‚Ä‚¨‚¢‚½•Ï”‚É‘ã“ü‚µ‚Ä‚¨‚­‚±‚ƂŁA‚± +‚ê‚ð•ÏŠ·‚·‚é‚ƃXƒ^ƒbƒNƒgƒbƒv‚É’u‚­ C ƒvƒƒOƒ‰ƒ€‚ª¶¬‚³‚ê‚Ü‚·B + +×‚©‚¢ƒtƒH[ƒ}ƒbƒg‚Í insns.def ‚Ì–`“ª‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B‚»‚ñ‚Ȃɓ‚­ +‚È‚¢‚ÆŽv‚¢‚Ü‚·B + +insnhelper.h ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ɁA–½—߃ƒWƒbƒN‚ð‹Lq‚·‚邽‚ß‚É•K—v‚ȃ}ƒNƒ +‚ª’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B‚Ü‚½AVM ‚Ì“à•”\‘¢‚ÉŠÖ‚·‚é’è‹`‚Í vm.h ‚Æ‚¢‚¤ƒtƒ@ƒC +ƒ‹‚É‚ ‚è‚Ü‚·B + + +* VM (Virtual Machine, vm.h, vm.c) + +VM ‚́AŽÀÛ‚ɃRƒ“ƒpƒCƒ‹‚µ‚½Œ‹‰Ê¶¬‚³‚ê‚é YARV –½—ß—ñ‚ðŽÀs‚µ‚Ü‚·B‚Ü‚³ +‚ɁA‚±‚Ì•”•ª‚ª YARV ‚̃Lƒ‚‚É‚È‚èA«—ˆ“I‚É‚Í eval.c ‚ð‚±‚Ì VM ‚Å’u‚«Š·‚¦ +‚½‚¢‚ƍl‚¦‚Ä‚¢‚Ü‚·B + +Œ»Ý‚Ì Ruby ƒCƒ“ƒ^ƒvƒŠƒ^‚ÅŽÀs‚Å‚«‚é‚·‚ׂĂ̂±‚Æ‚ªA‚±‚Ì VM ‚ÅŽÀŒ»‚Å‚«‚é +‚悤‚ɍì‚Á‚Ä‚¢‚Ü‚·iŒ»’iŠK‚Å‚Í‚Ü‚¾Š®‘S‚Å‚Í‚ ‚è‚Ü‚¹‚ñ‚ªA‚»‚¤‚È‚é‚ׂ«‚Å‚·jB + +VM ‚́A’Pƒ‚ȃXƒ^ƒbƒNƒ}ƒVƒ“‚Æ‚µ‚ÄŽÀ‘•‚µ‚Ä‚¢‚Ü‚·BƒXƒŒƒbƒh‚ЂƂ‚ɃXƒ^ƒb +ƒN‚ЂƂ‚ð•ÛŽ‚µ‚Ü‚·BƒXƒ^ƒbƒN‚̗̈æ‚̓q[ƒv‚©‚çŽæ“¾‚·‚é‚̂ŁA_“î‚ȗ̈æ +Ý’肪‰Â”\‚Å‚·B + + +** ƒŒƒWƒXƒ^ + +VM ‚Í 5 ‚‚̉¼‘z“I‚ȃŒƒWƒXƒ^‚É‚æ‚Á‚ЧŒä‚³‚ê‚Ü‚·B + +- PC (Program Counter) +- SP (Stack Pointer) +- CFP (Control Frame Pointer) +- LFP (Local Frame Pointer) +- DFP (Dynamic Frame Pointer) + +PC ‚ÍŒ»ÝŽÀs’†‚Ì–½—ß—ñ‚̈ʒu‚ðŽ¦‚µ‚Ü‚·BSP ‚̓Xƒ^ƒbƒNƒgƒbƒv‚̈ʒu‚ðŽ¦‚µ +‚Ü‚·BCFPALFPADFP ‚Í‚»‚ꂼ‚êƒtƒŒ[ƒ€‚̏î•ñ‚ðŽ¦‚µ‚Ü‚·BÚ×‚ÍŒãq‚µ‚Ü‚·B + + +** ƒXƒ^ƒbƒNƒtƒŒ[ƒ€ + +obsolete (update soon) + + +** ƒtƒŒ[ƒ€ƒfƒUƒCƒ“‚ɂ‚¢‚Ä‚Ì•â‘« + +Lisp ‚̏ˆ—Œn‚È‚Ç‚ð‚©‚ñ‚ª‚¦‚é‚ƁA‚í‚´‚í‚´ƒuƒƒbƒNƒ[ƒJƒ‹ƒtƒŒ[ƒ€‚ƃƒ\ +ƒbƒhƒ[ƒJƒ‹ƒtƒŒ[ƒ€‚̂悤‚È‚à‚Ì‚ð—pˆÓ‚·‚é‚Ì‚ÍŠïˆÙ‚ÉŒ©‚¦‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB +‚ ‚éƒtƒŒ[ƒ€‚ðA“ü‚êŽq\‘¢‚É‚µ‚āAƒ[ƒJƒ‹•Ï”‚̃AƒNƒZƒX‚Í‚»‚Ì“ü‚êŽq‚ðŠO +‘¤‚É’H‚ê‚ΕK‚¸‚½‚Ç‚è’…‚­‚±‚Æ‚ª‚Å‚«‚é‚©‚ç‚Å‚·i‚‚܂èAlfp ‚Í•K—v‚È‚¢jB + +‚µ‚©‚µARuby ‚Å‚Í‚¢‚­‚‚©ó‹µ‚ªˆá‚¢‚Ü‚·B‚Ü‚¸Aƒƒ\ƒbƒhƒ[ƒJƒ‹‚ȏî•ñ‚ª +‚ ‚邱‚ƁA‹ï‘Ì“I‚ɂ̓uƒƒbƒN‚Æselficallee ‚©‚ç‚Ý‚é‚Æ recieverj‚Å‚·B‚± +‚̏î•ñ‚ð‚»‚ê‚¼‚ê‚̃tƒŒ[ƒ€‚É‚à‚½‚¹‚é‚Ì‚Í–³‘Ê‚Å‚·B + +‚Ü‚½ARuby2.0 ‚©‚ç‚̓uƒƒbƒNƒ[ƒJƒ‹•Ï”‚Í‚È‚­‚È‚è‚Ü‚·iƒuƒƒbƒNƒ[ƒJƒ‹ +ˆø”‚ÍŽc‚é‚̂ŁA\‘¢Ž©‘Ì‚Í‚ ‚Ü‚è•Ï‚í‚è‚Ü‚¹‚ñjB‚»‚Ì‚½‚߁Aƒƒ\ƒbƒhƒ[ƒJ +ƒ‹•Ï”‚ւ̃AƒNƒZƒX‚ª•p”­‚·‚邱‚Æ‚ª—\‘z‚³‚ê‚Ü‚·B + +‚±‚Ì‚Æ‚«Aƒƒ\ƒbƒhƒ[ƒJƒ‹•Ï”‚ւ̃AƒNƒZƒX‚Ì‚½‚тɃtƒŒ[ƒ€iƒXƒR[ƒvj‚Ì +ƒŠƒXƒg‚ð‚½‚Ç‚é‚Ì‚Í–³‘Ê‚Å‚ ‚é‚Æ”»’f‚µA–¾Ž¦“I‚Ƀƒ\ƒbƒhƒ[ƒJƒ‹ƒXƒR[ƒv‚Æ +ƒuƒƒbƒNƒtƒŒ[ƒ€‚𕪗£‚µAƒuƒƒbƒNƒtƒŒ[ƒ€‚©‚ç‚̓ƒ\ƒbƒhƒ[ƒJƒ‹ƒtƒŒ[ƒ€ +‚ª lfpƒŒƒWƒXƒ^‚É‚æ‚Á‚Ä—eˆÕ‚ɃAƒNƒZƒX‚Å‚«‚é‚悤‚É‚µ‚Ü‚µ‚½B + + +** ƒƒ\ƒbƒhŒÄ‚яo‚µ‚ɂ‚¢‚Ä + +ƒƒ\ƒbƒhŒÄ‚яo‚µ‚́AYARV –½—ß—ñ‚Å‹Lq‚³‚ꂽƒƒ\ƒbƒh‚©AC ‚Å‹Lq‚³‚ꂽƒ +ƒ\ƒbƒh‚©‚É‚æ‚Á‚ăfƒBƒXƒpƒbƒ`Žè–@‚ª•Ï‚í‚è‚Ü‚·B + +YARV –½—ß—ñ‚Å‚ ‚Á‚½ê‡Aãq‚µ‚½ƒXƒ^ƒbƒNƒtƒŒ[ƒ€‚ðì¬‚µ‚Ä–½—ß‚ðŒp‘±‚µ +‚Ü‚·B‚Æ‚­‚É VM ‚̊֐”‚ðÄ‹AŒÄ‚яo‚·‚·‚邱‚Ƃ͍s‚È‚¢‚Ü‚¹‚ñB + +C ‚Å‹Lq‚³‚ꂽƒƒ\ƒbƒh‚¾‚Á‚½ê‡A’Pƒ‚É‚»‚̊֐”‚ðŒÄ‚яo‚µ‚Ü‚·i‚½‚¾‚µA +ƒoƒbƒNƒgƒŒ[ƒX‚𐳂µ‚­¶¬‚·‚邽‚߂Ƀƒ\ƒbƒhŒÄ‚яo‚µ‚̏î•ñ‚ð•t‰Á‚µ‚Ä‚©‚ç +s‚È‚¢‚Ü‚·jB + +‚±‚Ì‚½‚߁AVM —pƒXƒ^ƒbƒN‚ð•Ê“r—pˆÓ‚µ‚½‚à‚̂́AƒvƒƒOƒ‰ƒ€‚É‚æ‚Á‚Ă̓}ƒVƒ“ +ƒXƒ^ƒbƒN‚ðŽg‚¢Ø‚Á‚Ä‚µ‚Ü‚¤‰Â”\«‚ª‚ ‚è‚Ü‚·iC -> Ruby -> C -> ... ‚Æ‚¢‚¤ +ŒÄ‚яo‚µ‚ª‘±‚¢‚½ê‡jB‚±‚ê‚́AŒ»Ý‚Å‚Í”ð‚¯‚ç‚ê‚È‚¢Žd—l‚Æ‚È‚Á‚Ä‚¢‚Ü‚·B + + +** —áŠO + +—áŠO‚́AJava ‚Ì JVM ‚Æ“¯—l‚É—áŠOƒe[ƒuƒ‹‚ð—pˆÓ‚·‚邱‚Æ‚ÅŽÀŒ»‚µ‚Ü‚·B—áŠO +‚ª”­¶‚µ‚½‚çA“–ŠYƒtƒŒ[ƒ€‚ðA—áŠOƒe[ƒuƒ‹‚ðŒŸ¸‚µ‚Ü‚·B‚»‚±‚ŁA—áŠO‚ª”­ +¶‚µ‚½‚Æ‚«‚Ì PC ‚Ì’l‚ɍ‡’v‚·‚éƒGƒ“ƒgƒŠ‚ª‚ ‚Á‚½ê‡A‚»‚̃Gƒ“ƒgƒŠ‚ɏ]‚Á‚Ä +“®ì‚µ‚Ü‚·B‚à‚µƒGƒ“ƒgƒŠ‚ªŒ©‚‚©‚ç‚È‚©‚Á‚½ê‡AƒXƒ^ƒbƒN‚ðŽT‚«–ß‚µ‚Ä‚Ü‚½ +“¯—l‚É‚»‚̃XƒR[ƒv‚Ì—áŠOƒe[ƒuƒ‹‚ðŒŸ¸‚µ‚Ü‚·B + +‚Ü‚½AbreakAreturniƒuƒƒbƒN’†jAretry ‚È‚Ç‚à“¯—l‚ÌŽd‘g‚Ý‚ÅŽÀŒ»‚µ‚Ü‚·B + +*** —áŠOƒe[ƒuƒ‹ + +—áŠOƒe[ƒuƒ‹ƒGƒ“ƒgƒŠ‚Í‹ï‘Ì“I‚É‚ÍŽŸ‚̏î•ñ‚ªŠi”[‚³‚ê‚Ä‚¢‚Ü‚·B + +- ‘ΏۂƂ·‚é PC ‚Ì”ÍˆÍ +- ‘ΏۂƂ·‚é—áŠO‚ÌŽí—Þ +- ‚à‚µ‘ΏۂƂȂÁ‚½‚Æ‚«‚ɃWƒƒƒ“ƒv‚·‚éæiŽí—Þ‚É‚æ‚éj +- ‚à‚µ‘ΏۂƂȂÁ‚½‚Æ‚«‚É‹N“®‚·‚éƒuƒƒbƒN‚Ì iseq + + +*** rescue + +rescue ß‚̓uƒƒbƒN‚Æ‚µ‚ÄŽÀŒ»‚µ‚Ä‚¢‚Ü‚·B$! ‚Ì’l‚ð—Bˆê‚̈ø”‚Æ‚µ‚ÄŽ‚¿‚Ü +‚·B + +#code +begin +rescue A +rescue B +rescue C +end +#end + +‚́AŽŸ‚̂悤‚È Ruby ƒXƒNƒŠƒvƒg‚É•ÏŠ·‚³‚ê‚Ü‚·B + +#code +{|err| + case err + when A === err + when B === err + when C === err + else + raise # yarv ‚Ì–½—ß‚Å‚Í throw + end +} +#end + + +*** ensure + +³íŒni—áŠO‚ª”­¶‚µ‚È‚©‚Á‚½ê‡j‚ƈُíŒni—áŠO‚ª”­¶‚µ‚½‚Æ‚«‚Ȃǁj‚Ì2 +Ží—Þ‚Ì–½—ß—ñ‚ª¶¬‚³‚ê‚Ü‚·B³íŒn‚ł́A‚½‚¾‚̘A‘±‚µ‚½ƒR[ƒh—̈æ‚Æ‚µ‚ăR +ƒ“ƒpƒCƒ‹‚³‚ê‚Ü‚·B‚Ü‚½AˆÙíŒn‚ł̓uƒƒbƒN‚Æ‚µ‚ÄŽÀ‘•‚µ‚Ü‚·BÅŒã‚Í•K‚¸ +throw –½—ß‚Å’÷‚߂邱‚Æ‚É‚È‚è‚Ü‚·B + + +*** break, returniƒuƒƒbƒN’†jAretry + +break •¶AƒuƒƒbƒN’†‚Ì return •¶Aretry •¶‚Í throw –½—ß‚Æ‚µ‚ăRƒ“ƒpƒCƒ‹ +‚³‚ê‚Ü‚·B‚Ç‚±‚Ü‚Å–ß‚é‚©‚́Abreak ‚ðƒtƒbƒN‚·‚é—áŠOƒe[ƒuƒ‹‚̃Gƒ“ƒgƒŠ‚ª”» +’f‚µ‚Ü‚·B + + +** ’萔‚ÌŒŸõ + +’萔‚Æ‚¢‚¤–¼‘O‚Ȃ̂ɁARuby ‚ł̓Rƒ“ƒpƒCƒ‹Žž‚ÉŒˆ’肵‚Ü‚¹‚ñB‚Æ‚¢‚¤‚©A‚¢ +‚‚܂łàÄ’è‹`‰Â”\‚É‚È‚Á‚Ä‚¢‚Ü‚·B + +’萔ƒAƒNƒZƒX‚Ì‚½‚ß‚ÌRuby‹Lq‚ÍŽŸ‚̂悤‚É‚È‚è‚Ü‚·B + +#code +Ruby•\Œ»: +expr::ID::...::ID +#end + +‚±‚ê‚́Ayarv–½—߃Zƒbƒg‚Å‚ÍŽŸ‚̂悤‚É‚È‚è‚Ü‚·B + +#code +(expr) +getconstant ID +... +getconstant ID +#end + + +*** ’萔ŒŸõƒpƒX + +‚à‚µ expr ‚ª nil ‚¾‚Á‚½ê‡A’萔ŒŸõƒpƒX‚ɏ]‚Á‚Ē萔‚ðŒŸõ‚µ‚Ü‚·B‚±‚Ì +‹““®‚͍¡Œã Ruby 2.0 ‚ÉŒü‚¯‚ĕύX‚³‚ê‚éê‡‚ª‚ ‚è‚Ü‚·B + ++ ƒNƒ‰ƒXAƒ‚ƒWƒ…[ƒ‹‚Ì“®“IƒlƒXƒgŠÖŒWiƒvƒƒOƒ‰ƒ€‚ÌŽš–ʏãj‚ðƒ‹[ƒg‚Ü‚Å’H‚é ++ Œp³ŠÖŒW‚ðƒ‹[ƒgiObjectj‚Ü‚Å’H‚é + +‚±‚Ì‚½‚߁AƒNƒ‰ƒXAƒ‚ƒWƒ…[ƒ‹‚Ì“®“IƒlƒXƒgŠÖŒW‚ð•Û‘¶‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB +‚±‚Ì‚½‚߂ɁAthread_object ‚É‚Í klass_nest_stack ‚Æ‚¢‚¤‚à‚Ì‚ð—pˆÓ‚µ‚Ü‚µ‚½B +‚±‚ê‚́AŒ»Ý‚̃lƒXƒg‚̏î•ñ‚ð•Û‘¶‚µ‚Ü‚·B + +ƒƒ\ƒbƒh’è‹`ŽžA‚»‚ÌŒ»Ý‚̃lƒXƒgî•ñ‚ðƒƒ\ƒbƒh’è‹`Žž‚Ɂidup‚µ‚āj‰Á‚¦‚é +‚±‚ƂŁA‚»‚̃ƒ\ƒbƒh‚ÌŽÀsŽžA‚»‚̃lƒXƒgî•ñ‚ðŽQÆ‚·‚邱‚Æ‚ª‰Â”\‚É‚È‚è‚Ü +‚·B + +ƒgƒbƒvƒŒƒxƒ‹‚ł́A‚»‚̏î•ñ‚Í‚È‚¢‚±‚Æ‚É‚È‚è‚Ü‚·B + +ƒNƒ‰ƒX/ƒ‚ƒWƒ…[ƒ‹’è‹`•¶ŽÀsŽž‚́AŒ»Ý‚̏î•ñ‚»‚Ì‚à‚Ì‚ðŽQÆ‚·‚邱‚Æ‚É‚È‚è +‚Ü‚·B‚±‚ê‚́AƒNƒ‰ƒXƒXƒR[ƒv“Ë“üŽžA‚»‚̏î•ñ‚ðƒNƒ‰ƒX’è‹`•¶‚ɃRƒs[‚µ‚Ü‚· +i‚·‚łɃRƒs[‚³‚ê‚Ä‚¢‚ê‚΁A‚±‚ê‚ðs‚¢‚Ü‚¹‚ñjB + +‚±‚ê‚É‚æ‚èA“®“I‚ȃlƒXƒgî•ñ‚𓝈ê“I‚Ɉµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B + + +** Å“K‰»Žè–@ + +YARV ‚ł͍‚‘¬‰»‚ð–Ú“I‚Æ‚µ‚Ä‚¢‚é‚̂ŁA‚³‚Ü‚´‚܂ȍœK‰»Žè–@‚ð—˜—p‚µ‚Ä‚¢‚Ü +‚·BÚ×‚ÍŠ„ˆ¤‚µ‚Ü‚·‚ªAˆÈ‰º‚ɏq‚ׂéÅ“K‰»‚È‚Ç‚ðs‚È‚Á‚Ä‚¨‚è‚Ü‚·B + + +*** threaded code + +GCC ‚Ì C Œ¾ŒêŠg’£‚Å‚ ‚é’l‚Æ‚µ‚Ẵ‰ƒxƒ‹‚ð—˜—p‚µ‚Ä direct threaded code +‚ðŽÀŒ»‚µ‚Ä‚¢‚Ü‚·B + + +*** Peephole optimization + +‚¢‚­‚‚©‚ÌŠÈ’P‚ȍœK‰»‚ð‚µ‚Ä‚¢‚Ü‚·B + + +*** inline method cache + +–½—ß—ñ‚Ì’†‚Ƀƒ\ƒbƒhŒŸõŒ‹‰Ê‚𖄂ߍž‚Ý‚Ü‚·B + + +*** inline constant cache + +–½—ß—ñ‚Ì’†‚ɒ萔ŒŸõŒ‹‰Ê‚𖄂ߍž‚Ý‚Ü‚·B + + +*** ƒuƒƒbƒN‚Æ Proc ƒIƒuƒWƒFƒNƒg‚Ì•ª—£ + +ƒuƒƒbƒN•t‚«ƒƒ\ƒbƒhŒÄ‚яo‚µ‚ªs‚È‚í‚ꂽ‚Æ‚«‚É‚Í‚·‚®‚ɂ̓uƒƒbƒN‚ð Proc +ƒIƒuƒWƒFƒNƒg‚Æ‚µ‚ж¬‚µ‚Ü‚¹‚ñB‚±‚ê‚É‚æ‚èA•K—v‚È‚¢ Proc ƒIƒuƒWƒFƒNƒg‚Ì +¶¬‚ð—}‚¦‚Ä‚¢‚Ü‚·B + +Proc ƒƒ\ƒbƒh‚́AŽÀÛ‚É•K—v‚É‚È‚Á‚½Žž“_‚ōì‚ç‚êA‚»‚Ì‚Æ‚«‚Ɋ‹«iƒXƒR[ +ƒvã‚ÉŠm•Û‚³‚ꂽ•Ï”‚Ȃǁj‚ðƒq[ƒv‚É•Û‘¶‚µ‚Ü‚·B + + +*** “Á‰»–½—ß + +Fixnum “¯Žm‚̉ÁŽZ‚Ȃǂ𐳒¼‚Ɋ֐”ŒÄ‚яo‚µ‚É‚æ‚Á‚čs‚È‚¤‚ƁAƒRƒXƒg‚ª‚©‚© +‚é‚̂ŁA‚±‚ê‚ç‚̃vƒŠƒ~ƒeƒBƒu‚È‘€ì‚ðs‚È‚¤‚½‚߂̃ƒ\ƒbƒhŒÄ‚яo‚µ‚͐ê—p–½ +—ß‚ð—pˆÓ‚µ‚Ü‚µ‚½B + + +*** –½—ß—Z‡ + +•¡”‚Ì–½—ß‚ð 1 –½—ß‚É•ÏŠ·‚µ‚Ü‚·B—Z‡–½—ß‚Í opt_insn_unif.def ‚Ì‹Lq‚É‚æ +‚莩“®“I‚ɐ¶¬‚³‚ê‚Ü‚·B + + +*** ƒIƒyƒ‰ƒ“ƒh—Z‡ + +•¡”‚̃Iƒyƒ‰ƒ“ƒh‚ðŠÜ‚ß‚½–½—߂𐶐¬‚µ‚Ü‚·B—Z‡–½—ß‚Í opt_operand.def ‚Ì +‹Lq‚É‚æ‚Á‚ÄŽ©“®“I‚ɐ¶¬‚³‚ê‚Ü‚·B + + +*** stack caching + +ƒXƒ^ƒbƒNƒgƒbƒv‚ð‰¼‘zƒŒƒWƒXƒ^‚É•ÛŽ‚·‚é‚悤‚É‚µ‚Ü‚·BŒ»Ý‚Í 2 ŒÂ‚̉¼‘zƒŒ +ƒWƒXƒ^‚ð‘z’肵A5ó‘Ԃ̃Xƒ^ƒbƒNƒLƒƒƒbƒVƒ“ƒO‚ðs‚È‚¢‚Ü‚·BƒXƒ^ƒbƒNƒLƒƒƒb +ƒVƒ“ƒO‚·‚é–½—ß‚ÍŽ©“®“I‚ɐ¶¬‚³‚ê‚Ü‚·B + + +*** JIT Compile + +‹@ŠBŒê‚ðØ‚è“\‚肵‚Ü‚·B”ñí‚ÉŽÀŒ±“I‚ȃR[ƒh‚à‚Ì‚µ‚©ì‚Á‚Ä‚¨‚è‚Ü‚¹‚ñB‚Ù +‚Æ‚ñ‚ǂ̃vƒƒOƒ‰ƒ€‚Í“®‚«‚Ü‚¹‚ñB + + +*** AOT Compile + +YARV –½—ß—ñ‚ð C Œ¾Œê‚É•ÏŠ·‚µ‚Ü‚·B‚Ü‚¾\•ª‚ȍœK‰»‚ðs‚È‚¦‚Ä‚¨‚è‚Ü‚¹‚ñ‚ªA +‚»‚ê‚È‚è‚É“®‚«‚Ü‚·Brb/aotc.rb ‚ªƒRƒ“ƒpƒCƒ‰‚Å‚·B + + +* Assembler (rb/yasm.rb) + +YARV –½—ß—ñ‚̃AƒZƒ“ƒuƒ‰‚ð—pˆÓ‚µ‚Ü‚µ‚½BŽg‚¢•û‚Í rb/yasm.rb ‚ðŽQÆ‚µ‚Ä‚­ +‚¾‚³‚¢i‚Ü‚¾A—Ꭶ‚µ‚Ä‚ ‚鐶¬Žè–@‚Ì‚·‚ׂĂðƒTƒ|[ƒg‚µ‚Ä‚¢‚é‚킯‚Å‚Í‚ ‚è +‚Ü‚¹‚ñjB + + +* Dis-Assembler (disasm.c) + +YARV –½—ß—ñ‚ðŽ¦‚·ƒIƒuƒWƒFƒNƒg YARVCore::InstructionSequence ‚É‚Í disasm +ƒƒ\ƒbƒh‚ª‚ ‚è‚Ü‚·B‚±‚ê‚́A–½—ß—ñ‚ð‹tƒAƒZƒ“ƒuƒ‹‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B + + +* YARV –½—߃Zƒbƒg + +<%= d %> + +* ‚»‚Ì‘¼ + +** ƒeƒXƒg + +test/test_* ‚ªƒeƒXƒgƒP[ƒX‚Å‚·Bˆê‰žAƒ~ƒX‚È‚­“®‚­‚Í‚¸‚Å‚·B‹t‚É‚¢‚¤‚ƁA +‚±‚̃eƒXƒg‚É‹Lq‚³‚ê‚Ä‚¢‚é—á‚Å‚Í‚«‚¿‚ñ‚Æ“®ì‚·‚é‚Æ‚¢‚¤‚±‚Æ‚Å‚·B + + +** ƒxƒ“ƒ`ƒ}[ƒN + +benchmark/bm_* ‚Ƀxƒ“ƒ`ƒ}[ƒNƒvƒƒOƒ‰ƒ€‚ª‚¨‚¢‚Ä‚ ‚è‚Ü‚·B + + +** ¡Œã‚Ì—\’è + +‚Ü‚¾‚Ü‚¾‚â‚ç‚È‚¯‚ê‚΂¢‚¯‚È‚¢‚±‚ƁA–¢ŽÀ‘••”•ª‚ª‚½‚­‚³‚ñ‚ ‚è‚Ü‚·‚ñ‚Å‚â‚Á‚Ä +‚¢‚©‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñBˆê”Ô‘å‚«‚È–Ú•W‚Í eval.c ‚ð’u‚«Š·‚¦‚邱‚Æ‚Å‚µ‚傤 +‚©B + + +*** Verifier + +YARV –½—ß—ñ‚́Aƒ~ƒX‚ª‚ ‚Á‚Ä‚à“®‚©‚µ‚Ä‚µ‚Ü‚¤‚½‚ߊ댯‚Å‚ ‚é‰Â”\«‚ª‚ ‚è‚Ü +‚·B‚»‚Ì‚½‚߁AƒXƒ^ƒbƒN‚Ì—˜—pó‘Ô‚ð‚«‚¿‚ñ‚ÆŽ–‘O‚ÉŒŸØ‚·‚é‚悤‚ȃxƒŠƒtƒ@ƒC +ƒA‚ð—pˆÓ‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢‚ƍl‚¦‚Ä‚¢‚Ü‚·B + + +*** Compiled File ‚̍\‘z + +Ruby ƒvƒƒOƒ‰ƒ€‚ð‚±‚Ì–½—߃Zƒbƒg‚ɃVƒŠƒAƒ‰ƒCƒY‚µ‚½ƒf[ƒ^\‘¢‚ðƒtƒ@ƒCƒ‹‚É +o—Í‚Å‚«‚é‚悤‚É‚µ‚½‚¢‚ƍl‚¦‚Ä‚¢‚Ü‚·B‚±‚ê‚ð—˜—p‚µ‚Ĉê“xƒRƒ“ƒpƒCƒ‹‚µ‚½–½ +—ß—ñ‚ðƒtƒ@ƒCƒ‹‚É•Û‘¶‚µ‚Ä‚¨‚¯‚΁AŽŸ‰ñƒ[ƒhŽž‚ɂ̓Rƒ“ƒpƒCƒ‹‚ÌŽèŠÔAƒRƒXƒg +‚ðÈ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B + + +**** ‘S‘̍\¬ + +ŽŸ‚̂悤‚ȃtƒ@ƒCƒ‹\¬‚ðl‚¦‚Ä‚¢‚Ü‚·‚ªA‚Ü‚¾–¢’è‚Å‚·B + +#code +u4 : 4 byte unsigned storage +u2 : 2 byte unsigned storage +u1 : 1 byte unsigned storage + +every storages are little endian :-) + +CompiledFile{ + u4 magic; + + u2 major; + u2 minor; + + u4 character_code; + + u4 constants_pool_count; + ConstantEntry constants_pool[constants_pool_count]; + + u4 block_count; + blockEntry blocks[block_count]; + + u4 method_count; + MethodEntry methods[method_count]; +} +#end + +Java classfile ‚̃pƒNƒŠB + diff --git a/lib/ruby-1.9.1-rc1/template/yasmdata.rb.tmpl b/lib/ruby-1.9.1-rc1/template/yasmdata.rb.tmpl new file mode 100644 index 0000000..95ad092 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/template/yasmdata.rb.tmpl @@ -0,0 +1,20 @@ +# -*-ruby-*- +# + +class VM + class InstructionSequence + class Instruction + InsnID2NO = { +<%= insn_id2no %> + } + + def self.id2insn_no id + if InsnID2NO.has_key? id + InsnID2NO[id] + end + end + end + end +end + + diff --git a/lib/ruby-1.9.1-rc1/test/base64/test_base64.rb b/lib/ruby-1.9.1-rc1/test/base64/test_base64.rb new file mode 100644 index 0000000..9ae54cb --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/base64/test_base64.rb @@ -0,0 +1,99 @@ +require "test/unit" +require "base64" + +class TestBase64 < Test::Unit::TestCase + def test_sample + assert_equal("U2VuZCByZWluZm9yY2VtZW50cw==\n", Base64.encode64('Send reinforcements')) + assert_equal('Send reinforcements', Base64.decode64("U2VuZCByZWluZm9yY2VtZW50cw==\n")) + assert_equal( + "Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g\nUnVieQ==\n", + Base64.encode64("Now is the time for all good coders\nto learn Ruby")) + assert_equal( + "Now is the time for all good coders\nto learn Ruby", + Base64.decode64("Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g\nUnVieQ==\n")) + assert_equal( + "VGhpcyBpcyBsaW5lIG9uZQpUaGlzIGlzIGxpbmUgdHdvClRoaXMgaXMgbGlu\nZSB0aHJlZQpBbmQgc28gb24uLi4K\n", + Base64.encode64("This is line one\nThis is line two\nThis is line three\nAnd so on...\n")) + assert_equal( + "This is line one\nThis is line two\nThis is line three\nAnd so on...\n", + Base64.decode64("VGhpcyBpcyBsaW5lIG9uZQpUaGlzIGlzIGxpbmUgdHdvClRoaXMgaXMgbGluZSB0aHJlZQpBbmQgc28gb24uLi4K")) + end + + def test_encode64 + assert_equal("", Base64.encode64("")) + assert_equal("AA==\n", Base64.encode64("\0")) + assert_equal("AAA=\n", Base64.encode64("\0\0")) + assert_equal("AAAA\n", Base64.encode64("\0\0\0")) + assert_equal("/w==\n", Base64.encode64("\377")) + assert_equal("//8=\n", Base64.encode64("\377\377")) + assert_equal("////\n", Base64.encode64("\377\377\377")) + assert_equal("/+8=\n", Base64.encode64("\xff\xef")) + end + + def test_decode64 + assert_equal("", Base64.decode64("")) + assert_equal("\0", Base64.decode64("AA==\n")) + assert_equal("\0\0", Base64.decode64("AAA=\n")) + assert_equal("\0\0\0", Base64.decode64("AAAA\n")) + assert_equal("\377", Base64.decode64("/w==\n")) + assert_equal("\377\377", Base64.decode64("//8=\n")) + assert_equal("\377\377\377", Base64.decode64("////\n")) + assert_equal("\xff\xef", Base64.decode64("/+8=\n")) + end + + def test_strict_encode64 + assert_equal("", Base64.strict_encode64("")) + assert_equal("AA==", Base64.strict_encode64("\0")) + assert_equal("AAA=", Base64.strict_encode64("\0\0")) + assert_equal("AAAA", Base64.strict_encode64("\0\0\0")) + assert_equal("/w==", Base64.strict_encode64("\377")) + assert_equal("//8=", Base64.strict_encode64("\377\377")) + assert_equal("////", Base64.strict_encode64("\377\377\377")) + assert_equal("/+8=", Base64.strict_encode64("\xff\xef")) + end + + def test_strict_decode64 + assert_equal("", Base64.strict_decode64("")) + assert_equal("\0", Base64.strict_decode64("AA==")) + assert_equal("\0\0", Base64.strict_decode64("AAA=")) + assert_equal("\0\0\0", Base64.strict_decode64("AAAA")) + assert_equal("\377", Base64.strict_decode64("/w==")) + assert_equal("\377\377", Base64.strict_decode64("//8=")) + assert_equal("\377\377\377", Base64.strict_decode64("////")) + assert_equal("\xff\xef", Base64.strict_decode64("/+8=")) + + assert_raise(ArgumentError) { Base64.strict_decode64("^") } + assert_raise(ArgumentError) { Base64.strict_decode64("A") } + assert_raise(ArgumentError) { Base64.strict_decode64("A^") } + assert_raise(ArgumentError) { Base64.strict_decode64("AA") } + assert_raise(ArgumentError) { Base64.strict_decode64("AA=") } + assert_raise(ArgumentError) { Base64.strict_decode64("AA===") } + assert_raise(ArgumentError) { Base64.strict_decode64("AA=x") } + assert_raise(ArgumentError) { Base64.strict_decode64("AAA") } + assert_raise(ArgumentError) { Base64.strict_decode64("AAA^") } + assert_raise(ArgumentError) { Base64.strict_decode64("AB==") } + assert_raise(ArgumentError) { Base64.strict_decode64("AAB=") } + end + + def test_urlsafe_encode64 + assert_equal("", Base64.urlsafe_encode64("")) + assert_equal("AA==", Base64.urlsafe_encode64("\0")) + assert_equal("AAA=", Base64.urlsafe_encode64("\0\0")) + assert_equal("AAAA", Base64.urlsafe_encode64("\0\0\0")) + assert_equal("_w==", Base64.urlsafe_encode64("\377")) + assert_equal("__8=", Base64.urlsafe_encode64("\377\377")) + assert_equal("____", Base64.urlsafe_encode64("\377\377\377")) + assert_equal("_-8=", Base64.urlsafe_encode64("\xff\xef")) + end + + def test_urlsafe_decode64 + assert_equal("", Base64.urlsafe_decode64("")) + assert_equal("\0", Base64.urlsafe_decode64("AA==")) + assert_equal("\0\0", Base64.urlsafe_decode64("AAA=")) + assert_equal("\0\0\0", Base64.urlsafe_decode64("AAAA")) + assert_equal("\377", Base64.urlsafe_decode64("_w==")) + assert_equal("\377\377", Base64.urlsafe_decode64("__8=")) + assert_equal("\377\377\377", Base64.urlsafe_decode64("____")) + assert_equal("\xff\xef", Base64.urlsafe_decode64("_+8=")) + end +end diff --git a/lib/ruby-1.9.1-rc1/test/bigdecimal/test_bigdecimal.rb b/lib/ruby-1.9.1-rc1/test/bigdecimal/test_bigdecimal.rb new file mode 100644 index 0000000..0c9aef0 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/bigdecimal/test_bigdecimal.rb @@ -0,0 +1,696 @@ +require "test/unit" +require "bigdecimal" + +class TestBigDecimal < Test::Unit::TestCase + def setup + BigDecimal.mode(BigDecimal::EXCEPTION_ALL, true) + BigDecimal.mode(BigDecimal::EXCEPTION_UNDERFLOW, true) + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, true) + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_UP) + BigDecimal.limit(0) + end + + def test_version + assert_equal("1.0.1", BigDecimal.ver) + end + + def test_global_new + assert_equal(1, BigDecimal("1")) + assert_equal(1, BigDecimal("1", 1)) + assert_raise(ArgumentError) { BigDecimal("1", -1) } + end + + def test_new + assert_equal(1, BigDecimal.new("1")) + assert_equal(1, BigDecimal.new("1", 1)) + assert_equal(1, BigDecimal.new(" 1 ")) + assert_equal(111, BigDecimal.new("1_1_1_")) + assert_equal(0, BigDecimal.new("_1_1_1")) + + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + assert_equal( 1, BigDecimal.new("Infinity").infinite?) + assert_equal(-1, BigDecimal.new("-Infinity").infinite?) + assert_equal(true, BigDecimal.new("NaN").nan?) + end + + def _test_mode(type) + BigDecimal.mode(type, true) + assert_raise(FloatDomainError) { yield } + + BigDecimal.mode(type, false) + assert_nothing_raised { yield } + end + + def test_mode + assert_raise(TypeError) { BigDecimal.mode(BigDecimal::EXCEPTION_ALL, 1) } + assert_raise(TypeError) { BigDecimal.mode(BigDecimal::ROUND_MODE, 256) } + assert_raise(TypeError) { BigDecimal.mode(0xf000, true) } + end + + def test_exception_nan + _test_mode(BigDecimal::EXCEPTION_NaN) { BigDecimal.new("NaN") } + end + + def test_exception_infinity + _test_mode(BigDecimal::EXCEPTION_INFINITY) { BigDecimal.new("Infinity") } + end + + def test_exception_underflow + _test_mode(BigDecimal::EXCEPTION_UNDERFLOW) do + x = BigDecimal.new("0.1") + 100.times do + x *= x + break if x == false + end + end + end + + def test_exception_overflow + _test_mode(BigDecimal::EXCEPTION_OVERFLOW) do + x = BigDecimal.new("10") + 100.times do + x *= x + break if x == false + end + end + end + + def test_exception_zerodivide + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + _test_mode(BigDecimal::EXCEPTION_ZERODIVIDE) { 1 / BigDecimal.new("0") } + _test_mode(BigDecimal::EXCEPTION_ZERODIVIDE) { -1 / BigDecimal.new("0") } + end + + def test_round_up + n4 = BigDecimal.new("4") # n4 / 9 = 0.44444... + n5 = BigDecimal.new("5") # n5 / 9 = 0.55555... + n6 = BigDecimal.new("6") # n6 / 9 = 0.66666... + m4, m5, m6 = -n4, -n5, -n6 + n2h = BigDecimal.new("2.5") + n3h = BigDecimal.new("3.5") + m2h, m3h = -n2h, -n3h + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_UP) + assert_operator(n4, :<, n4 / 9 * 9) + assert_operator(n5, :<, n5 / 9 * 9) + assert_operator(n6, :<, n6 / 9 * 9) + assert_operator(m4, :>, m4 / 9 * 9) + assert_operator(m5, :>, m5 / 9 * 9) + assert_operator(m6, :>, m6 / 9 * 9) + assert_equal(3, n2h.round) + assert_equal(4, n3h.round) + assert_equal(-3, m2h.round) + assert_equal(-4, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_DOWN) + assert_operator(n4, :>, n4 / 9 * 9) + assert_operator(n5, :>, n5 / 9 * 9) + assert_operator(n6, :>, n6 / 9 * 9) + assert_operator(m4, :<, m4 / 9 * 9) + assert_operator(m5, :<, m5 / 9 * 9) + assert_operator(m6, :<, m6 / 9 * 9) + assert_equal(2, n2h.round) + assert_equal(3, n3h.round) + assert_equal(-2, m2h.round) + assert_equal(-3, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_UP) + assert_operator(n4, :>, n4 / 9 * 9) + assert_operator(n5, :<, n5 / 9 * 9) + assert_operator(n6, :<, n6 / 9 * 9) + assert_operator(m4, :<, m4 / 9 * 9) + assert_operator(m5, :>, m5 / 9 * 9) + assert_operator(m6, :>, m6 / 9 * 9) + assert_equal(3, n2h.round) + assert_equal(4, n3h.round) + assert_equal(-3, m2h.round) + assert_equal(-4, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_DOWN) + assert_operator(n4, :>, n4 / 9 * 9) + assert_operator(n5, :>, n5 / 9 * 9) + assert_operator(n6, :<, n6 / 9 * 9) + assert_operator(m4, :<, m4 / 9 * 9) + assert_operator(m5, :<, m5 / 9 * 9) + assert_operator(m6, :>, m6 / 9 * 9) + assert_equal(2, n2h.round) + assert_equal(3, n3h.round) + assert_equal(-2, m2h.round) + assert_equal(-3, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_EVEN) + assert_operator(n4, :>, n4 / 9 * 9) + assert_operator(n5, :<, n5 / 9 * 9) + assert_operator(n6, :<, n6 / 9 * 9) + assert_operator(m4, :<, m4 / 9 * 9) + assert_operator(m5, :>, m5 / 9 * 9) + assert_operator(m6, :>, m6 / 9 * 9) + assert_equal(2, n2h.round) + assert_equal(4, n3h.round) + assert_equal(-2, m2h.round) + assert_equal(-4, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_CEILING) + assert_operator(n4, :<, n4 / 9 * 9) + assert_operator(n5, :<, n5 / 9 * 9) + assert_operator(n6, :<, n6 / 9 * 9) + assert_operator(m4, :<, m4 / 9 * 9) + assert_operator(m5, :<, m5 / 9 * 9) + assert_operator(m6, :<, m6 / 9 * 9) + assert_equal(3, n2h.round) + assert_equal(4, n3h.round) + assert_equal(-2, m2h.round) + assert_equal(-3, m3h.round) + + BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_FLOOR) + assert_operator(n4, :>, n4 / 9 * 9) + assert_operator(n5, :>, n5 / 9 * 9) + assert_operator(n6, :>, n6 / 9 * 9) + assert_operator(m4, :>, m4 / 9 * 9) + assert_operator(m5, :>, m5 / 9 * 9) + assert_operator(m6, :>, m6 / 9 * 9) + assert_equal(2, n2h.round) + assert_equal(3, n3h.round) + assert_equal(-3, m2h.round) + assert_equal(-4, m3h.round) + end + + def test_zero_p + assert_equal(true, BigDecimal.new("0").zero?) + assert_equal(false, BigDecimal.new("1").zero?) + end + + def test_nonzero_p + assert_equal(nil, BigDecimal.new("0").nonzero?) + assert_equal(BigDecimal.new("1"), BigDecimal.new("1").nonzero?) + end + + def test_double_fig + assert_kind_of(Integer, BigDecimal.double_fig) + end + + def test_cmp + n1 = BigDecimal.new("1") + n2 = BigDecimal.new("2") + assert_equal( 0, n1 <=> n1) + assert_equal( 1, n2 <=> n1) + assert_equal(-1, n1 <=> n2) + assert_operator(n1, :==, n1) + assert_operator(n1, :!=, n2) + assert_operator(n1, :<, n2) + assert_operator(n1, :<=, n1) + assert_operator(n1, :<=, n2) + assert_operator(n2, :>, n1) + assert_operator(n2, :>=, n1) + assert_operator(n1, :>=, n1) + + assert_operator(BigDecimal.new("-0"), :==, BigDecimal.new("0")) + assert_operator(BigDecimal.new("0"), :<, BigDecimal.new("1")) + assert_operator(BigDecimal.new("1"), :>, BigDecimal.new("0")) + assert_operator(BigDecimal.new("1"), :>, BigDecimal.new("-1")) + assert_operator(BigDecimal.new("-1"), :<, BigDecimal.new("1")) + assert_operator(BigDecimal.new((2**100).to_s), :>, BigDecimal.new("1")) + assert_operator(BigDecimal.new("1"), :<, BigDecimal.new((2**100).to_s)) + + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + inf = BigDecimal.new("Infinity") + assert_operator(inf, :>, 1) + assert_operator(1, :<, inf) + end + + def test_cmp_corece + n1 = BigDecimal.new("1") + n2 = BigDecimal.new("2") + o1 = Object.new; def o1.coerce(x); [x, BigDecimal.new("1")]; end + o2 = Object.new; def o2.coerce(x); [x, BigDecimal.new("2")]; end + assert_equal( 0, n1 <=> o1) + assert_equal( 1, n2 <=> o1) + assert_equal(-1, n1 <=> o2) + assert_operator(n1, :==, o1) + assert_operator(n1, :!=, o2) + assert_operator(n1, :<, o2) + assert_operator(n1, :<=, o1) + assert_operator(n1, :<=, o2) + assert_operator(n2, :>, o1) + assert_operator(n2, :>=, o1) + assert_operator(n1, :>=, 1) + end + + def test_cmp_bignum + assert_operator(BigDecimal.new((2**100).to_s), :==, 2**100) + end + + def test_cmp_data + d = Time.now; def d.coerce(x); [x, x]; end + assert_operator(BigDecimal.new((2**100).to_s), :==, d) + end + + def test_precs + a = BigDecimal.new("1").precs + assert_instance_of(Array, a) + assert_equal(2, a.size) + assert_kind_of(Integer, a[0]) + assert_kind_of(Integer, a[1]) + end + + def test_hash + a = [] + b = BigDecimal.new("1") + 10.times { a << b *= 10 } + h = {} + a.each_with_index {|x, i| h[x] = i } + a.each_with_index do |x, i| + assert_equal(i, h[x]) + end + end + + def test_marshal + s = Marshal.dump(BigDecimal("1", 1)) + assert_equal(BigDecimal("1", 1), Marshal.load(s)) + + # corrupt data + s = s.gsub(/BigDecimal.*\z/m) {|x| x.gsub(/\d/m, "-") } + assert_raise(TypeError) { Marshal.load(s) } + end + + def test_finite_infinite_nan + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, false) + + x = BigDecimal.new("0") + assert_equal(true, x.finite?) + assert_equal(nil, x.infinite?) + assert_equal(false, x.nan?) + y = 1 / x + assert_equal(false, y.finite?) + assert_equal(1, y.infinite?) + assert_equal(false, y.nan?) + y = -1 / x + assert_equal(false, y.finite?) + assert_equal(-1, y.infinite?) + assert_equal(false, y.nan?) + + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + y = 0 / x + assert_equal(false, y.finite?) + assert_equal(nil, y.infinite?) + assert_equal(true, y.nan?) + end + + def test_to_i + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + + x = BigDecimal.new("0") + assert_kind_of(Integer, x.to_i) + assert_equal(0, x.to_i) + assert_raise(FloatDomainError){( 1 / x).to_i} + assert_raise(FloatDomainError){(-1 / x).to_i} + assert_raise(FloatDomainError) {( 0 / x).to_i} + x = BigDecimal.new("1") + assert_equal(1, x.to_i) + x = BigDecimal.new((2**100).to_s) + assert_equal(2**100, x.to_i) + end + + def test_to_f + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, false) + + x = BigDecimal.new("0") + assert_instance_of(Float, x.to_f) + assert_equal(0.0, x.to_f) + assert_equal( 1.0 / 0.0, ( 1 / x).to_f) + assert_equal(-1.0 / 0.0, (-1 / x).to_f) + assert_equal(true, ( 0 / x).to_f.nan?) + x = BigDecimal.new("1") + assert_equal(1.0, x.to_f) + x = BigDecimal.new((2**100).to_s) + assert_equal((2**100).to_f, x.to_f) + x = BigDecimal.new("1" + "0" * 10000) + assert_equal(0, BigDecimal.new("-0").to_f) + + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, true) + assert_raise(FloatDomainError) { x.to_f } + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + assert_kind_of(Float, x .to_f) + assert_kind_of(Float, (-x).to_f) + end + + def test_coerce + a, b = BigDecimal.new("1").coerce(1.0) + assert_instance_of(Float, a) + assert_instance_of(Float, b) + end + + def test_uplus + x = BigDecimal.new("1") + assert_equal(x, x.send(:+@)) + end + + def test_add + x = BigDecimal.new("1") + assert_equal(BigDecimal.new("2"), x + x) + assert_equal(1, BigDecimal.new("0") + 1) + assert_equal(1, x + 0) + + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("0") + 0).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("-0") + 0).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (BigDecimal.new("-0") + BigDecimal.new("-0")).sign) + + x = BigDecimal.new((2**100).to_s) + assert_equal(BigDecimal.new((2**100+1).to_s), x + 1) + end + + def test_sub + x = BigDecimal.new("1") + assert_equal(BigDecimal.new("0"), x - x) + assert_equal(-1, BigDecimal.new("0") - 1) + assert_equal(1, x - 0) + + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("0") - 0).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (BigDecimal.new("-0") - 0).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("-0") - BigDecimal.new("-0")).sign) + + x = BigDecimal.new((2**100).to_s) + assert_equal(BigDecimal.new((2**100-1).to_s), x - 1) + end + + def test_mult + x = BigDecimal.new((2**100).to_s) + assert_equal(BigDecimal.new((2**100 * 3).to_s), (x * 3).to_i) + assert_equal(x, (x * 1).to_i) + assert_equal(x, (BigDecimal("1") * x).to_i) + assert_equal(BigDecimal.new((2**200).to_s), (x * x).to_i) + end + + def test_div + x = BigDecimal.new((2**100).to_s) + assert_equal(BigDecimal.new((2**100 / 3).to_s), (x / 3).to_i) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("0") / 1).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (BigDecimal.new("-0") / 1).sign) + assert_equal(2, BigDecimal.new("2") / 1) + assert_equal(-2, BigDecimal.new("2") / -1) + end + + def test_mod + x = BigDecimal.new((2**100).to_s) + assert_equal(1, x % 3) + assert_equal(2, (-x) % 3) + assert_equal(-2, x % -3) + assert_equal(-1, (-x) % -3) + end + + def test_remainder + x = BigDecimal.new((2**100).to_s) + assert_equal(1, x.remainder(3)) + assert_equal(-1, (-x).remainder(3)) + assert_equal(1, x.remainder(-3)) + assert_equal(-1, (-x).remainder(-3)) + end + + def test_divmod + x = BigDecimal.new((2**100).to_s) + assert_equal([(x / 3).floor, 1], x.divmod(3)) + assert_equal([(-x / 3).floor, 2], (-x).divmod(3)) + + assert_equal([0, 0], BigDecimal.new("0").divmod(2)) + + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + a, b = BigDecimal.new("0").divmod(0) + assert_equal(true, a.nan?) + assert_equal(true, b.nan?) + end + + def test_add_bigdecimal + x = BigDecimal.new((2**100).to_s) + assert_equal(3000000000000000000000000000000, x.add(x, 1)) + assert_equal(2500000000000000000000000000000, x.add(x, 2)) + assert_equal(2540000000000000000000000000000, x.add(x, 3)) + end + + def test_sub_bigdecimal + x = BigDecimal.new((2**100).to_s) + assert_equal(1000000000000000000000000000000, x.sub(1, 1)) + assert_equal(1300000000000000000000000000000, x.sub(1, 2)) + assert_equal(1270000000000000000000000000000, x.sub(1, 3)) + end + + def test_mult_bigdecimal + x = BigDecimal.new((2**100).to_s) + assert_equal(4000000000000000000000000000000, x.mult(3, 1)) + assert_equal(3800000000000000000000000000000, x.mult(3, 2)) + assert_equal(3800000000000000000000000000000, x.mult(3, 3)) + end + + def test_div_bigdecimal + x = BigDecimal.new((2**100).to_s) + assert_equal(422550200076076467165567735125, x.div(3)) + assert_equal(400000000000000000000000000000, x.div(3, 1)) + assert_equal(420000000000000000000000000000, x.div(3, 2)) + assert_equal(423000000000000000000000000000, x.div(3, 3)) + end + + def test_abs_bigdecimal + x = BigDecimal.new((2**100).to_s) + assert_equal(1267650600228229401496703205376, x.abs) + x = BigDecimal.new("-" + (2**100).to_s) + assert_equal(1267650600228229401496703205376, x.abs) + x = BigDecimal.new("0") + assert_equal(0, x.abs) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + x = BigDecimal.new("NaN") + assert_equal(true, x.abs.nan?) + end + + def test_sqrt_bigdecimal + x = BigDecimal.new("0.09") + assert_in_delta(0.3, x.sqrt(1), 0.001) + x = BigDecimal.new((2**100).to_s) + y = BigDecimal("1125899906842624") + e = y.exponent + assert_equal(true, (x.sqrt(100) - y).abs < BigDecimal("1E#{e-100}")) + assert_equal(true, (x.sqrt(200) - y).abs < BigDecimal("1E#{e-200}")) + assert_equal(true, (x.sqrt(300) - y).abs < BigDecimal("1E#{e-300}")) + x = BigDecimal.new("-" + (2**100).to_s) + assert_raise(FloatDomainError) { x.sqrt(1) } + x = BigDecimal.new((2**200).to_s) + assert_equal(2**100, x.sqrt(1)) + + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + assert_raise(FloatDomainError) { BigDecimal.new("NaN").sqrt(1) } + + assert_equal(0, BigDecimal.new("0").sqrt(1)) + assert_equal(1, BigDecimal.new("1").sqrt(1)) + end + + def test_fix + x = BigDecimal.new("1.1") + assert_equal(1, x.fix) + end + + def test_frac + x = BigDecimal.new("1.1") + assert_equal(0.1, x.frac) + assert_equal(0.1, BigDecimal.new("0.1").frac) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + assert_equal(true, BigDecimal.new("NaN").frac.nan?) + end + + def test_round + assert_equal(3, BigDecimal.new("3.14159").round) + assert_equal(9, BigDecimal.new("8.7").round) + assert_equal(3.142, BigDecimal.new("3.14159").round(3)) + assert_equal(13300.0, BigDecimal.new("13345.234").round(-2)) + + x = BigDecimal.new("111.111") + assert_equal(111 , x.round) + assert_equal(111.1 , x.round(1)) + assert_equal(111.11 , x.round(2)) + assert_equal(111.111, x.round(3)) + assert_equal(111.111, x.round(4)) + assert_equal(110 , x.round(-1)) + assert_equal(100 , x.round(-2)) + assert_equal( 0 , x.round(-3)) + assert_equal( 0 , x.round(-4)) + + x = BigDecimal.new("2.5") + assert_equal(3, x.round(0, BigDecimal::ROUND_UP)) + assert_equal(2, x.round(0, BigDecimal::ROUND_DOWN)) + assert_equal(3, x.round(0, BigDecimal::ROUND_HALF_UP)) + assert_equal(2, x.round(0, BigDecimal::ROUND_HALF_DOWN)) + assert_equal(2, x.round(0, BigDecimal::ROUND_HALF_EVEN)) + assert_equal(3, x.round(0, BigDecimal::ROUND_CEILING)) + assert_equal(2, x.round(0, BigDecimal::ROUND_FLOOR)) + assert_raise(TypeError) { x.round(0, 256) } + end + + def test_truncate + assert_equal(3, BigDecimal.new("3.14159").truncate) + assert_equal(8, BigDecimal.new("8.7").truncate) + assert_equal(3.141, BigDecimal.new("3.14159").truncate(3)) + assert_equal(13300.0, BigDecimal.new("13345.234").truncate(-2)) + end + + def test_floor + assert_equal(3, BigDecimal.new("3.14159").floor) + assert_equal(-10, BigDecimal.new("-9.1").floor) + assert_equal(3.141, BigDecimal.new("3.14159").floor(3)) + assert_equal(13300.0, BigDecimal.new("13345.234").floor(-2)) + end + + def test_ceil + assert_equal(4, BigDecimal.new("3.14159").ceil) + assert_equal(-9, BigDecimal.new("-9.1").ceil) + assert_equal(3.142, BigDecimal.new("3.14159").ceil(3)) + assert_equal(13400.0, BigDecimal.new("13345.234").ceil(-2)) + end + + def test_to_s + assert_equal('-123.45678 90123 45678 9', BigDecimal.new('-123.45678901234567890').to_s('5F')) + assert_equal('+123.45678901 23456789', BigDecimal.new('123.45678901234567890').to_s('+8F')) + assert_equal(' 123.4567890123456789', BigDecimal.new('123.45678901234567890').to_s(' F')) + assert_equal('0.1234567890123456789E3', BigDecimal.new('123.45678901234567890').to_s) + assert_equal('0.12345 67890 12345 6789E3', BigDecimal.new('123.45678901234567890').to_s(5)) + end + + def test_split + x = BigDecimal.new('-123.45678901234567890') + assert_equal([-1, "1234567890123456789", 10, 3], x.split) + assert_equal([1, "0", 10, 0], BigDecimal.new("0").split) + assert_equal([-1, "0", 10, 0], BigDecimal.new("-0").split) + + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + assert_equal([0, "NaN", 10, 0], BigDecimal.new("NaN").split) + assert_equal([1, "Infinity", 10, 0], BigDecimal.new("Infinity").split) + assert_equal([-1, "Infinity", 10, 0], BigDecimal.new("-Infinity").split) + end + + def test_exponent + x = BigDecimal.new('-123.45678901234567890') + assert_equal(3, x.exponent) + end + + def test_inspect + x = BigDecimal.new("1234.5678") + prec, maxprec = x.precs + assert_match(/^#$/, x.inspect) + end + + def test_power + x = BigDecimal.new("3") + assert_equal(81, x ** 4) + assert_equal(1.0/81, x ** -4) + assert_equal(1, x ** 0) + assert_raise(TypeError) { x ** x } + assert_equal(0, BigDecimal.new("0") ** 4) + assert_equal(1, BigDecimal.new("0") ** 0) + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + assert_equal(BigDecimal.new("Infinity"), BigDecimal.new("0") ** -1) + assert_equal(BigDecimal.new("-Infinity"), BigDecimal.new("-0") ** -1) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + assert_equal(true, (BigDecimal.new("NaN") ** 1).nan?) + + assert_equal(BigDecimal::SIGN_POSITIVE_INFINITE, (BigDecimal.new("Infinity") ** 2).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_INFINITE, (BigDecimal.new("Infinity") ** 1).sign) + assert_equal(1, BigDecimal.new("Infinity") ** 0) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("Infinity") ** -1).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("Infinity") ** -2).sign) + + assert_equal(BigDecimal::SIGN_POSITIVE_INFINITE, (BigDecimal.new("-Infinity") ** 2).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_INFINITE, (BigDecimal.new("-Infinity") ** 1).sign) + assert_equal(1, BigDecimal.new("-Infinity") ** 0) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (BigDecimal.new("-Infinity") ** -1).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (BigDecimal.new("-Infinity") ** -2).sign) + end + + def test_limit + BigDecimal.limit(1) + x = BigDecimal.new("3") + assert_equal(90, x ** 4) # OK? must it be 80? + # 3 * 3 * 3 * 3 = 10 * 3 * 3 = 30 * 3 = 90 ??? + assert_raise(ArgumentError) { BigDecimal.limit(-1) } + end + + def test_sign + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + BigDecimal.mode(BigDecimal::EXCEPTION_ZERODIVIDE, false) + + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, BigDecimal.new("0").sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, BigDecimal.new("-0").sign) + assert_equal(BigDecimal::SIGN_POSITIVE_FINITE, BigDecimal.new("1").sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_FINITE, BigDecimal.new("-1").sign) + assert_equal(BigDecimal::SIGN_POSITIVE_INFINITE, (BigDecimal.new("1") / 0).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_INFINITE, (BigDecimal.new("-1") / 0).sign) + assert_equal(BigDecimal::SIGN_NaN, (BigDecimal.new("0") / 0).sign) + end + + def test_inf + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + inf = BigDecimal.new("Infinity") + + assert_equal(inf, inf + inf) + assert_equal(true, (inf + (-inf)).nan?) + assert_equal(true, (inf - inf).nan?) + assert_equal(inf, inf - (-inf)) + assert_equal(inf, inf * inf) + assert_equal(true, (inf / inf).nan?) + + assert_equal(inf, inf + 1) + assert_equal(inf, inf - 1) + assert_equal(inf, inf * 1) + assert_equal(true, (inf * 0).nan?) + assert_equal(inf, inf / 1) + + assert_equal(inf, 1 + inf) + assert_equal(-inf, 1 - inf) + assert_equal(inf, 1 * inf) + assert_equal(-inf, -1 * inf) + assert_equal(true, (0 * inf).nan?) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, (1 / inf).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (-1 / inf).sign) + end + + def test_to_special_string + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false) + nan = BigDecimal.new("NaN") + assert_equal("NaN", nan.to_s) + inf = BigDecimal.new("Infinity") + assert_equal("Infinity", inf.to_s) + assert_equal(" Infinity", inf.to_s(" ")) + assert_equal("+Infinity", inf.to_s("+")) + assert_equal("-Infinity", (-inf).to_s) + pzero = BigDecimal.new("0") + assert_equal("0.0", pzero.to_s) + assert_equal(" 0.0", pzero.to_s(" ")) + assert_equal("+0.0", pzero.to_s("+")) + assert_equal("-0.0", (-pzero).to_s) + end + + def test_to_string + assert_equal("0.01", BigDecimal("0.01").to_s("F")) + s = "0." + "0" * 100 + "1" + assert_equal(s, BigDecimal(s).to_s("F")) + s = "1" + "0" * 100 + ".0" + assert_equal(s, BigDecimal(s).to_s("F")) + end + + def test_ctov + assert_equal(0.1, BigDecimal.new("1E-1")) + assert_equal(10, BigDecimal.new("1E+1")) + assert_equal(1, BigDecimal.new("+1")) + BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false) + + assert_equal(BigDecimal::SIGN_POSITIVE_INFINITE, BigDecimal.new("1E1" + "0" * 10000).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_INFINITE, BigDecimal.new("-1E1" + "0" * 10000).sign) + assert_equal(BigDecimal::SIGN_POSITIVE_ZERO, BigDecimal.new("1E-1" + "0" * 10000).sign) + assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, BigDecimal.new("-1E-1" + "0" * 10000).sign) + end +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_cookie.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_cookie.rb new file mode 100644 index 0000000..f9950d1 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_cookie.rb @@ -0,0 +1,107 @@ +require 'test/unit' +require 'cgi' +require 'stringio' + + +class CGICookieTest < Test::Unit::TestCase + + + def setup + ENV['REQUEST_METHOD'] = 'GET' + end + + def teardown + %W[REQUEST_METHOD SCRIPT_NAME].each do |name| + ENV.delete(name) + end + end + + + def test_cgi_cookie_new_simple + cookie = CGI::Cookie.new('name1', 'val1', '&<>"', "\245\340\245\271\245\253") + assert_equal('name1', cookie.name) + assert_equal(['val1', '&<>"', "\245\340\245\271\245\253"], cookie.value) + assert_nil(cookie.domain) + assert_nil(cookie.expires) + assert_equal('', cookie.path) + assert_equal(false, cookie.secure) + assert_equal("name1=val1&%26%3C%3E%22&%A5%E0%A5%B9%A5%AB; path=", cookie.to_s) + end + + + def test_cgi_cookie_new_complex + t = Time.gm(2030, 12, 31, 23, 59, 59) + value = ['val1', '&<>"', "\245\340\245\271\245\253"] + cookie = CGI::Cookie.new('name'=>'name1', + 'value'=>value, + 'path'=>'/cgi-bin/myapp/', + 'domain'=>'www.example.com', + 'expires'=>t, + 'secure'=>true + ) + assert_equal('name1', cookie.name) + assert_equal(value, cookie.value) + assert_equal('www.example.com', cookie.domain) + assert_equal(t, cookie.expires) + assert_equal('/cgi-bin/myapp/', cookie.path) + assert_equal(true, cookie.secure) + assert_equal('name1=val1&%26%3C%3E%22&%A5%E0%A5%B9%A5%AB; domain=www.example.com; path=/cgi-bin/myapp/; expires=Tue, 31 Dec 2030 23:59:59 GMT; secure', cookie.to_s) + end + + + def test_cgi_cookie_scriptname + cookie = CGI::Cookie.new('name1', 'value1') + assert_equal('', cookie.path) + cookie = CGI::Cookie.new('name'=>'name1', 'value'=>'value1') + assert_equal('', cookie.path) + ## when ENV['SCRIPT_NAME'] is set, cookie.path is set automatically + ENV['SCRIPT_NAME'] = '/cgi-bin/app/example.cgi' + cookie = CGI::Cookie.new('name1', 'value1') + assert_equal('/cgi-bin/app/', cookie.path) + cookie = CGI::Cookie.new('name'=>'name1', 'value'=>'value1') + assert_equal('/cgi-bin/app/', cookie.path) + end + + + def test_cgi_cookie_parse + ## ';' separator + cookie_str = 'name1=val1&val2; name2=val2&%26%3C%3E%22;_session_id=12345' + cookies = CGI::Cookie.parse(cookie_str) + list = [ + ['name1', ['val1', 'val2']], + ['name2', ['val2', '&<>"']], + ['_session_id', ['12345']], + ] + list.each do |name, value| + cookie = cookies[name] + assert_equal(name, cookie.name) + assert_equal(value, cookie.value) + end + ## ',' separator + cookie_str = 'name1=val1&val2, name2=val2&%26%3C%3E%22,_session_id=12345' + cookies = CGI::Cookie.parse(cookie_str) + list.each do |name, value| + cookie = cookies[name] + assert_equal(name, cookie.name) + assert_equal(value, cookie.value) + end + end + + + def test_cgi_cookie_arrayinterface + cookie = CGI::Cookie.new('name1', 'a', 'b', 'c') + assert_equal('a', cookie[0]) + assert_equal('c', cookie[2]) + assert_nil(cookie[3]) + assert_equal('a', cookie.first) + assert_equal('c', cookie.last) + assert_equal(['A', 'B', 'C'], cookie.collect{|e| e.upcase}) + end + + + + instance_methods.each do |method| + private method if method =~ /^test_(.*)/ && $1 != ENV['TEST'] + end if ENV['TEST'] + +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_core.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_core.rb new file mode 100644 index 0000000..97fda9d --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_core.rb @@ -0,0 +1,363 @@ +require 'test/unit' +require 'cgi' +require 'stringio' + + +class CGICoreTest < Test::Unit::TestCase + + + def setup + #@environ = { + # 'SERVER_PROTOCOL' => 'HTTP/1.1', + # 'REQUEST_METHOD' => 'GET', + # 'SERVER_SOFTWARE' => 'Apache 2.2.0', + #} + #ENV.update(@environ) + end + + + def teardown + @environ.each do |key, val| ENV.delete(key) end + $stdout = STDOUT + end + + def test_cgi_parse_illegal_query + @environ = { + 'REQUEST_METHOD' => 'GET', + 'QUERY_STRING' => 'a=111&&b=222&c&d=', + 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + assert_equal(["a","b","d"],cgi.keys.sort) if RUBY_VERSION>="1.9" + assert_equal("",cgi["d"]) + end + + def test_cgi_core_params_GET + @environ = { + 'REQUEST_METHOD' => 'GET', + 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + ## cgi[] + assert_equal('123', cgi['id']) + assert_equal('@h =~ /^$/', cgi['str']) + ## cgi[][], cgi[].first, cgi[].to_ary (obsolete 1.9) + if RUBY_VERSION<"1.9" + $stderr = StringIO.new + begin + assert_equal('123', cgi['id'][0]) + assert_equal('456', cgi['id'][1]) + assert_equal('', cgi['id'][2]) + assert_nil(cgi['id'][3]) + assert_equal('@h =~ /^$/', cgi['str'][0]) + assert_nil(cgi['str'][1]) + assert_equal('123', cgi['id'].first) + assert_equal('123', cgi['id'].last) # should be '' ? + id1, id2, id3 = cgi['id'] + assert_equal(['123', '456', ''], [id1, id2, id3]) + str1, = cgi['str'] + assert_equal('@h =~ /^$/', str1) + assert_not_same(str1, cgi['str']) # necessary? + ensure + $stderr = STDERR + end + end + ## cgi.params + assert_equal(['123', '456', ''], cgi.params['id']) + assert_equal(['@h =~ /^$/'], cgi.params['str']) + ## cgi.keys + assert_equal(['id', 'str'], cgi.keys.sort) + ## cgi.key?, cgi.has_key?, cgi.include? + assert_equal(true, cgi.key?('id')) + assert_equal(true, cgi.has_key?('id')) + assert_equal(true, cgi.include?('id')) + assert_equal(false, cgi.key?('foo')) + assert_equal(false, cgi.has_key?('foo')) + assert_equal(false, cgi.include?('foo')) + ## invalid parameter name + assert_equal('', cgi['*notfound*']) # [ruby-dev:30740] + assert_equal([], cgi.params['*notfound*']) + end + + + def test_cgi_core_params_POST + query_str = 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F' + @environ = { + 'REQUEST_METHOD' => 'POST', + 'CONTENT_LENGTH' => query_str.length.to_s, + 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + $stdin = StringIO.new + $stdin << query_str + $stdin.rewind + cgi = CGI.new + ## cgi[] + assert_equal('123', cgi['id']) + assert_equal('@h =~ /^$/', cgi['str']) + ## cgi.params + assert_equal(['123', '456', ''], cgi.params['id']) + assert_equal(['@h =~ /^$/'], cgi.params['str']) + ## invalid parameter name + assert_equal('', cgi['*notfound*']) + assert_equal([], cgi.params['*notfound*']) + end + + def test_cgi_core_params_encoding_check + query_str = 'str=%BE%BE%B9%BE' + @environ = { + 'REQUEST_METHOD' => 'POST', + 'CONTENT_LENGTH' => query_str.length.to_s, + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + $stdin = StringIO.new + $stdin << query_str + $stdin.rewind + if RUBY_VERSION>="1.9.0" + hash={} + cgi = CGI.new(:accept_charset=>"UTF-8"){|key,val|hash[key]=val} + ## cgi[] + assert_equal("\xBE\xBE\xB9\xBE".force_encoding("UTF-8"), cgi['str']) + ## cgi.params + assert_equal(["\xBE\xBE\xB9\xBE".force_encoding("UTF-8")], cgi.params['str']) + ## accept-charset error + assert_equal({"str"=>"\xBE\xBE\xB9\xBE".force_encoding("UTF-8")},hash) + + $stdin.rewind + assert_raise(CGI::InvalidEncoding) do + cgi = CGI.new(:accept_charset=>"UTF-8") + end + + $stdin.rewind + cgi = CGI.new(:accept_charset=>"EUC-JP") + ## cgi[] + assert_equal("\xBE\xBE\xB9\xBE".force_encoding("EUC-JP"), cgi['str']) + ## cgi.params + assert_equal(["\xBE\xBE\xB9\xBE".force_encoding("EUC-JP")], cgi.params['str']) + else + assert(true) + end + end + + + def test_cgi_core_cookie + @environ = { + 'REQUEST_METHOD' => 'GET', + 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + assert_not_equal(nil,cgi.cookies) + [ ['_session_id', ['12345'], ], + ['name1', ['val1', 'val2'], ], + ].each do |key, expected| + cookie = cgi.cookies[key] + assert_kind_of(CGI::Cookie, cookie) + assert_equal(expected, cookie.value) + assert_equal(false, cookie.secure) + assert_nil(cookie.expires) + assert_nil(cookie.domain) + assert_equal('', cookie.path) + end + end + + + def test_cgi_core_maxcontentlength + @environ = { + 'REQUEST_METHOD' => 'POST', + 'CONTENT_LENGTH' => (64 * 1024 * 1024).to_s + } + ENV.update(@environ) + ex = assert_raise(StandardError) do + cgi = CGI.new + end + assert_equal("too large post data.", ex.message) + end if CGI.const_defined?(:MAX_CONTENT_LENGTH) + + + def test_cgi_core_out + @environ = { + 'REQUEST_METHOD' => 'GET', + 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + ## jis, euc, sjis string + jis_str = "\e$B8+$m!\"?M$,%4%_$N$h$&$@\e(B" + euc_str = "\270\253\244\355\241\242\277\315\244\254\245\264\245\337\244\316\244\350\244\246\244\300" + sjis_str = "\214\251\202\353\201A\220l\202\252\203S\203~\202\314\202\346\202\244\202\276" + if RUBY_VERSION<"1.9" + ## iso-2022-jp + options = { 'charset'=>'iso-2022-jp' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + assert_equal('ja', options['language']) + actual = $stdout.string + expected = "Content-Type: text/html; charset=iso-2022-jp\r\n" + + "Content-Length: 28\r\n" + + "Content-Language: ja\r\n" + + "\r\n" + + jis_str + assert_equal(expected,actual) + ## euc-jp + options = { 'charset'=>'EUC-JP' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + assert_equal('ja', options['language']) + actual = $stdout.string + expected = "Content-Type: text/html; charset=EUC-JP\r\n" + + "Content-Length: 22\r\n" + + "Content-Language: ja\r\n" + + "\r\n" + + euc_str + assert_equal(expected, actual) + ## shift_jis + options = { 'charset'=>'Shift_JIS' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + assert_equal('ja', options['language']) + actual = $stdout.string + expected = "Content-Type: text/html; charset=Shift_JIS\r\n" + + "Content-Length: 22\r\n" + + "Content-Language: ja\r\n" + + "\r\n" + + sjis_str + assert_equal(expected, actual) + end + ## utf8 (not converted) + options = { 'charset'=>'utf8' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + assert_nil(options['language']) + actual = $stdout.string + expected = "Content-Type: text/html; charset=utf8\r\n" + + "Content-Length: 22\r\n" + + "\r\n" + + euc_str + if RUBY_VERSION>="1.9" + actual.force_encoding("ASCII-8BIT") + expected.force_encoding("ASCII-8BIT") + end + assert_equal(expected, actual) + ## language is keeped + options = { 'charset'=>'Shift_JIS', 'language'=>'en' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + assert_equal('en', options['language']) + ## HEAD method + ENV['REQUEST_METHOD'] = 'HEAD' + options = { 'charset'=>'utf8' } + $stdout = StringIO.new + cgi.out(options) { euc_str } + actual = $stdout.string + expected = "Content-Type: text/html; charset=utf8\r\n" + + "Content-Length: 22\r\n" + + "\r\n" + assert_equal(expected, actual) + end + + + def test_cgi_core_print + @environ = { + 'REQUEST_METHOD' => 'GET', + } + ENV.update(@environ) + cgi = CGI.new + $stdout = StringIO.new + str = "foobar" + cgi.print(str) + expected = str + actual = $stdout.string + assert_equal(expected, actual) + end + + + def test_cgi_core_environs + @environ = { + 'REQUEST_METHOD' => 'GET', + } + ENV.update(@environ) + cgi = CGI.new + ## + list1 = %w[ AUTH_TYPE CONTENT_TYPE GATEWAY_INTERFACE PATH_INFO + PATH_TRANSLATED QUERY_STRING REMOTE_ADDR REMOTE_HOST + REMOTE_IDENT REMOTE_USER REQUEST_METHOD SCRIPT_NAME + SERVER_NAME SERVER_PROTOCOL SERVER_SOFTWARE + HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING + HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM HTTP_HOST + HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER HTTP_USER_AGENT + ] + list2 = %w[ CONTENT_LENGTH SERVER_PORT ] + ## string expected + list1.each do |name| + @environ[name] = "**#{name}**" + end + ENV.update(@environ) + list1.each do |name| + method = name.sub(/\AHTTP_/, '').downcase + actual = cgi.__send__ method + expected = "**#{name}**" + assert_equal(expected, actual) + end + ## integer expected + ENV['CONTENT_LENGTH'] = '123' + ENV['SERVER_PORT'] = '8080' + assert_equal(123, cgi.content_length) + assert_equal(8080, cgi.server_port) + ## raw cookie + ENV['HTTP_COOKIE'] = 'name1=val1' + ENV['HTTP_COOKIE2'] = 'name2=val2' + assert_equal('name1=val1', cgi.raw_cookie) + assert_equal('name2=val2', cgi.raw_cookie2) + end + + + def test_cgi_core_htmltype + @environ = { + 'REQUEST_METHOD' => 'GET', + } + ENV.update(@environ) + ## no htmltype + cgi = CGI.new + assert_raise(NoMethodError) do cgi.doctype end + ## html3 + cgi = CGI.new('html3') + expected = '' + assert_equal(expected, cgi.doctype) + ## html4 + cgi = CGI.new('html4') + expected = '' + assert_equal(expected, cgi.doctype) + ## html4 transitional + cgi = CGI.new('html4Tr') + expected = '' + assert_equal(expected, cgi.doctype) + ## html4 frameset + cgi = CGI.new('html4Fr') + expected = '' + assert_equal(expected, cgi.doctype) + end + + + instance_methods.each do |method| + private method if method =~ /^test_(.*)/ && $1 != ENV['TEST'] + end if ENV['TEST'] + +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_header.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_header.rb new file mode 100644 index 0000000..58f82ba --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_header.rb @@ -0,0 +1,177 @@ +require 'test/unit' +require 'cgi' + + +class CGIHeaderTest < Test::Unit::TestCase + + + def setup + @environ = { + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'REQUEST_METHOD' => 'GET', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + } + ENV.update(@environ) + end + + + def teardown + @environ.each do |key, val| ENV.delete(key) end + end + + + def test_cgi_header_simple + cgi = CGI.new + ## default content type + expected = "Content-Type: text/html\r\n\r\n" + actual = cgi.header + assert_equal(expected, actual) + ## content type specified as string + expected = "Content-Type: text/xhtml; charset=utf8\r\n\r\n" + actual = cgi.header('text/xhtml; charset=utf8') + assert_equal(expected, actual) + ## content type specified as hash + expected = "Content-Type: image/png\r\n\r\n" + actual = cgi.header('type'=>'image/png') + assert_equal(expected, actual) + ## charset specified + expected = "Content-Type: text/html; charset=utf8\r\n\r\n" + actual = cgi.header('charset'=>'utf8') + assert_equal(expected, actual) + end + + + def test_cgi_header_complex + cgi = CGI.new + options = { + 'type' => 'text/xhtml', + 'charset' => 'utf8', + 'status' => 'REDIRECT', + 'server' => 'webrick', + 'connection' => 'close', + 'length' => 123, + 'language' => 'ja', + 'expires' => Time.gm(2000, 1, 23, 12, 34, 56), + 'location' => 'http://www.ruby-lang.org/', + } + expected = "Status: 302 Found\r\n" + expected << "Server: webrick\r\n" + expected << "Connection: close\r\n" + expected << "Content-Type: text/xhtml; charset=utf8\r\n" + expected << "Content-Length: 123\r\n" + expected << "Content-Language: ja\r\n" + expected << "Expires: Sun, 23 Jan 2000 12:34:56 GMT\r\n" + expected << "location: http://www.ruby-lang.org/\r\n" + expected << "\r\n" + actual = cgi.header(options) + assert_equal(expected, actual) + end + + + def test_cgi_header_argerr + cgi = CGI.new + #expected = NoMethodError # must be ArgumentError + if RUBY_VERSION>="1.9.0" + expected = ArgumentError # for CGIAlt + else + expected = NoMethodError # for Ruby1.8 + end + ex = assert_raise(expected) do + cgi.header(nil) + end + end + + + def test_cgi_header_cookie + cgi = CGI.new + cookie1 = CGI::Cookie.new('name1', 'abc', '123') + cookie2 = CGI::Cookie.new('name'=>'name2', 'value'=>'value2', 'secure'=>true) + ctype = "Content-Type: text/html\r\n" + sep = "\r\n" + c1 = "Set-Cookie: name1=abc&123; path=\r\n" + c2 = "Set-Cookie: name2=value2; path=; secure\r\n" + ## CGI::Cookie object + actual = cgi.header('cookie'=>cookie1) + expected = ctype + c1 + sep + assert_equal(expected, actual) + ## String + actual = cgi.header('cookie'=>cookie2.to_s) + expected = ctype + c2 + sep + assert_equal(expected, actual) + ## Array + actual = cgi.header('cookie'=>[cookie1, cookie2]) + expected = ctype + c1 + c2 + sep + assert_equal(expected, actual) + ## Hash + actual = cgi.header('cookie'=>{'name1'=>cookie1, 'name2'=>cookie2}) + expected = ctype + c1 + c2 + sep + assert_equal(expected, actual) + end + + + def test_cgi_header_output_cookies + cgi = CGI.new + ## output cookies + cookies = [ CGI::Cookie.new('name1', 'abc', '123'), + CGI::Cookie.new('name'=>'name2', 'value'=>'value2', 'secure'=>true), + ] + cgi.instance_variable_set('@output_cookies', cookies) + expected = "Content-Type: text/html; charset=utf8\r\n" + expected << "Set-Cookie: name1=abc&123; path=\r\n" + expected << "Set-Cookie: name2=value2; path=; secure\r\n" + expected << "\r\n" + ## header when string + actual = cgi.header('text/html; charset=utf8') + assert_equal(expected, actual) + ## _header_for_string + actual = cgi.header('type'=>'text/html', 'charset'=>'utf8') + assert_equal(expected, actual) + end + + + def test_cgi_header_nph + cgi = CGI.new + ## 'nph' is true + ENV['SERVER_SOFTWARE'] = 'Apache 2.2.0' + actual1 = cgi.header('nph'=>true) + ## when old IIS, NPH-mode is forced + ENV['SERVER_SOFTWARE'] = 'IIS/4.0' + actual2 = cgi.header + actual3 = cgi.header('status'=>'REDIRECT', 'location'=>'http://www.example.com/') + ## newer IIS doesn't require NPH-mode ## [ruby-dev:30537] + ENV['SERVER_SOFTWARE'] = 'IIS/5.0' + actual4 = cgi.header + actual5 = cgi.header('status'=>'REDIRECT', 'location'=>'http://www.example.com/') + ## assertion + now = Time.now + expected = "HTTP/1.1 200 OK\r\n" + expected << "Date: #{CGI.rfc1123_date(now)}\r\n" + expected << "Server: Apache 2.2.0\r\n" + expected << "Connection: close\r\n" + expected << "Content-Type: text/html\r\n" + expected << "\r\n" + assert_equal(expected, actual1) + expected.sub!(/^Server: .*?\r\n/, "Server: IIS/4.0\r\n") + assert_equal(expected, actual2) + expected.sub!(/^HTTP\/1.1 200 OK\r\n/, "HTTP/1.1 302 Found\r\n") + expected.sub!(/\r\n\r\n/, "\r\nlocation: http://www.example.com/\r\n\r\n") + assert_equal(expected, actual3) + expected = "Content-Type: text/html\r\n" + expected << "\r\n" + assert_equal(expected, actual4) + expected = "Status: 302 Found\r\n" + expected << "Content-Type: text/html\r\n" + expected << "location: http://www.example.com/\r\n" + expected << "\r\n" + assert_equal(expected, actual5) + ensure + ENV.delete('SERVER_SOFTWARE') + end + + + + instance_methods.each do |method| + private method if method =~ /^test_(.*)/ && $1 != ENV['TEST'] + end if ENV['TEST'] + +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_modruby.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_modruby.rb new file mode 100644 index 0000000..4eb02fa --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_modruby.rb @@ -0,0 +1,145 @@ +require 'test/unit' +require 'cgi' + + +class CGIModrubyTest < Test::Unit::TestCase + + + def setup + @environ = { + 'SERVER_PROTOCOL' => 'HTTP/1.1', + 'REQUEST_METHOD' => 'GET', + #'QUERY_STRING' => 'a=foo&b=bar', + } + ENV.update(@environ) + CGI.class_eval { const_set(:MOD_RUBY, true) } + Apache._reset() + #@cgi = CGI.new + #@req = Apache.request + end + + + def teardown + @environ.each do |key, val| ENV.delete(key) end + CGI.class_eval { remove_const(:MOD_RUBY) } + end + + + def test_cgi_modruby_simple + req = Apache.request + cgi = CGI.new + assert(req._setup_cgi_env_invoked?) + assert(! req._send_http_header_invoked?) + actual = cgi.header + assert_equal('', actual) + assert_equal('text/html', req.content_type) + assert(req._send_http_header_invoked?) + end + + + def test_cgi_modruby_complex + req = Apache.request + cgi = CGI.new + options = { + 'status' => 'FORBIDDEN', + 'location' => 'http://www.example.com/', + 'type' => 'image/gif', + 'content-encoding' => 'deflate', + 'cookie' => [ CGI::Cookie.new('name1', 'abc', '123'), + CGI::Cookie.new('name'=>'name2', 'value'=>'value2', 'secure'=>true), + ], + } + assert(req._setup_cgi_env_invoked?) + assert(! req._send_http_header_invoked?) + actual = cgi.header(options) + assert_equal('', actual) + assert_equal('image/gif', req.content_type) + assert_equal('403 Forbidden', req.status_line) + assert_equal(403, req.status) + assert_equal('deflate', req.content_encoding) + assert_equal('http://www.example.com/', req.headers_out['location']) + assert_equal(["name1=abc&123; path=", "name2=value2; path=; secure"], + req.headers_out['Set-Cookie']) + assert(req._send_http_header_invoked?) + end + + + def test_cgi_modruby_location + req = Apache.request + cgi = CGI.new + options = { + 'status' => '200 OK', + 'location' => 'http://www.example.com/', + } + actual = cgi.header(options) + assert_equal('200 OK', req.status_line) # should be '302 Found' ? + assert_equal(302, req.status) + assert_equal('http://www.example.com/', req.headers_out['location']) + end + + + def test_cgi_modruby_requestparams + req = Apache.request + req.args = 'a=foo&b=bar' + cgi = CGI.new + assert_equal('foo', cgi['a']) + assert_equal('bar', cgi['b']) + end + + + instance_methods.each do |method| + private method if method =~ /^test_(.*)/ && $1 != ENV['TEST'] + end if ENV['TEST'] + +end + + + +## dummy class for mod_ruby +class Apache #:nodoc: + + def self._reset + @request = Request.new + end + + def self.request + return @request + end + + class Request + + def initialize + hash = {} + def hash.add(name, value) + (self[name] ||= []) << value + end + @headers_out = hash + @status_line = nil + @status = nil + @content_type = nil + @content_encoding = nil + end + attr_accessor :headers_out, :status_line, :status, :content_type, :content_encoding + + attr_accessor :args + #def args + # return ENV['QUERY_STRING'] + #end + + def send_http_header + @http_header = '*invoked*' + end + def _send_http_header_invoked? + @http_header ? true : false + end + + def setup_cgi_env + @cgi_env = '*invoked*' + end + def _setup_cgi_env_invoked? + @cgi_env ? true : false + end + + end + +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_multipart.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_multipart.rb new file mode 100644 index 0000000..47a41f6 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_multipart.rb @@ -0,0 +1,322 @@ +require 'test/unit' +require 'cgi' +require 'tempfile' +require 'stringio' + + +## +## usage: +## boundary = 'foobar1234' # or nil +## multipart = MultiPart.new(boundary) +## multipart.append('name1', 'value1') +## multipart.append('file1', File.read('file1.html'), 'file1.html') +## str = multipart.close() +## str.each_line {|line| p line } +## ## output: +## # "--foobar1234\r\n" +## # "Content-Disposition: form-data: name=\"name1\"\r\n" +## # "\r\n" +## # "value1\r\n" +## # "--foobar1234\r\n" +## # "Content-Disposition: form-data: name=\"file1\"; filename=\"file1.html\"\r\n" +## # "Content-Type: text/html\r\n" +## # "\r\n" +## # "\n" +## # "

      Hello

      \n" +## # "\n" +## # "\r\n" +## # "--foobar1234--\r\n" +## +class MultiPart + + def initialize(boundary=nil) + @boundary = boundary || create_boundary() + @buf = '' + @buf.force_encoding("ascii-8bit") if RUBY_VERSION>="1.9" + end + attr_reader :boundary + + def append(name, value, filename=nil, content_type=nil) + content_type = detect_content_type(filename) if filename && content_type.nil? + s = filename ? "; filename=\"#{filename}\"" : '' + buf = @buf + buf << "--#{boundary}\r\n" + buf << "Content-Disposition: form-data: name=\"#{name}\"#{s}\r\n" + buf << "Content-Type: #{content_type}\r\n" if content_type + buf << "\r\n" + if RUBY_VERSION>="1.9" + buf << value.dup.force_encoding("ASCII-8BIT") + else + buf << value + end + buf << "\r\n" + return self + end + + def close + buf = @buf + @buf = '' + return buf << "--#{boundary}--\r\n" + end + + def create_boundary() #:nodoc: + return "--boundary#{rand().to_s[2..-1]}" + end + + def detect_content_type(filename) #:nodoc: + filename =~ /\.(\w+)\z/ + return MIME_TYPES[$1] || 'application/octet-stream' + end + + MIME_TYPES = { + 'gif' => 'image/gif', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'png' => 'image/png', + 'bmp' => 'image/bmp', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'htm' => 'text/html', + 'html' => 'text/html', + 'xml' => 'text/xml', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'css' => 'text/css', + 'mpg' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'avi' => 'video/x-msvideo', + 'mp3' => 'audio/mpeg', + 'mid' => 'audio/midi', + 'wav' => 'audio/x-wav', + 'zip' => 'application/zip', + #'tar.gz' => 'application/gtar', + 'gz' => 'application/gzip', + 'bz2' => 'application/bzip2', + 'rtf' => 'application/rtf', + 'pdf' => 'application/pdf', + 'ps' => 'application/postscript', + 'js' => 'application/x-javascript', + 'xls' => 'application/vnd.ms-excel', + 'doc' => 'application/msword', + 'ppt' => 'application/vnd.ms-powerpoint', + } + +end + + + +class CGIMultipartTest < Test::Unit::TestCase + + def setup + ENV['REQUEST_METHOD'] = 'POST' + end + + def teardown + %w[ REQUEST_METHOD CONTENT_TYPE CONTENT_LENGTH REQUEST_METHOD ].each do |name| + ENV.delete(name) + end + $stdin.close() if $stdin.is_a?(Tempfile) + $stdin = STDIN + end + + def _prepare(data) + ## create multipart input + multipart = MultiPart.new(@boundary) + data.each do |hash| + multipart.append(hash[:name], hash[:value], hash[:filename]) + end + input = multipart.close() + input = yield(input) if block_given? + #$stderr.puts "*** debug: input=\n#{input.collect{|line| line.inspect}.join("\n")}" + @boundary ||= multipart.boundary + ## set environment + ENV['CONTENT_TYPE'] = "multipart/form-data; boundary=#{@boundary}" + ENV['CONTENT_LENGTH'] = input.length.to_s + ENV['REQUEST_METHOD'] = 'POST' + ## set $stdin + tmpfile = if RUBY_VERSION >="1.9" + Tempfile.new(self.name, :binmode => true) + else + Tempfile.new(self.name) + end + tmpfile << input + tmpfile.rewind() + $stdin = tmpfile + end + + def _test_multipart + caller(0).find {|s| s =~ /in `test_(.*?)'/ } + testname = $1 + #$stderr.puts "*** debug: testname=#{testname.inspect}" + _prepare(@data) + cgi = RUBY_VERSION>="1.9" ? CGI.new(:accept_charset=>"UTF-8") : CGI.new + expected_names = @data.collect{|hash| hash[:name] }.sort + assert_equal(expected_names, cgi.params.keys.sort) + threshold = 1024*10 + @data.each do |hash| + name = hash[:name] + expected = hash[:value] + if RUBY_VERSION>="1.9" + if hash[:filename] #if file + expected_class = @expected_class || (hash[:value].length < threshold ? StringIO : Tempfile) + assert(cgi.files.keys.member?(hash[:name])) + else + expected_class = String + assert_equal(expected, cgi[name]) + assert_equal(false,cgi.files.keys.member?(hash[:name])) + end + else + expected_class = @expected_class || (hash[:value].length < threshold ? StringIO : Tempfile) + end + assert_kind_of(expected_class, cgi[name]) + assert_equal(expected, cgi[name].read()) + assert_equal(hash[:filename] || '', cgi[name].original_filename) #if hash[:filename] + assert_equal(hash[:content_type] || '', cgi[name].content_type) #if hash[:content_type] + end + end + + + def _read(basename) + filename = File.join(File.dirname(__FILE__), 'testdata', basename) + if RUBY_VERSION>="1.9" + s = File.open(filename, 'r:ascii-8bit') {|f| f.read() } + else + s = File.open(filename, 'rb') {|f| f.read() } + end + + return s + end + + + def test_cgi_multipart_stringio + @boundary = '----WebKitFormBoundaryAAfvAII+YL9102cX' + @data = [ + {:name=>'hidden1', :value=>'foobar'}, + {:name=>'text1', :value=>"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86\xE3\x81\x88\xE3\x81\x8A"}, + {:name=>'file1', :value=>_read('file1.html'), + :filename=>'file1.html', :content_type=>'text/html'}, + {:name=>'image1', :value=>_read('small.png'), + :filename=>'small.png', :content_type=>'image/png'}, # small image + ] + @data[1][:value].force_encoding("UTF-8") if RUBY_VERSION>="1.9" + @expected_class = StringIO + _test_multipart() + end + + + def test_cgi_multipart_tempfile + @boundary = '----WebKitFormBoundaryAAfvAII+YL9102cX' + @data = [ + {:name=>'hidden1', :value=>'foobar'}, + {:name=>'text1', :value=>"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86\xE3\x81\x88\xE3\x81\x8A"}, + {:name=>'file1', :value=>_read('file1.html'), + :filename=>'file1.html', :content_type=>'text/html'}, + {:name=>'image1', :value=>_read('large.png'), + :filename=>'large.png', :content_type=>'image/png'}, # large image + ] + @data[1][:value].force_encoding("UTF-8") if RUBY_VERSION>="1.9" + @expected_class = Tempfile + _test_multipart() + end + + + def _set_const(klass, name, value) + old = nil + klass.class_eval do + old = const_get(name) + remove_const(name) + const_set(name, value) + end + return old + end + + + def test_cgi_multipart_maxmultipartlength + @data = [ + {:name=>'image1', :value=>_read('large.png'), + :filename=>'large.png', :content_type=>'image/png'}, # large image + ] + original = _set_const(CGI, :MAX_MULTIPART_LENGTH, 2 * 1024) + begin + ex = assert_raise(StandardError) do + _test_multipart() + end + assert_equal("too large multipart data.", ex.message) + ensure + _set_const(CGI, :MAX_MULTIPART_LENGTH, original) + end + end if CGI.const_defined?(:MAX_MULTIPART_LENGTH) + + + def test_cgi_multipart_maxmultipartcount + @data = [ + {:name=>'file1', :value=>_read('file1.html'), + :filename=>'file1.html', :content_type=>'text/html'}, + ] + item = @data.first + 500.times { @data << item } + #original = _set_const(CGI, :MAX_MULTIPART_COUNT, 128) + begin + ex = assert_raise(StandardError) do + _test_multipart() + end + assert_equal("too many parameters.", ex.message) + ensure + #_set_const(CGI, :MAX_MULTIPART_COUNT, original) + end + end if CGI.const_defined?(:MAX_MULTIPART_COUNT) + + + def test_cgi_multipart_badbody ## [ruby-dev:28470] + @data = [ + {:name=>'file1', :value=>_read('file1.html'), + :filename=>'file1.html', :content_type=>'text/html'}, + ] + _prepare(@data) do |input| + input2 = input.sub(/--(\r\n)?\z/, "\r\n") + assert input2 != input + #p input2 + input2 + end + ex = assert_raise(EOFError) do + cgi = RUBY_VERSION>="1.9" ? CGI.new(:accept_charset=>"UTF-8") : CGI.new + end + assert_equal("bad boundary end of body part", ex.message) + # + _prepare(@data) do |input| + input2 = input.sub(/--(\r\n)?\z/, "") + assert input2 != input + #p input2 + input2 + end + ex = assert_raise(EOFError) do + cgi = RUBY_VERSION>="1.9" ? CGI.new(:accept_charset=>"UTF-8") : CGI.new + end + assert_equal("bad content body", ex.message) + end + + + def test_cgi_multipart_quoteboundary ## [JVN#84798830] + @boundary = '(.|\n)*' + @data = [ + {:name=>'hidden1', :value=>'foobar'}, + {:name=>'text1', :value=>"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86\xE3\x81\x88\xE3\x81\x8A"}, + {:name=>'file1', :value=>_read('file1.html'), + :filename=>'file1.html', :content_type=>'text/html'}, + {:name=>'image1', :value=>_read('small.png'), + :filename=>'small.png', :content_type=>'image/png'}, # small image + ] + @data[1][:value].force_encoding("UTF-8") if RUBY_VERSION>="1.9" + _prepare(@data) + cgi = RUBY_VERSION>="1.9" ? CGI.new(:accept_charset=>"UTF-8") : CGI.new + assert_equal('file1.html', cgi['file1'].original_filename) + end + + ### + + self.instance_methods.each do |method| + private method if method =~ /^test_(.*)/ && $1 != ENV['TEST'] + end if ENV['TEST'] + +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_session.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_session.rb new file mode 100644 index 0000000..6cccb22 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_session.rb @@ -0,0 +1,173 @@ +require 'test/unit' +require 'cgi' +require 'cgi/session' +require 'cgi/session/pstore' +require 'stringio' +require 'tmpdir' + +class CGISessionTest < Test::Unit::TestCase + def setup + @session_dir = File.join(Dir.mktmpdir('__test_dir__'), 'session_dir') + FileUtils.mkdir_p @session_dir + end + + def teardown + @environ.each do |key, val| ENV.delete(key) end + $stdout = STDOUT + FileUtils.rm_rf(File.dirname(@session_dir)) + end + + def test_cgi_session_filestore + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + # 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + value1="value1" + value2="\x8F\xBC\x8D]" + value2.force_encoding("SJIS") if RUBY_VERSION>="1.9" + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir) + session["key1"]=value1 + session["key2"]=value2 + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session.close + $stdout = StringIO.new + cgi.out{""} + + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'HTTP_COOKIE' => "_session_id=#{session_id}", + 'QUERY_STRING' => "_session_id=#{session.session_id}", + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir) + $stdout = StringIO.new + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session.close + + end + def test_cgi_session_pstore + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + # 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + value1="value1" + value2="\x8F\xBC\x8D]" + value2.force_encoding("SJIS") if RUBY_VERSION>="1.9" + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"database_manager"=>CGI::Session::PStore) + session["key1"]=value1 + session["key2"]=value2 + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session.close + $stdout = StringIO.new + cgi.out{""} + + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'HTTP_COOKIE' => "_session_id=#{session_id}", + 'QUERY_STRING' => "_session_id=#{session.session_id}", + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"database_manager"=>CGI::Session::PStore) + $stdout = StringIO.new + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session.close + end + def test_cgi_session_specify_session_id + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + # 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + value1="value1" + value2="\x8F\xBC\x8D]" + value2.force_encoding("SJIS") if RUBY_VERSION>="1.9" + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_id"=>"foo") + session["key1"]=value1 + session["key2"]=value2 + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + assert_equal("foo",session.session_id) + session_id=session.session_id + session.close + $stdout = StringIO.new + cgi.out{""} + + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'HTTP_COOKIE' => "_session_id=#{session_id}", + 'QUERY_STRING' => "_session_id=#{session.session_id}", + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir) + $stdout = StringIO.new + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + assert_equal("foo",session.session_id) + session.close + end + def test_cgi_session_specify_session_key + @environ = { + 'REQUEST_METHOD' => 'GET', + # 'QUERY_STRING' => 'id=123&id=456&id=&str=%40h+%3D%7E+%2F%5E%24%2F', + # 'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;', + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + value1="value1" + value2="\x8F\xBC\x8D]" + value2.force_encoding("SJIS") if RUBY_VERSION>="1.9" + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_key"=>"bar") + session["key1"]=value1 + session["key2"]=value2 + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session_id=session.session_id + session.close + $stdout = StringIO.new + cgi.out{""} + + @environ = { + 'REQUEST_METHOD' => 'GET', + 'HTTP_COOKIE' => "bar=#{session_id}", + # 'QUERY_STRING' => "bar=#{session.session_id}", + 'SERVER_SOFTWARE' => 'Apache 2.2.0', + 'SERVER_PROTOCOL' => 'HTTP/1.1', + } + ENV.update(@environ) + cgi = CGI.new + session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_key"=>"bar") + $stdout = StringIO.new + assert_equal(value1,session["key1"]) + assert_equal(value2,session["key2"]) + session.close + end +end diff --git a/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_tag_helper.rb b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_tag_helper.rb new file mode 100644 index 0000000..6e726b9 --- /dev/null +++ b/lib/ruby-1.9.1-rc1/test/cgi/test_cgi_tag_helper.rb @@ -0,0 +1,341 @@ +require 'test/unit' +require 'cgi' +require 'stringio' + + +class CGITagHelperTest < Test::Unit::TestCase + + + def setup + #@environ = { + # 'SERVER_PROTOCOL' => 'HTTP/1.1', + # 'REQUEST_METHOD' => 'GET', + # 'SERVER_SOFTWARE' => 'Apache 2.2.0', + #} + #ENV.update(@environ) + end + + + def teardown + @environ.each do |key, val| ENV.delete(key) end + $stdout = STDOUT + end + + + def test_cgi_tag_helper_html3 + @environ = { + 'REQUEST_METHOD' => 'GET', + } + ENV.update(@environ) + ## html3 + cgi = CGI.new('html3') + assert_equal('',cgi.a) + assert_equal('',cgi.a('bar')) + assert_equal('foo',cgi.a{'foo'}) + assert_equal('foo',cgi.a('bar'){'foo'}) + assert_equal('',cgi.tt) + assert_equal('',cgi.tt('bar')) + assert_equal('foo',cgi.tt{'foo'}) + assert_equal('foo',cgi.tt('bar'){'foo'}) + assert_equal('',cgi.i) + assert_equal('',cgi.i('bar')) + assert_equal('foo',cgi.i{'foo'}) + assert_equal('foo',cgi.i('bar'){'foo'}) + assert_equal('',cgi.b) + assert_equal('',cgi.b('bar')) + assert_equal('foo',cgi.b{'foo'}) + assert_equal('foo',cgi.b('bar'){'foo'}) + assert_equal('',cgi.u) + assert_equal('',cgi.u('bar')) + assert_equal('foo',cgi.u{'foo'}) + assert_equal('foo',cgi.u('bar'){'foo'}) + assert_equal('',cgi.strike) + assert_equal('',cgi.strike('bar')) + assert_equal('foo',cgi.strike{'foo'}) + assert_equal('foo',cgi.strike('bar'){'foo'}) + assert_equal('',cgi.big) + assert_equal('',cgi.big('bar')) + assert_equal('foo',cgi.big{'foo'}) + assert_equal('foo',cgi.big('bar'){'foo'}) + assert_equal('',cgi.small) + assert_equal('',cgi.small('bar')) + assert_equal('foo',cgi.small{'foo'}) + assert_equal('foo',cgi.small('bar'){'foo'}) + assert_equal('',cgi.sub) + assert_equal('',cgi.sub('bar')) + assert_equal('foo',cgi.sub{'foo'}) + assert_equal('foo',cgi.sub('bar'){'foo'}) + assert_equal('',cgi.sup) + assert_equal('',cgi.sup('bar')) + assert_equal('foo',cgi.sup{'foo'}) + assert_equal('foo',cgi.sup('bar'){'foo'}) + assert_equal('',cgi.em) + assert_equal('',cgi.em('bar')) + assert_equal('foo',cgi.em{'foo'}) + assert_equal('foo',cgi.em('bar'){'foo'}) + assert_equal('',cgi.strong) + assert_equal('',cgi.strong('bar')) + assert_equal('foo',cgi.strong{'foo'}) + assert_equal('foo',cgi.strong('bar'){'foo'}) + assert_equal('',cgi.dfn) + assert_equal('',cgi.dfn('bar')) + assert_equal('foo',cgi.dfn{'foo'}) + assert_equal('foo',cgi.dfn('bar'){'foo'}) + assert_equal('',cgi.code) + assert_equal('',cgi.code('bar')) + assert_equal('foo',cgi.code{'foo'}) + assert_equal('foo',cgi.code('bar'){'foo'}) + assert_equal('',cgi.samp) + assert_equal('',cgi.samp('bar')) + assert_equal('foo',cgi.samp{'foo'}) + assert_equal('foo',cgi.samp('bar'){'foo'}) + assert_equal('',cgi.kbd) + assert_equal('',cgi.kbd('bar')) + assert_equal('foo',cgi.kbd{'foo'}) + assert_equal('foo',cgi.kbd('bar'){'foo'}) + assert_equal('',cgi.var) + assert_equal('',cgi.var('bar')) + assert_equal('foo',cgi.var{'foo'}) + assert_equal('foo',cgi.var('bar'){'foo'}) + assert_equal('',cgi.cite) + assert_equal('',cgi.cite('bar')) + assert_equal('foo',cgi.cite{'foo'}) + assert_equal('foo',cgi.cite('bar'){'foo'}) + assert_equal('',cgi.font) + assert_equal('',cgi.font('bar')) + assert_equal('foo',cgi.font{'foo'}) + assert_equal('foo',cgi.font('bar'){'foo'}) + assert_equal('
      ',cgi.address) + assert_equal('
      ',cgi.address('bar')) + assert_equal('
      foo
      ',cgi.address{'foo'}) + assert_equal('
      foo
      ',cgi.address('bar'){'foo'}) + assert_equal('
      ',cgi.div) + assert_equal('
      ',cgi.div('bar')) + assert_equal('
      foo
      ',cgi.div{'foo'}) + assert_equal('
      foo
      ',cgi.div('bar'){'foo'}) + assert_equal('
      ',cgi.center) + assert_equal('
      ',cgi.center('bar')) + assert_equal('
      foo
      ',cgi.center{'foo'}) + assert_equal('
      foo
      ',cgi.center('bar'){'foo'}) + assert_equal('',cgi.map) + assert_equal('',cgi.map('bar')) + assert_equal('foo',cgi.map{'foo'}) + assert_equal('foo',cgi.map('bar'){'foo'}) + assert_equal('',cgi.applet) + assert_equal('',cgi.applet('bar')) + assert_equal('foo',cgi.applet{'foo'}) + assert_equal('foo',cgi.applet('bar'){'foo'}) + assert_equal('
      ',cgi.pre)
      +    assert_equal('
      ',cgi.pre('bar'))
      +    assert_equal('
      foo
      ',cgi.pre{'foo'}) + assert_equal('
      foo
      ',cgi.pre('bar'){'foo'}) + assert_equal('',cgi.xmp) + assert_equal('',cgi.xmp('bar')) + assert_equal('foo',cgi.xmp{'foo'}) + assert_equal('foo',cgi.xmp('bar'){'foo'}) + assert_equal('',cgi.listing) + assert_equal('',cgi.listing('bar')) + assert_equal('foo',cgi.listing{'foo'}) + assert_equal('foo',cgi.listing('bar'){'foo'}) + assert_equal('
      ',cgi.dl) + assert_equal('
      ',cgi.dl('bar')) + assert_equal('
      foo
      ',cgi.dl{'foo'}) + assert_equal('
      foo
      ',cgi.dl('bar'){'foo'}) + assert_equal('
        ',cgi.ol) + assert_equal('
          ',cgi.ol('bar')) + assert_equal('
            foo
          ',cgi.ol{'foo'}) + assert_equal('
            foo
          ',cgi.ol('bar'){'foo'}) + assert_equal('
            ',cgi.ul) + assert_equal('
              ',cgi.ul('bar')) + assert_equal('
                foo
              ',cgi.ul{'foo'}) + assert_equal('
                foo
              ',cgi.ul('bar'){'foo'}) + assert_equal('',cgi.dir) + assert_equal('',cgi.dir('bar')) + assert_equal('foo',cgi.dir{'foo'}) + assert_equal('foo',cgi.dir('bar'){'foo'}) + assert_equal('',cgi.menu) + assert_equal('',cgi.menu('bar')) + assert_equal('foo',cgi.menu{'foo'}) + assert_equal('foo',cgi.menu('bar'){'foo'}) + assert_equal('',cgi.select) + assert_equal('',cgi.select('bar')) + assert_equal('',cgi.select{'foo'}) + assert_equal('',cgi.select('bar'){'foo'}) + assert_equal('
              ',cgi.table) + assert_equal('
              ',cgi.table('bar')) + assert_equal('foo
              ',cgi.table{'foo'}) + assert_equal('foo
              ',cgi.table('bar'){'foo'}) + assert_equal('',cgi.title) + assert_equal('',cgi.title('bar')) + assert_equal('foo',cgi.title{'foo'}) + assert_equal('foo',cgi.title('bar'){'foo'}) + assert_equal('',cgi.style) + assert_equal('',cgi.style('bar')) + assert_equal('',cgi.style{'foo'}) + assert_equal('',cgi.style('bar'){'foo'}) + assert_equal('',cgi.script) + assert_equal('',cgi.script('bar')) + assert_equal('',cgi.script{'foo'}) + assert_equal('',cgi.script('bar'){'foo'}) + assert_equal('

              ',cgi.h1) + assert_equal('

              ',cgi.h1('bar')) + assert_equal('

              foo

              ',cgi.h1{'foo'}) + assert_equal('

              foo

              ',cgi.h1('bar'){'foo'}) + assert_equal('

              ',cgi.h2) + assert_equal('

              ',cgi.h2('bar')) + assert_equal('

              foo

              ',cgi.h2{'foo'}) + assert_equal('

              foo

              ',cgi.h2('bar'){'foo'}) + assert_equal('

              ',cgi.h3) + assert_equal('

              ',cgi.h3('bar')) + assert_equal('

              foo

              ',cgi.h3{'foo'}) + assert_equal('

              foo

              ',cgi.h3('bar'){'foo'}) + assert_equal('

              ',cgi.h4) + assert_equal('

              ',cgi.h4('bar')) + assert_equal('

              foo

              ',cgi.h4{'foo'}) + assert_equal('

              foo

              ',cgi.h4('bar'){'foo'}) + assert_equal('
              ',cgi.h5) + assert_equal('
              ',cgi.h5('bar')) + assert_equal('
              foo
              ',cgi.h5{'foo'}) + assert_equal('
              foo
              ',cgi.h5('bar'){'foo'}) + assert_equal('
              ',cgi.h6) + assert_equal('
              ',cgi.h6('bar')) + assert_equal('
              foo
              ',cgi.h6{'foo'}) + assert_equal('
              foo
              ',cgi.h6('bar'){'foo'}) + assert_match(/^